From bbfa8fe7833c427947a3c61a8c502297cec622b8 Mon Sep 17 00:00:00 2001 From: davecra Date: Sat, 3 Mar 2018 11:11:25 -0500 Subject: [PATCH] Initial Commit --- .vs/ProjectSettings.json | 3 + .vs/VSWorkspaceState.json | 7 + .../v15/.suo | Bin 0 -> 10752 bytes .vs/slnx.sqlite | Bin 0 -> 73728 bytes assets/icon-16.png | Bin 0 -> 678 bytes assets/icon-32.png | Bin 0 -> 1491 bytes assets/icon-80.png | Bin 0 -> 30121 bytes assets/logo-filled.png | Bin 0 -> 30121 bytes bsconfig.json | 3 +- function-file/MicrosoftAjax.js | 7 - function-file/dialog.html | 53 - function-file/function-file.html | 16 +- function-file/function-file.js | 299 +- index.html | 52 - node_modules/.bin/eslint | 15 + node_modules/.bin/eslint.cmd | 7 + node_modules/.bin/esparse | 15 + node_modules/.bin/esparse.cmd | 7 + node_modules/.bin/esvalidate | 15 + node_modules/.bin/esvalidate.cmd | 7 + node_modules/.bin/js-yaml | 15 + node_modules/.bin/js-yaml.cmd | 7 + node_modules/.bin/rimraf | 15 + node_modules/.bin/rimraf.cmd | 7 + node_modules/.bin/which | 15 + node_modules/.bin/which.cmd | 7 + .../office-js/NPM.DEPLOYMENT.INFO.yaml | 49 + .../dist/am-et/office_strings.debug.js | 190 + .../office-js/dist/am-et/office_strings.js | 3 + .../dist/am-et/outlook_strings.debug.js | 35 + .../office-js/dist/am-et/outlook_strings.js | 3 + .../dist/ar-sa.pseudo/office_strings.debug.js | 319 +- .../dist/ar-sa.pseudo/office_strings.js | 4 +- .../ar-sa.pseudo/outlook_strings.debug.js | 41 +- .../dist/ar-sa.pseudo/outlook_strings.js | 4 +- .../dist/ar-sa/office_strings.debug.js | 317 +- .../office-js/dist/ar-sa/office_strings.js | 4 +- .../dist/ar-sa/outlook_strings.debug.js | 47 +- .../office-js/dist/ar-sa/outlook_strings.js | 4 +- .../aria-web-telemetry-2.9.0.min.js | 2 + .../dist/ariatelemetry/aria-web-telemetry.js | 1 + .../dist/bg-bg/office_strings.debug.js | 311 +- .../office-js/dist/bg-bg/office_strings.js | 4 +- .../dist/bg-bg/outlook_strings.debug.js | 39 +- .../office-js/dist/bg-bg/outlook_strings.js | 4 +- .../dist/ca-es/office_strings.debug.js | 307 +- .../office-js/dist/ca-es/office_strings.js | 4 +- .../dist/ca-es/outlook_strings.debug.js | 43 +- .../office-js/dist/ca-es/outlook_strings.js | 4 +- .../dist/cs-cz/office_strings.debug.js | 319 +- .../office-js/dist/cs-cz/office_strings.js | 4 +- .../dist/cs-cz/outlook_strings.debug.js | 45 +- .../office-js/dist/cs-cz/outlook_strings.js | 4 +- .../dist/da-dk/office_strings.debug.js | 311 +- .../office-js/dist/da-dk/office_strings.js | 4 +- .../dist/da-dk/outlook_strings.debug.js | 45 +- .../office-js/dist/da-dk/outlook_strings.js | 4 +- .../dist/de-de/office_strings.debug.js | 317 +- .../office-js/dist/de-de/office_strings.js | 4 +- .../dist/de-de/outlook_strings.debug.js | 45 +- .../office-js/dist/de-de/outlook_strings.js | 4 +- .../dist/el-gr/office_strings.debug.js | 311 +- .../office-js/dist/el-gr/office_strings.js | 4 +- .../dist/el-gr/outlook_strings.debug.js | 47 +- .../office-js/dist/el-gr/outlook_strings.js | 4 +- .../dist/en-us/office_strings.debug.js | 344 +- .../office-js/dist/en-us/office_strings.js | 11 +- .../dist/en-us/outlook_strings.debug.js | 53 +- .../office-js/dist/en-us/outlook_strings.js | 11 +- .../dist/es-es/office_strings.debug.js | 311 +- .../office-js/dist/es-es/office_strings.js | 4 +- .../dist/es-es/outlook_strings.debug.js | 45 +- .../office-js/dist/es-es/outlook_strings.js | 4 +- .../dist/et-ee/office_strings.debug.js | 309 +- .../office-js/dist/et-ee/office_strings.js | 4 +- .../dist/et-ee/outlook_strings.debug.js | 43 +- .../office-js/dist/et-ee/outlook_strings.js | 4 +- .../dist/eu-es/office_strings.debug.js | 317 +- .../office-js/dist/eu-es/office_strings.js | 4 +- .../dist/eu-es/outlook_strings.debug.js | 43 +- .../office-js/dist/eu-es/outlook_strings.js | 4 +- .../dist/excel-android-16.00.debug.js | 32393 ++++++++++++++++ .../office-js/dist/excel-android-16.00.js | 21 + .../office-js/dist/excel-ios-16.00.debug.js | 8716 +++-- .../office-js/dist/excel-ios-16.00.js | 6 +- .../office-js/dist/excel-mac-16.00.debug.js | 8808 +++-- .../office-js/dist/excel-mac-16.00.js | 6 +- .../office-js/dist/excel-web-16.00.debug.js | 8807 +++-- .../office-js/dist/excel-web-16.00.js | 6 +- .../office-js/dist/excel-win32-16.01.debug.js | 8810 +++-- .../office-js/dist/excel-win32-16.01.js | 6 +- .../office-js/dist/excel-winrt-16.00.debug.js | 8516 ++-- .../office-js/dist/excel-winrt-16.00.js | 6 +- .../dist/fi-fi/office_strings.debug.js | 313 +- .../office-js/dist/fi-fi/office_strings.js | 4 +- .../dist/fi-fi/outlook_strings.debug.js | 45 +- .../office-js/dist/fi-fi/outlook_strings.js | 4 +- .../dist/fr-fr/office_strings.debug.js | 313 +- .../office-js/dist/fr-fr/office_strings.js | 4 +- .../dist/fr-fr/outlook_strings.debug.js | 45 +- .../office-js/dist/fr-fr/outlook_strings.js | 4 +- .../dist/gl-es/office_strings.debug.js | 305 +- .../office-js/dist/gl-es/office_strings.js | 4 +- .../dist/gl-es/outlook_strings.debug.js | 45 +- .../office-js/dist/gl-es/outlook_strings.js | 4 +- .../dist/he-il/office_strings.debug.js | 319 +- .../office-js/dist/he-il/office_strings.js | 4 +- .../dist/he-il/outlook_strings.debug.js | 41 +- .../office-js/dist/he-il/outlook_strings.js | 4 +- .../dist/hi-in/office_strings.debug.js | 313 +- .../office-js/dist/hi-in/office_strings.js | 4 +- .../dist/hi-in/outlook_strings.debug.js | 41 +- .../office-js/dist/hi-in/outlook_strings.js | 4 +- .../dist/hr-hr/office_strings.debug.js | 315 +- .../office-js/dist/hr-hr/office_strings.js | 4 +- .../dist/hr-hr/outlook_strings.debug.js | 41 +- .../office-js/dist/hr-hr/outlook_strings.js | 4 +- .../dist/hu-hu/office_strings.debug.js | 313 +- .../office-js/dist/hu-hu/office_strings.js | 4 +- .../dist/hu-hu/outlook_strings.debug.js | 37 +- .../office-js/dist/hu-hu/outlook_strings.js | 4 +- .../dist/id-id/office_strings.debug.js | 319 +- .../office-js/dist/id-id/office_strings.js | 4 +- .../dist/id-id/outlook_strings.debug.js | 43 +- .../office-js/dist/id-id/outlook_strings.js | 4 +- .../dist/it-it/office_strings.debug.js | 315 +- .../office-js/dist/it-it/office_strings.js | 4 +- .../dist/it-it/outlook_strings.debug.js | 45 +- .../office-js/dist/it-it/outlook_strings.js | 4 +- .../dist/ja-jp.pseudo/office_strings.debug.js | 315 +- .../dist/ja-jp.pseudo/office_strings.js | 4 +- .../ja-jp.pseudo/outlook_strings.debug.js | 41 +- .../dist/ja-jp.pseudo/outlook_strings.js | 4 +- .../dist/ja-jp/office_strings.debug.js | 319 +- .../office-js/dist/ja-jp/office_strings.js | 4 +- .../dist/ja-jp/outlook_strings.debug.js | 45 +- .../office-js/dist/ja-jp/outlook_strings.js | 4 +- .../dist/kk-kz/office_strings.debug.js | 317 +- .../office-js/dist/kk-kz/office_strings.js | 4 +- .../dist/kk-kz/outlook_strings.debug.js | 43 +- .../office-js/dist/kk-kz/outlook_strings.js | 4 +- .../dist/ko-kr/office_strings.debug.js | 309 +- .../office-js/dist/ko-kr/office_strings.js | 4 +- .../dist/ko-kr/outlook_strings.debug.js | 45 +- .../office-js/dist/ko-kr/outlook_strings.js | 4 +- .../dist/lo-la/office_strings.debug.js | 190 + .../office-js/dist/lo-la/office_strings.js | 3 + .../dist/lo-la/outlook_strings.debug.js | 35 + .../office-js/dist/lo-la/outlook_strings.js | 3 + .../dist/lt-lt/office_strings.debug.js | 311 +- .../office-js/dist/lt-lt/office_strings.js | 4 +- .../dist/lt-lt/outlook_strings.debug.js | 45 +- .../office-js/dist/lt-lt/outlook_strings.js | 4 +- .../dist/lv-lv/office_strings.debug.js | 321 +- .../office-js/dist/lv-lv/office_strings.js | 4 +- .../dist/lv-lv/outlook_strings.debug.js | 45 +- .../office-js/dist/lv-lv/outlook_strings.js | 4 +- .../dist/ms-my/office_strings.debug.js | 311 +- .../office-js/dist/ms-my/office_strings.js | 4 +- .../dist/ms-my/outlook_strings.debug.js | 37 +- .../office-js/dist/ms-my/outlook_strings.js | 4 +- .../dist/nb-no/office_strings.debug.js | 309 +- .../office-js/dist/nb-no/office_strings.js | 4 +- .../dist/nb-no/outlook_strings.debug.js | 47 +- .../office-js/dist/nb-no/outlook_strings.js | 4 +- .../dist/nl-nl/office_strings.debug.js | 315 +- .../office-js/dist/nl-nl/office_strings.js | 4 +- .../dist/nl-nl/outlook_strings.debug.js | 43 +- .../office-js/dist/nl-nl/outlook_strings.js | 4 +- .../dist/o15apptofilemappingtable.debug.js | 495 +- .../dist/o15apptofilemappingtable.js | 4 +- .../@microsoft/office-js/dist/office-vsdoc.js | 927 +- .../@microsoft/office-js/dist/office.d.ts | 13711 ++++++- .../@microsoft/office-js/dist/office.debug.js | 28 +- .../@microsoft/office-js/dist/office.js | 4 +- .../office-js/dist/onenote-ios-16.00.debug.js | 3888 +- .../office-js/dist/onenote-ios-16.00.js | 8 +- .../office-js/dist/onenote-web-16.00.debug.js | 3696 +- .../office-js/dist/onenote-web-16.00.js | 8 +- .../dist/onenote-win32-16.00.debug.js | 3993 +- .../office-js/dist/onenote-win32-16.00.js | 8 +- .../dist/onenote-winrt-16.00.debug.js | 4012 +- .../office-js/dist/onenote-winrt-16.00.js | 8 +- .../office-js/dist/outlook-ios-16.00.debug.js | 21930 ++++++----- .../office-js/dist/outlook-ios-16.00.js | 15 +- .../office-js/dist/outlook-mac-16.00.debug.js | 21980 ++++++----- .../office-js/dist/outlook-mac-16.00.js | 15 +- .../office-js/dist/outlook-web-16.01.debug.js | 25352 ++++++------ .../office-js/dist/outlook-web-16.01.js | 17 +- .../dist/outlook-win32-16.02.debug.js | 21493 +++++----- .../office-js/dist/outlook-win32-16.02.js | 17 +- .../dist/outlook-win32.debug-vsdoc.js | 2 +- .../dist/pl-pl/office_strings.debug.js | 315 +- .../office-js/dist/pl-pl/office_strings.js | 4 +- .../dist/pl-pl/outlook_strings.debug.js | 45 +- .../office-js/dist/pl-pl/outlook_strings.js | 4 +- .../dist/powerpoint-ios-16.00.debug.js | 305 +- .../office-js/dist/powerpoint-ios-16.00.js | 4 +- .../dist/powerpoint-mac-16.00.debug.js | 303 +- .../office-js/dist/powerpoint-mac-16.00.js | 4 +- .../dist/powerpoint-web-16.00.debug.js | 685 +- .../office-js/dist/powerpoint-web-16.00.js | 4 +- .../dist/powerpoint-win32-16.01.debug.js | 659 +- .../office-js/dist/powerpoint-win32-16.01.js | 4 +- .../dist/project-win32-16.01.debug.js | 318 +- .../office-js/dist/project-win32-16.01.js | 4 +- .../dist/pt-br/office_strings.debug.js | 315 +- .../office-js/dist/pt-br/office_strings.js | 4 +- .../dist/pt-br/outlook_strings.debug.js | 45 +- .../office-js/dist/pt-br/outlook_strings.js | 4 +- .../dist/pt-pt/office_strings.debug.js | 311 +- .../office-js/dist/pt-pt/office_strings.js | 4 +- .../dist/pt-pt/outlook_strings.debug.js | 37 +- .../office-js/dist/pt-pt/outlook_strings.js | 4 +- .../dist/ro-ro/office_strings.debug.js | 311 +- .../office-js/dist/ro-ro/office_strings.js | 4 +- .../dist/ro-ro/outlook_strings.debug.js | 39 +- .../office-js/dist/ro-ro/outlook_strings.js | 4 +- .../dist/ru-ru/office_strings.debug.js | 317 +- .../office-js/dist/ru-ru/office_strings.js | 4 +- .../dist/ru-ru/outlook_strings.debug.js | 43 +- .../office-js/dist/ru-ru/outlook_strings.js | 4 +- .../dist/sk-sk/office_strings.debug.js | 309 +- .../office-js/dist/sk-sk/office_strings.js | 4 +- .../dist/sk-sk/outlook_strings.debug.js | 43 +- .../office-js/dist/sk-sk/outlook_strings.js | 4 +- .../dist/sl-si/office_strings.debug.js | 313 +- .../office-js/dist/sl-si/office_strings.js | 4 +- .../dist/sl-si/outlook_strings.debug.js | 45 +- .../office-js/dist/sl-si/outlook_strings.js | 4 +- .../dist/sr-cyrl-cs/office_strings.debug.js | 313 +- .../dist/sr-cyrl-cs/office_strings.js | 4 +- .../dist/sr-cyrl-cs/outlook_strings.debug.js | 45 +- .../dist/sr-cyrl-cs/outlook_strings.js | 4 +- .../dist/sr-cyrl-rs/office_strings.debug.js | 313 +- .../dist/sr-cyrl-rs/office_strings.js | 4 +- .../dist/sr-cyrl-rs/outlook_strings.debug.js | 43 +- .../dist/sr-cyrl-rs/outlook_strings.js | 4 +- .../dist/sr-latn-cs/office_strings.debug.js | 315 +- .../dist/sr-latn-cs/office_strings.js | 4 +- .../dist/sr-latn-cs/outlook_strings.debug.js | 45 +- .../dist/sr-latn-cs/outlook_strings.js | 4 +- .../dist/sr-latn-rs/office_strings.debug.js | 313 +- .../dist/sr-latn-rs/office_strings.js | 4 +- .../dist/sr-latn-rs/outlook_strings.debug.js | 45 +- .../dist/sr-latn-rs/outlook_strings.js | 4 +- .../dist/sv-se/office_strings.debug.js | 313 +- .../office-js/dist/sv-se/office_strings.js | 4 +- .../dist/sv-se/outlook_strings.debug.js | 45 +- .../office-js/dist/sv-se/outlook_strings.js | 4 +- .../dist/th-th/office_strings.debug.js | 313 +- .../office-js/dist/th-th/office_strings.js | 4 +- .../dist/th-th/outlook_strings.debug.js | 43 +- .../office-js/dist/th-th/outlook_strings.js | 4 +- .../dist/tr-tr/office_strings.debug.js | 313 +- .../office-js/dist/tr-tr/office_strings.js | 4 +- .../dist/tr-tr/outlook_strings.debug.js | 43 +- .../office-js/dist/tr-tr/outlook_strings.js | 4 +- .../dist/uk-ua/office_strings.debug.js | 317 +- .../office-js/dist/uk-ua/office_strings.js | 4 +- .../dist/uk-ua/outlook_strings.debug.js | 43 +- .../office-js/dist/uk-ua/outlook_strings.js | 4 +- .../dist/vi-vn/office_strings.debug.js | 315 +- .../office-js/dist/vi-vn/office_strings.js | 4 +- .../dist/vi-vn/outlook_strings.debug.js | 47 +- .../office-js/dist/vi-vn/outlook_strings.js | 4 +- .../office-js/dist/word-ios-16.00.debug.js | 5294 ++- .../office-js/dist/word-ios-16.00.js | 6 +- .../office-js/dist/word-mac-16.00.debug.js | 5288 ++- .../office-js/dist/word-mac-16.00.js | 6 +- .../office-js/dist/word-web-16.00.debug.js | 5466 ++- .../office-js/dist/word-web-16.00.js | 6 +- .../office-js/dist/word-win32-16.01.debug.js | 5588 ++- .../office-js/dist/word-win32-16.01.js | 6 +- .../dist/zh-cn/office_strings.debug.js | 315 +- .../office-js/dist/zh-cn/office_strings.js | 4 +- .../dist/zh-cn/outlook_strings.debug.js | 41 +- .../office-js/dist/zh-cn/outlook_strings.js | 4 +- .../dist/zh-tw/office_strings.debug.js | 315 +- .../office-js/dist/zh-tw/office_strings.js | 4 +- .../dist/zh-tw/outlook_strings.debug.js | 47 +- .../office-js/dist/zh-tw/outlook_strings.js | 4 +- .../@microsoft/office-js/package.json | 65 +- node_modules/@microsoft/office-js/readme.md | 58 + node_modules/ajv-keywords/LICENSE | 21 + node_modules/ajv-keywords/README.md | 624 + node_modules/ajv-keywords/index.js | 35 + .../ajv-keywords/keywords/_formatLimit.js | 90 + node_modules/ajv-keywords/keywords/_util.js | 15 + .../ajv-keywords/keywords/deepProperties.js | 54 + .../ajv-keywords/keywords/deepRequired.js | 57 + .../keywords/dot/_formatLimit.jst | 116 + .../keywords/dot/patternRequired.jst | 33 + .../ajv-keywords/keywords/dot/switch.jst | 73 + .../ajv-keywords/keywords/dotjs/README.md | 3 + .../keywords/dotjs/_formatLimit.js | 176 + .../keywords/dotjs/patternRequired.js | 58 + .../ajv-keywords/keywords/dotjs/switch.js | 128 + .../ajv-keywords/keywords/dynamicDefaults.js | 68 + .../ajv-keywords/keywords/formatMaximum.js | 3 + .../ajv-keywords/keywords/formatMinimum.js | 3 + node_modules/ajv-keywords/keywords/index.js | 18 + .../ajv-keywords/keywords/instanceof.js | 58 + .../ajv-keywords/keywords/patternRequired.js | 21 + .../ajv-keywords/keywords/prohibited.js | 25 + node_modules/ajv-keywords/keywords/range.js | 36 + node_modules/ajv-keywords/keywords/regexp.js | 36 + node_modules/ajv-keywords/keywords/select.js | 79 + node_modules/ajv-keywords/keywords/switch.js | 38 + node_modules/ajv-keywords/keywords/typeof.js | 32 + .../keywords/uniqueItemProperties.js | 32 + node_modules/ajv-keywords/package.json | 114 + node_modules/ansi-escapes/index.js | 102 + node_modules/ansi-escapes/license | 9 + node_modules/ansi-escapes/package.json | 119 + node_modules/ansi-escapes/readme.md | 174 + node_modules/argparse/CHANGELOG.md | 185 + node_modules/argparse/LICENSE | 21 + node_modules/argparse/README.md | 257 + node_modules/argparse/index.js | 3 + node_modules/argparse/lib/action.js | 146 + node_modules/argparse/lib/action/append.js | 53 + .../argparse/lib/action/append/constant.js | 47 + node_modules/argparse/lib/action/count.js | 40 + node_modules/argparse/lib/action/help.js | 47 + node_modules/argparse/lib/action/store.js | 50 + .../argparse/lib/action/store/constant.js | 43 + .../argparse/lib/action/store/false.js | 27 + .../argparse/lib/action/store/true.js | 26 + .../argparse/lib/action/subparsers.js | 149 + node_modules/argparse/lib/action/version.js | 47 + node_modules/argparse/lib/action_container.js | 482 + node_modules/argparse/lib/argparse.js | 14 + node_modules/argparse/lib/argument/error.js | 50 + .../argparse/lib/argument/exclusive.js | 54 + node_modules/argparse/lib/argument/group.js | 75 + node_modules/argparse/lib/argument_parser.js | 1161 + node_modules/argparse/lib/const.js | 21 + .../argparse/lib/help/added_formatters.js | 87 + node_modules/argparse/lib/help/formatter.js | 795 + node_modules/argparse/lib/namespace.js | 76 + node_modules/argparse/lib/utils.js | 57 + node_modules/argparse/package.json | 108 + node_modules/array-union/index.js | 6 + node_modules/array-union/license | 21 + node_modules/array-union/package.json | 107 + node_modules/array-union/readme.md | 28 + node_modules/array-uniq/index.js | 62 + node_modules/array-uniq/license | 21 + node_modules/array-uniq/package.json | 105 + node_modules/array-uniq/readme.md | 30 + node_modules/babel-code-frame/.npmignore | 3 + node_modules/babel-code-frame/README.md | 60 + node_modules/babel-code-frame/lib/index.js | 141 + .../babel-code-frame/package-lock.json | 66 + node_modules/babel-code-frame/package.json | 98 + node_modules/caller-path/index.js | 6 + node_modules/caller-path/package.json | 102 + node_modules/caller-path/readme.md | 36 + node_modules/callsites/index.js | 8 + node_modules/callsites/package.json | 98 + node_modules/callsites/readme.md | 47 + node_modules/chardet/.npmignore | 2 + node_modules/chardet/.travis.yml | 5 + node_modules/chardet/LICENSE | 19 + node_modules/chardet/README.md | 66 + node_modules/chardet/encoding/iso2022.js | 141 + node_modules/chardet/encoding/mbcs.js | 502 + node_modules/chardet/encoding/sbcs.js | 907 + node_modules/chardet/encoding/unicode.js | 112 + node_modules/chardet/encoding/utf8.js | 84 + node_modules/chardet/index.js | 117 + node_modules/chardet/match.js | 6 + node_modules/chardet/package.json | 106 + node_modules/chardet/yarn.lock | 364 + node_modules/circular-json/.npmignore | 9 + node_modules/circular-json/LICENSE.txt | 19 + node_modules/circular-json/README.md | 135 + .../circular-json/build/circular-json.js | 2 + .../circular-json/build/circular-json.max.js | 189 + .../circular-json/build/circular-json.node.js | 185 + node_modules/circular-json/package.json | 102 + .../circular-json/template/license.after | 2 + .../circular-json/template/license.before | 1 + node_modules/cli-width/.npmignore | 3 + node_modules/cli-width/.travis.yml | 11 + node_modules/cli-width/CHANGELOG.md | 16 + node_modules/cli-width/LICENSE | 13 + node_modules/cli-width/README.md | 72 + node_modules/cli-width/index.js | 49 + node_modules/cli-width/package.json | 99 + node_modules/color-convert/CHANGELOG.md | 54 + node_modules/color-convert/LICENSE | 21 + node_modules/color-convert/README.md | 68 + node_modules/color-convert/conversions.js | 861 + node_modules/color-convert/index.js | 78 + node_modules/color-convert/package.json | 127 + node_modules/color-convert/route.js | 97 + node_modules/color-name/.eslintrc.json | 43 + node_modules/color-name/.npmignore | 107 + node_modules/color-name/LICENSE | 8 + node_modules/color-name/README.md | 11 + node_modules/color-name/index.js | 152 + node_modules/color-name/package.json | 90 + node_modules/color-name/test.js | 7 + node_modules/concat-stream/LICENSE | 24 + node_modules/concat-stream/index.js | 143 + node_modules/concat-stream/package.json | 125 + node_modules/concat-stream/readme.md | 102 + node_modules/cross-spawn/CHANGELOG.md | 6 + node_modules/cross-spawn/LICENSE | 19 + node_modules/cross-spawn/README.md | 85 + node_modules/cross-spawn/index.js | 59 + node_modules/cross-spawn/lib/enoent.js | 73 + node_modules/cross-spawn/lib/parse.js | 113 + .../cross-spawn/lib/util/escapeArgument.js | 30 + .../cross-spawn/lib/util/escapeCommand.js | 12 + .../lib/util/hasEmptyArgumentBug.js | 18 + .../cross-spawn/lib/util/readShebang.js | 37 + .../cross-spawn/lib/util/resolveCommand.js | 31 + node_modules/cross-spawn/package.json | 118 + node_modules/deep-is/.npmignore | 1 + node_modules/deep-is/.travis.yml | 6 + node_modules/deep-is/LICENSE | 22 + node_modules/deep-is/README.markdown | 70 + node_modules/deep-is/example/cmp.js | 11 + node_modules/deep-is/index.js | 102 + node_modules/deep-is/package.json | 120 + node_modules/deep-is/test/NaN.js | 16 + node_modules/deep-is/test/cmp.js | 23 + node_modules/deep-is/test/neg-vs-pos-0.js | 15 + node_modules/del/index.js | 73 + node_modules/del/license | 21 + node_modules/del/package.json | 128 + node_modules/del/readme.md | 106 + node_modules/doctrine/CHANGELOG.md | 94 + node_modules/doctrine/LICENSE | 177 + .../doctrine/LICENSE.closure-compiler | 202 + node_modules/doctrine/LICENSE.esprima | 19 + node_modules/doctrine/README.md | 165 + node_modules/doctrine/lib/doctrine.js | 899 + node_modules/doctrine/lib/typed.js | 1305 + node_modules/doctrine/lib/utility.js | 35 + node_modules/doctrine/package.json | 123 + node_modules/easyews/LICENSE | 674 + node_modules/easyews/README.md | 280 + node_modules/easyews/_config.yml | 1 + node_modules/easyews/easyEws.js | 964 + node_modules/easyews/package.json | 91 + node_modules/eslint-scope/CHANGELOG.md | 25 + node_modules/eslint-scope/LICENSE | 23 + node_modules/eslint-scope/README.md | 54 + node_modules/eslint-scope/lib/definition.js | 86 + node_modules/eslint-scope/lib/index.js | 165 + .../eslint-scope/lib/pattern-visitor.js | 152 + node_modules/eslint-scope/lib/reference.js | 167 + node_modules/eslint-scope/lib/referencer.js | 638 + .../eslint-scope/lib/scope-manager.js | 255 + node_modules/eslint-scope/lib/scope.js | 722 + node_modules/eslint-scope/lib/variable.js | 89 + node_modules/eslint-scope/package.json | 117 + node_modules/eslint-visitor-keys/CHANGELOG.md | 11 + node_modules/eslint-visitor-keys/LICENSE | 201 + node_modules/eslint-visitor-keys/README.md | 98 + node_modules/eslint-visitor-keys/lib/index.js | 81 + .../eslint-visitor-keys/lib/visitor-keys.json | 277 + node_modules/eslint-visitor-keys/package.json | 104 + node_modules/eslint/CHANGELOG.md | 4564 +++ node_modules/eslint/LICENSE | 19 + node_modules/eslint/README.md | 254 + node_modules/eslint/bin/eslint.js | 75 + node_modules/eslint/conf/blank-script.json | 21 + node_modules/eslint/conf/category-list.json | 40 + node_modules/eslint/conf/config-schema.js | 70 + .../eslint/conf/default-cli-options.js | 30 + .../eslint/conf/default-config-options.js | 29 + node_modules/eslint/conf/environments.js | 231 + node_modules/eslint/conf/eslint-all.js | 31 + .../eslint/conf/eslint-recommended.js | 271 + node_modules/eslint/conf/replacements.json | 22 + node_modules/eslint/lib/api.js | 16 + node_modules/eslint/lib/ast-utils.js | 1350 + node_modules/eslint/lib/cli-engine.js | 719 + node_modules/eslint/lib/cli.js | 219 + .../code-path-analysis/code-path-analyzer.js | 659 + .../code-path-analysis/code-path-segment.js | 245 + .../lib/code-path-analysis/code-path-state.js | 1440 + .../lib/code-path-analysis/code-path.js | 234 + .../lib/code-path-analysis/debug-helpers.js | 200 + .../lib/code-path-analysis/fork-context.js | 262 + .../lib/code-path-analysis/id-generator.js | 46 + node_modules/eslint/lib/config.js | 365 + node_modules/eslint/lib/config/autoconfig.js | 359 + .../eslint/lib/config/config-cache.js | 130 + node_modules/eslint/lib/config/config-file.js | 595 + .../eslint/lib/config/config-initializer.js | 605 + node_modules/eslint/lib/config/config-ops.js | 383 + node_modules/eslint/lib/config/config-rule.js | 322 + .../eslint/lib/config/config-validator.js | 251 + .../eslint/lib/config/environments.js | 84 + node_modules/eslint/lib/config/plugins.js | 150 + node_modules/eslint/lib/file-finder.js | 145 + .../eslint/lib/formatters/checkstyle.js | 60 + .../eslint/lib/formatters/codeframe.js | 138 + node_modules/eslint/lib/formatters/compact.js | 60 + .../lib/formatters/html-template-message.html | 8 + .../lib/formatters/html-template-page.html | 115 + .../lib/formatters/html-template-result.html | 6 + node_modules/eslint/lib/formatters/html.js | 127 + .../eslint/lib/formatters/jslint-xml.js | 41 + node_modules/eslint/lib/formatters/json.js | 13 + node_modules/eslint/lib/formatters/junit.js | 70 + node_modules/eslint/lib/formatters/stylish.js | 100 + node_modules/eslint/lib/formatters/table.js | 150 + node_modules/eslint/lib/formatters/tap.js | 92 + node_modules/eslint/lib/formatters/unix.js | 58 + .../eslint/lib/formatters/visualstudio.js | 63 + node_modules/eslint/lib/ignored-paths.js | 289 + node_modules/eslint/lib/linter.js | 1185 + node_modules/eslint/lib/load-rules.js | 50 + node_modules/eslint/lib/logging.js | 28 + node_modules/eslint/lib/options.js | 241 + node_modules/eslint/lib/report-translator.js | 286 + node_modules/eslint/lib/rules.js | 140 + node_modules/eslint/lib/rules/.eslintrc.yml | 4 + .../eslint/lib/rules/accessor-pairs.js | 161 + .../eslint/lib/rules/array-bracket-newline.js | 256 + .../eslint/lib/rules/array-bracket-spacing.js | 236 + .../eslint/lib/rules/array-callback-return.js | 253 + .../eslint/lib/rules/array-element-newline.js | 236 + .../eslint/lib/rules/arrow-body-style.js | 236 + node_modules/eslint/lib/rules/arrow-parens.js | 161 + .../eslint/lib/rules/arrow-spacing.js | 158 + .../eslint/lib/rules/block-scoped-var.js | 120 + .../eslint/lib/rules/block-spacing.js | 145 + node_modules/eslint/lib/rules/brace-style.js | 185 + .../eslint/lib/rules/callback-return.js | 180 + node_modules/eslint/lib/rules/camelcase.js | 159 + .../eslint/lib/rules/capitalized-comments.js | 307 + .../lib/rules/class-methods-use-this.js | 115 + node_modules/eslint/lib/rules/comma-dangle.js | 341 + .../eslint/lib/rules/comma-spacing.js | 187 + node_modules/eslint/lib/rules/comma-style.js | 311 + node_modules/eslint/lib/rules/complexity.js | 159 + .../lib/rules/computed-property-spacing.js | 185 + .../eslint/lib/rules/consistent-return.js | 194 + .../eslint/lib/rules/consistent-this.js | 149 + .../eslint/lib/rules/constructor-super.js | 395 + node_modules/eslint/lib/rules/curly.js | 379 + node_modules/eslint/lib/rules/default-case.js | 95 + node_modules/eslint/lib/rules/dot-location.js | 94 + node_modules/eslint/lib/rules/dot-notation.js | 165 + node_modules/eslint/lib/rules/eol-last.js | 107 + node_modules/eslint/lib/rules/eqeqeq.js | 185 + .../eslint/lib/rules/for-direction.js | 106 + .../eslint/lib/rules/func-call-spacing.js | 160 + .../eslint/lib/rules/func-name-matching.js | 194 + node_modules/eslint/lib/rules/func-names.js | 115 + node_modules/eslint/lib/rules/func-style.js | 90 + .../lib/rules/function-paren-newline.js | 222 + .../lib/rules/generator-star-spacing.js | 200 + .../eslint/lib/rules/getter-return.js | 178 + .../eslint/lib/rules/global-require.js | 76 + node_modules/eslint/lib/rules/guard-for-in.js | 71 + .../eslint/lib/rules/handle-callback-err.js | 90 + node_modules/eslint/lib/rules/id-blacklist.js | 122 + node_modules/eslint/lib/rules/id-length.js | 117 + node_modules/eslint/lib/rules/id-match.js | 145 + .../lib/rules/implicit-arrow-linebreak.js | 87 + .../eslint/lib/rules/indent-legacy.js | 1138 + node_modules/eslint/lib/rules/indent.js | 1533 + .../eslint/lib/rules/init-declarations.js | 138 + node_modules/eslint/lib/rules/jsx-quotes.js | 90 + node_modules/eslint/lib/rules/key-spacing.js | 643 + .../eslint/lib/rules/keyword-spacing.js | 590 + .../eslint/lib/rules/line-comment-position.js | 116 + .../eslint/lib/rules/linebreak-style.js | 97 + .../eslint/lib/rules/lines-around-comment.js | 398 + .../lib/rules/lines-around-directive.js | 194 + .../lib/rules/lines-between-class-members.js | 140 + node_modules/eslint/lib/rules/max-depth.js | 149 + node_modules/eslint/lib/rules/max-len.js | 366 + node_modules/eslint/lib/rules/max-lines.js | 145 + .../eslint/lib/rules/max-nested-callbacks.js | 113 + node_modules/eslint/lib/rules/max-params.js | 97 + .../lib/rules/max-statements-per-line.js | 195 + .../eslint/lib/rules/max-statements.js | 171 + .../lib/rules/multiline-comment-style.js | 295 + .../eslint/lib/rules/multiline-ternary.js | 90 + node_modules/eslint/lib/rules/new-cap.js | 273 + node_modules/eslint/lib/rules/new-parens.js | 59 + .../eslint/lib/rules/newline-after-var.js | 255 + .../eslint/lib/rules/newline-before-return.js | 211 + .../lib/rules/newline-per-chained-call.js | 104 + node_modules/eslint/lib/rules/no-alert.js | 125 + .../eslint/lib/rules/no-array-constructor.js | 52 + .../eslint/lib/rules/no-await-in-loop.js | 102 + node_modules/eslint/lib/rules/no-bitwise.js | 116 + .../eslint/lib/rules/no-buffer-constructor.js | 41 + node_modules/eslint/lib/rules/no-caller.js | 44 + .../eslint/lib/rules/no-case-declarations.js | 62 + .../eslint/lib/rules/no-catch-shadow.js | 74 + .../eslint/lib/rules/no-class-assign.js | 59 + .../eslint/lib/rules/no-compare-neg-zero.js | 57 + .../eslint/lib/rules/no-cond-assign.js | 146 + .../eslint/lib/rules/no-confusing-arrow.js | 81 + node_modules/eslint/lib/rules/no-console.js | 136 + .../eslint/lib/rules/no-const-assign.js | 52 + .../eslint/lib/rules/no-constant-condition.js | 214 + node_modules/eslint/lib/rules/no-continue.js | 37 + .../eslint/lib/rules/no-control-regex.js | 132 + node_modules/eslint/lib/rules/no-debugger.js | 47 + .../eslint/lib/rules/no-delete-var.js | 40 + node_modules/eslint/lib/rules/no-div-regex.js | 43 + node_modules/eslint/lib/rules/no-dupe-args.js | 78 + .../eslint/lib/rules/no-dupe-class-members.js | 114 + node_modules/eslint/lib/rules/no-dupe-keys.js | 140 + .../eslint/lib/rules/no-duplicate-case.js | 48 + .../eslint/lib/rules/no-duplicate-imports.js | 138 + .../eslint/lib/rules/no-else-return.js | 282 + .../lib/rules/no-empty-character-class.js | 62 + .../eslint/lib/rules/no-empty-function.js | 165 + .../eslint/lib/rules/no-empty-pattern.js | 41 + node_modules/eslint/lib/rules/no-empty.js | 83 + node_modules/eslint/lib/rules/no-eq-null.js | 44 + node_modules/eslint/lib/rules/no-eval.js | 313 + node_modules/eslint/lib/rules/no-ex-assign.js | 50 + .../eslint/lib/rules/no-extend-native.js | 179 + .../eslint/lib/rules/no-extra-bind.js | 150 + .../eslint/lib/rules/no-extra-boolean-cast.js | 128 + .../eslint/lib/rules/no-extra-label.js | 145 + .../eslint/lib/rules/no-extra-parens.js | 750 + .../eslint/lib/rules/no-extra-semi.js | 125 + .../eslint/lib/rules/no-fallthrough.js | 136 + .../eslint/lib/rules/no-floating-decimal.js | 65 + .../eslint/lib/rules/no-func-assign.js | 64 + .../eslint/lib/rules/no-global-assign.js | 86 + .../eslint/lib/rules/no-implicit-coercion.js | 293 + .../eslint/lib/rules/no-implicit-globals.js | 56 + .../eslint/lib/rules/no-implied-eval.js | 162 + .../eslint/lib/rules/no-inline-comments.js | 66 + .../eslint/lib/rules/no-inner-declarations.js | 90 + .../eslint/lib/rules/no-invalid-regexp.js | 107 + .../eslint/lib/rules/no-invalid-this.js | 124 + .../lib/rules/no-irregular-whitespace.js | 237 + node_modules/eslint/lib/rules/no-iterator.js | 39 + node_modules/eslint/lib/rules/no-label-var.js | 70 + node_modules/eslint/lib/rules/no-labels.js | 142 + .../eslint/lib/rules/no-lone-blocks.js | 113 + node_modules/eslint/lib/rules/no-lonely-if.js | 84 + node_modules/eslint/lib/rules/no-loop-func.js | 202 + .../eslint/lib/rules/no-magic-numbers.js | 150 + .../eslint/lib/rules/no-mixed-operators.js | 210 + .../eslint/lib/rules/no-mixed-requires.js | 221 + .../lib/rules/no-mixed-spaces-and-tabs.js | 144 + .../eslint/lib/rules/no-multi-assign.js | 42 + .../eslint/lib/rules/no-multi-spaces.js | 131 + node_modules/eslint/lib/rules/no-multi-str.js | 56 + .../lib/rules/no-multiple-empty-lines.js | 137 + .../eslint/lib/rules/no-native-reassign.js | 90 + .../eslint/lib/rules/no-negated-condition.js | 83 + .../eslint/lib/rules/no-negated-in-lhs.js | 39 + .../eslint/lib/rules/no-nested-ternary.js | 35 + node_modules/eslint/lib/rules/no-new-func.js | 46 + .../eslint/lib/rules/no-new-object.js | 36 + .../eslint/lib/rules/no-new-require.js | 36 + .../eslint/lib/rules/no-new-symbol.js | 44 + .../eslint/lib/rules/no-new-wrappers.js | 38 + node_modules/eslint/lib/rules/no-new.js | 34 + node_modules/eslint/lib/rules/no-obj-calls.js | 40 + .../eslint/lib/rules/no-octal-escape.js | 48 + node_modules/eslint/lib/rules/no-octal.js | 36 + .../eslint/lib/rules/no-param-reassign.js | 174 + .../eslint/lib/rules/no-path-concat.js | 50 + node_modules/eslint/lib/rules/no-plusplus.js | 62 + .../eslint/lib/rules/no-process-env.js | 40 + .../eslint/lib/rules/no-process-exit.js | 36 + node_modules/eslint/lib/rules/no-proto.js | 39 + .../eslint/lib/rules/no-prototype-builtins.js | 55 + node_modules/eslint/lib/rules/no-redeclare.js | 102 + .../eslint/lib/rules/no-regex-spaces.js | 115 + .../eslint/lib/rules/no-restricted-globals.js | 121 + .../eslint/lib/rules/no-restricted-imports.js | 264 + .../eslint/lib/rules/no-restricted-modules.js | 178 + .../lib/rules/no-restricted-properties.js | 174 + .../eslint/lib/rules/no-restricted-syntax.js | 63 + .../eslint/lib/rules/no-return-assign.js | 72 + .../eslint/lib/rules/no-return-await.js | 98 + .../eslint/lib/rules/no-script-url.js | 42 + .../eslint/lib/rules/no-self-assign.js | 217 + .../eslint/lib/rules/no-self-compare.js | 54 + node_modules/eslint/lib/rules/no-sequences.js | 113 + .../lib/rules/no-shadow-restricted-names.js | 70 + node_modules/eslint/lib/rules/no-shadow.js | 189 + .../eslint/lib/rules/no-spaced-func.js | 76 + .../eslint/lib/rules/no-sparse-arrays.js | 44 + node_modules/eslint/lib/rules/no-sync.js | 54 + node_modules/eslint/lib/rules/no-tabs.js | 48 + .../lib/rules/no-template-curly-in-string.js | 38 + node_modules/eslint/lib/rules/no-ternary.js | 35 + .../eslint/lib/rules/no-this-before-super.js | 300 + .../eslint/lib/rules/no-throw-literal.js | 44 + .../eslint/lib/rules/no-trailing-spaces.js | 170 + .../eslint/lib/rules/no-undef-init.js | 64 + node_modules/eslint/lib/rules/no-undef.js | 72 + node_modules/eslint/lib/rules/no-undefined.js | 78 + .../eslint/lib/rules/no-underscore-dangle.js | 204 + .../lib/rules/no-unexpected-multiline.js | 99 + .../lib/rules/no-unmodified-loop-condition.js | 368 + .../eslint/lib/rules/no-unneeded-ternary.js | 156 + .../eslint/lib/rules/no-unreachable.js | 213 + .../eslint/lib/rules/no-unsafe-finally.js | 105 + .../eslint/lib/rules/no-unsafe-negation.js | 81 + .../eslint/lib/rules/no-unused-expressions.js | 127 + .../eslint/lib/rules/no-unused-labels.js | 107 + .../eslint/lib/rules/no-unused-vars.js | 643 + .../eslint/lib/rules/no-use-before-define.js | 267 + .../eslint/lib/rules/no-useless-call.js | 81 + .../lib/rules/no-useless-computed-key.js | 76 + .../eslint/lib/rules/no-useless-concat.js | 109 + .../lib/rules/no-useless-constructor.js | 183 + .../eslint/lib/rules/no-useless-escape.js | 224 + .../eslint/lib/rules/no-useless-rename.js | 148 + .../eslint/lib/rules/no-useless-return.js | 305 + node_modules/eslint/lib/rules/no-var.js | 329 + node_modules/eslint/lib/rules/no-void.js | 38 + .../eslint/lib/rules/no-warning-comments.js | 140 + .../rules/no-whitespace-before-property.js | 95 + node_modules/eslint/lib/rules/no-with.js | 33 + .../rules/nonblock-statement-body-position.js | 115 + .../eslint/lib/rules/object-curly-newline.js | 298 + .../eslint/lib/rules/object-curly-spacing.js | 300 + .../lib/rules/object-property-newline.js | 91 + .../eslint/lib/rules/object-shorthand.js | 457 + .../lib/rules/one-var-declaration-per-line.js | 87 + node_modules/eslint/lib/rules/one-var.js | 401 + .../eslint/lib/rules/operator-assignment.js | 207 + .../eslint/lib/rules/operator-linebreak.js | 253 + .../eslint/lib/rules/padded-blocks.js | 257 + .../rules/padding-line-between-statements.js | 596 + .../eslint/lib/rules/prefer-arrow-callback.js | 305 + node_modules/eslint/lib/rules/prefer-const.js | 322 + .../eslint/lib/rules/prefer-destructuring.js | 220 + .../lib/rules/prefer-numeric-literals.js | 113 + .../lib/rules/prefer-promise-reject-errors.js | 125 + .../eslint/lib/rules/prefer-reflect.js | 120 + .../eslint/lib/rules/prefer-rest-params.js | 112 + .../eslint/lib/rules/prefer-spread.js | 97 + .../eslint/lib/rules/prefer-template.js | 233 + node_modules/eslint/lib/rules/quote-props.js | 299 + node_modules/eslint/lib/rules/quotes.js | 297 + node_modules/eslint/lib/rules/radix.js | 172 + .../eslint/lib/rules/require-await.js | 101 + .../eslint/lib/rules/require-jsdoc.js | 106 + .../eslint/lib/rules/require-yield.js | 72 + .../eslint/lib/rules/rest-spread-spacing.js | 114 + node_modules/eslint/lib/rules/semi-spacing.js | 212 + node_modules/eslint/lib/rules/semi-style.js | 144 + node_modules/eslint/lib/rules/semi.js | 326 + node_modules/eslint/lib/rules/sort-imports.js | 197 + node_modules/eslint/lib/rules/sort-keys.js | 158 + node_modules/eslint/lib/rules/sort-vars.js | 97 + .../eslint/lib/rules/space-before-blocks.js | 149 + .../lib/rules/space-before-function-paren.js | 143 + .../eslint/lib/rules/space-in-parens.js | 275 + .../eslint/lib/rules/space-infix-ops.js | 168 + .../eslint/lib/rules/space-unary-ops.js | 311 + .../eslint/lib/rules/spaced-comment.js | 376 + node_modules/eslint/lib/rules/strict.js | 278 + .../eslint/lib/rules/switch-colon-spacing.js | 134 + .../eslint/lib/rules/symbol-description.js | 67 + .../lib/rules/template-curly-spacing.js | 122 + .../eslint/lib/rules/template-tag-spacing.js | 78 + node_modules/eslint/lib/rules/unicode-bom.js | 67 + node_modules/eslint/lib/rules/use-isnan.js | 35 + node_modules/eslint/lib/rules/valid-jsdoc.js | 485 + node_modules/eslint/lib/rules/valid-typeof.js | 78 + node_modules/eslint/lib/rules/vars-on-top.js | 150 + node_modules/eslint/lib/rules/wrap-iife.js | 152 + node_modules/eslint/lib/rules/wrap-regex.js | 53 + .../eslint/lib/rules/yield-star-spacing.js | 118 + node_modules/eslint/lib/rules/yoda.js | 311 + .../eslint/lib/testers/rule-tester.js | 591 + node_modules/eslint/lib/timing.js | 141 + .../backward-token-comment-cursor.js | 57 + .../lib/token-store/backward-token-cursor.js | 58 + node_modules/eslint/lib/token-store/cursor.js | 76 + .../eslint/lib/token-store/cursors.js | 92 + .../lib/token-store/decorative-cursor.js | 39 + .../eslint/lib/token-store/filter-cursor.js | 43 + .../forward-token-comment-cursor.js | 57 + .../lib/token-store/forward-token-cursor.js | 63 + node_modules/eslint/lib/token-store/index.js | 633 + .../eslint/lib/token-store/limit-cursor.js | 40 + .../lib/token-store/padded-token-cursor.js | 38 + .../eslint/lib/token-store/skip-cursor.js | 42 + node_modules/eslint/lib/token-store/utils.js | 104 + node_modules/eslint/lib/util/ajv.js | 29 + .../lib/util/apply-disable-directives.js | 160 + node_modules/eslint/lib/util/fix-tracker.js | 120 + node_modules/eslint/lib/util/glob-util.js | 195 + node_modules/eslint/lib/util/glob.js | 63 + node_modules/eslint/lib/util/hash.js | 35 + node_modules/eslint/lib/util/interpolate.js | 24 + node_modules/eslint/lib/util/keywords.js | 67 + .../eslint/lib/util/module-resolver.js | 85 + node_modules/eslint/lib/util/naming.js | 112 + .../eslint/lib/util/node-event-generator.js | 308 + node_modules/eslint/lib/util/npm-util.js | 179 + node_modules/eslint/lib/util/path-util.js | 74 + .../eslint/lib/util/patterns/letters.js | 36 + node_modules/eslint/lib/util/rule-fixer.js | 140 + node_modules/eslint/lib/util/safe-emitter.js | 54 + .../eslint/lib/util/source-code-fixer.js | 152 + .../eslint/lib/util/source-code-util.js | 109 + node_modules/eslint/lib/util/source-code.js | 507 + node_modules/eslint/lib/util/traverser.js | 193 + node_modules/eslint/lib/util/xml-escape.js | 34 + .../eslint/messages/extend-config-missing.txt | 3 + .../eslint/messages/no-config-found.txt | 7 + .../eslint/messages/plugin-missing.txt | 9 + .../eslint/messages/whitespace-found.txt | 3 + node_modules/eslint/node_modules/.bin/mkdirp | 15 + .../eslint/node_modules/.bin/mkdirp.cmd | 7 + .../eslint/node_modules/ajv/.tonic_example.js | 20 + node_modules/eslint/node_modules/ajv/LICENSE | 22 + .../eslint/node_modules/ajv/README.md | 1327 + .../node_modules/ajv/dist/ajv.bundle.js | 7345 ++++ .../eslint/node_modules/ajv/dist/ajv.min.js | 3 + .../node_modules/ajv/dist/ajv.min.js.map | 1 + .../node_modules/ajv/dist/nodent.min.js | 2 + .../node_modules/ajv/dist/regenerator.min.js | 2 + .../eslint/node_modules/ajv/lib/$data.js | 49 + .../eslint/node_modules/ajv/lib/ajv.d.ts | 358 + .../eslint/node_modules/ajv/lib/ajv.js | 502 + .../eslint/node_modules/ajv/lib/cache.js | 26 + .../node_modules/ajv/lib/compile/_rules.js | 31 + .../node_modules/ajv/lib/compile/async.js | 90 + .../node_modules/ajv/lib/compile/equal.js | 3 + .../ajv/lib/compile/error_classes.js | 34 + .../node_modules/ajv/lib/compile/formats.js | 135 + .../node_modules/ajv/lib/compile/index.js | 380 + .../node_modules/ajv/lib/compile/resolve.js | 271 + .../node_modules/ajv/lib/compile/rules.js | 58 + .../ajv/lib/compile/schema_obj.js | 9 + .../ajv/lib/compile/ucs2length.js | 20 + .../node_modules/ajv/lib/compile/util.js | 267 + .../node_modules/ajv/lib/dot/_limit.jst | 96 + .../node_modules/ajv/lib/dot/_limitItems.jst | 10 + .../node_modules/ajv/lib/dot/_limitLength.jst | 10 + .../ajv/lib/dot/_limitProperties.jst | 10 + .../eslint/node_modules/ajv/lib/dot/allOf.jst | 34 + .../eslint/node_modules/ajv/lib/dot/anyOf.jst | 48 + .../node_modules/ajv/lib/dot/coerce.def | 61 + .../eslint/node_modules/ajv/lib/dot/const.jst | 11 + .../node_modules/ajv/lib/dot/contains.jst | 57 + .../node_modules/ajv/lib/dot/custom.jst | 191 + .../node_modules/ajv/lib/dot/defaults.def | 32 + .../node_modules/ajv/lib/dot/definitions.def | 199 + .../node_modules/ajv/lib/dot/dependencies.jst | 80 + .../eslint/node_modules/ajv/lib/dot/enum.jst | 30 + .../node_modules/ajv/lib/dot/errors.def | 194 + .../node_modules/ajv/lib/dot/format.jst | 106 + .../eslint/node_modules/ajv/lib/dot/items.jst | 100 + .../node_modules/ajv/lib/dot/missing.def | 39 + .../node_modules/ajv/lib/dot/multipleOf.jst | 20 + .../eslint/node_modules/ajv/lib/dot/not.jst | 43 + .../eslint/node_modules/ajv/lib/dot/oneOf.jst | 44 + .../node_modules/ajv/lib/dot/pattern.jst | 14 + .../node_modules/ajv/lib/dot/properties.jst | 327 + .../ajv/lib/dot/propertyNames.jst | 54 + .../eslint/node_modules/ajv/lib/dot/ref.jst | 85 + .../node_modules/ajv/lib/dot/required.jst | 108 + .../node_modules/ajv/lib/dot/uniqueItems.jst | 38 + .../node_modules/ajv/lib/dot/validate.jst | 272 + .../node_modules/ajv/lib/dotjs/README.md | 3 + .../node_modules/ajv/lib/dotjs/_limit.js | 149 + .../node_modules/ajv/lib/dotjs/_limitItems.js | 76 + .../ajv/lib/dotjs/_limitLength.js | 81 + .../ajv/lib/dotjs/_limitProperties.js | 76 + .../node_modules/ajv/lib/dotjs/allOf.js | 43 + .../node_modules/ajv/lib/dotjs/anyOf.js | 73 + .../node_modules/ajv/lib/dotjs/const.js | 55 + .../node_modules/ajv/lib/dotjs/contains.js | 81 + .../node_modules/ajv/lib/dotjs/custom.js | 226 + .../ajv/lib/dotjs/dependencies.js | 167 + .../eslint/node_modules/ajv/lib/dotjs/enum.js | 65 + .../node_modules/ajv/lib/dotjs/format.js | 149 + .../node_modules/ajv/lib/dotjs/items.js | 140 + .../node_modules/ajv/lib/dotjs/multipleOf.js | 76 + .../eslint/node_modules/ajv/lib/dotjs/not.js | 83 + .../node_modules/ajv/lib/dotjs/oneOf.js | 70 + .../node_modules/ajv/lib/dotjs/pattern.js | 74 + .../node_modules/ajv/lib/dotjs/properties.js | 468 + .../ajv/lib/dotjs/propertyNames.js | 81 + .../eslint/node_modules/ajv/lib/dotjs/ref.js | 123 + .../node_modules/ajv/lib/dotjs/required.js | 268 + .../node_modules/ajv/lib/dotjs/uniqueItems.js | 71 + .../node_modules/ajv/lib/dotjs/validate.js | 458 + .../eslint/node_modules/ajv/lib/keyword.js | 135 + .../node_modules/ajv/lib/patternGroups.js | 36 + .../node_modules/ajv/lib/refs/$data.json | 17 + .../ajv/lib/refs/json-schema-draft-04.json | 150 + .../ajv/lib/refs/json-schema-draft-06.json | 154 + .../ajv/lib/refs/json-schema-v5.json | 250 + .../eslint/node_modules/ajv/package.json | 169 + .../node_modules/ajv/scripts/.eslintrc.yml | 3 + .../eslint/node_modules/ajv/scripts/bundle.js | 61 + .../node_modules/ajv/scripts/compile-dots.js | 73 + .../eslint/node_modules/ajv/scripts/info | 10 + .../node_modules/ajv/scripts/prepare-tests | 9 + .../node_modules/ajv/scripts/travis-gh-pages | 23 + .../eslint/node_modules/ansi-regex/index.js | 10 + .../eslint/node_modules/ansi-regex/license | 9 + .../node_modules/ansi-regex/package.json | 141 + .../eslint/node_modules/ansi-regex/readme.md | 46 + .../eslint/node_modules/ansi-styles/index.js | 152 + .../eslint/node_modules/ansi-styles/license | 9 + .../node_modules/ansi-styles/package.json | 126 + .../eslint/node_modules/ansi-styles/readme.md | 147 + .../eslint/node_modules/chalk/index.js | 228 + .../eslint/node_modules/chalk/license | 9 + .../eslint/node_modules/chalk/package.json | 144 + .../eslint/node_modules/chalk/readme.md | 309 + .../eslint/node_modules/chalk/templates.js | 128 + .../node_modules/chalk/types/index.d.ts | 97 + .../eslint/node_modules/debug/.coveralls.yml | 1 + .../eslint/node_modules/debug/.eslintrc | 14 + .../eslint/node_modules/debug/.npmignore | 9 + .../eslint/node_modules/debug/.travis.yml | 20 + .../eslint/node_modules/debug/CHANGELOG.md | 395 + .../eslint/node_modules/debug/LICENSE | 19 + .../eslint/node_modules/debug/Makefile | 58 + .../eslint/node_modules/debug/README.md | 368 + .../eslint/node_modules/debug/karma.conf.js | 70 + .../eslint/node_modules/debug/node.js | 1 + .../eslint/node_modules/debug/package.json | 130 + .../eslint/node_modules/debug/src/browser.js | 195 + .../eslint/node_modules/debug/src/debug.js | 225 + .../eslint/node_modules/debug/src/index.js | 10 + .../eslint/node_modules/debug/src/node.js | 186 + .../eslint/node_modules/minimist/.travis.yml | 4 + .../eslint/node_modules/minimist/LICENSE | 18 + .../node_modules/minimist/example/parse.js | 2 + .../eslint/node_modules/minimist/index.js | 187 + .../eslint/node_modules/minimist/package.json | 113 + .../node_modules/minimist/readme.markdown | 73 + .../eslint/node_modules/minimist/test/dash.js | 24 + .../minimist/test/default_bool.js | 20 + .../node_modules/minimist/test/dotted.js | 16 + .../eslint/node_modules/minimist/test/long.js | 31 + .../node_modules/minimist/test/parse.js | 318 + .../minimist/test/parse_modified.js | 9 + .../node_modules/minimist/test/short.js | 67 + .../node_modules/minimist/test/whitespace.js | 8 + .../eslint/node_modules/mkdirp/.travis.yml | 8 + .../eslint/node_modules/mkdirp/LICENSE | 21 + .../eslint/node_modules/mkdirp/bin/cmd.js | 33 + .../eslint/node_modules/mkdirp/bin/usage.txt | 12 + .../node_modules/mkdirp/examples/pow.js | 6 + .../eslint/node_modules/mkdirp/index.js | 98 + .../eslint/node_modules/mkdirp/package.json | 93 + .../node_modules/mkdirp/readme.markdown | 100 + .../eslint/node_modules/mkdirp/test/chmod.js | 41 + .../node_modules/mkdirp/test/clobber.js | 38 + .../eslint/node_modules/mkdirp/test/mkdirp.js | 28 + .../node_modules/mkdirp/test/opts_fs.js | 29 + .../node_modules/mkdirp/test/opts_fs_sync.js | 27 + .../eslint/node_modules/mkdirp/test/perm.js | 32 + .../node_modules/mkdirp/test/perm_sync.js | 36 + .../eslint/node_modules/mkdirp/test/race.js | 37 + .../eslint/node_modules/mkdirp/test/rel.js | 32 + .../eslint/node_modules/mkdirp/test/return.js | 25 + .../node_modules/mkdirp/test/return_sync.js | 24 + .../eslint/node_modules/mkdirp/test/root.js | 19 + .../eslint/node_modules/mkdirp/test/sync.js | 32 + .../eslint/node_modules/mkdirp/test/umask.js | 28 + .../node_modules/mkdirp/test/umask_sync.js | 32 + node_modules/eslint/node_modules/ms/index.js | 152 + .../eslint/node_modules/ms/license.md | 21 + .../eslint/node_modules/ms/package.json | 109 + node_modules/eslint/node_modules/ms/readme.md | 51 + .../eslint/node_modules/strip-ansi/index.js | 4 + .../eslint/node_modules/strip-ansi/license | 9 + .../node_modules/strip-ansi/package.json | 127 + .../eslint/node_modules/strip-ansi/readme.md | 39 + .../node_modules/supports-color/browser.js | 5 + .../node_modules/supports-color/index.js | 129 + .../node_modules/supports-color/license | 9 + .../node_modules/supports-color/package.json | 127 + .../node_modules/supports-color/readme.md | 66 + node_modules/eslint/package.json | 213 + node_modules/espree/CHANGELOG.md | 400 + node_modules/espree/LICENSE | 22 + node_modules/espree/README.md | 157 + node_modules/espree/espree.js | 800 + node_modules/espree/lib/ast-node-types.js | 98 + node_modules/espree/lib/comment-attachment.js | 175 + node_modules/espree/lib/features.js | 32 + node_modules/espree/lib/token-translator.js | 258 + node_modules/espree/lib/visitor-keys.js | 127 + node_modules/espree/node_modules/.bin/acorn | 15 + .../espree/node_modules/.bin/acorn.cmd | 7 + .../espree/node_modules/acorn/AUTHORS | 75 + .../espree/node_modules/acorn/CHANGELOG.md | 428 + .../espree/node_modules/acorn/LICENSE | 19 + .../espree/node_modules/acorn/README.md | 465 + .../espree/node_modules/acorn/bin/_acorn.js | 69 + .../espree/node_modules/acorn/bin/acorn | 4 + .../node_modules/acorn/bin/run_test262.js | 22 + .../node_modules/acorn/bin/test262.whitelist | 409 + .../espree/node_modules/acorn/dist/.keep | 0 .../node_modules/acorn/dist/acorn.es.js | 5300 +++ .../espree/node_modules/acorn/dist/acorn.js | 5331 +++ .../node_modules/acorn/dist/acorn_loose.es.js | 1412 + .../node_modules/acorn/dist/acorn_loose.js | 1422 + .../espree/node_modules/acorn/dist/walk.es.js | 419 + .../espree/node_modules/acorn/dist/walk.js | 439 + .../espree/node_modules/acorn/package.json | 335 + node_modules/espree/package.json | 135 + node_modules/esprima/ChangeLog | 225 + node_modules/esprima/LICENSE.BSD | 21 + node_modules/esprima/README.md | 46 + node_modules/esprima/bin/esparse.js | 139 + node_modules/esprima/bin/esvalidate.js | 236 + node_modules/esprima/dist/esprima.js | 6700 ++++ node_modules/esprima/package.json | 167 + node_modules/esquery/README.md | 26 + node_modules/esquery/esquery.js | 320 + node_modules/esquery/license.txt | 24 + node_modules/esquery/package.json | 111 + node_modules/esquery/parser.js | 2595 ++ node_modules/esrecurse/.babelrc | 3 + node_modules/esrecurse/README.md | 171 + node_modules/esrecurse/esrecurse.js | 117 + node_modules/esrecurse/gulpfile.babel.js | 92 + node_modules/esrecurse/package.json | 119 + node_modules/estraverse/.babelrc | 3 + node_modules/estraverse/.jshintrc | 16 + node_modules/estraverse/LICENSE.BSD | 19 + node_modules/estraverse/estraverse.js | 849 + node_modules/estraverse/gulpfile.js | 70 + node_modules/estraverse/package.json | 107 + node_modules/esutils/LICENSE.BSD | 19 + node_modules/esutils/README.md | 169 + node_modules/esutils/lib/ast.js | 144 + node_modules/esutils/lib/code.js | 135 + node_modules/esutils/lib/keyword.js | 165 + node_modules/esutils/lib/utils.js | 33 + node_modules/esutils/package.json | 107 + node_modules/external-editor/LICENSE | 21 + node_modules/external-editor/README.md | 147 + node_modules/external-editor/example_async.js | 40 + node_modules/external-editor/example_sync.js | 34 + .../main/errors/CreateFileError.js | 29 + .../main/errors/LaunchEditorError.js | 29 + .../main/errors/ReadFileError.js | 29 + .../main/errors/RemoveFileError.js | 29 + node_modules/external-editor/main/index.js | 219 + node_modules/external-editor/package.json | 112 + node_modules/fast-deep-equal/LICENSE | 21 + node_modules/fast-deep-equal/README.md | 55 + node_modules/fast-deep-equal/index.d.ts | 4 + node_modules/fast-deep-equal/index.js | 55 + node_modules/fast-deep-equal/package.json | 124 + .../fast-json-stable-stringify/.eslintrc.yml | 26 + .../fast-json-stable-stringify/.npmignore | 4 + .../fast-json-stable-stringify/.travis.yml | 8 + .../fast-json-stable-stringify/LICENSE | 18 + .../fast-json-stable-stringify/README.md | 119 + .../benchmark/index.js | 31 + .../benchmark/test.json | 137 + .../example/key_cmp.js | 7 + .../example/nested.js | 3 + .../fast-json-stable-stringify/example/str.js | 3 + .../example/value_cmp.js | 7 + .../fast-json-stable-stringify/index.js | 59 + .../fast-json-stable-stringify/package.json | 115 + .../fast-json-stable-stringify/test/cmp.js | 13 + .../fast-json-stable-stringify/test/nested.js | 44 + .../fast-json-stable-stringify/test/str.js | 46 + .../test/to-json.js | 22 + node_modules/fast-levenshtein/LICENSE.md | 25 + node_modules/fast-levenshtein/README.md | 104 + node_modules/fast-levenshtein/levenshtein.js | 136 + node_modules/fast-levenshtein/package.json | 108 + node_modules/figures/index.js | 147 + node_modules/figures/license | 21 + node_modules/figures/package.json | 114 + node_modules/figures/readme.md | 120 + node_modules/file-entry-cache/LICENSE | 22 + node_modules/file-entry-cache/README.md | 107 + node_modules/file-entry-cache/cache.js | 216 + node_modules/file-entry-cache/changelog.md | 74 + node_modules/file-entry-cache/package.json | 151 + node_modules/flat-cache/LICENSE | 22 + node_modules/flat-cache/README.md | 73 + node_modules/flat-cache/cache.js | 197 + node_modules/flat-cache/changelog.md | 155 + node_modules/flat-cache/package.json | 154 + node_modules/flat-cache/utils.js | 39 + node_modules/fs.realpath/LICENSE | 43 + node_modules/fs.realpath/README.md | 33 + node_modules/fs.realpath/index.js | 66 + node_modules/fs.realpath/old.js | 303 + node_modules/fs.realpath/package.json | 94 + .../functional-red-black-tree/.npmignore | 16 + .../functional-red-black-tree/LICENSE | 22 + .../functional-red-black-tree/README.md | 237 + .../functional-red-black-tree/bench/test.js | 11 + .../functional-red-black-tree/package.json | 96 + .../functional-red-black-tree/rbtree.js | 996 + .../functional-red-black-tree/test/test.js | 479 + node_modules/glob/LICENSE | 15 + node_modules/glob/README.md | 368 + node_modules/glob/changelog.md | 67 + node_modules/glob/common.js | 240 + node_modules/glob/glob.js | 790 + node_modules/glob/package.json | 114 + node_modules/glob/sync.js | 486 + node_modules/globals/globals.json | 1464 + node_modules/globals/index.js | 2 + node_modules/globals/license | 9 + node_modules/globals/package.json | 122 + node_modules/globals/readme.md | 41 + node_modules/globby/index.js | 65 + node_modules/globby/license | 21 + node_modules/globby/package.json | 145 + node_modules/globby/readme.md | 82 + node_modules/has-flag/index.js | 8 + node_modules/has-flag/license | 9 + node_modules/has-flag/package.json | 118 + node_modules/has-flag/readme.md | 70 + node_modules/iconv-lite/.npmignore | 6 + node_modules/iconv-lite/.travis.yml | 23 + node_modules/iconv-lite/Changelog.md | 134 + node_modules/iconv-lite/LICENSE | 21 + node_modules/iconv-lite/README.md | 160 + .../iconv-lite/encodings/dbcs-codec.js | 555 + .../iconv-lite/encodings/dbcs-data.js | 176 + node_modules/iconv-lite/encodings/index.js | 22 + node_modules/iconv-lite/encodings/internal.js | 188 + .../iconv-lite/encodings/sbcs-codec.js | 73 + .../encodings/sbcs-data-generated.js | 451 + .../iconv-lite/encodings/sbcs-data.js | 169 + .../encodings/tables/big5-added.json | 122 + .../iconv-lite/encodings/tables/cp936.json | 264 + .../iconv-lite/encodings/tables/cp949.json | 273 + .../iconv-lite/encodings/tables/cp950.json | 177 + .../iconv-lite/encodings/tables/eucjp.json | 182 + .../encodings/tables/gb18030-ranges.json | 1 + .../encodings/tables/gbk-added.json | 55 + .../iconv-lite/encodings/tables/shiftjis.json | 125 + node_modules/iconv-lite/encodings/utf16.js | 177 + node_modules/iconv-lite/encodings/utf7.js | 290 + node_modules/iconv-lite/lib/bom-handling.js | 52 + node_modules/iconv-lite/lib/extend-node.js | 215 + node_modules/iconv-lite/lib/index.d.ts | 24 + node_modules/iconv-lite/lib/index.js | 148 + node_modules/iconv-lite/lib/streams.js | 121 + node_modules/iconv-lite/package.json | 160 + node_modules/ignore/README.md | 262 + node_modules/ignore/ignore.js | 425 + node_modules/ignore/index.d.ts | 41 + node_modules/ignore/package.json | 119 + node_modules/imurmurhash/README.md | 122 + node_modules/imurmurhash/imurmurhash.js | 138 + node_modules/imurmurhash/imurmurhash.min.js | 12 + node_modules/imurmurhash/package.json | 93 + node_modules/inflight/LICENSE | 15 + node_modules/inflight/README.md | 37 + node_modules/inflight/inflight.js | 54 + node_modules/inflight/package.json | 105 + node_modules/inquirer/README.md | 386 + node_modules/inquirer/lib/inquirer.js | 84 + node_modules/inquirer/lib/objects/choice.js | 35 + node_modules/inquirer/lib/objects/choices.js | 112 + .../inquirer/lib/objects/separator.js | 34 + node_modules/inquirer/lib/prompts/base.js | 139 + node_modules/inquirer/lib/prompts/checkbox.js | 236 + node_modules/inquirer/lib/prompts/confirm.js | 106 + node_modules/inquirer/lib/prompts/editor.js | 111 + node_modules/inquirer/lib/prompts/expand.js | 260 + node_modules/inquirer/lib/prompts/input.js | 104 + node_modules/inquirer/lib/prompts/list.js | 184 + node_modules/inquirer/lib/prompts/password.js | 115 + node_modules/inquirer/lib/prompts/rawlist.js | 179 + node_modules/inquirer/lib/ui/baseUI.js | 75 + node_modules/inquirer/lib/ui/bottom-bar.js | 106 + node_modules/inquirer/lib/ui/prompt.js | 115 + node_modules/inquirer/lib/utils/events.js | 45 + node_modules/inquirer/lib/utils/paginator.js | 38 + node_modules/inquirer/lib/utils/readline.js | 51 + .../inquirer/lib/utils/screen-manager.js | 135 + node_modules/inquirer/lib/utils/utils.js | 26 + .../inquirer/node_modules/ansi-regex/index.js | 10 + .../inquirer/node_modules/ansi-regex/license | 9 + .../node_modules/ansi-regex/package.json | 129 + .../node_modules/ansi-regex/readme.md | 46 + .../node_modules/ansi-styles/index.js | 152 + .../inquirer/node_modules/ansi-styles/license | 9 + .../node_modules/ansi-styles/package.json | 138 + .../node_modules/ansi-styles/readme.md | 147 + .../inquirer/node_modules/chalk/index.js | 228 + .../inquirer/node_modules/chalk/license | 9 + .../inquirer/node_modules/chalk/package.json | 156 + .../inquirer/node_modules/chalk/readme.md | 309 + .../inquirer/node_modules/chalk/templates.js | 128 + .../node_modules/chalk/types/index.d.ts | 97 + .../inquirer/node_modules/cli-cursor/index.js | 39 + .../inquirer/node_modules/cli-cursor/license | 21 + .../node_modules/cli-cursor/package.json | 113 + .../node_modules/cli-cursor/readme.md | 45 + .../is-fullwidth-code-point/index.js | 46 + .../is-fullwidth-code-point/license | 21 + .../is-fullwidth-code-point/package.json | 113 + .../is-fullwidth-code-point/readme.md | 39 + .../inquirer/node_modules/onetime/index.js | 39 + .../inquirer/node_modules/onetime/license | 21 + .../node_modules/onetime/package.json | 107 + .../inquirer/node_modules/onetime/readme.md | 65 + .../node_modules/restore-cursor/index.js | 9 + .../node_modules/restore-cursor/license | 21 + .../node_modules/restore-cursor/package.json | 113 + .../node_modules/restore-cursor/readme.md | 25 + .../node_modules/string-width/index.js | 36 + .../node_modules/string-width/license | 9 + .../node_modules/string-width/package.json | 123 + .../node_modules/string-width/readme.md | 42 + .../inquirer/node_modules/strip-ansi/index.js | 4 + .../inquirer/node_modules/strip-ansi/license | 9 + .../node_modules/strip-ansi/package.json | 140 + .../node_modules/strip-ansi/readme.md | 39 + .../node_modules/supports-color/browser.js | 5 + .../node_modules/supports-color/index.js | 129 + .../node_modules/supports-color/license | 9 + .../node_modules/supports-color/package.json | 139 + .../node_modules/supports-color/readme.md | 66 + node_modules/inquirer/package.json | 140 + node_modules/is-path-cwd/index.js | 6 + node_modules/is-path-cwd/package.json | 96 + node_modules/is-path-cwd/readme.md | 28 + node_modules/is-path-in-cwd/index.js | 6 + node_modules/is-path-in-cwd/package.json | 100 + node_modules/is-path-in-cwd/readme.md | 28 + node_modules/is-path-inside/index.js | 14 + node_modules/is-path-inside/license | 21 + node_modules/is-path-inside/package.json | 104 + node_modules/is-path-inside/readme.md | 34 + node_modules/is-promise/.npmignore | 6 + node_modules/is-promise/.travis.yml | 3 + node_modules/is-promise/LICENSE | 19 + node_modules/is-promise/index.js | 5 + node_modules/is-promise/package.json | 82 + node_modules/is-promise/readme.md | 29 + node_modules/is-resolvable/LICENSE | 6 + node_modules/is-resolvable/README.md | 73 + node_modules/is-resolvable/index.js | 16 + node_modules/is-resolvable/package.json | 109 + node_modules/isexe/.npmignore | 2 + node_modules/isexe/LICENSE | 15 + node_modules/isexe/README.md | 51 + node_modules/isexe/index.js | 57 + node_modules/isexe/mode.js | 41 + node_modules/isexe/package.json | 95 + node_modules/isexe/test/basic.js | 221 + node_modules/isexe/windows.js | 42 + node_modules/js-tokens/CHANGELOG.md | 134 + node_modules/js-tokens/LICENSE | 21 + node_modules/js-tokens/README.md | 222 + node_modules/js-tokens/index.js | 23 + node_modules/js-tokens/package.json | 100 + node_modules/js-yaml/CHANGELOG.md | 463 + node_modules/js-yaml/LICENSE | 21 + node_modules/js-yaml/README.md | 313 + node_modules/js-yaml/bin/js-yaml.js | 132 + node_modules/js-yaml/dist/js-yaml.js | 3902 ++ node_modules/js-yaml/dist/js-yaml.min.js | 1 + node_modules/js-yaml/index.js | 7 + node_modules/js-yaml/lib/js-yaml.js | 39 + node_modules/js-yaml/lib/js-yaml/common.js | 59 + node_modules/js-yaml/lib/js-yaml/dumper.js | 819 + node_modules/js-yaml/lib/js-yaml/exception.js | 43 + node_modules/js-yaml/lib/js-yaml/loader.js | 1598 + node_modules/js-yaml/lib/js-yaml/mark.js | 76 + node_modules/js-yaml/lib/js-yaml/schema.js | 108 + .../js-yaml/lib/js-yaml/schema/core.js | 18 + .../lib/js-yaml/schema/default_full.js | 25 + .../lib/js-yaml/schema/default_safe.js | 28 + .../js-yaml/lib/js-yaml/schema/failsafe.js | 17 + .../js-yaml/lib/js-yaml/schema/json.js | 25 + node_modules/js-yaml/lib/js-yaml/type.js | 61 + .../js-yaml/lib/js-yaml/type/binary.js | 138 + node_modules/js-yaml/lib/js-yaml/type/bool.js | 35 + .../js-yaml/lib/js-yaml/type/float.js | 116 + node_modules/js-yaml/lib/js-yaml/type/int.js | 172 + .../js-yaml/lib/js-yaml/type/js/function.js | 84 + .../js-yaml/lib/js-yaml/type/js/regexp.js | 60 + .../js-yaml/lib/js-yaml/type/js/undefined.js | 28 + node_modules/js-yaml/lib/js-yaml/type/map.js | 8 + .../js-yaml/lib/js-yaml/type/merge.js | 12 + node_modules/js-yaml/lib/js-yaml/type/null.js | 34 + node_modules/js-yaml/lib/js-yaml/type/omap.js | 44 + .../js-yaml/lib/js-yaml/type/pairs.js | 53 + node_modules/js-yaml/lib/js-yaml/type/seq.js | 8 + node_modules/js-yaml/lib/js-yaml/type/set.js | 29 + node_modules/js-yaml/lib/js-yaml/type/str.js | 8 + .../js-yaml/lib/js-yaml/type/timestamp.js | 88 + node_modules/js-yaml/package.json | 128 + .../json-schema-traverse/.eslintrc.yml | 27 + node_modules/json-schema-traverse/.npmignore | 60 + node_modules/json-schema-traverse/.travis.yml | 8 + node_modules/json-schema-traverse/LICENSE | 21 + node_modules/json-schema-traverse/README.md | 69 + node_modules/json-schema-traverse/index.js | 81 + .../json-schema-traverse/package.json | 107 + .../json-schema-traverse/spec/.eslintrc.yml | 6 + .../spec/fixtures/schema.js | 125 + .../json-schema-traverse/spec/index.spec.js | 102 + .../.npmignore | 1 + .../.travis.yml | 4 + .../LICENSE | 18 + .../example/key_cmp.js | 7 + .../example/nested.js | 3 + .../example/str.js | 3 + .../example/value_cmp.js | 7 + .../index.js | 82 + .../package.json | 107 + .../readme.markdown | 132 + .../test/cmp.js | 11 + .../test/nested.js | 42 + .../test/replacer.js | 74 + .../test/space.js | 59 + .../test/str.js | 32 + .../test/to-json.js | 20 + node_modules/levn/LICENSE | 22 + node_modules/levn/README.md | 196 + node_modules/levn/lib/cast.js | 298 + node_modules/levn/lib/coerce.js | 285 + node_modules/levn/lib/index.js | 22 + node_modules/levn/lib/parse-string.js | 113 + node_modules/levn/lib/parse.js | 102 + node_modules/levn/package.json | 109 + node_modules/lru-cache/LICENSE | 15 + node_modules/lru-cache/README.md | 152 + node_modules/lru-cache/index.js | 467 + node_modules/lru-cache/package.json | 108 + node_modules/mimic-fn/index.js | 9 + node_modules/mimic-fn/license | 9 + node_modules/mimic-fn/package.json | 109 + node_modules/mimic-fn/readme.md | 68 + .../mute-stream/.nyc_output/33508.json | 1 + .../mute-stream/.nyc_output/33510.json | 1 + node_modules/mute-stream/.travis.yml | 9 + node_modules/mute-stream/LICENSE | 15 + node_modules/mute-stream/README.md | 68 + .../coverage/lcov-report/__root__/index.html | 93 + .../lcov-report/__root__/mute.js.html | 500 + .../mute-stream/coverage/lcov-report/base.css | 212 + .../coverage/lcov-report/index.html | 93 + .../coverage/lcov-report/prettify.css | 1 + .../coverage/lcov-report/prettify.js | 1 + .../lcov-report/sort-arrow-sprite.png | Bin 0 -> 209 bytes .../coverage/lcov-report/sorter.js | 158 + node_modules/mute-stream/coverage/lcov.info | 155 + node_modules/mute-stream/mute.js | 145 + node_modules/mute-stream/package.json | 106 + node_modules/mute-stream/test/basic.js | 207 + node_modules/natural-compare/README.md | 125 + node_modules/natural-compare/index.js | 57 + node_modules/natural-compare/package.json | 109 + node_modules/officejs.dialogs/.gitattributes | 17 + node_modules/officejs.dialogs/.npmignore | 50 + node_modules/officejs.dialogs/README.md | 468 + node_modules/officejs.dialogs/_config.yml | 1 + node_modules/officejs.dialogs/dialogs.html | 504 + node_modules/officejs.dialogs/dialogs.js | 1304 + node_modules/officejs.dialogs/package.json | 93 + node_modules/once/LICENSE | 15 + node_modules/once/README.md | 79 + node_modules/once/once.js | 42 + node_modules/once/package.json | 101 + node_modules/optionator/CHANGELOG.md | 52 + node_modules/optionator/LICENSE | 22 + node_modules/optionator/README.md | 236 + node_modules/optionator/lib/help.js | 247 + node_modules/optionator/lib/index.js | 465 + node_modules/optionator/lib/util.js | 54 + node_modules/optionator/package.json | 109 + node_modules/os-tmpdir/index.js | 25 + node_modules/os-tmpdir/license | 21 + node_modules/os-tmpdir/package.json | 109 + node_modules/os-tmpdir/readme.md | 32 + node_modules/path-is-inside/LICENSE.txt | 47 + .../path-is-inside/lib/path-is-inside.js | 28 + node_modules/path-is-inside/package.json | 100 + node_modules/pluralize/LICENSE | 21 + node_modules/pluralize/Readme.md | 89 + node_modules/pluralize/package.json | 108 + node_modules/pluralize/pluralize.js | 490 + node_modules/prelude-ls/CHANGELOG.md | 99 + node_modules/prelude-ls/LICENSE | 22 + node_modules/prelude-ls/README.md | 15 + node_modules/prelude-ls/lib/Func.js | 65 + node_modules/prelude-ls/lib/List.js | 686 + node_modules/prelude-ls/lib/Num.js | 130 + node_modules/prelude-ls/lib/Obj.js | 154 + node_modules/prelude-ls/lib/Str.js | 92 + node_modules/prelude-ls/lib/index.js | 178 + node_modules/prelude-ls/package.json | 116 + node_modules/progress/.npmignore | 5 + node_modules/progress/CHANGELOG.md | 115 + node_modules/progress/LICENSE | 22 + node_modules/progress/Makefile | 8 + node_modules/progress/README.md | 146 + node_modules/progress/index.js | 1 + node_modules/progress/lib/node-progress.js | 231 + node_modules/progress/package.json | 119 + node_modules/pseudomap/LICENSE | 15 + node_modules/pseudomap/README.md | 60 + node_modules/pseudomap/map.js | 9 + node_modules/pseudomap/package.json | 85 + node_modules/pseudomap/pseudomap.js | 113 + node_modules/pseudomap/test/basic.js | 86 + node_modules/require-uncached/index.js | 29 + node_modules/require-uncached/license | 21 + node_modules/require-uncached/package.json | 112 + node_modules/require-uncached/readme.md | 47 + node_modules/resolve-from/index.js | 19 + node_modules/resolve-from/license | 21 + node_modules/resolve-from/package.json | 98 + node_modules/resolve-from/readme.md | 56 + node_modules/rimraf/LICENSE | 15 + node_modules/rimraf/README.md | 101 + node_modules/rimraf/bin.js | 50 + node_modules/rimraf/package.json | 100 + node_modules/rimraf/rimraf.js | 364 + node_modules/run-async/LICENSE | 21 + node_modules/run-async/README.md | 79 + node_modules/run-async/index.js | 61 + node_modules/run-async/package.json | 99 + node_modules/rx-lite-aggregates/package.json | 102 + node_modules/rx-lite-aggregates/readme.md | 85 + .../rx-lite-aggregates/rx.lite.aggregates.js | 1365 + .../rx-lite-aggregates/rx.lite.aggregates.map | 1 + .../rx.lite.aggregates.min.js | 3 + node_modules/rx-lite/package.json | 101 + node_modules/rx-lite/readme.md | 173 + node_modules/rx-lite/rx.lite.js | 7054 ++++ node_modules/rx-lite/rx.lite.map | 1 + node_modules/rx-lite/rx.lite.min.js | 5 + node_modules/shebang-command/index.js | 19 + node_modules/shebang-command/license | 21 + node_modules/shebang-command/package.json | 106 + node_modules/shebang-command/readme.md | 39 + node_modules/shebang-regex/index.js | 2 + node_modules/shebang-regex/license | 21 + node_modules/shebang-regex/package.json | 96 + node_modules/shebang-regex/readme.md | 29 + node_modules/signal-exit/CHANGELOG.md | 27 + node_modules/signal-exit/LICENSE.txt | 16 + node_modules/signal-exit/README.md | 40 + node_modules/signal-exit/index.js | 157 + node_modules/signal-exit/package.json | 106 + node_modules/signal-exit/signals.js | 53 + node_modules/slice-ansi/index.js | 88 + node_modules/slice-ansi/license | 9 + .../is-fullwidth-code-point/index.js | 46 + .../is-fullwidth-code-point/license | 21 + .../is-fullwidth-code-point/package.json | 125 + .../is-fullwidth-code-point/readme.md | 39 + node_modules/slice-ansi/package.json | 125 + node_modules/slice-ansi/readme.md | 64 + node_modules/sprintf-js/.npmignore | 1 + node_modules/sprintf-js/LICENSE | 24 + node_modules/sprintf-js/README.md | 88 + node_modules/sprintf-js/bower.json | 14 + node_modules/sprintf-js/demo/angular.html | 20 + .../sprintf-js/dist/angular-sprintf.min.js | 4 + .../dist/angular-sprintf.min.js.map | 1 + .../sprintf-js/dist/angular-sprintf.min.map | 1 + node_modules/sprintf-js/dist/sprintf.min.js | 4 + .../sprintf-js/dist/sprintf.min.js.map | 1 + node_modules/sprintf-js/dist/sprintf.min.map | 1 + node_modules/sprintf-js/gruntfile.js | 36 + node_modules/sprintf-js/package.json | 86 + .../sprintf-js/src/angular-sprintf.js | 18 + node_modules/sprintf-js/src/sprintf.js | 208 + node_modules/sprintf-js/test/test.js | 82 + node_modules/strip-json-comments/index.js | 70 + node_modules/strip-json-comments/license | 21 + node_modules/strip-json-comments/package.json | 110 + node_modules/strip-json-comments/readme.md | 64 + node_modules/table/LICENSE | 24 + node_modules/table/README.md | 671 + node_modules/table/dist/alignString.js | 106 + node_modules/table/dist/alignTableData.js | 34 + .../table/dist/calculateCellHeight.js | 47 + .../table/dist/calculateCellWidthIndex.js | 23 + .../dist/calculateMaximumColumnWidthIndex.js | 37 + .../table/dist/calculateRowHeightIndex.js | 48 + node_modules/table/dist/createStream.js | 157 + node_modules/table/dist/drawBorder.js | 96 + node_modules/table/dist/drawRow.js | 21 + node_modules/table/dist/drawTable.js | 59 + .../table/dist/getBorderCharacters.js | 126 + node_modules/table/dist/index.js | 24 + node_modules/table/dist/makeConfig.js | 99 + node_modules/table/dist/makeStreamConfig.js | 107 + .../table/dist/mapDataUsingRowHeightIndex.js | 57 + node_modules/table/dist/padTableData.js | 20 + node_modules/table/dist/schemas/config.json | 114 + .../table/dist/schemas/streamConfig.json | 114 + node_modules/table/dist/stringifyTableData.js | 17 + node_modules/table/dist/table.js | 133 + node_modules/table/dist/truncateTableData.js | 27 + node_modules/table/dist/validateConfig.js | 753 + .../table/dist/validateStreamConfig.js | 740 + node_modules/table/dist/validateTableData.js | 51 + node_modules/table/dist/wrapString.js | 42 + node_modules/table/dist/wrapWord.js | 52 + .../table/node_modules/ajv/.tonic_example.js | 20 + node_modules/table/node_modules/ajv/LICENSE | 22 + node_modules/table/node_modules/ajv/README.md | 1293 + .../table/node_modules/ajv/dist/ajv.bundle.js | 7075 ++++ .../table/node_modules/ajv/dist/ajv.min.js | 3 + .../node_modules/ajv/dist/ajv.min.js.map | 1 + .../table/node_modules/ajv/lib/ajv.d.ts | 356 + .../table/node_modules/ajv/lib/ajv.js | 497 + .../table/node_modules/ajv/lib/cache.js | 26 + .../node_modules/ajv/lib/compile/async.js | 90 + .../node_modules/ajv/lib/compile/equal.js | 3 + .../ajv/lib/compile/error_classes.js | 34 + .../node_modules/ajv/lib/compile/formats.js | 149 + .../node_modules/ajv/lib/compile/index.js | 377 + .../node_modules/ajv/lib/compile/resolve.js | 271 + .../node_modules/ajv/lib/compile/rules.js | 66 + .../ajv/lib/compile/schema_obj.js | 9 + .../ajv/lib/compile/ucs2length.js | 20 + .../node_modules/ajv/lib/compile/util.js | 267 + .../table/node_modules/ajv/lib/data.js | 49 + .../table/node_modules/ajv/lib/dot/_limit.jst | 96 + .../node_modules/ajv/lib/dot/_limitItems.jst | 10 + .../node_modules/ajv/lib/dot/_limitLength.jst | 10 + .../ajv/lib/dot/_limitProperties.jst | 10 + .../table/node_modules/ajv/lib/dot/allOf.jst | 34 + .../table/node_modules/ajv/lib/dot/anyOf.jst | 48 + .../table/node_modules/ajv/lib/dot/coerce.def | 61 + .../node_modules/ajv/lib/dot/comment.jst | 9 + .../table/node_modules/ajv/lib/dot/const.jst | 11 + .../node_modules/ajv/lib/dot/contains.jst | 57 + .../table/node_modules/ajv/lib/dot/custom.jst | 191 + .../node_modules/ajv/lib/dot/defaults.def | 32 + .../node_modules/ajv/lib/dot/definitions.def | 199 + .../node_modules/ajv/lib/dot/dependencies.jst | 80 + .../table/node_modules/ajv/lib/dot/enum.jst | 30 + .../table/node_modules/ajv/lib/dot/errors.def | 194 + .../table/node_modules/ajv/lib/dot/format.jst | 106 + .../table/node_modules/ajv/lib/dot/if.jst | 75 + .../table/node_modules/ajv/lib/dot/items.jst | 100 + .../node_modules/ajv/lib/dot/missing.def | 39 + .../node_modules/ajv/lib/dot/multipleOf.jst | 20 + .../table/node_modules/ajv/lib/dot/not.jst | 43 + .../table/node_modules/ajv/lib/dot/oneOf.jst | 54 + .../node_modules/ajv/lib/dot/pattern.jst | 14 + .../node_modules/ajv/lib/dot/properties.jst | 244 + .../ajv/lib/dot/propertyNames.jst | 54 + .../table/node_modules/ajv/lib/dot/ref.jst | 85 + .../node_modules/ajv/lib/dot/required.jst | 108 + .../node_modules/ajv/lib/dot/uniqueItems.jst | 54 + .../node_modules/ajv/lib/dot/validate.jst | 255 + .../node_modules/ajv/lib/dotjs/README.md | 3 + .../node_modules/ajv/lib/dotjs/_limit.js | 149 + .../node_modules/ajv/lib/dotjs/_limitItems.js | 76 + .../ajv/lib/dotjs/_limitLength.js | 81 + .../ajv/lib/dotjs/_limitProperties.js | 76 + .../table/node_modules/ajv/lib/dotjs/allOf.js | 43 + .../table/node_modules/ajv/lib/dotjs/anyOf.js | 73 + .../node_modules/ajv/lib/dotjs/comment.js | 14 + .../table/node_modules/ajv/lib/dotjs/const.js | 55 + .../node_modules/ajv/lib/dotjs/contains.js | 81 + .../node_modules/ajv/lib/dotjs/custom.js | 226 + .../ajv/lib/dotjs/dependencies.js | 167 + .../table/node_modules/ajv/lib/dotjs/enum.js | 65 + .../node_modules/ajv/lib/dotjs/format.js | 149 + .../table/node_modules/ajv/lib/dotjs/if.js | 103 + .../table/node_modules/ajv/lib/dotjs/index.js | 33 + .../table/node_modules/ajv/lib/dotjs/items.js | 140 + .../node_modules/ajv/lib/dotjs/multipleOf.js | 76 + .../table/node_modules/ajv/lib/dotjs/not.js | 83 + .../table/node_modules/ajv/lib/dotjs/oneOf.js | 72 + .../node_modules/ajv/lib/dotjs/pattern.js | 74 + .../node_modules/ajv/lib/dotjs/properties.js | 328 + .../ajv/lib/dotjs/propertyNames.js | 81 + .../table/node_modules/ajv/lib/dotjs/ref.js | 123 + .../node_modules/ajv/lib/dotjs/required.js | 268 + .../node_modules/ajv/lib/dotjs/uniqueItems.js | 78 + .../node_modules/ajv/lib/dotjs/validate.js | 445 + .../table/node_modules/ajv/lib/keyword.js | 135 + .../table/node_modules/ajv/lib/refs/data.json | 17 + .../ajv/lib/refs/json-schema-draft-04.json | 150 + .../ajv/lib/refs/json-schema-draft-06.json | 154 + .../ajv/lib/refs/json-schema-draft-07.json | 168 + .../table/node_modules/ajv/package.json | 165 + .../node_modules/ajv/scripts/.eslintrc.yml | 3 + .../table/node_modules/ajv/scripts/bundle.js | 61 + .../node_modules/ajv/scripts/compile-dots.js | 73 + .../table/node_modules/ajv/scripts/info | 10 + .../node_modules/ajv/scripts/prepare-tests | 9 + .../ajv/scripts/publish-built-version | 32 + .../node_modules/ajv/scripts/travis-gh-pages | 23 + .../table/node_modules/ansi-regex/index.js | 10 + .../table/node_modules/ansi-regex/license | 9 + .../node_modules/ansi-regex/package.json | 141 + .../table/node_modules/ansi-regex/readme.md | 46 + .../table/node_modules/ansi-styles/index.js | 152 + .../table/node_modules/ansi-styles/license | 9 + .../node_modules/ansi-styles/package.json | 138 + .../table/node_modules/ansi-styles/readme.md | 147 + .../table/node_modules/chalk/index.js | 228 + node_modules/table/node_modules/chalk/license | 9 + .../table/node_modules/chalk/package.json | 156 + .../table/node_modules/chalk/readme.md | 309 + .../table/node_modules/chalk/templates.js | 128 + .../table/node_modules/chalk/types/index.d.ts | 97 + .../is-fullwidth-code-point/index.js | 46 + .../is-fullwidth-code-point/license | 21 + .../is-fullwidth-code-point/package.json | 125 + .../is-fullwidth-code-point/readme.md | 39 + .../table/node_modules/string-width/index.js | 36 + .../table/node_modules/string-width/license | 9 + .../node_modules/string-width/package.json | 135 + .../table/node_modules/string-width/readme.md | 42 + .../table/node_modules/strip-ansi/index.js | 4 + .../table/node_modules/strip-ansi/license | 9 + .../node_modules/strip-ansi/package.json | 139 + .../table/node_modules/strip-ansi/readme.md | 39 + .../node_modules/supports-color/browser.js | 5 + .../node_modules/supports-color/index.js | 129 + .../table/node_modules/supports-color/license | 9 + .../node_modules/supports-color/package.json | 139 + .../node_modules/supports-color/readme.md | 66 + node_modules/table/package.json | 145 + node_modules/text-table/.travis.yml | 4 + node_modules/text-table/LICENSE | 18 + node_modules/text-table/example/align.js | 8 + node_modules/text-table/example/center.js | 8 + node_modules/text-table/example/dotalign.js | 9 + node_modules/text-table/example/doubledot.js | 11 + node_modules/text-table/example/table.js | 6 + node_modules/text-table/index.js | 86 + node_modules/text-table/package.json | 104 + node_modules/text-table/readme.markdown | 134 + node_modules/text-table/test/align.js | 18 + node_modules/text-table/test/ansi-colors.js | 32 + node_modules/text-table/test/center.js | 18 + node_modules/text-table/test/dotalign.js | 20 + node_modules/text-table/test/doubledot.js | 24 + node_modules/text-table/test/table.js | 14 + node_modules/through/.travis.yml | 5 + node_modules/through/LICENSE.APACHE2 | 15 + node_modules/through/LICENSE.MIT | 24 + node_modules/through/index.js | 108 + node_modules/through/package.json | 100 + node_modules/through/readme.markdown | 64 + node_modules/through/test/async.js | 28 + node_modules/through/test/auto-destroy.js | 30 + node_modules/through/test/buffering.js | 71 + node_modules/through/test/end.js | 45 + node_modules/through/test/index.js | 133 + node_modules/tmp/LICENSE | 21 + node_modules/tmp/README.md | 314 + node_modules/tmp/lib/tmp.js | 611 + node_modules/tmp/package.json | 106 + node_modules/type-check/LICENSE | 22 + node_modules/type-check/README.md | 210 + node_modules/type-check/lib/check.js | 126 + node_modules/type-check/lib/index.js | 16 + node_modules/type-check/lib/parse-type.js | 196 + node_modules/type-check/package.json | 102 + node_modules/typedarray/.travis.yml | 4 + node_modules/typedarray/LICENSE | 35 + node_modules/typedarray/example/tarray.js | 4 + node_modules/typedarray/index.js | 630 + node_modules/typedarray/package.json | 113 + node_modules/typedarray/readme.markdown | 61 + .../typedarray/test/server/undef_globals.js | 19 + node_modules/typedarray/test/tarray.js | 10 + node_modules/which/CHANGELOG.md | 147 + node_modules/which/LICENSE | 15 + node_modules/which/README.md | 51 + node_modules/which/bin/which | 52 + node_modules/which/package.json | 101 + node_modules/which/which.js | 135 + node_modules/wordwrap/LICENSE | 18 + node_modules/wordwrap/README.markdown | 70 + node_modules/wordwrap/example/center.js | 10 + node_modules/wordwrap/example/meat.js | 3 + node_modules/wordwrap/index.js | 76 + node_modules/wordwrap/package.json | 94 + node_modules/wordwrap/test/break.js | 32 + node_modules/wordwrap/test/idleness.txt | 63 + node_modules/wordwrap/test/wrap.js | 33 + node_modules/wrappy/LICENSE | 15 + node_modules/wrappy/README.md | 36 + node_modules/wrappy/package.json | 97 + node_modules/wrappy/wrappy.js | 33 + node_modules/write/LICENSE | 21 + node_modules/write/README.md | 101 + node_modules/write/index.js | 93 + node_modules/write/node_modules/.bin/mkdirp | 15 + .../write/node_modules/.bin/mkdirp.cmd | 7 + .../write/node_modules/minimist/.travis.yml | 4 + .../write/node_modules/minimist/LICENSE | 18 + .../node_modules/minimist/example/parse.js | 2 + .../write/node_modules/minimist/index.js | 187 + .../write/node_modules/minimist/package.json | 101 + .../node_modules/minimist/readme.markdown | 73 + .../write/node_modules/minimist/test/dash.js | 24 + .../minimist/test/default_bool.js | 20 + .../node_modules/minimist/test/dotted.js | 16 + .../write/node_modules/minimist/test/long.js | 31 + .../write/node_modules/minimist/test/parse.js | 318 + .../minimist/test/parse_modified.js | 9 + .../write/node_modules/minimist/test/short.js | 67 + .../node_modules/minimist/test/whitespace.js | 8 + .../write/node_modules/mkdirp/.travis.yml | 8 + .../write/node_modules/mkdirp/LICENSE | 21 + .../write/node_modules/mkdirp/bin/cmd.js | 33 + .../write/node_modules/mkdirp/bin/usage.txt | 12 + .../write/node_modules/mkdirp/examples/pow.js | 6 + .../write/node_modules/mkdirp/index.js | 98 + .../write/node_modules/mkdirp/package.json | 105 + .../write/node_modules/mkdirp/readme.markdown | 100 + .../write/node_modules/mkdirp/test/chmod.js | 41 + .../write/node_modules/mkdirp/test/clobber.js | 38 + .../write/node_modules/mkdirp/test/mkdirp.js | 28 + .../write/node_modules/mkdirp/test/opts_fs.js | 29 + .../node_modules/mkdirp/test/opts_fs_sync.js | 27 + .../write/node_modules/mkdirp/test/perm.js | 32 + .../node_modules/mkdirp/test/perm_sync.js | 36 + .../write/node_modules/mkdirp/test/race.js | 37 + .../write/node_modules/mkdirp/test/rel.js | 32 + .../write/node_modules/mkdirp/test/return.js | 25 + .../node_modules/mkdirp/test/return_sync.js | 24 + .../write/node_modules/mkdirp/test/root.js | 19 + .../write/node_modules/mkdirp/test/sync.js | 32 + .../write/node_modules/mkdirp/test/umask.js | 28 + .../node_modules/mkdirp/test/umask_sync.js | 32 + node_modules/write/package.json | 105 + node_modules/yallist/LICENSE | 15 + node_modules/yallist/README.md | 204 + node_modules/yallist/iterator.js | 7 + node_modules/yallist/package.json | 96 + node_modules/yallist/yallist.js | 370 + ...ok-block-dialog-expand-sample-manifest.xml | 35 +- package.json | 6 +- 1757 files changed, 393494 insertions(+), 78030 deletions(-) create mode 100644 .vs/ProjectSettings.json create mode 100644 .vs/VSWorkspaceState.json create mode 100644 .vs/outlook-block-dialog-expand-sample/v15/.suo create mode 100644 .vs/slnx.sqlite create mode 100644 assets/icon-16.png create mode 100644 assets/icon-32.png create mode 100644 assets/icon-80.png create mode 100644 assets/logo-filled.png delete mode 100644 function-file/MicrosoftAjax.js delete mode 100644 function-file/dialog.html delete mode 100644 index.html create mode 100644 node_modules/.bin/eslint create mode 100644 node_modules/.bin/eslint.cmd create mode 100644 node_modules/.bin/esparse create mode 100644 node_modules/.bin/esparse.cmd create mode 100644 node_modules/.bin/esvalidate create mode 100644 node_modules/.bin/esvalidate.cmd create mode 100644 node_modules/.bin/js-yaml create mode 100644 node_modules/.bin/js-yaml.cmd create mode 100644 node_modules/.bin/rimraf create mode 100644 node_modules/.bin/rimraf.cmd create mode 100644 node_modules/.bin/which create mode 100644 node_modules/.bin/which.cmd create mode 100644 node_modules/@microsoft/office-js/NPM.DEPLOYMENT.INFO.yaml create mode 100644 node_modules/@microsoft/office-js/dist/am-et/office_strings.debug.js create mode 100644 node_modules/@microsoft/office-js/dist/am-et/office_strings.js create mode 100644 node_modules/@microsoft/office-js/dist/am-et/outlook_strings.debug.js create mode 100644 node_modules/@microsoft/office-js/dist/am-et/outlook_strings.js create mode 100644 node_modules/@microsoft/office-js/dist/ariatelemetry/aria-web-telemetry-2.9.0.min.js create mode 100644 node_modules/@microsoft/office-js/dist/ariatelemetry/aria-web-telemetry.js create mode 100644 node_modules/@microsoft/office-js/dist/excel-android-16.00.debug.js create mode 100644 node_modules/@microsoft/office-js/dist/excel-android-16.00.js create mode 100644 node_modules/@microsoft/office-js/dist/lo-la/office_strings.debug.js create mode 100644 node_modules/@microsoft/office-js/dist/lo-la/office_strings.js create mode 100644 node_modules/@microsoft/office-js/dist/lo-la/outlook_strings.debug.js create mode 100644 node_modules/@microsoft/office-js/dist/lo-la/outlook_strings.js create mode 100644 node_modules/ajv-keywords/LICENSE create mode 100644 node_modules/ajv-keywords/README.md create mode 100644 node_modules/ajv-keywords/index.js create mode 100644 node_modules/ajv-keywords/keywords/_formatLimit.js create mode 100644 node_modules/ajv-keywords/keywords/_util.js create mode 100644 node_modules/ajv-keywords/keywords/deepProperties.js create mode 100644 node_modules/ajv-keywords/keywords/deepRequired.js create mode 100644 node_modules/ajv-keywords/keywords/dot/_formatLimit.jst create mode 100644 node_modules/ajv-keywords/keywords/dot/patternRequired.jst create mode 100644 node_modules/ajv-keywords/keywords/dot/switch.jst create mode 100644 node_modules/ajv-keywords/keywords/dotjs/README.md create mode 100644 node_modules/ajv-keywords/keywords/dotjs/_formatLimit.js create mode 100644 node_modules/ajv-keywords/keywords/dotjs/patternRequired.js create mode 100644 node_modules/ajv-keywords/keywords/dotjs/switch.js create mode 100644 node_modules/ajv-keywords/keywords/dynamicDefaults.js create mode 100644 node_modules/ajv-keywords/keywords/formatMaximum.js create mode 100644 node_modules/ajv-keywords/keywords/formatMinimum.js create mode 100644 node_modules/ajv-keywords/keywords/index.js create mode 100644 node_modules/ajv-keywords/keywords/instanceof.js create mode 100644 node_modules/ajv-keywords/keywords/patternRequired.js create mode 100644 node_modules/ajv-keywords/keywords/prohibited.js create mode 100644 node_modules/ajv-keywords/keywords/range.js create mode 100644 node_modules/ajv-keywords/keywords/regexp.js create mode 100644 node_modules/ajv-keywords/keywords/select.js create mode 100644 node_modules/ajv-keywords/keywords/switch.js create mode 100644 node_modules/ajv-keywords/keywords/typeof.js create mode 100644 node_modules/ajv-keywords/keywords/uniqueItemProperties.js create mode 100644 node_modules/ajv-keywords/package.json create mode 100644 node_modules/ansi-escapes/index.js create mode 100644 node_modules/ansi-escapes/license create mode 100644 node_modules/ansi-escapes/package.json create mode 100644 node_modules/ansi-escapes/readme.md create mode 100644 node_modules/argparse/CHANGELOG.md create mode 100644 node_modules/argparse/LICENSE create mode 100644 node_modules/argparse/README.md create mode 100644 node_modules/argparse/index.js create mode 100644 node_modules/argparse/lib/action.js create mode 100644 node_modules/argparse/lib/action/append.js create mode 100644 node_modules/argparse/lib/action/append/constant.js create mode 100644 node_modules/argparse/lib/action/count.js create mode 100644 node_modules/argparse/lib/action/help.js create mode 100644 node_modules/argparse/lib/action/store.js create mode 100644 node_modules/argparse/lib/action/store/constant.js create mode 100644 node_modules/argparse/lib/action/store/false.js create mode 100644 node_modules/argparse/lib/action/store/true.js create mode 100644 node_modules/argparse/lib/action/subparsers.js create mode 100644 node_modules/argparse/lib/action/version.js create mode 100644 node_modules/argparse/lib/action_container.js create mode 100644 node_modules/argparse/lib/argparse.js create mode 100644 node_modules/argparse/lib/argument/error.js create mode 100644 node_modules/argparse/lib/argument/exclusive.js create mode 100644 node_modules/argparse/lib/argument/group.js create mode 100644 node_modules/argparse/lib/argument_parser.js create mode 100644 node_modules/argparse/lib/const.js create mode 100644 node_modules/argparse/lib/help/added_formatters.js create mode 100644 node_modules/argparse/lib/help/formatter.js create mode 100644 node_modules/argparse/lib/namespace.js create mode 100644 node_modules/argparse/lib/utils.js create mode 100644 node_modules/argparse/package.json create mode 100644 node_modules/array-union/index.js create mode 100644 node_modules/array-union/license create mode 100644 node_modules/array-union/package.json create mode 100644 node_modules/array-union/readme.md create mode 100644 node_modules/array-uniq/index.js create mode 100644 node_modules/array-uniq/license create mode 100644 node_modules/array-uniq/package.json create mode 100644 node_modules/array-uniq/readme.md create mode 100644 node_modules/babel-code-frame/.npmignore create mode 100644 node_modules/babel-code-frame/README.md create mode 100644 node_modules/babel-code-frame/lib/index.js create mode 100644 node_modules/babel-code-frame/package-lock.json create mode 100644 node_modules/babel-code-frame/package.json create mode 100644 node_modules/caller-path/index.js create mode 100644 node_modules/caller-path/package.json create mode 100644 node_modules/caller-path/readme.md create mode 100644 node_modules/callsites/index.js create mode 100644 node_modules/callsites/package.json create mode 100644 node_modules/callsites/readme.md create mode 100644 node_modules/chardet/.npmignore create mode 100644 node_modules/chardet/.travis.yml create mode 100644 node_modules/chardet/LICENSE create mode 100644 node_modules/chardet/README.md create mode 100644 node_modules/chardet/encoding/iso2022.js create mode 100644 node_modules/chardet/encoding/mbcs.js create mode 100644 node_modules/chardet/encoding/sbcs.js create mode 100644 node_modules/chardet/encoding/unicode.js create mode 100644 node_modules/chardet/encoding/utf8.js create mode 100644 node_modules/chardet/index.js create mode 100644 node_modules/chardet/match.js create mode 100644 node_modules/chardet/package.json create mode 100644 node_modules/chardet/yarn.lock create mode 100644 node_modules/circular-json/.npmignore create mode 100644 node_modules/circular-json/LICENSE.txt create mode 100644 node_modules/circular-json/README.md create mode 100644 node_modules/circular-json/build/circular-json.js create mode 100644 node_modules/circular-json/build/circular-json.max.js create mode 100644 node_modules/circular-json/build/circular-json.node.js create mode 100644 node_modules/circular-json/package.json create mode 100644 node_modules/circular-json/template/license.after create mode 100644 node_modules/circular-json/template/license.before create mode 100644 node_modules/cli-width/.npmignore create mode 100644 node_modules/cli-width/.travis.yml create mode 100644 node_modules/cli-width/CHANGELOG.md create mode 100644 node_modules/cli-width/LICENSE create mode 100644 node_modules/cli-width/README.md create mode 100644 node_modules/cli-width/index.js create mode 100644 node_modules/cli-width/package.json create mode 100644 node_modules/color-convert/CHANGELOG.md create mode 100644 node_modules/color-convert/LICENSE create mode 100644 node_modules/color-convert/README.md create mode 100644 node_modules/color-convert/conversions.js create mode 100644 node_modules/color-convert/index.js create mode 100644 node_modules/color-convert/package.json create mode 100644 node_modules/color-convert/route.js create mode 100644 node_modules/color-name/.eslintrc.json create mode 100644 node_modules/color-name/.npmignore create mode 100644 node_modules/color-name/LICENSE create mode 100644 node_modules/color-name/README.md create mode 100644 node_modules/color-name/index.js create mode 100644 node_modules/color-name/package.json create mode 100644 node_modules/color-name/test.js create mode 100644 node_modules/concat-stream/LICENSE create mode 100644 node_modules/concat-stream/index.js create mode 100644 node_modules/concat-stream/package.json create mode 100644 node_modules/concat-stream/readme.md create mode 100644 node_modules/cross-spawn/CHANGELOG.md create mode 100644 node_modules/cross-spawn/LICENSE create mode 100644 node_modules/cross-spawn/README.md create mode 100644 node_modules/cross-spawn/index.js create mode 100644 node_modules/cross-spawn/lib/enoent.js create mode 100644 node_modules/cross-spawn/lib/parse.js create mode 100644 node_modules/cross-spawn/lib/util/escapeArgument.js create mode 100644 node_modules/cross-spawn/lib/util/escapeCommand.js create mode 100644 node_modules/cross-spawn/lib/util/hasEmptyArgumentBug.js create mode 100644 node_modules/cross-spawn/lib/util/readShebang.js create mode 100644 node_modules/cross-spawn/lib/util/resolveCommand.js create mode 100644 node_modules/cross-spawn/package.json create mode 100644 node_modules/deep-is/.npmignore create mode 100644 node_modules/deep-is/.travis.yml create mode 100644 node_modules/deep-is/LICENSE create mode 100644 node_modules/deep-is/README.markdown create mode 100644 node_modules/deep-is/example/cmp.js create mode 100644 node_modules/deep-is/index.js create mode 100644 node_modules/deep-is/package.json create mode 100644 node_modules/deep-is/test/NaN.js create mode 100644 node_modules/deep-is/test/cmp.js create mode 100644 node_modules/deep-is/test/neg-vs-pos-0.js create mode 100644 node_modules/del/index.js create mode 100644 node_modules/del/license create mode 100644 node_modules/del/package.json create mode 100644 node_modules/del/readme.md create mode 100644 node_modules/doctrine/CHANGELOG.md create mode 100644 node_modules/doctrine/LICENSE create mode 100644 node_modules/doctrine/LICENSE.closure-compiler create mode 100644 node_modules/doctrine/LICENSE.esprima create mode 100644 node_modules/doctrine/README.md create mode 100644 node_modules/doctrine/lib/doctrine.js create mode 100644 node_modules/doctrine/lib/typed.js create mode 100644 node_modules/doctrine/lib/utility.js create mode 100644 node_modules/doctrine/package.json create mode 100644 node_modules/easyews/LICENSE create mode 100644 node_modules/easyews/README.md create mode 100644 node_modules/easyews/_config.yml create mode 100644 node_modules/easyews/easyEws.js create mode 100644 node_modules/easyews/package.json create mode 100644 node_modules/eslint-scope/CHANGELOG.md create mode 100644 node_modules/eslint-scope/LICENSE create mode 100644 node_modules/eslint-scope/README.md create mode 100644 node_modules/eslint-scope/lib/definition.js create mode 100644 node_modules/eslint-scope/lib/index.js create mode 100644 node_modules/eslint-scope/lib/pattern-visitor.js create mode 100644 node_modules/eslint-scope/lib/reference.js create mode 100644 node_modules/eslint-scope/lib/referencer.js create mode 100644 node_modules/eslint-scope/lib/scope-manager.js create mode 100644 node_modules/eslint-scope/lib/scope.js create mode 100644 node_modules/eslint-scope/lib/variable.js create mode 100644 node_modules/eslint-scope/package.json create mode 100644 node_modules/eslint-visitor-keys/CHANGELOG.md create mode 100644 node_modules/eslint-visitor-keys/LICENSE create mode 100644 node_modules/eslint-visitor-keys/README.md create mode 100644 node_modules/eslint-visitor-keys/lib/index.js create mode 100644 node_modules/eslint-visitor-keys/lib/visitor-keys.json create mode 100644 node_modules/eslint-visitor-keys/package.json create mode 100644 node_modules/eslint/CHANGELOG.md create mode 100644 node_modules/eslint/LICENSE create mode 100644 node_modules/eslint/README.md create mode 100644 node_modules/eslint/bin/eslint.js create mode 100644 node_modules/eslint/conf/blank-script.json create mode 100644 node_modules/eslint/conf/category-list.json create mode 100644 node_modules/eslint/conf/config-schema.js create mode 100644 node_modules/eslint/conf/default-cli-options.js create mode 100644 node_modules/eslint/conf/default-config-options.js create mode 100644 node_modules/eslint/conf/environments.js create mode 100644 node_modules/eslint/conf/eslint-all.js create mode 100644 node_modules/eslint/conf/eslint-recommended.js create mode 100644 node_modules/eslint/conf/replacements.json create mode 100644 node_modules/eslint/lib/api.js create mode 100644 node_modules/eslint/lib/ast-utils.js create mode 100644 node_modules/eslint/lib/cli-engine.js create mode 100644 node_modules/eslint/lib/cli.js create mode 100644 node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js create mode 100644 node_modules/eslint/lib/code-path-analysis/code-path-segment.js create mode 100644 node_modules/eslint/lib/code-path-analysis/code-path-state.js create mode 100644 node_modules/eslint/lib/code-path-analysis/code-path.js create mode 100644 node_modules/eslint/lib/code-path-analysis/debug-helpers.js create mode 100644 node_modules/eslint/lib/code-path-analysis/fork-context.js create mode 100644 node_modules/eslint/lib/code-path-analysis/id-generator.js create mode 100644 node_modules/eslint/lib/config.js create mode 100644 node_modules/eslint/lib/config/autoconfig.js create mode 100644 node_modules/eslint/lib/config/config-cache.js create mode 100644 node_modules/eslint/lib/config/config-file.js create mode 100644 node_modules/eslint/lib/config/config-initializer.js create mode 100644 node_modules/eslint/lib/config/config-ops.js create mode 100644 node_modules/eslint/lib/config/config-rule.js create mode 100644 node_modules/eslint/lib/config/config-validator.js create mode 100644 node_modules/eslint/lib/config/environments.js create mode 100644 node_modules/eslint/lib/config/plugins.js create mode 100644 node_modules/eslint/lib/file-finder.js create mode 100644 node_modules/eslint/lib/formatters/checkstyle.js create mode 100644 node_modules/eslint/lib/formatters/codeframe.js create mode 100644 node_modules/eslint/lib/formatters/compact.js create mode 100644 node_modules/eslint/lib/formatters/html-template-message.html create mode 100644 node_modules/eslint/lib/formatters/html-template-page.html create mode 100644 node_modules/eslint/lib/formatters/html-template-result.html create mode 100644 node_modules/eslint/lib/formatters/html.js create mode 100644 node_modules/eslint/lib/formatters/jslint-xml.js create mode 100644 node_modules/eslint/lib/formatters/json.js create mode 100644 node_modules/eslint/lib/formatters/junit.js create mode 100644 node_modules/eslint/lib/formatters/stylish.js create mode 100644 node_modules/eslint/lib/formatters/table.js create mode 100644 node_modules/eslint/lib/formatters/tap.js create mode 100644 node_modules/eslint/lib/formatters/unix.js create mode 100644 node_modules/eslint/lib/formatters/visualstudio.js create mode 100644 node_modules/eslint/lib/ignored-paths.js create mode 100644 node_modules/eslint/lib/linter.js create mode 100644 node_modules/eslint/lib/load-rules.js create mode 100644 node_modules/eslint/lib/logging.js create mode 100644 node_modules/eslint/lib/options.js create mode 100644 node_modules/eslint/lib/report-translator.js create mode 100644 node_modules/eslint/lib/rules.js create mode 100644 node_modules/eslint/lib/rules/.eslintrc.yml create mode 100644 node_modules/eslint/lib/rules/accessor-pairs.js create mode 100644 node_modules/eslint/lib/rules/array-bracket-newline.js create mode 100644 node_modules/eslint/lib/rules/array-bracket-spacing.js create mode 100644 node_modules/eslint/lib/rules/array-callback-return.js create mode 100644 node_modules/eslint/lib/rules/array-element-newline.js create mode 100644 node_modules/eslint/lib/rules/arrow-body-style.js create mode 100644 node_modules/eslint/lib/rules/arrow-parens.js create mode 100644 node_modules/eslint/lib/rules/arrow-spacing.js create mode 100644 node_modules/eslint/lib/rules/block-scoped-var.js create mode 100644 node_modules/eslint/lib/rules/block-spacing.js create mode 100644 node_modules/eslint/lib/rules/brace-style.js create mode 100644 node_modules/eslint/lib/rules/callback-return.js create mode 100644 node_modules/eslint/lib/rules/camelcase.js create mode 100644 node_modules/eslint/lib/rules/capitalized-comments.js create mode 100644 node_modules/eslint/lib/rules/class-methods-use-this.js create mode 100644 node_modules/eslint/lib/rules/comma-dangle.js create mode 100644 node_modules/eslint/lib/rules/comma-spacing.js create mode 100644 node_modules/eslint/lib/rules/comma-style.js create mode 100644 node_modules/eslint/lib/rules/complexity.js create mode 100644 node_modules/eslint/lib/rules/computed-property-spacing.js create mode 100644 node_modules/eslint/lib/rules/consistent-return.js create mode 100644 node_modules/eslint/lib/rules/consistent-this.js create mode 100644 node_modules/eslint/lib/rules/constructor-super.js create mode 100644 node_modules/eslint/lib/rules/curly.js create mode 100644 node_modules/eslint/lib/rules/default-case.js create mode 100644 node_modules/eslint/lib/rules/dot-location.js create mode 100644 node_modules/eslint/lib/rules/dot-notation.js create mode 100644 node_modules/eslint/lib/rules/eol-last.js create mode 100644 node_modules/eslint/lib/rules/eqeqeq.js create mode 100644 node_modules/eslint/lib/rules/for-direction.js create mode 100644 node_modules/eslint/lib/rules/func-call-spacing.js create mode 100644 node_modules/eslint/lib/rules/func-name-matching.js create mode 100644 node_modules/eslint/lib/rules/func-names.js create mode 100644 node_modules/eslint/lib/rules/func-style.js create mode 100644 node_modules/eslint/lib/rules/function-paren-newline.js create mode 100644 node_modules/eslint/lib/rules/generator-star-spacing.js create mode 100644 node_modules/eslint/lib/rules/getter-return.js create mode 100644 node_modules/eslint/lib/rules/global-require.js create mode 100644 node_modules/eslint/lib/rules/guard-for-in.js create mode 100644 node_modules/eslint/lib/rules/handle-callback-err.js create mode 100644 node_modules/eslint/lib/rules/id-blacklist.js create mode 100644 node_modules/eslint/lib/rules/id-length.js create mode 100644 node_modules/eslint/lib/rules/id-match.js create mode 100644 node_modules/eslint/lib/rules/implicit-arrow-linebreak.js create mode 100644 node_modules/eslint/lib/rules/indent-legacy.js create mode 100644 node_modules/eslint/lib/rules/indent.js create mode 100644 node_modules/eslint/lib/rules/init-declarations.js create mode 100644 node_modules/eslint/lib/rules/jsx-quotes.js create mode 100644 node_modules/eslint/lib/rules/key-spacing.js create mode 100644 node_modules/eslint/lib/rules/keyword-spacing.js create mode 100644 node_modules/eslint/lib/rules/line-comment-position.js create mode 100644 node_modules/eslint/lib/rules/linebreak-style.js create mode 100644 node_modules/eslint/lib/rules/lines-around-comment.js create mode 100644 node_modules/eslint/lib/rules/lines-around-directive.js create mode 100644 node_modules/eslint/lib/rules/lines-between-class-members.js create mode 100644 node_modules/eslint/lib/rules/max-depth.js create mode 100644 node_modules/eslint/lib/rules/max-len.js create mode 100644 node_modules/eslint/lib/rules/max-lines.js create mode 100644 node_modules/eslint/lib/rules/max-nested-callbacks.js create mode 100644 node_modules/eslint/lib/rules/max-params.js create mode 100644 node_modules/eslint/lib/rules/max-statements-per-line.js create mode 100644 node_modules/eslint/lib/rules/max-statements.js create mode 100644 node_modules/eslint/lib/rules/multiline-comment-style.js create mode 100644 node_modules/eslint/lib/rules/multiline-ternary.js create mode 100644 node_modules/eslint/lib/rules/new-cap.js create mode 100644 node_modules/eslint/lib/rules/new-parens.js create mode 100644 node_modules/eslint/lib/rules/newline-after-var.js create mode 100644 node_modules/eslint/lib/rules/newline-before-return.js create mode 100644 node_modules/eslint/lib/rules/newline-per-chained-call.js create mode 100644 node_modules/eslint/lib/rules/no-alert.js create mode 100644 node_modules/eslint/lib/rules/no-array-constructor.js create mode 100644 node_modules/eslint/lib/rules/no-await-in-loop.js create mode 100644 node_modules/eslint/lib/rules/no-bitwise.js create mode 100644 node_modules/eslint/lib/rules/no-buffer-constructor.js create mode 100644 node_modules/eslint/lib/rules/no-caller.js create mode 100644 node_modules/eslint/lib/rules/no-case-declarations.js create mode 100644 node_modules/eslint/lib/rules/no-catch-shadow.js create mode 100644 node_modules/eslint/lib/rules/no-class-assign.js create mode 100644 node_modules/eslint/lib/rules/no-compare-neg-zero.js create mode 100644 node_modules/eslint/lib/rules/no-cond-assign.js create mode 100644 node_modules/eslint/lib/rules/no-confusing-arrow.js create mode 100644 node_modules/eslint/lib/rules/no-console.js create mode 100644 node_modules/eslint/lib/rules/no-const-assign.js create mode 100644 node_modules/eslint/lib/rules/no-constant-condition.js create mode 100644 node_modules/eslint/lib/rules/no-continue.js create mode 100644 node_modules/eslint/lib/rules/no-control-regex.js create mode 100644 node_modules/eslint/lib/rules/no-debugger.js create mode 100644 node_modules/eslint/lib/rules/no-delete-var.js create mode 100644 node_modules/eslint/lib/rules/no-div-regex.js create mode 100644 node_modules/eslint/lib/rules/no-dupe-args.js create mode 100644 node_modules/eslint/lib/rules/no-dupe-class-members.js create mode 100644 node_modules/eslint/lib/rules/no-dupe-keys.js create mode 100644 node_modules/eslint/lib/rules/no-duplicate-case.js create mode 100644 node_modules/eslint/lib/rules/no-duplicate-imports.js create mode 100644 node_modules/eslint/lib/rules/no-else-return.js create mode 100644 node_modules/eslint/lib/rules/no-empty-character-class.js create mode 100644 node_modules/eslint/lib/rules/no-empty-function.js create mode 100644 node_modules/eslint/lib/rules/no-empty-pattern.js create mode 100644 node_modules/eslint/lib/rules/no-empty.js create mode 100644 node_modules/eslint/lib/rules/no-eq-null.js create mode 100644 node_modules/eslint/lib/rules/no-eval.js create mode 100644 node_modules/eslint/lib/rules/no-ex-assign.js create mode 100644 node_modules/eslint/lib/rules/no-extend-native.js create mode 100644 node_modules/eslint/lib/rules/no-extra-bind.js create mode 100644 node_modules/eslint/lib/rules/no-extra-boolean-cast.js create mode 100644 node_modules/eslint/lib/rules/no-extra-label.js create mode 100644 node_modules/eslint/lib/rules/no-extra-parens.js create mode 100644 node_modules/eslint/lib/rules/no-extra-semi.js create mode 100644 node_modules/eslint/lib/rules/no-fallthrough.js create mode 100644 node_modules/eslint/lib/rules/no-floating-decimal.js create mode 100644 node_modules/eslint/lib/rules/no-func-assign.js create mode 100644 node_modules/eslint/lib/rules/no-global-assign.js create mode 100644 node_modules/eslint/lib/rules/no-implicit-coercion.js create mode 100644 node_modules/eslint/lib/rules/no-implicit-globals.js create mode 100644 node_modules/eslint/lib/rules/no-implied-eval.js create mode 100644 node_modules/eslint/lib/rules/no-inline-comments.js create mode 100644 node_modules/eslint/lib/rules/no-inner-declarations.js create mode 100644 node_modules/eslint/lib/rules/no-invalid-regexp.js create mode 100644 node_modules/eslint/lib/rules/no-invalid-this.js create mode 100644 node_modules/eslint/lib/rules/no-irregular-whitespace.js create mode 100644 node_modules/eslint/lib/rules/no-iterator.js create mode 100644 node_modules/eslint/lib/rules/no-label-var.js create mode 100644 node_modules/eslint/lib/rules/no-labels.js create mode 100644 node_modules/eslint/lib/rules/no-lone-blocks.js create mode 100644 node_modules/eslint/lib/rules/no-lonely-if.js create mode 100644 node_modules/eslint/lib/rules/no-loop-func.js create mode 100644 node_modules/eslint/lib/rules/no-magic-numbers.js create mode 100644 node_modules/eslint/lib/rules/no-mixed-operators.js create mode 100644 node_modules/eslint/lib/rules/no-mixed-requires.js create mode 100644 node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js create mode 100644 node_modules/eslint/lib/rules/no-multi-assign.js create mode 100644 node_modules/eslint/lib/rules/no-multi-spaces.js create mode 100644 node_modules/eslint/lib/rules/no-multi-str.js create mode 100644 node_modules/eslint/lib/rules/no-multiple-empty-lines.js create mode 100644 node_modules/eslint/lib/rules/no-native-reassign.js create mode 100644 node_modules/eslint/lib/rules/no-negated-condition.js create mode 100644 node_modules/eslint/lib/rules/no-negated-in-lhs.js create mode 100644 node_modules/eslint/lib/rules/no-nested-ternary.js create mode 100644 node_modules/eslint/lib/rules/no-new-func.js create mode 100644 node_modules/eslint/lib/rules/no-new-object.js create mode 100644 node_modules/eslint/lib/rules/no-new-require.js create mode 100644 node_modules/eslint/lib/rules/no-new-symbol.js create mode 100644 node_modules/eslint/lib/rules/no-new-wrappers.js create mode 100644 node_modules/eslint/lib/rules/no-new.js create mode 100644 node_modules/eslint/lib/rules/no-obj-calls.js create mode 100644 node_modules/eslint/lib/rules/no-octal-escape.js create mode 100644 node_modules/eslint/lib/rules/no-octal.js create mode 100644 node_modules/eslint/lib/rules/no-param-reassign.js create mode 100644 node_modules/eslint/lib/rules/no-path-concat.js create mode 100644 node_modules/eslint/lib/rules/no-plusplus.js create mode 100644 node_modules/eslint/lib/rules/no-process-env.js create mode 100644 node_modules/eslint/lib/rules/no-process-exit.js create mode 100644 node_modules/eslint/lib/rules/no-proto.js create mode 100644 node_modules/eslint/lib/rules/no-prototype-builtins.js create mode 100644 node_modules/eslint/lib/rules/no-redeclare.js create mode 100644 node_modules/eslint/lib/rules/no-regex-spaces.js create mode 100644 node_modules/eslint/lib/rules/no-restricted-globals.js create mode 100644 node_modules/eslint/lib/rules/no-restricted-imports.js create mode 100644 node_modules/eslint/lib/rules/no-restricted-modules.js create mode 100644 node_modules/eslint/lib/rules/no-restricted-properties.js create mode 100644 node_modules/eslint/lib/rules/no-restricted-syntax.js create mode 100644 node_modules/eslint/lib/rules/no-return-assign.js create mode 100644 node_modules/eslint/lib/rules/no-return-await.js create mode 100644 node_modules/eslint/lib/rules/no-script-url.js create mode 100644 node_modules/eslint/lib/rules/no-self-assign.js create mode 100644 node_modules/eslint/lib/rules/no-self-compare.js create mode 100644 node_modules/eslint/lib/rules/no-sequences.js create mode 100644 node_modules/eslint/lib/rules/no-shadow-restricted-names.js create mode 100644 node_modules/eslint/lib/rules/no-shadow.js create mode 100644 node_modules/eslint/lib/rules/no-spaced-func.js create mode 100644 node_modules/eslint/lib/rules/no-sparse-arrays.js create mode 100644 node_modules/eslint/lib/rules/no-sync.js create mode 100644 node_modules/eslint/lib/rules/no-tabs.js create mode 100644 node_modules/eslint/lib/rules/no-template-curly-in-string.js create mode 100644 node_modules/eslint/lib/rules/no-ternary.js create mode 100644 node_modules/eslint/lib/rules/no-this-before-super.js create mode 100644 node_modules/eslint/lib/rules/no-throw-literal.js create mode 100644 node_modules/eslint/lib/rules/no-trailing-spaces.js create mode 100644 node_modules/eslint/lib/rules/no-undef-init.js create mode 100644 node_modules/eslint/lib/rules/no-undef.js create mode 100644 node_modules/eslint/lib/rules/no-undefined.js create mode 100644 node_modules/eslint/lib/rules/no-underscore-dangle.js create mode 100644 node_modules/eslint/lib/rules/no-unexpected-multiline.js create mode 100644 node_modules/eslint/lib/rules/no-unmodified-loop-condition.js create mode 100644 node_modules/eslint/lib/rules/no-unneeded-ternary.js create mode 100644 node_modules/eslint/lib/rules/no-unreachable.js create mode 100644 node_modules/eslint/lib/rules/no-unsafe-finally.js create mode 100644 node_modules/eslint/lib/rules/no-unsafe-negation.js create mode 100644 node_modules/eslint/lib/rules/no-unused-expressions.js create mode 100644 node_modules/eslint/lib/rules/no-unused-labels.js create mode 100644 node_modules/eslint/lib/rules/no-unused-vars.js create mode 100644 node_modules/eslint/lib/rules/no-use-before-define.js create mode 100644 node_modules/eslint/lib/rules/no-useless-call.js create mode 100644 node_modules/eslint/lib/rules/no-useless-computed-key.js create mode 100644 node_modules/eslint/lib/rules/no-useless-concat.js create mode 100644 node_modules/eslint/lib/rules/no-useless-constructor.js create mode 100644 node_modules/eslint/lib/rules/no-useless-escape.js create mode 100644 node_modules/eslint/lib/rules/no-useless-rename.js create mode 100644 node_modules/eslint/lib/rules/no-useless-return.js create mode 100644 node_modules/eslint/lib/rules/no-var.js create mode 100644 node_modules/eslint/lib/rules/no-void.js create mode 100644 node_modules/eslint/lib/rules/no-warning-comments.js create mode 100644 node_modules/eslint/lib/rules/no-whitespace-before-property.js create mode 100644 node_modules/eslint/lib/rules/no-with.js create mode 100644 node_modules/eslint/lib/rules/nonblock-statement-body-position.js create mode 100644 node_modules/eslint/lib/rules/object-curly-newline.js create mode 100644 node_modules/eslint/lib/rules/object-curly-spacing.js create mode 100644 node_modules/eslint/lib/rules/object-property-newline.js create mode 100644 node_modules/eslint/lib/rules/object-shorthand.js create mode 100644 node_modules/eslint/lib/rules/one-var-declaration-per-line.js create mode 100644 node_modules/eslint/lib/rules/one-var.js create mode 100644 node_modules/eslint/lib/rules/operator-assignment.js create mode 100644 node_modules/eslint/lib/rules/operator-linebreak.js create mode 100644 node_modules/eslint/lib/rules/padded-blocks.js create mode 100644 node_modules/eslint/lib/rules/padding-line-between-statements.js create mode 100644 node_modules/eslint/lib/rules/prefer-arrow-callback.js create mode 100644 node_modules/eslint/lib/rules/prefer-const.js create mode 100644 node_modules/eslint/lib/rules/prefer-destructuring.js create mode 100644 node_modules/eslint/lib/rules/prefer-numeric-literals.js create mode 100644 node_modules/eslint/lib/rules/prefer-promise-reject-errors.js create mode 100644 node_modules/eslint/lib/rules/prefer-reflect.js create mode 100644 node_modules/eslint/lib/rules/prefer-rest-params.js create mode 100644 node_modules/eslint/lib/rules/prefer-spread.js create mode 100644 node_modules/eslint/lib/rules/prefer-template.js create mode 100644 node_modules/eslint/lib/rules/quote-props.js create mode 100644 node_modules/eslint/lib/rules/quotes.js create mode 100644 node_modules/eslint/lib/rules/radix.js create mode 100644 node_modules/eslint/lib/rules/require-await.js create mode 100644 node_modules/eslint/lib/rules/require-jsdoc.js create mode 100644 node_modules/eslint/lib/rules/require-yield.js create mode 100644 node_modules/eslint/lib/rules/rest-spread-spacing.js create mode 100644 node_modules/eslint/lib/rules/semi-spacing.js create mode 100644 node_modules/eslint/lib/rules/semi-style.js create mode 100644 node_modules/eslint/lib/rules/semi.js create mode 100644 node_modules/eslint/lib/rules/sort-imports.js create mode 100644 node_modules/eslint/lib/rules/sort-keys.js create mode 100644 node_modules/eslint/lib/rules/sort-vars.js create mode 100644 node_modules/eslint/lib/rules/space-before-blocks.js create mode 100644 node_modules/eslint/lib/rules/space-before-function-paren.js create mode 100644 node_modules/eslint/lib/rules/space-in-parens.js create mode 100644 node_modules/eslint/lib/rules/space-infix-ops.js create mode 100644 node_modules/eslint/lib/rules/space-unary-ops.js create mode 100644 node_modules/eslint/lib/rules/spaced-comment.js create mode 100644 node_modules/eslint/lib/rules/strict.js create mode 100644 node_modules/eslint/lib/rules/switch-colon-spacing.js create mode 100644 node_modules/eslint/lib/rules/symbol-description.js create mode 100644 node_modules/eslint/lib/rules/template-curly-spacing.js create mode 100644 node_modules/eslint/lib/rules/template-tag-spacing.js create mode 100644 node_modules/eslint/lib/rules/unicode-bom.js create mode 100644 node_modules/eslint/lib/rules/use-isnan.js create mode 100644 node_modules/eslint/lib/rules/valid-jsdoc.js create mode 100644 node_modules/eslint/lib/rules/valid-typeof.js create mode 100644 node_modules/eslint/lib/rules/vars-on-top.js create mode 100644 node_modules/eslint/lib/rules/wrap-iife.js create mode 100644 node_modules/eslint/lib/rules/wrap-regex.js create mode 100644 node_modules/eslint/lib/rules/yield-star-spacing.js create mode 100644 node_modules/eslint/lib/rules/yoda.js create mode 100644 node_modules/eslint/lib/testers/rule-tester.js create mode 100644 node_modules/eslint/lib/timing.js create mode 100644 node_modules/eslint/lib/token-store/backward-token-comment-cursor.js create mode 100644 node_modules/eslint/lib/token-store/backward-token-cursor.js create mode 100644 node_modules/eslint/lib/token-store/cursor.js create mode 100644 node_modules/eslint/lib/token-store/cursors.js create mode 100644 node_modules/eslint/lib/token-store/decorative-cursor.js create mode 100644 node_modules/eslint/lib/token-store/filter-cursor.js create mode 100644 node_modules/eslint/lib/token-store/forward-token-comment-cursor.js create mode 100644 node_modules/eslint/lib/token-store/forward-token-cursor.js create mode 100644 node_modules/eslint/lib/token-store/index.js create mode 100644 node_modules/eslint/lib/token-store/limit-cursor.js create mode 100644 node_modules/eslint/lib/token-store/padded-token-cursor.js create mode 100644 node_modules/eslint/lib/token-store/skip-cursor.js create mode 100644 node_modules/eslint/lib/token-store/utils.js create mode 100644 node_modules/eslint/lib/util/ajv.js create mode 100644 node_modules/eslint/lib/util/apply-disable-directives.js create mode 100644 node_modules/eslint/lib/util/fix-tracker.js create mode 100644 node_modules/eslint/lib/util/glob-util.js create mode 100644 node_modules/eslint/lib/util/glob.js create mode 100644 node_modules/eslint/lib/util/hash.js create mode 100644 node_modules/eslint/lib/util/interpolate.js create mode 100644 node_modules/eslint/lib/util/keywords.js create mode 100644 node_modules/eslint/lib/util/module-resolver.js create mode 100644 node_modules/eslint/lib/util/naming.js create mode 100644 node_modules/eslint/lib/util/node-event-generator.js create mode 100644 node_modules/eslint/lib/util/npm-util.js create mode 100644 node_modules/eslint/lib/util/path-util.js create mode 100644 node_modules/eslint/lib/util/patterns/letters.js create mode 100644 node_modules/eslint/lib/util/rule-fixer.js create mode 100644 node_modules/eslint/lib/util/safe-emitter.js create mode 100644 node_modules/eslint/lib/util/source-code-fixer.js create mode 100644 node_modules/eslint/lib/util/source-code-util.js create mode 100644 node_modules/eslint/lib/util/source-code.js create mode 100644 node_modules/eslint/lib/util/traverser.js create mode 100644 node_modules/eslint/lib/util/xml-escape.js create mode 100644 node_modules/eslint/messages/extend-config-missing.txt create mode 100644 node_modules/eslint/messages/no-config-found.txt create mode 100644 node_modules/eslint/messages/plugin-missing.txt create mode 100644 node_modules/eslint/messages/whitespace-found.txt create mode 100644 node_modules/eslint/node_modules/.bin/mkdirp create mode 100644 node_modules/eslint/node_modules/.bin/mkdirp.cmd create mode 100644 node_modules/eslint/node_modules/ajv/.tonic_example.js create mode 100644 node_modules/eslint/node_modules/ajv/LICENSE create mode 100644 node_modules/eslint/node_modules/ajv/README.md create mode 100644 node_modules/eslint/node_modules/ajv/dist/ajv.bundle.js create mode 100644 node_modules/eslint/node_modules/ajv/dist/ajv.min.js create mode 100644 node_modules/eslint/node_modules/ajv/dist/ajv.min.js.map create mode 100644 node_modules/eslint/node_modules/ajv/dist/nodent.min.js create mode 100644 node_modules/eslint/node_modules/ajv/dist/regenerator.min.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/$data.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/ajv.d.ts create mode 100644 node_modules/eslint/node_modules/ajv/lib/ajv.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/cache.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/compile/_rules.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/compile/async.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/compile/equal.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/compile/error_classes.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/compile/formats.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/compile/index.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/compile/resolve.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/compile/rules.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/compile/schema_obj.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/compile/ucs2length.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/compile/util.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/dot/_limit.jst create mode 100644 node_modules/eslint/node_modules/ajv/lib/dot/_limitItems.jst create mode 100644 node_modules/eslint/node_modules/ajv/lib/dot/_limitLength.jst create mode 100644 node_modules/eslint/node_modules/ajv/lib/dot/_limitProperties.jst create mode 100644 node_modules/eslint/node_modules/ajv/lib/dot/allOf.jst create mode 100644 node_modules/eslint/node_modules/ajv/lib/dot/anyOf.jst create mode 100644 node_modules/eslint/node_modules/ajv/lib/dot/coerce.def create mode 100644 node_modules/eslint/node_modules/ajv/lib/dot/const.jst create mode 100644 node_modules/eslint/node_modules/ajv/lib/dot/contains.jst create mode 100644 node_modules/eslint/node_modules/ajv/lib/dot/custom.jst create mode 100644 node_modules/eslint/node_modules/ajv/lib/dot/defaults.def create mode 100644 node_modules/eslint/node_modules/ajv/lib/dot/definitions.def create mode 100644 node_modules/eslint/node_modules/ajv/lib/dot/dependencies.jst create mode 100644 node_modules/eslint/node_modules/ajv/lib/dot/enum.jst create mode 100644 node_modules/eslint/node_modules/ajv/lib/dot/errors.def create mode 100644 node_modules/eslint/node_modules/ajv/lib/dot/format.jst create mode 100644 node_modules/eslint/node_modules/ajv/lib/dot/items.jst create mode 100644 node_modules/eslint/node_modules/ajv/lib/dot/missing.def create mode 100644 node_modules/eslint/node_modules/ajv/lib/dot/multipleOf.jst create mode 100644 node_modules/eslint/node_modules/ajv/lib/dot/not.jst create mode 100644 node_modules/eslint/node_modules/ajv/lib/dot/oneOf.jst create mode 100644 node_modules/eslint/node_modules/ajv/lib/dot/pattern.jst create mode 100644 node_modules/eslint/node_modules/ajv/lib/dot/properties.jst create mode 100644 node_modules/eslint/node_modules/ajv/lib/dot/propertyNames.jst create mode 100644 node_modules/eslint/node_modules/ajv/lib/dot/ref.jst create mode 100644 node_modules/eslint/node_modules/ajv/lib/dot/required.jst create mode 100644 node_modules/eslint/node_modules/ajv/lib/dot/uniqueItems.jst create mode 100644 node_modules/eslint/node_modules/ajv/lib/dot/validate.jst create mode 100644 node_modules/eslint/node_modules/ajv/lib/dotjs/README.md create mode 100644 node_modules/eslint/node_modules/ajv/lib/dotjs/_limit.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/dotjs/_limitItems.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/dotjs/_limitLength.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/dotjs/_limitProperties.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/dotjs/allOf.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/dotjs/anyOf.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/dotjs/const.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/dotjs/contains.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/dotjs/custom.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/dotjs/dependencies.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/dotjs/enum.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/dotjs/format.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/dotjs/items.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/dotjs/multipleOf.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/dotjs/not.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/dotjs/oneOf.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/dotjs/pattern.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/dotjs/properties.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/dotjs/propertyNames.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/dotjs/ref.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/dotjs/required.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/dotjs/uniqueItems.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/dotjs/validate.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/keyword.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/patternGroups.js create mode 100644 node_modules/eslint/node_modules/ajv/lib/refs/$data.json create mode 100644 node_modules/eslint/node_modules/ajv/lib/refs/json-schema-draft-04.json create mode 100644 node_modules/eslint/node_modules/ajv/lib/refs/json-schema-draft-06.json create mode 100644 node_modules/eslint/node_modules/ajv/lib/refs/json-schema-v5.json create mode 100644 node_modules/eslint/node_modules/ajv/package.json create mode 100644 node_modules/eslint/node_modules/ajv/scripts/.eslintrc.yml create mode 100644 node_modules/eslint/node_modules/ajv/scripts/bundle.js create mode 100644 node_modules/eslint/node_modules/ajv/scripts/compile-dots.js create mode 100644 node_modules/eslint/node_modules/ajv/scripts/info create mode 100644 node_modules/eslint/node_modules/ajv/scripts/prepare-tests create mode 100644 node_modules/eslint/node_modules/ajv/scripts/travis-gh-pages create mode 100644 node_modules/eslint/node_modules/ansi-regex/index.js create mode 100644 node_modules/eslint/node_modules/ansi-regex/license create mode 100644 node_modules/eslint/node_modules/ansi-regex/package.json create mode 100644 node_modules/eslint/node_modules/ansi-regex/readme.md create mode 100644 node_modules/eslint/node_modules/ansi-styles/index.js create mode 100644 node_modules/eslint/node_modules/ansi-styles/license create mode 100644 node_modules/eslint/node_modules/ansi-styles/package.json create mode 100644 node_modules/eslint/node_modules/ansi-styles/readme.md create mode 100644 node_modules/eslint/node_modules/chalk/index.js create mode 100644 node_modules/eslint/node_modules/chalk/license create mode 100644 node_modules/eslint/node_modules/chalk/package.json create mode 100644 node_modules/eslint/node_modules/chalk/readme.md create mode 100644 node_modules/eslint/node_modules/chalk/templates.js create mode 100644 node_modules/eslint/node_modules/chalk/types/index.d.ts create mode 100644 node_modules/eslint/node_modules/debug/.coveralls.yml create mode 100644 node_modules/eslint/node_modules/debug/.eslintrc create mode 100644 node_modules/eslint/node_modules/debug/.npmignore create mode 100644 node_modules/eslint/node_modules/debug/.travis.yml create mode 100644 node_modules/eslint/node_modules/debug/CHANGELOG.md create mode 100644 node_modules/eslint/node_modules/debug/LICENSE create mode 100644 node_modules/eslint/node_modules/debug/Makefile create mode 100644 node_modules/eslint/node_modules/debug/README.md create mode 100644 node_modules/eslint/node_modules/debug/karma.conf.js create mode 100644 node_modules/eslint/node_modules/debug/node.js create mode 100644 node_modules/eslint/node_modules/debug/package.json create mode 100644 node_modules/eslint/node_modules/debug/src/browser.js create mode 100644 node_modules/eslint/node_modules/debug/src/debug.js create mode 100644 node_modules/eslint/node_modules/debug/src/index.js create mode 100644 node_modules/eslint/node_modules/debug/src/node.js create mode 100644 node_modules/eslint/node_modules/minimist/.travis.yml create mode 100644 node_modules/eslint/node_modules/minimist/LICENSE create mode 100644 node_modules/eslint/node_modules/minimist/example/parse.js create mode 100644 node_modules/eslint/node_modules/minimist/index.js create mode 100644 node_modules/eslint/node_modules/minimist/package.json create mode 100644 node_modules/eslint/node_modules/minimist/readme.markdown create mode 100644 node_modules/eslint/node_modules/minimist/test/dash.js create mode 100644 node_modules/eslint/node_modules/minimist/test/default_bool.js create mode 100644 node_modules/eslint/node_modules/minimist/test/dotted.js create mode 100644 node_modules/eslint/node_modules/minimist/test/long.js create mode 100644 node_modules/eslint/node_modules/minimist/test/parse.js create mode 100644 node_modules/eslint/node_modules/minimist/test/parse_modified.js create mode 100644 node_modules/eslint/node_modules/minimist/test/short.js create mode 100644 node_modules/eslint/node_modules/minimist/test/whitespace.js create mode 100644 node_modules/eslint/node_modules/mkdirp/.travis.yml create mode 100644 node_modules/eslint/node_modules/mkdirp/LICENSE create mode 100644 node_modules/eslint/node_modules/mkdirp/bin/cmd.js create mode 100644 node_modules/eslint/node_modules/mkdirp/bin/usage.txt create mode 100644 node_modules/eslint/node_modules/mkdirp/examples/pow.js create mode 100644 node_modules/eslint/node_modules/mkdirp/index.js create mode 100644 node_modules/eslint/node_modules/mkdirp/package.json create mode 100644 node_modules/eslint/node_modules/mkdirp/readme.markdown create mode 100644 node_modules/eslint/node_modules/mkdirp/test/chmod.js create mode 100644 node_modules/eslint/node_modules/mkdirp/test/clobber.js create mode 100644 node_modules/eslint/node_modules/mkdirp/test/mkdirp.js create mode 100644 node_modules/eslint/node_modules/mkdirp/test/opts_fs.js create mode 100644 node_modules/eslint/node_modules/mkdirp/test/opts_fs_sync.js create mode 100644 node_modules/eslint/node_modules/mkdirp/test/perm.js create mode 100644 node_modules/eslint/node_modules/mkdirp/test/perm_sync.js create mode 100644 node_modules/eslint/node_modules/mkdirp/test/race.js create mode 100644 node_modules/eslint/node_modules/mkdirp/test/rel.js create mode 100644 node_modules/eslint/node_modules/mkdirp/test/return.js create mode 100644 node_modules/eslint/node_modules/mkdirp/test/return_sync.js create mode 100644 node_modules/eslint/node_modules/mkdirp/test/root.js create mode 100644 node_modules/eslint/node_modules/mkdirp/test/sync.js create mode 100644 node_modules/eslint/node_modules/mkdirp/test/umask.js create mode 100644 node_modules/eslint/node_modules/mkdirp/test/umask_sync.js create mode 100644 node_modules/eslint/node_modules/ms/index.js create mode 100644 node_modules/eslint/node_modules/ms/license.md create mode 100644 node_modules/eslint/node_modules/ms/package.json create mode 100644 node_modules/eslint/node_modules/ms/readme.md create mode 100644 node_modules/eslint/node_modules/strip-ansi/index.js create mode 100644 node_modules/eslint/node_modules/strip-ansi/license create mode 100644 node_modules/eslint/node_modules/strip-ansi/package.json create mode 100644 node_modules/eslint/node_modules/strip-ansi/readme.md create mode 100644 node_modules/eslint/node_modules/supports-color/browser.js create mode 100644 node_modules/eslint/node_modules/supports-color/index.js create mode 100644 node_modules/eslint/node_modules/supports-color/license create mode 100644 node_modules/eslint/node_modules/supports-color/package.json create mode 100644 node_modules/eslint/node_modules/supports-color/readme.md create mode 100644 node_modules/eslint/package.json create mode 100644 node_modules/espree/CHANGELOG.md create mode 100644 node_modules/espree/LICENSE create mode 100644 node_modules/espree/README.md create mode 100644 node_modules/espree/espree.js create mode 100644 node_modules/espree/lib/ast-node-types.js create mode 100644 node_modules/espree/lib/comment-attachment.js create mode 100644 node_modules/espree/lib/features.js create mode 100644 node_modules/espree/lib/token-translator.js create mode 100644 node_modules/espree/lib/visitor-keys.js create mode 100644 node_modules/espree/node_modules/.bin/acorn create mode 100644 node_modules/espree/node_modules/.bin/acorn.cmd create mode 100644 node_modules/espree/node_modules/acorn/AUTHORS create mode 100644 node_modules/espree/node_modules/acorn/CHANGELOG.md create mode 100644 node_modules/espree/node_modules/acorn/LICENSE create mode 100644 node_modules/espree/node_modules/acorn/README.md create mode 100644 node_modules/espree/node_modules/acorn/bin/_acorn.js create mode 100644 node_modules/espree/node_modules/acorn/bin/acorn create mode 100644 node_modules/espree/node_modules/acorn/bin/run_test262.js create mode 100644 node_modules/espree/node_modules/acorn/bin/test262.whitelist create mode 100644 node_modules/espree/node_modules/acorn/dist/.keep create mode 100644 node_modules/espree/node_modules/acorn/dist/acorn.es.js create mode 100644 node_modules/espree/node_modules/acorn/dist/acorn.js create mode 100644 node_modules/espree/node_modules/acorn/dist/acorn_loose.es.js create mode 100644 node_modules/espree/node_modules/acorn/dist/acorn_loose.js create mode 100644 node_modules/espree/node_modules/acorn/dist/walk.es.js create mode 100644 node_modules/espree/node_modules/acorn/dist/walk.js create mode 100644 node_modules/espree/node_modules/acorn/package.json create mode 100644 node_modules/espree/package.json create mode 100644 node_modules/esprima/ChangeLog create mode 100644 node_modules/esprima/LICENSE.BSD create mode 100644 node_modules/esprima/README.md create mode 100644 node_modules/esprima/bin/esparse.js create mode 100644 node_modules/esprima/bin/esvalidate.js create mode 100644 node_modules/esprima/dist/esprima.js create mode 100644 node_modules/esprima/package.json create mode 100644 node_modules/esquery/README.md create mode 100644 node_modules/esquery/esquery.js create mode 100644 node_modules/esquery/license.txt create mode 100644 node_modules/esquery/package.json create mode 100644 node_modules/esquery/parser.js create mode 100644 node_modules/esrecurse/.babelrc create mode 100644 node_modules/esrecurse/README.md create mode 100644 node_modules/esrecurse/esrecurse.js create mode 100644 node_modules/esrecurse/gulpfile.babel.js create mode 100644 node_modules/esrecurse/package.json create mode 100644 node_modules/estraverse/.babelrc create mode 100644 node_modules/estraverse/.jshintrc create mode 100644 node_modules/estraverse/LICENSE.BSD create mode 100644 node_modules/estraverse/estraverse.js create mode 100644 node_modules/estraverse/gulpfile.js create mode 100644 node_modules/estraverse/package.json create mode 100644 node_modules/esutils/LICENSE.BSD create mode 100644 node_modules/esutils/README.md create mode 100644 node_modules/esutils/lib/ast.js create mode 100644 node_modules/esutils/lib/code.js create mode 100644 node_modules/esutils/lib/keyword.js create mode 100644 node_modules/esutils/lib/utils.js create mode 100644 node_modules/esutils/package.json create mode 100644 node_modules/external-editor/LICENSE create mode 100644 node_modules/external-editor/README.md create mode 100644 node_modules/external-editor/example_async.js create mode 100644 node_modules/external-editor/example_sync.js create mode 100644 node_modules/external-editor/main/errors/CreateFileError.js create mode 100644 node_modules/external-editor/main/errors/LaunchEditorError.js create mode 100644 node_modules/external-editor/main/errors/ReadFileError.js create mode 100644 node_modules/external-editor/main/errors/RemoveFileError.js create mode 100644 node_modules/external-editor/main/index.js create mode 100644 node_modules/external-editor/package.json create mode 100644 node_modules/fast-deep-equal/LICENSE create mode 100644 node_modules/fast-deep-equal/README.md create mode 100644 node_modules/fast-deep-equal/index.d.ts create mode 100644 node_modules/fast-deep-equal/index.js create mode 100644 node_modules/fast-deep-equal/package.json create mode 100644 node_modules/fast-json-stable-stringify/.eslintrc.yml create mode 100644 node_modules/fast-json-stable-stringify/.npmignore create mode 100644 node_modules/fast-json-stable-stringify/.travis.yml create mode 100644 node_modules/fast-json-stable-stringify/LICENSE create mode 100644 node_modules/fast-json-stable-stringify/README.md create mode 100644 node_modules/fast-json-stable-stringify/benchmark/index.js create mode 100644 node_modules/fast-json-stable-stringify/benchmark/test.json create mode 100644 node_modules/fast-json-stable-stringify/example/key_cmp.js create mode 100644 node_modules/fast-json-stable-stringify/example/nested.js create mode 100644 node_modules/fast-json-stable-stringify/example/str.js create mode 100644 node_modules/fast-json-stable-stringify/example/value_cmp.js create mode 100644 node_modules/fast-json-stable-stringify/index.js create mode 100644 node_modules/fast-json-stable-stringify/package.json create mode 100644 node_modules/fast-json-stable-stringify/test/cmp.js create mode 100644 node_modules/fast-json-stable-stringify/test/nested.js create mode 100644 node_modules/fast-json-stable-stringify/test/str.js create mode 100644 node_modules/fast-json-stable-stringify/test/to-json.js create mode 100644 node_modules/fast-levenshtein/LICENSE.md create mode 100644 node_modules/fast-levenshtein/README.md create mode 100644 node_modules/fast-levenshtein/levenshtein.js create mode 100644 node_modules/fast-levenshtein/package.json create mode 100644 node_modules/figures/index.js create mode 100644 node_modules/figures/license create mode 100644 node_modules/figures/package.json create mode 100644 node_modules/figures/readme.md create mode 100644 node_modules/file-entry-cache/LICENSE create mode 100644 node_modules/file-entry-cache/README.md create mode 100644 node_modules/file-entry-cache/cache.js create mode 100644 node_modules/file-entry-cache/changelog.md create mode 100644 node_modules/file-entry-cache/package.json create mode 100644 node_modules/flat-cache/LICENSE create mode 100644 node_modules/flat-cache/README.md create mode 100644 node_modules/flat-cache/cache.js create mode 100644 node_modules/flat-cache/changelog.md create mode 100644 node_modules/flat-cache/package.json create mode 100644 node_modules/flat-cache/utils.js create mode 100644 node_modules/fs.realpath/LICENSE create mode 100644 node_modules/fs.realpath/README.md create mode 100644 node_modules/fs.realpath/index.js create mode 100644 node_modules/fs.realpath/old.js create mode 100644 node_modules/fs.realpath/package.json create mode 100644 node_modules/functional-red-black-tree/.npmignore create mode 100644 node_modules/functional-red-black-tree/LICENSE create mode 100644 node_modules/functional-red-black-tree/README.md create mode 100644 node_modules/functional-red-black-tree/bench/test.js create mode 100644 node_modules/functional-red-black-tree/package.json create mode 100644 node_modules/functional-red-black-tree/rbtree.js create mode 100644 node_modules/functional-red-black-tree/test/test.js create mode 100644 node_modules/glob/LICENSE create mode 100644 node_modules/glob/README.md create mode 100644 node_modules/glob/changelog.md create mode 100644 node_modules/glob/common.js create mode 100644 node_modules/glob/glob.js create mode 100644 node_modules/glob/package.json create mode 100644 node_modules/glob/sync.js create mode 100644 node_modules/globals/globals.json create mode 100644 node_modules/globals/index.js create mode 100644 node_modules/globals/license create mode 100644 node_modules/globals/package.json create mode 100644 node_modules/globals/readme.md create mode 100644 node_modules/globby/index.js create mode 100644 node_modules/globby/license create mode 100644 node_modules/globby/package.json create mode 100644 node_modules/globby/readme.md create mode 100644 node_modules/has-flag/index.js create mode 100644 node_modules/has-flag/license create mode 100644 node_modules/has-flag/package.json create mode 100644 node_modules/has-flag/readme.md create mode 100644 node_modules/iconv-lite/.npmignore create mode 100644 node_modules/iconv-lite/.travis.yml create mode 100644 node_modules/iconv-lite/Changelog.md create mode 100644 node_modules/iconv-lite/LICENSE create mode 100644 node_modules/iconv-lite/README.md create mode 100644 node_modules/iconv-lite/encodings/dbcs-codec.js create mode 100644 node_modules/iconv-lite/encodings/dbcs-data.js create mode 100644 node_modules/iconv-lite/encodings/index.js create mode 100644 node_modules/iconv-lite/encodings/internal.js create mode 100644 node_modules/iconv-lite/encodings/sbcs-codec.js create mode 100644 node_modules/iconv-lite/encodings/sbcs-data-generated.js create mode 100644 node_modules/iconv-lite/encodings/sbcs-data.js create mode 100644 node_modules/iconv-lite/encodings/tables/big5-added.json create mode 100644 node_modules/iconv-lite/encodings/tables/cp936.json create mode 100644 node_modules/iconv-lite/encodings/tables/cp949.json create mode 100644 node_modules/iconv-lite/encodings/tables/cp950.json create mode 100644 node_modules/iconv-lite/encodings/tables/eucjp.json create mode 100644 node_modules/iconv-lite/encodings/tables/gb18030-ranges.json create mode 100644 node_modules/iconv-lite/encodings/tables/gbk-added.json create mode 100644 node_modules/iconv-lite/encodings/tables/shiftjis.json create mode 100644 node_modules/iconv-lite/encodings/utf16.js create mode 100644 node_modules/iconv-lite/encodings/utf7.js create mode 100644 node_modules/iconv-lite/lib/bom-handling.js create mode 100644 node_modules/iconv-lite/lib/extend-node.js create mode 100644 node_modules/iconv-lite/lib/index.d.ts create mode 100644 node_modules/iconv-lite/lib/index.js create mode 100644 node_modules/iconv-lite/lib/streams.js create mode 100644 node_modules/iconv-lite/package.json create mode 100644 node_modules/ignore/README.md create mode 100644 node_modules/ignore/ignore.js create mode 100644 node_modules/ignore/index.d.ts create mode 100644 node_modules/ignore/package.json create mode 100644 node_modules/imurmurhash/README.md create mode 100644 node_modules/imurmurhash/imurmurhash.js create mode 100644 node_modules/imurmurhash/imurmurhash.min.js create mode 100644 node_modules/imurmurhash/package.json create mode 100644 node_modules/inflight/LICENSE create mode 100644 node_modules/inflight/README.md create mode 100644 node_modules/inflight/inflight.js create mode 100644 node_modules/inflight/package.json create mode 100644 node_modules/inquirer/README.md create mode 100644 node_modules/inquirer/lib/inquirer.js create mode 100644 node_modules/inquirer/lib/objects/choice.js create mode 100644 node_modules/inquirer/lib/objects/choices.js create mode 100644 node_modules/inquirer/lib/objects/separator.js create mode 100644 node_modules/inquirer/lib/prompts/base.js create mode 100644 node_modules/inquirer/lib/prompts/checkbox.js create mode 100644 node_modules/inquirer/lib/prompts/confirm.js create mode 100644 node_modules/inquirer/lib/prompts/editor.js create mode 100644 node_modules/inquirer/lib/prompts/expand.js create mode 100644 node_modules/inquirer/lib/prompts/input.js create mode 100644 node_modules/inquirer/lib/prompts/list.js create mode 100644 node_modules/inquirer/lib/prompts/password.js create mode 100644 node_modules/inquirer/lib/prompts/rawlist.js create mode 100644 node_modules/inquirer/lib/ui/baseUI.js create mode 100644 node_modules/inquirer/lib/ui/bottom-bar.js create mode 100644 node_modules/inquirer/lib/ui/prompt.js create mode 100644 node_modules/inquirer/lib/utils/events.js create mode 100644 node_modules/inquirer/lib/utils/paginator.js create mode 100644 node_modules/inquirer/lib/utils/readline.js create mode 100644 node_modules/inquirer/lib/utils/screen-manager.js create mode 100644 node_modules/inquirer/lib/utils/utils.js create mode 100644 node_modules/inquirer/node_modules/ansi-regex/index.js create mode 100644 node_modules/inquirer/node_modules/ansi-regex/license create mode 100644 node_modules/inquirer/node_modules/ansi-regex/package.json create mode 100644 node_modules/inquirer/node_modules/ansi-regex/readme.md create mode 100644 node_modules/inquirer/node_modules/ansi-styles/index.js create mode 100644 node_modules/inquirer/node_modules/ansi-styles/license create mode 100644 node_modules/inquirer/node_modules/ansi-styles/package.json create mode 100644 node_modules/inquirer/node_modules/ansi-styles/readme.md create mode 100644 node_modules/inquirer/node_modules/chalk/index.js create mode 100644 node_modules/inquirer/node_modules/chalk/license create mode 100644 node_modules/inquirer/node_modules/chalk/package.json create mode 100644 node_modules/inquirer/node_modules/chalk/readme.md create mode 100644 node_modules/inquirer/node_modules/chalk/templates.js create mode 100644 node_modules/inquirer/node_modules/chalk/types/index.d.ts create mode 100644 node_modules/inquirer/node_modules/cli-cursor/index.js create mode 100644 node_modules/inquirer/node_modules/cli-cursor/license create mode 100644 node_modules/inquirer/node_modules/cli-cursor/package.json create mode 100644 node_modules/inquirer/node_modules/cli-cursor/readme.md create mode 100644 node_modules/inquirer/node_modules/is-fullwidth-code-point/index.js create mode 100644 node_modules/inquirer/node_modules/is-fullwidth-code-point/license create mode 100644 node_modules/inquirer/node_modules/is-fullwidth-code-point/package.json create mode 100644 node_modules/inquirer/node_modules/is-fullwidth-code-point/readme.md create mode 100644 node_modules/inquirer/node_modules/onetime/index.js create mode 100644 node_modules/inquirer/node_modules/onetime/license create mode 100644 node_modules/inquirer/node_modules/onetime/package.json create mode 100644 node_modules/inquirer/node_modules/onetime/readme.md create mode 100644 node_modules/inquirer/node_modules/restore-cursor/index.js create mode 100644 node_modules/inquirer/node_modules/restore-cursor/license create mode 100644 node_modules/inquirer/node_modules/restore-cursor/package.json create mode 100644 node_modules/inquirer/node_modules/restore-cursor/readme.md create mode 100644 node_modules/inquirer/node_modules/string-width/index.js create mode 100644 node_modules/inquirer/node_modules/string-width/license create mode 100644 node_modules/inquirer/node_modules/string-width/package.json create mode 100644 node_modules/inquirer/node_modules/string-width/readme.md create mode 100644 node_modules/inquirer/node_modules/strip-ansi/index.js create mode 100644 node_modules/inquirer/node_modules/strip-ansi/license create mode 100644 node_modules/inquirer/node_modules/strip-ansi/package.json create mode 100644 node_modules/inquirer/node_modules/strip-ansi/readme.md create mode 100644 node_modules/inquirer/node_modules/supports-color/browser.js create mode 100644 node_modules/inquirer/node_modules/supports-color/index.js create mode 100644 node_modules/inquirer/node_modules/supports-color/license create mode 100644 node_modules/inquirer/node_modules/supports-color/package.json create mode 100644 node_modules/inquirer/node_modules/supports-color/readme.md create mode 100644 node_modules/inquirer/package.json create mode 100644 node_modules/is-path-cwd/index.js create mode 100644 node_modules/is-path-cwd/package.json create mode 100644 node_modules/is-path-cwd/readme.md create mode 100644 node_modules/is-path-in-cwd/index.js create mode 100644 node_modules/is-path-in-cwd/package.json create mode 100644 node_modules/is-path-in-cwd/readme.md create mode 100644 node_modules/is-path-inside/index.js create mode 100644 node_modules/is-path-inside/license create mode 100644 node_modules/is-path-inside/package.json create mode 100644 node_modules/is-path-inside/readme.md create mode 100644 node_modules/is-promise/.npmignore create mode 100644 node_modules/is-promise/.travis.yml create mode 100644 node_modules/is-promise/LICENSE create mode 100644 node_modules/is-promise/index.js create mode 100644 node_modules/is-promise/package.json create mode 100644 node_modules/is-promise/readme.md create mode 100644 node_modules/is-resolvable/LICENSE create mode 100644 node_modules/is-resolvable/README.md create mode 100644 node_modules/is-resolvable/index.js create mode 100644 node_modules/is-resolvable/package.json create mode 100644 node_modules/isexe/.npmignore create mode 100644 node_modules/isexe/LICENSE create mode 100644 node_modules/isexe/README.md create mode 100644 node_modules/isexe/index.js create mode 100644 node_modules/isexe/mode.js create mode 100644 node_modules/isexe/package.json create mode 100644 node_modules/isexe/test/basic.js create mode 100644 node_modules/isexe/windows.js create mode 100644 node_modules/js-tokens/CHANGELOG.md create mode 100644 node_modules/js-tokens/LICENSE create mode 100644 node_modules/js-tokens/README.md create mode 100644 node_modules/js-tokens/index.js create mode 100644 node_modules/js-tokens/package.json create mode 100644 node_modules/js-yaml/CHANGELOG.md create mode 100644 node_modules/js-yaml/LICENSE create mode 100644 node_modules/js-yaml/README.md create mode 100644 node_modules/js-yaml/bin/js-yaml.js create mode 100644 node_modules/js-yaml/dist/js-yaml.js create mode 100644 node_modules/js-yaml/dist/js-yaml.min.js create mode 100644 node_modules/js-yaml/index.js create mode 100644 node_modules/js-yaml/lib/js-yaml.js create mode 100644 node_modules/js-yaml/lib/js-yaml/common.js create mode 100644 node_modules/js-yaml/lib/js-yaml/dumper.js create mode 100644 node_modules/js-yaml/lib/js-yaml/exception.js create mode 100644 node_modules/js-yaml/lib/js-yaml/loader.js create mode 100644 node_modules/js-yaml/lib/js-yaml/mark.js create mode 100644 node_modules/js-yaml/lib/js-yaml/schema.js create mode 100644 node_modules/js-yaml/lib/js-yaml/schema/core.js create mode 100644 node_modules/js-yaml/lib/js-yaml/schema/default_full.js create mode 100644 node_modules/js-yaml/lib/js-yaml/schema/default_safe.js create mode 100644 node_modules/js-yaml/lib/js-yaml/schema/failsafe.js create mode 100644 node_modules/js-yaml/lib/js-yaml/schema/json.js create mode 100644 node_modules/js-yaml/lib/js-yaml/type.js create mode 100644 node_modules/js-yaml/lib/js-yaml/type/binary.js create mode 100644 node_modules/js-yaml/lib/js-yaml/type/bool.js create mode 100644 node_modules/js-yaml/lib/js-yaml/type/float.js create mode 100644 node_modules/js-yaml/lib/js-yaml/type/int.js create mode 100644 node_modules/js-yaml/lib/js-yaml/type/js/function.js create mode 100644 node_modules/js-yaml/lib/js-yaml/type/js/regexp.js create mode 100644 node_modules/js-yaml/lib/js-yaml/type/js/undefined.js create mode 100644 node_modules/js-yaml/lib/js-yaml/type/map.js create mode 100644 node_modules/js-yaml/lib/js-yaml/type/merge.js create mode 100644 node_modules/js-yaml/lib/js-yaml/type/null.js create mode 100644 node_modules/js-yaml/lib/js-yaml/type/omap.js create mode 100644 node_modules/js-yaml/lib/js-yaml/type/pairs.js create mode 100644 node_modules/js-yaml/lib/js-yaml/type/seq.js create mode 100644 node_modules/js-yaml/lib/js-yaml/type/set.js create mode 100644 node_modules/js-yaml/lib/js-yaml/type/str.js create mode 100644 node_modules/js-yaml/lib/js-yaml/type/timestamp.js create mode 100644 node_modules/js-yaml/package.json create mode 100644 node_modules/json-schema-traverse/.eslintrc.yml create mode 100644 node_modules/json-schema-traverse/.npmignore create mode 100644 node_modules/json-schema-traverse/.travis.yml create mode 100644 node_modules/json-schema-traverse/LICENSE create mode 100644 node_modules/json-schema-traverse/README.md create mode 100644 node_modules/json-schema-traverse/index.js create mode 100644 node_modules/json-schema-traverse/package.json create mode 100644 node_modules/json-schema-traverse/spec/.eslintrc.yml create mode 100644 node_modules/json-schema-traverse/spec/fixtures/schema.js create mode 100644 node_modules/json-schema-traverse/spec/index.spec.js create mode 100644 node_modules/json-stable-stringify-without-jsonify/.npmignore create mode 100644 node_modules/json-stable-stringify-without-jsonify/.travis.yml create mode 100644 node_modules/json-stable-stringify-without-jsonify/LICENSE create mode 100644 node_modules/json-stable-stringify-without-jsonify/example/key_cmp.js create mode 100644 node_modules/json-stable-stringify-without-jsonify/example/nested.js create mode 100644 node_modules/json-stable-stringify-without-jsonify/example/str.js create mode 100644 node_modules/json-stable-stringify-without-jsonify/example/value_cmp.js create mode 100644 node_modules/json-stable-stringify-without-jsonify/index.js create mode 100644 node_modules/json-stable-stringify-without-jsonify/package.json create mode 100644 node_modules/json-stable-stringify-without-jsonify/readme.markdown create mode 100644 node_modules/json-stable-stringify-without-jsonify/test/cmp.js create mode 100644 node_modules/json-stable-stringify-without-jsonify/test/nested.js create mode 100644 node_modules/json-stable-stringify-without-jsonify/test/replacer.js create mode 100644 node_modules/json-stable-stringify-without-jsonify/test/space.js create mode 100644 node_modules/json-stable-stringify-without-jsonify/test/str.js create mode 100644 node_modules/json-stable-stringify-without-jsonify/test/to-json.js create mode 100644 node_modules/levn/LICENSE create mode 100644 node_modules/levn/README.md create mode 100644 node_modules/levn/lib/cast.js create mode 100644 node_modules/levn/lib/coerce.js create mode 100644 node_modules/levn/lib/index.js create mode 100644 node_modules/levn/lib/parse-string.js create mode 100644 node_modules/levn/lib/parse.js create mode 100644 node_modules/levn/package.json create mode 100644 node_modules/lru-cache/LICENSE create mode 100644 node_modules/lru-cache/README.md create mode 100644 node_modules/lru-cache/index.js create mode 100644 node_modules/lru-cache/package.json create mode 100644 node_modules/mimic-fn/index.js create mode 100644 node_modules/mimic-fn/license create mode 100644 node_modules/mimic-fn/package.json create mode 100644 node_modules/mimic-fn/readme.md create mode 100644 node_modules/mute-stream/.nyc_output/33508.json create mode 100644 node_modules/mute-stream/.nyc_output/33510.json create mode 100644 node_modules/mute-stream/.travis.yml create mode 100644 node_modules/mute-stream/LICENSE create mode 100644 node_modules/mute-stream/README.md create mode 100644 node_modules/mute-stream/coverage/lcov-report/__root__/index.html create mode 100644 node_modules/mute-stream/coverage/lcov-report/__root__/mute.js.html create mode 100644 node_modules/mute-stream/coverage/lcov-report/base.css create mode 100644 node_modules/mute-stream/coverage/lcov-report/index.html create mode 100644 node_modules/mute-stream/coverage/lcov-report/prettify.css create mode 100644 node_modules/mute-stream/coverage/lcov-report/prettify.js create mode 100644 node_modules/mute-stream/coverage/lcov-report/sort-arrow-sprite.png create mode 100644 node_modules/mute-stream/coverage/lcov-report/sorter.js create mode 100644 node_modules/mute-stream/coverage/lcov.info create mode 100644 node_modules/mute-stream/mute.js create mode 100644 node_modules/mute-stream/package.json create mode 100644 node_modules/mute-stream/test/basic.js create mode 100644 node_modules/natural-compare/README.md create mode 100644 node_modules/natural-compare/index.js create mode 100644 node_modules/natural-compare/package.json create mode 100644 node_modules/officejs.dialogs/.gitattributes create mode 100644 node_modules/officejs.dialogs/.npmignore create mode 100644 node_modules/officejs.dialogs/README.md create mode 100644 node_modules/officejs.dialogs/_config.yml create mode 100644 node_modules/officejs.dialogs/dialogs.html create mode 100644 node_modules/officejs.dialogs/dialogs.js create mode 100644 node_modules/officejs.dialogs/package.json create mode 100644 node_modules/once/LICENSE create mode 100644 node_modules/once/README.md create mode 100644 node_modules/once/once.js create mode 100644 node_modules/once/package.json create mode 100644 node_modules/optionator/CHANGELOG.md create mode 100644 node_modules/optionator/LICENSE create mode 100644 node_modules/optionator/README.md create mode 100644 node_modules/optionator/lib/help.js create mode 100644 node_modules/optionator/lib/index.js create mode 100644 node_modules/optionator/lib/util.js create mode 100644 node_modules/optionator/package.json create mode 100644 node_modules/os-tmpdir/index.js create mode 100644 node_modules/os-tmpdir/license create mode 100644 node_modules/os-tmpdir/package.json create mode 100644 node_modules/os-tmpdir/readme.md create mode 100644 node_modules/path-is-inside/LICENSE.txt create mode 100644 node_modules/path-is-inside/lib/path-is-inside.js create mode 100644 node_modules/path-is-inside/package.json create mode 100644 node_modules/pluralize/LICENSE create mode 100644 node_modules/pluralize/Readme.md create mode 100644 node_modules/pluralize/package.json create mode 100644 node_modules/pluralize/pluralize.js create mode 100644 node_modules/prelude-ls/CHANGELOG.md create mode 100644 node_modules/prelude-ls/LICENSE create mode 100644 node_modules/prelude-ls/README.md create mode 100644 node_modules/prelude-ls/lib/Func.js create mode 100644 node_modules/prelude-ls/lib/List.js create mode 100644 node_modules/prelude-ls/lib/Num.js create mode 100644 node_modules/prelude-ls/lib/Obj.js create mode 100644 node_modules/prelude-ls/lib/Str.js create mode 100644 node_modules/prelude-ls/lib/index.js create mode 100644 node_modules/prelude-ls/package.json create mode 100644 node_modules/progress/.npmignore create mode 100644 node_modules/progress/CHANGELOG.md create mode 100644 node_modules/progress/LICENSE create mode 100644 node_modules/progress/Makefile create mode 100644 node_modules/progress/README.md create mode 100644 node_modules/progress/index.js create mode 100644 node_modules/progress/lib/node-progress.js create mode 100644 node_modules/progress/package.json create mode 100644 node_modules/pseudomap/LICENSE create mode 100644 node_modules/pseudomap/README.md create mode 100644 node_modules/pseudomap/map.js create mode 100644 node_modules/pseudomap/package.json create mode 100644 node_modules/pseudomap/pseudomap.js create mode 100644 node_modules/pseudomap/test/basic.js create mode 100644 node_modules/require-uncached/index.js create mode 100644 node_modules/require-uncached/license create mode 100644 node_modules/require-uncached/package.json create mode 100644 node_modules/require-uncached/readme.md create mode 100644 node_modules/resolve-from/index.js create mode 100644 node_modules/resolve-from/license create mode 100644 node_modules/resolve-from/package.json create mode 100644 node_modules/resolve-from/readme.md create mode 100644 node_modules/rimraf/LICENSE create mode 100644 node_modules/rimraf/README.md create mode 100644 node_modules/rimraf/bin.js create mode 100644 node_modules/rimraf/package.json create mode 100644 node_modules/rimraf/rimraf.js create mode 100644 node_modules/run-async/LICENSE create mode 100644 node_modules/run-async/README.md create mode 100644 node_modules/run-async/index.js create mode 100644 node_modules/run-async/package.json create mode 100644 node_modules/rx-lite-aggregates/package.json create mode 100644 node_modules/rx-lite-aggregates/readme.md create mode 100644 node_modules/rx-lite-aggregates/rx.lite.aggregates.js create mode 100644 node_modules/rx-lite-aggregates/rx.lite.aggregates.map create mode 100644 node_modules/rx-lite-aggregates/rx.lite.aggregates.min.js create mode 100644 node_modules/rx-lite/package.json create mode 100644 node_modules/rx-lite/readme.md create mode 100644 node_modules/rx-lite/rx.lite.js create mode 100644 node_modules/rx-lite/rx.lite.map create mode 100644 node_modules/rx-lite/rx.lite.min.js create mode 100644 node_modules/shebang-command/index.js create mode 100644 node_modules/shebang-command/license create mode 100644 node_modules/shebang-command/package.json create mode 100644 node_modules/shebang-command/readme.md create mode 100644 node_modules/shebang-regex/index.js create mode 100644 node_modules/shebang-regex/license create mode 100644 node_modules/shebang-regex/package.json create mode 100644 node_modules/shebang-regex/readme.md create mode 100644 node_modules/signal-exit/CHANGELOG.md create mode 100644 node_modules/signal-exit/LICENSE.txt create mode 100644 node_modules/signal-exit/README.md create mode 100644 node_modules/signal-exit/index.js create mode 100644 node_modules/signal-exit/package.json create mode 100644 node_modules/signal-exit/signals.js create mode 100644 node_modules/slice-ansi/index.js create mode 100644 node_modules/slice-ansi/license create mode 100644 node_modules/slice-ansi/node_modules/is-fullwidth-code-point/index.js create mode 100644 node_modules/slice-ansi/node_modules/is-fullwidth-code-point/license create mode 100644 node_modules/slice-ansi/node_modules/is-fullwidth-code-point/package.json create mode 100644 node_modules/slice-ansi/node_modules/is-fullwidth-code-point/readme.md create mode 100644 node_modules/slice-ansi/package.json create mode 100644 node_modules/slice-ansi/readme.md create mode 100644 node_modules/sprintf-js/.npmignore create mode 100644 node_modules/sprintf-js/LICENSE create mode 100644 node_modules/sprintf-js/README.md create mode 100644 node_modules/sprintf-js/bower.json create mode 100644 node_modules/sprintf-js/demo/angular.html create mode 100644 node_modules/sprintf-js/dist/angular-sprintf.min.js create mode 100644 node_modules/sprintf-js/dist/angular-sprintf.min.js.map create mode 100644 node_modules/sprintf-js/dist/angular-sprintf.min.map create mode 100644 node_modules/sprintf-js/dist/sprintf.min.js create mode 100644 node_modules/sprintf-js/dist/sprintf.min.js.map create mode 100644 node_modules/sprintf-js/dist/sprintf.min.map create mode 100644 node_modules/sprintf-js/gruntfile.js create mode 100644 node_modules/sprintf-js/package.json create mode 100644 node_modules/sprintf-js/src/angular-sprintf.js create mode 100644 node_modules/sprintf-js/src/sprintf.js create mode 100644 node_modules/sprintf-js/test/test.js create mode 100644 node_modules/strip-json-comments/index.js create mode 100644 node_modules/strip-json-comments/license create mode 100644 node_modules/strip-json-comments/package.json create mode 100644 node_modules/strip-json-comments/readme.md create mode 100644 node_modules/table/LICENSE create mode 100644 node_modules/table/README.md create mode 100644 node_modules/table/dist/alignString.js create mode 100644 node_modules/table/dist/alignTableData.js create mode 100644 node_modules/table/dist/calculateCellHeight.js create mode 100644 node_modules/table/dist/calculateCellWidthIndex.js create mode 100644 node_modules/table/dist/calculateMaximumColumnWidthIndex.js create mode 100644 node_modules/table/dist/calculateRowHeightIndex.js create mode 100644 node_modules/table/dist/createStream.js create mode 100644 node_modules/table/dist/drawBorder.js create mode 100644 node_modules/table/dist/drawRow.js create mode 100644 node_modules/table/dist/drawTable.js create mode 100644 node_modules/table/dist/getBorderCharacters.js create mode 100644 node_modules/table/dist/index.js create mode 100644 node_modules/table/dist/makeConfig.js create mode 100644 node_modules/table/dist/makeStreamConfig.js create mode 100644 node_modules/table/dist/mapDataUsingRowHeightIndex.js create mode 100644 node_modules/table/dist/padTableData.js create mode 100644 node_modules/table/dist/schemas/config.json create mode 100644 node_modules/table/dist/schemas/streamConfig.json create mode 100644 node_modules/table/dist/stringifyTableData.js create mode 100644 node_modules/table/dist/table.js create mode 100644 node_modules/table/dist/truncateTableData.js create mode 100644 node_modules/table/dist/validateConfig.js create mode 100644 node_modules/table/dist/validateStreamConfig.js create mode 100644 node_modules/table/dist/validateTableData.js create mode 100644 node_modules/table/dist/wrapString.js create mode 100644 node_modules/table/dist/wrapWord.js create mode 100644 node_modules/table/node_modules/ajv/.tonic_example.js create mode 100644 node_modules/table/node_modules/ajv/LICENSE create mode 100644 node_modules/table/node_modules/ajv/README.md create mode 100644 node_modules/table/node_modules/ajv/dist/ajv.bundle.js create mode 100644 node_modules/table/node_modules/ajv/dist/ajv.min.js create mode 100644 node_modules/table/node_modules/ajv/dist/ajv.min.js.map create mode 100644 node_modules/table/node_modules/ajv/lib/ajv.d.ts create mode 100644 node_modules/table/node_modules/ajv/lib/ajv.js create mode 100644 node_modules/table/node_modules/ajv/lib/cache.js create mode 100644 node_modules/table/node_modules/ajv/lib/compile/async.js create mode 100644 node_modules/table/node_modules/ajv/lib/compile/equal.js create mode 100644 node_modules/table/node_modules/ajv/lib/compile/error_classes.js create mode 100644 node_modules/table/node_modules/ajv/lib/compile/formats.js create mode 100644 node_modules/table/node_modules/ajv/lib/compile/index.js create mode 100644 node_modules/table/node_modules/ajv/lib/compile/resolve.js create mode 100644 node_modules/table/node_modules/ajv/lib/compile/rules.js create mode 100644 node_modules/table/node_modules/ajv/lib/compile/schema_obj.js create mode 100644 node_modules/table/node_modules/ajv/lib/compile/ucs2length.js create mode 100644 node_modules/table/node_modules/ajv/lib/compile/util.js create mode 100644 node_modules/table/node_modules/ajv/lib/data.js create mode 100644 node_modules/table/node_modules/ajv/lib/dot/_limit.jst create mode 100644 node_modules/table/node_modules/ajv/lib/dot/_limitItems.jst create mode 100644 node_modules/table/node_modules/ajv/lib/dot/_limitLength.jst create mode 100644 node_modules/table/node_modules/ajv/lib/dot/_limitProperties.jst create mode 100644 node_modules/table/node_modules/ajv/lib/dot/allOf.jst create mode 100644 node_modules/table/node_modules/ajv/lib/dot/anyOf.jst create mode 100644 node_modules/table/node_modules/ajv/lib/dot/coerce.def create mode 100644 node_modules/table/node_modules/ajv/lib/dot/comment.jst create mode 100644 node_modules/table/node_modules/ajv/lib/dot/const.jst create mode 100644 node_modules/table/node_modules/ajv/lib/dot/contains.jst create mode 100644 node_modules/table/node_modules/ajv/lib/dot/custom.jst create mode 100644 node_modules/table/node_modules/ajv/lib/dot/defaults.def create mode 100644 node_modules/table/node_modules/ajv/lib/dot/definitions.def create mode 100644 node_modules/table/node_modules/ajv/lib/dot/dependencies.jst create mode 100644 node_modules/table/node_modules/ajv/lib/dot/enum.jst create mode 100644 node_modules/table/node_modules/ajv/lib/dot/errors.def create mode 100644 node_modules/table/node_modules/ajv/lib/dot/format.jst create mode 100644 node_modules/table/node_modules/ajv/lib/dot/if.jst create mode 100644 node_modules/table/node_modules/ajv/lib/dot/items.jst create mode 100644 node_modules/table/node_modules/ajv/lib/dot/missing.def create mode 100644 node_modules/table/node_modules/ajv/lib/dot/multipleOf.jst create mode 100644 node_modules/table/node_modules/ajv/lib/dot/not.jst create mode 100644 node_modules/table/node_modules/ajv/lib/dot/oneOf.jst create mode 100644 node_modules/table/node_modules/ajv/lib/dot/pattern.jst create mode 100644 node_modules/table/node_modules/ajv/lib/dot/properties.jst create mode 100644 node_modules/table/node_modules/ajv/lib/dot/propertyNames.jst create mode 100644 node_modules/table/node_modules/ajv/lib/dot/ref.jst create mode 100644 node_modules/table/node_modules/ajv/lib/dot/required.jst create mode 100644 node_modules/table/node_modules/ajv/lib/dot/uniqueItems.jst create mode 100644 node_modules/table/node_modules/ajv/lib/dot/validate.jst create mode 100644 node_modules/table/node_modules/ajv/lib/dotjs/README.md create mode 100644 node_modules/table/node_modules/ajv/lib/dotjs/_limit.js create mode 100644 node_modules/table/node_modules/ajv/lib/dotjs/_limitItems.js create mode 100644 node_modules/table/node_modules/ajv/lib/dotjs/_limitLength.js create mode 100644 node_modules/table/node_modules/ajv/lib/dotjs/_limitProperties.js create mode 100644 node_modules/table/node_modules/ajv/lib/dotjs/allOf.js create mode 100644 node_modules/table/node_modules/ajv/lib/dotjs/anyOf.js create mode 100644 node_modules/table/node_modules/ajv/lib/dotjs/comment.js create mode 100644 node_modules/table/node_modules/ajv/lib/dotjs/const.js create mode 100644 node_modules/table/node_modules/ajv/lib/dotjs/contains.js create mode 100644 node_modules/table/node_modules/ajv/lib/dotjs/custom.js create mode 100644 node_modules/table/node_modules/ajv/lib/dotjs/dependencies.js create mode 100644 node_modules/table/node_modules/ajv/lib/dotjs/enum.js create mode 100644 node_modules/table/node_modules/ajv/lib/dotjs/format.js create mode 100644 node_modules/table/node_modules/ajv/lib/dotjs/if.js create mode 100644 node_modules/table/node_modules/ajv/lib/dotjs/index.js create mode 100644 node_modules/table/node_modules/ajv/lib/dotjs/items.js create mode 100644 node_modules/table/node_modules/ajv/lib/dotjs/multipleOf.js create mode 100644 node_modules/table/node_modules/ajv/lib/dotjs/not.js create mode 100644 node_modules/table/node_modules/ajv/lib/dotjs/oneOf.js create mode 100644 node_modules/table/node_modules/ajv/lib/dotjs/pattern.js create mode 100644 node_modules/table/node_modules/ajv/lib/dotjs/properties.js create mode 100644 node_modules/table/node_modules/ajv/lib/dotjs/propertyNames.js create mode 100644 node_modules/table/node_modules/ajv/lib/dotjs/ref.js create mode 100644 node_modules/table/node_modules/ajv/lib/dotjs/required.js create mode 100644 node_modules/table/node_modules/ajv/lib/dotjs/uniqueItems.js create mode 100644 node_modules/table/node_modules/ajv/lib/dotjs/validate.js create mode 100644 node_modules/table/node_modules/ajv/lib/keyword.js create mode 100644 node_modules/table/node_modules/ajv/lib/refs/data.json create mode 100644 node_modules/table/node_modules/ajv/lib/refs/json-schema-draft-04.json create mode 100644 node_modules/table/node_modules/ajv/lib/refs/json-schema-draft-06.json create mode 100644 node_modules/table/node_modules/ajv/lib/refs/json-schema-draft-07.json create mode 100644 node_modules/table/node_modules/ajv/package.json create mode 100644 node_modules/table/node_modules/ajv/scripts/.eslintrc.yml create mode 100644 node_modules/table/node_modules/ajv/scripts/bundle.js create mode 100644 node_modules/table/node_modules/ajv/scripts/compile-dots.js create mode 100644 node_modules/table/node_modules/ajv/scripts/info create mode 100644 node_modules/table/node_modules/ajv/scripts/prepare-tests create mode 100644 node_modules/table/node_modules/ajv/scripts/publish-built-version create mode 100644 node_modules/table/node_modules/ajv/scripts/travis-gh-pages create mode 100644 node_modules/table/node_modules/ansi-regex/index.js create mode 100644 node_modules/table/node_modules/ansi-regex/license create mode 100644 node_modules/table/node_modules/ansi-regex/package.json create mode 100644 node_modules/table/node_modules/ansi-regex/readme.md create mode 100644 node_modules/table/node_modules/ansi-styles/index.js create mode 100644 node_modules/table/node_modules/ansi-styles/license create mode 100644 node_modules/table/node_modules/ansi-styles/package.json create mode 100644 node_modules/table/node_modules/ansi-styles/readme.md create mode 100644 node_modules/table/node_modules/chalk/index.js create mode 100644 node_modules/table/node_modules/chalk/license create mode 100644 node_modules/table/node_modules/chalk/package.json create mode 100644 node_modules/table/node_modules/chalk/readme.md create mode 100644 node_modules/table/node_modules/chalk/templates.js create mode 100644 node_modules/table/node_modules/chalk/types/index.d.ts create mode 100644 node_modules/table/node_modules/is-fullwidth-code-point/index.js create mode 100644 node_modules/table/node_modules/is-fullwidth-code-point/license create mode 100644 node_modules/table/node_modules/is-fullwidth-code-point/package.json create mode 100644 node_modules/table/node_modules/is-fullwidth-code-point/readme.md create mode 100644 node_modules/table/node_modules/string-width/index.js create mode 100644 node_modules/table/node_modules/string-width/license create mode 100644 node_modules/table/node_modules/string-width/package.json create mode 100644 node_modules/table/node_modules/string-width/readme.md create mode 100644 node_modules/table/node_modules/strip-ansi/index.js create mode 100644 node_modules/table/node_modules/strip-ansi/license create mode 100644 node_modules/table/node_modules/strip-ansi/package.json create mode 100644 node_modules/table/node_modules/strip-ansi/readme.md create mode 100644 node_modules/table/node_modules/supports-color/browser.js create mode 100644 node_modules/table/node_modules/supports-color/index.js create mode 100644 node_modules/table/node_modules/supports-color/license create mode 100644 node_modules/table/node_modules/supports-color/package.json create mode 100644 node_modules/table/node_modules/supports-color/readme.md create mode 100644 node_modules/table/package.json create mode 100644 node_modules/text-table/.travis.yml create mode 100644 node_modules/text-table/LICENSE create mode 100644 node_modules/text-table/example/align.js create mode 100644 node_modules/text-table/example/center.js create mode 100644 node_modules/text-table/example/dotalign.js create mode 100644 node_modules/text-table/example/doubledot.js create mode 100644 node_modules/text-table/example/table.js create mode 100644 node_modules/text-table/index.js create mode 100644 node_modules/text-table/package.json create mode 100644 node_modules/text-table/readme.markdown create mode 100644 node_modules/text-table/test/align.js create mode 100644 node_modules/text-table/test/ansi-colors.js create mode 100644 node_modules/text-table/test/center.js create mode 100644 node_modules/text-table/test/dotalign.js create mode 100644 node_modules/text-table/test/doubledot.js create mode 100644 node_modules/text-table/test/table.js create mode 100644 node_modules/through/.travis.yml create mode 100644 node_modules/through/LICENSE.APACHE2 create mode 100644 node_modules/through/LICENSE.MIT create mode 100644 node_modules/through/index.js create mode 100644 node_modules/through/package.json create mode 100644 node_modules/through/readme.markdown create mode 100644 node_modules/through/test/async.js create mode 100644 node_modules/through/test/auto-destroy.js create mode 100644 node_modules/through/test/buffering.js create mode 100644 node_modules/through/test/end.js create mode 100644 node_modules/through/test/index.js create mode 100644 node_modules/tmp/LICENSE create mode 100644 node_modules/tmp/README.md create mode 100644 node_modules/tmp/lib/tmp.js create mode 100644 node_modules/tmp/package.json create mode 100644 node_modules/type-check/LICENSE create mode 100644 node_modules/type-check/README.md create mode 100644 node_modules/type-check/lib/check.js create mode 100644 node_modules/type-check/lib/index.js create mode 100644 node_modules/type-check/lib/parse-type.js create mode 100644 node_modules/type-check/package.json create mode 100644 node_modules/typedarray/.travis.yml create mode 100644 node_modules/typedarray/LICENSE create mode 100644 node_modules/typedarray/example/tarray.js create mode 100644 node_modules/typedarray/index.js create mode 100644 node_modules/typedarray/package.json create mode 100644 node_modules/typedarray/readme.markdown create mode 100644 node_modules/typedarray/test/server/undef_globals.js create mode 100644 node_modules/typedarray/test/tarray.js create mode 100644 node_modules/which/CHANGELOG.md create mode 100644 node_modules/which/LICENSE create mode 100644 node_modules/which/README.md create mode 100644 node_modules/which/bin/which create mode 100644 node_modules/which/package.json create mode 100644 node_modules/which/which.js create mode 100644 node_modules/wordwrap/LICENSE create mode 100644 node_modules/wordwrap/README.markdown create mode 100644 node_modules/wordwrap/example/center.js create mode 100644 node_modules/wordwrap/example/meat.js create mode 100644 node_modules/wordwrap/index.js create mode 100644 node_modules/wordwrap/package.json create mode 100644 node_modules/wordwrap/test/break.js create mode 100644 node_modules/wordwrap/test/idleness.txt create mode 100644 node_modules/wordwrap/test/wrap.js create mode 100644 node_modules/wrappy/LICENSE create mode 100644 node_modules/wrappy/README.md create mode 100644 node_modules/wrappy/package.json create mode 100644 node_modules/wrappy/wrappy.js create mode 100644 node_modules/write/LICENSE create mode 100644 node_modules/write/README.md create mode 100644 node_modules/write/index.js create mode 100644 node_modules/write/node_modules/.bin/mkdirp create mode 100644 node_modules/write/node_modules/.bin/mkdirp.cmd create mode 100644 node_modules/write/node_modules/minimist/.travis.yml create mode 100644 node_modules/write/node_modules/minimist/LICENSE create mode 100644 node_modules/write/node_modules/minimist/example/parse.js create mode 100644 node_modules/write/node_modules/minimist/index.js create mode 100644 node_modules/write/node_modules/minimist/package.json create mode 100644 node_modules/write/node_modules/minimist/readme.markdown create mode 100644 node_modules/write/node_modules/minimist/test/dash.js create mode 100644 node_modules/write/node_modules/minimist/test/default_bool.js create mode 100644 node_modules/write/node_modules/minimist/test/dotted.js create mode 100644 node_modules/write/node_modules/minimist/test/long.js create mode 100644 node_modules/write/node_modules/minimist/test/parse.js create mode 100644 node_modules/write/node_modules/minimist/test/parse_modified.js create mode 100644 node_modules/write/node_modules/minimist/test/short.js create mode 100644 node_modules/write/node_modules/minimist/test/whitespace.js create mode 100644 node_modules/write/node_modules/mkdirp/.travis.yml create mode 100644 node_modules/write/node_modules/mkdirp/LICENSE create mode 100644 node_modules/write/node_modules/mkdirp/bin/cmd.js create mode 100644 node_modules/write/node_modules/mkdirp/bin/usage.txt create mode 100644 node_modules/write/node_modules/mkdirp/examples/pow.js create mode 100644 node_modules/write/node_modules/mkdirp/index.js create mode 100644 node_modules/write/node_modules/mkdirp/package.json create mode 100644 node_modules/write/node_modules/mkdirp/readme.markdown create mode 100644 node_modules/write/node_modules/mkdirp/test/chmod.js create mode 100644 node_modules/write/node_modules/mkdirp/test/clobber.js create mode 100644 node_modules/write/node_modules/mkdirp/test/mkdirp.js create mode 100644 node_modules/write/node_modules/mkdirp/test/opts_fs.js create mode 100644 node_modules/write/node_modules/mkdirp/test/opts_fs_sync.js create mode 100644 node_modules/write/node_modules/mkdirp/test/perm.js create mode 100644 node_modules/write/node_modules/mkdirp/test/perm_sync.js create mode 100644 node_modules/write/node_modules/mkdirp/test/race.js create mode 100644 node_modules/write/node_modules/mkdirp/test/rel.js create mode 100644 node_modules/write/node_modules/mkdirp/test/return.js create mode 100644 node_modules/write/node_modules/mkdirp/test/return_sync.js create mode 100644 node_modules/write/node_modules/mkdirp/test/root.js create mode 100644 node_modules/write/node_modules/mkdirp/test/sync.js create mode 100644 node_modules/write/node_modules/mkdirp/test/umask.js create mode 100644 node_modules/write/node_modules/mkdirp/test/umask_sync.js create mode 100644 node_modules/write/package.json create mode 100644 node_modules/yallist/LICENSE create mode 100644 node_modules/yallist/README.md create mode 100644 node_modules/yallist/iterator.js create mode 100644 node_modules/yallist/package.json create mode 100644 node_modules/yallist/yallist.js rename outlook-onSend-manifest.xml => outlook-block-dialog-expand-sample-manifest.xml (67%) diff --git a/.vs/ProjectSettings.json b/.vs/ProjectSettings.json new file mode 100644 index 0000000..f8b4888 --- /dev/null +++ b/.vs/ProjectSettings.json @@ -0,0 +1,3 @@ +{ + "CurrentProjectSetting": null +} \ No newline at end of file diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json new file mode 100644 index 0000000..5cf18b8 --- /dev/null +++ b/.vs/VSWorkspaceState.json @@ -0,0 +1,7 @@ +{ + "ExpandedNodes": [ + "" + ], + "SelectedNode": "\\bsconfig.json", + "PreviewInSolutionExplorer": false +} \ No newline at end of file diff --git a/.vs/outlook-block-dialog-expand-sample/v15/.suo b/.vs/outlook-block-dialog-expand-sample/v15/.suo new file mode 100644 index 0000000000000000000000000000000000000000..793cffbc684745cfb9d1c6f2b54cde030919abb8 GIT binary patch literal 10752 zcmeHM&u<$=6n;)A&;|-2C7=pb5sFY%u(fVNNQ|i3BrQRT)e5H#2oBg@J2iFU$W90q z;>H0EoH-$Z1eYF=D*gg`;2I=uoZv4&s)TxK!uQS2*z3)DyYFvhh1Mf=>zipY6 zOR|Y)U2btJLzf9T+T8P_UB0^d(f#S;zy6sxj&T>XU|j`bO+JA}miE^Z zGSb8++uPszw_Zj!#8(xAPuwl3f`Yn~aOJ>@Jg$-+*Xc1OBMJ9*cN*vJA4TJYR;DYm z1C**%uzp_aF61Tj)ZHKY)QSHD`bThuUH=5e8ofS&`UCd@T=nPloa`daFX%S)o&4i- z49}-qjwh+)IdiCs1=3YLN#BD zSXe*TVtjS$P3Ic@_;vj{2>%+;$(bb;3FUn!OaY&KH^q05r_;Uu99C9UJMFB|;d2=) zUPo_TAvs zi%)vb>bVxNdTKxeJ5m9+cMnma2X=Ts{uORi{x1Qu08X#t$Gu)t94|r(sRP~1WCVQL z3hE$>7k>dXlt9BxMB_DZggO^Q#~JXS`)OiRHEEX{_2q^h{Aduv*7@}I?eH-O4>u-g`Ql0n#?p7H6gR`sI1{P&lCHzn=dn28{N zJS%qEe+P-4*f|MbgeGjkKGOTq6S3D_D1XNGgx!C}3ye2e+$+mM@9BjdOO%5DqbzPJ zJ-7_qyz-LmI|2LzWr;E!7N5AZ*@G&*u76OtW}bfVO?=NM_r%?1opF`vBhRSk)OW@k zrk_vRAa~o;-L%E^$BzTtQ=N)J?a`M(VAGy?OFw6{Rg=wrQz*er<%p#po%_BvW6l|7~Pw$W-ROU-O*NzENZTfh5H zJH$&%@oin|gJNP$= zQP10lCgM4izC-Pw$|SH}xd4VQBy+2objHejQJO1Qv*kC>C1-6bolK|gbIE-EEjwvh zMQf%!KW|OXOn*sBMvUId2YWn?L@!g~&7d@75@$K?NLo_r9yEKu@;{nA_0{eVAKsU* z@14zk^ZRlTmft($r}=ys{-5*4Z{w-ww zPo3pxL&M^?=l{IY|D(+_amxVCe=3&{_57DZJX6%3>NCVN%(~QJx4n7E z6f)E`#5K0c&+ULm+iDBXM>zlT|0i?)R+IF3r_GVH%$3o#(?BOnDxi`-xi;| n`KLJlJ9PQq1oO#J^S^QYKiu(u)80jl|NA{ZH1XrgP;%gZNO`!V literal 0 HcmV?d00001 diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite new file mode 100644 index 0000000000000000000000000000000000000000..2e7ab68720ee5ec4d2897e11008bc5961ecf7f0f GIT binary patch literal 73728 zcmeHQ3v?UVS=Lx@X*3hZNwisSVmWR$aqMw48aCF5qdW8rNBl1ySxEU!~JKj z=UvbB67Vgg`#2vd{nV9+KPpMg8`fHKWf@IXm(l!svxQd5NJ9-&Q@SN_g>o^!P>e0) zPfr(Pm%0>MiiD0vLNWMs%PrPg)z*4RU5b@v7K&$z<=9-gbUt5xICif1a4f&LFk6~| zD$W;Y7Gg8A@PBc7dOT*xn`_jsRaMlm7B`t<<>FMaT%0Ks=VO;lM!mMBqwNGJIjRf8 z3eL{NCX3TWXigzNU&v1u$Bl|6(JHE`a;=5icgxy3AhhdqCgFOGRu~m8&P`$*jf%IS zldV^5Isrts);lYQ_B)eaYJKM9*43rhLh&KJ$6|%q>1o`&nOSIH8`cH6aRs%OVlx-> z<-*x~`Dh}Q8YNxaqd=ivYoY5qDY3A=iaNH1ttS#1-8jVhqYnzq#`$VZMc3!oS1R@8 zNu*V4)mF7$yR2Wg7^5rifwqrJ2d%L$OQSk^!zjjBFG4Qtap@d!B+`_~gLM3?fr&%ggH**5u`?Rz+$z0o}di9Q41%gv}sm zv^cLQsM)Mms>={Zd$T#Ls~v5-g5!)1wXLVbB{rM8(5dviAE zj}`^yi7;^#r}CHQWEi|!moebZypUm@i!-GQi$ws1__CABDxvK$PA2Ta-8^O-MjxVp zvj7gc8v_BWk2_h2&bp5~vx0UXcV=5k?pWi|Cl~$1$6veDnFuIyt%e!}S-Gl%Xt@vA zeVnLb$+q~oGt26w+wgI7*mpM8D&||UXWO8=U4QQRc~0#0pJex_JAY&u)SCOpE=Q8CHYYf!&$K_4agPe;np4TZewL zWV@}~DGZ_Q$#oC$#Md3}cp{mS>nJ!K!E49CnQcMBne`$O={AVn3W{FAurnm#DZVkf zm6}-7rP%3`W%_UAP0P*JY^8}B*AR@49b-4UVzM}uUz}cuDQgWf0JKccFoaLdmW!n` zGi0Fw#@b6S%lg2&q;Mkm(vFeP_jR{FDh@ImL;Ca&wOZBM6-!*7*Hb)3pPTd0O?+(! zH45|^s7B}de9^Hn=3!!L&BtIqfi5@EV{3Tj=eTv-49$^wv<4&XIFuaSILr8>gM-Wy zSBOkQ0pqLBCgYN+U1zmuq}(~vyeKcPfvt6XQ(uk1;&@jm0@NFL$i;tw|84$*f#>0p zekcMI0g3=cfFeKYbd^2u*1pMtFojh4obJ2y}e#4}I?OOkVmteq*5il@`6lCVh1si}&CDV<1( z7136mraGBG;hYNfc67oz+9gQ{De-gy)Jdi#A(_d>1zA#50i{zSisw?9G=k)clu**y zjF8BRijY*&svsw1QIJ%?rJ~6RHK_`zN-7c0;qn-%~T}l zP*oDLQaT|d6B$(ib(2CSna~m_kw~SXH!@mI$w^5`P?K3GkASJ7p{$^#v+<0WR25Z1 zLN=a~GAV#qO^ZpWPD_ELoFsrcl7`X}k^zsbmdhklnTn7S(;z9UKsiat2=T0p#DoS= zXJi3arAi4pyE zTuMmgRA?O-q5xeG7c`VfB9tIKEL7r3GMNDA0T>NSk_B1QNVfo(vKEi0p$`%$4gH`B zX_PS#m!)*h=(~y}i*Y2tS2~%6&O#OF;AB#Q4pISeO%&5PC8cK4q9jyO003BykXA)# zofd~~sl;V4x}*Z1Tq*&5rzCS?A}&Mg5HwNu76m%c=2A*Jkxdf_GBRkNQ_|p408OHT zG|)}WR~?@2<%A#9I{~0f+8kVO-iW<<#K{5DM^%uhJ&{l)nygvcw2R9 zE+HnM6+#aB1*!vaawa7S2`!aPSG0;2&twF(l8sA%2DA>FiV7xH$;wb?CY_aKB`qdE zfU1Jtas|LfpmS1$q)HrA1TWK4sW`-(ln6`+$r1v@J33Xsuk1Q$3OI|H1Dv6fWF@IU zd`hMSF`ZHq6-7&HX;DD&cqN^{V74XYD$vz7NhqE{N>YOORLOt`C#4KH7qml_b4f)+ zX(U5Opfo_4j6)bfi8wHUjpou|CnHGl6i7-dqL9-Nm~S?X zyH|=!&s;VU_ssu5)A|Nf7MHL7G z6)lIO3Ibz=Xap`5k0;`BB`2rTf|iifN~!{`tb)Di_LPa6)fsVI%cv+VLO`kj_Tc6T za0F2TY!eBHx8Oz)SOhJbQk0BH0;^#vIT^sPfvIJ+l%`dn&2fkfP@N{gC<4{lbke|+ zQxHZv-BQVBC7YyuZjb9YPev~o1o1B;h5A~pB_8SXxCE)tKynMIvyH`76<@@qu0Js2+2a9D^5}-; z2{rGYJ~P$wa19$~+=Gnq5P~-Z?eX%jckzG2Kg<6-|9bwbcd~)BE{Xs}fFeKG{$4)BeTDlZ_aVrjABq4)fFeKbU$eQYThxSNcp5cL#m05y-D9AU_+o=LIZzQo^3+x8#Xwd!End zI_wJiR%PW;`3ly!UNh@E<@LE9g}nM&Yq?&3RH!W1l}81&DuaRoy1pvcRG|rHnk*w> zMXpsfIN@aC`pU9de9+@_9dQNhkhC-1I5X(0G@&u@a-FT>J$*jcekdt7o2b<^i}W)- z*8rqWTx%!c^}mN7ckzG1|0FNN1^rM2C;}7#iU37`B0v$K2v7tl0u%v?07c+?90AGW zaV?H)=X?)wLY&CN(^7mwl;F+%#gXkC4Pz|?uk|mEZ09rzYaw{WAJp5%$s(3Q`1yYi zFSz&$FYtfL|J3(*7t`ib1SkR&0g3=cfFeKf6v>S|vq*B0v$K2v7tl0u%v?07ZZzKoOt_Pz3G_0{G}W=P?BAKDX#d#77T= z2i#+fyZIIV5?|sa{>S*&+!?@WEffKY z07ZZzKoOt_Py{Ff6ak6=MSvne5xDIL?DGhWedUZ#9c1tFh|Xkk)?j$AXN++!`TIis zo)N~n=M<+XIgW$^p^;MgNEV$Y1bBeV_Mz%=cE`C11`L@&2W^=Jk2r<9WnW@(jDb;r=W4 zuejglZn@dMzv_FY@6~;m`$m|*WquEo{I2_)E{9yqefKc|rjPL`b$k$H3#kQpdAS0o zNlv0=bVY8Vo*6-wiFpSvfQQF*FmihCTdm*#cVZS~WHP#vsL`l5 zoC0@xt=29D1R zrcS;HCH{Etu@l=>;t#{I+}27wyDyb}5lZ}e|FO(=mH1VEEWNc7AK5*b0*-vXjg=Wm zIz3{d*CPk;{Ke3zBuF`V(&$uMkC-FH%^Tg5S=TRwixLzs6pZ4VB49^E?=05!q3}?G zwAK*g4BD>uMMgwm7#_AUTv{^YI$W`?_eO@|TS|E*a_BfPY!%~N?+y)3Y$@cOks)DA zhIfPyjazDIx4V4-u)k$^Vhni3#`Ml>Uadb~s%iDcij2>wcH9F0o1^2$fPZvU=Wn2u z`ZWZ9*y#!m^7cF6epB?&=&dw(W2H9HZa17YVs0ZwN zcMy@5%OLy6fw3WABYoIr>(z(V(9ppxb^QM1kpsYR_^{pxtduFsdL3k!LI>|5l1!u= z6QWDup}{R{Drcj20|V)M(0jh!_jAGF{g6T2$$+Vd=W)1xauH;wLkI8Ls`3ZI!%>Tf zwu`hcf^1=6c%Ox(ExdgZWb^*9y}+_PWbgM6@3F{h*VMiUvZwmT2DUBlq(8MAn0IQx zS%0A)ijnXQ;DM3%2-3ZCf~@2|vI~UV+6a!j5A(oinrOW?51vuH2BWs+GRTgH_He*9 zFkslqv70xJ-DHo2ha-?`_A@B7X=*skjrt6plMl>)3h>TpoJ^(M#;9U2J( z>+rB{xYb&<1qatxe*kr^g6utkvmszQbH-4_m{^odW)ddLNQOi4+p~_Yne5%+mj^)- z8Q?%ObBb~v;wBucZ>ZRo;Yeoph7SgybkFEE5I*SND!)HG;e&iZu(!jg##!x6mJc8F zZY3`gp7cOI8EK|`y2qam-~yrF-w!SJCz$R%Sfu0tP; z?PIM!d=F!lKuqc84gHJtLI=b8KlqO>F3x!)zZ?2Q=wsYlI63k_1ON?P4{^bNWFKG$ z!k-PjDl{Hu*jKWL!(ZY1*)NCwlKVJY<$fvhW?l^a8~2UK-*fNbZo+=SLy-)3D)J~- z=cXc`jErz!;C6@K2D=2w(3|-oKFI$K|55e>?Cbge;O~bs2j9*n!Y_oMjr<({Pwc1o z5A$#2e~???Mj{)LRwTf_z6HryZjhtP%4RLK2ZxBRCKq6km~C;}7#iU37`B5=D9 zIN-jI={W%{602i|5@$w$UPHrl8!dfiXqgZxRv5d7?`k*_HtM0LO zPT{|A-edDJiT^hG7ON!5+GPpOJ#5+^tb{~sUfgCD$E{ft)*AuywT*KeKjDq{Ff99i zW4qm>jD0unn61$0W`?5y_g-cm>~41s8r5x&Yy_7#H^dHg zQFRy_xMh1Qwpp_wtBiyAVRYPFbCc?TRl|F%tb=BY?#69zZ}aT87P!j>OVq}=Z?h_U zZR~qCGYs^AX!q9k)$eT8E)0uhONIBl2N>8x;jjYj&=J8#ZQB-Mv3+$mK*GcBGi~4N zx~~x;mThc{ICd?9R-^*f8$W&p!Src!6T)ZZ@ZQ2JJUAX2I|XjLQ}l)0gF#~pfUN&H zc>n(eSdo8~{}=vw{&W0i_)o##1N;O2xB1`TKLV@r5AyHh-^Kp~|D*iV{FD4m{&D^> z{!ut1;4=R(KhK}%&%jv$C;1eAoFC;!_yc^D@8`q3m-{C74eo2)m$`rD{*HT&`!x6G z+{d}!=YEU(b?%qA4{<-sy_b6j_v74~xYuzT+zoCG_6(|=!Yy$Rau>LBT#>tv%W)DX za7VadZV;5DABq4)fFeK)Pw0JwzJkzGgua~6lZ2iiG)HKb&6NCzcjuSdY=rKY^2|Y^a5kl`J^e~|>BXoq&Lxc_!8Y6Uw z(1U~?AoLzW2MN8K(EWtoMQD`JeT42MbPu5egzhG^pU_=|@`Q4PMhImI4HFt7G)QQG zP(PtQLcN4~2z3+M=W#PZ7C-;*+V#?!50yp{pa@U|C;}7#iU37`B0v$K2v7tl0u%v? zz;_k`bp8LG)gM$FiU37`B0v$K2v7tl0u%v?07ZZzKoOt_+ztfr`ak3ixcC(JJl9~a zg&Uz~178YU^uNm+@HE_i=6c@s+-<1W$N7lVr>;c&QAxTDHFQK8bue#OYsr;mG*w+j z^XpAG_M(h5)Ic?*TM}0&7xN3n*h2pFbTM|ROQEGm=x8JqgHN~IVy#tet(VlLSZQXV zc&1p6&6P{%^W}$Q=ZX)<@{0?zr5UK=d~s$WHZu$V7pJGkV}?9<_2ybtMGb3llPOj% zP8G|=nL=?scFAPaYg;`ZL3I9-J16!PEa#*3iVnGUEfIwd{ke@wy^a? zLZcgpSby|Ef!R0@#}%UM^Xn^>`tl^w$ooq5+GYK+b_JtUQZJXfF+~i+FU?FAABtVt zmJDzOVq}}RmtsdR*(+Td-53b_qXkg1&|S$Hc?ES>jlG3xoswHBgxQuH9WnaUu8=<} z2+Y&-BuF@$?Ys}$!-F&15*wUZR*T+7NH84LbaZR!+Y%9Ua2$qf#3u)4W)PWLTV7tj zum(p1X;q|l6VTmD&O!fMOxO&9MvL=`0w@1eD^)m#bG9;4FYc?#4jC>f=rpqOU;nK{Os2i(C-(G_+Cw|4GD1ZM=-!L{uSqfanie-uu@d-4>qLQ|M7-hSt^TcADD zVt;0a)nImDcV=qL#W9B&@w&45I!|qE|$*Bkc9>qYcIVl>jUeO!inHZJ4Qm^*WLc8ILK@a z>C->dYQfpnmbgBzr+AD$H|L?7_}UI?6zDZjjn4J?qHsd!!^G5@kHLHbU2dYs*6_;D zaqG4jnj`aQ4My5=C^@=umhng70PiQR5SfMo##f(B#wAm`&T7#}xpSs@QC?mHTkH6y zxf+4q!0UgX_k%9}5$+Gd&jqgrJ_Wg?6ll8c2o7KTS*;{^_p^E{(?Sf(OEi0@Px~j-MSi^D$kzZRBLA~18dva zna-`QW#=AiJ~z=tJv+d?)=2DafjZ`wqZm< zTPeF8B|+6*x^3plg?0DbL_B$N?-OK(%gT8s)9txa4^8Ek#-3y=pN8kVd lPMPLYJtzVc0g3=cfFeKU_&-cu5lH|5 literal 0 HcmV?d00001 diff --git a/assets/icon-16.png b/assets/icon-16.png new file mode 100644 index 0000000000000000000000000000000000000000..c2218645e7a335e47373360b1b6e3541a3436e54 GIT binary patch literal 678 zcmV;X0$KfuP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E;2FkAZe8V00I_CL_t(IPlZxXXwz^Q4SG_%c+sQc$%_br z;7%UAD0mYuG8ObPWH^hEtz+12t!-ybnzUJJ+f?SCY3bZ*F(PybgVxblJh)RSZJ|B1 z;Hm3DCa7;;eobKO$oAmn`}O_4_wqG-oD(9E$XQ8}bd!Q0oVVnI5eNj1i=rr#@sBLa zFiGcs#J8lMvD)?`lgS*WrqOUX{L3~DlJ2+YUZHx@vh_hDUL|p3XLBqTL%CdrVHi+V zbueg?rt!t&@uOTc8ojXd(xk5I==FNA(d~AT%jI_Un53YK933v%LMoL)wOU2JUPrA~ z+r>tsfl8%#Oj7dWp{TH5jf3SQ+9O{liZ&amNQfdmmqaesK=q-)rFY*Qm|j zKxt+S%aW0JV((^QNvYWU&5i~QUe($}Z3 zc+&&^_AI>o946n5+U9SxkwexV_7Mt&PLLQPZp9=4^RkH4qW}_Q3=0yZFf+D@w>%!t zAgFMwEzGB literal 0 HcmV?d00001 diff --git a/assets/icon-32.png b/assets/icon-32.png new file mode 100644 index 0000000000000000000000000000000000000000..59dff7e2ecfb8d6e4fd84bf9e01966a4a4cb4f09 GIT binary patch literal 1491 zcmV;^1uXiBP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E;2FkAZe8V00l!yL_t(oN3~a5Ok7nIr5ZIxjmAII55G)| z@$qM(F&2$K{isDNv4W_rQju0DEtJ;M8HOokrt@T843rMTV_I22TOjg0KkYPHV@oRI}9 zAYn6+i0iywF!O|~)Qz1=rScI$LOxi_DEVu0JuOEjg~Q=MU0oe&YinV%*<^D3L9f@pEJ#O1 z(Z@JKSYdLGzP>)JtgIk3mY0{&-Q5kR(A@bEB-i;HDB8NwQ{SS)C7Z^z=|B1dOuCt6!uBSKeK z7nYWmu&}Uzwzf9T70MshK!1O~IO~CdfuJ#V0xBvhf?&7XgK~z3hIlRG=;`SR8e<4+ zV0Lzvn_wF*)IdQ&0Y83HFjLZ;!NEaZ%a($j80i>8SOYh2-b7JR5&V8XZr!?tKp-H_ z((QKh9WTY&dNU)vy}f(_UauFGm6f=0<3>oP#^ylBk;gVk!q!1|$Q4Zgh!*G0;i_9<8 zP$cK!jJFk@fD^|&soV_PPf~tCM6(`101ghJg(RDGmCJ&7}veU$^%_j%mF z!B4YcGMbR)OW+0!cHKR^r1uZq31S3!eg%7pJ~k1SrHLuN5^mu5DF>QQ9^@SuS8a#G zY(RN@w%7sJz7xnw%H;+!;#4G%kM!DI+<@6)mWngsGoujSB{w74`bVm{M)UnEGS-!(&A0ZnbEjC{qi?zB?Vr{33_f9(Nsu%AF~S6YmJ| zzsGb0N%>$2l)Qt`PY`cOeAcF1loHsxi;kV|olFjgN)MyX1bwav28~G+Wgw18LK;0k zAxK0PtbiQHQOm}qgln)E&9Lk93Djb0dFVKaE>W$SIGz_M*B5k^ewv6fh;SlQL=Kd< zOlYCsgEs_U=%ogXCVGP0RWI7x7BO_<)NNI0GL t&*MVc!w>prjD2kbkkOn zL#P^~*@s`CSj(!(A|TYpVLyRU;n$eXAR{*f1iYUA2I7EIsU`d-rMrTmyN=Um_pe}A zD+Fh-?H6~hFIMgh0$e;?e7xrjwkZe*9+b*JSzRx)<976P+5wN^b~E31)l&qB zqCpHqzd$@e4ZFv`SJ!eU`J4IOPP24(rB-!jX8c=!s%Jes=z4hEc192t#cS*9-(X+v zjEY;oJl(T6u68`j|K4KN$_G+P)df61m{(L+zefH1`LnpczuzDuBV*Op&aP$bOqz_# z`#XAa%boeeQDJjp3OKkrWafURR zF6@z&Fh>0wY`&pv^gtNY4Aggsn*K{HZUejldU#x09nMw1-Y=E??|GiOkAH$+9e{$9 zXAHfY%8_}wU7o(azW59R-XCRNhZ6o}?6|!9<@U1N;&J%m&sF}Pf%ZFj<}8`79-&e8 z_Vzh^iQe?EKNbLpdw5jEma^<;+wf8eunQhjC4O|xN~3cU;gYoCMkL%?LA{_Y4n^I# z`Lknx47B`&G!#t2aR77Cp<#l~0|o5bd;|KNI!Cs6E9~+~N+p?9DTP+t^C_6H|5dQM zWVEd~?feH&3TY9*1NHkc01HUaj)nMO44-a#1=1DOI(m278rqyokC1Y}U)93H{CXrN zCKfOSvWrcardDL254Ti71&#DcfBdu(eh9!06jmQof?GKu6r22|E@4_Yn&yPBddIPi zMuWL1SmNEr#e4ckPkZsa`(lG zdfD3LwY*x_L_ORoVftggVm=0n8-&8G73~Sm9tN#xINll9d!>l`0dNw~@>r6zyNFZ6 zRVJjEs&1p34Fv3Zf|ejQvAzanVGq^|9t?DL@NP|@n<8J*Jy8+aaj-mGePDD2@t0Ua&i35$y~9E zr?%s9GUu4=#oLbqn9Ry#lCCL?bQkQgNBx&tREEVMOoLed2Z2hA0Jx}0lC?x1W}Mkq z!aX-T+o-3f_k3JuH4?yP@ciFoNWgd2K#v%Y9pNp#YefVZ$Qw&q9f!LMwrsRVT`9FO z;*!{znHlcy<`%4`cvCp`%qZjp5&z{IvwCKXiSr}TzIIik5fkW;otegjZVnv{a6q=#F;!eNR$v*p#H+knd;`}? zp5N~JOo;yj8G7)#wTDN;b-}`J1@W8l=g|z|>aa`(#!=HE@lR9$jxLu1+I^qMib58A zkoiD{6#l}Ej-tsg$GhjS-^Jl@kaGG2xhmh$@}C{V%2yFf5~Es#?BmT-Q{D>%KG}p_ z|sgT*5?Jn!2= zh)AB}<+tc2+>A=c7f~XEWUY7b9P+3-`#i5FcF)6RrdP#8Gpj6-OsC~DAyl8>#L^Yo zyKrX3R8iS@%5+{yprshYV`Sg|Vjz@hBghmO8XGjpztxkZt;AqSpCx~3(DgMp947CW zt4U6%Wa9Kee5~o_3FLQan@q@I;&H!{LwV(J`O_=GtS(!n|75*-<>;1{>C;|r6qJPn zzlhSv|08)}6HXN8@z?wTQY#?l2+3bBjXK62Q%_PUhEvSV{yWU?twFp$d_AIX z0XjhvrTbgip-0#&6BMmJuQRta%g@->yyZB2(dG1C-yv@g>TGH!sllicr7Q2;>+N3# z`xq~uj$0O{ff}pn;An9*T|O@aEyOIAPj_8SNo$KkO<4=6d7t2MwM-^0*g*;yjvpLO z;Rr1H`SZZs>tvj!yk~HL+6@Q^QgUpbJ=z}s4_A_baO~55kW*6|#r^Ds&cK?=vc~J8 z7Xu-kBtOdU-_V(LZul|kHxH9a=C5Sc!s5Vr{aes7s~F^D^MV;nq@{q*kU)qZl>aV z>D++pfMaN=YN41aacixZ;&(bu%|PJICJ6vw&qqo)OY>GwNO(%McCI>9{^N=d{Io-U z%BnbI{@3QEyRB^W^T*Roy`gysXF+uM9`1@KP&d0-1dW=%d*jz5zVV$mQ>~X0ugYn# z_?PTy^Zx*xQn@{t_uTFi4trD$D6O{WRsnd0<|J%82>pv@gyjkt(?_(i(oD zT*t-KsL`+F-yh`cQO7ZxGe0rj{L{0VQs%-1R{sqM#4-3-{kaov>Ea*HFA2D$o4(D8 z1vO{Cs;a8`&!W8z=+^}Ihf}O52nl-#>x{V?J5zI!JpaQ#;q>9tb% z7sIo-DAP~6MA#WOk$x`-Nod3*&4D~a2<9`5;gERz8X}@glh-YgB6uL3p>*xYRDlfO zpfXK5OsD`T0)QVXQpsH?@qT2ntZJLo+f35;>RmE{Qr{WhNU;f&L@n zK|3^%N8`xA&6IiAnV|LO+0v@F(33BWs(hFKgPqK3scm8;gp@Zi2zR7v>gIT=#{Q6e zsEMS~+@ZE!}Apq-sv;~G{uub@&2l%>3)KQ^4=r0WZ%qzy`*<3B-{ z&?Aczp|CCE$XQ{jzf-ioPl$_jKgC=~S0erx-S!Vf)7rdN00rbIJv7%w*Q?hxlEzU` zm8wb9Ymi&P_Q5hW^N1NAM+m@ihsX7=F8k)O$MnqfsVja(YYW{UjsOS5q)K9#?@#lXt>yO2I z*>l9@Or`v+(G(Q0homo$0QMr^!YPjmj56U*k(PRfUj8b(^>0)GoPKi;us9A5j&b8= z=XIyumJi8)FbPUWPN>seVgC|SPAPwXyo zUjkY78Juv-;R&UJ);lU2k4 zG9bVhO&aX<>uasz9UBNu17;xH(=Vr}Np%>t$l1AFK46_8eYJWBK&)>=D)1Sajg9d1st3`ZItatJ*oraeUUDqzv3%;rlyjsTY=jxr}Kn5-KP|8=AW`Q1AdpV z62BSpYVU4KEP9VmyP3DiREN2I7^B(y=j>QX`az4YKE!KF0W-U8o*RZ_WR`{z{Ytn| z)c*2txc<2M8sI8u@L0}S`;3NOEW3@0Ak)W4*%{8S08ndfGd8V%pPw(3>tTNs>i_ACA{CbJ;(o|(sXZl@Y2w)zmHyqyWvr73ii@kM~uvcPHtf0cbL|M|1g*jy^$zsO2Bd|*=Y zk}7Lyc@VAySR3zpO|Yj|lxPUf9<-HJxQMN*CXKCFk!GANcYF42e8ltIlWf|Um5lOpN8NAautYsKm+ zczvi*lFy7`P-pG4p*g?Bsv5kBDYKTa_iSHW2g3pk|O|ztkBlF2ceeXU=^(8<^i2X z>CrGSaAe`w^YAf;ve7B@qhyK)hS_7?Uo8LlZVN-I8$`-X_EFvooWkVr7x@R2JuS3e zA#xo3jDkR@iTKx(qwfVoVAhiemHpuG@_3lBS#roWNu1=3Vco|RF`34n~zN^ zUW2ge1*AKR>9<#IOqE~%-h7y=Hh+y0{XyZg?i;8m7U+Ol!S^*D^E!kiRjwRhi?2eu zO(FXTxKLUMN7?@oiw94+WOROKf6jI?oZgy|Le_=`lAz(ry^KW2p(Ga*nUrRv+b|e< zXdyq_I1$Fl7r77fkw;2dD88zP4EfIS*$tH)s(W#NPW(EHP5-{&d3t!bu(<5?VLdQf zOd9RzN!o`#1|jKaR_#D^gIjfd&Jv#s%d}S>KN+XMb4d#_tAFBKT7H~?k4M3YoO(e7 z2+W9tg_x>mFk>G^h?~zR?SJ$7KO|(k$<4eN9sbo7g+cV3a=kvlGtM`M$Yuw%76YnB z1w&Uu1jhzA@<@+p^-o|l@l*y4P)s`1bze)|mZ)I-WM(*Nni^o21O(m{;ZQ`(vBEutk8_vdkQ`0uX{Pg6ik1;|1E@?X0FJ&$Y2;$$5;!w0hUpAFG;pzg^Yy z1GK5NyN4xj(X||#klHJ;hHUECOZ+>C9_R>)`)RT$_`{iC0udZml{j7tN;-$!KFCqw2VBV3(`0mY}DzoId z=qQiKjX9OQ@<(<(Cq{A6HC7Y`TSZFcs9v*Pl2|vo$4jTj@8;qlE#0D3xBaN zBp^eLu+;M_ye?N)VA;HRIhZL=VkC6Z%bkkM1nM75JH(+)YR1Ql-QRP~WcAf>ehYFx zli266eNNcPbH9o)Jye9gki)0B%E-iNKd9lhozHOa-tH*88+ln}9O5u_=dP&#jsN^e zoF`ALL4!r=1Ei%?9RlE-F}3CVHs9!I%qM~3PP1PxOpBb5su4vY0!^-|V3h9Bi&DHX zC=TzI%LH$wU1^CrN2y!6P8`{} zN1+*jEdr+JB=>Ebwk-k4w{J0#JY`n+@wrXkClL6`TL|fkkN<1yOn_PLm76D+3HG>E znAd}C0512q$R#X z#B9;4boFuNmgtcbT%^pA?@Zy^y>UVkgKgWVC`Ge}JOO$+P}_~~U|~(@om6YP=nKQSUUTO)6 z)md;!s5KUt&=tH^P~%l!uduL)6j?IGRJVRj0)JILo7A!p%+La3<{prF58x9+e>CL2 z`pZ9lh4ac#E&#R#5nDM2(<$g*)Q9sog<6laG4{AF^fgtAf$N_OdJfr$W_h3zY#N5W z%IGvqF$bZ1?4o8+{w> zd)LoeA|Zm&fAqdH=7cNv$V=dFSbk`7va5YOqYmMF2c$tdp4Cz0ia zX%xIO^E>bBUCcMF4U~(wLMBY8Q6#ZpxRM`qMyfFS^;Y8fYHEm>Rj~zl8{%ro8&M10^0s#T4Va6*H%H16Rvy4r(RP2<(NhhlTPsy2%8uBC znn)bVtdom5fWz3uqa7kSo&jDN+6&^P#|m-mI0Nq*WB@QzC=Xd54g@I3Rh<*>?9yQ8H=Y(Jd< zzcHxNtBweqQ0#sbz8M}T)Q!|zro&u;BsZ)k4^_zA1b*0el%s-(n7gc3VpWuPmwJSz zt`qwpMe()uHD!QQ<-c+%`iyX#Chz_Rg0Md_5hP$lI66r$qzdm$MZ~$^wE(->c?wMk zlR?8yZZyz7z4(VsBe3&_hA{(UFAq#r()7X^U?n}C3IH5KlUFIhz`mechzk7VHSPBy z##_|^#W=wq%p}vOD7FX?JWf-Kb-(k01p>gN1lnJyjxH77UL+pk@r=uUC!`g5?sP-awj=CcU!I3lyiJ#ClIqnWDuNonHH{?Tn42HaW0rTt z*IH8IyHL_IE}D=EJ1!*q6@~uBAtY8T*L3NnmfqKbc21Z9@>doFIB?f&H(f4G0G>>7 znPaM;*KZY;76rI)2V>w2n(vda6lV8owct1nCB7NrQ07r-V}0$a!x2`kkK4@03CzoS z0B}N@(Fc%^kWQnN?-!jqC2RS28f%y~>fWu^*7E<`0)0fG{9&e6^ zE(0kFqIICSbGeOKxjKO^$_qb85MG#N@=9Hy?BUZ#+W zQ#~C9^nkvH(1lQgm^R;^uqe!_RiIw_IY&T5@fc&eqrM@QF=ii`jM&`wxFMp_MYea= zGOkWx1Hj{yam144EFy1(nox6rVg)p^bD+2Gj7GZ6^zX&Y3QpR61&ZB=yt2)J{ljt_YycCaFv?fKkxfO zMrmPRr|O_hz-ybcdV1_95?sfA@&FI+4jD>G<+8sWM|OU4RqoTcNEX+8#KrM=P_zdQ ziV_^NLM4#WM;A8Y+c^_AHA8q?ZP@5w5I^XVh(7=_p7FOJRM- zFnfNtpfxqqj6n+T`vg42)Hvt1mjVucsCuSAbk1#~Jm|0KM7&JDN~yqb;qUtJZY0T) zy!G!+=yITF)I14kkS|h$bw{w;p7eYwM!aKc-dWjOa*T8?mbEK3~UR}eFolOlg9kcu4MmAN2LS{4nd zW7wiMU|RM+)=(6WaLIH4#v@-p;kPghtIvO?h_vpsnauB1tij&axYwmC!nZCBBrI8i z`!I-`2^WveCOcA*+yzcIGP#TjS~Grpe~~I91&~j5A#yb{Lm1GMH`DnLn5+aX?We;O zql<{Inu_;FC`P@SCtbW~_7X=fd~?cb-g@S_wOPme4`^?weWx-@E^0b9q0JFW zOb!i@?S+jdjf=^bc3lm{4O4f@#2Z_iwCXeZ=eT>!m9?(N#3wyo|4>WutYSVT61qCv zHIHo6K%Cd@PXj>FuMal6ehR(J$^)olWniZ2sgC{P3?d}Ge^%oi(LK0kP06A}`gHN& z4RyB$h(J}x!@>V(3*g4GkA|*;FS53eRQ{!m{@M^r&JnM`u-u@YL{u)y@upWafBxCv zj~#~M>%R&x3}i4GBBYxAW)hl(h)j!D8+a4ZMkySGKn5iGwWpG|HQx$&|2VC zmu1y3H5%GCFsqtkuaKO{zz!1)w|of6eKL6u#&9kkLftT{4SgZ%WUQwRYidKa;hx$p z!?Mu65VCuh@t5CkY!CgI)wJo3h->)AFfG3>?8uFbG7cwp%$F^-%-{RVBUY;pi|=5n z#sK12#cuE3-IYXt2rt;M<9!j-y^s;rHd$#qkxurZvky8LQAZeA!^+~Q^qsZf zRfA0?8y4dvyg@*=kAr>rros>6HUuU3M-)_(9&Jrae;>6sQ{1ay$X+sRV&`R?Pm@sN zipB}IfnYpNj3ZU*ZlmGV0P|b4HQf9OKuAwl`q!@XX+kTLpYm*sw94ixX>`xLbYfCj z0rmd2d-GT44&^utbYCC}nS89K+l9n+Ye_d;$%6sR08XwtuMZ~f-r+xf8zvMFqw4PD zO{Af3YyX>=OK0Jfjg)2MV?MT^-n2gAuDghrCDFEYrkHELUCBuPlSJZ@Vq`0ix<7hY zJsnRMK7}aghvrbOgQtM5JHQf{qO;h$4{7tyix+|%%cz?%aE>-0IeaHXZiKA(iB8h* z6Ld(-R`pQoE>jR1l3*mI4rbkZaC^R4mP%NhRzGP z+3ZDM*sMf~ukWeZc1RUL=8Tv*<(=*y)s;ulv&fXE zF%aOLRMrtT2nyzd2`d;D79Hxcdu2^}Ce&!(TgXIC8L~!*yK`CuNjMj@hoQDH4)PGt zpH}agC^2z5rcrI-@7ef}V76&78^EU~7Pu;MR1jU9+hc~k5z|E-EO$&D zy+^Y(G@$F>^DPg+nS#6tE)7CQ=G8PyF+5$g#$0|)q2Bpy|sROB9VE0 z7axK2_PgZ4mqPSLREXxI*H#pmk$L+#r+K)tUR(Y~(eE#@zP`l-2`S`|`s@iUrT*d?VsnITY&YK6W<3!Q%x5D-fU=V{=I)Nj7%Er`&qHWWBEEUvhcnK})RfGXR z7JKv6d3sH%uoiW;eqylgFnlckH`mQjIxH{uk}cL5hX6dO`NKf7M2Au@0Dq=nf$wD6FNf&!~Me-yzje=kPFr-1Xv7JQR4HMU2phWj6t zTSPA+u)*_qVe7NJ&x+n_%Bbv@2cozIkLIpLSLO;DSXO59X}mvSYIrDzC`2J^PozS9 zAgG=`gmFvyg(i||Uu3}IJ-*c48kjcbqSn8j!<^US5I4h*6+1gPoV3Q2JwAs!493b* znCr}n5hcM!eJ}rko#~O4ysIbC(aSPIgN5s{TmS6rH%E)}dbg&L(f78m*xjFU9C-b| z5RzGGw+?&OOX}v*u&ctAY16K+gdRlI0A&!m>%`s+Sj1DXyiO4iI%ih7+cLhxrHuHtD@ay=EZ3qDGrMr06@7A) zP?2Nc(nh_F|{+=AX|4Nj_0#A>8OPH!IR2|at zawG@iVT59QrspGzAQxjazI=DAJYr%2xuv2!<)rV{O;mPU8{m9e^dR6)E*$wsgW zqG6!iVexiD0w$9EgK$OnV*cy@-2A(T$-@29+PFr?UT|1OE&WTBSilze~tK=gX@FkOHeK{OSJNpb8o^LGFu0&}bIVaz1%-+Qxr|2pwY? z%*YFp6>)Fh>uafv>rEF24@OE-%rn)P0!l-#v*%J_=y-y;m1cWh%ArI z|G2FYiCY_|$K=4LjDhq4R9?{C)sz2+5iT|RN z1|zC%W@v`TpAivg~?F|m4I&wM>aNT4q29qh$9-q#KCN_ zQUelTSsDSXq>aMbN`dGUMG~-;EVQTxx9$cG84^N7% zJ!i%0Rr)@p(+i}NGKZn$RQd1MbCw?UGTP7u6yv}`=almxZg?o{=sw*^+wyd_Sy!ml z99Qgxw?(pabxh8eqrxmX!6727*!gu@>Jd)%apy#t{DxT>$7TRC76 zZgeEUcq!rM2)w=wN5$7+?Bk(LQ~Hbgh74C6J1#c9!KOD_Q$e@VPM^8&#YSDRUnLiT zN*E<2kL4(TIVshWUKpG!;`Z|Q_L8)f7SpBH*VB7L{Oo5aXU6Y{N&u&1KIdShZvJ<2 zHV)od6u8Od1e%9K^kgX6Afbe0i8Y|hM_Uvp5>A6I;@nF&t9~y96Df1xJ|uEV_CI26 zYq&x}Bv8zJyYhi(?xiF5RmGY@)avbYfQL!9oXqwJ`p+~uhv*AgK%q;Od)5QeE1}O~ zN!$K=hs)0xN3wJ&EZBXhz>nGiS!XIn~BLR^>FZ2 zy@~9k?|pl6!6MMz?sQIQcyb*1c6Hr^D325sG^{(oBA6eG2K zZ68KvN6x@l)u_8T*-=kTPPGHj6Rx&Mk-z?no=}6uYBAHJ65@qV;m#@}c9F`pczX2-Ie_~{J*$~JJo!p` zIQK^LpL<8ax6Lbh{FyAj`WV`&bz2rLG5`mV`I}_}=|Biejvt>b%b3De{tFtieVP8X7`aCqn#M^&Ga@%Wg7`tu{V;~$m1gE9Le{t2?{3>WChm4KxCH3! zDT25uI)H<=M>N7sDb|mN z=i-WaJ4TBZnb6xd98^-I{_+I*pKy(b^KH_IGCI0_w>$T-BG)T4TBZ#G@4Hty^~@x` zctuHG=bMD$i-*e_v;)YBo^TGjZDtxHL(&5dq5@V+`kkld6869^now%8WSx6fCw%kI zDNOXvD{!7Oab3=k^_$|KbmgRkQk{wLdm^&zc$Nxxvw#c<$@%IFgpC7B8VxF|buDZt z9R+w{is&2SFtjw9D&UM0a7hJgUmMvP!F=L{B=^y)Qn?J5Z$dkqf8qo zov_CN7un~W-*Wa%PNuU|RG?{n*PNKdP+jvBsK(CIIWy1tnv0e$m3_Hqk{kiG2*v^psJW)A7S`?izoA z_@=cH`9UFLj5R4$-gTVxGIC--@rE>``|3N)U_}dq zhZ*jJ5PvG9NR%QSdiIlBH;HWFxc3R%Hz&JyKtovBuof$vInTu@5#?m)De1v9BUprVxPc30T*Sy!Stw@t$|^WIFLLQ* zEET9+c3|#iSxJ7fWeWEXK0j9o$g&cB?!`2fU=y{~{ESH(IBW_&FKxjvzYdxxgMk9k zwxp=WyqG~`TGtcKWxH0*|D}m9NhbluR^5XLhYr(gkbN}t(6^jxubZzUqNuBc;rs?6 zbMh=Y=qkh%4C+5%n1b#bR(|nhyQuJpEVq~n*czbamRcCf&}DqzM%ab?FBk^fuWkn~ zI(5*Qt+aC=1swf8gY{^z%v+qN-5#mlycwX`mRR^~O00n{qZ!XLA{y>CnfLbsM-q%U z6A>@A5wq^imnqK;D>{tF9iNT;4UQbi>jKR0g|Vy> z5vN>u%>+fjEq`QrF;pjBVO#K`P0AfemFy0!O^(1TR7d4eFVgywK(<);D@Q%B2UnO` ztScN-l*PMrs!Za@Ix!nR^#X^P{+(6TXE?tf=D#HnQ#6tmx*e4U#dX^WbF`iftIXlX zHhu+v*n4;^TdujA<^GGcIL3#ZB`IA|V{xxB`y1s7pA~&&@~2*TB6|3DP6N}RD^xfP z<6l3GeeFn!r+b98*igdG5M=E*j*0UX)&WB1C0rGXp6+%C&Ek``-Bo zaZ_oiUU9MhW@&cj<|lHD|1G0twHEB;Fo7Vjmf{Zd|Kg_)!0EvXdlIcTH~1o(75YrU zu!1TN6r+b?QVsCdF;Arw!+cdHsFk;DA}Kkxtqe z;HM&|XvCa?3aUIL*6BVVwho>BJf(H8gkb9Bs%fOlwNC^Z4-&F4rRp&{hz%%}cDa&U zY7zuw?RyQIa8KVzwF2Q~;!%hGxA}aW(?R!o!OC)Y;$Q zp*}s#NlR}va}kA3lnF9Pj$n&u5yNcvc_Au=U#Pkbyw?C_xMhNea7-7nK^D8 zaTQPgAIf+>NN}bo2+?4Uz=3dtp9%xJ02$|dDL(PG^uuIaBA5UOq^%QsM_^P-zh>%; ze%!kH{3Wgl3Fh%u+FRUF?H#zsy4c!BHRMmRhK9yYZ*s|SB3BYOwuf~DvMTM9D=PQ2 z@wLJ{H*Fq2G-#TZ75`%M$qZfQ5iS{irXh$3v)ny?vVjsTXjC99BpCK%p=F}M!`RDZ zPIY}5QjbUZORPjr!wy0rvO;#MZB2>X!x25STjXVLY;Wi(Yvo$P9p#ROEYbKTP4Cvr zr~_9LT#GNii$_NXpi7icGUsk!JL?u2xHO+F1rukQd+3|`v)=I~Q~g(fCe)~e?d+sZ zOz;W+wXedbrmn(RwCBQ~n=_$mOfe_<@&QJY{W9dgo^?AK#p7Enb8W!@oSjCH5CgfhmYcK) zAB>RzY2VGtv%xre{3eGE{-v6eMilWzf8nKoDcT{^H7Hbm+~jArkxNc$iW$~_*$F;y zf9y7fZpXNF$kio3l%C?hG3n+d-Timf_*x8DsQx=^`os33DfxM14D$4X9?5Y_1$HB_|fyEJOjRD zsT(RL0AbksnAXLUWXY#)Rn94w?3UHX#Ct9u7t6bN=thkA+;QUMN`SgXU($t=#$G*D#hr2WGD}oD-$+bS!;``52qRmO3 zaIy*FeJL*Yc!$N50-rZZqu&yS{f~bM-iGz0@-kA#ReV@>9G%ZSiznE`9YQQg@fV1N zGlpOH)bo_|TmSzc#=@r5cNgKl}DhVErNO``g zkl<=qU%ztFXEsZ1qF=p{|F4e#2k^0R8F&ICL|jnPZiRKm~NY6aa-ZuK1BGtNm0)V zzZYiug5R|4X%Y30jHzkVUY|VA~_Ih?}3;7?p zpIgc+b}ZcNw~J1+7%Ak9c*Cs+-@J{i(mq$Csy1nr5&j>BIco-}3DLAwdHV59W^W5# zllxlx3;9*w1W#B32Q7t8(-(fbS<7it{FdO{?+)@@cwPW!S<^` z4y`9Y&3kWEWW?Ryod@+ia}pKB#V6>{GA4T6j{%_Z^}LWPf{HMi==WxUo*K{y^B+F)IGnZA@Mew_uK3Xe;&R z^3s?||LuOi9HTQ3M8OQ3GWIpYZOWb{YV>p0zFF>g=^Arc{9d`<&uKH08pd@xrjAyJ@F8u? zZN^Pf+jCS4Dc=49ZZCeS0A;0)g0_pnOYoy~+V>K{a7-_z@(c|-jB4p$ttGe!-VcsN zvicHYy^CyKI>=Vl88gZ6Q>_!mWq9@rMe~Xu&f*GG3~a?ks6H5fkhk#lFE!y~`fDcC z$0M4|ok4f7V{m<>@meChC2t7ufI{k7;)E2shvRwW4atNW#&G%dIdN8(8u>C^M;4ri zD-XMs#b=HEOhq=Kg5d6jF-`IDHu5wlDNVWq8aLy`?*3wqBtb(jC8M6UmyfGQ<4|hq z{?OS*`5YaCWgdqFGLO$zzv;N3^%GI2%&@tR#~jS2?3KiL{o>ncbfMSdUgwb^wV}-P zvE4k06z=UcRVj(P_us#Vs1C1+2uHtu0KZ)}qM8iYhHVwl6MR}IF5-5)jh&s~sTTTc z=x>`|vmfp3JvRhin$;mP>A2qF={TI`IX=LaKkgQ#d>vH`l&G+;`u)~+0A$!cXvkP0 z#*~lUSj7{}m)Np>;0zm8+5j@uPC0!b9!?z-h8?_^<6|0Sx+j2pu@fl@*);2!=T^zlIY+Qx;e zjjVtTLP@1~A+&Bk!Jp+m_!FnDhG`L9fK;01rf3>d0y&NZPi=VYYYn}8lt%CK`r3rX za!^x{HHD%hT+f8m+i7K)6XW&N4c4B&uHrw^`*1C-PLNhTzBih`NQeMWnaAO0yr8`Y zZ5aQ>Ze4Hw>Fjh|e0HIcjgNjz^APBYw>TTGm`%%QU+49Q!Kx7czl5tK0;qS}4F4gz zB&Q{4DM*7zjz-4l?tUXk4j4!` zn{-YHi{{Gt^du_YVbMM^uIoEZrOX?V;Oj)tyFltr}y6EQ^`;-{;@+zUJ z;)r{&R6>|JU;UfveVva*lM~m;+c-r1WXU0qTAaynV$?-NP5$(g;q?c8!Ikk9fV*8F zEEm}j{)Ugn2{hZBqhOZJj&)ZK+1yVUK=M!QJ?O3$hbx_Znn=1l99!78bNpW)K1P7| zHmuv5y!x7}6$fjiFT9`2#!+Y+S|0mM!~%16)qly`6DVJ$#x8j8=`Qx3cp$pzG-ui-!GgVZYJV*X6et?AEGm+ZO4l^L<`L?apZ za9FJ}d<2vkFrrMMp4*k(XyYgIPoJ3iux#7O3@UH^==FI=DR_d&a%m;UzDQ0BN%h4! z^E%AO8Dka%m+#Ih!j%>DM-7sd3(*}!PZ?$sk|jezRkJ}qdkRlsEg%Puulw3GdNBov zHGz{z@rS3?>HQM%P9$=;0YXKQKXZIfr{Dr3I2Xl(&*@gJoieCwlM_#*3AaI~IXnhY zTg7U$nK{?g-@f^849k=L!wSaX=Zl(3f|&R4{) z56m{?)}hLYt{-@QOAgD@p4MezZ%%PozvTrsMKnv=$zv$qu$NY62lVAFhc1&G((ty1 zg1@M^rd+GXgo!qNmu!*LxWpkn9c_5D*=ItLaMR52^;&U>xXJZRW8W4Y50`MhTS1(D zc0WDe-4{dBp~hy84Ji{gM&ILK7S#BH+OmO%Z$(>SJ(Yj^-V{yXe83~#X@=eoC`x@ zSeNQhR)nso9B!aiUIeiMMCE$!3{BVMfhd$HL{M4zGpD7fR{Z+l&95MGHTl_md;@Bz zt9Y2KQxODK*1}JSRyKqc4E5A6!@9|yfj_;|K(=jyq9(b7wNXmw>q z;O()8=ds}80jd1}D{|WQyQBOw2)Z2MmLT=HkoFAvI}lOYxJSR_UdJ{kA|xVF(I$dX9lA<~9n?8KhrRIp6=z}{ zMk%5-7suvg2STow)GAUju(~FvYS4A<#A}RJ+qoXoZbETAcG#!pi+Y2w( zpVQ#2zdIn_+`Izufl_nZF|Ghw5XK6(hr%T5>q{5TpD=#%uD&lp@RcG~gaf0p_Yb$VwM#aO z3@hRorFRdq743X=AuiVgs8a$1ww&qB%R(Dyzbx&oqwU|zdXl$Kn>9M*EfW7MKU6sM z4=tm+y_SZ_Bm8A+n$-1cHM-U7sx-A^AisvL77lKOHj|&#Rdn{$H&oKi_R8-K{_T^S z!gG+%_$;+C89wE9D8j59QG2hN0H8uUy>2<^qDv69L5aSH7=VcgjMd2~YvYsuw_|cJ zjTXPF?i1l@HNhN;G@WPQ6VgVkm|=~a%_@( z2FT_@oyK_+1hu@;a+f#$bqkba3TqYnt~RXp3RL8X(6a@9f1x`OxAEYI9LTVYA;Q5O z_g@>|)d7Bq9NYgM0iNAj)y3k9@e|PvzuVd*?AxcHCtPIfEw+Q{`vX6QITlFN%cl`% zMCl%ui-8{VApV_shVq40>1rcPtvs0b1PYb6gh0$0u_8l+rl8;G+D4Vd%k+M&L(zxsJ6>GiCdZC;-2PkPdF111HKDs$M#Tt{ZSwZ^ypgoS>~5vNbHJIjyE!g$p7l#V_pLke7K0C$ z(L;y)!BlHLT-#|!IGA<8w2xgTBcpGCoUr)v0xN}z$PsMjNCH2%gsD@ke_puZYI z(PE!MdJ6~fbTxCx3bG7I%A4!C2O66t2GSr@+=UY%hdiZn-nwtjJF+~2C(O4_Lq(*> z-S=iFxSgn(_-1C?+#t(hIh30cC8X$qD&yMUjLG(to*Pl9(RF(Kb0G!vmw%l{rsvSW zsR&7Qv1oHYTOlFp@fNy_hfL>>ChOyF;@BAOW}9{Yo32i%|5h5*f7}^rzUmBh>ZHPC zr{&-^fxP<&f5^W}jqscIaGI|Fx&JroN1L@-N)5$H)ljRok?&+5T%1kdYddQH zGuoEsS~yr-XPG3cKRW0yAvjK8Kfb-c4WA}Ccr#)Ktt;!>rM&e@&V&$DNhc$GnviuC zqB1iiz|t2}?b#{-lPaXDQr-MyGfA{HDg}jBR6$k#QH;REl=AY;-{IBKYc_L@d?xQL z#%G7VqHEdA5#-H_2~q+jDF*5)GMH5rj@O%&>2hDYy|cwC`pK{#SdqULp%eiCS$%K7 zNXY*J>fu(IVPUqFb%u_~ZV*;)+s*LxHWDRV8G1hzj)$de;s1Sa^58u#Pbohkj*mDC zR9snb%S?nU*`9`4|&KZip@!q0q% zVN(tQb3^eO?^Unxci~~mkl_3BL(}3QQHB4TnzRtguBEVEwmOw2q4cYefeB+eGg_gK zELS?O^$*t&378eoI()O!GR%sdZVNPN_7BueWd<*;**JGc*9n?5+Q5Xio8I>ye(qRX zh0gX}|4%lt^l|3Oln_XRwWH_J$-`)`Uqr2cmUt9c+N^ z5kKf`)>q5(C`v3I?;>SkmM;6>1;%Sn3nM)YbWpDo?9c^tSi~mwaJNpldexqy$#&79 zM#*Hbthb@jpxI-=u)yzM<0LN-H7_UxJ83sww8Z@2-vdRJrUXw#tOZYHF+ivFA~5-G zY8bei8hUjr1p(|JhM^Wmx0l_Y`!ozf5}XX_h8h<)KcCi=q7}u;h=lz;KSFMM=AeVi zXCYBqvgEs78x5cD=Cc+%Z?4cDj&0Ih6TYjQ!E*yVG+~LP{Ks+-L$iU;UD{;&C)QYqx$eDl&SP+>DEIgj!l#SKxu7PJq?2vu2^5Hs6^& zZ`-T=e4AyunBn0X{G;^;SElRCx_Tv;o-9JRYKoqwhq`$~IysS5ddnES(hB^FmQ$mc zo$w;^4-+jUl#gEf6yd4)3X$q7&C5j9bAs=~rVwy;PGsLpHhOZzB!-q7z0?#5(5*4k zpQZ*JfY#*C_)KMprjittftnT_p0N9{8^QwC?-dTISt}92gF@>J;W*Eb|3;fg_05HJ za0zfsJ?7lPX4K_>(55Lx!;>`dF*F|?lzZs0U7(D312%7TJjffp^i}}t(8&zt7mCNV z0|q{N^Mrcy$i$bz<>kc2Xt}7>81;cROILV5W~a`Vv(j{%@&Nwbfsx3l&e8NsincpH ziUF_RBA=Kts)vkP_{HQ(%%_66*8^Rx!owzAVQRdcw{A`Hm z$#{Jot9`mx7xEzS^(sJrjH}aPjgANAhvSJP_CwW)pe-j#8+bhP?DXVaqp|z(8k}&@ z8J~s}4+-Vhn+K01Kglw6|EUz3Y9S7RYbxPGfp%i6^cxIklmn>6={X(`hJc%6i5|$9 z%$uJE3f3|44e;R2cU~kw=n|_%RhOPN1S>wlgx|PczP-f@r`3I;Lhe-w*t16 z9akuBD=f9(SV&{nw1Bgzvq7Ug#F)_}ZIat!H3ZJWD<>1$p}~IntVPamJi&H?h}2D^eGodIc8`~1euuXeHvK$#)WztqFF9`j&MpjRgo zAzRbs_{QhS|HZW{KY+VA9QC1YX2w2xPd37gQ(fg?93AAeWYIYc*z(C(a9o4?l?b#8 z>vVD@y?YagyA?$Al()OX(X#D9PSEm&lD$cGA~27nefmoo^6;MJ&;G`XwG6Ve^e+DK z*!|WPNitUNvpEkm4^JUG|Gt{{tIn?Z^ornz-sZ}E_uc*07f}~ZoS(b}G1NY(Cl|(y ze~Y{4Q%*xR3b7WX>bZg&TNH~^-A!)im&O%{bmM}=0F-`kP&8`vXJ;muK&jHf-bA6Z z6ZSkLkTFq>9v}*8jd;G`Hu%=f=nb~n*WtDEe1BKIdw~er3o$UzV4_8r+!%S@t(xX~ zud%|Z_O5$F*}$#OT3ot=8jRrkhw}z%s*qvXO5xr!tG(v8r0C5)lH_Ktp77jf&OMvK zRAzq<$`v57N$scFWB{0dKR_ujGnTT>|7>T@P98lG0!Ja1qVl{4Fkew@O}jp9_Cn}B zT6d5gp*XZ9b;Xz)9UsD86>o)SxHI*G^WR`=rHz)l%{QHw??T}s_q3H{>J;gN1q+Xl z)g+@(wHBlrx%Z%RZF`-wkGSCD(rg1PNgp1dy@qkOo~;V>VEWjCp@dRMDo5Y{jB~JY z=JOAsdR9Qxa+#T7ZE3{VmG~iO9RF{c*%u$?#ziJfe*ZqJzU?~$+7$3+{_nsXMANSDzKF2PpFIK(T+r=8K_rc(4--Z z*Y3eCGZc7<#%#8#6~TDs8HP||qR+up{pS~bkL^Uc z=|9yIJiPB=Dl?3J=K49$ao$lb{Tn%CQ%r51$I6i#Okh92-Hr{Ih#q4cMop`DG#k(8 zqQ~i&P4|rjH6Q_x=X(o#py_3~n#1vM`%Q50ioBH}p-W=ya&$6YV!}BeRzqa;hAxRjd(Z>*C zI?vcBBgExBDUx|m*$Z_uG}d_{<3HZ;StWJds{*Rj)}<0kQ^#?r0QnC#4qg`>Mp8fL-ca= z&-#i1e7zsGO-BwTL#-&J2pDA&`f+*M-YP7tRJgNp}!PHYv~y|h>m zC9%GhTA3TJuq)=;5Cr{QSP(qetuFf@16S7ON(eWPeDW}iYtFK#z2IX(Fplt6nXt!J zS@FCSa+yF4lAx9K(QGiz!S&@DM@}05Wb6oT>4#p5-ba$|%8WAPJ~Wfj@Nps<2e_hi zIxQV0KZyVxR!8yaH5ZdkRs)JxoZp41CHH%!jFdi1ZqhWr0XgT=N{k&dC!wXyXgadD z#n*5Hlt}iD%q`BASkwsfF)1N@VktNYD^V>p%6aZk`|0EnH z81R9gLzDQ^Q+!S?P(Jp?@0$h@-(n215`mH;))Ce2a^-g-p4+ghJ+C6})jpdnAO=QS zPyM>+N!#28%u`gV|-R*8kHUcRzEEJ3+(joAli_J zlilO63b&|@x^1;ud%`Tu6SC2KiB@K<0IElX+g~1i-lv?q&*`Ch9z$A;IEMy3tncMB zne=ifPKWrOLIZu>cSQzWs*bdBTgt`ltD#WJVsbK{aKCZG)m*pvT(PJ0kAIW7d>#R?XD!GwF%VmCRU`UBa`}A{=5Bfo%~yVxw-M@tH6d%IjtIqapFgcN|IGDRgXN9N^>C@dLuu z5P$(ko~HW}A3e#4*69e~&XbFIG&bNwz-bjb{Oa>%T?M`dY^<#_^ssh10)0Ex2^)&- zEa6XPqN03ZXf@Cy8&%ttj9Sc5+k-k>oF}5JKSa6B6K2tby-OLVD<Er8XbTTGVGG4S#-kV>A@Dx4a*~2zsEp{8C!==K-M9+a&5RecU8Y z%a!#CLLQ)H{q_}wvNp~eT3g9!0wstQHB`jPt(E*47;CYUbHksuRrHvEad^t`U{#>4 z;YvQ^jlA6vz~nhHU}KA4#iJlF%}FJt)U4>|0Lz=gbe*M2>8U?p2RCkoH1%&8-3Ut1 z=MPA*iBapTN$a2QTd>K+iz!OnFn)RPGbvhF*Vx#*UCCm+i^4xKFLpGXWLyx%3GeJb z@X3{a*BkfsF>dLrh&RKHwD{76- zve&c;{DF%SGKwlf3RWMF!stqk!!;pMGz3itpM({PKCrD~LcLzB+W3BU<6x;Y+KlP4x$xM4HW( z4)xYseY0YCSC8Q}jg{bSzR`S1dGs4@&FbburxX#+A-;>kcG0`#F@cIk4;_aRr>D!& z{EW~86Bd}oYL=3&vHU-r*Pe8fs8JJ7Sl`rkot_4+xNzz_S9sN$!-~onEWI>{xKoN2 zMQ9GxTva!~RPHnLar}An5L#n2HQZDSAb=_cxA2;hVku@M67Q(vt0l<8Ad4pbaEE*i ziWIMrg1wUHC*!7s2=u}IKcx}Q#VnD>pg8Cx;cuZy8Rf5Gf9%S!B6l-b-vqmLbuO1+YGX8e*^)m%Z>%bC9eiOgdCUIw zJlXq+s&K7PsbA7b^s`T=KCKKt>`P-CBSIyYemlaKT<>`X?g|7SrHmm9ZwHhvG@89s4*z`NAXz0~Me^wL^<|(Sr6=z? zCxq~!Vd_Nc@E5QzfB_*Y_Lt#_Teo9mh2(1e2AP-qc^bJ$p-4%7tkUqby zMGl)kjI#&%W$#zdT_zhp)&WVVKP&olV=TmolM!gS)8eqmo zGS5C2intD0E93Iml^0V7pvq;O-Q8i2SQBU#kl^$Xw@z4+%AD|#=6!VIm(^9ELMM|S zToO-%5xyD8NqbQBYupdRvQ`YpsNXt7<0~aoZ{3#YZR&P4(nVH34M#o`c$EqLHY!4? z-*}3bpF#_qpEYVv_MkfuI&Ml2i?z65$|FBN9oUy85=)ItqQ~BAJ~H;UtwL!${e4%s z)PmIpA_!i8*%Msg?_SReJ1JiE^?q6Fv=%(x$&6g?i(kh*YAKR~SeAAXrK7s0?&u_J zg^r#-_PN_E%lSpL`uTZOt7_xP&OO4HI zg#}Q;;p+??t0IS}3IHu!sl3-DSl(tv0E*e@al!orH~?Jwoxl_ubn9J)s4$}iC4MCO z#tyoZ*IM7b2MHOmRYzBh@s;&ou$Cf<%t*Di7s3PCkc5@EBoAQ8nMnyxG$3SknQ`E_ zp1wS4VwGP{0&AxVU-*M(j^Ad}iTW&L#>Yg{epBro7JOHY?>}nN?L=qOg0J?FtA{Mv zAo-LCC)I^pZ20dA1AulvXQGB?eSqst#I3W{ko>9L@Uh1Ng~JqZ7q-7K8=a>9Q4xsyZ5y%W&%%%;B3`7B`j^ zWp|~eVTeMNe0o9ML7t7`lR53vc2m5~e#)qSvNY9;9tN}Y5v*ltOncUjm!6Ai$+B*j z`F{@!_XKpE`B+Q2)-0}5NF=pHs0BR^?}SHf1ttz@Li>5t;q0p_9rA(PtjL7NiV!^ybb3U*i{;we_o1<)`HJQrSL8Egtn+do0{#pW z#^;qL6AVocbZ4{=h@u*-sGX&)@V(4c$+hRTN%e1{h z%<8}Pk5?+=y`u1q1-<6)Eg~kq*8}k+lrgK-2aus(xc$nOvjzlO5Fd)d+_jNw4Vj`G zbD(5>Ev01*7g^p^OIWnTUJ!(V<5it9$POA$Q~+^#E43@_@_wb)?%R_G1Z(y;mC)L_ z2{S1^5LHMzigwxvVtfgSZlHA&U4wvQ9g6p@=F`F(zN87+ftwgv_?X>H$O!%+)OjAlC8L79C zF@>5^%y;X!!3C!X0Vpv%*hAE+x7tDmymcM?HMF;Ik^I#=?7BNGrK_v!wF>Uy`WI87 zzF%;w7)C)jE-Z8HWRy;LeDMV3mO($RhOGujQhsh4%b0!HN*b2q=Zn*7Sg zI48O8vWS@OzjO;B-q$SoPNm1u530f~h;5HB_5jBeTBLO5eQywfDT@PC?I5ng6sxrf zDx>KPG#hTjchJLo6@|synZW)cwIP`v;fL)y0k#SLqTAV5bSnQd3n>_>s9Fo+2_VlL zzxVT?tNG1ZjKdn)s342n`@ z0#3CKK5H-GHRa^o&E{^l_pN;&3f4y(HpU8{}Y>Yi1!vcij z>L1(*9t~EjQ<6q9N(-kIZOwcs5!c4*L(1HN6Jtc_nP^pmQ=3OUf54XCmmTv9jz1das$S;|; zCp!+wPvdWPPMLlf%45Z)6@;pMnOlf@PH*nqkUIcv)O(<`(OyCNOe`KQSi^NSk&&L> zY7yT0n|7I(7Otd?v921o!v7UmC7&BcyY9TMzE6RR_-I<@A%QvaVUjs__^JK zmbO1qQg7-TbM0TjYd#y9R{bX&VSyi39-|2~{c`5EGL(pdNU&o+xbYjOv)DnFDSAZh z7>P$ynJ7T==slx4q|wy|Qe~ksJOhFwT|D2{Rhg3L=r>L4D7vXq(#p&>L=a{sd58H`(ljMPAS&{v>}v zuwBVtF=!y{2OS!#MScg9%Vu4}X`>}yR%nR6!HXkfba>|$`cxQ>6ix;b69k=5GLb$ay%yzP0%iMHEAX55bKx)R9 zXOL)twr_$L|JhRZl9QVHONt}wQQWdb{m~tC+{h3S;dfeg)U|N-{NI%hIR&n3ehnx( z!<&|!7$6B4)t7cSK?VVUi8T2=#DN+!*o9;eWNInwY{1qkh$jrnH%8B&XF_=eY{e!tFTj=k?QiCqy9;DfQp?@&}f zLc75ms)|uGbr|b`V;G3Bn_Y&B>5X`Zu!enN$D)=Ov%219^^!QFaHffDyTyjZZjp7k zx80Ctt4C^*fsD1opP-UCqE}WhrC@Yzj0WCOMbBPF*ngF^;sdqJncc_;JGm)E5$Iao zmwJI{x6}g-3``H&b)lEb6{A=xANayha4z=+QR|tNg~&MHbQ_ag=+Qfj zp(hVq}oloGZ)yU6sxcbVB&pIkpK>?UpR5ky=^k_2o=)FM@;jBdjL5WST4>J+US5~Kgq zs|r_au=yxQr_pR?XxM;>zKERiHPI4@XFq$;Azb#B=;~FM@%wj=ogd` zoGi88O-12Fu1L^*4_eCfxm#zSU8h8RkX_V`w~`SREu*NsG9tVYzyFy4t(HkX!F)iq zzxscJxLc9piVUP*cB4eMkG&XoVj1wNgr|~gE8p6WDu}T#mk_Boj% z$7qz%Is)gnZNdbV6=?lg25YRFi4$tMNk)_%Db?hoPLljY6rr(!w#f^)5q(s$}&|rS+fF zs7LAokrgTW?{qWA-~bY;0R3Z&R?kQXN7|DgP2l&xCtkftWOeMY_M2{bbBPt>~Q2EOSQn9reMi!(Vt* zwe|bokg$&oEPJ;sTPAt;S^gj;N_O4v`^@n9&G7R2?eVJ~z?($YYVUGMCXzmV9!@`C zPdK73e$rJO26L(xg1p`!VSQMgmP7kY!$H$~>lah)j{@R>PiA5>4TGoMdpC+)S*Y`| z$i0}sq@1_r=524fHlhq3??#zAI~4wALC9JgzmmLit>J8EoYcxx%=xdRBs?Y|+x}_^ zJ^Wmr^HZw7?aH{#&l5fb&uIMXb$L|@(GQ*vzkS#R@vG*uf31p0**#`=9u1i49NOI6 zRCM3Y>G~H8g2gi8PwhF2#^Ik(y-$P$^wB=JJRdAxQL*?3k_g_1>59{%78ha$7;ia% zU|2%J0qX>VF(wO=Br#7}WN5yq&@0KXSOpzh$r>)_rq6SBi#AA|;WQ<{KgIyi+xHtR zM;1~8RwG_P2BFSZ(BM-=LjQC3cj5H&7JFid5Ln0**DyQhJG%tbk&RSPt7&8}_xti#D9a5y3G)a(A+T3>Fi) zd?R=}8S3~S&xRV5c9d0KdL#8kXJ8G9#~n5)CFO3SUY)rwl>&$@!)gUmUVtjzN9}D^ z=u;&tX0|!9^gohWOC%wG+*VJL5TSU|swwnNJ74|-6zP>_Jm@PJ`$UWrpMNxd#z)8E zhsG`bEzvLOO4+0GXcbQ_i=c>%wBR?(Q((sbhUNMFn>a@=zd5NAhT5B{S-6+UcSd$q zBhRB^w`3MHi&Jd(9`-09`|6Ty4V7z8w#9sy$o_m2RAxiI_aP#oYY^Tcd^YB~+XI=sh zcS6L_lWI5Ag0N4&@)j2&oQ2Cx;=gDvCl(fO>gQ-QT}|#;3uQJ9m7h|W&LhFS&9>x} z6u`CRoz*+efz5o95P1bXU0qE7F<;EWRRrnxp0C}OjN|4R9;m_4Exkb}67KAA!)}&l zzR--;(~OkHs=T~q{v{Xxx8D-Av1P_*du6P*32yD6larGt8;Qh}9{30K3TE?HEZK}o z;eSIDx&&F;bDzm3r8N8A=3n`SUpd?{jfc6e6$3so6+&~@L7jKLn!$iG7+1|J6D(fa zd&Y?xLW=RYv{(bHQ--wIj|vdtOyKDp>&RW`YHFn?8s_J_67^-=GUaZp6e7Z$v$<6h z7g>P_mj&JCkxZN@=~smN_;42LMuaNZZ_ct1kRY`9*#YfXx$&S8))S_At&>n#P71$S z^ZD755MW@3D28<3xNV`#tD%729ZI5kX__+b;sr@&5A^we*IWsltbwj16`bz_9ZIi^ zSdk0=ds;$raIN^X5a>A&+mE&sIh3{QWHD0k?cQ3J{sQx(QgnB@}~P z*T1}uAhmpi&)D@%G2*se*{*TXko8+oY#e1y_&q7+=Q8i|zxzlFR+d%8Di!S@5Qre9 zfrXmm;cg%YDbV0Na5n6|Gsiac+ZR=Lj~t0}li&o-u zZrpXpvORhtfI(oMiv8sAI&kdu+uGSJd|&pC4n_iduEXdsbs^$=!YZ)H8t>WF<{fgy(4?a?GQQAc5 zk-6yTQi6rFIUgl7OzM&)&Q+ot-_M+Oy6`T4c=_z%QORyiRo2iO=`WozfHfi{knl;cRkEm)d;K1m8gAtVLbfY&*8+|4rB{~%AnChCq9xSZD~p1f;V zQu^mfNZ|6?r)64si-$NRZooJ;1Q8q?5?UyRW_kMSd@=uy=_;|{V;I@e)CT?agjC6m zQZ~=}V8&U>zq9l0w_|R?rbvsSKgQv)Ad3gZq3@qjkVNAukH`?Uncv;dG+rN*>5n*h zXJB~F#VFZF!S&By@siT)nKdv%05kDUTlo5JMH;rmT<#DDNQ@N5uxf@{;lQR)$Cc^n z>AlX2R>1oovk_7l%DiXP3W-xa!kciqdEprRZ?wZ_w@dr{ zz~=`g|Ihj{t{;e4)O+9r2=^R~x%|T$hEiUKJd0oQlshW&+**HpG{1BP?13;H&%pY~ z$lE@tZ{zBb5s3;)EIe9}2i?T9Z!5DmXWX|_B8&V4JvM>GDsV-k5dA&ttV$+okpX5x zhZpyRM(1RD`hs2@LRtA#D$LmhM>kk z7NAOfbMhaE3bwn4`M)nAG!Cq{hn!1_KDv%+$Ojz9*zVRAu4SLtKhStWKsf_Asoqmj M)Kn;!d;j(S0mitJc>n+a literal 0 HcmV?d00001 diff --git a/assets/logo-filled.png b/assets/logo-filled.png new file mode 100644 index 0000000000000000000000000000000000000000..b7a904ed1b71c91b1ea4f7d09d393a7d71cdf17c GIT binary patch literal 30121 zcmXuKWmFu^^EQmTyURj?26vYQ76|UavH^kzCpZL_#a$EJAvnQ;2bW-r26uON-o1bS z=l#%U&&-*bs;;WOs_N?A2u*b*Tr4Uq1OxjD2kbkkOn zL#P^~*@s`CSj(!(A|TYpVLyRU;n$eXAR{*f1iYUA2I7EIsU`d-rMrTmyN=Um_pe}A zD+Fh-?H6~hFIMgh0$e;?e7xrjwkZe*9+b*JSzRx)<976P+5wN^b~E31)l&qB zqCpHqzd$@e4ZFv`SJ!eU`J4IOPP24(rB-!jX8c=!s%Jes=z4hEc192t#cS*9-(X+v zjEY;oJl(T6u68`j|K4KN$_G+P)df61m{(L+zefH1`LnpczuzDuBV*Op&aP$bOqz_# z`#XAa%boeeQDJjp3OKkrWafURR zF6@z&Fh>0wY`&pv^gtNY4Aggsn*K{HZUejldU#x09nMw1-Y=E??|GiOkAH$+9e{$9 zXAHfY%8_}wU7o(azW59R-XCRNhZ6o}?6|!9<@U1N;&J%m&sF}Pf%ZFj<}8`79-&e8 z_Vzh^iQe?EKNbLpdw5jEma^<;+wf8eunQhjC4O|xN~3cU;gYoCMkL%?LA{_Y4n^I# z`Lknx47B`&G!#t2aR77Cp<#l~0|o5bd;|KNI!Cs6E9~+~N+p?9DTP+t^C_6H|5dQM zWVEd~?feH&3TY9*1NHkc01HUaj)nMO44-a#1=1DOI(m278rqyokC1Y}U)93H{CXrN zCKfOSvWrcardDL254Ti71&#DcfBdu(eh9!06jmQof?GKu6r22|E@4_Yn&yPBddIPi zMuWL1SmNEr#e4ckPkZsa`(lG zdfD3LwY*x_L_ORoVftggVm=0n8-&8G73~Sm9tN#xINll9d!>l`0dNw~@>r6zyNFZ6 zRVJjEs&1p34Fv3Zf|ejQvAzanVGq^|9t?DL@NP|@n<8J*Jy8+aaj-mGePDD2@t0Ua&i35$y~9E zr?%s9GUu4=#oLbqn9Ry#lCCL?bQkQgNBx&tREEVMOoLed2Z2hA0Jx}0lC?x1W}Mkq z!aX-T+o-3f_k3JuH4?yP@ciFoNWgd2K#v%Y9pNp#YefVZ$Qw&q9f!LMwrsRVT`9FO z;*!{znHlcy<`%4`cvCp`%qZjp5&z{IvwCKXiSr}TzIIik5fkW;otegjZVnv{a6q=#F;!eNR$v*p#H+knd;`}? zp5N~JOo;yj8G7)#wTDN;b-}`J1@W8l=g|z|>aa`(#!=HE@lR9$jxLu1+I^qMib58A zkoiD{6#l}Ej-tsg$GhjS-^Jl@kaGG2xhmh$@}C{V%2yFf5~Es#?BmT-Q{D>%KG}p_ z|sgT*5?Jn!2= zh)AB}<+tc2+>A=c7f~XEWUY7b9P+3-`#i5FcF)6RrdP#8Gpj6-OsC~DAyl8>#L^Yo zyKrX3R8iS@%5+{yprshYV`Sg|Vjz@hBghmO8XGjpztxkZt;AqSpCx~3(DgMp947CW zt4U6%Wa9Kee5~o_3FLQan@q@I;&H!{LwV(J`O_=GtS(!n|75*-<>;1{>C;|r6qJPn zzlhSv|08)}6HXN8@z?wTQY#?l2+3bBjXK62Q%_PUhEvSV{yWU?twFp$d_AIX z0XjhvrTbgip-0#&6BMmJuQRta%g@->yyZB2(dG1C-yv@g>TGH!sllicr7Q2;>+N3# z`xq~uj$0O{ff}pn;An9*T|O@aEyOIAPj_8SNo$KkO<4=6d7t2MwM-^0*g*;yjvpLO z;Rr1H`SZZs>tvj!yk~HL+6@Q^QgUpbJ=z}s4_A_baO~55kW*6|#r^Ds&cK?=vc~J8 z7Xu-kBtOdU-_V(LZul|kHxH9a=C5Sc!s5Vr{aes7s~F^D^MV;nq@{q*kU)qZl>aV z>D++pfMaN=YN41aacixZ;&(bu%|PJICJ6vw&qqo)OY>GwNO(%McCI>9{^N=d{Io-U z%BnbI{@3QEyRB^W^T*Roy`gysXF+uM9`1@KP&d0-1dW=%d*jz5zVV$mQ>~X0ugYn# z_?PTy^Zx*xQn@{t_uTFi4trD$D6O{WRsnd0<|J%82>pv@gyjkt(?_(i(oD zT*t-KsL`+F-yh`cQO7ZxGe0rj{L{0VQs%-1R{sqM#4-3-{kaov>Ea*HFA2D$o4(D8 z1vO{Cs;a8`&!W8z=+^}Ihf}O52nl-#>x{V?J5zI!JpaQ#;q>9tb% z7sIo-DAP~6MA#WOk$x`-Nod3*&4D~a2<9`5;gERz8X}@glh-YgB6uL3p>*xYRDlfO zpfXK5OsD`T0)QVXQpsH?@qT2ntZJLo+f35;>RmE{Qr{WhNU;f&L@n zK|3^%N8`xA&6IiAnV|LO+0v@F(33BWs(hFKgPqK3scm8;gp@Zi2zR7v>gIT=#{Q6e zsEMS~+@ZE!}Apq-sv;~G{uub@&2l%>3)KQ^4=r0WZ%qzy`*<3B-{ z&?Aczp|CCE$XQ{jzf-ioPl$_jKgC=~S0erx-S!Vf)7rdN00rbIJv7%w*Q?hxlEzU` zm8wb9Ymi&P_Q5hW^N1NAM+m@ihsX7=F8k)O$MnqfsVja(YYW{UjsOS5q)K9#?@#lXt>yO2I z*>l9@Or`v+(G(Q0homo$0QMr^!YPjmj56U*k(PRfUj8b(^>0)GoPKi;us9A5j&b8= z=XIyumJi8)FbPUWPN>seVgC|SPAPwXyo zUjkY78Juv-;R&UJ);lU2k4 zG9bVhO&aX<>uasz9UBNu17;xH(=Vr}Np%>t$l1AFK46_8eYJWBK&)>=D)1Sajg9d1st3`ZItatJ*oraeUUDqzv3%;rlyjsTY=jxr}Kn5-KP|8=AW`Q1AdpV z62BSpYVU4KEP9VmyP3DiREN2I7^B(y=j>QX`az4YKE!KF0W-U8o*RZ_WR`{z{Ytn| z)c*2txc<2M8sI8u@L0}S`;3NOEW3@0Ak)W4*%{8S08ndfGd8V%pPw(3>tTNs>i_ACA{CbJ;(o|(sXZl@Y2w)zmHyqyWvr73ii@kM~uvcPHtf0cbL|M|1g*jy^$zsO2Bd|*=Y zk}7Lyc@VAySR3zpO|Yj|lxPUf9<-HJxQMN*CXKCFk!GANcYF42e8ltIlWf|Um5lOpN8NAautYsKm+ zczvi*lFy7`P-pG4p*g?Bsv5kBDYKTa_iSHW2g3pk|O|ztkBlF2ceeXU=^(8<^i2X z>CrGSaAe`w^YAf;ve7B@qhyK)hS_7?Uo8LlZVN-I8$`-X_EFvooWkVr7x@R2JuS3e zA#xo3jDkR@iTKx(qwfVoVAhiemHpuG@_3lBS#roWNu1=3Vco|RF`34n~zN^ zUW2ge1*AKR>9<#IOqE~%-h7y=Hh+y0{XyZg?i;8m7U+Ol!S^*D^E!kiRjwRhi?2eu zO(FXTxKLUMN7?@oiw94+WOROKf6jI?oZgy|Le_=`lAz(ry^KW2p(Ga*nUrRv+b|e< zXdyq_I1$Fl7r77fkw;2dD88zP4EfIS*$tH)s(W#NPW(EHP5-{&d3t!bu(<5?VLdQf zOd9RzN!o`#1|jKaR_#D^gIjfd&Jv#s%d}S>KN+XMb4d#_tAFBKT7H~?k4M3YoO(e7 z2+W9tg_x>mFk>G^h?~zR?SJ$7KO|(k$<4eN9sbo7g+cV3a=kvlGtM`M$Yuw%76YnB z1w&Uu1jhzA@<@+p^-o|l@l*y4P)s`1bze)|mZ)I-WM(*Nni^o21O(m{;ZQ`(vBEutk8_vdkQ`0uX{Pg6ik1;|1E@?X0FJ&$Y2;$$5;!w0hUpAFG;pzg^Yy z1GK5NyN4xj(X||#klHJ;hHUECOZ+>C9_R>)`)RT$_`{iC0udZml{j7tN;-$!KFCqw2VBV3(`0mY}DzoId z=qQiKjX9OQ@<(<(Cq{A6HC7Y`TSZFcs9v*Pl2|vo$4jTj@8;qlE#0D3xBaN zBp^eLu+;M_ye?N)VA;HRIhZL=VkC6Z%bkkM1nM75JH(+)YR1Ql-QRP~WcAf>ehYFx zli266eNNcPbH9o)Jye9gki)0B%E-iNKd9lhozHOa-tH*88+ln}9O5u_=dP&#jsN^e zoF`ALL4!r=1Ei%?9RlE-F}3CVHs9!I%qM~3PP1PxOpBb5su4vY0!^-|V3h9Bi&DHX zC=TzI%LH$wU1^CrN2y!6P8`{} zN1+*jEdr+JB=>Ebwk-k4w{J0#JY`n+@wrXkClL6`TL|fkkN<1yOn_PLm76D+3HG>E znAd}C0512q$R#X z#B9;4boFuNmgtcbT%^pA?@Zy^y>UVkgKgWVC`Ge}JOO$+P}_~~U|~(@om6YP=nKQSUUTO)6 z)md;!s5KUt&=tH^P~%l!uduL)6j?IGRJVRj0)JILo7A!p%+La3<{prF58x9+e>CL2 z`pZ9lh4ac#E&#R#5nDM2(<$g*)Q9sog<6laG4{AF^fgtAf$N_OdJfr$W_h3zY#N5W z%IGvqF$bZ1?4o8+{w> zd)LoeA|Zm&fAqdH=7cNv$V=dFSbk`7va5YOqYmMF2c$tdp4Cz0ia zX%xIO^E>bBUCcMF4U~(wLMBY8Q6#ZpxRM`qMyfFS^;Y8fYHEm>Rj~zl8{%ro8&M10^0s#T4Va6*H%H16Rvy4r(RP2<(NhhlTPsy2%8uBC znn)bVtdom5fWz3uqa7kSo&jDN+6&^P#|m-mI0Nq*WB@QzC=Xd54g@I3Rh<*>?9yQ8H=Y(Jd< zzcHxNtBweqQ0#sbz8M}T)Q!|zro&u;BsZ)k4^_zA1b*0el%s-(n7gc3VpWuPmwJSz zt`qwpMe()uHD!QQ<-c+%`iyX#Chz_Rg0Md_5hP$lI66r$qzdm$MZ~$^wE(->c?wMk zlR?8yZZyz7z4(VsBe3&_hA{(UFAq#r()7X^U?n}C3IH5KlUFIhz`mechzk7VHSPBy z##_|^#W=wq%p}vOD7FX?JWf-Kb-(k01p>gN1lnJyjxH77UL+pk@r=uUC!`g5?sP-awj=CcU!I3lyiJ#ClIqnWDuNonHH{?Tn42HaW0rTt z*IH8IyHL_IE}D=EJ1!*q6@~uBAtY8T*L3NnmfqKbc21Z9@>doFIB?f&H(f4G0G>>7 znPaM;*KZY;76rI)2V>w2n(vda6lV8owct1nCB7NrQ07r-V}0$a!x2`kkK4@03CzoS z0B}N@(Fc%^kWQnN?-!jqC2RS28f%y~>fWu^*7E<`0)0fG{9&e6^ zE(0kFqIICSbGeOKxjKO^$_qb85MG#N@=9Hy?BUZ#+W zQ#~C9^nkvH(1lQgm^R;^uqe!_RiIw_IY&T5@fc&eqrM@QF=ii`jM&`wxFMp_MYea= zGOkWx1Hj{yam144EFy1(nox6rVg)p^bD+2Gj7GZ6^zX&Y3QpR61&ZB=yt2)J{ljt_YycCaFv?fKkxfO zMrmPRr|O_hz-ybcdV1_95?sfA@&FI+4jD>G<+8sWM|OU4RqoTcNEX+8#KrM=P_zdQ ziV_^NLM4#WM;A8Y+c^_AHA8q?ZP@5w5I^XVh(7=_p7FOJRM- zFnfNtpfxqqj6n+T`vg42)Hvt1mjVucsCuSAbk1#~Jm|0KM7&JDN~yqb;qUtJZY0T) zy!G!+=yITF)I14kkS|h$bw{w;p7eYwM!aKc-dWjOa*T8?mbEK3~UR}eFolOlg9kcu4MmAN2LS{4nd zW7wiMU|RM+)=(6WaLIH4#v@-p;kPghtIvO?h_vpsnauB1tij&axYwmC!nZCBBrI8i z`!I-`2^WveCOcA*+yzcIGP#TjS~Grpe~~I91&~j5A#yb{Lm1GMH`DnLn5+aX?We;O zql<{Inu_;FC`P@SCtbW~_7X=fd~?cb-g@S_wOPme4`^?weWx-@E^0b9q0JFW zOb!i@?S+jdjf=^bc3lm{4O4f@#2Z_iwCXeZ=eT>!m9?(N#3wyo|4>WutYSVT61qCv zHIHo6K%Cd@PXj>FuMal6ehR(J$^)olWniZ2sgC{P3?d}Ge^%oi(LK0kP06A}`gHN& z4RyB$h(J}x!@>V(3*g4GkA|*;FS53eRQ{!m{@M^r&JnM`u-u@YL{u)y@upWafBxCv zj~#~M>%R&x3}i4GBBYxAW)hl(h)j!D8+a4ZMkySGKn5iGwWpG|HQx$&|2VC zmu1y3H5%GCFsqtkuaKO{zz!1)w|of6eKL6u#&9kkLftT{4SgZ%WUQwRYidKa;hx$p z!?Mu65VCuh@t5CkY!CgI)wJo3h->)AFfG3>?8uFbG7cwp%$F^-%-{RVBUY;pi|=5n z#sK12#cuE3-IYXt2rt;M<9!j-y^s;rHd$#qkxurZvky8LQAZeA!^+~Q^qsZf zRfA0?8y4dvyg@*=kAr>rros>6HUuU3M-)_(9&Jrae;>6sQ{1ay$X+sRV&`R?Pm@sN zipB}IfnYpNj3ZU*ZlmGV0P|b4HQf9OKuAwl`q!@XX+kTLpYm*sw94ixX>`xLbYfCj z0rmd2d-GT44&^utbYCC}nS89K+l9n+Ye_d;$%6sR08XwtuMZ~f-r+xf8zvMFqw4PD zO{Af3YyX>=OK0Jfjg)2MV?MT^-n2gAuDghrCDFEYrkHELUCBuPlSJZ@Vq`0ix<7hY zJsnRMK7}aghvrbOgQtM5JHQf{qO;h$4{7tyix+|%%cz?%aE>-0IeaHXZiKA(iB8h* z6Ld(-R`pQoE>jR1l3*mI4rbkZaC^R4mP%NhRzGP z+3ZDM*sMf~ukWeZc1RUL=8Tv*<(=*y)s;ulv&fXE zF%aOLRMrtT2nyzd2`d;D79Hxcdu2^}Ce&!(TgXIC8L~!*yK`CuNjMj@hoQDH4)PGt zpH}agC^2z5rcrI-@7ef}V76&78^EU~7Pu;MR1jU9+hc~k5z|E-EO$&D zy+^Y(G@$F>^DPg+nS#6tE)7CQ=G8PyF+5$g#$0|)q2Bpy|sROB9VE0 z7axK2_PgZ4mqPSLREXxI*H#pmk$L+#r+K)tUR(Y~(eE#@zP`l-2`S`|`s@iUrT*d?VsnITY&YK6W<3!Q%x5D-fU=V{=I)Nj7%Er`&qHWWBEEUvhcnK})RfGXR z7JKv6d3sH%uoiW;eqylgFnlckH`mQjIxH{uk}cL5hX6dO`NKf7M2Au@0Dq=nf$wD6FNf&!~Me-yzje=kPFr-1Xv7JQR4HMU2phWj6t zTSPA+u)*_qVe7NJ&x+n_%Bbv@2cozIkLIpLSLO;DSXO59X}mvSYIrDzC`2J^PozS9 zAgG=`gmFvyg(i||Uu3}IJ-*c48kjcbqSn8j!<^US5I4h*6+1gPoV3Q2JwAs!493b* znCr}n5hcM!eJ}rko#~O4ysIbC(aSPIgN5s{TmS6rH%E)}dbg&L(f78m*xjFU9C-b| z5RzGGw+?&OOX}v*u&ctAY16K+gdRlI0A&!m>%`s+Sj1DXyiO4iI%ih7+cLhxrHuHtD@ay=EZ3qDGrMr06@7A) zP?2Nc(nh_F|{+=AX|4Nj_0#A>8OPH!IR2|at zawG@iVT59QrspGzAQxjazI=DAJYr%2xuv2!<)rV{O;mPU8{m9e^dR6)E*$wsgW zqG6!iVexiD0w$9EgK$OnV*cy@-2A(T$-@29+PFr?UT|1OE&WTBSilze~tK=gX@FkOHeK{OSJNpb8o^LGFu0&}bIVaz1%-+Qxr|2pwY? z%*YFp6>)Fh>uafv>rEF24@OE-%rn)P0!l-#v*%J_=y-y;m1cWh%ArI z|G2FYiCY_|$K=4LjDhq4R9?{C)sz2+5iT|RN z1|zC%W@v`TpAivg~?F|m4I&wM>aNT4q29qh$9-q#KCN_ zQUelTSsDSXq>aMbN`dGUMG~-;EVQTxx9$cG84^N7% zJ!i%0Rr)@p(+i}NGKZn$RQd1MbCw?UGTP7u6yv}`=almxZg?o{=sw*^+wyd_Sy!ml z99Qgxw?(pabxh8eqrxmX!6727*!gu@>Jd)%apy#t{DxT>$7TRC76 zZgeEUcq!rM2)w=wN5$7+?Bk(LQ~Hbgh74C6J1#c9!KOD_Q$e@VPM^8&#YSDRUnLiT zN*E<2kL4(TIVshWUKpG!;`Z|Q_L8)f7SpBH*VB7L{Oo5aXU6Y{N&u&1KIdShZvJ<2 zHV)od6u8Od1e%9K^kgX6Afbe0i8Y|hM_Uvp5>A6I;@nF&t9~y96Df1xJ|uEV_CI26 zYq&x}Bv8zJyYhi(?xiF5RmGY@)avbYfQL!9oXqwJ`p+~uhv*AgK%q;Od)5QeE1}O~ zN!$K=hs)0xN3wJ&EZBXhz>nGiS!XIn~BLR^>FZ2 zy@~9k?|pl6!6MMz?sQIQcyb*1c6Hr^D325sG^{(oBA6eG2K zZ68KvN6x@l)u_8T*-=kTPPGHj6Rx&Mk-z?no=}6uYBAHJ65@qV;m#@}c9F`pczX2-Ie_~{J*$~JJo!p` zIQK^LpL<8ax6Lbh{FyAj`WV`&bz2rLG5`mV`I}_}=|Biejvt>b%b3De{tFtieVP8X7`aCqn#M^&Ga@%Wg7`tu{V;~$m1gE9Le{t2?{3>WChm4KxCH3! zDT25uI)H<=M>N7sDb|mN z=i-WaJ4TBZnb6xd98^-I{_+I*pKy(b^KH_IGCI0_w>$T-BG)T4TBZ#G@4Hty^~@x` zctuHG=bMD$i-*e_v;)YBo^TGjZDtxHL(&5dq5@V+`kkld6869^now%8WSx6fCw%kI zDNOXvD{!7Oab3=k^_$|KbmgRkQk{wLdm^&zc$Nxxvw#c<$@%IFgpC7B8VxF|buDZt z9R+w{is&2SFtjw9D&UM0a7hJgUmMvP!F=L{B=^y)Qn?J5Z$dkqf8qo zov_CN7un~W-*Wa%PNuU|RG?{n*PNKdP+jvBsK(CIIWy1tnv0e$m3_Hqk{kiG2*v^psJW)A7S`?izoA z_@=cH`9UFLj5R4$-gTVxGIC--@rE>``|3N)U_}dq zhZ*jJ5PvG9NR%QSdiIlBH;HWFxc3R%Hz&JyKtovBuof$vInTu@5#?m)De1v9BUprVxPc30T*Sy!Stw@t$|^WIFLLQ* zEET9+c3|#iSxJ7fWeWEXK0j9o$g&cB?!`2fU=y{~{ESH(IBW_&FKxjvzYdxxgMk9k zwxp=WyqG~`TGtcKWxH0*|D}m9NhbluR^5XLhYr(gkbN}t(6^jxubZzUqNuBc;rs?6 zbMh=Y=qkh%4C+5%n1b#bR(|nhyQuJpEVq~n*czbamRcCf&}DqzM%ab?FBk^fuWkn~ zI(5*Qt+aC=1swf8gY{^z%v+qN-5#mlycwX`mRR^~O00n{qZ!XLA{y>CnfLbsM-q%U z6A>@A5wq^imnqK;D>{tF9iNT;4UQbi>jKR0g|Vy> z5vN>u%>+fjEq`QrF;pjBVO#K`P0AfemFy0!O^(1TR7d4eFVgywK(<);D@Q%B2UnO` ztScN-l*PMrs!Za@Ix!nR^#X^P{+(6TXE?tf=D#HnQ#6tmx*e4U#dX^WbF`iftIXlX zHhu+v*n4;^TdujA<^GGcIL3#ZB`IA|V{xxB`y1s7pA~&&@~2*TB6|3DP6N}RD^xfP z<6l3GeeFn!r+b98*igdG5M=E*j*0UX)&WB1C0rGXp6+%C&Ek``-Bo zaZ_oiUU9MhW@&cj<|lHD|1G0twHEB;Fo7Vjmf{Zd|Kg_)!0EvXdlIcTH~1o(75YrU zu!1TN6r+b?QVsCdF;Arw!+cdHsFk;DA}Kkxtqe z;HM&|XvCa?3aUIL*6BVVwho>BJf(H8gkb9Bs%fOlwNC^Z4-&F4rRp&{hz%%}cDa&U zY7zuw?RyQIa8KVzwF2Q~;!%hGxA}aW(?R!o!OC)Y;$Q zp*}s#NlR}va}kA3lnF9Pj$n&u5yNcvc_Au=U#Pkbyw?C_xMhNea7-7nK^D8 zaTQPgAIf+>NN}bo2+?4Uz=3dtp9%xJ02$|dDL(PG^uuIaBA5UOq^%QsM_^P-zh>%; ze%!kH{3Wgl3Fh%u+FRUF?H#zsy4c!BHRMmRhK9yYZ*s|SB3BYOwuf~DvMTM9D=PQ2 z@wLJ{H*Fq2G-#TZ75`%M$qZfQ5iS{irXh$3v)ny?vVjsTXjC99BpCK%p=F}M!`RDZ zPIY}5QjbUZORPjr!wy0rvO;#MZB2>X!x25STjXVLY;Wi(Yvo$P9p#ROEYbKTP4Cvr zr~_9LT#GNii$_NXpi7icGUsk!JL?u2xHO+F1rukQd+3|`v)=I~Q~g(fCe)~e?d+sZ zOz;W+wXedbrmn(RwCBQ~n=_$mOfe_<@&QJY{W9dgo^?AK#p7Enb8W!@oSjCH5CgfhmYcK) zAB>RzY2VGtv%xre{3eGE{-v6eMilWzf8nKoDcT{^H7Hbm+~jArkxNc$iW$~_*$F;y zf9y7fZpXNF$kio3l%C?hG3n+d-Timf_*x8DsQx=^`os33DfxM14D$4X9?5Y_1$HB_|fyEJOjRD zsT(RL0AbksnAXLUWXY#)Rn94w?3UHX#Ct9u7t6bN=thkA+;QUMN`SgXU($t=#$G*D#hr2WGD}oD-$+bS!;``52qRmO3 zaIy*FeJL*Yc!$N50-rZZqu&yS{f~bM-iGz0@-kA#ReV@>9G%ZSiznE`9YQQg@fV1N zGlpOH)bo_|TmSzc#=@r5cNgKl}DhVErNO``g zkl<=qU%ztFXEsZ1qF=p{|F4e#2k^0R8F&ICL|jnPZiRKm~NY6aa-ZuK1BGtNm0)V zzZYiug5R|4X%Y30jHzkVUY|VA~_Ih?}3;7?p zpIgc+b}ZcNw~J1+7%Ak9c*Cs+-@J{i(mq$Csy1nr5&j>BIco-}3DLAwdHV59W^W5# zllxlx3;9*w1W#B32Q7t8(-(fbS<7it{FdO{?+)@@cwPW!S<^` z4y`9Y&3kWEWW?Ryod@+ia}pKB#V6>{GA4T6j{%_Z^}LWPf{HMi==WxUo*K{y^B+F)IGnZA@Mew_uK3Xe;&R z^3s?||LuOi9HTQ3M8OQ3GWIpYZOWb{YV>p0zFF>g=^Arc{9d`<&uKH08pd@xrjAyJ@F8u? zZN^Pf+jCS4Dc=49ZZCeS0A;0)g0_pnOYoy~+V>K{a7-_z@(c|-jB4p$ttGe!-VcsN zvicHYy^CyKI>=Vl88gZ6Q>_!mWq9@rMe~Xu&f*GG3~a?ks6H5fkhk#lFE!y~`fDcC z$0M4|ok4f7V{m<>@meChC2t7ufI{k7;)E2shvRwW4atNW#&G%dIdN8(8u>C^M;4ri zD-XMs#b=HEOhq=Kg5d6jF-`IDHu5wlDNVWq8aLy`?*3wqBtb(jC8M6UmyfGQ<4|hq z{?OS*`5YaCWgdqFGLO$zzv;N3^%GI2%&@tR#~jS2?3KiL{o>ncbfMSdUgwb^wV}-P zvE4k06z=UcRVj(P_us#Vs1C1+2uHtu0KZ)}qM8iYhHVwl6MR}IF5-5)jh&s~sTTTc z=x>`|vmfp3JvRhin$;mP>A2qF={TI`IX=LaKkgQ#d>vH`l&G+;`u)~+0A$!cXvkP0 z#*~lUSj7{}m)Np>;0zm8+5j@uPC0!b9!?z-h8?_^<6|0Sx+j2pu@fl@*);2!=T^zlIY+Qx;e zjjVtTLP@1~A+&Bk!Jp+m_!FnDhG`L9fK;01rf3>d0y&NZPi=VYYYn}8lt%CK`r3rX za!^x{HHD%hT+f8m+i7K)6XW&N4c4B&uHrw^`*1C-PLNhTzBih`NQeMWnaAO0yr8`Y zZ5aQ>Ze4Hw>Fjh|e0HIcjgNjz^APBYw>TTGm`%%QU+49Q!Kx7czl5tK0;qS}4F4gz zB&Q{4DM*7zjz-4l?tUXk4j4!` zn{-YHi{{Gt^du_YVbMM^uIoEZrOX?V;Oj)tyFltr}y6EQ^`;-{;@+zUJ z;)r{&R6>|JU;UfveVva*lM~m;+c-r1WXU0qTAaynV$?-NP5$(g;q?c8!Ikk9fV*8F zEEm}j{)Ugn2{hZBqhOZJj&)ZK+1yVUK=M!QJ?O3$hbx_Znn=1l99!78bNpW)K1P7| zHmuv5y!x7}6$fjiFT9`2#!+Y+S|0mM!~%16)qly`6DVJ$#x8j8=`Qx3cp$pzG-ui-!GgVZYJV*X6et?AEGm+ZO4l^L<`L?apZ za9FJ}d<2vkFrrMMp4*k(XyYgIPoJ3iux#7O3@UH^==FI=DR_d&a%m;UzDQ0BN%h4! z^E%AO8Dka%m+#Ih!j%>DM-7sd3(*}!PZ?$sk|jezRkJ}qdkRlsEg%Puulw3GdNBov zHGz{z@rS3?>HQM%P9$=;0YXKQKXZIfr{Dr3I2Xl(&*@gJoieCwlM_#*3AaI~IXnhY zTg7U$nK{?g-@f^849k=L!wSaX=Zl(3f|&R4{) z56m{?)}hLYt{-@QOAgD@p4MezZ%%PozvTrsMKnv=$zv$qu$NY62lVAFhc1&G((ty1 zg1@M^rd+GXgo!qNmu!*LxWpkn9c_5D*=ItLaMR52^;&U>xXJZRW8W4Y50`MhTS1(D zc0WDe-4{dBp~hy84Ji{gM&ILK7S#BH+OmO%Z$(>SJ(Yj^-V{yXe83~#X@=eoC`x@ zSeNQhR)nso9B!aiUIeiMMCE$!3{BVMfhd$HL{M4zGpD7fR{Z+l&95MGHTl_md;@Bz zt9Y2KQxODK*1}JSRyKqc4E5A6!@9|yfj_;|K(=jyq9(b7wNXmw>q z;O()8=ds}80jd1}D{|WQyQBOw2)Z2MmLT=HkoFAvI}lOYxJSR_UdJ{kA|xVF(I$dX9lA<~9n?8KhrRIp6=z}{ zMk%5-7suvg2STow)GAUju(~FvYS4A<#A}RJ+qoXoZbETAcG#!pi+Y2w( zpVQ#2zdIn_+`Izufl_nZF|Ghw5XK6(hr%T5>q{5TpD=#%uD&lp@RcG~gaf0p_Yb$VwM#aO z3@hRorFRdq743X=AuiVgs8a$1ww&qB%R(Dyzbx&oqwU|zdXl$Kn>9M*EfW7MKU6sM z4=tm+y_SZ_Bm8A+n$-1cHM-U7sx-A^AisvL77lKOHj|&#Rdn{$H&oKi_R8-K{_T^S z!gG+%_$;+C89wE9D8j59QG2hN0H8uUy>2<^qDv69L5aSH7=VcgjMd2~YvYsuw_|cJ zjTXPF?i1l@HNhN;G@WPQ6VgVkm|=~a%_@( z2FT_@oyK_+1hu@;a+f#$bqkba3TqYnt~RXp3RL8X(6a@9f1x`OxAEYI9LTVYA;Q5O z_g@>|)d7Bq9NYgM0iNAj)y3k9@e|PvzuVd*?AxcHCtPIfEw+Q{`vX6QITlFN%cl`% zMCl%ui-8{VApV_shVq40>1rcPtvs0b1PYb6gh0$0u_8l+rl8;G+D4Vd%k+M&L(zxsJ6>GiCdZC;-2PkPdF111HKDs$M#Tt{ZSwZ^ypgoS>~5vNbHJIjyE!g$p7l#V_pLke7K0C$ z(L;y)!BlHLT-#|!IGA<8w2xgTBcpGCoUr)v0xN}z$PsMjNCH2%gsD@ke_puZYI z(PE!MdJ6~fbTxCx3bG7I%A4!C2O66t2GSr@+=UY%hdiZn-nwtjJF+~2C(O4_Lq(*> z-S=iFxSgn(_-1C?+#t(hIh30cC8X$qD&yMUjLG(to*Pl9(RF(Kb0G!vmw%l{rsvSW zsR&7Qv1oHYTOlFp@fNy_hfL>>ChOyF;@BAOW}9{Yo32i%|5h5*f7}^rzUmBh>ZHPC zr{&-^fxP<&f5^W}jqscIaGI|Fx&JroN1L@-N)5$H)ljRok?&+5T%1kdYddQH zGuoEsS~yr-XPG3cKRW0yAvjK8Kfb-c4WA}Ccr#)Ktt;!>rM&e@&V&$DNhc$GnviuC zqB1iiz|t2}?b#{-lPaXDQr-MyGfA{HDg}jBR6$k#QH;REl=AY;-{IBKYc_L@d?xQL z#%G7VqHEdA5#-H_2~q+jDF*5)GMH5rj@O%&>2hDYy|cwC`pK{#SdqULp%eiCS$%K7 zNXY*J>fu(IVPUqFb%u_~ZV*;)+s*LxHWDRV8G1hzj)$de;s1Sa^58u#Pbohkj*mDC zR9snb%S?nU*`9`4|&KZip@!q0q% zVN(tQb3^eO?^Unxci~~mkl_3BL(}3QQHB4TnzRtguBEVEwmOw2q4cYefeB+eGg_gK zELS?O^$*t&378eoI()O!GR%sdZVNPN_7BueWd<*;**JGc*9n?5+Q5Xio8I>ye(qRX zh0gX}|4%lt^l|3Oln_XRwWH_J$-`)`Uqr2cmUt9c+N^ z5kKf`)>q5(C`v3I?;>SkmM;6>1;%Sn3nM)YbWpDo?9c^tSi~mwaJNpldexqy$#&79 zM#*Hbthb@jpxI-=u)yzM<0LN-H7_UxJ83sww8Z@2-vdRJrUXw#tOZYHF+ivFA~5-G zY8bei8hUjr1p(|JhM^Wmx0l_Y`!ozf5}XX_h8h<)KcCi=q7}u;h=lz;KSFMM=AeVi zXCYBqvgEs78x5cD=Cc+%Z?4cDj&0Ih6TYjQ!E*yVG+~LP{Ks+-L$iU;UD{;&C)QYqx$eDl&SP+>DEIgj!l#SKxu7PJq?2vu2^5Hs6^& zZ`-T=e4AyunBn0X{G;^;SElRCx_Tv;o-9JRYKoqwhq`$~IysS5ddnES(hB^FmQ$mc zo$w;^4-+jUl#gEf6yd4)3X$q7&C5j9bAs=~rVwy;PGsLpHhOZzB!-q7z0?#5(5*4k zpQZ*JfY#*C_)KMprjittftnT_p0N9{8^QwC?-dTISt}92gF@>J;W*Eb|3;fg_05HJ za0zfsJ?7lPX4K_>(55Lx!;>`dF*F|?lzZs0U7(D312%7TJjffp^i}}t(8&zt7mCNV z0|q{N^Mrcy$i$bz<>kc2Xt}7>81;cROILV5W~a`Vv(j{%@&Nwbfsx3l&e8NsincpH ziUF_RBA=Kts)vkP_{HQ(%%_66*8^Rx!owzAVQRdcw{A`Hm z$#{Jot9`mx7xEzS^(sJrjH}aPjgANAhvSJP_CwW)pe-j#8+bhP?DXVaqp|z(8k}&@ z8J~s}4+-Vhn+K01Kglw6|EUz3Y9S7RYbxPGfp%i6^cxIklmn>6={X(`hJc%6i5|$9 z%$uJE3f3|44e;R2cU~kw=n|_%RhOPN1S>wlgx|PczP-f@r`3I;Lhe-w*t16 z9akuBD=f9(SV&{nw1Bgzvq7Ug#F)_}ZIat!H3ZJWD<>1$p}~IntVPamJi&H?h}2D^eGodIc8`~1euuXeHvK$#)WztqFF9`j&MpjRgo zAzRbs_{QhS|HZW{KY+VA9QC1YX2w2xPd37gQ(fg?93AAeWYIYc*z(C(a9o4?l?b#8 z>vVD@y?YagyA?$Al()OX(X#D9PSEm&lD$cGA~27nefmoo^6;MJ&;G`XwG6Ve^e+DK z*!|WPNitUNvpEkm4^JUG|Gt{{tIn?Z^ornz-sZ}E_uc*07f}~ZoS(b}G1NY(Cl|(y ze~Y{4Q%*xR3b7WX>bZg&TNH~^-A!)im&O%{bmM}=0F-`kP&8`vXJ;muK&jHf-bA6Z z6ZSkLkTFq>9v}*8jd;G`Hu%=f=nb~n*WtDEe1BKIdw~er3o$UzV4_8r+!%S@t(xX~ zud%|Z_O5$F*}$#OT3ot=8jRrkhw}z%s*qvXO5xr!tG(v8r0C5)lH_Ktp77jf&OMvK zRAzq<$`v57N$scFWB{0dKR_ujGnTT>|7>T@P98lG0!Ja1qVl{4Fkew@O}jp9_Cn}B zT6d5gp*XZ9b;Xz)9UsD86>o)SxHI*G^WR`=rHz)l%{QHw??T}s_q3H{>J;gN1q+Xl z)g+@(wHBlrx%Z%RZF`-wkGSCD(rg1PNgp1dy@qkOo~;V>VEWjCp@dRMDo5Y{jB~JY z=JOAsdR9Qxa+#T7ZE3{VmG~iO9RF{c*%u$?#ziJfe*ZqJzU?~$+7$3+{_nsXMANSDzKF2PpFIK(T+r=8K_rc(4--Z z*Y3eCGZc7<#%#8#6~TDs8HP||qR+up{pS~bkL^Uc z=|9yIJiPB=Dl?3J=K49$ao$lb{Tn%CQ%r51$I6i#Okh92-Hr{Ih#q4cMop`DG#k(8 zqQ~i&P4|rjH6Q_x=X(o#py_3~n#1vM`%Q50ioBH}p-W=ya&$6YV!}BeRzqa;hAxRjd(Z>*C zI?vcBBgExBDUx|m*$Z_uG}d_{<3HZ;StWJds{*Rj)}<0kQ^#?r0QnC#4qg`>Mp8fL-ca= z&-#i1e7zsGO-BwTL#-&J2pDA&`f+*M-YP7tRJgNp}!PHYv~y|h>m zC9%GhTA3TJuq)=;5Cr{QSP(qetuFf@16S7ON(eWPeDW}iYtFK#z2IX(Fplt6nXt!J zS@FCSa+yF4lAx9K(QGiz!S&@DM@}05Wb6oT>4#p5-ba$|%8WAPJ~Wfj@Nps<2e_hi zIxQV0KZyVxR!8yaH5ZdkRs)JxoZp41CHH%!jFdi1ZqhWr0XgT=N{k&dC!wXyXgadD z#n*5Hlt}iD%q`BASkwsfF)1N@VktNYD^V>p%6aZk`|0EnH z81R9gLzDQ^Q+!S?P(Jp?@0$h@-(n215`mH;))Ce2a^-g-p4+ghJ+C6})jpdnAO=QS zPyM>+N!#28%u`gV|-R*8kHUcRzEEJ3+(joAli_J zlilO63b&|@x^1;ud%`Tu6SC2KiB@K<0IElX+g~1i-lv?q&*`Ch9z$A;IEMy3tncMB zne=ifPKWrOLIZu>cSQzWs*bdBTgt`ltD#WJVsbK{aKCZG)m*pvT(PJ0kAIW7d>#R?XD!GwF%VmCRU`UBa`}A{=5Bfo%~yVxw-M@tH6d%IjtIqapFgcN|IGDRgXN9N^>C@dLuu z5P$(ko~HW}A3e#4*69e~&XbFIG&bNwz-bjb{Oa>%T?M`dY^<#_^ssh10)0Ex2^)&- zEa6XPqN03ZXf@Cy8&%ttj9Sc5+k-k>oF}5JKSa6B6K2tby-OLVD<Er8XbTTGVGG4S#-kV>A@Dx4a*~2zsEp{8C!==K-M9+a&5RecU8Y z%a!#CLLQ)H{q_}wvNp~eT3g9!0wstQHB`jPt(E*47;CYUbHksuRrHvEad^t`U{#>4 z;YvQ^jlA6vz~nhHU}KA4#iJlF%}FJt)U4>|0Lz=gbe*M2>8U?p2RCkoH1%&8-3Ut1 z=MPA*iBapTN$a2QTd>K+iz!OnFn)RPGbvhF*Vx#*UCCm+i^4xKFLpGXWLyx%3GeJb z@X3{a*BkfsF>dLrh&RKHwD{76- zve&c;{DF%SGKwlf3RWMF!stqk!!;pMGz3itpM({PKCrD~LcLzB+W3BU<6x;Y+KlP4x$xM4HW( z4)xYseY0YCSC8Q}jg{bSzR`S1dGs4@&FbburxX#+A-;>kcG0`#F@cIk4;_aRr>D!& z{EW~86Bd}oYL=3&vHU-r*Pe8fs8JJ7Sl`rkot_4+xNzz_S9sN$!-~onEWI>{xKoN2 zMQ9GxTva!~RPHnLar}An5L#n2HQZDSAb=_cxA2;hVku@M67Q(vt0l<8Ad4pbaEE*i ziWIMrg1wUHC*!7s2=u}IKcx}Q#VnD>pg8Cx;cuZy8Rf5Gf9%S!B6l-b-vqmLbuO1+YGX8e*^)m%Z>%bC9eiOgdCUIw zJlXq+s&K7PsbA7b^s`T=KCKKt>`P-CBSIyYemlaKT<>`X?g|7SrHmm9ZwHhvG@89s4*z`NAXz0~Me^wL^<|(Sr6=z? zCxq~!Vd_Nc@E5QzfB_*Y_Lt#_Teo9mh2(1e2AP-qc^bJ$p-4%7tkUqby zMGl)kjI#&%W$#zdT_zhp)&WVVKP&olV=TmolM!gS)8eqmo zGS5C2intD0E93Iml^0V7pvq;O-Q8i2SQBU#kl^$Xw@z4+%AD|#=6!VIm(^9ELMM|S zToO-%5xyD8NqbQBYupdRvQ`YpsNXt7<0~aoZ{3#YZR&P4(nVH34M#o`c$EqLHY!4? z-*}3bpF#_qpEYVv_MkfuI&Ml2i?z65$|FBN9oUy85=)ItqQ~BAJ~H;UtwL!${e4%s z)PmIpA_!i8*%Msg?_SReJ1JiE^?q6Fv=%(x$&6g?i(kh*YAKR~SeAAXrK7s0?&u_J zg^r#-_PN_E%lSpL`uTZOt7_xP&OO4HI zg#}Q;;p+??t0IS}3IHu!sl3-DSl(tv0E*e@al!orH~?Jwoxl_ubn9J)s4$}iC4MCO z#tyoZ*IM7b2MHOmRYzBh@s;&ou$Cf<%t*Di7s3PCkc5@EBoAQ8nMnyxG$3SknQ`E_ zp1wS4VwGP{0&AxVU-*M(j^Ad}iTW&L#>Yg{epBro7JOHY?>}nN?L=qOg0J?FtA{Mv zAo-LCC)I^pZ20dA1AulvXQGB?eSqst#I3W{ko>9L@Uh1Ng~JqZ7q-7K8=a>9Q4xsyZ5y%W&%%%;B3`7B`j^ zWp|~eVTeMNe0o9ML7t7`lR53vc2m5~e#)qSvNY9;9tN}Y5v*ltOncUjm!6Ai$+B*j z`F{@!_XKpE`B+Q2)-0}5NF=pHs0BR^?}SHf1ttz@Li>5t;q0p_9rA(PtjL7NiV!^ybb3U*i{;we_o1<)`HJQrSL8Egtn+do0{#pW z#^;qL6AVocbZ4{=h@u*-sGX&)@V(4c$+hRTN%e1{h z%<8}Pk5?+=y`u1q1-<6)Eg~kq*8}k+lrgK-2aus(xc$nOvjzlO5Fd)d+_jNw4Vj`G zbD(5>Ev01*7g^p^OIWnTUJ!(V<5it9$POA$Q~+^#E43@_@_wb)?%R_G1Z(y;mC)L_ z2{S1^5LHMzigwxvVtfgSZlHA&U4wvQ9g6p@=F`F(zN87+ftwgv_?X>H$O!%+)OjAlC8L79C zF@>5^%y;X!!3C!X0Vpv%*hAE+x7tDmymcM?HMF;Ik^I#=?7BNGrK_v!wF>Uy`WI87 zzF%;w7)C)jE-Z8HWRy;LeDMV3mO($RhOGujQhsh4%b0!HN*b2q=Zn*7Sg zI48O8vWS@OzjO;B-q$SoPNm1u530f~h;5HB_5jBeTBLO5eQywfDT@PC?I5ng6sxrf zDx>KPG#hTjchJLo6@|synZW)cwIP`v;fL)y0k#SLqTAV5bSnQd3n>_>s9Fo+2_VlL zzxVT?tNG1ZjKdn)s342n`@ z0#3CKK5H-GHRa^o&E{^l_pN;&3f4y(HpU8{}Y>Yi1!vcij z>L1(*9t~EjQ<6q9N(-kIZOwcs5!c4*L(1HN6Jtc_nP^pmQ=3OUf54XCmmTv9jz1das$S;|; zCp!+wPvdWPPMLlf%45Z)6@;pMnOlf@PH*nqkUIcv)O(<`(OyCNOe`KQSi^NSk&&L> zY7yT0n|7I(7Otd?v921o!v7UmC7&BcyY9TMzE6RR_-I<@A%QvaVUjs__^JK zmbO1qQg7-TbM0TjYd#y9R{bX&VSyi39-|2~{c`5EGL(pdNU&o+xbYjOv)DnFDSAZh z7>P$ynJ7T==slx4q|wy|Qe~ksJOhFwT|D2{Rhg3L=r>L4D7vXq(#p&>L=a{sd58H`(ljMPAS&{v>}v zuwBVtF=!y{2OS!#MScg9%Vu4}X`>}yR%nR6!HXkfba>|$`cxQ>6ix;b69k=5GLb$ay%yzP0%iMHEAX55bKx)R9 zXOL)twr_$L|JhRZl9QVHONt}wQQWdb{m~tC+{h3S;dfeg)U|N-{NI%hIR&n3ehnx( z!<&|!7$6B4)t7cSK?VVUi8T2=#DN+!*o9;eWNInwY{1qkh$jrnH%8B&XF_=eY{e!tFTj=k?QiCqy9;DfQp?@&}f zLc75ms)|uGbr|b`V;G3Bn_Y&B>5X`Zu!enN$D)=Ov%219^^!QFaHffDyTyjZZjp7k zx80Ctt4C^*fsD1opP-UCqE}WhrC@Yzj0WCOMbBPF*ngF^;sdqJncc_;JGm)E5$Iao zmwJI{x6}g-3``H&b)lEb6{A=xANayha4z=+QR|tNg~&MHbQ_ag=+Qfj zp(hVq}oloGZ)yU6sxcbVB&pIkpK>?UpR5ky=^k_2o=)FM@;jBdjL5WST4>J+US5~Kgq zs|r_au=yxQr_pR?XxM;>zKERiHPI4@XFq$;Azb#B=;~FM@%wj=ogd` zoGi88O-12Fu1L^*4_eCfxm#zSU8h8RkX_V`w~`SREu*NsG9tVYzyFy4t(HkX!F)iq zzxscJxLc9piVUP*cB4eMkG&XoVj1wNgr|~gE8p6WDu}T#mk_Boj% z$7qz%Is)gnZNdbV6=?lg25YRFi4$tMNk)_%Db?hoPLljY6rr(!w#f^)5q(s$}&|rS+fF zs7LAokrgTW?{qWA-~bY;0R3Z&R?kQXN7|DgP2l&xCtkftWOeMY_M2{bbBPt>~Q2EOSQn9reMi!(Vt* zwe|bokg$&oEPJ;sTPAt;S^gj;N_O4v`^@n9&G7R2?eVJ~z?($YYVUGMCXzmV9!@`C zPdK73e$rJO26L(xg1p`!VSQMgmP7kY!$H$~>lah)j{@R>PiA5>4TGoMdpC+)S*Y`| z$i0}sq@1_r=524fHlhq3??#zAI~4wALC9JgzmmLit>J8EoYcxx%=xdRBs?Y|+x}_^ zJ^Wmr^HZw7?aH{#&l5fb&uIMXb$L|@(GQ*vzkS#R@vG*uf31p0**#`=9u1i49NOI6 zRCM3Y>G~H8g2gi8PwhF2#^Ik(y-$P$^wB=JJRdAxQL*?3k_g_1>59{%78ha$7;ia% zU|2%J0qX>VF(wO=Br#7}WN5yq&@0KXSOpzh$r>)_rq6SBi#AA|;WQ<{KgIyi+xHtR zM;1~8RwG_P2BFSZ(BM-=LjQC3cj5H&7JFid5Ln0**DyQhJG%tbk&RSPt7&8}_xti#D9a5y3G)a(A+T3>Fi) zd?R=}8S3~S&xRV5c9d0KdL#8kXJ8G9#~n5)CFO3SUY)rwl>&$@!)gUmUVtjzN9}D^ z=u;&tX0|!9^gohWOC%wG+*VJL5TSU|swwnNJ74|-6zP>_Jm@PJ`$UWrpMNxd#z)8E zhsG`bEzvLOO4+0GXcbQ_i=c>%wBR?(Q((sbhUNMFn>a@=zd5NAhT5B{S-6+UcSd$q zBhRB^w`3MHi&Jd(9`-09`|6Ty4V7z8w#9sy$o_m2RAxiI_aP#oYY^Tcd^YB~+XI=sh zcS6L_lWI5Ag0N4&@)j2&oQ2Cx;=gDvCl(fO>gQ-QT}|#;3uQJ9m7h|W&LhFS&9>x} z6u`CRoz*+efz5o95P1bXU0qE7F<;EWRRrnxp0C}OjN|4R9;m_4Exkb}67KAA!)}&l zzR--;(~OkHs=T~q{v{Xxx8D-Av1P_*du6P*32yD6larGt8;Qh}9{30K3TE?HEZK}o z;eSIDx&&F;bDzm3r8N8A=3n`SUpd?{jfc6e6$3so6+&~@L7jKLn!$iG7+1|J6D(fa zd&Y?xLW=RYv{(bHQ--wIj|vdtOyKDp>&RW`YHFn?8s_J_67^-=GUaZp6e7Z$v$<6h z7g>P_mj&JCkxZN@=~smN_;42LMuaNZZ_ct1kRY`9*#YfXx$&S8))S_At&>n#P71$S z^ZD755MW@3D28<3xNV`#tD%729ZI5kX__+b;sr@&5A^we*IWsltbwj16`bz_9ZIi^ zSdk0=ds;$raIN^X5a>A&+mE&sIh3{QWHD0k?cQ3J{sQx(QgnB@}~P z*T1}uAhmpi&)D@%G2*se*{*TXko8+oY#e1y_&q7+=Q8i|zxzlFR+d%8Di!S@5Qre9 zfrXmm;cg%YDbV0Na5n6|Gsiac+ZR=Lj~t0}li&o-u zZrpXpvORhtfI(oMiv8sAI&kdu+uGSJd|&pC4n_iduEXdsbs^$=!YZ)H8t>WF<{fgy(4?a?GQQAc5 zk-6yTQi6rFIUgl7OzM&)&Q+ot-_M+Oy6`T4c=_z%QORyiRo2iO=`WozfHfi{knl;cRkEm)d;K1m8gAtVLbfY&*8+|4rB{~%AnChCq9xSZD~p1f;V zQu^mfNZ|6?r)64si-$NRZooJ;1Q8q?5?UyRW_kMSd@=uy=_;|{V;I@e)CT?agjC6m zQZ~=}V8&U>zq9l0w_|R?rbvsSKgQv)Ad3gZq3@qjkVNAukH`?Uncv;dG+rN*>5n*h zXJB~F#VFZF!S&By@siT)nKdv%05kDUTlo5JMH;rmT<#DDNQ@N5uxf@{;lQR)$Cc^n z>AlX2R>1oovk_7l%DiXP3W-xa!kciqdEprRZ?wZ_w@dr{ zz~=`g|Ihj{t{;e4)O+9r2=^R~x%|T$hEiUKJd0oQlshW&+**HpG{1BP?13;H&%pY~ z$lE@tZ{zBb5s3;)EIe9}2i?T9Z!5DmXWX|_B8&V4JvM>GDsV-k5dA&ttV$+okpX5x zhZpyRM(1RD`hs2@LRtA#D$LmhM>kk z7NAOfbMhaE3bwn4`M)nAG!Cq{hn!1_KDv%+$Ojz9*zVRAu4SLtKhStWKsf_Asoqmj M)Kn;!d;j(S0mitJc>n+a literal 0 HcmV?d00001 diff --git a/bsconfig.json b/bsconfig.json index cd0bb3b..08a6c11 100644 --- a/bsconfig.json +++ b/bsconfig.json @@ -9,5 +9,6 @@ }, "https": true, "watch": true, - "files": "*.*" + "files": "*.*", + "browser": "chrome" } \ No newline at end of file diff --git a/function-file/MicrosoftAjax.js b/function-file/MicrosoftAjax.js deleted file mode 100644 index db85c14..0000000 --- a/function-file/MicrosoftAjax.js +++ /dev/null @@ -1,7 +0,0 @@ -//---------------------------------------------------------- -// Copyright (C) Microsoft Corporation. All rights reserved. -//---------------------------------------------------------- -// MicrosoftAjax.js -Function.__typeName="Function";Function.__class=true;Function.createCallback=function(b,a){return function(){var e=arguments.length;if(e>0){var d=[];for(var c=0;cc){var f=Error.parameterCount();f.popStackFrame();return f}return null};Function._validateParameter=function(c,a,h){var b,g=a.type,l=!!a.integer,k=!!a.domElement,m=!!a.mayBeNull;b=Function._validateParameterType(c,g,l,k,m,h);if(b){b.popStackFrame();return b}var e=a.elementType,f=!!a.elementMayBeNull;if(g===Array&&typeof c!=="undefined"&&c!==null&&(e||!f)){var j=!!a.elementInteger,i=!!a.elementDomElement;for(var d=0;d0&&(dc.Calendar.TwoDigitYearMax)return a-100}return a};Date._getParseRegExp=function(b,e){if(!b._parseRegExp)b._parseRegExp={};else if(b._parseRegExp[e])return b._parseRegExp[e];var c=Date._expandFormat(b,e);c=c.replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1");var a=new Sys.StringBuilder("^"),j=[],f=0,i=0,h=Date._getTokenRegExp(),d;while((d=h.exec(c))!==null){var l=c.slice(f,d.index);f=h.lastIndex;i+=Date._appendPreOrPostMatch(l,a);if(i%2===1){a.append(d[0]);continue}switch(d[0]){case "dddd":case "ddd":case "MMMM":case "MMM":a.append("(\\D+)");break;case "tt":case "t":a.append("(\\D*)");break;case "yyyy":a.append("(\\d{4})");break;case "fff":a.append("(\\d{3})");break;case "ff":a.append("(\\d{2})");break;case "f":a.append("(\\d)");break;case "dd":case "d":case "MM":case "M":case "yy":case "y":case "HH":case "H":case "hh":case "h":case "mm":case "m":case "ss":case "s":a.append("(\\d\\d?)");break;case "zzz":a.append("([+-]?\\d\\d?:\\d{2})");break;case "zz":case "z":a.append("([+-]?\\d\\d?)")}Array.add(j,d[0])}Date._appendPreOrPostMatch(c.slice(f),a);a.append("$");var k=a.toString().replace(/\s+/g,"\\s+"),g={"regExp":k,"groups":j};b._parseRegExp[e]=g;return g};Date._getTokenRegExp=function(){return /dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z/g};Date.parseLocale=function(a){return Date._parse(a,Sys.CultureInfo.CurrentCulture,arguments)};Date.parseInvariant=function(a){return Date._parse(a,Sys.CultureInfo.InvariantCulture,arguments)};Date._parse=function(g,c,h){var e=false;for(var a=1,i=h.length;a31)return null;break;case "MMMM":c=j._getMonthIndex(a);if(c<0||c>11)return null;break;case "MMM":c=j._getAbbrMonthIndex(a);if(c<0||c>11)return null;break;case "M":case "MM":var c=parseInt(a,10)-1;if(c<0||c>11)return null;break;case "y":case "yy":f=Date._expandYear(m,parseInt(a,10));if(f<0||f>9999)return null;break;case "yyyy":f=parseInt(a,10);if(f<0||f>9999)return null;break;case "h":case "hh":d=parseInt(a,10);if(d===12)d=0;if(d<0||d>11)return null;break;case "H":case "HH":d=parseInt(a,10);if(d<0||d>23)return null;break;case "m":case "mm":n=parseInt(a,10);if(n<0||n>59)return null;break;case "s":case "ss":o=parseInt(a,10);if(o<0||o>59)return null;break;case "tt":case "t":var u=a.toUpperCase();r=u===m.PMDesignator.toUpperCase();if(!r&&u!==m.AMDesignator.toUpperCase())return null;break;case "f":e=parseInt(a,10)*100;if(e<0||e>999)return null;break;case "ff":e=parseInt(a,10)*10;if(e<0||e>999)return null;break;case "fff":e=parseInt(a,10);if(e<0||e>999)return null;break;case "dddd":g=j._getDayIndex(a);if(g<0||g>6)return null;break;case "ddd":g=j._getAbbrDayIndex(a);if(g<0||g>6)return null;break;case "zzz":var q=a.split(/:/);if(q.length!==2)return null;var i=parseInt(q[0],10);if(i<-12||i>13)return null;var l=parseInt(q[1],10);if(l<0||l>59)return null;k=i*60+(a.startsWith("-")?-l:l);break;case "z":case "zz":var i=parseInt(a,10);if(i<-12||i>13)return null;k=i*60}}var b=new Date;if(f===null)f=b.getFullYear();if(c===null)c=b.getMonth();if(h===null)h=b.getDate();b.setFullYear(f,c,h);if(b.getDate()!==h)return null;if(g!==null&&b.getDay()!==g)return null;if(r&&d<12)d+=12;b.setHours(d,n,o,e);if(k!==null){var t=b.getMinutes()-(k+b.getTimezoneOffset());b.setHours(b.getHours()+parseInt(t/60,10),t%60)}return b};Date.prototype.format=function(a){return this._toFormattedString(a,Sys.CultureInfo.InvariantCulture)};Date.prototype.localeFormat=function(a){return this._toFormattedString(a,Sys.CultureInfo.CurrentCulture)};Date.prototype._toFormattedString=function(e,h){if(!e||e.length===0||e==="i")if(h&&h.name.length>0)return this.toLocaleString();else return this.toString();var d=h.dateTimeFormat;e=Date._expandFormat(d,e);var a=new Sys.StringBuilder,b;function c(a){if(a<10)return "0"+a;return a.toString()}function g(a){if(a<10)return "00"+a;if(a<100)return "0"+a;return a.toString()}var j=0,i=Date._getTokenRegExp();for(;true;){var l=i.lastIndex,f=i.exec(e),k=e.slice(l,f?f.index:e.length);j+=Date._appendPreOrPostMatch(k,a);if(!f)break;if(j%2===1){a.append(f[0]);continue}switch(f[0]){case "dddd":a.append(d.DayNames[this.getDay()]);break;case "ddd":a.append(d.AbbreviatedDayNames[this.getDay()]);break;case "dd":a.append(c(this.getDate()));break;case "d":a.append(this.getDate());break;case "MMMM":a.append(d.MonthNames[this.getMonth()]);break;case "MMM":a.append(d.AbbreviatedMonthNames[this.getMonth()]);break;case "MM":a.append(c(this.getMonth()+1));break;case "M":a.append(this.getMonth()+1);break;case "yyyy":a.append(this.getFullYear());break;case "yy":a.append(c(this.getFullYear()%100));break;case "y":a.append(this.getFullYear()%100);break;case "hh":b=this.getHours()%12;if(b===0)b=12;a.append(c(b));break;case "h":b=this.getHours()%12;if(b===0)b=12;a.append(b);break;case "HH":a.append(c(this.getHours()));break;case "H":a.append(this.getHours());break;case "mm":a.append(c(this.getMinutes()));break;case "m":a.append(this.getMinutes());break;case "ss":a.append(c(this.getSeconds()));break;case "s":a.append(this.getSeconds());break;case "tt":a.append(this.getHours()<12?d.AMDesignator:d.PMDesignator);break;case "t":a.append((this.getHours()<12?d.AMDesignator:d.PMDesignator).charAt(0));break;case "f":a.append(g(this.getMilliseconds()).charAt(0));break;case "ff":a.append(g(this.getMilliseconds()).substr(0,2));break;case "fff":a.append(g(this.getMilliseconds()));break;case "z":b=this.getTimezoneOffset()/60;a.append((b<=0?"+":"-")+Math.floor(Math.abs(b)));break;case "zz":b=this.getTimezoneOffset()/60;a.append((b<=0?"+":"-")+c(Math.floor(Math.abs(b))));break;case "zzz":b=this.getTimezoneOffset()/60;a.append((b<=0?"+":"-")+c(Math.floor(Math.abs(b)))+d.TimeSeparator+c(Math.abs(this.getTimezoneOffset()%60)))}}return a.toString()};Number.__typeName="Number";Number.__class=true;Number.parseLocale=function(a){return Number._parse(a,Sys.CultureInfo.CurrentCulture)};Number.parseInvariant=function(a){return Number._parse(a,Sys.CultureInfo.InvariantCulture)};Number._parse=function(b,o){b=b.trim();if(b.match(/^[+-]?infinity$/i))return parseFloat(b);if(b.match(/^0x[a-f0-9]+$/i))return parseInt(b);var a=o.numberFormat,g=Number._parseNumberNegativePattern(b,a,a.NumberNegativePattern),h=g[0],e=g[1];if(h===""&&a.NumberNegativePattern!==1){g=Number._parseNumberNegativePattern(b,a,1);h=g[0];e=g[1]}if(h==="")h="+";var j,d,f=e.indexOf("e");if(f<0)f=e.indexOf("E");if(f<0){d=e;j=null}else{d=e.substr(0,f);j=e.substr(f+1)}var c,k,m=d.indexOf(a.NumberDecimalSeparator);if(m<0){c=d;k=null}else{c=d.substr(0,m);k=d.substr(m+a.NumberDecimalSeparator.length)}c=c.split(a.NumberGroupSeparator).join("");var n=a.NumberGroupSeparator.replace(/\u00A0/g," ");if(a.NumberGroupSeparator!==n)c=c.split(n).join("");var l=h+c;if(k!==null)l+="."+k;if(j!==null){var i=Number._parseNumberNegativePattern(j,a,1);if(i[0]==="")i[0]="+";l+="e"+i[0]+i[1]}if(l.match(/^[+-]?\d*\.?\d*(e[+-]?\d+)?$/))return parseFloat(l);return Number.NaN};Number._parseNumberNegativePattern=function(a,d,e){var b=d.NegativeSign,c=d.PositiveSign;switch(e){case 4:b=" "+b;c=" "+c;case 3:if(a.endsWith(b))return ["-",a.substr(0,a.length-b.length)];else if(a.endsWith(c))return ["+",a.substr(0,a.length-c.length)];break;case 2:b+=" ";c+=" ";case 1:if(a.startsWith(b))return ["-",a.substr(b.length)];else if(a.startsWith(c))return ["+",a.substr(c.length)];break;case 0:if(a.startsWith("(")&&a.endsWith(")"))return ["-",a.substr(1,a.length-2)]}return ["",a]};Number.prototype.format=function(a){return this._toFormattedString(a,Sys.CultureInfo.InvariantCulture)};Number.prototype.localeFormat=function(a){return this._toFormattedString(a,Sys.CultureInfo.CurrentCulture)};Number.prototype._toFormattedString=function(d,j){if(!d||d.length===0||d==="i")if(j&&j.name.length>0)return this.toLocaleString();else return this.toString();var o=["n %","n%","%n"],n=["-n %","-n%","-%n"],p=["(n)","-n","- n","n-","n -"],m=["$n","n$","$ n","n $"],l=["($n)","-$n","$-n","$n-","(n$)","-n$","n-$","n$-","-n $","-$ n","n $-","$ n-","$ -n","n- $","($ n)","(n $)"];function g(a,c,d){for(var b=a.length;b1?parseInt(e[1]):0;e=b.split(".");b=e[0];a=e.length>1?e[1]:"";var q;if(c>0){a=g(a,c,false);b+=a.slice(0,c);a=a.substr(c)}else if(c<0){c=-c;b=g(b,c+1,true);a=b.slice(-c,b.length)+a;b=b.slice(0,-c)}if(i>0){if(a.length>i)a=a.slice(0,i);else a=g(a,i,false);a=p+a}else a="";var d=b.length-1,f="";while(d>=0){if(h===0||h>d)if(f.length>0)return b.slice(0,d+1)+n+f+a;else return b.slice(0,d+1)+a;if(f.length>0)f=b.slice(d-h+1,d+1)+n+f;else f=b.slice(d-h+1,d+1);d-=h;if(k1)b=parseInt(d.slice(1),10);var c;switch(d.charAt(0)){case "d":case "D":c="n";if(b!==-1)e=g(""+e,b,true);if(this<0)e=-e;break;case "c":case "C":if(this<0)c=l[a.CurrencyNegativePattern];else c=m[a.CurrencyPositivePattern];if(b===-1)b=a.CurrencyDecimalDigits;e=i(Math.abs(this),b,a.CurrencyGroupSizes,a.CurrencyGroupSeparator,a.CurrencyDecimalSeparator);break;case "n":case "N":if(this<0)c=p[a.NumberNegativePattern];else c="n";if(b===-1)b=a.NumberDecimalDigits;e=i(Math.abs(this),b,a.NumberGroupSizes,a.NumberGroupSeparator,a.NumberDecimalSeparator);break;case "p":case "P":if(this<0)c=n[a.PercentNegativePattern];else c=o[a.PercentPositivePattern];if(b===-1)b=a.PercentDecimalDigits;e=i(Math.abs(this)*100,b,a.PercentGroupSizes,a.PercentGroupSeparator,a.PercentDecimalSeparator);break;default:throw Error.format(Sys.Res.formatBadFormatSpecifier)}var k=/n|\$|-|%/g,f="";for(;true;){var q=k.lastIndex,h=k.exec(c);f+=c.slice(q,h?h.index:c.length);if(!h)break;switch(h[0]){case "n":f+=e;break;case "$":f+=a.CurrencySymbol;break;case "-":f+=a.NegativeSign;break;case "%":f+=a.PercentSymbol}}return f};RegExp.__typeName="RegExp";RegExp.__class=true;Array.__typeName="Array";Array.__class=true;Array.add=Array.enqueue=function(a,b){a[a.length]=b};Array.addRange=function(a,b){a.push.apply(a,b)};Array.clear=function(a){a.length=0};Array.clone=function(a){if(a.length===1)return [a[0]];else return Array.apply(null,a)};Array.contains=function(a,b){return Array.indexOf(a,b)>=0};Array.dequeue=function(a){return a.shift()};Array.forEach=function(b,e,d){for(var a=0,f=b.length;a=0)b.splice(a,1);return a>=0};Array.removeAt=function(a,b){a.splice(b,1)};if(!window)this.window=this;window.Type=Function;Type.prototype.callBaseMethod=function(a,d,b){var c=this.getBaseMethod(a,d);if(!b)return c.apply(a);else return c.apply(a,b)};Type.prototype.getBaseMethod=function(d,c){var b=this.getBaseType();if(b){var a=b.prototype[c];return a instanceof Function?a:null}return null};Type.prototype.getBaseType=function(){return typeof this.__baseType==="undefined"?null:this.__baseType};Type.prototype.getInterfaces=function(){var a=[],b=this;while(b){var c=b.__interfaces;if(c)for(var d=0,f=c.length;d-1){Sys.Browser.agent=Sys.Browser.InternetExplorer;Sys.Browser.version=parseFloat(navigator.userAgent.match(/MSIE (\d+\.\d+)/)[1]);if(Sys.Browser.version>=8)if(document.documentMode>=7)Sys.Browser.documentMode=document.documentMode;Sys.Browser.hasDebuggerStatement=true}else if(navigator.userAgent.indexOf(" Firefox/")>-1){Sys.Browser.agent=Sys.Browser.Firefox;Sys.Browser.version=parseFloat(navigator.userAgent.match(/Firefox\/(\d+\.\d+)/)[1]);Sys.Browser.name="Firefox";Sys.Browser.hasDebuggerStatement=true}else if(navigator.userAgent.indexOf(" AppleWebKit/")>-1){Sys.Browser.agent=Sys.Browser.Safari;Sys.Browser.version=parseFloat(navigator.userAgent.match(/AppleWebKit\/(\d+(\.\d+)?)/)[1]);Sys.Browser.name="Safari"}else if(navigator.userAgent.indexOf("Opera/")>-1)Sys.Browser.agent=Sys.Browser.Opera;Type.registerNamespace("Sys.UI");Sys._Debug=function(){};Sys._Debug.prototype={_appendConsole:function(a){if(typeof Debug!=="undefined"&&Debug.writeln)Debug.writeln(a);if(window.console&&window.console.log)window.console.log(a);if(window.opera)window.opera.postError(a);if(window.debugService)window.debugService.trace(a)},_appendTrace:function(b){var a=document.getElementById("TraceConsole");if(a&&a.tagName.toUpperCase()==="TEXTAREA")a.value+=b+"\n"},assert:function(c,a,b){if(!c){a=b&&this.assert.caller?String.format(Sys.Res.assertFailedCaller,a,this.assert.caller):String.format(Sys.Res.assertFailed,a);if(confirm(String.format(Sys.Res.breakIntoDebugger,a)))this.fail(a)}},clearTrace:function(){var a=document.getElementById("TraceConsole");if(a&&a.tagName.toUpperCase()==="TEXTAREA")a.value=""},fail:function(message){this._appendConsole(message);if(Sys.Browser.hasDebuggerStatement)eval("debugger")},trace:function(a){this._appendConsole(a);this._appendTrace(a)},traceDump:function(a,b){var c=this._traceDump(a,b,true)},_traceDump:function(a,c,f,b,d){c=c?c:"traceDump";b=b?b:"";if(a===null){this.trace(b+c+": null");return}switch(typeof a){case "undefined":this.trace(b+c+": Undefined");break;case "number":case "string":case "boolean":this.trace(b+c+": "+a);break;default:if(Date.isInstanceOfType(a)||RegExp.isInstanceOfType(a)){this.trace(b+c+": "+a.toString());break}if(!d)d=[];else if(Array.contains(d,a)){this.trace(b+c+": ...");return}Array.add(d,a);if(a==window||a===document||window.HTMLElement&&a instanceof HTMLElement||typeof a.nodeName==="string"){var k=a.tagName?a.tagName:"DomElement";if(a.id)k+=" - "+a.id;this.trace(b+c+" {"+k+"}")}else{var i=Object.getTypeName(a);this.trace(b+c+(typeof i==="string"?" {"+i+"}":""));if(b===""||f){b+=" ";var e,j,l,g,h;if(Array.isInstanceOfType(a)){j=a.length;for(e=0;e=0;d--){var k=h[d].trim();b=a[k];if(typeof b!=="number")throw Error.argument("value",String.format(Sys.Res.enumInvalidValue,c.split(",")[d].trim(),this.__typeName));j|=b}return j}}function Sys$Enum$toString(c){if(typeof c==="undefined"||c===null)return this.__string;var d=this.prototype,a;if(!this.__flags||c===0){for(a in d)if(d[a]===c)return a}else{var b=this.__sortedValues;if(!b){b=[];for(a in d)b[b.length]={key:a,value:d[a]};b.sort(function(a,b){return a.value-b.value});this.__sortedValues=b}var e=[],g=c;for(a=b.length-1;a>=0;a--){var h=b[a],f=h.value;if(f===0)continue;if((f&c)===f){e[e.length]=h.key;g-=f;if(g===0)break}}if(e.length&&g===0)return e.reverse().join(", ")}return ""}Type.prototype.registerEnum=function(b,c){Sys.__upperCaseTypes[b.toUpperCase()]=this;for(var a in this.prototype)this[a]=this.prototype[a];this.__typeName=b;this.parse=Sys$Enum$parse;this.__string=this.toString();this.toString=Sys$Enum$toString;this.__flags=c;this.__enum=true};Type.isEnum=function(a){if(typeof a==="undefined"||a===null)return false;return !!a.__enum};Type.isFlags=function(a){if(typeof a==="undefined"||a===null)return false;return !!a.__flags};Sys.EventHandlerList=function(){this._list={}};Sys.EventHandlerList.prototype={addHandler:function(b,a){Array.add(this._getEvent(b,true),a)},removeHandler:function(c,b){var a=this._getEvent(c);if(!a)return;Array.remove(a,b)},getHandler:function(b){var a=this._getEvent(b);if(!a||a.length===0)return null;a=Array.clone(a);return function(c,d){for(var b=0,e=a.length;b=0;c--)$removeHandler(a,b,d[c].handler)}a._events=null}},$removeHandler=Sys.UI.DomEvent.removeHandler=function(a,e,f){var d=null,c=a._events[e];for(var b=0,g=c.length;b=0)d.className=(a.substr(0,b)+" "+a.substring(b+c.length+1,a.length)).trim()};Sys.UI.DomElement.setLocation=function(b,c,d){var a=b.style;a.position="absolute";a.left=c+"px";a.top=d+"px"};Sys.UI.DomElement.toggleCssClass=function(b,a){if(Sys.UI.DomElement.containsCssClass(b,a))Sys.UI.DomElement.removeCssClass(b,a);else Sys.UI.DomElement.addCssClass(b,a)};Sys.UI.DomElement.getVisibilityMode=function(a){return a._visibilityMode===Sys.UI.VisibilityMode.hide?Sys.UI.VisibilityMode.hide:Sys.UI.VisibilityMode.collapse};Sys.UI.DomElement.setVisibilityMode=function(a,b){Sys.UI.DomElement._ensureOldDisplayMode(a);if(a._visibilityMode!==b){a._visibilityMode=b;if(Sys.UI.DomElement.getVisible(a)===false)if(a._visibilityMode===Sys.UI.VisibilityMode.hide)a.style.display=a._oldDisplayMode;else a.style.display="none";a._visibilityMode=b}};Sys.UI.DomElement.getVisible=function(b){var a=b.currentStyle||Sys.UI.DomElement._getCurrentStyle(b);if(!a)return true;return a.visibility!=="hidden"&&a.display!=="none"};Sys.UI.DomElement.setVisible=function(a,b){if(b!==Sys.UI.DomElement.getVisible(a)){Sys.UI.DomElement._ensureOldDisplayMode(a);a.style.visibility=b?"visible":"hidden";if(b||a._visibilityMode===Sys.UI.VisibilityMode.hide)a.style.display=a._oldDisplayMode;else a.style.display="none"}};Sys.UI.DomElement._ensureOldDisplayMode=function(a){if(!a._oldDisplayMode){var b=a.currentStyle||Sys.UI.DomElement._getCurrentStyle(a);a._oldDisplayMode=b?b.display:null;if(!a._oldDisplayMode||a._oldDisplayMode==="none")switch(a.tagName.toUpperCase()){case "DIV":case "P":case "ADDRESS":case "BLOCKQUOTE":case "BODY":case "COL":case "COLGROUP":case "DD":case "DL":case "DT":case "FIELDSET":case "FORM":case "H1":case "H2":case "H3":case "H4":case "H5":case "H6":case "HR":case "IFRAME":case "LEGEND":case "OL":case "PRE":case "TABLE":case "TD":case "TH":case "TR":case "UL":a._oldDisplayMode="block";break;case "LI":a._oldDisplayMode="list-item";break;default:a._oldDisplayMode="inline"}}};Sys.UI.DomElement._getWindow=function(a){var b=a.ownerDocument||a.document||a;return b.defaultView||b.parentWindow};Sys.UI.DomElement._getCurrentStyle=function(a){if(a.nodeType===3)return null;var c=Sys.UI.DomElement._getWindow(a);if(a.documentElement)a=a.documentElement;var b=c&&a!==c&&c.getComputedStyle?c.getComputedStyle(a,null):a.currentStyle||a.style;if(!b&&Sys.Browser.agent===Sys.Browser.Safari&&a.style){var g=a.style.display,f=a.style.position;a.style.position="absolute";a.style.display="block";var e=c.getComputedStyle(a,null);a.style.display=g;a.style.position=f;b={};for(var d in e)b[d]=e[d];b.display="none"}return b};Sys.IContainer=function(){};Sys.IContainer.prototype={};Sys.IContainer.registerInterface("Sys.IContainer");Sys._ScriptLoader=function(){this._scriptsToLoad=null;this._sessions=[];this._scriptLoadedDelegate=Function.createDelegate(this,this._scriptLoadedHandler)};Sys._ScriptLoader.prototype={dispose:function(){this._stopSession();this._loading=false;if(this._events)delete this._events;this._sessions=null;this._currentSession=null;this._scriptLoadedDelegate=null},loadScripts:function(d,b,c,a){var e={allScriptsLoadedCallback:b,scriptLoadFailedCallback:c,scriptLoadTimeoutCallback:a,scriptsToLoad:this._scriptsToLoad,scriptTimeout:d};this._scriptsToLoad=null;this._sessions[this._sessions.length]=e;if(!this._loading)this._nextSession()},notifyScriptLoaded:function(){if(!this._loading)return;this._currentTask._notified++;if(Sys.Browser.agent===Sys.Browser.Safari)if(this._currentTask._notified===1)window.setTimeout(Function.createDelegate(this,function(){this._scriptLoadedHandler(this._currentTask.get_scriptElement(),true)}),0)},queueCustomScriptTag:function(a){if(!this._scriptsToLoad)this._scriptsToLoad=[];Array.add(this._scriptsToLoad,a)},queueScriptBlock:function(a){if(!this._scriptsToLoad)this._scriptsToLoad=[];Array.add(this._scriptsToLoad,{text:a})},queueScriptReference:function(a){if(!this._scriptsToLoad)this._scriptsToLoad=[];Array.add(this._scriptsToLoad,{src:a})},_createScriptElement:function(c){var a=document.createElement("script");a.type="text/javascript";for(var b in c)a[b]=c[b];return a},_loadScriptsInternal:function(){var b=this._currentSession;if(b.scriptsToLoad&&b.scriptsToLoad.length>0){var c=Array.dequeue(b.scriptsToLoad),a=this._createScriptElement(c);if(a.text&&Sys.Browser.agent===Sys.Browser.Safari){a.innerHTML=a.text;delete a.text}if(typeof c.src==="string"){this._currentTask=new Sys._ScriptLoaderTask(a,this._scriptLoadedDelegate);this._currentTask.execute()}else{document.getElementsByTagName("head")[0].appendChild(a);Sys._ScriptLoader._clearScript(a);this._loadScriptsInternal()}}else{this._stopSession();var d=b.allScriptsLoadedCallback;if(d)d(this);this._nextSession()}},_nextSession:function(){if(this._sessions.length===0){this._loading=false;this._currentSession=null;return}this._loading=true;var a=Array.dequeue(this._sessions);this._currentSession=a;if(a.scriptTimeout>0)this._timeoutCookie=window.setTimeout(Function.createDelegate(this,this._scriptLoadTimeoutHandler),a.scriptTimeout*1000);this._loadScriptsInternal()},_raiseError:function(a){var c=this._currentSession.scriptLoadFailedCallback,b=this._currentTask.get_scriptElement();this._stopSession();if(c){c(this,b,a);this._nextSession()}else{this._loading=false;throw Sys._ScriptLoader._errorScriptLoadFailed(b.src,a)}},_scriptLoadedHandler:function(a,b){if(b&&this._currentTask._notified)if(this._currentTask._notified>1)this._raiseError(true);else{Array.add(Sys._ScriptLoader._getLoadedScripts(),a.src);this._currentTask.dispose();this._currentTask=null;this._loadScriptsInternal()}else this._raiseError(false)},_scriptLoadTimeoutHandler:function(){var a=this._currentSession.scriptLoadTimeoutCallback;this._stopSession();if(a)a(this);this._nextSession()},_stopSession:function(){if(this._timeoutCookie){window.clearTimeout(this._timeoutCookie);this._timeoutCookie=null}if(this._currentTask){this._currentTask.dispose();this._currentTask=null}}};Sys._ScriptLoader.registerClass("Sys._ScriptLoader",null,Sys.IDisposable);Sys._ScriptLoader.getInstance=function(){var a=Sys._ScriptLoader._activeInstance;if(!a)a=Sys._ScriptLoader._activeInstance=new Sys._ScriptLoader;return a};Sys._ScriptLoader.isScriptLoaded=function(b){var a=document.createElement("script");a.src=b;return Array.contains(Sys._ScriptLoader._getLoadedScripts(),a.src)};Sys._ScriptLoader.readLoadedScripts=function(){if(!Sys._ScriptLoader._referencedScripts){var b=Sys._ScriptLoader._referencedScripts=[],c=document.getElementsByTagName("script");for(i=c.length-1;i>=0;i--){var d=c[i],a=d.src;if(a.length)if(!Array.contains(b,a))Array.add(b,a)}}};Sys._ScriptLoader._clearScript=function(a){if(!Sys.Debug.isDebug)a.parentNode.removeChild(a)};Sys._ScriptLoader._errorScriptLoadFailed=function(b,d){var a;if(d)a=Sys.Res.scriptLoadMultipleCallbacks;else a=Sys.Res.scriptLoadFailed;var e="Sys.ScriptLoadFailedException: "+String.format(a,b),c=Error.create(e,{name:"Sys.ScriptLoadFailedException","scriptUrl":b});c.popStackFrame();return c};Sys._ScriptLoader._getLoadedScripts=function(){if(!Sys._ScriptLoader._referencedScripts){Sys._ScriptLoader._referencedScripts=[];Sys._ScriptLoader.readLoadedScripts()}return Sys._ScriptLoader._referencedScripts};Sys._ScriptLoaderTask=function(b,a){this._scriptElement=b;this._completedCallback=a;this._notified=0};Sys._ScriptLoaderTask.prototype={get_scriptElement:function(){return this._scriptElement},dispose:function(){if(this._disposed)return;this._disposed=true;this._removeScriptElementHandlers();Sys._ScriptLoader._clearScript(this._scriptElement);this._scriptElement=null},execute:function(){this._addScriptElementHandlers();document.getElementsByTagName("head")[0].appendChild(this._scriptElement)},_addScriptElementHandlers:function(){this._scriptLoadDelegate=Function.createDelegate(this,this._scriptLoadHandler);if(Sys.Browser.agent!==Sys.Browser.InternetExplorer){this._scriptElement.readyState="loaded";$addHandler(this._scriptElement,"load",this._scriptLoadDelegate)}else $addHandler(this._scriptElement,"readystatechange",this._scriptLoadDelegate);if(this._scriptElement.addEventListener){this._scriptErrorDelegate=Function.createDelegate(this,this._scriptErrorHandler);this._scriptElement.addEventListener("error",this._scriptErrorDelegate,false)}},_removeScriptElementHandlers:function(){if(this._scriptLoadDelegate){var a=this.get_scriptElement();if(Sys.Browser.agent!==Sys.Browser.InternetExplorer)$removeHandler(a,"load",this._scriptLoadDelegate);else $removeHandler(a,"readystatechange",this._scriptLoadDelegate);if(this._scriptErrorDelegate){this._scriptElement.removeEventListener("error",this._scriptErrorDelegate,false);this._scriptErrorDelegate=null}this._scriptLoadDelegate=null}},_scriptErrorHandler:function(){if(this._disposed)return;this._completedCallback(this.get_scriptElement(),false)},_scriptLoadHandler:function(){if(this._disposed)return;var a=this.get_scriptElement();if(a.readyState!=="loaded"&&a.readyState!=="complete")return;var b=this;window.setTimeout(function(){b._completedCallback(a,true)},0)}};Sys._ScriptLoaderTask.registerClass("Sys._ScriptLoaderTask",null,Sys.IDisposable);Sys.ApplicationLoadEventArgs=function(b,a){Sys.ApplicationLoadEventArgs.initializeBase(this);this._components=b;this._isPartialLoad=a};Sys.ApplicationLoadEventArgs.prototype={get_components:function(){return this._components},get_isPartialLoad:function(){return this._isPartialLoad}};Sys.ApplicationLoadEventArgs.registerClass("Sys.ApplicationLoadEventArgs",Sys.EventArgs);Sys.HistoryEventArgs=function(a){Sys.HistoryEventArgs.initializeBase(this);this._state=a};Sys.HistoryEventArgs.prototype={get_state:function(){return this._state}};Sys.HistoryEventArgs.registerClass("Sys.HistoryEventArgs",Sys.EventArgs);Sys._Application=function(){Sys._Application.initializeBase(this);this._disposableObjects=[];this._components={};this._createdComponents=[];this._secondPassComponents=[];this._appLoadHandler=null;this._beginRequestHandler=null;this._clientId=null;this._currentEntry="";this._endRequestHandler=null;this._history=null;this._enableHistory=false;this._historyFrame=null;this._historyInitialized=false;this._historyInitialLength=0;this._historyLength=0;this._historyPointIsNew=false;this._ignoreTimer=false;this._initialState=null;this._state={};this._timerCookie=0;this._timerHandler=null;this._uniqueId=null;this._unloadHandlerDelegate=Function.createDelegate(this,this._unloadHandler);this._loadHandlerDelegate=Function.createDelegate(this,this._loadHandler);Sys.UI.DomEvent.addHandler(window,"unload",this._unloadHandlerDelegate);Sys.UI.DomEvent.addHandler(window,"load",this._loadHandlerDelegate)};Sys._Application.prototype={_creatingComponents:false,_disposing:false,get_isCreatingComponents:function(){return this._creatingComponents},get_stateString:function(){var a=window.location.hash;if(this._isSafari2()){var b=this._getHistory();if(b)a=b[window.history.length-this._historyInitialLength]}if(a.length>0&&a.charAt(0)==="#")a=a.substring(1);if(Sys.Browser.agent===Sys.Browser.Firefox)a=this._serializeState(this._deserializeState(a,true));return a},get_enableHistory:function(){return this._enableHistory},set_enableHistory:function(a){this._enableHistory=a},add_init:function(a){if(this._initialized)a(this,Sys.EventArgs.Empty);else this.get_events().addHandler("init",a)},remove_init:function(a){this.get_events().removeHandler("init",a)},add_load:function(a){this.get_events().addHandler("load",a)},remove_load:function(a){this.get_events().removeHandler("load",a)},add_navigate:function(a){this.get_events().addHandler("navigate",a)},remove_navigate:function(a){this.get_events().removeHandler("navigate",a)},add_unload:function(a){this.get_events().addHandler("unload",a)},remove_unload:function(a){this.get_events().removeHandler("unload",a)},addComponent:function(a){this._components[a.get_id()]=a},addHistoryPoint:function(c,f){this._ensureHistory();var b=this._state;for(var a in c){var d=c[a];if(d===null){if(typeof b[a]!=="undefined")delete b[a]}else b[a]=d}var e=this._serializeState(b);this._historyPointIsNew=true;this._setState(e,f);this._raiseNavigate()},beginCreateComponents:function(){this._creatingComponents=true},dispose:function(){if(!this._disposing){this._disposing=true;if(this._timerCookie){window.clearTimeout(this._timerCookie);delete this._timerCookie}if(this._endRequestHandler){Sys.WebForms.PageRequestManager.getInstance().remove_endRequest(this._endRequestHandler);delete this._endRequestHandler}if(this._beginRequestHandler){Sys.WebForms.PageRequestManager.getInstance().remove_beginRequest(this._beginRequestHandler);delete this._beginRequestHandler}if(window.pageUnload)window.pageUnload(this,Sys.EventArgs.Empty);var c=this.get_events().getHandler("unload");if(c)c(this,Sys.EventArgs.Empty);var b=Array.clone(this._disposableObjects);for(var a=0,e=b.length;a'");d.write(""+(c||document.title)+"parent.Sys.Application._onIFrameLoad(\''+a+"');");d.close()}this._ignoreTimer=false;var h=this.get_stateString();this._currentEntry=a;if(a!==h){if(this._isSafari2()){var g=this._getHistory();g[window.history.length-this._historyInitialLength+1]=a;this._setHistory(g);this._historyLength=window.history.length+1;var b=document.createElement("form");b.method="get";b.action="#"+a;document.appendChild(b);b.submit();document.removeChild(b)}else window.location.hash=a;if(typeof c!=="undefined"&&c!==null)document.title=c}}},_unloadHandler:function(){this.dispose()},_updateHiddenField:function(b){if(this._clientId){var a=document.getElementById(this._clientId);if(a)a.value=b}}};Sys._Application.registerClass("Sys._Application",Sys.Component,Sys.IContainer);Sys.Application=new Sys._Application;var $find=Sys.Application.findComponent;Type.registerNamespace("Sys.Net");Sys.Net.WebRequestExecutor=function(){this._webRequest=null;this._resultObject=null};Sys.Net.WebRequestExecutor.prototype={get_webRequest:function(){return this._webRequest},_set_webRequest:function(a){this._webRequest=a},get_started:function(){throw Error.notImplemented()},get_responseAvailable:function(){throw Error.notImplemented()},get_timedOut:function(){throw Error.notImplemented()},get_aborted:function(){throw Error.notImplemented()},get_responseData:function(){throw Error.notImplemented()},get_statusCode:function(){throw Error.notImplemented()},get_statusText:function(){throw Error.notImplemented()},get_xml:function(){throw Error.notImplemented()},get_object:function(){if(!this._resultObject)this._resultObject=Sys.Serialization.JavaScriptSerializer.deserialize(this.get_responseData());return this._resultObject},executeRequest:function(){throw Error.notImplemented()},abort:function(){throw Error.notImplemented()},getResponseHeader:function(){throw Error.notImplemented()},getAllResponseHeaders:function(){throw Error.notImplemented()}};Sys.Net.WebRequestExecutor.registerClass("Sys.Net.WebRequestExecutor");Sys.Net.XMLDOM=function(d){if(!window.DOMParser){var c=["Msxml2.DOMDocument.3.0","Msxml2.DOMDocument"];for(var b=0,f=c.length;b0)this._timer=window.setTimeout(Function.createDelegate(this,this._onTimeout),d);this._xmlHttpRequest.send(c);this._started=true},getResponseHeader:function(b){var a;try{a=this._xmlHttpRequest.getResponseHeader(b)}catch(c){}if(!a)a="";return a},getAllResponseHeaders:function(){return this._xmlHttpRequest.getAllResponseHeaders()},get_responseData:function(){return this._xmlHttpRequest.responseText},get_statusCode:function(){var a=0;try{a=this._xmlHttpRequest.status}catch(b){}return a},get_statusText:function(){return this._xmlHttpRequest.statusText},get_xml:function(){var a=this._xmlHttpRequest.responseXML;if(!a||!a.documentElement){a=Sys.Net.XMLDOM(this._xmlHttpRequest.responseText);if(!a||!a.documentElement)return null}else if(navigator.userAgent.indexOf("MSIE")!==-1)a.setProperty("SelectionLanguage","XPath");if(a.documentElement.namespaceURI==="http://www.mozilla.org/newlayout/xml/parsererror.xml"&&a.documentElement.tagName==="parsererror")return null;if(a.documentElement.firstChild&&a.documentElement.firstChild.tagName==="parsererror")return null;return a},abort:function(){if(this._aborted||this._responseAvailable||this._timedOut)return;this._aborted=true;this._clearTimer();if(this._xmlHttpRequest&&!this._responseAvailable){this._xmlHttpRequest.onreadystatechange=Function.emptyMethod;this._xmlHttpRequest.abort();this._xmlHttpRequest=null;this._webRequest.completed(Sys.EventArgs.Empty)}}};Sys.Net.XMLHttpExecutor.registerClass("Sys.Net.XMLHttpExecutor",Sys.Net.WebRequestExecutor);Sys.Net._WebRequestManager=function(){this._defaultTimeout=0;this._defaultExecutorType="Sys.Net.XMLHttpExecutor"};Sys.Net._WebRequestManager.prototype={add_invokingRequest:function(a){this._get_eventHandlerList().addHandler("invokingRequest",a)},remove_invokingRequest:function(a){this._get_eventHandlerList().removeHandler("invokingRequest",a)},add_completedRequest:function(a){this._get_eventHandlerList().addHandler("completedRequest",a)},remove_completedRequest:function(a){this._get_eventHandlerList().removeHandler("completedRequest",a)},_get_eventHandlerList:function(){if(!this._events)this._events=new Sys.EventHandlerList;return this._events},get_defaultTimeout:function(){return this._defaultTimeout},set_defaultTimeout:function(a){this._defaultTimeout=a},get_defaultExecutorType:function(){return this._defaultExecutorType},set_defaultExecutorType:function(a){this._defaultExecutorType=a},executeRequest:function(webRequest){var executor=webRequest.get_executor();if(!executor){var failed=false;try{var executorType=eval(this._defaultExecutorType);executor=new executorType}catch(a){failed=true}webRequest.set_executor(executor)}if(executor.get_aborted())return;var evArgs=new Sys.Net.NetworkRequestEventArgs(webRequest),handler=this._get_eventHandlerList().getHandler("invokingRequest");if(handler)handler(this,evArgs);if(!evArgs.get_cancel())executor.executeRequest()}};Sys.Net._WebRequestManager.registerClass("Sys.Net._WebRequestManager");Sys.Net.WebRequestManager=new Sys.Net._WebRequestManager;Sys.Net.NetworkRequestEventArgs=function(a){Sys.Net.NetworkRequestEventArgs.initializeBase(this);this._webRequest=a};Sys.Net.NetworkRequestEventArgs.prototype={get_webRequest:function(){return this._webRequest}};Sys.Net.NetworkRequestEventArgs.registerClass("Sys.Net.NetworkRequestEventArgs",Sys.CancelEventArgs);Sys.Net.WebRequest=function(){this._url="";this._headers={};this._body=null;this._userContext=null;this._httpVerb=null;this._executor=null;this._invokeCalled=false;this._timeout=0};Sys.Net.WebRequest.prototype={add_completed:function(a){this._get_eventHandlerList().addHandler("completed",a)},remove_completed:function(a){this._get_eventHandlerList().removeHandler("completed",a)},completed:function(b){var a=Sys.Net.WebRequestManager._get_eventHandlerList().getHandler("completedRequest");if(a)a(this._executor,b);a=this._get_eventHandlerList().getHandler("completed");if(a)a(this._executor,b)},_get_eventHandlerList:function(){if(!this._events)this._events=new Sys.EventHandlerList;return this._events},get_url:function(){return this._url},set_url:function(a){this._url=a},get_headers:function(){return this._headers},get_httpVerb:function(){if(this._httpVerb===null){if(this._body===null)return "GET";return "POST"}return this._httpVerb},set_httpVerb:function(a){this._httpVerb=a},get_body:function(){return this._body},set_body:function(a){this._body=a},get_userContext:function(){return this._userContext},set_userContext:function(a){this._userContext=a},get_executor:function(){return this._executor},set_executor:function(a){this._executor=a;this._executor._set_webRequest(this)},get_timeout:function(){if(this._timeout===0)return Sys.Net.WebRequestManager.get_defaultTimeout();return this._timeout},set_timeout:function(a){this._timeout=a},getResolvedUrl:function(){return Sys.Net.WebRequest._resolveUrl(this._url)},invoke:function(){Sys.Net.WebRequestManager.executeRequest(this);this._invokeCalled=true}};Sys.Net.WebRequest._resolveUrl=function(b,a){if(b&&b.indexOf("://")!==-1)return b;if(!a||a.length===0){var d=document.getElementsByTagName("base")[0];if(d&&d.href&&d.href.length>0)a=d.href;else a=document.URL}var c=a.indexOf("?");if(c!==-1)a=a.substr(0,c);c=a.indexOf("#");if(c!==-1)a=a.substr(0,c);a=a.substr(0,a.lastIndexOf("/")+1);if(!b||b.length===0)return a;if(b.charAt(0)==="/"){var e=a.indexOf("://"),g=a.indexOf("/",e+3);return a.substr(0,g)+b}else{var f=a.lastIndexOf("/");return a.substr(0,f+1)+b}};Sys.Net.WebRequest._createQueryString=function(d,b){if(!b)b=encodeURIComponent;var a=new Sys.StringBuilder,f=0;for(var c in d){var e=d[c];if(typeof e==="function")continue;var g=Sys.Serialization.JavaScriptSerializer.serialize(e);if(f!==0)a.append("&");a.append(c);a.append("=");a.append(b(g));f++}return a.toString()};Sys.Net.WebRequest._createUrl=function(a,b){if(!b)return a;var d=Sys.Net.WebRequest._createQueryString(b);if(d.length>0){var c="?";if(a&&a.indexOf("?")!==-1)c="&";return a+c+d}else return a};Sys.Net.WebRequest.registerClass("Sys.Net.WebRequest");Sys.Net.WebServiceProxy=function(){};Sys.Net.WebServiceProxy.prototype={get_timeout:function(){return this._timeout},set_timeout:function(a){if(a<0)throw Error.argumentOutOfRange("value",a,Sys.Res.invalidTimeout);this._timeout=a},get_defaultUserContext:function(){return this._userContext},set_defaultUserContext:function(a){this._userContext=a},get_defaultSucceededCallback:function(){return this._succeeded},set_defaultSucceededCallback:function(a){this._succeeded=a},get_defaultFailedCallback:function(){return this._failed},set_defaultFailedCallback:function(a){this._failed=a},get_path:function(){return this._path},set_path:function(a){this._path=a},_invoke:function(d,e,g,f,c,b,a){if(c===null||typeof c==="undefined")c=this.get_defaultSucceededCallback();if(b===null||typeof b==="undefined")b=this.get_defaultFailedCallback();if(a===null||typeof a==="undefined")a=this.get_defaultUserContext();return Sys.Net.WebServiceProxy.invoke(d,e,g,f,c,b,a,this.get_timeout())}};Sys.Net.WebServiceProxy.registerClass("Sys.Net.WebServiceProxy");Sys.Net.WebServiceProxy.invoke=function(k,a,j,d,i,c,f,h){var b=new Sys.Net.WebRequest;b.get_headers()["Content-Type"]="application/json; charset=utf-8";if(!d)d={};var g=d;if(!j||!g)g={};b.set_url(Sys.Net.WebRequest._createUrl(k+"/"+encodeURIComponent(a),g));var e=null;if(!j){e=Sys.Serialization.JavaScriptSerializer.serialize(d);if(e==="{}")e=""}b.set_body(e);b.add_completed(l);if(h&&h>0)b.set_timeout(h);b.invoke();function l(d){if(d.get_responseAvailable()){var g=d.get_statusCode(),b=null;try{var e=d.getResponseHeader("Content-Type");if(e.startsWith("application/json"))b=d.get_object();else if(e.startsWith("text/xml"))b=d.get_xml();else b=d.get_responseData()}catch(m){}var k=d.getResponseHeader("jsonerror"),h=k==="true";if(h){if(b)b=new Sys.Net.WebServiceError(false,b.Message,b.StackTrace,b.ExceptionType)}else if(e.startsWith("application/json"))b=b.d;if(g<200||g>=300||h){if(c){if(!b||!h)b=new Sys.Net.WebServiceError(false,String.format(Sys.Res.webServiceFailedNoMsg,a),"","");b._statusCode=g;c(b,f,a)}}else if(i)i(b,f,a)}else{var j;if(d.get_timedOut())j=String.format(Sys.Res.webServiceTimedOut,a);else j=String.format(Sys.Res.webServiceFailedNoMsg,a);if(c)c(new Sys.Net.WebServiceError(d.get_timedOut(),j,"",""),f,a)}}return b};Sys.Net.WebServiceProxy._generateTypedConstructor=function(a){return function(b){if(b)for(var c in b)this[c]=b[c];this.__type=a}};Sys.Net.WebServiceError=function(c,d,b,a){this._timedOut=c;this._message=d;this._stackTrace=b;this._exceptionType=a;this._statusCode=-1};Sys.Net.WebServiceError.prototype={get_timedOut:function(){return this._timedOut},get_statusCode:function(){return this._statusCode},get_message:function(){return this._message},get_stackTrace:function(){return this._stackTrace},get_exceptionType:function(){return this._exceptionType}};Sys.Net.WebServiceError.registerClass("Sys.Net.WebServiceError");Type.registerNamespace("Sys.Services");Sys.Services._ProfileService=function(){Sys.Services._ProfileService.initializeBase(this);this.properties={}};Sys.Services._ProfileService.DefaultWebServicePath="";Sys.Services._ProfileService.prototype={_defaultLoadCompletedCallback:null,_defaultSaveCompletedCallback:null,_path:"",_timeout:0,get_defaultLoadCompletedCallback:function(){return this._defaultLoadCompletedCallback},set_defaultLoadCompletedCallback:function(a){this._defaultLoadCompletedCallback=a},get_defaultSaveCompletedCallback:function(){return this._defaultSaveCompletedCallback},set_defaultSaveCompletedCallback:function(a){this._defaultSaveCompletedCallback=a},get_path:function(){return this._path||""},load:function(c,d,e,f){var b,a;if(!c){a="GetAllPropertiesForCurrentUser";b={authenticatedUserOnly:false}}else{a="GetPropertiesForCurrentUser";b={properties:this._clonePropertyNames(c),authenticatedUserOnly:false}}this._invoke(this._get_path(),a,false,b,Function.createDelegate(this,this._onLoadComplete),Function.createDelegate(this,this._onLoadFailed),[d,e,f])},save:function(d,b,c,e){var a=this._flattenProperties(d,this.properties);this._invoke(this._get_path(),"SetPropertiesForCurrentUser",false,{values:a.value,authenticatedUserOnly:false},Function.createDelegate(this,this._onSaveComplete),Function.createDelegate(this,this._onSaveFailed),[b,c,e,a.count])},_clonePropertyNames:function(e){var c=[],d={};for(var b=0;b0)a.append(",");Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(b[c],a,false,g)}a.append("]")}else{if(Date.isInstanceOfType(b)){a.append('"\\/Date(');a.append(b.getTime());a.append(')\\/"');break}var d=[],f=0;for(var e in b){if(e.startsWith("$"))continue;if(e===Sys.Serialization.JavaScriptSerializer._serverTypeFieldName&&f!==0){d[f++]=d[0];d[0]=e}else d[f++]=e}if(i)d.sort();a.append("{");var j=false;for(c=0;c - - - - - - - - - - - - - - -
-

- Are you sure you wan to send this message?
-

- - -   |   - - -
- - \ No newline at end of file diff --git a/function-file/function-file.html b/function-file/function-file.html index 01bb61d..5bea2de 100644 --- a/function-file/function-file.html +++ b/function-file/function-file.html @@ -1,19 +1,15 @@ - - - - + + + + + - - - - - + \ No newline at end of file diff --git a/function-file/function-file.js b/function-file/function-file.js index 1976978..aef9e69 100644 --- a/function-file/function-file.js +++ b/function-file/function-file.js @@ -1,39 +1,288 @@ +/// +/// 'use strict'; -var dialog; + +/** @type {Event} */ var sendEvent; +/** @type {string[]} */ +var groups = []; +/** @type {Array} */ +var externals = []; +/** @type {completedCallbackDelegate} */ +var completedCallback; +/** @type {string} */ +var addinName = ""; +/** @type {Office.Message} */ +var item; +/** @type {string} */ +var thisUser= ""; +/** @type {string} */ +var domain = ""; +/** @type {Office.MessageCompose} */ +var composeItem; +/** + * Office Initializes here + * @param {Office.InitializationReason} reason + */ Office.initialize = function (reason) { // init here + item = Office.context.mailbox.item; + composeItem = Office.cast.item.toItemCompose(item); + thisUser = Office.context.mailbox.userProfile.emailAddress; + domain = getDomain(thisUser); + addinName = "Outlook Blocking Dialog with ExpandDL Sample"; }; +/** + * The Manifest points to this event when it detects + * the user pressing Send on an email message. See: + * https://docs.microsoft.com/en-us/outlook/add-ins/outlook-on-send-addins?product=outlook + * https://theofficecontext.com/2017/08/10/deploying-onsend-outlook-add-ins/ + * @param {*} event + */ function onSendEvent(event) { - sendEvent = event; - // dispaly a dialog in a frame - Office.context.ui.displayDialogAsync('https://localhost:3000/function-file/dialog.html', - { height: 20, width: 30, displayInIframe: true }, - function (asyncResult) { - dialog = asyncResult.value; - // callbacks from the parent - dialog.addEventHandler(Office.EventType.DialogEventReceived, processMessage); - dialog.addEventHandler(Office.EventType.DialogMessageReceived, processMessage); + sendEvent = event; // grab this so it does not get cleaned up + // show progress notification + showProgress("The Outlook Demo add-in is processing this message. Please wait..."); + // check the To/CC/BCC lines for users not in this domain + // split all groups and then evaluate, identify all external + // users that are listed in all the groups... + getExternalRecipientsAsync(function(){ + // were there any outside users? + if(externals.length > 0) { + // we have outside users found, so we need to + // ask the user for Yes or No + getResponseFromUser(); + } else { + // there are no external users + removeProgress(); + // Send - all internal + sendEvent.completed({ allowEvent: true }); + } // end-if + }, function(error) { + removeProgress(); + showError(error, function() { + // BLOCK THE SEND + sendEvent.completed({ allowEvent: false }); }); + }); +} + +/** + * Displays an error to the user + * @param {string} error + */ +function showError(error, callback) { + // uses the OfficeJS.dialogs Alert. See: + // https://github.com/davecra/OfficeJS.dialogs + // an error occurred trying to get all the emails on To/CC/BCC + Alert.Show("Unable to process TO/CC/BCC: " + error, function() { + // Notification Message (error) + Office.context.mailbox.item.notificationMessages.addAsync("error", { + type: "errorMessage", + message : "The Outlook Demo add-in failed to process this message." + }); + }, callback); // Alert.Show +} + +/** + * Display a progress message to the user + * @param {string} msg The message to display + */ +function showProgress(msg) { + // Notify the user the message is being processed just in case + // there are a LOT of groups and alot of user accounts + Office.context.mailbox.item.notificationMessages.addAsync("progress", { + type: "progressIndicator", + message : msg + }); +} + +/** + * Removes the progress message from the notifications area +*/ +function removeProgress() { + item.notificationMessages.removeAsync("progress"); +} + + +function showInformation(msg) { + item.notificationMessages.addAsync("information", { + type: "informationalMessage", + message : msg, + icon : "icon16", + persistent: false}); +} + +/** + * Notified the user that there are external users and then + * gets their response - yes (ok to send) or no (stop). + * @param {sendCallbackDelegate} result + */ +function getResponseFromUser() { + /** @type {string} */ + var message = "There are users that are outside your organization on the To/CC/BCC.\n" + + "Are you sure you want to send this message?" + /** @type {string} */ + var title = "Blocking Send"; + // uses the OfficeJS.dialogs MessageBox. See: + // https://github.com/davecra/OfficeJS.dialogs + MessageBox.Show(message, title, MessageBoxButtons.YesNoCancel, + MessageBoxIcons.Question, false, false, + // callback when the user presses a button on the dialog + function(button) { + // did the user click Yes + if(button == "Yes") { + removeProgress(); + // SEND + sendEvent.completed({ allowEvent: true }); + } else { + removeProgress(); + showInformation(addinName + " has stopped the message from being sent."); + // STOP THE SEND + sendEvent.completed({ allowEvent: false }); + } + }); +} + +/** + * Gets the domain portion of an email address. For example: + * - user@exchange.contoso.com = contoso.com + * - user@constoso.com = contoso.com + * @param {string} user The email address of the user + * @returns {string} domain name returned + */ +function getDomain(user) { + /** @type {string} */ + var fullDomain = user.split("@")[1]; + /** @type {string[]} */ + var parts = fullDomain.split("."); + /** @type {string} */ + var domain = parts[0] + "." + parts[1]; + if(parts.length > 2) { + domain = parts[parts.length-2] + "." + parts[parts.length-1]; + } + return domain; } -function processMessage(arg) { - // close the dialog - dialog.close(); - // procress the result - if(arg.error == 12006) { - // user clicked the (X) on the dialog - sendEvent.completed({ allowEvent: false }); +/** + * Gets all the recipients from the To/CC/BCC lines + * @param {completedCallbackDelegate} successCallback + * @param {errorCallbackDelegate} errorCallback + */ +function getExternalRecipientsAsync(successCallback, errorCallback) { + // use for later + completedCallback = successCallback; + + // get the TO line + composeItem.to.getAsync(function(toAsyncResult) { + if(toAsyncResult.error) { + errorCallback(error); } else { - if(arg.message=="Yes") { - // user clicked yes - sendEvent.completed({ allowEvent: true }); - } else { - // user clicked no - sendEvent.completed({ allowEvent: false }); + /** @type {Office.Recipients} */ + var recipients = toAsyncResult.value; + // if there are results, add them to the return array + if(recipients.length > 0) { + recipients.forEach(function(recip, index) { + if(recip.recipientType == Office.MailboxEnums.RecipientType.ExternalUser) { + externals.push(recip.emailAddress); + } else if(recip.recipientType == Office.MailboxEnums.RecipientType.DistributionList) { + groups.push(recip.emailAddress); + } + }); } - } -} + // get the CC line + composeItem.cc.getAsync(function(ccAsyncResult) { + if(ccAsyncResult.error) { + errorCallback(error); + } else { + /** @type {Office.Recipients} */ + var recipients = ccAsyncResult.value; + // if we have results + if(recipients.length > 0) { + recipients.forEach(function(recip, index) { + // only add unique/new items + if(recip.recipientType == Office.MailboxEnums.RecipientType.ExternalUser) { + externals.push(recip.emailAddress); + } else if(recip.recipientType == Office.MailboxEnums.RecipientType.DistributionList) { + groups.push(recip.emailAddress); + } + }); // forEach ccAsyncResult + } // end-if ccAsyncResult.value.length + + // get the BCC line + composeItem.bcc.getAsync(function(bccAsyncResult) { + if(bccAsyncResult.error) { + errorCallback(error); + } else { + /** @type {Office.Recipients} */ + var recipients = bccAsyncResult.value; + if(recipients.length > 0) { + recipients.forEach(function(recip, index) { + if(recip.recipientType == Office.MailboxEnums.RecipientType.ExternalUser) { + externals.push(recip.emailAddress); + } else if(recip.recipientType == Office.MailboxEnums.RecipientType.DistributionList) { + groups.push(recip.emailAddress); + } // end-if + }); // forEach + // call this function async, when it finished recursively calling + // itself and splitting all groups it find, it will issue a callack + // to this function callback defined now globally as completedCallback + splitGroupsAndFindExternalsRecursivelyAsync(); + } else { + splitGroupsAndFindExternalsRecursivelyAsync(); + } // end-if(bccAsyncResult.value.length > 0) + } // end-if(bccAsyncResult.error) + }); //composeItem.bcc.getAsync + } // end-if(ccAsyncResult.error) + }); // composeItem.cc.getAsync + } // end-if(toAsyncResult.error) + }); // to.getAsync +} + +/** + * Splits a group and calls the completed function + */ +function splitGroupsAndFindExternalsRecursivelyAsync() { + if(groups.length == 0) { + // if no groups stop + completedCallback(); + } else { + /** @type {string} */ + var group = groups.pop(); + // call expandGroup to get users + easyEws.expandGroup(group, function(groupUsers) { + groupUsers.forEach(function(groupUser, index){ + if(groupUser.MailboxType() == "PublicDL") { + groups.push(groupUser); + } else { + /** @type {string} */ + var emailDomain = getDomain(groupUser.Address()); + if(emailDomain != domain) { + externals.push(groupUser.Address()); + } + } + }); // groupUsers.forEach + splitGroupsAndFindExternalsRecursivelyAsync(); // recursive + }, function(error) { + console.log(error); + // just fail + completedCallback(); + }); // easyEws.expandGroup + } // end-if +} +/** + * This is the error callback + * @callback errorCallbackDelegate + * @param {string} error + * @returns {void} + */ +var errorCallbackDelegate = function(error) { }; +/** + * This is the completed callback + * @callback completedCallbackDelegate + * @returns {void} + */ +var completedCallbackDelegate = function() { }; \ No newline at end of file diff --git a/index.html b/index.html deleted file mode 100644 index 8653c40..0000000 --- a/index.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - Outlook-sample-1 - - - - - - - - - - -
-

Welcome

-
-
-

Discover what "Outlook-sample-1" can do for you today!

-
    -
  • - - Achieve more with Office integration -
  • -
  • - - Unlock features and functionality -
  • -
  • - - Create and visualize like a pro -
  • -
-
-
-

Modify the source files, then click Run.

- -
- - - - - - - \ No newline at end of file diff --git a/node_modules/.bin/eslint b/node_modules/.bin/eslint new file mode 100644 index 0000000..9f3ac31 --- /dev/null +++ b/node_modules/.bin/eslint @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../eslint/bin/eslint.js" "$@" + ret=$? +else + node "$basedir/../eslint/bin/eslint.js" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/.bin/eslint.cmd b/node_modules/.bin/eslint.cmd new file mode 100644 index 0000000..009a9ae --- /dev/null +++ b/node_modules/.bin/eslint.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\eslint\bin\eslint.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\eslint\bin\eslint.js" %* +) \ No newline at end of file diff --git a/node_modules/.bin/esparse b/node_modules/.bin/esparse new file mode 100644 index 0000000..2525527 --- /dev/null +++ b/node_modules/.bin/esparse @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../esprima/bin/esparse.js" "$@" + ret=$? +else + node "$basedir/../esprima/bin/esparse.js" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/.bin/esparse.cmd b/node_modules/.bin/esparse.cmd new file mode 100644 index 0000000..064f58e --- /dev/null +++ b/node_modules/.bin/esparse.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\esprima\bin\esparse.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\esprima\bin\esparse.js" %* +) \ No newline at end of file diff --git a/node_modules/.bin/esvalidate b/node_modules/.bin/esvalidate new file mode 100644 index 0000000..2137cd5 --- /dev/null +++ b/node_modules/.bin/esvalidate @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../esprima/bin/esvalidate.js" "$@" + ret=$? +else + node "$basedir/../esprima/bin/esvalidate.js" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/.bin/esvalidate.cmd b/node_modules/.bin/esvalidate.cmd new file mode 100644 index 0000000..8dfaec0 --- /dev/null +++ b/node_modules/.bin/esvalidate.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\esprima\bin\esvalidate.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\esprima\bin\esvalidate.js" %* +) \ No newline at end of file diff --git a/node_modules/.bin/js-yaml b/node_modules/.bin/js-yaml new file mode 100644 index 0000000..460d9df --- /dev/null +++ b/node_modules/.bin/js-yaml @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../js-yaml/bin/js-yaml.js" "$@" + ret=$? +else + node "$basedir/../js-yaml/bin/js-yaml.js" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/.bin/js-yaml.cmd b/node_modules/.bin/js-yaml.cmd new file mode 100644 index 0000000..ae8e7bc --- /dev/null +++ b/node_modules/.bin/js-yaml.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\js-yaml\bin\js-yaml.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\js-yaml\bin\js-yaml.js" %* +) \ No newline at end of file diff --git a/node_modules/.bin/rimraf b/node_modules/.bin/rimraf new file mode 100644 index 0000000..3cebd6e --- /dev/null +++ b/node_modules/.bin/rimraf @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../rimraf/bin.js" "$@" + ret=$? +else + node "$basedir/../rimraf/bin.js" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/.bin/rimraf.cmd b/node_modules/.bin/rimraf.cmd new file mode 100644 index 0000000..9333ec6 --- /dev/null +++ b/node_modules/.bin/rimraf.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\rimraf\bin.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\rimraf\bin.js" %* +) \ No newline at end of file diff --git a/node_modules/.bin/which b/node_modules/.bin/which new file mode 100644 index 0000000..cbe872c --- /dev/null +++ b/node_modules/.bin/which @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../which/bin/which" "$@" + ret=$? +else + node "$basedir/../which/bin/which" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/.bin/which.cmd b/node_modules/.bin/which.cmd new file mode 100644 index 0000000..588f44d --- /dev/null +++ b/node_modules/.bin/which.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\which\bin\which" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\which\bin\which" %* +) \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/NPM.DEPLOYMENT.INFO.yaml b/node_modules/@microsoft/office-js/NPM.DEPLOYMENT.INFO.yaml new file mode 100644 index 0000000..910d85c --- /dev/null +++ b/node_modules/@microsoft/office-js/NPM.DEPLOYMENT.INFO.yaml @@ -0,0 +1,49 @@ +version: 1.1.4 +tag: release +githubReleaseUrl: https://github.com/OfficeDev/office-js/releases/tag/v1.1.4 +githubViewUrl: https://github.com/OfficeDev/office-js/tree/v1.1.4 +deployedAt: 2018-01-19 3:43 am UTC (2018-01-18 7:43 pm Pacific Time) + +history: + adhocBranchName: __adhoc--release--16.0.8918.5450--2018-01-18--7.40pm + commitMessage: __adhoc--release--16.0.8918.5450--2018-01-18--7.40pm + fullCommitHistory: + - + sha: >- + https://github.com/OfficeDev/office-js/commits/2d55b49b6036ffa0ab627c0a48c88944b78df295 + message: >- + JS dist files -- + __adhoc--release--16.0.8918.5450--2018-01-18--7.40pm + - + sha: >- + https://github.com/OfficeDev/office-js/commits/9a7cfe25657e961d55037dda8aa8647be4f758e7 + message: >- + Localized strings -- + __adhoc--release--16.0.8918.5450--2018-01-18--7.40pm + - + sha: >- + https://github.com/OfficeDev/office-js/commits/c1ca4a4bc0fb1d76196cc2a5c0aaef0e14e91f77 + message: Copying other assets from the release branch of the repo + - + sha: >- + https://github.com/OfficeDev/office-js/commits/1fcdb88523d7d61000e4577f144bbcb790f8ba85 + message: >- + [PUBLISH TOOL] Add deployment infrastructure for adhoc NPM + publish + - + sha: >- + https://github.com/OfficeDev/office-js/commits/69ab6ab8ff4adc022298c8c3f66a069cd6b38d96 + message: >- + [BEGIN PUBLISH UPDATES] -- + __adhoc--release--16.0.8918.5450--2018-01-18--7.40pm + + +unpkgUrls: |- + this specific build number: + https://unpkg.com/@microsoft/office-js@1.1.4/dist/office.js + https://unpkg.com/@microsoft/office-js@1.1.4/dist/office.d.ts + builds using this same tag ("release"): + https://unpkg.com/@microsoft/office-js@release/dist/office.js + https://unpkg.com/@microsoft/office-js@release/dist/office.d.ts + +buildLog: https://travis-ci.org/OfficeDev/office-js/builds/330655521 \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/am-et/office_strings.debug.js b/node_modules/@microsoft/office-js/dist/am-et/office_strings.debug.js new file mode 100644 index 0000000..948a72f --- /dev/null +++ b/node_modules/@microsoft/office-js/dist/am-et/office_strings.debug.js @@ -0,0 +1,190 @@ +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("Strings"); +Strings.OfficeOM = function() +{ +}; +Strings.OfficeOM.registerClass("Strings.OfficeOM"); +Strings.OfficeOM.L_DialogOK = "እሺ"; +Strings.OfficeOM.L_CustomFunctionDefinitionMissing = "የተáŒá‰£áˆ©áŠ• áች የሚወክሠይህን ስሠያለዠባህሪይ በExcel.CustomFunctions ላይ መኖር አለበትá¢"; +Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "የተመረጠ ይዘት በሰንጠረዥ መáˆáŠ­ መሆን አለበትᢠá‹áˆ‚ቡን በሰንጠረዥ መáˆáŠ­ ያዘጋáŒá‰µ እና እንደገና ይሞክሩትá¢"; +Strings.OfficeOM.L_InitializeNotReady = "Office.js እስካáˆáŠ• ሙሉበሙሉ አáˆá‰°áŒ«áŠáˆá¢ እባክዎ ቆየት ብለዠእንደገና ይሞክሩ ወይሠየመáŠáˆ» ኮድዎን Office.መáŠáˆ» ተáŒá‰£áˆ­ ላይ ማከáˆá‹Ž እርáŒáŒ áŠ› á‹­áˆáŠ‘á¢"; +Strings.OfficeOM.L_InvalidAPICall = "የማይሰራ የ API ጥሪ"; +Strings.OfficeOM.L_SSOConnectionLostError = "A connection was lost during the sign in process."; +Strings.OfficeOM.L_SettingNameNotExist = "ተለይቶ የተገለá€á‹ የቅንጅት ስሠየለáˆá¢"; +Strings.OfficeOM.L_SelectionNotSupportCoercionType = "አáˆáŠ• የተመረጠዠተለይቶ ከተገለጸዠየአስገዳጅ አይáŠá‰µ የሚጣጣን አይደለáˆá¢"; +Strings.OfficeOM.L_CustomXmlError = "የታዛዥ XML ስህተትá¢"; +Strings.OfficeOM.L_CustomXmlExceedQuotaName = "የáˆáˆ­áŒ« ገደብ ደርሷáˆ"; +Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath áˆáˆ­áŒ«áŠ• ወደ 1024 ንጥሠáŠáŒˆáˆ®á‰½ ይገድባáˆá¢"; +Strings.OfficeOM.L_BindingCreationError = "ማጠáŠá‹« የመáጠር ስህተት"; +Strings.OfficeOM.L_InvalidResourceUrlMessage = "በተጠቀሰዠá‹áˆµáŒ¥ áˆáŠ­ á‹«áˆáˆ†áŠ የሃብት Url አለá‹á¢"; +Strings.OfficeOM.L_RequestTimeout = "የጥሪ መá‹áˆ°áŒƒá‹ በጣሠረዥሠስለሆአለመáˆáŒ¸áˆ ያስቸáŒáˆ«áˆá¢"; +Strings.OfficeOM.L_NotSupportedEventType = "ተለይቶ የተገለá€á‹ የááƒáˆœ á‹«á‹¥ á‹“á‹­áŠá‰µ {0} የሚደገá አይደለáˆá¢"; +Strings.OfficeOM.L_ActivityLimitReached = "የእንቅስቃሴ ገደብ ደርሷáˆá¢"; +Strings.OfficeOM.L_APICallFailed = "API ጥሪ አáˆá‰°áˆ³áŠ«áˆ"; +Strings.OfficeOM.L_RunMustReturnPromise = 'ወደ "run" ስáˆá‰µ የተላለáˆá‹ የባች ተáŒá‰£áˆ­ ቃሉን አáˆáŒ á‰ á‰€áˆá¢ ማናቸá‹áˆ በራስሰር-ዱካካቸዠበክክትሠስር ያሉ áŠáŒˆáˆ®á‰½ ባቹ ሲጠናቀቅ áŠáƒ መለቀቅ እንዲችሉ ተáŒá‰£áˆ© የተገባን ቃሠማክበር አለበትᢠበመሰረቱ የተገባ ቃáˆá‹ŽáŠ• የሚያከብሩት ከ "context.sync()" የሚገኘá‹áŠ• áˆáˆ‹áˆ½ በመመለስ áŠá‹á¢'; +Strings.OfficeOM.L_InvalidSetStartRowColumn = "ተለይተዠየተገለáት የመደዳ መጀመርያ ወይሠየዓáˆá‹µ መጀመርያ እሴቶች ትክክሠያáˆáˆ†áŠ‘ ናቸá‹á¢"; +Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "እባክዎ áˆáˆ­áŒ« ያካሂዱá¢"; +Strings.OfficeOM.L_InvalidReadForBlankRow = "ተለይቶ የተገለá€á‹ መደዳ ባዶá‹áŠ• áŠá‹á¢"; +Strings.OfficeOM.L_OsfControlTypeNotSupported = "OsfControl አይáŠá‰µ የሚደገá አይደለáˆá¢"; +Strings.OfficeOM.L_CannotWriteToSelection = "የአáˆáŠ‘ áˆáˆ­áŒ« ላይ ሊጻá አይችáˆáˆá¢"; +Strings.OfficeOM.L_DataReadError = "á‹áˆ‚ብ የማንበብ ስህተት"; +Strings.OfficeOM.L_EventRegistrationError = "áጻሜ የመመá‹áŒˆá‰¥ ስህተት"; +Strings.OfficeOM.L_SettingsCannotSave = "ቅንጅቶቹ ሊቀመጡ አይችሉáˆá¢"; +Strings.OfficeOM.L_NoCapability = "ይህን ተáŒá‰£áˆ­ ለማከናወን በቂ áቃድ የለዎትáˆá¢"; +Strings.OfficeOM.L_InvalidGetRowColumnCounts = "ተለይተዠየተገለáት የመደዳ ቆጠራ ወይሠየዓáˆá‹µ ቆጠራ እሴቶች ትክክሠያáˆáˆ†áŠ‘ ናቸá‹á¢"; +Strings.OfficeOM.L_OverwriteWorksheetData = "የተሰጠዠየá‹áˆ‚ብ áŠáŒˆáˆ­ á‹áˆ‚ብን ስለሚተካ ወይሠስለሚቀይር የተዘጋጀዠክንá‹áŠ• አáˆá‰°áˆ³áŠ«áˆá¢"; +Strings.OfficeOM.L_SSOConnectionLostErrorMessage = "A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones."; +Strings.OfficeOM.L_UserClickIgnore = "ተጠቃሚዠየንáŒáŒáˆ­ ሳጥኑን ችላ ማለትን መርጧáˆá¢"; +Strings.OfficeOM.L_DisplayDialogError = "የማሳያ ንáŒáŒáˆ­ ስህተት"; +Strings.OfficeOM.L_MemoryLimit = "የማከማቻ ገደብ ታáˆáˆá‹‹áˆ"; +Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "á‹áˆµáŒ¥ አክሠቀድሞá‹áŠ‘ የመዳረሻ ቶከን በመጠየቅ ላይ ስለሆአክወናዠአáˆá‰°áˆ³áŠ«áˆá¢"; +Strings.OfficeOM.L_PropertyDoesNotExist = "ባህሪ '{0}' በáŠáŒˆáˆ© ላይ አይኖርáˆá¢"; +Strings.OfficeOM.L_InvalidGrantMessage = "ለዚህ á‹áˆµáŒ¥ አክሠዋስትን ጠáቷáˆá¢"; +Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "ማስታወሻ: በቅርጽ ማá‹áŒ« API ጥሪ የጠዘጋáŒá‰µ የቅርጽ ማá‹áŒ£á‰µ ስብስቦች ከ 100 በታች እንዲሆን ይመከራáˆá¢"; +Strings.OfficeOM.L_Timeout = "ክወናዠጊዜዠአáˆááˆá¢"; +Strings.OfficeOM.L_APINotSupported = "API ኣይደገááˆ"; +Strings.OfficeOM.L_CustomFunctionImplementationMissing = "በExcel.CustomFunctions ላይ የተáŒá‰£áˆ©áŠ• áች የሚወክሠይህ ስሠያለዠባህሪይ ተáŒá‰£áˆ©áŠ• ሰራ ላይ የሚያá‹áˆ 'የጥሪ' ባህሪይ መያዠአለበትá¢"; +Strings.OfficeOM.L_GetDataIsTooLarge = "የተጠየቀዠየá‹áˆ‚ብ ስብስብ እጅጠትáˆá‰… áŠá‹á¢"; +Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "ተáŠá‰£á‰¢-ብቻ ባህሪ '{0}' ለማዘጋጀት በሙከራ ላይá¢"; +Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} አዲስ ዊንዶዉ ለማሳየት á‹­áˆáˆáŒ‹áˆá¢"; +Strings.OfficeOM.L_CellDataAmountBeyondLimits = "ማስታወሻ: ሰንጠረዡ ላይ የሚኖሩት የህዋሶች á‰áŒ¥áˆ­ ከ 20,000ህዋሶች በታች እንዲሆኑ ይመከራáˆá¢"; +Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "መተáŒá‰ áˆªá‹« {0} የለáˆá¢ Microsoft.Office.WebExtension.መáŠáˆ»(áˆáŠ­áŠ•á‹«á‰µ) አáˆá‰°áŒ áˆ«áˆá¢"; +Strings.OfficeOM.L_ApiNotFoundDetails = "ስáˆá‰µ ወይሠባህሪ {0} በ {2} ስሪትዎ á‹áˆµáŒ¥ የማይገአየ {1} መመዘኛ ስብስብ ክáሠáŠá‹á¢"; +Strings.OfficeOM.L_ConnectionFailureWithDetails = "በ {0} የአቋሠኮድᣠየስህተት ኮድ {1} እና የሚከተለá‹áŠ• የስህተት መáˆá‹•áŠ­á‰µá¥ {2} ጥያቄዠአáˆá‰°áˆ³áŠ«áˆá¢"; +Strings.OfficeOM.L_UnsupportedUserIdentity = "የተጠቃሚ የማንáŠá‰µ á‹“á‹­áŠá‰µ አáˆá‰°á‹°áŒˆáˆáˆá¢"; +Strings.OfficeOM.L_NetworkProblem = "አá‹á‰³áˆ¨áˆ˜áˆ¨á‰¥ ችáŒáˆ­"; +Strings.OfficeOM.L_SSOServerErrorMessage = "በአገáˆáŒ‹á‹© ላይ á‹«áˆá‰°áŒ á‰ á‰€ ክስተት ተከ"; +Strings.OfficeOM.L_DataWriteError = "á‹áˆ‚ብ የመጻá ስህተት"; +Strings.OfficeOM.L_BindingToMultipleSelection = "ተያያዥ á‹«áˆáˆ†áŠ‘ áˆáˆ­áŒ«á‹Žá‰½ አይደገá‰áˆá¢"; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage = "ይህ ተጨማሪዠበዚህ áቃድ á‹áˆµáŒ¥ የተጠቃሚ ይዘትን ስለማይደáŒá ክወናዠአáˆá‰°áˆ³áŠ«áˆ"; +Strings.OfficeOM.L_InvalidFormat = "የማይሰራ የቅርጽ ስህተት"; +Strings.OfficeOM.L_GetDataParametersConflict = "ተለይተዠየተገለáት መለክያዎች ይጋጫሉá¢"; +Strings.OfficeOM.L_InvalidApiCallInContext = "በአáˆáŠ‘ የትርጉሠአá‹á‹µ ላይ ማይሰራ የ API ጥሪá¢"; +Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "á‹áˆ‚ቡ ጊዜዠያለáˆá‰ á‰µ áŠá‹á¢ áŠáŒˆáˆ©áŠ• እንደገና ሰርስረዠያá‹áŒ¡á¢"; +Strings.OfficeOM.L_ValueNotLoaded = 'የእሴቱ የá‹áŒ¤á‰µ áŠáŒˆáˆ­ ገና አáˆá‰°áŒ«áŠáˆá¢ የእሴት ባህሪ ከማንበብዎ በáŠá‰µá£ በተያያዘዠየጥያቄ ይዘት ላይ "context.sync()" á‹­á‹°á‹áˆ‰á¢'; +Strings.OfficeOM.L_SelectionCannotBound = "ወደ አáˆáŠ‘ ስáራ ሊታጠá አይችáˆáˆá¢"; +Strings.OfficeOM.L_DialogAlreadyOpened = "ይህ ዉስጠ-ተጨማሪ የáŠá‰ƒ ንáŒáŒáˆ­ ስለአለዉ አንቅስቃሴዉ አáˆá‰°áˆ³áŠ«áˆ"; +Strings.OfficeOM.L_SetDataParametersConflict = "ተለይተዠየተገለáት መለክያዎች ይጋጫሉá¢"; +Strings.OfficeOM.L_CannotRegisterEvent = "የክስተት እጀታዠሊመዘገብ አይችáˆáˆá¢"; +Strings.OfficeOM.L_UnsupportedEnumeration = "የማይደገá á‰áŒ¥áˆ­ አሰጣጥ"; +Strings.OfficeOM.L_OperationNotSupported = "ክወናዠአáˆá‰°á‹°áŒˆáˆáˆá¢"; +Strings.OfficeOM.L_TooManyIncompleteRequests = "ቀደሠብሎ የተጀመረዠጥሪ እስኪጠናቀቅ ይጠብá‰á¢"; +Strings.OfficeOM.L_InvalidGetRows = "ተለይተዠየተገለáት መደዳዎች ትክክሠያáˆáˆ†áŠ‘ ናቸá‹á¢"; +Strings.OfficeOM.L_SliceSizeNotSupported = "ተለይቶ የተገለá€á‹ የá‰áˆ«áˆ½ መጠን የሚደገá አይደለáˆá¢"; +Strings.OfficeOM.L_CloseFileBeforeRetrieve = "ሌላ መáˆáˆ°á‹ ከማáˆáŒ£á‰µá‹Ž በáŠá‰µ በአáˆáŠ‘ á‹á‹­áˆ ላይ closeAsync"; +Strings.OfficeOM.L_InvalidNode = "የማይሰራ ኖድ"; +Strings.OfficeOM.L_InvalidBinding = "የማይሰራ አተጣጠá"; +Strings.OfficeOM.L_ColIndexOutOfRange = "የአáˆá‹µ ኢንዴክስ ዋጋዠከተáˆá‰€á‹°á‹ አá‹á‹µ á‹áŒª áŠá‹á¢ ከአáˆá‹¶á‰½ á‰áŒ¥áˆ­ á‹«áŠáˆ° ዋጋ (0 ወይሠየበለጠ) ይጠቀሙá¢"; +Strings.OfficeOM.L_DialogNavigateError = "የንáŒáŒáˆ­ ማስሻ ስህተት"; +Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "ችላ በáˆ"; +Strings.OfficeOM.L_HostError = "የአስተናጋጅ ስህተት"; +Strings.OfficeOM.L_OutOfRange = "ከአá‹á‹µ á‹áŒª"; +Strings.OfficeOM.L_CallbackNotAFunction = "መáˆáˆ¶áˆ˜á‹°á‹ˆáˆ የአይáŠá‰µ ተáŒá‰£áˆ­ መሆን አለበትᣠየ {0} አይáŠá‰µ áŠá‰ áˆ­á¢"; +Strings.OfficeOM.L_UnknownBindingType = "የአተጣጠá አይáŠá‰± የሚደገá አይደለáˆá¢"; +Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "የ Office የመስመር ላይ ክáለ ጊዜዎ ጊዜዠአáˆáŽá‰ á‰³áˆ ወይሠáˆáŠ­ á‹«áˆáŠ¾áŠá¢ ለመቀጠáˆá£ ገጹን ያድሱትá¢"; +Strings.OfficeOM.L_MultipleNamedItemFound = "ብዙ አንድ አይáŠá‰µ ስሠያላቸዠáŠáŒˆáˆ®á‰½ ተገáŠá‰°á‹‹áˆá¢"; +Strings.OfficeOM.L_InternalErrorDescription = "አንድ á‹áˆ³áŒ£á‹Š ስሕተት ተáˆáŒ¥áˆ¯áˆá¢"; +Strings.OfficeOM.L_InvalidColumnsForBinding = "ተለይተዠየተገለáት á‹“áˆá‹¶á‰½ ትክክሠያáˆáˆ†áŠ‘ ናቸá‹á¢"; +Strings.OfficeOM.L_PropertyNotLoaded = 'ባህሪ {0}\' አይገáŠáˆá¢ የባህሪ እሴት ከማንበብዎ በáŠá‰µá£ በያዘዠáŠáŒˆáˆ­ ላይ ያለ የጫን ስáˆá‰µ ይጥሩ እና በተያያዘዠየጥያቄ አገባበ áŠáŒˆáˆ­ ላይ "context.sync()" ይጥሩá¢'; +Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "áቀድ"; +Strings.OfficeOM.L_RequestTokenUnavailable = "ይህ API የጥሪá‹áŠ• ሞገድ እንዲያዘገይ ታáኖ áŠá‰ áˆ­á¢"; +Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "አስተባባሪ á“ራሜትሮች ታብሌቱ የተዋሃዱ ህዋሶች በያዘበት ጊዜ ከአስገዳጅ የታብሌት አይáŠá‰¶á‰½ ጋር መጠቀሠአይቻáˆáˆá¢"; +Strings.OfficeOM.L_UnsupportedEnumerationMessage = "ኢኑሜሬሽኑ የአáˆáŠ‘ አስተናጋጅ መተáŒá‰ áˆªá‹«áˆ‹á‹­ የሚደገá አይደለáˆá¢"; +Strings.OfficeOM.L_InvalidDataObject = "የማይሰራ የá‹áˆ‚ብ አርእስት"; +Strings.OfficeOM.L_TooManyOptionalObjects = "ብዙ አማራጭያዊ ተáŒá‰£áˆ®á‰½ በá“ራሜትር á‹áˆ­á‹áˆ­ ላይ"; +Strings.OfficeOM.L_AppNameNotExist = "የ {0} ተጨማሪ ስሠየለáˆá¢"; +Strings.OfficeOM.L_UserAbortedMessage = "ተጠቃሚዠየá‹áˆµáŒ¥ አክሠáˆá‰ƒá‹¶á‰½áŠ• አáˆá‰°áˆµáˆ›áˆ›áˆá¢"; +Strings.OfficeOM.L_ShuttingDown = "á‹áˆ‚ቡ በአáˆáŠ‘ ሰአት ሰርቨሩ ላይ ስለሌለ ክንá‹áŠ‘ ሊሳካ አáˆá‰»áˆˆáˆá¢"; +Strings.OfficeOM.L_CoercionTypeNotSupported = "ተለይቶ የተገለá€á‹ አስገዳጅ á‹“á‹­áŠá‰µ የሚደገá አይደለáˆá¢"; +Strings.OfficeOM.L_InvalidSelectionForBindingType = "በአáˆáŠ‘ áˆáˆ­áŒ« እና በዚህኛዠየማጠáŠá‹« አይáŠá‰µ ማጠá áˆáˆáŒ áˆ­ አይችáˆáˆá¢"; +Strings.OfficeOM.L_CustomFunctionNameCannotSplit = "የተáŒá‰£áˆ­ ስሠባዶ á‹«áˆáˆ†áŠ የስሠቦታ እና ባዶ á‹«áˆáˆ†áŠ አጭር ስሠመያዠአለበትá¢"; +Strings.OfficeOM.L_IndexOutOfRange = "ኢንዴክስ ከአá‹á‹µ á‹áŒª"; +Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "አስተባባሪ á“ራሜትሮች ታብሌቱ የተዋሃዱ ህዋሶች በያዘበት ጊዜ ከአስገዳጅ የታብሌት አይáŠá‰¶á‰½ ጋር መጠቀሠአይቻáˆáˆá¢"; +Strings.OfficeOM.L_BrowserAPINotSupported = "ይህ ማሰሻ የተጠየቀá‹áŠ• API አይደáŒááˆá¢"; +Strings.OfficeOM.L_ReadSettingsError = "የክንá‹áŠ• አá‹á‹¶á‰½ ስህተት ያንብቡ"; +Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "á‹áˆµáŒ¥ አክሠቀድሞá‹áŠ‘ የመዳረሻ ቶከን በመጠየቅ ላይ áŠá‹á¢"; +Strings.OfficeOM.L_InvalidOperationInCellEditMode = "Excel በህዋስ አርትዕ áˆáŠ”ታ á‹áˆµáŒ¥ áŠá‹á¢ እባክዎ ENTER ወይሠTAB በመጫን ወይሠሌላ ህዋስ በመáˆáˆ¨áŒ¥ የአርትዕ áˆáŠ”ታ ዘáŒá‰°á‹ á‹­á‹áŒ¡ እና ከዚያ እንደገና ይሞክሩá¢"; +Strings.OfficeOM.L_NamedItemNotFound = "የተጠቀሰዠንጥሠáŠáŒˆáˆ­ የለáˆá¢"; +Strings.OfficeOM.L_RedundantCallbackSpecification = "መáˆáˆ°áˆ…á‹°á‹áˆ በክርክር á‹áˆ­á‹áˆ­ እና በኣማራጭያዊ áŠáŒˆáˆ­ ላይ ሊለይ ኣይችáˆáˆá¢"; +Strings.OfficeOM.L_InvalidSSOAddinMessage = "የማንáŠá‰± API በዚህ á‹áˆµáŒ¥ አክሠá‹áˆµáŒ¥ አáˆá‰°á‹°áŒˆáˆáˆá¢"; +Strings.OfficeOM.L_CustomXmlNodeNotFound = "ተለይቶ የተገለá€á‹ ኖድ ሊገአአáˆá‰»áˆˆáˆá¢"; +Strings.OfficeOM.L_DataNotMatchCoercionType = "ተለይቶ የተገለጸዠá‹áˆ‚ብ áŠáŒˆáˆ­ ከአáˆáŠ‘ áˆáˆ­á‰» ጋር የሚጣጣሠአይደለáˆá¢"; +Strings.OfficeOM.L_SetDataIsTooLarge = "ተለይቶ ተገለá€á‹ የá‹áˆ‚ብ áŠáŒˆáˆ­ በጣሠáŒá‹™á áŠá‹á¢"; +Strings.OfficeOM.L_DataNotMatchSelection = "የቀረበዠየá‹áˆ‚ብ áŠáŒˆáˆ­ አáˆáŠ• ካለዠየáˆáˆ­áŒ« á‰…áˆ­á… áŠ¥áŠ•á‹²áˆáˆ ስá‹á‰µáŠ“ á‰áˆ˜á‰µ ጋር አንድ አይደለáˆá¢"; +Strings.OfficeOM.L_InvalidBindingError = "የማይሰራ የአተጣጠá ስህተት"; +Strings.OfficeOM.L_InvalidFormatValue = "ከቅርጽ á“ራሜትሮች አንዱ ወይሠከዛ በላይ የማይáˆá‰€á‹± ዋጋዎች ይዘዋáˆá¢ ዋጋዎቹን እንደገና á‹­áˆá‰µáˆ¹á‹‹á‰¸á‹ እና እንደገና ይሞክሩá¢"; +Strings.OfficeOM.L_InvalidCellsValue = "ከህዋሶቹ á“ራሜትሮች አንዱ ወይሠከዛ በላይ የማይáˆá‰€á‹± ዋጋዎች ይዘዋáˆá¢ ዋጋዎቹን እንደገና á‹­áˆá‰µáˆ¹á‹‹á‰¸á‹ እና እንደገና ይሞክሩá¢"; +Strings.OfficeOM.L_InvalidValue = "የማይሰራ ዋጋ"; +Strings.OfficeOM.L_InvalidGetStartRowColumn = "ተለይተዠየተገለáት የመደዳ መጀመርያ ወይሠየዓáˆá‹µ መጀመርያ እሴቶች ትክክሠያáˆáˆ†áŠ‘ ናቸá‹á¢"; +Strings.OfficeOM.L_SSOClientErrorMessage = "በደንበኛዠá‹áˆµáŒ¥ á‹«áˆá‰°áŒ á‰ á‰€ ስህተት ተከስቷáˆá¢"; +Strings.OfficeOM.L_CannotNavigateTo = "áŠáŒˆáˆ© ዳሰሳ በማይደገáበት ቦታ áŠá‹ ሰáሮ የሚገኘá‹á¢"; +Strings.OfficeOM.L_BindingNotExist = "ተለይቶ የተገለá€á‹ አተጣጠá የለáˆá¢"; +Strings.OfficeOM.L_SSOClientError = "ከ Office በáˆá‰ƒá‹µ አሰጣጥ ጥያቄዠá‹áˆµáŒ¥ ስህተት ተከስቷáˆá¢"; +Strings.OfficeOM.L_InternalError = "á‹áˆµáŒ£á‹Š ስህተት"; +Strings.OfficeOM.L_InvalidSetRows = "ተለይተዠየተገለáት መደዳዎች ትክክሠያáˆáˆ†áŠ‘ ናቸá‹á¢"; +Strings.OfficeOM.L_UnsupportedDataObject = "የቀረበዠየá‹áˆ‚ብ áŠáŒˆáˆ­ አይáŠá‰µ የሚደገá አይደለáˆá¢"; +Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "አሳሽዎን ያዋቅሩ"; +Strings.OfficeOM.L_EventHandlerRemovalFailed = "የáጻሜ አስተዳዳሪá‹áŠ• ለማስወገድ አáˆá‰»áˆˆáˆá¢"; +Strings.OfficeOM.L_InvalidNamedItemForBindingType = "ተለይቶ የተገለá€á‹ አተጣጠá á‹“á‹­áŠá‰µ ከቀረበዠስሙ ከተጠቀሰዠáŠáŒˆáˆ­ ጋር የሚጣጣሠአይደለáˆá¢"; +Strings.OfficeOM.L_UserAborted = "ተጠቃሚ ያቋረጠዠየስáˆáˆáŠá‰µ ጥያቄá¢"; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory = "ይህ ተጨማሪዠየተጠቃሚ ይዘትን አይደáŒááˆá¢"; +Strings.OfficeOM.L_NotSupportedBindingType = "ተለይቶ የተገለá€á‹ አተጣጠá á‹“á‹­áŠá‰µ {0} የሚደገá አይደለáˆá¢"; +Strings.OfficeOM.L_InvalidTableOptionValue = "ከሰንጠረዥ አማራጮች á“ራሜትሮች አንዱ ወይሠከዛ በላይ የማይáˆá‰€á‹± ዋጋዎች ይዘዋáˆá¢ ዋጋዎቹን እንደገና á‹­áˆá‰µáˆ¹á‹‹á‰¸á‹ እና እንደገና ይሞክሩá¢"; +Strings.OfficeOM.L_DataNotMatchBindingSize = "የቀረበዠየá‹áˆ‚ብ áŠáŒˆáˆ­ አáˆáŠ• ካለዠየáˆáˆ­áŒ« መጠን ጋር አንድ አይደለáˆá¢"; +Strings.OfficeOM.L_FormattingReminder = "ቅርጽ የማስያዠአስታዋሽ"; +Strings.OfficeOM.L_SpecifiedIdNotExist = "ተለይቶ የተገለá€á‹ ID የለáˆá¢"; +Strings.OfficeOM.L_FormatValueOutOfRange = "ዋጋዠከተáˆá‰€á‹°á‹ አá‹á‹µ á‹áŒª áŠá‹á¢"; +Strings.OfficeOM.L_TooManyOptionalFunction = "ብዙ አማራጭያዊ ተáŒá‰£áˆ®á‰½ በá“ራሜትር á‹áˆ­á‹áˆ­ ላይ"; +Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = "ወደ ባህሪ '{0}' የተደረጉ ለá‹áŒ¦á‰½ በ \"object.set\" ስáˆá‰µ በኩሠሊተገበሩ አይችሉáˆá¢"; +Strings.OfficeOM.L_EventHandlerNotExist = "ለዚህ አተጣጠá የሚሆን ተለይቶ የተገለá€á‹ የááƒáˆœ á‹«á‹¥ ሊገአአáˆá‰»áˆˆáˆá¢"; +Strings.OfficeOM.L_InvalidGetColumns = "ተለይተዠየተገለáት á‹“áˆá‹¶á‰½ ትክክሠያáˆáˆ†áŠ‘ ናቸá‹á¢"; +Strings.OfficeOM.L_DataWriteReminder = "ዳታ የመጻá አስታዋሽ"; +Strings.OfficeOM.L_RowIndexOutOfRange = "የመደዳዠኢንዴክስ ዋጋ ከተáˆá‰€á‹°á‹ አá‹á‹µ á‹áŒª áŠá‹á¢ ከመደዳዎቹ á‰áŒ¥áˆ­ የሚያንስ ዋጋ (0 ወይሠከዛ የበለጠ) ያስገቡá¢"; +Strings.OfficeOM.L_FunctionCallFailed = "የተáŒá‰£áˆ­ {0} ጥሪ አáˆá‰°áˆ³áŠ«áˆá£ ስህተት ኮድ: {1}á¢"; +Strings.OfficeOM.L_CustomXmlOutOfDateName = "á‹áˆ‚ቡ ወቅታዊ አይደለáˆ"; +Strings.OfficeOM.L_SettingsStaleError = "የክንá‹áŠ• አá‹á‹¶á‰½ ስቴሠስህተት"; +Strings.OfficeOM.L_TooManyArguments = "በጣሠብዙ ክርክሮች"; +Strings.OfficeOM.L_FileTypeNotSupported = "ተለይቶ የተገለá€á‹ የá‹á‹­áˆ á‹“á‹­áŠá‰µ የሚደገá አይደለáˆá¢"; +Strings.OfficeOM.L_InvalidCoercion = "የማይሰራ የአስገዳጅ አይáŠá‰µ"; +Strings.OfficeOM.L_DialogRequireHTTPS = "የ HTTP á•áˆ®á‰°áŠ®áˆ‰ አáˆá‰°á‹°áŒˆáˆáˆá¢ በáˆá‰µáŠ© HTTPS ተጠቀáˆ"; +Strings.OfficeOM.L_NotImplemented = "ተáŒá‰£áˆ© {0} አáˆá‰°áˆáŒ¸áˆ˜áˆá¢"; +Strings.OfficeOM.L_InvalidGrant = "ቅድሚያ áˆá‰ƒá‹µ መስጠት ጠáቷáˆá¢"; +Strings.OfficeOM.L_PermissionDenied = "áˆá‰ƒá‹µ ተከáˆáŠ­áˆáˆ"; +Strings.OfficeOM.L_InvalidRequestContext = "áŠáŒˆáˆ© በáˆáˆ‰áˆ የተለያዩ የጥያቄ አገባበ áŠáŒˆáˆ­ ጥቅሠላይ ሊá‹áˆ አይችáˆáˆá¢"; +Strings.OfficeOM.L_InvalidArgument = "የáŠáŒ‹áˆª እሴት '{0}' ለዚህ áˆáŠ”ታ አይሰራáˆá£ ጠáቷሠወይሠትክክለኛá‹áŠ• ቅርጸት አይደለáˆá¢"; +Strings.OfficeOM.L_DataNotMatchBindingType = "ተለይቶ ተገለá€á‹ የá‹áˆ‚ብ áŠáŒˆáˆ­ ከአተጣጠá á‹“á‹­áŠá‰± ጋር የሚጣጣሠአይደለáˆá¢"; +Strings.OfficeOM.L_InValidOptionalArgument = "የማይሰራ አማራጭያዊ ክርክር"; +Strings.OfficeOM.L_GetSelectionNotSupported = "አáˆáŠ• የተመረጠዠየሚደገá አይደለáˆá¢"; +Strings.OfficeOM.L_InvalidDataFormat = "ተለይቶ የተገለጸዠá‹áˆ‚ብ ቅርጽ የማይሰራ áŠá‹á¢"; +Strings.OfficeOM.L_CustomFunctionNameContainsBadChars = "ተáŒá‰£áˆ© áŠá‹°áˆŽá‰½áŠ•á£ አሀዞችንᣠሰረዘዘብጦች እና áŠáŒ¥á‰¦á‰½áŠ• ብቻ ሊያካትት ይችላáˆá¢"; +Strings.OfficeOM.L_UserNotSignedIn = "ማንሠወደ Office በማንáŠá‰µ የገባ ተጠቃሚ የለáˆá¢"; +Strings.OfficeOM.L_InvalidObjectPath = 'የáŠáŒˆáˆ­ መንገድ \'{0}\' እርስዎ ለመስራት በመሞከር ላይ ያሉትን አይሰራáˆá¢ áŠáŒˆáˆ© በሙሉ ብዙ "context.sync" ጥሪዎች እየተጠቀሙበት እና ከ ".run" ባች ተከታታይ መáˆáŒ¸áˆ á‹áŒ­ ከሆáŠá£ እባክዎ የáŠáŒˆáˆ©áŠ• ዕድሜ ለማስተዳደር የ "context.trackedObjects.add()" እና "context.trackedObjects.remove()" ስáˆá‰µ ይጠቀሙá¢'; +Strings.OfficeOM.L_InvalidBindingOperation = "የማይሰራ የአተጣጠá ኦá•áˆ¬áˆ½áŠ•"; +Strings.OfficeOM.L_DocumentReadOnly = "የተጠየቀዠክንá‹áŠ• በአáˆáŠ‘ የሰáŠá‹µ አይáŠá‰µ አይáˆá‰€á‹µáˆá¢"; +Strings.OfficeOM.L_NewWindowCrossZone = "በአሳሽዎ á‹áˆµáŒ¥ ያሉትን የደህንáŠá‰µ የክንá‹áŠ• አá‹á‹¶á‰½ የንáŒáŒáˆ­ ሳጥኑን ከመáጠር ከáˆáŠ­áˆˆá‹áŠ“áˆá¢ የተለየ አሳሽ ወይሠ{0} ይሞክሩ ስለዚህ '{1}' እና በአድራሻ ትርዎ ላይ የታየá‹áŠ• ጎራ በተመሳሳይ የደህንáŠá‰µ ዞን á‹áˆµáŒ¥ ናቸá‹á¢"; +Strings.OfficeOM.L_SettingsAreStale = "የክንá‹áŠ• አá‹á‹¶á‰¹ ወቅታዊ ስላáˆáˆ†áŠ‘ ሊቀመጡ አáˆá‰»áˆ‰áˆá¢"; +Strings.OfficeOM.L_SSOServerError = "በáˆá‰ƒá‹µ አሰጣጥ አቅራቢዠá‹áˆµáŒ¥ ስህተት ተከስቷáˆá¢"; +Strings.OfficeOM.L_NetworkProblemRetrieveFile = "á‹á‹­áˆ‰ መáˆáˆ¶ የማáŒáŠ˜á‰µ ጉዳይ የአá‹á‰³áˆ¨áˆ˜áˆ¨á‰¥ ችáŒáˆ­ ከáˆáŠ­áˆŽá‰³áˆá¢"; +Strings.OfficeOM.L_InvalidResourceUrl = "áˆáŠ­ á‹«áˆáˆ†áŠ የመተáŒá‰ áˆªá‹« ሃብት Url ቀርቧáˆá¢"; +Strings.OfficeOM.L_DataStale = "á‹áˆ‚ቡ ወቅታዊ አይደለáˆ"; +Strings.OfficeOM.L_DialogInvalidScheme = "የ URL አገባቡን አáˆá‰°á‹°áŒˆáˆáˆá¢ በáˆá‰µáŠ© HTTPS ተጠቀáˆá¢"; +Strings.OfficeOM.L_ElementMissing = "የሰንጠረዡን ህዋስ á‰…áˆ­á… áˆ›áˆµá‹«á‹ áŠ áˆá‰»áˆáŠ•áˆ áˆáŠ­áŠ•á‹«á‰±áˆ አንዳንድ መለክያ እሴቶች ስለጠá‰á¢ መለክያዎቹን በድጋሚ-በማረጋገጥ እንደገና ይሞክሩá¢"; +Strings.OfficeOM.L_NotSupported = "ተáŒá‰£áˆ© {0} የሚደገá አይደለáˆá¢"; +Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "የአሳሽ ገደቦች የንáŒáŒáˆ­ ሳጥኑን ከመáጠር ከáˆáŠ­áˆˆá‹áŠ“áˆá¢ የንáŒáŒáˆ­ ሳጥኑ ጎራ እና የá‹áˆµáŒ¥-አክሠአስተናጋጠጎራ በተመሳሳይ የድህንáŠá‰µ ዞን አይደሉáˆá¢"; +Strings.OfficeOM.L_EventHandlerAdditionFailed = "የáጻሜ አስተዳዳሪá‹áŠ• ለማከሠአáˆá‰»áˆˆáˆá¢"; +Strings.OfficeOM.L_ConnectionFailureWithStatus = "በ {0} የአቋሠኮድ ጥያቄዠአáˆá‰°áˆ³áŠ«áˆá¢"; +Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "የተጠቃሚ የማንáŠá‰µ á‹“á‹­áŠá‰µ አáˆá‰°á‹°áŒˆáˆáˆá¢"; +Strings.OfficeOM.L_InvalidOrTimedOutSession = "áˆáŠ­ á‹«áˆáŠ¾áŠ ወይሠጊዜ ያለáˆá‰ á‰µ ክáለ ጊዜ"; +Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "ክንá‹áŠ‘ እዚህኛዠየአተጣጠá አይáŠá‰µ ላይ የሚደገá አይደለáˆá¢"; +Strings.OfficeOM.L_SaveSettingsError = "የክንá‹áŠ• አá‹á‹¶á‰½ ስህተት ያስቀáˆáŒ¡"; +Strings.OfficeOM.L_MissingRequiredArguments = "የተወሰኑ አስáˆáˆ‹áŒŠ ክርክሮች ይጎድሉታáˆ"; +Strings.OfficeOM.L_InvalidApiArgumentsMessage = "áˆáŠ­ á‹«áˆáˆ†áŠ የáŒá‰¤á‰µ áŠáŒ‹áˆª እሴቶችá¢"; +Strings.OfficeOM.L_NavOutOfBound = "ክንá‹áŠ‘ አáˆá‰°áˆ³áŠ«áˆ áˆáŠ­áŠ•á‹«á‰±áˆ ኢንዴክሱ ከአá‹á‹± á‹áŒª áŠá‹á¢"; +Strings.OfficeOM.L_MissingParameter = "የታጣ á“ራሜትር"; +Strings.OfficeOM.L_DialogAddressNotTrusted = "የጎራዠURL በገለጻ á‹áˆ­á‹áˆ© በመተáŒá‰ áˆªá‹« ጎራዎች አባሠá‹áˆµáŒ¥ አáˆá‰°áŠ«á‰°á‰°áˆá¢"; +Strings.OfficeOM.L_InvalidArgumentGeneric = "ወደ ተáŒá‰£áˆ© የተላለሠáŠáŒ‹áˆª እሴት(ቶች) ለዚህ áˆáŠ”ታ አይሰራáˆá£ ጠáቷሠወይሠበትክክሠቅርጸት አይደሉáˆá¢"; +Strings.OfficeOM.L_BadSelectorString = "ወደ መራጩ የሚያáˆáˆá‹ ዓረáተáŠáŒˆáˆ­ በትክክሠያáˆá‰°á‰€áˆ¨á€ ወይሠየማይደገá áŠá‹á¢"; +Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "ተለይቶ የተገለá€á‹ አስገዳጅ á‹“á‹­áŠá‰µ ከአተጣጠá á‹“á‹­áŠá‰± ጋር የሚጣጣሠአይደለáˆá¢"; +Strings.OfficeOM.L_InvalidSetColumns = "ተለይተዠየተገለáት á‹“áˆá‹¶á‰½ ትክክሠያáˆáˆ†áŠ‘ ናቸá‹á¢"; +Strings.OfficeOM.L_InvalidParameters = "ተáŒá‰£áˆ© {0} የማይሰሩ á“ራሜትሮች አሉትá¢" \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/am-et/office_strings.js b/node_modules/@microsoft/office-js/dist/am-et/office_strings.js new file mode 100644 index 0000000..942cc28 --- /dev/null +++ b/node_modules/@microsoft/office-js/dist/am-et/office_strings.js @@ -0,0 +1,3 @@ +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_DialogOK="እሺ";Strings.OfficeOM.L_CustomFunctionDefinitionMissing="የተáŒá‰£áˆ©áŠ• áች የሚወክሠይህን ስሠያለዠባህሪይ በExcel.CustomFunctions ላይ መኖር አለበትá¢";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="የተመረጠ ይዘት በሰንጠረዥ መáˆáŠ­ መሆን አለበትᢠá‹áˆ‚ቡን በሰንጠረዥ መáˆáŠ­ ያዘጋáŒá‰µ እና እንደገና ይሞክሩትá¢";Strings.OfficeOM.L_InitializeNotReady="Office.js እስካáˆáŠ• ሙሉበሙሉ አáˆá‰°áŒ«áŠáˆá¢ እባክዎ ቆየት ብለዠእንደገና ይሞክሩ ወይሠየመáŠáˆ» ኮድዎን Office.መáŠáˆ» ተáŒá‰£áˆ­ ላይ ማከáˆá‹Ž እርáŒáŒ áŠ› á‹­áˆáŠ‘á¢";Strings.OfficeOM.L_InvalidAPICall="የማይሰራ የ API ጥሪ";Strings.OfficeOM.L_SSOConnectionLostError="A connection was lost during the sign in process.";Strings.OfficeOM.L_SettingNameNotExist="ተለይቶ የተገለá€á‹ የቅንጅት ስሠየለáˆá¢";Strings.OfficeOM.L_SelectionNotSupportCoercionType="አáˆáŠ• የተመረጠዠተለይቶ ከተገለጸዠየአስገዳጅ አይáŠá‰µ የሚጣጣን አይደለáˆá¢";Strings.OfficeOM.L_CustomXmlError="የታዛዥ XML ስህተትá¢";Strings.OfficeOM.L_CustomXmlExceedQuotaName="የáˆáˆ­áŒ« ገደብ ደርሷáˆ";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath áˆáˆ­áŒ«áŠ• ወደ 1024 ንጥሠáŠáŒˆáˆ®á‰½ ይገድባáˆá¢";Strings.OfficeOM.L_BindingCreationError="ማጠáŠá‹« የመáጠር ስህተት";Strings.OfficeOM.L_InvalidResourceUrlMessage="በተጠቀሰዠá‹áˆµáŒ¥ áˆáŠ­ á‹«áˆáˆ†áŠ የሃብት Url አለá‹á¢";Strings.OfficeOM.L_RequestTimeout="የጥሪ መá‹áˆ°áŒƒá‹ በጣሠረዥሠስለሆአለመáˆáŒ¸áˆ ያስቸáŒáˆ«áˆá¢";Strings.OfficeOM.L_NotSupportedEventType="ተለይቶ የተገለá€á‹ የááƒáˆœ á‹«á‹¥ á‹“á‹­áŠá‰µ {0} የሚደገá አይደለáˆá¢";Strings.OfficeOM.L_ActivityLimitReached="የእንቅስቃሴ ገደብ ደርሷáˆá¢";Strings.OfficeOM.L_APICallFailed="API ጥሪ አáˆá‰°áˆ³áŠ«áˆ";Strings.OfficeOM.L_RunMustReturnPromise='ወደ "run" ስáˆá‰µ የተላለáˆá‹ የባች ተáŒá‰£áˆ­ ቃሉን አáˆáŒ á‰ á‰€áˆá¢ ማናቸá‹áˆ በራስሰር-ዱካካቸዠበክክትሠስር ያሉ áŠáŒˆáˆ®á‰½ ባቹ ሲጠናቀቅ áŠáƒ መለቀቅ እንዲችሉ ተáŒá‰£áˆ© የተገባን ቃሠማክበር አለበትᢠበመሰረቱ የተገባ ቃáˆá‹ŽáŠ• የሚያከብሩት ከ "context.sync()" የሚገኘá‹áŠ• áˆáˆ‹áˆ½ በመመለስ áŠá‹á¢';Strings.OfficeOM.L_InvalidSetStartRowColumn="ተለይተዠየተገለáት የመደዳ መጀመርያ ወይሠየዓáˆá‹µ መጀመርያ እሴቶች ትክክሠያáˆáˆ†áŠ‘ ናቸá‹á¢";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="እባክዎ áˆáˆ­áŒ« ያካሂዱá¢";Strings.OfficeOM.L_InvalidReadForBlankRow="ተለይቶ የተገለá€á‹ መደዳ ባዶá‹áŠ• áŠá‹á¢";Strings.OfficeOM.L_OsfControlTypeNotSupported="OsfControl አይáŠá‰µ የሚደገá አይደለáˆá¢";Strings.OfficeOM.L_CannotWriteToSelection="የአáˆáŠ‘ áˆáˆ­áŒ« ላይ ሊጻá አይችáˆáˆá¢";Strings.OfficeOM.L_DataReadError="á‹áˆ‚ብ የማንበብ ስህተት";Strings.OfficeOM.L_EventRegistrationError="áጻሜ የመመá‹áŒˆá‰¥ ስህተት";Strings.OfficeOM.L_SettingsCannotSave="ቅንጅቶቹ ሊቀመጡ አይችሉáˆá¢";Strings.OfficeOM.L_NoCapability="ይህን ተáŒá‰£áˆ­ ለማከናወን በቂ áቃድ የለዎትáˆá¢";Strings.OfficeOM.L_InvalidGetRowColumnCounts="ተለይተዠየተገለáት የመደዳ ቆጠራ ወይሠየዓáˆá‹µ ቆጠራ እሴቶች ትክክሠያáˆáˆ†áŠ‘ ናቸá‹á¢";Strings.OfficeOM.L_OverwriteWorksheetData="የተሰጠዠየá‹áˆ‚ብ áŠáŒˆáˆ­ á‹áˆ‚ብን ስለሚተካ ወይሠስለሚቀይር የተዘጋጀዠክንá‹áŠ• አáˆá‰°áˆ³áŠ«áˆá¢";Strings.OfficeOM.L_SSOConnectionLostErrorMessage="A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones.";Strings.OfficeOM.L_UserClickIgnore="ተጠቃሚዠየንáŒáŒáˆ­ ሳጥኑን ችላ ማለትን መርጧáˆá¢";Strings.OfficeOM.L_DisplayDialogError="የማሳያ ንáŒáŒáˆ­ ስህተት";Strings.OfficeOM.L_MemoryLimit="የማከማቻ ገደብ ታáˆáˆá‹‹áˆ";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="á‹áˆµáŒ¥ አክሠቀድሞá‹áŠ‘ የመዳረሻ ቶከን በመጠየቅ ላይ ስለሆአክወናዠአáˆá‰°áˆ³áŠ«áˆá¢";Strings.OfficeOM.L_PropertyDoesNotExist="ባህሪ '{0}' በáŠáŒˆáˆ© ላይ አይኖርáˆá¢";Strings.OfficeOM.L_InvalidGrantMessage="ለዚህ á‹áˆµáŒ¥ አክሠዋስትን ጠáቷáˆá¢";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="ማስታወሻ: በቅርጽ ማá‹áŒ« API ጥሪ የጠዘጋáŒá‰µ የቅርጽ ማá‹áŒ£á‰µ ስብስቦች ከ 100 በታች እንዲሆን ይመከራáˆá¢";Strings.OfficeOM.L_Timeout="ክወናዠጊዜዠአáˆááˆá¢";Strings.OfficeOM.L_APINotSupported="API ኣይደገááˆ";Strings.OfficeOM.L_CustomFunctionImplementationMissing="በExcel.CustomFunctions ላይ የተáŒá‰£áˆ©áŠ• áች የሚወክሠይህ ስሠያለዠባህሪይ ተáŒá‰£áˆ©áŠ• ሰራ ላይ የሚያá‹áˆ 'የጥሪ' ባህሪይ መያዠአለበትá¢";Strings.OfficeOM.L_GetDataIsTooLarge="የተጠየቀዠየá‹áˆ‚ብ ስብስብ እጅጠትáˆá‰… áŠá‹á¢";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="ተáŠá‰£á‰¢-ብቻ ባህሪ '{0}' ለማዘጋጀት በሙከራ ላይá¢";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} አዲስ ዊንዶዉ ለማሳየት á‹­áˆáˆáŒ‹áˆá¢";Strings.OfficeOM.L_CellDataAmountBeyondLimits="ማስታወሻ: ሰንጠረዡ ላይ የሚኖሩት የህዋሶች á‰áŒ¥áˆ­ ከ 20,000ህዋሶች በታች እንዲሆኑ ይመከራáˆá¢";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="መተáŒá‰ áˆªá‹« {0} የለáˆá¢ Microsoft.Office.WebExtension.መáŠáˆ»(áˆáŠ­áŠ•á‹«á‰µ) አáˆá‰°áŒ áˆ«áˆá¢";Strings.OfficeOM.L_ApiNotFoundDetails="ስáˆá‰µ ወይሠባህሪ {0} በ {2} ስሪትዎ á‹áˆµáŒ¥ የማይገአየ {1} መመዘኛ ስብስብ ክáሠáŠá‹á¢";Strings.OfficeOM.L_ConnectionFailureWithDetails="በ {0} የአቋሠኮድᣠየስህተት ኮድ {1} እና የሚከተለá‹áŠ• የስህተት መáˆá‹•áŠ­á‰µá¥ {2} ጥያቄዠአáˆá‰°áˆ³áŠ«áˆá¢";Strings.OfficeOM.L_UnsupportedUserIdentity="የተጠቃሚ የማንáŠá‰µ á‹“á‹­áŠá‰µ አáˆá‰°á‹°áŒˆáˆáˆá¢";Strings.OfficeOM.L_NetworkProblem="አá‹á‰³áˆ¨áˆ˜áˆ¨á‰¥ ችáŒáˆ­";Strings.OfficeOM.L_SSOServerErrorMessage="በአገáˆáŒ‹á‹© ላይ á‹«áˆá‰°áŒ á‰ á‰€ ክስተት ተከ";Strings.OfficeOM.L_DataWriteError="á‹áˆ‚ብ የመጻá ስህተት";Strings.OfficeOM.L_BindingToMultipleSelection="ተያያዥ á‹«áˆáˆ†áŠ‘ áˆáˆ­áŒ«á‹Žá‰½ አይደገá‰áˆá¢";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage="ይህ ተጨማሪዠበዚህ áቃድ á‹áˆµáŒ¥ የተጠቃሚ ይዘትን ስለማይደáŒá ክወናዠአáˆá‰°áˆ³áŠ«áˆ";Strings.OfficeOM.L_InvalidFormat="የማይሰራ የቅርጽ ስህተት";Strings.OfficeOM.L_GetDataParametersConflict="ተለይተዠየተገለáት መለክያዎች ይጋጫሉá¢";Strings.OfficeOM.L_InvalidApiCallInContext="በአáˆáŠ‘ የትርጉሠአá‹á‹µ ላይ ማይሰራ የ API ጥሪá¢";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="á‹áˆ‚ቡ ጊዜዠያለáˆá‰ á‰µ áŠá‹á¢ áŠáŒˆáˆ©áŠ• እንደገና ሰርስረዠያá‹áŒ¡á¢";Strings.OfficeOM.L_ValueNotLoaded='የእሴቱ የá‹áŒ¤á‰µ áŠáŒˆáˆ­ ገና አáˆá‰°áŒ«áŠáˆá¢ የእሴት ባህሪ ከማንበብዎ በáŠá‰µá£ በተያያዘዠየጥያቄ ይዘት ላይ "context.sync()" á‹­á‹°á‹áˆ‰á¢';Strings.OfficeOM.L_SelectionCannotBound="ወደ አáˆáŠ‘ ስáራ ሊታጠá አይችáˆáˆá¢";Strings.OfficeOM.L_DialogAlreadyOpened="ይህ ዉስጠ-ተጨማሪ የáŠá‰ƒ ንáŒáŒáˆ­ ስለአለዉ አንቅስቃሴዉ አáˆá‰°áˆ³áŠ«áˆ";Strings.OfficeOM.L_SetDataParametersConflict="ተለይተዠየተገለáት መለክያዎች ይጋጫሉá¢";Strings.OfficeOM.L_CannotRegisterEvent="የክስተት እጀታዠሊመዘገብ አይችáˆáˆá¢";Strings.OfficeOM.L_UnsupportedEnumeration="የማይደገá á‰áŒ¥áˆ­ አሰጣጥ";Strings.OfficeOM.L_OperationNotSupported="ክወናዠአáˆá‰°á‹°áŒˆáˆáˆá¢";Strings.OfficeOM.L_TooManyIncompleteRequests="ቀደሠብሎ የተጀመረዠጥሪ እስኪጠናቀቅ ይጠብá‰á¢";Strings.OfficeOM.L_InvalidGetRows="ተለይተዠየተገለáት መደዳዎች ትክክሠያáˆáˆ†áŠ‘ ናቸá‹á¢";Strings.OfficeOM.L_SliceSizeNotSupported="ተለይቶ የተገለá€á‹ የá‰áˆ«áˆ½ መጠን የሚደገá አይደለáˆá¢";Strings.OfficeOM.L_CloseFileBeforeRetrieve="ሌላ መáˆáˆ°á‹ ከማáˆáŒ£á‰µá‹Ž በáŠá‰µ በአáˆáŠ‘ á‹á‹­áˆ ላይ closeAsync";Strings.OfficeOM.L_InvalidNode="የማይሰራ ኖድ";Strings.OfficeOM.L_InvalidBinding="የማይሰራ አተጣጠá";Strings.OfficeOM.L_ColIndexOutOfRange="የአáˆá‹µ ኢንዴክስ ዋጋዠከተáˆá‰€á‹°á‹ አá‹á‹µ á‹áŒª áŠá‹á¢ ከአáˆá‹¶á‰½ á‰áŒ¥áˆ­ á‹«áŠáˆ° ዋጋ (0 ወይሠየበለጠ) ይጠቀሙá¢";Strings.OfficeOM.L_DialogNavigateError="የንáŒáŒáˆ­ ማስሻ ስህተት";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="ችላ በáˆ";Strings.OfficeOM.L_HostError="የአስተናጋጅ ስህተት";Strings.OfficeOM.L_OutOfRange="ከአá‹á‹µ á‹áŒª";Strings.OfficeOM.L_CallbackNotAFunction="መáˆáˆ¶áˆ˜á‹°á‹ˆáˆ የአይáŠá‰µ ተáŒá‰£áˆ­ መሆን አለበትᣠየ {0} አይáŠá‰µ áŠá‰ áˆ­á¢";Strings.OfficeOM.L_UnknownBindingType="የአተጣጠá አይáŠá‰± የሚደገá አይደለáˆá¢";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="የ Office የመስመር ላይ ክáለ ጊዜዎ ጊዜዠአáˆáŽá‰ á‰³áˆ ወይሠáˆáŠ­ á‹«áˆáŠ¾áŠá¢ ለመቀጠáˆá£ ገጹን ያድሱትá¢";Strings.OfficeOM.L_MultipleNamedItemFound="ብዙ አንድ አይáŠá‰µ ስሠያላቸዠáŠáŒˆáˆ®á‰½ ተገáŠá‰°á‹‹áˆá¢";Strings.OfficeOM.L_InternalErrorDescription="አንድ á‹áˆ³áŒ£á‹Š ስሕተት ተáˆáŒ¥áˆ¯áˆá¢";Strings.OfficeOM.L_InvalidColumnsForBinding="ተለይተዠየተገለáት á‹“áˆá‹¶á‰½ ትክክሠያáˆáˆ†áŠ‘ ናቸá‹á¢";Strings.OfficeOM.L_PropertyNotLoaded='ባህሪ {0}\' አይገáŠáˆá¢ የባህሪ እሴት ከማንበብዎ በáŠá‰µá£ በያዘዠáŠáŒˆáˆ­ ላይ ያለ የጫን ስáˆá‰µ ይጥሩ እና በተያያዘዠየጥያቄ አገባበ áŠáŒˆáˆ­ ላይ "context.sync()" ይጥሩá¢';Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="áቀድ";Strings.OfficeOM.L_RequestTokenUnavailable="ይህ API የጥሪá‹áŠ• ሞገድ እንዲያዘገይ ታáኖ áŠá‰ áˆ­á¢";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="አስተባባሪ á“ራሜትሮች ታብሌቱ የተዋሃዱ ህዋሶች በያዘበት ጊዜ ከአስገዳጅ የታብሌት አይáŠá‰¶á‰½ ጋር መጠቀሠአይቻáˆáˆá¢";Strings.OfficeOM.L_UnsupportedEnumerationMessage="ኢኑሜሬሽኑ የአáˆáŠ‘ አስተናጋጅ መተáŒá‰ áˆªá‹«áˆ‹á‹­ የሚደገá አይደለáˆá¢";Strings.OfficeOM.L_InvalidDataObject="የማይሰራ የá‹áˆ‚ብ አርእስት";Strings.OfficeOM.L_TooManyOptionalObjects="ብዙ አማራጭያዊ ተáŒá‰£áˆ®á‰½ በá“ራሜትር á‹áˆ­á‹áˆ­ ላይ";Strings.OfficeOM.L_AppNameNotExist="የ {0} ተጨማሪ ስሠየለáˆá¢";Strings.OfficeOM.L_UserAbortedMessage="ተጠቃሚዠየá‹áˆµáŒ¥ አክሠáˆá‰ƒá‹¶á‰½áŠ• አáˆá‰°áˆµáˆ›áˆ›áˆá¢";Strings.OfficeOM.L_ShuttingDown="á‹áˆ‚ቡ በአáˆáŠ‘ ሰአት ሰርቨሩ ላይ ስለሌለ ክንá‹áŠ‘ ሊሳካ አáˆá‰»áˆˆáˆá¢";Strings.OfficeOM.L_CoercionTypeNotSupported="ተለይቶ የተገለá€á‹ አስገዳጅ á‹“á‹­áŠá‰µ የሚደገá አይደለáˆá¢";Strings.OfficeOM.L_InvalidSelectionForBindingType="በአáˆáŠ‘ áˆáˆ­áŒ« እና በዚህኛዠየማጠáŠá‹« አይáŠá‰µ ማጠá áˆáˆáŒ áˆ­ አይችáˆáˆá¢";Strings.OfficeOM.L_CustomFunctionNameCannotSplit="የተáŒá‰£áˆ­ ስሠባዶ á‹«áˆáˆ†áŠ የስሠቦታ እና ባዶ á‹«áˆáˆ†áŠ አጭር ስሠመያዠአለበትá¢";Strings.OfficeOM.L_IndexOutOfRange="ኢንዴክስ ከአá‹á‹µ á‹áŒª";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="አስተባባሪ á“ራሜትሮች ታብሌቱ የተዋሃዱ ህዋሶች በያዘበት ጊዜ ከአስገዳጅ የታብሌት አይáŠá‰¶á‰½ ጋር መጠቀሠአይቻáˆáˆá¢";Strings.OfficeOM.L_BrowserAPINotSupported="ይህ ማሰሻ የተጠየቀá‹áŠ• API አይደáŒááˆá¢";Strings.OfficeOM.L_ReadSettingsError="የክንá‹áŠ• አá‹á‹¶á‰½ ስህተት ያንብቡ";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="á‹áˆµáŒ¥ አክሠቀድሞá‹áŠ‘ የመዳረሻ ቶከን በመጠየቅ ላይ áŠá‹á¢";Strings.OfficeOM.L_InvalidOperationInCellEditMode="Excel በህዋስ አርትዕ áˆáŠ”ታ á‹áˆµáŒ¥ áŠá‹á¢ እባክዎ ENTER ወይሠTAB በመጫን ወይሠሌላ ህዋስ በመáˆáˆ¨áŒ¥ የአርትዕ áˆáŠ”ታ ዘáŒá‰°á‹ á‹­á‹áŒ¡ እና ከዚያ እንደገና ይሞክሩá¢";Strings.OfficeOM.L_NamedItemNotFound="የተጠቀሰዠንጥሠáŠáŒˆáˆ­ የለáˆá¢";Strings.OfficeOM.L_RedundantCallbackSpecification="መáˆáˆ°áˆ…á‹°á‹áˆ በክርክር á‹áˆ­á‹áˆ­ እና በኣማራጭያዊ áŠáŒˆáˆ­ ላይ ሊለይ ኣይችáˆáˆá¢";Strings.OfficeOM.L_InvalidSSOAddinMessage="የማንáŠá‰± API በዚህ á‹áˆµáŒ¥ አክሠá‹áˆµáŒ¥ አáˆá‰°á‹°áŒˆáˆáˆá¢";Strings.OfficeOM.L_CustomXmlNodeNotFound="ተለይቶ የተገለá€á‹ ኖድ ሊገአአáˆá‰»áˆˆáˆá¢";Strings.OfficeOM.L_DataNotMatchCoercionType="ተለይቶ የተገለጸዠá‹áˆ‚ብ áŠáŒˆáˆ­ ከአáˆáŠ‘ áˆáˆ­á‰» ጋር የሚጣጣሠአይደለáˆá¢";Strings.OfficeOM.L_SetDataIsTooLarge="ተለይቶ ተገለá€á‹ የá‹áˆ‚ብ áŠáŒˆáˆ­ በጣሠáŒá‹™á áŠá‹á¢";Strings.OfficeOM.L_DataNotMatchSelection="የቀረበዠየá‹áˆ‚ብ áŠáŒˆáˆ­ አáˆáŠ• ካለዠየáˆáˆ­áŒ« á‰…áˆ­á… áŠ¥áŠ•á‹²áˆáˆ ስá‹á‰µáŠ“ á‰áˆ˜á‰µ ጋር አንድ አይደለáˆá¢";Strings.OfficeOM.L_InvalidBindingError="የማይሰራ የአተጣጠá ስህተት";Strings.OfficeOM.L_InvalidFormatValue="ከቅርጽ á“ራሜትሮች አንዱ ወይሠከዛ በላይ የማይáˆá‰€á‹± ዋጋዎች ይዘዋáˆá¢ ዋጋዎቹን እንደገና á‹­áˆá‰µáˆ¹á‹‹á‰¸á‹ እና እንደገና ይሞክሩá¢";Strings.OfficeOM.L_InvalidCellsValue="ከህዋሶቹ á“ራሜትሮች አንዱ ወይሠከዛ በላይ የማይáˆá‰€á‹± ዋጋዎች ይዘዋáˆá¢ ዋጋዎቹን እንደገና á‹­áˆá‰µáˆ¹á‹‹á‰¸á‹ እና እንደገና ይሞክሩá¢";Strings.OfficeOM.L_InvalidValue="የማይሰራ ዋጋ";Strings.OfficeOM.L_InvalidGetStartRowColumn="ተለይተዠየተገለáት የመደዳ መጀመርያ ወይሠየዓáˆá‹µ መጀመርያ እሴቶች ትክክሠያáˆáˆ†áŠ‘ ናቸá‹á¢";Strings.OfficeOM.L_SSOClientErrorMessage="በደንበኛዠá‹áˆµáŒ¥ á‹«áˆá‰°áŒ á‰ á‰€ ስህተት ተከስቷáˆá¢";Strings.OfficeOM.L_CannotNavigateTo="áŠáŒˆáˆ© ዳሰሳ በማይደገáበት ቦታ áŠá‹ ሰáሮ የሚገኘá‹á¢";Strings.OfficeOM.L_BindingNotExist="ተለይቶ የተገለá€á‹ አተጣጠá የለáˆá¢";Strings.OfficeOM.L_SSOClientError="ከ Office በáˆá‰ƒá‹µ አሰጣጥ ጥያቄዠá‹áˆµáŒ¥ ስህተት ተከስቷáˆá¢";Strings.OfficeOM.L_InternalError="á‹áˆµáŒ£á‹Š ስህተት";Strings.OfficeOM.L_InvalidSetRows="ተለይተዠየተገለáት መደዳዎች ትክክሠያáˆáˆ†áŠ‘ ናቸá‹á¢";Strings.OfficeOM.L_UnsupportedDataObject="የቀረበዠየá‹áˆ‚ብ áŠáŒˆáˆ­ አይáŠá‰µ የሚደገá አይደለáˆá¢";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="አሳሽዎን ያዋቅሩ";Strings.OfficeOM.L_EventHandlerRemovalFailed="የáጻሜ አስተዳዳሪá‹áŠ• ለማስወገድ አáˆá‰»áˆˆáˆá¢";Strings.OfficeOM.L_InvalidNamedItemForBindingType="ተለይቶ የተገለá€á‹ አተጣጠá á‹“á‹­áŠá‰µ ከቀረበዠስሙ ከተጠቀሰዠáŠáŒˆáˆ­ ጋር የሚጣጣሠአይደለáˆá¢";Strings.OfficeOM.L_UserAborted="ተጠቃሚ ያቋረጠዠየስáˆáˆáŠá‰µ ጥያቄá¢";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory="ይህ ተጨማሪዠየተጠቃሚ ይዘትን አይደáŒááˆá¢";Strings.OfficeOM.L_NotSupportedBindingType="ተለይቶ የተገለá€á‹ አተጣጠá á‹“á‹­áŠá‰µ {0} የሚደገá አይደለáˆá¢";Strings.OfficeOM.L_InvalidTableOptionValue="ከሰንጠረዥ አማራጮች á“ራሜትሮች አንዱ ወይሠከዛ በላይ የማይáˆá‰€á‹± ዋጋዎች ይዘዋáˆá¢ ዋጋዎቹን እንደገና á‹­áˆá‰µáˆ¹á‹‹á‰¸á‹ እና እንደገና ይሞክሩá¢";Strings.OfficeOM.L_DataNotMatchBindingSize="የቀረበዠየá‹áˆ‚ብ áŠáŒˆáˆ­ አáˆáŠ• ካለዠየáˆáˆ­áŒ« መጠን ጋር አንድ አይደለáˆá¢";Strings.OfficeOM.L_FormattingReminder="ቅርጽ የማስያዠአስታዋሽ";Strings.OfficeOM.L_SpecifiedIdNotExist="ተለይቶ የተገለá€á‹ ID የለáˆá¢";Strings.OfficeOM.L_FormatValueOutOfRange="ዋጋዠከተáˆá‰€á‹°á‹ አá‹á‹µ á‹áŒª áŠá‹á¢";Strings.OfficeOM.L_TooManyOptionalFunction="ብዙ አማራጭያዊ ተáŒá‰£áˆ®á‰½ በá“ራሜትር á‹áˆ­á‹áˆ­ ላይ";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="ወደ ባህሪ '{0}' የተደረጉ ለá‹áŒ¦á‰½ በ \"object.set\" ስáˆá‰µ በኩሠሊተገበሩ አይችሉáˆá¢";Strings.OfficeOM.L_EventHandlerNotExist="ለዚህ አተጣጠá የሚሆን ተለይቶ የተገለá€á‹ የááƒáˆœ á‹«á‹¥ ሊገአአáˆá‰»áˆˆáˆá¢";Strings.OfficeOM.L_InvalidGetColumns="ተለይተዠየተገለáት á‹“áˆá‹¶á‰½ ትክክሠያáˆáˆ†áŠ‘ ናቸá‹á¢";Strings.OfficeOM.L_DataWriteReminder="ዳታ የመጻá አስታዋሽ";Strings.OfficeOM.L_RowIndexOutOfRange="የመደዳዠኢንዴክስ ዋጋ ከተáˆá‰€á‹°á‹ አá‹á‹µ á‹áŒª áŠá‹á¢ ከመደዳዎቹ á‰áŒ¥áˆ­ የሚያንስ ዋጋ (0 ወይሠከዛ የበለጠ) ያስገቡá¢";Strings.OfficeOM.L_FunctionCallFailed="የተáŒá‰£áˆ­ {0} ጥሪ አáˆá‰°áˆ³áŠ«áˆá£ ስህተት ኮድ: {1}á¢";Strings.OfficeOM.L_CustomXmlOutOfDateName="á‹áˆ‚ቡ ወቅታዊ አይደለáˆ";Strings.OfficeOM.L_SettingsStaleError="የክንá‹áŠ• አá‹á‹¶á‰½ ስቴሠስህተት";Strings.OfficeOM.L_TooManyArguments="በጣሠብዙ ክርክሮች";Strings.OfficeOM.L_FileTypeNotSupported="ተለይቶ የተገለá€á‹ የá‹á‹­áˆ á‹“á‹­áŠá‰µ የሚደገá አይደለáˆá¢";Strings.OfficeOM.L_InvalidCoercion="የማይሰራ የአስገዳጅ አይáŠá‰µ";Strings.OfficeOM.L_DialogRequireHTTPS="የ HTTP á•áˆ®á‰°áŠ®áˆ‰ አáˆá‰°á‹°áŒˆáˆáˆá¢ በáˆá‰µáŠ© HTTPS ተጠቀáˆ";Strings.OfficeOM.L_NotImplemented="ተáŒá‰£áˆ© {0} አáˆá‰°áˆáŒ¸áˆ˜áˆá¢";Strings.OfficeOM.L_InvalidGrant="ቅድሚያ áˆá‰ƒá‹µ መስጠት ጠáቷáˆá¢";Strings.OfficeOM.L_PermissionDenied="áˆá‰ƒá‹µ ተከáˆáŠ­áˆáˆ";Strings.OfficeOM.L_InvalidRequestContext="áŠáŒˆáˆ© በáˆáˆ‰áˆ የተለያዩ የጥያቄ አገባበ áŠáŒˆáˆ­ ጥቅሠላይ ሊá‹áˆ አይችáˆáˆá¢";Strings.OfficeOM.L_InvalidArgument="የáŠáŒ‹áˆª እሴት '{0}' ለዚህ áˆáŠ”ታ አይሰራáˆá£ ጠáቷሠወይሠትክክለኛá‹áŠ• ቅርጸት አይደለáˆá¢";Strings.OfficeOM.L_DataNotMatchBindingType="ተለይቶ ተገለá€á‹ የá‹áˆ‚ብ áŠáŒˆáˆ­ ከአተጣጠá á‹“á‹­áŠá‰± ጋር የሚጣጣሠአይደለáˆá¢";Strings.OfficeOM.L_InValidOptionalArgument="የማይሰራ አማራጭያዊ ክርክር";Strings.OfficeOM.L_GetSelectionNotSupported="አáˆáŠ• የተመረጠዠየሚደገá አይደለáˆá¢";Strings.OfficeOM.L_InvalidDataFormat="ተለይቶ የተገለጸዠá‹áˆ‚ብ ቅርጽ የማይሰራ áŠá‹á¢";Strings.OfficeOM.L_CustomFunctionNameContainsBadChars="ተáŒá‰£áˆ© áŠá‹°áˆŽá‰½áŠ•á£ አሀዞችንᣠሰረዘዘብጦች እና áŠáŒ¥á‰¦á‰½áŠ• ብቻ ሊያካትት ይችላáˆá¢";Strings.OfficeOM.L_UserNotSignedIn="ማንሠወደ Office በማንáŠá‰µ የገባ ተጠቃሚ የለáˆá¢";Strings.OfficeOM.L_InvalidObjectPath='የáŠáŒˆáˆ­ መንገድ \'{0}\' እርስዎ ለመስራት በመሞከር ላይ ያሉትን አይሰራáˆá¢ áŠáŒˆáˆ© በሙሉ ብዙ "context.sync" ጥሪዎች እየተጠቀሙበት እና ከ ".run" ባች ተከታታይ መáˆáŒ¸áˆ á‹áŒ­ ከሆáŠá£ እባክዎ የáŠáŒˆáˆ©áŠ• ዕድሜ ለማስተዳደር የ "context.trackedObjects.add()" እና "context.trackedObjects.remove()" ስáˆá‰µ ይጠቀሙá¢';Strings.OfficeOM.L_InvalidBindingOperation="የማይሰራ የአተጣጠá ኦá•áˆ¬áˆ½áŠ•";Strings.OfficeOM.L_DocumentReadOnly="የተጠየቀዠክንá‹áŠ• በአáˆáŠ‘ የሰáŠá‹µ አይáŠá‰µ አይáˆá‰€á‹µáˆá¢";Strings.OfficeOM.L_NewWindowCrossZone="በአሳሽዎ á‹áˆµáŒ¥ ያሉትን የደህንáŠá‰µ የክንá‹áŠ• አá‹á‹¶á‰½ የንáŒáŒáˆ­ ሳጥኑን ከመáጠር ከáˆáŠ­áˆˆá‹áŠ“áˆá¢ የተለየ አሳሽ ወይሠ{0} ይሞክሩ ስለዚህ '{1}' እና በአድራሻ ትርዎ ላይ የታየá‹áŠ• ጎራ በተመሳሳይ የደህንáŠá‰µ ዞን á‹áˆµáŒ¥ ናቸá‹á¢";Strings.OfficeOM.L_SettingsAreStale="የክንá‹áŠ• አá‹á‹¶á‰¹ ወቅታዊ ስላáˆáˆ†áŠ‘ ሊቀመጡ አáˆá‰»áˆ‰áˆá¢";Strings.OfficeOM.L_SSOServerError="በáˆá‰ƒá‹µ አሰጣጥ አቅራቢዠá‹áˆµáŒ¥ ስህተት ተከስቷáˆá¢";Strings.OfficeOM.L_NetworkProblemRetrieveFile="á‹á‹­áˆ‰ መáˆáˆ¶ የማáŒáŠ˜á‰µ ጉዳይ የአá‹á‰³áˆ¨áˆ˜áˆ¨á‰¥ ችáŒáˆ­ ከáˆáŠ­áˆŽá‰³áˆá¢";Strings.OfficeOM.L_InvalidResourceUrl="áˆáŠ­ á‹«áˆáˆ†áŠ የመተáŒá‰ áˆªá‹« ሃብት Url ቀርቧáˆá¢";Strings.OfficeOM.L_DataStale="á‹áˆ‚ቡ ወቅታዊ አይደለáˆ";Strings.OfficeOM.L_DialogInvalidScheme="የ URL አገባቡን አáˆá‰°á‹°áŒˆáˆáˆá¢ በáˆá‰µáŠ© HTTPS ተጠቀáˆá¢";Strings.OfficeOM.L_ElementMissing="የሰንጠረዡን ህዋስ á‰…áˆ­á… áˆ›áˆµá‹«á‹ áŠ áˆá‰»áˆáŠ•áˆ áˆáŠ­áŠ•á‹«á‰±áˆ አንዳንድ መለክያ እሴቶች ስለጠá‰á¢ መለክያዎቹን በድጋሚ-በማረጋገጥ እንደገና ይሞክሩá¢";Strings.OfficeOM.L_NotSupported="ተáŒá‰£áˆ© {0} የሚደገá አይደለáˆá¢";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="የአሳሽ ገደቦች የንáŒáŒáˆ­ ሳጥኑን ከመáጠር ከáˆáŠ­áˆˆá‹áŠ“áˆá¢ የንáŒáŒáˆ­ ሳጥኑ ጎራ እና የá‹áˆµáŒ¥-አክሠአስተናጋጠጎራ በተመሳሳይ የድህንáŠá‰µ ዞን አይደሉáˆá¢";Strings.OfficeOM.L_EventHandlerAdditionFailed="የáጻሜ አስተዳዳሪá‹áŠ• ለማከሠአáˆá‰»áˆˆáˆá¢";Strings.OfficeOM.L_ConnectionFailureWithStatus="በ {0} የአቋሠኮድ ጥያቄዠአáˆá‰°áˆ³áŠ«áˆá¢";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="የተጠቃሚ የማንáŠá‰µ á‹“á‹­áŠá‰µ አáˆá‰°á‹°áŒˆáˆáˆá¢";Strings.OfficeOM.L_InvalidOrTimedOutSession="áˆáŠ­ á‹«áˆáŠ¾áŠ ወይሠጊዜ ያለáˆá‰ á‰µ ክáለ ጊዜ";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="ክንá‹áŠ‘ እዚህኛዠየአተጣጠá አይáŠá‰µ ላይ የሚደገá አይደለáˆá¢";Strings.OfficeOM.L_SaveSettingsError="የክንá‹áŠ• አá‹á‹¶á‰½ ስህተት ያስቀáˆáŒ¡";Strings.OfficeOM.L_MissingRequiredArguments="የተወሰኑ አስáˆáˆ‹áŒŠ ክርክሮች ይጎድሉታáˆ";Strings.OfficeOM.L_InvalidApiArgumentsMessage="áˆáŠ­ á‹«áˆáˆ†áŠ የáŒá‰¤á‰µ áŠáŒ‹áˆª እሴቶችá¢";Strings.OfficeOM.L_NavOutOfBound="ክንá‹áŠ‘ አáˆá‰°áˆ³áŠ«áˆ áˆáŠ­áŠ•á‹«á‰±áˆ ኢንዴክሱ ከአá‹á‹± á‹áŒª áŠá‹á¢";Strings.OfficeOM.L_MissingParameter="የታጣ á“ራሜትር";Strings.OfficeOM.L_DialogAddressNotTrusted="የጎራዠURL በገለጻ á‹áˆ­á‹áˆ© በመተáŒá‰ áˆªá‹« ጎራዎች አባሠá‹áˆµáŒ¥ አáˆá‰°áŠ«á‰°á‰°áˆá¢";Strings.OfficeOM.L_InvalidArgumentGeneric="ወደ ተáŒá‰£áˆ© የተላለሠáŠáŒ‹áˆª እሴት(ቶች) ለዚህ áˆáŠ”ታ አይሰራáˆá£ ጠáቷሠወይሠበትክክሠቅርጸት አይደሉáˆá¢";Strings.OfficeOM.L_BadSelectorString="ወደ መራጩ የሚያáˆáˆá‹ ዓረáተáŠáŒˆáˆ­ በትክክሠያáˆá‰°á‰€áˆ¨á€ ወይሠየማይደገá áŠá‹á¢";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="ተለይቶ የተገለá€á‹ አስገዳጅ á‹“á‹­áŠá‰µ ከአተጣጠá á‹“á‹­áŠá‰± ጋር የሚጣጣሠአይደለáˆá¢";Strings.OfficeOM.L_InvalidSetColumns="ተለይተዠየተገለáት á‹“áˆá‹¶á‰½ ትክክሠያáˆáˆ†áŠ‘ ናቸá‹á¢";Strings.OfficeOM.L_InvalidParameters="ተáŒá‰£áˆ© {0} የማይሰሩ á“ራሜትሮች አሉትá¢" \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/am-et/outlook_strings.debug.js b/node_modules/@microsoft/office-js/dist/am-et/outlook_strings.debug.js new file mode 100644 index 0000000..5aa163d --- /dev/null +++ b/node_modules/@microsoft/office-js/dist/am-et/outlook_strings.debug.js @@ -0,0 +1,35 @@ +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("_u"); +_u.ExtensibilityStrings = function() +{ +}; +_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings"); +_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "ጥያቄዠከ 1 MB የመጠን ገደቡ በላይ áŠá‹á¢ እባክዎ የ EWSጥያቄዎ ያሻሽሉá¢"; +_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "ከቀረቡት የኢሜይሠአድራሻዎች á‹áˆµáŒ¥ አንዱ ወይሠከዛ በላይ የሆኑት ረዥሠናቸá‹á¢"; +_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "ከማሳያ ስሞቹ አንዱ ወይሠከዛ በላይ በጣሠረዥሞች ናቸá‹á¢"; +_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "የአባሪዠመንገድ የሚሰራ አይደለáˆá¢"; +_u.ExtensibilityStrings.l_OffsetNotfound_Text = "ዚህ የáŒá‹œ ማህተሠኣመጣጣአሊገአአáˆá‰»áˆˆáˆá¢"; +_u.ExtensibilityStrings.l_InvalidEventDates_Text = "የመጨረሻዠቀን ከመጀመሪያዠቀን ቀድሞ ተከሰተá¢"; +_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "የተሰጡት á“ራሜትሮች ከሚጠበቀዠቅርጽ ጋር የሚሄድ አይደለáˆá¢"; +_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "ተጠቃሚዠአባሪዠተጭኖ ሳይጠናቀቅ አስወáŒá‹¶á‰³áˆá¢"; +_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "አባሪዠወደ ንጥáˆáŠáŒˆáˆ© ሊታከሠአáˆá‰»áˆˆáˆá¢"; +_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "አባሪዠበጣሠትáˆá‰… በመሆኑ ሊታከሠአáˆá‰»áˆˆáˆá¢"; +_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "á‹áˆ‚ብ የመጻá ስህተት"; +_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "ዘዴá‹áŠ• ለመጥራት ከáተኛ áˆá‰ƒá‹µ ያስáˆáˆáŒ‹áˆ: '{0}'."; +_u.ExtensibilityStrings.l_InvalidEndTime_Text = "የመቸረሻዠቀን ከመጀመርያዠቀን ሊቀድሠአይችáˆáˆá¢"; +_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "ሙሉ የáˆáˆ‹áˆ½ ወይሠመáˆáŠ¥áŠ­á‰µ ማስተላለáá‹« ከሰርቨር እየተመለሰ ባለበት ጊኤ አባሪ ማከሠአይቻáˆáˆá¢"; +_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "አባሪዠከንጥáˆáŠáŒˆáˆ© ላይ ሊሰረዠአይችáˆáˆá¢"; +_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "ተጠቃሚá‹á‹áˆ‚ቡ እየገባ በáŠá‰ áˆ¨á‰ á‰µ ጊዜ የአመáˆáŠ«á‰½ ቦታ ቀይሮታáˆá¢"; +_u.ExtensibilityStrings.l_InternalFormatError_Text = "የá‹áˆµáŒ£á‹Š ቅርጽ ስህተት አጋጥሞ áŠá‰ áˆ­á¢"; +_u.ExtensibilityStrings.l_InternalProtocolError_Text = "የá‹áˆµáŒ£á‹Š á•áˆ®á‰¶áŠ®áˆ ስህተት: '{0}'á¢"; +_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "የተጠበበየ JavaScript API አባሎችን ለ Office ለመጠቀሠከáተኛ áˆá‰ƒá‹µ ያስáˆáˆáŒ‹áˆá¢"; +_u.ExtensibilityStrings.l_InvalidDate_Text = "áŒá‰¤á‰± ወደ ቅቡሠቀን ሊቀየር አáˆá‰»áˆá¢"; +_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "አባሪዠሊሰረዠአáˆá‰»áˆ áˆáŠ­áŠ•á‹«á‰±áˆ የአባሪ ኢንዴክሱ ላይ አባሪ ሊገአአáˆá‰»áˆá¢"; +_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "የአባሪዠID የሚሰራ አይደለáˆá¢"; +_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "መáˆáŠ¥áŠ­á‰± ከáተኛዠየአባሪዎች መጠን ስለያዘ ሌሎች አባሪዎች መጨመር አይቻáˆáˆ"; +_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "የተመረጠዠንጥሠáŠáŒˆáˆ­ ተለá‹áŒ§áˆá¢"; +_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "የአባሪ ስህተት"; +_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "áˆáŠ•áˆ ተቀባይáŠá‰µ ያላቸዠተቀባዮች አáˆá‰€áˆ¨á‰¡áˆá¢"; +_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "የ HTML ሳኒታይዜሽን አáˆá‰°áˆ³áŠ«áˆá¢"; +_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "ሜዳዠላይ ያሉት ጠቀላላ ተቀባዮች á‰áŒ¥áˆ­ ከ {0} ሊበáˆáŒ¥ አይችáˆáˆá¢" \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/am-et/outlook_strings.js b/node_modules/@microsoft/office-js/dist/am-et/outlook_strings.js new file mode 100644 index 0000000..e20bf37 --- /dev/null +++ b/node_modules/@microsoft/office-js/dist/am-et/outlook_strings.js @@ -0,0 +1,3 @@ +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_EwsRequestOversized_Text="ጥያቄዠከ 1 MB የመጠን ገደቡ በላይ áŠá‹á¢ እባክዎ የ EWSጥያቄዎ ያሻሽሉá¢";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="ከቀረቡት የኢሜይሠአድራሻዎች á‹áˆµáŒ¥ አንዱ ወይሠከዛ በላይ የሆኑት ረዥሠናቸá‹á¢";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="ከማሳያ ስሞቹ አንዱ ወይሠከዛ በላይ በጣሠረዥሞች ናቸá‹á¢";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="የአባሪዠመንገድ የሚሰራ አይደለáˆá¢";_u.ExtensibilityStrings.l_OffsetNotfound_Text="ዚህ የáŒá‹œ ማህተሠኣመጣጣአሊገአአáˆá‰»áˆˆáˆá¢";_u.ExtensibilityStrings.l_InvalidEventDates_Text="የመጨረሻዠቀን ከመጀመሪያዠቀን ቀድሞ ተከሰተá¢";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="የተሰጡት á“ራሜትሮች ከሚጠበቀዠቅርጽ ጋር የሚሄድ አይደለáˆá¢";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="ተጠቃሚዠአባሪዠተጭኖ ሳይጠናቀቅ አስወáŒá‹¶á‰³áˆá¢";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="አባሪዠወደ ንጥáˆáŠáŒˆáˆ© ሊታከሠአáˆá‰»áˆˆáˆá¢";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="አባሪዠበጣሠትáˆá‰… በመሆኑ ሊታከሠአáˆá‰»áˆˆáˆá¢";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="á‹áˆ‚ብ የመጻá ስህተት";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="ዘዴá‹áŠ• ለመጥራት ከáተኛ áˆá‰ƒá‹µ ያስáˆáˆáŒ‹áˆ: '{0}'.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="የመቸረሻዠቀን ከመጀመርያዠቀን ሊቀድሠአይችáˆáˆá¢";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="ሙሉ የáˆáˆ‹áˆ½ ወይሠመáˆáŠ¥áŠ­á‰µ ማስተላለáá‹« ከሰርቨር እየተመለሰ ባለበት ጊኤ አባሪ ማከሠአይቻáˆáˆá¢";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="አባሪዠከንጥáˆáŠáŒˆáˆ© ላይ ሊሰረዠአይችáˆáˆá¢";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="ተጠቃሚá‹á‹áˆ‚ቡ እየገባ በáŠá‰ áˆ¨á‰ á‰µ ጊዜ የአመáˆáŠ«á‰½ ቦታ ቀይሮታáˆá¢";_u.ExtensibilityStrings.l_InternalFormatError_Text="የá‹áˆµáŒ£á‹Š ቅርጽ ስህተት አጋጥሞ áŠá‰ áˆ­á¢";_u.ExtensibilityStrings.l_InternalProtocolError_Text="የá‹áˆµáŒ£á‹Š á•áˆ®á‰¶áŠ®áˆ ስህተት: '{0}'á¢";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="የተጠበበየ JavaScript API አባሎችን ለ Office ለመጠቀሠከáተኛ áˆá‰ƒá‹µ ያስáˆáˆáŒ‹áˆá¢";_u.ExtensibilityStrings.l_InvalidDate_Text="áŒá‰¤á‰± ወደ ቅቡሠቀን ሊቀየር አáˆá‰»áˆá¢";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="አባሪዠሊሰረዠአáˆá‰»áˆ áˆáŠ­áŠ•á‹«á‰±áˆ የአባሪ ኢንዴክሱ ላይ አባሪ ሊገአአáˆá‰»áˆá¢";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="የአባሪዠID የሚሰራ አይደለáˆá¢";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="መáˆáŠ¥áŠ­á‰± ከáተኛዠየአባሪዎች መጠን ስለያዘ ሌሎች አባሪዎች መጨመር አይቻáˆáˆ";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="የተመረጠዠንጥሠáŠáŒˆáˆ­ ተለá‹áŒ§áˆá¢";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="የአባሪ ስህተት";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="áˆáŠ•áˆ ተቀባይáŠá‰µ ያላቸዠተቀባዮች አáˆá‰€áˆ¨á‰¡áˆá¢";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="የ HTML ሳኒታይዜሽን አáˆá‰°áˆ³áŠ«áˆá¢";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="ሜዳዠላይ ያሉት ጠቀላላ ተቀባዮች á‰áŒ¥áˆ­ ከ {0} ሊበáˆáŒ¥ አይችáˆáˆá¢" \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/ar-sa.pseudo/office_strings.debug.js b/node_modules/@microsoft/office-js/dist/ar-sa.pseudo/office_strings.debug.js index f7c56b9..2f757ed 100644 --- a/node_modules/@microsoft/office-js/dist/ar-sa.pseudo/office_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/ar-sa.pseudo/office_strings.debug.js @@ -1,179 +1,190 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("Strings"); Strings.OfficeOM = function() { }; Strings.OfficeOM.registerClass("Strings.OfficeOM"); -Strings.OfficeOM.L_NoCapability = "ï¼»s8tihï¼½â€â€Ø£Ø¨Ø¹[You don't have sufficient permissions for this action.]לף"; -Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "ï¼»oLNBUï¼½â€â€Ø£Ø¨Ø¹[configure your browser]לף"; -Strings.OfficeOM.L_TooManyOptionalObjects = "ï¼»u95nHï¼½â€â€Ø£Ø¨Ø¹[multiple optional objects in parameter list]לף"; -Strings.OfficeOM.L_MultipleNamedItemFound = "ï¼»jv5aIï¼½â€â€Ø£Ø¨Ø¹[Multiple objects with the same name were found.]לף"; -Strings.OfficeOM.L_DataWriteError = "ï¼»Xc0RNï¼½â€â€Ø£Ø¨Ø¹[Data Write Error]לף"; -Strings.OfficeOM.L_InvalidOrTimedOutSession = "ï¼»qvnk3ï¼½â€â€Ø£Ø¨Ø¹[Invalid Or Timed Out Session]לף"; -Strings.OfficeOM.L_InitializeNotReady = "ï¼»DxSvUï¼½â€â€Ø£Ø¨Ø¹[Office.js has not been fully loaded yet. Please try again later or make sure to add your initialization code on the Office.initialize function.]לף"; -Strings.OfficeOM.L_NotImplemented = "ï¼»7GO2Iï¼½â€â€Ø£Ø¨Ø¹[Function {0} is not implemented.]לף"; -Strings.OfficeOM.L_DialogNavigateError = "ï¼»uzg7Nï¼½â€â€Ø£Ø¨Ø¹[Dialog Navigation Error]לף"; -Strings.OfficeOM.L_InvalidSSOAddinMessage = "ï¼»aCWF7ï¼½â€â€Ø£Ø¨Ø¹[The identity API is not supported for this add-in.]לף"; -Strings.OfficeOM.L_GetDataIsTooLarge = "ï¼»3wF2fï¼½â€â€Ø£Ø¨Ø¹[The requested data set is too large.]לף"; -Strings.OfficeOM.L_CloseFileBeforeRetrieve = "ï¼»hjT2vï¼½â€â€Ø£Ø¨Ø¹[Call closeAsync on the current File before retrieving another.]לף"; -Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = "ï¼»Z072Kï¼½â€â€Ø£Ø¨Ø¹[Changes to property '{0}' cannot be applied through an \"object.set\" method.]לף"; -Strings.OfficeOM.L_InvalidBindingError = "ï¼»qB3Jpï¼½â€â€Ø£Ø¨Ø¹[Invalid Binding Error]לף"; -Strings.OfficeOM.L_EventRegistrationError = "ï¼»Kbn76ï¼½â€â€Ø£Ø¨Ø¹[Event Registration Error]לף"; -Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "ï¼»P7IAeï¼½â€â€Ø£Ø¨Ø¹[Coordinate parameters cannot be used with coercion type Table when the table contains merged cells.]לף"; +Strings.OfficeOM.L_SelectionCannotBound = "ï¼»zv7Clï¼½â€â€Ø£Ø¨Ø¹[Cannot bind to the current selection.]לף"; +Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "ï¼»7LzPbï¼½â€â€Ø£Ø¨Ø¹[XPath limits selection to 1024 items.]לף"; +Strings.OfficeOM.L_OverwriteWorksheetData = "ï¼»DOAPXï¼½â€â€Ø£Ø¨Ø¹[The set operation failed because the supplied data object will overwrite or shift data.]לף"; +Strings.OfficeOM.L_TooManyOptionalFunction = "ï¼»w74Tzï¼½â€â€Ø£Ø¨Ø¹[multiple optional functions in parameter list]לף"; +Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "ï¼»eRmK1ï¼½â€â€Ø£Ø¨Ø¹[The operation failed because this add-in is already requesting an access token.]לף"; +Strings.OfficeOM.L_NotSupported = "ï¼»SFggQï¼½â€â€Ø£Ø¨Ø¹[Function {0} is not supported.]לף"; +Strings.OfficeOM.L_RequestTimeout = "ï¼»idn5Sï¼½â€â€Ø£Ø¨Ø¹[The call took too long to execute.]לף"; +Strings.OfficeOM.L_ElementMissing = "ï¼»vJblVï¼½â€â€Ø£Ø¨Ø¹[We couldn't format the table cell because some parameter values are missing. Double-check the parameters and try again.]לף"; +Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "ï¼»AvQkUï¼½â€â€Ø£Ø¨Ø¹[Ignore]לף"; Strings.OfficeOM.L_ConnectionFailureWithStatus = "ï¼»Lwa49ï¼½â€â€Ø£Ø¨Ø¹[The request failed with status code of {0}.]לף"; -Strings.OfficeOM.L_NewWindowCrossZone = "ï¼»E0xziï¼½â€â€Ø£Ø¨Ø¹[The security settings in your browser prevent us from creating a dialog box. Try a different browser, or {0} so that '{1}' and the domain shown in your address bar are in the same security zone.]לף"; +Strings.OfficeOM.L_InvalidOperationInCellEditMode = "ï¼»cvg0Mï¼½â€â€Ø£Ø¨Ø¹[Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.]לף"; Strings.OfficeOM.L_InvalidGetRows = "ï¼»KshdRï¼½â€â€Ø£Ø¨Ø¹[The specified rows are invalid.]לף"; -Strings.OfficeOM.L_InvalidSetColumns = "ï¼»behcVï¼½â€â€Ø£Ø¨Ø¹[The specified columns are invalid.]לף"; -Strings.OfficeOM.L_InvalidDataFormat = "ï¼»n3nbzï¼½â€â€Ø£Ø¨Ø¹[The format of the specified data object is invalid.]לף"; -Strings.OfficeOM.L_InvalidGetColumns = "ï¼»gwsNBï¼½â€â€Ø£Ø¨Ø¹[The specified columns are invalid.]לף"; -Strings.OfficeOM.L_InvalidObjectPath = 'ï¼»Zg5omï¼½â€â€Ø£Ø¨Ø¹[The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.]לף'; +Strings.OfficeOM.L_NoCapability = "ï¼»s8tihï¼½â€â€Ø£Ø¨Ø¹[You don't have sufficient permissions for this action.]לף"; +Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "ï¼»LozuOï¼½â€â€Ø£Ø¨Ø¹[Allow]לף"; +Strings.OfficeOM.L_NewWindowCrossZone = "ï¼»E0xziï¼½â€â€Ø£Ø¨Ø¹[The security settings in your browser prevent us from creating a dialog box. Try a different browser, or {0} so that '{1}' and the domain shown in your address bar are in the same security zone.]לף"; +Strings.OfficeOM.L_DialogAddressNotTrusted = "ï¼»giVvLï¼½â€â€Ø£Ø¨Ø¹[The domain of the URL is not included in the AppDomains element in the manifest.]לף"; +Strings.OfficeOM.L_ConnectionFailureWithDetails = "ï¼»y3r7Aï¼½â€â€Ø£Ø¨Ø¹[The request failed with status code of {0}, error code {1} and the following error message: {2}]לף"; +Strings.OfficeOM.L_UnsupportedEnumeration = "ï¼»YOCbmï¼½â€â€Ø£Ø¨Ø¹[Unsupported Enumeration]לף"; +Strings.OfficeOM.L_RunMustReturnPromise = 'ï¼»mP1s6ï¼½â€â€Ø£Ø¨Ø¹[The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".]לף'; +Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "ï¼»JBWjeï¼½â€â€Ø£Ø¨Ø¹[Coordinate parameters cannot be used with coercion type Table when the table contains merged cells.]לף"; +Strings.OfficeOM.L_OperationNotSupported = "ï¼»w712qï¼½â€â€Ø£Ø¨Ø¹[The operation is not supported.]לף"; +Strings.OfficeOM.L_InvalidBinding = "ï¼»L8oieï¼½â€â€Ø£Ø¨Ø¹[Invalid Binding]לף"; +Strings.OfficeOM.L_BindingToMultipleSelection = "ï¼»b0tWLï¼½â€â€Ø£Ø¨Ø¹[Noncontiguous selections are not supported.]לף"; Strings.OfficeOM.L_InvalidCoercion = "ï¼»cESfXï¼½â€â€Ø£Ø¨Ø¹[Invalid Coercion Type]לף"; +Strings.OfficeOM.L_DataReadError = "ï¼»O6ydkï¼½â€â€Ø£Ø¨Ø¹[Data Read Error]לף"; +Strings.OfficeOM.L_DataStale = "ï¼»CPq31ï¼½â€â€Ø£Ø¨Ø¹[Data Not Current]לף"; +Strings.OfficeOM.L_BrowserAPINotSupported = "ï¼»w9Nwvï¼½â€â€Ø£Ø¨Ø¹[This browser does not support the requested API.]לף"; +Strings.OfficeOM.L_ShowWindowDialogNotification = "ï¼»tI0ZWï¼½â€â€Ø£Ø¨Ø¹[{0} wants to display a new window.]לף"; Strings.OfficeOM.L_CallbackNotAFunction = "ï¼»mjEM1ï¼½â€â€Ø£Ø¨Ø¹[Callback must be of type function, was of type {0}.]לף"; -Strings.OfficeOM.L_SSOClientError = "ï¼»n1N0Mï¼½â€â€Ø£Ø¨Ø¹[Error occurred in the authentication request from Office.]לף"; -Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "ï¼»WLfEAï¼½â€â€Ø£Ø¨Ø¹[The identity type of the user is not supported.]לף"; -Strings.OfficeOM.L_DialogInvalidScheme = "ï¼»bewBNï¼½â€â€Ø£Ø¨Ø¹[The URL scheme is not supported. Use HTTPS instead.]לף"; -Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "ï¼»91S29ï¼½â€â€Ø£Ø¨Ø¹[Application {0} does not exist. Microsoft.Office.WebExtension.initialize(reason) is not called.]לף"; -Strings.OfficeOM.L_SetDataIsTooLarge = "ï¼»pvjqCï¼½â€â€Ø£Ø¨Ø¹[The specified data object is too large.]לף"; -Strings.OfficeOM.L_DataNotMatchCoercionType = "ï¼»bz76Dï¼½â€â€Ø£Ø¨Ø¹[The type of the specified data object is not compatible with the current selection.]לף"; -Strings.OfficeOM.L_InvalidValue = "ï¼»E49Elï¼½â€â€Ø£Ø¨Ø¹[Invalid Value]לף"; -Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "ï¼»7LzPbï¼½â€â€Ø£Ø¨Ø¹[XPath limits selection to 1024 items.]לף"; -Strings.OfficeOM.L_ColIndexOutOfRange = "ï¼»uM06fï¼½â€â€Ø£Ø¨Ø¹[The column index value is out of the allowed range. Use a value (0 or higher) that's less than the number of columns.]לף"; -Strings.OfficeOM.L_SSOServerErrorMessage = "ï¼»DT0X4ï¼½â€â€Ø£Ø¨Ø¹[An unexpected error occurred on the server.]לף"; -Strings.OfficeOM.L_InvalidNamedItemForBindingType = "ï¼»MIUqAï¼½â€â€Ø£Ø¨Ø¹[The specified binding type is not compatible with the supplied named item.]לף"; -Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "ï¼»8V2vDï¼½â€â€Ø£Ø¨Ø¹[Attempting to set read-only property '{0}'.]לף"; +Strings.OfficeOM.L_CannotRegisterEvent = "ï¼»7oStXï¼½â€â€Ø£Ø¨Ø¹[The event handler cannot be registered.]לף"; +Strings.OfficeOM.L_InvalidObjectPath = 'ï¼»Zg5omï¼½â€â€Ø£Ø¨Ø¹[The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.]לף'; +Strings.OfficeOM.L_PropertyDoesNotExist = "ï¼»P3fDWï¼½â€â€Ø£Ø¨Ø¹[Property '{0}' does not exist on the object.]לף"; +Strings.OfficeOM.L_OutOfRange = "ï¼»0AgiFï¼½â€â€Ø£Ø¨Ø¹[Out of Range]לף"; +Strings.OfficeOM.L_UnknownBindingType = "ï¼»ew2fBï¼½â€â€Ø£Ø¨Ø¹[The binding type is not supported.]לף"; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage = "ï¼»dzFYyï¼½â€â€Ø£Ø¨Ø¹[The operation failed because this add-in does not support user consent in this category]לף"; +Strings.OfficeOM.L_NotImplemented = "ï¼»7GO2Iï¼½â€â€Ø£Ø¨Ø¹[Function {0} is not implemented.]לף"; +Strings.OfficeOM.L_UserAborted = "ï¼»2C3rHï¼½â€â€Ø£Ø¨Ø¹[User aborted the consent request.]לף"; Strings.OfficeOM.L_InvalidBindingOperation = "ï¼»bB7Xjï¼½â€â€Ø£Ø¨Ø¹[Invalid Binding Operation]לף"; -Strings.OfficeOM.L_GetDataParametersConflict = "ï¼»tUoF2ï¼½â€â€Ø£Ø¨Ø¹[The specified parameters conflict.]לף"; -Strings.OfficeOM.L_SelectionCannotBound = "ï¼»zv7Clï¼½â€â€Ø£Ø¨Ø¹[Cannot bind to the current selection.]לף"; -Strings.OfficeOM.L_InvalidSetStartRowColumn = "ï¼»Ji62Pï¼½â€â€Ø£Ø¨Ø¹[The specified startRow or startColumn values are invalid.]לף"; -Strings.OfficeOM.L_AppNameNotExist = "ï¼»5XTUXï¼½â€â€Ø£Ø¨Ø¹[Add-in Name for {0} doesn't exist.]לף"; -Strings.OfficeOM.L_DocumentReadOnly = "ï¼»0B9PPï¼½â€â€Ø£Ø¨Ø¹[The requested operation is not allowed on the current document mode.]לף"; -Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "ï¼»LozuOï¼½â€â€Ø£Ø¨Ø¹[Allow]לף"; -Strings.OfficeOM.L_DisplayDialogError = "ï¼»SSMcdï¼½â€â€Ø£Ø¨Ø¹[Display Dialog Error]לף"; -Strings.OfficeOM.L_NetworkProblem = "ï¼»hHZXBï¼½â€â€Ø£Ø¨Ø¹[Network Problem]לף"; +Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "ï¼»hVPerï¼½â€â€Ø£Ø¨Ø¹[Browser restrictions prevented us from creating the dialog box. The domain of dialog box and the domain of the add-in host are not in the same security zone.]לף"; +Strings.OfficeOM.L_SSOServerError = "ï¼»ohQDwï¼½â€â€Ø£Ø¨Ø¹[Error occurred in the authentication provider.]לף"; +Strings.OfficeOM.L_FileTypeNotSupported = "ï¼»1kAhfï¼½â€â€Ø£Ø¨Ø¹[The specified file type is not supported.]לף"; +Strings.OfficeOM.L_SetDataParametersConflict = "ï¼»7TbVmï¼½â€â€Ø£Ø¨Ø¹[The specified parameters conflict.]לף"; +Strings.OfficeOM.L_EventRegistrationError = "ï¼»Kbn76ï¼½â€â€Ø£Ø¨Ø¹[Event Registration Error]לף"; Strings.OfficeOM.L_InvalidSetRows = "ï¼»69Jdbï¼½â€â€Ø£Ø¨Ø¹[The specified rows are invalid.]לף"; -Strings.OfficeOM.L_InvalidCellsValue = "ï¼»SN2YPï¼½â€â€Ø£Ø¨Ø¹[One or more of the cells parameters have values that aren't allowed. Double-check the values and try again.]לף"; -Strings.OfficeOM.L_InternalErrorDescription = "ï¼»PHbpoï¼½â€â€Ø£Ø¨Ø¹[An internal error has occurred.]לף"; -Strings.OfficeOM.L_DialogAlreadyOpened = "ï¼»0B7Smï¼½â€â€Ø£Ø¨Ø¹[The operation failed because this add-in already has an active dialog.]לף"; -Strings.OfficeOM.L_SpecifiedIdNotExist = "ï¼»zgKaFï¼½â€â€Ø£Ø¨Ø¹[The specified ID does not exist.]לף"; -Strings.OfficeOM.L_TooManyOptionalFunction = "ï¼»w74Tzï¼½â€â€Ø£Ø¨Ø¹[multiple optional functions in parameter list]לף"; -Strings.OfficeOM.L_BindingCreationError = "ï¼»Ef1V2ï¼½â€â€Ø£Ø¨Ø¹[Binding Creation Error]לף"; -Strings.OfficeOM.L_CellDataAmountBeyondLimits = "ï¼»alZIiï¼½â€â€Ø£Ø¨Ø¹[Note: The number of cells in a table is suggested to be below 20,000 cells.]לף"; -Strings.OfficeOM.L_UserAbortedMessage = "ï¼»u0vEnï¼½â€â€Ø£Ø¨Ø¹[The user did not consent the add-in permissions.]לף"; -Strings.OfficeOM.L_EventHandlerRemovalFailed = "ï¼»CgVwOï¼½â€â€Ø£Ø¨Ø¹[Failed to remove the event handler.]לף"; -Strings.OfficeOM.L_OverwriteWorksheetData = "ï¼»DOAPXï¼½â€â€Ø£Ø¨Ø¹[The set operation failed because the supplied data object will overwrite or shift data.]לף"; -Strings.OfficeOM.L_BadSelectorString = "ï¼»hw7oaï¼½â€â€Ø£Ø¨Ø¹[The string passed into the selector is improperly formatted or unsupported.]לף"; -Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "ï¼»2JRcCï¼½â€â€Ø£Ø¨Ø¹[Note: The formatting sets set by a Formatting API call is suggested to be below 100.]לף"; -Strings.OfficeOM.L_UnknownBindingType = "ï¼»ew2fBï¼½â€â€Ø£Ø¨Ø¹[The binding type is not supported.]לף"; -Strings.OfficeOM.L_ShowWindowDialogNotification = "ï¼»tI0ZWï¼½â€â€Ø£Ø¨Ø¹[{0} wants to display a new window.]לף"; +Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "ï¼»JWuudï¼½â€â€Ø£Ø¨Ø¹[The specified coercion type is not compatible with this binding type.]לף"; +Strings.OfficeOM.L_CustomFunctionDefinitionMissing = "ï¼»WVXyyï¼½â€â€Ø£Ø¨Ø¹[A property with this name that represents the function's definition must exist on Excel.CustomFunctions.]לף"; +Strings.OfficeOM.L_CustomXmlExceedQuotaName = "ï¼»h7F10ï¼½â€â€Ø£Ø¨Ø¹[Selection Limit Reached]לף"; +Strings.OfficeOM.L_UnsupportedUserIdentity = "ï¼»FzJ4Dï¼½â€â€Ø£Ø¨Ø¹[User identity type is not supported.]לף"; +Strings.OfficeOM.L_GetSelectionNotSupported = "ï¼»zo4sVï¼½â€â€Ø£Ø¨Ø¹[The current selection is not supported.]לף"; +Strings.OfficeOM.L_UserNotSignedIn = "ï¼»1L2Trï¼½â€â€Ø£Ø¨Ø¹[No user is signed into Office.]לף"; +Strings.OfficeOM.L_InvalidFormatValue = "ï¼»0DFvaï¼½â€â€Ø£Ø¨Ø¹[One or more of the format parameters have values that aren't allowed. Double-check the values and try again.]לף"; +Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = "ï¼»Z072Kï¼½â€â€Ø£Ø¨Ø¹[Changes to property '{0}' cannot be applied through an \"object.set\" method.]לף"; Strings.OfficeOM.L_PermissionDenied = "ï¼»pMeM6ï¼½â€â€Ø£Ø¨Ø¹[Permission Denied]לף"; -Strings.OfficeOM.L_UnsupportedDataObject = "ï¼»hGI3vï¼½â€â€Ø£Ø¨Ø¹[The supplied data object type is not supported.]לף"; -Strings.OfficeOM.L_UserAborted = "ï¼»2C3rHï¼½â€â€Ø£Ø¨Ø¹[User aborted the consent request.]לף"; -Strings.OfficeOM.L_PropertyNotLoaded = "ï¼»WhYjjï¼½â€â€Ø£Ø¨Ø¹[The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.]לף"; -Strings.OfficeOM.L_InvalidBinding = "ï¼»L8oieï¼½â€â€Ø£Ø¨Ø¹[Invalid Binding]לף"; -Strings.OfficeOM.L_MissingRequiredArguments = "ï¼»ryfbXï¼½â€â€Ø£Ø¨Ø¹[missing some required arguments]לף"; -Strings.OfficeOM.L_DialogRequireHTTPS = "ï¼»C4rnPï¼½â€â€Ø£Ø¨Ø¹[The HTTP protocol is not supported. Use HTTPS instead]לף"; -Strings.OfficeOM.L_CannotRegisterEvent = "ï¼»7oStXï¼½â€â€Ø£Ø¨Ø¹[The event handler cannot be registered.]לף"; -Strings.OfficeOM.L_InvalidApiCallInContext = "ï¼»WrlkTï¼½â€â€Ø£Ø¨Ø¹[Invalid API call in the current context.]לף"; -Strings.OfficeOM.L_MissingParameter = "ï¼»6kQRPï¼½â€â€Ø£Ø¨Ø¹[Missing Parameter]לף"; +Strings.OfficeOM.L_InvalidResourceUrlMessage = "ï¼»RrzgSï¼½â€â€Ø£Ø¨Ø¹[Invalid resource Url specified in the manifest.]לף"; +Strings.OfficeOM.L_ActivityLimitReached = "ï¼»pPfY4ï¼½â€â€Ø£Ø¨Ø¹[Activity limit has been reached.]לף"; +Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "ï¼»WLfEAï¼½â€â€Ø£Ø¨Ø¹[The identity type of the user is not supported.]לף"; +Strings.OfficeOM.L_CustomFunctionImplementationMissing = "ï¼»DhY5mï¼½â€â€Ø£Ø¨Ø¹[The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.]לף"; +Strings.OfficeOM.L_InvalidArgument = "ï¼»alUhTï¼½â€â€Ø£Ø¨Ø¹[The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.]לף"; +Strings.OfficeOM.L_DataNotMatchBindingType = "ï¼»w5I7kï¼½â€â€Ø£Ø¨Ø¹[The specified data object is not compatible with the binding type.]לף"; +Strings.OfficeOM.L_InvalidParameters = "ï¼»KDV1qï¼½â€â€Ø£Ø¨Ø¹[Function {0} has invalid parameters.]לף"; +Strings.OfficeOM.L_InitializeNotReady = "ï¼»DxSvUï¼½â€â€Ø£Ø¨Ø¹[Office.js has not been fully loaded yet. Please try again later or make sure to add your initialization code on the Office.initialize function.]לף"; +Strings.OfficeOM.L_ShuttingDown = "ï¼»WOU0sï¼½â€â€Ø£Ø¨Ø¹[Operation failed because the data is not current on the server.]לף"; +Strings.OfficeOM.L_InvalidApiArgumentsMessage = "ï¼»e70jaï¼½â€â€Ø£Ø¨Ø¹[Invalid input arguments.]לף"; Strings.OfficeOM.L_SSOClientErrorMessage = "ï¼»M4SP0ï¼½â€â€Ø£Ø¨Ø¹[An unexpected error occurred in the client.]לף"; -Strings.OfficeOM.L_NotSupportedEventType = "ï¼»obnbJï¼½â€â€Ø£Ø¨Ø¹[The specified event type {0} is not supported.]לף"; -Strings.OfficeOM.L_NamedItemNotFound = "ï¼»JwpG3ï¼½â€â€Ø£Ø¨Ø¹[The named item does not exist.]לף"; -Strings.OfficeOM.L_InvalidFormatValue = "ï¼»0DFvaï¼½â€â€Ø£Ø¨Ø¹[One or more of the format parameters have values that aren't allowed. Double-check the values and try again.]לף"; -Strings.OfficeOM.L_OperationNotSupported = "ï¼»w712qï¼½â€â€Ø£Ø¨Ø¹[The operation is not supported.]לף"; -Strings.OfficeOM.L_InternalError = "ï¼»h7nOmï¼½â€â€Ø£Ø¨Ø¹[Internal Error]לף"; -Strings.OfficeOM.L_DataStale = "ï¼»CPq31ï¼½â€â€Ø£Ø¨Ø¹[Data Not Current]לף"; -Strings.OfficeOM.L_PropertyDoesNotExist = "ï¼»P3fDWï¼½â€â€Ø£Ø¨Ø¹[Property '{0}' does not exist on the object.]לף"; -Strings.OfficeOM.L_InvalidArgumentGeneric = "ï¼»buJV5ï¼½â€â€Ø£Ø¨Ø¹[The argument(s) passed into the function don't work for this situation, are missing, or aren't in the right format.]לף"; -Strings.OfficeOM.L_NotSupported = "ï¼»SFggQï¼½â€â€Ø£Ø¨Ø¹[Function {0} is not supported.]לף"; -Strings.OfficeOM.L_SetDataParametersConflict = "ï¼»7TbVmï¼½â€â€Ø£Ø¨Ø¹[The specified parameters conflict.]לף"; -Strings.OfficeOM.L_RunMustReturnPromise = 'ï¼»mP1s6ï¼½â€â€Ø£Ø¨Ø¹[The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".]לף'; -Strings.OfficeOM.L_SaveSettingsError = "ï¼»ZAA78ï¼½â€â€Ø£Ø¨Ø¹[Save Settings Error]לף"; -Strings.OfficeOM.L_DataReadError = "ï¼»O6ydkï¼½â€â€Ø£Ø¨Ø¹[Data Read Error]לף"; +Strings.OfficeOM.L_FunctionCallFailed = "ï¼»irDYbï¼½â€â€Ø£Ø¨Ø¹[Function {0} call failed, error code: {1}.]לף"; +Strings.OfficeOM.L_InvalidAPICall = "ï¼»QJGpqï¼½â€â€Ø£Ø¨Ø¹[Invalid API Call]לף"; +Strings.OfficeOM.L_RedundantCallbackSpecification = "ï¼»1w72sï¼½â€â€Ø£Ø¨Ø¹[Callback cannot be specified both in argument list and in optional object.]לף"; +Strings.OfficeOM.L_DataNotMatchSelection = "ï¼»B3NE5ï¼½â€â€Ø£Ø¨Ø¹[The supplied data object is not compatible with the shape or dimensions of the current selection.]לף"; +Strings.OfficeOM.L_SelectionNotSupportCoercionType = "ï¼»11oVNï¼½â€â€Ø£Ø¨Ø¹[The current selection is not compatible with the specified coercion type.]לף"; +Strings.OfficeOM.L_DocumentReadOnly = "ï¼»0B9PPï¼½â€â€Ø£Ø¨Ø¹[The requested operation is not allowed on the current document mode.]לף"; Strings.OfficeOM.L_FormattingReminder = "ï¼»v38SSï¼½â€â€Ø£Ø¨Ø¹[Formatting Reminder]לף"; -Strings.OfficeOM.L_DataWriteReminder = "ï¼»6x3Rlï¼½â€â€Ø£Ø¨Ø¹[Data Write Reminder]לף"; -Strings.OfficeOM.L_InValidOptionalArgument = "ï¼»jH9Lhï¼½â€â€Ø£Ø¨Ø¹[invalid optional argument]לף"; -Strings.OfficeOM.L_CustomXmlOutOfDateName = "ï¼»WoZSLï¼½â€â€Ø£Ø¨Ø¹[Data Not Current]לף"; -Strings.OfficeOM.L_TooManyIncompleteRequests = "ï¼»2TC32ï¼½â€â€Ø£Ø¨Ø¹[Wait until the previous call completes.]לף"; -Strings.OfficeOM.L_UnsupportedEnumerationMessage = "ï¼»fKjXVï¼½â€â€Ø£Ø¨Ø¹[The enumeration isn't supported in the current host application.]לף"; -Strings.OfficeOM.L_InvalidParameters = "ï¼»KDV1qï¼½â€â€Ø£Ø¨Ø¹[Function {0} has invalid parameters.]לף"; +Strings.OfficeOM.L_RequestTokenUnavailable = "ï¼»JVQl2ï¼½â€â€Ø£Ø¨Ø¹[This API has been throttled to slow the call frequency.]לף"; +Strings.OfficeOM.L_CellDataAmountBeyondLimits = "ï¼»alZIiï¼½â€â€Ø£Ø¨Ø¹[Note: The number of cells in a table is suggested to be below 20,000 cells.]לף"; +Strings.OfficeOM.L_SpecifiedIdNotExist = "ï¼»zgKaFï¼½â€â€Ø£Ø¨Ø¹[The specified ID does not exist.]לף"; +Strings.OfficeOM.L_DialogOK = "ï¼»W6D5rï¼½â€â€Ø£Ø¨Ø¹[OK]לף"; Strings.OfficeOM.L_RowIndexOutOfRange = "ï¼»LTTpGï¼½â€â€Ø£Ø¨Ø¹[The row index value is out of the allowed range. Use a value (0 or higher) that's less than the number of rows.]לף"; -Strings.OfficeOM.L_InvalidGetRowColumnCounts = "ï¼»6atwJï¼½â€â€Ø£Ø¨Ø¹[The specified rowCount or columnCount values are invalid.]לף"; +Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "ï¼»2JRcCï¼½â€â€Ø£Ø¨Ø¹[Note: The formatting sets set by a Formatting API call is suggested to be below 100.]לף"; +Strings.OfficeOM.L_InvalidGetColumns = "ï¼»gwsNBï¼½â€â€Ø£Ø¨Ø¹[The specified columns are invalid.]לף"; +Strings.OfficeOM.L_SSOClientError = "ï¼»n1N0Mï¼½â€â€Ø£Ø¨Ø¹[Error occurred in the authentication request from Office.]לף"; +Strings.OfficeOM.L_CoercionTypeNotSupported = "ï¼»0MWOXï¼½â€â€Ø£Ø¨Ø¹[The specified coercion type is not supported.]לף"; Strings.OfficeOM.L_UserClickIgnore = "ï¼»jeIUrï¼½â€â€Ø£Ø¨Ø¹[The user chose to ignore the dialog box.]לף"; -Strings.OfficeOM.L_UserNotSignedIn = "ï¼»1L2Trï¼½â€â€Ø£Ø¨Ø¹[No user is signed into Office.]לף"; +Strings.OfficeOM.L_AppNameNotExist = "ï¼»5XTUXï¼½â€â€Ø£Ø¨Ø¹[Add-in Name for {0} doesn't exist.]לף"; +Strings.OfficeOM.L_InvalidCellsValue = "ï¼»SN2YPï¼½â€â€Ø£Ø¨Ø¹[One or more of the cells parameters have values that aren't allowed. Double-check the values and try again.]לף"; +Strings.OfficeOM.L_DialogInvalidScheme = "ï¼»bewBNï¼½â€â€Ø£Ø¨Ø¹[The URL scheme is not supported. Use HTTPS instead.]לף"; +Strings.OfficeOM.L_UserAbortedMessage = "ï¼»u0vEnï¼½â€â€Ø£Ø¨Ø¹[The user did not consent the add-in permissions.]לף"; +Strings.OfficeOM.L_CloseFileBeforeRetrieve = "ï¼»hjT2vï¼½â€â€Ø£Ø¨Ø¹[Call closeAsync on the current File before retrieving another.]לף"; Strings.OfficeOM.L_TooManyArguments = "ï¼»542tYï¼½â€â€Ø£Ø¨Ø¹[too many arguments]לף"; -Strings.OfficeOM.L_RequestTimeout = "ï¼»idn5Sï¼½â€â€Ø£Ø¨Ø¹[The call took too long to execute.]לף"; -Strings.OfficeOM.L_CustomXmlExceedQuotaName = "ï¼»h7F10ï¼½â€â€Ø£Ø¨Ø¹[Selection Limit Reached]לף"; -Strings.OfficeOM.L_InvalidResourceUrlMessage = "ï¼»RrzgSï¼½â€â€Ø£Ø¨Ø¹[Invalid resource Url specified in the manifest.]לף"; -Strings.OfficeOM.L_CustomXmlNodeNotFound = "ï¼»4BiJhï¼½â€â€Ø£Ø¨Ø¹[The specified node was not found.]לף"; -Strings.OfficeOM.L_HostError = "ï¼»JvjsUï¼½â€â€Ø£Ø¨Ø¹[Host Error]לף"; -Strings.OfficeOM.L_FormatValueOutOfRange = "ï¼»4djk9ï¼½â€â€Ø£Ø¨Ø¹[The value is out of the allowed range.]לף"; +Strings.OfficeOM.L_TooManyIncompleteRequests = "ï¼»2TC32ï¼½â€â€Ø£Ø¨Ø¹[Wait until the previous call completes.]לף"; +Strings.OfficeOM.L_SettingsCannotSave = "ï¼»6SC7Bï¼½â€â€Ø£Ø¨Ø¹[The settings could not be saved.]לף"; +Strings.OfficeOM.L_CustomXmlError = "ï¼»ot553ï¼½â€â€Ø£Ø¨Ø¹[Custom XML Error.]לף"; Strings.OfficeOM.L_InvalidDataObject = "ï¼»gFTdxï¼½â€â€Ø£Ø¨Ø¹[Invalid Data Object]לף"; -Strings.OfficeOM.L_SettingsStaleError = "ï¼»WpB5Pï¼½â€â€Ø£Ø¨Ø¹[Settings Stale Error]לף"; -Strings.OfficeOM.L_InvalidColumnsForBinding = "ï¼»FrmaYï¼½â€â€Ø£Ø¨Ø¹[The specified columns are invalid.]לף"; -Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "ï¼»e6MqNï¼½â€â€Ø£Ø¨Ø¹[Your Office Online session has expired or is invalid. To continue, refresh the page.]לף"; -Strings.OfficeOM.L_DataNotMatchSelection = "ï¼»B3NE5ï¼½â€â€Ø£Ø¨Ø¹[The supplied data object is not compatible with the shape or dimensions of the current selection.]לף"; -Strings.OfficeOM.L_RedundantCallbackSpecification = "ï¼»1w72sï¼½â€â€Ø£Ø¨Ø¹[Callback cannot be specified both in argument list and in optional object.]לף"; -Strings.OfficeOM.L_FunctionCallFailed = "ï¼»irDYbï¼½â€â€Ø£Ø¨Ø¹[Function {0} call failed, error code: {1}.]לף"; -Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "ï¼»74Jq6ï¼½â€â€Ø£Ø¨Ø¹[Please make a selection.]לף"; -Strings.OfficeOM.L_DataNotMatchBindingType = "ï¼»w5I7kï¼½â€â€Ø£Ø¨Ø¹[The specified data object is not compatible with the binding type.]לף"; -Strings.OfficeOM.L_SliceSizeNotSupported = "ï¼»cO53fï¼½â€â€Ø£Ø¨Ø¹[The specified slice size is not supported.]לף"; -Strings.OfficeOM.L_CannotNavigateTo = "ï¼»2J8roï¼½â€â€Ø£Ø¨Ø¹[The object is located in a place where navigation is not supported.]לף"; -Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "ï¼»1GZNHï¼½â€â€Ø£Ø¨Ø¹[Operation is not supported on this binding type.]לף"; -Strings.OfficeOM.L_SSOServerError = "ï¼»ohQDwï¼½â€â€Ø£Ø¨Ø¹[Error occurred in the authentication provider.]לף"; -Strings.OfficeOM.L_MemoryLimit = "ï¼»g04mAï¼½â€â€Ø£Ø¨Ø¹[Memory Limit Exceeded]לף"; -Strings.OfficeOM.L_IndexOutOfRange = "ï¼»2bW7Mï¼½â€â€Ø£Ø¨Ø¹[Index out of range.]לף"; -Strings.OfficeOM.L_InvalidArgument = "ï¼»alUhTï¼½â€â€Ø£Ø¨Ø¹[The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.]לף"; -Strings.OfficeOM.L_Timeout = "ï¼»8Yaznï¼½â€â€Ø£Ø¨Ø¹[The operation has timed out.]לף"; -Strings.OfficeOM.L_InvalidGrant = "ï¼»hWgqeï¼½â€â€Ø£Ø¨Ø¹[Preauthorization missing.]לף"; -Strings.OfficeOM.L_OsfControlTypeNotSupported = "ï¼»N1OVzï¼½â€â€Ø£Ø¨Ø¹[OsfControl type not supported.]לף"; -Strings.OfficeOM.L_DialogOK = "ï¼»W6D5rï¼½â€â€Ø£Ø¨Ø¹[OK]לף"; -Strings.OfficeOM.L_CoercionTypeNotSupported = "ï¼»0MWOXï¼½â€â€Ø£Ø¨Ø¹[The specified coercion type is not supported.]לף"; -Strings.OfficeOM.L_ValueNotLoaded = 'ï¼»yUa7Oï¼½â€â€Ø£Ø¨Ø¹[The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.]לף'; +Strings.OfficeOM.L_CustomFunctionNameContainsBadChars = "ï¼»D57c3ï¼½â€â€Ø£Ø¨Ø¹[The function name may only contain letters, digits, underscores, and periods.]לף"; +Strings.OfficeOM.L_InvalidValue = "ï¼»E49Elï¼½â€â€Ø£Ø¨Ø¹[Invalid Value]לף"; +Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "ï¼»uhnQCï¼½â€â€Ø£Ø¨Ø¹[Selected content needs to be in table format. Format the data as a table and try again.]לף"; +Strings.OfficeOM.L_APICallFailed = "ï¼»b0XAiï¼½â€â€Ø£Ø¨Ø¹[API Call Failed]לף"; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory = "ï¼»Mn1uWï¼½â€â€Ø£Ø¨Ø¹[This add-in does not support user consent.]לף"; +Strings.OfficeOM.L_InvalidBindingError = "ï¼»qB3Jpï¼½â€â€Ø£Ø¨Ø¹[Invalid Binding Error]לף"; +Strings.OfficeOM.L_NotSupportedEventType = "ï¼»obnbJï¼½â€â€Ø£Ø¨Ø¹[The specified event type {0} is not supported.]לף"; +Strings.OfficeOM.L_CustomFunctionNameCannotSplit = "ï¼»1DC6Kï¼½â€â€Ø£Ø¨Ø¹[The function name must contain a non-empty namespace and a non-empty short name.]לף"; +Strings.OfficeOM.L_PropertyNotLoaded = "ï¼»WhYjjï¼½â€â€Ø£Ø¨Ø¹[The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.]לף"; +Strings.OfficeOM.L_NetworkProblemRetrieveFile = "ï¼»HAmZTï¼½â€â€Ø£Ø¨Ø¹[A network problem has prevented retrieval of the file.]לף"; +Strings.OfficeOM.L_DisplayDialogError = "ï¼»SSMcdï¼½â€â€Ø£Ø¨Ø¹[Display Dialog Error]לף"; Strings.OfficeOM.L_ReadSettingsError = "ï¼»NO2AIï¼½â€â€Ø£Ø¨Ø¹[Read Settings Error]לף"; -Strings.OfficeOM.L_InvalidGrantMessage = "ï¼»FEmXGï¼½â€â€Ø£Ø¨Ø¹[Missing grant for this add-in.]לף"; -Strings.OfficeOM.L_SettingsAreStale = "ï¼»Pnv04ï¼½â€â€Ø£Ø¨Ø¹[Settings could not be saved because they are not current.]לף"; -Strings.OfficeOM.L_FileTypeNotSupported = "ï¼»1kAhfï¼½â€â€Ø£Ø¨Ø¹[The specified file type is not supported.]לף"; -Strings.OfficeOM.L_CannotWriteToSelection = "ï¼»D5d2yï¼½â€â€Ø£Ø¨Ø¹[Cannot write to the current selection.]לף"; -Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "ï¼»hxMK6ï¼½â€â€Ø£Ø¨Ø¹[The data is out of date. Retrieve the object again.]לף"; -Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "ï¼»eRmK1ï¼½â€â€Ø£Ø¨Ø¹[The operation failed because this add-in is already requesting an access token.]לף"; +Strings.OfficeOM.L_IndexOutOfRange = "ï¼»2bW7Mï¼½â€â€Ø£Ø¨Ø¹[Index out of range.]לף"; +Strings.OfficeOM.L_InvalidSetStartRowColumn = "ï¼»Ji62Pï¼½â€â€Ø£Ø¨Ø¹[The specified startRow or startColumn values are invalid.]לף"; +Strings.OfficeOM.L_CustomXmlNodeNotFound = "ï¼»4BiJhï¼½â€â€Ø£Ø¨Ø¹[The specified node was not found.]לף"; +Strings.OfficeOM.L_InternalError = "ï¼»h7nOmï¼½â€â€Ø£Ø¨Ø¹[Internal Error]לף"; Strings.OfficeOM.L_SettingNameNotExist = "ï¼»jt3Ywï¼½â€â€Ø£Ø¨Ø¹[The specified setting name does not exist.]לף"; -Strings.OfficeOM.L_UnsupportedEnumeration = "ï¼»YOCbmï¼½â€â€Ø£Ø¨Ø¹[Unsupported Enumeration]לף"; -Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "ï¼»JBWjeï¼½â€â€Ø£Ø¨Ø¹[Coordinate parameters cannot be used with coercion type Table when the table contains merged cells.]לף"; -Strings.OfficeOM.L_GetSelectionNotSupported = "ï¼»zo4sVï¼½â€â€Ø£Ø¨Ø¹[The current selection is not supported.]לף"; -Strings.OfficeOM.L_ConnectionFailureWithDetails = "ï¼»y3r7Aï¼½â€â€Ø£Ø¨Ø¹[The request failed with status code of {0}, error code {1} and the following error message: {2}]לף"; +Strings.OfficeOM.L_NamedItemNotFound = "ï¼»JwpG3ï¼½â€â€Ø£Ø¨Ø¹[The named item does not exist.]לף"; Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "ï¼»lH0QVï¼½â€â€Ø£Ø¨Ø¹[Add-in is already requesting an access token.]לף"; -Strings.OfficeOM.L_ShuttingDown = "ï¼»WOU0sï¼½â€â€Ø£Ø¨Ø¹[Operation failed because the data is not current on the server.]לף"; -Strings.OfficeOM.L_InvalidFormat = "ï¼»aPhpJï¼½â€â€Ø£Ø¨Ø¹[Invalid Format Error]לף"; -Strings.OfficeOM.L_SettingsCannotSave = "ï¼»6SC7Bï¼½â€â€Ø£Ø¨Ø¹[The settings could not be saved.]לף"; -Strings.OfficeOM.L_NotSupportedBindingType = "ï¼»HHVb8ï¼½â€â€Ø£Ø¨Ø¹[The specified binding type {0} is not supported.]לף"; -Strings.OfficeOM.L_InvalidSelectionForBindingType = "ï¼»hyH3Uï¼½â€â€Ø£Ø¨Ø¹[A binding cannot be created with the current selection and the specified binding type.]לף"; -Strings.OfficeOM.L_SelectionNotSupportCoercionType = "ï¼»11oVNï¼½â€â€Ø£Ø¨Ø¹[The current selection is not compatible with the specified coercion type.]לף"; -Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "ï¼»uhnQCï¼½â€â€Ø£Ø¨Ø¹[Selected content needs to be in table format. Format the data as a table and try again.]לף"; -Strings.OfficeOM.L_InvalidGetStartRowColumn = "ï¼»ghnzEï¼½â€â€Ø£Ø¨Ø¹[The specified startRow or startColumn values are invalid.]לף"; -Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "ï¼»hVPerï¼½â€â€Ø£Ø¨Ø¹[Browser restrictions prevented us from creating the dialog box. The domain of dialog box and the domain of the add-in host are not in the same security zone.]לף"; -Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "ï¼»JWuudï¼½â€â€Ø£Ø¨Ø¹[The specified coercion type is not compatible with this binding type.]לף"; -Strings.OfficeOM.L_DataNotMatchBindingSize = "ï¼»Zl27Rï¼½â€â€Ø£Ø¨Ø¹[The supplied data object does not match the size of the current selection.]לף"; -Strings.OfficeOM.L_OutOfRange = "ï¼»0AgiFï¼½â€â€Ø£Ø¨Ø¹[Out of Range]לף"; -Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "ï¼»AvQkUï¼½â€â€Ø£Ø¨Ø¹[Ignore]לף"; -Strings.OfficeOM.L_RequestTokenUnavailable = "ï¼»JVQl2ï¼½â€â€Ø£Ø¨Ø¹[This API has been throttled to slow the call frequency.]לף"; -Strings.OfficeOM.L_APINotSupported = "ï¼»fDdv0ï¼½â€â€Ø£Ø¨Ø¹[API Not Supported]לף"; -Strings.OfficeOM.L_InvalidReadForBlankRow = "ï¼»O14g9ï¼½â€â€Ø£Ø¨Ø¹[The specified row is blank.]לף"; -Strings.OfficeOM.L_CustomXmlError = "ï¼»ot553ï¼½â€â€Ø£Ø¨Ø¹[Custom XML Error.]לף"; -Strings.OfficeOM.L_InvalidRequestContext = "ï¼»EU97Aï¼½â€â€Ø£Ø¨Ø¹[Cannot use the object across different request contexts.]לף"; -Strings.OfficeOM.L_InvalidTableOptionValue = "ï¼»1fSevï¼½â€â€Ø£Ø¨Ø¹[One or more of the tableOptions parameters have values that aren't allowed. Double-check the values and try again.]לף"; +Strings.OfficeOM.L_BindingCreationError = "ï¼»Ef1V2ï¼½â€â€Ø£Ø¨Ø¹[Binding Creation Error]לף"; +Strings.OfficeOM.L_InvalidGetRowColumnCounts = "ï¼»6atwJï¼½â€â€Ø£Ø¨Ø¹[The specified rowCount or columnCount values are invalid.]לף"; Strings.OfficeOM.L_InvalidResourceUrl = "ï¼»ZwZqfï¼½â€â€Ø£Ø¨Ø¹[Invalid application resource Url provided.]לף"; +Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "ï¼»oLNBUï¼½â€â€Ø£Ø¨Ø¹[configure your browser]לף"; Strings.OfficeOM.L_BindingNotExist = "ï¼»wLGkWï¼½â€â€Ø£Ø¨Ø¹[The specified binding does not exist.]לף"; -Strings.OfficeOM.L_DialogAddressNotTrusted = "ï¼»giVvLï¼½â€â€Ø£Ø¨Ø¹[The domain of the URL is not included in the AppDomains element in the manifest.]לף"; -Strings.OfficeOM.L_NetworkProblemRetrieveFile = "ï¼»HAmZTï¼½â€â€Ø£Ø¨Ø¹[A network problem has prevented retrieval of the file.]לף"; -Strings.OfficeOM.L_InvalidApiArgumentsMessage = "ï¼»e70jaï¼½â€â€Ø£Ø¨Ø¹[Invalid input arguments.]לף"; -Strings.OfficeOM.L_APICallFailed = "ï¼»b0XAiï¼½â€â€Ø£Ø¨Ø¹[API Call Failed]לף"; -Strings.OfficeOM.L_BindingToMultipleSelection = "ï¼»b0tWLï¼½â€â€Ø£Ø¨Ø¹[Noncontiguous selections are not supported.]לף"; -Strings.OfficeOM.L_ActivityLimitReached = "ï¼»pPfY4ï¼½â€â€Ø£Ø¨Ø¹[Activity limit has been reached.]לף"; -Strings.OfficeOM.L_InvalidAPICall = "ï¼»QJGpqï¼½â€â€Ø£Ø¨Ø¹[Invalid API Call]לף"; +Strings.OfficeOM.L_InvalidNode = "ï¼»gLELCï¼½â€â€Ø£Ø¨Ø¹[Invalid Node]לף"; +Strings.OfficeOM.L_DialogRequireHTTPS = "ï¼»C4rnPï¼½â€â€Ø£Ø¨Ø¹[The HTTP protocol is not supported. Use HTTPS instead]לף"; +Strings.OfficeOM.L_InternalErrorDescription = "ï¼»PHbpoï¼½â€â€Ø£Ø¨Ø¹[An internal error has occurred.]לף"; +Strings.OfficeOM.L_InvalidApiCallInContext = "ï¼»WrlkTï¼½â€â€Ø£Ø¨Ø¹[Invalid API call in the current context.]לף"; +Strings.OfficeOM.L_SliceSizeNotSupported = "ï¼»cO53fï¼½â€â€Ø£Ø¨Ø¹[The specified slice size is not supported.]לף"; +Strings.OfficeOM.L_OsfControlTypeNotSupported = "ï¼»N1OVzï¼½â€â€Ø£Ø¨Ø¹[OsfControl type not supported.]לף"; +Strings.OfficeOM.L_DataWriteReminder = "ï¼»6x3Rlï¼½â€â€Ø£Ø¨Ø¹[Data Write Reminder]לף"; +Strings.OfficeOM.L_InvalidTableOptionValue = "ï¼»1fSevï¼½â€â€Ø£Ø¨Ø¹[One or more of the tableOptions parameters have values that aren't allowed. Double-check the values and try again.]לף"; +Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "ï¼»hxMK6ï¼½â€â€Ø£Ø¨Ø¹[The data is out of date. Retrieve the object again.]לף"; +Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "ï¼»e6MqNï¼½â€â€Ø£Ø¨Ø¹[Your Office Online session has expired or is invalid. To continue, refresh the page.]לף"; +Strings.OfficeOM.L_GetDataParametersConflict = "ï¼»tUoF2ï¼½â€â€Ø£Ø¨Ø¹[The specified parameters conflict.]לף"; +Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "ï¼»P7IAeï¼½â€â€Ø£Ø¨Ø¹[Coordinate parameters cannot be used with coercion type Table when the table contains merged cells.]לף"; +Strings.OfficeOM.L_InvalidGetStartRowColumn = "ï¼»ghnzEï¼½â€â€Ø£Ø¨Ø¹[The specified startRow or startColumn values are invalid.]לף"; +Strings.OfficeOM.L_InValidOptionalArgument = "ï¼»jH9Lhï¼½â€â€Ø£Ø¨Ø¹[invalid optional argument]לף"; +Strings.OfficeOM.L_MissingParameter = "ï¼»6kQRPï¼½â€â€Ø£Ø¨Ø¹[Missing Parameter]לף"; +Strings.OfficeOM.L_InvalidOrTimedOutSession = "ï¼»qvnk3ï¼½â€â€Ø£Ø¨Ø¹[Invalid Or Timed Out Session]לף"; +Strings.OfficeOM.L_MultipleNamedItemFound = "ï¼»jv5aIï¼½â€â€Ø£Ø¨Ø¹[Multiple objects with the same name were found.]לף"; +Strings.OfficeOM.L_CannotWriteToSelection = "ï¼»D5d2yï¼½â€â€Ø£Ø¨Ø¹[Cannot write to the current selection.]לף"; +Strings.OfficeOM.L_SSOConnectionLostError = "ï¼»GNT1cï¼½â€â€Ø£Ø¨Ø¹[A connection was lost during the sign in process.]לף"; +Strings.OfficeOM.L_TooManyOptionalObjects = "ï¼»u95nHï¼½â€â€Ø£Ø¨Ø¹[multiple optional objects in parameter list]לף"; +Strings.OfficeOM.L_InvalidSelectionForBindingType = "ï¼»hyH3Uï¼½â€â€Ø£Ø¨Ø¹[A binding cannot be created with the current selection and the specified binding type.]לף"; +Strings.OfficeOM.L_InvalidRequestContext = "ï¼»EU97Aï¼½â€â€Ø£Ø¨Ø¹[Cannot use the object across different request contexts.]לף"; +Strings.OfficeOM.L_InvalidArgumentGeneric = "ï¼»buJV5ï¼½â€â€Ø£Ø¨Ø¹[The argument(s) passed into the function don't work for this situation, are missing, or aren't in the right format.]לף"; +Strings.OfficeOM.L_DataWriteError = "ï¼»Xc0RNï¼½â€â€Ø£Ø¨Ø¹[Data Write Error]לף"; +Strings.OfficeOM.L_Timeout = "ï¼»8Yaznï¼½â€â€Ø£Ø¨Ø¹[The operation has timed out.]לף"; +Strings.OfficeOM.L_NavOutOfBound = "ï¼»Kt5jtï¼½â€â€Ø£Ø¨Ø¹[The operation failed because the index is out of range.]לף"; +Strings.OfficeOM.L_UnsupportedDataObject = "ï¼»hGI3vï¼½â€â€Ø£Ø¨Ø¹[The supplied data object type is not supported.]לף"; +Strings.OfficeOM.L_ColIndexOutOfRange = "ï¼»uM06fï¼½â€â€Ø£Ø¨Ø¹[The column index value is out of the allowed range. Use a value (0 or higher) that's less than the number of columns.]לף"; +Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "ï¼»74Jq6ï¼½â€â€Ø£Ø¨Ø¹[Please make a selection.]לף"; +Strings.OfficeOM.L_SetDataIsTooLarge = "ï¼»pvjqCï¼½â€â€Ø£Ø¨Ø¹[The specified data object is too large.]לף"; +Strings.OfficeOM.L_InvalidFormat = "ï¼»aPhpJï¼½â€â€Ø£Ø¨Ø¹[Invalid Format Error]לף"; +Strings.OfficeOM.L_InvalidSSOAddinMessage = "ï¼»aCWF7ï¼½â€â€Ø£Ø¨Ø¹[The identity API is not supported for this add-in.]לף"; +Strings.OfficeOM.L_UnsupportedEnumerationMessage = "ï¼»fKjXVï¼½â€â€Ø£Ø¨Ø¹[The enumeration isn't supported in the current host application.]לף"; +Strings.OfficeOM.L_InvalidDataFormat = "ï¼»n3nbzï¼½â€â€Ø£Ø¨Ø¹[The format of the specified data object is invalid.]לף"; +Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "ï¼»91S29ï¼½â€â€Ø£Ø¨Ø¹[Application {0} does not exist. Microsoft.Office.WebExtension.initialize(reason) is not called.]לף"; +Strings.OfficeOM.L_BadSelectorString = "ï¼»hw7oaï¼½â€â€Ø£Ø¨Ø¹[The string passed into the selector is improperly formatted or unsupported.]לף"; +Strings.OfficeOM.L_CustomXmlOutOfDateName = "ï¼»WoZSLï¼½â€â€Ø£Ø¨Ø¹[Data Not Current]לף"; +Strings.OfficeOM.L_CannotNavigateTo = "ï¼»2J8roï¼½â€â€Ø£Ø¨Ø¹[The object is located in a place where navigation is not supported.]לף"; +Strings.OfficeOM.L_InvalidColumnsForBinding = "ï¼»FrmaYï¼½â€â€Ø£Ø¨Ø¹[The specified columns are invalid.]לף"; +Strings.OfficeOM.L_InvalidSetColumns = "ï¼»behcVï¼½â€â€Ø£Ø¨Ø¹[The specified columns are invalid.]לף"; +Strings.OfficeOM.L_DataNotMatchCoercionType = "ï¼»bz76Dï¼½â€â€Ø£Ø¨Ø¹[The type of the specified data object is not compatible with the current selection.]לף"; +Strings.OfficeOM.L_InvalidNamedItemForBindingType = "ï¼»MIUqAï¼½â€â€Ø£Ø¨Ø¹[The specified binding type is not compatible with the supplied named item.]לף"; +Strings.OfficeOM.L_SSOServerErrorMessage = "ï¼»DT0X4ï¼½â€â€Ø£Ø¨Ø¹[An unexpected error occurred on the server.]לף"; +Strings.OfficeOM.L_SaveSettingsError = "ï¼»ZAA78ï¼½â€â€Ø£Ø¨Ø¹[Save Settings Error]לף"; +Strings.OfficeOM.L_HostError = "ï¼»JvjsUï¼½â€â€Ø£Ø¨Ø¹[Host Error]לף"; +Strings.OfficeOM.L_ValueNotLoaded = 'ï¼»yUa7Oï¼½â€â€Ø£Ø¨Ø¹[The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.]לף'; +Strings.OfficeOM.L_DataNotMatchBindingSize = "ï¼»Zl27Rï¼½â€â€Ø£Ø¨Ø¹[The supplied data object does not match the size of the current selection.]לף"; +Strings.OfficeOM.L_FormatValueOutOfRange = "ï¼»4djk9ï¼½â€â€Ø£Ø¨Ø¹[The value is out of the allowed range.]לף"; +Strings.OfficeOM.L_NetworkProblem = "ï¼»hHZXBï¼½â€â€Ø£Ø¨Ø¹[Network Problem]לף"; +Strings.OfficeOM.L_NotSupportedBindingType = "ï¼»HHVb8ï¼½â€â€Ø£Ø¨Ø¹[The specified binding type {0} is not supported.]לף"; Strings.OfficeOM.L_EventHandlerNotExist = "ï¼»QAdgxï¼½â€â€Ø£Ø¨Ø¹[The specified event handler was not found for this binding.]לף"; +Strings.OfficeOM.L_GetDataIsTooLarge = "ï¼»3wF2fï¼½â€â€Ø£Ø¨Ø¹[The requested data set is too large.]לף"; +Strings.OfficeOM.L_DialogAlreadyOpened = "ï¼»0B7Smï¼½â€â€Ø£Ø¨Ø¹[The operation failed because this add-in already has an active dialog.]לף"; +Strings.OfficeOM.L_SSOConnectionLostErrorMessage = "ï¼»bEwSlï¼½â€â€Ø£Ø¨Ø¹[A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones.]לף"; +Strings.OfficeOM.L_SettingsAreStale = "ï¼»Pnv04ï¼½â€â€Ø£Ø¨Ø¹[Settings could not be saved because they are not current.]לף"; +Strings.OfficeOM.L_APINotSupported = "ï¼»fDdv0ï¼½â€â€Ø£Ø¨Ø¹[API Not Supported]לף"; +Strings.OfficeOM.L_DialogNavigateError = "ï¼»uzg7Nï¼½â€â€Ø£Ø¨Ø¹[Dialog Navigation Error]לף"; +Strings.OfficeOM.L_MissingRequiredArguments = "ï¼»ryfbXï¼½â€â€Ø£Ø¨Ø¹[missing some required arguments]לף"; +Strings.OfficeOM.L_InvalidGrant = "ï¼»hWgqeï¼½â€â€Ø£Ø¨Ø¹[Preauthorization missing.]לף"; +Strings.OfficeOM.L_ApiNotFoundDetails = "ï¼»iU4jDï¼½â€â€Ø£Ø¨Ø¹[The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.]לף"; +Strings.OfficeOM.L_InvalidGrantMessage = "ï¼»FEmXGï¼½â€â€Ø£Ø¨Ø¹[Missing grant for this add-in.]לף"; +Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "ï¼»8V2vDï¼½â€â€Ø£Ø¨Ø¹[Attempting to set read-only property '{0}'.]לף"; +Strings.OfficeOM.L_EventHandlerRemovalFailed = "ï¼»CgVwOï¼½â€â€Ø£Ø¨Ø¹[Failed to remove the event handler.]לף"; Strings.OfficeOM.L_EventHandlerAdditionFailed = "ï¼»UGMIdï¼½â€â€Ø£Ø¨Ø¹[Failed to add the event handler.]לף"; -Strings.OfficeOM.L_BrowserAPINotSupported = "ï¼»w9Nwvï¼½â€â€Ø£Ø¨Ø¹[This browser does not support the requested API.]לף"; -Strings.OfficeOM.L_ElementMissing = "ï¼»vJblVï¼½â€â€Ø£Ø¨Ø¹[We couldn't format the table cell because some parameter values are missing. Double-check the parameters and try again.]לף"; -Strings.OfficeOM.L_NavOutOfBound = "ï¼»Kt5jtï¼½â€â€Ø£Ø¨Ø¹[The operation failed because the index is out of range.]לף"; -Strings.OfficeOM.L_UnsupportedUserIdentity = "ï¼»FzJ4Dï¼½â€â€Ø£Ø¨Ø¹[User identity type is not supported.]לף"; -Strings.OfficeOM.L_InvalidNode = "ï¼»gLELCï¼½â€â€Ø£Ø¨Ø¹[Invalid Node]לף" +Strings.OfficeOM.L_MemoryLimit = "ï¼»g04mAï¼½â€â€Ø£Ø¨Ø¹[Memory Limit Exceeded]לף"; +Strings.OfficeOM.L_InvalidReadForBlankRow = "ï¼»O14g9ï¼½â€â€Ø£Ø¨Ø¹[The specified row is blank.]לף"; +Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "ï¼»1GZNHï¼½â€â€Ø£Ø¨Ø¹[Operation is not supported on this binding type.]לף"; +Strings.OfficeOM.L_SettingsStaleError = "ï¼»WpB5Pï¼½â€â€Ø£Ø¨Ø¹[Settings Stale Error]לף" \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/ar-sa.pseudo/office_strings.js b/node_modules/@microsoft/office-js/dist/ar-sa.pseudo/office_strings.js index bfc32ea..45d3d20 100644 --- a/node_modules/@microsoft/office-js/dist/ar-sa.pseudo/office_strings.js +++ b/node_modules/@microsoft/office-js/dist/ar-sa.pseudo/office_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_NoCapability="ï¼»s8tihï¼½â€â€Ø£Ø¨Ø¹[You don't have sufficient permissions for this action.]לף";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="ï¼»oLNBUï¼½â€â€Ø£Ø¨Ø¹[configure your browser]לף";Strings.OfficeOM.L_TooManyOptionalObjects="ï¼»u95nHï¼½â€â€Ø£Ø¨Ø¹[multiple optional objects in parameter list]לף";Strings.OfficeOM.L_MultipleNamedItemFound="ï¼»jv5aIï¼½â€â€Ø£Ø¨Ø¹[Multiple objects with the same name were found.]לף";Strings.OfficeOM.L_DataWriteError="ï¼»Xc0RNï¼½â€â€Ø£Ø¨Ø¹[Data Write Error]לף";Strings.OfficeOM.L_InvalidOrTimedOutSession="ï¼»qvnk3ï¼½â€â€Ø£Ø¨Ø¹[Invalid Or Timed Out Session]לף";Strings.OfficeOM.L_InitializeNotReady="ï¼»DxSvUï¼½â€â€Ø£Ø¨Ø¹[Office.js has not been fully loaded yet. Please try again later or make sure to add your initialization code on the Office.initialize function.]לף";Strings.OfficeOM.L_NotImplemented="ï¼»7GO2Iï¼½â€â€Ø£Ø¨Ø¹[Function {0} is not implemented.]לף";Strings.OfficeOM.L_DialogNavigateError="ï¼»uzg7Nï¼½â€â€Ø£Ø¨Ø¹[Dialog Navigation Error]לף";Strings.OfficeOM.L_InvalidSSOAddinMessage="ï¼»aCWF7ï¼½â€â€Ø£Ø¨Ø¹[The identity API is not supported for this add-in.]לף";Strings.OfficeOM.L_GetDataIsTooLarge="ï¼»3wF2fï¼½â€â€Ø£Ø¨Ø¹[The requested data set is too large.]לף";Strings.OfficeOM.L_CloseFileBeforeRetrieve="ï¼»hjT2vï¼½â€â€Ø£Ø¨Ø¹[Call closeAsync on the current File before retrieving another.]לף";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="ï¼»Z072Kï¼½â€â€Ø£Ø¨Ø¹[Changes to property '{0}' cannot be applied through an \"object.set\" method.]לף";Strings.OfficeOM.L_InvalidBindingError="ï¼»qB3Jpï¼½â€â€Ø£Ø¨Ø¹[Invalid Binding Error]לף";Strings.OfficeOM.L_EventRegistrationError="ï¼»Kbn76ï¼½â€â€Ø£Ø¨Ø¹[Event Registration Error]לף";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="ï¼»P7IAeï¼½â€â€Ø£Ø¨Ø¹[Coordinate parameters cannot be used with coercion type Table when the table contains merged cells.]לף";Strings.OfficeOM.L_ConnectionFailureWithStatus="ï¼»Lwa49ï¼½â€â€Ø£Ø¨Ø¹[The request failed with status code of {0}.]לף";Strings.OfficeOM.L_NewWindowCrossZone="ï¼»E0xziï¼½â€â€Ø£Ø¨Ø¹[The security settings in your browser prevent us from creating a dialog box. Try a different browser, or {0} so that '{1}' and the domain shown in your address bar are in the same security zone.]לף";Strings.OfficeOM.L_InvalidGetRows="ï¼»KshdRï¼½â€â€Ø£Ø¨Ø¹[The specified rows are invalid.]לף";Strings.OfficeOM.L_InvalidSetColumns="ï¼»behcVï¼½â€â€Ø£Ø¨Ø¹[The specified columns are invalid.]לף";Strings.OfficeOM.L_InvalidDataFormat="ï¼»n3nbzï¼½â€â€Ø£Ø¨Ø¹[The format of the specified data object is invalid.]לף";Strings.OfficeOM.L_InvalidGetColumns="ï¼»gwsNBï¼½â€â€Ø£Ø¨Ø¹[The specified columns are invalid.]לף";Strings.OfficeOM.L_InvalidObjectPath='ï¼»Zg5omï¼½â€â€Ø£Ø¨Ø¹[The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.]לף';Strings.OfficeOM.L_InvalidCoercion="ï¼»cESfXï¼½â€â€Ø£Ø¨Ø¹[Invalid Coercion Type]לף";Strings.OfficeOM.L_CallbackNotAFunction="ï¼»mjEM1ï¼½â€â€Ø£Ø¨Ø¹[Callback must be of type function, was of type {0}.]לף";Strings.OfficeOM.L_SSOClientError="ï¼»n1N0Mï¼½â€â€Ø£Ø¨Ø¹[Error occurred in the authentication request from Office.]לף";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="ï¼»WLfEAï¼½â€â€Ø£Ø¨Ø¹[The identity type of the user is not supported.]לף";Strings.OfficeOM.L_DialogInvalidScheme="ï¼»bewBNï¼½â€â€Ø£Ø¨Ø¹[The URL scheme is not supported. Use HTTPS instead.]לף";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="ï¼»91S29ï¼½â€â€Ø£Ø¨Ø¹[Application {0} does not exist. Microsoft.Office.WebExtension.initialize(reason) is not called.]לף";Strings.OfficeOM.L_SetDataIsTooLarge="ï¼»pvjqCï¼½â€â€Ø£Ø¨Ø¹[The specified data object is too large.]לף";Strings.OfficeOM.L_DataNotMatchCoercionType="ï¼»bz76Dï¼½â€â€Ø£Ø¨Ø¹[The type of the specified data object is not compatible with the current selection.]לף";Strings.OfficeOM.L_InvalidValue="ï¼»E49Elï¼½â€â€Ø£Ø¨Ø¹[Invalid Value]לף";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="ï¼»7LzPbï¼½â€â€Ø£Ø¨Ø¹[XPath limits selection to 1024 items.]לף";Strings.OfficeOM.L_ColIndexOutOfRange="ï¼»uM06fï¼½â€â€Ø£Ø¨Ø¹[The column index value is out of the allowed range. Use a value (0 or higher) that's less than the number of columns.]לף";Strings.OfficeOM.L_SSOServerErrorMessage="ï¼»DT0X4ï¼½â€â€Ø£Ø¨Ø¹[An unexpected error occurred on the server.]לף";Strings.OfficeOM.L_InvalidNamedItemForBindingType="ï¼»MIUqAï¼½â€â€Ø£Ø¨Ø¹[The specified binding type is not compatible with the supplied named item.]לף";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="ï¼»8V2vDï¼½â€â€Ø£Ø¨Ø¹[Attempting to set read-only property '{0}'.]לף";Strings.OfficeOM.L_InvalidBindingOperation="ï¼»bB7Xjï¼½â€â€Ø£Ø¨Ø¹[Invalid Binding Operation]לף";Strings.OfficeOM.L_GetDataParametersConflict="ï¼»tUoF2ï¼½â€â€Ø£Ø¨Ø¹[The specified parameters conflict.]לף";Strings.OfficeOM.L_SelectionCannotBound="ï¼»zv7Clï¼½â€â€Ø£Ø¨Ø¹[Cannot bind to the current selection.]לף";Strings.OfficeOM.L_InvalidSetStartRowColumn="ï¼»Ji62Pï¼½â€â€Ø£Ø¨Ø¹[The specified startRow or startColumn values are invalid.]לף";Strings.OfficeOM.L_AppNameNotExist="ï¼»5XTUXï¼½â€â€Ø£Ø¨Ø¹[Add-in Name for {0} doesn't exist.]לף";Strings.OfficeOM.L_DocumentReadOnly="ï¼»0B9PPï¼½â€â€Ø£Ø¨Ø¹[The requested operation is not allowed on the current document mode.]לף";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="ï¼»LozuOï¼½â€â€Ø£Ø¨Ø¹[Allow]לף";Strings.OfficeOM.L_DisplayDialogError="ï¼»SSMcdï¼½â€â€Ø£Ø¨Ø¹[Display Dialog Error]לף";Strings.OfficeOM.L_NetworkProblem="ï¼»hHZXBï¼½â€â€Ø£Ø¨Ø¹[Network Problem]לף";Strings.OfficeOM.L_InvalidSetRows="ï¼»69Jdbï¼½â€â€Ø£Ø¨Ø¹[The specified rows are invalid.]לף";Strings.OfficeOM.L_InvalidCellsValue="ï¼»SN2YPï¼½â€â€Ø£Ø¨Ø¹[One or more of the cells parameters have values that aren't allowed. Double-check the values and try again.]לף";Strings.OfficeOM.L_InternalErrorDescription="ï¼»PHbpoï¼½â€â€Ø£Ø¨Ø¹[An internal error has occurred.]לף";Strings.OfficeOM.L_DialogAlreadyOpened="ï¼»0B7Smï¼½â€â€Ø£Ø¨Ø¹[The operation failed because this add-in already has an active dialog.]לף";Strings.OfficeOM.L_SpecifiedIdNotExist="ï¼»zgKaFï¼½â€â€Ø£Ø¨Ø¹[The specified ID does not exist.]לף";Strings.OfficeOM.L_TooManyOptionalFunction="ï¼»w74Tzï¼½â€â€Ø£Ø¨Ø¹[multiple optional functions in parameter list]לף";Strings.OfficeOM.L_BindingCreationError="ï¼»Ef1V2ï¼½â€â€Ø£Ø¨Ø¹[Binding Creation Error]לף";Strings.OfficeOM.L_CellDataAmountBeyondLimits="ï¼»alZIiï¼½â€â€Ø£Ø¨Ø¹[Note: The number of cells in a table is suggested to be below 20,000 cells.]לף";Strings.OfficeOM.L_UserAbortedMessage="ï¼»u0vEnï¼½â€â€Ø£Ø¨Ø¹[The user did not consent the add-in permissions.]לף";Strings.OfficeOM.L_EventHandlerRemovalFailed="ï¼»CgVwOï¼½â€â€Ø£Ø¨Ø¹[Failed to remove the event handler.]לף";Strings.OfficeOM.L_OverwriteWorksheetData="ï¼»DOAPXï¼½â€â€Ø£Ø¨Ø¹[The set operation failed because the supplied data object will overwrite or shift data.]לף";Strings.OfficeOM.L_BadSelectorString="ï¼»hw7oaï¼½â€â€Ø£Ø¨Ø¹[The string passed into the selector is improperly formatted or unsupported.]לף";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="ï¼»2JRcCï¼½â€â€Ø£Ø¨Ø¹[Note: The formatting sets set by a Formatting API call is suggested to be below 100.]לף";Strings.OfficeOM.L_UnknownBindingType="ï¼»ew2fBï¼½â€â€Ø£Ø¨Ø¹[The binding type is not supported.]לף";Strings.OfficeOM.L_ShowWindowDialogNotification="ï¼»tI0ZWï¼½â€â€Ø£Ø¨Ø¹[{0} wants to display a new window.]לף";Strings.OfficeOM.L_PermissionDenied="ï¼»pMeM6ï¼½â€â€Ø£Ø¨Ø¹[Permission Denied]לף";Strings.OfficeOM.L_UnsupportedDataObject="ï¼»hGI3vï¼½â€â€Ø£Ø¨Ø¹[The supplied data object type is not supported.]לף";Strings.OfficeOM.L_UserAborted="ï¼»2C3rHï¼½â€â€Ø£Ø¨Ø¹[User aborted the consent request.]לף";Strings.OfficeOM.L_PropertyNotLoaded="ï¼»WhYjjï¼½â€â€Ø£Ø¨Ø¹[The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.]לף";Strings.OfficeOM.L_InvalidBinding="ï¼»L8oieï¼½â€â€Ø£Ø¨Ø¹[Invalid Binding]לף";Strings.OfficeOM.L_MissingRequiredArguments="ï¼»ryfbXï¼½â€â€Ø£Ø¨Ø¹[missing some required arguments]לף";Strings.OfficeOM.L_DialogRequireHTTPS="ï¼»C4rnPï¼½â€â€Ø£Ø¨Ø¹[The HTTP protocol is not supported. Use HTTPS instead]לף";Strings.OfficeOM.L_CannotRegisterEvent="ï¼»7oStXï¼½â€â€Ø£Ø¨Ø¹[The event handler cannot be registered.]לף";Strings.OfficeOM.L_InvalidApiCallInContext="ï¼»WrlkTï¼½â€â€Ø£Ø¨Ø¹[Invalid API call in the current context.]לף";Strings.OfficeOM.L_MissingParameter="ï¼»6kQRPï¼½â€â€Ø£Ø¨Ø¹[Missing Parameter]לף";Strings.OfficeOM.L_SSOClientErrorMessage="ï¼»M4SP0ï¼½â€â€Ø£Ø¨Ø¹[An unexpected error occurred in the client.]לף";Strings.OfficeOM.L_NotSupportedEventType="ï¼»obnbJï¼½â€â€Ø£Ø¨Ø¹[The specified event type {0} is not supported.]לף";Strings.OfficeOM.L_NamedItemNotFound="ï¼»JwpG3ï¼½â€â€Ø£Ø¨Ø¹[The named item does not exist.]לף";Strings.OfficeOM.L_InvalidFormatValue="ï¼»0DFvaï¼½â€â€Ø£Ø¨Ø¹[One or more of the format parameters have values that aren't allowed. Double-check the values and try again.]לף";Strings.OfficeOM.L_OperationNotSupported="ï¼»w712qï¼½â€â€Ø£Ø¨Ø¹[The operation is not supported.]לף";Strings.OfficeOM.L_InternalError="ï¼»h7nOmï¼½â€â€Ø£Ø¨Ø¹[Internal Error]לף";Strings.OfficeOM.L_DataStale="ï¼»CPq31ï¼½â€â€Ø£Ø¨Ø¹[Data Not Current]לף";Strings.OfficeOM.L_PropertyDoesNotExist="ï¼»P3fDWï¼½â€â€Ø£Ø¨Ø¹[Property '{0}' does not exist on the object.]לף";Strings.OfficeOM.L_InvalidArgumentGeneric="ï¼»buJV5ï¼½â€â€Ø£Ø¨Ø¹[The argument(s) passed into the function don't work for this situation, are missing, or aren't in the right format.]לף";Strings.OfficeOM.L_NotSupported="ï¼»SFggQï¼½â€â€Ø£Ø¨Ø¹[Function {0} is not supported.]לף";Strings.OfficeOM.L_SetDataParametersConflict="ï¼»7TbVmï¼½â€â€Ø£Ø¨Ø¹[The specified parameters conflict.]לף";Strings.OfficeOM.L_RunMustReturnPromise='ï¼»mP1s6ï¼½â€â€Ø£Ø¨Ø¹[The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".]לף';Strings.OfficeOM.L_SaveSettingsError="ï¼»ZAA78ï¼½â€â€Ø£Ø¨Ø¹[Save Settings Error]לף";Strings.OfficeOM.L_DataReadError="ï¼»O6ydkï¼½â€â€Ø£Ø¨Ø¹[Data Read Error]לף";Strings.OfficeOM.L_FormattingReminder="ï¼»v38SSï¼½â€â€Ø£Ø¨Ø¹[Formatting Reminder]לף";Strings.OfficeOM.L_DataWriteReminder="ï¼»6x3Rlï¼½â€â€Ø£Ø¨Ø¹[Data Write Reminder]לף";Strings.OfficeOM.L_InValidOptionalArgument="ï¼»jH9Lhï¼½â€â€Ø£Ø¨Ø¹[invalid optional argument]לף";Strings.OfficeOM.L_CustomXmlOutOfDateName="ï¼»WoZSLï¼½â€â€Ø£Ø¨Ø¹[Data Not Current]לף";Strings.OfficeOM.L_TooManyIncompleteRequests="ï¼»2TC32ï¼½â€â€Ø£Ø¨Ø¹[Wait until the previous call completes.]לף";Strings.OfficeOM.L_UnsupportedEnumerationMessage="ï¼»fKjXVï¼½â€â€Ø£Ø¨Ø¹[The enumeration isn't supported in the current host application.]לף";Strings.OfficeOM.L_InvalidParameters="ï¼»KDV1qï¼½â€â€Ø£Ø¨Ø¹[Function {0} has invalid parameters.]לף";Strings.OfficeOM.L_RowIndexOutOfRange="ï¼»LTTpGï¼½â€â€Ø£Ø¨Ø¹[The row index value is out of the allowed range. Use a value (0 or higher) that's less than the number of rows.]לף";Strings.OfficeOM.L_InvalidGetRowColumnCounts="ï¼»6atwJï¼½â€â€Ø£Ø¨Ø¹[The specified rowCount or columnCount values are invalid.]לף";Strings.OfficeOM.L_UserClickIgnore="ï¼»jeIUrï¼½â€â€Ø£Ø¨Ø¹[The user chose to ignore the dialog box.]לף";Strings.OfficeOM.L_UserNotSignedIn="ï¼»1L2Trï¼½â€â€Ø£Ø¨Ø¹[No user is signed into Office.]לף";Strings.OfficeOM.L_TooManyArguments="ï¼»542tYï¼½â€â€Ø£Ø¨Ø¹[too many arguments]לף";Strings.OfficeOM.L_RequestTimeout="ï¼»idn5Sï¼½â€â€Ø£Ø¨Ø¹[The call took too long to execute.]לף";Strings.OfficeOM.L_CustomXmlExceedQuotaName="ï¼»h7F10ï¼½â€â€Ø£Ø¨Ø¹[Selection Limit Reached]לף";Strings.OfficeOM.L_InvalidResourceUrlMessage="ï¼»RrzgSï¼½â€â€Ø£Ø¨Ø¹[Invalid resource Url specified in the manifest.]לף";Strings.OfficeOM.L_CustomXmlNodeNotFound="ï¼»4BiJhï¼½â€â€Ø£Ø¨Ø¹[The specified node was not found.]לף";Strings.OfficeOM.L_HostError="ï¼»JvjsUï¼½â€â€Ø£Ø¨Ø¹[Host Error]לף";Strings.OfficeOM.L_FormatValueOutOfRange="ï¼»4djk9ï¼½â€â€Ø£Ø¨Ø¹[The value is out of the allowed range.]לף";Strings.OfficeOM.L_InvalidDataObject="ï¼»gFTdxï¼½â€â€Ø£Ø¨Ø¹[Invalid Data Object]לף";Strings.OfficeOM.L_SettingsStaleError="ï¼»WpB5Pï¼½â€â€Ø£Ø¨Ø¹[Settings Stale Error]לף";Strings.OfficeOM.L_InvalidColumnsForBinding="ï¼»FrmaYï¼½â€â€Ø£Ø¨Ø¹[The specified columns are invalid.]לף";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="ï¼»e6MqNï¼½â€â€Ø£Ø¨Ø¹[Your Office Online session has expired or is invalid. To continue, refresh the page.]לף";Strings.OfficeOM.L_DataNotMatchSelection="ï¼»B3NE5ï¼½â€â€Ø£Ø¨Ø¹[The supplied data object is not compatible with the shape or dimensions of the current selection.]לף";Strings.OfficeOM.L_RedundantCallbackSpecification="ï¼»1w72sï¼½â€â€Ø£Ø¨Ø¹[Callback cannot be specified both in argument list and in optional object.]לף";Strings.OfficeOM.L_FunctionCallFailed="ï¼»irDYbï¼½â€â€Ø£Ø¨Ø¹[Function {0} call failed, error code: {1}.]לף";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="ï¼»74Jq6ï¼½â€â€Ø£Ø¨Ø¹[Please make a selection.]לף";Strings.OfficeOM.L_DataNotMatchBindingType="ï¼»w5I7kï¼½â€â€Ø£Ø¨Ø¹[The specified data object is not compatible with the binding type.]לף";Strings.OfficeOM.L_SliceSizeNotSupported="ï¼»cO53fï¼½â€â€Ø£Ø¨Ø¹[The specified slice size is not supported.]לף";Strings.OfficeOM.L_CannotNavigateTo="ï¼»2J8roï¼½â€â€Ø£Ø¨Ø¹[The object is located in a place where navigation is not supported.]לף";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="ï¼»1GZNHï¼½â€â€Ø£Ø¨Ø¹[Operation is not supported on this binding type.]לף";Strings.OfficeOM.L_SSOServerError="ï¼»ohQDwï¼½â€â€Ø£Ø¨Ø¹[Error occurred in the authentication provider.]לף";Strings.OfficeOM.L_MemoryLimit="ï¼»g04mAï¼½â€â€Ø£Ø¨Ø¹[Memory Limit Exceeded]לף";Strings.OfficeOM.L_IndexOutOfRange="ï¼»2bW7Mï¼½â€â€Ø£Ø¨Ø¹[Index out of range.]לף";Strings.OfficeOM.L_InvalidArgument="ï¼»alUhTï¼½â€â€Ø£Ø¨Ø¹[The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.]לף";Strings.OfficeOM.L_Timeout="ï¼»8Yaznï¼½â€â€Ø£Ø¨Ø¹[The operation has timed out.]לף";Strings.OfficeOM.L_InvalidGrant="ï¼»hWgqeï¼½â€â€Ø£Ø¨Ø¹[Preauthorization missing.]לף";Strings.OfficeOM.L_OsfControlTypeNotSupported="ï¼»N1OVzï¼½â€â€Ø£Ø¨Ø¹[OsfControl type not supported.]לף";Strings.OfficeOM.L_DialogOK="ï¼»W6D5rï¼½â€â€Ø£Ø¨Ø¹[OK]לף";Strings.OfficeOM.L_CoercionTypeNotSupported="ï¼»0MWOXï¼½â€â€Ø£Ø¨Ø¹[The specified coercion type is not supported.]לף";Strings.OfficeOM.L_ValueNotLoaded='ï¼»yUa7Oï¼½â€â€Ø£Ø¨Ø¹[The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.]לף';Strings.OfficeOM.L_ReadSettingsError="ï¼»NO2AIï¼½â€â€Ø£Ø¨Ø¹[Read Settings Error]לף";Strings.OfficeOM.L_InvalidGrantMessage="ï¼»FEmXGï¼½â€â€Ø£Ø¨Ø¹[Missing grant for this add-in.]לף";Strings.OfficeOM.L_SettingsAreStale="ï¼»Pnv04ï¼½â€â€Ø£Ø¨Ø¹[Settings could not be saved because they are not current.]לף";Strings.OfficeOM.L_FileTypeNotSupported="ï¼»1kAhfï¼½â€â€Ø£Ø¨Ø¹[The specified file type is not supported.]לף";Strings.OfficeOM.L_CannotWriteToSelection="ï¼»D5d2yï¼½â€â€Ø£Ø¨Ø¹[Cannot write to the current selection.]לף";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="ï¼»hxMK6ï¼½â€â€Ø£Ø¨Ø¹[The data is out of date. Retrieve the object again.]לף";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="ï¼»eRmK1ï¼½â€â€Ø£Ø¨Ø¹[The operation failed because this add-in is already requesting an access token.]לף";Strings.OfficeOM.L_SettingNameNotExist="ï¼»jt3Ywï¼½â€â€Ø£Ø¨Ø¹[The specified setting name does not exist.]לף";Strings.OfficeOM.L_UnsupportedEnumeration="ï¼»YOCbmï¼½â€â€Ø£Ø¨Ø¹[Unsupported Enumeration]לף";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="ï¼»JBWjeï¼½â€â€Ø£Ø¨Ø¹[Coordinate parameters cannot be used with coercion type Table when the table contains merged cells.]לף";Strings.OfficeOM.L_GetSelectionNotSupported="ï¼»zo4sVï¼½â€â€Ø£Ø¨Ø¹[The current selection is not supported.]לף";Strings.OfficeOM.L_ConnectionFailureWithDetails="ï¼»y3r7Aï¼½â€â€Ø£Ø¨Ø¹[The request failed with status code of {0}, error code {1} and the following error message: {2}]לף";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="ï¼»lH0QVï¼½â€â€Ø£Ø¨Ø¹[Add-in is already requesting an access token.]לף";Strings.OfficeOM.L_ShuttingDown="ï¼»WOU0sï¼½â€â€Ø£Ø¨Ø¹[Operation failed because the data is not current on the server.]לף";Strings.OfficeOM.L_InvalidFormat="ï¼»aPhpJï¼½â€â€Ø£Ø¨Ø¹[Invalid Format Error]לף";Strings.OfficeOM.L_SettingsCannotSave="ï¼»6SC7Bï¼½â€â€Ø£Ø¨Ø¹[The settings could not be saved.]לף";Strings.OfficeOM.L_NotSupportedBindingType="ï¼»HHVb8ï¼½â€â€Ø£Ø¨Ø¹[The specified binding type {0} is not supported.]לף";Strings.OfficeOM.L_InvalidSelectionForBindingType="ï¼»hyH3Uï¼½â€â€Ø£Ø¨Ø¹[A binding cannot be created with the current selection and the specified binding type.]לף";Strings.OfficeOM.L_SelectionNotSupportCoercionType="ï¼»11oVNï¼½â€â€Ø£Ø¨Ø¹[The current selection is not compatible with the specified coercion type.]לף";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="ï¼»uhnQCï¼½â€â€Ø£Ø¨Ø¹[Selected content needs to be in table format. Format the data as a table and try again.]לף";Strings.OfficeOM.L_InvalidGetStartRowColumn="ï¼»ghnzEï¼½â€â€Ø£Ø¨Ø¹[The specified startRow or startColumn values are invalid.]לף";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="ï¼»hVPerï¼½â€â€Ø£Ø¨Ø¹[Browser restrictions prevented us from creating the dialog box. The domain of dialog box and the domain of the add-in host are not in the same security zone.]לף";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="ï¼»JWuudï¼½â€â€Ø£Ø¨Ø¹[The specified coercion type is not compatible with this binding type.]לף";Strings.OfficeOM.L_DataNotMatchBindingSize="ï¼»Zl27Rï¼½â€â€Ø£Ø¨Ø¹[The supplied data object does not match the size of the current selection.]לף";Strings.OfficeOM.L_OutOfRange="ï¼»0AgiFï¼½â€â€Ø£Ø¨Ø¹[Out of Range]לף";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="ï¼»AvQkUï¼½â€â€Ø£Ø¨Ø¹[Ignore]לף";Strings.OfficeOM.L_RequestTokenUnavailable="ï¼»JVQl2ï¼½â€â€Ø£Ø¨Ø¹[This API has been throttled to slow the call frequency.]לף";Strings.OfficeOM.L_APINotSupported="ï¼»fDdv0ï¼½â€â€Ø£Ø¨Ø¹[API Not Supported]לף";Strings.OfficeOM.L_InvalidReadForBlankRow="ï¼»O14g9ï¼½â€â€Ø£Ø¨Ø¹[The specified row is blank.]לף";Strings.OfficeOM.L_CustomXmlError="ï¼»ot553ï¼½â€â€Ø£Ø¨Ø¹[Custom XML Error.]לף";Strings.OfficeOM.L_InvalidRequestContext="ï¼»EU97Aï¼½â€â€Ø£Ø¨Ø¹[Cannot use the object across different request contexts.]לף";Strings.OfficeOM.L_InvalidTableOptionValue="ï¼»1fSevï¼½â€â€Ø£Ø¨Ø¹[One or more of the tableOptions parameters have values that aren't allowed. Double-check the values and try again.]לף";Strings.OfficeOM.L_InvalidResourceUrl="ï¼»ZwZqfï¼½â€â€Ø£Ø¨Ø¹[Invalid application resource Url provided.]לף";Strings.OfficeOM.L_BindingNotExist="ï¼»wLGkWï¼½â€â€Ø£Ø¨Ø¹[The specified binding does not exist.]לף";Strings.OfficeOM.L_DialogAddressNotTrusted="ï¼»giVvLï¼½â€â€Ø£Ø¨Ø¹[The domain of the URL is not included in the AppDomains element in the manifest.]לף";Strings.OfficeOM.L_NetworkProblemRetrieveFile="ï¼»HAmZTï¼½â€â€Ø£Ø¨Ø¹[A network problem has prevented retrieval of the file.]לף";Strings.OfficeOM.L_InvalidApiArgumentsMessage="ï¼»e70jaï¼½â€â€Ø£Ø¨Ø¹[Invalid input arguments.]לף";Strings.OfficeOM.L_APICallFailed="ï¼»b0XAiï¼½â€â€Ø£Ø¨Ø¹[API Call Failed]לף";Strings.OfficeOM.L_BindingToMultipleSelection="ï¼»b0tWLï¼½â€â€Ø£Ø¨Ø¹[Noncontiguous selections are not supported.]לף";Strings.OfficeOM.L_ActivityLimitReached="ï¼»pPfY4ï¼½â€â€Ø£Ø¨Ø¹[Activity limit has been reached.]לף";Strings.OfficeOM.L_InvalidAPICall="ï¼»QJGpqï¼½â€â€Ø£Ø¨Ø¹[Invalid API Call]לף";Strings.OfficeOM.L_EventHandlerNotExist="ï¼»QAdgxï¼½â€â€Ø£Ø¨Ø¹[The specified event handler was not found for this binding.]לף";Strings.OfficeOM.L_EventHandlerAdditionFailed="ï¼»UGMIdï¼½â€â€Ø£Ø¨Ø¹[Failed to add the event handler.]לף";Strings.OfficeOM.L_BrowserAPINotSupported="ï¼»w9Nwvï¼½â€â€Ø£Ø¨Ø¹[This browser does not support the requested API.]לף";Strings.OfficeOM.L_ElementMissing="ï¼»vJblVï¼½â€â€Ø£Ø¨Ø¹[We couldn't format the table cell because some parameter values are missing. Double-check the parameters and try again.]לף";Strings.OfficeOM.L_NavOutOfBound="ï¼»Kt5jtï¼½â€â€Ø£Ø¨Ø¹[The operation failed because the index is out of range.]לף";Strings.OfficeOM.L_UnsupportedUserIdentity="ï¼»FzJ4Dï¼½â€â€Ø£Ø¨Ø¹[User identity type is not supported.]לף";Strings.OfficeOM.L_InvalidNode="ï¼»gLELCï¼½â€â€Ø£Ø¨Ø¹[Invalid Node]לף" \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_SelectionCannotBound="ï¼»zv7Clï¼½â€â€Ø£Ø¨Ø¹[Cannot bind to the current selection.]לף";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="ï¼»7LzPbï¼½â€â€Ø£Ø¨Ø¹[XPath limits selection to 1024 items.]לף";Strings.OfficeOM.L_OverwriteWorksheetData="ï¼»DOAPXï¼½â€â€Ø£Ø¨Ø¹[The set operation failed because the supplied data object will overwrite or shift data.]לף";Strings.OfficeOM.L_TooManyOptionalFunction="ï¼»w74Tzï¼½â€â€Ø£Ø¨Ø¹[multiple optional functions in parameter list]לף";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="ï¼»eRmK1ï¼½â€â€Ø£Ø¨Ø¹[The operation failed because this add-in is already requesting an access token.]לף";Strings.OfficeOM.L_NotSupported="ï¼»SFggQï¼½â€â€Ø£Ø¨Ø¹[Function {0} is not supported.]לף";Strings.OfficeOM.L_RequestTimeout="ï¼»idn5Sï¼½â€â€Ø£Ø¨Ø¹[The call took too long to execute.]לף";Strings.OfficeOM.L_ElementMissing="ï¼»vJblVï¼½â€â€Ø£Ø¨Ø¹[We couldn't format the table cell because some parameter values are missing. Double-check the parameters and try again.]לף";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="ï¼»AvQkUï¼½â€â€Ø£Ø¨Ø¹[Ignore]לף";Strings.OfficeOM.L_ConnectionFailureWithStatus="ï¼»Lwa49ï¼½â€â€Ø£Ø¨Ø¹[The request failed with status code of {0}.]לף";Strings.OfficeOM.L_InvalidOperationInCellEditMode="ï¼»cvg0Mï¼½â€â€Ø£Ø¨Ø¹[Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.]לף";Strings.OfficeOM.L_InvalidGetRows="ï¼»KshdRï¼½â€â€Ø£Ø¨Ø¹[The specified rows are invalid.]לף";Strings.OfficeOM.L_NoCapability="ï¼»s8tihï¼½â€â€Ø£Ø¨Ø¹[You don't have sufficient permissions for this action.]לף";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="ï¼»LozuOï¼½â€â€Ø£Ø¨Ø¹[Allow]לף";Strings.OfficeOM.L_NewWindowCrossZone="ï¼»E0xziï¼½â€â€Ø£Ø¨Ø¹[The security settings in your browser prevent us from creating a dialog box. Try a different browser, or {0} so that '{1}' and the domain shown in your address bar are in the same security zone.]לף";Strings.OfficeOM.L_DialogAddressNotTrusted="ï¼»giVvLï¼½â€â€Ø£Ø¨Ø¹[The domain of the URL is not included in the AppDomains element in the manifest.]לף";Strings.OfficeOM.L_ConnectionFailureWithDetails="ï¼»y3r7Aï¼½â€â€Ø£Ø¨Ø¹[The request failed with status code of {0}, error code {1} and the following error message: {2}]לף";Strings.OfficeOM.L_UnsupportedEnumeration="ï¼»YOCbmï¼½â€â€Ø£Ø¨Ø¹[Unsupported Enumeration]לף";Strings.OfficeOM.L_RunMustReturnPromise='ï¼»mP1s6ï¼½â€â€Ø£Ø¨Ø¹[The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".]לף';Strings.OfficeOM.L_NonUniformPartialGetNotSupported="ï¼»JBWjeï¼½â€â€Ø£Ø¨Ø¹[Coordinate parameters cannot be used with coercion type Table when the table contains merged cells.]לף";Strings.OfficeOM.L_OperationNotSupported="ï¼»w712qï¼½â€â€Ø£Ø¨Ø¹[The operation is not supported.]לף";Strings.OfficeOM.L_InvalidBinding="ï¼»L8oieï¼½â€â€Ø£Ø¨Ø¹[Invalid Binding]לף";Strings.OfficeOM.L_BindingToMultipleSelection="ï¼»b0tWLï¼½â€â€Ø£Ø¨Ø¹[Noncontiguous selections are not supported.]לף";Strings.OfficeOM.L_InvalidCoercion="ï¼»cESfXï¼½â€â€Ø£Ø¨Ø¹[Invalid Coercion Type]לף";Strings.OfficeOM.L_DataReadError="ï¼»O6ydkï¼½â€â€Ø£Ø¨Ø¹[Data Read Error]לף";Strings.OfficeOM.L_DataStale="ï¼»CPq31ï¼½â€â€Ø£Ø¨Ø¹[Data Not Current]לף";Strings.OfficeOM.L_BrowserAPINotSupported="ï¼»w9Nwvï¼½â€â€Ø£Ø¨Ø¹[This browser does not support the requested API.]לף";Strings.OfficeOM.L_ShowWindowDialogNotification="ï¼»tI0ZWï¼½â€â€Ø£Ø¨Ø¹[{0} wants to display a new window.]לף";Strings.OfficeOM.L_CallbackNotAFunction="ï¼»mjEM1ï¼½â€â€Ø£Ø¨Ø¹[Callback must be of type function, was of type {0}.]לף";Strings.OfficeOM.L_CannotRegisterEvent="ï¼»7oStXï¼½â€â€Ø£Ø¨Ø¹[The event handler cannot be registered.]לף";Strings.OfficeOM.L_InvalidObjectPath='ï¼»Zg5omï¼½â€â€Ø£Ø¨Ø¹[The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.]לף';Strings.OfficeOM.L_PropertyDoesNotExist="ï¼»P3fDWï¼½â€â€Ø£Ø¨Ø¹[Property '{0}' does not exist on the object.]לף";Strings.OfficeOM.L_OutOfRange="ï¼»0AgiFï¼½â€â€Ø£Ø¨Ø¹[Out of Range]לף";Strings.OfficeOM.L_UnknownBindingType="ï¼»ew2fBï¼½â€â€Ø£Ø¨Ø¹[The binding type is not supported.]לף";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage="ï¼»dzFYyï¼½â€â€Ø£Ø¨Ø¹[The operation failed because this add-in does not support user consent in this category]לף";Strings.OfficeOM.L_NotImplemented="ï¼»7GO2Iï¼½â€â€Ø£Ø¨Ø¹[Function {0} is not implemented.]לף";Strings.OfficeOM.L_UserAborted="ï¼»2C3rHï¼½â€â€Ø£Ø¨Ø¹[User aborted the consent request.]לף";Strings.OfficeOM.L_InvalidBindingOperation="ï¼»bB7Xjï¼½â€â€Ø£Ø¨Ø¹[Invalid Binding Operation]לף";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="ï¼»hVPerï¼½â€â€Ø£Ø¨Ø¹[Browser restrictions prevented us from creating the dialog box. The domain of dialog box and the domain of the add-in host are not in the same security zone.]לף";Strings.OfficeOM.L_SSOServerError="ï¼»ohQDwï¼½â€â€Ø£Ø¨Ø¹[Error occurred in the authentication provider.]לף";Strings.OfficeOM.L_FileTypeNotSupported="ï¼»1kAhfï¼½â€â€Ø£Ø¨Ø¹[The specified file type is not supported.]לף";Strings.OfficeOM.L_SetDataParametersConflict="ï¼»7TbVmï¼½â€â€Ø£Ø¨Ø¹[The specified parameters conflict.]לף";Strings.OfficeOM.L_EventRegistrationError="ï¼»Kbn76ï¼½â€â€Ø£Ø¨Ø¹[Event Registration Error]לף";Strings.OfficeOM.L_InvalidSetRows="ï¼»69Jdbï¼½â€â€Ø£Ø¨Ø¹[The specified rows are invalid.]לף";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="ï¼»JWuudï¼½â€â€Ø£Ø¨Ø¹[The specified coercion type is not compatible with this binding type.]לף";Strings.OfficeOM.L_CustomFunctionDefinitionMissing="ï¼»WVXyyï¼½â€â€Ø£Ø¨Ø¹[A property with this name that represents the function's definition must exist on Excel.CustomFunctions.]לף";Strings.OfficeOM.L_CustomXmlExceedQuotaName="ï¼»h7F10ï¼½â€â€Ø£Ø¨Ø¹[Selection Limit Reached]לף";Strings.OfficeOM.L_UnsupportedUserIdentity="ï¼»FzJ4Dï¼½â€â€Ø£Ø¨Ø¹[User identity type is not supported.]לף";Strings.OfficeOM.L_GetSelectionNotSupported="ï¼»zo4sVï¼½â€â€Ø£Ø¨Ø¹[The current selection is not supported.]לף";Strings.OfficeOM.L_UserNotSignedIn="ï¼»1L2Trï¼½â€â€Ø£Ø¨Ø¹[No user is signed into Office.]לף";Strings.OfficeOM.L_InvalidFormatValue="ï¼»0DFvaï¼½â€â€Ø£Ø¨Ø¹[One or more of the format parameters have values that aren't allowed. Double-check the values and try again.]לף";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="ï¼»Z072Kï¼½â€â€Ø£Ø¨Ø¹[Changes to property '{0}' cannot be applied through an \"object.set\" method.]לף";Strings.OfficeOM.L_PermissionDenied="ï¼»pMeM6ï¼½â€â€Ø£Ø¨Ø¹[Permission Denied]לף";Strings.OfficeOM.L_InvalidResourceUrlMessage="ï¼»RrzgSï¼½â€â€Ø£Ø¨Ø¹[Invalid resource Url specified in the manifest.]לף";Strings.OfficeOM.L_ActivityLimitReached="ï¼»pPfY4ï¼½â€â€Ø£Ø¨Ø¹[Activity limit has been reached.]לף";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="ï¼»WLfEAï¼½â€â€Ø£Ø¨Ø¹[The identity type of the user is not supported.]לף";Strings.OfficeOM.L_CustomFunctionImplementationMissing="ï¼»DhY5mï¼½â€â€Ø£Ø¨Ø¹[The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.]לף";Strings.OfficeOM.L_InvalidArgument="ï¼»alUhTï¼½â€â€Ø£Ø¨Ø¹[The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.]לף";Strings.OfficeOM.L_DataNotMatchBindingType="ï¼»w5I7kï¼½â€â€Ø£Ø¨Ø¹[The specified data object is not compatible with the binding type.]לף";Strings.OfficeOM.L_InvalidParameters="ï¼»KDV1qï¼½â€â€Ø£Ø¨Ø¹[Function {0} has invalid parameters.]לף";Strings.OfficeOM.L_InitializeNotReady="ï¼»DxSvUï¼½â€â€Ø£Ø¨Ø¹[Office.js has not been fully loaded yet. Please try again later or make sure to add your initialization code on the Office.initialize function.]לף";Strings.OfficeOM.L_ShuttingDown="ï¼»WOU0sï¼½â€â€Ø£Ø¨Ø¹[Operation failed because the data is not current on the server.]לף";Strings.OfficeOM.L_InvalidApiArgumentsMessage="ï¼»e70jaï¼½â€â€Ø£Ø¨Ø¹[Invalid input arguments.]לף";Strings.OfficeOM.L_SSOClientErrorMessage="ï¼»M4SP0ï¼½â€â€Ø£Ø¨Ø¹[An unexpected error occurred in the client.]לף";Strings.OfficeOM.L_FunctionCallFailed="ï¼»irDYbï¼½â€â€Ø£Ø¨Ø¹[Function {0} call failed, error code: {1}.]לף";Strings.OfficeOM.L_InvalidAPICall="ï¼»QJGpqï¼½â€â€Ø£Ø¨Ø¹[Invalid API Call]לף";Strings.OfficeOM.L_RedundantCallbackSpecification="ï¼»1w72sï¼½â€â€Ø£Ø¨Ø¹[Callback cannot be specified both in argument list and in optional object.]לף";Strings.OfficeOM.L_DataNotMatchSelection="ï¼»B3NE5ï¼½â€â€Ø£Ø¨Ø¹[The supplied data object is not compatible with the shape or dimensions of the current selection.]לף";Strings.OfficeOM.L_SelectionNotSupportCoercionType="ï¼»11oVNï¼½â€â€Ø£Ø¨Ø¹[The current selection is not compatible with the specified coercion type.]לף";Strings.OfficeOM.L_DocumentReadOnly="ï¼»0B9PPï¼½â€â€Ø£Ø¨Ø¹[The requested operation is not allowed on the current document mode.]לף";Strings.OfficeOM.L_FormattingReminder="ï¼»v38SSï¼½â€â€Ø£Ø¨Ø¹[Formatting Reminder]לף";Strings.OfficeOM.L_RequestTokenUnavailable="ï¼»JVQl2ï¼½â€â€Ø£Ø¨Ø¹[This API has been throttled to slow the call frequency.]לף";Strings.OfficeOM.L_CellDataAmountBeyondLimits="ï¼»alZIiï¼½â€â€Ø£Ø¨Ø¹[Note: The number of cells in a table is suggested to be below 20,000 cells.]לף";Strings.OfficeOM.L_SpecifiedIdNotExist="ï¼»zgKaFï¼½â€â€Ø£Ø¨Ø¹[The specified ID does not exist.]לף";Strings.OfficeOM.L_DialogOK="ï¼»W6D5rï¼½â€â€Ø£Ø¨Ø¹[OK]לף";Strings.OfficeOM.L_RowIndexOutOfRange="ï¼»LTTpGï¼½â€â€Ø£Ø¨Ø¹[The row index value is out of the allowed range. Use a value (0 or higher) that's less than the number of rows.]לף";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="ï¼»2JRcCï¼½â€â€Ø£Ø¨Ø¹[Note: The formatting sets set by a Formatting API call is suggested to be below 100.]לף";Strings.OfficeOM.L_InvalidGetColumns="ï¼»gwsNBï¼½â€â€Ø£Ø¨Ø¹[The specified columns are invalid.]לף";Strings.OfficeOM.L_SSOClientError="ï¼»n1N0Mï¼½â€â€Ø£Ø¨Ø¹[Error occurred in the authentication request from Office.]לף";Strings.OfficeOM.L_CoercionTypeNotSupported="ï¼»0MWOXï¼½â€â€Ø£Ø¨Ø¹[The specified coercion type is not supported.]לף";Strings.OfficeOM.L_UserClickIgnore="ï¼»jeIUrï¼½â€â€Ø£Ø¨Ø¹[The user chose to ignore the dialog box.]לף";Strings.OfficeOM.L_AppNameNotExist="ï¼»5XTUXï¼½â€â€Ø£Ø¨Ø¹[Add-in Name for {0} doesn't exist.]לף";Strings.OfficeOM.L_InvalidCellsValue="ï¼»SN2YPï¼½â€â€Ø£Ø¨Ø¹[One or more of the cells parameters have values that aren't allowed. Double-check the values and try again.]לף";Strings.OfficeOM.L_DialogInvalidScheme="ï¼»bewBNï¼½â€â€Ø£Ø¨Ø¹[The URL scheme is not supported. Use HTTPS instead.]לף";Strings.OfficeOM.L_UserAbortedMessage="ï¼»u0vEnï¼½â€â€Ø£Ø¨Ø¹[The user did not consent the add-in permissions.]לף";Strings.OfficeOM.L_CloseFileBeforeRetrieve="ï¼»hjT2vï¼½â€â€Ø£Ø¨Ø¹[Call closeAsync on the current File before retrieving another.]לף";Strings.OfficeOM.L_TooManyArguments="ï¼»542tYï¼½â€â€Ø£Ø¨Ø¹[too many arguments]לף";Strings.OfficeOM.L_TooManyIncompleteRequests="ï¼»2TC32ï¼½â€â€Ø£Ø¨Ø¹[Wait until the previous call completes.]לף";Strings.OfficeOM.L_SettingsCannotSave="ï¼»6SC7Bï¼½â€â€Ø£Ø¨Ø¹[The settings could not be saved.]לף";Strings.OfficeOM.L_CustomXmlError="ï¼»ot553ï¼½â€â€Ø£Ø¨Ø¹[Custom XML Error.]לף";Strings.OfficeOM.L_InvalidDataObject="ï¼»gFTdxï¼½â€â€Ø£Ø¨Ø¹[Invalid Data Object]לף";Strings.OfficeOM.L_CustomFunctionNameContainsBadChars="ï¼»D57c3ï¼½â€â€Ø£Ø¨Ø¹[The function name may only contain letters, digits, underscores, and periods.]לף";Strings.OfficeOM.L_InvalidValue="ï¼»E49Elï¼½â€â€Ø£Ø¨Ø¹[Invalid Value]לף";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="ï¼»uhnQCï¼½â€â€Ø£Ø¨Ø¹[Selected content needs to be in table format. Format the data as a table and try again.]לף";Strings.OfficeOM.L_APICallFailed="ï¼»b0XAiï¼½â€â€Ø£Ø¨Ø¹[API Call Failed]לף";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory="ï¼»Mn1uWï¼½â€â€Ø£Ø¨Ø¹[This add-in does not support user consent.]לף";Strings.OfficeOM.L_InvalidBindingError="ï¼»qB3Jpï¼½â€â€Ø£Ø¨Ø¹[Invalid Binding Error]לף";Strings.OfficeOM.L_NotSupportedEventType="ï¼»obnbJï¼½â€â€Ø£Ø¨Ø¹[The specified event type {0} is not supported.]לף";Strings.OfficeOM.L_CustomFunctionNameCannotSplit="ï¼»1DC6Kï¼½â€â€Ø£Ø¨Ø¹[The function name must contain a non-empty namespace and a non-empty short name.]לף";Strings.OfficeOM.L_PropertyNotLoaded="ï¼»WhYjjï¼½â€â€Ø£Ø¨Ø¹[The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.]לף";Strings.OfficeOM.L_NetworkProblemRetrieveFile="ï¼»HAmZTï¼½â€â€Ø£Ø¨Ø¹[A network problem has prevented retrieval of the file.]לף";Strings.OfficeOM.L_DisplayDialogError="ï¼»SSMcdï¼½â€â€Ø£Ø¨Ø¹[Display Dialog Error]לף";Strings.OfficeOM.L_ReadSettingsError="ï¼»NO2AIï¼½â€â€Ø£Ø¨Ø¹[Read Settings Error]לף";Strings.OfficeOM.L_IndexOutOfRange="ï¼»2bW7Mï¼½â€â€Ø£Ø¨Ø¹[Index out of range.]לף";Strings.OfficeOM.L_InvalidSetStartRowColumn="ï¼»Ji62Pï¼½â€â€Ø£Ø¨Ø¹[The specified startRow or startColumn values are invalid.]לף";Strings.OfficeOM.L_CustomXmlNodeNotFound="ï¼»4BiJhï¼½â€â€Ø£Ø¨Ø¹[The specified node was not found.]לף";Strings.OfficeOM.L_InternalError="ï¼»h7nOmï¼½â€â€Ø£Ø¨Ø¹[Internal Error]לף";Strings.OfficeOM.L_SettingNameNotExist="ï¼»jt3Ywï¼½â€â€Ø£Ø¨Ø¹[The specified setting name does not exist.]לף";Strings.OfficeOM.L_NamedItemNotFound="ï¼»JwpG3ï¼½â€â€Ø£Ø¨Ø¹[The named item does not exist.]לף";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="ï¼»lH0QVï¼½â€â€Ø£Ø¨Ø¹[Add-in is already requesting an access token.]לף";Strings.OfficeOM.L_BindingCreationError="ï¼»Ef1V2ï¼½â€â€Ø£Ø¨Ø¹[Binding Creation Error]לף";Strings.OfficeOM.L_InvalidGetRowColumnCounts="ï¼»6atwJï¼½â€â€Ø£Ø¨Ø¹[The specified rowCount or columnCount values are invalid.]לף";Strings.OfficeOM.L_InvalidResourceUrl="ï¼»ZwZqfï¼½â€â€Ø£Ø¨Ø¹[Invalid application resource Url provided.]לף";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="ï¼»oLNBUï¼½â€â€Ø£Ø¨Ø¹[configure your browser]לף";Strings.OfficeOM.L_BindingNotExist="ï¼»wLGkWï¼½â€â€Ø£Ø¨Ø¹[The specified binding does not exist.]לף";Strings.OfficeOM.L_InvalidNode="ï¼»gLELCï¼½â€â€Ø£Ø¨Ø¹[Invalid Node]לף";Strings.OfficeOM.L_DialogRequireHTTPS="ï¼»C4rnPï¼½â€â€Ø£Ø¨Ø¹[The HTTP protocol is not supported. Use HTTPS instead]לף";Strings.OfficeOM.L_InternalErrorDescription="ï¼»PHbpoï¼½â€â€Ø£Ø¨Ø¹[An internal error has occurred.]לף";Strings.OfficeOM.L_InvalidApiCallInContext="ï¼»WrlkTï¼½â€â€Ø£Ø¨Ø¹[Invalid API call in the current context.]לף";Strings.OfficeOM.L_SliceSizeNotSupported="ï¼»cO53fï¼½â€â€Ø£Ø¨Ø¹[The specified slice size is not supported.]לף";Strings.OfficeOM.L_OsfControlTypeNotSupported="ï¼»N1OVzï¼½â€â€Ø£Ø¨Ø¹[OsfControl type not supported.]לף";Strings.OfficeOM.L_DataWriteReminder="ï¼»6x3Rlï¼½â€â€Ø£Ø¨Ø¹[Data Write Reminder]לף";Strings.OfficeOM.L_InvalidTableOptionValue="ï¼»1fSevï¼½â€â€Ø£Ø¨Ø¹[One or more of the tableOptions parameters have values that aren't allowed. Double-check the values and try again.]לף";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="ï¼»hxMK6ï¼½â€â€Ø£Ø¨Ø¹[The data is out of date. Retrieve the object again.]לף";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="ï¼»e6MqNï¼½â€â€Ø£Ø¨Ø¹[Your Office Online session has expired or is invalid. To continue, refresh the page.]לף";Strings.OfficeOM.L_GetDataParametersConflict="ï¼»tUoF2ï¼½â€â€Ø£Ø¨Ø¹[The specified parameters conflict.]לף";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="ï¼»P7IAeï¼½â€â€Ø£Ø¨Ø¹[Coordinate parameters cannot be used with coercion type Table when the table contains merged cells.]לף";Strings.OfficeOM.L_InvalidGetStartRowColumn="ï¼»ghnzEï¼½â€â€Ø£Ø¨Ø¹[The specified startRow or startColumn values are invalid.]לף";Strings.OfficeOM.L_InValidOptionalArgument="ï¼»jH9Lhï¼½â€â€Ø£Ø¨Ø¹[invalid optional argument]לף";Strings.OfficeOM.L_MissingParameter="ï¼»6kQRPï¼½â€â€Ø£Ø¨Ø¹[Missing Parameter]לף";Strings.OfficeOM.L_InvalidOrTimedOutSession="ï¼»qvnk3ï¼½â€â€Ø£Ø¨Ø¹[Invalid Or Timed Out Session]לף";Strings.OfficeOM.L_MultipleNamedItemFound="ï¼»jv5aIï¼½â€â€Ø£Ø¨Ø¹[Multiple objects with the same name were found.]לף";Strings.OfficeOM.L_CannotWriteToSelection="ï¼»D5d2yï¼½â€â€Ø£Ø¨Ø¹[Cannot write to the current selection.]לף";Strings.OfficeOM.L_SSOConnectionLostError="ï¼»GNT1cï¼½â€â€Ø£Ø¨Ø¹[A connection was lost during the sign in process.]לף";Strings.OfficeOM.L_TooManyOptionalObjects="ï¼»u95nHï¼½â€â€Ø£Ø¨Ø¹[multiple optional objects in parameter list]לף";Strings.OfficeOM.L_InvalidSelectionForBindingType="ï¼»hyH3Uï¼½â€â€Ø£Ø¨Ø¹[A binding cannot be created with the current selection and the specified binding type.]לף";Strings.OfficeOM.L_InvalidRequestContext="ï¼»EU97Aï¼½â€â€Ø£Ø¨Ø¹[Cannot use the object across different request contexts.]לף";Strings.OfficeOM.L_InvalidArgumentGeneric="ï¼»buJV5ï¼½â€â€Ø£Ø¨Ø¹[The argument(s) passed into the function don't work for this situation, are missing, or aren't in the right format.]לף";Strings.OfficeOM.L_DataWriteError="ï¼»Xc0RNï¼½â€â€Ø£Ø¨Ø¹[Data Write Error]לף";Strings.OfficeOM.L_Timeout="ï¼»8Yaznï¼½â€â€Ø£Ø¨Ø¹[The operation has timed out.]לף";Strings.OfficeOM.L_NavOutOfBound="ï¼»Kt5jtï¼½â€â€Ø£Ø¨Ø¹[The operation failed because the index is out of range.]לף";Strings.OfficeOM.L_UnsupportedDataObject="ï¼»hGI3vï¼½â€â€Ø£Ø¨Ø¹[The supplied data object type is not supported.]לף";Strings.OfficeOM.L_ColIndexOutOfRange="ï¼»uM06fï¼½â€â€Ø£Ø¨Ø¹[The column index value is out of the allowed range. Use a value (0 or higher) that's less than the number of columns.]לף";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="ï¼»74Jq6ï¼½â€â€Ø£Ø¨Ø¹[Please make a selection.]לף";Strings.OfficeOM.L_SetDataIsTooLarge="ï¼»pvjqCï¼½â€â€Ø£Ø¨Ø¹[The specified data object is too large.]לף";Strings.OfficeOM.L_InvalidFormat="ï¼»aPhpJï¼½â€â€Ø£Ø¨Ø¹[Invalid Format Error]לף";Strings.OfficeOM.L_InvalidSSOAddinMessage="ï¼»aCWF7ï¼½â€â€Ø£Ø¨Ø¹[The identity API is not supported for this add-in.]לף";Strings.OfficeOM.L_UnsupportedEnumerationMessage="ï¼»fKjXVï¼½â€â€Ø£Ø¨Ø¹[The enumeration isn't supported in the current host application.]לף";Strings.OfficeOM.L_InvalidDataFormat="ï¼»n3nbzï¼½â€â€Ø£Ø¨Ø¹[The format of the specified data object is invalid.]לף";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="ï¼»91S29ï¼½â€â€Ø£Ø¨Ø¹[Application {0} does not exist. Microsoft.Office.WebExtension.initialize(reason) is not called.]לף";Strings.OfficeOM.L_BadSelectorString="ï¼»hw7oaï¼½â€â€Ø£Ø¨Ø¹[The string passed into the selector is improperly formatted or unsupported.]לף";Strings.OfficeOM.L_CustomXmlOutOfDateName="ï¼»WoZSLï¼½â€â€Ø£Ø¨Ø¹[Data Not Current]לף";Strings.OfficeOM.L_CannotNavigateTo="ï¼»2J8roï¼½â€â€Ø£Ø¨Ø¹[The object is located in a place where navigation is not supported.]לף";Strings.OfficeOM.L_InvalidColumnsForBinding="ï¼»FrmaYï¼½â€â€Ø£Ø¨Ø¹[The specified columns are invalid.]לף";Strings.OfficeOM.L_InvalidSetColumns="ï¼»behcVï¼½â€â€Ø£Ø¨Ø¹[The specified columns are invalid.]לף";Strings.OfficeOM.L_DataNotMatchCoercionType="ï¼»bz76Dï¼½â€â€Ø£Ø¨Ø¹[The type of the specified data object is not compatible with the current selection.]לף";Strings.OfficeOM.L_InvalidNamedItemForBindingType="ï¼»MIUqAï¼½â€â€Ø£Ø¨Ø¹[The specified binding type is not compatible with the supplied named item.]לף";Strings.OfficeOM.L_SSOServerErrorMessage="ï¼»DT0X4ï¼½â€â€Ø£Ø¨Ø¹[An unexpected error occurred on the server.]לף";Strings.OfficeOM.L_SaveSettingsError="ï¼»ZAA78ï¼½â€â€Ø£Ø¨Ø¹[Save Settings Error]לף";Strings.OfficeOM.L_HostError="ï¼»JvjsUï¼½â€â€Ø£Ø¨Ø¹[Host Error]לף";Strings.OfficeOM.L_ValueNotLoaded='ï¼»yUa7Oï¼½â€â€Ø£Ø¨Ø¹[The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.]לף';Strings.OfficeOM.L_DataNotMatchBindingSize="ï¼»Zl27Rï¼½â€â€Ø£Ø¨Ø¹[The supplied data object does not match the size of the current selection.]לף";Strings.OfficeOM.L_FormatValueOutOfRange="ï¼»4djk9ï¼½â€â€Ø£Ø¨Ø¹[The value is out of the allowed range.]לף";Strings.OfficeOM.L_NetworkProblem="ï¼»hHZXBï¼½â€â€Ø£Ø¨Ø¹[Network Problem]לף";Strings.OfficeOM.L_NotSupportedBindingType="ï¼»HHVb8ï¼½â€â€Ø£Ø¨Ø¹[The specified binding type {0} is not supported.]לף";Strings.OfficeOM.L_EventHandlerNotExist="ï¼»QAdgxï¼½â€â€Ø£Ø¨Ø¹[The specified event handler was not found for this binding.]לף";Strings.OfficeOM.L_GetDataIsTooLarge="ï¼»3wF2fï¼½â€â€Ø£Ø¨Ø¹[The requested data set is too large.]לף";Strings.OfficeOM.L_DialogAlreadyOpened="ï¼»0B7Smï¼½â€â€Ø£Ø¨Ø¹[The operation failed because this add-in already has an active dialog.]לף";Strings.OfficeOM.L_SSOConnectionLostErrorMessage="ï¼»bEwSlï¼½â€â€Ø£Ø¨Ø¹[A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones.]לף";Strings.OfficeOM.L_SettingsAreStale="ï¼»Pnv04ï¼½â€â€Ø£Ø¨Ø¹[Settings could not be saved because they are not current.]לף";Strings.OfficeOM.L_APINotSupported="ï¼»fDdv0ï¼½â€â€Ø£Ø¨Ø¹[API Not Supported]לף";Strings.OfficeOM.L_DialogNavigateError="ï¼»uzg7Nï¼½â€â€Ø£Ø¨Ø¹[Dialog Navigation Error]לף";Strings.OfficeOM.L_MissingRequiredArguments="ï¼»ryfbXï¼½â€â€Ø£Ø¨Ø¹[missing some required arguments]לף";Strings.OfficeOM.L_InvalidGrant="ï¼»hWgqeï¼½â€â€Ø£Ø¨Ø¹[Preauthorization missing.]לף";Strings.OfficeOM.L_ApiNotFoundDetails="ï¼»iU4jDï¼½â€â€Ø£Ø¨Ø¹[The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.]לף";Strings.OfficeOM.L_InvalidGrantMessage="ï¼»FEmXGï¼½â€â€Ø£Ø¨Ø¹[Missing grant for this add-in.]לף";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="ï¼»8V2vDï¼½â€â€Ø£Ø¨Ø¹[Attempting to set read-only property '{0}'.]לף";Strings.OfficeOM.L_EventHandlerRemovalFailed="ï¼»CgVwOï¼½â€â€Ø£Ø¨Ø¹[Failed to remove the event handler.]לף";Strings.OfficeOM.L_EventHandlerAdditionFailed="ï¼»UGMIdï¼½â€â€Ø£Ø¨Ø¹[Failed to add the event handler.]לף";Strings.OfficeOM.L_MemoryLimit="ï¼»g04mAï¼½â€â€Ø£Ø¨Ø¹[Memory Limit Exceeded]לף";Strings.OfficeOM.L_InvalidReadForBlankRow="ï¼»O14g9ï¼½â€â€Ø£Ø¨Ø¹[The specified row is blank.]לף";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="ï¼»1GZNHï¼½â€â€Ø£Ø¨Ø¹[Operation is not supported on this binding type.]לף";Strings.OfficeOM.L_SettingsStaleError="ï¼»WpB5Pï¼½â€â€Ø£Ø¨Ø¹[Settings Stale Error]לף" \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/ar-sa.pseudo/outlook_strings.debug.js b/node_modules/@microsoft/office-js/dist/ar-sa.pseudo/outlook_strings.debug.js index b0ce60c..7b121b0 100644 --- a/node_modules/@microsoft/office-js/dist/ar-sa.pseudo/outlook_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/ar-sa.pseudo/outlook_strings.debug.js @@ -1,34 +1,35 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("_u"); _u.ExtensibilityStrings = function() { }; _u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings"); -_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "ï¼»GUfK9ï¼½â€â€Ø£Ø¨Ø¹[No valid recipients were provided.]לף"; -_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "ï¼»zpupzï¼½â€â€Ø£Ø¨Ø¹[The total number of recipients in the field can't exceed {0}.]לף"; -_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "ï¼»vpN0mï¼½â€â€Ø£Ø¨Ø¹[Elevated permission is required to call the method: '{0}'.]לף"; -_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "ï¼»X5aECï¼½â€â€Ø£Ø¨Ø¹[The given parameters do not match the expected format.]לף"; -_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "ï¼»D63AUï¼½â€â€Ø£Ø¨Ø¹[The attachment cannot be added because it is too big.]לף"; -_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "ï¼»PlGmAï¼½â€â€Ø£Ø¨Ø¹[One or more of the display names provided is too long.]לף"; +_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "ï¼»hnh2Dï¼½â€â€Ø£Ø¨Ø¹[Attachments cannot be added while the full reply or forward is being retrieved from the server.]לף"; +_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "ï¼»uboanï¼½â€â€Ø£Ø¨Ø¹[The request exceeds the 1 MB size limit. Please modify your EWS request.]לף"; +_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "ï¼»PjcFcï¼½â€â€Ø£Ø¨Ø¹[The user changed the position of the cursor while the data was being inserted.]לף"; +_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "ï¼»PKXEOï¼½â€â€Ø£Ø¨Ø¹[Attachments cannot be added because the message already has the maximum number of attachments]לף"; _u.ExtensibilityStrings.l_OffsetNotfound_Text = "ï¼»7Oysvï¼½â€â€Ø£Ø¨Ø¹[An offset for this time stamp couldn't be found.]לף"; +_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "ï¼»vpN0mï¼½â€â€Ø£Ø¨Ø¹[Elevated permission is required to call the method: '{0}'.]לף"; +_u.ExtensibilityStrings.l_InvalidEndTime_Text = "ï¼»Ds0l1ï¼½â€â€Ø£Ø¨Ø¹[The end time cannot be before the start time.]לף"; _u.ExtensibilityStrings.l_InternalProtocolError_Text = "ï¼»DZrmoï¼½â€â€Ø£Ø¨Ø¹[Internal protocol error: '{0}'.]לף"; -_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "ï¼»39s5Kï¼½â€â€Ø£Ø¨Ø¹[The attachment ID was invalid.]לף"; -_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "ï¼»PKXEOï¼½â€â€Ø£Ø¨Ø¹[Attachments cannot be added because the message already has the maximum number of attachments]לף"; -_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "ï¼»0gPAlï¼½â€â€Ø£Ø¨Ø¹[The attachment cannot be added to the item.]לף"; -_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "ï¼»h0ho0ï¼½â€â€Ø£Ø¨Ø¹[The attachment cannot be deleted from the item.]לף"; +_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "ï¼»D63AUï¼½â€â€Ø£Ø¨Ø¹[The attachment cannot be added because it is too big.]לף"; _u.ExtensibilityStrings.l_InternalFormatError_Text = "ï¼»ex0FMï¼½â€â€Ø£Ø¨Ø¹[There was an internal format error.]לף"; +_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "ï¼»e6S9wï¼½â€â€Ø£Ø¨Ø¹[Attachment Error]לף"; +_u.ExtensibilityStrings.l_InvalidDate_Text = "ï¼»DzuqPï¼½â€â€Ø£Ø¨Ø¹[The input doesn't resolve to a valid date.]לף"; +_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "ï¼»39s5Kï¼½â€â€Ø£Ø¨Ø¹[The attachment ID was invalid.]לף"; _u.ExtensibilityStrings.l_InvalidEventDates_Text = "ï¼»QOLgIï¼½â€â€Ø£Ø¨Ø¹[The end date occurs before the start date.]לף"; -_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "ï¼»1o9wQï¼½â€â€Ø£Ø¨Ø¹[The HTML santization has failed.]לף"; +_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "ï¼»zpupzï¼½â€â€Ø£Ø¨Ø¹[The total number of recipients in the field can't exceed {0}.]לף"; +_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "ï¼»X5aECï¼½â€â€Ø£Ø¨Ø¹[The given parameters do not match the expected format.]לף"; _u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "ï¼»dLsV2ï¼½â€â€Ø£Ø¨Ø¹[The attachment cannot be deleted because attachment with the attachment index cannot be found.]לף"; -_u.ExtensibilityStrings.l_InvalidEndTime_Text = "ï¼»Ds0l1ï¼½â€â€Ø£Ø¨Ø¹[The end time cannot be before the start time.]לף"; _u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "ï¼»O3YaNï¼½â€â€Ø£Ø¨Ø¹[Elevated permission is required to access protected members of the JavaScript API for Office.]לף"; -_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "ï¼»uboanï¼½â€â€Ø£Ø¨Ø¹[The request exceeds the 1 MB size limit. Please modify your EWS request.]לף"; -_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "ï¼»e6S9wï¼½â€â€Ø£Ø¨Ø¹[Attachment Error]לף"; -_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "ï¼»PjcFcï¼½â€â€Ø£Ø¨Ø¹[The user changed the position of the cursor while the data was being inserted.]לף"; _u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "ï¼»LwH7zï¼½â€â€Ø£Ø¨Ø¹[One or more of the email addresses provided is too long.]לף"; -_u.ExtensibilityStrings.l_InvalidDate_Text = "ï¼»DzuqPï¼½â€â€Ø£Ø¨Ø¹[The input doesn't resolve to a valid date.]לף"; -_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "ï¼»9bYDVï¼½â€â€Ø£Ø¨Ø¹[The user removed the attachment before upload has completed.]לף"; -_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "ï¼»hnh2Dï¼½â€â€Ø£Ø¨Ø¹[Attachments cannot be added while the full reply or forward is being retrieved from the server.]לף"; +_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "ï¼»h0ho0ï¼½â€â€Ø£Ø¨Ø¹[The attachment cannot be deleted from the item.]לף"; +_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "ï¼»xgx03ï¼½â€â€Ø£Ø¨Ø¹[Data Write Error]לף"; +_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "ï¼»0gPAlï¼½â€â€Ø£Ø¨Ø¹[The attachment cannot be added to the item.]לף"; +_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "ï¼»PlGmAï¼½â€â€Ø£Ø¨Ø¹[One or more of the display names provided is too long.]לף"; _u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "ï¼»aFLzeï¼½â€â€Ø£Ø¨Ø¹[The selected item has been changed.]לף"; _u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "ï¼»tMziEï¼½â€â€Ø£Ø¨Ø¹[The attachment path was invalid.]לף"; -_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "ï¼»xgx03ï¼½â€â€Ø£Ø¨Ø¹[Data Write Error]לף" +_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "ï¼»GUfK9ï¼½â€â€Ø£Ø¨Ø¹[No valid recipients were provided.]לף"; +_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "ï¼»9bYDVï¼½â€â€Ø£Ø¨Ø¹[The user removed the attachment before upload has completed.]לף"; +_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "ï¼»1o9wQï¼½â€â€Ø£Ø¨Ø¹[The HTML santization has failed.]לף" \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/ar-sa.pseudo/outlook_strings.js b/node_modules/@microsoft/office-js/dist/ar-sa.pseudo/outlook_strings.js index 9e83c7e..aea4c11 100644 --- a/node_modules/@microsoft/office-js/dist/ar-sa.pseudo/outlook_strings.js +++ b/node_modules/@microsoft/office-js/dist/ar-sa.pseudo/outlook_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="ï¼»GUfK9ï¼½â€â€Ø£Ø¨Ø¹[No valid recipients were provided.]לף";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="ï¼»zpupzï¼½â€â€Ø£Ø¨Ø¹[The total number of recipients in the field can't exceed {0}.]לף";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="ï¼»vpN0mï¼½â€â€Ø£Ø¨Ø¹[Elevated permission is required to call the method: '{0}'.]לף";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="ï¼»X5aECï¼½â€â€Ø£Ø¨Ø¹[The given parameters do not match the expected format.]לף";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="ï¼»D63AUï¼½â€â€Ø£Ø¨Ø¹[The attachment cannot be added because it is too big.]לף";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="ï¼»PlGmAï¼½â€â€Ø£Ø¨Ø¹[One or more of the display names provided is too long.]לף";_u.ExtensibilityStrings.l_OffsetNotfound_Text="ï¼»7Oysvï¼½â€â€Ø£Ø¨Ø¹[An offset for this time stamp couldn't be found.]לף";_u.ExtensibilityStrings.l_InternalProtocolError_Text="ï¼»DZrmoï¼½â€â€Ø£Ø¨Ø¹[Internal protocol error: '{0}'.]לף";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="ï¼»39s5Kï¼½â€â€Ø£Ø¨Ø¹[The attachment ID was invalid.]לף";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="ï¼»PKXEOï¼½â€â€Ø£Ø¨Ø¹[Attachments cannot be added because the message already has the maximum number of attachments]לף";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="ï¼»0gPAlï¼½â€â€Ø£Ø¨Ø¹[The attachment cannot be added to the item.]לף";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="ï¼»h0ho0ï¼½â€â€Ø£Ø¨Ø¹[The attachment cannot be deleted from the item.]לף";_u.ExtensibilityStrings.l_InternalFormatError_Text="ï¼»ex0FMï¼½â€â€Ø£Ø¨Ø¹[There was an internal format error.]לף";_u.ExtensibilityStrings.l_InvalidEventDates_Text="ï¼»QOLgIï¼½â€â€Ø£Ø¨Ø¹[The end date occurs before the start date.]לף";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="ï¼»1o9wQï¼½â€â€Ø£Ø¨Ø¹[The HTML santization has failed.]לף";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="ï¼»dLsV2ï¼½â€â€Ø£Ø¨Ø¹[The attachment cannot be deleted because attachment with the attachment index cannot be found.]לף";_u.ExtensibilityStrings.l_InvalidEndTime_Text="ï¼»Ds0l1ï¼½â€â€Ø£Ø¨Ø¹[The end time cannot be before the start time.]לף";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="ï¼»O3YaNï¼½â€â€Ø£Ø¨Ø¹[Elevated permission is required to access protected members of the JavaScript API for Office.]לף";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="ï¼»uboanï¼½â€â€Ø£Ø¨Ø¹[The request exceeds the 1 MB size limit. Please modify your EWS request.]לף";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="ï¼»e6S9wï¼½â€â€Ø£Ø¨Ø¹[Attachment Error]לף";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="ï¼»PjcFcï¼½â€â€Ø£Ø¨Ø¹[The user changed the position of the cursor while the data was being inserted.]לף";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="ï¼»LwH7zï¼½â€â€Ø£Ø¨Ø¹[One or more of the email addresses provided is too long.]לף";_u.ExtensibilityStrings.l_InvalidDate_Text="ï¼»DzuqPï¼½â€â€Ø£Ø¨Ø¹[The input doesn't resolve to a valid date.]לף";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="ï¼»9bYDVï¼½â€â€Ø£Ø¨Ø¹[The user removed the attachment before upload has completed.]לף";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="ï¼»hnh2Dï¼½â€â€Ø£Ø¨Ø¹[Attachments cannot be added while the full reply or forward is being retrieved from the server.]לף";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="ï¼»aFLzeï¼½â€â€Ø£Ø¨Ø¹[The selected item has been changed.]לף";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="ï¼»tMziEï¼½â€â€Ø£Ø¨Ø¹[The attachment path was invalid.]לף";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="ï¼»xgx03ï¼½â€â€Ø£Ø¨Ø¹[Data Write Error]לף" \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="ï¼»hnh2Dï¼½â€â€Ø£Ø¨Ø¹[Attachments cannot be added while the full reply or forward is being retrieved from the server.]לף";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="ï¼»uboanï¼½â€â€Ø£Ø¨Ø¹[The request exceeds the 1 MB size limit. Please modify your EWS request.]לף";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="ï¼»PjcFcï¼½â€â€Ø£Ø¨Ø¹[The user changed the position of the cursor while the data was being inserted.]לף";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="ï¼»PKXEOï¼½â€â€Ø£Ø¨Ø¹[Attachments cannot be added because the message already has the maximum number of attachments]לף";_u.ExtensibilityStrings.l_OffsetNotfound_Text="ï¼»7Oysvï¼½â€â€Ø£Ø¨Ø¹[An offset for this time stamp couldn't be found.]לף";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="ï¼»vpN0mï¼½â€â€Ø£Ø¨Ø¹[Elevated permission is required to call the method: '{0}'.]לף";_u.ExtensibilityStrings.l_InvalidEndTime_Text="ï¼»Ds0l1ï¼½â€â€Ø£Ø¨Ø¹[The end time cannot be before the start time.]לף";_u.ExtensibilityStrings.l_InternalProtocolError_Text="ï¼»DZrmoï¼½â€â€Ø£Ø¨Ø¹[Internal protocol error: '{0}'.]לף";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="ï¼»D63AUï¼½â€â€Ø£Ø¨Ø¹[The attachment cannot be added because it is too big.]לף";_u.ExtensibilityStrings.l_InternalFormatError_Text="ï¼»ex0FMï¼½â€â€Ø£Ø¨Ø¹[There was an internal format error.]לף";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="ï¼»e6S9wï¼½â€â€Ø£Ø¨Ø¹[Attachment Error]לף";_u.ExtensibilityStrings.l_InvalidDate_Text="ï¼»DzuqPï¼½â€â€Ø£Ø¨Ø¹[The input doesn't resolve to a valid date.]לף";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="ï¼»39s5Kï¼½â€â€Ø£Ø¨Ø¹[The attachment ID was invalid.]לף";_u.ExtensibilityStrings.l_InvalidEventDates_Text="ï¼»QOLgIï¼½â€â€Ø£Ø¨Ø¹[The end date occurs before the start date.]לף";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="ï¼»zpupzï¼½â€â€Ø£Ø¨Ø¹[The total number of recipients in the field can't exceed {0}.]לף";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="ï¼»X5aECï¼½â€â€Ø£Ø¨Ø¹[The given parameters do not match the expected format.]לף";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="ï¼»dLsV2ï¼½â€â€Ø£Ø¨Ø¹[The attachment cannot be deleted because attachment with the attachment index cannot be found.]לף";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="ï¼»O3YaNï¼½â€â€Ø£Ø¨Ø¹[Elevated permission is required to access protected members of the JavaScript API for Office.]לף";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="ï¼»LwH7zï¼½â€â€Ø£Ø¨Ø¹[One or more of the email addresses provided is too long.]לף";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="ï¼»h0ho0ï¼½â€â€Ø£Ø¨Ø¹[The attachment cannot be deleted from the item.]לף";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="ï¼»xgx03ï¼½â€â€Ø£Ø¨Ø¹[Data Write Error]לף";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="ï¼»0gPAlï¼½â€â€Ø£Ø¨Ø¹[The attachment cannot be added to the item.]לף";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="ï¼»PlGmAï¼½â€â€Ø£Ø¨Ø¹[One or more of the display names provided is too long.]לף";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="ï¼»aFLzeï¼½â€â€Ø£Ø¨Ø¹[The selected item has been changed.]לף";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="ï¼»tMziEï¼½â€â€Ø£Ø¨Ø¹[The attachment path was invalid.]לף";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="ï¼»GUfK9ï¼½â€â€Ø£Ø¨Ø¹[No valid recipients were provided.]לף";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="ï¼»9bYDVï¼½â€â€Ø£Ø¨Ø¹[The user removed the attachment before upload has completed.]לף";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="ï¼»1o9wQï¼½â€â€Ø£Ø¨Ø¹[The HTML santization has failed.]לף" \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/ar-sa/office_strings.debug.js b/node_modules/@microsoft/office-js/dist/ar-sa/office_strings.debug.js index b8c458e..acd2b64 100644 --- a/node_modules/@microsoft/office-js/dist/ar-sa/office_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/ar-sa/office_strings.debug.js @@ -1,179 +1,190 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("Strings"); Strings.OfficeOM = function() { }; Strings.OfficeOM.registerClass("Strings.OfficeOM"); +Strings.OfficeOM.L_SSOClientErrorMessage = "حدث خطأ غير متوقع ÙÙŠ العميل."; +Strings.OfficeOM.L_MissingRequiredArguments = "Ùقدان بعض الوسيطات المطلوبة"; +Strings.OfficeOM.L_BadSelectorString = "لم يتم تنسيق السلسة التي تم تمريرها إلى المحدد بشكل سليم أو أنها غير معتمدة."; +Strings.OfficeOM.L_InvalidGetRows = "الصÙو٠المحددة غير صالحة."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "تتطلب الوظيÙØ© الإضاÙية بالÙعل رمزاً مميزاً للوصول."; +Strings.OfficeOM.L_ColIndexOutOfRange = "إن قيمة Ùهرس العمود خارج النطاق المسموح به. استخدم قيمة (0 أو أعلى) تكون أصغر من عدد الأعمدة."; +Strings.OfficeOM.L_NotImplemented = "لم يتم تنÙيذ الدالة {0}."; +Strings.OfficeOM.L_InvalidColumnsForBinding = "الأعمدة المحددة غير صالحة."; +Strings.OfficeOM.L_InvalidFormatValue = "تحتوي معلمة واحدة أو أكثر من معلمات التنسيق على قيم غير مسموح بها. تحقق من القيم مرة أخرى ثم أعد المحاولة."; +Strings.OfficeOM.L_InvalidBindingError = "خطأ الربط غير صالح"; +Strings.OfficeOM.L_Timeout = "انقضت مهلة العملية."; +Strings.OfficeOM.L_ShuttingDown = "Ùشلت العملية لأن البيانات غير حديثة على الخادم."; +Strings.OfficeOM.L_CustomFunctionNameCannotSplit = "يجب أن يحتوي اسم الدالة على مساحة اسم غير Ùارغة واسم قصير غير Ùارغ."; +Strings.OfficeOM.L_SettingsCannotSave = "تعذر Ø­Ùظ الإعدادات."; +Strings.OfficeOM.L_InvalidBinding = "الربط غير صالح"; +Strings.OfficeOM.L_InvalidArgument = 'الوسيطة "{0}" لا تعمل لهذه الحالة أو Ù…Ùقودة أو ليست بتنسيق صحيح.'; +Strings.OfficeOM.L_BindingToMultipleSelection = "لا يتم اعتماد التحديدات المتقطعة."; +Strings.OfficeOM.L_DialogNavigateError = "خطأ ÙÙŠ التنقل ÙÙŠ مربع الحوار"; +Strings.OfficeOM.L_InvalidFormat = "خطأ تنسيق غير صالح"; Strings.OfficeOM.L_GetSelectionNotSupported = "التحديد الحالي غير معتمد."; +Strings.OfficeOM.L_DialogAddressNotTrusted = "لم يتم تضمين مجال عنوان URL ÙÙŠ عنصر AppDomains ÙÙŠ البيان."; +Strings.OfficeOM.L_MultipleNamedItemFound = "تم العثور على عدة عناصر بالاسم Ù†Ùسه."; +Strings.OfficeOM.L_PropertyNotLoaded = "الخاصية '{0}' غير متاحة. قبل قراءة قيمة الخاصية، قم باستدعاء أسلوب التحميل على العنصر المضمن وقم باستدعاء \"context.sync()‎\" ÙÙŠ سياق الطلب المقترن."; +Strings.OfficeOM.L_FormatValueOutOfRange = "إن القيمة خارج النطاق المسموح به."; +Strings.OfficeOM.L_APINotSupported = "API غير معتمدة"; +Strings.OfficeOM.L_DialogInvalidScheme = "نظام عنوان URL غير مدعوم. استخدم HTTPS بدلاً من ذلك."; +Strings.OfficeOM.L_UserClickIgnore = "اختار المستخدم تجاهل مربع الحوار."; +Strings.OfficeOM.L_InvalidBindingOperation = "عملية الربط غير صالحة"; +Strings.OfficeOM.L_UnsupportedEnumerationMessage = "قائمة التعداد غير معتمدة ÙÙŠ تطبيق المضي٠الحالي."; +Strings.OfficeOM.L_NamedItemNotFound = "العنصر المسمى غير موجود."; +Strings.OfficeOM.L_CannotRegisterEvent = "تعذر تسجيل معالج الأحداث."; +Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "تحدد XPath التحديد إلى 1024 عنصراً."; +Strings.OfficeOM.L_CustomXmlExceedQuotaName = "تم الوصول إلى الحد الأقصى للتحديد"; Strings.OfficeOM.L_InvalidGrant = "لم يتم منح التÙويض المسبق."; -Strings.OfficeOM.L_RequestTimeout = "استغرقت المكالمة وقتاً طويلاً وبالتالي يتعذر تنÙيذها."; -Strings.OfficeOM.L_BindingCreationError = "خطأ ÙÙŠ إنشاء الربط"; -Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "محاولة تعيين خاصية '{0}' للقراءة Ùقط."; -Strings.OfficeOM.L_InvalidApiCallInContext = "استدعاء API غير صالح ÙÙŠ السياق الحالي."; -Strings.OfficeOM.L_SetDataIsTooLarge = "عنصر البيانات المحدد طويل جداً."; -Strings.OfficeOM.L_TooManyOptionalFunction = "دالات اختيارية متعددة ÙÙŠ قائمة المعلمات"; +Strings.OfficeOM.L_InvalidGetStartRowColumn = "قيم startRow أو startColumn المحددة غير صحيحة."; +Strings.OfficeOM.L_NotSupportedEventType = "نوع الحدث المحدد {0} غير معتمد."; +Strings.OfficeOM.L_CallbackNotAFunction = "يجب أن يكون رد الاستدعاء من دالة النوع، وكان من النوع {0}."; +Strings.OfficeOM.L_SetDataParametersConflict = "تعارض المعلمات المحددة."; +Strings.OfficeOM.L_TooManyArguments = "العديد من الوسيطات"; +Strings.OfficeOM.L_NonUniformPartialSetNotSupported = 'لا يمكن استخدام معلمات الإحداثيات مع "جدول" بنوع الاندماج عندما يحتوي الجدول على خلايا مدمجة.'; +Strings.OfficeOM.L_CannotNavigateTo = "إن العنصر موجود ÙÙŠ موقع حيث التنقل غير معتمد."; +Strings.OfficeOM.L_InvalidOrTimedOutSession = "جلسة عمل غير صالحة أو انتهت مهلتها"; +Strings.OfficeOM.L_GetDataParametersConflict = "تعارض المعلمات المحددة."; +Strings.OfficeOM.L_SliceSizeNotSupported = "حجم الشريحة المحدد غير معتمد."; +Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "الرجاء إجراء تحديد."; +Strings.OfficeOM.L_SaveSettingsError = "خطأ ÙÙŠ إعدادات الحÙظ"; +Strings.OfficeOM.L_InvalidSelectionForBindingType = "لا يمكن إنشاء ربط مع التحديد الحالي ونوع الربط المحدد."; +Strings.OfficeOM.L_InvalidCellsValue = "تحتوي معلمة واحدة أو أكثر من معلمات الخلايا على قيم غير مسموح بها. تحقق من القيم مرة أخرى ثم أعد المحاولة."; +Strings.OfficeOM.L_InValidOptionalArgument = "وسيطة اختيارية غير صالحة"; Strings.OfficeOM.L_InvalidGetColumns = "الأعمدة المحددة غير صالحة."; +Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "ملاحظة: ÙŠÙقترح أن تكون مجموعات التنسيق المعينة بواسطة استدعاء API الخاص بالتنسيق أقل من 100."; +Strings.OfficeOM.L_EventRegistrationError = "خطأ ÙÙŠ تسجيل الأحداث"; +Strings.OfficeOM.L_RunMustReturnPromise = 'لم ترجع الوظيÙØ© الدÙعية التي تم تمريرها إلى أسلوب ".run" أي تعهد. يجب أن تÙرجع الوظيÙØ© أي تعهد، بحيث يمكن إصدار أي عناصر يتم تعقبها تلقائياً عند اكتمال العملية الدÙعية. عادةً، يمكن إرجاع التعهد بإرجاع الاستجابة من"context.sync()".'; +Strings.OfficeOM.L_InvalidReadForBlankRow = "إن الص٠المحدد Ùارغ."; +Strings.OfficeOM.L_TooManyOptionalObjects = "عناصر اختيارية متعددة ÙÙŠ قائمة المعلمات"; +Strings.OfficeOM.L_TooManyOptionalFunction = "دالات اختيارية متعددة ÙÙŠ قائمة المعلمات"; +Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "التطبيق {0} غير موجود. لم يتم استدعاء Microsoft.Office.WebExtension.initialize (السبب)."; +Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "يجب أن يكون المحتوى المحدد بتنسيق الجدول. قم بتنسيق البيانات كجدول وحاول مرة أخرى."; +Strings.OfficeOM.L_InternalError = "خطأ داخلي"; +Strings.OfficeOM.L_NotSupported = "الدالة {0} غير معتمدة."; +Strings.OfficeOM.L_DataNotMatchBindingType = "عنصر البيانات المحدد غير متواÙÙ‚ مع نوع الربط."; Strings.OfficeOM.L_APICallFailed = "Ùشل استدعاء API"; -Strings.OfficeOM.L_BindingToMultipleSelection = "لا يتم اعتماد التحديدات المتقطعة."; -Strings.OfficeOM.L_GetDataIsTooLarge = "مجموعة البيانات المطلوبة كبيرة جداً."; -Strings.OfficeOM.L_DataNotMatchBindingSize = "لا يتطابق عنصر البيانات الذي تم توÙيره مع حجم التحديد الحالي."; -Strings.OfficeOM.L_TooManyIncompleteRequests = "انتظر حتى اكتمال المكالمة السابقة."; -Strings.OfficeOM.L_CustomXmlNodeNotFound = "لم يتم العثور على العقدة المحددة."; -Strings.OfficeOM.L_CoercionTypeNotSupported = "نوع الاندماج المحدد غير معتمد."; -Strings.OfficeOM.L_DataWriteReminder = "تذكير بكتابة البيانات"; -Strings.OfficeOM.L_IndexOutOfRange = "الÙهرس خارج النطاق."; -Strings.OfficeOM.L_UnsupportedEnumerationMessage = "قائمة التعداد غير معتمدة ÙÙŠ تطبيق المضي٠الحالي."; -Strings.OfficeOM.L_SaveSettingsError = "خطأ ÙÙŠ إعدادات الحÙظ"; +Strings.OfficeOM.L_InvalidResourceUrl = "تم إدخال Url غير صالح لمورد التطبيق."; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage = "Ùشلت العملية لأن هذه الوظيÙØ© الإضاÙية لا تدعم مواÙقة المستخدم ÙÙŠ هذه الÙئة"; +Strings.OfficeOM.L_InvalidTableOptionValue = "تحتوي معلمة واحدة أو أكثر من معلمات tableOptions على قيم غير مسموح بها. تحقق من القيم مرة أخرى ثم أعد المحاولة."; Strings.OfficeOM.L_EventHandlerRemovalFailed = "Ùشلت عملية إزالة معالج الحدث."; -Strings.OfficeOM.L_FunctionCallFailed = "Ùشل استدعاء الدالة {0}ØŒ رمز الخطأ: {1}."; -Strings.OfficeOM.L_SetDataParametersConflict = "تعارض المعلمات المحددة."; -Strings.OfficeOM.L_EventHandlerNotExist = "لم يتم العثور على معالج الأحداث المحدد لهذا الربط."; -Strings.OfficeOM.L_DataStale = "البيانات غير حديثة"; -Strings.OfficeOM.L_SelectionNotSupportCoercionType = "التحديد الحالي غير متواÙÙ‚ مع نوع الاندماج المحدد."; -Strings.OfficeOM.L_OutOfRange = "خارج النطاق"; -Strings.OfficeOM.L_DialogInvalidScheme = "نظام عنوان URL غير مدعوم. استخدم HTTPS بدلاً من ذلك."; -Strings.OfficeOM.L_CustomXmlError = "خطأ ÙÙŠ XML المخصص."; -Strings.OfficeOM.L_InvalidFormat = "خطأ تنسيق غير صالح"; -Strings.OfficeOM.L_InvalidGetStartRowColumn = "قيم startRow أو startColumn المحددة غير صحيحة."; -Strings.OfficeOM.L_InvalidColumnsForBinding = "الأعمدة المحددة غير صالحة."; -Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "انتهت مدة صلاحية جلسة عمل Office Online أو تعتبر غير صالحة. للمتابعة، قم بتحديث الصÙحة."; -Strings.OfficeOM.L_TooManyOptionalObjects = "عناصر اختيارية متعددة ÙÙŠ قائمة المعلمات"; -Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "تجاهل"; -Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "تتطلب الوظيÙØ© الإضاÙية بالÙعل رمزاً مميزاً للوصول."; -Strings.OfficeOM.L_InvalidNamedItemForBindingType = "نوع الربط المحدد غير متواÙÙ‚ مع العنصر المسمى الموÙر."; Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "منعتنا قيود المستعرض من إنشاء مربع الحوار. مجال مربع الحوار ومجال مضي٠الوظيÙØ© الإضاÙية ليسا ÙÙŠ Ù†Ùس منطقة الأمان."; -Strings.OfficeOM.L_DialogNavigateError = "خطأ ÙÙŠ التنقل ÙÙŠ مربع الحوار"; -Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "الرجاء إجراء تحديد."; -Strings.OfficeOM.L_PermissionDenied = "تم رÙض الإذن"; -Strings.OfficeOM.L_ConnectionFailureWithDetails = "Ùشل الطلب برمز الحالة {0} ورمز الخطأ {1} وظهرت رسالة الخطأ التالية: {2}"; -Strings.OfficeOM.L_InvalidReadForBlankRow = "إن الص٠المحدد Ùارغ."; -Strings.OfficeOM.L_UnsupportedDataObject = "نوع عنصر البيانات الذي تم توÙيره غير معتمد."; -Strings.OfficeOM.L_TooManyArguments = "العديد من الوسيطات"; -Strings.OfficeOM.L_InvalidObjectPath = 'لا يعمل مسار العنصر "{0}" لما تحاول القيام به. إذا كنت تستخدم العنصر عبر عدة استدعاءات "context.sync" وخارج التنÙيذ المتسلسل لدÙعة "‎.run"ØŒ يرجى استخدام الأسلوبين "context.trackedObjects.add()‎" Ùˆ"context.trackedObjects.remove()‎" لإدارة مدة بقاء العنصر.'; -Strings.OfficeOM.L_OsfControlTypeNotSupported = "نوع OsfControl غير معتمد."; Strings.OfficeOM.L_RequestTokenUnavailable = "تم إحباط API هذه لإبطاء تكرار المكالمة."; -Strings.OfficeOM.L_HostError = "خطأ المضيÙ"; -Strings.OfficeOM.L_InternalErrorDescription = "حدث خطأ داخلي."; -Strings.OfficeOM.L_MemoryLimit = "تجاوز حد الذاكرة"; Strings.OfficeOM.L_InvalidCoercion = "نوع الاندماج غير صالح"; -Strings.OfficeOM.L_InvalidTableOptionValue = "تحتوي معلمة واحدة أو أكثر من معلمات tableOptions على قيم غير مسموح بها. تحقق من القيم مرة أخرى ثم أعد المحاولة."; -Strings.OfficeOM.L_NetworkProblem = "مشكلة ÙÙŠ الشبكة"; -Strings.OfficeOM.L_InvalidResourceUrl = "تم إدخال Url غير صالح لمورد التطبيق."; -Strings.OfficeOM.L_FileTypeNotSupported = "نوع المل٠المحدد غير معتمد."; -Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "تكوين المستعرض"; +Strings.OfficeOM.L_InvalidResourceUrlMessage = "تم تحديد Url غير صالح للمورد ÙÙŠ البيان."; +Strings.OfficeOM.L_SSOClientError = "حدث خطأ ÙÙŠ طلب المصادقة من Office."; +Strings.OfficeOM.L_NotSupportedBindingType = "نوع الربط المحدد {0} غير معتمد."; +Strings.OfficeOM.L_DialogOK = "مواÙÙ‚"; +Strings.OfficeOM.L_OutOfRange = "خارج النطاق"; +Strings.OfficeOM.L_ElementMissing = "تعذر علينا تنسيق خلية الجدول لأن بعض قيم المعلمات Ù…Ùقودة. تحقق من المعلمات مرة أخرى ثم أعد المحاولة."; +Strings.OfficeOM.L_InvalidSetColumns = "الأعمدة المحددة غير صالحة."; +Strings.OfficeOM.L_MissingParameter = "معلمة Ù…Ùقودة"; Strings.OfficeOM.L_ValueNotLoaded = 'لم يتم تحميل قيمة عنصر النتيجة بعد. قم باستدعاء "context.sync()" ÙÙŠ سياق الطلب المقترن قبل قراءة خاصية القيمة.'; -Strings.OfficeOM.L_DialogRequireHTTPS = "بروتوكول HTTP غير مدعوم. استخدم HTTPS بدلاً من ذلك"; -Strings.OfficeOM.L_FormattingReminder = "تذكير بالتنسيق"; -Strings.OfficeOM.L_OperationNotSupported = "العملية غير معتمدة."; -Strings.OfficeOM.L_CellDataAmountBeyondLimits = "ملاحظة: ÙŠÙقترح أن يكون عدد الخلايا الموجود ÙÙŠ جدول أقل من 20000 خلية."; -Strings.OfficeOM.L_InvalidParameters = "للدالة {0} معلمات غير صالحة."; -Strings.OfficeOM.L_SettingsCannotSave = "تعذر Ø­Ùظ الإعدادات."; -Strings.OfficeOM.L_DocumentReadOnly = "العملية المطلوبة غير مسموح بها ÙÙŠ وضع المستند الحالي."; -Strings.OfficeOM.L_InvalidDataFormat = "تنسيق عنصر البيانات المحدد غير صحيح."; -Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "يجب أن يكون المحتوى المحدد بتنسيق الجدول. قم بتنسيق البيانات كجدول وحاول مرة أخرى."; -Strings.OfficeOM.L_RedundantCallbackSpecification = "لا يمكن تعيين رد الاستدعاء ÙÙŠ كل من قائمة الوسائط ÙˆÙÙŠ العنصر الاختياري."; -Strings.OfficeOM.L_PropertyNotLoaded = "الخاصية '{0}' غير متاحة. قبل قراءة قيمة الخاصية، قم باستدعاء أسلوب التحميل على العنصر المضمن وقم باستدعاء \"context.sync()‎\" ÙÙŠ سياق الطلب المقترن."; -Strings.OfficeOM.L_CustomXmlExceedQuotaName = "تم الوصول إلى الحد الأقصى للتحديد"; +Strings.OfficeOM.L_PermissionDenied = "تم رÙض الإذن"; +Strings.OfficeOM.L_SelectionCannotBound = "يتعذر الربط بالتحديد الحالي."; Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "نوع الاندماج المحدد غير متواÙÙ‚ مع هذا النوع من الربط."; -Strings.OfficeOM.L_DialogAddressNotTrusted = "لم يتم تضمين مجال عنوان URL ÙÙŠ عنصر AppDomains ÙÙŠ البيان."; -Strings.OfficeOM.L_InvalidArgumentGeneric = "الوسيطة (الوسيطات) التي خضعت للدالة لا تتماشى مع هذا الموق٠أو Ù…Ùقودة أو ليست بالتنسيق الصحيح."; -Strings.OfficeOM.L_UnsupportedUserIdentity = "نوع هوية المستخدم غير مدعم."; -Strings.OfficeOM.L_UnsupportedEnumeration = "قائمة تعداد غير معتمدة"; -Strings.OfficeOM.L_SSOServerErrorMessage = "حدث خطأ غير متوقع ÙÙŠ الخادم."; -Strings.OfficeOM.L_InvalidNode = "العقدة غير صالحة"; -Strings.OfficeOM.L_SSOServerError = "حدث خطأ ÙÙŠ موÙر المصادقة."; +Strings.OfficeOM.L_SSOConnectionLostError = "A connection was lost during the sign in process."; +Strings.OfficeOM.L_ConnectionFailureWithStatus = "Ùشل الطلب برمز الحالة {0}."; +Strings.OfficeOM.L_EventHandlerAdditionFailed = "Ùشل ÙÙŠ إضاÙØ© معالج الحدث."; +Strings.OfficeOM.L_InternalErrorDescription = "حدث خطأ داخلي."; +Strings.OfficeOM.L_ActivityLimitReached = "تم بلوغ حد النشاط."; Strings.OfficeOM.L_OverwriteWorksheetData = "Ùشلت عملية التعيين لأن عنصر البيانات الذي تم توÙيره سيكتب Ùوق البيانات أو سينقلها."; -Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "ملاحظة: ÙŠÙقترح أن تكون مجموعات التنسيق المعينة بواسطة استدعاء API الخاص بالتنسيق أقل من 100."; -Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = "يتعذر تطبيق التغييرات التي تم إجراؤها على خاصية '{0}' من خلال أسلوب \"object.set\"."; -Strings.OfficeOM.L_ShowWindowDialogNotification = "يريد {0} عرض ناÙذة جديدة."; -Strings.OfficeOM.L_AppNameNotExist = "لا يوجد اسم وظيÙØ© إضاÙية لـ {0}."; -Strings.OfficeOM.L_DataWriteError = "خطأ ÙÙŠ كتابة البيانات"; -Strings.OfficeOM.L_NetworkProblemRetrieveFile = "حالت مشكلة ÙÙŠ الشبكة دون استرداد الملÙ."; -Strings.OfficeOM.L_MissingRequiredArguments = "Ùقدان بعض الوسيطات المطلوبة"; -Strings.OfficeOM.L_DialogAlreadyOpened = "Ùشلت العملية لأن هذه الوظيÙØ© الإضاÙية بها مربع حوار نشط بالÙعل."; -Strings.OfficeOM.L_InvalidRequestContext = "لا يمكن استخدام العنصر عبر سياقات طلب مختلÙØ©."; -Strings.OfficeOM.L_NotSupported = "الدالة {0} غير معتمدة."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Ùشلت العملية لأن هذه الوظيÙØ© الإضاÙية تتطلب رمزاً مميزاً للوصول."; -Strings.OfficeOM.L_DataReadError = "خطأ ÙÙŠ قراءة البيانات"; -Strings.OfficeOM.L_SSOClientError = "حدث خطأ ÙÙŠ طلب المصادقة من Office."; -Strings.OfficeOM.L_SelectionCannotBound = "يتعذر الربط بالتحديد الحالي."; -Strings.OfficeOM.L_ColIndexOutOfRange = "إن قيمة Ùهرس العمود خارج النطاق المسموح به. استخدم قيمة (0 أو أعلى) تكون أصغر من عدد الأعمدة."; -Strings.OfficeOM.L_InvalidGetRows = "الصÙو٠المحددة غير صالحة."; -Strings.OfficeOM.L_MissingParameter = "معلمة Ù…Ùقودة"; +Strings.OfficeOM.L_SSOServerErrorMessage = "حدث خطأ غير متوقع ÙÙŠ الخادم."; +Strings.OfficeOM.L_NonUniformPartialGetNotSupported = 'لا يمكن استخدام معلمات الإحداثيات مع "جدول" بنوع الاندماج عندما يحتوي الجدول على خلايا مدمجة.'; +Strings.OfficeOM.L_CustomXmlOutOfDateName = "البيانات ليست حديثة"; +Strings.OfficeOM.L_InvalidSetRows = "الصÙو٠المحددة غير صالحة."; Strings.OfficeOM.L_RowIndexOutOfRange = "إن قيمة Ùهرس الص٠خارج النطاق المسموح به. استخدم قيمة (0 أو أعلى) تكون أصغر من عدد الصÙÙˆÙ."; -Strings.OfficeOM.L_DataNotMatchSelection = "عنصر البيانات الذي تم توÙيره غير متواÙÙ‚ مع شكل التحديد الحالي أو أبعاده."; -Strings.OfficeOM.L_BadSelectorString = "لم يتم تنسيق السلسة التي تم تمريرها إلى المحدد بشكل سليم أو أنها غير معتمدة."; -Strings.OfficeOM.L_InvalidCellsValue = "تحتوي معلمة واحدة أو أكثر من معلمات الخلايا على قيم غير مسموح بها. تحقق من القيم مرة أخرى ثم أعد المحاولة."; -Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "سماح"; +Strings.OfficeOM.L_SSOConnectionLostErrorMessage = "A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones."; +Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "محاولة تعيين خاصية '{0}' للقراءة Ùقط."; +Strings.OfficeOM.L_ReadSettingsError = "خطأ ÙÙŠ إعدادات القراءة"; +Strings.OfficeOM.L_CloseFileBeforeRetrieve = "استدعاء closeAsync على المل٠الحالي قبل استرداد آخر."; Strings.OfficeOM.L_NavOutOfBound = "Ùشلت العملية لأن الÙهرس خارج النطاق."; -Strings.OfficeOM.L_NonUniformPartialGetNotSupported = 'لا يمكن استخدام معلمات الإحداثيات مع "جدول" بنوع الاندماج عندما يحتوي الجدول على خلايا مدمجة.'; -Strings.OfficeOM.L_RunMustReturnPromise = 'لم ترجع الوظيÙØ© الدÙعية التي تم تمريرها إلى أسلوب ".run" أي تعهد. يجب أن تÙرجع الوظيÙØ© أي تعهد، بحيث يمكن إصدار أي عناصر يتم تعقبها تلقائياً عند اكتمال العملية الدÙعية. عادةً، يمكن إرجاع التعهد بإرجاع الاستجابة من"context.sync()".'; +Strings.OfficeOM.L_ConnectionFailureWithDetails = "Ùشل الطلب برمز الحالة {0} ورمز الخطأ {1} وظهرت رسالة الخطأ التالية: {2}"; +Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "انتهت مدة صلاحية جلسة عمل Office Online أو تعتبر غير صالحة. للمتابعة، قم بتحديث الصÙحة."; +Strings.OfficeOM.L_SelectionNotSupportCoercionType = "التحديد الحالي غير متواÙÙ‚ مع نوع الاندماج المحدد."; +Strings.OfficeOM.L_DataStale = "البيانات غير حديثة"; +Strings.OfficeOM.L_FileTypeNotSupported = "نوع المل٠المحدد غير معتمد."; +Strings.OfficeOM.L_InvalidNode = "العقدة غير صالحة"; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory = "لا تدعم هذه الوظيÙØ© الإضاÙية مواÙقة المستخدم."; +Strings.OfficeOM.L_UnsupportedEnumeration = "قائمة تعداد غير معتمدة"; +Strings.OfficeOM.L_DataWriteReminder = "تذكير بكتابة البيانات"; +Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "سماح"; +Strings.OfficeOM.L_InvalidApiCallInContext = "استدعاء API غير صالح ÙÙŠ السياق الحالي."; +Strings.OfficeOM.L_CustomFunctionImplementationMissing = "يجب أن تحتوي الخاصية التي تحمل هذا الاسم ÙÙŠ Excel.CustomFunctions والتي تمثل تعري٠الوظيÙØ© على الخاصية 'call' التي تقوم بتنÙيذ الوظيÙØ©."; +Strings.OfficeOM.L_SettingsAreStale = "تعذر Ø­Ùظ الإعدادات نظراً لأنها غير حديثة."; +Strings.OfficeOM.L_InvalidNamedItemForBindingType = "نوع الربط المحدد غير متواÙÙ‚ مع العنصر المسمى الموÙر."; +Strings.OfficeOM.L_FunctionCallFailed = "Ùشل استدعاء الدالة {0}ØŒ رمز الخطأ: {1}."; +Strings.OfficeOM.L_InvalidOperationInCellEditMode = "Excel الآن ÙÙŠ وضع تحرير الخلية. الرجاء إنهاء وضع التحرير بالضغط على Ù…Ùتاح الإدخال ENTER أو Ù…Ùتاح TAB أو تحديد خلية أخرى، ثم إعادة المحاولة."; +Strings.OfficeOM.L_UserAborted = "أوق٠المستخدم طلب المواÙقة قبل اكتماله."; Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "العملية غير معتمدة على هذا النوع من الربط."; +Strings.OfficeOM.L_DocumentReadOnly = "العملية المطلوبة غير مسموح بها ÙÙŠ وضع المستند الحالي."; +Strings.OfficeOM.L_InvalidValue = "قيمة غير صالحة"; +Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Ùشلت العملية لأن هذه الوظيÙØ© الإضاÙية تتطلب رمزاً مميزاً للوصول."; +Strings.OfficeOM.L_InvalidSSOAddinMessage = "API للهوية غير مدعمة لهذه الوظيÙØ© الإضاÙية."; +Strings.OfficeOM.L_BindingNotExist = "الربط المحدد غير موجود."; +Strings.OfficeOM.L_GetDataIsTooLarge = "مجموعة البيانات المطلوبة كبيرة جداً."; +Strings.OfficeOM.L_SetDataIsTooLarge = "عنصر البيانات المحدد طويل جداً."; +Strings.OfficeOM.L_EventHandlerNotExist = "لم يتم العثور على معالج الأحداث المحدد لهذا الربط."; +Strings.OfficeOM.L_DisplayDialogError = "عرض خطأ مربع الحوار"; +Strings.OfficeOM.L_DataNotMatchSelection = "عنصر البيانات الذي تم توÙيره غير متواÙÙ‚ مع شكل التحديد الحالي أو أبعاده."; +Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "تكوين المستعرض"; +Strings.OfficeOM.L_RedundantCallbackSpecification = "لا يمكن تعيين رد الاستدعاء ÙÙŠ كل من قائمة الوسائط ÙˆÙÙŠ العنصر الاختياري."; +Strings.OfficeOM.L_RequestTimeout = "استغرقت المكالمة وقتاً طويلاً وبالتالي يتعذر تنÙيذها."; +Strings.OfficeOM.L_OsfControlTypeNotSupported = "نوع OsfControl غير معتمد."; +Strings.OfficeOM.L_CellDataAmountBeyondLimits = "ملاحظة: ÙŠÙقترح أن يكون عدد الخلايا الموجود ÙÙŠ جدول أقل من 20000 خلية."; +Strings.OfficeOM.L_InvalidObjectPath = 'لا يعمل مسار العنصر "{0}" لما تحاول القيام به. إذا كنت تستخدم العنصر عبر عدة استدعاءات "context.sync" وخارج التنÙيذ المتسلسل لدÙعة "‎.run"ØŒ يرجى استخدام الأسلوبين "context.trackedObjects.add()‎" Ùˆ"context.trackedObjects.remove()‎" لإدارة مدة بقاء العنصر.'; +Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "البيانات غير محدثة. قم باسترداد العنصر مرة أخرى."; +Strings.OfficeOM.L_InvalidAPICall = "استدعاء API غير صالح"; +Strings.OfficeOM.L_BindingCreationError = "خطأ ÙÙŠ إنشاء الربط"; +Strings.OfficeOM.L_DataReadError = "خطأ ÙÙŠ قراءة البيانات"; +Strings.OfficeOM.L_InvalidGetRowColumnCounts = "قيم rowCount أو columnCount المحددة غير صحيحة."; +Strings.OfficeOM.L_TooManyIncompleteRequests = "انتظر حتى اكتمال المكالمة السابقة."; +Strings.OfficeOM.L_InvalidParameters = "للدالة {0} معلمات غير صالحة."; +Strings.OfficeOM.L_InitializeNotReady = "لم يتم تحميل Office.js بشكل كامل بعد. يرجى إعادة المحاولة لاحقاً للتأكد من إضاÙØ© رمز التهيئة ÙÙŠ وظيÙØ© Office.initialize."; +Strings.OfficeOM.L_DataWriteError = "خطأ ÙÙŠ كتابة البيانات"; +Strings.OfficeOM.L_SettingNameNotExist = "اسم الإعداد المحدد غير موجود."; +Strings.OfficeOM.L_CoercionTypeNotSupported = "نوع الاندماج المحدد غير معتمد."; Strings.OfficeOM.L_InvalidDataObject = "عنصر البيانات غير صالح"; -Strings.OfficeOM.L_InternalError = "خطأ داخلي"; -Strings.OfficeOM.L_FormatValueOutOfRange = "إن القيمة خارج النطاق المسموح به."; -Strings.OfficeOM.L_CannotNavigateTo = "إن العنصر موجود ÙÙŠ موقع حيث التنقل غير معتمد."; -Strings.OfficeOM.L_SSOClientErrorMessage = "حدث خطأ غير متوقع ÙÙŠ العميل."; +Strings.OfficeOM.L_NoCapability = "لا تملك الأذونات الكاÙية لهذا الإجراء."; +Strings.OfficeOM.L_CustomXmlError = "خطأ ÙÙŠ XML المخصص."; +Strings.OfficeOM.L_CustomFunctionDefinitionMissing = "يجب وجود خاصية تحمل هذا الاسم تمثل تعري٠الوظيÙØ© ÙÙŠ Excel.CustomFunctions."; +Strings.OfficeOM.L_NetworkProblemRetrieveFile = "حالت مشكلة ÙÙŠ الشبكة دون استرداد الملÙ."; +Strings.OfficeOM.L_NewWindowCrossZone = "إعدادات الأمان ÙÙŠ المستعرض تحول دون إنشاء مربع حوار. حاول استخدام مستعرض مختلÙØŒ أو {0} وبذلك يكونا '{1}' والمجال المعروض ÙÙŠ شريط العنوان ÙÙŠ Ù†Ùس منطقة الأمان."; +Strings.OfficeOM.L_CustomXmlNodeNotFound = "لم يتم العثور على العقدة المحددة."; +Strings.OfficeOM.L_MemoryLimit = "تجاوز حد الذاكرة"; Strings.OfficeOM.L_BrowserAPINotSupported = "لا يعتمد هذا المستعرض API المطلوبة."; -Strings.OfficeOM.L_ElementMissing = "تعذر علينا تنسيق خلية الجدول لأن بعض قيم المعلمات Ù…Ùقودة. تحقق من المعلمات مرة أخرى ثم أعد المحاولة."; -Strings.OfficeOM.L_DataNotMatchCoercionType = "نوع عنصر البيانات المحدد غير متواÙÙ‚ مع التحديد الحالي."; +Strings.OfficeOM.L_SpecifiedIdNotExist = "إن المعر٠المحدد غير موجود."; +Strings.OfficeOM.L_DialogAlreadyOpened = "Ùشلت العملية لأن هذه الوظيÙØ© الإضاÙية بها مربع حوار نشط بالÙعل."; +Strings.OfficeOM.L_CustomFunctionNameContainsBadChars = "يمكن أن يحتوي اسم الدالة على أحر٠وأرقام وتسطير سÙلي ونقاط."; Strings.OfficeOM.L_SettingsStaleError = "خطأ ÙÙŠ الإعدادات القديمة"; -Strings.OfficeOM.L_NamedItemNotFound = "العنصر المسمى غير موجود."; -Strings.OfficeOM.L_InvalidAPICall = "استدعاء API غير صالح"; -Strings.OfficeOM.L_InvalidFormatValue = "تحتوي معلمة واحدة أو أكثر من معلمات التنسيق على قيم غير مسموح بها. تحقق من القيم مرة أخرى ثم أعد المحاولة."; -Strings.OfficeOM.L_ConnectionFailureWithStatus = "Ùشل الطلب برمز الحالة {0}."; -Strings.OfficeOM.L_CustomXmlOutOfDateName = "البيانات ليست حديثة"; -Strings.OfficeOM.L_Timeout = "انقضت مهلة العملية."; -Strings.OfficeOM.L_InvalidBinding = "الربط غير صالح"; -Strings.OfficeOM.L_NoCapability = "لا تملك الأذونات الكاÙية لهذا الإجراء."; -Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "التطبيق {0} غير موجود. لم يتم استدعاء Microsoft.Office.WebExtension.initialize (السبب)."; -Strings.OfficeOM.L_SettingNameNotExist = "اسم الإعداد المحدد غير موجود."; -Strings.OfficeOM.L_SliceSizeNotSupported = "حجم الشريحة المحدد غير معتمد."; -Strings.OfficeOM.L_InvalidOrTimedOutSession = "جلسة عمل غير صالحة أو انتهت مهلتها"; -Strings.OfficeOM.L_NotSupportedBindingType = "نوع الربط المحدد {0} غير معتمد."; -Strings.OfficeOM.L_CallbackNotAFunction = "يجب أن يكون رد الاستدعاء من دالة النوع، وكان من النوع {0}."; -Strings.OfficeOM.L_EventRegistrationError = "خطأ ÙÙŠ تسجيل الأحداث"; -Strings.OfficeOM.L_DialogOK = "مواÙÙ‚"; -Strings.OfficeOM.L_UserAborted = "أوق٠المستخدم طلب المواÙقة قبل اكتماله."; Strings.OfficeOM.L_UserNotSignedIn = "لم يسجل أي مستخدم دخوله إلى Office."; -Strings.OfficeOM.L_NotSupportedEventType = "نوع الحدث المحدد {0} غير معتمد."; -Strings.OfficeOM.L_NonUniformPartialSetNotSupported = 'لا يمكن استخدام معلمات الإحداثيات مع "جدول" بنوع الاندماج عندما يحتوي الجدول على خلايا مدمجة.'; -Strings.OfficeOM.L_InvalidSSOAddinMessage = "API للهوية غير مدعمة لهذه الوظيÙØ© الإضاÙية."; -Strings.OfficeOM.L_InvalidBindingOperation = "عملية الربط غير صالحة"; -Strings.OfficeOM.L_InvalidSetColumns = "الأعمدة المحددة غير صالحة."; -Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "تحدد XPath التحديد إلى 1024 عنصراً."; -Strings.OfficeOM.L_ShuttingDown = "Ùشلت العملية لأن البيانات غير حديثة على الخادم."; -Strings.OfficeOM.L_CannotWriteToSelection = "لا يمكن الكتابة إلى التحديد الحالي."; -Strings.OfficeOM.L_InvalidSetRows = "الصÙو٠المحددة غير صالحة."; +Strings.OfficeOM.L_NetworkProblem = "مشكلة ÙÙŠ الشبكة"; +Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "تجاهل"; +Strings.OfficeOM.L_OperationNotSupported = "العملية غير معتمدة."; +Strings.OfficeOM.L_InvalidArgumentGeneric = "الوسيطة (الوسيطات) التي خضعت للدالة لا تتماشى مع هذا الموق٠أو Ù…Ùقودة أو ليست بالتنسيق الصحيح."; +Strings.OfficeOM.L_DataNotMatchBindingSize = "لا يتطابق عنصر البيانات الذي تم توÙيره مع حجم التحديد الحالي."; +Strings.OfficeOM.L_DataNotMatchCoercionType = "نوع عنصر البيانات المحدد غير متواÙÙ‚ مع التحديد الحالي."; Strings.OfficeOM.L_UserAbortedMessage = "لم يواÙÙ‚ المستخدم على أذونات الوظيÙØ© الإضاÙية."; -Strings.OfficeOM.L_InValidOptionalArgument = "وسيطة اختيارية غير صالحة"; -Strings.OfficeOM.L_EventHandlerAdditionFailed = "Ùشل ÙÙŠ إضاÙØ© معالج الحدث."; -Strings.OfficeOM.L_InvalidValue = "قيمة غير صالحة"; -Strings.OfficeOM.L_InvalidGetRowColumnCounts = "قيم rowCount أو columnCount المحددة غير صحيحة."; -Strings.OfficeOM.L_NotImplemented = "لم يتم تنÙيذ الدالة {0}."; -Strings.OfficeOM.L_ActivityLimitReached = "تم بلوغ حد النشاط."; -Strings.OfficeOM.L_InvalidSetStartRowColumn = "قيم startRow أو startColumn المحددة غير صحيحة."; -Strings.OfficeOM.L_SettingsAreStale = "تعذر Ø­Ùظ الإعدادات نظراً لأنها غير حديثة."; -Strings.OfficeOM.L_NewWindowCrossZone = "إعدادات الأمان ÙÙŠ المستعرض تحول دون إنشاء مربع حوار. حاول استخدام مستعرض مختلÙØŒ أو {0} وبذلك يكونا '{1}' والمجال المعروض ÙÙŠ شريط العنوان ÙÙŠ Ù†Ùس منطقة الأمان."; -Strings.OfficeOM.L_APINotSupported = "API غير معتمدة"; -Strings.OfficeOM.L_UnknownBindingType = "نوع الربط غير معتمد."; -Strings.OfficeOM.L_SpecifiedIdNotExist = "إن المعر٠المحدد غير موجود."; -Strings.OfficeOM.L_InvalidBindingError = "خطأ الربط غير صالح"; -Strings.OfficeOM.L_InvalidApiArgumentsMessage = "وسيطات الإدخال غير صالحة."; -Strings.OfficeOM.L_ReadSettingsError = "خطأ ÙÙŠ إعدادات القراءة"; -Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "البيانات غير محدثة. قم باسترداد العنصر مرة أخرى."; +Strings.OfficeOM.L_UnsupportedUserIdentity = "نوع هوية المستخدم غير مدعم."; Strings.OfficeOM.L_PropertyDoesNotExist = 'لا توجد الخاصية "{0}" ÙÙŠ العنصر.'; -Strings.OfficeOM.L_GetDataParametersConflict = "تعارض المعلمات المحددة."; -Strings.OfficeOM.L_MultipleNamedItemFound = "تم العثور على عدة عناصر بالاسم Ù†Ùسه."; -Strings.OfficeOM.L_InitializeNotReady = "لم يتم تحميل Office.js بشكل كامل بعد. يرجى إعادة المحاولة لاحقاً للتأكد من إضاÙØ© رمز التهيئة ÙÙŠ وظيÙØ© Office.initialize."; -Strings.OfficeOM.L_InvalidGrantMessage = "لم يتم منح الإذن لهذه الوظيÙØ© الإضاÙية."; -Strings.OfficeOM.L_CannotRegisterEvent = "تعذر تسجيل معالج الأحداث."; -Strings.OfficeOM.L_CloseFileBeforeRetrieve = "استدعاء closeAsync على المل٠الحالي قبل استرداد آخر."; -Strings.OfficeOM.L_InvalidResourceUrlMessage = "تم تحديد Url غير صالح للمورد ÙÙŠ البيان."; -Strings.OfficeOM.L_DisplayDialogError = "عرض خطأ مربع الحوار"; +Strings.OfficeOM.L_InvalidDataFormat = "تنسيق عنصر البيانات المحدد غير صحيح."; +Strings.OfficeOM.L_UnknownBindingType = "نوع الربط غير معتمد."; +Strings.OfficeOM.L_AppNameNotExist = "لا يوجد اسم وظيÙØ© إضاÙية لـ {0}."; +Strings.OfficeOM.L_SSOServerError = "حدث خطأ ÙÙŠ موÙر المصادقة."; +Strings.OfficeOM.L_ShowWindowDialogNotification = "يريد {0} عرض ناÙذة جديدة."; Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "نوع هوية المستخدم غير مدعم."; -Strings.OfficeOM.L_DataNotMatchBindingType = "عنصر البيانات المحدد غير متواÙÙ‚ مع نوع الربط."; -Strings.OfficeOM.L_BindingNotExist = "الربط المحدد غير موجود."; -Strings.OfficeOM.L_InvalidArgument = 'الوسيطة "{0}" لا تعمل لهذه الحالة أو Ù…Ùقودة أو ليست بتنسيق صحيح.'; -Strings.OfficeOM.L_UserClickIgnore = "اختار المستخدم تجاهل مربع الحوار."; -Strings.OfficeOM.L_InvalidSelectionForBindingType = "لا يمكن إنشاء ربط مع التحديد الحالي ونوع الربط المحدد." +Strings.OfficeOM.L_IndexOutOfRange = "الÙهرس خارج النطاق."; +Strings.OfficeOM.L_InvalidGrantMessage = "لم يتم منح الإذن لهذه الوظيÙØ© الإضاÙية."; +Strings.OfficeOM.L_UnsupportedDataObject = "نوع عنصر البيانات الذي تم توÙيره غير معتمد."; +Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = "يتعذر تطبيق التغييرات التي تم إجراؤها على خاصية '{0}' من خلال أسلوب \"object.set\"."; +Strings.OfficeOM.L_DialogRequireHTTPS = "بروتوكول HTTP غير مدعوم. استخدم HTTPS بدلاً من ذلك"; +Strings.OfficeOM.L_CannotWriteToSelection = "لا يمكن الكتابة إلى التحديد الحالي."; +Strings.OfficeOM.L_ApiNotFoundDetails = "الأسلوب أو الخاصية {0} هي جزء من مجموعة متطلبات {1} وهي غير متوÙرة ÙÙŠ الإصدار {2}."; +Strings.OfficeOM.L_InvalidRequestContext = "لا يمكن استخدام العنصر عبر سياقات طلب مختلÙØ©."; +Strings.OfficeOM.L_InvalidSetStartRowColumn = "قيم startRow أو startColumn المحددة غير صحيحة."; +Strings.OfficeOM.L_FormattingReminder = "تذكير بالتنسيق"; +Strings.OfficeOM.L_InvalidApiArgumentsMessage = "وسيطات الإدخال غير صالحة."; +Strings.OfficeOM.L_HostError = "خطأ المضيÙ" \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/ar-sa/office_strings.js b/node_modules/@microsoft/office-js/dist/ar-sa/office_strings.js index 7b5fd1e..e0c24fc 100644 --- a/node_modules/@microsoft/office-js/dist/ar-sa/office_strings.js +++ b/node_modules/@microsoft/office-js/dist/ar-sa/office_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_GetSelectionNotSupported="التحديد الحالي غير معتمد.";Strings.OfficeOM.L_InvalidGrant="لم يتم منح التÙويض المسبق.";Strings.OfficeOM.L_RequestTimeout="استغرقت المكالمة وقتاً طويلاً وبالتالي يتعذر تنÙيذها.";Strings.OfficeOM.L_BindingCreationError="خطأ ÙÙŠ إنشاء الربط";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="محاولة تعيين خاصية '{0}' للقراءة Ùقط.";Strings.OfficeOM.L_InvalidApiCallInContext="استدعاء API غير صالح ÙÙŠ السياق الحالي.";Strings.OfficeOM.L_SetDataIsTooLarge="عنصر البيانات المحدد طويل جداً.";Strings.OfficeOM.L_TooManyOptionalFunction="دالات اختيارية متعددة ÙÙŠ قائمة المعلمات";Strings.OfficeOM.L_InvalidGetColumns="الأعمدة المحددة غير صالحة.";Strings.OfficeOM.L_APICallFailed="Ùشل استدعاء API";Strings.OfficeOM.L_BindingToMultipleSelection="لا يتم اعتماد التحديدات المتقطعة.";Strings.OfficeOM.L_GetDataIsTooLarge="مجموعة البيانات المطلوبة كبيرة جداً.";Strings.OfficeOM.L_DataNotMatchBindingSize="لا يتطابق عنصر البيانات الذي تم توÙيره مع حجم التحديد الحالي.";Strings.OfficeOM.L_TooManyIncompleteRequests="انتظر حتى اكتمال المكالمة السابقة.";Strings.OfficeOM.L_CustomXmlNodeNotFound="لم يتم العثور على العقدة المحددة.";Strings.OfficeOM.L_CoercionTypeNotSupported="نوع الاندماج المحدد غير معتمد.";Strings.OfficeOM.L_DataWriteReminder="تذكير بكتابة البيانات";Strings.OfficeOM.L_IndexOutOfRange="الÙهرس خارج النطاق.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="قائمة التعداد غير معتمدة ÙÙŠ تطبيق المضي٠الحالي.";Strings.OfficeOM.L_SaveSettingsError="خطأ ÙÙŠ إعدادات الحÙظ";Strings.OfficeOM.L_EventHandlerRemovalFailed="Ùشلت عملية إزالة معالج الحدث.";Strings.OfficeOM.L_FunctionCallFailed="Ùشل استدعاء الدالة {0}ØŒ رمز الخطأ: {1}.";Strings.OfficeOM.L_SetDataParametersConflict="تعارض المعلمات المحددة.";Strings.OfficeOM.L_EventHandlerNotExist="لم يتم العثور على معالج الأحداث المحدد لهذا الربط.";Strings.OfficeOM.L_DataStale="البيانات غير حديثة";Strings.OfficeOM.L_SelectionNotSupportCoercionType="التحديد الحالي غير متواÙÙ‚ مع نوع الاندماج المحدد.";Strings.OfficeOM.L_OutOfRange="خارج النطاق";Strings.OfficeOM.L_DialogInvalidScheme="نظام عنوان URL غير مدعوم. استخدم HTTPS بدلاً من ذلك.";Strings.OfficeOM.L_CustomXmlError="خطأ ÙÙŠ XML المخصص.";Strings.OfficeOM.L_InvalidFormat="خطأ تنسيق غير صالح";Strings.OfficeOM.L_InvalidGetStartRowColumn="قيم startRow أو startColumn المحددة غير صحيحة.";Strings.OfficeOM.L_InvalidColumnsForBinding="الأعمدة المحددة غير صالحة.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="انتهت مدة صلاحية جلسة عمل Office Online أو تعتبر غير صالحة. للمتابعة، قم بتحديث الصÙحة.";Strings.OfficeOM.L_TooManyOptionalObjects="عناصر اختيارية متعددة ÙÙŠ قائمة المعلمات";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="تجاهل";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="تتطلب الوظيÙØ© الإضاÙية بالÙعل رمزاً مميزاً للوصول.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="نوع الربط المحدد غير متواÙÙ‚ مع العنصر المسمى الموÙر.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="منعتنا قيود المستعرض من إنشاء مربع الحوار. مجال مربع الحوار ومجال مضي٠الوظيÙØ© الإضاÙية ليسا ÙÙŠ Ù†Ùس منطقة الأمان.";Strings.OfficeOM.L_DialogNavigateError="خطأ ÙÙŠ التنقل ÙÙŠ مربع الحوار";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="الرجاء إجراء تحديد.";Strings.OfficeOM.L_PermissionDenied="تم رÙض الإذن";Strings.OfficeOM.L_ConnectionFailureWithDetails="Ùشل الطلب برمز الحالة {0} ورمز الخطأ {1} وظهرت رسالة الخطأ التالية: {2}";Strings.OfficeOM.L_InvalidReadForBlankRow="إن الص٠المحدد Ùارغ.";Strings.OfficeOM.L_UnsupportedDataObject="نوع عنصر البيانات الذي تم توÙيره غير معتمد.";Strings.OfficeOM.L_TooManyArguments="العديد من الوسيطات";Strings.OfficeOM.L_InvalidObjectPath='لا يعمل مسار العنصر "{0}" لما تحاول القيام به. إذا كنت تستخدم العنصر عبر عدة استدعاءات "context.sync" وخارج التنÙيذ المتسلسل لدÙعة "‎.run"ØŒ يرجى استخدام الأسلوبين "context.trackedObjects.add()‎" Ùˆ"context.trackedObjects.remove()‎" لإدارة مدة بقاء العنصر.';Strings.OfficeOM.L_OsfControlTypeNotSupported="نوع OsfControl غير معتمد.";Strings.OfficeOM.L_RequestTokenUnavailable="تم إحباط API هذه لإبطاء تكرار المكالمة.";Strings.OfficeOM.L_HostError="خطأ المضيÙ";Strings.OfficeOM.L_InternalErrorDescription="حدث خطأ داخلي.";Strings.OfficeOM.L_MemoryLimit="تجاوز حد الذاكرة";Strings.OfficeOM.L_InvalidCoercion="نوع الاندماج غير صالح";Strings.OfficeOM.L_InvalidTableOptionValue="تحتوي معلمة واحدة أو أكثر من معلمات tableOptions على قيم غير مسموح بها. تحقق من القيم مرة أخرى ثم أعد المحاولة.";Strings.OfficeOM.L_NetworkProblem="مشكلة ÙÙŠ الشبكة";Strings.OfficeOM.L_InvalidResourceUrl="تم إدخال Url غير صالح لمورد التطبيق.";Strings.OfficeOM.L_FileTypeNotSupported="نوع المل٠المحدد غير معتمد.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="تكوين المستعرض";Strings.OfficeOM.L_ValueNotLoaded='لم يتم تحميل قيمة عنصر النتيجة بعد. قم باستدعاء "context.sync()" ÙÙŠ سياق الطلب المقترن قبل قراءة خاصية القيمة.';Strings.OfficeOM.L_DialogRequireHTTPS="بروتوكول HTTP غير مدعوم. استخدم HTTPS بدلاً من ذلك";Strings.OfficeOM.L_FormattingReminder="تذكير بالتنسيق";Strings.OfficeOM.L_OperationNotSupported="العملية غير معتمدة.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="ملاحظة: ÙŠÙقترح أن يكون عدد الخلايا الموجود ÙÙŠ جدول أقل من 20000 خلية.";Strings.OfficeOM.L_InvalidParameters="للدالة {0} معلمات غير صالحة.";Strings.OfficeOM.L_SettingsCannotSave="تعذر Ø­Ùظ الإعدادات.";Strings.OfficeOM.L_DocumentReadOnly="العملية المطلوبة غير مسموح بها ÙÙŠ وضع المستند الحالي.";Strings.OfficeOM.L_InvalidDataFormat="تنسيق عنصر البيانات المحدد غير صحيح.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="يجب أن يكون المحتوى المحدد بتنسيق الجدول. قم بتنسيق البيانات كجدول وحاول مرة أخرى.";Strings.OfficeOM.L_RedundantCallbackSpecification="لا يمكن تعيين رد الاستدعاء ÙÙŠ كل من قائمة الوسائط ÙˆÙÙŠ العنصر الاختياري.";Strings.OfficeOM.L_PropertyNotLoaded="الخاصية '{0}' غير متاحة. قبل قراءة قيمة الخاصية، قم باستدعاء أسلوب التحميل على العنصر المضمن وقم باستدعاء \"context.sync()‎\" ÙÙŠ سياق الطلب المقترن.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="تم الوصول إلى الحد الأقصى للتحديد";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="نوع الاندماج المحدد غير متواÙÙ‚ مع هذا النوع من الربط.";Strings.OfficeOM.L_DialogAddressNotTrusted="لم يتم تضمين مجال عنوان URL ÙÙŠ عنصر AppDomains ÙÙŠ البيان.";Strings.OfficeOM.L_InvalidArgumentGeneric="الوسيطة (الوسيطات) التي خضعت للدالة لا تتماشى مع هذا الموق٠أو Ù…Ùقودة أو ليست بالتنسيق الصحيح.";Strings.OfficeOM.L_UnsupportedUserIdentity="نوع هوية المستخدم غير مدعم.";Strings.OfficeOM.L_UnsupportedEnumeration="قائمة تعداد غير معتمدة";Strings.OfficeOM.L_SSOServerErrorMessage="حدث خطأ غير متوقع ÙÙŠ الخادم.";Strings.OfficeOM.L_InvalidNode="العقدة غير صالحة";Strings.OfficeOM.L_SSOServerError="حدث خطأ ÙÙŠ موÙر المصادقة.";Strings.OfficeOM.L_OverwriteWorksheetData="Ùشلت عملية التعيين لأن عنصر البيانات الذي تم توÙيره سيكتب Ùوق البيانات أو سينقلها.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="ملاحظة: ÙŠÙقترح أن تكون مجموعات التنسيق المعينة بواسطة استدعاء API الخاص بالتنسيق أقل من 100.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="يتعذر تطبيق التغييرات التي تم إجراؤها على خاصية '{0}' من خلال أسلوب \"object.set\".";Strings.OfficeOM.L_ShowWindowDialogNotification="يريد {0} عرض ناÙذة جديدة.";Strings.OfficeOM.L_AppNameNotExist="لا يوجد اسم وظيÙØ© إضاÙية لـ {0}.";Strings.OfficeOM.L_DataWriteError="خطأ ÙÙŠ كتابة البيانات";Strings.OfficeOM.L_NetworkProblemRetrieveFile="حالت مشكلة ÙÙŠ الشبكة دون استرداد الملÙ.";Strings.OfficeOM.L_MissingRequiredArguments="Ùقدان بعض الوسيطات المطلوبة";Strings.OfficeOM.L_DialogAlreadyOpened="Ùشلت العملية لأن هذه الوظيÙØ© الإضاÙية بها مربع حوار نشط بالÙعل.";Strings.OfficeOM.L_InvalidRequestContext="لا يمكن استخدام العنصر عبر سياقات طلب مختلÙØ©.";Strings.OfficeOM.L_NotSupported="الدالة {0} غير معتمدة.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Ùشلت العملية لأن هذه الوظيÙØ© الإضاÙية تتطلب رمزاً مميزاً للوصول.";Strings.OfficeOM.L_DataReadError="خطأ ÙÙŠ قراءة البيانات";Strings.OfficeOM.L_SSOClientError="حدث خطأ ÙÙŠ طلب المصادقة من Office.";Strings.OfficeOM.L_SelectionCannotBound="يتعذر الربط بالتحديد الحالي.";Strings.OfficeOM.L_ColIndexOutOfRange="إن قيمة Ùهرس العمود خارج النطاق المسموح به. استخدم قيمة (0 أو أعلى) تكون أصغر من عدد الأعمدة.";Strings.OfficeOM.L_InvalidGetRows="الصÙو٠المحددة غير صالحة.";Strings.OfficeOM.L_MissingParameter="معلمة Ù…Ùقودة";Strings.OfficeOM.L_RowIndexOutOfRange="إن قيمة Ùهرس الص٠خارج النطاق المسموح به. استخدم قيمة (0 أو أعلى) تكون أصغر من عدد الصÙÙˆÙ.";Strings.OfficeOM.L_DataNotMatchSelection="عنصر البيانات الذي تم توÙيره غير متواÙÙ‚ مع شكل التحديد الحالي أو أبعاده.";Strings.OfficeOM.L_BadSelectorString="لم يتم تنسيق السلسة التي تم تمريرها إلى المحدد بشكل سليم أو أنها غير معتمدة.";Strings.OfficeOM.L_InvalidCellsValue="تحتوي معلمة واحدة أو أكثر من معلمات الخلايا على قيم غير مسموح بها. تحقق من القيم مرة أخرى ثم أعد المحاولة.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="سماح";Strings.OfficeOM.L_NavOutOfBound="Ùشلت العملية لأن الÙهرس خارج النطاق.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported='لا يمكن استخدام معلمات الإحداثيات مع "جدول" بنوع الاندماج عندما يحتوي الجدول على خلايا مدمجة.';Strings.OfficeOM.L_RunMustReturnPromise='لم ترجع الوظيÙØ© الدÙعية التي تم تمريرها إلى أسلوب ".run" أي تعهد. يجب أن تÙرجع الوظيÙØ© أي تعهد، بحيث يمكن إصدار أي عناصر يتم تعقبها تلقائياً عند اكتمال العملية الدÙعية. عادةً، يمكن إرجاع التعهد بإرجاع الاستجابة من"context.sync()".';Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="العملية غير معتمدة على هذا النوع من الربط.";Strings.OfficeOM.L_InvalidDataObject="عنصر البيانات غير صالح";Strings.OfficeOM.L_InternalError="خطأ داخلي";Strings.OfficeOM.L_FormatValueOutOfRange="إن القيمة خارج النطاق المسموح به.";Strings.OfficeOM.L_CannotNavigateTo="إن العنصر موجود ÙÙŠ موقع حيث التنقل غير معتمد.";Strings.OfficeOM.L_SSOClientErrorMessage="حدث خطأ غير متوقع ÙÙŠ العميل.";Strings.OfficeOM.L_BrowserAPINotSupported="لا يعتمد هذا المستعرض API المطلوبة.";Strings.OfficeOM.L_ElementMissing="تعذر علينا تنسيق خلية الجدول لأن بعض قيم المعلمات Ù…Ùقودة. تحقق من المعلمات مرة أخرى ثم أعد المحاولة.";Strings.OfficeOM.L_DataNotMatchCoercionType="نوع عنصر البيانات المحدد غير متواÙÙ‚ مع التحديد الحالي.";Strings.OfficeOM.L_SettingsStaleError="خطأ ÙÙŠ الإعدادات القديمة";Strings.OfficeOM.L_NamedItemNotFound="العنصر المسمى غير موجود.";Strings.OfficeOM.L_InvalidAPICall="استدعاء API غير صالح";Strings.OfficeOM.L_InvalidFormatValue="تحتوي معلمة واحدة أو أكثر من معلمات التنسيق على قيم غير مسموح بها. تحقق من القيم مرة أخرى ثم أعد المحاولة.";Strings.OfficeOM.L_ConnectionFailureWithStatus="Ùشل الطلب برمز الحالة {0}.";Strings.OfficeOM.L_CustomXmlOutOfDateName="البيانات ليست حديثة";Strings.OfficeOM.L_Timeout="انقضت مهلة العملية.";Strings.OfficeOM.L_InvalidBinding="الربط غير صالح";Strings.OfficeOM.L_NoCapability="لا تملك الأذونات الكاÙية لهذا الإجراء.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="التطبيق {0} غير موجود. لم يتم استدعاء Microsoft.Office.WebExtension.initialize (السبب).";Strings.OfficeOM.L_SettingNameNotExist="اسم الإعداد المحدد غير موجود.";Strings.OfficeOM.L_SliceSizeNotSupported="حجم الشريحة المحدد غير معتمد.";Strings.OfficeOM.L_InvalidOrTimedOutSession="جلسة عمل غير صالحة أو انتهت مهلتها";Strings.OfficeOM.L_NotSupportedBindingType="نوع الربط المحدد {0} غير معتمد.";Strings.OfficeOM.L_CallbackNotAFunction="يجب أن يكون رد الاستدعاء من دالة النوع، وكان من النوع {0}.";Strings.OfficeOM.L_EventRegistrationError="خطأ ÙÙŠ تسجيل الأحداث";Strings.OfficeOM.L_DialogOK="مواÙÙ‚";Strings.OfficeOM.L_UserAborted="أوق٠المستخدم طلب المواÙقة قبل اكتماله.";Strings.OfficeOM.L_UserNotSignedIn="لم يسجل أي مستخدم دخوله إلى Office.";Strings.OfficeOM.L_NotSupportedEventType="نوع الحدث المحدد {0} غير معتمد.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported='لا يمكن استخدام معلمات الإحداثيات مع "جدول" بنوع الاندماج عندما يحتوي الجدول على خلايا مدمجة.';Strings.OfficeOM.L_InvalidSSOAddinMessage="API للهوية غير مدعمة لهذه الوظيÙØ© الإضاÙية.";Strings.OfficeOM.L_InvalidBindingOperation="عملية الربط غير صالحة";Strings.OfficeOM.L_InvalidSetColumns="الأعمدة المحددة غير صالحة.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="تحدد XPath التحديد إلى 1024 عنصراً.";Strings.OfficeOM.L_ShuttingDown="Ùشلت العملية لأن البيانات غير حديثة على الخادم.";Strings.OfficeOM.L_CannotWriteToSelection="لا يمكن الكتابة إلى التحديد الحالي.";Strings.OfficeOM.L_InvalidSetRows="الصÙو٠المحددة غير صالحة.";Strings.OfficeOM.L_UserAbortedMessage="لم يواÙÙ‚ المستخدم على أذونات الوظيÙØ© الإضاÙية.";Strings.OfficeOM.L_InValidOptionalArgument="وسيطة اختيارية غير صالحة";Strings.OfficeOM.L_EventHandlerAdditionFailed="Ùشل ÙÙŠ إضاÙØ© معالج الحدث.";Strings.OfficeOM.L_InvalidValue="قيمة غير صالحة";Strings.OfficeOM.L_InvalidGetRowColumnCounts="قيم rowCount أو columnCount المحددة غير صحيحة.";Strings.OfficeOM.L_NotImplemented="لم يتم تنÙيذ الدالة {0}.";Strings.OfficeOM.L_ActivityLimitReached="تم بلوغ حد النشاط.";Strings.OfficeOM.L_InvalidSetStartRowColumn="قيم startRow أو startColumn المحددة غير صحيحة.";Strings.OfficeOM.L_SettingsAreStale="تعذر Ø­Ùظ الإعدادات نظراً لأنها غير حديثة.";Strings.OfficeOM.L_NewWindowCrossZone="إعدادات الأمان ÙÙŠ المستعرض تحول دون إنشاء مربع حوار. حاول استخدام مستعرض مختلÙØŒ أو {0} وبذلك يكونا '{1}' والمجال المعروض ÙÙŠ شريط العنوان ÙÙŠ Ù†Ùس منطقة الأمان.";Strings.OfficeOM.L_APINotSupported="API غير معتمدة";Strings.OfficeOM.L_UnknownBindingType="نوع الربط غير معتمد.";Strings.OfficeOM.L_SpecifiedIdNotExist="إن المعر٠المحدد غير موجود.";Strings.OfficeOM.L_InvalidBindingError="خطأ الربط غير صالح";Strings.OfficeOM.L_InvalidApiArgumentsMessage="وسيطات الإدخال غير صالحة.";Strings.OfficeOM.L_ReadSettingsError="خطأ ÙÙŠ إعدادات القراءة";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="البيانات غير محدثة. قم باسترداد العنصر مرة أخرى.";Strings.OfficeOM.L_PropertyDoesNotExist='لا توجد الخاصية "{0}" ÙÙŠ العنصر.';Strings.OfficeOM.L_GetDataParametersConflict="تعارض المعلمات المحددة.";Strings.OfficeOM.L_MultipleNamedItemFound="تم العثور على عدة عناصر بالاسم Ù†Ùسه.";Strings.OfficeOM.L_InitializeNotReady="لم يتم تحميل Office.js بشكل كامل بعد. يرجى إعادة المحاولة لاحقاً للتأكد من إضاÙØ© رمز التهيئة ÙÙŠ وظيÙØ© Office.initialize.";Strings.OfficeOM.L_InvalidGrantMessage="لم يتم منح الإذن لهذه الوظيÙØ© الإضاÙية.";Strings.OfficeOM.L_CannotRegisterEvent="تعذر تسجيل معالج الأحداث.";Strings.OfficeOM.L_CloseFileBeforeRetrieve="استدعاء closeAsync على المل٠الحالي قبل استرداد آخر.";Strings.OfficeOM.L_InvalidResourceUrlMessage="تم تحديد Url غير صالح للمورد ÙÙŠ البيان.";Strings.OfficeOM.L_DisplayDialogError="عرض خطأ مربع الحوار";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="نوع هوية المستخدم غير مدعم.";Strings.OfficeOM.L_DataNotMatchBindingType="عنصر البيانات المحدد غير متواÙÙ‚ مع نوع الربط.";Strings.OfficeOM.L_BindingNotExist="الربط المحدد غير موجود.";Strings.OfficeOM.L_InvalidArgument='الوسيطة "{0}" لا تعمل لهذه الحالة أو Ù…Ùقودة أو ليست بتنسيق صحيح.';Strings.OfficeOM.L_UserClickIgnore="اختار المستخدم تجاهل مربع الحوار.";Strings.OfficeOM.L_InvalidSelectionForBindingType="لا يمكن إنشاء ربط مع التحديد الحالي ونوع الربط المحدد." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_SSOClientErrorMessage="حدث خطأ غير متوقع ÙÙŠ العميل.";Strings.OfficeOM.L_MissingRequiredArguments="Ùقدان بعض الوسيطات المطلوبة";Strings.OfficeOM.L_BadSelectorString="لم يتم تنسيق السلسة التي تم تمريرها إلى المحدد بشكل سليم أو أنها غير معتمدة.";Strings.OfficeOM.L_InvalidGetRows="الصÙو٠المحددة غير صالحة.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="تتطلب الوظيÙØ© الإضاÙية بالÙعل رمزاً مميزاً للوصول.";Strings.OfficeOM.L_ColIndexOutOfRange="إن قيمة Ùهرس العمود خارج النطاق المسموح به. استخدم قيمة (0 أو أعلى) تكون أصغر من عدد الأعمدة.";Strings.OfficeOM.L_NotImplemented="لم يتم تنÙيذ الدالة {0}.";Strings.OfficeOM.L_InvalidColumnsForBinding="الأعمدة المحددة غير صالحة.";Strings.OfficeOM.L_InvalidFormatValue="تحتوي معلمة واحدة أو أكثر من معلمات التنسيق على قيم غير مسموح بها. تحقق من القيم مرة أخرى ثم أعد المحاولة.";Strings.OfficeOM.L_InvalidBindingError="خطأ الربط غير صالح";Strings.OfficeOM.L_Timeout="انقضت مهلة العملية.";Strings.OfficeOM.L_ShuttingDown="Ùشلت العملية لأن البيانات غير حديثة على الخادم.";Strings.OfficeOM.L_CustomFunctionNameCannotSplit="يجب أن يحتوي اسم الدالة على مساحة اسم غير Ùارغة واسم قصير غير Ùارغ.";Strings.OfficeOM.L_SettingsCannotSave="تعذر Ø­Ùظ الإعدادات.";Strings.OfficeOM.L_InvalidBinding="الربط غير صالح";Strings.OfficeOM.L_InvalidArgument='الوسيطة "{0}" لا تعمل لهذه الحالة أو Ù…Ùقودة أو ليست بتنسيق صحيح.';Strings.OfficeOM.L_BindingToMultipleSelection="لا يتم اعتماد التحديدات المتقطعة.";Strings.OfficeOM.L_DialogNavigateError="خطأ ÙÙŠ التنقل ÙÙŠ مربع الحوار";Strings.OfficeOM.L_InvalidFormat="خطأ تنسيق غير صالح";Strings.OfficeOM.L_GetSelectionNotSupported="التحديد الحالي غير معتمد.";Strings.OfficeOM.L_DialogAddressNotTrusted="لم يتم تضمين مجال عنوان URL ÙÙŠ عنصر AppDomains ÙÙŠ البيان.";Strings.OfficeOM.L_MultipleNamedItemFound="تم العثور على عدة عناصر بالاسم Ù†Ùسه.";Strings.OfficeOM.L_PropertyNotLoaded="الخاصية '{0}' غير متاحة. قبل قراءة قيمة الخاصية، قم باستدعاء أسلوب التحميل على العنصر المضمن وقم باستدعاء \"context.sync()‎\" ÙÙŠ سياق الطلب المقترن.";Strings.OfficeOM.L_FormatValueOutOfRange="إن القيمة خارج النطاق المسموح به.";Strings.OfficeOM.L_APINotSupported="API غير معتمدة";Strings.OfficeOM.L_DialogInvalidScheme="نظام عنوان URL غير مدعوم. استخدم HTTPS بدلاً من ذلك.";Strings.OfficeOM.L_UserClickIgnore="اختار المستخدم تجاهل مربع الحوار.";Strings.OfficeOM.L_InvalidBindingOperation="عملية الربط غير صالحة";Strings.OfficeOM.L_UnsupportedEnumerationMessage="قائمة التعداد غير معتمدة ÙÙŠ تطبيق المضي٠الحالي.";Strings.OfficeOM.L_NamedItemNotFound="العنصر المسمى غير موجود.";Strings.OfficeOM.L_CannotRegisterEvent="تعذر تسجيل معالج الأحداث.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="تحدد XPath التحديد إلى 1024 عنصراً.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="تم الوصول إلى الحد الأقصى للتحديد";Strings.OfficeOM.L_InvalidGrant="لم يتم منح التÙويض المسبق.";Strings.OfficeOM.L_InvalidGetStartRowColumn="قيم startRow أو startColumn المحددة غير صحيحة.";Strings.OfficeOM.L_NotSupportedEventType="نوع الحدث المحدد {0} غير معتمد.";Strings.OfficeOM.L_CallbackNotAFunction="يجب أن يكون رد الاستدعاء من دالة النوع، وكان من النوع {0}.";Strings.OfficeOM.L_SetDataParametersConflict="تعارض المعلمات المحددة.";Strings.OfficeOM.L_TooManyArguments="العديد من الوسيطات";Strings.OfficeOM.L_NonUniformPartialSetNotSupported='لا يمكن استخدام معلمات الإحداثيات مع "جدول" بنوع الاندماج عندما يحتوي الجدول على خلايا مدمجة.';Strings.OfficeOM.L_CannotNavigateTo="إن العنصر موجود ÙÙŠ موقع حيث التنقل غير معتمد.";Strings.OfficeOM.L_InvalidOrTimedOutSession="جلسة عمل غير صالحة أو انتهت مهلتها";Strings.OfficeOM.L_GetDataParametersConflict="تعارض المعلمات المحددة.";Strings.OfficeOM.L_SliceSizeNotSupported="حجم الشريحة المحدد غير معتمد.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="الرجاء إجراء تحديد.";Strings.OfficeOM.L_SaveSettingsError="خطأ ÙÙŠ إعدادات الحÙظ";Strings.OfficeOM.L_InvalidSelectionForBindingType="لا يمكن إنشاء ربط مع التحديد الحالي ونوع الربط المحدد.";Strings.OfficeOM.L_InvalidCellsValue="تحتوي معلمة واحدة أو أكثر من معلمات الخلايا على قيم غير مسموح بها. تحقق من القيم مرة أخرى ثم أعد المحاولة.";Strings.OfficeOM.L_InValidOptionalArgument="وسيطة اختيارية غير صالحة";Strings.OfficeOM.L_InvalidGetColumns="الأعمدة المحددة غير صالحة.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="ملاحظة: ÙŠÙقترح أن تكون مجموعات التنسيق المعينة بواسطة استدعاء API الخاص بالتنسيق أقل من 100.";Strings.OfficeOM.L_EventRegistrationError="خطأ ÙÙŠ تسجيل الأحداث";Strings.OfficeOM.L_RunMustReturnPromise='لم ترجع الوظيÙØ© الدÙعية التي تم تمريرها إلى أسلوب ".run" أي تعهد. يجب أن تÙرجع الوظيÙØ© أي تعهد، بحيث يمكن إصدار أي عناصر يتم تعقبها تلقائياً عند اكتمال العملية الدÙعية. عادةً، يمكن إرجاع التعهد بإرجاع الاستجابة من"context.sync()".';Strings.OfficeOM.L_InvalidReadForBlankRow="إن الص٠المحدد Ùارغ.";Strings.OfficeOM.L_TooManyOptionalObjects="عناصر اختيارية متعددة ÙÙŠ قائمة المعلمات";Strings.OfficeOM.L_TooManyOptionalFunction="دالات اختيارية متعددة ÙÙŠ قائمة المعلمات";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="التطبيق {0} غير موجود. لم يتم استدعاء Microsoft.Office.WebExtension.initialize (السبب).";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="يجب أن يكون المحتوى المحدد بتنسيق الجدول. قم بتنسيق البيانات كجدول وحاول مرة أخرى.";Strings.OfficeOM.L_InternalError="خطأ داخلي";Strings.OfficeOM.L_NotSupported="الدالة {0} غير معتمدة.";Strings.OfficeOM.L_DataNotMatchBindingType="عنصر البيانات المحدد غير متواÙÙ‚ مع نوع الربط.";Strings.OfficeOM.L_APICallFailed="Ùشل استدعاء API";Strings.OfficeOM.L_InvalidResourceUrl="تم إدخال Url غير صالح لمورد التطبيق.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage="Ùشلت العملية لأن هذه الوظيÙØ© الإضاÙية لا تدعم مواÙقة المستخدم ÙÙŠ هذه الÙئة";Strings.OfficeOM.L_InvalidTableOptionValue="تحتوي معلمة واحدة أو أكثر من معلمات tableOptions على قيم غير مسموح بها. تحقق من القيم مرة أخرى ثم أعد المحاولة.";Strings.OfficeOM.L_EventHandlerRemovalFailed="Ùشلت عملية إزالة معالج الحدث.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="منعتنا قيود المستعرض من إنشاء مربع الحوار. مجال مربع الحوار ومجال مضي٠الوظيÙØ© الإضاÙية ليسا ÙÙŠ Ù†Ùس منطقة الأمان.";Strings.OfficeOM.L_RequestTokenUnavailable="تم إحباط API هذه لإبطاء تكرار المكالمة.";Strings.OfficeOM.L_InvalidCoercion="نوع الاندماج غير صالح";Strings.OfficeOM.L_InvalidResourceUrlMessage="تم تحديد Url غير صالح للمورد ÙÙŠ البيان.";Strings.OfficeOM.L_SSOClientError="حدث خطأ ÙÙŠ طلب المصادقة من Office.";Strings.OfficeOM.L_NotSupportedBindingType="نوع الربط المحدد {0} غير معتمد.";Strings.OfficeOM.L_DialogOK="مواÙÙ‚";Strings.OfficeOM.L_OutOfRange="خارج النطاق";Strings.OfficeOM.L_ElementMissing="تعذر علينا تنسيق خلية الجدول لأن بعض قيم المعلمات Ù…Ùقودة. تحقق من المعلمات مرة أخرى ثم أعد المحاولة.";Strings.OfficeOM.L_InvalidSetColumns="الأعمدة المحددة غير صالحة.";Strings.OfficeOM.L_MissingParameter="معلمة Ù…Ùقودة";Strings.OfficeOM.L_ValueNotLoaded='لم يتم تحميل قيمة عنصر النتيجة بعد. قم باستدعاء "context.sync()" ÙÙŠ سياق الطلب المقترن قبل قراءة خاصية القيمة.';Strings.OfficeOM.L_PermissionDenied="تم رÙض الإذن";Strings.OfficeOM.L_SelectionCannotBound="يتعذر الربط بالتحديد الحالي.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="نوع الاندماج المحدد غير متواÙÙ‚ مع هذا النوع من الربط.";Strings.OfficeOM.L_SSOConnectionLostError="A connection was lost during the sign in process.";Strings.OfficeOM.L_ConnectionFailureWithStatus="Ùشل الطلب برمز الحالة {0}.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Ùشل ÙÙŠ إضاÙØ© معالج الحدث.";Strings.OfficeOM.L_InternalErrorDescription="حدث خطأ داخلي.";Strings.OfficeOM.L_ActivityLimitReached="تم بلوغ حد النشاط.";Strings.OfficeOM.L_OverwriteWorksheetData="Ùشلت عملية التعيين لأن عنصر البيانات الذي تم توÙيره سيكتب Ùوق البيانات أو سينقلها.";Strings.OfficeOM.L_SSOServerErrorMessage="حدث خطأ غير متوقع ÙÙŠ الخادم.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported='لا يمكن استخدام معلمات الإحداثيات مع "جدول" بنوع الاندماج عندما يحتوي الجدول على خلايا مدمجة.';Strings.OfficeOM.L_CustomXmlOutOfDateName="البيانات ليست حديثة";Strings.OfficeOM.L_InvalidSetRows="الصÙو٠المحددة غير صالحة.";Strings.OfficeOM.L_RowIndexOutOfRange="إن قيمة Ùهرس الص٠خارج النطاق المسموح به. استخدم قيمة (0 أو أعلى) تكون أصغر من عدد الصÙÙˆÙ.";Strings.OfficeOM.L_SSOConnectionLostErrorMessage="A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="محاولة تعيين خاصية '{0}' للقراءة Ùقط.";Strings.OfficeOM.L_ReadSettingsError="خطأ ÙÙŠ إعدادات القراءة";Strings.OfficeOM.L_CloseFileBeforeRetrieve="استدعاء closeAsync على المل٠الحالي قبل استرداد آخر.";Strings.OfficeOM.L_NavOutOfBound="Ùشلت العملية لأن الÙهرس خارج النطاق.";Strings.OfficeOM.L_ConnectionFailureWithDetails="Ùشل الطلب برمز الحالة {0} ورمز الخطأ {1} وظهرت رسالة الخطأ التالية: {2}";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="انتهت مدة صلاحية جلسة عمل Office Online أو تعتبر غير صالحة. للمتابعة، قم بتحديث الصÙحة.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="التحديد الحالي غير متواÙÙ‚ مع نوع الاندماج المحدد.";Strings.OfficeOM.L_DataStale="البيانات غير حديثة";Strings.OfficeOM.L_FileTypeNotSupported="نوع المل٠المحدد غير معتمد.";Strings.OfficeOM.L_InvalidNode="العقدة غير صالحة";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory="لا تدعم هذه الوظيÙØ© الإضاÙية مواÙقة المستخدم.";Strings.OfficeOM.L_UnsupportedEnumeration="قائمة تعداد غير معتمدة";Strings.OfficeOM.L_DataWriteReminder="تذكير بكتابة البيانات";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="سماح";Strings.OfficeOM.L_InvalidApiCallInContext="استدعاء API غير صالح ÙÙŠ السياق الحالي.";Strings.OfficeOM.L_CustomFunctionImplementationMissing="يجب أن تحتوي الخاصية التي تحمل هذا الاسم ÙÙŠ Excel.CustomFunctions والتي تمثل تعري٠الوظيÙØ© على الخاصية 'call' التي تقوم بتنÙيذ الوظيÙØ©.";Strings.OfficeOM.L_SettingsAreStale="تعذر Ø­Ùظ الإعدادات نظراً لأنها غير حديثة.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="نوع الربط المحدد غير متواÙÙ‚ مع العنصر المسمى الموÙر.";Strings.OfficeOM.L_FunctionCallFailed="Ùشل استدعاء الدالة {0}ØŒ رمز الخطأ: {1}.";Strings.OfficeOM.L_InvalidOperationInCellEditMode="Excel الآن ÙÙŠ وضع تحرير الخلية. الرجاء إنهاء وضع التحرير بالضغط على Ù…Ùتاح الإدخال ENTER أو Ù…Ùتاح TAB أو تحديد خلية أخرى، ثم إعادة المحاولة.";Strings.OfficeOM.L_UserAborted="أوق٠المستخدم طلب المواÙقة قبل اكتماله.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="العملية غير معتمدة على هذا النوع من الربط.";Strings.OfficeOM.L_DocumentReadOnly="العملية المطلوبة غير مسموح بها ÙÙŠ وضع المستند الحالي.";Strings.OfficeOM.L_InvalidValue="قيمة غير صالحة";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Ùشلت العملية لأن هذه الوظيÙØ© الإضاÙية تتطلب رمزاً مميزاً للوصول.";Strings.OfficeOM.L_InvalidSSOAddinMessage="API للهوية غير مدعمة لهذه الوظيÙØ© الإضاÙية.";Strings.OfficeOM.L_BindingNotExist="الربط المحدد غير موجود.";Strings.OfficeOM.L_GetDataIsTooLarge="مجموعة البيانات المطلوبة كبيرة جداً.";Strings.OfficeOM.L_SetDataIsTooLarge="عنصر البيانات المحدد طويل جداً.";Strings.OfficeOM.L_EventHandlerNotExist="لم يتم العثور على معالج الأحداث المحدد لهذا الربط.";Strings.OfficeOM.L_DisplayDialogError="عرض خطأ مربع الحوار";Strings.OfficeOM.L_DataNotMatchSelection="عنصر البيانات الذي تم توÙيره غير متواÙÙ‚ مع شكل التحديد الحالي أو أبعاده.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="تكوين المستعرض";Strings.OfficeOM.L_RedundantCallbackSpecification="لا يمكن تعيين رد الاستدعاء ÙÙŠ كل من قائمة الوسائط ÙˆÙÙŠ العنصر الاختياري.";Strings.OfficeOM.L_RequestTimeout="استغرقت المكالمة وقتاً طويلاً وبالتالي يتعذر تنÙيذها.";Strings.OfficeOM.L_OsfControlTypeNotSupported="نوع OsfControl غير معتمد.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="ملاحظة: ÙŠÙقترح أن يكون عدد الخلايا الموجود ÙÙŠ جدول أقل من 20000 خلية.";Strings.OfficeOM.L_InvalidObjectPath='لا يعمل مسار العنصر "{0}" لما تحاول القيام به. إذا كنت تستخدم العنصر عبر عدة استدعاءات "context.sync" وخارج التنÙيذ المتسلسل لدÙعة "‎.run"ØŒ يرجى استخدام الأسلوبين "context.trackedObjects.add()‎" Ùˆ"context.trackedObjects.remove()‎" لإدارة مدة بقاء العنصر.';Strings.OfficeOM.L_CustomXmlOutOfDateMessage="البيانات غير محدثة. قم باسترداد العنصر مرة أخرى.";Strings.OfficeOM.L_InvalidAPICall="استدعاء API غير صالح";Strings.OfficeOM.L_BindingCreationError="خطأ ÙÙŠ إنشاء الربط";Strings.OfficeOM.L_DataReadError="خطأ ÙÙŠ قراءة البيانات";Strings.OfficeOM.L_InvalidGetRowColumnCounts="قيم rowCount أو columnCount المحددة غير صحيحة.";Strings.OfficeOM.L_TooManyIncompleteRequests="انتظر حتى اكتمال المكالمة السابقة.";Strings.OfficeOM.L_InvalidParameters="للدالة {0} معلمات غير صالحة.";Strings.OfficeOM.L_InitializeNotReady="لم يتم تحميل Office.js بشكل كامل بعد. يرجى إعادة المحاولة لاحقاً للتأكد من إضاÙØ© رمز التهيئة ÙÙŠ وظيÙØ© Office.initialize.";Strings.OfficeOM.L_DataWriteError="خطأ ÙÙŠ كتابة البيانات";Strings.OfficeOM.L_SettingNameNotExist="اسم الإعداد المحدد غير موجود.";Strings.OfficeOM.L_CoercionTypeNotSupported="نوع الاندماج المحدد غير معتمد.";Strings.OfficeOM.L_InvalidDataObject="عنصر البيانات غير صالح";Strings.OfficeOM.L_NoCapability="لا تملك الأذونات الكاÙية لهذا الإجراء.";Strings.OfficeOM.L_CustomXmlError="خطأ ÙÙŠ XML المخصص.";Strings.OfficeOM.L_CustomFunctionDefinitionMissing="يجب وجود خاصية تحمل هذا الاسم تمثل تعري٠الوظيÙØ© ÙÙŠ Excel.CustomFunctions.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="حالت مشكلة ÙÙŠ الشبكة دون استرداد الملÙ.";Strings.OfficeOM.L_NewWindowCrossZone="إعدادات الأمان ÙÙŠ المستعرض تحول دون إنشاء مربع حوار. حاول استخدام مستعرض مختلÙØŒ أو {0} وبذلك يكونا '{1}' والمجال المعروض ÙÙŠ شريط العنوان ÙÙŠ Ù†Ùس منطقة الأمان.";Strings.OfficeOM.L_CustomXmlNodeNotFound="لم يتم العثور على العقدة المحددة.";Strings.OfficeOM.L_MemoryLimit="تجاوز حد الذاكرة";Strings.OfficeOM.L_BrowserAPINotSupported="لا يعتمد هذا المستعرض API المطلوبة.";Strings.OfficeOM.L_SpecifiedIdNotExist="إن المعر٠المحدد غير موجود.";Strings.OfficeOM.L_DialogAlreadyOpened="Ùشلت العملية لأن هذه الوظيÙØ© الإضاÙية بها مربع حوار نشط بالÙعل.";Strings.OfficeOM.L_CustomFunctionNameContainsBadChars="يمكن أن يحتوي اسم الدالة على أحر٠وأرقام وتسطير سÙلي ونقاط.";Strings.OfficeOM.L_SettingsStaleError="خطأ ÙÙŠ الإعدادات القديمة";Strings.OfficeOM.L_UserNotSignedIn="لم يسجل أي مستخدم دخوله إلى Office.";Strings.OfficeOM.L_NetworkProblem="مشكلة ÙÙŠ الشبكة";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="تجاهل";Strings.OfficeOM.L_OperationNotSupported="العملية غير معتمدة.";Strings.OfficeOM.L_InvalidArgumentGeneric="الوسيطة (الوسيطات) التي خضعت للدالة لا تتماشى مع هذا الموق٠أو Ù…Ùقودة أو ليست بالتنسيق الصحيح.";Strings.OfficeOM.L_DataNotMatchBindingSize="لا يتطابق عنصر البيانات الذي تم توÙيره مع حجم التحديد الحالي.";Strings.OfficeOM.L_DataNotMatchCoercionType="نوع عنصر البيانات المحدد غير متواÙÙ‚ مع التحديد الحالي.";Strings.OfficeOM.L_UserAbortedMessage="لم يواÙÙ‚ المستخدم على أذونات الوظيÙØ© الإضاÙية.";Strings.OfficeOM.L_UnsupportedUserIdentity="نوع هوية المستخدم غير مدعم.";Strings.OfficeOM.L_PropertyDoesNotExist='لا توجد الخاصية "{0}" ÙÙŠ العنصر.';Strings.OfficeOM.L_InvalidDataFormat="تنسيق عنصر البيانات المحدد غير صحيح.";Strings.OfficeOM.L_UnknownBindingType="نوع الربط غير معتمد.";Strings.OfficeOM.L_AppNameNotExist="لا يوجد اسم وظيÙØ© إضاÙية لـ {0}.";Strings.OfficeOM.L_SSOServerError="حدث خطأ ÙÙŠ موÙر المصادقة.";Strings.OfficeOM.L_ShowWindowDialogNotification="يريد {0} عرض ناÙذة جديدة.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="نوع هوية المستخدم غير مدعم.";Strings.OfficeOM.L_IndexOutOfRange="الÙهرس خارج النطاق.";Strings.OfficeOM.L_InvalidGrantMessage="لم يتم منح الإذن لهذه الوظيÙØ© الإضاÙية.";Strings.OfficeOM.L_UnsupportedDataObject="نوع عنصر البيانات الذي تم توÙيره غير معتمد.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="يتعذر تطبيق التغييرات التي تم إجراؤها على خاصية '{0}' من خلال أسلوب \"object.set\".";Strings.OfficeOM.L_DialogRequireHTTPS="بروتوكول HTTP غير مدعوم. استخدم HTTPS بدلاً من ذلك";Strings.OfficeOM.L_CannotWriteToSelection="لا يمكن الكتابة إلى التحديد الحالي.";Strings.OfficeOM.L_ApiNotFoundDetails="الأسلوب أو الخاصية {0} هي جزء من مجموعة متطلبات {1} وهي غير متوÙرة ÙÙŠ الإصدار {2}.";Strings.OfficeOM.L_InvalidRequestContext="لا يمكن استخدام العنصر عبر سياقات طلب مختلÙØ©.";Strings.OfficeOM.L_InvalidSetStartRowColumn="قيم startRow أو startColumn المحددة غير صحيحة.";Strings.OfficeOM.L_FormattingReminder="تذكير بالتنسيق";Strings.OfficeOM.L_InvalidApiArgumentsMessage="وسيطات الإدخال غير صالحة.";Strings.OfficeOM.L_HostError="خطأ المضيÙ" \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/ar-sa/outlook_strings.debug.js b/node_modules/@microsoft/office-js/dist/ar-sa/outlook_strings.debug.js index f4b78f9..d7fe009 100644 --- a/node_modules/@microsoft/office-js/dist/ar-sa/outlook_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/ar-sa/outlook_strings.debug.js @@ -1,34 +1,35 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("_u"); _u.ExtensibilityStrings = function() { }; _u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings"); -_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "تم تغيير العنصر المحدد."; -_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "تتعذر إضاÙØ© المرÙقات لأن الرسالة تحتوي بالÙعل على العدد الأقصى من المرÙقات"; -_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "إن عنواناً واحد أو أكثر من عناوين البريد الإلكتروني التي قدمتها طويل(Ø©) جداً."; -_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "كان معر٠المرÙÙ‚ غير صالح."; -_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "تتعذر إضاÙØ© المرÙÙ‚ لأنه كبير جداً."; +_u.ExtensibilityStrings.l_InvalidEventDates_Text = "يقع تاريخ الانتهاء قبل تاريخ البدء."; +_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "كان مسار المرÙÙ‚ غير صالح."; _u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "لا يمكن أن يتجاوز إجمالي عدد المستلمين ÙÙŠ الحقل {0}."; -_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "لا تتطابق المعلمات المتوÙرة مع التنسيق المتوقع."; -_u.ExtensibilityStrings.l_InternalProtocolError_Text = 'خطأ بروتوكول داخلي: "{0}".'; _u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "لا يمكن حذ٠المرÙÙ‚ لأنه يتعذر العثور عليه مع Ùهرس المرÙÙ‚."; -_u.ExtensibilityStrings.l_InvalidDate_Text = "لا يتم حل الإدخال إلى تاريخ صالح."; -_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "قام المستخدم بتغيير موضع المؤشر أثناء إدراج البيانات."; -_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "يتجاوز الطلب حد الحجم الذي يبلغ 1 ميغابايت. يرجى تعديل طلب EWS الخاص بك."; -_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "إن اسماً واحداً أو أكثر من أسماء العرض التي قدمتها طويل(Ø©) جداً."; +_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "لا تتطابق المعلمات المتوÙرة مع التنسيق المتوقع."; +_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "خطأ ÙÙŠ المرÙقات"; +_u.ExtensibilityStrings.l_InternalFormatError_Text = "حدث خطأ ÙÙŠ التنسيق الداخلي."; +_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "Ùشلت عملية التحقق من سلامة مستند HTML."; +_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = 'الإذن غير المقيّد مطلوب لاستدعاء الأسلوب: "{0}".'; _u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "تتعذر إضاÙØ© المرÙÙ‚ إلى العنصر."; _u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "لا يمكن حذ٠المرÙÙ‚ من العنصر."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = 'الإذن غير المقيّد مطلوب لاستدعاء الأسلوب: "{0}".'; -_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "Ùشلت عملية التحقق من سلامة مستند HTML."; -_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "خطأ ÙÙŠ كتابة البيانات"; -_u.ExtensibilityStrings.l_OffsetNotfound_Text = "تعذر العثور على إزاحة للطابع الزمني."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "الإذن غير المقيّد مطلوب للوصول إلى الأعضاء المحميين لـ JavaScript API من Office."; -_u.ExtensibilityStrings.l_InvalidEventDates_Text = "يقع تاريخ الانتهاء قبل تاريخ البدء."; -_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "كان مسار المرÙÙ‚ غير صالح."; +_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "إن عنواناً واحد أو أكثر من عناوين البريد الإلكتروني التي قدمتها طويل(Ø©) جداً."; +_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "أزال المستخدم المرÙÙ‚ قبل اكتمال التحميل."; _u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "تتعذر إضاÙØ© المرÙقات أثناء استرداد الرد الكامل إعادة التوجيه من الخادم."; -_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "خطأ ÙÙŠ المرÙقات"; -_u.ExtensibilityStrings.l_InvalidEndTime_Text = "لا يمكن أن يكون وقت النهاية قبل وقت البدء."; _u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "لم يتم توÙير مستلمين صالحين."; -_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "أزال المستخدم المرÙÙ‚ قبل اكتمال التحميل."; -_u.ExtensibilityStrings.l_InternalFormatError_Text = "حدث خطأ ÙÙŠ التنسيق الداخلي." +_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "يتجاوز الطلب حد الحجم الذي يبلغ 1 ميغابايت. يرجى تعديل طلب EWS الخاص بك."; +_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "تتعذر إضاÙØ© المرÙقات لأن الرسالة تحتوي بالÙعل على العدد الأقصى من المرÙقات"; +_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "الإذن غير المقيّد مطلوب للوصول إلى الأعضاء المحميين لـ JavaScript API من Office."; +_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "خطأ ÙÙŠ كتابة البيانات"; +_u.ExtensibilityStrings.l_InternalProtocolError_Text = 'خطأ بروتوكول داخلي: "{0}".'; +_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "تتعذر إضاÙØ© المرÙÙ‚ لأنه كبير جداً."; +_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "تم تغيير العنصر المحدد."; +_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "قام المستخدم بتغيير موضع المؤشر أثناء إدراج البيانات."; +_u.ExtensibilityStrings.l_InvalidDate_Text = "لا يتم حل الإدخال إلى تاريخ صالح."; +_u.ExtensibilityStrings.l_InvalidEndTime_Text = "لا يمكن أن يكون وقت النهاية قبل وقت البدء."; +_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "كان معر٠المرÙÙ‚ غير صالح."; +_u.ExtensibilityStrings.l_OffsetNotfound_Text = "تعذر العثور على إزاحة للطابع الزمني."; +_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "إن اسماً واحداً أو أكثر من أسماء العرض التي قدمتها طويل(Ø©) جداً." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/ar-sa/outlook_strings.js b/node_modules/@microsoft/office-js/dist/ar-sa/outlook_strings.js index 123495d..1ab3d91 100644 --- a/node_modules/@microsoft/office-js/dist/ar-sa/outlook_strings.js +++ b/node_modules/@microsoft/office-js/dist/ar-sa/outlook_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="تم تغيير العنصر المحدد.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="تتعذر إضاÙØ© المرÙقات لأن الرسالة تحتوي بالÙعل على العدد الأقصى من المرÙقات";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="إن عنواناً واحد أو أكثر من عناوين البريد الإلكتروني التي قدمتها طويل(Ø©) جداً.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="كان معر٠المرÙÙ‚ غير صالح.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="تتعذر إضاÙØ© المرÙÙ‚ لأنه كبير جداً.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="لا يمكن أن يتجاوز إجمالي عدد المستلمين ÙÙŠ الحقل {0}.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="لا تتطابق المعلمات المتوÙرة مع التنسيق المتوقع.";_u.ExtensibilityStrings.l_InternalProtocolError_Text='خطأ بروتوكول داخلي: "{0}".';_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="لا يمكن حذ٠المرÙÙ‚ لأنه يتعذر العثور عليه مع Ùهرس المرÙÙ‚.";_u.ExtensibilityStrings.l_InvalidDate_Text="لا يتم حل الإدخال إلى تاريخ صالح.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="قام المستخدم بتغيير موضع المؤشر أثناء إدراج البيانات.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="يتجاوز الطلب حد الحجم الذي يبلغ 1 ميغابايت. يرجى تعديل طلب EWS الخاص بك.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="إن اسماً واحداً أو أكثر من أسماء العرض التي قدمتها طويل(Ø©) جداً.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="تتعذر إضاÙØ© المرÙÙ‚ إلى العنصر.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="لا يمكن حذ٠المرÙÙ‚ من العنصر.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text='الإذن غير المقيّد مطلوب لاستدعاء الأسلوب: "{0}".';_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="Ùشلت عملية التحقق من سلامة مستند HTML.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="خطأ ÙÙŠ كتابة البيانات";_u.ExtensibilityStrings.l_OffsetNotfound_Text="تعذر العثور على إزاحة للطابع الزمني.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="الإذن غير المقيّد مطلوب للوصول إلى الأعضاء المحميين لـ JavaScript API من Office.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="يقع تاريخ الانتهاء قبل تاريخ البدء.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="كان مسار المرÙÙ‚ غير صالح.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="تتعذر إضاÙØ© المرÙقات أثناء استرداد الرد الكامل إعادة التوجيه من الخادم.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="خطأ ÙÙŠ المرÙقات";_u.ExtensibilityStrings.l_InvalidEndTime_Text="لا يمكن أن يكون وقت النهاية قبل وقت البدء.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="لم يتم توÙير مستلمين صالحين.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="أزال المستخدم المرÙÙ‚ قبل اكتمال التحميل.";_u.ExtensibilityStrings.l_InternalFormatError_Text="حدث خطأ ÙÙŠ التنسيق الداخلي." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_InvalidEventDates_Text="يقع تاريخ الانتهاء قبل تاريخ البدء.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="كان مسار المرÙÙ‚ غير صالح.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="لا يمكن أن يتجاوز إجمالي عدد المستلمين ÙÙŠ الحقل {0}.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="لا يمكن حذ٠المرÙÙ‚ لأنه يتعذر العثور عليه مع Ùهرس المرÙÙ‚.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="لا تتطابق المعلمات المتوÙرة مع التنسيق المتوقع.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="خطأ ÙÙŠ المرÙقات";_u.ExtensibilityStrings.l_InternalFormatError_Text="حدث خطأ ÙÙŠ التنسيق الداخلي.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="Ùشلت عملية التحقق من سلامة مستند HTML.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text='الإذن غير المقيّد مطلوب لاستدعاء الأسلوب: "{0}".';_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="تتعذر إضاÙØ© المرÙÙ‚ إلى العنصر.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="لا يمكن حذ٠المرÙÙ‚ من العنصر.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="إن عنواناً واحد أو أكثر من عناوين البريد الإلكتروني التي قدمتها طويل(Ø©) جداً.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="أزال المستخدم المرÙÙ‚ قبل اكتمال التحميل.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="تتعذر إضاÙØ© المرÙقات أثناء استرداد الرد الكامل إعادة التوجيه من الخادم.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="لم يتم توÙير مستلمين صالحين.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="يتجاوز الطلب حد الحجم الذي يبلغ 1 ميغابايت. يرجى تعديل طلب EWS الخاص بك.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="تتعذر إضاÙØ© المرÙقات لأن الرسالة تحتوي بالÙعل على العدد الأقصى من المرÙقات";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="الإذن غير المقيّد مطلوب للوصول إلى الأعضاء المحميين لـ JavaScript API من Office.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="خطأ ÙÙŠ كتابة البيانات";_u.ExtensibilityStrings.l_InternalProtocolError_Text='خطأ بروتوكول داخلي: "{0}".';_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="تتعذر إضاÙØ© المرÙÙ‚ لأنه كبير جداً.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="تم تغيير العنصر المحدد.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="قام المستخدم بتغيير موضع المؤشر أثناء إدراج البيانات.";_u.ExtensibilityStrings.l_InvalidDate_Text="لا يتم حل الإدخال إلى تاريخ صالح.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="لا يمكن أن يكون وقت النهاية قبل وقت البدء.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="كان معر٠المرÙÙ‚ غير صالح.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="تعذر العثور على إزاحة للطابع الزمني.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="إن اسماً واحداً أو أكثر من أسماء العرض التي قدمتها طويل(Ø©) جداً." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/ariatelemetry/aria-web-telemetry-2.9.0.min.js b/node_modules/@microsoft/office-js/dist/ariatelemetry/aria-web-telemetry-2.9.0.min.js new file mode 100644 index 0000000..f61ead0 --- /dev/null +++ b/node_modules/@microsoft/office-js/dist/ariatelemetry/aria-web-telemetry-2.9.0.min.js @@ -0,0 +1,2 @@ +var clienttelemetry_build;!function(e){e.version="2.9.0"}(clienttelemetry_build||(clienttelemetry_build={}));var Microsoft;!function(e){var t;!function(e){var t;!function(e){e[e.BT_STOP=0]="BT_STOP",e[e.BT_STOP_BASE=1]="BT_STOP_BASE",e[e.BT_BOOL=2]="BT_BOOL",e[e.BT_UINT8=3]="BT_UINT8",e[e.BT_UINT16=4]="BT_UINT16",e[e.BT_UINT32=5]="BT_UINT32",e[e.BT_UINT64=6]="BT_UINT64",e[e.BT_FLOAT=7]="BT_FLOAT",e[e.BT_DOUBLE=8]="BT_DOUBLE",e[e.BT_STRING=9]="BT_STRING",e[e.BT_STRUCT=10]="BT_STRUCT",e[e.BT_LIST=11]="BT_LIST",e[e.BT_SET=12]="BT_SET",e[e.BT_MAP=13]="BT_MAP",e[e.BT_INT8=14]="BT_INT8",e[e.BT_INT16=15]="BT_INT16",e[e.BT_INT32=16]="BT_INT32",e[e.BT_INT64=17]="BT_INT64",e[e.BT_WSTRING=18]="BT_WSTRING",e[e.BT_UNAVAILABLE=127]="BT_UNAVAILABLE"}(t=e.BondDataType||(e.BondDataType={}));var n;!function(e){e[e.MARSHALED_PROTOCOL=0]="MARSHALED_PROTOCOL",e[e.MAFIA_PROTOCOL=17997]="MAFIA_PROTOCOL",e[e.COMPACT_PROTOCOL=16963]="COMPACT_PROTOCOL",e[e.JSON_PROTOCOL=21322]="JSON_PROTOCOL",e[e.PRETTY_JSON_PROTOCOL=20554]="PRETTY_JSON_PROTOCOL",e[e.SIMPLE_PROTOCOL=20563]="SIMPLE_PROTOCOL"}(n=e.ProtocolType||(e.ProtocolType={}))}(t=e.Bond||(e.Bond={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){var t;!function(e){var t;!function(e){var t=function(){function e(){this._buffer=[]}return e.prototype.Add=function(e){for(var t=0;t=0?this._buffer[n]={Key:e,Value:t}:this._buffer.push({Key:e,Value:t})},e.prototype.Remove=function(e){var t=this._getIndex(e);t>=0&&this._buffer.splice(t,1)},e.prototype.Count=function(){return this._buffer.length},e.prototype.GetBuffer=function(){return this._buffer},e.prototype.ContainsKey=function(e){return this._getIndex(e)>=0},e.prototype.Get=function(e){var t=this._getIndex(e);return t>=0?this._buffer[t].Value:null},e.prototype._getIndex=function(e){for(var t=0,n=-1;t>6,128|63&i):i<55296||i>=57344?t.push(224|i>>12,128|i>>6&63,128|63&i):(i=65536+((1023&i)<<10|1023&e.charCodeAt(++n)),t.push(240|i>>18,128|i>>12&63,128|i>>6&63,128|63&i))}return t},e}();e.Utf8=n;var i=function(){function e(){}return e.GetString=function(e){var t,n,i,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=[],s=e.length%3,a=function(e){return[r.charAt(e>>18&63),r.charAt(e>>12&63),r.charAt(e>>6&63),r.charAt(63&e)].join("")};for(t=0,i=e.length-s;t>2)),o.push(r.charAt(n<<4&63)),o.push("==");break;case 2:n=(e[e.length-2]<<8)+e[e.length-1],o.push(r.charAt(n>>10)),o.push(r.charAt(n>>4&63)),o.push(r.charAt(n<<2&63)),o.push("=")}return o.join("")},e}();e.Base64=i;var o=function(){function e(){}return e.GetBytes=function(e){for(var t=[];4294967168&e;)t.push(127&e|128),e>>>=7;return t.push(127&e),t},e}();e.Varint=o;var s=function(){function e(){}return e.GetBytes=function(e){for(var t=e.low,n=e.high,i=[];n||4294967168&t;)i.push(127&t|128),t=(127&n)<<25|t>>>7,n>>>=7;return i.push(127&t),i},e}();e.Varint64=s;var a=function(){function e(){}return e.GetBytes=function(e){if(t.BrowserChecker.IsDataViewSupport()){var n=new DataView(new ArrayBuffer(4));n.setFloat32(0,e,!0);for(var i=[],o=0;o<4;++o)i.push(n.getUint8(o));return i}return r.ConvertNumberToArray(e,!1)},e}();e.Float=a;var u=function(){function e(){}return e.GetBytes=function(e){if(t.BrowserChecker.IsDataViewSupport()){var n=new DataView(new ArrayBuffer(8));n.setFloat64(0,e,!0);for(var i=[],o=0;o<8;++o)i.push(n.getUint8(o));return i}return r.ConvertNumberToArray(e,!0)},e}();e.Double=u;var d=function(){function e(){}return e.EncodeZigzag16=function(e){return e=t.Number.ToInt16(e),e<<1^e>>15},e.EncodeZigzag32=function(e){return e=t.Number.ToInt32(e),e<<1^e>>31},e.EncodeZigzag64=function(e){var n=e.low,i=e.high,r=i<<1|n>>>31,o=n<<1;2147483648&i&&(r=~r,o=~o);var s=new t.UInt64("0");return s.low=o,s.high=r,s},e}();e.Zigzag=d}(n=t.Encoding||(t.Encoding={}));var i;!function(n){var i=function(){function e(){}return e.GetString=function(e){for(var t=[],n=0;n>10&1023)),t.push(String.fromCharCode(56320|1023&i))}}return t.join("")},e}();n.Utf8=i;var o=function(){function e(){}return e.GetBytes=function(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=[],i=0;i>4),s>=0&&(n.push(o<<4&240|s>>2),a>=0&&n.push(s<<6&192|a))}return n},e}();n.Base64=o;var s=function(){function t(){}return t.GetInt64=function(t){var n=new e.Bond.Int64("0"),i=this._Read(t);return n.low=i[0],i.length>1&&(n.high=i[1]),n},t.GetNumber=function(e){return this._Read(e)[0]},t._Read=function(e){for(var t=[],n=0,i=!0,r=0;i;){var o=e.shift();if(i=0!=(128&o),o=127&o,!(r<28)){n|=o<>4,r=3;break}n|=o<=32)break}return t.push(n),t},t}();n.Varint=s;var a=function(){function e(){}return e.GetNumber=function(e){if(t.BrowserChecker.IsDataViewSupport()){for(var n=new DataView(new ArrayBuffer(4)),i=0;i<4;++i)n.setUint8(i,e[i]);return n.getFloat32(0,!0)}return r.ConvertArrayToNumber(e,!1)},e}();n.Float=a;var u=function(){function e(){}return e.GetNumber=function(e){if(t.BrowserChecker.IsDataViewSupport()){for(var n=new DataView(new ArrayBuffer(8)),i=0;i<8;++i)n.setUint8(i,e[i]);return n.getFloat64(0,!0)}return r.ConvertArrayToNumber(e,!0)},e}();n.Double=u;var d=function(){function t(){}return t.DecodeZigzag16=function(e){return((65535&e)>>>1^-(1&e))<<16>>16},t.DecodeZigzag32=function(e){return e>>>1^-(1&e)},t.DecodeZigzag64=function(t){var n=1&t.high,i=t.high>>>1,r=1&t.low,o=t.low>>>1;o=n<<31|o,r&&(o^=4294967295,i^=4294967295);var s=new e.Bond.UInt64("0");return s.low=o,s.high=i,s},t}();n.Zigzag=d}(i=t.Decoding||(t.Decoding={}));var r=function(){function e(){}return e.ConvertNumberToArray=function(e,t){if(!e)return t?this._doubleZero:this._floatZero;var n=t?11:8,i=t?52:23,r=(1<0;)d*=2,d>=1?(l[++_]=1,--d):l[++_]=0;for(var f=0;ff&&!(l[_]=1-l[_]);--_);_==f&&++h}if(h>s||u)return a?t?this._doubleNegInifinity:this._floatNegInifinity:t?this._doubleInifinity:this._floatInifinity;if(h>8&255,T>>16&255,T>>>24,255&I,I>>8&255,I>>16&255,I>>>24];return S}var E=0;for(_=0;_<23;++_)E=E<<1|l[++f];E|=h+r<<23,E=a<<31|2147483647&E;var S=[255&E,E>>8&255,E>>16&255,E>>>24];return S},e.ConvertArrayToNumber=function(e,n){var i=n?11:8,r=(1<>4:(127&e[3])<<1|(128&e[2])>>7;if(255==s)throw new t.Exception("Not a valid float/double buffer.");var a=1,u=1;if(n){var d=(15&e[6])<<28|(255&e[5])<<20|(255&e[4])<<12,c=e[3]<<24|(255&e[2])<<16|(255&e[1])<<8|255&e[0];if(!s&&!d&&!c)return 0;for(var l=0;l<20;++l)u/=2,d<0&&(a+=u),d<<=1;for(var l=0;l<32;++l)u/=2,c<0&&(a+=u),c<<=1}else{var _=(127&e[2])<<25|(255&e[1])<<17|(255&e[0])<<9;if(!s&&!_)return 0;for(var l=0;l<23;++l)u/=2,_<0&&(a+=u),_<<=1}return a*=Math.pow(2,s-r),o?0-a:a},e}();r._floatZero=[0,0,0,0],r._doubleZero=[0,0,0,0,0,0,0,0],r._floatInifinity=[0,0,128,127],r._floatNegInifinity=[0,0,128,255],r._doubleInifinity=[0,0,0,0,0,0,240,127],r._doubleNegInifinity=[0,0,0,0,0,0,240,255]}(t=e.Bond||(e.Bond={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){var t;!function(e){var t;!function(t){var n=function(){function t(){this._buffer=[]}return t.prototype.WriteByte=function(t){this._buffer.push(e.Number.ToByte(t))},t.prototype.Write=function(e,t,n){for(;n--;)this.WriteByte(e[t++])},t.prototype.GetBuffer=function(){return this._buffer},t}();t.MemoryStream=n}(t=e.IO||(e.IO={}))}(t=e.Bond||(e.Bond={}))}(Microsoft||(Microsoft={}));var Microsoft;!function(e){var t;!function(e){var t=function(){function e(e,t){this.Type=e,this.Id=t}return e}();e.FieldTag=t;var n=function(){function e(e,t){this.ElementType=e,this.Size=t}return e}();e.ContainerTag=n;var i=function(){function e(e,t,n){this.KeyType=e,this.ValueType=t,this.Size=n}return e}();e.KeyValueContainerTag=i;var r=function(){function e(){}return e}();e.Bonded=r;var o=function(){function e(e){this.low=0,this.high=0,this.low=parseInt(e),this.low<0&&(this.high=-1)}return e.prototype.Equals=function(t){var n=new e(t);return this.low==n.low&&this.high==n.high},e}();e.Int64=o;var s=function(){function e(e){this.low=0,this.high=0,this.low=parseInt(e)}return e.prototype.Equals=function(t){var n=new e(t);return this.low==n.low&&this.high==n.high},e}();e.UInt64=s;var a=function(){function e(){}return e.ToByte=function(e){return this.ToUInt8(e)},e.ToInt8=function(e){var t=(128&e)<<24>>24;return 127&e|t},e.ToInt16=function(e){var t=(32768&e)<<16>>16;return 32767&e|t},e.ToInt32=function(e){var t=2147483648&e;return 2147483647&e|t},e.ToUInt8=function(e){return 255&e},e.ToUInt16=function(e){return 65535&e},e.ToUInt32=function(e){return 4294967295&e},e}();e.Number=a;var u=function(){function e(e){this.Message=e}return e}();e.Exception=u;var d=function(){function e(){}return e}();e.KeyValuePair=d;var c=function(){function e(){}return e.IsDataViewSupport=function(){return"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},e}();e.BrowserChecker=c}(t=e.Bond||(e.Bond={}))}(Microsoft||(Microsoft={})),function(e){var t;!function(e){var t=function(){function t(e){this._stream=e}return t.prototype.WriteBlob=function(e){this._stream.Write(e,0,e.length)},t.prototype.WriteBool=function(e){this._stream.WriteByte(e?1:0)},t.prototype.WriteContainerBegin=function(e,t){this.WriteUInt8(t),this.WriteUInt32(e)},t.prototype.WriteMapContainerBegin=function(e,t,n){this.WriteUInt8(t),this.WriteUInt8(n),this.WriteUInt32(e)},t.prototype.WriteContainerEnd=function(){},t.prototype.WriteDouble=function(t){var n=e.Encoding.Double.GetBytes(t);this._stream.Write(n,0,n.length)},t.prototype.WriteFloat=function(t){var n=e.Encoding.Float.GetBytes(t);this._stream.Write(n,0,n.length)},t.prototype.WriteFieldBegin=function(e,t,n){t<=5?this._stream.WriteByte(e|t<<5):t<=255?(this._stream.WriteByte(192|e),this._stream.WriteByte(t)):(this._stream.WriteByte(224|e),this._stream.WriteByte(t),this._stream.WriteByte(t>>8))},t.prototype.WriteFieldEnd=function(){},t.prototype.WriteFieldOmitted=function(e,t,n){},t.prototype.WriteInt16=function(t){t=e.Encoding.Zigzag.EncodeZigzag16(t),this.WriteUInt16(t)},t.prototype.WriteInt32=function(t){t=e.Encoding.Zigzag.EncodeZigzag32(t),this.WriteUInt32(t)},t.prototype.WriteInt64=function(t){this.WriteUInt64(e.Encoding.Zigzag.EncodeZigzag64(t))},t.prototype.WriteInt8=function(t){this._stream.WriteByte(e.Number.ToInt8(t))},t.prototype.WriteString=function(t){if(""==t)this.WriteUInt32(0);else{var n=e.Encoding.Utf8.GetBytes(t);this.WriteUInt32(n.length),this._stream.Write(n,0,n.length)}},t.prototype.WriteStructBegin=function(e,t){},t.prototype.WriteStructEnd=function(t){this.WriteUInt8(t?e.BondDataType.BT_STOP_BASE:e.BondDataType.BT_STOP)},t.prototype.WriteUInt16=function(t){var n=e.Encoding.Varint.GetBytes(e.Number.ToUInt16(t));this._stream.Write(n,0,n.length)},t.prototype.WriteUInt32=function(t){var n=e.Encoding.Varint.GetBytes(e.Number.ToUInt32(t));this._stream.Write(n,0,n.length)},t.prototype.WriteUInt64=function(t){var n=e.Encoding.Varint64.GetBytes(t);this._stream.Write(n,0,n.length)},t.prototype.WriteUInt8=function(t){this._stream.WriteByte(e.Number.ToUInt8(t))},t.prototype.WriteWString=function(e){this.WriteUInt32(e.length);for(var t=0;t>>8)}},t}();e.CompactBinaryProtocolWriter=t;var n=function(){function e(){}return e}();e.CompactBinaryProtocolReader=n}(t=e.Bond||(e.Bond={}))}(Microsoft||(Microsoft={}));var sct;!function(e){var t=function(){function t(){}return t.IsSafari=function(){if(null===t._isSafari)if("undefined"!=typeof navigator&&navigator.userAgent){var e=navigator.userAgent.toLowerCase();e.indexOf("safari")>=0&&e.indexOf("chrome")<0?t._isSafari=!0:t._isSafari=!1}else t._isSafari=!1;return t._isSafari},t.IsReactNative=function(){return null===t._isReactNative&&("undefined"!=typeof navigator&&navigator.product?t._isReactNative="ReactNative"===navigator.product:t._isReactNative=!1),t._isReactNative},t.IsUint8ArrSupported=function(){return!e.Utils.IsSafari()&&"undefined"!=typeof Uint8Array&&!e.Utils.IsReactNative()},t.ajax=function(e,n){var i=t._createConnection();if(e.headers){var r="qsp=true";for(var o in e.headers)r+="&",r+=encodeURIComponent(o),r+="=",r+=encodeURIComponent(e.headers[o]);e.url.indexOf("?")<0?e.url+="?":e.url+="&",e.url+=r}i.open(e.type,e.url,!n),e.complete&&(i.onload=function(){e.complete(i)},i.ontimeout=function(){e.complete(i)},i.onerror=function(){e.complete(i)},i.onabort=function(){e.complete(i)}),i.send(e.data)},t.keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t},t.IsUsingXDomainRequest=function(){if(null==t._usingXDomainRequest){var e=new XMLHttpRequest;"undefined"==typeof e.withCredentials&&"undefined"!=typeof XDomainRequest?t._usingXDomainRequest=!0:t._usingXDomainRequest=!1}return t._usingXDomainRequest},t._createConnection=function(){var e=new XMLHttpRequest;return t.IsUsingXDomainRequest()?new XDomainRequest:e},t}();t._isSafari=null,t._isReactNative=null,t._usingXDomainRequest=null,e.Utils=t}(sct||(sct={}));var microsoft;!function(e){var t;!function(e){var t;!function(e){var t;!function(t){var n=function(){function e(){}return e.GetGuid=function(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1,5)};return[e(),e(),"-",e(),"-",e(),"-",e(),"-",e(),e(),e()].join("")},e.GetTimeStamp=function(){var e=(new Date).getTime(),t=new Microsoft.Bond.Int64("0");return t.low=4294967295&e,t.high=Math.floor(e/4294967296),t},e.GetTimeStampWithValue=function(e){var t=new Microsoft.Bond.Int64("0");return t.low=4294967295&e,t.high=Math.floor(e/4294967296),t},e}();t.utils=n;var i;!function(e){e[e.NotSet=0]="NotSet",e[e.Event=1]="Event",e[e.PerformanceCounter=2]="PerformanceCounter",e[e.Anomaly=3]="Anomaly",e[e.Prediction=4]="Prediction",e[e.TraceLog=5]="TraceLog",e[e.EventSourceLog=6]="EventSourceLog",e[e.HttpLog=7]="HttpLog",e[e.PerformanceCounterAzure=8]="PerformanceCounterAzure",e[e.PerformanceCounterGfs=9]="PerformanceCounterGfs"}(i=t.RecordType||(t.RecordType={}));var r;!function(e){e[e.NotSet=0]="NotSet",e[e.O365=1]="O365",e[e.SkypeBI=2]="SkypeBI",e[e.SkypeData=3]="SkypeData"}(r=t.PIIScrubber||(t.PIIScrubber={}));var o;!function(e){e[e.NotSet=0]="NotSet",e[e.DistinguishedName=1]="DistinguishedName",e[e.GenericData=2]="GenericData",e[e.IPV4Address=3]="IPV4Address",e[e.IPv6Address=4]="IPv6Address",e[e.MailSubject=5]="MailSubject",e[e.PhoneNumber=6]="PhoneNumber",e[e.QueryString=7]="QueryString",e[e.SipAddress=8]="SipAddress",e[e.SmtpAddress=9]="SmtpAddress",e[e.Identity=10]="Identity",e[e.Uri=11]="Uri",e[e.Fqdn=12]="Fqdn",e[e.IPV4AddressLegacy=13]="IPV4AddressLegacy"}(o=t.PIIKind||(t.PIIKind={}));var s;!function(e){e[e.Unknown=0]="Unknown",e[e.MSACID=1]="MSACID",e[e.MSAPUID=2]="MSAPUID",e[e.ANID=3]="ANID",e[e.OrgIdCID=4]="OrgIdCID",e[e.OrgIdPUID=5]="OrgIdPUID",e[e.UserObjectId=6]="UserObjectId",e[e.Skype=7]="Skype",e[e.Yammer=8]="Yammer",e[e.EmailAddress=9]="EmailAddress",e[e.PhoneNumber=10]="PhoneNumber",e[e.SipAddress=11]="SipAddress",e[e.MUID=12]="MUID"}(s=t.UserIdType||(t.UserIdType={}));var a=function(){function t(){this.ScrubType=e.datamodels.PIIScrubber.NotSet,this.Kind=e.datamodels.PIIKind.NotSet,this.RawContent=""}return t.prototype.Write=function(e){this.WriteImpl(e,!1)},t.prototype.WriteImpl=function(t,n){t.WriteStructBegin(null,n),this.ScrubType!=e.datamodels.PIIScrubber.NotSet?(t.WriteFieldBegin(Microsoft.Bond.BondDataType.BT_INT32,1,null),t.WriteInt32(this.ScrubType),t.WriteFieldEnd()):t.WriteFieldOmitted(Microsoft.Bond.BondDataType.BT_INT32,1,null),this.Kind!=e.datamodels.PIIKind.NotSet?(t.WriteFieldBegin(Microsoft.Bond.BondDataType.BT_INT32,2,null),t.WriteInt32(this.Kind),t.WriteFieldEnd()):t.WriteFieldOmitted(Microsoft.Bond.BondDataType.BT_INT32,2,null),""!=this.RawContent?(t.WriteFieldBegin(Microsoft.Bond.BondDataType.BT_STRING,3,null),t.WriteString(this.RawContent),t.WriteFieldEnd()):t.WriteFieldOmitted(Microsoft.Bond.BondDataType.BT_STRING,3,null),t.WriteStructEnd(n)},t.prototype.Read=function(e){this.ReadImpl(e,!1)},t.prototype.ReadImpl=function(e,t){},t}();t.PII=a;var u=function(){function t(){this.Id=n.GetGuid(),this.Timestamp=n.GetTimeStamp(),this.Type="",this.EventType="",this.Extension=new Microsoft.Bond.Collections.Map,this.RecordType=e.datamodels.RecordType.NotSet,this.PIIExtensions=new Microsoft.Bond.Collections.Map}return t.prototype.AddOrReplacePII=function(t,n,i){var r=new e.datamodels.PII;r.RawContent=n,r.Kind=i,r.ScrubType=e.datamodels.PIIScrubber.O365,this.PIIExtensions.AddOrReplace(t,r)},t.prototype.Write=function(e){this.WriteImpl(e,!1)},t.prototype.WriteImpl=function(t,n){if(t.WriteStructBegin(null,n),""!=this.Id?(t.WriteFieldBegin(Microsoft.Bond.BondDataType.BT_STRING,1,null),t.WriteString(this.Id),t.WriteFieldEnd()):t.WriteFieldOmitted(Microsoft.Bond.BondDataType.BT_STRING,1,null),this.Timestamp.Equals("0")?t.WriteFieldOmitted(Microsoft.Bond.BondDataType.BT_INT64,3,null):(t.WriteFieldBegin(Microsoft.Bond.BondDataType.BT_INT64,3,null),t.WriteInt64(this.Timestamp),t.WriteFieldEnd()),""!=this.Type?(t.WriteFieldBegin(Microsoft.Bond.BondDataType.BT_STRING,5,null),t.WriteString(this.Type),t.WriteFieldEnd()):t.WriteFieldOmitted(Microsoft.Bond.BondDataType.BT_STRING,5,null),""!=this.EventType?(t.WriteFieldBegin(Microsoft.Bond.BondDataType.BT_STRING,6,null),t.WriteString(this.EventType),t.WriteFieldEnd()):t.WriteFieldOmitted(Microsoft.Bond.BondDataType.BT_STRING,6,null),this.Extension.Count()){t.WriteFieldBegin(Microsoft.Bond.BondDataType.BT_MAP,13,null),t.WriteMapContainerBegin(this.Extension.Count(),Microsoft.Bond.BondDataType.BT_STRING,Microsoft.Bond.BondDataType.BT_STRING);for(var i=0;i=a.Started&&this._Verbose("Start() already, ignore"),++t._tag,this._status=a.Started,this._Verbose(["Start() done, status: ",this._status,"tag: ",t._tag].join(""))},t.prototype.Stop=function(){if(this._status=500||408===o.status);if(c||!o||"undefined"==typeof o.status)return this._Verbose("retry statusCode: "+(o?o.status:0)),this._eventsCache.AddEvents(i,r),void this._ScheduleTimer(!0)}for(var l=0;l64&&(this._rescheduleFactor=1)}else{var n=0,i=(new Date).getTime(),r=i-this._lastActiveTime;n=r>u.TimeIntervalForNextSendInMS()?0:u.TimeIntervalForNextSendInMS()-r,this._timer=setTimeout(function(){return t._WorkThread(null,!1)},n),this._Verbose("_ScheduleTimer, next try: "+n),this._rescheduleFactor=1}},t.prototype._Verbose=function(e){this._config.log&&this._config.log.Verbose("[TelemetryManagerImpl]: "+e)},t.prototype._Info=function(e){this._config.log&&this._config.log.Info("[TelemetryManagerImpl]: "+e)},t.prototype._Error=function(e){this._config.log&&this._config.log.Error("[TelemetryManagerImpl]: "+e)},t.prototype._Reset=function(){this._Verbose("Reset()"),this._CleanTimer(),this._lastActiveTime=0,this._rescheduleFactor=1,this._sendingEvents=[],this._eventsCache=new c},t.prototype.__GetListenerArray=function(){return this._listeners},t.prototype.__GetTotalEventsCount=function(){return this._eventsCache.GetTotalEventsCount()},t.prototype.__IsScheduled=function(){return null!=this._timer},t.prototype.__ChageMaxPackageSizeInKB=function(e){this._MaxPackageSizeInBytes=1024*e},t.prototype.__SetTestServerResponseHook=function(e){this._testServerResponseHook=e},t}();d._eventTypeRegex=/^[a-zA-Z0-9]([a-zA-Z0-9]|_){2,98}[a-zA-Z0-9]$/,d._tag=0;var c=function(){function e(){this._events={},this._tokens=[]}return e.prototype.AddEvents=function(e,t){t.length&&(this._events[e]||(this._events[e]=[],this._tokens.push(e)),this._events[e].push.apply(this._events[e],t))},e.prototype.IsEmpty=function(){return 0==this._tokens.length},e.prototype.DequeuEvents=function(){if(0==this._tokens.length)return null;var e=this._tokens.shift(),t=this._events[e];return delete this._events[e],{tenantToken:e,events:t}},e.prototype.GetTotalEventsCount=function(){var e=0;for(var t in this._events)e+=this._events[t].length;return e},e}()}(t=e._sender||(e._sender={}))}(t=e.telemetry||(e.telemetry={}))}(t=e.applications||(e.applications={}))}(microsoft||(microsoft={}));var microsoft;!function(e){var t;!function(t){var n;!function(t){var n=t._sender.TelemetryManagerFactory.CreateTelemetryManager(),i=function(){function e(){this.collectorUrl=null,this.enableAutoUserSession=!1,this.browserOverrides=null,this.disableCookies=!1}return e}();i.COLLECTOR_URL_UNITED_STATES="https://us.pipe.aria.microsoft.com/Collector/3.0/",i.COLLECTOR_URL_GERMANY="https://de.pipe.aria.microsoft.com/Collector/3.0/",i.COLLECTOR_URL_AUSTRALIA="https://au.pipe.aria.microsoft.com/Collector/3.0/",i.COLLECTOR_URL_JAPAN="https://jp.pipe.aria.microsoft.com/Collector/3.0/",i.COLLECTOR_URL_EUROPE="https://eu.pipe.aria.microsoft.com/Collector/3.0/",t.LogConfiguration=i;var r=function(){function e(){this.onSaveData=null,this.onGetData=null}return e}();t.LogConfigurationBrowserOverrides=r;var o=function(){function e(){this.value=null,this.pii=null}return e._isPii=function(e){return null!==e&&void 0!==e&&e!==t.datamodels.PIIKind.NotSet&&!isNaN(e)&&void 0!==t.datamodels.PIIKind[e]},e}(),s=function(){function e(){this.name=null,this.timestamp=null,this.properties={},this.eventType=null}return e.prototype.setProperty=function(n,i,r){if(!n||!e._propertyNameRegex.test(n))throw new u(a.INVALID_PROPERTY_NAME);r?this.properties[n]={value:i,pii:r!=t.datamodels.PIIKind.NotSet?r:null}:this.properties[n]={value:i,pii:null}},e}();s._propertyNameRegex=/^[a-zA-Z0-9](([a-zA-Z0-9|_|\.]){0,98}[a-zA-Z0-9])?$/,t.EventProperties=s;var a;!function(e){e[e.INVALID_TENANT_TOKEN=1]="INVALID_TENANT_TOKEN",e[e.MISSING_EVENT_PROPERTIES_NAME=2]="MISSING_EVENT_PROPERTIES_NAME",e[e.INVALID_PROPERTY_NAME=3]="INVALID_PROPERTY_NAME",e[e.MISSING_FAILURE_SIGNATURE=5]="MISSING_FAILURE_SIGNATURE",e[e.MISSING_FAILURE_DETAIL=6]="MISSING_FAILURE_DETAIL",e[e.MISSING_PAGEVIEW_ID=7]="MISSING_PAGEVIEW_ID",e[e.MISSING_PAGEVIEW_NAME=8]="MISSING_PAGEVIEW_NAME",e[e.INVALID_SESSION_STATE=9]="INVALID_SESSION_STATE",e[e.INVALID_CONFIGURATION_USE_CUSTOM_GET_SET=10]="INVALID_CONFIGURATION_USE_CUSTOM_GET_SET"}(a=t.TelemetryError||(t.TelemetryError={}));var u=function(){function e(e){this.errorCode=null,this.errorCode=e}return e.prototype.ErrorCode=function(){return this.errorCode},e.prototype.toString=function(){switch(this.errorCode){case a.INVALID_TENANT_TOKEN:return"Invalid tenant token";case a.MISSING_EVENT_PROPERTIES_NAME:return"Eventproperties.name can not be null or empty";case a.INVALID_PROPERTY_NAME:return"Invalid Key. Key does not conform to regular expression ^[a-zA-Z0-9](([a-zA-Z0-9|_|.]){0,98}[a-zA-Z0-9])?$";case a.MISSING_FAILURE_SIGNATURE:return"Failure signature can't be null or empty.";case a.MISSING_FAILURE_DETAIL:return"Failure detail can't be null or empty.";case a.MISSING_PAGEVIEW_ID:return"Pageview id can't be null or empty.";case a.MISSING_PAGEVIEW_NAME:return"Pageview name can't be null or empty.";case a.INVALID_SESSION_STATE:return"Session state has to be a value from the SessionState enum.";case a.INVALID_CONFIGURATION_USE_CUSTOM_GET_SET:return"Invalid configuration provided during initialization. Both onGetConfigData and onSaveConfigData must be provided together. These are manditory when running in a non-brower enviornment";default:return"Unknown error"}},e}();t.Exception=u;var d=function(){function n(e){this.contextMap={},this.piiKind=t.datamodels.PIIKind.NotSet,this._allowDeviceInfoFields=!1,this._allowDeviceInfoFields=e}return n.prototype.setAppId=function(e){e&&(this.contextMap["AppInfo.Id"]=e)},n.prototype.setAppVersion=function(e){e&&(this.contextMap["AppInfo.Version"]=e)},n.prototype.setAppLanguage=function(e){e&&(this.contextMap["AppInfo.Language"]=e)},n.prototype.setDeviceId=function(e){e&&this._allowDeviceInfoFields&&(this.contextMap["DeviceInfo.Id"]=e,c.checkAndUpdateDeviceId(e))},n.prototype.setDeviceOsName=function(e){e&&this._allowDeviceInfoFields&&(this.contextMap["DeviceInfo.OsName"]=e)},n.prototype.setDeviceOsVersion=function(e){e&&this._allowDeviceInfoFields&&(this.contextMap["DeviceInfo.OsVersion"]=e)},n.prototype.setDeviceBrowserName=function(e){e&&this._allowDeviceInfoFields&&(this.contextMap["DeviceInfo.BrowserName"]=e)},n.prototype.setDeviceBrowserVersion=function(e){e&&this._allowDeviceInfoFields&&(this.contextMap["DeviceInfo.BrowserVersion"]=e)},n.prototype.setUserId=function(t,n,i){if(t&&(this.contextMap["UserInfo.Id"]=t),i)this.contextMap["UserInfo.IdType"]=i;else{var r;switch(n){case e.applications.telemetry.datamodels.PIIKind.SipAddress:r=e.applications.telemetry.datamodels.UserIdType.SipAddress;break;case e.applications.telemetry.datamodels.PIIKind.PhoneNumber:r=e.applications.telemetry.datamodels.UserIdType.PhoneNumber;break;case e.applications.telemetry.datamodels.PIIKind.SmtpAddress:r=e.applications.telemetry.datamodels.UserIdType.EmailAddress;break;default:r=e.applications.telemetry.datamodels.UserIdType.Unknown}this.contextMap["UserInfo.IdType"]=r}if(n)o._isPii(n)&&(this.piiKind=n);else{var s;switch(i){case e.applications.telemetry.datamodels.UserIdType.Skype:s=e.applications.telemetry.datamodels.PIIKind.Identity;break;case e.applications.telemetry.datamodels.UserIdType.EmailAddress:s=e.applications.telemetry.datamodels.PIIKind.SmtpAddress;break;case e.applications.telemetry.datamodels.UserIdType.PhoneNumber:s=e.applications.telemetry.datamodels.PIIKind.PhoneNumber;break;case e.applications.telemetry.datamodels.UserIdType.SipAddress:s=e.applications.telemetry.datamodels.PIIKind.SipAddress;break;default:s=e.applications.telemetry.datamodels.PIIKind.NotSet}o._isPii(s)&&(this.piiKind=s)}},n.prototype.setUserMsaId=function(e){e&&(this.contextMap["UserInfo.MsaId"]=e)},n.prototype.setUserANID=function(e){e&&(this.contextMap["UserInfo.ANID"]=e)},n.prototype.setUserAdvertisingId=function(e){e&&(this.contextMap["UserInfo.AdvertisingId"]=e)},n.prototype.setUserTimeZone=function(e){e&&(this.contextMap["UserInfo.TimeZone"]=e)},n.prototype.setUserLanguage=function(e){e&&(this.contextMap["UserInfo.Language"]=e)},n}();t.SemanticContext=d;var c=function(){function e(){}return e.initialize=function(n,i){this._overrides=n,this._disableCookies=i;var r=e._getAppLanguage();r&&e.semanticContext.setAppLanguage(r);var o=e._getUserLanguage();o&&e.semanticContext.setUserLanguage(o);var s=(new Date).getTimezoneOffset(),a=s%60,u=(s-a)/60,d="+";u>0&&(d="-"),e.semanticContext.setUserTimeZone(d+(u<10?"0"+u:u.toString())+":"+(a<10?"0"+a:a.toString()));var c=e._getUserAgent();if(c&&(e.semanticContext.setDeviceBrowserName(e._getBrowserName()),e.semanticContext.setDeviceBrowserVersion(e._getBrowserVersion()),e.semanticContext.setDeviceOsName(e._getOsName()),e.semanticContext.setDeviceOsVersion(e._getOsVersion())),this._disableCookies&&!this._overrides)return e._deleteCookie(e.DEVICE_ID_COOKIE),void e._deleteCookie(e.FIRST_LAUNCH_TIME_COOKIE);var l=e._getData(e.DEVICE_ID_COOKIE);l&&""!=l||(l=t.datamodels.utils.GetGuid()),e.semanticContext.setDeviceId(l)},e.checkAndUpdateDeviceId=function(t){var n=e._getData(e.DEVICE_ID_COOKIE),i=e._getData(e.FIRST_LAUNCH_TIME_COOKIE);n!==t&&(i=(new Date).getTime().toString()),e.firstLaunchTime=parseInt(i),e._saveData(e.DEVICE_ID_COOKIE,t),e._saveData(e.FIRST_LAUNCH_TIME_COOKIE,i)},e._saveData=function(t,n){if(this._overrides)this._overrides.onSaveData(t,n);else if("undefined"!=typeof document&&"undefined"!=typeof document.cookie&&!e._disableCookies){var i=new Date;i.setTime(i.getTime()+31536e6);var r="expires="+i.toUTCString();document.cookie=t+"="+n+"; "+r}},e._getData=function(t){if(this._overrides)return this._overrides.onGetData(t)||"";if("undefined"!=typeof document&&"undefined"!=typeof document.cookie&&!e._disableCookies)for(var n=t+"=",i=document.cookie.split(";"),r=0;r-1},e._isIe=function(){return e._userAgentContainsString("Trident")},e._isEdge=function(){return e._userAgentContainsString(e.BROWSERS.EDGE)},e._isOpera=function(){return e._userAgentContainsString("OPR/")},e._getBrowserName=function(){return e._isOpera()?e.BROWSERS.UNKNOWN:e._userAgentContainsString(e.BROWSERS.PHANTOMJS)?e.BROWSERS.PHANTOMJS:e._isIe()?e.BROWSERS.MSIE:e._isEdge()?e.BROWSERS.EDGE:e._userAgentContainsString(e.BROWSERS.ELECTRON)?e.BROWSERS.ELECTRON:e._userAgentContainsString(e.BROWSERS.CHROME)?e.BROWSERS.CHROME:e._userAgentContainsString(e.BROWSERS.FIREFOX)?e.BROWSERS.FIREFOX:e._userAgentContainsString(e.BROWSERS.SAFARI)?e.BROWSERS.SAFARI:e._userAgentContainsString(e.BROWSERS.SKYPE_SHELL)?e.BROWSERS.SKYPE_SHELL:e.BROWSERS.UNKNOWN},e._getBrowserVersion=function(){function t(){var t,n=e._getUserAgent(),i=n.match(new RegExp(e.BROWSERS.MSIE+" "+e.REGEX_VERSION));return i?i[1]:(t=n.match(new RegExp("rv:"+e.REGEX_VERSION)))?t[1]:void 0}function n(t){var n;return t===e.BROWSERS.SAFARI&&(t="Version"),n=e._getUserAgent().match(new RegExp(t+"/"+e.REGEX_VERSION)),n?n[1]:e.UNKNOWN_VERSION}return e._isIe()?t():n(e._getBrowserName())},e._getOsName=function(){var t=/(windows|win32)/i,n=/ arm;/i,i=/windows\sphone\s\d+\.\d+/i,r=/(macintosh|mac os x)/i,o=/(iPad|iPhone|iPod)(?=.*like Mac OS X)/i,s=/(linux|joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk)/i,a=/android/i;return e._getUserAgent().match(i)?e.OPERATING_SYSTEMS.WINDOWS_PHONE:e._getUserAgent().match(n)?e.OPERATING_SYSTEMS.WINDOWS_RT:e._getUserAgent().match(o)?e.OPERATING_SYSTEMS.IOS:e._getUserAgent().match(a)?e.OPERATING_SYSTEMS.ANDROID:e._getUserAgent().match(s)?e.OPERATING_SYSTEMS.LINUX:e._getUserAgent().match(r)?e.OPERATING_SYSTEMS.MACOSX:e._getUserAgent().match(t)?e.OPERATING_SYSTEMS.WINDOWS:e.OPERATING_SYSTEMS.UNKNOWN},e._getOsVersion=function(){function t(){var t=e._getUserAgent().match(new RegExp("Windows NT "+e.REGEX_VERSION));return t&&e.VERSION_MAPPINGS[t[1]]?e.VERSION_MAPPINGS[t[1]]:e.UNKNOWN_VERSION}function n(){var t=e._getUserAgent().match(new RegExp(e.OPERATING_SYSTEMS.MACOSX+" "+e.REGEX_VERSION_MAC));if(t){var n=t[1].replace(/_/g,"."),r=[];if(n){var o=i(n);return o?(r=n.split(o),r[0]):n}}return e.UNKNOWN_VERSION}function i(e){return e.indexOf(".")>-1?".":e.indexOf("_")>-1?"_":null}return e._getOsName()===e.OPERATING_SYSTEMS.WINDOWS?t():e._getOsName()===e.OPERATING_SYSTEMS.MACOSX?n():e.UNKNOWN_VERSION},e}();c.semanticContext=new d((!0)),c.firstLaunchTime=-1,c.BROWSERS={MSIE:"MSIE",CHROME:"Chrome",FIREFOX:"Firefox",SAFARI:"Safari",EDGE:"Edge",ELECTRON:"Electron",SKYPE_SHELL:"SkypeShell",PHANTOMJS:"PhantomJS",UNKNOWN:"Unknown"},c.OPERATING_SYSTEMS={WINDOWS:"Windows",MACOSX:"Mac OS X",WINDOWS_PHONE:"Windows Phone",WINDOWS_RT:"Windows RT",IOS:"iOS",ANDROID:"Android",LINUX:"Linux",UNKNOWN:"Unknown"},c.VERSION_MAPPINGS={5.1:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1","10.0":"10"},c.REGEX_VERSION="([\\d,.]+)",c.REGEX_VERSION_MAC="([\\d,_,.]+)",c.UNKNOWN_VERSION="Unknown",c.DEVICE_ID_COOKIE="MicrosoftApplicationsTelemetryDeviceId",c.FIRST_LAUNCH_TIME_COOKIE="MicrosoftApplicationsTelemetryFirstLaunchTime",c._deleteCookie=function(e){"undefined"!=typeof document&&"undefined"!=typeof document.cookie&&(document.cookie=e+"=;expires=Thu, 01 Jan 1970 00:00:01 GMT;")},c._disableCookies=!1;var l;!function(e){e[e.STARTED=0]="STARTED",e[e.ENDED=1]="ENDED"}(l=t.SessionState||(t.SessionState={}));var _=function(){function e(){}return e.initialize=function(t,i){if(!e._initialized){if(!t)throw new u(a.INVALID_TENANT_TOKEN);if(e._defaultToken=t,e._tmConfig.collectorUrl="https://browser.pipe.aria.microsoft.com/Collector/3.0/",e._configuration=i,!("undefined"!=typeof window||i&&i.browserOverrides&&i.browserOverrides.onGetData))throw new u(a.INVALID_CONFIGURATION_USE_CUSTOM_GET_SET);var o=null;if(i)if(i.collectorUrl&&(e._tmConfig.collectorUrl=i.collectorUrl),i.browserOverrides){if(o=new r,i.browserOverrides.onGetData?!i.browserOverrides.onSaveData:!!i.browserOverrides.onSaveData)throw new u(a.INVALID_CONFIGURATION_USE_CUSTOM_GET_SET);o.onGetData=i.browserOverrides.onGetData,o.onSaveData=i.browserOverrides.onSaveData}else i.disableCookies&&(e._sessionEnabled=!1);n.Initialize(e._tmConfig),n.Start(),c.initialize(o,i.disableCookies),e._initialized=!0,"undefined"!=typeof window&&window.addEventListener&&(i&&i.enableAutoUserSession&&(e._logger=new f,e._logger.logSession(l.STARTED)),window.addEventListener("beforeunload",e._teardown))}},e.pauseTransmission=function(){n.Pause()},e.resumeTransmission=function(){n.Resume()},e.flush=function(e){n.Flush(e)},e.addCallbackListener=function(t){e._initialized&&n.AddListener(t)},e.setContext=function(t,n,i){e._contextProperties.setProperty(t,n,i)},e.isInitialized=function(){return e._initialized},e.getDefaultToken=function(){return e._defaultToken},e.getSemanticContext=function(){return e._semanticContext},e._getInitIdForToken=function(n){return e._initIdMap[n]||(e._initIdMap[n]=t.datamodels.utils.GetGuid()),e._initIdMap[n]},e._getSequenceForToken=function(t){return e._sequenceMap[t]||(e._sequenceMap[t]=0),e._sequenceMap[t]++,e._sequenceMap[t]},e._teardown=function(){e._logger&&e._logger.logSession(l.ENDED),e.flush()},e.__backToUninitialized=function(){e._tmConfig=new t._sender.TelemetryConfig,e._semanticContext=new d((!0)),e._contextProperties=new s,e._configuration=null,n=t._sender.TelemetryManagerFactory.CreateTelemetryManager(),e._initialized=!1,e._initIdMap={},e._sequenceMap={}},e}();_._initialized=!1,_._defaultToken=null,_._tmConfig=new t._sender.TelemetryConfig,_._logger=null,_._initIdMap={},_._sequenceMap={},_._configuration=null,_._contextProperties=new s,_._semanticContext=new d((!0)),_._sessionEnabled=!0,t.LogManager=_;var f=function(){function e(e){this._initId=null,this._tenantToken=null,this._contextProperties=new s,this._semanticContext=new d((!1)),this._sessionStartTime=0,this._sessionId=null,e?this._tenantToken=e:this._tenantToken=_.getDefaultToken(),this._initId=_._getInitIdForToken(this._tenantToken)}return e.prototype.logEvent=function(e){if(!e.name)throw new u(a.MISSING_EVENT_PROPERTIES_NAME);var t=this._createEventRecord(e.name,e.eventType);this._addPropertiesAndSendEvent(t,e)},e.prototype.logFailure=function(e,t,n,i,r){if(!e)throw new u(a.MISSING_FAILURE_SIGNATURE);if(!t)throw new u(a.MISSING_FAILURE_DETAIL);var o=this._createEventRecord("failure","failure");o.Extension.Add("Failure.Signature",e),o.Extension.Add("Failure.Detail",t),n&&o.Extension.Add("Failure.Category",n),i&&o.Extension.Add("Failure.Id",i),this._addPropertiesAndSendEvent(o,r)},e.prototype.logPageView=function(e,t,n,i,r,o){if(!e)throw new u(a.MISSING_PAGEVIEW_ID);if(!t)throw new u(a.MISSING_PAGEVIEW_NAME);var s=this._createEventRecord("pageview","pageview");s.Extension.Add("PageView.Id",e),s.Extension.Add("PageView.Name",t),n&&s.Extension.Add("PageView.Category",n),i&&s.Extension.Add("PageView.Uri",i),r&&s.Extension.Add("PageView.ReferrerUri",r),this._addPropertiesAndSendEvent(s,o)},e.prototype.logSession=function(e,n){if(_._sessionEnabled){if(e!==l.STARTED&&e!==l.ENDED)throw new u(a.INVALID_SESSION_STATE);var i=this._createEventRecord("session","session");if(e===l.STARTED){if(this._sessionStartTime>0)return;this._sessionStartTime=(new Date).getTime(),this._sessionId=t.datamodels.utils.GetGuid(),i.Extension.Add("Session.Id",this._sessionId),i.Extension.Add("Session.State","Started")}else if(e===l.ENDED){if(0==this._sessionStartTime)return;var r=Math.floor(((new Date).getTime()-this._sessionStartTime)/1e3);i.Extension.Add("Session.Duration",r.toString()),i.Extension.Add("Session.DurationBucket",this._getSessionDurationFromTime(r)),i.Extension.Add("Session.Id",this._sessionId),i.Extension.Add("Session.State","Ended"),this._sessionId=null,this._sessionStartTime=0}i.Extension.Add("Session.FirstLaunchTime",this._getISOString(new Date(c.firstLaunchTime))),this._addPropertiesAndSendEvent(i,n)}},e.prototype.getSessionId=function(){return this._sessionId},e.prototype.setContext=function(e,t,n){this._contextProperties.setProperty(e,t,n)},e.prototype.getSemanticContext=function(){return this._semanticContext},e.prototype._getSessionDurationFromTime=function(e){return e<0?"Undefined":e<=3?"UpTo3Sec":e<=10?"UpTo10Sec":e<=30?"UpTo30Sec":e<=60?"UpTo60Sec":e<=180?"UpTo3Min":e<=600?"UpTo10Min":e<=1800?"UpTo30Min":"Above30Min"},e.prototype._createEventRecord=function(e,n){var i=new t.datamodels.Record;n||(n="custom"),i.EventType=e.toLowerCase(),i.Type=n.toLowerCase(),i.Extension.Add("EventInfo.Source","JS_default_source"),i.Extension.Add("EventInfo.InitId",this._initId),i.Extension.Add("EventInfo.Sequence",_._getSequenceForToken(this._tenantToken).toString()),i.Extension.Add("EventInfo.Name",e.toLowerCase());var r=new Date;return i.Timestamp=t.datamodels.utils.GetTimeStampWithValue(r.getTime()),i.Extension.Add("EventInfo.Time",this._getISOString(r)),i.Extension.Add("EventInfo.SdkVersion","ACT-Web-JS-"+clienttelemetry_build.version),i},e.prototype._getISOString=function(e){function t(e){return e<10?"0"+e:e.toString()}function n(e){return e<10?"00"+e:e<100?"0"+e:e.toString()}return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+n(e.getUTCMilliseconds())+"Z"},e.prototype._addCustomPropertiesToEvent=function(e,t){this._addSemanticContext(e,c.semanticContext),this._addSemanticContext(e,_._semanticContext),this._addSemanticContext(e,this._semanticContext),this._sessionId&&e.Extension.Add("Session.Id",this._sessionId),this._addEventPropertiesToEvent(e,_._contextProperties),this._addEventPropertiesToEvent(e,this._contextProperties),this._addEventPropertiesToEvent(e,t)},e.prototype._addSemanticContext=function(e,n){if(n&&n.contextMap){var i=n.contextMap;for(var r in n.contextMap)"UserInfo.Id"==r&&n.piiKind!=t.datamodels.PIIKind.NotSet?e.AddOrReplacePII(r,i[r],n.piiKind):e.Extension.AddOrReplace(r,i[r])}},e.prototype._addEventPropertiesToEvent=function(e,n){if(n){n.timestamp&&n.timestamp>=new Date("1/1/2000").getTime()&&(e.Timestamp=t.datamodels.utils.GetTimeStampWithValue(n.timestamp),e.Extension.AddOrReplace("EventInfo.Time",this._getISOString(new Date(n.timestamp)))),n.name&&(e.EventType=n.name.toLowerCase(),e.Extension.AddOrReplace("EventInfo.Name",n.name.toLowerCase()));var i=n.properties;if(i)for(var r in i)r&&(i[r].value||i[r].value===!1||0==i[r].value||""==i[r].value)&&(o._isPii(i[r].pii)?(e.AddOrReplacePII(r,i[r].value.toString(),i[r].pii),e.Extension.Remove(r)):(e.Extension.AddOrReplace(r,i[r].value.toString()),e.PIIExtensions.Remove(r)))}},e.prototype._addPropertiesAndSendEvent=function(e,t){this._addCustomPropertiesToEvent(e,t),_.isInitialized()&&(this._sanitizeName(e),n.SendAsync(this._tenantToken,[e]))},e.prototype._sanitizeName=function(e){var t=e.EventType.replace(/\./g,"_");e.EventType=t,e.Extension.AddOrReplace("EventInfo.Name",t)},e}();t.Logger=f}(n=t.telemetry||(t.telemetry={}))}(t=e.applications||(e.applications={}))}(microsoft||(microsoft={})),"undefined"!=typeof module&&(module.exports=microsoft.applications.telemetry); \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/ariatelemetry/aria-web-telemetry.js b/node_modules/@microsoft/office-js/dist/ariatelemetry/aria-web-telemetry.js new file mode 100644 index 0000000..b9920a0 --- /dev/null +++ b/node_modules/@microsoft/office-js/dist/ariatelemetry/aria-web-telemetry.js @@ -0,0 +1 @@ +!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var i=t();for(var n in i)("object"==typeof exports?exports:e)[n]=i[n]}}(this,function(){return function(e){function t(n){if(i[n])return i[n].exports;var r=i[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var i={};return t.m=e,t.c=i,t.i=function(e){return e},t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var i=e&&e.e?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=30)}([function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Unspecified=0]="Unspecified",e[e.String=1]="String",e[e.Int64=2]="Int64",e[e.Double=3]="Double",e[e.Boolean=4]="Boolean"}(t.AWTPropertyType||(t.AWTPropertyType={}));!function(e){e[e.NotSet=0]="NotSet",e[e.DistinguishedName=1]="DistinguishedName",e[e.GenericData=2]="GenericData",e[e.IPV4Address=3]="IPV4Address",e[e.IPv6Address=4]="IPv6Address",e[e.MailSubject=5]="MailSubject",e[e.PhoneNumber=6]="PhoneNumber",e[e.QueryString=7]="QueryString",e[e.SipAddress=8]="SipAddress",e[e.SmtpAddress=9]="SmtpAddress",e[e.Identity=10]="Identity",e[e.Uri=11]="Uri",e[e.Fqdn=12]="Fqdn",e[e.IPV4AddressLegacy=13]="IPV4AddressLegacy"}(t.AWTPiiKind||(t.AWTPiiKind={}));!function(e){e[e.NotSet=0]="NotSet",e[e.GenericContent=1]="GenericContent"}(t.AWTCustomerContentKind||(t.AWTCustomerContentKind={}));!function(e){e[e.Low=1]="Low",e[e.Normal=2]="Normal",e[e.High=3]="High"}(t.AWTEventPriority||(t.AWTEventPriority={}));!function(e){e[e.NonRetryableStatus=1]="NonRetryableStatus",e[e.KillSwitch=2]="KillSwitch",e[e.QueueFull=3]="QueueFull"}(t.AWTEventsDroppedReason||(t.AWTEventsDroppedReason={}));!function(e){e[e.InvalidEvent=1]="InvalidEvent",e[e.SizeLimitExceeded=2]="SizeLimitExceeded"}(t.AWTEventsRejectedReason||(t.AWTEventsRejectedReason={}))},function(e,t,i){"use strict";function n(e){var t=new I.Int64("0");return t.low=4294967295&e,t.high=Math.floor(e/4294967296),t}function r(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(W,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}function o(e){return"string"==typeof e}function s(e){return(e+E)*B}function a(e){var t=e.indexOf("-");return t>-1?e.substring(0,t):""}function u(){return null===w&&(w="undefined"!=typeof navigator&&Boolean(navigator.sendBeacon)),w}function d(){return null===C&&(C="undefined"!=typeof Uint8Array&&!S()&&!A()),C}function _(e){return!isNaN(e)&&null!==e&&e>=1&&e<=3}function l(e,i){return"string"!=typeof i&&"number"!=typeof i&&"boolean"!=typeof i||(i={value:i,type:P.AWTPropertyType.Unspecified}),t.PropertyNameRegex.test(e)&&void 0!==i&&null!==i&&null!==i.value&&void 0!==i.value&&""!==i.value?(i.type=v(i.value,i.type),i.type?(void 0===i.pii&&(i.pii=P.AWTPiiKind.NotSet),void 0===i.cc&&(i.cc=P.AWTCustomerContentKind.NotSet),!T(i.pii)||!g(i.cc)||i.cc>0&&i.pii!==P.AWTPiiKind.NotSet?null:i):null):null}function c(e){return e.getUTCFullYear()+"-"+f(e.getUTCMonth()+1)+"-"+f(e.getUTCDate())+"T"+f(e.getUTCHours())+":"+f(e.getUTCMinutes())+":"+f(e.getUTCSeconds())+"."+h(e.getUTCMilliseconds())+"Z"}function p(){if(null===b){var e=new XMLHttpRequest;b=void 0===e.withCredentials&&"undefined"!=typeof XDomainRequest}return b}function f(e){return e<10?"0"+e:e.toString()}function h(e){return e<10?"00"+e:e<100?"0"+e:e.toString()}function v(e,t){return m(t)&&t!==P.AWTPropertyType.Unspecified?t===P.AWTPropertyType.String&&"string"==typeof e?t:t!==P.AWTPropertyType.Double&&t!==P.AWTPropertyType.Int64||"number"!=typeof e?t===P.AWTPropertyType.Boolean&&"boolean"==typeof e?t:void 0:t===P.AWTPropertyType.Int64&&e%1!=0?null:t:y(e)}function y(e){switch(typeof e){case"string":return P.AWTPropertyType.String;case"boolean":return P.AWTPropertyType.Boolean;case"number":return P.AWTPropertyType.Double}return P.AWTPropertyType.Unspecified}function T(e){return!isNaN(e)&&null!==e&&e>=0&&e<=13}function g(e){return!isNaN(e)&&null!==e&&e>=0&&e<=1}function m(e){return!isNaN(e)&&null!==e&&e>=0&&e<=4}function S(){if("undefined"!=typeof navigator&&navigator.userAgent){var e=navigator.userAgent.toLowerCase();if((e.indexOf("safari")>=0||e.indexOf("firefox")>=0)&&e.indexOf("chrome")<0)return!0}return!1}function A(){return!("undefined"==typeof navigator||!navigator.product)&&"ReactNative"===navigator.product}Object.defineProperty(t,"__esModule",{value:!0});var I=i(4),P=i(0),W=/[xy]/g,E=621355968e5,B=1e4;t.EventNameAndTypeRegex=/^[a-zA-Z]([a-zA-Z0-9]|_){2,98}[a-zA-Z0-9]$/,t.EventNameDotRegex=/\./g,t.PropertyNameRegex=/^[a-zA-Z](([a-zA-Z0-9|_|\.]){0,98}[a-zA-Z0-9])?$/,t.StatsApiKey="a387cfcf60114a43a7699f9fbb49289e-9bceb9fe-1c06-460f-96c5-6a0b247358bc-7238";var w=null,C=null,b=null;t.numberToBondInt64=n,t.newGuid=r,t.isString=o,t.msToTicks=s,t.getTenantId=a,t.isBeaconsSupported=u,t.isUint8ArrayAvailable=d,t.isPriority=_,t.sanitizeProperty=l,t.getISOString=c,t.useXDomainRequest=p},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.addNotificationListener=function(e){this.listeners.push(e)},e.eventsSent=function(e){for(var t=this,i=this,n=0;n=0&&!this._&&(this.t.hasEvents()?(0===t&&this.f>0&&(t=1),this.u=setTimeout(function(){return e.h()},t*(1<=0;--i)if(e[t][i]<0){for(var n=i;n>=0;--n)e[t][n]=-1;break}for(var i=2;i>0;--i)if(e[t][i]>0&&e[t][i-1]>0){var r=e[t][i-1]/e[t][i];e[t][i-1]=Math.ceil(r)*e[t][i]}this.r[t]=e[t]}},e.sendEvent=function(e){this.y&&(this.t.addEvent(e),this.scheduleTimer())},e.flush=function(e){var t=(new Date).getTime();!this._&&this.A+3e4-1&&(clearTimeout(this.u),this.u=-1),this.t.uploadNow(e))},e.pauseTransmission=function(){this._||(this.clearTimeout(),this.t.pauseTransmission(),this._=!0)},e.resumeTransmision=function(){this._&&(this._=!1,this.t.resumeTransmission(),this.scheduleTimer())},e.flushAndTeardown=function(){s.default.teardown(),this.y=!1,this.clearTimeout(),this.t.teardown()},e.backOffTransmission=function(){this.f<4&&(this.f++,this.clearTimeout(),this.scheduleTimer())},e.clearBackOff=function(){this.f>0&&(this.f=0,this.clearTimeout(),this.scheduleTimer())},e.S=function(){this.clearTimeout(),this.g(),this.a=n.AWT_REAL_TIME,this.scheduleTimer()},e.clearTimeout=function(){this.u>0&&(clearTimeout(this.u),this.u=-1,this.v=0)},e.h=function(){var e=r.AWTEventPriority.High;this.v++,this.v*this.r[this.a][2]===this.r[this.a][0]?(e=r.AWTEventPriority.Low,this.v=0):this.v*this.r[this.a][2]===this.r[this.a][1]&&(e=r.AWTEventPriority.Normal),this.t.sendEventsForPriorityAndAbove(e),this.u=-1,this.scheduleTimer()},e.g=function(){this.r={},this.r.REAL_TIME=[4,2,1],this.r.NEAR_REAL_TIME=[12,6,3],this.r.BEST_EFFOR=[36,18,9]},e.y=!1,e.a=n.AWT_REAL_TIME,e.u=-1,e.f=0,e._=!1,e.v=0,e.A=0,e}();t.default=_},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.low=0,this.high=0,this.low=parseInt(e,10),this.low<0&&(this.high=-1)}return e.prototype.I=function(t){var i=new e(t);return this.low===i.low&&this.high===i.high},e}();t.Int64=n;var r=function(){function e(e){this.low=0,this.high=0,this.low=parseInt(e,10)}return e.prototype.I=function(t){var i=new e(t);return this.low===i.low&&this.high===i.high},e}();t.UInt64=r;var o=function(){function e(){}return e.P=function(e){return this.W(e)},e.W=function(e){return 255&e},e.B=function(e){return 2147483647&e|2147483648&e},e.w=function(e){return 4294967295&e},e}();t.Number=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),r=i(0),o=function(){function e(e){this.C={name:"",properties:{}},e&&this.setName(e)}return e.prototype.setName=function(e){this.C.name=e},e.prototype.getName=function(){if(this.C.name&&n.isString(this.C.name))return this.C.name},e.prototype.setType=function(e){this.C.type=e},e.prototype.getType=function(){if(this.C.type&&n.isString(this.C.type))return this.C.type},e.prototype.setTimestamp=function(e){this.C.timestamp=e},e.prototype.getTimestamp=function(){if(this.C.timestamp&&!isNaN(this.C.timestamp))return this.C.timestamp},e.prototype.setEventPriority=function(e){n.isPriority(e)&&(this.C.priority=e)},e.prototype.getEventPriority=function(){return this.C.priority},e.prototype.setProperty=function(e,t,i){void 0===i&&(i=r.AWTPropertyType.Unspecified);var o={value:t,type:i,pii:r.AWTPiiKind.NotSet,cc:r.AWTCustomerContentKind.NotSet};if(null===(o=n.sanitizeProperty(e,o)))return void delete this.C.properties[e];this.C.properties[e]=o},e.prototype.setPropertyWithPii=function(e,t,i,o){void 0===o&&(o=r.AWTPropertyType.Unspecified);var s={value:t,type:o,pii:i,cc:r.AWTCustomerContentKind.NotSet};if(null===(s=n.sanitizeProperty(e,s)))return void delete this.C.properties[e];this.C.properties[e]=s},e.prototype.setPropertyWithCustomerContent=function(e,t,i,o){void 0===o&&(o=r.AWTPropertyType.Unspecified);var s={value:t,type:o,pii:r.AWTPiiKind.NotSet,cc:i};if(null===(s=n.sanitizeProperty(e,s)))return void delete this.C.properties[e];this.C.properties[e]=s},e.prototype.getPropertyMap=function(){return this.C.properties},e.prototype.getEvent=function(){return this.C},e}();t.default=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(21),r=i(0),o=i(1),s=function(){function e(){}return e.getPayloadBlob=function(e,t){var i=new n.IO.MemoryStream,r=new n.CompactBinaryProtocolWriter(i);r.b(n.O.D,3,null),r.N(t,n.O.R,n.O.M);for(var s in e)if(e.hasOwnProperty(s)){r.U(s);var a=e[s];r.k(1,n.O.x),r.b(n.O.R,2,null),r.U("act_default_source"),r.b(n.O.R,5,null),r.U(o.newGuid()),r.b(n.O.L,6,null),r.F(o.numberToBondInt64(Date.now())),r.b(n.O.M,8,null),r.k(a.length,n.O.x);for(var u=0;u0)v[T]=g,y++;else if(g.pii>0)f[T]=g,h++;else switch(g.type){case r.AWTPropertyType.String:s[T]=g.value,a++;break;case r.AWTPropertyType.Int64:u[T]=g.value,d++;break;case r.AWTPropertyType.Double:_[T]=g.value,l++;break;case r.AWTPropertyType.Boolean:c[T]=g.value,p++}}if(a){i.b(n.O.D,13,null),i.N(a,n.O.R,n.O.R);for(var T in s)if(s.hasOwnProperty(T)){var m=s[T];i.U(T),i.U(m.toString())}}if(h){i.b(n.O.D,30,null),i.N(h,n.O.R,n.O.x);for(var T in f)if(f.hasOwnProperty(T)){var g=f[T];i.U(T),i.b(n.O.j,1,null),i.K(1),i.b(n.O.j,2,null),i.K(g.pii),i.b(n.O.R,3,null),i.U(g.value.toString()),i.q(!1)}}if(p){i.b(n.O.D,31,null),i.N(p,n.O.R,n.O.Q);for(var T in c)if(c.hasOwnProperty(T)){var m=c[T];i.U(T),i.V(m)}}if(d){i.b(n.O.D,33,null),i.N(d,n.O.R,n.O.L);for(var T in u)if(u.hasOwnProperty(T)){var m=u[T];i.U(T),i.F(o.numberToBondInt64(m))}}if(l){i.b(n.O.D,34,null),i.N(l,n.O.R,n.O.G);for(var T in _)if(_.hasOwnProperty(T)){var m=_[T];i.U(T),i.X(m)}}if(y){i.b(n.O.D,36,null),i.N(y,n.O.R,n.O.x);for(var T in v)if(v.hasOwnProperty(T)){var g=v[T];i.U(T),i.b(n.O.j,1,null),i.K(g.cc),i.b(n.O.R,2,null),i.U(g.value.toString()),i.q(!1)}}return i.q(!1),t.H()},e.base64Encode=function(e){return n.J.Z(e)},e}();t.default=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),r="MicrosoftApplicationsTelemetryDeviceId",o="MicrosoftApplicationsTelemetryFirstLaunchTime",s={MSIE:"MSIE",CHROME:"Chrome",FIREFOX:"Firefox",SAFARI:"Safari",EDGE:"Edge",ELECTRON:"Electron",SKYPE_SHELL:"SkypeShell",PHANTOMJS:"PhantomJS",OPERA:"Opera"},a={WINDOWS:"Windows",MACOSX:"Mac OS X",WINDOWS_PHONE:"Windows Phone",WINDOWS_RT:"Windows RT",IOS:"iOS",ANDROID:"Android",LINUX:"Linux",UNKNOWN:"Unknown"},u={WIN:/(windows|win32)/i,WINRT:/ arm;/i,WINPHONE:/windows\sphone\s\d+\.\d+/i,OSX:/(macintosh|mac os x)/i,IOS:/(iPad|iPhone|iPod)(?=.*like Mac OS X)/i,LINUX:/(linux|joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk)/i,ANDROID:/android/i},d={5.1:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1","10.0":"10"},_=function(){function e(){}return e.addPropertyStorageOverride=function(e){return!!e&&(this.Y=e,!0)},e.autoCollect=function(e,t,i){if(this.$=e,this.ee=t,this.te(),i||"undefined"==typeof navigator||(i=navigator.userAgent||""),this.ie(i),this.ee&&!this.Y)return this.ne(r),void this.ne(o);this.re()},e.checkAndSaveDeviceId=function(e){if(e){this.oe(r)!==e&&(this.se(r,e),this.se(o,n.getISOString(new Date))),this.firstLaunchTime=this.oe(o)}},e.re=function(){var e=this.oe(r);e?this.firstLaunchTime=this.oe(o):(e=n.newGuid(),this.checkAndSaveDeviceId(e)),this.$.setDeviceId(e)},e.te=function(){"undefined"!=typeof document&&document.documentElement&&this.$.setAppLanguage(document.documentElement.lang),"undefined"!=typeof navigator&&this.$.setUserLanguage(navigator.userLanguage||navigator.language);var e=(new Date).getTimezoneOffset(),t=e%60,i=(e-t)/60,n="+";i>0&&(n="-"),i=Math.abs(i),t=Math.abs(t),this.$.setUserTimeZone(n+(i<10?"0"+i:i.toString())+":"+(t<10?"0"+t:t.toString()))},e.ie=function(e){if(e){var t=this.ae(e);this.$.setDeviceBrowserName(t),this.$.setDeviceBrowserVersion(this.ue(e,t));var i=this.de(e);this.$.setDeviceOsName(i),this.$.setDeviceOsVersion(this._e(e,i))}},e.ae=function(e){return this.le("OPR/",e)?s.OPERA:this.le(s.PHANTOMJS,e)?s.PHANTOMJS:this.le(s.EDGE,e)?s.EDGE:this.le(s.ELECTRON,e)?s.ELECTRON:this.le(s.CHROME,e)?s.CHROME:this.le("Trident",e)?s.MSIE:this.le(s.FIREFOX,e)?s.FIREFOX:this.le(s.SAFARI,e)?s.SAFARI:this.le(s.SKYPE_SHELL,e)?s.SKYPE_SHELL:"Unknown"},e.le=function(e,t){return t.indexOf(e)>-1},e.ue=function(e,t){return t===s.MSIE?this.ce(e):this.pe(t,e)},e.ce=function(e){var t=e.match(new RegExp(s.MSIE+" ([\\d,.]+)"));if(t)return t[1];var i=e.match(new RegExp("rv:([\\d,.]+)"));return i?i[1]:void 0},e.pe=function(e,t){e===s.SAFARI&&(e="Version");var i=t.match(new RegExp(e+"/([\\d,.]+)"));return i?i[1]:"Unknown"},e.de=function(e){return e.match(u.WINPHONE)?a.WINDOWS_PHONE:e.match(u.WINRT)?a.WINDOWS_RT:e.match(u.IOS)?a.IOS:e.match(u.ANDROID)?a.ANDROID:e.match(u.LINUX)?a.LINUX:e.match(u.OSX)?a.MACOSX:e.match(u.WIN)?a.WINDOWS:"Unknown"},e._e=function(e,t){return t===a.WINDOWS?this.fe(e):t===a.MACOSX?this.he(e):"Unknown"},e.fe=function(e){var t=e.match(new RegExp("Windows NT ([\\d,.]+)"));return t&&d[t[1]]?d[t[1]]:"Unknown"},e.he=function(e){var t=e.match(new RegExp(a.MACOSX+" ([\\d,_,.]+)"));if(t){var i=t[1].replace(/_/g,".");if(i){var n=this.ve(i);if(n){return i.split(n)[0]}return i}}return"Unknown"},e.ve=function(e){return e.indexOf(".")>-1?".":e.indexOf("_")>-1?"_":null},e.se=function(e,t){if(this.Y)this.Y.setProperty(e,t);else if("undefined"!=typeof document&&void 0!==document.cookie&&!this.ee){var i=new Date;i.setTime(i.getTime()+31536e6);var n="expires="+i.toUTCString();document.cookie=e+"="+t+"; "+n}},e.oe=function(e){if(this.Y)return this.Y.getProperty(e)||"";if("undefined"!=typeof document&&void 0!==document.cookie&&!this.ee){e+="=";for(var t=document.cookie.split(";"),i=0;i=0&&i<=12)this.ge("UserInfo.IdType",i.toString());else{var n=void 0;switch(t){case r.AWTPiiKind.SipAddress:n=o.AWTUserIdType.SipAddress;break;case r.AWTPiiKind.PhoneNumber:n=o.AWTUserIdType.PhoneNumber;break;case r.AWTPiiKind.SmtpAddress:n=o.AWTUserIdType.EmailAddress;break;default:n=o.AWTUserIdType.Unknown}this.ge("UserInfo.IdType",n.toString())}if(isNaN(t)||null===t||t===r.AWTPiiKind.NotSet||t>13)switch(i){case o.AWTUserIdType.Skype:t=r.AWTPiiKind.Identity;break;case o.AWTUserIdType.EmailAddress:t=r.AWTPiiKind.SmtpAddress;break;case o.AWTUserIdType.PhoneNumber:t=r.AWTPiiKind.PhoneNumber;break;case o.AWTUserIdType.SipAddress:t=r.AWTPiiKind.SipAddress;break;default:t=r.AWTPiiKind.NotSet}this.me("UserInfo.Id",e,t)},e.prototype.setUserAdvertisingId=function(e){this.ge("UserInfo.AdvertisingId",e)},e.prototype.setUserTimeZone=function(e){this.ge("UserInfo.TimeZone",e)},e.prototype.setUserLanguage=function(e){this.ge("UserInfo.Language",e)},e.prototype.ge=function(e,t){"string"==typeof t&&this.Te.setProperty(e,t)},e.prototype.me=function(e,t,i){"string"==typeof t&&this.Te.setPropertyWithPii(e,t,i)},e}();t.default=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Unknown=0]="Unknown",e[e.MSACID=1]="MSACID",e[e.MSAPUID=2]="MSAPUID",e[e.ANID=3]="ANID",e[e.OrgIdCID=4]="OrgIdCID",e[e.OrgIdPUID=5]="OrgIdPUID",e[e.UserObjectId=6]="UserObjectId",e[e.Skype=7]="Skype",e[e.Yammer=8]="Yammer",e[e.EmailAddress=9]="EmailAddress",e[e.PhoneNumber=10]="PhoneNumber",e[e.SipAddress=11]="SipAddress",e[e.MUID=12]="MUID"}(t.AWTUserIdType||(t.AWTUserIdType={}));!function(e){e[e.Started=0]="Started",e[e.Ended=1]="Ended"}(t.AWTSessionState||(t.AWTSessionState={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),r=i(2),o=function(){function e(){}return e.initialize=function(e){var t=this;this.Se=e,this.Ae=!0,r.default.addNotificationListener({eventsSent:function(e){t.Ie("records_sent_count",e.length,e[0].apiKey)},eventsDropped:function(e,i){t.Ie("records_dropped_count",e.length,e[0].apiKey)},eventsRejected:function(e,i){t.Ie("r_count",e.length,e[0].apiKey)},eventsRetrying:null}),setTimeout(function(){return t.flush()},6e4)},e.teardown=function(){this.Ae&&(this.flush(),this.Ae=!1)},e.eventReceived=function(t){e.Ie("records_received_count",1,t)},e.flush=function(){var e=this;if(this.Ae){for(var t in this.Pe)this.Pe.hasOwnProperty(t)&&this.Se(this.Pe[t],t);this.Pe={},setTimeout(function(){return e.flush()},6e4)}},e.Ie=function(e,t,i){if(this.Ae&&i!==n.StatsApiKey){var r=n.getTenantId(i);this.Pe[r]||(this.Pe[r]={}),this.Pe[r][e]?this.Pe[r][e]=this.Pe[r][e]+t:this.Pe[r][e]=t}},e.Ae=!1,e.Pe={},e}();t.default=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),r=i(12),o=i(13),s=i(3),a=i(2),u=i(7),d=function(){function e(){}return e.initialize=function(e,t){if(void 0===t&&(t={}),!this.We)return this.We=!0,r.default.defaultTenantToken=e,this.Ee(t),this.T.disableCookiesUsage&&!this.T.propertyStorageOverride&&(r.default.sessionEnabled=!1),u.default.addPropertyStorageOverride(this.T.propertyStorageOverride),u.default.autoCollect(r.default.semanticContext,this.T.disableCookiesUsage,this.T.userAgent),s.default.initialize(this.T),r.default.loggingEnabled=!0,this.getLogger()},e.getSemanticContext=function(){return r.default.semanticContext},e.flush=function(e){this.We&&!this.Be&&s.default.flush(e)},e.flushAndTeardown=function(){this.We&&!this.Be&&(this.Be=!0,s.default.flushAndTeardown(),r.default.loggingEnabled=!1)},e.pauseTransmission=function(){this.We&&!this.Be&&s.default.pauseTransmission()},e.resumeTransmision=function(){this.We&&!this.Be&&s.default.resumeTransmision()},e.setTransmitProfile=function(e){this.We&&!this.Be&&s.default.setTransmitProfile(e)},e.loadTransmitProfiles=function(e){this.We&&!this.Be&&s.default.loadTransmitProfiles(e)},e.setContext=function(e,t,i){void 0===i&&(i=n.AWTPropertyType.Unspecified),r.default.logManagerContext.setProperty(e,t,i)},e.setContextWithPii=function(e,t,i,o){void 0===o&&(o=n.AWTPropertyType.Unspecified),r.default.logManagerContext.setPropertyWithPii(e,t,i,o)},e.prototype.setContextWithCustomerContent=function(e,t,i,o){void 0===o&&(o=n.AWTPropertyType.Unspecified),r.default.logManagerContext.setPropertyWithCustomerContent(e,t,i,o)},e.getLogger=function(e){var t=e;return t&&t!==r.default.defaultTenantToken||(t=""),this.we[e]||(this.we[e]=new o.default(e)),this.we[e]},e.addNotificationListener=function(e){a.default.addNotificationListener(e)},e.Ee=function(e){e.collectorUri&&(this.T.collectorUri=e.collectorUri),e.cacheMemorySizeLimitInNumberOfEvents>0&&(this.T.cacheMemorySizeLimitInNumberOfEvents=e.cacheMemorySizeLimitInNumberOfEvents),e.httpXHROverride&&e.httpXHROverride.sendPOST&&(this.T.httpXHROverride=e.httpXHROverride),e.propertyStorageOverride&&e.propertyStorageOverride.getProperty&&e.propertyStorageOverride.setProperty&&(this.T.propertyStorageOverride=e.propertyStorageOverride),e.userAgent&&(this.T.userAgent=e.userAgent),e.disableCookiesUsage&&(this.T.disableCookiesUsage=e.disableCookiesUsage),e.canSendStatEvent&&(this.T.canSendStatEvent=e.canSendStatEvent)},e.we={},e.We=!1,e.Be=!1,e.T={collectorUri:"https://browser.pipe.aria.microsoft.com/Collector/3.0/",cacheMemorySizeLimitInNumberOfEvents:1e4,disableCookiesUsage:!1,canSendStatEvent:function(e){return!0}},e}();t.default=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(5),r=i(8),o=function(){function e(){}return e.logManagerContext=new n.default,e.sessionEnabled=!0,e.loggingEnabled=!1,e.defaultTenantToken="",e.semanticContext=new r.default(!0,e.logManagerContext),e}();t.default=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),r=i(9),o=i(5),s=i(1),a=i(10),u=i(2),d=i(3),_=i(12),l=i(15),c=i(8),p=i(7),f=function(){function e(e){this.Ce=e,this.be=new o.default,this.$=new c.default(!1,this.be),this.De=0,this.Oe()}return e.prototype.setContext=function(e,t,i){void 0===i&&(i=n.AWTPropertyType.Unspecified),this.be.setProperty(e,t,i)},e.prototype.setContextWithPii=function(e,t,i,r){void 0===r&&(r=n.AWTPropertyType.Unspecified),this.be.setPropertyWithPii(e,t,i,r)},e.prototype.setContextWithCustomerContent=function(e,t,i,r){void 0===r&&(r=n.AWTPropertyType.Unspecified),this.be.setPropertyWithCustomerContent(e,t,i,r)},e.prototype.getSemanticContext=function(){return this.$},e.prototype.logEvent=function(t){if(_.default.loggingEnabled){this.Ce||(this.Ce=_.default.defaultTenantToken,this.Oe());var i=!0;t instanceof o.default&&(t=t.getEvent(),i=!1),a.default.eventReceived(this.Ce),e.Ne(e.Re(t,this.Ce),i,this.be)}},e.prototype.logSession=function(t,i){if(_.default.sessionEnabled){var o={name:"session",type:"session",properties:{}};if(e.Me(o,i),o.priority=n.AWTEventPriority.High,t===r.AWTSessionState.Started){if(this.De>0)return;this.De=(new Date).getTime(),this.Ue=s.newGuid(),this.setContext("Session.Id",this.Ue)}else{if(t!==r.AWTSessionState.Ended)return;if(0===this.De)return;var a=Math.floor(((new Date).getTime()-this.De)/1e3);o.properties["Session.Id"]=this.Ue,o.properties["Session.Duration"]=a.toString(),o.properties["Session.DurationBucket"]=e.ke(a),this.De=0,this.setContext("Session.Id",null),this.Ue=void 0}o.properties["Session.FirstLaunchTime"]=p.default.firstLaunchTime,o.properties["Session.State"]=t.toString(),this.logEvent(o)}},e.prototype.getSessionId=function(){return this.Ue},e.prototype.logFailure=function(t,i,r,o,s){if(t&&i){var a={name:"failure",type:"failure",properties:{}};e.Me(a,s),a.properties["Failure.Signature"]=t,a.properties["Failure.Detail"]=i,r&&(a.properties["Failure.Category"]=r),o&&(a.properties["Failure.Id"]=o),a.priority=n.AWTEventPriority.High,this.logEvent(a)}},e.prototype.logPageView=function(t,i,n,r,o,s){if(t&&i){var a={name:"pageview",type:"pageview",properties:{}};e.Me(a,s),a.properties["PageView.Id"]=t,a.properties["PageView.Name"]=i,n&&(a.properties["PageView.Category"]=n),r&&(a.properties["PageView.Uri"]=r),o&&(a.properties["PageView.ReferrerUri"]=o),this.logEvent(a)}},e.prototype.Oe=function(){!e.xe[this.Ce]&&this.Ce&&(e.xe[this.Ce]=s.newGuid())},e.Me=function(e,t){if(t){t instanceof o.default&&(t=t.getEvent()),t.name&&(e.name=t.name),t.priority&&(e.priority=t.priority);for(var i in t.properties)t.properties.hasOwnProperty(i)&&(e.properties[i]=t.properties[i])}},e.ke=function(e){return e<0?"Undefined":e<=3?"UpTo3Sec":e<=10?"UpTo10Sec":e<=30?"UpTo30Sec":e<=60?"UpTo60Sec":e<=180?"UpTo3Min":e<=600?"UpTo10Min":e<=1800?"UpTo30Min":"Above30Min"},e.Ne=function(e,t,i){if(!e.name||!e.properties)return void u.default.eventsRejected([e],n.AWTEventsRejectedReason.InvalidEvent);if(e.name=e.name.toLowerCase(),e.name=e.name.replace(s.EventNameDotRegex,"_"),e.type?e.type=e.type.toLowerCase():e.type="custom",!s.EventNameAndTypeRegex.test(e.name)||!s.EventNameAndTypeRegex.test(e.type))return void u.default.eventsRejected([e],n.AWTEventsRejectedReason.InvalidEvent);if(isNaN(e.timestamp)&&(e.timestamp=(new Date).getTime()),t&&e.properties)for(var r in e.properties)e.properties.hasOwnProperty(r)&&(e.properties[r]=s.sanitizeProperty(r,e.properties[r]),null===e.properties[r]&&delete e.properties[r]);e.properties||(e.properties={}),this.Le(e,i.getPropertyMap()),this.Le(e,_.default.logManagerContext.getPropertyMap()),this.Fe(e,"EventInfo.InitId",this.ze(e.apiKey)),this.Fe(e,"EventInfo.Sequence",this.qe(e.apiKey)),this.Fe(e,"EventInfo.SdkVersion",l.FullVersionString),this.Fe(e,"EventInfo.Name",e.name),this.Fe(e,"EventInfo.Time",new Date(e.timestamp).toISOString()),s.isPriority(e.priority)||(e.priority=n.AWTEventPriority.Normal),this.He(e)},e.Le=function(e,t){if(t)for(var i in t)t.hasOwnProperty(i)&&(e.properties[i]||(e.properties[i]=t[i]))},e.Fe=function(e,t,i){e.properties[t]={value:i,pii:n.AWTPiiKind.NotSet,type:n.AWTPropertyType.String}},e.He=function(e){d.default.sendEvent(e)},e.Re=function(e,t){var i=e;return i.id=s.newGuid(),i.apiKey=t,i},e.ze=function(t){return e.xe[t]},e.qe=function(t){return void 0===e.je[t]&&(e.je[t]=0),(++e.je[t]).toString()},e.je={},e.xe={},e}();t.default=f},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AWT_REAL_TIME="REAL_TIME",t.AWT_NEAR_REAL_TIME="NEAR_REAL_TIME",t.AWT_BEST_EFFORT="BEST_EFFORT"},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Version="1.1.1",t.FullVersionString="AWT-Web-JS-"+t.Version},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0);t.AWTPropertyType=n.AWTPropertyType,t.AWTPiiKind=n.AWTPiiKind,t.AWTEventPriority=n.AWTEventPriority,t.AWTEventsDroppedReason=n.AWTEventsDroppedReason,t.AWTEventsRejectedReason=n.AWTEventsRejectedReason,t.AWTCustomerContentKind=n.AWTCustomerContentKind;var r=i(9);t.AWTUserIdType=r.AWTUserIdType,t.AWTSessionState=r.AWTSessionState;var o=i(14);t.AWT_BEST_EFFORT=o.AWT_BEST_EFFORT,t.AWT_NEAR_REAL_TIME=o.AWT_NEAR_REAL_TIME,t.AWT_REAL_TIME=o.AWT_REAL_TIME;var s=i(5);t.AWTEventProperties=s.default;var a=i(13);t.AWTLogger=a.default;var u=i(11);t.AWTLogManager=u.default;var d=i(29);t.AWTTransmissionManager=d.default;var _=i(6);t.AWTSerializer=_.default;var l=i(8);t.AWTSemanticContext=l.default,t.AWT_COLLECTOR_URL_UNITED_STATES="https://us.pipe.aria.microsoft.com/Collector/3.0/",t.AWT_COLLECTOR_URL_GERMANY="https://de.pipe.aria.microsoft.com/Collector/3.0/",t.AWT_COLLECTOR_URL_JAPAN="https://jp.pipe.aria.microsoft.com/Collector/3.0/",t.AWT_COLLECTOR_URL_AUSTRALIA="https://au.pipe.aria.microsoft.com/Collector/3.0/",t.AWT_COLLECTOR_URL_EUROPE="https://eu.pipe.aria.microsoft.com/Collector/3.0/"},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Ke=0]="_BT_STOP",e[e.Qe=1]="_BT_STOP_BASE",e[e.Q=2]="_BT_BOOL",e[e.G=8]="_BT_DOUBLE",e[e.R=9]="_BT_STRING",e[e.x=10]="_BT_STRUCT",e[e.M=11]="_BT_LIST",e[e.D=13]="_BT_MAP",e[e.j=16]="_BT_INT32",e[e.L=17]="_BT_INT64"}(t.O||(t.O={}))},function(e,t,i){"use strict";function n(e){for(var t=[],i=0;i>6,128|63&n):n<55296||n>=57344?t.push(224|n>>12,128|n>>6&63,128|63&n):(n=65536+((1023&n)<<10|1023&e.charCodeAt(++i)),t.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n))}return t}function r(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=[],n=e.length%3,r=0,o=e.length-n;r>18&63),t.charAt(e>>12&63),t.charAt(e>>6&63),t.charAt(63&e)].join("")}(s))}switch(n){case 1:var s=e[e.length-1];i.push(t.charAt(s>>2)),i.push(t.charAt(s<<4&63)),i.push("==");break;case 2:var a=(e[e.length-2]<<8)+e[e.length-1];i.push(t.charAt(a>>10)),i.push(t.charAt(a>>4&63)),i.push(t.charAt(a<<2&63)),i.push("=")}return i.join("")}function o(e){for(var t=[];4294967168&e;)t.push(127&e|128),e>>>=7;return t.push(127&e),t}function s(e){for(var t=e.low,i=e.high,n=[];i||4294967168&t;)n.push(127&t|128),t=(127&i)<<25|t>>>7,i>>>=7;return n.push(127&t),n}function a(e){if(c.BrowserChecker.Ve()){var t=new DataView(new ArrayBuffer(8));t.setFloat64(0,e,!0);for(var i=[],n=0;n<8;++n)i.push(t.getUint8(n));return i}return l.FloatUtils.Ge(e,!0)}function u(e){return(e=_.Number.B(e))<<1^e>>31}function d(e){var t=e.low,i=e.high,n=i<<1|t>>>31,r=t<<1;2147483648&i&&(n=~n,r=~r);var o=new _.UInt64("0");return o.low=r,o.high=n,o}Object.defineProperty(t,"__esModule",{value:!0});var _=i(4),l=i(19),c=i(22);t.Xe=n,t.Z=r,t.Ze=o,t.Je=s,t.Ye=a,t.$e=u,t.et=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.Ge=function(e,t){if(!e)return t?this.tt:this.it;var i=t?11:8,n=t?52:23,r=(1<0;)d*=2,d>=1?(l[++c]=1,--d):l[++c]=0;for(var p=0;p<_&&!l[p];)p++;var f=r+1-p,h=p+n;if(l[h+1]){for(c=h;c>p&&(l[c]=1-l[c],!l);--c);c===p&&++f}if(f>s||u)return a?t?this.nt:this.rt:t?this.ot:this.st;if(f>8&255,y>>16&255,y>>>24,255&v,v>>8&255,v>>16&255,v>>>24];return T}var g=0;for(c=0;c<23;++c)g=g<<1|l[++p];g|=f+r<<23,g=a<<31|2147483647&g;var T=[255&g,g>>8&255,g>>16&255,g>>>24];return T},e.it=[0,0,0,0],e.tt=[0,0,0,0,0,0,0,0],e.st=[0,0,128,127],e.rt=[0,0,128,255],e.ot=[0,0,0,0,0,0,240,127],e.nt=[0,0,0,0,0,0,240,255],e}();t.FloatUtils=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(4),r=function(){function e(){this.at=[]}return e.prototype.ut=function(e){this.at.push(n.Number.P(e))},e.prototype.dt=function(e,t,i){for(;i--;)this.ut(e[t++])},e.prototype.H=function(){return this.at},e}();t.MemoryStream=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(17);t.O=n.O;var r=i(18);t.J=r;var o=i(20);t.IO=o;var s=i(4);t.Int64=s.Int64,t.UInt64=s.UInt64,t.Number=s.Number;var a=function(){function e(e){this._t=e}return e.prototype.z=function(e){this._t.dt(e,0,e.length)},e.prototype.V=function(e){this._t.ut(e?1:0)},e.prototype.k=function(e,t){this.lt(t),this.ct(e)},e.prototype.N=function(e,t,i){this.lt(t),this.lt(i),this.ct(e)},e.prototype.X=function(e){var t=r.Ye(e);this._t.dt(t,0,t.length)},e.prototype.b=function(e,t,i){t<=5?this._t.ut(e|t<<5):t<=255?(this._t.ut(192|e),this._t.ut(t)):(this._t.ut(224|e),this._t.ut(t),this._t.ut(t>>8))},e.prototype.K=function(e){e=r.$e(e),this.ct(e)},e.prototype.F=function(e){this.pt(r.et(e))},e.prototype.U=function(e){if(""===e)this.ct(0);else{var t=r.Xe(e);this.ct(t.length),this._t.dt(t,0,t.length)}},e.prototype.q=function(e){this.lt(e?n.O.Qe:n.O.Ke)},e.prototype.ct=function(e){var t=r.Ze(s.Number.w(e));this._t.dt(t,0,t.length)},e.prototype.pt=function(e){var t=r.Je(e);this._t.dt(t,0,t.length)},e.prototype.lt=function(e){this._t.ut(s.Number.W(e))},e}();t.CompactBinaryProtocolWriter=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.Ve=function(){return"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},e}();t.BrowserChecker=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.ft=!0,this.ht=!0,this.vt=!0,this.yt="use-collector-delta",this.Tt=!1}return e.prototype.allowRequestSending=function(){return this.vt?(this.vt=!1,this.ft=!1,!0):this.ft},e.prototype.shouldAddClockSkewHeaders=function(){return this.ht},e.prototype.getClockSkewHeaderValue=function(){return this.yt},e.prototype.setClockSkew=function(e){this.Tt||(e?this.yt=e:this.ht=!1,this.Tt=!0,this.ft=!0)},e}();t.default=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.gt={}}return e.prototype.setKillSwitchTenants=function(e,t){if(e&&t)try{var i=e.split(",");if("this-request-only"===t)return i;for(var n=1e3*parseInt(t,10),r=0;rDate.now()||(delete this.gt[e],!1)},e}();t.default=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),r=i(0),o=function(){function e(e,t){this.mt=e,this.St=t,this.At={},this.It=0}return e.prototype.addEventToBatch=function(e){e.serializedEvent.length>this.mt?n.default.eventsRejected([e],r.AWTEventsRejectedReason.SizeLimitExceeded):(this.It+e.serializedEvent.length>this.mt&&this.flushBatch(),void 0===this.At[e.apiKey]&&(this.At[e.apiKey]=[]),this.At[e.apiKey].push(e),this.It+=e.serializedEvent.length)},e.prototype.flushBatch=function(){this.It>0&&(this.St.push(this.At),this.At={},this.It=0)},e.prototype.hasBatch=function(){return this.It>0},e}();t.default=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.shouldRetryForStatus=function(e){return!(e>=300&&e<500&&408!==e||501===e||505===e)},e.getMillisToBackoffForRetry=function(e){var t=0,i=Math.floor(1200*Math.random())+2400;return t=Math.pow(4,e)*i,Math.min(t,12e4)},e}();t.default=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),r=i(6),o=i(26),s=i(24),a=i(23),u=i(15),d=i(1),_=i(2),l=i(3),c="POST",p=function(){function e(e,t,i,n){var r=this;this.Pt=e,this.Wt=i,this.Et=n,this.Bt="?qsp=true&content-type=application%2Fbond-compact-binary&client-id=NO_AUTH&sdk-version="+u.FullVersionString,this.wt=new s.default,this._=!1,this.Ct=new a.default,this.bt=!1,this.Dt=0,d.isUint8ArrayAvailable()||(this.Bt+="&content-encoding=base64"),this.Bt=t+this.Bt,this.Et||(this.bt=!0,this.Et={sendPOST:function(e,t,i,n,o,s){if(d.useXDomainRequest()){var a=new XDomainRequest;a.open(c,e),a.onload=function(){o(200,null)},a.onerror=function(){n(400,null)},a.ontimeout=function(){i(500,null)},a.send(t)}else{var u=new XMLHttpRequest;u.open(c,e,!s),u.onload=function(){o(u.status,r.Ot(u.getAllResponseHeaders()))},u.onerror=function(){n(u.status,r.Ot(u.getAllResponseHeaders()))},u.ontimeout=function(){i(u.status,r.Ot(u.getAllResponseHeaders()))},u.send(t)}}})}return e.prototype.hasIdleConnection=function(){return this.Dt<2},e.prototype.sendQueuedRequests=function(){for(;this.hasIdleConnection()&&!this._&&this.Pt.length>0&&this.Ct.allowRequestSending();)this.Dt++,this.Nt(this.Pt.pop(),0,!1);this.hasIdleConnection()&&l.default.scheduleTimer()},e.prototype.isCompletelyIdle=function(){return 0===this.Dt},e.prototype.flush=function(){for(;this.Pt.length>0;)this.Nt(this.Pt.pop(),0,!0)},e.prototype.pause=function(){this._=!0},e.prototype.resume=function(){this._=!1,this.sendQueuedRequests()},e.prototype.removeQueuedRequests=function(){this.Pt.length=0},e.prototype.Nt=function(e,t,i){var o=this;if(this._)return this.Dt--,void this.Wt.addBackRequest(e);var s=0,a="";for(var u in e)e.hasOwnProperty(u)&&(this.wt.isTenantKilled(u)?(_.default.eventsDropped(e[u],n.AWTEventsDroppedReason.KillSwitch),delete e[u]):(a.length>0&&(a+=","),a+=u,s++));if(s>0){var l=r.default.getPayloadBlob(e,s),c=this.Bt+"&x-apikey="+a+"&client-time-epoch-millis="+Date.now().toString();this.Ct.shouldAddClockSkewHeaders()&&(c=c+"&time-delta-to-apply-millis="+this.Ct.getClockSkewHeaderValue());var p=void 0;p=d.isUint8ArrayAvailable()?new Uint8Array(l):r.default.base64Encode(l),this.bt&&i&&d.isBeaconsSupported()?navigator.sendBeacon(c,p):this.Et.sendPOST(c,p,function(i,n){o.Rt(i,n,e,s,a,t)},function(i,n){o.Rt(i,n,e,s,a,t)},function(i,n){o.Rt(i,n,e,s,a,t)},!1)}else i||this.Mt(null,{})},e.prototype.Rt=function(e,t,i,r,s,a){var u=this,d=!0;if(void 0!==e){if(t){var c=this.wt.setKillSwitchTenants(t["kill-tokens"],t["kill-duration-seconds"]);this.Ct.setClockSkew(t["time-delta-millis"]);for(var p=0;p0||this.zt[n.AWTEventPriority.Normal][0].length>0||this.zt[n.AWTEventPriority.Low][0].length>0||this.Ht.hasBatch())&&this.jt.hasIdleConnection()},e.prototype.addBackRequest=function(e){if(!this._||!this.Lt){for(var t in e)if(e.hasOwnProperty(t))for(var i=0;i=e;){for(;this.zt[t][0].length>0;){var i=this.zt[t][0].pop();this.Ft--,i.serializedEvent||(i.serializedEvent=a.default.getEventBlob(i)),this.Ht.addEventToBatch(i)}t--}this.Ht.flushBatch()},e.prototype.Qt=function(e){var t=this;this.hasEvents()&&this.sendEventsForPriorityAndAbove(n.AWTEventPriority.Low),this.Gt(function(){t.Vt(),null!==e&&void 0!==e&&e(),t.xt.length>0?setTimeout(function(){return t.Qt(t.xt.shift())},0):(t.kt=!1,t.hasEvents()&&o.default.scheduleTimer())})},e.prototype.Gt=function(e){var t=this;this.jt.isCompletelyIdle()?e():setTimeout(function(){return t.Gt(e)},250)},e}();t.default=_},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(3),r=function(){function e(){}return e.setEventsHandler=function(e){n.default.setEventsHandler(e)},e.getEventsHandler=function(){return n.default.getEventsHandler()},e.scheduleTimer=function(){n.default.scheduleTimer()},e}();t.default=r},function(e,t,i){e.exports=i(16)}])}); \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/bg-bg/office_strings.debug.js b/node_modules/@microsoft/office-js/dist/bg-bg/office_strings.debug.js index 29a4c2e..084f350 100644 --- a/node_modules/@microsoft/office-js/dist/bg-bg/office_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/bg-bg/office_strings.debug.js @@ -1,179 +1,190 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("Strings"); Strings.OfficeOM = function() { }; Strings.OfficeOM.registerClass("Strings.OfficeOM"); -Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Позволи"; -Strings.OfficeOM.L_InvalidGetStartRowColumn = "Зададените ÑтойноÑти за startRow или startColumn Ñа невалидни."; -Strings.OfficeOM.L_RedundantCallbackSpecification = "Обратното повикване не може да Ñе задава и в ÑпиÑък Ñ Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚Ð¸, и в незадължителен обект."; -Strings.OfficeOM.L_MultipleNamedItemFound = "Ðамерени Ñа множеÑтво обекти Ñ ÐµÐ´Ð½Ð¾ и Ñъщо име."; -Strings.OfficeOM.L_CustomXmlExceedQuotaName = "ДоÑтигнат е макÑималниÑÑ‚ брой Ñелекции"; -Strings.OfficeOM.L_FormatValueOutOfRange = "СтойноÑтта е извън Ð¿Ð¾Ð·Ð²Ð¾Ð»ÐµÐ½Ð¸Ñ Ð´Ð¸Ð°Ð¿Ð°Ð·Ð¾Ð½."; -Strings.OfficeOM.L_ElementMissing = "Ðе можем да форматираме клетката на таблицата, тъй като нÑкои ÑтойноÑти на параметри липÑват. Проверете отново параметрите и опитайте отново."; -Strings.OfficeOM.L_PropertyDoesNotExist = 'СвойÑтвото "{0}" не ÑъщеÑтвува в обекта.'; -Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Ðевалидни входни аргументи."; -Strings.OfficeOM.L_InvalidFormatValue = "Един или повече от параметрите за форматиране имат ÑтойноÑти, които не Ñа позволени. Проверете ÑтойноÑтите и опитайте отново."; -Strings.OfficeOM.L_InvalidDataFormat = "Форматът на ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ð¾Ð±ÐµÐºÑ‚ Ñ Ð´Ð°Ð½Ð½Ð¸ е невалиден."; -Strings.OfficeOM.L_OutOfRange = "Извън допуÑÑ‚Ð¸Ð¼Ð¸Ñ Ð´Ð¸Ð°Ð¿Ð°Ð·Ð¾Ð½"; -Strings.OfficeOM.L_InternalErrorDescription = "Възникна вътрешна грешка."; -Strings.OfficeOM.L_InvalidBindingError = "Грешка от невалидно обвързване"; -Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Добавката вече изиÑква маркер за доÑтъп."; -Strings.OfficeOM.L_SaveSettingsError = "Грешка в наÑтройките за запиÑване"; -Strings.OfficeOM.L_TooManyArguments = "твърде много аргументи"; -Strings.OfficeOM.L_FileTypeNotSupported = "ЗададениÑÑ‚ тип на файл не Ñе поддържа."; -Strings.OfficeOM.L_OperationNotSupported = "Тази Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½Ðµ Ñе поддържа."; Strings.OfficeOM.L_CannotNavigateTo = "Обектът Ñе намира на мÑÑто, където не Ñе поддържа навигациÑ."; -Strings.OfficeOM.L_OsfControlTypeNotSupported = "Типът OsfControl не Ñе поддържа."; -Strings.OfficeOM.L_DialogNavigateError = "Грешка в навигациÑта в Ð´Ð¸Ð°Ð»Ð¾Ð³Ð¾Ð²Ð¸Ñ Ð¿Ñ€Ð¾Ð·Ð¾Ñ€ÐµÑ†"; -Strings.OfficeOM.L_InvalidGetRows = "ПоÑочените редове Ñа невалидни."; +Strings.OfficeOM.L_InvalidFormatValue = "Един или повече от параметрите за форматиране имат ÑтойноÑти, които не Ñа позволени. Проверете ÑтойноÑтите и опитайте отново."; Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "конфигурирайте браузъра Ñи"; -Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = 'Опит за наÑтройка на ÑвойÑтво Ñамо за четене "{0}".'; -Strings.OfficeOM.L_SSOServerError = "Възникна грешка в доÑтавчика на удоÑтоверÑване."; -Strings.OfficeOM.L_DisplayDialogError = "Показване на грешката в Ð´Ð¸Ð°Ð»Ð¾Ð³Ð¾Ð²Ð¸Ñ Ð¿Ñ€Ð¾Ð·Ð¾Ñ€ÐµÑ†"; -Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "ОперациÑта е неуÑпешна, защото тази добавка вече изиÑква маркер за доÑтъп."; -Strings.OfficeOM.L_TooManyIncompleteRequests = "Изчакайте, докато завърши предишното повикване."; -Strings.OfficeOM.L_InvalidResourceUrl = "ПредоÑтавен е невалиден URL Ð°Ð´Ñ€ÐµÑ Ð½Ð° реÑÑƒÑ€Ñ Ð½Ð° приложение."; +Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Ðаправете избор."; +Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Ðевалидни входни аргументи."; +Strings.OfficeOM.L_RequestTimeout = "Повикването отне твърде много време, за да Ñе изпълни."; +Strings.OfficeOM.L_SpecifiedIdNotExist = "ПоÑочениÑÑ‚ ИД не ÑъщеÑтвува."; +Strings.OfficeOM.L_SSOClientErrorMessage = "Възникна неочаквана грешка в клиента."; +Strings.OfficeOM.L_InvalidSetStartRowColumn = "Зададените ÑтойноÑти за startRow или startColumn Ñа невалидни."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Добавката вече изиÑква маркер за доÑтъп."; +Strings.OfficeOM.L_CustomFunctionNameContainsBadChars = "Името на функциÑта може да Ñъдържа Ñамо букви, цифри, долни черти и точки."; Strings.OfficeOM.L_SettingsStaleError = "Грешка от неактуални наÑтройки"; -Strings.OfficeOM.L_UserClickIgnore = "ПотребителÑÑ‚ избра да игнорира Ð´Ð¸Ð°Ð»Ð¾Ð³Ð¾Ð²Ð¸Ñ Ð¿Ñ€Ð¾Ð·Ð¾Ñ€ÐµÑ†."; -Strings.OfficeOM.L_RunMustReturnPromise = 'ФункциÑта за партида, подадена на метода ".run", не върна обещание. ФункциÑта Ñ‚Ñ€Ñбва да върне едно обещание, така че вÑички автоматично проÑледÑвани обекти да могат да бъдат оÑвободени при завършване на операциÑта Ñ Ð¿Ð°Ñ€Ñ‚Ð¸Ð´Ð°Ñ‚Ð°. Обикновено връщате обещание чрез връщане на отговора от "context.sync()".'; -Strings.OfficeOM.L_DataStale = "Данните не Ñа актуални"; -Strings.OfficeOM.L_SetDataParametersConflict = "ПоÑочените параметри Ñа в конфликт."; -Strings.OfficeOM.L_UnsupportedDataObject = "ПодадениÑÑ‚ тип на обект Ñ Ð´Ð°Ð½Ð½Ð¸ не Ñе поддържа."; -Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "СеÑиÑта ви на Office Online е Ñ Ð¸Ð·Ñ‚ÐµÐºÑŠÐ» Ñрок или е невалидна. За да продължите, обновете Ñтраницата."; -Strings.OfficeOM.L_APINotSupported = "API не Ñе поддържа"; -Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Текущата ÑÐµÐ»ÐµÐºÑ†Ð¸Ñ Ð½Ðµ е ÑъвмеÑтима ÑÑŠÑ Ð·Ð°Ð´Ð°Ð´ÐµÐ½Ð¸Ñ Ñ‚Ð¸Ð¿ преобразуване."; -Strings.OfficeOM.L_ActivityLimitReached = "ДоÑтигнато е ограничението за активноÑÑ‚."; -Strings.OfficeOM.L_SettingsCannotSave = "ÐаÑтройките не можаха да бъдат запиÑани."; -Strings.OfficeOM.L_NonUniformPartialSetNotSupported = 'Параметрите за координати не могат да Ñе използват Ñ Ð½Ð°Ð»Ð°Ð³Ð°Ð½Ðµ на типа "Таблица", когато таблицата Ñъдържа обединени клетки.'; -Strings.OfficeOM.L_InvalidArgument = 'Ðргументът "{0}" не работи за този Ñлучай, липÑва или не е в Ð¿Ñ€Ð°Ð²Ð¸Ð»Ð½Ð¸Ñ Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚.'; Strings.OfficeOM.L_BrowserAPINotSupported = "Този браузър не поддържа иÑÐºÐ°Ð½Ð¸Ñ API."; -Strings.OfficeOM.L_GetDataParametersConflict = "ПоÑочените параметри Ñа в конфликт."; +Strings.OfficeOM.L_IndexOutOfRange = "ИндекÑÑŠÑ‚ е извън обхват."; +Strings.OfficeOM.L_DataNotMatchBindingSize = "ПодадениÑÑ‚ обект Ñ Ð´Ð°Ð½Ð½Ð¸ не ÑъответÑтва на размера на текущата ÑелекциÑ."; +Strings.OfficeOM.L_InvalidColumnsForBinding = "ПоÑочените колони Ñа невалидни."; +Strings.OfficeOM.L_NonUniformPartialSetNotSupported = 'Параметрите за координати не могат да Ñе използват Ñ Ð½Ð°Ð»Ð°Ð³Ð°Ð½Ðµ на типа "Таблица", когато таблицата Ñъдържа обединени клетки.'; +Strings.OfficeOM.L_DataWriteReminder = "ÐапомнÑне за Ð·Ð°Ð¿Ð¸Ñ Ð½Ð° данни"; +Strings.OfficeOM.L_EventHandlerNotExist = "ЗададениÑÑ‚ манипулатор на Ñъбитие не е намерен за това обвързване."; +Strings.OfficeOM.L_DialogAddressNotTrusted = "Домейнът на URL адреÑа не е включен в елемента AppDomain в манифеÑта."; +Strings.OfficeOM.L_ConnectionFailureWithDetails = "ИÑкането е неуÑпешно Ñ ÐºÐ¾Ð´ на ÑÑŠÑтоÑнието {0}, код за грешка {1} и Ñледното Ñъобщение за грешка: {2}"; +Strings.OfficeOM.L_InvalidValue = "Ðевалидна ÑтойноÑÑ‚"; +Strings.OfficeOM.L_MissingRequiredArguments = "липÑват нÑкои задължителни аргументи"; +Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "ОперациÑта не Ñе поддържа за този тип обвързване."; +Strings.OfficeOM.L_InitializeNotReady = "Office.js не е още напълно зареден. Опитайте отново по-къÑно или Ñе уверете, че Ñте добавили кода за Ð¸Ð½Ð¸Ñ†Ð¸Ð°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ñ Ð²ÑŠÐ² функциÑта Office.initialize."; +Strings.OfficeOM.L_NetworkProblem = "Мрежов проблем"; Strings.OfficeOM.L_BindingNotExist = "Указаното обвързване не ÑъщеÑтвува."; +Strings.OfficeOM.L_InvalidReadForBlankRow = "УказаниÑÑ‚ ред е празен."; +Strings.OfficeOM.L_ApiNotFoundDetails = "Методът или ÑвойÑтвото {0} е чаÑÑ‚ от набора Ñ Ð¸Ð·Ð¸ÑÐºÐ²Ð°Ð½Ð¸Ñ Ð·Ð° {1}, който не е наличен във вашата верÑÐ¸Ñ Ð½Ð° {2}."; +Strings.OfficeOM.L_GetSelectionNotSupported = "Текущата ÑÐµÐ»ÐµÐºÑ†Ð¸Ñ Ð½Ðµ Ñе поддържа."; +Strings.OfficeOM.L_UnsupportedUserIdentity = "Типът ÑамоличноÑÑ‚ на Ð¿Ð¾Ñ‚Ñ€ÐµÐ±Ð¸Ñ‚ÐµÐ»Ñ Ð½Ðµ Ñе поддържа."; +Strings.OfficeOM.L_DataWriteError = "Грешка при Ð·Ð°Ð¿Ð¸Ñ Ð½Ð° данни"; +Strings.OfficeOM.L_SelectionCannotBound = "Ðе може да Ñе обвърже Ñ Ñ‚ÐµÐºÑƒÑ‰Ð°Ñ‚Ð° ÑелекциÑ."; +Strings.OfficeOM.L_DialogAlreadyOpened = "ОперациÑта е неуÑпешна, защото тази добавка вече има активен диалогов прозорец."; +Strings.OfficeOM.L_InValidOptionalArgument = "невалиден незадължителен аргумент"; +Strings.OfficeOM.L_ReadSettingsError = "Грешка в наÑтройките за четене"; +Strings.OfficeOM.L_SSOConnectionLostErrorMessage = "A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones."; +Strings.OfficeOM.L_InternalError = "Вътрешна грешка"; +Strings.OfficeOM.L_InvalidGetRows = "ПоÑочените редове Ñа невалидни."; +Strings.OfficeOM.L_NoCapability = "ÐÑмате доÑтатъчно Ñ€Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð¸Ñ Ð·Ð° това дейÑтвие."; +Strings.OfficeOM.L_InvalidBinding = "Ðевалидно обвързване"; +Strings.OfficeOM.L_BadSelectorString = "Ðизът, който е подаден в Ñелектора, е неправилно форматиран или не Ñе поддържа."; +Strings.OfficeOM.L_BindingToMultipleSelection = "Ðе Ñе поддържат неÑÑŠÑедни Ñелекции."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "ОперациÑта е неуÑпешна, защото тази добавка вече изиÑква маркер за доÑтъп."; +Strings.OfficeOM.L_CallbackNotAFunction = "Обратното повикване Ñ‚Ñ€Ñбва да е от тип функциÑ, а беше от тип {0}."; +Strings.OfficeOM.L_DocumentReadOnly = "ЗаÑвената Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½Ðµ е разрешена в Ñ‚ÐµÐºÑƒÑ‰Ð¸Ñ Ð´Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚ÐµÐ½ режим."; +Strings.OfficeOM.L_GetDataParametersConflict = "ПоÑочените параметри Ñа в конфликт."; +Strings.OfficeOM.L_UserAborted = "ПотребителÑÑ‚ прекрати иÑкането за ÑъглаÑие."; +Strings.OfficeOM.L_SSOServerErrorMessage = "Възникна неочаквана грешка на Ñървъра."; +Strings.OfficeOM.L_ActivityLimitReached = "ДоÑтигнато е ограничението за активноÑÑ‚."; +Strings.OfficeOM.L_EventHandlerRemovalFailed = "ÐеуÑпешно премахване на манипулатора на Ñъбитие."; +Strings.OfficeOM.L_InvalidSSOAddinMessage = "API за ÑамоличноÑÑ‚ не Ñе поддържа за тази добавка."; +Strings.OfficeOM.L_SliceSizeNotSupported = "УказаниÑÑ‚ размер на Ñегмент не Ñе поддържа."; +Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = 'Опит за наÑтройка на ÑвойÑтво Ñамо за четене "{0}".'; +Strings.OfficeOM.L_DialogRequireHTTPS = "Ðе Ñе поддържа протоколът HTTP. ВмеÑто това използвайте HTTPS"; +Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Приложението {0} не ÑъщеÑтвува. Ðе е извикано Microsoft.Office.WebExtension.Initialize(причина)."; +Strings.OfficeOM.L_UserAbortedMessage = "ПотребителÑÑ‚ не Ñе ÑъглаÑи Ñ Ñ€Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð¸Ñта на добавката."; +Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Забележка: БроÑÑ‚ на клетките в таблица Ñе предполага да бъде под 20 000 клетки."; +Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Текущата ÑÐµÐ»ÐµÐºÑ†Ð¸Ñ Ð½Ðµ е ÑъвмеÑтима ÑÑŠÑ Ð·Ð°Ð´Ð°Ð´ÐµÐ½Ð¸Ñ Ñ‚Ð¸Ð¿ преобразуване."; +Strings.OfficeOM.L_OsfControlTypeNotSupported = "Типът OsfControl не Ñе поддържа."; +Strings.OfficeOM.L_OverwriteWorksheetData = "ОперациÑта за наÑтройка е неуÑпешна, защото подадениÑÑ‚ обект Ñ Ð´Ð°Ð½Ð½Ð¸ ще Ñе запише върху данните или ще ги отмеÑти."; +Strings.OfficeOM.L_OutOfRange = "Извън допуÑÑ‚Ð¸Ð¼Ð¸Ñ Ð´Ð¸Ð°Ð¿Ð°Ð·Ð¾Ð½"; +Strings.OfficeOM.L_PermissionDenied = "Разрешението е отказано"; +Strings.OfficeOM.L_NotSupported = "ФункциÑта {0} не Ñе поддържа."; +Strings.OfficeOM.L_TooManyArguments = "твърде много аргументи"; +Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Типът ÑамоличноÑÑ‚ на Ð¿Ð¾Ñ‚Ñ€ÐµÐ±Ð¸Ñ‚ÐµÐ»Ñ Ð½Ðµ Ñе поддържа."; +Strings.OfficeOM.L_PropertyNotLoaded = 'СвойÑтвото "{0}" не е налично. Преди да прочетете ÑтойноÑтта на ÑвойÑтвото, извикайте метода за зареждане Ñ Ð¾Ð±ÐµÐºÑ‚Ð°, който го Ñъдържа, и извикайте "context.sync()" в контекÑта на Ñвързаната заÑвка.'; +Strings.OfficeOM.L_TooManyOptionalFunction = "нÑколко опционални функции в ÑпиÑъка Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¸"; +Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Данните Ñа оÑтарели. Извлечете обекта отново."; +Strings.OfficeOM.L_RedundantCallbackSpecification = "Обратното повикване не може да Ñе задава и в ÑпиÑък Ñ Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚Ð¸, и в незадължителен обект."; +Strings.OfficeOM.L_InvalidParameters = "ФункциÑта {0} има невалиден параметри."; Strings.OfficeOM.L_SettingsAreStale = "ÐаÑтройките не можаха да Ñе запишат, защото не Ñа актуални."; +Strings.OfficeOM.L_SSOConnectionLostError = "A connection was lost during the sign in process."; +Strings.OfficeOM.L_InvalidGrantMessage = "ЛипÑват Ñ€Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð¸Ñ Ð·Ð° тази добавка."; +Strings.OfficeOM.L_InvalidAPICall = "Ðевалидно извикване на API"; +Strings.OfficeOM.L_CoercionTypeNotSupported = "ЗададениÑÑ‚ тип преобразуване не Ñе поддържа."; +Strings.OfficeOM.L_DialogOK = "OK"; +Strings.OfficeOM.L_InvalidNamedItemForBindingType = "ЗададениÑÑ‚ тип обвързване не е ÑъвмеÑтим Ñ Ð¿Ð¾Ð´Ð°Ð´ÐµÐ½Ð¸Ñ Ð¸Ð¼ÐµÐ½ÑƒÐ²Ð°Ð½ елемент."; +Strings.OfficeOM.L_CustomFunctionDefinitionMissing = "СвойÑтво Ñ Ñ‚Ð¾Ð²Ð° име, което предÑтавлÑва Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ†Ð¸Ñ Ð½Ð° функциÑта, Ñ‚Ñ€Ñбва да ÑъщеÑтвува в Excel.CustomFunctions."; Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Игнориране"; -Strings.OfficeOM.L_SelectionCannotBound = "Ðе може да Ñе обвърже Ñ Ñ‚ÐµÐºÑƒÑ‰Ð°Ñ‚Ð° ÑелекциÑ."; +Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = 'Промените в ÑвойÑтво "{0}" не могат да бъдат приложени чрез метод "object.set".'; +Strings.OfficeOM.L_NamedItemNotFound = "ÐаименуваниÑÑ‚ елемент не ÑъщеÑтвува."; +Strings.OfficeOM.L_FunctionCallFailed = "Извикването на функциÑта {0} е неуÑпешно, код на грешка: {1}."; +Strings.OfficeOM.L_SSOServerError = "Възникна грешка в доÑтавчика на удоÑтоверÑване."; +Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Позволи"; +Strings.OfficeOM.L_OperationNotSupported = "Тази Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½Ðµ Ñе поддържа."; Strings.OfficeOM.L_InvalidOrTimedOutSession = "Ðевалидна или изтекла ÑеÑиÑ"; -Strings.OfficeOM.L_InvalidApiCallInContext = "Ðевалидно извикване на API в Ñ‚ÐµÐºÑƒÑ‰Ð¸Ñ ÐºÐ¾Ð½Ñ‚ÐµÐºÑÑ‚."; -Strings.OfficeOM.L_DialogRequireHTTPS = "Ðе Ñе поддържа протоколът HTTP. ВмеÑто това използвайте HTTPS"; -Strings.OfficeOM.L_CannotWriteToSelection = "Ðе може да Ñе запише в текущата ÑелекциÑ."; +Strings.OfficeOM.L_ValueNotLoaded = 'СтойноÑтта на обекта резултат още не е заредена. Преди четене на ÑвойÑтвото на ÑтойноÑтта, повикайте "context.sync()" в контекÑта на Ñъответната заÑвка.'; Strings.OfficeOM.L_MissingParameter = "ЛипÑващ параметър"; +Strings.OfficeOM.L_NotImplemented = "ФункциÑта {0} не е реализирана."; +Strings.OfficeOM.L_UnsupportedDataObject = "ПодадениÑÑ‚ тип на обект Ñ Ð´Ð°Ð½Ð½Ð¸ не Ñе поддържа."; +Strings.OfficeOM.L_NotSupportedEventType = "УказаниÑÑ‚ тип на Ñъбитие {0} не Ñе поддържа."; +Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath ограничава избора до 1024 елемента."; +Strings.OfficeOM.L_CustomFunctionImplementationMissing = 'СвойÑтвото Ñ Ñ‚Ð¾Ð²Ð° име в Excel.CustomFunctions, което предÑтавлÑва Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ†Ð¸Ñ Ð½Ð° функциÑта, Ñ‚Ñ€Ñбва да Ñъдържа ÑвойÑтво "call", което изпълнÑва функциÑта.'; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory = "Тази добавка не поддържа потребителÑко ÑъглаÑие."; Strings.OfficeOM.L_SettingNameNotExist = "Указаното име на наÑтройка не ÑъщеÑтвува."; -Strings.OfficeOM.L_SSOClientErrorMessage = "Възникна неочаквана грешка в клиента."; -Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Данните Ñа оÑтарели. Извлечете обекта отново."; +Strings.OfficeOM.L_AppNameNotExist = "Ðе ÑъщеÑтвува име на добавка за {0}."; +Strings.OfficeOM.L_InvalidOperationInCellEditMode = "Excel е в режим на редактиране на клетка. Излезте от режим на редактиране, като натиÑнете ENTER или TAB, или изберете друга клетка и Ñлед това опитайте отново."; Strings.OfficeOM.L_InvalidNode = "Ðевалиден възел"; -Strings.OfficeOM.L_SetDataIsTooLarge = "ЗададениÑÑ‚ обект Ñ Ð´Ð°Ð½Ð½Ð¸ е твърде голÑм."; -Strings.OfficeOM.L_FormattingReminder = "ÐапомнÑне за форматиране"; -Strings.OfficeOM.L_DataNotMatchSelection = "ПредоÑтавениÑÑ‚ обект Ñ Ð´Ð°Ð½Ð½Ð¸ не е ÑъвмеÑтим Ñ Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚Ð° или размерноÑтите на текущата ÑелекциÑ."; -Strings.OfficeOM.L_UserAborted = "ПотребителÑÑ‚ прекрати иÑкането за ÑъглаÑие."; -Strings.OfficeOM.L_CustomXmlNodeNotFound = "УказаниÑÑ‚ възел не е намерен."; -Strings.OfficeOM.L_InvalidTableOptionValue = "Един или повече от параметрите на tableOptions имат ÑтойноÑти, които не Ñа позволени. Проверете ÑтойноÑтите и опитайте отново."; -Strings.OfficeOM.L_InvalidValue = "Ðевалидна ÑтойноÑÑ‚"; -Strings.OfficeOM.L_SpecifiedIdNotExist = "ПоÑочениÑÑ‚ ИД не ÑъщеÑтвува."; -Strings.OfficeOM.L_CannotRegisterEvent = "Манипулаторът на Ñъбитие не може да бъде региÑтриран."; -Strings.OfficeOM.L_NewWindowCrossZone = 'ÐаÑтройките за защита на Ð²Ð°ÑˆÐ¸Ñ Ð±Ñ€Ð°ÑƒÐ·ÑŠÑ€ ни пречат да Ñъздадем диалогов прозорец. Опитайте Ñ Ð´Ñ€ÑƒÐ³ браузър или {0}, така че "{1}" и домейнът, показан в адреÑната лента, да Ñа в една и Ñъща зона на защита.'; +Strings.OfficeOM.L_FileTypeNotSupported = "ЗададениÑÑ‚ тип на файл не Ñе поддържа."; +Strings.OfficeOM.L_InvalidCellsValue = "Един или повече от параметрите на клетките имат ÑтойноÑти, които не Ñа позволени. Проверете ÑтойноÑтите и опитайте отново."; +Strings.OfficeOM.L_UserClickIgnore = "ПотребителÑÑ‚ избра да игнорира Ð´Ð¸Ð°Ð»Ð¾Ð³Ð¾Ð²Ð¸Ñ Ð¿Ñ€Ð¾Ð·Ð¾Ñ€ÐµÑ†."; +Strings.OfficeOM.L_NonUniformPartialGetNotSupported = 'Параметрите за координати не могат да Ñе използват Ñ Ð½Ð°Ð»Ð°Ð³Ð°Ð½Ðµ на типа "Таблица", когато таблицата Ñъдържа обединени клетки.'; +Strings.OfficeOM.L_InvalidDataFormat = "Форматът на ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ð¾Ð±ÐµÐºÑ‚ Ñ Ð´Ð°Ð½Ð½Ð¸ е невалиден."; Strings.OfficeOM.L_RowIndexOutOfRange = "СтойноÑтта на индекÑа на реда е извън допуÑÑ‚Ð¸Ð¼Ð¸Ñ Ð´Ð¸Ð°Ð¿Ð°Ð·Ð¾Ð½. Използвайте ÑтойноÑÑ‚ (0 или по-виÑока), коÑто е по-малка от Ð±Ñ€Ð¾Ñ Ð½Ð° редовете."; -Strings.OfficeOM.L_InternalError = "Вътрешна грешка"; -Strings.OfficeOM.L_CallbackNotAFunction = "Обратното повикване Ñ‚Ñ€Ñбва да е от тип функциÑ, а беше от тип {0}."; -Strings.OfficeOM.L_InValidOptionalArgument = "невалиден незадължителен аргумент"; -Strings.OfficeOM.L_ValueNotLoaded = 'СтойноÑтта на обекта резултат още не е заредена. Преди четене на ÑвойÑтвото на ÑтойноÑтта, повикайте "context.sync()" в контекÑта на Ñъответната заÑвка.'; -Strings.OfficeOM.L_InvalidDataObject = "Ðевалиден обект Ñ Ð´Ð°Ð½Ð½Ð¸"; -Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Проблем в мрежата попречи на извличането на файла."; -Strings.OfficeOM.L_InvalidCoercion = "Ðевалидно преобразуване на тип"; -Strings.OfficeOM.L_BindingToMultipleSelection = "Ðе Ñе поддържат неÑÑŠÑедни Ñелекции."; -Strings.OfficeOM.L_DialogOK = "OK"; -Strings.OfficeOM.L_AppNameNotExist = "Ðе ÑъщеÑтвува име на добавка за {0}."; -Strings.OfficeOM.L_DataNotMatchBindingSize = "ПодадениÑÑ‚ обект Ñ Ð´Ð°Ð½Ð½Ð¸ не ÑъответÑтва на размера на текущата ÑелекциÑ."; -Strings.OfficeOM.L_InvalidSSOAddinMessage = "API за ÑамоличноÑÑ‚ не Ñе поддържа за тази добавка."; -Strings.OfficeOM.L_DataWriteError = "Грешка при Ð·Ð°Ð¿Ð¸Ñ Ð½Ð° данни"; -Strings.OfficeOM.L_ColIndexOutOfRange = "СтойноÑтта на индекÑа на колоната е извън допуÑÑ‚Ð¸Ð¼Ð¸Ñ Ð´Ð¸Ð°Ð¿Ð°Ð·Ð¾Ð½. Използвайте ÑтойноÑÑ‚ (0 или по-виÑока), коÑто е по-малка от Ð±Ñ€Ð¾Ñ Ð½Ð° колоните."; -Strings.OfficeOM.L_EventHandlerRemovalFailed = "ÐеуÑпешно премахване на манипулатора на Ñъбитие."; -Strings.OfficeOM.L_FunctionCallFailed = "Извикването на функциÑта {0} е неуÑпешно, код на грешка: {1}."; +Strings.OfficeOM.L_NavOutOfBound = "ОперациÑта е неуÑпешна, тъй като индекÑÑŠÑ‚ е извън диапазона."; +Strings.OfficeOM.L_RequestTokenUnavailable = "Този API е ограничен, за да Ñе забави чеÑтотата на повикване."; +Strings.OfficeOM.L_InvalidObjectPath = 'ПътÑÑ‚ на обекта "{0}" не работи за това, което Ñе опитвате да направите. Ðко използвате обекта в нÑколко различни Ð¿Ð¾Ð²Ð¸ÐºÐ²Ð°Ð½Ð¸Ñ Ð½Ð° "context.sync" и извън поÑледователно изпълнение на партида ".run", използвайте методите "context.trackedObjects.add()" и "context.trackedObjects.remove()" за управление на времето на живот на обекта.'; Strings.OfficeOM.L_BindingCreationError = "Грешка при Ñъздаване на обвързване"; -Strings.OfficeOM.L_UserNotSignedIn = "Ðито един потребител не е влÑзъл в Office."; -Strings.OfficeOM.L_NotImplemented = "ФункциÑта {0} не е реализирана."; -Strings.OfficeOM.L_InvalidColumnsForBinding = "ПоÑочените колони Ñа невалидни."; -Strings.OfficeOM.L_TooManyOptionalObjects = "нÑколко опционални обекта в ÑпиÑъка Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¸"; -Strings.OfficeOM.L_InvalidSelectionForBindingType = "Ðе може да Ñе Ñъздаде обвързване Ñ Ñ‚ÐµÐºÑƒÑ‰Ð°Ñ‚Ð° ÑÐµÐ»ÐµÐºÑ†Ð¸Ñ Ð¸ ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ñ‚Ð¸Ð¿ обвързване."; -Strings.OfficeOM.L_InvalidSetColumns = "ПоÑочените колони Ñа невалидни."; -Strings.OfficeOM.L_NotSupportedEventType = "УказаниÑÑ‚ тип на Ñъбитие {0} не Ñе поддържа."; -Strings.OfficeOM.L_InvalidAPICall = "Ðевалидно извикване на API"; Strings.OfficeOM.L_InvalidGrant = "ЛипÑва предварително удоÑтоверÑване."; -Strings.OfficeOM.L_DialogInvalidScheme = "Схемата на URL адреÑа не Ñе поддържа. ВмеÑто това използвайте HTTPS."; -Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Избраното Ñъдържание Ñ‚Ñ€Ñбва да е в табличен формат. Форматирайте данните като таблица и опитайте отново."; +Strings.OfficeOM.L_DataNotMatchBindingType = "УказаниÑÑ‚ обект Ñ Ð´Ð°Ð½Ð½Ð¸ не е ÑъвмеÑтим Ñ Ñ‚Ð¸Ð¿Ð° на обвързване."; Strings.OfficeOM.L_InvalidRequestContext = "Ðе може да Ñе използва обектът в контекÑта на различни заÑвки."; -Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "ЗададениÑÑ‚ тип преобразуване не е ÑъвмеÑтим Ñ Ñ‚Ð¾Ð·Ð¸ тип обвързване."; -Strings.OfficeOM.L_RequestTokenUnavailable = "Този API е ограничен, за да Ñе забави чеÑтотата на повикване."; -Strings.OfficeOM.L_InvalidBinding = "Ðевалидно обвързване"; -Strings.OfficeOM.L_NamedItemNotFound = "ÐаименуваниÑÑ‚ елемент не ÑъщеÑтвува."; -Strings.OfficeOM.L_InvalidArgumentGeneric = "Ðргументите, подадени на функциÑта, не вършат работа в тази ÑитуациÑ, липÑват или не Ñа в Ð¿Ñ€Ð°Ð²Ð¸Ð»Ð½Ð¸Ñ Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚."; -Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Приложението {0} не ÑъщеÑтвува. Ðе е извикано Microsoft.Office.WebExtension.Initialize(причина)."; Strings.OfficeOM.L_GetDataIsTooLarge = "ЗаÑвениÑÑ‚ набор данни е твърде голÑм."; -Strings.OfficeOM.L_UnsupportedEnumerationMessage = "Това номериране не Ñе поддържа в текущото приложение хоÑÑ‚."; -Strings.OfficeOM.L_EventRegistrationError = "Грешка при региÑтриране на Ñъбитие"; -Strings.OfficeOM.L_InvalidSetRows = "ПоÑочените редове Ñа невалидни."; -Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Типът ÑамоличноÑÑ‚ на Ð¿Ð¾Ñ‚Ñ€ÐµÐ±Ð¸Ñ‚ÐµÐ»Ñ Ð½Ðµ Ñе поддържа."; -Strings.OfficeOM.L_InitializeNotReady = "Office.js не е още напълно зареден. Опитайте отново по-къÑно или Ñе уверете, че Ñте добавили кода за Ð¸Ð½Ð¸Ñ†Ð¸Ð°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ñ Ð²ÑŠÐ² функциÑта Office.initialize."; -Strings.OfficeOM.L_UserAbortedMessage = "ПотребителÑÑ‚ не Ñе ÑъглаÑи Ñ Ñ€Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð¸Ñта на добавката."; +Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} иÑка да покаже нов прозорец."; +Strings.OfficeOM.L_RunMustReturnPromise = 'ФункциÑта за партида, подадена на метода ".run", не върна обещание. ФункциÑта Ñ‚Ñ€Ñбва да върне едно обещание, така че вÑички автоматично проÑледÑвани обекти да могат да бъдат оÑвободени при завършване на операциÑта Ñ Ð¿Ð°Ñ€Ñ‚Ð¸Ð´Ð°Ñ‚Ð°. Обикновено връщате обещание чрез връщане на отговора от "context.sync()".'; +Strings.OfficeOM.L_CustomXmlNodeNotFound = "УказаниÑÑ‚ възел не е намерен."; Strings.OfficeOM.L_NotSupportedBindingType = "УказаниÑÑ‚ тип на обвързване {0} не Ñе поддържа."; -Strings.OfficeOM.L_UnsupportedEnumeration = "Ðеподдържано номериране"; +Strings.OfficeOM.L_InvalidBindingError = "Грешка от невалидно обвързване"; +Strings.OfficeOM.L_EventHandlerAdditionFailed = "ÐеуÑпешно добавÑне на манипулатора на Ñъбитие."; +Strings.OfficeOM.L_DialogNavigateError = "Грешка в навигациÑта в Ð´Ð¸Ð°Ð»Ð¾Ð³Ð¾Ð²Ð¸Ñ Ð¿Ñ€Ð¾Ð·Ð¾Ñ€ÐµÑ†"; +Strings.OfficeOM.L_SettingsCannotSave = "ÐаÑтройките не можаха да бъдат запиÑани."; +Strings.OfficeOM.L_SetDataIsTooLarge = "ЗададениÑÑ‚ обект Ñ Ð´Ð°Ð½Ð½Ð¸ е твърде голÑм."; +Strings.OfficeOM.L_EventRegistrationError = "Грешка при региÑтриране на Ñъбитие"; +Strings.OfficeOM.L_SaveSettingsError = "Грешка в наÑтройките за запиÑване"; +Strings.OfficeOM.L_InvalidResourceUrl = "ПредоÑтавен е невалиден URL Ð°Ð´Ñ€ÐµÑ Ð½Ð° реÑÑƒÑ€Ñ Ð½Ð° приложение."; +Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "СеÑиÑта ви на Office Online е Ñ Ð¸Ð·Ñ‚ÐµÐºÑŠÐ» Ñрок или е невалидна. За да продължите, обновете Ñтраницата."; +Strings.OfficeOM.L_InvalidBindingOperation = "Ðевалидна Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð·Ð° обвързване"; +Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Зададените ÑтойноÑти за rowCount или columnCount Ñа невалидни."; +Strings.OfficeOM.L_InvalidSelectionForBindingType = "Ðе може да Ñе Ñъздаде обвързване Ñ Ñ‚ÐµÐºÑƒÑ‰Ð°Ñ‚Ð° ÑÐµÐ»ÐµÐºÑ†Ð¸Ñ Ð¸ ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ñ‚Ð¸Ð¿ обвързване."; +Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Проблем в мрежата попречи на извличането на файла."; +Strings.OfficeOM.L_FormattingReminder = "ÐапомнÑне за форматиране"; +Strings.OfficeOM.L_HostError = "Грешка на хоÑта"; +Strings.OfficeOM.L_PropertyDoesNotExist = 'СвойÑтвото "{0}" не ÑъщеÑтвува в обекта.'; +Strings.OfficeOM.L_FormatValueOutOfRange = "СтойноÑтта е извън Ð¿Ð¾Ð·Ð²Ð¾Ð»ÐµÐ½Ð¸Ñ Ð´Ð¸Ð°Ð¿Ð°Ð·Ð¾Ð½."; +Strings.OfficeOM.L_ElementMissing = "Ðе можем да форматираме клетката на таблицата, тъй като нÑкои ÑтойноÑти на параметри липÑват. Проверете отново параметрите и опитайте отново."; +Strings.OfficeOM.L_InternalErrorDescription = "Възникна вътрешна грешка."; Strings.OfficeOM.L_DataReadError = "Грешка при четене на данни"; -Strings.OfficeOM.L_ConnectionFailureWithDetails = "ИÑкането е неуÑпешно Ñ ÐºÐ¾Ð´ на ÑÑŠÑтоÑнието {0}, код за грешка {1} и Ñледното Ñъобщение за грешка: {2}"; -Strings.OfficeOM.L_CoercionTypeNotSupported = "ЗададениÑÑ‚ тип преобразуване не Ñе поддържа."; -Strings.OfficeOM.L_MissingRequiredArguments = "липÑват нÑкои задължителни аргументи"; -Strings.OfficeOM.L_PropertyNotLoaded = 'СвойÑтвото "{0}" не е налично. Преди да прочетете ÑтойноÑтта на ÑвойÑтвото, извикайте метода за зареждане Ñ Ð¾Ð±ÐµÐºÑ‚Ð°, който го Ñъдържа, и извикайте "context.sync()" в контекÑта на Ñвързаната заÑвка.'; -Strings.OfficeOM.L_DocumentReadOnly = "ЗаÑвената Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½Ðµ е разрешена в Ñ‚ÐµÐºÑƒÑ‰Ð¸Ñ Ð´Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚ÐµÐ½ режим."; -Strings.OfficeOM.L_NetworkProblem = "Мрежов проблем"; -Strings.OfficeOM.L_InvalidParameters = "ФункциÑта {0} има невалиден параметри."; -Strings.OfficeOM.L_InvalidNamedItemForBindingType = "ЗададениÑÑ‚ тип обвързване не е ÑъвмеÑтим Ñ Ð¿Ð¾Ð´Ð°Ð´ÐµÐ½Ð¸Ñ Ð¸Ð¼ÐµÐ½ÑƒÐ²Ð°Ð½ елемент."; Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "ÐžÐ³Ñ€Ð°Ð½Ð¸Ñ‡ÐµÐ½Ð¸Ñ Ð½Ð° браузъра ни попречиха да Ñъздадем Ð´Ð¸Ð°Ð»Ð¾Ð³Ð¾Ð²Ð¸Ñ Ð¿Ñ€Ð¾Ð·Ð¾Ñ€ÐµÑ†. Домейнът на Ð´Ð¸Ð°Ð»Ð¾Ð³Ð¾Ð²Ð¸Ñ Ð¿Ñ€Ð¾Ð·Ð¾Ñ€ÐµÑ† и домейнът на хоÑта на добавката не Ñа в една и Ñъща зона на защита."; -Strings.OfficeOM.L_Timeout = "Времето за изчакване на операциÑта изтече."; -Strings.OfficeOM.L_UnknownBindingType = "Типът на обвързването не Ñе поддържа."; -Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Забележка: БроÑÑ‚ на клетките в таблица Ñе предполага да бъде под 20 000 клетки."; -Strings.OfficeOM.L_EventHandlerNotExist = "ЗададениÑÑ‚ манипулатор на Ñъбитие не е намерен за това обвързване."; -Strings.OfficeOM.L_InvalidGrantMessage = "ЛипÑват Ñ€Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð¸Ñ Ð·Ð° тази добавка."; -Strings.OfficeOM.L_APICallFailed = "ÐеуÑпешно извикване на API"; -Strings.OfficeOM.L_CustomXmlOutOfDateName = "Данните не Ñа актуални"; -Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "ОперациÑта не Ñе поддържа за този тип обвързване."; -Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Ðаправете избор."; -Strings.OfficeOM.L_InvalidSetStartRowColumn = "Зададените ÑтойноÑти за startRow или startColumn Ñа невалидни."; -Strings.OfficeOM.L_DialogAlreadyOpened = "ОперациÑта е неуÑпешна, защото тази добавка вече има активен диалогов прозорец."; -Strings.OfficeOM.L_NavOutOfBound = "ОперациÑта е неуÑпешна, тъй като индекÑÑŠÑ‚ е извън диапазона."; -Strings.OfficeOM.L_CustomXmlError = "Грешка в потребителÑÐºÐ¸Ñ XML."; +Strings.OfficeOM.L_NewWindowCrossZone = 'ÐаÑтройките за защита на Ð²Ð°ÑˆÐ¸Ñ Ð±Ñ€Ð°ÑƒÐ·ÑŠÑ€ ни пречат да Ñъздадем диалогов прозорец. Опитайте Ñ Ð´Ñ€ÑƒÐ³ браузър или {0}, така че "{1}" и домейнът, показан в адреÑната лента, да Ñа в една и Ñъща зона на защита.'; +Strings.OfficeOM.L_InvalidCoercion = "Ðевалидно преобразуване на тип"; +Strings.OfficeOM.L_DisplayDialogError = "Показване на грешката в Ð´Ð¸Ð°Ð»Ð¾Ð³Ð¾Ð²Ð¸Ñ Ð¿Ñ€Ð¾Ð·Ð¾Ñ€ÐµÑ†"; +Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Извикайте closeAsync за Ñ‚ÐµÐºÑƒÑ‰Ð¸Ñ Ñ„Ð°Ð¹Ð», преди да извлечете друг."; +Strings.OfficeOM.L_InvalidApiCallInContext = "Ðевалидно извикване на API в Ñ‚ÐµÐºÑƒÑ‰Ð¸Ñ ÐºÐ¾Ð½Ñ‚ÐµÐºÑÑ‚."; Strings.OfficeOM.L_ConnectionFailureWithStatus = "ИÑкането е неуÑпешно Ñ ÐºÐ¾Ð´ на ÑÑŠÑтоÑнието {0}."; +Strings.OfficeOM.L_InvalidResourceUrlMessage = "Ðевалиден URL Ð°Ð´Ñ€ÐµÑ Ð½Ð° реÑÑƒÑ€Ñ Ðµ зададен в манифеÑта."; Strings.OfficeOM.L_InvalidGetColumns = "ПоÑочените колони Ñа невалидни."; -Strings.OfficeOM.L_TooManyOptionalFunction = "нÑколко опционални функции в ÑпиÑъка Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¸"; -Strings.OfficeOM.L_OverwriteWorksheetData = "ОперациÑта за наÑтройка е неуÑпешна, защото подадениÑÑ‚ обект Ñ Ð´Ð°Ð½Ð½Ð¸ ще Ñе запише върху данните или ще ги отмеÑти."; -Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Забележка: Ðаборите за форматиране, зададени от повикване на форматирането на API, Ñе предполага да бъдат под 100."; -Strings.OfficeOM.L_ReadSettingsError = "Грешка в наÑтройките за четене"; -Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = 'Промените в ÑвойÑтво "{0}" не могат да бъдат приложени чрез метод "object.set".'; -Strings.OfficeOM.L_IndexOutOfRange = "ИндекÑÑŠÑ‚ е извън обхват."; Strings.OfficeOM.L_SSOClientError = "Възникна грешка в иÑкането за удоÑтоверÑване от Office."; -Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Извикайте closeAsync за Ñ‚ÐµÐºÑƒÑ‰Ð¸Ñ Ñ„Ð°Ð¹Ð», преди да извлечете друг."; -Strings.OfficeOM.L_SliceSizeNotSupported = "УказаниÑÑ‚ размер на Ñегмент не Ñе поддържа."; -Strings.OfficeOM.L_InvalidFormat = "Грешка, причинена от невалиден формат"; -Strings.OfficeOM.L_DataNotMatchBindingType = "УказаниÑÑ‚ обект Ñ Ð´Ð°Ð½Ð½Ð¸ не е ÑъвмеÑтим Ñ Ñ‚Ð¸Ð¿Ð° на обвързване."; -Strings.OfficeOM.L_InvalidObjectPath = 'ПътÑÑ‚ на обекта "{0}" не работи за това, което Ñе опитвате да направите. Ðко използвате обекта в нÑколко различни Ð¿Ð¾Ð²Ð¸ÐºÐ²Ð°Ð½Ð¸Ñ Ð½Ð° "context.sync" и извън поÑледователно изпълнение на партида ".run", използвайте методите "context.trackedObjects.add()" и "context.trackedObjects.remove()" за управление на времето на живот на обекта.'; -Strings.OfficeOM.L_UnsupportedUserIdentity = "Типът ÑамоличноÑÑ‚ на Ð¿Ð¾Ñ‚Ñ€ÐµÐ±Ð¸Ñ‚ÐµÐ»Ñ Ð½Ðµ Ñе поддържа."; -Strings.OfficeOM.L_HostError = "Грешка на хоÑта"; -Strings.OfficeOM.L_SSOServerErrorMessage = "Възникна неочаквана грешка на Ñървъра."; -Strings.OfficeOM.L_EventHandlerAdditionFailed = "ÐеуÑпешно добавÑне на манипулатора на Ñъбитие."; -Strings.OfficeOM.L_InvalidReadForBlankRow = "УказаниÑÑ‚ ред е празен."; -Strings.OfficeOM.L_GetSelectionNotSupported = "Текущата ÑÐµÐ»ÐµÐºÑ†Ð¸Ñ Ð½Ðµ Ñе поддържа."; -Strings.OfficeOM.L_DataNotMatchCoercionType = "Типът на ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ð¾Ð±ÐµÐºÑ‚ Ñ Ð´Ð°Ð½Ð½Ð¸ не е ÑъвмеÑтим Ñ Ñ‚ÐµÐºÑƒÑ‰Ð°Ñ‚Ð° ÑелекциÑ."; -Strings.OfficeOM.L_PermissionDenied = "Разрешението е отказано"; -Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath ограничава избора до 1024 елемента."; -Strings.OfficeOM.L_InvalidCellsValue = "Един или повече от параметрите на клетките имат ÑтойноÑти, които не Ñа позволени. Проверете ÑтойноÑтите и опитайте отново."; -Strings.OfficeOM.L_InvalidBindingOperation = "Ðевалидна Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð·Ð° обвързване"; -Strings.OfficeOM.L_NoCapability = "ÐÑмате доÑтатъчно Ñ€Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð¸Ñ Ð·Ð° това дейÑтвие."; +Strings.OfficeOM.L_DataStale = "Данните не Ñа актуални"; +Strings.OfficeOM.L_APINotSupported = "API не Ñе поддържа"; +Strings.OfficeOM.L_UnknownBindingType = "Типът на обвързването не Ñе поддържа."; +Strings.OfficeOM.L_InvalidArgument = 'Ðргументът "{0}" не работи за този Ñлучай, липÑва или не е в Ð¿Ñ€Ð°Ð²Ð¸Ð»Ð½Ð¸Ñ Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚.'; +Strings.OfficeOM.L_InvalidArgumentGeneric = "Ðргументите, подадени на функциÑта, не вършат работа в тази ÑитуациÑ, липÑват или не Ñа в Ð¿Ñ€Ð°Ð²Ð¸Ð»Ð½Ð¸Ñ Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚."; +Strings.OfficeOM.L_CustomFunctionNameCannotSplit = "Името на функциÑта Ñ‚Ñ€Ñбва да Ñъдържа непразно проÑтранÑтво на имената и непразно кратко име."; +Strings.OfficeOM.L_DataNotMatchSelection = "ПредоÑтавениÑÑ‚ обект Ñ Ð´Ð°Ð½Ð½Ð¸ не е ÑъвмеÑтим Ñ Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚Ð° или размерноÑтите на текущата ÑелекциÑ."; +Strings.OfficeOM.L_CannotRegisterEvent = "Манипулаторът на Ñъбитие не може да бъде региÑтриран."; Strings.OfficeOM.L_MemoryLimit = "Превишено е ограничението за паметта"; -Strings.OfficeOM.L_DialogAddressNotTrusted = "Домейнът на URL адреÑа не е включен в елемента AppDomain в манифеÑта."; -Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Зададените ÑтойноÑти за rowCount или columnCount Ñа невалидни."; +Strings.OfficeOM.L_CustomXmlError = "Грешка в потребителÑÐºÐ¸Ñ XML."; +Strings.OfficeOM.L_CustomXmlExceedQuotaName = "ДоÑтигнат е макÑималниÑÑ‚ брой Ñелекции"; +Strings.OfficeOM.L_SetDataParametersConflict = "ПоÑочените параметри Ñа в конфликт."; +Strings.OfficeOM.L_ColIndexOutOfRange = "СтойноÑтта на индекÑа на колоната е извън допуÑÑ‚Ð¸Ð¼Ð¸Ñ Ð´Ð¸Ð°Ð¿Ð°Ð·Ð¾Ð½. Използвайте ÑтойноÑÑ‚ (0 или по-виÑока), коÑто е по-малка от Ð±Ñ€Ð¾Ñ Ð½Ð° колоните."; +Strings.OfficeOM.L_DialogInvalidScheme = "Схемата на URL адреÑа не Ñе поддържа. ВмеÑто това използвайте HTTPS."; +Strings.OfficeOM.L_UserNotSignedIn = "Ðито един потребител не е влÑзъл в Office."; Strings.OfficeOM.L_ShuttingDown = "ОперациÑта беше неуÑпешна, защото данните в Ñървъра не Ñа актуални."; -Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} иÑка да покаже нов прозорец."; -Strings.OfficeOM.L_BadSelectorString = "Ðизът, който е подаден в Ñелектора, е неправилно форматиран или не Ñе поддържа."; -Strings.OfficeOM.L_RequestTimeout = "Повикването отне твърде много време, за да Ñе изпълни."; -Strings.OfficeOM.L_NonUniformPartialGetNotSupported = 'Параметрите за координати не могат да Ñе използват Ñ Ð½Ð°Ð»Ð°Ð³Ð°Ð½Ðµ на типа "Таблица", когато таблицата Ñъдържа обединени клетки.'; -Strings.OfficeOM.L_DataWriteReminder = "ÐапомнÑне за Ð·Ð°Ð¿Ð¸Ñ Ð½Ð° данни"; -Strings.OfficeOM.L_InvalidResourceUrlMessage = "Ðевалиден URL Ð°Ð´Ñ€ÐµÑ Ð½Ð° реÑÑƒÑ€Ñ Ðµ зададен в манифеÑта."; -Strings.OfficeOM.L_NotSupported = "ФункциÑта {0} не Ñе поддържа." +Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "ЗададениÑÑ‚ тип преобразуване не е ÑъвмеÑтим Ñ Ñ‚Ð¾Ð·Ð¸ тип обвързване."; +Strings.OfficeOM.L_CannotWriteToSelection = "Ðе може да Ñе запише в текущата ÑелекциÑ."; +Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Избраното Ñъдържание Ñ‚Ñ€Ñбва да е в табличен формат. Форматирайте данните като таблица и опитайте отново."; +Strings.OfficeOM.L_InvalidSetColumns = "ПоÑочените колони Ñа невалидни."; +Strings.OfficeOM.L_InvalidFormat = "Грешка, причинена от невалиден формат"; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage = "ОперациÑта е неуÑпешна, защото тази добавка не поддръжка потребителÑко ÑъглаÑие в тази категориÑ"; +Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Забележка: Ðаборите за форматиране, зададени от повикване на форматирането на API, Ñе предполага да бъдат под 100."; +Strings.OfficeOM.L_DataNotMatchCoercionType = "Типът на ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ð¾Ð±ÐµÐºÑ‚ Ñ Ð´Ð°Ð½Ð½Ð¸ не е ÑъвмеÑтим Ñ Ñ‚ÐµÐºÑƒÑ‰Ð°Ñ‚Ð° ÑелекциÑ."; +Strings.OfficeOM.L_MultipleNamedItemFound = "Ðамерени Ñа множеÑтво обекти Ñ ÐµÐ´Ð½Ð¾ и Ñъщо име."; +Strings.OfficeOM.L_UnsupportedEnumerationMessage = "Това номериране не Ñе поддържа в текущото приложение хоÑÑ‚."; +Strings.OfficeOM.L_TooManyIncompleteRequests = "Изчакайте, докато завърши предишното повикване."; +Strings.OfficeOM.L_InvalidDataObject = "Ðевалиден обект Ñ Ð´Ð°Ð½Ð½Ð¸"; +Strings.OfficeOM.L_InvalidTableOptionValue = "Един или повече от параметрите на tableOptions имат ÑтойноÑти, които не Ñа позволени. Проверете ÑтойноÑтите и опитайте отново."; +Strings.OfficeOM.L_Timeout = "Времето за изчакване на операциÑта изтече."; +Strings.OfficeOM.L_InvalidSetRows = "ПоÑочените редове Ñа невалидни."; +Strings.OfficeOM.L_UnsupportedEnumeration = "Ðеподдържано номериране"; +Strings.OfficeOM.L_APICallFailed = "ÐеуÑпешно извикване на API"; +Strings.OfficeOM.L_InvalidGetStartRowColumn = "Зададените ÑтойноÑти за startRow или startColumn Ñа невалидни."; +Strings.OfficeOM.L_CustomXmlOutOfDateName = "Данните не Ñа актуални"; +Strings.OfficeOM.L_TooManyOptionalObjects = "нÑколко опционални обекта в ÑпиÑъка Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¸" \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/bg-bg/office_strings.js b/node_modules/@microsoft/office-js/dist/bg-bg/office_strings.js index 3aa9a6d..b3e7a9f 100644 --- a/node_modules/@microsoft/office-js/dist/bg-bg/office_strings.js +++ b/node_modules/@microsoft/office-js/dist/bg-bg/office_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Позволи";Strings.OfficeOM.L_InvalidGetStartRowColumn="Зададените ÑтойноÑти за startRow или startColumn Ñа невалидни.";Strings.OfficeOM.L_RedundantCallbackSpecification="Обратното повикване не може да Ñе задава и в ÑпиÑък Ñ Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚Ð¸, и в незадължителен обект.";Strings.OfficeOM.L_MultipleNamedItemFound="Ðамерени Ñа множеÑтво обекти Ñ ÐµÐ´Ð½Ð¾ и Ñъщо име.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="ДоÑтигнат е макÑималниÑÑ‚ брой Ñелекции";Strings.OfficeOM.L_FormatValueOutOfRange="СтойноÑтта е извън Ð¿Ð¾Ð·Ð²Ð¾Ð»ÐµÐ½Ð¸Ñ Ð´Ð¸Ð°Ð¿Ð°Ð·Ð¾Ð½.";Strings.OfficeOM.L_ElementMissing="Ðе можем да форматираме клетката на таблицата, тъй като нÑкои ÑтойноÑти на параметри липÑват. Проверете отново параметрите и опитайте отново.";Strings.OfficeOM.L_PropertyDoesNotExist='СвойÑтвото "{0}" не ÑъщеÑтвува в обекта.';Strings.OfficeOM.L_InvalidApiArgumentsMessage="Ðевалидни входни аргументи.";Strings.OfficeOM.L_InvalidFormatValue="Един или повече от параметрите за форматиране имат ÑтойноÑти, които не Ñа позволени. Проверете ÑтойноÑтите и опитайте отново.";Strings.OfficeOM.L_InvalidDataFormat="Форматът на ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ð¾Ð±ÐµÐºÑ‚ Ñ Ð´Ð°Ð½Ð½Ð¸ е невалиден.";Strings.OfficeOM.L_OutOfRange="Извън допуÑÑ‚Ð¸Ð¼Ð¸Ñ Ð´Ð¸Ð°Ð¿Ð°Ð·Ð¾Ð½";Strings.OfficeOM.L_InternalErrorDescription="Възникна вътрешна грешка.";Strings.OfficeOM.L_InvalidBindingError="Грешка от невалидно обвързване";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Добавката вече изиÑква маркер за доÑтъп.";Strings.OfficeOM.L_SaveSettingsError="Грешка в наÑтройките за запиÑване";Strings.OfficeOM.L_TooManyArguments="твърде много аргументи";Strings.OfficeOM.L_FileTypeNotSupported="ЗададениÑÑ‚ тип на файл не Ñе поддържа.";Strings.OfficeOM.L_OperationNotSupported="Тази Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½Ðµ Ñе поддържа.";Strings.OfficeOM.L_CannotNavigateTo="Обектът Ñе намира на мÑÑто, където не Ñе поддържа навигациÑ.";Strings.OfficeOM.L_OsfControlTypeNotSupported="Типът OsfControl не Ñе поддържа.";Strings.OfficeOM.L_DialogNavigateError="Грешка в навигациÑта в Ð´Ð¸Ð°Ð»Ð¾Ð³Ð¾Ð²Ð¸Ñ Ð¿Ñ€Ð¾Ð·Ð¾Ñ€ÐµÑ†";Strings.OfficeOM.L_InvalidGetRows="ПоÑочените редове Ñа невалидни.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="конфигурирайте браузъра Ñи";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty='Опит за наÑтройка на ÑвойÑтво Ñамо за четене "{0}".';Strings.OfficeOM.L_SSOServerError="Възникна грешка в доÑтавчика на удоÑтоверÑване.";Strings.OfficeOM.L_DisplayDialogError="Показване на грешката в Ð´Ð¸Ð°Ð»Ð¾Ð³Ð¾Ð²Ð¸Ñ Ð¿Ñ€Ð¾Ð·Ð¾Ñ€ÐµÑ†";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="ОперациÑта е неуÑпешна, защото тази добавка вече изиÑква маркер за доÑтъп.";Strings.OfficeOM.L_TooManyIncompleteRequests="Изчакайте, докато завърши предишното повикване.";Strings.OfficeOM.L_InvalidResourceUrl="ПредоÑтавен е невалиден URL Ð°Ð´Ñ€ÐµÑ Ð½Ð° реÑÑƒÑ€Ñ Ð½Ð° приложение.";Strings.OfficeOM.L_SettingsStaleError="Грешка от неактуални наÑтройки";Strings.OfficeOM.L_UserClickIgnore="ПотребителÑÑ‚ избра да игнорира Ð´Ð¸Ð°Ð»Ð¾Ð³Ð¾Ð²Ð¸Ñ Ð¿Ñ€Ð¾Ð·Ð¾Ñ€ÐµÑ†.";Strings.OfficeOM.L_RunMustReturnPromise='ФункциÑта за партида, подадена на метода ".run", не върна обещание. ФункциÑта Ñ‚Ñ€Ñбва да върне едно обещание, така че вÑички автоматично проÑледÑвани обекти да могат да бъдат оÑвободени при завършване на операциÑта Ñ Ð¿Ð°Ñ€Ñ‚Ð¸Ð´Ð°Ñ‚Ð°. Обикновено връщате обещание чрез връщане на отговора от "context.sync()".';Strings.OfficeOM.L_DataStale="Данните не Ñа актуални";Strings.OfficeOM.L_SetDataParametersConflict="ПоÑочените параметри Ñа в конфликт.";Strings.OfficeOM.L_UnsupportedDataObject="ПодадениÑÑ‚ тип на обект Ñ Ð´Ð°Ð½Ð½Ð¸ не Ñе поддържа.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="СеÑиÑта ви на Office Online е Ñ Ð¸Ð·Ñ‚ÐµÐºÑŠÐ» Ñрок или е невалидна. За да продължите, обновете Ñтраницата.";Strings.OfficeOM.L_APINotSupported="API не Ñе поддържа";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Текущата ÑÐµÐ»ÐµÐºÑ†Ð¸Ñ Ð½Ðµ е ÑъвмеÑтима ÑÑŠÑ Ð·Ð°Ð´Ð°Ð´ÐµÐ½Ð¸Ñ Ñ‚Ð¸Ð¿ преобразуване.";Strings.OfficeOM.L_ActivityLimitReached="ДоÑтигнато е ограничението за активноÑÑ‚.";Strings.OfficeOM.L_SettingsCannotSave="ÐаÑтройките не можаха да бъдат запиÑани.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported='Параметрите за координати не могат да Ñе използват Ñ Ð½Ð°Ð»Ð°Ð³Ð°Ð½Ðµ на типа "Таблица", когато таблицата Ñъдържа обединени клетки.';Strings.OfficeOM.L_InvalidArgument='Ðргументът "{0}" не работи за този Ñлучай, липÑва или не е в Ð¿Ñ€Ð°Ð²Ð¸Ð»Ð½Ð¸Ñ Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚.';Strings.OfficeOM.L_BrowserAPINotSupported="Този браузър не поддържа иÑÐºÐ°Ð½Ð¸Ñ API.";Strings.OfficeOM.L_GetDataParametersConflict="ПоÑочените параметри Ñа в конфликт.";Strings.OfficeOM.L_BindingNotExist="Указаното обвързване не ÑъщеÑтвува.";Strings.OfficeOM.L_SettingsAreStale="ÐаÑтройките не можаха да Ñе запишат, защото не Ñа актуални.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Игнориране";Strings.OfficeOM.L_SelectionCannotBound="Ðе може да Ñе обвърже Ñ Ñ‚ÐµÐºÑƒÑ‰Ð°Ñ‚Ð° ÑелекциÑ.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Ðевалидна или изтекла ÑеÑиÑ";Strings.OfficeOM.L_InvalidApiCallInContext="Ðевалидно извикване на API в Ñ‚ÐµÐºÑƒÑ‰Ð¸Ñ ÐºÐ¾Ð½Ñ‚ÐµÐºÑÑ‚.";Strings.OfficeOM.L_DialogRequireHTTPS="Ðе Ñе поддържа протоколът HTTP. ВмеÑто това използвайте HTTPS";Strings.OfficeOM.L_CannotWriteToSelection="Ðе може да Ñе запише в текущата ÑелекциÑ.";Strings.OfficeOM.L_MissingParameter="ЛипÑващ параметър";Strings.OfficeOM.L_SettingNameNotExist="Указаното име на наÑтройка не ÑъщеÑтвува.";Strings.OfficeOM.L_SSOClientErrorMessage="Възникна неочаквана грешка в клиента.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Данните Ñа оÑтарели. Извлечете обекта отново.";Strings.OfficeOM.L_InvalidNode="Ðевалиден възел";Strings.OfficeOM.L_SetDataIsTooLarge="ЗададениÑÑ‚ обект Ñ Ð´Ð°Ð½Ð½Ð¸ е твърде голÑм.";Strings.OfficeOM.L_FormattingReminder="ÐапомнÑне за форматиране";Strings.OfficeOM.L_DataNotMatchSelection="ПредоÑтавениÑÑ‚ обект Ñ Ð´Ð°Ð½Ð½Ð¸ не е ÑъвмеÑтим Ñ Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚Ð° или размерноÑтите на текущата ÑелекциÑ.";Strings.OfficeOM.L_UserAborted="ПотребителÑÑ‚ прекрати иÑкането за ÑъглаÑие.";Strings.OfficeOM.L_CustomXmlNodeNotFound="УказаниÑÑ‚ възел не е намерен.";Strings.OfficeOM.L_InvalidTableOptionValue="Един или повече от параметрите на tableOptions имат ÑтойноÑти, които не Ñа позволени. Проверете ÑтойноÑтите и опитайте отново.";Strings.OfficeOM.L_InvalidValue="Ðевалидна ÑтойноÑÑ‚";Strings.OfficeOM.L_SpecifiedIdNotExist="ПоÑочениÑÑ‚ ИД не ÑъщеÑтвува.";Strings.OfficeOM.L_CannotRegisterEvent="Манипулаторът на Ñъбитие не може да бъде региÑтриран.";Strings.OfficeOM.L_NewWindowCrossZone='ÐаÑтройките за защита на Ð²Ð°ÑˆÐ¸Ñ Ð±Ñ€Ð°ÑƒÐ·ÑŠÑ€ ни пречат да Ñъздадем диалогов прозорец. Опитайте Ñ Ð´Ñ€ÑƒÐ³ браузър или {0}, така че "{1}" и домейнът, показан в адреÑната лента, да Ñа в една и Ñъща зона на защита.';Strings.OfficeOM.L_RowIndexOutOfRange="СтойноÑтта на индекÑа на реда е извън допуÑÑ‚Ð¸Ð¼Ð¸Ñ Ð´Ð¸Ð°Ð¿Ð°Ð·Ð¾Ð½. Използвайте ÑтойноÑÑ‚ (0 или по-виÑока), коÑто е по-малка от Ð±Ñ€Ð¾Ñ Ð½Ð° редовете.";Strings.OfficeOM.L_InternalError="Вътрешна грешка";Strings.OfficeOM.L_CallbackNotAFunction="Обратното повикване Ñ‚Ñ€Ñбва да е от тип функциÑ, а беше от тип {0}.";Strings.OfficeOM.L_InValidOptionalArgument="невалиден незадължителен аргумент";Strings.OfficeOM.L_ValueNotLoaded='СтойноÑтта на обекта резултат още не е заредена. Преди четене на ÑвойÑтвото на ÑтойноÑтта, повикайте "context.sync()" в контекÑта на Ñъответната заÑвка.';Strings.OfficeOM.L_InvalidDataObject="Ðевалиден обект Ñ Ð´Ð°Ð½Ð½Ð¸";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Проблем в мрежата попречи на извличането на файла.";Strings.OfficeOM.L_InvalidCoercion="Ðевалидно преобразуване на тип";Strings.OfficeOM.L_BindingToMultipleSelection="Ðе Ñе поддържат неÑÑŠÑедни Ñелекции.";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_AppNameNotExist="Ðе ÑъщеÑтвува име на добавка за {0}.";Strings.OfficeOM.L_DataNotMatchBindingSize="ПодадениÑÑ‚ обект Ñ Ð´Ð°Ð½Ð½Ð¸ не ÑъответÑтва на размера на текущата ÑелекциÑ.";Strings.OfficeOM.L_InvalidSSOAddinMessage="API за ÑамоличноÑÑ‚ не Ñе поддържа за тази добавка.";Strings.OfficeOM.L_DataWriteError="Грешка при Ð·Ð°Ð¿Ð¸Ñ Ð½Ð° данни";Strings.OfficeOM.L_ColIndexOutOfRange="СтойноÑтта на индекÑа на колоната е извън допуÑÑ‚Ð¸Ð¼Ð¸Ñ Ð´Ð¸Ð°Ð¿Ð°Ð·Ð¾Ð½. Използвайте ÑтойноÑÑ‚ (0 или по-виÑока), коÑто е по-малка от Ð±Ñ€Ð¾Ñ Ð½Ð° колоните.";Strings.OfficeOM.L_EventHandlerRemovalFailed="ÐеуÑпешно премахване на манипулатора на Ñъбитие.";Strings.OfficeOM.L_FunctionCallFailed="Извикването на функциÑта {0} е неуÑпешно, код на грешка: {1}.";Strings.OfficeOM.L_BindingCreationError="Грешка при Ñъздаване на обвързване";Strings.OfficeOM.L_UserNotSignedIn="Ðито един потребител не е влÑзъл в Office.";Strings.OfficeOM.L_NotImplemented="ФункциÑта {0} не е реализирана.";Strings.OfficeOM.L_InvalidColumnsForBinding="ПоÑочените колони Ñа невалидни.";Strings.OfficeOM.L_TooManyOptionalObjects="нÑколко опционални обекта в ÑпиÑъка Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¸";Strings.OfficeOM.L_InvalidSelectionForBindingType="Ðе може да Ñе Ñъздаде обвързване Ñ Ñ‚ÐµÐºÑƒÑ‰Ð°Ñ‚Ð° ÑÐµÐ»ÐµÐºÑ†Ð¸Ñ Ð¸ ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ñ‚Ð¸Ð¿ обвързване.";Strings.OfficeOM.L_InvalidSetColumns="ПоÑочените колони Ñа невалидни.";Strings.OfficeOM.L_NotSupportedEventType="УказаниÑÑ‚ тип на Ñъбитие {0} не Ñе поддържа.";Strings.OfficeOM.L_InvalidAPICall="Ðевалидно извикване на API";Strings.OfficeOM.L_InvalidGrant="ЛипÑва предварително удоÑтоверÑване.";Strings.OfficeOM.L_DialogInvalidScheme="Схемата на URL адреÑа не Ñе поддържа. ВмеÑто това използвайте HTTPS.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Избраното Ñъдържание Ñ‚Ñ€Ñбва да е в табличен формат. Форматирайте данните като таблица и опитайте отново.";Strings.OfficeOM.L_InvalidRequestContext="Ðе може да Ñе използва обектът в контекÑта на различни заÑвки.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="ЗададениÑÑ‚ тип преобразуване не е ÑъвмеÑтим Ñ Ñ‚Ð¾Ð·Ð¸ тип обвързване.";Strings.OfficeOM.L_RequestTokenUnavailable="Този API е ограничен, за да Ñе забави чеÑтотата на повикване.";Strings.OfficeOM.L_InvalidBinding="Ðевалидно обвързване";Strings.OfficeOM.L_NamedItemNotFound="ÐаименуваниÑÑ‚ елемент не ÑъщеÑтвува.";Strings.OfficeOM.L_InvalidArgumentGeneric="Ðргументите, подадени на функциÑта, не вършат работа в тази ÑитуациÑ, липÑват или не Ñа в Ð¿Ñ€Ð°Ð²Ð¸Ð»Ð½Ð¸Ñ Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Приложението {0} не ÑъщеÑтвува. Ðе е извикано Microsoft.Office.WebExtension.Initialize(причина).";Strings.OfficeOM.L_GetDataIsTooLarge="ЗаÑвениÑÑ‚ набор данни е твърде голÑм.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="Това номериране не Ñе поддържа в текущото приложение хоÑÑ‚.";Strings.OfficeOM.L_EventRegistrationError="Грешка при региÑтриране на Ñъбитие";Strings.OfficeOM.L_InvalidSetRows="ПоÑочените редове Ñа невалидни.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Типът ÑамоличноÑÑ‚ на Ð¿Ð¾Ñ‚Ñ€ÐµÐ±Ð¸Ñ‚ÐµÐ»Ñ Ð½Ðµ Ñе поддържа.";Strings.OfficeOM.L_InitializeNotReady="Office.js не е още напълно зареден. Опитайте отново по-къÑно или Ñе уверете, че Ñте добавили кода за Ð¸Ð½Ð¸Ñ†Ð¸Ð°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ñ Ð²ÑŠÐ² функциÑта Office.initialize.";Strings.OfficeOM.L_UserAbortedMessage="ПотребителÑÑ‚ не Ñе ÑъглаÑи Ñ Ñ€Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð¸Ñта на добавката.";Strings.OfficeOM.L_NotSupportedBindingType="УказаниÑÑ‚ тип на обвързване {0} не Ñе поддържа.";Strings.OfficeOM.L_UnsupportedEnumeration="Ðеподдържано номериране";Strings.OfficeOM.L_DataReadError="Грешка при четене на данни";Strings.OfficeOM.L_ConnectionFailureWithDetails="ИÑкането е неуÑпешно Ñ ÐºÐ¾Ð´ на ÑÑŠÑтоÑнието {0}, код за грешка {1} и Ñледното Ñъобщение за грешка: {2}";Strings.OfficeOM.L_CoercionTypeNotSupported="ЗададениÑÑ‚ тип преобразуване не Ñе поддържа.";Strings.OfficeOM.L_MissingRequiredArguments="липÑват нÑкои задължителни аргументи";Strings.OfficeOM.L_PropertyNotLoaded='СвойÑтвото "{0}" не е налично. Преди да прочетете ÑтойноÑтта на ÑвойÑтвото, извикайте метода за зареждане Ñ Ð¾Ð±ÐµÐºÑ‚Ð°, който го Ñъдържа, и извикайте "context.sync()" в контекÑта на Ñвързаната заÑвка.';Strings.OfficeOM.L_DocumentReadOnly="ЗаÑвената Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½Ðµ е разрешена в Ñ‚ÐµÐºÑƒÑ‰Ð¸Ñ Ð´Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚ÐµÐ½ режим.";Strings.OfficeOM.L_NetworkProblem="Мрежов проблем";Strings.OfficeOM.L_InvalidParameters="ФункциÑта {0} има невалиден параметри.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="ЗададениÑÑ‚ тип обвързване не е ÑъвмеÑтим Ñ Ð¿Ð¾Ð´Ð°Ð´ÐµÐ½Ð¸Ñ Ð¸Ð¼ÐµÐ½ÑƒÐ²Ð°Ð½ елемент.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="ÐžÐ³Ñ€Ð°Ð½Ð¸Ñ‡ÐµÐ½Ð¸Ñ Ð½Ð° браузъра ни попречиха да Ñъздадем Ð´Ð¸Ð°Ð»Ð¾Ð³Ð¾Ð²Ð¸Ñ Ð¿Ñ€Ð¾Ð·Ð¾Ñ€ÐµÑ†. Домейнът на Ð´Ð¸Ð°Ð»Ð¾Ð³Ð¾Ð²Ð¸Ñ Ð¿Ñ€Ð¾Ð·Ð¾Ñ€ÐµÑ† и домейнът на хоÑта на добавката не Ñа в една и Ñъща зона на защита.";Strings.OfficeOM.L_Timeout="Времето за изчакване на операциÑта изтече.";Strings.OfficeOM.L_UnknownBindingType="Типът на обвързването не Ñе поддържа.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Забележка: БроÑÑ‚ на клетките в таблица Ñе предполага да бъде под 20 000 клетки.";Strings.OfficeOM.L_EventHandlerNotExist="ЗададениÑÑ‚ манипулатор на Ñъбитие не е намерен за това обвързване.";Strings.OfficeOM.L_InvalidGrantMessage="ЛипÑват Ñ€Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð¸Ñ Ð·Ð° тази добавка.";Strings.OfficeOM.L_APICallFailed="ÐеуÑпешно извикване на API";Strings.OfficeOM.L_CustomXmlOutOfDateName="Данните не Ñа актуални";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="ОперациÑта не Ñе поддържа за този тип обвързване.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Ðаправете избор.";Strings.OfficeOM.L_InvalidSetStartRowColumn="Зададените ÑтойноÑти за startRow или startColumn Ñа невалидни.";Strings.OfficeOM.L_DialogAlreadyOpened="ОперациÑта е неуÑпешна, защото тази добавка вече има активен диалогов прозорец.";Strings.OfficeOM.L_NavOutOfBound="ОперациÑта е неуÑпешна, тъй като индекÑÑŠÑ‚ е извън диапазона.";Strings.OfficeOM.L_CustomXmlError="Грешка в потребителÑÐºÐ¸Ñ XML.";Strings.OfficeOM.L_ConnectionFailureWithStatus="ИÑкането е неуÑпешно Ñ ÐºÐ¾Ð´ на ÑÑŠÑтоÑнието {0}.";Strings.OfficeOM.L_InvalidGetColumns="ПоÑочените колони Ñа невалидни.";Strings.OfficeOM.L_TooManyOptionalFunction="нÑколко опционални функции в ÑпиÑъка Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¸";Strings.OfficeOM.L_OverwriteWorksheetData="ОперациÑта за наÑтройка е неуÑпешна, защото подадениÑÑ‚ обект Ñ Ð´Ð°Ð½Ð½Ð¸ ще Ñе запише върху данните или ще ги отмеÑти.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Забележка: Ðаборите за форматиране, зададени от повикване на форматирането на API, Ñе предполага да бъдат под 100.";Strings.OfficeOM.L_ReadSettingsError="Грешка в наÑтройките за четене";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod='Промените в ÑвойÑтво "{0}" не могат да бъдат приложени чрез метод "object.set".';Strings.OfficeOM.L_IndexOutOfRange="ИндекÑÑŠÑ‚ е извън обхват.";Strings.OfficeOM.L_SSOClientError="Възникна грешка в иÑкането за удоÑтоверÑване от Office.";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Извикайте closeAsync за Ñ‚ÐµÐºÑƒÑ‰Ð¸Ñ Ñ„Ð°Ð¹Ð», преди да извлечете друг.";Strings.OfficeOM.L_SliceSizeNotSupported="УказаниÑÑ‚ размер на Ñегмент не Ñе поддържа.";Strings.OfficeOM.L_InvalidFormat="Грешка, причинена от невалиден формат";Strings.OfficeOM.L_DataNotMatchBindingType="УказаниÑÑ‚ обект Ñ Ð´Ð°Ð½Ð½Ð¸ не е ÑъвмеÑтим Ñ Ñ‚Ð¸Ð¿Ð° на обвързване.";Strings.OfficeOM.L_InvalidObjectPath='ПътÑÑ‚ на обекта "{0}" не работи за това, което Ñе опитвате да направите. Ðко използвате обекта в нÑколко различни Ð¿Ð¾Ð²Ð¸ÐºÐ²Ð°Ð½Ð¸Ñ Ð½Ð° "context.sync" и извън поÑледователно изпълнение на партида ".run", използвайте методите "context.trackedObjects.add()" и "context.trackedObjects.remove()" за управление на времето на живот на обекта.';Strings.OfficeOM.L_UnsupportedUserIdentity="Типът ÑамоличноÑÑ‚ на Ð¿Ð¾Ñ‚Ñ€ÐµÐ±Ð¸Ñ‚ÐµÐ»Ñ Ð½Ðµ Ñе поддържа.";Strings.OfficeOM.L_HostError="Грешка на хоÑта";Strings.OfficeOM.L_SSOServerErrorMessage="Възникна неочаквана грешка на Ñървъра.";Strings.OfficeOM.L_EventHandlerAdditionFailed="ÐеуÑпешно добавÑне на манипулатора на Ñъбитие.";Strings.OfficeOM.L_InvalidReadForBlankRow="УказаниÑÑ‚ ред е празен.";Strings.OfficeOM.L_GetSelectionNotSupported="Текущата ÑÐµÐ»ÐµÐºÑ†Ð¸Ñ Ð½Ðµ Ñе поддържа.";Strings.OfficeOM.L_DataNotMatchCoercionType="Типът на ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ð¾Ð±ÐµÐºÑ‚ Ñ Ð´Ð°Ð½Ð½Ð¸ не е ÑъвмеÑтим Ñ Ñ‚ÐµÐºÑƒÑ‰Ð°Ñ‚Ð° ÑелекциÑ.";Strings.OfficeOM.L_PermissionDenied="Разрешението е отказано";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath ограничава избора до 1024 елемента.";Strings.OfficeOM.L_InvalidCellsValue="Един или повече от параметрите на клетките имат ÑтойноÑти, които не Ñа позволени. Проверете ÑтойноÑтите и опитайте отново.";Strings.OfficeOM.L_InvalidBindingOperation="Ðевалидна Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð·Ð° обвързване";Strings.OfficeOM.L_NoCapability="ÐÑмате доÑтатъчно Ñ€Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð¸Ñ Ð·Ð° това дейÑтвие.";Strings.OfficeOM.L_MemoryLimit="Превишено е ограничението за паметта";Strings.OfficeOM.L_DialogAddressNotTrusted="Домейнът на URL адреÑа не е включен в елемента AppDomain в манифеÑта.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Зададените ÑтойноÑти за rowCount или columnCount Ñа невалидни.";Strings.OfficeOM.L_ShuttingDown="ОперациÑта беше неуÑпешна, защото данните в Ñървъра не Ñа актуални.";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} иÑка да покаже нов прозорец.";Strings.OfficeOM.L_BadSelectorString="Ðизът, който е подаден в Ñелектора, е неправилно форматиран или не Ñе поддържа.";Strings.OfficeOM.L_RequestTimeout="Повикването отне твърде много време, за да Ñе изпълни.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported='Параметрите за координати не могат да Ñе използват Ñ Ð½Ð°Ð»Ð°Ð³Ð°Ð½Ðµ на типа "Таблица", когато таблицата Ñъдържа обединени клетки.';Strings.OfficeOM.L_DataWriteReminder="ÐапомнÑне за Ð·Ð°Ð¿Ð¸Ñ Ð½Ð° данни";Strings.OfficeOM.L_InvalidResourceUrlMessage="Ðевалиден URL Ð°Ð´Ñ€ÐµÑ Ð½Ð° реÑÑƒÑ€Ñ Ðµ зададен в манифеÑта.";Strings.OfficeOM.L_NotSupported="ФункциÑта {0} не Ñе поддържа." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_CannotNavigateTo="Обектът Ñе намира на мÑÑто, където не Ñе поддържа навигациÑ.";Strings.OfficeOM.L_InvalidFormatValue="Един или повече от параметрите за форматиране имат ÑтойноÑти, които не Ñа позволени. Проверете ÑтойноÑтите и опитайте отново.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="конфигурирайте браузъра Ñи";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Ðаправете избор.";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Ðевалидни входни аргументи.";Strings.OfficeOM.L_RequestTimeout="Повикването отне твърде много време, за да Ñе изпълни.";Strings.OfficeOM.L_SpecifiedIdNotExist="ПоÑочениÑÑ‚ ИД не ÑъщеÑтвува.";Strings.OfficeOM.L_SSOClientErrorMessage="Възникна неочаквана грешка в клиента.";Strings.OfficeOM.L_InvalidSetStartRowColumn="Зададените ÑтойноÑти за startRow или startColumn Ñа невалидни.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Добавката вече изиÑква маркер за доÑтъп.";Strings.OfficeOM.L_CustomFunctionNameContainsBadChars="Името на функциÑта може да Ñъдържа Ñамо букви, цифри, долни черти и точки.";Strings.OfficeOM.L_SettingsStaleError="Грешка от неактуални наÑтройки";Strings.OfficeOM.L_BrowserAPINotSupported="Този браузър не поддържа иÑÐºÐ°Ð½Ð¸Ñ API.";Strings.OfficeOM.L_IndexOutOfRange="ИндекÑÑŠÑ‚ е извън обхват.";Strings.OfficeOM.L_DataNotMatchBindingSize="ПодадениÑÑ‚ обект Ñ Ð´Ð°Ð½Ð½Ð¸ не ÑъответÑтва на размера на текущата ÑелекциÑ.";Strings.OfficeOM.L_InvalidColumnsForBinding="ПоÑочените колони Ñа невалидни.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported='Параметрите за координати не могат да Ñе използват Ñ Ð½Ð°Ð»Ð°Ð³Ð°Ð½Ðµ на типа "Таблица", когато таблицата Ñъдържа обединени клетки.';Strings.OfficeOM.L_DataWriteReminder="ÐапомнÑне за Ð·Ð°Ð¿Ð¸Ñ Ð½Ð° данни";Strings.OfficeOM.L_EventHandlerNotExist="ЗададениÑÑ‚ манипулатор на Ñъбитие не е намерен за това обвързване.";Strings.OfficeOM.L_DialogAddressNotTrusted="Домейнът на URL адреÑа не е включен в елемента AppDomain в манифеÑта.";Strings.OfficeOM.L_ConnectionFailureWithDetails="ИÑкането е неуÑпешно Ñ ÐºÐ¾Ð´ на ÑÑŠÑтоÑнието {0}, код за грешка {1} и Ñледното Ñъобщение за грешка: {2}";Strings.OfficeOM.L_InvalidValue="Ðевалидна ÑтойноÑÑ‚";Strings.OfficeOM.L_MissingRequiredArguments="липÑват нÑкои задължителни аргументи";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="ОперациÑта не Ñе поддържа за този тип обвързване.";Strings.OfficeOM.L_InitializeNotReady="Office.js не е още напълно зареден. Опитайте отново по-къÑно или Ñе уверете, че Ñте добавили кода за Ð¸Ð½Ð¸Ñ†Ð¸Ð°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ñ Ð²ÑŠÐ² функциÑта Office.initialize.";Strings.OfficeOM.L_NetworkProblem="Мрежов проблем";Strings.OfficeOM.L_BindingNotExist="Указаното обвързване не ÑъщеÑтвува.";Strings.OfficeOM.L_InvalidReadForBlankRow="УказаниÑÑ‚ ред е празен.";Strings.OfficeOM.L_ApiNotFoundDetails="Методът или ÑвойÑтвото {0} е чаÑÑ‚ от набора Ñ Ð¸Ð·Ð¸ÑÐºÐ²Ð°Ð½Ð¸Ñ Ð·Ð° {1}, който не е наличен във вашата верÑÐ¸Ñ Ð½Ð° {2}.";Strings.OfficeOM.L_GetSelectionNotSupported="Текущата ÑÐµÐ»ÐµÐºÑ†Ð¸Ñ Ð½Ðµ Ñе поддържа.";Strings.OfficeOM.L_UnsupportedUserIdentity="Типът ÑамоличноÑÑ‚ на Ð¿Ð¾Ñ‚Ñ€ÐµÐ±Ð¸Ñ‚ÐµÐ»Ñ Ð½Ðµ Ñе поддържа.";Strings.OfficeOM.L_DataWriteError="Грешка при Ð·Ð°Ð¿Ð¸Ñ Ð½Ð° данни";Strings.OfficeOM.L_SelectionCannotBound="Ðе може да Ñе обвърже Ñ Ñ‚ÐµÐºÑƒÑ‰Ð°Ñ‚Ð° ÑелекциÑ.";Strings.OfficeOM.L_DialogAlreadyOpened="ОперациÑта е неуÑпешна, защото тази добавка вече има активен диалогов прозорец.";Strings.OfficeOM.L_InValidOptionalArgument="невалиден незадължителен аргумент";Strings.OfficeOM.L_ReadSettingsError="Грешка в наÑтройките за четене";Strings.OfficeOM.L_SSOConnectionLostErrorMessage="A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones.";Strings.OfficeOM.L_InternalError="Вътрешна грешка";Strings.OfficeOM.L_InvalidGetRows="ПоÑочените редове Ñа невалидни.";Strings.OfficeOM.L_NoCapability="ÐÑмате доÑтатъчно Ñ€Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð¸Ñ Ð·Ð° това дейÑтвие.";Strings.OfficeOM.L_InvalidBinding="Ðевалидно обвързване";Strings.OfficeOM.L_BadSelectorString="Ðизът, който е подаден в Ñелектора, е неправилно форматиран или не Ñе поддържа.";Strings.OfficeOM.L_BindingToMultipleSelection="Ðе Ñе поддържат неÑÑŠÑедни Ñелекции.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="ОперациÑта е неуÑпешна, защото тази добавка вече изиÑква маркер за доÑтъп.";Strings.OfficeOM.L_CallbackNotAFunction="Обратното повикване Ñ‚Ñ€Ñбва да е от тип функциÑ, а беше от тип {0}.";Strings.OfficeOM.L_DocumentReadOnly="ЗаÑвената Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½Ðµ е разрешена в Ñ‚ÐµÐºÑƒÑ‰Ð¸Ñ Ð´Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚ÐµÐ½ режим.";Strings.OfficeOM.L_GetDataParametersConflict="ПоÑочените параметри Ñа в конфликт.";Strings.OfficeOM.L_UserAborted="ПотребителÑÑ‚ прекрати иÑкането за ÑъглаÑие.";Strings.OfficeOM.L_SSOServerErrorMessage="Възникна неочаквана грешка на Ñървъра.";Strings.OfficeOM.L_ActivityLimitReached="ДоÑтигнато е ограничението за активноÑÑ‚.";Strings.OfficeOM.L_EventHandlerRemovalFailed="ÐеуÑпешно премахване на манипулатора на Ñъбитие.";Strings.OfficeOM.L_InvalidSSOAddinMessage="API за ÑамоличноÑÑ‚ не Ñе поддържа за тази добавка.";Strings.OfficeOM.L_SliceSizeNotSupported="УказаниÑÑ‚ размер на Ñегмент не Ñе поддържа.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty='Опит за наÑтройка на ÑвойÑтво Ñамо за четене "{0}".';Strings.OfficeOM.L_DialogRequireHTTPS="Ðе Ñе поддържа протоколът HTTP. ВмеÑто това използвайте HTTPS";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Приложението {0} не ÑъщеÑтвува. Ðе е извикано Microsoft.Office.WebExtension.Initialize(причина).";Strings.OfficeOM.L_UserAbortedMessage="ПотребителÑÑ‚ не Ñе ÑъглаÑи Ñ Ñ€Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð¸Ñта на добавката.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Забележка: БроÑÑ‚ на клетките в таблица Ñе предполага да бъде под 20 000 клетки.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Текущата ÑÐµÐ»ÐµÐºÑ†Ð¸Ñ Ð½Ðµ е ÑъвмеÑтима ÑÑŠÑ Ð·Ð°Ð´Ð°Ð´ÐµÐ½Ð¸Ñ Ñ‚Ð¸Ð¿ преобразуване.";Strings.OfficeOM.L_OsfControlTypeNotSupported="Типът OsfControl не Ñе поддържа.";Strings.OfficeOM.L_OverwriteWorksheetData="ОперациÑта за наÑтройка е неуÑпешна, защото подадениÑÑ‚ обект Ñ Ð´Ð°Ð½Ð½Ð¸ ще Ñе запише върху данните или ще ги отмеÑти.";Strings.OfficeOM.L_OutOfRange="Извън допуÑÑ‚Ð¸Ð¼Ð¸Ñ Ð´Ð¸Ð°Ð¿Ð°Ð·Ð¾Ð½";Strings.OfficeOM.L_PermissionDenied="Разрешението е отказано";Strings.OfficeOM.L_NotSupported="ФункциÑта {0} не Ñе поддържа.";Strings.OfficeOM.L_TooManyArguments="твърде много аргументи";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Типът ÑамоличноÑÑ‚ на Ð¿Ð¾Ñ‚Ñ€ÐµÐ±Ð¸Ñ‚ÐµÐ»Ñ Ð½Ðµ Ñе поддържа.";Strings.OfficeOM.L_PropertyNotLoaded='СвойÑтвото "{0}" не е налично. Преди да прочетете ÑтойноÑтта на ÑвойÑтвото, извикайте метода за зареждане Ñ Ð¾Ð±ÐµÐºÑ‚Ð°, който го Ñъдържа, и извикайте "context.sync()" в контекÑта на Ñвързаната заÑвка.';Strings.OfficeOM.L_TooManyOptionalFunction="нÑколко опционални функции в ÑпиÑъка Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¸";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Данните Ñа оÑтарели. Извлечете обекта отново.";Strings.OfficeOM.L_RedundantCallbackSpecification="Обратното повикване не може да Ñе задава и в ÑпиÑък Ñ Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚Ð¸, и в незадължителен обект.";Strings.OfficeOM.L_InvalidParameters="ФункциÑта {0} има невалиден параметри.";Strings.OfficeOM.L_SettingsAreStale="ÐаÑтройките не можаха да Ñе запишат, защото не Ñа актуални.";Strings.OfficeOM.L_SSOConnectionLostError="A connection was lost during the sign in process.";Strings.OfficeOM.L_InvalidGrantMessage="ЛипÑват Ñ€Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð¸Ñ Ð·Ð° тази добавка.";Strings.OfficeOM.L_InvalidAPICall="Ðевалидно извикване на API";Strings.OfficeOM.L_CoercionTypeNotSupported="ЗададениÑÑ‚ тип преобразуване не Ñе поддържа.";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_InvalidNamedItemForBindingType="ЗададениÑÑ‚ тип обвързване не е ÑъвмеÑтим Ñ Ð¿Ð¾Ð´Ð°Ð´ÐµÐ½Ð¸Ñ Ð¸Ð¼ÐµÐ½ÑƒÐ²Ð°Ð½ елемент.";Strings.OfficeOM.L_CustomFunctionDefinitionMissing="СвойÑтво Ñ Ñ‚Ð¾Ð²Ð° име, което предÑтавлÑва Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ†Ð¸Ñ Ð½Ð° функциÑта, Ñ‚Ñ€Ñбва да ÑъщеÑтвува в Excel.CustomFunctions.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Игнориране";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod='Промените в ÑвойÑтво "{0}" не могат да бъдат приложени чрез метод "object.set".';Strings.OfficeOM.L_NamedItemNotFound="ÐаименуваниÑÑ‚ елемент не ÑъщеÑтвува.";Strings.OfficeOM.L_FunctionCallFailed="Извикването на функциÑта {0} е неуÑпешно, код на грешка: {1}.";Strings.OfficeOM.L_SSOServerError="Възникна грешка в доÑтавчика на удоÑтоверÑване.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Позволи";Strings.OfficeOM.L_OperationNotSupported="Тази Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½Ðµ Ñе поддържа.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Ðевалидна или изтекла ÑеÑиÑ";Strings.OfficeOM.L_ValueNotLoaded='СтойноÑтта на обекта резултат още не е заредена. Преди четене на ÑвойÑтвото на ÑтойноÑтта, повикайте "context.sync()" в контекÑта на Ñъответната заÑвка.';Strings.OfficeOM.L_MissingParameter="ЛипÑващ параметър";Strings.OfficeOM.L_NotImplemented="ФункциÑта {0} не е реализирана.";Strings.OfficeOM.L_UnsupportedDataObject="ПодадениÑÑ‚ тип на обект Ñ Ð´Ð°Ð½Ð½Ð¸ не Ñе поддържа.";Strings.OfficeOM.L_NotSupportedEventType="УказаниÑÑ‚ тип на Ñъбитие {0} не Ñе поддържа.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath ограничава избора до 1024 елемента.";Strings.OfficeOM.L_CustomFunctionImplementationMissing='СвойÑтвото Ñ Ñ‚Ð¾Ð²Ð° име в Excel.CustomFunctions, което предÑтавлÑва Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ†Ð¸Ñ Ð½Ð° функциÑта, Ñ‚Ñ€Ñбва да Ñъдържа ÑвойÑтво "call", което изпълнÑва функциÑта.';Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory="Тази добавка не поддържа потребителÑко ÑъглаÑие.";Strings.OfficeOM.L_SettingNameNotExist="Указаното име на наÑтройка не ÑъщеÑтвува.";Strings.OfficeOM.L_AppNameNotExist="Ðе ÑъщеÑтвува име на добавка за {0}.";Strings.OfficeOM.L_InvalidOperationInCellEditMode="Excel е в режим на редактиране на клетка. Излезте от режим на редактиране, като натиÑнете ENTER или TAB, или изберете друга клетка и Ñлед това опитайте отново.";Strings.OfficeOM.L_InvalidNode="Ðевалиден възел";Strings.OfficeOM.L_FileTypeNotSupported="ЗададениÑÑ‚ тип на файл не Ñе поддържа.";Strings.OfficeOM.L_InvalidCellsValue="Един или повече от параметрите на клетките имат ÑтойноÑти, които не Ñа позволени. Проверете ÑтойноÑтите и опитайте отново.";Strings.OfficeOM.L_UserClickIgnore="ПотребителÑÑ‚ избра да игнорира Ð´Ð¸Ð°Ð»Ð¾Ð³Ð¾Ð²Ð¸Ñ Ð¿Ñ€Ð¾Ð·Ð¾Ñ€ÐµÑ†.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported='Параметрите за координати не могат да Ñе използват Ñ Ð½Ð°Ð»Ð°Ð³Ð°Ð½Ðµ на типа "Таблица", когато таблицата Ñъдържа обединени клетки.';Strings.OfficeOM.L_InvalidDataFormat="Форматът на ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ð¾Ð±ÐµÐºÑ‚ Ñ Ð´Ð°Ð½Ð½Ð¸ е невалиден.";Strings.OfficeOM.L_RowIndexOutOfRange="СтойноÑтта на индекÑа на реда е извън допуÑÑ‚Ð¸Ð¼Ð¸Ñ Ð´Ð¸Ð°Ð¿Ð°Ð·Ð¾Ð½. Използвайте ÑтойноÑÑ‚ (0 или по-виÑока), коÑто е по-малка от Ð±Ñ€Ð¾Ñ Ð½Ð° редовете.";Strings.OfficeOM.L_NavOutOfBound="ОперациÑта е неуÑпешна, тъй като индекÑÑŠÑ‚ е извън диапазона.";Strings.OfficeOM.L_RequestTokenUnavailable="Този API е ограничен, за да Ñе забави чеÑтотата на повикване.";Strings.OfficeOM.L_InvalidObjectPath='ПътÑÑ‚ на обекта "{0}" не работи за това, което Ñе опитвате да направите. Ðко използвате обекта в нÑколко различни Ð¿Ð¾Ð²Ð¸ÐºÐ²Ð°Ð½Ð¸Ñ Ð½Ð° "context.sync" и извън поÑледователно изпълнение на партида ".run", използвайте методите "context.trackedObjects.add()" и "context.trackedObjects.remove()" за управление на времето на живот на обекта.';Strings.OfficeOM.L_BindingCreationError="Грешка при Ñъздаване на обвързване";Strings.OfficeOM.L_InvalidGrant="ЛипÑва предварително удоÑтоверÑване.";Strings.OfficeOM.L_DataNotMatchBindingType="УказаниÑÑ‚ обект Ñ Ð´Ð°Ð½Ð½Ð¸ не е ÑъвмеÑтим Ñ Ñ‚Ð¸Ð¿Ð° на обвързване.";Strings.OfficeOM.L_InvalidRequestContext="Ðе може да Ñе използва обектът в контекÑта на различни заÑвки.";Strings.OfficeOM.L_GetDataIsTooLarge="ЗаÑвениÑÑ‚ набор данни е твърде голÑм.";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} иÑка да покаже нов прозорец.";Strings.OfficeOM.L_RunMustReturnPromise='ФункциÑта за партида, подадена на метода ".run", не върна обещание. ФункциÑта Ñ‚Ñ€Ñбва да върне едно обещание, така че вÑички автоматично проÑледÑвани обекти да могат да бъдат оÑвободени при завършване на операциÑта Ñ Ð¿Ð°Ñ€Ñ‚Ð¸Ð´Ð°Ñ‚Ð°. Обикновено връщате обещание чрез връщане на отговора от "context.sync()".';Strings.OfficeOM.L_CustomXmlNodeNotFound="УказаниÑÑ‚ възел не е намерен.";Strings.OfficeOM.L_NotSupportedBindingType="УказаниÑÑ‚ тип на обвързване {0} не Ñе поддържа.";Strings.OfficeOM.L_InvalidBindingError="Грешка от невалидно обвързване";Strings.OfficeOM.L_EventHandlerAdditionFailed="ÐеуÑпешно добавÑне на манипулатора на Ñъбитие.";Strings.OfficeOM.L_DialogNavigateError="Грешка в навигациÑта в Ð´Ð¸Ð°Ð»Ð¾Ð³Ð¾Ð²Ð¸Ñ Ð¿Ñ€Ð¾Ð·Ð¾Ñ€ÐµÑ†";Strings.OfficeOM.L_SettingsCannotSave="ÐаÑтройките не можаха да бъдат запиÑани.";Strings.OfficeOM.L_SetDataIsTooLarge="ЗададениÑÑ‚ обект Ñ Ð´Ð°Ð½Ð½Ð¸ е твърде голÑм.";Strings.OfficeOM.L_EventRegistrationError="Грешка при региÑтриране на Ñъбитие";Strings.OfficeOM.L_SaveSettingsError="Грешка в наÑтройките за запиÑване";Strings.OfficeOM.L_InvalidResourceUrl="ПредоÑтавен е невалиден URL Ð°Ð´Ñ€ÐµÑ Ð½Ð° реÑÑƒÑ€Ñ Ð½Ð° приложение.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="СеÑиÑта ви на Office Online е Ñ Ð¸Ð·Ñ‚ÐµÐºÑŠÐ» Ñрок или е невалидна. За да продължите, обновете Ñтраницата.";Strings.OfficeOM.L_InvalidBindingOperation="Ðевалидна Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð·Ð° обвързване";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Зададените ÑтойноÑти за rowCount или columnCount Ñа невалидни.";Strings.OfficeOM.L_InvalidSelectionForBindingType="Ðе може да Ñе Ñъздаде обвързване Ñ Ñ‚ÐµÐºÑƒÑ‰Ð°Ñ‚Ð° ÑÐµÐ»ÐµÐºÑ†Ð¸Ñ Ð¸ ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ñ‚Ð¸Ð¿ обвързване.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Проблем в мрежата попречи на извличането на файла.";Strings.OfficeOM.L_FormattingReminder="ÐапомнÑне за форматиране";Strings.OfficeOM.L_HostError="Грешка на хоÑта";Strings.OfficeOM.L_PropertyDoesNotExist='СвойÑтвото "{0}" не ÑъщеÑтвува в обекта.';Strings.OfficeOM.L_FormatValueOutOfRange="СтойноÑтта е извън Ð¿Ð¾Ð·Ð²Ð¾Ð»ÐµÐ½Ð¸Ñ Ð´Ð¸Ð°Ð¿Ð°Ð·Ð¾Ð½.";Strings.OfficeOM.L_ElementMissing="Ðе можем да форматираме клетката на таблицата, тъй като нÑкои ÑтойноÑти на параметри липÑват. Проверете отново параметрите и опитайте отново.";Strings.OfficeOM.L_InternalErrorDescription="Възникна вътрешна грешка.";Strings.OfficeOM.L_DataReadError="Грешка при четене на данни";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="ÐžÐ³Ñ€Ð°Ð½Ð¸Ñ‡ÐµÐ½Ð¸Ñ Ð½Ð° браузъра ни попречиха да Ñъздадем Ð´Ð¸Ð°Ð»Ð¾Ð³Ð¾Ð²Ð¸Ñ Ð¿Ñ€Ð¾Ð·Ð¾Ñ€ÐµÑ†. Домейнът на Ð´Ð¸Ð°Ð»Ð¾Ð³Ð¾Ð²Ð¸Ñ Ð¿Ñ€Ð¾Ð·Ð¾Ñ€ÐµÑ† и домейнът на хоÑта на добавката не Ñа в една и Ñъща зона на защита.";Strings.OfficeOM.L_NewWindowCrossZone='ÐаÑтройките за защита на Ð²Ð°ÑˆÐ¸Ñ Ð±Ñ€Ð°ÑƒÐ·ÑŠÑ€ ни пречат да Ñъздадем диалогов прозорец. Опитайте Ñ Ð´Ñ€ÑƒÐ³ браузър или {0}, така че "{1}" и домейнът, показан в адреÑната лента, да Ñа в една и Ñъща зона на защита.';Strings.OfficeOM.L_InvalidCoercion="Ðевалидно преобразуване на тип";Strings.OfficeOM.L_DisplayDialogError="Показване на грешката в Ð´Ð¸Ð°Ð»Ð¾Ð³Ð¾Ð²Ð¸Ñ Ð¿Ñ€Ð¾Ð·Ð¾Ñ€ÐµÑ†";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Извикайте closeAsync за Ñ‚ÐµÐºÑƒÑ‰Ð¸Ñ Ñ„Ð°Ð¹Ð», преди да извлечете друг.";Strings.OfficeOM.L_InvalidApiCallInContext="Ðевалидно извикване на API в Ñ‚ÐµÐºÑƒÑ‰Ð¸Ñ ÐºÐ¾Ð½Ñ‚ÐµÐºÑÑ‚.";Strings.OfficeOM.L_ConnectionFailureWithStatus="ИÑкането е неуÑпешно Ñ ÐºÐ¾Ð´ на ÑÑŠÑтоÑнието {0}.";Strings.OfficeOM.L_InvalidResourceUrlMessage="Ðевалиден URL Ð°Ð´Ñ€ÐµÑ Ð½Ð° реÑÑƒÑ€Ñ Ðµ зададен в манифеÑта.";Strings.OfficeOM.L_InvalidGetColumns="ПоÑочените колони Ñа невалидни.";Strings.OfficeOM.L_SSOClientError="Възникна грешка в иÑкането за удоÑтоверÑване от Office.";Strings.OfficeOM.L_DataStale="Данните не Ñа актуални";Strings.OfficeOM.L_APINotSupported="API не Ñе поддържа";Strings.OfficeOM.L_UnknownBindingType="Типът на обвързването не Ñе поддържа.";Strings.OfficeOM.L_InvalidArgument='Ðргументът "{0}" не работи за този Ñлучай, липÑва или не е в Ð¿Ñ€Ð°Ð²Ð¸Ð»Ð½Ð¸Ñ Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚.';Strings.OfficeOM.L_InvalidArgumentGeneric="Ðргументите, подадени на функциÑта, не вършат работа в тази ÑитуациÑ, липÑват или не Ñа в Ð¿Ñ€Ð°Ð²Ð¸Ð»Ð½Ð¸Ñ Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚.";Strings.OfficeOM.L_CustomFunctionNameCannotSplit="Името на функциÑта Ñ‚Ñ€Ñбва да Ñъдържа непразно проÑтранÑтво на имената и непразно кратко име.";Strings.OfficeOM.L_DataNotMatchSelection="ПредоÑтавениÑÑ‚ обект Ñ Ð´Ð°Ð½Ð½Ð¸ не е ÑъвмеÑтим Ñ Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚Ð° или размерноÑтите на текущата ÑелекциÑ.";Strings.OfficeOM.L_CannotRegisterEvent="Манипулаторът на Ñъбитие не може да бъде региÑтриран.";Strings.OfficeOM.L_MemoryLimit="Превишено е ограничението за паметта";Strings.OfficeOM.L_CustomXmlError="Грешка в потребителÑÐºÐ¸Ñ XML.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="ДоÑтигнат е макÑималниÑÑ‚ брой Ñелекции";Strings.OfficeOM.L_SetDataParametersConflict="ПоÑочените параметри Ñа в конфликт.";Strings.OfficeOM.L_ColIndexOutOfRange="СтойноÑтта на индекÑа на колоната е извън допуÑÑ‚Ð¸Ð¼Ð¸Ñ Ð´Ð¸Ð°Ð¿Ð°Ð·Ð¾Ð½. Използвайте ÑтойноÑÑ‚ (0 или по-виÑока), коÑто е по-малка от Ð±Ñ€Ð¾Ñ Ð½Ð° колоните.";Strings.OfficeOM.L_DialogInvalidScheme="Схемата на URL адреÑа не Ñе поддържа. ВмеÑто това използвайте HTTPS.";Strings.OfficeOM.L_UserNotSignedIn="Ðито един потребител не е влÑзъл в Office.";Strings.OfficeOM.L_ShuttingDown="ОперациÑта беше неуÑпешна, защото данните в Ñървъра не Ñа актуални.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="ЗададениÑÑ‚ тип преобразуване не е ÑъвмеÑтим Ñ Ñ‚Ð¾Ð·Ð¸ тип обвързване.";Strings.OfficeOM.L_CannotWriteToSelection="Ðе може да Ñе запише в текущата ÑелекциÑ.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Избраното Ñъдържание Ñ‚Ñ€Ñбва да е в табличен формат. Форматирайте данните като таблица и опитайте отново.";Strings.OfficeOM.L_InvalidSetColumns="ПоÑочените колони Ñа невалидни.";Strings.OfficeOM.L_InvalidFormat="Грешка, причинена от невалиден формат";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage="ОперациÑта е неуÑпешна, защото тази добавка не поддръжка потребителÑко ÑъглаÑие в тази категориÑ";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Забележка: Ðаборите за форматиране, зададени от повикване на форматирането на API, Ñе предполага да бъдат под 100.";Strings.OfficeOM.L_DataNotMatchCoercionType="Типът на ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ð¾Ð±ÐµÐºÑ‚ Ñ Ð´Ð°Ð½Ð½Ð¸ не е ÑъвмеÑтим Ñ Ñ‚ÐµÐºÑƒÑ‰Ð°Ñ‚Ð° ÑелекциÑ.";Strings.OfficeOM.L_MultipleNamedItemFound="Ðамерени Ñа множеÑтво обекти Ñ ÐµÐ´Ð½Ð¾ и Ñъщо име.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="Това номериране не Ñе поддържа в текущото приложение хоÑÑ‚.";Strings.OfficeOM.L_TooManyIncompleteRequests="Изчакайте, докато завърши предишното повикване.";Strings.OfficeOM.L_InvalidDataObject="Ðевалиден обект Ñ Ð´Ð°Ð½Ð½Ð¸";Strings.OfficeOM.L_InvalidTableOptionValue="Един или повече от параметрите на tableOptions имат ÑтойноÑти, които не Ñа позволени. Проверете ÑтойноÑтите и опитайте отново.";Strings.OfficeOM.L_Timeout="Времето за изчакване на операциÑта изтече.";Strings.OfficeOM.L_InvalidSetRows="ПоÑочените редове Ñа невалидни.";Strings.OfficeOM.L_UnsupportedEnumeration="Ðеподдържано номериране";Strings.OfficeOM.L_APICallFailed="ÐеуÑпешно извикване на API";Strings.OfficeOM.L_InvalidGetStartRowColumn="Зададените ÑтойноÑти за startRow или startColumn Ñа невалидни.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Данните не Ñа актуални";Strings.OfficeOM.L_TooManyOptionalObjects="нÑколко опционални обекта в ÑпиÑъка Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¸" \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/bg-bg/outlook_strings.debug.js b/node_modules/@microsoft/office-js/dist/bg-bg/outlook_strings.debug.js index 3d665cd..89205bc 100644 --- a/node_modules/@microsoft/office-js/dist/bg-bg/outlook_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/bg-bg/outlook_strings.debug.js @@ -1,34 +1,35 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("_u"); _u.ExtensibilityStrings = function() { }; _u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings"); -_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Грешка при Ð·Ð°Ð¿Ð¸Ñ Ð½Ð° данни"; -_u.ExtensibilityStrings.l_InvalidEventDates_Text = "Крайната дата е преди началната дата."; _u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "ИД на Ð¿Ñ€Ð¸ÐºÐ°Ñ‡ÐµÐ½Ð¸Ñ Ñ„Ð°Ð¹Ð» е невалиден."; -_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "ÐеуÑпешно редактиране на HTML."; +_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "ПрикачениÑÑ‚ файл не може да бъде изтрит, защото не може да бъде открит прикачен файл Ñ Ð¸Ð½Ð´ÐµÐºÑа на Ð¿Ñ€Ð¸ÐºÐ°Ñ‡ÐµÐ½Ð¸Ñ Ñ„Ð°Ð¹Ð»."; +_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "ИзиÑква Ñе разрешение на админиÑтратор за доÑтъп до защитени членове на JavaScript API за Office."; +_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Грешка Ñ Ð¿Ñ€Ð¸ÐºÐ°Ñ‡ÐµÐ½Ð¸ файлове"; +_u.ExtensibilityStrings.l_InvalidEndTime_Text = "КрайниÑÑ‚ Ñ‡Ð°Ñ Ð½Ðµ може да бъде преди Ð½Ð°Ñ‡Ð°Ð»Ð½Ð¸Ñ Ñ‡Ð°Ñ."; +_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Едно или повече от предоÑтавените показвани имена Ñа твърде дълги."; +_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "ИÑкането надвишава ограничението за макÑимален размер от 1 МБ. Променете вашето EWS иÑкане."; +_u.ExtensibilityStrings.l_InvalidDate_Text = "Въведеното не е валидна дата."; +_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Грешка при Ð·Ð°Ð¿Ð¸Ñ Ð½Ð° данни"; _u.ExtensibilityStrings.l_OffsetNotfound_Text = "Ðе можа да Ñе намери измеÑтване за това клеймо."; +_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "ОбщиÑÑ‚ брой получатели в полето не може да надвишава {0}."; +_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "ПрикачениÑÑ‚ файл не може да бъде изтрит от елемента."; _u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Един или повече от предоÑтавените имейли Ñа твърде дълги."; -_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "ПрикачениÑÑ‚ файл не може да бъде добавен, защото е прекалено голÑм."; _u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = 'ИзиÑква Ñе разрешение на админиÑтратор за извикване на метода: "{0}".'; -_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "ПрикачениÑÑ‚ файл не може да бъде добавен към елемента."; -_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Прикачените файлове не могат да Ñе добавÑÑ‚, тъй като Ñъобщението вече има макÑÐ¸Ð¼Ð°Ð»Ð½Ð¸Ñ Ð±Ñ€Ð¾Ð¹ прикачени файлове"; -_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "ПрикачениÑÑ‚ файл не може да бъде изтрит от елемента."; +_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "ПотребителÑÑ‚ промени позициÑта на курÑора по време на вмъкването на данните."; _u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Дадените параметри не отговарÑÑ‚ на Ð¾Ñ‡Ð°ÐºÐ²Ð°Ð½Ð¸Ñ Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚."; +_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "ПътÑÑ‚ на Ð¿Ñ€Ð¸ÐºÐ°Ñ‡ÐµÐ½Ð¸Ñ Ñ„Ð°Ð¹Ð» е невалиден."; +_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "ПрикачениÑÑ‚ файл не може да бъде добавен към елемента."; _u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "ИзбраниÑÑ‚ елемент е променен."; _u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Едно или повече от предоÑтавените показвани имена Ñа твърде дълги."; -_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "ИÑкането надвишава ограничението за макÑимален размер от 1 МБ. Променете вашето EWS иÑкане."; -_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "ПрикачениÑÑ‚ файл не може да бъде изтрит, защото не може да бъде открит прикачен файл Ñ Ð¸Ð½Ð´ÐµÐºÑа на Ð¿Ñ€Ð¸ÐºÐ°Ñ‡ÐµÐ½Ð¸Ñ Ñ„Ð°Ð¹Ð»."; +_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Прикачените файлове не могат да Ñе добавÑÑ‚, тъй като Ñъобщението вече има макÑÐ¸Ð¼Ð°Ð»Ð½Ð¸Ñ Ð±Ñ€Ð¾Ð¹ прикачени файлове"; _u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "ПотребителÑÑ‚ премахна Ð¿Ñ€Ð¸ÐºÐ°Ñ‡ÐµÐ½Ð¸Ñ Ñ„Ð°Ð¹Ð», преди да завърши качването."; -_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "ПътÑÑ‚ на Ð¿Ñ€Ð¸ÐºÐ°Ñ‡ÐµÐ½Ð¸Ñ Ñ„Ð°Ð¹Ð» е невалиден."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "ИзиÑква Ñе разрешение на админиÑтратор за доÑтъп до защитени членове на JavaScript API за Office."; -_u.ExtensibilityStrings.l_InvalidDate_Text = "Въведеното не е валидна дата."; -_u.ExtensibilityStrings.l_InvalidEndTime_Text = "КрайниÑÑ‚ Ñ‡Ð°Ñ Ð½Ðµ може да бъде преди Ð½Ð°Ñ‡Ð°Ð»Ð½Ð¸Ñ Ñ‡Ð°Ñ."; -_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "ПотребителÑÑ‚ промени позициÑта на курÑора по време на вмъкването на данните."; -_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Грешка Ñ Ð¿Ñ€Ð¸ÐºÐ°Ñ‡ÐµÐ½Ð¸ файлове"; -_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Едно или повече от предоÑтавените показвани имена Ñа твърде дълги."; +_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "ÐеуÑпешно редактиране на HTML."; +_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "ПрикачениÑÑ‚ файл не може да бъде добавен, защото е прекалено голÑм."; +_u.ExtensibilityStrings.l_InvalidEventDates_Text = "Крайната дата е преди началната дата."; _u.ExtensibilityStrings.l_InternalProtocolError_Text = 'Вътрешна грешка в протокола: "{0}".'; -_u.ExtensibilityStrings.l_InternalFormatError_Text = "Възникна вътрешна грешка при форматиране."; _u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Прикачените файлове не могат да Ñе добавÑÑ‚, докато пълниÑÑ‚ отговор или препращане Ñе извлича от Ñървъра."; -_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "ОбщиÑÑ‚ брой получатели в полето не може да надвишава {0}." +_u.ExtensibilityStrings.l_InternalFormatError_Text = "Възникна вътрешна грешка при форматиране." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/bg-bg/outlook_strings.js b/node_modules/@microsoft/office-js/dist/bg-bg/outlook_strings.js index a9aec19..d5ce730 100644 --- a/node_modules/@microsoft/office-js/dist/bg-bg/outlook_strings.js +++ b/node_modules/@microsoft/office-js/dist/bg-bg/outlook_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Грешка при Ð·Ð°Ð¿Ð¸Ñ Ð½Ð° данни";_u.ExtensibilityStrings.l_InvalidEventDates_Text="Крайната дата е преди началната дата.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="ИД на Ð¿Ñ€Ð¸ÐºÐ°Ñ‡ÐµÐ½Ð¸Ñ Ñ„Ð°Ð¹Ð» е невалиден.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="ÐеуÑпешно редактиране на HTML.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Ðе можа да Ñе намери измеÑтване за това клеймо.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Един или повече от предоÑтавените имейли Ñа твърде дълги.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="ПрикачениÑÑ‚ файл не може да бъде добавен, защото е прекалено голÑм.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text='ИзиÑква Ñе разрешение на админиÑтратор за извикване на метода: "{0}".';_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="ПрикачениÑÑ‚ файл не може да бъде добавен към елемента.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Прикачените файлове не могат да Ñе добавÑÑ‚, тъй като Ñъобщението вече има макÑÐ¸Ð¼Ð°Ð»Ð½Ð¸Ñ Ð±Ñ€Ð¾Ð¹ прикачени файлове";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="ПрикачениÑÑ‚ файл не може да бъде изтрит от елемента.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Дадените параметри не отговарÑÑ‚ на Ð¾Ñ‡Ð°ÐºÐ²Ð°Ð½Ð¸Ñ Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="ИзбраниÑÑ‚ елемент е променен.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Едно или повече от предоÑтавените показвани имена Ñа твърде дълги.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="ИÑкането надвишава ограничението за макÑимален размер от 1 МБ. Променете вашето EWS иÑкане.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="ПрикачениÑÑ‚ файл не може да бъде изтрит, защото не може да бъде открит прикачен файл Ñ Ð¸Ð½Ð´ÐµÐºÑа на Ð¿Ñ€Ð¸ÐºÐ°Ñ‡ÐµÐ½Ð¸Ñ Ñ„Ð°Ð¹Ð».";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="ПотребителÑÑ‚ премахна Ð¿Ñ€Ð¸ÐºÐ°Ñ‡ÐµÐ½Ð¸Ñ Ñ„Ð°Ð¹Ð», преди да завърши качването.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="ПътÑÑ‚ на Ð¿Ñ€Ð¸ÐºÐ°Ñ‡ÐµÐ½Ð¸Ñ Ñ„Ð°Ð¹Ð» е невалиден.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="ИзиÑква Ñе разрешение на админиÑтратор за доÑтъп до защитени членове на JavaScript API за Office.";_u.ExtensibilityStrings.l_InvalidDate_Text="Въведеното не е валидна дата.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="КрайниÑÑ‚ Ñ‡Ð°Ñ Ð½Ðµ може да бъде преди Ð½Ð°Ñ‡Ð°Ð»Ð½Ð¸Ñ Ñ‡Ð°Ñ.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="ПотребителÑÑ‚ промени позициÑта на курÑора по време на вмъкването на данните.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Грешка Ñ Ð¿Ñ€Ð¸ÐºÐ°Ñ‡ÐµÐ½Ð¸ файлове";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Едно или повече от предоÑтавените показвани имена Ñа твърде дълги.";_u.ExtensibilityStrings.l_InternalProtocolError_Text='Вътрешна грешка в протокола: "{0}".';_u.ExtensibilityStrings.l_InternalFormatError_Text="Възникна вътрешна грешка при форматиране.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Прикачените файлове не могат да Ñе добавÑÑ‚, докато пълниÑÑ‚ отговор или препращане Ñе извлича от Ñървъра.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="ОбщиÑÑ‚ брой получатели в полето не може да надвишава {0}." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="ИД на Ð¿Ñ€Ð¸ÐºÐ°Ñ‡ÐµÐ½Ð¸Ñ Ñ„Ð°Ð¹Ð» е невалиден.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="ПрикачениÑÑ‚ файл не може да бъде изтрит, защото не може да бъде открит прикачен файл Ñ Ð¸Ð½Ð´ÐµÐºÑа на Ð¿Ñ€Ð¸ÐºÐ°Ñ‡ÐµÐ½Ð¸Ñ Ñ„Ð°Ð¹Ð».";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="ИзиÑква Ñе разрешение на админиÑтратор за доÑтъп до защитени членове на JavaScript API за Office.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Грешка Ñ Ð¿Ñ€Ð¸ÐºÐ°Ñ‡ÐµÐ½Ð¸ файлове";_u.ExtensibilityStrings.l_InvalidEndTime_Text="КрайниÑÑ‚ Ñ‡Ð°Ñ Ð½Ðµ може да бъде преди Ð½Ð°Ñ‡Ð°Ð»Ð½Ð¸Ñ Ñ‡Ð°Ñ.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Едно или повече от предоÑтавените показвани имена Ñа твърде дълги.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="ИÑкането надвишава ограничението за макÑимален размер от 1 МБ. Променете вашето EWS иÑкане.";_u.ExtensibilityStrings.l_InvalidDate_Text="Въведеното не е валидна дата.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Грешка при Ð·Ð°Ð¿Ð¸Ñ Ð½Ð° данни";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Ðе можа да Ñе намери измеÑтване за това клеймо.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="ОбщиÑÑ‚ брой получатели в полето не може да надвишава {0}.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="ПрикачениÑÑ‚ файл не може да бъде изтрит от елемента.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Един или повече от предоÑтавените имейли Ñа твърде дълги.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text='ИзиÑква Ñе разрешение на админиÑтратор за извикване на метода: "{0}".';_u.ExtensibilityStrings.l_CursorPositionChanged_Text="ПотребителÑÑ‚ промени позициÑта на курÑора по време на вмъкването на данните.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Дадените параметри не отговарÑÑ‚ на Ð¾Ñ‡Ð°ÐºÐ²Ð°Ð½Ð¸Ñ Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="ПътÑÑ‚ на Ð¿Ñ€Ð¸ÐºÐ°Ñ‡ÐµÐ½Ð¸Ñ Ñ„Ð°Ð¹Ð» е невалиден.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="ПрикачениÑÑ‚ файл не може да бъде добавен към елемента.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="ИзбраниÑÑ‚ елемент е променен.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Едно или повече от предоÑтавените показвани имена Ñа твърде дълги.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Прикачените файлове не могат да Ñе добавÑÑ‚, тъй като Ñъобщението вече има макÑÐ¸Ð¼Ð°Ð»Ð½Ð¸Ñ Ð±Ñ€Ð¾Ð¹ прикачени файлове";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="ПотребителÑÑ‚ премахна Ð¿Ñ€Ð¸ÐºÐ°Ñ‡ÐµÐ½Ð¸Ñ Ñ„Ð°Ð¹Ð», преди да завърши качването.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="ÐеуÑпешно редактиране на HTML.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="ПрикачениÑÑ‚ файл не може да бъде добавен, защото е прекалено голÑм.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="Крайната дата е преди началната дата.";_u.ExtensibilityStrings.l_InternalProtocolError_Text='Вътрешна грешка в протокола: "{0}".';_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Прикачените файлове не могат да Ñе добавÑÑ‚, докато пълниÑÑ‚ отговор или препращане Ñе извлича от Ñървъра.";_u.ExtensibilityStrings.l_InternalFormatError_Text="Възникна вътрешна грешка при форматиране." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/ca-es/office_strings.debug.js b/node_modules/@microsoft/office-js/dist/ca-es/office_strings.debug.js index b10caf5..c7872c0 100644 --- a/node_modules/@microsoft/office-js/dist/ca-es/office_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/ca-es/office_strings.debug.js @@ -1,179 +1,190 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("Strings"); Strings.OfficeOM = function() { }; Strings.OfficeOM.registerClass("Strings.OfficeOM"); -Strings.OfficeOM.L_SettingsStaleError = "Error de configuració obsoleta"; -Strings.OfficeOM.L_InvalidBinding = "Vinculació no vàlida"; -Strings.OfficeOM.L_InvalidParameters = "La funció {0} té paràmetres no vàlids."; -Strings.OfficeOM.L_DataWriteError = "Error d'escriptura de dades"; +Strings.OfficeOM.L_DataNotMatchBindingSize = "L'objecte de dades subministrat no coincideix amb la mida de la selecció actual."; +Strings.OfficeOM.L_RowIndexOutOfRange = "El valor de l'índex de files està fora de l'interval permès. Feu servir un valor (0 o superior) que sigui inferior al nombre de files."; +Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Els valors rowCount o columnCount especificats no són vàlids."; +Strings.OfficeOM.L_MissingParameter = "Falta un paràmetre"; +Strings.OfficeOM.L_InvalidNode = "Node no vàlid"; +Strings.OfficeOM.L_InvalidApiCallInContext = "Crida d'API no vàlida en el context actual."; +Strings.OfficeOM.L_TooManyOptionalObjects = "múltiples objectes opcionals a la llista de paràmetres"; +Strings.OfficeOM.L_TooManyOptionalFunction = "múltiples funcions opcionals a la llista de paràmetres"; +Strings.OfficeOM.L_SaveSettingsError = "Error de configuració de desar"; +Strings.OfficeOM.L_DataNotMatchSelection = "L'objecte de dades subministrat no és compatible amb la forma o les dimensions de la selecció actual."; +Strings.OfficeOM.L_CustomXmlOutOfDateName = "Les dades no són actuals"; +Strings.OfficeOM.L_NotImplemented = "La funció {0} no està implementada."; +Strings.OfficeOM.L_Timeout = "S'ha esgotat el temps d'espera de l'operació."; +Strings.OfficeOM.L_OperationNotSupported = "Aquesta operació no és permesa."; +Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Els arguments d'entrada no són vàlids."; +Strings.OfficeOM.L_InValidOptionalArgument = "argument opcional no vàlid"; +Strings.OfficeOM.L_ActivityLimitReached = "S'ha assolit el límit d'activitat."; +Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "La vostra sessió de l'Office Online ha caducat o bé no és vàlida. Actualitzeu la pàgina per continuar."; +Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "El tipus de coerció especificat no és compatible amb aquest tipus de vinculació."; +Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "El contingut seleccionat ha d'estar en format de taula. Canvieu el format de les dades a taula i torneu-ho a provar."; +Strings.OfficeOM.L_CustomFunctionNameContainsBadChars = "El nom de la funció només pot contenir lletres, dígits, guions baixos i punts."; +Strings.OfficeOM.L_NewWindowCrossZone = 'La configuració de seguretat del vostre navegador no ens permet crear un quadre de diàleg. Proveu-ho amb un altre navegador o bé {0}, de manera que "{1}" i el domini que es mostra a la vostra barra d\'adreces siguin a la mateixa zona de seguretat.'; +Strings.OfficeOM.L_GetDataParametersConflict = "Els paràmetres especificats estan en conflicte."; Strings.OfficeOM.L_InvalidArgument = "L'argument \"{0}\" no s'admet en aquesta situació, falta o bé té un format incorrecte."; +Strings.OfficeOM.L_InvalidSSOAddinMessage = "L'API d'identitat no és compatible amb aquest complement."; Strings.OfficeOM.L_BindingCreationError = "Error de creació de vinculació"; -Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Les dades no estan actualitzades. Torneu a recuperar l'objecte."; -Strings.OfficeOM.L_SettingsCannotSave = "No s'ha pogut desar la configuració."; -Strings.OfficeOM.L_InternalError = "Error intern"; Strings.OfficeOM.L_NotSupported = "No s'admet la funció {0}."; -Strings.OfficeOM.L_ReadSettingsError = "Error de configuració de lectura"; -Strings.OfficeOM.L_FormatValueOutOfRange = "El valor està fora de l'interval permès."; -Strings.OfficeOM.L_Timeout = "S'ha esgotat el temps d'espera de l'operació."; +Strings.OfficeOM.L_FormattingReminder = "Recordatori de format"; +Strings.OfficeOM.L_PermissionDenied = "Permís denegat"; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory = "Aquest complement no admet el consentiment de l'usuari."; Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Els paràmetres de coordenades no es poden fer servir amb el tipus de coerció Taula quan aquesta conté cel·les combinades."; -Strings.OfficeOM.L_OperationNotSupported = "Aquesta operació no és permesa."; -Strings.OfficeOM.L_DataNotMatchBindingSize = "L'objecte de dades subministrat no coincideix amb la mida de la selecció actual."; -Strings.OfficeOM.L_RunMustReturnPromise = 'La funció per lots passada al mètode ".run" no ha retornat cap promesa. Normalment, la funció ha de retornar una promesa, de manera que qualsevol objecte rastrejat automàticament es pot alliberar quan es completa el lot. Es pot retornar una promesa retornant la resposta de "context.sync()".'; +Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Les dades no estan actualitzades. Torneu a recuperar l'objecte."; +Strings.OfficeOM.L_SSOConnectionLostError = "A connection was lost during the sign in process."; +Strings.OfficeOM.L_BrowserAPINotSupported = "Aquest navegador no admet l'API sol·licitada."; +Strings.OfficeOM.L_CannotNavigateTo = "L'objecte es troba situat a un lloc on no s'admet la navegació."; +Strings.OfficeOM.L_DataWriteReminder = "Recordatori d'escriptura de dades"; Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Nota: se suggereix que hi hagi menys de 100 conjunts de formats definits per una crida a una API de format."; -Strings.OfficeOM.L_CustomXmlError = "Error d'XML personalitzat."; -Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Els paràmetres de coordenades no es poden fer servir amb el tipus de coerció Taula quan aquesta conté cel·les combinades."; -Strings.OfficeOM.L_InvalidGrant = "Falta una autorització prèvia."; -Strings.OfficeOM.L_SettingNameNotExist = "El nom del paràmetre especificat no existeix."; -Strings.OfficeOM.L_UnsupportedEnumeration = "Enumeració no admesa"; Strings.OfficeOM.L_MissingRequiredArguments = "falten alguns arguments obligatoris"; -Strings.OfficeOM.L_FunctionCallFailed = "Error de crida de la funció {0}, codi d'error: {1}."; -Strings.OfficeOM.L_InvalidBindingError = "Error de vinculació no vàlida"; Strings.OfficeOM.L_SpecifiedIdNotExist = "L'identificador especificat no existeix."; -Strings.OfficeOM.L_SSOServerErrorMessage = "S'ha produït un error inesperat al servidor."; +Strings.OfficeOM.L_SliceSizeNotSupported = "No s'admet la mida del sector especificat."; Strings.OfficeOM.L_DialogOK = "D'acord"; -Strings.OfficeOM.L_ColIndexOutOfRange = "El valor de l'índex de columnes està fora de l'interval permès. Feu servir un valor (0 o superior) inferior al nombre de columnes."; -Strings.OfficeOM.L_FormattingReminder = "Recordatori de format"; -Strings.OfficeOM.L_SelectionCannotBound = "No es pot vincular amb la selecció actual."; -Strings.OfficeOM.L_InvalidAPICall = "Crida d'API no vàlida"; -Strings.OfficeOM.L_BindingToMultipleSelection = "No s'admeten les seleccions no contigües."; -Strings.OfficeOM.L_PropertyNotLoaded = 'La propietat "{0}" no està disponible. Abans de llegir el valor de la propietat, crideu el mètode de càrrega de l\'objecte contenidor i crideu "context.sync()" al context de sol·licitud associat.'; -Strings.OfficeOM.L_CannotWriteToSelection = "No es pot escriure a la selecció actual."; -Strings.OfficeOM.L_TooManyArguments = "massa arguments"; -Strings.OfficeOM.L_GetDataIsTooLarge = "El conjunt de dades sol·licitat és massa gran."; -Strings.OfficeOM.L_DialogInvalidScheme = "L'esquema de l'adreça URL no és compatible. Utilitzeu el protocol HTTPS."; +Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "S'està provant d'establir la propietat de només lectura \"{0}\"."; Strings.OfficeOM.L_DialogAddressNotTrusted = "El domini de l'adreça URL no s'inclou a l'element AppDomains del manifest."; -Strings.OfficeOM.L_FileTypeNotSupported = "El tipus de fitxer especificat no s'admet."; -Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "L'aplicació {0} no existeix. Microsoft.Office.WebExtension.initialize(reason) no s'ha cridat."; -Strings.OfficeOM.L_DataWriteReminder = "Recordatori d'escriptura de dades"; -Strings.OfficeOM.L_InvalidGetRows = "Les files especificades no són vàlides."; -Strings.OfficeOM.L_EventRegistrationError = "Error de registre d'incidència"; -Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "El tipus d'identitat de l'usuari no s'admet."; -Strings.OfficeOM.L_UserClickIgnore = "L'usuari ha decidit ignorar el quadre de diàleg."; +Strings.OfficeOM.L_ShuttingDown = "L'operació ha fallat perquè actualment les dades no estan al servidor."; +Strings.OfficeOM.L_EventHandlerAdditionFailed = "No s'ha pogut afegir el controlador d'incidències."; +Strings.OfficeOM.L_InvalidCellsValue = "Hi ha un o més paràmetres de cel·les amb valors no permesos. Comproveu-los i torneu-ho a provar."; +Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Un problema de xarxa ha impedit la recuperació del fitxer."; +Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Permet"; Strings.OfficeOM.L_PropertyDoesNotExist = 'La propietat "{0}" no existeix a l\'objecte.'; -Strings.OfficeOM.L_CoercionTypeNotSupported = "El tipus de coerció especificat no s'admet."; -Strings.OfficeOM.L_ElementMissing = "No hem pogut formatar la cel·la de la taula perquè falten alguns valors dels paràmetres. Comproveu-los i torneu-ho a provar."; -Strings.OfficeOM.L_InvalidNamedItemForBindingType = "El tipus de vinculació especificat no és compatible amb l'element amb nom subministrat."; -Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Aquest tipus de vinculació no admet aquesta operació."; -Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "S'està provant d'establir la propietat de només lectura \"{0}\"."; -Strings.OfficeOM.L_APICallFailed = "Ha fallat la trucada de l'API"; -Strings.OfficeOM.L_TooManyOptionalObjects = "múltiples objectes opcionals a la llista de paràmetres"; +Strings.OfficeOM.L_SSOServerErrorMessage = "S'ha produït un error inesperat al servidor."; +Strings.OfficeOM.L_SSOServerError = "S'ha produït un error al proveïdor d'autenticació."; +Strings.OfficeOM.L_InvalidDataObject = "Objecte de dades no vàlid"; +Strings.OfficeOM.L_InvalidTableOptionValue = "Hi ha un o més paràmetres de la taula Opcions que tenen valors no permesos. Comproveu-los i torneu-ho a provar."; +Strings.OfficeOM.L_MemoryLimit = "S'ha superat el límit de memòria"; +Strings.OfficeOM.L_SSOClientErrorMessage = "S'ha produït un error inesperat al client."; +Strings.OfficeOM.L_ApiNotFoundDetails = "El mètode o propietat {0} forma part del conjunt de requisits {1}, que no està disponible a la vostra versió de l'aplicació {2}."; +Strings.OfficeOM.L_OverwriteWorksheetData = "L'operació designada ha fallat perquè l'objecte de dades subministrat sobreescriurà o canviarà dades."; +Strings.OfficeOM.L_NetworkProblem = "Problema de xarxa"; +Strings.OfficeOM.L_ColIndexOutOfRange = "El valor de l'índex de columnes està fora de l'interval permès. Feu servir un valor (0 o superior) inferior al nombre de columnes."; +Strings.OfficeOM.L_EventHandlerNotExist = "No s'ha trobat el controlador d'incidències per a aquesta vinculació."; +Strings.OfficeOM.L_InvalidColumnsForBinding = "Les columnes especificades no són vàlides."; +Strings.OfficeOM.L_NoCapability = "No teniu els permisos suficients per a aquesta acció."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "L'operació ha fallat perquè aquest complement ja està demanant un testimoni d'accés."; +Strings.OfficeOM.L_DataNotMatchCoercionType = "El tipus de l'objecte de dades especificat no és compatible amb la selecció actual."; +Strings.OfficeOM.L_InvalidArgumentGeneric = "Els arguments que s'han passat a la funció no funcionen per a aquesta situació, no hi són o no tenen el format correcte."; +Strings.OfficeOM.L_InvalidReadForBlankRow = "La fila especificada és buida."; +Strings.OfficeOM.L_CustomFunctionDefinitionMissing = "Una propietat amb aquest nom que representa la definició de la funció ha d'existir a Excel.CustomFunctions."; Strings.OfficeOM.L_InvalidGetColumns = "Les columnes especificades no són vàlides."; -Strings.OfficeOM.L_ValueNotLoaded = "El valor de l'objecte resultant encara no s'ha calculat. Abans de llegir la propietat del valor, feu una crida a \"context.sync()\" al context de sol·licitud associat."; -Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "La vostra sessió de l'Office Online ha caducat o bé no és vàlida. Actualitzeu la pàgina per continuar."; -Strings.OfficeOM.L_NotSupportedBindingType = "El tipus de vinculació {0} especificat no s'admet."; -Strings.OfficeOM.L_UnknownBindingType = "Aquest tipus de vinculació no s'admet."; -Strings.OfficeOM.L_DataNotMatchSelection = "L'objecte de dades subministrat no és compatible amb la forma o les dimensions de la selecció actual."; -Strings.OfficeOM.L_RowIndexOutOfRange = "El valor de l'índex de files està fora de l'interval permès. Feu servir un valor (0 o superior) que sigui inferior al nombre de files."; +Strings.OfficeOM.L_InvalidParameters = "La funció {0} té paràmetres no vàlids."; +Strings.OfficeOM.L_CannotWriteToSelection = "No es pot escriure a la selecció actual."; +Strings.OfficeOM.L_InvalidAPICall = "Crida d'API no vàlida"; +Strings.OfficeOM.L_DataReadError = "Error de lectura de dades"; +Strings.OfficeOM.L_UserAbortedMessage = "L'usuari no ha acceptat els permisos del complement."; +Strings.OfficeOM.L_SetDataParametersConflict = "Els paràmetres especificats estan en conflicte."; +Strings.OfficeOM.L_InitializeNotReady = "Office.js encara no s'ha carregat completament. Torneu-ho a provar més tard o assegureu-vos d'afegir el vostre codi d'inicialització a la funció Office.initialize."; Strings.OfficeOM.L_InvalidSetStartRowColumn = "Els valors startRow o startColumn especificats no són vàlids."; -Strings.OfficeOM.L_NavOutOfBound = "L'operació ha fallat perquè l'índex està fora de l'interval."; -Strings.OfficeOM.L_InvalidCoercion = "Tipus de coerció no vàlid"; -Strings.OfficeOM.L_NotSupportedEventType = "El tipus d'incidència {0} especificat no s'admet."; -Strings.OfficeOM.L_InvalidFormat = "Error de format no vàlid"; -Strings.OfficeOM.L_InvalidResourceUrl = "Heu proporcionat una adreça URL de recurs d'aplicació que no és vàlida."; -Strings.OfficeOM.L_DocumentReadOnly = "L'operació sol·licitada no és permesa en el mode de document actual."; -Strings.OfficeOM.L_DataNotMatchCoercionType = "El tipus de l'objecte de dades especificat no és compatible amb la selecció actual."; -Strings.OfficeOM.L_ActivityLimitReached = "S'ha assolit el límit d'activitat."; -Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "El contingut seleccionat ha d'estar en format de taula. Canvieu el format de les dades a taula i torneu-ho a provar."; +Strings.OfficeOM.L_SSOConnectionLostErrorMessage = "A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones."; +Strings.OfficeOM.L_RunMustReturnPromise = 'La funció per lots passada al mètode ".run" no ha retornat cap promesa. Normalment, la funció ha de retornar una promesa, de manera que qualsevol objecte rastrejat automàticament es pot alliberar quan es completa el lot. Es pot retornar una promesa retornant la resposta de "context.sync()".'; +Strings.OfficeOM.L_SettingsStaleError = "Error de configuració obsoleta"; +Strings.OfficeOM.L_InvalidOperationInCellEditMode = "L'Excel té activat el mode d'edició de cel·les. Sortiu del mode d'edició prement la tecla Retorn o el Tabulador, o bé seleccionant una altra cel·la i, a continuació, torneu-ho a provar."; Strings.OfficeOM.L_CustomXmlExceedQuotaName = "S'ha assolit el límit de selecció."; -Strings.OfficeOM.L_CustomXmlNodeNotFound = "No s'ha trobat el node especificat."; -Strings.OfficeOM.L_BadSelectorString = "La cadena passada al selector no està ben formatada o no s'admet."; -Strings.OfficeOM.L_APINotSupported = "API no admesa"; -Strings.OfficeOM.L_DataStale = "Les dades no són actuals"; -Strings.OfficeOM.L_NamedItemNotFound = "L'element amb nom no existeix."; -Strings.OfficeOM.L_InvalidDataFormat = "El format de l'objecte de dades especificat no és vàlid."; -Strings.OfficeOM.L_UnsupportedEnumerationMessage = "L'aplicació amfitriona actual no admet l'enumeració."; -Strings.OfficeOM.L_NotImplemented = "La funció {0} no està implementada."; +Strings.OfficeOM.L_InvalidGrantMessage = "Falta una concessió per a aquest complement."; +Strings.OfficeOM.L_InvalidCoercion = "Tipus de coerció no vàlid"; +Strings.OfficeOM.L_GetSelectionNotSupported = "La selecció actual no s'admet."; +Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Truca closeAsync en el fitxer actual abans de recuperar un altre."; +Strings.OfficeOM.L_CustomFunctionNameCannotSplit = "El nom de la funció ha de contenir un espai de nom i un nom curt no buits."; +Strings.OfficeOM.L_InvalidSetRows = "Les files especificades no són vàlides."; +Strings.OfficeOM.L_InvalidGrant = "Falta una autorització prèvia."; +Strings.OfficeOM.L_InvalidNamedItemForBindingType = "El tipus de vinculació especificat no és compatible amb l'element amb nom subministrat."; Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "El complement ja està demanant un testimoni d'accés."; -Strings.OfficeOM.L_CannotRegisterEvent = "El controlador d'incidències no es pot registrar."; -Strings.OfficeOM.L_DataNotMatchBindingType = "L'objecte de dades especificat no és compatible amb el tipus de vinculació."; +Strings.OfficeOM.L_RequestTokenUnavailable = "S'ha limitat aquesta API per alentir la freqüència de les trucades."; +Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Aquest tipus de vinculació no admet aquesta operació."; +Strings.OfficeOM.L_CustomXmlError = "Error d'XML personalitzat."; +Strings.OfficeOM.L_OsfControlTypeNotSupported = "No s'admet el tipus OsfControl."; Strings.OfficeOM.L_InvalidBindingOperation = "Operació de vinculació no vàlida"; -Strings.OfficeOM.L_DialogAlreadyOpened = "Ha fallat l'operació perquè aquest complement ja té un diàleg actiu."; +Strings.OfficeOM.L_DataNotMatchBindingType = "L'objecte de dades especificat no és compatible amb el tipus de vinculació."; +Strings.OfficeOM.L_SettingsAreStale = "No s'ha pogut desar la configuració perquè no és actual."; +Strings.OfficeOM.L_FormatValueOutOfRange = "El valor està fora de l'interval permès."; +Strings.OfficeOM.L_InvalidResourceUrl = "Heu proporcionat una adreça URL de recurs d'aplicació que no és vàlida."; +Strings.OfficeOM.L_EventRegistrationError = "Error de registre d'incidència"; +Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "configureu el vostre navegador"; Strings.OfficeOM.L_UnsupportedUserIdentity = "El tipus d'identitat d'usuari no s'admet."; -Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} vol mostrar una finestra nova."; -Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Permet"; -Strings.OfficeOM.L_ShuttingDown = "L'operació ha fallat perquè actualment les dades no estan al servidor."; -Strings.OfficeOM.L_NoCapability = "No teniu els permisos suficients per a aquesta acció."; -Strings.OfficeOM.L_MemoryLimit = "S'ha superat el límit de memòria"; +Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Els paràmetres de coordenades no es poden fer servir amb el tipus de coerció Taula quan aquesta conté cel·les combinades."; +Strings.OfficeOM.L_OutOfRange = "Fora de l'interval"; +Strings.OfficeOM.L_GetDataIsTooLarge = "El conjunt de dades sol·licitat és massa gran."; +Strings.OfficeOM.L_APINotSupported = "API no admesa"; +Strings.OfficeOM.L_UserNotSignedIn = "No hi ha cap usuari amb la sessió iniciada a l'Office."; +Strings.OfficeOM.L_InternalError = "Error intern"; +Strings.OfficeOM.L_PropertyNotLoaded = 'La propietat "{0}" no està disponible. Abans de llegir el valor de la propietat, crideu el mètode de càrrega de l\'objecte contenidor i crideu "context.sync()" al context de sol·licitud associat.'; +Strings.OfficeOM.L_NavOutOfBound = "L'operació ha fallat perquè l'índex està fora de l'interval."; +Strings.OfficeOM.L_SelectionNotSupportCoercionType = "La selecció actual no és compatible amb el tipus de coerció especificat."; +Strings.OfficeOM.L_FileTypeNotSupported = "El tipus de fitxer especificat no s'admet."; +Strings.OfficeOM.L_UserClickIgnore = "L'usuari ha decidit ignorar el quadre de diàleg."; +Strings.OfficeOM.L_CallbackNotAFunction = "La resposta ha de ser de la funció tipus i era del tipus {0}."; +Strings.OfficeOM.L_NamedItemNotFound = "L'element amb nom no existeix."; +Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Ignora"; +Strings.OfficeOM.L_BadSelectorString = "La cadena passada al selector no està ben formatada o no s'admet."; +Strings.OfficeOM.L_ElementMissing = "No hem pogut formatar la cel·la de la taula perquè falten alguns valors dels paràmetres. Comproveu-los i torneu-ho a provar."; +Strings.OfficeOM.L_BindingToMultipleSelection = "No s'admeten les seleccions no contigües."; +Strings.OfficeOM.L_InvalidBindingError = "Error de vinculació no vàlida"; +Strings.OfficeOM.L_SettingNameNotExist = "El nom del paràmetre especificat no existeix."; +Strings.OfficeOM.L_IndexOutOfRange = "Ãndex fora de l'Interval."; +Strings.OfficeOM.L_APICallFailed = "Ha fallat la trucada de l'API"; Strings.OfficeOM.L_AppNameNotExist = "El nom del complement relatiu a {0} no existeix."; -Strings.OfficeOM.L_InvalidGrantMessage = "Falta una concessió per a aquest complement."; -Strings.OfficeOM.L_TooManyOptionalFunction = "múltiples funcions opcionals a la llista de paràmetres"; -Strings.OfficeOM.L_CustomXmlOutOfDateName = "Les dades no són actuals"; -Strings.OfficeOM.L_EventHandlerAdditionFailed = "No s'ha pogut afegir el controlador d'incidències."; -Strings.OfficeOM.L_CannotNavigateTo = "L'objecte es troba situat a un lloc on no s'admet la navegació."; -Strings.OfficeOM.L_SSOServerError = "S'ha produït un error al proveïdor d'autenticació."; -Strings.OfficeOM.L_DialogRequireHTTPS = "El protocol HTTP no és compatible. Utilitzeu el protocol HTTPS."; -Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "L'XPath limita la selecció a 1024 elements."; -Strings.OfficeOM.L_EventHandlerRemovalFailed = "No s'ha pogut eliminar el controlador d'incidències."; -Strings.OfficeOM.L_RequestTokenUnavailable = "S'ha limitat aquesta API per alentir la freqüència de les trucades."; -Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Un problema de xarxa ha impedit la recuperació del fitxer."; -Strings.OfficeOM.L_InvalidGetStartRowColumn = "Els valors startRow o startColumn especificats no són vàlids."; -Strings.OfficeOM.L_InvalidApiCallInContext = "Crida d'API no vàlida en el context actual."; -Strings.OfficeOM.L_InvalidSelectionForBindingType = "Amb la selecció actual i el tipus de vinculació especificat no es pot crear una vinculació."; -Strings.OfficeOM.L_SaveSettingsError = "Error de configuració de desar"; -Strings.OfficeOM.L_ConnectionFailureWithDetails = "Hi ha hagut un error en processar la sol·licitud. Codi d'estat: {0}; codi d'error: {1}; missatge d'error: {2}."; +Strings.OfficeOM.L_ValueNotLoaded = "El valor de l'objecte resultant encara no s'ha calculat. Abans de llegir la propietat del valor, feu una crida a \"context.sync()\" al context de sol·licitud associat."; +Strings.OfficeOM.L_DataStale = "Les dades no són actuals"; Strings.OfficeOM.L_UserAborted = "L'usuari ha cancel·lat la sol·licitud de consentiment."; -Strings.OfficeOM.L_InvalidReadForBlankRow = "La fila especificada és buida."; -Strings.OfficeOM.L_InvalidCellsValue = "Hi ha un o més paràmetres de cel·les amb valors no permesos. Comproveu-los i torneu-ho a provar."; -Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Truca closeAsync en el fitxer actual abans de recuperar un altre."; -Strings.OfficeOM.L_InvalidFormatValue = "Hi ha un o més paràmetres de format que tenen valors no permesos. Comproveu-los i torneu-ho a provar."; -Strings.OfficeOM.L_DataReadError = "Error de lectura de dades"; -Strings.OfficeOM.L_EventHandlerNotExist = "No s'ha trobat el controlador d'incidències per a aquesta vinculació."; -Strings.OfficeOM.L_InvalidSetRows = "Les files especificades no són vàlides."; -Strings.OfficeOM.L_NewWindowCrossZone = 'La configuració de seguretat del vostre navegador no ens permet crear un quadre de diàleg. Proveu-ho amb un altre navegador o bé {0}, de manera que "{1}" i el domini que es mostra a la vostra barra d\'adreces siguin a la mateixa zona de seguretat.'; -Strings.OfficeOM.L_OverwriteWorksheetData = "L'operació designada ha fallat perquè l'objecte de dades subministrat sobreescriurà o canviarà dades."; -Strings.OfficeOM.L_CallbackNotAFunction = "La resposta ha de ser de la funció tipus i era del tipus {0}."; -Strings.OfficeOM.L_TooManyIncompleteRequests = "Espereu fins que es completi la trucada anterior."; -Strings.OfficeOM.L_GetSelectionNotSupported = "La selecció actual no s'admet."; -Strings.OfficeOM.L_OsfControlTypeNotSupported = "No s'admet el tipus OsfControl."; -Strings.OfficeOM.L_UserAbortedMessage = "L'usuari no ha acceptat els permisos del complement."; -Strings.OfficeOM.L_InvalidTableOptionValue = "Hi ha un o més paràmetres de la taula Opcions que tenen valors no permesos. Comproveu-los i torneu-ho a provar."; -Strings.OfficeOM.L_RequestTimeout = "S'ha trigat massa temps a executar la trucada."; -Strings.OfficeOM.L_SetDataIsTooLarge = "L'objecte de dades especificat és massa gran."; -Strings.OfficeOM.L_HostError = "Error d'amfitrió"; -Strings.OfficeOM.L_InvalidValue = "Valor no vàlid"; -Strings.OfficeOM.L_NetworkProblem = "Problema de xarxa"; -Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Feu una selecció."; -Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "El tipus de coerció especificat no és compatible amb aquest tipus de vinculació."; -Strings.OfficeOM.L_InvalidResourceUrlMessage = "Al manifest heu especificat una adreça URL de recurs que no és vàlida."; -Strings.OfficeOM.L_InvalidArgumentGeneric = "Els arguments que s'han passat a la funció no funcionen per a aquesta situació, no hi són o no tenen el format correcte."; -Strings.OfficeOM.L_MissingParameter = "Falta un paràmetre"; -Strings.OfficeOM.L_BindingNotExist = "La vinculació especificada no existeix."; +Strings.OfficeOM.L_TooManyArguments = "massa arguments"; +Strings.OfficeOM.L_CustomXmlNodeNotFound = "No s'ha trobat el node especificat."; +Strings.OfficeOM.L_InvalidObjectPath = 'La ruta de l\'objecte "{0}" no s\'admet per a l\'acció que esteu provat de realitzar. Si esteu utilitzant l\'objecte en diverses crides de "context.sync" i fora de l\'execució seqüencial d\'un lot de ".run", utilitzeu els mètodes "context.trackedObjects.add()" i "context.trackedObjects.remove()" per administrar el cicle de vida de l\'objecte.'; +Strings.OfficeOM.L_CoercionTypeNotSupported = "El tipus de coerció especificat no s'admet."; +Strings.OfficeOM.L_UnsupportedDataObject = "El tipus d'objecte de dades subministrat no s'admet."; Strings.OfficeOM.L_DisplayDialogError = "Error de visualització del diàleg"; +Strings.OfficeOM.L_CannotRegisterEvent = "El controlador d'incidències no es pot registrar."; +Strings.OfficeOM.L_ConnectionFailureWithStatus = "La sol·licitud no s'ha pogut completar. Codi d'estat: {0}."; +Strings.OfficeOM.L_DialogInvalidScheme = "L'esquema de l'adreça URL no és compatible. Utilitzeu el protocol HTTPS."; +Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "L'aplicació {0} no existeix. Microsoft.Office.WebExtension.initialize(reason) no s'ha cridat."; Strings.OfficeOM.L_InvalidOrTimedOutSession = "La sessió no és vàlida o s'ha esgotat el temps d'espera"; -Strings.OfficeOM.L_InvalidColumnsForBinding = "Les columnes especificades no són vàlides."; -Strings.OfficeOM.L_InValidOptionalArgument = "argument opcional no vàlid"; -Strings.OfficeOM.L_SSOClientErrorMessage = "S'ha produït un error inesperat al client."; -Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Les restriccions del navegador han evitat que es creï el quadre de diàleg. El domini del quadre de diàleg i el de l'amfitrió del complement no són a la mateixa zona de seguretat."; -Strings.OfficeOM.L_InvalidObjectPath = 'La ruta de l\'objecte "{0}" no s\'admet per a l\'acció que esteu provat de realitzar. Si esteu utilitzant l\'objecte en diverses crides de "context.sync" i fora de l\'execució seqüencial d\'un lot de ".run", utilitzeu els mètodes "context.trackedObjects.add()" i "context.trackedObjects.remove()" per administrar el cicle de vida de l\'objecte.'; -Strings.OfficeOM.L_UserNotSignedIn = "No hi ha cap usuari amb la sessió iniciada a l'Office."; -Strings.OfficeOM.L_MultipleNamedItemFound = "S'han trobat múltiples objectes amb el mateix nom."; -Strings.OfficeOM.L_PermissionDenied = "Permís denegat"; -Strings.OfficeOM.L_SSOClientError = "S'ha produït un error a la sol·licitud d'autenticació de l'Office."; +Strings.OfficeOM.L_InvalidDataFormat = "El format de l'objecte de dades especificat no és vàlid."; Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Nota: se suggereix que el nombre de cel·les d'una taula sigui inferior a 20.000."; -Strings.OfficeOM.L_UnsupportedDataObject = "El tipus d'objecte de dades subministrat no s'admet."; -Strings.OfficeOM.L_RedundantCallbackSpecification = "La trucada no es pot especificar alhora a la llista d'arguments i a l'objecte opcional."; +Strings.OfficeOM.L_DocumentReadOnly = "L'operació sol·licitada no és permesa en el mode de document actual."; Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = 'Els canvis en la propietat "{0}" no es poden aplicar mitjançant un mètode "object.set".'; -Strings.OfficeOM.L_SelectionNotSupportCoercionType = "La selecció actual no és compatible amb el tipus de coerció especificat."; -Strings.OfficeOM.L_GetDataParametersConflict = "Els paràmetres especificats estan en conflicte."; -Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Els arguments d'entrada no són vàlids."; -Strings.OfficeOM.L_ConnectionFailureWithStatus = "La sol·licitud no s'ha pogut completar. Codi d'estat: {0}."; +Strings.OfficeOM.L_UnsupportedEnumeration = "Enumeració no admesa"; Strings.OfficeOM.L_InvalidRequestContext = "No es pot utilitzar l'objecte en contextos de sol·licitud diferents."; -Strings.OfficeOM.L_SettingsAreStale = "No s'ha pogut desar la configuració perquè no és actual."; -Strings.OfficeOM.L_InvalidNode = "Node no vàlid"; +Strings.OfficeOM.L_SetDataIsTooLarge = "L'objecte de dades especificat és massa gran."; +Strings.OfficeOM.L_InvalidValue = "Valor no vàlid"; +Strings.OfficeOM.L_CustomFunctionImplementationMissing = 'La propietat amb aquest nom en Excel.CustomFunctions que representa la definició de la funció ha de contenir una propietat "crida" que implementa la funció.'; +Strings.OfficeOM.L_InvalidFormat = "Error de format no vàlid"; +Strings.OfficeOM.L_TooManyIncompleteRequests = "Espereu fins que es completi la trucada anterior."; +Strings.OfficeOM.L_UnknownBindingType = "Aquest tipus de vinculació no s'admet."; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage = "L'operació ha fallat perquè aquest complement no admet el consentiment de l'usuari en aquesta categoria."; +Strings.OfficeOM.L_SSOClientError = "S'ha produït un error a la sol·licitud d'autenticació de l'Office."; +Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} vol mostrar una finestra nova."; +Strings.OfficeOM.L_ReadSettingsError = "Error de configuració de lectura"; +Strings.OfficeOM.L_FunctionCallFailed = "Error de crida de la funció {0}, codi d'error: {1}."; +Strings.OfficeOM.L_NotSupportedEventType = "El tipus d'incidència {0} especificat no s'admet."; +Strings.OfficeOM.L_DialogAlreadyOpened = "Ha fallat l'operació perquè aquest complement ja té un diàleg actiu."; +Strings.OfficeOM.L_InvalidFormatValue = "Hi ha un o més paràmetres de format que tenen valors no permesos. Comproveu-los i torneu-ho a provar."; Strings.OfficeOM.L_DialogNavigateError = "Error de navegació per diàleg"; +Strings.OfficeOM.L_InvalidBinding = "Vinculació no vàlida"; Strings.OfficeOM.L_InternalErrorDescription = "S'ha produït un error intern."; -Strings.OfficeOM.L_SetDataParametersConflict = "Els paràmetres especificats estan en conflicte."; -Strings.OfficeOM.L_InvalidSSOAddinMessage = "L'API d'identitat no és compatible amb aquest complement."; -Strings.OfficeOM.L_InvalidDataObject = "Objecte de dades no vàlid"; -Strings.OfficeOM.L_OutOfRange = "Fora de l'interval"; +Strings.OfficeOM.L_BindingNotExist = "La vinculació especificada no existeix."; +Strings.OfficeOM.L_InvalidSelectionForBindingType = "Amb la selecció actual i el tipus de vinculació especificat no es pot crear una vinculació."; +Strings.OfficeOM.L_UnsupportedEnumerationMessage = "L'aplicació amfitriona actual no admet l'enumeració."; +Strings.OfficeOM.L_MultipleNamedItemFound = "S'han trobat múltiples objectes amb el mateix nom."; +Strings.OfficeOM.L_EventHandlerRemovalFailed = "No s'ha pogut eliminar el controlador d'incidències."; +Strings.OfficeOM.L_RedundantCallbackSpecification = "La trucada no es pot especificar alhora a la llista d'arguments i a l'objecte opcional."; +Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Feu una selecció."; +Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "L'XPath limita la selecció a 1024 elements."; +Strings.OfficeOM.L_InvalidGetStartRowColumn = "Els valors startRow o startColumn especificats no són vàlids."; +Strings.OfficeOM.L_RequestTimeout = "S'ha trigat massa temps a executar la trucada."; +Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "El tipus d'identitat de l'usuari no s'admet."; +Strings.OfficeOM.L_SelectionCannotBound = "No es pot vincular amb la selecció actual."; Strings.OfficeOM.L_InvalidSetColumns = "Les columnes especificades no són vàlides."; -Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Ignora"; -Strings.OfficeOM.L_SliceSizeNotSupported = "No s'admet la mida del sector especificat."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "L'operació ha fallat perquè aquest complement ja està demanant un testimoni d'accés."; -Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "configureu el vostre navegador"; -Strings.OfficeOM.L_BrowserAPINotSupported = "Aquest navegador no admet l'API sol·licitada."; -Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Els valors rowCount o columnCount especificats no són vàlids."; -Strings.OfficeOM.L_InitializeNotReady = "Office.js encara no s'ha carregat completament. Torneu-ho a provar més tard o assegureu-vos d'afegir el vostre codi d'inicialització a la funció Office.initialize."; -Strings.OfficeOM.L_IndexOutOfRange = "Ãndex fora de l'Interval." +Strings.OfficeOM.L_SettingsCannotSave = "No s'ha pogut desar la configuració."; +Strings.OfficeOM.L_NotSupportedBindingType = "El tipus de vinculació {0} especificat no s'admet."; +Strings.OfficeOM.L_DialogRequireHTTPS = "El protocol HTTP no és compatible. Utilitzeu el protocol HTTPS."; +Strings.OfficeOM.L_InvalidResourceUrlMessage = "Al manifest heu especificat una adreça URL de recurs que no és vàlida."; +Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Les restriccions del navegador han evitat que es creï el quadre de diàleg. El domini del quadre de diàleg i el de l'amfitrió del complement no són a la mateixa zona de seguretat."; +Strings.OfficeOM.L_DataWriteError = "Error d'escriptura de dades"; +Strings.OfficeOM.L_HostError = "Error d'amfitrió"; +Strings.OfficeOM.L_ConnectionFailureWithDetails = "Hi ha hagut un error en processar la sol·licitud. Codi d'estat: {0}; codi d'error: {1}; missatge d'error: {2}."; +Strings.OfficeOM.L_InvalidGetRows = "Les files especificades no són vàlides." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/ca-es/office_strings.js b/node_modules/@microsoft/office-js/dist/ca-es/office_strings.js index ec18b7c..36fab5b 100644 --- a/node_modules/@microsoft/office-js/dist/ca-es/office_strings.js +++ b/node_modules/@microsoft/office-js/dist/ca-es/office_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_SettingsStaleError="Error de configuració obsoleta";Strings.OfficeOM.L_InvalidBinding="Vinculació no vàlida";Strings.OfficeOM.L_InvalidParameters="La funció {0} té paràmetres no vàlids.";Strings.OfficeOM.L_DataWriteError="Error d'escriptura de dades";Strings.OfficeOM.L_InvalidArgument="L'argument \"{0}\" no s'admet en aquesta situació, falta o bé té un format incorrecte.";Strings.OfficeOM.L_BindingCreationError="Error de creació de vinculació";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Les dades no estan actualitzades. Torneu a recuperar l'objecte.";Strings.OfficeOM.L_SettingsCannotSave="No s'ha pogut desar la configuració.";Strings.OfficeOM.L_InternalError="Error intern";Strings.OfficeOM.L_NotSupported="No s'admet la funció {0}.";Strings.OfficeOM.L_ReadSettingsError="Error de configuració de lectura";Strings.OfficeOM.L_FormatValueOutOfRange="El valor està fora de l'interval permès.";Strings.OfficeOM.L_Timeout="S'ha esgotat el temps d'espera de l'operació.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Els paràmetres de coordenades no es poden fer servir amb el tipus de coerció Taula quan aquesta conté cel·les combinades.";Strings.OfficeOM.L_OperationNotSupported="Aquesta operació no és permesa.";Strings.OfficeOM.L_DataNotMatchBindingSize="L'objecte de dades subministrat no coincideix amb la mida de la selecció actual.";Strings.OfficeOM.L_RunMustReturnPromise='La funció per lots passada al mètode ".run" no ha retornat cap promesa. Normalment, la funció ha de retornar una promesa, de manera que qualsevol objecte rastrejat automàticament es pot alliberar quan es completa el lot. Es pot retornar una promesa retornant la resposta de "context.sync()".';Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Nota: se suggereix que hi hagi menys de 100 conjunts de formats definits per una crida a una API de format.";Strings.OfficeOM.L_CustomXmlError="Error d'XML personalitzat.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Els paràmetres de coordenades no es poden fer servir amb el tipus de coerció Taula quan aquesta conté cel·les combinades.";Strings.OfficeOM.L_InvalidGrant="Falta una autorització prèvia.";Strings.OfficeOM.L_SettingNameNotExist="El nom del paràmetre especificat no existeix.";Strings.OfficeOM.L_UnsupportedEnumeration="Enumeració no admesa";Strings.OfficeOM.L_MissingRequiredArguments="falten alguns arguments obligatoris";Strings.OfficeOM.L_FunctionCallFailed="Error de crida de la funció {0}, codi d'error: {1}.";Strings.OfficeOM.L_InvalidBindingError="Error de vinculació no vàlida";Strings.OfficeOM.L_SpecifiedIdNotExist="L'identificador especificat no existeix.";Strings.OfficeOM.L_SSOServerErrorMessage="S'ha produït un error inesperat al servidor.";Strings.OfficeOM.L_DialogOK="D'acord";Strings.OfficeOM.L_ColIndexOutOfRange="El valor de l'índex de columnes està fora de l'interval permès. Feu servir un valor (0 o superior) inferior al nombre de columnes.";Strings.OfficeOM.L_FormattingReminder="Recordatori de format";Strings.OfficeOM.L_SelectionCannotBound="No es pot vincular amb la selecció actual.";Strings.OfficeOM.L_InvalidAPICall="Crida d'API no vàlida";Strings.OfficeOM.L_BindingToMultipleSelection="No s'admeten les seleccions no contigües.";Strings.OfficeOM.L_PropertyNotLoaded='La propietat "{0}" no està disponible. Abans de llegir el valor de la propietat, crideu el mètode de càrrega de l\'objecte contenidor i crideu "context.sync()" al context de sol·licitud associat.';Strings.OfficeOM.L_CannotWriteToSelection="No es pot escriure a la selecció actual.";Strings.OfficeOM.L_TooManyArguments="massa arguments";Strings.OfficeOM.L_GetDataIsTooLarge="El conjunt de dades sol·licitat és massa gran.";Strings.OfficeOM.L_DialogInvalidScheme="L'esquema de l'adreça URL no és compatible. Utilitzeu el protocol HTTPS.";Strings.OfficeOM.L_DialogAddressNotTrusted="El domini de l'adreça URL no s'inclou a l'element AppDomains del manifest.";Strings.OfficeOM.L_FileTypeNotSupported="El tipus de fitxer especificat no s'admet.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="L'aplicació {0} no existeix. Microsoft.Office.WebExtension.initialize(reason) no s'ha cridat.";Strings.OfficeOM.L_DataWriteReminder="Recordatori d'escriptura de dades";Strings.OfficeOM.L_InvalidGetRows="Les files especificades no són vàlides.";Strings.OfficeOM.L_EventRegistrationError="Error de registre d'incidència";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="El tipus d'identitat de l'usuari no s'admet.";Strings.OfficeOM.L_UserClickIgnore="L'usuari ha decidit ignorar el quadre de diàleg.";Strings.OfficeOM.L_PropertyDoesNotExist='La propietat "{0}" no existeix a l\'objecte.';Strings.OfficeOM.L_CoercionTypeNotSupported="El tipus de coerció especificat no s'admet.";Strings.OfficeOM.L_ElementMissing="No hem pogut formatar la cel·la de la taula perquè falten alguns valors dels paràmetres. Comproveu-los i torneu-ho a provar.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="El tipus de vinculació especificat no és compatible amb l'element amb nom subministrat.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Aquest tipus de vinculació no admet aquesta operació.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="S'està provant d'establir la propietat de només lectura \"{0}\".";Strings.OfficeOM.L_APICallFailed="Ha fallat la trucada de l'API";Strings.OfficeOM.L_TooManyOptionalObjects="múltiples objectes opcionals a la llista de paràmetres";Strings.OfficeOM.L_InvalidGetColumns="Les columnes especificades no són vàlides.";Strings.OfficeOM.L_ValueNotLoaded="El valor de l'objecte resultant encara no s'ha calculat. Abans de llegir la propietat del valor, feu una crida a \"context.sync()\" al context de sol·licitud associat.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="La vostra sessió de l'Office Online ha caducat o bé no és vàlida. Actualitzeu la pàgina per continuar.";Strings.OfficeOM.L_NotSupportedBindingType="El tipus de vinculació {0} especificat no s'admet.";Strings.OfficeOM.L_UnknownBindingType="Aquest tipus de vinculació no s'admet.";Strings.OfficeOM.L_DataNotMatchSelection="L'objecte de dades subministrat no és compatible amb la forma o les dimensions de la selecció actual.";Strings.OfficeOM.L_RowIndexOutOfRange="El valor de l'índex de files està fora de l'interval permès. Feu servir un valor (0 o superior) que sigui inferior al nombre de files.";Strings.OfficeOM.L_InvalidSetStartRowColumn="Els valors startRow o startColumn especificats no són vàlids.";Strings.OfficeOM.L_NavOutOfBound="L'operació ha fallat perquè l'índex està fora de l'interval.";Strings.OfficeOM.L_InvalidCoercion="Tipus de coerció no vàlid";Strings.OfficeOM.L_NotSupportedEventType="El tipus d'incidència {0} especificat no s'admet.";Strings.OfficeOM.L_InvalidFormat="Error de format no vàlid";Strings.OfficeOM.L_InvalidResourceUrl="Heu proporcionat una adreça URL de recurs d'aplicació que no és vàlida.";Strings.OfficeOM.L_DocumentReadOnly="L'operació sol·licitada no és permesa en el mode de document actual.";Strings.OfficeOM.L_DataNotMatchCoercionType="El tipus de l'objecte de dades especificat no és compatible amb la selecció actual.";Strings.OfficeOM.L_ActivityLimitReached="S'ha assolit el límit d'activitat.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="El contingut seleccionat ha d'estar en format de taula. Canvieu el format de les dades a taula i torneu-ho a provar.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="S'ha assolit el límit de selecció.";Strings.OfficeOM.L_CustomXmlNodeNotFound="No s'ha trobat el node especificat.";Strings.OfficeOM.L_BadSelectorString="La cadena passada al selector no està ben formatada o no s'admet.";Strings.OfficeOM.L_APINotSupported="API no admesa";Strings.OfficeOM.L_DataStale="Les dades no són actuals";Strings.OfficeOM.L_NamedItemNotFound="L'element amb nom no existeix.";Strings.OfficeOM.L_InvalidDataFormat="El format de l'objecte de dades especificat no és vàlid.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="L'aplicació amfitriona actual no admet l'enumeració.";Strings.OfficeOM.L_NotImplemented="La funció {0} no està implementada.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="El complement ja està demanant un testimoni d'accés.";Strings.OfficeOM.L_CannotRegisterEvent="El controlador d'incidències no es pot registrar.";Strings.OfficeOM.L_DataNotMatchBindingType="L'objecte de dades especificat no és compatible amb el tipus de vinculació.";Strings.OfficeOM.L_InvalidBindingOperation="Operació de vinculació no vàlida";Strings.OfficeOM.L_DialogAlreadyOpened="Ha fallat l'operació perquè aquest complement ja té un diàleg actiu.";Strings.OfficeOM.L_UnsupportedUserIdentity="El tipus d'identitat d'usuari no s'admet.";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} vol mostrar una finestra nova.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Permet";Strings.OfficeOM.L_ShuttingDown="L'operació ha fallat perquè actualment les dades no estan al servidor.";Strings.OfficeOM.L_NoCapability="No teniu els permisos suficients per a aquesta acció.";Strings.OfficeOM.L_MemoryLimit="S'ha superat el límit de memòria";Strings.OfficeOM.L_AppNameNotExist="El nom del complement relatiu a {0} no existeix.";Strings.OfficeOM.L_InvalidGrantMessage="Falta una concessió per a aquest complement.";Strings.OfficeOM.L_TooManyOptionalFunction="múltiples funcions opcionals a la llista de paràmetres";Strings.OfficeOM.L_CustomXmlOutOfDateName="Les dades no són actuals";Strings.OfficeOM.L_EventHandlerAdditionFailed="No s'ha pogut afegir el controlador d'incidències.";Strings.OfficeOM.L_CannotNavigateTo="L'objecte es troba situat a un lloc on no s'admet la navegació.";Strings.OfficeOM.L_SSOServerError="S'ha produït un error al proveïdor d'autenticació.";Strings.OfficeOM.L_DialogRequireHTTPS="El protocol HTTP no és compatible. Utilitzeu el protocol HTTPS.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="L'XPath limita la selecció a 1024 elements.";Strings.OfficeOM.L_EventHandlerRemovalFailed="No s'ha pogut eliminar el controlador d'incidències.";Strings.OfficeOM.L_RequestTokenUnavailable="S'ha limitat aquesta API per alentir la freqüència de les trucades.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Un problema de xarxa ha impedit la recuperació del fitxer.";Strings.OfficeOM.L_InvalidGetStartRowColumn="Els valors startRow o startColumn especificats no són vàlids.";Strings.OfficeOM.L_InvalidApiCallInContext="Crida d'API no vàlida en el context actual.";Strings.OfficeOM.L_InvalidSelectionForBindingType="Amb la selecció actual i el tipus de vinculació especificat no es pot crear una vinculació.";Strings.OfficeOM.L_SaveSettingsError="Error de configuració de desar";Strings.OfficeOM.L_ConnectionFailureWithDetails="Hi ha hagut un error en processar la sol·licitud. Codi d'estat: {0}; codi d'error: {1}; missatge d'error: {2}.";Strings.OfficeOM.L_UserAborted="L'usuari ha cancel·lat la sol·licitud de consentiment.";Strings.OfficeOM.L_InvalidReadForBlankRow="La fila especificada és buida.";Strings.OfficeOM.L_InvalidCellsValue="Hi ha un o més paràmetres de cel·les amb valors no permesos. Comproveu-los i torneu-ho a provar.";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Truca closeAsync en el fitxer actual abans de recuperar un altre.";Strings.OfficeOM.L_InvalidFormatValue="Hi ha un o més paràmetres de format que tenen valors no permesos. Comproveu-los i torneu-ho a provar.";Strings.OfficeOM.L_DataReadError="Error de lectura de dades";Strings.OfficeOM.L_EventHandlerNotExist="No s'ha trobat el controlador d'incidències per a aquesta vinculació.";Strings.OfficeOM.L_InvalidSetRows="Les files especificades no són vàlides.";Strings.OfficeOM.L_NewWindowCrossZone='La configuració de seguretat del vostre navegador no ens permet crear un quadre de diàleg. Proveu-ho amb un altre navegador o bé {0}, de manera que "{1}" i el domini que es mostra a la vostra barra d\'adreces siguin a la mateixa zona de seguretat.';Strings.OfficeOM.L_OverwriteWorksheetData="L'operació designada ha fallat perquè l'objecte de dades subministrat sobreescriurà o canviarà dades.";Strings.OfficeOM.L_CallbackNotAFunction="La resposta ha de ser de la funció tipus i era del tipus {0}.";Strings.OfficeOM.L_TooManyIncompleteRequests="Espereu fins que es completi la trucada anterior.";Strings.OfficeOM.L_GetSelectionNotSupported="La selecció actual no s'admet.";Strings.OfficeOM.L_OsfControlTypeNotSupported="No s'admet el tipus OsfControl.";Strings.OfficeOM.L_UserAbortedMessage="L'usuari no ha acceptat els permisos del complement.";Strings.OfficeOM.L_InvalidTableOptionValue="Hi ha un o més paràmetres de la taula Opcions que tenen valors no permesos. Comproveu-los i torneu-ho a provar.";Strings.OfficeOM.L_RequestTimeout="S'ha trigat massa temps a executar la trucada.";Strings.OfficeOM.L_SetDataIsTooLarge="L'objecte de dades especificat és massa gran.";Strings.OfficeOM.L_HostError="Error d'amfitrió";Strings.OfficeOM.L_InvalidValue="Valor no vàlid";Strings.OfficeOM.L_NetworkProblem="Problema de xarxa";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Feu una selecció.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="El tipus de coerció especificat no és compatible amb aquest tipus de vinculació.";Strings.OfficeOM.L_InvalidResourceUrlMessage="Al manifest heu especificat una adreça URL de recurs que no és vàlida.";Strings.OfficeOM.L_InvalidArgumentGeneric="Els arguments que s'han passat a la funció no funcionen per a aquesta situació, no hi són o no tenen el format correcte.";Strings.OfficeOM.L_MissingParameter="Falta un paràmetre";Strings.OfficeOM.L_BindingNotExist="La vinculació especificada no existeix.";Strings.OfficeOM.L_DisplayDialogError="Error de visualització del diàleg";Strings.OfficeOM.L_InvalidOrTimedOutSession="La sessió no és vàlida o s'ha esgotat el temps d'espera";Strings.OfficeOM.L_InvalidColumnsForBinding="Les columnes especificades no són vàlides.";Strings.OfficeOM.L_InValidOptionalArgument="argument opcional no vàlid";Strings.OfficeOM.L_SSOClientErrorMessage="S'ha produït un error inesperat al client.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Les restriccions del navegador han evitat que es creï el quadre de diàleg. El domini del quadre de diàleg i el de l'amfitrió del complement no són a la mateixa zona de seguretat.";Strings.OfficeOM.L_InvalidObjectPath='La ruta de l\'objecte "{0}" no s\'admet per a l\'acció que esteu provat de realitzar. Si esteu utilitzant l\'objecte en diverses crides de "context.sync" i fora de l\'execució seqüencial d\'un lot de ".run", utilitzeu els mètodes "context.trackedObjects.add()" i "context.trackedObjects.remove()" per administrar el cicle de vida de l\'objecte.';Strings.OfficeOM.L_UserNotSignedIn="No hi ha cap usuari amb la sessió iniciada a l'Office.";Strings.OfficeOM.L_MultipleNamedItemFound="S'han trobat múltiples objectes amb el mateix nom.";Strings.OfficeOM.L_PermissionDenied="Permís denegat";Strings.OfficeOM.L_SSOClientError="S'ha produït un error a la sol·licitud d'autenticació de l'Office.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Nota: se suggereix que el nombre de cel·les d'una taula sigui inferior a 20.000.";Strings.OfficeOM.L_UnsupportedDataObject="El tipus d'objecte de dades subministrat no s'admet.";Strings.OfficeOM.L_RedundantCallbackSpecification="La trucada no es pot especificar alhora a la llista d'arguments i a l'objecte opcional.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod='Els canvis en la propietat "{0}" no es poden aplicar mitjançant un mètode "object.set".';Strings.OfficeOM.L_SelectionNotSupportCoercionType="La selecció actual no és compatible amb el tipus de coerció especificat.";Strings.OfficeOM.L_GetDataParametersConflict="Els paràmetres especificats estan en conflicte.";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Els arguments d'entrada no són vàlids.";Strings.OfficeOM.L_ConnectionFailureWithStatus="La sol·licitud no s'ha pogut completar. Codi d'estat: {0}.";Strings.OfficeOM.L_InvalidRequestContext="No es pot utilitzar l'objecte en contextos de sol·licitud diferents.";Strings.OfficeOM.L_SettingsAreStale="No s'ha pogut desar la configuració perquè no és actual.";Strings.OfficeOM.L_InvalidNode="Node no vàlid";Strings.OfficeOM.L_DialogNavigateError="Error de navegació per diàleg";Strings.OfficeOM.L_InternalErrorDescription="S'ha produït un error intern.";Strings.OfficeOM.L_SetDataParametersConflict="Els paràmetres especificats estan en conflicte.";Strings.OfficeOM.L_InvalidSSOAddinMessage="L'API d'identitat no és compatible amb aquest complement.";Strings.OfficeOM.L_InvalidDataObject="Objecte de dades no vàlid";Strings.OfficeOM.L_OutOfRange="Fora de l'interval";Strings.OfficeOM.L_InvalidSetColumns="Les columnes especificades no són vàlides.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Ignora";Strings.OfficeOM.L_SliceSizeNotSupported="No s'admet la mida del sector especificat.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="L'operació ha fallat perquè aquest complement ja està demanant un testimoni d'accés.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="configureu el vostre navegador";Strings.OfficeOM.L_BrowserAPINotSupported="Aquest navegador no admet l'API sol·licitada.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Els valors rowCount o columnCount especificats no són vàlids.";Strings.OfficeOM.L_InitializeNotReady="Office.js encara no s'ha carregat completament. Torneu-ho a provar més tard o assegureu-vos d'afegir el vostre codi d'inicialització a la funció Office.initialize.";Strings.OfficeOM.L_IndexOutOfRange="Ãndex fora de l'Interval." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_DataNotMatchBindingSize="L'objecte de dades subministrat no coincideix amb la mida de la selecció actual.";Strings.OfficeOM.L_RowIndexOutOfRange="El valor de l'índex de files està fora de l'interval permès. Feu servir un valor (0 o superior) que sigui inferior al nombre de files.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Els valors rowCount o columnCount especificats no són vàlids.";Strings.OfficeOM.L_MissingParameter="Falta un paràmetre";Strings.OfficeOM.L_InvalidNode="Node no vàlid";Strings.OfficeOM.L_InvalidApiCallInContext="Crida d'API no vàlida en el context actual.";Strings.OfficeOM.L_TooManyOptionalObjects="múltiples objectes opcionals a la llista de paràmetres";Strings.OfficeOM.L_TooManyOptionalFunction="múltiples funcions opcionals a la llista de paràmetres";Strings.OfficeOM.L_SaveSettingsError="Error de configuració de desar";Strings.OfficeOM.L_DataNotMatchSelection="L'objecte de dades subministrat no és compatible amb la forma o les dimensions de la selecció actual.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Les dades no són actuals";Strings.OfficeOM.L_NotImplemented="La funció {0} no està implementada.";Strings.OfficeOM.L_Timeout="S'ha esgotat el temps d'espera de l'operació.";Strings.OfficeOM.L_OperationNotSupported="Aquesta operació no és permesa.";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Els arguments d'entrada no són vàlids.";Strings.OfficeOM.L_InValidOptionalArgument="argument opcional no vàlid";Strings.OfficeOM.L_ActivityLimitReached="S'ha assolit el límit d'activitat.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="La vostra sessió de l'Office Online ha caducat o bé no és vàlida. Actualitzeu la pàgina per continuar.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="El tipus de coerció especificat no és compatible amb aquest tipus de vinculació.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="El contingut seleccionat ha d'estar en format de taula. Canvieu el format de les dades a taula i torneu-ho a provar.";Strings.OfficeOM.L_CustomFunctionNameContainsBadChars="El nom de la funció només pot contenir lletres, dígits, guions baixos i punts.";Strings.OfficeOM.L_NewWindowCrossZone='La configuració de seguretat del vostre navegador no ens permet crear un quadre de diàleg. Proveu-ho amb un altre navegador o bé {0}, de manera que "{1}" i el domini que es mostra a la vostra barra d\'adreces siguin a la mateixa zona de seguretat.';Strings.OfficeOM.L_GetDataParametersConflict="Els paràmetres especificats estan en conflicte.";Strings.OfficeOM.L_InvalidArgument="L'argument \"{0}\" no s'admet en aquesta situació, falta o bé té un format incorrecte.";Strings.OfficeOM.L_InvalidSSOAddinMessage="L'API d'identitat no és compatible amb aquest complement.";Strings.OfficeOM.L_BindingCreationError="Error de creació de vinculació";Strings.OfficeOM.L_NotSupported="No s'admet la funció {0}.";Strings.OfficeOM.L_FormattingReminder="Recordatori de format";Strings.OfficeOM.L_PermissionDenied="Permís denegat";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory="Aquest complement no admet el consentiment de l'usuari.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Els paràmetres de coordenades no es poden fer servir amb el tipus de coerció Taula quan aquesta conté cel·les combinades.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Les dades no estan actualitzades. Torneu a recuperar l'objecte.";Strings.OfficeOM.L_SSOConnectionLostError="A connection was lost during the sign in process.";Strings.OfficeOM.L_BrowserAPINotSupported="Aquest navegador no admet l'API sol·licitada.";Strings.OfficeOM.L_CannotNavigateTo="L'objecte es troba situat a un lloc on no s'admet la navegació.";Strings.OfficeOM.L_DataWriteReminder="Recordatori d'escriptura de dades";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Nota: se suggereix que hi hagi menys de 100 conjunts de formats definits per una crida a una API de format.";Strings.OfficeOM.L_MissingRequiredArguments="falten alguns arguments obligatoris";Strings.OfficeOM.L_SpecifiedIdNotExist="L'identificador especificat no existeix.";Strings.OfficeOM.L_SliceSizeNotSupported="No s'admet la mida del sector especificat.";Strings.OfficeOM.L_DialogOK="D'acord";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="S'està provant d'establir la propietat de només lectura \"{0}\".";Strings.OfficeOM.L_DialogAddressNotTrusted="El domini de l'adreça URL no s'inclou a l'element AppDomains del manifest.";Strings.OfficeOM.L_ShuttingDown="L'operació ha fallat perquè actualment les dades no estan al servidor.";Strings.OfficeOM.L_EventHandlerAdditionFailed="No s'ha pogut afegir el controlador d'incidències.";Strings.OfficeOM.L_InvalidCellsValue="Hi ha un o més paràmetres de cel·les amb valors no permesos. Comproveu-los i torneu-ho a provar.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Un problema de xarxa ha impedit la recuperació del fitxer.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Permet";Strings.OfficeOM.L_PropertyDoesNotExist='La propietat "{0}" no existeix a l\'objecte.';Strings.OfficeOM.L_SSOServerErrorMessage="S'ha produït un error inesperat al servidor.";Strings.OfficeOM.L_SSOServerError="S'ha produït un error al proveïdor d'autenticació.";Strings.OfficeOM.L_InvalidDataObject="Objecte de dades no vàlid";Strings.OfficeOM.L_InvalidTableOptionValue="Hi ha un o més paràmetres de la taula Opcions que tenen valors no permesos. Comproveu-los i torneu-ho a provar.";Strings.OfficeOM.L_MemoryLimit="S'ha superat el límit de memòria";Strings.OfficeOM.L_SSOClientErrorMessage="S'ha produït un error inesperat al client.";Strings.OfficeOM.L_ApiNotFoundDetails="El mètode o propietat {0} forma part del conjunt de requisits {1}, que no està disponible a la vostra versió de l'aplicació {2}.";Strings.OfficeOM.L_OverwriteWorksheetData="L'operació designada ha fallat perquè l'objecte de dades subministrat sobreescriurà o canviarà dades.";Strings.OfficeOM.L_NetworkProblem="Problema de xarxa";Strings.OfficeOM.L_ColIndexOutOfRange="El valor de l'índex de columnes està fora de l'interval permès. Feu servir un valor (0 o superior) inferior al nombre de columnes.";Strings.OfficeOM.L_EventHandlerNotExist="No s'ha trobat el controlador d'incidències per a aquesta vinculació.";Strings.OfficeOM.L_InvalidColumnsForBinding="Les columnes especificades no són vàlides.";Strings.OfficeOM.L_NoCapability="No teniu els permisos suficients per a aquesta acció.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="L'operació ha fallat perquè aquest complement ja està demanant un testimoni d'accés.";Strings.OfficeOM.L_DataNotMatchCoercionType="El tipus de l'objecte de dades especificat no és compatible amb la selecció actual.";Strings.OfficeOM.L_InvalidArgumentGeneric="Els arguments que s'han passat a la funció no funcionen per a aquesta situació, no hi són o no tenen el format correcte.";Strings.OfficeOM.L_InvalidReadForBlankRow="La fila especificada és buida.";Strings.OfficeOM.L_CustomFunctionDefinitionMissing="Una propietat amb aquest nom que representa la definició de la funció ha d'existir a Excel.CustomFunctions.";Strings.OfficeOM.L_InvalidGetColumns="Les columnes especificades no són vàlides.";Strings.OfficeOM.L_InvalidParameters="La funció {0} té paràmetres no vàlids.";Strings.OfficeOM.L_CannotWriteToSelection="No es pot escriure a la selecció actual.";Strings.OfficeOM.L_InvalidAPICall="Crida d'API no vàlida";Strings.OfficeOM.L_DataReadError="Error de lectura de dades";Strings.OfficeOM.L_UserAbortedMessage="L'usuari no ha acceptat els permisos del complement.";Strings.OfficeOM.L_SetDataParametersConflict="Els paràmetres especificats estan en conflicte.";Strings.OfficeOM.L_InitializeNotReady="Office.js encara no s'ha carregat completament. Torneu-ho a provar més tard o assegureu-vos d'afegir el vostre codi d'inicialització a la funció Office.initialize.";Strings.OfficeOM.L_InvalidSetStartRowColumn="Els valors startRow o startColumn especificats no són vàlids.";Strings.OfficeOM.L_SSOConnectionLostErrorMessage="A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones.";Strings.OfficeOM.L_RunMustReturnPromise='La funció per lots passada al mètode ".run" no ha retornat cap promesa. Normalment, la funció ha de retornar una promesa, de manera que qualsevol objecte rastrejat automàticament es pot alliberar quan es completa el lot. Es pot retornar una promesa retornant la resposta de "context.sync()".';Strings.OfficeOM.L_SettingsStaleError="Error de configuració obsoleta";Strings.OfficeOM.L_InvalidOperationInCellEditMode="L'Excel té activat el mode d'edició de cel·les. Sortiu del mode d'edició prement la tecla Retorn o el Tabulador, o bé seleccionant una altra cel·la i, a continuació, torneu-ho a provar.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="S'ha assolit el límit de selecció.";Strings.OfficeOM.L_InvalidGrantMessage="Falta una concessió per a aquest complement.";Strings.OfficeOM.L_InvalidCoercion="Tipus de coerció no vàlid";Strings.OfficeOM.L_GetSelectionNotSupported="La selecció actual no s'admet.";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Truca closeAsync en el fitxer actual abans de recuperar un altre.";Strings.OfficeOM.L_CustomFunctionNameCannotSplit="El nom de la funció ha de contenir un espai de nom i un nom curt no buits.";Strings.OfficeOM.L_InvalidSetRows="Les files especificades no són vàlides.";Strings.OfficeOM.L_InvalidGrant="Falta una autorització prèvia.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="El tipus de vinculació especificat no és compatible amb l'element amb nom subministrat.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="El complement ja està demanant un testimoni d'accés.";Strings.OfficeOM.L_RequestTokenUnavailable="S'ha limitat aquesta API per alentir la freqüència de les trucades.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Aquest tipus de vinculació no admet aquesta operació.";Strings.OfficeOM.L_CustomXmlError="Error d'XML personalitzat.";Strings.OfficeOM.L_OsfControlTypeNotSupported="No s'admet el tipus OsfControl.";Strings.OfficeOM.L_InvalidBindingOperation="Operació de vinculació no vàlida";Strings.OfficeOM.L_DataNotMatchBindingType="L'objecte de dades especificat no és compatible amb el tipus de vinculació.";Strings.OfficeOM.L_SettingsAreStale="No s'ha pogut desar la configuració perquè no és actual.";Strings.OfficeOM.L_FormatValueOutOfRange="El valor està fora de l'interval permès.";Strings.OfficeOM.L_InvalidResourceUrl="Heu proporcionat una adreça URL de recurs d'aplicació que no és vàlida.";Strings.OfficeOM.L_EventRegistrationError="Error de registre d'incidència";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="configureu el vostre navegador";Strings.OfficeOM.L_UnsupportedUserIdentity="El tipus d'identitat d'usuari no s'admet.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Els paràmetres de coordenades no es poden fer servir amb el tipus de coerció Taula quan aquesta conté cel·les combinades.";Strings.OfficeOM.L_OutOfRange="Fora de l'interval";Strings.OfficeOM.L_GetDataIsTooLarge="El conjunt de dades sol·licitat és massa gran.";Strings.OfficeOM.L_APINotSupported="API no admesa";Strings.OfficeOM.L_UserNotSignedIn="No hi ha cap usuari amb la sessió iniciada a l'Office.";Strings.OfficeOM.L_InternalError="Error intern";Strings.OfficeOM.L_PropertyNotLoaded='La propietat "{0}" no està disponible. Abans de llegir el valor de la propietat, crideu el mètode de càrrega de l\'objecte contenidor i crideu "context.sync()" al context de sol·licitud associat.';Strings.OfficeOM.L_NavOutOfBound="L'operació ha fallat perquè l'índex està fora de l'interval.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="La selecció actual no és compatible amb el tipus de coerció especificat.";Strings.OfficeOM.L_FileTypeNotSupported="El tipus de fitxer especificat no s'admet.";Strings.OfficeOM.L_UserClickIgnore="L'usuari ha decidit ignorar el quadre de diàleg.";Strings.OfficeOM.L_CallbackNotAFunction="La resposta ha de ser de la funció tipus i era del tipus {0}.";Strings.OfficeOM.L_NamedItemNotFound="L'element amb nom no existeix.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Ignora";Strings.OfficeOM.L_BadSelectorString="La cadena passada al selector no està ben formatada o no s'admet.";Strings.OfficeOM.L_ElementMissing="No hem pogut formatar la cel·la de la taula perquè falten alguns valors dels paràmetres. Comproveu-los i torneu-ho a provar.";Strings.OfficeOM.L_BindingToMultipleSelection="No s'admeten les seleccions no contigües.";Strings.OfficeOM.L_InvalidBindingError="Error de vinculació no vàlida";Strings.OfficeOM.L_SettingNameNotExist="El nom del paràmetre especificat no existeix.";Strings.OfficeOM.L_IndexOutOfRange="Ãndex fora de l'Interval.";Strings.OfficeOM.L_APICallFailed="Ha fallat la trucada de l'API";Strings.OfficeOM.L_AppNameNotExist="El nom del complement relatiu a {0} no existeix.";Strings.OfficeOM.L_ValueNotLoaded="El valor de l'objecte resultant encara no s'ha calculat. Abans de llegir la propietat del valor, feu una crida a \"context.sync()\" al context de sol·licitud associat.";Strings.OfficeOM.L_DataStale="Les dades no són actuals";Strings.OfficeOM.L_UserAborted="L'usuari ha cancel·lat la sol·licitud de consentiment.";Strings.OfficeOM.L_TooManyArguments="massa arguments";Strings.OfficeOM.L_CustomXmlNodeNotFound="No s'ha trobat el node especificat.";Strings.OfficeOM.L_InvalidObjectPath='La ruta de l\'objecte "{0}" no s\'admet per a l\'acció que esteu provat de realitzar. Si esteu utilitzant l\'objecte en diverses crides de "context.sync" i fora de l\'execució seqüencial d\'un lot de ".run", utilitzeu els mètodes "context.trackedObjects.add()" i "context.trackedObjects.remove()" per administrar el cicle de vida de l\'objecte.';Strings.OfficeOM.L_CoercionTypeNotSupported="El tipus de coerció especificat no s'admet.";Strings.OfficeOM.L_UnsupportedDataObject="El tipus d'objecte de dades subministrat no s'admet.";Strings.OfficeOM.L_DisplayDialogError="Error de visualització del diàleg";Strings.OfficeOM.L_CannotRegisterEvent="El controlador d'incidències no es pot registrar.";Strings.OfficeOM.L_ConnectionFailureWithStatus="La sol·licitud no s'ha pogut completar. Codi d'estat: {0}.";Strings.OfficeOM.L_DialogInvalidScheme="L'esquema de l'adreça URL no és compatible. Utilitzeu el protocol HTTPS.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="L'aplicació {0} no existeix. Microsoft.Office.WebExtension.initialize(reason) no s'ha cridat.";Strings.OfficeOM.L_InvalidOrTimedOutSession="La sessió no és vàlida o s'ha esgotat el temps d'espera";Strings.OfficeOM.L_InvalidDataFormat="El format de l'objecte de dades especificat no és vàlid.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Nota: se suggereix que el nombre de cel·les d'una taula sigui inferior a 20.000.";Strings.OfficeOM.L_DocumentReadOnly="L'operació sol·licitada no és permesa en el mode de document actual.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod='Els canvis en la propietat "{0}" no es poden aplicar mitjançant un mètode "object.set".';Strings.OfficeOM.L_UnsupportedEnumeration="Enumeració no admesa";Strings.OfficeOM.L_InvalidRequestContext="No es pot utilitzar l'objecte en contextos de sol·licitud diferents.";Strings.OfficeOM.L_SetDataIsTooLarge="L'objecte de dades especificat és massa gran.";Strings.OfficeOM.L_InvalidValue="Valor no vàlid";Strings.OfficeOM.L_CustomFunctionImplementationMissing='La propietat amb aquest nom en Excel.CustomFunctions que representa la definició de la funció ha de contenir una propietat "crida" que implementa la funció.';Strings.OfficeOM.L_InvalidFormat="Error de format no vàlid";Strings.OfficeOM.L_TooManyIncompleteRequests="Espereu fins que es completi la trucada anterior.";Strings.OfficeOM.L_UnknownBindingType="Aquest tipus de vinculació no s'admet.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage="L'operació ha fallat perquè aquest complement no admet el consentiment de l'usuari en aquesta categoria.";Strings.OfficeOM.L_SSOClientError="S'ha produït un error a la sol·licitud d'autenticació de l'Office.";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} vol mostrar una finestra nova.";Strings.OfficeOM.L_ReadSettingsError="Error de configuració de lectura";Strings.OfficeOM.L_FunctionCallFailed="Error de crida de la funció {0}, codi d'error: {1}.";Strings.OfficeOM.L_NotSupportedEventType="El tipus d'incidència {0} especificat no s'admet.";Strings.OfficeOM.L_DialogAlreadyOpened="Ha fallat l'operació perquè aquest complement ja té un diàleg actiu.";Strings.OfficeOM.L_InvalidFormatValue="Hi ha un o més paràmetres de format que tenen valors no permesos. Comproveu-los i torneu-ho a provar.";Strings.OfficeOM.L_DialogNavigateError="Error de navegació per diàleg";Strings.OfficeOM.L_InvalidBinding="Vinculació no vàlida";Strings.OfficeOM.L_InternalErrorDescription="S'ha produït un error intern.";Strings.OfficeOM.L_BindingNotExist="La vinculació especificada no existeix.";Strings.OfficeOM.L_InvalidSelectionForBindingType="Amb la selecció actual i el tipus de vinculació especificat no es pot crear una vinculació.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="L'aplicació amfitriona actual no admet l'enumeració.";Strings.OfficeOM.L_MultipleNamedItemFound="S'han trobat múltiples objectes amb el mateix nom.";Strings.OfficeOM.L_EventHandlerRemovalFailed="No s'ha pogut eliminar el controlador d'incidències.";Strings.OfficeOM.L_RedundantCallbackSpecification="La trucada no es pot especificar alhora a la llista d'arguments i a l'objecte opcional.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Feu una selecció.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="L'XPath limita la selecció a 1024 elements.";Strings.OfficeOM.L_InvalidGetStartRowColumn="Els valors startRow o startColumn especificats no són vàlids.";Strings.OfficeOM.L_RequestTimeout="S'ha trigat massa temps a executar la trucada.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="El tipus d'identitat de l'usuari no s'admet.";Strings.OfficeOM.L_SelectionCannotBound="No es pot vincular amb la selecció actual.";Strings.OfficeOM.L_InvalidSetColumns="Les columnes especificades no són vàlides.";Strings.OfficeOM.L_SettingsCannotSave="No s'ha pogut desar la configuració.";Strings.OfficeOM.L_NotSupportedBindingType="El tipus de vinculació {0} especificat no s'admet.";Strings.OfficeOM.L_DialogRequireHTTPS="El protocol HTTP no és compatible. Utilitzeu el protocol HTTPS.";Strings.OfficeOM.L_InvalidResourceUrlMessage="Al manifest heu especificat una adreça URL de recurs que no és vàlida.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Les restriccions del navegador han evitat que es creï el quadre de diàleg. El domini del quadre de diàleg i el de l'amfitrió del complement no són a la mateixa zona de seguretat.";Strings.OfficeOM.L_DataWriteError="Error d'escriptura de dades";Strings.OfficeOM.L_HostError="Error d'amfitrió";Strings.OfficeOM.L_ConnectionFailureWithDetails="Hi ha hagut un error en processar la sol·licitud. Codi d'estat: {0}; codi d'error: {1}; missatge d'error: {2}.";Strings.OfficeOM.L_InvalidGetRows="Les files especificades no són vàlides." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/ca-es/outlook_strings.debug.js b/node_modules/@microsoft/office-js/dist/ca-es/outlook_strings.debug.js index d212417..0f9a879 100644 --- a/node_modules/@microsoft/office-js/dist/ca-es/outlook_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/ca-es/outlook_strings.debug.js @@ -1,34 +1,35 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("_u"); _u.ExtensibilityStrings = function() { }; _u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings"); -_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Els paràmetres indicats no coincideixen amb el format esperat."; +_u.ExtensibilityStrings.l_InternalProtocolError_Text = "Error de protocol intern: '{0}'."; +_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "L’usuari ha suprimit el fitxer adjunt abans que acabés la càrrega."; +_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "No s’han pogut afegir els fitxers adjunts perquè el missatge ja conté el nombre màxim de fitxers adjunts"; _u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "S'ha canviat l'element seleccionat."; -_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "No es pot suprimir el fitxer adjunt de l'element."; -_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "L'identificador del fitxer adjunt no era vàlid."; -_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "L’usuari ha canviat la posició del cursor mentre s’estaven inserint les dades."; +_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "Cal un permís elevat per cridar el mètode: '{0}'."; +_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Per accedir als membres protegits de l'API Javascript per a Office cal un permís elevat."; +_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "No s'han subministrat destinataris vàlids."; +_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Un o més dels noms de visualització indicats és massa llarg."; _u.ExtensibilityStrings.l_InvalidEndTime_Text = "L'hora de finalització no pot ser anterior a l'hora d'inici."; _u.ExtensibilityStrings.l_InvalidEventDates_Text = "La data de finalització és anterior a la data d'inici."; +_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "No es pot afegir el fitxer adjunt a l'element."; +_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "No es pot suprimir el fitxer adjunt perquè no es pot trobar el fitxer adjunt amb l’índex del fitxer adjunt."; +_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Els paràmetres indicats no coincideixen amb el format esperat."; _u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Una o més de les adreces electròniques indicades és massa llarga."; +_u.ExtensibilityStrings.l_InternalFormatError_Text = "S'ha produït un error de format intern."; +_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "No es pot afegir el fitxer adjunt perquè és massa gran."; _u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Error d'escriptura de dades"; +_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "El nombre total de destinataris al camp no pot superar els {0}."; _u.ExtensibilityStrings.l_OffsetNotfound_Text = "No s'ha pogut trobar cap desplaçament per a aquesta marca d'hora."; -_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Error de fitxer adjunt"; -_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "No s’han pogut afegir els fitxers adjunts perquè el missatge ja conté el nombre màxim de fitxers adjunts"; -_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "No es pot afegir el fitxer adjunt perquè és massa gran."; -_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "El camí del fitxer adjunt no era vàlid."; -_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "No es pot afegir el fitxer adjunt a l'element."; -_u.ExtensibilityStrings.l_InternalProtocolError_Text = "Error de protocol intern: '{0}'."; -_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "El sanejament d'HTML ha fallat."; -_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "La sol·licitud supera la mida límit d'1 MB. Modifiqueu la sol·licitud de l'EWS."; _u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Els fitxers adjunts no es poden afegir mentre s’està recuperant la resposta completa o el reenviament del servidor."; -_u.ExtensibilityStrings.l_InternalFormatError_Text = "S'ha produït un error de format intern."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Per accedir als membres protegits de l'API Javascript per a Office cal un permís elevat."; -_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "L’usuari ha suprimit el fitxer adjunt abans que acabés la càrrega."; -_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "No s'han subministrat destinataris vàlids."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "Cal un permís elevat per cridar el mètode: '{0}'."; -_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Un o més dels noms de visualització indicats és massa llarg."; +_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "El sanejament d'HTML ha fallat."; +_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "L’usuari ha canviat la posició del cursor mentre s’estaven inserint les dades."; _u.ExtensibilityStrings.l_InvalidDate_Text = "L'entrada no es resol en una data vàlida."; -_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "El nombre total de destinataris al camp no pot superar els {0}."; -_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "No es pot suprimir el fitxer adjunt perquè no es pot trobar el fitxer adjunt amb l’índex del fitxer adjunt." +_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "La sol·licitud supera la mida límit d'1 MB. Modifiqueu la sol·licitud de l'EWS."; +_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Error de fitxer adjunt"; +_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "No es pot suprimir el fitxer adjunt de l'element."; +_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "El camí del fitxer adjunt no era vàlid."; +_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "L'identificador del fitxer adjunt no era vàlid." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/ca-es/outlook_strings.js b/node_modules/@microsoft/office-js/dist/ca-es/outlook_strings.js index 84be310..8b4432f 100644 --- a/node_modules/@microsoft/office-js/dist/ca-es/outlook_strings.js +++ b/node_modules/@microsoft/office-js/dist/ca-es/outlook_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Els paràmetres indicats no coincideixen amb el format esperat.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="S'ha canviat l'element seleccionat.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="No es pot suprimir el fitxer adjunt de l'element.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="L'identificador del fitxer adjunt no era vàlid.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="L’usuari ha canviat la posició del cursor mentre s’estaven inserint les dades.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="L'hora de finalització no pot ser anterior a l'hora d'inici.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="La data de finalització és anterior a la data d'inici.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Una o més de les adreces electròniques indicades és massa llarga.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Error d'escriptura de dades";_u.ExtensibilityStrings.l_OffsetNotfound_Text="No s'ha pogut trobar cap desplaçament per a aquesta marca d'hora.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Error de fitxer adjunt";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="No s’han pogut afegir els fitxers adjunts perquè el missatge ja conté el nombre màxim de fitxers adjunts";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="No es pot afegir el fitxer adjunt perquè és massa gran.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="El camí del fitxer adjunt no era vàlid.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="No es pot afegir el fitxer adjunt a l'element.";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Error de protocol intern: '{0}'.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="El sanejament d'HTML ha fallat.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="La sol·licitud supera la mida límit d'1 MB. Modifiqueu la sol·licitud de l'EWS.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Els fitxers adjunts no es poden afegir mentre s’està recuperant la resposta completa o el reenviament del servidor.";_u.ExtensibilityStrings.l_InternalFormatError_Text="S'ha produït un error de format intern.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Per accedir als membres protegits de l'API Javascript per a Office cal un permís elevat.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="L’usuari ha suprimit el fitxer adjunt abans que acabés la càrrega.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="No s'han subministrat destinataris vàlids.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Cal un permís elevat per cridar el mètode: '{0}'.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Un o més dels noms de visualització indicats és massa llarg.";_u.ExtensibilityStrings.l_InvalidDate_Text="L'entrada no es resol en una data vàlida.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="El nombre total de destinataris al camp no pot superar els {0}.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="No es pot suprimir el fitxer adjunt perquè no es pot trobar el fitxer adjunt amb l’índex del fitxer adjunt." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_InternalProtocolError_Text="Error de protocol intern: '{0}'.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="L’usuari ha suprimit el fitxer adjunt abans que acabés la càrrega.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="No s’han pogut afegir els fitxers adjunts perquè el missatge ja conté el nombre màxim de fitxers adjunts";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="S'ha canviat l'element seleccionat.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Cal un permís elevat per cridar el mètode: '{0}'.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Per accedir als membres protegits de l'API Javascript per a Office cal un permís elevat.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="No s'han subministrat destinataris vàlids.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Un o més dels noms de visualització indicats és massa llarg.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="L'hora de finalització no pot ser anterior a l'hora d'inici.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="La data de finalització és anterior a la data d'inici.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="No es pot afegir el fitxer adjunt a l'element.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="No es pot suprimir el fitxer adjunt perquè no es pot trobar el fitxer adjunt amb l’índex del fitxer adjunt.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Els paràmetres indicats no coincideixen amb el format esperat.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Una o més de les adreces electròniques indicades és massa llarga.";_u.ExtensibilityStrings.l_InternalFormatError_Text="S'ha produït un error de format intern.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="No es pot afegir el fitxer adjunt perquè és massa gran.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Error d'escriptura de dades";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="El nombre total de destinataris al camp no pot superar els {0}.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="No s'ha pogut trobar cap desplaçament per a aquesta marca d'hora.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Els fitxers adjunts no es poden afegir mentre s’està recuperant la resposta completa o el reenviament del servidor.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="El sanejament d'HTML ha fallat.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="L’usuari ha canviat la posició del cursor mentre s’estaven inserint les dades.";_u.ExtensibilityStrings.l_InvalidDate_Text="L'entrada no es resol en una data vàlida.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="La sol·licitud supera la mida límit d'1 MB. Modifiqueu la sol·licitud de l'EWS.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Error de fitxer adjunt";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="No es pot suprimir el fitxer adjunt de l'element.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="El camí del fitxer adjunt no era vàlid.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="L'identificador del fitxer adjunt no era vàlid." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/cs-cz/office_strings.debug.js b/node_modules/@microsoft/office-js/dist/cs-cz/office_strings.debug.js index 8e4101c..9600bfb 100644 --- a/node_modules/@microsoft/office-js/dist/cs-cz/office_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/cs-cz/office_strings.debug.js @@ -1,179 +1,190 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("Strings"); Strings.OfficeOM = function() { }; Strings.OfficeOM.registerClass("Strings.OfficeOM"); +Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Zadaný typ pÅ™evodu není kompatibilní s tímto typem vazby."; +Strings.OfficeOM.L_MissingRequiredArguments = "chybí nÄ›které požadované argumenty"; +Strings.OfficeOM.L_CustomXmlError = "Chyba vlastního kódu XML"; +Strings.OfficeOM.L_InvalidFormat = "Chyba neplatného formátu"; +Strings.OfficeOM.L_SettingsStaleError = "Chyba zastaralých nastavení"; +Strings.OfficeOM.L_CoercionTypeNotSupported = "Zadaný typ pÅ™evodu není podporovaný."; +Strings.OfficeOM.L_EventHandlerRemovalFailed = "Nepovedlo se odebrat obslužnou rutinu události."; +Strings.OfficeOM.L_HostError = "Chyba hostitele"; +Strings.OfficeOM.L_NamedItemNotFound = "Pojmenovaná položka neexistuje."; +Strings.OfficeOM.L_TooManyIncompleteRequests = "PoÄkejte, než se dokonÄí pÅ™edchozí volání."; Strings.OfficeOM.L_TooManyOptionalObjects = "více volitelných objektů v seznamu parametrů"; -Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Problémy se sítí zabránily naÄtení souboru."; -Strings.OfficeOM.L_RedundantCallbackSpecification = "ZpÄ›tné volání nemůže být zadané v seznamu argumentů i ve volitelném objektu."; -Strings.OfficeOM.L_InValidOptionalArgument = "neplatný volitelný argument"; -Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "DoplnÄ›k už žádá o přístupový token"; -Strings.OfficeOM.L_UnsupportedEnumerationMessage = "VýÄet není v aktuální hostitelské aplikaci podporovaný."; -Strings.OfficeOM.L_InvalidParameters = "Funkce {0} má neplatné parametry."; +Strings.OfficeOM.L_BadSelectorString = "ŘetÄ›zec pÅ™edaný selektoru je nesprávnÄ› naformátovaný nebo není podporovaný."; +Strings.OfficeOM.L_NotSupportedBindingType = "Zadaný typ vazby {0} není podporovaný."; +Strings.OfficeOM.L_AppNameNotExist = "Název doplňku pro: {0} neexistuje."; +Strings.OfficeOM.L_CloseFileBeforeRetrieve = "PÅ™ed naÄtením dalšího souboru volejte closeAsync pro aktuální soubor."; +Strings.OfficeOM.L_InvalidGetStartRowColumn = "Zadané hodnoty startRow nebo startColumn jsou neplatné."; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage = "Operace selhala, protože tento doplnÄ›k v této kategorii nepodporuje vyjádÅ™ení souhlasu uživatele."; +Strings.OfficeOM.L_InvalidResourceUrl = "Je zadaná neplatná adresa URL prostÅ™edku aplikace."; +Strings.OfficeOM.L_EventHandlerNotExist = "Zadaná obslužná rutina událostí se pro tuto vazbu nenaÅ¡la."; +Strings.OfficeOM.L_OutOfRange = "Mimo rozsah"; +Strings.OfficeOM.L_InvalidReadForBlankRow = "Zadaný řádek je prázdný."; +Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "Probíhá pokus nastavit vlastnost jen pro Ätení {0}."; +Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Nemohli jsme dialogové okno vytvoÅ™it kvůli omezení prohlížeÄe. Doména dialogového okna a doména hostitele doplňku nejsou ve stejné zónÄ› zabezpeÄení."; +Strings.OfficeOM.L_ActivityLimitReached = "Byl dosažený limit aktivity."; +Strings.OfficeOM.L_CustomFunctionNameContainsBadChars = "Název funkce může obsahovat pouze písmena, Äíslice, podtržítka a teÄky."; +Strings.OfficeOM.L_InvalidSetStartRowColumn = "Zadané hodnoty startRow nebo startColumn jsou neplatné."; +Strings.OfficeOM.L_MemoryLimit = "PÅ™ekroÄený limit pamÄ›ti"; +Strings.OfficeOM.L_RequestTimeout = "Zpracování volání trvalo moc dlouho."; +Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Vyberte nÄ›co, prosím."; +Strings.OfficeOM.L_SSOServerErrorMessage = "Na serveru doÅ¡lo k neoÄekávané chybÄ›."; +Strings.OfficeOM.L_NavOutOfBound = "Operace se nepovedla, protože index je mimo rozsah."; +Strings.OfficeOM.L_InvalidColumnsForBinding = "Zadané sloupce jsou neplatné."; +Strings.OfficeOM.L_UserAborted = "Uživatel pÅ™eruÅ¡il žádost o souhlas."; +Strings.OfficeOM.L_OverwriteWorksheetData = "Operace nastavení se nepovedla, protože zadaný datový objekt pÅ™epíše nebo posune data."; +Strings.OfficeOM.L_GetSelectionNotSupported = "Aktuální výbÄ›r není podporovaný."; +Strings.OfficeOM.L_InvalidBindingOperation = "Neplatná operace vazby"; +Strings.OfficeOM.L_NotSupportedEventType = "Zadaný typ události {0} není podporovaný."; +Strings.OfficeOM.L_NewWindowCrossZone = "Nastavení zabezpeÄení ve vaÅ¡em prohlížeÄi nám brání ve vytvoÅ™ení dialogového okna. Zkuste jiný prohlížeÄ nebo si {0}, aby {1} a doména zobrazená ve vaÅ¡em panelu Adresa byly ve stejné zónÄ› zabezpeÄení."; +Strings.OfficeOM.L_RowIndexOutOfRange = "Hodnota indexu řádku je mimo povolený rozsah. Použijte hodnotu (0 nebo vyšší), která je menší než poÄet řádků."; +Strings.OfficeOM.L_SpecifiedIdNotExist = "Zadané ID neexistuje."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Operace se nepovedla, protože tento doplnÄ›k už žádá o přístupový token."; +Strings.OfficeOM.L_InvalidSelectionForBindingType = "Nejde vytvoÅ™it vazbu s aktuálním výbÄ›rem a zadaným typem vazby."; +Strings.OfficeOM.L_SaveSettingsError = "Chyba ukládání nastavení"; +Strings.OfficeOM.L_MissingParameter = "ChybÄ›jící parametr"; +Strings.OfficeOM.L_BrowserAPINotSupported = "Tento prohlížeÄ nepodporuje požadované rozhraní API."; +Strings.OfficeOM.L_NotImplemented = "Funkce {0} není implementovaná."; +Strings.OfficeOM.L_InvalidGetColumns = "Zadané sloupce jsou neplatné."; +Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Operace není u tohoto typu vazby podporovaná."; +Strings.OfficeOM.L_DialogOK = "OK"; +Strings.OfficeOM.L_GetDataParametersConflict = "Zadané parametry způsobují konflikt."; +Strings.OfficeOM.L_DataNotMatchCoercionType = "Typ zadaného datového objektu není kompatibilní s aktuálním výbÄ›rem."; +Strings.OfficeOM.L_ShuttingDown = "Operace se nepovedla, protože data na serveru nejsou aktuální."; +Strings.OfficeOM.L_DialogNavigateError = "Chyba navigace v dialogovém oknÄ›"; +Strings.OfficeOM.L_InvalidRequestContext = "Objekt nejde použít v různých kontextech požadavků."; +Strings.OfficeOM.L_SettingsCannotSave = "Nastavení nejde uložit."; +Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Neplatné vstupní argumenty"; +Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Parametry souÅ™adnic nejde použít s pÅ™evodem typu Tabulka, pokud tabulka obsahuje slouÄené buňky."; Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Aktuální výbÄ›r není kompatibilní se zadaným typem pÅ™evodu."; -Strings.OfficeOM.L_APINotSupported = "API není podporované"; -Strings.OfficeOM.L_SelectionCannotBound = "Nejde vytvoÅ™it vazbu na aktuální výbÄ›r."; -Strings.OfficeOM.L_FileTypeNotSupported = "Zadaný typ souboru není podporovaný."; -Strings.OfficeOM.L_InvalidBinding = "Neplatná vazba"; -Strings.OfficeOM.L_InvalidTableOptionValue = "MinimálnÄ› jeden parametr tableOptions má hodnoty, které nejsou povolené. PÅ™ekontrolujte hodnoty a zkuste to znovu."; -Strings.OfficeOM.L_PermissionDenied = "OprávnÄ›ní odepÅ™ena"; +Strings.OfficeOM.L_DataNotMatchSelection = "Zadaný datový objekt není kompatibilní s tvarem nebo rozmÄ›ry aktuálního výbÄ›ru."; Strings.OfficeOM.L_DataStale = "Neaktuální data"; -Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Poznámka: Tabulka by nemÄ›la obsahovat víc než 20 000 bunÄ›k."; -Strings.OfficeOM.L_SSOClientErrorMessage = "V klientovi doÅ¡lo k neoÄekávané chybÄ›."; -Strings.OfficeOM.L_SSOClientError = "V požadavku na ověření z Office se vyskytla chyba."; -Strings.OfficeOM.L_InvalidRequestContext = "Objekt nejde použít v různých kontextech požadavků."; -Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Data jsou zastaralá. NaÄtÄ›te objekt znovu."; -Strings.OfficeOM.L_InternalError = "VnitÅ™ní chyba"; -Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath omezuje výbÄ›r na 1024 položek."; -Strings.OfficeOM.L_CustomXmlOutOfDateName = "Neaktuální data"; -Strings.OfficeOM.L_SetDataIsTooLarge = "Zadaný datový objekt je moc velký."; +Strings.OfficeOM.L_InvalidGetRows = "Zadané řádky jsou neplatné."; +Strings.OfficeOM.L_InvalidParameters = "Funkce {0} má neplatné parametry."; +Strings.OfficeOM.L_DialogAlreadyOpened = "Operace se nepovedla, protože tento doplnÄ›k už má aktivní okno."; +Strings.OfficeOM.L_DialogRequireHTTPS = "Protokol HTTP se nepodporuje. Použijte prosím HTTPS."; +Strings.OfficeOM.L_InvalidObjectPath = "Cesta k objektu {0} není pro požadovanou akci funkÄní. Pokud používáte objekt ve více voláních context.sync a mimo sekvenÄní provádÄ›ní dávky .run, použijte prosím metody context.trackedObjects.add() a context.trackedObjects.remove() pro správu životnosti objektu."; +Strings.OfficeOM.L_APINotSupported = "API není podporované"; +Strings.OfficeOM.L_InvalidOperationInCellEditMode = "Excel je v režimu úprav buňky. UkonÄete prosím režim úprav stisknutím klávesy ENTER nebo TAB nebo výbÄ›rem jiné buňky a pak to zkuste znovu."; +Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Dosáhli jste maximální velikosti výbÄ›ru"; +Strings.OfficeOM.L_FormatValueOutOfRange = "Hodnota je mimo povolený rozsah."; +Strings.OfficeOM.L_NoCapability = "K provedení této akce nemáte dostateÄná oprávnÄ›ní."; +Strings.OfficeOM.L_EventHandlerAdditionFailed = "Nepovedlo se pÅ™idat obslužnou rutinu události."; +Strings.OfficeOM.L_DataNotMatchBindingSize = "Zadaný datový objekt se neshoduje s velikostí aktuálního výbÄ›ru."; Strings.OfficeOM.L_BindingNotExist = "Zadaná vazba neexistuje."; -Strings.OfficeOM.L_OperationNotSupported = "Operace není podporovaná."; -Strings.OfficeOM.L_BrowserAPINotSupported = "Tento prohlížeÄ nepodporuje požadované rozhraní API."; -Strings.OfficeOM.L_CannotRegisterEvent = "Nedá se zaregistrovat obslužná rutina události."; +Strings.OfficeOM.L_RunMustReturnPromise = "Dávková funkce pÅ™edaná metodÄ› .run nevrátila příslib. Funkce musí vracet příslib, aby se po dokonÄení dávkové operace mohly uvolnit automaticky sledované objekty. Obvykle se příslib vrací vrácením odpovÄ›di z context.sync()."; +Strings.OfficeOM.L_SettingsAreStale = "Nastavení se nepodaÅ™ilo uložit, protože nejsou aktuální."; +Strings.OfficeOM.L_UserNotSignedIn = "Žádný uživatel není pÅ™ihlášený v Office."; +Strings.OfficeOM.L_InvalidCellsValue = "MinimálnÄ› jeden parametr buňky má hodnoty, které nejsou povolené. PÅ™ekontrolujte hodnoty a zkuste to znovu."; +Strings.OfficeOM.L_PropertyDoesNotExist = "Vlastnost {0} u objektu neexistuje."; +Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} chce zobrazit nové okno."; +Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Data jsou zastaralá. NaÄtÄ›te objekt znovu."; +Strings.OfficeOM.L_SSOConnectionLostError = "A connection was lost during the sign in process."; +Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Typ identity uživatele se nepodporuje."; +Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Problémy se sítí zabránily naÄtení souboru."; +Strings.OfficeOM.L_SSOServerError = "Ve zprostÅ™edkovateli ověřování doÅ¡lo k chybÄ›."; +Strings.OfficeOM.L_DataReadError = "Chyba Ätení dat"; +Strings.OfficeOM.L_InitializeNotReady = "Soubor Office.js jeÅ¡tÄ› není úplnÄ› naÄtený. Zkuste to znovu pozdÄ›ji nebo pÅ™idejte inicializaÄní kód do funkce Office.initialize."; +Strings.OfficeOM.L_ValueNotLoaded = "JeÅ¡tÄ› se nenaÄetla hodnota výsledného objektu. PÅ™ed pÅ™eÄtením hodnoty vlastnosti volejte metodu context.sync() pro kontext pÅ™idružené žádosti."; +Strings.OfficeOM.L_InvalidArgument = "Argument {0} nefunguje pro tuto situaci, chybí nebo není ve správném formátu."; +Strings.OfficeOM.L_ReadSettingsError = "Chyba Ätení nastavení"; +Strings.OfficeOM.L_UserAbortedMessage = "Uživatel nevyslovil souhlas s oprávnÄ›ními pro doplnÄ›k."; +Strings.OfficeOM.L_MultipleNamedItemFound = "NaÅ¡lo se více objektů se stejným názvem."; Strings.OfficeOM.L_UnsupportedUserIdentity = "Typ identity uživatele se nepodporuje."; -Strings.OfficeOM.L_InternalErrorDescription = "DoÅ¡lo k vnitÅ™ní chybÄ›."; +Strings.OfficeOM.L_APICallFailed = "Volání API selhalo"; +Strings.OfficeOM.L_FormattingReminder = "PÅ™ipomenutí formátování"; +Strings.OfficeOM.L_FunctionCallFailed = "Volání funkce {0} se nepovedlo, kód chyby: {1}."; +Strings.OfficeOM.L_InvalidCoercion = "Neplatný typ pÅ™evodu"; Strings.OfficeOM.L_CustomXmlNodeNotFound = "Zadaný uzel nejde najít."; -Strings.OfficeOM.L_ElementMissing = "Nemohli jsme naformátovat buňku tabulky, protože chybí nÄ›které hodnoty parametrů. JeÅ¡tÄ› jednou zkontrolujte parametry a zkuste to znovu."; +Strings.OfficeOM.L_SSOClientError = "V požadavku na ověření z Office se vyskytla chyba."; +Strings.OfficeOM.L_InvalidGrant = "Chybí pÅ™edběžná autorizace."; +Strings.OfficeOM.L_CustomFunctionNameCannotSplit = "Název funkce musí obsahovat neprázdný obor názvů a neprázdný krátký název."; +Strings.OfficeOM.L_RedundantCallbackSpecification = "ZpÄ›tné volání nemůže být zadané v seznamu argumentů i ve volitelném objektu."; +Strings.OfficeOM.L_CustomFunctionImplementationMissing = "Vlastnost s tímto názvem v Excel.CustomFunctions, která pÅ™edstavuje definici funkce, musí obsahovat vlastnost call implementující funkci."; +Strings.OfficeOM.L_SetDataIsTooLarge = "Zadaný datový objekt je moc velký."; Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Parametry souÅ™adnic nejde použít s pÅ™evodem typu Tabulka, pokud tabulka obsahuje slouÄené buňky."; -Strings.OfficeOM.L_EventHandlerRemovalFailed = "Nepovedlo se odebrat obslužnou rutinu události."; -Strings.OfficeOM.L_UserAborted = "Uživatel pÅ™eruÅ¡il žádost o souhlas."; -Strings.OfficeOM.L_OverwriteWorksheetData = "Operace nastavení se nepovedla, protože zadaný datový objekt pÅ™epíše nebo posune data."; -Strings.OfficeOM.L_TooManyIncompleteRequests = "PoÄkejte, než se dokonÄí pÅ™edchozí volání."; -Strings.OfficeOM.L_InvalidSetStartRowColumn = "Zadané hodnoty startRow nebo startColumn jsou neplatné."; -Strings.OfficeOM.L_ActivityLimitReached = "Byl dosažený limit aktivity."; -Strings.OfficeOM.L_FunctionCallFailed = "Volání funkce {0} se nepovedlo, kód chyby: {1}."; -Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "VaÅ¡e relace Office Online je neplatná nebo vyprÅ¡el její Äasový limit. Pokud chcete pokraÄovat, aktualizujte stránku."; -Strings.OfficeOM.L_DataNotMatchBindingType = "Zadaný datový objekt není kompatibilní s typem vazby."; -Strings.OfficeOM.L_NavOutOfBound = "Operace se nepovedla, protože index je mimo rozsah."; -Strings.OfficeOM.L_InvalidApiCallInContext = "Neplatné volání rozhraní API v aktuálním kontextu"; -Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Vyberte nÄ›co, prosím."; +Strings.OfficeOM.L_IndexOutOfRange = "Index je mimo rozsah."; Strings.OfficeOM.L_DisplayDialogError = "Chyba zobrazení dialogového okna"; -Strings.OfficeOM.L_SSOServerError = "Ve zprostÅ™edkovateli ověřování doÅ¡lo k chybÄ›."; -Strings.OfficeOM.L_UnsupportedDataObject = "Zadaný typ datového objektu není podporovaný."; -Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Parametry souÅ™adnic nejde použít s pÅ™evodem typu Tabulka, pokud tabulka obsahuje slouÄené buňky."; -Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Vybraný obsah musí být ve formátu tabulky. Zformátujte data jako tabulku a zkuste to znovu."; -Strings.OfficeOM.L_DataNotMatchSelection = "Zadaný datový objekt není kompatibilní s tvarem nebo rozmÄ›ry aktuálního výbÄ›ru."; -Strings.OfficeOM.L_ReadSettingsError = "Chyba Ätení nastavení"; -Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Operace není u tohoto typu vazby podporovaná."; -Strings.OfficeOM.L_InvalidOrTimedOutSession = "Relace je neplatná nebo vyprÅ¡el její Äasový limit"; -Strings.OfficeOM.L_InvalidCellsValue = "MinimálnÄ› jeden parametr buňky má hodnoty, které nejsou povolené. PÅ™ekontrolujte hodnoty a zkuste to znovu."; +Strings.OfficeOM.L_NetworkProblem = "Problém se sítí"; +Strings.OfficeOM.L_ApiNotFoundDetails = "Metoda nebo vlastnost {0} je souÄástí sady požadavků {1}, která ve vaší verzi aplikace {2} není dostupná."; Strings.OfficeOM.L_InvalidDataObject = "Neplatný datový objekt"; -Strings.OfficeOM.L_CallbackNotAFunction = "ZpÄ›tné volání musí být typu funkce. Bylo typu {0}."; Strings.OfficeOM.L_InvalidValue = "Neplatná hodnota"; -Strings.OfficeOM.L_InvalidGetColumns = "Zadané sloupce jsou neplatné."; -Strings.OfficeOM.L_InvalidArgumentGeneric = "Argument nebo argumenty pÅ™edané funkci nejsou použitelné v této situaci, nejsou úplné nebo nemají správný formát."; -Strings.OfficeOM.L_MissingRequiredArguments = "chybí nÄ›které požadované argumenty"; -Strings.OfficeOM.L_OutOfRange = "Mimo rozsah"; -Strings.OfficeOM.L_GetDataIsTooLarge = "Požadovaná sada dat je moc velká."; -Strings.OfficeOM.L_EventRegistrationError = "Chyba registrace události"; -Strings.OfficeOM.L_IndexOutOfRange = "Index je mimo rozsah."; +Strings.OfficeOM.L_Timeout = "ÄŒasový limit operace vyprÅ¡el."; +Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Poznámka: Tabulka by nemÄ›la obsahovat víc než 20 000 bunÄ›k."; +Strings.OfficeOM.L_FileTypeNotSupported = "Zadaný typ souboru není podporovaný."; +Strings.OfficeOM.L_InvalidOrTimedOutSession = "Relace je neplatná nebo vyprÅ¡el její Äasový limit"; +Strings.OfficeOM.L_InvalidBindingError = "Chyba neplatné vazby"; +Strings.OfficeOM.L_CannotWriteToSelection = "Do aktuálního výbÄ›ru se nedá zapisovat."; +Strings.OfficeOM.L_InternalError = "VnitÅ™ní chyba"; +Strings.OfficeOM.L_PropertyNotLoaded = "Vlastnost {0} není k dispozici. PÅ™ed pÅ™eÄtením hodnoty vlastnosti volejte metodu pro naÄtení nadÅ™azeného objektu a potom volejte context.sync() pro pÅ™idružený kontext požadavku."; +Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath omezuje výbÄ›r na 1024 položek."; +Strings.OfficeOM.L_SliceSizeNotSupported = "Zadaná velikost Å™ezu není podporovaná."; +Strings.OfficeOM.L_InvalidApiCallInContext = "Neplatné volání rozhraní API v aktuálním kontextu"; +Strings.OfficeOM.L_SetDataParametersConflict = "Zadané parametry způsobují konflikt."; +Strings.OfficeOM.L_InvalidDataFormat = "Formát zadaného datového objektu je neplatný."; +Strings.OfficeOM.L_SSOClientErrorMessage = "V klientovi doÅ¡lo k neoÄekávané chybÄ›."; +Strings.OfficeOM.L_RequestTokenUnavailable = "Toto rozhraní API se omezilo, aby se zpomalila Äetnost volání."; +Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Ignorovat"; +Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Zadaný typ vazby není kompatibilní se zadanou pojmenovanou položkou."; +Strings.OfficeOM.L_CannotNavigateTo = "Objekt je v umístÄ›ní, kde se nepodporuje navigace."; Strings.OfficeOM.L_NotSupported = "Funkce {0} není podporovaná."; -Strings.OfficeOM.L_BadSelectorString = "ŘetÄ›zec pÅ™edaný selektoru je nesprávnÄ› naformátovaný nebo není podporovaný."; -Strings.OfficeOM.L_NamedItemNotFound = "Pojmenovaná položka neexistuje."; +Strings.OfficeOM.L_UnsupportedEnumerationMessage = "VýÄet není v aktuální hostitelské aplikaci podporovaný."; +Strings.OfficeOM.L_CustomXmlOutOfDateName = "Neaktuální data"; +Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = "Pro zmÄ›ny vlastnosti {0} nejde použít metodu object.set."; +Strings.OfficeOM.L_GetDataIsTooLarge = "Požadovaná sada dat je moc velká."; +Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "prohlížeÄ nakonfigurujte"; +Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Poznámka: PÅ™es volání formátovacího API by se nemÄ›lo nastavovat víc než 100 formátování."; +Strings.OfficeOM.L_DialogAddressNotTrusted = "Doména adresy URL není zahrnutá v elementu AppDomains v manifestu."; +Strings.OfficeOM.L_InvalidSetRows = "Zadané řádky jsou neplatné."; +Strings.OfficeOM.L_ConnectionFailureWithDetails = "Žádost selhala se stavovým kódem {0}, kódem chyby {1} a následující chybovou zprávou: {2}"; +Strings.OfficeOM.L_PermissionDenied = "OprávnÄ›ní odepÅ™ena"; +Strings.OfficeOM.L_UserClickIgnore = "Uživatel se rozhodl ignorovat dialogové okno."; Strings.OfficeOM.L_ConnectionFailureWithStatus = "Žádost selhala se stavovým kódem {0}."; -Strings.OfficeOM.L_DataWriteError = "Chyba zápisu dat"; -Strings.OfficeOM.L_InvalidReadForBlankRow = "Zadaný řádek je prázdný."; -Strings.OfficeOM.L_MultipleNamedItemFound = "NaÅ¡lo se více objektů se stejným názvem."; -Strings.OfficeOM.L_InvalidBindingOperation = "Neplatná operace vazby"; -Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Nemohli jsme dialogové okno vytvoÅ™it kvůli omezení prohlížeÄe. Doména dialogového okna a doména hostitele doplňku nejsou ve stejné zónÄ› zabezpeÄení."; -Strings.OfficeOM.L_DataNotMatchBindingSize = "Zadaný datový objekt se neshoduje s velikostí aktuálního výbÄ›ru."; -Strings.OfficeOM.L_NotSupportedBindingType = "Zadaný typ vazby {0} není podporovaný."; -Strings.OfficeOM.L_BindingToMultipleSelection = "Nesouvislé výbÄ›ry nejsou podporované."; -Strings.OfficeOM.L_InvalidResourceUrl = "Je zadaná neplatná adresa URL prostÅ™edku aplikace."; -Strings.OfficeOM.L_NetworkProblem = "Problém se sítí"; -Strings.OfficeOM.L_CloseFileBeforeRetrieve = "PÅ™ed naÄtením dalšího souboru volejte closeAsync pro aktuální soubor."; -Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Zadaný typ vazby není kompatibilní se zadanou pojmenovanou položkou."; Strings.OfficeOM.L_InvalidFormatValue = "MinimálnÄ› jeden parametr formátu má hodnoty, které nejsou povolené. PÅ™ekontrolujte hodnoty a zkuste to znovu."; -Strings.OfficeOM.L_DialogNavigateError = "Chyba navigace v dialogovém oknÄ›"; -Strings.OfficeOM.L_AppNameNotExist = "Název doplňku pro: {0} neexistuje."; -Strings.OfficeOM.L_InvalidBindingError = "Chyba neplatné vazby"; -Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Ignorovat"; -Strings.OfficeOM.L_InvalidGrantMessage = "Chybí oprávnÄ›ní pro tento doplnÄ›k."; -Strings.OfficeOM.L_NewWindowCrossZone = "Nastavení zabezpeÄení ve vaÅ¡em prohlížeÄi nám brání ve vytvoÅ™ení dialogového okna. Zkuste jiný prohlížeÄ nebo si {0}, aby {1} a doména zobrazená ve vaÅ¡em panelu Adresa byly ve stejné zónÄ› zabezpeÄení."; -Strings.OfficeOM.L_RunMustReturnPromise = "Dávková funkce pÅ™edaná metodÄ› .run nevrátila příslib. Funkce musí vracet příslib, aby se po dokonÄení dávkové operace mohly uvolnit automaticky sledované objekty. Obvykle se příslib vrací vrácením odpovÄ›di z context.sync()."; -Strings.OfficeOM.L_RequestTokenUnavailable = "Toto rozhraní API se omezilo, aby se zpomalila Äetnost volání."; Strings.OfficeOM.L_InvalidAPICall = "Neplatné volání rozhraní API"; -Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Neplatné vstupní argumenty"; -Strings.OfficeOM.L_PropertyDoesNotExist = "Vlastnost {0} u objektu neexistuje."; -Strings.OfficeOM.L_HostError = "Chyba hostitele"; -Strings.OfficeOM.L_FormattingReminder = "PÅ™ipomenutí formátování"; -Strings.OfficeOM.L_ValueNotLoaded = "JeÅ¡tÄ› se nenaÄetla hodnota výsledného objektu. PÅ™ed pÅ™eÄtením hodnoty vlastnosti volejte metodu context.sync() pro kontext pÅ™idružené žádosti."; -Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Poznámka: PÅ™es volání formátovacího API by se nemÄ›lo nastavovat víc než 100 formátování."; -Strings.OfficeOM.L_SettingsStaleError = "Chyba zastaralých nastavení"; -Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} chce zobrazit nové okno."; -Strings.OfficeOM.L_DialogInvalidScheme = "Schéma adresy URL není podporované. Použijte prosím HTTPS."; -Strings.OfficeOM.L_InvalidGetStartRowColumn = "Zadané hodnoty startRow nebo startColumn jsou neplatné."; -Strings.OfficeOM.L_MissingParameter = "ChybÄ›jící parametr"; -Strings.OfficeOM.L_InvalidArgument = "Argument {0} nefunguje pro tuto situaci, chybí nebo není ve správném formátu."; -Strings.OfficeOM.L_DataNotMatchCoercionType = "Typ zadaného datového objektu není kompatibilní s aktuálním výbÄ›rem."; -Strings.OfficeOM.L_DataWriteReminder = "PÅ™ipomenutí zápisu dat"; -Strings.OfficeOM.L_SaveSettingsError = "Chyba ukládání nastavení"; -Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = "Pro zmÄ›ny vlastnosti {0} nejde použít metodu object.set."; -Strings.OfficeOM.L_UserNotSignedIn = "Žádný uživatel není pÅ™ihlášený v Office."; -Strings.OfficeOM.L_CoercionTypeNotSupported = "Zadaný typ pÅ™evodu není podporovaný."; -Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Zadaný typ pÅ™evodu není kompatibilní s tímto typem vazby."; -Strings.OfficeOM.L_GetDataParametersConflict = "Zadané parametry způsobují konflikt."; -Strings.OfficeOM.L_NoCapability = "K provedení této akce nemáte dostateÄná oprávnÄ›ní."; -Strings.OfficeOM.L_CannotWriteToSelection = "Do aktuálního výbÄ›ru se nedá zapisovat."; -Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Povolit"; +Strings.OfficeOM.L_OperationNotSupported = "Operace není podporovaná."; +Strings.OfficeOM.L_DataWriteError = "Chyba zápisu dat"; +Strings.OfficeOM.L_TooManyArguments = "příliÅ¡ mnoho argumentů"; Strings.OfficeOM.L_UnsupportedEnumeration = "Nepodporovaný výÄet"; -Strings.OfficeOM.L_InvalidSetRows = "Zadané řádky jsou neplatné."; -Strings.OfficeOM.L_SSOServerErrorMessage = "Na serveru doÅ¡lo k neoÄekávané chybÄ›."; -Strings.OfficeOM.L_SetDataParametersConflict = "Zadané parametry způsobují konflikt."; -Strings.OfficeOM.L_EventHandlerAdditionFailed = "Nepovedlo se pÅ™idat obslužnou rutinu události."; -Strings.OfficeOM.L_UserAbortedMessage = "Uživatel nevyslovil souhlas s oprávnÄ›ními pro doplnÄ›k."; -Strings.OfficeOM.L_SettingNameNotExist = "Zadaný název nastavení neexistuje."; -Strings.OfficeOM.L_DialogOK = "OK"; -Strings.OfficeOM.L_InvalidColumnsForBinding = "Zadané sloupce jsou neplatné."; -Strings.OfficeOM.L_InvalidDataFormat = "Formát zadaného datového objektu je neplatný."; +Strings.OfficeOM.L_UnknownBindingType = "Tento typ vazby není podporovaný."; +Strings.OfficeOM.L_SelectionCannotBound = "Nejde vytvoÅ™it vazbu na aktuální výbÄ›r."; +Strings.OfficeOM.L_InvalidArgumentGeneric = "Argument nebo argumenty pÅ™edané funkci nejsou použitelné v této situaci, nejsou úplné nebo nemají správný formát."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "DoplnÄ›k už žádá o přístupový token"; +Strings.OfficeOM.L_DataNotMatchBindingType = "Zadaný datový objekt není kompatibilní s typem vazby."; +Strings.OfficeOM.L_SSOConnectionLostErrorMessage = "A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones."; Strings.OfficeOM.L_OsfControlTypeNotSupported = "Typ OsfControl není podporovaný."; +Strings.OfficeOM.L_InvalidTableOptionValue = "MinimálnÄ› jeden parametr tableOptions má hodnoty, které nejsou povolené. PÅ™ekontrolujte hodnoty a zkuste to znovu."; +Strings.OfficeOM.L_DataWriteReminder = "PÅ™ipomenutí zápisu dat"; +Strings.OfficeOM.L_InvalidGrantMessage = "Chybí oprávnÄ›ní pro tento doplnÄ›k."; Strings.OfficeOM.L_InvalidNode = "Neplatný uzel"; -Strings.OfficeOM.L_UserClickIgnore = "Uživatel se rozhodl ignorovat dialogové okno."; -Strings.OfficeOM.L_InitializeNotReady = "Soubor Office.js jeÅ¡tÄ› není úplnÄ› naÄtený. Zkuste to znovu pozdÄ›ji nebo pÅ™idejte inicializaÄní kód do funkce Office.initialize."; -Strings.OfficeOM.L_InvalidSetColumns = "Zadané sloupce jsou neplatné."; -Strings.OfficeOM.L_DialogRequireHTTPS = "Protokol HTTP se nepodporuje. Použijte prosím HTTPS."; -Strings.OfficeOM.L_InvalidSelectionForBindingType = "Nejde vytvoÅ™it vazbu s aktuálním výbÄ›rem a zadaným typem vazby."; -Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Aplikace {0} neexistuje. Nevolá se rutina Microsoft.Office.WebExtension.initialize(reason)."; -Strings.OfficeOM.L_InvalidCoercion = "Neplatný typ pÅ™evodu"; -Strings.OfficeOM.L_InvalidObjectPath = "Cesta k objektu {0} není pro požadovanou akci funkÄní. Pokud používáte objekt ve více voláních context.sync a mimo sekvenÄní provádÄ›ní dávky .run, použijte prosím metody context.trackedObjects.add() a context.trackedObjects.remove() pro správu životnosti objektu."; Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Zadané hodnoty rowCount nebo columnCount jsou neplatné."; -Strings.OfficeOM.L_BindingCreationError = "Chyba vytváření vazby"; -Strings.OfficeOM.L_InvalidGetRows = "Zadané řádky jsou neplatné."; -Strings.OfficeOM.L_UnknownBindingType = "Tento typ vazby není podporovaný."; -Strings.OfficeOM.L_CustomXmlError = "Chyba vlastního kódu XML"; -Strings.OfficeOM.L_EventHandlerNotExist = "Zadaná obslužná rutina událostí se pro tuto vazbu nenaÅ¡la."; -Strings.OfficeOM.L_SpecifiedIdNotExist = "Zadané ID neexistuje."; -Strings.OfficeOM.L_CannotNavigateTo = "Objekt je v umístÄ›ní, kde se nepodporuje navigace."; -Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Dosáhli jste maximální velikosti výbÄ›ru"; -Strings.OfficeOM.L_TooManyArguments = "příliÅ¡ mnoho argumentů"; -Strings.OfficeOM.L_SliceSizeNotSupported = "Zadaná velikost Å™ezu není podporovaná."; +Strings.OfficeOM.L_DialogInvalidScheme = "Schéma adresy URL není podporované. Použijte prosím HTTPS."; Strings.OfficeOM.L_InvalidSSOAddinMessage = "Rozhraní API identit se pro tento doplnÄ›k nepodporuje."; -Strings.OfficeOM.L_NotImplemented = "Funkce {0} není implementovaná."; -Strings.OfficeOM.L_InvalidGrant = "Chybí pÅ™edběžná autorizace."; -Strings.OfficeOM.L_MemoryLimit = "PÅ™ekroÄený limit pamÄ›ti"; -Strings.OfficeOM.L_InvalidFormat = "Chyba neplatného formátu"; -Strings.OfficeOM.L_RequestTimeout = "Zpracování volání trvalo moc dlouho."; -Strings.OfficeOM.L_NotSupportedEventType = "Zadaný typ události {0} není podporovaný."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Operace se nepovedla, protože tento doplnÄ›k už žádá o přístupový token."; -Strings.OfficeOM.L_DialogAddressNotTrusted = "Doména adresy URL není zahrnutá v elementu AppDomains v manifestu."; -Strings.OfficeOM.L_ConnectionFailureWithDetails = "Žádost selhala se stavovým kódem {0}, kódem chyby {1} a následující chybovou zprávou: {2}"; -Strings.OfficeOM.L_ShuttingDown = "Operace se nepovedla, protože data na serveru nejsou aktuální."; -Strings.OfficeOM.L_APICallFailed = "Volání API selhalo"; -Strings.OfficeOM.L_TooManyOptionalFunction = "více volitelných funkcí v seznamu parametrů"; -Strings.OfficeOM.L_ColIndexOutOfRange = "Hodnota indexu sloupce je mimo povolený rozsah. Použijte hodnotu (0 nebo vyšší), která je menší než poÄet sloupců."; -Strings.OfficeOM.L_Timeout = "ÄŒasový limit operace vyprÅ¡el."; -Strings.OfficeOM.L_RowIndexOutOfRange = "Hodnota indexu řádku je mimo povolený rozsah. Použijte hodnotu (0 nebo vyšší), která je menší než poÄet řádků."; -Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Typ identity uživatele se nepodporuje."; -Strings.OfficeOM.L_InvalidResourceUrlMessage = "V manifestu je zadaná neplatná adresa URL prostÅ™edku."; -Strings.OfficeOM.L_FormatValueOutOfRange = "Hodnota je mimo povolený rozsah."; -Strings.OfficeOM.L_SettingsAreStale = "Nastavení se nepodaÅ™ilo uložit, protože nejsou aktuální."; Strings.OfficeOM.L_DocumentReadOnly = "Požadovaná operace není v aktuálním režimu dokumentu povolená."; -Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "Probíhá pokus nastavit vlastnost jen pro Ätení {0}."; -Strings.OfficeOM.L_GetSelectionNotSupported = "Aktuální výbÄ›r není podporovaný."; -Strings.OfficeOM.L_SettingsCannotSave = "Nastavení nejde uložit."; -Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "prohlížeÄ nakonfigurujte"; -Strings.OfficeOM.L_DataReadError = "Chyba Ätení dat"; -Strings.OfficeOM.L_PropertyNotLoaded = "Vlastnost {0} není k dispozici. PÅ™ed pÅ™eÄtením hodnoty vlastnosti volejte metodu pro naÄtení nadÅ™azeného objektu a potom volejte context.sync() pro pÅ™idružený kontext požadavku."; -Strings.OfficeOM.L_DialogAlreadyOpened = "Operace se nepovedla, protože tento doplnÄ›k už má aktivní okno." +Strings.OfficeOM.L_UnsupportedDataObject = "Zadaný typ datového objektu není podporovaný."; +Strings.OfficeOM.L_EventRegistrationError = "Chyba registrace události"; +Strings.OfficeOM.L_ElementMissing = "Nemohli jsme naformátovat buňku tabulky, protože chybí nÄ›které hodnoty parametrů. JeÅ¡tÄ› jednou zkontrolujte parametry a zkuste to znovu."; +Strings.OfficeOM.L_InternalErrorDescription = "DoÅ¡lo k vnitÅ™ní chybÄ›."; +Strings.OfficeOM.L_CallbackNotAFunction = "ZpÄ›tné volání musí být typu funkce. Bylo typu {0}."; +Strings.OfficeOM.L_InvalidResourceUrlMessage = "V manifestu je zadaná neplatná adresa URL prostÅ™edku."; +Strings.OfficeOM.L_BindingToMultipleSelection = "Nesouvislé výbÄ›ry nejsou podporované."; +Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Povolit"; +Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Vybraný obsah musí být ve formátu tabulky. Zformátujte data jako tabulku a zkuste to znovu."; +Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Aplikace {0} neexistuje. Nevolá se rutina Microsoft.Office.WebExtension.initialize(reason)."; +Strings.OfficeOM.L_TooManyOptionalFunction = "více volitelných funkcí v seznamu parametrů"; +Strings.OfficeOM.L_InValidOptionalArgument = "neplatný volitelný argument"; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory = "Tento doplnÄ›k nepodporuje vyjádÅ™ení souhlasu uživatele."; +Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "VaÅ¡e relace Office Online je neplatná nebo vyprÅ¡el její Äasový limit. Pokud chcete pokraÄovat, aktualizujte stránku."; +Strings.OfficeOM.L_CannotRegisterEvent = "Nedá se zaregistrovat obslužná rutina události."; +Strings.OfficeOM.L_InvalidSetColumns = "Zadané sloupce jsou neplatné."; +Strings.OfficeOM.L_SettingNameNotExist = "Zadaný název nastavení neexistuje."; +Strings.OfficeOM.L_CustomFunctionDefinitionMissing = "V Excel.CustomFunctions musí být vlastnost s tímto názvem, která pÅ™edstavuje definici funkce."; +Strings.OfficeOM.L_InvalidBinding = "Neplatná vazba"; +Strings.OfficeOM.L_BindingCreationError = "Chyba vytváření vazby"; +Strings.OfficeOM.L_ColIndexOutOfRange = "Hodnota indexu sloupce je mimo povolený rozsah. Použijte hodnotu (0 nebo vyšší), která je menší než poÄet sloupců." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/cs-cz/office_strings.js b/node_modules/@microsoft/office-js/dist/cs-cz/office_strings.js index 4ad3662..5d96d9c 100644 --- a/node_modules/@microsoft/office-js/dist/cs-cz/office_strings.js +++ b/node_modules/@microsoft/office-js/dist/cs-cz/office_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_TooManyOptionalObjects="více volitelných objektů v seznamu parametrů";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Problémy se sítí zabránily naÄtení souboru.";Strings.OfficeOM.L_RedundantCallbackSpecification="ZpÄ›tné volání nemůže být zadané v seznamu argumentů i ve volitelném objektu.";Strings.OfficeOM.L_InValidOptionalArgument="neplatný volitelný argument";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="DoplnÄ›k už žádá o přístupový token";Strings.OfficeOM.L_UnsupportedEnumerationMessage="VýÄet není v aktuální hostitelské aplikaci podporovaný.";Strings.OfficeOM.L_InvalidParameters="Funkce {0} má neplatné parametry.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Aktuální výbÄ›r není kompatibilní se zadaným typem pÅ™evodu.";Strings.OfficeOM.L_APINotSupported="API není podporované";Strings.OfficeOM.L_SelectionCannotBound="Nejde vytvoÅ™it vazbu na aktuální výbÄ›r.";Strings.OfficeOM.L_FileTypeNotSupported="Zadaný typ souboru není podporovaný.";Strings.OfficeOM.L_InvalidBinding="Neplatná vazba";Strings.OfficeOM.L_InvalidTableOptionValue="MinimálnÄ› jeden parametr tableOptions má hodnoty, které nejsou povolené. PÅ™ekontrolujte hodnoty a zkuste to znovu.";Strings.OfficeOM.L_PermissionDenied="OprávnÄ›ní odepÅ™ena";Strings.OfficeOM.L_DataStale="Neaktuální data";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Poznámka: Tabulka by nemÄ›la obsahovat víc než 20 000 bunÄ›k.";Strings.OfficeOM.L_SSOClientErrorMessage="V klientovi doÅ¡lo k neoÄekávané chybÄ›.";Strings.OfficeOM.L_SSOClientError="V požadavku na ověření z Office se vyskytla chyba.";Strings.OfficeOM.L_InvalidRequestContext="Objekt nejde použít v různých kontextech požadavků.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Data jsou zastaralá. NaÄtÄ›te objekt znovu.";Strings.OfficeOM.L_InternalError="VnitÅ™ní chyba";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath omezuje výbÄ›r na 1024 položek.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Neaktuální data";Strings.OfficeOM.L_SetDataIsTooLarge="Zadaný datový objekt je moc velký.";Strings.OfficeOM.L_BindingNotExist="Zadaná vazba neexistuje.";Strings.OfficeOM.L_OperationNotSupported="Operace není podporovaná.";Strings.OfficeOM.L_BrowserAPINotSupported="Tento prohlížeÄ nepodporuje požadované rozhraní API.";Strings.OfficeOM.L_CannotRegisterEvent="Nedá se zaregistrovat obslužná rutina události.";Strings.OfficeOM.L_UnsupportedUserIdentity="Typ identity uživatele se nepodporuje.";Strings.OfficeOM.L_InternalErrorDescription="DoÅ¡lo k vnitÅ™ní chybÄ›.";Strings.OfficeOM.L_CustomXmlNodeNotFound="Zadaný uzel nejde najít.";Strings.OfficeOM.L_ElementMissing="Nemohli jsme naformátovat buňku tabulky, protože chybí nÄ›které hodnoty parametrů. JeÅ¡tÄ› jednou zkontrolujte parametry a zkuste to znovu.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Parametry souÅ™adnic nejde použít s pÅ™evodem typu Tabulka, pokud tabulka obsahuje slouÄené buňky.";Strings.OfficeOM.L_EventHandlerRemovalFailed="Nepovedlo se odebrat obslužnou rutinu události.";Strings.OfficeOM.L_UserAborted="Uživatel pÅ™eruÅ¡il žádost o souhlas.";Strings.OfficeOM.L_OverwriteWorksheetData="Operace nastavení se nepovedla, protože zadaný datový objekt pÅ™epíše nebo posune data.";Strings.OfficeOM.L_TooManyIncompleteRequests="PoÄkejte, než se dokonÄí pÅ™edchozí volání.";Strings.OfficeOM.L_InvalidSetStartRowColumn="Zadané hodnoty startRow nebo startColumn jsou neplatné.";Strings.OfficeOM.L_ActivityLimitReached="Byl dosažený limit aktivity.";Strings.OfficeOM.L_FunctionCallFailed="Volání funkce {0} se nepovedlo, kód chyby: {1}.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="VaÅ¡e relace Office Online je neplatná nebo vyprÅ¡el její Äasový limit. Pokud chcete pokraÄovat, aktualizujte stránku.";Strings.OfficeOM.L_DataNotMatchBindingType="Zadaný datový objekt není kompatibilní s typem vazby.";Strings.OfficeOM.L_NavOutOfBound="Operace se nepovedla, protože index je mimo rozsah.";Strings.OfficeOM.L_InvalidApiCallInContext="Neplatné volání rozhraní API v aktuálním kontextu";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Vyberte nÄ›co, prosím.";Strings.OfficeOM.L_DisplayDialogError="Chyba zobrazení dialogového okna";Strings.OfficeOM.L_SSOServerError="Ve zprostÅ™edkovateli ověřování doÅ¡lo k chybÄ›.";Strings.OfficeOM.L_UnsupportedDataObject="Zadaný typ datového objektu není podporovaný.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Parametry souÅ™adnic nejde použít s pÅ™evodem typu Tabulka, pokud tabulka obsahuje slouÄené buňky.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Vybraný obsah musí být ve formátu tabulky. Zformátujte data jako tabulku a zkuste to znovu.";Strings.OfficeOM.L_DataNotMatchSelection="Zadaný datový objekt není kompatibilní s tvarem nebo rozmÄ›ry aktuálního výbÄ›ru.";Strings.OfficeOM.L_ReadSettingsError="Chyba Ätení nastavení";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Operace není u tohoto typu vazby podporovaná.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Relace je neplatná nebo vyprÅ¡el její Äasový limit";Strings.OfficeOM.L_InvalidCellsValue="MinimálnÄ› jeden parametr buňky má hodnoty, které nejsou povolené. PÅ™ekontrolujte hodnoty a zkuste to znovu.";Strings.OfficeOM.L_InvalidDataObject="Neplatný datový objekt";Strings.OfficeOM.L_CallbackNotAFunction="ZpÄ›tné volání musí být typu funkce. Bylo typu {0}.";Strings.OfficeOM.L_InvalidValue="Neplatná hodnota";Strings.OfficeOM.L_InvalidGetColumns="Zadané sloupce jsou neplatné.";Strings.OfficeOM.L_InvalidArgumentGeneric="Argument nebo argumenty pÅ™edané funkci nejsou použitelné v této situaci, nejsou úplné nebo nemají správný formát.";Strings.OfficeOM.L_MissingRequiredArguments="chybí nÄ›které požadované argumenty";Strings.OfficeOM.L_OutOfRange="Mimo rozsah";Strings.OfficeOM.L_GetDataIsTooLarge="Požadovaná sada dat je moc velká.";Strings.OfficeOM.L_EventRegistrationError="Chyba registrace události";Strings.OfficeOM.L_IndexOutOfRange="Index je mimo rozsah.";Strings.OfficeOM.L_NotSupported="Funkce {0} není podporovaná.";Strings.OfficeOM.L_BadSelectorString="ŘetÄ›zec pÅ™edaný selektoru je nesprávnÄ› naformátovaný nebo není podporovaný.";Strings.OfficeOM.L_NamedItemNotFound="Pojmenovaná položka neexistuje.";Strings.OfficeOM.L_ConnectionFailureWithStatus="Žádost selhala se stavovým kódem {0}.";Strings.OfficeOM.L_DataWriteError="Chyba zápisu dat";Strings.OfficeOM.L_InvalidReadForBlankRow="Zadaný řádek je prázdný.";Strings.OfficeOM.L_MultipleNamedItemFound="NaÅ¡lo se více objektů se stejným názvem.";Strings.OfficeOM.L_InvalidBindingOperation="Neplatná operace vazby";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Nemohli jsme dialogové okno vytvoÅ™it kvůli omezení prohlížeÄe. Doména dialogového okna a doména hostitele doplňku nejsou ve stejné zónÄ› zabezpeÄení.";Strings.OfficeOM.L_DataNotMatchBindingSize="Zadaný datový objekt se neshoduje s velikostí aktuálního výbÄ›ru.";Strings.OfficeOM.L_NotSupportedBindingType="Zadaný typ vazby {0} není podporovaný.";Strings.OfficeOM.L_BindingToMultipleSelection="Nesouvislé výbÄ›ry nejsou podporované.";Strings.OfficeOM.L_InvalidResourceUrl="Je zadaná neplatná adresa URL prostÅ™edku aplikace.";Strings.OfficeOM.L_NetworkProblem="Problém se sítí";Strings.OfficeOM.L_CloseFileBeforeRetrieve="PÅ™ed naÄtením dalšího souboru volejte closeAsync pro aktuální soubor.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Zadaný typ vazby není kompatibilní se zadanou pojmenovanou položkou.";Strings.OfficeOM.L_InvalidFormatValue="MinimálnÄ› jeden parametr formátu má hodnoty, které nejsou povolené. PÅ™ekontrolujte hodnoty a zkuste to znovu.";Strings.OfficeOM.L_DialogNavigateError="Chyba navigace v dialogovém oknÄ›";Strings.OfficeOM.L_AppNameNotExist="Název doplňku pro: {0} neexistuje.";Strings.OfficeOM.L_InvalidBindingError="Chyba neplatné vazby";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Ignorovat";Strings.OfficeOM.L_InvalidGrantMessage="Chybí oprávnÄ›ní pro tento doplnÄ›k.";Strings.OfficeOM.L_NewWindowCrossZone="Nastavení zabezpeÄení ve vaÅ¡em prohlížeÄi nám brání ve vytvoÅ™ení dialogového okna. Zkuste jiný prohlížeÄ nebo si {0}, aby {1} a doména zobrazená ve vaÅ¡em panelu Adresa byly ve stejné zónÄ› zabezpeÄení.";Strings.OfficeOM.L_RunMustReturnPromise="Dávková funkce pÅ™edaná metodÄ› .run nevrátila příslib. Funkce musí vracet příslib, aby se po dokonÄení dávkové operace mohly uvolnit automaticky sledované objekty. Obvykle se příslib vrací vrácením odpovÄ›di z context.sync().";Strings.OfficeOM.L_RequestTokenUnavailable="Toto rozhraní API se omezilo, aby se zpomalila Äetnost volání.";Strings.OfficeOM.L_InvalidAPICall="Neplatné volání rozhraní API";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Neplatné vstupní argumenty";Strings.OfficeOM.L_PropertyDoesNotExist="Vlastnost {0} u objektu neexistuje.";Strings.OfficeOM.L_HostError="Chyba hostitele";Strings.OfficeOM.L_FormattingReminder="PÅ™ipomenutí formátování";Strings.OfficeOM.L_ValueNotLoaded="JeÅ¡tÄ› se nenaÄetla hodnota výsledného objektu. PÅ™ed pÅ™eÄtením hodnoty vlastnosti volejte metodu context.sync() pro kontext pÅ™idružené žádosti.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Poznámka: PÅ™es volání formátovacího API by se nemÄ›lo nastavovat víc než 100 formátování.";Strings.OfficeOM.L_SettingsStaleError="Chyba zastaralých nastavení";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} chce zobrazit nové okno.";Strings.OfficeOM.L_DialogInvalidScheme="Schéma adresy URL není podporované. Použijte prosím HTTPS.";Strings.OfficeOM.L_InvalidGetStartRowColumn="Zadané hodnoty startRow nebo startColumn jsou neplatné.";Strings.OfficeOM.L_MissingParameter="ChybÄ›jící parametr";Strings.OfficeOM.L_InvalidArgument="Argument {0} nefunguje pro tuto situaci, chybí nebo není ve správném formátu.";Strings.OfficeOM.L_DataNotMatchCoercionType="Typ zadaného datového objektu není kompatibilní s aktuálním výbÄ›rem.";Strings.OfficeOM.L_DataWriteReminder="PÅ™ipomenutí zápisu dat";Strings.OfficeOM.L_SaveSettingsError="Chyba ukládání nastavení";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="Pro zmÄ›ny vlastnosti {0} nejde použít metodu object.set.";Strings.OfficeOM.L_UserNotSignedIn="Žádný uživatel není pÅ™ihlášený v Office.";Strings.OfficeOM.L_CoercionTypeNotSupported="Zadaný typ pÅ™evodu není podporovaný.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Zadaný typ pÅ™evodu není kompatibilní s tímto typem vazby.";Strings.OfficeOM.L_GetDataParametersConflict="Zadané parametry způsobují konflikt.";Strings.OfficeOM.L_NoCapability="K provedení této akce nemáte dostateÄná oprávnÄ›ní.";Strings.OfficeOM.L_CannotWriteToSelection="Do aktuálního výbÄ›ru se nedá zapisovat.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Povolit";Strings.OfficeOM.L_UnsupportedEnumeration="Nepodporovaný výÄet";Strings.OfficeOM.L_InvalidSetRows="Zadané řádky jsou neplatné.";Strings.OfficeOM.L_SSOServerErrorMessage="Na serveru doÅ¡lo k neoÄekávané chybÄ›.";Strings.OfficeOM.L_SetDataParametersConflict="Zadané parametry způsobují konflikt.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Nepovedlo se pÅ™idat obslužnou rutinu události.";Strings.OfficeOM.L_UserAbortedMessage="Uživatel nevyslovil souhlas s oprávnÄ›ními pro doplnÄ›k.";Strings.OfficeOM.L_SettingNameNotExist="Zadaný název nastavení neexistuje.";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_InvalidColumnsForBinding="Zadané sloupce jsou neplatné.";Strings.OfficeOM.L_InvalidDataFormat="Formát zadaného datového objektu je neplatný.";Strings.OfficeOM.L_OsfControlTypeNotSupported="Typ OsfControl není podporovaný.";Strings.OfficeOM.L_InvalidNode="Neplatný uzel";Strings.OfficeOM.L_UserClickIgnore="Uživatel se rozhodl ignorovat dialogové okno.";Strings.OfficeOM.L_InitializeNotReady="Soubor Office.js jeÅ¡tÄ› není úplnÄ› naÄtený. Zkuste to znovu pozdÄ›ji nebo pÅ™idejte inicializaÄní kód do funkce Office.initialize.";Strings.OfficeOM.L_InvalidSetColumns="Zadané sloupce jsou neplatné.";Strings.OfficeOM.L_DialogRequireHTTPS="Protokol HTTP se nepodporuje. Použijte prosím HTTPS.";Strings.OfficeOM.L_InvalidSelectionForBindingType="Nejde vytvoÅ™it vazbu s aktuálním výbÄ›rem a zadaným typem vazby.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Aplikace {0} neexistuje. Nevolá se rutina Microsoft.Office.WebExtension.initialize(reason).";Strings.OfficeOM.L_InvalidCoercion="Neplatný typ pÅ™evodu";Strings.OfficeOM.L_InvalidObjectPath="Cesta k objektu {0} není pro požadovanou akci funkÄní. Pokud používáte objekt ve více voláních context.sync a mimo sekvenÄní provádÄ›ní dávky .run, použijte prosím metody context.trackedObjects.add() a context.trackedObjects.remove() pro správu životnosti objektu.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Zadané hodnoty rowCount nebo columnCount jsou neplatné.";Strings.OfficeOM.L_BindingCreationError="Chyba vytváření vazby";Strings.OfficeOM.L_InvalidGetRows="Zadané řádky jsou neplatné.";Strings.OfficeOM.L_UnknownBindingType="Tento typ vazby není podporovaný.";Strings.OfficeOM.L_CustomXmlError="Chyba vlastního kódu XML";Strings.OfficeOM.L_EventHandlerNotExist="Zadaná obslužná rutina událostí se pro tuto vazbu nenaÅ¡la.";Strings.OfficeOM.L_SpecifiedIdNotExist="Zadané ID neexistuje.";Strings.OfficeOM.L_CannotNavigateTo="Objekt je v umístÄ›ní, kde se nepodporuje navigace.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Dosáhli jste maximální velikosti výbÄ›ru";Strings.OfficeOM.L_TooManyArguments="příliÅ¡ mnoho argumentů";Strings.OfficeOM.L_SliceSizeNotSupported="Zadaná velikost Å™ezu není podporovaná.";Strings.OfficeOM.L_InvalidSSOAddinMessage="Rozhraní API identit se pro tento doplnÄ›k nepodporuje.";Strings.OfficeOM.L_NotImplemented="Funkce {0} není implementovaná.";Strings.OfficeOM.L_InvalidGrant="Chybí pÅ™edběžná autorizace.";Strings.OfficeOM.L_MemoryLimit="PÅ™ekroÄený limit pamÄ›ti";Strings.OfficeOM.L_InvalidFormat="Chyba neplatného formátu";Strings.OfficeOM.L_RequestTimeout="Zpracování volání trvalo moc dlouho.";Strings.OfficeOM.L_NotSupportedEventType="Zadaný typ události {0} není podporovaný.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Operace se nepovedla, protože tento doplnÄ›k už žádá o přístupový token.";Strings.OfficeOM.L_DialogAddressNotTrusted="Doména adresy URL není zahrnutá v elementu AppDomains v manifestu.";Strings.OfficeOM.L_ConnectionFailureWithDetails="Žádost selhala se stavovým kódem {0}, kódem chyby {1} a následující chybovou zprávou: {2}";Strings.OfficeOM.L_ShuttingDown="Operace se nepovedla, protože data na serveru nejsou aktuální.";Strings.OfficeOM.L_APICallFailed="Volání API selhalo";Strings.OfficeOM.L_TooManyOptionalFunction="více volitelných funkcí v seznamu parametrů";Strings.OfficeOM.L_ColIndexOutOfRange="Hodnota indexu sloupce je mimo povolený rozsah. Použijte hodnotu (0 nebo vyšší), která je menší než poÄet sloupců.";Strings.OfficeOM.L_Timeout="ÄŒasový limit operace vyprÅ¡el.";Strings.OfficeOM.L_RowIndexOutOfRange="Hodnota indexu řádku je mimo povolený rozsah. Použijte hodnotu (0 nebo vyšší), která je menší než poÄet řádků.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Typ identity uživatele se nepodporuje.";Strings.OfficeOM.L_InvalidResourceUrlMessage="V manifestu je zadaná neplatná adresa URL prostÅ™edku.";Strings.OfficeOM.L_FormatValueOutOfRange="Hodnota je mimo povolený rozsah.";Strings.OfficeOM.L_SettingsAreStale="Nastavení se nepodaÅ™ilo uložit, protože nejsou aktuální.";Strings.OfficeOM.L_DocumentReadOnly="Požadovaná operace není v aktuálním režimu dokumentu povolená.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="Probíhá pokus nastavit vlastnost jen pro Ätení {0}.";Strings.OfficeOM.L_GetSelectionNotSupported="Aktuální výbÄ›r není podporovaný.";Strings.OfficeOM.L_SettingsCannotSave="Nastavení nejde uložit.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="prohlížeÄ nakonfigurujte";Strings.OfficeOM.L_DataReadError="Chyba Ätení dat";Strings.OfficeOM.L_PropertyNotLoaded="Vlastnost {0} není k dispozici. PÅ™ed pÅ™eÄtením hodnoty vlastnosti volejte metodu pro naÄtení nadÅ™azeného objektu a potom volejte context.sync() pro pÅ™idružený kontext požadavku.";Strings.OfficeOM.L_DialogAlreadyOpened="Operace se nepovedla, protože tento doplnÄ›k už má aktivní okno." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Zadaný typ pÅ™evodu není kompatibilní s tímto typem vazby.";Strings.OfficeOM.L_MissingRequiredArguments="chybí nÄ›které požadované argumenty";Strings.OfficeOM.L_CustomXmlError="Chyba vlastního kódu XML";Strings.OfficeOM.L_InvalidFormat="Chyba neplatného formátu";Strings.OfficeOM.L_SettingsStaleError="Chyba zastaralých nastavení";Strings.OfficeOM.L_CoercionTypeNotSupported="Zadaný typ pÅ™evodu není podporovaný.";Strings.OfficeOM.L_EventHandlerRemovalFailed="Nepovedlo se odebrat obslužnou rutinu události.";Strings.OfficeOM.L_HostError="Chyba hostitele";Strings.OfficeOM.L_NamedItemNotFound="Pojmenovaná položka neexistuje.";Strings.OfficeOM.L_TooManyIncompleteRequests="PoÄkejte, než se dokonÄí pÅ™edchozí volání.";Strings.OfficeOM.L_TooManyOptionalObjects="více volitelných objektů v seznamu parametrů";Strings.OfficeOM.L_BadSelectorString="ŘetÄ›zec pÅ™edaný selektoru je nesprávnÄ› naformátovaný nebo není podporovaný.";Strings.OfficeOM.L_NotSupportedBindingType="Zadaný typ vazby {0} není podporovaný.";Strings.OfficeOM.L_AppNameNotExist="Název doplňku pro: {0} neexistuje.";Strings.OfficeOM.L_CloseFileBeforeRetrieve="PÅ™ed naÄtením dalšího souboru volejte closeAsync pro aktuální soubor.";Strings.OfficeOM.L_InvalidGetStartRowColumn="Zadané hodnoty startRow nebo startColumn jsou neplatné.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage="Operace selhala, protože tento doplnÄ›k v této kategorii nepodporuje vyjádÅ™ení souhlasu uživatele.";Strings.OfficeOM.L_InvalidResourceUrl="Je zadaná neplatná adresa URL prostÅ™edku aplikace.";Strings.OfficeOM.L_EventHandlerNotExist="Zadaná obslužná rutina událostí se pro tuto vazbu nenaÅ¡la.";Strings.OfficeOM.L_OutOfRange="Mimo rozsah";Strings.OfficeOM.L_InvalidReadForBlankRow="Zadaný řádek je prázdný.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="Probíhá pokus nastavit vlastnost jen pro Ätení {0}.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Nemohli jsme dialogové okno vytvoÅ™it kvůli omezení prohlížeÄe. Doména dialogového okna a doména hostitele doplňku nejsou ve stejné zónÄ› zabezpeÄení.";Strings.OfficeOM.L_ActivityLimitReached="Byl dosažený limit aktivity.";Strings.OfficeOM.L_CustomFunctionNameContainsBadChars="Název funkce může obsahovat pouze písmena, Äíslice, podtržítka a teÄky.";Strings.OfficeOM.L_InvalidSetStartRowColumn="Zadané hodnoty startRow nebo startColumn jsou neplatné.";Strings.OfficeOM.L_MemoryLimit="PÅ™ekroÄený limit pamÄ›ti";Strings.OfficeOM.L_RequestTimeout="Zpracování volání trvalo moc dlouho.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Vyberte nÄ›co, prosím.";Strings.OfficeOM.L_SSOServerErrorMessage="Na serveru doÅ¡lo k neoÄekávané chybÄ›.";Strings.OfficeOM.L_NavOutOfBound="Operace se nepovedla, protože index je mimo rozsah.";Strings.OfficeOM.L_InvalidColumnsForBinding="Zadané sloupce jsou neplatné.";Strings.OfficeOM.L_UserAborted="Uživatel pÅ™eruÅ¡il žádost o souhlas.";Strings.OfficeOM.L_OverwriteWorksheetData="Operace nastavení se nepovedla, protože zadaný datový objekt pÅ™epíše nebo posune data.";Strings.OfficeOM.L_GetSelectionNotSupported="Aktuální výbÄ›r není podporovaný.";Strings.OfficeOM.L_InvalidBindingOperation="Neplatná operace vazby";Strings.OfficeOM.L_NotSupportedEventType="Zadaný typ události {0} není podporovaný.";Strings.OfficeOM.L_NewWindowCrossZone="Nastavení zabezpeÄení ve vaÅ¡em prohlížeÄi nám brání ve vytvoÅ™ení dialogového okna. Zkuste jiný prohlížeÄ nebo si {0}, aby {1} a doména zobrazená ve vaÅ¡em panelu Adresa byly ve stejné zónÄ› zabezpeÄení.";Strings.OfficeOM.L_RowIndexOutOfRange="Hodnota indexu řádku je mimo povolený rozsah. Použijte hodnotu (0 nebo vyšší), která je menší než poÄet řádků.";Strings.OfficeOM.L_SpecifiedIdNotExist="Zadané ID neexistuje.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Operace se nepovedla, protože tento doplnÄ›k už žádá o přístupový token.";Strings.OfficeOM.L_InvalidSelectionForBindingType="Nejde vytvoÅ™it vazbu s aktuálním výbÄ›rem a zadaným typem vazby.";Strings.OfficeOM.L_SaveSettingsError="Chyba ukládání nastavení";Strings.OfficeOM.L_MissingParameter="ChybÄ›jící parametr";Strings.OfficeOM.L_BrowserAPINotSupported="Tento prohlížeÄ nepodporuje požadované rozhraní API.";Strings.OfficeOM.L_NotImplemented="Funkce {0} není implementovaná.";Strings.OfficeOM.L_InvalidGetColumns="Zadané sloupce jsou neplatné.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Operace není u tohoto typu vazby podporovaná.";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_GetDataParametersConflict="Zadané parametry způsobují konflikt.";Strings.OfficeOM.L_DataNotMatchCoercionType="Typ zadaného datového objektu není kompatibilní s aktuálním výbÄ›rem.";Strings.OfficeOM.L_ShuttingDown="Operace se nepovedla, protože data na serveru nejsou aktuální.";Strings.OfficeOM.L_DialogNavigateError="Chyba navigace v dialogovém oknÄ›";Strings.OfficeOM.L_InvalidRequestContext="Objekt nejde použít v různých kontextech požadavků.";Strings.OfficeOM.L_SettingsCannotSave="Nastavení nejde uložit.";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Neplatné vstupní argumenty";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Parametry souÅ™adnic nejde použít s pÅ™evodem typu Tabulka, pokud tabulka obsahuje slouÄené buňky.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Aktuální výbÄ›r není kompatibilní se zadaným typem pÅ™evodu.";Strings.OfficeOM.L_DataNotMatchSelection="Zadaný datový objekt není kompatibilní s tvarem nebo rozmÄ›ry aktuálního výbÄ›ru.";Strings.OfficeOM.L_DataStale="Neaktuální data";Strings.OfficeOM.L_InvalidGetRows="Zadané řádky jsou neplatné.";Strings.OfficeOM.L_InvalidParameters="Funkce {0} má neplatné parametry.";Strings.OfficeOM.L_DialogAlreadyOpened="Operace se nepovedla, protože tento doplnÄ›k už má aktivní okno.";Strings.OfficeOM.L_DialogRequireHTTPS="Protokol HTTP se nepodporuje. Použijte prosím HTTPS.";Strings.OfficeOM.L_InvalidObjectPath="Cesta k objektu {0} není pro požadovanou akci funkÄní. Pokud používáte objekt ve více voláních context.sync a mimo sekvenÄní provádÄ›ní dávky .run, použijte prosím metody context.trackedObjects.add() a context.trackedObjects.remove() pro správu životnosti objektu.";Strings.OfficeOM.L_APINotSupported="API není podporované";Strings.OfficeOM.L_InvalidOperationInCellEditMode="Excel je v režimu úprav buňky. UkonÄete prosím režim úprav stisknutím klávesy ENTER nebo TAB nebo výbÄ›rem jiné buňky a pak to zkuste znovu.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Dosáhli jste maximální velikosti výbÄ›ru";Strings.OfficeOM.L_FormatValueOutOfRange="Hodnota je mimo povolený rozsah.";Strings.OfficeOM.L_NoCapability="K provedení této akce nemáte dostateÄná oprávnÄ›ní.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Nepovedlo se pÅ™idat obslužnou rutinu události.";Strings.OfficeOM.L_DataNotMatchBindingSize="Zadaný datový objekt se neshoduje s velikostí aktuálního výbÄ›ru.";Strings.OfficeOM.L_BindingNotExist="Zadaná vazba neexistuje.";Strings.OfficeOM.L_RunMustReturnPromise="Dávková funkce pÅ™edaná metodÄ› .run nevrátila příslib. Funkce musí vracet příslib, aby se po dokonÄení dávkové operace mohly uvolnit automaticky sledované objekty. Obvykle se příslib vrací vrácením odpovÄ›di z context.sync().";Strings.OfficeOM.L_SettingsAreStale="Nastavení se nepodaÅ™ilo uložit, protože nejsou aktuální.";Strings.OfficeOM.L_UserNotSignedIn="Žádný uživatel není pÅ™ihlášený v Office.";Strings.OfficeOM.L_InvalidCellsValue="MinimálnÄ› jeden parametr buňky má hodnoty, které nejsou povolené. PÅ™ekontrolujte hodnoty a zkuste to znovu.";Strings.OfficeOM.L_PropertyDoesNotExist="Vlastnost {0} u objektu neexistuje.";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} chce zobrazit nové okno.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Data jsou zastaralá. NaÄtÄ›te objekt znovu.";Strings.OfficeOM.L_SSOConnectionLostError="A connection was lost during the sign in process.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Typ identity uživatele se nepodporuje.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Problémy se sítí zabránily naÄtení souboru.";Strings.OfficeOM.L_SSOServerError="Ve zprostÅ™edkovateli ověřování doÅ¡lo k chybÄ›.";Strings.OfficeOM.L_DataReadError="Chyba Ätení dat";Strings.OfficeOM.L_InitializeNotReady="Soubor Office.js jeÅ¡tÄ› není úplnÄ› naÄtený. Zkuste to znovu pozdÄ›ji nebo pÅ™idejte inicializaÄní kód do funkce Office.initialize.";Strings.OfficeOM.L_ValueNotLoaded="JeÅ¡tÄ› se nenaÄetla hodnota výsledného objektu. PÅ™ed pÅ™eÄtením hodnoty vlastnosti volejte metodu context.sync() pro kontext pÅ™idružené žádosti.";Strings.OfficeOM.L_InvalidArgument="Argument {0} nefunguje pro tuto situaci, chybí nebo není ve správném formátu.";Strings.OfficeOM.L_ReadSettingsError="Chyba Ätení nastavení";Strings.OfficeOM.L_UserAbortedMessage="Uživatel nevyslovil souhlas s oprávnÄ›ními pro doplnÄ›k.";Strings.OfficeOM.L_MultipleNamedItemFound="NaÅ¡lo se více objektů se stejným názvem.";Strings.OfficeOM.L_UnsupportedUserIdentity="Typ identity uživatele se nepodporuje.";Strings.OfficeOM.L_APICallFailed="Volání API selhalo";Strings.OfficeOM.L_FormattingReminder="PÅ™ipomenutí formátování";Strings.OfficeOM.L_FunctionCallFailed="Volání funkce {0} se nepovedlo, kód chyby: {1}.";Strings.OfficeOM.L_InvalidCoercion="Neplatný typ pÅ™evodu";Strings.OfficeOM.L_CustomXmlNodeNotFound="Zadaný uzel nejde najít.";Strings.OfficeOM.L_SSOClientError="V požadavku na ověření z Office se vyskytla chyba.";Strings.OfficeOM.L_InvalidGrant="Chybí pÅ™edběžná autorizace.";Strings.OfficeOM.L_CustomFunctionNameCannotSplit="Název funkce musí obsahovat neprázdný obor názvů a neprázdný krátký název.";Strings.OfficeOM.L_RedundantCallbackSpecification="ZpÄ›tné volání nemůže být zadané v seznamu argumentů i ve volitelném objektu.";Strings.OfficeOM.L_CustomFunctionImplementationMissing="Vlastnost s tímto názvem v Excel.CustomFunctions, která pÅ™edstavuje definici funkce, musí obsahovat vlastnost call implementující funkci.";Strings.OfficeOM.L_SetDataIsTooLarge="Zadaný datový objekt je moc velký.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Parametry souÅ™adnic nejde použít s pÅ™evodem typu Tabulka, pokud tabulka obsahuje slouÄené buňky.";Strings.OfficeOM.L_IndexOutOfRange="Index je mimo rozsah.";Strings.OfficeOM.L_DisplayDialogError="Chyba zobrazení dialogového okna";Strings.OfficeOM.L_NetworkProblem="Problém se sítí";Strings.OfficeOM.L_ApiNotFoundDetails="Metoda nebo vlastnost {0} je souÄástí sady požadavků {1}, která ve vaší verzi aplikace {2} není dostupná.";Strings.OfficeOM.L_InvalidDataObject="Neplatný datový objekt";Strings.OfficeOM.L_InvalidValue="Neplatná hodnota";Strings.OfficeOM.L_Timeout="ÄŒasový limit operace vyprÅ¡el.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Poznámka: Tabulka by nemÄ›la obsahovat víc než 20 000 bunÄ›k.";Strings.OfficeOM.L_FileTypeNotSupported="Zadaný typ souboru není podporovaný.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Relace je neplatná nebo vyprÅ¡el její Äasový limit";Strings.OfficeOM.L_InvalidBindingError="Chyba neplatné vazby";Strings.OfficeOM.L_CannotWriteToSelection="Do aktuálního výbÄ›ru se nedá zapisovat.";Strings.OfficeOM.L_InternalError="VnitÅ™ní chyba";Strings.OfficeOM.L_PropertyNotLoaded="Vlastnost {0} není k dispozici. PÅ™ed pÅ™eÄtením hodnoty vlastnosti volejte metodu pro naÄtení nadÅ™azeného objektu a potom volejte context.sync() pro pÅ™idružený kontext požadavku.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath omezuje výbÄ›r na 1024 položek.";Strings.OfficeOM.L_SliceSizeNotSupported="Zadaná velikost Å™ezu není podporovaná.";Strings.OfficeOM.L_InvalidApiCallInContext="Neplatné volání rozhraní API v aktuálním kontextu";Strings.OfficeOM.L_SetDataParametersConflict="Zadané parametry způsobují konflikt.";Strings.OfficeOM.L_InvalidDataFormat="Formát zadaného datového objektu je neplatný.";Strings.OfficeOM.L_SSOClientErrorMessage="V klientovi doÅ¡lo k neoÄekávané chybÄ›.";Strings.OfficeOM.L_RequestTokenUnavailable="Toto rozhraní API se omezilo, aby se zpomalila Äetnost volání.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Ignorovat";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Zadaný typ vazby není kompatibilní se zadanou pojmenovanou položkou.";Strings.OfficeOM.L_CannotNavigateTo="Objekt je v umístÄ›ní, kde se nepodporuje navigace.";Strings.OfficeOM.L_NotSupported="Funkce {0} není podporovaná.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="VýÄet není v aktuální hostitelské aplikaci podporovaný.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Neaktuální data";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="Pro zmÄ›ny vlastnosti {0} nejde použít metodu object.set.";Strings.OfficeOM.L_GetDataIsTooLarge="Požadovaná sada dat je moc velká.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="prohlížeÄ nakonfigurujte";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Poznámka: PÅ™es volání formátovacího API by se nemÄ›lo nastavovat víc než 100 formátování.";Strings.OfficeOM.L_DialogAddressNotTrusted="Doména adresy URL není zahrnutá v elementu AppDomains v manifestu.";Strings.OfficeOM.L_InvalidSetRows="Zadané řádky jsou neplatné.";Strings.OfficeOM.L_ConnectionFailureWithDetails="Žádost selhala se stavovým kódem {0}, kódem chyby {1} a následující chybovou zprávou: {2}";Strings.OfficeOM.L_PermissionDenied="OprávnÄ›ní odepÅ™ena";Strings.OfficeOM.L_UserClickIgnore="Uživatel se rozhodl ignorovat dialogové okno.";Strings.OfficeOM.L_ConnectionFailureWithStatus="Žádost selhala se stavovým kódem {0}.";Strings.OfficeOM.L_InvalidFormatValue="MinimálnÄ› jeden parametr formátu má hodnoty, které nejsou povolené. PÅ™ekontrolujte hodnoty a zkuste to znovu.";Strings.OfficeOM.L_InvalidAPICall="Neplatné volání rozhraní API";Strings.OfficeOM.L_OperationNotSupported="Operace není podporovaná.";Strings.OfficeOM.L_DataWriteError="Chyba zápisu dat";Strings.OfficeOM.L_TooManyArguments="příliÅ¡ mnoho argumentů";Strings.OfficeOM.L_UnsupportedEnumeration="Nepodporovaný výÄet";Strings.OfficeOM.L_UnknownBindingType="Tento typ vazby není podporovaný.";Strings.OfficeOM.L_SelectionCannotBound="Nejde vytvoÅ™it vazbu na aktuální výbÄ›r.";Strings.OfficeOM.L_InvalidArgumentGeneric="Argument nebo argumenty pÅ™edané funkci nejsou použitelné v této situaci, nejsou úplné nebo nemají správný formát.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="DoplnÄ›k už žádá o přístupový token";Strings.OfficeOM.L_DataNotMatchBindingType="Zadaný datový objekt není kompatibilní s typem vazby.";Strings.OfficeOM.L_SSOConnectionLostErrorMessage="A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones.";Strings.OfficeOM.L_OsfControlTypeNotSupported="Typ OsfControl není podporovaný.";Strings.OfficeOM.L_InvalidTableOptionValue="MinimálnÄ› jeden parametr tableOptions má hodnoty, které nejsou povolené. PÅ™ekontrolujte hodnoty a zkuste to znovu.";Strings.OfficeOM.L_DataWriteReminder="PÅ™ipomenutí zápisu dat";Strings.OfficeOM.L_InvalidGrantMessage="Chybí oprávnÄ›ní pro tento doplnÄ›k.";Strings.OfficeOM.L_InvalidNode="Neplatný uzel";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Zadané hodnoty rowCount nebo columnCount jsou neplatné.";Strings.OfficeOM.L_DialogInvalidScheme="Schéma adresy URL není podporované. Použijte prosím HTTPS.";Strings.OfficeOM.L_InvalidSSOAddinMessage="Rozhraní API identit se pro tento doplnÄ›k nepodporuje.";Strings.OfficeOM.L_DocumentReadOnly="Požadovaná operace není v aktuálním režimu dokumentu povolená.";Strings.OfficeOM.L_UnsupportedDataObject="Zadaný typ datového objektu není podporovaný.";Strings.OfficeOM.L_EventRegistrationError="Chyba registrace události";Strings.OfficeOM.L_ElementMissing="Nemohli jsme naformátovat buňku tabulky, protože chybí nÄ›které hodnoty parametrů. JeÅ¡tÄ› jednou zkontrolujte parametry a zkuste to znovu.";Strings.OfficeOM.L_InternalErrorDescription="DoÅ¡lo k vnitÅ™ní chybÄ›.";Strings.OfficeOM.L_CallbackNotAFunction="ZpÄ›tné volání musí být typu funkce. Bylo typu {0}.";Strings.OfficeOM.L_InvalidResourceUrlMessage="V manifestu je zadaná neplatná adresa URL prostÅ™edku.";Strings.OfficeOM.L_BindingToMultipleSelection="Nesouvislé výbÄ›ry nejsou podporované.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Povolit";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Vybraný obsah musí být ve formátu tabulky. Zformátujte data jako tabulku a zkuste to znovu.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Aplikace {0} neexistuje. Nevolá se rutina Microsoft.Office.WebExtension.initialize(reason).";Strings.OfficeOM.L_TooManyOptionalFunction="více volitelných funkcí v seznamu parametrů";Strings.OfficeOM.L_InValidOptionalArgument="neplatný volitelný argument";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory="Tento doplnÄ›k nepodporuje vyjádÅ™ení souhlasu uživatele.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="VaÅ¡e relace Office Online je neplatná nebo vyprÅ¡el její Äasový limit. Pokud chcete pokraÄovat, aktualizujte stránku.";Strings.OfficeOM.L_CannotRegisterEvent="Nedá se zaregistrovat obslužná rutina události.";Strings.OfficeOM.L_InvalidSetColumns="Zadané sloupce jsou neplatné.";Strings.OfficeOM.L_SettingNameNotExist="Zadaný název nastavení neexistuje.";Strings.OfficeOM.L_CustomFunctionDefinitionMissing="V Excel.CustomFunctions musí být vlastnost s tímto názvem, která pÅ™edstavuje definici funkce.";Strings.OfficeOM.L_InvalidBinding="Neplatná vazba";Strings.OfficeOM.L_BindingCreationError="Chyba vytváření vazby";Strings.OfficeOM.L_ColIndexOutOfRange="Hodnota indexu sloupce je mimo povolený rozsah. Použijte hodnotu (0 nebo vyšší), která je menší než poÄet sloupců." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/cs-cz/outlook_strings.debug.js b/node_modules/@microsoft/office-js/dist/cs-cz/outlook_strings.debug.js index d795082..81b672e 100644 --- a/node_modules/@microsoft/office-js/dist/cs-cz/outlook_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/cs-cz/outlook_strings.debug.js @@ -1,34 +1,35 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("_u"); _u.ExtensibilityStrings = function() { }; _u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings"); -_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Nebyli uvedení žádní příjemci."; -_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "Sanitace HTML se nepovedla."; -_u.ExtensibilityStrings.l_InvalidDate_Text = "Nebylo zadané platné datum."; -_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Příloha se nedá odstranit, protože se nenaÅ¡la příloha s indexem přílohy."; -_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "MinimálnÄ› jeden ze zadaných zobrazovaných názvů je moc dlouhý."; -_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Přílohy se nedají pÅ™idat, protože zpráva už má maximální možný poÄet příloh."; -_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Uvedené parametry neodpovídají oÄekávanému formátu."; +_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Pro přístup k chránÄ›ným Älenům rozhraní JavaScript API pro Office je potÅ™eba zvýšené oprávnÄ›ní. "; _u.ExtensibilityStrings.l_InvalidEndTime_Text = "ÄŒas ukonÄení nesmí pÅ™edcházet Äasu zahájení."; -_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Chyba přílohy"; +_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Uvedené parametry neodpovídají oÄekávanému formátu."; +_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Příloha se nedá pÅ™idat, protože je moc velká."; +_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "Sanitace HTML se nepovedla."; +_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Nebyli uvedení žádní příjemci."; +_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Přílohy se nedají pÅ™idat, když se ze serveru naÄítá celá odpovÄ›Ä nebo pÅ™eposlaná zpráva."; +_u.ExtensibilityStrings.l_InternalProtocolError_Text = "VnitÅ™ní chyba protokolu: {0}."; _u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "Vybraná položka se zmÄ›nila."; -_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "PÅ™ed dokonÄením nahrávání uživatel odebral přílohu."; -_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "ID přílohy není platné."; -_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Celkový poÄet příjemců v poli nesmí pÅ™esáhnout {0}."; -_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "Cesta k příloze není platná."; _u.ExtensibilityStrings.l_OffsetNotfound_Text = "Hodnotu offset této Äasové známky není možné najít."; -_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Příloha se nedá pÅ™idat, protože je moc velká."; -_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "PÅ™i vkládání dat uživatel zmÄ›nil pozici kurzoru."; -_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Chyba zápisu dat"; +_u.ExtensibilityStrings.l_InvalidDate_Text = "Nebylo zadané platné datum."; +_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "Je potÅ™eba, aby zvýšené oprávnÄ›ní volalo metodu: {0}."; +_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Příloha se nedá pÅ™idat k položce."; _u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "MinimálnÄ› jedna ze zadaných e-mailových adres je moc dlouhá."; -_u.ExtensibilityStrings.l_InvalidEventDates_Text = "Koncové datum pÅ™edchází poÄáteÄnímu datu."; -_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Přílohy se nedají pÅ™idat, když se ze serveru naÄítá celá odpovÄ›Ä nebo pÅ™eposlaná zpráva."; +_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "Cesta k příloze není platná."; +_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "ID přílohy není platné."; _u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Příloha se nedá odstranit z položky."; -_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Příloha se nedá pÅ™idat k položce."; +_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "PÅ™i vkládání dat uživatel zmÄ›nil pozici kurzoru."; +_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Přílohy se nedají pÅ™idat, protože zpráva už má maximální možný poÄet příloh."; +_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "PÅ™ed dokonÄením nahrávání uživatel odebral přílohu."; +_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Chyba zápisu dat"; +_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Příloha se nedá odstranit, protože se nenaÅ¡la příloha s indexem přílohy."; _u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Požadavek nesmí být vÄ›tší než 1 MB. Upravte svou žádost Webových služeb Exchange (EWS)."; +_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Chyba přílohy"; _u.ExtensibilityStrings.l_InternalFormatError_Text = "DoÅ¡lo k chybÄ› vnitÅ™ního formátu."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "Je potÅ™eba, aby zvýšené oprávnÄ›ní volalo metodu: {0}."; -_u.ExtensibilityStrings.l_InternalProtocolError_Text = "VnitÅ™ní chyba protokolu: {0}."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Pro přístup k chránÄ›ným Älenům rozhraní JavaScript API pro Office je potÅ™eba zvýšené oprávnÄ›ní. " +_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Celkový poÄet příjemců v poli nesmí pÅ™esáhnout {0}."; +_u.ExtensibilityStrings.l_InvalidEventDates_Text = "Koncové datum pÅ™edchází poÄáteÄnímu datu."; +_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "MinimálnÄ› jeden ze zadaných zobrazovaných názvů je moc dlouhý." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/cs-cz/outlook_strings.js b/node_modules/@microsoft/office-js/dist/cs-cz/outlook_strings.js index 25c3663..c012bab 100644 --- a/node_modules/@microsoft/office-js/dist/cs-cz/outlook_strings.js +++ b/node_modules/@microsoft/office-js/dist/cs-cz/outlook_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Nebyli uvedení žádní příjemci.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="Sanitace HTML se nepovedla.";_u.ExtensibilityStrings.l_InvalidDate_Text="Nebylo zadané platné datum.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Příloha se nedá odstranit, protože se nenaÅ¡la příloha s indexem přílohy.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="MinimálnÄ› jeden ze zadaných zobrazovaných názvů je moc dlouhý.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Přílohy se nedají pÅ™idat, protože zpráva už má maximální možný poÄet příloh.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Uvedené parametry neodpovídají oÄekávanému formátu.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="ÄŒas ukonÄení nesmí pÅ™edcházet Äasu zahájení.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Chyba přílohy";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Vybraná položka se zmÄ›nila.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="PÅ™ed dokonÄením nahrávání uživatel odebral přílohu.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="ID přílohy není platné.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Celkový poÄet příjemců v poli nesmí pÅ™esáhnout {0}.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="Cesta k příloze není platná.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Hodnotu offset této Äasové známky není možné najít.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Příloha se nedá pÅ™idat, protože je moc velká.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="PÅ™i vkládání dat uživatel zmÄ›nil pozici kurzoru.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Chyba zápisu dat";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="MinimálnÄ› jedna ze zadaných e-mailových adres je moc dlouhá.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="Koncové datum pÅ™edchází poÄáteÄnímu datu.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Přílohy se nedají pÅ™idat, když se ze serveru naÄítá celá odpovÄ›Ä nebo pÅ™eposlaná zpráva.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Příloha se nedá odstranit z položky.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Příloha se nedá pÅ™idat k položce.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Požadavek nesmí být vÄ›tší než 1 MB. Upravte svou žádost Webových služeb Exchange (EWS).";_u.ExtensibilityStrings.l_InternalFormatError_Text="DoÅ¡lo k chybÄ› vnitÅ™ního formátu.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Je potÅ™eba, aby zvýšené oprávnÄ›ní volalo metodu: {0}.";_u.ExtensibilityStrings.l_InternalProtocolError_Text="VnitÅ™ní chyba protokolu: {0}.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Pro přístup k chránÄ›ným Älenům rozhraní JavaScript API pro Office je potÅ™eba zvýšené oprávnÄ›ní. " \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Pro přístup k chránÄ›ným Älenům rozhraní JavaScript API pro Office je potÅ™eba zvýšené oprávnÄ›ní. ";_u.ExtensibilityStrings.l_InvalidEndTime_Text="ÄŒas ukonÄení nesmí pÅ™edcházet Äasu zahájení.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Uvedené parametry neodpovídají oÄekávanému formátu.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Příloha se nedá pÅ™idat, protože je moc velká.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="Sanitace HTML se nepovedla.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Nebyli uvedení žádní příjemci.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Přílohy se nedají pÅ™idat, když se ze serveru naÄítá celá odpovÄ›Ä nebo pÅ™eposlaná zpráva.";_u.ExtensibilityStrings.l_InternalProtocolError_Text="VnitÅ™ní chyba protokolu: {0}.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Vybraná položka se zmÄ›nila.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Hodnotu offset této Äasové známky není možné najít.";_u.ExtensibilityStrings.l_InvalidDate_Text="Nebylo zadané platné datum.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Je potÅ™eba, aby zvýšené oprávnÄ›ní volalo metodu: {0}.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Příloha se nedá pÅ™idat k položce.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="MinimálnÄ› jedna ze zadaných e-mailových adres je moc dlouhá.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="Cesta k příloze není platná.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="ID přílohy není platné.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Příloha se nedá odstranit z položky.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="PÅ™i vkládání dat uživatel zmÄ›nil pozici kurzoru.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Přílohy se nedají pÅ™idat, protože zpráva už má maximální možný poÄet příloh.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="PÅ™ed dokonÄením nahrávání uživatel odebral přílohu.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Chyba zápisu dat";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Příloha se nedá odstranit, protože se nenaÅ¡la příloha s indexem přílohy.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Požadavek nesmí být vÄ›tší než 1 MB. Upravte svou žádost Webových služeb Exchange (EWS).";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Chyba přílohy";_u.ExtensibilityStrings.l_InternalFormatError_Text="DoÅ¡lo k chybÄ› vnitÅ™ního formátu.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Celkový poÄet příjemců v poli nesmí pÅ™esáhnout {0}.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="Koncové datum pÅ™edchází poÄáteÄnímu datu.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="MinimálnÄ› jeden ze zadaných zobrazovaných názvů je moc dlouhý." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/da-dk/office_strings.debug.js b/node_modules/@microsoft/office-js/dist/da-dk/office_strings.debug.js index a716ef7..6d9ae25 100644 --- a/node_modules/@microsoft/office-js/dist/da-dk/office_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/da-dk/office_strings.debug.js @@ -1,179 +1,190 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("Strings"); Strings.OfficeOM = function() { }; Strings.OfficeOM.registerClass("Strings.OfficeOM"); -Strings.OfficeOM.L_DataNotMatchBindingSize = "Det angivne dataobjekt svarer ikke til størrelsen pÃ¥ den aktuelle markering."; -Strings.OfficeOM.L_CustomXmlOutOfDateName = "Dataene er ikke aktuelle"; +Strings.OfficeOM.L_ValueNotLoaded = 'Værdien af resultatobjektet er endnu ikke indlæst. Før du læser værdiegenskaben, skal du kalde "context.sync()" i den tilknyttede anmodningskontekst.'; +Strings.OfficeOM.L_SettingsAreStale = "Indstillingerne kunne ikke gemmes, fordi de ikke er aktuelle."; Strings.OfficeOM.L_SaveSettingsError = "Fejl ved lagring af indstillinger"; -Strings.OfficeOM.L_RequestTimeout = "Opkaldet tog for lang tid at udføre."; -Strings.OfficeOM.L_InvalidResourceUrl = "Der er angivet en ugyldig URL-adresse for programressourcen."; -Strings.OfficeOM.L_APICallFailed = "API-kald mislykkedes"; -Strings.OfficeOM.L_InvalidValue = "Ugyldig værdi"; -Strings.OfficeOM.L_RequestTokenUnavailable = "Denne API er blevet begrænset for at nedsætte opkaldshyppigheden."; -Strings.OfficeOM.L_DialogAlreadyOpened = "Handlingen mislykkedes, fordi dette tilføjelsesprogram allerede har en aktiv dialogboks."; -Strings.OfficeOM.L_UnsupportedDataObject = "Det angivne dataobjekt understøttes ikke."; -Strings.OfficeOM.L_CannotWriteToSelection = "Der kan ikke skrives til det aktuelle valg."; -Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Foretag en markering."; -Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Bemærk! Det foreslÃ¥s, at antallet af formateringssæt, der er angivet af et Formatting API-kald, er under 100."; -Strings.OfficeOM.L_SSOClientErrorMessage = "Der opstod en uventet fejl i klienten."; -Strings.OfficeOM.L_InvalidObjectPath = 'Stien til objektet \'{0}\' fungerer ikke for det, du forsøger at gøre. Hvis du bruger objektet pÃ¥ tværs af flere "context.sync"-kald og uden for den sekventielle udførelsen af et ".run" batch, skal du bruge metoderne "context.trackedObjects.add()" og "context.trackedObjects.remove()" til at administrere objektets levetid.'; -Strings.OfficeOM.L_OutOfRange = "Uden for intervallet"; -Strings.OfficeOM.L_CustomXmlError = "Brugerdefineret XML-fejl."; -Strings.OfficeOM.L_CannotNavigateTo = "Objektet er placeret et sted, hvor navigation ikke understøttes."; -Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Tillad"; -Strings.OfficeOM.L_NewWindowCrossZone = 'Sikkerhedsindstillingerne i din browser forhindrer os i at oprette en dialogboks. Prøv en anden browser eller {0}, sÃ¥ "{1}" og det domæne, der vises i adresselinjen, er i samme sikkerhedszone.'; +Strings.OfficeOM.L_SSOConnectionLostErrorMessage = "A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones."; Strings.OfficeOM.L_NotSupportedBindingType = "Den angivne bindingstype {0} understøttes ikke."; -Strings.OfficeOM.L_InvalidFormat = "Ugyldigt format-fejl"; -Strings.OfficeOM.L_NotSupportedEventType = "Den angivne hændelsestype {0} understøttes ikke."; +Strings.OfficeOM.L_CustomXmlOutOfDateName = "Dataene er ikke aktuelle"; +Strings.OfficeOM.L_DialogInvalidScheme = "URL-skema understøttes ikke. Brug HTTPS i stedet."; +Strings.OfficeOM.L_InvalidGetColumns = "De angivne kolonner er ugyldige."; +Strings.OfficeOM.L_BadSelectorString = "Den streng, der er overført til vælgeren, er formateret forkert eller understøttes ikke."; Strings.OfficeOM.L_FormatValueOutOfRange = "Værdien er uden for det tilladte interval."; -Strings.OfficeOM.L_InValidOptionalArgument = "ugyldigt valgfrit argument"; -Strings.OfficeOM.L_InvalidDataFormat = "Formatet for det angivne dataobjekt er ugyldigt."; +Strings.OfficeOM.L_EventRegistrationError = "Fejl ved registrering af hændelse"; +Strings.OfficeOM.L_ElementMissing = "Vi kunne ikke formatere tabelcellen, fordi der mangler nogle parameterværdier. Dobbelttjek parametrene, og prøv igen."; +Strings.OfficeOM.L_UnsupportedDataObject = "Det angivne dataobjekt understøttes ikke."; Strings.OfficeOM.L_EventHandlerNotExist = "Den angivne hændelseshandler blev ikke fundet for denne binding."; -Strings.OfficeOM.L_InvalidFormatValue = "En eller flere af formatparametrene har værdier, som ikke er tilladt. Dobbelttjek værdierne, og prøv igen."; -Strings.OfficeOM.L_UserClickIgnore = "Brugeren valgte at ignorere dialogboksen."; -Strings.OfficeOM.L_InternalError = "Intern fejl"; -Strings.OfficeOM.L_DataNotMatchSelection = "Det angivne dataobjekt er ikke kompatibelt med figuren eller mÃ¥lene i den aktuelle markering."; +Strings.OfficeOM.L_InvalidOperationInCellEditMode = "Excel er i celleredigeringstilstand. Afslut redigeringstilstand ved at trykke pÃ¥ ENTER eller TAB eller ved at vælge en anden celle, og derefter prøve igen."; +Strings.OfficeOM.L_BindingToMultipleSelection = "Ikke-sammenhængende markeringer understøttes ikke."; Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Grænsen for valg er nÃ¥et"; -Strings.OfficeOM.L_GetDataIsTooLarge = "Det anmodede datasæt er for stort."; -Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "Din Office Online-session er udløbet eller er ugyldig. Opdater siden for at fortsætte."; -Strings.OfficeOM.L_EventHandlerRemovalFailed = "Hændelseshandleren blev ikke fjernet."; -Strings.OfficeOM.L_InternalErrorDescription = "Der opstod en intern fejl."; -Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Den angivne bindingstype er ikke kompatibel med det navngivne element. "; +Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Handlingen mislykkedes, fordi dette tilføjelsesprogram allerede anmoder om en adgangstoken."; +Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Kald closeAsync i den aktuelle fil, før du henter en anden."; +Strings.OfficeOM.L_InvalidGetStartRowColumn = "De angivne værdier for startRow eller startColumn er ugyldige."; +Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Foretag en markering."; +Strings.OfficeOM.L_CustomFunctionNameCannotSplit = "Funktionens navn skal indeholde et navneomrÃ¥de, der ikke er tomt, og et kort navn, der ikke er tomt."; +Strings.OfficeOM.L_CustomFunctionImplementationMissing = "Egenskaben med dette navn pÃ¥ Excel.CustomFunctions, der repræsenterer funktionens definition, skal indeholde en 'kaldet'-egenskab, der implementerer funktionen."; +Strings.OfficeOM.L_SettingsCannotSave = "Indstillingerne kunne ikke gemmes."; +Strings.OfficeOM.L_InvalidOrTimedOutSession = "Session er ugyldig eller har fÃ¥et timeout"; +Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Ugyldige inputargumenter."; +Strings.OfficeOM.L_InvalidDataFormat = "Formatet for det angivne dataobjekt er ugyldigt."; +Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Identitetstypen for brugeren understøttes ikke."; Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Markeret indhold skal være i tabelformat. Formatér dataene som en tabel, og prøv igen."; -Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = 'Ændringer i egenskaben "{0}" kan ikke anvendes gennem en "object.set"-metode.'; -Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = 'Forsøger at indstille den skrivebeskyttede egenskab "{0}".'; -Strings.OfficeOM.L_InvalidSelectionForBindingType = "Der kan ikke oprettes en binding med den aktuelle markering og den angivne bindingstype."; +Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Et netværksproblem har forhindret hentning af filen."; +Strings.OfficeOM.L_OverwriteWorksheetData = "Indstillingshandlingen mislykkedes, fordi det medfølgende dataobjekt vil overskrive eller skifte data."; +Strings.OfficeOM.L_InvalidReadForBlankRow = "Den angivne række er tom."; +Strings.OfficeOM.L_RowIndexOutOfRange = "Rækkeindeksværdien ligger uden for det tilladte interval. Brug en værdi (0 eller højere), som er lavere end antallet af rækker."; +Strings.OfficeOM.L_TooManyOptionalFunction = "flere valgfrie funktioner pÃ¥ parameterliste"; +Strings.OfficeOM.L_CustomXmlError = "Brugerdefineret XML-fejl."; Strings.OfficeOM.L_InitializeNotReady = "Office.js er endnu ikke fuldt indlæst. Prøv igen senere, eller sørg for at tilføje din initialiseringskode i funktionen Office.initialize."; -Strings.OfficeOM.L_DataReadError = "Fejl i læsning af data"; +Strings.OfficeOM.L_NewWindowCrossZone = 'Sikkerhedsindstillingerne i din browser forhindrer os i at oprette en dialogboks. Prøv en anden browser eller {0}, sÃ¥ "{1}" og det domæne, der vises i adresselinjen, er i samme sikkerhedszone.'; +Strings.OfficeOM.L_CallbackNotAFunction = "Tilbagekald skal være af typen funktion, men var af typen {0}."; +Strings.OfficeOM.L_FunctionCallFailed = "Kald til funktionen {0} mislykkedes, fejlkode: {1}."; +Strings.OfficeOM.L_DataNotMatchCoercionType = "Typen for det angivne dataobjekt er ikke kompatibel med den aktuelle markering."; +Strings.OfficeOM.L_RequestTokenUnavailable = "Denne API er blevet begrænset for at nedsætte opkaldshyppigheden."; +Strings.OfficeOM.L_CoercionTypeNotSupported = "Den angivne type tvangsforanstaltning understøttes ikke."; +Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = 'Forsøger at indstille den skrivebeskyttede egenskab "{0}".'; +Strings.OfficeOM.L_DataNotMatchSelection = "Det angivne dataobjekt er ikke kompatibelt med figuren eller mÃ¥lene i den aktuelle markering."; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory = "Dette tilføjelsesprogram understøtter ikke brugersamtykke."; Strings.OfficeOM.L_NotSupported = "Funktionen {0} understøttes ikke."; -Strings.OfficeOM.L_ConnectionFailureWithDetails = "Anmodningen mislykkedes med statuskoden {0}, fejlkoden {1} og følgende fejlmeddelelse: {2}"; -Strings.OfficeOM.L_ValueNotLoaded = 'Værdien af resultatobjektet er endnu ikke indlæst. Før du læser værdiegenskaben, skal du kalde "context.sync()" i den tilknyttede anmodningskontekst.'; -Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Koordinatparametre kan ikke bruges med tvangsforanstaltningen af typen Tabel, hvis tabellen indeholder flettede celler."; -Strings.OfficeOM.L_AppNameNotExist = "Navnet pÃ¥ tilføjelsesprogrammet til {0} findes ikke."; +Strings.OfficeOM.L_MissingParameter = "Parameter mangler"; +Strings.OfficeOM.L_APICallFailed = "API-kald mislykkedes"; +Strings.OfficeOM.L_ApiNotFoundDetails = "Metoden eller egenskaben {0} er del af det {1}-sæt af krav, som ikke er tilgængeligt i din version af {2}."; +Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Handlingen understøttes ikke pÃ¥ denne bindingstype."; +Strings.OfficeOM.L_ColIndexOutOfRange = "Kolonneindeksværdien ligger uden for det tilladte interval. Brug en værdi (0 eller højere), som er lavere end antallet af kolonner."; +Strings.OfficeOM.L_InvalidGrantMessage = "Manglende tilskud til dette tilføjelsesprogram."; +Strings.OfficeOM.L_NamedItemNotFound = "Det navngivne element findes ikke."; Strings.OfficeOM.L_DialogOK = "OK"; -Strings.OfficeOM.L_BrowserAPINotSupported = "Denne browser understøtter ikke den anmodede API."; -Strings.OfficeOM.L_SettingsCannotSave = "Indstillingerne kunne ikke gemmes."; -Strings.OfficeOM.L_InvalidNode = "Ugyldig node"; -Strings.OfficeOM.L_InvalidResourceUrlMessage = "Der er angivet en ugyldig URL-adresse for ressourcen i manifestet."; -Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Koordinatparametre kan ikke bruges med tvangsforanstaltningen af typen Tabel, hvis tabellen indeholder flettede celler."; -Strings.OfficeOM.L_SettingsStaleError = "Fejl pga. forældede indstillinger"; -Strings.OfficeOM.L_Timeout = "Handlingen fik timeout og er blevet afbrudt."; -Strings.OfficeOM.L_PropertyNotLoaded = "Egenskaben '{0}' er ikke tilgængelig. Før du læser egenskabens værdi, skal du kalde indlæsningsmetoden pÃ¥ det indeholdende objekt og kalde \"context.sync()\" pÃ¥ den tilknyttede anmodningskontekst."; -Strings.OfficeOM.L_InvalidGetRowColumnCounts = "De angivne værdier for wowCount eller columnCount er ugyldige."; -Strings.OfficeOM.L_UnsupportedEnumeration = "Ikke-understøttet optælling"; -Strings.OfficeOM.L_BindingNotExist = "Den angivne binding findes ikke."; -Strings.OfficeOM.L_TooManyOptionalFunction = "flere valgfrie funktioner pÃ¥ parameterliste"; -Strings.OfficeOM.L_InvalidCellsValue = "En eller flere af parametrene i cellerne har værdier, som ikke er tilladt. Dobbelttjek værdierne, og prøv igen."; -Strings.OfficeOM.L_InvalidGrant = "ForhÃ¥ndsgodkendelse mangler."; -Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Programmet {0} findes ikke. Microsoft.Office.WebExtension.initialize(reason) er ikke kaldt."; -Strings.OfficeOM.L_SSOServerErrorMessage = "Der opstod en uventet fejl pÃ¥ serveren."; +Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Bemærk! Det foreslÃ¥s, at antallet af celler i en tabel er under 20.000 celler."; Strings.OfficeOM.L_DataStale = "Data er ikke aktuelle"; -Strings.OfficeOM.L_RowIndexOutOfRange = "Rækkeindeksværdien ligger uden for det tilladte interval. Brug en værdi (0 eller højere), som er lavere end antallet af rækker."; -Strings.OfficeOM.L_TooManyOptionalObjects = "flere valgfrie objekter pÃ¥ parameterliste"; -Strings.OfficeOM.L_APINotSupported = "API understøttes ikke"; -Strings.OfficeOM.L_DialogInvalidScheme = "URL-skema understøttes ikke. Brug HTTPS i stedet."; -Strings.OfficeOM.L_HostError = "Værtsfejl"; -Strings.OfficeOM.L_InvalidBindingError = "Ugyldig bindingsfejl"; -Strings.OfficeOM.L_DataNotMatchCoercionType = "Typen for det angivne dataobjekt er ikke kompatibel med den aktuelle markering."; -Strings.OfficeOM.L_DialogAddressNotTrusted = "Domænet for URL-adressen er ikke inkluderet i elementet AppDomains i manifestet."; -Strings.OfficeOM.L_NotImplemented = "Funktion {0} er ikke implementeret."; -Strings.OfficeOM.L_SliceSizeNotSupported = "Den angivne udsnitsstørrelse understøttes ikke."; -Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Dataene er forældede. Hent objektet igen."; -Strings.OfficeOM.L_NoCapability = "Du har ikke tilstrækkelige rettigheder til at udføre denne handling."; -Strings.OfficeOM.L_UnsupportedUserIdentity = "Brugeridentitetstypen understøttes ikke."; -Strings.OfficeOM.L_InvalidBindingOperation = "Ugyldig bindingshandling"; -Strings.OfficeOM.L_OverwriteWorksheetData = "Indstillingshandlingen mislykkedes, fordi det medfølgende dataobjekt vil overskrive eller skifte data."; -Strings.OfficeOM.L_OperationNotSupported = "Handlingen understøttes ikke."; -Strings.OfficeOM.L_DisplayDialogError = "FÃ¥ vist fejl i dialogboksen"; -Strings.OfficeOM.L_OsfControlTypeNotSupported = "Typen OsfControl understøttes ikke."; -Strings.OfficeOM.L_SelectionCannotBound = "Den aktuelle markering kan ikke bindes."; +Strings.OfficeOM.L_ShuttingDown = "Handlingen mislykkedes, fordi dataene ikke findes pÃ¥ serveren."; +Strings.OfficeOM.L_InternalErrorDescription = "Der opstod en intern fejl."; +Strings.OfficeOM.L_CustomFunctionNameContainsBadChars = "Funktionens navn mÃ¥ kun indeholde bogstaver, tal, understregningstegn og punktummer."; +Strings.OfficeOM.L_RequestTimeout = "Opkaldet tog for lang tid at udføre."; +Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = 'Ændringer i egenskaben "{0}" kan ikke anvendes gennem en "object.set"-metode.'; +Strings.OfficeOM.L_InvalidArgumentGeneric = "Det eller de argumenter, der er overført til funktionen, fungerer ikke i denne situation, mangler eller har ikke det rigtige format."; +Strings.OfficeOM.L_PropertyNotLoaded = "Egenskaben '{0}' er ikke tilgængelig. Før du læser egenskabens værdi, skal du kalde indlæsningsmetoden pÃ¥ det indeholdende objekt og kalde \"context.sync()\" pÃ¥ den tilknyttede anmodningskontekst."; +Strings.OfficeOM.L_PropertyDoesNotExist = 'Egenskaben "{0}" findes ikke pÃ¥ objektet.'; Strings.OfficeOM.L_TooManyIncompleteRequests = "Vent, indtil det forrige opkald er fuldført."; -Strings.OfficeOM.L_FunctionCallFailed = "Kald til funktionen {0} mislykkedes, fejlkode: {1}."; -Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Et netværksproblem har forhindret hentning af filen."; +Strings.OfficeOM.L_IndexOutOfRange = "Indeks er uden for omrÃ¥de."; +Strings.OfficeOM.L_SetDataParametersConflict = "De angivne parametre er i konflikt."; Strings.OfficeOM.L_EventHandlerAdditionFailed = "Hændelseshandleren blev ikke tilføjet."; -Strings.OfficeOM.L_InvalidBinding = "Ugyldig binding"; -Strings.OfficeOM.L_ShuttingDown = "Handlingen mislykkedes, fordi dataene ikke findes pÃ¥ serveren."; -Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Ugyldige inputargumenter."; -Strings.OfficeOM.L_CannotRegisterEvent = "Hændelseshandleren kan ikke registreres."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Tilføjelsesprogrammet anmoder allerede om en adgangstoken."; -Strings.OfficeOM.L_InvalidGetStartRowColumn = "De angivne værdier for startRow eller startColumn er ugyldige."; -Strings.OfficeOM.L_DataWriteError = "Fejl i skrivning af data"; -Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath begrænser valget til 1.024 elementer."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Handlingen mislykkedes, fordi dette tilføjelsesprogram allerede anmoder om en adgangstoken."; -Strings.OfficeOM.L_InvalidSetColumns = "De angivne kolonner er ugyldige."; -Strings.OfficeOM.L_InvalidGetRows = "De angivne rækker er ugyldige."; -Strings.OfficeOM.L_InvalidApiCallInContext = "Ugyldigt API-kald i den aktuelle kontekst."; -Strings.OfficeOM.L_ColIndexOutOfRange = "Kolonneindeksværdien ligger uden for det tilladte interval. Brug en værdi (0 eller højere), som er lavere end antallet af kolonner."; -Strings.OfficeOM.L_MissingRequiredArguments = "en række obligatoriske argumenter mangler"; -Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Ignorer"; -Strings.OfficeOM.L_ElementMissing = "Vi kunne ikke formatere tabelcellen, fordi der mangler nogle parameterværdier. Dobbelttjek parametrene, og prøv igen."; -Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Handlingen understøttes ikke pÃ¥ denne bindingstype."; -Strings.OfficeOM.L_InvalidGetColumns = "De angivne kolonner er ugyldige."; -Strings.OfficeOM.L_TooManyArguments = "for mange argumenter"; -Strings.OfficeOM.L_ConnectionFailureWithStatus = "Anmodningen mislykkedes. Statuskode: {0}."; -Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "konfigurer din browser"; -Strings.OfficeOM.L_MissingParameter = "Parameter mangler"; -Strings.OfficeOM.L_InvalidDataObject = "Ugyldigt dataobjekt"; -Strings.OfficeOM.L_InvalidSetStartRowColumn = "De angivne værdier for startRow eller startColumn er ugyldige."; -Strings.OfficeOM.L_NetworkProblem = "Netværksproblem"; -Strings.OfficeOM.L_CallbackNotAFunction = "Tilbagekald skal være af typen funktion, men var af typen {0}."; -Strings.OfficeOM.L_UnknownBindingType = "Bindingstypen understøttes ikke."; -Strings.OfficeOM.L_RunMustReturnPromise = 'Den batchfunktion, der blev videresendt til ".run"-metoden, returnerede ikke et tilsagn. Funktionen skal returnere et tilsagn, sÃ¥ de automatisk registrerede objekter kan frigives, nÃ¥r batchhandlingen er fuldført. Normalt kan du returnere et tilsagn ved at returnere svaret fra "context.sync()".'; -Strings.OfficeOM.L_MultipleNamedItemFound = "Der er fundet flere objekter med samme navn."; Strings.OfficeOM.L_DocumentReadOnly = "Den ønskede handling er ikke tilladt i den aktuelle dokumenttilstand."; -Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Identitetstypen for brugeren understøttes ikke."; -Strings.OfficeOM.L_FileTypeNotSupported = "Den angivne filtype understøttes ikke."; -Strings.OfficeOM.L_InvalidColumnsForBinding = "De angivne kolonner er ugyldige."; -Strings.OfficeOM.L_InvalidCoercion = "Ugyldig type tvangsforanstaltning"; -Strings.OfficeOM.L_InvalidSetRows = "De angivne rækker er ugyldige."; -Strings.OfficeOM.L_InvalidGrantMessage = "Manglende tilskud til dette tilføjelsesprogram."; -Strings.OfficeOM.L_SettingsAreStale = "Indstillingerne kunne ikke gemmes, fordi de ikke er aktuelle."; -Strings.OfficeOM.L_IndexOutOfRange = "Indeks er uden for omrÃ¥de."; -Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Bemærk! Det foreslÃ¥s, at antallet af celler i en tabel er under 20.000 celler."; +Strings.OfficeOM.L_Timeout = "Handlingen fik timeout og er blevet afbrudt."; +Strings.OfficeOM.L_SSOServerError = "Der opstod en fejl i godkendelsesprovideren."; +Strings.OfficeOM.L_CustomXmlNodeNotFound = "Den angivne node blev ikke fundet."; +Strings.OfficeOM.L_PermissionDenied = "Tilladelse nægtet"; +Strings.OfficeOM.L_DisplayDialogError = "FÃ¥ vist fejl i dialogboksen"; Strings.OfficeOM.L_InvalidAPICall = "Ugyldigt API-kald"; -Strings.OfficeOM.L_UserAborted = "Brugeren afbrød samtykkeanmodningen."; +Strings.OfficeOM.L_UnsupportedEnumerationMessage = "Optællingen understøttes ikke i det aktuelle værtsprogram."; +Strings.OfficeOM.L_GetSelectionNotSupported = "Den aktuelle markering understøttes ikke."; +Strings.OfficeOM.L_RedundantCallbackSpecification = "Der kan ikke specificeres tilbagekald bÃ¥de i argumentlisten og i valgfrit objekt."; +Strings.OfficeOM.L_DataNotMatchBindingSize = "Det angivne dataobjekt svarer ikke til størrelsen pÃ¥ den aktuelle markering."; +Strings.OfficeOM.L_InvalidArgument = "Argumentet '{0}' virker ikke i denne situation, det mangler, eller det har ikke det rigtige format."; +Strings.OfficeOM.L_SSOClientErrorMessage = "Der opstod en uventet fejl i klienten."; +Strings.OfficeOM.L_AppNameNotExist = "Navnet pÃ¥ tilføjelsesprogrammet til {0} findes ikke."; +Strings.OfficeOM.L_TooManyOptionalObjects = "flere valgfrie objekter pÃ¥ parameterliste"; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage = "Handlingen mislykkedes, fordi dette tilføjelsesprogram ikke understøtter brugersamtykke i denne kategori"; +Strings.OfficeOM.L_UnsupportedEnumeration = "Ikke-understøttet optælling"; Strings.OfficeOM.L_DataWriteReminder = "PÃ¥mindelse om dataskrivning"; -Strings.OfficeOM.L_NamedItemNotFound = "Det navngivne element findes ikke."; +Strings.OfficeOM.L_GetDataIsTooLarge = "Det anmodede datasæt er for stort."; +Strings.OfficeOM.L_NoCapability = "Du har ikke tilstrækkelige rettigheder til at udføre denne handling."; +Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Ignorer"; +Strings.OfficeOM.L_DialogNavigateError = "Fejl i dialogboksen Navigation"; +Strings.OfficeOM.L_DataWriteError = "Fejl i skrivning af data"; +Strings.OfficeOM.L_InvalidRequestContext = "Objektet kan ikke bruges pÃ¥ tværs af forskellige anmodningskontekster."; +Strings.OfficeOM.L_DialogAddressNotTrusted = "Domænet for URL-adressen er ikke inkluderet i elementet AppDomains i manifestet."; Strings.OfficeOM.L_InvalidTableOptionValue = "En eller flere af parametrene for TabelIndstillinger har værdier, som ikke er tilladt. Dobbelttjek værdierne, og prøv igen."; -Strings.OfficeOM.L_BindingCreationError = "Fejl ved oprettelse af binding"; -Strings.OfficeOM.L_PermissionDenied = "Tilladelse nægtet"; -Strings.OfficeOM.L_SSOServerError = "Der opstod en fejl i godkendelsesprovideren."; +Strings.OfficeOM.L_CannotRegisterEvent = "Hændelseshandleren kan ikke registreres."; +Strings.OfficeOM.L_MultipleNamedItemFound = "Der er fundet flere objekter med samme navn."; +Strings.OfficeOM.L_InvalidBindingOperation = "Ugyldig bindingshandling"; +Strings.OfficeOM.L_UserAbortedMessage = "Brugeren har ikke givet samtykke til tilføjelsesprogramtilladelserne."; +Strings.OfficeOM.L_InvalidSetStartRowColumn = "De angivne værdier for startRow eller startColumn er ugyldige."; +Strings.OfficeOM.L_ConnectionFailureWithStatus = "Anmodningen mislykkedes. Statuskode: {0}."; +Strings.OfficeOM.L_InvalidCoercion = "Ugyldig type tvangsforanstaltning"; +Strings.OfficeOM.L_SliceSizeNotSupported = "Den angivne udsnitsstørrelse understøttes ikke."; Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Den angivne type tvangsforanstaltning er ikke kompatibel med denne bindingstype."; +Strings.OfficeOM.L_InvalidBindingError = "Ugyldig bindingsfejl"; +Strings.OfficeOM.L_InvalidSetColumns = "De angivne kolonner er ugyldige."; +Strings.OfficeOM.L_CustomFunctionDefinitionMissing = "En egenskab med dette navn, der repræsenterer funktionens definition skal findes pÃ¥ Excel.CustomFunctions."; +Strings.OfficeOM.L_InternalError = "Intern fejl"; Strings.OfficeOM.L_ActivityLimitReached = "Aktivitetsgrænsen er nÃ¥et."; -Strings.OfficeOM.L_InvalidRequestContext = "Objektet kan ikke bruges pÃ¥ tværs af forskellige anmodningskontekster."; -Strings.OfficeOM.L_DataNotMatchBindingType = "Det angivne dataobjekt er ikke kompatibelt med bindingstypen."; -Strings.OfficeOM.L_DialogNavigateError = "Fejl i dialogboksen Navigation"; -Strings.OfficeOM.L_EventRegistrationError = "Fejl ved registrering af hændelse"; -Strings.OfficeOM.L_InvalidSSOAddinMessage = "Id-API understøttes ikke for dette tilføjelsesprogram."; -Strings.OfficeOM.L_GetDataParametersConflict = "De angivne parametre er i konflikt."; -Strings.OfficeOM.L_CoercionTypeNotSupported = "Den angivne type tvangsforanstaltning understøttes ikke."; -Strings.OfficeOM.L_CustomXmlNodeNotFound = "Den angivne node blev ikke fundet."; -Strings.OfficeOM.L_SettingNameNotExist = "Den angivne indstilling findes ikke."; -Strings.OfficeOM.L_SSOClientError = "Der opstod en fejl i anmodningen om godkendelse fra Office."; -Strings.OfficeOM.L_InvalidParameters = "Funktion {0} har ugyldige parametre."; Strings.OfficeOM.L_DialogRequireHTTPS = "HTTP-protokollen understøttes ikke. Brug HTTPS i stedet"; -Strings.OfficeOM.L_BadSelectorString = "Den streng, der er overført til vælgeren, er formateret forkert eller understøttes ikke."; -Strings.OfficeOM.L_SpecifiedIdNotExist = "Det angivne id findes ikke."; -Strings.OfficeOM.L_UserNotSignedIn = "Ingen bruger er logget pÃ¥ Office."; -Strings.OfficeOM.L_RedundantCallbackSpecification = "Der kan ikke specificeres tilbagekald bÃ¥de i argumentlisten og i valgfrit objekt."; -Strings.OfficeOM.L_GetSelectionNotSupported = "Den aktuelle markering understøttes ikke."; -Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Kald closeAsync i den aktuelle fil, før du henter en anden."; -Strings.OfficeOM.L_ReadSettingsError = "Fejl ved læsning af indstillinger"; -Strings.OfficeOM.L_UserAbortedMessage = "Brugeren har ikke givet samtykke til tilføjelsesprogramtilladelserne."; -Strings.OfficeOM.L_SetDataParametersConflict = "De angivne parametre er i konflikt."; +Strings.OfficeOM.L_MissingRequiredArguments = "en række obligatoriske argumenter mangler"; +Strings.OfficeOM.L_InvalidApiCallInContext = "Ugyldigt API-kald i den aktuelle kontekst."; +Strings.OfficeOM.L_UserAborted = "Brugeren afbrød samtykkeanmodningen."; +Strings.OfficeOM.L_InvalidObjectPath = 'Stien til objektet \'{0}\' fungerer ikke for det, du forsøger at gøre. Hvis du bruger objektet pÃ¥ tværs af flere "context.sync"-kald og uden for den sekventielle udførelsen af et ".run" batch, skal du bruge metoderne "context.trackedObjects.add()" og "context.trackedObjects.remove()" til at administrere objektets levetid.'; +Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Koordinatparametre kan ikke bruges med tvangsforanstaltningen af typen Tabel, hvis tabellen indeholder flettede celler."; +Strings.OfficeOM.L_NavOutOfBound = "Handlingen mislykkedes, fordi indekset er uden for omrÃ¥det."; +Strings.OfficeOM.L_InValidOptionalArgument = "ugyldigt valgfrit argument"; +Strings.OfficeOM.L_GetDataParametersConflict = "De angivne parametre er i konflikt."; +Strings.OfficeOM.L_InvalidValue = "Ugyldig værdi"; +Strings.OfficeOM.L_InvalidDataObject = "Ugyldigt dataobjekt"; Strings.OfficeOM.L_SetDataIsTooLarge = "Det angivne dataobjekt er for stort."; -Strings.OfficeOM.L_UnsupportedEnumerationMessage = "Optællingen understøttes ikke i det aktuelle værtsprogram."; +Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "Din Office Online-session er udløbet eller er ugyldig. Opdater siden for at fortsætte."; +Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Den aktuelle markering er ikke kompatibel med den angivne type tvangsforanstaltning."; +Strings.OfficeOM.L_APINotSupported = "API understøttes ikke"; +Strings.OfficeOM.L_NetworkProblem = "Netværksproblem"; +Strings.OfficeOM.L_DataNotMatchBindingType = "Det angivne dataobjekt er ikke kompatibelt med bindingstypen."; +Strings.OfficeOM.L_SSOServerErrorMessage = "Der opstod en uventet fejl pÃ¥ serveren."; +Strings.OfficeOM.L_InvalidSelectionForBindingType = "Der kan ikke oprettes en binding med den aktuelle markering og den angivne bindingstype."; Strings.OfficeOM.L_MemoryLimit = "Hukommelsesgrænsen er overskredet"; -Strings.OfficeOM.L_NavOutOfBound = "Handlingen mislykkedes, fordi indekset er uden for omrÃ¥det."; -Strings.OfficeOM.L_BindingToMultipleSelection = "Ikke-sammenhængende markeringer understøttes ikke."; -Strings.OfficeOM.L_PropertyDoesNotExist = 'Egenskaben "{0}" findes ikke pÃ¥ objektet.'; +Strings.OfficeOM.L_CannotWriteToSelection = "Der kan ikke skrives til det aktuelle valg."; +Strings.OfficeOM.L_SSOClientError = "Der opstod en fejl i anmodningen om godkendelse fra Office."; +Strings.OfficeOM.L_SpecifiedIdNotExist = "Det angivne id findes ikke."; +Strings.OfficeOM.L_EventHandlerRemovalFailed = "Hændelseshandleren blev ikke fjernet."; +Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Koordinatparametre kan ikke bruges med tvangsforanstaltningen af typen Tabel, hvis tabellen indeholder flettede celler."; +Strings.OfficeOM.L_CannotNavigateTo = "Objektet er placeret et sted, hvor navigation ikke understøttes."; +Strings.OfficeOM.L_InvalidNode = "Ugyldig node"; +Strings.OfficeOM.L_RunMustReturnPromise = 'Den batchfunktion, der blev videresendt til ".run"-metoden, returnerede ikke et tilsagn. Funktionen skal returnere et tilsagn, sÃ¥ de automatisk registrerede objekter kan frigives, nÃ¥r batchhandlingen er fuldført. Normalt kan du returnere et tilsagn ved at returnere svaret fra "context.sync()".'; +Strings.OfficeOM.L_SSOConnectionLostError = "A connection was lost during the sign in process."; +Strings.OfficeOM.L_InvalidGetRows = "De angivne rækker er ugyldige."; Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Browserens begrænsninger forhindrede os i at oprette dialogboksen. Domænet for dialogboksen og domænet for tilføjelsesprogrammets vært er ikke i samme sikkerhedszone."; -Strings.OfficeOM.L_InvalidArgument = "Argumentet '{0}' virker ikke i denne situation, det mangler, eller det har ikke det rigtige format."; -Strings.OfficeOM.L_InvalidOrTimedOutSession = "Session er ugyldig eller har fÃ¥et timeout"; +Strings.OfficeOM.L_HostError = "Værtsfejl"; +Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Bemærk! Det foreslÃ¥s, at antallet af formateringssæt, der er angivet af et Formatting API-kald, er under 100."; +Strings.OfficeOM.L_DialogAlreadyOpened = "Handlingen mislykkedes, fordi dette tilføjelsesprogram allerede har en aktiv dialogboks."; +Strings.OfficeOM.L_InvalidGrant = "ForhÃ¥ndsgodkendelse mangler."; +Strings.OfficeOM.L_NotSupportedEventType = "Den angivne hændelsestype {0} understøttes ikke."; +Strings.OfficeOM.L_FileTypeNotSupported = "Den angivne filtype understøttes ikke."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Tilføjelsesprogrammet anmoder allerede om en adgangstoken."; +Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath begrænser valget til 1.024 elementer."; +Strings.OfficeOM.L_UnknownBindingType = "Bindingstypen understøttes ikke."; +Strings.OfficeOM.L_OsfControlTypeNotSupported = "Typen OsfControl understøttes ikke."; +Strings.OfficeOM.L_InvalidGetRowColumnCounts = "De angivne værdier for wowCount eller columnCount er ugyldige."; +Strings.OfficeOM.L_UnsupportedUserIdentity = "Brugeridentitetstypen understøttes ikke."; +Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Tillad"; +Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "konfigurer din browser"; +Strings.OfficeOM.L_SettingNameNotExist = "Den angivne indstilling findes ikke."; Strings.OfficeOM.L_FormattingReminder = "PÃ¥mindelse om formatering"; +Strings.OfficeOM.L_InvalidColumnsForBinding = "De angivne kolonner er ugyldige."; +Strings.OfficeOM.L_NotImplemented = "Funktion {0} er ikke implementeret."; +Strings.OfficeOM.L_ConnectionFailureWithDetails = "Anmodningen mislykkedes med statuskoden {0}, fejlkoden {1} og følgende fejlmeddelelse: {2}"; +Strings.OfficeOM.L_DataReadError = "Fejl i læsning af data"; +Strings.OfficeOM.L_TooManyArguments = "for mange argumenter"; +Strings.OfficeOM.L_InvalidFormatValue = "En eller flere af formatparametrene har værdier, som ikke er tilladt. Dobbelttjek værdierne, og prøv igen."; +Strings.OfficeOM.L_InvalidSetRows = "De angivne rækker er ugyldige."; +Strings.OfficeOM.L_UserClickIgnore = "Brugeren valgte at ignorere dialogboksen."; +Strings.OfficeOM.L_SettingsStaleError = "Fejl pga. forældede indstillinger"; +Strings.OfficeOM.L_ReadSettingsError = "Fejl ved læsning af indstillinger"; +Strings.OfficeOM.L_UserNotSignedIn = "Ingen bruger er logget pÃ¥ Office."; +Strings.OfficeOM.L_OutOfRange = "Uden for intervallet"; +Strings.OfficeOM.L_InvalidFormat = "Ugyldigt format-fejl"; +Strings.OfficeOM.L_InvalidResourceUrlMessage = "Der er angivet en ugyldig URL-adresse for ressourcen i manifestet."; +Strings.OfficeOM.L_InvalidResourceUrl = "Der er angivet en ugyldig URL-adresse for programressourcen."; +Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Den angivne bindingstype er ikke kompatibel med det navngivne element. "; +Strings.OfficeOM.L_SelectionCannotBound = "Den aktuelle markering kan ikke bindes."; +Strings.OfficeOM.L_BindingCreationError = "Fejl ved oprettelse af binding"; +Strings.OfficeOM.L_BrowserAPINotSupported = "Denne browser understøtter ikke den anmodede API."; +Strings.OfficeOM.L_OperationNotSupported = "Handlingen understøttes ikke."; Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} vil vise et nyt vindue."; -Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Den aktuelle markering er ikke kompatibel med den angivne type tvangsforanstaltning."; -Strings.OfficeOM.L_InvalidReadForBlankRow = "Den angivne række er tom."; -Strings.OfficeOM.L_InvalidArgumentGeneric = "Det eller de argumenter, der er overført til funktionen, fungerer ikke i denne situation, mangler eller har ikke det rigtige format." +Strings.OfficeOM.L_InvalidBinding = "Ugyldig binding"; +Strings.OfficeOM.L_InvalidSSOAddinMessage = "Id-API understøttes ikke for dette tilføjelsesprogram."; +Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Programmet {0} findes ikke. Microsoft.Office.WebExtension.initialize(reason) er ikke kaldt."; +Strings.OfficeOM.L_InvalidCellsValue = "En eller flere af parametrene i cellerne har værdier, som ikke er tilladt. Dobbelttjek værdierne, og prøv igen."; +Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Dataene er forældede. Hent objektet igen."; +Strings.OfficeOM.L_BindingNotExist = "Den angivne binding findes ikke."; +Strings.OfficeOM.L_InvalidParameters = "Funktion {0} har ugyldige parametre." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/da-dk/office_strings.js b/node_modules/@microsoft/office-js/dist/da-dk/office_strings.js index 7d67693..7d14881 100644 --- a/node_modules/@microsoft/office-js/dist/da-dk/office_strings.js +++ b/node_modules/@microsoft/office-js/dist/da-dk/office_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_DataNotMatchBindingSize="Det angivne dataobjekt svarer ikke til størrelsen pÃ¥ den aktuelle markering.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Dataene er ikke aktuelle";Strings.OfficeOM.L_SaveSettingsError="Fejl ved lagring af indstillinger";Strings.OfficeOM.L_RequestTimeout="Opkaldet tog for lang tid at udføre.";Strings.OfficeOM.L_InvalidResourceUrl="Der er angivet en ugyldig URL-adresse for programressourcen.";Strings.OfficeOM.L_APICallFailed="API-kald mislykkedes";Strings.OfficeOM.L_InvalidValue="Ugyldig værdi";Strings.OfficeOM.L_RequestTokenUnavailable="Denne API er blevet begrænset for at nedsætte opkaldshyppigheden.";Strings.OfficeOM.L_DialogAlreadyOpened="Handlingen mislykkedes, fordi dette tilføjelsesprogram allerede har en aktiv dialogboks.";Strings.OfficeOM.L_UnsupportedDataObject="Det angivne dataobjekt understøttes ikke.";Strings.OfficeOM.L_CannotWriteToSelection="Der kan ikke skrives til det aktuelle valg.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Foretag en markering.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Bemærk! Det foreslÃ¥s, at antallet af formateringssæt, der er angivet af et Formatting API-kald, er under 100.";Strings.OfficeOM.L_SSOClientErrorMessage="Der opstod en uventet fejl i klienten.";Strings.OfficeOM.L_InvalidObjectPath='Stien til objektet \'{0}\' fungerer ikke for det, du forsøger at gøre. Hvis du bruger objektet pÃ¥ tværs af flere "context.sync"-kald og uden for den sekventielle udførelsen af et ".run" batch, skal du bruge metoderne "context.trackedObjects.add()" og "context.trackedObjects.remove()" til at administrere objektets levetid.';Strings.OfficeOM.L_OutOfRange="Uden for intervallet";Strings.OfficeOM.L_CustomXmlError="Brugerdefineret XML-fejl.";Strings.OfficeOM.L_CannotNavigateTo="Objektet er placeret et sted, hvor navigation ikke understøttes.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Tillad";Strings.OfficeOM.L_NewWindowCrossZone='Sikkerhedsindstillingerne i din browser forhindrer os i at oprette en dialogboks. Prøv en anden browser eller {0}, sÃ¥ "{1}" og det domæne, der vises i adresselinjen, er i samme sikkerhedszone.';Strings.OfficeOM.L_NotSupportedBindingType="Den angivne bindingstype {0} understøttes ikke.";Strings.OfficeOM.L_InvalidFormat="Ugyldigt format-fejl";Strings.OfficeOM.L_NotSupportedEventType="Den angivne hændelsestype {0} understøttes ikke.";Strings.OfficeOM.L_FormatValueOutOfRange="Værdien er uden for det tilladte interval.";Strings.OfficeOM.L_InValidOptionalArgument="ugyldigt valgfrit argument";Strings.OfficeOM.L_InvalidDataFormat="Formatet for det angivne dataobjekt er ugyldigt.";Strings.OfficeOM.L_EventHandlerNotExist="Den angivne hændelseshandler blev ikke fundet for denne binding.";Strings.OfficeOM.L_InvalidFormatValue="En eller flere af formatparametrene har værdier, som ikke er tilladt. Dobbelttjek værdierne, og prøv igen.";Strings.OfficeOM.L_UserClickIgnore="Brugeren valgte at ignorere dialogboksen.";Strings.OfficeOM.L_InternalError="Intern fejl";Strings.OfficeOM.L_DataNotMatchSelection="Det angivne dataobjekt er ikke kompatibelt med figuren eller mÃ¥lene i den aktuelle markering.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Grænsen for valg er nÃ¥et";Strings.OfficeOM.L_GetDataIsTooLarge="Det anmodede datasæt er for stort.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="Din Office Online-session er udløbet eller er ugyldig. Opdater siden for at fortsætte.";Strings.OfficeOM.L_EventHandlerRemovalFailed="Hændelseshandleren blev ikke fjernet.";Strings.OfficeOM.L_InternalErrorDescription="Der opstod en intern fejl.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Den angivne bindingstype er ikke kompatibel med det navngivne element. ";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Markeret indhold skal være i tabelformat. Formatér dataene som en tabel, og prøv igen.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod='Ændringer i egenskaben "{0}" kan ikke anvendes gennem en "object.set"-metode.';Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty='Forsøger at indstille den skrivebeskyttede egenskab "{0}".';Strings.OfficeOM.L_InvalidSelectionForBindingType="Der kan ikke oprettes en binding med den aktuelle markering og den angivne bindingstype.";Strings.OfficeOM.L_InitializeNotReady="Office.js er endnu ikke fuldt indlæst. Prøv igen senere, eller sørg for at tilføje din initialiseringskode i funktionen Office.initialize.";Strings.OfficeOM.L_DataReadError="Fejl i læsning af data";Strings.OfficeOM.L_NotSupported="Funktionen {0} understøttes ikke.";Strings.OfficeOM.L_ConnectionFailureWithDetails="Anmodningen mislykkedes med statuskoden {0}, fejlkoden {1} og følgende fejlmeddelelse: {2}";Strings.OfficeOM.L_ValueNotLoaded='Værdien af resultatobjektet er endnu ikke indlæst. Før du læser værdiegenskaben, skal du kalde "context.sync()" i den tilknyttede anmodningskontekst.';Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Koordinatparametre kan ikke bruges med tvangsforanstaltningen af typen Tabel, hvis tabellen indeholder flettede celler.";Strings.OfficeOM.L_AppNameNotExist="Navnet pÃ¥ tilføjelsesprogrammet til {0} findes ikke.";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_BrowserAPINotSupported="Denne browser understøtter ikke den anmodede API.";Strings.OfficeOM.L_SettingsCannotSave="Indstillingerne kunne ikke gemmes.";Strings.OfficeOM.L_InvalidNode="Ugyldig node";Strings.OfficeOM.L_InvalidResourceUrlMessage="Der er angivet en ugyldig URL-adresse for ressourcen i manifestet.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Koordinatparametre kan ikke bruges med tvangsforanstaltningen af typen Tabel, hvis tabellen indeholder flettede celler.";Strings.OfficeOM.L_SettingsStaleError="Fejl pga. forældede indstillinger";Strings.OfficeOM.L_Timeout="Handlingen fik timeout og er blevet afbrudt.";Strings.OfficeOM.L_PropertyNotLoaded="Egenskaben '{0}' er ikke tilgængelig. Før du læser egenskabens værdi, skal du kalde indlæsningsmetoden pÃ¥ det indeholdende objekt og kalde \"context.sync()\" pÃ¥ den tilknyttede anmodningskontekst.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="De angivne værdier for wowCount eller columnCount er ugyldige.";Strings.OfficeOM.L_UnsupportedEnumeration="Ikke-understøttet optælling";Strings.OfficeOM.L_BindingNotExist="Den angivne binding findes ikke.";Strings.OfficeOM.L_TooManyOptionalFunction="flere valgfrie funktioner pÃ¥ parameterliste";Strings.OfficeOM.L_InvalidCellsValue="En eller flere af parametrene i cellerne har værdier, som ikke er tilladt. Dobbelttjek værdierne, og prøv igen.";Strings.OfficeOM.L_InvalidGrant="ForhÃ¥ndsgodkendelse mangler.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Programmet {0} findes ikke. Microsoft.Office.WebExtension.initialize(reason) er ikke kaldt.";Strings.OfficeOM.L_SSOServerErrorMessage="Der opstod en uventet fejl pÃ¥ serveren.";Strings.OfficeOM.L_DataStale="Data er ikke aktuelle";Strings.OfficeOM.L_RowIndexOutOfRange="Rækkeindeksværdien ligger uden for det tilladte interval. Brug en værdi (0 eller højere), som er lavere end antallet af rækker.";Strings.OfficeOM.L_TooManyOptionalObjects="flere valgfrie objekter pÃ¥ parameterliste";Strings.OfficeOM.L_APINotSupported="API understøttes ikke";Strings.OfficeOM.L_DialogInvalidScheme="URL-skema understøttes ikke. Brug HTTPS i stedet.";Strings.OfficeOM.L_HostError="Værtsfejl";Strings.OfficeOM.L_InvalidBindingError="Ugyldig bindingsfejl";Strings.OfficeOM.L_DataNotMatchCoercionType="Typen for det angivne dataobjekt er ikke kompatibel med den aktuelle markering.";Strings.OfficeOM.L_DialogAddressNotTrusted="Domænet for URL-adressen er ikke inkluderet i elementet AppDomains i manifestet.";Strings.OfficeOM.L_NotImplemented="Funktion {0} er ikke implementeret.";Strings.OfficeOM.L_SliceSizeNotSupported="Den angivne udsnitsstørrelse understøttes ikke.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Dataene er forældede. Hent objektet igen.";Strings.OfficeOM.L_NoCapability="Du har ikke tilstrækkelige rettigheder til at udføre denne handling.";Strings.OfficeOM.L_UnsupportedUserIdentity="Brugeridentitetstypen understøttes ikke.";Strings.OfficeOM.L_InvalidBindingOperation="Ugyldig bindingshandling";Strings.OfficeOM.L_OverwriteWorksheetData="Indstillingshandlingen mislykkedes, fordi det medfølgende dataobjekt vil overskrive eller skifte data.";Strings.OfficeOM.L_OperationNotSupported="Handlingen understøttes ikke.";Strings.OfficeOM.L_DisplayDialogError="FÃ¥ vist fejl i dialogboksen";Strings.OfficeOM.L_OsfControlTypeNotSupported="Typen OsfControl understøttes ikke.";Strings.OfficeOM.L_SelectionCannotBound="Den aktuelle markering kan ikke bindes.";Strings.OfficeOM.L_TooManyIncompleteRequests="Vent, indtil det forrige opkald er fuldført.";Strings.OfficeOM.L_FunctionCallFailed="Kald til funktionen {0} mislykkedes, fejlkode: {1}.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Et netværksproblem har forhindret hentning af filen.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Hændelseshandleren blev ikke tilføjet.";Strings.OfficeOM.L_InvalidBinding="Ugyldig binding";Strings.OfficeOM.L_ShuttingDown="Handlingen mislykkedes, fordi dataene ikke findes pÃ¥ serveren.";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Ugyldige inputargumenter.";Strings.OfficeOM.L_CannotRegisterEvent="Hændelseshandleren kan ikke registreres.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Tilføjelsesprogrammet anmoder allerede om en adgangstoken.";Strings.OfficeOM.L_InvalidGetStartRowColumn="De angivne værdier for startRow eller startColumn er ugyldige.";Strings.OfficeOM.L_DataWriteError="Fejl i skrivning af data";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath begrænser valget til 1.024 elementer.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Handlingen mislykkedes, fordi dette tilføjelsesprogram allerede anmoder om en adgangstoken.";Strings.OfficeOM.L_InvalidSetColumns="De angivne kolonner er ugyldige.";Strings.OfficeOM.L_InvalidGetRows="De angivne rækker er ugyldige.";Strings.OfficeOM.L_InvalidApiCallInContext="Ugyldigt API-kald i den aktuelle kontekst.";Strings.OfficeOM.L_ColIndexOutOfRange="Kolonneindeksværdien ligger uden for det tilladte interval. Brug en værdi (0 eller højere), som er lavere end antallet af kolonner.";Strings.OfficeOM.L_MissingRequiredArguments="en række obligatoriske argumenter mangler";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Ignorer";Strings.OfficeOM.L_ElementMissing="Vi kunne ikke formatere tabelcellen, fordi der mangler nogle parameterværdier. Dobbelttjek parametrene, og prøv igen.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Handlingen understøttes ikke pÃ¥ denne bindingstype.";Strings.OfficeOM.L_InvalidGetColumns="De angivne kolonner er ugyldige.";Strings.OfficeOM.L_TooManyArguments="for mange argumenter";Strings.OfficeOM.L_ConnectionFailureWithStatus="Anmodningen mislykkedes. Statuskode: {0}.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="konfigurer din browser";Strings.OfficeOM.L_MissingParameter="Parameter mangler";Strings.OfficeOM.L_InvalidDataObject="Ugyldigt dataobjekt";Strings.OfficeOM.L_InvalidSetStartRowColumn="De angivne værdier for startRow eller startColumn er ugyldige.";Strings.OfficeOM.L_NetworkProblem="Netværksproblem";Strings.OfficeOM.L_CallbackNotAFunction="Tilbagekald skal være af typen funktion, men var af typen {0}.";Strings.OfficeOM.L_UnknownBindingType="Bindingstypen understøttes ikke.";Strings.OfficeOM.L_RunMustReturnPromise='Den batchfunktion, der blev videresendt til ".run"-metoden, returnerede ikke et tilsagn. Funktionen skal returnere et tilsagn, sÃ¥ de automatisk registrerede objekter kan frigives, nÃ¥r batchhandlingen er fuldført. Normalt kan du returnere et tilsagn ved at returnere svaret fra "context.sync()".';Strings.OfficeOM.L_MultipleNamedItemFound="Der er fundet flere objekter med samme navn.";Strings.OfficeOM.L_DocumentReadOnly="Den ønskede handling er ikke tilladt i den aktuelle dokumenttilstand.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Identitetstypen for brugeren understøttes ikke.";Strings.OfficeOM.L_FileTypeNotSupported="Den angivne filtype understøttes ikke.";Strings.OfficeOM.L_InvalidColumnsForBinding="De angivne kolonner er ugyldige.";Strings.OfficeOM.L_InvalidCoercion="Ugyldig type tvangsforanstaltning";Strings.OfficeOM.L_InvalidSetRows="De angivne rækker er ugyldige.";Strings.OfficeOM.L_InvalidGrantMessage="Manglende tilskud til dette tilføjelsesprogram.";Strings.OfficeOM.L_SettingsAreStale="Indstillingerne kunne ikke gemmes, fordi de ikke er aktuelle.";Strings.OfficeOM.L_IndexOutOfRange="Indeks er uden for omrÃ¥de.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Bemærk! Det foreslÃ¥s, at antallet af celler i en tabel er under 20.000 celler.";Strings.OfficeOM.L_InvalidAPICall="Ugyldigt API-kald";Strings.OfficeOM.L_UserAborted="Brugeren afbrød samtykkeanmodningen.";Strings.OfficeOM.L_DataWriteReminder="PÃ¥mindelse om dataskrivning";Strings.OfficeOM.L_NamedItemNotFound="Det navngivne element findes ikke.";Strings.OfficeOM.L_InvalidTableOptionValue="En eller flere af parametrene for TabelIndstillinger har værdier, som ikke er tilladt. Dobbelttjek værdierne, og prøv igen.";Strings.OfficeOM.L_BindingCreationError="Fejl ved oprettelse af binding";Strings.OfficeOM.L_PermissionDenied="Tilladelse nægtet";Strings.OfficeOM.L_SSOServerError="Der opstod en fejl i godkendelsesprovideren.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Den angivne type tvangsforanstaltning er ikke kompatibel med denne bindingstype.";Strings.OfficeOM.L_ActivityLimitReached="Aktivitetsgrænsen er nÃ¥et.";Strings.OfficeOM.L_InvalidRequestContext="Objektet kan ikke bruges pÃ¥ tværs af forskellige anmodningskontekster.";Strings.OfficeOM.L_DataNotMatchBindingType="Det angivne dataobjekt er ikke kompatibelt med bindingstypen.";Strings.OfficeOM.L_DialogNavigateError="Fejl i dialogboksen Navigation";Strings.OfficeOM.L_EventRegistrationError="Fejl ved registrering af hændelse";Strings.OfficeOM.L_InvalidSSOAddinMessage="Id-API understøttes ikke for dette tilføjelsesprogram.";Strings.OfficeOM.L_GetDataParametersConflict="De angivne parametre er i konflikt.";Strings.OfficeOM.L_CoercionTypeNotSupported="Den angivne type tvangsforanstaltning understøttes ikke.";Strings.OfficeOM.L_CustomXmlNodeNotFound="Den angivne node blev ikke fundet.";Strings.OfficeOM.L_SettingNameNotExist="Den angivne indstilling findes ikke.";Strings.OfficeOM.L_SSOClientError="Der opstod en fejl i anmodningen om godkendelse fra Office.";Strings.OfficeOM.L_InvalidParameters="Funktion {0} har ugyldige parametre.";Strings.OfficeOM.L_DialogRequireHTTPS="HTTP-protokollen understøttes ikke. Brug HTTPS i stedet";Strings.OfficeOM.L_BadSelectorString="Den streng, der er overført til vælgeren, er formateret forkert eller understøttes ikke.";Strings.OfficeOM.L_SpecifiedIdNotExist="Det angivne id findes ikke.";Strings.OfficeOM.L_UserNotSignedIn="Ingen bruger er logget pÃ¥ Office.";Strings.OfficeOM.L_RedundantCallbackSpecification="Der kan ikke specificeres tilbagekald bÃ¥de i argumentlisten og i valgfrit objekt.";Strings.OfficeOM.L_GetSelectionNotSupported="Den aktuelle markering understøttes ikke.";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Kald closeAsync i den aktuelle fil, før du henter en anden.";Strings.OfficeOM.L_ReadSettingsError="Fejl ved læsning af indstillinger";Strings.OfficeOM.L_UserAbortedMessage="Brugeren har ikke givet samtykke til tilføjelsesprogramtilladelserne.";Strings.OfficeOM.L_SetDataParametersConflict="De angivne parametre er i konflikt.";Strings.OfficeOM.L_SetDataIsTooLarge="Det angivne dataobjekt er for stort.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="Optællingen understøttes ikke i det aktuelle værtsprogram.";Strings.OfficeOM.L_MemoryLimit="Hukommelsesgrænsen er overskredet";Strings.OfficeOM.L_NavOutOfBound="Handlingen mislykkedes, fordi indekset er uden for omrÃ¥det.";Strings.OfficeOM.L_BindingToMultipleSelection="Ikke-sammenhængende markeringer understøttes ikke.";Strings.OfficeOM.L_PropertyDoesNotExist='Egenskaben "{0}" findes ikke pÃ¥ objektet.';Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Browserens begrænsninger forhindrede os i at oprette dialogboksen. Domænet for dialogboksen og domænet for tilføjelsesprogrammets vært er ikke i samme sikkerhedszone.";Strings.OfficeOM.L_InvalidArgument="Argumentet '{0}' virker ikke i denne situation, det mangler, eller det har ikke det rigtige format.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Session er ugyldig eller har fÃ¥et timeout";Strings.OfficeOM.L_FormattingReminder="PÃ¥mindelse om formatering";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} vil vise et nyt vindue.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Den aktuelle markering er ikke kompatibel med den angivne type tvangsforanstaltning.";Strings.OfficeOM.L_InvalidReadForBlankRow="Den angivne række er tom.";Strings.OfficeOM.L_InvalidArgumentGeneric="Det eller de argumenter, der er overført til funktionen, fungerer ikke i denne situation, mangler eller har ikke det rigtige format." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_ValueNotLoaded='Værdien af resultatobjektet er endnu ikke indlæst. Før du læser værdiegenskaben, skal du kalde "context.sync()" i den tilknyttede anmodningskontekst.';Strings.OfficeOM.L_SettingsAreStale="Indstillingerne kunne ikke gemmes, fordi de ikke er aktuelle.";Strings.OfficeOM.L_SaveSettingsError="Fejl ved lagring af indstillinger";Strings.OfficeOM.L_SSOConnectionLostErrorMessage="A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones.";Strings.OfficeOM.L_NotSupportedBindingType="Den angivne bindingstype {0} understøttes ikke.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Dataene er ikke aktuelle";Strings.OfficeOM.L_DialogInvalidScheme="URL-skema understøttes ikke. Brug HTTPS i stedet.";Strings.OfficeOM.L_InvalidGetColumns="De angivne kolonner er ugyldige.";Strings.OfficeOM.L_BadSelectorString="Den streng, der er overført til vælgeren, er formateret forkert eller understøttes ikke.";Strings.OfficeOM.L_FormatValueOutOfRange="Værdien er uden for det tilladte interval.";Strings.OfficeOM.L_EventRegistrationError="Fejl ved registrering af hændelse";Strings.OfficeOM.L_ElementMissing="Vi kunne ikke formatere tabelcellen, fordi der mangler nogle parameterværdier. Dobbelttjek parametrene, og prøv igen.";Strings.OfficeOM.L_UnsupportedDataObject="Det angivne dataobjekt understøttes ikke.";Strings.OfficeOM.L_EventHandlerNotExist="Den angivne hændelseshandler blev ikke fundet for denne binding.";Strings.OfficeOM.L_InvalidOperationInCellEditMode="Excel er i celleredigeringstilstand. Afslut redigeringstilstand ved at trykke pÃ¥ ENTER eller TAB eller ved at vælge en anden celle, og derefter prøve igen.";Strings.OfficeOM.L_BindingToMultipleSelection="Ikke-sammenhængende markeringer understøttes ikke.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Grænsen for valg er nÃ¥et";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Handlingen mislykkedes, fordi dette tilføjelsesprogram allerede anmoder om en adgangstoken.";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Kald closeAsync i den aktuelle fil, før du henter en anden.";Strings.OfficeOM.L_InvalidGetStartRowColumn="De angivne værdier for startRow eller startColumn er ugyldige.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Foretag en markering.";Strings.OfficeOM.L_CustomFunctionNameCannotSplit="Funktionens navn skal indeholde et navneomrÃ¥de, der ikke er tomt, og et kort navn, der ikke er tomt.";Strings.OfficeOM.L_CustomFunctionImplementationMissing="Egenskaben med dette navn pÃ¥ Excel.CustomFunctions, der repræsenterer funktionens definition, skal indeholde en 'kaldet'-egenskab, der implementerer funktionen.";Strings.OfficeOM.L_SettingsCannotSave="Indstillingerne kunne ikke gemmes.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Session er ugyldig eller har fÃ¥et timeout";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Ugyldige inputargumenter.";Strings.OfficeOM.L_InvalidDataFormat="Formatet for det angivne dataobjekt er ugyldigt.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Identitetstypen for brugeren understøttes ikke.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Markeret indhold skal være i tabelformat. Formatér dataene som en tabel, og prøv igen.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Et netværksproblem har forhindret hentning af filen.";Strings.OfficeOM.L_OverwriteWorksheetData="Indstillingshandlingen mislykkedes, fordi det medfølgende dataobjekt vil overskrive eller skifte data.";Strings.OfficeOM.L_InvalidReadForBlankRow="Den angivne række er tom.";Strings.OfficeOM.L_RowIndexOutOfRange="Rækkeindeksværdien ligger uden for det tilladte interval. Brug en værdi (0 eller højere), som er lavere end antallet af rækker.";Strings.OfficeOM.L_TooManyOptionalFunction="flere valgfrie funktioner pÃ¥ parameterliste";Strings.OfficeOM.L_CustomXmlError="Brugerdefineret XML-fejl.";Strings.OfficeOM.L_InitializeNotReady="Office.js er endnu ikke fuldt indlæst. Prøv igen senere, eller sørg for at tilføje din initialiseringskode i funktionen Office.initialize.";Strings.OfficeOM.L_NewWindowCrossZone='Sikkerhedsindstillingerne i din browser forhindrer os i at oprette en dialogboks. Prøv en anden browser eller {0}, sÃ¥ "{1}" og det domæne, der vises i adresselinjen, er i samme sikkerhedszone.';Strings.OfficeOM.L_CallbackNotAFunction="Tilbagekald skal være af typen funktion, men var af typen {0}.";Strings.OfficeOM.L_FunctionCallFailed="Kald til funktionen {0} mislykkedes, fejlkode: {1}.";Strings.OfficeOM.L_DataNotMatchCoercionType="Typen for det angivne dataobjekt er ikke kompatibel med den aktuelle markering.";Strings.OfficeOM.L_RequestTokenUnavailable="Denne API er blevet begrænset for at nedsætte opkaldshyppigheden.";Strings.OfficeOM.L_CoercionTypeNotSupported="Den angivne type tvangsforanstaltning understøttes ikke.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty='Forsøger at indstille den skrivebeskyttede egenskab "{0}".';Strings.OfficeOM.L_DataNotMatchSelection="Det angivne dataobjekt er ikke kompatibelt med figuren eller mÃ¥lene i den aktuelle markering.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory="Dette tilføjelsesprogram understøtter ikke brugersamtykke.";Strings.OfficeOM.L_NotSupported="Funktionen {0} understøttes ikke.";Strings.OfficeOM.L_MissingParameter="Parameter mangler";Strings.OfficeOM.L_APICallFailed="API-kald mislykkedes";Strings.OfficeOM.L_ApiNotFoundDetails="Metoden eller egenskaben {0} er del af det {1}-sæt af krav, som ikke er tilgængeligt i din version af {2}.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Handlingen understøttes ikke pÃ¥ denne bindingstype.";Strings.OfficeOM.L_ColIndexOutOfRange="Kolonneindeksværdien ligger uden for det tilladte interval. Brug en værdi (0 eller højere), som er lavere end antallet af kolonner.";Strings.OfficeOM.L_InvalidGrantMessage="Manglende tilskud til dette tilføjelsesprogram.";Strings.OfficeOM.L_NamedItemNotFound="Det navngivne element findes ikke.";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Bemærk! Det foreslÃ¥s, at antallet af celler i en tabel er under 20.000 celler.";Strings.OfficeOM.L_DataStale="Data er ikke aktuelle";Strings.OfficeOM.L_ShuttingDown="Handlingen mislykkedes, fordi dataene ikke findes pÃ¥ serveren.";Strings.OfficeOM.L_InternalErrorDescription="Der opstod en intern fejl.";Strings.OfficeOM.L_CustomFunctionNameContainsBadChars="Funktionens navn mÃ¥ kun indeholde bogstaver, tal, understregningstegn og punktummer.";Strings.OfficeOM.L_RequestTimeout="Opkaldet tog for lang tid at udføre.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod='Ændringer i egenskaben "{0}" kan ikke anvendes gennem en "object.set"-metode.';Strings.OfficeOM.L_InvalidArgumentGeneric="Det eller de argumenter, der er overført til funktionen, fungerer ikke i denne situation, mangler eller har ikke det rigtige format.";Strings.OfficeOM.L_PropertyNotLoaded="Egenskaben '{0}' er ikke tilgængelig. Før du læser egenskabens værdi, skal du kalde indlæsningsmetoden pÃ¥ det indeholdende objekt og kalde \"context.sync()\" pÃ¥ den tilknyttede anmodningskontekst.";Strings.OfficeOM.L_PropertyDoesNotExist='Egenskaben "{0}" findes ikke pÃ¥ objektet.';Strings.OfficeOM.L_TooManyIncompleteRequests="Vent, indtil det forrige opkald er fuldført.";Strings.OfficeOM.L_IndexOutOfRange="Indeks er uden for omrÃ¥de.";Strings.OfficeOM.L_SetDataParametersConflict="De angivne parametre er i konflikt.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Hændelseshandleren blev ikke tilføjet.";Strings.OfficeOM.L_DocumentReadOnly="Den ønskede handling er ikke tilladt i den aktuelle dokumenttilstand.";Strings.OfficeOM.L_Timeout="Handlingen fik timeout og er blevet afbrudt.";Strings.OfficeOM.L_SSOServerError="Der opstod en fejl i godkendelsesprovideren.";Strings.OfficeOM.L_CustomXmlNodeNotFound="Den angivne node blev ikke fundet.";Strings.OfficeOM.L_PermissionDenied="Tilladelse nægtet";Strings.OfficeOM.L_DisplayDialogError="FÃ¥ vist fejl i dialogboksen";Strings.OfficeOM.L_InvalidAPICall="Ugyldigt API-kald";Strings.OfficeOM.L_UnsupportedEnumerationMessage="Optællingen understøttes ikke i det aktuelle værtsprogram.";Strings.OfficeOM.L_GetSelectionNotSupported="Den aktuelle markering understøttes ikke.";Strings.OfficeOM.L_RedundantCallbackSpecification="Der kan ikke specificeres tilbagekald bÃ¥de i argumentlisten og i valgfrit objekt.";Strings.OfficeOM.L_DataNotMatchBindingSize="Det angivne dataobjekt svarer ikke til størrelsen pÃ¥ den aktuelle markering.";Strings.OfficeOM.L_InvalidArgument="Argumentet '{0}' virker ikke i denne situation, det mangler, eller det har ikke det rigtige format.";Strings.OfficeOM.L_SSOClientErrorMessage="Der opstod en uventet fejl i klienten.";Strings.OfficeOM.L_AppNameNotExist="Navnet pÃ¥ tilføjelsesprogrammet til {0} findes ikke.";Strings.OfficeOM.L_TooManyOptionalObjects="flere valgfrie objekter pÃ¥ parameterliste";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage="Handlingen mislykkedes, fordi dette tilføjelsesprogram ikke understøtter brugersamtykke i denne kategori";Strings.OfficeOM.L_UnsupportedEnumeration="Ikke-understøttet optælling";Strings.OfficeOM.L_DataWriteReminder="PÃ¥mindelse om dataskrivning";Strings.OfficeOM.L_GetDataIsTooLarge="Det anmodede datasæt er for stort.";Strings.OfficeOM.L_NoCapability="Du har ikke tilstrækkelige rettigheder til at udføre denne handling.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Ignorer";Strings.OfficeOM.L_DialogNavigateError="Fejl i dialogboksen Navigation";Strings.OfficeOM.L_DataWriteError="Fejl i skrivning af data";Strings.OfficeOM.L_InvalidRequestContext="Objektet kan ikke bruges pÃ¥ tværs af forskellige anmodningskontekster.";Strings.OfficeOM.L_DialogAddressNotTrusted="Domænet for URL-adressen er ikke inkluderet i elementet AppDomains i manifestet.";Strings.OfficeOM.L_InvalidTableOptionValue="En eller flere af parametrene for TabelIndstillinger har værdier, som ikke er tilladt. Dobbelttjek værdierne, og prøv igen.";Strings.OfficeOM.L_CannotRegisterEvent="Hændelseshandleren kan ikke registreres.";Strings.OfficeOM.L_MultipleNamedItemFound="Der er fundet flere objekter med samme navn.";Strings.OfficeOM.L_InvalidBindingOperation="Ugyldig bindingshandling";Strings.OfficeOM.L_UserAbortedMessage="Brugeren har ikke givet samtykke til tilføjelsesprogramtilladelserne.";Strings.OfficeOM.L_InvalidSetStartRowColumn="De angivne værdier for startRow eller startColumn er ugyldige.";Strings.OfficeOM.L_ConnectionFailureWithStatus="Anmodningen mislykkedes. Statuskode: {0}.";Strings.OfficeOM.L_InvalidCoercion="Ugyldig type tvangsforanstaltning";Strings.OfficeOM.L_SliceSizeNotSupported="Den angivne udsnitsstørrelse understøttes ikke.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Den angivne type tvangsforanstaltning er ikke kompatibel med denne bindingstype.";Strings.OfficeOM.L_InvalidBindingError="Ugyldig bindingsfejl";Strings.OfficeOM.L_InvalidSetColumns="De angivne kolonner er ugyldige.";Strings.OfficeOM.L_CustomFunctionDefinitionMissing="En egenskab med dette navn, der repræsenterer funktionens definition skal findes pÃ¥ Excel.CustomFunctions.";Strings.OfficeOM.L_InternalError="Intern fejl";Strings.OfficeOM.L_ActivityLimitReached="Aktivitetsgrænsen er nÃ¥et.";Strings.OfficeOM.L_DialogRequireHTTPS="HTTP-protokollen understøttes ikke. Brug HTTPS i stedet";Strings.OfficeOM.L_MissingRequiredArguments="en række obligatoriske argumenter mangler";Strings.OfficeOM.L_InvalidApiCallInContext="Ugyldigt API-kald i den aktuelle kontekst.";Strings.OfficeOM.L_UserAborted="Brugeren afbrød samtykkeanmodningen.";Strings.OfficeOM.L_InvalidObjectPath='Stien til objektet \'{0}\' fungerer ikke for det, du forsøger at gøre. Hvis du bruger objektet pÃ¥ tværs af flere "context.sync"-kald og uden for den sekventielle udførelsen af et ".run" batch, skal du bruge metoderne "context.trackedObjects.add()" og "context.trackedObjects.remove()" til at administrere objektets levetid.';Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Koordinatparametre kan ikke bruges med tvangsforanstaltningen af typen Tabel, hvis tabellen indeholder flettede celler.";Strings.OfficeOM.L_NavOutOfBound="Handlingen mislykkedes, fordi indekset er uden for omrÃ¥det.";Strings.OfficeOM.L_InValidOptionalArgument="ugyldigt valgfrit argument";Strings.OfficeOM.L_GetDataParametersConflict="De angivne parametre er i konflikt.";Strings.OfficeOM.L_InvalidValue="Ugyldig værdi";Strings.OfficeOM.L_InvalidDataObject="Ugyldigt dataobjekt";Strings.OfficeOM.L_SetDataIsTooLarge="Det angivne dataobjekt er for stort.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="Din Office Online-session er udløbet eller er ugyldig. Opdater siden for at fortsætte.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Den aktuelle markering er ikke kompatibel med den angivne type tvangsforanstaltning.";Strings.OfficeOM.L_APINotSupported="API understøttes ikke";Strings.OfficeOM.L_NetworkProblem="Netværksproblem";Strings.OfficeOM.L_DataNotMatchBindingType="Det angivne dataobjekt er ikke kompatibelt med bindingstypen.";Strings.OfficeOM.L_SSOServerErrorMessage="Der opstod en uventet fejl pÃ¥ serveren.";Strings.OfficeOM.L_InvalidSelectionForBindingType="Der kan ikke oprettes en binding med den aktuelle markering og den angivne bindingstype.";Strings.OfficeOM.L_MemoryLimit="Hukommelsesgrænsen er overskredet";Strings.OfficeOM.L_CannotWriteToSelection="Der kan ikke skrives til det aktuelle valg.";Strings.OfficeOM.L_SSOClientError="Der opstod en fejl i anmodningen om godkendelse fra Office.";Strings.OfficeOM.L_SpecifiedIdNotExist="Det angivne id findes ikke.";Strings.OfficeOM.L_EventHandlerRemovalFailed="Hændelseshandleren blev ikke fjernet.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Koordinatparametre kan ikke bruges med tvangsforanstaltningen af typen Tabel, hvis tabellen indeholder flettede celler.";Strings.OfficeOM.L_CannotNavigateTo="Objektet er placeret et sted, hvor navigation ikke understøttes.";Strings.OfficeOM.L_InvalidNode="Ugyldig node";Strings.OfficeOM.L_RunMustReturnPromise='Den batchfunktion, der blev videresendt til ".run"-metoden, returnerede ikke et tilsagn. Funktionen skal returnere et tilsagn, sÃ¥ de automatisk registrerede objekter kan frigives, nÃ¥r batchhandlingen er fuldført. Normalt kan du returnere et tilsagn ved at returnere svaret fra "context.sync()".';Strings.OfficeOM.L_SSOConnectionLostError="A connection was lost during the sign in process.";Strings.OfficeOM.L_InvalidGetRows="De angivne rækker er ugyldige.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Browserens begrænsninger forhindrede os i at oprette dialogboksen. Domænet for dialogboksen og domænet for tilføjelsesprogrammets vært er ikke i samme sikkerhedszone.";Strings.OfficeOM.L_HostError="Værtsfejl";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Bemærk! Det foreslÃ¥s, at antallet af formateringssæt, der er angivet af et Formatting API-kald, er under 100.";Strings.OfficeOM.L_DialogAlreadyOpened="Handlingen mislykkedes, fordi dette tilføjelsesprogram allerede har en aktiv dialogboks.";Strings.OfficeOM.L_InvalidGrant="ForhÃ¥ndsgodkendelse mangler.";Strings.OfficeOM.L_NotSupportedEventType="Den angivne hændelsestype {0} understøttes ikke.";Strings.OfficeOM.L_FileTypeNotSupported="Den angivne filtype understøttes ikke.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Tilføjelsesprogrammet anmoder allerede om en adgangstoken.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath begrænser valget til 1.024 elementer.";Strings.OfficeOM.L_UnknownBindingType="Bindingstypen understøttes ikke.";Strings.OfficeOM.L_OsfControlTypeNotSupported="Typen OsfControl understøttes ikke.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="De angivne værdier for wowCount eller columnCount er ugyldige.";Strings.OfficeOM.L_UnsupportedUserIdentity="Brugeridentitetstypen understøttes ikke.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Tillad";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="konfigurer din browser";Strings.OfficeOM.L_SettingNameNotExist="Den angivne indstilling findes ikke.";Strings.OfficeOM.L_FormattingReminder="PÃ¥mindelse om formatering";Strings.OfficeOM.L_InvalidColumnsForBinding="De angivne kolonner er ugyldige.";Strings.OfficeOM.L_NotImplemented="Funktion {0} er ikke implementeret.";Strings.OfficeOM.L_ConnectionFailureWithDetails="Anmodningen mislykkedes med statuskoden {0}, fejlkoden {1} og følgende fejlmeddelelse: {2}";Strings.OfficeOM.L_DataReadError="Fejl i læsning af data";Strings.OfficeOM.L_TooManyArguments="for mange argumenter";Strings.OfficeOM.L_InvalidFormatValue="En eller flere af formatparametrene har værdier, som ikke er tilladt. Dobbelttjek værdierne, og prøv igen.";Strings.OfficeOM.L_InvalidSetRows="De angivne rækker er ugyldige.";Strings.OfficeOM.L_UserClickIgnore="Brugeren valgte at ignorere dialogboksen.";Strings.OfficeOM.L_SettingsStaleError="Fejl pga. forældede indstillinger";Strings.OfficeOM.L_ReadSettingsError="Fejl ved læsning af indstillinger";Strings.OfficeOM.L_UserNotSignedIn="Ingen bruger er logget pÃ¥ Office.";Strings.OfficeOM.L_OutOfRange="Uden for intervallet";Strings.OfficeOM.L_InvalidFormat="Ugyldigt format-fejl";Strings.OfficeOM.L_InvalidResourceUrlMessage="Der er angivet en ugyldig URL-adresse for ressourcen i manifestet.";Strings.OfficeOM.L_InvalidResourceUrl="Der er angivet en ugyldig URL-adresse for programressourcen.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Den angivne bindingstype er ikke kompatibel med det navngivne element. ";Strings.OfficeOM.L_SelectionCannotBound="Den aktuelle markering kan ikke bindes.";Strings.OfficeOM.L_BindingCreationError="Fejl ved oprettelse af binding";Strings.OfficeOM.L_BrowserAPINotSupported="Denne browser understøtter ikke den anmodede API.";Strings.OfficeOM.L_OperationNotSupported="Handlingen understøttes ikke.";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} vil vise et nyt vindue.";Strings.OfficeOM.L_InvalidBinding="Ugyldig binding";Strings.OfficeOM.L_InvalidSSOAddinMessage="Id-API understøttes ikke for dette tilføjelsesprogram.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Programmet {0} findes ikke. Microsoft.Office.WebExtension.initialize(reason) er ikke kaldt.";Strings.OfficeOM.L_InvalidCellsValue="En eller flere af parametrene i cellerne har værdier, som ikke er tilladt. Dobbelttjek værdierne, og prøv igen.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Dataene er forældede. Hent objektet igen.";Strings.OfficeOM.L_BindingNotExist="Den angivne binding findes ikke.";Strings.OfficeOM.L_InvalidParameters="Funktion {0} har ugyldige parametre." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/da-dk/outlook_strings.debug.js b/node_modules/@microsoft/office-js/dist/da-dk/outlook_strings.debug.js index 7adb573..4737a67 100644 --- a/node_modules/@microsoft/office-js/dist/da-dk/outlook_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/da-dk/outlook_strings.debug.js @@ -1,34 +1,35 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("_u"); _u.ExtensibilityStrings = function() { }; _u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings"); -_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Den vedhæftede fil kan ikke tilføjes, fordi den er for stor."; -_u.ExtensibilityStrings.l_InvalidDate_Text = "Inputtet fortolkes ikke som en gyldig dato."; -_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Den vedhæftede fil kan ikke slettes fra elementet."; -_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "Det valgte element er blevet ændret."; -_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Fejl i skrivning af data"; _u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Et eller flere af de viste navne , der er angivet, er for langt."; +_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "En eller flere af de angivne mailadresser er for lang."; _u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Det samlede antal modtagere i feltet mÃ¥ ikke overskride {0}."; +_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "Det valgte element er blevet ændret."; +_u.ExtensibilityStrings.l_InternalFormatError_Text = "Der opstod en intern formatfejl."; +_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Den vedhæftede fil kan ikke slettes fra elementet."; +_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Vedhæftede filer kan ikke tilføjes, mens det fulde svar eller videresendelsen hentes fra serveren."; +_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Den vedhæftede fil kan ikke slettes, fordi den vedhæftede fil ikke kan findes med indekset for den vedhæftede fil."; +_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "De angivne parametre svarer ikke til det forventede format."; _u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Vedhæftede filer kan ikke tilføjes, fordi meddelelsen har allerede det maksimale antal vedhæftede filer"; -_u.ExtensibilityStrings.l_OffsetNotfound_Text = "Der blev ikke fundet en forskydning for dette tidsstempel."; +_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Fejl ved vedhæftet fil"; +_u.ExtensibilityStrings.l_InvalidEventDates_Text = "Slutdatoen ligger før startdatoen."; _u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Forespørgslen overskrider grænsen pÃ¥ 1 MB. Rediger EWS-anmodningen."; -_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Den vedhæftede fil kan ikke føjes til elementet."; -_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "De angivne parametre svarer ikke til det forventede format."; -_u.ExtensibilityStrings.l_InvalidEndTime_Text = "Sluttidspunktet kan ikke være før starttidspunktet."; -_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Vedhæftede filer kan ikke tilføjes, mens det fulde svar eller videresendelsen hentes fra serveren."; +_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Den vedhæftede fil kan ikke tilføjes, fordi den er for stor."; +_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "HTML-santizationen mislykkedes."; _u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "Brugeren fjernede den vedhæftede fil, før overførslen er fuldført."; -_u.ExtensibilityStrings.l_InternalProtocolError_Text = "Intern protokolfejl: '{0}'."; -_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "En eller flere af de angivne mailadresser er for lang."; -_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "Stien for den vedhæftede fil var ugyldig."; +_u.ExtensibilityStrings.l_InvalidDate_Text = "Inputtet fortolkes ikke som en gyldig dato."; _u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Der kræves administratorrettigheder for at fÃ¥ adgang til beskyttede medlemmer af JavaScript-API'en til Office."; -_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Den vedhæftede fil kan ikke slettes, fordi den vedhæftede fil ikke kan findes med indekset for den vedhæftede fil."; -_u.ExtensibilityStrings.l_InvalidEventDates_Text = "Slutdatoen ligger før startdatoen."; -_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Der blev ikke angivet nogen gyldige modtagere."; +_u.ExtensibilityStrings.l_InvalidEndTime_Text = "Sluttidspunktet kan ikke være før starttidspunktet."; +_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Den vedhæftede fil kan ikke føjes til elementet."; +_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "Stien for den vedhæftede fil var ugyldig."; +_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "Den vedhæftede fils id var ugyldigt."; +_u.ExtensibilityStrings.l_OffsetNotfound_Text = "Der blev ikke fundet en forskydning for dette tidsstempel."; +_u.ExtensibilityStrings.l_InternalProtocolError_Text = "Intern protokolfejl: '{0}'."; +_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Fejl i skrivning af data"; _u.ExtensibilityStrings.l_CursorPositionChanged_Text = "Brugeren ændrede placering af markøren, mens data blev indsat."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "Der kræves administratorrettigheder for at kalde metoden: '{0}'."; -_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "HTML-santizationen mislykkedes."; -_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Fejl ved vedhæftet fil"; -_u.ExtensibilityStrings.l_InternalFormatError_Text = "Der opstod en intern formatfejl."; -_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "Den vedhæftede fils id var ugyldigt." +_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Der blev ikke angivet nogen gyldige modtagere."; +_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "Der kræves administratorrettigheder for at kalde metoden: '{0}'." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/da-dk/outlook_strings.js b/node_modules/@microsoft/office-js/dist/da-dk/outlook_strings.js index aaa6740..7421dd1 100644 --- a/node_modules/@microsoft/office-js/dist/da-dk/outlook_strings.js +++ b/node_modules/@microsoft/office-js/dist/da-dk/outlook_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Den vedhæftede fil kan ikke tilføjes, fordi den er for stor.";_u.ExtensibilityStrings.l_InvalidDate_Text="Inputtet fortolkes ikke som en gyldig dato.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Den vedhæftede fil kan ikke slettes fra elementet.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Det valgte element er blevet ændret.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Fejl i skrivning af data";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Et eller flere af de viste navne , der er angivet, er for langt.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Det samlede antal modtagere i feltet mÃ¥ ikke overskride {0}.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Vedhæftede filer kan ikke tilføjes, fordi meddelelsen har allerede det maksimale antal vedhæftede filer";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Der blev ikke fundet en forskydning for dette tidsstempel.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Forespørgslen overskrider grænsen pÃ¥ 1 MB. Rediger EWS-anmodningen.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Den vedhæftede fil kan ikke føjes til elementet.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="De angivne parametre svarer ikke til det forventede format.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="Sluttidspunktet kan ikke være før starttidspunktet.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Vedhæftede filer kan ikke tilføjes, mens det fulde svar eller videresendelsen hentes fra serveren.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="Brugeren fjernede den vedhæftede fil, før overførslen er fuldført.";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Intern protokolfejl: '{0}'.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="En eller flere af de angivne mailadresser er for lang.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="Stien for den vedhæftede fil var ugyldig.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Der kræves administratorrettigheder for at fÃ¥ adgang til beskyttede medlemmer af JavaScript-API'en til Office.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Den vedhæftede fil kan ikke slettes, fordi den vedhæftede fil ikke kan findes med indekset for den vedhæftede fil.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="Slutdatoen ligger før startdatoen.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Der blev ikke angivet nogen gyldige modtagere.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="Brugeren ændrede placering af markøren, mens data blev indsat.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Der kræves administratorrettigheder for at kalde metoden: '{0}'.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="HTML-santizationen mislykkedes.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Fejl ved vedhæftet fil";_u.ExtensibilityStrings.l_InternalFormatError_Text="Der opstod en intern formatfejl.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="Den vedhæftede fils id var ugyldigt." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Et eller flere af de viste navne , der er angivet, er for langt.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="En eller flere af de angivne mailadresser er for lang.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Det samlede antal modtagere i feltet mÃ¥ ikke overskride {0}.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Det valgte element er blevet ændret.";_u.ExtensibilityStrings.l_InternalFormatError_Text="Der opstod en intern formatfejl.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Den vedhæftede fil kan ikke slettes fra elementet.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Vedhæftede filer kan ikke tilføjes, mens det fulde svar eller videresendelsen hentes fra serveren.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Den vedhæftede fil kan ikke slettes, fordi den vedhæftede fil ikke kan findes med indekset for den vedhæftede fil.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="De angivne parametre svarer ikke til det forventede format.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Vedhæftede filer kan ikke tilføjes, fordi meddelelsen har allerede det maksimale antal vedhæftede filer";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Fejl ved vedhæftet fil";_u.ExtensibilityStrings.l_InvalidEventDates_Text="Slutdatoen ligger før startdatoen.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Forespørgslen overskrider grænsen pÃ¥ 1 MB. Rediger EWS-anmodningen.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Den vedhæftede fil kan ikke tilføjes, fordi den er for stor.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="HTML-santizationen mislykkedes.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="Brugeren fjernede den vedhæftede fil, før overførslen er fuldført.";_u.ExtensibilityStrings.l_InvalidDate_Text="Inputtet fortolkes ikke som en gyldig dato.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Der kræves administratorrettigheder for at fÃ¥ adgang til beskyttede medlemmer af JavaScript-API'en til Office.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="Sluttidspunktet kan ikke være før starttidspunktet.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Den vedhæftede fil kan ikke føjes til elementet.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="Stien for den vedhæftede fil var ugyldig.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="Den vedhæftede fils id var ugyldigt.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Der blev ikke fundet en forskydning for dette tidsstempel.";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Intern protokolfejl: '{0}'.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Fejl i skrivning af data";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="Brugeren ændrede placering af markøren, mens data blev indsat.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Der blev ikke angivet nogen gyldige modtagere.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Der kræves administratorrettigheder for at kalde metoden: '{0}'." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/de-de/office_strings.debug.js b/node_modules/@microsoft/office-js/dist/de-de/office_strings.debug.js index d9c291c..15f3f45 100644 --- a/node_modules/@microsoft/office-js/dist/de-de/office_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/de-de/office_strings.debug.js @@ -1,179 +1,190 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("Strings"); Strings.OfficeOM = function() { }; Strings.OfficeOM.registerClass("Strings.OfficeOM"); -Strings.OfficeOM.L_InvalidSetColumns = "Die angegebenen Spalten sind ungültig."; -Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Bitte treffen Sie eine Auswahl."; -Strings.OfficeOM.L_EventHandlerRemovalFailed = "Fehler beim Entfernen des Ereignishandlers."; -Strings.OfficeOM.L_NavOutOfBound = "Vorgangsfehler, weil der Index außerhalb des Bereichs liegt."; -Strings.OfficeOM.L_UnsupportedUserIdentity = "Der Benutzeridentitätstyp wird nicht unterstützt."; -Strings.OfficeOM.L_TooManyIncompleteRequests = "Warten Sie, bis der vorherige Aufruf abgeschlossen ist."; -Strings.OfficeOM.L_DataWriteReminder = "Erinnerung zum Schreiben von Daten"; +Strings.OfficeOM.L_DialogAlreadyOpened = "Der Vorgang ist fehlgeschlagen, weil für dieses Add-In bereits ein Dialogfeld aktiv ist."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Fehler beim Vorgang, da dieses Add-In bereits ein Zugriffstoken anfordert."; +Strings.OfficeOM.L_InvalidGetColumns = "Die angegebenen Spalten sind ungültig."; +Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Der angegebenen Koersionstyp ist mit diesem Bindungstyp nicht kompatibel."; +Strings.OfficeOM.L_InvalidGetRows = "Die angegebenen Zeilen sind ungültig."; Strings.OfficeOM.L_RequestTokenUnavailable = "Diese API wurde eingeschränkt, um die Anrufhäufigkeit herabzusetzen."; -Strings.OfficeOM.L_MultipleNamedItemFound = "Es wurden mehrere Objekte mit dem gleichen Namen gefunden."; -Strings.OfficeOM.L_EventHandlerNotExist = "Der angegebene Ereignishandler für diese Bindung wurde nicht gefunden."; -Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Der angegebene Bindungstyp ist mit dem angegebenen benannten Element nicht kompatibel."; -Strings.OfficeOM.L_UnknownBindingType = "Der Bindungstyp wird nicht unterstützt."; -Strings.OfficeOM.L_GetDataIsTooLarge = "Der angeforderte Datensatz ist zu groß."; -Strings.OfficeOM.L_InvalidColumnsForBinding = "Die angegebenen Spalten sind ungültig."; -Strings.OfficeOM.L_CustomXmlOutOfDateName = "Daten sind nicht aktuell."; -Strings.OfficeOM.L_FormatValueOutOfRange = "Der Wert liegt außerhalb des zulässigen Bereichs."; -Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Der Identitätstyp des Benutzers wird nicht unterstützt."; -Strings.OfficeOM.L_PropertyDoesNotExist = 'Die Eigenschaft "{0}" ist für das Objekt nicht vorhanden.'; -Strings.OfficeOM.L_InvalidApiCallInContext = "Ungültiger API-Aufruf im aktuellen Kontext."; -Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = 'Änderungen an der Eigenschaft "{0}" können nicht mit einer "object.set"-Methode angewendet werden.'; -Strings.OfficeOM.L_InValidOptionalArgument = "ungültiges optionales Argument"; -Strings.OfficeOM.L_BindingCreationError = "Fehler beim Erstellen der Bindung."; -Strings.OfficeOM.L_InvalidFormat = "Fehler: Ungültiges Format."; -Strings.OfficeOM.L_InvalidValue = "Ungültiger Wert"; -Strings.OfficeOM.L_InternalError = "Interner Fehler"; +Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Zulassen"; +Strings.OfficeOM.L_NonUniformPartialGetNotSupported = 'Koordinatenparameter können nicht mit dem Koersionstyp "Tabelle" verwendet werden, wenn die Tabelle verbundene Zellen enthält.'; +Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "konfigurieren Sie Ihren Browser"; +Strings.OfficeOM.L_RunMustReturnPromise = 'Die an die ".run"-Methode übergebene Batchfunktion hat kein Promise-Objekt zurückgegeben. Die Funktion muss ein Promise-Objekt zurückgeben, damit alle automatisch nachverfolgten Objekte nach Abschluss der Batchverarbeitung freigegeben werden können. Normalerweise wird ein Promise-Objekt zurückgegeben, indem die Antwort von "context.sync()" zurückgegeben wird.'; +Strings.OfficeOM.L_InvalidParameters = "Funktion {0} hat ungültige Parameter."; +Strings.OfficeOM.L_RequestTimeout = "Die Ausführung des Aufrufs hat zu lang gedauert."; +Strings.OfficeOM.L_CustomXmlNodeNotFound = "Der angegebene Knoten wurde nicht gefunden."; +Strings.OfficeOM.L_SetDataIsTooLarge = "Das angegebene Datenobjekt ist zu groß."; +Strings.OfficeOM.L_InvalidSetColumns = "Die angegebenen Spalten sind ungültig."; +Strings.OfficeOM.L_ReadSettingsError = "Fehler beim Lesen von Einstellungen."; +Strings.OfficeOM.L_InvalidBinding = "Ungültige Bindung."; +Strings.OfficeOM.L_InvalidGrantMessage = "Gewährung für dieses Add-In fehlt."; Strings.OfficeOM.L_CannotRegisterEvent = "Der Ereignishandler kann nicht registriert werden."; -Strings.OfficeOM.L_DataNotMatchCoercionType = "Der Typ des angegebenen Datenobjekts ist mit der aktuellen Auswahl nicht kompatibel."; +Strings.OfficeOM.L_SSOServerErrorMessage = "Unerwarteter Fehler auf dem Server."; +Strings.OfficeOM.L_GetDataParametersConflict = "Die angegebenen Parameter stehen in Konflikt."; +Strings.OfficeOM.L_ActivityLimitReached = "Der Aktivitätsgrenzwert wurde erreicht."; +Strings.OfficeOM.L_APICallFailed = "Fehler beim API-Aufruf."; +Strings.OfficeOM.L_InvalidOperationInCellEditMode = "Excel befindet sich im Zellbearbeitungsmodus. Beenden Sie den Bearbeitungsmodus, indem Sie die EINGABE- oder TAB-TASTE drücken, oder indem eine andere Zelle auswählen, und versuchen Sie es dann noch mal."; Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} möchte ein neues Fenster anzeigen."; -Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath beschränkt die Auswahl auf 1024 Elemente."; -Strings.OfficeOM.L_FileTypeNotSupported = "Der angegebene Dateityp wird nicht unterstützt."; -Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Die Daten sind veraltet. Rufen Sie das Objekt noch mal ab."; -Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Die aktuelle Auswahl ist mit dem angegebenen Koersionstyp nicht kompatibel."; +Strings.OfficeOM.L_InternalError = "Interner Fehler"; +Strings.OfficeOM.L_EventHandlerRemovalFailed = "Fehler beim Entfernen des Ereignishandlers."; +Strings.OfficeOM.L_SSOServerError = "Fehler im Authentifizierungsanbieter."; Strings.OfficeOM.L_CloseFileBeforeRetrieve = 'Rufen Sie "closeAsync" für die aktuelle Datei auf, bevor Sie eine weitere Datei abrufen.'; -Strings.OfficeOM.L_ColIndexOutOfRange = "Der Wert für den Spaltenindex liegt außerhalb des zulässigen Bereichs. Verwenden Sie einen Wert (0 oder höher), der kleiner als die Anzahl der Spalten ist."; -Strings.OfficeOM.L_CustomXmlNodeNotFound = "Der angegebene Knoten wurde nicht gefunden."; -Strings.OfficeOM.L_OsfControlTypeNotSupported = "Der OsfControl-Typ wird nicht unterstützt."; -Strings.OfficeOM.L_InvalidBindingOperation = "Ungültiger Bindungsvorgang."; -Strings.OfficeOM.L_TooManyOptionalFunction = "mehrere optionale Funktionen in der Parameterliste"; -Strings.OfficeOM.L_InvalidCellsValue = 'Mindestens einer der "cells"-Parameter besitzt einen Wert, der nicht zulässig ist. Ãœberprüfen Sie die Werte genau, und versuchen Sie es erneut.'; -Strings.OfficeOM.L_DialogAddressNotTrusted = 'Die Domäne der URL ist nicht im "AppDomains"-Element im Manifest enthalten.'; -Strings.OfficeOM.L_MemoryLimit = "Arbeitsspeichergrenze überschritten"; +Strings.OfficeOM.L_DisplayDialogError = "Dialoganzeigefehler"; +Strings.OfficeOM.L_InvalidArgumentGeneric = "Die an die Funktion übergebenen Argumente funktionieren in dieser Situation nicht, fehlen oder haben nicht das richtige Format."; +Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Die ausgewählten Inhalte müssen im Tabellenformat vorliegen. Formatieren Sie die Daten als Tabelle, und versuchen Sie es dann erneut."; Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Ein Netzwerkproblem hat den Abruf der Datei verhindert."; -Strings.OfficeOM.L_InvalidGrant = "Vorautorisierung fehlt."; -Strings.OfficeOM.L_DataReadError = "Fehler beim Lesen von Daten."; +Strings.OfficeOM.L_DialogAddressNotTrusted = 'Die Domäne der URL ist nicht im "AppDomains"-Element im Manifest enthalten.'; +Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Ignorieren"; +Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = 'Änderungen an der Eigenschaft "{0}" können nicht mit einer "object.set"-Methode angewendet werden.'; +Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Der Vorgang wird für diesen Bindungstyp nicht unterstützt."; +Strings.OfficeOM.L_CustomFunctionNameCannotSplit = "Der Funktionsname kann muss einen nicht leeren Namespace und einen nicht leeren Kurznamen enthalten."; +Strings.OfficeOM.L_GetSelectionNotSupported = "Die aktuelle Auswahl wird nicht unterstützt."; +Strings.OfficeOM.L_Timeout = "Timeout des Vorgangs."; +Strings.OfficeOM.L_SpecifiedIdNotExist = "Die angegebene ID ist nicht vorhanden."; +Strings.OfficeOM.L_DialogInvalidScheme = "Das URL-Schema wird nicht unterstützt. Verwenden Sie stattdessen HTTPS."; +Strings.OfficeOM.L_InvalidFormat = "Fehler: Ungültiges Format."; +Strings.OfficeOM.L_InvalidResourceUrlMessage = "Ungültige Ressourcen-URL im Manifest angegeben."; +Strings.OfficeOM.L_DataWriteError = "Fehler beim Schreiben von Daten."; +Strings.OfficeOM.L_SSOClientError = "Fehler in der Authentifizierungsanforderung von Office."; +Strings.OfficeOM.L_UnsupportedDataObject = "Der bereitgestellte Datenobjekttyp wird nicht unterstützt."; +Strings.OfficeOM.L_TooManyOptionalObjects = "mehrere optionale Objekte in der Parameterliste"; +Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Hinweis: Die Anzahl der Zellen in einer Tabelle sollte unter 20.000 Zellen liegen."; +Strings.OfficeOM.L_DataNotMatchSelection = "Das bereitgestellte Datenobjekt ist mit der Form oder den Abmessungen der aktuellen Auswahl nicht kompatibel."; Strings.OfficeOM.L_InternalErrorDescription = "Ein interner Fehler ist aufgetreten."; -Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Auswahlgrenzwert erreicht."; -Strings.OfficeOM.L_InvalidRequestContext = "Das Objekt kann nicht in verschiedenen Anforderungskontexten verwendet werden."; -Strings.OfficeOM.L_SliceSizeNotSupported = "Die angegebene Datenschnittgröße wird nicht unterstützt."; -Strings.OfficeOM.L_InvalidDataFormat = "Das Format des angegebenen Datenobjekts ist ungültig."; -Strings.OfficeOM.L_MissingRequiredArguments = "fehlen einige erforderliche Argumente"; -Strings.OfficeOM.L_MissingParameter = "Fehlender Parameter"; Strings.OfficeOM.L_NoCapability = "Sie verfügen nicht über ausreichende Berechtigungen für diese Aktion."; -Strings.OfficeOM.L_BindingNotExist = "Die angegebene Bindung ist nicht vorhanden."; -Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Hinweis: Die Anzahl der Zellen in einer Tabelle sollte unter 20.000 Zellen liegen."; -Strings.OfficeOM.L_DocumentReadOnly = "Der angeforderte Vorgang ist im aktuellen Dokumentmodus nicht zulässig."; -Strings.OfficeOM.L_InvalidGrantMessage = "Gewährung für dieses Add-In fehlt."; -Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = 'Versuch, die schreibgeschützte Eigenschaft "{0}" festzulegen.'; -Strings.OfficeOM.L_OverwriteWorksheetData = "Fehler im festgelegten Vorgang, weil das bereitgestellte Datenobjekt Daten überschreiben oder verschieben würde."; -Strings.OfficeOM.L_EventHandlerAdditionFailed = "Fehler beim Hinzufügen des Ereignishandlers."; -Strings.OfficeOM.L_RedundantCallbackSpecification = "Ein Rückruf kann nicht sowohl in der Argumenteliste als auch in einem optionalen Objekt angegeben werden."; -Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Die angegebenen rowCount- oder columnCount-Werte sind ungültig."; +Strings.OfficeOM.L_IndexOutOfRange = "Index außerhalb des Gültigkeitsbereichs."; +Strings.OfficeOM.L_InvalidApiCallInContext = "Ungültiger API-Aufruf im aktuellen Kontext."; Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Browsereinschränkungen haben das Erstellen des Dialogfelds verhindert. Die Domäne des Dialogfelds und die Domäne des Add-In-Hosts befinden sich nicht in der gleichen Sicherheitszone."; +Strings.OfficeOM.L_NavOutOfBound = "Vorgangsfehler, weil der Index außerhalb des Bereichs liegt."; +Strings.OfficeOM.L_SettingsCannotSave = "Die Einstellungen konnten nicht gespeichert werden."; +Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Der Identitätstyp des Benutzers wird nicht unterstützt."; +Strings.OfficeOM.L_GetDataIsTooLarge = "Der angeforderte Datensatz ist zu groß."; +Strings.OfficeOM.L_NamedItemNotFound = "Das benannte Element ist nicht vorhanden."; +Strings.OfficeOM.L_DataNotMatchBindingSize = "Das bereitgestellte Datenobjekt entspricht nicht der Größe der aktuellen Auswahl."; +Strings.OfficeOM.L_FunctionCallFailed = 'Fehler beim Aufrufen der Funktion "{0}". Fehlercode: {1}.'; +Strings.OfficeOM.L_CannotNavigateTo = "Das Objekt befindet sich an einem Ort, wo keine Navigation unterstützt wird."; +Strings.OfficeOM.L_DialogOK = "OK"; +Strings.OfficeOM.L_ConnectionFailureWithStatus = "Fehler der Anforderung mit Statuscode {0}."; +Strings.OfficeOM.L_InvalidGrant = "Vorautorisierung fehlt."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Das Add-In fordert bereits ein Zugriffstoken an."; +Strings.OfficeOM.L_InvalidTableOptionValue = 'Mindestens einer der "tableOptions"-Parameter besitzt einen Wert, der nicht zulässig ist. Ãœberprüfen Sie die Werte genau, und versuchen Sie es erneut.'; +Strings.OfficeOM.L_OverwriteWorksheetData = "Fehler im festgelegten Vorgang, weil das bereitgestellte Datenobjekt Daten überschreiben oder verschieben würde."; +Strings.OfficeOM.L_ColIndexOutOfRange = "Der Wert für den Spaltenindex liegt außerhalb des zulässigen Bereichs. Verwenden Sie einen Wert (0 oder höher), der kleiner als die Anzahl der Spalten ist."; +Strings.OfficeOM.L_OutOfRange = "Außerhalb des zulässigen Bereichs"; +Strings.OfficeOM.L_AppNameNotExist = "Add-In-Name für {0} ist nicht vorhanden."; +Strings.OfficeOM.L_TooManyIncompleteRequests = "Warten Sie, bis der vorherige Aufruf abgeschlossen ist."; +Strings.OfficeOM.L_TooManyArguments = "zu viele Argumente"; +Strings.OfficeOM.L_InvalidGetStartRowColumn = "Die angegebenen startRow- oder startColumn-Werte sind ungültig."; +Strings.OfficeOM.L_MemoryLimit = "Arbeitsspeichergrenze überschritten"; +Strings.OfficeOM.L_ValueNotLoaded = 'Der Wert des Ergebnisobjekts wurde noch nicht geladen. Rufen Sie vor dem Lesen der "value"-Eigenschaft "context.sync()" für den zugeordneten Anforderungskontext auf.'; Strings.OfficeOM.L_SetDataParametersConflict = "Die angegebenen Parameter stehen in Konflikt."; -Strings.OfficeOM.L_InvalidGetColumns = "Die angegebenen Spalten sind ungültig."; +Strings.OfficeOM.L_RowIndexOutOfRange = "Der Wert für den Zeilenindex liegt außerhalb des zulässigen Bereichs. Verwenden Sie einen Wert (0 oder höher), der kleiner als die Anzahl der Zeilen ist."; Strings.OfficeOM.L_HostError = "Hostfehler"; -Strings.OfficeOM.L_UserAbortedMessage = "Der Benutzer hat den Add-In-Berechtigungen nicht zugestimmt."; -Strings.OfficeOM.L_InvalidSetStartRowColumn = "Die angegebenen startRow- oder startColumn-Werte sind ungültig."; -Strings.OfficeOM.L_ValueNotLoaded = 'Der Wert des Ergebnisobjekts wurde noch nicht geladen. Rufen Sie vor dem Lesen der "value"-Eigenschaft "context.sync()" für den zugeordneten Anforderungskontext auf.'; -Strings.OfficeOM.L_DataNotMatchSelection = "Das bereitgestellte Datenobjekt ist mit der Form oder den Abmessungen der aktuellen Auswahl nicht kompatibel."; -Strings.OfficeOM.L_ActivityLimitReached = "Der Aktivitätsgrenzwert wurde erreicht."; -Strings.OfficeOM.L_SettingsCannotSave = "Die Einstellungen konnten nicht gespeichert werden."; -Strings.OfficeOM.L_SetDataIsTooLarge = "Das angegebene Datenobjekt ist zu groß."; -Strings.OfficeOM.L_UserNotSignedIn = "Kein Benutzer ist bei Office angemeldet."; -Strings.OfficeOM.L_InvalidCoercion = "Ungültiger Koersionstyp."; -Strings.OfficeOM.L_GetDataParametersConflict = "Die angegebenen Parameter stehen in Konflikt."; -Strings.OfficeOM.L_DisplayDialogError = "Dialoganzeigefehler"; -Strings.OfficeOM.L_CallbackNotAFunction = 'Der Rückruf muss vom Typ "Funktion" sein, war aber vom Typ "{0}".'; -Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Hinweis: Die von einem Formatierungs-API-Aufruf festgelegten Formatierungssätze sollten unter 100 liegen."; -Strings.OfficeOM.L_InvalidGetRows = "Die angegebenen Zeilen sind ungültig."; +Strings.OfficeOM.L_SSOConnectionLostErrorMessage = "A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones."; +Strings.OfficeOM.L_InvalidBindingOperation = "Ungültiger Bindungsvorgang."; +Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Auswahlgrenzwert erreicht."; +Strings.OfficeOM.L_InvalidArgument = 'Das Argument "{0}" funktioniert in dieser Situation nicht, fehlt oder hat nicht das richtige Format.'; +Strings.OfficeOM.L_InvalidSelectionForBindingType = "Eine Bindung kann nicht mit der aktuellen Auswahl und dem angegebenen Bindungstyp erstellt werden."; +Strings.OfficeOM.L_CustomXmlError = "Benutzerdefiniertes XML-Fehler."; +Strings.OfficeOM.L_ElementMissing = "Die Tabellenzelle konnte nicht formatiert werden, weil einige Parameterwerte fehlen. Ãœberprüfen Sie die Werte genau, und versuchen Sie es erneut."; +Strings.OfficeOM.L_OperationNotSupported = "Dieser Vorgang wird nicht unterstützt."; +Strings.OfficeOM.L_BindingNotExist = "Die angegebene Bindung ist nicht vorhanden."; +Strings.OfficeOM.L_InvalidDataFormat = "Das Format des angegebenen Datenobjekts ist ungültig."; +Strings.OfficeOM.L_EventHandlerNotExist = "Der angegebene Ereignishandler für diese Bindung wurde nicht gefunden."; Strings.OfficeOM.L_SelectionCannotBound = "Eine Bindung an die aktuelle Auswahl ist nicht möglich."; -Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Ungültige Eingabeargumente."; -Strings.OfficeOM.L_EventRegistrationError = "Ereignis-Registrierungsfehler"; +Strings.OfficeOM.L_UnknownBindingType = "Der Bindungstyp wird nicht unterstützt."; +Strings.OfficeOM.L_FormattingReminder = "Formatierungserinnerung"; +Strings.OfficeOM.L_UnsupportedEnumeration = "Nicht unterstützte Aufzählung"; +Strings.OfficeOM.L_CustomFunctionDefinitionMissing = "Eine Eigenschaft mit diesem Namen, die die Definition der Funktion darstellt, muss in Excel.CustomFunctions vorhanden sein."; +Strings.OfficeOM.L_InvalidCellsValue = 'Mindestens einer der "cells"-Parameter besitzt einen Wert, der nicht zulässig ist. Ãœberprüfen Sie die Werte genau, und versuchen Sie es erneut.'; +Strings.OfficeOM.L_InvalidRequestContext = "Das Objekt kann nicht in verschiedenen Anforderungskontexten verwendet werden."; +Strings.OfficeOM.L_SSOClientErrorMessage = "Unerwarteter Fehler im Client."; +Strings.OfficeOM.L_ShuttingDown = "Vorgangsfehler, weil die Daten auf dem Server nicht aktuell sind."; +Strings.OfficeOM.L_InvalidNode = "Ungültiger Knoten."; +Strings.OfficeOM.L_CoercionTypeNotSupported = "Der angegebene Koersionstyp wird nicht unterstützt."; +Strings.OfficeOM.L_APINotSupported = "Nicht unterstützte API."; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory = "Dieses Add-In unterstützt keine Benutzerzustimmung."; +Strings.OfficeOM.L_InvalidOrTimedOutSession = "Ungültige Sitzung oder Timeout."; +Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Die angegebenen rowCount- oder columnCount-Werte sind ungültig."; +Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "Ihre Office Online-Sitzung ist abgelaufen oder ungültig. Um fortzufahren, aktualisieren Sie die Seite."; +Strings.OfficeOM.L_InvalidFormatValue = 'Mindestens einer der "format"-Parameter besitzt einen Wert, der nicht zulässig ist. Ãœberprüfen Sie die Werte genau, und versuchen Sie es erneut.'; +Strings.OfficeOM.L_InvalidAPICall = "Ungültiger API-Aufruf."; +Strings.OfficeOM.L_SSOConnectionLostError = "A connection was lost during the sign in process."; +Strings.OfficeOM.L_DialogNavigateError = "Dialognavigationsfehler"; +Strings.OfficeOM.L_InvalidSSOAddinMessage = "Die Identitäts-API wird für dieses Add-In nicht unterstützt."; +Strings.OfficeOM.L_UserAborted = "Der Benutzer hat die Zustimmungsanfrage abgebrochen."; +Strings.OfficeOM.L_SliceSizeNotSupported = "Die angegebene Datenschnittgröße wird nicht unterstützt."; +Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Die Daten sind veraltet. Rufen Sie das Objekt noch mal ab."; +Strings.OfficeOM.L_DataReadError = "Fehler beim Lesen von Daten."; Strings.OfficeOM.L_BindingToMultipleSelection = "Eine nicht zusammenhängende Auswahl wird nicht unterstützt."; -Strings.OfficeOM.L_UnsupportedDataObject = "Der bereitgestellte Datenobjekttyp wird nicht unterstützt."; -Strings.OfficeOM.L_ConnectionFailureWithStatus = "Fehler der Anforderung mit Statuscode {0}."; +Strings.OfficeOM.L_PropertyNotLoaded = 'Die Eigenschaft "{0}" ist nicht verfügbar. Rufen Sie vor dem Lesen des Werts der Eigenschaft die load-Methode für das enthaltende Objekt auf, und rufen Sie "context.sync()" für den zugeordneten Anforderungskontext auf.'; +Strings.OfficeOM.L_EventRegistrationError = "Ereignis-Registrierungsfehler"; +Strings.OfficeOM.L_DialogRequireHTTPS = "Das HTTP-Protokoll wird nicht unterstützt. Verwenden Sie stattdessen HTTPS."; Strings.OfficeOM.L_InvalidResourceUrl = "Ungültige Anwendungsressourcen-URL angegeben."; -Strings.OfficeOM.L_InvalidDataObject = "Ungültiges Datenobjekt."; +Strings.OfficeOM.L_CustomXmlOutOfDateName = "Daten sind nicht aktuell."; +Strings.OfficeOM.L_NotImplemented = "Funktion {0} ist nicht implementiert."; +Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = 'Versuch, die schreibgeschützte Eigenschaft "{0}" festzulegen.'; +Strings.OfficeOM.L_NotSupported = 'Die Funktion "{0}" wird nicht unterstützt.'; +Strings.OfficeOM.L_InvalidBindingError = "Fehler: Ungültige Bindung."; +Strings.OfficeOM.L_NetworkProblem = "Netzwerkproblem"; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage = "Vorgangsfehler, weil dieses Add-In keine Benutzerzustimmung in dieser Kategorie unterstützt."; +Strings.OfficeOM.L_InitializeNotReady = "Office.js wurde noch nicht vollständig geladen. Versuchen Sie es bitte später erneut, oder stellen Sie sicher, dass Ihr Initialisierungscode der Office.initialize-Funktion hinzugefügt wird."; +Strings.OfficeOM.L_MissingParameter = "Fehlender Parameter"; +Strings.OfficeOM.L_EventHandlerAdditionFailed = "Fehler beim Hinzufügen des Ereignishandlers."; +Strings.OfficeOM.L_InvalidColumnsForBinding = "Die angegebenen Spalten sind ungültig."; +Strings.OfficeOM.L_CallbackNotAFunction = 'Der Rückruf muss vom Typ "Funktion" sein, war aber vom Typ "{0}".'; +Strings.OfficeOM.L_BindingCreationError = "Fehler beim Erstellen der Bindung."; +Strings.OfficeOM.L_CustomFunctionImplementationMissing = 'Die Eigenschaft mit diesem Namen in Excel.CustomFunctions, die die Definition der Funktion darstellt, muss eine "call"-Eigenschaft enthalten, die die Funktion implementiert.'; Strings.OfficeOM.L_InvalidObjectPath = 'Der Objektpfad "{0}" funktioniert nicht für den von Ihnen versuchten Vorgang. Wenn Sie das Objekt über mehrere Aufrufe von "context.sync" und außerhalb der sequenziellen Ausführung eines ".run"-Batchs verwenden, verwenden Sie die Methoden "context.trackedObjects.add()" und "context.trackedObjects.remove()", um die Lebensdauer des Objekts zu verwalten.'; -Strings.OfficeOM.L_SettingsAreStale = "Einstellungen konnten nicht gespeichert werden, da sie nicht aktuell sind."; -Strings.OfficeOM.L_SSOServerErrorMessage = "Unerwarteter Fehler auf dem Server."; -Strings.OfficeOM.L_SpecifiedIdNotExist = "Die angegebene ID ist nicht vorhanden."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Das Add-In fordert bereits ein Zugriffstoken an."; -Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Die ausgewählten Inhalte müssen im Tabellenformat vorliegen. Formatieren Sie die Daten als Tabelle, und versuchen Sie es dann erneut."; -Strings.OfficeOM.L_NonUniformPartialSetNotSupported = 'Koordinatenparameter können nicht mit dem Koersionstyp "Tabelle" verwendet werden, wenn die Tabelle verbundene Zellen enthält.'; -Strings.OfficeOM.L_RunMustReturnPromise = 'Die an die ".run"-Methode übergebene Batchfunktion hat kein Promise-Objekt zurückgegeben. Die Funktion muss ein Promise-Objekt zurückgeben, damit alle automatisch nachverfolgten Objekte nach Abschluss der Batchverarbeitung freigegeben werden können. Normalerweise wird ein Promise-Objekt zurückgegeben, indem die Antwort von "context.sync()" zurückgegeben wird.'; -Strings.OfficeOM.L_InvalidFormatValue = 'Mindestens einer der "format"-Parameter besitzt einen Wert, der nicht zulässig ist. Ãœberprüfen Sie die Werte genau, und versuchen Sie es erneut.'; -Strings.OfficeOM.L_GetSelectionNotSupported = "Die aktuelle Auswahl wird nicht unterstützt."; -Strings.OfficeOM.L_Timeout = "Timeout des Vorgangs."; -Strings.OfficeOM.L_UserClickIgnore = "Der Benutzer hat sich entschlossen, das Dialogfeld zu ignorieren."; -Strings.OfficeOM.L_DataWriteError = "Fehler beim Schreiben von Daten."; -Strings.OfficeOM.L_APINotSupported = "Nicht unterstützte API."; -Strings.OfficeOM.L_NewWindowCrossZone = 'Die Sicherheitseinstellungen Ihres Browsers verhindern die Erstellung eines Dialogfelds. Verwenden Sie einen anderen Browser oder {0}, so dass sich "{1}" und die in Ihrer Adressleiste angezeigte Domäne in der gleichen Sicherheitszone befinden.'; Strings.OfficeOM.L_SettingNameNotExist = "Der angegebene Einstellungsname ist nicht vorhanden."; -Strings.OfficeOM.L_InitializeNotReady = "Office.js wurde noch nicht vollständig geladen. Versuchen Sie es bitte später erneut, oder stellen Sie sicher, dass Ihr Initialisierungscode der Office.initialize-Funktion hinzugefügt wird."; -Strings.OfficeOM.L_SaveSettingsError = "Fehler beim Speichern von Einstellungen."; -Strings.OfficeOM.L_InvalidSetRows = "Die angegebenen Zeilen sind ungültig."; -Strings.OfficeOM.L_InvalidAPICall = "Ungültiger API-Aufruf."; -Strings.OfficeOM.L_InvalidArgumentGeneric = "Die an die Funktion übergebenen Argumente funktionieren in dieser Situation nicht, fehlen oder haben nicht das richtige Format."; -Strings.OfficeOM.L_CannotWriteToSelection = "In die aktuelle Auswahl kann nicht geschrieben werden."; -Strings.OfficeOM.L_FormattingReminder = "Formatierungserinnerung"; -Strings.OfficeOM.L_NamedItemNotFound = "Das benannte Element ist nicht vorhanden."; -Strings.OfficeOM.L_InvalidOrTimedOutSession = "Ungültige Sitzung oder Timeout."; -Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Der Vorgang wird für diesen Bindungstyp nicht unterstützt."; -Strings.OfficeOM.L_DialogAlreadyOpened = "Der Vorgang ist fehlgeschlagen, weil für dieses Add-In bereits ein Dialogfeld aktiv ist."; -Strings.OfficeOM.L_InvalidResourceUrlMessage = "Ungültige Ressourcen-URL im Manifest angegeben."; -Strings.OfficeOM.L_DialogNavigateError = "Dialognavigationsfehler"; -Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Der angegebenen Koersionstyp ist mit diesem Bindungstyp nicht kompatibel."; -Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "konfigurieren Sie Ihren Browser"; -Strings.OfficeOM.L_BadSelectorString = "Die an den Selektor übergebene Zeichenfolge ist nicht ordnungsgemäß formatiert oder wird nicht unterstützt."; -Strings.OfficeOM.L_DataStale = "Nicht aktuelle Daten"; +Strings.OfficeOM.L_InvalidValue = "Ungültiger Wert"; +Strings.OfficeOM.L_DataWriteReminder = "Erinnerung zum Schreiben von Daten"; +Strings.OfficeOM.L_ApiNotFoundDetails = 'Die Methode oder Eigenschaft "{0}" ist Teil des "{1}"-Anforderungssatzes, der in Ihrer Version von {2} nicht verfügbar ist.'; +Strings.OfficeOM.L_UserAbortedMessage = "Der Benutzer hat den Add-In-Berechtigungen nicht zugestimmt."; Strings.OfficeOM.L_NotSupportedEventType = 'Der angegebenen Ereignistyp "{0}" wird nicht unterstützt.'; +Strings.OfficeOM.L_PropertyDoesNotExist = 'Die Eigenschaft "{0}" ist für das Objekt nicht vorhanden.'; +Strings.OfficeOM.L_CannotWriteToSelection = "In die aktuelle Auswahl kann nicht geschrieben werden."; +Strings.OfficeOM.L_InValidOptionalArgument = "ungültiges optionales Argument"; +Strings.OfficeOM.L_FormatValueOutOfRange = "Der Wert liegt außerhalb des zulässigen Bereichs."; +Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath beschränkt die Auswahl auf 1024 Elemente."; +Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Die aktuelle Auswahl ist mit dem angegebenen Koersionstyp nicht kompatibel."; +Strings.OfficeOM.L_MultipleNamedItemFound = "Es wurden mehrere Objekte mit dem gleichen Namen gefunden."; +Strings.OfficeOM.L_DataNotMatchCoercionType = "Der Typ des angegebenen Datenobjekts ist mit der aktuellen Auswahl nicht kompatibel."; Strings.OfficeOM.L_UnsupportedEnumerationMessage = "Die Aufzählung wird in der aktuellen Hostanwendung nicht unterstützt."; -Strings.OfficeOM.L_InvalidGetStartRowColumn = "Die angegebenen startRow- oder startColumn-Werte sind ungültig."; -Strings.OfficeOM.L_InvalidParameters = "Funktion {0} hat ungültige Parameter."; -Strings.OfficeOM.L_DialogOK = "OK"; -Strings.OfficeOM.L_PermissionDenied = "Zugriff verweigert."; -Strings.OfficeOM.L_DialogRequireHTTPS = "Das HTTP-Protokoll wird nicht unterstützt. Verwenden Sie stattdessen HTTPS."; -Strings.OfficeOM.L_InvalidReadForBlankRow = "Die angegebene Zeile ist leer."; +Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Bitte treffen Sie eine Auswahl."; +Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Ungültige Eingabeargumente."; +Strings.OfficeOM.L_BrowserAPINotSupported = "Dieser Browser unterstützt die angeforderte API nicht."; +Strings.OfficeOM.L_CustomFunctionNameContainsBadChars = "Der Funktionsname darf nur Buchstaben, Zahlen, Unterstriche und Punkte enthalten."; Strings.OfficeOM.L_DataNotMatchBindingType = "Das angegebene Datenobjekt ist mit dem Bindungstyp nicht kompatibel."; -Strings.OfficeOM.L_NetworkProblem = "Netzwerkproblem"; -Strings.OfficeOM.L_NotImplemented = "Funktion {0} ist nicht implementiert."; +Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Der angegebene Bindungstyp ist mit dem angegebenen benannten Element nicht kompatibel."; Strings.OfficeOM.L_ConnectionFailureWithDetails = "Fehler der Anforderung mit Statuscode {0}, Fehlercode {1} und der folgenden Fehlermeldung: {2}"; -Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Die Anwendung {0} ist nicht vorhanden. Microsoft.Office.WebExtension.initialize(Ursache) wird nicht aufgerufen."; +Strings.OfficeOM.L_InvalidCoercion = "Ungültiger Koersionstyp."; +Strings.OfficeOM.L_NonUniformPartialSetNotSupported = 'Koordinatenparameter können nicht mit dem Koersionstyp "Tabelle" verwendet werden, wenn die Tabelle verbundene Zellen enthält.'; +Strings.OfficeOM.L_UserClickIgnore = "Der Benutzer hat sich entschlossen, das Dialogfeld zu ignorieren."; +Strings.OfficeOM.L_DocumentReadOnly = "Der angeforderte Vorgang ist im aktuellen Dokumentmodus nicht zulässig."; +Strings.OfficeOM.L_FileTypeNotSupported = "Der angegebene Dateityp wird nicht unterstützt."; +Strings.OfficeOM.L_MissingRequiredArguments = "fehlen einige erforderliche Argumente"; +Strings.OfficeOM.L_InvalidDataObject = "Ungültiges Datenobjekt."; +Strings.OfficeOM.L_PermissionDenied = "Zugriff verweigert."; Strings.OfficeOM.L_NotSupportedBindingType = 'Der angegebene Bindungstyp "{0}" wird nicht unterstützt.'; -Strings.OfficeOM.L_BrowserAPINotSupported = "Dieser Browser unterstützt die angeforderte API nicht."; -Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "Ihre Office Online-Sitzung ist abgelaufen oder ungültig. Um fortzufahren, aktualisieren Sie die Seite."; -Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Ignorieren"; -Strings.OfficeOM.L_IndexOutOfRange = "Index außerhalb des Gültigkeitsbereichs."; -Strings.OfficeOM.L_SSOClientError = "Fehler in der Authentifizierungsanforderung von Office."; -Strings.OfficeOM.L_InvalidSelectionForBindingType = "Eine Bindung kann nicht mit der aktuellen Auswahl und dem angegebenen Bindungstyp erstellt werden."; -Strings.OfficeOM.L_RequestTimeout = "Die Ausführung des Aufrufs hat zu lang gedauert."; -Strings.OfficeOM.L_OutOfRange = "Außerhalb des zulässigen Bereichs"; -Strings.OfficeOM.L_SSOServerError = "Fehler im Authentifizierungsanbieter."; -Strings.OfficeOM.L_InvalidBinding = "Ungültige Bindung."; -Strings.OfficeOM.L_PropertyNotLoaded = 'Die Eigenschaft "{0}" ist nicht verfügbar. Rufen Sie vor dem Lesen des Werts der Eigenschaft die load-Methode für das enthaltende Objekt auf, und rufen Sie "context.sync()" für den zugeordneten Anforderungskontext auf.'; -Strings.OfficeOM.L_InvalidArgument = 'Das Argument "{0}" funktioniert in dieser Situation nicht, fehlt oder hat nicht das richtige Format.'; -Strings.OfficeOM.L_SSOClientErrorMessage = "Unerwarteter Fehler im Client."; -Strings.OfficeOM.L_APICallFailed = "Fehler beim API-Aufruf."; -Strings.OfficeOM.L_InvalidBindingError = "Fehler: Ungültige Bindung."; -Strings.OfficeOM.L_RowIndexOutOfRange = "Der Wert für den Zeilenindex liegt außerhalb des zulässigen Bereichs. Verwenden Sie einen Wert (0 oder höher), der kleiner als die Anzahl der Zeilen ist."; -Strings.OfficeOM.L_NonUniformPartialGetNotSupported = 'Koordinatenparameter können nicht mit dem Koersionstyp "Tabelle" verwendet werden, wenn die Tabelle verbundene Zellen enthält.'; +Strings.OfficeOM.L_OsfControlTypeNotSupported = "Der OsfControl-Typ wird nicht unterstützt."; +Strings.OfficeOM.L_UserNotSignedIn = "Kein Benutzer ist bei Office angemeldet."; +Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Die Anwendung {0} ist nicht vorhanden. Microsoft.Office.WebExtension.initialize(Ursache) wird nicht aufgerufen."; +Strings.OfficeOM.L_InvalidSetRows = "Die angegebenen Zeilen sind ungültig."; +Strings.OfficeOM.L_InvalidReadForBlankRow = "Die angegebene Zeile ist leer."; +Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Hinweis: Die von einem Formatierungs-API-Aufruf festgelegten Formatierungssätze sollten unter 100 liegen."; +Strings.OfficeOM.L_NewWindowCrossZone = 'Die Sicherheitseinstellungen Ihres Browsers verhindern, dass wir ein Dialogfeld öffnen. Verwenden Sie einen anderen Browser oder {0}, sodass sich "{1}" und die in Ihrer Adressleiste angezeigte Domäne in der selben Sicherheitszone befinden.'; Strings.OfficeOM.L_SettingsStaleError = "Fehler: Veraltete Einstellungen."; -Strings.OfficeOM.L_TooManyOptionalObjects = "mehrere optionale Objekte in der Parameterliste"; -Strings.OfficeOM.L_CustomXmlError = "Benutzerdefiniertes XML-Fehler."; -Strings.OfficeOM.L_InvalidTableOptionValue = 'Mindestens einer der "tableOptions"-Parameter besitzt einen Wert, der nicht zulässig ist. Ãœberprüfen Sie die Werte genau, und versuchen Sie es erneut.'; -Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Fehler beim Vorgang, da dieses Add-In bereits ein Zugriffstoken anfordert."; -Strings.OfficeOM.L_InvalidNode = "Ungültiger Knoten."; -Strings.OfficeOM.L_UserAborted = "Der Benutzer hat die Zustimmungsanfrage abgebrochen."; -Strings.OfficeOM.L_ReadSettingsError = "Fehler beim Lesen von Einstellungen."; -Strings.OfficeOM.L_NotSupported = 'Die Funktion "{0}" wird nicht unterstützt.'; -Strings.OfficeOM.L_DialogInvalidScheme = "Das URL-Schema wird nicht unterstützt. Verwenden Sie stattdessen HTTPS."; -Strings.OfficeOM.L_CannotNavigateTo = "Das Objekt befindet sich an einem Ort, wo keine Navigation unterstützt wird."; -Strings.OfficeOM.L_InvalidSSOAddinMessage = "Die Identitäts-API wird für dieses Add-In nicht unterstützt."; -Strings.OfficeOM.L_AppNameNotExist = "Add-In-Name für {0} ist nicht vorhanden."; -Strings.OfficeOM.L_UnsupportedEnumeration = "Nicht unterstützte Aufzählung"; -Strings.OfficeOM.L_CoercionTypeNotSupported = "Der angegebene Koersionstyp wird nicht unterstützt."; -Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Zulassen"; -Strings.OfficeOM.L_FunctionCallFailed = 'Fehler beim Aufrufen der Funktion "{0}". Fehlercode: {1}.'; -Strings.OfficeOM.L_ElementMissing = "Die Tabellenzelle konnte nicht formatiert werden, weil einige Parameterwerte fehlen. Ãœberprüfen Sie die Werte genau, und versuchen Sie es erneut."; -Strings.OfficeOM.L_TooManyArguments = "zu viele Argumente"; -Strings.OfficeOM.L_ShuttingDown = "Vorgangsfehler, weil die Daten auf dem Server nicht aktuell sind."; -Strings.OfficeOM.L_DataNotMatchBindingSize = "Das bereitgestellte Datenobjekt entspricht nicht der Größe der aktuellen Auswahl."; -Strings.OfficeOM.L_OperationNotSupported = "Dieser Vorgang wird nicht unterstützt." +Strings.OfficeOM.L_InvalidSetStartRowColumn = "Die angegebenen startRow- oder startColumn-Werte sind ungültig."; +Strings.OfficeOM.L_BadSelectorString = "Die an den Selektor übergebene Zeichenfolge ist nicht ordnungsgemäß formatiert oder wird nicht unterstützt."; +Strings.OfficeOM.L_DataStale = "Nicht aktuelle Daten"; +Strings.OfficeOM.L_SettingsAreStale = "Einstellungen konnten nicht gespeichert werden, da sie nicht aktuell sind."; +Strings.OfficeOM.L_UnsupportedUserIdentity = "Der Benutzeridentitätstyp wird nicht unterstützt."; +Strings.OfficeOM.L_SaveSettingsError = "Fehler beim Speichern von Einstellungen."; +Strings.OfficeOM.L_RedundantCallbackSpecification = "Ein Rückruf kann nicht sowohl in der Argumenteliste als auch in einem optionalen Objekt angegeben werden."; +Strings.OfficeOM.L_TooManyOptionalFunction = "mehrere optionale Funktionen in der Parameterliste" \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/de-de/office_strings.js b/node_modules/@microsoft/office-js/dist/de-de/office_strings.js index 14e1d71..625a0fc 100644 --- a/node_modules/@microsoft/office-js/dist/de-de/office_strings.js +++ b/node_modules/@microsoft/office-js/dist/de-de/office_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_InvalidSetColumns="Die angegebenen Spalten sind ungültig.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Bitte treffen Sie eine Auswahl.";Strings.OfficeOM.L_EventHandlerRemovalFailed="Fehler beim Entfernen des Ereignishandlers.";Strings.OfficeOM.L_NavOutOfBound="Vorgangsfehler, weil der Index außerhalb des Bereichs liegt.";Strings.OfficeOM.L_UnsupportedUserIdentity="Der Benutzeridentitätstyp wird nicht unterstützt.";Strings.OfficeOM.L_TooManyIncompleteRequests="Warten Sie, bis der vorherige Aufruf abgeschlossen ist.";Strings.OfficeOM.L_DataWriteReminder="Erinnerung zum Schreiben von Daten";Strings.OfficeOM.L_RequestTokenUnavailable="Diese API wurde eingeschränkt, um die Anrufhäufigkeit herabzusetzen.";Strings.OfficeOM.L_MultipleNamedItemFound="Es wurden mehrere Objekte mit dem gleichen Namen gefunden.";Strings.OfficeOM.L_EventHandlerNotExist="Der angegebene Ereignishandler für diese Bindung wurde nicht gefunden.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Der angegebene Bindungstyp ist mit dem angegebenen benannten Element nicht kompatibel.";Strings.OfficeOM.L_UnknownBindingType="Der Bindungstyp wird nicht unterstützt.";Strings.OfficeOM.L_GetDataIsTooLarge="Der angeforderte Datensatz ist zu groß.";Strings.OfficeOM.L_InvalidColumnsForBinding="Die angegebenen Spalten sind ungültig.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Daten sind nicht aktuell.";Strings.OfficeOM.L_FormatValueOutOfRange="Der Wert liegt außerhalb des zulässigen Bereichs.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Der Identitätstyp des Benutzers wird nicht unterstützt.";Strings.OfficeOM.L_PropertyDoesNotExist='Die Eigenschaft "{0}" ist für das Objekt nicht vorhanden.';Strings.OfficeOM.L_InvalidApiCallInContext="Ungültiger API-Aufruf im aktuellen Kontext.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod='Änderungen an der Eigenschaft "{0}" können nicht mit einer "object.set"-Methode angewendet werden.';Strings.OfficeOM.L_InValidOptionalArgument="ungültiges optionales Argument";Strings.OfficeOM.L_BindingCreationError="Fehler beim Erstellen der Bindung.";Strings.OfficeOM.L_InvalidFormat="Fehler: Ungültiges Format.";Strings.OfficeOM.L_InvalidValue="Ungültiger Wert";Strings.OfficeOM.L_InternalError="Interner Fehler";Strings.OfficeOM.L_CannotRegisterEvent="Der Ereignishandler kann nicht registriert werden.";Strings.OfficeOM.L_DataNotMatchCoercionType="Der Typ des angegebenen Datenobjekts ist mit der aktuellen Auswahl nicht kompatibel.";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} möchte ein neues Fenster anzeigen.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath beschränkt die Auswahl auf 1024 Elemente.";Strings.OfficeOM.L_FileTypeNotSupported="Der angegebene Dateityp wird nicht unterstützt.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Die Daten sind veraltet. Rufen Sie das Objekt noch mal ab.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Die aktuelle Auswahl ist mit dem angegebenen Koersionstyp nicht kompatibel.";Strings.OfficeOM.L_CloseFileBeforeRetrieve='Rufen Sie "closeAsync" für die aktuelle Datei auf, bevor Sie eine weitere Datei abrufen.';Strings.OfficeOM.L_ColIndexOutOfRange="Der Wert für den Spaltenindex liegt außerhalb des zulässigen Bereichs. Verwenden Sie einen Wert (0 oder höher), der kleiner als die Anzahl der Spalten ist.";Strings.OfficeOM.L_CustomXmlNodeNotFound="Der angegebene Knoten wurde nicht gefunden.";Strings.OfficeOM.L_OsfControlTypeNotSupported="Der OsfControl-Typ wird nicht unterstützt.";Strings.OfficeOM.L_InvalidBindingOperation="Ungültiger Bindungsvorgang.";Strings.OfficeOM.L_TooManyOptionalFunction="mehrere optionale Funktionen in der Parameterliste";Strings.OfficeOM.L_InvalidCellsValue='Mindestens einer der "cells"-Parameter besitzt einen Wert, der nicht zulässig ist. Ãœberprüfen Sie die Werte genau, und versuchen Sie es erneut.';Strings.OfficeOM.L_DialogAddressNotTrusted='Die Domäne der URL ist nicht im "AppDomains"-Element im Manifest enthalten.';Strings.OfficeOM.L_MemoryLimit="Arbeitsspeichergrenze überschritten";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Ein Netzwerkproblem hat den Abruf der Datei verhindert.";Strings.OfficeOM.L_InvalidGrant="Vorautorisierung fehlt.";Strings.OfficeOM.L_DataReadError="Fehler beim Lesen von Daten.";Strings.OfficeOM.L_InternalErrorDescription="Ein interner Fehler ist aufgetreten.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Auswahlgrenzwert erreicht.";Strings.OfficeOM.L_InvalidRequestContext="Das Objekt kann nicht in verschiedenen Anforderungskontexten verwendet werden.";Strings.OfficeOM.L_SliceSizeNotSupported="Die angegebene Datenschnittgröße wird nicht unterstützt.";Strings.OfficeOM.L_InvalidDataFormat="Das Format des angegebenen Datenobjekts ist ungültig.";Strings.OfficeOM.L_MissingRequiredArguments="fehlen einige erforderliche Argumente";Strings.OfficeOM.L_MissingParameter="Fehlender Parameter";Strings.OfficeOM.L_NoCapability="Sie verfügen nicht über ausreichende Berechtigungen für diese Aktion.";Strings.OfficeOM.L_BindingNotExist="Die angegebene Bindung ist nicht vorhanden.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Hinweis: Die Anzahl der Zellen in einer Tabelle sollte unter 20.000 Zellen liegen.";Strings.OfficeOM.L_DocumentReadOnly="Der angeforderte Vorgang ist im aktuellen Dokumentmodus nicht zulässig.";Strings.OfficeOM.L_InvalidGrantMessage="Gewährung für dieses Add-In fehlt.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty='Versuch, die schreibgeschützte Eigenschaft "{0}" festzulegen.';Strings.OfficeOM.L_OverwriteWorksheetData="Fehler im festgelegten Vorgang, weil das bereitgestellte Datenobjekt Daten überschreiben oder verschieben würde.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Fehler beim Hinzufügen des Ereignishandlers.";Strings.OfficeOM.L_RedundantCallbackSpecification="Ein Rückruf kann nicht sowohl in der Argumenteliste als auch in einem optionalen Objekt angegeben werden.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Die angegebenen rowCount- oder columnCount-Werte sind ungültig.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Browsereinschränkungen haben das Erstellen des Dialogfelds verhindert. Die Domäne des Dialogfelds und die Domäne des Add-In-Hosts befinden sich nicht in der gleichen Sicherheitszone.";Strings.OfficeOM.L_SetDataParametersConflict="Die angegebenen Parameter stehen in Konflikt.";Strings.OfficeOM.L_InvalidGetColumns="Die angegebenen Spalten sind ungültig.";Strings.OfficeOM.L_HostError="Hostfehler";Strings.OfficeOM.L_UserAbortedMessage="Der Benutzer hat den Add-In-Berechtigungen nicht zugestimmt.";Strings.OfficeOM.L_InvalidSetStartRowColumn="Die angegebenen startRow- oder startColumn-Werte sind ungültig.";Strings.OfficeOM.L_ValueNotLoaded='Der Wert des Ergebnisobjekts wurde noch nicht geladen. Rufen Sie vor dem Lesen der "value"-Eigenschaft "context.sync()" für den zugeordneten Anforderungskontext auf.';Strings.OfficeOM.L_DataNotMatchSelection="Das bereitgestellte Datenobjekt ist mit der Form oder den Abmessungen der aktuellen Auswahl nicht kompatibel.";Strings.OfficeOM.L_ActivityLimitReached="Der Aktivitätsgrenzwert wurde erreicht.";Strings.OfficeOM.L_SettingsCannotSave="Die Einstellungen konnten nicht gespeichert werden.";Strings.OfficeOM.L_SetDataIsTooLarge="Das angegebene Datenobjekt ist zu groß.";Strings.OfficeOM.L_UserNotSignedIn="Kein Benutzer ist bei Office angemeldet.";Strings.OfficeOM.L_InvalidCoercion="Ungültiger Koersionstyp.";Strings.OfficeOM.L_GetDataParametersConflict="Die angegebenen Parameter stehen in Konflikt.";Strings.OfficeOM.L_DisplayDialogError="Dialoganzeigefehler";Strings.OfficeOM.L_CallbackNotAFunction='Der Rückruf muss vom Typ "Funktion" sein, war aber vom Typ "{0}".';Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Hinweis: Die von einem Formatierungs-API-Aufruf festgelegten Formatierungssätze sollten unter 100 liegen.";Strings.OfficeOM.L_InvalidGetRows="Die angegebenen Zeilen sind ungültig.";Strings.OfficeOM.L_SelectionCannotBound="Eine Bindung an die aktuelle Auswahl ist nicht möglich.";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Ungültige Eingabeargumente.";Strings.OfficeOM.L_EventRegistrationError="Ereignis-Registrierungsfehler";Strings.OfficeOM.L_BindingToMultipleSelection="Eine nicht zusammenhängende Auswahl wird nicht unterstützt.";Strings.OfficeOM.L_UnsupportedDataObject="Der bereitgestellte Datenobjekttyp wird nicht unterstützt.";Strings.OfficeOM.L_ConnectionFailureWithStatus="Fehler der Anforderung mit Statuscode {0}.";Strings.OfficeOM.L_InvalidResourceUrl="Ungültige Anwendungsressourcen-URL angegeben.";Strings.OfficeOM.L_InvalidDataObject="Ungültiges Datenobjekt.";Strings.OfficeOM.L_InvalidObjectPath='Der Objektpfad "{0}" funktioniert nicht für den von Ihnen versuchten Vorgang. Wenn Sie das Objekt über mehrere Aufrufe von "context.sync" und außerhalb der sequenziellen Ausführung eines ".run"-Batchs verwenden, verwenden Sie die Methoden "context.trackedObjects.add()" und "context.trackedObjects.remove()", um die Lebensdauer des Objekts zu verwalten.';Strings.OfficeOM.L_SettingsAreStale="Einstellungen konnten nicht gespeichert werden, da sie nicht aktuell sind.";Strings.OfficeOM.L_SSOServerErrorMessage="Unerwarteter Fehler auf dem Server.";Strings.OfficeOM.L_SpecifiedIdNotExist="Die angegebene ID ist nicht vorhanden.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Das Add-In fordert bereits ein Zugriffstoken an.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Die ausgewählten Inhalte müssen im Tabellenformat vorliegen. Formatieren Sie die Daten als Tabelle, und versuchen Sie es dann erneut.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported='Koordinatenparameter können nicht mit dem Koersionstyp "Tabelle" verwendet werden, wenn die Tabelle verbundene Zellen enthält.';Strings.OfficeOM.L_RunMustReturnPromise='Die an die ".run"-Methode übergebene Batchfunktion hat kein Promise-Objekt zurückgegeben. Die Funktion muss ein Promise-Objekt zurückgeben, damit alle automatisch nachverfolgten Objekte nach Abschluss der Batchverarbeitung freigegeben werden können. Normalerweise wird ein Promise-Objekt zurückgegeben, indem die Antwort von "context.sync()" zurückgegeben wird.';Strings.OfficeOM.L_InvalidFormatValue='Mindestens einer der "format"-Parameter besitzt einen Wert, der nicht zulässig ist. Ãœberprüfen Sie die Werte genau, und versuchen Sie es erneut.';Strings.OfficeOM.L_GetSelectionNotSupported="Die aktuelle Auswahl wird nicht unterstützt.";Strings.OfficeOM.L_Timeout="Timeout des Vorgangs.";Strings.OfficeOM.L_UserClickIgnore="Der Benutzer hat sich entschlossen, das Dialogfeld zu ignorieren.";Strings.OfficeOM.L_DataWriteError="Fehler beim Schreiben von Daten.";Strings.OfficeOM.L_APINotSupported="Nicht unterstützte API.";Strings.OfficeOM.L_NewWindowCrossZone='Die Sicherheitseinstellungen Ihres Browsers verhindern die Erstellung eines Dialogfelds. Verwenden Sie einen anderen Browser oder {0}, so dass sich "{1}" und die in Ihrer Adressleiste angezeigte Domäne in der gleichen Sicherheitszone befinden.';Strings.OfficeOM.L_SettingNameNotExist="Der angegebene Einstellungsname ist nicht vorhanden.";Strings.OfficeOM.L_InitializeNotReady="Office.js wurde noch nicht vollständig geladen. Versuchen Sie es bitte später erneut, oder stellen Sie sicher, dass Ihr Initialisierungscode der Office.initialize-Funktion hinzugefügt wird.";Strings.OfficeOM.L_SaveSettingsError="Fehler beim Speichern von Einstellungen.";Strings.OfficeOM.L_InvalidSetRows="Die angegebenen Zeilen sind ungültig.";Strings.OfficeOM.L_InvalidAPICall="Ungültiger API-Aufruf.";Strings.OfficeOM.L_InvalidArgumentGeneric="Die an die Funktion übergebenen Argumente funktionieren in dieser Situation nicht, fehlen oder haben nicht das richtige Format.";Strings.OfficeOM.L_CannotWriteToSelection="In die aktuelle Auswahl kann nicht geschrieben werden.";Strings.OfficeOM.L_FormattingReminder="Formatierungserinnerung";Strings.OfficeOM.L_NamedItemNotFound="Das benannte Element ist nicht vorhanden.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Ungültige Sitzung oder Timeout.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Der Vorgang wird für diesen Bindungstyp nicht unterstützt.";Strings.OfficeOM.L_DialogAlreadyOpened="Der Vorgang ist fehlgeschlagen, weil für dieses Add-In bereits ein Dialogfeld aktiv ist.";Strings.OfficeOM.L_InvalidResourceUrlMessage="Ungültige Ressourcen-URL im Manifest angegeben.";Strings.OfficeOM.L_DialogNavigateError="Dialognavigationsfehler";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Der angegebenen Koersionstyp ist mit diesem Bindungstyp nicht kompatibel.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="konfigurieren Sie Ihren Browser";Strings.OfficeOM.L_BadSelectorString="Die an den Selektor übergebene Zeichenfolge ist nicht ordnungsgemäß formatiert oder wird nicht unterstützt.";Strings.OfficeOM.L_DataStale="Nicht aktuelle Daten";Strings.OfficeOM.L_NotSupportedEventType='Der angegebenen Ereignistyp "{0}" wird nicht unterstützt.';Strings.OfficeOM.L_UnsupportedEnumerationMessage="Die Aufzählung wird in der aktuellen Hostanwendung nicht unterstützt.";Strings.OfficeOM.L_InvalidGetStartRowColumn="Die angegebenen startRow- oder startColumn-Werte sind ungültig.";Strings.OfficeOM.L_InvalidParameters="Funktion {0} hat ungültige Parameter.";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_PermissionDenied="Zugriff verweigert.";Strings.OfficeOM.L_DialogRequireHTTPS="Das HTTP-Protokoll wird nicht unterstützt. Verwenden Sie stattdessen HTTPS.";Strings.OfficeOM.L_InvalidReadForBlankRow="Die angegebene Zeile ist leer.";Strings.OfficeOM.L_DataNotMatchBindingType="Das angegebene Datenobjekt ist mit dem Bindungstyp nicht kompatibel.";Strings.OfficeOM.L_NetworkProblem="Netzwerkproblem";Strings.OfficeOM.L_NotImplemented="Funktion {0} ist nicht implementiert.";Strings.OfficeOM.L_ConnectionFailureWithDetails="Fehler der Anforderung mit Statuscode {0}, Fehlercode {1} und der folgenden Fehlermeldung: {2}";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Die Anwendung {0} ist nicht vorhanden. Microsoft.Office.WebExtension.initialize(Ursache) wird nicht aufgerufen.";Strings.OfficeOM.L_NotSupportedBindingType='Der angegebene Bindungstyp "{0}" wird nicht unterstützt.';Strings.OfficeOM.L_BrowserAPINotSupported="Dieser Browser unterstützt die angeforderte API nicht.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="Ihre Office Online-Sitzung ist abgelaufen oder ungültig. Um fortzufahren, aktualisieren Sie die Seite.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Ignorieren";Strings.OfficeOM.L_IndexOutOfRange="Index außerhalb des Gültigkeitsbereichs.";Strings.OfficeOM.L_SSOClientError="Fehler in der Authentifizierungsanforderung von Office.";Strings.OfficeOM.L_InvalidSelectionForBindingType="Eine Bindung kann nicht mit der aktuellen Auswahl und dem angegebenen Bindungstyp erstellt werden.";Strings.OfficeOM.L_RequestTimeout="Die Ausführung des Aufrufs hat zu lang gedauert.";Strings.OfficeOM.L_OutOfRange="Außerhalb des zulässigen Bereichs";Strings.OfficeOM.L_SSOServerError="Fehler im Authentifizierungsanbieter.";Strings.OfficeOM.L_InvalidBinding="Ungültige Bindung.";Strings.OfficeOM.L_PropertyNotLoaded='Die Eigenschaft "{0}" ist nicht verfügbar. Rufen Sie vor dem Lesen des Werts der Eigenschaft die load-Methode für das enthaltende Objekt auf, und rufen Sie "context.sync()" für den zugeordneten Anforderungskontext auf.';Strings.OfficeOM.L_InvalidArgument='Das Argument "{0}" funktioniert in dieser Situation nicht, fehlt oder hat nicht das richtige Format.';Strings.OfficeOM.L_SSOClientErrorMessage="Unerwarteter Fehler im Client.";Strings.OfficeOM.L_APICallFailed="Fehler beim API-Aufruf.";Strings.OfficeOM.L_InvalidBindingError="Fehler: Ungültige Bindung.";Strings.OfficeOM.L_RowIndexOutOfRange="Der Wert für den Zeilenindex liegt außerhalb des zulässigen Bereichs. Verwenden Sie einen Wert (0 oder höher), der kleiner als die Anzahl der Zeilen ist.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported='Koordinatenparameter können nicht mit dem Koersionstyp "Tabelle" verwendet werden, wenn die Tabelle verbundene Zellen enthält.';Strings.OfficeOM.L_SettingsStaleError="Fehler: Veraltete Einstellungen.";Strings.OfficeOM.L_TooManyOptionalObjects="mehrere optionale Objekte in der Parameterliste";Strings.OfficeOM.L_CustomXmlError="Benutzerdefiniertes XML-Fehler.";Strings.OfficeOM.L_InvalidTableOptionValue='Mindestens einer der "tableOptions"-Parameter besitzt einen Wert, der nicht zulässig ist. Ãœberprüfen Sie die Werte genau, und versuchen Sie es erneut.';Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Fehler beim Vorgang, da dieses Add-In bereits ein Zugriffstoken anfordert.";Strings.OfficeOM.L_InvalidNode="Ungültiger Knoten.";Strings.OfficeOM.L_UserAborted="Der Benutzer hat die Zustimmungsanfrage abgebrochen.";Strings.OfficeOM.L_ReadSettingsError="Fehler beim Lesen von Einstellungen.";Strings.OfficeOM.L_NotSupported='Die Funktion "{0}" wird nicht unterstützt.';Strings.OfficeOM.L_DialogInvalidScheme="Das URL-Schema wird nicht unterstützt. Verwenden Sie stattdessen HTTPS.";Strings.OfficeOM.L_CannotNavigateTo="Das Objekt befindet sich an einem Ort, wo keine Navigation unterstützt wird.";Strings.OfficeOM.L_InvalidSSOAddinMessage="Die Identitäts-API wird für dieses Add-In nicht unterstützt.";Strings.OfficeOM.L_AppNameNotExist="Add-In-Name für {0} ist nicht vorhanden.";Strings.OfficeOM.L_UnsupportedEnumeration="Nicht unterstützte Aufzählung";Strings.OfficeOM.L_CoercionTypeNotSupported="Der angegebene Koersionstyp wird nicht unterstützt.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Zulassen";Strings.OfficeOM.L_FunctionCallFailed='Fehler beim Aufrufen der Funktion "{0}". Fehlercode: {1}.';Strings.OfficeOM.L_ElementMissing="Die Tabellenzelle konnte nicht formatiert werden, weil einige Parameterwerte fehlen. Ãœberprüfen Sie die Werte genau, und versuchen Sie es erneut.";Strings.OfficeOM.L_TooManyArguments="zu viele Argumente";Strings.OfficeOM.L_ShuttingDown="Vorgangsfehler, weil die Daten auf dem Server nicht aktuell sind.";Strings.OfficeOM.L_DataNotMatchBindingSize="Das bereitgestellte Datenobjekt entspricht nicht der Größe der aktuellen Auswahl.";Strings.OfficeOM.L_OperationNotSupported="Dieser Vorgang wird nicht unterstützt." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_DialogAlreadyOpened="Der Vorgang ist fehlgeschlagen, weil für dieses Add-In bereits ein Dialogfeld aktiv ist.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Fehler beim Vorgang, da dieses Add-In bereits ein Zugriffstoken anfordert.";Strings.OfficeOM.L_InvalidGetColumns="Die angegebenen Spalten sind ungültig.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Der angegebenen Koersionstyp ist mit diesem Bindungstyp nicht kompatibel.";Strings.OfficeOM.L_InvalidGetRows="Die angegebenen Zeilen sind ungültig.";Strings.OfficeOM.L_RequestTokenUnavailable="Diese API wurde eingeschränkt, um die Anrufhäufigkeit herabzusetzen.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Zulassen";Strings.OfficeOM.L_NonUniformPartialGetNotSupported='Koordinatenparameter können nicht mit dem Koersionstyp "Tabelle" verwendet werden, wenn die Tabelle verbundene Zellen enthält.';Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="konfigurieren Sie Ihren Browser";Strings.OfficeOM.L_RunMustReturnPromise='Die an die ".run"-Methode übergebene Batchfunktion hat kein Promise-Objekt zurückgegeben. Die Funktion muss ein Promise-Objekt zurückgeben, damit alle automatisch nachverfolgten Objekte nach Abschluss der Batchverarbeitung freigegeben werden können. Normalerweise wird ein Promise-Objekt zurückgegeben, indem die Antwort von "context.sync()" zurückgegeben wird.';Strings.OfficeOM.L_InvalidParameters="Funktion {0} hat ungültige Parameter.";Strings.OfficeOM.L_RequestTimeout="Die Ausführung des Aufrufs hat zu lang gedauert.";Strings.OfficeOM.L_CustomXmlNodeNotFound="Der angegebene Knoten wurde nicht gefunden.";Strings.OfficeOM.L_SetDataIsTooLarge="Das angegebene Datenobjekt ist zu groß.";Strings.OfficeOM.L_InvalidSetColumns="Die angegebenen Spalten sind ungültig.";Strings.OfficeOM.L_ReadSettingsError="Fehler beim Lesen von Einstellungen.";Strings.OfficeOM.L_InvalidBinding="Ungültige Bindung.";Strings.OfficeOM.L_InvalidGrantMessage="Gewährung für dieses Add-In fehlt.";Strings.OfficeOM.L_CannotRegisterEvent="Der Ereignishandler kann nicht registriert werden.";Strings.OfficeOM.L_SSOServerErrorMessage="Unerwarteter Fehler auf dem Server.";Strings.OfficeOM.L_GetDataParametersConflict="Die angegebenen Parameter stehen in Konflikt.";Strings.OfficeOM.L_ActivityLimitReached="Der Aktivitätsgrenzwert wurde erreicht.";Strings.OfficeOM.L_APICallFailed="Fehler beim API-Aufruf.";Strings.OfficeOM.L_InvalidOperationInCellEditMode="Excel befindet sich im Zellbearbeitungsmodus. Beenden Sie den Bearbeitungsmodus, indem Sie die EINGABE- oder TAB-TASTE drücken, oder indem eine andere Zelle auswählen, und versuchen Sie es dann noch mal.";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} möchte ein neues Fenster anzeigen.";Strings.OfficeOM.L_InternalError="Interner Fehler";Strings.OfficeOM.L_EventHandlerRemovalFailed="Fehler beim Entfernen des Ereignishandlers.";Strings.OfficeOM.L_SSOServerError="Fehler im Authentifizierungsanbieter.";Strings.OfficeOM.L_CloseFileBeforeRetrieve='Rufen Sie "closeAsync" für die aktuelle Datei auf, bevor Sie eine weitere Datei abrufen.';Strings.OfficeOM.L_DisplayDialogError="Dialoganzeigefehler";Strings.OfficeOM.L_InvalidArgumentGeneric="Die an die Funktion übergebenen Argumente funktionieren in dieser Situation nicht, fehlen oder haben nicht das richtige Format.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Die ausgewählten Inhalte müssen im Tabellenformat vorliegen. Formatieren Sie die Daten als Tabelle, und versuchen Sie es dann erneut.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Ein Netzwerkproblem hat den Abruf der Datei verhindert.";Strings.OfficeOM.L_DialogAddressNotTrusted='Die Domäne der URL ist nicht im "AppDomains"-Element im Manifest enthalten.';Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Ignorieren";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod='Änderungen an der Eigenschaft "{0}" können nicht mit einer "object.set"-Methode angewendet werden.';Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Der Vorgang wird für diesen Bindungstyp nicht unterstützt.";Strings.OfficeOM.L_CustomFunctionNameCannotSplit="Der Funktionsname kann muss einen nicht leeren Namespace und einen nicht leeren Kurznamen enthalten.";Strings.OfficeOM.L_GetSelectionNotSupported="Die aktuelle Auswahl wird nicht unterstützt.";Strings.OfficeOM.L_Timeout="Timeout des Vorgangs.";Strings.OfficeOM.L_SpecifiedIdNotExist="Die angegebene ID ist nicht vorhanden.";Strings.OfficeOM.L_DialogInvalidScheme="Das URL-Schema wird nicht unterstützt. Verwenden Sie stattdessen HTTPS.";Strings.OfficeOM.L_InvalidFormat="Fehler: Ungültiges Format.";Strings.OfficeOM.L_InvalidResourceUrlMessage="Ungültige Ressourcen-URL im Manifest angegeben.";Strings.OfficeOM.L_DataWriteError="Fehler beim Schreiben von Daten.";Strings.OfficeOM.L_SSOClientError="Fehler in der Authentifizierungsanforderung von Office.";Strings.OfficeOM.L_UnsupportedDataObject="Der bereitgestellte Datenobjekttyp wird nicht unterstützt.";Strings.OfficeOM.L_TooManyOptionalObjects="mehrere optionale Objekte in der Parameterliste";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Hinweis: Die Anzahl der Zellen in einer Tabelle sollte unter 20.000 Zellen liegen.";Strings.OfficeOM.L_DataNotMatchSelection="Das bereitgestellte Datenobjekt ist mit der Form oder den Abmessungen der aktuellen Auswahl nicht kompatibel.";Strings.OfficeOM.L_InternalErrorDescription="Ein interner Fehler ist aufgetreten.";Strings.OfficeOM.L_NoCapability="Sie verfügen nicht über ausreichende Berechtigungen für diese Aktion.";Strings.OfficeOM.L_IndexOutOfRange="Index außerhalb des Gültigkeitsbereichs.";Strings.OfficeOM.L_InvalidApiCallInContext="Ungültiger API-Aufruf im aktuellen Kontext.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Browsereinschränkungen haben das Erstellen des Dialogfelds verhindert. Die Domäne des Dialogfelds und die Domäne des Add-In-Hosts befinden sich nicht in der gleichen Sicherheitszone.";Strings.OfficeOM.L_NavOutOfBound="Vorgangsfehler, weil der Index außerhalb des Bereichs liegt.";Strings.OfficeOM.L_SettingsCannotSave="Die Einstellungen konnten nicht gespeichert werden.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Der Identitätstyp des Benutzers wird nicht unterstützt.";Strings.OfficeOM.L_GetDataIsTooLarge="Der angeforderte Datensatz ist zu groß.";Strings.OfficeOM.L_NamedItemNotFound="Das benannte Element ist nicht vorhanden.";Strings.OfficeOM.L_DataNotMatchBindingSize="Das bereitgestellte Datenobjekt entspricht nicht der Größe der aktuellen Auswahl.";Strings.OfficeOM.L_FunctionCallFailed='Fehler beim Aufrufen der Funktion "{0}". Fehlercode: {1}.';Strings.OfficeOM.L_CannotNavigateTo="Das Objekt befindet sich an einem Ort, wo keine Navigation unterstützt wird.";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_ConnectionFailureWithStatus="Fehler der Anforderung mit Statuscode {0}.";Strings.OfficeOM.L_InvalidGrant="Vorautorisierung fehlt.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Das Add-In fordert bereits ein Zugriffstoken an.";Strings.OfficeOM.L_InvalidTableOptionValue='Mindestens einer der "tableOptions"-Parameter besitzt einen Wert, der nicht zulässig ist. Ãœberprüfen Sie die Werte genau, und versuchen Sie es erneut.';Strings.OfficeOM.L_OverwriteWorksheetData="Fehler im festgelegten Vorgang, weil das bereitgestellte Datenobjekt Daten überschreiben oder verschieben würde.";Strings.OfficeOM.L_ColIndexOutOfRange="Der Wert für den Spaltenindex liegt außerhalb des zulässigen Bereichs. Verwenden Sie einen Wert (0 oder höher), der kleiner als die Anzahl der Spalten ist.";Strings.OfficeOM.L_OutOfRange="Außerhalb des zulässigen Bereichs";Strings.OfficeOM.L_AppNameNotExist="Add-In-Name für {0} ist nicht vorhanden.";Strings.OfficeOM.L_TooManyIncompleteRequests="Warten Sie, bis der vorherige Aufruf abgeschlossen ist.";Strings.OfficeOM.L_TooManyArguments="zu viele Argumente";Strings.OfficeOM.L_InvalidGetStartRowColumn="Die angegebenen startRow- oder startColumn-Werte sind ungültig.";Strings.OfficeOM.L_MemoryLimit="Arbeitsspeichergrenze überschritten";Strings.OfficeOM.L_ValueNotLoaded='Der Wert des Ergebnisobjekts wurde noch nicht geladen. Rufen Sie vor dem Lesen der "value"-Eigenschaft "context.sync()" für den zugeordneten Anforderungskontext auf.';Strings.OfficeOM.L_SetDataParametersConflict="Die angegebenen Parameter stehen in Konflikt.";Strings.OfficeOM.L_RowIndexOutOfRange="Der Wert für den Zeilenindex liegt außerhalb des zulässigen Bereichs. Verwenden Sie einen Wert (0 oder höher), der kleiner als die Anzahl der Zeilen ist.";Strings.OfficeOM.L_HostError="Hostfehler";Strings.OfficeOM.L_SSOConnectionLostErrorMessage="A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones.";Strings.OfficeOM.L_InvalidBindingOperation="Ungültiger Bindungsvorgang.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Auswahlgrenzwert erreicht.";Strings.OfficeOM.L_InvalidArgument='Das Argument "{0}" funktioniert in dieser Situation nicht, fehlt oder hat nicht das richtige Format.';Strings.OfficeOM.L_InvalidSelectionForBindingType="Eine Bindung kann nicht mit der aktuellen Auswahl und dem angegebenen Bindungstyp erstellt werden.";Strings.OfficeOM.L_CustomXmlError="Benutzerdefiniertes XML-Fehler.";Strings.OfficeOM.L_ElementMissing="Die Tabellenzelle konnte nicht formatiert werden, weil einige Parameterwerte fehlen. Ãœberprüfen Sie die Werte genau, und versuchen Sie es erneut.";Strings.OfficeOM.L_OperationNotSupported="Dieser Vorgang wird nicht unterstützt.";Strings.OfficeOM.L_BindingNotExist="Die angegebene Bindung ist nicht vorhanden.";Strings.OfficeOM.L_InvalidDataFormat="Das Format des angegebenen Datenobjekts ist ungültig.";Strings.OfficeOM.L_EventHandlerNotExist="Der angegebene Ereignishandler für diese Bindung wurde nicht gefunden.";Strings.OfficeOM.L_SelectionCannotBound="Eine Bindung an die aktuelle Auswahl ist nicht möglich.";Strings.OfficeOM.L_UnknownBindingType="Der Bindungstyp wird nicht unterstützt.";Strings.OfficeOM.L_FormattingReminder="Formatierungserinnerung";Strings.OfficeOM.L_UnsupportedEnumeration="Nicht unterstützte Aufzählung";Strings.OfficeOM.L_CustomFunctionDefinitionMissing="Eine Eigenschaft mit diesem Namen, die die Definition der Funktion darstellt, muss in Excel.CustomFunctions vorhanden sein.";Strings.OfficeOM.L_InvalidCellsValue='Mindestens einer der "cells"-Parameter besitzt einen Wert, der nicht zulässig ist. Ãœberprüfen Sie die Werte genau, und versuchen Sie es erneut.';Strings.OfficeOM.L_InvalidRequestContext="Das Objekt kann nicht in verschiedenen Anforderungskontexten verwendet werden.";Strings.OfficeOM.L_SSOClientErrorMessage="Unerwarteter Fehler im Client.";Strings.OfficeOM.L_ShuttingDown="Vorgangsfehler, weil die Daten auf dem Server nicht aktuell sind.";Strings.OfficeOM.L_InvalidNode="Ungültiger Knoten.";Strings.OfficeOM.L_CoercionTypeNotSupported="Der angegebene Koersionstyp wird nicht unterstützt.";Strings.OfficeOM.L_APINotSupported="Nicht unterstützte API.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory="Dieses Add-In unterstützt keine Benutzerzustimmung.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Ungültige Sitzung oder Timeout.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Die angegebenen rowCount- oder columnCount-Werte sind ungültig.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="Ihre Office Online-Sitzung ist abgelaufen oder ungültig. Um fortzufahren, aktualisieren Sie die Seite.";Strings.OfficeOM.L_InvalidFormatValue='Mindestens einer der "format"-Parameter besitzt einen Wert, der nicht zulässig ist. Ãœberprüfen Sie die Werte genau, und versuchen Sie es erneut.';Strings.OfficeOM.L_InvalidAPICall="Ungültiger API-Aufruf.";Strings.OfficeOM.L_SSOConnectionLostError="A connection was lost during the sign in process.";Strings.OfficeOM.L_DialogNavigateError="Dialognavigationsfehler";Strings.OfficeOM.L_InvalidSSOAddinMessage="Die Identitäts-API wird für dieses Add-In nicht unterstützt.";Strings.OfficeOM.L_UserAborted="Der Benutzer hat die Zustimmungsanfrage abgebrochen.";Strings.OfficeOM.L_SliceSizeNotSupported="Die angegebene Datenschnittgröße wird nicht unterstützt.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Die Daten sind veraltet. Rufen Sie das Objekt noch mal ab.";Strings.OfficeOM.L_DataReadError="Fehler beim Lesen von Daten.";Strings.OfficeOM.L_BindingToMultipleSelection="Eine nicht zusammenhängende Auswahl wird nicht unterstützt.";Strings.OfficeOM.L_PropertyNotLoaded='Die Eigenschaft "{0}" ist nicht verfügbar. Rufen Sie vor dem Lesen des Werts der Eigenschaft die load-Methode für das enthaltende Objekt auf, und rufen Sie "context.sync()" für den zugeordneten Anforderungskontext auf.';Strings.OfficeOM.L_EventRegistrationError="Ereignis-Registrierungsfehler";Strings.OfficeOM.L_DialogRequireHTTPS="Das HTTP-Protokoll wird nicht unterstützt. Verwenden Sie stattdessen HTTPS.";Strings.OfficeOM.L_InvalidResourceUrl="Ungültige Anwendungsressourcen-URL angegeben.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Daten sind nicht aktuell.";Strings.OfficeOM.L_NotImplemented="Funktion {0} ist nicht implementiert.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty='Versuch, die schreibgeschützte Eigenschaft "{0}" festzulegen.';Strings.OfficeOM.L_NotSupported='Die Funktion "{0}" wird nicht unterstützt.';Strings.OfficeOM.L_InvalidBindingError="Fehler: Ungültige Bindung.";Strings.OfficeOM.L_NetworkProblem="Netzwerkproblem";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage="Vorgangsfehler, weil dieses Add-In keine Benutzerzustimmung in dieser Kategorie unterstützt.";Strings.OfficeOM.L_InitializeNotReady="Office.js wurde noch nicht vollständig geladen. Versuchen Sie es bitte später erneut, oder stellen Sie sicher, dass Ihr Initialisierungscode der Office.initialize-Funktion hinzugefügt wird.";Strings.OfficeOM.L_MissingParameter="Fehlender Parameter";Strings.OfficeOM.L_EventHandlerAdditionFailed="Fehler beim Hinzufügen des Ereignishandlers.";Strings.OfficeOM.L_InvalidColumnsForBinding="Die angegebenen Spalten sind ungültig.";Strings.OfficeOM.L_CallbackNotAFunction='Der Rückruf muss vom Typ "Funktion" sein, war aber vom Typ "{0}".';Strings.OfficeOM.L_BindingCreationError="Fehler beim Erstellen der Bindung.";Strings.OfficeOM.L_CustomFunctionImplementationMissing='Die Eigenschaft mit diesem Namen in Excel.CustomFunctions, die die Definition der Funktion darstellt, muss eine "call"-Eigenschaft enthalten, die die Funktion implementiert.';Strings.OfficeOM.L_InvalidObjectPath='Der Objektpfad "{0}" funktioniert nicht für den von Ihnen versuchten Vorgang. Wenn Sie das Objekt über mehrere Aufrufe von "context.sync" und außerhalb der sequenziellen Ausführung eines ".run"-Batchs verwenden, verwenden Sie die Methoden "context.trackedObjects.add()" und "context.trackedObjects.remove()", um die Lebensdauer des Objekts zu verwalten.';Strings.OfficeOM.L_SettingNameNotExist="Der angegebene Einstellungsname ist nicht vorhanden.";Strings.OfficeOM.L_InvalidValue="Ungültiger Wert";Strings.OfficeOM.L_DataWriteReminder="Erinnerung zum Schreiben von Daten";Strings.OfficeOM.L_ApiNotFoundDetails='Die Methode oder Eigenschaft "{0}" ist Teil des "{1}"-Anforderungssatzes, der in Ihrer Version von {2} nicht verfügbar ist.';Strings.OfficeOM.L_UserAbortedMessage="Der Benutzer hat den Add-In-Berechtigungen nicht zugestimmt.";Strings.OfficeOM.L_NotSupportedEventType='Der angegebenen Ereignistyp "{0}" wird nicht unterstützt.';Strings.OfficeOM.L_PropertyDoesNotExist='Die Eigenschaft "{0}" ist für das Objekt nicht vorhanden.';Strings.OfficeOM.L_CannotWriteToSelection="In die aktuelle Auswahl kann nicht geschrieben werden.";Strings.OfficeOM.L_InValidOptionalArgument="ungültiges optionales Argument";Strings.OfficeOM.L_FormatValueOutOfRange="Der Wert liegt außerhalb des zulässigen Bereichs.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath beschränkt die Auswahl auf 1024 Elemente.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Die aktuelle Auswahl ist mit dem angegebenen Koersionstyp nicht kompatibel.";Strings.OfficeOM.L_MultipleNamedItemFound="Es wurden mehrere Objekte mit dem gleichen Namen gefunden.";Strings.OfficeOM.L_DataNotMatchCoercionType="Der Typ des angegebenen Datenobjekts ist mit der aktuellen Auswahl nicht kompatibel.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="Die Aufzählung wird in der aktuellen Hostanwendung nicht unterstützt.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Bitte treffen Sie eine Auswahl.";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Ungültige Eingabeargumente.";Strings.OfficeOM.L_BrowserAPINotSupported="Dieser Browser unterstützt die angeforderte API nicht.";Strings.OfficeOM.L_CustomFunctionNameContainsBadChars="Der Funktionsname darf nur Buchstaben, Zahlen, Unterstriche und Punkte enthalten.";Strings.OfficeOM.L_DataNotMatchBindingType="Das angegebene Datenobjekt ist mit dem Bindungstyp nicht kompatibel.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Der angegebene Bindungstyp ist mit dem angegebenen benannten Element nicht kompatibel.";Strings.OfficeOM.L_ConnectionFailureWithDetails="Fehler der Anforderung mit Statuscode {0}, Fehlercode {1} und der folgenden Fehlermeldung: {2}";Strings.OfficeOM.L_InvalidCoercion="Ungültiger Koersionstyp.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported='Koordinatenparameter können nicht mit dem Koersionstyp "Tabelle" verwendet werden, wenn die Tabelle verbundene Zellen enthält.';Strings.OfficeOM.L_UserClickIgnore="Der Benutzer hat sich entschlossen, das Dialogfeld zu ignorieren.";Strings.OfficeOM.L_DocumentReadOnly="Der angeforderte Vorgang ist im aktuellen Dokumentmodus nicht zulässig.";Strings.OfficeOM.L_FileTypeNotSupported="Der angegebene Dateityp wird nicht unterstützt.";Strings.OfficeOM.L_MissingRequiredArguments="fehlen einige erforderliche Argumente";Strings.OfficeOM.L_InvalidDataObject="Ungültiges Datenobjekt.";Strings.OfficeOM.L_PermissionDenied="Zugriff verweigert.";Strings.OfficeOM.L_NotSupportedBindingType='Der angegebene Bindungstyp "{0}" wird nicht unterstützt.';Strings.OfficeOM.L_OsfControlTypeNotSupported="Der OsfControl-Typ wird nicht unterstützt.";Strings.OfficeOM.L_UserNotSignedIn="Kein Benutzer ist bei Office angemeldet.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Die Anwendung {0} ist nicht vorhanden. Microsoft.Office.WebExtension.initialize(Ursache) wird nicht aufgerufen.";Strings.OfficeOM.L_InvalidSetRows="Die angegebenen Zeilen sind ungültig.";Strings.OfficeOM.L_InvalidReadForBlankRow="Die angegebene Zeile ist leer.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Hinweis: Die von einem Formatierungs-API-Aufruf festgelegten Formatierungssätze sollten unter 100 liegen.";Strings.OfficeOM.L_NewWindowCrossZone='Die Sicherheitseinstellungen Ihres Browsers verhindern, dass wir ein Dialogfeld öffnen. Verwenden Sie einen anderen Browser oder {0}, sodass sich "{1}" und die in Ihrer Adressleiste angezeigte Domäne in der selben Sicherheitszone befinden.';Strings.OfficeOM.L_SettingsStaleError="Fehler: Veraltete Einstellungen.";Strings.OfficeOM.L_InvalidSetStartRowColumn="Die angegebenen startRow- oder startColumn-Werte sind ungültig.";Strings.OfficeOM.L_BadSelectorString="Die an den Selektor übergebene Zeichenfolge ist nicht ordnungsgemäß formatiert oder wird nicht unterstützt.";Strings.OfficeOM.L_DataStale="Nicht aktuelle Daten";Strings.OfficeOM.L_SettingsAreStale="Einstellungen konnten nicht gespeichert werden, da sie nicht aktuell sind.";Strings.OfficeOM.L_UnsupportedUserIdentity="Der Benutzeridentitätstyp wird nicht unterstützt.";Strings.OfficeOM.L_SaveSettingsError="Fehler beim Speichern von Einstellungen.";Strings.OfficeOM.L_RedundantCallbackSpecification="Ein Rückruf kann nicht sowohl in der Argumenteliste als auch in einem optionalen Objekt angegeben werden.";Strings.OfficeOM.L_TooManyOptionalFunction="mehrere optionale Funktionen in der Parameterliste" \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/de-de/outlook_strings.debug.js b/node_modules/@microsoft/office-js/dist/de-de/outlook_strings.debug.js index f05517d..5cff474 100644 --- a/node_modules/@microsoft/office-js/dist/de-de/outlook_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/de-de/outlook_strings.debug.js @@ -1,34 +1,35 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("_u"); _u.ExtensibilityStrings = function() { }; _u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings"); -_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "Die Anlage-ID war ungültig."; -_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "Das ausgewählte Element wurde geändert."; -_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "Der Benutzer hat die Position des Cursors geändert, während die Daten eingefügt wurden."; -_u.ExtensibilityStrings.l_InvalidDate_Text = "Die Eingabe kann nicht zu einem gültigen Datum aufgelöst werden."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "Für den Aufruf der Methode '{0}' sind erhöhte Rechte erforderlich."; -_u.ExtensibilityStrings.l_InternalFormatError_Text = "Interner Formatfehler"; -_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Mindestens eine der angegebenen E-Mail-Adressen ist zu lang."; -_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Es wurden keine gültigen Empfänger angegeben."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Für den Zugriff auf geschützte Elemente des JavaScript-APIs für Office sind erhöhte Rechte erforderlich."; -_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "Der Pfad zur Anlage war ungültig."; -_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Die Anlage kann dem Element nicht hinzugefügt werden."; -_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Die Anforderung überschreitet die Größenbeschränkung von 1 MB. Ändern Sie Ihre EWS-Anforderung."; -_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Die Anlage kann nicht hinzugefügt werden, da sie zu groß ist."; -_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "Der Benutzer hat die Anlage entfernt, bevor der Upload abgeschlossen wurde."; _u.ExtensibilityStrings.l_InvalidEventDates_Text = "Das Ende liegt vor dem Beginn."; +_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Die Anlage kann nicht hinzugefügt werden, da sie zu groß ist."; _u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Anlagefehler"; -_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Die Anlage kann nicht gelöscht werden, da keine Anlage mit diesem Anlageindex gefunden wurde."; +_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "Der Benutzer hat die Anlage entfernt, bevor der Upload abgeschlossen wurde."; +_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "Der Benutzer hat die Position des Cursors geändert, während die Daten eingefügt wurden."; +_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "Das ausgewählte Element wurde geändert."; +_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Der angegebene Parameter weist nicht das erwartete Format auf."; _u.ExtensibilityStrings.l_InternalProtocolError_Text = "Interner Protokollfehler: '{0}'."; +_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "Fehler bei der HTML-Bereinigung"; +_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Die Anlage kann dem Element nicht hinzugefügt werden."; +_u.ExtensibilityStrings.l_InvalidDate_Text = "Die Eingabe kann nicht zu einem gültigen Datum aufgelöst werden."; +_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Es wurden keine gültigen Empfänger angegeben."; +_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Fehler beim Schreiben von Daten"; _u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Mindestens einer der angegebenen Anzeigenamen ist zu lang."; +_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "Die Anlage-ID war ungültig."; +_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "Für den Aufruf der Methode '{0}' sind erhöhte Rechte erforderlich."; +_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Die Anlage kann nicht aus dem Element gelöscht werden."; +_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Für den Zugriff auf geschützte Elemente des JavaScript-APIs für Office sind erhöhte Rechte erforderlich."; +_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Die Gesamtzahl der Empfänger im Feld kann {0} nicht überschreiten."; _u.ExtensibilityStrings.l_InvalidEndTime_Text = "Der Endzeitpunkt kann nicht vor dem Anfangszeitpunkt liegen."; _u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Anlagen können nicht hinzugefügt werden, da die Nachricht bereits die maximal zulässige Anzahl an Anlagen aufweist."; -_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Die Anlage kann nicht aus dem Element gelöscht werden."; -_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "Fehler bei der HTML-Bereinigung"; -_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Fehler beim Schreiben von Daten"; -_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Der angegebene Parameter weist nicht das erwartete Format auf."; _u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Anlagen können nicht hinzugefügt werden, während die vollständige Antwort oder Weiterleitung vom Server abgerufen wird."; -_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Die Gesamtzahl der Empfänger im Feld kann {0} nicht überschreiten."; -_u.ExtensibilityStrings.l_OffsetNotfound_Text = "Für diesen Zeitstempel wurde kein Offset gefunden." +_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Die Anforderung überschreitet die Größenbeschränkung von 1 MB. Ändern Sie Ihre EWS-Anforderung."; +_u.ExtensibilityStrings.l_OffsetNotfound_Text = "Für diesen Zeitstempel wurde kein Offset gefunden."; +_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "Der Pfad zur Anlage war ungültig."; +_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Mindestens eine der angegebenen E-Mail-Adressen ist zu lang."; +_u.ExtensibilityStrings.l_InternalFormatError_Text = "Interner Formatfehler"; +_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Die Anlage kann nicht gelöscht werden, da keine Anlage mit diesem Anlageindex gefunden wurde." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/de-de/outlook_strings.js b/node_modules/@microsoft/office-js/dist/de-de/outlook_strings.js index 3c95250..81502e6 100644 --- a/node_modules/@microsoft/office-js/dist/de-de/outlook_strings.js +++ b/node_modules/@microsoft/office-js/dist/de-de/outlook_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="Die Anlage-ID war ungültig.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Das ausgewählte Element wurde geändert.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="Der Benutzer hat die Position des Cursors geändert, während die Daten eingefügt wurden.";_u.ExtensibilityStrings.l_InvalidDate_Text="Die Eingabe kann nicht zu einem gültigen Datum aufgelöst werden.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Für den Aufruf der Methode '{0}' sind erhöhte Rechte erforderlich.";_u.ExtensibilityStrings.l_InternalFormatError_Text="Interner Formatfehler";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Mindestens eine der angegebenen E-Mail-Adressen ist zu lang.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Es wurden keine gültigen Empfänger angegeben.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Für den Zugriff auf geschützte Elemente des JavaScript-APIs für Office sind erhöhte Rechte erforderlich.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="Der Pfad zur Anlage war ungültig.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Die Anlage kann dem Element nicht hinzugefügt werden.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Die Anforderung überschreitet die Größenbeschränkung von 1 MB. Ändern Sie Ihre EWS-Anforderung.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Die Anlage kann nicht hinzugefügt werden, da sie zu groß ist.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="Der Benutzer hat die Anlage entfernt, bevor der Upload abgeschlossen wurde.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="Das Ende liegt vor dem Beginn.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Anlagefehler";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Die Anlage kann nicht gelöscht werden, da keine Anlage mit diesem Anlageindex gefunden wurde.";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Interner Protokollfehler: '{0}'.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Mindestens einer der angegebenen Anzeigenamen ist zu lang.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="Der Endzeitpunkt kann nicht vor dem Anfangszeitpunkt liegen.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Anlagen können nicht hinzugefügt werden, da die Nachricht bereits die maximal zulässige Anzahl an Anlagen aufweist.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Die Anlage kann nicht aus dem Element gelöscht werden.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="Fehler bei der HTML-Bereinigung";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Fehler beim Schreiben von Daten";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Der angegebene Parameter weist nicht das erwartete Format auf.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Anlagen können nicht hinzugefügt werden, während die vollständige Antwort oder Weiterleitung vom Server abgerufen wird.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Die Gesamtzahl der Empfänger im Feld kann {0} nicht überschreiten.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Für diesen Zeitstempel wurde kein Offset gefunden." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_InvalidEventDates_Text="Das Ende liegt vor dem Beginn.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Die Anlage kann nicht hinzugefügt werden, da sie zu groß ist.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Anlagefehler";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="Der Benutzer hat die Anlage entfernt, bevor der Upload abgeschlossen wurde.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="Der Benutzer hat die Position des Cursors geändert, während die Daten eingefügt wurden.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Das ausgewählte Element wurde geändert.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Der angegebene Parameter weist nicht das erwartete Format auf.";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Interner Protokollfehler: '{0}'.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="Fehler bei der HTML-Bereinigung";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Die Anlage kann dem Element nicht hinzugefügt werden.";_u.ExtensibilityStrings.l_InvalidDate_Text="Die Eingabe kann nicht zu einem gültigen Datum aufgelöst werden.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Es wurden keine gültigen Empfänger angegeben.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Fehler beim Schreiben von Daten";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Mindestens einer der angegebenen Anzeigenamen ist zu lang.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="Die Anlage-ID war ungültig.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Für den Aufruf der Methode '{0}' sind erhöhte Rechte erforderlich.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Die Anlage kann nicht aus dem Element gelöscht werden.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Für den Zugriff auf geschützte Elemente des JavaScript-APIs für Office sind erhöhte Rechte erforderlich.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Die Gesamtzahl der Empfänger im Feld kann {0} nicht überschreiten.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="Der Endzeitpunkt kann nicht vor dem Anfangszeitpunkt liegen.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Anlagen können nicht hinzugefügt werden, da die Nachricht bereits die maximal zulässige Anzahl an Anlagen aufweist.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Anlagen können nicht hinzugefügt werden, während die vollständige Antwort oder Weiterleitung vom Server abgerufen wird.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Die Anforderung überschreitet die Größenbeschränkung von 1 MB. Ändern Sie Ihre EWS-Anforderung.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Für diesen Zeitstempel wurde kein Offset gefunden.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="Der Pfad zur Anlage war ungültig.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Mindestens eine der angegebenen E-Mail-Adressen ist zu lang.";_u.ExtensibilityStrings.l_InternalFormatError_Text="Interner Formatfehler";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Die Anlage kann nicht gelöscht werden, da keine Anlage mit diesem Anlageindex gefunden wurde." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/el-gr/office_strings.debug.js b/node_modules/@microsoft/office-js/dist/el-gr/office_strings.debug.js index fde60fc..137793a 100644 --- a/node_modules/@microsoft/office-js/dist/el-gr/office_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/el-gr/office_strings.debug.js @@ -1,179 +1,190 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("Strings"); Strings.OfficeOM = function() { }; Strings.OfficeOM.registerClass("Strings.OfficeOM"); -Strings.OfficeOM.L_SSOServerError = "ΠαÏουσιάστηκε σφάλμα στην υπηÏεσία παÏοχής ελέγχου ταυτότητας."; -Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Η λειτουÏγία δεν υποστηÏίζεται σε αυτόν τον Ï„Ïπο σÏνδεσης."; -Strings.OfficeOM.L_InvalidApiCallInContext = "Μη έγκυÏη κλήση API στο Ï„Ïέχον πεÏιβάλλον."; -Strings.OfficeOM.L_InternalError = "ΕσωτεÏικό σφάλμα"; -Strings.OfficeOM.L_APICallFailed = "Απέτυχε η κλήση API"; -Strings.OfficeOM.L_DataNotMatchBindingSize = "Το αντικείμενο δεδομένων που δόθηκε δεν αντιστοιχεί στο μέγεθος της Ï„Ïέχουσας επιλογής."; -Strings.OfficeOM.L_NotSupportedEventType = "Ο καθοÏισμένος Ï„Ïπος συμβάντος {0} δεν υποστηÏίζεται."; +Strings.OfficeOM.L_AppNameNotExist = "Το όνομα Ï€Ïοσθέτου για {0} δεν υπάÏχει."; Strings.OfficeOM.L_FormatValueOutOfRange = "Η τιμή είναι εκτός της επιτÏεπόμενης πεÏιοχής."; -Strings.OfficeOM.L_DialogAddressNotTrusted = "Ο τομέας του URL δεν πεÏιλαμβάνεται στο στοιχείο AppDomains στη διακήÏυξη."; -Strings.OfficeOM.L_InvalidValue = "Μη έγκυÏη τιμή"; -Strings.OfficeOM.L_EventHandlerAdditionFailed = "Απέτυχε η Ï€Ïοσθήκη του Ï€ÏογÏάμματος χειÏÎ¹ÏƒÎ¼Î¿Ï ÏƒÏ…Î¼Î²Î¬Î½Ï„Ï‰Î½."; -Strings.OfficeOM.L_InvalidParameters = "Η συνάÏτηση {0} έχει μη έγκυÏες παÏαμέτÏους."; -Strings.OfficeOM.L_GetDataParametersConflict = "Οι καθοÏισμένες παÏάμετÏοι παÏουσιάζουν διένεξη."; -Strings.OfficeOM.L_SSOClientError = "ΠαÏουσιάστηκε σφάλμα στην αίτηση ελέγχου ταυτότητας από το Office."; +Strings.OfficeOM.L_SpecifiedIdNotExist = "Το καθοÏισμένο αναγνωÏιστικό δεν υπάÏχει."; +Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Μη έγκυÏα οÏίσματα εισόδου."; +Strings.OfficeOM.L_UnsupportedDataObject = "Ο Ï„Ïπος του αντικειμένου δεδομένων που δόθηκε δεν υποστηÏίζεται."; +Strings.OfficeOM.L_InvalidObjectPath = "Η διαδÏομή αντικειμένου {0} δεν λειτουÏγεί για την ενέÏγεια που Ï€Ïοσπαθείτε να κάνετε. Αν χÏησιμοποιείτε το αντικείμενο σε πολλές κλήσεις context.sync και εκτός της σειÏιακής εκτέλεσης μιας δέσμης .run, χÏησιμοποιήστε τις μεθόδους context.trackedObjects.add() και context.trackedObjects.remove() για να διαχειÏιστείτε τη διάÏκεια ζωής του αντικειμένου."; +Strings.OfficeOM.L_InvalidResourceUrl = "Δόθηκε μη έγκυÏη διεÏθυνση Url πόÏου εφαÏμογής."; Strings.OfficeOM.L_DataStale = "Μη ενημεÏωμένα δεδομένα"; -Strings.OfficeOM.L_InvalidTableOptionValue = "Μία ή πεÏισσότεÏες από τις παÏαμέτÏους tableOptions έχουν τιμές που δεν επιτÏέπονται. Επαναλάβετε τον έλεγχο των τιμών και Ï€Ïοσπαθήστε ξανά."; -Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = 'Γίνεται Ï€Ïοσπάθεια να οÏιστεί η ιδιότητα μόνο για ανάγνωση "{0}".'; -Strings.OfficeOM.L_InvalidBinding = "Μη έγκυÏη σÏνδεση"; -Strings.OfficeOM.L_UserAbortedMessage = "Ο χÏήστης δεν εκχώÏησε τα δικαιώματα για το Ï€Ïόσθετο."; -Strings.OfficeOM.L_BindingNotExist = "Δεν υπάÏχει η καθοÏισμένη σÏνδεση."; -Strings.OfficeOM.L_CustomXmlExceedQuotaName = "ΣυμπλήÏωση οÏίου επιλογής"; -Strings.OfficeOM.L_ShowWindowDialogNotification = "Το Ï€Ïόσθετο {0} θέλει να εμφανίσει ένα νέο παÏάθυÏο."; Strings.OfficeOM.L_BindingToMultipleSelection = "Οι μη συνεχόμενες επιλογές δεν υποστηÏίζονται."; -Strings.OfficeOM.L_InvalidAPICall = "Μη έγκυÏη κλήση API"; -Strings.OfficeOM.L_NotSupportedBindingType = "Ο καθοÏισμένος Ï„Ïπος σÏνδεσης {0} δεν υποστηÏίζεται."; -Strings.OfficeOM.L_InvalidCoercion = "Μη έγκυÏος Ï„Ïπος αναγκαστικής μετατÏοπής"; -Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Οι παÏάμετÏοι συντεταγμένων δεν είναι δυνατό να χÏησιμοποιηθοÏν με πίνακα Ï„Ïπου αναγκαστικής μετατÏοπής όταν ο πίνακας πεÏιέχει συγχωνευμένα κελιά."; Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "Το XPath πεÏιοÏίζει την επιλογή στα 1024 στοιχεία."; -Strings.OfficeOM.L_InvalidBindingError = "ΠαÏουσιάστηκε σφάλμα μη έγκυÏης σÏνδεσης"; -Strings.OfficeOM.L_UnsupportedEnumeration = "Μη υποστηÏιζόμενη απαÏίθμηση"; -Strings.OfficeOM.L_FunctionCallFailed = "Η κλήση συνάÏτησης {0} απέτυχε, κωδικός σφάλματος: {1}."; -Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Δεν υποστηÏίζεται ο Ï„Ïπος ταυτότητας του χÏήστη."; -Strings.OfficeOM.L_PropertyDoesNotExist = 'Η ιδιότητα "{0}" δεν υπάÏχει στο αντικείμενο.'; +Strings.OfficeOM.L_InitializeNotReady = "Η φόÏτωση του Office.js δεν έχει ολοκληÏωθεί ακόμη. ΠÏοσπαθήστε ξανά αÏγότεÏα ή Ï€Ïοσθέστε τον κώδικα Ï€Ïοετοιμασίας στη συνάÏτηση Office.initialize."; +Strings.OfficeOM.L_CoercionTypeNotSupported = "Ο καθοÏισμένος Ï„Ïπος αναγκαστικής μετατÏοπής δεν υποστηÏίζεται."; +Strings.OfficeOM.L_DataWriteError = "Σφάλμα εγγÏαφής δεδομένων"; +Strings.OfficeOM.L_BadSelectorString = "Η συμβολοσειÏά που πεÏνά στον επιλογέα δεν είναι σωστά διαμοÏφωμένη ή δεν υποστηÏίζεται."; +Strings.OfficeOM.L_SetDataIsTooLarge = "Το καθοÏισμένο σÏνολο δεδομένων είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î¿."; +Strings.OfficeOM.L_MultipleNamedItemFound = "Î’Ïέθηκαν πολλά αντικείμενα με το ίδιο όνομα."; +Strings.OfficeOM.L_NotImplemented = "Η λειτουÏγία {0} δεν έχει υλοποιηθεί."; +Strings.OfficeOM.L_CustomXmlExceedQuotaName = "ΣυμπλήÏωση οÏίου επιλογής"; +Strings.OfficeOM.L_ConnectionFailureWithStatus = "Η αίτηση απέτυχε με κωδικό κατάστασης {0}."; +Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Οι πεÏιοÏισμοί του Ï€ÏογÏάμματος πεÏιήγησης δεν επιτÏέπουν τη δημιουÏγία του παÏαθÏÏου διαλόγου. Ο τομέας του παÏαθÏÏου διαλόγου και ο τομέας του κεντÏÎ¹ÎºÎ¿Ï Ï…Ï€Î¿Î»Î¿Î³Î¹ÏƒÏ„Î® του Ï€Ïόσθετου δεν βÏίσκονται στην ίδια ζώνη ασφαλείας."; +Strings.OfficeOM.L_DataReadError = "Σφάλμα ανάγνωσης δεδομένων"; +Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Ο καθοÏισμένος Ï„Ïπος αναγκαστικής μετατÏοπής δεν είναι συμβατός με αυτόν τον Ï„Ïπο σÏνδεσης."; +Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Κλήση closeAsync στο Ï„Ïέχον αÏχείο Ï€Ïιν από την ανάκτηση άλλου."; +Strings.OfficeOM.L_EventHandlerAdditionFailed = "Απέτυχε η Ï€Ïοσθήκη του Ï€ÏογÏάμματος χειÏÎ¹ÏƒÎ¼Î¿Ï ÏƒÏ…Î¼Î²Î¬Î½Ï„Ï‰Î½."; Strings.OfficeOM.L_OsfControlTypeNotSupported = "Ο Ï„Ïπος OsfControl δεν υποστηÏίζεται."; -Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Ο καθοÏισμένος Ï„Ïπος σÏνδεσης δεν είναι συμβατός με το καθοÏισμένο στοιχείο που δόθηκε."; +Strings.OfficeOM.L_SettingsCannotSave = "Δεν ήταν δυνατή η αποθήκευση των Ïυθμίσεων."; +Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "ΠαÏάβλεψη"; Strings.OfficeOM.L_InvalidSetColumns = "Οι καθοÏισμένες στήλες δεν είναι έγκυÏες."; -Strings.OfficeOM.L_RequestTokenUnavailable = "Αυτό το API έχει Ïυθμιστεί για τη μείωση της συχνότητας κλήσης."; -Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Οι πεÏιοÏισμοί του Ï€ÏογÏάμματος πεÏιήγησης δεν επιτÏέπουν τη δημιουÏγία του παÏαθÏÏου διαλόγου. Ο τομέας του παÏαθÏÏου διαλόγου και ο τομέας του κεντÏÎ¹ÎºÎ¿Ï Ï…Ï€Î¿Î»Î¿Î³Î¹ÏƒÏ„Î® του Ï€Ïόσθετου δεν βÏίσκονται στην ίδια ζώνη ασφαλείας."; -Strings.OfficeOM.L_InvalidGetRows = "Οι καθοÏισμένες γÏαμμές δεν είναι έγκυÏες."; -Strings.OfficeOM.L_DataNotMatchCoercionType = "Ο Ï„Ïπος του καθοÏισμένου αντικειμένου δεδομένων δεν είναι συμβατός με την Ï„Ïέχουσα επιλογή."; -Strings.OfficeOM.L_UserClickIgnore = "Ο χÏήστης επέλεξε να παÏαβλέψει το παÏάθυÏο διαλόγου."; Strings.OfficeOM.L_InvalidNode = "Μη έγκυÏος κόμβος"; -Strings.OfficeOM.L_InvalidSelectionForBindingType = "Δεν είναι δυνατή η δημιουÏγία σÏνδεσης με την Ï„Ïέχουσα επιλογή και τον Ï„Ïπο σÏνδεσης που έχει οÏιστεί."; -Strings.OfficeOM.L_ValueNotLoaded = "Η τιμή του αντικειμένου αποτελέσματος δεν έχει φοÏτωθεί ακόμη. ΠÏιν από την ανάγνωση της ιδιότητας τιμής, καλέστε το context.sync() στο συσχετισμένο πεÏιβάλλον αίτησης."; -Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "ΠαÏάβλεψη"; -Strings.OfficeOM.L_SettingsStaleError = "Σφάλμα μη ενημεÏωμένων Ïυθμίσεων"; -Strings.OfficeOM.L_CannotNavigateTo = "Το αντικείμενο βÏίσκεται σε θέση όπου δεν υποστηÏίζεται η πεÏιήγηση."; -Strings.OfficeOM.L_InvalidBindingOperation = "Μη έγκυÏη λειτουÏγία σÏνδεσης"; -Strings.OfficeOM.L_ConnectionFailureWithStatus = "Η αίτηση απέτυχε με κωδικό κατάστασης {0}."; -Strings.OfficeOM.L_ElementMissing = "Δεν μποÏέσαμε να μοÏφοποιήσουμε το κελί πίνακα, επειδή λείπουν οÏισμένες τιμές παÏαμέτÏων. Επαναλάβετε τον έλεγχο των παÏαμέτÏων και Ï€Ïοσπαθήστε ξανά."; -Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Ο καθοÏισμένος Ï„Ïπος αναγκαστικής μετατÏοπής δεν είναι συμβατός με αυτόν τον Ï„Ïπο σÏνδεσης."; -Strings.OfficeOM.L_HostError = "Σφάλμα υποδοχής"; -Strings.OfficeOM.L_OverwriteWorksheetData = "Η λειτουÏγία οÏÎ¹ÏƒÎ¼Î¿Ï Î±Ï€Î­Ï„Ï…Ï‡Îµ επειδή το αντικείμενο δεδομένων που δόθηκε θα αντικαταστήσει ή θα μετακινήσει δεδομένα."; -Strings.OfficeOM.L_GetDataIsTooLarge = "Το σÏνολο δεδομένων που ζητήθηκε είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î¿."; -Strings.OfficeOM.L_TooManyOptionalObjects = "πολλά Ï€ÏοαιÏετικά αντικείμενα στη λίστα παÏαμέτÏων"; +Strings.OfficeOM.L_BindingNotExist = "Δεν υπάÏχει η καθοÏισμένη σÏνδεση."; +Strings.OfficeOM.L_NotSupportedBindingType = "Ο καθοÏισμένος Ï„Ïπος σÏνδεσης {0} δεν υποστηÏίζεται."; +Strings.OfficeOM.L_DataNotMatchCoercionType = "Ο Ï„Ïπος του καθοÏισμένου αντικειμένου δεδομένων δεν είναι συμβατός με την Ï„Ïέχουσα επιλογή."; +Strings.OfficeOM.L_TooManyIncompleteRequests = "ΠεÏιμένετε μέχÏι να ολοκληÏωθεί η Ï€ÏοηγοÏμενη κλήση."; +Strings.OfficeOM.L_DataWriteReminder = "ΥπενθÏμιση εγγÏαφής δεδομένων"; +Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Τα δεδομένα δεν είναι ενημεÏωμένα. Ανακτήσετε ξανά το αντικείμενο."; +Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Ο καθοÏισμένος Ï„Ïπος σÏνδεσης δεν είναι συμβατός με το καθοÏισμένο στοιχείο που δόθηκε."; +Strings.OfficeOM.L_FunctionCallFailed = "Η κλήση συνάÏτησης {0} απέτυχε, κωδικός σφάλματος: {1}."; +Strings.OfficeOM.L_DisplayDialogError = "Εμφάνιση σφάλματος παÏαθÏÏου διαλόγου"; Strings.OfficeOM.L_NetworkProblem = "ΠÏόβλημα δικτÏου"; -Strings.OfficeOM.L_InvalidArgument = 'Το ÏŒÏισμα "{0}" δεν λειτουÏγεί για αυτή την πεÏίπτωση, λείπει ή δεν έχει τη σωστή μοÏφή.'; -Strings.OfficeOM.L_InvalidDataObject = "Μη έγκυÏο αντικείμενο δεδομένων"; -Strings.OfficeOM.L_NoCapability = "Δεν έχετε επαÏκή δικαιώματα για αυτή την ενέÏγεια."; -Strings.OfficeOM.L_Timeout = "Έληξε το χÏονικό ÏŒÏιο της λειτουÏγίας. "; -Strings.OfficeOM.L_SelectionCannotBound = "Δεν είναι δυνατή η σÏνδεση στην Ï„Ïέχουσα επιλογή."; -Strings.OfficeOM.L_InvalidGetColumns = "Οι καθοÏισμένες στήλες δεν είναι έγκυÏες."; +Strings.OfficeOM.L_DialogNavigateError = "Σφάλμα πεÏιήγησης παÏαθÏÏου διαλόγου"; +Strings.OfficeOM.L_UnsupportedEnumerationMessage = "Η απαÏίθμηση δεν υποστηÏίζεται στην Ï„Ïέχουσα εφαÏμογή κεντÏÎ¹ÎºÎ¿Ï Ï…Ï€Î¿Î»Î¿Î³Î¹ÏƒÏ„Î®."; +Strings.OfficeOM.L_ColIndexOutOfRange = "Η τιμή δείκτη στήλης βÏίσκεται εκτός της επιτÏεπόμενης πεÏιοχής. ΧÏησιμοποιήστε μια τιμή (0 ή υψηλότεÏη) η οποία θα είναι μικÏότεÏη από το πλήθος των στηλών."; Strings.OfficeOM.L_DocumentReadOnly = "Η λειτουÏγία που ζητήθηκε δεν επιτÏέπεται στην Ï„Ïέχουσα κατάσταση του εγγÏάφου."; +Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = 'Δεν είναι δυνατή η εφαÏμογή των αλλαγών στην ιδιότητα "{0}" μέσω μιας μεθόδου "object.set".'; +Strings.OfficeOM.L_GetSelectionNotSupported = "Η Ï„Ïέχουσα επιλογή δεν υποστηÏίζεται."; +Strings.OfficeOM.L_InvalidTableOptionValue = "Μία ή πεÏισσότεÏες από τις παÏαμέτÏους tableOptions έχουν τιμές που δεν επιτÏέπονται. Επαναλάβετε τον έλεγχο των τιμών και Ï€Ïοσπαθήστε ξανά."; +Strings.OfficeOM.L_DialogInvalidScheme = "Ο συνδυασμός διευθÏνσεων URL δεν υποστηÏίζεται. ΧÏησιμοποιήστε εναλλακτικά το HTTPS."; +Strings.OfficeOM.L_RowIndexOutOfRange = "Η τιμή δείκτη γÏαμμής βÏίσκεται εκτός της επιτÏεπόμενης πεÏιοχής. ΧÏησιμοποιήστε μια τιμή (0 ή υψηλότεÏη) η οποία θα είναι μικÏότεÏη από το πλήθος των γÏαμμών."; Strings.OfficeOM.L_ReadSettingsError = "Σφάλμα Ïυθμίσεων ανάγνωσης"; -Strings.OfficeOM.L_TooManyArguments = "πάÏα πολλά οÏίσματα"; -Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Η εφαÏμογή {0} δεν υπάÏχει. Δεν είναι δυνατή η κλήση του Microsoft.Office.WebExtension.Initialize(Reason)."; -Strings.OfficeOM.L_APINotSupported = "Το API δεν υποστηÏίζεται"; -Strings.OfficeOM.L_FormattingReminder = "ΥπενθÏμιση μοÏφοποίησης"; -Strings.OfficeOM.L_CannotWriteToSelection = "Δεν είναι δυνατή η εγγÏαφή στην Ï„Ïέχουσα επιλογή."; -Strings.OfficeOM.L_InvalidResourceUrl = "Δόθηκε μη έγκυÏη διεÏθυνση Url πόÏου εφαÏμογής."; -Strings.OfficeOM.L_TooManyIncompleteRequests = "ΠεÏιμένετε μέχÏι να ολοκληÏωθεί η Ï€ÏοηγοÏμενη κλήση."; -Strings.OfficeOM.L_ConnectionFailureWithDetails = "Η αίτηση απέτυχε με κωδικό κατάστασης {0}, κωδικό σφάλματος {1} και το ακόλουθο μήνυμα σφάλματος: {2}"; -Strings.OfficeOM.L_AppNameNotExist = "Το όνομα Ï€Ïοσθέτου για {0} δεν υπάÏχει."; -Strings.OfficeOM.L_UnknownBindingType = "Ο Ï„Ïπος σÏνδεσης δεν υποστηÏίζεται."; -Strings.OfficeOM.L_SetDataIsTooLarge = "Το καθοÏισμένο σÏνολο δεδομένων είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î¿."; -Strings.OfficeOM.L_UnsupportedEnumerationMessage = "Η απαÏίθμηση δεν υποστηÏίζεται στην Ï„Ïέχουσα εφαÏμογή κεντÏÎ¹ÎºÎ¿Ï Ï…Ï€Î¿Î»Î¿Î³Î¹ÏƒÏ„Î®."; +Strings.OfficeOM.L_NamedItemNotFound = "Το καθοÏισμένο στοιχείο δεν υπάÏχει."; +Strings.OfficeOM.L_InValidOptionalArgument = "μη έγκυÏο Ï€ÏοαιÏετικό ÏŒÏισμα"; Strings.OfficeOM.L_UserAborted = "Ο χÏήστης ματαίωσε την αίτηση συγκατάθεσης."; -Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Μη έγκυÏα οÏίσματα εισόδου."; -Strings.OfficeOM.L_InvalidSSOAddinMessage = "Το API ταυτότητας δεν υποστηÏίζεται για το Ï€Ïόσθετο."; -Strings.OfficeOM.L_PropertyNotLoaded = 'Η ιδιότητα "{0}" δεν είναι διαθέσιμη. ΠÏιν από την ανάγνωση της τιμής της ιδιότητας, Ï€Ïαγματοποιήστε κλήση της μεθόδου φόÏτωσης στο πεÏιέχον αντικείμενο και κλήση context.sync() στο συσχετισμένο πεÏιβάλλον αίτησης.'; -Strings.OfficeOM.L_RowIndexOutOfRange = "Η τιμή δείκτη γÏαμμής βÏίσκεται εκτός της επιτÏεπόμενης πεÏιοχής. ΧÏησιμοποιήστε μια τιμή (0 ή υψηλότεÏη) η οποία θα είναι μικÏότεÏη από το πλήθος των γÏαμμών."; -Strings.OfficeOM.L_SaveSettingsError = "Σφάλμα Ïυθμίσεων αποθήκευσης"; -Strings.OfficeOM.L_RedundantCallbackSpecification = "Η επιστÏοφή κλήσης δεν μποÏεί να καθοÏιστεί ταυτόχÏονα και στη λίστα οÏισμάτων και στο Ï€ÏοαιÏετικό αντικείμενο."; -Strings.OfficeOM.L_TooManyOptionalFunction = "πολλές Ï€ÏοαιÏετικές συναÏτήσεις στη λίστα παÏαμέτÏων"; -Strings.OfficeOM.L_CustomXmlNodeNotFound = "Ο καθοÏισμένος κόμβος δεν βÏέθηκε."; -Strings.OfficeOM.L_DataNotMatchBindingType = "Το καθοÏισμένο αντικείμενο δεδομένων δεν είναι συμβατό με τον Ï„Ïπο σÏνδεσης."; -Strings.OfficeOM.L_DialogOK = "OK"; -Strings.OfficeOM.L_InvalidOrTimedOutSession = "Μη έγκυÏη πεÏίοδος λειτουÏγίας ή λήξη χÏÎ¿Î½Î¹ÎºÎ¿Ï Î¿Ïίου πεÏιόδου λειτουÏγίας"; -Strings.OfficeOM.L_DataWriteError = "Σφάλμα εγγÏαφής δεδομένων"; -Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Αποδοχή"; -Strings.OfficeOM.L_InvalidReadForBlankRow = "Η καθοÏισμένη γÏαμμή είναι κενή."; -Strings.OfficeOM.L_MemoryLimit = "Έγινε υπέÏβαση του οÏίου μνήμης"; -Strings.OfficeOM.L_NotImplemented = "Η λειτουÏγία {0} δεν έχει υλοποιηθεί."; -Strings.OfficeOM.L_DataWriteReminder = "ΥπενθÏμιση εγγÏαφής δεδομένων"; -Strings.OfficeOM.L_ActivityLimitReached = "Το ÏŒÏιο δÏαστηÏιότητας συμπληÏώθηκε."; -Strings.OfficeOM.L_EventHandlerNotExist = "Το καθοÏισμένο Ï€ÏόγÏαμμα χειÏÎ¹ÏƒÎ¼Î¿Ï ÏƒÏ…Î¼Î²Î¬Î½Ï„Ï‰Î½ δεν βÏέθηκε για αυτήν τη σÏνδεση."; -Strings.OfficeOM.L_SettingsAreStale = "Δεν ήταν δυνατή η αποθήκευση των Ïυθμίσεων, επειδή δεν είναι ενημεÏωμένες."; -Strings.OfficeOM.L_IndexOutOfRange = "Δείκτης εκτός πεÏιοχής."; +Strings.OfficeOM.L_InvalidCellsValue = "Μία ή πεÏισσότεÏες από τις παÏαμέτÏους κελιών έχουν τιμές που δεν επιτÏέπονται. Επαναλάβετε τον έλεγχο των τιμών και Ï€Ïοσπαθήστε ξανά."; Strings.OfficeOM.L_BindingCreationError = "Σφάλμα δημιουÏγίας σÏνδεσης"; -Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Ένα Ï€Ïόβλημα δικτÏου εμπόδισε την ανάκτηση του αÏχείου."; -Strings.OfficeOM.L_FileTypeNotSupported = "Ο καθοÏισμένος Ï„Ïπος αÏχείου δεν υποστηÏίζεται."; -Strings.OfficeOM.L_InvalidResourceUrlMessage = "Η διεÏθυνση URL πόÏου που έχει καθοÏιστεί στη διακήÏυξη δεν είναι έγκυÏη."; -Strings.OfficeOM.L_MultipleNamedItemFound = "Î’Ïέθηκαν πολλά αντικείμενα με το ίδιο όνομα."; -Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Επιλέξτε."; +Strings.OfficeOM.L_DialogAlreadyOpened = "Η λειτουÏγία απέτυχε, επειδή αυτό το Ï€Ïόσθετο έχει ήδη ένα ενεÏγό παÏάθυÏο διαλόγου."; +Strings.OfficeOM.L_InvalidSelectionForBindingType = "Δεν είναι δυνατή η δημιουÏγία σÏνδεσης με την Ï„Ïέχουσα επιλογή και τον Ï„Ïπο σÏνδεσης που έχει οÏιστεί."; +Strings.OfficeOM.L_SSOConnectionLostError = "A connection was lost during the sign in process."; +Strings.OfficeOM.L_CustomXmlError = "Σφάλμα Ï€ÏοσαÏμοσμένης XML."; +Strings.OfficeOM.L_InvalidFormat = "Σφάλμα μη έγκυÏης μοÏφής"; +Strings.OfficeOM.L_IndexOutOfRange = "Δείκτης εκτός πεÏιοχής."; +Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Οι παÏάμετÏοι συντεταγμένων δεν είναι δυνατό να χÏησιμοποιηθοÏν με πίνακα Ï„Ïπου αναγκαστικής μετατÏοπής όταν ο πίνακας πεÏιέχει συγχωνευμένα κελιά."; Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Οι παÏάμετÏοι συντεταγμένων δεν είναι δυνατό να χÏησιμοποιηθοÏν με πίνακα Ï„Ïπου αναγκαστικής μετατÏοπής όταν ο πίνακας πεÏιέχει συγχωνευμένα κελιά."; -Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Η Ï„Ïέχουσα επιλογή δεν είναι συμβατή με τον καθοÏισμένο Ï„Ïπο αναγκαστικής μετατÏοπής."; -Strings.OfficeOM.L_InvalidArgumentGeneric = "Τα οÏίσματα που διαβιβάστηκαν στη συνάÏτηση δεν λειτουÏγοÏν για αυτή την πεÏίπτωση, λείπουν ή δεν έχουν σωστή μοÏφή."; -Strings.OfficeOM.L_CannotRegisterEvent = "Δεν είναι δυνατή η καταχώÏηση του Ï€ÏογÏάμματος χειÏÎ¹ÏƒÎ¼Î¿Ï ÏƒÏ…Î¼Î²Î¬Î½Ï„Ï‰Î½."; +Strings.OfficeOM.L_CustomXmlOutOfDateName = "Μη ενημεÏωμένα δεδομένα"; +Strings.OfficeOM.L_InternalErrorDescription = "ΠαÏουσιάστηκε εσωτεÏικό σφάλμα."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Η λειτουÏγία απέτυχε επειδή αυτό το Ï€Ïόσθετο απαιτεί ήδη διακÏιτικό Ï€Ïόσβασης."; +Strings.OfficeOM.L_SSOClientError = "ΠαÏουσιάστηκε σφάλμα στην αίτηση ελέγχου ταυτότητας από το Office."; +Strings.OfficeOM.L_APICallFailed = "Απέτυχε η κλήση API"; +Strings.OfficeOM.L_ActivityLimitReached = "Το ÏŒÏιο δÏαστηÏιότητας συμπληÏώθηκε."; Strings.OfficeOM.L_PermissionDenied = "Δεν έχετε δικαίωμα Ï€Ïόσβασης"; -Strings.OfficeOM.L_CustomXmlError = "Σφάλμα Ï€ÏοσαÏμοσμένης XML."; -Strings.OfficeOM.L_EventRegistrationError = "Σφάλμα καταχώÏησης συμβάντων"; -Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = 'Δεν είναι δυνατή η εφαÏμογή των αλλαγών στην ιδιότητα "{0}" μέσω μιας μεθόδου "object.set".'; -Strings.OfficeOM.L_ShuttingDown = "Η λειτουÏγία απέτυχε, επειδή τα δεδομένα στο διακομιστή δεν είναι ενημεÏωμένα."; -Strings.OfficeOM.L_DisplayDialogError = "Εμφάνιση σφάλματος παÏαθÏÏου διαλόγου"; +Strings.OfficeOM.L_FormattingReminder = "ΥπενθÏμιση μοÏφοποίησης"; +Strings.OfficeOM.L_InvalidSetRows = "Οι καθοÏισμένες γÏαμμές δεν είναι έγκυÏες."; +Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "Η πεÏίοδος λειτουÏγίας του Office Online έχει λήξει ή δεν είναι έγκυÏη. Για να συνεχίσετε, ανανεώστε τη σελίδα."; +Strings.OfficeOM.L_TooManyArguments = "πάÏα πολλά οÏίσματα"; +Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Σημείωση: Το πλήθος των κελιών σε έναν πίνακα Ï€Ïοτείνεται να είναι κάτω από 20.000 κελιά."; +Strings.OfficeOM.L_NoCapability = "Δεν έχετε επαÏκή δικαιώματα για αυτή την ενέÏγεια."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Το Ï€Ïόσθετο απαιτεί ήδη ένα διακÏιτικό Ï€Ïόσβασης."; +Strings.OfficeOM.L_ElementMissing = "Δεν μποÏέσαμε να μοÏφοποιήσουμε το κελί πίνακα, επειδή λείπουν οÏισμένες τιμές παÏαμέτÏων. Επαναλάβετε τον έλεγχο των παÏαμέτÏων και Ï€Ïοσπαθήστε ξανά."; +Strings.OfficeOM.L_CustomFunctionDefinitionMissing = "ΠÏέπει να υπάÏχει μια ιδιότητα με αυτό το όνομα που αναπαÏιστά τον οÏισμό της συνάÏτησης στην κλάση Excel.CustomFunctions."; +Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Ένα Ï€Ïόβλημα δικτÏου εμπόδισε την ανάκτηση του αÏχείου."; +Strings.OfficeOM.L_DataNotMatchBindingType = "Το καθοÏισμένο αντικείμενο δεδομένων δεν είναι συμβατό με τον Ï„Ïπο σÏνδεσης."; +Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Επιλέξτε."; +Strings.OfficeOM.L_CustomXmlNodeNotFound = "Ο καθοÏισμένος κόμβος δεν βÏέθηκε."; +Strings.OfficeOM.L_Timeout = "Έληξε το χÏονικό ÏŒÏιο της λειτουÏγίας. "; +Strings.OfficeOM.L_NavOutOfBound = "Η λειτουÏγία απέτυχε επειδή ο δείκτης είναι εκτός πεÏιοχής."; +Strings.OfficeOM.L_ShowWindowDialogNotification = "Το Ï€Ïόσθετο {0} θέλει να εμφανίσει ένα νέο παÏάθυÏο."; +Strings.OfficeOM.L_InvalidBinding = "Μη έγκυÏη σÏνδεση"; +Strings.OfficeOM.L_ValueNotLoaded = "Η τιμή του αντικειμένου αποτελέσματος δεν έχει φοÏτωθεί ακόμη. ΠÏιν από την ανάγνωση της ιδιότητας τιμής, καλέστε το context.sync() στο συσχετισμένο πεÏιβάλλον αίτησης."; +Strings.OfficeOM.L_OverwriteWorksheetData = "Η λειτουÏγία οÏÎ¹ÏƒÎ¼Î¿Ï Î±Ï€Î­Ï„Ï…Ï‡Îµ επειδή το αντικείμενο δεδομένων που δόθηκε θα αντικαταστήσει ή θα μετακινήσει δεδομένα."; +Strings.OfficeOM.L_UserAbortedMessage = "Ο χÏήστης δεν εκχώÏησε τα δικαιώματα για το Ï€Ïόσθετο."; +Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "Ïυθμίστε τις παÏαμέτÏους του Ï€ÏογÏάμματος πεÏιήγησης"; +Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Οι καθοÏισμένες τιμές της rowCount ή columnCount δεν είναι έγκυÏες."; +Strings.OfficeOM.L_DialogOK = "OK"; +Strings.OfficeOM.L_DialogAddressNotTrusted = "Ο τομέας του URL δεν πεÏιλαμβάνεται στο στοιχείο AppDomains στη διακήÏυξη."; Strings.OfficeOM.L_OperationNotSupported = "Η λειτουÏγία δεν υποστηÏίζεται."; -Strings.OfficeOM.L_UnsupportedDataObject = "Ο Ï„Ïπος του αντικειμένου δεδομένων που δόθηκε δεν υποστηÏίζεται."; -Strings.OfficeOM.L_InternalErrorDescription = "ΠαÏουσιάστηκε εσωτεÏικό σφάλμα."; -Strings.OfficeOM.L_InvalidGrantMessage = "Δεν έχει γίνει εκχώÏηση δικαιωμάτων για αυτό το Ï€Ïόσθετο."; +Strings.OfficeOM.L_InvalidBindingOperation = "Μη έγκυÏη λειτουÏγία σÏνδεσης"; Strings.OfficeOM.L_BrowserAPINotSupported = "Αυτό το Ï€ÏόγÏαμμα πεÏιήγησης δεν υποστηÏίζει το API που ζητήθηκε."; -Strings.OfficeOM.L_DialogInvalidScheme = "Ο συνδυασμός διευθÏνσεων URL δεν υποστηÏίζεται. ΧÏησιμοποιήστε εναλλακτικά το HTTPS."; -Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Σημείωση: Τα σÏνολα μοÏφοποίησης που οÏίζονται από μια κλήση Formatting API Ï€Ïοτείνεται να είναι κάτω από 100."; -Strings.OfficeOM.L_NotSupported = "Η συνάÏτηση {0} δεν υποστηÏίζεται."; -Strings.OfficeOM.L_InvalidSetStartRowColumn = "Οι καθοÏισμένες τιμές startRow ή startColumn δεν είναι έγκυÏες."; -Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Οι καθοÏισμένες τιμές της rowCount ή columnCount δεν είναι έγκυÏες."; +Strings.OfficeOM.L_EventHandlerNotExist = "Το καθοÏισμένο Ï€ÏόγÏαμμα χειÏÎ¹ÏƒÎ¼Î¿Ï ÏƒÏ…Î¼Î²Î¬Î½Ï„Ï‰Î½ δεν βÏέθηκε για αυτήν τη σÏνδεση."; +Strings.OfficeOM.L_SaveSettingsError = "Σφάλμα Ïυθμίσεων αποθήκευσης"; +Strings.OfficeOM.L_InvalidArgumentGeneric = "Τα οÏίσματα που διαβιβάστηκαν στη συνάÏτηση δεν λειτουÏγοÏν για αυτή την πεÏίπτωση, λείπουν ή δεν έχουν σωστή μοÏφή."; +Strings.OfficeOM.L_SettingNameNotExist = "Δεν υπάÏχει το όνομα της καθοÏισμένης ÏÏθμισης."; +Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Το επιλεγμένο πεÏιεχόμενο Ï€Ïέπει να είναι σε μοÏφή πίνακα. ΜοÏφοποιήστε τα δεδομένα ως πίνακα και Ï€Ïοσπαθήστε ξανά."; +Strings.OfficeOM.L_CustomFunctionNameContainsBadChars = "Το όνομα της συνάÏτησης Ï€Ïέπει να πεÏιέχει μόνο γÏάμματα, ψηφία, χαÏακτήÏες υπογÏάμμισης και τελείες."; +Strings.OfficeOM.L_SettingsStaleError = "Σφάλμα μη ενημεÏωμένων Ïυθμίσεων"; +Strings.OfficeOM.L_InvalidColumnsForBinding = "Οι καθοÏισμένες στήλες δεν είναι έγκυÏες."; +Strings.OfficeOM.L_NotSupportedEventType = "Ο καθοÏισμένος Ï„Ïπος συμβάντος {0} δεν υποστηÏίζεται."; Strings.OfficeOM.L_NewWindowCrossZone = 'Οι Ïυθμίσεις ασφαλείας στο Ï€ÏόγÏαμμα πεÏιήγησης δεν επιτÏέπουν τη δημιουÏγία ενός παÏαθÏÏου διαλόγου. Δοκιμάστε ένα διαφοÏετικό Ï€ÏόγÏαμμα πεÏιήγησης ή {0} ώστε ο τομέας "{1}" και ο τομέας που εμφανίζεται στη γÏαμμή διευθÏνσεων να βÏίσκονται στην ίδια ζώνη ασφαλείας.'; -Strings.OfficeOM.L_InitializeNotReady = "Η φόÏτωση του Office.js δεν έχει ολοκληÏωθεί ακόμη. ΠÏοσπαθήστε ξανά αÏγότεÏα ή Ï€Ïοσθέστε τον κώδικα Ï€Ïοετοιμασίας στη συνάÏτηση Office.initialize."; -Strings.OfficeOM.L_OutOfRange = "Εκτός πεÏιοχής"; -Strings.OfficeOM.L_DialogNavigateError = "Σφάλμα πεÏιήγησης παÏαθÏÏου διαλόγου"; -Strings.OfficeOM.L_MissingParameter = "Λείπει παÏάμετÏος"; +Strings.OfficeOM.L_InvalidResourceUrlMessage = "Η διεÏθυνση URL πόÏου που έχει καθοÏιστεί στη διακήÏυξη δεν είναι έγκυÏη."; +Strings.OfficeOM.L_SettingsAreStale = "Δεν ήταν δυνατή η αποθήκευση των Ïυθμίσεων, επειδή δεν είναι ενημεÏωμένες."; Strings.OfficeOM.L_SSOServerErrorMessage = "ΠαÏουσιάστηκε μη αναμενόμενο σφάλμα στο διακομιστή."; -Strings.OfficeOM.L_SettingNameNotExist = "Δεν υπάÏχει το όνομα της καθοÏισμένης ÏÏθμισης."; -Strings.OfficeOM.L_InvalidFormatValue = "Μία ή πεÏισσότεÏες από τις παÏαμέτÏους μοÏφοποίησης έχουν τιμές που δεν επιτÏέπονται. Επαναλάβετε τον έλεγχο των τιμών και Ï€Ïοσπαθήστε ξανά."; -Strings.OfficeOM.L_InvalidFormat = "Σφάλμα μη έγκυÏης μοÏφής"; -Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "Η πεÏίοδος λειτουÏγίας του Office Online έχει λήξει ή δεν είναι έγκυÏη. Για να συνεχίσετε, ανανεώστε τη σελίδα."; -Strings.OfficeOM.L_DialogRequireHTTPS = "Το Ï€Ïωτόκολλο HTTP δεν υποστηÏίζεται. ΧÏησιμοποιήστε εναλλακτικά το HTTPS"; +Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Σημείωση: Τα σÏνολα μοÏφοποίησης που οÏίζονται από μια κλήση Formatting API Ï€Ïοτείνεται να είναι κάτω από 100."; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory = "Αυτό το Ï€Ïόσθετο δεν υποστηÏίζει τη συγκατάθεση του χÏήστη."; +Strings.OfficeOM.L_InvalidApiCallInContext = "Μη έγκυÏη κλήση API στο Ï„Ïέχον πεÏιβάλλον."; +Strings.OfficeOM.L_UnsupportedEnumeration = "Μη υποστηÏιζόμενη απαÏίθμηση"; +Strings.OfficeOM.L_SSOServerError = "ΠαÏουσιάστηκε σφάλμα στην υπηÏεσία παÏοχής ελέγχου ταυτότητας."; +Strings.OfficeOM.L_UserNotSignedIn = "Κανένας χÏήστης δεν έχει συνδεθεί στο Office."; +Strings.OfficeOM.L_UnknownBindingType = "Ο Ï„Ïπος σÏνδεσης δεν υποστηÏίζεται."; +Strings.OfficeOM.L_ConnectionFailureWithDetails = "Η αίτηση απέτυχε με κωδικό κατάστασης {0}, κωδικό σφάλματος {1} και το ακόλουθο μήνυμα σφάλματος: {2}"; +Strings.OfficeOM.L_CustomFunctionImplementationMissing = "Η ιδιότητα με αυτό το όνομα στην κλάση Excel.CustomFunctions που αναπαÏιστά τον οÏισμό της συνάÏτησης Ï€Ïέπει να πεÏιέχει μια ιδιότητα 'call' που υλοποιεί τη συνάÏτηση."; +Strings.OfficeOM.L_InvalidAPICall = "Μη έγκυÏη κλήση API"; +Strings.OfficeOM.L_SSOConnectionLostErrorMessage = "A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones."; +Strings.OfficeOM.L_InvalidGrantMessage = "Δεν έχει γίνει εκχώÏηση δικαιωμάτων για αυτό το Ï€Ïόσθετο."; +Strings.OfficeOM.L_MissingParameter = "Λείπει παÏάμετÏος"; +Strings.OfficeOM.L_InvalidOperationInCellEditMode = "Το Excel βÏίσκεται σε λειτουÏγία επεξεÏγασίας κελιοÏ. ΤεÏματίστε τη λειτουÏγία επεξεÏγασίας, πατώντας το πλήκτÏο ENTER ή TAB ή επιλέγοντας ένα άλλο κελί και, στη συνέχεια, Ï€Ïοσπαθήστε ξανά."; +Strings.OfficeOM.L_CannotWriteToSelection = "Δεν είναι δυνατή η εγγÏαφή στην Ï„Ïέχουσα επιλογή."; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage = "Η λειτουÏγία απέτυχε, καθώς αυτό το Ï€Ïόσθετο δεν υποστηÏίζει τη συγκατάθεση του χÏήστη σε αυτή την κατηγοÏία"; +Strings.OfficeOM.L_GetDataIsTooLarge = "Το σÏνολο δεδομένων που ζητήθηκε είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î¿."; +Strings.OfficeOM.L_GetDataParametersConflict = "Οι καθοÏισμένες παÏάμετÏοι παÏουσιάζουν διένεξη."; +Strings.OfficeOM.L_InvalidGetRows = "Οι καθοÏισμένες γÏαμμές δεν είναι έγκυÏες."; +Strings.OfficeOM.L_InvalidDataFormat = "Η μοÏφή του καθοÏισμένου αντικειμένου δεδομένων δεν είναι έγκυÏη."; +Strings.OfficeOM.L_InvalidReadForBlankRow = "Η καθοÏισμένη γÏαμμή είναι κενή."; Strings.OfficeOM.L_SetDataParametersConflict = "Οι καθοÏισμένες παÏάμετÏοι παÏουσιάζουν διένεξη."; -Strings.OfficeOM.L_SpecifiedIdNotExist = "Το καθοÏισμένο αναγνωÏιστικό δεν υπάÏχει."; -Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Τα δεδομένα δεν είναι ενημεÏωμένα. Ανακτήσετε ξανά το αντικείμενο."; -Strings.OfficeOM.L_InvalidObjectPath = "Η διαδÏομή αντικειμένου {0} δεν λειτουÏγεί για την ενέÏγεια που Ï€Ïοσπαθείτε να κάνετε. Αν χÏησιμοποιείτε το αντικείμενο σε πολλές κλήσεις context.sync και εκτός της σειÏιακής εκτέλεσης μιας δέσμης .run, χÏησιμοποιήστε τις μεθόδους context.trackedObjects.add() και context.trackedObjects.remove() για να διαχειÏιστείτε τη διάÏκεια ζωής του αντικειμένου."; -Strings.OfficeOM.L_UnsupportedUserIdentity = "Δεν υποστηÏίζεται ο Ï„Ïπος ταυτότητας χÏήστη."; -Strings.OfficeOM.L_BadSelectorString = "Η συμβολοσειÏά που πεÏνά στον επιλογέα δεν είναι σωστά διαμοÏφωμένη ή δεν υποστηÏίζεται."; -Strings.OfficeOM.L_RequestTimeout = "Η εκτέλεση της κλήσης καθυστέÏησε."; -Strings.OfficeOM.L_ColIndexOutOfRange = "Η τιμή δείκτη στήλης βÏίσκεται εκτός της επιτÏεπόμενης πεÏιοχής. ΧÏησιμοποιήστε μια τιμή (0 ή υψηλότεÏη) η οποία θα είναι μικÏότεÏη από το πλήθος των στηλών."; -Strings.OfficeOM.L_DataNotMatchSelection = "Το αντικείμενο δεδομένων που δόθηκε δεν είναι συμβατό με το σχήμα ή τις διαστάσεις της Ï„Ïέχουσας επιλογής."; -Strings.OfficeOM.L_DataReadError = "Σφάλμα ανάγνωσης δεδομένων"; -Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Το επιλεγμένο πεÏιεχόμενο Ï€Ïέπει να είναι σε μοÏφή πίνακα. ΜοÏφοποιήστε τα δεδομένα ως πίνακα και Ï€Ïοσπαθήστε ξανά."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Η λειτουÏγία απέτυχε επειδή αυτό το Ï€Ïόσθετο απαιτεί ήδη διακÏιτικό Ï€Ïόσβασης."; -Strings.OfficeOM.L_EventHandlerRemovalFailed = "Απέτυχε η κατάÏγηση του Ï€ÏογÏάμματος χειÏÎ¹ÏƒÎ¼Î¿Ï ÏƒÏ…Î¼Î²Î¬Î½Ï„Ï‰Î½."; -Strings.OfficeOM.L_SSOClientErrorMessage = "ΠαÏουσιάστηκε μη αναμενόμενο σφάλμα στο Ï€ÏόγÏαμμα-πελάτη."; -Strings.OfficeOM.L_NamedItemNotFound = "Το καθοÏισμένο στοιχείο δεν υπάÏχει."; +Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Αποδοχή"; +Strings.OfficeOM.L_FileTypeNotSupported = "Ο καθοÏισμένος Ï„Ïπος αÏχείου δεν υποστηÏίζεται."; +Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Η Ï„Ïέχουσα επιλογή δεν είναι συμβατή με τον καθοÏισμένο Ï„Ïπο αναγκαστικής μετατÏοπής."; Strings.OfficeOM.L_MissingRequiredArguments = "απουσιάζουν κάποια απαιτοÏμενα οÏίσματα"; +Strings.OfficeOM.L_RequestTimeout = "Η εκτέλεση της κλήσης καθυστέÏησε."; +Strings.OfficeOM.L_TooManyOptionalFunction = "πολλές Ï€ÏοαιÏετικές συναÏτήσεις στη λίστα παÏαμέτÏων"; +Strings.OfficeOM.L_DataNotMatchBindingSize = "Το αντικείμενο δεδομένων που δόθηκε δεν αντιστοιχεί στο μέγεθος της Ï„Ïέχουσας επιλογής."; +Strings.OfficeOM.L_ApiNotFoundDetails = "Η μέθοδος ή ιδιότητα {0} είναι μέÏος του συνόλου απαιτήσεων {1}, το οποίο δεν είναι διαθέσιμο στην δική σας έκδοση του {2}."; +Strings.OfficeOM.L_OutOfRange = "Εκτός πεÏιοχής"; +Strings.OfficeOM.L_SelectionCannotBound = "Δεν είναι δυνατή η σÏνδεση στην Ï„Ïέχουσα επιλογή."; +Strings.OfficeOM.L_InternalError = "ΕσωτεÏικό σφάλμα"; +Strings.OfficeOM.L_InvalidGetColumns = "Οι καθοÏισμένες στήλες δεν είναι έγκυÏες."; +Strings.OfficeOM.L_TooManyOptionalObjects = "πολλά Ï€ÏοαιÏετικά αντικείμενα στη λίστα παÏαμέτÏων"; +Strings.OfficeOM.L_ShuttingDown = "Η λειτουÏγία απέτυχε, επειδή τα δεδομένα στο διακομιστή δεν είναι ενημεÏωμένα."; +Strings.OfficeOM.L_PropertyDoesNotExist = 'Η ιδιότητα "{0}" δεν υπάÏχει στο αντικείμενο.'; +Strings.OfficeOM.L_DialogRequireHTTPS = "Το Ï€Ïωτόκολλο HTTP δεν υποστηÏίζεται. ΧÏησιμοποιήστε εναλλακτικά το HTTPS"; +Strings.OfficeOM.L_UnsupportedUserIdentity = "Δεν υποστηÏίζεται ο Ï„Ïπος ταυτότητας χÏήστη."; +Strings.OfficeOM.L_APINotSupported = "Το API δεν υποστηÏίζεται"; +Strings.OfficeOM.L_RunMustReturnPromise = "Η συνάÏτηση δέσμης που διαβιβάστηκε στη μέθοδο .run δεν επέστÏεψε υπόσχεση. Η συνάÏτηση Ï€Ïέπει να επιστÏέφει υπόσχεση, ώστε να είναι δυνατή η αποδέσμευση τυχόν αντικειμένων που παÏακολουθοÏνται αυτόματα κατά την ολοκλήÏωση της λειτουÏγίας δέσμης. Συνήθως, η επιστÏοφή υπόσχεσης γίνεται με την επιστÏοφή της απόκÏισης από το context.sync()."; Strings.OfficeOM.L_SliceSizeNotSupported = "Το καθοÏισμένο μέγεθος φέτας δεν υποστηÏίζεται."; -Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Κλήση closeAsync στο Ï„Ïέχον αÏχείο Ï€Ïιν από την ανάκτηση άλλου."; -Strings.OfficeOM.L_SettingsCannotSave = "Δεν ήταν δυνατή η αποθήκευση των Ïυθμίσεων."; -Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "Ïυθμίστε τις παÏαμέτÏους του Ï€ÏογÏάμματος πεÏιήγησης"; -Strings.OfficeOM.L_GetSelectionNotSupported = "Η Ï„Ïέχουσα επιλογή δεν υποστηÏίζεται."; -Strings.OfficeOM.L_CustomXmlOutOfDateName = "Μη ενημεÏωμένα δεδομένα"; -Strings.OfficeOM.L_UserNotSignedIn = "Κανένας χÏήστης δεν έχει συνδεθεί στο Office."; +Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = 'Γίνεται Ï€Ïοσπάθεια να οÏιστεί η ιδιότητα μόνο για ανάγνωση "{0}".'; +Strings.OfficeOM.L_SSOClientErrorMessage = "ΠαÏουσιάστηκε μη αναμενόμενο σφάλμα στο Ï€ÏόγÏαμμα-πελάτη."; +Strings.OfficeOM.L_HostError = "Σφάλμα υποδοχής"; +Strings.OfficeOM.L_UserClickIgnore = "Ο χÏήστης επέλεξε να παÏαβλέψει το παÏάθυÏο διαλόγου."; +Strings.OfficeOM.L_InvalidDataObject = "Μη έγκυÏο αντικείμενο δεδομένων"; +Strings.OfficeOM.L_InvalidOrTimedOutSession = "Μη έγκυÏη πεÏίοδος λειτουÏγίας ή λήξη χÏÎ¿Î½Î¹ÎºÎ¿Ï Î¿Ïίου πεÏιόδου λειτουÏγίας"; +Strings.OfficeOM.L_NotSupported = "Η συνάÏτηση {0} δεν υποστηÏίζεται."; +Strings.OfficeOM.L_DataNotMatchSelection = "Το αντικείμενο δεδομένων που δόθηκε δεν είναι συμβατό με το σχήμα ή τις διαστάσεις της Ï„Ïέχουσας επιλογής."; +Strings.OfficeOM.L_PropertyNotLoaded = 'Η ιδιότητα "{0}" δεν είναι διαθέσιμη. ΠÏιν από την ανάγνωση της τιμής της ιδιότητας, Ï€Ïαγματοποιήστε κλήση της μεθόδου φόÏτωσης στο πεÏιέχον αντικείμενο και κλήση context.sync() στο συσχετισμένο πεÏιβάλλον αίτησης.'; +Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Η εφαÏμογή {0} δεν υπάÏχει. Δεν είναι δυνατή η κλήση του Microsoft.Office.WebExtension.Initialize(Reason)."; Strings.OfficeOM.L_InvalidGrant = "Λείπει η Ï€Ïοεξουσιοδότηση."; -Strings.OfficeOM.L_InvalidRequestContext = "Δεν είναι δυνατή η χÏήση του αντικειμένου σε διαφοÏετικά πεÏιβάλλοντα αίτησης."; -Strings.OfficeOM.L_RunMustReturnPromise = "Η συνάÏτηση δέσμης που διαβιβάστηκε στη μέθοδο .run δεν επέστÏεψε υπόσχεση. Η συνάÏτηση Ï€Ïέπει να επιστÏέφει υπόσχεση, ώστε να είναι δυνατή η αποδέσμευση τυχόν αντικειμένων που παÏακολουθοÏνται αυτόματα κατά την ολοκλήÏωση της λειτουÏγίας δέσμης. Συνήθως, η επιστÏοφή υπόσχεσης γίνεται με την επιστÏοφή της απόκÏισης από το context.sync()."; -Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Σημείωση: Το πλήθος των κελιών σε έναν πίνακα Ï€Ïοτείνεται να είναι κάτω από 20.000 κελιά."; +Strings.OfficeOM.L_RequestTokenUnavailable = "Αυτό το API έχει Ïυθμιστεί για τη μείωση της συχνότητας κλήσης."; +Strings.OfficeOM.L_EventHandlerRemovalFailed = "Απέτυχε η κατάÏγηση του Ï€ÏογÏάμματος χειÏÎ¹ÏƒÎ¼Î¿Ï ÏƒÏ…Î¼Î²Î¬Î½Ï„Ï‰Î½."; +Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Δεν υποστηÏίζεται ο Ï„Ïπος ταυτότητας του χÏήστη."; +Strings.OfficeOM.L_CannotNavigateTo = "Το αντικείμενο βÏίσκεται σε θέση όπου δεν υποστηÏίζεται η πεÏιήγηση."; +Strings.OfficeOM.L_InvalidFormatValue = "Μία ή πεÏισσότεÏες από τις παÏαμέτÏους μοÏφοποίησης έχουν τιμές που δεν επιτÏέπονται. Επαναλάβετε τον έλεγχο των τιμών και Ï€Ïοσπαθήστε ξανά."; +Strings.OfficeOM.L_InvalidSetStartRowColumn = "Οι καθοÏισμένες τιμές startRow ή startColumn δεν είναι έγκυÏες."; +Strings.OfficeOM.L_InvalidBindingError = "ΠαÏουσιάστηκε σφάλμα μη έγκυÏης σÏνδεσης"; +Strings.OfficeOM.L_MemoryLimit = "Έγινε υπέÏβαση του οÏίου μνήμης"; +Strings.OfficeOM.L_InvalidSSOAddinMessage = "Το API ταυτότητας δεν υποστηÏίζεται για το Ï€Ïόσθετο."; +Strings.OfficeOM.L_InvalidCoercion = "Μη έγκυÏος Ï„Ïπος αναγκαστικής μετατÏοπής"; +Strings.OfficeOM.L_CannotRegisterEvent = "Δεν είναι δυνατή η καταχώÏηση του Ï€ÏογÏάμματος χειÏÎ¹ÏƒÎ¼Î¿Ï ÏƒÏ…Î¼Î²Î¬Î½Ï„Ï‰Î½."; +Strings.OfficeOM.L_InvalidValue = "Μη έγκυÏη τιμή"; Strings.OfficeOM.L_CallbackNotAFunction = "Η επιστÏοφή κλήσης Ï€Ïέπει να είναι Ï„Ïπου συνάÏτησης, ήταν Ï„Ïπου {0}."; -Strings.OfficeOM.L_InValidOptionalArgument = "μη έγκυÏο Ï€ÏοαιÏετικό ÏŒÏισμα"; -Strings.OfficeOM.L_InvalidDataFormat = "Η μοÏφή του καθοÏισμένου αντικειμένου δεδομένων δεν είναι έγκυÏη."; -Strings.OfficeOM.L_InvalidColumnsForBinding = "Οι καθοÏισμένες στήλες δεν είναι έγκυÏες."; +Strings.OfficeOM.L_InvalidRequestContext = "Δεν είναι δυνατή η χÏήση του αντικειμένου σε διαφοÏετικά πεÏιβάλλοντα αίτησης."; +Strings.OfficeOM.L_InvalidArgument = 'Το ÏŒÏισμα "{0}" δεν λειτουÏγεί για αυτή την πεÏίπτωση, λείπει ή δεν έχει τη σωστή μοÏφή.'; +Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Η λειτουÏγία δεν υποστηÏίζεται σε αυτόν τον Ï„Ïπο σÏνδεσης."; Strings.OfficeOM.L_InvalidGetStartRowColumn = "Οι καθοÏισμένες τιμές startRow ή startColumn δεν είναι έγκυÏες."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Το Ï€Ïόσθετο απαιτεί ήδη ένα διακÏιτικό Ï€Ïόσβασης."; -Strings.OfficeOM.L_NavOutOfBound = "Η λειτουÏγία απέτυχε επειδή ο δείκτης είναι εκτός πεÏιοχής."; -Strings.OfficeOM.L_DialogAlreadyOpened = "Η λειτουÏγία απέτυχε, επειδή αυτό το Ï€Ïόσθετο έχει ήδη ένα ενεÏγό παÏάθυÏο διαλόγου."; -Strings.OfficeOM.L_CoercionTypeNotSupported = "Ο καθοÏισμένος Ï„Ïπος αναγκαστικής μετατÏοπής δεν υποστηÏίζεται."; -Strings.OfficeOM.L_InvalidSetRows = "Οι καθοÏισμένες γÏαμμές δεν είναι έγκυÏες."; -Strings.OfficeOM.L_InvalidCellsValue = "Μία ή πεÏισσότεÏες από τις παÏαμέτÏους κελιών έχουν τιμές που δεν επιτÏέπονται. Επαναλάβετε τον έλεγχο των τιμών και Ï€Ïοσπαθήστε ξανά." +Strings.OfficeOM.L_CustomFunctionNameCannotSplit = "Το όνομα της συνάÏτησης Ï€Ïέπει να πεÏιέχει έναν μη κενό χώÏο ονομάτων και ένα μη κενό σÏντομο όνομα."; +Strings.OfficeOM.L_EventRegistrationError = "Σφάλμα καταχώÏησης συμβάντων"; +Strings.OfficeOM.L_RedundantCallbackSpecification = "Η επιστÏοφή κλήσης δεν μποÏεί να καθοÏιστεί ταυτόχÏονα και στη λίστα οÏισμάτων και στο Ï€ÏοαιÏετικό αντικείμενο."; +Strings.OfficeOM.L_InvalidParameters = "Η συνάÏτηση {0} έχει μη έγκυÏες παÏαμέτÏους." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/el-gr/office_strings.js b/node_modules/@microsoft/office-js/dist/el-gr/office_strings.js index 3abc1ec..b909348 100644 --- a/node_modules/@microsoft/office-js/dist/el-gr/office_strings.js +++ b/node_modules/@microsoft/office-js/dist/el-gr/office_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_SSOServerError="ΠαÏουσιάστηκε σφάλμα στην υπηÏεσία παÏοχής ελέγχου ταυτότητας.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Η λειτουÏγία δεν υποστηÏίζεται σε αυτόν τον Ï„Ïπο σÏνδεσης.";Strings.OfficeOM.L_InvalidApiCallInContext="Μη έγκυÏη κλήση API στο Ï„Ïέχον πεÏιβάλλον.";Strings.OfficeOM.L_InternalError="ΕσωτεÏικό σφάλμα";Strings.OfficeOM.L_APICallFailed="Απέτυχε η κλήση API";Strings.OfficeOM.L_DataNotMatchBindingSize="Το αντικείμενο δεδομένων που δόθηκε δεν αντιστοιχεί στο μέγεθος της Ï„Ïέχουσας επιλογής.";Strings.OfficeOM.L_NotSupportedEventType="Ο καθοÏισμένος Ï„Ïπος συμβάντος {0} δεν υποστηÏίζεται.";Strings.OfficeOM.L_FormatValueOutOfRange="Η τιμή είναι εκτός της επιτÏεπόμενης πεÏιοχής.";Strings.OfficeOM.L_DialogAddressNotTrusted="Ο τομέας του URL δεν πεÏιλαμβάνεται στο στοιχείο AppDomains στη διακήÏυξη.";Strings.OfficeOM.L_InvalidValue="Μη έγκυÏη τιμή";Strings.OfficeOM.L_EventHandlerAdditionFailed="Απέτυχε η Ï€Ïοσθήκη του Ï€ÏογÏάμματος χειÏÎ¹ÏƒÎ¼Î¿Ï ÏƒÏ…Î¼Î²Î¬Î½Ï„Ï‰Î½.";Strings.OfficeOM.L_InvalidParameters="Η συνάÏτηση {0} έχει μη έγκυÏες παÏαμέτÏους.";Strings.OfficeOM.L_GetDataParametersConflict="Οι καθοÏισμένες παÏάμετÏοι παÏουσιάζουν διένεξη.";Strings.OfficeOM.L_SSOClientError="ΠαÏουσιάστηκε σφάλμα στην αίτηση ελέγχου ταυτότητας από το Office.";Strings.OfficeOM.L_DataStale="Μη ενημεÏωμένα δεδομένα";Strings.OfficeOM.L_InvalidTableOptionValue="Μία ή πεÏισσότεÏες από τις παÏαμέτÏους tableOptions έχουν τιμές που δεν επιτÏέπονται. Επαναλάβετε τον έλεγχο των τιμών και Ï€Ïοσπαθήστε ξανά.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty='Γίνεται Ï€Ïοσπάθεια να οÏιστεί η ιδιότητα μόνο για ανάγνωση "{0}".';Strings.OfficeOM.L_InvalidBinding="Μη έγκυÏη σÏνδεση";Strings.OfficeOM.L_UserAbortedMessage="Ο χÏήστης δεν εκχώÏησε τα δικαιώματα για το Ï€Ïόσθετο.";Strings.OfficeOM.L_BindingNotExist="Δεν υπάÏχει η καθοÏισμένη σÏνδεση.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="ΣυμπλήÏωση οÏίου επιλογής";Strings.OfficeOM.L_ShowWindowDialogNotification="Το Ï€Ïόσθετο {0} θέλει να εμφανίσει ένα νέο παÏάθυÏο.";Strings.OfficeOM.L_BindingToMultipleSelection="Οι μη συνεχόμενες επιλογές δεν υποστηÏίζονται.";Strings.OfficeOM.L_InvalidAPICall="Μη έγκυÏη κλήση API";Strings.OfficeOM.L_NotSupportedBindingType="Ο καθοÏισμένος Ï„Ïπος σÏνδεσης {0} δεν υποστηÏίζεται.";Strings.OfficeOM.L_InvalidCoercion="Μη έγκυÏος Ï„Ïπος αναγκαστικής μετατÏοπής";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Οι παÏάμετÏοι συντεταγμένων δεν είναι δυνατό να χÏησιμοποιηθοÏν με πίνακα Ï„Ïπου αναγκαστικής μετατÏοπής όταν ο πίνακας πεÏιέχει συγχωνευμένα κελιά.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="Το XPath πεÏιοÏίζει την επιλογή στα 1024 στοιχεία.";Strings.OfficeOM.L_InvalidBindingError="ΠαÏουσιάστηκε σφάλμα μη έγκυÏης σÏνδεσης";Strings.OfficeOM.L_UnsupportedEnumeration="Μη υποστηÏιζόμενη απαÏίθμηση";Strings.OfficeOM.L_FunctionCallFailed="Η κλήση συνάÏτησης {0} απέτυχε, κωδικός σφάλματος: {1}.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Δεν υποστηÏίζεται ο Ï„Ïπος ταυτότητας του χÏήστη.";Strings.OfficeOM.L_PropertyDoesNotExist='Η ιδιότητα "{0}" δεν υπάÏχει στο αντικείμενο.';Strings.OfficeOM.L_OsfControlTypeNotSupported="Ο Ï„Ïπος OsfControl δεν υποστηÏίζεται.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Ο καθοÏισμένος Ï„Ïπος σÏνδεσης δεν είναι συμβατός με το καθοÏισμένο στοιχείο που δόθηκε.";Strings.OfficeOM.L_InvalidSetColumns="Οι καθοÏισμένες στήλες δεν είναι έγκυÏες.";Strings.OfficeOM.L_RequestTokenUnavailable="Αυτό το API έχει Ïυθμιστεί για τη μείωση της συχνότητας κλήσης.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Οι πεÏιοÏισμοί του Ï€ÏογÏάμματος πεÏιήγησης δεν επιτÏέπουν τη δημιουÏγία του παÏαθÏÏου διαλόγου. Ο τομέας του παÏαθÏÏου διαλόγου και ο τομέας του κεντÏÎ¹ÎºÎ¿Ï Ï…Ï€Î¿Î»Î¿Î³Î¹ÏƒÏ„Î® του Ï€Ïόσθετου δεν βÏίσκονται στην ίδια ζώνη ασφαλείας.";Strings.OfficeOM.L_InvalidGetRows="Οι καθοÏισμένες γÏαμμές δεν είναι έγκυÏες.";Strings.OfficeOM.L_DataNotMatchCoercionType="Ο Ï„Ïπος του καθοÏισμένου αντικειμένου δεδομένων δεν είναι συμβατός με την Ï„Ïέχουσα επιλογή.";Strings.OfficeOM.L_UserClickIgnore="Ο χÏήστης επέλεξε να παÏαβλέψει το παÏάθυÏο διαλόγου.";Strings.OfficeOM.L_InvalidNode="Μη έγκυÏος κόμβος";Strings.OfficeOM.L_InvalidSelectionForBindingType="Δεν είναι δυνατή η δημιουÏγία σÏνδεσης με την Ï„Ïέχουσα επιλογή και τον Ï„Ïπο σÏνδεσης που έχει οÏιστεί.";Strings.OfficeOM.L_ValueNotLoaded="Η τιμή του αντικειμένου αποτελέσματος δεν έχει φοÏτωθεί ακόμη. ΠÏιν από την ανάγνωση της ιδιότητας τιμής, καλέστε το context.sync() στο συσχετισμένο πεÏιβάλλον αίτησης.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="ΠαÏάβλεψη";Strings.OfficeOM.L_SettingsStaleError="Σφάλμα μη ενημεÏωμένων Ïυθμίσεων";Strings.OfficeOM.L_CannotNavigateTo="Το αντικείμενο βÏίσκεται σε θέση όπου δεν υποστηÏίζεται η πεÏιήγηση.";Strings.OfficeOM.L_InvalidBindingOperation="Μη έγκυÏη λειτουÏγία σÏνδεσης";Strings.OfficeOM.L_ConnectionFailureWithStatus="Η αίτηση απέτυχε με κωδικό κατάστασης {0}.";Strings.OfficeOM.L_ElementMissing="Δεν μποÏέσαμε να μοÏφοποιήσουμε το κελί πίνακα, επειδή λείπουν οÏισμένες τιμές παÏαμέτÏων. Επαναλάβετε τον έλεγχο των παÏαμέτÏων και Ï€Ïοσπαθήστε ξανά.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Ο καθοÏισμένος Ï„Ïπος αναγκαστικής μετατÏοπής δεν είναι συμβατός με αυτόν τον Ï„Ïπο σÏνδεσης.";Strings.OfficeOM.L_HostError="Σφάλμα υποδοχής";Strings.OfficeOM.L_OverwriteWorksheetData="Η λειτουÏγία οÏÎ¹ÏƒÎ¼Î¿Ï Î±Ï€Î­Ï„Ï…Ï‡Îµ επειδή το αντικείμενο δεδομένων που δόθηκε θα αντικαταστήσει ή θα μετακινήσει δεδομένα.";Strings.OfficeOM.L_GetDataIsTooLarge="Το σÏνολο δεδομένων που ζητήθηκε είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î¿.";Strings.OfficeOM.L_TooManyOptionalObjects="πολλά Ï€ÏοαιÏετικά αντικείμενα στη λίστα παÏαμέτÏων";Strings.OfficeOM.L_NetworkProblem="ΠÏόβλημα δικτÏου";Strings.OfficeOM.L_InvalidArgument='Το ÏŒÏισμα "{0}" δεν λειτουÏγεί για αυτή την πεÏίπτωση, λείπει ή δεν έχει τη σωστή μοÏφή.';Strings.OfficeOM.L_InvalidDataObject="Μη έγκυÏο αντικείμενο δεδομένων";Strings.OfficeOM.L_NoCapability="Δεν έχετε επαÏκή δικαιώματα για αυτή την ενέÏγεια.";Strings.OfficeOM.L_Timeout="Έληξε το χÏονικό ÏŒÏιο της λειτουÏγίας. ";Strings.OfficeOM.L_SelectionCannotBound="Δεν είναι δυνατή η σÏνδεση στην Ï„Ïέχουσα επιλογή.";Strings.OfficeOM.L_InvalidGetColumns="Οι καθοÏισμένες στήλες δεν είναι έγκυÏες.";Strings.OfficeOM.L_DocumentReadOnly="Η λειτουÏγία που ζητήθηκε δεν επιτÏέπεται στην Ï„Ïέχουσα κατάσταση του εγγÏάφου.";Strings.OfficeOM.L_ReadSettingsError="Σφάλμα Ïυθμίσεων ανάγνωσης";Strings.OfficeOM.L_TooManyArguments="πάÏα πολλά οÏίσματα";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Η εφαÏμογή {0} δεν υπάÏχει. Δεν είναι δυνατή η κλήση του Microsoft.Office.WebExtension.Initialize(Reason).";Strings.OfficeOM.L_APINotSupported="Το API δεν υποστηÏίζεται";Strings.OfficeOM.L_FormattingReminder="ΥπενθÏμιση μοÏφοποίησης";Strings.OfficeOM.L_CannotWriteToSelection="Δεν είναι δυνατή η εγγÏαφή στην Ï„Ïέχουσα επιλογή.";Strings.OfficeOM.L_InvalidResourceUrl="Δόθηκε μη έγκυÏη διεÏθυνση Url πόÏου εφαÏμογής.";Strings.OfficeOM.L_TooManyIncompleteRequests="ΠεÏιμένετε μέχÏι να ολοκληÏωθεί η Ï€ÏοηγοÏμενη κλήση.";Strings.OfficeOM.L_ConnectionFailureWithDetails="Η αίτηση απέτυχε με κωδικό κατάστασης {0}, κωδικό σφάλματος {1} και το ακόλουθο μήνυμα σφάλματος: {2}";Strings.OfficeOM.L_AppNameNotExist="Το όνομα Ï€Ïοσθέτου για {0} δεν υπάÏχει.";Strings.OfficeOM.L_UnknownBindingType="Ο Ï„Ïπος σÏνδεσης δεν υποστηÏίζεται.";Strings.OfficeOM.L_SetDataIsTooLarge="Το καθοÏισμένο σÏνολο δεδομένων είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î¿.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="Η απαÏίθμηση δεν υποστηÏίζεται στην Ï„Ïέχουσα εφαÏμογή κεντÏÎ¹ÎºÎ¿Ï Ï…Ï€Î¿Î»Î¿Î³Î¹ÏƒÏ„Î®.";Strings.OfficeOM.L_UserAborted="Ο χÏήστης ματαίωσε την αίτηση συγκατάθεσης.";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Μη έγκυÏα οÏίσματα εισόδου.";Strings.OfficeOM.L_InvalidSSOAddinMessage="Το API ταυτότητας δεν υποστηÏίζεται για το Ï€Ïόσθετο.";Strings.OfficeOM.L_PropertyNotLoaded='Η ιδιότητα "{0}" δεν είναι διαθέσιμη. ΠÏιν από την ανάγνωση της τιμής της ιδιότητας, Ï€Ïαγματοποιήστε κλήση της μεθόδου φόÏτωσης στο πεÏιέχον αντικείμενο και κλήση context.sync() στο συσχετισμένο πεÏιβάλλον αίτησης.';Strings.OfficeOM.L_RowIndexOutOfRange="Η τιμή δείκτη γÏαμμής βÏίσκεται εκτός της επιτÏεπόμενης πεÏιοχής. ΧÏησιμοποιήστε μια τιμή (0 ή υψηλότεÏη) η οποία θα είναι μικÏότεÏη από το πλήθος των γÏαμμών.";Strings.OfficeOM.L_SaveSettingsError="Σφάλμα Ïυθμίσεων αποθήκευσης";Strings.OfficeOM.L_RedundantCallbackSpecification="Η επιστÏοφή κλήσης δεν μποÏεί να καθοÏιστεί ταυτόχÏονα και στη λίστα οÏισμάτων και στο Ï€ÏοαιÏετικό αντικείμενο.";Strings.OfficeOM.L_TooManyOptionalFunction="πολλές Ï€ÏοαιÏετικές συναÏτήσεις στη λίστα παÏαμέτÏων";Strings.OfficeOM.L_CustomXmlNodeNotFound="Ο καθοÏισμένος κόμβος δεν βÏέθηκε.";Strings.OfficeOM.L_DataNotMatchBindingType="Το καθοÏισμένο αντικείμενο δεδομένων δεν είναι συμβατό με τον Ï„Ïπο σÏνδεσης.";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_InvalidOrTimedOutSession="Μη έγκυÏη πεÏίοδος λειτουÏγίας ή λήξη χÏÎ¿Î½Î¹ÎºÎ¿Ï Î¿Ïίου πεÏιόδου λειτουÏγίας";Strings.OfficeOM.L_DataWriteError="Σφάλμα εγγÏαφής δεδομένων";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Αποδοχή";Strings.OfficeOM.L_InvalidReadForBlankRow="Η καθοÏισμένη γÏαμμή είναι κενή.";Strings.OfficeOM.L_MemoryLimit="Έγινε υπέÏβαση του οÏίου μνήμης";Strings.OfficeOM.L_NotImplemented="Η λειτουÏγία {0} δεν έχει υλοποιηθεί.";Strings.OfficeOM.L_DataWriteReminder="ΥπενθÏμιση εγγÏαφής δεδομένων";Strings.OfficeOM.L_ActivityLimitReached="Το ÏŒÏιο δÏαστηÏιότητας συμπληÏώθηκε.";Strings.OfficeOM.L_EventHandlerNotExist="Το καθοÏισμένο Ï€ÏόγÏαμμα χειÏÎ¹ÏƒÎ¼Î¿Ï ÏƒÏ…Î¼Î²Î¬Î½Ï„Ï‰Î½ δεν βÏέθηκε για αυτήν τη σÏνδεση.";Strings.OfficeOM.L_SettingsAreStale="Δεν ήταν δυνατή η αποθήκευση των Ïυθμίσεων, επειδή δεν είναι ενημεÏωμένες.";Strings.OfficeOM.L_IndexOutOfRange="Δείκτης εκτός πεÏιοχής.";Strings.OfficeOM.L_BindingCreationError="Σφάλμα δημιουÏγίας σÏνδεσης";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Ένα Ï€Ïόβλημα δικτÏου εμπόδισε την ανάκτηση του αÏχείου.";Strings.OfficeOM.L_FileTypeNotSupported="Ο καθοÏισμένος Ï„Ïπος αÏχείου δεν υποστηÏίζεται.";Strings.OfficeOM.L_InvalidResourceUrlMessage="Η διεÏθυνση URL πόÏου που έχει καθοÏιστεί στη διακήÏυξη δεν είναι έγκυÏη.";Strings.OfficeOM.L_MultipleNamedItemFound="Î’Ïέθηκαν πολλά αντικείμενα με το ίδιο όνομα.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Επιλέξτε.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Οι παÏάμετÏοι συντεταγμένων δεν είναι δυνατό να χÏησιμοποιηθοÏν με πίνακα Ï„Ïπου αναγκαστικής μετατÏοπής όταν ο πίνακας πεÏιέχει συγχωνευμένα κελιά.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Η Ï„Ïέχουσα επιλογή δεν είναι συμβατή με τον καθοÏισμένο Ï„Ïπο αναγκαστικής μετατÏοπής.";Strings.OfficeOM.L_InvalidArgumentGeneric="Τα οÏίσματα που διαβιβάστηκαν στη συνάÏτηση δεν λειτουÏγοÏν για αυτή την πεÏίπτωση, λείπουν ή δεν έχουν σωστή μοÏφή.";Strings.OfficeOM.L_CannotRegisterEvent="Δεν είναι δυνατή η καταχώÏηση του Ï€ÏογÏάμματος χειÏÎ¹ÏƒÎ¼Î¿Ï ÏƒÏ…Î¼Î²Î¬Î½Ï„Ï‰Î½.";Strings.OfficeOM.L_PermissionDenied="Δεν έχετε δικαίωμα Ï€Ïόσβασης";Strings.OfficeOM.L_CustomXmlError="Σφάλμα Ï€ÏοσαÏμοσμένης XML.";Strings.OfficeOM.L_EventRegistrationError="Σφάλμα καταχώÏησης συμβάντων";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod='Δεν είναι δυνατή η εφαÏμογή των αλλαγών στην ιδιότητα "{0}" μέσω μιας μεθόδου "object.set".';Strings.OfficeOM.L_ShuttingDown="Η λειτουÏγία απέτυχε, επειδή τα δεδομένα στο διακομιστή δεν είναι ενημεÏωμένα.";Strings.OfficeOM.L_DisplayDialogError="Εμφάνιση σφάλματος παÏαθÏÏου διαλόγου";Strings.OfficeOM.L_OperationNotSupported="Η λειτουÏγία δεν υποστηÏίζεται.";Strings.OfficeOM.L_UnsupportedDataObject="Ο Ï„Ïπος του αντικειμένου δεδομένων που δόθηκε δεν υποστηÏίζεται.";Strings.OfficeOM.L_InternalErrorDescription="ΠαÏουσιάστηκε εσωτεÏικό σφάλμα.";Strings.OfficeOM.L_InvalidGrantMessage="Δεν έχει γίνει εκχώÏηση δικαιωμάτων για αυτό το Ï€Ïόσθετο.";Strings.OfficeOM.L_BrowserAPINotSupported="Αυτό το Ï€ÏόγÏαμμα πεÏιήγησης δεν υποστηÏίζει το API που ζητήθηκε.";Strings.OfficeOM.L_DialogInvalidScheme="Ο συνδυασμός διευθÏνσεων URL δεν υποστηÏίζεται. ΧÏησιμοποιήστε εναλλακτικά το HTTPS.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Σημείωση: Τα σÏνολα μοÏφοποίησης που οÏίζονται από μια κλήση Formatting API Ï€Ïοτείνεται να είναι κάτω από 100.";Strings.OfficeOM.L_NotSupported="Η συνάÏτηση {0} δεν υποστηÏίζεται.";Strings.OfficeOM.L_InvalidSetStartRowColumn="Οι καθοÏισμένες τιμές startRow ή startColumn δεν είναι έγκυÏες.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Οι καθοÏισμένες τιμές της rowCount ή columnCount δεν είναι έγκυÏες.";Strings.OfficeOM.L_NewWindowCrossZone='Οι Ïυθμίσεις ασφαλείας στο Ï€ÏόγÏαμμα πεÏιήγησης δεν επιτÏέπουν τη δημιουÏγία ενός παÏαθÏÏου διαλόγου. Δοκιμάστε ένα διαφοÏετικό Ï€ÏόγÏαμμα πεÏιήγησης ή {0} ώστε ο τομέας "{1}" και ο τομέας που εμφανίζεται στη γÏαμμή διευθÏνσεων να βÏίσκονται στην ίδια ζώνη ασφαλείας.';Strings.OfficeOM.L_InitializeNotReady="Η φόÏτωση του Office.js δεν έχει ολοκληÏωθεί ακόμη. ΠÏοσπαθήστε ξανά αÏγότεÏα ή Ï€Ïοσθέστε τον κώδικα Ï€Ïοετοιμασίας στη συνάÏτηση Office.initialize.";Strings.OfficeOM.L_OutOfRange="Εκτός πεÏιοχής";Strings.OfficeOM.L_DialogNavigateError="Σφάλμα πεÏιήγησης παÏαθÏÏου διαλόγου";Strings.OfficeOM.L_MissingParameter="Λείπει παÏάμετÏος";Strings.OfficeOM.L_SSOServerErrorMessage="ΠαÏουσιάστηκε μη αναμενόμενο σφάλμα στο διακομιστή.";Strings.OfficeOM.L_SettingNameNotExist="Δεν υπάÏχει το όνομα της καθοÏισμένης ÏÏθμισης.";Strings.OfficeOM.L_InvalidFormatValue="Μία ή πεÏισσότεÏες από τις παÏαμέτÏους μοÏφοποίησης έχουν τιμές που δεν επιτÏέπονται. Επαναλάβετε τον έλεγχο των τιμών και Ï€Ïοσπαθήστε ξανά.";Strings.OfficeOM.L_InvalidFormat="Σφάλμα μη έγκυÏης μοÏφής";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="Η πεÏίοδος λειτουÏγίας του Office Online έχει λήξει ή δεν είναι έγκυÏη. Για να συνεχίσετε, ανανεώστε τη σελίδα.";Strings.OfficeOM.L_DialogRequireHTTPS="Το Ï€Ïωτόκολλο HTTP δεν υποστηÏίζεται. ΧÏησιμοποιήστε εναλλακτικά το HTTPS";Strings.OfficeOM.L_SetDataParametersConflict="Οι καθοÏισμένες παÏάμετÏοι παÏουσιάζουν διένεξη.";Strings.OfficeOM.L_SpecifiedIdNotExist="Το καθοÏισμένο αναγνωÏιστικό δεν υπάÏχει.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Τα δεδομένα δεν είναι ενημεÏωμένα. Ανακτήσετε ξανά το αντικείμενο.";Strings.OfficeOM.L_InvalidObjectPath="Η διαδÏομή αντικειμένου {0} δεν λειτουÏγεί για την ενέÏγεια που Ï€Ïοσπαθείτε να κάνετε. Αν χÏησιμοποιείτε το αντικείμενο σε πολλές κλήσεις context.sync και εκτός της σειÏιακής εκτέλεσης μιας δέσμης .run, χÏησιμοποιήστε τις μεθόδους context.trackedObjects.add() και context.trackedObjects.remove() για να διαχειÏιστείτε τη διάÏκεια ζωής του αντικειμένου.";Strings.OfficeOM.L_UnsupportedUserIdentity="Δεν υποστηÏίζεται ο Ï„Ïπος ταυτότητας χÏήστη.";Strings.OfficeOM.L_BadSelectorString="Η συμβολοσειÏά που πεÏνά στον επιλογέα δεν είναι σωστά διαμοÏφωμένη ή δεν υποστηÏίζεται.";Strings.OfficeOM.L_RequestTimeout="Η εκτέλεση της κλήσης καθυστέÏησε.";Strings.OfficeOM.L_ColIndexOutOfRange="Η τιμή δείκτη στήλης βÏίσκεται εκτός της επιτÏεπόμενης πεÏιοχής. ΧÏησιμοποιήστε μια τιμή (0 ή υψηλότεÏη) η οποία θα είναι μικÏότεÏη από το πλήθος των στηλών.";Strings.OfficeOM.L_DataNotMatchSelection="Το αντικείμενο δεδομένων που δόθηκε δεν είναι συμβατό με το σχήμα ή τις διαστάσεις της Ï„Ïέχουσας επιλογής.";Strings.OfficeOM.L_DataReadError="Σφάλμα ανάγνωσης δεδομένων";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Το επιλεγμένο πεÏιεχόμενο Ï€Ïέπει να είναι σε μοÏφή πίνακα. ΜοÏφοποιήστε τα δεδομένα ως πίνακα και Ï€Ïοσπαθήστε ξανά.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Η λειτουÏγία απέτυχε επειδή αυτό το Ï€Ïόσθετο απαιτεί ήδη διακÏιτικό Ï€Ïόσβασης.";Strings.OfficeOM.L_EventHandlerRemovalFailed="Απέτυχε η κατάÏγηση του Ï€ÏογÏάμματος χειÏÎ¹ÏƒÎ¼Î¿Ï ÏƒÏ…Î¼Î²Î¬Î½Ï„Ï‰Î½.";Strings.OfficeOM.L_SSOClientErrorMessage="ΠαÏουσιάστηκε μη αναμενόμενο σφάλμα στο Ï€ÏόγÏαμμα-πελάτη.";Strings.OfficeOM.L_NamedItemNotFound="Το καθοÏισμένο στοιχείο δεν υπάÏχει.";Strings.OfficeOM.L_MissingRequiredArguments="απουσιάζουν κάποια απαιτοÏμενα οÏίσματα";Strings.OfficeOM.L_SliceSizeNotSupported="Το καθοÏισμένο μέγεθος φέτας δεν υποστηÏίζεται.";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Κλήση closeAsync στο Ï„Ïέχον αÏχείο Ï€Ïιν από την ανάκτηση άλλου.";Strings.OfficeOM.L_SettingsCannotSave="Δεν ήταν δυνατή η αποθήκευση των Ïυθμίσεων.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="Ïυθμίστε τις παÏαμέτÏους του Ï€ÏογÏάμματος πεÏιήγησης";Strings.OfficeOM.L_GetSelectionNotSupported="Η Ï„Ïέχουσα επιλογή δεν υποστηÏίζεται.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Μη ενημεÏωμένα δεδομένα";Strings.OfficeOM.L_UserNotSignedIn="Κανένας χÏήστης δεν έχει συνδεθεί στο Office.";Strings.OfficeOM.L_InvalidGrant="Λείπει η Ï€Ïοεξουσιοδότηση.";Strings.OfficeOM.L_InvalidRequestContext="Δεν είναι δυνατή η χÏήση του αντικειμένου σε διαφοÏετικά πεÏιβάλλοντα αίτησης.";Strings.OfficeOM.L_RunMustReturnPromise="Η συνάÏτηση δέσμης που διαβιβάστηκε στη μέθοδο .run δεν επέστÏεψε υπόσχεση. Η συνάÏτηση Ï€Ïέπει να επιστÏέφει υπόσχεση, ώστε να είναι δυνατή η αποδέσμευση τυχόν αντικειμένων που παÏακολουθοÏνται αυτόματα κατά την ολοκλήÏωση της λειτουÏγίας δέσμης. Συνήθως, η επιστÏοφή υπόσχεσης γίνεται με την επιστÏοφή της απόκÏισης από το context.sync().";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Σημείωση: Το πλήθος των κελιών σε έναν πίνακα Ï€Ïοτείνεται να είναι κάτω από 20.000 κελιά.";Strings.OfficeOM.L_CallbackNotAFunction="Η επιστÏοφή κλήσης Ï€Ïέπει να είναι Ï„Ïπου συνάÏτησης, ήταν Ï„Ïπου {0}.";Strings.OfficeOM.L_InValidOptionalArgument="μη έγκυÏο Ï€ÏοαιÏετικό ÏŒÏισμα";Strings.OfficeOM.L_InvalidDataFormat="Η μοÏφή του καθοÏισμένου αντικειμένου δεδομένων δεν είναι έγκυÏη.";Strings.OfficeOM.L_InvalidColumnsForBinding="Οι καθοÏισμένες στήλες δεν είναι έγκυÏες.";Strings.OfficeOM.L_InvalidGetStartRowColumn="Οι καθοÏισμένες τιμές startRow ή startColumn δεν είναι έγκυÏες.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Το Ï€Ïόσθετο απαιτεί ήδη ένα διακÏιτικό Ï€Ïόσβασης.";Strings.OfficeOM.L_NavOutOfBound="Η λειτουÏγία απέτυχε επειδή ο δείκτης είναι εκτός πεÏιοχής.";Strings.OfficeOM.L_DialogAlreadyOpened="Η λειτουÏγία απέτυχε, επειδή αυτό το Ï€Ïόσθετο έχει ήδη ένα ενεÏγό παÏάθυÏο διαλόγου.";Strings.OfficeOM.L_CoercionTypeNotSupported="Ο καθοÏισμένος Ï„Ïπος αναγκαστικής μετατÏοπής δεν υποστηÏίζεται.";Strings.OfficeOM.L_InvalidSetRows="Οι καθοÏισμένες γÏαμμές δεν είναι έγκυÏες.";Strings.OfficeOM.L_InvalidCellsValue="Μία ή πεÏισσότεÏες από τις παÏαμέτÏους κελιών έχουν τιμές που δεν επιτÏέπονται. Επαναλάβετε τον έλεγχο των τιμών και Ï€Ïοσπαθήστε ξανά." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_AppNameNotExist="Το όνομα Ï€Ïοσθέτου για {0} δεν υπάÏχει.";Strings.OfficeOM.L_FormatValueOutOfRange="Η τιμή είναι εκτός της επιτÏεπόμενης πεÏιοχής.";Strings.OfficeOM.L_SpecifiedIdNotExist="Το καθοÏισμένο αναγνωÏιστικό δεν υπάÏχει.";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Μη έγκυÏα οÏίσματα εισόδου.";Strings.OfficeOM.L_UnsupportedDataObject="Ο Ï„Ïπος του αντικειμένου δεδομένων που δόθηκε δεν υποστηÏίζεται.";Strings.OfficeOM.L_InvalidObjectPath="Η διαδÏομή αντικειμένου {0} δεν λειτουÏγεί για την ενέÏγεια που Ï€Ïοσπαθείτε να κάνετε. Αν χÏησιμοποιείτε το αντικείμενο σε πολλές κλήσεις context.sync και εκτός της σειÏιακής εκτέλεσης μιας δέσμης .run, χÏησιμοποιήστε τις μεθόδους context.trackedObjects.add() και context.trackedObjects.remove() για να διαχειÏιστείτε τη διάÏκεια ζωής του αντικειμένου.";Strings.OfficeOM.L_InvalidResourceUrl="Δόθηκε μη έγκυÏη διεÏθυνση Url πόÏου εφαÏμογής.";Strings.OfficeOM.L_DataStale="Μη ενημεÏωμένα δεδομένα";Strings.OfficeOM.L_BindingToMultipleSelection="Οι μη συνεχόμενες επιλογές δεν υποστηÏίζονται.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="Το XPath πεÏιοÏίζει την επιλογή στα 1024 στοιχεία.";Strings.OfficeOM.L_InitializeNotReady="Η φόÏτωση του Office.js δεν έχει ολοκληÏωθεί ακόμη. ΠÏοσπαθήστε ξανά αÏγότεÏα ή Ï€Ïοσθέστε τον κώδικα Ï€Ïοετοιμασίας στη συνάÏτηση Office.initialize.";Strings.OfficeOM.L_CoercionTypeNotSupported="Ο καθοÏισμένος Ï„Ïπος αναγκαστικής μετατÏοπής δεν υποστηÏίζεται.";Strings.OfficeOM.L_DataWriteError="Σφάλμα εγγÏαφής δεδομένων";Strings.OfficeOM.L_BadSelectorString="Η συμβολοσειÏά που πεÏνά στον επιλογέα δεν είναι σωστά διαμοÏφωμένη ή δεν υποστηÏίζεται.";Strings.OfficeOM.L_SetDataIsTooLarge="Το καθοÏισμένο σÏνολο δεδομένων είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î¿.";Strings.OfficeOM.L_MultipleNamedItemFound="Î’Ïέθηκαν πολλά αντικείμενα με το ίδιο όνομα.";Strings.OfficeOM.L_NotImplemented="Η λειτουÏγία {0} δεν έχει υλοποιηθεί.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="ΣυμπλήÏωση οÏίου επιλογής";Strings.OfficeOM.L_ConnectionFailureWithStatus="Η αίτηση απέτυχε με κωδικό κατάστασης {0}.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Οι πεÏιοÏισμοί του Ï€ÏογÏάμματος πεÏιήγησης δεν επιτÏέπουν τη δημιουÏγία του παÏαθÏÏου διαλόγου. Ο τομέας του παÏαθÏÏου διαλόγου και ο τομέας του κεντÏÎ¹ÎºÎ¿Ï Ï…Ï€Î¿Î»Î¿Î³Î¹ÏƒÏ„Î® του Ï€Ïόσθετου δεν βÏίσκονται στην ίδια ζώνη ασφαλείας.";Strings.OfficeOM.L_DataReadError="Σφάλμα ανάγνωσης δεδομένων";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Ο καθοÏισμένος Ï„Ïπος αναγκαστικής μετατÏοπής δεν είναι συμβατός με αυτόν τον Ï„Ïπο σÏνδεσης.";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Κλήση closeAsync στο Ï„Ïέχον αÏχείο Ï€Ïιν από την ανάκτηση άλλου.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Απέτυχε η Ï€Ïοσθήκη του Ï€ÏογÏάμματος χειÏÎ¹ÏƒÎ¼Î¿Ï ÏƒÏ…Î¼Î²Î¬Î½Ï„Ï‰Î½.";Strings.OfficeOM.L_OsfControlTypeNotSupported="Ο Ï„Ïπος OsfControl δεν υποστηÏίζεται.";Strings.OfficeOM.L_SettingsCannotSave="Δεν ήταν δυνατή η αποθήκευση των Ïυθμίσεων.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="ΠαÏάβλεψη";Strings.OfficeOM.L_InvalidSetColumns="Οι καθοÏισμένες στήλες δεν είναι έγκυÏες.";Strings.OfficeOM.L_InvalidNode="Μη έγκυÏος κόμβος";Strings.OfficeOM.L_BindingNotExist="Δεν υπάÏχει η καθοÏισμένη σÏνδεση.";Strings.OfficeOM.L_NotSupportedBindingType="Ο καθοÏισμένος Ï„Ïπος σÏνδεσης {0} δεν υποστηÏίζεται.";Strings.OfficeOM.L_DataNotMatchCoercionType="Ο Ï„Ïπος του καθοÏισμένου αντικειμένου δεδομένων δεν είναι συμβατός με την Ï„Ïέχουσα επιλογή.";Strings.OfficeOM.L_TooManyIncompleteRequests="ΠεÏιμένετε μέχÏι να ολοκληÏωθεί η Ï€ÏοηγοÏμενη κλήση.";Strings.OfficeOM.L_DataWriteReminder="ΥπενθÏμιση εγγÏαφής δεδομένων";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Τα δεδομένα δεν είναι ενημεÏωμένα. Ανακτήσετε ξανά το αντικείμενο.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Ο καθοÏισμένος Ï„Ïπος σÏνδεσης δεν είναι συμβατός με το καθοÏισμένο στοιχείο που δόθηκε.";Strings.OfficeOM.L_FunctionCallFailed="Η κλήση συνάÏτησης {0} απέτυχε, κωδικός σφάλματος: {1}.";Strings.OfficeOM.L_DisplayDialogError="Εμφάνιση σφάλματος παÏαθÏÏου διαλόγου";Strings.OfficeOM.L_NetworkProblem="ΠÏόβλημα δικτÏου";Strings.OfficeOM.L_DialogNavigateError="Σφάλμα πεÏιήγησης παÏαθÏÏου διαλόγου";Strings.OfficeOM.L_UnsupportedEnumerationMessage="Η απαÏίθμηση δεν υποστηÏίζεται στην Ï„Ïέχουσα εφαÏμογή κεντÏÎ¹ÎºÎ¿Ï Ï…Ï€Î¿Î»Î¿Î³Î¹ÏƒÏ„Î®.";Strings.OfficeOM.L_ColIndexOutOfRange="Η τιμή δείκτη στήλης βÏίσκεται εκτός της επιτÏεπόμενης πεÏιοχής. ΧÏησιμοποιήστε μια τιμή (0 ή υψηλότεÏη) η οποία θα είναι μικÏότεÏη από το πλήθος των στηλών.";Strings.OfficeOM.L_DocumentReadOnly="Η λειτουÏγία που ζητήθηκε δεν επιτÏέπεται στην Ï„Ïέχουσα κατάσταση του εγγÏάφου.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod='Δεν είναι δυνατή η εφαÏμογή των αλλαγών στην ιδιότητα "{0}" μέσω μιας μεθόδου "object.set".';Strings.OfficeOM.L_GetSelectionNotSupported="Η Ï„Ïέχουσα επιλογή δεν υποστηÏίζεται.";Strings.OfficeOM.L_InvalidTableOptionValue="Μία ή πεÏισσότεÏες από τις παÏαμέτÏους tableOptions έχουν τιμές που δεν επιτÏέπονται. Επαναλάβετε τον έλεγχο των τιμών και Ï€Ïοσπαθήστε ξανά.";Strings.OfficeOM.L_DialogInvalidScheme="Ο συνδυασμός διευθÏνσεων URL δεν υποστηÏίζεται. ΧÏησιμοποιήστε εναλλακτικά το HTTPS.";Strings.OfficeOM.L_RowIndexOutOfRange="Η τιμή δείκτη γÏαμμής βÏίσκεται εκτός της επιτÏεπόμενης πεÏιοχής. ΧÏησιμοποιήστε μια τιμή (0 ή υψηλότεÏη) η οποία θα είναι μικÏότεÏη από το πλήθος των γÏαμμών.";Strings.OfficeOM.L_ReadSettingsError="Σφάλμα Ïυθμίσεων ανάγνωσης";Strings.OfficeOM.L_NamedItemNotFound="Το καθοÏισμένο στοιχείο δεν υπάÏχει.";Strings.OfficeOM.L_InValidOptionalArgument="μη έγκυÏο Ï€ÏοαιÏετικό ÏŒÏισμα";Strings.OfficeOM.L_UserAborted="Ο χÏήστης ματαίωσε την αίτηση συγκατάθεσης.";Strings.OfficeOM.L_InvalidCellsValue="Μία ή πεÏισσότεÏες από τις παÏαμέτÏους κελιών έχουν τιμές που δεν επιτÏέπονται. Επαναλάβετε τον έλεγχο των τιμών και Ï€Ïοσπαθήστε ξανά.";Strings.OfficeOM.L_BindingCreationError="Σφάλμα δημιουÏγίας σÏνδεσης";Strings.OfficeOM.L_DialogAlreadyOpened="Η λειτουÏγία απέτυχε, επειδή αυτό το Ï€Ïόσθετο έχει ήδη ένα ενεÏγό παÏάθυÏο διαλόγου.";Strings.OfficeOM.L_InvalidSelectionForBindingType="Δεν είναι δυνατή η δημιουÏγία σÏνδεσης με την Ï„Ïέχουσα επιλογή και τον Ï„Ïπο σÏνδεσης που έχει οÏιστεί.";Strings.OfficeOM.L_SSOConnectionLostError="A connection was lost during the sign in process.";Strings.OfficeOM.L_CustomXmlError="Σφάλμα Ï€ÏοσαÏμοσμένης XML.";Strings.OfficeOM.L_InvalidFormat="Σφάλμα μη έγκυÏης μοÏφής";Strings.OfficeOM.L_IndexOutOfRange="Δείκτης εκτός πεÏιοχής.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Οι παÏάμετÏοι συντεταγμένων δεν είναι δυνατό να χÏησιμοποιηθοÏν με πίνακα Ï„Ïπου αναγκαστικής μετατÏοπής όταν ο πίνακας πεÏιέχει συγχωνευμένα κελιά.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Οι παÏάμετÏοι συντεταγμένων δεν είναι δυνατό να χÏησιμοποιηθοÏν με πίνακα Ï„Ïπου αναγκαστικής μετατÏοπής όταν ο πίνακας πεÏιέχει συγχωνευμένα κελιά.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Μη ενημεÏωμένα δεδομένα";Strings.OfficeOM.L_InternalErrorDescription="ΠαÏουσιάστηκε εσωτεÏικό σφάλμα.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Η λειτουÏγία απέτυχε επειδή αυτό το Ï€Ïόσθετο απαιτεί ήδη διακÏιτικό Ï€Ïόσβασης.";Strings.OfficeOM.L_SSOClientError="ΠαÏουσιάστηκε σφάλμα στην αίτηση ελέγχου ταυτότητας από το Office.";Strings.OfficeOM.L_APICallFailed="Απέτυχε η κλήση API";Strings.OfficeOM.L_ActivityLimitReached="Το ÏŒÏιο δÏαστηÏιότητας συμπληÏώθηκε.";Strings.OfficeOM.L_PermissionDenied="Δεν έχετε δικαίωμα Ï€Ïόσβασης";Strings.OfficeOM.L_FormattingReminder="ΥπενθÏμιση μοÏφοποίησης";Strings.OfficeOM.L_InvalidSetRows="Οι καθοÏισμένες γÏαμμές δεν είναι έγκυÏες.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="Η πεÏίοδος λειτουÏγίας του Office Online έχει λήξει ή δεν είναι έγκυÏη. Για να συνεχίσετε, ανανεώστε τη σελίδα.";Strings.OfficeOM.L_TooManyArguments="πάÏα πολλά οÏίσματα";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Σημείωση: Το πλήθος των κελιών σε έναν πίνακα Ï€Ïοτείνεται να είναι κάτω από 20.000 κελιά.";Strings.OfficeOM.L_NoCapability="Δεν έχετε επαÏκή δικαιώματα για αυτή την ενέÏγεια.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Το Ï€Ïόσθετο απαιτεί ήδη ένα διακÏιτικό Ï€Ïόσβασης.";Strings.OfficeOM.L_ElementMissing="Δεν μποÏέσαμε να μοÏφοποιήσουμε το κελί πίνακα, επειδή λείπουν οÏισμένες τιμές παÏαμέτÏων. Επαναλάβετε τον έλεγχο των παÏαμέτÏων και Ï€Ïοσπαθήστε ξανά.";Strings.OfficeOM.L_CustomFunctionDefinitionMissing="ΠÏέπει να υπάÏχει μια ιδιότητα με αυτό το όνομα που αναπαÏιστά τον οÏισμό της συνάÏτησης στην κλάση Excel.CustomFunctions.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Ένα Ï€Ïόβλημα δικτÏου εμπόδισε την ανάκτηση του αÏχείου.";Strings.OfficeOM.L_DataNotMatchBindingType="Το καθοÏισμένο αντικείμενο δεδομένων δεν είναι συμβατό με τον Ï„Ïπο σÏνδεσης.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Επιλέξτε.";Strings.OfficeOM.L_CustomXmlNodeNotFound="Ο καθοÏισμένος κόμβος δεν βÏέθηκε.";Strings.OfficeOM.L_Timeout="Έληξε το χÏονικό ÏŒÏιο της λειτουÏγίας. ";Strings.OfficeOM.L_NavOutOfBound="Η λειτουÏγία απέτυχε επειδή ο δείκτης είναι εκτός πεÏιοχής.";Strings.OfficeOM.L_ShowWindowDialogNotification="Το Ï€Ïόσθετο {0} θέλει να εμφανίσει ένα νέο παÏάθυÏο.";Strings.OfficeOM.L_InvalidBinding="Μη έγκυÏη σÏνδεση";Strings.OfficeOM.L_ValueNotLoaded="Η τιμή του αντικειμένου αποτελέσματος δεν έχει φοÏτωθεί ακόμη. ΠÏιν από την ανάγνωση της ιδιότητας τιμής, καλέστε το context.sync() στο συσχετισμένο πεÏιβάλλον αίτησης.";Strings.OfficeOM.L_OverwriteWorksheetData="Η λειτουÏγία οÏÎ¹ÏƒÎ¼Î¿Ï Î±Ï€Î­Ï„Ï…Ï‡Îµ επειδή το αντικείμενο δεδομένων που δόθηκε θα αντικαταστήσει ή θα μετακινήσει δεδομένα.";Strings.OfficeOM.L_UserAbortedMessage="Ο χÏήστης δεν εκχώÏησε τα δικαιώματα για το Ï€Ïόσθετο.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="Ïυθμίστε τις παÏαμέτÏους του Ï€ÏογÏάμματος πεÏιήγησης";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Οι καθοÏισμένες τιμές της rowCount ή columnCount δεν είναι έγκυÏες.";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_DialogAddressNotTrusted="Ο τομέας του URL δεν πεÏιλαμβάνεται στο στοιχείο AppDomains στη διακήÏυξη.";Strings.OfficeOM.L_OperationNotSupported="Η λειτουÏγία δεν υποστηÏίζεται.";Strings.OfficeOM.L_InvalidBindingOperation="Μη έγκυÏη λειτουÏγία σÏνδεσης";Strings.OfficeOM.L_BrowserAPINotSupported="Αυτό το Ï€ÏόγÏαμμα πεÏιήγησης δεν υποστηÏίζει το API που ζητήθηκε.";Strings.OfficeOM.L_EventHandlerNotExist="Το καθοÏισμένο Ï€ÏόγÏαμμα χειÏÎ¹ÏƒÎ¼Î¿Ï ÏƒÏ…Î¼Î²Î¬Î½Ï„Ï‰Î½ δεν βÏέθηκε για αυτήν τη σÏνδεση.";Strings.OfficeOM.L_SaveSettingsError="Σφάλμα Ïυθμίσεων αποθήκευσης";Strings.OfficeOM.L_InvalidArgumentGeneric="Τα οÏίσματα που διαβιβάστηκαν στη συνάÏτηση δεν λειτουÏγοÏν για αυτή την πεÏίπτωση, λείπουν ή δεν έχουν σωστή μοÏφή.";Strings.OfficeOM.L_SettingNameNotExist="Δεν υπάÏχει το όνομα της καθοÏισμένης ÏÏθμισης.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Το επιλεγμένο πεÏιεχόμενο Ï€Ïέπει να είναι σε μοÏφή πίνακα. ΜοÏφοποιήστε τα δεδομένα ως πίνακα και Ï€Ïοσπαθήστε ξανά.";Strings.OfficeOM.L_CustomFunctionNameContainsBadChars="Το όνομα της συνάÏτησης Ï€Ïέπει να πεÏιέχει μόνο γÏάμματα, ψηφία, χαÏακτήÏες υπογÏάμμισης και τελείες.";Strings.OfficeOM.L_SettingsStaleError="Σφάλμα μη ενημεÏωμένων Ïυθμίσεων";Strings.OfficeOM.L_InvalidColumnsForBinding="Οι καθοÏισμένες στήλες δεν είναι έγκυÏες.";Strings.OfficeOM.L_NotSupportedEventType="Ο καθοÏισμένος Ï„Ïπος συμβάντος {0} δεν υποστηÏίζεται.";Strings.OfficeOM.L_NewWindowCrossZone='Οι Ïυθμίσεις ασφαλείας στο Ï€ÏόγÏαμμα πεÏιήγησης δεν επιτÏέπουν τη δημιουÏγία ενός παÏαθÏÏου διαλόγου. Δοκιμάστε ένα διαφοÏετικό Ï€ÏόγÏαμμα πεÏιήγησης ή {0} ώστε ο τομέας "{1}" και ο τομέας που εμφανίζεται στη γÏαμμή διευθÏνσεων να βÏίσκονται στην ίδια ζώνη ασφαλείας.';Strings.OfficeOM.L_InvalidResourceUrlMessage="Η διεÏθυνση URL πόÏου που έχει καθοÏιστεί στη διακήÏυξη δεν είναι έγκυÏη.";Strings.OfficeOM.L_SettingsAreStale="Δεν ήταν δυνατή η αποθήκευση των Ïυθμίσεων, επειδή δεν είναι ενημεÏωμένες.";Strings.OfficeOM.L_SSOServerErrorMessage="ΠαÏουσιάστηκε μη αναμενόμενο σφάλμα στο διακομιστή.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Σημείωση: Τα σÏνολα μοÏφοποίησης που οÏίζονται από μια κλήση Formatting API Ï€Ïοτείνεται να είναι κάτω από 100.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory="Αυτό το Ï€Ïόσθετο δεν υποστηÏίζει τη συγκατάθεση του χÏήστη.";Strings.OfficeOM.L_InvalidApiCallInContext="Μη έγκυÏη κλήση API στο Ï„Ïέχον πεÏιβάλλον.";Strings.OfficeOM.L_UnsupportedEnumeration="Μη υποστηÏιζόμενη απαÏίθμηση";Strings.OfficeOM.L_SSOServerError="ΠαÏουσιάστηκε σφάλμα στην υπηÏεσία παÏοχής ελέγχου ταυτότητας.";Strings.OfficeOM.L_UserNotSignedIn="Κανένας χÏήστης δεν έχει συνδεθεί στο Office.";Strings.OfficeOM.L_UnknownBindingType="Ο Ï„Ïπος σÏνδεσης δεν υποστηÏίζεται.";Strings.OfficeOM.L_ConnectionFailureWithDetails="Η αίτηση απέτυχε με κωδικό κατάστασης {0}, κωδικό σφάλματος {1} και το ακόλουθο μήνυμα σφάλματος: {2}";Strings.OfficeOM.L_CustomFunctionImplementationMissing="Η ιδιότητα με αυτό το όνομα στην κλάση Excel.CustomFunctions που αναπαÏιστά τον οÏισμό της συνάÏτησης Ï€Ïέπει να πεÏιέχει μια ιδιότητα 'call' που υλοποιεί τη συνάÏτηση.";Strings.OfficeOM.L_InvalidAPICall="Μη έγκυÏη κλήση API";Strings.OfficeOM.L_SSOConnectionLostErrorMessage="A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones.";Strings.OfficeOM.L_InvalidGrantMessage="Δεν έχει γίνει εκχώÏηση δικαιωμάτων για αυτό το Ï€Ïόσθετο.";Strings.OfficeOM.L_MissingParameter="Λείπει παÏάμετÏος";Strings.OfficeOM.L_InvalidOperationInCellEditMode="Το Excel βÏίσκεται σε λειτουÏγία επεξεÏγασίας κελιοÏ. ΤεÏματίστε τη λειτουÏγία επεξεÏγασίας, πατώντας το πλήκτÏο ENTER ή TAB ή επιλέγοντας ένα άλλο κελί και, στη συνέχεια, Ï€Ïοσπαθήστε ξανά.";Strings.OfficeOM.L_CannotWriteToSelection="Δεν είναι δυνατή η εγγÏαφή στην Ï„Ïέχουσα επιλογή.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage="Η λειτουÏγία απέτυχε, καθώς αυτό το Ï€Ïόσθετο δεν υποστηÏίζει τη συγκατάθεση του χÏήστη σε αυτή την κατηγοÏία";Strings.OfficeOM.L_GetDataIsTooLarge="Το σÏνολο δεδομένων που ζητήθηκε είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î¿.";Strings.OfficeOM.L_GetDataParametersConflict="Οι καθοÏισμένες παÏάμετÏοι παÏουσιάζουν διένεξη.";Strings.OfficeOM.L_InvalidGetRows="Οι καθοÏισμένες γÏαμμές δεν είναι έγκυÏες.";Strings.OfficeOM.L_InvalidDataFormat="Η μοÏφή του καθοÏισμένου αντικειμένου δεδομένων δεν είναι έγκυÏη.";Strings.OfficeOM.L_InvalidReadForBlankRow="Η καθοÏισμένη γÏαμμή είναι κενή.";Strings.OfficeOM.L_SetDataParametersConflict="Οι καθοÏισμένες παÏάμετÏοι παÏουσιάζουν διένεξη.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Αποδοχή";Strings.OfficeOM.L_FileTypeNotSupported="Ο καθοÏισμένος Ï„Ïπος αÏχείου δεν υποστηÏίζεται.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Η Ï„Ïέχουσα επιλογή δεν είναι συμβατή με τον καθοÏισμένο Ï„Ïπο αναγκαστικής μετατÏοπής.";Strings.OfficeOM.L_MissingRequiredArguments="απουσιάζουν κάποια απαιτοÏμενα οÏίσματα";Strings.OfficeOM.L_RequestTimeout="Η εκτέλεση της κλήσης καθυστέÏησε.";Strings.OfficeOM.L_TooManyOptionalFunction="πολλές Ï€ÏοαιÏετικές συναÏτήσεις στη λίστα παÏαμέτÏων";Strings.OfficeOM.L_DataNotMatchBindingSize="Το αντικείμενο δεδομένων που δόθηκε δεν αντιστοιχεί στο μέγεθος της Ï„Ïέχουσας επιλογής.";Strings.OfficeOM.L_ApiNotFoundDetails="Η μέθοδος ή ιδιότητα {0} είναι μέÏος του συνόλου απαιτήσεων {1}, το οποίο δεν είναι διαθέσιμο στην δική σας έκδοση του {2}.";Strings.OfficeOM.L_OutOfRange="Εκτός πεÏιοχής";Strings.OfficeOM.L_SelectionCannotBound="Δεν είναι δυνατή η σÏνδεση στην Ï„Ïέχουσα επιλογή.";Strings.OfficeOM.L_InternalError="ΕσωτεÏικό σφάλμα";Strings.OfficeOM.L_InvalidGetColumns="Οι καθοÏισμένες στήλες δεν είναι έγκυÏες.";Strings.OfficeOM.L_TooManyOptionalObjects="πολλά Ï€ÏοαιÏετικά αντικείμενα στη λίστα παÏαμέτÏων";Strings.OfficeOM.L_ShuttingDown="Η λειτουÏγία απέτυχε, επειδή τα δεδομένα στο διακομιστή δεν είναι ενημεÏωμένα.";Strings.OfficeOM.L_PropertyDoesNotExist='Η ιδιότητα "{0}" δεν υπάÏχει στο αντικείμενο.';Strings.OfficeOM.L_DialogRequireHTTPS="Το Ï€Ïωτόκολλο HTTP δεν υποστηÏίζεται. ΧÏησιμοποιήστε εναλλακτικά το HTTPS";Strings.OfficeOM.L_UnsupportedUserIdentity="Δεν υποστηÏίζεται ο Ï„Ïπος ταυτότητας χÏήστη.";Strings.OfficeOM.L_APINotSupported="Το API δεν υποστηÏίζεται";Strings.OfficeOM.L_RunMustReturnPromise="Η συνάÏτηση δέσμης που διαβιβάστηκε στη μέθοδο .run δεν επέστÏεψε υπόσχεση. Η συνάÏτηση Ï€Ïέπει να επιστÏέφει υπόσχεση, ώστε να είναι δυνατή η αποδέσμευση τυχόν αντικειμένων που παÏακολουθοÏνται αυτόματα κατά την ολοκλήÏωση της λειτουÏγίας δέσμης. Συνήθως, η επιστÏοφή υπόσχεσης γίνεται με την επιστÏοφή της απόκÏισης από το context.sync().";Strings.OfficeOM.L_SliceSizeNotSupported="Το καθοÏισμένο μέγεθος φέτας δεν υποστηÏίζεται.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty='Γίνεται Ï€Ïοσπάθεια να οÏιστεί η ιδιότητα μόνο για ανάγνωση "{0}".';Strings.OfficeOM.L_SSOClientErrorMessage="ΠαÏουσιάστηκε μη αναμενόμενο σφάλμα στο Ï€ÏόγÏαμμα-πελάτη.";Strings.OfficeOM.L_HostError="Σφάλμα υποδοχής";Strings.OfficeOM.L_UserClickIgnore="Ο χÏήστης επέλεξε να παÏαβλέψει το παÏάθυÏο διαλόγου.";Strings.OfficeOM.L_InvalidDataObject="Μη έγκυÏο αντικείμενο δεδομένων";Strings.OfficeOM.L_InvalidOrTimedOutSession="Μη έγκυÏη πεÏίοδος λειτουÏγίας ή λήξη χÏÎ¿Î½Î¹ÎºÎ¿Ï Î¿Ïίου πεÏιόδου λειτουÏγίας";Strings.OfficeOM.L_NotSupported="Η συνάÏτηση {0} δεν υποστηÏίζεται.";Strings.OfficeOM.L_DataNotMatchSelection="Το αντικείμενο δεδομένων που δόθηκε δεν είναι συμβατό με το σχήμα ή τις διαστάσεις της Ï„Ïέχουσας επιλογής.";Strings.OfficeOM.L_PropertyNotLoaded='Η ιδιότητα "{0}" δεν είναι διαθέσιμη. ΠÏιν από την ανάγνωση της τιμής της ιδιότητας, Ï€Ïαγματοποιήστε κλήση της μεθόδου φόÏτωσης στο πεÏιέχον αντικείμενο και κλήση context.sync() στο συσχετισμένο πεÏιβάλλον αίτησης.';Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Η εφαÏμογή {0} δεν υπάÏχει. Δεν είναι δυνατή η κλήση του Microsoft.Office.WebExtension.Initialize(Reason).";Strings.OfficeOM.L_InvalidGrant="Λείπει η Ï€Ïοεξουσιοδότηση.";Strings.OfficeOM.L_RequestTokenUnavailable="Αυτό το API έχει Ïυθμιστεί για τη μείωση της συχνότητας κλήσης.";Strings.OfficeOM.L_EventHandlerRemovalFailed="Απέτυχε η κατάÏγηση του Ï€ÏογÏάμματος χειÏÎ¹ÏƒÎ¼Î¿Ï ÏƒÏ…Î¼Î²Î¬Î½Ï„Ï‰Î½.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Δεν υποστηÏίζεται ο Ï„Ïπος ταυτότητας του χÏήστη.";Strings.OfficeOM.L_CannotNavigateTo="Το αντικείμενο βÏίσκεται σε θέση όπου δεν υποστηÏίζεται η πεÏιήγηση.";Strings.OfficeOM.L_InvalidFormatValue="Μία ή πεÏισσότεÏες από τις παÏαμέτÏους μοÏφοποίησης έχουν τιμές που δεν επιτÏέπονται. Επαναλάβετε τον έλεγχο των τιμών και Ï€Ïοσπαθήστε ξανά.";Strings.OfficeOM.L_InvalidSetStartRowColumn="Οι καθοÏισμένες τιμές startRow ή startColumn δεν είναι έγκυÏες.";Strings.OfficeOM.L_InvalidBindingError="ΠαÏουσιάστηκε σφάλμα μη έγκυÏης σÏνδεσης";Strings.OfficeOM.L_MemoryLimit="Έγινε υπέÏβαση του οÏίου μνήμης";Strings.OfficeOM.L_InvalidSSOAddinMessage="Το API ταυτότητας δεν υποστηÏίζεται για το Ï€Ïόσθετο.";Strings.OfficeOM.L_InvalidCoercion="Μη έγκυÏος Ï„Ïπος αναγκαστικής μετατÏοπής";Strings.OfficeOM.L_CannotRegisterEvent="Δεν είναι δυνατή η καταχώÏηση του Ï€ÏογÏάμματος χειÏÎ¹ÏƒÎ¼Î¿Ï ÏƒÏ…Î¼Î²Î¬Î½Ï„Ï‰Î½.";Strings.OfficeOM.L_InvalidValue="Μη έγκυÏη τιμή";Strings.OfficeOM.L_CallbackNotAFunction="Η επιστÏοφή κλήσης Ï€Ïέπει να είναι Ï„Ïπου συνάÏτησης, ήταν Ï„Ïπου {0}.";Strings.OfficeOM.L_InvalidRequestContext="Δεν είναι δυνατή η χÏήση του αντικειμένου σε διαφοÏετικά πεÏιβάλλοντα αίτησης.";Strings.OfficeOM.L_InvalidArgument='Το ÏŒÏισμα "{0}" δεν λειτουÏγεί για αυτή την πεÏίπτωση, λείπει ή δεν έχει τη σωστή μοÏφή.';Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Η λειτουÏγία δεν υποστηÏίζεται σε αυτόν τον Ï„Ïπο σÏνδεσης.";Strings.OfficeOM.L_InvalidGetStartRowColumn="Οι καθοÏισμένες τιμές startRow ή startColumn δεν είναι έγκυÏες.";Strings.OfficeOM.L_CustomFunctionNameCannotSplit="Το όνομα της συνάÏτησης Ï€Ïέπει να πεÏιέχει έναν μη κενό χώÏο ονομάτων και ένα μη κενό σÏντομο όνομα.";Strings.OfficeOM.L_EventRegistrationError="Σφάλμα καταχώÏησης συμβάντων";Strings.OfficeOM.L_RedundantCallbackSpecification="Η επιστÏοφή κλήσης δεν μποÏεί να καθοÏιστεί ταυτόχÏονα και στη λίστα οÏισμάτων και στο Ï€ÏοαιÏετικό αντικείμενο.";Strings.OfficeOM.L_InvalidParameters="Η συνάÏτηση {0} έχει μη έγκυÏες παÏαμέτÏους." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/el-gr/outlook_strings.debug.js b/node_modules/@microsoft/office-js/dist/el-gr/outlook_strings.debug.js index 0379ea0..3c023ea 100644 --- a/node_modules/@microsoft/office-js/dist/el-gr/outlook_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/el-gr/outlook_strings.debug.js @@ -1,34 +1,35 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("_u"); _u.ExtensibilityStrings = function() { }; _u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings"); -_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Δεν είναι δυνατή η Ï€Ïοσθήκη συνημμένων, επειδή το μήνυμα διαθέτει ήδη το μέγιστο αÏιθμό συνημμένων"; -_u.ExtensibilityStrings.l_InternalFormatError_Text = "ΠαÏουσιάστηκε εσωτεÏικό σφάλμα μοÏφής."; -_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Δεν είναι δυνατή η Ï€Ïοσθήκη του συνημμένου, επειδή είναι πάÏα Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î¿."; _u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "Η επιδιόÏθωση HTML απέτυχε."; +_u.ExtensibilityStrings.l_InternalProtocolError_Text = "ΕσωτεÏικό σφάλμα Ï€Ïωτοκόλλου: '{0}'."; +_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "Το επιλεγμένο στοιχείο έχει Ï„Ïοποποιηθεί."; +_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "Ο χÏήστης κατάÏγησε το συνημμένο Ï€ÏÎ¿Ï„Î¿Ï Î¿Î»Î¿ÎºÎ»Î·Ïωθεί η αποστολή."; +_u.ExtensibilityStrings.l_InternalFormatError_Text = "ΠαÏουσιάστηκε εσωτεÏικό σφάλμα μοÏφής."; +_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Μία ή πεÏισσότεÏες από τις διευθÏνσεις email που παÏέχονται είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î·."; _u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Οι δεδομένες παÏάμετÏοι δεν ταιÏιάζουν με την αναμενόμενη μοÏφή."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "ΑπαιτοÏνται αυξημένα δικαιώματα για Ï€Ïόσβαση σε Ï€Ïοστατευμένα μέλη του JavaScript API για το Office."; -_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Η αίτηση υπεÏβαίνει το ÏŒÏιο μεγέθους 1 MB. ΤÏοποποιήστε την αίτησή σας EWS."; -_u.ExtensibilityStrings.l_InvalidDate_Text = "Η είσοδος δεν αναλÏεται σε έγκυÏη ημεÏομηνία."; -_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Δεν είναι δυνατή η διαγÏαφή του συνημμένου, επειδή δεν είναι δυνατή η εÏÏεση του συνημμένου με το δείκτη συνημμένου."; -_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Σφάλμα συνημμένου"; -_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "Το αναγνωÏιστικό συνημμένου δεν ήταν έγκυÏο."; -_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Ένα ή πεÏισσότεÏα από τα εμφανιζόμενα ονόματα που παÏέχονται είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î¿."; -_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Δεν δόθηκαν έγκυÏοι παÏαλήπτες."; -_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Σφάλμα εγγÏαφής δεδομένων"; -_u.ExtensibilityStrings.l_InvalidEndTime_Text = "Η ÏŽÏα λήξης δεν μποÏεί να είναι Ï€Ïιν την ÏŽÏα έναÏξης."; +_u.ExtensibilityStrings.l_InvalidEventDates_Text = "Η ημεÏομηνία λήξης που οÏίσατε Ï€Ïοηγείται της ημεÏομηνίας έναÏξης."; _u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "ΑπαιτοÏνται αυξημένα δικαιώματα για κλήση της μεθόδου: '{0}'."; _u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Ο συνολικός αÏιθμός παÏαληπτών στο πεδίο δεν μποÏεί να υπεÏβαίνει το {0}."; -_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "Η διαδÏομή συνημμένου δεν ήταν έγκυÏη."; _u.ExtensibilityStrings.l_OffsetNotfound_Text = "Δεν ήταν δυνατό να βÏεθεί μια μετατόπιση για αυτή τη χÏονική σήμανση."; -_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Μία ή πεÏισσότεÏες από τις διευθÏνσεις email που παÏέχονται είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î·."; -_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "Ο χÏήστης άλλαξε τη θέση του δÏομέα, κατά την εισαγωγή των δεδομένων."; -_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Δεν είναι δυνατή η Ï€Ïοσθήκη συνημμένων κατά την ανάκτηση της πλήÏους απάντησης ή Ï€Ïοώθησης από το διακομιστή."; -_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Δεν είναι δυνατή η διαγÏαφή του συνημμένου από το στοιχείο."; _u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Δεν είναι δυνατή η Ï€Ïοσθήκη του συνημμένου στο στοιχείο."; -_u.ExtensibilityStrings.l_InvalidEventDates_Text = "Η ημεÏομηνία λήξης που οÏίσατε Ï€Ïοηγείται της ημεÏομηνίας έναÏξης."; -_u.ExtensibilityStrings.l_InternalProtocolError_Text = "ΕσωτεÏικό σφάλμα Ï€Ïωτοκόλλου: '{0}'."; -_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "Ο χÏήστης κατάÏγησε το συνημμένο Ï€ÏÎ¿Ï„Î¿Ï Î¿Î»Î¿ÎºÎ»Î·Ïωθεί η αποστολή."; -_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "Το επιλεγμένο στοιχείο έχει Ï„Ïοποποιηθεί." +_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Δεν είναι δυνατή η Ï€Ïοσθήκη συνημμένων κατά την ανάκτηση της πλήÏους απάντησης ή Ï€Ïοώθησης από το διακομιστή."; +_u.ExtensibilityStrings.l_InvalidEndTime_Text = "Η ÏŽÏα λήξης δεν μποÏεί να είναι Ï€Ïιν την ÏŽÏα έναÏξης."; +_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Σφάλμα συνημμένου"; +_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Δεν είναι δυνατή η διαγÏαφή του συνημμένου, επειδή δεν είναι δυνατή η εÏÏεση του συνημμένου με το δείκτη συνημμένου."; +_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "ΑπαιτοÏνται αυξημένα δικαιώματα για Ï€Ïόσβαση σε Ï€Ïοστατευμένα μέλη του JavaScript API για το Office."; +_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "Η διαδÏομή συνημμένου δεν ήταν έγκυÏη."; +_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Δεν είναι δυνατή η Ï€Ïοσθήκη συνημμένων, επειδή το μήνυμα διαθέτει ήδη το μέγιστο αÏιθμό συνημμένων"; +_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "Ο χÏήστης άλλαξε τη θέση του δÏομέα, κατά την εισαγωγή των δεδομένων."; +_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Δεν δόθηκαν έγκυÏοι παÏαλήπτες."; +_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Δεν είναι δυνατή η Ï€Ïοσθήκη του συνημμένου, επειδή είναι πάÏα Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î¿."; +_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "Το αναγνωÏιστικό συνημμένου δεν ήταν έγκυÏο."; +_u.ExtensibilityStrings.l_InvalidDate_Text = "Η είσοδος δεν αναλÏεται σε έγκυÏη ημεÏομηνία."; +_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Σφάλμα εγγÏαφής δεδομένων"; +_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Ένα ή πεÏισσότεÏα από τα εμφανιζόμενα ονόματα που παÏέχονται είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î¿."; +_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Η αίτηση υπεÏβαίνει το ÏŒÏιο μεγέθους 1 MB. ΤÏοποποιήστε την αίτησή σας EWS."; +_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Δεν είναι δυνατή η διαγÏαφή του συνημμένου από το στοιχείο." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/el-gr/outlook_strings.js b/node_modules/@microsoft/office-js/dist/el-gr/outlook_strings.js index 4e7ce75..56ceb3a 100644 --- a/node_modules/@microsoft/office-js/dist/el-gr/outlook_strings.js +++ b/node_modules/@microsoft/office-js/dist/el-gr/outlook_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Δεν είναι δυνατή η Ï€Ïοσθήκη συνημμένων, επειδή το μήνυμα διαθέτει ήδη το μέγιστο αÏιθμό συνημμένων";_u.ExtensibilityStrings.l_InternalFormatError_Text="ΠαÏουσιάστηκε εσωτεÏικό σφάλμα μοÏφής.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Δεν είναι δυνατή η Ï€Ïοσθήκη του συνημμένου, επειδή είναι πάÏα Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î¿.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="Η επιδιόÏθωση HTML απέτυχε.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Οι δεδομένες παÏάμετÏοι δεν ταιÏιάζουν με την αναμενόμενη μοÏφή.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="ΑπαιτοÏνται αυξημένα δικαιώματα για Ï€Ïόσβαση σε Ï€Ïοστατευμένα μέλη του JavaScript API για το Office.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Η αίτηση υπεÏβαίνει το ÏŒÏιο μεγέθους 1 MB. ΤÏοποποιήστε την αίτησή σας EWS.";_u.ExtensibilityStrings.l_InvalidDate_Text="Η είσοδος δεν αναλÏεται σε έγκυÏη ημεÏομηνία.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Δεν είναι δυνατή η διαγÏαφή του συνημμένου, επειδή δεν είναι δυνατή η εÏÏεση του συνημμένου με το δείκτη συνημμένου.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Σφάλμα συνημμένου";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="Το αναγνωÏιστικό συνημμένου δεν ήταν έγκυÏο.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Ένα ή πεÏισσότεÏα από τα εμφανιζόμενα ονόματα που παÏέχονται είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î¿.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Δεν δόθηκαν έγκυÏοι παÏαλήπτες.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Σφάλμα εγγÏαφής δεδομένων";_u.ExtensibilityStrings.l_InvalidEndTime_Text="Η ÏŽÏα λήξης δεν μποÏεί να είναι Ï€Ïιν την ÏŽÏα έναÏξης.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="ΑπαιτοÏνται αυξημένα δικαιώματα για κλήση της μεθόδου: '{0}'.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Ο συνολικός αÏιθμός παÏαληπτών στο πεδίο δεν μποÏεί να υπεÏβαίνει το {0}.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="Η διαδÏομή συνημμένου δεν ήταν έγκυÏη.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Δεν ήταν δυνατό να βÏεθεί μια μετατόπιση για αυτή τη χÏονική σήμανση.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Μία ή πεÏισσότεÏες από τις διευθÏνσεις email που παÏέχονται είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î·.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="Ο χÏήστης άλλαξε τη θέση του δÏομέα, κατά την εισαγωγή των δεδομένων.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Δεν είναι δυνατή η Ï€Ïοσθήκη συνημμένων κατά την ανάκτηση της πλήÏους απάντησης ή Ï€Ïοώθησης από το διακομιστή.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Δεν είναι δυνατή η διαγÏαφή του συνημμένου από το στοιχείο.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Δεν είναι δυνατή η Ï€Ïοσθήκη του συνημμένου στο στοιχείο.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="Η ημεÏομηνία λήξης που οÏίσατε Ï€Ïοηγείται της ημεÏομηνίας έναÏξης.";_u.ExtensibilityStrings.l_InternalProtocolError_Text="ΕσωτεÏικό σφάλμα Ï€Ïωτοκόλλου: '{0}'.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="Ο χÏήστης κατάÏγησε το συνημμένο Ï€ÏÎ¿Ï„Î¿Ï Î¿Î»Î¿ÎºÎ»Î·Ïωθεί η αποστολή.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Το επιλεγμένο στοιχείο έχει Ï„Ïοποποιηθεί." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="Η επιδιόÏθωση HTML απέτυχε.";_u.ExtensibilityStrings.l_InternalProtocolError_Text="ΕσωτεÏικό σφάλμα Ï€Ïωτοκόλλου: '{0}'.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Το επιλεγμένο στοιχείο έχει Ï„Ïοποποιηθεί.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="Ο χÏήστης κατάÏγησε το συνημμένο Ï€ÏÎ¿Ï„Î¿Ï Î¿Î»Î¿ÎºÎ»Î·Ïωθεί η αποστολή.";_u.ExtensibilityStrings.l_InternalFormatError_Text="ΠαÏουσιάστηκε εσωτεÏικό σφάλμα μοÏφής.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Μία ή πεÏισσότεÏες από τις διευθÏνσεις email που παÏέχονται είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î·.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Οι δεδομένες παÏάμετÏοι δεν ταιÏιάζουν με την αναμενόμενη μοÏφή.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="Η ημεÏομηνία λήξης που οÏίσατε Ï€Ïοηγείται της ημεÏομηνίας έναÏξης.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="ΑπαιτοÏνται αυξημένα δικαιώματα για κλήση της μεθόδου: '{0}'.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Ο συνολικός αÏιθμός παÏαληπτών στο πεδίο δεν μποÏεί να υπεÏβαίνει το {0}.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Δεν ήταν δυνατό να βÏεθεί μια μετατόπιση για αυτή τη χÏονική σήμανση.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Δεν είναι δυνατή η Ï€Ïοσθήκη του συνημμένου στο στοιχείο.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Δεν είναι δυνατή η Ï€Ïοσθήκη συνημμένων κατά την ανάκτηση της πλήÏους απάντησης ή Ï€Ïοώθησης από το διακομιστή.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="Η ÏŽÏα λήξης δεν μποÏεί να είναι Ï€Ïιν την ÏŽÏα έναÏξης.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Σφάλμα συνημμένου";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Δεν είναι δυνατή η διαγÏαφή του συνημμένου, επειδή δεν είναι δυνατή η εÏÏεση του συνημμένου με το δείκτη συνημμένου.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="ΑπαιτοÏνται αυξημένα δικαιώματα για Ï€Ïόσβαση σε Ï€Ïοστατευμένα μέλη του JavaScript API για το Office.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="Η διαδÏομή συνημμένου δεν ήταν έγκυÏη.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Δεν είναι δυνατή η Ï€Ïοσθήκη συνημμένων, επειδή το μήνυμα διαθέτει ήδη το μέγιστο αÏιθμό συνημμένων";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="Ο χÏήστης άλλαξε τη θέση του δÏομέα, κατά την εισαγωγή των δεδομένων.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Δεν δόθηκαν έγκυÏοι παÏαλήπτες.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Δεν είναι δυνατή η Ï€Ïοσθήκη του συνημμένου, επειδή είναι πάÏα Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î¿.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="Το αναγνωÏιστικό συνημμένου δεν ήταν έγκυÏο.";_u.ExtensibilityStrings.l_InvalidDate_Text="Η είσοδος δεν αναλÏεται σε έγκυÏη ημεÏομηνία.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Σφάλμα εγγÏαφής δεδομένων";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Ένα ή πεÏισσότεÏα από τα εμφανιζόμενα ονόματα που παÏέχονται είναι Ï€Î¿Î»Ï Î¼ÎµÎ³Î¬Î»Î¿.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Η αίτηση υπεÏβαίνει το ÏŒÏιο μεγέθους 1 MB. ΤÏοποποιήστε την αίτησή σας EWS.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Δεν είναι δυνατή η διαγÏαφή του συνημμένου από το στοιχείο." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/en-us/office_strings.debug.js b/node_modules/@microsoft/office-js/dist/en-us/office_strings.debug.js index e6050a5..2ad6feb 100644 --- a/node_modules/@microsoft/office-js/dist/en-us/office_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/en-us/office_strings.debug.js @@ -1,152 +1,196 @@ -Type.registerNamespace('Strings'); -Strings.OfficeOM = function Strings_OfficeOM() { +/* Version: 16.0.8828.1000 */ + +if (window.Type && window.Type.registerNamespace) { +Type.registerNamespace('Strings');} else { +if(typeof(window['Strings']) == 'undefined') { +window['Strings'] = new Object(); window['Strings']. __namespace = true; +} + } -Strings.OfficeOM.registerClass('Strings.OfficeOM'); -Strings.OfficeOM.L_ShowWindowDialogNotification = '{0} wants to display a new window.'; -Strings.OfficeOM.L_CannotRegisterEvent = 'The event handler cannot be registered.'; -Strings.OfficeOM.L_NotImplemented = 'Function {0} is not implemented.'; -Strings.OfficeOM.L_CustomXmlOutOfDateName = 'Data Not Current'; -Strings.OfficeOM.L_ActivityLimitReached = 'Activity limit has been reached.'; -Strings.OfficeOM.L_InvalidBinding = 'Invalid Binding'; -Strings.OfficeOM.L_BindingCreationError = 'Binding Creation Error'; -Strings.OfficeOM.L_InvalidSetRows = 'The specified rows are invalid.'; -Strings.OfficeOM.L_CannotWriteToSelection = 'Cannot write to the current selection.'; -Strings.OfficeOM.L_IndexOutOfRange = 'Index out of range.'; -Strings.OfficeOM.L_ReadSettingsError = 'Read Settings Error'; -Strings.OfficeOM.L_InvalidGetColumns = 'The specified columns are invalid.'; -Strings.OfficeOM.L_OverwriteWorksheetData = 'The set operation failed because the supplied data object will overwrite or shift data.'; -Strings.OfficeOM.L_RowIndexOutOfRange = 'The row index value is out of the allowed range. Use a value (0 or higher) that\'s less than the number of rows.'; -Strings.OfficeOM.L_ColIndexOutOfRange = 'The column index value is out of the allowed range. Use a value (0 or higher) that\'s less than the number of columns.'; -Strings.OfficeOM.L_InvalidParameters = 'Function {0} has invalid parameters.'; -Strings.OfficeOM.L_DialogAlreadyOpened = 'The operation failed because this add-in already has an active dialog.'; -Strings.OfficeOM.L_SetDataParametersConflict = 'The specified parameters conflict.'; -Strings.OfficeOM.L_DataNotMatchCoercionType = 'The type of the specified data object is not compatible with the current selection.'; -Strings.OfficeOM.L_RunMustReturnPromise = 'The batch function passed to the \".run\" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from \"context.sync()\".'; -Strings.OfficeOM.L_UnsupportedEnumerationMessage = 'The enumeration isn\'t supported in the current host application.'; -Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = 'configure your browser'; -Strings.OfficeOM.L_InvalidCoercion = 'Invalid Coercion Type'; -Strings.OfficeOM.L_UnsupportedDataObject = 'The supplied data object type is not supported.'; -Strings.OfficeOM.L_AppNameNotExist = 'Add-in Name for {0} doesn\'t exist.'; -Strings.OfficeOM.L_AddBindingFromPromptDefaultText = 'Please make a selection.'; -Strings.OfficeOM.L_DataNotMatchBindingType = 'The specified data object is not compatible with the binding type.'; -Strings.OfficeOM.L_InvalidFormatValue = 'One or more of the format parameters have values that aren\'t allowed. Double-check the values and try again.'; -Strings.OfficeOM.L_OperationNotSupported = 'The operation is not supported.'; -Strings.OfficeOM.L_InvalidRequestContext = 'Cannot use the object across different request contexts.'; -Strings.OfficeOM.L_NamedItemNotFound = 'The named item does not exist.'; -Strings.OfficeOM.L_InvalidGetRows = 'The specified rows are invalid.'; -Strings.OfficeOM.L_CellFormatAmountBeyondLimits = 'Note: The formatting sets set by a Formatting API call is suggested to be below 100.'; -Strings.OfficeOM.L_CustomXmlExceedQuotaName = 'Selection Limit Reached'; -Strings.OfficeOM.L_TooManyIncompleteRequests = 'Wait until the previous call completes.'; -Strings.OfficeOM.L_SetDataIsTooLarge = 'The specified data object is too large.'; -Strings.OfficeOM.L_DialogAddressNotTrusted = 'The specified address has not been not trusted by the add-in'; -Strings.OfficeOM.L_InvalidBindingOperation = 'Invalid Binding Operation'; -Strings.OfficeOM.L_APICallFailed = 'API Call Failed'; -Strings.OfficeOM.L_SpecifiedIdNotExist = 'The specified ID does not exist.'; -Strings.OfficeOM.L_SaveSettingsError = 'Save Settings Error'; -Strings.OfficeOM.L_InvalidSetStartRowColumn = 'The specified startRow or startColumn values are invalid.'; -Strings.OfficeOM.L_InvalidFormat = 'Invalid Format Error'; -Strings.OfficeOM.L_InvalidArgument = 'The argument \'{0}\' doesn\'t work for this situation, is missing, or isn\'t in the right format.'; -Strings.OfficeOM.L_EventHandlerAdditionFailed = 'Failed to add the event handler.'; -Strings.OfficeOM.L_InvalidAPICall = 'Invalid API Call'; -Strings.OfficeOM.L_EventRegistrationError = 'Event Registration Error'; -Strings.OfficeOM.L_CustomXmlError = 'Custom XML Error.'; -Strings.OfficeOM.L_TooManyOptionalFunction = 'multiple optional functions in parameter list'; -Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = 'XPath limits selection to 1024 items.'; -Strings.OfficeOM.L_InvalidSelectionForBindingType = 'A binding cannot be created with the current selection and the specified binding type.'; -Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = 'Selected content needs to be in table format. Format the data as a table and try again.'; -Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = 'Ignore'; -Strings.OfficeOM.L_SliceSizeNotSupported = 'The specified slice size is not supported.'; -Strings.OfficeOM.L_EventHandlerRemovalFailed = 'Failed to remove the event handler.'; -Strings.OfficeOM.L_DataReadError = 'Data Read Error'; -Strings.OfficeOM.L_InvalidDataFormat = 'The format of the specified data object is invalid.'; -Strings.OfficeOM.L_RequestTimeout = 'The call took too long to execute.'; -Strings.OfficeOM.L_GetSelectionNotSupported = 'The current selection is not supported.'; -Strings.OfficeOM.L_InvalidTableOptionValue = 'One or more of the tableOptions parameters have values that aren\'t allowed. Double-check the values and try again.'; -Strings.OfficeOM.L_PermissionDenied = 'Permission Denied'; -Strings.OfficeOM.L_InvalidDataObject = 'Invalid Data Object'; -Strings.OfficeOM.L_InvalidColumnsForBinding = 'The specified columns are invalid.'; -Strings.OfficeOM.L_InvalidGetRowColumnCounts = 'The specified rowCount or columnCount values are invalid.'; -Strings.OfficeOM.L_OsfControlTypeNotSupported = 'OsfControl type not supported.'; -Strings.OfficeOM.L_DialogNavigateError = 'Dialog Navigation Error'; -Strings.OfficeOM.L_InvalidObjectPath = 'The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple \"context.sync\" calls and outside the sequential execution of a \".run\" batch, please use the \"context.trackedObjects.add()\" and \"context.trackedObjects.remove()\" methods to manage the object\'s lifetime.'; -Strings.OfficeOM.L_InternalError = 'Internal Error'; -Strings.OfficeOM.L_CoercionTypeNotMatchBinding = 'The specified coercion type is not compatible with this binding type.'; -Strings.OfficeOM.L_InValidOptionalArgument = 'invalid optional argument'; -Strings.OfficeOM.L_InvalidNamedItemForBindingType = 'The specified binding type is not compatible with the supplied named item.'; -Strings.OfficeOM.L_InvalidNode = 'Invalid Node'; -Strings.OfficeOM.L_UnknownBindingType = 'The binding type is not supported.'; -Strings.OfficeOM.L_EventHandlerNotExist = 'The specified event handler was not found for this binding.'; -Strings.OfficeOM.L_NoCapability = 'You don\'t have sufficient permissions for this action.'; -Strings.OfficeOM.L_SettingsCannotSave = 'The settings could not be saved.'; -Strings.OfficeOM.L_DataWriteReminder = 'Data Write Reminder'; -Strings.OfficeOM.L_InvalidSetColumns = 'The specified columns are invalid.'; -Strings.OfficeOM.L_InvalidBindingError = 'Invalid Binding Error'; -Strings.OfficeOM.L_SelectionNotSupportCoercionType = 'The current selection is not compatible with the specified coercion type.'; -Strings.OfficeOM.L_FormatValueOutOfRange = 'The value is out of the allowed range.'; -Strings.OfficeOM.L_InvalidGetStartRowColumn = 'The specified startRow or startColumn values are invalid.'; -Strings.OfficeOM.L_NetworkProblem = 'Network Problem'; -Strings.OfficeOM.ConnectionFailureWithDetails = 'The request failed with status code of {0}, error code {1} and the following error message: {2}'; -Strings.OfficeOM.L_MissingParameter = 'Missing Parameter'; -Strings.OfficeOM.L_NewWindowCrossZone = 'The security settings in your browser prevent us from creating a dialog box. Try a different browser, or {0} so that \'{1}\' and the domain shown in your address bar are in the same security zone.'; -Strings.OfficeOM.L_SettingsStaleError = 'Settings Stale Error'; -Strings.OfficeOM.L_CannotNavigateTo = 'The object is located in a place where navigation is not supported.'; -Strings.OfficeOM.L_AppNotExistInitializeNotCalled = 'Application {0} does not exist. Microsoft.Office.WebExtension.initialize(reason) is not called.'; -Strings.OfficeOM.L_CoercionTypeNotSupported = 'The specified coercion type is not supported.'; -Strings.OfficeOM.L_InvalidReadForBlankRow = 'The specified row is blank.'; -Strings.OfficeOM.L_UnsupportedEnumeration = 'Unsupported Enumeration'; -Strings.OfficeOM.L_CloseFileBeforeRetrieve = 'Call closeAsync on the current File before retrieving another.'; -Strings.OfficeOM.L_CustomXmlOutOfDateMessage = 'The data is out of date. Retrieve the object again.'; -Strings.OfficeOM.L_NotSupportedEventType = 'The specified event type {0} is not supported.'; -Strings.OfficeOM.L_GetDataIsTooLarge = 'The requested data set is too large.'; -Strings.OfficeOM.L_MultipleNamedItemFound = 'Multiple objects with the same name were found.'; -Strings.OfficeOM.L_InvalidCellsValue = 'One or more of the cells parameters have values that aren\'t allowed. Double-check the values and try again.'; -Strings.OfficeOM.L_InitializeNotReady = 'Office.js has not been fully loaded yet. Please try again later or make sure to add your initialization code on the Office.initialize function.'; -Strings.OfficeOM.L_NotSupportedBindingType = 'The specified binding type {0} is not supported.'; -Strings.OfficeOM.L_ShuttingDown = 'Operation failed because the data is not current on the server.'; -Strings.OfficeOM.L_FormattingReminder = 'Formatting Reminder'; -Strings.OfficeOM.L_ConnectionFailureWithStatus = 'The request failed with status code of {0}.'; -Strings.OfficeOM.L_DocumentReadOnly = 'The requested operation is not allowed on the current document mode.'; -Strings.OfficeOM.L_InvalidApiCallInContext = 'Invalid API call in the current context.'; -Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = 'Allow'; -Strings.OfficeOM.L_DataWriteError = 'Data Write Error'; -Strings.OfficeOM.L_FunctionCallFailed = 'Function {0} call failed, error code: {1}.'; -Strings.OfficeOM.L_DataNotMatchBindingSize = 'The supplied data object does not match the size of the current selection.'; -Strings.OfficeOM.L_RequestTokenUnavailable = 'This API has been throttled to slow the call frequency.'; -Strings.OfficeOM.L_NewWindowCrossZoneErrorString = 'Browser restrictions prevented us from creating the dialog box. The domain of dialog box and the domain of the add-in host are not in the same security zone.'; -Strings.OfficeOM.L_BindingNotExist = 'The specified binding does not exist.'; -Strings.OfficeOM.L_DisplayDialogError = 'Display Dialog Error'; -Strings.OfficeOM.L_SettingNameNotExist = 'The specified setting name does not exist.'; -Strings.OfficeOM.L_BrowserAPINotSupported = 'This browser does not support the requested API.'; -Strings.OfficeOM.L_NonUniformPartialSetNotSupported = 'Coordinate parameters cannot be used with coercion type Table when the table contains merged cells.'; -Strings.OfficeOM.L_ElementMissing = 'We couldn\'t format the table cell because some parameter values are missing. Double-check the parameters and try again.'; -Strings.OfficeOM.L_ValueNotLoaded = 'The value of the result object has not been loaded yet. Before reading the value property, call \"context.sync()\" on the associated request context.'; -Strings.OfficeOM.L_NavOutOfBound = 'The operation failed because the index is out of range.'; -Strings.OfficeOM.L_RedundantCallbackSpecification = 'Callback cannot be specified both in argument list and in optional object.'; -Strings.OfficeOM.L_PropertyNotLoaded = 'The property \'{0}\' is not available. Before reading the property\'s value, call the load method on the containing object and call \"context.sync()\" on the associated request context.'; -Strings.OfficeOM.L_SettingsAreStale = 'Settings could not be saved because they are not current.'; -Strings.OfficeOM.L_MissingRequiredArguments = 'missing some required arguments'; -Strings.OfficeOM.L_NonUniformPartialGetNotSupported = 'Coordinate parameters cannot be used with coercion type Table when the table contains merged cells.'; -Strings.OfficeOM.L_OutOfRange = 'Out of Range'; -Strings.OfficeOM.L_HostError = 'Host Error'; -Strings.OfficeOM.L_TooManyOptionalObjects = 'multiple optional objects in parameter list'; -Strings.OfficeOM.L_APINotSupported = 'API Not Supported'; -Strings.OfficeOM.L_UserClickIgnore = 'The user chose to ignore the dialog box.'; -Strings.OfficeOM.L_BindingToMultipleSelection = 'Noncontiguous selections are not supported.'; -Strings.OfficeOM.L_InternalErrorDescription = 'An internal error has occurred.'; -Strings.OfficeOM.L_DataStale = 'Data Not Current'; -Strings.OfficeOM.L_MemoryLimit = 'Memory Limit Exceeded'; -Strings.OfficeOM.L_CellDataAmountBeyondLimits = 'Note: The number of cells in a table is suggested to be below 20,000 cells.'; -Strings.OfficeOM.L_SelectionCannotBound = 'Cannot bind to the current selection.'; -Strings.OfficeOM.L_UserNotSignedIn = 'No user is signed into Office.'; -Strings.OfficeOM.L_BadSelectorString = 'The string passed into the selector is improperly formatted or unsupported.'; -Strings.OfficeOM.L_InvalidValue = 'Invalid Value'; -Strings.OfficeOM.L_DataNotMatchSelection = 'The supplied data object is not compatible with the shape or dimensions of the current selection.'; -Strings.OfficeOM.L_NotSupported = 'Function {0} is not supported.'; -Strings.OfficeOM.L_CustomXmlNodeNotFound = 'The specified node was not found.'; -Strings.OfficeOM.L_NetworkProblemRetrieveFile = 'A network problem has prevented retrieval of the file.'; -Strings.OfficeOM.L_TooManyArguments = 'too many arguments'; -Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = 'Operation is not supported on this binding type.'; -Strings.OfficeOM.L_GetDataParametersConflict = 'The specified parameters conflict.'; -Strings.OfficeOM.L_FileTypeNotSupported = 'The specified file type is not supported.'; -Strings.OfficeOM.L_CallbackNotAFunction = 'Callback must be of type function, was of type {0}.'; +Strings.OfficeOM=function Strings_OfficeOM() { +} +if (Strings.OfficeOM.registerClass) Strings.OfficeOM.registerClass('Strings.OfficeOM'); +Strings.OfficeOM.L_APICallFailed='API Call Failed'; +Strings.OfficeOM.L_APINotSupported='API Not Supported'; +Strings.OfficeOM.L_ActivityLimitReached='Activity limit has been reached.'; +Strings.OfficeOM.L_AddBindingFromPromptDefaultText='Please make a selection.'; +Strings.OfficeOM.L_AddinIsAlreadyRequestingToken='Add-in is already requesting an access token.'; +Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage='The operation failed because this add-in is already requesting an access token.'; +Strings.OfficeOM.L_ApiNotFoundDetails='The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.'; +Strings.OfficeOM.L_AppNameNotExist='Add-in Name for {0} doesn\'t exist.'; +Strings.OfficeOM.L_AppNotExistInitializeNotCalled='Application {0} does not exist. Microsoft.Office.WebExtension.initialize(reason) is not called.'; +Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty='Attempting to set read-only property \'{0}\'.'; +Strings.OfficeOM.L_BadSelectorString='The string passed into the selector is improperly formatted or unsupported.'; +Strings.OfficeOM.L_BindingCreationError='Binding Creation Error'; +Strings.OfficeOM.L_BindingNotExist='The specified binding does not exist.'; +Strings.OfficeOM.L_BindingToMultipleSelection='Noncontiguous selections are not supported.'; +Strings.OfficeOM.L_BrowserAPINotSupported='This browser does not support the requested API.'; +Strings.OfficeOM.L_CallbackNotAFunction='Callback must be of type function, was of type {0}.'; +Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod='Changes to property \'{0}\' cannot be applied through an \"object.set\" method.'; +Strings.OfficeOM.L_CannotNavigateTo='The object is located in a place where navigation is not supported.'; +Strings.OfficeOM.L_CannotRegisterEvent='The event handler cannot be registered.'; +Strings.OfficeOM.L_CannotWriteToSelection='Cannot write to the current selection.'; +Strings.OfficeOM.L_CellDataAmountBeyondLimits='Note: The number of cells in a table is suggested to be below 20,000 cells.'; +Strings.OfficeOM.L_CellFormatAmountBeyondLimits='Note: The formatting sets set by a Formatting API call is suggested to be below 100.'; +Strings.OfficeOM.L_CloseFileBeforeRetrieve='Call closeAsync on the current File before retrieving another.'; +Strings.OfficeOM.L_CoercionTypeNotMatchBinding='The specified coercion type is not compatible with this binding type.'; +Strings.OfficeOM.L_CoercionTypeNotSupported='The specified coercion type is not supported.'; +Strings.OfficeOM.L_ColIndexOutOfRange='The column index value is out of the allowed range. Use a value (0 or higher) that\'s less than the number of columns.'; +Strings.OfficeOM.L_ConnectionFailureWithDetails='The request failed with status code of {0}, error code {1} and the following error message: {2}'; +Strings.OfficeOM.L_ConnectionFailureWithStatus='The request failed with status code of {0}.'; +Strings.OfficeOM.L_CustomFunctionDefinitionMissing='A property with this name that represents the function\'s definition must exist on Excel.CustomFunctions.'; +Strings.OfficeOM.L_CustomFunctionImplementationMissing='The property with this name on Excel.CustomFunctions that represents the function\'s definition must contain a \'call\' property that implements the function.'; +Strings.OfficeOM.L_CustomFunctionNameCannotSplit='The function name must contain a non-empty namespace and a non-empty short name.'; +Strings.OfficeOM.L_CustomFunctionNameContainsBadChars='The function name may only contain letters, digits, underscores, and periods.'; +Strings.OfficeOM.L_CustomXmlError='Custom XML Error.'; +Strings.OfficeOM.L_CustomXmlExceedQuotaMessage='XPath limits selection to 1024 items.'; +Strings.OfficeOM.L_CustomXmlExceedQuotaName='Selection Limit Reached'; +Strings.OfficeOM.L_CustomXmlNodeNotFound='The specified node was not found.'; +Strings.OfficeOM.L_CustomXmlOutOfDateMessage='The data is out of date. Retrieve the object again.'; +Strings.OfficeOM.L_CustomXmlOutOfDateName='Data Not Current'; +Strings.OfficeOM.L_DataNotMatchBindingSize='The supplied data object does not match the size of the current selection.'; +Strings.OfficeOM.L_DataNotMatchBindingType='The specified data object is not compatible with the binding type.'; +Strings.OfficeOM.L_DataNotMatchCoercionType='The type of the specified data object is not compatible with the current selection.'; +Strings.OfficeOM.L_DataNotMatchSelection='The supplied data object is not compatible with the shape or dimensions of the current selection.'; +Strings.OfficeOM.L_DataReadError='Data Read Error'; +Strings.OfficeOM.L_DataStale='Data Not Current'; +Strings.OfficeOM.L_DataWriteError='Data Write Error'; +Strings.OfficeOM.L_DataWriteReminder='Data Write Reminder'; +Strings.OfficeOM.L_DialogAddressNotTrusted='The domain of the URL is not included in the AppDomains element in the manifest.'; +Strings.OfficeOM.L_DialogAlreadyOpened='The operation failed because this add-in already has an active dialog.'; +Strings.OfficeOM.L_DialogInvalidScheme='The URL scheme is not supported. Use HTTPS instead.'; +Strings.OfficeOM.L_DialogNavigateError='Dialog Navigation Error'; +Strings.OfficeOM.L_DialogOK='OK'; +Strings.OfficeOM.L_DialogRequireHTTPS='The HTTP protocol is not supported. Use HTTPS instead'; +Strings.OfficeOM.L_DisplayDialogError='Display Dialog Error'; +Strings.OfficeOM.L_DocumentReadOnly='The requested operation is not allowed on the current document mode.'; +Strings.OfficeOM.L_ElementMissing='We couldn\'t format the table cell because some parameter values are missing. Double-check the parameters and try again.'; +Strings.OfficeOM.L_EventHandlerAdditionFailed='Failed to add the event handler.'; +Strings.OfficeOM.L_EventHandlerNotExist='The specified event handler was not found for this binding.'; +Strings.OfficeOM.L_EventHandlerRemovalFailed='Failed to remove the event handler.'; +Strings.OfficeOM.L_EventRegistrationError='Event Registration Error'; +Strings.OfficeOM.L_FileTypeNotSupported='The specified file type is not supported.'; +Strings.OfficeOM.L_FormatValueOutOfRange='The value is out of the allowed range.'; +Strings.OfficeOM.L_FormattingReminder='Formatting Reminder'; +Strings.OfficeOM.L_FunctionCallFailed='Function {0} call failed, error code: {1}.'; +Strings.OfficeOM.L_GetDataIsTooLarge='The requested data set is too large.'; +Strings.OfficeOM.L_GetDataParametersConflict='The specified parameters conflict.'; +Strings.OfficeOM.L_GetSelectionNotSupported='The current selection is not supported.'; +Strings.OfficeOM.L_HostError='Host Error'; +Strings.OfficeOM.L_InValidOptionalArgument='invalid optional argument'; +Strings.OfficeOM.L_IndexOutOfRange='Index out of range.'; +Strings.OfficeOM.L_InitializeNotReady='Office.js has not been fully loaded yet. Please try again later or make sure to add your initialization code on the Office.initialize function.'; +Strings.OfficeOM.L_InternalError='Internal Error'; +Strings.OfficeOM.L_InternalErrorDescription='An internal error has occurred.'; +Strings.OfficeOM.L_InvalidAPICall='Invalid API Call'; +Strings.OfficeOM.L_InvalidApiArgumentsMessage='Invalid input arguments.'; +Strings.OfficeOM.L_InvalidApiCallInContext='Invalid API call in the current context.'; +Strings.OfficeOM.L_InvalidArgument='The argument \'{0}\' doesn\'t work for this situation, is missing, or isn\'t in the right format.'; +Strings.OfficeOM.L_InvalidArgumentGeneric='The argument(s) passed into the function don\'t work for this situation, are missing, or aren\'t in the right format.'; +Strings.OfficeOM.L_InvalidBinding='Invalid Binding'; +Strings.OfficeOM.L_InvalidBindingError='Invalid Binding Error'; +Strings.OfficeOM.L_InvalidBindingOperation='Invalid Binding Operation'; +Strings.OfficeOM.L_InvalidCellsValue='One or more of the cells parameters have values that aren\'t allowed. Double-check the values and try again.'; +Strings.OfficeOM.L_InvalidCoercion='Invalid Coercion Type'; +Strings.OfficeOM.L_InvalidColumnsForBinding='The specified columns are invalid.'; +Strings.OfficeOM.L_InvalidDataFormat='The format of the specified data object is invalid.'; +Strings.OfficeOM.L_InvalidDataObject='Invalid Data Object'; +Strings.OfficeOM.L_InvalidFormat='Invalid Format Error'; +Strings.OfficeOM.L_InvalidFormatValue='One or more of the format parameters have values that aren\'t allowed. Double-check the values and try again.'; +Strings.OfficeOM.L_InvalidGetColumns='The specified columns are invalid.'; +Strings.OfficeOM.L_InvalidGetRowColumnCounts='The specified rowCount or columnCount values are invalid.'; +Strings.OfficeOM.L_InvalidGetRows='The specified rows are invalid.'; +Strings.OfficeOM.L_InvalidGetStartRowColumn='The specified startRow or startColumn values are invalid.'; +Strings.OfficeOM.L_InvalidGrant='Preauthorization missing.'; +Strings.OfficeOM.L_InvalidGrantMessage='Missing grant for this add-in.'; +Strings.OfficeOM.L_InvalidNamedItemForBindingType='The specified binding type is not compatible with the supplied named item.'; +Strings.OfficeOM.L_InvalidNode='Invalid Node'; +Strings.OfficeOM.L_InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple \"context.sync\" calls and outside the sequential execution of a \".run\" batch, please use the \"context.trackedObjects.add()\" and \"context.trackedObjects.remove()\" methods to manage the object\'s lifetime.'; +Strings.OfficeOM.L_InvalidOperationInCellEditMode='Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.'; +Strings.OfficeOM.L_InvalidOrTimedOutSession='Invalid Or Timed Out Session'; +Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage='Your Office Online session has expired or is invalid. To continue, refresh the page.'; +Strings.OfficeOM.L_InvalidParameters='Function {0} has invalid parameters.'; +Strings.OfficeOM.L_InvalidReadForBlankRow='The specified row is blank.'; +Strings.OfficeOM.L_InvalidRequestContext='Cannot use the object across different request contexts.'; +Strings.OfficeOM.L_InvalidResourceUrl='Invalid application resource Url provided.'; +Strings.OfficeOM.L_InvalidResourceUrlMessage='Invalid resource Url specified in the manifest.'; +Strings.OfficeOM.L_InvalidSSOAddinMessage='The identity API is not supported for this add-in.'; +Strings.OfficeOM.L_InvalidSelectionForBindingType='A binding cannot be created with the current selection and the specified binding type.'; +Strings.OfficeOM.L_InvalidSetColumns='The specified columns are invalid.'; +Strings.OfficeOM.L_InvalidSetRows='The specified rows are invalid.'; +Strings.OfficeOM.L_InvalidSetStartRowColumn='The specified startRow or startColumn values are invalid.'; +Strings.OfficeOM.L_InvalidTableOptionValue='One or more of the tableOptions parameters have values that aren\'t allowed. Double-check the values and try again.'; +Strings.OfficeOM.L_InvalidValue='Invalid Value'; +Strings.OfficeOM.L_MemoryLimit='Memory Limit Exceeded'; +Strings.OfficeOM.L_MissingParameter='Missing Parameter'; +Strings.OfficeOM.L_MissingRequiredArguments='missing some required arguments'; +Strings.OfficeOM.L_MultipleNamedItemFound='Multiple objects with the same name were found.'; +Strings.OfficeOM.L_NamedItemNotFound='The named item does not exist.'; +Strings.OfficeOM.L_NavOutOfBound='The operation failed because the index is out of range.'; +Strings.OfficeOM.L_NetworkProblem='Network Problem'; +Strings.OfficeOM.L_NetworkProblemRetrieveFile='A network problem has prevented retrieval of the file.'; +Strings.OfficeOM.L_NewWindowCrossZone='The security settings in your browser prevent us from creating a dialog box. Try a different browser, or {0} so that \'{1}\' and the domain shown in your address bar are in the same security zone.'; +Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink='configure your browser'; +Strings.OfficeOM.L_NewWindowCrossZoneErrorString='Browser restrictions prevented us from creating the dialog box. The domain of dialog box and the domain of the add-in host are not in the same security zone.'; +Strings.OfficeOM.L_NoCapability='You don\'t have sufficient permissions for this action.'; +Strings.OfficeOM.L_NonUniformPartialGetNotSupported='Coordinate parameters cannot be used with coercion type Table when the table contains merged cells.'; +Strings.OfficeOM.L_NonUniformPartialSetNotSupported='Coordinate parameters cannot be used with coercion type Table when the table contains merged cells.'; +Strings.OfficeOM.L_NotImplemented='Function {0} is not implemented.'; +Strings.OfficeOM.L_NotSupported='Function {0} is not supported.'; +Strings.OfficeOM.L_NotSupportedBindingType='The specified binding type {0} is not supported.'; +Strings.OfficeOM.L_NotSupportedEventType='The specified event type {0} is not supported.'; +Strings.OfficeOM.L_OperationNotSupported='The operation is not supported.'; +Strings.OfficeOM.L_OperationNotSupportedOnMatrixData='Selected content needs to be in table format. Format the data as a table and try again.'; +Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType='Operation is not supported on this binding type.'; +Strings.OfficeOM.L_OsfControlTypeNotSupported='OsfControl type not supported.'; +Strings.OfficeOM.L_OutOfRange='Out of Range'; +Strings.OfficeOM.L_OverwriteWorksheetData='The set operation failed because the supplied data object will overwrite or shift data.'; +Strings.OfficeOM.L_PermissionDenied='Permission Denied'; +Strings.OfficeOM.L_PropertyDoesNotExist='Property \'{0}\' does not exist on the object.'; +Strings.OfficeOM.L_PropertyNotLoaded='The property \'{0}\' is not available. Before reading the property\'s value, call the load method on the containing object and call \"context.sync()\" on the associated request context.'; +Strings.OfficeOM.L_ReadSettingsError='Read Settings Error'; +Strings.OfficeOM.L_RedundantCallbackSpecification='Callback cannot be specified both in argument list and in optional object.'; +Strings.OfficeOM.L_RequestTimeout='The call took too long to execute.'; +Strings.OfficeOM.L_RequestTokenUnavailable='This API has been throttled to slow the call frequency.'; +Strings.OfficeOM.L_RowIndexOutOfRange='The row index value is out of the allowed range. Use a value (0 or higher) that\'s less than the number of rows.'; +Strings.OfficeOM.L_RunMustReturnPromise='The batch function passed to the \".run\" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from \"context.sync()\".'; +Strings.OfficeOM.L_SSOClientError='Error occurred in the authentication request from Office.'; +Strings.OfficeOM.L_SSOClientErrorMessage='An unexpected error occurred in the client.'; +Strings.OfficeOM.L_SSOConnectionLostError='A connection was lost during the sign in process.'; +Strings.OfficeOM.L_SSOConnectionLostErrorMessage='A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user\'s browser configuration settings, such as security zones.'; +Strings.OfficeOM.L_SSOServerError='Error occurred in the authentication provider.'; +Strings.OfficeOM.L_SSOServerErrorMessage='An unexpected error occurred on the server.'; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory='This add-in does not support user consent.'; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage='The operation failed because this add-in does not support user consent in this category'; +Strings.OfficeOM.L_SaveSettingsError='Save Settings Error'; +Strings.OfficeOM.L_SelectionCannotBound='Cannot bind to the current selection.'; +Strings.OfficeOM.L_SelectionNotSupportCoercionType='The current selection is not compatible with the specified coercion type.'; +Strings.OfficeOM.L_SetDataIsTooLarge='The specified data object is too large.'; +Strings.OfficeOM.L_SetDataParametersConflict='The specified parameters conflict.'; +Strings.OfficeOM.L_SettingNameNotExist='The specified setting name does not exist.'; +Strings.OfficeOM.L_SettingsAreStale='Settings could not be saved because they are not current.'; +Strings.OfficeOM.L_SettingsCannotSave='The settings could not be saved.'; +Strings.OfficeOM.L_SettingsStaleError='Settings Stale Error'; +Strings.OfficeOM.L_ShowWindowDialogNotification='{0} wants to display a new window.'; +Strings.OfficeOM.L_ShowWindowDialogNotificationAllow='Allow'; +Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore='Ignore'; +Strings.OfficeOM.L_ShuttingDown='Operation failed because the data is not current on the server.'; +Strings.OfficeOM.L_SliceSizeNotSupported='The specified slice size is not supported.'; +Strings.OfficeOM.L_SpecifiedIdNotExist='The specified ID does not exist.'; +Strings.OfficeOM.L_Timeout='The operation has timed out.'; +Strings.OfficeOM.L_TooManyArguments='too many arguments'; +Strings.OfficeOM.L_TooManyIncompleteRequests='Wait until the previous call completes.'; +Strings.OfficeOM.L_TooManyOptionalFunction='multiple optional functions in parameter list'; +Strings.OfficeOM.L_TooManyOptionalObjects='multiple optional objects in parameter list'; +Strings.OfficeOM.L_UnknownBindingType='The binding type is not supported.'; +Strings.OfficeOM.L_UnsupportedDataObject='The supplied data object type is not supported.'; +Strings.OfficeOM.L_UnsupportedEnumeration='Unsupported Enumeration'; +Strings.OfficeOM.L_UnsupportedEnumerationMessage='The enumeration isn\'t supported in the current host application.'; +Strings.OfficeOM.L_UnsupportedUserIdentity='User identity type is not supported.'; +Strings.OfficeOM.L_UnsupportedUserIdentityMessage='The identity type of the user is not supported.'; +Strings.OfficeOM.L_UserAborted='User aborted the consent request.'; +Strings.OfficeOM.L_UserAbortedMessage='The user did not consent the add-in permissions.'; +Strings.OfficeOM.L_UserClickIgnore='The user chose to ignore the dialog box.'; +Strings.OfficeOM.L_UserNotSignedIn='No user is signed into Office.'; +Strings.OfficeOM.L_ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call \"context.sync()\" on the associated request context.'; \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/en-us/office_strings.js b/node_modules/@microsoft/office-js/dist/en-us/office_strings.js index e6d8f80..55baa5b 100644 --- a/node_modules/@microsoft/office-js/dist/en-us/office_strings.js +++ b/node_modules/@microsoft/office-js/dist/en-us/office_strings.js @@ -1 +1,10 @@ -Type.registerNamespace("Strings"); Strings.OfficeOM = function () { }; Strings.OfficeOM.registerClass("Strings.OfficeOM"); Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} wants to display a new window."; Strings.OfficeOM.L_CannotRegisterEvent = "The event handler cannot be registered."; Strings.OfficeOM.L_NotImplemented = "Function {0} is not implemented."; Strings.OfficeOM.L_CustomXmlOutOfDateName = "Data Not Current"; Strings.OfficeOM.L_ActivityLimitReached = "Activity limit has been reached."; Strings.OfficeOM.L_InvalidBinding = "Invalid Binding"; Strings.OfficeOM.L_BindingCreationError = "Binding Creation Error"; Strings.OfficeOM.L_InvalidSetRows = "The specified rows are invalid."; Strings.OfficeOM.L_CannotWriteToSelection = "Cannot write to the current selection."; Strings.OfficeOM.L_IndexOutOfRange = "Index out of range."; Strings.OfficeOM.L_ReadSettingsError = "Read Settings Error"; Strings.OfficeOM.L_InvalidGetColumns = "The specified columns are invalid."; Strings.OfficeOM.L_OverwriteWorksheetData = "The set operation failed because the supplied data object will overwrite or shift data."; Strings.OfficeOM.L_RowIndexOutOfRange = "The row index value is out of the allowed range. Use a value (0 or higher) that's less than the number of rows."; Strings.OfficeOM.L_ColIndexOutOfRange = "The column index value is out of the allowed range. Use a value (0 or higher) that's less than the number of columns."; Strings.OfficeOM.L_InvalidParameters = "Function {0} has invalid parameters."; Strings.OfficeOM.L_DialogAlreadyOpened = "The operation failed because this add-in already has an active dialog."; Strings.OfficeOM.L_SetDataParametersConflict = "The specified parameters conflict."; Strings.OfficeOM.L_DataNotMatchCoercionType = "The type of the specified data object is not compatible with the current selection."; Strings.OfficeOM.L_RunMustReturnPromise = 'The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".'; Strings.OfficeOM.L_UnsupportedEnumerationMessage = "The enumeration isn't supported in the current host application."; Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "configure your browser"; Strings.OfficeOM.L_InvalidCoercion = "Invalid Coercion Type"; Strings.OfficeOM.L_UnsupportedDataObject = "The supplied data object type is not supported."; Strings.OfficeOM.L_AppNameNotExist = "Add-in Name for {0} doesn't exist."; Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Please make a selection."; Strings.OfficeOM.L_DataNotMatchBindingType = "The specified data object is not compatible with the binding type."; Strings.OfficeOM.L_InvalidFormatValue = "One or more of the format parameters have values that aren't allowed. Double-check the values and try again."; Strings.OfficeOM.L_OperationNotSupported = "The operation is not supported."; Strings.OfficeOM.L_InvalidRequestContext = "Cannot use the object across different request contexts."; Strings.OfficeOM.L_NamedItemNotFound = "The named item does not exist."; Strings.OfficeOM.L_InvalidGetRows = "The specified rows are invalid."; Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Note: The formatting sets set by a Formatting API call is suggested to be below 100."; Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Selection Limit Reached"; Strings.OfficeOM.L_TooManyIncompleteRequests = "Wait until the previous call completes."; Strings.OfficeOM.L_SetDataIsTooLarge = "The specified data object is too large."; Strings.OfficeOM.L_DialogAddressNotTrusted = "The specified address has not been not trusted by the add-in"; Strings.OfficeOM.L_InvalidBindingOperation = "Invalid Binding Operation"; Strings.OfficeOM.L_APICallFailed = "API Call Failed"; Strings.OfficeOM.L_SpecifiedIdNotExist = "The specified ID does not exist."; Strings.OfficeOM.L_SaveSettingsError = "Save Settings Error"; Strings.OfficeOM.L_InvalidSetStartRowColumn = "The specified startRow or startColumn values are invalid."; Strings.OfficeOM.L_InvalidFormat = "Invalid Format Error"; Strings.OfficeOM.L_InvalidArgument = "The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format."; Strings.OfficeOM.L_EventHandlerAdditionFailed = "Failed to add the event handler."; Strings.OfficeOM.L_InvalidAPICall = "Invalid API Call"; Strings.OfficeOM.L_EventRegistrationError = "Event Registration Error"; Strings.OfficeOM.L_CustomXmlError = "Custom XML Error."; Strings.OfficeOM.L_TooManyOptionalFunction = "multiple optional functions in parameter list"; Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath limits selection to 1024 items."; Strings.OfficeOM.L_InvalidSelectionForBindingType = "A binding cannot be created with the current selection and the specified binding type."; Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Selected content needs to be in table format. Format the data as a table and try again."; Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Ignore"; Strings.OfficeOM.L_SliceSizeNotSupported = "The specified slice size is not supported."; Strings.OfficeOM.L_EventHandlerRemovalFailed = "Failed to remove the event handler."; Strings.OfficeOM.L_DataReadError = "Data Read Error"; Strings.OfficeOM.L_InvalidDataFormat = "The format of the specified data object is invalid."; Strings.OfficeOM.L_RequestTimeout = "The call took too long to execute."; Strings.OfficeOM.L_GetSelectionNotSupported = "The current selection is not supported."; Strings.OfficeOM.L_InvalidTableOptionValue = "One or more of the tableOptions parameters have values that aren't allowed. Double-check the values and try again."; Strings.OfficeOM.L_PermissionDenied = "Permission Denied"; Strings.OfficeOM.L_InvalidDataObject = "Invalid Data Object"; Strings.OfficeOM.L_InvalidColumnsForBinding = "The specified columns are invalid."; Strings.OfficeOM.L_InvalidGetRowColumnCounts = "The specified rowCount or columnCount values are invalid."; Strings.OfficeOM.L_OsfControlTypeNotSupported = "OsfControl type not supported."; Strings.OfficeOM.L_DialogNavigateError = "Dialog Navigation Error"; Strings.OfficeOM.L_InvalidObjectPath = 'The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.'; Strings.OfficeOM.L_InternalError = "Internal Error"; Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "The specified coercion type is not compatible with this binding type."; Strings.OfficeOM.L_InValidOptionalArgument = "invalid optional argument"; Strings.OfficeOM.L_InvalidNamedItemForBindingType = "The specified binding type is not compatible with the supplied named item."; Strings.OfficeOM.L_InvalidNode = "Invalid Node"; Strings.OfficeOM.L_UnknownBindingType = "The binding type is not supported."; Strings.OfficeOM.L_EventHandlerNotExist = "The specified event handler was not found for this binding."; Strings.OfficeOM.L_NoCapability = "You don't have sufficient permissions for this action."; Strings.OfficeOM.L_SettingsCannotSave = "The settings could not be saved."; Strings.OfficeOM.L_DataWriteReminder = "Data Write Reminder"; Strings.OfficeOM.L_InvalidSetColumns = "The specified columns are invalid."; Strings.OfficeOM.L_InvalidBindingError = "Invalid Binding Error"; Strings.OfficeOM.L_SelectionNotSupportCoercionType = "The current selection is not compatible with the specified coercion type."; Strings.OfficeOM.L_FormatValueOutOfRange = "The value is out of the allowed range."; Strings.OfficeOM.L_InvalidGetStartRowColumn = "The specified startRow or startColumn values are invalid."; Strings.OfficeOM.L_NetworkProblem = "Network Problem"; Strings.OfficeOM.ConnectionFailureWithDetails = "The request failed with status code of {0}, error code {1} and the following error message: {2}"; Strings.OfficeOM.L_MissingParameter = "Missing Parameter"; Strings.OfficeOM.L_NewWindowCrossZone = "The security settings in your browser prevent us from creating a dialog box. Try a different browser, or {0} so that '{1}' and the domain shown in your address bar are in the same security zone."; Strings.OfficeOM.L_SettingsStaleError = "Settings Stale Error"; Strings.OfficeOM.L_CannotNavigateTo = "The object is located in a place where navigation is not supported."; Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Application {0} does not exist. Microsoft.Office.WebExtension.initialize(reason) is not called."; Strings.OfficeOM.L_CoercionTypeNotSupported = "The specified coercion type is not supported."; Strings.OfficeOM.L_InvalidReadForBlankRow = "The specified row is blank."; Strings.OfficeOM.L_UnsupportedEnumeration = "Unsupported Enumeration"; Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Call closeAsync on the current File before retrieving another."; Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "The data is out of date. Retrieve the object again."; Strings.OfficeOM.L_NotSupportedEventType = "The specified event type {0} is not supported."; Strings.OfficeOM.L_GetDataIsTooLarge = "The requested data set is too large."; Strings.OfficeOM.L_MultipleNamedItemFound = "Multiple objects with the same name were found."; Strings.OfficeOM.L_InvalidCellsValue = "One or more of the cells parameters have values that aren't allowed. Double-check the values and try again."; Strings.OfficeOM.L_InitializeNotReady = "Office.js has not been fully loaded yet. Please try again later or make sure to add your initialization code on the Office.initialize function."; Strings.OfficeOM.L_NotSupportedBindingType = "The specified binding type {0} is not supported."; Strings.OfficeOM.L_ShuttingDown = "Operation failed because the data is not current on the server."; Strings.OfficeOM.L_FormattingReminder = "Formatting Reminder"; Strings.OfficeOM.L_ConnectionFailureWithStatus = "The request failed with status code of {0}."; Strings.OfficeOM.L_DocumentReadOnly = "The requested operation is not allowed on the current document mode."; Strings.OfficeOM.L_InvalidApiCallInContext = "Invalid API call in the current context."; Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Allow"; Strings.OfficeOM.L_DataWriteError = "Data Write Error"; Strings.OfficeOM.L_FunctionCallFailed = "Function {0} call failed, error code: {1}."; Strings.OfficeOM.L_DataNotMatchBindingSize = "The supplied data object does not match the size of the current selection."; Strings.OfficeOM.L_RequestTokenUnavailable = "This API has been throttled to slow the call frequency."; Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Browser restrictions prevented us from creating the dialog box. The domain of dialog box and the domain of the add-in host are not in the same security zone."; Strings.OfficeOM.L_BindingNotExist = "The specified binding does not exist."; Strings.OfficeOM.L_DisplayDialogError = "Display Dialog Error"; Strings.OfficeOM.L_SettingNameNotExist = "The specified setting name does not exist."; Strings.OfficeOM.L_BrowserAPINotSupported = "This browser does not support the requested API."; Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Coordinate parameters cannot be used with coercion type Table when the table contains merged cells."; Strings.OfficeOM.L_ElementMissing = "We couldn't format the table cell because some parameter values are missing. Double-check the parameters and try again."; Strings.OfficeOM.L_ValueNotLoaded = 'The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.'; Strings.OfficeOM.L_NavOutOfBound = "The operation failed because the index is out of range."; Strings.OfficeOM.L_RedundantCallbackSpecification = "Callback cannot be specified both in argument list and in optional object."; Strings.OfficeOM.L_PropertyNotLoaded = "The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context."; Strings.OfficeOM.L_SettingsAreStale = "Settings could not be saved because they are not current."; Strings.OfficeOM.L_MissingRequiredArguments = "missing some required arguments"; Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Coordinate parameters cannot be used with coercion type Table when the table contains merged cells."; Strings.OfficeOM.L_OutOfRange = "Out of Range"; Strings.OfficeOM.L_HostError = "Host Error"; Strings.OfficeOM.L_TooManyOptionalObjects = "multiple optional objects in parameter list"; Strings.OfficeOM.L_APINotSupported = "API Not Supported"; Strings.OfficeOM.L_UserClickIgnore = "The user chose to ignore the dialog box."; Strings.OfficeOM.L_BindingToMultipleSelection = "Noncontiguous selections are not supported."; Strings.OfficeOM.L_InternalErrorDescription = "An internal error has occurred."; Strings.OfficeOM.L_DataStale = "Data Not Current"; Strings.OfficeOM.L_MemoryLimit = "Memory Limit Exceeded"; Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Note: The number of cells in a table is suggested to be below 20,000 cells."; Strings.OfficeOM.L_SelectionCannotBound = "Cannot bind to the current selection."; Strings.OfficeOM.L_UserNotSignedIn = "No user is signed into Office."; Strings.OfficeOM.L_BadSelectorString = "The string passed into the selector is improperly formatted or unsupported."; Strings.OfficeOM.L_InvalidValue = "Invalid Value"; Strings.OfficeOM.L_DataNotMatchSelection = "The supplied data object is not compatible with the shape or dimensions of the current selection."; Strings.OfficeOM.L_NotSupported = "Function {0} is not supported."; Strings.OfficeOM.L_CustomXmlNodeNotFound = "The specified node was not found."; Strings.OfficeOM.L_NetworkProblemRetrieveFile = "A network problem has prevented retrieval of the file."; Strings.OfficeOM.L_TooManyArguments = "too many arguments"; Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Operation is not supported on this binding type."; Strings.OfficeOM.L_GetDataParametersConflict = "The specified parameters conflict."; Strings.OfficeOM.L_FileTypeNotSupported = "The specified file type is not supported."; Strings.OfficeOM.L_CallbackNotAFunction = "Callback must be of type function, was of type {0}." \ No newline at end of file +/* Version: 16.0.8828.1000 */ + +if (window.Type && window.Type.registerNamespace) { +Type.registerNamespace("Strings");} else { +if(typeof(window['"Strings"']) == 'undefined') { +window['"Strings"'] = new Object(); window['"Strings"']. __namespace = true; +} + +} +Strings.OfficeOM=function(){};if (Strings.OfficeOM.registerClass) Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_APICallFailed="API Call Failed";Strings.OfficeOM.L_APINotSupported="API Not Supported";Strings.OfficeOM.L_ActivityLimitReached="Activity limit has been reached.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Please make a selection.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Add-in is already requesting an access token.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="The operation failed because this add-in is already requesting an access token.";Strings.OfficeOM.L_ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.";Strings.OfficeOM.L_AppNameNotExist="Add-in Name for {0} doesn't exist.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Application {0} does not exist. Microsoft.Office.WebExtension.initialize(reason) is not called.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="Attempting to set read-only property '{0}'.";Strings.OfficeOM.L_BadSelectorString="The string passed into the selector is improperly formatted or unsupported.";Strings.OfficeOM.L_BindingCreationError="Binding Creation Error";Strings.OfficeOM.L_BindingNotExist="The specified binding does not exist.";Strings.OfficeOM.L_BindingToMultipleSelection="Noncontiguous selections are not supported.";Strings.OfficeOM.L_BrowserAPINotSupported="This browser does not support the requested API.";Strings.OfficeOM.L_CallbackNotAFunction="Callback must be of type function, was of type {0}.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="Changes to property '{0}' cannot be applied through an \"object.set\" method.";Strings.OfficeOM.L_CannotNavigateTo="The object is located in a place where navigation is not supported.";Strings.OfficeOM.L_CannotRegisterEvent="The event handler cannot be registered.";Strings.OfficeOM.L_CannotWriteToSelection="Cannot write to the current selection.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Note: The number of cells in a table is suggested to be below 20,000 cells.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Note: The formatting sets set by a Formatting API call is suggested to be below 100.";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Call closeAsync on the current File before retrieving another.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="The specified coercion type is not compatible with this binding type.";Strings.OfficeOM.L_CoercionTypeNotSupported="The specified coercion type is not supported.";Strings.OfficeOM.L_ColIndexOutOfRange="The column index value is out of the allowed range. Use a value (0 or higher) that's less than the number of columns.";Strings.OfficeOM.L_ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}";Strings.OfficeOM.L_ConnectionFailureWithStatus="The request failed with status code of {0}.";Strings.OfficeOM.L_CustomFunctionDefinitionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions.";Strings.OfficeOM.L_CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.";Strings.OfficeOM.L_CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name.";Strings.OfficeOM.L_CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods.";Strings.OfficeOM.L_CustomXmlError="Custom XML Error.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath limits selection to 1024 items.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Selection Limit Reached";Strings.OfficeOM.L_CustomXmlNodeNotFound="The specified node was not found.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="The data is out of date. Retrieve the object again.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Data Not Current";Strings.OfficeOM.L_DataNotMatchBindingSize="The supplied data object does not match the size of the current selection.";Strings.OfficeOM.L_DataNotMatchBindingType="The specified data object is not compatible with the binding type.";Strings.OfficeOM.L_DataNotMatchCoercionType="The type of the specified data object is not compatible with the current selection.";Strings.OfficeOM.L_DataNotMatchSelection="The supplied data object is not compatible with the shape or dimensions of the current selection.";Strings.OfficeOM.L_DataReadError="Data Read Error";Strings.OfficeOM.L_DataStale="Data Not Current";Strings.OfficeOM.L_DataWriteError="Data Write Error";Strings.OfficeOM.L_DataWriteReminder="Data Write Reminder";Strings.OfficeOM.L_DialogAddressNotTrusted="The domain of the URL is not included in the AppDomains element in the manifest.";Strings.OfficeOM.L_DialogAlreadyOpened="The operation failed because this add-in already has an active dialog.";Strings.OfficeOM.L_DialogInvalidScheme="The URL scheme is not supported. Use HTTPS instead.";Strings.OfficeOM.L_DialogNavigateError="Dialog Navigation Error";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_DialogRequireHTTPS="The HTTP protocol is not supported. Use HTTPS instead";Strings.OfficeOM.L_DisplayDialogError="Display Dialog Error";Strings.OfficeOM.L_DocumentReadOnly="The requested operation is not allowed on the current document mode.";Strings.OfficeOM.L_ElementMissing="We couldn't format the table cell because some parameter values are missing. Double-check the parameters and try again.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Failed to add the event handler.";Strings.OfficeOM.L_EventHandlerNotExist="The specified event handler was not found for this binding.";Strings.OfficeOM.L_EventHandlerRemovalFailed="Failed to remove the event handler.";Strings.OfficeOM.L_EventRegistrationError="Event Registration Error";Strings.OfficeOM.L_FileTypeNotSupported="The specified file type is not supported.";Strings.OfficeOM.L_FormatValueOutOfRange="The value is out of the allowed range.";Strings.OfficeOM.L_FormattingReminder="Formatting Reminder";Strings.OfficeOM.L_FunctionCallFailed="Function {0} call failed, error code: {1}.";Strings.OfficeOM.L_GetDataIsTooLarge="The requested data set is too large.";Strings.OfficeOM.L_GetDataParametersConflict="The specified parameters conflict.";Strings.OfficeOM.L_GetSelectionNotSupported="The current selection is not supported.";Strings.OfficeOM.L_HostError="Host Error";Strings.OfficeOM.L_InValidOptionalArgument="invalid optional argument";Strings.OfficeOM.L_IndexOutOfRange="Index out of range.";Strings.OfficeOM.L_InitializeNotReady="Office.js has not been fully loaded yet. Please try again later or make sure to add your initialization code on the Office.initialize function.";Strings.OfficeOM.L_InternalError="Internal Error";Strings.OfficeOM.L_InternalErrorDescription="An internal error has occurred.";Strings.OfficeOM.L_InvalidAPICall="Invalid API Call";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Invalid input arguments.";Strings.OfficeOM.L_InvalidApiCallInContext="Invalid API call in the current context.";Strings.OfficeOM.L_InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.";Strings.OfficeOM.L_InvalidArgumentGeneric="The argument(s) passed into the function don't work for this situation, are missing, or aren't in the right format.";Strings.OfficeOM.L_InvalidBinding="Invalid Binding";Strings.OfficeOM.L_InvalidBindingError="Invalid Binding Error";Strings.OfficeOM.L_InvalidBindingOperation="Invalid Binding Operation";Strings.OfficeOM.L_InvalidCellsValue="One or more of the cells parameters have values that aren't allowed. Double-check the values and try again.";Strings.OfficeOM.L_InvalidCoercion="Invalid Coercion Type";Strings.OfficeOM.L_InvalidColumnsForBinding="The specified columns are invalid.";Strings.OfficeOM.L_InvalidDataFormat="The format of the specified data object is invalid.";Strings.OfficeOM.L_InvalidDataObject="Invalid Data Object";Strings.OfficeOM.L_InvalidFormat="Invalid Format Error";Strings.OfficeOM.L_InvalidFormatValue="One or more of the format parameters have values that aren't allowed. Double-check the values and try again.";Strings.OfficeOM.L_InvalidGetColumns="The specified columns are invalid.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="The specified rowCount or columnCount values are invalid.";Strings.OfficeOM.L_InvalidGetRows="The specified rows are invalid.";Strings.OfficeOM.L_InvalidGetStartRowColumn="The specified startRow or startColumn values are invalid.";Strings.OfficeOM.L_InvalidGrant="Preauthorization missing.";Strings.OfficeOM.L_InvalidGrantMessage="Missing grant for this add-in.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="The specified binding type is not compatible with the supplied named item.";Strings.OfficeOM.L_InvalidNode="Invalid Node";Strings.OfficeOM.L_InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.';Strings.OfficeOM.L_InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Invalid Or Timed Out Session";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.";Strings.OfficeOM.L_InvalidParameters="Function {0} has invalid parameters.";Strings.OfficeOM.L_InvalidReadForBlankRow="The specified row is blank.";Strings.OfficeOM.L_InvalidRequestContext="Cannot use the object across different request contexts.";Strings.OfficeOM.L_InvalidResourceUrl="Invalid application resource Url provided.";Strings.OfficeOM.L_InvalidResourceUrlMessage="Invalid resource Url specified in the manifest.";Strings.OfficeOM.L_InvalidSSOAddinMessage="The identity API is not supported for this add-in.";Strings.OfficeOM.L_InvalidSelectionForBindingType="A binding cannot be created with the current selection and the specified binding type.";Strings.OfficeOM.L_InvalidSetColumns="The specified columns are invalid.";Strings.OfficeOM.L_InvalidSetRows="The specified rows are invalid.";Strings.OfficeOM.L_InvalidSetStartRowColumn="The specified startRow or startColumn values are invalid.";Strings.OfficeOM.L_InvalidTableOptionValue="One or more of the tableOptions parameters have values that aren't allowed. Double-check the values and try again.";Strings.OfficeOM.L_InvalidValue="Invalid Value";Strings.OfficeOM.L_MemoryLimit="Memory Limit Exceeded";Strings.OfficeOM.L_MissingParameter="Missing Parameter";Strings.OfficeOM.L_MissingRequiredArguments="missing some required arguments";Strings.OfficeOM.L_MultipleNamedItemFound="Multiple objects with the same name were found.";Strings.OfficeOM.L_NamedItemNotFound="The named item does not exist.";Strings.OfficeOM.L_NavOutOfBound="The operation failed because the index is out of range.";Strings.OfficeOM.L_NetworkProblem="Network Problem";Strings.OfficeOM.L_NetworkProblemRetrieveFile="A network problem has prevented retrieval of the file.";Strings.OfficeOM.L_NewWindowCrossZone="The security settings in your browser prevent us from creating a dialog box. Try a different browser, or {0} so that '{1}' and the domain shown in your address bar are in the same security zone.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="configure your browser";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Browser restrictions prevented us from creating the dialog box. The domain of dialog box and the domain of the add-in host are not in the same security zone.";Strings.OfficeOM.L_NoCapability="You don't have sufficient permissions for this action.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Coordinate parameters cannot be used with coercion type Table when the table contains merged cells.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Coordinate parameters cannot be used with coercion type Table when the table contains merged cells.";Strings.OfficeOM.L_NotImplemented="Function {0} is not implemented.";Strings.OfficeOM.L_NotSupported="Function {0} is not supported.";Strings.OfficeOM.L_NotSupportedBindingType="The specified binding type {0} is not supported.";Strings.OfficeOM.L_NotSupportedEventType="The specified event type {0} is not supported.";Strings.OfficeOM.L_OperationNotSupported="The operation is not supported.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Selected content needs to be in table format. Format the data as a table and try again.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Operation is not supported on this binding type.";Strings.OfficeOM.L_OsfControlTypeNotSupported="OsfControl type not supported.";Strings.OfficeOM.L_OutOfRange="Out of Range";Strings.OfficeOM.L_OverwriteWorksheetData="The set operation failed because the supplied data object will overwrite or shift data.";Strings.OfficeOM.L_PermissionDenied="Permission Denied";Strings.OfficeOM.L_PropertyDoesNotExist="Property '{0}' does not exist on the object.";Strings.OfficeOM.L_PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.";Strings.OfficeOM.L_ReadSettingsError="Read Settings Error";Strings.OfficeOM.L_RedundantCallbackSpecification="Callback cannot be specified both in argument list and in optional object.";Strings.OfficeOM.L_RequestTimeout="The call took too long to execute.";Strings.OfficeOM.L_RequestTokenUnavailable="This API has been throttled to slow the call frequency.";Strings.OfficeOM.L_RowIndexOutOfRange="The row index value is out of the allowed range. Use a value (0 or higher) that's less than the number of rows.";Strings.OfficeOM.L_RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".';Strings.OfficeOM.L_SSOClientError="Error occurred in the authentication request from Office.";Strings.OfficeOM.L_SSOClientErrorMessage="An unexpected error occurred in the client.";Strings.OfficeOM.L_SSOConnectionLostError="A connection was lost during the sign in process.";Strings.OfficeOM.L_SSOConnectionLostErrorMessage="A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones.";Strings.OfficeOM.L_SSOServerError="Error occurred in the authentication provider.";Strings.OfficeOM.L_SSOServerErrorMessage="An unexpected error occurred on the server.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory="This add-in does not support user consent.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage="The operation failed because this add-in does not support user consent in this category";Strings.OfficeOM.L_SaveSettingsError="Save Settings Error";Strings.OfficeOM.L_SelectionCannotBound="Cannot bind to the current selection.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="The current selection is not compatible with the specified coercion type.";Strings.OfficeOM.L_SetDataIsTooLarge="The specified data object is too large.";Strings.OfficeOM.L_SetDataParametersConflict="The specified parameters conflict.";Strings.OfficeOM.L_SettingNameNotExist="The specified setting name does not exist.";Strings.OfficeOM.L_SettingsAreStale="Settings could not be saved because they are not current.";Strings.OfficeOM.L_SettingsCannotSave="The settings could not be saved.";Strings.OfficeOM.L_SettingsStaleError="Settings Stale Error";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} wants to display a new window.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Allow";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Ignore";Strings.OfficeOM.L_ShuttingDown="Operation failed because the data is not current on the server.";Strings.OfficeOM.L_SliceSizeNotSupported="The specified slice size is not supported.";Strings.OfficeOM.L_SpecifiedIdNotExist="The specified ID does not exist.";Strings.OfficeOM.L_Timeout="The operation has timed out.";Strings.OfficeOM.L_TooManyArguments="too many arguments";Strings.OfficeOM.L_TooManyIncompleteRequests="Wait until the previous call completes.";Strings.OfficeOM.L_TooManyOptionalFunction="multiple optional functions in parameter list";Strings.OfficeOM.L_TooManyOptionalObjects="multiple optional objects in parameter list";Strings.OfficeOM.L_UnknownBindingType="The binding type is not supported.";Strings.OfficeOM.L_UnsupportedDataObject="The supplied data object type is not supported.";Strings.OfficeOM.L_UnsupportedEnumeration="Unsupported Enumeration";Strings.OfficeOM.L_UnsupportedEnumerationMessage="The enumeration isn't supported in the current host application.";Strings.OfficeOM.L_UnsupportedUserIdentity="User identity type is not supported.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="The identity type of the user is not supported.";Strings.OfficeOM.L_UserAborted="User aborted the consent request.";Strings.OfficeOM.L_UserAbortedMessage="The user did not consent the add-in permissions.";Strings.OfficeOM.L_UserClickIgnore="The user chose to ignore the dialog box.";Strings.OfficeOM.L_UserNotSignedIn="No user is signed into Office.";Strings.OfficeOM.L_ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.' \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/en-us/outlook_strings.debug.js b/node_modules/@microsoft/office-js/dist/en-us/outlook_strings.debug.js index 1fc2b1f..d6912c9 100644 --- a/node_modules/@microsoft/office-js/dist/en-us/outlook_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/en-us/outlook_strings.debug.js @@ -1,32 +1,41 @@ -Type.registerNamespace('_u'); +/* Version: 16.0.8828.1000 */ + +if (window.Type && window.Type.registerNamespace) { +Type.registerNamespace('_u');} else { +if(typeof(window['_u']) == 'undefined') { +window['_u'] = new Object(); window['_u']. __namespace = true; +} + +} + _u.ExtensibilityStrings=function _u_ExtensibilityStrings() { } -_u.ExtensibilityStrings.registerClass('_u.ExtensibilityStrings'); -_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text='The attachment cannot be deleted because attachment with the attachment index cannot be found.'; -_u.ExtensibilityStrings.l_EwsRequestOversized_Text='The request exceeds the 1 MB size limit. Please modify your EWS request.'; -_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text='Elevated permission is required to call the method: \'{0}\'.'; +if (_u.ExtensibilityStrings.registerClass) _u.ExtensibilityStrings.registerClass('_u.ExtensibilityStrings'); +_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text='The selected item has been changed.'; +_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text='The attachment cannot be deleted from the item.'; +_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text='The user removed the attachment before upload has completed.'; _u.ExtensibilityStrings.l_AttachmentErrorName_Text='Attachment Error'; -_u.ExtensibilityStrings.l_InvalidEventDates_Text='The end date occurs before the start date.'; -_u.ExtensibilityStrings.l_DisplayNameTooLong_Text='One or more of the display names provided is too long.'; -_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text='The total number of recipients in the field can\'t exceed {0}.'; -_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text='The HTML santization has failed.'; +_u.ExtensibilityStrings.l_AttachmentExceededSize_Text='The attachment cannot be added because it is too big.'; +_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text='The attachment cannot be added to the item.'; +_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text='Attachments cannot be added while the full reply or forward is being retrieved from the server.'; +_u.ExtensibilityStrings.l_CursorPositionChanged_Text='The user changed the position of the cursor while the data was being inserted.'; _u.ExtensibilityStrings.l_DataWriteErrorName_Text='Data Write Error'; +_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text='The attachment cannot be deleted because attachment with the attachment index cannot be found.'; +_u.ExtensibilityStrings.l_DisplayNameTooLong_Text='One or more of the display names provided is too long.'; +_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text='Elevated permission is required to call the method: \'{0}\'.'; _u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text='Elevated permission is required to access protected members of the JavaScript API for Office.'; +_u.ExtensibilityStrings.l_EmailAddressTooLong_Text='One or more of the email addresses provided is too long.'; +_u.ExtensibilityStrings.l_EwsRequestOversized_Text='The request exceeds the 1 MB size limit. Please modify your EWS request.'; _u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text='Attachments cannot be added because the message already has the maximum number of attachments'; +_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text='The HTML santization has failed.'; +_u.ExtensibilityStrings.l_InternalFormatError_Text='There was an internal format error.'; _u.ExtensibilityStrings.l_InternalProtocolError_Text='Internal protocol error: \'{0}\'.'; -_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text='The user removed the attachment before upload has completed.'; -_u.ExtensibilityStrings.l_OffsetNotfound_Text='An offset for this time stamp couldn\'t be found.'; -_u.ExtensibilityStrings.l_AttachmentExceededSize_Text='The attachment cannot be added because it is too big.'; -_u.ExtensibilityStrings.l_InvalidEndTime_Text='The end time cannot be before the start time.'; -_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text='The given parameters do not match the expected format.'; -_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text='The attachment cannot be added to the item.'; -_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text='No valid recipients were provided.'; _u.ExtensibilityStrings.l_InvalidAttachmentId_Text='The attachment ID was invalid.'; -_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text='Attachments cannot be added while the full reply or forward is being retrieved from the server.'; -_u.ExtensibilityStrings.l_EmailAddressTooLong_Text='One or more of the email addresses provided is too long.'; _u.ExtensibilityStrings.l_InvalidAttachmentPath_Text='The attachment path was invalid.'; -_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text='The attachment cannot be deleted from the item.'; -_u.ExtensibilityStrings.l_InternalFormatError_Text='There was an internal format error.'; _u.ExtensibilityStrings.l_InvalidDate_Text='The input doesn\'t resolve to a valid date.'; -_u.ExtensibilityStrings.l_CursorPositionChanged_Text='The user changed the position of the cursor while the data was being inserted.'; - +_u.ExtensibilityStrings.l_InvalidEndTime_Text='The end time cannot be before the start time.'; +_u.ExtensibilityStrings.l_InvalidEventDates_Text='The end date occurs before the start date.'; +_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text='No valid recipients were provided.'; +_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text='The total number of recipients in the field can\'t exceed {0}.'; +_u.ExtensibilityStrings.l_OffsetNotfound_Text='An offset for this time stamp couldn\'t be found.'; +_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text='The given parameters do not match the expected format.'; \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/en-us/outlook_strings.js b/node_modules/@microsoft/office-js/dist/en-us/outlook_strings.js index 3a599aa..4d10e1e 100644 --- a/node_modules/@microsoft/office-js/dist/en-us/outlook_strings.js +++ b/node_modules/@microsoft/office-js/dist/en-us/outlook_strings.js @@ -1 +1,10 @@ -Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="The attachment cannot be deleted because attachment with the attachment index cannot be found.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="The request exceeds the 1 MB size limit. Please modify your EWS request.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Elevated permission is required to call the method: '{0}'.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Attachment Error";_u.ExtensibilityStrings.l_InvalidEventDates_Text="The end date occurs before the start date.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="One or more of the display names provided is too long.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="The total number of recipients in the field can't exceed {0}.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="The HTML santization has failed.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Data Write Error";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Elevated permission is required to access protected members of the JavaScript API for Office.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Attachments cannot be added because the message already has the maximum number of attachments";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Internal protocol error: '{0}'.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="The user removed the attachment before upload has completed.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="An offset for this time stamp couldn't be found.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="The attachment cannot be added because it is too big.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="The end time cannot be before the start time.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="The given parameters do not match the expected format.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="The attachment cannot be added to the item.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="No valid recipients were provided.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="The attachment ID was invalid.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Attachments cannot be added while the full reply or forward is being retrieved from the server.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="One or more of the email addresses provided is too long.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="The attachment path was invalid.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="The attachment cannot be deleted from the item.";_u.ExtensibilityStrings.l_InternalFormatError_Text="There was an internal format error.";_u.ExtensibilityStrings.l_InvalidDate_Text="The input doesn't resolve to a valid date.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="The user changed the position of the cursor while the data was being inserted." \ No newline at end of file +/* Version: 16.0.8828.1000 */ + +if (window.Type && window.Type.registerNamespace) { +Type.registerNamespace("_u");} else { +if(typeof(window['"_u"']) == 'undefined') { +window['"_u"'] = new Object(); window['"_u"']. __namespace = true; +} + +} +_u.ExtensibilityStrings=function(){};if (_u.ExtensibilityStrings.registerClass) _u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="The selected item has been changed.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="The attachment cannot be deleted from the item.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="The user removed the attachment before upload has completed.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Attachment Error";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="The attachment cannot be added because it is too big.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="The attachment cannot be added to the item.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Attachments cannot be added while the full reply or forward is being retrieved from the server.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="The user changed the position of the cursor while the data was being inserted.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Data Write Error";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="The attachment cannot be deleted because attachment with the attachment index cannot be found.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="One or more of the display names provided is too long.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Elevated permission is required to call the method: '{0}'.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Elevated permission is required to access protected members of the JavaScript API for Office.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="One or more of the email addresses provided is too long.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="The request exceeds the 1 MB size limit. Please modify your EWS request.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Attachments cannot be added because the message already has the maximum number of attachments";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="The HTML santization has failed.";_u.ExtensibilityStrings.l_InternalFormatError_Text="There was an internal format error.";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Internal protocol error: '{0}'.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="The attachment ID was invalid.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="The attachment path was invalid.";_u.ExtensibilityStrings.l_InvalidDate_Text="The input doesn't resolve to a valid date.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="The end time cannot be before the start time.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="The end date occurs before the start date.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="No valid recipients were provided.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="The total number of recipients in the field can't exceed {0}.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="An offset for this time stamp couldn't be found.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="The given parameters do not match the expected format." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/es-es/office_strings.debug.js b/node_modules/@microsoft/office-js/dist/es-es/office_strings.debug.js index ba450c0..7360d48 100644 --- a/node_modules/@microsoft/office-js/dist/es-es/office_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/es-es/office_strings.debug.js @@ -1,179 +1,190 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("Strings"); Strings.OfficeOM = function() { }; Strings.OfficeOM.registerClass("Strings.OfficeOM"); -Strings.OfficeOM.L_UserAborted = "El usuario anuló la solicitud aceptada."; -Strings.OfficeOM.L_InvalidValue = "Valor no válido"; -Strings.OfficeOM.L_SSOServerErrorMessage = "Se produjo un error inesperado en el servidor."; -Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "El contenido seleccionado tiene que estar en formato de tabla. Dé formato de tabla a los datos y vuelva a intentarlo."; +Strings.OfficeOM.L_RequestTimeout = "La llamada tardó demasiado tiempo en ejecutarse."; +Strings.OfficeOM.L_SetDataParametersConflict = "Hay un conflicto en los parámetros especificados."; +Strings.OfficeOM.L_DocumentReadOnly = "La operación solicitada no se permite en el modo de documento actual."; +Strings.OfficeOM.L_SpecifiedIdNotExist = "El identificador especificado no existe."; Strings.OfficeOM.L_InvalidCoercion = "Tipo de conversión no válido"; -Strings.OfficeOM.L_DataNotMatchCoercionType = "El tipo de objeto de datos especificado no es compatible con la selección actual."; -Strings.OfficeOM.L_HostError = "Error de host"; -Strings.OfficeOM.L_SSOServerError = "Se produjo un error en el proveedor de autenticación."; -Strings.OfficeOM.L_UnsupportedUserIdentity = "No se admite el tipo de identidad del usuario."; -Strings.OfficeOM.L_GetDataIsTooLarge = "El conjunto de datos solicitado es demasiado grande."; -Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Haga una selección."; -Strings.OfficeOM.L_DialogOK = "Aceptar"; -Strings.OfficeOM.L_ElementMissing = "No pudimos dar formato a la celda de la tabla porque faltan algunos valores de parámetro. Compruebe los parámetros y vuelva a intentarlo."; -Strings.OfficeOM.L_InternalError = "Error interno"; -Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Nota: Se recomienda que la serie de formatos establecida mediante una llamada API de formato sea inferior a 100."; -Strings.OfficeOM.L_InvalidReadForBlankRow = "La fila especificada está en blanco."; Strings.OfficeOM.L_NoCapability = "No dispone de permisos suficientes para esta acción."; +Strings.OfficeOM.L_SSOServerError = "Se produjo un error en el proveedor de autenticación."; Strings.OfficeOM.L_DialogAddressNotTrusted = "El dominio de la URL no está incluido en el elemento AppDomains en el manifiesto."; -Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "La operación no es compatible con este tipo de enlace."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "La operación falló porque este complemento ya está solicitando un token de acceso."; -Strings.OfficeOM.L_InvalidObjectPath = 'La ruta del objeto "{0}" no funciona para lo que está intentando hacer. Si está usando el objeto en varias llamadas de "context.sync" y fuera de la ejecución secuencial de un lote ".run", use los métodos "context.trackedObjects.add()" y "context.trackedObjects.remove()" para administrar la duración de objeto.'; -Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "No se pueden utilizar parámetros de coordenadas con el tipo de coerción Tabla cuando la tabla contiene celdas combinadas."; -Strings.OfficeOM.L_CustomXmlOutOfDateName = "Los datos no son actuales"; -Strings.OfficeOM.L_OutOfRange = "Fuera del intervalo"; -Strings.OfficeOM.L_MissingParameter = "Parámetro ausente"; -Strings.OfficeOM.L_InternalErrorDescription = "Error interno."; -Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Permitir"; -Strings.OfficeOM.L_NotSupportedBindingType = "No se admite el tipo de enlace especificado {0}."; -Strings.OfficeOM.L_InvalidDataObject = "Objeto de datos no válido"; -Strings.OfficeOM.L_RedundantCallbackSpecification = "La devolución de llamada no se puede especificar en la lista de argumentos y en el objeto opcional a la vez."; +Strings.OfficeOM.L_UnsupportedDataObject = "No se admite el tipo de objeto de datos proporcionado."; +Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Nota: Se recomienda que la serie de formatos establecida mediante una llamada API de formato sea inferior a 100."; +Strings.OfficeOM.L_RequestTokenUnavailable = "Esta API se limitó para reducir la frecuencia de llamada."; Strings.OfficeOM.L_DataNotMatchBindingType = "El objeto de datos especificado no es compatible con el tipo de enlace."; -Strings.OfficeOM.L_BadSelectorString = "El formato de la cadena pasado al selector es incorrecto o no se admite."; -Strings.OfficeOM.L_OperationNotSupported = "No se admite esta operación."; -Strings.OfficeOM.L_ShuttingDown = "Hubo un problema con la operación porque los datos no son actuales en el servidor."; -Strings.OfficeOM.L_BindingToMultipleSelection = "No se admiten las selecciones discontinuas."; -Strings.OfficeOM.L_DataNotMatchBindingSize = "El objeto de datos proporcionado no coincide con el tamaño de la selección actual."; -Strings.OfficeOM.L_EventHandlerAdditionFailed = "No se pudo agregar el controlador de eventos."; -Strings.OfficeOM.L_DataReadError = "Error de lectura de datos"; -Strings.OfficeOM.L_NewWindowCrossZone = 'No pudimos crear un cuadro de diálogo a causa de la configuración de seguridad de su explorador. Pruebe otro explorador o {0} para que "{1}" y el dominio que se muestra en su barra de direcciones se encuentren en la misma zona de seguridad.'; -Strings.OfficeOM.L_InvalidArgumentGeneric = "Los argumentos pasados a la función no funcionan en esta situación, faltan o no están en el formato correcto."; +Strings.OfficeOM.L_BrowserAPINotSupported = "Este explorador no es compatible con la API solicitada."; +Strings.OfficeOM.L_InvalidNode = "Nodo no válido"; +Strings.OfficeOM.L_UserNotSignedIn = "Ningún usuario ha iniciado sesión en Office."; Strings.OfficeOM.L_InvalidArgument = 'El argumento "{0}" no funciona en esta situación, falta o no tiene el formato correcto.'; -Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "No se admite el tipo de identidad del usuario."; -Strings.OfficeOM.L_InvalidSetRows = "Las filas especificadas no son válidas."; -Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "El tipo de conversión especificado no es compatible con este tipo de enlace."; -Strings.OfficeOM.L_Timeout = "Se ha superado el tiempo de espera de la operación."; -Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Se alcanzó el límite de selección"; -Strings.OfficeOM.L_DocumentReadOnly = "La operación solicitada no se permite en el modo de documento actual."; -Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "No se pueden utilizar parámetros de coordenadas con el tipo de coerción Tabla cuando la tabla contiene celdas combinadas."; -Strings.OfficeOM.L_InvalidSelectionForBindingType = "No se puede crear un enlace con la selección actual y el tipo de enlace especificado."; -Strings.OfficeOM.L_NotSupported = "No se admite la función {0}."; -Strings.OfficeOM.L_ActivityLimitReached = "Se ha alcanzado el límite de actividad."; -Strings.OfficeOM.L_UserAbortedMessage = "El usuario no ha aceptado los permisos del complemento."; -Strings.OfficeOM.L_DataWriteReminder = "Aviso de escritura de datos"; -Strings.OfficeOM.L_IndexOutOfRange = "Ãndice fuera del intervalo."; +Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "configure el explorador"; +Strings.OfficeOM.L_UnsupportedUserIdentity = "No se admite el tipo de identidad del usuario."; Strings.OfficeOM.L_APINotSupported = "API no compatible"; -Strings.OfficeOM.L_InvalidColumnsForBinding = "Las columnas especificadas no son válidas."; -Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Ignorar"; -Strings.OfficeOM.L_APICallFailed = "Error de llamada a la API"; -Strings.OfficeOM.L_FormattingReminder = "Aviso de formato"; -Strings.OfficeOM.L_InvalidCellsValue = "Uno o más de los parámetros de las celdas tienen valores que no están permitidos. Compruebe los valores y vuelva a intentarlo."; -Strings.OfficeOM.L_MultipleNamedItemFound = "Se han encontrado varios objetos con el mismo nombre."; -Strings.OfficeOM.L_UnsupportedEnumeration = "Enumeración no compatible"; -Strings.OfficeOM.L_CustomXmlError = "Error de XML personalizado."; -Strings.OfficeOM.L_DialogAlreadyOpened = "No se pudo realizar la operación porque este complemento ya tiene un diálogo activo."; -Strings.OfficeOM.L_DialogRequireHTTPS = "No se admite el protocolo HTTP. Utilizar HTTPS en su lugar"; -Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = 'Intentar establecer la propiedad de sólo lectura "{0}".'; +Strings.OfficeOM.L_ConnectionFailureWithStatus = "Error en la solicitud; código de estado: {0}."; Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = 'Los cambios en la propiedad "{0}" no se puede aplicar a través de un método "object.set".'; -Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Los valores de rowCount o columnCount especificados no son válidos."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "El complemento ya está solicitando un token de acceso."; -Strings.OfficeOM.L_UserNotSignedIn = "Ningún usuario ha iniciado sesión en Office."; -Strings.OfficeOM.L_FileTypeNotSupported = "El tipo de archivo especificado no es compatible."; -Strings.OfficeOM.L_FormatValueOutOfRange = "El valor está fuera del intervalo permitido."; -Strings.OfficeOM.L_EventHandlerRemovalFailed = "No se pudo quitar el controlador de eventos."; -Strings.OfficeOM.L_InvalidApiCallInContext = "La llamada a API no es válida en el contexto actual."; -Strings.OfficeOM.L_InvalidParameters = "La función {0} contiene parámetros no válidos."; -Strings.OfficeOM.L_InvalidSetColumns = "Las columnas especificadas no son válidas."; -Strings.OfficeOM.L_MissingRequiredArguments = "Faltan algunos argumentos necesarios"; -Strings.OfficeOM.L_NavOutOfBound = "No se pudo realizar la operación porque el índice está fuera del intervalo."; -Strings.OfficeOM.L_DataWriteError = "Error de escritura de datos"; +Strings.OfficeOM.L_ApiNotFoundDetails = "El método o la propiedad {0} forman parte del conjunto de requisitos {1}, que no está disponible en su versión de {2}."; +Strings.OfficeOM.L_RunMustReturnPromise = 'La función por lotes que se pasa al método ".run" no ha devuelto una promesa. La función debe devolver una promesa para que puedan liberarse los objetos con seguimiento automático al completarse la operación por lotes. Normalmente, devuelve una promesa al devolver la respuesta de "context.sync()".'; Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Los argumentos de entrada no son válidos."; +Strings.OfficeOM.L_NotImplemented = "La función {0} no está implementada."; +Strings.OfficeOM.L_NamedItemNotFound = "El elemento con nombre no existe."; +Strings.OfficeOM.L_FormattingReminder = "Aviso de formato"; Strings.OfficeOM.L_InvalidAPICall = "Llamada de API no válida"; -Strings.OfficeOM.L_TooManyArguments = "hay demasiados argumentos"; -Strings.OfficeOM.L_SpecifiedIdNotExist = "El identificador especificado no existe."; -Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Nota: Se recomienda que el número de celdas de una tabla sea inferior a 20.000."; -Strings.OfficeOM.L_InvalidBindingError = "Error de enlace no válido"; -Strings.OfficeOM.L_SettingsStaleError = "Error de configuración obsoleto"; -Strings.OfficeOM.L_ColIndexOutOfRange = "El valor de índice de la columna está fuera del intervalo permitido. Utilice un valor (0 o superior) que sea menor que el número de columnas."; -Strings.OfficeOM.L_InvalidDataFormat = "El formato del objeto de datos especificado no es válido."; -Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Un problema de red ha impedido la recuperación del archivo."; -Strings.OfficeOM.L_OsfControlTypeNotSupported = "No se admite el tipo OsfControl."; -Strings.OfficeOM.L_ConnectionFailureWithStatus = "Error en la solicitud; código de estado: {0}."; -Strings.OfficeOM.L_NotSupportedEventType = "No se admite el tipo de evento especificado {0}."; -Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "configure el explorador"; -Strings.OfficeOM.L_TooManyIncompleteRequests = "Espere a que finalice la llamada anterior."; -Strings.OfficeOM.L_InvalidSSOAddinMessage = "No se admite la API de identidad para este complemento."; -Strings.OfficeOM.L_RowIndexOutOfRange = "El valor de índice de la fila está fuera del intervalo permitido. Utilice un valor (0 o superior) que sea menor que el número de filas."; -Strings.OfficeOM.L_NetworkProblem = "Problema en la red"; -Strings.OfficeOM.L_SliceSizeNotSupported = "No se admite el tamaño de segmento especificado."; -Strings.OfficeOM.L_OverwriteWorksheetData = "La operación establecida no se pudo realizar porque el objeto de datos proporcionado sobrescribirá o cambiará los datos."; -Strings.OfficeOM.L_AppNameNotExist = "El nombre del complemento para {0} no existe."; +Strings.OfficeOM.L_InvalidBindingOperation = "Operación de enlace no válido"; +Strings.OfficeOM.L_InvalidGetRows = "Las filas especificadas no son válidas."; +Strings.OfficeOM.L_EventRegistrationError = "Error de registro de eventos"; +Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Haga una selección."; +Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "La aplicación {0} no existe. No se llamó a Microsoft.Office.WebExtension.initialize(reason)."; +Strings.OfficeOM.L_SettingsCannotSave = "No se pudo guardar la configuración."; +Strings.OfficeOM.L_InvalidGetColumns = "Las columnas especificadas no son válidas."; Strings.OfficeOM.L_InvalidNamedItemForBindingType = "El tipo de enlace especificado no es compatible con el elemento con nombre suministrado."; -Strings.OfficeOM.L_InvalidTableOptionValue = "Uno o más de los parámetros de tableOptions tienen valores que no están permitidos. Compruebe los valores y vuelva a intentarlo."; -Strings.OfficeOM.L_UnsupportedDataObject = "No se admite el tipo de objeto de datos proporcionado."; -Strings.OfficeOM.L_CustomXmlNodeNotFound = "No se encontró el nodo especificado."; -Strings.OfficeOM.L_InitializeNotReady = "Office.js no se ha cargado todavía por completo. Inténtelo de nuevo más tarde o asegúrese de agregar el código de inicialización en la función Office.initialize."; +Strings.OfficeOM.L_CoercionTypeNotSupported = "No se admite el tipo de conversión especificado."; +Strings.OfficeOM.L_PropertyNotLoaded = 'La propiedad "{0}" no está disponible. Antes de leer el valor de la propiedad, llame al método de carga en el objeto contenedor y llame a "context.sync()" en el contexto de solicitud asociado.'; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory = "Este complemento no admite el consentimiento del usuario."; +Strings.OfficeOM.L_NavOutOfBound = "No se pudo realizar la operación porque el índice está fuera del intervalo."; +Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = 'Intentar establecer la propiedad de sólo lectura "{0}".'; +Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Llamar a closeAsync en el archivo actual antes de recuperar de otro."; Strings.OfficeOM.L_SaveSettingsError = "Error de configuración de guardado"; -Strings.OfficeOM.L_RunMustReturnPromise = 'La función por lotes que se pasa al método ".run" no ha devuelto una promesa. La función debe devolver una promesa para que puedan liberarse los objetos con seguimiento automático al completarse la operación por lotes. Normalmente, devuelve una promesa al devolver la respuesta de "context.sync()".'; -Strings.OfficeOM.L_DataNotMatchSelection = "El objeto de datos proporcionado no es compatible con la forma o las dimensiones de la selección actual."; -Strings.OfficeOM.L_SSOClientError = "Se produjo un error en la solicitud de autenticación de Office."; -Strings.OfficeOM.L_CannotNavigateTo = "El objeto se encuentra en una ubicación donde no se admite la navegación."; -Strings.OfficeOM.L_DialogInvalidScheme = "No se admite el esquema de dirección URL. Use HTTPS en su lugar."; -Strings.OfficeOM.L_InvalidBindingOperation = "Operación de enlace no válido"; Strings.OfficeOM.L_UserClickIgnore = "El usuario decidió ignorar el cuadro de diálogo."; -Strings.OfficeOM.L_PermissionDenied = "Permiso denegado"; +Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "No se admite el tipo de identidad del usuario."; +Strings.OfficeOM.L_UserAbortedMessage = "El usuario no ha aceptado los permisos del complemento."; +Strings.OfficeOM.L_InvalidColumnsForBinding = "Las columnas especificadas no son válidas."; +Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Los valores de rowCount o columnCount especificados no son válidos."; +Strings.OfficeOM.L_TooManyOptionalObjects = "existen varios objetos opcionales en la lista de parámetros"; +Strings.OfficeOM.L_InValidOptionalArgument = "argumento opcional no válido"; +Strings.OfficeOM.L_ShuttingDown = "Hubo un problema con la operación porque los datos no son actuales en el servidor."; +Strings.OfficeOM.L_InvalidSetColumns = "Las columnas especificadas no son válidas."; +Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Los datos no están actualizados. Recupere el objeto de nuevo."; +Strings.OfficeOM.L_SliceSizeNotSupported = "No se admite el tamaño de segmento especificado."; +Strings.OfficeOM.L_SettingNameNotExist = "El nombre de configuración especificado no existe."; +Strings.OfficeOM.L_IndexOutOfRange = "Ãndice fuera del intervalo."; +Strings.OfficeOM.L_TooManyOptionalFunction = "existen varias funciones opcionales en la lista de parámetros"; +Strings.OfficeOM.L_OutOfRange = "Fuera del intervalo"; +Strings.OfficeOM.L_MemoryLimit = "Límite de memoria superado"; +Strings.OfficeOM.L_TooManyIncompleteRequests = "Espere a que finalice la llamada anterior."; +Strings.OfficeOM.L_FileTypeNotSupported = "El tipo de archivo especificado no es compatible."; Strings.OfficeOM.L_UnknownBindingType = "El tipo de enlace no es compatible."; +Strings.OfficeOM.L_FormatValueOutOfRange = "El valor está fuera del intervalo permitido."; +Strings.OfficeOM.L_InvalidSSOAddinMessage = "No se admite la API de identidad para este complemento."; +Strings.OfficeOM.L_DialogNavigateError = "Error de navegación por diálogo"; +Strings.OfficeOM.L_ReadSettingsError = "Error de configuración de lectura"; +Strings.OfficeOM.L_InvalidOperationInCellEditMode = "Excel está en modo de edición de celdas. Salga del modo de edición pulsando Entrar o Tab o seleccionando otra celda y después vuelva a intentarlo."; +Strings.OfficeOM.L_PropertyDoesNotExist = 'Propiedad "{0}" no existe en el objeto.'; Strings.OfficeOM.L_SetDataIsTooLarge = "El objeto de datos especificado es demasiado grande."; -Strings.OfficeOM.L_SettingsAreStale = "No se pudo guardar la configuración porque no está actualizada."; +Strings.OfficeOM.L_SelectionNotSupportCoercionType = "La selección actual no es compatible con el tipo de conversión especificado."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "El complemento ya está solicitando un token de acceso."; +Strings.OfficeOM.L_GetDataIsTooLarge = "El conjunto de datos solicitado es demasiado grande."; +Strings.OfficeOM.L_CustomFunctionImplementationMissing = 'La propiedad con este nombre en Excel.CustomFunctions que representa la definición de la función debe contener una propiedad "llamar" que implemente la función.'; +Strings.OfficeOM.L_InvalidRequestContext = "No puede usar el objeto en distintos contextos de solicitudes."; +Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Un problema de red ha impedido la recuperación del archivo."; +Strings.OfficeOM.L_UnsupportedEnumerationMessage = "La enumeración no se admite la aplicación host actual."; +Strings.OfficeOM.L_InvalidTableOptionValue = "Uno o más de los parámetros de tableOptions tienen valores que no están permitidos. Compruebe los valores y vuelva a intentarlo."; +Strings.OfficeOM.L_CustomXmlError = "Error de XML personalizado."; +Strings.OfficeOM.L_InvalidSetRows = "Las filas especificadas no son válidas."; +Strings.OfficeOM.L_CannotRegisterEvent = "No se puede registrar el controlador de eventos."; +Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "La sesión de Office Online ha caducado o no es válida. Para continuar, actualice la página."; Strings.OfficeOM.L_BindingNotExist = "El enlace especificado no existe."; +Strings.OfficeOM.L_PermissionDenied = "Permiso denegado"; +Strings.OfficeOM.L_DataNotMatchCoercionType = "El tipo de objeto de datos especificado no es compatible con la selección actual."; +Strings.OfficeOM.L_DataWriteError = "Error de escritura de datos"; +Strings.OfficeOM.L_MultipleNamedItemFound = "Se han encontrado varios objetos con el mismo nombre."; +Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "No se pueden utilizar parámetros de coordenadas con el tipo de coerción Tabla cuando la tabla contiene celdas combinadas."; Strings.OfficeOM.L_FunctionCallFailed = "No se pudo llamar a la función {0}. Código de error: {1}."; -Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} desea mostrar una nueva ventana."; -Strings.OfficeOM.L_InvalidNode = "Nodo no válido"; -Strings.OfficeOM.L_InvalidGrant = "Falta la autorización previa."; +Strings.OfficeOM.L_SSOClientErrorMessage = "Se produjo un error inesperado en el cliente."; +Strings.OfficeOM.L_InvalidFormat = "Error de formato no válido"; +Strings.OfficeOM.L_NotSupportedEventType = "No se admite el tipo de evento especificado {0}."; +Strings.OfficeOM.L_ValueNotLoaded = 'El valor del objeto de resultado aún no se ha cargado. Antes de leer la propiedad del valor, llame a "context.sync()" en el contexto de solicitud asociado.'; +Strings.OfficeOM.L_CannotNavigateTo = "El objeto se encuentra en una ubicación donde no se admite la navegación."; +Strings.OfficeOM.L_InvalidCellsValue = "Uno o más de los parámetros de las celdas tienen valores que no están permitidos. Compruebe los valores y vuelva a intentarlo."; +Strings.OfficeOM.L_SSOServerErrorMessage = "Se produjo un error inesperado en el servidor."; +Strings.OfficeOM.L_EventHandlerAdditionFailed = "No se pudo agregar el controlador de eventos."; +Strings.OfficeOM.L_DataNotMatchSelection = "El objeto de datos proporcionado no es compatible con la forma o las dimensiones de la selección actual."; +Strings.OfficeOM.L_GetDataParametersConflict = "Hay un conflicto en los parámetros especificados."; +Strings.OfficeOM.L_MissingParameter = "Parámetro ausente"; +Strings.OfficeOM.L_InvalidApiCallInContext = "La llamada a API no es válida en el contexto actual."; +Strings.OfficeOM.L_HostError = "Error de host"; +Strings.OfficeOM.L_InvalidSetStartRowColumn = "Los valores de startRow o startColumn especificados no son válidos."; Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "No pudimos crear el cuadro de diálogo a causa de las restricciones del explorador. El dominio del cuadro de diálogo y el dominio del host del complemento no se encuentran en la misma zona de seguridad."; -Strings.OfficeOM.L_PropertyDoesNotExist = 'Propiedad "{0}" no existe en el objeto.'; -Strings.OfficeOM.L_DataStale = "Datos obsoletos"; -Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Los datos no están actualizados. Recupere el objeto de nuevo."; -Strings.OfficeOM.L_InvalidGetColumns = "Las columnas especificadas no son válidas."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "La operación falló porque este complemento ya está solicitando un token de acceso."; +Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "El tipo de conversión especificado no es compatible con este tipo de enlace."; +Strings.OfficeOM.L_TooManyArguments = "hay demasiados argumentos"; +Strings.OfficeOM.L_InternalErrorDescription = "Error interno."; +Strings.OfficeOM.L_InitializeNotReady = "Office.js no se ha cargado todavía por completo. Inténtelo de nuevo más tarde o asegúrese de agregar el código de inicialización en la función Office.initialize."; +Strings.OfficeOM.L_DataReadError = "Error de lectura de datos"; +Strings.OfficeOM.L_CustomXmlNodeNotFound = "No se encontró el nodo especificado."; Strings.OfficeOM.L_InvalidGetStartRowColumn = "Los valores de startRow o startColumn especificados no son válidos."; -Strings.OfficeOM.L_GetDataParametersConflict = "Hay un conflicto en los parámetros especificados."; -Strings.OfficeOM.L_EventRegistrationError = "Error de registro de eventos"; -Strings.OfficeOM.L_MemoryLimit = "Límite de memoria superado"; -Strings.OfficeOM.L_InvalidGetRows = "Las filas especificadas no son válidas."; -Strings.OfficeOM.L_DialogNavigateError = "Error de navegación por diálogo"; -Strings.OfficeOM.L_PropertyNotLoaded = 'La propiedad "{0}" no está disponible. Antes de leer el valor de la propiedad, llame al método de carga en el objeto contenedor y llame a "context.sync()" en el contexto de solicitud asociado.'; -Strings.OfficeOM.L_EventHandlerNotExist = "No se encontró el controlador de eventos especificado para este enlace."; -Strings.OfficeOM.L_CoercionTypeNotSupported = "No se admite el tipo de conversión especificado."; +Strings.OfficeOM.L_DialogAlreadyOpened = "No se pudo realizar la operación porque este complemento ya tiene un diálogo activo."; +Strings.OfficeOM.L_ElementMissing = "No pudimos dar formato a la celda de la tabla porque faltan algunos valores de parámetro. Compruebe los parámetros y vuelva a intentarlo."; +Strings.OfficeOM.L_OperationNotSupported = "No se admite esta operación."; +Strings.OfficeOM.L_NotSupportedBindingType = "No se admite el tipo de enlace especificado {0}."; +Strings.OfficeOM.L_InvalidOrTimedOutSession = "Sesión caducada o no válida"; +Strings.OfficeOM.L_DataStale = "Datos obsoletos"; +Strings.OfficeOM.L_UserAborted = "El usuario anuló la solicitud aceptada."; +Strings.OfficeOM.L_RedundantCallbackSpecification = "La devolución de llamada no se puede especificar en la lista de argumentos y en el objeto opcional a la vez."; +Strings.OfficeOM.L_InvalidObjectPath = 'La ruta del objeto "{0}" no funciona para lo que está intentando hacer. Si está usando el objeto en varias llamadas de "context.sync" y fuera de la ejecución secuencial de un lote ".run", use los métodos "context.trackedObjects.add()" y "context.trackedObjects.remove()" para administrar la duración de objeto.'; Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath limita la selección a 1024 elementos."; -Strings.OfficeOM.L_DisplayDialogError = "Error de presentación del diálogo"; -Strings.OfficeOM.L_SelectionNotSupportCoercionType = "La selección actual no es compatible con el tipo de conversión especificado."; -Strings.OfficeOM.L_SetDataParametersConflict = "Hay un conflicto en los parámetros especificados."; -Strings.OfficeOM.L_InValidOptionalArgument = "argumento opcional no válido"; +Strings.OfficeOM.L_InvalidArgumentGeneric = "Los argumentos pasados a la función no funcionan en esta situación, faltan o no están en el formato correcto."; +Strings.OfficeOM.L_InvalidDataObject = "Objeto de datos no válido"; Strings.OfficeOM.L_CallbackNotAFunction = "La devolución de llamada debe ser de tipo función. Era de tipo {0}."; -Strings.OfficeOM.L_InvalidFormat = "Error de formato no válido"; -Strings.OfficeOM.L_GetSelectionNotSupported = "No se admite la selección actual."; +Strings.OfficeOM.L_ColIndexOutOfRange = "El valor de índice de la columna está fuera del intervalo permitido. Utilice un valor (0 o superior) que sea menor que el número de columnas."; +Strings.OfficeOM.L_InvalidBindingError = "Error de enlace no válido"; +Strings.OfficeOM.L_SettingsStaleError = "Error de configuración obsoleto"; +Strings.OfficeOM.L_DataNotMatchBindingSize = "El objeto de datos proporcionado no coincide con el tamaño de la selección actual."; +Strings.OfficeOM.L_NetworkProblem = "Problema en la red"; Strings.OfficeOM.L_InvalidResourceUrl = "La URL de recursos de aplicación que se ha proporcionado no es válida."; -Strings.OfficeOM.L_BrowserAPINotSupported = "Este explorador no es compatible con la API solicitada."; -Strings.OfficeOM.L_SettingsCannotSave = "No se pudo guardar la configuración."; -Strings.OfficeOM.L_SettingNameNotExist = "El nombre de configuración especificado no existe."; -Strings.OfficeOM.L_UnsupportedEnumerationMessage = "La enumeración no se admite la aplicación host actual."; -Strings.OfficeOM.L_TooManyOptionalObjects = "existen varios objetos opcionales en la lista de parámetros"; -Strings.OfficeOM.L_RequestTokenUnavailable = "Esta API se limitó para reducir la frecuencia de llamada."; -Strings.OfficeOM.L_RequestTimeout = "La llamada tardó demasiado tiempo en ejecutarse."; -Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Llamar a closeAsync en el archivo actual antes de recuperar de otro."; -Strings.OfficeOM.L_SSOClientErrorMessage = "Se produjo un error inesperado en el cliente."; -Strings.OfficeOM.L_ValueNotLoaded = 'El valor del objeto de resultado aún no se ha cargado. Antes de leer la propiedad del valor, llame a "context.sync()" en el contexto de solicitud asociado.'; -Strings.OfficeOM.L_CannotRegisterEvent = "No se puede registrar el controlador de eventos."; -Strings.OfficeOM.L_InvalidRequestContext = "No puede usar el objeto en distintos contextos de solicitudes."; -Strings.OfficeOM.L_SelectionCannotBound = "No se puede enlazar a la selección actual."; -Strings.OfficeOM.L_ConnectionFailureWithDetails = "Error en la solicitud; código de estado {0}; código de error {1}; mensaje de error: {2}"; -Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "La sesión de Office Online ha caducado o no es válida. Para continuar, actualice la página."; -Strings.OfficeOM.L_NotImplemented = "La función {0} no está implementada."; -Strings.OfficeOM.L_InvalidResourceUrlMessage = "La URL de recursos que se ha especificado en el manifiesto no es válida."; -Strings.OfficeOM.L_InvalidSetStartRowColumn = "Los valores de startRow o startColumn especificados no son válidos."; -Strings.OfficeOM.L_NamedItemNotFound = "El elemento con nombre no existe."; +Strings.OfficeOM.L_InvalidGrant = "Falta la autorización previa."; +Strings.OfficeOM.L_EventHandlerRemovalFailed = "No se pudo quitar el controlador de eventos."; +Strings.OfficeOM.L_SSOConnectionLostErrorMessage = "A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones."; +Strings.OfficeOM.L_InternalError = "Error interno"; +Strings.OfficeOM.L_CustomFunctionNameContainsBadChars = "El nombre de función solo puede contener letras, números, guiones bajos y puntos."; +Strings.OfficeOM.L_SSOConnectionLostError = "A connection was lost during the sign in process."; Strings.OfficeOM.L_InvalidGrantMessage = "Falta conceder permisos para este complemento."; -Strings.OfficeOM.L_ReadSettingsError = "Error de configuración de lectura"; -Strings.OfficeOM.L_BindingCreationError = "No se pudo crear el enlace"; -Strings.OfficeOM.L_InvalidBinding = "Enlace no válido"; -Strings.OfficeOM.L_TooManyOptionalFunction = "existen varias funciones opcionales en la lista de parámetros"; +Strings.OfficeOM.L_APICallFailed = "Error de llamada a la API"; +Strings.OfficeOM.L_DataWriteReminder = "Aviso de escritura de datos"; +Strings.OfficeOM.L_ConnectionFailureWithDetails = "Error en la solicitud; código de estado {0}; código de error {1}; mensaje de error: {2}"; +Strings.OfficeOM.L_BindingToMultipleSelection = "No se admiten las selecciones discontinuas."; Strings.OfficeOM.L_CannotWriteToSelection = "No se puede escribir en la selección actual."; +Strings.OfficeOM.L_OverwriteWorksheetData = "La operación establecida no se pudo realizar porque el objeto de datos proporcionado sobrescribirá o cambiará los datos."; +Strings.OfficeOM.L_InvalidReadForBlankRow = "La fila especificada está en blanco."; +Strings.OfficeOM.L_SSOClientError = "Se produjo un error en la solicitud de autenticación de Office."; +Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "El contenido seleccionado tiene que estar en formato de tabla. Dé formato de tabla a los datos y vuelva a intentarlo."; +Strings.OfficeOM.L_InvalidBinding = "Enlace no válido"; +Strings.OfficeOM.L_NewWindowCrossZone = 'No pudimos crear un cuadro de diálogo a causa de la configuración de seguridad de su explorador. Pruebe otro explorador o {0} para que "{1}" y el dominio que se muestra en su barra de direcciones se encuentren en la misma zona de seguridad.'; Strings.OfficeOM.L_InvalidFormatValue = "Uno o más de los parámetros de formato tienen valores que no están permitidos. Compruebe los valores y vuelva a intentarlo."; -Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "La aplicación {0} no existe. No se llamó a Microsoft.Office.WebExtension.initialize(reason)."; -Strings.OfficeOM.L_InvalidOrTimedOutSession = "Sesión caducada o no válida" +Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "La operación no es compatible con este tipo de enlace."; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage = "Se ha producido un error en la operación porque el complemento no admite el consentimiento del usuario en esta categoría"; +Strings.OfficeOM.L_EventHandlerNotExist = "No se encontró el controlador de eventos especificado para este enlace."; +Strings.OfficeOM.L_OsfControlTypeNotSupported = "No se admite el tipo OsfControl."; +Strings.OfficeOM.L_NotSupported = "No se admite la función {0}."; +Strings.OfficeOM.L_InvalidValue = "Valor no válido"; +Strings.OfficeOM.L_CustomFunctionDefinitionMissing = "Debe existir una propiedad con este nombre que represente la definición de la función en Excel.CustomFunctions."; +Strings.OfficeOM.L_InvalidParameters = "La función {0} contiene parámetros no válidos."; +Strings.OfficeOM.L_SelectionCannotBound = "No se puede enlazar a la selección actual."; +Strings.OfficeOM.L_DialogOK = "Aceptar"; +Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Se alcanzó el límite de selección"; +Strings.OfficeOM.L_InvalidDataFormat = "El formato del objeto de datos especificado no es válido."; +Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "No se pueden utilizar parámetros de coordenadas con el tipo de coerción Tabla cuando la tabla contiene celdas combinadas."; +Strings.OfficeOM.L_MissingRequiredArguments = "Faltan algunos argumentos necesarios"; +Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} desea mostrar una nueva ventana."; +Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Ignorar"; +Strings.OfficeOM.L_CustomFunctionNameCannotSplit = "El nombre de la función debe contener un espacio de nombres no vacío y un nombre corto no vacío."; +Strings.OfficeOM.L_ActivityLimitReached = "Se ha alcanzado el límite de actividad."; +Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Nota: Se recomienda que el número de celdas de una tabla sea inferior a 20.000."; +Strings.OfficeOM.L_GetSelectionNotSupported = "No se admite la selección actual."; +Strings.OfficeOM.L_DisplayDialogError = "Error de presentación del diálogo"; +Strings.OfficeOM.L_InvalidSelectionForBindingType = "No se puede crear un enlace con la selección actual y el tipo de enlace especificado."; +Strings.OfficeOM.L_DialogInvalidScheme = "No se admite el esquema de dirección URL. Use HTTPS en su lugar."; +Strings.OfficeOM.L_UnsupportedEnumeration = "Enumeración no compatible"; +Strings.OfficeOM.L_InvalidResourceUrlMessage = "La URL de recursos que se ha especificado en el manifiesto no es válida."; +Strings.OfficeOM.L_SettingsAreStale = "No se pudo guardar la configuración porque no está actualizada."; +Strings.OfficeOM.L_Timeout = "Se ha superado el tiempo de espera de la operación."; +Strings.OfficeOM.L_AppNameNotExist = "El nombre del complemento para {0} no existe."; +Strings.OfficeOM.L_DialogRequireHTTPS = "No se admite el protocolo HTTP. Utilizar HTTPS en su lugar"; +Strings.OfficeOM.L_BadSelectorString = "El formato de la cadena pasado al selector es incorrecto o no se admite."; +Strings.OfficeOM.L_RowIndexOutOfRange = "El valor de índice de la fila está fuera del intervalo permitido. Utilice un valor (0 o superior) que sea menor que el número de filas."; +Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Permitir"; +Strings.OfficeOM.L_BindingCreationError = "No se pudo crear el enlace"; +Strings.OfficeOM.L_CustomXmlOutOfDateName = "Los datos no son actuales" \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/es-es/office_strings.js b/node_modules/@microsoft/office-js/dist/es-es/office_strings.js index 725eb29..acebebf 100644 --- a/node_modules/@microsoft/office-js/dist/es-es/office_strings.js +++ b/node_modules/@microsoft/office-js/dist/es-es/office_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_UserAborted="El usuario anuló la solicitud aceptada.";Strings.OfficeOM.L_InvalidValue="Valor no válido";Strings.OfficeOM.L_SSOServerErrorMessage="Se produjo un error inesperado en el servidor.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="El contenido seleccionado tiene que estar en formato de tabla. Dé formato de tabla a los datos y vuelva a intentarlo.";Strings.OfficeOM.L_InvalidCoercion="Tipo de conversión no válido";Strings.OfficeOM.L_DataNotMatchCoercionType="El tipo de objeto de datos especificado no es compatible con la selección actual.";Strings.OfficeOM.L_HostError="Error de host";Strings.OfficeOM.L_SSOServerError="Se produjo un error en el proveedor de autenticación.";Strings.OfficeOM.L_UnsupportedUserIdentity="No se admite el tipo de identidad del usuario.";Strings.OfficeOM.L_GetDataIsTooLarge="El conjunto de datos solicitado es demasiado grande.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Haga una selección.";Strings.OfficeOM.L_DialogOK="Aceptar";Strings.OfficeOM.L_ElementMissing="No pudimos dar formato a la celda de la tabla porque faltan algunos valores de parámetro. Compruebe los parámetros y vuelva a intentarlo.";Strings.OfficeOM.L_InternalError="Error interno";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Nota: Se recomienda que la serie de formatos establecida mediante una llamada API de formato sea inferior a 100.";Strings.OfficeOM.L_InvalidReadForBlankRow="La fila especificada está en blanco.";Strings.OfficeOM.L_NoCapability="No dispone de permisos suficientes para esta acción.";Strings.OfficeOM.L_DialogAddressNotTrusted="El dominio de la URL no está incluido en el elemento AppDomains en el manifiesto.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="La operación no es compatible con este tipo de enlace.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="La operación falló porque este complemento ya está solicitando un token de acceso.";Strings.OfficeOM.L_InvalidObjectPath='La ruta del objeto "{0}" no funciona para lo que está intentando hacer. Si está usando el objeto en varias llamadas de "context.sync" y fuera de la ejecución secuencial de un lote ".run", use los métodos "context.trackedObjects.add()" y "context.trackedObjects.remove()" para administrar la duración de objeto.';Strings.OfficeOM.L_NonUniformPartialGetNotSupported="No se pueden utilizar parámetros de coordenadas con el tipo de coerción Tabla cuando la tabla contiene celdas combinadas.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Los datos no son actuales";Strings.OfficeOM.L_OutOfRange="Fuera del intervalo";Strings.OfficeOM.L_MissingParameter="Parámetro ausente";Strings.OfficeOM.L_InternalErrorDescription="Error interno.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Permitir";Strings.OfficeOM.L_NotSupportedBindingType="No se admite el tipo de enlace especificado {0}.";Strings.OfficeOM.L_InvalidDataObject="Objeto de datos no válido";Strings.OfficeOM.L_RedundantCallbackSpecification="La devolución de llamada no se puede especificar en la lista de argumentos y en el objeto opcional a la vez.";Strings.OfficeOM.L_DataNotMatchBindingType="El objeto de datos especificado no es compatible con el tipo de enlace.";Strings.OfficeOM.L_BadSelectorString="El formato de la cadena pasado al selector es incorrecto o no se admite.";Strings.OfficeOM.L_OperationNotSupported="No se admite esta operación.";Strings.OfficeOM.L_ShuttingDown="Hubo un problema con la operación porque los datos no son actuales en el servidor.";Strings.OfficeOM.L_BindingToMultipleSelection="No se admiten las selecciones discontinuas.";Strings.OfficeOM.L_DataNotMatchBindingSize="El objeto de datos proporcionado no coincide con el tamaño de la selección actual.";Strings.OfficeOM.L_EventHandlerAdditionFailed="No se pudo agregar el controlador de eventos.";Strings.OfficeOM.L_DataReadError="Error de lectura de datos";Strings.OfficeOM.L_NewWindowCrossZone='No pudimos crear un cuadro de diálogo a causa de la configuración de seguridad de su explorador. Pruebe otro explorador o {0} para que "{1}" y el dominio que se muestra en su barra de direcciones se encuentren en la misma zona de seguridad.';Strings.OfficeOM.L_InvalidArgumentGeneric="Los argumentos pasados a la función no funcionan en esta situación, faltan o no están en el formato correcto.";Strings.OfficeOM.L_InvalidArgument='El argumento "{0}" no funciona en esta situación, falta o no tiene el formato correcto.';Strings.OfficeOM.L_UnsupportedUserIdentityMessage="No se admite el tipo de identidad del usuario.";Strings.OfficeOM.L_InvalidSetRows="Las filas especificadas no son válidas.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="El tipo de conversión especificado no es compatible con este tipo de enlace.";Strings.OfficeOM.L_Timeout="Se ha superado el tiempo de espera de la operación.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Se alcanzó el límite de selección";Strings.OfficeOM.L_DocumentReadOnly="La operación solicitada no se permite en el modo de documento actual.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="No se pueden utilizar parámetros de coordenadas con el tipo de coerción Tabla cuando la tabla contiene celdas combinadas.";Strings.OfficeOM.L_InvalidSelectionForBindingType="No se puede crear un enlace con la selección actual y el tipo de enlace especificado.";Strings.OfficeOM.L_NotSupported="No se admite la función {0}.";Strings.OfficeOM.L_ActivityLimitReached="Se ha alcanzado el límite de actividad.";Strings.OfficeOM.L_UserAbortedMessage="El usuario no ha aceptado los permisos del complemento.";Strings.OfficeOM.L_DataWriteReminder="Aviso de escritura de datos";Strings.OfficeOM.L_IndexOutOfRange="Ãndice fuera del intervalo.";Strings.OfficeOM.L_APINotSupported="API no compatible";Strings.OfficeOM.L_InvalidColumnsForBinding="Las columnas especificadas no son válidas.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Ignorar";Strings.OfficeOM.L_APICallFailed="Error de llamada a la API";Strings.OfficeOM.L_FormattingReminder="Aviso de formato";Strings.OfficeOM.L_InvalidCellsValue="Uno o más de los parámetros de las celdas tienen valores que no están permitidos. Compruebe los valores y vuelva a intentarlo.";Strings.OfficeOM.L_MultipleNamedItemFound="Se han encontrado varios objetos con el mismo nombre.";Strings.OfficeOM.L_UnsupportedEnumeration="Enumeración no compatible";Strings.OfficeOM.L_CustomXmlError="Error de XML personalizado.";Strings.OfficeOM.L_DialogAlreadyOpened="No se pudo realizar la operación porque este complemento ya tiene un diálogo activo.";Strings.OfficeOM.L_DialogRequireHTTPS="No se admite el protocolo HTTP. Utilizar HTTPS en su lugar";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty='Intentar establecer la propiedad de sólo lectura "{0}".';Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod='Los cambios en la propiedad "{0}" no se puede aplicar a través de un método "object.set".';Strings.OfficeOM.L_InvalidGetRowColumnCounts="Los valores de rowCount o columnCount especificados no son válidos.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="El complemento ya está solicitando un token de acceso.";Strings.OfficeOM.L_UserNotSignedIn="Ningún usuario ha iniciado sesión en Office.";Strings.OfficeOM.L_FileTypeNotSupported="El tipo de archivo especificado no es compatible.";Strings.OfficeOM.L_FormatValueOutOfRange="El valor está fuera del intervalo permitido.";Strings.OfficeOM.L_EventHandlerRemovalFailed="No se pudo quitar el controlador de eventos.";Strings.OfficeOM.L_InvalidApiCallInContext="La llamada a API no es válida en el contexto actual.";Strings.OfficeOM.L_InvalidParameters="La función {0} contiene parámetros no válidos.";Strings.OfficeOM.L_InvalidSetColumns="Las columnas especificadas no son válidas.";Strings.OfficeOM.L_MissingRequiredArguments="Faltan algunos argumentos necesarios";Strings.OfficeOM.L_NavOutOfBound="No se pudo realizar la operación porque el índice está fuera del intervalo.";Strings.OfficeOM.L_DataWriteError="Error de escritura de datos";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Los argumentos de entrada no son válidos.";Strings.OfficeOM.L_InvalidAPICall="Llamada de API no válida";Strings.OfficeOM.L_TooManyArguments="hay demasiados argumentos";Strings.OfficeOM.L_SpecifiedIdNotExist="El identificador especificado no existe.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Nota: Se recomienda que el número de celdas de una tabla sea inferior a 20.000.";Strings.OfficeOM.L_InvalidBindingError="Error de enlace no válido";Strings.OfficeOM.L_SettingsStaleError="Error de configuración obsoleto";Strings.OfficeOM.L_ColIndexOutOfRange="El valor de índice de la columna está fuera del intervalo permitido. Utilice un valor (0 o superior) que sea menor que el número de columnas.";Strings.OfficeOM.L_InvalidDataFormat="El formato del objeto de datos especificado no es válido.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Un problema de red ha impedido la recuperación del archivo.";Strings.OfficeOM.L_OsfControlTypeNotSupported="No se admite el tipo OsfControl.";Strings.OfficeOM.L_ConnectionFailureWithStatus="Error en la solicitud; código de estado: {0}.";Strings.OfficeOM.L_NotSupportedEventType="No se admite el tipo de evento especificado {0}.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="configure el explorador";Strings.OfficeOM.L_TooManyIncompleteRequests="Espere a que finalice la llamada anterior.";Strings.OfficeOM.L_InvalidSSOAddinMessage="No se admite la API de identidad para este complemento.";Strings.OfficeOM.L_RowIndexOutOfRange="El valor de índice de la fila está fuera del intervalo permitido. Utilice un valor (0 o superior) que sea menor que el número de filas.";Strings.OfficeOM.L_NetworkProblem="Problema en la red";Strings.OfficeOM.L_SliceSizeNotSupported="No se admite el tamaño de segmento especificado.";Strings.OfficeOM.L_OverwriteWorksheetData="La operación establecida no se pudo realizar porque el objeto de datos proporcionado sobrescribirá o cambiará los datos.";Strings.OfficeOM.L_AppNameNotExist="El nombre del complemento para {0} no existe.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="El tipo de enlace especificado no es compatible con el elemento con nombre suministrado.";Strings.OfficeOM.L_InvalidTableOptionValue="Uno o más de los parámetros de tableOptions tienen valores que no están permitidos. Compruebe los valores y vuelva a intentarlo.";Strings.OfficeOM.L_UnsupportedDataObject="No se admite el tipo de objeto de datos proporcionado.";Strings.OfficeOM.L_CustomXmlNodeNotFound="No se encontró el nodo especificado.";Strings.OfficeOM.L_InitializeNotReady="Office.js no se ha cargado todavía por completo. Inténtelo de nuevo más tarde o asegúrese de agregar el código de inicialización en la función Office.initialize.";Strings.OfficeOM.L_SaveSettingsError="Error de configuración de guardado";Strings.OfficeOM.L_RunMustReturnPromise='La función por lotes que se pasa al método ".run" no ha devuelto una promesa. La función debe devolver una promesa para que puedan liberarse los objetos con seguimiento automático al completarse la operación por lotes. Normalmente, devuelve una promesa al devolver la respuesta de "context.sync()".';Strings.OfficeOM.L_DataNotMatchSelection="El objeto de datos proporcionado no es compatible con la forma o las dimensiones de la selección actual.";Strings.OfficeOM.L_SSOClientError="Se produjo un error en la solicitud de autenticación de Office.";Strings.OfficeOM.L_CannotNavigateTo="El objeto se encuentra en una ubicación donde no se admite la navegación.";Strings.OfficeOM.L_DialogInvalidScheme="No se admite el esquema de dirección URL. Use HTTPS en su lugar.";Strings.OfficeOM.L_InvalidBindingOperation="Operación de enlace no válido";Strings.OfficeOM.L_UserClickIgnore="El usuario decidió ignorar el cuadro de diálogo.";Strings.OfficeOM.L_PermissionDenied="Permiso denegado";Strings.OfficeOM.L_UnknownBindingType="El tipo de enlace no es compatible.";Strings.OfficeOM.L_SetDataIsTooLarge="El objeto de datos especificado es demasiado grande.";Strings.OfficeOM.L_SettingsAreStale="No se pudo guardar la configuración porque no está actualizada.";Strings.OfficeOM.L_BindingNotExist="El enlace especificado no existe.";Strings.OfficeOM.L_FunctionCallFailed="No se pudo llamar a la función {0}. Código de error: {1}.";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} desea mostrar una nueva ventana.";Strings.OfficeOM.L_InvalidNode="Nodo no válido";Strings.OfficeOM.L_InvalidGrant="Falta la autorización previa.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="No pudimos crear el cuadro de diálogo a causa de las restricciones del explorador. El dominio del cuadro de diálogo y el dominio del host del complemento no se encuentran en la misma zona de seguridad.";Strings.OfficeOM.L_PropertyDoesNotExist='Propiedad "{0}" no existe en el objeto.';Strings.OfficeOM.L_DataStale="Datos obsoletos";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Los datos no están actualizados. Recupere el objeto de nuevo.";Strings.OfficeOM.L_InvalidGetColumns="Las columnas especificadas no son válidas.";Strings.OfficeOM.L_InvalidGetStartRowColumn="Los valores de startRow o startColumn especificados no son válidos.";Strings.OfficeOM.L_GetDataParametersConflict="Hay un conflicto en los parámetros especificados.";Strings.OfficeOM.L_EventRegistrationError="Error de registro de eventos";Strings.OfficeOM.L_MemoryLimit="Límite de memoria superado";Strings.OfficeOM.L_InvalidGetRows="Las filas especificadas no son válidas.";Strings.OfficeOM.L_DialogNavigateError="Error de navegación por diálogo";Strings.OfficeOM.L_PropertyNotLoaded='La propiedad "{0}" no está disponible. Antes de leer el valor de la propiedad, llame al método de carga en el objeto contenedor y llame a "context.sync()" en el contexto de solicitud asociado.';Strings.OfficeOM.L_EventHandlerNotExist="No se encontró el controlador de eventos especificado para este enlace.";Strings.OfficeOM.L_CoercionTypeNotSupported="No se admite el tipo de conversión especificado.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath limita la selección a 1024 elementos.";Strings.OfficeOM.L_DisplayDialogError="Error de presentación del diálogo";Strings.OfficeOM.L_SelectionNotSupportCoercionType="La selección actual no es compatible con el tipo de conversión especificado.";Strings.OfficeOM.L_SetDataParametersConflict="Hay un conflicto en los parámetros especificados.";Strings.OfficeOM.L_InValidOptionalArgument="argumento opcional no válido";Strings.OfficeOM.L_CallbackNotAFunction="La devolución de llamada debe ser de tipo función. Era de tipo {0}.";Strings.OfficeOM.L_InvalidFormat="Error de formato no válido";Strings.OfficeOM.L_GetSelectionNotSupported="No se admite la selección actual.";Strings.OfficeOM.L_InvalidResourceUrl="La URL de recursos de aplicación que se ha proporcionado no es válida.";Strings.OfficeOM.L_BrowserAPINotSupported="Este explorador no es compatible con la API solicitada.";Strings.OfficeOM.L_SettingsCannotSave="No se pudo guardar la configuración.";Strings.OfficeOM.L_SettingNameNotExist="El nombre de configuración especificado no existe.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="La enumeración no se admite la aplicación host actual.";Strings.OfficeOM.L_TooManyOptionalObjects="existen varios objetos opcionales en la lista de parámetros";Strings.OfficeOM.L_RequestTokenUnavailable="Esta API se limitó para reducir la frecuencia de llamada.";Strings.OfficeOM.L_RequestTimeout="La llamada tardó demasiado tiempo en ejecutarse.";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Llamar a closeAsync en el archivo actual antes de recuperar de otro.";Strings.OfficeOM.L_SSOClientErrorMessage="Se produjo un error inesperado en el cliente.";Strings.OfficeOM.L_ValueNotLoaded='El valor del objeto de resultado aún no se ha cargado. Antes de leer la propiedad del valor, llame a "context.sync()" en el contexto de solicitud asociado.';Strings.OfficeOM.L_CannotRegisterEvent="No se puede registrar el controlador de eventos.";Strings.OfficeOM.L_InvalidRequestContext="No puede usar el objeto en distintos contextos de solicitudes.";Strings.OfficeOM.L_SelectionCannotBound="No se puede enlazar a la selección actual.";Strings.OfficeOM.L_ConnectionFailureWithDetails="Error en la solicitud; código de estado {0}; código de error {1}; mensaje de error: {2}";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="La sesión de Office Online ha caducado o no es válida. Para continuar, actualice la página.";Strings.OfficeOM.L_NotImplemented="La función {0} no está implementada.";Strings.OfficeOM.L_InvalidResourceUrlMessage="La URL de recursos que se ha especificado en el manifiesto no es válida.";Strings.OfficeOM.L_InvalidSetStartRowColumn="Los valores de startRow o startColumn especificados no son válidos.";Strings.OfficeOM.L_NamedItemNotFound="El elemento con nombre no existe.";Strings.OfficeOM.L_InvalidGrantMessage="Falta conceder permisos para este complemento.";Strings.OfficeOM.L_ReadSettingsError="Error de configuración de lectura";Strings.OfficeOM.L_BindingCreationError="No se pudo crear el enlace";Strings.OfficeOM.L_InvalidBinding="Enlace no válido";Strings.OfficeOM.L_TooManyOptionalFunction="existen varias funciones opcionales en la lista de parámetros";Strings.OfficeOM.L_CannotWriteToSelection="No se puede escribir en la selección actual.";Strings.OfficeOM.L_InvalidFormatValue="Uno o más de los parámetros de formato tienen valores que no están permitidos. Compruebe los valores y vuelva a intentarlo.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="La aplicación {0} no existe. No se llamó a Microsoft.Office.WebExtension.initialize(reason).";Strings.OfficeOM.L_InvalidOrTimedOutSession="Sesión caducada o no válida" \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_RequestTimeout="La llamada tardó demasiado tiempo en ejecutarse.";Strings.OfficeOM.L_SetDataParametersConflict="Hay un conflicto en los parámetros especificados.";Strings.OfficeOM.L_DocumentReadOnly="La operación solicitada no se permite en el modo de documento actual.";Strings.OfficeOM.L_SpecifiedIdNotExist="El identificador especificado no existe.";Strings.OfficeOM.L_InvalidCoercion="Tipo de conversión no válido";Strings.OfficeOM.L_NoCapability="No dispone de permisos suficientes para esta acción.";Strings.OfficeOM.L_SSOServerError="Se produjo un error en el proveedor de autenticación.";Strings.OfficeOM.L_DialogAddressNotTrusted="El dominio de la URL no está incluido en el elemento AppDomains en el manifiesto.";Strings.OfficeOM.L_UnsupportedDataObject="No se admite el tipo de objeto de datos proporcionado.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Nota: Se recomienda que la serie de formatos establecida mediante una llamada API de formato sea inferior a 100.";Strings.OfficeOM.L_RequestTokenUnavailable="Esta API se limitó para reducir la frecuencia de llamada.";Strings.OfficeOM.L_DataNotMatchBindingType="El objeto de datos especificado no es compatible con el tipo de enlace.";Strings.OfficeOM.L_BrowserAPINotSupported="Este explorador no es compatible con la API solicitada.";Strings.OfficeOM.L_InvalidNode="Nodo no válido";Strings.OfficeOM.L_UserNotSignedIn="Ningún usuario ha iniciado sesión en Office.";Strings.OfficeOM.L_InvalidArgument='El argumento "{0}" no funciona en esta situación, falta o no tiene el formato correcto.';Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="configure el explorador";Strings.OfficeOM.L_UnsupportedUserIdentity="No se admite el tipo de identidad del usuario.";Strings.OfficeOM.L_APINotSupported="API no compatible";Strings.OfficeOM.L_ConnectionFailureWithStatus="Error en la solicitud; código de estado: {0}.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod='Los cambios en la propiedad "{0}" no se puede aplicar a través de un método "object.set".';Strings.OfficeOM.L_ApiNotFoundDetails="El método o la propiedad {0} forman parte del conjunto de requisitos {1}, que no está disponible en su versión de {2}.";Strings.OfficeOM.L_RunMustReturnPromise='La función por lotes que se pasa al método ".run" no ha devuelto una promesa. La función debe devolver una promesa para que puedan liberarse los objetos con seguimiento automático al completarse la operación por lotes. Normalmente, devuelve una promesa al devolver la respuesta de "context.sync()".';Strings.OfficeOM.L_InvalidApiArgumentsMessage="Los argumentos de entrada no son válidos.";Strings.OfficeOM.L_NotImplemented="La función {0} no está implementada.";Strings.OfficeOM.L_NamedItemNotFound="El elemento con nombre no existe.";Strings.OfficeOM.L_FormattingReminder="Aviso de formato";Strings.OfficeOM.L_InvalidAPICall="Llamada de API no válida";Strings.OfficeOM.L_InvalidBindingOperation="Operación de enlace no válido";Strings.OfficeOM.L_InvalidGetRows="Las filas especificadas no son válidas.";Strings.OfficeOM.L_EventRegistrationError="Error de registro de eventos";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Haga una selección.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="La aplicación {0} no existe. No se llamó a Microsoft.Office.WebExtension.initialize(reason).";Strings.OfficeOM.L_SettingsCannotSave="No se pudo guardar la configuración.";Strings.OfficeOM.L_InvalidGetColumns="Las columnas especificadas no son válidas.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="El tipo de enlace especificado no es compatible con el elemento con nombre suministrado.";Strings.OfficeOM.L_CoercionTypeNotSupported="No se admite el tipo de conversión especificado.";Strings.OfficeOM.L_PropertyNotLoaded='La propiedad "{0}" no está disponible. Antes de leer el valor de la propiedad, llame al método de carga en el objeto contenedor y llame a "context.sync()" en el contexto de solicitud asociado.';Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory="Este complemento no admite el consentimiento del usuario.";Strings.OfficeOM.L_NavOutOfBound="No se pudo realizar la operación porque el índice está fuera del intervalo.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty='Intentar establecer la propiedad de sólo lectura "{0}".';Strings.OfficeOM.L_CloseFileBeforeRetrieve="Llamar a closeAsync en el archivo actual antes de recuperar de otro.";Strings.OfficeOM.L_SaveSettingsError="Error de configuración de guardado";Strings.OfficeOM.L_UserClickIgnore="El usuario decidió ignorar el cuadro de diálogo.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="No se admite el tipo de identidad del usuario.";Strings.OfficeOM.L_UserAbortedMessage="El usuario no ha aceptado los permisos del complemento.";Strings.OfficeOM.L_InvalidColumnsForBinding="Las columnas especificadas no son válidas.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Los valores de rowCount o columnCount especificados no son válidos.";Strings.OfficeOM.L_TooManyOptionalObjects="existen varios objetos opcionales en la lista de parámetros";Strings.OfficeOM.L_InValidOptionalArgument="argumento opcional no válido";Strings.OfficeOM.L_ShuttingDown="Hubo un problema con la operación porque los datos no son actuales en el servidor.";Strings.OfficeOM.L_InvalidSetColumns="Las columnas especificadas no son válidas.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Los datos no están actualizados. Recupere el objeto de nuevo.";Strings.OfficeOM.L_SliceSizeNotSupported="No se admite el tamaño de segmento especificado.";Strings.OfficeOM.L_SettingNameNotExist="El nombre de configuración especificado no existe.";Strings.OfficeOM.L_IndexOutOfRange="Ãndice fuera del intervalo.";Strings.OfficeOM.L_TooManyOptionalFunction="existen varias funciones opcionales en la lista de parámetros";Strings.OfficeOM.L_OutOfRange="Fuera del intervalo";Strings.OfficeOM.L_MemoryLimit="Límite de memoria superado";Strings.OfficeOM.L_TooManyIncompleteRequests="Espere a que finalice la llamada anterior.";Strings.OfficeOM.L_FileTypeNotSupported="El tipo de archivo especificado no es compatible.";Strings.OfficeOM.L_UnknownBindingType="El tipo de enlace no es compatible.";Strings.OfficeOM.L_FormatValueOutOfRange="El valor está fuera del intervalo permitido.";Strings.OfficeOM.L_InvalidSSOAddinMessage="No se admite la API de identidad para este complemento.";Strings.OfficeOM.L_DialogNavigateError="Error de navegación por diálogo";Strings.OfficeOM.L_ReadSettingsError="Error de configuración de lectura";Strings.OfficeOM.L_InvalidOperationInCellEditMode="Excel está en modo de edición de celdas. Salga del modo de edición pulsando Entrar o Tab o seleccionando otra celda y después vuelva a intentarlo.";Strings.OfficeOM.L_PropertyDoesNotExist='Propiedad "{0}" no existe en el objeto.';Strings.OfficeOM.L_SetDataIsTooLarge="El objeto de datos especificado es demasiado grande.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="La selección actual no es compatible con el tipo de conversión especificado.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="El complemento ya está solicitando un token de acceso.";Strings.OfficeOM.L_GetDataIsTooLarge="El conjunto de datos solicitado es demasiado grande.";Strings.OfficeOM.L_CustomFunctionImplementationMissing='La propiedad con este nombre en Excel.CustomFunctions que representa la definición de la función debe contener una propiedad "llamar" que implemente la función.';Strings.OfficeOM.L_InvalidRequestContext="No puede usar el objeto en distintos contextos de solicitudes.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Un problema de red ha impedido la recuperación del archivo.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="La enumeración no se admite la aplicación host actual.";Strings.OfficeOM.L_InvalidTableOptionValue="Uno o más de los parámetros de tableOptions tienen valores que no están permitidos. Compruebe los valores y vuelva a intentarlo.";Strings.OfficeOM.L_CustomXmlError="Error de XML personalizado.";Strings.OfficeOM.L_InvalidSetRows="Las filas especificadas no son válidas.";Strings.OfficeOM.L_CannotRegisterEvent="No se puede registrar el controlador de eventos.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="La sesión de Office Online ha caducado o no es válida. Para continuar, actualice la página.";Strings.OfficeOM.L_BindingNotExist="El enlace especificado no existe.";Strings.OfficeOM.L_PermissionDenied="Permiso denegado";Strings.OfficeOM.L_DataNotMatchCoercionType="El tipo de objeto de datos especificado no es compatible con la selección actual.";Strings.OfficeOM.L_DataWriteError="Error de escritura de datos";Strings.OfficeOM.L_MultipleNamedItemFound="Se han encontrado varios objetos con el mismo nombre.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="No se pueden utilizar parámetros de coordenadas con el tipo de coerción Tabla cuando la tabla contiene celdas combinadas.";Strings.OfficeOM.L_FunctionCallFailed="No se pudo llamar a la función {0}. Código de error: {1}.";Strings.OfficeOM.L_SSOClientErrorMessage="Se produjo un error inesperado en el cliente.";Strings.OfficeOM.L_InvalidFormat="Error de formato no válido";Strings.OfficeOM.L_NotSupportedEventType="No se admite el tipo de evento especificado {0}.";Strings.OfficeOM.L_ValueNotLoaded='El valor del objeto de resultado aún no se ha cargado. Antes de leer la propiedad del valor, llame a "context.sync()" en el contexto de solicitud asociado.';Strings.OfficeOM.L_CannotNavigateTo="El objeto se encuentra en una ubicación donde no se admite la navegación.";Strings.OfficeOM.L_InvalidCellsValue="Uno o más de los parámetros de las celdas tienen valores que no están permitidos. Compruebe los valores y vuelva a intentarlo.";Strings.OfficeOM.L_SSOServerErrorMessage="Se produjo un error inesperado en el servidor.";Strings.OfficeOM.L_EventHandlerAdditionFailed="No se pudo agregar el controlador de eventos.";Strings.OfficeOM.L_DataNotMatchSelection="El objeto de datos proporcionado no es compatible con la forma o las dimensiones de la selección actual.";Strings.OfficeOM.L_GetDataParametersConflict="Hay un conflicto en los parámetros especificados.";Strings.OfficeOM.L_MissingParameter="Parámetro ausente";Strings.OfficeOM.L_InvalidApiCallInContext="La llamada a API no es válida en el contexto actual.";Strings.OfficeOM.L_HostError="Error de host";Strings.OfficeOM.L_InvalidSetStartRowColumn="Los valores de startRow o startColumn especificados no son válidos.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="No pudimos crear el cuadro de diálogo a causa de las restricciones del explorador. El dominio del cuadro de diálogo y el dominio del host del complemento no se encuentran en la misma zona de seguridad.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="La operación falló porque este complemento ya está solicitando un token de acceso.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="El tipo de conversión especificado no es compatible con este tipo de enlace.";Strings.OfficeOM.L_TooManyArguments="hay demasiados argumentos";Strings.OfficeOM.L_InternalErrorDescription="Error interno.";Strings.OfficeOM.L_InitializeNotReady="Office.js no se ha cargado todavía por completo. Inténtelo de nuevo más tarde o asegúrese de agregar el código de inicialización en la función Office.initialize.";Strings.OfficeOM.L_DataReadError="Error de lectura de datos";Strings.OfficeOM.L_CustomXmlNodeNotFound="No se encontró el nodo especificado.";Strings.OfficeOM.L_InvalidGetStartRowColumn="Los valores de startRow o startColumn especificados no son válidos.";Strings.OfficeOM.L_DialogAlreadyOpened="No se pudo realizar la operación porque este complemento ya tiene un diálogo activo.";Strings.OfficeOM.L_ElementMissing="No pudimos dar formato a la celda de la tabla porque faltan algunos valores de parámetro. Compruebe los parámetros y vuelva a intentarlo.";Strings.OfficeOM.L_OperationNotSupported="No se admite esta operación.";Strings.OfficeOM.L_NotSupportedBindingType="No se admite el tipo de enlace especificado {0}.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Sesión caducada o no válida";Strings.OfficeOM.L_DataStale="Datos obsoletos";Strings.OfficeOM.L_UserAborted="El usuario anuló la solicitud aceptada.";Strings.OfficeOM.L_RedundantCallbackSpecification="La devolución de llamada no se puede especificar en la lista de argumentos y en el objeto opcional a la vez.";Strings.OfficeOM.L_InvalidObjectPath='La ruta del objeto "{0}" no funciona para lo que está intentando hacer. Si está usando el objeto en varias llamadas de "context.sync" y fuera de la ejecución secuencial de un lote ".run", use los métodos "context.trackedObjects.add()" y "context.trackedObjects.remove()" para administrar la duración de objeto.';Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath limita la selección a 1024 elementos.";Strings.OfficeOM.L_InvalidArgumentGeneric="Los argumentos pasados a la función no funcionan en esta situación, faltan o no están en el formato correcto.";Strings.OfficeOM.L_InvalidDataObject="Objeto de datos no válido";Strings.OfficeOM.L_CallbackNotAFunction="La devolución de llamada debe ser de tipo función. Era de tipo {0}.";Strings.OfficeOM.L_ColIndexOutOfRange="El valor de índice de la columna está fuera del intervalo permitido. Utilice un valor (0 o superior) que sea menor que el número de columnas.";Strings.OfficeOM.L_InvalidBindingError="Error de enlace no válido";Strings.OfficeOM.L_SettingsStaleError="Error de configuración obsoleto";Strings.OfficeOM.L_DataNotMatchBindingSize="El objeto de datos proporcionado no coincide con el tamaño de la selección actual.";Strings.OfficeOM.L_NetworkProblem="Problema en la red";Strings.OfficeOM.L_InvalidResourceUrl="La URL de recursos de aplicación que se ha proporcionado no es válida.";Strings.OfficeOM.L_InvalidGrant="Falta la autorización previa.";Strings.OfficeOM.L_EventHandlerRemovalFailed="No se pudo quitar el controlador de eventos.";Strings.OfficeOM.L_SSOConnectionLostErrorMessage="A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones.";Strings.OfficeOM.L_InternalError="Error interno";Strings.OfficeOM.L_CustomFunctionNameContainsBadChars="El nombre de función solo puede contener letras, números, guiones bajos y puntos.";Strings.OfficeOM.L_SSOConnectionLostError="A connection was lost during the sign in process.";Strings.OfficeOM.L_InvalidGrantMessage="Falta conceder permisos para este complemento.";Strings.OfficeOM.L_APICallFailed="Error de llamada a la API";Strings.OfficeOM.L_DataWriteReminder="Aviso de escritura de datos";Strings.OfficeOM.L_ConnectionFailureWithDetails="Error en la solicitud; código de estado {0}; código de error {1}; mensaje de error: {2}";Strings.OfficeOM.L_BindingToMultipleSelection="No se admiten las selecciones discontinuas.";Strings.OfficeOM.L_CannotWriteToSelection="No se puede escribir en la selección actual.";Strings.OfficeOM.L_OverwriteWorksheetData="La operación establecida no se pudo realizar porque el objeto de datos proporcionado sobrescribirá o cambiará los datos.";Strings.OfficeOM.L_InvalidReadForBlankRow="La fila especificada está en blanco.";Strings.OfficeOM.L_SSOClientError="Se produjo un error en la solicitud de autenticación de Office.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="El contenido seleccionado tiene que estar en formato de tabla. Dé formato de tabla a los datos y vuelva a intentarlo.";Strings.OfficeOM.L_InvalidBinding="Enlace no válido";Strings.OfficeOM.L_NewWindowCrossZone='No pudimos crear un cuadro de diálogo a causa de la configuración de seguridad de su explorador. Pruebe otro explorador o {0} para que "{1}" y el dominio que se muestra en su barra de direcciones se encuentren en la misma zona de seguridad.';Strings.OfficeOM.L_InvalidFormatValue="Uno o más de los parámetros de formato tienen valores que no están permitidos. Compruebe los valores y vuelva a intentarlo.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="La operación no es compatible con este tipo de enlace.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage="Se ha producido un error en la operación porque el complemento no admite el consentimiento del usuario en esta categoría";Strings.OfficeOM.L_EventHandlerNotExist="No se encontró el controlador de eventos especificado para este enlace.";Strings.OfficeOM.L_OsfControlTypeNotSupported="No se admite el tipo OsfControl.";Strings.OfficeOM.L_NotSupported="No se admite la función {0}.";Strings.OfficeOM.L_InvalidValue="Valor no válido";Strings.OfficeOM.L_CustomFunctionDefinitionMissing="Debe existir una propiedad con este nombre que represente la definición de la función en Excel.CustomFunctions.";Strings.OfficeOM.L_InvalidParameters="La función {0} contiene parámetros no válidos.";Strings.OfficeOM.L_SelectionCannotBound="No se puede enlazar a la selección actual.";Strings.OfficeOM.L_DialogOK="Aceptar";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Se alcanzó el límite de selección";Strings.OfficeOM.L_InvalidDataFormat="El formato del objeto de datos especificado no es válido.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="No se pueden utilizar parámetros de coordenadas con el tipo de coerción Tabla cuando la tabla contiene celdas combinadas.";Strings.OfficeOM.L_MissingRequiredArguments="Faltan algunos argumentos necesarios";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} desea mostrar una nueva ventana.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Ignorar";Strings.OfficeOM.L_CustomFunctionNameCannotSplit="El nombre de la función debe contener un espacio de nombres no vacío y un nombre corto no vacío.";Strings.OfficeOM.L_ActivityLimitReached="Se ha alcanzado el límite de actividad.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Nota: Se recomienda que el número de celdas de una tabla sea inferior a 20.000.";Strings.OfficeOM.L_GetSelectionNotSupported="No se admite la selección actual.";Strings.OfficeOM.L_DisplayDialogError="Error de presentación del diálogo";Strings.OfficeOM.L_InvalidSelectionForBindingType="No se puede crear un enlace con la selección actual y el tipo de enlace especificado.";Strings.OfficeOM.L_DialogInvalidScheme="No se admite el esquema de dirección URL. Use HTTPS en su lugar.";Strings.OfficeOM.L_UnsupportedEnumeration="Enumeración no compatible";Strings.OfficeOM.L_InvalidResourceUrlMessage="La URL de recursos que se ha especificado en el manifiesto no es válida.";Strings.OfficeOM.L_SettingsAreStale="No se pudo guardar la configuración porque no está actualizada.";Strings.OfficeOM.L_Timeout="Se ha superado el tiempo de espera de la operación.";Strings.OfficeOM.L_AppNameNotExist="El nombre del complemento para {0} no existe.";Strings.OfficeOM.L_DialogRequireHTTPS="No se admite el protocolo HTTP. Utilizar HTTPS en su lugar";Strings.OfficeOM.L_BadSelectorString="El formato de la cadena pasado al selector es incorrecto o no se admite.";Strings.OfficeOM.L_RowIndexOutOfRange="El valor de índice de la fila está fuera del intervalo permitido. Utilice un valor (0 o superior) que sea menor que el número de filas.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Permitir";Strings.OfficeOM.L_BindingCreationError="No se pudo crear el enlace";Strings.OfficeOM.L_CustomXmlOutOfDateName="Los datos no son actuales" \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/es-es/outlook_strings.debug.js b/node_modules/@microsoft/office-js/dist/es-es/outlook_strings.debug.js index 8f312a4..52509fa 100644 --- a/node_modules/@microsoft/office-js/dist/es-es/outlook_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/es-es/outlook_strings.debug.js @@ -1,34 +1,35 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("_u"); _u.ExtensibilityStrings = function() { }; _u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings"); -_u.ExtensibilityStrings.l_OffsetNotfound_Text = "No se encontró ningún desplazamiento de esta marca de hora."; _u.ExtensibilityStrings.l_InvalidDate_Text = "La entrada no se resuelve en una fecha válida."; -_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "No se proporcionaron destinatarios válidos."; -_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Una o varias direcciones de correo electrónico proporcionadas son demasiado largas."; -_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "El usuario quitó los datos adjuntos antes de que finalizara la carga."; +_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Los datos adjuntos no se pueden agregar al elemento."; +_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "El usuario cambió la posición del cursor mientras se insertaban los datos."; +_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "No se pueden eliminar los datos adjuntos porque no se encuentran los datos adjuntos con el índice de datos adjuntos."; +_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "El id. de datos adjuntos no es válido."; +_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = 'Para llamar al método: "{0}" se necesita un permiso elevado.'; _u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "No se pueden agregar datos adjuntos mientras se recupera del servidor la respuesta o el reenvío completos."; -_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "El número total de destinatarios del campo no puede ser mayor de {0}."; +_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "No se proporcionaron destinatarios válidos."; +_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Para tener acceso a los miembros protegidos de la API de JavaScript para Office se necesita un permiso elevado."; _u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Los datos adjuntos no se pueden agregar porque son demasiado grandes."; -_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "El elemento seleccionado se ha modificado."; _u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Uno o varios nombres de pantalla proporcionados son demasiado largos."; -_u.ExtensibilityStrings.l_InternalFormatError_Text = "Hubo un error de formato interno."; -_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "La ruta de los datos adjuntos no es válida."; -_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Los datos adjuntos no se pueden eliminar del elemento."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = 'Para llamar al método: "{0}" se necesita un permiso elevado.'; -_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Para tener acceso a los miembros protegidos de la API de JavaScript para Office se necesita un permiso elevado."; -_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "El id. de datos adjuntos no es válido."; -_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Error de escritura de datos"; -_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "El usuario cambió la posición del cursor mientras se insertaban los datos."; +_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Los parámetros especificados no coinciden con el formato esperado."; _u.ExtensibilityStrings.l_InvalidEventDates_Text = "La fecha de finalización se produce antes de la fecha de inicio."; -_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Error de datos adjuntos"; -_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "No se pueden agregar datos adjuntos porque el mensaje ya tiene el número máximo de datos adjuntos"; +_u.ExtensibilityStrings.l_InternalFormatError_Text = "Hubo un error de formato interno."; _u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "La inmunización HTML ha fallado."; -_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "No se pueden eliminar los datos adjuntos porque no se encuentran los datos adjuntos con el índice de datos adjuntos."; -_u.ExtensibilityStrings.l_InternalProtocolError_Text = 'Error de protocolo interno: "{0}".'; -_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Los parámetros especificados no coinciden con el formato esperado."; -_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Los datos adjuntos no se pueden agregar al elemento."; +_u.ExtensibilityStrings.l_OffsetNotfound_Text = "No se encontró ningún desplazamiento de esta marca de hora."; +_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Error de escritura de datos"; +_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "El elemento seleccionado se ha modificado."; +_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "El número total de destinatarios del campo no puede ser mayor de {0}."; +_u.ExtensibilityStrings.l_InvalidEndTime_Text = "La hora de finalización no puede ser anterior a la hora de inicio."; _u.ExtensibilityStrings.l_EwsRequestOversized_Text = "La solicitud supera el límite de tamaño de 1 MB. Modifique la solicitud de EWS."; -_u.ExtensibilityStrings.l_InvalidEndTime_Text = "La hora de finalización no puede ser anterior a la hora de inicio." +_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Los datos adjuntos no se pueden eliminar del elemento."; +_u.ExtensibilityStrings.l_InternalProtocolError_Text = 'Error de protocolo interno: "{0}".'; +_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "La ruta de los datos adjuntos no es válida."; +_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Una o varias direcciones de correo electrónico proporcionadas son demasiado largas."; +_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "No se pueden agregar datos adjuntos porque el mensaje ya tiene el número máximo de datos adjuntos"; +_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "El usuario quitó los datos adjuntos antes de que finalizara la carga."; +_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Error de datos adjuntos" \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/es-es/outlook_strings.js b/node_modules/@microsoft/office-js/dist/es-es/outlook_strings.js index 48ae386..07427ec 100644 --- a/node_modules/@microsoft/office-js/dist/es-es/outlook_strings.js +++ b/node_modules/@microsoft/office-js/dist/es-es/outlook_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_OffsetNotfound_Text="No se encontró ningún desplazamiento de esta marca de hora.";_u.ExtensibilityStrings.l_InvalidDate_Text="La entrada no se resuelve en una fecha válida.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="No se proporcionaron destinatarios válidos.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Una o varias direcciones de correo electrónico proporcionadas son demasiado largas.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="El usuario quitó los datos adjuntos antes de que finalizara la carga.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="No se pueden agregar datos adjuntos mientras se recupera del servidor la respuesta o el reenvío completos.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="El número total de destinatarios del campo no puede ser mayor de {0}.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Los datos adjuntos no se pueden agregar porque son demasiado grandes.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="El elemento seleccionado se ha modificado.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Uno o varios nombres de pantalla proporcionados son demasiado largos.";_u.ExtensibilityStrings.l_InternalFormatError_Text="Hubo un error de formato interno.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="La ruta de los datos adjuntos no es válida.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Los datos adjuntos no se pueden eliminar del elemento.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text='Para llamar al método: "{0}" se necesita un permiso elevado.';_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Para tener acceso a los miembros protegidos de la API de JavaScript para Office se necesita un permiso elevado.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="El id. de datos adjuntos no es válido.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Error de escritura de datos";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="El usuario cambió la posición del cursor mientras se insertaban los datos.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="La fecha de finalización se produce antes de la fecha de inicio.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Error de datos adjuntos";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="No se pueden agregar datos adjuntos porque el mensaje ya tiene el número máximo de datos adjuntos";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="La inmunización HTML ha fallado.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="No se pueden eliminar los datos adjuntos porque no se encuentran los datos adjuntos con el índice de datos adjuntos.";_u.ExtensibilityStrings.l_InternalProtocolError_Text='Error de protocolo interno: "{0}".';_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Los parámetros especificados no coinciden con el formato esperado.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Los datos adjuntos no se pueden agregar al elemento.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="La solicitud supera el límite de tamaño de 1 MB. Modifique la solicitud de EWS.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="La hora de finalización no puede ser anterior a la hora de inicio." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_InvalidDate_Text="La entrada no se resuelve en una fecha válida.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Los datos adjuntos no se pueden agregar al elemento.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="El usuario cambió la posición del cursor mientras se insertaban los datos.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="No se pueden eliminar los datos adjuntos porque no se encuentran los datos adjuntos con el índice de datos adjuntos.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="El id. de datos adjuntos no es válido.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text='Para llamar al método: "{0}" se necesita un permiso elevado.';_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="No se pueden agregar datos adjuntos mientras se recupera del servidor la respuesta o el reenvío completos.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="No se proporcionaron destinatarios válidos.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Para tener acceso a los miembros protegidos de la API de JavaScript para Office se necesita un permiso elevado.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Los datos adjuntos no se pueden agregar porque son demasiado grandes.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Uno o varios nombres de pantalla proporcionados son demasiado largos.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Los parámetros especificados no coinciden con el formato esperado.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="La fecha de finalización se produce antes de la fecha de inicio.";_u.ExtensibilityStrings.l_InternalFormatError_Text="Hubo un error de formato interno.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="La inmunización HTML ha fallado.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="No se encontró ningún desplazamiento de esta marca de hora.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Error de escritura de datos";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="El elemento seleccionado se ha modificado.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="El número total de destinatarios del campo no puede ser mayor de {0}.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="La hora de finalización no puede ser anterior a la hora de inicio.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="La solicitud supera el límite de tamaño de 1 MB. Modifique la solicitud de EWS.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Los datos adjuntos no se pueden eliminar del elemento.";_u.ExtensibilityStrings.l_InternalProtocolError_Text='Error de protocolo interno: "{0}".';_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="La ruta de los datos adjuntos no es válida.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Una o varias direcciones de correo electrónico proporcionadas son demasiado largas.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="No se pueden agregar datos adjuntos porque el mensaje ya tiene el número máximo de datos adjuntos";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="El usuario quitó los datos adjuntos antes de que finalizara la carga.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Error de datos adjuntos" \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/et-ee/office_strings.debug.js b/node_modules/@microsoft/office-js/dist/et-ee/office_strings.debug.js index 1ce762d..6d6e659 100644 --- a/node_modules/@microsoft/office-js/dist/et-ee/office_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/et-ee/office_strings.debug.js @@ -1,179 +1,190 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("Strings"); Strings.OfficeOM = function() { }; Strings.OfficeOM.registerClass("Strings.OfficeOM"); -Strings.OfficeOM.L_SettingNameNotExist = "Määratud sätte nime pole olemas."; -Strings.OfficeOM.L_BadSelectorString = "Valijale edasi antud string on valesti vormindatud või toetuseta."; -Strings.OfficeOM.L_InvalidSetRows = "Määratud read ei sobi."; -Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Dialoogiboksi ei saanud brauseripiirangute tõttu luua. Dialoogiboksi domeen ja lisandmooduli hosti domeen ei asu samas turbetsoonis."; -Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Koordinaatparameetreid ei saa kasutada kooshoidmistüübiga Tabel, kui tabel sisaldab liidetud lahtreid."; -Strings.OfficeOM.L_DataReadError = "Andmete lugemise tõrge"; -Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Koordinaatparameetreid ei saa kasutada kooshoidmistüübiga Tabel, kui tabel sisaldab liidetud lahtreid."; -Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Andmed on aegunud. Tooge objekt uuesti."; -Strings.OfficeOM.L_ValueNotLoaded = 'Tulemiobjekti väärtust pole veel laaditud. Enne väärtuseatribuudi lugemist kutsuge seostatud päringukontekstis "context.sync()".'; -Strings.OfficeOM.L_InvalidApiCallInContext = "API kutse pole praeguses kontekstis sobiv."; +Strings.OfficeOM.L_OperationNotSupported = "Toimingut ei toetata."; Strings.OfficeOM.L_GetDataIsTooLarge = "Nõutud andmekomplekt on liiga mahukas."; -Strings.OfficeOM.L_UserNotSignedIn = "Office'isse pole kasutajaid sisse logitud."; -Strings.OfficeOM.L_InvalidGrantMessage = "Lisandmoodulile pole õigust antud."; -Strings.OfficeOM.L_InvalidColumnsForBinding = "Määratud veerud ei sobi."; -Strings.OfficeOM.L_ElementMissing = "Tabelilahtrit ei saanud vormindada, kuna mõni parameetriväärtus on puudu. Kontrollige parameetreid ja proovige uuesti."; -Strings.OfficeOM.L_InvalidFormatValue = "Vähemalt ühe vorminguparameetri väärtus pole lubatud. Kontrollige väärtusi ja proovige uuesti."; -Strings.OfficeOM.L_GetSelectionNotSupported = "Praegune valik pole toetatud."; -Strings.OfficeOM.L_DataNotMatchSelection = "Esitatud andmeobjekt ei ühildu praeguse valiku kuju või mõõtmetega."; +Strings.OfficeOM.L_SSOServerError = "Autentimisteenuse pakkujas ilmnes tõrge."; +Strings.OfficeOM.L_MemoryLimit = "Mälupiirang on ületatud"; +Strings.OfficeOM.L_ApiNotFoundDetails = 'Meetod või atribuut {0} on osa nõuete komplektist "{1}", mis pole rakenduse {2} selles versioonis saadaval.'; +Strings.OfficeOM.L_GetDataParametersConflict = "Määratud parameetrid on vastuolus."; +Strings.OfficeOM.L_Timeout = "Toiminguks ette nähtud aeg on lõppenud."; +Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = 'Katse määrata kirjutuskaitstud atribuuti "{0}".'; +Strings.OfficeOM.L_InvalidDataFormat = "Määratud andmeobjekti vorming ei sobi."; +Strings.OfficeOM.L_RunMustReturnPromise = 'RUN-meetodile edastatud pakktööfunktsioon ei tagastanud lubadust. Funktsioon peab tagastama lubaduse, et automaatselt jälgitavad objektid saaks pakktöö lõpulejõudmisel vabastada. Enamasti tuleb lubaduse tagastamiseks tagastada meetodi "context.sync()" vastus.'; Strings.OfficeOM.L_DialogRequireHTTPS = "HTTP-protokolli ei toetata. Kasutage selle asemel HTTPS-i."; -Strings.OfficeOM.L_SettingsStaleError = "Sätete aegumise tõrge"; -Strings.OfficeOM.L_CustomXmlNodeNotFound = "Määratud sõlme ei leitud."; -Strings.OfficeOM.L_UnsupportedEnumerationMessage = "Praegune hostrakendus ei toeta nummerdamist."; -Strings.OfficeOM.L_SettingsAreStale = "Sätteid ei saanud salvestada, kuna need pole ajakohased."; -Strings.OfficeOM.L_InvalidCellsValue = "Vähemalt ühe lahtriparameetri väärtus pole lubatud. Kontrollige väärtusi ja proovige uuesti."; -Strings.OfficeOM.L_InvalidReadForBlankRow = "Määratud rida on tühi."; -Strings.OfficeOM.L_ConnectionFailureWithDetails = "Taotlus nurjus olekukoodiga {0}, tõrkekoodiga {1} ja järgmise tõrketeatega: {2}"; -Strings.OfficeOM.L_InvalidResourceUrlMessage = "Manifestis on määratud sobimatu ressursi URL."; -Strings.OfficeOM.L_FileTypeNotSupported = "Määratud failitüüpi ei toetata."; -Strings.OfficeOM.L_CannotWriteToSelection = "Praegusesse valikusse ei saa kirjutada."; +Strings.OfficeOM.L_DisplayDialogError = "Kuva dialoogitõrge"; Strings.OfficeOM.L_FormatValueOutOfRange = "Väärtus on väljaspool lubatud vahemikku."; -Strings.OfficeOM.L_FormattingReminder = "Vormindamise meeldetuletus"; -Strings.OfficeOM.L_RequestTimeout = "Kutse täitmiseks kulus liiga palju aega."; -Strings.OfficeOM.L_SetDataIsTooLarge = "Määratud andmeobjekt on liiga suur."; -Strings.OfficeOM.L_InvalidSetColumns = "Määratud veerud ei sobi."; -Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Määratud kooshoidmistüüp ei ühildu selle sidumistüübiga."; +Strings.OfficeOM.L_BindingNotExist = "Määratud sidumist pole olemas."; +Strings.OfficeOM.L_UnsupportedEnumeration = "Toetuseta nummerdamine"; +Strings.OfficeOM.L_PropertyDoesNotExist = 'Atribuuti "{0}" pole objektis olemas.'; Strings.OfficeOM.L_OsfControlTypeNotSupported = "Tüüp OsfControl pole toetatud."; -Strings.OfficeOM.L_PermissionDenied = "Õigusest keelduti"; -Strings.OfficeOM.L_BindingToMultipleSelection = "Mittekülgnevaid valikuid ei toetata."; -Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Enne teise faili toomist kutsuge praeguse faili jaoks closeAsync."; -Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Valikupiir on käes"; -Strings.OfficeOM.L_MissingParameter = "Parameeter on puudu"; -Strings.OfficeOM.L_Timeout = "Toiminguks ette nähtud aeg on lõppenud."; -Strings.OfficeOM.L_SSOClientErrorMessage = "Klientrakenduses ilmnes ootamatu tõrge."; -Strings.OfficeOM.L_DataWriteError = "Andmete kirjutamise tõrge"; -Strings.OfficeOM.L_InvalidObjectPath = 'Objektitee "{0}" ei sobi teie toimingu tegemiseks. Kui kasutate objekti mitmes context.sync-kutses ja väljaspool RUN-meetodi pakktöö järjestikkäitust, kasutage objekti eluea haldamiseks meetodeid "context.trackedObjects.add()" ja "context.trackedObjects.remove()".'; -Strings.OfficeOM.L_DialogAddressNotTrusted = "URL-i domeeni pole manifesti AppDomainsi elementi kaasatud."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Toiming nurjus, kuna see lisandmoodul juba nõuab pääsutõendit."; -Strings.OfficeOM.L_TooManyOptionalObjects = "parameetriloendis on mitu valikulist objekti"; +Strings.OfficeOM.L_InvalidBindingError = "Sobimatu sidumise tõrge"; +Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Määratud sidumistüüp ei ühildu esitatud nimelise üksusega."; +Strings.OfficeOM.L_NoCapability = "Teil pole selle toimingu jaoks piisavaid lubasid."; +Strings.OfficeOM.L_InvalidFormatValue = "Vähemalt ühe vorminguparameetri väärtus pole lubatud. Kontrollige väärtusi ja proovige uuesti."; +Strings.OfficeOM.L_InvalidResourceUrlMessage = "Manifestis on määratud sobimatu ressursi URL."; +Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Koordinaatparameetreid ei saa kasutada kooshoidmistüübiga Tabel, kui tabel sisaldab liidetud lahtreid."; +Strings.OfficeOM.L_ConnectionFailureWithStatus = "Taotlus nurjus olekukoodiga {0}."; +Strings.OfficeOM.L_UserNotSignedIn = "Office'isse pole kasutajaid sisse logitud."; +Strings.OfficeOM.L_InvalidNode = "Sobimatu sõlm"; +Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = 'Atribuudi "{0}" muudatusi ei saa rakendada meetodi "object.set" abil.'; +Strings.OfficeOM.L_DocumentReadOnly = "Nõutud toiming pole praeguses dokumendirežiimis lubatud."; +Strings.OfficeOM.L_InternalError = "Sisemine tõrge"; +Strings.OfficeOM.L_EventRegistrationError = "Sündmuse registreerimise tõrge"; Strings.OfficeOM.L_MissingRequiredArguments = "mõned nõutavad argumendid on puudu"; Strings.OfficeOM.L_InvalidArgument = 'Argument "{0}" ei sobi selles olukorras kasutamiseks, puudub või pole õiges vormingus.'; -Strings.OfficeOM.L_CallbackNotAFunction = "Tagasikutse peab olema funktsioon-tüüpi, kuid on tüüpi {0}."; -Strings.OfficeOM.L_InvalidNode = "Sobimatu sõlm"; -Strings.OfficeOM.L_NotSupported = "Funktsiooni {0} ei toetata."; -Strings.OfficeOM.L_UnsupportedEnumeration = "Toetuseta nummerdamine"; -Strings.OfficeOM.L_MultipleNamedItemFound = "Leiti mitu sama nimega objekti."; -Strings.OfficeOM.L_DialogOK = "OK"; +Strings.OfficeOM.L_CannotWriteToSelection = "Praegusesse valikusse ei saa kirjutada."; +Strings.OfficeOM.L_MissingParameter = "Parameeter on puudu"; +Strings.OfficeOM.L_BrowserAPINotSupported = "See brauser ei toeta taotletud API-t."; +Strings.OfficeOM.L_InvalidDataObject = "Sobimatu andmeobjekt"; +Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Praegune valik ei ühildu määratud kooshoidmistüübiga."; +Strings.OfficeOM.L_CustomXmlError = "Kohandatud XML-i tõrge."; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory = "See lisandmoodul ei toeta kasutaja nõusolekut."; +Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Kasutaja identiteeditüüpi ei toetata."; +Strings.OfficeOM.L_RequestTokenUnavailable = "See API on kutsete sageduse vähendamiseks ahendatud."; Strings.OfficeOM.L_ShuttingDown = "Toiming nurjus, kuna serveris olevad andmed pole ajakohased."; +Strings.OfficeOM.L_UserClickIgnore = "Kasutaja eiras dialoogiboksi."; Strings.OfficeOM.L_InvalidFormat = "Sobimatu vormingu tõrge"; -Strings.OfficeOM.L_EventHandlerRemovalFailed = "Sündmuseohjurit ei saanud eemaldada."; -Strings.OfficeOM.L_OutOfRange = "Vahemikust väljas"; -Strings.OfficeOM.L_UnsupportedDataObject = "Esitatud andmeobjektitüüpi ei toetata."; +Strings.OfficeOM.L_CustomXmlNodeNotFound = "Määratud sõlme ei leitud."; +Strings.OfficeOM.L_SettingsCannotSave = "Sätteid ei saanud salvestada."; +Strings.OfficeOM.L_SliceSizeNotSupported = "Määratud sektorisuurust ei toetata."; +Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Faili ei saanud võrguprobleemi tõttu tuua."; +Strings.OfficeOM.L_NavOutOfBound = "Toiming nurjus, sest indeks on väljaspool vahemikku."; +Strings.OfficeOM.L_IndexOutOfRange = "Indeks on väljaspool vahemikku."; +Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPathis on valik piiratud 1024 üksusega."; +Strings.OfficeOM.L_InvalidGetRows = "Määratud read ei sobi."; +Strings.OfficeOM.L_UserAbortedMessage = "Kasutaja ei nõustunud lisandmoodulile õigusi andma."; +Strings.OfficeOM.L_NamedItemNotFound = "Nimega üksust pole olemas."; +Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Koordinaatparameetreid ei saa kasutada kooshoidmistüübiga Tabel, kui tabel sisaldab liidetud lahtreid."; +Strings.OfficeOM.L_InvalidSetRows = "Määratud read ei sobi."; +Strings.OfficeOM.L_EventHandlerNotExist = "Määratud sündmuseohjurit ei leitud selle sidumise jaoks."; +Strings.OfficeOM.L_DataWriteError = "Andmete kirjutamise tõrge"; +Strings.OfficeOM.L_InvalidGetColumns = "Määratud veerud ei sobi."; +Strings.OfficeOM.L_PermissionDenied = "Õigusest keelduti"; +Strings.OfficeOM.L_HostError = "Hosti tõrge"; +Strings.OfficeOM.L_NotSupported = "Funktsiooni {0} ei toetata."; +Strings.OfficeOM.L_GetSelectionNotSupported = "Praegune valik pole toetatud."; Strings.OfficeOM.L_EventHandlerAdditionFailed = "Sündmuseohjurit ei saanud lisada."; -Strings.OfficeOM.L_OperationNotSupported = "Toimingut ei toetata."; -Strings.OfficeOM.L_SelectionCannotBound = "Praeguse valikuga ei saa siduda."; +Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "Office Online'i seanss on aegunud või ei sobi. Jätkamiseks värskendage lehte."; +Strings.OfficeOM.L_InvalidColumnsForBinding = "Määratud veerud ei sobi."; +Strings.OfficeOM.L_TooManyOptionalFunction = "parameetriloendis on mitu valikulist funktsiooni"; +Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Toiming nurjus, kuna see lisandmoodul juba nõuab pääsutõendit."; Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Märkus: vormindus-API määratud vorminduskogude arv peaks soovituslikult olema väiksem kui 100."; -Strings.OfficeOM.L_InvalidGetStartRowColumn = "Määratud väärtus startRow või startColumn ei sobi."; +Strings.OfficeOM.L_OutOfRange = "Vahemikust väljas"; +Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Lisandmoodul taotleb juba pääsutõendit."; +Strings.OfficeOM.L_UnsupportedEnumerationMessage = "Praegune hostrakendus ei toeta nummerdamist."; +Strings.OfficeOM.L_ActivityLimitReached = "Tegevuslimiit on täis."; +Strings.OfficeOM.L_SSOServerErrorMessage = "Serveris ilmnes ootamatu tõrge."; +Strings.OfficeOM.L_UnsupportedDataObject = "Esitatud andmeobjektitüüpi ei toetata."; +Strings.OfficeOM.L_EventHandlerRemovalFailed = "Sündmuseohjurit ei saanud eemaldada."; +Strings.OfficeOM.L_CustomFunctionDefinitionMissing = "Excel.CustomFunctions peab sisaldama selle nimega atribuuti, mis tähistab funktsiooni definitsiooni."; +Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} soovib kuvada uue akna."; +Strings.OfficeOM.L_InvalidParameters = "Funktsiooni {0} parameetrid pole sobivad."; +Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Dialoogiboksi ei saanud brauseripiirangute tõttu luua. Dialoogiboksi domeen ja lisandmooduli hosti domeen ei asu samas turbetsoonis."; +Strings.OfficeOM.L_InvalidCoercion = "Sobimatu kooshoidmise tüüp"; +Strings.OfficeOM.L_NewWindowCrossZone = 'Dialoogiboksi ei saa brauseri turbesätete tõttu luua. Proovige mõnda muud brauserit või {0} nii, et "{1}" ja aadressiribal kuvatav domeen asuksid samas turbetsoonis.'; +Strings.OfficeOM.L_SSOConnectionLostErrorMessage = "A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones."; Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "konfigureerige brauser"; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage = "Toiming nurjus, kuna see lisandmoodul ei toeta kasutaja nõusolekut selles kategoorias"; Strings.OfficeOM.L_InitializeNotReady = "Office.js pole veel täielikult laaditud. Palun proovige hiljem uuesti või veenduge, et lähtestamiskood on lisatud funktsiooni Office.initialize."; -Strings.OfficeOM.L_InternalErrorDescription = "Ilmnes sisemine tõrge."; -Strings.OfficeOM.L_SSOClientError = "Office'i autentimistaotluses ilmnes tõrge."; -Strings.OfficeOM.L_CoercionTypeNotSupported = "Määratud kooshoidmistüüpi ei toetata."; -Strings.OfficeOM.L_BindingNotExist = "Määratud sidumist pole olemas."; +Strings.OfficeOM.L_UserAborted = "Kasutaja loobus nõustumistaotlusest."; +Strings.OfficeOM.L_DialogOK = "OK"; +Strings.OfficeOM.L_InvalidAPICall = "Sobimatu API kutse"; +Strings.OfficeOM.L_FormattingReminder = "Vormindamise meeldetuletus"; +Strings.OfficeOM.L_InvalidApiCallInContext = "API kutse pole praeguses kontekstis sobiv."; +Strings.OfficeOM.L_InvalidBindingOperation = "Sobimatu sidumise toiming"; +Strings.OfficeOM.L_CustomXmlOutOfDateName = "Andmed pole ajakohased"; +Strings.OfficeOM.L_InvalidOperationInCellEditMode = "Excel töötab lahtriredigeerimisrežiimis. Vajutage redigeerimisrežiimist väljumiseks sisestusklahvi (ENTER) või tabeldusklahvi (TAB) või valige mõni muu lahter ja proovige siis uuesti."; +Strings.OfficeOM.L_ElementMissing = "Tabelilahtrit ei saanud vormindada, kuna mõni parameetriväärtus on puudu. Kontrollige parameetreid ja proovige uuesti."; Strings.OfficeOM.L_NotSupportedEventType = "Määratud sündmuse tüüp {0} pole toetatud."; -Strings.OfficeOM.L_NetworkProblem = "Võrguprobleem"; -Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Luba"; -Strings.OfficeOM.L_InvalidGetRows = "Määratud read ei sobi."; -Strings.OfficeOM.L_InvalidBindingError = "Sobimatu sidumise tõrge"; -Strings.OfficeOM.L_DialogInvalidScheme = "URL-i skeemi ei toetata. Kasutage selle asemel HTTPS-i."; -Strings.OfficeOM.L_ActivityLimitReached = "Tegevuslimiit on täis."; -Strings.OfficeOM.L_InvalidSSOAddinMessage = "Identiteedi API-d selle lisandmooduli korral ei toetata."; -Strings.OfficeOM.L_AppNameNotExist = "Lisandmooduli {0} nime pole olemas."; +Strings.OfficeOM.L_SaveSettingsError = "Sätete salvestamise tõrge"; +Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Määratud väärtused rowCount ja columnCount pole sobivad."; +Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Enne teise faili toomist kutsuge praeguse faili jaoks closeAsync."; +Strings.OfficeOM.L_CustomFunctionImplementationMissing = 'Excel.CustomFunctionsis asuv selle nimega atribuut, mis tähistab funktsiooni definitsiooni, peab sisaldama funktsiooni juurutavat atribuuti "call".'; +Strings.OfficeOM.L_InvalidRequestContext = "Objekti ei saa kasutada mitmes eri päringukontekstis."; +Strings.OfficeOM.L_RedundantCallbackSpecification = "Tagasikutse ei saa olla korraga määratud nii argumendiloendis kui valikulises objektis."; Strings.OfficeOM.L_NotImplemented = "Funktsioon {0} pole juurutatud."; -Strings.OfficeOM.L_RunMustReturnPromise = 'RUN-meetodile edastatud pakktööfunktsioon ei tagastanud lubadust. Funktsioon peab tagastama lubaduse, et automaatselt jälgitavad objektid saaks pakktöö lõpulejõudmisel vabastada. Enamasti tuleb lubaduse tagastamiseks tagastada meetodi "context.sync()" vastus.'; -Strings.OfficeOM.L_TooManyArguments = "liiga palju argumente"; -Strings.OfficeOM.L_InvalidValue = "Sobimatu väärtus"; -Strings.OfficeOM.L_IndexOutOfRange = "Indeks on väljaspool vahemikku."; -Strings.OfficeOM.L_NotSupportedBindingType = "Määratud sidumistüüp {0} pole toetatud."; -Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Rakendust {0} pole olemas. Microsoft.Office.WebExtension.initialize(reason) pole kutsutud."; -Strings.OfficeOM.L_InvalidOrTimedOutSession = "Seanss ei sobi või on aegunud"; -Strings.OfficeOM.L_NavOutOfBound = "Toiming nurjus, sest indeks on väljaspool vahemikku."; -Strings.OfficeOM.L_DataNotMatchBindingSize = "Esitatud andmeobjekt ei vasta praeguse valiku suurusele."; -Strings.OfficeOM.L_BindingCreationError = "Sidumise loomise tõrge"; +Strings.OfficeOM.L_DataNotMatchBindingType = "Määratud andmeobjekt ei ühildu sidumistüübiga."; +Strings.OfficeOM.L_SettingNameNotExist = "Määratud sätte nime pole olemas."; Strings.OfficeOM.L_APICallFailed = "API kutse nurjus"; -Strings.OfficeOM.L_PropertyDoesNotExist = 'Atribuuti "{0}" pole objektis olemas.'; -Strings.OfficeOM.L_SaveSettingsError = "Sätete salvestamise tõrge"; -Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Sisendargumendid ei sobi."; +Strings.OfficeOM.L_InvalidResourceUrl = "Esitatud on sobimatu rakenduse ressursi URL."; +Strings.OfficeOM.L_RowIndexOutOfRange = "Reaindeksi väärtus on väljaspool lubatud vahemikku. Kasutage ridade arvust väiksemat väärtust (0 või suurem)."; +Strings.OfficeOM.L_SSOConnectionLostError = "A connection was lost during the sign in process."; +Strings.OfficeOM.L_DataNotMatchCoercionType = "Määratud andmeobjekti tüüp ei ühildu praeguse kooshoidmistüübiga."; +Strings.OfficeOM.L_SettingsAreStale = "Sätteid ei saanud salvestada, kuna need pole ajakohased."; +Strings.OfficeOM.L_CustomFunctionNameContainsBadChars = "Funktsiooni nimi võib sisaldada ainult tähti, numbreid, allkriipse ja punkte."; +Strings.OfficeOM.L_CannotRegisterEvent = "Sündmuseohjurit ei saa registreerida."; +Strings.OfficeOM.L_TooManyIncompleteRequests = "Oodake, kuni eelmine kutse lõpule jõuab."; +Strings.OfficeOM.L_InValidOptionalArgument = "sobimatu valikuline argument"; +Strings.OfficeOM.L_ConnectionFailureWithDetails = "Taotlus nurjus olekukoodiga {0}, tõrkekoodiga {1} ja järgmise tõrketeatega: {2}"; +Strings.OfficeOM.L_CustomFunctionNameCannotSplit = "Funktsiooni nimi peab sisaldama mittetühja nimeruumi ja mittetühja lühinime."; +Strings.OfficeOM.L_InvalidSetColumns = "Määratud veerud ei sobi."; +Strings.OfficeOM.L_InvalidSelectionForBindingType = "Sidumist ei saa praeguse valikuga ja määratud sidumistüübiga luua."; +Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Ignoreeri"; +Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Andmed on aegunud. Tooge objekt uuesti."; +Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Valikupiir on käes"; +Strings.OfficeOM.L_InvalidCellsValue = "Vähemalt ühe lahtriparameetri väärtus pole lubatud. Kontrollige väärtusi ja proovige uuesti."; +Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Rakendust {0} pole olemas. Microsoft.Office.WebExtension.initialize(reason) pole kutsutud."; +Strings.OfficeOM.L_TooManyOptionalObjects = "parameetriloendis on mitu valikulist objekti"; +Strings.OfficeOM.L_AppNameNotExist = "Lisandmooduli {0} nime pole olemas."; +Strings.OfficeOM.L_SSOClientError = "Office'i autentimistaotluses ilmnes tõrge."; +Strings.OfficeOM.L_DialogAddressNotTrusted = "URL-i domeeni pole manifesti AppDomainsi elementi kaasatud."; Strings.OfficeOM.L_SpecifiedIdNotExist = "Määratud ID-d pole olemas."; +Strings.OfficeOM.L_SettingsStaleError = "Sätete aegumise tõrge"; Strings.OfficeOM.L_PropertyNotLoaded = 'Atribuut "{0}" pole saadaval. Enne atribuudi väärtuse lugemist kutsuge seda sisaldava objekti laadimismeetod ja seostuva päringukonteksti jaoks kutsuge meetod "context.sync()".'; -Strings.OfficeOM.L_DocumentReadOnly = "Nõutud toiming pole praeguses dokumendirežiimis lubatud."; Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Palun valige."; -Strings.OfficeOM.L_SettingsCannotSave = "Sätteid ei saanud salvestada."; -Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Määratud sidumistüüp ei ühildu esitatud nimelise üksusega."; -Strings.OfficeOM.L_DialogAlreadyOpened = "Toiming nurjus, kuna sellel lisandmoodulil on juba aktiivne dialoog."; -Strings.OfficeOM.L_SliceSizeNotSupported = "Määratud sektorisuurust ei toetata."; -Strings.OfficeOM.L_InvalidSelectionForBindingType = "Sidumist ei saa praeguse valikuga ja määratud sidumistüübiga luua."; -Strings.OfficeOM.L_TooManyIncompleteRequests = "Oodake, kuni eelmine kutse lõpule jõuab."; -Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Märkus: tabelis peaks soovituslikult olema alla 20 000 lahtri."; -Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Faili ei saanud võrguprobleemi tõttu tuua."; -Strings.OfficeOM.L_InvalidSetStartRowColumn = "Määratud väärtus startRow või startColumn ei sobi."; -Strings.OfficeOM.L_OverwriteWorksheetData = "Määramistoiming nurjus, kuna esitatud andmeobjekt kirjutab andmed üle või neid."; -Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Toiming pole selle sidumistüübi korral toetatud."; -Strings.OfficeOM.L_DataNotMatchCoercionType = "Määratud andmeobjekti tüüp ei ühildu praeguse kooshoidmistüübiga."; -Strings.OfficeOM.L_InvalidAPICall = "Sobimatu API kutse"; -Strings.OfficeOM.L_EventRegistrationError = "Sündmuse registreerimise tõrge"; -Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Ignoreeri"; -Strings.OfficeOM.L_MemoryLimit = "Mälupiirang on ületatud"; -Strings.OfficeOM.L_InvalidResourceUrl = "Esitatud on sobimatu rakenduse ressursi URL."; -Strings.OfficeOM.L_DisplayDialogError = "Kuva dialoogitõrge"; -Strings.OfficeOM.L_InvalidGetColumns = "Määratud veerud ei sobi."; -Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Praegune valik ei ühildu määratud kooshoidmistüübiga."; -Strings.OfficeOM.L_RedundantCallbackSpecification = "Tagasikutse ei saa olla korraga määratud nii argumendiloendis kui valikulises objektis."; -Strings.OfficeOM.L_InValidOptionalArgument = "sobimatu valikuline argument"; -Strings.OfficeOM.L_ReadSettingsError = "Sätete lugemise tõrge"; +Strings.OfficeOM.L_BindingCreationError = "Sidumise loomise tõrge"; +Strings.OfficeOM.L_InvalidReadForBlankRow = "Määratud rida on tühi."; +Strings.OfficeOM.L_InvalidTableOptionValue = "Vähemalt ühe tabelisuvandite parameetri väärtus pole lubatud. Kontrollige väärtusi ja proovige uuesti."; +Strings.OfficeOM.L_DataNotMatchBindingSize = "Esitatud andmeobjekt ei vasta praeguse valiku suurusele."; +Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Määratud kooshoidmistüüp ei ühildu selle sidumistüübiga."; +Strings.OfficeOM.L_InvalidGrantMessage = "Lisandmoodulile pole õigust antud."; +Strings.OfficeOM.L_SetDataIsTooLarge = "Määratud andmeobjekt on liiga suur."; +Strings.OfficeOM.L_CoercionTypeNotSupported = "Määratud kooshoidmistüüpi ei toetata."; +Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Sisendargumendid ei sobi."; +Strings.OfficeOM.L_NotSupportedBindingType = "Määratud sidumistüüp {0} pole toetatud."; +Strings.OfficeOM.L_InvalidOrTimedOutSession = "Seanss ei sobi või on aegunud"; Strings.OfficeOM.L_UnsupportedUserIdentity = "Kasutaja identiteeditüüpi ei toetata."; -Strings.OfficeOM.L_InvalidArgumentGeneric = "Funktsiooni saadetud argumendid ei toimi selles situatsioonis, on puudu või pole õiges vormingus."; -Strings.OfficeOM.L_CustomXmlError = "Kohandatud XML-i tõrge."; -Strings.OfficeOM.L_InvalidBindingOperation = "Sobimatu sidumise toiming"; -Strings.OfficeOM.L_DataNotMatchBindingType = "Määratud andmeobjekt ei ühildu sidumistüübiga."; -Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = 'Atribuudi "{0}" muudatusi ei saa rakendada meetodi "object.set" abil.'; -Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = 'Katse määrata kirjutuskaitstud atribuuti "{0}".'; -Strings.OfficeOM.L_TooManyOptionalFunction = "parameetriloendis on mitu valikulist funktsiooni"; -Strings.OfficeOM.L_UnknownBindingType = "Sidumistüüpi ei toetata."; -Strings.OfficeOM.L_ConnectionFailureWithStatus = "Taotlus nurjus olekukoodiga {0}."; -Strings.OfficeOM.L_NoCapability = "Teil pole selle toimingu jaoks piisavaid lubasid."; -Strings.OfficeOM.L_CustomXmlOutOfDateName = "Andmed pole ajakohased"; -Strings.OfficeOM.L_APINotSupported = "API tugi puudub"; -Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Lisandmoodul taotleb juba pääsutõendit."; -Strings.OfficeOM.L_RequestTokenUnavailable = "See API on kutsete sageduse vähendamiseks ahendatud."; -Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Määratud väärtused rowCount ja columnCount pole sobivad."; -Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Valitud sisu peab olema tabelivormingus. Vormindage andmed tabelina ja proovige uuesti."; -Strings.OfficeOM.L_InvalidGrant = "Eelautoriseering on puudu."; Strings.OfficeOM.L_CannotNavigateTo = "Objekt asub kohas, kus navigeerimist ei toetata."; -Strings.OfficeOM.L_CannotRegisterEvent = "Sündmuseohjurit ei saa registreerida."; -Strings.OfficeOM.L_InvalidDataFormat = "Määratud andmeobjekti vorming ei sobi."; -Strings.OfficeOM.L_InvalidParameters = "Funktsiooni {0} parameetrid pole sobivad."; Strings.OfficeOM.L_SetDataParametersConflict = "Määratud parameetrid on vastuolus."; +Strings.OfficeOM.L_DialogAlreadyOpened = "Toiming nurjus, kuna sellel lisandmoodulil on juba aktiivne dialoog."; +Strings.OfficeOM.L_FileTypeNotSupported = "Määratud failitüüpi ei toetata."; Strings.OfficeOM.L_ColIndexOutOfRange = "Veeruindeksi väärtus on väljaspool lubatud vahemikku. Kasutage veergude arvust väiksemat väärtust (0 või suurem)."; -Strings.OfficeOM.L_NewWindowCrossZone = 'Dialoogiboksi ei saa brauseri turbesätete tõttu luua. Proovige mõnda muud brauserit või {0} nii, et "{1}" ja aadressiribal kuvatav domeen asuksid samas turbetsoonis.'; +Strings.OfficeOM.L_ReadSettingsError = "Sätete lugemise tõrge"; +Strings.OfficeOM.L_DataReadError = "Andmete lugemise tõrge"; +Strings.OfficeOM.L_InternalErrorDescription = "Ilmnes sisemine tõrge."; Strings.OfficeOM.L_DataStale = "Andmed pole ajakohased"; -Strings.OfficeOM.L_RowIndexOutOfRange = "Reaindeksi väärtus on väljaspool lubatud vahemikku. Kasutage ridade arvust väiksemat väärtust (0 või suurem)."; -Strings.OfficeOM.L_UserClickIgnore = "Kasutaja eiras dialoogiboksi."; -Strings.OfficeOM.L_BrowserAPINotSupported = "See brauser ei toeta taotletud API-t."; -Strings.OfficeOM.L_UserAbortedMessage = "Kasutaja ei nõustunud lisandmoodulile õigusi andma."; -Strings.OfficeOM.L_FunctionCallFailed = "Funktsiooni {0} ei saanud kutsuda; tõrke kood: {1}."; -Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} soovib kuvada uue akna."; -Strings.OfficeOM.L_InvalidDataObject = "Sobimatu andmeobjekt"; +Strings.OfficeOM.L_UnknownBindingType = "Sidumistüüpi ei toetata."; Strings.OfficeOM.L_DialogNavigateError = "Dialooginavigeerimistõrge"; -Strings.OfficeOM.L_InvalidCoercion = "Sobimatu kooshoidmise tüüp"; -Strings.OfficeOM.L_EventHandlerNotExist = "Määratud sündmuseohjurit ei leitud selle sidumise jaoks."; -Strings.OfficeOM.L_InternalError = "Sisemine tõrge"; -Strings.OfficeOM.L_InvalidRequestContext = "Objekti ei saa kasutada mitmes eri päringukontekstis."; -Strings.OfficeOM.L_UserAborted = "Kasutaja loobus nõustumistaotlusest."; -Strings.OfficeOM.L_InvalidTableOptionValue = "Vähemalt ühe tabelisuvandite parameetri väärtus pole lubatud. Kontrollige väärtusi ja proovige uuesti."; -Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPathis on valik piiratud 1024 üksusega."; -Strings.OfficeOM.L_SSOServerError = "Autentimisteenuse pakkujas ilmnes tõrge."; -Strings.OfficeOM.L_DataWriteReminder = "Andmekirjutuse meeldetuletus"; -Strings.OfficeOM.L_SSOServerErrorMessage = "Serveris ilmnes ootamatu tõrge."; -Strings.OfficeOM.L_GetDataParametersConflict = "Määratud parameetrid on vastuolus."; -Strings.OfficeOM.L_HostError = "Hosti tõrge"; +Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Valitud sisu peab olema tabelivormingus. Vormindage andmed tabelina ja proovige uuesti."; +Strings.OfficeOM.L_InvalidSetStartRowColumn = "Määratud väärtus startRow või startColumn ei sobi."; +Strings.OfficeOM.L_TooManyArguments = "liiga palju argumente"; +Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Toiming pole selle sidumistüübi korral toetatud."; +Strings.OfficeOM.L_FunctionCallFailed = "Funktsiooni {0} ei saanud kutsuda; tõrke kood: {1}."; +Strings.OfficeOM.L_SelectionCannotBound = "Praeguse valikuga ei saa siduda."; +Strings.OfficeOM.L_RequestTimeout = "Kutse täitmiseks kulus liiga palju aega."; +Strings.OfficeOM.L_NetworkProblem = "Võrguprobleem"; +Strings.OfficeOM.L_BadSelectorString = "Valijale edasi antud string on valesti vormindatud või toetuseta."; +Strings.OfficeOM.L_DataNotMatchSelection = "Esitatud andmeobjekt ei ühildu praeguse valiku kuju või mõõtmetega."; +Strings.OfficeOM.L_SSOClientErrorMessage = "Klientrakenduses ilmnes ootamatu tõrge."; +Strings.OfficeOM.L_InvalidArgumentGeneric = "Funktsiooni saadetud argumendid ei toimi selles situatsioonis, on puudu või pole õiges vormingus."; +Strings.OfficeOM.L_InvalidSSOAddinMessage = "Identiteedi API-d selle lisandmooduli korral ei toetata."; +Strings.OfficeOM.L_DialogInvalidScheme = "URL-i skeemi ei toetata. Kasutage selle asemel HTTPS-i."; +Strings.OfficeOM.L_InvalidObjectPath = 'Objektitee "{0}" ei sobi teie toimingu tegemiseks. Kui kasutate objekti mitmes context.sync-kutses ja väljaspool RUN-meetodi pakktöö järjestikkäitust, kasutage objekti eluea haldamiseks meetodeid "context.trackedObjects.add()" ja "context.trackedObjects.remove()".'; +Strings.OfficeOM.L_MultipleNamedItemFound = "Leiti mitu sama nimega objekti."; +Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Luba"; +Strings.OfficeOM.L_InvalidValue = "Sobimatu väärtus"; +Strings.OfficeOM.L_CallbackNotAFunction = "Tagasikutse peab olema funktsioon-tüüpi, kuid on tüüpi {0}."; Strings.OfficeOM.L_InvalidBinding = "Sobimatu sidumine"; -Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "Office Online'i seanss on aegunud või ei sobi. Jätkamiseks värskendage lehte."; -Strings.OfficeOM.L_NamedItemNotFound = "Nimega üksust pole olemas."; -Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Kasutaja identiteeditüüpi ei toetata." +Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Märkus: tabelis peaks soovituslikult olema alla 20 000 lahtri."; +Strings.OfficeOM.L_OverwriteWorksheetData = "Määramistoiming nurjus, kuna esitatud andmeobjekt kirjutab andmed üle või neid."; +Strings.OfficeOM.L_InvalidGrant = "Eelautoriseering on puudu."; +Strings.OfficeOM.L_DataWriteReminder = "Andmekirjutuse meeldetuletus"; +Strings.OfficeOM.L_ValueNotLoaded = 'Tulemiobjekti väärtust pole veel laaditud. Enne väärtuseatribuudi lugemist kutsuge seostatud päringukontekstis "context.sync()".'; +Strings.OfficeOM.L_APINotSupported = "API tugi puudub"; +Strings.OfficeOM.L_BindingToMultipleSelection = "Mittekülgnevaid valikuid ei toetata."; +Strings.OfficeOM.L_InvalidGetStartRowColumn = "Määratud väärtus startRow või startColumn ei sobi." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/et-ee/office_strings.js b/node_modules/@microsoft/office-js/dist/et-ee/office_strings.js index c7e3ea6..7d4fa9d 100644 --- a/node_modules/@microsoft/office-js/dist/et-ee/office_strings.js +++ b/node_modules/@microsoft/office-js/dist/et-ee/office_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_SettingNameNotExist="Määratud sätte nime pole olemas.";Strings.OfficeOM.L_BadSelectorString="Valijale edasi antud string on valesti vormindatud või toetuseta.";Strings.OfficeOM.L_InvalidSetRows="Määratud read ei sobi.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Dialoogiboksi ei saanud brauseripiirangute tõttu luua. Dialoogiboksi domeen ja lisandmooduli hosti domeen ei asu samas turbetsoonis.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Koordinaatparameetreid ei saa kasutada kooshoidmistüübiga Tabel, kui tabel sisaldab liidetud lahtreid.";Strings.OfficeOM.L_DataReadError="Andmete lugemise tõrge";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Koordinaatparameetreid ei saa kasutada kooshoidmistüübiga Tabel, kui tabel sisaldab liidetud lahtreid.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Andmed on aegunud. Tooge objekt uuesti.";Strings.OfficeOM.L_ValueNotLoaded='Tulemiobjekti väärtust pole veel laaditud. Enne väärtuseatribuudi lugemist kutsuge seostatud päringukontekstis "context.sync()".';Strings.OfficeOM.L_InvalidApiCallInContext="API kutse pole praeguses kontekstis sobiv.";Strings.OfficeOM.L_GetDataIsTooLarge="Nõutud andmekomplekt on liiga mahukas.";Strings.OfficeOM.L_UserNotSignedIn="Office'isse pole kasutajaid sisse logitud.";Strings.OfficeOM.L_InvalidGrantMessage="Lisandmoodulile pole õigust antud.";Strings.OfficeOM.L_InvalidColumnsForBinding="Määratud veerud ei sobi.";Strings.OfficeOM.L_ElementMissing="Tabelilahtrit ei saanud vormindada, kuna mõni parameetriväärtus on puudu. Kontrollige parameetreid ja proovige uuesti.";Strings.OfficeOM.L_InvalidFormatValue="Vähemalt ühe vorminguparameetri väärtus pole lubatud. Kontrollige väärtusi ja proovige uuesti.";Strings.OfficeOM.L_GetSelectionNotSupported="Praegune valik pole toetatud.";Strings.OfficeOM.L_DataNotMatchSelection="Esitatud andmeobjekt ei ühildu praeguse valiku kuju või mõõtmetega.";Strings.OfficeOM.L_DialogRequireHTTPS="HTTP-protokolli ei toetata. Kasutage selle asemel HTTPS-i.";Strings.OfficeOM.L_SettingsStaleError="Sätete aegumise tõrge";Strings.OfficeOM.L_CustomXmlNodeNotFound="Määratud sõlme ei leitud.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="Praegune hostrakendus ei toeta nummerdamist.";Strings.OfficeOM.L_SettingsAreStale="Sätteid ei saanud salvestada, kuna need pole ajakohased.";Strings.OfficeOM.L_InvalidCellsValue="Vähemalt ühe lahtriparameetri väärtus pole lubatud. Kontrollige väärtusi ja proovige uuesti.";Strings.OfficeOM.L_InvalidReadForBlankRow="Määratud rida on tühi.";Strings.OfficeOM.L_ConnectionFailureWithDetails="Taotlus nurjus olekukoodiga {0}, tõrkekoodiga {1} ja järgmise tõrketeatega: {2}";Strings.OfficeOM.L_InvalidResourceUrlMessage="Manifestis on määratud sobimatu ressursi URL.";Strings.OfficeOM.L_FileTypeNotSupported="Määratud failitüüpi ei toetata.";Strings.OfficeOM.L_CannotWriteToSelection="Praegusesse valikusse ei saa kirjutada.";Strings.OfficeOM.L_FormatValueOutOfRange="Väärtus on väljaspool lubatud vahemikku.";Strings.OfficeOM.L_FormattingReminder="Vormindamise meeldetuletus";Strings.OfficeOM.L_RequestTimeout="Kutse täitmiseks kulus liiga palju aega.";Strings.OfficeOM.L_SetDataIsTooLarge="Määratud andmeobjekt on liiga suur.";Strings.OfficeOM.L_InvalidSetColumns="Määratud veerud ei sobi.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Määratud kooshoidmistüüp ei ühildu selle sidumistüübiga.";Strings.OfficeOM.L_OsfControlTypeNotSupported="Tüüp OsfControl pole toetatud.";Strings.OfficeOM.L_PermissionDenied="Õigusest keelduti";Strings.OfficeOM.L_BindingToMultipleSelection="Mittekülgnevaid valikuid ei toetata.";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Enne teise faili toomist kutsuge praeguse faili jaoks closeAsync.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Valikupiir on käes";Strings.OfficeOM.L_MissingParameter="Parameeter on puudu";Strings.OfficeOM.L_Timeout="Toiminguks ette nähtud aeg on lõppenud.";Strings.OfficeOM.L_SSOClientErrorMessage="Klientrakenduses ilmnes ootamatu tõrge.";Strings.OfficeOM.L_DataWriteError="Andmete kirjutamise tõrge";Strings.OfficeOM.L_InvalidObjectPath='Objektitee "{0}" ei sobi teie toimingu tegemiseks. Kui kasutate objekti mitmes context.sync-kutses ja väljaspool RUN-meetodi pakktöö järjestikkäitust, kasutage objekti eluea haldamiseks meetodeid "context.trackedObjects.add()" ja "context.trackedObjects.remove()".';Strings.OfficeOM.L_DialogAddressNotTrusted="URL-i domeeni pole manifesti AppDomainsi elementi kaasatud.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Toiming nurjus, kuna see lisandmoodul juba nõuab pääsutõendit.";Strings.OfficeOM.L_TooManyOptionalObjects="parameetriloendis on mitu valikulist objekti";Strings.OfficeOM.L_MissingRequiredArguments="mõned nõutavad argumendid on puudu";Strings.OfficeOM.L_InvalidArgument='Argument "{0}" ei sobi selles olukorras kasutamiseks, puudub või pole õiges vormingus.';Strings.OfficeOM.L_CallbackNotAFunction="Tagasikutse peab olema funktsioon-tüüpi, kuid on tüüpi {0}.";Strings.OfficeOM.L_InvalidNode="Sobimatu sõlm";Strings.OfficeOM.L_NotSupported="Funktsiooni {0} ei toetata.";Strings.OfficeOM.L_UnsupportedEnumeration="Toetuseta nummerdamine";Strings.OfficeOM.L_MultipleNamedItemFound="Leiti mitu sama nimega objekti.";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_ShuttingDown="Toiming nurjus, kuna serveris olevad andmed pole ajakohased.";Strings.OfficeOM.L_InvalidFormat="Sobimatu vormingu tõrge";Strings.OfficeOM.L_EventHandlerRemovalFailed="Sündmuseohjurit ei saanud eemaldada.";Strings.OfficeOM.L_OutOfRange="Vahemikust väljas";Strings.OfficeOM.L_UnsupportedDataObject="Esitatud andmeobjektitüüpi ei toetata.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Sündmuseohjurit ei saanud lisada.";Strings.OfficeOM.L_OperationNotSupported="Toimingut ei toetata.";Strings.OfficeOM.L_SelectionCannotBound="Praeguse valikuga ei saa siduda.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Märkus: vormindus-API määratud vorminduskogude arv peaks soovituslikult olema väiksem kui 100.";Strings.OfficeOM.L_InvalidGetStartRowColumn="Määratud väärtus startRow või startColumn ei sobi.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="konfigureerige brauser";Strings.OfficeOM.L_InitializeNotReady="Office.js pole veel täielikult laaditud. Palun proovige hiljem uuesti või veenduge, et lähtestamiskood on lisatud funktsiooni Office.initialize.";Strings.OfficeOM.L_InternalErrorDescription="Ilmnes sisemine tõrge.";Strings.OfficeOM.L_SSOClientError="Office'i autentimistaotluses ilmnes tõrge.";Strings.OfficeOM.L_CoercionTypeNotSupported="Määratud kooshoidmistüüpi ei toetata.";Strings.OfficeOM.L_BindingNotExist="Määratud sidumist pole olemas.";Strings.OfficeOM.L_NotSupportedEventType="Määratud sündmuse tüüp {0} pole toetatud.";Strings.OfficeOM.L_NetworkProblem="Võrguprobleem";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Luba";Strings.OfficeOM.L_InvalidGetRows="Määratud read ei sobi.";Strings.OfficeOM.L_InvalidBindingError="Sobimatu sidumise tõrge";Strings.OfficeOM.L_DialogInvalidScheme="URL-i skeemi ei toetata. Kasutage selle asemel HTTPS-i.";Strings.OfficeOM.L_ActivityLimitReached="Tegevuslimiit on täis.";Strings.OfficeOM.L_InvalidSSOAddinMessage="Identiteedi API-d selle lisandmooduli korral ei toetata.";Strings.OfficeOM.L_AppNameNotExist="Lisandmooduli {0} nime pole olemas.";Strings.OfficeOM.L_NotImplemented="Funktsioon {0} pole juurutatud.";Strings.OfficeOM.L_RunMustReturnPromise='RUN-meetodile edastatud pakktööfunktsioon ei tagastanud lubadust. Funktsioon peab tagastama lubaduse, et automaatselt jälgitavad objektid saaks pakktöö lõpulejõudmisel vabastada. Enamasti tuleb lubaduse tagastamiseks tagastada meetodi "context.sync()" vastus.';Strings.OfficeOM.L_TooManyArguments="liiga palju argumente";Strings.OfficeOM.L_InvalidValue="Sobimatu väärtus";Strings.OfficeOM.L_IndexOutOfRange="Indeks on väljaspool vahemikku.";Strings.OfficeOM.L_NotSupportedBindingType="Määratud sidumistüüp {0} pole toetatud.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Rakendust {0} pole olemas. Microsoft.Office.WebExtension.initialize(reason) pole kutsutud.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Seanss ei sobi või on aegunud";Strings.OfficeOM.L_NavOutOfBound="Toiming nurjus, sest indeks on väljaspool vahemikku.";Strings.OfficeOM.L_DataNotMatchBindingSize="Esitatud andmeobjekt ei vasta praeguse valiku suurusele.";Strings.OfficeOM.L_BindingCreationError="Sidumise loomise tõrge";Strings.OfficeOM.L_APICallFailed="API kutse nurjus";Strings.OfficeOM.L_PropertyDoesNotExist='Atribuuti "{0}" pole objektis olemas.';Strings.OfficeOM.L_SaveSettingsError="Sätete salvestamise tõrge";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Sisendargumendid ei sobi.";Strings.OfficeOM.L_SpecifiedIdNotExist="Määratud ID-d pole olemas.";Strings.OfficeOM.L_PropertyNotLoaded='Atribuut "{0}" pole saadaval. Enne atribuudi väärtuse lugemist kutsuge seda sisaldava objekti laadimismeetod ja seostuva päringukonteksti jaoks kutsuge meetod "context.sync()".';Strings.OfficeOM.L_DocumentReadOnly="Nõutud toiming pole praeguses dokumendirežiimis lubatud.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Palun valige.";Strings.OfficeOM.L_SettingsCannotSave="Sätteid ei saanud salvestada.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Määratud sidumistüüp ei ühildu esitatud nimelise üksusega.";Strings.OfficeOM.L_DialogAlreadyOpened="Toiming nurjus, kuna sellel lisandmoodulil on juba aktiivne dialoog.";Strings.OfficeOM.L_SliceSizeNotSupported="Määratud sektorisuurust ei toetata.";Strings.OfficeOM.L_InvalidSelectionForBindingType="Sidumist ei saa praeguse valikuga ja määratud sidumistüübiga luua.";Strings.OfficeOM.L_TooManyIncompleteRequests="Oodake, kuni eelmine kutse lõpule jõuab.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Märkus: tabelis peaks soovituslikult olema alla 20 000 lahtri.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Faili ei saanud võrguprobleemi tõttu tuua.";Strings.OfficeOM.L_InvalidSetStartRowColumn="Määratud väärtus startRow või startColumn ei sobi.";Strings.OfficeOM.L_OverwriteWorksheetData="Määramistoiming nurjus, kuna esitatud andmeobjekt kirjutab andmed üle või neid.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Toiming pole selle sidumistüübi korral toetatud.";Strings.OfficeOM.L_DataNotMatchCoercionType="Määratud andmeobjekti tüüp ei ühildu praeguse kooshoidmistüübiga.";Strings.OfficeOM.L_InvalidAPICall="Sobimatu API kutse";Strings.OfficeOM.L_EventRegistrationError="Sündmuse registreerimise tõrge";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Ignoreeri";Strings.OfficeOM.L_MemoryLimit="Mälupiirang on ületatud";Strings.OfficeOM.L_InvalidResourceUrl="Esitatud on sobimatu rakenduse ressursi URL.";Strings.OfficeOM.L_DisplayDialogError="Kuva dialoogitõrge";Strings.OfficeOM.L_InvalidGetColumns="Määratud veerud ei sobi.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Praegune valik ei ühildu määratud kooshoidmistüübiga.";Strings.OfficeOM.L_RedundantCallbackSpecification="Tagasikutse ei saa olla korraga määratud nii argumendiloendis kui valikulises objektis.";Strings.OfficeOM.L_InValidOptionalArgument="sobimatu valikuline argument";Strings.OfficeOM.L_ReadSettingsError="Sätete lugemise tõrge";Strings.OfficeOM.L_UnsupportedUserIdentity="Kasutaja identiteeditüüpi ei toetata.";Strings.OfficeOM.L_InvalidArgumentGeneric="Funktsiooni saadetud argumendid ei toimi selles situatsioonis, on puudu või pole õiges vormingus.";Strings.OfficeOM.L_CustomXmlError="Kohandatud XML-i tõrge.";Strings.OfficeOM.L_InvalidBindingOperation="Sobimatu sidumise toiming";Strings.OfficeOM.L_DataNotMatchBindingType="Määratud andmeobjekt ei ühildu sidumistüübiga.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod='Atribuudi "{0}" muudatusi ei saa rakendada meetodi "object.set" abil.';Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty='Katse määrata kirjutuskaitstud atribuuti "{0}".';Strings.OfficeOM.L_TooManyOptionalFunction="parameetriloendis on mitu valikulist funktsiooni";Strings.OfficeOM.L_UnknownBindingType="Sidumistüüpi ei toetata.";Strings.OfficeOM.L_ConnectionFailureWithStatus="Taotlus nurjus olekukoodiga {0}.";Strings.OfficeOM.L_NoCapability="Teil pole selle toimingu jaoks piisavaid lubasid.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Andmed pole ajakohased";Strings.OfficeOM.L_APINotSupported="API tugi puudub";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Lisandmoodul taotleb juba pääsutõendit.";Strings.OfficeOM.L_RequestTokenUnavailable="See API on kutsete sageduse vähendamiseks ahendatud.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Määratud väärtused rowCount ja columnCount pole sobivad.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Valitud sisu peab olema tabelivormingus. Vormindage andmed tabelina ja proovige uuesti.";Strings.OfficeOM.L_InvalidGrant="Eelautoriseering on puudu.";Strings.OfficeOM.L_CannotNavigateTo="Objekt asub kohas, kus navigeerimist ei toetata.";Strings.OfficeOM.L_CannotRegisterEvent="Sündmuseohjurit ei saa registreerida.";Strings.OfficeOM.L_InvalidDataFormat="Määratud andmeobjekti vorming ei sobi.";Strings.OfficeOM.L_InvalidParameters="Funktsiooni {0} parameetrid pole sobivad.";Strings.OfficeOM.L_SetDataParametersConflict="Määratud parameetrid on vastuolus.";Strings.OfficeOM.L_ColIndexOutOfRange="Veeruindeksi väärtus on väljaspool lubatud vahemikku. Kasutage veergude arvust väiksemat väärtust (0 või suurem).";Strings.OfficeOM.L_NewWindowCrossZone='Dialoogiboksi ei saa brauseri turbesätete tõttu luua. Proovige mõnda muud brauserit või {0} nii, et "{1}" ja aadressiribal kuvatav domeen asuksid samas turbetsoonis.';Strings.OfficeOM.L_DataStale="Andmed pole ajakohased";Strings.OfficeOM.L_RowIndexOutOfRange="Reaindeksi väärtus on väljaspool lubatud vahemikku. Kasutage ridade arvust väiksemat väärtust (0 või suurem).";Strings.OfficeOM.L_UserClickIgnore="Kasutaja eiras dialoogiboksi.";Strings.OfficeOM.L_BrowserAPINotSupported="See brauser ei toeta taotletud API-t.";Strings.OfficeOM.L_UserAbortedMessage="Kasutaja ei nõustunud lisandmoodulile õigusi andma.";Strings.OfficeOM.L_FunctionCallFailed="Funktsiooni {0} ei saanud kutsuda; tõrke kood: {1}.";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} soovib kuvada uue akna.";Strings.OfficeOM.L_InvalidDataObject="Sobimatu andmeobjekt";Strings.OfficeOM.L_DialogNavigateError="Dialooginavigeerimistõrge";Strings.OfficeOM.L_InvalidCoercion="Sobimatu kooshoidmise tüüp";Strings.OfficeOM.L_EventHandlerNotExist="Määratud sündmuseohjurit ei leitud selle sidumise jaoks.";Strings.OfficeOM.L_InternalError="Sisemine tõrge";Strings.OfficeOM.L_InvalidRequestContext="Objekti ei saa kasutada mitmes eri päringukontekstis.";Strings.OfficeOM.L_UserAborted="Kasutaja loobus nõustumistaotlusest.";Strings.OfficeOM.L_InvalidTableOptionValue="Vähemalt ühe tabelisuvandite parameetri väärtus pole lubatud. Kontrollige väärtusi ja proovige uuesti.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPathis on valik piiratud 1024 üksusega.";Strings.OfficeOM.L_SSOServerError="Autentimisteenuse pakkujas ilmnes tõrge.";Strings.OfficeOM.L_DataWriteReminder="Andmekirjutuse meeldetuletus";Strings.OfficeOM.L_SSOServerErrorMessage="Serveris ilmnes ootamatu tõrge.";Strings.OfficeOM.L_GetDataParametersConflict="Määratud parameetrid on vastuolus.";Strings.OfficeOM.L_HostError="Hosti tõrge";Strings.OfficeOM.L_InvalidBinding="Sobimatu sidumine";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="Office Online'i seanss on aegunud või ei sobi. Jätkamiseks värskendage lehte.";Strings.OfficeOM.L_NamedItemNotFound="Nimega üksust pole olemas.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Kasutaja identiteeditüüpi ei toetata." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_OperationNotSupported="Toimingut ei toetata.";Strings.OfficeOM.L_GetDataIsTooLarge="Nõutud andmekomplekt on liiga mahukas.";Strings.OfficeOM.L_SSOServerError="Autentimisteenuse pakkujas ilmnes tõrge.";Strings.OfficeOM.L_MemoryLimit="Mälupiirang on ületatud";Strings.OfficeOM.L_ApiNotFoundDetails='Meetod või atribuut {0} on osa nõuete komplektist "{1}", mis pole rakenduse {2} selles versioonis saadaval.';Strings.OfficeOM.L_GetDataParametersConflict="Määratud parameetrid on vastuolus.";Strings.OfficeOM.L_Timeout="Toiminguks ette nähtud aeg on lõppenud.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty='Katse määrata kirjutuskaitstud atribuuti "{0}".';Strings.OfficeOM.L_InvalidDataFormat="Määratud andmeobjekti vorming ei sobi.";Strings.OfficeOM.L_RunMustReturnPromise='RUN-meetodile edastatud pakktööfunktsioon ei tagastanud lubadust. Funktsioon peab tagastama lubaduse, et automaatselt jälgitavad objektid saaks pakktöö lõpulejõudmisel vabastada. Enamasti tuleb lubaduse tagastamiseks tagastada meetodi "context.sync()" vastus.';Strings.OfficeOM.L_DialogRequireHTTPS="HTTP-protokolli ei toetata. Kasutage selle asemel HTTPS-i.";Strings.OfficeOM.L_DisplayDialogError="Kuva dialoogitõrge";Strings.OfficeOM.L_FormatValueOutOfRange="Väärtus on väljaspool lubatud vahemikku.";Strings.OfficeOM.L_BindingNotExist="Määratud sidumist pole olemas.";Strings.OfficeOM.L_UnsupportedEnumeration="Toetuseta nummerdamine";Strings.OfficeOM.L_PropertyDoesNotExist='Atribuuti "{0}" pole objektis olemas.';Strings.OfficeOM.L_OsfControlTypeNotSupported="Tüüp OsfControl pole toetatud.";Strings.OfficeOM.L_InvalidBindingError="Sobimatu sidumise tõrge";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Määratud sidumistüüp ei ühildu esitatud nimelise üksusega.";Strings.OfficeOM.L_NoCapability="Teil pole selle toimingu jaoks piisavaid lubasid.";Strings.OfficeOM.L_InvalidFormatValue="Vähemalt ühe vorminguparameetri väärtus pole lubatud. Kontrollige väärtusi ja proovige uuesti.";Strings.OfficeOM.L_InvalidResourceUrlMessage="Manifestis on määratud sobimatu ressursi URL.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Koordinaatparameetreid ei saa kasutada kooshoidmistüübiga Tabel, kui tabel sisaldab liidetud lahtreid.";Strings.OfficeOM.L_ConnectionFailureWithStatus="Taotlus nurjus olekukoodiga {0}.";Strings.OfficeOM.L_UserNotSignedIn="Office'isse pole kasutajaid sisse logitud.";Strings.OfficeOM.L_InvalidNode="Sobimatu sõlm";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod='Atribuudi "{0}" muudatusi ei saa rakendada meetodi "object.set" abil.';Strings.OfficeOM.L_DocumentReadOnly="Nõutud toiming pole praeguses dokumendirežiimis lubatud.";Strings.OfficeOM.L_InternalError="Sisemine tõrge";Strings.OfficeOM.L_EventRegistrationError="Sündmuse registreerimise tõrge";Strings.OfficeOM.L_MissingRequiredArguments="mõned nõutavad argumendid on puudu";Strings.OfficeOM.L_InvalidArgument='Argument "{0}" ei sobi selles olukorras kasutamiseks, puudub või pole õiges vormingus.';Strings.OfficeOM.L_CannotWriteToSelection="Praegusesse valikusse ei saa kirjutada.";Strings.OfficeOM.L_MissingParameter="Parameeter on puudu";Strings.OfficeOM.L_BrowserAPINotSupported="See brauser ei toeta taotletud API-t.";Strings.OfficeOM.L_InvalidDataObject="Sobimatu andmeobjekt";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Praegune valik ei ühildu määratud kooshoidmistüübiga.";Strings.OfficeOM.L_CustomXmlError="Kohandatud XML-i tõrge.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory="See lisandmoodul ei toeta kasutaja nõusolekut.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Kasutaja identiteeditüüpi ei toetata.";Strings.OfficeOM.L_RequestTokenUnavailable="See API on kutsete sageduse vähendamiseks ahendatud.";Strings.OfficeOM.L_ShuttingDown="Toiming nurjus, kuna serveris olevad andmed pole ajakohased.";Strings.OfficeOM.L_UserClickIgnore="Kasutaja eiras dialoogiboksi.";Strings.OfficeOM.L_InvalidFormat="Sobimatu vormingu tõrge";Strings.OfficeOM.L_CustomXmlNodeNotFound="Määratud sõlme ei leitud.";Strings.OfficeOM.L_SettingsCannotSave="Sätteid ei saanud salvestada.";Strings.OfficeOM.L_SliceSizeNotSupported="Määratud sektorisuurust ei toetata.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Faili ei saanud võrguprobleemi tõttu tuua.";Strings.OfficeOM.L_NavOutOfBound="Toiming nurjus, sest indeks on väljaspool vahemikku.";Strings.OfficeOM.L_IndexOutOfRange="Indeks on väljaspool vahemikku.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPathis on valik piiratud 1024 üksusega.";Strings.OfficeOM.L_InvalidGetRows="Määratud read ei sobi.";Strings.OfficeOM.L_UserAbortedMessage="Kasutaja ei nõustunud lisandmoodulile õigusi andma.";Strings.OfficeOM.L_NamedItemNotFound="Nimega üksust pole olemas.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Koordinaatparameetreid ei saa kasutada kooshoidmistüübiga Tabel, kui tabel sisaldab liidetud lahtreid.";Strings.OfficeOM.L_InvalidSetRows="Määratud read ei sobi.";Strings.OfficeOM.L_EventHandlerNotExist="Määratud sündmuseohjurit ei leitud selle sidumise jaoks.";Strings.OfficeOM.L_DataWriteError="Andmete kirjutamise tõrge";Strings.OfficeOM.L_InvalidGetColumns="Määratud veerud ei sobi.";Strings.OfficeOM.L_PermissionDenied="Õigusest keelduti";Strings.OfficeOM.L_HostError="Hosti tõrge";Strings.OfficeOM.L_NotSupported="Funktsiooni {0} ei toetata.";Strings.OfficeOM.L_GetSelectionNotSupported="Praegune valik pole toetatud.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Sündmuseohjurit ei saanud lisada.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="Office Online'i seanss on aegunud või ei sobi. Jätkamiseks värskendage lehte.";Strings.OfficeOM.L_InvalidColumnsForBinding="Määratud veerud ei sobi.";Strings.OfficeOM.L_TooManyOptionalFunction="parameetriloendis on mitu valikulist funktsiooni";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Toiming nurjus, kuna see lisandmoodul juba nõuab pääsutõendit.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Märkus: vormindus-API määratud vorminduskogude arv peaks soovituslikult olema väiksem kui 100.";Strings.OfficeOM.L_OutOfRange="Vahemikust väljas";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Lisandmoodul taotleb juba pääsutõendit.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="Praegune hostrakendus ei toeta nummerdamist.";Strings.OfficeOM.L_ActivityLimitReached="Tegevuslimiit on täis.";Strings.OfficeOM.L_SSOServerErrorMessage="Serveris ilmnes ootamatu tõrge.";Strings.OfficeOM.L_UnsupportedDataObject="Esitatud andmeobjektitüüpi ei toetata.";Strings.OfficeOM.L_EventHandlerRemovalFailed="Sündmuseohjurit ei saanud eemaldada.";Strings.OfficeOM.L_CustomFunctionDefinitionMissing="Excel.CustomFunctions peab sisaldama selle nimega atribuuti, mis tähistab funktsiooni definitsiooni.";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} soovib kuvada uue akna.";Strings.OfficeOM.L_InvalidParameters="Funktsiooni {0} parameetrid pole sobivad.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Dialoogiboksi ei saanud brauseripiirangute tõttu luua. Dialoogiboksi domeen ja lisandmooduli hosti domeen ei asu samas turbetsoonis.";Strings.OfficeOM.L_InvalidCoercion="Sobimatu kooshoidmise tüüp";Strings.OfficeOM.L_NewWindowCrossZone='Dialoogiboksi ei saa brauseri turbesätete tõttu luua. Proovige mõnda muud brauserit või {0} nii, et "{1}" ja aadressiribal kuvatav domeen asuksid samas turbetsoonis.';Strings.OfficeOM.L_SSOConnectionLostErrorMessage="A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="konfigureerige brauser";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage="Toiming nurjus, kuna see lisandmoodul ei toeta kasutaja nõusolekut selles kategoorias";Strings.OfficeOM.L_InitializeNotReady="Office.js pole veel täielikult laaditud. Palun proovige hiljem uuesti või veenduge, et lähtestamiskood on lisatud funktsiooni Office.initialize.";Strings.OfficeOM.L_UserAborted="Kasutaja loobus nõustumistaotlusest.";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_InvalidAPICall="Sobimatu API kutse";Strings.OfficeOM.L_FormattingReminder="Vormindamise meeldetuletus";Strings.OfficeOM.L_InvalidApiCallInContext="API kutse pole praeguses kontekstis sobiv.";Strings.OfficeOM.L_InvalidBindingOperation="Sobimatu sidumise toiming";Strings.OfficeOM.L_CustomXmlOutOfDateName="Andmed pole ajakohased";Strings.OfficeOM.L_InvalidOperationInCellEditMode="Excel töötab lahtriredigeerimisrežiimis. Vajutage redigeerimisrežiimist väljumiseks sisestusklahvi (ENTER) või tabeldusklahvi (TAB) või valige mõni muu lahter ja proovige siis uuesti.";Strings.OfficeOM.L_ElementMissing="Tabelilahtrit ei saanud vormindada, kuna mõni parameetriväärtus on puudu. Kontrollige parameetreid ja proovige uuesti.";Strings.OfficeOM.L_NotSupportedEventType="Määratud sündmuse tüüp {0} pole toetatud.";Strings.OfficeOM.L_SaveSettingsError="Sätete salvestamise tõrge";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Määratud väärtused rowCount ja columnCount pole sobivad.";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Enne teise faili toomist kutsuge praeguse faili jaoks closeAsync.";Strings.OfficeOM.L_CustomFunctionImplementationMissing='Excel.CustomFunctionsis asuv selle nimega atribuut, mis tähistab funktsiooni definitsiooni, peab sisaldama funktsiooni juurutavat atribuuti "call".';Strings.OfficeOM.L_InvalidRequestContext="Objekti ei saa kasutada mitmes eri päringukontekstis.";Strings.OfficeOM.L_RedundantCallbackSpecification="Tagasikutse ei saa olla korraga määratud nii argumendiloendis kui valikulises objektis.";Strings.OfficeOM.L_NotImplemented="Funktsioon {0} pole juurutatud.";Strings.OfficeOM.L_DataNotMatchBindingType="Määratud andmeobjekt ei ühildu sidumistüübiga.";Strings.OfficeOM.L_SettingNameNotExist="Määratud sätte nime pole olemas.";Strings.OfficeOM.L_APICallFailed="API kutse nurjus";Strings.OfficeOM.L_InvalidResourceUrl="Esitatud on sobimatu rakenduse ressursi URL.";Strings.OfficeOM.L_RowIndexOutOfRange="Reaindeksi väärtus on väljaspool lubatud vahemikku. Kasutage ridade arvust väiksemat väärtust (0 või suurem).";Strings.OfficeOM.L_SSOConnectionLostError="A connection was lost during the sign in process.";Strings.OfficeOM.L_DataNotMatchCoercionType="Määratud andmeobjekti tüüp ei ühildu praeguse kooshoidmistüübiga.";Strings.OfficeOM.L_SettingsAreStale="Sätteid ei saanud salvestada, kuna need pole ajakohased.";Strings.OfficeOM.L_CustomFunctionNameContainsBadChars="Funktsiooni nimi võib sisaldada ainult tähti, numbreid, allkriipse ja punkte.";Strings.OfficeOM.L_CannotRegisterEvent="Sündmuseohjurit ei saa registreerida.";Strings.OfficeOM.L_TooManyIncompleteRequests="Oodake, kuni eelmine kutse lõpule jõuab.";Strings.OfficeOM.L_InValidOptionalArgument="sobimatu valikuline argument";Strings.OfficeOM.L_ConnectionFailureWithDetails="Taotlus nurjus olekukoodiga {0}, tõrkekoodiga {1} ja järgmise tõrketeatega: {2}";Strings.OfficeOM.L_CustomFunctionNameCannotSplit="Funktsiooni nimi peab sisaldama mittetühja nimeruumi ja mittetühja lühinime.";Strings.OfficeOM.L_InvalidSetColumns="Määratud veerud ei sobi.";Strings.OfficeOM.L_InvalidSelectionForBindingType="Sidumist ei saa praeguse valikuga ja määratud sidumistüübiga luua.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Ignoreeri";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Andmed on aegunud. Tooge objekt uuesti.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Valikupiir on käes";Strings.OfficeOM.L_InvalidCellsValue="Vähemalt ühe lahtriparameetri väärtus pole lubatud. Kontrollige väärtusi ja proovige uuesti.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Rakendust {0} pole olemas. Microsoft.Office.WebExtension.initialize(reason) pole kutsutud.";Strings.OfficeOM.L_TooManyOptionalObjects="parameetriloendis on mitu valikulist objekti";Strings.OfficeOM.L_AppNameNotExist="Lisandmooduli {0} nime pole olemas.";Strings.OfficeOM.L_SSOClientError="Office'i autentimistaotluses ilmnes tõrge.";Strings.OfficeOM.L_DialogAddressNotTrusted="URL-i domeeni pole manifesti AppDomainsi elementi kaasatud.";Strings.OfficeOM.L_SpecifiedIdNotExist="Määratud ID-d pole olemas.";Strings.OfficeOM.L_SettingsStaleError="Sätete aegumise tõrge";Strings.OfficeOM.L_PropertyNotLoaded='Atribuut "{0}" pole saadaval. Enne atribuudi väärtuse lugemist kutsuge seda sisaldava objekti laadimismeetod ja seostuva päringukonteksti jaoks kutsuge meetod "context.sync()".';Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Palun valige.";Strings.OfficeOM.L_BindingCreationError="Sidumise loomise tõrge";Strings.OfficeOM.L_InvalidReadForBlankRow="Määratud rida on tühi.";Strings.OfficeOM.L_InvalidTableOptionValue="Vähemalt ühe tabelisuvandite parameetri väärtus pole lubatud. Kontrollige väärtusi ja proovige uuesti.";Strings.OfficeOM.L_DataNotMatchBindingSize="Esitatud andmeobjekt ei vasta praeguse valiku suurusele.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Määratud kooshoidmistüüp ei ühildu selle sidumistüübiga.";Strings.OfficeOM.L_InvalidGrantMessage="Lisandmoodulile pole õigust antud.";Strings.OfficeOM.L_SetDataIsTooLarge="Määratud andmeobjekt on liiga suur.";Strings.OfficeOM.L_CoercionTypeNotSupported="Määratud kooshoidmistüüpi ei toetata.";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Sisendargumendid ei sobi.";Strings.OfficeOM.L_NotSupportedBindingType="Määratud sidumistüüp {0} pole toetatud.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Seanss ei sobi või on aegunud";Strings.OfficeOM.L_UnsupportedUserIdentity="Kasutaja identiteeditüüpi ei toetata.";Strings.OfficeOM.L_CannotNavigateTo="Objekt asub kohas, kus navigeerimist ei toetata.";Strings.OfficeOM.L_SetDataParametersConflict="Määratud parameetrid on vastuolus.";Strings.OfficeOM.L_DialogAlreadyOpened="Toiming nurjus, kuna sellel lisandmoodulil on juba aktiivne dialoog.";Strings.OfficeOM.L_FileTypeNotSupported="Määratud failitüüpi ei toetata.";Strings.OfficeOM.L_ColIndexOutOfRange="Veeruindeksi väärtus on väljaspool lubatud vahemikku. Kasutage veergude arvust väiksemat väärtust (0 või suurem).";Strings.OfficeOM.L_ReadSettingsError="Sätete lugemise tõrge";Strings.OfficeOM.L_DataReadError="Andmete lugemise tõrge";Strings.OfficeOM.L_InternalErrorDescription="Ilmnes sisemine tõrge.";Strings.OfficeOM.L_DataStale="Andmed pole ajakohased";Strings.OfficeOM.L_UnknownBindingType="Sidumistüüpi ei toetata.";Strings.OfficeOM.L_DialogNavigateError="Dialooginavigeerimistõrge";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Valitud sisu peab olema tabelivormingus. Vormindage andmed tabelina ja proovige uuesti.";Strings.OfficeOM.L_InvalidSetStartRowColumn="Määratud väärtus startRow või startColumn ei sobi.";Strings.OfficeOM.L_TooManyArguments="liiga palju argumente";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Toiming pole selle sidumistüübi korral toetatud.";Strings.OfficeOM.L_FunctionCallFailed="Funktsiooni {0} ei saanud kutsuda; tõrke kood: {1}.";Strings.OfficeOM.L_SelectionCannotBound="Praeguse valikuga ei saa siduda.";Strings.OfficeOM.L_RequestTimeout="Kutse täitmiseks kulus liiga palju aega.";Strings.OfficeOM.L_NetworkProblem="Võrguprobleem";Strings.OfficeOM.L_BadSelectorString="Valijale edasi antud string on valesti vormindatud või toetuseta.";Strings.OfficeOM.L_DataNotMatchSelection="Esitatud andmeobjekt ei ühildu praeguse valiku kuju või mõõtmetega.";Strings.OfficeOM.L_SSOClientErrorMessage="Klientrakenduses ilmnes ootamatu tõrge.";Strings.OfficeOM.L_InvalidArgumentGeneric="Funktsiooni saadetud argumendid ei toimi selles situatsioonis, on puudu või pole õiges vormingus.";Strings.OfficeOM.L_InvalidSSOAddinMessage="Identiteedi API-d selle lisandmooduli korral ei toetata.";Strings.OfficeOM.L_DialogInvalidScheme="URL-i skeemi ei toetata. Kasutage selle asemel HTTPS-i.";Strings.OfficeOM.L_InvalidObjectPath='Objektitee "{0}" ei sobi teie toimingu tegemiseks. Kui kasutate objekti mitmes context.sync-kutses ja väljaspool RUN-meetodi pakktöö järjestikkäitust, kasutage objekti eluea haldamiseks meetodeid "context.trackedObjects.add()" ja "context.trackedObjects.remove()".';Strings.OfficeOM.L_MultipleNamedItemFound="Leiti mitu sama nimega objekti.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Luba";Strings.OfficeOM.L_InvalidValue="Sobimatu väärtus";Strings.OfficeOM.L_CallbackNotAFunction="Tagasikutse peab olema funktsioon-tüüpi, kuid on tüüpi {0}.";Strings.OfficeOM.L_InvalidBinding="Sobimatu sidumine";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Märkus: tabelis peaks soovituslikult olema alla 20 000 lahtri.";Strings.OfficeOM.L_OverwriteWorksheetData="Määramistoiming nurjus, kuna esitatud andmeobjekt kirjutab andmed üle või neid.";Strings.OfficeOM.L_InvalidGrant="Eelautoriseering on puudu.";Strings.OfficeOM.L_DataWriteReminder="Andmekirjutuse meeldetuletus";Strings.OfficeOM.L_ValueNotLoaded='Tulemiobjekti väärtust pole veel laaditud. Enne väärtuseatribuudi lugemist kutsuge seostatud päringukontekstis "context.sync()".';Strings.OfficeOM.L_APINotSupported="API tugi puudub";Strings.OfficeOM.L_BindingToMultipleSelection="Mittekülgnevaid valikuid ei toetata.";Strings.OfficeOM.L_InvalidGetStartRowColumn="Määratud väärtus startRow või startColumn ei sobi." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/et-ee/outlook_strings.debug.js b/node_modules/@microsoft/office-js/dist/et-ee/outlook_strings.debug.js index f51e65c..30ab086 100644 --- a/node_modules/@microsoft/office-js/dist/et-ee/outlook_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/et-ee/outlook_strings.debug.js @@ -1,34 +1,35 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("_u"); _u.ExtensibilityStrings = function() { }; _u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings"); -_u.ExtensibilityStrings.l_InternalFormatError_Text = "Ilmnes sisemine vormingutõrge."; -_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "Kasutaja eemaldas manuse enne üleslaadimise lõpulejõudmist."; -_u.ExtensibilityStrings.l_InternalProtocolError_Text = "Sisemine protokollitõrge: {0}."; -_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Manust ei saa lisada, kuna selle maht on liiga suur."; -_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Sobivaid adressaate ei sisestatud."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Office'i JavaScripti API kaitstud liikmetele juurdepääsemiseks on nõutavad administraatoriõigused."; -_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Vähemalt üks sisestatud kuvatav nimi on liiga pikk."; -_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Andmete kirjutamise tõrge"; +_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Manuseid ei saa lisada serverist täielike vastussõnumite või edasisaadetavate sõnumite toomise ajal."; _u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Manusetõrge"; -_u.ExtensibilityStrings.l_InvalidEventDates_Text = "Lõppkuupäev on varasem kui alguskuupäev."; -_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Sisestatud parameetrite vorming ei vasta eeldatule."; -_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Manust ei saa üksusele lisada."; -_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Taotlus ületab 1 MB mahupiirangu. Muutke oma EWS-i taotlust."; +_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Vähemalt üks sisestatud kuvatav nimi on liiga pikk."; +_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "Kasutaja eemaldas manuse enne üleslaadimise lõpulejõudmist."; _u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Väljal olevate adressaatide koguarv ei tohi olla suurem kui {0}."; -_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Manust ei saa üksusest kustutada."; -_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "Valitud üksust on muudetud."; -_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "Manuse ID ei sobinud."; -_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Manust ei saa kustutada, kuna selle manuseindeksiga manust ei leitud."; -_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Vähemalt üks sisestatud meiliaadress on liiga pikk."; +_u.ExtensibilityStrings.l_InvalidEventDates_Text = "Lõppkuupäev on varasem kui alguskuupäev."; _u.ExtensibilityStrings.l_InvalidDate_Text = "Sisend ei lahene sobivaks kuupäevaks."; -_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "Manuse tee ei sobinud."; +_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Manust ei saa üksusele lisada."; _u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "Meetodi {0} kutsumiseks on nõutavad administraatoriõigused."; -_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Manuseid ei saa lisada, kuna sõnumile on juba lisatud suurim lubatud arv manuseid"; _u.ExtensibilityStrings.l_OffsetNotfound_Text = "Selle ajatempli nihet ei leitud."; +_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "Manuse tee ei sobinud."; +_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "Valitud üksust on muudetud."; _u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "HTML-i puhastus nurjus."; +_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Manust ei saa üksusest kustutada."; +_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Manust ei saa kustutada, kuna selle manuseindeksiga manust ei leitud."; +_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Office'i JavaScripti API kaitstud liikmetele juurdepääsemiseks on nõutavad administraatoriõigused."; +_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Andmete kirjutamise tõrge"; _u.ExtensibilityStrings.l_InvalidEndTime_Text = "Lõppaeg ei saa olla algusajast varasem."; +_u.ExtensibilityStrings.l_InternalProtocolError_Text = "Sisemine protokollitõrge: {0}."; +_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Manuseid ei saa lisada, kuna sõnumile on juba lisatud suurim lubatud arv manuseid"; +_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Vähemalt üks sisestatud meiliaadress on liiga pikk."; _u.ExtensibilityStrings.l_CursorPositionChanged_Text = "Kasutaja muutis andmete sisestamise ajal kursori asukohta."; -_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Manuseid ei saa lisada serverist täielike vastussõnumite või edasisaadetavate sõnumite toomise ajal." +_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Taotlus ületab 1 MB mahupiirangu. Muutke oma EWS-i taotlust."; +_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Sisestatud parameetrite vorming ei vasta eeldatule."; +_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "Manuse ID ei sobinud."; +_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Sobivaid adressaate ei sisestatud."; +_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Manust ei saa lisada, kuna selle maht on liiga suur."; +_u.ExtensibilityStrings.l_InternalFormatError_Text = "Ilmnes sisemine vormingutõrge." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/et-ee/outlook_strings.js b/node_modules/@microsoft/office-js/dist/et-ee/outlook_strings.js index f64fdb0..31d91dd 100644 --- a/node_modules/@microsoft/office-js/dist/et-ee/outlook_strings.js +++ b/node_modules/@microsoft/office-js/dist/et-ee/outlook_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_InternalFormatError_Text="Ilmnes sisemine vormingutõrge.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="Kasutaja eemaldas manuse enne üleslaadimise lõpulejõudmist.";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Sisemine protokollitõrge: {0}.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Manust ei saa lisada, kuna selle maht on liiga suur.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Sobivaid adressaate ei sisestatud.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Office'i JavaScripti API kaitstud liikmetele juurdepääsemiseks on nõutavad administraatoriõigused.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Vähemalt üks sisestatud kuvatav nimi on liiga pikk.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Andmete kirjutamise tõrge";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Manusetõrge";_u.ExtensibilityStrings.l_InvalidEventDates_Text="Lõppkuupäev on varasem kui alguskuupäev.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Sisestatud parameetrite vorming ei vasta eeldatule.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Manust ei saa üksusele lisada.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Taotlus ületab 1 MB mahupiirangu. Muutke oma EWS-i taotlust.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Väljal olevate adressaatide koguarv ei tohi olla suurem kui {0}.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Manust ei saa üksusest kustutada.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Valitud üksust on muudetud.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="Manuse ID ei sobinud.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Manust ei saa kustutada, kuna selle manuseindeksiga manust ei leitud.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Vähemalt üks sisestatud meiliaadress on liiga pikk.";_u.ExtensibilityStrings.l_InvalidDate_Text="Sisend ei lahene sobivaks kuupäevaks.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="Manuse tee ei sobinud.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Meetodi {0} kutsumiseks on nõutavad administraatoriõigused.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Manuseid ei saa lisada, kuna sõnumile on juba lisatud suurim lubatud arv manuseid";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Selle ajatempli nihet ei leitud.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="HTML-i puhastus nurjus.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="Lõppaeg ei saa olla algusajast varasem.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="Kasutaja muutis andmete sisestamise ajal kursori asukohta.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Manuseid ei saa lisada serverist täielike vastussõnumite või edasisaadetavate sõnumite toomise ajal." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Manuseid ei saa lisada serverist täielike vastussõnumite või edasisaadetavate sõnumite toomise ajal.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Manusetõrge";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Vähemalt üks sisestatud kuvatav nimi on liiga pikk.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="Kasutaja eemaldas manuse enne üleslaadimise lõpulejõudmist.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Väljal olevate adressaatide koguarv ei tohi olla suurem kui {0}.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="Lõppkuupäev on varasem kui alguskuupäev.";_u.ExtensibilityStrings.l_InvalidDate_Text="Sisend ei lahene sobivaks kuupäevaks.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Manust ei saa üksusele lisada.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Meetodi {0} kutsumiseks on nõutavad administraatoriõigused.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Selle ajatempli nihet ei leitud.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="Manuse tee ei sobinud.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Valitud üksust on muudetud.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="HTML-i puhastus nurjus.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Manust ei saa üksusest kustutada.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Manust ei saa kustutada, kuna selle manuseindeksiga manust ei leitud.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Office'i JavaScripti API kaitstud liikmetele juurdepääsemiseks on nõutavad administraatoriõigused.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Andmete kirjutamise tõrge";_u.ExtensibilityStrings.l_InvalidEndTime_Text="Lõppaeg ei saa olla algusajast varasem.";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Sisemine protokollitõrge: {0}.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Manuseid ei saa lisada, kuna sõnumile on juba lisatud suurim lubatud arv manuseid";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Vähemalt üks sisestatud meiliaadress on liiga pikk.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="Kasutaja muutis andmete sisestamise ajal kursori asukohta.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Taotlus ületab 1 MB mahupiirangu. Muutke oma EWS-i taotlust.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Sisestatud parameetrite vorming ei vasta eeldatule.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="Manuse ID ei sobinud.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Sobivaid adressaate ei sisestatud.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Manust ei saa lisada, kuna selle maht on liiga suur.";_u.ExtensibilityStrings.l_InternalFormatError_Text="Ilmnes sisemine vormingutõrge." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/eu-es/office_strings.debug.js b/node_modules/@microsoft/office-js/dist/eu-es/office_strings.debug.js index d865000..e808373 100644 --- a/node_modules/@microsoft/office-js/dist/eu-es/office_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/eu-es/office_strings.debug.js @@ -1,179 +1,190 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("Strings"); Strings.OfficeOM = function() { }; Strings.OfficeOM.registerClass("Strings.OfficeOM"); -Strings.OfficeOM.L_EventHandlerAdditionFailed = "Ezin izan da gertaera-maneiatzailea gehitu."; -Strings.OfficeOM.L_PropertyDoesNotExist = '"{0}" propietatea ez dago objektuan.'; -Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Zehaztutako lotura mota ez da adierazitako izendatutako elementuarekin bateragarria."; -Strings.OfficeOM.L_HostError = "Ostalariaren errorea"; -Strings.OfficeOM.L_DialogOK = "Ados"; -Strings.OfficeOM.L_SettingNameNotExist = "Ez da zehaztutako ezarpenaren izena existitzen."; -Strings.OfficeOM.L_DataNotMatchBindingSize = "Adierazitako datu-objektua ez dator bat uneko hautapenaren tamainarekin."; -Strings.OfficeOM.L_BindingCreationError = "Errorea lotura sortzean"; -Strings.OfficeOM.L_SSOClientError = "Errore bat gertatu da Office-ren autentifikazio-eskaeran."; -Strings.OfficeOM.L_TooManyArguments = "argumentu gehiegi"; +Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Idatzitako argumentuek ez dute balio."; +Strings.OfficeOM.L_NavOutOfBound = "Eragiketak huts egin du indizea barrutitik kanpo dagoelako."; +Strings.OfficeOM.L_BadSelectorString = "Hautatzailera igarotako kateak ez du formatu egokia edo ez da onartzen."; Strings.OfficeOM.L_InvalidResourceUrlMessage = "Balio ez duen aplikazioaren baliabideen URLa zehaztu da manifestuan."; +Strings.OfficeOM.L_GetDataIsTooLarge = "Eskatutako datu multzoa handiegia da."; +Strings.OfficeOM.L_DataWriteReminder = "Datuak idazteari buruzko abisua"; +Strings.OfficeOM.L_ConnectionFailureWithStatus = "Eskaerak huts egin du eta egoera-kode honekin erantzun du: {0}."; +Strings.OfficeOM.L_CannotNavigateTo = "Objektua nabigatu ezin den toki batean kokatuta dago."; +Strings.OfficeOM.L_InvalidSetStartRowColumn = "Zehaztutako StartRow edo StartColumn balioak baliogabeak dira."; Strings.OfficeOM.L_InvalidDataFormat = "Zehaztutako datu-objektuaren formatua baliogabea da."; -Strings.OfficeOM.L_SSOServerErrorMessage = "Ustekabeko errore bat gertatu da zerbitzarian."; -Strings.OfficeOM.L_InvalidCoercion = "Hertsadura mota baliogabea"; -Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = '"{0}" propietatean egindako aldaketak ezin dira aplikatu "object.set" metodoaren bidez.'; -Strings.OfficeOM.L_EventHandlerNotExist = "Ez da lotura honen gertaera-maneiatzailea aurkitu."; -Strings.OfficeOM.L_CustomXmlError = "XML errore pertsonalizatua."; -Strings.OfficeOM.L_RunMustReturnPromise = '".run" metodora pasatutako sorta-funtzioak ez du promesik itzuli. Funtzioak promes bat itzuli behar du, automatikoki jarraitutako objektuak askatu ahal izan daitezen sortaren eragiketa amaitu ondoren. Normalean, "context.sync()" metodotik erantzun bat itzultzen da promesen erantzun gisa.'; -Strings.OfficeOM.L_FunctionCallFailed = "{0} funtzioaren deiak huts egin du. Errore-kodea: {1}."; -Strings.OfficeOM.L_DocumentReadOnly = "Uneko dokumentu moduan ez da eskatutako eragiketa baimentzen."; -Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Koordenatu-parametroak ezin dira hertsadura motaren taularekin erabili taulak konbinatutako gelaxkak dituenean."; -Strings.OfficeOM.L_InvalidApiCallInContext = "Ezin da egin APIaren deia testuinguru honetan."; -Strings.OfficeOM.L_DisplayDialogError = "Elkarrizketa-koadroaren bistaratze-errorea"; -Strings.OfficeOM.L_InvalidResourceUrl = "Aplikazioaren baliabideen URLak ez du balio."; -Strings.OfficeOM.L_NoCapability = "Ez duzu ekintza honetarako baimen nahikorik."; +Strings.OfficeOM.L_DialogRequireHTTPS = "HTTP protokoloa ez da onartzen. Erabili HTTPS."; Strings.OfficeOM.L_FileTypeNotSupported = "Ez da zehaztutako fitxategi mota onartzen."; -Strings.OfficeOM.L_InvalidColumnsForBinding = "Zehaztutako zutabeak baliogabeak dira."; -Strings.OfficeOM.L_NewWindowCrossZone = 'Arakatzailearen segurtasun-ezarpenek ez digute uzten elkarrizketa-koadroa sortzen. Erabili beste arakatzaile bat edo {0} "{1}" eta helbide-barran agertzen den domeinua segurtasun-zona berean egon daitezen.'; -Strings.OfficeOM.L_CannotRegisterEvent = "Ezin da erregistratu gertaera-maneatzailea."; -Strings.OfficeOM.L_OsfControlTypeNotSupported = "Ez da OsfControl mota onartzen."; -Strings.OfficeOM.L_OutOfRange = "Barrutitik kanpo"; -Strings.OfficeOM.L_InvalidGetStartRowColumn = "Zehaztutako StartRow edo StartColumn balioak baliogabeak dira."; -Strings.OfficeOM.L_NotImplemented = "{0} funtzioa ez dago inplementatuta."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Eragiketak huts egin du osagarriak dagoeneko eskatu duelako sarbide-tokena."; -Strings.OfficeOM.L_OverwriteWorksheetData = "Multzo-eragiketak huts egin du adierazitako datu-objektuak datuak gainidatzi edo lekualdatuko baititu."; -Strings.OfficeOM.L_InvalidValue = "Balio okerra"; -Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Oharra: taulek, gehienez, 20.000 gelaxka izatea gomendatzen da."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Osagarriak eskatu du jada sarbide-tokena."; -Strings.OfficeOM.L_NetworkProblem = "Sareko arazoa"; -Strings.OfficeOM.L_InvalidArgument = '"{0}" argumentuak ez da baliozkoa egoera honetan, ez dago, edo ez dago formatu zuzenean.'; -Strings.OfficeOM.L_UnsupportedDataObject = "Ez da adierazitako datu-objektu mota onartzen."; -Strings.OfficeOM.L_ShuttingDown = "Eragiketak huts egin du zerbitzariko datuak unekoak ez direlako."; -Strings.OfficeOM.L_Timeout = "Eragiketaren denbora-muga gainditu da."; -Strings.OfficeOM.L_ElementMissing = "Ezin izan zaio taulako gelaxkari formatua eman, parametro-balio batzuk falta direlako. Egiaztatu parametroak eta saiatu berriro."; -Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Koordenatu-parametroak ezin dira hertsadura motaren taularekin erabili taulak konbinatutako gelaxkak dituenean."; -Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Oharra: formatua ezartzeko APIaren bidez, gehienez, 100 formatu ezartzea gomendatzen da."; -Strings.OfficeOM.L_UnsupportedUserIdentity = "Ez da onartzen erabiltzailearen identitate mota hori."; -Strings.OfficeOM.L_RequestTimeout = "Denbora gehiegi behar izan da deia exekutatzeko."; -Strings.OfficeOM.L_MemoryLimit = "Memoriaren muga gainditu da"; -Strings.OfficeOM.L_SelectionCannotBound = "Ezin zaio uneko hautapenari lotu."; -Strings.OfficeOM.L_NavOutOfBound = "Eragiketak huts egin du indizea barrutitik kanpo dagoelako."; -Strings.OfficeOM.L_InValidOptionalArgument = "aukerako argumentu baliogabea"; -Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Zehaztutako hertsadura mota ez da lotura mota honekin bateragarria."; -Strings.OfficeOM.L_RequestTokenUnavailable = "APIa mugatu da deien maiztasuna txikitzeko."; -Strings.OfficeOM.L_DataReadError = "Datu-irakurketaren errorea"; +Strings.OfficeOM.L_InvalidReadForBlankRow = "Adierazitako errenkada hutsik dago."; +Strings.OfficeOM.L_InvalidSetColumns = "Zehaztutako zutabeak baliogabeak dira."; +Strings.OfficeOM.L_TooManyArguments = "argumentu gehiegi"; +Strings.OfficeOM.L_DataStale = "Datuak ez dira unekoak"; Strings.OfficeOM.L_SSOServerError = "Errore bat gertatu da autentifikatzaile-hornitzailean."; -Strings.OfficeOM.L_PermissionDenied = "Baimena ukatu da"; -Strings.OfficeOM.L_FormattingReminder = "Formatuari buruzko abisua"; +Strings.OfficeOM.L_CustomXmlError = "XML errore pertsonalizatua."; Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Ez da {0} aplikazioa existitzen. Ez da Microsoft.Office.WebExtension.initialize(reason) deitu."; -Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Ez da onartzen erabiltzailearen identitate mota hori."; -Strings.OfficeOM.L_SpecifiedIdNotExist = "Zehaztutako IDa ez dago."; +Strings.OfficeOM.L_InvalidSSOAddinMessage = "Identitatearen API hori ezin da erabili osagarri honetan."; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory = "Osagarri hau ez da bateragarria erabiltzailearen baimenarekin."; +Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Arakatzailearen segurtasun-ezarpenek ez digute uzten elkarrizketa-koadroa sortzen. Elkarrizketa-koadroaren domeinua eta osagarriaren ostalariaren domeinua ez daude segurtasun-zona berean."; +Strings.OfficeOM.L_NoCapability = "Ez duzu ekintza honetarako baimen nahikorik."; Strings.OfficeOM.L_InvalidRequestContext = "Ezin da erabili objektua eskaera-testuinguru desberdinetan."; -Strings.OfficeOM.L_ReadSettingsError = "Irakurketa-ezarpenen errorea"; -Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "Hautapena 1024 elementura mugatzen du XPath lengoaiak."; -Strings.OfficeOM.L_ActivityLimitReached = "Jardueren mugara iritsi zara."; -Strings.OfficeOM.L_UserClickIgnore = "Erabiltzaileak ez ikusi egin dio elkarrizketa-koadroari."; -Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Zehaztutako RowCount edo ColumnCount balioak baliogabeak dira."; +Strings.OfficeOM.L_RowIndexOutOfRange = "Errenkada-indizearen balioa baimendutako barrutitik kanpo dago. Erabili errenkada kopurua baino txikiagoa den balio positibo bat (0 edo handiagoa)."; +Strings.OfficeOM.L_PermissionDenied = "Baimena ukatu da"; +Strings.OfficeOM.L_SSOClientErrorMessage = "Ustekabeko errorea gertatu da memoria barruko eskemaren cachean."; +Strings.OfficeOM.L_NetworkProblem = "Sareko arazoa"; Strings.OfficeOM.L_SettingsCannotSave = "Ezin izan dira ezarpenak gorde."; -Strings.OfficeOM.L_BrowserAPINotSupported = "Eskatutako APIa ez da arakatzailearekin bateragarria."; -Strings.OfficeOM.L_TooManyOptionalObjects = "parametroen zerrendan aukerako objektu anizkoitzak daude"; +Strings.OfficeOM.L_AppNameNotExist = "{0} osagarriaren izena ez dago."; +Strings.OfficeOM.L_DataNotMatchBindingType = "Zehaztutako datu-objektua ez da lotura motarekin bateragarria."; +Strings.OfficeOM.L_DataWriteError = "Datu-idazketaren errorea"; +Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Onartu"; +Strings.OfficeOM.L_NewWindowCrossZone = 'Arakatzailearen segurtasun-ezarpenek ez digute uzten elkarrizketa-koadroa sortzen. Erabili beste arakatzaile bat edo {0} "{1}" eta helbide-barran agertzen den domeinua segurtasun-zona berean egon daitezen.'; +Strings.OfficeOM.L_EventHandlerAdditionFailed = "Ezin izan da gertaera-maneiatzailea gehitu."; +Strings.OfficeOM.L_InvalidFormat = "Formatu baliogabearen errorea"; +Strings.OfficeOM.L_InvalidArgumentGeneric = "Funtziora pasatako argumentuek ez dute funtzionatzen egoera honetan, ez daude, edo ez dute formatu egokia."; +Strings.OfficeOM.L_InvalidCellsValue = "Gelaxken parametroetako batek edo gehiagok baimendu gabeko balioak dituzte. Egiaztatu balioak eta saiatu berriro."; +Strings.OfficeOM.L_DialogAlreadyOpened = "Ezin izan da gauzatu eragiketa, osagarriak elkarrizketa-koadro bat aktibo duelako jada."; +Strings.OfficeOM.L_InvalidResourceUrl = "Aplikazioaren baliabideen URLak ez du balio."; +Strings.OfficeOM.L_CustomXmlOutOfDateName = "Datuak ez dira unekoak"; +Strings.OfficeOM.L_DisplayDialogError = "Elkarrizketa-koadroaren bistaratze-errorea"; Strings.OfficeOM.L_NamedItemNotFound = "Ez da izendatutako elementua existitzen."; -Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = 'Irakurtzeko soilik den "{0}" propietatea ezartzen saiatzen.'; -Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Baztertu"; +Strings.OfficeOM.L_UnsupportedEnumerationMessage = "Uneko aplikazio ostalarian ez da zenbakitzea onartzen."; +Strings.OfficeOM.L_SSOConnectionLostErrorMessage = "A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones."; +Strings.OfficeOM.L_SettingsStaleError = "Ezarpenen errore zaharkitua"; +Strings.OfficeOM.L_InvalidGetStartRowColumn = "Zehaztutako StartRow edo StartColumn balioak baliogabeak dira."; +Strings.OfficeOM.L_InvalidSelectionForBindingType = "Ezin da loturarik sortu uneko hautapenarekin eta zehaztutako lotura motarekin."; +Strings.OfficeOM.L_InvalidBindingOperation = "Lotura-eragiketa baliogabea"; +Strings.OfficeOM.L_CustomFunctionNameContainsBadChars = "Funtzio-izenak hizkiak, digituak, azpimarrak eta puntuak baino ezin ditu izan."; +Strings.OfficeOM.L_InvalidGrant = "Baimena falta da."; +Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Sareko arazo bat dela-eta, ezin izan da fitxategia eskuratu."; +Strings.OfficeOM.L_SSOClientError = "Errore bat gertatu da Office-ren autentifikazio-eskaeran."; +Strings.OfficeOM.L_InternalError = "Barne-errorea"; +Strings.OfficeOM.L_GetSelectionNotSupported = "Ez da uneko hautapena onartzen."; +Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Ez da onartzen erabiltzailearen identitate mota hori."; +Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Zehaztutako hertsadura mota ez da lotura mota honekin bateragarria."; +Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Deitu closeAsync metodoari uneko fitxategian, beste fitxategi bat eskuratu aurretik."; +Strings.OfficeOM.L_DialogAddressNotTrusted = "URLaren domeinua ez dago manifestuaren AppDomains elementuan."; +Strings.OfficeOM.L_InvalidAPICall = "API dei baliogabea"; +Strings.OfficeOM.L_CustomXmlNodeNotFound = "Ez da zehaztutako nodoa aurkitu."; +Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Oharra: formatua ezartzeko APIaren bidez, gehienez, 100 formatu ezartzea gomendatzen da."; +Strings.OfficeOM.L_InvalidColumnsForBinding = "Zehaztutako zutabeak baliogabeak dira."; +Strings.OfficeOM.L_InvalidCoercion = "Hertsadura mota baliogabea"; +Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Hautatutako edukiak taula-formatuan egon behar du. Formateatu datuak taula gisa eta saiatu berriro."; +Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Egin hautapena."; +Strings.OfficeOM.L_FormattingReminder = "Formatuari buruzko abisua"; +Strings.OfficeOM.L_MissingRequiredArguments = "derrigorrezko zenbait argumentu falta dira"; +Strings.OfficeOM.L_MemoryLimit = "Memoriaren muga gainditu da"; Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Datuak ez daude eguneratuta. Eskuratu berriro objektua."; -Strings.OfficeOM.L_DataNotMatchBindingType = "Zehaztutako datu-objektua ez da lotura motarekin bateragarria."; -Strings.OfficeOM.L_DataNotMatchCoercionType = "Zehaztutako datu-objektu mota ez da uneko hautapenarekin bateragarria."; +Strings.OfficeOM.L_InvalidOrTimedOutSession = "Saioak ez du balio edo iraungi egin da"; +Strings.OfficeOM.L_UserAbortedMessage = "Erabiltzaileak ez ditu onartu osagarriaren baimenak."; +Strings.OfficeOM.L_BindingToMultipleSelection = "Ez dira ondoz ondokoak ez diren hautapenak onartzen."; +Strings.OfficeOM.L_ValueNotLoaded = 'Emaitza-objektuaren balioa ez da oraindik kargatu. Balioaren propietatea irakurri aurretik, deitu "context.sync()" funtzioari erlazionatutako eskaeraren testuinguruan.'; +Strings.OfficeOM.L_InvalidBindingError = "Lotura-errore baliogabea"; +Strings.OfficeOM.L_DialogInvalidScheme = "URL eskema ez da onartzen. Erabili HTTPS."; +Strings.OfficeOM.L_SSOConnectionLostError = "A connection was lost during the sign in process."; +Strings.OfficeOM.L_SetDataIsTooLarge = "Zehaztutako datu-objektua handiegia da."; +Strings.OfficeOM.L_UserAborted = "Erabiltzaileak bertan behera utzi du baimen-eskaera."; +Strings.OfficeOM.L_MissingParameter = "Parametroa falta da"; +Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "konfiguratu arakatzailea"; +Strings.OfficeOM.L_ApiNotFoundDetails = "{0} metodoa edo propietatea {1} eskakizun multzoaren zati da, eta hura ez dago erabilgarri zuk darabilzun {2} bertsioan."; +Strings.OfficeOM.L_CustomFunctionNameCannotSplit = "Funtzio-izenak hutsik ez dauden izen-leku bat eta izen labur bat izan behar ditu."; +Strings.OfficeOM.L_UnsupportedDataObject = "Ez da adierazitako datu-objektu mota onartzen."; +Strings.OfficeOM.L_InvalidNode = "Nodo baliogabea"; +Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Zehaztutako lotura mota ez da adierazitako izendatutako elementuarekin bateragarria."; +Strings.OfficeOM.L_CustomFunctionImplementationMissing = 'Izen hori duen eta funtzioaren definizioak dituen Excel.CustomFunctions klaseko propietateak "call" (deitu) propietatea izan behar du funtzioa inplementatu ahal izateko.'; Strings.OfficeOM.L_DataNotMatchSelection = "Adierazitako datu-objektua ez da uneko hautapenaren formarekin edo neurriekin bateragarria."; -Strings.OfficeOM.L_CustomXmlOutOfDateName = "Datuak ez dira unekoak"; -Strings.OfficeOM.L_CannotWriteToSelection = "Ezin da uneko hautapenean idatzi."; -Strings.OfficeOM.L_SSOClientErrorMessage = "Ustekabeko errorea gertatu da memoria barruko eskemaren cachean."; Strings.OfficeOM.L_TooManyOptionalFunction = "parametroen zerrendan aukerako funtzio anizkoitzak daude"; -Strings.OfficeOM.L_PropertyNotLoaded = '"{0}" propietatea ez dago erabilgarri. Propietatearen balioa irakurri aurretik, deitu edukitze-objektuaren kargatze-metodoari eta deitu "context.sync()" metodoari erlazionatutako eskaera-testuinguruan.'; -Strings.OfficeOM.L_InternalErrorDescription = "Barne-errore bat gertatu da."; -Strings.OfficeOM.L_UserNotSignedIn = "Ez dago Office-n saioa hasita duen erabiltzailerik."; -Strings.OfficeOM.L_BindingNotExist = "Zehaztutako lotura ez dago."; -Strings.OfficeOM.L_InvalidBindingError = "Lotura-errore baliogabea"; +Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Osagarriak eskatu du jada sarbide-tokena."; +Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Oharra: taulek, gehienez, 20.000 gelaxka izatea gomendatzen da."; +Strings.OfficeOM.L_InvalidTableOptionValue = "TableOptions parametroetako batek edo gehiagok baimendu gabeko balioak dituzte. Egiaztatu balioak eta saiatu berriro."; +Strings.OfficeOM.L_TooManyOptionalObjects = "parametroen zerrendan aukerako objektu anizkoitzak daude"; +Strings.OfficeOM.L_CoercionTypeNotSupported = "Ez da zehaztutako hertsadura mota onartzen."; +Strings.OfficeOM.L_SliceSizeNotSupported = "Zehaztutako zatiaren tamaina ez da onartzen."; Strings.OfficeOM.L_APINotSupported = "APIa ez da bateragarria"; -Strings.OfficeOM.L_CallbackNotAFunction = "Atzeradeiak funtzio motakoa izan behar du; {0} motakoa da."; -Strings.OfficeOM.L_SettingsStaleError = "Ezarpenen errore zaharkitua"; -Strings.OfficeOM.L_EventRegistrationError = "Errorea gertaera erregistratzean"; -Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Lotura mota honetan ez da eragiketa hori onartzen."; -Strings.OfficeOM.L_InvalidSetStartRowColumn = "Zehaztutako StartRow edo StartColumn balioak baliogabeak dira."; -Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Deitu closeAsync metodoari uneko fitxategian, beste fitxategi bat eskuratu aurretik."; -Strings.OfficeOM.L_InvalidGrant = "Baimena falta da."; -Strings.OfficeOM.L_InvalidDataObject = "Datu-objektu baliogabea"; Strings.OfficeOM.L_InvalidFormatValue = "Formatuaren parametroetako batek edo gehiagok baimendu gabeko balioak dituzte. Egiaztatu balioak eta saiatu berriro."; -Strings.OfficeOM.L_InvalidCellsValue = "Gelaxken parametroetako batek edo gehiagok baimendu gabeko balioak dituzte. Egiaztatu balioak eta saiatu berriro."; -Strings.OfficeOM.L_MultipleNamedItemFound = "Izen bereko objektu anizkoitzak aurkitu dira."; -Strings.OfficeOM.L_MissingRequiredArguments = "derrigorrezko zenbait argumentu falta dira"; -Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} erabiltzaileak beste leiho bat bistaratu nahi du."; -Strings.OfficeOM.L_DialogAddressNotTrusted = "URLaren domeinua ez dago manifestuaren AppDomains elementuan."; +Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "Hautapena 1024 elementura mugatzen du XPath lengoaiak."; +Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Lotura mota honetan ez da eragiketa hori onartzen."; +Strings.OfficeOM.L_InvalidApiCallInContext = "Ezin da egin APIaren deia testuinguru honetan."; +Strings.OfficeOM.L_InvalidBinding = "Lotura baliogabea"; +Strings.OfficeOM.L_TooManyIncompleteRequests = "Itxaron aurreko deia osatzen den arte."; Strings.OfficeOM.L_SettingsAreStale = "Ezin izan dira ezarpenak gorde unekoak ez direlako."; -Strings.OfficeOM.L_DataWriteReminder = "Datuak idazteari buruzko abisua"; -Strings.OfficeOM.L_ColIndexOutOfRange = "Zutabe-indizearen balioa baimendutako barrutitik kanpo dago. Erabili zutabe kopurua baino txikiagoa den balio positiboa (0 edo handiagoa)."; -Strings.OfficeOM.L_CannotNavigateTo = "Objektua nabigatu ezin den toki batean kokatuta dago."; -Strings.OfficeOM.L_AppNameNotExist = "{0} osagarriaren izena ez dago."; Strings.OfficeOM.L_UnsupportedEnumeration = "Ez da zenbakitzea onartzen"; -Strings.OfficeOM.L_InvalidTableOptionValue = "TableOptions parametroetako batek edo gehiagok baimendu gabeko balioak dituzte. Egiaztatu balioak eta saiatu berriro."; -Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "konfiguratu arakatzailea"; -Strings.OfficeOM.L_InvalidSelectionForBindingType = "Ezin da loturarik sortu uneko hautapenarekin eta zehaztutako lotura motarekin."; -Strings.OfficeOM.L_NotSupportedBindingType = "Ez da zehaztutako {0} lotura mota onartzen."; -Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Arakatzailearen segurtasun-ezarpenek ez digute uzten elkarrizketa-koadroa sortzen. Elkarrizketa-koadroaren domeinua eta osagarriaren ostalariaren domeinua ez daude segurtasun-zona berean."; -Strings.OfficeOM.L_InvalidSSOAddinMessage = "Identitatearen API hori ezin da erabili osagarri honetan."; -Strings.OfficeOM.L_TooManyIncompleteRequests = "Itxaron aurreko deia osatzen den arte."; -Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Onartu"; -Strings.OfficeOM.L_MissingParameter = "Parametroa falta da"; -Strings.OfficeOM.L_SetDataParametersConflict = "Zehaztutako parametroak gatazkan daude."; -Strings.OfficeOM.L_EventHandlerRemovalFailed = "Ezin izan da gertaera-maneiatzailea kendu."; -Strings.OfficeOM.L_RowIndexOutOfRange = "Errenkada-indizearen balioa baimendutako barrutitik kanpo dago. Erabili errenkada kopurua baino txikiagoa den balio positibo bat (0 edo handiagoa)."; -Strings.OfficeOM.L_InvalidBinding = "Lotura baliogabea"; -Strings.OfficeOM.L_APICallFailed = "API deiak huts egin du"; -Strings.OfficeOM.L_UnsupportedEnumerationMessage = "Uneko aplikazio ostalarian ez da zenbakitzea onartzen."; -Strings.OfficeOM.L_InitializeNotReady = "Office.js oraindik ez da erabat kargatu. Saiatu berriro geroago edo ziurtatu hasieratze-kodea Office.initialize funtzioan gehitu duzula."; +Strings.OfficeOM.L_NotSupported = "Ez da {0} funtzioa onartzen."; +Strings.OfficeOM.L_DialogNavigateError = "Elkarrizketa-koadroaren nabigazio-errorea"; +Strings.OfficeOM.L_InvalidOperationInCellEditMode = "Gelaxkak editatzeko moduan dago Excel. Irten modu horretatik SARTU edo TAB sakatuta edo beste gelaxka bat hautatuta, eta saiatu berriro."; +Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Baztertu"; +Strings.OfficeOM.L_SettingNameNotExist = "Ez da zehaztutako ezarpenaren izena existitzen."; Strings.OfficeOM.L_OperationNotSupported = "Ez da eragiketa onartzen."; Strings.OfficeOM.L_NotSupportedEventType = "Ez da zehaztutako {0} gertaera mota onartzen."; -Strings.OfficeOM.L_DialogInvalidScheme = "URL eskema ez da onartzen. Erabili HTTPS."; -Strings.OfficeOM.L_UserAborted = "Erabiltzaileak bertan behera utzi du baimen-eskaera."; -Strings.OfficeOM.L_FormatValueOutOfRange = "Balioa baimendutako barrutitik kanpo dago."; -Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Idatzitako argumentuek ez dute balio."; -Strings.OfficeOM.L_InvalidSetColumns = "Zehaztutako zutabeak baliogabeak dira."; -Strings.OfficeOM.L_InvalidObjectPath = 'Objektuaren "{0}" bide-izenak ez du balio egin behar duzunerako. Objektua hainbat "context.sync" deitan erabiltzen ari bazara eta ".run" sortaren exekuzio sekuentzialetik kanpo, erabili "context.trackedObjects.add()" eta "context.trackedObjects.remove()" metodoak objektuaren iraupena kudeatzeko.'; -Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Hautatzeko mugara iritsi zara"; -Strings.OfficeOM.L_InvalidFormat = "Formatu baliogabearen errorea"; -Strings.OfficeOM.L_GetDataParametersConflict = "Zehaztutako parametroak gatazkan daude."; -Strings.OfficeOM.L_InvalidGrantMessage = "Osagarri honen baimena falta da."; -Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Hautatutako edukiak taula-formatuan egon behar du. Formateatu datuak taula gisa eta saiatu berriro."; -Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Uneko hautapena ez da zehaztutako hertsadura motarekin bateragarria."; -Strings.OfficeOM.L_DialogNavigateError = "Elkarrizketa-koadroaren nabigazio-errorea"; -Strings.OfficeOM.L_SliceSizeNotSupported = "Zehaztutako zatiaren tamaina ez da onartzen."; +Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Koordenatu-parametroak ezin dira hertsadura motaren taularekin erabili taulak konbinatutako gelaxkak dituenean."; +Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = 'Irakurtzeko soilik den "{0}" propietatea ezartzen saiatzen.'; +Strings.OfficeOM.L_DataReadError = "Datu-irakurketaren errorea"; Strings.OfficeOM.L_IndexOutOfRange = "Indizea barrutitik kanpo dago."; -Strings.OfficeOM.L_GetDataIsTooLarge = "Eskatutako datu multzoa handiegia da."; +Strings.OfficeOM.L_EventRegistrationError = "Errorea gertaera erregistratzean"; +Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} erabiltzaileak beste leiho bat bistaratu nahi du."; +Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = '"{0}" propietatean egindako aldaketak ezin dira aplikatu "object.set" metodoaren bidez.'; +Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Koordenatu-parametroak ezin dira hertsadura motaren taularekin erabili taulak konbinatutako gelaxkak dituenean."; +Strings.OfficeOM.L_FunctionCallFailed = "{0} funtzioaren deiak huts egin du. Errore-kodea: {1}."; +Strings.OfficeOM.L_PropertyDoesNotExist = '"{0}" propietatea ez dago objektuan.'; +Strings.OfficeOM.L_BrowserAPINotSupported = "Eskatutako APIa ez da arakatzailearekin bateragarria."; +Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "Office Online saioa iraungi egin da edo ez du balio. Aurrera egiteko, freskatu orria."; +Strings.OfficeOM.L_CustomFunctionDefinitionMissing = "Funtzioaren definizioak dituen propietate bat izan behar duzu izen horrekin Excel.CustomFunctions klasean."; +Strings.OfficeOM.L_ConnectionFailureWithDetails = 'Eskaerak huts egin du eta egoera-kode honekin erantzun du: "{0}" egoera-kodea, "{1}" errore-kodea eta "{2}" errore-mezua.'; Strings.OfficeOM.L_UnknownBindingType = "Ez da lotura mota onartzen."; -Strings.OfficeOM.L_InvalidGetRows = "Zehaztutako errenkadak baliogabeak dira."; -Strings.OfficeOM.L_NotSupported = "Ez da {0} funtzioa onartzen."; -Strings.OfficeOM.L_InvalidArgumentGeneric = "Funtziora pasatako argumentuek ez dute funtzionatzen egoera honetan, ez daude, edo ez dute formatu egokia."; -Strings.OfficeOM.L_BindingToMultipleSelection = "Ez dira ondoz ondokoak ez diren hautapenak onartzen."; -Strings.OfficeOM.L_DialogAlreadyOpened = "Ezin izan da gauzatu eragiketa, osagarriak elkarrizketa-koadro bat aktibo duelako jada."; -Strings.OfficeOM.L_InvalidOrTimedOutSession = "Saioak ez du balio edo iraungi egin da"; +Strings.OfficeOM.L_DocumentReadOnly = "Uneko dokumentu moduan ez da eskatutako eragiketa baimentzen."; +Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Uneko hautapena ez da zehaztutako hertsadura motarekin bateragarria."; +Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Hautatzeko mugara iritsi zara"; +Strings.OfficeOM.L_APICallFailed = "API deiak huts egin du"; +Strings.OfficeOM.L_RunMustReturnPromise = '".run" metodora pasatutako sorta-funtzioak ez du promesik itzuli. Funtzioak promes bat itzuli behar du, automatikoki jarraitutako objektuak askatu ahal izan daitezen sortaren eragiketa amaitu ondoren. Normalean, "context.sync()" metodotik erantzun bat itzultzen da promesen erantzun gisa.'; +Strings.OfficeOM.L_DataNotMatchCoercionType = "Zehaztutako datu-objektu mota ez da uneko hautapenarekin bateragarria."; +Strings.OfficeOM.L_InvalidObjectPath = 'Objektuaren "{0}" bide-izenak ez du balio egin behar duzunerako. Objektua hainbat "context.sync" deitan erabiltzen ari bazara eta ".run" sortaren exekuzio sekuentzialetik kanpo, erabili "context.trackedObjects.add()" eta "context.trackedObjects.remove()" metodoak objektuaren iraupena kudeatzeko.'; +Strings.OfficeOM.L_SelectionCannotBound = "Ezin zaio uneko hautapenari lotu."; +Strings.OfficeOM.L_RedundantCallbackSpecification = "Ezin da atzeradeia zehaztu ez argumentu-zerrendan ez aukerako objektuan."; +Strings.OfficeOM.L_NotImplemented = "{0} funtzioa ez dago inplementatuta."; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage = "Eragiketak huts egin du osagarri hau ez delako bateragarria kategoria honetako erabiltzailearen baimenarekin"; +Strings.OfficeOM.L_InvalidDataObject = "Datu-objektu baliogabea"; +Strings.OfficeOM.L_ColIndexOutOfRange = "Zutabe-indizearen balioa baimendutako barrutitik kanpo dago. Erabili zutabe kopurua baino txikiagoa den balio positiboa (0 edo handiagoa)."; +Strings.OfficeOM.L_ActivityLimitReached = "Jardueren mugara iritsi zara."; +Strings.OfficeOM.L_NotSupportedBindingType = "Ez da zehaztutako {0} lotura mota onartzen."; +Strings.OfficeOM.L_RequestTimeout = "Denbora gehiegi behar izan da deia exekutatzeko."; Strings.OfficeOM.L_InvalidSetRows = "Zehaztutako errenkadak baliogabeak dira."; -Strings.OfficeOM.L_DataWriteError = "Datu-idazketaren errorea"; -Strings.OfficeOM.L_InternalError = "Barne-errorea"; -Strings.OfficeOM.L_SetDataIsTooLarge = "Zehaztutako datu-objektua handiegia da."; -Strings.OfficeOM.L_InvalidReadForBlankRow = "Adierazitako errenkada hutsik dago."; -Strings.OfficeOM.L_DataStale = "Datuak ez dira unekoak"; -Strings.OfficeOM.L_InvalidBindingOperation = "Lotura-eragiketa baliogabea"; -Strings.OfficeOM.L_CoercionTypeNotSupported = "Ez da zehaztutako hertsadura mota onartzen."; -Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Egin hautapena."; -Strings.OfficeOM.L_UserAbortedMessage = "Erabiltzaileak ez ditu onartu osagarriaren baimenak."; -Strings.OfficeOM.L_ValueNotLoaded = 'Emaitza-objektuaren balioa ez da oraindik kargatu. Balioaren propietatea irakurri aurretik, deitu "context.sync()" funtzioari erlazionatutako eskaeraren testuinguruan.'; -Strings.OfficeOM.L_CustomXmlNodeNotFound = "Ez da zehaztutako nodoa aurkitu."; -Strings.OfficeOM.L_ConnectionFailureWithDetails = 'Eskaerak huts egin du eta egoera-kode honekin erantzun du: "{0}" egoera-kodea, "{1}" errore-kodea eta "{2}" errore-mezua.'; -Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Sareko arazo bat dela-eta, ezin izan da fitxategia eskuratu."; -Strings.OfficeOM.L_InvalidParameters = "{0} funtzioak parametro baliogabeak ditu."; -Strings.OfficeOM.L_InvalidGetColumns = "Zehaztutako zutabeak baliogabeak dira."; -Strings.OfficeOM.L_DialogRequireHTTPS = "HTTP protokoloa ez da onartzen. Erabili HTTPS."; -Strings.OfficeOM.L_InvalidNode = "Nodo baliogabea"; +Strings.OfficeOM.L_FormatValueOutOfRange = "Balioa baimendutako barrutitik kanpo dago."; +Strings.OfficeOM.L_SetDataParametersConflict = "Zehaztutako parametroak gatazkan daude."; +Strings.OfficeOM.L_DataNotMatchBindingSize = "Adierazitako datu-objektua ez dator bat uneko hautapenaren tamainarekin."; +Strings.OfficeOM.L_InvalidGrantMessage = "Osagarri honen baimena falta da."; +Strings.OfficeOM.L_SSOServerErrorMessage = "Ustekabeko errore bat gertatu da zerbitzarian."; +Strings.OfficeOM.L_DialogOK = "Ados"; +Strings.OfficeOM.L_PropertyNotLoaded = '"{0}" propietatea ez dago erabilgarri. Propietatearen balioa irakurri aurretik, deitu edukitze-objektuaren kargatze-metodoari eta deitu "context.sync()" metodoari erlazionatutako eskaera-testuinguruan.'; +Strings.OfficeOM.L_ShuttingDown = "Eragiketak huts egin du zerbitzariko datuak unekoak ez direlako."; +Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Zehaztutako RowCount edo ColumnCount balioak baliogabeak dira."; +Strings.OfficeOM.L_OsfControlTypeNotSupported = "Ez da OsfControl mota onartzen."; +Strings.OfficeOM.L_OutOfRange = "Barrutitik kanpo"; +Strings.OfficeOM.L_UserNotSignedIn = "Ez dago Office-n saioa hasita duen erabiltzailerik."; +Strings.OfficeOM.L_InValidOptionalArgument = "aukerako argumentu baliogabea"; +Strings.OfficeOM.L_ElementMissing = "Ezin izan zaio taulako gelaxkari formatua eman, parametro-balio batzuk falta direlako. Egiaztatu parametroak eta saiatu berriro."; Strings.OfficeOM.L_SaveSettingsError = "Gordetzeko ezarpenen errorea"; -Strings.OfficeOM.L_BadSelectorString = "Hautatzailera igarotako kateak ez du formatu egokia edo ez da onartzen."; -Strings.OfficeOM.L_RedundantCallbackSpecification = "Ezin da atzeradeia zehaztu ez argumentu-zerrendan ez aukerako objektuan."; -Strings.OfficeOM.L_ConnectionFailureWithStatus = "Eskaerak huts egin du eta egoera-kode honekin erantzun du: {0}."; -Strings.OfficeOM.L_GetSelectionNotSupported = "Ez da uneko hautapena onartzen."; -Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "Office Online saioa iraungi egin da edo ez du balio. Aurrera egiteko, freskatu orria."; -Strings.OfficeOM.L_InvalidAPICall = "API dei baliogabea" +Strings.OfficeOM.L_InvalidGetColumns = "Zehaztutako zutabeak baliogabeak dira."; +Strings.OfficeOM.L_MultipleNamedItemFound = "Izen bereko objektu anizkoitzak aurkitu dira."; +Strings.OfficeOM.L_InvalidValue = "Balio okerra"; +Strings.OfficeOM.L_InternalErrorDescription = "Barne-errore bat gertatu da."; +Strings.OfficeOM.L_InvalidGetRows = "Zehaztutako errenkadak baliogabeak dira."; +Strings.OfficeOM.L_OverwriteWorksheetData = "Multzo-eragiketak huts egin du adierazitako datu-objektuak datuak gainidatzi edo lekualdatuko baititu."; +Strings.OfficeOM.L_HostError = "Ostalariaren errorea"; +Strings.OfficeOM.L_UnsupportedUserIdentity = "Ez da onartzen erabiltzailearen identitate mota hori."; +Strings.OfficeOM.L_SpecifiedIdNotExist = "Zehaztutako IDa ez dago."; +Strings.OfficeOM.L_CallbackNotAFunction = "Atzeradeiak funtzio motakoa izan behar du; {0} motakoa da."; +Strings.OfficeOM.L_EventHandlerRemovalFailed = "Ezin izan da gertaera-maneiatzailea kendu."; +Strings.OfficeOM.L_InvalidArgument = '"{0}" argumentuak ez da baliozkoa egoera honetan, ez dago, edo ez dago formatu zuzenean.'; +Strings.OfficeOM.L_CannotRegisterEvent = "Ezin da erregistratu gertaera-maneatzailea."; +Strings.OfficeOM.L_ReadSettingsError = "Irakurketa-ezarpenen errorea"; +Strings.OfficeOM.L_Timeout = "Eragiketaren denbora-muga gainditu da."; +Strings.OfficeOM.L_BindingCreationError = "Errorea lotura sortzean"; +Strings.OfficeOM.L_EventHandlerNotExist = "Ez da lotura honen gertaera-maneiatzailea aurkitu."; +Strings.OfficeOM.L_BindingNotExist = "Zehaztutako lotura ez dago."; +Strings.OfficeOM.L_UserClickIgnore = "Erabiltzaileak ez ikusi egin dio elkarrizketa-koadroari."; +Strings.OfficeOM.L_CannotWriteToSelection = "Ezin da uneko hautapenean idatzi."; +Strings.OfficeOM.L_InvalidParameters = "{0} funtzioak parametro baliogabeak ditu."; +Strings.OfficeOM.L_InitializeNotReady = "Office.js oraindik ez da erabat kargatu. Saiatu berriro geroago edo ziurtatu hasieratze-kodea Office.initialize funtzioan gehitu duzula."; +Strings.OfficeOM.L_RequestTokenUnavailable = "APIa mugatu da deien maiztasuna txikitzeko."; +Strings.OfficeOM.L_GetDataParametersConflict = "Zehaztutako parametroak gatazkan daude."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Eragiketak huts egin du osagarriak dagoeneko eskatu duelako sarbide-tokena." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/eu-es/office_strings.js b/node_modules/@microsoft/office-js/dist/eu-es/office_strings.js index 47923d8..dd6d3c8 100644 --- a/node_modules/@microsoft/office-js/dist/eu-es/office_strings.js +++ b/node_modules/@microsoft/office-js/dist/eu-es/office_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_EventHandlerAdditionFailed="Ezin izan da gertaera-maneiatzailea gehitu.";Strings.OfficeOM.L_PropertyDoesNotExist='"{0}" propietatea ez dago objektuan.';Strings.OfficeOM.L_InvalidNamedItemForBindingType="Zehaztutako lotura mota ez da adierazitako izendatutako elementuarekin bateragarria.";Strings.OfficeOM.L_HostError="Ostalariaren errorea";Strings.OfficeOM.L_DialogOK="Ados";Strings.OfficeOM.L_SettingNameNotExist="Ez da zehaztutako ezarpenaren izena existitzen.";Strings.OfficeOM.L_DataNotMatchBindingSize="Adierazitako datu-objektua ez dator bat uneko hautapenaren tamainarekin.";Strings.OfficeOM.L_BindingCreationError="Errorea lotura sortzean";Strings.OfficeOM.L_SSOClientError="Errore bat gertatu da Office-ren autentifikazio-eskaeran.";Strings.OfficeOM.L_TooManyArguments="argumentu gehiegi";Strings.OfficeOM.L_InvalidResourceUrlMessage="Balio ez duen aplikazioaren baliabideen URLa zehaztu da manifestuan.";Strings.OfficeOM.L_InvalidDataFormat="Zehaztutako datu-objektuaren formatua baliogabea da.";Strings.OfficeOM.L_SSOServerErrorMessage="Ustekabeko errore bat gertatu da zerbitzarian.";Strings.OfficeOM.L_InvalidCoercion="Hertsadura mota baliogabea";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod='"{0}" propietatean egindako aldaketak ezin dira aplikatu "object.set" metodoaren bidez.';Strings.OfficeOM.L_EventHandlerNotExist="Ez da lotura honen gertaera-maneiatzailea aurkitu.";Strings.OfficeOM.L_CustomXmlError="XML errore pertsonalizatua.";Strings.OfficeOM.L_RunMustReturnPromise='".run" metodora pasatutako sorta-funtzioak ez du promesik itzuli. Funtzioak promes bat itzuli behar du, automatikoki jarraitutako objektuak askatu ahal izan daitezen sortaren eragiketa amaitu ondoren. Normalean, "context.sync()" metodotik erantzun bat itzultzen da promesen erantzun gisa.';Strings.OfficeOM.L_FunctionCallFailed="{0} funtzioaren deiak huts egin du. Errore-kodea: {1}.";Strings.OfficeOM.L_DocumentReadOnly="Uneko dokumentu moduan ez da eskatutako eragiketa baimentzen.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Koordenatu-parametroak ezin dira hertsadura motaren taularekin erabili taulak konbinatutako gelaxkak dituenean.";Strings.OfficeOM.L_InvalidApiCallInContext="Ezin da egin APIaren deia testuinguru honetan.";Strings.OfficeOM.L_DisplayDialogError="Elkarrizketa-koadroaren bistaratze-errorea";Strings.OfficeOM.L_InvalidResourceUrl="Aplikazioaren baliabideen URLak ez du balio.";Strings.OfficeOM.L_NoCapability="Ez duzu ekintza honetarako baimen nahikorik.";Strings.OfficeOM.L_FileTypeNotSupported="Ez da zehaztutako fitxategi mota onartzen.";Strings.OfficeOM.L_InvalidColumnsForBinding="Zehaztutako zutabeak baliogabeak dira.";Strings.OfficeOM.L_NewWindowCrossZone='Arakatzailearen segurtasun-ezarpenek ez digute uzten elkarrizketa-koadroa sortzen. Erabili beste arakatzaile bat edo {0} "{1}" eta helbide-barran agertzen den domeinua segurtasun-zona berean egon daitezen.';Strings.OfficeOM.L_CannotRegisterEvent="Ezin da erregistratu gertaera-maneatzailea.";Strings.OfficeOM.L_OsfControlTypeNotSupported="Ez da OsfControl mota onartzen.";Strings.OfficeOM.L_OutOfRange="Barrutitik kanpo";Strings.OfficeOM.L_InvalidGetStartRowColumn="Zehaztutako StartRow edo StartColumn balioak baliogabeak dira.";Strings.OfficeOM.L_NotImplemented="{0} funtzioa ez dago inplementatuta.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Eragiketak huts egin du osagarriak dagoeneko eskatu duelako sarbide-tokena.";Strings.OfficeOM.L_OverwriteWorksheetData="Multzo-eragiketak huts egin du adierazitako datu-objektuak datuak gainidatzi edo lekualdatuko baititu.";Strings.OfficeOM.L_InvalidValue="Balio okerra";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Oharra: taulek, gehienez, 20.000 gelaxka izatea gomendatzen da.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Osagarriak eskatu du jada sarbide-tokena.";Strings.OfficeOM.L_NetworkProblem="Sareko arazoa";Strings.OfficeOM.L_InvalidArgument='"{0}" argumentuak ez da baliozkoa egoera honetan, ez dago, edo ez dago formatu zuzenean.';Strings.OfficeOM.L_UnsupportedDataObject="Ez da adierazitako datu-objektu mota onartzen.";Strings.OfficeOM.L_ShuttingDown="Eragiketak huts egin du zerbitzariko datuak unekoak ez direlako.";Strings.OfficeOM.L_Timeout="Eragiketaren denbora-muga gainditu da.";Strings.OfficeOM.L_ElementMissing="Ezin izan zaio taulako gelaxkari formatua eman, parametro-balio batzuk falta direlako. Egiaztatu parametroak eta saiatu berriro.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Koordenatu-parametroak ezin dira hertsadura motaren taularekin erabili taulak konbinatutako gelaxkak dituenean.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Oharra: formatua ezartzeko APIaren bidez, gehienez, 100 formatu ezartzea gomendatzen da.";Strings.OfficeOM.L_UnsupportedUserIdentity="Ez da onartzen erabiltzailearen identitate mota hori.";Strings.OfficeOM.L_RequestTimeout="Denbora gehiegi behar izan da deia exekutatzeko.";Strings.OfficeOM.L_MemoryLimit="Memoriaren muga gainditu da";Strings.OfficeOM.L_SelectionCannotBound="Ezin zaio uneko hautapenari lotu.";Strings.OfficeOM.L_NavOutOfBound="Eragiketak huts egin du indizea barrutitik kanpo dagoelako.";Strings.OfficeOM.L_InValidOptionalArgument="aukerako argumentu baliogabea";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Zehaztutako hertsadura mota ez da lotura mota honekin bateragarria.";Strings.OfficeOM.L_RequestTokenUnavailable="APIa mugatu da deien maiztasuna txikitzeko.";Strings.OfficeOM.L_DataReadError="Datu-irakurketaren errorea";Strings.OfficeOM.L_SSOServerError="Errore bat gertatu da autentifikatzaile-hornitzailean.";Strings.OfficeOM.L_PermissionDenied="Baimena ukatu da";Strings.OfficeOM.L_FormattingReminder="Formatuari buruzko abisua";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Ez da {0} aplikazioa existitzen. Ez da Microsoft.Office.WebExtension.initialize(reason) deitu.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Ez da onartzen erabiltzailearen identitate mota hori.";Strings.OfficeOM.L_SpecifiedIdNotExist="Zehaztutako IDa ez dago.";Strings.OfficeOM.L_InvalidRequestContext="Ezin da erabili objektua eskaera-testuinguru desberdinetan.";Strings.OfficeOM.L_ReadSettingsError="Irakurketa-ezarpenen errorea";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="Hautapena 1024 elementura mugatzen du XPath lengoaiak.";Strings.OfficeOM.L_ActivityLimitReached="Jardueren mugara iritsi zara.";Strings.OfficeOM.L_UserClickIgnore="Erabiltzaileak ez ikusi egin dio elkarrizketa-koadroari.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Zehaztutako RowCount edo ColumnCount balioak baliogabeak dira.";Strings.OfficeOM.L_SettingsCannotSave="Ezin izan dira ezarpenak gorde.";Strings.OfficeOM.L_BrowserAPINotSupported="Eskatutako APIa ez da arakatzailearekin bateragarria.";Strings.OfficeOM.L_TooManyOptionalObjects="parametroen zerrendan aukerako objektu anizkoitzak daude";Strings.OfficeOM.L_NamedItemNotFound="Ez da izendatutako elementua existitzen.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty='Irakurtzeko soilik den "{0}" propietatea ezartzen saiatzen.';Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Baztertu";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Datuak ez daude eguneratuta. Eskuratu berriro objektua.";Strings.OfficeOM.L_DataNotMatchBindingType="Zehaztutako datu-objektua ez da lotura motarekin bateragarria.";Strings.OfficeOM.L_DataNotMatchCoercionType="Zehaztutako datu-objektu mota ez da uneko hautapenarekin bateragarria.";Strings.OfficeOM.L_DataNotMatchSelection="Adierazitako datu-objektua ez da uneko hautapenaren formarekin edo neurriekin bateragarria.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Datuak ez dira unekoak";Strings.OfficeOM.L_CannotWriteToSelection="Ezin da uneko hautapenean idatzi.";Strings.OfficeOM.L_SSOClientErrorMessage="Ustekabeko errorea gertatu da memoria barruko eskemaren cachean.";Strings.OfficeOM.L_TooManyOptionalFunction="parametroen zerrendan aukerako funtzio anizkoitzak daude";Strings.OfficeOM.L_PropertyNotLoaded='"{0}" propietatea ez dago erabilgarri. Propietatearen balioa irakurri aurretik, deitu edukitze-objektuaren kargatze-metodoari eta deitu "context.sync()" metodoari erlazionatutako eskaera-testuinguruan.';Strings.OfficeOM.L_InternalErrorDescription="Barne-errore bat gertatu da.";Strings.OfficeOM.L_UserNotSignedIn="Ez dago Office-n saioa hasita duen erabiltzailerik.";Strings.OfficeOM.L_BindingNotExist="Zehaztutako lotura ez dago.";Strings.OfficeOM.L_InvalidBindingError="Lotura-errore baliogabea";Strings.OfficeOM.L_APINotSupported="APIa ez da bateragarria";Strings.OfficeOM.L_CallbackNotAFunction="Atzeradeiak funtzio motakoa izan behar du; {0} motakoa da.";Strings.OfficeOM.L_SettingsStaleError="Ezarpenen errore zaharkitua";Strings.OfficeOM.L_EventRegistrationError="Errorea gertaera erregistratzean";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Lotura mota honetan ez da eragiketa hori onartzen.";Strings.OfficeOM.L_InvalidSetStartRowColumn="Zehaztutako StartRow edo StartColumn balioak baliogabeak dira.";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Deitu closeAsync metodoari uneko fitxategian, beste fitxategi bat eskuratu aurretik.";Strings.OfficeOM.L_InvalidGrant="Baimena falta da.";Strings.OfficeOM.L_InvalidDataObject="Datu-objektu baliogabea";Strings.OfficeOM.L_InvalidFormatValue="Formatuaren parametroetako batek edo gehiagok baimendu gabeko balioak dituzte. Egiaztatu balioak eta saiatu berriro.";Strings.OfficeOM.L_InvalidCellsValue="Gelaxken parametroetako batek edo gehiagok baimendu gabeko balioak dituzte. Egiaztatu balioak eta saiatu berriro.";Strings.OfficeOM.L_MultipleNamedItemFound="Izen bereko objektu anizkoitzak aurkitu dira.";Strings.OfficeOM.L_MissingRequiredArguments="derrigorrezko zenbait argumentu falta dira";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} erabiltzaileak beste leiho bat bistaratu nahi du.";Strings.OfficeOM.L_DialogAddressNotTrusted="URLaren domeinua ez dago manifestuaren AppDomains elementuan.";Strings.OfficeOM.L_SettingsAreStale="Ezin izan dira ezarpenak gorde unekoak ez direlako.";Strings.OfficeOM.L_DataWriteReminder="Datuak idazteari buruzko abisua";Strings.OfficeOM.L_ColIndexOutOfRange="Zutabe-indizearen balioa baimendutako barrutitik kanpo dago. Erabili zutabe kopurua baino txikiagoa den balio positiboa (0 edo handiagoa).";Strings.OfficeOM.L_CannotNavigateTo="Objektua nabigatu ezin den toki batean kokatuta dago.";Strings.OfficeOM.L_AppNameNotExist="{0} osagarriaren izena ez dago.";Strings.OfficeOM.L_UnsupportedEnumeration="Ez da zenbakitzea onartzen";Strings.OfficeOM.L_InvalidTableOptionValue="TableOptions parametroetako batek edo gehiagok baimendu gabeko balioak dituzte. Egiaztatu balioak eta saiatu berriro.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="konfiguratu arakatzailea";Strings.OfficeOM.L_InvalidSelectionForBindingType="Ezin da loturarik sortu uneko hautapenarekin eta zehaztutako lotura motarekin.";Strings.OfficeOM.L_NotSupportedBindingType="Ez da zehaztutako {0} lotura mota onartzen.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Arakatzailearen segurtasun-ezarpenek ez digute uzten elkarrizketa-koadroa sortzen. Elkarrizketa-koadroaren domeinua eta osagarriaren ostalariaren domeinua ez daude segurtasun-zona berean.";Strings.OfficeOM.L_InvalidSSOAddinMessage="Identitatearen API hori ezin da erabili osagarri honetan.";Strings.OfficeOM.L_TooManyIncompleteRequests="Itxaron aurreko deia osatzen den arte.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Onartu";Strings.OfficeOM.L_MissingParameter="Parametroa falta da";Strings.OfficeOM.L_SetDataParametersConflict="Zehaztutako parametroak gatazkan daude.";Strings.OfficeOM.L_EventHandlerRemovalFailed="Ezin izan da gertaera-maneiatzailea kendu.";Strings.OfficeOM.L_RowIndexOutOfRange="Errenkada-indizearen balioa baimendutako barrutitik kanpo dago. Erabili errenkada kopurua baino txikiagoa den balio positibo bat (0 edo handiagoa).";Strings.OfficeOM.L_InvalidBinding="Lotura baliogabea";Strings.OfficeOM.L_APICallFailed="API deiak huts egin du";Strings.OfficeOM.L_UnsupportedEnumerationMessage="Uneko aplikazio ostalarian ez da zenbakitzea onartzen.";Strings.OfficeOM.L_InitializeNotReady="Office.js oraindik ez da erabat kargatu. Saiatu berriro geroago edo ziurtatu hasieratze-kodea Office.initialize funtzioan gehitu duzula.";Strings.OfficeOM.L_OperationNotSupported="Ez da eragiketa onartzen.";Strings.OfficeOM.L_NotSupportedEventType="Ez da zehaztutako {0} gertaera mota onartzen.";Strings.OfficeOM.L_DialogInvalidScheme="URL eskema ez da onartzen. Erabili HTTPS.";Strings.OfficeOM.L_UserAborted="Erabiltzaileak bertan behera utzi du baimen-eskaera.";Strings.OfficeOM.L_FormatValueOutOfRange="Balioa baimendutako barrutitik kanpo dago.";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Idatzitako argumentuek ez dute balio.";Strings.OfficeOM.L_InvalidSetColumns="Zehaztutako zutabeak baliogabeak dira.";Strings.OfficeOM.L_InvalidObjectPath='Objektuaren "{0}" bide-izenak ez du balio egin behar duzunerako. Objektua hainbat "context.sync" deitan erabiltzen ari bazara eta ".run" sortaren exekuzio sekuentzialetik kanpo, erabili "context.trackedObjects.add()" eta "context.trackedObjects.remove()" metodoak objektuaren iraupena kudeatzeko.';Strings.OfficeOM.L_CustomXmlExceedQuotaName="Hautatzeko mugara iritsi zara";Strings.OfficeOM.L_InvalidFormat="Formatu baliogabearen errorea";Strings.OfficeOM.L_GetDataParametersConflict="Zehaztutako parametroak gatazkan daude.";Strings.OfficeOM.L_InvalidGrantMessage="Osagarri honen baimena falta da.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Hautatutako edukiak taula-formatuan egon behar du. Formateatu datuak taula gisa eta saiatu berriro.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Uneko hautapena ez da zehaztutako hertsadura motarekin bateragarria.";Strings.OfficeOM.L_DialogNavigateError="Elkarrizketa-koadroaren nabigazio-errorea";Strings.OfficeOM.L_SliceSizeNotSupported="Zehaztutako zatiaren tamaina ez da onartzen.";Strings.OfficeOM.L_IndexOutOfRange="Indizea barrutitik kanpo dago.";Strings.OfficeOM.L_GetDataIsTooLarge="Eskatutako datu multzoa handiegia da.";Strings.OfficeOM.L_UnknownBindingType="Ez da lotura mota onartzen.";Strings.OfficeOM.L_InvalidGetRows="Zehaztutako errenkadak baliogabeak dira.";Strings.OfficeOM.L_NotSupported="Ez da {0} funtzioa onartzen.";Strings.OfficeOM.L_InvalidArgumentGeneric="Funtziora pasatako argumentuek ez dute funtzionatzen egoera honetan, ez daude, edo ez dute formatu egokia.";Strings.OfficeOM.L_BindingToMultipleSelection="Ez dira ondoz ondokoak ez diren hautapenak onartzen.";Strings.OfficeOM.L_DialogAlreadyOpened="Ezin izan da gauzatu eragiketa, osagarriak elkarrizketa-koadro bat aktibo duelako jada.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Saioak ez du balio edo iraungi egin da";Strings.OfficeOM.L_InvalidSetRows="Zehaztutako errenkadak baliogabeak dira.";Strings.OfficeOM.L_DataWriteError="Datu-idazketaren errorea";Strings.OfficeOM.L_InternalError="Barne-errorea";Strings.OfficeOM.L_SetDataIsTooLarge="Zehaztutako datu-objektua handiegia da.";Strings.OfficeOM.L_InvalidReadForBlankRow="Adierazitako errenkada hutsik dago.";Strings.OfficeOM.L_DataStale="Datuak ez dira unekoak";Strings.OfficeOM.L_InvalidBindingOperation="Lotura-eragiketa baliogabea";Strings.OfficeOM.L_CoercionTypeNotSupported="Ez da zehaztutako hertsadura mota onartzen.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Egin hautapena.";Strings.OfficeOM.L_UserAbortedMessage="Erabiltzaileak ez ditu onartu osagarriaren baimenak.";Strings.OfficeOM.L_ValueNotLoaded='Emaitza-objektuaren balioa ez da oraindik kargatu. Balioaren propietatea irakurri aurretik, deitu "context.sync()" funtzioari erlazionatutako eskaeraren testuinguruan.';Strings.OfficeOM.L_CustomXmlNodeNotFound="Ez da zehaztutako nodoa aurkitu.";Strings.OfficeOM.L_ConnectionFailureWithDetails='Eskaerak huts egin du eta egoera-kode honekin erantzun du: "{0}" egoera-kodea, "{1}" errore-kodea eta "{2}" errore-mezua.';Strings.OfficeOM.L_NetworkProblemRetrieveFile="Sareko arazo bat dela-eta, ezin izan da fitxategia eskuratu.";Strings.OfficeOM.L_InvalidParameters="{0} funtzioak parametro baliogabeak ditu.";Strings.OfficeOM.L_InvalidGetColumns="Zehaztutako zutabeak baliogabeak dira.";Strings.OfficeOM.L_DialogRequireHTTPS="HTTP protokoloa ez da onartzen. Erabili HTTPS.";Strings.OfficeOM.L_InvalidNode="Nodo baliogabea";Strings.OfficeOM.L_SaveSettingsError="Gordetzeko ezarpenen errorea";Strings.OfficeOM.L_BadSelectorString="Hautatzailera igarotako kateak ez du formatu egokia edo ez da onartzen.";Strings.OfficeOM.L_RedundantCallbackSpecification="Ezin da atzeradeia zehaztu ez argumentu-zerrendan ez aukerako objektuan.";Strings.OfficeOM.L_ConnectionFailureWithStatus="Eskaerak huts egin du eta egoera-kode honekin erantzun du: {0}.";Strings.OfficeOM.L_GetSelectionNotSupported="Ez da uneko hautapena onartzen.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="Office Online saioa iraungi egin da edo ez du balio. Aurrera egiteko, freskatu orria.";Strings.OfficeOM.L_InvalidAPICall="API dei baliogabea" \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_InvalidApiArgumentsMessage="Idatzitako argumentuek ez dute balio.";Strings.OfficeOM.L_NavOutOfBound="Eragiketak huts egin du indizea barrutitik kanpo dagoelako.";Strings.OfficeOM.L_BadSelectorString="Hautatzailera igarotako kateak ez du formatu egokia edo ez da onartzen.";Strings.OfficeOM.L_InvalidResourceUrlMessage="Balio ez duen aplikazioaren baliabideen URLa zehaztu da manifestuan.";Strings.OfficeOM.L_GetDataIsTooLarge="Eskatutako datu multzoa handiegia da.";Strings.OfficeOM.L_DataWriteReminder="Datuak idazteari buruzko abisua";Strings.OfficeOM.L_ConnectionFailureWithStatus="Eskaerak huts egin du eta egoera-kode honekin erantzun du: {0}.";Strings.OfficeOM.L_CannotNavigateTo="Objektua nabigatu ezin den toki batean kokatuta dago.";Strings.OfficeOM.L_InvalidSetStartRowColumn="Zehaztutako StartRow edo StartColumn balioak baliogabeak dira.";Strings.OfficeOM.L_InvalidDataFormat="Zehaztutako datu-objektuaren formatua baliogabea da.";Strings.OfficeOM.L_DialogRequireHTTPS="HTTP protokoloa ez da onartzen. Erabili HTTPS.";Strings.OfficeOM.L_FileTypeNotSupported="Ez da zehaztutako fitxategi mota onartzen.";Strings.OfficeOM.L_InvalidReadForBlankRow="Adierazitako errenkada hutsik dago.";Strings.OfficeOM.L_InvalidSetColumns="Zehaztutako zutabeak baliogabeak dira.";Strings.OfficeOM.L_TooManyArguments="argumentu gehiegi";Strings.OfficeOM.L_DataStale="Datuak ez dira unekoak";Strings.OfficeOM.L_SSOServerError="Errore bat gertatu da autentifikatzaile-hornitzailean.";Strings.OfficeOM.L_CustomXmlError="XML errore pertsonalizatua.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Ez da {0} aplikazioa existitzen. Ez da Microsoft.Office.WebExtension.initialize(reason) deitu.";Strings.OfficeOM.L_InvalidSSOAddinMessage="Identitatearen API hori ezin da erabili osagarri honetan.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory="Osagarri hau ez da bateragarria erabiltzailearen baimenarekin.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Arakatzailearen segurtasun-ezarpenek ez digute uzten elkarrizketa-koadroa sortzen. Elkarrizketa-koadroaren domeinua eta osagarriaren ostalariaren domeinua ez daude segurtasun-zona berean.";Strings.OfficeOM.L_NoCapability="Ez duzu ekintza honetarako baimen nahikorik.";Strings.OfficeOM.L_InvalidRequestContext="Ezin da erabili objektua eskaera-testuinguru desberdinetan.";Strings.OfficeOM.L_RowIndexOutOfRange="Errenkada-indizearen balioa baimendutako barrutitik kanpo dago. Erabili errenkada kopurua baino txikiagoa den balio positibo bat (0 edo handiagoa).";Strings.OfficeOM.L_PermissionDenied="Baimena ukatu da";Strings.OfficeOM.L_SSOClientErrorMessage="Ustekabeko errorea gertatu da memoria barruko eskemaren cachean.";Strings.OfficeOM.L_NetworkProblem="Sareko arazoa";Strings.OfficeOM.L_SettingsCannotSave="Ezin izan dira ezarpenak gorde.";Strings.OfficeOM.L_AppNameNotExist="{0} osagarriaren izena ez dago.";Strings.OfficeOM.L_DataNotMatchBindingType="Zehaztutako datu-objektua ez da lotura motarekin bateragarria.";Strings.OfficeOM.L_DataWriteError="Datu-idazketaren errorea";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Onartu";Strings.OfficeOM.L_NewWindowCrossZone='Arakatzailearen segurtasun-ezarpenek ez digute uzten elkarrizketa-koadroa sortzen. Erabili beste arakatzaile bat edo {0} "{1}" eta helbide-barran agertzen den domeinua segurtasun-zona berean egon daitezen.';Strings.OfficeOM.L_EventHandlerAdditionFailed="Ezin izan da gertaera-maneiatzailea gehitu.";Strings.OfficeOM.L_InvalidFormat="Formatu baliogabearen errorea";Strings.OfficeOM.L_InvalidArgumentGeneric="Funtziora pasatako argumentuek ez dute funtzionatzen egoera honetan, ez daude, edo ez dute formatu egokia.";Strings.OfficeOM.L_InvalidCellsValue="Gelaxken parametroetako batek edo gehiagok baimendu gabeko balioak dituzte. Egiaztatu balioak eta saiatu berriro.";Strings.OfficeOM.L_DialogAlreadyOpened="Ezin izan da gauzatu eragiketa, osagarriak elkarrizketa-koadro bat aktibo duelako jada.";Strings.OfficeOM.L_InvalidResourceUrl="Aplikazioaren baliabideen URLak ez du balio.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Datuak ez dira unekoak";Strings.OfficeOM.L_DisplayDialogError="Elkarrizketa-koadroaren bistaratze-errorea";Strings.OfficeOM.L_NamedItemNotFound="Ez da izendatutako elementua existitzen.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="Uneko aplikazio ostalarian ez da zenbakitzea onartzen.";Strings.OfficeOM.L_SSOConnectionLostErrorMessage="A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones.";Strings.OfficeOM.L_SettingsStaleError="Ezarpenen errore zaharkitua";Strings.OfficeOM.L_InvalidGetStartRowColumn="Zehaztutako StartRow edo StartColumn balioak baliogabeak dira.";Strings.OfficeOM.L_InvalidSelectionForBindingType="Ezin da loturarik sortu uneko hautapenarekin eta zehaztutako lotura motarekin.";Strings.OfficeOM.L_InvalidBindingOperation="Lotura-eragiketa baliogabea";Strings.OfficeOM.L_CustomFunctionNameContainsBadChars="Funtzio-izenak hizkiak, digituak, azpimarrak eta puntuak baino ezin ditu izan.";Strings.OfficeOM.L_InvalidGrant="Baimena falta da.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Sareko arazo bat dela-eta, ezin izan da fitxategia eskuratu.";Strings.OfficeOM.L_SSOClientError="Errore bat gertatu da Office-ren autentifikazio-eskaeran.";Strings.OfficeOM.L_InternalError="Barne-errorea";Strings.OfficeOM.L_GetSelectionNotSupported="Ez da uneko hautapena onartzen.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Ez da onartzen erabiltzailearen identitate mota hori.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Zehaztutako hertsadura mota ez da lotura mota honekin bateragarria.";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Deitu closeAsync metodoari uneko fitxategian, beste fitxategi bat eskuratu aurretik.";Strings.OfficeOM.L_DialogAddressNotTrusted="URLaren domeinua ez dago manifestuaren AppDomains elementuan.";Strings.OfficeOM.L_InvalidAPICall="API dei baliogabea";Strings.OfficeOM.L_CustomXmlNodeNotFound="Ez da zehaztutako nodoa aurkitu.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Oharra: formatua ezartzeko APIaren bidez, gehienez, 100 formatu ezartzea gomendatzen da.";Strings.OfficeOM.L_InvalidColumnsForBinding="Zehaztutako zutabeak baliogabeak dira.";Strings.OfficeOM.L_InvalidCoercion="Hertsadura mota baliogabea";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Hautatutako edukiak taula-formatuan egon behar du. Formateatu datuak taula gisa eta saiatu berriro.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Egin hautapena.";Strings.OfficeOM.L_FormattingReminder="Formatuari buruzko abisua";Strings.OfficeOM.L_MissingRequiredArguments="derrigorrezko zenbait argumentu falta dira";Strings.OfficeOM.L_MemoryLimit="Memoriaren muga gainditu da";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Datuak ez daude eguneratuta. Eskuratu berriro objektua.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Saioak ez du balio edo iraungi egin da";Strings.OfficeOM.L_UserAbortedMessage="Erabiltzaileak ez ditu onartu osagarriaren baimenak.";Strings.OfficeOM.L_BindingToMultipleSelection="Ez dira ondoz ondokoak ez diren hautapenak onartzen.";Strings.OfficeOM.L_ValueNotLoaded='Emaitza-objektuaren balioa ez da oraindik kargatu. Balioaren propietatea irakurri aurretik, deitu "context.sync()" funtzioari erlazionatutako eskaeraren testuinguruan.';Strings.OfficeOM.L_InvalidBindingError="Lotura-errore baliogabea";Strings.OfficeOM.L_DialogInvalidScheme="URL eskema ez da onartzen. Erabili HTTPS.";Strings.OfficeOM.L_SSOConnectionLostError="A connection was lost during the sign in process.";Strings.OfficeOM.L_SetDataIsTooLarge="Zehaztutako datu-objektua handiegia da.";Strings.OfficeOM.L_UserAborted="Erabiltzaileak bertan behera utzi du baimen-eskaera.";Strings.OfficeOM.L_MissingParameter="Parametroa falta da";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="konfiguratu arakatzailea";Strings.OfficeOM.L_ApiNotFoundDetails="{0} metodoa edo propietatea {1} eskakizun multzoaren zati da, eta hura ez dago erabilgarri zuk darabilzun {2} bertsioan.";Strings.OfficeOM.L_CustomFunctionNameCannotSplit="Funtzio-izenak hutsik ez dauden izen-leku bat eta izen labur bat izan behar ditu.";Strings.OfficeOM.L_UnsupportedDataObject="Ez da adierazitako datu-objektu mota onartzen.";Strings.OfficeOM.L_InvalidNode="Nodo baliogabea";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Zehaztutako lotura mota ez da adierazitako izendatutako elementuarekin bateragarria.";Strings.OfficeOM.L_CustomFunctionImplementationMissing='Izen hori duen eta funtzioaren definizioak dituen Excel.CustomFunctions klaseko propietateak "call" (deitu) propietatea izan behar du funtzioa inplementatu ahal izateko.';Strings.OfficeOM.L_DataNotMatchSelection="Adierazitako datu-objektua ez da uneko hautapenaren formarekin edo neurriekin bateragarria.";Strings.OfficeOM.L_TooManyOptionalFunction="parametroen zerrendan aukerako funtzio anizkoitzak daude";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Osagarriak eskatu du jada sarbide-tokena.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Oharra: taulek, gehienez, 20.000 gelaxka izatea gomendatzen da.";Strings.OfficeOM.L_InvalidTableOptionValue="TableOptions parametroetako batek edo gehiagok baimendu gabeko balioak dituzte. Egiaztatu balioak eta saiatu berriro.";Strings.OfficeOM.L_TooManyOptionalObjects="parametroen zerrendan aukerako objektu anizkoitzak daude";Strings.OfficeOM.L_CoercionTypeNotSupported="Ez da zehaztutako hertsadura mota onartzen.";Strings.OfficeOM.L_SliceSizeNotSupported="Zehaztutako zatiaren tamaina ez da onartzen.";Strings.OfficeOM.L_APINotSupported="APIa ez da bateragarria";Strings.OfficeOM.L_InvalidFormatValue="Formatuaren parametroetako batek edo gehiagok baimendu gabeko balioak dituzte. Egiaztatu balioak eta saiatu berriro.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="Hautapena 1024 elementura mugatzen du XPath lengoaiak.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Lotura mota honetan ez da eragiketa hori onartzen.";Strings.OfficeOM.L_InvalidApiCallInContext="Ezin da egin APIaren deia testuinguru honetan.";Strings.OfficeOM.L_InvalidBinding="Lotura baliogabea";Strings.OfficeOM.L_TooManyIncompleteRequests="Itxaron aurreko deia osatzen den arte.";Strings.OfficeOM.L_SettingsAreStale="Ezin izan dira ezarpenak gorde unekoak ez direlako.";Strings.OfficeOM.L_UnsupportedEnumeration="Ez da zenbakitzea onartzen";Strings.OfficeOM.L_NotSupported="Ez da {0} funtzioa onartzen.";Strings.OfficeOM.L_DialogNavigateError="Elkarrizketa-koadroaren nabigazio-errorea";Strings.OfficeOM.L_InvalidOperationInCellEditMode="Gelaxkak editatzeko moduan dago Excel. Irten modu horretatik SARTU edo TAB sakatuta edo beste gelaxka bat hautatuta, eta saiatu berriro.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Baztertu";Strings.OfficeOM.L_SettingNameNotExist="Ez da zehaztutako ezarpenaren izena existitzen.";Strings.OfficeOM.L_OperationNotSupported="Ez da eragiketa onartzen.";Strings.OfficeOM.L_NotSupportedEventType="Ez da zehaztutako {0} gertaera mota onartzen.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Koordenatu-parametroak ezin dira hertsadura motaren taularekin erabili taulak konbinatutako gelaxkak dituenean.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty='Irakurtzeko soilik den "{0}" propietatea ezartzen saiatzen.';Strings.OfficeOM.L_DataReadError="Datu-irakurketaren errorea";Strings.OfficeOM.L_IndexOutOfRange="Indizea barrutitik kanpo dago.";Strings.OfficeOM.L_EventRegistrationError="Errorea gertaera erregistratzean";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} erabiltzaileak beste leiho bat bistaratu nahi du.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod='"{0}" propietatean egindako aldaketak ezin dira aplikatu "object.set" metodoaren bidez.';Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Koordenatu-parametroak ezin dira hertsadura motaren taularekin erabili taulak konbinatutako gelaxkak dituenean.";Strings.OfficeOM.L_FunctionCallFailed="{0} funtzioaren deiak huts egin du. Errore-kodea: {1}.";Strings.OfficeOM.L_PropertyDoesNotExist='"{0}" propietatea ez dago objektuan.';Strings.OfficeOM.L_BrowserAPINotSupported="Eskatutako APIa ez da arakatzailearekin bateragarria.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="Office Online saioa iraungi egin da edo ez du balio. Aurrera egiteko, freskatu orria.";Strings.OfficeOM.L_CustomFunctionDefinitionMissing="Funtzioaren definizioak dituen propietate bat izan behar duzu izen horrekin Excel.CustomFunctions klasean.";Strings.OfficeOM.L_ConnectionFailureWithDetails='Eskaerak huts egin du eta egoera-kode honekin erantzun du: "{0}" egoera-kodea, "{1}" errore-kodea eta "{2}" errore-mezua.';Strings.OfficeOM.L_UnknownBindingType="Ez da lotura mota onartzen.";Strings.OfficeOM.L_DocumentReadOnly="Uneko dokumentu moduan ez da eskatutako eragiketa baimentzen.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Uneko hautapena ez da zehaztutako hertsadura motarekin bateragarria.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Hautatzeko mugara iritsi zara";Strings.OfficeOM.L_APICallFailed="API deiak huts egin du";Strings.OfficeOM.L_RunMustReturnPromise='".run" metodora pasatutako sorta-funtzioak ez du promesik itzuli. Funtzioak promes bat itzuli behar du, automatikoki jarraitutako objektuak askatu ahal izan daitezen sortaren eragiketa amaitu ondoren. Normalean, "context.sync()" metodotik erantzun bat itzultzen da promesen erantzun gisa.';Strings.OfficeOM.L_DataNotMatchCoercionType="Zehaztutako datu-objektu mota ez da uneko hautapenarekin bateragarria.";Strings.OfficeOM.L_InvalidObjectPath='Objektuaren "{0}" bide-izenak ez du balio egin behar duzunerako. Objektua hainbat "context.sync" deitan erabiltzen ari bazara eta ".run" sortaren exekuzio sekuentzialetik kanpo, erabili "context.trackedObjects.add()" eta "context.trackedObjects.remove()" metodoak objektuaren iraupena kudeatzeko.';Strings.OfficeOM.L_SelectionCannotBound="Ezin zaio uneko hautapenari lotu.";Strings.OfficeOM.L_RedundantCallbackSpecification="Ezin da atzeradeia zehaztu ez argumentu-zerrendan ez aukerako objektuan.";Strings.OfficeOM.L_NotImplemented="{0} funtzioa ez dago inplementatuta.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage="Eragiketak huts egin du osagarri hau ez delako bateragarria kategoria honetako erabiltzailearen baimenarekin";Strings.OfficeOM.L_InvalidDataObject="Datu-objektu baliogabea";Strings.OfficeOM.L_ColIndexOutOfRange="Zutabe-indizearen balioa baimendutako barrutitik kanpo dago. Erabili zutabe kopurua baino txikiagoa den balio positiboa (0 edo handiagoa).";Strings.OfficeOM.L_ActivityLimitReached="Jardueren mugara iritsi zara.";Strings.OfficeOM.L_NotSupportedBindingType="Ez da zehaztutako {0} lotura mota onartzen.";Strings.OfficeOM.L_RequestTimeout="Denbora gehiegi behar izan da deia exekutatzeko.";Strings.OfficeOM.L_InvalidSetRows="Zehaztutako errenkadak baliogabeak dira.";Strings.OfficeOM.L_FormatValueOutOfRange="Balioa baimendutako barrutitik kanpo dago.";Strings.OfficeOM.L_SetDataParametersConflict="Zehaztutako parametroak gatazkan daude.";Strings.OfficeOM.L_DataNotMatchBindingSize="Adierazitako datu-objektua ez dator bat uneko hautapenaren tamainarekin.";Strings.OfficeOM.L_InvalidGrantMessage="Osagarri honen baimena falta da.";Strings.OfficeOM.L_SSOServerErrorMessage="Ustekabeko errore bat gertatu da zerbitzarian.";Strings.OfficeOM.L_DialogOK="Ados";Strings.OfficeOM.L_PropertyNotLoaded='"{0}" propietatea ez dago erabilgarri. Propietatearen balioa irakurri aurretik, deitu edukitze-objektuaren kargatze-metodoari eta deitu "context.sync()" metodoari erlazionatutako eskaera-testuinguruan.';Strings.OfficeOM.L_ShuttingDown="Eragiketak huts egin du zerbitzariko datuak unekoak ez direlako.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Zehaztutako RowCount edo ColumnCount balioak baliogabeak dira.";Strings.OfficeOM.L_OsfControlTypeNotSupported="Ez da OsfControl mota onartzen.";Strings.OfficeOM.L_OutOfRange="Barrutitik kanpo";Strings.OfficeOM.L_UserNotSignedIn="Ez dago Office-n saioa hasita duen erabiltzailerik.";Strings.OfficeOM.L_InValidOptionalArgument="aukerako argumentu baliogabea";Strings.OfficeOM.L_ElementMissing="Ezin izan zaio taulako gelaxkari formatua eman, parametro-balio batzuk falta direlako. Egiaztatu parametroak eta saiatu berriro.";Strings.OfficeOM.L_SaveSettingsError="Gordetzeko ezarpenen errorea";Strings.OfficeOM.L_InvalidGetColumns="Zehaztutako zutabeak baliogabeak dira.";Strings.OfficeOM.L_MultipleNamedItemFound="Izen bereko objektu anizkoitzak aurkitu dira.";Strings.OfficeOM.L_InvalidValue="Balio okerra";Strings.OfficeOM.L_InternalErrorDescription="Barne-errore bat gertatu da.";Strings.OfficeOM.L_InvalidGetRows="Zehaztutako errenkadak baliogabeak dira.";Strings.OfficeOM.L_OverwriteWorksheetData="Multzo-eragiketak huts egin du adierazitako datu-objektuak datuak gainidatzi edo lekualdatuko baititu.";Strings.OfficeOM.L_HostError="Ostalariaren errorea";Strings.OfficeOM.L_UnsupportedUserIdentity="Ez da onartzen erabiltzailearen identitate mota hori.";Strings.OfficeOM.L_SpecifiedIdNotExist="Zehaztutako IDa ez dago.";Strings.OfficeOM.L_CallbackNotAFunction="Atzeradeiak funtzio motakoa izan behar du; {0} motakoa da.";Strings.OfficeOM.L_EventHandlerRemovalFailed="Ezin izan da gertaera-maneiatzailea kendu.";Strings.OfficeOM.L_InvalidArgument='"{0}" argumentuak ez da baliozkoa egoera honetan, ez dago, edo ez dago formatu zuzenean.';Strings.OfficeOM.L_CannotRegisterEvent="Ezin da erregistratu gertaera-maneatzailea.";Strings.OfficeOM.L_ReadSettingsError="Irakurketa-ezarpenen errorea";Strings.OfficeOM.L_Timeout="Eragiketaren denbora-muga gainditu da.";Strings.OfficeOM.L_BindingCreationError="Errorea lotura sortzean";Strings.OfficeOM.L_EventHandlerNotExist="Ez da lotura honen gertaera-maneiatzailea aurkitu.";Strings.OfficeOM.L_BindingNotExist="Zehaztutako lotura ez dago.";Strings.OfficeOM.L_UserClickIgnore="Erabiltzaileak ez ikusi egin dio elkarrizketa-koadroari.";Strings.OfficeOM.L_CannotWriteToSelection="Ezin da uneko hautapenean idatzi.";Strings.OfficeOM.L_InvalidParameters="{0} funtzioak parametro baliogabeak ditu.";Strings.OfficeOM.L_InitializeNotReady="Office.js oraindik ez da erabat kargatu. Saiatu berriro geroago edo ziurtatu hasieratze-kodea Office.initialize funtzioan gehitu duzula.";Strings.OfficeOM.L_RequestTokenUnavailable="APIa mugatu da deien maiztasuna txikitzeko.";Strings.OfficeOM.L_GetDataParametersConflict="Zehaztutako parametroak gatazkan daude.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Eragiketak huts egin du osagarriak dagoeneko eskatu duelako sarbide-tokena." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/eu-es/outlook_strings.debug.js b/node_modules/@microsoft/office-js/dist/eu-es/outlook_strings.debug.js index 31c38ea..a6a929b 100644 --- a/node_modules/@microsoft/office-js/dist/eu-es/outlook_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/eu-es/outlook_strings.debug.js @@ -1,34 +1,35 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("_u"); _u.ExtensibilityStrings = function() { }; _u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings"); +_u.ExtensibilityStrings.l_InvalidDate_Text = "Sarrera ez da baliozko datan ebazten."; _u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Eskaerak 1 MB-ko gehienezko tamaina gainditzen du. Aldatu EWS eskaera."; -_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "Erabiltzaileak kurtsorearen posizioa aldatu du datuak txertatzen ziren bitartean."; -_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Adierazitako helbide elektronikoetako bat edo gehiago luzeegiak dira."; -_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Adierazitako bistaratzeko izenetako bat edo gehiago luzeegiak dira."; -_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "Eranskinaren IDa baliogabea da."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Goi-mailako baimena behar da Office-rako JavaScript APIaren babestutako kideak atzitzeko."; +_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Ez da baliozko hartzailerik adierazi."; +_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "Eranskinaren bide-izena baliogabea da."; _u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Ezin da eranskinik gehitu mezuak jada gehienezko eranskin kopurua baitu"; -_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "Erabiltzaileak kargatzea osatu aurretik kendu du eranskina."; -_u.ExtensibilityStrings.l_InternalFormatError_Text = "Barruko formatu-errore bat izan da."; _u.ExtensibilityStrings.l_InvalidEventDates_Text = "Amaiera-data hasiera-data baino lehenagokoa da."; -_u.ExtensibilityStrings.l_InvalidDate_Text = "Sarrera ez da baliozko datan ebazten."; +_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Ezin da eranskina gehitu handiegia delako."; _u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Eranskina ezin zaio elementuari gehitu."; -_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Ezin da eranskina ezabatu ezin delako eranskinaren aurkibidearekiko eranskina aurkitu."; +_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Adierazitako helbide elektronikoetako bat edo gehiago luzeegiak dira."; +_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "Aldatu egin da hautatutako elementua."; +_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "Erabiltzaileak kurtsorearen posizioa aldatu du datuak txertatzen ziren bitartean."; +_u.ExtensibilityStrings.l_InternalFormatError_Text = "Barruko formatu-errore bat izan da."; +_u.ExtensibilityStrings.l_InvalidEndTime_Text = "Amaiera-orduak ezin du hasiera-ordua baino lehenagokoa izan."; +_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Eremuko hartzaile kopuruak, guztira, ezin du {0} gainditu."; _u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Eranskinaren errorea"; +_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "HTML immunizazioak huts egin du."; +_u.ExtensibilityStrings.l_OffsetNotfound_Text = "Ez da denbora-zigilu honetarako desplazamendurik aurkitu."; +_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = 'Goi-mailako baimena behar da metodoari deitzeko: "{0}".'; +_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Ezin dira eranskinak gehitu erantzun osoa edo birbidaltzea zerbitzaritik berreskuratzen den bitartean."; +_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Ezin da eranskina ezabatu ezin delako eranskinaren aurkibidearekiko eranskina aurkitu."; +_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Adierazitako bistaratzeko izenetako bat edo gehiago luzeegiak dira."; +_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "Erabiltzaileak kargatzea osatu aurretik kendu du eranskina."; +_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Emandako parametroak ez datoz bat espero zen formatuarekin."; +_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "Eranskinaren IDa baliogabea da."; _u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Datu-idazketaren errorea"; _u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Ezin da eranskina elementutik ezabatu."; -_u.ExtensibilityStrings.l_InvalidEndTime_Text = "Amaiera-orduak ezin du hasiera-ordua baino lehenagokoa izan."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = 'Goi-mailako baimena behar da metodoari deitzeko: "{0}".'; _u.ExtensibilityStrings.l_InternalProtocolError_Text = 'Barneko protokolo-errorea: "{0}".'; -_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "HTML immunizazioak huts egin du."; -_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Eremuko hartzaile kopuruak, guztira, ezin du {0} gainditu."; -_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Emandako parametroak ez datoz bat espero zen formatuarekin."; -_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Ezin dira eranskinak gehitu erantzun osoa edo birbidaltzea zerbitzaritik berreskuratzen den bitartean."; -_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "Eranskinaren bide-izena baliogabea da."; -_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "Aldatu egin da hautatutako elementua."; -_u.ExtensibilityStrings.l_OffsetNotfound_Text = "Ez da denbora-zigilu honetarako desplazamendurik aurkitu."; -_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Ez da baliozko hartzailerik adierazi."; -_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Ezin da eranskina gehitu handiegia delako." +_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Goi-mailako baimena behar da Office-rako JavaScript APIaren babestutako kideak atzitzeko." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/eu-es/outlook_strings.js b/node_modules/@microsoft/office-js/dist/eu-es/outlook_strings.js index a86db23..eb793f3 100644 --- a/node_modules/@microsoft/office-js/dist/eu-es/outlook_strings.js +++ b/node_modules/@microsoft/office-js/dist/eu-es/outlook_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Eskaerak 1 MB-ko gehienezko tamaina gainditzen du. Aldatu EWS eskaera.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="Erabiltzaileak kurtsorearen posizioa aldatu du datuak txertatzen ziren bitartean.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Adierazitako helbide elektronikoetako bat edo gehiago luzeegiak dira.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Adierazitako bistaratzeko izenetako bat edo gehiago luzeegiak dira.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="Eranskinaren IDa baliogabea da.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Goi-mailako baimena behar da Office-rako JavaScript APIaren babestutako kideak atzitzeko.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Ezin da eranskinik gehitu mezuak jada gehienezko eranskin kopurua baitu";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="Erabiltzaileak kargatzea osatu aurretik kendu du eranskina.";_u.ExtensibilityStrings.l_InternalFormatError_Text="Barruko formatu-errore bat izan da.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="Amaiera-data hasiera-data baino lehenagokoa da.";_u.ExtensibilityStrings.l_InvalidDate_Text="Sarrera ez da baliozko datan ebazten.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Eranskina ezin zaio elementuari gehitu.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Ezin da eranskina ezabatu ezin delako eranskinaren aurkibidearekiko eranskina aurkitu.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Eranskinaren errorea";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Datu-idazketaren errorea";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Ezin da eranskina elementutik ezabatu.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="Amaiera-orduak ezin du hasiera-ordua baino lehenagokoa izan.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text='Goi-mailako baimena behar da metodoari deitzeko: "{0}".';_u.ExtensibilityStrings.l_InternalProtocolError_Text='Barneko protokolo-errorea: "{0}".';_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="HTML immunizazioak huts egin du.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Eremuko hartzaile kopuruak, guztira, ezin du {0} gainditu.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Emandako parametroak ez datoz bat espero zen formatuarekin.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Ezin dira eranskinak gehitu erantzun osoa edo birbidaltzea zerbitzaritik berreskuratzen den bitartean.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="Eranskinaren bide-izena baliogabea da.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Aldatu egin da hautatutako elementua.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Ez da denbora-zigilu honetarako desplazamendurik aurkitu.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Ez da baliozko hartzailerik adierazi.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Ezin da eranskina gehitu handiegia delako." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_InvalidDate_Text="Sarrera ez da baliozko datan ebazten.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Eskaerak 1 MB-ko gehienezko tamaina gainditzen du. Aldatu EWS eskaera.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Ez da baliozko hartzailerik adierazi.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="Eranskinaren bide-izena baliogabea da.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Ezin da eranskinik gehitu mezuak jada gehienezko eranskin kopurua baitu";_u.ExtensibilityStrings.l_InvalidEventDates_Text="Amaiera-data hasiera-data baino lehenagokoa da.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Ezin da eranskina gehitu handiegia delako.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Eranskina ezin zaio elementuari gehitu.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Adierazitako helbide elektronikoetako bat edo gehiago luzeegiak dira.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Aldatu egin da hautatutako elementua.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="Erabiltzaileak kurtsorearen posizioa aldatu du datuak txertatzen ziren bitartean.";_u.ExtensibilityStrings.l_InternalFormatError_Text="Barruko formatu-errore bat izan da.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="Amaiera-orduak ezin du hasiera-ordua baino lehenagokoa izan.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Eremuko hartzaile kopuruak, guztira, ezin du {0} gainditu.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Eranskinaren errorea";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="HTML immunizazioak huts egin du.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Ez da denbora-zigilu honetarako desplazamendurik aurkitu.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text='Goi-mailako baimena behar da metodoari deitzeko: "{0}".';_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Ezin dira eranskinak gehitu erantzun osoa edo birbidaltzea zerbitzaritik berreskuratzen den bitartean.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Ezin da eranskina ezabatu ezin delako eranskinaren aurkibidearekiko eranskina aurkitu.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Adierazitako bistaratzeko izenetako bat edo gehiago luzeegiak dira.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="Erabiltzaileak kargatzea osatu aurretik kendu du eranskina.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Emandako parametroak ez datoz bat espero zen formatuarekin.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="Eranskinaren IDa baliogabea da.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Datu-idazketaren errorea";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Ezin da eranskina elementutik ezabatu.";_u.ExtensibilityStrings.l_InternalProtocolError_Text='Barneko protokolo-errorea: "{0}".';_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Goi-mailako baimena behar da Office-rako JavaScript APIaren babestutako kideak atzitzeko." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/excel-android-16.00.debug.js b/node_modules/@microsoft/office-js/dist/excel-android-16.00.debug.js new file mode 100644 index 0000000..864b8fb --- /dev/null +++ b/node_modules/@microsoft/office-js/dist/excel-android-16.00.debug.js @@ -0,0 +1,32393 @@ +/* Excel Android-specific API library */ +/* Version: 16.0.8803.3000 */ + +/* Office.js Version: 16.0.8616.1000 */ +/* + Copyright (c) Microsoft Corporation. All rights reserved. +*/ + +/* + Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419. +*/ + +/* +* @overview es6-promise - a tiny implementation of Promises/A+. +* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) +* @license Licensed under MIT license +* See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE +* @version 2.3.0 +*/ + +var __extends=(this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p]=b[p]; + function __() { this.constructor=d; } + d.prototype=b===null ? Object.create(b) : (__.prototype=b.prototype, new __()); +}; +var OfficeExt; +(function (OfficeExt) { + var MicrosoftAjaxFactory=(function () { + function MicrosoftAjaxFactory() { + } + MicrosoftAjaxFactory.prototype.isMsAjaxLoaded=function () { + if (typeof (Sys) !=='undefined' && typeof (Type) !=='undefined' && + Sys.StringBuilder && typeof (Sys.StringBuilder)==="function" && + Type.registerNamespace && typeof (Type.registerNamespace)==="function" && + Type.registerClass && typeof (Type.registerClass)==="function" && + typeof (Function._validateParams)==="function" && + Sys.Serialization && Sys.Serialization.JavaScriptSerializer && typeof (Sys.Serialization.JavaScriptSerializer.serialize)==="function") { + return true; + } + else { + return false; + } + }; + MicrosoftAjaxFactory.prototype.loadMsAjaxFull=function (callback) { + var msAjaxCDNPath=(window.location.protocol.toLowerCase()==='https:' ? 'https:' : 'http:')+'//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js'; + OSF.OUtil.loadScript(msAjaxCDNPath, callback); + }; + Object.defineProperty(MicrosoftAjaxFactory.prototype, "msAjaxError", { + get: function () { + if (this._msAjaxError==null && this.isMsAjaxLoaded()) { + this._msAjaxError=Error; + } + return this._msAjaxError; + }, + set: function (errorClass) { + this._msAjaxError=errorClass; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MicrosoftAjaxFactory.prototype, "msAjaxString", { + get: function () { + if (this._msAjaxString==null && this.isMsAjaxLoaded()) { + this._msAjaxString=String; + } + return this._msAjaxString; + }, + set: function (stringClass) { + this._msAjaxString=stringClass; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MicrosoftAjaxFactory.prototype, "msAjaxDebug", { + get: function () { + if (this._msAjaxDebug==null && this.isMsAjaxLoaded()) { + this._msAjaxDebug=Sys.Debug; + } + return this._msAjaxDebug; + }, + set: function (debugClass) { + this._msAjaxDebug=debugClass; + }, + enumerable: true, + configurable: true + }); + return MicrosoftAjaxFactory; + })(); + OfficeExt.MicrosoftAjaxFactory=MicrosoftAjaxFactory; +})(OfficeExt || (OfficeExt={})); +var OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory(); +var OSF=OSF || {}; +var OfficeExt; +(function (OfficeExt) { + var SafeStorage=(function () { + function SafeStorage(_internalStorage) { + this._internalStorage=_internalStorage; + } + SafeStorage.prototype.getItem=function (key) { + try { + return this._internalStorage && this._internalStorage.getItem(key); + } + catch (e) { + return null; + } + }; + SafeStorage.prototype.setItem=function (key, data) { + try { + this._internalStorage && this._internalStorage.setItem(key, data); + } + catch (e) { + } + }; + SafeStorage.prototype.clear=function () { + try { + this._internalStorage && this._internalStorage.clear(); + } + catch (e) { + } + }; + SafeStorage.prototype.removeItem=function (key) { + try { + this._internalStorage && this._internalStorage.removeItem(key); + } + catch (e) { + } + }; + SafeStorage.prototype.getKeysWithPrefix=function (keyPrefix) { + var keyList=[]; + try { + var len=this._internalStorage && this._internalStorage.length || 0; + for (var i=0; i < len; i++) { + var key=this._internalStorage.key(i); + if (key.indexOf(keyPrefix)===0) { + keyList.push(key); + } + } + } + catch (e) { + } + return keyList; + }; + return SafeStorage; + })(); + OfficeExt.SafeStorage=SafeStorage; +})(OfficeExt || (OfficeExt={})); +OSF.XdmFieldName={ + ConversationUrl: "ConversationUrl", + AppId: "AppId" +}; +OSF.WindowNameItemKeys={ + BaseFrameName: "baseFrameName", + HostInfo: "hostInfo", + XdmInfo: "xdmInfo", + SerializerVersion: "serializerVersion", + AppContext: "appContext" +}; +OSF.OUtil=(function () { + var _uniqueId=-1; + var _xdmInfoKey='&_xdm_Info='; + var _serializerVersionKey='&_serializer_version='; + var _xdmSessionKeyPrefix='_xdm_'; + var _serializerVersionKeyPrefix='_serializer_version='; + var _fragmentSeparator='#'; + var _fragmentInfoDelimiter='&'; + var _classN="class"; + var _loadedScripts={}; + var _defaultScriptLoadingTimeout=30000; + var _safeSessionStorage=null; + var _safeLocalStorage=null; + var _rndentropy=new Date().getTime(); + function _random() { + var nextrand=0x7fffffff * (Math.random()); + nextrand ^=_rndentropy ^ ((new Date().getMilliseconds()) << Math.floor(Math.random() * (31 - 10))); + return nextrand.toString(16); + } + ; + function _getSessionStorage() { + if (!_safeSessionStorage) { + try { + var sessionStorage=window.sessionStorage; + } + catch (ex) { + sessionStorage=null; + } + _safeSessionStorage=new OfficeExt.SafeStorage(sessionStorage); + } + return _safeSessionStorage; + } + ; + function _reOrderTabbableElements(elements) { + var bucket0=[]; + var bucketPositive=[]; + var i; + var len=elements.length; + var ele; + for (i=0; i < len; i++) { + ele=elements[i]; + if (ele.tabIndex) { + if (ele.tabIndex > 0) { + bucketPositive.push(ele); + } + else if (ele.tabIndex===0) { + bucket0.push(ele); + } + } + else { + bucket0.push(ele); + } + } + bucketPositive=bucketPositive.sort(function (left, right) { + var diff=left.tabIndex - right.tabIndex; + if (diff===0) { + diff=bucketPositive.indexOf(left) - bucketPositive.indexOf(right); + } + return diff; + }); + return [].concat(bucketPositive, bucket0); + } + ; + return { + set_entropy: function OSF_OUtil$set_entropy(entropy) { + if (typeof entropy=="string") { + for (var i=0; i < entropy.length; i+=4) { + var temp=0; + for (var j=0; j < 4 && i+j < entropy.length; j++) { + temp=(temp << 8)+entropy.charCodeAt(i+j); + } + _rndentropy ^=temp; + } + } + else if (typeof entropy=="number") { + _rndentropy ^=entropy; + } + else { + _rndentropy ^=0x7fffffff * Math.random(); + } + _rndentropy &=0x7fffffff; + }, + extend: function OSF_OUtil$extend(child, parent) { + var F=function () { }; + F.prototype=parent.prototype; + child.prototype=new F(); + child.prototype.constructor=child; + child.uber=parent.prototype; + if (parent.prototype.constructor===Object.prototype.constructor) { + parent.prototype.constructor=parent; + } + }, + setNamespace: function OSF_OUtil$setNamespace(name, parent) { + if (parent && name && !parent[name]) { + parent[name]={}; + } + }, + unsetNamespace: function OSF_OUtil$unsetNamespace(name, parent) { + if (parent && name && parent[name]) { + delete parent[name]; + } + }, + loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) { + if (url && callback) { + var doc=window.document; + var _loadedScriptEntry=_loadedScripts[url]; + if (!_loadedScriptEntry) { + var script=doc.createElement("script"); + script.type="text/javascript"; + _loadedScriptEntry={ loaded: false, pendingCallbacks: [callback], timer: null }; + _loadedScripts[url]=_loadedScriptEntry; + var onLoadCallback=function OSF_OUtil_loadScript$onLoadCallback() { + if (_loadedScriptEntry.timer !=null) { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer; + } + _loadedScriptEntry.loaded=true; + var pendingCallbackCount=_loadedScriptEntry.pendingCallbacks.length; + for (var i=0; i < pendingCallbackCount; i++) { + var currentCallback=_loadedScriptEntry.pendingCallbacks.shift(); + currentCallback(); + } + }; + var onLoadError=function OSF_OUtil_loadScript$onLoadError() { + delete _loadedScripts[url]; + if (_loadedScriptEntry.timer !=null) { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer; + } + var pendingCallbackCount=_loadedScriptEntry.pendingCallbacks.length; + for (var i=0; i < pendingCallbackCount; i++) { + var currentCallback=_loadedScriptEntry.pendingCallbacks.shift(); + currentCallback(); + } + }; + if (script.readyState) { + script.onreadystatechange=function () { + if (script.readyState=="loaded" || script.readyState=="complete") { + script.onreadystatechange=null; + onLoadCallback(); + } + }; + } + else { + script.onload=onLoadCallback; + } + script.onerror=onLoadError; + timeoutInMs=timeoutInMs || _defaultScriptLoadingTimeout; + _loadedScriptEntry.timer=setTimeout(onLoadError, timeoutInMs); + script.setAttribute("crossOrigin", "anonymous"); + script.src=url; + doc.getElementsByTagName("head")[0].appendChild(script); + } + else if (_loadedScriptEntry.loaded) { + callback(); + } + else { + _loadedScriptEntry.pendingCallbacks.push(callback); + } + } + }, + loadCSS: function OSF_OUtil$loadCSS(url) { + if (url) { + var doc=window.document; + var link=doc.createElement("link"); + link.type="text/css"; + link.rel="stylesheet"; + link.href=url; + doc.getElementsByTagName("head")[0].appendChild(link); + } + }, + parseEnum: function OSF_OUtil$parseEnum(str, enumObject) { + var parsed=enumObject[str.trim()]; + if (typeof (parsed)=='undefined') { + OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:"+str); + throw OsfMsAjaxFactory.msAjaxError.argument("str"); + } + return parsed; + }, + delayExecutionAndCache: function OSF_OUtil$delayExecutionAndCache() { + var obj={ calc: arguments[0] }; + return function () { + if (obj.calc) { + obj.val=obj.calc.apply(this, arguments); + delete obj.calc; + } + return obj.val; + }; + }, + getUniqueId: function OSF_OUtil$getUniqueId() { + _uniqueId=_uniqueId+1; + return _uniqueId.toString(); + }, + formatString: function OSF_OUtil$formatString() { + var args=arguments; + var source=args[0]; + return source.replace(/{(\d+)}/gm, function (match, number) { + var index=parseInt(number, 10)+1; + return args[index]===undefined ? '{'+number+'}' : args[index]; + }); + }, + generateConversationId: function OSF_OUtil$generateConversationId() { + return [_random(), _random(), (new Date()).getTime().toString()].join('_'); + }, + getFrameName: function OSF_OUtil$getFrameName(cacheKey) { + return _xdmSessionKeyPrefix+cacheKey+this.generateConversationId(); + }, + addXdmInfoAsHash: function OSF_OUtil$addXdmInfoAsHash(url, xdmInfoValue) { + return OSF.OUtil.addInfoAsHash(url, _xdmInfoKey, xdmInfoValue, false); + }, + addSerializerVersionAsHash: function OSF_OUtil$addSerializerVersionAsHash(url, serializerVersion) { + return OSF.OUtil.addInfoAsHash(url, _serializerVersionKey, serializerVersion, true); + }, + addInfoAsHash: function OSF_OUtil$addInfoAsHash(url, keyName, infoValue, encodeInfo) { + url=url.trim() || ''; + var urlParts=url.split(_fragmentSeparator); + var urlWithoutFragment=urlParts.shift(); + var fragment=urlParts.join(_fragmentSeparator); + var newFragment; + if (encodeInfo) { + newFragment=[keyName, encodeURIComponent(infoValue), fragment].join(''); + } + else { + newFragment=[fragment, keyName, infoValue].join(''); + } + return [urlWithoutFragment, _fragmentSeparator, newFragment].join(''); + }, + parseHostInfoFromWindowName: function OSF_OUtil$parseHostInfoFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.HostInfo); + }, + parseXdmInfo: function OSF_OUtil$parseXdmInfo(skipSessionStorage) { + var xdmInfoValue=OSF.OUtil.parseXdmInfoWithGivenFragment(skipSessionStorage, window.location.hash); + if (!xdmInfoValue) { + xdmInfoValue=OSF.OUtil.parseXdmInfoFromWindowName(skipSessionStorage, window.name); + } + return xdmInfoValue; + }, + parseXdmInfoFromWindowName: function OSF_OUtil$parseXdmInfoFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.XdmInfo); + }, + parseXdmInfoWithGivenFragment: function OSF_OUtil$parseXdmInfoWithGivenFragment(skipSessionStorage, fragment) { + return OSF.OUtil.parseInfoWithGivenFragment(_xdmInfoKey, _xdmSessionKeyPrefix, false, skipSessionStorage, fragment); + }, + parseSerializerVersion: function OSF_OUtil$parseSerializerVersion(skipSessionStorage) { + var serializerVersion=OSF.OUtil.parseSerializerVersionWithGivenFragment(skipSessionStorage, window.location.hash); + if (isNaN(serializerVersion)) { + serializerVersion=OSF.OUtil.parseSerializerVersionFromWindowName(skipSessionStorage, window.name); + } + return serializerVersion; + }, + parseSerializerVersionFromWindowName: function OSF_OUtil$parseSerializerVersionFromWindowName(skipSessionStorage, windowName) { + return parseInt(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.SerializerVersion)); + }, + parseSerializerVersionWithGivenFragment: function OSF_OUtil$parseSerializerVersionWithGivenFragment(skipSessionStorage, fragment) { + return parseInt(OSF.OUtil.parseInfoWithGivenFragment(_serializerVersionKey, _serializerVersionKeyPrefix, true, skipSessionStorage, fragment)); + }, + parseInfoFromWindowName: function OSF_OUtil$parseInfoFromWindowName(skipSessionStorage, windowName, infoKey) { + try { + var windowNameObj=JSON.parse(windowName); + var infoValue=windowNameObj !=null ? windowNameObj[infoKey] : null; + var osfSessionStorage=_getSessionStorage(); + if (!skipSessionStorage && osfSessionStorage && windowNameObj !=null) { + var sessionKey=windowNameObj[OSF.WindowNameItemKeys.BaseFrameName]+infoKey; + if (infoValue) { + osfSessionStorage.setItem(sessionKey, infoValue); + } + else { + infoValue=osfSessionStorage.getItem(sessionKey); + } + } + return infoValue; + } + catch (Exception) { + return null; + } + }, + parseInfoWithGivenFragment: function OSF_OUtil$parseInfoWithGivenFragment(infoKey, infoKeyPrefix, decodeInfo, skipSessionStorage, fragment) { + var fragmentParts=fragment.split(infoKey); + var infoValue=fragmentParts.length > 1 ? fragmentParts[fragmentParts.length - 1] : null; + if (decodeInfo && infoValue !=null) { + if (infoValue.indexOf(_fragmentInfoDelimiter) >=0) { + infoValue=infoValue.split(_fragmentInfoDelimiter)[0]; + } + infoValue=decodeURIComponent(infoValue); + } + var osfSessionStorage=_getSessionStorage(); + if (!skipSessionStorage && osfSessionStorage) { + var sessionKeyStart=window.name.indexOf(infoKeyPrefix); + if (sessionKeyStart > -1) { + var sessionKeyEnd=window.name.indexOf(";", sessionKeyStart); + if (sessionKeyEnd==-1) { + sessionKeyEnd=window.name.length; + } + var sessionKey=window.name.substring(sessionKeyStart, sessionKeyEnd); + if (infoValue) { + osfSessionStorage.setItem(sessionKey, infoValue); + } + else { + infoValue=osfSessionStorage.getItem(sessionKey); + } + } + } + return infoValue; + }, + getConversationId: function OSF_OUtil$getConversationId() { + var searchString=window.location.search; + var conversationId=null; + if (searchString) { + var index=searchString.indexOf("&"); + conversationId=index > 0 ? searchString.substring(1, index) : searchString.substr(1); + if (conversationId && conversationId.charAt(conversationId.length - 1)==='=') { + conversationId=conversationId.substring(0, conversationId.length - 1); + if (conversationId) { + conversationId=decodeURIComponent(conversationId); + } + } + } + return conversationId; + }, + getInfoItems: function OSF_OUtil$getInfoItems(strInfo) { + var items=strInfo.split("$"); + if (typeof items[1]=="undefined") { + items=strInfo.split("|"); + } + if (typeof items[1]=="undefined") { + items=strInfo.split("%7C"); + } + return items; + }, + getXdmFieldValue: function OSF_OUtil$getXdmFieldValue(xdmFieldName, skipSessionStorage) { + var fieldValue=''; + var xdmInfoValue=OSF.OUtil.parseXdmInfo(skipSessionStorage); + if (xdmInfoValue) { + var items=OSF.OUtil.getInfoItems(xdmInfoValue); + if (items !=undefined && items.length >=3) { + switch (xdmFieldName) { + case OSF.XdmFieldName.ConversationUrl: + fieldValue=items[2]; + break; + case OSF.XdmFieldName.AppId: + fieldValue=items[1]; + break; + } + } + } + return fieldValue; + }, + validateParamObject: function OSF_OUtil$validateParamObject(params, expectedProperties, callback) { + var e=Function._validateParams(arguments, [{ name: "params", type: Object, mayBeNull: false }, + { name: "expectedProperties", type: Object, mayBeNull: false }, + { name: "callback", type: Function, mayBeNull: true } + ]); + if (e) + throw e; + for (var p in expectedProperties) { + e=Function._validateParameter(params[p], expectedProperties[p], p); + if (e) + throw e; + } + }, + writeProfilerMark: function OSF_OUtil$writeProfilerMark(text) { + if (window.msWriteProfilerMark) { + window.msWriteProfilerMark(text); + OsfMsAjaxFactory.msAjaxDebug.trace(text); + } + }, + outputDebug: function OSF_OUtil$outputDebug(text) { + if (typeof (OsfMsAjaxFactory) !=='undefined' && OsfMsAjaxFactory.msAjaxDebug && OsfMsAjaxFactory.msAjaxDebug.trace) { + OsfMsAjaxFactory.msAjaxDebug.trace(text); + } + }, + defineNondefaultProperty: function OSF_OUtil$defineNondefaultProperty(obj, prop, descriptor, attributes) { + descriptor=descriptor || {}; + for (var nd in attributes) { + var attribute=attributes[nd]; + if (descriptor[attribute]==undefined) { + descriptor[attribute]=true; + } + } + Object.defineProperty(obj, prop, descriptor); + return obj; + }, + defineNondefaultProperties: function OSF_OUtil$defineNondefaultProperties(obj, descriptors, attributes) { + descriptors=descriptors || {}; + for (var prop in descriptors) { + OSF.OUtil.defineNondefaultProperty(obj, prop, descriptors[prop], attributes); + } + return obj; + }, + defineEnumerableProperty: function OSF_OUtil$defineEnumerableProperty(obj, prop, descriptor) { + return OSF.OUtil.defineNondefaultProperty(obj, prop, descriptor, ["enumerable"]); + }, + defineEnumerableProperties: function OSF_OUtil$defineEnumerableProperties(obj, descriptors) { + return OSF.OUtil.defineNondefaultProperties(obj, descriptors, ["enumerable"]); + }, + defineMutableProperty: function OSF_OUtil$defineMutableProperty(obj, prop, descriptor) { + return OSF.OUtil.defineNondefaultProperty(obj, prop, descriptor, ["writable", "enumerable", "configurable"]); + }, + defineMutableProperties: function OSF_OUtil$defineMutableProperties(obj, descriptors) { + return OSF.OUtil.defineNondefaultProperties(obj, descriptors, ["writable", "enumerable", "configurable"]); + }, + finalizeProperties: function OSF_OUtil$finalizeProperties(obj, descriptor) { + descriptor=descriptor || {}; + var props=Object.getOwnPropertyNames(obj); + var propsLength=props.length; + for (var i=0; i < propsLength; i++) { + var prop=props[i]; + var desc=Object.getOwnPropertyDescriptor(obj, prop); + if (!desc.get && !desc.set) { + desc.writable=descriptor.writable || false; + } + desc.configurable=descriptor.configurable || false; + desc.enumerable=descriptor.enumerable || true; + Object.defineProperty(obj, prop, desc); + } + return obj; + }, + mapList: function OSF_OUtil$MapList(list, mapFunction) { + var ret=[]; + if (list) { + for (var item in list) { + ret.push(mapFunction(list[item])); + } + } + return ret; + }, + listContainsKey: function OSF_OUtil$listContainsKey(list, key) { + for (var item in list) { + if (key==item) { + return true; + } + } + return false; + }, + listContainsValue: function OSF_OUtil$listContainsElement(list, value) { + for (var item in list) { + if (value==list[item]) { + return true; + } + } + return false; + }, + augmentList: function OSF_OUtil$augmentList(list, addenda) { + var add=list.push ? function (key, value) { list.push(value); } : function (key, value) { list[key]=value; }; + for (var key in addenda) { + add(key, addenda[key]); + } + }, + redefineList: function OSF_Outil$redefineList(oldList, newList) { + for (var key1 in oldList) { + delete oldList[key1]; + } + for (var key2 in newList) { + oldList[key2]=newList[key2]; + } + }, + isArray: function OSF_OUtil$isArray(obj) { + return Object.prototype.toString.apply(obj)==="[object Array]"; + }, + isFunction: function OSF_OUtil$isFunction(obj) { + return Object.prototype.toString.apply(obj)==="[object Function]"; + }, + isDate: function OSF_OUtil$isDate(obj) { + return Object.prototype.toString.apply(obj)==="[object Date]"; + }, + addEventListener: function OSF_OUtil$addEventListener(element, eventName, listener) { + if (element.addEventListener) { + element.addEventListener(eventName, listener, false); + } + else if ((Sys.Browser.agent===Sys.Browser.InternetExplorer) && element.attachEvent) { + element.attachEvent("on"+eventName, listener); + } + else { + element["on"+eventName]=listener; + } + }, + removeEventListener: function OSF_OUtil$removeEventListener(element, eventName, listener) { + if (element.removeEventListener) { + element.removeEventListener(eventName, listener, false); + } + else if ((Sys.Browser.agent===Sys.Browser.InternetExplorer) && element.detachEvent) { + element.detachEvent("on"+eventName, listener); + } + else { + element["on"+eventName]=null; + } + }, + getCookieValue: function OSF_OUtil$getCookieValue(cookieName) { + var tmpCookieString=RegExp(cookieName+"[^;]+").exec(document.cookie); + return tmpCookieString.toString().replace(/^[^=]+./, ""); + }, + xhrGet: function OSF_OUtil$xhrGet(url, onSuccess, onError) { + var xmlhttp; + try { + xmlhttp=new XMLHttpRequest(); + xmlhttp.onreadystatechange=function () { + if (xmlhttp.readyState==4) { + if (xmlhttp.status==200) { + onSuccess(xmlhttp.responseText); + } + else { + onError(xmlhttp.status); + } + } + }; + xmlhttp.open("GET", url, true); + xmlhttp.send(); + } + catch (ex) { + onError(ex); + } + }, + xhrGetFull: function OSF_OUtil$xhrGetFull(url, oneDriveFileName, onSuccess, onError) { + var xmlhttp; + var requestedFileName=oneDriveFileName; + try { + xmlhttp=new XMLHttpRequest(); + xmlhttp.onreadystatechange=function () { + if (xmlhttp.readyState==4) { + if (xmlhttp.status==200) { + onSuccess(xmlhttp, requestedFileName); + } + else { + onError(xmlhttp.status); + } + } + }; + xmlhttp.open("GET", url, true); + xmlhttp.send(); + } + catch (ex) { + onError(ex); + } + }, + encodeBase64: function OSF_Outil$encodeBase64(input) { + if (!input) + return input; + var codex="ABCDEFGHIJKLMNOP"+"QRSTUVWXYZabcdef"+"ghijklmnopqrstuv"+"wxyz0123456789+/="; + var output=[]; + var temp=[]; + var index=0; + var c1, c2, c3, a, b, c; + var i; + var length=input.length; + do { + c1=input.charCodeAt(index++); + c2=input.charCodeAt(index++); + c3=input.charCodeAt(index++); + i=0; + a=c1 & 255; + b=c1 >> 8; + c=c2 & 255; + temp[i++]=a >> 2; + temp[i++]=((a & 3) << 4) | (b >> 4); + temp[i++]=((b & 15) << 2) | (c >> 6); + temp[i++]=c & 63; + if (!isNaN(c2)) { + a=c2 >> 8; + b=c3 & 255; + c=c3 >> 8; + temp[i++]=a >> 2; + temp[i++]=((a & 3) << 4) | (b >> 4); + temp[i++]=((b & 15) << 2) | (c >> 6); + temp[i++]=c & 63; + } + if (isNaN(c2)) { + temp[i - 1]=64; + } + else if (isNaN(c3)) { + temp[i - 2]=64; + temp[i - 1]=64; + } + for (var t=0; t < i; t++) { + output.push(codex.charAt(temp[t])); + } + } while (index < length); + return output.join(""); + }, + getSessionStorage: function OSF_Outil$getSessionStorage() { + return _getSessionStorage(); + }, + getLocalStorage: function OSF_Outil$getLocalStorage() { + if (!_safeLocalStorage) { + try { + var localStorage=window.localStorage; + } + catch (ex) { + localStorage=null; + } + _safeLocalStorage=new OfficeExt.SafeStorage(localStorage); + } + return _safeLocalStorage; + }, + convertIntToCssHexColor: function OSF_Outil$convertIntToCssHexColor(val) { + var hex="#"+(Number(val)+0x1000000).toString(16).slice(-6); + return hex; + }, + attachClickHandler: function OSF_Outil$attachClickHandler(element, handler) { + element.onclick=function (e) { + handler(); + }; + element.ontouchend=function (e) { + handler(); + e.preventDefault(); + }; + }, + getQueryStringParamValue: function OSF_Outil$getQueryStringParamValue(queryString, paramName) { + var e=Function._validateParams(arguments, [{ name: "queryString", type: String, mayBeNull: false }, + { name: "paramName", type: String, mayBeNull: false } + ]); + if (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null."); + return ""; + } + var queryExp=new RegExp("[\\?&]"+paramName+"=([^&#]*)", "i"); + if (!queryExp.test(queryString)) { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found."); + return ""; + } + return queryExp.exec(queryString)[1]; + }, + isiOS: function OSF_Outil$isiOS() { + return (window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false); + }, + isChrome: function OSF_Outil$isChrome() { + return (window.navigator.userAgent.indexOf("Chrome") > 0) && !OSF.OUtil.isEdge(); + }, + isEdge: function OSF_Outil$isEdge() { + return window.navigator.userAgent.indexOf("Edge") > 0; + }, + isIE: function OSF_Outil$isIE() { + return window.navigator.userAgent.indexOf("Trident") > 0; + }, + isFirefox: function OSF_Outil$isFirefox() { + return window.navigator.userAgent.indexOf("Firefox") > 0; + }, + shallowCopy: function OSF_Outil$shallowCopy(sourceObj) { + if (sourceObj==null) { + return null; + } + else if (!(sourceObj instanceof Object)) { + return sourceObj; + } + else if (Array.isArray(sourceObj)) { + var copyArr=[]; + for (var i=0; i < sourceObj.length; i++) { + copyArr.push(sourceObj[i]); + } + return copyArr; + } + else { + var copyObj=sourceObj.constructor(); + for (var property in sourceObj) { + if (sourceObj.hasOwnProperty(property)) { + copyObj[property]=sourceObj[property]; + } + } + return copyObj; + } + }, + createObject: function OSF_Outil$createObject(properties) { + var obj=null; + if (properties) { + obj={}; + var len=properties.length; + for (var i=0; i < len; i++) { + obj[properties[i].name]=properties[i].value; + } + } + return obj; + }, + addClass: function OSF_OUtil$addClass(elmt, val) { + if (!OSF.OUtil.hasClass(elmt, val)) { + var className=elmt.getAttribute(_classN); + if (className) { + elmt.setAttribute(_classN, className+" "+val); + } + else { + elmt.setAttribute(_classN, val); + } + } + }, + removeClass: function OSF_OUtil$removeClass(elmt, val) { + if (OSF.OUtil.hasClass(elmt, val)) { + var className=elmt.getAttribute(_classN); + var reg=new RegExp('(\\s|^)'+val+'(\\s|$)'); + className=className.replace(reg, ''); + elmt.setAttribute(_classN, className); + } + }, + hasClass: function OSF_OUtil$hasClass(elmt, clsName) { + var className=elmt.getAttribute(_classN); + return className && className.match(new RegExp('(\\s|^)'+clsName+'(\\s|$)')); + }, + focusToFirstTabbable: function OSF_OUtil$focusToFirstTabbable(all, backward) { + var next; + var focused=false; + var candidate; + var setFlag=function (e) { + focused=true; + }; + var findNextPos=function (allLen, currPos, backward) { + if (currPos < 0 || currPos > allLen) { + return -1; + } + else if (currPos===0 && backward) { + return -1; + } + else if (currPos===allLen - 1 && !backward) { + return -1; + } + if (backward) { + return currPos - 1; + } + else { + return currPos+1; + } + }; + all=_reOrderTabbableElements(all); + next=backward ? all.length - 1 : 0; + if (all.length===0) { + return null; + } + while (!focused && next >=0 && next < all.length) { + candidate=all[next]; + window.focus(); + candidate.addEventListener('focus', setFlag); + candidate.focus(); + candidate.removeEventListener('focus', setFlag); + next=findNextPos(all.length, next, backward); + if (!focused && candidate===document.activeElement) { + focused=true; + } + } + if (focused) { + return candidate; + } + else { + return null; + } + }, + focusToNextTabbable: function OSF_OUtil$focusToNextTabbable(all, curr, shift) { + var currPos; + var next; + var focused=false; + var candidate; + var setFlag=function (e) { + focused=true; + }; + var findCurrPos=function (all, curr) { + var i=0; + for (; i < all.length; i++) { + if (all[i]===curr) { + return i; + } + } + return -1; + }; + var findNextPos=function (allLen, currPos, shift) { + if (currPos < 0 || currPos > allLen) { + return -1; + } + else if (currPos===0 && shift) { + return -1; + } + else if (currPos===allLen - 1 && !shift) { + return -1; + } + if (shift) { + return currPos - 1; + } + else { + return currPos+1; + } + }; + all=_reOrderTabbableElements(all); + currPos=findCurrPos(all, curr); + next=findNextPos(all.length, currPos, shift); + if (next < 0) { + return null; + } + while (!focused && next >=0 && next < all.length) { + candidate=all[next]; + candidate.addEventListener('focus', setFlag); + candidate.focus(); + candidate.removeEventListener('focus', setFlag); + next=findNextPos(all.length, next, shift); + if (!focused && candidate===document.activeElement) { + focused=true; + } + } + if (focused) { + return candidate; + } + else { + return null; + } + } + }; +})(); +OSF.OUtil.Guid=(function () { + var hexCode=["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]; + return { + generateNewGuid: function OSF_Outil_Guid$generateNewGuid() { + var result=""; + var tick=(new Date()).getTime(); + var index=0; + for (; index < 32 && tick > 0; index++) { + if (index==8 || index==12 || index==16 || index==20) { + result+="-"; + } + result+=hexCode[tick % 16]; + tick=Math.floor(tick / 16); + } + for (; index < 32; index++) { + if (index==8 || index==12 || index==16 || index==20) { + result+="-"; + } + result+=hexCode[Math.floor(Math.random() * 16)]; + } + return result; + } + }; +})(); +window.OSF=OSF; +OSF.OUtil.setNamespace("OSF", window); +OSF.AppName={ + Unsupported: 0, + Excel: 1, + Word: 2, + PowerPoint: 4, + Outlook: 8, + ExcelWebApp: 16, + WordWebApp: 32, + OutlookWebApp: 64, + Project: 128, + AccessWebApp: 256, + PowerpointWebApp: 512, + ExcelIOS: 1024, + Sway: 2048, + WordIOS: 4096, + PowerPointIOS: 8192, + Access: 16384, + Lync: 32768, + OutlookIOS: 65536, + OneNoteWebApp: 131072, + OneNote: 262144, + ExcelWinRT: 524288, + WordWinRT: 1048576, + PowerpointWinRT: 2097152, + OutlookAndroid: 4194304, + OneNoteWinRT: 8388608, + ExcelAndroid: 8388609, + VisioWebApp: 8388610, + OneNoteIOS: 8388611 +}; +OSF.InternalPerfMarker={ + DataCoercionBegin: "Agave.HostCall.CoerceDataStart", + DataCoercionEnd: "Agave.HostCall.CoerceDataEnd" +}; +OSF.HostCallPerfMarker={ + IssueCall: "Agave.HostCall.IssueCall", + ReceiveResponse: "Agave.HostCall.ReceiveResponse", + RuntimeExceptionRaised: "Agave.HostCall.RuntimeExecptionRaised" +}; +OSF.AgaveHostAction={ + "Select": 0, + "UnSelect": 1, + "CancelDialog": 2, + "InsertAgave": 3, + "CtrlF6In": 4, + "CtrlF6Exit": 5, + "CtrlF6ExitShift": 6, + "SelectWithError": 7, + "NotifyHostError": 8, + "RefreshAddinCommands": 9, + "PageIsReady": 10, + "TabIn": 11, + "TabInShift": 12, + "TabExit": 13, + "TabExitShift": 14, + "EscExit": 15, + "F2Exit": 16, + "ExitNoFocusable": 17, + "ExitNoFocusableShift": 18, + "MouseEnter": 19, + "MouseLeave": 20 +}; +OSF.SharedConstants={ + "NotificationConversationIdSuffix": '_ntf' +}; +OSF.DialogMessageType={ + DialogMessageReceived: 0, + DialogParentMessageReceived: 1, + DialogClosed: 12006 +}; +OSF.OfficeAppContext=function OSF_OfficeAppContext(id, appName, appVersion, appUILocale, dataLocale, docUrl, clientMode, settings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, appMinorVersion, requirementMatrix, hostCustomMessage, hostFullVersion, clientWindowHeight, clientWindowWidth, addinName, appDomains, dialogRequirementMatrix) { + this._id=id; + this._appName=appName; + this._appVersion=appVersion; + this._appUILocale=appUILocale; + this._dataLocale=dataLocale; + this._docUrl=docUrl; + this._clientMode=clientMode; + this._settings=settings; + this._reason=reason; + this._osfControlType=osfControlType; + this._eToken=eToken; + this._correlationId=correlationId; + this._appInstanceId=appInstanceId; + this._touchEnabled=touchEnabled; + this._commerceAllowed=commerceAllowed; + this._appMinorVersion=appMinorVersion; + this._requirementMatrix=requirementMatrix; + this._hostCustomMessage=hostCustomMessage; + this._hostFullVersion=hostFullVersion; + this._isDialog=false; + this._clientWindowHeight=clientWindowHeight; + this._clientWindowWidth=clientWindowWidth; + this._addinName=addinName; + this._appDomains=appDomains; + this._dialogRequirementMatrix=dialogRequirementMatrix; + this.get_id=function get_id() { return this._id; }; + this.get_appName=function get_appName() { return this._appName; }; + this.get_appVersion=function get_appVersion() { return this._appVersion; }; + this.get_appUILocale=function get_appUILocale() { return this._appUILocale; }; + this.get_dataLocale=function get_dataLocale() { return this._dataLocale; }; + this.get_docUrl=function get_docUrl() { return this._docUrl; }; + this.get_clientMode=function get_clientMode() { return this._clientMode; }; + this.get_bindings=function get_bindings() { return this._bindings; }; + this.get_settings=function get_settings() { return this._settings; }; + this.get_reason=function get_reason() { return this._reason; }; + this.get_osfControlType=function get_osfControlType() { return this._osfControlType; }; + this.get_eToken=function get_eToken() { return this._eToken; }; + this.get_correlationId=function get_correlationId() { return this._correlationId; }; + this.get_appInstanceId=function get_appInstanceId() { return this._appInstanceId; }; + this.get_touchEnabled=function get_touchEnabled() { return this._touchEnabled; }; + this.get_commerceAllowed=function get_commerceAllowed() { return this._commerceAllowed; }; + this.get_appMinorVersion=function get_appMinorVersion() { return this._appMinorVersion; }; + this.get_requirementMatrix=function get_requirementMatrix() { return this._requirementMatrix; }; + this.get_dialogRequirementMatrix=function get_dialogRequirementMatrix() { return this._dialogRequirementMatrix; }; + this.get_hostCustomMessage=function get_hostCustomMessage() { return this._hostCustomMessage; }; + this.get_hostFullVersion=function get_hostFullVersion() { return this._hostFullVersion; }; + this.get_isDialog=function get_isDialog() { return this._isDialog; }; + this.get_clientWindowHeight=function get_clientWindowHeight() { return this._clientWindowHeight; }; + this.get_clientWindowWidth=function get_clientWindowWidth() { return this._clientWindowWidth; }; + this.get_addinName=function get_addinName() { return this._addinName; }; + this.get_appDomains=function get_appDomains() { return this._appDomains; }; +}; +OSF.OsfControlType={ + DocumentLevel: 0, + ContainerLevel: 1 +}; +OSF.ClientMode={ + ReadOnly: 0, + ReadWrite: 1 +}; +OSF.OUtil.setNamespace("Microsoft", window); +OSF.OUtil.setNamespace("Office", Microsoft); +OSF.OUtil.setNamespace("Client", Microsoft.Office); +OSF.OUtil.setNamespace("WebExtension", Microsoft.Office); +Microsoft.Office.WebExtension.InitializationReason={ + Inserted: "inserted", + DocumentOpened: "documentOpened" +}; +Microsoft.Office.WebExtension.ValueFormat={ + Unformatted: "unformatted", + Formatted: "formatted" +}; +Microsoft.Office.WebExtension.FilterType={ + All: "all" +}; +Microsoft.Office.WebExtension.PlatformType={ + PC: "PC", + OfficeOnline: "OfficeOnline", + Mac: "Mac", + iOS: "iOS", + Android: "Android", + Universal: "Universal" +}; +Microsoft.Office.WebExtension.HostType={ + Word: "Word", + Excel: "Excel", + PowerPoint: "PowerPoint", + Outlook: "Outlook", + OneNote: "OneNote", + Project: "Project", + Access: "Access" +}; +Microsoft.Office.WebExtension.Parameters={ + BindingType: "bindingType", + CoercionType: "coercionType", + ValueFormat: "valueFormat", + FilterType: "filterType", + Columns: "columns", + SampleData: "sampleData", + GoToType: "goToType", + SelectionMode: "selectionMode", + Id: "id", + PromptText: "promptText", + ItemName: "itemName", + FailOnCollision: "failOnCollision", + StartRow: "startRow", + StartColumn: "startColumn", + RowCount: "rowCount", + ColumnCount: "columnCount", + Callback: "callback", + AsyncContext: "asyncContext", + Data: "data", + Rows: "rows", + OverwriteIfStale: "overwriteIfStale", + FileType: "fileType", + EventType: "eventType", + Handler: "handler", + SliceSize: "sliceSize", + SliceIndex: "sliceIndex", + ActiveView: "activeView", + Status: "status", + PlatformType: "platformType", + HostType: "hostType", + ForceConsent: "forceConsent", + ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + Xml: "xml", + Namespace: "namespace", + Prefix: "prefix", + XPath: "xPath", + Text: "text", + ImageLeft: "imageLeft", + ImageTop: "imageTop", + ImageWidth: "imageWidth", + ImageHeight: "imageHeight", + TaskId: "taskId", + FieldId: "fieldId", + FieldValue: "fieldValue", + ServerUrl: "serverUrl", + ListName: "listName", + ResourceId: "resourceId", + ViewType: "viewType", + ViewName: "viewName", + GetRawValue: "getRawValue", + CellFormat: "cellFormat", + TableOptions: "tableOptions", + TaskIndex: "taskIndex", + ResourceIndex: "resourceIndex", + CustomFieldId: "customFieldId", + Url: "url", + MessageHandler: "messageHandler", + Width: "width", + Height: "height", + RequireHTTPs: "requireHTTPS", + MessageToParent: "messageToParent", + DisplayInIframe: "displayInIframe", + MessageContent: "messageContent", + HideTitle: "hideTitle", + AppCommandInvocationCompletedData: "appCommandInvocationCompletedData" +}; +OSF.OUtil.setNamespace("DDA", OSF); +OSF.DDA.DocumentMode={ + ReadOnly: 1, + ReadWrite: 0 +}; +OSF.DDA.PropertyDescriptors={ + AsyncResultStatus: "AsyncResultStatus" +}; +OSF.DDA.EventDescriptors={}; +OSF.DDA.ListDescriptors={}; +OSF.DDA.UI={}; +OSF.DDA.getXdmEventName=function OSF_DDA$GetXdmEventName(id, eventType) { + if (eventType==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged || + eventType==Microsoft.Office.WebExtension.EventType.BindingDataChanged || + eventType==Microsoft.Office.WebExtension.EventType.DataNodeDeleted || + eventType==Microsoft.Office.WebExtension.EventType.DataNodeInserted || + eventType==Microsoft.Office.WebExtension.EventType.DataNodeReplaced) { + return id+"_"+eventType; + } + else { + return eventType; + } +}; +OSF.DDA.MethodDispId={ + dispidMethodMin: 64, + dispidGetSelectedDataMethod: 64, + dispidSetSelectedDataMethod: 65, + dispidAddBindingFromSelectionMethod: 66, + dispidAddBindingFromPromptMethod: 67, + dispidGetBindingMethod: 68, + dispidReleaseBindingMethod: 69, + dispidGetBindingDataMethod: 70, + dispidSetBindingDataMethod: 71, + dispidAddRowsMethod: 72, + dispidClearAllRowsMethod: 73, + dispidGetAllBindingsMethod: 74, + dispidLoadSettingsMethod: 75, + dispidSaveSettingsMethod: 76, + dispidGetDocumentCopyMethod: 77, + dispidAddBindingFromNamedItemMethod: 78, + dispidAddColumnsMethod: 79, + dispidGetDocumentCopyChunkMethod: 80, + dispidReleaseDocumentCopyMethod: 81, + dispidNavigateToMethod: 82, + dispidGetActiveViewMethod: 83, + dispidGetDocumentThemeMethod: 84, + dispidGetOfficeThemeMethod: 85, + dispidGetFilePropertiesMethod: 86, + dispidClearFormatsMethod: 87, + dispidSetTableOptionsMethod: 88, + dispidSetFormatsMethod: 89, + dispidExecuteRichApiRequestMethod: 93, + dispidAppCommandInvocationCompletedMethod: 94, + dispidCloseContainerMethod: 97, + dispidGetAccessTokenMethod: 98, + dispidGetSelectedTaskMethod: 110, + dispidGetSelectedResourceMethod: 111, + dispidGetTaskMethod: 112, + dispidGetResourceFieldMethod: 113, + dispidGetWSSUrlMethod: 114, + dispidGetTaskFieldMethod: 115, + dispidGetProjectFieldMethod: 116, + dispidGetSelectedViewMethod: 117, + dispidGetTaskByIndexMethod: 118, + dispidGetResourceByIndexMethod: 119, + dispidSetTaskFieldMethod: 120, + dispidSetResourceFieldMethod: 121, + dispidGetMaxTaskIndexMethod: 122, + dispidGetMaxResourceIndexMethod: 123, + dispidCreateTaskMethod: 124, + dispidAddDataPartMethod: 128, + dispidGetDataPartByIdMethod: 129, + dispidGetDataPartsByNamespaceMethod: 130, + dispidGetDataPartXmlMethod: 131, + dispidGetDataPartNodesMethod: 132, + dispidDeleteDataPartMethod: 133, + dispidGetDataNodeValueMethod: 134, + dispidGetDataNodeXmlMethod: 135, + dispidGetDataNodesMethod: 136, + dispidSetDataNodeValueMethod: 137, + dispidSetDataNodeXmlMethod: 138, + dispidAddDataNamespaceMethod: 139, + dispidGetDataUriByPrefixMethod: 140, + dispidGetDataPrefixByUriMethod: 141, + dispidGetDataNodeTextMethod: 142, + dispidSetDataNodeTextMethod: 143, + dispidMessageParentMethod: 144, + dispidSendMessageMethod: 145, + dispidMethodMax: 145 +}; +OSF.DDA.EventDispId={ + dispidEventMin: 0, + dispidInitializeEvent: 0, + dispidSettingsChangedEvent: 1, + dispidDocumentSelectionChangedEvent: 2, + dispidBindingSelectionChangedEvent: 3, + dispidBindingDataChangedEvent: 4, + dispidDocumentOpenEvent: 5, + dispidDocumentCloseEvent: 6, + dispidActiveViewChangedEvent: 7, + dispidDocumentThemeChangedEvent: 8, + dispidOfficeThemeChangedEvent: 9, + dispidDialogMessageReceivedEvent: 10, + dispidDialogNotificationShownInAddinEvent: 11, + dispidDialogParentMessageReceivedEvent: 12, + dispidObjectDeletedEvent: 13, + dispidObjectSelectionChangedEvent: 14, + dispidObjectDataChangedEvent: 15, + dispidContentControlAddedEvent: 16, + dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, + dispidAppCommandInvokedEvent: 39, + dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, + dispidTaskSelectionChangedEvent: 56, + dispidResourceSelectionChangedEvent: 57, + dispidViewSelectionChangedEvent: 58, + dispidDataNodeAddedEvent: 60, + dispidDataNodeReplacedEvent: 61, + dispidDataNodeDeletedEvent: 62, + dispidEventMax: 63 +}; +OSF.DDA.ErrorCodeManager=(function () { + var _errorMappings={}; + return { + getErrorArgs: function OSF_DDA_ErrorCodeManager$getErrorArgs(errorCode) { + var errorArgs=_errorMappings[errorCode]; + if (!errorArgs) { + errorArgs=_errorMappings[this.errorCodes.ooeInternalError]; + } + else { + if (!errorArgs.name) { + errorArgs.name=_errorMappings[this.errorCodes.ooeInternalError].name; + } + if (!errorArgs.message) { + errorArgs.message=_errorMappings[this.errorCodes.ooeInternalError].message; + } + } + return errorArgs; + }, + addErrorMessage: function OSF_DDA_ErrorCodeManager$addErrorMessage(errorCode, errorNameMessage) { + _errorMappings[errorCode]=errorNameMessage; + }, + errorCodes: { + ooeSuccess: 0, + ooeChunkResult: 1, + ooeCoercionTypeNotSupported: 1000, + ooeGetSelectionNotMatchDataType: 1001, + ooeCoercionTypeNotMatchBinding: 1002, + ooeInvalidGetRowColumnCounts: 1003, + ooeSelectionNotSupportCoercionType: 1004, + ooeInvalidGetStartRowColumn: 1005, + ooeNonUniformPartialGetNotSupported: 1006, + ooeGetDataIsTooLarge: 1008, + ooeFileTypeNotSupported: 1009, + ooeGetDataParametersConflict: 1010, + ooeInvalidGetColumns: 1011, + ooeInvalidGetRows: 1012, + ooeInvalidReadForBlankRow: 1013, + ooeUnsupportedDataObject: 2000, + ooeCannotWriteToSelection: 2001, + ooeDataNotMatchSelection: 2002, + ooeOverwriteWorksheetData: 2003, + ooeDataNotMatchBindingSize: 2004, + ooeInvalidSetStartRowColumn: 2005, + ooeInvalidDataFormat: 2006, + ooeDataNotMatchCoercionType: 2007, + ooeDataNotMatchBindingType: 2008, + ooeSetDataIsTooLarge: 2009, + ooeNonUniformPartialSetNotSupported: 2010, + ooeInvalidSetColumns: 2011, + ooeInvalidSetRows: 2012, + ooeSetDataParametersConflict: 2013, + ooeCellDataAmountBeyondLimits: 2014, + ooeSelectionCannotBound: 3000, + ooeBindingNotExist: 3002, + ooeBindingToMultipleSelection: 3003, + ooeInvalidSelectionForBindingType: 3004, + ooeOperationNotSupportedOnThisBindingType: 3005, + ooeNamedItemNotFound: 3006, + ooeMultipleNamedItemFound: 3007, + ooeInvalidNamedItemForBindingType: 3008, + ooeUnknownBindingType: 3009, + ooeOperationNotSupportedOnMatrixData: 3010, + ooeInvalidColumnsForBinding: 3011, + ooeSettingNameNotExist: 4000, + ooeSettingsCannotSave: 4001, + ooeSettingsAreStale: 4002, + ooeOperationNotSupported: 5000, + ooeInternalError: 5001, + ooeDocumentReadOnly: 5002, + ooeEventHandlerNotExist: 5003, + ooeInvalidApiCallInContext: 5004, + ooeShuttingDown: 5005, + ooeUnsupportedEnumeration: 5007, + ooeIndexOutOfRange: 5008, + ooeBrowserAPINotSupported: 5009, + ooeInvalidParam: 5010, + ooeRequestTimeout: 5011, + ooeInvalidOrTimedOutSession: 5012, + ooeInvalidApiArguments: 5013, + ooeTooManyIncompleteRequests: 5100, + ooeRequestTokenUnavailable: 5101, + ooeActivityLimitReached: 5102, + ooeCustomXmlNodeNotFound: 6000, + ooeCustomXmlError: 6100, + ooeCustomXmlExceedQuota: 6101, + ooeCustomXmlOutOfDate: 6102, + ooeNoCapability: 7000, + ooeCannotNavTo: 7001, + ooeSpecifiedIdNotExist: 7002, + ooeNavOutOfBound: 7004, + ooeElementMissing: 8000, + ooeProtectedError: 8001, + ooeInvalidCellsValue: 8010, + ooeInvalidTableOptionValue: 8011, + ooeInvalidFormatValue: 8012, + ooeRowIndexOutOfRange: 8020, + ooeColIndexOutOfRange: 8021, + ooeFormatValueOutOfRange: 8022, + ooeCellFormatAmountBeyondLimits: 8023, + ooeMemoryFileLimit: 11000, + ooeNetworkProblemRetrieveFile: 11001, + ooeInvalidSliceSize: 11002, + ooeInvalidCallback: 11101, + ooeInvalidWidth: 12000, + ooeInvalidHeight: 12001, + ooeNavigationError: 12002, + ooeInvalidScheme: 12003, + ooeAppDomains: 12004, + ooeRequireHTTPS: 12005, + ooeWebDialogClosed: 12006, + ooeDialogAlreadyOpened: 12007, + ooeEndUserAllow: 12008, + ooeEndUserIgnore: 12009, + ooeNotUILessDialog: 12010, + ooeCrossZone: 12011, + ooeNotSSOAgave: 13000, + ooeSSOUserNotSignedIn: 13001, + ooeSSOUserAborted: 13002, + ooeSSOUnsupportedUserIdentity: 13003, + ooeSSOInvalidResourceUrl: 13004, + ooeSSOInvalidGrant: 13005, + ooeSSOClientError: 13006, + ooeSSOServerError: 13007, + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009 + }, + initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) { + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={ name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={ name: stringNS.L_DataReadError, message: stringNS.L_GetSelectionNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={ name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotMatchBinding }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={ name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetRowColumnCounts }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={ name: stringNS.L_DataReadError, message: stringNS.L_SelectionNotSupportCoercionType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={ name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetStartRowColumn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={ name: stringNS.L_DataReadError, message: stringNS.L_NonUniformPartialGetNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={ name: stringNS.L_DataReadError, message: stringNS.L_GetDataIsTooLarge }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={ name: stringNS.L_DataReadError, message: stringNS.L_FileTypeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={ name: stringNS.L_DataReadError, message: stringNS.L_GetDataParametersConflict }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={ name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetColumns }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={ name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetRows }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={ name: stringNS.L_DataReadError, message: stringNS.L_InvalidReadForBlankRow }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={ name: stringNS.L_DataWriteError, message: stringNS.L_UnsupportedDataObject }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={ name: stringNS.L_DataWriteError, message: stringNS.L_CannotWriteToSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={ name: stringNS.L_DataWriteError, message: stringNS.L_DataNotMatchSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={ name: stringNS.L_DataWriteError, message: stringNS.L_OverwriteWorksheetData }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={ name: stringNS.L_DataWriteError, message: stringNS.L_DataNotMatchBindingSize }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={ name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetStartRowColumn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={ name: stringNS.L_InvalidFormat, message: stringNS.L_InvalidDataFormat }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={ name: stringNS.L_InvalidDataObject, message: stringNS.L_DataNotMatchCoercionType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={ name: stringNS.L_InvalidDataObject, message: stringNS.L_DataNotMatchBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={ name: stringNS.L_DataWriteError, message: stringNS.L_SetDataIsTooLarge }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={ name: stringNS.L_DataWriteError, message: stringNS.L_NonUniformPartialSetNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={ name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetColumns }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={ name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetRows }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={ name: stringNS.L_DataWriteError, message: stringNS.L_SetDataParametersConflict }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={ name: stringNS.L_BindingCreationError, message: stringNS.L_SelectionCannotBound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={ name: stringNS.L_InvalidBindingError, message: stringNS.L_BindingNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={ name: stringNS.L_BindingCreationError, message: stringNS.L_BindingToMultipleSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={ name: stringNS.L_BindingCreationError, message: stringNS.L_InvalidSelectionForBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={ name: stringNS.L_InvalidBindingOperation, message: stringNS.L_OperationNotSupportedOnThisBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={ name: stringNS.L_BindingCreationError, message: stringNS.L_NamedItemNotFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={ name: stringNS.L_BindingCreationError, message: stringNS.L_MultipleNamedItemFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={ name: stringNS.L_BindingCreationError, message: stringNS.L_InvalidNamedItemForBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={ name: stringNS.L_InvalidBinding, message: stringNS.L_UnknownBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={ name: stringNS.L_InvalidBindingOperation, message: stringNS.L_OperationNotSupportedOnMatrixData }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={ name: stringNS.L_InvalidBinding, message: stringNS.L_InvalidColumnsForBinding }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={ name: stringNS.L_ReadSettingsError, message: stringNS.L_SettingNameNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={ name: stringNS.L_SaveSettingsError, message: stringNS.L_SettingsCannotSave }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={ name: stringNS.L_SettingsStaleError, message: stringNS.L_SettingsAreStale }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={ name: stringNS.L_HostError, message: stringNS.L_OperationNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={ name: stringNS.L_InternalError, message: stringNS.L_InternalErrorDescription }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={ name: stringNS.L_PermissionDenied, message: stringNS.L_DocumentReadOnly }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={ name: stringNS.L_EventRegistrationError, message: stringNS.L_EventHandlerNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={ name: stringNS.L_InvalidAPICall, message: stringNS.L_InvalidApiCallInContext }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={ name: stringNS.L_ShuttingDown, message: stringNS.L_ShuttingDown }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={ name: stringNS.L_UnsupportedEnumeration, message: stringNS.L_UnsupportedEnumerationMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={ name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={ name: stringNS.L_APINotSupported, message: stringNS.L_BrowserAPINotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={ name: stringNS.L_APICallFailed, message: stringNS.L_RequestTimeout }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={ name: stringNS.L_InvalidOrTimedOutSession, message: stringNS.L_InvalidOrTimedOutSessionMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={ name: stringNS.L_APICallFailed, message: stringNS.L_TooManyIncompleteRequests }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={ name: stringNS.L_APICallFailed, message: stringNS.L_RequestTokenUnavailable }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={ name: stringNS.L_APICallFailed, message: stringNS.L_ActivityLimitReached }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={ name: stringNS.L_APICallFailed, message: stringNS.L_InvalidApiArgumentsMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={ name: stringNS.L_InvalidNode, message: stringNS.L_CustomXmlNodeNotFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={ name: stringNS.L_CustomXmlError, message: stringNS.L_CustomXmlError }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={ name: stringNS.L_CustomXmlExceedQuotaName, message: stringNS.L_CustomXmlExceedQuotaMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={ name: stringNS.L_CustomXmlOutOfDateName, message: stringNS.L_CustomXmlOutOfDateMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={ name: stringNS.L_PermissionDenied, message: stringNS.L_NoCapability }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={ name: stringNS.L_CannotNavigateTo, message: stringNS.L_CannotNavigateTo }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={ name: stringNS.L_SpecifiedIdNotExist, message: stringNS.L_SpecifiedIdNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={ name: stringNS.L_NavOutOfBound, message: stringNS.L_NavOutOfBound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={ name: stringNS.L_DataWriteReminder, message: stringNS.L_CellDataAmountBeyondLimits }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={ name: stringNS.L_MissingParameter, message: stringNS.L_ElementMissing }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={ name: stringNS.L_PermissionDenied, message: stringNS.L_NoCapability }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={ name: stringNS.L_InvalidValue, message: stringNS.L_InvalidCellsValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={ name: stringNS.L_InvalidValue, message: stringNS.L_InvalidTableOptionValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={ name: stringNS.L_InvalidValue, message: stringNS.L_InvalidFormatValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={ name: stringNS.L_OutOfRange, message: stringNS.L_RowIndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={ name: stringNS.L_OutOfRange, message: stringNS.L_ColIndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={ name: stringNS.L_OutOfRange, message: stringNS.L_FormatValueOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={ name: stringNS.L_FormattingReminder, message: stringNS.L_CellFormatAmountBeyondLimits }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={ name: stringNS.L_MemoryLimit, message: stringNS.L_CloseFileBeforeRetrieve }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={ name: stringNS.L_NetworkProblem, message: stringNS.L_NetworkProblemRetrieveFile }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={ name: stringNS.L_InvalidValue, message: stringNS.L_SliceSizeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={ name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogAlreadyOpened }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={ name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={ name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={ name: stringNS.L_DisplayDialogError, message: stringNS.L_NetworkProblem }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={ name: stringNS.L_DialogNavigateError, message: stringNS.L_DialogInvalidScheme }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={ name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogAddressNotTrusted }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={ name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogRequireHTTPS }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={ name: stringNS.L_DisplayDialogError, message: stringNS.L_UserClickIgnore }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={ name: stringNS.L_DisplayDialogError, message: stringNS.L_NewWindowCrossZoneErrorString }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={ name: stringNS.L_APINotSupported, message: stringNS.L_InvalidSSOAddinMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={ name: stringNS.L_UserNotSignedIn, message: stringNS.L_UserNotSignedIn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={ name: stringNS.L_UserAborted, message: stringNS.L_UserAbortedMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={ name: stringNS.L_UnsupportedUserIdentity, message: stringNS.L_UnsupportedUserIdentityMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={ name: stringNS.L_InvalidResourceUrl, message: stringNS.L_InvalidResourceUrlMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={ name: stringNS.L_InvalidGrant, message: stringNS.L_InvalidGrantMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={ name: stringNS.L_SSOClientError, message: stringNS.L_SSOClientErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={ name: stringNS.L_SSOServerError, message: stringNS.L_SSOServerErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={ name: stringNS.L_AddinIsAlreadyRequestingToken, message: stringNS.L_AddinIsAlreadyRequestingTokenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={ name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage }; + } + }; +})(); +var OfficeExt; +(function (OfficeExt) { + var Requirement; + (function (Requirement) { + var RequirementVersion=(function () { + function RequirementVersion() { + } + return RequirementVersion; + })(); + Requirement.RequirementVersion=RequirementVersion; + var RequirementMatrix=(function () { + function RequirementMatrix(_setMap) { + this.isSetSupported=function _isSetSupported(name, minVersion) { + if (name==undefined) { + return false; + } + if (minVersion==undefined) { + minVersion=0; + } + var setSupportArray=this._setMap; + var sets=setSupportArray._sets; + if (sets.hasOwnProperty(name.toLowerCase())) { + var setMaxVersion=sets[name.toLowerCase()]; + try { + var setMaxVersionNum=this._getVersion(setMaxVersion); + minVersion=minVersion+""; + var minVersionNum=this._getVersion(minVersion); + if (setMaxVersionNum.major > 0 && setMaxVersionNum.major > minVersionNum.major) { + return true; + } + if (setMaxVersionNum.minor > 0 && + setMaxVersionNum.minor > 0 && + setMaxVersionNum.major==minVersionNum.major && + setMaxVersionNum.minor >=minVersionNum.minor) { + return true; + } + } + catch (e) { + return false; + } + } + return false; + }; + this._getVersion=function (version) { + var temp=version.split("."); + var major=0; + var minor=0; + if (temp.length < 2 && isNaN(Number(version))) { + throw "version format incorrect"; + } + else { + major=Number(temp[0]); + if (temp.length >=2) { + minor=Number(temp[1]); + } + if (isNaN(major) || isNaN(minor)) { + throw "version format incorrect"; + } + } + var result={ "minor": minor, "major": major }; + return result; + }; + this._setMap=_setMap; + this.isSetSupported=this.isSetSupported.bind(this); + } + return RequirementMatrix; + })(); + Requirement.RequirementMatrix=RequirementMatrix; + var DefaultSetRequirement=(function () { + function DefaultSetRequirement(setMap) { + this._addSetMap=function DefaultSetRequirement_addSetMap(addedSet) { + for (var name in addedSet) { + this._sets[name]=addedSet[name]; + } + }; + this._sets=setMap; + } + return DefaultSetRequirement; + })(); + Requirement.DefaultSetRequirement=DefaultSetRequirement; + var DefaultDialogSetRequirement=(function (_super) { + __extends(DefaultDialogSetRequirement, _super); + function DefaultDialogSetRequirement() { + _super.call(this, { + "dialogapi": 1.1 + }); + } + return DefaultDialogSetRequirement; + })(DefaultSetRequirement); + Requirement.DefaultDialogSetRequirement=DefaultDialogSetRequirement; + var ExcelClientDefaultSetRequirement=(function (_super) { + __extends(ExcelClientDefaultSetRequirement, _super); + function ExcelClientDefaultSetRequirement() { + _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "excelapi": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1 + }); + } + return ExcelClientDefaultSetRequirement; + })(DefaultSetRequirement); + Requirement.ExcelClientDefaultSetRequirement=ExcelClientDefaultSetRequirement; + var ExcelClientV1DefaultSetRequirement=(function (_super) { + __extends(ExcelClientV1DefaultSetRequirement, _super); + function ExcelClientV1DefaultSetRequirement() { + _super.call(this); + this._addSetMap({ + "imagecoercion": 1.1 + }); + } + return ExcelClientV1DefaultSetRequirement; + })(ExcelClientDefaultSetRequirement); + Requirement.ExcelClientV1DefaultSetRequirement=ExcelClientV1DefaultSetRequirement; + var OutlookClientDefaultSetRequirement=(function (_super) { + __extends(OutlookClientDefaultSetRequirement, _super); + function OutlookClientDefaultSetRequirement() { + _super.call(this, { + "mailbox": 1.3 + }); + } + return OutlookClientDefaultSetRequirement; + })(DefaultSetRequirement); + Requirement.OutlookClientDefaultSetRequirement=OutlookClientDefaultSetRequirement; + var WordClientDefaultSetRequirement=(function (_super) { + __extends(WordClientDefaultSetRequirement, _super); + function WordClientDefaultSetRequirement() { + _super.call(this, { + "bindingevents": 1.1, + "compressedfile": 1.1, + "customxmlparts": 1.1, + "documentevents": 1.1, + "file": 1.1, + "htmlcoercion": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "textfile": 1.1, + "wordapi": 1.1 + }); + } + return WordClientDefaultSetRequirement; + })(DefaultSetRequirement); + Requirement.WordClientDefaultSetRequirement=WordClientDefaultSetRequirement; + var WordClientV1DefaultSetRequirement=(function (_super) { + __extends(WordClientV1DefaultSetRequirement, _super); + function WordClientV1DefaultSetRequirement() { + _super.call(this); + this._addSetMap({ + "customxmlparts": 1.2, + "wordapi": 1.2, + "imagecoercion": 1.1 + }); + } + return WordClientV1DefaultSetRequirement; + })(WordClientDefaultSetRequirement); + Requirement.WordClientV1DefaultSetRequirement=WordClientV1DefaultSetRequirement; + var PowerpointClientDefaultSetRequirement=(function (_super) { + __extends(PowerpointClientDefaultSetRequirement, _super); + function PowerpointClientDefaultSetRequirement() { + _super.call(this, { + "activeview": 1.1, + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }); + } + return PowerpointClientDefaultSetRequirement; + })(DefaultSetRequirement); + Requirement.PowerpointClientDefaultSetRequirement=PowerpointClientDefaultSetRequirement; + var PowerpointClientV1DefaultSetRequirement=(function (_super) { + __extends(PowerpointClientV1DefaultSetRequirement, _super); + function PowerpointClientV1DefaultSetRequirement() { + _super.call(this); + this._addSetMap({ + "imagecoercion": 1.1 + }); + } + return PowerpointClientV1DefaultSetRequirement; + })(PowerpointClientDefaultSetRequirement); + Requirement.PowerpointClientV1DefaultSetRequirement=PowerpointClientV1DefaultSetRequirement; + var ProjectClientDefaultSetRequirement=(function (_super) { + __extends(ProjectClientDefaultSetRequirement, _super); + function ProjectClientDefaultSetRequirement() { + _super.call(this, { + "selection": 1.1, + "textcoercion": 1.1 + }); + } + return ProjectClientDefaultSetRequirement; + })(DefaultSetRequirement); + Requirement.ProjectClientDefaultSetRequirement=ProjectClientDefaultSetRequirement; + var ExcelWebDefaultSetRequirement=(function (_super) { + __extends(ExcelWebDefaultSetRequirement, _super); + function ExcelWebDefaultSetRequirement() { + _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "file": 1.1 + }); + } + return ExcelWebDefaultSetRequirement; + })(DefaultSetRequirement); + Requirement.ExcelWebDefaultSetRequirement=ExcelWebDefaultSetRequirement; + var WordWebDefaultSetRequirement=(function (_super) { + __extends(WordWebDefaultSetRequirement, _super); + function WordWebDefaultSetRequirement() { + _super.call(this, { + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "imagecoercion": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablecoercion": 1.1, + "textcoercion": 1.1, + "textfile": 1.1 + }); + } + return WordWebDefaultSetRequirement; + })(DefaultSetRequirement); + Requirement.WordWebDefaultSetRequirement=WordWebDefaultSetRequirement; + var PowerpointWebDefaultSetRequirement=(function (_super) { + __extends(PowerpointWebDefaultSetRequirement, _super); + function PowerpointWebDefaultSetRequirement() { + _super.call(this, { + "activeview": 1.1, + "settings": 1.1 + }); + } + return PowerpointWebDefaultSetRequirement; + })(DefaultSetRequirement); + Requirement.PowerpointWebDefaultSetRequirement=PowerpointWebDefaultSetRequirement; + var OutlookWebDefaultSetRequirement=(function (_super) { + __extends(OutlookWebDefaultSetRequirement, _super); + function OutlookWebDefaultSetRequirement() { + _super.call(this, { + "mailbox": 1.3 + }); + } + return OutlookWebDefaultSetRequirement; + })(DefaultSetRequirement); + Requirement.OutlookWebDefaultSetRequirement=OutlookWebDefaultSetRequirement; + var SwayWebDefaultSetRequirement=(function (_super) { + __extends(SwayWebDefaultSetRequirement, _super); + function SwayWebDefaultSetRequirement() { + _super.call(this, { + "activeview": 1.1, + "documentevents": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }); + } + return SwayWebDefaultSetRequirement; + })(DefaultSetRequirement); + Requirement.SwayWebDefaultSetRequirement=SwayWebDefaultSetRequirement; + var AccessWebDefaultSetRequirement=(function (_super) { + __extends(AccessWebDefaultSetRequirement, _super); + function AccessWebDefaultSetRequirement() { + _super.call(this, { + "bindingevents": 1.1, + "partialtablebindings": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1 + }); + } + return AccessWebDefaultSetRequirement; + })(DefaultSetRequirement); + Requirement.AccessWebDefaultSetRequirement=AccessWebDefaultSetRequirement; + var ExcelIOSDefaultSetRequirement=(function (_super) { + __extends(ExcelIOSDefaultSetRequirement, _super); + function ExcelIOSDefaultSetRequirement() { + _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1 + }); + } + return ExcelIOSDefaultSetRequirement; + })(DefaultSetRequirement); + Requirement.ExcelIOSDefaultSetRequirement=ExcelIOSDefaultSetRequirement; + var WordIOSDefaultSetRequirement=(function (_super) { + __extends(WordIOSDefaultSetRequirement, _super); + function WordIOSDefaultSetRequirement() { + _super.call(this, { + "bindingevents": 1.1, + "compressedfile": 1.1, + "customxmlparts": 1.1, + "documentevents": 1.1, + "file": 1.1, + "htmlcoercion": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "textfile": 1.1 + }); + } + return WordIOSDefaultSetRequirement; + })(DefaultSetRequirement); + Requirement.WordIOSDefaultSetRequirement=WordIOSDefaultSetRequirement; + var WordIOSV1DefaultSetRequirement=(function (_super) { + __extends(WordIOSV1DefaultSetRequirement, _super); + function WordIOSV1DefaultSetRequirement() { + _super.call(this); + this._addSetMap({ + "customxmlparts": 1.2, + "wordapi": 1.2 + }); + } + return WordIOSV1DefaultSetRequirement; + })(WordIOSDefaultSetRequirement); + Requirement.WordIOSV1DefaultSetRequirement=WordIOSV1DefaultSetRequirement; + var PowerpointIOSDefaultSetRequirement=(function (_super) { + __extends(PowerpointIOSDefaultSetRequirement, _super); + function PowerpointIOSDefaultSetRequirement() { + _super.call(this, { + "activeview": 1.1, + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }); + } + return PowerpointIOSDefaultSetRequirement; + })(DefaultSetRequirement); + Requirement.PowerpointIOSDefaultSetRequirement=PowerpointIOSDefaultSetRequirement; + var OutlookIOSDefaultSetRequirement=(function (_super) { + __extends(OutlookIOSDefaultSetRequirement, _super); + function OutlookIOSDefaultSetRequirement() { + _super.call(this, { + "mailbox": 1.1 + }); + } + return OutlookIOSDefaultSetRequirement; + })(DefaultSetRequirement); + Requirement.OutlookIOSDefaultSetRequirement=OutlookIOSDefaultSetRequirement; + var RequirementsMatrixFactory=(function () { + function RequirementsMatrixFactory() { + } + RequirementsMatrixFactory.initializeOsfDda=function () { + OSF.OUtil.setNamespace("Requirement", OSF.DDA); + }; + RequirementsMatrixFactory.getDefaultRequirementMatrix=function (appContext) { + this.initializeDefaultSetMatrix(); + var defaultRequirementMatrix=undefined; + var clientRequirement=appContext.get_requirementMatrix(); + if (clientRequirement !=undefined && clientRequirement.length > 0 && typeof (JSON) !=="undefined") { + var matrixItem=JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + defaultRequirementMatrix=new RequirementMatrix(new DefaultSetRequirement(matrixItem)); + } + else { + var appLocator=RequirementsMatrixFactory.getClientFullVersionString(appContext); + if (RequirementsMatrixFactory.DefaultSetArrayMatrix !=undefined && RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator] !=undefined) { + defaultRequirementMatrix=new RequirementMatrix(RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator]); + } + else { + defaultRequirementMatrix=new RequirementMatrix(new DefaultSetRequirement({})); + } + } + return defaultRequirementMatrix; + }; + RequirementsMatrixFactory.getDefaultDialogRequirementMatrix=function (appContext) { + var defaultRequirementMatrix=undefined; + var clientRequirement=appContext.get_dialogRequirementMatrix(); + if (clientRequirement !=undefined && clientRequirement.length > 0 && typeof (JSON) !=="undefined") { + var matrixItem=JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + defaultRequirementMatrix=new RequirementMatrix(new DefaultSetRequirement(matrixItem)); + } + else { + defaultRequirementMatrix=new RequirementMatrix(new DefaultDialogSetRequirement()); + } + return defaultRequirementMatrix; + }; + RequirementsMatrixFactory.getClientFullVersionString=function (appContext) { + var appMinorVersion=appContext.get_appMinorVersion(); + var appMinorVersionString=""; + var appFullVersion=""; + var appName=appContext.get_appName(); + var isIOSClient=appName==1024 || + appName==4096 || + appName==8192 || + appName==65536; + if (isIOSClient && appContext.get_appVersion()==1) { + if (appName==4096 && appMinorVersion >=15) { + appFullVersion="16.00.01"; + } + else { + appFullVersion="16.00"; + } + } + else if (appContext.get_appName()==64) { + appFullVersion=appContext.get_appVersion(); + } + else { + if (appMinorVersion < 10) { + appMinorVersionString="0"+appMinorVersion; + } + else { + appMinorVersionString=""+appMinorVersion; + } + appFullVersion=appContext.get_appVersion()+"."+appMinorVersionString; + } + return appContext.get_appName()+"-"+appFullVersion; + }; + RequirementsMatrixFactory.initializeDefaultSetMatrix=function () { + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1600]=new ExcelClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1600]=new WordClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1600]=new PowerpointClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1601]=new ExcelClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1601]=new WordClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1601]=new PowerpointClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_RCLIENT_1600]=new OutlookClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_WAC_1600]=new ExcelWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_WAC_1600]=new WordWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1600]=new OutlookWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1601]=new OutlookWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Project_RCLIENT_1600]=new ProjectClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Access_WAC_1600]=new AccessWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_WAC_1600]=new PowerpointWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_IOS_1600]=new ExcelIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.SWAY_WAC_1600]=new SwayWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_1600]=new WordIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_16001]=new WordIOSV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_IOS_1600]=new PowerpointIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_IOS_1600]=new OutlookIOSDefaultSetRequirement(); + }; + RequirementsMatrixFactory.Excel_RCLIENT_1600="1-16.00"; + RequirementsMatrixFactory.Excel_RCLIENT_1601="1-16.01"; + RequirementsMatrixFactory.Word_RCLIENT_1600="2-16.00"; + RequirementsMatrixFactory.Word_RCLIENT_1601="2-16.01"; + RequirementsMatrixFactory.PowerPoint_RCLIENT_1600="4-16.00"; + RequirementsMatrixFactory.PowerPoint_RCLIENT_1601="4-16.01"; + RequirementsMatrixFactory.Outlook_RCLIENT_1600="8-16.00"; + RequirementsMatrixFactory.Excel_WAC_1600="16-16.00"; + RequirementsMatrixFactory.Word_WAC_1600="32-16.00"; + RequirementsMatrixFactory.Outlook_WAC_1600="64-16.00"; + RequirementsMatrixFactory.Outlook_WAC_1601="64-16.01"; + RequirementsMatrixFactory.Project_RCLIENT_1600="128-16.00"; + RequirementsMatrixFactory.Access_WAC_1600="256-16.00"; + RequirementsMatrixFactory.PowerPoint_WAC_1600="512-16.00"; + RequirementsMatrixFactory.Excel_IOS_1600="1024-16.00"; + RequirementsMatrixFactory.SWAY_WAC_1600="2048-16.00"; + RequirementsMatrixFactory.Word_IOS_1600="4096-16.00"; + RequirementsMatrixFactory.Word_IOS_16001="4096-16.00.01"; + RequirementsMatrixFactory.PowerPoint_IOS_1600="8192-16.00"; + RequirementsMatrixFactory.Outlook_IOS_1600="65536-16.00"; + RequirementsMatrixFactory.DefaultSetArrayMatrix={}; + return RequirementsMatrixFactory; + })(); + Requirement.RequirementsMatrixFactory=RequirementsMatrixFactory; + })(Requirement=OfficeExt.Requirement || (OfficeExt.Requirement={})); +})(OfficeExt || (OfficeExt={})); +OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(); +var OfficeExt; +(function (OfficeExt) { + var HostName; + (function (HostName) { + var Host=(function () { + function Host() { + this.getDiagnostics=function _getDiagnostics(version) { + var diagnostics={ + host: this.getHost(), + version: (version || this.getDefaultVersion()), + platform: this.getPlatform() + }; + return diagnostics; + }; + this.platformRemappings={ + web: Microsoft.Office.WebExtension.PlatformType.OfficeOnline, + winrt: Microsoft.Office.WebExtension.PlatformType.Universal, + win32: Microsoft.Office.WebExtension.PlatformType.PC, + mac: Microsoft.Office.WebExtension.PlatformType.Mac, + ios: Microsoft.Office.WebExtension.PlatformType.iOS, + android: Microsoft.Office.WebExtension.PlatformType.Android + }; + this.camelCaseMappings={ + powerpoint: Microsoft.Office.WebExtension.HostType.PowerPoint, + onenote: Microsoft.Office.WebExtension.HostType.OneNote + }; + this.hostInfo=OSF._OfficeAppFactory.getHostInfo(); + this.getHost=this.getHost.bind(this); + this.getPlatform=this.getPlatform.bind(this); + this.getDiagnostics=this.getDiagnostics.bind(this); + } + Host.prototype.capitalizeFirstLetter=function (input) { + if (input) { + return (input[0].toUpperCase()+input.slice(1).toLowerCase()); + } + return input; + }; + Host.getInstance=function () { + if (Host.hostObj===undefined) { + Host.hostObj=new Host(); + } + return Host.hostObj; + }; + Host.prototype.getPlatform=function () { + if (this.hostInfo.hostPlatform) { + var hostPlatform=this.hostInfo.hostPlatform.toLowerCase(); + if (this.platformRemappings[hostPlatform]) { + return this.platformRemappings[hostPlatform]; + } + } + return null; + }; + Host.prototype.getHost=function () { + if (this.hostInfo.hostType) { + var hostType=this.hostInfo.hostType.toLowerCase(); + if (this.camelCaseMappings[hostType]) { + return this.camelCaseMappings[hostType]; + } + hostType=this.capitalizeFirstLetter(this.hostInfo.hostType); + if (Microsoft.Office.WebExtension.HostType[hostType]) { + return Microsoft.Office.WebExtension.HostType[hostType]; + } + } + return null; + }; + Host.prototype.getDefaultVersion=function () { + if (this.getHost()) { + return "16.0.0000.0000"; + } + return null; + }; + return Host; + })(); + HostName.Host=Host; + })(HostName=OfficeExt.HostName || (OfficeExt.HostName={})); +})(OfficeExt || (OfficeExt={})); +Microsoft.Office.WebExtension.ApplicationMode={ + WebEditor: "webEditor", + WebViewer: "webViewer", + Client: "client" +}; +Microsoft.Office.WebExtension.DocumentMode={ + ReadOnly: "readOnly", + ReadWrite: "readWrite" +}; +OSF.NamespaceManager=(function OSF_NamespaceManager() { + var _userOffice; + var _useShortcut=false; + return { + enableShortcut: function OSF_NamespaceManager$enableShortcut() { + if (!_useShortcut) { + if (window.Office) { + _userOffice=window.Office; + } + else { + OSF.OUtil.setNamespace("Office", window); + } + window.Office=Microsoft.Office.WebExtension; + _useShortcut=true; + } + }, + disableShortcut: function OSF_NamespaceManager$disableShortcut() { + if (_useShortcut) { + if (_userOffice) { + window.Office=_userOffice; + } + else { + OSF.OUtil.unsetNamespace("Office", window); + } + _useShortcut=false; + } + } + }; +})(); +OSF.NamespaceManager.enableShortcut(); +Microsoft.Office.WebExtension.useShortNamespace=function Microsoft_Office_WebExtension_useShortNamespace(useShortcut) { + if (useShortcut) { + OSF.NamespaceManager.enableShortcut(); + } + else { + OSF.NamespaceManager.disableShortcut(); + } +}; +Microsoft.Office.WebExtension.select=function Microsoft_Office_WebExtension_select(str, errorCallback) { + var promise; + if (str && typeof str=="string") { + var index=str.indexOf("#"); + if (index !=-1) { + var op=str.substring(0, index); + var target=str.substring(index+1); + switch (op) { + case "binding": + case "bindings": + if (target) { + promise=new OSF.DDA.BindingPromise(target); + } + break; + } + } + } + if (!promise) { + if (errorCallback) { + var callbackType=typeof errorCallback; + if (callbackType=="function") { + var callArgs={}; + callArgs[Microsoft.Office.WebExtension.Parameters.Callback]=errorCallback; + OSF.DDA.issueAsyncResult(callArgs, OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext, OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext)); + } + else { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction, callbackType); + } + } + } + else { + promise.onFail=errorCallback; + return promise; + } +}; +OSF.DDA.Context=function OSF_DDA_Context(officeAppContext, document, license, appOM, getOfficeTheme) { + OSF.OUtil.defineEnumerableProperties(this, { + "contentLanguage": { + value: officeAppContext.get_dataLocale() + }, + "displayLanguage": { + value: officeAppContext.get_appUILocale() + }, + "touchEnabled": { + value: officeAppContext.get_touchEnabled() + }, + "commerceAllowed": { + value: officeAppContext.get_commerceAllowed() + }, + "host": { + value: OfficeExt.HostName.Host.getInstance().getHost() + }, + "platform": { + value: OfficeExt.HostName.Host.getInstance().getPlatform() + }, + "diagnostics": { + value: OfficeExt.HostName.Host.getInstance().getDiagnostics(officeAppContext.get_hostFullVersion()) + } + }); + if (license) { + OSF.OUtil.defineEnumerableProperty(this, "license", { + value: license + }); + } + if (officeAppContext.ui) { + OSF.OUtil.defineEnumerableProperty(this, "ui", { + value: officeAppContext.ui + }); + } + if (officeAppContext.auth) { + OSF.OUtil.defineEnumerableProperty(this, "auth", { + value: officeAppContext.auth + }); + } + if (officeAppContext.get_isDialog()) { + var requirements=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); + OSF.OUtil.defineEnumerableProperty(this, "requirements", { + value: requirements + }); + } + else { + if (document) { + OSF.OUtil.defineEnumerableProperty(this, "document", { + value: document + }); + } + if (appOM) { + var displayName=appOM.displayName || "appOM"; + delete appOM.displayName; + OSF.OUtil.defineEnumerableProperty(this, displayName, { + value: appOM + }); + } + if (getOfficeTheme) { + OSF.OUtil.defineEnumerableProperty(this, "officeTheme", { + get: function () { + return getOfficeTheme(); + } + }); + } + var requirements=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(officeAppContext); + OSF.OUtil.defineEnumerableProperty(this, "requirements", { + value: requirements + }); + } +}; +OSF.DDA.OutlookContext=function OSF_DDA_OutlookContext(appContext, settings, license, appOM, getOfficeTheme) { + OSF.DDA.OutlookContext.uber.constructor.call(this, appContext, null, license, appOM, getOfficeTheme); + if (settings) { + OSF.OUtil.defineEnumerableProperty(this, "roamingSettings", { + value: settings + }); + } +}; +OSF.OUtil.extend(OSF.DDA.OutlookContext, OSF.DDA.Context); +OSF.DDA.OutlookAppOm=function OSF_DDA_OutlookAppOm(appContext, window, appReady) { }; +OSF.DDA.Document=function OSF_DDA_Document(officeAppContext, settings) { + var mode; + switch (officeAppContext.get_clientMode()) { + case OSF.ClientMode.ReadOnly: + mode=Microsoft.Office.WebExtension.DocumentMode.ReadOnly; + break; + case OSF.ClientMode.ReadWrite: + mode=Microsoft.Office.WebExtension.DocumentMode.ReadWrite; + break; + } + ; + if (settings) { + OSF.OUtil.defineEnumerableProperty(this, "settings", { + value: settings + }); + } + ; + OSF.OUtil.defineMutableProperties(this, { + "mode": { + value: mode + }, + "url": { + value: officeAppContext.get_docUrl() + } + }); +}; +OSF.DDA.JsomDocument=function OSF_DDA_JsomDocument(officeAppContext, bindingFacade, settings) { + OSF.DDA.JsomDocument.uber.constructor.call(this, officeAppContext, settings); + if (bindingFacade) { + OSF.OUtil.defineEnumerableProperty(this, "bindings", { + get: function OSF_DDA_Document$GetBindings() { return bindingFacade; } + }); + } + var am=OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.GetSelectedDataAsync, + am.SetSelectedDataAsync + ]); + OSF.DDA.DispIdHost.addEventSupport(this, new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged])); +}; +OSF.OUtil.extend(OSF.DDA.JsomDocument, OSF.DDA.Document); +OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension, "context", { + get: function Microsoft_Office_WebExtension$GetContext() { + var context; + if (OSF && OSF._OfficeAppFactory) { + context=OSF._OfficeAppFactory.getContext(); + } + return context; + } +}); +OSF.DDA.License=function OSF_DDA_License(eToken) { + OSF.OUtil.defineEnumerableProperty(this, "value", { + value: eToken + }); +}; +OSF.DDA.ApiMethodCall=function OSF_DDA_ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { + var requiredCount=requiredParameters.length; + var getInvalidParameterString=OSF.OUtil.delayExecutionAndCache(function () { + return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters, displayName); + }); + this.verifyArguments=function OSF_DDA_ApiMethodCall$VerifyArguments(params, args) { + for (var name in params) { + var param=params[name]; + var arg=args[name]; + if (param["enum"]) { + switch (typeof arg) { + case "string": + if (OSF.OUtil.listContainsValue(param["enum"], arg)) { + break; + } + case "undefined": + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration; + default: + throw getInvalidParameterString(); + } + } + if (param["types"]) { + if (!OSF.OUtil.listContainsValue(param["types"], typeof arg)) { + throw getInvalidParameterString(); + } + } + } + }; + this.extractRequiredArguments=function OSF_DDA_ApiMethodCall$ExtractRequiredArguments(userArgs, caller, stateInfo) { + if (userArgs.length < requiredCount) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments); + } + var requiredArgs=[]; + var index; + for (index=0; index < requiredCount; index++) { + requiredArgs.push(userArgs[index]); + } + this.verifyArguments(requiredParameters, requiredArgs); + var ret={}; + for (index=0; index < requiredCount; index++) { + var param=requiredParameters[index]; + var arg=requiredArgs[index]; + if (param.verify) { + var isValid=param.verify(arg, caller, stateInfo); + if (!isValid) { + throw getInvalidParameterString(); + } + } + ret[param.name]=arg; + } + return ret; + }, + this.fillOptions=function OSF_DDA_ApiMethodCall$FillOptions(options, requiredArgs, caller, stateInfo) { + options=options || {}; + for (var optionName in supportedOptions) { + if (!OSF.OUtil.listContainsKey(options, optionName)) { + var value=undefined; + var option=supportedOptions[optionName]; + if (option.calculate && requiredArgs) { + value=option.calculate(requiredArgs, caller, stateInfo); + } + if (!value && option.defaultValue !==undefined) { + value=option.defaultValue; + } + options[optionName]=value; + } + } + return options; + }; + this.constructCallArgs=function OSF_DAA_ApiMethodCall$ConstructCallArgs(required, options, caller, stateInfo) { + var callArgs={}; + for (var r in required) { + callArgs[r]=required[r]; + } + for (var o in options) { + callArgs[o]=options[o]; + } + for (var s in privateStateCallbacks) { + callArgs[s]=privateStateCallbacks[s](caller, stateInfo); + } + if (checkCallArgs) { + callArgs=checkCallArgs(callArgs, caller, stateInfo); + } + return callArgs; + }; +}; +OSF.OUtil.setNamespace("AsyncResultEnum", OSF.DDA); +OSF.DDA.AsyncResultEnum.Properties={ + Context: "Context", + Value: "Value", + Status: "Status", + Error: "Error" +}; +Microsoft.Office.WebExtension.AsyncResultStatus={ + Succeeded: "succeeded", + Failed: "failed" +}; +OSF.DDA.AsyncResultEnum.ErrorCode={ + Success: 0, + Failed: 1 +}; +OSF.DDA.AsyncResultEnum.ErrorProperties={ + Name: "Name", + Message: "Message", + Code: "Code" +}; +OSF.DDA.AsyncMethodNames={}; +OSF.DDA.AsyncMethodNames.addNames=function (methodNames) { + for (var entry in methodNames) { + var am={}; + OSF.OUtil.defineEnumerableProperties(am, { + "id": { + value: entry + }, + "displayName": { + value: methodNames[entry] + } + }); + OSF.DDA.AsyncMethodNames[entry]=am; + } +}; +OSF.DDA.AsyncMethodCall=function OSF_DDA_AsyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, onSucceeded, onFailed, checkCallArgs, displayName) { + var requiredCount=requiredParameters.length; + var apiMethods=new OSF.DDA.ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName); + function OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) { + if (userArgs.length > requiredCount+2) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); + } + var options, parameterCallback; + for (var i=userArgs.length - 1; i >=requiredCount; i--) { + var argument=userArgs[i]; + switch (typeof argument) { + case "object": + if (options) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); + } + else { + options=argument; + } + break; + case "function": + if (parameterCallback) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction); + } + else { + parameterCallback=argument; + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); + break; + } + } + options=apiMethods.fillOptions(options, requiredArgs, caller, stateInfo); + if (parameterCallback) { + if (options[Microsoft.Office.WebExtension.Parameters.Callback]) { + throw Strings.OfficeOM.L_RedundantCallbackSpecification; + } + else { + options[Microsoft.Office.WebExtension.Parameters.Callback]=parameterCallback; + } + } + apiMethods.verifyArguments(supportedOptions, options); + return options; + } + ; + this.verifyAndExtractCall=function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) { + var required=apiMethods.extractRequiredArguments(userArgs, caller, stateInfo); + var options=OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, required, caller, stateInfo); + var callArgs=apiMethods.constructCallArgs(required, options, caller, stateInfo); + return callArgs; + }; + this.processResponse=function OSF_DAA_AsyncMethodCall$ProcessResponse(status, response, caller, callArgs) { + var payload; + if (status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (onSucceeded) { + payload=onSucceeded(response, caller, callArgs); + } + else { + payload=response; + } + } + else { + if (onFailed) { + payload=onFailed(status, response); + } + else { + payload=OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + } + return payload; + }; + this.getCallArgs=function (suppliedArgs) { + var options, parameterCallback; + for (var i=suppliedArgs.length - 1; i >=requiredCount; i--) { + var argument=suppliedArgs[i]; + switch (typeof argument) { + case "object": + options=argument; + break; + case "function": + parameterCallback=argument; + break; + } + } + options=options || {}; + if (parameterCallback) { + options[Microsoft.Office.WebExtension.Parameters.Callback]=parameterCallback; + } + return options; + }; +}; +OSF.DDA.AsyncMethodCallFactory=(function () { + return { + manufacture: function (params) { + var supportedOptions=params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + var privateStateCallbacks=params.privateStateCallbacks ? OSF.OUtil.createObject(params.privateStateCallbacks) : []; + return new OSF.DDA.AsyncMethodCall(params.requiredArguments || [], supportedOptions, privateStateCallbacks, params.onSucceeded, params.onFailed, params.checkCallArgs, params.method.displayName); + } + }; +})(); +OSF.DDA.AsyncMethodCalls={}; +OSF.DDA.AsyncMethodCalls.define=function (callDefinition) { + OSF.DDA.AsyncMethodCalls[callDefinition.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(callDefinition); +}; +OSF.DDA.Error=function OSF_DDA_Error(name, message, code) { + OSF.OUtil.defineEnumerableProperties(this, { + "name": { + value: name + }, + "message": { + value: message + }, + "code": { + value: code + } + }); +}; +OSF.DDA.AsyncResult=function OSF_DDA_AsyncResult(initArgs, errorArgs) { + OSF.OUtil.defineEnumerableProperties(this, { + "value": { + value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Value] + }, + "status": { + value: errorArgs ? Microsoft.Office.WebExtension.AsyncResultStatus.Failed : Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded + } + }); + if (initArgs[OSF.DDA.AsyncResultEnum.Properties.Context]) { + OSF.OUtil.defineEnumerableProperty(this, "asyncContext", { + value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Context] + }); + } + if (errorArgs) { + OSF.OUtil.defineEnumerableProperty(this, "error", { + value: new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]) + }); + } +}; +OSF.DDA.issueAsyncResult=function OSF_DDA$IssueAsyncResult(callArgs, status, payload) { + var callback=callArgs[Microsoft.Office.WebExtension.Parameters.Callback]; + if (callback) { + var asyncInitArgs={}; + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Context]=callArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; + var errorArgs; + if (status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Value]=payload; + } + else { + errorArgs={}; + payload=payload || OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=payload.message || payload; + } + callback(new OSF.DDA.AsyncResult(asyncInitArgs, errorArgs)); + } +}; +OSF.DDA.SyncMethodNames={}; +OSF.DDA.SyncMethodNames.addNames=function (methodNames) { + for (var entry in methodNames) { + var am={}; + OSF.OUtil.defineEnumerableProperties(am, { + "id": { + value: entry + }, + "displayName": { + value: methodNames[entry] + } + }); + OSF.DDA.SyncMethodNames[entry]=am; + } +}; +OSF.DDA.SyncMethodCall=function OSF_DDA_SyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { + var requiredCount=requiredParameters.length; + var apiMethods=new OSF.DDA.ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName); + function OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) { + if (userArgs.length > requiredCount+1) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); + } + var options, parameterCallback; + for (var i=userArgs.length - 1; i >=requiredCount; i--) { + var argument=userArgs[i]; + switch (typeof argument) { + case "object": + if (options) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); + } + else { + options=argument; + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); + break; + } + } + options=apiMethods.fillOptions(options, requiredArgs, caller, stateInfo); + apiMethods.verifyArguments(supportedOptions, options); + return options; + } + ; + this.verifyAndExtractCall=function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) { + var required=apiMethods.extractRequiredArguments(userArgs, caller, stateInfo); + var options=OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, required, caller, stateInfo); + var callArgs=apiMethods.constructCallArgs(required, options, caller, stateInfo); + return callArgs; + }; +}; +OSF.DDA.SyncMethodCallFactory=(function () { + return { + manufacture: function (params) { + var supportedOptions=params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + return new OSF.DDA.SyncMethodCall(params.requiredArguments || [], supportedOptions, params.privateStateCallbacks, params.checkCallArgs, params.method.displayName); + } + }; +})(); +OSF.DDA.SyncMethodCalls={}; +OSF.DDA.SyncMethodCalls.define=function (callDefinition) { + OSF.DDA.SyncMethodCalls[callDefinition.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(callDefinition); +}; +OSF.DDA.ListType=(function () { + var listTypes={}; + return { + setListType: function OSF_DDA_ListType$AddListType(t, prop) { listTypes[t]=prop; }, + isListType: function OSF_DDA_ListType$IsListType(t) { return OSF.OUtil.listContainsKey(listTypes, t); }, + getDescriptor: function OSF_DDA_ListType$getDescriptor(t) { return listTypes[t]; } + }; +})(); +OSF.DDA.HostParameterMap=function (specialProcessor, mappings) { + var toHostMap="toHost"; + var fromHostMap="fromHost"; + var sourceData="sourceData"; + var self="self"; + var dynamicTypes={}; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]={ + toHost: function (data) { + if (data !=null && data.rows !==undefined) { + var tableData={}; + tableData[OSF.DDA.TableDataProperties.TableRows]=data.rows; + tableData[OSF.DDA.TableDataProperties.TableHeaders]=data.headers; + data=tableData; + } + return data; + }, + fromHost: function (args) { + return args; + } + }; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.SampleData]=dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]; + function mapValues(preimageSet, mapping) { + var ret=preimageSet ? {} : undefined; + for (var entry in preimageSet) { + var preimage=preimageSet[entry]; + var image; + if (OSF.DDA.ListType.isListType(entry)) { + image=[]; + for (var subEntry in preimage) { + image.push(mapValues(preimage[subEntry], mapping)); + } + } + else if (OSF.OUtil.listContainsKey(dynamicTypes, entry)) { + image=dynamicTypes[entry][mapping](preimage); + } + else if (mapping==fromHostMap && specialProcessor.preserveNesting(entry)) { + image=mapValues(preimage, mapping); + } + else { + var maps=mappings[entry]; + if (maps) { + var map=maps[mapping]; + if (map) { + image=map[preimage]; + if (image===undefined) { + image=preimage; + } + } + } + else { + image=preimage; + } + } + ret[entry]=image; + } + return ret; + } + ; + function generateArguments(imageSet, parameters) { + var ret; + for (var param in parameters) { + var arg; + if (specialProcessor.isComplexType(param)) { + arg=generateArguments(imageSet, mappings[param][toHostMap]); + } + else { + arg=imageSet[param]; + } + if (arg !=undefined) { + if (!ret) { + ret={}; + } + var index=parameters[param]; + if (index==self) { + index=param; + } + ret[index]=specialProcessor.pack(param, arg); + } + } + return ret; + } + ; + function extractArguments(source, parameters, extracted) { + if (!extracted) { + extracted={}; + } + for (var param in parameters) { + var index=parameters[param]; + var value; + if (index==self) { + value=source; + } + else if (index==sourceData) { + extracted[param]=source.toArray(); + continue; + } + else { + value=source[index]; + } + if (value===null || value===undefined) { + extracted[param]=undefined; + } + else { + value=specialProcessor.unpack(param, value); + var map; + if (specialProcessor.isComplexType(param)) { + map=mappings[param][fromHostMap]; + if (specialProcessor.preserveNesting(param)) { + extracted[param]=extractArguments(value, map); + } + else { + extractArguments(value, map, extracted); + } + } + else { + if (OSF.DDA.ListType.isListType(param)) { + map={}; + var entryDescriptor=OSF.DDA.ListType.getDescriptor(param); + map[entryDescriptor]=self; + var extractedValues=new Array(value.length); + for (var item in value) { + extractedValues[item]=extractArguments(value[item], map); + } + extracted[param]=extractedValues; + } + else { + extracted[param]=value; + } + } + } + } + return extracted; + } + ; + function applyMap(mapName, preimage, mapping) { + var parameters=mappings[mapName][mapping]; + var image; + if (mapping=="toHost") { + var imageSet=mapValues(preimage, mapping); + image=generateArguments(imageSet, parameters); + } + else if (mapping=="fromHost") { + var argumentSet=extractArguments(preimage, parameters); + image=mapValues(argumentSet, mapping); + } + return image; + } + ; + if (!mappings) { + mappings={}; + } + this.addMapping=function (mapName, description) { + var toHost, fromHost; + if (description.map) { + toHost=description.map; + fromHost={}; + for (var preimage in toHost) { + var image=toHost[preimage]; + if (image==self) { + image=preimage; + } + fromHost[image]=preimage; + } + } + else { + toHost=description.toHost; + fromHost=description.fromHost; + } + var pair=mappings[mapName]; + if (pair) { + var currMap=pair[toHostMap]; + for (var th in currMap) + toHost[th]=currMap[th]; + currMap=pair[fromHostMap]; + for (var fh in currMap) + fromHost[fh]=currMap[fh]; + } + else { + pair=mappings[mapName]={}; + } + pair[toHostMap]=toHost; + pair[fromHostMap]=fromHost; + }; + this.toHost=function (mapName, preimage) { return applyMap(mapName, preimage, toHostMap); }; + this.fromHost=function (mapName, image) { return applyMap(mapName, image, fromHostMap); }; + this.self=self; + this.sourceData=sourceData; + this.addComplexType=function (ct) { specialProcessor.addComplexType(ct); }; + this.getDynamicType=function (dt) { return specialProcessor.getDynamicType(dt); }; + this.setDynamicType=function (dt, handler) { specialProcessor.setDynamicType(dt, handler); }; + this.dynamicTypes=dynamicTypes; + this.doMapValues=function (preimageSet, mapping) { return mapValues(preimageSet, mapping); }; +}; +OSF.DDA.SpecialProcessor=function (complexTypes, dynamicTypes) { + this.addComplexType=function OSF_DDA_SpecialProcessor$addComplexType(ct) { + complexTypes.push(ct); + }; + this.getDynamicType=function OSF_DDA_SpecialProcessor$getDynamicType(dt) { + return dynamicTypes[dt]; + }; + this.setDynamicType=function OSF_DDA_SpecialProcessor$setDynamicType(dt, handler) { + dynamicTypes[dt]=handler; + }; + this.isComplexType=function OSF_DDA_SpecialProcessor$isComplexType(t) { + return OSF.OUtil.listContainsValue(complexTypes, t); + }; + this.isDynamicType=function OSF_DDA_SpecialProcessor$isDynamicType(p) { + return OSF.OUtil.listContainsKey(dynamicTypes, p); + }; + this.preserveNesting=function OSF_DDA_SpecialProcessor$preserveNesting(p) { + var pn=[]; + if (OSF.DDA.PropertyDescriptors) + pn.push(OSF.DDA.PropertyDescriptors.Subset); + if (OSF.DDA.DataNodeEventProperties) { + pn=pn.concat([ + OSF.DDA.DataNodeEventProperties.OldNode, + OSF.DDA.DataNodeEventProperties.NewNode, + OSF.DDA.DataNodeEventProperties.NextSiblingNode + ]); + } + return OSF.OUtil.listContainsValue(pn, p); + }; + this.pack=function OSF_DDA_SpecialProcessor$pack(param, arg) { + var value; + if (this.isDynamicType(param)) { + value=dynamicTypes[param].toHost(arg); + } + else { + value=arg; + } + return value; + }; + this.unpack=function OSF_DDA_SpecialProcessor$unpack(param, arg) { + var value; + if (this.isDynamicType(param)) { + value=dynamicTypes[param].fromHost(arg); + } + else { + value=arg; + } + return value; + }; +}; +OSF.DDA.getDecoratedParameterMap=function (specialProcessor, initialDefs) { + var parameterMap=new OSF.DDA.HostParameterMap(specialProcessor); + var self=parameterMap.self; + function createObject(properties) { + var obj=null; + if (properties) { + obj={}; + var len=properties.length; + for (var i=0; i < len; i++) { + obj[properties[i].name]=properties[i].value; + } + } + return obj; + } + parameterMap.define=function define(definition) { + var args={}; + var toHost=createObject(definition.toHost); + if (definition.invertible) { + args.map=toHost; + } + else if (definition.canonical) { + args.toHost=args.fromHost=toHost; + } + else { + args.toHost=toHost; + args.fromHost=createObject(definition.fromHost); + } + parameterMap.addMapping(definition.type, args); + if (definition.isComplexType) + parameterMap.addComplexType(definition.type); + }; + for (var id in initialDefs) + parameterMap.define(initialDefs[id]); + return parameterMap; +}; +OSF.OUtil.setNamespace("DispIdHost", OSF.DDA); +OSF.DDA.DispIdHost.Methods={ + InvokeMethod: "invokeMethod", + AddEventHandler: "addEventHandler", + RemoveEventHandler: "removeEventHandler", + OpenDialog: "openDialog", + CloseDialog: "closeDialog", + MessageParent: "messageParent", + SendMessage: "sendMessage" +}; +OSF.DDA.DispIdHost.Delegates={ + ExecuteAsync: "executeAsync", + RegisterEventAsync: "registerEventAsync", + UnregisterEventAsync: "unregisterEventAsync", + ParameterMap: "parameterMap", + OpenDialog: "openDialog", + CloseDialog: "closeDialog", + MessageParent: "messageParent", + SendMessage: "sendMessage" +}; +OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, parameterMap) { + var dispIdMap={}; + var jsom=OSF.DDA.AsyncMethodNames; + var did=OSF.DDA.MethodDispId; + var methodMap={ + "GoToByIdAsync": did.dispidNavigateToMethod, + "GetSelectedDataAsync": did.dispidGetSelectedDataMethod, + "SetSelectedDataAsync": did.dispidSetSelectedDataMethod, + "GetDocumentCopyChunkAsync": did.dispidGetDocumentCopyChunkMethod, + "ReleaseDocumentCopyAsync": did.dispidReleaseDocumentCopyMethod, + "GetDocumentCopyAsync": did.dispidGetDocumentCopyMethod, + "AddFromSelectionAsync": did.dispidAddBindingFromSelectionMethod, + "AddFromPromptAsync": did.dispidAddBindingFromPromptMethod, + "AddFromNamedItemAsync": did.dispidAddBindingFromNamedItemMethod, + "GetAllAsync": did.dispidGetAllBindingsMethod, + "GetByIdAsync": did.dispidGetBindingMethod, + "ReleaseByIdAsync": did.dispidReleaseBindingMethod, + "GetDataAsync": did.dispidGetBindingDataMethod, + "SetDataAsync": did.dispidSetBindingDataMethod, + "AddRowsAsync": did.dispidAddRowsMethod, + "AddColumnsAsync": did.dispidAddColumnsMethod, + "DeleteAllDataValuesAsync": did.dispidClearAllRowsMethod, + "RefreshAsync": did.dispidLoadSettingsMethod, + "SaveAsync": did.dispidSaveSettingsMethod, + "GetActiveViewAsync": did.dispidGetActiveViewMethod, + "GetFilePropertiesAsync": did.dispidGetFilePropertiesMethod, + "GetOfficeThemeAsync": did.dispidGetOfficeThemeMethod, + "GetDocumentThemeAsync": did.dispidGetDocumentThemeMethod, + "ClearFormatsAsync": did.dispidClearFormatsMethod, + "SetTableOptionsAsync": did.dispidSetTableOptionsMethod, + "SetFormatsAsync": did.dispidSetFormatsMethod, + "GetAccessTokenAsync": did.dispidGetAccessTokenMethod, + "ExecuteRichApiRequestAsync": did.dispidExecuteRichApiRequestMethod, + "AppCommandInvocationCompletedAsync": did.dispidAppCommandInvocationCompletedMethod, + "CloseContainerAsync": did.dispidCloseContainerMethod, + "AddDataPartAsync": did.dispidAddDataPartMethod, + "GetDataPartByIdAsync": did.dispidGetDataPartByIdMethod, + "GetDataPartsByNameSpaceAsync": did.dispidGetDataPartsByNamespaceMethod, + "GetPartXmlAsync": did.dispidGetDataPartXmlMethod, + "GetPartNodesAsync": did.dispidGetDataPartNodesMethod, + "DeleteDataPartAsync": did.dispidDeleteDataPartMethod, + "GetNodeValueAsync": did.dispidGetDataNodeValueMethod, + "GetNodeXmlAsync": did.dispidGetDataNodeXmlMethod, + "GetRelativeNodesAsync": did.dispidGetDataNodesMethod, + "SetNodeValueAsync": did.dispidSetDataNodeValueMethod, + "SetNodeXmlAsync": did.dispidSetDataNodeXmlMethod, + "AddDataPartNamespaceAsync": did.dispidAddDataNamespaceMethod, + "GetDataPartNamespaceAsync": did.dispidGetDataUriByPrefixMethod, + "GetDataPartPrefixAsync": did.dispidGetDataPrefixByUriMethod, + "GetNodeTextAsync": did.dispidGetDataNodeTextMethod, + "SetNodeTextAsync": did.dispidSetDataNodeTextMethod, + "GetSelectedTask": did.dispidGetSelectedTaskMethod, + "GetTask": did.dispidGetTaskMethod, + "GetWSSUrl": did.dispidGetWSSUrlMethod, + "GetTaskField": did.dispidGetTaskFieldMethod, + "GetSelectedResource": did.dispidGetSelectedResourceMethod, + "GetResourceField": did.dispidGetResourceFieldMethod, + "GetProjectField": did.dispidGetProjectFieldMethod, + "GetSelectedView": did.dispidGetSelectedViewMethod, + "GetTaskByIndex": did.dispidGetTaskByIndexMethod, + "GetResourceByIndex": did.dispidGetResourceByIndexMethod, + "SetTaskField": did.dispidSetTaskFieldMethod, + "SetResourceField": did.dispidSetResourceFieldMethod, + "GetMaxTaskIndex": did.dispidGetMaxTaskIndexMethod, + "GetMaxResourceIndex": did.dispidGetMaxResourceIndexMethod, + "CreateTask": did.dispidCreateTaskMethod + }; + for (var method in methodMap) { + if (jsom[method]) { + dispIdMap[jsom[method].id]=methodMap[method]; + } + } + jsom=OSF.DDA.SyncMethodNames; + did=OSF.DDA.MethodDispId; + var asyncMethodMap={ + "MessageParent": did.dispidMessageParentMethod, + "SendMessage": did.dispidSendMessageMethod + }; + for (var method in asyncMethodMap) { + if (jsom[method]) { + dispIdMap[jsom[method].id]=asyncMethodMap[method]; + } + } + jsom=Microsoft.Office.WebExtension.EventType; + did=OSF.DDA.EventDispId; + var eventMap={ + "SettingsChanged": did.dispidSettingsChangedEvent, + "DocumentSelectionChanged": did.dispidDocumentSelectionChangedEvent, + "BindingSelectionChanged": did.dispidBindingSelectionChangedEvent, + "BindingDataChanged": did.dispidBindingDataChangedEvent, + "ActiveViewChanged": did.dispidActiveViewChangedEvent, + "OfficeThemeChanged": did.dispidOfficeThemeChangedEvent, + "DocumentThemeChanged": did.dispidDocumentThemeChangedEvent, + "AppCommandInvoked": did.dispidAppCommandInvokedEvent, + "DialogMessageReceived": did.dispidDialogMessageReceivedEvent, + "DialogParentMessageReceived": did.dispidDialogParentMessageReceivedEvent, + "ObjectDeleted": did.dispidObjectDeletedEvent, + "ObjectSelectionChanged": did.dispidObjectSelectionChangedEvent, + "ObjectDataChanged": did.dispidObjectDataChangedEvent, + "ContentControlAdded": did.dispidContentControlAddedEvent, + "RichApiMessage": did.dispidRichApiMessageEvent, + "ItemChanged": did.dispidOlkItemSelectedChangedEvent, + "RecipientsChanged": did.dispidOlkRecipientsChangedEvent, + "AppointmentTimeChanged": did.dispidOlkAppointmentTimeChangedEvent, + "TaskSelectionChanged": did.dispidTaskSelectionChangedEvent, + "ResourceSelectionChanged": did.dispidResourceSelectionChangedEvent, + "ViewSelectionChanged": did.dispidViewSelectionChangedEvent, + "DataNodeInserted": did.dispidDataNodeAddedEvent, + "DataNodeReplaced": did.dispidDataNodeReplacedEvent, + "DataNodeDeleted": did.dispidDataNodeDeletedEvent + }; + for (var event in eventMap) { + if (jsom[event]) { + dispIdMap[jsom[event]]=eventMap[event]; + } + } + function IsObjectEvent(dispId) { + return (dispId==OSF.DDA.EventDispId.dispidObjectDeletedEvent || + dispId==OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent || + dispId==OSF.DDA.EventDispId.dispidObjectDataChangedEvent || + dispId==OSF.DDA.EventDispId.dispidContentControlAddedEvent); + } + function onException(ex, asyncMethodCall, suppliedArgs, callArgs) { + if (typeof ex=="number") { + if (!callArgs) { + callArgs=asyncMethodCall.getCallArgs(suppliedArgs); + } + OSF.DDA.issueAsyncResult(callArgs, ex, OSF.DDA.ErrorCodeManager.getErrorArgs(ex)); + } + else { + throw ex; + } + } + ; + this[OSF.DDA.DispIdHost.Methods.InvokeMethod]=function OSF_DDA_DispIdHost_Facade$InvokeMethod(method, suppliedArguments, caller, privateState) { + var callArgs; + try { + var methodName=method.id; + var asyncMethodCall=OSF.DDA.AsyncMethodCalls[methodName]; + callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, privateState); + var dispId=dispIdMap[methodName]; + var delegate=getDelegateMethods(methodName); + var richApiInExcelMethodSubstitution=null; + if (window.Excel && window.Office.context.requirements.isSetSupported("RedirectV1Api")) { + window.Excel._RedirectV1APIs=true; + } + if (window.Excel && window.Excel._RedirectV1APIs && (richApiInExcelMethodSubstitution=window.Excel._V1APIMap[methodName])) { + var preprocessedCallArgs=OSF.OUtil.shallowCopy(callArgs); + delete preprocessedCallArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; + if (richApiInExcelMethodSubstitution.preprocess) { + preprocessedCallArgs=richApiInExcelMethodSubstitution.preprocess(preprocessedCallArgs); + } + var ctx=new window.Excel.RequestContext(); + var result=richApiInExcelMethodSubstitution.call(ctx, preprocessedCallArgs); + ctx.sync() + .then(function () { + var response=result.value; + var status=response.status; + delete response["status"]; + delete response["@odata.type"]; + if (richApiInExcelMethodSubstitution.postprocess) { + response=richApiInExcelMethodSubstitution.postprocess(response, preprocessedCallArgs); + } + if (status !=0) { + response=OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, response); + })["catch"](function (error) { + OSF.DDA.issueAsyncResult(callArgs, OSF.DDA.ErrorCodeManager.errorCodes.ooeFailure, null); + }); + } + else { + var hostCallArgs; + if (parameterMap.toHost) { + hostCallArgs=parameterMap.toHost(dispId, callArgs); + } + else { + hostCallArgs=callArgs; + } + var startTime=(new Date()).getTime(); + delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ + "dispId": dispId, + "hostCallArgs": hostCallArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { }, + "onComplete": function (status, hostResponseArgs) { + var responseArgs; + if (status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (parameterMap.fromHost) { + responseArgs=parameterMap.fromHost(dispId, hostResponseArgs); + } + else { + responseArgs=hostResponseArgs; + } + } + else { + responseArgs=hostResponseArgs; + } + var payload=asyncMethodCall.processResponse(status, responseArgs, caller, callArgs); + OSF.DDA.issueAsyncResult(callArgs, status, payload); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(dispId, hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); + } + } + }); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.AddEventHandler]=function OSF_DDA_DispIdHost_Facade$AddEventHandler(suppliedArguments, eventDispatch, caller, isPopupWindow) { + var callArgs; + var eventType, handler; + var isObjectEvent=false; + function onEnsureRegistration(status) { + if (status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + var added=!isObjectEvent ? eventDispatch.addEventHandler(eventType, handler) : + eventDispatch.addObjectEventHandler(eventType, callArgs[Microsoft.Office.WebExtension.Parameters.Id], handler); + if (!added) { + status=OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed; + } + } + var error; + if (status !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + error=OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, error); + } + try { + var asyncMethodCall=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id]; + callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + eventType=callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + handler=callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + if (isPopupWindow) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + return; + } + var dispId=dispIdMap[eventType]; + isObjectEvent=IsObjectEvent(dispId); + var targetId=(isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); + var count=isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId) : eventDispatch.getEventHandlerCount(eventType); + if (count==0) { + var invoker=getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; + invoker({ + "eventType": eventType, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration, + "onEvent": function handleEvent(hostArgs) { + var args=parameterMap.fromHost(dispId, hostArgs); + if (!isObjectEvent) + eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType, caller, args)); + else + eventDispatch.fireObjectEvent(targetId, OSF.DDA.OMFactory.manufactureEventArgs(eventType, targetId, args)); + } + }); + } + else { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]=function OSF_DDA_DispIdHost_Facade$RemoveEventHandler(suppliedArguments, eventDispatch, caller) { + var callArgs; + var eventType, handler; + var isObjectEvent=false; + function onEnsureRegistration(status) { + var error; + if (status !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + error=OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, error); + } + try { + var asyncMethodCall=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id]; + callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + eventType=callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + handler=callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + var dispId=dispIdMap[eventType]; + isObjectEvent=IsObjectEvent(dispId); + var targetId=(isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); + var status, removeSuccess; + if (handler===null) { + removeSuccess=isObjectEvent ? eventDispatch.clearObjectEventHandlers(eventType, targetId) : eventDispatch.clearEventHandlers(eventType); + status=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; + } + else { + removeSuccess=isObjectEvent ? eventDispatch.removeObjectEventHandler(eventType, targetId, handler) : eventDispatch.removeEventHandler(eventType, handler); + status=removeSuccess ? OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess : OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist; + } + var count=isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId) : eventDispatch.getEventHandlerCount(eventType); + if (removeSuccess && count==0) { + var invoker=getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; + invoker({ + "eventType": eventType, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration + }); + } + else { + onEnsureRegistration(status); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.OpenDialog]=function OSF_DDA_DispIdHost_Facade$OpenDialog(suppliedArguments, eventDispatch, caller) { + var callArgs; + var targetId; + var dialogMessageEvent=Microsoft.Office.WebExtension.EventType.DialogMessageReceived; + var dialogOtherEvent=Microsoft.Office.WebExtension.EventType.DialogEventReceived; + function onEnsureRegistration(status) { + var payload; + if (status !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + payload=OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + else { + var onSucceedArgs={}; + onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Id]=targetId; + onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Data]=eventDispatch; + var payload=asyncMethodCall.processResponse(status, onSucceedArgs, caller, callArgs); + OSF.DialogShownStatus.hasDialogShown=true; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + } + OSF.DDA.issueAsyncResult(callArgs, status, payload); + } + try { + if (dialogMessageEvent==undefined || dialogOtherEvent==undefined) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported); + } + if (OSF.DDA.AsyncMethodNames.DisplayDialogAsync==null) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + return; + } + var asyncMethodCall=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id]; + callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + var dispId=dispIdMap[dialogMessageEvent]; + var delegateMethods=getDelegateMethods(dialogMessageEvent); + var invoker=delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] !=undefined ? + delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] : + delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; + targetId=JSON.stringify(callArgs); + if (!OSF.DialogShownStatus.hasDialogShown) { + eventDispatch.clearQueuedEvent(dialogMessageEvent); + eventDispatch.clearQueuedEvent(dialogOtherEvent); + eventDispatch.clearQueuedEvent(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived); + } + invoker({ + "eventType": dialogMessageEvent, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration, + "onEvent": function handleEvent(hostArgs) { + var args=parameterMap.fromHost(dispId, hostArgs); + var event=OSF.DDA.OMFactory.manufactureEventArgs(dialogMessageEvent, caller, args); + if (event.type==dialogOtherEvent) { + var payload=OSF.DDA.ErrorCodeManager.getErrorArgs(event.error); + var errorArgs={}; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=payload.message || payload; + event.error=new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]); + } + eventDispatch.fireOrQueueEvent(event); + if (args[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogClosed) { + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + eventDispatch.clearEventHandlers(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived); + OSF.DialogShownStatus.hasDialogShown=false; + } + } + }); + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.CloseDialog]=function OSF_DDA_DispIdHost_Facade$CloseDialog(suppliedArguments, targetId, eventDispatch, caller) { + var callArgs; + var dialogMessageEvent, dialogOtherEvent; + var closeStatus=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; + function closeCallback(status) { + closeStatus=status; + OSF.DialogShownStatus.hasDialogShown=false; + } + try { + var asyncMethodCall=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id]; + callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + dialogMessageEvent=Microsoft.Office.WebExtension.EventType.DialogMessageReceived; + dialogOtherEvent=Microsoft.Office.WebExtension.EventType.DialogEventReceived; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + var dispId=dispIdMap[dialogMessageEvent]; + var delegateMethods=getDelegateMethods(dialogMessageEvent); + var invoker=delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] !=undefined ? + delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] : + delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; + invoker({ + "eventType": dialogMessageEvent, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": closeCallback + }); + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + if (closeStatus !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed, OSF.DDA.AsyncMethodNames.CloseAsync.displayName, closeStatus); + } + }; + this[OSF.DDA.DispIdHost.Methods.MessageParent]=function OSF_DDA_DispIdHost_Facade$MessageParent(suppliedArguments, caller) { + var stateInfo={}; + var syncMethodCall=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id]; + var callArgs=syncMethodCall.verifyAndExtractCall(suppliedArguments, caller, stateInfo); + var delegate=getDelegateMethods(OSF.DDA.SyncMethodNames.MessageParent.id); + var invoker=delegate[OSF.DDA.DispIdHost.Delegates.MessageParent]; + var dispId=dispIdMap[OSF.DDA.SyncMethodNames.MessageParent.id]; + return invoker({ + "dispId": dispId, + "hostCallArgs": callArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); } + }); + }; + this[OSF.DDA.DispIdHost.Methods.SendMessage]=function OSF_DDA_DispIdHost_Facade$SendMessage(suppliedArguments, eventDispatch, caller) { + var stateInfo={}; + var syncMethodCall=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.SendMessage.id]; + var callArgs=syncMethodCall.verifyAndExtractCall(suppliedArguments, caller, stateInfo); + var delegate=getDelegateMethods(OSF.DDA.SyncMethodNames.SendMessage.id); + var invoker=delegate[OSF.DDA.DispIdHost.Delegates.SendMessage]; + var dispId=dispIdMap[OSF.DDA.SyncMethodNames.SendMessage.id]; + return invoker({ + "dispId": dispId, + "hostCallArgs": callArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); } + }); + }; +}; +OSF.DDA.DispIdHost.addAsyncMethods=function OSF_DDA_DispIdHost$AddAsyncMethods(target, asyncMethodNames, privateState) { + for (var entry in asyncMethodNames) { + var method=asyncMethodNames[entry]; + var name=method.displayName; + if (!target[name]) { + OSF.OUtil.defineEnumerableProperty(target, name, { + value: (function (asyncMethod) { + return function () { + var invokeMethod=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod]; + invokeMethod(asyncMethod, arguments, target, privateState); + }; + })(method) + }); + } + } +}; +OSF.DDA.DispIdHost.addEventSupport=function OSF_DDA_DispIdHost$AddEventSupport(target, eventDispatch, isPopupWindow) { + var add=OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName; + var remove=OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName; + if (!target[add]) { + OSF.OUtil.defineEnumerableProperty(target, add, { + value: function () { + var addEventHandler=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler]; + addEventHandler(arguments, eventDispatch, target, isPopupWindow); + } + }); + } + if (!target[remove]) { + OSF.OUtil.defineEnumerableProperty(target, remove, { + value: function () { + var removeEventHandler=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]; + removeEventHandler(arguments, eventDispatch, target); + } + }); + } +}; +var OfficeExt; +(function (OfficeExt) { + var MsAjaxTypeHelper=(function () { + function MsAjaxTypeHelper() { + } + MsAjaxTypeHelper.isInstanceOfType=function (type, instance) { + if (typeof (instance)==="undefined" || instance===null) + return false; + if (instance instanceof type) + return true; + var instanceType=instance.constructor; + if (!instanceType || (typeof (instanceType) !=="function") || !instanceType.__typeName || instanceType.__typeName==='Object') { + instanceType=Object; + } + return !!(instanceType===type) || + (instanceType.__typeName && type.__typeName && instanceType.__typeName===type.__typeName); + }; + return MsAjaxTypeHelper; + })(); + OfficeExt.MsAjaxTypeHelper=MsAjaxTypeHelper; + var MsAjaxError=(function () { + function MsAjaxError() { + } + MsAjaxError.create=function (message, errorInfo) { + var err=new Error(message); + err.message=message; + if (errorInfo) { + for (var v in errorInfo) { + err[v]=errorInfo[v]; + } + } + err.popStackFrame(); + return err; + }; + MsAjaxError.parameterCount=function (message) { + var displayMessage="Sys.ParameterCountException: "+(message ? message : "Parameter count mismatch."); + var err=MsAjaxError.create(displayMessage, { name: 'Sys.ParameterCountException' }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argument=function (paramName, message) { + var displayMessage="Sys.ArgumentException: "+(message ? message : "Value does not fall within the expected range."); + if (paramName) { + displayMessage+="\n"+MsAjaxString.format("Parameter name: {0}", paramName); + } + var err=MsAjaxError.create(displayMessage, { name: "Sys.ArgumentException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentNull=function (paramName, message) { + var displayMessage="Sys.ArgumentNullException: "+(message ? message : "Value cannot be null."); + if (paramName) { + displayMessage+="\n"+MsAjaxString.format("Parameter name: {0}", paramName); + } + var err=MsAjaxError.create(displayMessage, { name: "Sys.ArgumentNullException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentOutOfRange=function (paramName, actualValue, message) { + var displayMessage="Sys.ArgumentOutOfRangeException: "+(message ? message : "Specified argument was out of the range of valid values."); + if (paramName) { + displayMessage+="\n"+MsAjaxString.format("Parameter name: {0}", paramName); + } + if (typeof (actualValue) !=="undefined" && actualValue !==null) { + displayMessage+="\n"+MsAjaxString.format("Actual value was {0}.", actualValue); + } + var err=MsAjaxError.create(displayMessage, { + name: "Sys.ArgumentOutOfRangeException", + paramName: paramName, + actualValue: actualValue + }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentType=function (paramName, actualType, expectedType, message) { + var displayMessage="Sys.ArgumentTypeException: "; + if (message) { + displayMessage+=message; + } + else if (actualType && expectedType) { + displayMessage+=MsAjaxString.format("Object of type '{0}' cannot be converted to type '{1}'.", actualType.getName ? actualType.getName() : actualType, expectedType.getName ? expectedType.getName() : expectedType); + } + else { + displayMessage+="Object cannot be converted to the required type."; + } + if (paramName) { + displayMessage+="\n"+MsAjaxString.format("Parameter name: {0}", paramName); + } + var err=MsAjaxError.create(displayMessage, { + name: "Sys.ArgumentTypeException", + paramName: paramName, + actualType: actualType, + expectedType: expectedType + }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentUndefined=function (paramName, message) { + var displayMessage="Sys.ArgumentUndefinedException: "+(message ? message : "Value cannot be undefined."); + if (paramName) { + displayMessage+="\n"+MsAjaxString.format("Parameter name: {0}", paramName); + } + var err=MsAjaxError.create(displayMessage, { name: "Sys.ArgumentUndefinedException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.invalidOperation=function (message) { + var displayMessage="Sys.InvalidOperationException: "+(message ? message : "Operation is not valid due to the current state of the object."); + var err=MsAjaxError.create(displayMessage, { name: 'Sys.InvalidOperationException' }); + err.popStackFrame(); + return err; + }; + return MsAjaxError; + })(); + OfficeExt.MsAjaxError=MsAjaxError; + var MsAjaxString=(function () { + function MsAjaxString() { + } + MsAjaxString.format=function (format) { + var args=[]; + for (var _i=1; _i < arguments.length; _i++) { + args[_i - 1]=arguments[_i]; + } + var source=format; + return source.replace(/{(\d+)}/gm, function (match, number) { + var index=parseInt(number, 10); + return args[index]===undefined ? '{'+number+'}' : args[index]; + }); + }; + MsAjaxString.startsWith=function (str, prefix) { + return (str.substr(0, prefix.length)===prefix); + }; + return MsAjaxString; + })(); + OfficeExt.MsAjaxString=MsAjaxString; + var MsAjaxDebug=(function () { + function MsAjaxDebug() { + } + MsAjaxDebug.trace=function (text) { + if (typeof Debug !=="undefined" && Debug.writeln) + Debug.writeln(text); + if (window.console && window.console.log) + window.console.log(text); + if (window.opera && window.opera.postError) + window.opera.postError(text); + if (window.debugService && window.debugService.trace) + window.debugService.trace(text); + var a=document.getElementById("TraceConsole"); + if (a && a.tagName.toUpperCase()==="TEXTAREA") { + a.innerHTML+=text+"\n"; + } + }; + return MsAjaxDebug; + })(); + OfficeExt.MsAjaxDebug=MsAjaxDebug; + if (!OsfMsAjaxFactory.isMsAjaxLoaded()) { + var registerTypeInternal=function registerTypeInternal(type, name, isClass) { + if (type.__typeName===undefined) { + type.__typeName=name; + } + if (type.__class===undefined) { + type.__class=isClass; + } + }; + registerTypeInternal(Function, "Function", true); + registerTypeInternal(Error, "Error", true); + registerTypeInternal(Object, "Object", true); + registerTypeInternal(String, "String", true); + registerTypeInternal(Boolean, "Boolean", true); + registerTypeInternal(Date, "Date", true); + registerTypeInternal(Number, "Number", true); + registerTypeInternal(RegExp, "RegExp", true); + registerTypeInternal(Array, "Array", true); + if (!Function.createCallback) { + Function.createCallback=function Function$createCallback(method, context) { + var e=Function._validateParams(arguments, [ + { name: "method", type: Function }, + { name: "context", mayBeNull: true } + ]); + if (e) + throw e; + return function () { + var l=arguments.length; + if (l > 0) { + var args=[]; + for (var i=0; i < l; i++) { + args[i]=arguments[i]; + } + args[l]=context; + return method.apply(this, args); + } + return method.call(this, context); + }; + }; + } + if (!Function.createDelegate) { + Function.createDelegate=function Function$createDelegate(instance, method) { + var e=Function._validateParams(arguments, [ + { name: "instance", mayBeNull: true }, + { name: "method", type: Function } + ]); + if (e) + throw e; + return function () { + return method.apply(instance, arguments); + }; + }; + } + if (!Function._validateParams) { + Function._validateParams=function (params, expectedParams, validateParameterCount) { + var e, expectedLength=expectedParams.length; + validateParameterCount=validateParameterCount || (typeof (validateParameterCount)==="undefined"); + e=Function._validateParameterCount(params, expectedParams, validateParameterCount); + if (e) { + e.popStackFrame(); + return e; + } + for (var i=0, l=params.length; i < l; i++) { + var expectedParam=expectedParams[Math.min(i, expectedLength - 1)], paramName=expectedParam.name; + if (expectedParam.parameterArray) { + paramName+="["+(i - expectedLength+1)+"]"; + } + else if (!validateParameterCount && (i >=expectedLength)) { + break; + } + e=Function._validateParameter(params[i], expectedParam, paramName); + if (e) { + e.popStackFrame(); + return e; + } + } + return null; + }; + } + if (!Function._validateParameterCount) { + Function._validateParameterCount=function (params, expectedParams, validateParameterCount) { + var i, error, expectedLen=expectedParams.length, actualLen=params.length; + if (actualLen < expectedLen) { + var minParams=expectedLen; + for (i=0; i < expectedLen; i++) { + var param=expectedParams[i]; + if (param.optional || param.parameterArray) { + minParams--; + } + } + if (actualLen < minParams) { + error=true; + } + } + else if (validateParameterCount && (actualLen > expectedLen)) { + error=true; + for (i=0; i < expectedLen; i++) { + if (expectedParams[i].parameterArray) { + error=false; + break; + } + } + } + if (error) { + var e=MsAjaxError.parameterCount(); + e.popStackFrame(); + return e; + } + return null; + }; + } + if (!Function._validateParameter) { + Function._validateParameter=function (param, expectedParam, paramName) { + var e, expectedType=expectedParam.type, expectedInteger=!!expectedParam.integer, expectedDomElement=!!expectedParam.domElement, mayBeNull=!!expectedParam.mayBeNull; + e=Function._validateParameterType(param, expectedType, expectedInteger, expectedDomElement, mayBeNull, paramName); + if (e) { + e.popStackFrame(); + return e; + } + var expectedElementType=expectedParam.elementType, elementMayBeNull=!!expectedParam.elementMayBeNull; + if (expectedType===Array && typeof (param) !=="undefined" && param !==null && + (expectedElementType || !elementMayBeNull)) { + var expectedElementInteger=!!expectedParam.elementInteger, expectedElementDomElement=!!expectedParam.elementDomElement; + for (var i=0; i < param.length; i++) { + var elem=param[i]; + e=Function._validateParameterType(elem, expectedElementType, expectedElementInteger, expectedElementDomElement, elementMayBeNull, paramName+"["+i+"]"); + if (e) { + e.popStackFrame(); + return e; + } + } + } + return null; + }; + } + if (!Function._validateParameterType) { + Function._validateParameterType=function (param, expectedType, expectedInteger, expectedDomElement, mayBeNull, paramName) { + var e, i; + if (typeof (param)==="undefined") { + if (mayBeNull) { + return null; + } + else { + e=OfficeExt.MsAjaxError.argumentUndefined(paramName); + e.popStackFrame(); + return e; + } + } + if (param===null) { + if (mayBeNull) { + return null; + } + else { + e=OfficeExt.MsAjaxError.argumentNull(paramName); + e.popStackFrame(); + return e; + } + } + if (expectedType && !OfficeExt.MsAjaxTypeHelper.isInstanceOfType(expectedType, param)) { + e=OfficeExt.MsAjaxError.argumentType(paramName, typeof (param), expectedType); + e.popStackFrame(); + return e; + } + return null; + }; + } + if (!window.Type) { + window.Type=Function; + } + if (!Type.registerNamespace) { + Type.registerNamespace=function (ns) { + var namespaceParts=ns.split('.'); + var currentNamespace=window; + for (var i=0; i < namespaceParts.length; i++) { + currentNamespace[namespaceParts[i]]=currentNamespace[namespaceParts[i]] || {}; + currentNamespace=currentNamespace[namespaceParts[i]]; + } + }; + } + if (!Type.prototype.registerClass) { + Type.prototype.registerClass=function (cls) { cls={}; }; + } + if (typeof (Sys)==="undefined") { + Type.registerNamespace('Sys'); + } + if (!Error.prototype.popStackFrame) { + Error.prototype.popStackFrame=function () { + if (arguments.length !==0) + throw MsAjaxError.parameterCount(); + if (typeof (this.stack)==="undefined" || this.stack===null || + typeof (this.fileName)==="undefined" || this.fileName===null || + typeof (this.lineNumber)==="undefined" || this.lineNumber===null) { + return; + } + var stackFrames=this.stack.split("\n"); + var currentFrame=stackFrames[0]; + var pattern=this.fileName+":"+this.lineNumber; + while (typeof (currentFrame) !=="undefined" && + currentFrame !==null && + currentFrame.indexOf(pattern)===-1) { + stackFrames.shift(); + currentFrame=stackFrames[0]; + } + var nextFrame=stackFrames[1]; + if (typeof (nextFrame)==="undefined" || nextFrame===null) { + return; + } + var nextFrameParts=nextFrame.match(/@(.*):(\d+)$/); + if (typeof (nextFrameParts)==="undefined" || nextFrameParts===null) { + return; + } + this.fileName=nextFrameParts[1]; + this.lineNumber=parseInt(nextFrameParts[2]); + stackFrames.shift(); + this.stack=stackFrames.join("\n"); + }; + } + OsfMsAjaxFactory.msAjaxError=MsAjaxError; + OsfMsAjaxFactory.msAjaxString=MsAjaxString; + OsfMsAjaxFactory.msAjaxDebug=MsAjaxDebug; + } +})(OfficeExt || (OfficeExt={})); +OSF.OUtil.setNamespace("SafeArray", OSF.DDA); +OSF.DDA.SafeArray.Response={ + Status: 0, + Payload: 1 +}; +OSF.DDA.SafeArray.UniqueArguments={ + Offset: "offset", + Run: "run", + BindingSpecificData: "bindingSpecificData", + MergedCellGuid: "{66e7831f-81b2-42e2-823c-89e872d541b3}" +}; +OSF.OUtil.setNamespace("Delegate", OSF.DDA.SafeArray); +OSF.DDA.SafeArray.Delegate._onException=function OSF_DDA_SafeArray_Delegate$OnException(ex, args) { + var status; + var statusNumber=ex.number; + if (statusNumber) { + switch (statusNumber) { + case -2146828218: + status=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; + break; + case -2147467259: + status=OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened; + break; + case -2146828283: + status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam; + break; + case -2147209089: + status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam; + break; + case -2146827850: + default: + status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + break; + } + } + if (args.onComplete) { + args.onComplete(status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + } +}; +OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod=function OSF_DDA_SafeArray_Delegate$OnExceptionSyncMethod(ex, args) { + var status; + var number=ex.number; + if (number) { + switch (number) { + case -2146828218: + status=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; + break; + case -2146827850: + default: + status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + break; + } + } + return status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; +}; +OSF.DDA.SafeArray.Delegate.SpecialProcessor=function OSF_DDA_SafeArray_Delegate_SpecialProcessor() { + function _2DVBArrayToJaggedArray(vbArr) { + var ret; + try { + var rows=vbArr.ubound(1); + var cols=vbArr.ubound(2); + vbArr=vbArr.toArray(); + if (rows==1 && cols==1) { + ret=[vbArr]; + } + else { + ret=[]; + for (var row=0; row < rows; row++) { + var rowArr=[]; + for (var col=0; col < cols; col++) { + var datum=vbArr[row * cols+col]; + if (datum !=OSF.DDA.SafeArray.UniqueArguments.MergedCellGuid) { + rowArr.push(datum); + } + } + if (rowArr.length > 0) { + ret.push(rowArr); + } + } + } + } + catch (ex) { + } + return ret; + } + var complexTypes=[]; + var dynamicTypes={}; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]=(function () { + var tableRows=0; + var tableHeaders=1; + return { + toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$toHost(data) { + if (OSF.DDA.TableDataProperties && typeof data !="string" && data[OSF.DDA.TableDataProperties.TableRows] !==undefined) { + var tableData=[]; + tableData[tableRows]=data[OSF.DDA.TableDataProperties.TableRows]; + tableData[tableHeaders]=data[OSF.DDA.TableDataProperties.TableHeaders]; + data=tableData; + } + return data; + }, + fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$fromHost(hostArgs) { + var ret; + if (hostArgs.toArray) { + var dimensions=hostArgs.dimensions(); + if (dimensions===2) { + ret=_2DVBArrayToJaggedArray(hostArgs); + } + else { + var array=hostArgs.toArray(); + if (array.length===2 && ((array[0] !=null && array[0].toArray) || (array[1] !=null && array[1].toArray))) { + ret={}; + ret[OSF.DDA.TableDataProperties.TableRows]=_2DVBArrayToJaggedArray(array[tableRows]); + ret[OSF.DDA.TableDataProperties.TableHeaders]=_2DVBArrayToJaggedArray(array[tableHeaders]); + } + else { + ret=array; + } + } + } + else { + ret=hostArgs; + } + return ret; + } + }; + })(); + OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this, complexTypes, dynamicTypes); + this.unpack=function OSF_DDA_SafeArray_Delegate_SpecialProcessor$unpack(param, arg) { + var value; + if (this.isComplexType(param) || OSF.DDA.ListType.isListType(param)) { + var toArraySupported=(arg || typeof arg==="unknown") && arg.toArray; + value=toArraySupported ? arg.toArray() : arg || {}; + } + else if (this.isDynamicType(param)) { + value=dynamicTypes[param].fromHost(arg); + } + else { + value=arg; + } + return value; + }; +}; +OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor, OSF.DDA.SpecialProcessor); +OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor(), [ + { + type: Microsoft.Office.WebExtension.Parameters.ValueFormat, + toHost: [ + { name: Microsoft.Office.WebExtension.ValueFormat.Unformatted, value: 0 }, + { name: Microsoft.Office.WebExtension.ValueFormat.Formatted, value: 1 } + ] + }, + { + type: Microsoft.Office.WebExtension.Parameters.FilterType, + toHost: [ + { name: Microsoft.Office.WebExtension.FilterType.All, value: 0 } + ] + } +]); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.AsyncResultStatus, + fromHost: [ + { name: Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded, value: 0 }, + { name: Microsoft.Office.WebExtension.AsyncResultStatus.Failed, value: 1 } + ] +}); +OSF.DDA.SafeArray.Delegate.executeAsync=function OSF_DDA_SafeArray_Delegate$ExecuteAsync(args) { + function toArray(args) { + var arrArgs=args; + if (OSF.OUtil.isArray(args)) { + var len=arrArgs.length; + for (var i=0; i < len; i++) { + arrArgs[i]=toArray(arrArgs[i]); + } + } + else if (OSF.OUtil.isDate(args)) { + arrArgs=args.getVarDate(); + } + else if (typeof args==="object" && !OSF.OUtil.isArray(args)) { + arrArgs=[]; + for (var index in args) { + if (!OSF.OUtil.isFunction(args[index])) { + arrArgs[index]=toArray(args[index]); + } + } + } + return arrArgs; + } + function fromSafeArray(value) { + var ret=value; + if (value !=null && value.toArray) { + var arrayResult=value.toArray(); + ret=new Array(arrayResult.length); + for (var i=0; i < arrayResult.length; i++) { + ret[i]=fromSafeArray(arrayResult[i]); + } + } + return ret; + } + try { + if (args.onCalling) { + args.onCalling(); + } + OSF.ClientHostController.execute(args.dispId, toArray(args.hostCallArgs), function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode) { + var result=hostResponseArgs.toArray(); + var status=result[OSF.DDA.SafeArray.Response.Status]; + if (status==OSF.DDA.ErrorCodeManager.errorCodes.ooeChunkResult) { + var payload=result[OSF.DDA.SafeArray.Response.Payload]; + payload=fromSafeArray(payload); + if (payload !=null) { + if (!args._chunkResultData) { + args._chunkResultData=new Array(); + } + args._chunkResultData[payload[0]]=payload[1]; + } + return false; + } + if (args.onReceiving) { + args.onReceiving(); + } + if (args.onComplete) { + var payload; + if (status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (result.length > 2) { + payload=[]; + for (var i=1; i < result.length; i++) + payload[i - 1]=result[i]; + } + else { + payload=result[OSF.DDA.SafeArray.Response.Payload]; + } + if (args._chunkResultData) { + payload=fromSafeArray(payload); + if (payload !=null) { + var expectedChunkCount=payload[payload.length - 1]; + if (args._chunkResultData.length==expectedChunkCount) { + payload[payload.length - 1]=args._chunkResultData; + } + else { + status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + } + } + } + } + else { + payload=result[OSF.DDA.SafeArray.Response.Payload]; + } + args.onComplete(status, payload); + } + return true; + }); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent=function OSF_DDA_SafeArrayDelegate$GetOnAfterRegisterEvent(register, args) { + var startTime=(new Date()).getTime(); + return function OSF_DDA_SafeArrayDelegate$OnAfterRegisterEvent(hostResponseArgs) { + if (args.onReceiving) { + args.onReceiving(); + } + var status=hostResponseArgs.toArray ? hostResponseArgs.toArray()[OSF.DDA.SafeArray.Response.Status] : hostResponseArgs; + if (args.onComplete) { + args.onComplete(status); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onRegisterDone(register, args.dispId, Math.abs((new Date()).getTime() - startTime), status); + } + }; +}; +OSF.DDA.SafeArray.Delegate.registerEventAsync=function OSF_DDA_SafeArray_Delegate$RegisterEventAsync(args) { + if (args.onCalling) { + args.onCalling(); + } + var callback=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true, args); + try { + OSF.ClientHostController.registerEvent(args.dispId, args.targetId, function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) { + if (args.onEvent) { + args.onEvent(payload); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onEventDone(args.dispId); + } + }, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate.unregisterEventAsync=function OSF_DDA_SafeArray_Delegate$UnregisterEventAsync(args) { + if (args.onCalling) { + args.onCalling(); + } + var callback=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false, args); + try { + OSF.ClientHostController.unregisterEvent(args.dispId, args.targetId, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.ClientMode={ + ReadWrite: 0, + ReadOnly: 1 +}; +OSF.DDA.RichInitializationReason={ + 1: Microsoft.Office.WebExtension.InitializationReason.Inserted, + 2: Microsoft.Office.WebExtension.InitializationReason.DocumentOpened +}; +OSF.InitializationHelper=function OSF_InitializationHelper(hostInfo, webAppState, context, settings, hostFacade) { + this._hostInfo=hostInfo; + this._webAppState=webAppState; + this._context=context; + this._settings=settings; + this._hostFacade=hostFacade; + this._initializeSettings=this.initializeSettings; +}; +OSF.InitializationHelper.prototype.deserializeSettings=function OSF_InitializationHelper$deserializeSettings(serializedSettings, refreshSupported) { + var settings; + var osfSessionStorage=OSF.OUtil.getSessionStorage(); + if (osfSessionStorage) { + var storageSettings=osfSessionStorage.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey()); + if (storageSettings) { + serializedSettings=JSON.parse(storageSettings); + } + else { + storageSettings=JSON.stringify(serializedSettings); + osfSessionStorage.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(), storageSettings); + } + } + var deserializedSettings=OSF.DDA.SettingsManager.deserializeSettings(serializedSettings); + if (refreshSupported) { + settings=new OSF.DDA.RefreshableSettings(deserializedSettings); + } + else { + settings=new OSF.DDA.Settings(deserializedSettings); + } + return settings; +}; +OSF.InitializationHelper.prototype.saveAndSetDialogInfo=function OSF_InitializationHelper$saveAndSetDialogInfo(hostInfoValue) { +}; +OSF.InitializationHelper.prototype.setAgaveHostCommunication=function OSF_InitializationHelper$setAgaveHostCommunication() { +}; +OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize=function OSF_InitializationHelper$prepareRightBeforeWebExtensionInitialize(appContext) { + this.prepareApiSurface(appContext); + Microsoft.Office.WebExtension.initialize(this.getInitializationReason(appContext)); +}; +OSF.InitializationHelper.prototype.prepareApiSurface=function OSF_InitializationHelper$prepareApiSurfaceAndInitialize(appContext) { + var license=new OSF.DDA.License(appContext.get_eToken()); + var getOfficeThemeHandler=(OSF.DDA.OfficeTheme && OSF.DDA.OfficeTheme.getOfficeTheme) ? OSF.DDA.OfficeTheme.getOfficeTheme : null; + if (appContext.get_isDialog()) { + if (OSF.DDA.UI.ChildUI) { + appContext.ui=new OSF.DDA.UI.ChildUI(); + } + } + else { + if (OSF.DDA.UI.ParentUI) { + appContext.ui=new OSF.DDA.UI.ParentUI(); + if (OfficeExt.Container) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.CloseContainerAsync]); + } + } + } + if (OSF.DDA.Auth) { + appContext.auth=new OSF.DDA.Auth(); + OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth, [OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]); + } + OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(appContext, appContext.doc, license, null, getOfficeThemeHandler)); + var getDelegateMethods, parameterMap; + getDelegateMethods=OSF.DDA.DispIdHost.getClientDelegateMethods; + parameterMap=OSF.DDA.SafeArray.Delegate.ParameterMap; + OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(getDelegateMethods, parameterMap)); +}; +OSF.InitializationHelper.prototype.getInitializationReason=function (appContext) { return OSF.DDA.RichInitializationReason[appContext.get_reason()]; }; +OSF.DDA.DispIdHost.getClientDelegateMethods=function (actionId) { + var delegateMethods={}; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.SafeArray.Delegate.executeAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.SafeArray.Delegate.registerEventAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.SafeArray.Delegate.unregisterEventAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog]=OSF.DDA.SafeArray.Delegate.openDialog; + delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog]=OSF.DDA.SafeArray.Delegate.closeDialog; + delegateMethods[OSF.DDA.DispIdHost.Delegates.MessageParent]=OSF.DDA.SafeArray.Delegate.messageParent; + delegateMethods[OSF.DDA.DispIdHost.Delegates.SendMessage]=OSF.DDA.SafeArray.Delegate.sendMessage; + if (OSF.DDA.AsyncMethodNames.RefreshAsync && actionId==OSF.DDA.AsyncMethodNames.RefreshAsync.id) { + var readSerializedSettings=function (hostCallArgs, onCalling, onReceiving) { + return OSF.DDA.ClientSettingsManager.read(onCalling, onReceiving); + }; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(readSerializedSettings); + } + if (OSF.DDA.AsyncMethodNames.SaveAsync && actionId==OSF.DDA.AsyncMethodNames.SaveAsync.id) { + var writeSerializedSettings=function (hostCallArgs, onCalling, onReceiving) { + return OSF.DDA.ClientSettingsManager.write(hostCallArgs[OSF.DDA.SettingsManager.SerializedSettings], hostCallArgs[Microsoft.Office.WebExtension.Parameters.OverwriteIfStale], onCalling, onReceiving); + }; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(writeSerializedSettings); + } + return delegateMethods; +}; +var OSF=OSF || {}; +var OSFWebView; +(function (OSFWebView) { + var WebViewSafeArray=(function () { + function WebViewSafeArray(data) { + this.data=data; + this.safeArrayFlag=this.isSafeArray(data); + } + WebViewSafeArray.prototype.dimensions=function () { + var dimensions=0; + if (this.safeArrayFlag) { + dimensions=this.data[0][0]; + } + else if (this.isArray()) { + dimensions=2; + } + return dimensions; + }; + WebViewSafeArray.prototype.getItem=function () { + var array=[]; + var element=null; + if (this.safeArrayFlag) { + array=this.toArray(); + } + else { + array=this.data; + } + element=array; + for (var i=0; i < arguments.length; i++) { + element=element[arguments[i]]; + } + return element; + }; + WebViewSafeArray.prototype.lbound=function (dimension) { + return 0; + }; + WebViewSafeArray.prototype.ubound=function (dimension) { + var ubound=0; + if (this.safeArrayFlag) { + ubound=this.data[0][dimension]; + } + else if (this.isArray()) { + if (dimension==1) { + return this.data.length; + } + else if (dimension==2) { + if (OSF.OUtil.isArray(this.data[0])) { + return this.data[0].length; + } + else if (this.data[0] !=null) { + return 1; + } + } + } + return ubound; + }; + WebViewSafeArray.prototype.toArray=function () { + if (this.isArray()==false) { + return this.data; + } + var arr=[]; + var startingIndex=this.safeArrayFlag ? 1 : 0; + for (var i=startingIndex; i < this.data.length; i++) { + var element=this.data[i]; + if (this.isSafeArray(element)) { + arr.push(new WebViewSafeArray(element)); + } + else { + arr.push(element); + } + } + return arr; + }; + WebViewSafeArray.prototype.isArray=function () { + return OSF.OUtil.isArray(this.data); + }; + WebViewSafeArray.prototype.isSafeArray=function (obj) { + var isSafeArray=false; + if (OSF.OUtil.isArray(obj) && OSF.OUtil.isArray(obj[0])) { + var bounds=obj[0]; + var dimensions=bounds[0]; + if (bounds.length !=dimensions+1) { + return false; + } + var expectedArraySize=1; + for (var i=1; i < bounds.length; i++) { + var dimension=bounds[i]; + if (isFinite(dimension)==false) { + return false; + } + expectedArraySize=expectedArraySize * dimension; + } + expectedArraySize++; + isSafeArray=(expectedArraySize==obj.length); + } + return isSafeArray; + }; + return WebViewSafeArray; + })(); + OSFWebView.WebViewSafeArray=WebViewSafeArray; +})(OSFWebView || (OSFWebView={})); +var OSFWebView; +(function (OSFWebView) { + var ScriptMessaging; + (function (ScriptMessaging) { + var scriptMessenger=null; + function agaveHostCallback(callbackId, params) { + scriptMessenger.agaveHostCallback(callbackId, params); + } + ScriptMessaging.agaveHostCallback=agaveHostCallback; + function agaveHostEventCallback(callbackId, params) { + scriptMessenger.agaveHostEventCallback(callbackId, params); + } + ScriptMessaging.agaveHostEventCallback=agaveHostEventCallback; + function GetScriptMessenger(agaveHostCallbackName, agaveHostEventCallbackName, poster) { + if (scriptMessenger==null) { + scriptMessenger=new Messenger(agaveHostCallbackName, agaveHostEventCallbackName, poster); + } + return scriptMessenger; + } + ScriptMessaging.GetScriptMessenger=GetScriptMessenger; + var EventHandlerCallback=(function () { + function EventHandlerCallback(id, targetId, handler) { + this.id=id; + this.targetId=targetId; + this.handler=handler; + } + return EventHandlerCallback; + })(); + var Messenger=(function () { + function Messenger(methodCallbackName, eventCallbackName, messagePoster) { + this.callingIndex=0; + this.callbackList={}; + this.eventHandlerList={}; + this.asyncMethodCallbackFunctionName=methodCallbackName; + this.eventCallbackFunctionName=eventCallbackName; + this.poster=messagePoster; + this.conversationId=Messenger.getCurrentTimeMS().toString(); + } + Messenger.prototype.invokeMethod=function (handlerName, methodId, params, callback) { + var messagingArgs={}; + this.postMessage(messagingArgs, handlerName, methodId, params, callback); + }; + Messenger.prototype.registerEvent=function (handlerName, methodId, dispId, targetId, handler, callback) { + var messagingArgs={ + eventCallbackFunction: this.eventCallbackFunctionName + }; + var hostArgs={ + id: dispId, + targetId: targetId + }; + var correlationId=this.postMessage(messagingArgs, handlerName, methodId, hostArgs, callback); + this.eventHandlerList[correlationId]=new EventHandlerCallback(dispId, targetId, handler); + }; + Messenger.prototype.unregisterEvent=function (handlerName, methodId, dispId, targetId, callback) { + var hostArgs={ + id: dispId, + targetId: targetId + }; + for (var key in this.eventHandlerList) { + if (this.eventHandlerList.hasOwnProperty(key)) { + var eventCallback=this.eventHandlerList[key]; + if (eventCallback.id==dispId && eventCallback.targetId==targetId) { + delete this.eventHandlerList[key]; + } + } + } + this.invokeMethod(handlerName, methodId, hostArgs, callback); + }; + Messenger.prototype.agaveHostCallback=function (callbackId, params) { + var callbackFunction=this.callbackList[callbackId]; + if (callbackFunction) { + var callbacksDone=callbackFunction(params); + if (callbacksDone===undefined || callbacksDone===true) { + delete this.callbackList[callbackId]; + } + } + }; + Messenger.prototype.agaveHostEventCallback=function (callbackId, params) { + var eventCallback=this.eventHandlerList[callbackId]; + if (eventCallback) { + eventCallback.handler(params); + } + }; + Messenger.prototype.postMessage=function (messagingArgs, handlerName, methodId, params, callback) { + var correlationId=this.generateCorrelationId(); + this.callbackList[correlationId]=callback; + messagingArgs.methodId=methodId; + messagingArgs.params=params; + messagingArgs.callbackId=correlationId; + messagingArgs.callbackFunction=this.asyncMethodCallbackFunctionName; + this.poster.postMessage(handlerName, JSON.stringify(messagingArgs)); + return correlationId; + }; + Messenger.prototype.generateCorrelationId=function () { +++this.callingIndex; + return this.conversationId+this.callingIndex; + }; + Messenger.getCurrentTimeMS=function () { + return (new Date).getTime(); + }; + Messenger.MESSAGE_TIME_DELTA=10; + return Messenger; + })(); + ScriptMessaging.Messenger=Messenger; + })(ScriptMessaging=OSFWebView.ScriptMessaging || (OSFWebView.ScriptMessaging={})); +})(OSFWebView || (OSFWebView={})); +OSF.ScriptMessaging=OSFWebView.ScriptMessaging; +var OSFWebView; +(function (OSFWebView) { + OSFWebView.MessageHandlerName="Agave"; + OSFWebView.PopupMessageHandlerName="WefPopupHandler"; + (function (AppContextProperties) { + AppContextProperties[AppContextProperties["Settings"]=0]="Settings"; + AppContextProperties[AppContextProperties["SolutionReferenceId"]=1]="SolutionReferenceId"; + AppContextProperties[AppContextProperties["AppType"]=2]="AppType"; + AppContextProperties[AppContextProperties["MajorVersion"]=3]="MajorVersion"; + AppContextProperties[AppContextProperties["MinorVersion"]=4]="MinorVersion"; + AppContextProperties[AppContextProperties["RevisionVersion"]=5]="RevisionVersion"; + AppContextProperties[AppContextProperties["APIVersionSequence"]=6]="APIVersionSequence"; + AppContextProperties[AppContextProperties["AppCapabilities"]=7]="AppCapabilities"; + AppContextProperties[AppContextProperties["APPUILocale"]=8]="APPUILocale"; + AppContextProperties[AppContextProperties["AppDataLocale"]=9]="AppDataLocale"; + AppContextProperties[AppContextProperties["BindingCount"]=10]="BindingCount"; + AppContextProperties[AppContextProperties["DocumentUrl"]=11]="DocumentUrl"; + AppContextProperties[AppContextProperties["ActivationMode"]=12]="ActivationMode"; + AppContextProperties[AppContextProperties["ControlIntegrationLevel"]=13]="ControlIntegrationLevel"; + AppContextProperties[AppContextProperties["SolutionToken"]=14]="SolutionToken"; + AppContextProperties[AppContextProperties["APISetVersion"]=15]="APISetVersion"; + AppContextProperties[AppContextProperties["CorrelationId"]=16]="CorrelationId"; + AppContextProperties[AppContextProperties["InstanceId"]=17]="InstanceId"; + AppContextProperties[AppContextProperties["TouchEnabled"]=18]="TouchEnabled"; + AppContextProperties[AppContextProperties["CommerceAllowed"]=19]="CommerceAllowed"; + AppContextProperties[AppContextProperties["RequirementMatrix"]=20]="RequirementMatrix"; + })(OSFWebView.AppContextProperties || (OSFWebView.AppContextProperties={})); + var AppContextProperties=OSFWebView.AppContextProperties; + (function (MethodId) { + MethodId[MethodId["Execute"]=1]="Execute"; + MethodId[MethodId["RegisterEvent"]=2]="RegisterEvent"; + MethodId[MethodId["UnregisterEvent"]=3]="UnregisterEvent"; + MethodId[MethodId["WriteSettings"]=4]="WriteSettings"; + MethodId[MethodId["GetContext"]=5]="GetContext"; + MethodId[MethodId["OnKeydown"]=6]="OnKeydown"; + MethodId[MethodId["AddinInitialized"]=7]="AddinInitialized"; + MethodId[MethodId["OpenWindow"]=8]="OpenWindow"; + MethodId[MethodId["MessageParent"]=9]="MessageParent"; + MethodId[MethodId["SendMessage"]=10]="SendMessage"; + })(OSFWebView.MethodId || (OSFWebView.MethodId={})); + var MethodId=OSFWebView.MethodId; + var WebViewHostController=(function () { + function WebViewHostController(hostScriptProxy) { + this.hostScriptProxy=hostScriptProxy; + } + WebViewHostController.prototype.execute=function (id, params, callback) { + var args=params; + if (args==null) { + args=[]; + } + var hostParams={ + id: id, + apiArgs: args + }; + var agaveResponseCallback=function (payload) { + var safeArraySource=payload; + if (OSF.OUtil.isArray(payload) && payload.length >=2) { + var hrStatus=payload[0]; + safeArraySource=payload[1]; + } + if (callback) { + return callback(new OSFWebView.WebViewSafeArray(safeArraySource)); + } + }; + this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.Execute, hostParams, agaveResponseCallback); + }; + WebViewHostController.prototype.registerEvent=function (id, targetId, handler, callback) { + var agaveEventHandlerCallback=function (payload) { + var safeArraySource=payload; + var eventId=0; + if (OSF.OUtil.isArray(payload) && payload.length >=2) { + eventId=payload[0]; + safeArraySource=payload[1]; + } + if (handler) { + handler(eventId, new OSFWebView.WebViewSafeArray(safeArraySource)); + } + }; + var agaveResponseCallback=function (payload) { + if (callback) { + return callback(new OSFWebView.WebViewSafeArray(payload)); + } + }; + this.hostScriptProxy.registerEvent(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.RegisterEvent, id, targetId, agaveEventHandlerCallback, agaveResponseCallback); + }; + WebViewHostController.prototype.unregisterEvent=function (id, targetId, callback) { + var agaveResponseCallback=function (response) { + return callback(new OSFWebView.WebViewSafeArray(response)); + }; + this.hostScriptProxy.unregisterEvent(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.UnregisterEvent, id, targetId, agaveResponseCallback); + }; + WebViewHostController.prototype.messageParent=function (params) { + var message=params[Microsoft.Office.WebExtension.Parameters.MessageToParent]; + var messageObj={ dialogMessage: { messageType: OSF.DialogMessageType.DialogMessageReceived, messageContent: message } }; + window.opener.postMessage(JSON.stringify(messageObj), window.location.origin); + }; + WebViewHostController.prototype.openDialog=function (id, targetId, handler, callback) { + var magicWord="action=displayDialog"; + var callArgs=JSON.parse(targetId); + var callUrl=callArgs.url; + if (!callUrl) { + return; + } + var seperator="?"; + if (callUrl.indexOf("?") > -1) { + seperator="&"; + } + var width=screen.width * callArgs.width / 100; + var height=screen.height * callArgs.height / 100; + var params="width="+width+", height="+height; + var openUrl=callUrl.concat(seperator).concat(magicWord); + WebViewHostController.popup=window.open(openUrl, "", params); + function receiveMessage(event) { + if (event.source==WebViewHostController.popup) { + try { + var messageObj=JSON.parse(event.data); + if (messageObj.dialogMessage) { + handler(id, [OSF.DialogMessageType.DialogMessageReceived, messageObj.dialogMessage.messageContent]); + } + } + catch (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handled. Message:"+event.data); + } + } + } + window.addEventListener("message", receiveMessage); + var interval; + function checkWindowClose() { + try { + if (WebViewHostController.popup==null || WebViewHostController.popup.closed) { + window.clearInterval(interval); + handler(id, [OSF.DialogMessageType.DialogClosed]); + } + } + catch (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed."); + } + } + interval=window.setInterval(checkWindowClose, 1000); + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + }; + WebViewHostController.prototype.closeDialog=function (id, targetId, callback) { + if (WebViewHostController.popup) { + WebViewHostController.popup.close(); + WebViewHostController.popup=null; + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + else { + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + } + }; + WebViewHostController.prototype.sendMessage=function (params) { + var message=params[Microsoft.Office.WebExtension.Parameters.MessageContent]; + if (!isNaN(parseFloat(message)) && isFinite(message)) { + message=message.toString(); + } + this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.SendMessage, message, null); + }; + return WebViewHostController; + })(); + OSFWebView.WebViewHostController=WebViewHostController; +})(OSFWebView || (OSFWebView={})); +var CrossIFrameCommon; +(function (CrossIFrameCommon) { + (function (CallbackType) { + CallbackType[CallbackType["MethodCallback"]=0]="MethodCallback"; + CallbackType[CallbackType["EventCallback"]=1]="EventCallback"; + })(CrossIFrameCommon.CallbackType || (CrossIFrameCommon.CallbackType={})); + var CallbackType=CrossIFrameCommon.CallbackType; + var CallbackData=(function () { + function CallbackData(callbackType, callbackId, params) { + this.callbackType=callbackType; + this.callbackId=callbackId; + this.params=params; + } + return CallbackData; + })(); + CrossIFrameCommon.CallbackData=CallbackData; +})(CrossIFrameCommon || (CrossIFrameCommon={})); +var Android; +(function (Android) { + var Poster=(function () { + function Poster() { + } + Poster.getInstance=function () { + if (Poster.uniqueInstance==null) { + Poster.uniqueInstance=new Poster(); + } + return Poster.uniqueInstance; + }; + Poster.prototype.postMessage=function (handlerName, message) { + agaveHost.postMessage(message); + }; + Poster.prototype.ReceiveMessage=function (cbData) { + switch (cbData.callbackType) { + case CrossIFrameCommon.CallbackType.MethodCallback: + OSFWebView.ScriptMessaging.agaveHostCallback(cbData.callbackId, cbData.params); + break; + case CrossIFrameCommon.CallbackType.EventCallback: + OSFWebView.ScriptMessaging.agaveHostEventCallback(cbData.callbackId, cbData.params); + break; + default: + break; + } + }; + return Poster; + })(); + Android.Poster=Poster; +})(Android || (Android={})); +function agaveHostCallback(callbackId, params) { + var cbData=new CrossIFrameCommon.CallbackData(CrossIFrameCommon.CallbackType.MethodCallback, callbackId, params); + var posterInstance=Android.Poster.getInstance(); + posterInstance.ReceiveMessage(cbData); +} +function agaveHostEventCallback(callbackId, params) { + var cbData=new CrossIFrameCommon.CallbackData(CrossIFrameCommon.CallbackType.EventCallback, callbackId, params); + var posterInstance=Android.Poster.getInstance(); + posterInstance.ReceiveMessage(cbData); +} +OSF.DDA.ClientSettingsManager={ + getSettingsExecuteMethod: function OSF_DDA_ClientSettingsManager$getSettingsExecuteMethod(hostDelegateMethod) { + return function (args) { + var status, response; + var onComplete=function onComplete(status, response) { + if (args.onReceiving) { + args.onReceiving(); + } + if (args.onComplete) { + args.onComplete(status, response); + } + }; + try { + hostDelegateMethod(args.hostCallArgs, args.onCalling, onComplete); + } + catch (ex) { + status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + response={ name: Strings.OfficeOM.L_InternalError, message: ex }; + onComplete(status, response); + } + }; + }, + read: function OSF_DDA_ClientSettingsManager$read(onCalling, onComplete) { + var keys=[]; + var values=[]; + if (onCalling) { + onCalling(); + } + var initializationHelper=OSF._OfficeAppFactory.getInitializationHelper(); + var onReceivedContext=function onReceivedContext(appContext) { + if (onComplete) { + onComplete(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess, appContext.get_settings()); + } + }; + initializationHelper.getAppContext(null, onReceivedContext); + }, + write: function OSF_DDA_ClientSettingsManager$write(serializedSettings, overwriteIfStale, onCalling, onComplete) { + var hostParams={}; + var keys=[]; + var values=[]; + for (var key in serializedSettings) { + keys.push(key); + values.push(serializedSettings[key]); + } + hostParams["keys"]=keys; + hostParams["values"]=values; + if (onCalling) { + onCalling(); + } + var onWriteCompleted=function onWriteCompleted(status) { + if (onComplete) { + onComplete(status[0], null); + } + }; + OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.WriteSettings, hostParams, onWriteCompleted); + } +}; +OSF.InitializationHelper.prototype.initializeSettings=function OSF_InitializationHelper$initializeSettings(appContext, refreshSupported) { + var serializedSettings=appContext.get_settings(); + var settings=this.deserializeSettings(serializedSettings, refreshSupported); + return settings; +}; +OSF.InitializationHelper.prototype.getAppContext=function OSF_InitializationHelper$getAppContext(wnd, gotAppContext) { + var getInvocationCallback=function OSF_InitializationHelper_getAppContextAsync$getInvocationCallbackWebApp(appContext) { + var returnedContext; + var appContextProperties=OSF.WebView.AppContextProperties; + var appType=appContext[appContextProperties.AppType]; + var appTypeSupported=false; + for (var appEntry in OSF.AppName) { + if (OSF.AppName[appEntry]==appType) { + appTypeSupported=true; + break; + } + } + if (!appTypeSupported) { + throw "Unsupported client type "+appType; + } + var hostSettings=appContext[appContextProperties.Settings]; + var serializedSettings={}; + var keys=hostSettings[0]; + var values=hostSettings[1]; + for (var index=0; index < keys.length; index++) { + serializedSettings[keys[index]]=values[index]; + } + var id=appContext[appContextProperties.SolutionReferenceId]; + var version=appContext[appContextProperties.MajorVersion]; + var clientMode=appContext[appContextProperties.AppCapabilities]; + var UILocale=appContext[appContextProperties.APPUILocale]; + var dataLocale=appContext[appContextProperties.AppDataLocale]; + var docUrl=appContext[appContextProperties.DocumentUrl]; + var reason=appContext[appContextProperties.ActivationMode]; + var osfControlType=appContext[appContextProperties.ControlIntegrationLevel]; + var eToken=appContext[appContextProperties.SolutionToken]; + eToken=eToken ? eToken.toString() : ""; + var correlationId=appContext[appContextProperties.CorrelationId]; + var appInstanceId=appContext[appContextProperties.InstanceId]; + var touchEnabled=appContext[appContextProperties.TouchEnabled]; + var commerceAllowed=appContext[appContextProperties.CommerceAllowed]; + var minorVersion=appContext[appContextProperties.MinorVersion]; + var requirementMatrix=appContext[appContextProperties.RequirementMatrix]; + returnedContext=new OSF.OfficeAppContext(id, appType, version, UILocale, dataLocale, docUrl, clientMode, serializedSettings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, minorVersion, requirementMatrix); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.initialize(returnedContext); + } + gotAppContext(returnedContext); + }; + var handler; + if (this._hostInfo.isDialog) { + handler=OSF.WebView.PopupMessageHandlerName; + } + else { + handler=OSF.WebView.MessageHandlerName; + } + OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(handler, OSF.WebView.MethodId.GetContext, [], getInvocationCallback); +}; +OSF.WebView=OSFWebView; +OSF.ClientHostController=new OSFWebView.WebViewHostController(OSF.ScriptMessaging.GetScriptMessenger("agaveHostCallback", "agaveHostEventCallback", Android.Poster.getInstance())); +var OSFLog; +(function (OSFLog) { + var BaseUsageData=(function () { + function BaseUsageData(table) { + this._table=table; + this._fields={}; + } + Object.defineProperty(BaseUsageData.prototype, "Fields", { + get: function () { + return this._fields; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(BaseUsageData.prototype, "Table", { + get: function () { + return this._table; + }, + enumerable: true, + configurable: true + }); + BaseUsageData.prototype.SerializeFields=function () { + }; + BaseUsageData.prototype.SetSerializedField=function (key, value) { + if (typeof (value) !=="undefined" && value !==null) { + this._serializedFields[key]=value.toString(); + } + }; + BaseUsageData.prototype.SerializeRow=function () { + this._serializedFields={}; + this.SetSerializedField("Table", this._table); + this.SerializeFields(); + return JSON.stringify(this._serializedFields); + }; + return BaseUsageData; + })(); + OSFLog.BaseUsageData=BaseUsageData; + var AppActivatedUsageData=(function (_super) { + __extends(AppActivatedUsageData, _super); + function AppActivatedUsageData() { + _super.call(this, "AppActivated"); + } + Object.defineProperty(AppActivatedUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppId", { + get: function () { return this.Fields["AppId"]; }, + set: function (value) { this.Fields["AppId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppInstanceId", { + get: function () { return this.Fields["AppInstanceId"]; }, + set: function (value) { this.Fields["AppInstanceId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppURL", { + get: function () { return this.Fields["AppURL"]; }, + set: function (value) { this.Fields["AppURL"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AssetId", { + get: function () { return this.Fields["AssetId"]; }, + set: function (value) { this.Fields["AssetId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Browser", { + get: function () { return this.Fields["Browser"]; }, + set: function (value) { this.Fields["Browser"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "UserId", { + get: function () { return this.Fields["UserId"]; }, + set: function (value) { this.Fields["UserId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Host", { + get: function () { return this.Fields["Host"]; }, + set: function (value) { this.Fields["Host"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "HostVersion", { + get: function () { return this.Fields["HostVersion"]; }, + set: function (value) { this.Fields["HostVersion"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "ClientId", { + get: function () { return this.Fields["ClientId"]; }, + set: function (value) { this.Fields["ClientId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppSizeWidth", { + get: function () { return this.Fields["AppSizeWidth"]; }, + set: function (value) { this.Fields["AppSizeWidth"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppSizeHeight", { + get: function () { return this.Fields["AppSizeHeight"]; }, + set: function (value) { this.Fields["AppSizeHeight"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Message", { + get: function () { return this.Fields["Message"]; }, + set: function (value) { this.Fields["Message"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "DocUrl", { + get: function () { return this.Fields["DocUrl"]; }, + set: function (value) { this.Fields["DocUrl"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "OfficeJSVersion", { + get: function () { return this.Fields["OfficeJSVersion"]; }, + set: function (value) { this.Fields["OfficeJSVersion"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "HostJSVersion", { + get: function () { return this.Fields["HostJSVersion"]; }, + set: function (value) { this.Fields["HostJSVersion"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "WacHostEnvironment", { + get: function () { return this.Fields["WacHostEnvironment"]; }, + set: function (value) { this.Fields["WacHostEnvironment"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "IsFromWacAutomation", { + get: function () { return this.Fields["IsFromWacAutomation"]; }, + set: function (value) { this.Fields["IsFromWacAutomation"]=value; }, + enumerable: true, + configurable: true + }); + AppActivatedUsageData.prototype.SerializeFields=function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("AppId", this.AppId); + this.SetSerializedField("AppInstanceId", this.AppInstanceId); + this.SetSerializedField("AppURL", this.AppURL); + this.SetSerializedField("AssetId", this.AssetId); + this.SetSerializedField("Browser", this.Browser); + this.SetSerializedField("UserId", this.UserId); + this.SetSerializedField("Host", this.Host); + this.SetSerializedField("HostVersion", this.HostVersion); + this.SetSerializedField("ClientId", this.ClientId); + this.SetSerializedField("AppSizeWidth", this.AppSizeWidth); + this.SetSerializedField("AppSizeHeight", this.AppSizeHeight); + this.SetSerializedField("Message", this.Message); + this.SetSerializedField("DocUrl", this.DocUrl); + this.SetSerializedField("OfficeJSVersion", this.OfficeJSVersion); + this.SetSerializedField("HostJSVersion", this.HostJSVersion); + this.SetSerializedField("WacHostEnvironment", this.WacHostEnvironment); + this.SetSerializedField("IsFromWacAutomation", this.IsFromWacAutomation); + }; + return AppActivatedUsageData; + })(BaseUsageData); + OSFLog.AppActivatedUsageData=AppActivatedUsageData; + var ScriptLoadUsageData=(function (_super) { + __extends(ScriptLoadUsageData, _super); + function ScriptLoadUsageData() { + _super.call(this, "ScriptLoad"); + } + Object.defineProperty(ScriptLoadUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "ScriptId", { + get: function () { return this.Fields["ScriptId"]; }, + set: function (value) { this.Fields["ScriptId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "StartTime", { + get: function () { return this.Fields["StartTime"]; }, + set: function (value) { this.Fields["StartTime"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "ResponseTime", { + get: function () { return this.Fields["ResponseTime"]; }, + set: function (value) { this.Fields["ResponseTime"]=value; }, + enumerable: true, + configurable: true + }); + ScriptLoadUsageData.prototype.SerializeFields=function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("ScriptId", this.ScriptId); + this.SetSerializedField("StartTime", this.StartTime); + this.SetSerializedField("ResponseTime", this.ResponseTime); + }; + return ScriptLoadUsageData; + })(BaseUsageData); + OSFLog.ScriptLoadUsageData=ScriptLoadUsageData; + var AppClosedUsageData=(function (_super) { + __extends(AppClosedUsageData, _super); + function AppClosedUsageData() { + _super.call(this, "AppClosed"); + } + Object.defineProperty(AppClosedUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "FocusTime", { + get: function () { return this.Fields["FocusTime"]; }, + set: function (value) { this.Fields["FocusTime"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "AppSizeFinalWidth", { + get: function () { return this.Fields["AppSizeFinalWidth"]; }, + set: function (value) { this.Fields["AppSizeFinalWidth"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "AppSizeFinalHeight", { + get: function () { return this.Fields["AppSizeFinalHeight"]; }, + set: function (value) { this.Fields["AppSizeFinalHeight"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "OpenTime", { + get: function () { return this.Fields["OpenTime"]; }, + set: function (value) { this.Fields["OpenTime"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "CloseMethod", { + get: function () { return this.Fields["CloseMethod"]; }, + set: function (value) { this.Fields["CloseMethod"]=value; }, + enumerable: true, + configurable: true + }); + AppClosedUsageData.prototype.SerializeFields=function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("FocusTime", this.FocusTime); + this.SetSerializedField("AppSizeFinalWidth", this.AppSizeFinalWidth); + this.SetSerializedField("AppSizeFinalHeight", this.AppSizeFinalHeight); + this.SetSerializedField("OpenTime", this.OpenTime); + this.SetSerializedField("CloseMethod", this.CloseMethod); + }; + return AppClosedUsageData; + })(BaseUsageData); + OSFLog.AppClosedUsageData=AppClosedUsageData; + var APIUsageUsageData=(function (_super) { + __extends(APIUsageUsageData, _super); + function APIUsageUsageData() { + _super.call(this, "APIUsage"); + } + Object.defineProperty(APIUsageUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "APIType", { + get: function () { return this.Fields["APIType"]; }, + set: function (value) { this.Fields["APIType"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "APIID", { + get: function () { return this.Fields["APIID"]; }, + set: function (value) { this.Fields["APIID"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "Parameters", { + get: function () { return this.Fields["Parameters"]; }, + set: function (value) { this.Fields["Parameters"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "ResponseTime", { + get: function () { return this.Fields["ResponseTime"]; }, + set: function (value) { this.Fields["ResponseTime"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "ErrorType", { + get: function () { return this.Fields["ErrorType"]; }, + set: function (value) { this.Fields["ErrorType"]=value; }, + enumerable: true, + configurable: true + }); + APIUsageUsageData.prototype.SerializeFields=function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("APIType", this.APIType); + this.SetSerializedField("APIID", this.APIID); + this.SetSerializedField("Parameters", this.Parameters); + this.SetSerializedField("ResponseTime", this.ResponseTime); + this.SetSerializedField("ErrorType", this.ErrorType); + }; + return APIUsageUsageData; + })(BaseUsageData); + OSFLog.APIUsageUsageData=APIUsageUsageData; + var AppInitializationUsageData=(function (_super) { + __extends(AppInitializationUsageData, _super); + function AppInitializationUsageData() { + _super.call(this, "AppInitialization"); + } + Object.defineProperty(AppInitializationUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "SuccessCode", { + get: function () { return this.Fields["SuccessCode"]; }, + set: function (value) { this.Fields["SuccessCode"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "Message", { + get: function () { return this.Fields["Message"]; }, + set: function (value) { this.Fields["Message"]=value; }, + enumerable: true, + configurable: true + }); + AppInitializationUsageData.prototype.SerializeFields=function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("SuccessCode", this.SuccessCode); + this.SetSerializedField("Message", this.Message); + }; + return AppInitializationUsageData; + })(BaseUsageData); + OSFLog.AppInitializationUsageData=AppInitializationUsageData; +})(OSFLog || (OSFLog={})); +var Logger; +(function (Logger) { + "use strict"; + (function (TraceLevel) { + TraceLevel[TraceLevel["info"]=0]="info"; + TraceLevel[TraceLevel["warning"]=1]="warning"; + TraceLevel[TraceLevel["error"]=2]="error"; + })(Logger.TraceLevel || (Logger.TraceLevel={})); + var TraceLevel=Logger.TraceLevel; + (function (SendFlag) { + SendFlag[SendFlag["none"]=0]="none"; + SendFlag[SendFlag["flush"]=1]="flush"; + })(Logger.SendFlag || (Logger.SendFlag={})); + var SendFlag=Logger.SendFlag; + function allowUploadingData() { + if (OSF.Logger && OSF.Logger.ulsEndpoint) { + OSF.Logger.ulsEndpoint.loadProxyFrame(); + } + } + Logger.allowUploadingData=allowUploadingData; + function sendLog(traceLevel, message, flag) { + if (OSF.Logger && OSF.Logger.ulsEndpoint) { + var jsonObj={ traceLevel: traceLevel, message: message, flag: flag, internalLog: true }; + var logs=JSON.stringify(jsonObj); + OSF.Logger.ulsEndpoint.writeLog(logs); + } + } + Logger.sendLog=sendLog; + function creatULSEndpoint() { + try { + return new ULSEndpointProxy(); + } + catch (e) { + return null; + } + } + var ULSEndpointProxy=(function () { + function ULSEndpointProxy() { + var _this=this; + this.proxyFrame=null; + this.telemetryEndPoint="https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html"; + this.buffer=[]; + this.proxyFrameReady=false; + OSF.OUtil.addEventListener(window, "message", function (e) { return _this.tellProxyFrameReady(e); }); + setTimeout(function () { + _this.loadProxyFrame(); + }, 3000); + } + ULSEndpointProxy.prototype.writeLog=function (log) { + if (this.proxyFrameReady===true) { + this.proxyFrame.contentWindow.postMessage(log, ULSEndpointProxy.telemetryOrigin); + } + else { + if (this.buffer.length < 128) { + this.buffer.push(log); + } + } + }; + ULSEndpointProxy.prototype.loadProxyFrame=function () { + if (this.proxyFrame==null) { + this.proxyFrame=document.createElement("iframe"); + this.proxyFrame.setAttribute("style", "display:none"); + this.proxyFrame.setAttribute("src", this.telemetryEndPoint); + document.head.appendChild(this.proxyFrame); + } + }; + ULSEndpointProxy.prototype.tellProxyFrameReady=function (e) { + var _this=this; + if (e.data==="ProxyFrameReadyToLog") { + this.proxyFrameReady=true; + for (var i=0; i < this.buffer.length; i++) { + this.writeLog(this.buffer[i]); + } + this.buffer.length=0; + OSF.OUtil.removeEventListener(window, "message", function (e) { return _this.tellProxyFrameReady(e); }); + } + else if (e.data==="ProxyFrameReadyToInit") { + var initJson={ appName: "Office APPs", sessionId: OSF.OUtil.Guid.generateNewGuid() }; + var initStr=JSON.stringify(initJson); + this.proxyFrame.contentWindow.postMessage(initStr, ULSEndpointProxy.telemetryOrigin); + } + }; + ULSEndpointProxy.telemetryOrigin="https://telemetryservice.firstpartyapps.oaspapps.com"; + return ULSEndpointProxy; + })(); + if (!OSF.Logger) { + OSF.Logger=Logger; + } + Logger.ulsEndpoint=creatULSEndpoint(); +})(Logger || (Logger={})); +var OSFAriaLogger; +(function (OSFAriaLogger) { + var AriaLogger=(function () { + function AriaLogger() { + } + AriaLogger.prototype.getAriaCDNLocation=function () { + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry.js"); + }; + AriaLogger.getInstance=function () { + if (AriaLogger.AriaLoggerObj===undefined) { + AriaLogger.AriaLoggerObj=new AriaLogger(); + } + return AriaLogger.AriaLoggerObj; + }; + AriaLogger.prototype.isIUsageData=function (arg) { + return arg["Fields"] !==undefined; + }; + AriaLogger.prototype.loadAriaScriptAndLog=function (tableName, telemetryData) { + var startAfterMs=1000; + OSF.OUtil.loadScript(this.getAriaCDNLocation(), function () { + try { + if (!this.ALogger) { + var OfficeExtensibilityTenantID="db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; + this.ALogger=AWTLogManager.initialize(OfficeExtensibilityTenantID); + } + var eventProperties=new AWTEventProperties(); + eventProperties.setName("Office.Extensibility.OfficeJS."+tableName); + for (var key in telemetryData) { + if (key.toLowerCase() !=="table") { + eventProperties.setProperty(key, telemetryData[key]); + } + } + var today=new Date(); + eventProperties.setProperty("Date", today.toISOString()); + this.ALogger.logEvent(eventProperties); + } + catch (e) { + } + }, startAfterMs); + }; + AriaLogger.prototype.logData=function (data) { + if (this.isIUsageData(data)) { + this.loadAriaScriptAndLog(data["Table"], data["Fields"]); + } + else { + this.loadAriaScriptAndLog(data["Table"], data); + } + }; + return AriaLogger; + })(); + OSFAriaLogger.AriaLogger=AriaLogger; +})(OSFAriaLogger || (OSFAriaLogger={})); +var OSFAppTelemetry; +(function (OSFAppTelemetry) { + "use strict"; + var appInfo; + var sessionId=OSF.OUtil.Guid.generateNewGuid(); + var osfControlAppCorrelationId=""; + var omexDomainRegex=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"); + OSFAppTelemetry.enableTelemetry=true; + ; + var AppInfo=(function () { + function AppInfo() { + } + return AppInfo; + })(); + var Event=(function () { + function Event(name, handler) { + this.name=name; + this.handler=handler; + } + return Event; + })(); + var AppStorage=(function () { + function AppStorage() { + this.clientIDKey="Office API client"; + this.logIdSetKey="Office App Log Id Set"; + } + AppStorage.prototype.getClientId=function () { + var clientId=this.getValue(this.clientIDKey); + if (!clientId || clientId.length <=0 || clientId.length > 40) { + clientId=OSF.OUtil.Guid.generateNewGuid(); + this.setValue(this.clientIDKey, clientId); + } + return clientId; + }; + AppStorage.prototype.saveLog=function (logId, log) { + var logIdSet=this.getValue(this.logIdSetKey); + logIdSet=((logIdSet && logIdSet.length > 0) ? (logIdSet+";") : "")+logId; + this.setValue(this.logIdSetKey, logIdSet); + this.setValue(logId, log); + }; + AppStorage.prototype.enumerateLog=function (callback, clean) { + var logIdSet=this.getValue(this.logIdSetKey); + if (logIdSet) { + var ids=logIdSet.split(";"); + for (var id in ids) { + var logId=ids[id]; + var log=this.getValue(logId); + if (log) { + if (callback) { + callback(logId, log); + } + if (clean) { + this.remove(logId); + } + } + } + if (clean) { + this.remove(this.logIdSetKey); + } + } + }; + AppStorage.prototype.getValue=function (key) { + var osfLocalStorage=OSF.OUtil.getLocalStorage(); + var value=""; + if (osfLocalStorage) { + value=osfLocalStorage.getItem(key); + } + return value; + }; + AppStorage.prototype.setValue=function (key, value) { + var osfLocalStorage=OSF.OUtil.getLocalStorage(); + if (osfLocalStorage) { + osfLocalStorage.setItem(key, value); + } + }; + AppStorage.prototype.remove=function (key) { + var osfLocalStorage=OSF.OUtil.getLocalStorage(); + if (osfLocalStorage) { + try { + osfLocalStorage.removeItem(key); + } + catch (ex) { + } + } + }; + return AppStorage; + })(); + var AppLogger=(function () { + function AppLogger() { + } + AppLogger.prototype.LogData=function (data) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { + return; + } + try { + OSFAriaLogger.AriaLogger.getInstance().logData(data); + } + catch (e) { + } + }; + AppLogger.prototype.LogRawData=function (log) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { + return; + } + try { + OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)); + } + catch (e) { + } + }; + return AppLogger; + })(); + function trimStringToLowerCase(input) { + if (input) { + input=input.replace(/[{}]/g, "").toLowerCase(); + } + return (input || ""); + } + function initialize(context) { + if (!OSF.Logger) { + return; + } + if (appInfo) { + return; + } + appInfo=new AppInfo(); + if (context.get_hostFullVersion()) { + appInfo.hostVersion=context.get_hostFullVersion(); + } + else { + appInfo.hostVersion=context.get_appVersion(); + } + appInfo.appId=context.get_id(); + appInfo.host=context.get_appName(); + appInfo.browser=window.navigator.userAgent; + appInfo.correlationId=trimStringToLowerCase(context.get_correlationId()); + appInfo.clientId=(new AppStorage()).getClientId(); + appInfo.appInstanceId=context.get_appInstanceId(); + if (appInfo.appInstanceId) { + appInfo.appInstanceId=appInfo.appInstanceId.replace(/[{}]/g, "").toLowerCase(); + } + appInfo.message=context.get_hostCustomMessage(); + appInfo.officeJSVersion=OSF.ConstantNames.FileVersion; + appInfo.hostJSVersion="16.0.8616.1000"; + if (context._wacHostEnvironment) { + appInfo.wacHostEnvironment=context._wacHostEnvironment; + } + if (context._isFromWacAutomation !==undefined && context._isFromWacAutomation !==null) { + appInfo.isFromWacAutomation=context._isFromWacAutomation.toString().toLowerCase(); + } + var docUrl=context.get_docUrl(); + appInfo.docUrl=omexDomainRegex.test(docUrl) ? docUrl : ""; + var url=location.href; + if (url) { + url=url.split("?")[0].split("#")[0]; + } + appInfo.appURL=url; + (function getUserIdAndAssetIdFromToken(token, appInfo) { + var xmlContent; + var parser; + var xmlDoc; + appInfo.assetId=""; + appInfo.userId=""; + try { + xmlContent=decodeURIComponent(token); + parser=new DOMParser(); + xmlDoc=parser.parseFromString(xmlContent, "text/xml"); + var cidNode=xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("cid"); + var oidNode=xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("oid"); + if (cidNode && cidNode.nodeValue) { + appInfo.userId=cidNode.nodeValue; + } + else if (oidNode && oidNode.nodeValue) { + appInfo.userId=oidNode.nodeValue; + } + appInfo.assetId=xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue; + } + catch (e) { + } + finally { + xmlContent=null; + xmlDoc=null; + parser=null; + } + })(context.get_eToken(), appInfo); + (function handleLifecycle() { + var startTime=new Date(); + var lastFocus=null; + var focusTime=0; + var finished=false; + var adjustFocusTime=function () { + if (document.hasFocus()) { + if (lastFocus==null) { + lastFocus=new Date(); + } + } + else if (lastFocus) { + focusTime+=Math.abs((new Date()).getTime() - lastFocus.getTime()); + lastFocus=null; + } + }; + var eventList=[]; + eventList.push(new Event("focus", adjustFocusTime)); + eventList.push(new Event("blur", adjustFocusTime)); + eventList.push(new Event("focusout", adjustFocusTime)); + eventList.push(new Event("focusin", adjustFocusTime)); + var exitFunction=function () { + for (var i=0; i < eventList.length; i++) { + OSF.OUtil.removeEventListener(window, eventList[i].name, eventList[i].handler); + } + eventList.length=0; + if (!finished) { + if (document.hasFocus() && lastFocus) { + focusTime+=Math.abs((new Date()).getTime() - lastFocus.getTime()); + lastFocus=null; + } + OSFAppTelemetry.onAppClosed(Math.abs((new Date()).getTime() - startTime.getTime()), focusTime); + finished=true; + } + }; + eventList.push(new Event("beforeunload", exitFunction)); + eventList.push(new Event("unload", exitFunction)); + for (var i=0; i < eventList.length; i++) { + OSF.OUtil.addEventListener(window, eventList[i].name, eventList[i].handler); + } + adjustFocusTime(); + })(); + OSFAppTelemetry.onAppActivated(); + } + OSFAppTelemetry.initialize=initialize; + function onAppActivated() { + if (!appInfo) { + return; + } + (new AppStorage()).enumerateLog(function (id, log) { return (new AppLogger()).LogRawData(log); }, true); + var data=new OSFLog.AppActivatedUsageData(); + data.SessionId=sessionId; + data.AppId=appInfo.appId; + data.AssetId=appInfo.assetId; + data.AppURL=appInfo.appURL; + data.UserId=appInfo.userId; + data.ClientId=appInfo.clientId; + data.Browser=appInfo.browser; + data.Host=appInfo.host; + data.HostVersion=appInfo.hostVersion; + data.CorrelationId=trimStringToLowerCase(appInfo.correlationId); + data.AppSizeWidth=window.innerWidth; + data.AppSizeHeight=window.innerHeight; + data.AppInstanceId=appInfo.appInstanceId; + data.Message=appInfo.message; + data.DocUrl=appInfo.docUrl; + data.OfficeJSVersion=appInfo.officeJSVersion; + data.HostJSVersion=appInfo.hostJSVersion; + if (appInfo.wacHostEnvironment) { + data.WacHostEnvironment=appInfo.wacHostEnvironment; + } + if (appInfo.isFromWacAutomation !==undefined && appInfo.isFromWacAutomation !==null) { + data.IsFromWacAutomation=appInfo.isFromWacAutomation; + } + (new AppLogger()).LogData(data); + setTimeout(function () { + if (!OSF.Logger) { + return; + } + OSF.Logger.allowUploadingData(); + }, 100); + } + OSFAppTelemetry.onAppActivated=onAppActivated; + function onScriptDone(scriptId, msStartTime, msResponseTime, appCorrelationId) { + var data=new OSFLog.ScriptLoadUsageData(); + data.CorrelationId=trimStringToLowerCase(appCorrelationId); + data.SessionId=sessionId; + data.ScriptId=scriptId; + data.StartTime=msStartTime; + data.ResponseTime=msResponseTime; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onScriptDone=onScriptDone; + function onCallDone(apiType, id, parameters, msResponseTime, errorType) { + if (!appInfo) { + return; + } + var data=new OSFLog.APIUsageUsageData(); + data.CorrelationId=trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId=sessionId; + data.APIType=apiType; + data.APIID=id; + data.Parameters=parameters; + data.ResponseTime=msResponseTime; + data.ErrorType=errorType; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onCallDone=onCallDone; + ; + function onMethodDone(id, args, msResponseTime, errorType) { + var parameters=null; + if (args) { + if (typeof args=="number") { + parameters=String(args); + } + else if (typeof args==="object") { + for (var index in args) { + if (parameters !==null) { + parameters+=","; + } + else { + parameters=""; + } + if (typeof args[index]=="number") { + parameters+=String(args[index]); + } + } + } + else { + parameters=""; + } + } + OSF.AppTelemetry.onCallDone("method", id, parameters, msResponseTime, errorType); + } + OSFAppTelemetry.onMethodDone=onMethodDone; + function onPropertyDone(propertyName, msResponseTime) { + OSF.AppTelemetry.onCallDone("property", -1, propertyName, msResponseTime); + } + OSFAppTelemetry.onPropertyDone=onPropertyDone; + function onEventDone(id, errorType) { + OSF.AppTelemetry.onCallDone("event", id, null, 0, errorType); + } + OSFAppTelemetry.onEventDone=onEventDone; + function onRegisterDone(register, id, msResponseTime, errorType) { + OSF.AppTelemetry.onCallDone(register ? "registerevent" : "unregisterevent", id, null, msResponseTime, errorType); + } + OSFAppTelemetry.onRegisterDone=onRegisterDone; + function onAppClosed(openTime, focusTime) { + if (!appInfo) { + return; + } + var data=new OSFLog.AppClosedUsageData(); + data.CorrelationId=trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId=sessionId; + data.FocusTime=focusTime; + data.OpenTime=openTime; + data.AppSizeFinalWidth=window.innerWidth; + data.AppSizeFinalHeight=window.innerHeight; + (new AppStorage()).saveLog(sessionId, data.SerializeRow()); + } + OSFAppTelemetry.onAppClosed=onAppClosed; + function setOsfControlAppCorrelationId(correlationId) { + osfControlAppCorrelationId=trimStringToLowerCase(correlationId); + } + OSFAppTelemetry.setOsfControlAppCorrelationId=setOsfControlAppCorrelationId; + function doAppInitializationLogging(isException, message) { + var data=new OSFLog.AppInitializationUsageData(); + data.CorrelationId=trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId=sessionId; + data.SuccessCode=isException ? 1 : 0; + data.Message=message; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.doAppInitializationLogging=doAppInitializationLogging; + function logAppCommonMessage(message) { + doAppInitializationLogging(false, message); + } + OSFAppTelemetry.logAppCommonMessage=logAppCommonMessage; + function logAppException(errorMessage) { + doAppInitializationLogging(true, errorMessage); + } + OSFAppTelemetry.logAppException=logAppException; + OSF.AppTelemetry=OSFAppTelemetry; +})(OSFAppTelemetry || (OSFAppTelemetry={})); +Microsoft.Office.WebExtension.EventType={}; +OSF.EventDispatch=function OSF_EventDispatch(eventTypes) { + this._eventHandlers={}; + this._objectEventHandlers={}; + this._queuedEventsArgs={}; + for (var entry in eventTypes) { + var eventType=eventTypes[entry]; + var isObjectEvent=(eventType=="objectDeleted" || eventType=="objectSelectionChanged" || eventType=="objectDataChanged" || eventType=="contentControlAdded"); + if (!isObjectEvent) + this._eventHandlers[eventType]=[]; + else + this._objectEventHandlers[eventType]={}; + this._queuedEventsArgs[eventType]=[]; + } +}; +OSF.EventDispatch.prototype={ + getSupportedEvents: function OSF_EventDispatch$getSupportedEvents() { + var events=[]; + for (var eventName in this._eventHandlers) + events.push(eventName); + for (var eventName in this._objectEventHandlers) + events.push(eventName); + return events; + }, + supportsEvent: function OSF_EventDispatch$supportsEvent(event) { + for (var eventName in this._eventHandlers) { + if (event==eventName) + return true; + } + for (var eventName in this._objectEventHandlers) { + if (event==eventName) + return true; + } + return false; + }, + hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) { + var handlers=this._eventHandlers[eventType]; + if (handlers && handlers.length > 0) { + for (var h in handlers) { + if (handlers[h]===handler) + return true; + } + } + return false; + }, + hasObjectEventHandler: function OSF_EventDispatch$hasObjectEventHandler(eventType, objectId, handler) { + var handlers=this._objectEventHandlers[eventType]; + if (handlers !=null) { + var _handlers=handlers[objectId]; + for (var i=0; _handlers !=null && i < _handlers.length; i++) { + if (_handlers[i]===handler) + return true; + } + } + return false; + }, + addEventHandler: function OSF_EventDispatch$addEventHandler(eventType, handler) { + if (typeof handler !="function") { + return false; + } + var handlers=this._eventHandlers[eventType]; + if (handlers && !this.hasEventHandler(eventType, handler)) { + handlers.push(handler); + return true; + } + else { + return false; + } + }, + addObjectEventHandler: function OSF_EventDispatch$addObjectEventHandler(eventType, objectId, handler) { + if (typeof handler !="function") { + return false; + } + var handlers=this._objectEventHandlers[eventType]; + if (handlers && !this.hasObjectEventHandler(eventType, objectId, handler)) { + if (handlers[objectId]==null) + handlers[objectId]=[]; + handlers[objectId].push(handler); + return true; + } + return false; + }, + addEventHandlerAndFireQueuedEvent: function OSF_EventDispatch$addEventHandlerAndFireQueuedEvent(eventType, handler) { + var handlers=this._eventHandlers[eventType]; + var isFirstHandler=handlers.length==0; + var succeed=this.addEventHandler(eventType, handler); + if (isFirstHandler && succeed) { + this.fireQueuedEvent(eventType); + } + return succeed; + }, + removeEventHandler: function OSF_EventDispatch$removeEventHandler(eventType, handler) { + var handlers=this._eventHandlers[eventType]; + if (handlers && handlers.length > 0) { + for (var index=0; index < handlers.length; index++) { + if (handlers[index]===handler) { + handlers.splice(index, 1); + return true; + } + } + } + return false; + }, + removeObjectEventHandler: function OSF_EventDispatch$removeObjectEventHandler(eventType, objectId, handler) { + var handlers=this._objectEventHandlers[eventType]; + if (handlers !=null) { + var _handlers=handlers[objectId]; + for (var i=0; _handlers !=null && i < _handlers.length; i++) { + if (_handlers[i]===handler) { + _handlers.splice(i, 1); + return true; + } + } + } + return false; + }, + clearEventHandlers: function OSF_EventDispatch$clearEventHandlers(eventType) { + if (typeof this._eventHandlers[eventType] !="undefined" && this._eventHandlers[eventType].length > 0) { + this._eventHandlers[eventType]=[]; + return true; + } + return false; + }, + clearObjectEventHandlers: function OSF_EventDispatch$clearObjectEventHandlers(eventType, objectId) { + if (this._objectEventHandlers[eventType] !=null && this._objectEventHandlers[eventType][objectId] !=null) { + this._objectEventHandlers[eventType][objectId]=[]; + return true; + } + return false; + }, + getEventHandlerCount: function OSF_EventDispatch$getEventHandlerCount(eventType) { + return this._eventHandlers[eventType] !=undefined ? this._eventHandlers[eventType].length : -1; + }, + getObjectEventHandlerCount: function OSF_EventDispatch$getObjectEventHandlerCount(eventType, objectId) { + if (this._objectEventHandlers[eventType]==null || this._objectEventHandlers[eventType][objectId]==null) + return 0; + return this._objectEventHandlers[eventType][objectId].length; + }, + fireEvent: function OSF_EventDispatch$fireEvent(eventArgs) { + if (eventArgs.type==undefined) + return false; + var eventType=eventArgs.type; + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers=this._eventHandlers[eventType]; + for (var handler in eventHandlers) + eventHandlers[handler](eventArgs); + return true; + } + else { + return false; + } + }, + fireObjectEvent: function OSF_EventDispatch$fireObjectEvent(objectId, eventArgs) { + if (eventArgs.type==undefined) + return false; + var eventType=eventArgs.type; + if (eventType && this._objectEventHandlers[eventType]) { + var eventHandlers=this._objectEventHandlers[eventType]; + var _handlers=eventHandlers[objectId]; + if (_handlers !=null) { + for (var i=0; i < _handlers.length; i++) + _handlers[i](eventArgs); + return true; + } + } + return false; + }, + fireOrQueueEvent: function OSF_EventDispatch$fireOrQueueEvent(eventArgs) { + var eventType=eventArgs.type; + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers=this._eventHandlers[eventType]; + var queuedEvents=this._queuedEventsArgs[eventType]; + if (eventHandlers.length==0) { + queuedEvents.push(eventArgs); + } + else { + this.fireEvent(eventArgs); + } + return true; + } + else { + return false; + } + }, + fireQueuedEvent: function OSF_EventDispatch$queueEvent(eventType) { + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers=this._eventHandlers[eventType]; + var queuedEvents=this._queuedEventsArgs[eventType]; + if (eventHandlers.length > 0) { + var eventHandler=eventHandlers[0]; + while (queuedEvents.length > 0) { + var eventArgs=queuedEvents.shift(); + eventHandler(eventArgs); + } + return true; + } + } + return false; + }, + clearQueuedEvent: function OSF_EventDispatch$clearQueuedEvent(eventType) { + if (eventType && this._eventHandlers[eventType]) { + var queuedEvents=this._queuedEventsArgs[eventType]; + if (queuedEvents) { + this._queuedEventsArgs[eventType]=[]; + } + } + } +}; +OSF.DDA.OMFactory=OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEventArgs(eventType, target, eventProperties) { + var args; + switch (eventType) { + case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged: + args=new OSF.DDA.DocumentSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged: + args=new OSF.DDA.BindingSelectionChangedEventArgs(this.manufactureBinding(eventProperties, target.document), eventProperties[OSF.DDA.PropertyDescriptors.Subset]); + break; + case Microsoft.Office.WebExtension.EventType.BindingDataChanged: + args=new OSF.DDA.BindingDataChangedEventArgs(this.manufactureBinding(eventProperties, target.document)); + break; + case Microsoft.Office.WebExtension.EventType.SettingsChanged: + args=new OSF.DDA.SettingsChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ActiveViewChanged: + args=new OSF.DDA.ActiveViewChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged: + args=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged: + args=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.AppCommandInvoked: + args=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.ObjectDeleted: + case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged: + case Microsoft.Office.WebExtension.EventType.ObjectDataChanged: + case Microsoft.Office.WebExtension.EventType.ContentControlAdded: + args=new OSF.DDA.ObjectEventArgs(eventType, eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); + break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args=new OSF.DDA.RichApiMessageEventArgs(eventType, eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeInserted: + args=new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeReplaced: + args=new OSF.DDA.NodeReplacedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]), this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeDeleted: + args=new OSF.DDA.NodeDeletedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]), this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NextSiblingNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged: + args=new OSF.DDA.TaskSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged: + args=new OSF.DDA.ResourceSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged: + args=new OSF.DDA.ViewSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.DialogMessageReceived: + args=new OSF.DDA.DialogEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived: + args=new OSF.DDA.DialogParentEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.ItemChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlookwebapp") { + args=new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); + target.initialize(args["initialData"]); + target.setCurrentItemNumber(args["itemNumber"].itemNumber); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlookwebapp") { + args=new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlookwebapp") { + args=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + return args; +}; +OSF.DDA.AsyncMethodNames.addNames({ + AddHandlerAsync: "addHandlerAsync", + RemoveHandlerAsync: "removeHandlerAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddHandlerAsync, + requiredArguments: [{ + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + }, + { + "name": Microsoft.Office.WebExtension.Parameters.Handler, + "types": ["function"] + } + ], + supportedOptions: [], + privateStateCallbacks: [] +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.RemoveHandlerAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.Handler, + value: { + "types": ["function", "object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [] +}); +OSF.DialogShownStatus={ hasDialogShown: false, isWindowDialog: false }; +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { + DialogMessageReceivedEvent: "DialogMessageReceivedEvent" +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + DialogMessageReceived: "dialogMessageReceived", + DialogEventReceived: "dialogEventReceived" +}); +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + MessageType: "messageType", + MessageContent: "messageContent" +}); +OSF.DDA.DialogEventType={}; +OSF.OUtil.augmentList(OSF.DDA.DialogEventType, { + DialogClosed: "dialogClosed", + NavigationFailed: "naviationFailed" +}); +OSF.DDA.AsyncMethodNames.addNames({ + DisplayDialogAsync: "displayDialogAsync", + CloseAsync: "close" +}); +OSF.DDA.SyncMethodNames.addNames({ + MessageParent: "messageParent", + AddMessageHandler: "addEventHandler", + SendMessage: "sendMessage" +}); +OSF.DDA.UI.ParentUI=function OSF_DDA_ParentUI() { + var eventDispatch=new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.DialogMessageReceived, + Microsoft.Office.WebExtension.EventType.DialogEventReceived, + Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived + ]); + var openDialogName=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName; + var target=this; + if (!target[openDialogName]) { + OSF.OUtil.defineEnumerableProperty(target, openDialogName, { + value: function () { + var openDialog=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog]; + openDialog(arguments, eventDispatch, target); + } + }); + } + OSF.OUtil.finalizeProperties(this); +}; +OSF.DDA.UI.ChildUI=function OSF_DDA_ChildUI(isPopupWindow) { + var messageParentName=OSF.DDA.SyncMethodNames.MessageParent.displayName; + var target=this; + if (!target[messageParentName]) { + OSF.OUtil.defineEnumerableProperty(target, messageParentName, { + value: function () { + var messageParent=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent]; + return messageParent(arguments, target); + } + }); + } + var addEventHandler=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; + if (!target[addEventHandler] && typeof OSF.DialogParentMessageEventDispatch !="undefined") { + OSF.DDA.DispIdHost.addEventSupport(target, OSF.DialogParentMessageEventDispatch, isPopupWindow); + } + OSF.OUtil.finalizeProperties(this); +}; +OSF.DialogHandler=function OSF_DialogHandler() { }; +OSF.DDA.DialogEventArgs=function OSF_DDA_DialogEventArgs(message) { + if (message[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DialogMessageReceived + }, + "message": { + value: message[OSF.DDA.PropertyDescriptors.MessageContent] + } + }); + } + else { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DialogEventReceived + }, + "error": { + value: message[OSF.DDA.PropertyDescriptors.MessageType] + } + }); + } +}; +OSF.DDA.DialogParentEventArgs=function OSF_DDA_DialogParentEventArgs(message) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived + }, + "message": { + value: message[OSF.DDA.PropertyDescriptors.MessageContent] + } + }); +}; +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.DisplayDialogAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Url, + "types": ["string"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.Width, + value: { + "types": ["number"], + "defaultValue": 99 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Height, + value: { + "types": ["number"], + "defaultValue": 99 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.RequireHTTPs, + value: { + "types": ["boolean"], + "defaultValue": true + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.DisplayInIframe, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.HideTitle, + value: { + "types": ["boolean"], + "defaultValue": false + } + } + ], + privateStateCallbacks: [], + onSucceeded: function (args, caller, callArgs) { + var targetId=args[Microsoft.Office.WebExtension.Parameters.Id]; + var eventDispatch=args[Microsoft.Office.WebExtension.Parameters.Data]; + var dialog=new OSF.DialogHandler(); + var closeDialog=OSF.DDA.AsyncMethodNames.CloseAsync.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, closeDialog, { + value: function () { + var closeDialogfunction=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog]; + closeDialogfunction(arguments, targetId, eventDispatch, dialog); + } + }); + var addHandler=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, addHandler, { + value: function () { + var syncMethodCall=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id]; + var callArgs=syncMethodCall.verifyAndExtractCall(arguments, dialog, eventDispatch); + var eventType=callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + var handler=callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + return eventDispatch.addEventHandlerAndFireQueuedEvent(eventType, handler); + } + }); + var sendMessage=OSF.DDA.SyncMethodNames.SendMessage.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, sendMessage, { + value: function () { + var execute=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; + return execute(arguments, eventDispatch, dialog); + } + }); + return dialog; + }, + checkCallArgs: function (callArgs, caller, stateInfo) { + if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] <=0) { + callArgs[Microsoft.Office.WebExtension.Parameters.Width]=1; + } + if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { + callArgs[Microsoft.Office.WebExtension.Parameters.Width]=99; + } + if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] <=0) { + callArgs[Microsoft.Office.WebExtension.Parameters.Height]=1; + } + if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { + callArgs[Microsoft.Office.WebExtension.Parameters.Height]=99; + } + if (!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) { + callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=true; + } + return callArgs; + } +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.CloseAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [] +}); +OSF.DDA.SyncMethodCalls.define({ + method: OSF.DDA.SyncMethodNames.MessageParent, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.MessageToParent, + "types": ["string", "number", "boolean"] + } + ], + supportedOptions: [] +}); +OSF.DDA.SyncMethodCalls.define({ + method: OSF.DDA.SyncMethodNames.AddMessageHandler, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + }, + { + "name": Microsoft.Office.WebExtension.Parameters.Handler, + "types": ["function"] + } + ], + supportedOptions: [] +}); +OSF.DDA.SyncMethodCalls.define({ + method: OSF.DDA.SyncMethodNames.SendMessage, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.MessageContent, + "types": ["string"] + } + ], + supportedOptions: [], + privateStateCallbacks: [] +}); +OSF.DDA.SafeArray.Delegate.openDialog=function OSF_DDA_SafeArray_Delegate$OpenDialog(args) { + try { + if (args.onCalling) { + args.onCalling(); + } + var callback=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true, args); + OSF.ClientHostController.openDialog(args.dispId, args.targetId, function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) { + if (args.onEvent) { + args.onEvent(payload); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onEventDone(args.dispId); + } + }, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate.closeDialog=function OSF_DDA_SafeArray_Delegate$CloseDialog(args) { + if (args.onCalling) { + args.onCalling(); + } + var callback=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false, args); + try { + OSF.ClientHostController.closeDialog(args.dispId, args.targetId, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate.messageParent=function OSF_DDA_SafeArray_Delegate$MessageParent(args) { + try { + if (args.onCalling) { + args.onCalling(); + } + var startTime=(new Date()).getTime(); + var result=OSF.ClientHostController.messageParent(args.hostCallArgs); + if (args.onReceiving) { + args.onReceiving(); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(args.dispId, args.hostCallArgs, Math.abs((new Date()).getTime() - startTime), result); + } + return result; + } + catch (ex) { + return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(ex); + } +}; +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent, + fromHost: [ + { name: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.MessageType, value: 0 }, + { name: OSF.DDA.PropertyDescriptors.MessageContent, value: 1 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.sendMessage=function OSF_DDA_SafeArray_Delegate$SendMessage(args) { + try { + if (args.onCalling) { + args.onCalling(); + } + var startTime=(new Date()).getTime(); + var result=OSF.ClientHostController.sendMessage(args.hostCallArgs); + if (args.onReceiving) { + args.onReceiving(); + } + return result; + } + catch (ex) { + return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(ex); + } +}; +Microsoft.Office.WebExtension.TableData=function Microsoft_Office_WebExtension_TableData(rows, headers) { + function fixData(data) { + if (data==null || data==undefined) { + return null; + } + try { + for (var dim=OSF.DDA.DataCoercion.findArrayDimensionality(data, 2); dim < 2; dim++) { + data=[data]; + } + return data; + } + catch (ex) { + } + } + ; + OSF.OUtil.defineEnumerableProperties(this, { + "headers": { + get: function () { return headers; }, + set: function (value) { + headers=fixData(value); + } + }, + "rows": { + get: function () { return rows; }, + set: function (value) { + rows=(value==null || (OSF.OUtil.isArray(value) && (value.length==0))) ? + [] : + fixData(value); + } + } + }); + this.headers=headers; + this.rows=rows; +}; +OSF.DDA.OMFactory=OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureTableData=function OSF_DDA_OMFactory$manufactureTableData(tableDataProperties) { + return new Microsoft.Office.WebExtension.TableData(tableDataProperties[OSF.DDA.TableDataProperties.TableRows], tableDataProperties[OSF.DDA.TableDataProperties.TableHeaders]); +}; +Microsoft.Office.WebExtension.CoercionType={ + Text: "text", + Matrix: "matrix", + Table: "table" +}; +OSF.DDA.DataCoercion=(function OSF_DDA_DataCoercion() { + return { + findArrayDimensionality: function OSF_DDA_DataCoercion$findArrayDimensionality(obj) { + if (OSF.OUtil.isArray(obj)) { + var dim=0; + for (var index=0; index < obj.length; index++) { + dim=Math.max(dim, OSF.DDA.DataCoercion.findArrayDimensionality(obj[index])); + } + return dim+1; + } + else { + return 0; + } + }, + getCoercionDefaultForBinding: function OSF_DDA_DataCoercion$getCoercionDefaultForBinding(bindingType) { + switch (bindingType) { + case Microsoft.Office.WebExtension.BindingType.Matrix: return Microsoft.Office.WebExtension.CoercionType.Matrix; + case Microsoft.Office.WebExtension.BindingType.Table: return Microsoft.Office.WebExtension.CoercionType.Table; + case Microsoft.Office.WebExtension.BindingType.Text: + default: + return Microsoft.Office.WebExtension.CoercionType.Text; + } + }, + getBindingDefaultForCoercion: function OSF_DDA_DataCoercion$getBindingDefaultForCoercion(coercionType) { + switch (coercionType) { + case Microsoft.Office.WebExtension.CoercionType.Matrix: return Microsoft.Office.WebExtension.BindingType.Matrix; + case Microsoft.Office.WebExtension.CoercionType.Table: return Microsoft.Office.WebExtension.BindingType.Table; + case Microsoft.Office.WebExtension.CoercionType.Text: + case Microsoft.Office.WebExtension.CoercionType.Html: + case Microsoft.Office.WebExtension.CoercionType.Ooxml: + default: + return Microsoft.Office.WebExtension.BindingType.Text; + } + }, + determineCoercionType: function OSF_DDA_DataCoercion$determineCoercionType(data) { + if (data==null || data==undefined) + return null; + var sourceType=null; + var runtimeType=typeof data; + if (data.rows !==undefined) { + sourceType=Microsoft.Office.WebExtension.CoercionType.Table; + } + else if (OSF.OUtil.isArray(data)) { + sourceType=Microsoft.Office.WebExtension.CoercionType.Matrix; + } + else if (runtimeType=="string" || runtimeType=="number" || runtimeType=="boolean" || OSF.OUtil.isDate(data)) { + sourceType=Microsoft.Office.WebExtension.CoercionType.Text; + } + else { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject; + } + return sourceType; + }, + coerceData: function OSF_DDA_DataCoercion$coerceData(data, destinationType, sourceType) { + sourceType=sourceType || OSF.DDA.DataCoercion.determineCoercionType(data); + if (sourceType && sourceType !=destinationType) { + OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionBegin); + data=OSF.DDA.DataCoercion._coerceDataFromTable(destinationType, OSF.DDA.DataCoercion._coerceDataToTable(data, sourceType)); + OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionEnd); + } + return data; + }, + _matrixToText: function OSF_DDA_DataCoercion$_matrixToText(matrix) { + if (matrix.length==1 && matrix[0].length==1) + return ""+matrix[0][0]; + var val=""; + for (var i=0; i < matrix.length; i++) { + val+=matrix[i].join("\t")+"\n"; + } + return val.substring(0, val.length - 1); + }, + _textToMatrix: function OSF_DDA_DataCoercion$_textToMatrix(text) { + var ret=text.split("\n"); + for (var i=0; i < ret.length; i++) + ret[i]=ret[i].split("\t"); + return ret; + }, + _tableToText: function OSF_DDA_DataCoercion$_tableToText(table) { + var headers=""; + if (table.headers !=null) { + headers=OSF.DDA.DataCoercion._matrixToText([table.headers])+"\n"; + } + var rows=OSF.DDA.DataCoercion._matrixToText(table.rows); + if (rows=="") { + headers=headers.substring(0, headers.length - 1); + } + return headers+rows; + }, + _tableToMatrix: function OSF_DDA_DataCoercion$_tableToMatrix(table) { + var matrix=table.rows; + if (table.headers !=null) { + matrix.unshift(table.headers); + } + return matrix; + }, + _coerceDataFromTable: function OSF_DDA_DataCoercion$_coerceDataFromTable(coercionType, table) { + var value; + switch (coercionType) { + case Microsoft.Office.WebExtension.CoercionType.Table: + value=table; + break; + case Microsoft.Office.WebExtension.CoercionType.Matrix: + value=OSF.DDA.DataCoercion._tableToMatrix(table); + break; + case Microsoft.Office.WebExtension.CoercionType.SlideRange: + value=null; + if (OSF.DDA.OMFactory.manufactureSlideRange) { + value=OSF.DDA.OMFactory.manufactureSlideRange(OSF.DDA.DataCoercion._tableToText(table)); + } + if (value==null) { + value=OSF.DDA.DataCoercion._tableToText(table); + } + break; + case Microsoft.Office.WebExtension.CoercionType.Text: + case Microsoft.Office.WebExtension.CoercionType.Html: + case Microsoft.Office.WebExtension.CoercionType.Ooxml: + default: + value=OSF.DDA.DataCoercion._tableToText(table); + break; + } + return value; + }, + _coerceDataToTable: function OSF_DDA_DataCoercion$_coerceDataToTable(data, sourceType) { + if (sourceType==undefined) { + sourceType=OSF.DDA.DataCoercion.determineCoercionType(data); + } + var value; + switch (sourceType) { + case Microsoft.Office.WebExtension.CoercionType.Table: + value=data; + break; + case Microsoft.Office.WebExtension.CoercionType.Matrix: + value=new Microsoft.Office.WebExtension.TableData(data); + break; + case Microsoft.Office.WebExtension.CoercionType.Text: + case Microsoft.Office.WebExtension.CoercionType.Html: + case Microsoft.Office.WebExtension.CoercionType.Ooxml: + default: + value=new Microsoft.Office.WebExtension.TableData(OSF.DDA.DataCoercion._textToMatrix(data)); + break; + } + return value; + } + }; +})(); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.CoercionType, + toHost: [ + { name: Microsoft.Office.WebExtension.CoercionType.Text, value: 0 }, + { name: Microsoft.Office.WebExtension.CoercionType.Matrix, value: 1 }, + { name: Microsoft.Office.WebExtension.CoercionType.Table, value: 2 } + ] +}); +OSF.DDA.AsyncMethodNames.addNames({ + GetSelectedDataAsync: "getSelectedDataAsync", + SetSelectedDataAsync: "setSelectedDataAsync" +}); +(function () { + function processData(dataDescriptor, caller, callArgs) { + var data=dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + if (OSF.DDA.TableDataProperties && data && (data[OSF.DDA.TableDataProperties.TableRows] !=undefined || data[OSF.DDA.TableDataProperties.TableHeaders] !=undefined)) { + data=OSF.DDA.OMFactory.manufactureTableData(data); + } + data=OSF.DDA.DataCoercion.coerceData(data, callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType]); + return data==undefined ? null : data; + } + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetSelectedDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.CoercionType, + "enum": Microsoft.Office.WebExtension.CoercionType + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.ValueFormat, + value: { + "enum": Microsoft.Office.WebExtension.ValueFormat, + "defaultValue": Microsoft.Office.WebExtension.ValueFormat.Unformatted + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.FilterType, + value: { + "enum": Microsoft.Office.WebExtension.FilterType, + "defaultValue": Microsoft.Office.WebExtension.FilterType.All + } + } + ], + privateStateCallbacks: [], + onSucceeded: processData + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetSelectedDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { + return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); + } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageLeft, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageTop, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageWidth, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageHeight, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + } + ], + privateStateCallbacks: [] + }); +})(); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetSelectedDataMethod, + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.ValueFormat, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.FilterType, value: 2 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetSelectedDataMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.ImageLeft, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.ImageTop, value: 3 }, + { name: Microsoft.Office.WebExtension.Parameters.ImageWidth, value: 4 }, + { name: Microsoft.Office.WebExtension.Parameters.ImageHeight, value: 5 }, + ] +}); +OSF.DDA.SettingsManager={ + SerializedSettings: "serializedSettings", + RefreshingSettings: "refreshingSettings", + DateJSONPrefix: "Date(", + DataJSONSuffix: ")", + serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) { + var ret={}; + for (var key in settingsCollection) { + var value=settingsCollection[key]; + try { + if (JSON) { + value=JSON.stringify(value, function dateReplacer(k, v) { + return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix+this[k].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix : v; + }); + } + else { + value=Sys.Serialization.JavaScriptSerializer.serialize(value); + } + ret[key]=value; + } + catch (ex) { + } + } + return ret; + }, + deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) { + var ret={}; + serializedSettings=serializedSettings || {}; + for (var key in serializedSettings) { + var value=serializedSettings[key]; + try { + if (JSON) { + value=JSON.parse(value, function dateReviver(k, v) { + var d; + if (typeof v==='string' && v && v.length > 6 && v.slice(0, 5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) { + d=new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + } + else { + value=Sys.Serialization.JavaScriptSerializer.deserialize(value, true); + } + ret[key]=value; + } + catch (ex) { + } + } + return ret; + } +}; +OSF.DDA.Settings=function OSF_DDA_Settings(settings) { + settings=settings || {}; + var cacheSessionSettings=function (settings) { + var osfSessionStorage=OSF.OUtil.getSessionStorage(); + if (osfSessionStorage) { + var serializedSettings=OSF.DDA.SettingsManager.serializeSettings(settings); + var storageSettings=JSON ? JSON.stringify(serializedSettings) : Sys.Serialization.JavaScriptSerializer.serialize(serializedSettings); + osfSessionStorage.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(), storageSettings); + } + }; + OSF.OUtil.defineEnumerableProperties(this, { + "get": { + value: function OSF_DDA_Settings$get(name) { + var e=Function._validateParams(arguments, [ + { name: "name", type: String, mayBeNull: false } + ]); + if (e) + throw e; + var setting=settings[name]; + return typeof (setting)==='undefined' ? null : setting; + } + }, + "set": { + value: function OSF_DDA_Settings$set(name, value) { + var e=Function._validateParams(arguments, [ + { name: "name", type: String, mayBeNull: false }, + { name: "value", mayBeNull: true } + ]); + if (e) + throw e; + settings[name]=value; + cacheSessionSettings(settings); + } + }, + "remove": { + value: function OSF_DDA_Settings$remove(name) { + var e=Function._validateParams(arguments, [ + { name: "name", type: String, mayBeNull: false } + ]); + if (e) + throw e; + delete settings[name]; + cacheSessionSettings(settings); + } + } + }); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.SaveAsync], settings); +}; +OSF.DDA.RefreshableSettings=function OSF_DDA_RefreshableSettings(settings) { + OSF.DDA.RefreshableSettings.uber.constructor.call(this, settings); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.RefreshAsync], settings); + OSF.DDA.DispIdHost.addEventSupport(this, new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged])); +}; +OSF.OUtil.extend(OSF.DDA.RefreshableSettings, OSF.DDA.Settings); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + SettingsChanged: "settingsChanged" +}); +OSF.DDA.SettingsChangedEventArgs=function OSF_DDA_SettingsChangedEventArgs(settingsInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.SettingsChanged + }, + "settings": { + value: settingsInstance + } + }); +}; +OSF.DDA.AsyncMethodNames.addNames({ + RefreshAsync: "refreshAsync", + SaveAsync: "saveAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.RefreshAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [ + { + name: OSF.DDA.SettingsManager.RefreshingSettings, + value: function getRefreshingSettings(settingsInstance, settingsCollection) { + return settingsCollection; + } + } + ], + onSucceeded: function deserializeSettings(serializedSettingsDescriptor, refreshingSettings, refreshingSettingsArgs) { + var serializedSettings=serializedSettingsDescriptor[OSF.DDA.SettingsManager.SerializedSettings]; + var newSettings=OSF.DDA.SettingsManager.deserializeSettings(serializedSettings); + var oldSettings=refreshingSettingsArgs[OSF.DDA.SettingsManager.RefreshingSettings]; + for (var setting in oldSettings) { + refreshingSettings.remove(setting); + } + for (var setting in newSettings) { + refreshingSettings.set(setting, newSettings[setting]); + } + return refreshingSettings; + } +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SaveAsync, + requiredArguments: [], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale, + value: { + "types": ["boolean"], + "defaultValue": true + } + } + ], + privateStateCallbacks: [ + { + name: OSF.DDA.SettingsManager.SerializedSettings, + value: function serializeSettings(settingsInstance, settingsCollection) { + return OSF.DDA.SettingsManager.serializeSettings(settingsCollection); + } + } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidLoadSettingsMethod, + fromHost: [ + { name: OSF.DDA.SettingsManager.SerializedSettings, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSaveSettingsMethod, + toHost: [ + { name: OSF.DDA.SettingsManager.SerializedSettings, value: OSF.DDA.SettingsManager.SerializedSettings }, + { name: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale, value: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ type: OSF.DDA.EventDispId.dispidSettingsChangedEvent }); +Microsoft.Office.WebExtension.BindingType={ + Table: "table", + Text: "text", + Matrix: "matrix" +}; +OSF.DDA.BindingProperties={ + Id: "BindingId", + Type: Microsoft.Office.WebExtension.Parameters.BindingType +}; +OSF.OUtil.augmentList(OSF.DDA.ListDescriptors, { BindingList: "BindingList" }); +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + Subset: "subset", + BindingProperties: "BindingProperties" +}); +OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList, OSF.DDA.PropertyDescriptors.BindingProperties); +OSF.DDA.BindingPromise=function OSF_DDA_BindingPromise(bindingId, errorCallback) { + this._id=bindingId; + OSF.OUtil.defineEnumerableProperty(this, "onFail", { + get: function () { + return errorCallback; + }, + set: function (onError) { + var t=typeof onError; + if (t !="undefined" && t !="function") { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction, t); + } + errorCallback=onError; + } + }); +}; +OSF.DDA.BindingPromise.prototype={ + _fetch: function OSF_DDA_BindingPromise$_fetch(onComplete) { + if (this.binding) { + if (onComplete) + onComplete(this.binding); + } + else { + if (!this._binding) { + var me=this; + Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(this._id, function (asyncResult) { + if (asyncResult.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded) { + OSF.OUtil.defineEnumerableProperty(me, "binding", { + value: asyncResult.value + }); + if (onComplete) + onComplete(me.binding); + } + else { + if (me.onFail) + me.onFail(asyncResult); + } + }); + } + } + return this; + }, + getDataAsync: function OSF_DDA_BindingPromise$getDataAsync() { + var args=arguments; + this._fetch(function onComplete(binding) { binding.getDataAsync.apply(binding, args); }); + return this; + }, + setDataAsync: function OSF_DDA_BindingPromise$setDataAsync() { + var args=arguments; + this._fetch(function onComplete(binding) { binding.setDataAsync.apply(binding, args); }); + return this; + }, + addHandlerAsync: function OSF_DDA_BindingPromise$addHandlerAsync() { + var args=arguments; + this._fetch(function onComplete(binding) { binding.addHandlerAsync.apply(binding, args); }); + return this; + }, + removeHandlerAsync: function OSF_DDA_BindingPromise$removeHandlerAsync() { + var args=arguments; + this._fetch(function onComplete(binding) { binding.removeHandlerAsync.apply(binding, args); }); + return this; + } +}; +OSF.DDA.BindingFacade=function OSF_DDA_BindingFacade(docInstance) { + this._eventDispatches=[]; + OSF.OUtil.defineEnumerableProperty(this, "document", { + value: docInstance + }); + var am=OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.AddFromSelectionAsync, + am.AddFromNamedItemAsync, + am.GetAllAsync, + am.GetByIdAsync, + am.ReleaseByIdAsync + ]); +}; +OSF.DDA.UnknownBinding=function OSF_DDA_UknonwnBinding(id, docInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "document": { value: docInstance }, + "id": { value: id } + }); +}; +OSF.DDA.Binding=function OSF_DDA_Binding(id, docInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "document": { + value: docInstance + }, + "id": { + value: id + } + }); + var am=OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.GetDataAsync, + am.SetDataAsync + ]); + var et=Microsoft.Office.WebExtension.EventType; + var bindingEventDispatches=docInstance.bindings._eventDispatches; + if (!bindingEventDispatches[id]) { + bindingEventDispatches[id]=new OSF.EventDispatch([ + et.BindingSelectionChanged, + et.BindingDataChanged + ]); + } + var eventDispatch=bindingEventDispatches[id]; + OSF.DDA.DispIdHost.addEventSupport(this, eventDispatch); +}; +OSF.DDA.generateBindingId=function OSF_DDA$GenerateBindingId() { + return "UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+new Date().getTime(); +}; +OSF.DDA.OMFactory=OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureBinding=function OSF_DDA_OMFactory$manufactureBinding(bindingProperties, containingDocument) { + var id=bindingProperties[OSF.DDA.BindingProperties.Id]; + var rows=bindingProperties[OSF.DDA.BindingProperties.RowCount]; + var cols=bindingProperties[OSF.DDA.BindingProperties.ColumnCount]; + var hasHeaders=bindingProperties[OSF.DDA.BindingProperties.HasHeaders]; + var binding; + switch (bindingProperties[OSF.DDA.BindingProperties.Type]) { + case Microsoft.Office.WebExtension.BindingType.Text: + binding=new OSF.DDA.TextBinding(id, containingDocument); + break; + case Microsoft.Office.WebExtension.BindingType.Matrix: + binding=new OSF.DDA.MatrixBinding(id, containingDocument, rows, cols); + break; + case Microsoft.Office.WebExtension.BindingType.Table: + var isExcelApp=function () { + return (OSF.DDA.ExcelDocument) + && (Microsoft.Office.WebExtension.context.document) + && (Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument); + }; + var tableBindingObject; + if (isExcelApp() && OSF.DDA.ExcelTableBinding) { + tableBindingObject=OSF.DDA.ExcelTableBinding; + } + else { + tableBindingObject=OSF.DDA.TableBinding; + } + binding=new tableBindingObject(id, containingDocument, rows, cols, hasHeaders); + break; + default: + binding=new OSF.DDA.UnknownBinding(id, containingDocument); + } + return binding; +}; +OSF.DDA.AsyncMethodNames.addNames({ + AddFromSelectionAsync: "addFromSelectionAsync", + AddFromNamedItemAsync: "addFromNamedItemAsync", + GetAllAsync: "getAllAsync", + GetByIdAsync: "getByIdAsync", + ReleaseByIdAsync: "releaseByIdAsync", + GetDataAsync: "getDataAsync", + SetDataAsync: "setDataAsync" +}); +(function () { + function processBinding(bindingDescriptor) { + return OSF.DDA.OMFactory.manufactureBinding(bindingDescriptor, Microsoft.Office.WebExtension.context.document); + } + function getObjectId(obj) { return obj.id; } + function processData(dataDescriptor, caller, callArgs) { + var data=dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + if (OSF.DDA.TableDataProperties && data && (data[OSF.DDA.TableDataProperties.TableRows] !=undefined || data[OSF.DDA.TableDataProperties.TableHeaders] !=undefined)) { + data=OSF.DDA.OMFactory.manufactureTableData(data); + } + data=OSF.DDA.DataCoercion.coerceData(data, callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType]); + return data==undefined ? null : data; + } + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddFromSelectionAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.BindingType, + "enum": Microsoft.Office.WebExtension.BindingType + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + value: { + "types": ["string"], + "calculate": OSF.DDA.generateBindingId + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [], + onSucceeded: processBinding + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync, + requiredArguments: [{ + "name": Microsoft.Office.WebExtension.Parameters.ItemName, + "types": ["string"] + }, + { + "name": Microsoft.Office.WebExtension.Parameters.BindingType, + "enum": Microsoft.Office.WebExtension.BindingType + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + value: { + "types": ["string"], + "calculate": OSF.DDA.generateBindingId + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.FailOnCollision, + value: function () { return true; } + } + ], + onSucceeded: processBinding + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetAllAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: function (response) { return OSF.OUtil.mapList(response[OSF.DDA.ListDescriptors.BindingList], processBinding); } + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetByIdAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Id, + "types": ["string"] + } + ], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: processBinding + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ReleaseByIdAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Id, + "types": ["string"] + } + ], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: function (response, caller, callArgs) { + var id=callArgs[Microsoft.Office.WebExtension.Parameters.Id]; + delete caller._eventDispatches[id]; + } + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetDataAsync, + requiredArguments: [], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs, binding) { return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(binding.type); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ValueFormat, + value: { + "enum": Microsoft.Office.WebExtension.ValueFormat, + "defaultValue": Microsoft.Office.WebExtension.ValueFormat.Unformatted + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.FilterType, + value: { + "enum": Microsoft.Office.WebExtension.FilterType, + "defaultValue": Microsoft.Office.WebExtension.FilterType.All + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Rows, + value: { + "types": ["object", "string"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartRow, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartColumn, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.RowCount, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ColumnCount, + value: { + "types": ["number"], + "defaultValue": 0 + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + if (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow]==0 && + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn]==0 && + callArgs[Microsoft.Office.WebExtension.Parameters.RowCount]==0 && + callArgs[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0) { + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartRow]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.RowCount]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.ColumnCount]; + } + if (callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType] !=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(caller.type) && + (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow] || + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn] || + callArgs[Microsoft.Office.WebExtension.Parameters.RowCount] || + callArgs[Microsoft.Office.WebExtension.Parameters.ColumnCount])) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding; + } + return callArgs; + }, + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ], + onSucceeded: processData + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Rows, + value: { + "types": ["object", "string"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartRow, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartColumn, + value: { + "types": ["number"], + "defaultValue": 0 + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + if (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow]==0 && + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn]==0) { + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartRow]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn]; + } + if (callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType] !=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(caller.type) && + (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow] || + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn])) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding; + } + return callArgs; + }, + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); +})(); +OSF.OUtil.augmentList(OSF.DDA.BindingProperties, { + RowCount: "BindingRowCount", + ColumnCount: "BindingColumnCount", + HasHeaders: "HasHeaders" +}); +OSF.DDA.MatrixBinding=function OSF_DDA_MatrixBinding(id, docInstance, rows, cols) { + OSF.DDA.MatrixBinding.uber.constructor.call(this, id, docInstance); + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.BindingType.Matrix + }, + "rowCount": { + value: rows ? rows : 0 + }, + "columnCount": { + value: cols ? cols : 0 + } + }); +}; +OSF.OUtil.extend(OSF.DDA.MatrixBinding, OSF.DDA.Binding); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.BindingProperties, + fromHost: [ + { name: OSF.DDA.BindingProperties.Id, value: 0 }, + { name: OSF.DDA.BindingProperties.Type, value: 1 }, + { name: OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData, value: 2 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.BindingType, + toHost: [ + { name: Microsoft.Office.WebExtension.BindingType.Text, value: 0 }, + { name: Microsoft.Office.WebExtension.BindingType.Matrix, value: 1 }, + { name: Microsoft.Office.WebExtension.BindingType.Table, value: 2 } + ], + invertible: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.BindingType, value: 1 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.ItemName, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.BindingType, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.FailOnCollision, value: 3 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidReleaseBindingMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetBindingMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetAllBindingsMethod, + fromHost: [ + { name: OSF.DDA.ListDescriptors.BindingList, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetBindingDataMethod, + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.ValueFormat, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.FilterType, value: 3 }, + { name: OSF.DDA.PropertyDescriptors.Subset, value: 4 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetBindingDataMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 2 }, + { name: OSF.DDA.SafeArray.UniqueArguments.Offset, value: 3 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData, + fromHost: [ + { name: OSF.DDA.BindingProperties.RowCount, value: 0 }, + { name: OSF.DDA.BindingProperties.ColumnCount, value: 1 }, + { name: OSF.DDA.BindingProperties.HasHeaders, value: 2 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.Subset, + toHost: [ + { name: OSF.DDA.SafeArray.UniqueArguments.Offset, value: 0 }, + { name: OSF.DDA.SafeArray.UniqueArguments.Run, value: 1 } + ], + canonical: true, + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.SafeArray.UniqueArguments.Offset, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.StartRow, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.StartColumn, value: 1 } + ], + canonical: true, + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.SafeArray.UniqueArguments.Run, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.RowCount, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.ColumnCount, value: 1 } + ], + canonical: true, + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddRowsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 1 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddColumnsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 1 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidClearAllRowsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ] +}); +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { TableDataProperties: "TableDataProperties" }); +OSF.OUtil.augmentList(OSF.DDA.BindingProperties, { + RowCount: "BindingRowCount", + ColumnCount: "BindingColumnCount", + HasHeaders: "HasHeaders" +}); +OSF.DDA.TableDataProperties={ + TableRows: "TableRows", + TableHeaders: "TableHeaders" +}; +OSF.DDA.TableBinding=function OSF_DDA_TableBinding(id, docInstance, rows, cols, hasHeaders) { + OSF.DDA.TableBinding.uber.constructor.call(this, id, docInstance); + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.BindingType.Table + }, + "rowCount": { + value: rows ? rows : 0 + }, + "columnCount": { + value: cols ? cols : 0 + }, + "hasHeaders": { + value: hasHeaders ? hasHeaders : false + } + }); + var am=OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.AddRowsAsync, + am.AddColumnsAsync, + am.DeleteAllDataValuesAsync + ]); +}; +OSF.OUtil.extend(OSF.DDA.TableBinding, OSF.DDA.Binding); +OSF.DDA.AsyncMethodNames.addNames({ + AddRowsAsync: "addRowsAsync", + AddColumnsAsync: "addColumnsAsync", + DeleteAllDataValuesAsync: "deleteAllDataValuesAsync" +}); +(function () { + function getObjectId(obj) { return obj.id; } + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddRowsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["object"] + } + ], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddColumnsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["object"] + } + ], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); +})(); +OSF.DDA.TextBinding=function OSF_DDA_TextBinding(id, docInstance) { + OSF.DDA.TextBinding.uber.constructor.call(this, id, docInstance); + OSF.OUtil.defineEnumerableProperty(this, "type", { + value: Microsoft.Office.WebExtension.BindingType.Text + }); +}; +OSF.OUtil.extend(OSF.DDA.TextBinding, OSF.DDA.Binding); +OSF.DDA.AsyncMethodNames.addNames({ AddFromPromptAsync: "addFromPromptAsync" }); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddFromPromptAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.BindingType, + "enum": Microsoft.Office.WebExtension.BindingType + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + value: { + "types": ["string"], + "calculate": OSF.DDA.generateBindingId + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.PromptText, + value: { + "types": ["string"], + "calculate": function () { return Strings.OfficeOM.L_AddBindingFromPromptDefaultText; } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.SampleData, + value: { + "types": ["object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [], + onSucceeded: function (bindingDescriptor) { return OSF.DDA.OMFactory.manufactureBinding(bindingDescriptor, Microsoft.Office.WebExtension.context.document); } +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddBindingFromPromptMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.BindingType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.PromptText, value: 2 } + ] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { DocumentSelectionChanged: "documentSelectionChanged" }); +OSF.DDA.DocumentSelectionChangedEventArgs=function OSF_DDA_DocumentSelectionChangedEventArgs(docInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged + }, + "document": { + value: docInstance + } + }); +}; +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectDeleted: "objectDeleted" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectSelectionChanged: "objectSelectionChanged" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectDataChanged: "objectDataChanged" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ContentControlAdded: "contentControlAdded" }); +OSF.DDA.ObjectEventArgs=function OSF_DDA_ObjectEventArgs(eventType, object) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { value: eventType }, + "object": { value: object } + }); +}; +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ type: OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent }); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectDeletedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectDataChangedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidContentControlAddedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + BindingSelectionChanged: "bindingSelectionChanged", + BindingDataChanged: "bindingDataChanged" +}); +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { BindingSelectionChangedEvent: "BindingSelectionChangedEvent" }); +OSF.DDA.BindingSelectionChangedEventArgs=function OSF_DDA_BindingSelectionChangedEventArgs(bindingInstance, subset) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.BindingSelectionChanged + }, + "binding": { + value: bindingInstance + } + }); + for (var prop in subset) { + OSF.OUtil.defineEnumerableProperty(this, prop, { + value: subset[prop] + }); + } +}; +OSF.DDA.BindingDataChangedEventArgs=function OSF_DDA_BindingDataChangedEventArgs(bindingInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.BindingDataChanged + }, + "binding": { + value: bindingInstance + } + }); +}; +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDescriptors.BindingSelectionChangedEvent, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: 0 }, + { name: OSF.DDA.PropertyDescriptors.Subset, value: 1 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidBindingSelectionChangedEvent, + fromHost: [ + { name: OSF.DDA.EventDescriptors.BindingSelectionChangedEvent, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidBindingDataChangedEvent, + fromHost: [{ name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self }] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FilterType, { OnlyVisible: "onlyVisible" }); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.FilterType, + toHost: [{ name: Microsoft.Office.WebExtension.FilterType.OnlyVisible, value: 1 }] +}); +Microsoft.Office.WebExtension.GoToType={ + Binding: "binding", + NamedItem: "namedItem", + Slide: "slide", + Index: "index" +}; +Microsoft.Office.WebExtension.SelectionMode={ + Default: "default", + Selected: "selected", + None: "none" +}; +Microsoft.Office.WebExtension.Index={ + First: "first", + Last: "last", + Next: "next", + Previous: "previous" +}; +OSF.DDA.AsyncMethodNames.addNames({ GoToByIdAsync: "goToByIdAsync" }); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GoToByIdAsync, + requiredArguments: [{ + "name": Microsoft.Office.WebExtension.Parameters.Id, + "types": ["string", "number"] + }, + { + "name": Microsoft.Office.WebExtension.Parameters.GoToType, + "enum": Microsoft.Office.WebExtension.GoToType + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.SelectionMode, + value: { + "enum": Microsoft.Office.WebExtension.SelectionMode, + "defaultValue": Microsoft.Office.WebExtension.SelectionMode.Default + } + } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.GoToType, + toHost: [ + { name: Microsoft.Office.WebExtension.GoToType.Binding, value: 0 }, + { name: Microsoft.Office.WebExtension.GoToType.NamedItem, value: 1 }, + { name: Microsoft.Office.WebExtension.GoToType.Slide, value: 2 }, + { name: Microsoft.Office.WebExtension.GoToType.Index, value: 3 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.SelectionMode, + toHost: [ + { name: Microsoft.Office.WebExtension.SelectionMode.Default, value: 0 }, + { name: Microsoft.Office.WebExtension.SelectionMode.Selected, value: 1 }, + { name: Microsoft.Office.WebExtension.SelectionMode.None, value: 2 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidNavigateToMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.GoToType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.SelectionMode, value: 2 } + ] +}); +OSF.DDA.AsyncMethodNames.addNames({ + ExecuteRichApiRequestAsync: "executeRichApiRequestAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync, + requiredArguments: [ + { + name: Microsoft.Office.WebExtension.Parameters.Data, + types: ["object"] + } + ], + supportedOptions: [] +}); +OSF.OUtil.setNamespace("RichApi", OSF.DDA); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidExecuteRichApiRequestMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.FilePropertiesDescriptor={ + Url: "Url" +}; +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + FilePropertiesDescriptor: "FilePropertiesDescriptor" +}); +Microsoft.Office.WebExtension.FileProperties=function Microsoft_Office_WebExtension_FileProperties(filePropertiesDescriptor) { + OSF.OUtil.defineEnumerableProperties(this, { + "url": { + value: filePropertiesDescriptor[OSF.DDA.FilePropertiesDescriptor.Url] + } + }); +}; +OSF.DDA.AsyncMethodNames.addNames({ GetFilePropertiesAsync: "getFilePropertiesAsync" }); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor, value: 0 } + ], + requiredArguments: [], + supportedOptions: [], + onSucceeded: function (filePropertiesDescriptor, caller, callArgs) { + return new Microsoft.Office.WebExtension.FileProperties(filePropertiesDescriptor); + } +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor, + fromHost: [ + { name: OSF.DDA.FilePropertiesDescriptor.Url, value: 0 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.ExcelTableBinding=function OSF_DDA_ExcelTableBinding(id, docInstance, rows, cols, hasHeaders) { + var am=OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.ClearFormatsAsync, + am.SetTableOptionsAsync, + am.SetFormatsAsync + ]); + OSF.DDA.ExcelTableBinding.uber.constructor.call(this, id, docInstance, rows, cols, hasHeaders); + OSF.OUtil.finalizeProperties(this); +}; +OSF.OUtil.extend(OSF.DDA.ExcelTableBinding, OSF.DDA.TableBinding); +(function () { + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetSelectedDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.CellFormat, + value: { + "types": ["object"], + "defaultValue": [] + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.TableOptions, + value: { + "types": ["object"], + "defaultValue": [] + } + } + ], + privateStateCallbacks: [] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Rows, + value: { + "types": ["object", "string"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartRow, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartColumn, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.CellFormat, + value: { + "types": ["object"], + "defaultValue": [] + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.TableOptions, + value: { + "types": ["object"], + "defaultValue": [] + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + var Parameters=Microsoft.Office.WebExtension.Parameters; + if (callArgs[Parameters.StartRow]==0 && + callArgs[Parameters.StartColumn]==0 && + OSF.OUtil.isArray(callArgs[Parameters.CellFormat]) && callArgs[Parameters.CellFormat].length===0 && + OSF.OUtil.isArray(callArgs[Parameters.TableOptions]) && callArgs[Parameters.TableOptions].length===0) { + delete callArgs[Parameters.StartRow]; + delete callArgs[Parameters.StartColumn]; + delete callArgs[Parameters.CellFormat]; + delete callArgs[Parameters.TableOptions]; + } + if (callArgs[Parameters.CoercionType] !=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(caller.type) && + ((callArgs[Parameters.StartRow] && callArgs[Parameters.StartRow] !=0) || + (callArgs[Parameters.StartColumn] && callArgs[Parameters.StartColumn] !=0) || + callArgs[Parameters.CellFormat] || + callArgs[Parameters.TableOptions])) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding; + } + return callArgs; + }, + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: function (obj) { return obj.id; } + } + ] + }); + OSF.DDA.BindingPromise.prototype.setTableOptionsAsync=function OSF_DDA_BindingPromise$setTableOptionsAsync() { + var args=arguments; + this._fetch(function onComplete(binding) { binding.setTableOptionsAsync.apply(binding, args); }); + return this; + }, + OSF.DDA.BindingPromise.prototype.setFormatsAsync=function OSF_DDA_BindingPromise$setFormatsAsync() { + var args=arguments; + this._fetch(function onComplete(binding) { binding.setFormatsAsync.apply(binding, args); }); + return this; + }, + OSF.DDA.BindingPromise.prototype.clearFormatsAsync=function OSF_DDA_BindingPromise$clearFormatsAsync() { + var args=arguments; + this._fetch(function onComplete(binding) { binding.clearFormatsAsync.apply(binding, args); }); + return this; + }; +})(); +(function () { + function getObjectId(obj) { return obj.id; } + OSF.DDA.AsyncMethodNames.addNames({ + ClearFormatsAsync: "clearFormatsAsync", + SetTableOptionsAsync: "setTableOptionsAsync", + SetFormatsAsync: "setFormatsAsync" + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ClearFormatsAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetTableOptionsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.TableOptions, + "defaultValue": [] + } + ], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetFormatsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.CellFormat, + "defaultValue": [] + } + ], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); +})(); +Microsoft.Office.WebExtension.Table={ + All: 0, + Data: 1, + Headers: 2 +}; +(function () { + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidClearFormatsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ] + }); + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetTableOptionsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.TableOptions, value: 1 }, + ] + }); + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetFormatsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.CellFormat, value: 1 }, + ] + }); + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetSelectedDataMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.CellFormat, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.TableOptions, value: 3 } + ] + }); + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetBindingDataMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 2 }, + { name: OSF.DDA.SafeArray.UniqueArguments.Offset, value: 3 }, + { name: Microsoft.Office.WebExtension.Parameters.CellFormat, value: 4 }, + { name: Microsoft.Office.WebExtension.Parameters.TableOptions, value: 5 } + ] + }); + var tableOptionProperties={ + headerRow: 0, + bandedRows: 1, + firstColumn: 2, + lastColumn: 3, + bandedColumns: 4, + filterButton: 5, + style: 6, + totalRow: 7 + }; + var cellProperties={ + row: 0, + column: 1 + }; + var formatProperties={ + alignHorizontal: { text: "alignHorizontal", type: 1 }, + alignVertical: { text: "alignVertical", type: 2 }, + backgroundColor: { text: "backgroundColor", type: 101 }, + borderStyle: { text: "borderStyle", type: 201 }, + borderColor: { text: "borderColor", type: 202 }, + borderTopStyle: { text: "borderTopStyle", type: 203 }, + borderTopColor: { text: "borderTopColor", type: 204 }, + borderBottomStyle: { text: "borderBottomStyle", type: 205 }, + borderBottomColor: { text: "borderBottomColor", type: 206 }, + borderLeftStyle: { text: "borderLeftStyle", type: 207 }, + borderLeftColor: { text: "borderLeftColor", type: 208 }, + borderRightStyle: { text: "borderRightStyle", type: 209 }, + borderRightColor: { text: "borderRightColor", type: 210 }, + borderOutlineStyle: { text: "borderOutlineStyle", type: 211 }, + borderOutlineColor: { text: "borderOutlineColor", type: 212 }, + borderInlineStyle: { text: "borderInlineStyle", type: 213 }, + borderInlineColor: { text: "borderInlineColor", type: 214 }, + fontFamily: { text: "fontFamily", type: 301 }, + fontStyle: { text: "fontStyle", type: 302 }, + fontSize: { text: "fontSize", type: 303 }, + fontUnderlineStyle: { text: "fontUnderlineStyle", type: 304 }, + fontColor: { text: "fontColor", type: 305 }, + fontDirection: { text: "fontDirection", type: 306 }, + fontStrikethrough: { text: "fontStrikethrough", type: 307 }, + fontSuperscript: { text: "fontSuperscript", type: 308 }, + fontSubscript: { text: "fontSubscript", type: 309 }, + fontNormal: { text: "fontNormal", type: 310 }, + indentLeft: { text: "indentLeft", type: 401 }, + indentRight: { text: "indentRight", type: 402 }, + numberFormat: { text: "numberFormat", type: 501 }, + width: { text: "width", type: 701 }, + height: { text: "height", type: 702 }, + wrapping: { text: "wrapping", type: 703 } + }; + var borderStyleSet=[ + { name: "none", value: 0 }, + { name: "thin", value: 1 }, + { name: "medium", value: 2 }, + { name: "dashed", value: 3 }, + { name: "dotted", value: 4 }, + { name: "thick", value: 5 }, + { name: "double", value: 6 }, + { name: "hair", value: 7 }, + { name: "medium dashed", value: 8 }, + { name: "dash dot", value: 9 }, + { name: "medium dash dot", value: 10 }, + { name: "dash dot dot", value: 11 }, + { name: "medium dash dot dot", value: 12 }, + { name: "slant dash dot", value: 13 }, + ]; + var colorSet=[ + { name: "none", value: 0 }, + { name: "black", value: 1 }, + { name: "blue", value: 2 }, + { name: "gray", value: 3 }, + { name: "green", value: 4 }, + { name: "orange", value: 5 }, + { name: "pink", value: 6 }, + { name: "purple", value: 7 }, + { name: "red", value: 8 }, + { name: "teal", value: 9 }, + { name: "turquoise", value: 10 }, + { name: "violet", value: 11 }, + { name: "white", value: 12 }, + { name: "yellow", value: 13 }, + { name: "automatic", value: 14 }, + ]; + var ns=OSF.DDA.SafeArray.Delegate.ParameterMap; + ns.define({ + type: formatProperties.alignHorizontal.text, + toHost: [ + { name: "general", value: 0 }, + { name: "left", value: 1 }, + { name: "center", value: 2 }, + { name: "right", value: 3 }, + { name: "fill", value: 4 }, + { name: "justify", value: 5 }, + { name: "center across selection", value: 6 }, + { name: "distributed", value: 7 }, + ] }); + ns.define({ + type: formatProperties.alignVertical.text, + toHost: [ + { name: "top", value: 0 }, + { name: "center", value: 1 }, + { name: "bottom", value: 2 }, + { name: "justify", value: 3 }, + { name: "distributed", value: 4 }, + ] }); + ns.define({ + type: formatProperties.backgroundColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderTopStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderTopColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderBottomStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderBottomColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderLeftStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderLeftColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderRightStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderRightColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderOutlineStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderOutlineColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderInlineStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderInlineColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.fontStyle.text, + toHost: [ + { name: "regular", value: 0 }, + { name: "italic", value: 1 }, + { name: "bold", value: 2 }, + { name: "bold italic", value: 3 }, + ] }); + ns.define({ + type: formatProperties.fontUnderlineStyle.text, + toHost: [ + { name: "none", value: 0 }, + { name: "single", value: 1 }, + { name: "double", value: 2 }, + { name: "single accounting", value: 3 }, + { name: "double accounting", value: 4 }, + ] }); + ns.define({ + type: formatProperties.fontColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.fontDirection.text, + toHost: [ + { name: "context", value: 0 }, + { name: "left-to-right", value: 1 }, + { name: "right-to-left", value: 2 }, + ] }); + ns.define({ + type: formatProperties.width.text, + toHost: [ + { name: "auto fit", value: -1 }, + ] }); + ns.define({ + type: formatProperties.height.text, + toHost: [ + { name: "auto fit", value: -1 }, + ] }); + ns.define({ + type: Microsoft.Office.WebExtension.Parameters.TableOptions, + toHost: [ + { name: "headerRow", value: 0 }, + { name: "bandedRows", value: 1 }, + { name: "firstColumn", value: 2 }, + { name: "lastColumn", value: 3 }, + { name: "bandedColumns", value: 4 }, + { name: "filterButton", value: 5 }, + { name: "style", value: 6 }, + { name: "totalRow", value: 7 } + ] }); + ns.dynamicTypes[Microsoft.Office.WebExtension.Parameters.CellFormat]={ + toHost: function (data) { + for (var entry in data) { + if (data[entry].format) { + data[entry].format=ns.doMapValues(data[entry].format, "toHost"); + } + } + return data; + }, + fromHost: function (args) { + return args; + } + }; + ns.setDynamicType(Microsoft.Office.WebExtension.Parameters.CellFormat, { + toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_CellFormat$toHost(cellFormats) { + var textCells="cells"; + var textFormat="format"; + var posCells=0; + var posFormat=1; + var ret=[]; + for (var index in cellFormats) { + var cfOld=cellFormats[index]; + var cfNew=[]; + if (typeof (cfOld[textCells]) !=='undefined') { + var cellsOld=cfOld[textCells]; + var cellsNew; + if (typeof cfOld[textCells]==="object") { + cellsNew=[]; + for (var entry in cellsOld) { + if (typeof (cellProperties[entry]) !=='undefined') { + cellsNew[cellProperties[entry]]=cellsOld[entry]; + } + } + } + else { + cellsNew=cellsOld; + } + cfNew[posCells]=cellsNew; + } + if (cfOld[textFormat]) { + var formatOld=cfOld[textFormat]; + var formatNew=[]; + for (var entry2 in formatOld) { + if (typeof (formatProperties[entry2]) !=='undefined') { + formatNew.push([ + formatProperties[entry2].type, + formatOld[entry2] + ]); + } + } + cfNew[posFormat]=formatNew; + } + ret[index]=cfNew; + } + return ret; + }, + fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_CellFormat$fromHost(hostArgs) { + return hostArgs; + } + }); + ns.setDynamicType(Microsoft.Office.WebExtension.Parameters.TableOptions, { + toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_TableOptions$toHost(tableOptions) { + var ret=[]; + for (var entry in tableOptions) { + if (typeof (tableOptionProperties[entry]) !=='undefined') { + ret[tableOptionProperties[entry]]=tableOptions[entry]; + } + } + return ret; + }, + fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_TableOptions$fromHost(hostArgs) { + return hostArgs; + } + }); +})(); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType, { Image: "image" }); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.CoercionType, + toHost: [ + { name: Microsoft.Office.WebExtension.CoercionType.Image, value: 8 } + ] +}); +OSF.DDA.ExcelDocument=function OSF_DDA_ExcelDocument(officeAppContext, settings) { + var bf=new OSF.DDA.BindingFacade(this); + OSF.DDA.DispIdHost.addAsyncMethods(bf, [OSF.DDA.AsyncMethodNames.AddFromPromptAsync]); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.GoToByIdAsync]); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync]); + OSF.DDA.ExcelDocument.uber.constructor.call(this, officeAppContext, bf, settings); + OSF.OUtil.finalizeProperties(this); +}; +OSF.OUtil.extend(OSF.DDA.ExcelDocument, OSF.DDA.JsomDocument); +OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function OSF_InitializationHelper$loadAppSpecificScriptAndCreateOM(appContext, appReady, basePath) { + OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM); + appContext.doc=new OSF.DDA.ExcelDocument(appContext, this._initializeSettings(appContext, false)); + OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi, [OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]); + appReady(); +}; +(function () { + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetSelectedDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { + return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); + } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.CellFormat, + value: { + "types": ["number", "object"], + "defaultValue": [] + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.TableOptions, + value: { + "types": ["number", "object"], + "defaultValue": [] + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageWidth, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageHeight, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + } + ], + privateStateCallbacks: [] + }); +})(); +var __extends=(this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p]=b[p]; + function __() { this.constructor=d; } + d.prototype=b===null ? Object.create(b) : (__.prototype=b.prototype, new __()); +}; +var OfficeExt; +(function (OfficeExt) { + var MicrosoftAjaxFactory=(function () { + function MicrosoftAjaxFactory() { + } + MicrosoftAjaxFactory.prototype.isMsAjaxLoaded=function () { + if (typeof (Sys) !=='undefined' && typeof (Type) !=='undefined' && + Sys.StringBuilder && typeof (Sys.StringBuilder)==="function" && + Type.registerNamespace && typeof (Type.registerNamespace)==="function" && + Type.registerClass && typeof (Type.registerClass)==="function" && + typeof (Function._validateParams)==="function" && + Sys.Serialization && Sys.Serialization.JavaScriptSerializer && typeof (Sys.Serialization.JavaScriptSerializer.serialize)==="function") { + return true; + } + else { + return false; + } + }; + MicrosoftAjaxFactory.prototype.loadMsAjaxFull=function (callback) { + var msAjaxCDNPath=(window.location.protocol.toLowerCase()==='https:' ? 'https:' : 'http:')+'//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js'; + OSF.OUtil.loadScript(msAjaxCDNPath, callback); + }; + Object.defineProperty(MicrosoftAjaxFactory.prototype, "msAjaxError", { + get: function () { + if (this._msAjaxError==null && this.isMsAjaxLoaded()) { + this._msAjaxError=Error; + } + return this._msAjaxError; + }, + set: function (errorClass) { + this._msAjaxError=errorClass; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MicrosoftAjaxFactory.prototype, "msAjaxString", { + get: function () { + if (this._msAjaxString==null && this.isMsAjaxLoaded()) { + this._msAjaxString=String; + } + return this._msAjaxString; + }, + set: function (stringClass) { + this._msAjaxString=stringClass; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MicrosoftAjaxFactory.prototype, "msAjaxDebug", { + get: function () { + if (this._msAjaxDebug==null && this.isMsAjaxLoaded()) { + this._msAjaxDebug=Sys.Debug; + } + return this._msAjaxDebug; + }, + set: function (debugClass) { + this._msAjaxDebug=debugClass; + }, + enumerable: true, + configurable: true + }); + return MicrosoftAjaxFactory; + })(); + OfficeExt.MicrosoftAjaxFactory=MicrosoftAjaxFactory; +})(OfficeExt || (OfficeExt={})); +var OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory(); +var OSF=OSF || {}; +var OfficeExt; +(function (OfficeExt) { + var SafeStorage=(function () { + function SafeStorage(_internalStorage) { + this._internalStorage=_internalStorage; + } + SafeStorage.prototype.getItem=function (key) { + try { + return this._internalStorage && this._internalStorage.getItem(key); + } + catch (e) { + return null; + } + }; + SafeStorage.prototype.setItem=function (key, data) { + try { + this._internalStorage && this._internalStorage.setItem(key, data); + } + catch (e) { + } + }; + SafeStorage.prototype.clear=function () { + try { + this._internalStorage && this._internalStorage.clear(); + } + catch (e) { + } + }; + SafeStorage.prototype.removeItem=function (key) { + try { + this._internalStorage && this._internalStorage.removeItem(key); + } + catch (e) { + } + }; + SafeStorage.prototype.getKeysWithPrefix=function (keyPrefix) { + var keyList=[]; + try { + var len=this._internalStorage && this._internalStorage.length || 0; + for (var i=0; i < len; i++) { + var key=this._internalStorage.key(i); + if (key.indexOf(keyPrefix)===0) { + keyList.push(key); + } + } + } + catch (e) { + } + return keyList; + }; + return SafeStorage; + })(); + OfficeExt.SafeStorage=SafeStorage; +})(OfficeExt || (OfficeExt={})); +OSF.XdmFieldName={ + ConversationUrl: "ConversationUrl", + AppId: "AppId" +}; +OSF.WindowNameItemKeys={ + BaseFrameName: "baseFrameName", + HostInfo: "hostInfo", + XdmInfo: "xdmInfo", + SerializerVersion: "serializerVersion", + AppContext: "appContext" +}; +OSF.OUtil=(function () { + var _uniqueId=-1; + var _xdmInfoKey='&_xdm_Info='; + var _serializerVersionKey='&_serializer_version='; + var _xdmSessionKeyPrefix='_xdm_'; + var _serializerVersionKeyPrefix='_serializer_version='; + var _fragmentSeparator='#'; + var _fragmentInfoDelimiter='&'; + var _classN="class"; + var _loadedScripts={}; + var _defaultScriptLoadingTimeout=30000; + var _safeSessionStorage=null; + var _safeLocalStorage=null; + var _rndentropy=new Date().getTime(); + function _random() { + var nextrand=0x7fffffff * (Math.random()); + nextrand ^=_rndentropy ^ ((new Date().getMilliseconds()) << Math.floor(Math.random() * (31 - 10))); + return nextrand.toString(16); + } + ; + function _getSessionStorage() { + if (!_safeSessionStorage) { + try { + var sessionStorage=window.sessionStorage; + } + catch (ex) { + sessionStorage=null; + } + _safeSessionStorage=new OfficeExt.SafeStorage(sessionStorage); + } + return _safeSessionStorage; + } + ; + function _reOrderTabbableElements(elements) { + var bucket0=[]; + var bucketPositive=[]; + var i; + var len=elements.length; + var ele; + for (i=0; i < len; i++) { + ele=elements[i]; + if (ele.tabIndex) { + if (ele.tabIndex > 0) { + bucketPositive.push(ele); + } + else if (ele.tabIndex===0) { + bucket0.push(ele); + } + } + else { + bucket0.push(ele); + } + } + bucketPositive=bucketPositive.sort(function (left, right) { + var diff=left.tabIndex - right.tabIndex; + if (diff===0) { + diff=bucketPositive.indexOf(left) - bucketPositive.indexOf(right); + } + return diff; + }); + return [].concat(bucketPositive, bucket0); + } + ; + return { + set_entropy: function OSF_OUtil$set_entropy(entropy) { + if (typeof entropy=="string") { + for (var i=0; i < entropy.length; i+=4) { + var temp=0; + for (var j=0; j < 4 && i+j < entropy.length; j++) { + temp=(temp << 8)+entropy.charCodeAt(i+j); + } + _rndentropy ^=temp; + } + } + else if (typeof entropy=="number") { + _rndentropy ^=entropy; + } + else { + _rndentropy ^=0x7fffffff * Math.random(); + } + _rndentropy &=0x7fffffff; + }, + extend: function OSF_OUtil$extend(child, parent) { + var F=function () { }; + F.prototype=parent.prototype; + child.prototype=new F(); + child.prototype.constructor=child; + child.uber=parent.prototype; + if (parent.prototype.constructor===Object.prototype.constructor) { + parent.prototype.constructor=parent; + } + }, + setNamespace: function OSF_OUtil$setNamespace(name, parent) { + if (parent && name && !parent[name]) { + parent[name]={}; + } + }, + unsetNamespace: function OSF_OUtil$unsetNamespace(name, parent) { + if (parent && name && parent[name]) { + delete parent[name]; + } + }, + loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) { + if (url && callback) { + var doc=window.document; + var _loadedScriptEntry=_loadedScripts[url]; + if (!_loadedScriptEntry) { + var script=doc.createElement("script"); + script.type="text/javascript"; + _loadedScriptEntry={ loaded: false, pendingCallbacks: [callback], timer: null }; + _loadedScripts[url]=_loadedScriptEntry; + var onLoadCallback=function OSF_OUtil_loadScript$onLoadCallback() { + if (_loadedScriptEntry.timer !=null) { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer; + } + _loadedScriptEntry.loaded=true; + var pendingCallbackCount=_loadedScriptEntry.pendingCallbacks.length; + for (var i=0; i < pendingCallbackCount; i++) { + var currentCallback=_loadedScriptEntry.pendingCallbacks.shift(); + currentCallback(); + } + }; + var onLoadError=function OSF_OUtil_loadScript$onLoadError() { + delete _loadedScripts[url]; + if (_loadedScriptEntry.timer !=null) { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer; + } + var pendingCallbackCount=_loadedScriptEntry.pendingCallbacks.length; + for (var i=0; i < pendingCallbackCount; i++) { + var currentCallback=_loadedScriptEntry.pendingCallbacks.shift(); + currentCallback(); + } + }; + if (script.readyState) { + script.onreadystatechange=function () { + if (script.readyState=="loaded" || script.readyState=="complete") { + script.onreadystatechange=null; + onLoadCallback(); + } + }; + } + else { + script.onload=onLoadCallback; + } + script.onerror=onLoadError; + timeoutInMs=timeoutInMs || _defaultScriptLoadingTimeout; + _loadedScriptEntry.timer=setTimeout(onLoadError, timeoutInMs); + script.setAttribute("crossOrigin", "anonymous"); + script.src=url; + doc.getElementsByTagName("head")[0].appendChild(script); + } + else if (_loadedScriptEntry.loaded) { + callback(); + } + else { + _loadedScriptEntry.pendingCallbacks.push(callback); + } + } + }, + loadCSS: function OSF_OUtil$loadCSS(url) { + if (url) { + var doc=window.document; + var link=doc.createElement("link"); + link.type="text/css"; + link.rel="stylesheet"; + link.href=url; + doc.getElementsByTagName("head")[0].appendChild(link); + } + }, + parseEnum: function OSF_OUtil$parseEnum(str, enumObject) { + var parsed=enumObject[str.trim()]; + if (typeof (parsed)=='undefined') { + OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:"+str); + throw OsfMsAjaxFactory.msAjaxError.argument("str"); + } + return parsed; + }, + delayExecutionAndCache: function OSF_OUtil$delayExecutionAndCache() { + var obj={ calc: arguments[0] }; + return function () { + if (obj.calc) { + obj.val=obj.calc.apply(this, arguments); + delete obj.calc; + } + return obj.val; + }; + }, + getUniqueId: function OSF_OUtil$getUniqueId() { + _uniqueId=_uniqueId+1; + return _uniqueId.toString(); + }, + formatString: function OSF_OUtil$formatString() { + var args=arguments; + var source=args[0]; + return source.replace(/{(\d+)}/gm, function (match, number) { + var index=parseInt(number, 10)+1; + return args[index]===undefined ? '{'+number+'}' : args[index]; + }); + }, + generateConversationId: function OSF_OUtil$generateConversationId() { + return [_random(), _random(), (new Date()).getTime().toString()].join('_'); + }, + getFrameName: function OSF_OUtil$getFrameName(cacheKey) { + return _xdmSessionKeyPrefix+cacheKey+this.generateConversationId(); + }, + addXdmInfoAsHash: function OSF_OUtil$addXdmInfoAsHash(url, xdmInfoValue) { + return OSF.OUtil.addInfoAsHash(url, _xdmInfoKey, xdmInfoValue, false); + }, + addSerializerVersionAsHash: function OSF_OUtil$addSerializerVersionAsHash(url, serializerVersion) { + return OSF.OUtil.addInfoAsHash(url, _serializerVersionKey, serializerVersion, true); + }, + addInfoAsHash: function OSF_OUtil$addInfoAsHash(url, keyName, infoValue, encodeInfo) { + url=url.trim() || ''; + var urlParts=url.split(_fragmentSeparator); + var urlWithoutFragment=urlParts.shift(); + var fragment=urlParts.join(_fragmentSeparator); + var newFragment; + if (encodeInfo) { + newFragment=[keyName, encodeURIComponent(infoValue), fragment].join(''); + } + else { + newFragment=[fragment, keyName, infoValue].join(''); + } + return [urlWithoutFragment, _fragmentSeparator, newFragment].join(''); + }, + parseHostInfoFromWindowName: function OSF_OUtil$parseHostInfoFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.HostInfo); + }, + parseXdmInfo: function OSF_OUtil$parseXdmInfo(skipSessionStorage) { + var xdmInfoValue=OSF.OUtil.parseXdmInfoWithGivenFragment(skipSessionStorage, window.location.hash); + if (!xdmInfoValue) { + xdmInfoValue=OSF.OUtil.parseXdmInfoFromWindowName(skipSessionStorage, window.name); + } + return xdmInfoValue; + }, + parseXdmInfoFromWindowName: function OSF_OUtil$parseXdmInfoFromWindowName(skipSessionStorage, windowName) { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.XdmInfo); + }, + parseXdmInfoWithGivenFragment: function OSF_OUtil$parseXdmInfoWithGivenFragment(skipSessionStorage, fragment) { + return OSF.OUtil.parseInfoWithGivenFragment(_xdmInfoKey, _xdmSessionKeyPrefix, false, skipSessionStorage, fragment); + }, + parseSerializerVersion: function OSF_OUtil$parseSerializerVersion(skipSessionStorage) { + var serializerVersion=OSF.OUtil.parseSerializerVersionWithGivenFragment(skipSessionStorage, window.location.hash); + if (isNaN(serializerVersion)) { + serializerVersion=OSF.OUtil.parseSerializerVersionFromWindowName(skipSessionStorage, window.name); + } + return serializerVersion; + }, + parseSerializerVersionFromWindowName: function OSF_OUtil$parseSerializerVersionFromWindowName(skipSessionStorage, windowName) { + return parseInt(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage, windowName, OSF.WindowNameItemKeys.SerializerVersion)); + }, + parseSerializerVersionWithGivenFragment: function OSF_OUtil$parseSerializerVersionWithGivenFragment(skipSessionStorage, fragment) { + return parseInt(OSF.OUtil.parseInfoWithGivenFragment(_serializerVersionKey, _serializerVersionKeyPrefix, true, skipSessionStorage, fragment)); + }, + parseInfoFromWindowName: function OSF_OUtil$parseInfoFromWindowName(skipSessionStorage, windowName, infoKey) { + try { + var windowNameObj=JSON.parse(windowName); + var infoValue=windowNameObj !=null ? windowNameObj[infoKey] : null; + var osfSessionStorage=_getSessionStorage(); + if (!skipSessionStorage && osfSessionStorage && windowNameObj !=null) { + var sessionKey=windowNameObj[OSF.WindowNameItemKeys.BaseFrameName]+infoKey; + if (infoValue) { + osfSessionStorage.setItem(sessionKey, infoValue); + } + else { + infoValue=osfSessionStorage.getItem(sessionKey); + } + } + return infoValue; + } + catch (Exception) { + return null; + } + }, + parseInfoWithGivenFragment: function OSF_OUtil$parseInfoWithGivenFragment(infoKey, infoKeyPrefix, decodeInfo, skipSessionStorage, fragment) { + var fragmentParts=fragment.split(infoKey); + var infoValue=fragmentParts.length > 1 ? fragmentParts[fragmentParts.length - 1] : null; + if (decodeInfo && infoValue !=null) { + if (infoValue.indexOf(_fragmentInfoDelimiter) >=0) { + infoValue=infoValue.split(_fragmentInfoDelimiter)[0]; + } + infoValue=decodeURIComponent(infoValue); + } + var osfSessionStorage=_getSessionStorage(); + if (!skipSessionStorage && osfSessionStorage) { + var sessionKeyStart=window.name.indexOf(infoKeyPrefix); + if (sessionKeyStart > -1) { + var sessionKeyEnd=window.name.indexOf(";", sessionKeyStart); + if (sessionKeyEnd==-1) { + sessionKeyEnd=window.name.length; + } + var sessionKey=window.name.substring(sessionKeyStart, sessionKeyEnd); + if (infoValue) { + osfSessionStorage.setItem(sessionKey, infoValue); + } + else { + infoValue=osfSessionStorage.getItem(sessionKey); + } + } + } + return infoValue; + }, + getConversationId: function OSF_OUtil$getConversationId() { + var searchString=window.location.search; + var conversationId=null; + if (searchString) { + var index=searchString.indexOf("&"); + conversationId=index > 0 ? searchString.substring(1, index) : searchString.substr(1); + if (conversationId && conversationId.charAt(conversationId.length - 1)==='=') { + conversationId=conversationId.substring(0, conversationId.length - 1); + if (conversationId) { + conversationId=decodeURIComponent(conversationId); + } + } + } + return conversationId; + }, + getInfoItems: function OSF_OUtil$getInfoItems(strInfo) { + var items=strInfo.split("$"); + if (typeof items[1]=="undefined") { + items=strInfo.split("|"); + } + if (typeof items[1]=="undefined") { + items=strInfo.split("%7C"); + } + return items; + }, + getXdmFieldValue: function OSF_OUtil$getXdmFieldValue(xdmFieldName, skipSessionStorage) { + var fieldValue=''; + var xdmInfoValue=OSF.OUtil.parseXdmInfo(skipSessionStorage); + if (xdmInfoValue) { + var items=OSF.OUtil.getInfoItems(xdmInfoValue); + if (items !=undefined && items.length >=3) { + switch (xdmFieldName) { + case OSF.XdmFieldName.ConversationUrl: + fieldValue=items[2]; + break; + case OSF.XdmFieldName.AppId: + fieldValue=items[1]; + break; + } + } + } + return fieldValue; + }, + validateParamObject: function OSF_OUtil$validateParamObject(params, expectedProperties, callback) { + var e=Function._validateParams(arguments, [{ name: "params", type: Object, mayBeNull: false }, + { name: "expectedProperties", type: Object, mayBeNull: false }, + { name: "callback", type: Function, mayBeNull: true } + ]); + if (e) + throw e; + for (var p in expectedProperties) { + e=Function._validateParameter(params[p], expectedProperties[p], p); + if (e) + throw e; + } + }, + writeProfilerMark: function OSF_OUtil$writeProfilerMark(text) { + if (window.msWriteProfilerMark) { + window.msWriteProfilerMark(text); + OsfMsAjaxFactory.msAjaxDebug.trace(text); + } + }, + outputDebug: function OSF_OUtil$outputDebug(text) { + if (typeof (OsfMsAjaxFactory) !=='undefined' && OsfMsAjaxFactory.msAjaxDebug && OsfMsAjaxFactory.msAjaxDebug.trace) { + OsfMsAjaxFactory.msAjaxDebug.trace(text); + } + }, + defineNondefaultProperty: function OSF_OUtil$defineNondefaultProperty(obj, prop, descriptor, attributes) { + descriptor=descriptor || {}; + for (var nd in attributes) { + var attribute=attributes[nd]; + if (descriptor[attribute]==undefined) { + descriptor[attribute]=true; + } + } + Object.defineProperty(obj, prop, descriptor); + return obj; + }, + defineNondefaultProperties: function OSF_OUtil$defineNondefaultProperties(obj, descriptors, attributes) { + descriptors=descriptors || {}; + for (var prop in descriptors) { + OSF.OUtil.defineNondefaultProperty(obj, prop, descriptors[prop], attributes); + } + return obj; + }, + defineEnumerableProperty: function OSF_OUtil$defineEnumerableProperty(obj, prop, descriptor) { + return OSF.OUtil.defineNondefaultProperty(obj, prop, descriptor, ["enumerable"]); + }, + defineEnumerableProperties: function OSF_OUtil$defineEnumerableProperties(obj, descriptors) { + return OSF.OUtil.defineNondefaultProperties(obj, descriptors, ["enumerable"]); + }, + defineMutableProperty: function OSF_OUtil$defineMutableProperty(obj, prop, descriptor) { + return OSF.OUtil.defineNondefaultProperty(obj, prop, descriptor, ["writable", "enumerable", "configurable"]); + }, + defineMutableProperties: function OSF_OUtil$defineMutableProperties(obj, descriptors) { + return OSF.OUtil.defineNondefaultProperties(obj, descriptors, ["writable", "enumerable", "configurable"]); + }, + finalizeProperties: function OSF_OUtil$finalizeProperties(obj, descriptor) { + descriptor=descriptor || {}; + var props=Object.getOwnPropertyNames(obj); + var propsLength=props.length; + for (var i=0; i < propsLength; i++) { + var prop=props[i]; + var desc=Object.getOwnPropertyDescriptor(obj, prop); + if (!desc.get && !desc.set) { + desc.writable=descriptor.writable || false; + } + desc.configurable=descriptor.configurable || false; + desc.enumerable=descriptor.enumerable || true; + Object.defineProperty(obj, prop, desc); + } + return obj; + }, + mapList: function OSF_OUtil$MapList(list, mapFunction) { + var ret=[]; + if (list) { + for (var item in list) { + ret.push(mapFunction(list[item])); + } + } + return ret; + }, + listContainsKey: function OSF_OUtil$listContainsKey(list, key) { + for (var item in list) { + if (key==item) { + return true; + } + } + return false; + }, + listContainsValue: function OSF_OUtil$listContainsElement(list, value) { + for (var item in list) { + if (value==list[item]) { + return true; + } + } + return false; + }, + augmentList: function OSF_OUtil$augmentList(list, addenda) { + var add=list.push ? function (key, value) { list.push(value); } : function (key, value) { list[key]=value; }; + for (var key in addenda) { + add(key, addenda[key]); + } + }, + redefineList: function OSF_Outil$redefineList(oldList, newList) { + for (var key1 in oldList) { + delete oldList[key1]; + } + for (var key2 in newList) { + oldList[key2]=newList[key2]; + } + }, + isArray: function OSF_OUtil$isArray(obj) { + return Object.prototype.toString.apply(obj)==="[object Array]"; + }, + isFunction: function OSF_OUtil$isFunction(obj) { + return Object.prototype.toString.apply(obj)==="[object Function]"; + }, + isDate: function OSF_OUtil$isDate(obj) { + return Object.prototype.toString.apply(obj)==="[object Date]"; + }, + addEventListener: function OSF_OUtil$addEventListener(element, eventName, listener) { + if (element.addEventListener) { + element.addEventListener(eventName, listener, false); + } + else if ((Sys.Browser.agent===Sys.Browser.InternetExplorer) && element.attachEvent) { + element.attachEvent("on"+eventName, listener); + } + else { + element["on"+eventName]=listener; + } + }, + removeEventListener: function OSF_OUtil$removeEventListener(element, eventName, listener) { + if (element.removeEventListener) { + element.removeEventListener(eventName, listener, false); + } + else if ((Sys.Browser.agent===Sys.Browser.InternetExplorer) && element.detachEvent) { + element.detachEvent("on"+eventName, listener); + } + else { + element["on"+eventName]=null; + } + }, + getCookieValue: function OSF_OUtil$getCookieValue(cookieName) { + var tmpCookieString=RegExp(cookieName+"[^;]+").exec(document.cookie); + return tmpCookieString.toString().replace(/^[^=]+./, ""); + }, + xhrGet: function OSF_OUtil$xhrGet(url, onSuccess, onError) { + var xmlhttp; + try { + xmlhttp=new XMLHttpRequest(); + xmlhttp.onreadystatechange=function () { + if (xmlhttp.readyState==4) { + if (xmlhttp.status==200) { + onSuccess(xmlhttp.responseText); + } + else { + onError(xmlhttp.status); + } + } + }; + xmlhttp.open("GET", url, true); + xmlhttp.send(); + } + catch (ex) { + onError(ex); + } + }, + xhrGetFull: function OSF_OUtil$xhrGetFull(url, oneDriveFileName, onSuccess, onError) { + var xmlhttp; + var requestedFileName=oneDriveFileName; + try { + xmlhttp=new XMLHttpRequest(); + xmlhttp.onreadystatechange=function () { + if (xmlhttp.readyState==4) { + if (xmlhttp.status==200) { + onSuccess(xmlhttp, requestedFileName); + } + else { + onError(xmlhttp.status); + } + } + }; + xmlhttp.open("GET", url, true); + xmlhttp.send(); + } + catch (ex) { + onError(ex); + } + }, + encodeBase64: function OSF_Outil$encodeBase64(input) { + if (!input) + return input; + var codex="ABCDEFGHIJKLMNOP"+"QRSTUVWXYZabcdef"+"ghijklmnopqrstuv"+"wxyz0123456789+/="; + var output=[]; + var temp=[]; + var index=0; + var c1, c2, c3, a, b, c; + var i; + var length=input.length; + do { + c1=input.charCodeAt(index++); + c2=input.charCodeAt(index++); + c3=input.charCodeAt(index++); + i=0; + a=c1 & 255; + b=c1 >> 8; + c=c2 & 255; + temp[i++]=a >> 2; + temp[i++]=((a & 3) << 4) | (b >> 4); + temp[i++]=((b & 15) << 2) | (c >> 6); + temp[i++]=c & 63; + if (!isNaN(c2)) { + a=c2 >> 8; + b=c3 & 255; + c=c3 >> 8; + temp[i++]=a >> 2; + temp[i++]=((a & 3) << 4) | (b >> 4); + temp[i++]=((b & 15) << 2) | (c >> 6); + temp[i++]=c & 63; + } + if (isNaN(c2)) { + temp[i - 1]=64; + } + else if (isNaN(c3)) { + temp[i - 2]=64; + temp[i - 1]=64; + } + for (var t=0; t < i; t++) { + output.push(codex.charAt(temp[t])); + } + } while (index < length); + return output.join(""); + }, + getSessionStorage: function OSF_Outil$getSessionStorage() { + return _getSessionStorage(); + }, + getLocalStorage: function OSF_Outil$getLocalStorage() { + if (!_safeLocalStorage) { + try { + var localStorage=window.localStorage; + } + catch (ex) { + localStorage=null; + } + _safeLocalStorage=new OfficeExt.SafeStorage(localStorage); + } + return _safeLocalStorage; + }, + convertIntToCssHexColor: function OSF_Outil$convertIntToCssHexColor(val) { + var hex="#"+(Number(val)+0x1000000).toString(16).slice(-6); + return hex; + }, + attachClickHandler: function OSF_Outil$attachClickHandler(element, handler) { + element.onclick=function (e) { + handler(); + }; + element.ontouchend=function (e) { + handler(); + e.preventDefault(); + }; + }, + getQueryStringParamValue: function OSF_Outil$getQueryStringParamValue(queryString, paramName) { + var e=Function._validateParams(arguments, [{ name: "queryString", type: String, mayBeNull: false }, + { name: "paramName", type: String, mayBeNull: false } + ]); + if (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null."); + return ""; + } + var queryExp=new RegExp("[\\?&]"+paramName+"=([^&#]*)", "i"); + if (!queryExp.test(queryString)) { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found."); + return ""; + } + return queryExp.exec(queryString)[1]; + }, + isiOS: function OSF_Outil$isiOS() { + return (window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false); + }, + isChrome: function OSF_Outil$isChrome() { + return (window.navigator.userAgent.indexOf("Chrome") > 0) && !OSF.OUtil.isEdge(); + }, + isEdge: function OSF_Outil$isEdge() { + return window.navigator.userAgent.indexOf("Edge") > 0; + }, + isIE: function OSF_Outil$isIE() { + return window.navigator.userAgent.indexOf("Trident") > 0; + }, + isFirefox: function OSF_Outil$isFirefox() { + return window.navigator.userAgent.indexOf("Firefox") > 0; + }, + shallowCopy: function OSF_Outil$shallowCopy(sourceObj) { + if (sourceObj==null) { + return null; + } + else if (!(sourceObj instanceof Object)) { + return sourceObj; + } + else if (Array.isArray(sourceObj)) { + var copyArr=[]; + for (var i=0; i < sourceObj.length; i++) { + copyArr.push(sourceObj[i]); + } + return copyArr; + } + else { + var copyObj=sourceObj.constructor(); + for (var property in sourceObj) { + if (sourceObj.hasOwnProperty(property)) { + copyObj[property]=sourceObj[property]; + } + } + return copyObj; + } + }, + createObject: function OSF_Outil$createObject(properties) { + var obj=null; + if (properties) { + obj={}; + var len=properties.length; + for (var i=0; i < len; i++) { + obj[properties[i].name]=properties[i].value; + } + } + return obj; + }, + addClass: function OSF_OUtil$addClass(elmt, val) { + if (!OSF.OUtil.hasClass(elmt, val)) { + var className=elmt.getAttribute(_classN); + if (className) { + elmt.setAttribute(_classN, className+" "+val); + } + else { + elmt.setAttribute(_classN, val); + } + } + }, + removeClass: function OSF_OUtil$removeClass(elmt, val) { + if (OSF.OUtil.hasClass(elmt, val)) { + var className=elmt.getAttribute(_classN); + var reg=new RegExp('(\\s|^)'+val+'(\\s|$)'); + className=className.replace(reg, ''); + elmt.setAttribute(_classN, className); + } + }, + hasClass: function OSF_OUtil$hasClass(elmt, clsName) { + var className=elmt.getAttribute(_classN); + return className && className.match(new RegExp('(\\s|^)'+clsName+'(\\s|$)')); + }, + focusToFirstTabbable: function OSF_OUtil$focusToFirstTabbable(all, backward) { + var next; + var focused=false; + var candidate; + var setFlag=function (e) { + focused=true; + }; + var findNextPos=function (allLen, currPos, backward) { + if (currPos < 0 || currPos > allLen) { + return -1; + } + else if (currPos===0 && backward) { + return -1; + } + else if (currPos===allLen - 1 && !backward) { + return -1; + } + if (backward) { + return currPos - 1; + } + else { + return currPos+1; + } + }; + all=_reOrderTabbableElements(all); + next=backward ? all.length - 1 : 0; + if (all.length===0) { + return null; + } + while (!focused && next >=0 && next < all.length) { + candidate=all[next]; + window.focus(); + candidate.addEventListener('focus', setFlag); + candidate.focus(); + candidate.removeEventListener('focus', setFlag); + next=findNextPos(all.length, next, backward); + if (!focused && candidate===document.activeElement) { + focused=true; + } + } + if (focused) { + return candidate; + } + else { + return null; + } + }, + focusToNextTabbable: function OSF_OUtil$focusToNextTabbable(all, curr, shift) { + var currPos; + var next; + var focused=false; + var candidate; + var setFlag=function (e) { + focused=true; + }; + var findCurrPos=function (all, curr) { + var i=0; + for (; i < all.length; i++) { + if (all[i]===curr) { + return i; + } + } + return -1; + }; + var findNextPos=function (allLen, currPos, shift) { + if (currPos < 0 || currPos > allLen) { + return -1; + } + else if (currPos===0 && shift) { + return -1; + } + else if (currPos===allLen - 1 && !shift) { + return -1; + } + if (shift) { + return currPos - 1; + } + else { + return currPos+1; + } + }; + all=_reOrderTabbableElements(all); + currPos=findCurrPos(all, curr); + next=findNextPos(all.length, currPos, shift); + if (next < 0) { + return null; + } + while (!focused && next >=0 && next < all.length) { + candidate=all[next]; + candidate.addEventListener('focus', setFlag); + candidate.focus(); + candidate.removeEventListener('focus', setFlag); + next=findNextPos(all.length, next, shift); + if (!focused && candidate===document.activeElement) { + focused=true; + } + } + if (focused) { + return candidate; + } + else { + return null; + } + } + }; +})(); +OSF.OUtil.Guid=(function () { + var hexCode=["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]; + return { + generateNewGuid: function OSF_Outil_Guid$generateNewGuid() { + var result=""; + var tick=(new Date()).getTime(); + var index=0; + for (; index < 32 && tick > 0; index++) { + if (index==8 || index==12 || index==16 || index==20) { + result+="-"; + } + result+=hexCode[tick % 16]; + tick=Math.floor(tick / 16); + } + for (; index < 32; index++) { + if (index==8 || index==12 || index==16 || index==20) { + result+="-"; + } + result+=hexCode[Math.floor(Math.random() * 16)]; + } + return result; + } + }; +})(); +window.OSF=OSF; +OSF.OUtil.setNamespace("OSF", window); +OSF.AppName={ + Unsupported: 0, + Excel: 1, + Word: 2, + PowerPoint: 4, + Outlook: 8, + ExcelWebApp: 16, + WordWebApp: 32, + OutlookWebApp: 64, + Project: 128, + AccessWebApp: 256, + PowerpointWebApp: 512, + ExcelIOS: 1024, + Sway: 2048, + WordIOS: 4096, + PowerPointIOS: 8192, + Access: 16384, + Lync: 32768, + OutlookIOS: 65536, + OneNoteWebApp: 131072, + OneNote: 262144, + ExcelWinRT: 524288, + WordWinRT: 1048576, + PowerpointWinRT: 2097152, + OutlookAndroid: 4194304, + OneNoteWinRT: 8388608, + ExcelAndroid: 8388609, + VisioWebApp: 8388610, + OneNoteIOS: 8388611 +}; +OSF.InternalPerfMarker={ + DataCoercionBegin: "Agave.HostCall.CoerceDataStart", + DataCoercionEnd: "Agave.HostCall.CoerceDataEnd" +}; +OSF.HostCallPerfMarker={ + IssueCall: "Agave.HostCall.IssueCall", + ReceiveResponse: "Agave.HostCall.ReceiveResponse", + RuntimeExceptionRaised: "Agave.HostCall.RuntimeExecptionRaised" +}; +OSF.AgaveHostAction={ + "Select": 0, + "UnSelect": 1, + "CancelDialog": 2, + "InsertAgave": 3, + "CtrlF6In": 4, + "CtrlF6Exit": 5, + "CtrlF6ExitShift": 6, + "SelectWithError": 7, + "NotifyHostError": 8, + "RefreshAddinCommands": 9, + "PageIsReady": 10, + "TabIn": 11, + "TabInShift": 12, + "TabExit": 13, + "TabExitShift": 14, + "EscExit": 15, + "F2Exit": 16, + "ExitNoFocusable": 17, + "ExitNoFocusableShift": 18, + "MouseEnter": 19, + "MouseLeave": 20 +}; +OSF.SharedConstants={ + "NotificationConversationIdSuffix": '_ntf' +}; +OSF.DialogMessageType={ + DialogMessageReceived: 0, + DialogParentMessageReceived: 1, + DialogClosed: 12006 +}; +OSF.OfficeAppContext=function OSF_OfficeAppContext(id, appName, appVersion, appUILocale, dataLocale, docUrl, clientMode, settings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, appMinorVersion, requirementMatrix, hostCustomMessage, hostFullVersion, clientWindowHeight, clientWindowWidth, addinName, appDomains, dialogRequirementMatrix) { + this._id=id; + this._appName=appName; + this._appVersion=appVersion; + this._appUILocale=appUILocale; + this._dataLocale=dataLocale; + this._docUrl=docUrl; + this._clientMode=clientMode; + this._settings=settings; + this._reason=reason; + this._osfControlType=osfControlType; + this._eToken=eToken; + this._correlationId=correlationId; + this._appInstanceId=appInstanceId; + this._touchEnabled=touchEnabled; + this._commerceAllowed=commerceAllowed; + this._appMinorVersion=appMinorVersion; + this._requirementMatrix=requirementMatrix; + this._hostCustomMessage=hostCustomMessage; + this._hostFullVersion=hostFullVersion; + this._isDialog=false; + this._clientWindowHeight=clientWindowHeight; + this._clientWindowWidth=clientWindowWidth; + this._addinName=addinName; + this._appDomains=appDomains; + this._dialogRequirementMatrix=dialogRequirementMatrix; + this.get_id=function get_id() { return this._id; }; + this.get_appName=function get_appName() { return this._appName; }; + this.get_appVersion=function get_appVersion() { return this._appVersion; }; + this.get_appUILocale=function get_appUILocale() { return this._appUILocale; }; + this.get_dataLocale=function get_dataLocale() { return this._dataLocale; }; + this.get_docUrl=function get_docUrl() { return this._docUrl; }; + this.get_clientMode=function get_clientMode() { return this._clientMode; }; + this.get_bindings=function get_bindings() { return this._bindings; }; + this.get_settings=function get_settings() { return this._settings; }; + this.get_reason=function get_reason() { return this._reason; }; + this.get_osfControlType=function get_osfControlType() { return this._osfControlType; }; + this.get_eToken=function get_eToken() { return this._eToken; }; + this.get_correlationId=function get_correlationId() { return this._correlationId; }; + this.get_appInstanceId=function get_appInstanceId() { return this._appInstanceId; }; + this.get_touchEnabled=function get_touchEnabled() { return this._touchEnabled; }; + this.get_commerceAllowed=function get_commerceAllowed() { return this._commerceAllowed; }; + this.get_appMinorVersion=function get_appMinorVersion() { return this._appMinorVersion; }; + this.get_requirementMatrix=function get_requirementMatrix() { return this._requirementMatrix; }; + this.get_dialogRequirementMatrix=function get_dialogRequirementMatrix() { return this._dialogRequirementMatrix; }; + this.get_hostCustomMessage=function get_hostCustomMessage() { return this._hostCustomMessage; }; + this.get_hostFullVersion=function get_hostFullVersion() { return this._hostFullVersion; }; + this.get_isDialog=function get_isDialog() { return this._isDialog; }; + this.get_clientWindowHeight=function get_clientWindowHeight() { return this._clientWindowHeight; }; + this.get_clientWindowWidth=function get_clientWindowWidth() { return this._clientWindowWidth; }; + this.get_addinName=function get_addinName() { return this._addinName; }; + this.get_appDomains=function get_appDomains() { return this._appDomains; }; +}; +OSF.OsfControlType={ + DocumentLevel: 0, + ContainerLevel: 1 +}; +OSF.ClientMode={ + ReadOnly: 0, + ReadWrite: 1 +}; +OSF.OUtil.setNamespace("Microsoft", window); +OSF.OUtil.setNamespace("Office", Microsoft); +OSF.OUtil.setNamespace("Client", Microsoft.Office); +OSF.OUtil.setNamespace("WebExtension", Microsoft.Office); +Microsoft.Office.WebExtension.InitializationReason={ + Inserted: "inserted", + DocumentOpened: "documentOpened" +}; +Microsoft.Office.WebExtension.ValueFormat={ + Unformatted: "unformatted", + Formatted: "formatted" +}; +Microsoft.Office.WebExtension.FilterType={ + All: "all" +}; +Microsoft.Office.WebExtension.PlatformType={ + PC: "PC", + OfficeOnline: "OfficeOnline", + Mac: "Mac", + iOS: "iOS", + Android: "Android", + Universal: "Universal" +}; +Microsoft.Office.WebExtension.HostType={ + Word: "Word", + Excel: "Excel", + PowerPoint: "PowerPoint", + Outlook: "Outlook", + OneNote: "OneNote", + Project: "Project", + Access: "Access" +}; +Microsoft.Office.WebExtension.Parameters={ + BindingType: "bindingType", + CoercionType: "coercionType", + ValueFormat: "valueFormat", + FilterType: "filterType", + Columns: "columns", + SampleData: "sampleData", + GoToType: "goToType", + SelectionMode: "selectionMode", + Id: "id", + PromptText: "promptText", + ItemName: "itemName", + FailOnCollision: "failOnCollision", + StartRow: "startRow", + StartColumn: "startColumn", + RowCount: "rowCount", + ColumnCount: "columnCount", + Callback: "callback", + AsyncContext: "asyncContext", + Data: "data", + Rows: "rows", + OverwriteIfStale: "overwriteIfStale", + FileType: "fileType", + EventType: "eventType", + Handler: "handler", + SliceSize: "sliceSize", + SliceIndex: "sliceIndex", + ActiveView: "activeView", + Status: "status", + PlatformType: "platformType", + HostType: "hostType", + ForceConsent: "forceConsent", + ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + Xml: "xml", + Namespace: "namespace", + Prefix: "prefix", + XPath: "xPath", + Text: "text", + ImageLeft: "imageLeft", + ImageTop: "imageTop", + ImageWidth: "imageWidth", + ImageHeight: "imageHeight", + TaskId: "taskId", + FieldId: "fieldId", + FieldValue: "fieldValue", + ServerUrl: "serverUrl", + ListName: "listName", + ResourceId: "resourceId", + ViewType: "viewType", + ViewName: "viewName", + GetRawValue: "getRawValue", + CellFormat: "cellFormat", + TableOptions: "tableOptions", + TaskIndex: "taskIndex", + ResourceIndex: "resourceIndex", + CustomFieldId: "customFieldId", + Url: "url", + MessageHandler: "messageHandler", + Width: "width", + Height: "height", + RequireHTTPs: "requireHTTPS", + MessageToParent: "messageToParent", + DisplayInIframe: "displayInIframe", + MessageContent: "messageContent", + HideTitle: "hideTitle", + AppCommandInvocationCompletedData: "appCommandInvocationCompletedData" +}; +OSF.OUtil.setNamespace("DDA", OSF); +OSF.DDA.DocumentMode={ + ReadOnly: 1, + ReadWrite: 0 +}; +OSF.DDA.PropertyDescriptors={ + AsyncResultStatus: "AsyncResultStatus" +}; +OSF.DDA.EventDescriptors={}; +OSF.DDA.ListDescriptors={}; +OSF.DDA.UI={}; +OSF.DDA.getXdmEventName=function OSF_DDA$GetXdmEventName(id, eventType) { + if (eventType==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged || + eventType==Microsoft.Office.WebExtension.EventType.BindingDataChanged || + eventType==Microsoft.Office.WebExtension.EventType.DataNodeDeleted || + eventType==Microsoft.Office.WebExtension.EventType.DataNodeInserted || + eventType==Microsoft.Office.WebExtension.EventType.DataNodeReplaced) { + return id+"_"+eventType; + } + else { + return eventType; + } +}; +OSF.DDA.MethodDispId={ + dispidMethodMin: 64, + dispidGetSelectedDataMethod: 64, + dispidSetSelectedDataMethod: 65, + dispidAddBindingFromSelectionMethod: 66, + dispidAddBindingFromPromptMethod: 67, + dispidGetBindingMethod: 68, + dispidReleaseBindingMethod: 69, + dispidGetBindingDataMethod: 70, + dispidSetBindingDataMethod: 71, + dispidAddRowsMethod: 72, + dispidClearAllRowsMethod: 73, + dispidGetAllBindingsMethod: 74, + dispidLoadSettingsMethod: 75, + dispidSaveSettingsMethod: 76, + dispidGetDocumentCopyMethod: 77, + dispidAddBindingFromNamedItemMethod: 78, + dispidAddColumnsMethod: 79, + dispidGetDocumentCopyChunkMethod: 80, + dispidReleaseDocumentCopyMethod: 81, + dispidNavigateToMethod: 82, + dispidGetActiveViewMethod: 83, + dispidGetDocumentThemeMethod: 84, + dispidGetOfficeThemeMethod: 85, + dispidGetFilePropertiesMethod: 86, + dispidClearFormatsMethod: 87, + dispidSetTableOptionsMethod: 88, + dispidSetFormatsMethod: 89, + dispidExecuteRichApiRequestMethod: 93, + dispidAppCommandInvocationCompletedMethod: 94, + dispidCloseContainerMethod: 97, + dispidGetAccessTokenMethod: 98, + dispidGetSelectedTaskMethod: 110, + dispidGetSelectedResourceMethod: 111, + dispidGetTaskMethod: 112, + dispidGetResourceFieldMethod: 113, + dispidGetWSSUrlMethod: 114, + dispidGetTaskFieldMethod: 115, + dispidGetProjectFieldMethod: 116, + dispidGetSelectedViewMethod: 117, + dispidGetTaskByIndexMethod: 118, + dispidGetResourceByIndexMethod: 119, + dispidSetTaskFieldMethod: 120, + dispidSetResourceFieldMethod: 121, + dispidGetMaxTaskIndexMethod: 122, + dispidGetMaxResourceIndexMethod: 123, + dispidCreateTaskMethod: 124, + dispidAddDataPartMethod: 128, + dispidGetDataPartByIdMethod: 129, + dispidGetDataPartsByNamespaceMethod: 130, + dispidGetDataPartXmlMethod: 131, + dispidGetDataPartNodesMethod: 132, + dispidDeleteDataPartMethod: 133, + dispidGetDataNodeValueMethod: 134, + dispidGetDataNodeXmlMethod: 135, + dispidGetDataNodesMethod: 136, + dispidSetDataNodeValueMethod: 137, + dispidSetDataNodeXmlMethod: 138, + dispidAddDataNamespaceMethod: 139, + dispidGetDataUriByPrefixMethod: 140, + dispidGetDataPrefixByUriMethod: 141, + dispidGetDataNodeTextMethod: 142, + dispidSetDataNodeTextMethod: 143, + dispidMessageParentMethod: 144, + dispidSendMessageMethod: 145, + dispidMethodMax: 145 +}; +OSF.DDA.EventDispId={ + dispidEventMin: 0, + dispidInitializeEvent: 0, + dispidSettingsChangedEvent: 1, + dispidDocumentSelectionChangedEvent: 2, + dispidBindingSelectionChangedEvent: 3, + dispidBindingDataChangedEvent: 4, + dispidDocumentOpenEvent: 5, + dispidDocumentCloseEvent: 6, + dispidActiveViewChangedEvent: 7, + dispidDocumentThemeChangedEvent: 8, + dispidOfficeThemeChangedEvent: 9, + dispidDialogMessageReceivedEvent: 10, + dispidDialogNotificationShownInAddinEvent: 11, + dispidDialogParentMessageReceivedEvent: 12, + dispidObjectDeletedEvent: 13, + dispidObjectSelectionChangedEvent: 14, + dispidObjectDataChangedEvent: 15, + dispidContentControlAddedEvent: 16, + dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, + dispidAppCommandInvokedEvent: 39, + dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, + dispidTaskSelectionChangedEvent: 56, + dispidResourceSelectionChangedEvent: 57, + dispidViewSelectionChangedEvent: 58, + dispidDataNodeAddedEvent: 60, + dispidDataNodeReplacedEvent: 61, + dispidDataNodeDeletedEvent: 62, + dispidEventMax: 63 +}; +OSF.DDA.ErrorCodeManager=(function () { + var _errorMappings={}; + return { + getErrorArgs: function OSF_DDA_ErrorCodeManager$getErrorArgs(errorCode) { + var errorArgs=_errorMappings[errorCode]; + if (!errorArgs) { + errorArgs=_errorMappings[this.errorCodes.ooeInternalError]; + } + else { + if (!errorArgs.name) { + errorArgs.name=_errorMappings[this.errorCodes.ooeInternalError].name; + } + if (!errorArgs.message) { + errorArgs.message=_errorMappings[this.errorCodes.ooeInternalError].message; + } + } + return errorArgs; + }, + addErrorMessage: function OSF_DDA_ErrorCodeManager$addErrorMessage(errorCode, errorNameMessage) { + _errorMappings[errorCode]=errorNameMessage; + }, + errorCodes: { + ooeSuccess: 0, + ooeChunkResult: 1, + ooeCoercionTypeNotSupported: 1000, + ooeGetSelectionNotMatchDataType: 1001, + ooeCoercionTypeNotMatchBinding: 1002, + ooeInvalidGetRowColumnCounts: 1003, + ooeSelectionNotSupportCoercionType: 1004, + ooeInvalidGetStartRowColumn: 1005, + ooeNonUniformPartialGetNotSupported: 1006, + ooeGetDataIsTooLarge: 1008, + ooeFileTypeNotSupported: 1009, + ooeGetDataParametersConflict: 1010, + ooeInvalidGetColumns: 1011, + ooeInvalidGetRows: 1012, + ooeInvalidReadForBlankRow: 1013, + ooeUnsupportedDataObject: 2000, + ooeCannotWriteToSelection: 2001, + ooeDataNotMatchSelection: 2002, + ooeOverwriteWorksheetData: 2003, + ooeDataNotMatchBindingSize: 2004, + ooeInvalidSetStartRowColumn: 2005, + ooeInvalidDataFormat: 2006, + ooeDataNotMatchCoercionType: 2007, + ooeDataNotMatchBindingType: 2008, + ooeSetDataIsTooLarge: 2009, + ooeNonUniformPartialSetNotSupported: 2010, + ooeInvalidSetColumns: 2011, + ooeInvalidSetRows: 2012, + ooeSetDataParametersConflict: 2013, + ooeCellDataAmountBeyondLimits: 2014, + ooeSelectionCannotBound: 3000, + ooeBindingNotExist: 3002, + ooeBindingToMultipleSelection: 3003, + ooeInvalidSelectionForBindingType: 3004, + ooeOperationNotSupportedOnThisBindingType: 3005, + ooeNamedItemNotFound: 3006, + ooeMultipleNamedItemFound: 3007, + ooeInvalidNamedItemForBindingType: 3008, + ooeUnknownBindingType: 3009, + ooeOperationNotSupportedOnMatrixData: 3010, + ooeInvalidColumnsForBinding: 3011, + ooeSettingNameNotExist: 4000, + ooeSettingsCannotSave: 4001, + ooeSettingsAreStale: 4002, + ooeOperationNotSupported: 5000, + ooeInternalError: 5001, + ooeDocumentReadOnly: 5002, + ooeEventHandlerNotExist: 5003, + ooeInvalidApiCallInContext: 5004, + ooeShuttingDown: 5005, + ooeUnsupportedEnumeration: 5007, + ooeIndexOutOfRange: 5008, + ooeBrowserAPINotSupported: 5009, + ooeInvalidParam: 5010, + ooeRequestTimeout: 5011, + ooeInvalidOrTimedOutSession: 5012, + ooeInvalidApiArguments: 5013, + ooeTooManyIncompleteRequests: 5100, + ooeRequestTokenUnavailable: 5101, + ooeActivityLimitReached: 5102, + ooeCustomXmlNodeNotFound: 6000, + ooeCustomXmlError: 6100, + ooeCustomXmlExceedQuota: 6101, + ooeCustomXmlOutOfDate: 6102, + ooeNoCapability: 7000, + ooeCannotNavTo: 7001, + ooeSpecifiedIdNotExist: 7002, + ooeNavOutOfBound: 7004, + ooeElementMissing: 8000, + ooeProtectedError: 8001, + ooeInvalidCellsValue: 8010, + ooeInvalidTableOptionValue: 8011, + ooeInvalidFormatValue: 8012, + ooeRowIndexOutOfRange: 8020, + ooeColIndexOutOfRange: 8021, + ooeFormatValueOutOfRange: 8022, + ooeCellFormatAmountBeyondLimits: 8023, + ooeMemoryFileLimit: 11000, + ooeNetworkProblemRetrieveFile: 11001, + ooeInvalidSliceSize: 11002, + ooeInvalidCallback: 11101, + ooeInvalidWidth: 12000, + ooeInvalidHeight: 12001, + ooeNavigationError: 12002, + ooeInvalidScheme: 12003, + ooeAppDomains: 12004, + ooeRequireHTTPS: 12005, + ooeWebDialogClosed: 12006, + ooeDialogAlreadyOpened: 12007, + ooeEndUserAllow: 12008, + ooeEndUserIgnore: 12009, + ooeNotUILessDialog: 12010, + ooeCrossZone: 12011, + ooeNotSSOAgave: 13000, + ooeSSOUserNotSignedIn: 13001, + ooeSSOUserAborted: 13002, + ooeSSOUnsupportedUserIdentity: 13003, + ooeSSOInvalidResourceUrl: 13004, + ooeSSOInvalidGrant: 13005, + ooeSSOClientError: 13006, + ooeSSOServerError: 13007, + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009 + }, + initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) { + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={ name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={ name: stringNS.L_DataReadError, message: stringNS.L_GetSelectionNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={ name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotMatchBinding }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={ name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetRowColumnCounts }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={ name: stringNS.L_DataReadError, message: stringNS.L_SelectionNotSupportCoercionType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={ name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetStartRowColumn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={ name: stringNS.L_DataReadError, message: stringNS.L_NonUniformPartialGetNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={ name: stringNS.L_DataReadError, message: stringNS.L_GetDataIsTooLarge }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={ name: stringNS.L_DataReadError, message: stringNS.L_FileTypeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={ name: stringNS.L_DataReadError, message: stringNS.L_GetDataParametersConflict }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={ name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetColumns }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={ name: stringNS.L_DataReadError, message: stringNS.L_InvalidGetRows }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={ name: stringNS.L_DataReadError, message: stringNS.L_InvalidReadForBlankRow }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={ name: stringNS.L_DataWriteError, message: stringNS.L_UnsupportedDataObject }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={ name: stringNS.L_DataWriteError, message: stringNS.L_CannotWriteToSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={ name: stringNS.L_DataWriteError, message: stringNS.L_DataNotMatchSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={ name: stringNS.L_DataWriteError, message: stringNS.L_OverwriteWorksheetData }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={ name: stringNS.L_DataWriteError, message: stringNS.L_DataNotMatchBindingSize }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={ name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetStartRowColumn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={ name: stringNS.L_InvalidFormat, message: stringNS.L_InvalidDataFormat }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={ name: stringNS.L_InvalidDataObject, message: stringNS.L_DataNotMatchCoercionType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={ name: stringNS.L_InvalidDataObject, message: stringNS.L_DataNotMatchBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={ name: stringNS.L_DataWriteError, message: stringNS.L_SetDataIsTooLarge }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={ name: stringNS.L_DataWriteError, message: stringNS.L_NonUniformPartialSetNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={ name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetColumns }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={ name: stringNS.L_DataWriteError, message: stringNS.L_InvalidSetRows }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={ name: stringNS.L_DataWriteError, message: stringNS.L_SetDataParametersConflict }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={ name: stringNS.L_BindingCreationError, message: stringNS.L_SelectionCannotBound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={ name: stringNS.L_InvalidBindingError, message: stringNS.L_BindingNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={ name: stringNS.L_BindingCreationError, message: stringNS.L_BindingToMultipleSelection }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={ name: stringNS.L_BindingCreationError, message: stringNS.L_InvalidSelectionForBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={ name: stringNS.L_InvalidBindingOperation, message: stringNS.L_OperationNotSupportedOnThisBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={ name: stringNS.L_BindingCreationError, message: stringNS.L_NamedItemNotFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={ name: stringNS.L_BindingCreationError, message: stringNS.L_MultipleNamedItemFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={ name: stringNS.L_BindingCreationError, message: stringNS.L_InvalidNamedItemForBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={ name: stringNS.L_InvalidBinding, message: stringNS.L_UnknownBindingType }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={ name: stringNS.L_InvalidBindingOperation, message: stringNS.L_OperationNotSupportedOnMatrixData }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={ name: stringNS.L_InvalidBinding, message: stringNS.L_InvalidColumnsForBinding }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={ name: stringNS.L_ReadSettingsError, message: stringNS.L_SettingNameNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={ name: stringNS.L_SaveSettingsError, message: stringNS.L_SettingsCannotSave }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={ name: stringNS.L_SettingsStaleError, message: stringNS.L_SettingsAreStale }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={ name: stringNS.L_HostError, message: stringNS.L_OperationNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={ name: stringNS.L_InternalError, message: stringNS.L_InternalErrorDescription }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={ name: stringNS.L_PermissionDenied, message: stringNS.L_DocumentReadOnly }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={ name: stringNS.L_EventRegistrationError, message: stringNS.L_EventHandlerNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={ name: stringNS.L_InvalidAPICall, message: stringNS.L_InvalidApiCallInContext }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={ name: stringNS.L_ShuttingDown, message: stringNS.L_ShuttingDown }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={ name: stringNS.L_UnsupportedEnumeration, message: stringNS.L_UnsupportedEnumerationMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={ name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={ name: stringNS.L_APINotSupported, message: stringNS.L_BrowserAPINotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={ name: stringNS.L_APICallFailed, message: stringNS.L_RequestTimeout }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={ name: stringNS.L_InvalidOrTimedOutSession, message: stringNS.L_InvalidOrTimedOutSessionMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={ name: stringNS.L_APICallFailed, message: stringNS.L_TooManyIncompleteRequests }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={ name: stringNS.L_APICallFailed, message: stringNS.L_RequestTokenUnavailable }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={ name: stringNS.L_APICallFailed, message: stringNS.L_ActivityLimitReached }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={ name: stringNS.L_APICallFailed, message: stringNS.L_InvalidApiArgumentsMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={ name: stringNS.L_InvalidNode, message: stringNS.L_CustomXmlNodeNotFound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={ name: stringNS.L_CustomXmlError, message: stringNS.L_CustomXmlError }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={ name: stringNS.L_CustomXmlExceedQuotaName, message: stringNS.L_CustomXmlExceedQuotaMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={ name: stringNS.L_CustomXmlOutOfDateName, message: stringNS.L_CustomXmlOutOfDateMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={ name: stringNS.L_PermissionDenied, message: stringNS.L_NoCapability }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={ name: stringNS.L_CannotNavigateTo, message: stringNS.L_CannotNavigateTo }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={ name: stringNS.L_SpecifiedIdNotExist, message: stringNS.L_SpecifiedIdNotExist }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={ name: stringNS.L_NavOutOfBound, message: stringNS.L_NavOutOfBound }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={ name: stringNS.L_DataWriteReminder, message: stringNS.L_CellDataAmountBeyondLimits }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={ name: stringNS.L_MissingParameter, message: stringNS.L_ElementMissing }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={ name: stringNS.L_PermissionDenied, message: stringNS.L_NoCapability }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={ name: stringNS.L_InvalidValue, message: stringNS.L_InvalidCellsValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={ name: stringNS.L_InvalidValue, message: stringNS.L_InvalidTableOptionValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={ name: stringNS.L_InvalidValue, message: stringNS.L_InvalidFormatValue }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={ name: stringNS.L_OutOfRange, message: stringNS.L_RowIndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={ name: stringNS.L_OutOfRange, message: stringNS.L_ColIndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={ name: stringNS.L_OutOfRange, message: stringNS.L_FormatValueOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={ name: stringNS.L_FormattingReminder, message: stringNS.L_CellFormatAmountBeyondLimits }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={ name: stringNS.L_MemoryLimit, message: stringNS.L_CloseFileBeforeRetrieve }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={ name: stringNS.L_NetworkProblem, message: stringNS.L_NetworkProblemRetrieveFile }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={ name: stringNS.L_InvalidValue, message: stringNS.L_SliceSizeNotSupported }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={ name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogAlreadyOpened }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={ name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={ name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={ name: stringNS.L_DisplayDialogError, message: stringNS.L_NetworkProblem }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={ name: stringNS.L_DialogNavigateError, message: stringNS.L_DialogInvalidScheme }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={ name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogAddressNotTrusted }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={ name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogRequireHTTPS }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={ name: stringNS.L_DisplayDialogError, message: stringNS.L_UserClickIgnore }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={ name: stringNS.L_DisplayDialogError, message: stringNS.L_NewWindowCrossZoneErrorString }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={ name: stringNS.L_APINotSupported, message: stringNS.L_InvalidSSOAddinMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={ name: stringNS.L_UserNotSignedIn, message: stringNS.L_UserNotSignedIn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={ name: stringNS.L_UserAborted, message: stringNS.L_UserAbortedMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={ name: stringNS.L_UnsupportedUserIdentity, message: stringNS.L_UnsupportedUserIdentityMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={ name: stringNS.L_InvalidResourceUrl, message: stringNS.L_InvalidResourceUrlMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={ name: stringNS.L_InvalidGrant, message: stringNS.L_InvalidGrantMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={ name: stringNS.L_SSOClientError, message: stringNS.L_SSOClientErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={ name: stringNS.L_SSOServerError, message: stringNS.L_SSOServerErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={ name: stringNS.L_AddinIsAlreadyRequestingToken, message: stringNS.L_AddinIsAlreadyRequestingTokenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={ name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage }; + } + }; +})(); +var OfficeExt; +(function (OfficeExt) { + var Requirement; + (function (Requirement) { + var RequirementVersion=(function () { + function RequirementVersion() { + } + return RequirementVersion; + })(); + Requirement.RequirementVersion=RequirementVersion; + var RequirementMatrix=(function () { + function RequirementMatrix(_setMap) { + this.isSetSupported=function _isSetSupported(name, minVersion) { + if (name==undefined) { + return false; + } + if (minVersion==undefined) { + minVersion=0; + } + var setSupportArray=this._setMap; + var sets=setSupportArray._sets; + if (sets.hasOwnProperty(name.toLowerCase())) { + var setMaxVersion=sets[name.toLowerCase()]; + try { + var setMaxVersionNum=this._getVersion(setMaxVersion); + minVersion=minVersion+""; + var minVersionNum=this._getVersion(minVersion); + if (setMaxVersionNum.major > 0 && setMaxVersionNum.major > minVersionNum.major) { + return true; + } + if (setMaxVersionNum.minor > 0 && + setMaxVersionNum.minor > 0 && + setMaxVersionNum.major==minVersionNum.major && + setMaxVersionNum.minor >=minVersionNum.minor) { + return true; + } + } + catch (e) { + return false; + } + } + return false; + }; + this._getVersion=function (version) { + var temp=version.split("."); + var major=0; + var minor=0; + if (temp.length < 2 && isNaN(Number(version))) { + throw "version format incorrect"; + } + else { + major=Number(temp[0]); + if (temp.length >=2) { + minor=Number(temp[1]); + } + if (isNaN(major) || isNaN(minor)) { + throw "version format incorrect"; + } + } + var result={ "minor": minor, "major": major }; + return result; + }; + this._setMap=_setMap; + this.isSetSupported=this.isSetSupported.bind(this); + } + return RequirementMatrix; + })(); + Requirement.RequirementMatrix=RequirementMatrix; + var DefaultSetRequirement=(function () { + function DefaultSetRequirement(setMap) { + this._addSetMap=function DefaultSetRequirement_addSetMap(addedSet) { + for (var name in addedSet) { + this._sets[name]=addedSet[name]; + } + }; + this._sets=setMap; + } + return DefaultSetRequirement; + })(); + Requirement.DefaultSetRequirement=DefaultSetRequirement; + var DefaultDialogSetRequirement=(function (_super) { + __extends(DefaultDialogSetRequirement, _super); + function DefaultDialogSetRequirement() { + _super.call(this, { + "dialogapi": 1.1 + }); + } + return DefaultDialogSetRequirement; + })(DefaultSetRequirement); + Requirement.DefaultDialogSetRequirement=DefaultDialogSetRequirement; + var ExcelClientDefaultSetRequirement=(function (_super) { + __extends(ExcelClientDefaultSetRequirement, _super); + function ExcelClientDefaultSetRequirement() { + _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "excelapi": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1 + }); + } + return ExcelClientDefaultSetRequirement; + })(DefaultSetRequirement); + Requirement.ExcelClientDefaultSetRequirement=ExcelClientDefaultSetRequirement; + var ExcelClientV1DefaultSetRequirement=(function (_super) { + __extends(ExcelClientV1DefaultSetRequirement, _super); + function ExcelClientV1DefaultSetRequirement() { + _super.call(this); + this._addSetMap({ + "imagecoercion": 1.1 + }); + } + return ExcelClientV1DefaultSetRequirement; + })(ExcelClientDefaultSetRequirement); + Requirement.ExcelClientV1DefaultSetRequirement=ExcelClientV1DefaultSetRequirement; + var OutlookClientDefaultSetRequirement=(function (_super) { + __extends(OutlookClientDefaultSetRequirement, _super); + function OutlookClientDefaultSetRequirement() { + _super.call(this, { + "mailbox": 1.3 + }); + } + return OutlookClientDefaultSetRequirement; + })(DefaultSetRequirement); + Requirement.OutlookClientDefaultSetRequirement=OutlookClientDefaultSetRequirement; + var WordClientDefaultSetRequirement=(function (_super) { + __extends(WordClientDefaultSetRequirement, _super); + function WordClientDefaultSetRequirement() { + _super.call(this, { + "bindingevents": 1.1, + "compressedfile": 1.1, + "customxmlparts": 1.1, + "documentevents": 1.1, + "file": 1.1, + "htmlcoercion": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "textfile": 1.1, + "wordapi": 1.1 + }); + } + return WordClientDefaultSetRequirement; + })(DefaultSetRequirement); + Requirement.WordClientDefaultSetRequirement=WordClientDefaultSetRequirement; + var WordClientV1DefaultSetRequirement=(function (_super) { + __extends(WordClientV1DefaultSetRequirement, _super); + function WordClientV1DefaultSetRequirement() { + _super.call(this); + this._addSetMap({ + "customxmlparts": 1.2, + "wordapi": 1.2, + "imagecoercion": 1.1 + }); + } + return WordClientV1DefaultSetRequirement; + })(WordClientDefaultSetRequirement); + Requirement.WordClientV1DefaultSetRequirement=WordClientV1DefaultSetRequirement; + var PowerpointClientDefaultSetRequirement=(function (_super) { + __extends(PowerpointClientDefaultSetRequirement, _super); + function PowerpointClientDefaultSetRequirement() { + _super.call(this, { + "activeview": 1.1, + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }); + } + return PowerpointClientDefaultSetRequirement; + })(DefaultSetRequirement); + Requirement.PowerpointClientDefaultSetRequirement=PowerpointClientDefaultSetRequirement; + var PowerpointClientV1DefaultSetRequirement=(function (_super) { + __extends(PowerpointClientV1DefaultSetRequirement, _super); + function PowerpointClientV1DefaultSetRequirement() { + _super.call(this); + this._addSetMap({ + "imagecoercion": 1.1 + }); + } + return PowerpointClientV1DefaultSetRequirement; + })(PowerpointClientDefaultSetRequirement); + Requirement.PowerpointClientV1DefaultSetRequirement=PowerpointClientV1DefaultSetRequirement; + var ProjectClientDefaultSetRequirement=(function (_super) { + __extends(ProjectClientDefaultSetRequirement, _super); + function ProjectClientDefaultSetRequirement() { + _super.call(this, { + "selection": 1.1, + "textcoercion": 1.1 + }); + } + return ProjectClientDefaultSetRequirement; + })(DefaultSetRequirement); + Requirement.ProjectClientDefaultSetRequirement=ProjectClientDefaultSetRequirement; + var ExcelWebDefaultSetRequirement=(function (_super) { + __extends(ExcelWebDefaultSetRequirement, _super); + function ExcelWebDefaultSetRequirement() { + _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "file": 1.1 + }); + } + return ExcelWebDefaultSetRequirement; + })(DefaultSetRequirement); + Requirement.ExcelWebDefaultSetRequirement=ExcelWebDefaultSetRequirement; + var WordWebDefaultSetRequirement=(function (_super) { + __extends(WordWebDefaultSetRequirement, _super); + function WordWebDefaultSetRequirement() { + _super.call(this, { + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "imagecoercion": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablecoercion": 1.1, + "textcoercion": 1.1, + "textfile": 1.1 + }); + } + return WordWebDefaultSetRequirement; + })(DefaultSetRequirement); + Requirement.WordWebDefaultSetRequirement=WordWebDefaultSetRequirement; + var PowerpointWebDefaultSetRequirement=(function (_super) { + __extends(PowerpointWebDefaultSetRequirement, _super); + function PowerpointWebDefaultSetRequirement() { + _super.call(this, { + "activeview": 1.1, + "settings": 1.1 + }); + } + return PowerpointWebDefaultSetRequirement; + })(DefaultSetRequirement); + Requirement.PowerpointWebDefaultSetRequirement=PowerpointWebDefaultSetRequirement; + var OutlookWebDefaultSetRequirement=(function (_super) { + __extends(OutlookWebDefaultSetRequirement, _super); + function OutlookWebDefaultSetRequirement() { + _super.call(this, { + "mailbox": 1.3 + }); + } + return OutlookWebDefaultSetRequirement; + })(DefaultSetRequirement); + Requirement.OutlookWebDefaultSetRequirement=OutlookWebDefaultSetRequirement; + var SwayWebDefaultSetRequirement=(function (_super) { + __extends(SwayWebDefaultSetRequirement, _super); + function SwayWebDefaultSetRequirement() { + _super.call(this, { + "activeview": 1.1, + "documentevents": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }); + } + return SwayWebDefaultSetRequirement; + })(DefaultSetRequirement); + Requirement.SwayWebDefaultSetRequirement=SwayWebDefaultSetRequirement; + var AccessWebDefaultSetRequirement=(function (_super) { + __extends(AccessWebDefaultSetRequirement, _super); + function AccessWebDefaultSetRequirement() { + _super.call(this, { + "bindingevents": 1.1, + "partialtablebindings": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1 + }); + } + return AccessWebDefaultSetRequirement; + })(DefaultSetRequirement); + Requirement.AccessWebDefaultSetRequirement=AccessWebDefaultSetRequirement; + var ExcelIOSDefaultSetRequirement=(function (_super) { + __extends(ExcelIOSDefaultSetRequirement, _super); + function ExcelIOSDefaultSetRequirement() { + _super.call(this, { + "bindingevents": 1.1, + "documentevents": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1 + }); + } + return ExcelIOSDefaultSetRequirement; + })(DefaultSetRequirement); + Requirement.ExcelIOSDefaultSetRequirement=ExcelIOSDefaultSetRequirement; + var WordIOSDefaultSetRequirement=(function (_super) { + __extends(WordIOSDefaultSetRequirement, _super); + function WordIOSDefaultSetRequirement() { + _super.call(this, { + "bindingevents": 1.1, + "compressedfile": 1.1, + "customxmlparts": 1.1, + "documentevents": 1.1, + "file": 1.1, + "htmlcoercion": 1.1, + "matrixbindings": 1.1, + "matrixcoercion": 1.1, + "ooxmlcoercion": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "tablebindings": 1.1, + "tablecoercion": 1.1, + "textbindings": 1.1, + "textcoercion": 1.1, + "textfile": 1.1 + }); + } + return WordIOSDefaultSetRequirement; + })(DefaultSetRequirement); + Requirement.WordIOSDefaultSetRequirement=WordIOSDefaultSetRequirement; + var WordIOSV1DefaultSetRequirement=(function (_super) { + __extends(WordIOSV1DefaultSetRequirement, _super); + function WordIOSV1DefaultSetRequirement() { + _super.call(this); + this._addSetMap({ + "customxmlparts": 1.2, + "wordapi": 1.2 + }); + } + return WordIOSV1DefaultSetRequirement; + })(WordIOSDefaultSetRequirement); + Requirement.WordIOSV1DefaultSetRequirement=WordIOSV1DefaultSetRequirement; + var PowerpointIOSDefaultSetRequirement=(function (_super) { + __extends(PowerpointIOSDefaultSetRequirement, _super); + function PowerpointIOSDefaultSetRequirement() { + _super.call(this, { + "activeview": 1.1, + "compressedfile": 1.1, + "documentevents": 1.1, + "file": 1.1, + "pdffile": 1.1, + "selection": 1.1, + "settings": 1.1, + "textcoercion": 1.1 + }); + } + return PowerpointIOSDefaultSetRequirement; + })(DefaultSetRequirement); + Requirement.PowerpointIOSDefaultSetRequirement=PowerpointIOSDefaultSetRequirement; + var OutlookIOSDefaultSetRequirement=(function (_super) { + __extends(OutlookIOSDefaultSetRequirement, _super); + function OutlookIOSDefaultSetRequirement() { + _super.call(this, { + "mailbox": 1.1 + }); + } + return OutlookIOSDefaultSetRequirement; + })(DefaultSetRequirement); + Requirement.OutlookIOSDefaultSetRequirement=OutlookIOSDefaultSetRequirement; + var RequirementsMatrixFactory=(function () { + function RequirementsMatrixFactory() { + } + RequirementsMatrixFactory.initializeOsfDda=function () { + OSF.OUtil.setNamespace("Requirement", OSF.DDA); + }; + RequirementsMatrixFactory.getDefaultRequirementMatrix=function (appContext) { + this.initializeDefaultSetMatrix(); + var defaultRequirementMatrix=undefined; + var clientRequirement=appContext.get_requirementMatrix(); + if (clientRequirement !=undefined && clientRequirement.length > 0 && typeof (JSON) !=="undefined") { + var matrixItem=JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + defaultRequirementMatrix=new RequirementMatrix(new DefaultSetRequirement(matrixItem)); + } + else { + var appLocator=RequirementsMatrixFactory.getClientFullVersionString(appContext); + if (RequirementsMatrixFactory.DefaultSetArrayMatrix !=undefined && RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator] !=undefined) { + defaultRequirementMatrix=new RequirementMatrix(RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator]); + } + else { + defaultRequirementMatrix=new RequirementMatrix(new DefaultSetRequirement({})); + } + } + return defaultRequirementMatrix; + }; + RequirementsMatrixFactory.getDefaultDialogRequirementMatrix=function (appContext) { + var defaultRequirementMatrix=undefined; + var clientRequirement=appContext.get_dialogRequirementMatrix(); + if (clientRequirement !=undefined && clientRequirement.length > 0 && typeof (JSON) !=="undefined") { + var matrixItem=JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + defaultRequirementMatrix=new RequirementMatrix(new DefaultSetRequirement(matrixItem)); + } + else { + defaultRequirementMatrix=new RequirementMatrix(new DefaultDialogSetRequirement()); + } + return defaultRequirementMatrix; + }; + RequirementsMatrixFactory.getClientFullVersionString=function (appContext) { + var appMinorVersion=appContext.get_appMinorVersion(); + var appMinorVersionString=""; + var appFullVersion=""; + var appName=appContext.get_appName(); + var isIOSClient=appName==1024 || + appName==4096 || + appName==8192 || + appName==65536; + if (isIOSClient && appContext.get_appVersion()==1) { + if (appName==4096 && appMinorVersion >=15) { + appFullVersion="16.00.01"; + } + else { + appFullVersion="16.00"; + } + } + else if (appContext.get_appName()==64) { + appFullVersion=appContext.get_appVersion(); + } + else { + if (appMinorVersion < 10) { + appMinorVersionString="0"+appMinorVersion; + } + else { + appMinorVersionString=""+appMinorVersion; + } + appFullVersion=appContext.get_appVersion()+"."+appMinorVersionString; + } + return appContext.get_appName()+"-"+appFullVersion; + }; + RequirementsMatrixFactory.initializeDefaultSetMatrix=function () { + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1600]=new ExcelClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1600]=new WordClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1600]=new PowerpointClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1601]=new ExcelClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1601]=new WordClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1601]=new PowerpointClientV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_RCLIENT_1600]=new OutlookClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_WAC_1600]=new ExcelWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_WAC_1600]=new WordWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1600]=new OutlookWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1601]=new OutlookWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Project_RCLIENT_1600]=new ProjectClientDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Access_WAC_1600]=new AccessWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_WAC_1600]=new PowerpointWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_IOS_1600]=new ExcelIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.SWAY_WAC_1600]=new SwayWebDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_1600]=new WordIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_16001]=new WordIOSV1DefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_IOS_1600]=new PowerpointIOSDefaultSetRequirement(); + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_IOS_1600]=new OutlookIOSDefaultSetRequirement(); + }; + RequirementsMatrixFactory.Excel_RCLIENT_1600="1-16.00"; + RequirementsMatrixFactory.Excel_RCLIENT_1601="1-16.01"; + RequirementsMatrixFactory.Word_RCLIENT_1600="2-16.00"; + RequirementsMatrixFactory.Word_RCLIENT_1601="2-16.01"; + RequirementsMatrixFactory.PowerPoint_RCLIENT_1600="4-16.00"; + RequirementsMatrixFactory.PowerPoint_RCLIENT_1601="4-16.01"; + RequirementsMatrixFactory.Outlook_RCLIENT_1600="8-16.00"; + RequirementsMatrixFactory.Excel_WAC_1600="16-16.00"; + RequirementsMatrixFactory.Word_WAC_1600="32-16.00"; + RequirementsMatrixFactory.Outlook_WAC_1600="64-16.00"; + RequirementsMatrixFactory.Outlook_WAC_1601="64-16.01"; + RequirementsMatrixFactory.Project_RCLIENT_1600="128-16.00"; + RequirementsMatrixFactory.Access_WAC_1600="256-16.00"; + RequirementsMatrixFactory.PowerPoint_WAC_1600="512-16.00"; + RequirementsMatrixFactory.Excel_IOS_1600="1024-16.00"; + RequirementsMatrixFactory.SWAY_WAC_1600="2048-16.00"; + RequirementsMatrixFactory.Word_IOS_1600="4096-16.00"; + RequirementsMatrixFactory.Word_IOS_16001="4096-16.00.01"; + RequirementsMatrixFactory.PowerPoint_IOS_1600="8192-16.00"; + RequirementsMatrixFactory.Outlook_IOS_1600="65536-16.00"; + RequirementsMatrixFactory.DefaultSetArrayMatrix={}; + return RequirementsMatrixFactory; + })(); + Requirement.RequirementsMatrixFactory=RequirementsMatrixFactory; + })(Requirement=OfficeExt.Requirement || (OfficeExt.Requirement={})); +})(OfficeExt || (OfficeExt={})); +OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(); +var OfficeExt; +(function (OfficeExt) { + var HostName; + (function (HostName) { + var Host=(function () { + function Host() { + this.getDiagnostics=function _getDiagnostics(version) { + var diagnostics={ + host: this.getHost(), + version: (version || this.getDefaultVersion()), + platform: this.getPlatform() + }; + return diagnostics; + }; + this.platformRemappings={ + web: Microsoft.Office.WebExtension.PlatformType.OfficeOnline, + winrt: Microsoft.Office.WebExtension.PlatformType.Universal, + win32: Microsoft.Office.WebExtension.PlatformType.PC, + mac: Microsoft.Office.WebExtension.PlatformType.Mac, + ios: Microsoft.Office.WebExtension.PlatformType.iOS, + android: Microsoft.Office.WebExtension.PlatformType.Android + }; + this.camelCaseMappings={ + powerpoint: Microsoft.Office.WebExtension.HostType.PowerPoint, + onenote: Microsoft.Office.WebExtension.HostType.OneNote + }; + this.hostInfo=OSF._OfficeAppFactory.getHostInfo(); + this.getHost=this.getHost.bind(this); + this.getPlatform=this.getPlatform.bind(this); + this.getDiagnostics=this.getDiagnostics.bind(this); + } + Host.prototype.capitalizeFirstLetter=function (input) { + if (input) { + return (input[0].toUpperCase()+input.slice(1).toLowerCase()); + } + return input; + }; + Host.getInstance=function () { + if (Host.hostObj===undefined) { + Host.hostObj=new Host(); + } + return Host.hostObj; + }; + Host.prototype.getPlatform=function () { + if (this.hostInfo.hostPlatform) { + var hostPlatform=this.hostInfo.hostPlatform.toLowerCase(); + if (this.platformRemappings[hostPlatform]) { + return this.platformRemappings[hostPlatform]; + } + } + return null; + }; + Host.prototype.getHost=function () { + if (this.hostInfo.hostType) { + var hostType=this.hostInfo.hostType.toLowerCase(); + if (this.camelCaseMappings[hostType]) { + return this.camelCaseMappings[hostType]; + } + hostType=this.capitalizeFirstLetter(this.hostInfo.hostType); + if (Microsoft.Office.WebExtension.HostType[hostType]) { + return Microsoft.Office.WebExtension.HostType[hostType]; + } + } + return null; + }; + Host.prototype.getDefaultVersion=function () { + if (this.getHost()) { + return "16.0.0000.0000"; + } + return null; + }; + return Host; + })(); + HostName.Host=Host; + })(HostName=OfficeExt.HostName || (OfficeExt.HostName={})); +})(OfficeExt || (OfficeExt={})); +Microsoft.Office.WebExtension.ApplicationMode={ + WebEditor: "webEditor", + WebViewer: "webViewer", + Client: "client" +}; +Microsoft.Office.WebExtension.DocumentMode={ + ReadOnly: "readOnly", + ReadWrite: "readWrite" +}; +OSF.NamespaceManager=(function OSF_NamespaceManager() { + var _userOffice; + var _useShortcut=false; + return { + enableShortcut: function OSF_NamespaceManager$enableShortcut() { + if (!_useShortcut) { + if (window.Office) { + _userOffice=window.Office; + } + else { + OSF.OUtil.setNamespace("Office", window); + } + window.Office=Microsoft.Office.WebExtension; + _useShortcut=true; + } + }, + disableShortcut: function OSF_NamespaceManager$disableShortcut() { + if (_useShortcut) { + if (_userOffice) { + window.Office=_userOffice; + } + else { + OSF.OUtil.unsetNamespace("Office", window); + } + _useShortcut=false; + } + } + }; +})(); +OSF.NamespaceManager.enableShortcut(); +Microsoft.Office.WebExtension.useShortNamespace=function Microsoft_Office_WebExtension_useShortNamespace(useShortcut) { + if (useShortcut) { + OSF.NamespaceManager.enableShortcut(); + } + else { + OSF.NamespaceManager.disableShortcut(); + } +}; +Microsoft.Office.WebExtension.select=function Microsoft_Office_WebExtension_select(str, errorCallback) { + var promise; + if (str && typeof str=="string") { + var index=str.indexOf("#"); + if (index !=-1) { + var op=str.substring(0, index); + var target=str.substring(index+1); + switch (op) { + case "binding": + case "bindings": + if (target) { + promise=new OSF.DDA.BindingPromise(target); + } + break; + } + } + } + if (!promise) { + if (errorCallback) { + var callbackType=typeof errorCallback; + if (callbackType=="function") { + var callArgs={}; + callArgs[Microsoft.Office.WebExtension.Parameters.Callback]=errorCallback; + OSF.DDA.issueAsyncResult(callArgs, OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext, OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext)); + } + else { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction, callbackType); + } + } + } + else { + promise.onFail=errorCallback; + return promise; + } +}; +OSF.DDA.Context=function OSF_DDA_Context(officeAppContext, document, license, appOM, getOfficeTheme) { + OSF.OUtil.defineEnumerableProperties(this, { + "contentLanguage": { + value: officeAppContext.get_dataLocale() + }, + "displayLanguage": { + value: officeAppContext.get_appUILocale() + }, + "touchEnabled": { + value: officeAppContext.get_touchEnabled() + }, + "commerceAllowed": { + value: officeAppContext.get_commerceAllowed() + }, + "host": { + value: OfficeExt.HostName.Host.getInstance().getHost() + }, + "platform": { + value: OfficeExt.HostName.Host.getInstance().getPlatform() + }, + "diagnostics": { + value: OfficeExt.HostName.Host.getInstance().getDiagnostics(officeAppContext.get_hostFullVersion()) + } + }); + if (license) { + OSF.OUtil.defineEnumerableProperty(this, "license", { + value: license + }); + } + if (officeAppContext.ui) { + OSF.OUtil.defineEnumerableProperty(this, "ui", { + value: officeAppContext.ui + }); + } + if (officeAppContext.auth) { + OSF.OUtil.defineEnumerableProperty(this, "auth", { + value: officeAppContext.auth + }); + } + if (officeAppContext.get_isDialog()) { + var requirements=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); + OSF.OUtil.defineEnumerableProperty(this, "requirements", { + value: requirements + }); + } + else { + if (document) { + OSF.OUtil.defineEnumerableProperty(this, "document", { + value: document + }); + } + if (appOM) { + var displayName=appOM.displayName || "appOM"; + delete appOM.displayName; + OSF.OUtil.defineEnumerableProperty(this, displayName, { + value: appOM + }); + } + if (getOfficeTheme) { + OSF.OUtil.defineEnumerableProperty(this, "officeTheme", { + get: function () { + return getOfficeTheme(); + } + }); + } + var requirements=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(officeAppContext); + OSF.OUtil.defineEnumerableProperty(this, "requirements", { + value: requirements + }); + } +}; +OSF.DDA.OutlookContext=function OSF_DDA_OutlookContext(appContext, settings, license, appOM, getOfficeTheme) { + OSF.DDA.OutlookContext.uber.constructor.call(this, appContext, null, license, appOM, getOfficeTheme); + if (settings) { + OSF.OUtil.defineEnumerableProperty(this, "roamingSettings", { + value: settings + }); + } +}; +OSF.OUtil.extend(OSF.DDA.OutlookContext, OSF.DDA.Context); +OSF.DDA.OutlookAppOm=function OSF_DDA_OutlookAppOm(appContext, window, appReady) { }; +OSF.DDA.Document=function OSF_DDA_Document(officeAppContext, settings) { + var mode; + switch (officeAppContext.get_clientMode()) { + case OSF.ClientMode.ReadOnly: + mode=Microsoft.Office.WebExtension.DocumentMode.ReadOnly; + break; + case OSF.ClientMode.ReadWrite: + mode=Microsoft.Office.WebExtension.DocumentMode.ReadWrite; + break; + } + ; + if (settings) { + OSF.OUtil.defineEnumerableProperty(this, "settings", { + value: settings + }); + } + ; + OSF.OUtil.defineMutableProperties(this, { + "mode": { + value: mode + }, + "url": { + value: officeAppContext.get_docUrl() + } + }); +}; +OSF.DDA.JsomDocument=function OSF_DDA_JsomDocument(officeAppContext, bindingFacade, settings) { + OSF.DDA.JsomDocument.uber.constructor.call(this, officeAppContext, settings); + if (bindingFacade) { + OSF.OUtil.defineEnumerableProperty(this, "bindings", { + get: function OSF_DDA_Document$GetBindings() { return bindingFacade; } + }); + } + var am=OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.GetSelectedDataAsync, + am.SetSelectedDataAsync + ]); + OSF.DDA.DispIdHost.addEventSupport(this, new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged])); +}; +OSF.OUtil.extend(OSF.DDA.JsomDocument, OSF.DDA.Document); +OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension, "context", { + get: function Microsoft_Office_WebExtension$GetContext() { + var context; + if (OSF && OSF._OfficeAppFactory) { + context=OSF._OfficeAppFactory.getContext(); + } + return context; + } +}); +OSF.DDA.License=function OSF_DDA_License(eToken) { + OSF.OUtil.defineEnumerableProperty(this, "value", { + value: eToken + }); +}; +OSF.DDA.ApiMethodCall=function OSF_DDA_ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { + var requiredCount=requiredParameters.length; + var getInvalidParameterString=OSF.OUtil.delayExecutionAndCache(function () { + return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters, displayName); + }); + this.verifyArguments=function OSF_DDA_ApiMethodCall$VerifyArguments(params, args) { + for (var name in params) { + var param=params[name]; + var arg=args[name]; + if (param["enum"]) { + switch (typeof arg) { + case "string": + if (OSF.OUtil.listContainsValue(param["enum"], arg)) { + break; + } + case "undefined": + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration; + default: + throw getInvalidParameterString(); + } + } + if (param["types"]) { + if (!OSF.OUtil.listContainsValue(param["types"], typeof arg)) { + throw getInvalidParameterString(); + } + } + } + }; + this.extractRequiredArguments=function OSF_DDA_ApiMethodCall$ExtractRequiredArguments(userArgs, caller, stateInfo) { + if (userArgs.length < requiredCount) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments); + } + var requiredArgs=[]; + var index; + for (index=0; index < requiredCount; index++) { + requiredArgs.push(userArgs[index]); + } + this.verifyArguments(requiredParameters, requiredArgs); + var ret={}; + for (index=0; index < requiredCount; index++) { + var param=requiredParameters[index]; + var arg=requiredArgs[index]; + if (param.verify) { + var isValid=param.verify(arg, caller, stateInfo); + if (!isValid) { + throw getInvalidParameterString(); + } + } + ret[param.name]=arg; + } + return ret; + }, + this.fillOptions=function OSF_DDA_ApiMethodCall$FillOptions(options, requiredArgs, caller, stateInfo) { + options=options || {}; + for (var optionName in supportedOptions) { + if (!OSF.OUtil.listContainsKey(options, optionName)) { + var value=undefined; + var option=supportedOptions[optionName]; + if (option.calculate && requiredArgs) { + value=option.calculate(requiredArgs, caller, stateInfo); + } + if (!value && option.defaultValue !==undefined) { + value=option.defaultValue; + } + options[optionName]=value; + } + } + return options; + }; + this.constructCallArgs=function OSF_DAA_ApiMethodCall$ConstructCallArgs(required, options, caller, stateInfo) { + var callArgs={}; + for (var r in required) { + callArgs[r]=required[r]; + } + for (var o in options) { + callArgs[o]=options[o]; + } + for (var s in privateStateCallbacks) { + callArgs[s]=privateStateCallbacks[s](caller, stateInfo); + } + if (checkCallArgs) { + callArgs=checkCallArgs(callArgs, caller, stateInfo); + } + return callArgs; + }; +}; +OSF.OUtil.setNamespace("AsyncResultEnum", OSF.DDA); +OSF.DDA.AsyncResultEnum.Properties={ + Context: "Context", + Value: "Value", + Status: "Status", + Error: "Error" +}; +Microsoft.Office.WebExtension.AsyncResultStatus={ + Succeeded: "succeeded", + Failed: "failed" +}; +OSF.DDA.AsyncResultEnum.ErrorCode={ + Success: 0, + Failed: 1 +}; +OSF.DDA.AsyncResultEnum.ErrorProperties={ + Name: "Name", + Message: "Message", + Code: "Code" +}; +OSF.DDA.AsyncMethodNames={}; +OSF.DDA.AsyncMethodNames.addNames=function (methodNames) { + for (var entry in methodNames) { + var am={}; + OSF.OUtil.defineEnumerableProperties(am, { + "id": { + value: entry + }, + "displayName": { + value: methodNames[entry] + } + }); + OSF.DDA.AsyncMethodNames[entry]=am; + } +}; +OSF.DDA.AsyncMethodCall=function OSF_DDA_AsyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, onSucceeded, onFailed, checkCallArgs, displayName) { + var requiredCount=requiredParameters.length; + var apiMethods=new OSF.DDA.ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName); + function OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) { + if (userArgs.length > requiredCount+2) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); + } + var options, parameterCallback; + for (var i=userArgs.length - 1; i >=requiredCount; i--) { + var argument=userArgs[i]; + switch (typeof argument) { + case "object": + if (options) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); + } + else { + options=argument; + } + break; + case "function": + if (parameterCallback) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction); + } + else { + parameterCallback=argument; + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); + break; + } + } + options=apiMethods.fillOptions(options, requiredArgs, caller, stateInfo); + if (parameterCallback) { + if (options[Microsoft.Office.WebExtension.Parameters.Callback]) { + throw Strings.OfficeOM.L_RedundantCallbackSpecification; + } + else { + options[Microsoft.Office.WebExtension.Parameters.Callback]=parameterCallback; + } + } + apiMethods.verifyArguments(supportedOptions, options); + return options; + } + ; + this.verifyAndExtractCall=function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) { + var required=apiMethods.extractRequiredArguments(userArgs, caller, stateInfo); + var options=OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, required, caller, stateInfo); + var callArgs=apiMethods.constructCallArgs(required, options, caller, stateInfo); + return callArgs; + }; + this.processResponse=function OSF_DAA_AsyncMethodCall$ProcessResponse(status, response, caller, callArgs) { + var payload; + if (status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (onSucceeded) { + payload=onSucceeded(response, caller, callArgs); + } + else { + payload=response; + } + } + else { + if (onFailed) { + payload=onFailed(status, response); + } + else { + payload=OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + } + return payload; + }; + this.getCallArgs=function (suppliedArgs) { + var options, parameterCallback; + for (var i=suppliedArgs.length - 1; i >=requiredCount; i--) { + var argument=suppliedArgs[i]; + switch (typeof argument) { + case "object": + options=argument; + break; + case "function": + parameterCallback=argument; + break; + } + } + options=options || {}; + if (parameterCallback) { + options[Microsoft.Office.WebExtension.Parameters.Callback]=parameterCallback; + } + return options; + }; +}; +OSF.DDA.AsyncMethodCallFactory=(function () { + return { + manufacture: function (params) { + var supportedOptions=params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + var privateStateCallbacks=params.privateStateCallbacks ? OSF.OUtil.createObject(params.privateStateCallbacks) : []; + return new OSF.DDA.AsyncMethodCall(params.requiredArguments || [], supportedOptions, privateStateCallbacks, params.onSucceeded, params.onFailed, params.checkCallArgs, params.method.displayName); + } + }; +})(); +OSF.DDA.AsyncMethodCalls={}; +OSF.DDA.AsyncMethodCalls.define=function (callDefinition) { + OSF.DDA.AsyncMethodCalls[callDefinition.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(callDefinition); +}; +OSF.DDA.Error=function OSF_DDA_Error(name, message, code) { + OSF.OUtil.defineEnumerableProperties(this, { + "name": { + value: name + }, + "message": { + value: message + }, + "code": { + value: code + } + }); +}; +OSF.DDA.AsyncResult=function OSF_DDA_AsyncResult(initArgs, errorArgs) { + OSF.OUtil.defineEnumerableProperties(this, { + "value": { + value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Value] + }, + "status": { + value: errorArgs ? Microsoft.Office.WebExtension.AsyncResultStatus.Failed : Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded + } + }); + if (initArgs[OSF.DDA.AsyncResultEnum.Properties.Context]) { + OSF.OUtil.defineEnumerableProperty(this, "asyncContext", { + value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Context] + }); + } + if (errorArgs) { + OSF.OUtil.defineEnumerableProperty(this, "error", { + value: new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]) + }); + } +}; +OSF.DDA.issueAsyncResult=function OSF_DDA$IssueAsyncResult(callArgs, status, payload) { + var callback=callArgs[Microsoft.Office.WebExtension.Parameters.Callback]; + if (callback) { + var asyncInitArgs={}; + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Context]=callArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; + var errorArgs; + if (status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Value]=payload; + } + else { + errorArgs={}; + payload=payload || OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=payload.message || payload; + } + callback(new OSF.DDA.AsyncResult(asyncInitArgs, errorArgs)); + } +}; +OSF.DDA.SyncMethodNames={}; +OSF.DDA.SyncMethodNames.addNames=function (methodNames) { + for (var entry in methodNames) { + var am={}; + OSF.OUtil.defineEnumerableProperties(am, { + "id": { + value: entry + }, + "displayName": { + value: methodNames[entry] + } + }); + OSF.DDA.SyncMethodNames[entry]=am; + } +}; +OSF.DDA.SyncMethodCall=function OSF_DDA_SyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { + var requiredCount=requiredParameters.length; + var apiMethods=new OSF.DDA.ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName); + function OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) { + if (userArgs.length > requiredCount+1) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); + } + var options, parameterCallback; + for (var i=userArgs.length - 1; i >=requiredCount; i--) { + var argument=userArgs[i]; + switch (typeof argument) { + case "object": + if (options) { + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); + } + else { + options=argument; + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); + break; + } + } + options=apiMethods.fillOptions(options, requiredArgs, caller, stateInfo); + apiMethods.verifyArguments(supportedOptions, options); + return options; + } + ; + this.verifyAndExtractCall=function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) { + var required=apiMethods.extractRequiredArguments(userArgs, caller, stateInfo); + var options=OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, required, caller, stateInfo); + var callArgs=apiMethods.constructCallArgs(required, options, caller, stateInfo); + return callArgs; + }; +}; +OSF.DDA.SyncMethodCallFactory=(function () { + return { + manufacture: function (params) { + var supportedOptions=params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + return new OSF.DDA.SyncMethodCall(params.requiredArguments || [], supportedOptions, params.privateStateCallbacks, params.checkCallArgs, params.method.displayName); + } + }; +})(); +OSF.DDA.SyncMethodCalls={}; +OSF.DDA.SyncMethodCalls.define=function (callDefinition) { + OSF.DDA.SyncMethodCalls[callDefinition.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(callDefinition); +}; +OSF.DDA.ListType=(function () { + var listTypes={}; + return { + setListType: function OSF_DDA_ListType$AddListType(t, prop) { listTypes[t]=prop; }, + isListType: function OSF_DDA_ListType$IsListType(t) { return OSF.OUtil.listContainsKey(listTypes, t); }, + getDescriptor: function OSF_DDA_ListType$getDescriptor(t) { return listTypes[t]; } + }; +})(); +OSF.DDA.HostParameterMap=function (specialProcessor, mappings) { + var toHostMap="toHost"; + var fromHostMap="fromHost"; + var sourceData="sourceData"; + var self="self"; + var dynamicTypes={}; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]={ + toHost: function (data) { + if (data !=null && data.rows !==undefined) { + var tableData={}; + tableData[OSF.DDA.TableDataProperties.TableRows]=data.rows; + tableData[OSF.DDA.TableDataProperties.TableHeaders]=data.headers; + data=tableData; + } + return data; + }, + fromHost: function (args) { + return args; + } + }; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.SampleData]=dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]; + function mapValues(preimageSet, mapping) { + var ret=preimageSet ? {} : undefined; + for (var entry in preimageSet) { + var preimage=preimageSet[entry]; + var image; + if (OSF.DDA.ListType.isListType(entry)) { + image=[]; + for (var subEntry in preimage) { + image.push(mapValues(preimage[subEntry], mapping)); + } + } + else if (OSF.OUtil.listContainsKey(dynamicTypes, entry)) { + image=dynamicTypes[entry][mapping](preimage); + } + else if (mapping==fromHostMap && specialProcessor.preserveNesting(entry)) { + image=mapValues(preimage, mapping); + } + else { + var maps=mappings[entry]; + if (maps) { + var map=maps[mapping]; + if (map) { + image=map[preimage]; + if (image===undefined) { + image=preimage; + } + } + } + else { + image=preimage; + } + } + ret[entry]=image; + } + return ret; + } + ; + function generateArguments(imageSet, parameters) { + var ret; + for (var param in parameters) { + var arg; + if (specialProcessor.isComplexType(param)) { + arg=generateArguments(imageSet, mappings[param][toHostMap]); + } + else { + arg=imageSet[param]; + } + if (arg !=undefined) { + if (!ret) { + ret={}; + } + var index=parameters[param]; + if (index==self) { + index=param; + } + ret[index]=specialProcessor.pack(param, arg); + } + } + return ret; + } + ; + function extractArguments(source, parameters, extracted) { + if (!extracted) { + extracted={}; + } + for (var param in parameters) { + var index=parameters[param]; + var value; + if (index==self) { + value=source; + } + else if (index==sourceData) { + extracted[param]=source.toArray(); + continue; + } + else { + value=source[index]; + } + if (value===null || value===undefined) { + extracted[param]=undefined; + } + else { + value=specialProcessor.unpack(param, value); + var map; + if (specialProcessor.isComplexType(param)) { + map=mappings[param][fromHostMap]; + if (specialProcessor.preserveNesting(param)) { + extracted[param]=extractArguments(value, map); + } + else { + extractArguments(value, map, extracted); + } + } + else { + if (OSF.DDA.ListType.isListType(param)) { + map={}; + var entryDescriptor=OSF.DDA.ListType.getDescriptor(param); + map[entryDescriptor]=self; + var extractedValues=new Array(value.length); + for (var item in value) { + extractedValues[item]=extractArguments(value[item], map); + } + extracted[param]=extractedValues; + } + else { + extracted[param]=value; + } + } + } + } + return extracted; + } + ; + function applyMap(mapName, preimage, mapping) { + var parameters=mappings[mapName][mapping]; + var image; + if (mapping=="toHost") { + var imageSet=mapValues(preimage, mapping); + image=generateArguments(imageSet, parameters); + } + else if (mapping=="fromHost") { + var argumentSet=extractArguments(preimage, parameters); + image=mapValues(argumentSet, mapping); + } + return image; + } + ; + if (!mappings) { + mappings={}; + } + this.addMapping=function (mapName, description) { + var toHost, fromHost; + if (description.map) { + toHost=description.map; + fromHost={}; + for (var preimage in toHost) { + var image=toHost[preimage]; + if (image==self) { + image=preimage; + } + fromHost[image]=preimage; + } + } + else { + toHost=description.toHost; + fromHost=description.fromHost; + } + var pair=mappings[mapName]; + if (pair) { + var currMap=pair[toHostMap]; + for (var th in currMap) + toHost[th]=currMap[th]; + currMap=pair[fromHostMap]; + for (var fh in currMap) + fromHost[fh]=currMap[fh]; + } + else { + pair=mappings[mapName]={}; + } + pair[toHostMap]=toHost; + pair[fromHostMap]=fromHost; + }; + this.toHost=function (mapName, preimage) { return applyMap(mapName, preimage, toHostMap); }; + this.fromHost=function (mapName, image) { return applyMap(mapName, image, fromHostMap); }; + this.self=self; + this.sourceData=sourceData; + this.addComplexType=function (ct) { specialProcessor.addComplexType(ct); }; + this.getDynamicType=function (dt) { return specialProcessor.getDynamicType(dt); }; + this.setDynamicType=function (dt, handler) { specialProcessor.setDynamicType(dt, handler); }; + this.dynamicTypes=dynamicTypes; + this.doMapValues=function (preimageSet, mapping) { return mapValues(preimageSet, mapping); }; +}; +OSF.DDA.SpecialProcessor=function (complexTypes, dynamicTypes) { + this.addComplexType=function OSF_DDA_SpecialProcessor$addComplexType(ct) { + complexTypes.push(ct); + }; + this.getDynamicType=function OSF_DDA_SpecialProcessor$getDynamicType(dt) { + return dynamicTypes[dt]; + }; + this.setDynamicType=function OSF_DDA_SpecialProcessor$setDynamicType(dt, handler) { + dynamicTypes[dt]=handler; + }; + this.isComplexType=function OSF_DDA_SpecialProcessor$isComplexType(t) { + return OSF.OUtil.listContainsValue(complexTypes, t); + }; + this.isDynamicType=function OSF_DDA_SpecialProcessor$isDynamicType(p) { + return OSF.OUtil.listContainsKey(dynamicTypes, p); + }; + this.preserveNesting=function OSF_DDA_SpecialProcessor$preserveNesting(p) { + var pn=[]; + if (OSF.DDA.PropertyDescriptors) + pn.push(OSF.DDA.PropertyDescriptors.Subset); + if (OSF.DDA.DataNodeEventProperties) { + pn=pn.concat([ + OSF.DDA.DataNodeEventProperties.OldNode, + OSF.DDA.DataNodeEventProperties.NewNode, + OSF.DDA.DataNodeEventProperties.NextSiblingNode + ]); + } + return OSF.OUtil.listContainsValue(pn, p); + }; + this.pack=function OSF_DDA_SpecialProcessor$pack(param, arg) { + var value; + if (this.isDynamicType(param)) { + value=dynamicTypes[param].toHost(arg); + } + else { + value=arg; + } + return value; + }; + this.unpack=function OSF_DDA_SpecialProcessor$unpack(param, arg) { + var value; + if (this.isDynamicType(param)) { + value=dynamicTypes[param].fromHost(arg); + } + else { + value=arg; + } + return value; + }; +}; +OSF.DDA.getDecoratedParameterMap=function (specialProcessor, initialDefs) { + var parameterMap=new OSF.DDA.HostParameterMap(specialProcessor); + var self=parameterMap.self; + function createObject(properties) { + var obj=null; + if (properties) { + obj={}; + var len=properties.length; + for (var i=0; i < len; i++) { + obj[properties[i].name]=properties[i].value; + } + } + return obj; + } + parameterMap.define=function define(definition) { + var args={}; + var toHost=createObject(definition.toHost); + if (definition.invertible) { + args.map=toHost; + } + else if (definition.canonical) { + args.toHost=args.fromHost=toHost; + } + else { + args.toHost=toHost; + args.fromHost=createObject(definition.fromHost); + } + parameterMap.addMapping(definition.type, args); + if (definition.isComplexType) + parameterMap.addComplexType(definition.type); + }; + for (var id in initialDefs) + parameterMap.define(initialDefs[id]); + return parameterMap; +}; +OSF.OUtil.setNamespace("DispIdHost", OSF.DDA); +OSF.DDA.DispIdHost.Methods={ + InvokeMethod: "invokeMethod", + AddEventHandler: "addEventHandler", + RemoveEventHandler: "removeEventHandler", + OpenDialog: "openDialog", + CloseDialog: "closeDialog", + MessageParent: "messageParent", + SendMessage: "sendMessage" +}; +OSF.DDA.DispIdHost.Delegates={ + ExecuteAsync: "executeAsync", + RegisterEventAsync: "registerEventAsync", + UnregisterEventAsync: "unregisterEventAsync", + ParameterMap: "parameterMap", + OpenDialog: "openDialog", + CloseDialog: "closeDialog", + MessageParent: "messageParent", + SendMessage: "sendMessage" +}; +OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, parameterMap) { + var dispIdMap={}; + var jsom=OSF.DDA.AsyncMethodNames; + var did=OSF.DDA.MethodDispId; + var methodMap={ + "GoToByIdAsync": did.dispidNavigateToMethod, + "GetSelectedDataAsync": did.dispidGetSelectedDataMethod, + "SetSelectedDataAsync": did.dispidSetSelectedDataMethod, + "GetDocumentCopyChunkAsync": did.dispidGetDocumentCopyChunkMethod, + "ReleaseDocumentCopyAsync": did.dispidReleaseDocumentCopyMethod, + "GetDocumentCopyAsync": did.dispidGetDocumentCopyMethod, + "AddFromSelectionAsync": did.dispidAddBindingFromSelectionMethod, + "AddFromPromptAsync": did.dispidAddBindingFromPromptMethod, + "AddFromNamedItemAsync": did.dispidAddBindingFromNamedItemMethod, + "GetAllAsync": did.dispidGetAllBindingsMethod, + "GetByIdAsync": did.dispidGetBindingMethod, + "ReleaseByIdAsync": did.dispidReleaseBindingMethod, + "GetDataAsync": did.dispidGetBindingDataMethod, + "SetDataAsync": did.dispidSetBindingDataMethod, + "AddRowsAsync": did.dispidAddRowsMethod, + "AddColumnsAsync": did.dispidAddColumnsMethod, + "DeleteAllDataValuesAsync": did.dispidClearAllRowsMethod, + "RefreshAsync": did.dispidLoadSettingsMethod, + "SaveAsync": did.dispidSaveSettingsMethod, + "GetActiveViewAsync": did.dispidGetActiveViewMethod, + "GetFilePropertiesAsync": did.dispidGetFilePropertiesMethod, + "GetOfficeThemeAsync": did.dispidGetOfficeThemeMethod, + "GetDocumentThemeAsync": did.dispidGetDocumentThemeMethod, + "ClearFormatsAsync": did.dispidClearFormatsMethod, + "SetTableOptionsAsync": did.dispidSetTableOptionsMethod, + "SetFormatsAsync": did.dispidSetFormatsMethod, + "GetAccessTokenAsync": did.dispidGetAccessTokenMethod, + "ExecuteRichApiRequestAsync": did.dispidExecuteRichApiRequestMethod, + "AppCommandInvocationCompletedAsync": did.dispidAppCommandInvocationCompletedMethod, + "CloseContainerAsync": did.dispidCloseContainerMethod, + "AddDataPartAsync": did.dispidAddDataPartMethod, + "GetDataPartByIdAsync": did.dispidGetDataPartByIdMethod, + "GetDataPartsByNameSpaceAsync": did.dispidGetDataPartsByNamespaceMethod, + "GetPartXmlAsync": did.dispidGetDataPartXmlMethod, + "GetPartNodesAsync": did.dispidGetDataPartNodesMethod, + "DeleteDataPartAsync": did.dispidDeleteDataPartMethod, + "GetNodeValueAsync": did.dispidGetDataNodeValueMethod, + "GetNodeXmlAsync": did.dispidGetDataNodeXmlMethod, + "GetRelativeNodesAsync": did.dispidGetDataNodesMethod, + "SetNodeValueAsync": did.dispidSetDataNodeValueMethod, + "SetNodeXmlAsync": did.dispidSetDataNodeXmlMethod, + "AddDataPartNamespaceAsync": did.dispidAddDataNamespaceMethod, + "GetDataPartNamespaceAsync": did.dispidGetDataUriByPrefixMethod, + "GetDataPartPrefixAsync": did.dispidGetDataPrefixByUriMethod, + "GetNodeTextAsync": did.dispidGetDataNodeTextMethod, + "SetNodeTextAsync": did.dispidSetDataNodeTextMethod, + "GetSelectedTask": did.dispidGetSelectedTaskMethod, + "GetTask": did.dispidGetTaskMethod, + "GetWSSUrl": did.dispidGetWSSUrlMethod, + "GetTaskField": did.dispidGetTaskFieldMethod, + "GetSelectedResource": did.dispidGetSelectedResourceMethod, + "GetResourceField": did.dispidGetResourceFieldMethod, + "GetProjectField": did.dispidGetProjectFieldMethod, + "GetSelectedView": did.dispidGetSelectedViewMethod, + "GetTaskByIndex": did.dispidGetTaskByIndexMethod, + "GetResourceByIndex": did.dispidGetResourceByIndexMethod, + "SetTaskField": did.dispidSetTaskFieldMethod, + "SetResourceField": did.dispidSetResourceFieldMethod, + "GetMaxTaskIndex": did.dispidGetMaxTaskIndexMethod, + "GetMaxResourceIndex": did.dispidGetMaxResourceIndexMethod, + "CreateTask": did.dispidCreateTaskMethod + }; + for (var method in methodMap) { + if (jsom[method]) { + dispIdMap[jsom[method].id]=methodMap[method]; + } + } + jsom=OSF.DDA.SyncMethodNames; + did=OSF.DDA.MethodDispId; + var asyncMethodMap={ + "MessageParent": did.dispidMessageParentMethod, + "SendMessage": did.dispidSendMessageMethod + }; + for (var method in asyncMethodMap) { + if (jsom[method]) { + dispIdMap[jsom[method].id]=asyncMethodMap[method]; + } + } + jsom=Microsoft.Office.WebExtension.EventType; + did=OSF.DDA.EventDispId; + var eventMap={ + "SettingsChanged": did.dispidSettingsChangedEvent, + "DocumentSelectionChanged": did.dispidDocumentSelectionChangedEvent, + "BindingSelectionChanged": did.dispidBindingSelectionChangedEvent, + "BindingDataChanged": did.dispidBindingDataChangedEvent, + "ActiveViewChanged": did.dispidActiveViewChangedEvent, + "OfficeThemeChanged": did.dispidOfficeThemeChangedEvent, + "DocumentThemeChanged": did.dispidDocumentThemeChangedEvent, + "AppCommandInvoked": did.dispidAppCommandInvokedEvent, + "DialogMessageReceived": did.dispidDialogMessageReceivedEvent, + "DialogParentMessageReceived": did.dispidDialogParentMessageReceivedEvent, + "ObjectDeleted": did.dispidObjectDeletedEvent, + "ObjectSelectionChanged": did.dispidObjectSelectionChangedEvent, + "ObjectDataChanged": did.dispidObjectDataChangedEvent, + "ContentControlAdded": did.dispidContentControlAddedEvent, + "RichApiMessage": did.dispidRichApiMessageEvent, + "ItemChanged": did.dispidOlkItemSelectedChangedEvent, + "RecipientsChanged": did.dispidOlkRecipientsChangedEvent, + "AppointmentTimeChanged": did.dispidOlkAppointmentTimeChangedEvent, + "TaskSelectionChanged": did.dispidTaskSelectionChangedEvent, + "ResourceSelectionChanged": did.dispidResourceSelectionChangedEvent, + "ViewSelectionChanged": did.dispidViewSelectionChangedEvent, + "DataNodeInserted": did.dispidDataNodeAddedEvent, + "DataNodeReplaced": did.dispidDataNodeReplacedEvent, + "DataNodeDeleted": did.dispidDataNodeDeletedEvent + }; + for (var event in eventMap) { + if (jsom[event]) { + dispIdMap[jsom[event]]=eventMap[event]; + } + } + function IsObjectEvent(dispId) { + return (dispId==OSF.DDA.EventDispId.dispidObjectDeletedEvent || + dispId==OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent || + dispId==OSF.DDA.EventDispId.dispidObjectDataChangedEvent || + dispId==OSF.DDA.EventDispId.dispidContentControlAddedEvent); + } + function onException(ex, asyncMethodCall, suppliedArgs, callArgs) { + if (typeof ex=="number") { + if (!callArgs) { + callArgs=asyncMethodCall.getCallArgs(suppliedArgs); + } + OSF.DDA.issueAsyncResult(callArgs, ex, OSF.DDA.ErrorCodeManager.getErrorArgs(ex)); + } + else { + throw ex; + } + } + ; + this[OSF.DDA.DispIdHost.Methods.InvokeMethod]=function OSF_DDA_DispIdHost_Facade$InvokeMethod(method, suppliedArguments, caller, privateState) { + var callArgs; + try { + var methodName=method.id; + var asyncMethodCall=OSF.DDA.AsyncMethodCalls[methodName]; + callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, privateState); + var dispId=dispIdMap[methodName]; + var delegate=getDelegateMethods(methodName); + var richApiInExcelMethodSubstitution=null; + if (window.Excel && window.Office.context.requirements.isSetSupported("RedirectV1Api")) { + window.Excel._RedirectV1APIs=true; + } + if (window.Excel && window.Excel._RedirectV1APIs && (richApiInExcelMethodSubstitution=window.Excel._V1APIMap[methodName])) { + var preprocessedCallArgs=OSF.OUtil.shallowCopy(callArgs); + delete preprocessedCallArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; + if (richApiInExcelMethodSubstitution.preprocess) { + preprocessedCallArgs=richApiInExcelMethodSubstitution.preprocess(preprocessedCallArgs); + } + var ctx=new window.Excel.RequestContext(); + var result=richApiInExcelMethodSubstitution.call(ctx, preprocessedCallArgs); + ctx.sync() + .then(function () { + var response=result.value; + var status=response.status; + delete response["status"]; + delete response["@odata.type"]; + if (richApiInExcelMethodSubstitution.postprocess) { + response=richApiInExcelMethodSubstitution.postprocess(response, preprocessedCallArgs); + } + if (status !=0) { + response=OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, response); + })["catch"](function (error) { + OSF.DDA.issueAsyncResult(callArgs, OSF.DDA.ErrorCodeManager.errorCodes.ooeFailure, null); + }); + } + else { + var hostCallArgs; + if (parameterMap.toHost) { + hostCallArgs=parameterMap.toHost(dispId, callArgs); + } + else { + hostCallArgs=callArgs; + } + var startTime=(new Date()).getTime(); + delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ + "dispId": dispId, + "hostCallArgs": hostCallArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { }, + "onComplete": function (status, hostResponseArgs) { + var responseArgs; + if (status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (parameterMap.fromHost) { + responseArgs=parameterMap.fromHost(dispId, hostResponseArgs); + } + else { + responseArgs=hostResponseArgs; + } + } + else { + responseArgs=hostResponseArgs; + } + var payload=asyncMethodCall.processResponse(status, responseArgs, caller, callArgs); + OSF.DDA.issueAsyncResult(callArgs, status, payload); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(dispId, hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); + } + } + }); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.AddEventHandler]=function OSF_DDA_DispIdHost_Facade$AddEventHandler(suppliedArguments, eventDispatch, caller, isPopupWindow) { + var callArgs; + var eventType, handler; + var isObjectEvent=false; + function onEnsureRegistration(status) { + if (status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + var added=!isObjectEvent ? eventDispatch.addEventHandler(eventType, handler) : + eventDispatch.addObjectEventHandler(eventType, callArgs[Microsoft.Office.WebExtension.Parameters.Id], handler); + if (!added) { + status=OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed; + } + } + var error; + if (status !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + error=OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, error); + } + try { + var asyncMethodCall=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id]; + callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + eventType=callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + handler=callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + if (isPopupWindow) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + return; + } + var dispId=dispIdMap[eventType]; + isObjectEvent=IsObjectEvent(dispId); + var targetId=(isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); + var count=isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId) : eventDispatch.getEventHandlerCount(eventType); + if (count==0) { + var invoker=getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; + invoker({ + "eventType": eventType, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration, + "onEvent": function handleEvent(hostArgs) { + var args=parameterMap.fromHost(dispId, hostArgs); + if (!isObjectEvent) + eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType, caller, args)); + else + eventDispatch.fireObjectEvent(targetId, OSF.DDA.OMFactory.manufactureEventArgs(eventType, targetId, args)); + } + }); + } + else { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]=function OSF_DDA_DispIdHost_Facade$RemoveEventHandler(suppliedArguments, eventDispatch, caller) { + var callArgs; + var eventType, handler; + var isObjectEvent=false; + function onEnsureRegistration(status) { + var error; + if (status !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + error=OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + OSF.DDA.issueAsyncResult(callArgs, status, error); + } + try { + var asyncMethodCall=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id]; + callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + eventType=callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + handler=callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + var dispId=dispIdMap[eventType]; + isObjectEvent=IsObjectEvent(dispId); + var targetId=(isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); + var status, removeSuccess; + if (handler===null) { + removeSuccess=isObjectEvent ? eventDispatch.clearObjectEventHandlers(eventType, targetId) : eventDispatch.clearEventHandlers(eventType); + status=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; + } + else { + removeSuccess=isObjectEvent ? eventDispatch.removeObjectEventHandler(eventType, targetId, handler) : eventDispatch.removeEventHandler(eventType, handler); + status=removeSuccess ? OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess : OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist; + } + var count=isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId) : eventDispatch.getEventHandlerCount(eventType); + if (removeSuccess && count==0) { + var invoker=getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; + invoker({ + "eventType": eventType, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration + }); + } + else { + onEnsureRegistration(status); + } + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.OpenDialog]=function OSF_DDA_DispIdHost_Facade$OpenDialog(suppliedArguments, eventDispatch, caller) { + var callArgs; + var targetId; + var dialogMessageEvent=Microsoft.Office.WebExtension.EventType.DialogMessageReceived; + var dialogOtherEvent=Microsoft.Office.WebExtension.EventType.DialogEventReceived; + function onEnsureRegistration(status) { + var payload; + if (status !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + payload=OSF.DDA.ErrorCodeManager.getErrorArgs(status); + } + else { + var onSucceedArgs={}; + onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Id]=targetId; + onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Data]=eventDispatch; + var payload=asyncMethodCall.processResponse(status, onSucceedArgs, caller, callArgs); + OSF.DialogShownStatus.hasDialogShown=true; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + } + OSF.DDA.issueAsyncResult(callArgs, status, payload); + } + try { + if (dialogMessageEvent==undefined || dialogOtherEvent==undefined) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported); + } + if (OSF.DDA.AsyncMethodNames.DisplayDialogAsync==null) { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + return; + } + var asyncMethodCall=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id]; + callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + var dispId=dispIdMap[dialogMessageEvent]; + var delegateMethods=getDelegateMethods(dialogMessageEvent); + var invoker=delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] !=undefined ? + delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] : + delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; + targetId=JSON.stringify(callArgs); + if (!OSF.DialogShownStatus.hasDialogShown) { + eventDispatch.clearQueuedEvent(dialogMessageEvent); + eventDispatch.clearQueuedEvent(dialogOtherEvent); + eventDispatch.clearQueuedEvent(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived); + } + invoker({ + "eventType": dialogMessageEvent, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": onEnsureRegistration, + "onEvent": function handleEvent(hostArgs) { + var args=parameterMap.fromHost(dispId, hostArgs); + var event=OSF.DDA.OMFactory.manufactureEventArgs(dialogMessageEvent, caller, args); + if (event.type==dialogOtherEvent) { + var payload=OSF.DDA.ErrorCodeManager.getErrorArgs(event.error); + var errorArgs={}; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=payload.message || payload; + event.error=new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message], errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]); + } + eventDispatch.fireOrQueueEvent(event); + if (args[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogClosed) { + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + eventDispatch.clearEventHandlers(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived); + OSF.DialogShownStatus.hasDialogShown=false; + } + } + }); + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + }; + this[OSF.DDA.DispIdHost.Methods.CloseDialog]=function OSF_DDA_DispIdHost_Facade$CloseDialog(suppliedArguments, targetId, eventDispatch, caller) { + var callArgs; + var dialogMessageEvent, dialogOtherEvent; + var closeStatus=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; + function closeCallback(status) { + closeStatus=status; + OSF.DialogShownStatus.hasDialogShown=false; + } + try { + var asyncMethodCall=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id]; + callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); + dialogMessageEvent=Microsoft.Office.WebExtension.EventType.DialogMessageReceived; + dialogOtherEvent=Microsoft.Office.WebExtension.EventType.DialogEventReceived; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + var dispId=dispIdMap[dialogMessageEvent]; + var delegateMethods=getDelegateMethods(dialogMessageEvent); + var invoker=delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] !=undefined ? + delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] : + delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; + invoker({ + "eventType": dialogMessageEvent, + "dispId": dispId, + "targetId": targetId, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, + "onComplete": closeCallback + }); + } + catch (ex) { + onException(ex, asyncMethodCall, suppliedArguments, callArgs); + } + if (closeStatus !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed, OSF.DDA.AsyncMethodNames.CloseAsync.displayName, closeStatus); + } + }; + this[OSF.DDA.DispIdHost.Methods.MessageParent]=function OSF_DDA_DispIdHost_Facade$MessageParent(suppliedArguments, caller) { + var stateInfo={}; + var syncMethodCall=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id]; + var callArgs=syncMethodCall.verifyAndExtractCall(suppliedArguments, caller, stateInfo); + var delegate=getDelegateMethods(OSF.DDA.SyncMethodNames.MessageParent.id); + var invoker=delegate[OSF.DDA.DispIdHost.Delegates.MessageParent]; + var dispId=dispIdMap[OSF.DDA.SyncMethodNames.MessageParent.id]; + return invoker({ + "dispId": dispId, + "hostCallArgs": callArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); } + }); + }; + this[OSF.DDA.DispIdHost.Methods.SendMessage]=function OSF_DDA_DispIdHost_Facade$SendMessage(suppliedArguments, eventDispatch, caller) { + var stateInfo={}; + var syncMethodCall=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.SendMessage.id]; + var callArgs=syncMethodCall.verifyAndExtractCall(suppliedArguments, caller, stateInfo); + var delegate=getDelegateMethods(OSF.DDA.SyncMethodNames.SendMessage.id); + var invoker=delegate[OSF.DDA.DispIdHost.Delegates.SendMessage]; + var dispId=dispIdMap[OSF.DDA.SyncMethodNames.SendMessage.id]; + return invoker({ + "dispId": dispId, + "hostCallArgs": callArgs, + "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, + "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); } + }); + }; +}; +OSF.DDA.DispIdHost.addAsyncMethods=function OSF_DDA_DispIdHost$AddAsyncMethods(target, asyncMethodNames, privateState) { + for (var entry in asyncMethodNames) { + var method=asyncMethodNames[entry]; + var name=method.displayName; + if (!target[name]) { + OSF.OUtil.defineEnumerableProperty(target, name, { + value: (function (asyncMethod) { + return function () { + var invokeMethod=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod]; + invokeMethod(asyncMethod, arguments, target, privateState); + }; + })(method) + }); + } + } +}; +OSF.DDA.DispIdHost.addEventSupport=function OSF_DDA_DispIdHost$AddEventSupport(target, eventDispatch, isPopupWindow) { + var add=OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName; + var remove=OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName; + if (!target[add]) { + OSF.OUtil.defineEnumerableProperty(target, add, { + value: function () { + var addEventHandler=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler]; + addEventHandler(arguments, eventDispatch, target, isPopupWindow); + } + }); + } + if (!target[remove]) { + OSF.OUtil.defineEnumerableProperty(target, remove, { + value: function () { + var removeEventHandler=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]; + removeEventHandler(arguments, eventDispatch, target); + } + }); + } +}; +var OfficeExt; +(function (OfficeExt) { + var MsAjaxTypeHelper=(function () { + function MsAjaxTypeHelper() { + } + MsAjaxTypeHelper.isInstanceOfType=function (type, instance) { + if (typeof (instance)==="undefined" || instance===null) + return false; + if (instance instanceof type) + return true; + var instanceType=instance.constructor; + if (!instanceType || (typeof (instanceType) !=="function") || !instanceType.__typeName || instanceType.__typeName==='Object') { + instanceType=Object; + } + return !!(instanceType===type) || + (instanceType.__typeName && type.__typeName && instanceType.__typeName===type.__typeName); + }; + return MsAjaxTypeHelper; + })(); + OfficeExt.MsAjaxTypeHelper=MsAjaxTypeHelper; + var MsAjaxError=(function () { + function MsAjaxError() { + } + MsAjaxError.create=function (message, errorInfo) { + var err=new Error(message); + err.message=message; + if (errorInfo) { + for (var v in errorInfo) { + err[v]=errorInfo[v]; + } + } + err.popStackFrame(); + return err; + }; + MsAjaxError.parameterCount=function (message) { + var displayMessage="Sys.ParameterCountException: "+(message ? message : "Parameter count mismatch."); + var err=MsAjaxError.create(displayMessage, { name: 'Sys.ParameterCountException' }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argument=function (paramName, message) { + var displayMessage="Sys.ArgumentException: "+(message ? message : "Value does not fall within the expected range."); + if (paramName) { + displayMessage+="\n"+MsAjaxString.format("Parameter name: {0}", paramName); + } + var err=MsAjaxError.create(displayMessage, { name: "Sys.ArgumentException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentNull=function (paramName, message) { + var displayMessage="Sys.ArgumentNullException: "+(message ? message : "Value cannot be null."); + if (paramName) { + displayMessage+="\n"+MsAjaxString.format("Parameter name: {0}", paramName); + } + var err=MsAjaxError.create(displayMessage, { name: "Sys.ArgumentNullException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentOutOfRange=function (paramName, actualValue, message) { + var displayMessage="Sys.ArgumentOutOfRangeException: "+(message ? message : "Specified argument was out of the range of valid values."); + if (paramName) { + displayMessage+="\n"+MsAjaxString.format("Parameter name: {0}", paramName); + } + if (typeof (actualValue) !=="undefined" && actualValue !==null) { + displayMessage+="\n"+MsAjaxString.format("Actual value was {0}.", actualValue); + } + var err=MsAjaxError.create(displayMessage, { + name: "Sys.ArgumentOutOfRangeException", + paramName: paramName, + actualValue: actualValue + }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentType=function (paramName, actualType, expectedType, message) { + var displayMessage="Sys.ArgumentTypeException: "; + if (message) { + displayMessage+=message; + } + else if (actualType && expectedType) { + displayMessage+=MsAjaxString.format("Object of type '{0}' cannot be converted to type '{1}'.", actualType.getName ? actualType.getName() : actualType, expectedType.getName ? expectedType.getName() : expectedType); + } + else { + displayMessage+="Object cannot be converted to the required type."; + } + if (paramName) { + displayMessage+="\n"+MsAjaxString.format("Parameter name: {0}", paramName); + } + var err=MsAjaxError.create(displayMessage, { + name: "Sys.ArgumentTypeException", + paramName: paramName, + actualType: actualType, + expectedType: expectedType + }); + err.popStackFrame(); + return err; + }; + MsAjaxError.argumentUndefined=function (paramName, message) { + var displayMessage="Sys.ArgumentUndefinedException: "+(message ? message : "Value cannot be undefined."); + if (paramName) { + displayMessage+="\n"+MsAjaxString.format("Parameter name: {0}", paramName); + } + var err=MsAjaxError.create(displayMessage, { name: "Sys.ArgumentUndefinedException", paramName: paramName }); + err.popStackFrame(); + return err; + }; + MsAjaxError.invalidOperation=function (message) { + var displayMessage="Sys.InvalidOperationException: "+(message ? message : "Operation is not valid due to the current state of the object."); + var err=MsAjaxError.create(displayMessage, { name: 'Sys.InvalidOperationException' }); + err.popStackFrame(); + return err; + }; + return MsAjaxError; + })(); + OfficeExt.MsAjaxError=MsAjaxError; + var MsAjaxString=(function () { + function MsAjaxString() { + } + MsAjaxString.format=function (format) { + var args=[]; + for (var _i=1; _i < arguments.length; _i++) { + args[_i - 1]=arguments[_i]; + } + var source=format; + return source.replace(/{(\d+)}/gm, function (match, number) { + var index=parseInt(number, 10); + return args[index]===undefined ? '{'+number+'}' : args[index]; + }); + }; + MsAjaxString.startsWith=function (str, prefix) { + return (str.substr(0, prefix.length)===prefix); + }; + return MsAjaxString; + })(); + OfficeExt.MsAjaxString=MsAjaxString; + var MsAjaxDebug=(function () { + function MsAjaxDebug() { + } + MsAjaxDebug.trace=function (text) { + if (typeof Debug !=="undefined" && Debug.writeln) + Debug.writeln(text); + if (window.console && window.console.log) + window.console.log(text); + if (window.opera && window.opera.postError) + window.opera.postError(text); + if (window.debugService && window.debugService.trace) + window.debugService.trace(text); + var a=document.getElementById("TraceConsole"); + if (a && a.tagName.toUpperCase()==="TEXTAREA") { + a.innerHTML+=text+"\n"; + } + }; + return MsAjaxDebug; + })(); + OfficeExt.MsAjaxDebug=MsAjaxDebug; + if (!OsfMsAjaxFactory.isMsAjaxLoaded()) { + var registerTypeInternal=function registerTypeInternal(type, name, isClass) { + if (type.__typeName===undefined) { + type.__typeName=name; + } + if (type.__class===undefined) { + type.__class=isClass; + } + }; + registerTypeInternal(Function, "Function", true); + registerTypeInternal(Error, "Error", true); + registerTypeInternal(Object, "Object", true); + registerTypeInternal(String, "String", true); + registerTypeInternal(Boolean, "Boolean", true); + registerTypeInternal(Date, "Date", true); + registerTypeInternal(Number, "Number", true); + registerTypeInternal(RegExp, "RegExp", true); + registerTypeInternal(Array, "Array", true); + if (!Function.createCallback) { + Function.createCallback=function Function$createCallback(method, context) { + var e=Function._validateParams(arguments, [ + { name: "method", type: Function }, + { name: "context", mayBeNull: true } + ]); + if (e) + throw e; + return function () { + var l=arguments.length; + if (l > 0) { + var args=[]; + for (var i=0; i < l; i++) { + args[i]=arguments[i]; + } + args[l]=context; + return method.apply(this, args); + } + return method.call(this, context); + }; + }; + } + if (!Function.createDelegate) { + Function.createDelegate=function Function$createDelegate(instance, method) { + var e=Function._validateParams(arguments, [ + { name: "instance", mayBeNull: true }, + { name: "method", type: Function } + ]); + if (e) + throw e; + return function () { + return method.apply(instance, arguments); + }; + }; + } + if (!Function._validateParams) { + Function._validateParams=function (params, expectedParams, validateParameterCount) { + var e, expectedLength=expectedParams.length; + validateParameterCount=validateParameterCount || (typeof (validateParameterCount)==="undefined"); + e=Function._validateParameterCount(params, expectedParams, validateParameterCount); + if (e) { + e.popStackFrame(); + return e; + } + for (var i=0, l=params.length; i < l; i++) { + var expectedParam=expectedParams[Math.min(i, expectedLength - 1)], paramName=expectedParam.name; + if (expectedParam.parameterArray) { + paramName+="["+(i - expectedLength+1)+"]"; + } + else if (!validateParameterCount && (i >=expectedLength)) { + break; + } + e=Function._validateParameter(params[i], expectedParam, paramName); + if (e) { + e.popStackFrame(); + return e; + } + } + return null; + }; + } + if (!Function._validateParameterCount) { + Function._validateParameterCount=function (params, expectedParams, validateParameterCount) { + var i, error, expectedLen=expectedParams.length, actualLen=params.length; + if (actualLen < expectedLen) { + var minParams=expectedLen; + for (i=0; i < expectedLen; i++) { + var param=expectedParams[i]; + if (param.optional || param.parameterArray) { + minParams--; + } + } + if (actualLen < minParams) { + error=true; + } + } + else if (validateParameterCount && (actualLen > expectedLen)) { + error=true; + for (i=0; i < expectedLen; i++) { + if (expectedParams[i].parameterArray) { + error=false; + break; + } + } + } + if (error) { + var e=MsAjaxError.parameterCount(); + e.popStackFrame(); + return e; + } + return null; + }; + } + if (!Function._validateParameter) { + Function._validateParameter=function (param, expectedParam, paramName) { + var e, expectedType=expectedParam.type, expectedInteger=!!expectedParam.integer, expectedDomElement=!!expectedParam.domElement, mayBeNull=!!expectedParam.mayBeNull; + e=Function._validateParameterType(param, expectedType, expectedInteger, expectedDomElement, mayBeNull, paramName); + if (e) { + e.popStackFrame(); + return e; + } + var expectedElementType=expectedParam.elementType, elementMayBeNull=!!expectedParam.elementMayBeNull; + if (expectedType===Array && typeof (param) !=="undefined" && param !==null && + (expectedElementType || !elementMayBeNull)) { + var expectedElementInteger=!!expectedParam.elementInteger, expectedElementDomElement=!!expectedParam.elementDomElement; + for (var i=0; i < param.length; i++) { + var elem=param[i]; + e=Function._validateParameterType(elem, expectedElementType, expectedElementInteger, expectedElementDomElement, elementMayBeNull, paramName+"["+i+"]"); + if (e) { + e.popStackFrame(); + return e; + } + } + } + return null; + }; + } + if (!Function._validateParameterType) { + Function._validateParameterType=function (param, expectedType, expectedInteger, expectedDomElement, mayBeNull, paramName) { + var e, i; + if (typeof (param)==="undefined") { + if (mayBeNull) { + return null; + } + else { + e=OfficeExt.MsAjaxError.argumentUndefined(paramName); + e.popStackFrame(); + return e; + } + } + if (param===null) { + if (mayBeNull) { + return null; + } + else { + e=OfficeExt.MsAjaxError.argumentNull(paramName); + e.popStackFrame(); + return e; + } + } + if (expectedType && !OfficeExt.MsAjaxTypeHelper.isInstanceOfType(expectedType, param)) { + e=OfficeExt.MsAjaxError.argumentType(paramName, typeof (param), expectedType); + e.popStackFrame(); + return e; + } + return null; + }; + } + if (!window.Type) { + window.Type=Function; + } + if (!Type.registerNamespace) { + Type.registerNamespace=function (ns) { + var namespaceParts=ns.split('.'); + var currentNamespace=window; + for (var i=0; i < namespaceParts.length; i++) { + currentNamespace[namespaceParts[i]]=currentNamespace[namespaceParts[i]] || {}; + currentNamespace=currentNamespace[namespaceParts[i]]; + } + }; + } + if (!Type.prototype.registerClass) { + Type.prototype.registerClass=function (cls) { cls={}; }; + } + if (typeof (Sys)==="undefined") { + Type.registerNamespace('Sys'); + } + if (!Error.prototype.popStackFrame) { + Error.prototype.popStackFrame=function () { + if (arguments.length !==0) + throw MsAjaxError.parameterCount(); + if (typeof (this.stack)==="undefined" || this.stack===null || + typeof (this.fileName)==="undefined" || this.fileName===null || + typeof (this.lineNumber)==="undefined" || this.lineNumber===null) { + return; + } + var stackFrames=this.stack.split("\n"); + var currentFrame=stackFrames[0]; + var pattern=this.fileName+":"+this.lineNumber; + while (typeof (currentFrame) !=="undefined" && + currentFrame !==null && + currentFrame.indexOf(pattern)===-1) { + stackFrames.shift(); + currentFrame=stackFrames[0]; + } + var nextFrame=stackFrames[1]; + if (typeof (nextFrame)==="undefined" || nextFrame===null) { + return; + } + var nextFrameParts=nextFrame.match(/@(.*):(\d+)$/); + if (typeof (nextFrameParts)==="undefined" || nextFrameParts===null) { + return; + } + this.fileName=nextFrameParts[1]; + this.lineNumber=parseInt(nextFrameParts[2]); + stackFrames.shift(); + this.stack=stackFrames.join("\n"); + }; + } + OsfMsAjaxFactory.msAjaxError=MsAjaxError; + OsfMsAjaxFactory.msAjaxString=MsAjaxString; + OsfMsAjaxFactory.msAjaxDebug=MsAjaxDebug; + } +})(OfficeExt || (OfficeExt={})); +OSF.OUtil.setNamespace("SafeArray", OSF.DDA); +OSF.DDA.SafeArray.Response={ + Status: 0, + Payload: 1 +}; +OSF.DDA.SafeArray.UniqueArguments={ + Offset: "offset", + Run: "run", + BindingSpecificData: "bindingSpecificData", + MergedCellGuid: "{66e7831f-81b2-42e2-823c-89e872d541b3}" +}; +OSF.OUtil.setNamespace("Delegate", OSF.DDA.SafeArray); +OSF.DDA.SafeArray.Delegate._onException=function OSF_DDA_SafeArray_Delegate$OnException(ex, args) { + var status; + var statusNumber=ex.number; + if (statusNumber) { + switch (statusNumber) { + case -2146828218: + status=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; + break; + case -2147467259: + status=OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened; + break; + case -2146828283: + status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam; + break; + case -2147209089: + status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam; + break; + case -2146827850: + default: + status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + break; + } + } + if (args.onComplete) { + args.onComplete(status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + } +}; +OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod=function OSF_DDA_SafeArray_Delegate$OnExceptionSyncMethod(ex, args) { + var status; + var number=ex.number; + if (number) { + switch (number) { + case -2146828218: + status=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; + break; + case -2146827850: + default: + status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + break; + } + } + return status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; +}; +OSF.DDA.SafeArray.Delegate.SpecialProcessor=function OSF_DDA_SafeArray_Delegate_SpecialProcessor() { + function _2DVBArrayToJaggedArray(vbArr) { + var ret; + try { + var rows=vbArr.ubound(1); + var cols=vbArr.ubound(2); + vbArr=vbArr.toArray(); + if (rows==1 && cols==1) { + ret=[vbArr]; + } + else { + ret=[]; + for (var row=0; row < rows; row++) { + var rowArr=[]; + for (var col=0; col < cols; col++) { + var datum=vbArr[row * cols+col]; + if (datum !=OSF.DDA.SafeArray.UniqueArguments.MergedCellGuid) { + rowArr.push(datum); + } + } + if (rowArr.length > 0) { + ret.push(rowArr); + } + } + } + } + catch (ex) { + } + return ret; + } + var complexTypes=[]; + var dynamicTypes={}; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]=(function () { + var tableRows=0; + var tableHeaders=1; + return { + toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$toHost(data) { + if (OSF.DDA.TableDataProperties && typeof data !="string" && data[OSF.DDA.TableDataProperties.TableRows] !==undefined) { + var tableData=[]; + tableData[tableRows]=data[OSF.DDA.TableDataProperties.TableRows]; + tableData[tableHeaders]=data[OSF.DDA.TableDataProperties.TableHeaders]; + data=tableData; + } + return data; + }, + fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$fromHost(hostArgs) { + var ret; + if (hostArgs.toArray) { + var dimensions=hostArgs.dimensions(); + if (dimensions===2) { + ret=_2DVBArrayToJaggedArray(hostArgs); + } + else { + var array=hostArgs.toArray(); + if (array.length===2 && ((array[0] !=null && array[0].toArray) || (array[1] !=null && array[1].toArray))) { + ret={}; + ret[OSF.DDA.TableDataProperties.TableRows]=_2DVBArrayToJaggedArray(array[tableRows]); + ret[OSF.DDA.TableDataProperties.TableHeaders]=_2DVBArrayToJaggedArray(array[tableHeaders]); + } + else { + ret=array; + } + } + } + else { + ret=hostArgs; + } + return ret; + } + }; + })(); + OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this, complexTypes, dynamicTypes); + this.unpack=function OSF_DDA_SafeArray_Delegate_SpecialProcessor$unpack(param, arg) { + var value; + if (this.isComplexType(param) || OSF.DDA.ListType.isListType(param)) { + var toArraySupported=(arg || typeof arg==="unknown") && arg.toArray; + value=toArraySupported ? arg.toArray() : arg || {}; + } + else if (this.isDynamicType(param)) { + value=dynamicTypes[param].fromHost(arg); + } + else { + value=arg; + } + return value; + }; +}; +OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor, OSF.DDA.SpecialProcessor); +OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor(), [ + { + type: Microsoft.Office.WebExtension.Parameters.ValueFormat, + toHost: [ + { name: Microsoft.Office.WebExtension.ValueFormat.Unformatted, value: 0 }, + { name: Microsoft.Office.WebExtension.ValueFormat.Formatted, value: 1 } + ] + }, + { + type: Microsoft.Office.WebExtension.Parameters.FilterType, + toHost: [ + { name: Microsoft.Office.WebExtension.FilterType.All, value: 0 } + ] + } +]); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.AsyncResultStatus, + fromHost: [ + { name: Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded, value: 0 }, + { name: Microsoft.Office.WebExtension.AsyncResultStatus.Failed, value: 1 } + ] +}); +OSF.DDA.SafeArray.Delegate.executeAsync=function OSF_DDA_SafeArray_Delegate$ExecuteAsync(args) { + function toArray(args) { + var arrArgs=args; + if (OSF.OUtil.isArray(args)) { + var len=arrArgs.length; + for (var i=0; i < len; i++) { + arrArgs[i]=toArray(arrArgs[i]); + } + } + else if (OSF.OUtil.isDate(args)) { + arrArgs=args.getVarDate(); + } + else if (typeof args==="object" && !OSF.OUtil.isArray(args)) { + arrArgs=[]; + for (var index in args) { + if (!OSF.OUtil.isFunction(args[index])) { + arrArgs[index]=toArray(args[index]); + } + } + } + return arrArgs; + } + function fromSafeArray(value) { + var ret=value; + if (value !=null && value.toArray) { + var arrayResult=value.toArray(); + ret=new Array(arrayResult.length); + for (var i=0; i < arrayResult.length; i++) { + ret[i]=fromSafeArray(arrayResult[i]); + } + } + return ret; + } + try { + if (args.onCalling) { + args.onCalling(); + } + OSF.ClientHostController.execute(args.dispId, toArray(args.hostCallArgs), function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode) { + var result=hostResponseArgs.toArray(); + var status=result[OSF.DDA.SafeArray.Response.Status]; + if (status==OSF.DDA.ErrorCodeManager.errorCodes.ooeChunkResult) { + var payload=result[OSF.DDA.SafeArray.Response.Payload]; + payload=fromSafeArray(payload); + if (payload !=null) { + if (!args._chunkResultData) { + args._chunkResultData=new Array(); + } + args._chunkResultData[payload[0]]=payload[1]; + } + return false; + } + if (args.onReceiving) { + args.onReceiving(); + } + if (args.onComplete) { + var payload; + if (status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + if (result.length > 2) { + payload=[]; + for (var i=1; i < result.length; i++) + payload[i - 1]=result[i]; + } + else { + payload=result[OSF.DDA.SafeArray.Response.Payload]; + } + if (args._chunkResultData) { + payload=fromSafeArray(payload); + if (payload !=null) { + var expectedChunkCount=payload[payload.length - 1]; + if (args._chunkResultData.length==expectedChunkCount) { + payload[payload.length - 1]=args._chunkResultData; + } + else { + status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + } + } + } + } + else { + payload=result[OSF.DDA.SafeArray.Response.Payload]; + } + args.onComplete(status, payload); + } + return true; + }); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent=function OSF_DDA_SafeArrayDelegate$GetOnAfterRegisterEvent(register, args) { + var startTime=(new Date()).getTime(); + return function OSF_DDA_SafeArrayDelegate$OnAfterRegisterEvent(hostResponseArgs) { + if (args.onReceiving) { + args.onReceiving(); + } + var status=hostResponseArgs.toArray ? hostResponseArgs.toArray()[OSF.DDA.SafeArray.Response.Status] : hostResponseArgs; + if (args.onComplete) { + args.onComplete(status); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onRegisterDone(register, args.dispId, Math.abs((new Date()).getTime() - startTime), status); + } + }; +}; +OSF.DDA.SafeArray.Delegate.registerEventAsync=function OSF_DDA_SafeArray_Delegate$RegisterEventAsync(args) { + if (args.onCalling) { + args.onCalling(); + } + var callback=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true, args); + try { + OSF.ClientHostController.registerEvent(args.dispId, args.targetId, function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) { + if (args.onEvent) { + args.onEvent(payload); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onEventDone(args.dispId); + } + }, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate.unregisterEventAsync=function OSF_DDA_SafeArray_Delegate$UnregisterEventAsync(args) { + if (args.onCalling) { + args.onCalling(); + } + var callback=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false, args); + try { + OSF.ClientHostController.unregisterEvent(args.dispId, args.targetId, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.ClientMode={ + ReadWrite: 0, + ReadOnly: 1 +}; +OSF.DDA.RichInitializationReason={ + 1: Microsoft.Office.WebExtension.InitializationReason.Inserted, + 2: Microsoft.Office.WebExtension.InitializationReason.DocumentOpened +}; +OSF.InitializationHelper=function OSF_InitializationHelper(hostInfo, webAppState, context, settings, hostFacade) { + this._hostInfo=hostInfo; + this._webAppState=webAppState; + this._context=context; + this._settings=settings; + this._hostFacade=hostFacade; + this._initializeSettings=this.initializeSettings; +}; +OSF.InitializationHelper.prototype.deserializeSettings=function OSF_InitializationHelper$deserializeSettings(serializedSettings, refreshSupported) { + var settings; + var osfSessionStorage=OSF.OUtil.getSessionStorage(); + if (osfSessionStorage) { + var storageSettings=osfSessionStorage.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey()); + if (storageSettings) { + serializedSettings=JSON.parse(storageSettings); + } + else { + storageSettings=JSON.stringify(serializedSettings); + osfSessionStorage.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(), storageSettings); + } + } + var deserializedSettings=OSF.DDA.SettingsManager.deserializeSettings(serializedSettings); + if (refreshSupported) { + settings=new OSF.DDA.RefreshableSettings(deserializedSettings); + } + else { + settings=new OSF.DDA.Settings(deserializedSettings); + } + return settings; +}; +OSF.InitializationHelper.prototype.saveAndSetDialogInfo=function OSF_InitializationHelper$saveAndSetDialogInfo(hostInfoValue) { +}; +OSF.InitializationHelper.prototype.setAgaveHostCommunication=function OSF_InitializationHelper$setAgaveHostCommunication() { +}; +OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize=function OSF_InitializationHelper$prepareRightBeforeWebExtensionInitialize(appContext) { + this.prepareApiSurface(appContext); + Microsoft.Office.WebExtension.initialize(this.getInitializationReason(appContext)); +}; +OSF.InitializationHelper.prototype.prepareApiSurface=function OSF_InitializationHelper$prepareApiSurfaceAndInitialize(appContext) { + var license=new OSF.DDA.License(appContext.get_eToken()); + var getOfficeThemeHandler=(OSF.DDA.OfficeTheme && OSF.DDA.OfficeTheme.getOfficeTheme) ? OSF.DDA.OfficeTheme.getOfficeTheme : null; + if (appContext.get_isDialog()) { + if (OSF.DDA.UI.ChildUI) { + appContext.ui=new OSF.DDA.UI.ChildUI(); + } + } + else { + if (OSF.DDA.UI.ParentUI) { + appContext.ui=new OSF.DDA.UI.ParentUI(); + if (OfficeExt.Container) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.CloseContainerAsync]); + } + } + } + if (OSF.DDA.Auth) { + appContext.auth=new OSF.DDA.Auth(); + OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth, [OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]); + } + OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(appContext, appContext.doc, license, null, getOfficeThemeHandler)); + var getDelegateMethods, parameterMap; + getDelegateMethods=OSF.DDA.DispIdHost.getClientDelegateMethods; + parameterMap=OSF.DDA.SafeArray.Delegate.ParameterMap; + OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(getDelegateMethods, parameterMap)); +}; +OSF.InitializationHelper.prototype.getInitializationReason=function (appContext) { return OSF.DDA.RichInitializationReason[appContext.get_reason()]; }; +OSF.DDA.DispIdHost.getClientDelegateMethods=function (actionId) { + var delegateMethods={}; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.SafeArray.Delegate.executeAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.SafeArray.Delegate.registerEventAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.SafeArray.Delegate.unregisterEventAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog]=OSF.DDA.SafeArray.Delegate.openDialog; + delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog]=OSF.DDA.SafeArray.Delegate.closeDialog; + delegateMethods[OSF.DDA.DispIdHost.Delegates.MessageParent]=OSF.DDA.SafeArray.Delegate.messageParent; + delegateMethods[OSF.DDA.DispIdHost.Delegates.SendMessage]=OSF.DDA.SafeArray.Delegate.sendMessage; + if (OSF.DDA.AsyncMethodNames.RefreshAsync && actionId==OSF.DDA.AsyncMethodNames.RefreshAsync.id) { + var readSerializedSettings=function (hostCallArgs, onCalling, onReceiving) { + return OSF.DDA.ClientSettingsManager.read(onCalling, onReceiving); + }; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(readSerializedSettings); + } + if (OSF.DDA.AsyncMethodNames.SaveAsync && actionId==OSF.DDA.AsyncMethodNames.SaveAsync.id) { + var writeSerializedSettings=function (hostCallArgs, onCalling, onReceiving) { + return OSF.DDA.ClientSettingsManager.write(hostCallArgs[OSF.DDA.SettingsManager.SerializedSettings], hostCallArgs[Microsoft.Office.WebExtension.Parameters.OverwriteIfStale], onCalling, onReceiving); + }; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(writeSerializedSettings); + } + return delegateMethods; +}; +var OSF=OSF || {}; +var OSFWebView; +(function (OSFWebView) { + var WebViewSafeArray=(function () { + function WebViewSafeArray(data) { + this.data=data; + this.safeArrayFlag=this.isSafeArray(data); + } + WebViewSafeArray.prototype.dimensions=function () { + var dimensions=0; + if (this.safeArrayFlag) { + dimensions=this.data[0][0]; + } + else if (this.isArray()) { + dimensions=2; + } + return dimensions; + }; + WebViewSafeArray.prototype.getItem=function () { + var array=[]; + var element=null; + if (this.safeArrayFlag) { + array=this.toArray(); + } + else { + array=this.data; + } + element=array; + for (var i=0; i < arguments.length; i++) { + element=element[arguments[i]]; + } + return element; + }; + WebViewSafeArray.prototype.lbound=function (dimension) { + return 0; + }; + WebViewSafeArray.prototype.ubound=function (dimension) { + var ubound=0; + if (this.safeArrayFlag) { + ubound=this.data[0][dimension]; + } + else if (this.isArray()) { + if (dimension==1) { + return this.data.length; + } + else if (dimension==2) { + if (OSF.OUtil.isArray(this.data[0])) { + return this.data[0].length; + } + else if (this.data[0] !=null) { + return 1; + } + } + } + return ubound; + }; + WebViewSafeArray.prototype.toArray=function () { + if (this.isArray()==false) { + return this.data; + } + var arr=[]; + var startingIndex=this.safeArrayFlag ? 1 : 0; + for (var i=startingIndex; i < this.data.length; i++) { + var element=this.data[i]; + if (this.isSafeArray(element)) { + arr.push(new WebViewSafeArray(element)); + } + else { + arr.push(element); + } + } + return arr; + }; + WebViewSafeArray.prototype.isArray=function () { + return OSF.OUtil.isArray(this.data); + }; + WebViewSafeArray.prototype.isSafeArray=function (obj) { + var isSafeArray=false; + if (OSF.OUtil.isArray(obj) && OSF.OUtil.isArray(obj[0])) { + var bounds=obj[0]; + var dimensions=bounds[0]; + if (bounds.length !=dimensions+1) { + return false; + } + var expectedArraySize=1; + for (var i=1; i < bounds.length; i++) { + var dimension=bounds[i]; + if (isFinite(dimension)==false) { + return false; + } + expectedArraySize=expectedArraySize * dimension; + } + expectedArraySize++; + isSafeArray=(expectedArraySize==obj.length); + } + return isSafeArray; + }; + return WebViewSafeArray; + })(); + OSFWebView.WebViewSafeArray=WebViewSafeArray; +})(OSFWebView || (OSFWebView={})); +var OSFWebView; +(function (OSFWebView) { + var ScriptMessaging; + (function (ScriptMessaging) { + var scriptMessenger=null; + function agaveHostCallback(callbackId, params) { + scriptMessenger.agaveHostCallback(callbackId, params); + } + ScriptMessaging.agaveHostCallback=agaveHostCallback; + function agaveHostEventCallback(callbackId, params) { + scriptMessenger.agaveHostEventCallback(callbackId, params); + } + ScriptMessaging.agaveHostEventCallback=agaveHostEventCallback; + function GetScriptMessenger(agaveHostCallbackName, agaveHostEventCallbackName, poster) { + if (scriptMessenger==null) { + scriptMessenger=new Messenger(agaveHostCallbackName, agaveHostEventCallbackName, poster); + } + return scriptMessenger; + } + ScriptMessaging.GetScriptMessenger=GetScriptMessenger; + var EventHandlerCallback=(function () { + function EventHandlerCallback(id, targetId, handler) { + this.id=id; + this.targetId=targetId; + this.handler=handler; + } + return EventHandlerCallback; + })(); + var Messenger=(function () { + function Messenger(methodCallbackName, eventCallbackName, messagePoster) { + this.callingIndex=0; + this.callbackList={}; + this.eventHandlerList={}; + this.asyncMethodCallbackFunctionName=methodCallbackName; + this.eventCallbackFunctionName=eventCallbackName; + this.poster=messagePoster; + this.conversationId=Messenger.getCurrentTimeMS().toString(); + } + Messenger.prototype.invokeMethod=function (handlerName, methodId, params, callback) { + var messagingArgs={}; + this.postMessage(messagingArgs, handlerName, methodId, params, callback); + }; + Messenger.prototype.registerEvent=function (handlerName, methodId, dispId, targetId, handler, callback) { + var messagingArgs={ + eventCallbackFunction: this.eventCallbackFunctionName + }; + var hostArgs={ + id: dispId, + targetId: targetId + }; + var correlationId=this.postMessage(messagingArgs, handlerName, methodId, hostArgs, callback); + this.eventHandlerList[correlationId]=new EventHandlerCallback(dispId, targetId, handler); + }; + Messenger.prototype.unregisterEvent=function (handlerName, methodId, dispId, targetId, callback) { + var hostArgs={ + id: dispId, + targetId: targetId + }; + for (var key in this.eventHandlerList) { + if (this.eventHandlerList.hasOwnProperty(key)) { + var eventCallback=this.eventHandlerList[key]; + if (eventCallback.id==dispId && eventCallback.targetId==targetId) { + delete this.eventHandlerList[key]; + } + } + } + this.invokeMethod(handlerName, methodId, hostArgs, callback); + }; + Messenger.prototype.agaveHostCallback=function (callbackId, params) { + var callbackFunction=this.callbackList[callbackId]; + if (callbackFunction) { + var callbacksDone=callbackFunction(params); + if (callbacksDone===undefined || callbacksDone===true) { + delete this.callbackList[callbackId]; + } + } + }; + Messenger.prototype.agaveHostEventCallback=function (callbackId, params) { + var eventCallback=this.eventHandlerList[callbackId]; + if (eventCallback) { + eventCallback.handler(params); + } + }; + Messenger.prototype.postMessage=function (messagingArgs, handlerName, methodId, params, callback) { + var correlationId=this.generateCorrelationId(); + this.callbackList[correlationId]=callback; + messagingArgs.methodId=methodId; + messagingArgs.params=params; + messagingArgs.callbackId=correlationId; + messagingArgs.callbackFunction=this.asyncMethodCallbackFunctionName; + this.poster.postMessage(handlerName, JSON.stringify(messagingArgs)); + return correlationId; + }; + Messenger.prototype.generateCorrelationId=function () { +++this.callingIndex; + return this.conversationId+this.callingIndex; + }; + Messenger.getCurrentTimeMS=function () { + return (new Date).getTime(); + }; + Messenger.MESSAGE_TIME_DELTA=10; + return Messenger; + })(); + ScriptMessaging.Messenger=Messenger; + })(ScriptMessaging=OSFWebView.ScriptMessaging || (OSFWebView.ScriptMessaging={})); +})(OSFWebView || (OSFWebView={})); +OSF.ScriptMessaging=OSFWebView.ScriptMessaging; +var OSFWebView; +(function (OSFWebView) { + OSFWebView.MessageHandlerName="Agave"; + OSFWebView.PopupMessageHandlerName="WefPopupHandler"; + (function (AppContextProperties) { + AppContextProperties[AppContextProperties["Settings"]=0]="Settings"; + AppContextProperties[AppContextProperties["SolutionReferenceId"]=1]="SolutionReferenceId"; + AppContextProperties[AppContextProperties["AppType"]=2]="AppType"; + AppContextProperties[AppContextProperties["MajorVersion"]=3]="MajorVersion"; + AppContextProperties[AppContextProperties["MinorVersion"]=4]="MinorVersion"; + AppContextProperties[AppContextProperties["RevisionVersion"]=5]="RevisionVersion"; + AppContextProperties[AppContextProperties["APIVersionSequence"]=6]="APIVersionSequence"; + AppContextProperties[AppContextProperties["AppCapabilities"]=7]="AppCapabilities"; + AppContextProperties[AppContextProperties["APPUILocale"]=8]="APPUILocale"; + AppContextProperties[AppContextProperties["AppDataLocale"]=9]="AppDataLocale"; + AppContextProperties[AppContextProperties["BindingCount"]=10]="BindingCount"; + AppContextProperties[AppContextProperties["DocumentUrl"]=11]="DocumentUrl"; + AppContextProperties[AppContextProperties["ActivationMode"]=12]="ActivationMode"; + AppContextProperties[AppContextProperties["ControlIntegrationLevel"]=13]="ControlIntegrationLevel"; + AppContextProperties[AppContextProperties["SolutionToken"]=14]="SolutionToken"; + AppContextProperties[AppContextProperties["APISetVersion"]=15]="APISetVersion"; + AppContextProperties[AppContextProperties["CorrelationId"]=16]="CorrelationId"; + AppContextProperties[AppContextProperties["InstanceId"]=17]="InstanceId"; + AppContextProperties[AppContextProperties["TouchEnabled"]=18]="TouchEnabled"; + AppContextProperties[AppContextProperties["CommerceAllowed"]=19]="CommerceAllowed"; + AppContextProperties[AppContextProperties["RequirementMatrix"]=20]="RequirementMatrix"; + })(OSFWebView.AppContextProperties || (OSFWebView.AppContextProperties={})); + var AppContextProperties=OSFWebView.AppContextProperties; + (function (MethodId) { + MethodId[MethodId["Execute"]=1]="Execute"; + MethodId[MethodId["RegisterEvent"]=2]="RegisterEvent"; + MethodId[MethodId["UnregisterEvent"]=3]="UnregisterEvent"; + MethodId[MethodId["WriteSettings"]=4]="WriteSettings"; + MethodId[MethodId["GetContext"]=5]="GetContext"; + MethodId[MethodId["OnKeydown"]=6]="OnKeydown"; + MethodId[MethodId["AddinInitialized"]=7]="AddinInitialized"; + MethodId[MethodId["OpenWindow"]=8]="OpenWindow"; + MethodId[MethodId["MessageParent"]=9]="MessageParent"; + MethodId[MethodId["SendMessage"]=10]="SendMessage"; + })(OSFWebView.MethodId || (OSFWebView.MethodId={})); + var MethodId=OSFWebView.MethodId; + var WebViewHostController=(function () { + function WebViewHostController(hostScriptProxy) { + this.hostScriptProxy=hostScriptProxy; + } + WebViewHostController.prototype.execute=function (id, params, callback) { + var args=params; + if (args==null) { + args=[]; + } + var hostParams={ + id: id, + apiArgs: args + }; + var agaveResponseCallback=function (payload) { + var safeArraySource=payload; + if (OSF.OUtil.isArray(payload) && payload.length >=2) { + var hrStatus=payload[0]; + safeArraySource=payload[1]; + } + if (callback) { + return callback(new OSFWebView.WebViewSafeArray(safeArraySource)); + } + }; + this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.Execute, hostParams, agaveResponseCallback); + }; + WebViewHostController.prototype.registerEvent=function (id, targetId, handler, callback) { + var agaveEventHandlerCallback=function (payload) { + var safeArraySource=payload; + var eventId=0; + if (OSF.OUtil.isArray(payload) && payload.length >=2) { + eventId=payload[0]; + safeArraySource=payload[1]; + } + if (handler) { + handler(eventId, new OSFWebView.WebViewSafeArray(safeArraySource)); + } + }; + var agaveResponseCallback=function (payload) { + if (callback) { + return callback(new OSFWebView.WebViewSafeArray(payload)); + } + }; + this.hostScriptProxy.registerEvent(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.RegisterEvent, id, targetId, agaveEventHandlerCallback, agaveResponseCallback); + }; + WebViewHostController.prototype.unregisterEvent=function (id, targetId, callback) { + var agaveResponseCallback=function (response) { + return callback(new OSFWebView.WebViewSafeArray(response)); + }; + this.hostScriptProxy.unregisterEvent(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.UnregisterEvent, id, targetId, agaveResponseCallback); + }; + WebViewHostController.prototype.messageParent=function (params) { + var message=params[Microsoft.Office.WebExtension.Parameters.MessageToParent]; + var messageObj={ dialogMessage: { messageType: OSF.DialogMessageType.DialogMessageReceived, messageContent: message } }; + window.opener.postMessage(JSON.stringify(messageObj), window.location.origin); + }; + WebViewHostController.prototype.openDialog=function (id, targetId, handler, callback) { + var magicWord="action=displayDialog"; + var callArgs=JSON.parse(targetId); + var callUrl=callArgs.url; + if (!callUrl) { + return; + } + var seperator="?"; + if (callUrl.indexOf("?") > -1) { + seperator="&"; + } + var width=screen.width * callArgs.width / 100; + var height=screen.height * callArgs.height / 100; + var params="width="+width+", height="+height; + var openUrl=callUrl.concat(seperator).concat(magicWord); + WebViewHostController.popup=window.open(openUrl, "", params); + function receiveMessage(event) { + if (event.source==WebViewHostController.popup) { + try { + var messageObj=JSON.parse(event.data); + if (messageObj.dialogMessage) { + handler(id, [OSF.DialogMessageType.DialogMessageReceived, messageObj.dialogMessage.messageContent]); + } + } + catch (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handled. Message:"+event.data); + } + } + } + window.addEventListener("message", receiveMessage); + var interval; + function checkWindowClose() { + try { + if (WebViewHostController.popup==null || WebViewHostController.popup.closed) { + window.clearInterval(interval); + handler(id, [OSF.DialogMessageType.DialogClosed]); + } + } + catch (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed."); + } + } + interval=window.setInterval(checkWindowClose, 1000); + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + }; + WebViewHostController.prototype.closeDialog=function (id, targetId, callback) { + if (WebViewHostController.popup) { + WebViewHostController.popup.close(); + WebViewHostController.popup=null; + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + else { + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + } + }; + WebViewHostController.prototype.sendMessage=function (params) { + var message=params[Microsoft.Office.WebExtension.Parameters.MessageContent]; + if (!isNaN(parseFloat(message)) && isFinite(message)) { + message=message.toString(); + } + this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.SendMessage, message, null); + }; + return WebViewHostController; + })(); + OSFWebView.WebViewHostController=WebViewHostController; +})(OSFWebView || (OSFWebView={})); +var CrossIFrameCommon; +(function (CrossIFrameCommon) { + (function (CallbackType) { + CallbackType[CallbackType["MethodCallback"]=0]="MethodCallback"; + CallbackType[CallbackType["EventCallback"]=1]="EventCallback"; + })(CrossIFrameCommon.CallbackType || (CrossIFrameCommon.CallbackType={})); + var CallbackType=CrossIFrameCommon.CallbackType; + var CallbackData=(function () { + function CallbackData(callbackType, callbackId, params) { + this.callbackType=callbackType; + this.callbackId=callbackId; + this.params=params; + } + return CallbackData; + })(); + CrossIFrameCommon.CallbackData=CallbackData; +})(CrossIFrameCommon || (CrossIFrameCommon={})); +var Android; +(function (Android) { + var Poster=(function () { + function Poster() { + } + Poster.getInstance=function () { + if (Poster.uniqueInstance==null) { + Poster.uniqueInstance=new Poster(); + } + return Poster.uniqueInstance; + }; + Poster.prototype.postMessage=function (handlerName, message) { + agaveHost.postMessage(message); + }; + Poster.prototype.ReceiveMessage=function (cbData) { + switch (cbData.callbackType) { + case CrossIFrameCommon.CallbackType.MethodCallback: + OSFWebView.ScriptMessaging.agaveHostCallback(cbData.callbackId, cbData.params); + break; + case CrossIFrameCommon.CallbackType.EventCallback: + OSFWebView.ScriptMessaging.agaveHostEventCallback(cbData.callbackId, cbData.params); + break; + default: + break; + } + }; + return Poster; + })(); + Android.Poster=Poster; +})(Android || (Android={})); +function agaveHostCallback(callbackId, params) { + var cbData=new CrossIFrameCommon.CallbackData(CrossIFrameCommon.CallbackType.MethodCallback, callbackId, params); + var posterInstance=Android.Poster.getInstance(); + posterInstance.ReceiveMessage(cbData); +} +function agaveHostEventCallback(callbackId, params) { + var cbData=new CrossIFrameCommon.CallbackData(CrossIFrameCommon.CallbackType.EventCallback, callbackId, params); + var posterInstance=Android.Poster.getInstance(); + posterInstance.ReceiveMessage(cbData); +} +OSF.DDA.ClientSettingsManager={ + getSettingsExecuteMethod: function OSF_DDA_ClientSettingsManager$getSettingsExecuteMethod(hostDelegateMethod) { + return function (args) { + var status, response; + var onComplete=function onComplete(status, response) { + if (args.onReceiving) { + args.onReceiving(); + } + if (args.onComplete) { + args.onComplete(status, response); + } + }; + try { + hostDelegateMethod(args.hostCallArgs, args.onCalling, onComplete); + } + catch (ex) { + status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + response={ name: Strings.OfficeOM.L_InternalError, message: ex }; + onComplete(status, response); + } + }; + }, + read: function OSF_DDA_ClientSettingsManager$read(onCalling, onComplete) { + var keys=[]; + var values=[]; + if (onCalling) { + onCalling(); + } + var initializationHelper=OSF._OfficeAppFactory.getInitializationHelper(); + var onReceivedContext=function onReceivedContext(appContext) { + if (onComplete) { + onComplete(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess, appContext.get_settings()); + } + }; + initializationHelper.getAppContext(null, onReceivedContext); + }, + write: function OSF_DDA_ClientSettingsManager$write(serializedSettings, overwriteIfStale, onCalling, onComplete) { + var hostParams={}; + var keys=[]; + var values=[]; + for (var key in serializedSettings) { + keys.push(key); + values.push(serializedSettings[key]); + } + hostParams["keys"]=keys; + hostParams["values"]=values; + if (onCalling) { + onCalling(); + } + var onWriteCompleted=function onWriteCompleted(status) { + if (onComplete) { + onComplete(status[0], null); + } + }; + OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.WriteSettings, hostParams, onWriteCompleted); + } +}; +OSF.InitializationHelper.prototype.initializeSettings=function OSF_InitializationHelper$initializeSettings(appContext, refreshSupported) { + var serializedSettings=appContext.get_settings(); + var settings=this.deserializeSettings(serializedSettings, refreshSupported); + return settings; +}; +OSF.InitializationHelper.prototype.getAppContext=function OSF_InitializationHelper$getAppContext(wnd, gotAppContext) { + var getInvocationCallback=function OSF_InitializationHelper_getAppContextAsync$getInvocationCallbackWebApp(appContext) { + var returnedContext; + var appContextProperties=OSF.WebView.AppContextProperties; + var appType=appContext[appContextProperties.AppType]; + var appTypeSupported=false; + for (var appEntry in OSF.AppName) { + if (OSF.AppName[appEntry]==appType) { + appTypeSupported=true; + break; + } + } + if (!appTypeSupported) { + throw "Unsupported client type "+appType; + } + var hostSettings=appContext[appContextProperties.Settings]; + var serializedSettings={}; + var keys=hostSettings[0]; + var values=hostSettings[1]; + for (var index=0; index < keys.length; index++) { + serializedSettings[keys[index]]=values[index]; + } + var id=appContext[appContextProperties.SolutionReferenceId]; + var version=appContext[appContextProperties.MajorVersion]; + var clientMode=appContext[appContextProperties.AppCapabilities]; + var UILocale=appContext[appContextProperties.APPUILocale]; + var dataLocale=appContext[appContextProperties.AppDataLocale]; + var docUrl=appContext[appContextProperties.DocumentUrl]; + var reason=appContext[appContextProperties.ActivationMode]; + var osfControlType=appContext[appContextProperties.ControlIntegrationLevel]; + var eToken=appContext[appContextProperties.SolutionToken]; + eToken=eToken ? eToken.toString() : ""; + var correlationId=appContext[appContextProperties.CorrelationId]; + var appInstanceId=appContext[appContextProperties.InstanceId]; + var touchEnabled=appContext[appContextProperties.TouchEnabled]; + var commerceAllowed=appContext[appContextProperties.CommerceAllowed]; + var minorVersion=appContext[appContextProperties.MinorVersion]; + var requirementMatrix=appContext[appContextProperties.RequirementMatrix]; + returnedContext=new OSF.OfficeAppContext(id, appType, version, UILocale, dataLocale, docUrl, clientMode, serializedSettings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, minorVersion, requirementMatrix); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.initialize(returnedContext); + } + gotAppContext(returnedContext); + }; + var handler; + if (this._hostInfo.isDialog) { + handler=OSF.WebView.PopupMessageHandlerName; + } + else { + handler=OSF.WebView.MessageHandlerName; + } + OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(handler, OSF.WebView.MethodId.GetContext, [], getInvocationCallback); +}; +OSF.WebView=OSFWebView; +OSF.ClientHostController=new OSFWebView.WebViewHostController(OSF.ScriptMessaging.GetScriptMessenger("agaveHostCallback", "agaveHostEventCallback", Android.Poster.getInstance())); +var OSFLog; +(function (OSFLog) { + var BaseUsageData=(function () { + function BaseUsageData(table) { + this._table=table; + this._fields={}; + } + Object.defineProperty(BaseUsageData.prototype, "Fields", { + get: function () { + return this._fields; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(BaseUsageData.prototype, "Table", { + get: function () { + return this._table; + }, + enumerable: true, + configurable: true + }); + BaseUsageData.prototype.SerializeFields=function () { + }; + BaseUsageData.prototype.SetSerializedField=function (key, value) { + if (typeof (value) !=="undefined" && value !==null) { + this._serializedFields[key]=value.toString(); + } + }; + BaseUsageData.prototype.SerializeRow=function () { + this._serializedFields={}; + this.SetSerializedField("Table", this._table); + this.SerializeFields(); + return JSON.stringify(this._serializedFields); + }; + return BaseUsageData; + })(); + OSFLog.BaseUsageData=BaseUsageData; + var AppActivatedUsageData=(function (_super) { + __extends(AppActivatedUsageData, _super); + function AppActivatedUsageData() { + _super.call(this, "AppActivated"); + } + Object.defineProperty(AppActivatedUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppId", { + get: function () { return this.Fields["AppId"]; }, + set: function (value) { this.Fields["AppId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppInstanceId", { + get: function () { return this.Fields["AppInstanceId"]; }, + set: function (value) { this.Fields["AppInstanceId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppURL", { + get: function () { return this.Fields["AppURL"]; }, + set: function (value) { this.Fields["AppURL"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AssetId", { + get: function () { return this.Fields["AssetId"]; }, + set: function (value) { this.Fields["AssetId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Browser", { + get: function () { return this.Fields["Browser"]; }, + set: function (value) { this.Fields["Browser"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "UserId", { + get: function () { return this.Fields["UserId"]; }, + set: function (value) { this.Fields["UserId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Host", { + get: function () { return this.Fields["Host"]; }, + set: function (value) { this.Fields["Host"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "HostVersion", { + get: function () { return this.Fields["HostVersion"]; }, + set: function (value) { this.Fields["HostVersion"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "ClientId", { + get: function () { return this.Fields["ClientId"]; }, + set: function (value) { this.Fields["ClientId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppSizeWidth", { + get: function () { return this.Fields["AppSizeWidth"]; }, + set: function (value) { this.Fields["AppSizeWidth"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "AppSizeHeight", { + get: function () { return this.Fields["AppSizeHeight"]; }, + set: function (value) { this.Fields["AppSizeHeight"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "Message", { + get: function () { return this.Fields["Message"]; }, + set: function (value) { this.Fields["Message"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "DocUrl", { + get: function () { return this.Fields["DocUrl"]; }, + set: function (value) { this.Fields["DocUrl"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "OfficeJSVersion", { + get: function () { return this.Fields["OfficeJSVersion"]; }, + set: function (value) { this.Fields["OfficeJSVersion"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "HostJSVersion", { + get: function () { return this.Fields["HostJSVersion"]; }, + set: function (value) { this.Fields["HostJSVersion"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "WacHostEnvironment", { + get: function () { return this.Fields["WacHostEnvironment"]; }, + set: function (value) { this.Fields["WacHostEnvironment"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype, "IsFromWacAutomation", { + get: function () { return this.Fields["IsFromWacAutomation"]; }, + set: function (value) { this.Fields["IsFromWacAutomation"]=value; }, + enumerable: true, + configurable: true + }); + AppActivatedUsageData.prototype.SerializeFields=function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("AppId", this.AppId); + this.SetSerializedField("AppInstanceId", this.AppInstanceId); + this.SetSerializedField("AppURL", this.AppURL); + this.SetSerializedField("AssetId", this.AssetId); + this.SetSerializedField("Browser", this.Browser); + this.SetSerializedField("UserId", this.UserId); + this.SetSerializedField("Host", this.Host); + this.SetSerializedField("HostVersion", this.HostVersion); + this.SetSerializedField("ClientId", this.ClientId); + this.SetSerializedField("AppSizeWidth", this.AppSizeWidth); + this.SetSerializedField("AppSizeHeight", this.AppSizeHeight); + this.SetSerializedField("Message", this.Message); + this.SetSerializedField("DocUrl", this.DocUrl); + this.SetSerializedField("OfficeJSVersion", this.OfficeJSVersion); + this.SetSerializedField("HostJSVersion", this.HostJSVersion); + this.SetSerializedField("WacHostEnvironment", this.WacHostEnvironment); + this.SetSerializedField("IsFromWacAutomation", this.IsFromWacAutomation); + }; + return AppActivatedUsageData; + })(BaseUsageData); + OSFLog.AppActivatedUsageData=AppActivatedUsageData; + var ScriptLoadUsageData=(function (_super) { + __extends(ScriptLoadUsageData, _super); + function ScriptLoadUsageData() { + _super.call(this, "ScriptLoad"); + } + Object.defineProperty(ScriptLoadUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "ScriptId", { + get: function () { return this.Fields["ScriptId"]; }, + set: function (value) { this.Fields["ScriptId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "StartTime", { + get: function () { return this.Fields["StartTime"]; }, + set: function (value) { this.Fields["StartTime"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype, "ResponseTime", { + get: function () { return this.Fields["ResponseTime"]; }, + set: function (value) { this.Fields["ResponseTime"]=value; }, + enumerable: true, + configurable: true + }); + ScriptLoadUsageData.prototype.SerializeFields=function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("ScriptId", this.ScriptId); + this.SetSerializedField("StartTime", this.StartTime); + this.SetSerializedField("ResponseTime", this.ResponseTime); + }; + return ScriptLoadUsageData; + })(BaseUsageData); + OSFLog.ScriptLoadUsageData=ScriptLoadUsageData; + var AppClosedUsageData=(function (_super) { + __extends(AppClosedUsageData, _super); + function AppClosedUsageData() { + _super.call(this, "AppClosed"); + } + Object.defineProperty(AppClosedUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "FocusTime", { + get: function () { return this.Fields["FocusTime"]; }, + set: function (value) { this.Fields["FocusTime"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "AppSizeFinalWidth", { + get: function () { return this.Fields["AppSizeFinalWidth"]; }, + set: function (value) { this.Fields["AppSizeFinalWidth"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "AppSizeFinalHeight", { + get: function () { return this.Fields["AppSizeFinalHeight"]; }, + set: function (value) { this.Fields["AppSizeFinalHeight"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "OpenTime", { + get: function () { return this.Fields["OpenTime"]; }, + set: function (value) { this.Fields["OpenTime"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype, "CloseMethod", { + get: function () { return this.Fields["CloseMethod"]; }, + set: function (value) { this.Fields["CloseMethod"]=value; }, + enumerable: true, + configurable: true + }); + AppClosedUsageData.prototype.SerializeFields=function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("FocusTime", this.FocusTime); + this.SetSerializedField("AppSizeFinalWidth", this.AppSizeFinalWidth); + this.SetSerializedField("AppSizeFinalHeight", this.AppSizeFinalHeight); + this.SetSerializedField("OpenTime", this.OpenTime); + this.SetSerializedField("CloseMethod", this.CloseMethod); + }; + return AppClosedUsageData; + })(BaseUsageData); + OSFLog.AppClosedUsageData=AppClosedUsageData; + var APIUsageUsageData=(function (_super) { + __extends(APIUsageUsageData, _super); + function APIUsageUsageData() { + _super.call(this, "APIUsage"); + } + Object.defineProperty(APIUsageUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "APIType", { + get: function () { return this.Fields["APIType"]; }, + set: function (value) { this.Fields["APIType"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "APIID", { + get: function () { return this.Fields["APIID"]; }, + set: function (value) { this.Fields["APIID"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "Parameters", { + get: function () { return this.Fields["Parameters"]; }, + set: function (value) { this.Fields["Parameters"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "ResponseTime", { + get: function () { return this.Fields["ResponseTime"]; }, + set: function (value) { this.Fields["ResponseTime"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype, "ErrorType", { + get: function () { return this.Fields["ErrorType"]; }, + set: function (value) { this.Fields["ErrorType"]=value; }, + enumerable: true, + configurable: true + }); + APIUsageUsageData.prototype.SerializeFields=function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("APIType", this.APIType); + this.SetSerializedField("APIID", this.APIID); + this.SetSerializedField("Parameters", this.Parameters); + this.SetSerializedField("ResponseTime", this.ResponseTime); + this.SetSerializedField("ErrorType", this.ErrorType); + }; + return APIUsageUsageData; + })(BaseUsageData); + OSFLog.APIUsageUsageData=APIUsageUsageData; + var AppInitializationUsageData=(function (_super) { + __extends(AppInitializationUsageData, _super); + function AppInitializationUsageData() { + _super.call(this, "AppInitialization"); + } + Object.defineProperty(AppInitializationUsageData.prototype, "CorrelationId", { + get: function () { return this.Fields["CorrelationId"]; }, + set: function (value) { this.Fields["CorrelationId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "SessionId", { + get: function () { return this.Fields["SessionId"]; }, + set: function (value) { this.Fields["SessionId"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "SuccessCode", { + get: function () { return this.Fields["SuccessCode"]; }, + set: function (value) { this.Fields["SuccessCode"]=value; }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype, "Message", { + get: function () { return this.Fields["Message"]; }, + set: function (value) { this.Fields["Message"]=value; }, + enumerable: true, + configurable: true + }); + AppInitializationUsageData.prototype.SerializeFields=function () { + this.SetSerializedField("CorrelationId", this.CorrelationId); + this.SetSerializedField("SessionId", this.SessionId); + this.SetSerializedField("SuccessCode", this.SuccessCode); + this.SetSerializedField("Message", this.Message); + }; + return AppInitializationUsageData; + })(BaseUsageData); + OSFLog.AppInitializationUsageData=AppInitializationUsageData; +})(OSFLog || (OSFLog={})); +var Logger; +(function (Logger) { + "use strict"; + (function (TraceLevel) { + TraceLevel[TraceLevel["info"]=0]="info"; + TraceLevel[TraceLevel["warning"]=1]="warning"; + TraceLevel[TraceLevel["error"]=2]="error"; + })(Logger.TraceLevel || (Logger.TraceLevel={})); + var TraceLevel=Logger.TraceLevel; + (function (SendFlag) { + SendFlag[SendFlag["none"]=0]="none"; + SendFlag[SendFlag["flush"]=1]="flush"; + })(Logger.SendFlag || (Logger.SendFlag={})); + var SendFlag=Logger.SendFlag; + function allowUploadingData() { + if (OSF.Logger && OSF.Logger.ulsEndpoint) { + OSF.Logger.ulsEndpoint.loadProxyFrame(); + } + } + Logger.allowUploadingData=allowUploadingData; + function sendLog(traceLevel, message, flag) { + if (OSF.Logger && OSF.Logger.ulsEndpoint) { + var jsonObj={ traceLevel: traceLevel, message: message, flag: flag, internalLog: true }; + var logs=JSON.stringify(jsonObj); + OSF.Logger.ulsEndpoint.writeLog(logs); + } + } + Logger.sendLog=sendLog; + function creatULSEndpoint() { + try { + return new ULSEndpointProxy(); + } + catch (e) { + return null; + } + } + var ULSEndpointProxy=(function () { + function ULSEndpointProxy() { + var _this=this; + this.proxyFrame=null; + this.telemetryEndPoint="https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html"; + this.buffer=[]; + this.proxyFrameReady=false; + OSF.OUtil.addEventListener(window, "message", function (e) { return _this.tellProxyFrameReady(e); }); + setTimeout(function () { + _this.loadProxyFrame(); + }, 3000); + } + ULSEndpointProxy.prototype.writeLog=function (log) { + if (this.proxyFrameReady===true) { + this.proxyFrame.contentWindow.postMessage(log, ULSEndpointProxy.telemetryOrigin); + } + else { + if (this.buffer.length < 128) { + this.buffer.push(log); + } + } + }; + ULSEndpointProxy.prototype.loadProxyFrame=function () { + if (this.proxyFrame==null) { + this.proxyFrame=document.createElement("iframe"); + this.proxyFrame.setAttribute("style", "display:none"); + this.proxyFrame.setAttribute("src", this.telemetryEndPoint); + document.head.appendChild(this.proxyFrame); + } + }; + ULSEndpointProxy.prototype.tellProxyFrameReady=function (e) { + var _this=this; + if (e.data==="ProxyFrameReadyToLog") { + this.proxyFrameReady=true; + for (var i=0; i < this.buffer.length; i++) { + this.writeLog(this.buffer[i]); + } + this.buffer.length=0; + OSF.OUtil.removeEventListener(window, "message", function (e) { return _this.tellProxyFrameReady(e); }); + } + else if (e.data==="ProxyFrameReadyToInit") { + var initJson={ appName: "Office APPs", sessionId: OSF.OUtil.Guid.generateNewGuid() }; + var initStr=JSON.stringify(initJson); + this.proxyFrame.contentWindow.postMessage(initStr, ULSEndpointProxy.telemetryOrigin); + } + }; + ULSEndpointProxy.telemetryOrigin="https://telemetryservice.firstpartyapps.oaspapps.com"; + return ULSEndpointProxy; + })(); + if (!OSF.Logger) { + OSF.Logger=Logger; + } + Logger.ulsEndpoint=creatULSEndpoint(); +})(Logger || (Logger={})); +var OSFAriaLogger; +(function (OSFAriaLogger) { + var AriaLogger=(function () { + function AriaLogger() { + } + AriaLogger.prototype.getAriaCDNLocation=function () { + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry.js"); + }; + AriaLogger.getInstance=function () { + if (AriaLogger.AriaLoggerObj===undefined) { + AriaLogger.AriaLoggerObj=new AriaLogger(); + } + return AriaLogger.AriaLoggerObj; + }; + AriaLogger.prototype.isIUsageData=function (arg) { + return arg["Fields"] !==undefined; + }; + AriaLogger.prototype.loadAriaScriptAndLog=function (tableName, telemetryData) { + var startAfterMs=1000; + OSF.OUtil.loadScript(this.getAriaCDNLocation(), function () { + try { + if (!this.ALogger) { + var OfficeExtensibilityTenantID="db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; + this.ALogger=AWTLogManager.initialize(OfficeExtensibilityTenantID); + } + var eventProperties=new AWTEventProperties(); + eventProperties.setName("Office.Extensibility.OfficeJS."+tableName); + for (var key in telemetryData) { + if (key.toLowerCase() !=="table") { + eventProperties.setProperty(key, telemetryData[key]); + } + } + var today=new Date(); + eventProperties.setProperty("Date", today.toISOString()); + this.ALogger.logEvent(eventProperties); + } + catch (e) { + } + }, startAfterMs); + }; + AriaLogger.prototype.logData=function (data) { + if (this.isIUsageData(data)) { + this.loadAriaScriptAndLog(data["Table"], data["Fields"]); + } + else { + this.loadAriaScriptAndLog(data["Table"], data); + } + }; + return AriaLogger; + })(); + OSFAriaLogger.AriaLogger=AriaLogger; +})(OSFAriaLogger || (OSFAriaLogger={})); +var OSFAppTelemetry; +(function (OSFAppTelemetry) { + "use strict"; + var appInfo; + var sessionId=OSF.OUtil.Guid.generateNewGuid(); + var osfControlAppCorrelationId=""; + var omexDomainRegex=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"); + OSFAppTelemetry.enableTelemetry=true; + ; + var AppInfo=(function () { + function AppInfo() { + } + return AppInfo; + })(); + var Event=(function () { + function Event(name, handler) { + this.name=name; + this.handler=handler; + } + return Event; + })(); + var AppStorage=(function () { + function AppStorage() { + this.clientIDKey="Office API client"; + this.logIdSetKey="Office App Log Id Set"; + } + AppStorage.prototype.getClientId=function () { + var clientId=this.getValue(this.clientIDKey); + if (!clientId || clientId.length <=0 || clientId.length > 40) { + clientId=OSF.OUtil.Guid.generateNewGuid(); + this.setValue(this.clientIDKey, clientId); + } + return clientId; + }; + AppStorage.prototype.saveLog=function (logId, log) { + var logIdSet=this.getValue(this.logIdSetKey); + logIdSet=((logIdSet && logIdSet.length > 0) ? (logIdSet+";") : "")+logId; + this.setValue(this.logIdSetKey, logIdSet); + this.setValue(logId, log); + }; + AppStorage.prototype.enumerateLog=function (callback, clean) { + var logIdSet=this.getValue(this.logIdSetKey); + if (logIdSet) { + var ids=logIdSet.split(";"); + for (var id in ids) { + var logId=ids[id]; + var log=this.getValue(logId); + if (log) { + if (callback) { + callback(logId, log); + } + if (clean) { + this.remove(logId); + } + } + } + if (clean) { + this.remove(this.logIdSetKey); + } + } + }; + AppStorage.prototype.getValue=function (key) { + var osfLocalStorage=OSF.OUtil.getLocalStorage(); + var value=""; + if (osfLocalStorage) { + value=osfLocalStorage.getItem(key); + } + return value; + }; + AppStorage.prototype.setValue=function (key, value) { + var osfLocalStorage=OSF.OUtil.getLocalStorage(); + if (osfLocalStorage) { + osfLocalStorage.setItem(key, value); + } + }; + AppStorage.prototype.remove=function (key) { + var osfLocalStorage=OSF.OUtil.getLocalStorage(); + if (osfLocalStorage) { + try { + osfLocalStorage.removeItem(key); + } + catch (ex) { + } + } + }; + return AppStorage; + })(); + var AppLogger=(function () { + function AppLogger() { + } + AppLogger.prototype.LogData=function (data) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { + return; + } + try { + OSFAriaLogger.AriaLogger.getInstance().logData(data); + } + catch (e) { + } + }; + AppLogger.prototype.LogRawData=function (log) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { + return; + } + try { + OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)); + } + catch (e) { + } + }; + return AppLogger; + })(); + function trimStringToLowerCase(input) { + if (input) { + input=input.replace(/[{}]/g, "").toLowerCase(); + } + return (input || ""); + } + function initialize(context) { + if (!OSF.Logger) { + return; + } + if (appInfo) { + return; + } + appInfo=new AppInfo(); + if (context.get_hostFullVersion()) { + appInfo.hostVersion=context.get_hostFullVersion(); + } + else { + appInfo.hostVersion=context.get_appVersion(); + } + appInfo.appId=context.get_id(); + appInfo.host=context.get_appName(); + appInfo.browser=window.navigator.userAgent; + appInfo.correlationId=trimStringToLowerCase(context.get_correlationId()); + appInfo.clientId=(new AppStorage()).getClientId(); + appInfo.appInstanceId=context.get_appInstanceId(); + if (appInfo.appInstanceId) { + appInfo.appInstanceId=appInfo.appInstanceId.replace(/[{}]/g, "").toLowerCase(); + } + appInfo.message=context.get_hostCustomMessage(); + appInfo.officeJSVersion=OSF.ConstantNames.FileVersion; + appInfo.hostJSVersion="16.0.8616.1000"; + if (context._wacHostEnvironment) { + appInfo.wacHostEnvironment=context._wacHostEnvironment; + } + if (context._isFromWacAutomation !==undefined && context._isFromWacAutomation !==null) { + appInfo.isFromWacAutomation=context._isFromWacAutomation.toString().toLowerCase(); + } + var docUrl=context.get_docUrl(); + appInfo.docUrl=omexDomainRegex.test(docUrl) ? docUrl : ""; + var url=location.href; + if (url) { + url=url.split("?")[0].split("#")[0]; + } + appInfo.appURL=url; + (function getUserIdAndAssetIdFromToken(token, appInfo) { + var xmlContent; + var parser; + var xmlDoc; + appInfo.assetId=""; + appInfo.userId=""; + try { + xmlContent=decodeURIComponent(token); + parser=new DOMParser(); + xmlDoc=parser.parseFromString(xmlContent, "text/xml"); + var cidNode=xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("cid"); + var oidNode=xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("oid"); + if (cidNode && cidNode.nodeValue) { + appInfo.userId=cidNode.nodeValue; + } + else if (oidNode && oidNode.nodeValue) { + appInfo.userId=oidNode.nodeValue; + } + appInfo.assetId=xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue; + } + catch (e) { + } + finally { + xmlContent=null; + xmlDoc=null; + parser=null; + } + })(context.get_eToken(), appInfo); + (function handleLifecycle() { + var startTime=new Date(); + var lastFocus=null; + var focusTime=0; + var finished=false; + var adjustFocusTime=function () { + if (document.hasFocus()) { + if (lastFocus==null) { + lastFocus=new Date(); + } + } + else if (lastFocus) { + focusTime+=Math.abs((new Date()).getTime() - lastFocus.getTime()); + lastFocus=null; + } + }; + var eventList=[]; + eventList.push(new Event("focus", adjustFocusTime)); + eventList.push(new Event("blur", adjustFocusTime)); + eventList.push(new Event("focusout", adjustFocusTime)); + eventList.push(new Event("focusin", adjustFocusTime)); + var exitFunction=function () { + for (var i=0; i < eventList.length; i++) { + OSF.OUtil.removeEventListener(window, eventList[i].name, eventList[i].handler); + } + eventList.length=0; + if (!finished) { + if (document.hasFocus() && lastFocus) { + focusTime+=Math.abs((new Date()).getTime() - lastFocus.getTime()); + lastFocus=null; + } + OSFAppTelemetry.onAppClosed(Math.abs((new Date()).getTime() - startTime.getTime()), focusTime); + finished=true; + } + }; + eventList.push(new Event("beforeunload", exitFunction)); + eventList.push(new Event("unload", exitFunction)); + for (var i=0; i < eventList.length; i++) { + OSF.OUtil.addEventListener(window, eventList[i].name, eventList[i].handler); + } + adjustFocusTime(); + })(); + OSFAppTelemetry.onAppActivated(); + } + OSFAppTelemetry.initialize=initialize; + function onAppActivated() { + if (!appInfo) { + return; + } + (new AppStorage()).enumerateLog(function (id, log) { return (new AppLogger()).LogRawData(log); }, true); + var data=new OSFLog.AppActivatedUsageData(); + data.SessionId=sessionId; + data.AppId=appInfo.appId; + data.AssetId=appInfo.assetId; + data.AppURL=appInfo.appURL; + data.UserId=appInfo.userId; + data.ClientId=appInfo.clientId; + data.Browser=appInfo.browser; + data.Host=appInfo.host; + data.HostVersion=appInfo.hostVersion; + data.CorrelationId=trimStringToLowerCase(appInfo.correlationId); + data.AppSizeWidth=window.innerWidth; + data.AppSizeHeight=window.innerHeight; + data.AppInstanceId=appInfo.appInstanceId; + data.Message=appInfo.message; + data.DocUrl=appInfo.docUrl; + data.OfficeJSVersion=appInfo.officeJSVersion; + data.HostJSVersion=appInfo.hostJSVersion; + if (appInfo.wacHostEnvironment) { + data.WacHostEnvironment=appInfo.wacHostEnvironment; + } + if (appInfo.isFromWacAutomation !==undefined && appInfo.isFromWacAutomation !==null) { + data.IsFromWacAutomation=appInfo.isFromWacAutomation; + } + (new AppLogger()).LogData(data); + setTimeout(function () { + if (!OSF.Logger) { + return; + } + OSF.Logger.allowUploadingData(); + }, 100); + } + OSFAppTelemetry.onAppActivated=onAppActivated; + function onScriptDone(scriptId, msStartTime, msResponseTime, appCorrelationId) { + var data=new OSFLog.ScriptLoadUsageData(); + data.CorrelationId=trimStringToLowerCase(appCorrelationId); + data.SessionId=sessionId; + data.ScriptId=scriptId; + data.StartTime=msStartTime; + data.ResponseTime=msResponseTime; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onScriptDone=onScriptDone; + function onCallDone(apiType, id, parameters, msResponseTime, errorType) { + if (!appInfo) { + return; + } + var data=new OSFLog.APIUsageUsageData(); + data.CorrelationId=trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId=sessionId; + data.APIType=apiType; + data.APIID=id; + data.Parameters=parameters; + data.ResponseTime=msResponseTime; + data.ErrorType=errorType; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.onCallDone=onCallDone; + ; + function onMethodDone(id, args, msResponseTime, errorType) { + var parameters=null; + if (args) { + if (typeof args=="number") { + parameters=String(args); + } + else if (typeof args==="object") { + for (var index in args) { + if (parameters !==null) { + parameters+=","; + } + else { + parameters=""; + } + if (typeof args[index]=="number") { + parameters+=String(args[index]); + } + } + } + else { + parameters=""; + } + } + OSF.AppTelemetry.onCallDone("method", id, parameters, msResponseTime, errorType); + } + OSFAppTelemetry.onMethodDone=onMethodDone; + function onPropertyDone(propertyName, msResponseTime) { + OSF.AppTelemetry.onCallDone("property", -1, propertyName, msResponseTime); + } + OSFAppTelemetry.onPropertyDone=onPropertyDone; + function onEventDone(id, errorType) { + OSF.AppTelemetry.onCallDone("event", id, null, 0, errorType); + } + OSFAppTelemetry.onEventDone=onEventDone; + function onRegisterDone(register, id, msResponseTime, errorType) { + OSF.AppTelemetry.onCallDone(register ? "registerevent" : "unregisterevent", id, null, msResponseTime, errorType); + } + OSFAppTelemetry.onRegisterDone=onRegisterDone; + function onAppClosed(openTime, focusTime) { + if (!appInfo) { + return; + } + var data=new OSFLog.AppClosedUsageData(); + data.CorrelationId=trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId=sessionId; + data.FocusTime=focusTime; + data.OpenTime=openTime; + data.AppSizeFinalWidth=window.innerWidth; + data.AppSizeFinalHeight=window.innerHeight; + (new AppStorage()).saveLog(sessionId, data.SerializeRow()); + } + OSFAppTelemetry.onAppClosed=onAppClosed; + function setOsfControlAppCorrelationId(correlationId) { + osfControlAppCorrelationId=trimStringToLowerCase(correlationId); + } + OSFAppTelemetry.setOsfControlAppCorrelationId=setOsfControlAppCorrelationId; + function doAppInitializationLogging(isException, message) { + var data=new OSFLog.AppInitializationUsageData(); + data.CorrelationId=trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId=sessionId; + data.SuccessCode=isException ? 1 : 0; + data.Message=message; + (new AppLogger()).LogData(data); + } + OSFAppTelemetry.doAppInitializationLogging=doAppInitializationLogging; + function logAppCommonMessage(message) { + doAppInitializationLogging(false, message); + } + OSFAppTelemetry.logAppCommonMessage=logAppCommonMessage; + function logAppException(errorMessage) { + doAppInitializationLogging(true, errorMessage); + } + OSFAppTelemetry.logAppException=logAppException; + OSF.AppTelemetry=OSFAppTelemetry; +})(OSFAppTelemetry || (OSFAppTelemetry={})); +Microsoft.Office.WebExtension.EventType={}; +OSF.EventDispatch=function OSF_EventDispatch(eventTypes) { + this._eventHandlers={}; + this._objectEventHandlers={}; + this._queuedEventsArgs={}; + for (var entry in eventTypes) { + var eventType=eventTypes[entry]; + var isObjectEvent=(eventType=="objectDeleted" || eventType=="objectSelectionChanged" || eventType=="objectDataChanged" || eventType=="contentControlAdded"); + if (!isObjectEvent) + this._eventHandlers[eventType]=[]; + else + this._objectEventHandlers[eventType]={}; + this._queuedEventsArgs[eventType]=[]; + } +}; +OSF.EventDispatch.prototype={ + getSupportedEvents: function OSF_EventDispatch$getSupportedEvents() { + var events=[]; + for (var eventName in this._eventHandlers) + events.push(eventName); + for (var eventName in this._objectEventHandlers) + events.push(eventName); + return events; + }, + supportsEvent: function OSF_EventDispatch$supportsEvent(event) { + for (var eventName in this._eventHandlers) { + if (event==eventName) + return true; + } + for (var eventName in this._objectEventHandlers) { + if (event==eventName) + return true; + } + return false; + }, + hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) { + var handlers=this._eventHandlers[eventType]; + if (handlers && handlers.length > 0) { + for (var h in handlers) { + if (handlers[h]===handler) + return true; + } + } + return false; + }, + hasObjectEventHandler: function OSF_EventDispatch$hasObjectEventHandler(eventType, objectId, handler) { + var handlers=this._objectEventHandlers[eventType]; + if (handlers !=null) { + var _handlers=handlers[objectId]; + for (var i=0; _handlers !=null && i < _handlers.length; i++) { + if (_handlers[i]===handler) + return true; + } + } + return false; + }, + addEventHandler: function OSF_EventDispatch$addEventHandler(eventType, handler) { + if (typeof handler !="function") { + return false; + } + var handlers=this._eventHandlers[eventType]; + if (handlers && !this.hasEventHandler(eventType, handler)) { + handlers.push(handler); + return true; + } + else { + return false; + } + }, + addObjectEventHandler: function OSF_EventDispatch$addObjectEventHandler(eventType, objectId, handler) { + if (typeof handler !="function") { + return false; + } + var handlers=this._objectEventHandlers[eventType]; + if (handlers && !this.hasObjectEventHandler(eventType, objectId, handler)) { + if (handlers[objectId]==null) + handlers[objectId]=[]; + handlers[objectId].push(handler); + return true; + } + return false; + }, + addEventHandlerAndFireQueuedEvent: function OSF_EventDispatch$addEventHandlerAndFireQueuedEvent(eventType, handler) { + var handlers=this._eventHandlers[eventType]; + var isFirstHandler=handlers.length==0; + var succeed=this.addEventHandler(eventType, handler); + if (isFirstHandler && succeed) { + this.fireQueuedEvent(eventType); + } + return succeed; + }, + removeEventHandler: function OSF_EventDispatch$removeEventHandler(eventType, handler) { + var handlers=this._eventHandlers[eventType]; + if (handlers && handlers.length > 0) { + for (var index=0; index < handlers.length; index++) { + if (handlers[index]===handler) { + handlers.splice(index, 1); + return true; + } + } + } + return false; + }, + removeObjectEventHandler: function OSF_EventDispatch$removeObjectEventHandler(eventType, objectId, handler) { + var handlers=this._objectEventHandlers[eventType]; + if (handlers !=null) { + var _handlers=handlers[objectId]; + for (var i=0; _handlers !=null && i < _handlers.length; i++) { + if (_handlers[i]===handler) { + _handlers.splice(i, 1); + return true; + } + } + } + return false; + }, + clearEventHandlers: function OSF_EventDispatch$clearEventHandlers(eventType) { + if (typeof this._eventHandlers[eventType] !="undefined" && this._eventHandlers[eventType].length > 0) { + this._eventHandlers[eventType]=[]; + return true; + } + return false; + }, + clearObjectEventHandlers: function OSF_EventDispatch$clearObjectEventHandlers(eventType, objectId) { + if (this._objectEventHandlers[eventType] !=null && this._objectEventHandlers[eventType][objectId] !=null) { + this._objectEventHandlers[eventType][objectId]=[]; + return true; + } + return false; + }, + getEventHandlerCount: function OSF_EventDispatch$getEventHandlerCount(eventType) { + return this._eventHandlers[eventType] !=undefined ? this._eventHandlers[eventType].length : -1; + }, + getObjectEventHandlerCount: function OSF_EventDispatch$getObjectEventHandlerCount(eventType, objectId) { + if (this._objectEventHandlers[eventType]==null || this._objectEventHandlers[eventType][objectId]==null) + return 0; + return this._objectEventHandlers[eventType][objectId].length; + }, + fireEvent: function OSF_EventDispatch$fireEvent(eventArgs) { + if (eventArgs.type==undefined) + return false; + var eventType=eventArgs.type; + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers=this._eventHandlers[eventType]; + for (var handler in eventHandlers) + eventHandlers[handler](eventArgs); + return true; + } + else { + return false; + } + }, + fireObjectEvent: function OSF_EventDispatch$fireObjectEvent(objectId, eventArgs) { + if (eventArgs.type==undefined) + return false; + var eventType=eventArgs.type; + if (eventType && this._objectEventHandlers[eventType]) { + var eventHandlers=this._objectEventHandlers[eventType]; + var _handlers=eventHandlers[objectId]; + if (_handlers !=null) { + for (var i=0; i < _handlers.length; i++) + _handlers[i](eventArgs); + return true; + } + } + return false; + }, + fireOrQueueEvent: function OSF_EventDispatch$fireOrQueueEvent(eventArgs) { + var eventType=eventArgs.type; + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers=this._eventHandlers[eventType]; + var queuedEvents=this._queuedEventsArgs[eventType]; + if (eventHandlers.length==0) { + queuedEvents.push(eventArgs); + } + else { + this.fireEvent(eventArgs); + } + return true; + } + else { + return false; + } + }, + fireQueuedEvent: function OSF_EventDispatch$queueEvent(eventType) { + if (eventType && this._eventHandlers[eventType]) { + var eventHandlers=this._eventHandlers[eventType]; + var queuedEvents=this._queuedEventsArgs[eventType]; + if (eventHandlers.length > 0) { + var eventHandler=eventHandlers[0]; + while (queuedEvents.length > 0) { + var eventArgs=queuedEvents.shift(); + eventHandler(eventArgs); + } + return true; + } + } + return false; + }, + clearQueuedEvent: function OSF_EventDispatch$clearQueuedEvent(eventType) { + if (eventType && this._eventHandlers[eventType]) { + var queuedEvents=this._queuedEventsArgs[eventType]; + if (queuedEvents) { + this._queuedEventsArgs[eventType]=[]; + } + } + } +}; +OSF.DDA.OMFactory=OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEventArgs(eventType, target, eventProperties) { + var args; + switch (eventType) { + case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged: + args=new OSF.DDA.DocumentSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged: + args=new OSF.DDA.BindingSelectionChangedEventArgs(this.manufactureBinding(eventProperties, target.document), eventProperties[OSF.DDA.PropertyDescriptors.Subset]); + break; + case Microsoft.Office.WebExtension.EventType.BindingDataChanged: + args=new OSF.DDA.BindingDataChangedEventArgs(this.manufactureBinding(eventProperties, target.document)); + break; + case Microsoft.Office.WebExtension.EventType.SettingsChanged: + args=new OSF.DDA.SettingsChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ActiveViewChanged: + args=new OSF.DDA.ActiveViewChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged: + args=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged: + args=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.AppCommandInvoked: + args=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.ObjectDeleted: + case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged: + case Microsoft.Office.WebExtension.EventType.ObjectDataChanged: + case Microsoft.Office.WebExtension.EventType.ContentControlAdded: + args=new OSF.DDA.ObjectEventArgs(eventType, eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); + break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args=new OSF.DDA.RichApiMessageEventArgs(eventType, eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeInserted: + args=new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeReplaced: + args=new OSF.DDA.NodeReplacedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]), this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeDeleted: + args=new OSF.DDA.NodeDeletedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]), this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NextSiblingNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged: + args=new OSF.DDA.TaskSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged: + args=new OSF.DDA.ResourceSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged: + args=new OSF.DDA.ViewSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.DialogMessageReceived: + args=new OSF.DDA.DialogEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived: + args=new OSF.DDA.DialogParentEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.ItemChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlookwebapp") { + args=new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); + target.initialize(args["initialData"]); + target.setCurrentItemNumber(args["itemNumber"].itemNumber); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlookwebapp") { + args=new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlookwebapp") { + args=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + return args; +}; +OSF.DDA.AsyncMethodNames.addNames({ + AddHandlerAsync: "addHandlerAsync", + RemoveHandlerAsync: "removeHandlerAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddHandlerAsync, + requiredArguments: [{ + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + }, + { + "name": Microsoft.Office.WebExtension.Parameters.Handler, + "types": ["function"] + } + ], + supportedOptions: [], + privateStateCallbacks: [] +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.RemoveHandlerAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.Handler, + value: { + "types": ["function", "object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [] +}); +OSF.DialogShownStatus={ hasDialogShown: false, isWindowDialog: false }; +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { + DialogMessageReceivedEvent: "DialogMessageReceivedEvent" +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + DialogMessageReceived: "dialogMessageReceived", + DialogEventReceived: "dialogEventReceived" +}); +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + MessageType: "messageType", + MessageContent: "messageContent" +}); +OSF.DDA.DialogEventType={}; +OSF.OUtil.augmentList(OSF.DDA.DialogEventType, { + DialogClosed: "dialogClosed", + NavigationFailed: "naviationFailed" +}); +OSF.DDA.AsyncMethodNames.addNames({ + DisplayDialogAsync: "displayDialogAsync", + CloseAsync: "close" +}); +OSF.DDA.SyncMethodNames.addNames({ + MessageParent: "messageParent", + AddMessageHandler: "addEventHandler", + SendMessage: "sendMessage" +}); +OSF.DDA.UI.ParentUI=function OSF_DDA_ParentUI() { + var eventDispatch=new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.DialogMessageReceived, + Microsoft.Office.WebExtension.EventType.DialogEventReceived, + Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived + ]); + var openDialogName=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName; + var target=this; + if (!target[openDialogName]) { + OSF.OUtil.defineEnumerableProperty(target, openDialogName, { + value: function () { + var openDialog=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog]; + openDialog(arguments, eventDispatch, target); + } + }); + } + OSF.OUtil.finalizeProperties(this); +}; +OSF.DDA.UI.ChildUI=function OSF_DDA_ChildUI(isPopupWindow) { + var messageParentName=OSF.DDA.SyncMethodNames.MessageParent.displayName; + var target=this; + if (!target[messageParentName]) { + OSF.OUtil.defineEnumerableProperty(target, messageParentName, { + value: function () { + var messageParent=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent]; + return messageParent(arguments, target); + } + }); + } + var addEventHandler=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; + if (!target[addEventHandler] && typeof OSF.DialogParentMessageEventDispatch !="undefined") { + OSF.DDA.DispIdHost.addEventSupport(target, OSF.DialogParentMessageEventDispatch, isPopupWindow); + } + OSF.OUtil.finalizeProperties(this); +}; +OSF.DialogHandler=function OSF_DialogHandler() { }; +OSF.DDA.DialogEventArgs=function OSF_DDA_DialogEventArgs(message) { + if (message[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DialogMessageReceived + }, + "message": { + value: message[OSF.DDA.PropertyDescriptors.MessageContent] + } + }); + } + else { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DialogEventReceived + }, + "error": { + value: message[OSF.DDA.PropertyDescriptors.MessageType] + } + }); + } +}; +OSF.DDA.DialogParentEventArgs=function OSF_DDA_DialogParentEventArgs(message) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived + }, + "message": { + value: message[OSF.DDA.PropertyDescriptors.MessageContent] + } + }); +}; +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.DisplayDialogAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Url, + "types": ["string"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.Width, + value: { + "types": ["number"], + "defaultValue": 99 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Height, + value: { + "types": ["number"], + "defaultValue": 99 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.RequireHTTPs, + value: { + "types": ["boolean"], + "defaultValue": true + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.DisplayInIframe, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.HideTitle, + value: { + "types": ["boolean"], + "defaultValue": false + } + } + ], + privateStateCallbacks: [], + onSucceeded: function (args, caller, callArgs) { + var targetId=args[Microsoft.Office.WebExtension.Parameters.Id]; + var eventDispatch=args[Microsoft.Office.WebExtension.Parameters.Data]; + var dialog=new OSF.DialogHandler(); + var closeDialog=OSF.DDA.AsyncMethodNames.CloseAsync.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, closeDialog, { + value: function () { + var closeDialogfunction=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog]; + closeDialogfunction(arguments, targetId, eventDispatch, dialog); + } + }); + var addHandler=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, addHandler, { + value: function () { + var syncMethodCall=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id]; + var callArgs=syncMethodCall.verifyAndExtractCall(arguments, dialog, eventDispatch); + var eventType=callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + var handler=callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + return eventDispatch.addEventHandlerAndFireQueuedEvent(eventType, handler); + } + }); + var sendMessage=OSF.DDA.SyncMethodNames.SendMessage.displayName; + OSF.OUtil.defineEnumerableProperty(dialog, sendMessage, { + value: function () { + var execute=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; + return execute(arguments, eventDispatch, dialog); + } + }); + return dialog; + }, + checkCallArgs: function (callArgs, caller, stateInfo) { + if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] <=0) { + callArgs[Microsoft.Office.WebExtension.Parameters.Width]=1; + } + if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { + callArgs[Microsoft.Office.WebExtension.Parameters.Width]=99; + } + if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] <=0) { + callArgs[Microsoft.Office.WebExtension.Parameters.Height]=1; + } + if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { + callArgs[Microsoft.Office.WebExtension.Parameters.Height]=99; + } + if (!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) { + callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=true; + } + return callArgs; + } +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.CloseAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [] +}); +OSF.DDA.SyncMethodCalls.define({ + method: OSF.DDA.SyncMethodNames.MessageParent, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.MessageToParent, + "types": ["string", "number", "boolean"] + } + ], + supportedOptions: [] +}); +OSF.DDA.SyncMethodCalls.define({ + method: OSF.DDA.SyncMethodNames.AddMessageHandler, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + "verify": function (eventType, caller, eventDispatch) { return eventDispatch.supportsEvent(eventType); } + }, + { + "name": Microsoft.Office.WebExtension.Parameters.Handler, + "types": ["function"] + } + ], + supportedOptions: [] +}); +OSF.DDA.SyncMethodCalls.define({ + method: OSF.DDA.SyncMethodNames.SendMessage, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.MessageContent, + "types": ["string"] + } + ], + supportedOptions: [], + privateStateCallbacks: [] +}); +OSF.DDA.SafeArray.Delegate.openDialog=function OSF_DDA_SafeArray_Delegate$OpenDialog(args) { + try { + if (args.onCalling) { + args.onCalling(); + } + var callback=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true, args); + OSF.ClientHostController.openDialog(args.dispId, args.targetId, function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) { + if (args.onEvent) { + args.onEvent(payload); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onEventDone(args.dispId); + } + }, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate.closeDialog=function OSF_DDA_SafeArray_Delegate$CloseDialog(args) { + if (args.onCalling) { + args.onCalling(); + } + var callback=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false, args); + try { + OSF.ClientHostController.closeDialog(args.dispId, args.targetId, callback); + } + catch (ex) { + OSF.DDA.SafeArray.Delegate._onException(ex, args); + } +}; +OSF.DDA.SafeArray.Delegate.messageParent=function OSF_DDA_SafeArray_Delegate$MessageParent(args) { + try { + if (args.onCalling) { + args.onCalling(); + } + var startTime=(new Date()).getTime(); + var result=OSF.ClientHostController.messageParent(args.hostCallArgs); + if (args.onReceiving) { + args.onReceiving(); + } + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(args.dispId, args.hostCallArgs, Math.abs((new Date()).getTime() - startTime), result); + } + return result; + } + catch (ex) { + return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(ex); + } +}; +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent, + fromHost: [ + { name: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.MessageType, value: 0 }, + { name: OSF.DDA.PropertyDescriptors.MessageContent, value: 1 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.sendMessage=function OSF_DDA_SafeArray_Delegate$SendMessage(args) { + try { + if (args.onCalling) { + args.onCalling(); + } + var startTime=(new Date()).getTime(); + var result=OSF.ClientHostController.sendMessage(args.hostCallArgs); + if (args.onReceiving) { + args.onReceiving(); + } + return result; + } + catch (ex) { + return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(ex); + } +}; +Microsoft.Office.WebExtension.TableData=function Microsoft_Office_WebExtension_TableData(rows, headers) { + function fixData(data) { + if (data==null || data==undefined) { + return null; + } + try { + for (var dim=OSF.DDA.DataCoercion.findArrayDimensionality(data, 2); dim < 2; dim++) { + data=[data]; + } + return data; + } + catch (ex) { + } + } + ; + OSF.OUtil.defineEnumerableProperties(this, { + "headers": { + get: function () { return headers; }, + set: function (value) { + headers=fixData(value); + } + }, + "rows": { + get: function () { return rows; }, + set: function (value) { + rows=(value==null || (OSF.OUtil.isArray(value) && (value.length==0))) ? + [] : + fixData(value); + } + } + }); + this.headers=headers; + this.rows=rows; +}; +OSF.DDA.OMFactory=OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureTableData=function OSF_DDA_OMFactory$manufactureTableData(tableDataProperties) { + return new Microsoft.Office.WebExtension.TableData(tableDataProperties[OSF.DDA.TableDataProperties.TableRows], tableDataProperties[OSF.DDA.TableDataProperties.TableHeaders]); +}; +Microsoft.Office.WebExtension.CoercionType={ + Text: "text", + Matrix: "matrix", + Table: "table" +}; +OSF.DDA.DataCoercion=(function OSF_DDA_DataCoercion() { + return { + findArrayDimensionality: function OSF_DDA_DataCoercion$findArrayDimensionality(obj) { + if (OSF.OUtil.isArray(obj)) { + var dim=0; + for (var index=0; index < obj.length; index++) { + dim=Math.max(dim, OSF.DDA.DataCoercion.findArrayDimensionality(obj[index])); + } + return dim+1; + } + else { + return 0; + } + }, + getCoercionDefaultForBinding: function OSF_DDA_DataCoercion$getCoercionDefaultForBinding(bindingType) { + switch (bindingType) { + case Microsoft.Office.WebExtension.BindingType.Matrix: return Microsoft.Office.WebExtension.CoercionType.Matrix; + case Microsoft.Office.WebExtension.BindingType.Table: return Microsoft.Office.WebExtension.CoercionType.Table; + case Microsoft.Office.WebExtension.BindingType.Text: + default: + return Microsoft.Office.WebExtension.CoercionType.Text; + } + }, + getBindingDefaultForCoercion: function OSF_DDA_DataCoercion$getBindingDefaultForCoercion(coercionType) { + switch (coercionType) { + case Microsoft.Office.WebExtension.CoercionType.Matrix: return Microsoft.Office.WebExtension.BindingType.Matrix; + case Microsoft.Office.WebExtension.CoercionType.Table: return Microsoft.Office.WebExtension.BindingType.Table; + case Microsoft.Office.WebExtension.CoercionType.Text: + case Microsoft.Office.WebExtension.CoercionType.Html: + case Microsoft.Office.WebExtension.CoercionType.Ooxml: + default: + return Microsoft.Office.WebExtension.BindingType.Text; + } + }, + determineCoercionType: function OSF_DDA_DataCoercion$determineCoercionType(data) { + if (data==null || data==undefined) + return null; + var sourceType=null; + var runtimeType=typeof data; + if (data.rows !==undefined) { + sourceType=Microsoft.Office.WebExtension.CoercionType.Table; + } + else if (OSF.OUtil.isArray(data)) { + sourceType=Microsoft.Office.WebExtension.CoercionType.Matrix; + } + else if (runtimeType=="string" || runtimeType=="number" || runtimeType=="boolean" || OSF.OUtil.isDate(data)) { + sourceType=Microsoft.Office.WebExtension.CoercionType.Text; + } + else { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject; + } + return sourceType; + }, + coerceData: function OSF_DDA_DataCoercion$coerceData(data, destinationType, sourceType) { + sourceType=sourceType || OSF.DDA.DataCoercion.determineCoercionType(data); + if (sourceType && sourceType !=destinationType) { + OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionBegin); + data=OSF.DDA.DataCoercion._coerceDataFromTable(destinationType, OSF.DDA.DataCoercion._coerceDataToTable(data, sourceType)); + OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionEnd); + } + return data; + }, + _matrixToText: function OSF_DDA_DataCoercion$_matrixToText(matrix) { + if (matrix.length==1 && matrix[0].length==1) + return ""+matrix[0][0]; + var val=""; + for (var i=0; i < matrix.length; i++) { + val+=matrix[i].join("\t")+"\n"; + } + return val.substring(0, val.length - 1); + }, + _textToMatrix: function OSF_DDA_DataCoercion$_textToMatrix(text) { + var ret=text.split("\n"); + for (var i=0; i < ret.length; i++) + ret[i]=ret[i].split("\t"); + return ret; + }, + _tableToText: function OSF_DDA_DataCoercion$_tableToText(table) { + var headers=""; + if (table.headers !=null) { + headers=OSF.DDA.DataCoercion._matrixToText([table.headers])+"\n"; + } + var rows=OSF.DDA.DataCoercion._matrixToText(table.rows); + if (rows=="") { + headers=headers.substring(0, headers.length - 1); + } + return headers+rows; + }, + _tableToMatrix: function OSF_DDA_DataCoercion$_tableToMatrix(table) { + var matrix=table.rows; + if (table.headers !=null) { + matrix.unshift(table.headers); + } + return matrix; + }, + _coerceDataFromTable: function OSF_DDA_DataCoercion$_coerceDataFromTable(coercionType, table) { + var value; + switch (coercionType) { + case Microsoft.Office.WebExtension.CoercionType.Table: + value=table; + break; + case Microsoft.Office.WebExtension.CoercionType.Matrix: + value=OSF.DDA.DataCoercion._tableToMatrix(table); + break; + case Microsoft.Office.WebExtension.CoercionType.SlideRange: + value=null; + if (OSF.DDA.OMFactory.manufactureSlideRange) { + value=OSF.DDA.OMFactory.manufactureSlideRange(OSF.DDA.DataCoercion._tableToText(table)); + } + if (value==null) { + value=OSF.DDA.DataCoercion._tableToText(table); + } + break; + case Microsoft.Office.WebExtension.CoercionType.Text: + case Microsoft.Office.WebExtension.CoercionType.Html: + case Microsoft.Office.WebExtension.CoercionType.Ooxml: + default: + value=OSF.DDA.DataCoercion._tableToText(table); + break; + } + return value; + }, + _coerceDataToTable: function OSF_DDA_DataCoercion$_coerceDataToTable(data, sourceType) { + if (sourceType==undefined) { + sourceType=OSF.DDA.DataCoercion.determineCoercionType(data); + } + var value; + switch (sourceType) { + case Microsoft.Office.WebExtension.CoercionType.Table: + value=data; + break; + case Microsoft.Office.WebExtension.CoercionType.Matrix: + value=new Microsoft.Office.WebExtension.TableData(data); + break; + case Microsoft.Office.WebExtension.CoercionType.Text: + case Microsoft.Office.WebExtension.CoercionType.Html: + case Microsoft.Office.WebExtension.CoercionType.Ooxml: + default: + value=new Microsoft.Office.WebExtension.TableData(OSF.DDA.DataCoercion._textToMatrix(data)); + break; + } + return value; + } + }; +})(); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.CoercionType, + toHost: [ + { name: Microsoft.Office.WebExtension.CoercionType.Text, value: 0 }, + { name: Microsoft.Office.WebExtension.CoercionType.Matrix, value: 1 }, + { name: Microsoft.Office.WebExtension.CoercionType.Table, value: 2 } + ] +}); +OSF.DDA.AsyncMethodNames.addNames({ + GetSelectedDataAsync: "getSelectedDataAsync", + SetSelectedDataAsync: "setSelectedDataAsync" +}); +(function () { + function processData(dataDescriptor, caller, callArgs) { + var data=dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + if (OSF.DDA.TableDataProperties && data && (data[OSF.DDA.TableDataProperties.TableRows] !=undefined || data[OSF.DDA.TableDataProperties.TableHeaders] !=undefined)) { + data=OSF.DDA.OMFactory.manufactureTableData(data); + } + data=OSF.DDA.DataCoercion.coerceData(data, callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType]); + return data==undefined ? null : data; + } + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetSelectedDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.CoercionType, + "enum": Microsoft.Office.WebExtension.CoercionType + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.ValueFormat, + value: { + "enum": Microsoft.Office.WebExtension.ValueFormat, + "defaultValue": Microsoft.Office.WebExtension.ValueFormat.Unformatted + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.FilterType, + value: { + "enum": Microsoft.Office.WebExtension.FilterType, + "defaultValue": Microsoft.Office.WebExtension.FilterType.All + } + } + ], + privateStateCallbacks: [], + onSucceeded: processData + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetSelectedDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { + return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); + } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageLeft, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageTop, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageWidth, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageHeight, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + } + ], + privateStateCallbacks: [] + }); +})(); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetSelectedDataMethod, + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.ValueFormat, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.FilterType, value: 2 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetSelectedDataMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.ImageLeft, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.ImageTop, value: 3 }, + { name: Microsoft.Office.WebExtension.Parameters.ImageWidth, value: 4 }, + { name: Microsoft.Office.WebExtension.Parameters.ImageHeight, value: 5 }, + ] +}); +OSF.DDA.SettingsManager={ + SerializedSettings: "serializedSettings", + RefreshingSettings: "refreshingSettings", + DateJSONPrefix: "Date(", + DataJSONSuffix: ")", + serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) { + var ret={}; + for (var key in settingsCollection) { + var value=settingsCollection[key]; + try { + if (JSON) { + value=JSON.stringify(value, function dateReplacer(k, v) { + return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix+this[k].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix : v; + }); + } + else { + value=Sys.Serialization.JavaScriptSerializer.serialize(value); + } + ret[key]=value; + } + catch (ex) { + } + } + return ret; + }, + deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) { + var ret={}; + serializedSettings=serializedSettings || {}; + for (var key in serializedSettings) { + var value=serializedSettings[key]; + try { + if (JSON) { + value=JSON.parse(value, function dateReviver(k, v) { + var d; + if (typeof v==='string' && v && v.length > 6 && v.slice(0, 5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) { + d=new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + } + else { + value=Sys.Serialization.JavaScriptSerializer.deserialize(value, true); + } + ret[key]=value; + } + catch (ex) { + } + } + return ret; + } +}; +OSF.DDA.Settings=function OSF_DDA_Settings(settings) { + settings=settings || {}; + var cacheSessionSettings=function (settings) { + var osfSessionStorage=OSF.OUtil.getSessionStorage(); + if (osfSessionStorage) { + var serializedSettings=OSF.DDA.SettingsManager.serializeSettings(settings); + var storageSettings=JSON ? JSON.stringify(serializedSettings) : Sys.Serialization.JavaScriptSerializer.serialize(serializedSettings); + osfSessionStorage.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(), storageSettings); + } + }; + OSF.OUtil.defineEnumerableProperties(this, { + "get": { + value: function OSF_DDA_Settings$get(name) { + var e=Function._validateParams(arguments, [ + { name: "name", type: String, mayBeNull: false } + ]); + if (e) + throw e; + var setting=settings[name]; + return typeof (setting)==='undefined' ? null : setting; + } + }, + "set": { + value: function OSF_DDA_Settings$set(name, value) { + var e=Function._validateParams(arguments, [ + { name: "name", type: String, mayBeNull: false }, + { name: "value", mayBeNull: true } + ]); + if (e) + throw e; + settings[name]=value; + cacheSessionSettings(settings); + } + }, + "remove": { + value: function OSF_DDA_Settings$remove(name) { + var e=Function._validateParams(arguments, [ + { name: "name", type: String, mayBeNull: false } + ]); + if (e) + throw e; + delete settings[name]; + cacheSessionSettings(settings); + } + } + }); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.SaveAsync], settings); +}; +OSF.DDA.RefreshableSettings=function OSF_DDA_RefreshableSettings(settings) { + OSF.DDA.RefreshableSettings.uber.constructor.call(this, settings); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.RefreshAsync], settings); + OSF.DDA.DispIdHost.addEventSupport(this, new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged])); +}; +OSF.OUtil.extend(OSF.DDA.RefreshableSettings, OSF.DDA.Settings); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + SettingsChanged: "settingsChanged" +}); +OSF.DDA.SettingsChangedEventArgs=function OSF_DDA_SettingsChangedEventArgs(settingsInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.SettingsChanged + }, + "settings": { + value: settingsInstance + } + }); +}; +OSF.DDA.AsyncMethodNames.addNames({ + RefreshAsync: "refreshAsync", + SaveAsync: "saveAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.RefreshAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [ + { + name: OSF.DDA.SettingsManager.RefreshingSettings, + value: function getRefreshingSettings(settingsInstance, settingsCollection) { + return settingsCollection; + } + } + ], + onSucceeded: function deserializeSettings(serializedSettingsDescriptor, refreshingSettings, refreshingSettingsArgs) { + var serializedSettings=serializedSettingsDescriptor[OSF.DDA.SettingsManager.SerializedSettings]; + var newSettings=OSF.DDA.SettingsManager.deserializeSettings(serializedSettings); + var oldSettings=refreshingSettingsArgs[OSF.DDA.SettingsManager.RefreshingSettings]; + for (var setting in oldSettings) { + refreshingSettings.remove(setting); + } + for (var setting in newSettings) { + refreshingSettings.set(setting, newSettings[setting]); + } + return refreshingSettings; + } +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SaveAsync, + requiredArguments: [], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale, + value: { + "types": ["boolean"], + "defaultValue": true + } + } + ], + privateStateCallbacks: [ + { + name: OSF.DDA.SettingsManager.SerializedSettings, + value: function serializeSettings(settingsInstance, settingsCollection) { + return OSF.DDA.SettingsManager.serializeSettings(settingsCollection); + } + } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidLoadSettingsMethod, + fromHost: [ + { name: OSF.DDA.SettingsManager.SerializedSettings, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSaveSettingsMethod, + toHost: [ + { name: OSF.DDA.SettingsManager.SerializedSettings, value: OSF.DDA.SettingsManager.SerializedSettings }, + { name: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale, value: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ type: OSF.DDA.EventDispId.dispidSettingsChangedEvent }); +Microsoft.Office.WebExtension.BindingType={ + Table: "table", + Text: "text", + Matrix: "matrix" +}; +OSF.DDA.BindingProperties={ + Id: "BindingId", + Type: Microsoft.Office.WebExtension.Parameters.BindingType +}; +OSF.OUtil.augmentList(OSF.DDA.ListDescriptors, { BindingList: "BindingList" }); +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + Subset: "subset", + BindingProperties: "BindingProperties" +}); +OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList, OSF.DDA.PropertyDescriptors.BindingProperties); +OSF.DDA.BindingPromise=function OSF_DDA_BindingPromise(bindingId, errorCallback) { + this._id=bindingId; + OSF.OUtil.defineEnumerableProperty(this, "onFail", { + get: function () { + return errorCallback; + }, + set: function (onError) { + var t=typeof onError; + if (t !="undefined" && t !="function") { + throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction, t); + } + errorCallback=onError; + } + }); +}; +OSF.DDA.BindingPromise.prototype={ + _fetch: function OSF_DDA_BindingPromise$_fetch(onComplete) { + if (this.binding) { + if (onComplete) + onComplete(this.binding); + } + else { + if (!this._binding) { + var me=this; + Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(this._id, function (asyncResult) { + if (asyncResult.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded) { + OSF.OUtil.defineEnumerableProperty(me, "binding", { + value: asyncResult.value + }); + if (onComplete) + onComplete(me.binding); + } + else { + if (me.onFail) + me.onFail(asyncResult); + } + }); + } + } + return this; + }, + getDataAsync: function OSF_DDA_BindingPromise$getDataAsync() { + var args=arguments; + this._fetch(function onComplete(binding) { binding.getDataAsync.apply(binding, args); }); + return this; + }, + setDataAsync: function OSF_DDA_BindingPromise$setDataAsync() { + var args=arguments; + this._fetch(function onComplete(binding) { binding.setDataAsync.apply(binding, args); }); + return this; + }, + addHandlerAsync: function OSF_DDA_BindingPromise$addHandlerAsync() { + var args=arguments; + this._fetch(function onComplete(binding) { binding.addHandlerAsync.apply(binding, args); }); + return this; + }, + removeHandlerAsync: function OSF_DDA_BindingPromise$removeHandlerAsync() { + var args=arguments; + this._fetch(function onComplete(binding) { binding.removeHandlerAsync.apply(binding, args); }); + return this; + } +}; +OSF.DDA.BindingFacade=function OSF_DDA_BindingFacade(docInstance) { + this._eventDispatches=[]; + OSF.OUtil.defineEnumerableProperty(this, "document", { + value: docInstance + }); + var am=OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.AddFromSelectionAsync, + am.AddFromNamedItemAsync, + am.GetAllAsync, + am.GetByIdAsync, + am.ReleaseByIdAsync + ]); +}; +OSF.DDA.UnknownBinding=function OSF_DDA_UknonwnBinding(id, docInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "document": { value: docInstance }, + "id": { value: id } + }); +}; +OSF.DDA.Binding=function OSF_DDA_Binding(id, docInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "document": { + value: docInstance + }, + "id": { + value: id + } + }); + var am=OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.GetDataAsync, + am.SetDataAsync + ]); + var et=Microsoft.Office.WebExtension.EventType; + var bindingEventDispatches=docInstance.bindings._eventDispatches; + if (!bindingEventDispatches[id]) { + bindingEventDispatches[id]=new OSF.EventDispatch([ + et.BindingSelectionChanged, + et.BindingDataChanged + ]); + } + var eventDispatch=bindingEventDispatches[id]; + OSF.DDA.DispIdHost.addEventSupport(this, eventDispatch); +}; +OSF.DDA.generateBindingId=function OSF_DDA$GenerateBindingId() { + return "UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+new Date().getTime(); +}; +OSF.DDA.OMFactory=OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureBinding=function OSF_DDA_OMFactory$manufactureBinding(bindingProperties, containingDocument) { + var id=bindingProperties[OSF.DDA.BindingProperties.Id]; + var rows=bindingProperties[OSF.DDA.BindingProperties.RowCount]; + var cols=bindingProperties[OSF.DDA.BindingProperties.ColumnCount]; + var hasHeaders=bindingProperties[OSF.DDA.BindingProperties.HasHeaders]; + var binding; + switch (bindingProperties[OSF.DDA.BindingProperties.Type]) { + case Microsoft.Office.WebExtension.BindingType.Text: + binding=new OSF.DDA.TextBinding(id, containingDocument); + break; + case Microsoft.Office.WebExtension.BindingType.Matrix: + binding=new OSF.DDA.MatrixBinding(id, containingDocument, rows, cols); + break; + case Microsoft.Office.WebExtension.BindingType.Table: + var isExcelApp=function () { + return (OSF.DDA.ExcelDocument) + && (Microsoft.Office.WebExtension.context.document) + && (Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument); + }; + var tableBindingObject; + if (isExcelApp() && OSF.DDA.ExcelTableBinding) { + tableBindingObject=OSF.DDA.ExcelTableBinding; + } + else { + tableBindingObject=OSF.DDA.TableBinding; + } + binding=new tableBindingObject(id, containingDocument, rows, cols, hasHeaders); + break; + default: + binding=new OSF.DDA.UnknownBinding(id, containingDocument); + } + return binding; +}; +OSF.DDA.AsyncMethodNames.addNames({ + AddFromSelectionAsync: "addFromSelectionAsync", + AddFromNamedItemAsync: "addFromNamedItemAsync", + GetAllAsync: "getAllAsync", + GetByIdAsync: "getByIdAsync", + ReleaseByIdAsync: "releaseByIdAsync", + GetDataAsync: "getDataAsync", + SetDataAsync: "setDataAsync" +}); +(function () { + function processBinding(bindingDescriptor) { + return OSF.DDA.OMFactory.manufactureBinding(bindingDescriptor, Microsoft.Office.WebExtension.context.document); + } + function getObjectId(obj) { return obj.id; } + function processData(dataDescriptor, caller, callArgs) { + var data=dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + if (OSF.DDA.TableDataProperties && data && (data[OSF.DDA.TableDataProperties.TableRows] !=undefined || data[OSF.DDA.TableDataProperties.TableHeaders] !=undefined)) { + data=OSF.DDA.OMFactory.manufactureTableData(data); + } + data=OSF.DDA.DataCoercion.coerceData(data, callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType]); + return data==undefined ? null : data; + } + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddFromSelectionAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.BindingType, + "enum": Microsoft.Office.WebExtension.BindingType + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + value: { + "types": ["string"], + "calculate": OSF.DDA.generateBindingId + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [], + onSucceeded: processBinding + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync, + requiredArguments: [{ + "name": Microsoft.Office.WebExtension.Parameters.ItemName, + "types": ["string"] + }, + { + "name": Microsoft.Office.WebExtension.Parameters.BindingType, + "enum": Microsoft.Office.WebExtension.BindingType + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + value: { + "types": ["string"], + "calculate": OSF.DDA.generateBindingId + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.FailOnCollision, + value: function () { return true; } + } + ], + onSucceeded: processBinding + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetAllAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: function (response) { return OSF.OUtil.mapList(response[OSF.DDA.ListDescriptors.BindingList], processBinding); } + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetByIdAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Id, + "types": ["string"] + } + ], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: processBinding + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ReleaseByIdAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Id, + "types": ["string"] + } + ], + supportedOptions: [], + privateStateCallbacks: [], + onSucceeded: function (response, caller, callArgs) { + var id=callArgs[Microsoft.Office.WebExtension.Parameters.Id]; + delete caller._eventDispatches[id]; + } + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetDataAsync, + requiredArguments: [], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs, binding) { return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(binding.type); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ValueFormat, + value: { + "enum": Microsoft.Office.WebExtension.ValueFormat, + "defaultValue": Microsoft.Office.WebExtension.ValueFormat.Unformatted + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.FilterType, + value: { + "enum": Microsoft.Office.WebExtension.FilterType, + "defaultValue": Microsoft.Office.WebExtension.FilterType.All + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Rows, + value: { + "types": ["object", "string"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartRow, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartColumn, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.RowCount, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ColumnCount, + value: { + "types": ["number"], + "defaultValue": 0 + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + if (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow]==0 && + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn]==0 && + callArgs[Microsoft.Office.WebExtension.Parameters.RowCount]==0 && + callArgs[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0) { + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartRow]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.RowCount]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.ColumnCount]; + } + if (callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType] !=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(caller.type) && + (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow] || + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn] || + callArgs[Microsoft.Office.WebExtension.Parameters.RowCount] || + callArgs[Microsoft.Office.WebExtension.Parameters.ColumnCount])) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding; + } + return callArgs; + }, + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ], + onSucceeded: processData + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Rows, + value: { + "types": ["object", "string"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartRow, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartColumn, + value: { + "types": ["number"], + "defaultValue": 0 + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + if (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow]==0 && + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn]==0) { + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartRow]; + delete callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn]; + } + if (callArgs[Microsoft.Office.WebExtension.Parameters.CoercionType] !=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(caller.type) && + (callArgs[Microsoft.Office.WebExtension.Parameters.StartRow] || + callArgs[Microsoft.Office.WebExtension.Parameters.StartColumn])) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding; + } + return callArgs; + }, + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); +})(); +OSF.OUtil.augmentList(OSF.DDA.BindingProperties, { + RowCount: "BindingRowCount", + ColumnCount: "BindingColumnCount", + HasHeaders: "HasHeaders" +}); +OSF.DDA.MatrixBinding=function OSF_DDA_MatrixBinding(id, docInstance, rows, cols) { + OSF.DDA.MatrixBinding.uber.constructor.call(this, id, docInstance); + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.BindingType.Matrix + }, + "rowCount": { + value: rows ? rows : 0 + }, + "columnCount": { + value: cols ? cols : 0 + } + }); +}; +OSF.OUtil.extend(OSF.DDA.MatrixBinding, OSF.DDA.Binding); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.BindingProperties, + fromHost: [ + { name: OSF.DDA.BindingProperties.Id, value: 0 }, + { name: OSF.DDA.BindingProperties.Type, value: 1 }, + { name: OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData, value: 2 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.BindingType, + toHost: [ + { name: Microsoft.Office.WebExtension.BindingType.Text, value: 0 }, + { name: Microsoft.Office.WebExtension.BindingType.Matrix, value: 1 }, + { name: Microsoft.Office.WebExtension.BindingType.Table, value: 2 } + ], + invertible: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.BindingType, value: 1 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.ItemName, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.BindingType, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.FailOnCollision, value: 3 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidReleaseBindingMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetBindingMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetAllBindingsMethod, + fromHost: [ + { name: OSF.DDA.ListDescriptors.BindingList, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetBindingDataMethod, + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.ValueFormat, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.FilterType, value: 3 }, + { name: OSF.DDA.PropertyDescriptors.Subset, value: 4 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetBindingDataMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 2 }, + { name: OSF.DDA.SafeArray.UniqueArguments.Offset, value: 3 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData, + fromHost: [ + { name: OSF.DDA.BindingProperties.RowCount, value: 0 }, + { name: OSF.DDA.BindingProperties.ColumnCount, value: 1 }, + { name: OSF.DDA.BindingProperties.HasHeaders, value: 2 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.Subset, + toHost: [ + { name: OSF.DDA.SafeArray.UniqueArguments.Offset, value: 0 }, + { name: OSF.DDA.SafeArray.UniqueArguments.Run, value: 1 } + ], + canonical: true, + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.SafeArray.UniqueArguments.Offset, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.StartRow, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.StartColumn, value: 1 } + ], + canonical: true, + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.SafeArray.UniqueArguments.Run, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.RowCount, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.ColumnCount, value: 1 } + ], + canonical: true, + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddRowsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 1 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddColumnsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 1 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidClearAllRowsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ] +}); +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { TableDataProperties: "TableDataProperties" }); +OSF.OUtil.augmentList(OSF.DDA.BindingProperties, { + RowCount: "BindingRowCount", + ColumnCount: "BindingColumnCount", + HasHeaders: "HasHeaders" +}); +OSF.DDA.TableDataProperties={ + TableRows: "TableRows", + TableHeaders: "TableHeaders" +}; +OSF.DDA.TableBinding=function OSF_DDA_TableBinding(id, docInstance, rows, cols, hasHeaders) { + OSF.DDA.TableBinding.uber.constructor.call(this, id, docInstance); + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.BindingType.Table + }, + "rowCount": { + value: rows ? rows : 0 + }, + "columnCount": { + value: cols ? cols : 0 + }, + "hasHeaders": { + value: hasHeaders ? hasHeaders : false + } + }); + var am=OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.AddRowsAsync, + am.AddColumnsAsync, + am.DeleteAllDataValuesAsync + ]); +}; +OSF.OUtil.extend(OSF.DDA.TableBinding, OSF.DDA.Binding); +OSF.DDA.AsyncMethodNames.addNames({ + AddRowsAsync: "addRowsAsync", + AddColumnsAsync: "addColumnsAsync", + DeleteAllDataValuesAsync: "deleteAllDataValuesAsync" +}); +(function () { + function getObjectId(obj) { return obj.id; } + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddRowsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["object"] + } + ], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddColumnsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["object"] + } + ], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); +})(); +OSF.DDA.TextBinding=function OSF_DDA_TextBinding(id, docInstance) { + OSF.DDA.TextBinding.uber.constructor.call(this, id, docInstance); + OSF.OUtil.defineEnumerableProperty(this, "type", { + value: Microsoft.Office.WebExtension.BindingType.Text + }); +}; +OSF.OUtil.extend(OSF.DDA.TextBinding, OSF.DDA.Binding); +OSF.DDA.AsyncMethodNames.addNames({ AddFromPromptAsync: "addFromPromptAsync" }); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AddFromPromptAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.BindingType, + "enum": Microsoft.Office.WebExtension.BindingType + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + value: { + "types": ["string"], + "calculate": OSF.DDA.generateBindingId + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.PromptText, + value: { + "types": ["string"], + "calculate": function () { return Strings.OfficeOM.L_AddBindingFromPromptDefaultText; } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.SampleData, + value: { + "types": ["object"], + "defaultValue": null + } + } + ], + privateStateCallbacks: [], + onSucceeded: function (bindingDescriptor) { return OSF.DDA.OMFactory.manufactureBinding(bindingDescriptor, Microsoft.Office.WebExtension.context.document); } +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAddBindingFromPromptMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.BindingType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.PromptText, value: 2 } + ] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { DocumentSelectionChanged: "documentSelectionChanged" }); +OSF.DDA.DocumentSelectionChangedEventArgs=function OSF_DDA_DocumentSelectionChangedEventArgs(docInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged + }, + "document": { + value: docInstance + } + }); +}; +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectDeleted: "objectDeleted" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectSelectionChanged: "objectSelectionChanged" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectDataChanged: "objectDataChanged" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ContentControlAdded: "contentControlAdded" }); +OSF.DDA.ObjectEventArgs=function OSF_DDA_ObjectEventArgs(eventType, object) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { value: eventType }, + "object": { value: object } + }); +}; +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ type: OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent }); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectDeletedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectDataChangedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidContentControlAddedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { + BindingSelectionChanged: "bindingSelectionChanged", + BindingDataChanged: "bindingDataChanged" +}); +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { BindingSelectionChangedEvent: "BindingSelectionChangedEvent" }); +OSF.DDA.BindingSelectionChangedEventArgs=function OSF_DDA_BindingSelectionChangedEventArgs(bindingInstance, subset) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.BindingSelectionChanged + }, + "binding": { + value: bindingInstance + } + }); + for (var prop in subset) { + OSF.OUtil.defineEnumerableProperty(this, prop, { + value: subset[prop] + }); + } +}; +OSF.DDA.BindingDataChangedEventArgs=function OSF_DDA_BindingDataChangedEventArgs(bindingInstance) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { + value: Microsoft.Office.WebExtension.EventType.BindingDataChanged + }, + "binding": { + value: bindingInstance + } + }); +}; +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDescriptors.BindingSelectionChangedEvent, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.BindingProperties, value: 0 }, + { name: OSF.DDA.PropertyDescriptors.Subset, value: 1 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidBindingSelectionChangedEvent, + fromHost: [ + { name: OSF.DDA.EventDescriptors.BindingSelectionChangedEvent, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidBindingDataChangedEvent, + fromHost: [{ name: OSF.DDA.PropertyDescriptors.BindingProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self }] +}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FilterType, { OnlyVisible: "onlyVisible" }); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.FilterType, + toHost: [{ name: Microsoft.Office.WebExtension.FilterType.OnlyVisible, value: 1 }] +}); +Microsoft.Office.WebExtension.GoToType={ + Binding: "binding", + NamedItem: "namedItem", + Slide: "slide", + Index: "index" +}; +Microsoft.Office.WebExtension.SelectionMode={ + Default: "default", + Selected: "selected", + None: "none" +}; +Microsoft.Office.WebExtension.Index={ + First: "first", + Last: "last", + Next: "next", + Previous: "previous" +}; +OSF.DDA.AsyncMethodNames.addNames({ GoToByIdAsync: "goToByIdAsync" }); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GoToByIdAsync, + requiredArguments: [{ + "name": Microsoft.Office.WebExtension.Parameters.Id, + "types": ["string", "number"] + }, + { + "name": Microsoft.Office.WebExtension.Parameters.GoToType, + "enum": Microsoft.Office.WebExtension.GoToType + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.SelectionMode, + value: { + "enum": Microsoft.Office.WebExtension.SelectionMode, + "defaultValue": Microsoft.Office.WebExtension.SelectionMode.Default + } + } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.GoToType, + toHost: [ + { name: Microsoft.Office.WebExtension.GoToType.Binding, value: 0 }, + { name: Microsoft.Office.WebExtension.GoToType.NamedItem, value: 1 }, + { name: Microsoft.Office.WebExtension.GoToType.Slide, value: 2 }, + { name: Microsoft.Office.WebExtension.GoToType.Index, value: 3 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.SelectionMode, + toHost: [ + { name: Microsoft.Office.WebExtension.SelectionMode.Default, value: 0 }, + { name: Microsoft.Office.WebExtension.SelectionMode.Selected, value: 1 }, + { name: Microsoft.Office.WebExtension.SelectionMode.None, value: 2 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidNavigateToMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.GoToType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.SelectionMode, value: 2 } + ] +}); +OSF.DDA.AsyncMethodNames.addNames({ + ExecuteRichApiRequestAsync: "executeRichApiRequestAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync, + requiredArguments: [ + { + name: Microsoft.Office.WebExtension.Parameters.Data, + types: ["object"] + } + ], + supportedOptions: [] +}); +OSF.OUtil.setNamespace("RichApi", OSF.DDA); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidExecuteRichApiRequestMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.FilePropertiesDescriptor={ + Url: "Url" +}; +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + FilePropertiesDescriptor: "FilePropertiesDescriptor" +}); +Microsoft.Office.WebExtension.FileProperties=function Microsoft_Office_WebExtension_FileProperties(filePropertiesDescriptor) { + OSF.OUtil.defineEnumerableProperties(this, { + "url": { + value: filePropertiesDescriptor[OSF.DDA.FilePropertiesDescriptor.Url] + } + }); +}; +OSF.DDA.AsyncMethodNames.addNames({ GetFilePropertiesAsync: "getFilePropertiesAsync" }); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor, value: 0 } + ], + requiredArguments: [], + supportedOptions: [], + onSucceeded: function (filePropertiesDescriptor, caller, callArgs) { + return new Microsoft.Office.WebExtension.FileProperties(filePropertiesDescriptor); + } +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor, + fromHost: [ + { name: OSF.DDA.FilePropertiesDescriptor.Url, value: 0 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod, + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.ExcelTableBinding=function OSF_DDA_ExcelTableBinding(id, docInstance, rows, cols, hasHeaders) { + var am=OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.ClearFormatsAsync, + am.SetTableOptionsAsync, + am.SetFormatsAsync + ]); + OSF.DDA.ExcelTableBinding.uber.constructor.call(this, id, docInstance, rows, cols, hasHeaders); + OSF.OUtil.finalizeProperties(this); +}; +OSF.OUtil.extend(OSF.DDA.ExcelTableBinding, OSF.DDA.TableBinding); +(function () { + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetSelectedDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.CellFormat, + value: { + "types": ["object"], + "defaultValue": [] + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.TableOptions, + value: { + "types": ["object"], + "defaultValue": [] + } + } + ], + privateStateCallbacks: [] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Rows, + value: { + "types": ["object", "string"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.Columns, + value: { + "types": ["object"], + "defaultValue": null + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartRow, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.StartColumn, + value: { + "types": ["number"], + "defaultValue": 0 + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.CellFormat, + value: { + "types": ["object"], + "defaultValue": [] + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.TableOptions, + value: { + "types": ["object"], + "defaultValue": [] + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + var Parameters=Microsoft.Office.WebExtension.Parameters; + if (callArgs[Parameters.StartRow]==0 && + callArgs[Parameters.StartColumn]==0 && + OSF.OUtil.isArray(callArgs[Parameters.CellFormat]) && callArgs[Parameters.CellFormat].length===0 && + OSF.OUtil.isArray(callArgs[Parameters.TableOptions]) && callArgs[Parameters.TableOptions].length===0) { + delete callArgs[Parameters.StartRow]; + delete callArgs[Parameters.StartColumn]; + delete callArgs[Parameters.CellFormat]; + delete callArgs[Parameters.TableOptions]; + } + if (callArgs[Parameters.CoercionType] !=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(caller.type) && + ((callArgs[Parameters.StartRow] && callArgs[Parameters.StartRow] !=0) || + (callArgs[Parameters.StartColumn] && callArgs[Parameters.StartColumn] !=0) || + callArgs[Parameters.CellFormat] || + callArgs[Parameters.TableOptions])) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding; + } + return callArgs; + }, + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: function (obj) { return obj.id; } + } + ] + }); + OSF.DDA.BindingPromise.prototype.setTableOptionsAsync=function OSF_DDA_BindingPromise$setTableOptionsAsync() { + var args=arguments; + this._fetch(function onComplete(binding) { binding.setTableOptionsAsync.apply(binding, args); }); + return this; + }, + OSF.DDA.BindingPromise.prototype.setFormatsAsync=function OSF_DDA_BindingPromise$setFormatsAsync() { + var args=arguments; + this._fetch(function onComplete(binding) { binding.setFormatsAsync.apply(binding, args); }); + return this; + }, + OSF.DDA.BindingPromise.prototype.clearFormatsAsync=function OSF_DDA_BindingPromise$clearFormatsAsync() { + var args=arguments; + this._fetch(function onComplete(binding) { binding.clearFormatsAsync.apply(binding, args); }); + return this; + }; +})(); +(function () { + function getObjectId(obj) { return obj.id; } + OSF.DDA.AsyncMethodNames.addNames({ + ClearFormatsAsync: "clearFormatsAsync", + SetTableOptionsAsync: "setTableOptionsAsync", + SetFormatsAsync: "setFormatsAsync" + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ClearFormatsAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetTableOptionsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.TableOptions, + "defaultValue": [] + } + ], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetFormatsAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.CellFormat, + "defaultValue": [] + } + ], + privateStateCallbacks: [ + { + name: Microsoft.Office.WebExtension.Parameters.Id, + value: getObjectId + } + ] + }); +})(); +Microsoft.Office.WebExtension.Table={ + All: 0, + Data: 1, + Headers: 2 +}; +(function () { + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidClearFormatsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ] + }); + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetTableOptionsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.TableOptions, value: 1 }, + ] + }); + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetFormatsMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.CellFormat, value: 1 }, + ] + }); + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetSelectedDataMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.CellFormat, value: 2 }, + { name: Microsoft.Office.WebExtension.Parameters.TableOptions, value: 3 } + ] + }); + OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidSetBindingDataMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 2 }, + { name: OSF.DDA.SafeArray.UniqueArguments.Offset, value: 3 }, + { name: Microsoft.Office.WebExtension.Parameters.CellFormat, value: 4 }, + { name: Microsoft.Office.WebExtension.Parameters.TableOptions, value: 5 } + ] + }); + var tableOptionProperties={ + headerRow: 0, + bandedRows: 1, + firstColumn: 2, + lastColumn: 3, + bandedColumns: 4, + filterButton: 5, + style: 6, + totalRow: 7 + }; + var cellProperties={ + row: 0, + column: 1 + }; + var formatProperties={ + alignHorizontal: { text: "alignHorizontal", type: 1 }, + alignVertical: { text: "alignVertical", type: 2 }, + backgroundColor: { text: "backgroundColor", type: 101 }, + borderStyle: { text: "borderStyle", type: 201 }, + borderColor: { text: "borderColor", type: 202 }, + borderTopStyle: { text: "borderTopStyle", type: 203 }, + borderTopColor: { text: "borderTopColor", type: 204 }, + borderBottomStyle: { text: "borderBottomStyle", type: 205 }, + borderBottomColor: { text: "borderBottomColor", type: 206 }, + borderLeftStyle: { text: "borderLeftStyle", type: 207 }, + borderLeftColor: { text: "borderLeftColor", type: 208 }, + borderRightStyle: { text: "borderRightStyle", type: 209 }, + borderRightColor: { text: "borderRightColor", type: 210 }, + borderOutlineStyle: { text: "borderOutlineStyle", type: 211 }, + borderOutlineColor: { text: "borderOutlineColor", type: 212 }, + borderInlineStyle: { text: "borderInlineStyle", type: 213 }, + borderInlineColor: { text: "borderInlineColor", type: 214 }, + fontFamily: { text: "fontFamily", type: 301 }, + fontStyle: { text: "fontStyle", type: 302 }, + fontSize: { text: "fontSize", type: 303 }, + fontUnderlineStyle: { text: "fontUnderlineStyle", type: 304 }, + fontColor: { text: "fontColor", type: 305 }, + fontDirection: { text: "fontDirection", type: 306 }, + fontStrikethrough: { text: "fontStrikethrough", type: 307 }, + fontSuperscript: { text: "fontSuperscript", type: 308 }, + fontSubscript: { text: "fontSubscript", type: 309 }, + fontNormal: { text: "fontNormal", type: 310 }, + indentLeft: { text: "indentLeft", type: 401 }, + indentRight: { text: "indentRight", type: 402 }, + numberFormat: { text: "numberFormat", type: 501 }, + width: { text: "width", type: 701 }, + height: { text: "height", type: 702 }, + wrapping: { text: "wrapping", type: 703 } + }; + var borderStyleSet=[ + { name: "none", value: 0 }, + { name: "thin", value: 1 }, + { name: "medium", value: 2 }, + { name: "dashed", value: 3 }, + { name: "dotted", value: 4 }, + { name: "thick", value: 5 }, + { name: "double", value: 6 }, + { name: "hair", value: 7 }, + { name: "medium dashed", value: 8 }, + { name: "dash dot", value: 9 }, + { name: "medium dash dot", value: 10 }, + { name: "dash dot dot", value: 11 }, + { name: "medium dash dot dot", value: 12 }, + { name: "slant dash dot", value: 13 }, + ]; + var colorSet=[ + { name: "none", value: 0 }, + { name: "black", value: 1 }, + { name: "blue", value: 2 }, + { name: "gray", value: 3 }, + { name: "green", value: 4 }, + { name: "orange", value: 5 }, + { name: "pink", value: 6 }, + { name: "purple", value: 7 }, + { name: "red", value: 8 }, + { name: "teal", value: 9 }, + { name: "turquoise", value: 10 }, + { name: "violet", value: 11 }, + { name: "white", value: 12 }, + { name: "yellow", value: 13 }, + { name: "automatic", value: 14 }, + ]; + var ns=OSF.DDA.SafeArray.Delegate.ParameterMap; + ns.define({ + type: formatProperties.alignHorizontal.text, + toHost: [ + { name: "general", value: 0 }, + { name: "left", value: 1 }, + { name: "center", value: 2 }, + { name: "right", value: 3 }, + { name: "fill", value: 4 }, + { name: "justify", value: 5 }, + { name: "center across selection", value: 6 }, + { name: "distributed", value: 7 }, + ] }); + ns.define({ + type: formatProperties.alignVertical.text, + toHost: [ + { name: "top", value: 0 }, + { name: "center", value: 1 }, + { name: "bottom", value: 2 }, + { name: "justify", value: 3 }, + { name: "distributed", value: 4 }, + ] }); + ns.define({ + type: formatProperties.backgroundColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderTopStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderTopColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderBottomStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderBottomColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderLeftStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderLeftColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderRightStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderRightColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderOutlineStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderOutlineColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.borderInlineStyle.text, + toHost: borderStyleSet + }); + ns.define({ + type: formatProperties.borderInlineColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.fontStyle.text, + toHost: [ + { name: "regular", value: 0 }, + { name: "italic", value: 1 }, + { name: "bold", value: 2 }, + { name: "bold italic", value: 3 }, + ] }); + ns.define({ + type: formatProperties.fontUnderlineStyle.text, + toHost: [ + { name: "none", value: 0 }, + { name: "single", value: 1 }, + { name: "double", value: 2 }, + { name: "single accounting", value: 3 }, + { name: "double accounting", value: 4 }, + ] }); + ns.define({ + type: formatProperties.fontColor.text, + toHost: colorSet + }); + ns.define({ + type: formatProperties.fontDirection.text, + toHost: [ + { name: "context", value: 0 }, + { name: "left-to-right", value: 1 }, + { name: "right-to-left", value: 2 }, + ] }); + ns.define({ + type: formatProperties.width.text, + toHost: [ + { name: "auto fit", value: -1 }, + ] }); + ns.define({ + type: formatProperties.height.text, + toHost: [ + { name: "auto fit", value: -1 }, + ] }); + ns.define({ + type: Microsoft.Office.WebExtension.Parameters.TableOptions, + toHost: [ + { name: "headerRow", value: 0 }, + { name: "bandedRows", value: 1 }, + { name: "firstColumn", value: 2 }, + { name: "lastColumn", value: 3 }, + { name: "bandedColumns", value: 4 }, + { name: "filterButton", value: 5 }, + { name: "style", value: 6 }, + { name: "totalRow", value: 7 } + ] }); + ns.dynamicTypes[Microsoft.Office.WebExtension.Parameters.CellFormat]={ + toHost: function (data) { + for (var entry in data) { + if (data[entry].format) { + data[entry].format=ns.doMapValues(data[entry].format, "toHost"); + } + } + return data; + }, + fromHost: function (args) { + return args; + } + }; + ns.setDynamicType(Microsoft.Office.WebExtension.Parameters.CellFormat, { + toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_CellFormat$toHost(cellFormats) { + var textCells="cells"; + var textFormat="format"; + var posCells=0; + var posFormat=1; + var ret=[]; + for (var index in cellFormats) { + var cfOld=cellFormats[index]; + var cfNew=[]; + if (typeof (cfOld[textCells]) !=='undefined') { + var cellsOld=cfOld[textCells]; + var cellsNew; + if (typeof cfOld[textCells]==="object") { + cellsNew=[]; + for (var entry in cellsOld) { + if (typeof (cellProperties[entry]) !=='undefined') { + cellsNew[cellProperties[entry]]=cellsOld[entry]; + } + } + } + else { + cellsNew=cellsOld; + } + cfNew[posCells]=cellsNew; + } + if (cfOld[textFormat]) { + var formatOld=cfOld[textFormat]; + var formatNew=[]; + for (var entry2 in formatOld) { + if (typeof (formatProperties[entry2]) !=='undefined') { + formatNew.push([ + formatProperties[entry2].type, + formatOld[entry2] + ]); + } + } + cfNew[posFormat]=formatNew; + } + ret[index]=cfNew; + } + return ret; + }, + fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_CellFormat$fromHost(hostArgs) { + return hostArgs; + } + }); + ns.setDynamicType(Microsoft.Office.WebExtension.Parameters.TableOptions, { + toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_TableOptions$toHost(tableOptions) { + var ret=[]; + for (var entry in tableOptions) { + if (typeof (tableOptionProperties[entry]) !=='undefined') { + ret[tableOptionProperties[entry]]=tableOptions[entry]; + } + } + return ret; + }, + fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_TableOptions$fromHost(hostArgs) { + return hostArgs; + } + }); +})(); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType, { Image: "image" }); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.CoercionType, + toHost: [ + { name: Microsoft.Office.WebExtension.CoercionType.Image, value: 8 } + ] +}); +OSF.DDA.ExcelDocument=function OSF_DDA_ExcelDocument(officeAppContext, settings) { + var bf=new OSF.DDA.BindingFacade(this); + OSF.DDA.DispIdHost.addAsyncMethods(bf, [OSF.DDA.AsyncMethodNames.AddFromPromptAsync]); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.GoToByIdAsync]); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync]); + OSF.DDA.ExcelDocument.uber.constructor.call(this, officeAppContext, bf, settings); + OSF.OUtil.finalizeProperties(this); +}; +OSF.OUtil.extend(OSF.DDA.ExcelDocument, OSF.DDA.JsomDocument); +OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function OSF_InitializationHelper$loadAppSpecificScriptAndCreateOM(appContext, appReady, basePath) { + OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM); + appContext.doc=new OSF.DDA.ExcelDocument(appContext, this._initializeSettings(appContext, false)); + OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi, [OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]); + appReady(); +}; +(function () { + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.SetSelectedDataAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Data, + "types": ["string", "object", "number", "boolean"] + } + ], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.CoercionType, + value: { + "enum": Microsoft.Office.WebExtension.CoercionType, + "calculate": function (requiredArgs) { + return OSF.DDA.DataCoercion.determineCoercionType(requiredArgs[Microsoft.Office.WebExtension.Parameters.Data]); + } + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.CellFormat, + value: { + "types": ["number", "object"], + "defaultValue": [] + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.TableOptions, + value: { + "types": ["number", "object"], + "defaultValue": [] + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageWidth, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ImageHeight, + value: { + "types": ["number", "boolean"], + "defaultValue": false + } + } + ], + privateStateCallbacks: [] + }); +})(); + +var __extends=(this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p]=b[p]; + function __() { this.constructor=d; } + d.prototype=b===null ? Object.create(b) : (__.prototype=b.prototype, new __()); +}; +var OfficeExtension; +(function (OfficeExtension) { + var Action=(function () { + function Action(actionInfo, isWriteOperation, isRestrictedResourceAccess) { + this.m_actionInfo=actionInfo; + this.m_isWriteOperation=isWriteOperation; + this.m_isRestrictedResourceAccess=isRestrictedResourceAccess; + } + Object.defineProperty(Action.prototype, "actionInfo", { + get: function () { + return this.m_actionInfo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Action.prototype, "isWriteOperation", { + get: function () { + return this.m_isWriteOperation; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Action.prototype, "isRestrictedResourceAccess", { + get: function () { + return this.m_isRestrictedResourceAccess; + }, + enumerable: true, + configurable: true + }); + return Action; + }()); + OfficeExtension.Action=Action; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + var TraceMarkerActionResultHandler=(function () { + function TraceMarkerActionResultHandler(callback) { + this.m_callback=callback; + } + TraceMarkerActionResultHandler.prototype._handleResult=function (value) { + if (this.m_callback) { + this.m_callback(); + } + }; + return TraceMarkerActionResultHandler; + }()); + var ActionFactory=(function () { + function ActionFactory() { + } + ActionFactory.createSetPropertyAction=function (context, parent, propertyName, value) { + OfficeExtension.Utility.validateObjectPath(parent); + var actionInfo={ + Id: context._nextId(), + ActionType: 4, + Name: propertyName, + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var args=[value]; + var referencedArgumentObjectPaths=OfficeExtension.Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); + OfficeExtension.Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + context._pendingRequest.ensureInstantiateObjectPaths(referencedArgumentObjectPaths); + var ret=new OfficeExtension.Action(actionInfo, true, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + context._pendingRequest.addReferencedObjectPaths(referencedArgumentObjectPaths); + ret.referencedObjectPath=parent._objectPath; + ret.referencedArgumentObjectPaths=referencedArgumentObjectPaths; + return ret; + }; + ActionFactory.createMethodAction=function (context, parent, methodName, operationType, args, isRestrictedResourceAccess) { + OfficeExtension.Utility.validateObjectPath(parent); + var actionInfo={ + Id: context._nextId(), + ActionType: 3, + Name: methodName, + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var referencedArgumentObjectPaths=OfficeExtension.Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); + OfficeExtension.Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + context._pendingRequest.ensureInstantiateObjectPaths(referencedArgumentObjectPaths); + var isWriteOperation=operationType !=1; + var ret=new OfficeExtension.Action(actionInfo, isWriteOperation, isRestrictedResourceAccess); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + context._pendingRequest.addReferencedObjectPaths(referencedArgumentObjectPaths); + ret.referencedObjectPath=parent._objectPath; + ret.referencedArgumentObjectPaths=referencedArgumentObjectPaths; + return ret; + }; + ActionFactory.createQueryAction=function (context, parent, queryOption) { + OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + var actionInfo={ + Id: context._nextId(), + ActionType: 2, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + }; + actionInfo.QueryInfo=queryOption; + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; + return ret; + }; + ActionFactory.createRecursiveQueryAction=function (context, parent, query) { + OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + var actionInfo={ + Id: context._nextId(), + ActionType: 6, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + RecursiveQueryInfo: query + }; + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; + return ret; + }; + ActionFactory.createQueryAsJsonAction=function (context, parent, queryOption) { + OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + var actionInfo={ + Id: context._nextId(), + ActionType: 7, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + }; + actionInfo.QueryInfo=queryOption; + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; + return ret; + }; + ActionFactory.createEnsureUnchangedAction=function (context, parent, objectState) { + OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + var actionInfo={ + Id: context._nextId(), + ActionType: 8, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }; + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; + return ret; + }; + ActionFactory.createInstantiateAction=function (context, obj) { + OfficeExtension.Utility.validateObjectPath(obj); + context._pendingRequest.ensureInstantiateObjectPath(obj._objectPath.parentObjectPath); + context._pendingRequest.ensureInstantiateObjectPaths(obj._objectPath.argumentObjectPaths); + var actionInfo={ + Id: context._nextId(), + ActionType: 1, + Name: "", + ObjectPathId: obj._objectPath.objectPathInfo.Id + }; + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(obj._objectPath); + context._pendingRequest.addActionResultHandler(ret, new OfficeExtension.InstantiateActionResultHandler(obj)); + ret.referencedObjectPath=obj._objectPath; + return ret; + }; + ActionFactory.createTraceAction=function (context, message, addTraceMessage) { + var actionInfo={ + Id: context._nextId(), + ActionType: 5, + Name: "Trace", + ObjectPathId: 0 + }; + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + if (addTraceMessage) { + context._pendingRequest.addTrace(actionInfo.Id, message); + } + return ret; + }; + ActionFactory.createTraceMarkerForCallback=function (context, callback) { + var action=ActionFactory.createTraceAction(context, null, false); + context._pendingRequest.addActionResultHandler(action, new TraceMarkerActionResultHandler(callback)); + }; + return ActionFactory; + }()); + OfficeExtension.ActionFactory=ActionFactory; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + var ClientObject=(function () { + function ClientObject(context, objectPath) { + OfficeExtension.Utility.checkArgumentNull(context, "context"); + this.m_context=context; + this.m_objectPath=objectPath; + if (this.m_objectPath) { + if (!context._processingResult) { + OfficeExtension.ActionFactory.createInstantiateAction(context, this); + if ((context._autoCleanup) && (this._KeepReference)) { + context.trackedObjects._autoAdd(this); + } + } + } + } + Object.defineProperty(ClientObject.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObject.prototype, "_objectPath", { + get: function () { + return this.m_objectPath; + }, + set: function (value) { + this.m_objectPath=value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObject.prototype, "isNull", { + get: function () { + OfficeExtension.Utility.throwIfNotLoaded("isNull", this._isNull, null, this._isNull); + return this._isNull; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObject.prototype, "isNullObject", { + get: function () { + OfficeExtension.Utility.throwIfNotLoaded("isNullObject", this._isNull, null, this._isNull); + return this._isNull; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientObject.prototype, "_isNull", { + get: function () { + return this.m_isNull; + }, + set: function (value) { + this.m_isNull=value; + if (value && this.m_objectPath) { + this.m_objectPath._updateAsNullObject(); + } + }, + enumerable: true, + configurable: true + }); + ClientObject.prototype._handleResult=function (value) { + this._isNull=OfficeExtension.Utility.isNullOrUndefined(value); + this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this, value); + }; + ClientObject.prototype._handleIdResult=function (value) { + this._isNull=OfficeExtension.Utility.isNullOrUndefined(value); + OfficeExtension.Utility.fixObjectPathIfNecessary(this, value); + this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this, value); + }; + ClientObject.prototype._recursivelySet=function (input, options, scalarWriteablePropertyNames, objectPropertyNames, notAllowedToBeSetPropertyNames) { + var isClientObject=(input instanceof ClientObject); + var originalInput=input; + if (isClientObject) { + if (Object.getPrototypeOf(this)===Object.getPrototypeOf(input)) { + input=JSON.parse(JSON.stringify(input)); + } + else { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError({ + argumentName: 'properties', + errorLocation: this._className+".set" + }); + } + } + try { + var prop; + for (var i=0; i < scalarWriteablePropertyNames.length; i++) { + prop=scalarWriteablePropertyNames[i]; + if (input.hasOwnProperty(prop)) { + if (typeof input[prop] !=="undefined") { + this[prop]=input[prop]; + } + } + } + for (var i=0; i < objectPropertyNames.length; i++) { + prop=objectPropertyNames[i]; + if (input.hasOwnProperty(prop)) { + if (typeof input[prop] !=="undefined") { + var dataToPassToSet=isClientObject ? originalInput[prop] : input[prop]; + this[prop].set(dataToPassToSet, options); + } + } + } + var throwOnReadOnly=!isClientObject; + if (options && !OfficeExtension.Utility.isNullOrUndefined(throwOnReadOnly)) { + throwOnReadOnly=options.throwOnReadOnly; + } + for (var i=0; i < notAllowedToBeSetPropertyNames.length; i++) { + prop=notAllowedToBeSetPropertyNames[i]; + if (input.hasOwnProperty(prop)) { + if (typeof input[prop] !=="undefined" && throwOnReadOnly) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.invalidArgument, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), + debugInfo: { + errorLocation: prop + } + }); + } + } + } + for (prop in input) { + if (scalarWriteablePropertyNames.indexOf(prop) < 0 && objectPropertyNames.indexOf(prop) < 0) { + var propertyDescriptor=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this), prop); + if (!propertyDescriptor) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.invalidArgument, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.propertyDoesNotExist, prop), + debugInfo: { + errorLocation: prop + } + }); + } + if (throwOnReadOnly && !propertyDescriptor.set) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.invalidArgument, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.attemptingToSetReadOnlyProperty, prop), + debugInfo: { + errorLocation: prop + } + }); + } + } + } + } + catch (innerError) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.invalidArgument, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidArgument, 'properties'), + debugInfo: { + errorLocation: this._className+".set" + }, + innerError: innerError + }); + } + }; + return ClientObject; + }()); + OfficeExtension.ClientObject=ClientObject; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + var ClientRequest=(function () { + function ClientRequest(context) { + this.m_context=context; + this.m_actions=[]; + this.m_actionResultHandler={}; + this.m_referencedObjectPaths={}; + this.m_instantiatedObjectPaths={}; + this.m_flags=0; + this.m_traceInfos={}; + this.m_pendingProcessEventHandlers=[]; + this.m_pendingEventHandlerActions={}; + this.m_responseTraceIds={}; + this.m_responseTraceMessages=[]; + this.m_preSyncPromises=[]; + } + Object.defineProperty(ClientRequest.prototype, "flags", { + get: function () { + return this.m_flags; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "traceInfos", { + get: function () { + return this.m_traceInfos; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_responseTraceMessages", { + get: function () { + return this.m_responseTraceMessages; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_responseTraceIds", { + get: function () { + return this.m_responseTraceIds; + }, + enumerable: true, + configurable: true + }); + ClientRequest.prototype._setResponseTraceIds=function (value) { + if (value) { + for (var i=0; i < value.length; i++) { + var traceId=value[i]; + this.m_responseTraceIds[traceId]=traceId; + var message=this.m_traceInfos[traceId]; + if (!OfficeExtension.Utility.isNullOrUndefined(message)) { + this.m_responseTraceMessages.push(message); + } + } + } + }; + ClientRequest.prototype.addAction=function (action) { + if (action.isWriteOperation) { + this.m_flags=this.m_flags | 1; + } + if (action.isRestrictedResourceAccess) { + this.m_flags=this.m_flags | 2; + } + this.m_actions.push(action); + if (action.actionInfo.ActionType==1) { + this.m_instantiatedObjectPaths[action.actionInfo.ObjectPathId]=action; + } + }; + Object.defineProperty(ClientRequest.prototype, "hasActions", { + get: function () { + return this.m_actions.length > 0; + }, + enumerable: true, + configurable: true + }); + ClientRequest.prototype._getLastAction=function () { + return this.m_actions[this.m_actions.length - 1]; + }; + ClientRequest.prototype.addTrace=function (actionId, message) { + this.m_traceInfos[actionId]=message; + }; + ClientRequest.prototype.ensureInstantiateObjectPath=function (objectPath) { + if (objectPath) { + if (this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + this.ensureInstantiateObjectPath(objectPath.parentObjectPath); + this.ensureInstantiateObjectPaths(objectPath.argumentObjectPaths); + if (!this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + var actionInfo={ + Id: this.m_context._nextId(), + ActionType: 1, + Name: "", + ObjectPathId: objectPath.objectPathInfo.Id + }; + var instantiateAction=new OfficeExtension.Action(actionInfo, false, false); + instantiateAction.referencedObjectPath=objectPath; + this.addAction(instantiateAction); + } + } + }; + ClientRequest.prototype.ensureInstantiateObjectPaths=function (objectPaths) { + if (objectPaths) { + for (var i=0; i < objectPaths.length; i++) { + this.ensureInstantiateObjectPath(objectPaths[i]); + } + } + }; + ClientRequest.prototype.addReferencedObjectPath=function (objectPath) { + if (this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + if (!objectPath.isValid) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.invalidObjectPath, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidObjectPath, OfficeExtension.Utility.getObjectPathExpression(objectPath)), + debugInfo: { + errorLocation: OfficeExtension.Utility.getObjectPathExpression(objectPath) + } + }); + } + while (objectPath) { + if (objectPath.isWriteOperation) { + this.m_flags=this.m_flags | 1; + } + if (objectPath.isRestrictedResourceAccess) { + this.m_flags=this.m_flags | 2; + } + this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]=objectPath; + if (objectPath.objectPathInfo.ObjectPathType==3) { + this.addReferencedObjectPaths(objectPath.argumentObjectPaths); + } + objectPath=objectPath.parentObjectPath; + } + }; + ClientRequest.prototype.addReferencedObjectPaths=function (objectPaths) { + if (objectPaths) { + for (var i=0; i < objectPaths.length; i++) { + this.addReferencedObjectPath(objectPaths[i]); + } + } + }; + ClientRequest.prototype.addActionResultHandler=function (action, resultHandler) { + this.m_actionResultHandler[action.actionInfo.Id]=resultHandler; + }; + ClientRequest.prototype.buildRequestMessageBody=function () { + if (OfficeExtension._internalConfig.enableEarlyDispose) { + ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + var objectPaths={}; + for (var i in this.m_referencedObjectPaths) { + objectPaths[i]=this.m_referencedObjectPaths[i].objectPathInfo; + } + var actions=[]; + for (var index=0; index < this.m_actions.length; index++) { + actions.push(this.m_actions[index].actionInfo); + } + var ret={ + AutoKeepReference: this.m_context._autoCleanup, + Actions: actions, + ObjectPaths: objectPaths + }; + return ret; + }; + ClientRequest.prototype.processResponse=function (actionResults) { + if (actionResults) { + for (var i=0; i < actionResults.length; i++) { + var actionResult=actionResults[i]; + var handler=this.m_actionResultHandler[actionResult.ActionId]; + if (handler) { + handler._handleResult(actionResult.Value); + } + } + } + }; + ClientRequest.prototype.invalidatePendingInvalidObjectPaths=function () { + for (var i in this.m_referencedObjectPaths) { + if (this.m_referencedObjectPaths[i].isInvalidAfterRequest) { + this.m_referencedObjectPaths[i].isValid=false; + } + } + }; + ClientRequest.prototype._addPendingEventHandlerAction=function (eventHandlers, action) { + if (!this.m_pendingEventHandlerActions[eventHandlers._id]) { + this.m_pendingEventHandlerActions[eventHandlers._id]=[]; + this.m_pendingProcessEventHandlers.push(eventHandlers); + } + this.m_pendingEventHandlerActions[eventHandlers._id].push(action); + }; + Object.defineProperty(ClientRequest.prototype, "_pendingProcessEventHandlers", { + get: function () { + return this.m_pendingProcessEventHandlers; + }, + enumerable: true, + configurable: true + }); + ClientRequest.prototype._getPendingEventHandlerActions=function (eventHandlers) { + return this.m_pendingEventHandlerActions[eventHandlers._id]; + }; + ClientRequest.prototype._addPreSyncPromise=function (value) { + this.m_preSyncPromises.push(value); + }; + Object.defineProperty(ClientRequest.prototype, "_preSyncPromises", { + get: function () { + return this.m_preSyncPromises; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_actions", { + get: function () { + return this.m_actions; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_objectPaths", { + get: function () { + return this.m_referencedObjectPaths; + }, + enumerable: true, + configurable: true + }); + ClientRequest._updateLastUsedActionIdOfObjectPathId=function (lastUsedActionIdOfObjectPathId, objectPath, actionId) { + while (objectPath) { + if (lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]) { + return; + } + lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]=actionId; + var argumentObjectPaths=objectPath.argumentObjectPaths; + if (argumentObjectPaths) { + var argumentObjectPathsLength=argumentObjectPaths.length; + for (var i=0; i < argumentObjectPathsLength; i++) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, argumentObjectPaths[i], actionId); + } + } + objectPath=objectPath.parentObjectPath; + } + }; + ClientRequest._calculateLastUsedObjectPathIds=function (actions) { + var lastUsedActionIdOfObjectPathId={}; + var actionsLength=actions.length; + for (var index=actionsLength - 1; index >=0; --index) { + var action=actions[index]; + var actionId=action.actionInfo.Id; + if (action.referencedObjectPath) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, action.referencedObjectPath, actionId); + } + var referencedObjectPaths=action.referencedArgumentObjectPaths; + if (referencedObjectPaths) { + var referencedObjectPathsLength=referencedObjectPaths.length; + for (var refIndex=0; refIndex < referencedObjectPathsLength; refIndex++) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, referencedObjectPaths[refIndex], actionId); + } + } + } + var lastUsedObjectPathIdsOfAction={}; + for (var key in lastUsedActionIdOfObjectPathId) { + var actionId=lastUsedActionIdOfObjectPathId[key]; + var objectPathIds=lastUsedObjectPathIdsOfAction[actionId]; + if (!objectPathIds) { + objectPathIds=[]; + lastUsedObjectPathIdsOfAction[actionId]=objectPathIds; + } + objectPathIds.push(parseInt(key)); + } + for (var index=0; index < actionsLength; index++) { + var action=actions[index]; + var lastUsedObjectPathIds=lastUsedObjectPathIdsOfAction[action.actionInfo.Id]; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + action.actionInfo.L=lastUsedObjectPathIds; + } + else if (action.actionInfo.L) { + delete action.actionInfo.L; + } + } + }; + return ClientRequest; + }()); + OfficeExtension.ClientRequest=ClientRequest; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + OfficeExtension._internalConfig={ + showDisposeInfoInDebugInfo: false, + enableEarlyDispose: true, + alwaysPolyfillClientObjectFetchMethod: false + }; + var SessionBase=(function () { + function SessionBase() { + } + SessionBase.prototype._resolveRequestUrlAndHeaderInfo=function () { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + SessionBase.prototype._createRequestExecutorOrNull=function () { + return null; + }; + Object.defineProperty(SessionBase.prototype, "eventRegistration", { + get: function () { + return OfficeExtension._Internal.officeJsEventRegistration; + }, + enumerable: true, + configurable: true + }); + return SessionBase; + }()); + OfficeExtension.SessionBase=SessionBase; + var ClientRequestContext=(function () { + function ClientRequestContext(url) { + this.m_customRequestHeaders={}; + this._onRunFinishedNotifiers=[]; + this.m_nextId=0; + if (ClientRequestContext._overrideSession) { + this.m_requestUrlAndHeaderInfoResolver=ClientRequestContext._overrideSession; + } + else { + if (OfficeExtension.Utility.isNullOrUndefined(url) || typeof (url)==="string" && url.length===0) { + url=ClientRequestContext.defaultRequestUrlAndHeaders; + if (!url) { + url={ url: OfficeExtension.Constants.localDocument, headers: {} }; + } + } + if (typeof (url)==="string") { + this.m_requestUrlAndHeaderInfo={ url: url, headers: {} }; + } + else if (ClientRequestContext.isRequestUrlAndHeaderInfoResolver(url)) { + this.m_requestUrlAndHeaderInfoResolver=url; + } + else if (ClientRequestContext.isRequestUrlAndHeaderInfo(url)) { + var requestInfo=url; + this.m_requestUrlAndHeaderInfo={ url: requestInfo.url, headers: {} }; + OfficeExtension.Utility._copyHeaders(requestInfo.headers, this.m_requestUrlAndHeaderInfo.headers); + } + else { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("url"); + } + } + if (this.m_requestUrlAndHeaderInfoResolver instanceof SessionBase) { + this.m_session=this.m_requestUrlAndHeaderInfoResolver; + } + this._processingResult=false; + this._customData=OfficeExtension.Constants.iterativeExecutor; + this.sync=this.sync.bind(this); + } + Object.defineProperty(ClientRequestContext.prototype, "session", { + get: function () { + return this.m_session; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "eventRegistration", { + get: function () { + if (this.m_session) { + return this.m_session.eventRegistration; + } + return OfficeExtension._Internal.officeJsEventRegistration; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "_url", { + get: function () { + if (this.m_requestUrlAndHeaderInfo) { + return this.m_requestUrlAndHeaderInfo.url; + } + return null; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "_pendingRequest", { + get: function () { + if (this.m_pendingRequest==null) { + this.m_pendingRequest=new OfficeExtension.ClientRequest(this); + } + return this.m_pendingRequest; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "debugInfo", { + get: function () { + var prettyPrinter=new OfficeExtension.RequestPrettyPrinter(this._rootObjectPropertyName, this._pendingRequest._objectPaths, this._pendingRequest._actions, OfficeExtension._internalConfig.showDisposeInfoInDebugInfo); + var statements=prettyPrinter.process(); + return { pendingStatements: statements }; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "trackedObjects", { + get: function () { + if (!this.m_trackedObjects) { + this.m_trackedObjects=new OfficeExtension.TrackedObjects(this); + } + return this.m_trackedObjects; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequestContext.prototype, "requestHeaders", { + get: function () { + return this.m_customRequestHeaders; + }, + enumerable: true, + configurable: true + }); + ClientRequestContext.prototype.load=function (clientObj, option) { + OfficeExtension.Utility.validateContext(this, clientObj); + var queryOption=ClientRequestContext._parseQueryOption(option); + var action=OfficeExtension.ActionFactory.createQueryAction(this, clientObj, queryOption); + this._pendingRequest.addActionResultHandler(action, clientObj); + }; + ClientRequestContext.isLoadOption=function (loadOption) { + if (!OfficeExtension.Utility.isUndefined(loadOption.select) && (typeof (loadOption.select)==="string" || Array.isArray(loadOption.select))) + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.expand) && (typeof (loadOption.expand)==="string" || Array.isArray(loadOption.expand))) + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.top) && typeof (loadOption.top)==="number") + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.skip) && typeof (loadOption.skip)==="number") + return true; + for (var i in loadOption) { + return false; + } + return true; + }; + ClientRequestContext.parseStrictLoadOption=function (option) { + var ret={ Select: [] }; + ClientRequestContext.parseStrictLoadOptionHelper(ret, "", "option", option); + return ret; + }; + ClientRequestContext.combineQueryPath=function (pathPrefix, key, separator) { + if (pathPrefix.length===0) { + return key; + } + else { + return pathPrefix+separator+key; + } + }; + ClientRequestContext.parseStrictLoadOptionHelper=function (queryInfo, pathPrefix, argPrefix, option) { + for (var key in option) { + var value=option[key]; + if (key==="$all") { + if (typeof (value) !=="boolean") { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + if (value) { + queryInfo.Select.push(ClientRequestContext.combineQueryPath(pathPrefix, "*", "/")); + } + } + else if (key==="$top") { + if (typeof (value) !=="number" || pathPrefix.length > 0) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + queryInfo.Top=value; + } + else if (key==="$skip") { + if (typeof (value) !=="number" || pathPrefix.length > 0) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + queryInfo.Skip=value; + } + else { + if (typeof (value)==="boolean") { + if (value) { + queryInfo.Select.push(ClientRequestContext.combineQueryPath(pathPrefix, key, "/")); + } + } + else if (typeof (value)==="object") { + ClientRequestContext.parseStrictLoadOptionHelper(queryInfo, ClientRequestContext.combineQueryPath(pathPrefix, key, "/"), ClientRequestContext.combineQueryPath(argPrefix, key, "."), value); + } + else { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + } + } + }; + ClientRequestContext._parseQueryOption=function (option) { + var queryOption={}; + if (typeof (option)=="string") { + var select=option; + queryOption.Select=OfficeExtension.Utility._parseSelectExpand(select); + } + else if (Array.isArray(option)) { + queryOption.Select=option; + } + else if (typeof (option)==="object") { + var loadOption=option; + if (ClientRequestContext.isLoadOption(loadOption)) { + if (typeof (loadOption.select)=="string") { + queryOption.Select=OfficeExtension.Utility._parseSelectExpand(loadOption.select); + } + else if (Array.isArray(loadOption.select)) { + queryOption.Select=loadOption.select; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.select)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.select"); + } + if (typeof (loadOption.expand)=="string") { + queryOption.Expand=OfficeExtension.Utility._parseSelectExpand(loadOption.expand); + } + else if (Array.isArray(loadOption.expand)) { + queryOption.Expand=loadOption.expand; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.expand)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.expand"); + } + if (typeof (loadOption.top)==="number") { + queryOption.Top=loadOption.top; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.top)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.top"); + } + if (typeof (loadOption.skip)==="number") { + queryOption.Skip=loadOption.skip; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.skip)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.skip"); + } + } + else { + queryOption=ClientRequestContext.parseStrictLoadOption(option); + } + } + else if (!OfficeExtension.Utility.isNullOrUndefined(option)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option"); + } + return queryOption; + }; + ClientRequestContext.prototype.loadRecursive=function (clientObj, options, maxDepth) { + if (!OfficeExtension.Utility.isPlainJsonObject(options)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("options"); + } + var quries={}; + for (var key in options) { + quries[key]=ClientRequestContext._parseQueryOption(options[key]); + } + var action=OfficeExtension.ActionFactory.createRecursiveQueryAction(this, clientObj, { Queries: quries, MaxDepth: maxDepth }); + this._pendingRequest.addActionResultHandler(action, clientObj); + }; + ClientRequestContext.prototype.trace=function (message) { + OfficeExtension.ActionFactory.createTraceAction(this, message, true); + }; + ClientRequestContext.prototype._processOfficeJsErrorResponse=function (officeJsErrorCode, response) { + }; + ClientRequestContext.prototype.syncPrivateMain=function () { + var _this=this; + return OfficeExtension.Utility._createPromiseFromResult(null) + .then(function () { + if (!_this.m_requestUrlAndHeaderInfo) { + return _this.m_requestUrlAndHeaderInfoResolver._resolveRequestUrlAndHeaderInfo() + .then(function (value) { + _this.m_requestUrlAndHeaderInfo=value; + if (!_this.m_requestUrlAndHeaderInfo) { + _this.m_requestUrlAndHeaderInfo={ url: OfficeExtension.Constants.localDocument, headers: {} }; + } + if (OfficeExtension.Utility.isNullOrEmptyString(_this.m_requestUrlAndHeaderInfo.url)) { + _this.m_requestUrlAndHeaderInfo.url=OfficeExtension.Constants.localDocument; + } + if (!_this.m_requestUrlAndHeaderInfo.headers) { + _this.m_requestUrlAndHeaderInfo.headers={}; + } + if (typeof (_this.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull)==="function") { + var executor=_this.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull(); + if (executor) { + _this._requestExecutor=executor; + } + } + }); + } + }) + .then(function () { + var req=_this._pendingRequest; + _this.m_pendingRequest=null; + return _this.processPreSyncPromises(req) + .then(function () { return _this.syncPrivate(req); }); + }); + }; + ClientRequestContext.prototype.syncPrivate=function (req) { + var _this=this; + if (!req.hasActions) { + return this.processPendingEventHandlers(req); + } + var msgBody=req.buildRequestMessageBody(); + var requestFlags=req.flags; + if (!this._requestExecutor) { + if (OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)) { + this._requestExecutor=new OfficeExtension.OfficeJsRequestExecutor(this); + } + else { + this._requestExecutor=new OfficeExtension.HttpRequestExecutor(); + } + } + var requestExecutor=this._requestExecutor; + var headers={}; + OfficeExtension.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers, headers); + OfficeExtension.Utility._copyHeaders(this.m_customRequestHeaders, headers); + var requestExecutorRequestMessage={ + Url: this.m_requestUrlAndHeaderInfo.url, + Headers: headers, + Body: msgBody + }; + req.invalidatePendingInvalidObjectPaths(); + var errorFromResponse=null; + var errorFromProcessEventHandlers=null; + this._lastSyncStart=performance.now(); + return requestExecutor.executeAsync(this._customData, requestFlags, requestExecutorRequestMessage) + .then(function (response) { + _this._lastSyncEnd=performance.now(); + errorFromResponse=_this.processRequestExecutorResponseMessage(req, response); + return _this.processPendingEventHandlers(req) + .catch(function (ex) { + OfficeExtension.Utility.log("Error in processPendingEventHandlers"); + OfficeExtension.Utility.log(JSON.stringify(ex)); + errorFromProcessEventHandlers=ex; + }); + }) + .then(function () { + if (errorFromResponse) { + OfficeExtension.Utility.log("Throw error from response: "+JSON.stringify(errorFromResponse)); + throw errorFromResponse; + } + if (errorFromProcessEventHandlers) { + OfficeExtension.Utility.log("Throw error from ProcessEventHandler: "+JSON.stringify(errorFromProcessEventHandlers)); + var transformedError=null; + if (errorFromProcessEventHandlers instanceof OfficeExtension._Internal.RuntimeError) { + transformedError=errorFromProcessEventHandlers; + transformedError.traceMessages=req._responseTraceMessages; + } + else { + var message=null; + if (typeof (errorFromProcessEventHandlers)==="string") { + message=errorFromProcessEventHandlers; + } + else { + message=errorFromProcessEventHandlers.message; + } + if (OfficeExtension.Utility.isNullOrEmptyString(message)) { + message=OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.cannotRegisterEvent); + } + transformedError=new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.cannotRegisterEvent, + message: message, + traceMessages: req._responseTraceMessages + }); + } + throw transformedError; + } + }); + }; + ClientRequestContext.prototype.processRequestExecutorResponseMessage=function (req, response) { + if (response.Body && response.Body.TraceIds) { + req._setResponseTraceIds(response.Body.TraceIds); + } + var traceMessages=req._responseTraceMessages; + var errorStatementInfo=null; + if (response.Body) { + if (response.Body.Error && + response.Body.Error.ActionIndex >=0) { + var prettyPrinter=new OfficeExtension.RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions); + errorStatementInfo=prettyPrinter.processForDebugStatementInfo(response.Body.Error.ActionIndex); + } + var actionResults=null; + if (response.Body.Results) { + actionResults=response.Body.Results; + } + else if (response.Body.ProcessedResults && response.Body.ProcessedResults.Results) { + actionResults=response.Body.ProcessedResults.Results; + } + if (actionResults) { + this._processingResult=true; + try { + req.processResponse(actionResults); + } + finally { + this._processingResult=false; + } + } + } + if (!OfficeExtension.Utility.isNullOrEmptyString(response.ErrorCode)) { + return new OfficeExtension._Internal.RuntimeError({ + code: response.ErrorCode, + message: response.ErrorMessage, + traceMessages: traceMessages + }); + } + else if (response.Body && response.Body.Error) { + var debugInfo={ + errorLocation: response.Body.Error.Location + }; + if (errorStatementInfo) { + debugInfo.statement=errorStatementInfo.statement; + debugInfo.surroundingStatements=errorStatementInfo.surroundingStatements; + } + return new OfficeExtension._Internal.RuntimeError({ + code: response.Body.Error.Code, + message: response.Body.Error.Message, + traceMessages: traceMessages, + debugInfo: debugInfo + }); + } + return null; + }; + ClientRequestContext.prototype.processPendingEventHandlers=function (req) { + var ret=OfficeExtension.Utility._createPromiseFromResult(null); + for (var i=0; i < req._pendingProcessEventHandlers.length; i++) { + var eventHandlers=req._pendingProcessEventHandlers[i]; + ret=ret.then(this.createProcessOneEventHandlersFunc(eventHandlers, req)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneEventHandlersFunc=function (eventHandlers, req) { + return function () { return eventHandlers._processRegistration(req); }; + }; + ClientRequestContext.prototype.processPreSyncPromises=function (req) { + var ret=OfficeExtension.Utility._createPromiseFromResult(null); + for (var i=0; i < req._preSyncPromises.length; i++) { + var p=req._preSyncPromises[i]; + ret=ret.then(this.createProcessOneProSyncFunc(p)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneProSyncFunc=function (p) { + return function () { return p; }; + }; + ClientRequestContext.prototype.sync=function (passThroughValue) { + return this.syncPrivateMain().then(function () { return passThroughValue; }); + }; + ClientRequestContext._run=function (ctxInitializer, batch, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts===void 0) { numCleanupAttempts=3; } + if (retryDelay===void 0) { retryDelay=5000; } + return ClientRequestContext._runCommon("run", null, ctxInitializer, batch, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext.isRequestUrlAndHeaderInfo=function (value) { + return (typeof (value)==="object" && + value !==null && + Object.getPrototypeOf(value)===Object.getPrototypeOf({}) && + !OfficeExtension.Utility.isNullOrUndefined(value.url)); + }; + ClientRequestContext.isRequestUrlAndHeaderInfoResolver=function (value) { + return (typeof (value)==="object" && + value !==null && + typeof (value._resolveRequestUrlAndHeaderInfo)==="function"); + }; + ClientRequestContext._runBatch=function (functionName, receivedRunArgs, ctxInitializer, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { + if (numCleanupAttempts===void 0) { numCleanupAttempts=3; } + if (retryDelay===void 0) { retryDelay=5000; } + var ctxRetriever; + var batch; + var requestInfo=null; + var argOffset=0; + if (receivedRunArgs.length > 0 && + (typeof (receivedRunArgs[0])==="string" || + ClientRequestContext.isRequestUrlAndHeaderInfo(receivedRunArgs[0]) || + ClientRequestContext.isRequestUrlAndHeaderInfoResolver(receivedRunArgs[0]))) { + requestInfo=receivedRunArgs[0]; + argOffset=1; + } + if (receivedRunArgs.length==argOffset+1) { + ctxRetriever=ctxInitializer; + batch=receivedRunArgs[argOffset+0]; + } + else if (receivedRunArgs.length==argOffset+2) { + if (OfficeExtension.Utility.isNullOrUndefined(receivedRunArgs[argOffset+0])) { + ctxRetriever=ctxInitializer; + } + else if (receivedRunArgs[argOffset+0] instanceof OfficeExtension.ClientObject) { + ctxRetriever=function () { return receivedRunArgs[argOffset+0].context; }; + } + else if (receivedRunArgs[argOffset+0] instanceof ClientRequestContext) { + ctxRetriever=function () { return receivedRunArgs[argOffset+0]; }; + } + else if (Array.isArray(receivedRunArgs[argOffset+0])) { + var array=receivedRunArgs[argOffset+0]; + if (array.length==0) { + return ClientRequestContext.createErrorPromise(functionName); + } + for (var i=0; i < array.length; i++) { + if (!(array[i] instanceof OfficeExtension.ClientObject)) { + return ClientRequestContext.createErrorPromise(functionName); + } + if (array[i].context !=array[0].context) { + return ClientRequestContext.createErrorPromise(functionName, OfficeExtension.ResourceStrings.invalidRequestContext); + } + } + ctxRetriever=function () { return array[0].context; }; + } + else { + return ClientRequestContext.createErrorPromise(functionName); + } + batch=receivedRunArgs[argOffset+1]; + } + else { + return ClientRequestContext.createErrorPromise(functionName); + } + return ClientRequestContext._runCommon(functionName, requestInfo, ctxRetriever, batch, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure); + }; + ClientRequestContext.createErrorPromise=function (functionName, code) { + if (code===void 0) { code=OfficeExtension.ResourceStrings.invalidArgument; } + return OfficeExtension._Internal.OfficePromise.reject(OfficeExtension.Utility.createRuntimeError(code, OfficeExtension.Utility._getResourceString(code), functionName)); + }; + ClientRequestContext._runCommon=function (functionName, requestInfo, ctxRetriever, batch, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { + if (ClientRequestContext._overrideSession) { + requestInfo=ClientRequestContext._overrideSession; + } + var starterPromise=new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { resolve(); }); + var ctx; + var succeeded=false; + var resultOrError; + return starterPromise + .then(function () { + ctx=ctxRetriever(requestInfo); + if (ctx._autoCleanup) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { + ctx._onRunFinishedNotifiers.push(function () { + ctx._autoCleanup=true; + resolve(); + }); + }); + } + else { + ctx._autoCleanup=true; + } + }) + .then(function () { + if (typeof batch !=='function') { + return ClientRequestContext.createErrorPromise(functionName); + } + var batchResult=batch(ctx); + if (OfficeExtension.Utility.isNullOrUndefined(batchResult) || (typeof batchResult.then !=='function')) { + OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.runMustReturnPromise); + } + return batchResult; + }) + .then(function (batchResult) { + return ctx.sync(batchResult); + }) + .then(function (result) { + succeeded=true; + resultOrError=result; + }) + .catch(function (error) { + resultOrError=error; + }) + .then(function () { + var itemsToRemove=ctx.trackedObjects._retrieveAndClearAutoCleanupList(); + ctx._autoCleanup=false; + for (var key in itemsToRemove) { + itemsToRemove[key]._objectPath.isValid=false; + } + var cleanupCounter=0; + if (OfficeExtension.Utility._synchronousCleanup || ClientRequestContext.isRequestUrlAndHeaderInfoResolver(requestInfo)) { + return attemptCleanup(); + } + else { + attemptCleanup(); + } + function attemptCleanup() { + cleanupCounter++; + for (var key in itemsToRemove) { + ctx.trackedObjects.remove(itemsToRemove[key]); + } + return ctx.sync() + .then(function () { + if (onCleanupSuccess) { + onCleanupSuccess(cleanupCounter); + } + }) + .catch(function () { + if (onCleanupFailure) { + onCleanupFailure(cleanupCounter); + } + if (cleanupCounter < numCleanupAttempts) { + setTimeout(function () { + attemptCleanup(); + }, retryDelay); + } + }); + } + }) + .then(function () { + if (ctx._onRunFinishedNotifiers && ctx._onRunFinishedNotifiers.length > 0) { + var func=ctx._onRunFinishedNotifiers.shift(); + func(); + } + if (succeeded) { + return resultOrError; + } + else { + throw resultOrError; + } + }); + }; + ClientRequestContext.prototype._nextId=function () { + return++this.m_nextId; + }; + return ClientRequestContext; + }()); + OfficeExtension.ClientRequestContext=ClientRequestContext; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + var ClientResult=(function () { + function ClientResult(type) { + this.m_type=type; + } + Object.defineProperty(ClientResult.prototype, "value", { + get: function () { + if (!this.m_isLoaded) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.valueNotLoaded, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: "clientResult.value" + } + }); + } + return this.m_value; + }, + enumerable: true, + configurable: true + }); + ClientResult.prototype._handleResult=function (value) { + this.m_isLoaded=true; + if (typeof (value)==="object" && value && value._IsNull) { + return; + } + if (this.m_type===1) { + this.m_value=OfficeExtension.Utility.adjustToDateTime(value); + } + else { + this.m_value=value; + } + }; + return ClientResult; + }()); + OfficeExtension.ClientResult=ClientResult; + var FetchResult=(function () { + function FetchResult(m_proxy, m_shouldPolyfill) { + this.m_proxy=m_proxy; + this.m_shouldPolyfill=m_shouldPolyfill; + } + Object.defineProperty(FetchResult.prototype, "proxy", { + get: function () { + return this.m_proxy; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FetchResult.prototype, "json", { + get: function () { + if (!this.m_isLoaded) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.valueNotLoaded, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: "fetchResult.json" + } + }); + } + return this.m_json; + }, + enumerable: true, + configurable: true + }); + FetchResult.prototype._handleResult=function (value) { + this.m_isLoaded=true; + if (typeof (value)==="object" && value && value._IsNull) { + this.m_json=null; + return; + } + if (this.m_shouldPolyfill) { + this.m_json=this.changePropertyNameToCamelLowerCase(value); + } + else { + this.m_json=value; + } + }; + FetchResult.prototype.changePropertyNameToCamelLowerCase=function (value) { + var charCodeUnderscore=95; + if (Array.isArray(value)) { + var ret=[]; + for (var i=0; i < value.length; i++) { + ret.push(this.changePropertyNameToCamelLowerCase(value[i])); + } + return ret; + } + else if (typeof (value)==="object" && value !==null) { + var ret={}; + for (var key in value) { + var propValue=value[key]; + if (key==="_Items") { + ret={}; + ret["items"]=this.changePropertyNameToCamelLowerCase(propValue); + break; + } + else if (key.charCodeAt(0) !==charCodeUnderscore) { + var propName=OfficeExtension.Utility._toCamelLowerCase(key); + ret[propName]=this.changePropertyNameToCamelLowerCase(propValue); + } + } + return ret; + } + else { + return value; + } + }; + return FetchResult; + }()); + OfficeExtension.FetchResult=FetchResult; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + var Constants=(function () { + function Constants() { + } + Constants.flags="flags"; + Constants.getItemAt="GetItemAt"; + Constants.id="Id"; + Constants.idPrivate="_Id"; + Constants.index="_Index"; + Constants.items="_Items"; + Constants.iterativeExecutor="IterativeExecutor"; + Constants.localDocument="http://document.localhost/"; + Constants.localDocumentApiPrefix="http://document.localhost/_api/"; + Constants.processQuery="ProcessQuery"; + Constants.referenceId="_ReferenceId"; + Constants.isTracked="_IsTracked"; + Constants.sourceLibHeader="SdkVersion"; + Constants.embeddingPageOrigin="EmbeddingPageOrigin"; + Constants.embeddingPageSessionInfo="EmbeddingPageSessionInfo"; + Constants.eventMessageCategory=65536; + Constants.eventWorkbookId="Workbook"; + Constants.eventSourceRemote="Remote"; + return Constants; + }()); + OfficeExtension.Constants=Constants; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + var versionToken=1; + var internalConfiguration={ + invokeRequestModifier: function (request) { + request.DdaMethod.Version=versionToken; + return request; + }, + invokeResponseModifier: function (args) { + versionToken=args.Version; + if (args.Error) { + args.error={}; + args.error.Code=args.Error; + } + return args; + } + }; + var EmbeddedApiStatus; + (function (EmbeddedApiStatus) { + EmbeddedApiStatus[EmbeddedApiStatus["Success"]=0]="Success"; + EmbeddedApiStatus[EmbeddedApiStatus["Timeout"]=1]="Timeout"; + EmbeddedApiStatus[EmbeddedApiStatus["InternalError"]=5001]="InternalError"; + })(EmbeddedApiStatus || (EmbeddedApiStatus={})); + var CommunicationConstants; + (function (CommunicationConstants) { + CommunicationConstants.SendingId="sId"; + CommunicationConstants.RespondingId="rId"; + CommunicationConstants.CommandKey="command"; + CommunicationConstants.SessionInfoKey="sessionInfo"; + CommunicationConstants.ParamsKey="params"; + CommunicationConstants.ApiReadyCommand="apiready"; + CommunicationConstants.ExecuteMethodCommand="executeMethod"; + CommunicationConstants.GetAppContextCommand="getAppContext"; + CommunicationConstants.RegisterEventCommand="registerEvent"; + CommunicationConstants.UnregisterEventCommand="unregisterEvent"; + CommunicationConstants.FireEventCommand="fireEvent"; + })(CommunicationConstants || (CommunicationConstants={})); + var EmbeddedSession=(function (_super) { + __extends(EmbeddedSession, _super); + function EmbeddedSession(url, options) { + _super.call(this); + this.m_chosenWindow=null; + this.m_chosenOrigin=null; + this.m_enabled=true; + this.m_onMessageHandler=this._onMessage.bind(this); + this.m_callbackList={}; + this.m_id=0; + this.m_timeoutId=-1; + this.m_appContext=null; + this.m_url=url; + this.m_options=options; + if (!this.m_options) { + this.m_options={ sessionKey: Math.random().toString() }; + } + if (!this.m_options.sessionKey) { + this.m_options.sessionKey=Math.random().toString(); + } + if (!this.m_options.container) { + this.m_options.container=document.body; + } + if (!this.m_options.timeoutInMilliseconds) { + this.m_options.timeoutInMilliseconds=60000; + } + if (!this.m_options.height) { + this.m_options.height="400px"; + } + if (!this.m_options.width) { + this.m_options.width="100%"; + } + } + EmbeddedSession.prototype._getIFrameSrc=function () { + var origin=window.location.protocol+"//"+window.location.host; + var toAppend=OfficeExtension.Constants.embeddingPageOrigin+"="+encodeURIComponent(origin)+"&"+OfficeExtension.Constants.embeddingPageSessionInfo+"="+encodeURIComponent(this.m_options.sessionKey); + var useHash=false; + if (this.m_url.toLowerCase().indexOf("/_layouts/preauth.aspx") > 0) { + useHash=true; + } + var a=document.createElement("a"); + a.href=this.m_url; + if (useHash) { + if (a.hash.length===0 || a.hash==="#") { + a.hash="#"+toAppend; + } + else { + a.hash=a.hash+"&"+toAppend; + } + } + else { + if (a.search.length===0 || a.search==="?") { + a.search="?"+toAppend; + } + else { + a.search=a.search+"&"+toAppend; + } + } + var iframeSrc=a.href; + return iframeSrc; + }; + EmbeddedSession.prototype.init=function () { + var _this=this; + window.addEventListener("message", this.m_onMessageHandler); + var iframeSrc=this._getIFrameSrc(); + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { + var iframeElement=document.createElement("iframe"); + if (_this.m_options.id) { + iframeElement.id=_this.m_options.id; + } + iframeElement.style.height=_this.m_options.height; + iframeElement.style.width=_this.m_options.width; + iframeElement.src=iframeSrc; + _this.m_options.container.appendChild(iframeElement); + _this.m_timeoutId=setTimeout(function () { + _this.close(); + var err=OfficeExtension.Utility.createRuntimeError(OfficeExtension.ErrorCodes.timeout, OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.timeout), "EmbeddedSession.init"); + reject(err); + }, _this.m_options.timeoutInMilliseconds); + _this.m_promiseResolver=resolve; + }); + }; + EmbeddedSession.prototype._invoke=function (method, callback, params) { + if (!this.m_enabled) { + callback(EmbeddedApiStatus.InternalError, null); + return; + } + if (internalConfiguration.invokeRequestModifier) { + params=internalConfiguration.invokeRequestModifier(params); + } + this._sendMessageWithCallback(this.m_id++, method, params, function (args) { + if (internalConfiguration.invokeResponseModifier) { + args=internalConfiguration.invokeResponseModifier(args); + } + var errorCode=args["Error"]; + delete args["Error"]; + callback(errorCode || EmbeddedApiStatus.Success, args); + }); + }; + EmbeddedSession.prototype.close=function () { + window.removeEventListener("message", this.m_onMessageHandler); + window.clearTimeout(this.m_timeoutId); + this.m_enabled=false; + }; + Object.defineProperty(EmbeddedSession.prototype, "eventRegistration", { + get: function () { + if (!this.m_sessionEventManager) { + this.m_sessionEventManager=new OfficeExtension.EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)); + } + return this.m_sessionEventManager; + }, + enumerable: true, + configurable: true + }); + EmbeddedSession.prototype._createRequestExecutorOrNull=function () { + return new EmbeddedRequestExecutor(this); + }; + EmbeddedSession.prototype._resolveRequestUrlAndHeaderInfo=function () { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + EmbeddedSession.prototype._registerEventImpl=function (eventId, targetId) { + var _this=this; + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { + _this._sendMessageWithCallback(_this.m_id++, CommunicationConstants.RegisterEventCommand, { EventId: eventId, TargetId: targetId }, function () { + resolve(null); + }); + }); + }; + EmbeddedSession.prototype._unregisterEventImpl=function (eventId, targetId) { + var _this=this; + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { + _this._sendMessageWithCallback(_this.m_id++, CommunicationConstants.UnregisterEventCommand, { EventId: eventId, TargetId: targetId }, function () { + resolve(); + }); + }); + }; + EmbeddedSession.prototype._onMessage=function (event) { + var _this=this; + if (!this.m_enabled) { + return; + } + if (this.m_chosenWindow + && (this.m_chosenWindow !==event.source || this.m_chosenOrigin !==event.origin)) { + return; + } + var eventData=event.data; + if (eventData && eventData[CommunicationConstants.CommandKey]===CommunicationConstants.ApiReadyCommand) { + if (!this.m_chosenWindow + && this._isValidDescendant(event.source) + && eventData[CommunicationConstants.SessionInfoKey]===this.m_options.sessionKey) { + this.m_chosenWindow=event.source; + this.m_chosenOrigin=event.origin; + this._sendMessageWithCallback(this.m_id++, CommunicationConstants.GetAppContextCommand, null, function (appContext) { + _this._setupContext(appContext); + window.clearTimeout(_this.m_timeoutId); + _this.m_promiseResolver(); + }); + } + return; + } + if (eventData && eventData[CommunicationConstants.CommandKey]===CommunicationConstants.FireEventCommand) { + var msg=eventData[CommunicationConstants.ParamsKey]; + var eventId=msg["EventId"]; + var targetId=msg["TargetId"]; + var data=msg["Data"]; + if (this.m_sessionEventManager) { + var handlers=this.m_sessionEventManager.getHandlers(eventId, targetId); + for (var i=0; i < handlers.length; i++) { + handlers[i](data); + } + } + return; + } + if (eventData && eventData.hasOwnProperty(CommunicationConstants.RespondingId)) { + var rId=eventData[CommunicationConstants.RespondingId]; + var callback=this.m_callbackList[rId]; + if (typeof callback==="function") { + callback(eventData[CommunicationConstants.ParamsKey]); + } + delete this.m_callbackList[rId]; + } + }; + EmbeddedSession.prototype._sendMessageWithCallback=function (id, command, data, callback) { + this.m_callbackList[id]=callback; + var message={}; + message[CommunicationConstants.SendingId]=id; + message[CommunicationConstants.CommandKey]=command; + message[CommunicationConstants.ParamsKey]=data; + this.m_chosenWindow.postMessage(JSON.stringify(message), this.m_chosenOrigin); + }; + EmbeddedSession.prototype._isValidDescendant=function (wnd) { + var container=this.m_options.container || document.body; + function doesFrameWindow(containerWindow) { + if (containerWindow===wnd) { + return true; + } + for (var i=0, len=containerWindow.frames.length; i < len; i++) { + if (doesFrameWindow(containerWindow.frames[i])) { + return true; + } + } + return false; + } + var iframes=container.getElementsByTagName("iframe"); + for (var i=0, len=iframes.length; i < len; i++) { + if (doesFrameWindow(iframes[i].contentWindow)) { + return true; + } + } + return false; + }; + EmbeddedSession.prototype._setupContext=function (appContext) { + if (!(this.m_appContext=appContext)) { + return; + } + }; + return EmbeddedSession; + }(OfficeExtension.SessionBase)); + OfficeExtension.EmbeddedSession=EmbeddedSession; + var EmbeddedRequestExecutor=(function () { + function EmbeddedRequestExecutor(session) { + this.m_session=session; + } + EmbeddedRequestExecutor.prototype.executeAsync=function (customData, requestFlags, requestMessage) { + var _this=this; + var messageSafearray=OfficeExtension.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, EmbeddedRequestExecutor.SourceLibHeaderValue); + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { + _this.m_session._invoke(CommunicationConstants.ExecuteMethodCommand, function (status, result) { + OfficeExtension.Utility.log("Response:"); + OfficeExtension.Utility.log(JSON.stringify(result)); + var response; + if (status==EmbeddedApiStatus.Success) { + response=OfficeExtension.RichApiMessageUtility.buildResponseOnSuccess(OfficeExtension.RichApiMessageUtility.getResponseBodyFromSafeArray(result.Data), OfficeExtension.RichApiMessageUtility.getResponseHeadersFromSafeArray(result.Data)); + } + else { + response=OfficeExtension.RichApiMessageUtility.buildResponseOnError(result.error.Code, result.error.Message); + } + resolve(response); + }, EmbeddedRequestExecutor._transformMessageArrayIntoParams(messageSafearray)); + }); + }; + EmbeddedRequestExecutor._transformMessageArrayIntoParams=function (msgArray) { + return { + ArrayData: msgArray, + DdaMethod: { + DispatchId: EmbeddedRequestExecutor.DispidExecuteRichApiRequestMethod + } + }; + }; + EmbeddedRequestExecutor.DispidExecuteRichApiRequestMethod=93; + EmbeddedRequestExecutor.SourceLibHeaderValue="Embedded"; + return EmbeddedRequestExecutor; + }()); +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + var _Internal; + (function (_Internal) { + var RuntimeError=(function (_super) { + __extends(RuntimeError, _super); + function RuntimeError(error) { + _super.call(this, (typeof error==="string") ? error : error.message); + this.name="OfficeExtension.Error"; + if (typeof error==="string") { + this.message=error; + } + else { + this.code=error.code; + this.message=error.message; + this.traceMessages=error.traceMessages || []; + this.innerError=error.innerError || null; + this.debugInfo=this._createDebugInfo(error.debugInfo || {}); + } + } + RuntimeError.prototype.toString=function () { + return this.code+': '+this.message; + }; + RuntimeError.prototype._createDebugInfo=function (partialDebugInfo) { + var debugInfo={ + code: this.code, + message: this.message, + toString: function () { + return JSON.stringify(this); + } + }; + for (var key in partialDebugInfo) { + debugInfo[key]=partialDebugInfo[key]; + } + if (this.innerError) { + if (this.innerError instanceof OfficeExtension._Internal.RuntimeError) { + debugInfo.innerError=this.innerError.debugInfo; + } + else { + debugInfo.innerError=this.innerError; + } + } + return debugInfo; + }; + RuntimeError._createInvalidArgError=function (error) { + return new _Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.invalidArgument, + message: (OfficeExtension.Utility.isNullOrEmptyString(error.argumentName) ? + OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidArgumentGeneric) : + OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidArgument, error.argumentName)), + debugInfo: error.errorLocation ? { errorLocation: error.errorLocation } : {}, + innerError: error.innerError + }); + }; + return RuntimeError; + }(Error)); + _Internal.RuntimeError=RuntimeError; + })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); + OfficeExtension.Error=_Internal.RuntimeError; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + var ErrorCodes=(function () { + function ErrorCodes() { + } + ErrorCodes.accessDenied="AccessDenied"; + ErrorCodes.generalException="GeneralException"; + ErrorCodes.activityLimitReached="ActivityLimitReached"; + ErrorCodes.invalidObjectPath="InvalidObjectPath"; + ErrorCodes.propertyNotLoaded="PropertyNotLoaded"; + ErrorCodes.valueNotLoaded="ValueNotLoaded"; + ErrorCodes.invalidRequestContext="InvalidRequestContext"; + ErrorCodes.invalidArgument="InvalidArgument"; + ErrorCodes.runMustReturnPromise="RunMustReturnPromise"; + ErrorCodes.cannotRegisterEvent="CannotRegisterEvent"; + ErrorCodes.apiNotFound="ApiNotFound"; + ErrorCodes.connectionFailure="ConnectionFailure"; + ErrorCodes.timeout="Timeout"; + ErrorCodes.invalidOrTimedOutSession="InvalidOrTimedOutSession"; + return ErrorCodes; + }()); + OfficeExtension.ErrorCodes=ErrorCodes; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + var EventHandlers=(function () { + function EventHandlers(context, parentObject, name, eventInfo) { + var _this=this; + this.m_id=context._nextId(); + this.m_context=context; + this.m_name=name; + this.m_handlers=[]; + this.m_registered=false; + this.m_eventInfo=eventInfo; + this.m_callback=function (args) { + _this.m_eventInfo.eventArgsTransformFunc(args) + .then(function (newArgs) { return _this.fireEvent(newArgs); }); + }; + } + Object.defineProperty(EventHandlers.prototype, "_registered", { + get: function () { + return this.m_registered; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_id", { + get: function () { + return this.m_id; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_handlers", { + get: function () { + return this.m_handlers; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_callback", { + get: function () { + return this.m_callback; + }, + enumerable: true, + configurable: true + }); + EventHandlers.prototype.add=function (handler) { + var action=OfficeExtension.ActionFactory.createTraceAction(this.m_context, null, false); + this.m_context._pendingRequest._addPendingEventHandlerAction(this, { id: action.actionInfo.Id, handler: handler, operation: 0 }); + return new OfficeExtension.EventHandlerResult(this.m_context, this, handler); + }; + EventHandlers.prototype.remove=function (handler) { + var action=OfficeExtension.ActionFactory.createTraceAction(this.m_context, null, false); + this.m_context._pendingRequest._addPendingEventHandlerAction(this, { id: action.actionInfo.Id, handler: handler, operation: 1 }); + }; + EventHandlers.prototype.removeAll=function () { + var action=OfficeExtension.ActionFactory.createTraceAction(this.m_context, null, false); + this.m_context._pendingRequest._addPendingEventHandlerAction(this, { id: action.actionInfo.Id, handler: null, operation: 2 }); + }; + EventHandlers.prototype._processRegistration=function (req) { + var _this=this; + var ret=OfficeExtension.Utility._createPromiseFromResult(null); + var actions=req._getPendingEventHandlerActions(this); + if (!actions) { + return ret; + } + var handlersResult=[]; + for (var i=0; i < this.m_handlers.length; i++) { + handlersResult.push(this.m_handlers[i]); + } + var hasChange=false; + for (var i=0; i < actions.length; i++) { + if (req._responseTraceIds[actions[i].id]) { + hasChange=true; + switch (actions[i].operation) { + case 0: + handlersResult.push(actions[i].handler); + break; + case 1: + for (var index=handlersResult.length - 1; index >=0; index--) { + if (handlersResult[index]===actions[i].handler) { + handlersResult.splice(index, 1); + break; + } + } + break; + case 2: + handlersResult=[]; + break; + } + } + } + if (hasChange) { + if (!this.m_registered && handlersResult.length > 0) { + ret=ret + .then(function () { return _this.m_eventInfo.registerFunc(_this.m_callback); }) + .then(function () { return (_this.m_registered=true); }); + } + else if (this.m_registered && handlersResult.length==0) { + ret=ret + .then(function () { return _this.m_eventInfo.unregisterFunc(_this.m_callback); }) + .catch(function (ex) { + OfficeExtension.Utility.log("Error when unregister event: "+JSON.stringify(ex)); + }) + .then(function () { return (_this.m_registered=false); }); + } + ret=ret + .then(function () { return (_this.m_handlers=handlersResult); }); + } + return ret; + }; + EventHandlers.prototype.fireEvent=function (args) { + var promises=[]; + for (var i=0; i < this.m_handlers.length; i++) { + var handler=this.m_handlers[i]; + var p=OfficeExtension.Utility._createPromiseFromResult(null) + .then(this.createFireOneEventHandlerFunc(handler, args)) + .catch(function (ex) { + OfficeExtension.Utility.log("Error when invoke handler: "+JSON.stringify(ex)); + }); + promises.push(p); + } + OfficeExtension._Internal.OfficePromise.all(promises); + }; + EventHandlers.prototype.createFireOneEventHandlerFunc=function (handler, args) { + return function () { return handler(args); }; + }; + return EventHandlers; + }()); + OfficeExtension.EventHandlers=EventHandlers; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + var EventHandlerResult=(function () { + function EventHandlerResult(context, handlers, handler) { + this.m_context=context; + this.m_allHandlers=handlers; + this.m_handler=handler; + } + Object.defineProperty(EventHandlerResult.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + EventHandlerResult.prototype.remove=function () { + if (this.m_allHandlers && this.m_handler) { + this.m_allHandlers.remove(this.m_handler); + this.m_allHandlers=null; + this.m_handler=null; + } + }; + return EventHandlerResult; + }()); + OfficeExtension.EventHandlerResult=EventHandlerResult; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + var _Internal; + (function (_Internal) { + var OfficeJsEventRegistration=(function () { + function OfficeJsEventRegistration() { + } + OfficeJsEventRegistration.prototype.register=function (eventId, targetId, handler) { + switch (eventId) { + case 4: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }) + .then(function (officeBinding) { + return OfficeExtension.Utility.promisify(function (callback) { return officeBinding.addHandlerAsync(Office.EventType.BindingDataChanged, handler, callback); }); + }); + case 3: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }) + .then(function (officeBinding) { + return OfficeExtension.Utility.promisify(function (callback) { return officeBinding.addHandlerAsync(Office.EventType.BindingSelectionChanged, handler, callback); }); + }); + case 2: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged, handler, callback); }); + case 1: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.settings.addHandlerAsync(Office.EventType.SettingsChanged, handler, callback); }); + case 5: + return OfficeExtension.Utility.promisify(function (callback) { return OSF.DDA.RichApi.richApiMessageManager.addHandlerAsync("richApiMessage", handler, callback); }); + case 13: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.ObjectDeleted, handler, { id: targetId }, callback); }); + case 14: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.ObjectSelectionChanged, handler, { id: targetId }, callback); }); + case 15: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.ObjectDataChanged, handler, { id: targetId }, callback); }); + case 16: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.ContentControlAdded, handler, { id: targetId }, callback); }); + default: + throw _Internal.RuntimeError._createInvalidArgError("eventId"); + } + }; + OfficeJsEventRegistration.prototype.unregister=function (eventId, targetId, handler) { + switch (eventId) { + case 4: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }) + .then(function (officeBinding) { + return OfficeExtension.Utility.promisify(function (callback) { return officeBinding.removeHandlerAsync(Office.EventType.BindingDataChanged, { handler: handler }, callback); }); + }); + case 3: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.bindings.getByIdAsync(targetId, callback); }) + .then(function (officeBinding) { + return OfficeExtension.Utility.promisify(function (callback) { return officeBinding.removeHandlerAsync(Office.EventType.BindingSelectionChanged, { handler: handler }, callback); }); + }); + case 2: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.DocumentSelectionChanged, { handler: handler }, callback); }); + case 1: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.settings.removeHandlerAsync(Office.EventType.SettingsChanged, { handler: handler }, callback); }); + case 5: + return OfficeExtension.Utility.promisify(function (callback) { return OSF.DDA.RichApi.richApiMessageManager.removeHandlerAsync("richApiMessage", { handler: handler }, callback); }); + case 13: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDeleted, { id: targetId, handler: handler }, callback); }); + case 14: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.ObjectSelectionChanged, { id: targetId, handler: handler }, callback); }); + case 15: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDataChanged, { id: targetId, handler: handler }, callback); }); + case 16: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.ContentControlAdded, { id: targetId, handler: handler }, callback); }); + default: + throw _Internal.RuntimeError._createInvalidArgError("eventId"); + } + }; + return OfficeJsEventRegistration; + }()); + _Internal.officeJsEventRegistration=new OfficeJsEventRegistration(); + })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); + var EventRegistration=(function () { + function EventRegistration(registerEventImpl, unregisterEventImpl) { + this.m_handlersByEventByTarget={}; + this.m_registerEventImpl=registerEventImpl; + this.m_unregisterEventImpl=unregisterEventImpl; + } + EventRegistration.prototype.getHandlers=function (eventId, targetId) { + if (OfficeExtension.Utility.isNullOrUndefined(targetId)) { + targetId=""; + } + var handlersById=this.m_handlersByEventByTarget[eventId]; + if (!handlersById) { + handlersById={}; + this.m_handlersByEventByTarget[eventId]=handlersById; + } + var handlers=handlersById[targetId]; + if (!handlers) { + handlers=[]; + handlersById[targetId]=handlers; + } + return handlers; + }; + EventRegistration.prototype.register=function (eventId, targetId, handler) { + if (!handler) { + throw _Internal.RuntimeError._createInvalidArgError("handler"); + } + var handlers=this.getHandlers(eventId, targetId); + handlers.push(handler); + if (handlers.length===1) { + return this.m_registerEventImpl(eventId, targetId); + } + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + EventRegistration.prototype.unregister=function (eventId, targetId, handler) { + if (!handler) { + throw _Internal.RuntimeError._createInvalidArgError("handler"); + } + var handlers=this.getHandlers(eventId, targetId); + for (var index=handlers.length - 1; index >=0; index--) { + if (handlers[index]===handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length===0) { + return this.m_unregisterEventImpl(eventId, targetId); + } + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + return EventRegistration; + }()); + OfficeExtension.EventRegistration=EventRegistration; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + var GenericEventRegistration=(function () { + function GenericEventRegistration() { + this.m_eventRegistration=new OfficeExtension.EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)); + this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this); + } + GenericEventRegistration.prototype.ready=function () { + var _this=this; + if (!this.m_ready) { + if (GenericEventRegistration._testReadyImpl) { + this.m_ready=GenericEventRegistration._testReadyImpl() + .then(function () { + _this.m_isReady=true; + }); + } + else { + this.m_ready=OfficeExtension._Internal.officeJsEventRegistration.register(5, "", this.m_richApiMessageHandler) + .then(function () { + _this.m_isReady=true; + }); + } + } + return this.m_ready; + }; + Object.defineProperty(GenericEventRegistration.prototype, "isReady", { + get: function () { + return this.m_isReady; + }, + enumerable: true, + configurable: true + }); + GenericEventRegistration.prototype.register=function (eventId, targetId, handler) { + var _this=this; + return this.ready() + .then(function () { return _this.m_eventRegistration.register(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype.unregister=function (eventId, targetId, handler) { + var _this=this; + return this.ready() + .then(function () { return _this.m_eventRegistration.unregister(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype._registerEventImpl=function (eventId, targetId) { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._unregisterEventImpl=function (eventId, targetId) { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._handleRichApiMessage=function (msg) { + if (msg && msg.entries) { + for (var entryIndex=0; entryIndex < msg.entries.length; entryIndex++) { + var entry=msg.entries[entryIndex]; + if (entry.messageCategory==OfficeExtension.Constants.eventMessageCategory) { + if (OfficeExtension.Utility._logEnabled) { + OfficeExtension.Utility.log(JSON.stringify(entry)); + } + var funcs=this.m_eventRegistration.getHandlers(entry.messageType, entry.targetId); + if (funcs.length > 0) { + var arg=JSON.parse(entry.message); + if (entry.isRemoteOverride) { + arg.source=OfficeExtension.Constants.eventSourceRemote; + } + for (var i=0; i < funcs.length; i++) { + funcs[i](arg); + } + } + } + } + } + }; + GenericEventRegistration.getGenericEventRegistration=function () { + if (!GenericEventRegistration.s_genericEventRegistration) { + GenericEventRegistration.s_genericEventRegistration=new GenericEventRegistration(); + } + return GenericEventRegistration.s_genericEventRegistration; + }; + GenericEventRegistration.richApiMessageEventCategory=65536; + return GenericEventRegistration; + }()); + function _testSetRichApiMessageReadyImpl(impl) { + GenericEventRegistration._testReadyImpl=impl; + } + OfficeExtension._testSetRichApiMessageReadyImpl=_testSetRichApiMessageReadyImpl; + function _testTriggerRichApiMessageEvent(msg) { + GenericEventRegistration.getGenericEventRegistration()._handleRichApiMessage(msg); + } + OfficeExtension._testTriggerRichApiMessageEvent=_testTriggerRichApiMessageEvent; + var GenericEventHandlers=(function (_super) { + __extends(GenericEventHandlers, _super); + function GenericEventHandlers(context, parentObject, name, eventInfo) { + _super.call(this, context, parentObject, name, eventInfo); + this.m_genericEventInfo=eventInfo; + } + GenericEventHandlers.prototype.add=function (handler) { + var _this=this; + if ((this._handlers.length==0) && this.m_genericEventInfo.registerFunc) { + this.m_genericEventInfo.registerFunc(); + } + if (!GenericEventRegistration.getGenericEventRegistration().isReady) { + this._context._pendingRequest._addPreSyncPromise(GenericEventRegistration.getGenericEventRegistration().ready()); + } + OfficeExtension.ActionFactory.createTraceMarkerForCallback(this._context, function () { + _this._handlers.push(handler); + if (_this._handlers.length==1) { + GenericEventRegistration.getGenericEventRegistration().register(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + return new OfficeExtension.EventHandlerResult(this._context, this, handler); + }; + GenericEventHandlers.prototype.remove=function (handler) { + var _this=this; + if ((this._handlers.length==1) && this.m_genericEventInfo.unregisterFunc) { + this.m_genericEventInfo.unregisterFunc(); + } + OfficeExtension.ActionFactory.createTraceMarkerForCallback(this._context, function () { + var handlers=_this._handlers; + for (var index=handlers.length - 1; index >=0; index--) { + if (handlers[index]===handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length==0) { + GenericEventRegistration.getGenericEventRegistration().unregister(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + }; + GenericEventHandlers.prototype.removeAll=function () { + }; + return GenericEventHandlers; + }(OfficeExtension.EventHandlers)); + OfficeExtension.GenericEventHandlers=GenericEventHandlers; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + var HttpRequestExecutor=(function () { + function HttpRequestExecutor() { + } + HttpRequestExecutor.prototype.executeAsync=function (customData, requestFlags, requestMessage) { + var requestMessageText=JSON.stringify(requestMessage.Body); + var url=requestMessage.Url; + if (url.charAt(url.length - 1) !="/") { + url=url+"/"; + } + url=url+OfficeExtension.Constants.processQuery; + url=url+"?"+OfficeExtension.Constants.flags+"="+requestFlags.toString(); + var requestInfo={ + method: "POST", + url: url, + headers: {}, + body: requestMessageText + }; + requestInfo.headers[OfficeExtension.Constants.sourceLibHeader]=HttpRequestExecutor.SourceLibHeaderValue; + requestInfo.headers["CONTENT-TYPE"]="application/json"; + if (requestMessage.Headers) { + for (var key in requestMessage.Headers) { + requestInfo.headers[key]=requestMessage.Headers[key]; + } + } + return OfficeExtension.HttpUtility.sendRequest(requestInfo) + .then(function (responseInfo) { + var response; + if (responseInfo.statusCode===200) { + response={ ErrorCode: null, ErrorMessage: null, Headers: responseInfo.headers, Body: JSON.parse(responseInfo.body) }; + } + else { + OfficeExtension.Utility.log("Error Response:"+responseInfo.body); + var error=OfficeExtension.Utility._parseErrorResponse(responseInfo); + response={ + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null + }; + } + return response; + }); + }; + HttpRequestExecutor.SourceLibHeaderValue="officejs-rest"; + return HttpRequestExecutor; + }()); + OfficeExtension.HttpRequestExecutor=HttpRequestExecutor; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + var HttpUtility=(function () { + function HttpUtility() { + } + HttpUtility.setCustomSendRequestFunc=function (func) { + HttpUtility.s_customSendRequestFunc=func; + }; + HttpUtility.xhrSendRequestFunc=function (request) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { + var xhr=new XMLHttpRequest(); + xhr.open(request.method, request.url); + xhr.onload=function () { + var resp={ + statusCode: xhr.status, + headers: OfficeExtension.Utility._parseHttpResponseHeaders(xhr.getAllResponseHeaders()), + body: xhr.responseText + }; + resolve(resp); + }; + xhr.onerror=function () { + reject(new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.connectionFailure, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.connectionFailureWithStatus, xhr.statusText) + })); + }; + if (request.headers) { + for (var key in request.headers) { + xhr.setRequestHeader(key, request.headers[key]); + } + } + xhr.send(request.body); + }); + }; + HttpUtility.sendRequest=function (request) { + HttpUtility.validateAndNormalizeRequest(request); + var func=HttpUtility.s_customSendRequestFunc; + if (!func) { + func=HttpUtility.xhrSendRequestFunc; + } + return func(request); + }; + HttpUtility.setCustomSendLocalDocumentRequestFunc=function (func) { + HttpUtility.s_customSendLocalDocumentRequestFunc=func; + }; + HttpUtility.sendLocalDocumentRequest=function (request) { + HttpUtility.validateAndNormalizeRequest(request); + var func; + func=HttpUtility.s_customSendLocalDocumentRequestFunc || HttpUtility.officeJsSendLocalDocumentRequestFunc; + return func(request); + }; + HttpUtility.officeJsSendLocalDocumentRequestFunc=function (request) { + request=OfficeExtension.Utility._validateLocalDocumentRequest(request); + var requestSafeArray=OfficeExtension.Utility._buildRequestMessageSafeArray(request); + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { + OSF.DDA.RichApi.executeRichApiRequestAsync(requestSafeArray, function (asyncResult) { + var response; + if (asyncResult.status=="succeeded") { + response= { + statusCode: OfficeExtension.RichApiMessageUtility.getResponseStatusCode(asyncResult), + headers: OfficeExtension.RichApiMessageUtility.getResponseHeaders(asyncResult), + body: OfficeExtension.RichApiMessageUtility.getResponseBody(asyncResult) + }; + } + else { + response=OfficeExtension.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(asyncResult.error.code, asyncResult.error.message); + } + OfficeExtension.Utility.log(JSON.stringify(response)); + resolve(response); + }); + }); + }; + HttpUtility.validateAndNormalizeRequest=function (request) { + if (OfficeExtension.Utility.isNullOrUndefined(request)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError({ + argumentName: "request" + }); + } + if (OfficeExtension.Utility.isNullOrEmptyString(request.method)) { + request.method="GET"; + } + request.method=request.method.toUpperCase(); + }; + HttpUtility.logRequest=function (request) { + if (OfficeExtension.Utility._logEnabled) { + OfficeExtension.Utility.log("---HTTP Request---"); + OfficeExtension.Utility.log(request.method+" "+request.url); + if (request.headers) { + for (var key in request.headers) { + OfficeExtension.Utility.log(key+": "+request.headers[key]); + } + } + if (HttpUtility._logBody) { + OfficeExtension.Utility.log(request.body); + } + } + }; + HttpUtility.logResponse=function (response) { + if (OfficeExtension.Utility._logEnabled) { + OfficeExtension.Utility.log("---HTTP Response---"); + OfficeExtension.Utility.log(""+response.statusCode); + if (response.headers) { + for (var key in response.headers) { + OfficeExtension.Utility.log(key+": "+response.headers[key]); + } + } + if (HttpUtility._logBody) { + OfficeExtension.Utility.log(response.body); + } + } + }; + HttpUtility._logBody=false; + return HttpUtility; + }()); + OfficeExtension.HttpUtility=HttpUtility; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + var InstantiateActionResultHandler=(function () { + function InstantiateActionResultHandler(clientObject) { + this.m_clientObject=clientObject; + } + InstantiateActionResultHandler.prototype._handleResult=function (value) { + this.m_clientObject._handleIdResult(value); + }; + return InstantiateActionResultHandler; + }()); + OfficeExtension.InstantiateActionResultHandler=InstantiateActionResultHandler; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + ; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + var HostBridgeRequestExecutor=(function () { + function HostBridgeRequestExecutor(session) { + this.m_session=session; + } + HostBridgeRequestExecutor.prototype.executeAsync=function (customData, requestFlags, requestMessage) { + var httpRequestInfo={ + url: OfficeExtension.Constants.processQuery, + method: "POST", + headers: requestMessage.Headers, + body: requestMessage.Body + }; + var message={ + id: HostBridgeSession.nextId(), + type: 1, + flags: requestFlags, + message: httpRequestInfo + }; + OfficeExtension.Utility.log(JSON.stringify(message)); + return this.m_session.sendMessageToHost(message) + .then(function (nativeBridgeResponse) { + OfficeExtension.Utility.log("Received response: "+JSON.stringify(nativeBridgeResponse)); + var responseInfo=nativeBridgeResponse.message; + var response; + if (responseInfo.statusCode===200) { + response={ ErrorCode: null, ErrorMessage: null, Headers: responseInfo.headers, Body: responseInfo.body }; + } + else { + OfficeExtension.Utility.log("Error Response:"+responseInfo.body); + var error=OfficeExtension.Utility._parseErrorResponse(responseInfo); + response={ + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null + }; + } + return response; + }); + }; + return HostBridgeRequestExecutor; + }()); + var HostBridgeSession=(function (_super) { + __extends(HostBridgeSession, _super); + function HostBridgeSession(bridge) { + var _this=this; + _super.call(this); + this.m_promiseResolver={}; + this.m_bridge=bridge; + this.m_bridge.onMessageFromHost=function (msg) { + _this.onMessageFromHost(msg); + }; + } + HostBridgeSession.prototype._resolveRequestUrlAndHeaderInfo=function () { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + HostBridgeSession.prototype._createRequestExecutorOrNull=function () { + OfficeExtension.Utility.log("NativeBridgeSession::CreateRequestExecutor"); + return new HostBridgeRequestExecutor(this); + }; + Object.defineProperty(HostBridgeSession.prototype, "eventRegistration", { + get: function () { + return OfficeExtension._Internal.officeJsEventRegistration; + }, + enumerable: true, + configurable: true + }); + HostBridgeSession.init=function (bridge) { + if (bridge && typeof (bridge)==="object") { + var session=new HostBridgeSession(bridge); + OfficeExtension.ClientRequestContext._overrideSession=session; + OfficeExtension.HttpUtility.setCustomSendLocalDocumentRequestFunc(function (request) { + var bridgeMessage={ + id: HostBridgeSession.nextId(), + type: 1, + flags: 0, + message: request + }; + return session.sendMessageToHost(bridgeMessage) + .then(function (bridgeResponse) { + var responseInfo=bridgeResponse.message; + return responseInfo; + }); + }); + } + }; + HostBridgeSession.prototype.sendMessageToHost=function (message) { + var _this=this; + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + var ret=new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { + _this.m_promiseResolver[message.id]=resolve; + }); + return ret; + }; + HostBridgeSession.prototype.onMessageFromHost=function (messageText) { + if (messageText==="test") { + if (HostBridgeTest._testFunc) { + HostBridgeTest._testFunc(); + } + } + else { + var message=JSON.parse(messageText); + if (typeof (message.id)==="number") { + var resolve=this.m_promiseResolver[message.id]; + if (resolve) { + resolve(message); + } + delete this.m_promiseResolver[message.id]; + } + } + }; + HostBridgeSession.nextId=function () { + return HostBridgeSession.s_nextId++; + }; + HostBridgeSession.s_nextId=1; + return HostBridgeSession; + }(OfficeExtension.SessionBase)); + var HostBridge=(function () { + function HostBridge() { + } + HostBridge.init=function (bridge) { + HostBridgeSession.init(bridge); + }; + return HostBridge; + }()); + OfficeExtension.HostBridge=HostBridge; + if (typeof (_richApiNativeBridge)==="object" && _richApiNativeBridge) { + HostBridge.init(_richApiNativeBridge); + } + var HostBridgeTest=(function () { + function HostBridgeTest() { + } + HostBridgeTest.setTestFunc=function (func) { + HostBridgeTest._testFunc=func; + }; + return HostBridgeTest; + }()); + OfficeExtension.HostBridgeTest=HostBridgeTest; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + var ObjectPath=(function () { + function ObjectPath(objectPathInfo, parentObjectPath, isCollection, isInvalidAfterRequest) { + this.m_objectPathInfo=objectPathInfo; + this.m_parentObjectPath=parentObjectPath; + this.m_isWriteOperation=false; + this.m_isCollection=isCollection; + this.m_isInvalidAfterRequest=isInvalidAfterRequest; + this.m_isValid=true; + } + Object.defineProperty(ObjectPath.prototype, "objectPathInfo", { + get: function () { + return this.m_objectPathInfo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isWriteOperation", { + get: function () { + return this.m_isWriteOperation; + }, + set: function (value) { + this.m_isWriteOperation=value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isRestrictedResourceAccess", { + get: function () { + return this.m_isRestrictedResourceAccess; + }, + set: function (value) { + this.m_isRestrictedResourceAccess=value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isCollection", { + get: function () { + return this.m_isCollection; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isInvalidAfterRequest", { + get: function () { + return this.m_isInvalidAfterRequest; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "parentObjectPath", { + get: function () { + return this.m_parentObjectPath; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "argumentObjectPaths", { + get: function () { + return this.m_argumentObjectPaths; + }, + set: function (value) { + this.m_argumentObjectPaths=value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isValid", { + get: function () { + return this.m_isValid; + }, + set: function (value) { + this.m_isValid=value; + if (!value && + this.m_objectPathInfo.ObjectPathType===6 && + this.m_savedObjectPathInfo) { + ObjectPath.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo, this.m_objectPathInfo); + this.m_parentObjectPath=this.m_savedObjectPathInfo.parent; + this.m_isValid=true; + this.m_savedObjectPathInfo=null; + } + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "getByIdMethodName", { + get: function () { + return this.m_getByIdMethodName; + }, + set: function (value) { + this.m_getByIdMethodName=value; + }, + enumerable: true, + configurable: true + }); + ObjectPath.prototype._updateAsNullObject=function () { + this.m_isInvalidAfterRequest=false; + this.m_isValid=true; + this.m_objectPathInfo.ObjectPathType=7; + this.m_objectPathInfo.Name=""; + this.m_objectPathInfo.ArgumentInfo={}; + this.m_parentObjectPath=null; + this.m_argumentObjectPaths=null; + }; + ObjectPath.prototype.updateUsingObjectData=function (value) { + var referenceId=value[OfficeExtension.Constants.referenceId]; + if (!OfficeExtension.Utility.isNullOrEmptyString(referenceId)) { + if (!this.m_savedObjectPathInfo && + !this.isInvalidAfterRequest && + ObjectPath.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)) { + var pathInfo={}; + ObjectPath.copyObjectPathInfo(this.m_objectPathInfo, pathInfo); + this.m_savedObjectPathInfo={ + pathInfo: pathInfo, + parent: this.m_parentObjectPath + }; + } + this.m_isInvalidAfterRequest=false; + this.m_isValid=true; + this.m_objectPathInfo.ObjectPathType=6; + this.m_objectPathInfo.Name=referenceId; + this.m_objectPathInfo.ArgumentInfo={}; + delete this.m_objectPathInfo.ParentObjectPathId; + this.m_parentObjectPath=null; + this.m_argumentObjectPaths=null; + return; + } + var parentIsCollection=this.parentObjectPath && this.parentObjectPath.isCollection; + var getByIdMethodName=this.getByIdMethodName; + if (parentIsCollection || !OfficeExtension.Utility.isNullOrEmptyString(getByIdMethodName)) { + var id=value[OfficeExtension.Constants.id]; + if (OfficeExtension.Utility.isNullOrUndefined(id)) { + id=value[OfficeExtension.Constants.idPrivate]; + } + if (!OfficeExtension.Utility.isNullOrUndefined(id)) { + this.m_isInvalidAfterRequest=false; + this.m_isValid=true; + if (!OfficeExtension.Utility.isNullOrEmptyString(getByIdMethodName)) { + this.m_objectPathInfo.ObjectPathType=3; + this.m_objectPathInfo.Name=getByIdMethodName; + this.m_getByIdMethodName=null; + } + else { + this.m_objectPathInfo.ObjectPathType=5; + this.m_objectPathInfo.Name=""; + } + this.isWriteOperation=false; + this.m_objectPathInfo.ArgumentInfo={}; + this.m_objectPathInfo.ArgumentInfo.Arguments=[id]; + this.m_argumentObjectPaths=null; + return; + } + } + }; + ObjectPath.isRestorableObjectPath=function (objectPathType) { + return (objectPathType===1 || + objectPathType===5 || + objectPathType===3 || + objectPathType===4); + }; + ObjectPath.copyObjectPathInfo=function (src, dest) { + dest.Id=src.Id; + dest.ArgumentInfo=src.ArgumentInfo; + dest.Name=src.Name; + dest.ObjectPathType=src.ObjectPathType; + dest.ParentObjectPathId=src.ParentObjectPathId; + }; + return ObjectPath; + }()); + OfficeExtension.ObjectPath=ObjectPath; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + var ObjectPathFactory=(function () { + function ObjectPathFactory() { + } + ObjectPathFactory.createGlobalObjectObjectPath=function (context) { + var objectPathInfo={ Id: context._nextId(), ObjectPathType: 1, Name: "" }; + return new OfficeExtension.ObjectPath(objectPathInfo, null, false, false); + }; + ObjectPathFactory.createNewObjectObjectPath=function (context, typeName, isCollection, isRestrictedResourceAccess) { + var objectPathInfo={ Id: context._nextId(), ObjectPathType: 2, Name: typeName }; + var ret=new OfficeExtension.ObjectPath(objectPathInfo, null, isCollection, false); + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; + }; + ObjectPathFactory.createPropertyObjectPath=function (context, parent, propertyName, isCollection, isInvalidAfterRequest, isRestrictedResourceAccess) { + var objectPathInfo={ + Id: context._nextId(), + ObjectPathType: 4, + Name: propertyName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + }; + var ret=new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest); + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; + }; + ObjectPathFactory.createIndexerObjectPath=function (context, parent, args) { + var objectPathInfo={ + Id: context._nextId(), + ObjectPathType: 5, + Name: "", + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments=args; + return new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, false, false); + }; + ObjectPathFactory.createIndexerObjectPathUsingParentPath=function (context, parentObjectPath, args) { + var objectPathInfo={ + Id: context._nextId(), + ObjectPathType: 5, + Name: "", + ParentObjectPathId: parentObjectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments=args; + return new OfficeExtension.ObjectPath(objectPathInfo, parentObjectPath, false, false); + }; + ObjectPathFactory.createMethodObjectPath=function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, isRestrictedResourceAccess) { + var objectPathInfo={ + Id: context._nextId(), + ObjectPathType: 3, + Name: methodName, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + var argumentObjectPaths=OfficeExtension.Utility.setMethodArguments(context, objectPathInfo.ArgumentInfo, args); + var ret=new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest); + ret.argumentObjectPaths=argumentObjectPaths; + ret.isWriteOperation=(operationType !=1); + ret.getByIdMethodName=getByIdMethodName; + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; + }; + ObjectPathFactory.createReferenceIdObjectPath=function (context, referenceId) { + var objectPathInfo={ + Id: context._nextId(), + ObjectPathType: 6, + Name: referenceId, + ArgumentInfo: {} + }; + var ret=new OfficeExtension.ObjectPath(objectPathInfo, null, false, false); + return ret; + }; + ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt=function (hasIndexerMethod, context, parent, childItem, index) { + var id=childItem[OfficeExtension.Constants.id]; + if (OfficeExtension.Utility.isNullOrUndefined(id)) { + id=childItem[OfficeExtension.Constants.idPrivate]; + } + if (hasIndexerMethod && !OfficeExtension.Utility.isNullOrUndefined(id)) { + return ObjectPathFactory.createChildItemObjectPathUsingIndexer(context, parent, childItem); + } + else { + return ObjectPathFactory.createChildItemObjectPathUsingGetItemAt(context, parent, childItem, index); + } + }; + ObjectPathFactory.createChildItemObjectPathUsingIndexer=function (context, parent, childItem) { + var id=childItem[OfficeExtension.Constants.id]; + if (OfficeExtension.Utility.isNullOrUndefined(id)) { + id=childItem[OfficeExtension.Constants.idPrivate]; + } + var objectPathInfo=objectPathInfo= { + Id: context._nextId(), + ObjectPathType: 5, + Name: "", + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments=[id]; + return new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, false, false); + }; + ObjectPathFactory.createChildItemObjectPathUsingGetItemAt=function (context, parent, childItem, index) { + var indexFromServer=childItem[OfficeExtension.Constants.index]; + if (indexFromServer) { + index=indexFromServer; + } + var objectPathInfo={ + Id: context._nextId(), + ObjectPathType: 3, + Name: OfficeExtension.Constants.getItemAt, + ParentObjectPathId: parent._objectPath.objectPathInfo.Id, + ArgumentInfo: {} + }; + objectPathInfo.ArgumentInfo.Arguments=[index]; + return new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, false, false); + }; + return ObjectPathFactory; + }()); + OfficeExtension.ObjectPathFactory=ObjectPathFactory; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + var OfficeJsRequestExecutor=(function () { + function OfficeJsRequestExecutor(context) { + this.m_context=context; + } + OfficeJsRequestExecutor.prototype.executeAsync=function (customData, requestFlags, requestMessage) { + var _this=this; + var messageSafearray=OfficeExtension.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, OfficeJsRequestExecutor.SourceLibHeaderValue); + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { + OSF.DDA.RichApi.executeRichApiRequestAsync(messageSafearray, function (result) { + OfficeExtension.Utility.log("Response:"); + OfficeExtension.Utility.log(JSON.stringify(result)); + var response; + if (result.status=="succeeded") { + response=OfficeExtension.RichApiMessageUtility.buildResponseOnSuccess(OfficeExtension.RichApiMessageUtility.getResponseBody(result), OfficeExtension.RichApiMessageUtility.getResponseHeaders(result)); + } + else { + response=OfficeExtension.RichApiMessageUtility.buildResponseOnError(result.error.code, result.error.message); + _this.m_context._processOfficeJsErrorResponse(result.error.code, response); + } + resolve(response); + }); + }); + }; + OfficeJsRequestExecutor.SourceLibHeaderValue="officejs"; + return OfficeJsRequestExecutor; + }()); + OfficeExtension.OfficeJsRequestExecutor=OfficeJsRequestExecutor; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + var _Internal; + (function (_Internal) { + _Internal.OfficeRequire=function () { + return null; + }(); + })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); + var _Internal; + (function (_Internal) { + var PromiseImpl; + (function (PromiseImpl) { + function Init() { + return (function () { + "use strict"; + function lib$es6$promise$utils$$objectOrFunction(x) { + return typeof x==='function' || (typeof x==='object' && x !==null); + } + function lib$es6$promise$utils$$isFunction(x) { + return typeof x==='function'; + } + function lib$es6$promise$utils$$isMaybeThenable(x) { + return typeof x==='object' && x !==null; + } + var lib$es6$promise$utils$$_isArray; + if (!Array.isArray) { + lib$es6$promise$utils$$_isArray=function (x) { + return Object.prototype.toString.call(x)==='[object Array]'; + }; + } + else { + lib$es6$promise$utils$$_isArray=Array.isArray; + } + var lib$es6$promise$utils$$isArray=lib$es6$promise$utils$$_isArray; + var lib$es6$promise$asap$$len=0; + var lib$es6$promise$asap$$toString={}.toString; + var lib$es6$promise$asap$$vertxNext; + var lib$es6$promise$asap$$customSchedulerFn; + var lib$es6$promise$asap$$asap=function asap(callback, arg) { + lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len]=callback; + lib$es6$promise$asap$$queue[lib$es6$promise$asap$$len+1]=arg; + lib$es6$promise$asap$$len+=2; + if (lib$es6$promise$asap$$len===2) { + if (lib$es6$promise$asap$$customSchedulerFn) { + lib$es6$promise$asap$$customSchedulerFn(lib$es6$promise$asap$$flush); + } + else { + lib$es6$promise$asap$$scheduleFlush(); + } + } + }; + function lib$es6$promise$asap$$setScheduler(scheduleFn) { + lib$es6$promise$asap$$customSchedulerFn=scheduleFn; + } + function lib$es6$promise$asap$$setAsap(asapFn) { + lib$es6$promise$asap$$asap=asapFn; + } + var lib$es6$promise$asap$$browserWindow=(typeof window !=='undefined') ? window : undefined; + var lib$es6$promise$asap$$browserGlobal=lib$es6$promise$asap$$browserWindow || {}; + var lib$es6$promise$asap$$BrowserMutationObserver=lib$es6$promise$asap$$browserGlobal.MutationObserver || lib$es6$promise$asap$$browserGlobal.WebKitMutationObserver; + var lib$es6$promise$asap$$isNode=typeof process !=='undefined' && {}.toString.call(process)==='[object process]'; + var lib$es6$promise$asap$$isWorker=typeof Uint8ClampedArray !=='undefined' && + typeof importScripts !=='undefined' && + typeof MessageChannel !=='undefined'; + function lib$es6$promise$asap$$useNextTick() { + var nextTick=process.nextTick; + var version=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/); + if (Array.isArray(version) && version[1]==='0' && version[2]==='10') { + nextTick=setImmediate; + } + return function () { + nextTick(lib$es6$promise$asap$$flush); + }; + } + function lib$es6$promise$asap$$useVertxTimer() { + return function () { + lib$es6$promise$asap$$vertxNext(lib$es6$promise$asap$$flush); + }; + } + function lib$es6$promise$asap$$useMutationObserver() { + var iterations=0; + var observer=new lib$es6$promise$asap$$BrowserMutationObserver(lib$es6$promise$asap$$flush); + var node=document.createTextNode(''); + observer.observe(node, { characterData: true }); + return function () { + node.data=(iterations=++iterations % 2); + }; + } + function lib$es6$promise$asap$$useMessageChannel() { + var channel=new MessageChannel(); + channel.port1.onmessage=lib$es6$promise$asap$$flush; + return function () { + channel.port2.postMessage(0); + }; + } + function lib$es6$promise$asap$$useSetTimeout() { + return function () { + setTimeout(lib$es6$promise$asap$$flush, 1); + }; + } + var lib$es6$promise$asap$$queue=new Array(1000); + function lib$es6$promise$asap$$flush() { + for (var i=0; i < lib$es6$promise$asap$$len; i+=2) { + var callback=lib$es6$promise$asap$$queue[i]; + var arg=lib$es6$promise$asap$$queue[i+1]; + callback(arg); + lib$es6$promise$asap$$queue[i]=undefined; + lib$es6$promise$asap$$queue[i+1]=undefined; + } + lib$es6$promise$asap$$len=0; + } + var lib$es6$promise$asap$$scheduleFlush; + if (lib$es6$promise$asap$$isNode) { + lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useNextTick(); + } + else if (lib$es6$promise$asap$$BrowserMutationObserver) { + lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useMutationObserver(); + } + else if (lib$es6$promise$asap$$isWorker) { + lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useMessageChannel(); + } + else { + lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useSetTimeout(); + } + function lib$es6$promise$$internal$$noop() { } + var lib$es6$promise$$internal$$PENDING=void 0; + var lib$es6$promise$$internal$$FULFILLED=1; + var lib$es6$promise$$internal$$REJECTED=2; + var lib$es6$promise$$internal$$GET_THEN_ERROR=new lib$es6$promise$$internal$$ErrorObject(); + function lib$es6$promise$$internal$$selfFullfillment() { + return new TypeError("You cannot resolve a promise with itself"); + } + function lib$es6$promise$$internal$$cannotReturnOwn() { + return new TypeError('A promises callback cannot return that same promise.'); + } + function lib$es6$promise$$internal$$getThen(promise) { + try { + return promise.then; + } + catch (error) { + lib$es6$promise$$internal$$GET_THEN_ERROR.error=error; + return lib$es6$promise$$internal$$GET_THEN_ERROR; + } + } + function lib$es6$promise$$internal$$tryThen(then, value, fulfillmentHandler, rejectionHandler) { + try { + then.call(value, fulfillmentHandler, rejectionHandler); + } + catch (e) { + return e; + } + } + function lib$es6$promise$$internal$$handleForeignThenable(promise, thenable, then) { + lib$es6$promise$asap$$asap(function (promise) { + var sealed=false; + var error=lib$es6$promise$$internal$$tryThen(then, thenable, function (value) { + if (sealed) { + return; + } + sealed=true; + if (thenable !==value) { + lib$es6$promise$$internal$$resolve(promise, value); + } + else { + lib$es6$promise$$internal$$fulfill(promise, value); + } + }, function (reason) { + if (sealed) { + return; + } + sealed=true; + lib$es6$promise$$internal$$reject(promise, reason); + }, 'Settle: '+(promise._label || ' unknown promise')); + if (!sealed && error) { + sealed=true; + lib$es6$promise$$internal$$reject(promise, error); + } + }, promise); + } + function lib$es6$promise$$internal$$handleOwnThenable(promise, thenable) { + if (thenable._state===lib$es6$promise$$internal$$FULFILLED) { + lib$es6$promise$$internal$$fulfill(promise, thenable._result); + } + else if (thenable._state===lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, thenable._result); + } + else { + lib$es6$promise$$internal$$subscribe(thenable, undefined, function (value) { + lib$es6$promise$$internal$$resolve(promise, value); + }, function (reason) { + lib$es6$promise$$internal$$reject(promise, reason); + }); + } + } + function lib$es6$promise$$internal$$handleMaybeThenable(promise, maybeThenable) { + if (maybeThenable.constructor===promise.constructor) { + lib$es6$promise$$internal$$handleOwnThenable(promise, maybeThenable); + } + else { + var then=lib$es6$promise$$internal$$getThen(maybeThenable); + if (then===lib$es6$promise$$internal$$GET_THEN_ERROR) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$GET_THEN_ERROR.error); + } + else if (then===undefined) { + lib$es6$promise$$internal$$fulfill(promise, maybeThenable); + } + else if (lib$es6$promise$utils$$isFunction(then)) { + lib$es6$promise$$internal$$handleForeignThenable(promise, maybeThenable, then); + } + else { + lib$es6$promise$$internal$$fulfill(promise, maybeThenable); + } + } + } + function lib$es6$promise$$internal$$resolve(promise, value) { + if (promise===value) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$selfFullfillment()); + } + else if (lib$es6$promise$utils$$objectOrFunction(value)) { + lib$es6$promise$$internal$$handleMaybeThenable(promise, value); + } + else { + lib$es6$promise$$internal$$fulfill(promise, value); + } + } + function lib$es6$promise$$internal$$publishRejection(promise) { + if (promise._onerror) { + promise._onerror(promise._result); + } + lib$es6$promise$$internal$$publish(promise); + } + function lib$es6$promise$$internal$$fulfill(promise, value) { + if (promise._state !==lib$es6$promise$$internal$$PENDING) { + return; + } + promise._result=value; + promise._state=lib$es6$promise$$internal$$FULFILLED; + if (promise._subscribers.length !==0) { + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, promise); + } + } + function lib$es6$promise$$internal$$reject(promise, reason) { + if (promise._state !==lib$es6$promise$$internal$$PENDING) { + return; + } + promise._state=lib$es6$promise$$internal$$REJECTED; + promise._result=reason; + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publishRejection, promise); + } + function lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection) { + var subscribers=parent._subscribers; + var length=subscribers.length; + parent._onerror=null; + subscribers[length]=child; + subscribers[length+lib$es6$promise$$internal$$FULFILLED]=onFulfillment; + subscribers[length+lib$es6$promise$$internal$$REJECTED]=onRejection; + if (length===0 && parent._state) { + lib$es6$promise$asap$$asap(lib$es6$promise$$internal$$publish, parent); + } + } + function lib$es6$promise$$internal$$publish(promise) { + var subscribers=promise._subscribers; + var settled=promise._state; + if (subscribers.length===0) { + return; + } + var child, callback, detail=promise._result; + for (var i=0; i < subscribers.length; i+=3) { + child=subscribers[i]; + callback=subscribers[i+settled]; + if (child) { + lib$es6$promise$$internal$$invokeCallback(settled, child, callback, detail); + } + else { + callback(detail); + } + } + promise._subscribers.length=0; + } + function lib$es6$promise$$internal$$ErrorObject() { + this.error=null; + } + var lib$es6$promise$$internal$$TRY_CATCH_ERROR=new lib$es6$promise$$internal$$ErrorObject(); + function lib$es6$promise$$internal$$tryCatch(callback, detail) { + try { + return callback(detail); + } + catch (e) { + lib$es6$promise$$internal$$TRY_CATCH_ERROR.error=e; + return lib$es6$promise$$internal$$TRY_CATCH_ERROR; + } + } + function lib$es6$promise$$internal$$invokeCallback(settled, promise, callback, detail) { + var hasCallback=lib$es6$promise$utils$$isFunction(callback), value, error, succeeded, failed; + if (hasCallback) { + value=lib$es6$promise$$internal$$tryCatch(callback, detail); + if (value===lib$es6$promise$$internal$$TRY_CATCH_ERROR) { + failed=true; + error=value.error; + value=null; + } + else { + succeeded=true; + } + if (promise===value) { + lib$es6$promise$$internal$$reject(promise, lib$es6$promise$$internal$$cannotReturnOwn()); + return; + } + } + else { + value=detail; + succeeded=true; + } + if (promise._state !==lib$es6$promise$$internal$$PENDING) { + } + else if (hasCallback && succeeded) { + lib$es6$promise$$internal$$resolve(promise, value); + } + else if (failed) { + lib$es6$promise$$internal$$reject(promise, error); + } + else if (settled===lib$es6$promise$$internal$$FULFILLED) { + lib$es6$promise$$internal$$fulfill(promise, value); + } + else if (settled===lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, value); + } + } + function lib$es6$promise$$internal$$initializePromise(promise, resolver) { + try { + resolver(function resolvePromise(value) { + lib$es6$promise$$internal$$resolve(promise, value); + }, function rejectPromise(reason) { + lib$es6$promise$$internal$$reject(promise, reason); + }); + } + catch (e) { + lib$es6$promise$$internal$$reject(promise, e); + } + } + function lib$es6$promise$enumerator$$Enumerator(Constructor, input) { + var enumerator=this; + enumerator._instanceConstructor=Constructor; + enumerator.promise=new Constructor(lib$es6$promise$$internal$$noop); + if (enumerator._validateInput(input)) { + enumerator._input=input; + enumerator.length=input.length; + enumerator._remaining=input.length; + enumerator._init(); + if (enumerator.length===0) { + lib$es6$promise$$internal$$fulfill(enumerator.promise, enumerator._result); + } + else { + enumerator.length=enumerator.length || 0; + enumerator._enumerate(); + if (enumerator._remaining===0) { + lib$es6$promise$$internal$$fulfill(enumerator.promise, enumerator._result); + } + } + } + else { + lib$es6$promise$$internal$$reject(enumerator.promise, enumerator._validationError()); + } + } + lib$es6$promise$enumerator$$Enumerator.prototype._validateInput=function (input) { + return lib$es6$promise$utils$$isArray(input); + }; + lib$es6$promise$enumerator$$Enumerator.prototype._validationError=function () { + return new _Internal.Error('Array Methods must be provided an Array'); + }; + lib$es6$promise$enumerator$$Enumerator.prototype._init=function () { + this._result=new Array(this.length); + }; + var lib$es6$promise$enumerator$$default=lib$es6$promise$enumerator$$Enumerator; + lib$es6$promise$enumerator$$Enumerator.prototype._enumerate=function () { + var enumerator=this; + var length=enumerator.length; + var promise=enumerator.promise; + var input=enumerator._input; + for (var i=0; promise._state===lib$es6$promise$$internal$$PENDING && i < length; i++) { + enumerator._eachEntry(input[i], i); + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._eachEntry=function (entry, i) { + var enumerator=this; + var c=enumerator._instanceConstructor; + if (lib$es6$promise$utils$$isMaybeThenable(entry)) { + if (entry.constructor===c && entry._state !==lib$es6$promise$$internal$$PENDING) { + entry._onerror=null; + enumerator._settledAt(entry._state, i, entry._result); + } + else { + enumerator._willSettleAt(c.resolve(entry), i); + } + } + else { + enumerator._remaining--; + enumerator._result[i]=entry; + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._settledAt=function (state, i, value) { + var enumerator=this; + var promise=enumerator.promise; + if (promise._state===lib$es6$promise$$internal$$PENDING) { + enumerator._remaining--; + if (state===lib$es6$promise$$internal$$REJECTED) { + lib$es6$promise$$internal$$reject(promise, value); + } + else { + enumerator._result[i]=value; + } + } + if (enumerator._remaining===0) { + lib$es6$promise$$internal$$fulfill(promise, enumerator._result); + } + }; + lib$es6$promise$enumerator$$Enumerator.prototype._willSettleAt=function (promise, i) { + var enumerator=this; + lib$es6$promise$$internal$$subscribe(promise, undefined, function (value) { + enumerator._settledAt(lib$es6$promise$$internal$$FULFILLED, i, value); + }, function (reason) { + enumerator._settledAt(lib$es6$promise$$internal$$REJECTED, i, reason); + }); + }; + function lib$es6$promise$promise$all$$all(entries) { + return new lib$es6$promise$enumerator$$default(this, entries).promise; + } + var lib$es6$promise$promise$all$$default=lib$es6$promise$promise$all$$all; + function lib$es6$promise$promise$race$$race(entries) { + var Constructor=this; + var promise=new Constructor(lib$es6$promise$$internal$$noop); + if (!lib$es6$promise$utils$$isArray(entries)) { + lib$es6$promise$$internal$$reject(promise, new TypeError('You must pass an array to race.')); + return promise; + } + var length=entries.length; + function onFulfillment(value) { + lib$es6$promise$$internal$$resolve(promise, value); + } + function onRejection(reason) { + lib$es6$promise$$internal$$reject(promise, reason); + } + for (var i=0; promise._state===lib$es6$promise$$internal$$PENDING && i < length; i++) { + lib$es6$promise$$internal$$subscribe(Constructor.resolve(entries[i]), undefined, onFulfillment, onRejection); + } + return promise; + } + var lib$es6$promise$promise$race$$default=lib$es6$promise$promise$race$$race; + function lib$es6$promise$promise$resolve$$resolve(object) { + var Constructor=this; + if (object && typeof object==='object' && object.constructor===Constructor) { + return object; + } + var promise=new Constructor(lib$es6$promise$$internal$$noop); + lib$es6$promise$$internal$$resolve(promise, object); + return promise; + } + var lib$es6$promise$promise$resolve$$default=lib$es6$promise$promise$resolve$$resolve; + function lib$es6$promise$promise$reject$$reject(reason) { + var Constructor=this; + var promise=new Constructor(lib$es6$promise$$internal$$noop); + lib$es6$promise$$internal$$reject(promise, reason); + return promise; + } + var lib$es6$promise$promise$reject$$default=lib$es6$promise$promise$reject$$reject; + var lib$es6$promise$promise$$counter=0; + function lib$es6$promise$promise$$needsResolver() { + throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); + } + function lib$es6$promise$promise$$needsNew() { + throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); + } + var lib$es6$promise$promise$$default=lib$es6$promise$promise$$Promise; + function lib$es6$promise$promise$$Promise(resolver) { + this._id=lib$es6$promise$promise$$counter++; + this._state=undefined; + this._result=undefined; + this._subscribers=[]; + if (lib$es6$promise$$internal$$noop !==resolver) { + if (!lib$es6$promise$utils$$isFunction(resolver)) { + lib$es6$promise$promise$$needsResolver(); + } + if (!(this instanceof lib$es6$promise$promise$$Promise)) { + lib$es6$promise$promise$$needsNew(); + } + lib$es6$promise$$internal$$initializePromise(this, resolver); + } + } + lib$es6$promise$promise$$Promise.all=lib$es6$promise$promise$all$$default; + lib$es6$promise$promise$$Promise.race=lib$es6$promise$promise$race$$default; + lib$es6$promise$promise$$Promise.resolve=lib$es6$promise$promise$resolve$$default; + lib$es6$promise$promise$$Promise.reject=lib$es6$promise$promise$reject$$default; + lib$es6$promise$promise$$Promise._setScheduler=lib$es6$promise$asap$$setScheduler; + lib$es6$promise$promise$$Promise._setAsap=lib$es6$promise$asap$$setAsap; + lib$es6$promise$promise$$Promise._asap=lib$es6$promise$asap$$asap; + lib$es6$promise$promise$$Promise.prototype={ + constructor: lib$es6$promise$promise$$Promise, + then: function (onFulfillment, onRejection) { + var parent=this; + var state=parent._state; + if (state===lib$es6$promise$$internal$$FULFILLED && !onFulfillment || state===lib$es6$promise$$internal$$REJECTED && !onRejection) { + return this; + } + var child=new this.constructor(lib$es6$promise$$internal$$noop); + var result=parent._result; + if (state) { + var callback=arguments[state - 1]; + lib$es6$promise$asap$$asap(function () { + lib$es6$promise$$internal$$invokeCallback(state, child, callback, result); + }); + } + else { + lib$es6$promise$$internal$$subscribe(parent, child, onFulfillment, onRejection); + } + return child; + }, + 'catch': function (onRejection) { + return this.then(null, onRejection); + } + }; + return lib$es6$promise$promise$$default; + }).call(this); + } + PromiseImpl.Init=Init; + })(PromiseImpl=_Internal.PromiseImpl || (_Internal.PromiseImpl={})); + })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); + var _Internal; + (function (_Internal) { + function isEdgeLessThan14() { + var userAgent=window.navigator.userAgent; + var versionIdx=userAgent.indexOf("Edge/"); + if (versionIdx >=0) { + userAgent=userAgent.substring(versionIdx+5, userAgent.length); + if (userAgent < "14.14393") + return true; + else + return false; + } + return false; + } + function determinePromise() { + if (typeof (window)==="undefined" && typeof (Promise)==="function") { + return Promise; + } + if (typeof (window) !=="undefined" && window.Promise) { + if (isEdgeLessThan14()) { + return _Internal.PromiseImpl.Init(); + } + else { + return window.Promise; + } + } + else { + return _Internal.PromiseImpl.Init(); + } + } + _Internal.OfficePromise=determinePromise(); + })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); + var OfficePromise=_Internal.OfficePromise; + OfficeExtension.Promise=OfficePromise; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + var TrackedObjects=(function () { + function TrackedObjects(context) { + this._autoCleanupList={}; + this.m_context=context; + } + TrackedObjects.prototype.add=function (param) { + var _this=this; + if (Array.isArray(param)) { + param.forEach(function (item) { return _this._addCommon(item, true); }); + } + else { + this._addCommon(param, true); + } + }; + TrackedObjects.prototype._autoAdd=function (object) { + this._addCommon(object, false); + this._autoCleanupList[object._objectPath.objectPathInfo.Id]=object; + }; + TrackedObjects.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function (object, resultValue) { + var shouldAutoTrack=(this.m_context._autoCleanup && + !object[OfficeExtension.Constants.isTracked] && + object !==this.m_context._rootObject && + resultValue && + !OfficeExtension.Utility.isNullOrEmptyString(resultValue[OfficeExtension.Constants.referenceId])); + if (shouldAutoTrack) { + this._autoCleanupList[object._objectPath.objectPathInfo.Id]=object; + object[OfficeExtension.Constants.isTracked]=true; + } + }; + TrackedObjects.prototype._addCommon=function (object, isExplicitlyAdded) { + if (object[OfficeExtension.Constants.isTracked]) { + if (isExplicitlyAdded && this.m_context._autoCleanup) { + delete this._autoCleanupList[object._objectPath.objectPathInfo.Id]; + } + return; + } + var referenceId=object[OfficeExtension.Constants.referenceId]; + if (OfficeExtension.Utility.isNullOrEmptyString(referenceId) && object._KeepReference) { + object._KeepReference(); + OfficeExtension.ActionFactory.createInstantiateAction(this.m_context, object); + if (isExplicitlyAdded && this.m_context._autoCleanup) { + delete this._autoCleanupList[object._objectPath.objectPathInfo.Id]; + } + object[OfficeExtension.Constants.isTracked]=true; + } + }; + TrackedObjects.prototype.remove=function (param) { + var _this=this; + if (Array.isArray(param)) { + param.forEach(function (item) { return _this._removeCommon(item); }); + } + else { + this._removeCommon(param); + } + }; + TrackedObjects.prototype._removeCommon=function (object) { + var referenceId=object[OfficeExtension.Constants.referenceId]; + if (!OfficeExtension.Utility.isNullOrEmptyString(referenceId)) { + var rootObject=this.m_context._rootObject; + if (rootObject._RemoveReference) { + rootObject._RemoveReference(referenceId); + } + delete object[OfficeExtension.Constants.isTracked]; + } + }; + TrackedObjects.prototype._retrieveAndClearAutoCleanupList=function () { + var list=this._autoCleanupList; + this._autoCleanupList={}; + return list; + }; + return TrackedObjects; + }()); + OfficeExtension.TrackedObjects=TrackedObjects; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + var RequestPrettyPrinter=(function () { + function RequestPrettyPrinter(globalObjName, referencedObjectPaths, actions, showDispose) { + if (!globalObjName) { + globalObjName="root"; + } + this.m_globalObjName=globalObjName; + this.m_referencedObjectPaths=referencedObjectPaths; + this.m_actions=actions; + this.m_statements=[]; + this.m_variableNameForObjectPathMap={}; + this.m_variableNameToObjectPathMap={}; + this.m_declaredObjectPathMap={}; + this.m_showDispose=showDispose; + } + RequestPrettyPrinter.prototype.process=function () { + if (this.m_showDispose) { + OfficeExtension.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + for (var i=0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + } + return this.m_statements; + }; + RequestPrettyPrinter.prototype.processForDebugStatementInfo=function (actionIndex) { + if (this.m_showDispose) { + OfficeExtension.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + var surroundingCount=5; + this.m_statements=[]; + var oneStatement=""; + var statementIndex=-1; + for (var i=0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + if (actionIndex==i) { + statementIndex=this.m_statements.length - 1; + } + if (statementIndex >=0 && this.m_statements.length > statementIndex+surroundingCount+1) { + break; + } + } + if (statementIndex < 0) { + return null; + } + var startIndex=statementIndex - surroundingCount; + if (startIndex < 0) { + startIndex=0; + } + var endIndex=statementIndex+1+surroundingCount; + if (endIndex > this.m_statements.length) { + endIndex=this.m_statements.length; + } + var surroundingStatements=[]; + if (startIndex !=0) { + surroundingStatements.push("..."); + } + for (var i_1=startIndex; i_1 < statementIndex; i_1++) { + surroundingStatements.push(this.m_statements[i_1]); + } + surroundingStatements.push("// >>>>>"); + surroundingStatements.push(this.m_statements[statementIndex]); + surroundingStatements.push("// <<<<<"); + for (var i_2=statementIndex+1; i_2 < endIndex; i_2++) { + surroundingStatements.push(this.m_statements[i_2]); + } + if (endIndex < this.m_statements.length) { + surroundingStatements.push("..."); + } + return { + statement: this.m_statements[statementIndex], + surroundingStatements: surroundingStatements + }; + }; + RequestPrettyPrinter.prototype.processOneAction=function (action) { + var actionInfo=action.actionInfo; + switch (actionInfo.ActionType) { + case 1: + this.processInstantiateAction(action); + break; + case 3: + this.processMethodAction(action); + break; + case 2: + this.processQueryAction(action); + break; + case 7: + this.processQueryAsJsonAction(action); + break; + case 6: + this.processRecursiveQueryAction(action); + break; + case 4: + this.processSetPropertyAction(action); + break; + case 5: + this.processTraceAction(action); + break; + case 8: + this.processEnsureUnchangedAction(action); + break; + } + }; + RequestPrettyPrinter.prototype.processInstantiateAction=function (action) { + var objId=action.actionInfo.ObjectPathId; + var objPath=this.m_referencedObjectPaths[objId]; + var varName=this.getObjVarName(objId); + if (!this.m_declaredObjectPathMap[objId]) { + var statement="var "+varName+"="+this.buildObjectPathExpressionWithParent(objPath)+";"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + this.m_declaredObjectPathMap[objId]=varName; + } + else { + var statement="// Instantiate {"+varName+"}"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + } + }; + RequestPrettyPrinter.prototype.processMethodAction=function (action) { + var methodName=action.actionInfo.Name; + if (methodName==="_KeepReference") { + methodName="track"; + } + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+"."+OfficeExtension.Utility._toCamelLowerCase(methodName)+"("+this.buildArgumentsExpression(action.actionInfo.ArgumentInfo)+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAction=function (action) { + var queryExp=this.buildQueryExpression(action); + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".load("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAsJsonAction=function (action) { + var queryExp=this.buildQueryExpression(action); + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".loadJson("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processRecursiveQueryAction=function (action) { + var queryExp=""; + if (action.actionInfo.RecursiveQueryInfo) { + queryExp=JSON.stringify(action.actionInfo.RecursiveQueryInfo); + } + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".loadRecursive("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processSetPropertyAction=function (action) { + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+"."+OfficeExtension.Utility._toCamelLowerCase(action.actionInfo.Name)+"="+this.buildArgumentsExpression(action.actionInfo.ArgumentInfo)+";"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processTraceAction=function (action) { + var statement="context.trace();"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processEnsureUnchangedAction=function (action) { + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".ensureUnchanged("+JSON.stringify(action.actionInfo.ObjectState)+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.appendDisposeCommentIfRelevant=function (statement, action) { + var _this=this; + if (this.m_showDispose) { + var lastUsedObjectPathIds=action.actionInfo.L; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + var objectNamesToDispose=lastUsedObjectPathIds.map(function (item) { return _this.getObjVarName(item); }).join(", "); + return statement+" // And then dispose {"+objectNamesToDispose+"}"; + } + } + return statement; + }; + RequestPrettyPrinter.prototype.buildQueryExpression=function (action) { + if (action.actionInfo.QueryInfo) { + var option={}; + option.select=action.actionInfo.QueryInfo.Select; + option.expand=action.actionInfo.QueryInfo.Expand; + option.skip=action.actionInfo.QueryInfo.Skip; + option.top=action.actionInfo.QueryInfo.Top; + if (typeof (option.top)==="undefined" && typeof (option.skip)==="undefined" && typeof (option.expand)==="undefined") { + if (typeof (option.select)==="undefined") { + return ""; + } + else { + return JSON.stringify(option.select); + } + } + else { + return JSON.stringify(option); + } + } + return ""; + }; + RequestPrettyPrinter.prototype.buildObjectPathExpressionWithParent=function (objPath) { + var hasParent=objPath.objectPathInfo.ObjectPathType==5 || + objPath.objectPathInfo.ObjectPathType==3 || + objPath.objectPathInfo.ObjectPathType==4; + if (hasParent && objPath.objectPathInfo.ParentObjectPathId) { + return this.getObjVarName(objPath.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(objPath); + } + return this.buildObjectPathExpression(objPath); + }; + RequestPrettyPrinter.prototype.buildObjectPathExpression=function (objPath) { + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + return "context."+this.m_globalObjName; + case 5: + return "getItem("+this.buildArgumentsExpression(objPath.objectPathInfo.ArgumentInfo)+")"; + case 3: + return OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name)+"("+this.buildArgumentsExpression(objPath.objectPathInfo.ArgumentInfo)+")"; + case 2: + return objPath.objectPathInfo.Name+".newObject()"; + case 7: + return "null"; + case 4: + return OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + case 6: + return "context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(objPath.objectPathInfo.Name)+")"; + } + }; + RequestPrettyPrinter.prototype.buildArgumentsExpression=function (args) { + var ret=""; + if (!args.Arguments) { + return ret; + } + for (var i=0; i < args.Arguments.length; i++) { + if (i > 0) { + ret=ret+", "; + } + ret=ret+this.buildArgumentLiteral(args.Arguments[i], args.ReferencedObjectPathIds ? args.ReferencedObjectPathIds[i] : null); + } + if (ret==="undefined") { + ret=""; + } + return ret; + }; + RequestPrettyPrinter.prototype.buildArgumentLiteral=function (value, objectPathId) { + if (typeof value=="number" && value===objectPathId) { + return this.getObjVarName(objectPathId); + } + else { + return JSON.stringify(value); + } + }; + RequestPrettyPrinter.prototype.getObjVarNameBase=function (objectPathId) { + var ret="v"; + var objPath=this.m_referencedObjectPaths[objectPathId]; + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + ret=this.m_globalObjName; + break; + case 4: + ret=OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + break; + case 3: + var methodName=objPath.objectPathInfo.Name; + if (methodName.length > 3 && methodName.substr(0, 3)==="Get") { + methodName=methodName.substr(3); + } + ret=OfficeExtension.Utility._toCamelLowerCase(methodName); + break; + case 5: + var parentName=this.getObjVarNameBase(objPath.objectPathInfo.ParentObjectPathId); + if (parentName.charAt(parentName.length - 1)==="s") { + ret=parentName.substr(0, parentName.length - 1); + } + else { + ret=parentName+"Item"; + } + break; + } + return ret; + }; + RequestPrettyPrinter.prototype.getObjVarName=function (objectPathId) { + if (this.m_variableNameForObjectPathMap[objectPathId]) { + return this.m_variableNameForObjectPathMap[objectPathId]; + } + var ret=this.getObjVarNameBase(objectPathId); + if (!this.m_variableNameToObjectPathMap[ret]) { + this.m_variableNameForObjectPathMap[objectPathId]=ret; + this.m_variableNameToObjectPathMap[ret]=objectPathId; + return ret; + } + var i=1; + while (this.m_variableNameToObjectPathMap[ret+i.toString()]) { + i++; + } + ret=ret+i.toString(); + this.m_variableNameForObjectPathMap[objectPathId]=ret; + this.m_variableNameToObjectPathMap[ret]=objectPathId; + return ret; + }; + return RequestPrettyPrinter; + }()); + OfficeExtension.RequestPrettyPrinter=RequestPrettyPrinter; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + var ResourceStrings=(function () { + function ResourceStrings() { + } + ResourceStrings.cannotRegisterEvent="CannotRegisterEvent"; + ResourceStrings.connectionFailureWithStatus="ConnectionFailureWithStatus"; + ResourceStrings.connectionFailureWithDetails="ConnectionFailureWithDetails"; + ResourceStrings.invalidObjectPath="InvalidObjectPath"; + ResourceStrings.invalidRequestContext="InvalidRequestContext"; + ResourceStrings.invalidArgument="InvalidArgument"; + ResourceStrings.invalidArgumentGeneric="InvalidArgumentGeneric"; + ResourceStrings.propertyNotLoaded="PropertyNotLoaded"; + ResourceStrings.runMustReturnPromise="RunMustReturnPromise"; + ResourceStrings.timeout="Timeout"; + ResourceStrings.propertyDoesNotExist="PropertyDoesNotExist"; + ResourceStrings.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty"; + ResourceStrings.moreInfoInnerError="MoreInfoInnerError"; + ResourceStrings.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod"; + ResourceStrings.valueNotLoaded="ValueNotLoaded"; + ResourceStrings.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage"; + ResourceStrings.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"; + ResourceStrings.customFunctionDefintionMissing="CustomFunctionDefintionMissing"; + ResourceStrings.customFunctionImplementationMissing="CustomFunctionImplementationMissing"; + ResourceStrings.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars"; + ResourceStrings.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit"; + ResourceStrings.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch"; + ResourceStrings.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing"; + ResourceStrings.apiNotFoundDetails="ApiNotFoundDetails"; + return ResourceStrings; + }()); + OfficeExtension.ResourceStrings=ResourceStrings; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + var ResourceStringValues=(function () { + function ResourceStringValues() { + } + ResourceStringValues.CannotRegisterEvent="The event handler cannot be registered."; + ResourceStringValues.ConnectionFailureWithStatus="The request failed with status code of {0}."; + ResourceStringValues.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}"; + ResourceStringValues.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format."; + ResourceStringValues.InvalidObjectPath="The object path '{0}' isn't working for what you're trying to do. If you're using the object across multiple \"context.sync\" calls and outside the sequential execution of a \".run\" batch, please use the \"context.trackedObjects.add()\" and \"context.trackedObjects.remove()\" methods to manage the object's lifetime."; + ResourceStringValues.InvalidRequestContext="Cannot use the object across different request contexts."; + ResourceStringValues.PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context."; + ResourceStringValues.RunMustReturnPromise="The batch function passed to the \".run\" method didn't return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from \"context.sync()\"."; + ResourceStringValues.Timeout="The operation has timed out."; + ResourceStringValues.ValueNotLoaded="The value of the result object has not been loaded yet. Before reading the value property, call \"context.sync()\" on the associated request context."; + ResourceStringValues.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page."; + ResourceStringValues.InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again."; + ResourceStringValues.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions."; + ResourceStringValues.CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function."; + ResourceStringValues.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods."; + ResourceStringValues.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name."; + ResourceStringValues.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it."; + ResourceStringValues.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable."; + ResourceStringValues.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}."; + return ResourceStringValues; + }()); + OfficeExtension.ResourceStringValues=ResourceStringValues; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + var RichApiMessageUtility=(function () { + function RichApiMessageUtility() { + } + RichApiMessageUtility.buildMessageArrayForIRequestExecutor=function (customData, requestFlags, requestMessage, sourceLibHeaderValue) { + var requestMessageText=JSON.stringify(requestMessage.Body); + OfficeExtension.Utility.log("Request:"); + OfficeExtension.Utility.log(requestMessageText); + var headers={}; + headers[OfficeExtension.Constants.sourceLibHeader]=sourceLibHeaderValue; + var messageSafearray=RichApiMessageUtility.buildRequestMessageSafeArray(customData, requestFlags, "POST", "ProcessQuery", headers, requestMessageText); + return messageSafearray; + }; + RichApiMessageUtility.buildResponseOnSuccess=function (responseBody, responseHeaders) { + var response={ ErrorCode: '', ErrorMessage: '', Headers: null, Body: null }; + response.Body=JSON.parse(responseBody); + response.Headers=responseHeaders; + return response; + }; + RichApiMessageUtility.buildResponseOnError=function (errorCode, message) { + var response={ ErrorCode: '', ErrorMessage: '', Headers: null, Body: null }; + response.ErrorCode=OfficeExtension.ErrorCodes.generalException; + response.ErrorMessage=message; + if (errorCode==RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability) { + response.ErrorCode=OfficeExtension.ErrorCodes.accessDenied; + } + else if (errorCode==RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached) { + response.ErrorCode=OfficeExtension.ErrorCodes.activityLimitReached; + } + else if (errorCode==RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidOrTimedOutSession) { + response.ErrorCode=OfficeExtension.ErrorCodes.invalidOrTimedOutSession; + response.ErrorMessage=OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidOrTimedOutSessionMessage); + } + return response; + }; + RichApiMessageUtility.buildHttpResponseFromOfficeJsError=function (errorCode, message) { + var statusCode=500; + var errorBody={}; + errorBody["error"]={}; + errorBody["error"]["code"]=OfficeExtension.ErrorCodes.generalException; + errorBody["error"]["message"]=message; + if (errorCode===RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability) { + statusCode=403; + errorBody["error"]["code"]=OfficeExtension.ErrorCodes.accessDenied; + } + else if (errorCode===RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached) { + statusCode=429; + errorBody["error"]["code"]=OfficeExtension.ErrorCodes.activityLimitReached; + } + return { statusCode: statusCode, headers: {}, body: JSON.stringify(errorBody) }; + }; + RichApiMessageUtility.buildRequestMessageSafeArray=function (customData, requestFlags, method, path, headers, body) { + var headerArray=[]; + if (headers) { + for (var headerName in headers) { + headerArray.push(headerName); + headerArray.push(headers[headerName]); + } + } + var appPermission=0; + var solutionId=""; + var instanceId=""; + var marketplaceType=""; + return [ + customData, + method, + path, + headerArray, + body, + appPermission, + requestFlags, + solutionId, + instanceId, + marketplaceType + ]; + }; + RichApiMessageUtility.getResponseBody=function (result) { + return RichApiMessageUtility.getResponseBodyFromSafeArray(result.value.data); + }; + RichApiMessageUtility.getResponseHeaders=function (result) { + return RichApiMessageUtility.getResponseHeadersFromSafeArray(result.value.data); + }; + RichApiMessageUtility.getResponseBodyFromSafeArray=function (data) { + var ret=data[2]; + if (typeof (ret)==="string") { + return ret; + } + var arr=ret; + return arr.join(""); + }; + RichApiMessageUtility.getResponseHeadersFromSafeArray=function (data) { + var arrayHeader=data[1]; + if (!arrayHeader) { + return null; + } + var headers={}; + for (var i=0; i < arrayHeader.length - 1; i+=2) { + headers[arrayHeader[i]]=arrayHeader[i+1]; + } + return headers; + }; + RichApiMessageUtility.getResponseStatusCode=function (result) { + return RichApiMessageUtility.getResponseStatusCodeFromSafeArray(result.value.data); + }; + RichApiMessageUtility.getResponseStatusCodeFromSafeArray=function (data) { + return data[0]; + }; + RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidOrTimedOutSession=5012; + RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached=5102; + RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability=7000; + return RichApiMessageUtility; + }()); + OfficeExtension.RichApiMessageUtility=RichApiMessageUtility; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + var Utility=(function () { + function Utility() { + } + Utility.checkArgumentNull=function (value, name) { + if (Utility.isNullOrUndefined(value)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(name); + } + }; + Utility.isNullOrUndefined=function (value) { + if (value===null) { + return true; + } + if (typeof (value)==="undefined") { + return true; + } + return false; + }; + Utility.isUndefined=function (value) { + if (typeof (value)==="undefined") { + return true; + } + return false; + }; + Utility.isNullOrEmptyString=function (value) { + if (value===null) { + return true; + } + if (typeof (value)==="undefined") { + return true; + } + if (value.length==0) { + return true; + } + return false; + }; + Utility.isPlainJsonObject=function (value) { + if (Utility.isNullOrUndefined(value)) { + return false; + } + if (typeof (value) !=="object") { + return false; + } + return Object.getPrototypeOf(value)===Object.getPrototypeOf({}); + }; + Utility.trim=function (str) { + return str.replace(new RegExp("^\\s+|\\s+$", "g"), ""); + }; + Utility.caseInsensitiveCompareString=function (str1, str2) { + if (Utility.isNullOrUndefined(str1)) { + return Utility.isNullOrUndefined(str2); + } + else { + if (Utility.isNullOrUndefined(str2)) { + return false; + } + else { + return str1.toUpperCase()==str2.toUpperCase(); + } + } + }; + Utility.adjustToDateTime=function (value) { + if (Utility.isNullOrUndefined(value)) { + return null; + } + if (typeof (value)==="string") { + return new Date(value); + } + if (Array.isArray(value)) { + var arr=value; + for (var i=0; i < arr.length; i++) { + arr[i]=Utility.adjustToDateTime(arr[i]); + } + return arr; + } + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("date"); + }; + Utility.isReadonlyRestRequest=function (method) { + return Utility.caseInsensitiveCompareString(method, "GET"); + }; + Utility.setMethodArguments=function (context, argumentInfo, args) { + if (Utility.isNullOrUndefined(args)) { + return null; + } + var referencedObjectPaths=new Array(); + var referencedObjectPathIds=new Array(); + var hasOne=Utility.collectObjectPathInfos(context, args, referencedObjectPaths, referencedObjectPathIds); + argumentInfo.Arguments=args; + if (hasOne) { + argumentInfo.ReferencedObjectPathIds=referencedObjectPathIds; + return referencedObjectPaths; + } + return null; + }; + Utility.collectObjectPathInfos=function (context, args, referencedObjectPaths, referencedObjectPathIds) { + var hasOne=false; + for (var i=0; i < args.length; i++) { + if (args[i] instanceof OfficeExtension.ClientObject) { + var clientObject=args[i]; + Utility.validateContext(context, clientObject); + args[i]=clientObject._objectPath.objectPathInfo.Id; + referencedObjectPathIds.push(clientObject._objectPath.objectPathInfo.Id); + referencedObjectPaths.push(clientObject._objectPath); + hasOne=true; + } + else if (Array.isArray(args[i])) { + var childArrayObjectPathIds=new Array(); + var childArrayHasOne=Utility.collectObjectPathInfos(context, args[i], referencedObjectPaths, childArrayObjectPathIds); + if (childArrayHasOne) { + referencedObjectPathIds.push(childArrayObjectPathIds); + hasOne=true; + } + else { + referencedObjectPathIds.push(0); + } + } + else { + referencedObjectPathIds.push(0); + } + } + return hasOne; + }; + Utility.fixObjectPathIfNecessary=function (clientObject, value) { + if (clientObject && clientObject._objectPath && value) { + clientObject._objectPath.updateUsingObjectData(value); + } + }; + Utility.validateObjectPath=function (clientObject) { + var objectPath=clientObject._objectPath; + while (objectPath) { + if (!objectPath.isValid) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.invalidObjectPath, + message: Utility._getResourceString(OfficeExtension.ResourceStrings.invalidObjectPath, Utility.getObjectPathExpression(objectPath)), + debugInfo: { + errorLocation: Utility.getObjectPathExpression(objectPath) + } + }); + } + objectPath=objectPath.parentObjectPath; + } + }; + Utility.validateReferencedObjectPaths=function (objectPaths) { + if (objectPaths) { + for (var i=0; i < objectPaths.length; i++) { + var objectPath=objectPaths[i]; + while (objectPath) { + if (!objectPath.isValid) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.invalidObjectPath, + message: Utility._getResourceString(OfficeExtension.ResourceStrings.invalidObjectPath, Utility.getObjectPathExpression(objectPath)) + }); + } + objectPath=objectPath.parentObjectPath; + } + } + } + }; + Utility.validateContext=function (context, obj) { + if (obj && obj.context !==context) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.invalidRequestContext, + message: Utility._getResourceString(OfficeExtension.ResourceStrings.invalidRequestContext) + }); + } + }; + Utility.log=function (message) { + if (Utility._logEnabled && typeof (console) !=="undefined" && console.log) { + console.log(message); + } + }; + Utility.load=function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj; + }; + Utility.loadAndSync=function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj.context.sync().then(function () { return clientObj; }); + }; + Utility.fetch=function (clientObj, option) { + var shouldPolyfill=OfficeExtension._internalConfig.alwaysPolyfillClientObjectFetchMethod; + if (!shouldPolyfill) { + if (typeof (window) !=="undefined" && window.Office && window.Office.context && window.Office.context.requirements) { + shouldPolyfill=!window.Office.context.requirements.isSetSupported("RichApiRuntime", "1.1"); + } + } + var result=new OfficeExtension.FetchResult(clientObj, shouldPolyfill); + var queryOption=OfficeExtension.ClientRequestContext._parseQueryOption(option); + var action; + if (shouldPolyfill) { + action=OfficeExtension.ActionFactory.createQueryAction(clientObj.context, clientObj, queryOption); + } + else { + action=OfficeExtension.ActionFactory.createQueryAsJsonAction(clientObj.context, clientObj, queryOption); + } + clientObj.context._pendingRequest.addActionResultHandler(action, result); + return result; + }; + Utility.fetchAndSync=function (clientObj, option) { + var result=Utility.fetch(clientObj, option); + return clientObj.context.sync().then(function () { return result; }); + }; + Utility._parseSelectExpand=function (select) { + var args=[]; + if (!Utility.isNullOrEmptyString(select)) { + var propertyNames=select.split(","); + for (var i=0; i < propertyNames.length; i++) { + var propertyName=propertyNames[i]; + propertyName=sanitizeForAnyItemsSlash(propertyName.trim()); + if (propertyName.length > 0) { + args.push(propertyName); + } + } + } + return args; + function sanitizeForAnyItemsSlash(propertyName) { + var propertyNameLower=propertyName.toLowerCase(); + if (propertyNameLower==="items" || propertyNameLower==="items/") { + return '*'; + } + var itemsSlashLength=6; + var isItemsSlashOrItemsDot=propertyNameLower.substr(0, itemsSlashLength)==="items/" || + propertyNameLower.substr(0, itemsSlashLength)==="items."; + if (isItemsSlashOrItemsDot) { + propertyName=propertyName.substr(itemsSlashLength); + } + return propertyName.replace(new RegExp("[\/\.]items[\/\.]", "gi"), "/"); + } + }; + Utility.toJson=function (clientObj, scalarProperties, navigationProperties, collectionItemsIfAny) { + var result={}; + for (var prop in scalarProperties) { + var value=scalarProperties[prop]; + if (typeof value !=="undefined") { + result[prop]=value; + } + } + for (var prop in navigationProperties) { + var value=navigationProperties[prop]; + if (typeof value !=="undefined") { + result[prop]=value.toJSON(); + } + } + if (collectionItemsIfAny) { + result["items"]=collectionItemsIfAny.map(function (item) { return item.toJSON(); }); + } + return result; + }; + Utility.throwError=function (resourceId, arg, errorLocation) { + throw new OfficeExtension._Internal.RuntimeError({ + code: resourceId, + message: Utility._getResourceString(resourceId, arg), + debugInfo: errorLocation ? { errorLocation: errorLocation } : undefined + }); + }; + Utility.createRuntimeError=function (code, message, location) { + return (new OfficeExtension._Internal.RuntimeError({ + code: code, + message: message, + debugInfo: { errorLocation: location } + })); + }; + Utility._getResourceString=function (resourceId, arg) { + var ret; + if (typeof (window) !=="undefined" && window.Strings && window.Strings.OfficeOM) { + var stringName="L_"+resourceId; + var stringValue=window.Strings.OfficeOM[stringName]; + if (stringValue) { + ret=stringValue; + } + } + if (!ret) { + ret=OfficeExtension.ResourceStringValues[resourceId]; + } + if (!ret) { + ret=resourceId; + } + if (!Utility.isNullOrUndefined(arg)) { + if (Array.isArray(arg)) { + var arrArg=arg; + ret=Utility._formatString(ret, arrArg); + } + else { + ret=ret.replace("{0}", arg); + } + } + return ret; + }; + Utility._formatString=function (format, arrArg) { + return format.replace(/\{\d\}/g, function (v) { + var position=parseInt(v.substr(1, v.length - 2)); + if (position < arrArg.length) { + return arrArg[position]; + } + else { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("format"); + } + }); + }; + Utility.throwIfNotLoaded=function (propertyName, fieldValue, entityName, isNull) { + if (!isNull && Utility.isUndefined(fieldValue) && propertyName.charCodeAt(0) !=Utility.s_underscoreCharCode) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.propertyNotLoaded, + message: Utility._getResourceString(OfficeExtension.ResourceStrings.propertyNotLoaded, propertyName), + debugInfo: entityName ? { errorLocation: entityName+"."+propertyName } : undefined + }); + } + }; + Utility.throwIfApiNotSupported=function (apiFullName, apiSetName, apiSetVersion, hostName) { + if (!Utility._doApiNotSupportedCheck) { + return; + } + if (typeof (window) !=="undefined" && window.Office && window.Office.context) { + if (!window.Office.context.requirements.isSetSupported(apiSetName, apiSetVersion)) { + var message=Utility._getResourceString(OfficeExtension.ResourceStrings.apiNotFoundDetails, [apiFullName, apiSetName+" "+apiSetVersion, hostName]); + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.apiNotFound, + message: message, + debugInfo: { errorLocation: apiFullName } + }); + } + } + }; + Utility.getObjectPathExpression=function (objectPath) { + var ret=""; + while (objectPath) { + switch (objectPath.objectPathInfo.ObjectPathType) { + case 1: + ret=ret; + break; + case 2: + ret="new()"+(ret.length > 0 ? "." : "")+ret; + break; + case 3: + ret=Utility.normalizeName(objectPath.objectPathInfo.Name)+"()"+(ret.length > 0 ? "." : "")+ret; + break; + case 4: + ret=Utility.normalizeName(objectPath.objectPathInfo.Name)+(ret.length > 0 ? "." : "")+ret; + break; + case 5: + ret="getItem()"+(ret.length > 0 ? "." : "")+ret; + break; + case 6: + ret="_reference()"+(ret.length > 0 ? "." : "")+ret; + break; + } + objectPath=objectPath.parentObjectPath; + } + return ret; + }; + Utility._createPromiseFromResult=function (value) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { + resolve(value); + }); + }; + Utility._createTimeoutPromise=function (timeout) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { + setTimeout(function () { + resolve(null); + }, timeout); + }); + }; + Utility.promisify=function (action) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { + var callback=function (result) { + if (result.status=="failed") { + reject(result.error); + } + else { + resolve(result.value); + } + }; + action(callback); + }); + }; + Utility._addActionResultHandler=function (clientObj, action, resultHandler) { + clientObj.context._pendingRequest.addActionResultHandler(action, resultHandler); + }; + Utility._handleNavigationPropertyResults=function (clientObj, objectValue, propertyNames) { + for (var i=0; i < propertyNames.length - 1; i+=2) { + if (!Utility.isUndefined(objectValue[propertyNames[i+1]])) { + clientObj[propertyNames[i]]._handleResult(objectValue[propertyNames[i+1]]); + } + } + }; + Utility.normalizeName=function (name) { + return name.substr(0, 1).toLowerCase()+name.substr(1); + }; + Utility._isLocalDocumentUrl=function (url) { + return Utility._getLocalDocumentUrlPrefixLength(url) > 0; + }; + Utility._getLocalDocumentUrlPrefixLength=function (url) { + var localDocumentPrefixes=["http://document.localhost", "https://document.localhost", "//document.localhost"]; + var urlLower=url.toLowerCase().trim(); + for (var i=0; i < localDocumentPrefixes.length; i++) { + if (urlLower===localDocumentPrefixes[i]) { + return localDocumentPrefixes[i].length; + } + else if (urlLower.substr(0, localDocumentPrefixes[i].length+1)===localDocumentPrefixes[i]+"/") { + return localDocumentPrefixes[i].length+1; + } + } + return 0; + }; + Utility._validateLocalDocumentRequest=function (request) { + var index=Utility._getLocalDocumentUrlPrefixLength(request.url); + if (index <=0) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError({ + argumentName: "request" + }); + } + var path=request.url.substr(index); + var pathLower=path.toLowerCase(); + if (pathLower==="_api") { + path=""; + } + else if (pathLower.substr(0, "_api/".length)==="_api/") { + path=path.substr("_api/".length); + } + return { + method: request.method, + url: path, + headers: request.headers, + body: request.body + }; + }; + Utility._buildRequestMessageSafeArray=function (request) { + var requestFlags=0; + if (!Utility.isReadonlyRestRequest(request.method)) { + requestFlags=1; + } + if (request.url.substr(0, OfficeExtension.Constants.processQuery.length).toLowerCase()===OfficeExtension.Constants.processQuery.toLowerCase()) { + var index=request.url.indexOf("?"); + if (index > 0) { + var queryString=request.url.substr(index+1); + var parts=queryString.split("&"); + for (var i=0; i < parts.length; i++) { + var keyvalue=parts[i].split("="); + if (keyvalue[0].toLowerCase()===OfficeExtension.Constants.flags) { + var flags=parseInt(keyvalue[1]); + requestFlags=flags; + requestFlags=requestFlags & 1; + break; + } + } + } + } + return OfficeExtension.RichApiMessageUtility.buildRequestMessageSafeArray("", requestFlags, request.method, request.url, request.headers, request.body); + }; + Utility._parseHttpResponseHeaders=function (allResponseHeaders) { + var responseHeaders={}; + if (!Utility.isNullOrEmptyString(allResponseHeaders)) { + var regex=new RegExp("\r?\n"); + var entries=allResponseHeaders.split(regex); + for (var i=0; i < entries.length; i++) { + var entry=entries[i]; + if (entry !=null) { + var index=entry.indexOf(':'); + if (index > 0) { + var key=entry.substr(0, index); + var value=entry.substr(index+1); + key=Utility.trim(key); + value=Utility.trim(value); + responseHeaders[key.toUpperCase()]=value; + } + } + } + } + return responseHeaders; + }; + Utility._parseErrorResponse=function (responseInfo) { + var errorObj=null; + if (Utility.isPlainJsonObject(responseInfo.body)) { + errorObj=responseInfo.body; + } + else if (!Utility.isNullOrEmptyString(responseInfo.body)) { + var errorResponseBody=Utility.trim(responseInfo.body); + try { + errorObj=JSON.parse(errorResponseBody); + } + catch (e) { + Utility.log("Error when parse "+errorResponseBody); + } + } + var errorMessage; + var errorCode; + if (!Utility.isNullOrUndefined(errorObj) && typeof (errorObj)==="object" && errorObj.error) { + errorCode=errorObj.error.code; + errorMessage=Utility._getResourceString(OfficeExtension.ResourceStrings.connectionFailureWithDetails, [responseInfo.statusCode.toString(), errorObj.error.code, errorObj.error.message]); + } + else { + errorMessage=Utility._getResourceString(OfficeExtension.ResourceStrings.connectionFailureWithStatus, responseInfo.statusCode.toString()); + } + if (Utility.isNullOrEmptyString(errorCode)) { + errorCode=OfficeExtension.ErrorCodes.connectionFailure; + } + return { errorCode: errorCode, errorMessage: errorMessage }; + }; + Utility._copyHeaders=function (src, dest) { + if (src && dest) { + for (var key in src) { + dest[key]=src[key]; + } + } + }; + Utility._toCamelLowerCase=function (name) { + if (Utility.isNullOrEmptyString(name)) { + return name; + } + var index=0; + while (index < name.length && name.charCodeAt(index) >=65 && name.charCodeAt(index) <=90) { + index++; + } + if (index < name.length) { + return name.substr(0, index).toLowerCase()+name.substr(index); + } + else { + return name.toLowerCase(); + } + }; + Utility._logEnabled=false; + Utility._synchronousCleanup=false; + Utility._doApiNotSupportedCheck=false; + Utility.s_underscoreCharCode="_".charCodeAt(0); + return Utility; + }()); + OfficeExtension.Utility=Utility; +})(OfficeExtension || (OfficeExtension={})); + +var __extends=(this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p]=b[p]; + function __() { this.constructor=d; } + d.prototype=b===null ? Object.create(b) : (__.prototype=b.prototype, new __()); +}; +var OfficeCore; +(function (OfficeCore) { + var _hostName="OfficeCore"; + var _defaultApiSetName="ExperimentApi"; + var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; + var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; + var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; + var _createNewObjectObjectPath=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath; + var _createChildItemObjectPathUsingIndexer=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer; + var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; + var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; + var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; + var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined=OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; + var _load=OfficeExtension.Utility.load; + var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; + var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; + var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var FlightingService=(function (_super) { + __extends(FlightingService, _super); + function FlightingService() { + _super.apply(this, arguments); + } + Object.defineProperty(FlightingService.prototype, "_className", { + get: function () { + return "FlightingService"; + }, + enumerable: true, + configurable: true + }); + FlightingService.prototype.getClientSessionId=function () { + var action=_createMethodAction(this.context, this, "GetClientSessionId", 1, []); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + FlightingService.prototype.getDeferredFlights=function () { + var action=_createMethodAction(this.context, this, "GetDeferredFlights", 1, []); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + FlightingService.prototype.getFeature=function (featureName, type, defaultValue, possibleValues) { + return new OfficeCore.ABType(this.context, _createMethodObjectPath(this.context, this, "GetFeature", 1, [featureName, type, defaultValue, possibleValues], false, false, null)); + }; + FlightingService.prototype.getFeatureGate=function (featureName, scope) { + return new OfficeCore.ABType(this.context, _createMethodObjectPath(this.context, this, "GetFeatureGate", 1, [featureName, scope], false, false, null)); + }; + FlightingService.prototype.resetOverride=function (featureName) { + _createMethodAction(this.context, this, "ResetOverride", 0, [featureName]); + }; + FlightingService.prototype.setOverride=function (featureName, type, value) { + _createMethodAction(this.context, this, "SetOverride", 0, [featureName, type, value]); + }; + FlightingService.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + FlightingService.newObject=function (context) { + var ret=new OfficeCore.FlightingService(context, _createNewObjectObjectPath(context, "Microsoft.Experiment.FlightingService", false)); + return ret; + }; + FlightingService.prototype.toJSON=function () { + return {}; + }; + return FlightingService; + }(OfficeExtension.ClientObject)); + OfficeCore.FlightingService=FlightingService; + var ABType=(function (_super) { + __extends(ABType, _super); + function ABType() { + _super.apply(this, arguments); + } + Object.defineProperty(ABType.prototype, "_className", { + get: function () { + return "ABType"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ABType.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this.m_value, "ABType", this._isNull); + return this.m_value; + }, + enumerable: true, + configurable: true + }); + ABType.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Value"])) { + this.m_value=obj["Value"]; + } + }; + ABType.prototype.load=function (option) { + _load(this, option); + return this; + }; + ABType.prototype.toJSON=function () { + return { + "value": this.m_value + }; + }; + return ABType; + }(OfficeExtension.ClientObject)); + OfficeCore.ABType=ABType; + var FeatureType; + (function (FeatureType) { + FeatureType.boolean="Boolean"; + FeatureType.integer="Integer"; + FeatureType.string="String"; + })(FeatureType=OfficeCore.FeatureType || (OfficeCore.FeatureType={})); + var ExperimentErrorCodes; + (function (ExperimentErrorCodes) { + ExperimentErrorCodes.generalException="GeneralException"; + })(ExperimentErrorCodes=OfficeCore.ExperimentErrorCodes || (OfficeCore.ExperimentErrorCodes={})); +})(OfficeCore || (OfficeCore={})); +var OfficeCore; +(function (OfficeCore) { + var RequestContext=(function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + _super.call(this, url); + } + Object.defineProperty(RequestContext.prototype, "flighting", { + get: function () { + return this.flightingService; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "telemetry", { + get: function () { + if (!this.m_telemetry) { + this.m_telemetry=OfficeCore.TelemetryService.newObject(this); + } + return this.m_telemetry; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "flightingService", { + get: function () { + if (!this.m_flightingService) { + this.m_flightingService=OfficeCore.FlightingService.newObject(this); + } + return this.m_flightingService; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeExtension.ClientRequestContext)); + OfficeCore.RequestContext=RequestContext; +})(OfficeCore || (OfficeCore={})); +var OfficeCore; +(function (OfficeCore) { + var _hostName="OfficeCore"; + var _defaultApiSetName="TelemetryApi"; + var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; + var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; + var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; + var _createNewObjectObjectPath=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath; + var _createChildItemObjectPathUsingIndexer=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer; + var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; + var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; + var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; + var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined=OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; + var _load=OfficeExtension.Utility.load; + var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; + var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; + var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var _typeTelemetryService="TelemetryService"; + var TelemetryService=(function (_super) { + __extends(TelemetryService, _super); + function TelemetryService() { + _super.apply(this, arguments); + } + Object.defineProperty(TelemetryService.prototype, "_className", { + get: function () { + return "TelemetryService"; + }, + enumerable: true, + configurable: true + }); + TelemetryService.prototype.sendTelemetryEvent=function (telemetryProperties, eventName, eventContract, eventFlags, value) { + _createMethodAction(this.context, this, "SendTelemetryEvent", 1, [telemetryProperties, eventName, eventContract, eventFlags, value], false); + }; + TelemetryService.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + TelemetryService.newObject=function (context) { + var ret=new OfficeCore.TelemetryService(context, _createNewObjectObjectPath(context, "Microsoft.Telemetry.TelemetryService", false, false)); + return ret; + }; + TelemetryService.prototype.toJSON=function () { + return {}; + }; + return TelemetryService; + }(OfficeExtension.ClientObject)); + OfficeCore.TelemetryService=TelemetryService; + var TelemetryErrorCodes; + (function (TelemetryErrorCodes) { + TelemetryErrorCodes.generalException="GeneralException"; + })(TelemetryErrorCodes=OfficeCore.TelemetryErrorCodes || (OfficeCore.TelemetryErrorCodes={})); +})(OfficeCore || (OfficeCore={})); + +var __extends=(this && this.__extends) || (function () { + var extendStatics=Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__=b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p]=b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor=d; } + d.prototype=b===null ? Object.create(b) : (__.prototype=b.prototype, new __()); + }; +})(); +var Excel; +(function (Excel) { + function lowerCaseFirst(str) { + return str[0].toLowerCase()+str.slice(1); + } + var iconSets=["ThreeArrows", + "ThreeArrowsGray", + "ThreeFlags", + "ThreeTrafficLights1", + "ThreeTrafficLights2", + "ThreeSigns", + "ThreeSymbols", + "ThreeSymbols2", + "FourArrows", + "FourArrowsGray", + "FourRedToBlack", + "FourRating", + "FourTrafficLights", + "FiveArrows", + "FiveArrowsGray", + "FiveRating", + "FiveQuarters", + "ThreeStars", + "ThreeTriangles", + "FiveBoxes"]; + var iconNames=[["RedDownArrow", "YellowSideArrow", "GreenUpArrow"], + ["GrayDownArrow", "GraySideArrow", "GrayUpArrow"], + ["RedFlag", "YellowFlag", "GreenFlag"], + ["RedCircleWithBorder", "YellowCircle", "GreenCircle"], + ["RedTrafficLight", "YellowTrafficLight", "GreenTrafficLight"], + ["RedDiamond", "YellowTriangle", "GreenCircle"], + ["RedCrossSymbol", "YellowExclamationSymbol", "GreenCheckSymbol"], + ["RedCross", "YellowExclamation", "GreenCheck"], + ["RedDownArrow", "YellowDownInclineArrow", "YellowUpInclineArrow", "GreenUpArrow"], + ["GrayDownArrow", "GrayDownInclineArrow", "GrayUpInclineArrow", "GrayUpArrow"], + ["BlackCircle", "GrayCircle", "PinkCircle", "RedCircle"], + ["OneBar", "TwoBars", "ThreeBars", "FourBars"], + ["BlackCircleWithBorder", "RedCircleWithBorder", "YellowCircle", "GreenCircle"], + ["RedDownArrow", "YellowDownInclineArrow", "YellowSideArrow", "YellowUpInclineArrow", "GreenUpArrow"], + ["GrayDownArrow", "GrayDownInclineArrow", "GraySideArrow", "GrayUpInclineArrow", "GrayUpArrow"], + ["NoBars", "OneBar", "TwoBars", "ThreeBars", "FourBars"], + ["WhiteCircleAllWhiteQuarters", "CircleWithThreeWhiteQuarters", "CircleWithTwoWhiteQuarters", "CircleWithOneWhiteQuarter", "BlackCircle"], + ["SilverStar", "HalfGoldStar", "GoldStar"], + ["RedDownTriangle", "YellowDash", "GreenUpTriangle"], + ["NoFilledBoxes", "OneFilledBox", "TwoFilledBoxes", "ThreeFilledBoxes", "FourFilledBoxes"],]; + Excel.icons={}; + iconSets.map(function (title, i) { + var camelTitle=lowerCaseFirst(title); + Excel.icons[camelTitle]=[]; + iconNames[i].map(function (iconName, j) { + iconName=lowerCaseFirst(iconName); + var obj={ set: title, index: j }; + Excel.icons[camelTitle].push(obj); + Excel.icons[camelTitle][iconName]=obj; + }); + }); + function setRangePropertiesInBulk(range, propertyName, values) { + var maxCellCount=1500; + if (Array.isArray(values) && values.length > 0 && Array.isArray(values[0]) && (values.length * values[0].length > maxCellCount) && isExcel1_3OrAbove()) { + var maxRowCount=Math.max(1, Math.round(maxCellCount / values[0].length)); + range._ValidateArraySize(values.length, values[0].length); + for (var startRowIndex=0; startRowIndex < values.length; startRowIndex+=maxRowCount) { + var rowCount=maxRowCount; + if (startRowIndex+rowCount > values.length) { + rowCount=values.length - startRowIndex; + } + var chunk=range.getRow(startRowIndex).getBoundingRect(range.getRow(startRowIndex+rowCount - 1)); + var valueSlice=values.slice(startRowIndex, startRowIndex+rowCount); + _createSetPropertyAction(chunk.context, chunk, propertyName, valueSlice); + } + return true; + } + return false; + } + function isExcel1_3OrAbove() { + if (typeof (window) !=="undefined" && window.Office && window.Office.context && window.Office.context.requirements) { + return window.Office.context.requirements.isSetSupported("ExcelApi", 1.3); + } + else { + return true; + } + } + var Session=(function () { + function Session(workbookUrl, requestHeaders, persisted) { + this.m_workbookUrl=workbookUrl; + this.m_requestHeaders=requestHeaders; + if (!this.m_requestHeaders) { + this.m_requestHeaders={}; + } + if (OfficeExtension.Utility.isNullOrUndefined(persisted)) { + persisted=true; + } + this.m_persisted=persisted; + } + Session.prototype.close=function () { + var _this=this; + if (this.m_requestUrlAndHeaderInfo && + !OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)) { + var url=this.m_requestUrlAndHeaderInfo.url; + if (url.charAt(url.length - 1) !="/") { + url=url+"/"; + } + url=url+"closeSession"; + var headers=this.m_requestUrlAndHeaderInfo; + var req={ method: "POST", url: url, headers: this.m_requestUrlAndHeaderInfo.headers, body: "" }; + this.m_requestUrlAndHeaderInfo=null; + return OfficeExtension.HttpUtility.sendRequest(req) + .then(function (resp) { + if (resp.statusCode !=204) { + var err=OfficeExtension.Utility._parseErrorResponse(resp); + throw OfficeExtension.Utility.createRuntimeError(err.errorCode, err.errorMessage, "Session.close"); + } + _this.m_requestUrlAndHeaderInfo=null; + var foundSessionKey=null; + for (var key in _this.m_requestHeaders) { + if (key.toLowerCase()==Session.WorkbookSessionIdHeaderNameLower) { + foundSessionKey=key; + break; + } + } + if (foundSessionKey) { + delete _this.m_requestHeaders[foundSessionKey]; + } + }); + } + else { + return OfficeExtension.Utility._createPromiseFromResult(null); + } + }; + Session.prototype._resolveRequestUrlAndHeaderInfo=function () { + var _this=this; + if (this.m_requestUrlAndHeaderInfo) { + return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo); + } + if (OfficeExtension.Utility.isNullOrEmptyString(this.m_workbookUrl) || + OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl)) { + this.m_requestUrlAndHeaderInfo={ url: this.m_workbookUrl, headers: this.m_requestHeaders }; + return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo); + } + var foundSessionId=false; + for (var key in this.m_requestHeaders) { + if (key.toLowerCase()==Session.WorkbookSessionIdHeaderNameLower) { + foundSessionId=true; + break; + } + } + if (foundSessionId) { + this.m_requestUrlAndHeaderInfo={ url: this.m_workbookUrl, headers: this.m_requestHeaders }; + return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo); + } + var url=this.m_workbookUrl; + if (url.charAt(url.length - 1) !="/") { + url=url+"/"; + } + url=url+"createSession"; + var headers={}; + OfficeExtension.Utility._copyHeaders(this.m_requestHeaders, headers); + headers["Content-Type"]="application/json"; + var body={}; + body.persistChanges=this.m_persisted; + var req={ method: "POST", url: url, headers: headers, body: JSON.stringify(body) }; + return OfficeExtension.HttpUtility.sendRequest(req) + .then(function (resp) { + if (resp.statusCode !==201) { + var err=OfficeExtension.Utility._parseErrorResponse(resp); + throw OfficeExtension.Utility.createRuntimeError(err.errorCode, err.errorMessage, "Session.resolveRequestUrlAndHeaderInfo"); + } + var session=JSON.parse(resp.body); + var sessionId=session.id; + headers={}; + OfficeExtension.Utility._copyHeaders(_this.m_requestHeaders, headers); + headers[Session.WorkbookSessionIdHeaderName]=sessionId; + _this.m_requestUrlAndHeaderInfo={ url: _this.m_workbookUrl, headers: headers }; + return _this.m_requestUrlAndHeaderInfo; + }); + }; + return Session; + }()); + Session.WorkbookSessionIdHeaderName="Workbook-Session-Id"; + Session.WorkbookSessionIdHeaderNameLower="workbook-session-id"; + Excel.Session=Session; + var RequestContext=(function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + var _this=_super.call(this, url) || this; + _this.m_workbook=new Workbook(_this, OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(_this)); + _this._rootObject=_this.m_workbook; + _this._rootObjectPropertyName="workbook"; + return _this; + } + RequestContext.prototype._processOfficeJsErrorResponse=function (officeJsErrorCode, response) { + var ooeInvalidApiCallInContext=5004; + if (officeJsErrorCode==ooeInvalidApiCallInContext) { + response.ErrorCode=ErrorCodes.invalidOperationInCellEditMode; + response.ErrorMessage=OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidOperationInCellEditMode); + } + }; + Object.defineProperty(RequestContext.prototype, "workbook", { + get: function () { + return this.m_workbook; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "application", { + get: function () { + return this.workbook.application; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeCore.RequestContext)); + Excel.RequestContext=RequestContext; + function run(arg1, arg2, arg3) { + return OfficeExtension.ClientRequestContext._runBatch("Excel.run", arguments, function (requestInfo) { + var ret=new Excel.RequestContext(requestInfo); + return ret; + }); + } + Excel.run=run; + Excel._RedirectV1APIs=false; + Excel._V1APIMap={ + "GetDataAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingGetData(callArgs); }, + postprocess: getDataCommonPostprocess + }, + "GetSelectedDataAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.getSelectedData(callArgs); }, + postprocess: getDataCommonPostprocess + }, + "GoToByIdAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.gotoById(callArgs); } + }, + "AddColumnsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddColumns(callArgs); } + }, + "AddFromSelectionAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddFromSelection(callArgs); }, + postprocess: postprocessBindingDescriptor + }, + "AddFromNamedItemAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddFromNamedItem(callArgs); }, + postprocess: postprocessBindingDescriptor + }, + "AddFromPromptAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddFromPrompt(callArgs); }, + postprocess: postprocessBindingDescriptor + }, + "AddRowsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingAddRows(callArgs); } + }, + "GetByIdAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingGetById(callArgs); }, + postprocess: postprocessBindingDescriptor + }, + "ReleaseByIdAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingReleaseById(callArgs); } + }, + "GetAllAsync": { + call: function (ctx) { return ctx.workbook._V1Api.bindingGetAll(); }, + postprocess: function (response) { + return response.bindings.map(function (descriptor) { return postprocessBindingDescriptor(descriptor); }); + } + }, + "DeleteAllDataValuesAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingDeleteAllDataValues(callArgs); } + }, + "SetSelectedDataAsync": { + preprocess: function (callArgs) { + var preimage=callArgs["cellFormat"]; + if (typeof (window) !=="undefined" && window.OSF.DDA.SafeArray) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"]=window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + else if (typeof (window) !=="undefined" && window.OSF.DDA.WAC) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"]=window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + return callArgs; + }, + call: function (ctx, callArgs) { return ctx.workbook._V1Api.setSelectedData(callArgs); } + }, + "SetDataAsync": { + preprocess: function (callArgs) { + var preimage=callArgs["cellFormat"]; + if (typeof (window) !=="undefined" && window.OSF.DDA.SafeArray) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"]=window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + else if (typeof (window) !=="undefined" && window.OSF.DDA.WAC) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"]=window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + return callArgs; + }, + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingSetData(callArgs); } + }, + "SetFormatsAsync": { + preprocess: function (callArgs) { + var preimage=callArgs["cellFormat"]; + if (typeof (window) !=="undefined" && window.OSF.DDA.SafeArray) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"]=window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + else if (typeof (window) !=="undefined" && window.OSF.DDA.WAC) { + if (window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes, "cellFormat")) { + callArgs["cellFormat"]=window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes["cellFormat"]["toHost"](preimage); + } + } + return callArgs; + }, + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingSetFormats(callArgs); } + }, + "SetTableOptionsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingSetTableOptions(callArgs); } + }, + "ClearFormatsAsync": { + call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingClearFormats(callArgs); } + }, + "GetFilePropertiesAsync": { + call: function (ctx) { return ctx.workbook._V1Api.getFilePropertiesAsync(); } + }, + }; + function postprocessBindingDescriptor(response) { + var bindingDescriptor={ + BindingColumnCount: response.bindingColumnCount, + BindingId: response.bindingId, + BindingRowCount: response.bindingRowCount, + bindingType: response.bindingType, + HasHeaders: response.hasHeaders + }; + return window.OSF.DDA.OMFactory.manufactureBinding(bindingDescriptor, window.Microsoft.Office.WebExtension.context.document); + } + function getDataCommonPostprocess(response, callArgs) { + var isPlainData=response.headers==null; + var data; + if (isPlainData) { + data=response.rows; + } + else { + data=response; + } + data=window.OSF.DDA.DataCoercion.coerceData(data, callArgs[window.Microsoft.Office.WebExtension.Parameters.CoercionType]); + return data==undefined ? null : data; + } + function versionNumberIsEarlierThan(desiredMajor, desiredMinor, desiredBuild) { + var hasOfficeVersion=typeof (window) !=="undefined" && + window.Office && + window.Office.context && + window.Office.context.diagnostics && + window.Office.context.diagnostics.version; + if (!hasOfficeVersion) { + return false; + } + var version=window.Office.context.diagnostics.version; + var versionExtractor=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/; + var result=versionExtractor.exec(version); + if (result) { + var major=parseInt(result[1]); + var minor=parseInt(result[2]); + var build=parseInt(result[3]); + if (major < desiredMajor) { + return true; + } + if (major==desiredMajor && minor < desiredMinor) { + return true; + } + if (major==desiredMajor && minor==desiredMinor && build < desiredBuild) { + return true; + } + } + return false; + } + var _hostName="Excel"; + var _defaultApiSetName="ExcelApi"; + var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; + var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; + var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; + var _createNewObjectObjectPath=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath; + var _createChildItemObjectPathUsingIndexer=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer; + var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; + var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; + var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createEnsureUnchangedAction=OfficeExtension.ActionFactory.createEnsureUnchangedAction; + var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; + var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined=OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; + var _load=OfficeExtension.Utility.load; + var _loadAndSync=OfficeExtension.Utility.loadAndSync; + var _retrieve=OfficeExtension.Utility.retrieve; + var _retrieveAndSync=OfficeExtension.Utility.retrieveAndSync; + var _toJson=OfficeExtension.Utility.toJson; + var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; + var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; + var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var _typeApplication="Application"; + var Application=(function (_super) { + __extends(Application, _super); + function Application() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Application.prototype, "_className", { + get: function () { + return "Application"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Application.prototype, "calculationMode", { + get: function () { + _throwIfNotLoaded("calculationMode", this._C, _typeApplication, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Application.prototype.calculate=function (calculationType) { + _createMethodAction(this.context, this, "Calculate", 0, [calculationType], false); + }; + Application.prototype.suspendApiCalculationUntilNextSync=function () { + _throwIfApiNotSupported("Application.suspendApiCalculationUntilNextSync", _defaultApiSetName, "1.6", _hostName); + _createMethodAction(this.context, this, "SuspendApiCalculationUntilNextSync", 0, [], false); + }; + Application.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["CalculationMode"])) { + this._C=obj["CalculationMode"]; + } + }; + Application.prototype.load=function (option) { + return _load(this, option); + }; + Application.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Application.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Application.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + Application.prototype.toJSON=function () { + return _toJson(this, { + "calculationMode": this._C, + }, {}); + }; + Application.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return Application; + }(OfficeExtension.ClientObject)); + Excel.Application=Application; + var _typeWorkbook="Workbook"; + var Workbook=(function (_super) { + __extends(Workbook, _super); + function Workbook() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Workbook.prototype, "_className", { + get: function () { + return "Workbook"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Workbook.prototype, "application", { + get: function () { + if (!this._A) { + this._A=new Excel.Application(this.context, _createPropertyObjectPath(this.context, this, "Application", false, false, false)); + } + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Workbook.prototype, "bindings", { + get: function () { + if (!this._B) { + this._B=new Excel.BindingCollection(this.context, _createPropertyObjectPath(this.context, this, "Bindings", true, false, false)); + } + return this._B; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Workbook.prototype, "customXmlParts", { + get: function () { + _throwIfApiNotSupported("Workbook.customXmlParts", _defaultApiSetName, "1.5", _hostName); + if (!this._C) { + this._C=new Excel.CustomXmlPartCollection(this.context, _createPropertyObjectPath(this.context, this, "CustomXmlParts", true, false, false)); + } + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Workbook.prototype, "functions", { + get: function () { + _throwIfApiNotSupported("Workbook.functions", _defaultApiSetName, "1.2", _hostName); + if (!this._F) { + this._F=new Excel.Functions(this.context, _createPropertyObjectPath(this.context, this, "Functions", false, false, false)); + } + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Workbook.prototype, "internalTest", { + get: function () { + _throwIfApiNotSupported("Workbook.internalTest", _defaultApiSetName, "1.6", _hostName); + if (!this._I) { + this._I=new Excel.InternalTest(this.context, _createPropertyObjectPath(this.context, this, "InternalTest", false, false, false)); + } + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Workbook.prototype, "names", { + get: function () { + if (!this._N) { + this._N=new Excel.NamedItemCollection(this.context, _createPropertyObjectPath(this.context, this, "Names", true, false, false)); + } + return this._N; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Workbook.prototype, "pivotTables", { + get: function () { + _throwIfApiNotSupported("Workbook.pivotTables", _defaultApiSetName, "1.3", _hostName); + if (!this._P) { + this._P=new Excel.PivotTableCollection(this.context, _createPropertyObjectPath(this.context, this, "PivotTables", true, false, false)); + } + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Workbook.prototype, "settings", { + get: function () { + _throwIfApiNotSupported("Workbook.settings", _defaultApiSetName, "1.4", _hostName); + if (!this._S) { + this._S=new Excel.SettingCollection(this.context, _createPropertyObjectPath(this.context, this, "Settings", true, false, false)); + } + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Workbook.prototype, "tables", { + get: function () { + if (!this._T) { + this._T=new Excel.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false, false)); + } + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Workbook.prototype, "worksheets", { + get: function () { + if (!this._W) { + this._W=new Excel.WorksheetCollection(this.context, _createPropertyObjectPath(this.context, this, "Worksheets", true, false, false)); + } + return this._W; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Workbook.prototype, "_V1Api", { + get: function () { + _throwIfApiNotSupported("Workbook._V1Api", _defaultApiSetName, "1.3", _hostName); + if (!this.__V) { + this.__V=new Excel._V1Api(this.context, _createPropertyObjectPath(this.context, this, "_V1Api", false, false, false)); + } + return this.__V; + }, + enumerable: true, + configurable: true + }); + Workbook.prototype.getSelectedRange=function () { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetSelectedRange", 1, [], false, true, null, false)); + }; + Workbook.prototype._GetObjectByReferenceId=function (bstrReferenceId) { + var action=_createMethodAction(this.context, this, "_GetObjectByReferenceId", 1, [bstrReferenceId], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Workbook.prototype._GetObjectTypeNameByReferenceId=function (bstrReferenceId) { + var action=_createMethodAction(this.context, this, "_GetObjectTypeNameByReferenceId", 1, [bstrReferenceId], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Workbook.prototype._GetReferenceCount=function () { + var action=_createMethodAction(this.context, this, "_GetReferenceCount", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Workbook.prototype._RemoveAllReferences=function () { + _createMethodAction(this.context, this, "_RemoveAllReferences", 1, [], false); + }; + Workbook.prototype._RemoveReference=function (bstrReferenceId) { + _createMethodAction(this.context, this, "_RemoveReference", 1, [bstrReferenceId], false); + }; + Workbook.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + _handleNavigationPropertyResults(this, obj, ["application", "Application", "bindings", "Bindings", "customXmlParts", "CustomXmlParts", "functions", "Functions", "internalTest", "InternalTest", "names", "Names", "pivotTables", "PivotTables", "settings", "Settings", "tables", "Tables", "worksheets", "Worksheets", "_V1Api", "_V1Api"]); + }; + Workbook.prototype.load=function (option) { + return _load(this, option); + }; + Workbook.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Workbook.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Workbook.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + Object.defineProperty(Workbook.prototype, "onSelectionChanged", { + get: function () { + var _this=this; + _throwIfApiNotSupported("Workbook.onSelectionChanged", _defaultApiSetName, "1.3", _hostName); + if (!this.m_selectionChanged) { + this.m_selectionChanged=new OfficeExtension.EventHandlers(this.context, this, "SelectionChanged", { + registerFunc: function (handlerCallback) { + return _this.context.eventRegistration.register(2, "", handlerCallback); + }, + unregisterFunc: function (handlerCallback) { + return _this.context.eventRegistration.unregister(2, "", handlerCallback); + }, + eventArgsTransformFunc: function (args) { + return OfficeExtension.Utility._createPromiseFromResult({ workbook: _this }); + } + }); + } + return this.m_selectionChanged; + }, + enumerable: true, + configurable: true + }); + Workbook.prototype.toJSON=function () { + return _toJson(this, {}, { + "bindings": this._B, + "customXmlParts": this._C, + "names": this._N, + "pivotTables": this._P, + "settings": this._S, + "tables": this._T, + "worksheets": this._W, + }); + }; + Workbook.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return Workbook; + }(OfficeExtension.ClientObject)); + Excel.Workbook=Workbook; + var _typeWorksheet="Worksheet"; + var Worksheet=(function (_super) { + __extends(Worksheet, _super); + function Worksheet() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Worksheet.prototype, "_className", { + get: function () { + return "Worksheet"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Worksheet.prototype, "charts", { + get: function () { + if (!this._C) { + this._C=new Excel.ChartCollection(this.context, _createPropertyObjectPath(this.context, this, "Charts", true, false, false)); + } + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Worksheet.prototype, "names", { + get: function () { + _throwIfApiNotSupported("Worksheet.names", _defaultApiSetName, "1.4", _hostName); + if (!this._Na) { + this._Na=new Excel.NamedItemCollection(this.context, _createPropertyObjectPath(this.context, this, "Names", true, false, false)); + } + return this._Na; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Worksheet.prototype, "pivotTables", { + get: function () { + _throwIfApiNotSupported("Worksheet.pivotTables", _defaultApiSetName, "1.3", _hostName); + if (!this._P) { + this._P=new Excel.PivotTableCollection(this.context, _createPropertyObjectPath(this.context, this, "PivotTables", true, false, false)); + } + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Worksheet.prototype, "protection", { + get: function () { + _throwIfApiNotSupported("Worksheet.protection", _defaultApiSetName, "1.2", _hostName); + if (!this._Pr) { + this._Pr=new Excel.WorksheetProtection(this.context, _createPropertyObjectPath(this.context, this, "Protection", false, false, false)); + } + return this._Pr; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Worksheet.prototype, "tables", { + get: function () { + if (!this.m_tables) { + this.m_tables=new Excel.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false, false)); + } + this.m_tables._ParentObject=this; + return this.m_tables; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Worksheet.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeWorksheet, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Worksheet.prototype, "name", { + get: function () { + _throwIfNotLoaded("name", this._N, _typeWorksheet, this._isNull); + return this._N; + }, + set: function (value) { + this._N=value; + _createSetPropertyAction(this.context, this, "Name", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Worksheet.prototype, "position", { + get: function () { + _throwIfNotLoaded("position", this._Po, _typeWorksheet, this._isNull); + return this._Po; + }, + set: function (value) { + this._Po=value; + _createSetPropertyAction(this.context, this, "Position", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Worksheet.prototype, "visibility", { + get: function () { + _throwIfNotLoaded("visibility", this._V, _typeWorksheet, this._isNull); + return this._V; + }, + set: function (value) { + this._V=value; + _createSetPropertyAction(this.context, this, "Visibility", value); + }, + enumerable: true, + configurable: true + }); + Worksheet.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["name", "position", "visibility"], [], [ + "charts", + "names", + "pivotTables", + "protection", + "tables" + ]); + }; + Worksheet.prototype.activate=function () { + _createMethodAction(this.context, this, "Activate", 1, [], false); + }; + Worksheet.prototype.calculate=function (markAllDirty) { + _throwIfApiNotSupported("Worksheet.calculate", _defaultApiSetName, "1.6", _hostName); + _createMethodAction(this.context, this, "Calculate", 0, [markAllDirty], false); + }; + Worksheet.prototype.delete=function () { + _createMethodAction(this.context, this, "Delete", 0, [], false); + }; + Worksheet.prototype.getCell=function (row, column) { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [row, column], false, true, null, false)); + }; + Worksheet.prototype.getNext=function (visibleOnly) { + _throwIfApiNotSupported("Worksheet.getNext", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [visibleOnly], false, true, "_GetSheetById", false)); + }; + Worksheet.prototype.getNextOrNullObject=function (visibleOnly) { + _throwIfApiNotSupported("Worksheet.getNextOrNullObject", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [visibleOnly], false, true, "_GetSheetById", false)); + }; + Worksheet.prototype.getPrevious=function (visibleOnly) { + _throwIfApiNotSupported("Worksheet.getPrevious", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetPrevious", 1, [visibleOnly], false, true, "_GetSheetById", false)); + }; + Worksheet.prototype.getPreviousOrNullObject=function (visibleOnly) { + _throwIfApiNotSupported("Worksheet.getPreviousOrNullObject", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetPreviousOrNullObject", 1, [visibleOnly], false, true, "_GetSheetById", false)); + }; + Worksheet.prototype.getRange=function (address) { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [address], false, true, null, false)); + }; + Worksheet.prototype.getUsedRange=function (valuesOnly) { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRange", 1, [valuesOnly], false, true, null, false)); + }; + Worksheet.prototype.getUsedRangeOrNullObject=function (valuesOnly) { + _throwIfApiNotSupported("Worksheet.getUsedRangeOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRangeOrNullObject", 1, [valuesOnly], false, true, null, false)); + }; + Worksheet.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I=obj["Id"]; + } + if (!_isUndefined(obj["Name"])) { + this._N=obj["Name"]; + } + if (!_isUndefined(obj["Position"])) { + this._Po=obj["Position"]; + } + if (!_isUndefined(obj["Visibility"])) { + this._V=obj["Visibility"]; + } + _handleNavigationPropertyResults(this, obj, ["charts", "Charts", "names", "Names", "pivotTables", "PivotTables", "protection", "Protection", "tables", "Tables"]); + }; + Worksheet.prototype.load=function (option) { + return _load(this, option); + }; + Worksheet.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Worksheet.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Worksheet.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + Worksheet.prototype._handleIdResult=function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I=value["Id"]; + } + }; + Worksheet.prototype.toJSON=function () { + return _toJson(this, { + "id": this._I, + "name": this._N, + "position": this._Po, + "visibility": this._V, + }, { + "charts": this._C, + "names": this._Na, + "pivotTables": this._P, + "protection": this._Pr, + "tables": this.m_tables, + }); + }; + Worksheet.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return Worksheet; + }(OfficeExtension.ClientObject)); + Excel.Worksheet=Worksheet; + var _typeWorksheetCollection="WorksheetCollection"; + var WorksheetCollection=(function (_super) { + __extends(WorksheetCollection, _super); + function WorksheetCollection() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(WorksheetCollection.prototype, "_className", { + get: function () { + return "WorksheetCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(WorksheetCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeWorksheetCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + WorksheetCollection.prototype.add=function (name) { + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [name], false, true, null, false)); + }; + WorksheetCollection.prototype.getActiveWorksheet=function () { + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetActiveWorksheet", 1, [], false, false, null, false)); + }; + WorksheetCollection.prototype.getCount=function (visibleOnly) { + _throwIfApiNotSupported("WorksheetCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [visibleOnly], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + WorksheetCollection.prototype.getFirst=function (visibleOnly) { + _throwIfApiNotSupported("WorksheetCollection.getFirst", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [visibleOnly], false, true, null, false)); + }; + WorksheetCollection.prototype.getItem=function (key) { + return new Excel.Worksheet(this.context, _createIndexerObjectPath(this.context, this, [key])); + }; + WorksheetCollection.prototype.getItemOrNullObject=function (key) { + _throwIfApiNotSupported("WorksheetCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null, false)); + }; + WorksheetCollection.prototype.getLast=function (visibleOnly) { + _throwIfApiNotSupported("WorksheetCollection.getLast", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetLast", 1, [visibleOnly], false, true, null, false)); + }; + WorksheetCollection.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items=[]; + var _data=obj[OfficeExtension.Constants.items]; + for (var i=0; i < _data.length; i++) { + var _item=new Excel.Worksheet(this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, this.context, this, _data[i], i)); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + WorksheetCollection.prototype.load=function (option) { + return _load(this, option); + }; + WorksheetCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + WorksheetCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + WorksheetCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + WorksheetCollection.prototype.toJSON=function () { + return _toJson(this, {}, {}, this.m__items); + }; + return WorksheetCollection; + }(OfficeExtension.ClientObject)); + Excel.WorksheetCollection=WorksheetCollection; + var _typeWorksheetProtection="WorksheetProtection"; + var WorksheetProtection=(function (_super) { + __extends(WorksheetProtection, _super); + function WorksheetProtection() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(WorksheetProtection.prototype, "_className", { + get: function () { + return "WorksheetProtection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(WorksheetProtection.prototype, "options", { + get: function () { + _throwIfNotLoaded("options", this._O, _typeWorksheetProtection, this._isNull); + return this._O; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(WorksheetProtection.prototype, "protected", { + get: function () { + _throwIfNotLoaded("protected", this._P, _typeWorksheetProtection, this._isNull); + return this._P; + }, + enumerable: true, + configurable: true + }); + WorksheetProtection.prototype.protect=function (options, password) { + if (versionNumberIsEarlierThan(16, 0, 8716)) { + _createMethodAction(this.context, this, "Protect", 0, [options], false); + return; + } + _createMethodAction(this.context, this, "Protect", 0, [options, password], false); + }; + WorksheetProtection.prototype.unprotect=function (password) { + _createMethodAction(this.context, this, "Unprotect", 0, [password], false); + }; + WorksheetProtection.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Options"])) { + this._O=obj["Options"]; + } + if (!_isUndefined(obj["Protected"])) { + this._P=obj["Protected"]; + } + }; + WorksheetProtection.prototype.load=function (option) { + return _load(this, option); + }; + WorksheetProtection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + WorksheetProtection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + WorksheetProtection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + WorksheetProtection.prototype.toJSON=function () { + return _toJson(this, { + "options": this._O, + "protected": this._P, + }, {}); + }; + WorksheetProtection.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return WorksheetProtection; + }(OfficeExtension.ClientObject)); + Excel.WorksheetProtection=WorksheetProtection; + var _typeRange="Range"; + var Range=(function (_super) { + __extends(Range, _super); + function Range() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Range.prototype, "_className", { + get: function () { + return "Range"; + }, + enumerable: true, + configurable: true + }); + Range.prototype._ensureInteger=function (num, methodName) { + if (!(typeof num==="number" && isFinite(num) && Math.floor(num)===num)) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, num, methodName); + } + }; + Range.prototype._getAdjacentRange=function (functionName, count, referenceRange, rowDirection, columnDirection) { + if (count==null) { + count=1; + } + this._ensureInteger(count, functionName); + var startRange; + var rowOffset=0; + var columnOffset=0; + if (count > 0) { + startRange=referenceRange.getOffsetRange(rowDirection, columnDirection); + } + else { + startRange=referenceRange; + rowOffset=rowDirection; + columnOffset=columnDirection; + } + if (Math.abs(count)==1) { + return startRange; + } + return startRange.getBoundingRect(referenceRange.getOffsetRange(rowDirection * count+rowOffset, columnDirection * count+columnOffset)); + }; + Object.defineProperty(Range.prototype, "conditionalFormats", { + get: function () { + _throwIfApiNotSupported("Range.conditionalFormats", _defaultApiSetName, "1.6", _hostName); + if (!this._Con) { + this._Con=new Excel.ConditionalFormatCollection(this.context, _createPropertyObjectPath(this.context, this, "ConditionalFormats", true, false, false)); + } + return this._Con; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "format", { + get: function () { + if (!this._F) { + this._F=new Excel.RangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); + } + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "sort", { + get: function () { + _throwIfApiNotSupported("Range.sort", _defaultApiSetName, "1.2", _hostName); + if (!this._S) { + this._S=new Excel.RangeSort(this.context, _createPropertyObjectPath(this.context, this, "Sort", false, false, false)); + } + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "worksheet", { + get: function () { + if (!this._W) { + this._W=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false, false)); + } + return this._W; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "address", { + get: function () { + _throwIfNotLoaded("address", this._A, _typeRange, this._isNull); + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "addressLocal", { + get: function () { + _throwIfNotLoaded("addressLocal", this._Ad, _typeRange, this._isNull); + return this._Ad; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "cellCount", { + get: function () { + _throwIfNotLoaded("cellCount", this._C, _typeRange, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "columnCount", { + get: function () { + _throwIfNotLoaded("columnCount", this._Co, _typeRange, this._isNull); + return this._Co; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "columnHidden", { + get: function () { + _throwIfNotLoaded("columnHidden", this._Col, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.columnHidden", _defaultApiSetName, "1.2", _hostName); + return this._Col; + }, + set: function (value) { + this._Col=value; + _createSetPropertyAction(this.context, this, "ColumnHidden", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "columnIndex", { + get: function () { + _throwIfNotLoaded("columnIndex", this._Colu, _typeRange, this._isNull); + return this._Colu; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "formulas", { + get: function () { + _throwIfNotLoaded("formulas", this.m_formulas, _typeRange, this._isNull); + return this.m_formulas; + }, + set: function (value) { + this.m_formulas=value; + if (setRangePropertiesInBulk(this, "Formulas", value)) { + return; + } + this.m_formulas=value; + _createSetPropertyAction(this.context, this, "Formulas", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "formulasLocal", { + get: function () { + _throwIfNotLoaded("formulasLocal", this.m_formulasLocal, _typeRange, this._isNull); + return this.m_formulasLocal; + }, + set: function (value) { + this.m_formulasLocal=value; + if (setRangePropertiesInBulk(this, "FormulasLocal", value)) { + return; + } + this.m_formulasLocal=value; + _createSetPropertyAction(this.context, this, "FormulasLocal", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "formulasR1C1", { + get: function () { + _throwIfNotLoaded("formulasR1C1", this.m_formulasR1C1, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.formulasR1C1", _defaultApiSetName, "1.2", _hostName); + return this.m_formulasR1C1; + }, + set: function (value) { + this.m_formulasR1C1=value; + if (setRangePropertiesInBulk(this, "FormulasR1C1", value)) { + return; + } + this.m_formulasR1C1=value; + _createSetPropertyAction(this.context, this, "FormulasR1C1", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "hidden", { + get: function () { + _throwIfNotLoaded("hidden", this._H, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.hidden", _defaultApiSetName, "1.2", _hostName); + return this._H; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "numberFormat", { + get: function () { + _throwIfNotLoaded("numberFormat", this.m_numberFormat, _typeRange, this._isNull); + return this.m_numberFormat; + }, + set: function (value) { + this.m_numberFormat=value; + if (setRangePropertiesInBulk(this, "NumberFormat", value)) { + return; + } + this.m_numberFormat=value; + _createSetPropertyAction(this.context, this, "NumberFormat", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "rowCount", { + get: function () { + _throwIfNotLoaded("rowCount", this._R, _typeRange, this._isNull); + return this._R; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "rowHidden", { + get: function () { + _throwIfNotLoaded("rowHidden", this._Ro, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.rowHidden", _defaultApiSetName, "1.2", _hostName); + return this._Ro; + }, + set: function (value) { + this._Ro=value; + _createSetPropertyAction(this.context, this, "RowHidden", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "rowIndex", { + get: function () { + _throwIfNotLoaded("rowIndex", this._Row, _typeRange, this._isNull); + return this._Row; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "text", { + get: function () { + _throwIfNotLoaded("text", this._T, _typeRange, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "valueTypes", { + get: function () { + _throwIfNotLoaded("valueTypes", this._V, _typeRange, this._isNull); + return this._V; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "values", { + get: function () { + _throwIfNotLoaded("values", this.m_values, _typeRange, this._isNull); + return this.m_values; + }, + set: function (value) { + this.m_values=value; + if (setRangePropertiesInBulk(this, "Values", value)) { + return; + } + this.m_values=value; + _createSetPropertyAction(this.context, this, "Values", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "_ReferenceId", { + get: function () { + _throwIfNotLoaded("_ReferenceId", this.__R, _typeRange, this._isNull); + return this.__R; + }, + enumerable: true, + configurable: true + }); + Range.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["numberFormat", "values", "formulas", "formulasLocal", "formulasR1C1", "rowHidden", "columnHidden"], ["format"], [ + "conditionalFormats", + "sort", + "worksheet" + ]); + }; + Range.prototype.calculate=function () { + _throwIfApiNotSupported("Range.calculate", _defaultApiSetName, "1.6", _hostName); + _createMethodAction(this.context, this, "Calculate", 0, [], false); + }; + Range.prototype.clear=function (applyTo) { + _createMethodAction(this.context, this, "Clear", 0, [applyTo], false); + }; + Range.prototype.delete=function (shift) { + _createMethodAction(this.context, this, "Delete", 0, [shift], false); + }; + Range.prototype.getBoundingRect=function (anotherRange) { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetBoundingRect", 1, [anotherRange], false, true, null, false)); + }; + Range.prototype.getCell=function (row, column) { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [row, column], false, true, null, false)); + }; + Range.prototype.getColumn=function (column) { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumn", 1, [column], false, true, null, false)); + }; + Range.prototype.getColumnsAfter=function (count) { + if (!isExcel1_3OrAbove()) { + if (count==null) { + count=1; + } + this._ensureInteger(count, "RowsAbove"); + if (count==0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + return this._getAdjacentRange("getColumnsAfter", count, this.getLastColumn(), 0, 1); + } + _throwIfApiNotSupported("Range.getColumnsAfter", _defaultApiSetName, "1.3", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumnsAfter", 1, [count], false, true, null, false)); + }; + Range.prototype.getColumnsBefore=function (count) { + if (!isExcel1_3OrAbove()) { + if (count==null) { + count=1; + } + this._ensureInteger(count, "RowsAbove"); + if (count==0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + return this._getAdjacentRange("getColumnsBefore", count, this.getColumn(0), 0, -1); + } + _throwIfApiNotSupported("Range.getColumnsBefore", _defaultApiSetName, "1.3", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumnsBefore", 1, [count], false, true, null, false)); + }; + Range.prototype.getEntireColumn=function () { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetEntireColumn", 1, [], false, true, null, false)); + }; + Range.prototype.getEntireRow=function () { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetEntireRow", 1, [], false, true, null, false)); + }; + Range.prototype.getIntersection=function (anotherRange) { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetIntersection", 1, [anotherRange], false, true, null, false)); + }; + Range.prototype.getIntersectionOrNullObject=function (anotherRange) { + _throwIfApiNotSupported("Range.getIntersectionOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetIntersectionOrNullObject", 1, [anotherRange], false, true, null, false)); + }; + Range.prototype.getLastCell=function () { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastCell", 1, [], false, true, null, false)); + }; + Range.prototype.getLastColumn=function () { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastColumn", 1, [], false, true, null, false)); + }; + Range.prototype.getLastRow=function () { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastRow", 1, [], false, true, null, false)); + }; + Range.prototype.getOffsetRange=function (rowOffset, columnOffset) { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetOffsetRange", 1, [rowOffset, columnOffset], false, true, null, false)); + }; + Range.prototype.getResizedRange=function (deltaRows, deltaColumns) { + if (!isExcel1_3OrAbove()) { + this._ensureInteger(deltaRows, "getResizedRange"); + this._ensureInteger(deltaColumns, "getResizedRange"); + var referenceRange=(deltaRows >=0 && deltaColumns >=0) ? this : this.getCell(0, 0); + return referenceRange.getBoundingRect(this.getLastCell().getOffsetRange(deltaRows, deltaColumns)); + } + _throwIfApiNotSupported("Range.getResizedRange", _defaultApiSetName, "1.3", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetResizedRange", 1, [deltaRows, deltaColumns], false, true, null, false)); + }; + Range.prototype.getRow=function (row) { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRow", 1, [row], false, true, null, false)); + }; + Range.prototype.getRowsAbove=function (count) { + if (!isExcel1_3OrAbove()) { + if (count==null) { + count=1; + } + this._ensureInteger(count, "RowsAbove"); + if (count==0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + return this._getAdjacentRange("getRowsAbove", count, this.getRow(0), -1, 0); + } + _throwIfApiNotSupported("Range.getRowsAbove", _defaultApiSetName, "1.3", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRowsAbove", 1, [count], false, true, null, false)); + }; + Range.prototype.getRowsBelow=function (count) { + if (!isExcel1_3OrAbove()) { + if (count==null) { + count=1; + } + this._ensureInteger(count, "RowsAbove"); + if (count==0) { + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + } + return this._getAdjacentRange("getRowsBelow", count, this.getLastRow(), 1, 0); + } + _throwIfApiNotSupported("Range.getRowsBelow", _defaultApiSetName, "1.3", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRowsBelow", 1, [count], false, true, null, false)); + }; + Range.prototype.getUsedRange=function (valuesOnly) { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRange", 1, [valuesOnly], false, true, null, false)); + }; + Range.prototype.getUsedRangeOrNullObject=function (valuesOnly) { + _throwIfApiNotSupported("Range.getUsedRangeOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRangeOrNullObject", 1, [valuesOnly], false, true, null, false)); + }; + Range.prototype.getVisibleView=function () { + _throwIfApiNotSupported("Range.getVisibleView", _defaultApiSetName, "1.3", _hostName); + return new Excel.RangeView(this.context, _createMethodObjectPath(this.context, this, "GetVisibleView", 1, [], false, false, null, false)); + }; + Range.prototype.insert=function (shift) { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "Insert", 0, [shift], false, true, null, false)); + }; + Range.prototype.merge=function (across) { + _throwIfApiNotSupported("Range.merge", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "Merge", 0, [across], false); + }; + Range.prototype.select=function () { + _createMethodAction(this.context, this, "Select", 1, [], false); + }; + Range.prototype.unmerge=function () { + _throwIfApiNotSupported("Range.unmerge", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "Unmerge", 0, [], false); + }; + Range.prototype._KeepReference=function () { + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); + }; + Range.prototype._ValidateArraySize=function (rows, columns) { + _throwIfApiNotSupported("Range._ValidateArraySize", _defaultApiSetName, "1.3", _hostName); + _createMethodAction(this.context, this, "_ValidateArraySize", 1, [rows, columns], false); + }; + Range.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Address"])) { + this._A=obj["Address"]; + } + if (!_isUndefined(obj["AddressLocal"])) { + this._Ad=obj["AddressLocal"]; + } + if (!_isUndefined(obj["CellCount"])) { + this._C=obj["CellCount"]; + } + if (!_isUndefined(obj["ColumnCount"])) { + this._Co=obj["ColumnCount"]; + } + if (!_isUndefined(obj["ColumnHidden"])) { + this._Col=obj["ColumnHidden"]; + } + if (!_isUndefined(obj["ColumnIndex"])) { + this._Colu=obj["ColumnIndex"]; + } + if (!_isUndefined(obj["Formulas"])) { + this.m_formulas=obj["Formulas"]; + } + if (!_isUndefined(obj["FormulasLocal"])) { + this.m_formulasLocal=obj["FormulasLocal"]; + } + if (!_isUndefined(obj["FormulasR1C1"])) { + this.m_formulasR1C1=obj["FormulasR1C1"]; + } + if (!_isUndefined(obj["Hidden"])) { + this._H=obj["Hidden"]; + } + if (!_isUndefined(obj["NumberFormat"])) { + this.m_numberFormat=obj["NumberFormat"]; + } + if (!_isUndefined(obj["RowCount"])) { + this._R=obj["RowCount"]; + } + if (!_isUndefined(obj["RowHidden"])) { + this._Ro=obj["RowHidden"]; + } + if (!_isUndefined(obj["RowIndex"])) { + this._Row=obj["RowIndex"]; + } + if (!_isUndefined(obj["Text"])) { + this._T=obj["Text"]; + } + if (!_isUndefined(obj["ValueTypes"])) { + this._V=obj["ValueTypes"]; + } + if (!_isUndefined(obj["Values"])) { + this.m_values=obj["Values"]; + } + if (!_isUndefined(obj["_ReferenceId"])) { + this.__R=obj["_ReferenceId"]; + } + _handleNavigationPropertyResults(this, obj, ["conditionalFormats", "ConditionalFormats", "format", "Format", "sort", "Sort", "worksheet", "Worksheet"]); + }; + Range.prototype.load=function (option) { + return _load(this, option); + }; + Range.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Range.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Range.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + Range.prototype._handleIdResult=function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["_ReferenceId"])) { + this.__R=value["_ReferenceId"]; + } + }; + Range.prototype.track=function () { + this.context.trackedObjects.add(this); + return this; + }; + Range.prototype.untrack=function () { + this.context.trackedObjects.remove(this); + return this; + }; + Range.prototype.toJSON=function () { + return _toJson(this, { + "address": this._A, + "addressLocal": this._Ad, + "cellCount": this._C, + "columnCount": this._Co, + "columnHidden": this._Col, + "columnIndex": this._Colu, + "formulas": this.m_formulas, + "formulasLocal": this.m_formulasLocal, + "formulasR1C1": this.m_formulasR1C1, + "hidden": this._H, + "numberFormat": this.m_numberFormat, + "rowCount": this._R, + "rowHidden": this._Ro, + "rowIndex": this._Row, + "text": this._T, + "values": this.m_values, + "valueTypes": this._V, + }, { + "conditionalFormats": this._Con, + "format": this._F, + }); + }; + Range.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return Range; + }(OfficeExtension.ClientObject)); + Excel.Range=Range; + var _typeRangeView="RangeView"; + var RangeView=(function (_super) { + __extends(RangeView, _super); + function RangeView() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RangeView.prototype, "_className", { + get: function () { + return "RangeView"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeView.prototype, "rows", { + get: function () { + if (!this._Ro) { + this._Ro=new Excel.RangeViewCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false, false)); + } + return this._Ro; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeView.prototype, "cellAddresses", { + get: function () { + _throwIfNotLoaded("cellAddresses", this._C, _typeRangeView, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeView.prototype, "columnCount", { + get: function () { + _throwIfNotLoaded("columnCount", this._Co, _typeRangeView, this._isNull); + return this._Co; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeView.prototype, "formulas", { + get: function () { + _throwIfNotLoaded("formulas", this._F, _typeRangeView, this._isNull); + return this._F; + }, + set: function (value) { + this._F=value; + _createSetPropertyAction(this.context, this, "Formulas", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeView.prototype, "formulasLocal", { + get: function () { + _throwIfNotLoaded("formulasLocal", this._Fo, _typeRangeView, this._isNull); + return this._Fo; + }, + set: function (value) { + this._Fo=value; + _createSetPropertyAction(this.context, this, "FormulasLocal", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeView.prototype, "formulasR1C1", { + get: function () { + _throwIfNotLoaded("formulasR1C1", this._For, _typeRangeView, this._isNull); + return this._For; + }, + set: function (value) { + this._For=value; + _createSetPropertyAction(this.context, this, "FormulasR1C1", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeView.prototype, "index", { + get: function () { + _throwIfNotLoaded("index", this._I, _typeRangeView, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeView.prototype, "numberFormat", { + get: function () { + _throwIfNotLoaded("numberFormat", this._N, _typeRangeView, this._isNull); + return this._N; + }, + set: function (value) { + this._N=value; + _createSetPropertyAction(this.context, this, "NumberFormat", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeView.prototype, "rowCount", { + get: function () { + _throwIfNotLoaded("rowCount", this._R, _typeRangeView, this._isNull); + return this._R; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeView.prototype, "text", { + get: function () { + _throwIfNotLoaded("text", this._T, _typeRangeView, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeView.prototype, "valueTypes", { + get: function () { + _throwIfNotLoaded("valueTypes", this._Va, _typeRangeView, this._isNull); + return this._Va; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeView.prototype, "values", { + get: function () { + _throwIfNotLoaded("values", this._V, _typeRangeView, this._isNull); + return this._V; + }, + set: function (value) { + this._V=value; + _createSetPropertyAction(this.context, this, "Values", value); + }, + enumerable: true, + configurable: true + }); + RangeView.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["numberFormat", "values", "formulas", "formulasLocal", "formulasR1C1"], [], [ + "rows" + ]); + }; + RangeView.prototype.getRange=function () { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); + }; + RangeView.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["CellAddresses"])) { + this._C=obj["CellAddresses"]; + } + if (!_isUndefined(obj["ColumnCount"])) { + this._Co=obj["ColumnCount"]; + } + if (!_isUndefined(obj["Formulas"])) { + this._F=obj["Formulas"]; + } + if (!_isUndefined(obj["FormulasLocal"])) { + this._Fo=obj["FormulasLocal"]; + } + if (!_isUndefined(obj["FormulasR1C1"])) { + this._For=obj["FormulasR1C1"]; + } + if (!_isUndefined(obj["Index"])) { + this._I=obj["Index"]; + } + if (!_isUndefined(obj["NumberFormat"])) { + this._N=obj["NumberFormat"]; + } + if (!_isUndefined(obj["RowCount"])) { + this._R=obj["RowCount"]; + } + if (!_isUndefined(obj["Text"])) { + this._T=obj["Text"]; + } + if (!_isUndefined(obj["ValueTypes"])) { + this._Va=obj["ValueTypes"]; + } + if (!_isUndefined(obj["Values"])) { + this._V=obj["Values"]; + } + _handleNavigationPropertyResults(this, obj, ["rows", "Rows"]); + }; + RangeView.prototype.load=function (option) { + return _load(this, option); + }; + RangeView.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + RangeView.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeView.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + RangeView.prototype.toJSON=function () { + return _toJson(this, { + "cellAddresses": this._C, + "columnCount": this._Co, + "formulas": this._F, + "formulasLocal": this._Fo, + "formulasR1C1": this._For, + "index": this._I, + "numberFormat": this._N, + "rowCount": this._R, + "text": this._T, + "values": this._V, + "valueTypes": this._Va, + }, { + "rows": this._Ro, + }); + }; + RangeView.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return RangeView; + }(OfficeExtension.ClientObject)); + Excel.RangeView=RangeView; + var _typeRangeViewCollection="RangeViewCollection"; + var RangeViewCollection=(function (_super) { + __extends(RangeViewCollection, _super); + function RangeViewCollection() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RangeViewCollection.prototype, "_className", { + get: function () { + return "RangeViewCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeViewCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeRangeViewCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + RangeViewCollection.prototype.getCount=function () { + _throwIfApiNotSupported("RangeViewCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + RangeViewCollection.prototype.getItemAt=function (index) { + return new Excel.RangeView(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); + }; + RangeViewCollection.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items=[]; + var _data=obj[OfficeExtension.Constants.items]; + for (var i=0; i < _data.length; i++) { + var _item=new Excel.RangeView(this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(false, this.context, this, _data[i], i)); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + RangeViewCollection.prototype.load=function (option) { + return _load(this, option); + }; + RangeViewCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + RangeViewCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeViewCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + RangeViewCollection.prototype.toJSON=function () { + return _toJson(this, {}, {}, this.m__items); + }; + return RangeViewCollection; + }(OfficeExtension.ClientObject)); + Excel.RangeViewCollection=RangeViewCollection; + var _typeSettingCollection="SettingCollection"; + var SettingCollection=(function (_super) { + __extends(SettingCollection, _super); + function SettingCollection() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(SettingCollection.prototype, "_className", { + get: function () { + return "SettingCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(SettingCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeSettingCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + SettingCollection.prototype.add=function (key, value) { + value=Setting._replaceDateWithStringDate(value); + return new Excel.Setting(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [key, value], false, true, null, false)); + }; + SettingCollection.prototype.getCount=function () { + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + SettingCollection.prototype.getItem=function (key) { + return new Excel.Setting(this.context, _createIndexerObjectPath(this.context, this, [key])); + }; + SettingCollection.prototype.getItemOrNullObject=function (key) { + return new Excel.Setting(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null, false)); + }; + SettingCollection.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items=[]; + var _data=obj[OfficeExtension.Constants.items]; + for (var i=0; i < _data.length; i++) { + var _item=new Excel.Setting(this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, this.context, this, _data[i], i)); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + SettingCollection.prototype.load=function (option) { + return _load(this, option); + }; + SettingCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + SettingCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + SettingCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + Object.defineProperty(SettingCollection.prototype, "onSettingsChanged", { + get: function () { + var _this=this; + if (!this.m_settingsChanged) { + this.m_settingsChanged=new OfficeExtension.EventHandlers(this.context, this, "SettingsChanged", { + registerFunc: function (handlerCallback) { + return _this.context.eventRegistration.register(1, "", handlerCallback); + }, + unregisterFunc: function (handlerCallback) { + return _this.context.eventRegistration.unregister(1, "", handlerCallback); + }, + eventArgsTransformFunc: function (args) { + return OfficeExtension.Utility._createPromiseFromResult({ settings: _this }); + } + }); + } + return this.m_settingsChanged; + }, + enumerable: true, + configurable: true + }); + SettingCollection.prototype.toJSON=function () { + return _toJson(this, {}, {}, this.m__items); + }; + return SettingCollection; + }(OfficeExtension.ClientObject)); + Excel.SettingCollection=SettingCollection; + var _typeSetting="Setting"; + var Setting=(function (_super) { + __extends(Setting, _super); + function Setting() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Setting.prototype, "_className", { + get: function () { + return "Setting"; + }, + enumerable: true, + configurable: true + }); + Setting.replaceStringDateWithDate=function (value) { + var strValue=JSON.stringify(value); + value=JSON.parse(strValue, function dateReviver(k, v) { + var d; + if (typeof v==='string' && v && v.length > 6 && v.slice(0, 5)===Setting.DateJSONPrefix && v.slice(-1)===Setting.DateJSONSuffix) { + d=new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + return value; + }; + Setting._replaceDateWithStringDate=function (value) { + var strValue=JSON.stringify(value, function dateReplacer(k, v) { + return (this[k] instanceof Date) ? (Setting.DateJSONPrefix+this[k].getTime()+Setting.DateJSONSuffix) : v; + }); + value=JSON.parse(strValue); + return value; + }; + Object.defineProperty(Setting.prototype, "key", { + get: function () { + _throwIfNotLoaded("key", this._K, _typeSetting, this._isNull); + return this._K; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Setting.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this.m_value, _typeSetting, this._isNull); + return this.m_value; + }, + set: function (value) { + if (!_isNullOrUndefined(value)) { + this.m_value=value; + var newValue=Setting._replaceDateWithStringDate(value); + _createSetPropertyAction(this.context, this, "Value", newValue); + return; + } + this.m_value=value; + _createSetPropertyAction(this.context, this, "Value", value); + }, + enumerable: true, + configurable: true + }); + Setting.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["value"], [], []); + }; + Setting.prototype.delete=function () { + _createMethodAction(this.context, this, "Delete", 0, [], false); + }; + Setting.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Key"])) { + this._K=obj["Key"]; + } + if (!_isUndefined(obj["Value"])) { + this.m_value=obj["Value"]; + this.m_value=Setting.replaceStringDateWithDate(this.m_value); + } + }; + Setting.prototype.load=function (option) { + return _load(this, option); + }; + Setting.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Setting.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Setting.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + Setting.prototype.toJSON=function () { + return _toJson(this, { + "key": this._K, + "value": this.m_value, + }, {}); + }; + Setting.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return Setting; + }(OfficeExtension.ClientObject)); + Setting.DateJSONPrefix="Date("; + Setting.DateJSONSuffix=")"; + Excel.Setting=Setting; + var _typeNamedItemCollection="NamedItemCollection"; + var NamedItemCollection=(function (_super) { + __extends(NamedItemCollection, _super); + function NamedItemCollection() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(NamedItemCollection.prototype, "_className", { + get: function () { + return "NamedItemCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NamedItemCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeNamedItemCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + NamedItemCollection.prototype.add=function (name, reference, comment) { + _throwIfApiNotSupported("NamedItemCollection.add", _defaultApiSetName, "1.4", _hostName); + return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [name, reference, comment], false, true, null, false)); + }; + NamedItemCollection.prototype.addFormulaLocal=function (name, formula, comment) { + _throwIfApiNotSupported("NamedItemCollection.addFormulaLocal", _defaultApiSetName, "1.4", _hostName); + return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "AddFormulaLocal", 0, [name, formula, comment], false, false, null, false)); + }; + NamedItemCollection.prototype.getCount=function () { + _throwIfApiNotSupported("NamedItemCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + NamedItemCollection.prototype.getItem=function (name) { + return new Excel.NamedItem(this.context, _createIndexerObjectPath(this.context, this, [name])); + }; + NamedItemCollection.prototype.getItemOrNullObject=function (name) { + _throwIfApiNotSupported("NamedItemCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null, false)); + }; + NamedItemCollection.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items=[]; + var _data=obj[OfficeExtension.Constants.items]; + for (var i=0; i < _data.length; i++) { + var _item=new Excel.NamedItem(this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, this.context, this, _data[i], i)); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + NamedItemCollection.prototype.load=function (option) { + return _load(this, option); + }; + NamedItemCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + NamedItemCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + NamedItemCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + NamedItemCollection.prototype.toJSON=function () { + return _toJson(this, {}, {}, this.m__items); + }; + return NamedItemCollection; + }(OfficeExtension.ClientObject)); + Excel.NamedItemCollection=NamedItemCollection; + var _typeNamedItem="NamedItem"; + var NamedItem=(function (_super) { + __extends(NamedItem, _super); + function NamedItem() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(NamedItem.prototype, "_className", { + get: function () { + return "NamedItem"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NamedItem.prototype, "worksheet", { + get: function () { + _throwIfApiNotSupported("NamedItem.worksheet", _defaultApiSetName, "1.4", _hostName); + if (!this._W) { + this._W=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false, false)); + } + return this._W; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NamedItem.prototype, "worksheetOrNullObject", { + get: function () { + _throwIfApiNotSupported("NamedItem.worksheetOrNullObject", _defaultApiSetName, "1.4", _hostName); + if (!this._Wo) { + this._Wo=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "WorksheetOrNullObject", false, false, false)); + } + return this._Wo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NamedItem.prototype, "comment", { + get: function () { + _throwIfNotLoaded("comment", this._C, _typeNamedItem, this._isNull); + _throwIfApiNotSupported("NamedItem.comment", _defaultApiSetName, "1.4", _hostName); + return this._C; + }, + set: function (value) { + this._C=value; + _createSetPropertyAction(this.context, this, "Comment", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NamedItem.prototype, "name", { + get: function () { + _throwIfNotLoaded("name", this._N, _typeNamedItem, this._isNull); + return this._N; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NamedItem.prototype, "scope", { + get: function () { + _throwIfNotLoaded("scope", this._S, _typeNamedItem, this._isNull); + _throwIfApiNotSupported("NamedItem.scope", _defaultApiSetName, "1.4", _hostName); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NamedItem.prototype, "type", { + get: function () { + _throwIfNotLoaded("type", this._T, _typeNamedItem, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NamedItem.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this._V, _typeNamedItem, this._isNull); + return this._V; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NamedItem.prototype, "visible", { + get: function () { + _throwIfNotLoaded("visible", this._Vi, _typeNamedItem, this._isNull); + return this._Vi; + }, + set: function (value) { + this._Vi=value; + _createSetPropertyAction(this.context, this, "Visible", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NamedItem.prototype, "_Id", { + get: function () { + _throwIfNotLoaded("_Id", this.__I, _typeNamedItem, this._isNull); + return this.__I; + }, + enumerable: true, + configurable: true + }); + NamedItem.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["visible", "comment"], [], [ + "worksheet", + "worksheetOrNullObject" + ]); + }; + NamedItem.prototype.delete=function () { + _throwIfApiNotSupported("NamedItem.delete", _defaultApiSetName, "1.4", _hostName); + _createMethodAction(this.context, this, "Delete", 0, [], false); + }; + NamedItem.prototype.getRange=function () { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); + }; + NamedItem.prototype.getRangeOrNullObject=function () { + _throwIfApiNotSupported("NamedItem.getRangeOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRangeOrNullObject", 1, [], false, true, null, false)); + }; + NamedItem.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Comment"])) { + this._C=obj["Comment"]; + } + if (!_isUndefined(obj["Name"])) { + this._N=obj["Name"]; + } + if (!_isUndefined(obj["Scope"])) { + this._S=obj["Scope"]; + } + if (!_isUndefined(obj["Type"])) { + this._T=obj["Type"]; + } + if (!_isUndefined(obj["Value"])) { + this._V=obj["Value"]; + } + if (!_isUndefined(obj["Visible"])) { + this._Vi=obj["Visible"]; + } + if (!_isUndefined(obj["_Id"])) { + this.__I=obj["_Id"]; + } + _handleNavigationPropertyResults(this, obj, ["worksheet", "Worksheet", "worksheetOrNullObject", "WorksheetOrNullObject"]); + }; + NamedItem.prototype.load=function (option) { + return _load(this, option); + }; + NamedItem.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + NamedItem.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + NamedItem.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + NamedItem.prototype._handleIdResult=function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["_Id"])) { + this.__I=value["_Id"]; + } + }; + NamedItem.prototype.toJSON=function () { + return _toJson(this, { + "comment": this._C, + "name": this._N, + "scope": this._S, + "type": this._T, + "value": this._V, + "visible": this._Vi, + }, {}); + }; + NamedItem.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return NamedItem; + }(OfficeExtension.ClientObject)); + Excel.NamedItem=NamedItem; + var _typeBinding="Binding"; + var Binding=(function (_super) { + __extends(Binding, _super); + function Binding() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Binding.prototype, "_className", { + get: function () { + return "Binding"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Binding.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeBinding, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Binding.prototype, "type", { + get: function () { + _throwIfNotLoaded("type", this._T, _typeBinding, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + Binding.prototype.delete=function () { + _throwIfApiNotSupported("Binding.delete", _defaultApiSetName, "1.3", _hostName); + _createMethodAction(this.context, this, "Delete", 0, [], false); + }; + Binding.prototype.getRange=function () { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, false, null, false)); + }; + Binding.prototype.getTable=function () { + return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetTable", 1, [], false, false, null, false)); + }; + Binding.prototype.getText=function () { + var action=_createMethodAction(this.context, this, "GetText", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Binding.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I=obj["Id"]; + } + if (!_isUndefined(obj["Type"])) { + this._T=obj["Type"]; + } + }; + Binding.prototype.load=function (option) { + return _load(this, option); + }; + Binding.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Binding.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Binding.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + Binding.prototype._handleIdResult=function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I=value["Id"]; + } + }; + Object.defineProperty(Binding.prototype, "onDataChanged", { + get: function () { + var _this=this; + _throwIfApiNotSupported("Binding.onDataChanged", _defaultApiSetName, "1.3", _hostName); + if (!this.m_dataChanged) { + this.m_dataChanged=new OfficeExtension.EventHandlers(this.context, this, "DataChanged", { + registerFunc: function (handlerCallback) { + return _this.context.eventRegistration.register(4, _this.id, handlerCallback); + }, + unregisterFunc: function (handlerCallback) { + return _this.context.eventRegistration.unregister(4, _this.id, handlerCallback); + }, + eventArgsTransformFunc: function (args) { + var evt={ + binding: _this + }; + return OfficeExtension.Utility._createPromiseFromResult(evt); + } + }); + } + return this.m_dataChanged; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Binding.prototype, "onSelectionChanged", { + get: function () { + var _this=this; + _throwIfApiNotSupported("Binding.onSelectionChanged", _defaultApiSetName, "1.3", _hostName); + if (!this.m_selectionChanged) { + this.m_selectionChanged=new OfficeExtension.EventHandlers(this.context, this, "SelectionChanged", { + registerFunc: function (handlerCallback) { + return _this.context.eventRegistration.register(3, _this.id, handlerCallback); + }, + unregisterFunc: function (handlerCallback) { + return _this.context.eventRegistration.unregister(3, _this.id, handlerCallback); + }, + eventArgsTransformFunc: function (args) { + var evt={ + binding: _this, + columnCount: args.columnCount, + rowCount: args.rowCount, + startColumn: args.startColumn, + startRow: args.startRow + }; + return OfficeExtension.Utility._createPromiseFromResult(evt); + } + }); + } + return this.m_selectionChanged; + }, + enumerable: true, + configurable: true + }); + Binding.prototype.toJSON=function () { + return _toJson(this, { + "id": this._I, + "type": this._T, + }, {}); + }; + Binding.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return Binding; + }(OfficeExtension.ClientObject)); + Excel.Binding=Binding; + var _typeBindingCollection="BindingCollection"; + var BindingCollection=(function (_super) { + __extends(BindingCollection, _super); + function BindingCollection() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(BindingCollection.prototype, "_className", { + get: function () { + return "BindingCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(BindingCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeBindingCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(BindingCollection.prototype, "count", { + get: function () { + _throwIfNotLoaded("count", this._C, _typeBindingCollection, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + BindingCollection.prototype.add=function (range, bindingType, id) { + _throwIfApiNotSupported("BindingCollection.add", _defaultApiSetName, "1.3", _hostName); + return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [range, bindingType, id], false, true, null, false)); + }; + BindingCollection.prototype.addFromNamedItem=function (name, bindingType, id) { + _throwIfApiNotSupported("BindingCollection.addFromNamedItem", _defaultApiSetName, "1.3", _hostName); + return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "AddFromNamedItem", 0, [name, bindingType, id], false, false, null, false)); + }; + BindingCollection.prototype.addFromSelection=function (bindingType, id) { + _throwIfApiNotSupported("BindingCollection.addFromSelection", _defaultApiSetName, "1.3", _hostName); + return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "AddFromSelection", 0, [bindingType, id], false, false, null, false)); + }; + BindingCollection.prototype.getCount=function () { + _throwIfApiNotSupported("BindingCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + BindingCollection.prototype.getItem=function (id) { + return new Excel.Binding(this.context, _createIndexerObjectPath(this.context, this, [id])); + }; + BindingCollection.prototype.getItemAt=function (index) { + return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); + }; + BindingCollection.prototype.getItemOrNullObject=function (id) { + _throwIfApiNotSupported("BindingCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null, false)); + }; + BindingCollection.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Count"])) { + this._C=obj["Count"]; + } + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items=[]; + var _data=obj[OfficeExtension.Constants.items]; + for (var i=0; i < _data.length; i++) { + var _item=new Excel.Binding(this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, this.context, this, _data[i], i)); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + BindingCollection.prototype.load=function (option) { + return _load(this, option); + }; + BindingCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + BindingCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + BindingCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + BindingCollection.prototype.toJSON=function () { + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); + }; + return BindingCollection; + }(OfficeExtension.ClientObject)); + Excel.BindingCollection=BindingCollection; + var _typeTableCollection="TableCollection"; + var TableCollection=(function (_super) { + __extends(TableCollection, _super); + function TableCollection() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(TableCollection.prototype, "_className", { + get: function () { + return "TableCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableCollection.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject=value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeTableCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableCollection.prototype, "count", { + get: function () { + _throwIfNotLoaded("count", this._C, _typeTableCollection, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + TableCollection.prototype.add=function (address, hasHeaders) { + return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [address, hasHeaders], false, true, null, false)); + }; + TableCollection.prototype.getCount=function () { + _throwIfApiNotSupported("TableCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + TableCollection.prototype.getItem=function (key) { + return new Excel.Table(this.context, _createIndexerObjectPath(this.context, this, [key])); + }; + TableCollection.prototype.getItemAt=function (index) { + return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); + }; + TableCollection.prototype.getItemOrNullObject=function (key) { + _throwIfApiNotSupported("TableCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null, false)); + }; + TableCollection.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Count"])) { + this._C=obj["Count"]; + } + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items=[]; + var _data=obj[OfficeExtension.Constants.items]; + for (var i=0; i < _data.length; i++) { + var _item=new Excel.Table(this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, this.context, this, _data[i], i)); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + TableCollection.prototype.load=function (option) { + return _load(this, option); + }; + TableCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TableCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + TableCollection.prototype.toJSON=function () { + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); + }; + return TableCollection; + }(OfficeExtension.ClientObject)); + Excel.TableCollection=TableCollection; + var _typeTable="Table"; + var Table=(function (_super) { + __extends(Table, _super); + function Table() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Table.prototype, "_className", { + get: function () { + return "Table"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Table.prototype, "columns", { + get: function () { + if (!this._C) { + this._C=new Excel.TableColumnCollection(this.context, _createPropertyObjectPath(this.context, this, "Columns", true, false, false)); + } + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Table.prototype, "rows", { + get: function () { + if (!this._R) { + this._R=new Excel.TableRowCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false, false)); + } + return this._R; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Table.prototype, "sort", { + get: function () { + _throwIfApiNotSupported("Table.sort", _defaultApiSetName, "1.2", _hostName); + if (!this._So) { + this._So=new Excel.TableSort(this.context, _createPropertyObjectPath(this.context, this, "Sort", false, false, false)); + } + return this._So; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Table.prototype, "worksheet", { + get: function () { + _throwIfApiNotSupported("Table.worksheet", _defaultApiSetName, "1.2", _hostName); + if (!this._W) { + this._W=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false, false)); + } + return this._W; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Table.prototype, "highlightFirstColumn", { + get: function () { + _throwIfNotLoaded("highlightFirstColumn", this._H, _typeTable, this._isNull); + _throwIfApiNotSupported("Table.highlightFirstColumn", _defaultApiSetName, "1.3", _hostName); + return this._H; + }, + set: function (value) { + this._H=value; + _createSetPropertyAction(this.context, this, "HighlightFirstColumn", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Table.prototype, "highlightLastColumn", { + get: function () { + _throwIfNotLoaded("highlightLastColumn", this._Hi, _typeTable, this._isNull); + _throwIfApiNotSupported("Table.highlightLastColumn", _defaultApiSetName, "1.3", _hostName); + return this._Hi; + }, + set: function (value) { + this._Hi=value; + _createSetPropertyAction(this.context, this, "HighlightLastColumn", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Table.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeTable, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Table.prototype, "name", { + get: function () { + _throwIfNotLoaded("name", this._N, _typeTable, this._isNull); + return this._N; + }, + set: function (value) { + this._N=value; + _createSetPropertyAction(this.context, this, "Name", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Table.prototype, "showBandedColumns", { + get: function () { + _throwIfNotLoaded("showBandedColumns", this._S, _typeTable, this._isNull); + _throwIfApiNotSupported("Table.showBandedColumns", _defaultApiSetName, "1.3", _hostName); + return this._S; + }, + set: function (value) { + this._S=value; + _createSetPropertyAction(this.context, this, "ShowBandedColumns", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Table.prototype, "showBandedRows", { + get: function () { + _throwIfNotLoaded("showBandedRows", this._Sh, _typeTable, this._isNull); + _throwIfApiNotSupported("Table.showBandedRows", _defaultApiSetName, "1.3", _hostName); + return this._Sh; + }, + set: function (value) { + this._Sh=value; + _createSetPropertyAction(this.context, this, "ShowBandedRows", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Table.prototype, "showFilterButton", { + get: function () { + _throwIfNotLoaded("showFilterButton", this._Sho, _typeTable, this._isNull); + _throwIfApiNotSupported("Table.showFilterButton", _defaultApiSetName, "1.3", _hostName); + return this._Sho; + }, + set: function (value) { + this._Sho=value; + _createSetPropertyAction(this.context, this, "ShowFilterButton", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Table.prototype, "showHeaders", { + get: function () { + _throwIfNotLoaded("showHeaders", this._Show, _typeTable, this._isNull); + return this._Show; + }, + set: function (value) { + this._Show=value; + _createSetPropertyAction(this.context, this, "ShowHeaders", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Table.prototype, "showTotals", { + get: function () { + _throwIfNotLoaded("showTotals", this._ShowT, _typeTable, this._isNull); + return this._ShowT; + }, + set: function (value) { + this._ShowT=value; + _createSetPropertyAction(this.context, this, "ShowTotals", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Table.prototype, "style", { + get: function () { + _throwIfNotLoaded("style", this._St, _typeTable, this._isNull); + return this._St; + }, + set: function (value) { + this._St=value; + _createSetPropertyAction(this.context, this, "Style", value); + }, + enumerable: true, + configurable: true + }); + Table.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["name", "showHeaders", "showTotals", "style", "highlightFirstColumn", "highlightLastColumn", "showBandedRows", "showBandedColumns", "showFilterButton"], [], [ + "columns", + "rows", + "sort", + "worksheet" + ]); + }; + Table.prototype.clearFilters=function () { + _throwIfApiNotSupported("Table.clearFilters", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "ClearFilters", 0, [], false); + }; + Table.prototype.convertToRange=function () { + _throwIfApiNotSupported("Table.convertToRange", _defaultApiSetName, "1.2", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "ConvertToRange", 0, [], false, true, null, false)); + }; + Table.prototype.delete=function () { + _createMethodAction(this.context, this, "Delete", 0, [], false); + }; + Table.prototype.getDataBodyRange=function () { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetDataBodyRange", 1, [], false, true, null, false)); + }; + Table.prototype.getHeaderRowRange=function () { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetHeaderRowRange", 1, [], false, true, null, false)); + }; + Table.prototype.getRange=function () { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); + }; + Table.prototype.getTotalRowRange=function () { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetTotalRowRange", 1, [], false, true, null, false)); + }; + Table.prototype.reapplyFilters=function () { + _throwIfApiNotSupported("Table.reapplyFilters", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "ReapplyFilters", 0, [], false); + }; + Table.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + obj["Id"]=obj["Id"].toString(); + } + if (!_isUndefined(obj["HighlightFirstColumn"])) { + this._H=obj["HighlightFirstColumn"]; + } + if (!_isUndefined(obj["HighlightLastColumn"])) { + this._Hi=obj["HighlightLastColumn"]; + } + if (!_isUndefined(obj["Id"])) { + this._I=obj["Id"]; + } + if (!_isUndefined(obj["Name"])) { + this._N=obj["Name"]; + } + if (!_isUndefined(obj["ShowBandedColumns"])) { + this._S=obj["ShowBandedColumns"]; + } + if (!_isUndefined(obj["ShowBandedRows"])) { + this._Sh=obj["ShowBandedRows"]; + } + if (!_isUndefined(obj["ShowFilterButton"])) { + this._Sho=obj["ShowFilterButton"]; + } + if (!_isUndefined(obj["ShowHeaders"])) { + this._Show=obj["ShowHeaders"]; + } + if (!_isUndefined(obj["ShowTotals"])) { + this._ShowT=obj["ShowTotals"]; + } + if (!_isUndefined(obj["Style"])) { + this._St=obj["Style"]; + } + _handleNavigationPropertyResults(this, obj, ["columns", "Columns", "rows", "Rows", "sort", "Sort", "worksheet", "Worksheet"]); + }; + Table.prototype.load=function (option) { + return _load(this, option); + }; + Table.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Table.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Table.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + Table.prototype._handleIdResult=function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + value["Id"]=value["Id"].toString(); + this._I=value["Id"]; + } + }; + Table.prototype.toJSON=function () { + return _toJson(this, { + "highlightFirstColumn": this._H, + "highlightLastColumn": this._Hi, + "id": this._I, + "name": this._N, + "showBandedColumns": this._S, + "showBandedRows": this._Sh, + "showFilterButton": this._Sho, + "showHeaders": this._Show, + "showTotals": this._ShowT, + "style": this._St, + }, { + "columns": this._C, + "rows": this._R, + "sort": this._So, + }); + }; + Table.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return Table; + }(OfficeExtension.ClientObject)); + Excel.Table=Table; + var _typeTableColumnCollection="TableColumnCollection"; + var TableColumnCollection=(function (_super) { + __extends(TableColumnCollection, _super); + function TableColumnCollection() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(TableColumnCollection.prototype, "_className", { + get: function () { + return "TableColumnCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableColumnCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeTableColumnCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableColumnCollection.prototype, "count", { + get: function () { + _throwIfNotLoaded("count", this._C, _typeTableColumnCollection, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + TableColumnCollection.prototype.add=function (index, values, name) { + return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [index, values, name], false, true, null, false)); + }; + TableColumnCollection.prototype.getCount=function () { + _throwIfApiNotSupported("TableColumnCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + TableColumnCollection.prototype.getItem=function (key) { + return new Excel.TableColumn(this.context, _createIndexerObjectPath(this.context, this, [key])); + }; + TableColumnCollection.prototype.getItemAt=function (index) { + return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); + }; + TableColumnCollection.prototype.getItemOrNullObject=function (key) { + _throwIfApiNotSupported("TableColumnCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null, false)); + }; + TableColumnCollection.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Count"])) { + this._C=obj["Count"]; + } + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items=[]; + var _data=obj[OfficeExtension.Constants.items]; + for (var i=0; i < _data.length; i++) { + var _item=new Excel.TableColumn(this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, this.context, this, _data[i], i)); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + TableColumnCollection.prototype.load=function (option) { + return _load(this, option); + }; + TableColumnCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TableColumnCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableColumnCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + TableColumnCollection.prototype.toJSON=function () { + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); + }; + return TableColumnCollection; + }(OfficeExtension.ClientObject)); + Excel.TableColumnCollection=TableColumnCollection; + var _typeTableColumn="TableColumn"; + var TableColumn=(function (_super) { + __extends(TableColumn, _super); + function TableColumn() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(TableColumn.prototype, "_className", { + get: function () { + return "TableColumn"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableColumn.prototype, "filter", { + get: function () { + _throwIfApiNotSupported("TableColumn.filter", _defaultApiSetName, "1.2", _hostName); + if (!this._F) { + this._F=new Excel.Filter(this.context, _createPropertyObjectPath(this.context, this, "Filter", false, false, false)); + } + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableColumn.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeTableColumn, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableColumn.prototype, "index", { + get: function () { + _throwIfNotLoaded("index", this._In, _typeTableColumn, this._isNull); + return this._In; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableColumn.prototype, "name", { + get: function () { + _throwIfNotLoaded("name", this._N, _typeTableColumn, this._isNull); + return this._N; + }, + set: function (value) { + this._N=value; + _createSetPropertyAction(this.context, this, "Name", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableColumn.prototype, "values", { + get: function () { + _throwIfNotLoaded("values", this._V, _typeTableColumn, this._isNull); + return this._V; + }, + set: function (value) { + this._V=value; + _createSetPropertyAction(this.context, this, "Values", value); + }, + enumerable: true, + configurable: true + }); + TableColumn.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["values", "name"], [], [ + "filter" + ]); + }; + TableColumn.prototype.delete=function () { + _createMethodAction(this.context, this, "Delete", 0, [], false); + }; + TableColumn.prototype.getDataBodyRange=function () { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetDataBodyRange", 1, [], false, true, null, false)); + }; + TableColumn.prototype.getHeaderRowRange=function () { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetHeaderRowRange", 1, [], false, true, null, false)); + }; + TableColumn.prototype.getRange=function () { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); + }; + TableColumn.prototype.getTotalRowRange=function () { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetTotalRowRange", 1, [], false, true, null, false)); + }; + TableColumn.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I=obj["Id"]; + } + if (!_isUndefined(obj["Index"])) { + this._In=obj["Index"]; + } + if (!_isUndefined(obj["Name"])) { + this._N=obj["Name"]; + } + if (!_isUndefined(obj["Values"])) { + this._V=obj["Values"]; + } + _handleNavigationPropertyResults(this, obj, ["filter", "Filter"]); + }; + TableColumn.prototype.load=function (option) { + return _load(this, option); + }; + TableColumn.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TableColumn.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableColumn.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + TableColumn.prototype._handleIdResult=function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I=value["Id"]; + } + }; + TableColumn.prototype.toJSON=function () { + return _toJson(this, { + "id": this._I, + "index": this._In, + "name": this._N, + "values": this._V, + }, { + "filter": this._F, + }); + }; + TableColumn.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return TableColumn; + }(OfficeExtension.ClientObject)); + Excel.TableColumn=TableColumn; + var _typeTableRowCollection="TableRowCollection"; + var TableRowCollection=(function (_super) { + __extends(TableRowCollection, _super); + function TableRowCollection() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(TableRowCollection.prototype, "_className", { + get: function () { + return "TableRowCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableRowCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeTableRowCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableRowCollection.prototype, "count", { + get: function () { + _throwIfNotLoaded("count", this._C, _typeTableRowCollection, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + TableRowCollection.prototype.add=function (index, values) { + return new Excel.TableRow(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [index, values], false, true, null, false)); + }; + TableRowCollection.prototype.getCount=function () { + _throwIfApiNotSupported("TableRowCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + TableRowCollection.prototype.getItemAt=function (index) { + return new Excel.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); + }; + TableRowCollection.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Count"])) { + this._C=obj["Count"]; + } + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items=[]; + var _data=obj[OfficeExtension.Constants.items]; + for (var i=0; i < _data.length; i++) { + var _item=new Excel.TableRow(this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(false, this.context, this, _data[i], i)); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + TableRowCollection.prototype.load=function (option) { + return _load(this, option); + }; + TableRowCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TableRowCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableRowCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + TableRowCollection.prototype.toJSON=function () { + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); + }; + return TableRowCollection; + }(OfficeExtension.ClientObject)); + Excel.TableRowCollection=TableRowCollection; + var _typeTableRow="TableRow"; + var TableRow=(function (_super) { + __extends(TableRow, _super); + function TableRow() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(TableRow.prototype, "_className", { + get: function () { + return "TableRow"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableRow.prototype, "index", { + get: function () { + _throwIfNotLoaded("index", this._I, _typeTableRow, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableRow.prototype, "values", { + get: function () { + _throwIfNotLoaded("values", this._V, _typeTableRow, this._isNull); + return this._V; + }, + set: function (value) { + this._V=value; + _createSetPropertyAction(this.context, this, "Values", value); + }, + enumerable: true, + configurable: true + }); + TableRow.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["values"], [], []); + }; + TableRow.prototype.delete=function () { + _createMethodAction(this.context, this, "Delete", 0, [], false); + }; + TableRow.prototype.getRange=function () { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); + }; + TableRow.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Index"])) { + this._I=obj["Index"]; + } + if (!_isUndefined(obj["Values"])) { + this._V=obj["Values"]; + } + }; + TableRow.prototype.load=function (option) { + return _load(this, option); + }; + TableRow.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TableRow.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableRow.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + TableRow.prototype.toJSON=function () { + return _toJson(this, { + "index": this._I, + "values": this._V, + }, {}); + }; + TableRow.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return TableRow; + }(OfficeExtension.ClientObject)); + Excel.TableRow=TableRow; + var _typeRangeFormat="RangeFormat"; + var RangeFormat=(function (_super) { + __extends(RangeFormat, _super); + function RangeFormat() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RangeFormat.prototype, "_className", { + get: function () { + return "RangeFormat"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFormat.prototype, "borders", { + get: function () { + if (!this._B) { + this._B=new Excel.RangeBorderCollection(this.context, _createPropertyObjectPath(this.context, this, "Borders", true, false, false)); + } + return this._B; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFormat.prototype, "fill", { + get: function () { + if (!this._F) { + this._F=new Excel.RangeFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); + } + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFormat.prototype, "font", { + get: function () { + if (!this._Fo) { + this._Fo=new Excel.RangeFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); + } + return this._Fo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFormat.prototype, "protection", { + get: function () { + _throwIfApiNotSupported("RangeFormat.protection", _defaultApiSetName, "1.2", _hostName); + if (!this._P) { + this._P=new Excel.FormatProtection(this.context, _createPropertyObjectPath(this.context, this, "Protection", false, false, false)); + } + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFormat.prototype, "columnWidth", { + get: function () { + _throwIfNotLoaded("columnWidth", this._C, _typeRangeFormat, this._isNull); + _throwIfApiNotSupported("RangeFormat.columnWidth", _defaultApiSetName, "1.2", _hostName); + return this._C; + }, + set: function (value) { + this._C=value; + _createSetPropertyAction(this.context, this, "ColumnWidth", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFormat.prototype, "horizontalAlignment", { + get: function () { + _throwIfNotLoaded("horizontalAlignment", this._H, _typeRangeFormat, this._isNull); + return this._H; + }, + set: function (value) { + this._H=value; + _createSetPropertyAction(this.context, this, "HorizontalAlignment", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFormat.prototype, "rowHeight", { + get: function () { + _throwIfNotLoaded("rowHeight", this._R, _typeRangeFormat, this._isNull); + _throwIfApiNotSupported("RangeFormat.rowHeight", _defaultApiSetName, "1.2", _hostName); + return this._R; + }, + set: function (value) { + this._R=value; + _createSetPropertyAction(this.context, this, "RowHeight", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFormat.prototype, "verticalAlignment", { + get: function () { + _throwIfNotLoaded("verticalAlignment", this._V, _typeRangeFormat, this._isNull); + return this._V; + }, + set: function (value) { + this._V=value; + _createSetPropertyAction(this.context, this, "VerticalAlignment", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFormat.prototype, "wrapText", { + get: function () { + _throwIfNotLoaded("wrapText", this._W, _typeRangeFormat, this._isNull); + return this._W; + }, + set: function (value) { + this._W=value; + _createSetPropertyAction(this.context, this, "WrapText", value); + }, + enumerable: true, + configurable: true + }); + RangeFormat.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["wrapText", "horizontalAlignment", "verticalAlignment", "columnWidth", "rowHeight"], ["fill", "font", "protection"], [ + "borders" + ]); + }; + RangeFormat.prototype.autofitColumns=function () { + _throwIfApiNotSupported("RangeFormat.autofitColumns", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "AutofitColumns", 0, [], false); + }; + RangeFormat.prototype.autofitRows=function () { + _throwIfApiNotSupported("RangeFormat.autofitRows", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "AutofitRows", 0, [], false); + }; + RangeFormat.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["ColumnWidth"])) { + this._C=obj["ColumnWidth"]; + } + if (!_isUndefined(obj["HorizontalAlignment"])) { + this._H=obj["HorizontalAlignment"]; + } + if (!_isUndefined(obj["RowHeight"])) { + this._R=obj["RowHeight"]; + } + if (!_isUndefined(obj["VerticalAlignment"])) { + this._V=obj["VerticalAlignment"]; + } + if (!_isUndefined(obj["WrapText"])) { + this._W=obj["WrapText"]; + } + _handleNavigationPropertyResults(this, obj, ["borders", "Borders", "fill", "Fill", "font", "Font", "protection", "Protection"]); + }; + RangeFormat.prototype.load=function (option) { + return _load(this, option); + }; + RangeFormat.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + RangeFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeFormat.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + RangeFormat.prototype.toJSON=function () { + return _toJson(this, { + "columnWidth": this._C, + "horizontalAlignment": this._H, + "rowHeight": this._R, + "verticalAlignment": this._V, + "wrapText": this._W, + }, { + "borders": this._B, + "fill": this._F, + "font": this._Fo, + "protection": this._P, + }); + }; + RangeFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return RangeFormat; + }(OfficeExtension.ClientObject)); + Excel.RangeFormat=RangeFormat; + var _typeFormatProtection="FormatProtection"; + var FormatProtection=(function (_super) { + __extends(FormatProtection, _super); + function FormatProtection() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(FormatProtection.prototype, "_className", { + get: function () { + return "FormatProtection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FormatProtection.prototype, "formulaHidden", { + get: function () { + _throwIfNotLoaded("formulaHidden", this._F, _typeFormatProtection, this._isNull); + return this._F; + }, + set: function (value) { + this._F=value; + _createSetPropertyAction(this.context, this, "FormulaHidden", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FormatProtection.prototype, "locked", { + get: function () { + _throwIfNotLoaded("locked", this._L, _typeFormatProtection, this._isNull); + return this._L; + }, + set: function (value) { + this._L=value; + _createSetPropertyAction(this.context, this, "Locked", value); + }, + enumerable: true, + configurable: true + }); + FormatProtection.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["locked", "formulaHidden"], [], []); + }; + FormatProtection.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["FormulaHidden"])) { + this._F=obj["FormulaHidden"]; + } + if (!_isUndefined(obj["Locked"])) { + this._L=obj["Locked"]; + } + }; + FormatProtection.prototype.load=function (option) { + return _load(this, option); + }; + FormatProtection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + FormatProtection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + FormatProtection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + FormatProtection.prototype.toJSON=function () { + return _toJson(this, { + "formulaHidden": this._F, + "locked": this._L, + }, {}); + }; + FormatProtection.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return FormatProtection; + }(OfficeExtension.ClientObject)); + Excel.FormatProtection=FormatProtection; + var _typeRangeFill="RangeFill"; + var RangeFill=(function (_super) { + __extends(RangeFill, _super); + function RangeFill() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RangeFill.prototype, "_className", { + get: function () { + return "RangeFill"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFill.prototype, "color", { + get: function () { + _throwIfNotLoaded("color", this._C, _typeRangeFill, this._isNull); + return this._C; + }, + set: function (value) { + this._C=value; + _createSetPropertyAction(this.context, this, "Color", value); + }, + enumerable: true, + configurable: true + }); + RangeFill.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["color"], [], []); + }; + RangeFill.prototype.clear=function () { + _createMethodAction(this.context, this, "Clear", 0, [], false); + }; + RangeFill.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Color"])) { + this._C=obj["Color"]; + } + }; + RangeFill.prototype.load=function (option) { + return _load(this, option); + }; + RangeFill.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + RangeFill.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeFill.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + RangeFill.prototype.toJSON=function () { + return _toJson(this, { + "color": this._C, + }, {}); + }; + RangeFill.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return RangeFill; + }(OfficeExtension.ClientObject)); + Excel.RangeFill=RangeFill; + var _typeRangeBorder="RangeBorder"; + var RangeBorder=(function (_super) { + __extends(RangeBorder, _super); + function RangeBorder() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RangeBorder.prototype, "_className", { + get: function () { + return "RangeBorder"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeBorder.prototype, "color", { + get: function () { + _throwIfNotLoaded("color", this._C, _typeRangeBorder, this._isNull); + return this._C; + }, + set: function (value) { + this._C=value; + _createSetPropertyAction(this.context, this, "Color", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeBorder.prototype, "sideIndex", { + get: function () { + _throwIfNotLoaded("sideIndex", this._S, _typeRangeBorder, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeBorder.prototype, "style", { + get: function () { + _throwIfNotLoaded("style", this._St, _typeRangeBorder, this._isNull); + return this._St; + }, + set: function (value) { + this._St=value; + _createSetPropertyAction(this.context, this, "Style", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeBorder.prototype, "weight", { + get: function () { + _throwIfNotLoaded("weight", this._W, _typeRangeBorder, this._isNull); + return this._W; + }, + set: function (value) { + this._W=value; + _createSetPropertyAction(this.context, this, "Weight", value); + }, + enumerable: true, + configurable: true + }); + RangeBorder.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["style", "weight", "color"], [], []); + }; + RangeBorder.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Color"])) { + this._C=obj["Color"]; + } + if (!_isUndefined(obj["SideIndex"])) { + this._S=obj["SideIndex"]; + } + if (!_isUndefined(obj["Style"])) { + this._St=obj["Style"]; + } + if (!_isUndefined(obj["Weight"])) { + this._W=obj["Weight"]; + } + }; + RangeBorder.prototype.load=function (option) { + return _load(this, option); + }; + RangeBorder.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + RangeBorder.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeBorder.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + RangeBorder.prototype.toJSON=function () { + return _toJson(this, { + "color": this._C, + "sideIndex": this._S, + "style": this._St, + "weight": this._W, + }, {}); + }; + RangeBorder.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return RangeBorder; + }(OfficeExtension.ClientObject)); + Excel.RangeBorder=RangeBorder; + var _typeRangeBorderCollection="RangeBorderCollection"; + var RangeBorderCollection=(function (_super) { + __extends(RangeBorderCollection, _super); + function RangeBorderCollection() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RangeBorderCollection.prototype, "_className", { + get: function () { + return "RangeBorderCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeBorderCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeRangeBorderCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeBorderCollection.prototype, "count", { + get: function () { + _throwIfNotLoaded("count", this._C, _typeRangeBorderCollection, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + RangeBorderCollection.prototype.getItem=function (index) { + return new Excel.RangeBorder(this.context, _createIndexerObjectPath(this.context, this, [index])); + }; + RangeBorderCollection.prototype.getItemAt=function (index) { + return new Excel.RangeBorder(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); + }; + RangeBorderCollection.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Count"])) { + this._C=obj["Count"]; + } + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items=[]; + var _data=obj[OfficeExtension.Constants.items]; + for (var i=0; i < _data.length; i++) { + var _item=new Excel.RangeBorder(this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, this.context, this, _data[i], i)); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + RangeBorderCollection.prototype.load=function (option) { + return _load(this, option); + }; + RangeBorderCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + RangeBorderCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeBorderCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + RangeBorderCollection.prototype.toJSON=function () { + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); + }; + return RangeBorderCollection; + }(OfficeExtension.ClientObject)); + Excel.RangeBorderCollection=RangeBorderCollection; + var _typeRangeFont="RangeFont"; + var RangeFont=(function (_super) { + __extends(RangeFont, _super); + function RangeFont() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RangeFont.prototype, "_className", { + get: function () { + return "RangeFont"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFont.prototype, "bold", { + get: function () { + _throwIfNotLoaded("bold", this._B, _typeRangeFont, this._isNull); + return this._B; + }, + set: function (value) { + this._B=value; + _createSetPropertyAction(this.context, this, "Bold", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFont.prototype, "color", { + get: function () { + _throwIfNotLoaded("color", this._C, _typeRangeFont, this._isNull); + return this._C; + }, + set: function (value) { + this._C=value; + _createSetPropertyAction(this.context, this, "Color", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFont.prototype, "italic", { + get: function () { + _throwIfNotLoaded("italic", this._I, _typeRangeFont, this._isNull); + return this._I; + }, + set: function (value) { + this._I=value; + _createSetPropertyAction(this.context, this, "Italic", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFont.prototype, "name", { + get: function () { + _throwIfNotLoaded("name", this._N, _typeRangeFont, this._isNull); + return this._N; + }, + set: function (value) { + this._N=value; + _createSetPropertyAction(this.context, this, "Name", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFont.prototype, "size", { + get: function () { + _throwIfNotLoaded("size", this._S, _typeRangeFont, this._isNull); + return this._S; + }, + set: function (value) { + this._S=value; + _createSetPropertyAction(this.context, this, "Size", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFont.prototype, "underline", { + get: function () { + _throwIfNotLoaded("underline", this._U, _typeRangeFont, this._isNull); + return this._U; + }, + set: function (value) { + this._U=value; + _createSetPropertyAction(this.context, this, "Underline", value); + }, + enumerable: true, + configurable: true + }); + RangeFont.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["name", "size", "color", "italic", "bold", "underline"], [], []); + }; + RangeFont.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Bold"])) { + this._B=obj["Bold"]; + } + if (!_isUndefined(obj["Color"])) { + this._C=obj["Color"]; + } + if (!_isUndefined(obj["Italic"])) { + this._I=obj["Italic"]; + } + if (!_isUndefined(obj["Name"])) { + this._N=obj["Name"]; + } + if (!_isUndefined(obj["Size"])) { + this._S=obj["Size"]; + } + if (!_isUndefined(obj["Underline"])) { + this._U=obj["Underline"]; + } + }; + RangeFont.prototype.load=function (option) { + return _load(this, option); + }; + RangeFont.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + RangeFont.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeFont.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + RangeFont.prototype.toJSON=function () { + return _toJson(this, { + "bold": this._B, + "color": this._C, + "italic": this._I, + "name": this._N, + "size": this._S, + "underline": this._U, + }, {}); + }; + RangeFont.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return RangeFont; + }(OfficeExtension.ClientObject)); + Excel.RangeFont=RangeFont; + var _typeChartCollection="ChartCollection"; + var ChartCollection=(function (_super) { + __extends(ChartCollection, _super); + function ChartCollection() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ChartCollection.prototype, "_className", { + get: function () { + return "ChartCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeChartCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartCollection.prototype, "count", { + get: function () { + _throwIfNotLoaded("count", this._C, _typeChartCollection, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + ChartCollection.prototype.add=function (type, sourceData, seriesBy) { + if (!(sourceData instanceof Range)) { + throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument, "sourceData", "Charts.Add"); + } + return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [type, sourceData, seriesBy], false, true, null, false)); + }; + ChartCollection.prototype.getCount=function () { + _throwIfApiNotSupported("ChartCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + ChartCollection.prototype.getItem=function (name) { + return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItem", 1, [name], false, false, null, false)); + }; + ChartCollection.prototype.getItemAt=function (index) { + return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); + }; + ChartCollection.prototype.getItemOrNullObject=function (name) { + _throwIfApiNotSupported("ChartCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null, false)); + }; + ChartCollection.prototype._GetItem=function (key) { + return new Excel.Chart(this.context, _createIndexerObjectPath(this.context, this, [key])); + }; + ChartCollection.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Count"])) { + this._C=obj["Count"]; + } + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items=[]; + var _data=obj[OfficeExtension.Constants.items]; + for (var i=0; i < _data.length; i++) { + var _item=new Excel.Chart(this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, this.context, this, _data[i], i)); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + ChartCollection.prototype.load=function (option) { + return _load(this, option); + }; + ChartCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ChartCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ChartCollection.prototype.toJSON=function () { + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); + }; + return ChartCollection; + }(OfficeExtension.ClientObject)); + Excel.ChartCollection=ChartCollection; + var _typeChart="Chart"; + var Chart=(function (_super) { + __extends(Chart, _super); + function Chart() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Chart.prototype, "_className", { + get: function () { + return "Chart"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Chart.prototype, "axes", { + get: function () { + if (!this._A) { + this._A=new Excel.ChartAxes(this.context, _createPropertyObjectPath(this.context, this, "Axes", false, false, false)); + } + return this._A; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Chart.prototype, "dataLabels", { + get: function () { + if (!this._D) { + this._D=new Excel.ChartDataLabels(this.context, _createPropertyObjectPath(this.context, this, "DataLabels", false, false, false)); + } + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Chart.prototype, "format", { + get: function () { + if (!this._F) { + this._F=new Excel.ChartAreaFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); + } + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Chart.prototype, "legend", { + get: function () { + if (!this._Le) { + this._Le=new Excel.ChartLegend(this.context, _createPropertyObjectPath(this.context, this, "Legend", false, false, false)); + } + return this._Le; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Chart.prototype, "series", { + get: function () { + if (!this._S) { + this._S=new Excel.ChartSeriesCollection(this.context, _createPropertyObjectPath(this.context, this, "Series", true, false, false)); + } + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Chart.prototype, "title", { + get: function () { + if (!this._T) { + this._T=new Excel.ChartTitle(this.context, _createPropertyObjectPath(this.context, this, "Title", false, false, false)); + } + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Chart.prototype, "worksheet", { + get: function () { + _throwIfApiNotSupported("Chart.worksheet", _defaultApiSetName, "1.2", _hostName); + if (!this._Wo) { + this._Wo=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false, false)); + } + return this._Wo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Chart.prototype, "height", { + get: function () { + _throwIfNotLoaded("height", this._H, _typeChart, this._isNull); + return this._H; + }, + set: function (value) { + this._H=value; + _createSetPropertyAction(this.context, this, "Height", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Chart.prototype, "left", { + get: function () { + _throwIfNotLoaded("left", this._L, _typeChart, this._isNull); + return this._L; + }, + set: function (value) { + this._L=value; + _createSetPropertyAction(this.context, this, "Left", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Chart.prototype, "name", { + get: function () { + _throwIfNotLoaded("name", this._N, _typeChart, this._isNull); + return this._N; + }, + set: function (value) { + this._N=value; + _createSetPropertyAction(this.context, this, "Name", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Chart.prototype, "top", { + get: function () { + _throwIfNotLoaded("top", this._To, _typeChart, this._isNull); + return this._To; + }, + set: function (value) { + this._To=value; + _createSetPropertyAction(this.context, this, "Top", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Chart.prototype, "width", { + get: function () { + _throwIfNotLoaded("width", this._W, _typeChart, this._isNull); + return this._W; + }, + set: function (value) { + this._W=value; + _createSetPropertyAction(this.context, this, "Width", value); + }, + enumerable: true, + configurable: true + }); + Chart.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["name", "top", "left", "width", "height"], ["title", "dataLabels", "legend", "axes", "format"], [ + "series", + "worksheet" + ]); + }; + Chart.prototype.delete=function () { + _createMethodAction(this.context, this, "Delete", 0, [], false); + }; + Chart.prototype.getImage=function (width, height, fittingMode) { + _throwIfApiNotSupported("Chart.getImage", _defaultApiSetName, "1.2", _hostName); + var action=_createMethodAction(this.context, this, "GetImage", 1, [width, height, fittingMode], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Chart.prototype.setData=function (sourceData, seriesBy) { + if (!(sourceData instanceof Range)) { + throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument, "sourceData", "Chart.setData"); + } + _createMethodAction(this.context, this, "SetData", 0, [sourceData, seriesBy], false); + }; + Chart.prototype.setPosition=function (startCell, endCell) { + _createMethodAction(this.context, this, "SetPosition", 0, [startCell, endCell], false); + }; + Chart.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Height"])) { + this._H=obj["Height"]; + } + if (!_isUndefined(obj["Left"])) { + this._L=obj["Left"]; + } + if (!_isUndefined(obj["Name"])) { + this._N=obj["Name"]; + } + if (!_isUndefined(obj["Top"])) { + this._To=obj["Top"]; + } + if (!_isUndefined(obj["Width"])) { + this._W=obj["Width"]; + } + _handleNavigationPropertyResults(this, obj, ["axes", "Axes", "dataLabels", "DataLabels", "format", "Format", "legend", "Legend", "series", "Series", "title", "Title", "worksheet", "Worksheet"]); + }; + Chart.prototype.load=function (option) { + return _load(this, option); + }; + Chart.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Chart.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Chart.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + Chart.prototype.toJSON=function () { + return _toJson(this, { + "height": this._H, + "left": this._L, + "name": this._N, + "top": this._To, + "width": this._W, + }, { + "axes": this._A, + "dataLabels": this._D, + "format": this._F, + "legend": this._Le, + "series": this._S, + "title": this._T, + }); + }; + Chart.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return Chart; + }(OfficeExtension.ClientObject)); + Excel.Chart=Chart; + var _typeChartAreaFormat="ChartAreaFormat"; + var ChartAreaFormat=(function (_super) { + __extends(ChartAreaFormat, _super); + function ChartAreaFormat() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ChartAreaFormat.prototype, "_className", { + get: function () { + return "ChartAreaFormat"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAreaFormat.prototype, "fill", { + get: function () { + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); + } + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAreaFormat.prototype, "font", { + get: function () { + if (!this._Fo) { + this._Fo=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); + } + return this._Fo; + }, + enumerable: true, + configurable: true + }); + ChartAreaFormat.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, [], ["font"], [ + "fill" + ]); + }; + ChartAreaFormat.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + _handleNavigationPropertyResults(this, obj, ["fill", "Fill", "font", "Font"]); + }; + ChartAreaFormat.prototype.load=function (option) { + return _load(this, option); + }; + ChartAreaFormat.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ChartAreaFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAreaFormat.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ChartAreaFormat.prototype.toJSON=function () { + return _toJson(this, {}, { + "font": this._Fo, + }); + }; + ChartAreaFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return ChartAreaFormat; + }(OfficeExtension.ClientObject)); + Excel.ChartAreaFormat=ChartAreaFormat; + var _typeChartSeriesCollection="ChartSeriesCollection"; + var ChartSeriesCollection=(function (_super) { + __extends(ChartSeriesCollection, _super); + function ChartSeriesCollection() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ChartSeriesCollection.prototype, "_className", { + get: function () { + return "ChartSeriesCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartSeriesCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeChartSeriesCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartSeriesCollection.prototype, "count", { + get: function () { + _throwIfNotLoaded("count", this._C, _typeChartSeriesCollection, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + ChartSeriesCollection.prototype.getCount=function () { + _throwIfApiNotSupported("ChartSeriesCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + ChartSeriesCollection.prototype.getItemAt=function (index) { + return new Excel.ChartSeries(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); + }; + ChartSeriesCollection.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Count"])) { + this._C=obj["Count"]; + } + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items=[]; + var _data=obj[OfficeExtension.Constants.items]; + for (var i=0; i < _data.length; i++) { + var _item=new Excel.ChartSeries(this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(false, this.context, this, _data[i], i)); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + ChartSeriesCollection.prototype.load=function (option) { + return _load(this, option); + }; + ChartSeriesCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ChartSeriesCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartSeriesCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ChartSeriesCollection.prototype.toJSON=function () { + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); + }; + return ChartSeriesCollection; + }(OfficeExtension.ClientObject)); + Excel.ChartSeriesCollection=ChartSeriesCollection; + var _typeChartSeries="ChartSeries"; + var ChartSeries=(function (_super) { + __extends(ChartSeries, _super); + function ChartSeries() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ChartSeries.prototype, "_className", { + get: function () { + return "ChartSeries"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartSeries.prototype, "format", { + get: function () { + if (!this._F) { + this._F=new Excel.ChartSeriesFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); + } + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartSeries.prototype, "points", { + get: function () { + if (!this._P) { + this._P=new Excel.ChartPointsCollection(this.context, _createPropertyObjectPath(this.context, this, "Points", true, false, false)); + } + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartSeries.prototype, "name", { + get: function () { + _throwIfNotLoaded("name", this._N, _typeChartSeries, this._isNull); + return this._N; + }, + set: function (value) { + this._N=value; + _createSetPropertyAction(this.context, this, "Name", value); + }, + enumerable: true, + configurable: true + }); + ChartSeries.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["name"], ["format"], [ + "points" + ]); + }; + ChartSeries.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Name"])) { + this._N=obj["Name"]; + } + _handleNavigationPropertyResults(this, obj, ["format", "Format", "points", "Points"]); + }; + ChartSeries.prototype.load=function (option) { + return _load(this, option); + }; + ChartSeries.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ChartSeries.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartSeries.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ChartSeries.prototype.toJSON=function () { + return _toJson(this, { + "name": this._N, + }, { + "format": this._F, + "points": this._P, + }); + }; + ChartSeries.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return ChartSeries; + }(OfficeExtension.ClientObject)); + Excel.ChartSeries=ChartSeries; + var _typeChartSeriesFormat="ChartSeriesFormat"; + var ChartSeriesFormat=(function (_super) { + __extends(ChartSeriesFormat, _super); + function ChartSeriesFormat() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ChartSeriesFormat.prototype, "_className", { + get: function () { + return "ChartSeriesFormat"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartSeriesFormat.prototype, "fill", { + get: function () { + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); + } + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartSeriesFormat.prototype, "line", { + get: function () { + if (!this._L) { + this._L=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false, false)); + } + return this._L; + }, + enumerable: true, + configurable: true + }); + ChartSeriesFormat.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, [], ["line"], [ + "fill" + ]); + }; + ChartSeriesFormat.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + _handleNavigationPropertyResults(this, obj, ["fill", "Fill", "line", "Line"]); + }; + ChartSeriesFormat.prototype.load=function (option) { + return _load(this, option); + }; + ChartSeriesFormat.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ChartSeriesFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartSeriesFormat.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ChartSeriesFormat.prototype.toJSON=function () { + return _toJson(this, {}, { + "line": this._L, + }); + }; + ChartSeriesFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return ChartSeriesFormat; + }(OfficeExtension.ClientObject)); + Excel.ChartSeriesFormat=ChartSeriesFormat; + var _typeChartPointsCollection="ChartPointsCollection"; + var ChartPointsCollection=(function (_super) { + __extends(ChartPointsCollection, _super); + function ChartPointsCollection() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ChartPointsCollection.prototype, "_className", { + get: function () { + return "ChartPointsCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartPointsCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeChartPointsCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartPointsCollection.prototype, "count", { + get: function () { + _throwIfNotLoaded("count", this._C, _typeChartPointsCollection, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + ChartPointsCollection.prototype.getCount=function () { + _throwIfApiNotSupported("ChartPointsCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + ChartPointsCollection.prototype.getItemAt=function (index) { + return new Excel.ChartPoint(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); + }; + ChartPointsCollection.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Count"])) { + this._C=obj["Count"]; + } + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items=[]; + var _data=obj[OfficeExtension.Constants.items]; + for (var i=0; i < _data.length; i++) { + var _item=new Excel.ChartPoint(this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(false, this.context, this, _data[i], i)); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + ChartPointsCollection.prototype.load=function (option) { + return _load(this, option); + }; + ChartPointsCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ChartPointsCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartPointsCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ChartPointsCollection.prototype.toJSON=function () { + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); + }; + return ChartPointsCollection; + }(OfficeExtension.ClientObject)); + Excel.ChartPointsCollection=ChartPointsCollection; + var _typeChartPoint="ChartPoint"; + var ChartPoint=(function (_super) { + __extends(ChartPoint, _super); + function ChartPoint() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ChartPoint.prototype, "_className", { + get: function () { + return "ChartPoint"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartPoint.prototype, "format", { + get: function () { + if (!this._F) { + this._F=new Excel.ChartPointFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); + } + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartPoint.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this._V, _typeChartPoint, this._isNull); + return this._V; + }, + enumerable: true, + configurable: true + }); + ChartPoint.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Value"])) { + this._V=obj["Value"]; + } + _handleNavigationPropertyResults(this, obj, ["format", "Format"]); + }; + ChartPoint.prototype.load=function (option) { + return _load(this, option); + }; + ChartPoint.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ChartPoint.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartPoint.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ChartPoint.prototype.toJSON=function () { + return _toJson(this, { + "value": this._V, + }, { + "format": this._F, + }); + }; + ChartPoint.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return ChartPoint; + }(OfficeExtension.ClientObject)); + Excel.ChartPoint=ChartPoint; + var _typeChartPointFormat="ChartPointFormat"; + var ChartPointFormat=(function (_super) { + __extends(ChartPointFormat, _super); + function ChartPointFormat() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ChartPointFormat.prototype, "_className", { + get: function () { + return "ChartPointFormat"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartPointFormat.prototype, "fill", { + get: function () { + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); + } + return this._F; + }, + enumerable: true, + configurable: true + }); + ChartPointFormat.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + _handleNavigationPropertyResults(this, obj, ["fill", "Fill"]); + }; + ChartPointFormat.prototype.load=function (option) { + return _load(this, option); + }; + ChartPointFormat.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ChartPointFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartPointFormat.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ChartPointFormat.prototype.toJSON=function () { + return _toJson(this, {}, {}); + }; + return ChartPointFormat; + }(OfficeExtension.ClientObject)); + Excel.ChartPointFormat=ChartPointFormat; + var _typeChartAxes="ChartAxes"; + var ChartAxes=(function (_super) { + __extends(ChartAxes, _super); + function ChartAxes() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ChartAxes.prototype, "_className", { + get: function () { + return "ChartAxes"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxes.prototype, "categoryAxis", { + get: function () { + if (!this._C) { + this._C=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "CategoryAxis", false, false, false)); + } + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxes.prototype, "seriesAxis", { + get: function () { + if (!this._S) { + this._S=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "SeriesAxis", false, false, false)); + } + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxes.prototype, "valueAxis", { + get: function () { + if (!this._V) { + this._V=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "ValueAxis", false, false, false)); + } + return this._V; + }, + enumerable: true, + configurable: true + }); + ChartAxes.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, [], ["categoryAxis", "seriesAxis", "valueAxis"], []); + }; + ChartAxes.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + _handleNavigationPropertyResults(this, obj, ["categoryAxis", "CategoryAxis", "seriesAxis", "SeriesAxis", "valueAxis", "ValueAxis"]); + }; + ChartAxes.prototype.load=function (option) { + return _load(this, option); + }; + ChartAxes.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ChartAxes.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAxes.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ChartAxes.prototype.toJSON=function () { + return _toJson(this, {}, { + "categoryAxis": this._C, + "seriesAxis": this._S, + "valueAxis": this._V, + }); + }; + ChartAxes.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return ChartAxes; + }(OfficeExtension.ClientObject)); + Excel.ChartAxes=ChartAxes; + var _typeChartAxis="ChartAxis"; + var ChartAxis=(function (_super) { + __extends(ChartAxis, _super); + function ChartAxis() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ChartAxis.prototype, "_className", { + get: function () { + return "ChartAxis"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxis.prototype, "format", { + get: function () { + if (!this._F) { + this._F=new Excel.ChartAxisFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); + } + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxis.prototype, "majorGridlines", { + get: function () { + if (!this._M) { + this._M=new Excel.ChartGridlines(this.context, _createPropertyObjectPath(this.context, this, "MajorGridlines", false, false, false)); + } + return this._M; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxis.prototype, "minorGridlines", { + get: function () { + if (!this._Min) { + this._Min=new Excel.ChartGridlines(this.context, _createPropertyObjectPath(this.context, this, "MinorGridlines", false, false, false)); + } + return this._Min; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxis.prototype, "title", { + get: function () { + if (!this._T) { + this._T=new Excel.ChartAxisTitle(this.context, _createPropertyObjectPath(this.context, this, "Title", false, false, false)); + } + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxis.prototype, "majorUnit", { + get: function () { + _throwIfNotLoaded("majorUnit", this._Ma, _typeChartAxis, this._isNull); + return this._Ma; + }, + set: function (value) { + this._Ma=value; + _createSetPropertyAction(this.context, this, "MajorUnit", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxis.prototype, "maximum", { + get: function () { + _throwIfNotLoaded("maximum", this._Max, _typeChartAxis, this._isNull); + return this._Max; + }, + set: function (value) { + this._Max=value; + _createSetPropertyAction(this.context, this, "Maximum", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxis.prototype, "minimum", { + get: function () { + _throwIfNotLoaded("minimum", this._Mi, _typeChartAxis, this._isNull); + return this._Mi; + }, + set: function (value) { + this._Mi=value; + _createSetPropertyAction(this.context, this, "Minimum", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxis.prototype, "minorUnit", { + get: function () { + _throwIfNotLoaded("minorUnit", this._Mino, _typeChartAxis, this._isNull); + return this._Mino; + }, + set: function (value) { + this._Mino=value; + _createSetPropertyAction(this.context, this, "MinorUnit", value); + }, + enumerable: true, + configurable: true + }); + ChartAxis.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["majorUnit", "maximum", "minimum", "minorUnit"], ["majorGridlines", "minorGridlines", "title", "format"], []); + }; + ChartAxis.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["MajorUnit"])) { + this._Ma=obj["MajorUnit"]; + } + if (!_isUndefined(obj["Maximum"])) { + this._Max=obj["Maximum"]; + } + if (!_isUndefined(obj["Minimum"])) { + this._Mi=obj["Minimum"]; + } + if (!_isUndefined(obj["MinorUnit"])) { + this._Mino=obj["MinorUnit"]; + } + _handleNavigationPropertyResults(this, obj, ["format", "Format", "majorGridlines", "MajorGridlines", "minorGridlines", "MinorGridlines", "title", "Title"]); + }; + ChartAxis.prototype.load=function (option) { + return _load(this, option); + }; + ChartAxis.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ChartAxis.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAxis.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ChartAxis.prototype.toJSON=function () { + return _toJson(this, { + "majorUnit": this._Ma, + "maximum": this._Max, + "minimum": this._Mi, + "minorUnit": this._Mino, + }, { + "format": this._F, + "majorGridlines": this._M, + "minorGridlines": this._Min, + "title": this._T, + }); + }; + ChartAxis.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return ChartAxis; + }(OfficeExtension.ClientObject)); + Excel.ChartAxis=ChartAxis; + var _typeChartAxisFormat="ChartAxisFormat"; + var ChartAxisFormat=(function (_super) { + __extends(ChartAxisFormat, _super); + function ChartAxisFormat() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ChartAxisFormat.prototype, "_className", { + get: function () { + return "ChartAxisFormat"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxisFormat.prototype, "font", { + get: function () { + if (!this._F) { + this._F=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); + } + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxisFormat.prototype, "line", { + get: function () { + if (!this._L) { + this._L=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false, false)); + } + return this._L; + }, + enumerable: true, + configurable: true + }); + ChartAxisFormat.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, [], ["font", "line"], []); + }; + ChartAxisFormat.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + _handleNavigationPropertyResults(this, obj, ["font", "Font", "line", "Line"]); + }; + ChartAxisFormat.prototype.load=function (option) { + return _load(this, option); + }; + ChartAxisFormat.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ChartAxisFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAxisFormat.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ChartAxisFormat.prototype.toJSON=function () { + return _toJson(this, {}, { + "font": this._F, + "line": this._L, + }); + }; + ChartAxisFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return ChartAxisFormat; + }(OfficeExtension.ClientObject)); + Excel.ChartAxisFormat=ChartAxisFormat; + var _typeChartAxisTitle="ChartAxisTitle"; + var ChartAxisTitle=(function (_super) { + __extends(ChartAxisTitle, _super); + function ChartAxisTitle() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ChartAxisTitle.prototype, "_className", { + get: function () { + return "ChartAxisTitle"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxisTitle.prototype, "format", { + get: function () { + if (!this._F) { + this._F=new Excel.ChartAxisTitleFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); + } + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxisTitle.prototype, "text", { + get: function () { + _throwIfNotLoaded("text", this._T, _typeChartAxisTitle, this._isNull); + return this._T; + }, + set: function (value) { + this._T=value; + _createSetPropertyAction(this.context, this, "Text", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxisTitle.prototype, "visible", { + get: function () { + _throwIfNotLoaded("visible", this._V, _typeChartAxisTitle, this._isNull); + return this._V; + }, + set: function (value) { + this._V=value; + _createSetPropertyAction(this.context, this, "Visible", value); + }, + enumerable: true, + configurable: true + }); + ChartAxisTitle.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["text", "visible"], ["format"], []); + }; + ChartAxisTitle.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Text"])) { + this._T=obj["Text"]; + } + if (!_isUndefined(obj["Visible"])) { + this._V=obj["Visible"]; + } + _handleNavigationPropertyResults(this, obj, ["format", "Format"]); + }; + ChartAxisTitle.prototype.load=function (option) { + return _load(this, option); + }; + ChartAxisTitle.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ChartAxisTitle.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAxisTitle.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ChartAxisTitle.prototype.toJSON=function () { + return _toJson(this, { + "text": this._T, + "visible": this._V, + }, { + "format": this._F, + }); + }; + ChartAxisTitle.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return ChartAxisTitle; + }(OfficeExtension.ClientObject)); + Excel.ChartAxisTitle=ChartAxisTitle; + var _typeChartAxisTitleFormat="ChartAxisTitleFormat"; + var ChartAxisTitleFormat=(function (_super) { + __extends(ChartAxisTitleFormat, _super); + function ChartAxisTitleFormat() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ChartAxisTitleFormat.prototype, "_className", { + get: function () { + return "ChartAxisTitleFormat"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxisTitleFormat.prototype, "font", { + get: function () { + if (!this._F) { + this._F=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); + } + return this._F; + }, + enumerable: true, + configurable: true + }); + ChartAxisTitleFormat.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, [], ["font"], []); + }; + ChartAxisTitleFormat.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + _handleNavigationPropertyResults(this, obj, ["font", "Font"]); + }; + ChartAxisTitleFormat.prototype.load=function (option) { + return _load(this, option); + }; + ChartAxisTitleFormat.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ChartAxisTitleFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAxisTitleFormat.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ChartAxisTitleFormat.prototype.toJSON=function () { + return _toJson(this, {}, { + "font": this._F, + }); + }; + ChartAxisTitleFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return ChartAxisTitleFormat; + }(OfficeExtension.ClientObject)); + Excel.ChartAxisTitleFormat=ChartAxisTitleFormat; + var _typeChartDataLabels="ChartDataLabels"; + var ChartDataLabels=(function (_super) { + __extends(ChartDataLabels, _super); + function ChartDataLabels() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ChartDataLabels.prototype, "_className", { + get: function () { + return "ChartDataLabels"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartDataLabels.prototype, "format", { + get: function () { + if (!this._F) { + this._F=new Excel.ChartDataLabelFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); + } + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartDataLabels.prototype, "position", { + get: function () { + _throwIfNotLoaded("position", this._P, _typeChartDataLabels, this._isNull); + return this._P; + }, + set: function (value) { + this._P=value; + _createSetPropertyAction(this.context, this, "Position", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartDataLabels.prototype, "separator", { + get: function () { + _throwIfNotLoaded("separator", this._S, _typeChartDataLabels, this._isNull); + return this._S; + }, + set: function (value) { + this._S=value; + _createSetPropertyAction(this.context, this, "Separator", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartDataLabels.prototype, "showBubbleSize", { + get: function () { + _throwIfNotLoaded("showBubbleSize", this._Sh, _typeChartDataLabels, this._isNull); + return this._Sh; + }, + set: function (value) { + this._Sh=value; + _createSetPropertyAction(this.context, this, "ShowBubbleSize", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartDataLabels.prototype, "showCategoryName", { + get: function () { + _throwIfNotLoaded("showCategoryName", this._Sho, _typeChartDataLabels, this._isNull); + return this._Sho; + }, + set: function (value) { + this._Sho=value; + _createSetPropertyAction(this.context, this, "ShowCategoryName", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartDataLabels.prototype, "showLegendKey", { + get: function () { + _throwIfNotLoaded("showLegendKey", this._Show, _typeChartDataLabels, this._isNull); + return this._Show; + }, + set: function (value) { + this._Show=value; + _createSetPropertyAction(this.context, this, "ShowLegendKey", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartDataLabels.prototype, "showPercentage", { + get: function () { + _throwIfNotLoaded("showPercentage", this._ShowP, _typeChartDataLabels, this._isNull); + return this._ShowP; + }, + set: function (value) { + this._ShowP=value; + _createSetPropertyAction(this.context, this, "ShowPercentage", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartDataLabels.prototype, "showSeriesName", { + get: function () { + _throwIfNotLoaded("showSeriesName", this._ShowS, _typeChartDataLabels, this._isNull); + return this._ShowS; + }, + set: function (value) { + this._ShowS=value; + _createSetPropertyAction(this.context, this, "ShowSeriesName", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartDataLabels.prototype, "showValue", { + get: function () { + _throwIfNotLoaded("showValue", this._ShowV, _typeChartDataLabels, this._isNull); + return this._ShowV; + }, + set: function (value) { + this._ShowV=value; + _createSetPropertyAction(this.context, this, "ShowValue", value); + }, + enumerable: true, + configurable: true + }); + ChartDataLabels.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["position", "showValue", "showSeriesName", "showCategoryName", "showLegendKey", "showPercentage", "showBubbleSize", "separator"], ["format"], []); + }; + ChartDataLabels.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Position"])) { + this._P=obj["Position"]; + } + if (!_isUndefined(obj["Separator"])) { + this._S=obj["Separator"]; + } + if (!_isUndefined(obj["ShowBubbleSize"])) { + this._Sh=obj["ShowBubbleSize"]; + } + if (!_isUndefined(obj["ShowCategoryName"])) { + this._Sho=obj["ShowCategoryName"]; + } + if (!_isUndefined(obj["ShowLegendKey"])) { + this._Show=obj["ShowLegendKey"]; + } + if (!_isUndefined(obj["ShowPercentage"])) { + this._ShowP=obj["ShowPercentage"]; + } + if (!_isUndefined(obj["ShowSeriesName"])) { + this._ShowS=obj["ShowSeriesName"]; + } + if (!_isUndefined(obj["ShowValue"])) { + this._ShowV=obj["ShowValue"]; + } + _handleNavigationPropertyResults(this, obj, ["format", "Format"]); + }; + ChartDataLabels.prototype.load=function (option) { + return _load(this, option); + }; + ChartDataLabels.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ChartDataLabels.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartDataLabels.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ChartDataLabels.prototype.toJSON=function () { + return _toJson(this, { + "position": this._P, + "separator": this._S, + "showBubbleSize": this._Sh, + "showCategoryName": this._Sho, + "showLegendKey": this._Show, + "showPercentage": this._ShowP, + "showSeriesName": this._ShowS, + "showValue": this._ShowV, + }, { + "format": this._F, + }); + }; + ChartDataLabels.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return ChartDataLabels; + }(OfficeExtension.ClientObject)); + Excel.ChartDataLabels=ChartDataLabels; + var _typeChartDataLabelFormat="ChartDataLabelFormat"; + var ChartDataLabelFormat=(function (_super) { + __extends(ChartDataLabelFormat, _super); + function ChartDataLabelFormat() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ChartDataLabelFormat.prototype, "_className", { + get: function () { + return "ChartDataLabelFormat"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartDataLabelFormat.prototype, "fill", { + get: function () { + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); + } + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartDataLabelFormat.prototype, "font", { + get: function () { + if (!this._Fo) { + this._Fo=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); + } + return this._Fo; + }, + enumerable: true, + configurable: true + }); + ChartDataLabelFormat.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, [], ["font"], [ + "fill" + ]); + }; + ChartDataLabelFormat.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + _handleNavigationPropertyResults(this, obj, ["fill", "Fill", "font", "Font"]); + }; + ChartDataLabelFormat.prototype.load=function (option) { + return _load(this, option); + }; + ChartDataLabelFormat.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ChartDataLabelFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartDataLabelFormat.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ChartDataLabelFormat.prototype.toJSON=function () { + return _toJson(this, {}, { + "font": this._Fo, + }); + }; + ChartDataLabelFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return ChartDataLabelFormat; + }(OfficeExtension.ClientObject)); + Excel.ChartDataLabelFormat=ChartDataLabelFormat; + var _typeChartGridlines="ChartGridlines"; + var ChartGridlines=(function (_super) { + __extends(ChartGridlines, _super); + function ChartGridlines() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ChartGridlines.prototype, "_className", { + get: function () { + return "ChartGridlines"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartGridlines.prototype, "format", { + get: function () { + if (!this._F) { + this._F=new Excel.ChartGridlinesFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); + } + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartGridlines.prototype, "visible", { + get: function () { + _throwIfNotLoaded("visible", this._V, _typeChartGridlines, this._isNull); + return this._V; + }, + set: function (value) { + this._V=value; + _createSetPropertyAction(this.context, this, "Visible", value); + }, + enumerable: true, + configurable: true + }); + ChartGridlines.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["visible"], ["format"], []); + }; + ChartGridlines.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Visible"])) { + this._V=obj["Visible"]; + } + _handleNavigationPropertyResults(this, obj, ["format", "Format"]); + }; + ChartGridlines.prototype.load=function (option) { + return _load(this, option); + }; + ChartGridlines.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ChartGridlines.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartGridlines.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ChartGridlines.prototype.toJSON=function () { + return _toJson(this, { + "visible": this._V, + }, { + "format": this._F, + }); + }; + ChartGridlines.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return ChartGridlines; + }(OfficeExtension.ClientObject)); + Excel.ChartGridlines=ChartGridlines; + var _typeChartGridlinesFormat="ChartGridlinesFormat"; + var ChartGridlinesFormat=(function (_super) { + __extends(ChartGridlinesFormat, _super); + function ChartGridlinesFormat() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ChartGridlinesFormat.prototype, "_className", { + get: function () { + return "ChartGridlinesFormat"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartGridlinesFormat.prototype, "line", { + get: function () { + if (!this._L) { + this._L=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false, false)); + } + return this._L; + }, + enumerable: true, + configurable: true + }); + ChartGridlinesFormat.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, [], ["line"], []); + }; + ChartGridlinesFormat.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + _handleNavigationPropertyResults(this, obj, ["line", "Line"]); + }; + ChartGridlinesFormat.prototype.load=function (option) { + return _load(this, option); + }; + ChartGridlinesFormat.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ChartGridlinesFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartGridlinesFormat.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ChartGridlinesFormat.prototype.toJSON=function () { + return _toJson(this, {}, { + "line": this._L, + }); + }; + ChartGridlinesFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return ChartGridlinesFormat; + }(OfficeExtension.ClientObject)); + Excel.ChartGridlinesFormat=ChartGridlinesFormat; + var _typeChartLegend="ChartLegend"; + var ChartLegend=(function (_super) { + __extends(ChartLegend, _super); + function ChartLegend() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ChartLegend.prototype, "_className", { + get: function () { + return "ChartLegend"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartLegend.prototype, "format", { + get: function () { + if (!this._F) { + this._F=new Excel.ChartLegendFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); + } + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartLegend.prototype, "overlay", { + get: function () { + _throwIfNotLoaded("overlay", this._O, _typeChartLegend, this._isNull); + return this._O; + }, + set: function (value) { + this._O=value; + _createSetPropertyAction(this.context, this, "Overlay", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartLegend.prototype, "position", { + get: function () { + _throwIfNotLoaded("position", this._P, _typeChartLegend, this._isNull); + return this._P; + }, + set: function (value) { + this._P=value; + _createSetPropertyAction(this.context, this, "Position", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartLegend.prototype, "visible", { + get: function () { + _throwIfNotLoaded("visible", this._V, _typeChartLegend, this._isNull); + return this._V; + }, + set: function (value) { + this._V=value; + _createSetPropertyAction(this.context, this, "Visible", value); + }, + enumerable: true, + configurable: true + }); + ChartLegend.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["visible", "position", "overlay"], ["format"], []); + }; + ChartLegend.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Overlay"])) { + this._O=obj["Overlay"]; + } + if (!_isUndefined(obj["Position"])) { + this._P=obj["Position"]; + } + if (!_isUndefined(obj["Visible"])) { + this._V=obj["Visible"]; + } + _handleNavigationPropertyResults(this, obj, ["format", "Format"]); + }; + ChartLegend.prototype.load=function (option) { + return _load(this, option); + }; + ChartLegend.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ChartLegend.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartLegend.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ChartLegend.prototype.toJSON=function () { + return _toJson(this, { + "overlay": this._O, + "position": this._P, + "visible": this._V, + }, { + "format": this._F, + }); + }; + ChartLegend.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return ChartLegend; + }(OfficeExtension.ClientObject)); + Excel.ChartLegend=ChartLegend; + var _typeChartLegendFormat="ChartLegendFormat"; + var ChartLegendFormat=(function (_super) { + __extends(ChartLegendFormat, _super); + function ChartLegendFormat() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ChartLegendFormat.prototype, "_className", { + get: function () { + return "ChartLegendFormat"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartLegendFormat.prototype, "fill", { + get: function () { + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); + } + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartLegendFormat.prototype, "font", { + get: function () { + if (!this._Fo) { + this._Fo=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); + } + return this._Fo; + }, + enumerable: true, + configurable: true + }); + ChartLegendFormat.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, [], ["font"], [ + "fill" + ]); + }; + ChartLegendFormat.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + _handleNavigationPropertyResults(this, obj, ["fill", "Fill", "font", "Font"]); + }; + ChartLegendFormat.prototype.load=function (option) { + return _load(this, option); + }; + ChartLegendFormat.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ChartLegendFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartLegendFormat.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ChartLegendFormat.prototype.toJSON=function () { + return _toJson(this, {}, { + "font": this._Fo, + }); + }; + ChartLegendFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return ChartLegendFormat; + }(OfficeExtension.ClientObject)); + Excel.ChartLegendFormat=ChartLegendFormat; + var _typeChartTitle="ChartTitle"; + var ChartTitle=(function (_super) { + __extends(ChartTitle, _super); + function ChartTitle() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ChartTitle.prototype, "_className", { + get: function () { + return "ChartTitle"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartTitle.prototype, "format", { + get: function () { + if (!this._F) { + this._F=new Excel.ChartTitleFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); + } + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartTitle.prototype, "overlay", { + get: function () { + _throwIfNotLoaded("overlay", this._O, _typeChartTitle, this._isNull); + return this._O; + }, + set: function (value) { + this._O=value; + _createSetPropertyAction(this.context, this, "Overlay", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartTitle.prototype, "text", { + get: function () { + _throwIfNotLoaded("text", this._T, _typeChartTitle, this._isNull); + return this._T; + }, + set: function (value) { + this._T=value; + _createSetPropertyAction(this.context, this, "Text", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartTitle.prototype, "visible", { + get: function () { + _throwIfNotLoaded("visible", this._V, _typeChartTitle, this._isNull); + return this._V; + }, + set: function (value) { + this._V=value; + _createSetPropertyAction(this.context, this, "Visible", value); + }, + enumerable: true, + configurable: true + }); + ChartTitle.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["visible", "text", "overlay"], ["format"], []); + }; + ChartTitle.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Overlay"])) { + this._O=obj["Overlay"]; + } + if (!_isUndefined(obj["Text"])) { + this._T=obj["Text"]; + } + if (!_isUndefined(obj["Visible"])) { + this._V=obj["Visible"]; + } + _handleNavigationPropertyResults(this, obj, ["format", "Format"]); + }; + ChartTitle.prototype.load=function (option) { + return _load(this, option); + }; + ChartTitle.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ChartTitle.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartTitle.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ChartTitle.prototype.toJSON=function () { + return _toJson(this, { + "overlay": this._O, + "text": this._T, + "visible": this._V, + }, { + "format": this._F, + }); + }; + ChartTitle.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return ChartTitle; + }(OfficeExtension.ClientObject)); + Excel.ChartTitle=ChartTitle; + var _typeChartTitleFormat="ChartTitleFormat"; + var ChartTitleFormat=(function (_super) { + __extends(ChartTitleFormat, _super); + function ChartTitleFormat() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ChartTitleFormat.prototype, "_className", { + get: function () { + return "ChartTitleFormat"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartTitleFormat.prototype, "fill", { + get: function () { + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); + } + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartTitleFormat.prototype, "font", { + get: function () { + if (!this._Fo) { + this._Fo=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); + } + return this._Fo; + }, + enumerable: true, + configurable: true + }); + ChartTitleFormat.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, [], ["font"], [ + "fill" + ]); + }; + ChartTitleFormat.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + _handleNavigationPropertyResults(this, obj, ["fill", "Fill", "font", "Font"]); + }; + ChartTitleFormat.prototype.load=function (option) { + return _load(this, option); + }; + ChartTitleFormat.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ChartTitleFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartTitleFormat.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ChartTitleFormat.prototype.toJSON=function () { + return _toJson(this, {}, { + "font": this._Fo, + }); + }; + ChartTitleFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return ChartTitleFormat; + }(OfficeExtension.ClientObject)); + Excel.ChartTitleFormat=ChartTitleFormat; + var _typeChartFill="ChartFill"; + var ChartFill=(function (_super) { + __extends(ChartFill, _super); + function ChartFill() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ChartFill.prototype, "_className", { + get: function () { + return "ChartFill"; + }, + enumerable: true, + configurable: true + }); + ChartFill.prototype.load=function (option) { + _load(this, option); + return this; + }; + ChartFill.prototype.clear=function () { + _createMethodAction(this.context, this, "Clear", 0, [], false); + }; + ChartFill.prototype.setSolidColor=function (color) { + _createMethodAction(this.context, this, "SetSolidColor", 0, [color], false); + }; + ChartFill.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + ChartFill.prototype.toJSON=function () { + return _toJson(this, {}, {}); + }; + return ChartFill; + }(OfficeExtension.ClientObject)); + Excel.ChartFill=ChartFill; + var _typeChartLineFormat="ChartLineFormat"; + var ChartLineFormat=(function (_super) { + __extends(ChartLineFormat, _super); + function ChartLineFormat() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ChartLineFormat.prototype, "_className", { + get: function () { + return "ChartLineFormat"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartLineFormat.prototype, "color", { + get: function () { + _throwIfNotLoaded("color", this._C, _typeChartLineFormat, this._isNull); + return this._C; + }, + set: function (value) { + this._C=value; + _createSetPropertyAction(this.context, this, "Color", value); + }, + enumerable: true, + configurable: true + }); + ChartLineFormat.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["color"], [], []); + }; + ChartLineFormat.prototype.clear=function () { + _createMethodAction(this.context, this, "Clear", 0, [], false); + }; + ChartLineFormat.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Color"])) { + this._C=obj["Color"]; + } + }; + ChartLineFormat.prototype.load=function (option) { + return _load(this, option); + }; + ChartLineFormat.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ChartLineFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartLineFormat.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ChartLineFormat.prototype.toJSON=function () { + return _toJson(this, { + "color": this._C, + }, {}); + }; + ChartLineFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return ChartLineFormat; + }(OfficeExtension.ClientObject)); + Excel.ChartLineFormat=ChartLineFormat; + var _typeChartFont="ChartFont"; + var ChartFont=(function (_super) { + __extends(ChartFont, _super); + function ChartFont() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ChartFont.prototype, "_className", { + get: function () { + return "ChartFont"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartFont.prototype, "bold", { + get: function () { + _throwIfNotLoaded("bold", this._B, _typeChartFont, this._isNull); + return this._B; + }, + set: function (value) { + this._B=value; + _createSetPropertyAction(this.context, this, "Bold", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartFont.prototype, "color", { + get: function () { + _throwIfNotLoaded("color", this._C, _typeChartFont, this._isNull); + return this._C; + }, + set: function (value) { + this._C=value; + _createSetPropertyAction(this.context, this, "Color", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartFont.prototype, "italic", { + get: function () { + _throwIfNotLoaded("italic", this._I, _typeChartFont, this._isNull); + return this._I; + }, + set: function (value) { + this._I=value; + _createSetPropertyAction(this.context, this, "Italic", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartFont.prototype, "name", { + get: function () { + _throwIfNotLoaded("name", this._N, _typeChartFont, this._isNull); + return this._N; + }, + set: function (value) { + this._N=value; + _createSetPropertyAction(this.context, this, "Name", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartFont.prototype, "size", { + get: function () { + _throwIfNotLoaded("size", this._S, _typeChartFont, this._isNull); + return this._S; + }, + set: function (value) { + this._S=value; + _createSetPropertyAction(this.context, this, "Size", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartFont.prototype, "underline", { + get: function () { + _throwIfNotLoaded("underline", this._U, _typeChartFont, this._isNull); + return this._U; + }, + set: function (value) { + this._U=value; + _createSetPropertyAction(this.context, this, "Underline", value); + }, + enumerable: true, + configurable: true + }); + ChartFont.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["bold", "color", "italic", "name", "size", "underline"], [], []); + }; + ChartFont.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Bold"])) { + this._B=obj["Bold"]; + } + if (!_isUndefined(obj["Color"])) { + this._C=obj["Color"]; + } + if (!_isUndefined(obj["Italic"])) { + this._I=obj["Italic"]; + } + if (!_isUndefined(obj["Name"])) { + this._N=obj["Name"]; + } + if (!_isUndefined(obj["Size"])) { + this._S=obj["Size"]; + } + if (!_isUndefined(obj["Underline"])) { + this._U=obj["Underline"]; + } + }; + ChartFont.prototype.load=function (option) { + return _load(this, option); + }; + ChartFont.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ChartFont.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartFont.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ChartFont.prototype.toJSON=function () { + return _toJson(this, { + "bold": this._B, + "color": this._C, + "italic": this._I, + "name": this._N, + "size": this._S, + "underline": this._U, + }, {}); + }; + ChartFont.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return ChartFont; + }(OfficeExtension.ClientObject)); + Excel.ChartFont=ChartFont; + var _typeRangeSort="RangeSort"; + var RangeSort=(function (_super) { + __extends(RangeSort, _super); + function RangeSort() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(RangeSort.prototype, "_className", { + get: function () { + return "RangeSort"; + }, + enumerable: true, + configurable: true + }); + RangeSort.prototype.apply=function (fields, matchCase, hasHeaders, orientation, method) { + _createMethodAction(this.context, this, "Apply", 0, [fields, matchCase, hasHeaders, orientation, method], false); + }; + RangeSort.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + RangeSort.prototype.toJSON=function () { + return _toJson(this, {}, {}); + }; + return RangeSort; + }(OfficeExtension.ClientObject)); + Excel.RangeSort=RangeSort; + var _typeTableSort="TableSort"; + var TableSort=(function (_super) { + __extends(TableSort, _super); + function TableSort() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(TableSort.prototype, "_className", { + get: function () { + return "TableSort"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableSort.prototype, "fields", { + get: function () { + _throwIfNotLoaded("fields", this._F, _typeTableSort, this._isNull); + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableSort.prototype, "matchCase", { + get: function () { + _throwIfNotLoaded("matchCase", this._M, _typeTableSort, this._isNull); + return this._M; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableSort.prototype, "method", { + get: function () { + _throwIfNotLoaded("method", this._Me, _typeTableSort, this._isNull); + return this._Me; + }, + enumerable: true, + configurable: true + }); + TableSort.prototype.apply=function (fields, matchCase, method) { + _createMethodAction(this.context, this, "Apply", 0, [fields, matchCase, method], false); + }; + TableSort.prototype.clear=function () { + _createMethodAction(this.context, this, "Clear", 0, [], false); + }; + TableSort.prototype.reapply=function () { + _createMethodAction(this.context, this, "Reapply", 0, [], false); + }; + TableSort.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Fields"])) { + this._F=obj["Fields"]; + } + if (!_isUndefined(obj["MatchCase"])) { + this._M=obj["MatchCase"]; + } + if (!_isUndefined(obj["Method"])) { + this._Me=obj["Method"]; + } + }; + TableSort.prototype.load=function (option) { + return _load(this, option); + }; + TableSort.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TableSort.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableSort.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + TableSort.prototype.toJSON=function () { + return _toJson(this, { + "fields": this._F, + "matchCase": this._M, + "method": this._Me, + }, {}); + }; + TableSort.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return TableSort; + }(OfficeExtension.ClientObject)); + Excel.TableSort=TableSort; + var _typeFilter="Filter"; + var Filter=(function (_super) { + __extends(Filter, _super); + function Filter() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Filter.prototype, "_className", { + get: function () { + return "Filter"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Filter.prototype, "criteria", { + get: function () { + _throwIfNotLoaded("criteria", this._C, _typeFilter, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + Filter.prototype.apply=function (criteria) { + _createMethodAction(this.context, this, "Apply", 0, [criteria], false); + }; + Filter.prototype.applyBottomItemsFilter=function (count) { + _createMethodAction(this.context, this, "ApplyBottomItemsFilter", 0, [count], false); + }; + Filter.prototype.applyBottomPercentFilter=function (percent) { + _createMethodAction(this.context, this, "ApplyBottomPercentFilter", 0, [percent], false); + }; + Filter.prototype.applyCellColorFilter=function (color) { + _createMethodAction(this.context, this, "ApplyCellColorFilter", 0, [color], false); + }; + Filter.prototype.applyCustomFilter=function (criteria1, criteria2, oper) { + _createMethodAction(this.context, this, "ApplyCustomFilter", 0, [criteria1, criteria2, oper], false); + }; + Filter.prototype.applyDynamicFilter=function (criteria) { + _createMethodAction(this.context, this, "ApplyDynamicFilter", 0, [criteria], false); + }; + Filter.prototype.applyFontColorFilter=function (color) { + _createMethodAction(this.context, this, "ApplyFontColorFilter", 0, [color], false); + }; + Filter.prototype.applyIconFilter=function (icon) { + _createMethodAction(this.context, this, "ApplyIconFilter", 0, [icon], false); + }; + Filter.prototype.applyTopItemsFilter=function (count) { + _createMethodAction(this.context, this, "ApplyTopItemsFilter", 0, [count], false); + }; + Filter.prototype.applyTopPercentFilter=function (percent) { + _createMethodAction(this.context, this, "ApplyTopPercentFilter", 0, [percent], false); + }; + Filter.prototype.applyValuesFilter=function (values) { + _createMethodAction(this.context, this, "ApplyValuesFilter", 0, [values], false); + }; + Filter.prototype.clear=function () { + _createMethodAction(this.context, this, "Clear", 0, [], false); + }; + Filter.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Criteria"])) { + this._C=obj["Criteria"]; + } + }; + Filter.prototype.load=function (option) { + return _load(this, option); + }; + Filter.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Filter.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Filter.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + Filter.prototype.toJSON=function () { + return _toJson(this, { + "criteria": this._C, + }, {}); + }; + Filter.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return Filter; + }(OfficeExtension.ClientObject)); + Excel.Filter=Filter; + var _typeCustomXmlPartScopedCollection="CustomXmlPartScopedCollection"; + var CustomXmlPartScopedCollection=(function (_super) { + __extends(CustomXmlPartScopedCollection, _super); + function CustomXmlPartScopedCollection() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(CustomXmlPartScopedCollection.prototype, "_className", { + get: function () { + return "CustomXmlPartScopedCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CustomXmlPartScopedCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeCustomXmlPartScopedCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + CustomXmlPartScopedCollection.prototype.getCount=function () { + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + CustomXmlPartScopedCollection.prototype.getItem=function (id) { + return new Excel.CustomXmlPart(this.context, _createIndexerObjectPath(this.context, this, [id])); + }; + CustomXmlPartScopedCollection.prototype.getItemOrNullObject=function (id) { + return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null, false)); + }; + CustomXmlPartScopedCollection.prototype.getOnlyItem=function () { + return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetOnlyItem", 1, [], false, false, null, false)); + }; + CustomXmlPartScopedCollection.prototype.getOnlyItemOrNullObject=function () { + return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetOnlyItemOrNullObject", 1, [], false, false, null, false)); + }; + CustomXmlPartScopedCollection.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items=[]; + var _data=obj[OfficeExtension.Constants.items]; + for (var i=0; i < _data.length; i++) { + var _item=new Excel.CustomXmlPart(this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, this.context, this, _data[i], i)); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + CustomXmlPartScopedCollection.prototype.load=function (option) { + return _load(this, option); + }; + CustomXmlPartScopedCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + CustomXmlPartScopedCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CustomXmlPartScopedCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + CustomXmlPartScopedCollection.prototype.toJSON=function () { + return _toJson(this, {}, {}, this.m__items); + }; + return CustomXmlPartScopedCollection; + }(OfficeExtension.ClientObject)); + Excel.CustomXmlPartScopedCollection=CustomXmlPartScopedCollection; + var _typeCustomXmlPartCollection="CustomXmlPartCollection"; + var CustomXmlPartCollection=(function (_super) { + __extends(CustomXmlPartCollection, _super); + function CustomXmlPartCollection() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(CustomXmlPartCollection.prototype, "_className", { + get: function () { + return "CustomXmlPartCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CustomXmlPartCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeCustomXmlPartCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + CustomXmlPartCollection.prototype.add=function (xml) { + return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [xml], false, true, null, false)); + }; + CustomXmlPartCollection.prototype.getByNamespace=function (namespaceUri) { + return new Excel.CustomXmlPartScopedCollection(this.context, _createMethodObjectPath(this.context, this, "GetByNamespace", 1, [namespaceUri], true, false, null, false)); + }; + CustomXmlPartCollection.prototype.getCount=function () { + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + CustomXmlPartCollection.prototype.getItem=function (id) { + return new Excel.CustomXmlPart(this.context, _createIndexerObjectPath(this.context, this, [id])); + }; + CustomXmlPartCollection.prototype.getItemOrNullObject=function (id) { + return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null, false)); + }; + CustomXmlPartCollection.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items=[]; + var _data=obj[OfficeExtension.Constants.items]; + for (var i=0; i < _data.length; i++) { + var _item=new Excel.CustomXmlPart(this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, this.context, this, _data[i], i)); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + CustomXmlPartCollection.prototype.load=function (option) { + return _load(this, option); + }; + CustomXmlPartCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + CustomXmlPartCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CustomXmlPartCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + CustomXmlPartCollection.prototype.toJSON=function () { + return _toJson(this, {}, {}, this.m__items); + }; + return CustomXmlPartCollection; + }(OfficeExtension.ClientObject)); + Excel.CustomXmlPartCollection=CustomXmlPartCollection; + var _typeCustomXmlPart="CustomXmlPart"; + var CustomXmlPart=(function (_super) { + __extends(CustomXmlPart, _super); + function CustomXmlPart() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(CustomXmlPart.prototype, "_className", { + get: function () { + return "CustomXmlPart"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CustomXmlPart.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeCustomXmlPart, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CustomXmlPart.prototype, "namespaceUri", { + get: function () { + _throwIfNotLoaded("namespaceUri", this._N, _typeCustomXmlPart, this._isNull); + return this._N; + }, + enumerable: true, + configurable: true + }); + CustomXmlPart.prototype.delete=function () { + _createMethodAction(this.context, this, "Delete", 0, [], false); + }; + CustomXmlPart.prototype.getXml=function () { + var action=_createMethodAction(this.context, this, "GetXml", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + CustomXmlPart.prototype.setXml=function (xml) { + _createMethodAction(this.context, this, "SetXml", 0, [xml], false); + }; + CustomXmlPart.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I=obj["Id"]; + } + if (!_isUndefined(obj["NamespaceUri"])) { + this._N=obj["NamespaceUri"]; + } + }; + CustomXmlPart.prototype.load=function (option) { + return _load(this, option); + }; + CustomXmlPart.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + CustomXmlPart.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CustomXmlPart.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + CustomXmlPart.prototype._handleIdResult=function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I=value["Id"]; + } + }; + CustomXmlPart.prototype.toJSON=function () { + return _toJson(this, { + "id": this._I, + "namespaceUri": this._N, + }, {}); + }; + CustomXmlPart.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return CustomXmlPart; + }(OfficeExtension.ClientObject)); + Excel.CustomXmlPart=CustomXmlPart; + var _type_V1Api="_V1Api"; + var _V1Api=(function (_super) { + __extends(_V1Api, _super); + function _V1Api() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(_V1Api.prototype, "_className", { + get: function () { + return "_V1Api"; + }, + enumerable: true, + configurable: true + }); + _V1Api.prototype.bindingAddColumns=function (input) { + var action=_createMethodAction(this.context, this, "BindingAddColumns", 0, [input], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + _V1Api.prototype.bindingAddFromNamedItem=function (input) { + var action=_createMethodAction(this.context, this, "BindingAddFromNamedItem", 1, [input], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + _V1Api.prototype.bindingAddFromPrompt=function (input) { + var action=_createMethodAction(this.context, this, "BindingAddFromPrompt", 1, [input], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + _V1Api.prototype.bindingAddFromSelection=function (input) { + var action=_createMethodAction(this.context, this, "BindingAddFromSelection", 1, [input], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + _V1Api.prototype.bindingAddRows=function (input) { + var action=_createMethodAction(this.context, this, "BindingAddRows", 0, [input], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + _V1Api.prototype.bindingClearFormats=function (input) { + var action=_createMethodAction(this.context, this, "BindingClearFormats", 0, [input], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + _V1Api.prototype.bindingDeleteAllDataValues=function (input) { + var action=_createMethodAction(this.context, this, "BindingDeleteAllDataValues", 0, [input], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + _V1Api.prototype.bindingGetAll=function () { + var action=_createMethodAction(this.context, this, "BindingGetAll", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + _V1Api.prototype.bindingGetById=function (input) { + var action=_createMethodAction(this.context, this, "BindingGetById", 1, [input], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + _V1Api.prototype.bindingGetData=function (input) { + var action=_createMethodAction(this.context, this, "BindingGetData", 1, [input], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + _V1Api.prototype.bindingReleaseById=function (input) { + var action=_createMethodAction(this.context, this, "BindingReleaseById", 1, [input], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + _V1Api.prototype.bindingSetData=function (input) { + var action=_createMethodAction(this.context, this, "BindingSetData", 0, [input], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + _V1Api.prototype.bindingSetFormats=function (input) { + var action=_createMethodAction(this.context, this, "BindingSetFormats", 0, [input], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + _V1Api.prototype.bindingSetTableOptions=function (input) { + var action=_createMethodAction(this.context, this, "BindingSetTableOptions", 0, [input], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + _V1Api.prototype.getFilePropertiesAsync=function () { + _throwIfApiNotSupported("_V1Api.getFilePropertiesAsync", _defaultApiSetName, "1.6", _hostName); + var action=_createMethodAction(this.context, this, "GetFilePropertiesAsync", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + _V1Api.prototype.getSelectedData=function (input) { + var action=_createMethodAction(this.context, this, "GetSelectedData", 1, [input], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + _V1Api.prototype.gotoById=function (input) { + var action=_createMethodAction(this.context, this, "GotoById", 1, [input], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + _V1Api.prototype.setSelectedData=function (input) { + var action=_createMethodAction(this.context, this, "SetSelectedData", 0, [input], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + _V1Api.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + _V1Api.prototype.toJSON=function () { + return _toJson(this, {}, {}); + }; + return _V1Api; + }(OfficeExtension.ClientObject)); + Excel._V1Api=_V1Api; + var _typePivotTableCollection="PivotTableCollection"; + var PivotTableCollection=(function (_super) { + __extends(PivotTableCollection, _super); + function PivotTableCollection() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PivotTableCollection.prototype, "_className", { + get: function () { + return "PivotTableCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PivotTableCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typePivotTableCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + PivotTableCollection.prototype.getCount=function () { + _throwIfApiNotSupported("PivotTableCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + PivotTableCollection.prototype.getItem=function (name) { + return new Excel.PivotTable(this.context, _createIndexerObjectPath(this.context, this, [name])); + }; + PivotTableCollection.prototype.getItemOrNullObject=function (name) { + _throwIfApiNotSupported("PivotTableCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.PivotTable(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null, false)); + }; + PivotTableCollection.prototype.refreshAll=function () { + _createMethodAction(this.context, this, "RefreshAll", 0, [], false); + }; + PivotTableCollection.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items=[]; + var _data=obj[OfficeExtension.Constants.items]; + for (var i=0; i < _data.length; i++) { + var _item=new Excel.PivotTable(this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, this.context, this, _data[i], i)); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + PivotTableCollection.prototype.load=function (option) { + return _load(this, option); + }; + PivotTableCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + PivotTableCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + PivotTableCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + PivotTableCollection.prototype.toJSON=function () { + return _toJson(this, {}, {}, this.m__items); + }; + return PivotTableCollection; + }(OfficeExtension.ClientObject)); + Excel.PivotTableCollection=PivotTableCollection; + var _typePivotTable="PivotTable"; + var PivotTable=(function (_super) { + __extends(PivotTable, _super); + function PivotTable() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PivotTable.prototype, "_className", { + get: function () { + return "PivotTable"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PivotTable.prototype, "worksheet", { + get: function () { + if (!this._W) { + this._W=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false, false)); + } + return this._W; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PivotTable.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typePivotTable, this._isNull); + _throwIfApiNotSupported("PivotTable.id", _defaultApiSetName, "1.5", _hostName); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PivotTable.prototype, "name", { + get: function () { + _throwIfNotLoaded("name", this._N, _typePivotTable, this._isNull); + return this._N; + }, + set: function (value) { + this._N=value; + _createSetPropertyAction(this.context, this, "Name", value); + }, + enumerable: true, + configurable: true + }); + PivotTable.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["name"], [], [ + "worksheet" + ]); + }; + PivotTable.prototype.refresh=function () { + _createMethodAction(this.context, this, "Refresh", 0, [], false); + }; + PivotTable.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I=obj["Id"]; + } + if (!_isUndefined(obj["Name"])) { + this._N=obj["Name"]; + } + _handleNavigationPropertyResults(this, obj, ["worksheet", "Worksheet"]); + }; + PivotTable.prototype.load=function (option) { + return _load(this, option); + }; + PivotTable.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + PivotTable.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + PivotTable.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + PivotTable.prototype._handleIdResult=function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I=value["Id"]; + } + }; + PivotTable.prototype.toJSON=function () { + return _toJson(this, { + "id": this._I, + "name": this._N, + }, {}); + }; + PivotTable.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return PivotTable; + }(OfficeExtension.ClientObject)); + Excel.PivotTable=PivotTable; + var _typeConditionalFormatCollection="ConditionalFormatCollection"; + var ConditionalFormatCollection=(function (_super) { + __extends(ConditionalFormatCollection, _super); + function ConditionalFormatCollection() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ConditionalFormatCollection.prototype, "_className", { + get: function () { + return "ConditionalFormatCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormatCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeConditionalFormatCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + ConditionalFormatCollection.prototype.add=function (type) { + return new Excel.ConditionalFormat(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [type], false, true, null, false)); + }; + ConditionalFormatCollection.prototype.clearAll=function () { + _createMethodAction(this.context, this, "ClearAll", 0, [], false); + }; + ConditionalFormatCollection.prototype.getCount=function () { + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + ConditionalFormatCollection.prototype.getItem=function (id) { + return new Excel.ConditionalFormat(this.context, _createIndexerObjectPath(this.context, this, [id])); + }; + ConditionalFormatCollection.prototype.getItemAt=function (index) { + return new Excel.ConditionalFormat(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); + }; + ConditionalFormatCollection.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items=[]; + var _data=obj[OfficeExtension.Constants.items]; + for (var i=0; i < _data.length; i++) { + var _item=new Excel.ConditionalFormat(this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, this.context, this, _data[i], i)); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + ConditionalFormatCollection.prototype.load=function (option) { + return _load(this, option); + }; + ConditionalFormatCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ConditionalFormatCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalFormatCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ConditionalFormatCollection.prototype.toJSON=function () { + return _toJson(this, {}, {}, this.m__items); + }; + return ConditionalFormatCollection; + }(OfficeExtension.ClientObject)); + Excel.ConditionalFormatCollection=ConditionalFormatCollection; + var _typeConditionalFormat="ConditionalFormat"; + var ConditionalFormat=(function (_super) { + __extends(ConditionalFormat, _super); + function ConditionalFormat() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ConditionalFormat.prototype, "_className", { + get: function () { + return "ConditionalFormat"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "cellValue", { + get: function () { + if (!this._C) { + this._C=new Excel.CellValueConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CellValue", false, false, false)); + } + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "cellValueOrNullObject", { + get: function () { + if (!this._Ce) { + this._Ce=new Excel.CellValueConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CellValueOrNullObject", false, false, false)); + } + return this._Ce; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "colorScale", { + get: function () { + if (!this._Co) { + this._Co=new Excel.ColorScaleConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "ColorScale", false, false, false)); + } + return this._Co; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "colorScaleOrNullObject", { + get: function () { + if (!this._Col) { + this._Col=new Excel.ColorScaleConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "ColorScaleOrNullObject", false, false, false)); + } + return this._Col; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "custom", { + get: function () { + if (!this._Cu) { + this._Cu=new Excel.CustomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "Custom", false, false, false)); + } + return this._Cu; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "customOrNullObject", { + get: function () { + if (!this._Cus) { + this._Cus=new Excel.CustomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CustomOrNullObject", false, false, false)); + } + return this._Cus; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "dataBar", { + get: function () { + if (!this._D) { + this._D=new Excel.DataBarConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "DataBar", false, false, false)); + } + return this._D; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "dataBarOrNullObject", { + get: function () { + if (!this._Da) { + this._Da=new Excel.DataBarConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "DataBarOrNullObject", false, false, false)); + } + return this._Da; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "iconSet", { + get: function () { + if (!this._I) { + this._I=new Excel.IconSetConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "IconSet", false, false, false)); + } + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "iconSetOrNullObject", { + get: function () { + if (!this._Ic) { + this._Ic=new Excel.IconSetConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "IconSetOrNullObject", false, false, false)); + } + return this._Ic; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "preset", { + get: function () { + if (!this._P) { + this._P=new Excel.PresetCriteriaConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "Preset", false, false, false)); + } + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "presetOrNullObject", { + get: function () { + if (!this._Pr) { + this._Pr=new Excel.PresetCriteriaConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "PresetOrNullObject", false, false, false)); + } + return this._Pr; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "textComparison", { + get: function () { + if (!this._T) { + this._T=new Excel.TextConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TextComparison", false, false, false)); + } + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "textComparisonOrNullObject", { + get: function () { + if (!this._Te) { + this._Te=new Excel.TextConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TextComparisonOrNullObject", false, false, false)); + } + return this._Te; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "topBottom", { + get: function () { + if (!this._To) { + this._To=new Excel.TopBottomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TopBottom", false, false, false)); + } + return this._To; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "topBottomOrNullObject", { + get: function () { + if (!this._Top) { + this._Top=new Excel.TopBottomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TopBottomOrNullObject", false, false, false)); + } + return this._Top; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._Id0, _typeConditionalFormat, this._isNull); + return this._Id0; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "priority", { + get: function () { + _throwIfNotLoaded("priority", this._Pri, _typeConditionalFormat, this._isNull); + return this._Pri; + }, + set: function (value) { + this._Pri=value; + _createSetPropertyAction(this.context, this, "Priority", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "stopIfTrue", { + get: function () { + _throwIfNotLoaded("stopIfTrue", this._S, _typeConditionalFormat, this._isNull); + return this._S; + }, + set: function (value) { + this._S=value; + _createSetPropertyAction(this.context, this, "StopIfTrue", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "type", { + get: function () { + _throwIfNotLoaded("type", this._Ty, _typeConditionalFormat, this._isNull); + return this._Ty; + }, + enumerable: true, + configurable: true + }); + ConditionalFormat.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["stopIfTrue", "priority"], ["dataBarOrNullObject", "dataBar", "customOrNullObject", "custom", "iconSet", "iconSetOrNullObject", "colorScale", "colorScaleOrNullObject", "topBottom", "topBottomOrNullObject", "preset", "presetOrNullObject", "textComparison", "textComparisonOrNullObject", "cellValue", "cellValueOrNullObject"], []); + }; + ConditionalFormat.prototype.delete=function () { + _createMethodAction(this.context, this, "Delete", 0, [], false); + }; + ConditionalFormat.prototype.getRange=function () { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); + }; + ConditionalFormat.prototype.getRangeOrNullObject=function () { + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRangeOrNullObject", 1, [], false, true, null, false)); + }; + ConditionalFormat.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._Id0=obj["Id"]; + } + if (!_isUndefined(obj["Priority"])) { + this._Pri=obj["Priority"]; + } + if (!_isUndefined(obj["StopIfTrue"])) { + this._S=obj["StopIfTrue"]; + } + if (!_isUndefined(obj["Type"])) { + this._Ty=obj["Type"]; + } + _handleNavigationPropertyResults(this, obj, ["cellValue", "CellValue", "cellValueOrNullObject", "CellValueOrNullObject", "colorScale", "ColorScale", "colorScaleOrNullObject", "ColorScaleOrNullObject", "custom", "Custom", "customOrNullObject", "CustomOrNullObject", "dataBar", "DataBar", "dataBarOrNullObject", "DataBarOrNullObject", "iconSet", "IconSet", "iconSetOrNullObject", "IconSetOrNullObject", "preset", "Preset", "presetOrNullObject", "PresetOrNullObject", "textComparison", "TextComparison", "textComparisonOrNullObject", "TextComparisonOrNullObject", "topBottom", "TopBottom", "topBottomOrNullObject", "TopBottomOrNullObject"]); + }; + ConditionalFormat.prototype.load=function (option) { + return _load(this, option); + }; + ConditionalFormat.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalFormat.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ConditionalFormat.prototype._handleIdResult=function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._Id0=value["Id"]; + } + }; + ConditionalFormat.prototype.toJSON=function () { + return _toJson(this, { + "id": this._Id0, + "priority": this._Pri, + "stopIfTrue": this._S, + "type": this._Ty, + }, { + "cellValue": this._C, + "cellValueOrNullObject": this._Ce, + "colorScale": this._Co, + "colorScaleOrNullObject": this._Col, + "custom": this._Cu, + "customOrNullObject": this._Cus, + "dataBar": this._D, + "dataBarOrNullObject": this._Da, + "iconSet": this._I, + "iconSetOrNullObject": this._Ic, + "preset": this._P, + "presetOrNullObject": this._Pr, + "textComparison": this._T, + "textComparisonOrNullObject": this._Te, + "topBottom": this._To, + "topBottomOrNullObject": this._Top, + }); + }; + ConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return ConditionalFormat; + }(OfficeExtension.ClientObject)); + Excel.ConditionalFormat=ConditionalFormat; + var _typeDataBarConditionalFormat="DataBarConditionalFormat"; + var DataBarConditionalFormat=(function (_super) { + __extends(DataBarConditionalFormat, _super); + function DataBarConditionalFormat() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(DataBarConditionalFormat.prototype, "_className", { + get: function () { + return "DataBarConditionalFormat"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DataBarConditionalFormat.prototype, "negativeFormat", { + get: function () { + if (!this._N) { + this._N=new Excel.ConditionalDataBarNegativeFormat(this.context, _createPropertyObjectPath(this.context, this, "NegativeFormat", false, false, false)); + } + return this._N; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DataBarConditionalFormat.prototype, "positiveFormat", { + get: function () { + if (!this._P) { + this._P=new Excel.ConditionalDataBarPositiveFormat(this.context, _createPropertyObjectPath(this.context, this, "PositiveFormat", false, false, false)); + } + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DataBarConditionalFormat.prototype, "axisColor", { + get: function () { + _throwIfNotLoaded("axisColor", this._A, _typeDataBarConditionalFormat, this._isNull); + return this._A; + }, + set: function (value) { + this._A=value; + _createSetPropertyAction(this.context, this, "AxisColor", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DataBarConditionalFormat.prototype, "axisFormat", { + get: function () { + _throwIfNotLoaded("axisFormat", this._Ax, _typeDataBarConditionalFormat, this._isNull); + return this._Ax; + }, + set: function (value) { + this._Ax=value; + _createSetPropertyAction(this.context, this, "AxisFormat", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DataBarConditionalFormat.prototype, "barDirection", { + get: function () { + _throwIfNotLoaded("barDirection", this._B, _typeDataBarConditionalFormat, this._isNull); + return this._B; + }, + set: function (value) { + this._B=value; + _createSetPropertyAction(this.context, this, "BarDirection", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DataBarConditionalFormat.prototype, "lowerBoundRule", { + get: function () { + _throwIfNotLoaded("lowerBoundRule", this._L, _typeDataBarConditionalFormat, this._isNull); + return this._L; + }, + set: function (value) { + this._L=value; + _createSetPropertyAction(this.context, this, "LowerBoundRule", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DataBarConditionalFormat.prototype, "showDataBarOnly", { + get: function () { + _throwIfNotLoaded("showDataBarOnly", this._S, _typeDataBarConditionalFormat, this._isNull); + return this._S; + }, + set: function (value) { + this._S=value; + _createSetPropertyAction(this.context, this, "ShowDataBarOnly", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DataBarConditionalFormat.prototype, "upperBoundRule", { + get: function () { + _throwIfNotLoaded("upperBoundRule", this._U, _typeDataBarConditionalFormat, this._isNull); + return this._U; + }, + set: function (value) { + this._U=value; + _createSetPropertyAction(this.context, this, "UpperBoundRule", value); + }, + enumerable: true, + configurable: true + }); + DataBarConditionalFormat.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["showDataBarOnly", "barDirection", "axisFormat", "axisColor", "lowerBoundRule", "upperBoundRule"], ["positiveFormat", "negativeFormat"], []); + }; + DataBarConditionalFormat.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["AxisColor"])) { + this._A=obj["AxisColor"]; + } + if (!_isUndefined(obj["AxisFormat"])) { + this._Ax=obj["AxisFormat"]; + } + if (!_isUndefined(obj["BarDirection"])) { + this._B=obj["BarDirection"]; + } + if (!_isUndefined(obj["LowerBoundRule"])) { + this._L=obj["LowerBoundRule"]; + } + if (!_isUndefined(obj["ShowDataBarOnly"])) { + this._S=obj["ShowDataBarOnly"]; + } + if (!_isUndefined(obj["UpperBoundRule"])) { + this._U=obj["UpperBoundRule"]; + } + _handleNavigationPropertyResults(this, obj, ["negativeFormat", "NegativeFormat", "positiveFormat", "PositiveFormat"]); + }; + DataBarConditionalFormat.prototype.load=function (option) { + return _load(this, option); + }; + DataBarConditionalFormat.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + DataBarConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + DataBarConditionalFormat.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + DataBarConditionalFormat.prototype.toJSON=function () { + return _toJson(this, { + "axisColor": this._A, + "axisFormat": this._Ax, + "barDirection": this._B, + "lowerBoundRule": this._L, + "showDataBarOnly": this._S, + "upperBoundRule": this._U, + }, { + "negativeFormat": this._N, + "positiveFormat": this._P, + }); + }; + DataBarConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return DataBarConditionalFormat; + }(OfficeExtension.ClientObject)); + Excel.DataBarConditionalFormat=DataBarConditionalFormat; + var _typeConditionalDataBarPositiveFormat="ConditionalDataBarPositiveFormat"; + var ConditionalDataBarPositiveFormat=(function (_super) { + __extends(ConditionalDataBarPositiveFormat, _super); + function ConditionalDataBarPositiveFormat() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "_className", { + get: function () { + return "ConditionalDataBarPositiveFormat"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "borderColor", { + get: function () { + _throwIfNotLoaded("borderColor", this._B, _typeConditionalDataBarPositiveFormat, this._isNull); + return this._B; + }, + set: function (value) { + this._B=value; + _createSetPropertyAction(this.context, this, "BorderColor", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "fillColor", { + get: function () { + _throwIfNotLoaded("fillColor", this._F, _typeConditionalDataBarPositiveFormat, this._isNull); + return this._F; + }, + set: function (value) { + this._F=value; + _createSetPropertyAction(this.context, this, "FillColor", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "gradientFill", { + get: function () { + _throwIfNotLoaded("gradientFill", this._G, _typeConditionalDataBarPositiveFormat, this._isNull); + return this._G; + }, + set: function (value) { + this._G=value; + _createSetPropertyAction(this.context, this, "GradientFill", value); + }, + enumerable: true, + configurable: true + }); + ConditionalDataBarPositiveFormat.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["fillColor", "gradientFill", "borderColor"], [], []); + }; + ConditionalDataBarPositiveFormat.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["BorderColor"])) { + this._B=obj["BorderColor"]; + } + if (!_isUndefined(obj["FillColor"])) { + this._F=obj["FillColor"]; + } + if (!_isUndefined(obj["GradientFill"])) { + this._G=obj["GradientFill"]; + } + }; + ConditionalDataBarPositiveFormat.prototype.load=function (option) { + return _load(this, option); + }; + ConditionalDataBarPositiveFormat.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ConditionalDataBarPositiveFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalDataBarPositiveFormat.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ConditionalDataBarPositiveFormat.prototype.toJSON=function () { + return _toJson(this, { + "borderColor": this._B, + "fillColor": this._F, + "gradientFill": this._G, + }, {}); + }; + ConditionalDataBarPositiveFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return ConditionalDataBarPositiveFormat; + }(OfficeExtension.ClientObject)); + Excel.ConditionalDataBarPositiveFormat=ConditionalDataBarPositiveFormat; + var _typeConditionalDataBarNegativeFormat="ConditionalDataBarNegativeFormat"; + var ConditionalDataBarNegativeFormat=(function (_super) { + __extends(ConditionalDataBarNegativeFormat, _super); + function ConditionalDataBarNegativeFormat() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "_className", { + get: function () { + return "ConditionalDataBarNegativeFormat"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "borderColor", { + get: function () { + _throwIfNotLoaded("borderColor", this._B, _typeConditionalDataBarNegativeFormat, this._isNull); + return this._B; + }, + set: function (value) { + this._B=value; + _createSetPropertyAction(this.context, this, "BorderColor", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "fillColor", { + get: function () { + _throwIfNotLoaded("fillColor", this._F, _typeConditionalDataBarNegativeFormat, this._isNull); + return this._F; + }, + set: function (value) { + this._F=value; + _createSetPropertyAction(this.context, this, "FillColor", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "matchPositiveBorderColor", { + get: function () { + _throwIfNotLoaded("matchPositiveBorderColor", this._M, _typeConditionalDataBarNegativeFormat, this._isNull); + return this._M; + }, + set: function (value) { + this._M=value; + _createSetPropertyAction(this.context, this, "MatchPositiveBorderColor", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "matchPositiveFillColor", { + get: function () { + _throwIfNotLoaded("matchPositiveFillColor", this._Ma, _typeConditionalDataBarNegativeFormat, this._isNull); + return this._Ma; + }, + set: function (value) { + this._Ma=value; + _createSetPropertyAction(this.context, this, "MatchPositiveFillColor", value); + }, + enumerable: true, + configurable: true + }); + ConditionalDataBarNegativeFormat.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["fillColor", "matchPositiveFillColor", "borderColor", "matchPositiveBorderColor"], [], []); + }; + ConditionalDataBarNegativeFormat.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["BorderColor"])) { + this._B=obj["BorderColor"]; + } + if (!_isUndefined(obj["FillColor"])) { + this._F=obj["FillColor"]; + } + if (!_isUndefined(obj["MatchPositiveBorderColor"])) { + this._M=obj["MatchPositiveBorderColor"]; + } + if (!_isUndefined(obj["MatchPositiveFillColor"])) { + this._Ma=obj["MatchPositiveFillColor"]; + } + }; + ConditionalDataBarNegativeFormat.prototype.load=function (option) { + return _load(this, option); + }; + ConditionalDataBarNegativeFormat.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ConditionalDataBarNegativeFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalDataBarNegativeFormat.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ConditionalDataBarNegativeFormat.prototype.toJSON=function () { + return _toJson(this, { + "borderColor": this._B, + "fillColor": this._F, + "matchPositiveBorderColor": this._M, + "matchPositiveFillColor": this._Ma, + }, {}); + }; + ConditionalDataBarNegativeFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return ConditionalDataBarNegativeFormat; + }(OfficeExtension.ClientObject)); + Excel.ConditionalDataBarNegativeFormat=ConditionalDataBarNegativeFormat; + var _typeCustomConditionalFormat="CustomConditionalFormat"; + var CustomConditionalFormat=(function (_super) { + __extends(CustomConditionalFormat, _super); + function CustomConditionalFormat() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(CustomConditionalFormat.prototype, "_className", { + get: function () { + return "CustomConditionalFormat"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CustomConditionalFormat.prototype, "format", { + get: function () { + if (!this._F) { + this._F=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); + } + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CustomConditionalFormat.prototype, "rule", { + get: function () { + if (!this._R) { + this._R=new Excel.ConditionalFormatRule(this.context, _createPropertyObjectPath(this.context, this, "Rule", false, false, false)); + } + return this._R; + }, + enumerable: true, + configurable: true + }); + CustomConditionalFormat.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, [], ["rule", "format"], []); + }; + CustomConditionalFormat.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + _handleNavigationPropertyResults(this, obj, ["format", "Format", "rule", "Rule"]); + }; + CustomConditionalFormat.prototype.load=function (option) { + return _load(this, option); + }; + CustomConditionalFormat.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + CustomConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CustomConditionalFormat.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + CustomConditionalFormat.prototype.toJSON=function () { + return _toJson(this, {}, { + "format": this._F, + "rule": this._R, + }); + }; + CustomConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return CustomConditionalFormat; + }(OfficeExtension.ClientObject)); + Excel.CustomConditionalFormat=CustomConditionalFormat; + var _typeConditionalFormatRule="ConditionalFormatRule"; + var ConditionalFormatRule=(function (_super) { + __extends(ConditionalFormatRule, _super); + function ConditionalFormatRule() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ConditionalFormatRule.prototype, "_className", { + get: function () { + return "ConditionalFormatRule"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormatRule.prototype, "formula", { + get: function () { + _throwIfNotLoaded("formula", this._F, _typeConditionalFormatRule, this._isNull); + return this._F; + }, + set: function (value) { + this._F=value; + _createSetPropertyAction(this.context, this, "Formula", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormatRule.prototype, "formulaLocal", { + get: function () { + _throwIfNotLoaded("formulaLocal", this._Fo, _typeConditionalFormatRule, this._isNull); + return this._Fo; + }, + set: function (value) { + this._Fo=value; + _createSetPropertyAction(this.context, this, "FormulaLocal", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormatRule.prototype, "formulaR1C1", { + get: function () { + _throwIfNotLoaded("formulaR1C1", this._For, _typeConditionalFormatRule, this._isNull); + return this._For; + }, + set: function (value) { + this._For=value; + _createSetPropertyAction(this.context, this, "FormulaR1C1", value); + }, + enumerable: true, + configurable: true + }); + ConditionalFormatRule.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["formula", "formulaLocal", "formulaR1C1"], [], []); + }; + ConditionalFormatRule.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Formula"])) { + this._F=obj["Formula"]; + } + if (!_isUndefined(obj["FormulaLocal"])) { + this._Fo=obj["FormulaLocal"]; + } + if (!_isUndefined(obj["FormulaR1C1"])) { + this._For=obj["FormulaR1C1"]; + } + }; + ConditionalFormatRule.prototype.load=function (option) { + return _load(this, option); + }; + ConditionalFormatRule.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ConditionalFormatRule.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalFormatRule.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ConditionalFormatRule.prototype.toJSON=function () { + return _toJson(this, { + "formula": this._F, + "formulaLocal": this._Fo, + "formulaR1C1": this._For, + }, {}); + }; + ConditionalFormatRule.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return ConditionalFormatRule; + }(OfficeExtension.ClientObject)); + Excel.ConditionalFormatRule=ConditionalFormatRule; + var _typeIconSetConditionalFormat="IconSetConditionalFormat"; + var IconSetConditionalFormat=(function (_super) { + __extends(IconSetConditionalFormat, _super); + function IconSetConditionalFormat() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(IconSetConditionalFormat.prototype, "_className", { + get: function () { + return "IconSetConditionalFormat"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(IconSetConditionalFormat.prototype, "criteria", { + get: function () { + _throwIfNotLoaded("criteria", this._C, _typeIconSetConditionalFormat, this._isNull); + return this._C; + }, + set: function (value) { + this._C=value; + _createSetPropertyAction(this.context, this, "Criteria", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(IconSetConditionalFormat.prototype, "reverseIconOrder", { + get: function () { + _throwIfNotLoaded("reverseIconOrder", this._R, _typeIconSetConditionalFormat, this._isNull); + return this._R; + }, + set: function (value) { + this._R=value; + _createSetPropertyAction(this.context, this, "ReverseIconOrder", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(IconSetConditionalFormat.prototype, "showIconOnly", { + get: function () { + _throwIfNotLoaded("showIconOnly", this._S, _typeIconSetConditionalFormat, this._isNull); + return this._S; + }, + set: function (value) { + this._S=value; + _createSetPropertyAction(this.context, this, "ShowIconOnly", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(IconSetConditionalFormat.prototype, "style", { + get: function () { + _throwIfNotLoaded("style", this._St, _typeIconSetConditionalFormat, this._isNull); + return this._St; + }, + set: function (value) { + this._St=value; + _createSetPropertyAction(this.context, this, "Style", value); + }, + enumerable: true, + configurable: true + }); + IconSetConditionalFormat.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["reverseIconOrder", "showIconOnly", "style", "criteria"], [], []); + }; + IconSetConditionalFormat.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Criteria"])) { + this._C=obj["Criteria"]; + } + if (!_isUndefined(obj["ReverseIconOrder"])) { + this._R=obj["ReverseIconOrder"]; + } + if (!_isUndefined(obj["ShowIconOnly"])) { + this._S=obj["ShowIconOnly"]; + } + if (!_isUndefined(obj["Style"])) { + this._St=obj["Style"]; + } + }; + IconSetConditionalFormat.prototype.load=function (option) { + return _load(this, option); + }; + IconSetConditionalFormat.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + IconSetConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + IconSetConditionalFormat.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + IconSetConditionalFormat.prototype.toJSON=function () { + return _toJson(this, { + "criteria": this._C, + "reverseIconOrder": this._R, + "showIconOnly": this._S, + "style": this._St, + }, {}); + }; + IconSetConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return IconSetConditionalFormat; + }(OfficeExtension.ClientObject)); + Excel.IconSetConditionalFormat=IconSetConditionalFormat; + var _typeColorScaleConditionalFormat="ColorScaleConditionalFormat"; + var ColorScaleConditionalFormat=(function (_super) { + __extends(ColorScaleConditionalFormat, _super); + function ColorScaleConditionalFormat() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ColorScaleConditionalFormat.prototype, "_className", { + get: function () { + return "ColorScaleConditionalFormat"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ColorScaleConditionalFormat.prototype, "criteria", { + get: function () { + _throwIfNotLoaded("criteria", this._C, _typeColorScaleConditionalFormat, this._isNull); + return this._C; + }, + set: function (value) { + this._C=value; + _createSetPropertyAction(this.context, this, "Criteria", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ColorScaleConditionalFormat.prototype, "threeColorScale", { + get: function () { + _throwIfNotLoaded("threeColorScale", this._T, _typeColorScaleConditionalFormat, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + ColorScaleConditionalFormat.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["criteria"], [], []); + }; + ColorScaleConditionalFormat.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Criteria"])) { + this._C=obj["Criteria"]; + } + if (!_isUndefined(obj["ThreeColorScale"])) { + this._T=obj["ThreeColorScale"]; + } + }; + ColorScaleConditionalFormat.prototype.load=function (option) { + return _load(this, option); + }; + ColorScaleConditionalFormat.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ColorScaleConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ColorScaleConditionalFormat.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ColorScaleConditionalFormat.prototype.toJSON=function () { + return _toJson(this, { + "criteria": this._C, + "threeColorScale": this._T, + }, {}); + }; + ColorScaleConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return ColorScaleConditionalFormat; + }(OfficeExtension.ClientObject)); + Excel.ColorScaleConditionalFormat=ColorScaleConditionalFormat; + var _typeTopBottomConditionalFormat="TopBottomConditionalFormat"; + var TopBottomConditionalFormat=(function (_super) { + __extends(TopBottomConditionalFormat, _super); + function TopBottomConditionalFormat() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(TopBottomConditionalFormat.prototype, "_className", { + get: function () { + return "TopBottomConditionalFormat"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TopBottomConditionalFormat.prototype, "format", { + get: function () { + if (!this._F) { + this._F=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); + } + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TopBottomConditionalFormat.prototype, "rule", { + get: function () { + _throwIfNotLoaded("rule", this._R, _typeTopBottomConditionalFormat, this._isNull); + return this._R; + }, + set: function (value) { + this._R=value; + _createSetPropertyAction(this.context, this, "Rule", value); + }, + enumerable: true, + configurable: true + }); + TopBottomConditionalFormat.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["rule"], ["format"], []); + }; + TopBottomConditionalFormat.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Rule"])) { + this._R=obj["Rule"]; + } + _handleNavigationPropertyResults(this, obj, ["format", "Format"]); + }; + TopBottomConditionalFormat.prototype.load=function (option) { + return _load(this, option); + }; + TopBottomConditionalFormat.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TopBottomConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TopBottomConditionalFormat.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + TopBottomConditionalFormat.prototype.toJSON=function () { + return _toJson(this, { + "rule": this._R, + }, { + "format": this._F, + }); + }; + TopBottomConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return TopBottomConditionalFormat; + }(OfficeExtension.ClientObject)); + Excel.TopBottomConditionalFormat=TopBottomConditionalFormat; + var _typePresetCriteriaConditionalFormat="PresetCriteriaConditionalFormat"; + var PresetCriteriaConditionalFormat=(function (_super) { + __extends(PresetCriteriaConditionalFormat, _super); + function PresetCriteriaConditionalFormat() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "_className", { + get: function () { + return "PresetCriteriaConditionalFormat"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "format", { + get: function () { + if (!this._F) { + this._F=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); + } + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "rule", { + get: function () { + _throwIfNotLoaded("rule", this._R, _typePresetCriteriaConditionalFormat, this._isNull); + return this._R; + }, + set: function (value) { + this._R=value; + _createSetPropertyAction(this.context, this, "Rule", value); + }, + enumerable: true, + configurable: true + }); + PresetCriteriaConditionalFormat.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["rule"], ["format"], []); + }; + PresetCriteriaConditionalFormat.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Rule"])) { + this._R=obj["Rule"]; + } + _handleNavigationPropertyResults(this, obj, ["format", "Format"]); + }; + PresetCriteriaConditionalFormat.prototype.load=function (option) { + return _load(this, option); + }; + PresetCriteriaConditionalFormat.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + PresetCriteriaConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + PresetCriteriaConditionalFormat.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + PresetCriteriaConditionalFormat.prototype.toJSON=function () { + return _toJson(this, { + "rule": this._R, + }, { + "format": this._F, + }); + }; + PresetCriteriaConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return PresetCriteriaConditionalFormat; + }(OfficeExtension.ClientObject)); + Excel.PresetCriteriaConditionalFormat=PresetCriteriaConditionalFormat; + var _typeTextConditionalFormat="TextConditionalFormat"; + var TextConditionalFormat=(function (_super) { + __extends(TextConditionalFormat, _super); + function TextConditionalFormat() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(TextConditionalFormat.prototype, "_className", { + get: function () { + return "TextConditionalFormat"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TextConditionalFormat.prototype, "format", { + get: function () { + if (!this._F) { + this._F=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); + } + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TextConditionalFormat.prototype, "rule", { + get: function () { + _throwIfNotLoaded("rule", this._R, _typeTextConditionalFormat, this._isNull); + return this._R; + }, + set: function (value) { + this._R=value; + _createSetPropertyAction(this.context, this, "Rule", value); + }, + enumerable: true, + configurable: true + }); + TextConditionalFormat.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["rule"], ["format"], []); + }; + TextConditionalFormat.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Rule"])) { + this._R=obj["Rule"]; + } + _handleNavigationPropertyResults(this, obj, ["format", "Format"]); + }; + TextConditionalFormat.prototype.load=function (option) { + return _load(this, option); + }; + TextConditionalFormat.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TextConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TextConditionalFormat.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + TextConditionalFormat.prototype.toJSON=function () { + return _toJson(this, { + "rule": this._R, + }, { + "format": this._F, + }); + }; + TextConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return TextConditionalFormat; + }(OfficeExtension.ClientObject)); + Excel.TextConditionalFormat=TextConditionalFormat; + var _typeCellValueConditionalFormat="CellValueConditionalFormat"; + var CellValueConditionalFormat=(function (_super) { + __extends(CellValueConditionalFormat, _super); + function CellValueConditionalFormat() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(CellValueConditionalFormat.prototype, "_className", { + get: function () { + return "CellValueConditionalFormat"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CellValueConditionalFormat.prototype, "format", { + get: function () { + if (!this._F) { + this._F=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); + } + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CellValueConditionalFormat.prototype, "rule", { + get: function () { + _throwIfNotLoaded("rule", this._R, _typeCellValueConditionalFormat, this._isNull); + return this._R; + }, + set: function (value) { + this._R=value; + _createSetPropertyAction(this.context, this, "Rule", value); + }, + enumerable: true, + configurable: true + }); + CellValueConditionalFormat.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["rule"], ["format"], []); + }; + CellValueConditionalFormat.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Rule"])) { + this._R=obj["Rule"]; + } + _handleNavigationPropertyResults(this, obj, ["format", "Format"]); + }; + CellValueConditionalFormat.prototype.load=function (option) { + return _load(this, option); + }; + CellValueConditionalFormat.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + CellValueConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CellValueConditionalFormat.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + CellValueConditionalFormat.prototype.toJSON=function () { + return _toJson(this, { + "rule": this._R, + }, { + "format": this._F, + }); + }; + CellValueConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return CellValueConditionalFormat; + }(OfficeExtension.ClientObject)); + Excel.CellValueConditionalFormat=CellValueConditionalFormat; + var _typeConditionalRangeFormat="ConditionalRangeFormat"; + var ConditionalRangeFormat=(function (_super) { + __extends(ConditionalRangeFormat, _super); + function ConditionalRangeFormat() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ConditionalRangeFormat.prototype, "_className", { + get: function () { + return "ConditionalRangeFormat"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeFormat.prototype, "borders", { + get: function () { + if (!this._B) { + this._B=new Excel.ConditionalRangeBorderCollection(this.context, _createPropertyObjectPath(this.context, this, "Borders", true, false, false)); + } + return this._B; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeFormat.prototype, "fill", { + get: function () { + if (!this._F) { + this._F=new Excel.ConditionalRangeFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); + } + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeFormat.prototype, "font", { + get: function () { + if (!this._Fo) { + this._Fo=new Excel.ConditionalRangeFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); + } + return this._Fo; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeFormat.prototype, "numberFormat", { + get: function () { + _throwIfNotLoaded("numberFormat", this._N, _typeConditionalRangeFormat, this._isNull); + return this._N; + }, + set: function (value) { + this._N=value; + _createSetPropertyAction(this.context, this, "NumberFormat", value); + }, + enumerable: true, + configurable: true + }); + ConditionalRangeFormat.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["numberFormat"], ["fill", "font"], [ + "borders" + ]); + }; + ConditionalRangeFormat.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["NumberFormat"])) { + this._N=obj["NumberFormat"]; + } + _handleNavigationPropertyResults(this, obj, ["borders", "Borders", "fill", "Fill", "font", "Font"]); + }; + ConditionalRangeFormat.prototype.load=function (option) { + return _load(this, option); + }; + ConditionalRangeFormat.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ConditionalRangeFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalRangeFormat.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ConditionalRangeFormat.prototype.toJSON=function () { + return _toJson(this, { + "numberFormat": this._N, + }, { + "borders": this._B, + "fill": this._F, + "font": this._Fo, + }); + }; + ConditionalRangeFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return ConditionalRangeFormat; + }(OfficeExtension.ClientObject)); + Excel.ConditionalRangeFormat=ConditionalRangeFormat; + var _typeConditionalRangeFont="ConditionalRangeFont"; + var ConditionalRangeFont=(function (_super) { + __extends(ConditionalRangeFont, _super); + function ConditionalRangeFont() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ConditionalRangeFont.prototype, "_className", { + get: function () { + return "ConditionalRangeFont"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeFont.prototype, "bold", { + get: function () { + _throwIfNotLoaded("bold", this._B, _typeConditionalRangeFont, this._isNull); + return this._B; + }, + set: function (value) { + this._B=value; + _createSetPropertyAction(this.context, this, "Bold", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeFont.prototype, "color", { + get: function () { + _throwIfNotLoaded("color", this._C, _typeConditionalRangeFont, this._isNull); + return this._C; + }, + set: function (value) { + this._C=value; + _createSetPropertyAction(this.context, this, "Color", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeFont.prototype, "italic", { + get: function () { + _throwIfNotLoaded("italic", this._I, _typeConditionalRangeFont, this._isNull); + return this._I; + }, + set: function (value) { + this._I=value; + _createSetPropertyAction(this.context, this, "Italic", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeFont.prototype, "strikethrough", { + get: function () { + _throwIfNotLoaded("strikethrough", this._S, _typeConditionalRangeFont, this._isNull); + return this._S; + }, + set: function (value) { + this._S=value; + _createSetPropertyAction(this.context, this, "Strikethrough", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeFont.prototype, "underline", { + get: function () { + _throwIfNotLoaded("underline", this._U, _typeConditionalRangeFont, this._isNull); + return this._U; + }, + set: function (value) { + this._U=value; + _createSetPropertyAction(this.context, this, "Underline", value); + }, + enumerable: true, + configurable: true + }); + ConditionalRangeFont.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["color", "italic", "bold", "underline", "strikethrough"], [], []); + }; + ConditionalRangeFont.prototype.clear=function () { + _createMethodAction(this.context, this, "Clear", 0, [], false); + }; + ConditionalRangeFont.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Bold"])) { + this._B=obj["Bold"]; + } + if (!_isUndefined(obj["Color"])) { + this._C=obj["Color"]; + } + if (!_isUndefined(obj["Italic"])) { + this._I=obj["Italic"]; + } + if (!_isUndefined(obj["Strikethrough"])) { + this._S=obj["Strikethrough"]; + } + if (!_isUndefined(obj["Underline"])) { + this._U=obj["Underline"]; + } + }; + ConditionalRangeFont.prototype.load=function (option) { + return _load(this, option); + }; + ConditionalRangeFont.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ConditionalRangeFont.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalRangeFont.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ConditionalRangeFont.prototype.toJSON=function () { + return _toJson(this, { + "bold": this._B, + "color": this._C, + "italic": this._I, + "strikethrough": this._S, + "underline": this._U, + }, {}); + }; + ConditionalRangeFont.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return ConditionalRangeFont; + }(OfficeExtension.ClientObject)); + Excel.ConditionalRangeFont=ConditionalRangeFont; + var _typeConditionalRangeFill="ConditionalRangeFill"; + var ConditionalRangeFill=(function (_super) { + __extends(ConditionalRangeFill, _super); + function ConditionalRangeFill() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ConditionalRangeFill.prototype, "_className", { + get: function () { + return "ConditionalRangeFill"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeFill.prototype, "color", { + get: function () { + _throwIfNotLoaded("color", this._C, _typeConditionalRangeFill, this._isNull); + return this._C; + }, + set: function (value) { + this._C=value; + _createSetPropertyAction(this.context, this, "Color", value); + }, + enumerable: true, + configurable: true + }); + ConditionalRangeFill.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["color"], [], []); + }; + ConditionalRangeFill.prototype.clear=function () { + _createMethodAction(this.context, this, "Clear", 0, [], false); + }; + ConditionalRangeFill.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Color"])) { + this._C=obj["Color"]; + } + }; + ConditionalRangeFill.prototype.load=function (option) { + return _load(this, option); + }; + ConditionalRangeFill.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ConditionalRangeFill.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalRangeFill.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ConditionalRangeFill.prototype.toJSON=function () { + return _toJson(this, { + "color": this._C, + }, {}); + }; + ConditionalRangeFill.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return ConditionalRangeFill; + }(OfficeExtension.ClientObject)); + Excel.ConditionalRangeFill=ConditionalRangeFill; + var _typeConditionalRangeBorder="ConditionalRangeBorder"; + var ConditionalRangeBorder=(function (_super) { + __extends(ConditionalRangeBorder, _super); + function ConditionalRangeBorder() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ConditionalRangeBorder.prototype, "_className", { + get: function () { + return "ConditionalRangeBorder"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeBorder.prototype, "color", { + get: function () { + _throwIfNotLoaded("color", this._C, _typeConditionalRangeBorder, this._isNull); + return this._C; + }, + set: function (value) { + this._C=value; + _createSetPropertyAction(this.context, this, "Color", value); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeBorder.prototype, "sideIndex", { + get: function () { + _throwIfNotLoaded("sideIndex", this._S, _typeConditionalRangeBorder, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeBorder.prototype, "style", { + get: function () { + _throwIfNotLoaded("style", this._St, _typeConditionalRangeBorder, this._isNull); + return this._St; + }, + set: function (value) { + this._St=value; + _createSetPropertyAction(this.context, this, "Style", value); + }, + enumerable: true, + configurable: true + }); + ConditionalRangeBorder.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, ["style", "color"], [], []); + }; + ConditionalRangeBorder.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Color"])) { + this._C=obj["Color"]; + } + if (!_isUndefined(obj["SideIndex"])) { + this._S=obj["SideIndex"]; + } + if (!_isUndefined(obj["Style"])) { + this._St=obj["Style"]; + } + }; + ConditionalRangeBorder.prototype.load=function (option) { + return _load(this, option); + }; + ConditionalRangeBorder.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ConditionalRangeBorder.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalRangeBorder.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ConditionalRangeBorder.prototype.toJSON=function () { + return _toJson(this, { + "color": this._C, + "sideIndex": this._S, + "style": this._St, + }, {}); + }; + ConditionalRangeBorder.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return ConditionalRangeBorder; + }(OfficeExtension.ClientObject)); + Excel.ConditionalRangeBorder=ConditionalRangeBorder; + var _typeConditionalRangeBorderCollection="ConditionalRangeBorderCollection"; + var ConditionalRangeBorderCollection=(function (_super) { + __extends(ConditionalRangeBorderCollection, _super); + function ConditionalRangeBorderCollection() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(ConditionalRangeBorderCollection.prototype, "_className", { + get: function () { + return "ConditionalRangeBorderCollection"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeBorderCollection.prototype, "bottom", { + get: function () { + if (!this._B) { + this._B=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Bottom", false, false, false)); + } + return this._B; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeBorderCollection.prototype, "left", { + get: function () { + if (!this._L) { + this._L=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Left", false, false, false)); + } + return this._L; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeBorderCollection.prototype, "right", { + get: function () { + if (!this._R) { + this._R=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Right", false, false, false)); + } + return this._R; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeBorderCollection.prototype, "top", { + get: function () { + if (!this._T) { + this._T=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Top", false, false, false)); + } + return this._T; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeBorderCollection.prototype, "items", { + get: function () { + _throwIfNotLoaded("items", this.m__items, _typeConditionalRangeBorderCollection, this._isNull); + return this.m__items; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeBorderCollection.prototype, "count", { + get: function () { + _throwIfNotLoaded("count", this._C, _typeConditionalRangeBorderCollection, this._isNull); + return this._C; + }, + enumerable: true, + configurable: true + }); + ConditionalRangeBorderCollection.prototype.getItem=function (index) { + return new Excel.ConditionalRangeBorder(this.context, _createIndexerObjectPath(this.context, this, [index])); + }; + ConditionalRangeBorderCollection.prototype.getItemAt=function (index) { + return new Excel.ConditionalRangeBorder(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); + }; + ConditionalRangeBorderCollection.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Count"])) { + this._C=obj["Count"]; + } + _handleNavigationPropertyResults(this, obj, ["bottom", "Bottom", "left", "Left", "right", "Right", "top", "Top"]); + if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { + this.m__items=[]; + var _data=obj[OfficeExtension.Constants.items]; + for (var i=0; i < _data.length; i++) { + var _item=new Excel.ConditionalRangeBorder(this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, this.context, this, _data[i], i)); + _item._handleResult(_data[i]); + this.m__items.push(_item); + } + } + }; + ConditionalRangeBorderCollection.prototype.load=function (option) { + return _load(this, option); + }; + ConditionalRangeBorderCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ConditionalRangeBorderCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalRangeBorderCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + ConditionalRangeBorderCollection.prototype.toJSON=function () { + return _toJson(this, { + "count": this._C, + }, { + "bottom": this._B, + "left": this._L, + "right": this._R, + "top": this._T, + }, this.m__items); + }; + return ConditionalRangeBorderCollection; + }(OfficeExtension.ClientObject)); + Excel.ConditionalRangeBorderCollection=ConditionalRangeBorderCollection; + var _typeInternalTest="InternalTest"; + var InternalTest=(function (_super) { + __extends(InternalTest, _super); + function InternalTest() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(InternalTest.prototype, "_className", { + get: function () { + return "InternalTest"; + }, + enumerable: true, + configurable: true + }); + InternalTest.prototype.delay=function (seconds) { + var action=_createMethodAction(this.context, this, "Delay", 0, [seconds], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + InternalTest.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + InternalTest.prototype.toJSON=function () { + return _toJson(this, {}, {}); + }; + return InternalTest; + }(OfficeExtension.ClientObject)); + Excel.InternalTest=InternalTest; + var BindingType; + (function (BindingType) { + BindingType.range="Range"; + BindingType.table="Table"; + BindingType.text="Text"; + })(BindingType=Excel.BindingType || (Excel.BindingType={})); + var BorderIndex; + (function (BorderIndex) { + BorderIndex.edgeTop="EdgeTop"; + BorderIndex.edgeBottom="EdgeBottom"; + BorderIndex.edgeLeft="EdgeLeft"; + BorderIndex.edgeRight="EdgeRight"; + BorderIndex.insideVertical="InsideVertical"; + BorderIndex.insideHorizontal="InsideHorizontal"; + BorderIndex.diagonalDown="DiagonalDown"; + BorderIndex.diagonalUp="DiagonalUp"; + })(BorderIndex=Excel.BorderIndex || (Excel.BorderIndex={})); + var BorderLineStyle; + (function (BorderLineStyle) { + BorderLineStyle.none="None"; + BorderLineStyle.continuous="Continuous"; + BorderLineStyle.dash="Dash"; + BorderLineStyle.dashDot="DashDot"; + BorderLineStyle.dashDotDot="DashDotDot"; + BorderLineStyle.dot="Dot"; + BorderLineStyle.double="Double"; + BorderLineStyle.slantDashDot="SlantDashDot"; + })(BorderLineStyle=Excel.BorderLineStyle || (Excel.BorderLineStyle={})); + var BorderWeight; + (function (BorderWeight) { + BorderWeight.hairline="Hairline"; + BorderWeight.thin="Thin"; + BorderWeight.medium="Medium"; + BorderWeight.thick="Thick"; + })(BorderWeight=Excel.BorderWeight || (Excel.BorderWeight={})); + var CalculationMode; + (function (CalculationMode) { + CalculationMode.automatic="Automatic"; + CalculationMode.automaticExceptTables="AutomaticExceptTables"; + CalculationMode.manual="Manual"; + })(CalculationMode=Excel.CalculationMode || (Excel.CalculationMode={})); + var CalculationType; + (function (CalculationType) { + CalculationType.recalculate="Recalculate"; + CalculationType.full="Full"; + CalculationType.fullRebuild="FullRebuild"; + })(CalculationType=Excel.CalculationType || (Excel.CalculationType={})); + var ClearApplyTo; + (function (ClearApplyTo) { + ClearApplyTo.all="All"; + ClearApplyTo.formats="Formats"; + ClearApplyTo.contents="Contents"; + ClearApplyTo.hyperlinks="Hyperlinks"; + ClearApplyTo.removeHyperlinks="RemoveHyperlinks"; + })(ClearApplyTo=Excel.ClearApplyTo || (Excel.ClearApplyTo={})); + var ChartDataLabelPosition; + (function (ChartDataLabelPosition) { + ChartDataLabelPosition.invalid="Invalid"; + ChartDataLabelPosition.none="None"; + ChartDataLabelPosition.center="Center"; + ChartDataLabelPosition.insideEnd="InsideEnd"; + ChartDataLabelPosition.insideBase="InsideBase"; + ChartDataLabelPosition.outsideEnd="OutsideEnd"; + ChartDataLabelPosition.left="Left"; + ChartDataLabelPosition.right="Right"; + ChartDataLabelPosition.top="Top"; + ChartDataLabelPosition.bottom="Bottom"; + ChartDataLabelPosition.bestFit="BestFit"; + ChartDataLabelPosition.callout="Callout"; + })(ChartDataLabelPosition=Excel.ChartDataLabelPosition || (Excel.ChartDataLabelPosition={})); + var ChartLegendPosition; + (function (ChartLegendPosition) { + ChartLegendPosition.invalid="Invalid"; + ChartLegendPosition.top="Top"; + ChartLegendPosition.bottom="Bottom"; + ChartLegendPosition.left="Left"; + ChartLegendPosition.right="Right"; + ChartLegendPosition.corner="Corner"; + ChartLegendPosition.custom="Custom"; + })(ChartLegendPosition=Excel.ChartLegendPosition || (Excel.ChartLegendPosition={})); + var ChartSeriesBy; + (function (ChartSeriesBy) { + ChartSeriesBy.auto="Auto"; + ChartSeriesBy.columns="Columns"; + ChartSeriesBy.rows="Rows"; + })(ChartSeriesBy=Excel.ChartSeriesBy || (Excel.ChartSeriesBy={})); + var ChartType; + (function (ChartType) { + ChartType.invalid="Invalid"; + ChartType.columnClustered="ColumnClustered"; + ChartType.columnStacked="ColumnStacked"; + ChartType.columnStacked100="ColumnStacked100"; + ChartType._3DColumnClustered="3DColumnClustered"; + ChartType._3DColumnStacked="3DColumnStacked"; + ChartType._3DColumnStacked100="3DColumnStacked100"; + ChartType.barClustered="BarClustered"; + ChartType.barStacked="BarStacked"; + ChartType.barStacked100="BarStacked100"; + ChartType._3DBarClustered="3DBarClustered"; + ChartType._3DBarStacked="3DBarStacked"; + ChartType._3DBarStacked100="3DBarStacked100"; + ChartType.lineStacked="LineStacked"; + ChartType.lineStacked100="LineStacked100"; + ChartType.lineMarkers="LineMarkers"; + ChartType.lineMarkersStacked="LineMarkersStacked"; + ChartType.lineMarkersStacked100="LineMarkersStacked100"; + ChartType.pieOfPie="PieOfPie"; + ChartType.pieExploded="PieExploded"; + ChartType._3DPieExploded="3DPieExploded"; + ChartType.barOfPie="BarOfPie"; + ChartType.xyscatterSmooth="XYScatterSmooth"; + ChartType.xyscatterSmoothNoMarkers="XYScatterSmoothNoMarkers"; + ChartType.xyscatterLines="XYScatterLines"; + ChartType.xyscatterLinesNoMarkers="XYScatterLinesNoMarkers"; + ChartType.areaStacked="AreaStacked"; + ChartType.areaStacked100="AreaStacked100"; + ChartType._3DAreaStacked="3DAreaStacked"; + ChartType._3DAreaStacked100="3DAreaStacked100"; + ChartType.doughnutExploded="DoughnutExploded"; + ChartType.radarMarkers="RadarMarkers"; + ChartType.radarFilled="RadarFilled"; + ChartType.surface="Surface"; + ChartType.surfaceWireframe="SurfaceWireframe"; + ChartType.surfaceTopView="SurfaceTopView"; + ChartType.surfaceTopViewWireframe="SurfaceTopViewWireframe"; + ChartType.bubble="Bubble"; + ChartType.bubble3DEffect="Bubble3DEffect"; + ChartType.stockHLC="StockHLC"; + ChartType.stockOHLC="StockOHLC"; + ChartType.stockVHLC="StockVHLC"; + ChartType.stockVOHLC="StockVOHLC"; + ChartType.cylinderColClustered="CylinderColClustered"; + ChartType.cylinderColStacked="CylinderColStacked"; + ChartType.cylinderColStacked100="CylinderColStacked100"; + ChartType.cylinderBarClustered="CylinderBarClustered"; + ChartType.cylinderBarStacked="CylinderBarStacked"; + ChartType.cylinderBarStacked100="CylinderBarStacked100"; + ChartType.cylinderCol="CylinderCol"; + ChartType.coneColClustered="ConeColClustered"; + ChartType.coneColStacked="ConeColStacked"; + ChartType.coneColStacked100="ConeColStacked100"; + ChartType.coneBarClustered="ConeBarClustered"; + ChartType.coneBarStacked="ConeBarStacked"; + ChartType.coneBarStacked100="ConeBarStacked100"; + ChartType.coneCol="ConeCol"; + ChartType.pyramidColClustered="PyramidColClustered"; + ChartType.pyramidColStacked="PyramidColStacked"; + ChartType.pyramidColStacked100="PyramidColStacked100"; + ChartType.pyramidBarClustered="PyramidBarClustered"; + ChartType.pyramidBarStacked="PyramidBarStacked"; + ChartType.pyramidBarStacked100="PyramidBarStacked100"; + ChartType.pyramidCol="PyramidCol"; + ChartType._3DColumn="3DColumn"; + ChartType.line="Line"; + ChartType._3DLine="3DLine"; + ChartType._3DPie="3DPie"; + ChartType.pie="Pie"; + ChartType.xyscatter="XYScatter"; + ChartType._3DArea="3DArea"; + ChartType.area="Area"; + ChartType.doughnut="Doughnut"; + ChartType.radar="Radar"; + })(ChartType=Excel.ChartType || (Excel.ChartType={})); + var ChartUnderlineStyle; + (function (ChartUnderlineStyle) { + ChartUnderlineStyle.none="None"; + ChartUnderlineStyle.single="Single"; + })(ChartUnderlineStyle=Excel.ChartUnderlineStyle || (Excel.ChartUnderlineStyle={})); + var ConditionalDataBarAxisFormat; + (function (ConditionalDataBarAxisFormat) { + ConditionalDataBarAxisFormat.automatic="Automatic"; + ConditionalDataBarAxisFormat.none="None"; + ConditionalDataBarAxisFormat.cellMidPoint="CellMidPoint"; + })(ConditionalDataBarAxisFormat=Excel.ConditionalDataBarAxisFormat || (Excel.ConditionalDataBarAxisFormat={})); + var ConditionalDataBarDirection; + (function (ConditionalDataBarDirection) { + ConditionalDataBarDirection.context="Context"; + ConditionalDataBarDirection.leftToRight="LeftToRight"; + ConditionalDataBarDirection.rightToLeft="RightToLeft"; + })(ConditionalDataBarDirection=Excel.ConditionalDataBarDirection || (Excel.ConditionalDataBarDirection={})); + var ConditionalFormatDirection; + (function (ConditionalFormatDirection) { + ConditionalFormatDirection.top="Top"; + ConditionalFormatDirection.bottom="Bottom"; + })(ConditionalFormatDirection=Excel.ConditionalFormatDirection || (Excel.ConditionalFormatDirection={})); + var ConditionalFormatType; + (function (ConditionalFormatType) { + ConditionalFormatType.custom="Custom"; + ConditionalFormatType.dataBar="DataBar"; + ConditionalFormatType.colorScale="ColorScale"; + ConditionalFormatType.iconSet="IconSet"; + ConditionalFormatType.topBottom="TopBottom"; + ConditionalFormatType.presetCriteria="PresetCriteria"; + ConditionalFormatType.containsText="ContainsText"; + ConditionalFormatType.cellValue="CellValue"; + })(ConditionalFormatType=Excel.ConditionalFormatType || (Excel.ConditionalFormatType={})); + var ConditionalFormatRuleType; + (function (ConditionalFormatRuleType) { + ConditionalFormatRuleType.invalid="Invalid"; + ConditionalFormatRuleType.automatic="Automatic"; + ConditionalFormatRuleType.lowestValue="LowestValue"; + ConditionalFormatRuleType.highestValue="HighestValue"; + ConditionalFormatRuleType.number="Number"; + ConditionalFormatRuleType.percent="Percent"; + ConditionalFormatRuleType.formula="Formula"; + ConditionalFormatRuleType.percentile="Percentile"; + })(ConditionalFormatRuleType=Excel.ConditionalFormatRuleType || (Excel.ConditionalFormatRuleType={})); + var ConditionalFormatIconRuleType; + (function (ConditionalFormatIconRuleType) { + ConditionalFormatIconRuleType.invalid="Invalid"; + ConditionalFormatIconRuleType.number="Number"; + ConditionalFormatIconRuleType.percent="Percent"; + ConditionalFormatIconRuleType.formula="Formula"; + ConditionalFormatIconRuleType.percentile="Percentile"; + })(ConditionalFormatIconRuleType=Excel.ConditionalFormatIconRuleType || (Excel.ConditionalFormatIconRuleType={})); + var ConditionalFormatColorCriterionType; + (function (ConditionalFormatColorCriterionType) { + ConditionalFormatColorCriterionType.invalid="Invalid"; + ConditionalFormatColorCriterionType.lowestValue="LowestValue"; + ConditionalFormatColorCriterionType.highestValue="HighestValue"; + ConditionalFormatColorCriterionType.number="Number"; + ConditionalFormatColorCriterionType.percent="Percent"; + ConditionalFormatColorCriterionType.formula="Formula"; + ConditionalFormatColorCriterionType.percentile="Percentile"; + })(ConditionalFormatColorCriterionType=Excel.ConditionalFormatColorCriterionType || (Excel.ConditionalFormatColorCriterionType={})); + var ConditionalTopBottomCriterionType; + (function (ConditionalTopBottomCriterionType) { + ConditionalTopBottomCriterionType.invalid="Invalid"; + ConditionalTopBottomCriterionType.topItems="TopItems"; + ConditionalTopBottomCriterionType.topPercent="TopPercent"; + ConditionalTopBottomCriterionType.bottomItems="BottomItems"; + ConditionalTopBottomCriterionType.bottomPercent="BottomPercent"; + })(ConditionalTopBottomCriterionType=Excel.ConditionalTopBottomCriterionType || (Excel.ConditionalTopBottomCriterionType={})); + var ConditionalFormatPresetCriterion; + (function (ConditionalFormatPresetCriterion) { + ConditionalFormatPresetCriterion.invalid="Invalid"; + ConditionalFormatPresetCriterion.blanks="Blanks"; + ConditionalFormatPresetCriterion.nonBlanks="NonBlanks"; + ConditionalFormatPresetCriterion.errors="Errors"; + ConditionalFormatPresetCriterion.nonErrors="NonErrors"; + ConditionalFormatPresetCriterion.yesterday="Yesterday"; + ConditionalFormatPresetCriterion.today="Today"; + ConditionalFormatPresetCriterion.tomorrow="Tomorrow"; + ConditionalFormatPresetCriterion.lastSevenDays="LastSevenDays"; + ConditionalFormatPresetCriterion.lastWeek="LastWeek"; + ConditionalFormatPresetCriterion.thisWeek="ThisWeek"; + ConditionalFormatPresetCriterion.nextWeek="NextWeek"; + ConditionalFormatPresetCriterion.lastMonth="LastMonth"; + ConditionalFormatPresetCriterion.thisMonth="ThisMonth"; + ConditionalFormatPresetCriterion.nextMonth="NextMonth"; + ConditionalFormatPresetCriterion.aboveAverage="AboveAverage"; + ConditionalFormatPresetCriterion.belowAverage="BelowAverage"; + ConditionalFormatPresetCriterion.equalOrAboveAverage="EqualOrAboveAverage"; + ConditionalFormatPresetCriterion.equalOrBelowAverage="EqualOrBelowAverage"; + ConditionalFormatPresetCriterion.oneStdDevAboveAverage="OneStdDevAboveAverage"; + ConditionalFormatPresetCriterion.oneStdDevBelowAverage="OneStdDevBelowAverage"; + ConditionalFormatPresetCriterion.twoStdDevAboveAverage="TwoStdDevAboveAverage"; + ConditionalFormatPresetCriterion.twoStdDevBelowAverage="TwoStdDevBelowAverage"; + ConditionalFormatPresetCriterion.threeStdDevAboveAverage="ThreeStdDevAboveAverage"; + ConditionalFormatPresetCriterion.threeStdDevBelowAverage="ThreeStdDevBelowAverage"; + ConditionalFormatPresetCriterion.uniqueValues="UniqueValues"; + ConditionalFormatPresetCriterion.duplicateValues="DuplicateValues"; + })(ConditionalFormatPresetCriterion=Excel.ConditionalFormatPresetCriterion || (Excel.ConditionalFormatPresetCriterion={})); + var ConditionalTextOperator; + (function (ConditionalTextOperator) { + ConditionalTextOperator.invalid="Invalid"; + ConditionalTextOperator.contains="Contains"; + ConditionalTextOperator.notContains="NotContains"; + ConditionalTextOperator.beginsWith="BeginsWith"; + ConditionalTextOperator.endsWith="EndsWith"; + })(ConditionalTextOperator=Excel.ConditionalTextOperator || (Excel.ConditionalTextOperator={})); + var ConditionalCellValueOperator; + (function (ConditionalCellValueOperator) { + ConditionalCellValueOperator.invalid="Invalid"; + ConditionalCellValueOperator.between="Between"; + ConditionalCellValueOperator.notBetween="NotBetween"; + ConditionalCellValueOperator.equalTo="EqualTo"; + ConditionalCellValueOperator.notEqualTo="NotEqualTo"; + ConditionalCellValueOperator.greaterThan="GreaterThan"; + ConditionalCellValueOperator.lessThan="LessThan"; + ConditionalCellValueOperator.greaterThanOrEqual="GreaterThanOrEqual"; + ConditionalCellValueOperator.lessThanOrEqual="LessThanOrEqual"; + })(ConditionalCellValueOperator=Excel.ConditionalCellValueOperator || (Excel.ConditionalCellValueOperator={})); + var ConditionalIconCriterionOperator; + (function (ConditionalIconCriterionOperator) { + ConditionalIconCriterionOperator.invalid="Invalid"; + ConditionalIconCriterionOperator.greaterThan="GreaterThan"; + ConditionalIconCriterionOperator.greaterThanOrEqual="GreaterThanOrEqual"; + })(ConditionalIconCriterionOperator=Excel.ConditionalIconCriterionOperator || (Excel.ConditionalIconCriterionOperator={})); + var ConditionalRangeBorderIndex; + (function (ConditionalRangeBorderIndex) { + ConditionalRangeBorderIndex.edgeTop="EdgeTop"; + ConditionalRangeBorderIndex.edgeBottom="EdgeBottom"; + ConditionalRangeBorderIndex.edgeLeft="EdgeLeft"; + ConditionalRangeBorderIndex.edgeRight="EdgeRight"; + })(ConditionalRangeBorderIndex=Excel.ConditionalRangeBorderIndex || (Excel.ConditionalRangeBorderIndex={})); + var ConditionalRangeBorderLineStyle; + (function (ConditionalRangeBorderLineStyle) { + ConditionalRangeBorderLineStyle.none="None"; + ConditionalRangeBorderLineStyle.continuous="Continuous"; + ConditionalRangeBorderLineStyle.dash="Dash"; + ConditionalRangeBorderLineStyle.dashDot="DashDot"; + ConditionalRangeBorderLineStyle.dashDotDot="DashDotDot"; + ConditionalRangeBorderLineStyle.dot="Dot"; + })(ConditionalRangeBorderLineStyle=Excel.ConditionalRangeBorderLineStyle || (Excel.ConditionalRangeBorderLineStyle={})); + var ConditionalRangeFontUnderlineStyle; + (function (ConditionalRangeFontUnderlineStyle) { + ConditionalRangeFontUnderlineStyle.none="None"; + ConditionalRangeFontUnderlineStyle.single="Single"; + ConditionalRangeFontUnderlineStyle.double="Double"; + })(ConditionalRangeFontUnderlineStyle=Excel.ConditionalRangeFontUnderlineStyle || (Excel.ConditionalRangeFontUnderlineStyle={})); + var DeleteShiftDirection; + (function (DeleteShiftDirection) { + DeleteShiftDirection.up="Up"; + DeleteShiftDirection.left="Left"; + })(DeleteShiftDirection=Excel.DeleteShiftDirection || (Excel.DeleteShiftDirection={})); + var DynamicFilterCriteria; + (function (DynamicFilterCriteria) { + DynamicFilterCriteria.unknown="Unknown"; + DynamicFilterCriteria.aboveAverage="AboveAverage"; + DynamicFilterCriteria.allDatesInPeriodApril="AllDatesInPeriodApril"; + DynamicFilterCriteria.allDatesInPeriodAugust="AllDatesInPeriodAugust"; + DynamicFilterCriteria.allDatesInPeriodDecember="AllDatesInPeriodDecember"; + DynamicFilterCriteria.allDatesInPeriodFebruray="AllDatesInPeriodFebruray"; + DynamicFilterCriteria.allDatesInPeriodJanuary="AllDatesInPeriodJanuary"; + DynamicFilterCriteria.allDatesInPeriodJuly="AllDatesInPeriodJuly"; + DynamicFilterCriteria.allDatesInPeriodJune="AllDatesInPeriodJune"; + DynamicFilterCriteria.allDatesInPeriodMarch="AllDatesInPeriodMarch"; + DynamicFilterCriteria.allDatesInPeriodMay="AllDatesInPeriodMay"; + DynamicFilterCriteria.allDatesInPeriodNovember="AllDatesInPeriodNovember"; + DynamicFilterCriteria.allDatesInPeriodOctober="AllDatesInPeriodOctober"; + DynamicFilterCriteria.allDatesInPeriodQuarter1="AllDatesInPeriodQuarter1"; + DynamicFilterCriteria.allDatesInPeriodQuarter2="AllDatesInPeriodQuarter2"; + DynamicFilterCriteria.allDatesInPeriodQuarter3="AllDatesInPeriodQuarter3"; + DynamicFilterCriteria.allDatesInPeriodQuarter4="AllDatesInPeriodQuarter4"; + DynamicFilterCriteria.allDatesInPeriodSeptember="AllDatesInPeriodSeptember"; + DynamicFilterCriteria.belowAverage="BelowAverage"; + DynamicFilterCriteria.lastMonth="LastMonth"; + DynamicFilterCriteria.lastQuarter="LastQuarter"; + DynamicFilterCriteria.lastWeek="LastWeek"; + DynamicFilterCriteria.lastYear="LastYear"; + DynamicFilterCriteria.nextMonth="NextMonth"; + DynamicFilterCriteria.nextQuarter="NextQuarter"; + DynamicFilterCriteria.nextWeek="NextWeek"; + DynamicFilterCriteria.nextYear="NextYear"; + DynamicFilterCriteria.thisMonth="ThisMonth"; + DynamicFilterCriteria.thisQuarter="ThisQuarter"; + DynamicFilterCriteria.thisWeek="ThisWeek"; + DynamicFilterCriteria.thisYear="ThisYear"; + DynamicFilterCriteria.today="Today"; + DynamicFilterCriteria.tomorrow="Tomorrow"; + DynamicFilterCriteria.yearToDate="YearToDate"; + DynamicFilterCriteria.yesterday="Yesterday"; + })(DynamicFilterCriteria=Excel.DynamicFilterCriteria || (Excel.DynamicFilterCriteria={})); + var FilterDatetimeSpecificity; + (function (FilterDatetimeSpecificity) { + FilterDatetimeSpecificity.year="Year"; + FilterDatetimeSpecificity.month="Month"; + FilterDatetimeSpecificity.day="Day"; + FilterDatetimeSpecificity.hour="Hour"; + FilterDatetimeSpecificity.minute="Minute"; + FilterDatetimeSpecificity.second="Second"; + })(FilterDatetimeSpecificity=Excel.FilterDatetimeSpecificity || (Excel.FilterDatetimeSpecificity={})); + var FilterOn; + (function (FilterOn) { + FilterOn.bottomItems="BottomItems"; + FilterOn.bottomPercent="BottomPercent"; + FilterOn.cellColor="CellColor"; + FilterOn.dynamic="Dynamic"; + FilterOn.fontColor="FontColor"; + FilterOn.values="Values"; + FilterOn.topItems="TopItems"; + FilterOn.topPercent="TopPercent"; + FilterOn.icon="Icon"; + FilterOn.custom="Custom"; + })(FilterOn=Excel.FilterOn || (Excel.FilterOn={})); + var FilterOperator; + (function (FilterOperator) { + FilterOperator.and="And"; + FilterOperator.or="Or"; + })(FilterOperator=Excel.FilterOperator || (Excel.FilterOperator={})); + var HorizontalAlignment; + (function (HorizontalAlignment) { + HorizontalAlignment.general="General"; + HorizontalAlignment.left="Left"; + HorizontalAlignment.center="Center"; + HorizontalAlignment.right="Right"; + HorizontalAlignment.fill="Fill"; + HorizontalAlignment.justify="Justify"; + HorizontalAlignment.centerAcrossSelection="CenterAcrossSelection"; + HorizontalAlignment.distributed="Distributed"; + })(HorizontalAlignment=Excel.HorizontalAlignment || (Excel.HorizontalAlignment={})); + var IconSet; + (function (IconSet) { + IconSet.invalid="Invalid"; + IconSet.threeArrows="ThreeArrows"; + IconSet.threeArrowsGray="ThreeArrowsGray"; + IconSet.threeFlags="ThreeFlags"; + IconSet.threeTrafficLights1="ThreeTrafficLights1"; + IconSet.threeTrafficLights2="ThreeTrafficLights2"; + IconSet.threeSigns="ThreeSigns"; + IconSet.threeSymbols="ThreeSymbols"; + IconSet.threeSymbols2="ThreeSymbols2"; + IconSet.fourArrows="FourArrows"; + IconSet.fourArrowsGray="FourArrowsGray"; + IconSet.fourRedToBlack="FourRedToBlack"; + IconSet.fourRating="FourRating"; + IconSet.fourTrafficLights="FourTrafficLights"; + IconSet.fiveArrows="FiveArrows"; + IconSet.fiveArrowsGray="FiveArrowsGray"; + IconSet.fiveRating="FiveRating"; + IconSet.fiveQuarters="FiveQuarters"; + IconSet.threeStars="ThreeStars"; + IconSet.threeTriangles="ThreeTriangles"; + IconSet.fiveBoxes="FiveBoxes"; + })(IconSet=Excel.IconSet || (Excel.IconSet={})); + var ImageFittingMode; + (function (ImageFittingMode) { + ImageFittingMode.fit="Fit"; + ImageFittingMode.fitAndCenter="FitAndCenter"; + ImageFittingMode.fill="Fill"; + })(ImageFittingMode=Excel.ImageFittingMode || (Excel.ImageFittingMode={})); + var InsertShiftDirection; + (function (InsertShiftDirection) { + InsertShiftDirection.down="Down"; + InsertShiftDirection.right="Right"; + })(InsertShiftDirection=Excel.InsertShiftDirection || (Excel.InsertShiftDirection={})); + var NamedItemScope; + (function (NamedItemScope) { + NamedItemScope.worksheet="Worksheet"; + NamedItemScope.workbook="Workbook"; + })(NamedItemScope=Excel.NamedItemScope || (Excel.NamedItemScope={})); + var NamedItemType; + (function (NamedItemType) { + NamedItemType.string="String"; + NamedItemType.integer="Integer"; + NamedItemType.double="Double"; + NamedItemType.boolean="Boolean"; + NamedItemType.range="Range"; + NamedItemType.error="Error"; + NamedItemType.array="Array"; + })(NamedItemType=Excel.NamedItemType || (Excel.NamedItemType={})); + var RangeUnderlineStyle; + (function (RangeUnderlineStyle) { + RangeUnderlineStyle.none="None"; + RangeUnderlineStyle.single="Single"; + RangeUnderlineStyle.double="Double"; + RangeUnderlineStyle.singleAccountant="SingleAccountant"; + RangeUnderlineStyle.doubleAccountant="DoubleAccountant"; + })(RangeUnderlineStyle=Excel.RangeUnderlineStyle || (Excel.RangeUnderlineStyle={})); + var SheetVisibility; + (function (SheetVisibility) { + SheetVisibility.visible="Visible"; + SheetVisibility.hidden="Hidden"; + SheetVisibility.veryHidden="VeryHidden"; + })(SheetVisibility=Excel.SheetVisibility || (Excel.SheetVisibility={})); + var RangeValueType; + (function (RangeValueType) { + RangeValueType.unknown="Unknown"; + RangeValueType.empty="Empty"; + RangeValueType.string="String"; + RangeValueType.integer="Integer"; + RangeValueType.double="Double"; + RangeValueType.boolean="Boolean"; + RangeValueType.error="Error"; + RangeValueType.richValue="RichValue"; + })(RangeValueType=Excel.RangeValueType || (Excel.RangeValueType={})); + var SortOrientation; + (function (SortOrientation) { + SortOrientation.rows="Rows"; + SortOrientation.columns="Columns"; + })(SortOrientation=Excel.SortOrientation || (Excel.SortOrientation={})); + var SortOn; + (function (SortOn) { + SortOn.value="Value"; + SortOn.cellColor="CellColor"; + SortOn.fontColor="FontColor"; + SortOn.icon="Icon"; + })(SortOn=Excel.SortOn || (Excel.SortOn={})); + var SortDataOption; + (function (SortDataOption) { + SortDataOption.normal="Normal"; + SortDataOption.textAsNumber="TextAsNumber"; + })(SortDataOption=Excel.SortDataOption || (Excel.SortDataOption={})); + var SortMethod; + (function (SortMethod) { + SortMethod.pinYin="PinYin"; + SortMethod.strokeCount="StrokeCount"; + })(SortMethod=Excel.SortMethod || (Excel.SortMethod={})); + var VerticalAlignment; + (function (VerticalAlignment) { + VerticalAlignment.top="Top"; + VerticalAlignment.center="Center"; + VerticalAlignment.bottom="Bottom"; + VerticalAlignment.justify="Justify"; + VerticalAlignment.distributed="Distributed"; + })(VerticalAlignment=Excel.VerticalAlignment || (Excel.VerticalAlignment={})); + var _typeFunctionResult="FunctionResult"; + var FunctionResult=(function (_super) { + __extends(FunctionResult, _super); + function FunctionResult() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(FunctionResult.prototype, "_className", { + get: function () { + return "FunctionResult"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FunctionResult.prototype, "error", { + get: function () { + _throwIfNotLoaded("error", this._E, _typeFunctionResult, this._isNull); + return this._E; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FunctionResult.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this._V, _typeFunctionResult, this._isNull); + return this._V; + }, + enumerable: true, + configurable: true + }); + FunctionResult.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Error"])) { + this._E=obj["Error"]; + } + if (!_isUndefined(obj["Value"])) { + this._V=obj["Value"]; + } + }; + FunctionResult.prototype.load=function (option) { + return _load(this, option); + }; + FunctionResult.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + FunctionResult.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + FunctionResult.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + FunctionResult.prototype.toJSON=function () { + return _toJson(this, { + "error": this._E, + "value": this._V, + }, {}); + }; + FunctionResult.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return FunctionResult; + }(OfficeExtension.ClientObject)); + Excel.FunctionResult=FunctionResult; + var _typeFunctions="Functions"; + var Functions=(function (_super) { + __extends(Functions, _super); + function Functions() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Functions.prototype, "_className", { + get: function () { + return "Functions"; + }, + enumerable: true, + configurable: true + }); + Functions.prototype.abs=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Abs", 0, [number], false, true, null, false)); + }; + Functions.prototype.accrInt=function (issue, firstInterest, settlement, rate, par, frequency, basis, calcMethod) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AccrInt", 0, [issue, firstInterest, settlement, rate, par, frequency, basis, calcMethod], false, true, null, false)); + }; + Functions.prototype.accrIntM=function (issue, settlement, rate, par, basis) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AccrIntM", 0, [issue, settlement, rate, par, basis], false, true, null, false)); + }; + Functions.prototype.acos=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acos", 0, [number], false, true, null, false)); + }; + Functions.prototype.acosh=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acosh", 0, [number], false, true, null, false)); + }; + Functions.prototype.acot=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acot", 0, [number], false, true, null, false)); + }; + Functions.prototype.acoth=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acoth", 0, [number], false, true, null, false)); + }; + Functions.prototype.amorDegrc=function (cost, datePurchased, firstPeriod, salvage, period, rate, basis) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AmorDegrc", 0, [cost, datePurchased, firstPeriod, salvage, period, rate, basis], false, true, null, false)); + }; + Functions.prototype.amorLinc=function (cost, datePurchased, firstPeriod, salvage, period, rate, basis) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AmorLinc", 0, [cost, datePurchased, firstPeriod, salvage, period, rate, basis], false, true, null, false)); + }; + Functions.prototype.and=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "And", 0, [values], false, true, null, false)); + }; + Functions.prototype.arabic=function (text) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Arabic", 0, [text], false, true, null, false)); + }; + Functions.prototype.areas=function (reference) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Areas", 0, [reference], false, true, null, false)); + }; + Functions.prototype.asc=function (text) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asc", 0, [text], false, true, null, false)); + }; + Functions.prototype.asin=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asin", 0, [number], false, true, null, false)); + }; + Functions.prototype.asinh=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asinh", 0, [number], false, true, null, false)); + }; + Functions.prototype.atan=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atan", 0, [number], false, true, null, false)); + }; + Functions.prototype.atan2=function (xNum, yNum) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atan2", 0, [xNum, yNum], false, true, null, false)); + }; + Functions.prototype.atanh=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atanh", 0, [number], false, true, null, false)); + }; + Functions.prototype.aveDev=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AveDev", 0, [values], false, true, null, false)); + }; + Functions.prototype.average=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Average", 0, [values], false, true, null, false)); + }; + Functions.prototype.averageA=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageA", 0, [values], false, true, null, false)); + }; + Functions.prototype.averageIf=function (range, criteria, averageRange) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageIf", 0, [range, criteria, averageRange], false, true, null, false)); + }; + Functions.prototype.averageIfs=function (averageRange) { + var values=[]; + for (var _i=1; _i < arguments.length; _i++) { + values[_i - 1]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageIfs", 0, [averageRange, values], false, true, null, false)); + }; + Functions.prototype.bahtText=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BahtText", 0, [number], false, true, null, false)); + }; + Functions.prototype.base=function (number, radix, minLength) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Base", 0, [number, radix, minLength], false, true, null, false)); + }; + Functions.prototype.besselI=function (x, n) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselI", 0, [x, n], false, true, null, false)); + }; + Functions.prototype.besselJ=function (x, n) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselJ", 0, [x, n], false, true, null, false)); + }; + Functions.prototype.besselK=function (x, n) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselK", 0, [x, n], false, true, null, false)); + }; + Functions.prototype.besselY=function (x, n) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselY", 0, [x, n], false, true, null, false)); + }; + Functions.prototype.beta_Dist=function (x, alpha, beta, cumulative, A, B) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Beta_Dist", 0, [x, alpha, beta, cumulative, A, B], false, true, null, false)); + }; + Functions.prototype.beta_Inv=function (probability, alpha, beta, A, B) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Beta_Inv", 0, [probability, alpha, beta, A, B], false, true, null, false)); + }; + Functions.prototype.bin2Dec=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Dec", 0, [number], false, true, null, false)); + }; + Functions.prototype.bin2Hex=function (number, places) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Hex", 0, [number, places], false, true, null, false)); + }; + Functions.prototype.bin2Oct=function (number, places) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Oct", 0, [number, places], false, true, null, false)); + }; + Functions.prototype.binom_Dist=function (numberS, trials, probabilityS, cumulative) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Dist", 0, [numberS, trials, probabilityS, cumulative], false, true, null, false)); + }; + Functions.prototype.binom_Dist_Range=function (trials, probabilityS, numberS, numberS2) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Dist_Range", 0, [trials, probabilityS, numberS, numberS2], false, true, null, false)); + }; + Functions.prototype.binom_Inv=function (trials, probabilityS, alpha) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Inv", 0, [trials, probabilityS, alpha], false, true, null, false)); + }; + Functions.prototype.bitand=function (number1, number2) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitand", 0, [number1, number2], false, true, null, false)); + }; + Functions.prototype.bitlshift=function (number, shiftAmount) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitlshift", 0, [number, shiftAmount], false, true, null, false)); + }; + Functions.prototype.bitor=function (number1, number2) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitor", 0, [number1, number2], false, true, null, false)); + }; + Functions.prototype.bitrshift=function (number, shiftAmount) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitrshift", 0, [number, shiftAmount], false, true, null, false)); + }; + Functions.prototype.bitxor=function (number1, number2) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitxor", 0, [number1, number2], false, true, null, false)); + }; + Functions.prototype.ceiling_Math=function (number, significance, mode) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ceiling_Math", 0, [number, significance, mode], false, true, null, false)); + }; + Functions.prototype.ceiling_Precise=function (number, significance) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ceiling_Precise", 0, [number, significance], false, true, null, false)); + }; + Functions.prototype.char=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Char", 0, [number], false, true, null, false)); + }; + Functions.prototype.chiSq_Dist=function (x, degFreedom, cumulative) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Dist", 0, [x, degFreedom, cumulative], false, true, null, false)); + }; + Functions.prototype.chiSq_Dist_RT=function (x, degFreedom) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Dist_RT", 0, [x, degFreedom], false, true, null, false)); + }; + Functions.prototype.chiSq_Inv=function (probability, degFreedom) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Inv", 0, [probability, degFreedom], false, true, null, false)); + }; + Functions.prototype.chiSq_Inv_RT=function (probability, degFreedom) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Inv_RT", 0, [probability, degFreedom], false, true, null, false)); + }; + Functions.prototype.choose=function (indexNum) { + var values=[]; + for (var _i=1; _i < arguments.length; _i++) { + values[_i - 1]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Choose", 0, [indexNum, values], false, true, null, false)); + }; + Functions.prototype.clean=function (text) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Clean", 0, [text], false, true, null, false)); + }; + Functions.prototype.code=function (text) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Code", 0, [text], false, true, null, false)); + }; + Functions.prototype.columns=function (array) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Columns", 0, [array], false, true, null, false)); + }; + Functions.prototype.combin=function (number, numberChosen) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Combin", 0, [number, numberChosen], false, true, null, false)); + }; + Functions.prototype.combina=function (number, numberChosen) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Combina", 0, [number, numberChosen], false, true, null, false)); + }; + Functions.prototype.complex=function (realNum, iNum, suffix) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Complex", 0, [realNum, iNum, suffix], false, true, null, false)); + }; + Functions.prototype.concatenate=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Concatenate", 0, [values], false, true, null, false)); + }; + Functions.prototype.confidence_Norm=function (alpha, standardDev, size) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Confidence_Norm", 0, [alpha, standardDev, size], false, true, null, false)); + }; + Functions.prototype.confidence_T=function (alpha, standardDev, size) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Confidence_T", 0, [alpha, standardDev, size], false, true, null, false)); + }; + Functions.prototype.convert=function (number, fromUnit, toUnit) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Convert", 0, [number, fromUnit, toUnit], false, true, null, false)); + }; + Functions.prototype.cos=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cos", 0, [number], false, true, null, false)); + }; + Functions.prototype.cosh=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cosh", 0, [number], false, true, null, false)); + }; + Functions.prototype.cot=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cot", 0, [number], false, true, null, false)); + }; + Functions.prototype.coth=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Coth", 0, [number], false, true, null, false)); + }; + Functions.prototype.count=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Count", 0, [values], false, true, null, false)); + }; + Functions.prototype.countA=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountA", 0, [values], false, true, null, false)); + }; + Functions.prototype.countBlank=function (range) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountBlank", 0, [range], false, true, null, false)); + }; + Functions.prototype.countIf=function (range, criteria) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountIf", 0, [range, criteria], false, true, null, false)); + }; + Functions.prototype.countIfs=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountIfs", 0, [values], false, true, null, false)); + }; + Functions.prototype.coupDayBs=function (settlement, maturity, frequency, basis) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDayBs", 0, [settlement, maturity, frequency, basis], false, true, null, false)); + }; + Functions.prototype.coupDays=function (settlement, maturity, frequency, basis) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDays", 0, [settlement, maturity, frequency, basis], false, true, null, false)); + }; + Functions.prototype.coupDaysNc=function (settlement, maturity, frequency, basis) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDaysNc", 0, [settlement, maturity, frequency, basis], false, true, null, false)); + }; + Functions.prototype.coupNcd=function (settlement, maturity, frequency, basis) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupNcd", 0, [settlement, maturity, frequency, basis], false, true, null, false)); + }; + Functions.prototype.coupNum=function (settlement, maturity, frequency, basis) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupNum", 0, [settlement, maturity, frequency, basis], false, true, null, false)); + }; + Functions.prototype.coupPcd=function (settlement, maturity, frequency, basis) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupPcd", 0, [settlement, maturity, frequency, basis], false, true, null, false)); + }; + Functions.prototype.csc=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Csc", 0, [number], false, true, null, false)); + }; + Functions.prototype.csch=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Csch", 0, [number], false, true, null, false)); + }; + Functions.prototype.cumIPmt=function (rate, nper, pv, startPeriod, endPeriod, type) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CumIPmt", 0, [rate, nper, pv, startPeriod, endPeriod, type], false, true, null, false)); + }; + Functions.prototype.cumPrinc=function (rate, nper, pv, startPeriod, endPeriod, type) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CumPrinc", 0, [rate, nper, pv, startPeriod, endPeriod, type], false, true, null, false)); + }; + Functions.prototype.daverage=function (database, field, criteria) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DAverage", 0, [database, field, criteria], false, true, null, false)); + }; + Functions.prototype.dcount=function (database, field, criteria) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DCount", 0, [database, field, criteria], false, true, null, false)); + }; + Functions.prototype.dcountA=function (database, field, criteria) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DCountA", 0, [database, field, criteria], false, true, null, false)); + }; + Functions.prototype.dget=function (database, field, criteria) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DGet", 0, [database, field, criteria], false, true, null, false)); + }; + Functions.prototype.dmax=function (database, field, criteria) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DMax", 0, [database, field, criteria], false, true, null, false)); + }; + Functions.prototype.dmin=function (database, field, criteria) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DMin", 0, [database, field, criteria], false, true, null, false)); + }; + Functions.prototype.dproduct=function (database, field, criteria) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DProduct", 0, [database, field, criteria], false, true, null, false)); + }; + Functions.prototype.dstDev=function (database, field, criteria) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DStDev", 0, [database, field, criteria], false, true, null, false)); + }; + Functions.prototype.dstDevP=function (database, field, criteria) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DStDevP", 0, [database, field, criteria], false, true, null, false)); + }; + Functions.prototype.dsum=function (database, field, criteria) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DSum", 0, [database, field, criteria], false, true, null, false)); + }; + Functions.prototype.dvar=function (database, field, criteria) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DVar", 0, [database, field, criteria], false, true, null, false)); + }; + Functions.prototype.dvarP=function (database, field, criteria) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DVarP", 0, [database, field, criteria], false, true, null, false)); + }; + Functions.prototype.date=function (year, month, day) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Date", 0, [year, month, day], false, true, null, false)); + }; + Functions.prototype.datevalue=function (dateText) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Datevalue", 0, [dateText], false, true, null, false)); + }; + Functions.prototype.day=function (serialNumber) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Day", 0, [serialNumber], false, true, null, false)); + }; + Functions.prototype.days=function (endDate, startDate) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Days", 0, [endDate, startDate], false, true, null, false)); + }; + Functions.prototype.days360=function (startDate, endDate, method) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Days360", 0, [startDate, endDate, method], false, true, null, false)); + }; + Functions.prototype.db=function (cost, salvage, life, period, month) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Db", 0, [cost, salvage, life, period, month], false, true, null, false)); + }; + Functions.prototype.dbcs=function (text) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dbcs", 0, [text], false, true, null, false)); + }; + Functions.prototype.ddb=function (cost, salvage, life, period, factor) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ddb", 0, [cost, salvage, life, period, factor], false, true, null, false)); + }; + Functions.prototype.dec2Bin=function (number, places) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Bin", 0, [number, places], false, true, null, false)); + }; + Functions.prototype.dec2Hex=function (number, places) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Hex", 0, [number, places], false, true, null, false)); + }; + Functions.prototype.dec2Oct=function (number, places) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Oct", 0, [number, places], false, true, null, false)); + }; + Functions.prototype.decimal=function (number, radix) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Decimal", 0, [number, radix], false, true, null, false)); + }; + Functions.prototype.degrees=function (angle) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Degrees", 0, [angle], false, true, null, false)); + }; + Functions.prototype.delta=function (number1, number2) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Delta", 0, [number1, number2], false, true, null, false)); + }; + Functions.prototype.devSq=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DevSq", 0, [values], false, true, null, false)); + }; + Functions.prototype.disc=function (settlement, maturity, pr, redemption, basis) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Disc", 0, [settlement, maturity, pr, redemption, basis], false, true, null, false)); + }; + Functions.prototype.dollar=function (number, decimals) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dollar", 0, [number, decimals], false, true, null, false)); + }; + Functions.prototype.dollarDe=function (fractionalDollar, fraction) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DollarDe", 0, [fractionalDollar, fraction], false, true, null, false)); + }; + Functions.prototype.dollarFr=function (decimalDollar, fraction) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DollarFr", 0, [decimalDollar, fraction], false, true, null, false)); + }; + Functions.prototype.duration=function (settlement, maturity, coupon, yld, frequency, basis) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Duration", 0, [settlement, maturity, coupon, yld, frequency, basis], false, true, null, false)); + }; + Functions.prototype.ecma_Ceiling=function (number, significance) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ECMA_Ceiling", 0, [number, significance], false, true, null, false)); + }; + Functions.prototype.edate=function (startDate, months) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "EDate", 0, [startDate, months], false, true, null, false)); + }; + Functions.prototype.effect=function (nominalRate, npery) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Effect", 0, [nominalRate, npery], false, true, null, false)); + }; + Functions.prototype.eoMonth=function (startDate, months) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "EoMonth", 0, [startDate, months], false, true, null, false)); + }; + Functions.prototype.erf=function (lowerLimit, upperLimit) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Erf", 0, [lowerLimit, upperLimit], false, true, null, false)); + }; + Functions.prototype.erfC=function (x) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ErfC", 0, [x], false, true, null, false)); + }; + Functions.prototype.erfC_Precise=function (X) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ErfC_Precise", 0, [X], false, true, null, false)); + }; + Functions.prototype.erf_Precise=function (X) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Erf_Precise", 0, [X], false, true, null, false)); + }; + Functions.prototype.error_Type=function (errorVal) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Error_Type", 0, [errorVal], false, true, null, false)); + }; + Functions.prototype.even=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Even", 0, [number], false, true, null, false)); + }; + Functions.prototype.exact=function (text1, text2) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Exact", 0, [text1, text2], false, true, null, false)); + }; + Functions.prototype.exp=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Exp", 0, [number], false, true, null, false)); + }; + Functions.prototype.expon_Dist=function (x, lambda, cumulative) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Expon_Dist", 0, [x, lambda, cumulative], false, true, null, false)); + }; + Functions.prototype.fvschedule=function (principal, schedule) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FVSchedule", 0, [principal, schedule], false, true, null, false)); + }; + Functions.prototype.f_Dist=function (x, degFreedom1, degFreedom2, cumulative) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Dist", 0, [x, degFreedom1, degFreedom2, cumulative], false, true, null, false)); + }; + Functions.prototype.f_Dist_RT=function (x, degFreedom1, degFreedom2) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Dist_RT", 0, [x, degFreedom1, degFreedom2], false, true, null, false)); + }; + Functions.prototype.f_Inv=function (probability, degFreedom1, degFreedom2) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Inv", 0, [probability, degFreedom1, degFreedom2], false, true, null, false)); + }; + Functions.prototype.f_Inv_RT=function (probability, degFreedom1, degFreedom2) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Inv_RT", 0, [probability, degFreedom1, degFreedom2], false, true, null, false)); + }; + Functions.prototype.fact=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fact", 0, [number], false, true, null, false)); + }; + Functions.prototype.factDouble=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FactDouble", 0, [number], false, true, null, false)); + }; + Functions.prototype.false=function () { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "False", 0, [], false, true, null, false)); + }; + Functions.prototype.find=function (findText, withinText, startNum) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Find", 0, [findText, withinText, startNum], false, true, null, false)); + }; + Functions.prototype.findB=function (findText, withinText, startNum) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FindB", 0, [findText, withinText, startNum], false, true, null, false)); + }; + Functions.prototype.fisher=function (x) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fisher", 0, [x], false, true, null, false)); + }; + Functions.prototype.fisherInv=function (y) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FisherInv", 0, [y], false, true, null, false)); + }; + Functions.prototype.fixed=function (number, decimals, noCommas) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fixed", 0, [number, decimals, noCommas], false, true, null, false)); + }; + Functions.prototype.floor_Math=function (number, significance, mode) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Floor_Math", 0, [number, significance, mode], false, true, null, false)); + }; + Functions.prototype.floor_Precise=function (number, significance) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Floor_Precise", 0, [number, significance], false, true, null, false)); + }; + Functions.prototype.fv=function (rate, nper, pmt, pv, type) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fv", 0, [rate, nper, pmt, pv, type], false, true, null, false)); + }; + Functions.prototype.gamma=function (x) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma", 0, [x], false, true, null, false)); + }; + Functions.prototype.gammaLn=function (x) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GammaLn", 0, [x], false, true, null, false)); + }; + Functions.prototype.gammaLn_Precise=function (x) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GammaLn_Precise", 0, [x], false, true, null, false)); + }; + Functions.prototype.gamma_Dist=function (x, alpha, beta, cumulative) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma_Dist", 0, [x, alpha, beta, cumulative], false, true, null, false)); + }; + Functions.prototype.gamma_Inv=function (probability, alpha, beta) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma_Inv", 0, [probability, alpha, beta], false, true, null, false)); + }; + Functions.prototype.gauss=function (x) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gauss", 0, [x], false, true, null, false)); + }; + Functions.prototype.gcd=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gcd", 0, [values], false, true, null, false)); + }; + Functions.prototype.geStep=function (number, step) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GeStep", 0, [number, step], false, true, null, false)); + }; + Functions.prototype.geoMean=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GeoMean", 0, [values], false, true, null, false)); + }; + Functions.prototype.hlookup=function (lookupValue, tableArray, rowIndexNum, rangeLookup) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HLookup", 0, [lookupValue, tableArray, rowIndexNum, rangeLookup], false, true, null, false)); + }; + Functions.prototype.harMean=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HarMean", 0, [values], false, true, null, false)); + }; + Functions.prototype.hex2Bin=function (number, places) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Bin", 0, [number, places], false, true, null, false)); + }; + Functions.prototype.hex2Dec=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Dec", 0, [number], false, true, null, false)); + }; + Functions.prototype.hex2Oct=function (number, places) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Oct", 0, [number, places], false, true, null, false)); + }; + Functions.prototype.hour=function (serialNumber) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hour", 0, [serialNumber], false, true, null, false)); + }; + Functions.prototype.hypGeom_Dist=function (sampleS, numberSample, populationS, numberPop, cumulative) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HypGeom_Dist", 0, [sampleS, numberSample, populationS, numberPop, cumulative], false, true, null, false)); + }; + Functions.prototype.hyperlink=function (linkLocation, friendlyName) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hyperlink", 0, [linkLocation, friendlyName], false, true, null, false)); + }; + Functions.prototype.iso_Ceiling=function (number, significance) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ISO_Ceiling", 0, [number, significance], false, true, null, false)); + }; + Functions.prototype.if=function (logicalTest, valueIfTrue, valueIfFalse) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "If", 0, [logicalTest, valueIfTrue, valueIfFalse], false, true, null, false)); + }; + Functions.prototype.imAbs=function (inumber) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImAbs", 0, [inumber], false, true, null, false)); + }; + Functions.prototype.imArgument=function (inumber) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImArgument", 0, [inumber], false, true, null, false)); + }; + Functions.prototype.imConjugate=function (inumber) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImConjugate", 0, [inumber], false, true, null, false)); + }; + Functions.prototype.imCos=function (inumber) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCos", 0, [inumber], false, true, null, false)); + }; + Functions.prototype.imCosh=function (inumber) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCosh", 0, [inumber], false, true, null, false)); + }; + Functions.prototype.imCot=function (inumber) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCot", 0, [inumber], false, true, null, false)); + }; + Functions.prototype.imCsc=function (inumber) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCsc", 0, [inumber], false, true, null, false)); + }; + Functions.prototype.imCsch=function (inumber) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCsch", 0, [inumber], false, true, null, false)); + }; + Functions.prototype.imDiv=function (inumber1, inumber2) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImDiv", 0, [inumber1, inumber2], false, true, null, false)); + }; + Functions.prototype.imExp=function (inumber) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImExp", 0, [inumber], false, true, null, false)); + }; + Functions.prototype.imLn=function (inumber) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLn", 0, [inumber], false, true, null, false)); + }; + Functions.prototype.imLog10=function (inumber) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLog10", 0, [inumber], false, true, null, false)); + }; + Functions.prototype.imLog2=function (inumber) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLog2", 0, [inumber], false, true, null, false)); + }; + Functions.prototype.imPower=function (inumber, number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImPower", 0, [inumber, number], false, true, null, false)); + }; + Functions.prototype.imProduct=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImProduct", 0, [values], false, true, null, false)); + }; + Functions.prototype.imReal=function (inumber) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImReal", 0, [inumber], false, true, null, false)); + }; + Functions.prototype.imSec=function (inumber) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSec", 0, [inumber], false, true, null, false)); + }; + Functions.prototype.imSech=function (inumber) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSech", 0, [inumber], false, true, null, false)); + }; + Functions.prototype.imSin=function (inumber) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSin", 0, [inumber], false, true, null, false)); + }; + Functions.prototype.imSinh=function (inumber) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSinh", 0, [inumber], false, true, null, false)); + }; + Functions.prototype.imSqrt=function (inumber) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSqrt", 0, [inumber], false, true, null, false)); + }; + Functions.prototype.imSub=function (inumber1, inumber2) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSub", 0, [inumber1, inumber2], false, true, null, false)); + }; + Functions.prototype.imSum=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSum", 0, [values], false, true, null, false)); + }; + Functions.prototype.imTan=function (inumber) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImTan", 0, [inumber], false, true, null, false)); + }; + Functions.prototype.imaginary=function (inumber) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Imaginary", 0, [inumber], false, true, null, false)); + }; + Functions.prototype.int=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Int", 0, [number], false, true, null, false)); + }; + Functions.prototype.intRate=function (settlement, maturity, investment, redemption, basis) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IntRate", 0, [settlement, maturity, investment, redemption, basis], false, true, null, false)); + }; + Functions.prototype.ipmt=function (rate, per, nper, pv, fv, type) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ipmt", 0, [rate, per, nper, pv, fv, type], false, true, null, false)); + }; + Functions.prototype.irr=function (values, guess) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Irr", 0, [values, guess], false, true, null, false)); + }; + Functions.prototype.isErr=function (value) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsErr", 0, [value], false, true, null, false)); + }; + Functions.prototype.isError=function (value) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsError", 0, [value], false, true, null, false)); + }; + Functions.prototype.isEven=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsEven", 0, [number], false, true, null, false)); + }; + Functions.prototype.isFormula=function (reference) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsFormula", 0, [reference], false, true, null, false)); + }; + Functions.prototype.isLogical=function (value) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsLogical", 0, [value], false, true, null, false)); + }; + Functions.prototype.isNA=function (value) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNA", 0, [value], false, true, null, false)); + }; + Functions.prototype.isNonText=function (value) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNonText", 0, [value], false, true, null, false)); + }; + Functions.prototype.isNumber=function (value) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNumber", 0, [value], false, true, null, false)); + }; + Functions.prototype.isOdd=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsOdd", 0, [number], false, true, null, false)); + }; + Functions.prototype.isText=function (value) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsText", 0, [value], false, true, null, false)); + }; + Functions.prototype.isoWeekNum=function (date) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsoWeekNum", 0, [date], false, true, null, false)); + }; + Functions.prototype.ispmt=function (rate, per, nper, pv) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ispmt", 0, [rate, per, nper, pv], false, true, null, false)); + }; + Functions.prototype.isref=function (value) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Isref", 0, [value], false, true, null, false)); + }; + Functions.prototype.kurt=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Kurt", 0, [values], false, true, null, false)); + }; + Functions.prototype.large=function (array, k) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Large", 0, [array, k], false, true, null, false)); + }; + Functions.prototype.lcm=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lcm", 0, [values], false, true, null, false)); + }; + Functions.prototype.left=function (text, numChars) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Left", 0, [text, numChars], false, true, null, false)); + }; + Functions.prototype.leftb=function (text, numBytes) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Leftb", 0, [text, numBytes], false, true, null, false)); + }; + Functions.prototype.len=function (text) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Len", 0, [text], false, true, null, false)); + }; + Functions.prototype.lenb=function (text) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lenb", 0, [text], false, true, null, false)); + }; + Functions.prototype.ln=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ln", 0, [number], false, true, null, false)); + }; + Functions.prototype.log=function (number, base) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Log", 0, [number, base], false, true, null, false)); + }; + Functions.prototype.log10=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Log10", 0, [number], false, true, null, false)); + }; + Functions.prototype.logNorm_Dist=function (x, mean, standardDev, cumulative) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "LogNorm_Dist", 0, [x, mean, standardDev, cumulative], false, true, null, false)); + }; + Functions.prototype.logNorm_Inv=function (probability, mean, standardDev) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "LogNorm_Inv", 0, [probability, mean, standardDev], false, true, null, false)); + }; + Functions.prototype.lookup=function (lookupValue, lookupVector, resultVector) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lookup", 0, [lookupValue, lookupVector, resultVector], false, true, null, false)); + }; + Functions.prototype.lower=function (text) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lower", 0, [text], false, true, null, false)); + }; + Functions.prototype.mduration=function (settlement, maturity, coupon, yld, frequency, basis) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MDuration", 0, [settlement, maturity, coupon, yld, frequency, basis], false, true, null, false)); + }; + Functions.prototype.mirr=function (values, financeRate, reinvestRate) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MIrr", 0, [values, financeRate, reinvestRate], false, true, null, false)); + }; + Functions.prototype.mround=function (number, multiple) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MRound", 0, [number, multiple], false, true, null, false)); + }; + Functions.prototype.match=function (lookupValue, lookupArray, matchType) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Match", 0, [lookupValue, lookupArray, matchType], false, true, null, false)); + }; + Functions.prototype.max=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Max", 0, [values], false, true, null, false)); + }; + Functions.prototype.maxA=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MaxA", 0, [values], false, true, null, false)); + }; + Functions.prototype.median=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Median", 0, [values], false, true, null, false)); + }; + Functions.prototype.mid=function (text, startNum, numChars) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Mid", 0, [text, startNum, numChars], false, true, null, false)); + }; + Functions.prototype.midb=function (text, startNum, numBytes) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Midb", 0, [text, startNum, numBytes], false, true, null, false)); + }; + Functions.prototype.min=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Min", 0, [values], false, true, null, false)); + }; + Functions.prototype.minA=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MinA", 0, [values], false, true, null, false)); + }; + Functions.prototype.minute=function (serialNumber) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Minute", 0, [serialNumber], false, true, null, false)); + }; + Functions.prototype.mod=function (number, divisor) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Mod", 0, [number, divisor], false, true, null, false)); + }; + Functions.prototype.month=function (serialNumber) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Month", 0, [serialNumber], false, true, null, false)); + }; + Functions.prototype.multiNomial=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MultiNomial", 0, [values], false, true, null, false)); + }; + Functions.prototype.n=function (value) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "N", 0, [value], false, true, null, false)); + }; + Functions.prototype.nper=function (rate, pmt, pv, fv, type) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NPer", 0, [rate, pmt, pv, fv, type], false, true, null, false)); + }; + Functions.prototype.na=function () { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Na", 0, [], false, true, null, false)); + }; + Functions.prototype.negBinom_Dist=function (numberF, numberS, probabilityS, cumulative) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NegBinom_Dist", 0, [numberF, numberS, probabilityS, cumulative], false, true, null, false)); + }; + Functions.prototype.networkDays=function (startDate, endDate, holidays) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NetworkDays", 0, [startDate, endDate, holidays], false, true, null, false)); + }; + Functions.prototype.networkDays_Intl=function (startDate, endDate, weekend, holidays) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NetworkDays_Intl", 0, [startDate, endDate, weekend, holidays], false, true, null, false)); + }; + Functions.prototype.nominal=function (effectRate, npery) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Nominal", 0, [effectRate, npery], false, true, null, false)); + }; + Functions.prototype.norm_Dist=function (x, mean, standardDev, cumulative) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_Dist", 0, [x, mean, standardDev, cumulative], false, true, null, false)); + }; + Functions.prototype.norm_Inv=function (probability, mean, standardDev) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_Inv", 0, [probability, mean, standardDev], false, true, null, false)); + }; + Functions.prototype.norm_S_Dist=function (z, cumulative) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_S_Dist", 0, [z, cumulative], false, true, null, false)); + }; + Functions.prototype.norm_S_Inv=function (probability) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_S_Inv", 0, [probability], false, true, null, false)); + }; + Functions.prototype.not=function (logical) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Not", 0, [logical], false, true, null, false)); + }; + Functions.prototype.now=function () { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Now", 0, [], false, true, null, false)); + }; + Functions.prototype.npv=function (rate) { + var values=[]; + for (var _i=1; _i < arguments.length; _i++) { + values[_i - 1]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Npv", 0, [rate, values], false, true, null, false)); + }; + Functions.prototype.numberValue=function (text, decimalSeparator, groupSeparator) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NumberValue", 0, [text, decimalSeparator, groupSeparator], false, true, null, false)); + }; + Functions.prototype.oct2Bin=function (number, places) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Bin", 0, [number, places], false, true, null, false)); + }; + Functions.prototype.oct2Dec=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Dec", 0, [number], false, true, null, false)); + }; + Functions.prototype.oct2Hex=function (number, places) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Hex", 0, [number, places], false, true, null, false)); + }; + Functions.prototype.odd=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Odd", 0, [number], false, true, null, false)); + }; + Functions.prototype.oddFPrice=function (settlement, maturity, issue, firstCoupon, rate, yld, redemption, frequency, basis) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddFPrice", 0, [settlement, maturity, issue, firstCoupon, rate, yld, redemption, frequency, basis], false, true, null, false)); + }; + Functions.prototype.oddFYield=function (settlement, maturity, issue, firstCoupon, rate, pr, redemption, frequency, basis) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddFYield", 0, [settlement, maturity, issue, firstCoupon, rate, pr, redemption, frequency, basis], false, true, null, false)); + }; + Functions.prototype.oddLPrice=function (settlement, maturity, lastInterest, rate, yld, redemption, frequency, basis) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddLPrice", 0, [settlement, maturity, lastInterest, rate, yld, redemption, frequency, basis], false, true, null, false)); + }; + Functions.prototype.oddLYield=function (settlement, maturity, lastInterest, rate, pr, redemption, frequency, basis) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddLYield", 0, [settlement, maturity, lastInterest, rate, pr, redemption, frequency, basis], false, true, null, false)); + }; + Functions.prototype.or=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Or", 0, [values], false, true, null, false)); + }; + Functions.prototype.pduration=function (rate, pv, fv) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PDuration", 0, [rate, pv, fv], false, true, null, false)); + }; + Functions.prototype.percentRank_Exc=function (array, x, significance) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PercentRank_Exc", 0, [array, x, significance], false, true, null, false)); + }; + Functions.prototype.percentRank_Inc=function (array, x, significance) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PercentRank_Inc", 0, [array, x, significance], false, true, null, false)); + }; + Functions.prototype.percentile_Exc=function (array, k) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Percentile_Exc", 0, [array, k], false, true, null, false)); + }; + Functions.prototype.percentile_Inc=function (array, k) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Percentile_Inc", 0, [array, k], false, true, null, false)); + }; + Functions.prototype.permut=function (number, numberChosen) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Permut", 0, [number, numberChosen], false, true, null, false)); + }; + Functions.prototype.permutationa=function (number, numberChosen) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Permutationa", 0, [number, numberChosen], false, true, null, false)); + }; + Functions.prototype.phi=function (x) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Phi", 0, [x], false, true, null, false)); + }; + Functions.prototype.pi=function () { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pi", 0, [], false, true, null, false)); + }; + Functions.prototype.pmt=function (rate, nper, pv, fv, type) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pmt", 0, [rate, nper, pv, fv, type], false, true, null, false)); + }; + Functions.prototype.poisson_Dist=function (x, mean, cumulative) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Poisson_Dist", 0, [x, mean, cumulative], false, true, null, false)); + }; + Functions.prototype.power=function (number, power) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Power", 0, [number, power], false, true, null, false)); + }; + Functions.prototype.ppmt=function (rate, per, nper, pv, fv, type) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ppmt", 0, [rate, per, nper, pv, fv, type], false, true, null, false)); + }; + Functions.prototype.price=function (settlement, maturity, rate, yld, redemption, frequency, basis) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Price", 0, [settlement, maturity, rate, yld, redemption, frequency, basis], false, true, null, false)); + }; + Functions.prototype.priceDisc=function (settlement, maturity, discount, redemption, basis) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PriceDisc", 0, [settlement, maturity, discount, redemption, basis], false, true, null, false)); + }; + Functions.prototype.priceMat=function (settlement, maturity, issue, rate, yld, basis) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PriceMat", 0, [settlement, maturity, issue, rate, yld, basis], false, true, null, false)); + }; + Functions.prototype.product=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Product", 0, [values], false, true, null, false)); + }; + Functions.prototype.proper=function (text) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Proper", 0, [text], false, true, null, false)); + }; + Functions.prototype.pv=function (rate, nper, pmt, fv, type) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pv", 0, [rate, nper, pmt, fv, type], false, true, null, false)); + }; + Functions.prototype.quartile_Exc=function (array, quart) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quartile_Exc", 0, [array, quart], false, true, null, false)); + }; + Functions.prototype.quartile_Inc=function (array, quart) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quartile_Inc", 0, [array, quart], false, true, null, false)); + }; + Functions.prototype.quotient=function (numerator, denominator) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quotient", 0, [numerator, denominator], false, true, null, false)); + }; + Functions.prototype.radians=function (angle) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Radians", 0, [angle], false, true, null, false)); + }; + Functions.prototype.rand=function () { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rand", 0, [], false, true, null, false)); + }; + Functions.prototype.randBetween=function (bottom, top) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RandBetween", 0, [bottom, top], false, true, null, false)); + }; + Functions.prototype.rank_Avg=function (number, ref, order) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rank_Avg", 0, [number, ref, order], false, true, null, false)); + }; + Functions.prototype.rank_Eq=function (number, ref, order) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rank_Eq", 0, [number, ref, order], false, true, null, false)); + }; + Functions.prototype.rate=function (nper, pmt, pv, fv, type, guess) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rate", 0, [nper, pmt, pv, fv, type, guess], false, true, null, false)); + }; + Functions.prototype.received=function (settlement, maturity, investment, discount, basis) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Received", 0, [settlement, maturity, investment, discount, basis], false, true, null, false)); + }; + Functions.prototype.replace=function (oldText, startNum, numChars, newText) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Replace", 0, [oldText, startNum, numChars, newText], false, true, null, false)); + }; + Functions.prototype.replaceB=function (oldText, startNum, numBytes, newText) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ReplaceB", 0, [oldText, startNum, numBytes, newText], false, true, null, false)); + }; + Functions.prototype.rept=function (text, numberTimes) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rept", 0, [text, numberTimes], false, true, null, false)); + }; + Functions.prototype.right=function (text, numChars) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Right", 0, [text, numChars], false, true, null, false)); + }; + Functions.prototype.rightb=function (text, numBytes) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rightb", 0, [text, numBytes], false, true, null, false)); + }; + Functions.prototype.roman=function (number, form) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Roman", 0, [number, form], false, true, null, false)); + }; + Functions.prototype.round=function (number, numDigits) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Round", 0, [number, numDigits], false, true, null, false)); + }; + Functions.prototype.roundDown=function (number, numDigits) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RoundDown", 0, [number, numDigits], false, true, null, false)); + }; + Functions.prototype.roundUp=function (number, numDigits) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RoundUp", 0, [number, numDigits], false, true, null, false)); + }; + Functions.prototype.rows=function (array) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rows", 0, [array], false, true, null, false)); + }; + Functions.prototype.rri=function (nper, pv, fv) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rri", 0, [nper, pv, fv], false, true, null, false)); + }; + Functions.prototype.sec=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sec", 0, [number], false, true, null, false)); + }; + Functions.prototype.sech=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sech", 0, [number], false, true, null, false)); + }; + Functions.prototype.second=function (serialNumber) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Second", 0, [serialNumber], false, true, null, false)); + }; + Functions.prototype.seriesSum=function (x, n, m, coefficients) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SeriesSum", 0, [x, n, m, coefficients], false, true, null, false)); + }; + Functions.prototype.sheet=function (value) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sheet", 0, [value], false, true, null, false)); + }; + Functions.prototype.sheets=function (reference) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sheets", 0, [reference], false, true, null, false)); + }; + Functions.prototype.sign=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sign", 0, [number], false, true, null, false)); + }; + Functions.prototype.sin=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sin", 0, [number], false, true, null, false)); + }; + Functions.prototype.sinh=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sinh", 0, [number], false, true, null, false)); + }; + Functions.prototype.skew=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Skew", 0, [values], false, true, null, false)); + }; + Functions.prototype.skew_p=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Skew_p", 0, [values], false, true, null, false)); + }; + Functions.prototype.sln=function (cost, salvage, life) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sln", 0, [cost, salvage, life], false, true, null, false)); + }; + Functions.prototype.small=function (array, k) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Small", 0, [array, k], false, true, null, false)); + }; + Functions.prototype.sqrt=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sqrt", 0, [number], false, true, null, false)); + }; + Functions.prototype.sqrtPi=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SqrtPi", 0, [number], false, true, null, false)); + }; + Functions.prototype.stDevA=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDevA", 0, [values], false, true, null, false)); + }; + Functions.prototype.stDevPA=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDevPA", 0, [values], false, true, null, false)); + }; + Functions.prototype.stDev_P=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDev_P", 0, [values], false, true, null, false)); + }; + Functions.prototype.stDev_S=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDev_S", 0, [values], false, true, null, false)); + }; + Functions.prototype.standardize=function (x, mean, standardDev) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Standardize", 0, [x, mean, standardDev], false, true, null, false)); + }; + Functions.prototype.substitute=function (text, oldText, newText, instanceNum) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Substitute", 0, [text, oldText, newText, instanceNum], false, true, null, false)); + }; + Functions.prototype.subtotal=function (functionNum) { + var values=[]; + for (var _i=1; _i < arguments.length; _i++) { + values[_i - 1]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Subtotal", 0, [functionNum, values], false, true, null, false)); + }; + Functions.prototype.sum=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sum", 0, [values], false, true, null, false)); + }; + Functions.prototype.sumIf=function (range, criteria, sumRange) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumIf", 0, [range, criteria, sumRange], false, true, null, false)); + }; + Functions.prototype.sumIfs=function (sumRange) { + var values=[]; + for (var _i=1; _i < arguments.length; _i++) { + values[_i - 1]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumIfs", 0, [sumRange, values], false, true, null, false)); + }; + Functions.prototype.sumSq=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumSq", 0, [values], false, true, null, false)); + }; + Functions.prototype.syd=function (cost, salvage, life, per) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Syd", 0, [cost, salvage, life, per], false, true, null, false)); + }; + Functions.prototype.t=function (value) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T", 0, [value], false, true, null, false)); + }; + Functions.prototype.tbillEq=function (settlement, maturity, discount) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillEq", 0, [settlement, maturity, discount], false, true, null, false)); + }; + Functions.prototype.tbillPrice=function (settlement, maturity, discount) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillPrice", 0, [settlement, maturity, discount], false, true, null, false)); + }; + Functions.prototype.tbillYield=function (settlement, maturity, pr) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillYield", 0, [settlement, maturity, pr], false, true, null, false)); + }; + Functions.prototype.t_Dist=function (x, degFreedom, cumulative) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist", 0, [x, degFreedom, cumulative], false, true, null, false)); + }; + Functions.prototype.t_Dist_2T=function (x, degFreedom) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist_2T", 0, [x, degFreedom], false, true, null, false)); + }; + Functions.prototype.t_Dist_RT=function (x, degFreedom) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist_RT", 0, [x, degFreedom], false, true, null, false)); + }; + Functions.prototype.t_Inv=function (probability, degFreedom) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Inv", 0, [probability, degFreedom], false, true, null, false)); + }; + Functions.prototype.t_Inv_2T=function (probability, degFreedom) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Inv_2T", 0, [probability, degFreedom], false, true, null, false)); + }; + Functions.prototype.tan=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Tan", 0, [number], false, true, null, false)); + }; + Functions.prototype.tanh=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Tanh", 0, [number], false, true, null, false)); + }; + Functions.prototype.text=function (value, formatText) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Text", 0, [value, formatText], false, true, null, false)); + }; + Functions.prototype.time=function (hour, minute, second) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Time", 0, [hour, minute, second], false, true, null, false)); + }; + Functions.prototype.timevalue=function (timeText) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Timevalue", 0, [timeText], false, true, null, false)); + }; + Functions.prototype.today=function () { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Today", 0, [], false, true, null, false)); + }; + Functions.prototype.trim=function (text) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Trim", 0, [text], false, true, null, false)); + }; + Functions.prototype.trimMean=function (array, percent) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TrimMean", 0, [array, percent], false, true, null, false)); + }; + Functions.prototype.true=function () { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "True", 0, [], false, true, null, false)); + }; + Functions.prototype.trunc=function (number, numDigits) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Trunc", 0, [number, numDigits], false, true, null, false)); + }; + Functions.prototype.type=function (value) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Type", 0, [value], false, true, null, false)); + }; + Functions.prototype.usdollar=function (number, decimals) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "USDollar", 0, [number, decimals], false, true, null, false)); + }; + Functions.prototype.unichar=function (number) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Unichar", 0, [number], false, true, null, false)); + }; + Functions.prototype.unicode=function (text) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Unicode", 0, [text], false, true, null, false)); + }; + Functions.prototype.upper=function (text) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Upper", 0, [text], false, true, null, false)); + }; + Functions.prototype.vlookup=function (lookupValue, tableArray, colIndexNum, rangeLookup) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VLookup", 0, [lookupValue, tableArray, colIndexNum, rangeLookup], false, true, null, false)); + }; + Functions.prototype.value=function (text) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Value", 0, [text], false, true, null, false)); + }; + Functions.prototype.varA=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VarA", 0, [values], false, true, null, false)); + }; + Functions.prototype.varPA=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VarPA", 0, [values], false, true, null, false)); + }; + Functions.prototype.var_P=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Var_P", 0, [values], false, true, null, false)); + }; + Functions.prototype.var_S=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Var_S", 0, [values], false, true, null, false)); + }; + Functions.prototype.vdb=function (cost, salvage, life, startPeriod, endPeriod, factor, noSwitch) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Vdb", 0, [cost, salvage, life, startPeriod, endPeriod, factor, noSwitch], false, true, null, false)); + }; + Functions.prototype.weekNum=function (serialNumber, returnType) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WeekNum", 0, [serialNumber, returnType], false, true, null, false)); + }; + Functions.prototype.weekday=function (serialNumber, returnType) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Weekday", 0, [serialNumber, returnType], false, true, null, false)); + }; + Functions.prototype.weibull_Dist=function (x, alpha, beta, cumulative) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Weibull_Dist", 0, [x, alpha, beta, cumulative], false, true, null, false)); + }; + Functions.prototype.workDay=function (startDate, days, holidays) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WorkDay", 0, [startDate, days, holidays], false, true, null, false)); + }; + Functions.prototype.workDay_Intl=function (startDate, days, weekend, holidays) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WorkDay_Intl", 0, [startDate, days, weekend, holidays], false, true, null, false)); + }; + Functions.prototype.xirr=function (values, dates, guess) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xirr", 0, [values, dates, guess], false, true, null, false)); + }; + Functions.prototype.xnpv=function (rate, values, dates) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xnpv", 0, [rate, values, dates], false, true, null, false)); + }; + Functions.prototype.xor=function () { + var values=[]; + for (var _i=0; _i < arguments.length; _i++) { + values[_i]=arguments[_i]; + } + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xor", 0, [values], false, true, null, false)); + }; + Functions.prototype.year=function (serialNumber) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Year", 0, [serialNumber], false, true, null, false)); + }; + Functions.prototype.yearFrac=function (startDate, endDate, basis) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YearFrac", 0, [startDate, endDate, basis], false, true, null, false)); + }; + Functions.prototype.yield=function (settlement, maturity, rate, pr, redemption, frequency, basis) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Yield", 0, [settlement, maturity, rate, pr, redemption, frequency, basis], false, true, null, false)); + }; + Functions.prototype.yieldDisc=function (settlement, maturity, pr, redemption, basis) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YieldDisc", 0, [settlement, maturity, pr, redemption, basis], false, true, null, false)); + }; + Functions.prototype.yieldMat=function (settlement, maturity, issue, rate, pr, basis) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YieldMat", 0, [settlement, maturity, issue, rate, pr, basis], false, true, null, false)); + }; + Functions.prototype.z_Test=function (array, x, sigma) { + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Z_Test", 0, [array, x, sigma], false, true, null, false)); + }; + Functions.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + Functions.prototype.toJSON=function () { + return _toJson(this, {}, {}); + }; + return Functions; + }(OfficeExtension.ClientObject)); + Excel.Functions=Functions; + var ErrorCodes; + (function (ErrorCodes) { + ErrorCodes.accessDenied="AccessDenied"; + ErrorCodes.apiNotFound="ApiNotFound"; + ErrorCodes.conflict="Conflict"; + ErrorCodes.generalException="GeneralException"; + ErrorCodes.insertDeleteConflict="InsertDeleteConflict"; + ErrorCodes.invalidArgument="InvalidArgument"; + ErrorCodes.invalidBinding="InvalidBinding"; + ErrorCodes.invalidOperation="InvalidOperation"; + ErrorCodes.invalidReference="InvalidReference"; + ErrorCodes.invalidSelection="InvalidSelection"; + ErrorCodes.itemAlreadyExists="ItemAlreadyExists"; + ErrorCodes.itemNotFound="ItemNotFound"; + ErrorCodes.notImplemented="NotImplemented"; + ErrorCodes.unsupportedOperation="UnsupportedOperation"; + ErrorCodes.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"; + })(ErrorCodes=Excel.ErrorCodes || (Excel.ErrorCodes={})); +})(Excel || (Excel={})); + +OfficeExtension.Utility._doApiNotSupportedCheck=true; + + diff --git a/node_modules/@microsoft/office-js/dist/excel-android-16.00.js b/node_modules/@microsoft/office-js/dist/excel-android-16.00.js new file mode 100644 index 0000000..952153a --- /dev/null +++ b/node_modules/@microsoft/office-js/dist/excel-android-16.00.js @@ -0,0 +1,21 @@ +/* Excel Android-specific API library */ +/* Version: 16.0.8803.3000 */ + +/* Office.js Version: 16.0.8616.1000 */ +/* + Copyright (c) Microsoft Corporation. All rights reserved. +*/ + +/* + Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419. +*/ + +/* +* @overview es6-promise - a tiny implementation of Promises/A+. +* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) +* @license Licensed under MIT license +* See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE +* @version 2.3.0 +*/ + +function agaveHostCallback(n,t){var i=new CrossIFrameCommon.CallbackData(CrossIFrameCommon.CallbackType.MethodCallback,n,t),r=Android.Poster.getInstance();r.ReceiveMessage(i)}function agaveHostEventCallback(n,t){var i=new CrossIFrameCommon.CallbackData(CrossIFrameCommon.CallbackType.EventCallback,n,t),r=Android.Poster.getInstance();r.ReceiveMessage(i)}var __extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},OsfMsAjaxFactory,OfficeExt,OSF,OSFWebView,CrossIFrameCommon,Android,OSFLog,Logger,OSFAriaLogger,OSFAppTelemetry,OfficeExtension,OfficeCore,Excel;(function(n){var t=function(){function t(){}var n=!0;return t.prototype.isMsAjaxLoaded=function(){var t="function",i="undefined";return typeof Sys!==i&&typeof Type!==i&&Sys.StringBuilder&&typeof Sys.StringBuilder===t&&Type.registerNamespace&&typeof Type.registerNamespace===t&&Type.registerClass&&typeof Type.registerClass===t&&typeof Function._validateParams===t&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===t?n:!1},t.prototype.loadMsAjaxFull=function(n){var t=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,n)},Object.defineProperty(t.prototype,"msAjaxError",{get:function(){var n=this;return n._msAjaxError==null&&n.isMsAjaxLoaded()&&(n._msAjaxError=Error),n._msAjaxError},set:function(n){this._msAjaxError=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxString",{get:function(){var n=this;return n._msAjaxString==null&&n.isMsAjaxLoaded()&&(n._msAjaxString=String),n._msAjaxString},set:function(n){this._msAjaxString=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxDebug",{get:function(){var n=this;return n._msAjaxDebug==null&&n.isMsAjaxLoaded()&&(n._msAjaxDebug=Sys.Debug),n._msAjaxDebug},set:function(n){this._msAjaxDebug=n},enumerable:n,configurable:n}),t}();n.MicrosoftAjaxFactory=t})(OfficeExt||(OfficeExt={}));OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory;OSF=OSF||{},function(n){var t=function(){function n(n){this._internalStorage=n}return n.prototype.getItem=function(n){try{return this._internalStorage&&this._internalStorage.getItem(n)}catch(t){return null}},n.prototype.setItem=function(n,t){try{this._internalStorage&&this._internalStorage.setItem(n,t)}catch(i){}},n.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(n){}},n.prototype.removeItem=function(n){try{this._internalStorage&&this._internalStorage.removeItem(n)}catch(t){}},n.prototype.getKeysWithPrefix=function(n){var r=[],u,t,i;try{for(u=this._internalStorage&&this._internalStorage.length||0,t=0;t0?i.push(t):t.tabIndex===0&&r.push(t):r.push(t);return i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;return r===0&&(r=i.indexOf(n)-i.indexOf(t)),r}),[].concat(i,r)}var o="focus",s="on",k="configurable",d="writable",h="enumerable",r="",c="undefined",i=!0,t=!1,l=2147483647,n=null,u=-1,a=u,g="&_xdm_Info=",nt="&_serializer_version=",tt="_xdm_",ft="_serializer_version=",v="#",it="&",f="class",y={},et=3e4,p=n,w=n,e=(new Date).getTime();return{set_entropy:function(n){var t,r,i;if(typeof n=="string")for(t=0;t1?l[l.length-1]:n,s,h,c,a;return r&&o!=n&&(o.indexOf(it)>=0&&(o=o.split(it)[0]),o=decodeURIComponent(o)),s=b(),!f&&s&&(h=window.name.indexOf(i),h>u&&(c=window.name.indexOf(";",h),c==u&&(c=window.name.length),a=window.name.substring(h,c),o?s.setItem(a,o):o=s.getItem(a))),o},getConversationId:function(){var i=window.location.search,t=n,r;return i&&(r=i.indexOf("&"),t=r>0?i.substring(1,r):i.substr(1),t&&t.charAt(t.length-1)==="="&&(t=t.substring(0,t.length-1),t&&(t=decodeURIComponent(t)))),t},getInfoItems:function(n){var t=n.split("$");return typeof t[1]==c&&(t=n.split("|")),typeof t[1]==c&&(t=n.split("%7C")),t},getXdmFieldValue:function(n,t){var u=r,f=OSF.OUtil.parseXdmInfo(t),i;if(f&&(i=OSF.OUtil.getInfoItems(f),i!=undefined&&i.length>=3))switch(n){case OSF.XdmFieldName.ConversationUrl:u=i[2];break;case OSF.XdmFieldName.AppId:u=i[1]}return u},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]),f;if(u)throw u;for(f in r)if(u=Function._validateParameter(n[f],r[f],f),u)throw u;},writeProfilerMark:function(n){window.msWriteProfilerMark&&(window.msWriteProfilerMark(n),OsfMsAjaxFactory.msAjaxDebug.trace(n))},outputDebug:function(n){typeof OsfMsAjaxFactory!==c&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){var e,f;r=r||{};for(e in u)f=u[e],r[f]==undefined&&(r[f]=i);return Object.defineProperty(n,t,r),n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[h])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[h])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[d,h,k])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[d,h,k])},finalizeProperties:function(n,r){var e,u;r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8,e=o&255,i[t++]=u>>2,i[t++]=(u&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63,isNaN(o)||(u=o>>8,f=h&255,e=h>>8,i[t++]=u>>2,i[t++]=(u&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63),isNaN(o)?i[t-1]=64:isNaN(h)&&(i[t-2]=64,i[t-1]=64),c=0;c0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){var u,i,f,r;if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(u=[],i=0;in)return u;else if(t===0&&i)return u;else if(t===n-1&&!i)return u;return i?t-1:t+1};if(r=ut(r),e=f?r.length-1:0,r.length===0)return n;while(!h&&e>=0&&en)return u;else if(t===0&&i)return u;else if(t===n-1&&!i)return u;return i?t-1:t+1};if(r=ut(r),l=y(r,f),s=v(r.length,l,e),s<0)return n;while(!c&&s>=0&&s0;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[r%16],r=Math.floor(r/16);for(;t<32;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[Math.floor(Math.random()*16)];return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];return i?(i.name||(i.name=n[this.errorCodes.ooeInternalError].name),i.message||(i.message=n[this.errorCodes.ooeInternalError].message)):i=n[this.errorCodes.ooeInternalError],i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:t.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:t.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage}}}}(),function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}(),r,i,h,u,c,l,f,a,e,v,y,p,w,b,o,k,d,g,s,nt,tt,it,rt;n.RequirementVersion=ut;r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){var f,u,e,i,r;if(n==undefined)return!1;if(t==undefined&&(t=0),f=this._setMap,u=f._sets,u.hasOwnProperty(n.toLowerCase())){e=u[n.toLowerCase()];try{if((i=this._getVersion(e),t=t+"",r=this._getVersion(t),i.major>0&&i.major>r.major)||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),i=0,r=0;if(t.length<2&&isNaN(Number(n)))throw u;else if(i=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(i)||isNaN(r))throw u;return{minor:r,major:i}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;h=function(n){function i(){n.call(this,{dialogapi:t})}return __extends(i,n),i}(i);n.DefaultDialogSetRequirement=h;u=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelClientDefaultSetRequirement=u;c=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(u);n.ExcelClientV1DefaultSetRequirement=c;l=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookClientDefaultSetRequirement=l;f=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return __extends(i,n),i}(i);n.WordClientDefaultSetRequirement=f;a=function(n){function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return __extends(i,n),i}(f);n.WordClientV1DefaultSetRequirement=a;e=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointClientDefaultSetRequirement=e;v=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(e);n.PowerpointClientV1DefaultSetRequirement=v;y=function(n){function i(){n.call(this,{selection:t,textcoercion:t})}return __extends(i,n),i}(i);n.ProjectClientDefaultSetRequirement=y;p=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return __extends(i,n),i}(i);n.ExcelWebDefaultSetRequirement=p;w=function(n){function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordWebDefaultSetRequirement=w;b=function(n){function i(){n.call(this,{activeview:t,settings:t})}return __extends(i,n),i}(i);n.PowerpointWebDefaultSetRequirement=b;o=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookWebDefaultSetRequirement=o;k=function(n){function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.SwayWebDefaultSetRequirement=k;d=function(n){function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return __extends(i,n),i}(i);n.AccessWebDefaultSetRequirement=d;g=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelIOSDefaultSetRequirement=g;s=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordIOSDefaultSetRequirement=s;nt=function(n){function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return __extends(t,n),t}(s);n.WordIOSV1DefaultSetRequirement=nt;tt=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointIOSDefaultSetRequirement=tt;it=function(n){function i(){n.call(this,{mailbox:t})}return __extends(i,n),i}(i);n.OutlookIOSDefaultSetRequirement=it;rt=function(){function n(){}var t="undefined";return n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},n.getDefaultRequirementMatrix=function(u){var f,e,s,o;return this.initializeDefaultSetMatrix(),f=undefined,e=u.get_requirementMatrix(),e!=undefined&&e.length>0&&typeof JSON!==t?(s=JSON.parse(u.get_requirementMatrix().toLowerCase()),f=new r(new i(s))):(o=n.getClientFullVersionString(u),f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[o]!=undefined?new r(n.DefaultSetArrayMatrix[o]):new r(new i({}))),f},n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix(),e;return f!=undefined&&f.length>0&&typeof JSON!==t?(e=JSON.parse(n.get_requirementMatrix().toLowerCase()),u=new r(new i(e))):u=new r(new h),u},n.getClientFullVersionString=function(n){var i=n.get_appMinorVersion(),u="",r="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;return f&&n.get_appVersion()==1?r=t==4096&&i>=15?"16.00.01":"16.00":n.get_appName()==64?r=n.get_appVersion():(u=i<10?"0"+i:""+i,r=n.get_appVersion()+"."+u),n.get_appName()+"-"+r},n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new c;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new v;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new l;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new w;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new b;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new g;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new k;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new nt;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new tt;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new it},n.Excel_RCLIENT_1600="1-16.00",n.Excel_RCLIENT_1601="1-16.01",n.Word_RCLIENT_1600="2-16.00",n.Word_RCLIENT_1601="2-16.01",n.PowerPoint_RCLIENT_1600="4-16.00",n.PowerPoint_RCLIENT_1601="4-16.01",n.Outlook_RCLIENT_1600="8-16.00",n.Excel_WAC_1600="16-16.00",n.Word_WAC_1600="32-16.00",n.Outlook_WAC_1600="64-16.00",n.Outlook_WAC_1601="64-16.01",n.Project_RCLIENT_1600="128-16.00",n.Access_WAC_1600="256-16.00",n.PowerPoint_WAC_1600="512-16.00",n.Excel_IOS_1600="1024-16.00",n.SWAY_WAC_1600="2048-16.00",n.Word_IOS_1600="4096-16.00",n.Word_IOS_16001="4096-16.00.01",n.PowerPoint_IOS_1600="8192-16.00",n.Outlook_IOS_1600="65536-16.00",n.DefaultSetArrayMatrix={},n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))}(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}return n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n},n.getInstance=function(){return n.hostObj===undefined&&(n.hostObj=new n),n.hostObj},n.prototype.getPlatform=function(){var n=this,t;return n.hostInfo.hostPlatform&&(t=n.hostInfo.hostPlatform.toLowerCase(),n.platformRemappings[t])?n.platformRemappings[t]:null},n.prototype.getHost=function(){var n=this,t;if(n.hostInfo.hostType){if(t=n.hostInfo.hostType.toLowerCase(),n.camelCaseMappings[t])return n.camelCaseMappings[t];if(t=n.capitalizeFirstLetter(n.hostInfo.hostType),Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null},n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null},n}();n.Host=t})(t=n.HostName||(n.HostName={}))}(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){n||(window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,n=!0)},disableShortcut:function(){n&&(t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window),n=!1)}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i,r,o,u,f,e;if(n&&typeof n=="string"&&(r=n.indexOf("#"),r!=-1)){o=n.substring(0,r);u=n.substring(r+1);switch(o){case"binding":case"bindings":u&&(i=new OSF.DDA.BindingPromise(u))}}if(i)return i.onFail=t,i;else if(t)if(f=typeof t,f=="function")e={},e[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(e,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext));else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f);};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this,s,e;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.auth&&OSF.OUtil.defineEnumerableProperty(f,"auth",{value:n.auth});n.get_isDialog()?(e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e})):(t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t}),r&&(s=r.displayName||"appOM",delete r.displayName,OSF.OUtil.defineEnumerableProperty(f,s,{value:r})),u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}}),e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e}))};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this,u;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;return OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext()),n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,e=n.length,o=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){var u,i,r;for(u in n){if(i=n[u],r=t[u],i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw o();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw o();}};f.extractRequiredArguments=function(t,i,r){var f,u,h,s,c,l;if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(c=n.length-1;c>=s;c--){l=n[c];switch(typeof l){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=l;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}if(f=o.fillOptions(f,i,r,u),e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;return o.verifyArguments(t,f),f}var h="function",s=n.length,o=new OSF.DDA.ApiMethodCall(n,t,i,f,e);this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),u=c(n,r,t,i);return o.constructCallArgs(r,u,t,i)};this.processResponse=function(n,t,i,f){return n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n)};this.getCallArgs=function(n){for(var t,u,r,i=n.length-1;i>=s;i--){r=n[i];switch(typeof r){case"object":t=r;break;case h:u=r}}return t=t||{},u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u),t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],i=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],t,i,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback],u,r;f&&(u={},u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?u[OSF.DDA.AsyncResultEnum.Properties.Value]=i:(r={},i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i),f(new OSF.DDA.AsyncResult(u,r)))};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.SyncMethodNames[t]=i};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){function o(n,i,r,u){var o,c,s,h;if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(s=n.length-1;s>=e;s--){h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}return o=f.fillOptions(o,i,r,u),f.verifyArguments(t,o),o}var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),u=o(n,r,t,i);return f.constructCallArgs(r,u,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){function e(i,f){var a=i?{}:undefined,s,h,o,v,c,l;for(s in i){if(h=i[s],OSF.DDA.ListType.isListType(s)){o=[];for(v in h)o.push(e(h[v],f))}else OSF.OUtil.listContainsKey(r,s)?o=r[s][f](h):f==u&&n.preserveNesting(s)?o=e(h,f):(c=t[s],c?(l=c[f],l&&(o=l[h],o===undefined&&(o=h))):o=h);a[s]=o}return a}function l(i,r){var e,u,h,s;for(u in r)h=n.isComplexType(u)?l(i,t[u][o]):i[u],h!=undefined&&(e||(e={}),s=r[u],s==f&&(s=u),e[s]=n.pack(u,h));return e}function s(i,r,e){var o,a,h,l,p,v,y;e||(e={});for(o in r){if(a=r[o],a==f)h=i;else if(a==c){e[o]=i.toArray();continue}else h=i[a];if(h===null||h===undefined)e[o]=undefined;else if(h=n.unpack(o,h),n.isComplexType(o))l=t[o][u],n.preserveNesting(o)?e[o]=s(h,l):s(h,l,e);else if(OSF.DDA.ListType.isListType(o)){l={};p=OSF.DDA.ListType.getDescriptor(o);l[p]=f;v=new Array(h.length);for(y in h)v[y]=s(h[y],l);e[o]=v}else e[o]=h}return e}function a(n,i,r){var f=t[n][r],u,o,c;return r=="toHost"?(o=e(i,r),u=l(o,f)):r==h&&(c=s(i,f),u=e(c,r)),u}var h="fromHost",i=this,o="toHost",u=h,c="sourceData",f="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];t||(t={});i.addMapping=function(n,i){var e,h,c,l,r,s,a,v;if(i.map){e=i.map;h={};for(c in e)l=e[c],l==f&&(l=c),h[l]=c}else e=i.toHost,h=i.fromHost;if(r=t[n],r){s=r[o];for(a in s)e[a]=s[a];s=r[u];for(v in s)h[v]=s[v]}else r=t[n]={};r[o]=e;r[u]=h};i.toHost=function(n,t){return a(n,t,o)};i.fromHost=function(n,t){return a(n,t,u)};i.self=f;i.sourceData=c;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){return this.isDynamicType(n)?t[n].toHost(i):i};i.unpack=function(n,i){return this.isDynamicType(n)?t[n].fromHost(i):i}};OSF.DDA.getDecoratedParameterMap=function(n,t){function r(n){var i=null,r,t;if(n)for(i={},r=n.length,t=0;t0){for(r=[],i=0;i=s)break;if(f=Function._validateParameter(n[e],o,h),f)return f.popStackFrame(),f}return t}),Function._validateParameterCount||(Function._validateParameterCount=function(n,r,u){var f,s,e=r.length,h=n.length,c,l,a;if(he)for(s=i,f=0;f0&&t.push(u)}}catch(s){}return t}var i=[],t={};t[Microsoft.Office.WebExtension.Parameters.Data]=function(){var t=0,i=1;return{toHost:function(n){if(OSF.DDA.TableDataProperties&&typeof n!="string"&&n[OSF.DDA.TableDataProperties.TableRows]!==undefined){var r=[];r[t]=n[OSF.DDA.TableDataProperties.TableRows];r[i]=n[OSF.DDA.TableDataProperties.TableHeaders];n=r}return n},fromHost:function(r){var f,e,u;return r.toArray?(e=r.dimensions(),e===2?f=n(r):(u=r.toArray(),u.length===2&&(u[0]!=null&&u[0].toArray||u[1]!=null&&u[1].toArray)?(f={},f[OSF.DDA.TableDataProperties.TableRows]=n(u[t]),f[OSF.DDA.TableDataProperties.TableHeaders]=n(u[i])):f=u)):f=r,f}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,i,t);this.unpack=function(n,i){var r,u;return this.isComplexType(n)||OSF.DDA.ListType.isListType(n)?(u=(i||typeof i=="unknown")&&i.toArray,r=u?i.toArray():i||{}):r=this.isDynamicType(n)?t[n].fromHost(i):i,r}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(n){function t(n){var i=n,f,r,u;if(OSF.OUtil.isArray(n))for(f=i.length,r=0;r2)for(r=[],f=1;f=2&&(r=t[0],i=t[1]),u?u(new n.WebViewSafeArray(i)):void 0};this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.Execute,e,o)},t.prototype.registerEvent=function(t,i,r,u){var f=function(t){var i=t,u=0;OSF.OUtil.isArray(t)&&t.length>=2&&(u=t[0],i=t[1]);r&&r(u,new n.WebViewSafeArray(i))},e=function(t){if(u)return u(new n.WebViewSafeArray(t))};this.hostScriptProxy.registerEvent(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.RegisterEvent,t,i,f,e)},t.prototype.unregisterEvent=function(t,i,r){var u=function(t){return r(new n.WebViewSafeArray(t))};this.hostScriptProxy.unregisterEvent(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.UnregisterEvent,t,i,u)},t.prototype.messageParent=function(n){var t=n[Microsoft.Office.WebExtension.Parameters.MessageToParent],i={dialogMessage:{messageType:OSF.DialogMessageType.DialogMessageReceived,messageContent:t}};window.opener.postMessage(JSON.stringify(i),window.location.origin)},t.prototype.openDialog=function(n,r,u,f){function p(i){if(i.source==t.popup)try{var r=JSON.parse(i.data);r.dialogMessage&&u(n,[OSF.DialogMessageType.DialogMessageReceived,r.dialogMessage.messageContent])}catch(f){OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handled. Message:"+i.data)}}function w(){try{(t.popup==i||t.popup.closed)&&(window.clearInterval(h),u(n,[OSF.DialogMessageType.DialogClosed]))}catch(r){OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed.")}}var c="action=displayDialog",e=JSON.parse(r),o=e.url,s,h;if(o){s="?";o.indexOf("?")>-1&&(s="&");var l=screen.width*e.width/100,a=screen.height*e.height/100,v="width="+l+", height="+a,y=o.concat(s).concat(c);t.popup=window.open(y,"",v);window.addEventListener("message",p);h=window.setInterval(w,1e3);f(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}},t.prototype.closeDialog=function(n,r,u){t.popup?(t.popup.close(),t.popup=i,u(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)):u(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)},t.prototype.sendMessage=function(n){var t=n[Microsoft.Office.WebExtension.Parameters.MessageContent];!isNaN(parseFloat(t))&&isFinite(t)&&(t=t.toString());this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.SendMessage,t,i)},t}();n.WebViewHostController=t}(OSFWebView||(OSFWebView={})),function(n){(function(n){var t="EventCallback",i="MethodCallback";n[n[i]=0]=i;n[n[t]=1]=t})(n.CallbackType||(n.CallbackType={}));var i=n.CallbackType,t=function(){function n(n,t,i){this.callbackType=n;this.callbackId=t;this.params=i}return n}();n.CallbackData=t}(CrossIFrameCommon||(CrossIFrameCommon={})),function(n){var t=function(){function n(){}return n.getInstance=function(){return n.uniqueInstance==null&&(n.uniqueInstance=new n),n.uniqueInstance},n.prototype.postMessage=function(n,t){agaveHost.postMessage(t)},n.prototype.ReceiveMessage=function(n){switch(n.callbackType){case CrossIFrameCommon.CallbackType.MethodCallback:OSFWebView.ScriptMessaging.agaveHostCallback(n.callbackId,n.params);break;case CrossIFrameCommon.CallbackType.EventCallback:OSFWebView.ScriptMessaging.agaveHostEventCallback(n.callbackId,n.params)}},n}();n.Poster=t}(Android||(Android={}));OSF.DDA.ClientSettingsManager={getSettingsExecuteMethod:function(n){return function(t){var i,r,u=function(n,i){t.onReceiving&&t.onReceiving();t.onComplete&&t.onComplete(n,i)};try{n(t.hostCallArgs,t.onCalling,u)}catch(f){i=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;r={name:Strings.OfficeOM.L_InternalError,message:f};u(i,r)}}},read:function(n,t){var u=[],f=[],i,r;n&&n();i=OSF._OfficeAppFactory.getInitializationHelper();r=function(n){t&&t(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,n.get_settings())};i.getAppContext(null,r)},write:function(n,t,i,r){var u={},e=[],o=[],f,s;for(f in n)e.push(f),o.push(n[f]);u.keys=e;u.values=o;i&&i();s=function(n){r&&r(n[0],null)};OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.WriteSettings,u,s)}};OSF.InitializationHelper.prototype.initializeSettings=function(n,t){var i=n.get_settings();return this.deserializeSettings(i,t)};OSF.InitializationHelper.prototype.getAppContext=function(n,t){var r=function(n){var f,i=OSF.WebView.AppContextProperties,e=n[i.AppType],o=!1;for(var l in OSF.AppName)if(OSF.AppName[l]==e){o=!0;break}if(!o)throw"Unsupported client type "+e;for(var s=n[i.Settings],h={},c=s[0],a=s[1],r=0;r40)&&(n=OSF.OUtil.Guid.generateNewGuid(),t.setValue(t.clientIDKey,n)),n},n.prototype.saveLog=function(n,t){var i=this,u=i.getValue(i.logIdSetKey);u=(u&&u.length>0?u+";":r)+n;i.setValue(i.logIdSetKey,u);i.setValue(n,t)},n.prototype.enumerateLog=function(n,t){var i=this,e=i.getValue(i.logIdSetKey),u,o,r,f;if(e){u=e.split(";");for(o in u)r=u[o],f=i.getValue(r),f&&(n&&n(r,f),t&&i.remove(r));t&&i.remove(i.logIdSetKey)}},n.prototype.getValue=function(n){var t=OSF.OUtil.getLocalStorage(),i=r;return t&&(i=t.getItem(n)),i},n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)},n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}},n}(),o=function(){function t(){}return t.prototype.LogData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(t)}catch(i){}},t.prototype.LogRawData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(t))}catch(i){}},t}();n.initialize=y;n.onAppActivated=p;n.onScriptDone=w;n.onCallDone=b;n.onMethodDone=k;n.onPropertyDone=d;n.onEventDone=g;n.onRegisterDone=nt;n.onAppClosed=tt;n.setOsfControlAppCorrelationId=it;n.doAppInitializationLogging=l;n.logAppCommonMessage=rt;n.logAppException=ut;OSF.AppTelemetry=n}(OSFAppTelemetry||(OSFAppTelemetry={}));Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(n){var i=this,r,t,u;i._eventHandlers={};i._objectEventHandlers={};i._queuedEventsArgs={};for(r in n)t=n[r],u=t=="objectDeleted"||t=="objectSelectionChanged"||t=="objectDataChanged"||t=="contentControlAdded",u?i._objectEventHandlers[t]={}:i._eventHandlers[t]=[],i._queuedEventsArgs[t]=[]};OSF.EventDispatch.prototype={getSupportedEvents:function(){var n=[];for(var t in this._eventHandlers)n.push(t);for(t in this._objectEventHandlers)n.push(t);return n},supportsEvent:function(n){for(var t in this._eventHandlers)if(n==t)return!0;for(t in this._objectEventHandlers)if(n==t)return!0;return!1},hasEventHandler:function(n,t){var i=this._eventHandlers[n],r;if(i&&i.length>0)for(r in i)if(i[r]===t)return!0;return!1},hasObjectEventHandler:function(n,t,i){var f=this._objectEventHandlers[n],r,u;if(f!=null)for(r=f[t],u=0;r!=null&&u0)for(r=0;r0?(this._eventHandlers[n]=[],!0):!1},clearObjectEventHandlers:function(n,t){return this._objectEventHandlers[n]!=null&&this._objectEventHandlers[n][t]!=null?(this._objectEventHandlers[n][t]=[],!0):!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},getObjectEventHandlerCount:function(n,t){return this._objectEventHandlers[n]==null||this._objectEventHandlers[n][t]==null?0:this._objectEventHandlers[n][t].length},fireEvent:function(n){var t,i,r;if(n.type==undefined)return!1;if(t=n.type,t&&this._eventHandlers[t]){i=this._eventHandlers[t];for(r in i)i[r](n);return!0}else return!1},fireObjectEvent:function(n,t){var i,f,r,u;if(t.type==undefined)return!1;if(i=t.type,i&&this._objectEventHandlers[i]&&(f=this._objectEventHandlers[i],r=f[n],r!=null)){for(u=0;u0)){for(r=t[0];i.length>0;)u=i.shift(),r(u);return!0}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var e="outlookwebapp",o="outlook",f="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(n,i[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:r=new OSF.DDA.RichApiMessageEventArgs(n,i);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]==o||OSF._OfficeAppFactory.getHostInfo()[f]==e)r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i),t.initialize(r.initialData),t.setCurrentItemNumber(r.itemNumber.itemNumber);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]==o||OSF._OfficeAppFactory.getHostInfo()[f]==e)r=new OSF.DDA.OlkRecipientsChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]==o||OSF._OfficeAppFactory.getHostInfo()[f]==e)r=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var i=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),t=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];t(arguments,i,n)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(n){var i=OSF.DDA.SyncMethodNames.MessageParent.displayName,t=this,r;t[i]||OSF.OUtil.defineEnumerableProperty(t,i,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return n(arguments,t)}});r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;t[r]||typeof OSF.DialogParentMessageEventDispatch=="undefined"||OSF.DDA.DispIdHost.addEventSupport(t,OSF.DialogParentMessageEventDispatch,n);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(n){n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:n[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}}],privateStateCallbacks:[],onSucceeded:function(n){var f=n[Microsoft.Office.WebExtension.Parameters.Id],i=n[Microsoft.Office.WebExtension.Parameters.Data],t=new OSF.DialogHandler,e=OSF.DDA.AsyncMethodNames.CloseAsync.displayName,r,u;return OSF.OUtil.defineEnumerableProperty(t,e,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];n(arguments,f,i,t)}}),r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName,OSF.OUtil.defineEnumerableProperty(t,r,{value:function(){var r=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],n=r.verifyAndExtractCall(arguments,t,i),u=n[Microsoft.Office.WebExtension.Parameters.EventType],f=n[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(u,f)}}),u=OSF.DDA.SyncMethodNames.SendMessage.displayName,OSF.OUtil.defineEnumerableProperty(t,u,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return n(arguments,i,t)}}),t},checkCallArgs:function(n){return n[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Width]=1),n[Microsoft.Office.WebExtension.Parameters.Width]>100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99),n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1),n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99),n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(n){try{n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,n);OSF.ClientHostController.openDialog(n.dispId,n.targetId,function(t,i){n.onEvent&&n.onEvent(i);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(n){n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,n);try{OSF.ClientHostController.closeDialog(n.dispId,n.targetId,t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.messageParent=function(n){try{n.onCalling&&n.onCalling();var i=(new Date).getTime(),t=OSF.ClientHostController.messageParent(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs((new Date).getTime()-i),t),t}catch(r){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(r)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.sendMessage=function(n){try{n.onCalling&&n.onCalling();var r=(new Date).getTime(),t=OSF.ClientHostController.sendMessage(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),t}catch(i){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(i)}};Microsoft.Office.WebExtension.TableData=function(n,t){function i(n){if(n==null||n==undefined)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(n,2);t<2;t++)n=[n];return n}catch(i){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(n){t=i(n)}},rows:{get:function(){return n},set:function(t){n=t==null||OSF.OUtil.isArray(t)&&t.length==0?[]:i(t)}}});this.headers=t;this.rows=n};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(n){return new Microsoft.Office.WebExtension.TableData(n[OSF.DDA.TableDataProperties.TableRows],n[OSF.DDA.TableDataProperties.TableHeaders])};Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var n=null;return{findArrayDimensionality:function(n){if(OSF.OUtil.isArray(n)){for(var t=0,i=0;i6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix&&(i=new Date(parseInt(t.slice(5,-1))),i)?i:t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,!0);r[i]=t}catch(u){}}return r}};OSF.DDA.Settings=function(n){var t="name",i;n=n||{};i=function(n){var i=OSF.OUtil.getSessionStorage(),t,r;i&&(t=OSF.DDA.SettingsManager.serializeSettings(n),r=JSON?JSON.stringify(t):Sys.Serialization.JavaScriptSerializer.serialize(t),i.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),r))};OSF.OUtil.defineEnumerableProperties(this,{get:{value:function(i){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]),r;if(u)throw u;return r=n[i],typeof r=="undefined"?null:r}},set:{value:function(r,u){var f=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1},{name:"value",mayBeNull:!0}]);if(f)throw f;n[r]=u;i(n)}},remove:{value:function(r){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]);if(u)throw u;delete n[r];i(n)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],n)};OSF.DDA.RefreshableSettings=function(n){OSF.DDA.RefreshableSettings.uber.constructor.call(this,n);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],n);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:n}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(n,t){return t}}],onSucceeded:function(n,t,i){var f=n[OSF.DDA.SettingsManager.SerializedSettings],u=OSF.DDA.SettingsManager.deserializeSettings(f),e=i[OSF.DDA.SettingsManager.RefreshingSettings];for(var r in e)t.remove(r);for(r in u)t.set(r,u[r]);return t}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(n,t){return OSF.DDA.SettingsManager.serializeSettings(t)}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});Microsoft.Office.WebExtension.BindingType={Table:"table",Text:"text",Matrix:"matrix"};OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType};OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{BindingList:"BindingList"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{Subset:"subset",BindingProperties:"BindingProperties"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList,OSF.DDA.PropertyDescriptors.BindingProperties);OSF.DDA.BindingPromise=function(n,t){this._id=n;OSF.OUtil.defineEnumerableProperty(this,"onFail",{get:function(){return t},set:function(n){var i=typeof n;if(i!="undefined"&&i!="function")throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,i);t=n}})};OSF.DDA.BindingPromise.prototype={_fetch:function(n){var t=this,i;return t.binding?n&&n(t.binding):t._binding||(i=t,Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(t._id,function(t){t.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded?(OSF.OUtil.defineEnumerableProperty(i,"binding",{value:t.value}),n&&n(i.binding)):i.onFail&&i.onFail(t)})),t},getDataAsync:function(){var n=arguments;return this._fetch(function(t){t.getDataAsync.apply(t,n)}),this},setDataAsync:function(){var n=arguments;return this._fetch(function(t){t.setDataAsync.apply(t,n)}),this},addHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.addHandlerAsync.apply(t,n)}),this},removeHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.removeHandlerAsync.apply(t,n)}),this}};OSF.DDA.BindingFacade=function(n){this._eventDispatches=[];OSF.OUtil.defineEnumerableProperty(this,"document",{value:n});var t=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[t.AddFromSelectionAsync,t.AddFromNamedItemAsync,t.GetAllAsync,t.GetByIdAsync,t.ReleaseByIdAsync])};OSF.DDA.UnknownBinding=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}})};OSF.DDA.Binding=function(n,t){var r,u,i,f;OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}});r=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[r.GetDataAsync,r.SetDataAsync]);u=Microsoft.Office.WebExtension.EventType;i=t.bindings._eventDispatches;i[n]||(i[n]=new OSF.EventDispatch([u.BindingSelectionChanged,u.BindingDataChanged]));f=i[n];OSF.DDA.DispIdHost.addEventSupport(this,f)};OSF.DDA.generateBindingId=function(){return"UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+(new Date).getTime()};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureBinding=function(n,t){var r=n[OSF.DDA.BindingProperties.Id],u=n[OSF.DDA.BindingProperties.RowCount],f=n[OSF.DDA.BindingProperties.ColumnCount],s=n[OSF.DDA.BindingProperties.HasHeaders],i,e,o;switch(n[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:i=new OSF.DDA.TextBinding(r,t);break;case Microsoft.Office.WebExtension.BindingType.Matrix:i=new OSF.DDA.MatrixBinding(r,t,u,f);break;case Microsoft.Office.WebExtension.BindingType.Table:e=function(){return OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument};o=e()&&OSF.DDA.ExcelTableBinding?OSF.DDA.ExcelTableBinding:OSF.DDA.TableBinding;i=new o(r,t,u,f,s);break;default:i=new OSF.DDA.UnknownBinding(r,t)}return i};OSF.DDA.AsyncMethodNames.addNames({AddFromSelectionAsync:"addFromSelectionAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:"getByIdAsync",ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync"}),function(){function u(n){return OSF.DDA.OMFactory.manufactureBinding(n,Microsoft.Office.WebExtension.context.document)}function f(n){return n.id}function e(n,t,i){var u=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&u&&(u[OSF.DDA.TableDataProperties.TableRows]!=undefined||u[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(u=OSF.DDA.OMFactory.manufactureTableData(u)),u=OSF.DDA.DataCoercion.coerceData(u,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),u==undefined?r:u}var t="number",i="object",n="string",r=null;OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:[n]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return!0}}],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.BindingList],u)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n,t,i){var r=i[Microsoft.Office.WebExtension.Parameters.Id];delete t._eventDispatches[r]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n,t){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&n[Microsoft.Office.WebExtension.Parameters.RowCount]==0&&n[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn],delete n[Microsoft.Office.WebExtension.Parameters.RowCount],delete n[Microsoft.Office.WebExtension.Parameters.ColumnCount]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]||n[Microsoft.Office.WebExtension.Parameters.RowCount]||n[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[n,i,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}]})}();OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.MatrixBinding=function(n,t,i,r){OSF.DDA.MatrixBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Matrix},rowCount:{value:i?i:0},columnCount:{value:r?r:0}})};OSF.OUtil.extend(OSF.DDA.MatrixBinding,OSF.DDA.Binding);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.BindingProperties,fromHost:[{name:OSF.DDA.BindingProperties.Id,value:0},{name:OSF.DDA.BindingProperties.Type,value:1},{name:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,value:2}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.BindingType,toHost:[{name:Microsoft.Office.WebExtension.BindingType.Text,value:0},{name:Microsoft.Office.WebExtension.BindingType.Matrix,value:1},{name:Microsoft.Office.WebExtension.BindingType.Table,value:2}],invertible:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,value:0},{name:Microsoft.Office.WebExtension.Parameters.Id,value:1},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:2},{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseBindingMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAllBindingsMethod,fromHost:[{name:OSF.DDA.ListDescriptors.BindingList,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:2},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:3},{name:OSF.DDA.PropertyDescriptors.Subset,value:4}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.Data,value:2},{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,fromHost:[{name:OSF.DDA.BindingProperties.RowCount,value:0},{name:OSF.DDA.BindingProperties.ColumnCount,value:1},{name:OSF.DDA.BindingProperties.HasHeaders,value:2}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.Subset,toHost:[{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:0},{name:OSF.DDA.SafeArray.UniqueArguments.Run,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Offset,toHost:[{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:0},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Run,toHost:[{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:0},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddColumnsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearAllRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{TableDataProperties:"TableDataProperties"});OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};OSF.DDA.TableBinding=function(n,t,i,r,u){OSF.DDA.TableBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:i?i:0},columnCount:{value:r?r:0},hasHeaders:{value:u?u:!1}});var f=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[f.AddRowsAsync,f.AddColumnsAsync,f.DeleteAllDataValuesAsync])};OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync"}),function(){function n(n){return n.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]})}();OSF.DDA.TextBinding=function(n,t){OSF.DDA.TextBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperty(this,"type",{value:Microsoft.Office.WebExtension.BindingType.Text})};OSF.OUtil.extend(OSF.DDA.TextBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddFromPromptAsync:"addFromPromptAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromPromptAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:["string"],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.PromptText,value:{types:["string"],calculate:function(){return Strings.OfficeOM.L_AddBindingFromPromptDefaultText}}},{name:Microsoft.Office.WebExtension.Parameters.SampleData,value:{types:["object"],defaultValue:null}}],privateStateCallbacks:[],onSucceeded:function(n){return OSF.DDA.OMFactory.manufactureBinding(n,Microsoft.Office.WebExtension.context.document)}});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromPromptMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:1},{name:Microsoft.Office.WebExtension.Parameters.PromptText,value:2}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"});OSF.DDA.DocumentSelectionChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:n}})};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDeleted:"objectDeleted"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectSelectionChanged:"objectSelectionChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDataChanged:"objectDataChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ContentControlAdded:"contentControlAdded"});OSF.DDA.ObjectEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:n},object:{value:t}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDeletedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDataChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidContentControlAddedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{BindingSelectionChanged:"bindingSelectionChanged",BindingDataChanged:"bindingDataChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{BindingSelectionChangedEvent:"BindingSelectionChangedEvent"});OSF.DDA.BindingSelectionChangedEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingSelectionChanged},binding:{value:n}});for(var i in t)OSF.OUtil.defineEnumerableProperty(this,i,{value:t[i]})};OSF.DDA.BindingDataChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingDataChanged},binding:{value:n}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:0},{name:OSF.DDA.PropertyDescriptors.Subset,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingDataChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FilterType,{OnlyVisible:"onlyVisible"});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.OnlyVisible,value:1}]});Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"};Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"};Microsoft.Office.WebExtension.Index={First:"first",Last:"last",Next:"next",Previous:"previous"};OSF.DDA.AsyncMethodNames.addNames({GoToByIdAsync:"goToByIdAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GoToByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string","number"]},{name:Microsoft.Office.WebExtension.Parameters.GoToType,"enum":Microsoft.Office.WebExtension.GoToType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:{"enum":Microsoft.Office.WebExtension.SelectionMode,defaultValue:Microsoft.Office.WebExtension.SelectionMode.Default}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:0},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:1},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:2},{name:Microsoft.Office.WebExtension.GoToType.Index,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:0},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:1},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:1},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:2}]});OSF.DDA.AsyncMethodNames.addNames({ExecuteRichApiRequestAsync:"executeRichApiRequestAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[]});OSF.OUtil.setNamespace("RichApi",OSF.DDA);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidExecuteRichApiRequestMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(n){OSF.OUtil.defineEnumerableProperties(this,{url:{value:n[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(n){return new Microsoft.Office.WebExtension.FileProperties(n)}});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,fromHost:[{name:OSF.DDA.FilePropertiesDescriptor.Url,value:0}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.ExcelTableBinding=function(n,t,i,r,u){var f=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[f.ClearFormatsAsync,f.SetTableOptionsAsync,f.SetFormatsAsync]);OSF.DDA.ExcelTableBinding.uber.constructor.call(this,n,t,i,r,u);OSF.OUtil.finalizeProperties(this)};OSF.OUtil.extend(OSF.DDA.ExcelTableBinding,OSF.DDA.TableBinding),function(){var t="number",n="object",i="string";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[i,n,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:[n],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:[n],defaultValue:[]}}],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[i,n,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[n,i],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[n],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:[n],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:[n],defaultValue:[]}}],checkCallArgs:function(n,t){var i=Microsoft.Office.WebExtension.Parameters;if(n[i.StartRow]==0&&n[i.StartColumn]==0&&OSF.OUtil.isArray(n[i.CellFormat])&&n[i.CellFormat].length===0&&OSF.OUtil.isArray(n[i.TableOptions])&&n[i.TableOptions].length===0&&(delete n[i.StartRow],delete n[i.StartColumn],delete n[i.CellFormat],delete n[i.TableOptions]),n[i.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[i.StartRow]&&n[i.StartRow]!=0||n[i.StartColumn]&&n[i.StartColumn]!=0||n[i.CellFormat]||n[i.TableOptions]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:function(n){return n.id}}]});OSF.DDA.BindingPromise.prototype.setTableOptionsAsync=function(){var n=arguments;return this._fetch(function(t){t.setTableOptionsAsync.apply(t,n)}),this};OSF.DDA.BindingPromise.prototype.setFormatsAsync=function(){var n=arguments;return this._fetch(function(t){t.setFormatsAsync.apply(t,n)}),this};OSF.DDA.BindingPromise.prototype.clearFormatsAsync=function(){var n=arguments;return this._fetch(function(t){t.clearFormatsAsync.apply(t,n)}),this}}(),function(){function n(n){return n.id}OSF.DDA.AsyncMethodNames.addNames({ClearFormatsAsync:"clearFormatsAsync",SetTableOptionsAsync:"setTableOptionsAsync",SetFormatsAsync:"setFormatsAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ClearFormatsAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetTableOptionsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TableOptions,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetFormatsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CellFormat,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]})}();Microsoft.Office.WebExtension.Table={All:0,Data:1,Headers:2},function(){var u="undefined",e="auto fit",o="distributed",f="none";OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearFormatsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetTableOptionsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetFormatsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:2},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.Data,value:2},{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:3},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:4},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:5}]});var s={headerRow:0,bandedRows:1,firstColumn:2,lastColumn:3,bandedColumns:4,filterButton:5,style:6,totalRow:7},h={row:0,column:1},t={alignHorizontal:{text:"alignHorizontal",type:1},alignVertical:{text:"alignVertical",type:2},backgroundColor:{text:"backgroundColor",type:101},borderStyle:{text:"borderStyle",type:201},borderColor:{text:"borderColor",type:202},borderTopStyle:{text:"borderTopStyle",type:203},borderTopColor:{text:"borderTopColor",type:204},borderBottomStyle:{text:"borderBottomStyle",type:205},borderBottomColor:{text:"borderBottomColor",type:206},borderLeftStyle:{text:"borderLeftStyle",type:207},borderLeftColor:{text:"borderLeftColor",type:208},borderRightStyle:{text:"borderRightStyle",type:209},borderRightColor:{text:"borderRightColor",type:210},borderOutlineStyle:{text:"borderOutlineStyle",type:211},borderOutlineColor:{text:"borderOutlineColor",type:212},borderInlineStyle:{text:"borderInlineStyle",type:213},borderInlineColor:{text:"borderInlineColor",type:214},fontFamily:{text:"fontFamily",type:301},fontStyle:{text:"fontStyle",type:302},fontSize:{text:"fontSize",type:303},fontUnderlineStyle:{text:"fontUnderlineStyle",type:304},fontColor:{text:"fontColor",type:305},fontDirection:{text:"fontDirection",type:306},fontStrikethrough:{text:"fontStrikethrough",type:307},fontSuperscript:{text:"fontSuperscript",type:308},fontSubscript:{text:"fontSubscript",type:309},fontNormal:{text:"fontNormal",type:310},indentLeft:{text:"indentLeft",type:401},indentRight:{text:"indentRight",type:402},numberFormat:{text:"numberFormat",type:501},width:{text:"width",type:701},height:{text:"height",type:702},wrapping:{text:"wrapping",type:703}},r=[{name:f,value:0},{name:"thin",value:1},{name:"medium",value:2},{name:"dashed",value:3},{name:"dotted",value:4},{name:"thick",value:5},{name:"double",value:6},{name:"hair",value:7},{name:"medium dashed",value:8},{name:"dash dot",value:9},{name:"medium dash dot",value:10},{name:"dash dot dot",value:11},{name:"medium dash dot dot",value:12},{name:"slant dash dot",value:13}],i=[{name:f,value:0},{name:"black",value:1},{name:"blue",value:2},{name:"gray",value:3},{name:"green",value:4},{name:"orange",value:5},{name:"pink",value:6},{name:"purple",value:7},{name:"red",value:8},{name:"teal",value:9},{name:"turquoise",value:10},{name:"violet",value:11},{name:"white",value:12},{name:"yellow",value:13},{name:"automatic",value:14}],n=OSF.DDA.SafeArray.Delegate.ParameterMap;n.define({type:t.alignHorizontal.text,toHost:[{name:"general",value:0},{name:"left",value:1},{name:"center",value:2},{name:"right",value:3},{name:"fill",value:4},{name:"justify",value:5},{name:"center across selection",value:6},{name:o,value:7}]});n.define({type:t.alignVertical.text,toHost:[{name:"top",value:0},{name:"center",value:1},{name:"bottom",value:2},{name:"justify",value:3},{name:o,value:4}]});n.define({type:t.backgroundColor.text,toHost:i});n.define({type:t.borderStyle.text,toHost:r});n.define({type:t.borderColor.text,toHost:i});n.define({type:t.borderTopStyle.text,toHost:r});n.define({type:t.borderTopColor.text,toHost:i});n.define({type:t.borderBottomStyle.text,toHost:r});n.define({type:t.borderBottomColor.text,toHost:i});n.define({type:t.borderLeftStyle.text,toHost:r});n.define({type:t.borderLeftColor.text,toHost:i});n.define({type:t.borderRightStyle.text,toHost:r});n.define({type:t.borderRightColor.text,toHost:i});n.define({type:t.borderOutlineStyle.text,toHost:r});n.define({type:t.borderOutlineColor.text,toHost:i});n.define({type:t.borderInlineStyle.text,toHost:r});n.define({type:t.borderInlineColor.text,toHost:i});n.define({type:t.fontStyle.text,toHost:[{name:"regular",value:0},{name:"italic",value:1},{name:"bold",value:2},{name:"bold italic",value:3}]});n.define({type:t.fontUnderlineStyle.text,toHost:[{name:f,value:0},{name:"single",value:1},{name:"double",value:2},{name:"single accounting",value:3},{name:"double accounting",value:4}]});n.define({type:t.fontColor.text,toHost:i});n.define({type:t.fontDirection.text,toHost:[{name:"context",value:0},{name:"left-to-right",value:1},{name:"right-to-left",value:2}]});n.define({type:t.width.text,toHost:[{name:e,value:-1}]});n.define({type:t.height.text,toHost:[{name:e,value:-1}]});n.define({type:Microsoft.Office.WebExtension.Parameters.TableOptions,toHost:[{name:"headerRow",value:0},{name:"bandedRows",value:1},{name:"firstColumn",value:2},{name:"lastColumn",value:3},{name:"bandedColumns",value:4},{name:"filterButton",value:5},{name:"style",value:6},{name:"totalRow",value:7}]});n.dynamicTypes[Microsoft.Office.WebExtension.Parameters.CellFormat]={toHost:function(t){for(var i in t)t[i].format&&(t[i].format=n.doMapValues(t[i].format,"toHost"));return t},fromHost:function(n){return n}};n.setDynamicType(Microsoft.Office.WebExtension.Parameters.CellFormat,{toHost:function(n){var c="cells",y="format",w=0,b=1,p=[],l,i,r,f,e,o,a,v,s;for(l in n){if(i=n[l],r=[],typeof i[c]!==u){if(f=i[c],typeof i[c]=="object"){e=[];for(o in f)typeof h[o]!==u&&(e[h[o]]=f[o])}else e=f;r[w]=e}if(i[y]){a=i[y];v=[];for(s in a)typeof t[s]!==u&&v.push([t[s].type,a[s]]);r[b]=v}p[l]=r}return p},fromHost:function(n){return n}});n.setDynamicType(Microsoft.Office.WebExtension.Parameters.TableOptions,{toHost:function(n){var i=[];for(var t in n)typeof s[t]!==u&&(i[s[t]]=n[t]);return i},fromHost:function(n){return n}})}();OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType,{Image:"image"});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.CoercionType,toHost:[{name:Microsoft.Office.WebExtension.CoercionType.Image,value:8}]});OSF.DDA.ExcelDocument=function(n,t){var i=this,r=new OSF.DDA.BindingFacade(i);OSF.DDA.DispIdHost.addAsyncMethods(r,[OSF.DDA.AsyncMethodNames.AddFromPromptAsync]);OSF.DDA.DispIdHost.addAsyncMethods(i,[OSF.DDA.AsyncMethodNames.GoToByIdAsync]);OSF.DDA.DispIdHost.addAsyncMethods(i,[OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync]);OSF.DDA.ExcelDocument.uber.constructor.call(i,n,r,t);OSF.OUtil.finalizeProperties(i)};OSF.OUtil.extend(OSF.DDA.ExcelDocument,OSF.DDA.JsomDocument);OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(n,t){OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM);n.doc=new OSF.DDA.ExcelDocument(n,this._initializeSettings(n,!1));OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi,[OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]);t()},function(){var t="boolean",n="number",i="object";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string",i,n,t]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:[n,i],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:[n,i],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[n,t],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[n,t],defaultValue:!1}}],privateStateCallbacks:[]})}();__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t=function(){function n(n,t,i){this.m_actionInfo=n;this.m_isWriteOperation=t;this.m_isRestrictedResourceAccess=i}return Object.defineProperty(n.prototype,"actionInfo",{get:function(){return this.m_actionInfo},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isRestrictedResourceAccess",{get:function(){return this.m_isRestrictedResourceAccess},enumerable:!0,configurable:!0}),n}();n.Action=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_callback=n}return n.prototype._handleResult=function(n){this.m_callback&&this.m_callback()},n}(),i=function(){function i(){}return i.createSetPropertyAction=function(t,i,r,u){var f;n.Utility.validateObjectPath(i);var o={Id:t._nextId(),ActionType:4,Name:r,ObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},s=[u],e=n.Utility.setMethodArguments(t,o.ArgumentInfo,s);return n.Utility.validateReferencedObjectPaths(e),t._pendingRequest.ensureInstantiateObjectPath(i._objectPath),t._pendingRequest.ensureInstantiateObjectPaths(e),f=new n.Action(o,!0,!1),t._pendingRequest.addAction(f),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addReferencedObjectPaths(e),f.referencedObjectPath=i._objectPath,f.referencedArgumentObjectPaths=e,f},i.createMethodAction=function(t,i,r,u,f,e){var h,o,c,s;return n.Utility.validateObjectPath(i),h={Id:t._nextId(),ActionType:3,Name:r,ObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},o=n.Utility.setMethodArguments(t,h.ArgumentInfo,f),n.Utility.validateReferencedObjectPaths(o),t._pendingRequest.ensureInstantiateObjectPath(i._objectPath),t._pendingRequest.ensureInstantiateObjectPaths(o),c=u!=1,s=new n.Action(h,c,e),t._pendingRequest.addAction(s),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addReferencedObjectPaths(o),s.referencedObjectPath=i._objectPath,s.referencedArgumentObjectPaths=o,s},i.createQueryAction=function(t,i,r){var f,u;return n.Utility.validateObjectPath(i),t._pendingRequest.ensureInstantiateObjectPath(i._objectPath),f={Id:t._nextId(),ActionType:2,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},f.QueryInfo=r,u=new n.Action(f,!1,!1),t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u.referencedObjectPath=i._objectPath,u},i.createRecursiveQueryAction=function(t,i,r){n.Utility.validateObjectPath(i);t._pendingRequest.ensureInstantiateObjectPath(i._objectPath);var f={Id:t._nextId(),ActionType:6,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id,RecursiveQueryInfo:r},u=new n.Action(f,!1,!1);return t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u.referencedObjectPath=i._objectPath,u},i.createQueryAsJsonAction=function(t,i,r){var f,u;return n.Utility.validateObjectPath(i),t._pendingRequest.ensureInstantiateObjectPath(i._objectPath),f={Id:t._nextId(),ActionType:7,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},f.QueryInfo=r,u=new n.Action(f,!1,!1),t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u.referencedObjectPath=i._objectPath,u},i.createEnsureUnchangedAction=function(t,i,r){n.Utility.validateObjectPath(i);t._pendingRequest.ensureInstantiateObjectPath(i._objectPath);var f={Id:t._nextId(),ActionType:8,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id,ObjectState:r},u=new n.Action(f,!1,!1);return t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u.referencedObjectPath=i._objectPath,u},i.createInstantiateAction=function(t,i){n.Utility.validateObjectPath(i);t._pendingRequest.ensureInstantiateObjectPath(i._objectPath.parentObjectPath);t._pendingRequest.ensureInstantiateObjectPaths(i._objectPath.argumentObjectPaths);var u={Id:t._nextId(),ActionType:1,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},r=new n.Action(u,!1,!1);return t._pendingRequest.addAction(r),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addActionResultHandler(r,new n.InstantiateActionResultHandler(i)),r.referencedObjectPath=i._objectPath,r},i.createTraceAction=function(t,i,r){var u={Id:t._nextId(),ActionType:5,Name:"Trace",ObjectPathId:0},f=new n.Action(u,!1,!1);return t._pendingRequest.addAction(f),r&&t._pendingRequest.addTrace(u.Id,i),f},i.createTraceMarkerForCallback=function(n,r){var u=i.createTraceAction(n,null,!1);n._pendingRequest.addActionResultHandler(u,new t(r))},i}();n.ActionFactory=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(t,i){n.Utility.checkArgumentNull(t,"context");this.m_context=t;this.m_objectPath=i;this.m_objectPath&&(t._processingResult||(n.ActionFactory.createInstantiateAction(t,this),t._autoCleanup&&this._KeepReference&&t.trackedObjects._autoAdd(this)))}return Object.defineProperty(t.prototype,"context",{get:function(){return this.m_context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_objectPath",{get:function(){return this.m_objectPath},set:function(n){this.m_objectPath=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNull",{get:function(){return n.Utility.throwIfNotLoaded("isNull",this._isNull,null,this._isNull),this._isNull},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNullObject",{get:function(){return n.Utility.throwIfNotLoaded("isNullObject",this._isNull,null,this._isNull),this._isNull},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_isNull",{get:function(){return this.m_isNull},set:function(n){this.m_isNull=n;n&&this.m_objectPath&&this.m_objectPath._updateAsNullObject()},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){this._isNull=n.Utility.isNullOrUndefined(t);this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this,t)},t.prototype._handleIdResult=function(t){this._isNull=n.Utility.isNullOrUndefined(t);n.Utility.fixObjectPathIfNecessary(this,t);this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this,t)},t.prototype._recursivelySet=function(i,r,u,f,e){var c=i instanceof t,v=i,o,a,h,s,l;if(c)if(Object.getPrototypeOf(this)===Object.getPrototypeOf(i))i=JSON.parse(JSON.stringify(i));else throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"properties",errorLocation:this._className+".set"});try{for(s=0;s0},enumerable:!0,configurable:!0}),t.prototype._getLastAction=function(){return this.m_actions[this.m_actions.length-1]},t.prototype.addTrace=function(n,t){this.m_traceInfos[n]=t},t.prototype.ensureInstantiateObjectPath=function(t){if(t){if(this.m_instantiatedObjectPaths[t.objectPathInfo.Id])return;if(this.ensureInstantiateObjectPath(t.parentObjectPath),this.ensureInstantiateObjectPaths(t.argumentObjectPaths),!this.m_instantiatedObjectPaths[t.objectPathInfo.Id]){var r={Id:this.m_context._nextId(),ActionType:1,Name:"",ObjectPathId:t.objectPathInfo.Id},i=new n.Action(r,!1,!1);i.referencedObjectPath=t;this.addAction(i)}}},t.prototype.ensureInstantiateObjectPaths=function(n){if(n)for(var t=0;t=0;--r)if(i=n[r],u=i.actionInfo.Id,i.referencedObjectPath&&t._updateLastUsedActionIdOfObjectPathId(e,i.referencedObjectPath,u),o=i.referencedArgumentObjectPaths,o)for(v=o.length,s=0;s0?i.actionInfo.L=c:i.actionInfo.L&&delete i.actionInfo.L},t}();n.ClientRequest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;n._internalConfig={showDisposeInfoInDebugInfo:!1,enableEarlyDispose:!0,alwaysPolyfillClientObjectFetchMethod:!1};t=function(){function t(){}return t.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},t.prototype._createRequestExecutorOrNull=function(){return null},Object.defineProperty(t.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),t}();n.SessionBase=t;i=function(){function i(r){if(this.m_customRequestHeaders={},this._onRunFinishedNotifiers=[],this.m_nextId=0,i._overrideSession)this.m_requestUrlAndHeaderInfoResolver=i._overrideSession;else if((n.Utility.isNullOrUndefined(r)||typeof r=="string"&&r.length===0)&&(r=i.defaultRequestUrlAndHeaders,r||(r={url:n.Constants.localDocument,headers:{}})),typeof r=="string")this.m_requestUrlAndHeaderInfo={url:r,headers:{}};else if(i.isRequestUrlAndHeaderInfoResolver(r))this.m_requestUrlAndHeaderInfoResolver=r;else if(i.isRequestUrlAndHeaderInfo(r)){var u=r;this.m_requestUrlAndHeaderInfo={url:u.url,headers:{}};n.Utility._copyHeaders(u.headers,this.m_requestUrlAndHeaderInfo.headers)}else throw n._Internal.RuntimeError._createInvalidArgError("url");this.m_requestUrlAndHeaderInfoResolver instanceof t&&(this.m_session=this.m_requestUrlAndHeaderInfoResolver);this._processingResult=!1;this._customData=n.Constants.iterativeExecutor;this.sync=this.sync.bind(this)}return Object.defineProperty(i.prototype,"session",{get:function(){return this.m_session},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"eventRegistration",{get:function(){return this.m_session?this.m_session.eventRegistration:n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_url",{get:function(){return this.m_requestUrlAndHeaderInfo?this.m_requestUrlAndHeaderInfo.url:null},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_pendingRequest",{get:function(){return this.m_pendingRequest==null&&(this.m_pendingRequest=new n.ClientRequest(this)),this.m_pendingRequest},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"debugInfo",{get:function(){var t=new n.RequestPrettyPrinter(this._rootObjectPropertyName,this._pendingRequest._objectPaths,this._pendingRequest._actions,n._internalConfig.showDisposeInfoInDebugInfo),i=t.process();return{pendingStatements:i}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"trackedObjects",{get:function(){return this.m_trackedObjects||(this.m_trackedObjects=new n.TrackedObjects(this)),this.m_trackedObjects},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"requestHeaders",{get:function(){return this.m_customRequestHeaders},enumerable:!0,configurable:!0}),i.prototype.load=function(t,r){n.Utility.validateContext(this,t);var u=i._parseQueryOption(r),f=n.ActionFactory.createQueryAction(this,t,u);this._pendingRequest.addActionResultHandler(f,t)},i.isLoadOption=function(t){if(!n.Utility.isUndefined(t.select)&&(typeof t.select=="string"||Array.isArray(t.select))||!n.Utility.isUndefined(t.expand)&&(typeof t.expand=="string"||Array.isArray(t.expand))||!n.Utility.isUndefined(t.top)&&typeof t.top=="number"||!n.Utility.isUndefined(t.skip)&&typeof t.skip=="number")return!0;for(var i in t)return!1;return!0},i.parseStrictLoadOption=function(n){var t={Select:[]};return i.parseStrictLoadOptionHelper(t,"","option",n),t},i.combineQueryPath=function(n,t,i){return n.length===0?t:n+i+t},i.parseStrictLoadOptionHelper=function(t,r,u,f){var e,o;for(e in f)if(o=f[e],e==="$all"){if(typeof o!="boolean")throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));o&&t.Select.push(i.combineQueryPath(r,"*","/"))}else if(e==="$top"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));t.Top=o}else if(e==="$skip"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));t.Skip=o}else if(typeof o=="boolean")o&&t.Select.push(i.combineQueryPath(r,e,"/"));else if(typeof o=="object")i.parseStrictLoadOptionHelper(t,i.combineQueryPath(r,e,"/"),i.combineQueryPath(u,e,"."),o);else throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));},i._parseQueryOption=function(t){var u={},f,r;if(typeof t=="string")f=t,u.Select=n.Utility._parseSelectExpand(f);else if(Array.isArray(t))u.Select=t;else if(typeof t=="object")if(r=t,i.isLoadOption(r)){if(typeof r.select=="string")u.Select=n.Utility._parseSelectExpand(r.select);else if(Array.isArray(r.select))u.Select=r.select;else if(!n.Utility.isNullOrUndefined(r.select))throw n._Internal.RuntimeError._createInvalidArgError("option.select");if(typeof r.expand=="string")u.Expand=n.Utility._parseSelectExpand(r.expand);else if(Array.isArray(r.expand))u.Expand=r.expand;else if(!n.Utility.isNullOrUndefined(r.expand))throw n._Internal.RuntimeError._createInvalidArgError("option.expand");if(typeof r.top=="number")u.Top=r.top;else if(!n.Utility.isNullOrUndefined(r.top))throw n._Internal.RuntimeError._createInvalidArgError("option.top");if(typeof r.skip=="number")u.Skip=r.skip;else if(!n.Utility.isNullOrUndefined(r.skip))throw n._Internal.RuntimeError._createInvalidArgError("option.skip");}else u=i.parseStrictLoadOption(t);else if(!n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError("option");return u},i.prototype.loadRecursive=function(t,r,u){var f,e,o;if(!n.Utility.isPlainJsonObject(r))throw n._Internal.RuntimeError._createInvalidArgError("options");f={};for(e in r)f[e]=i._parseQueryOption(r[e]);o=n.ActionFactory.createRecursiveQueryAction(this,t,{Queries:f,MaxDepth:u});this._pendingRequest.addActionResultHandler(o,t)},i.prototype.trace=function(t){n.ActionFactory.createTraceAction(this,t,!0)},i.prototype._processOfficeJsErrorResponse=function(n,t){},i.prototype.syncPrivateMain=function(){var t=this;return n.Utility._createPromiseFromResult(null).then(function(){if(!t.m_requestUrlAndHeaderInfo)return t.m_requestUrlAndHeaderInfoResolver._resolveRequestUrlAndHeaderInfo().then(function(i){if(t.m_requestUrlAndHeaderInfo=i,t.m_requestUrlAndHeaderInfo||(t.m_requestUrlAndHeaderInfo={url:n.Constants.localDocument,headers:{}}),n.Utility.isNullOrEmptyString(t.m_requestUrlAndHeaderInfo.url)&&(t.m_requestUrlAndHeaderInfo.url=n.Constants.localDocument),t.m_requestUrlAndHeaderInfo.headers||(t.m_requestUrlAndHeaderInfo.headers={}),typeof t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull=="function"){var r=t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull();r&&(t._requestExecutor=r)}})}).then(function(){var n=t._pendingRequest;return t.m_pendingRequest=null,t.processPreSyncPromises(n).then(function(){return t.syncPrivate(n)})})},i.prototype.syncPrivate=function(t){var f=this,e,o,s,u,h,r,i;return t.hasActions?(e=t.buildRequestMessageBody(),o=t.flags,this._requestExecutor||(this._requestExecutor=n.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)?new n.OfficeJsRequestExecutor(this):new n.HttpRequestExecutor),s=this._requestExecutor,u={},n.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,u),n.Utility._copyHeaders(this.m_customRequestHeaders,u),h={Url:this.m_requestUrlAndHeaderInfo.url,Headers:u,Body:e},t.invalidatePendingInvalidObjectPaths(),r=null,i=null,this._lastSyncStart=performance.now(),s.executeAsync(this._customData,o,h).then(function(u){return f._lastSyncEnd=performance.now(),r=f.processRequestExecutorResponseMessage(t,u),f.processPendingEventHandlers(t).catch(function(t){n.Utility.log("Error in processPendingEventHandlers");n.Utility.log(JSON.stringify(t));i=t})}).then(function(){var u,f;if(r){n.Utility.log("Throw error from response: "+JSON.stringify(r));throw r;}if(i){n.Utility.log("Throw error from ProcessEventHandler: "+JSON.stringify(i));u=null;i instanceof n._Internal.RuntimeError?(u=i,u.traceMessages=t._responseTraceMessages):(f=null,f=typeof i=="string"?i:i.message,n.Utility.isNullOrEmptyString(f)&&(f=n.Utility._getResourceString(n.ResourceStrings.cannotRegisterEvent)),u=new n._Internal.RuntimeError({code:n.ErrorCodes.cannotRegisterEvent,message:f,traceMessages:t._responseTraceMessages}));throw u;}})):this.processPendingEventHandlers(t)},i.prototype.processRequestExecutorResponseMessage=function(t,i){var e,r,o,u,f;if(i.Body&&i.Body.TraceIds&&t._setResponseTraceIds(i.Body.TraceIds),e=t._responseTraceMessages,r=null,i.Body&&(i.Body.Error&&i.Body.Error.ActionIndex>=0&&(o=new n.RequestPrettyPrinter(this._rootObjectPropertyName,t._objectPaths,t._actions),r=o.processForDebugStatementInfo(i.Body.Error.ActionIndex)),u=null,i.Body.Results?u=i.Body.Results:i.Body.ProcessedResults&&i.Body.ProcessedResults.Results&&(u=i.Body.ProcessedResults.Results),u)){this._processingResult=!0;try{t.processResponse(u)}finally{this._processingResult=!1}}if(n.Utility.isNullOrEmptyString(i.ErrorCode)){if(i.Body&&i.Body.Error)return f={errorLocation:i.Body.Error.Location},r&&(f.statement=r.statement,f.surroundingStatements=r.surroundingStatements),new n._Internal.RuntimeError({code:i.Body.Error.Code,message:i.Body.Error.Message,traceMessages:e,debugInfo:f})}else return new n._Internal.RuntimeError({code:i.ErrorCode,message:i.ErrorMessage,traceMessages:e});return null},i.prototype.processPendingEventHandlers=function(t){for(var u,i=n.Utility._createPromiseFromResult(null),r=0;r0&&(typeof r[0]=="string"||i.isRequestUrlAndHeaderInfo(r[0])||i.isRequestUrlAndHeaderInfoResolver(r[0]))&&(y=r[0],h=1),r.length==h+1)l=u,v=r[h+0];else if(r.length==h+2){if(n.Utility.isNullOrUndefined(r[h+0]))l=u;else if(r[h+0]instanceof n.ClientObject)l=function(){return r[h+0].context};else if(r[h+0]instanceof i)l=function(){return r[h+0]};else if(Array.isArray(r[h+0])){if(c=r[h+0],c.length==0)return i.createErrorPromise(t);for(a=0;a0){var n=c._onRunFinishedNotifiers.shift();n()}if(a)return l;else throw l;})},i.prototype._nextId=function(){return++this.m_nextId},i}();n.ClientRequestContext=i}(OfficeExtension||(OfficeExtension={})),function(n){var i=function(){function t(n){this.m_type=n}return Object.defineProperty(t.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){(this.m_isLoaded=!0,typeof t=="object"&&t&&t._IsNull)||(this.m_value=this.m_type===1?n.Utility.adjustToDateTime(t):t)},t}(),t;n.ClientResult=i;t=function(){function t(n,t){this.m_proxy=n;this.m_shouldPolyfill=t}return Object.defineProperty(t.prototype,"proxy",{get:function(){return this.m_proxy},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"json",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"fetchResult.json"}});return this.m_json},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(n){if(this.m_isLoaded=!0,typeof n=="object"&&n&&n._IsNull){this.m_json=null;return}this.m_json=this.m_shouldPolyfill?this.changePropertyNameToCamelLowerCase(n):n},t.prototype.changePropertyNameToCamelLowerCase=function(t){var o=95,u,i,r,f,e;if(Array.isArray(t)){for(i=[],u=0;u0&&(r=!0),t=document.createElement("a"),t.href=this.m_url,r?t.hash=t.hash.length===0||t.hash==="#"?"#"+i:t.hash+"&"+i:t.search=t.search.length===0||t.search==="?"?"?"+i:t.search+"&"+i,t.href},f.prototype.init=function(){var t=this,i;return window.addEventListener("message",this.m_onMessageHandler),i=this._getIFrameSrc(),new n._Internal.OfficePromise(function(r,u){var f=document.createElement("iframe");t.m_options.id&&(f.id=t.m_options.id);f.style.height=t.m_options.height;f.style.width=t.m_options.width;f.src=i;t.m_options.container.appendChild(f);t.m_timeoutId=setTimeout(function(){t.close();var i=n.Utility.createRuntimeError(n.ErrorCodes.timeout,n.Utility._getResourceString(n.ResourceStrings.timeout),"EmbeddedSession.init");u(i)},t.m_options.timeoutInMilliseconds);t.m_promiseResolver=r})},f.prototype._invoke=function(n,t,u){if(!this.m_enabled){t(i.InternalError,null);return}r.invokeRequestModifier&&(u=r.invokeRequestModifier(u));this._sendMessageWithCallback(this.m_id++,n,u,function(n){r.invokeResponseModifier&&(n=r.invokeResponseModifier(n));var u=n.Error;delete n.Error;t(u||i.Success,n)})},f.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler);window.clearTimeout(this.m_timeoutId);this.m_enabled=!1},Object.defineProperty(f.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),f.prototype._createRequestExecutorOrNull=function(){return new e(this)},f.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},f.prototype._registerEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.RegisterEventCommand,{EventId:i,TargetId:r},function(){n(null)})})},f.prototype._unregisterEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.UnregisterEventCommand,{EventId:i,TargetId:r},function(){n()})})},f.prototype._onMessage=function(n){var u=this,i,e,r,o,s;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===n.source&&this.m_chosenOrigin===n.origin)){if(i=n.data,i&&i[t.CommandKey]===t.ApiReadyCommand){!this.m_chosenWindow&&this._isValidDescendant(n.source)&&i[t.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=n.source,this.m_chosenOrigin=n.origin,this._sendMessageWithCallback(this.m_id++,t.GetAppContextCommand,null,function(n){u._setupContext(n);window.clearTimeout(u.m_timeoutId);u.m_promiseResolver()}));return}if(i&&i[t.CommandKey]===t.FireEventCommand){var f=i[t.ParamsKey],h=f.EventId,c=f.TargetId,l=f.Data;if(this.m_sessionEventManager)for(e=this.m_sessionEventManager.getHandlers(h,c),r=0;r=0;o--)if(r[o]===e[i].handler){r.splice(o,1);break}break;case 2:r=[];break}}return s&&(!this.m_registered&&r.length>0?u=u.then(function(){return f.m_eventInfo.registerFunc(f.m_callback)}).then(function(){return f.m_registered=!0}):this.m_registered&&r.length==0&&(u=u.then(function(){return f.m_eventInfo.unregisterFunc(f.m_callback)}).catch(function(t){n.Utility.log("Error when unregister event: "+JSON.stringify(t))}).then(function(){return f.m_registered=!1})),u=u.then(function(){return f.m_handlers=r})),u},t.prototype.fireEvent=function(t){for(var u,f,r=[],i=0;i=0;e--)if(f[e]===u){f.splice(e,1);break}return f.length===0?this.m_unregisterEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i}();n.EventRegistration=i}(OfficeExtension||(OfficeExtension={})),function(n){function r(n){t._testReadyImpl=n}function u(n){t.getGenericEventRegistration()._handleRichApiMessage(n)}var t=function(){function t(){this.m_eventRegistration=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this));this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this)}return t.prototype.ready=function(){var i=this;return this.m_ready||(this.m_ready=t._testReadyImpl?t._testReadyImpl().then(function(){i.m_isReady=!0}):n._Internal.officeJsEventRegistration.register(5,"",this.m_richApiMessageHandler).then(function(){i.m_isReady=!0})),this.m_ready},Object.defineProperty(t.prototype,"isReady",{get:function(){return this.m_isReady},enumerable:!0,configurable:!0}),t.prototype.register=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.register(n,t,i)})},t.prototype.unregister=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.unregister(n,t,i)})},t.prototype._registerEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._unregisterEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._handleRichApiMessage=function(t){var r,i,u,e,f;if(t&&t.entries)for(r=0;r0))for(e=JSON.parse(i.message),i.isRemoteOverride&&(e.source=n.Constants.eventSourceRemote),f=0;f=0;u--)if(n[u]===i){n.splice(u,1);break}n.length==0&&t.getGenericEventRegistration().unregister(r.m_genericEventInfo.eventType,r.m_genericEventInfo.getTargetIdFunc(),r._callback)})},r.prototype.removeAll=function(){},r}(n.EventHandlers);n.GenericEventHandlers=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var s=JSON.stringify(u.Body),f=u.Url,e,o;if(f.charAt(f.length-1)!="/"&&(f=f+"/"),f=f+n.Constants.processQuery,f=f+"?"+n.Constants.flags+"="+r.toString(),e={method:"POST",url:f,headers:{},body:s},e.headers[n.Constants.sourceLibHeader]=t.SourceLibHeaderValue,e.headers["CONTENT-TYPE"]="application/json",u.Headers)for(o in u.Headers)e.headers[o]=u.Headers[o];return n.HttpUtility.sendRequest(e).then(function(t){var i,r;return t.statusCode===200?i={ErrorCode:null,ErrorMessage:null,Headers:t.headers,Body:JSON.parse(t.body)}:(n.Utility.log("Error Response:"+t.body),r=n.Utility._parseErrorResponse(t),i={ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:t.headers,Body:null}),i})},t.SourceLibHeaderValue="officejs-rest",t}();n.HttpRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.setCustomSendRequestFunc=function(n){t.s_customSendRequestFunc=n},t.xhrSendRequestFunc=function(t){return new n._Internal.OfficePromise(function(i,r){var u=new XMLHttpRequest,f;if(u.open(t.method,t.url),u.onload=function(){var t={statusCode:u.status,headers:n.Utility._parseHttpResponseHeaders(u.getAllResponseHeaders()),body:u.responseText};i(t)},u.onerror=function(){r(new n._Internal.RuntimeError({code:n.ErrorCodes.connectionFailure,message:n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,u.statusText)}))},t.headers)for(f in t.headers)u.setRequestHeader(f,t.headers[f]);u.send(t.body)})},t.sendRequest=function(n){t.validateAndNormalizeRequest(n);var i=t.s_customSendRequestFunc;return i||(i=t.xhrSendRequestFunc),i(n)},t.setCustomSendLocalDocumentRequestFunc=function(n){t.s_customSendLocalDocumentRequestFunc=n},t.sendLocalDocumentRequest=function(n){t.validateAndNormalizeRequest(n);var i;return i=t.s_customSendLocalDocumentRequestFunc||t.officeJsSendLocalDocumentRequestFunc,i(n)},t.officeJsSendLocalDocumentRequestFunc=function(t){t=n.Utility._validateLocalDocumentRequest(t);var i=n.Utility._buildRequestMessageSafeArray(t);return new n._Internal.OfficePromise(function(t,r){OSF.DDA.RichApi.executeRichApiRequestAsync(i,function(i){var r;r=i.status=="succeeded"?{statusCode:n.RichApiMessageUtility.getResponseStatusCode(i),headers:n.RichApiMessageUtility.getResponseHeaders(i),body:n.RichApiMessageUtility.getResponseBody(i)}:n.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(i.error.code,i.error.message);n.Utility.log(JSON.stringify(r));t(r)})})},t.validateAndNormalizeRequest=function(t){if(n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"request"});n.Utility.isNullOrEmptyString(t.method)&&(t.method="GET");t.method=t.method.toUpperCase()},t.logRequest=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Request---"),n.Utility.log(i.method+" "+i.url),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t.logResponse=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Response---"),n.Utility.log(""+i.statusCode),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t._logBody=!1,t}();n.HttpUtility=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_clientObject=n}return n.prototype._handleResult=function(n){this.m_clientObject._handleIdResult(n)},n}();n.InstantiateActionResultHandler=t}(OfficeExtension||(OfficeExtension={})),function(n){}(OfficeExtension||(OfficeExtension={})),function(n){var u=function(){function t(n){this.m_session=n}return t.prototype.executeAsync=function(t,r,u){var e={url:n.Constants.processQuery,method:"POST",headers:u.Headers,body:u.Body},f={id:i.nextId(),type:1,flags:r,message:e};return n.Utility.log(JSON.stringify(f)),this.m_session.sendMessageToHost(f).then(function(t){var i,r,u;return n.Utility.log("Received response: "+JSON.stringify(t)),i=t.message,i.statusCode===200?r={ErrorCode:null,ErrorMessage:null,Headers:i.headers,Body:i.body}:(n.Utility.log("Error Response:"+i.body),u=n.Utility._parseErrorResponse(i),r={ErrorCode:u.errorCode,ErrorMessage:u.errorMessage,Headers:i.headers,Body:null}),r})},t}(),i=function(i){function r(n){var t=this;i.call(this);this.m_promiseResolver={};this.m_bridge=n;this.m_bridge.onMessageFromHost=function(n){t.onMessageFromHost(n)}}return __extends(r,i),r.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},r.prototype._createRequestExecutorOrNull=function(){return n.Utility.log("NativeBridgeSession::CreateRequestExecutor"),new u(this)},Object.defineProperty(r.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),r.init=function(t){if(t&&typeof t=="object"){var i=new r(t);n.ClientRequestContext._overrideSession=i;n.HttpUtility.setCustomSendLocalDocumentRequestFunc(function(n){var t={id:r.nextId(),type:1,flags:0,message:n};return i.sendMessageToHost(t).then(function(n){return n.message})})}},r.prototype.sendMessageToHost=function(t){var i=this;return this.m_bridge.sendMessageToHost(JSON.stringify(t)),new n._Internal.OfficePromise(function(n,r){i.m_promiseResolver[t.id]=n})},r.prototype.onMessageFromHost=function(n){var i,r;n==="test"?t._testFunc&&t._testFunc():(i=JSON.parse(n),typeof i.id=="number"&&(r=this.m_promiseResolver[i.id],r&&r(i),delete this.m_promiseResolver[i.id]))},r.nextId=function(){return r.s_nextId++},r.s_nextId=1,r}(n.SessionBase),r=function(){function n(){}return n.init=function(n){i.init(n)},n}(),t;n.HostBridge=r;typeof _richApiNativeBridge=="object"&&_richApiNativeBridge&&r.init(_richApiNativeBridge);t=function(){function n(){}return n.setTestFunc=function(t){n._testFunc=t},n}();n.HostBridgeTest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){this.m_objectPathInfo=n;this.m_parentObjectPath=t;this.m_isWriteOperation=!1;this.m_isCollection=i;this.m_isInvalidAfterRequest=r;this.m_isValid=!0}return Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},set:function(n){this.m_isWriteOperation=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRestrictedResourceAccess",{get:function(){return this.m_isRestrictedResourceAccess},set:function(n){this.m_isRestrictedResourceAccess=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(n){this.m_argumentObjectPaths=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(n){this.m_isValid=n;!n&&this.m_objectPathInfo.ObjectPathType===6&&this.m_savedObjectPathInfo&&(t.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(n){this.m_getByIdMethodName=n},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null},t.prototype.updateUsingObjectData=function(i){var e=i[n.Constants.referenceId],f,o,u,r;if(!n.Utility.isNullOrEmptyString(e)){this.m_savedObjectPathInfo||this.isInvalidAfterRequest||!t.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)||(f={},t.copyObjectPathInfo(this.m_objectPathInfo,f),this.m_savedObjectPathInfo={pathInfo:f,parent:this.m_parentObjectPath});this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=e;this.m_objectPathInfo.ArgumentInfo={};delete this.m_objectPathInfo.ParentObjectPathId;this.m_parentObjectPath=null;this.m_argumentObjectPaths=null;return}if(o=this.parentObjectPath&&this.parentObjectPath.isCollection,u=this.getByIdMethodName,(o||!n.Utility.isNullOrEmptyString(u))&&(r=i[n.Constants.id],n.Utility.isNullOrUndefined(r)&&(r=i[n.Constants.idPrivate]),!n.Utility.isNullOrUndefined(r))){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;n.Utility.isNullOrEmptyString(u)?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=u,this.m_getByIdMethodName=null);this.isWriteOperation=!1;this.m_objectPathInfo.ArgumentInfo={};this.m_objectPathInfo.ArgumentInfo.Arguments=[r];this.m_argumentObjectPaths=null;return}},t.isRestorableObjectPath=function(n){return n===1||n===5||n===3||n===4},t.copyObjectPathInfo=function(n,t){t.Id=n.Id;t.ArgumentInfo=n.ArgumentInfo;t.Name=n.Name;t.ObjectPathType=n.ObjectPathType;t.ParentObjectPathId=n.ParentObjectPathId},t}();n.ObjectPath=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createGlobalObjectObjectPath=function(t){var i={Id:t._nextId(),ObjectPathType:1,Name:""};return new n.ObjectPath(i,null,!1,!1)},t.createNewObjectObjectPath=function(t,i,r,u){var e={Id:t._nextId(),ObjectPathType:2,Name:i},f=new n.ObjectPath(e,null,r,!1);return f.isRestrictedResourceAccess=u,f},t.createPropertyObjectPath=function(t,i,r,u,f,e){var s={Id:t._nextId(),ObjectPathType:4,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id},o=new n.ObjectPath(s,i._objectPath,u,f);return o.isRestrictedResourceAccess=e,o},t.createIndexerObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i._objectPath,!1,!1)},t.createIndexerObjectPathUsingParentPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i,!1,!1)},t.createMethodObjectPath=function(t,i,r,u,f,e,o,s,h){var l={Id:t._nextId(),ObjectPathType:3,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},a=n.Utility.setMethodArguments(t,l.ArgumentInfo,f),c=new n.ObjectPath(l,i._objectPath,e,o);return c.argumentObjectPaths=a,c.isWriteOperation=u!=1,c.getByIdMethodName=s,c.isRestrictedResourceAccess=h,c},t.createReferenceIdObjectPath=function(t,i){var r={Id:t._nextId(),ObjectPathType:6,Name:i,ArgumentInfo:{}};return new n.ObjectPath(r,null,!1,!1)},t.createChildItemObjectPathUsingIndexerOrGetItemAt=function(i,r,u,f,e){var o=f[n.Constants.id];return n.Utility.isNullOrUndefined(o)&&(o=f[n.Constants.idPrivate]),i&&!n.Utility.isNullOrUndefined(o)?t.createChildItemObjectPathUsingIndexer(r,u,f):t.createChildItemObjectPathUsingGetItemAt(r,u,f,e)},t.createChildItemObjectPathUsingIndexer=function(t,i,r){var f=r[n.Constants.id],u;return n.Utility.isNullOrUndefined(f)&&(f=r[n.Constants.idPrivate]),u=u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u.ArgumentInfo.Arguments=[f],new n.ObjectPath(u,i._objectPath,!1,!1)},t.createChildItemObjectPathUsingGetItemAt=function(t,i,r,u){var e=r[n.Constants.index],f;return e&&(u=e),f={Id:t._nextId(),ObjectPathType:3,Name:n.Constants.getItemAt,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f.ArgumentInfo.Arguments=[u],new n.ObjectPath(f,i._objectPath,!1,!1)},t}();n.ObjectPathFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_context=n}return t.prototype.executeAsync=function(i,r,u){var f=this,e=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n._Internal.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(e,function(i){n.Utility.log("Response:");n.Utility.log(JSON.stringify(i));var r;i.status=="succeeded"?r=n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBody(i),n.RichApiMessageUtility.getResponseHeaders(i)):(r=n.RichApiMessageUtility.buildResponseOnError(i.error.code,i.error.message),f.m_context._processOfficeJsErrorResponse(i.error.code,r));t(r)})})},t.SourceLibHeaderValue="officejs",t}();n.OfficeJsRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){n.OfficeRequire=function(){return null}()})(t=n._Internal||(n._Internal={})),function(n){var t;(function(t){function i(){return function(){"use strict";function vt(n){return typeof n=="function"||typeof n=="object"&&n!==null}function b(n){return typeof n=="function"}function yt(n){return typeof n=="object"&&n!==null}function wt(n){k=n}function bt(n){f=n}function ni(){var t=process.nextTick,n=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&n[1]==="0"&&n[2]==="10"&&(t=setImmediate),function(){t(c)}}function tr(){return function(){pt(c)}}function ti(){var n=0,i=new it(c),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function ii(){var n=new MessageChannel;return n.port1.onmessage=c,function(){n.port2.postMessage(0)}}function ri(){return function(){setTimeout(c,1)}}function c(){for(var t,i,n=0;n=0?(n=n.substring(t+5,n.length),n<"14.14393"?!0:!1):!1}function i(){return typeof window=="undefined"&&typeof Promise=="function"?Promise:typeof window!="undefined"&&window.Promise?t()?n.PromiseImpl.Init():window.Promise:n.PromiseImpl.Init()}n.OfficePromise=i()}(t=n._Internal||(n._Internal={}));i=t.OfficePromise;n.Promise=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this._autoCleanupList={};this.m_context=n}return t.prototype.add=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._addCommon(n,!0)}):this._addCommon(n,!0)},t.prototype._autoAdd=function(n){this._addCommon(n,!1);this._autoCleanupList[n._objectPath.objectPathInfo.Id]=n},t.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(t,i){var r=this.m_context._autoCleanup&&!t[n.Constants.isTracked]&&t!==this.m_context._rootObject&&i&&!n.Utility.isNullOrEmptyString(i[n.Constants.referenceId]);r&&(this._autoCleanupList[t._objectPath.objectPathInfo.Id]=t,t[n.Constants.isTracked]=!0)},t.prototype._addCommon=function(t,i){if(t[n.Constants.isTracked]){i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id];return}var r=t[n.Constants.referenceId];n.Utility.isNullOrEmptyString(r)&&t._KeepReference&&(t._KeepReference(),n.ActionFactory.createInstantiateAction(this.m_context,t),i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id],t[n.Constants.isTracked]=!0)},t.prototype.remove=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._removeCommon(n)}):this._removeCommon(n)},t.prototype._removeCommon=function(t){var r=t[n.Constants.referenceId],i;n.Utility.isNullOrEmptyString(r)||(i=this.m_context._rootObject,i._RemoveReference&&i._RemoveReference(r),delete t[n.Constants.isTracked])},t.prototype._retrieveAndClearAutoCleanupList=function(){var n=this._autoCleanupList;return this._autoCleanupList={},n},t}();n.TrackedObjects=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){n||(n="root");this.m_globalObjName=n;this.m_referencedObjectPaths=t;this.m_actions=i;this.m_statements=[];this.m_variableNameForObjectPathMap={};this.m_variableNameToObjectPathMap={};this.m_declaredObjectPathMap={};this.m_showDispose=r}return t.prototype.process=function(){this.m_showDispose&&n.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions);for(var t=0;t=0&&this.m_statements.length>i+o+1)break;if(i<0)return null;for(f=i-o,f<0&&(f=0),e=i+1+o,e>this.m_statements.length&&(e=this.m_statements.length),r=[],f!=0&&r.push("..."),s=f;s>>>>"),r.push(this.m_statements[i]),r.push("// <<<<<"),h=i+1;h0)?(r=i.map(function(n){return u.getObjVarName(n)}).join(", "),n+" // And then dispose {"+r+"}"):n},t.prototype.buildQueryExpression=function(n){if(n.actionInfo.QueryInfo){var t={};return t.select=n.actionInfo.QueryInfo.Select,t.expand=n.actionInfo.QueryInfo.Expand,t.skip=n.actionInfo.QueryInfo.Skip,t.top=n.actionInfo.QueryInfo.Top,typeof t.top=="undefined"&&typeof t.skip=="undefined"&&typeof t.expand=="undefined"?typeof t.select=="undefined"?"":JSON.stringify(t.select):JSON.stringify(t)}return""},t.prototype.buildObjectPathExpressionWithParent=function(n){var t=n.objectPathInfo.ObjectPathType==5||n.objectPathInfo.ObjectPathType==3||n.objectPathInfo.ObjectPathType==4;return t&&n.objectPathInfo.ParentObjectPathId?this.getObjVarName(n.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(n):this.buildObjectPathExpression(n)},t.prototype.buildObjectPathExpression=function(t){switch(t.objectPathInfo.ObjectPathType){case 1:return"context."+this.m_globalObjName;case 5:return"getItem("+this.buildArgumentsExpression(t.objectPathInfo.ArgumentInfo)+")";case 3:return n.Utility._toCamelLowerCase(t.objectPathInfo.Name)+"("+this.buildArgumentsExpression(t.objectPathInfo.ArgumentInfo)+")";case 2:return t.objectPathInfo.Name+".newObject()";case 7:return"null";case 4:return n.Utility._toCamelLowerCase(t.objectPathInfo.Name);case 6:return"context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(t.objectPathInfo.Name)+")"}},t.prototype.buildArgumentsExpression=function(n){var t="",i;if(!n.Arguments)return t;for(i=0;i0&&(t=t+", "),t=t+this.buildArgumentLiteral(n.Arguments[i],n.ReferencedObjectPathIds?n.ReferencedObjectPathIds[i]:null);return t==="undefined"&&(t=""),t},t.prototype.buildArgumentLiteral=function(n,t){return typeof n=="number"&&n===t?this.getObjVarName(t):JSON.stringify(n)},t.prototype.getObjVarNameBase=function(t){var u="v",f=this.m_referencedObjectPaths[t],i,r;switch(f.objectPathInfo.ObjectPathType){case 1:u=this.m_globalObjName;break;case 4:u=n.Utility._toCamelLowerCase(f.objectPathInfo.Name);break;case 3:i=f.objectPathInfo.Name;i.length>3&&i.substr(0,3)==="Get"&&(i=i.substr(3));u=n.Utility._toCamelLowerCase(i);break;case 5:r=this.getObjVarNameBase(f.objectPathInfo.ParentObjectPathId);u=r.charAt(r.length-1)==="s"?r.substr(0,r.length-1):r+"Item";break}return u},t.prototype.getObjVarName=function(n){var t,i;if(this.m_variableNameForObjectPathMap[n])return this.m_variableNameForObjectPathMap[n];if(t=this.getObjVarNameBase(n),!this.m_variableNameToObjectPathMap[t])return this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t;for(i=1;this.m_variableNameToObjectPathMap[t+i.toString()];)i++;return t=t+i.toString(),this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t},t}();n.RequestPrettyPrinter=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.cannotRegisterEvent="CannotRegisterEvent",n.connectionFailureWithStatus="ConnectionFailureWithStatus",n.connectionFailureWithDetails="ConnectionFailureWithDetails",n.invalidObjectPath="InvalidObjectPath",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.invalidArgumentGeneric="InvalidArgumentGeneric",n.propertyNotLoaded="PropertyNotLoaded",n.runMustReturnPromise="RunMustReturnPromise",n.timeout="Timeout",n.propertyDoesNotExist="PropertyDoesNotExist",n.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",n.moreInfoInnerError="MoreInfoInnerError",n.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",n.valueNotLoaded="ValueNotLoaded",n.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage",n.invalidOperationInCellEditMode="InvalidOperationInCellEditMode",n.customFunctionDefintionMissing="CustomFunctionDefintionMissing",n.customFunctionImplementationMissing="CustomFunctionImplementationMissing",n.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars",n.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit",n.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch",n.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing",n.apiNotFoundDetails="ApiNotFoundDetails",n}();n.ResourceStrings=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.CannotRegisterEvent="The event handler cannot be registered.",n.ConnectionFailureWithStatus="The request failed with status code of {0}.",n.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}",n.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",n.InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',n.InvalidRequestContext="Cannot use the object across different request contexts.",n.PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",n.RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',n.Timeout="The operation has timed out.",n.ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.',n.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.",n.InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.",n.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions.",n.CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.",n.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods.",n.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name.",n.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.",n.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.",n.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.",n}();n.ResourceStringValues=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.buildMessageArrayForIRequestExecutor=function(i,r,u,f){var o=JSON.stringify(u.Body),e;return n.Utility.log("Request:"),n.Utility.log(o),e={},e[n.Constants.sourceLibHeader]=f,t.buildRequestMessageSafeArray(i,r,"POST","ProcessQuery",e,o)},t.buildResponseOnSuccess=function(n,t){var i={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return i.Body=JSON.parse(n),i.Headers=t,i},t.buildResponseOnError=function(i,r){var u={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return u.ErrorCode=n.ErrorCodes.generalException,u.ErrorMessage=r,i==t.OfficeJsErrorCode_ooeNoCapability?u.ErrorCode=n.ErrorCodes.accessDenied:i==t.OfficeJsErrorCode_ooeActivityLimitReached?u.ErrorCode=n.ErrorCodes.activityLimitReached:i==t.OfficeJsErrorCode_ooeInvalidOrTimedOutSession&&(u.ErrorCode=n.ErrorCodes.invalidOrTimedOutSession,u.ErrorMessage=n.Utility._getResourceString(n.ResourceStrings.invalidOrTimedOutSessionMessage)),u},t.buildHttpResponseFromOfficeJsError=function(i,r){var f=500,u={};return u.error={},u.error.code=n.ErrorCodes.generalException,u.error.message=r,i===t.OfficeJsErrorCode_ooeNoCapability?(f=403,u.error.code=n.ErrorCodes.accessDenied):i===t.OfficeJsErrorCode_ooeActivityLimitReached&&(f=429,u.error.code=n.ErrorCodes.activityLimitReached),{statusCode:f,headers:{},body:JSON.stringify(u)}},t.buildRequestMessageSafeArray=function(n,t,i,r,u,f){var e=[],o;if(u)for(o in u)e.push(o),e.push(u[o]);var s=0,h="",c="",l="";return[n,i,r,e,f,s,t,h,c,l]},t.getResponseBody=function(n){return t.getResponseBodyFromSafeArray(n.value.data)},t.getResponseHeaders=function(n){return t.getResponseHeadersFromSafeArray(n.value.data)},t.getResponseBodyFromSafeArray=function(n){var t=n[2],i;return typeof t=="string"?t:(i=t,i.join(""))},t.getResponseHeadersFromSafeArray=function(n){var i=n[1],r,t;if(!i)return null;for(r={},t=0;t0&&f.push(i);return f},t.toJson=function(n,t,i,r){var e={},u,f;for(u in t)f=t[u],typeof f!="undefined"&&(e[u]=f);for(u in i)f=i[u],typeof f!="undefined"&&(e[u]=f.toJSON());return r&&(e.items=r.map(function(n){return n.toJSON()})),e},t.throwError=function(i,r,u){throw new n._Internal.RuntimeError({code:i,message:t._getResourceString(i,r),debugInfo:u?{errorLocation:u}:undefined});},t.createRuntimeError=function(t,i,r){return new n._Internal.RuntimeError({code:t,message:i,debugInfo:{errorLocation:r}})},t._getResourceString=function(i,r){var u,e,f,o;return typeof window!="undefined"&&window.Strings&&window.Strings.OfficeOM&&(e="L_"+i,f=window.Strings.OfficeOM[e],f&&(u=f)),u||(u=n.ResourceStringValues[i]),u||(u=i),t.isNullOrUndefined(r)||(Array.isArray(r)?(o=r,u=t._formatString(u,o)):u=u.replace("{0}",r)),u},t._formatString=function(t,i){return t.replace(/\{\d\}/g,function(t){var r=parseInt(t.substr(1,t.length-2));if(r0?".":"")+i;break;case 3:i=t.normalizeName(n.objectPathInfo.Name)+"()"+(i.length>0?".":"")+i;break;case 4:i=t.normalizeName(n.objectPathInfo.Name)+(i.length>0?".":"")+i;break;case 5:i="getItem()"+(i.length>0?".":"")+i;break;case 6:i="_reference()"+(i.length>0?".":"")+i;break}n=n.parentObjectPath}return i},t._createPromiseFromResult=function(t){return new n._Internal.OfficePromise(function(n,i){n(t)})},t._createTimeoutPromise=function(t){return new n._Internal.OfficePromise(function(n,i){setTimeout(function(){n(null)},t)})},t.promisify=function(t){return new n._Internal.OfficePromise(function(n,i){var r=function(t){t.status=="failed"?i(t.error):n(t.value)};t(r)})},t._addActionResultHandler=function(n,t,i){n.context._pendingRequest.addActionResultHandler(t,i)},t._handleNavigationPropertyResults=function(n,i,r){for(var u=0;u0},t._getLocalDocumentUrlPrefixLength=function(n){for(var i=["http://document.localhost","https://document.localhost","//document.localhost"],r=n.toLowerCase().trim(),t=0;t0))for(s=i.url.substr(f+1),e=s.split("&"),u=0;u0&&(f=i.substr(0,u),e=i.substr(u+1),f=t.trim(f),e=t.trim(e),s[f.toUpperCase()]=e));return s},t._parseErrorResponse=function(i){var r=null,f,e,u;if(t.isPlainJsonObject(i.body))r=i.body;else if(!t.isNullOrEmptyString(i.body)){f=t.trim(i.body);try{r=JSON.parse(f)}catch(o){t.log("Error when parse "+f)}}return!t.isNullOrUndefined(r)&&typeof r=="object"&&r.error?(u=r.error.code,e=t._getResourceString(n.ResourceStrings.connectionFailureWithDetails,[i.statusCode.toString(),r.error.code,r.error.message])):e=t._getResourceString(n.ResourceStrings.connectionFailureWithStatus,i.statusCode.toString()),t.isNullOrEmptyString(u)&&(u=n.ErrorCodes.connectionFailure),{errorCode:u,errorMessage:e}},t._copyHeaders=function(n,t){if(n&&t)for(var i in n)t[i]=n[i]},t._toCamelLowerCase=function(n){if(t.isNullOrEmptyString(n))return n;for(var i=0;i=65&&n.charCodeAt(i)<=90;)i++;return i0&&Array.isArray(i[0])&&i.length*i[0].length>s&&ct()){for(e=Math.max(1,Math.round(s/i[0].length)),n._ValidateArraySize(i.length,i[0].length),r=0;ri.length&&(u=i.length-r),o=n.getRow(r).getBoundingRect(n.getRow(r+u-1)),h=i.slice(r,r+u),f(o.context,o,t,h);return!0}return!1}function ct(){return typeof window!="undefined"&&window.Office&&window.Office.context&&window.Office.context.requirements?window.Office.context.requirements.isSetSupported("ExcelApi",1.3):!0}function hs(t,i,r){return OfficeExtension.ClientRequestContext._runBatch("Excel.run",arguments,function(t){return new n.RequestContext(t)})}function pt(n){var t={BindingColumnCount:n.bindingColumnCount,BindingId:n.bindingId,BindingRowCount:n.bindingRowCount,bindingType:n.bindingType,HasHeaders:n.hasHeaders};return window.OSF.DDA.OMFactory.manufactureBinding(t,window.Microsoft.Office.WebExtension.context.document)}function ar(n,t){var r=n.headers==null,i;return i=r?n.rows:n,i=window.OSF.DDA.DataCoercion.coerceData(i,t[window.Microsoft.Office.WebExtension.Parameters.CoercionType]),i==undefined?null:i}function cs(n,t,i){var e=typeof window!="undefined"&&window.Office&&window.Office.context&&window.Office.context.diagnostics&&window.Office.context.diagnostics.version;if(!e)return!1;var o=window.Office.context.diagnostics.version,s=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/,r=s.exec(o);if(r){var u=parseInt(r[1]),f=parseInt(r[2]),h=parseInt(r[3]);if(u0?f=i.getOffsetRange(r,u):(f=i,e=r,o=u),Math.abs(t)==1)?f:f.getBoundingRect(i.getOffsetRange(r*t+e,u*t+o))},Object.defineProperty(d.prototype,"conditionalFormats",{get:function(){return l("Range.conditionalFormats",c,"1.6",h),this._Con||(this._Con=new n.ConditionalFormatCollection(this.context,o(this.context,this,"ConditionalFormats",!0,!1,!1))),this._Con},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"format",{get:function(){return this._F||(this._F=new n.RangeFormat(this.context,o(this.context,this,"Format",!1,!1,!1))),this._F},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"sort",{get:function(){return l("Range.sort",c,"1.2",h),this._S||(this._S=new n.RangeSort(this.context,o(this.context,this,"Sort",!1,!1,!1))),this._S},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"worksheet",{get:function(){return this._W||(this._W=new n.Worksheet(this.context,o(this.context,this,"Worksheet",!1,!1,!1))),this._W},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"address",{get:function(){return r("address",this._A,nt,this._isNull),this._A},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"addressLocal",{get:function(){return r("addressLocal",this._Ad,nt,this._isNull),this._Ad},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"cellCount",{get:function(){return r("cellCount",this._C,nt,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"columnCount",{get:function(){return r("columnCount",this._Co,nt,this._isNull),this._Co},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"columnHidden",{get:function(){return r("columnHidden",this._Col,nt,this._isNull),l("Range.columnHidden",c,"1.2",h),this._Col},set:function(n){this._Col=n;f(this.context,this,"ColumnHidden",n)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"columnIndex",{get:function(){return r("columnIndex",this._Colu,nt,this._isNull),this._Colu},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"formulas",{get:function(){return r("formulas",this.m_formulas,nt,this._isNull),this.m_formulas},set:function(n){(this.m_formulas=n,yt(this,"Formulas",n))||(this.m_formulas=n,f(this.context,this,"Formulas",n))},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"formulasLocal",{get:function(){return r("formulasLocal",this.m_formulasLocal,nt,this._isNull),this.m_formulasLocal},set:function(n){(this.m_formulasLocal=n,yt(this,"FormulasLocal",n))||(this.m_formulasLocal=n,f(this.context,this,"FormulasLocal",n))},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"formulasR1C1",{get:function(){return r("formulasR1C1",this.m_formulasR1C1,nt,this._isNull),l("Range.formulasR1C1",c,"1.2",h),this.m_formulasR1C1},set:function(n){(this.m_formulasR1C1=n,yt(this,"FormulasR1C1",n))||(this.m_formulasR1C1=n,f(this.context,this,"FormulasR1C1",n))},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"hidden",{get:function(){return r("hidden",this._H,nt,this._isNull),l("Range.hidden",c,"1.2",h),this._H},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"numberFormat",{get:function(){return r("numberFormat",this.m_numberFormat,nt,this._isNull),this.m_numberFormat},set:function(n){(this.m_numberFormat=n,yt(this,"NumberFormat",n))||(this.m_numberFormat=n,f(this.context,this,"NumberFormat",n))},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"rowCount",{get:function(){return r("rowCount",this._R,nt,this._isNull),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"rowHidden",{get:function(){return r("rowHidden",this._Ro,nt,this._isNull),l("Range.rowHidden",c,"1.2",h),this._Ro},set:function(n){this._Ro=n;f(this.context,this,"RowHidden",n)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"rowIndex",{get:function(){return r("rowIndex",this._Row,nt,this._isNull),this._Row},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"text",{get:function(){return r("text",this._T,nt,this._isNull),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"valueTypes",{get:function(){return r("valueTypes",this._V,nt,this._isNull),this._V},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"values",{get:function(){return r("values",this.m_values,nt,this._isNull),this.m_values},set:function(n){(this.m_values=n,yt(this,"Values",n))||(this.m_values=n,f(this.context,this,"Values",n))},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"_ReferenceId",{get:function(){return r("_ReferenceId",this.__R,nt,this._isNull),this.__R},enumerable:!0,configurable:!0}),d.prototype.set=function(n,t){this._recursivelySet(n,t,["numberFormat","values","formulas","formulasLocal","formulasR1C1","rowHidden","columnHidden"],["format"],["conditionalFormats","sort","worksheet"])},d.prototype.calculate=function(){l("Range.calculate",c,"1.6",h);s(this.context,this,"Calculate",0,[],!1)},d.prototype.clear=function(n){s(this.context,this,"Clear",0,[n],!1)},d.prototype.delete=function(n){s(this.context,this,"Delete",0,[n],!1)},d.prototype.getBoundingRect=function(i){return new n.Range(this.context,t(this.context,this,"GetBoundingRect",1,[i],!1,!0,null,!1))},d.prototype.getCell=function(i,r){return new n.Range(this.context,t(this.context,this,"GetCell",1,[i,r],!1,!0,null,!1))},d.prototype.getColumn=function(i){return new n.Range(this.context,t(this.context,this,"GetColumn",1,[i],!1,!0,null,!1))},d.prototype.getColumnsAfter=function(i){return ct()?(l("Range.getColumnsAfter",c,"1.3",h),new n.Range(this.context,t(this.context,this,"GetColumnsAfter",1,[i],!1,!0,null,!1))):(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0&&OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove"),this._getAdjacentRange("getColumnsAfter",i,this.getLastColumn(),0,1))},d.prototype.getColumnsBefore=function(i){return ct()?(l("Range.getColumnsBefore",c,"1.3",h),new n.Range(this.context,t(this.context,this,"GetColumnsBefore",1,[i],!1,!0,null,!1))):(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0&&OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove"),this._getAdjacentRange("getColumnsBefore",i,this.getColumn(0),0,-1))},d.prototype.getEntireColumn=function(){return new n.Range(this.context,t(this.context,this,"GetEntireColumn",1,[],!1,!0,null,!1))},d.prototype.getEntireRow=function(){return new n.Range(this.context,t(this.context,this,"GetEntireRow",1,[],!1,!0,null,!1))},d.prototype.getIntersection=function(i){return new n.Range(this.context,t(this.context,this,"GetIntersection",1,[i],!1,!0,null,!1))},d.prototype.getIntersectionOrNullObject=function(i){return l("Range.getIntersectionOrNullObject",c,"1.4",h),new n.Range(this.context,t(this.context,this,"GetIntersectionOrNullObject",1,[i],!1,!0,null,!1))},d.prototype.getLastCell=function(){return new n.Range(this.context,t(this.context,this,"GetLastCell",1,[],!1,!0,null,!1))},d.prototype.getLastColumn=function(){return new n.Range(this.context,t(this.context,this,"GetLastColumn",1,[],!1,!0,null,!1))},d.prototype.getLastRow=function(){return new n.Range(this.context,t(this.context,this,"GetLastRow",1,[],!1,!0,null,!1))},d.prototype.getOffsetRange=function(i,r){return new n.Range(this.context,t(this.context,this,"GetOffsetRange",1,[i,r],!1,!0,null,!1))},d.prototype.getResizedRange=function(i,r){if(!ct()){this._ensureInteger(i,"getResizedRange");this._ensureInteger(r,"getResizedRange");var u=i>=0&&r>=0?this:this.getCell(0,0);return u.getBoundingRect(this.getLastCell().getOffsetRange(i,r))}return l("Range.getResizedRange",c,"1.3",h),new n.Range(this.context,t(this.context,this,"GetResizedRange",1,[i,r],!1,!0,null,!1))},d.prototype.getRow=function(i){return new n.Range(this.context,t(this.context,this,"GetRow",1,[i],!1,!0,null,!1))},d.prototype.getRowsAbove=function(i){return ct()?(l("Range.getRowsAbove",c,"1.3",h),new n.Range(this.context,t(this.context,this,"GetRowsAbove",1,[i],!1,!0,null,!1))):(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0&&OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove"),this._getAdjacentRange("getRowsAbove",i,this.getRow(0),-1,0))},d.prototype.getRowsBelow=function(i){return ct()?(l("Range.getRowsBelow",c,"1.3",h),new n.Range(this.context,t(this.context,this,"GetRowsBelow",1,[i],!1,!0,null,!1))):(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0&&OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove"),this._getAdjacentRange("getRowsBelow",i,this.getLastRow(),1,0))},d.prototype.getUsedRange=function(i){return new n.Range(this.context,t(this.context,this,"GetUsedRange",1,[i],!1,!0,null,!1))},d.prototype.getUsedRangeOrNullObject=function(i){return l("Range.getUsedRangeOrNullObject",c,"1.4",h),new n.Range(this.context,t(this.context,this,"GetUsedRangeOrNullObject",1,[i],!1,!0,null,!1))},d.prototype.getVisibleView=function(){return l("Range.getVisibleView",c,"1.3",h),new n.RangeView(this.context,t(this.context,this,"GetVisibleView",1,[],!1,!1,null,!1))},d.prototype.insert=function(i){return new n.Range(this.context,t(this.context,this,"Insert",0,[i],!1,!0,null,!1))},d.prototype.merge=function(n){l("Range.merge",c,"1.2",h);s(this.context,this,"Merge",0,[n],!1)},d.prototype.select=function(){s(this.context,this,"Select",1,[],!1)},d.prototype.unmerge=function(){l("Range.unmerge",c,"1.2",h);s(this.context,this,"Unmerge",0,[],!1)},d.prototype._KeepReference=function(){s(this.context,this,"_KeepReference",1,[],!1)},d.prototype._ValidateArraySize=function(n,t){l("Range._ValidateArraySize",c,"1.3",h);s(this.context,this,"_ValidateArraySize",1,[n,t],!1)},d.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;v(this,t);u(t.Address)||(this._A=t.Address);u(t.AddressLocal)||(this._Ad=t.AddressLocal);u(t.CellCount)||(this._C=t.CellCount);u(t.ColumnCount)||(this._Co=t.ColumnCount);u(t.ColumnHidden)||(this._Col=t.ColumnHidden);u(t.ColumnIndex)||(this._Colu=t.ColumnIndex);u(t.Formulas)||(this.m_formulas=t.Formulas);u(t.FormulasLocal)||(this.m_formulasLocal=t.FormulasLocal);u(t.FormulasR1C1)||(this.m_formulasR1C1=t.FormulasR1C1);u(t.Hidden)||(this._H=t.Hidden);u(t.NumberFormat)||(this.m_numberFormat=t.NumberFormat);u(t.RowCount)||(this._R=t.RowCount);u(t.RowHidden)||(this._Ro=t.RowHidden);u(t.RowIndex)||(this._Row=t.RowIndex);u(t.Text)||(this._T=t.Text);u(t.ValueTypes)||(this._V=t.ValueTypes);u(t.Values)||(this.m_values=t.Values);u(t._ReferenceId)||(this.__R=t._ReferenceId);g(this,t,["conditionalFormats","ConditionalFormats","format","Format","sort","Sort","worksheet","Worksheet"])}},d.prototype.load=function(n){return y(this,n)},d.prototype.loadAndSync=function(n){return p(this,n)},d.prototype.retrieve=function(n){return w(this,n)},d.prototype.retrieveAndSync=function(n){return b(this,n)},d.prototype._handleIdResult=function(n){(i.prototype._handleIdResult.call(this,n),e(n))||u(n._ReferenceId)||(this.__R=n._ReferenceId)},d.prototype.track=function(){return this.context.trackedObjects.add(this),this},d.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},d.prototype.toJSON=function(){return a(this,{address:this._A,addressLocal:this._Ad,cellCount:this._C,columnCount:this._Co,columnHidden:this._Col,columnIndex:this._Colu,formulas:this.m_formulas,formulasLocal:this.m_formulasLocal,formulasR1C1:this.m_formulasR1C1,hidden:this._H,numberFormat:this.m_numberFormat,rowCount:this._R,rowHidden:this._Ro,rowIndex:this._Row,text:this._T,values:this.m_values,valueTypes:this._V},{conditionalFormats:this._Con,format:this._F})},d.prototype.ensureUnchanged=function(n){k(this.context,this,n);return},d}(OfficeExtension.ClientObject);n.Range=ui;rt="RangeView";br=function(i){function s(){return i!==null&&i.apply(this,arguments)||this}return __extends(s,i),Object.defineProperty(s.prototype,"_className",{get:function(){return"RangeView"},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rows",{get:function(){return this._Ro||(this._Ro=new n.RangeViewCollection(this.context,o(this.context,this,"Rows",!0,!1,!1))),this._Ro},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"cellAddresses",{get:function(){return r("cellAddresses",this._C,rt,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"columnCount",{get:function(){return r("columnCount",this._Co,rt,this._isNull),this._Co},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulas",{get:function(){return r("formulas",this._F,rt,this._isNull),this._F},set:function(n){this._F=n;f(this.context,this,"Formulas",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulasLocal",{get:function(){return r("formulasLocal",this._Fo,rt,this._isNull),this._Fo},set:function(n){this._Fo=n;f(this.context,this,"FormulasLocal",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulasR1C1",{get:function(){return r("formulasR1C1",this._For,rt,this._isNull),this._For},set:function(n){this._For=n;f(this.context,this,"FormulasR1C1",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"index",{get:function(){return r("index",this._I,rt,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"numberFormat",{get:function(){return r("numberFormat",this._N,rt,this._isNull),this._N},set:function(n){this._N=n;f(this.context,this,"NumberFormat",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rowCount",{get:function(){return r("rowCount",this._R,rt,this._isNull),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"text",{get:function(){return r("text",this._T,rt,this._isNull),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"valueTypes",{get:function(){return r("valueTypes",this._Va,rt,this._isNull),this._Va},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"values",{get:function(){return r("values",this._V,rt,this._isNull),this._V},set:function(n){this._V=n;f(this.context,this,"Values",n)},enumerable:!0,configurable:!0}),s.prototype.set=function(n,t){this._recursivelySet(n,t,["numberFormat","values","formulas","formulasLocal","formulasR1C1"],[],["rows"])},s.prototype.getRange=function(){return new n.Range(this.context,t(this.context,this,"GetRange",1,[],!1,!0,null,!1))},s.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;v(this,t);u(t.CellAddresses)||(this._C=t.CellAddresses);u(t.ColumnCount)||(this._Co=t.ColumnCount);u(t.Formulas)||(this._F=t.Formulas);u(t.FormulasLocal)||(this._Fo=t.FormulasLocal);u(t.FormulasR1C1)||(this._For=t.FormulasR1C1);u(t.Index)||(this._I=t.Index);u(t.NumberFormat)||(this._N=t.NumberFormat);u(t.RowCount)||(this._R=t.RowCount);u(t.Text)||(this._T=t.Text);u(t.ValueTypes)||(this._Va=t.ValueTypes);u(t.Values)||(this._V=t.Values);g(this,t,["rows","Rows"])}},s.prototype.load=function(n){return y(this,n)},s.prototype.loadAndSync=function(n){return p(this,n)},s.prototype.retrieve=function(n){return w(this,n)},s.prototype.retrieveAndSync=function(n){return b(this,n)},s.prototype.toJSON=function(){return a(this,{cellAddresses:this._C,columnCount:this._Co,formulas:this._F,formulasLocal:this._Fo,formulasR1C1:this._For,index:this._I,numberFormat:this._N,rowCount:this._R,text:this._T,values:this._V,valueTypes:this._Va},{rows:this._Ro})},s.prototype.ensureUnchanged=function(n){k(this.context,this,n);return},s}(OfficeExtension.ClientObject);n.RangeView=br;kr="RangeViewCollection";dr=function(i){function u(){return i!==null&&i.apply(this,arguments)||this}return __extends(u,i),Object.defineProperty(u.prototype,"_className",{get:function(){return"RangeViewCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"items",{get:function(){return r("items",this.m__items,kr,this._isNull),this.m__items},enumerable:!0,configurable:!0}),u.prototype.getCount=function(){l("RangeViewCollection.getCount",c,"1.4",h);var t=s(this.context,this,"GetCount",1,[],!1),n=new OfficeExtension.ClientResult;return d(this,t,n),n},u.prototype.getItemAt=function(i){return new n.RangeView(this.context,t(this.context,this,"GetItemAt",1,[i],!1,!1,null,!1))},u.prototype._handleResult=function(t){var u,f,r,o;if((i.prototype._handleResult.call(this,t),!e(t))&&(u=t,v(this,u),!e(u[OfficeExtension.Constants.items])))for(this.m__items=[],f=u[OfficeExtension.Constants.items],r=0;r6&&i.slice(0,5)===t.DateJSONPrefix&&i.slice(-1)===t.DateJSONSuffix&&(r=new Date(parseInt(i.slice(5,-1))),r)?r:i})},t._replaceDateWithStringDate=function(n){var i=JSON.stringify(n,function(n,i){return this[n]instanceof Date?t.DateJSONPrefix+this[n].getTime()+t.DateJSONSuffix:i});return JSON.parse(i)},Object.defineProperty(t.prototype,"key",{get:function(){return r("key",this._K,vi,this._isNull),this._K},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return r("value",this.m_value,vi,this._isNull),this.m_value},set:function(n){if(!e(n)){this.m_value=n;var i=t._replaceDateWithStringDate(n);f(this.context,this,"Value",i);return}this.m_value=n;f(this.context,this,"Value",n)},enumerable:!0,configurable:!0}),t.prototype.set=function(n,t){this._recursivelySet(n,t,["value"],[],[])},t.prototype.delete=function(){s(this.context,this,"Delete",0,[],!1)},t.prototype._handleResult=function(i){if(n.prototype._handleResult.call(this,i),!e(i)){var r=i;v(this,r);u(r.Key)||(this._K=r.Key);u(r.Value)||(this.m_value=r.Value,this.m_value=t.replaceStringDateWithDate(this.m_value))}},t.prototype.load=function(n){return y(this,n)},t.prototype.loadAndSync=function(n){return p(this,n)},t.prototype.retrieve=function(n){return w(this,n)},t.prototype.retrieveAndSync=function(n){return b(this,n)},t.prototype.toJSON=function(){return a(this,{key:this._K,value:this.m_value},{})},t.prototype.ensureUnchanged=function(n){k(this.context,this,n);return},t}(OfficeExtension.ClientObject);bt.DateJSONPrefix="Date(";bt.DateJSONSuffix=")";n.Setting=bt;tu="NamedItemCollection";iu=function(i){function u(){return i!==null&&i.apply(this,arguments)||this}return __extends(u,i),Object.defineProperty(u.prototype,"_className",{get:function(){return"NamedItemCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"items",{get:function(){return r("items",this.m__items,tu,this._isNull),this.m__items},enumerable:!0,configurable:!0}),u.prototype.add=function(i,r,u){return l("NamedItemCollection.add",c,"1.4",h),new n.NamedItem(this.context,t(this.context,this,"Add",0,[i,r,u],!1,!0,null,!1))},u.prototype.addFormulaLocal=function(i,r,u){return l("NamedItemCollection.addFormulaLocal",c,"1.4",h),new n.NamedItem(this.context,t(this.context,this,"AddFormulaLocal",0,[i,r,u],!1,!1,null,!1))},u.prototype.getCount=function(){l("NamedItemCollection.getCount",c,"1.4",h);var t=s(this.context,this,"GetCount",1,[],!1),n=new OfficeExtension.ClientResult;return d(this,t,n),n},u.prototype.getItem=function(t){return new n.NamedItem(this.context,it(this.context,this,[t]))},u.prototype.getItemOrNullObject=function(i){return l("NamedItemCollection.getItemOrNullObject",c,"1.4",h),new n.NamedItem(this.context,t(this.context,this,"GetItemOrNullObject",1,[i],!1,!1,null,!1))},u.prototype._handleResult=function(t){var u,f,r,o;if((i.prototype._handleResult.call(this,t),!e(t))&&(u=t,v(this,u),!e(u[OfficeExtension.Constants.items])))for(this.m__items=[],f=u[OfficeExtension.Constants.items],r=0;r"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"error",{get:function(){return r("error",this._E,hr,this._isNull),this._E},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return r("value",this._V,hr,this._isNull),this._V},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){if(n.prototype._handleResult.call(this,t),!e(t)){var i=t;v(this,i);u(i.Error)||(this._E=i.Error);u(i.Value)||(this._V=i.Value)}},t.prototype.load=function(n){return y(this,n)},t.prototype.loadAndSync=function(n){return p(this,n)},t.prototype.retrieve=function(n){return w(this,n)},t.prototype.retrieveAndSync=function(n){return b(this,n)},t.prototype.toJSON=function(){return a(this,{error:this._E,value:this._V},{})},t.prototype.ensureUnchanged=function(n){k(this.context,this,n);return},t}(OfficeExtension.ClientObject);n.FunctionResult=i;al="Functions";fs=function(n){function r(){return n!==null&&n.apply(this,arguments)||this}return __extends(r,n),Object.defineProperty(r.prototype,"_className",{get:function(){return"Functions"},enumerable:!0,configurable:!0}),r.prototype.abs=function(n){return new i(this.context,t(this.context,this,"Abs",0,[n],!1,!0,null,!1))},r.prototype.accrInt=function(n,r,u,f,e,o,s,h){return new i(this.context,t(this.context,this,"AccrInt",0,[n,r,u,f,e,o,s,h],!1,!0,null,!1))},r.prototype.accrIntM=function(n,r,u,f,e){return new i(this.context,t(this.context,this,"AccrIntM",0,[n,r,u,f,e],!1,!0,null,!1))},r.prototype.acos=function(n){return new i(this.context,t(this.context,this,"Acos",0,[n],!1,!0,null,!1))},r.prototype.acosh=function(n){return new i(this.context,t(this.context,this,"Acosh",0,[n],!1,!0,null,!1))},r.prototype.acot=function(n){return new i(this.context,t(this.context,this,"Acot",0,[n],!1,!0,null,!1))},r.prototype.acoth=function(n){return new i(this.context,t(this.context,this,"Acoth",0,[n],!1,!0,null,!1))},r.prototype.amorDegrc=function(n,r,u,f,e,o,s){return new i(this.context,t(this.context,this,"AmorDegrc",0,[n,r,u,f,e,o,s],!1,!0,null,!1))},r.prototype.amorLinc=function(n,r,u,f,e,o,s){return new i(this.context,t(this.context,this,"AmorLinc",0,[n,r,u,f,e,o,s],!1,!0,null,!1))},r.prototype.and=function(){for(var r=[],n=0;n 6 && v.slice(0, 5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) { + d=new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + } + else { + value=Sys.Serialization.JavaScriptSerializer.deserialize(value, true); + } + ret[key]=value; + } + catch (ex) { + } + } + return ret; + }, loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) { if (url && callback) { var doc=window.document; @@ -837,6 +885,14 @@ OSF.OUtil=(function () { } } }, + removeClass: function OSF_OUtil$removeClass(elmt, val) { + if (OSF.OUtil.hasClass(elmt, val)) { + var className=elmt.getAttribute(_classN); + var reg=new RegExp('(\\s|^)'+val+'(\\s|$)'); + className=className.replace(reg, ''); + elmt.setAttribute(_classN, className); + } + }, hasClass: function OSF_OUtil$hasClass(elmt, clsName) { var className=elmt.getAttribute(_classN); return className && className.match(new RegExp('(\\s|^)'+clsName+'(\\s|$)')); @@ -973,6 +1029,12 @@ OSF.OUtil.Guid=(function () { })(); window.OSF=OSF; OSF.OUtil.setNamespace("OSF", window); +OSF.MessageIDs={ + "FetchBundleUrl": 0, + "LoadReactBundle": 1, + "LoadBundleSuccess": 2, + "LoadBundleError": 3 +}; OSF.AppName={ Unsupported: 0, Excel: 1, @@ -1000,7 +1062,10 @@ OSF.AppName={ OutlookAndroid: 4194304, OneNoteWinRT: 8388608, ExcelAndroid: 8388609, - VisioWebApp: 8388610 + VisioWebApp: 8388610, + OneNoteIOS: 8388611, + WordAndroid: 8388613, + PowerpointAndroid: 8388614 }; OSF.InternalPerfMarker={ DataCoercionBegin: "Agave.HostCall.CoerceDataStart", @@ -1030,7 +1095,9 @@ OSF.AgaveHostAction={ "EscExit": 15, "F2Exit": 16, "ExitNoFocusable": 17, - "ExitNoFocusableShift": 18 + "ExitNoFocusableShift": 18, + "MouseEnter": 19, + "MouseLeave": 20 }; OSF.SharedConstants={ "NotificationConversationIdSuffix": '_ntf' @@ -1166,6 +1233,8 @@ Microsoft.Office.WebExtension.Parameters={ HostType: "hostType", ForceConsent: "forceConsent", ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + Reserved: "reserved", Xml: "xml", Namespace: "namespace", Prefix: "prefix", @@ -1198,7 +1267,9 @@ Microsoft.Office.WebExtension.Parameters={ DisplayInIframe: "displayInIframe", MessageContent: "messageContent", HideTitle: "hideTitle", - AppCommandInvocationCompletedData: "appCommandInvocationCompletedData" + UseDeviceIndependentPixels: "useDeviceIndependentPixels", + AppCommandInvocationCompletedData: "appCommandInvocationCompletedData", + Base64: "base64" }; OSF.OUtil.setNamespace("DDA", OSF); OSF.DDA.DocumentMode={ @@ -1255,6 +1326,8 @@ OSF.DDA.MethodDispId={ dispidAppCommandInvocationCompletedMethod: 94, dispidCloseContainerMethod: 97, dispidGetAccessTokenMethod: 98, + dispidOpenBrowserWindow: 102, + dispidCreateDocumentMethod: 105, dispidGetSelectedTaskMethod: 110, dispidGetSelectedResourceMethod: 111, dispidGetTaskMethod: 112, @@ -1310,8 +1383,11 @@ OSF.DDA.EventDispId={ dispidObjectDataChangedEvent: 15, dispidContentControlAddedEvent: 16, dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, dispidAppCommandInvokedEvent: 39, dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, dispidTaskSelectionChangedEvent: 56, dispidResourceSelectionChangedEvent: 57, dispidViewSelectionChangedEvent: 58, @@ -1443,7 +1519,9 @@ OSF.DDA.ErrorCodeManager=(function () { ooeSSOInvalidGrant: 13005, ooeSSOClientError: 13006, ooeSSOServerError: 13007, - ooeAddinIsAlreadyRequestingToken: 13008 + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009, + ooeSSOConnectionLost: 13010 }, initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={ name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotSupported }; @@ -1541,6 +1619,8 @@ OSF.DDA.ErrorCodeManager=(function () { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={ name: stringNS.L_SSOClientError, message: stringNS.L_SSOClientErrorMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={ name: stringNS.L_SSOServerError, message: stringNS.L_SSOServerErrorMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={ name: stringNS.L_AddinIsAlreadyRequestingToken, message: stringNS.L_AddinIsAlreadyRequestingTokenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={ name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={ name: stringNS.L_SSOConnectionLostError, message: stringNS.L_SSOConnectionLostErrorMessage }; } }; })(); @@ -2242,6 +2322,11 @@ OSF.DDA.Context=function OSF_DDA_Context(officeAppContext, document, license, ap value: officeAppContext.auth }); } + if (officeAppContext.application) { + OSF.OUtil.defineEnumerableProperty(this, "application", { + value: officeAppContext.application + }); + } if (officeAppContext.get_isDialog()) { var requirements=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); OSF.OUtil.defineEnumerableProperty(this, "requirements", { @@ -2284,6 +2369,8 @@ OSF.DDA.OutlookContext=function OSF_DDA_OutlookContext(appContext, settings, lic }; OSF.OUtil.extend(OSF.DDA.OutlookContext, OSF.DDA.Context); OSF.DDA.OutlookAppOm=function OSF_DDA_OutlookAppOm(appContext, window, appReady) { }; +OSF.DDA.Application=function OSF_DDA_Application(officeAppContext) { +}; OSF.DDA.Document=function OSF_DDA_Document(officeAppContext, settings) { var mode; switch (officeAppContext.get_clientMode()) { @@ -3020,6 +3107,8 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, "ExecuteRichApiRequestAsync": did.dispidExecuteRichApiRequestMethod, "AppCommandInvocationCompletedAsync": did.dispidAppCommandInvocationCompletedMethod, "CloseContainerAsync": did.dispidCloseContainerMethod, + "OpenBrowserWindow": did.dispidOpenBrowserWindow, + "CreateDocumentAsync": did.dispidCreateDocumentMethod, "AddDataPartAsync": did.dispidAddDataPartMethod, "GetDataPartByIdAsync": did.dispidGetDataPartByIdMethod, "GetDataPartsByNameSpaceAsync": did.dispidGetDataPartsByNamespaceMethod, @@ -3059,13 +3148,13 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, } jsom=OSF.DDA.SyncMethodNames; did=OSF.DDA.MethodDispId; - var asyncMethodMap={ + var syncMethodMap={ "MessageParent": did.dispidMessageParentMethod, "SendMessage": did.dispidSendMessageMethod }; - for (var method in asyncMethodMap) { + for (var method in syncMethodMap) { if (jsom[method]) { - dispIdMap[jsom[method].id]=asyncMethodMap[method]; + dispIdMap[jsom[method].id]=syncMethodMap[method]; } } jsom=Microsoft.Office.WebExtension.EventType; @@ -3085,7 +3174,10 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, "ObjectSelectionChanged": did.dispidObjectSelectionChangedEvent, "ObjectDataChanged": did.dispidObjectDataChangedEvent, "ContentControlAdded": did.dispidContentControlAddedEvent, + "RichApiMessage": did.dispidRichApiMessageEvent, "ItemChanged": did.dispidOlkItemSelectedChangedEvent, + "RecipientsChanged": did.dispidOlkRecipientsChangedEvent, + "AppointmentTimeChanged": did.dispidOlkAppointmentTimeChangedEvent, "TaskSelectionChanged": did.dispidTaskSelectionChangedEvent, "ResourceSelectionChanged": did.dispidResourceSelectionChangedEvent, "ViewSelectionChanged": did.dispidViewSelectionChangedEvent, @@ -3161,6 +3253,7 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, else { hostCallArgs=callArgs; } + var startTime=(new Date()).getTime(); delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ "dispId": dispId, "hostCallArgs": hostCallArgs, @@ -3181,6 +3274,9 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, } var payload=asyncMethodCall.processResponse(status, responseArgs, caller, callArgs); OSF.DDA.issueAsyncResult(callArgs, status, payload); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(dispId, hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); + } } }); } @@ -4048,7 +4144,6 @@ OSF.DDA.SafeArray.Delegate.executeAsync=function OSF_DDA_SafeArray_Delegate$Exec if (args.onCalling) { args.onCalling(); } - var startTime=(new Date()).getTime(); OSF.ClientHostController.execute(args.dispId, toArray(args.hostCallArgs), function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode) { var result=hostResponseArgs.toArray(); var status=result[OSF.DDA.SafeArray.Response.Status]; @@ -4095,9 +4190,6 @@ OSF.DDA.SafeArray.Delegate.executeAsync=function OSF_DDA_SafeArray_Delegate$Exec } args.onComplete(status, payload); } - if (OSF.AppTelemetry) { - OSF.AppTelemetry.onMethodDone(args.dispId, args.hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); - } return true; }); } @@ -4213,6 +4305,9 @@ OSF.InitializationHelper.prototype.prepareApiSurface=function OSF_Initialization } } } + if (OSF.DDA.OpenBrowser) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.OpenBrowserWindow]); + } if (OSF.DDA.Auth) { appContext.auth=new OSF.DDA.Auth(); OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth, [OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]); @@ -4503,6 +4598,7 @@ var OSFWebkit; MethodId[MethodId["UnregisterEvent"]=3]="UnregisterEvent"; MethodId[MethodId["WriteSettings"]=4]="WriteSettings"; MethodId[MethodId["GetContext"]=5]="GetContext"; + MethodId[MethodId["SendMessage"]=6]="SendMessage"; })(OSFWebkit.MethodId || (OSFWebkit.MethodId={})); var MethodId=OSFWebkit.MethodId; var WebkitHostController=(function () { @@ -4645,6 +4741,11 @@ var OSFWebkit; } }; WebkitHostController.prototype.sendMessage=function (params) { + var message=params[Microsoft.Office.WebExtension.Parameters.MessageContent]; + if (!isNaN(parseFloat(message)) && isFinite(message)) { + message=message.toString(); + } + this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName, OSF.Webkit.MethodId.SendMessage, message, null); }; return WebkitHostController; })(); @@ -5237,7 +5338,7 @@ var OSFAriaLogger; function AriaLogger() { } AriaLogger.prototype.getAriaCDNLocation=function () { - return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry-2.8.0.min.js"); + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry.js"); }; AriaLogger.getInstance=function () { if (AriaLogger.AriaLoggerObj===undefined) { @@ -5254,13 +5355,10 @@ var OSFAriaLogger; try { if (!this.ALogger) { var OfficeExtensibilityTenantID="db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; - var configuration=new microsoft.applications.telemetry.LogConfiguration(); - configuration.enableAutoUserSession=true; - microsoft.applications.telemetry.LogManager.initialize(OfficeExtensibilityTenantID, configuration); - this.ALogger=new microsoft.applications.telemetry.Logger(); + this.ALogger=AWTLogManager.initialize(OfficeExtensibilityTenantID); } - var eventProperties=new microsoft.applications.telemetry.EventProperties(); - eventProperties.name="Office.Extensibility.OfficeJS."+tableName; + var eventProperties=new AWTEventProperties(); + eventProperties.setName("Office.Extensibility.OfficeJS."+tableName); for (var key in telemetryData) { if (key.toLowerCase() !=="table") { eventProperties.setProperty(key, telemetryData[key]); @@ -5293,6 +5391,7 @@ var OSFAppTelemetry; var sessionId=OSF.OUtil.Guid.generateNewGuid(); var osfControlAppCorrelationId=""; var omexDomainRegex=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"); + OSFAppTelemetry.enableTelemetry=true; ; var AppInfo=(function () { function AppInfo() { @@ -5376,17 +5475,19 @@ var OSFAppTelemetry; function AppLogger() { } AppLogger.prototype.LogData=function (data) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, data.SerializeRow(), OSF.Logger.SendFlag.none); - OSFAriaLogger.AriaLogger.getInstance().logData(data); + try { + OSFAriaLogger.AriaLogger.getInstance().logData(data); + } + catch (e) { + } }; AppLogger.prototype.LogRawData=function (log) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, log, OSF.Logger.SendFlag.none); try { OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)); } @@ -5426,7 +5527,7 @@ var OSFAppTelemetry; } appInfo.message=context.get_hostCustomMessage(); appInfo.officeJSVersion=OSF.ConstantNames.FileVersion; - appInfo.hostJSVersion="16.0.8119.1000"; + appInfo.hostJSVersion="16.0.8916.1000"; if (context._wacHostEnvironment) { appInfo.wacHostEnvironment=context._wacHostEnvironment; } @@ -5657,14 +5758,16 @@ OSF.EventDispatch=function OSF_EventDispatch(eventTypes) { this._eventHandlers={}; this._objectEventHandlers={}; this._queuedEventsArgs={}; - for (var entry in eventTypes) { - var eventType=eventTypes[entry]; - var isObjectEvent=(eventType=="objectDeleted" || eventType=="objectSelectionChanged" || eventType=="objectDataChanged" || eventType=="contentControlAdded"); - if (!isObjectEvent) - this._eventHandlers[eventType]=[]; - else - this._objectEventHandlers[eventType]={}; - this._queuedEventsArgs[eventType]=[]; + if (eventTypes !=null) { + for (var i=0; i < eventTypes.length; i++) { + var eventType=eventTypes[i]; + var isObjectEvent=(eventType=="objectDeleted" || eventType=="objectSelectionChanged" || eventType=="objectDataChanged" || eventType=="contentControlAdded"); + if (!isObjectEvent) + this._eventHandlers[eventType]=[]; + else + this._objectEventHandlers[eventType]={}; + this._queuedEventsArgs[eventType]=[]; + } } }; OSF.EventDispatch.prototype={ @@ -5690,8 +5793,8 @@ OSF.EventDispatch.prototype={ hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) { var handlers=this._eventHandlers[eventType]; if (handlers && handlers.length > 0) { - for (var h in handlers) { - if (handlers[h]===handler) + for (var i=0; i < handlers.length; i++) { + if (handlers[i]===handler) return true; } } @@ -5796,8 +5899,9 @@ OSF.EventDispatch.prototype={ var eventType=eventArgs.type; if (eventType && this._eventHandlers[eventType]) { var eventHandlers=this._eventHandlers[eventType]; - for (var handler in eventHandlers) - eventHandlers[handler](eventArgs); + for (var i=0; i < eventHandlers.length; i++) { + eventHandlers[i](eventArgs); + } return true; } else { @@ -5894,6 +5998,9 @@ OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEve case Microsoft.Office.WebExtension.EventType.ContentControlAdded: args=new OSF.DDA.ObjectEventArgs(eventType, eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args=new OSF.DDA.RichApiMessageEventArgs(eventType, eventProperties); + break; case Microsoft.Office.WebExtension.EventType.DataNodeInserted: args=new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); break; @@ -5919,10 +6026,28 @@ OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEve args=new OSF.DDA.DialogParentEventArgs(eventProperties); break; case Microsoft.Office.WebExtension.EventType.ItemChanged: - if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlookwebapp") { + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { args=new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); target.initialize(args["initialData"]); - target.setCurrentItemNumber(args["itemNumber"].itemNumber); + if (OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]=="win32" || OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]=="mac") { + target.setCurrentItemNumber(args["itemNumber"].itemNumber); + } + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { + args=new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { + args=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); } else { throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); @@ -6109,6 +6234,13 @@ OSF.DDA.AsyncMethodCalls.define({ "types": ["boolean"], "defaultValue": false } + }, + { + name: Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels, + value: { + "types": ["boolean"], + "defaultValue": false + } } ], privateStateCallbacks: [], @@ -6146,13 +6278,13 @@ OSF.DDA.AsyncMethodCalls.define({ if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] <=0) { callArgs[Microsoft.Office.WebExtension.Parameters.Width]=1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Width]=99; } if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] <=0) { callArgs[Microsoft.Office.WebExtension.Parameters.Height]=1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Height]=99; } if (!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) { @@ -6598,52 +6730,10 @@ OSF.DDA.SettingsManager={ DateJSONPrefix: "Date(", DataJSONSuffix: ")", serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) { - var ret={}; - for (var key in settingsCollection) { - var value=settingsCollection[key]; - try { - if (JSON) { - value=JSON.stringify(value, function dateReplacer(k, v) { - return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix+this[k].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix : v; - }); - } - else { - value=Sys.Serialization.JavaScriptSerializer.serialize(value); - } - ret[key]=value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.serializeSettings(settingsCollection); }, deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) { - var ret={}; - serializedSettings=serializedSettings || {}; - for (var key in serializedSettings) { - var value=serializedSettings[key]; - try { - if (JSON) { - value=JSON.parse(value, function dateReviver(k, v) { - var d; - if (typeof v==='string' && v && v.length > 6 && v.slice(0, 5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) { - d=new Date(parseInt(v.slice(5, -1))); - if (d) { - return d; - } - } - return v; - }); - } - else { - value=Sys.Serialization.JavaScriptSerializer.deserialize(value, true); - } - ret[key]=value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.deserializeSettings(serializedSettings); } }; OSF.DDA.Settings=function OSF_DDA_Settings(settings) { @@ -7683,6 +7773,54 @@ OSF.DDA.SafeArray.Delegate.ParameterMap.define({ { name: Microsoft.Office.WebExtension.Parameters.SelectionMode, value: 2 } ] }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { RichApiMessage: "richApiMessage" }); +OSF.DDA.RichApiMessageEventArgs=function OSF_DDA_RichApiMessageEventArgs(eventType, eventProperties) { + var entryArray=eventProperties[Microsoft.Office.WebExtension.Parameters.Data]; + var entries=[]; + if (entryArray) { + for (var i=0; i < entryArray.length; i++) { + var elem=entryArray[i]; + if (elem.toArray) { + elem=elem.toArray(); + } + entries.push({ + messageCategory: elem[0], + messageType: elem[1], + targetId: elem[2], + message: elem[3], + id: elem[4], + isRemoteOverride: elem[5] + }); + } + } + OSF.OUtil.defineEnumerableProperties(this, { + "type": { value: Microsoft.Office.WebExtension.EventType.RichApiMessage }, + "entries": { value: entries } + }); +}; +var OfficeExt; +(function (OfficeExt) { + var RichApiMessageManager=(function () { + function RichApiMessageManager() { + this._eventDispatch=null; + this._eventDispatch=new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.RichApiMessage, + ]); + OSF.DDA.DispIdHost.addEventSupport(this, this._eventDispatch); + } + return RichApiMessageManager; + })(); + OfficeExt.RichApiMessageManager=RichApiMessageManager; +})(OfficeExt || (OfficeExt={})); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidRichApiMessageEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); OSF.DDA.AsyncMethodNames.addNames({ ExecuteRichApiRequestAsync: "executeRichApiRequestAsync" }); @@ -8280,6 +8418,51 @@ OSF.DDA.SafeArray.Delegate.ParameterMap.define({ { name: Microsoft.Office.WebExtension.CoercionType.Image, value: 8 } ] }); +OSF.DDA.AsyncMethodNames.addNames({ GetAccessTokenAsync: "getAccessTokenAsync" }); +OSF.DDA.Auth=function OSF_DDA_Auth() { +}; +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetAccessTokenAsync, + requiredArguments: [], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.ForceConsent, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, + value: { + "types": ["string"], + "defaultValue": "" + } + } + ], + onSucceeded: function (dataDescriptor, caller, callArgs) { + var data=dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + return data; + } +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetAccessTokenMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.ForceConsent, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, value: 2 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); OSF.DDA.ExcelDocument=function OSF_DDA_ExcelDocument(officeAppContext, settings) { var bf=new OSF.DDA.BindingFacade(this); OSF.DDA.DispIdHost.addAsyncMethods(bf, [OSF.DDA.AsyncMethodNames.AddFromPromptAsync]); @@ -8293,6 +8476,7 @@ OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function OSF OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM); appContext.doc=new OSF.DDA.ExcelDocument(appContext, this._initializeSettings(appContext, true)); OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi, [OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]); + OSF.DDA.RichApi.richApiMessageManager=new OfficeExt.RichApiMessageManager(); appReady(); }; (function () { @@ -8354,9 +8538,10 @@ var __extends=(this && this.__extends) || function (d, b) { var OfficeExtension; (function (OfficeExtension) { var Action=(function () { - function Action(actionInfo, isWriteOperation) { + function Action(actionInfo, isWriteOperation, isRestrictedResourceAccess) { this.m_actionInfo=actionInfo; this.m_isWriteOperation=isWriteOperation; + this.m_isRestrictedResourceAccess=isRestrictedResourceAccess; } Object.defineProperty(Action.prototype, "actionInfo", { get: function () { @@ -8372,12 +8557,30 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(Action.prototype, "isRestrictedResourceAccess", { + get: function () { + return this.m_isRestrictedResourceAccess; + }, + enumerable: true, + configurable: true + }); return Action; }()); OfficeExtension.Action=Action; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + var TraceMarkerActionResultHandler=(function () { + function TraceMarkerActionResultHandler(callback) { + this.m_callback=callback; + } + TraceMarkerActionResultHandler.prototype._handleResult=function (value) { + if (this.m_callback) { + this.m_callback(); + } + }; + return TraceMarkerActionResultHandler; + }()); var ActionFactory=(function () { function ActionFactory() { } @@ -8393,13 +8596,17 @@ var OfficeExtension; var args=[value]; var referencedArgumentObjectPaths=OfficeExtension.Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); OfficeExtension.Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); - var ret=new OfficeExtension.Action(actionInfo, true); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + context._pendingRequest.ensureInstantiateObjectPaths(referencedArgumentObjectPaths); + var ret=new OfficeExtension.Action(actionInfo, true, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); context._pendingRequest.addReferencedObjectPaths(referencedArgumentObjectPaths); + ret.referencedObjectPath=parent._objectPath; + ret.referencedArgumentObjectPaths=referencedArgumentObjectPaths; return ret; }; - ActionFactory.createMethodAction=function (context, parent, methodName, operationType, args) { + ActionFactory.createMethodAction=function (context, parent, methodName, operationType, args, isRestrictedResourceAccess) { OfficeExtension.Utility.validateObjectPath(parent); var actionInfo={ Id: context._nextId(), @@ -8410,15 +8617,20 @@ var OfficeExtension; }; var referencedArgumentObjectPaths=OfficeExtension.Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); OfficeExtension.Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + context._pendingRequest.ensureInstantiateObjectPaths(referencedArgumentObjectPaths); var isWriteOperation=operationType !=1; - var ret=new OfficeExtension.Action(actionInfo, isWriteOperation); + var ret=new OfficeExtension.Action(actionInfo, isWriteOperation, isRestrictedResourceAccess); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); context._pendingRequest.addReferencedObjectPaths(referencedArgumentObjectPaths); + ret.referencedObjectPath=parent._objectPath; + ret.referencedArgumentObjectPaths=referencedArgumentObjectPaths; return ret; }; ActionFactory.createQueryAction=function (context, parent, queryOption) { OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); var actionInfo={ Id: context._nextId(), ActionType: 2, @@ -8426,13 +8638,15 @@ var OfficeExtension; ObjectPathId: parent._objectPath.objectPathInfo.Id, }; actionInfo.QueryInfo=queryOption; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; return ret; }; ActionFactory.createRecursiveQueryAction=function (context, parent, query) { OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); var actionInfo={ Id: context._nextId(), ActionType: 6, @@ -8440,23 +8654,59 @@ var OfficeExtension; ObjectPathId: parent._objectPath.objectPathInfo.Id, RecursiveQueryInfo: query }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; + return ret; + }; + ActionFactory.createQueryAsJsonAction=function (context, parent, queryOption) { + OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + var actionInfo={ + Id: context._nextId(), + ActionType: 7, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + }; + actionInfo.QueryInfo=queryOption; + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; + return ret; + }; + ActionFactory.createEnsureUnchangedAction=function (context, parent, objectState) { + OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + var actionInfo={ + Id: context._nextId(), + ActionType: 8, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }; + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; return ret; }; ActionFactory.createInstantiateAction=function (context, obj) { OfficeExtension.Utility.validateObjectPath(obj); + context._pendingRequest.ensureInstantiateObjectPath(obj._objectPath.parentObjectPath); + context._pendingRequest.ensureInstantiateObjectPaths(obj._objectPath.argumentObjectPaths); var actionInfo={ Id: context._nextId(), ActionType: 1, Name: "", ObjectPathId: obj._objectPath.objectPathInfo.Id }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(obj._objectPath); context._pendingRequest.addActionResultHandler(ret, new OfficeExtension.InstantiateActionResultHandler(obj)); + ret.referencedObjectPath=obj._objectPath; return ret; }; ActionFactory.createTraceAction=function (context, message, addTraceMessage) { @@ -8466,13 +8716,17 @@ var OfficeExtension; Name: "Trace", ObjectPathId: 0 }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); if (addTraceMessage) { context._pendingRequest.addTrace(actionInfo.Id, message); } return ret; }; + ActionFactory.createTraceMarkerForCallback=function (context, callback) { + var action=ActionFactory.createTraceAction(context, null, false); + context._pendingRequest.addActionResultHandler(action, new TraceMarkerActionResultHandler(callback)); + }; return ActionFactory; }()); OfficeExtension.ActionFactory=ActionFactory; @@ -8550,6 +8804,7 @@ var OfficeExtension; }; ClientObject.prototype._recursivelySet=function (input, options, scalarWriteablePropertyNames, objectPropertyNames, notAllowedToBeSetPropertyNames) { var isClientObject=(input instanceof ClientObject); + var originalInput=input; if (isClientObject) { if (Object.getPrototypeOf(this)===Object.getPrototypeOf(input)) { input=JSON.parse(JSON.stringify(input)); @@ -8566,31 +8821,38 @@ var OfficeExtension; for (var i=0; i < scalarWriteablePropertyNames.length; i++) { prop=scalarWriteablePropertyNames[i]; if (input.hasOwnProperty(prop)) { - this[prop]=input[prop]; + if (typeof input[prop] !=="undefined") { + this[prop]=input[prop]; + } } } for (var i=0; i < objectPropertyNames.length; i++) { prop=objectPropertyNames[i]; if (input.hasOwnProperty(prop)) { - this[prop].set(input[prop], options); + if (typeof input[prop] !=="undefined") { + var dataToPassToSet=isClientObject ? originalInput[prop] : input[prop]; + this[prop].set(dataToPassToSet, options); + } } } + var throwOnReadOnly=!isClientObject; + if (options && !OfficeExtension.Utility.isNullOrUndefined(throwOnReadOnly)) { + throwOnReadOnly=options.throwOnReadOnly; + } for (var i=0; i < notAllowedToBeSetPropertyNames.length; i++) { prop=notAllowedToBeSetPropertyNames[i]; if (input.hasOwnProperty(prop)) { - throw new OfficeExtension._Internal.RuntimeError({ - code: OfficeExtension.ErrorCodes.invalidArgument, - message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), - debugInfo: { - errorLocation: prop - } - }); + if (typeof input[prop] !=="undefined" && throwOnReadOnly) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.invalidArgument, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), + debugInfo: { + errorLocation: prop + } + }); + } } } - var throwOnReadOnly=!isClientObject; - if (options && !OfficeExtension.Utility.isNullOrUndefined(throwOnReadOnly)) { - throwOnReadOnly=options.throwOnReadOnly; - } for (prop in input) { if (scalarWriteablePropertyNames.indexOf(prop) < 0 && objectPropertyNames.indexOf(prop) < 0) { var propertyDescriptor=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this), prop); @@ -8638,12 +8900,14 @@ var OfficeExtension; this.m_actions=[]; this.m_actionResultHandler={}; this.m_referencedObjectPaths={}; + this.m_instantiatedObjectPaths={}; this.m_flags=0; this.m_traceInfos={}; this.m_pendingProcessEventHandlers=[]; this.m_pendingEventHandlerActions={}; this.m_responseTraceIds={}; this.m_responseTraceMessages=[]; + this.m_preSyncPromises=[]; } Object.defineProperty(ClientRequest.prototype, "flags", { get: function () { @@ -8689,7 +8953,13 @@ var OfficeExtension; if (action.isWriteOperation) { this.m_flags=this.m_flags | 1; } + if (action.isRestrictedResourceAccess) { + this.m_flags=this.m_flags | 2; + } this.m_actions.push(action); + if (action.actionInfo.ActionType==1) { + this.m_instantiatedObjectPaths[action.actionInfo.ObjectPathId]=action; + } }; Object.defineProperty(ClientRequest.prototype, "hasActions", { get: function () { @@ -8698,9 +8968,39 @@ var OfficeExtension; enumerable: true, configurable: true }); + ClientRequest.prototype._getLastAction=function () { + return this.m_actions[this.m_actions.length - 1]; + }; ClientRequest.prototype.addTrace=function (actionId, message) { this.m_traceInfos[actionId]=message; }; + ClientRequest.prototype.ensureInstantiateObjectPath=function (objectPath) { + if (objectPath) { + if (this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + this.ensureInstantiateObjectPath(objectPath.parentObjectPath); + this.ensureInstantiateObjectPaths(objectPath.argumentObjectPaths); + if (!this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + var actionInfo={ + Id: this.m_context._nextId(), + ActionType: 1, + Name: "", + ObjectPathId: objectPath.objectPathInfo.Id + }; + var instantiateAction=new OfficeExtension.Action(actionInfo, false, false); + instantiateAction.referencedObjectPath=objectPath; + this.addAction(instantiateAction); + } + } + }; + ClientRequest.prototype.ensureInstantiateObjectPaths=function (objectPaths) { + if (objectPaths) { + for (var i=0; i < objectPaths.length; i++) { + this.ensureInstantiateObjectPath(objectPaths[i]); + } + } + }; ClientRequest.prototype.addReferencedObjectPath=function (objectPath) { if (this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]) { return; @@ -8718,6 +9018,9 @@ var OfficeExtension; if (objectPath.isWriteOperation) { this.m_flags=this.m_flags | 1; } + if (objectPath.isRestrictedResourceAccess) { + this.m_flags=this.m_flags | 2; + } this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]=objectPath; if (objectPath.objectPathInfo.ObjectPathType==3) { this.addReferencedObjectPaths(objectPath.argumentObjectPaths); @@ -8736,6 +9039,9 @@ var OfficeExtension; this.m_actionResultHandler[action.actionInfo.Id]=resultHandler; }; ClientRequest.prototype.buildRequestMessageBody=function () { + if (OfficeExtension._internalConfig.enableEarlyDispose) { + ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } var objectPaths={}; for (var i in this.m_referencedObjectPaths) { objectPaths[i]=this.m_referencedObjectPaths[i].objectPathInfo; @@ -8786,12 +9092,95 @@ var OfficeExtension; ClientRequest.prototype._getPendingEventHandlerActions=function (eventHandlers) { return this.m_pendingEventHandlerActions[eventHandlers._id]; }; + ClientRequest.prototype._addPreSyncPromise=function (value) { + this.m_preSyncPromises.push(value); + }; + Object.defineProperty(ClientRequest.prototype, "_preSyncPromises", { + get: function () { + return this.m_preSyncPromises; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_actions", { + get: function () { + return this.m_actions; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_objectPaths", { + get: function () { + return this.m_referencedObjectPaths; + }, + enumerable: true, + configurable: true + }); + ClientRequest._updateLastUsedActionIdOfObjectPathId=function (lastUsedActionIdOfObjectPathId, objectPath, actionId) { + while (objectPath) { + if (lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]) { + return; + } + lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]=actionId; + var argumentObjectPaths=objectPath.argumentObjectPaths; + if (argumentObjectPaths) { + var argumentObjectPathsLength=argumentObjectPaths.length; + for (var i=0; i < argumentObjectPathsLength; i++) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, argumentObjectPaths[i], actionId); + } + } + objectPath=objectPath.parentObjectPath; + } + }; + ClientRequest._calculateLastUsedObjectPathIds=function (actions) { + var lastUsedActionIdOfObjectPathId={}; + var actionsLength=actions.length; + for (var index=actionsLength - 1; index >=0; --index) { + var action=actions[index]; + var actionId=action.actionInfo.Id; + if (action.referencedObjectPath) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, action.referencedObjectPath, actionId); + } + var referencedObjectPaths=action.referencedArgumentObjectPaths; + if (referencedObjectPaths) { + var referencedObjectPathsLength=referencedObjectPaths.length; + for (var refIndex=0; refIndex < referencedObjectPathsLength; refIndex++) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, referencedObjectPaths[refIndex], actionId); + } + } + } + var lastUsedObjectPathIdsOfAction={}; + for (var key in lastUsedActionIdOfObjectPathId) { + var actionId=lastUsedActionIdOfObjectPathId[key]; + var objectPathIds=lastUsedObjectPathIdsOfAction[actionId]; + if (!objectPathIds) { + objectPathIds=[]; + lastUsedObjectPathIdsOfAction[actionId]=objectPathIds; + } + objectPathIds.push(parseInt(key)); + } + for (var index=0; index < actionsLength; index++) { + var action=actions[index]; + var lastUsedObjectPathIds=lastUsedObjectPathIdsOfAction[action.actionInfo.Id]; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + action.actionInfo.L=lastUsedObjectPathIds; + } + else if (action.actionInfo.L) { + delete action.actionInfo.L; + } + } + }; return ClientRequest; }()); OfficeExtension.ClientRequest=ClientRequest; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + OfficeExtension._internalConfig={ + showDisposeInfoInDebugInfo: false, + enableEarlyDispose: true, + alwaysPolyfillClientObjectRetrieveMethod: false + }; var SessionBase=(function () { function SessionBase() { } @@ -8885,6 +9274,15 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(ClientRequestContext.prototype, "debugInfo", { + get: function () { + var prettyPrinter=new OfficeExtension.RequestPrettyPrinter(this._rootObjectPropertyName, this._pendingRequest._objectPaths, this._pendingRequest._actions, OfficeExtension._internalConfig.showDisposeInfoInDebugInfo); + var statements=prettyPrinter.process(); + return { pendingStatements: statements }; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ClientRequestContext.prototype, "trackedObjects", { get: function () { if (!this.m_trackedObjects) { @@ -8904,54 +9302,124 @@ var OfficeExtension; }); ClientRequestContext.prototype.load=function (clientObj, option) { OfficeExtension.Utility.validateContext(this, clientObj); - var queryOption=ClientRequestContext.parseQueryOption(option); + var queryOption=ClientRequestContext._parseQueryOption(option); var action=OfficeExtension.ActionFactory.createQueryAction(this, clientObj, queryOption); this._pendingRequest.addActionResultHandler(action, clientObj); }; - ClientRequestContext.parseQueryOption=function (option) { - var queryOption={}; - if (typeof (option)=="string") { - var select=option; - queryOption.Select=OfficeExtension.Utility._parseSelectExpand(select); + ClientRequestContext.isLoadOption=function (loadOption) { + if (!OfficeExtension.Utility.isUndefined(loadOption.select) && (typeof (loadOption.select)==="string" || Array.isArray(loadOption.select))) + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.expand) && (typeof (loadOption.expand)==="string" || Array.isArray(loadOption.expand))) + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.top) && typeof (loadOption.top)==="number") + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.skip) && typeof (loadOption.skip)==="number") + return true; + for (var i in loadOption) { + return false; } - else if (Array.isArray(option)) { - queryOption.Select=option; + return true; + }; + ClientRequestContext.parseStrictLoadOption=function (option) { + var ret={ Select: [] }; + ClientRequestContext.parseStrictLoadOptionHelper(ret, "", "option", option); + return ret; + }; + ClientRequestContext.combineQueryPath=function (pathPrefix, key, separator) { + if (pathPrefix.length===0) { + return key; } - else if (typeof (option)=="object") { - var loadOption=option; - if (typeof (loadOption.select)=="string") { - queryOption.Select=OfficeExtension.Utility._parseSelectExpand(loadOption.select); - } - else if (Array.isArray(loadOption.select)) { - queryOption.Select=loadOption.select; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.select)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.select"); - } - if (typeof (loadOption.expand)=="string") { - queryOption.Expand=OfficeExtension.Utility._parseSelectExpand(loadOption.expand); - } - else if (Array.isArray(loadOption.expand)) { - queryOption.Expand=loadOption.expand; + else { + return pathPrefix+separator+key; + } + }; + ClientRequestContext.parseStrictLoadOptionHelper=function (queryInfo, pathPrefix, argPrefix, option) { + for (var key in option) { + var value=option[key]; + if (key==="$all") { + if (typeof (value) !=="boolean") { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + if (value) { + queryInfo.Select.push(ClientRequestContext.combineQueryPath(pathPrefix, "*", "/")); + } } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.expand)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.expand"); + else if (key==="$top") { + if (typeof (value) !=="number" || pathPrefix.length > 0) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + queryInfo.Top=value; } - if (typeof (loadOption.top)=="number") { - queryOption.Top=loadOption.top; + else if (key==="$skip") { + if (typeof (value) !=="number" || pathPrefix.length > 0) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + queryInfo.Skip=value; } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.top)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.top"); + else { + if (typeof (value)==="boolean") { + if (value) { + queryInfo.Select.push(ClientRequestContext.combineQueryPath(pathPrefix, key, "/")); + } + } + else if (typeof (value)==="object") { + ClientRequestContext.parseStrictLoadOptionHelper(queryInfo, ClientRequestContext.combineQueryPath(pathPrefix, key, "/"), ClientRequestContext.combineQueryPath(argPrefix, key, "."), value); + } + else { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } } - if (typeof (loadOption.skip)=="number") { - queryOption.Skip=loadOption.skip; + } + }; + ClientRequestContext._parseQueryOption=function (option) { + var queryOption={}; + if (typeof (option)=="string") { + var select=option; + queryOption.Select=OfficeExtension.Utility._parseSelectExpand(select); + } + else if (Array.isArray(option)) { + queryOption.Select=option; + } + else if (typeof (option)==="object") { + var loadOption=option; + if (ClientRequestContext.isLoadOption(loadOption)) { + if (typeof (loadOption.select)=="string") { + queryOption.Select=OfficeExtension.Utility._parseSelectExpand(loadOption.select); + } + else if (Array.isArray(loadOption.select)) { + queryOption.Select=loadOption.select; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.select)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.select"); + } + if (typeof (loadOption.expand)=="string") { + queryOption.Expand=OfficeExtension.Utility._parseSelectExpand(loadOption.expand); + } + else if (Array.isArray(loadOption.expand)) { + queryOption.Expand=loadOption.expand; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.expand)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.expand"); + } + if (typeof (loadOption.top)==="number") { + queryOption.Top=loadOption.top; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.top)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.top"); + } + if (typeof (loadOption.skip)==="number") { + queryOption.Skip=loadOption.skip; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.skip)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.skip"); + } } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.skip)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.skip"); + else { + queryOption=ClientRequestContext.parseStrictLoadOption(option); } } else if (!OfficeExtension.Utility.isNullOrUndefined(option)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option"); + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option"); } return queryOption; }; @@ -8961,7 +9429,7 @@ var OfficeExtension; } var quries={}; for (var key in options) { - quries[key]=ClientRequestContext.parseQueryOption(options[key]); + quries[key]=ClientRequestContext._parseQueryOption(options[key]); } var action=OfficeExtension.ActionFactory.createRecursiveQueryAction(this, clientObj, { Queries: quries, MaxDepth: maxDepth }); this._pendingRequest.addActionResultHandler(action, clientObj); @@ -8969,6 +9437,8 @@ var OfficeExtension; ClientRequestContext.prototype.trace=function (message) { OfficeExtension.ActionFactory.createTraceAction(this, message, true); }; + ClientRequestContext.prototype._processOfficeJsErrorResponse=function (officeJsErrorCode, response) { + }; ClientRequestContext.prototype.syncPrivateMain=function () { var _this=this; return OfficeExtension.Utility._createPromiseFromResult(null) @@ -8996,13 +9466,14 @@ var OfficeExtension; } }) .then(function () { - return _this.syncPrivate(); + var req=_this._pendingRequest; + _this.m_pendingRequest=null; + return _this.processPreSyncPromises(req) + .then(function () { return _this.syncPrivate(req); }); }); }; - ClientRequestContext.prototype.syncPrivate=function () { + ClientRequestContext.prototype.syncPrivate=function (req) { var _this=this; - var req=this._pendingRequest; - this.m_pendingRequest=null; if (!req.hasActions) { return this.processPendingEventHandlers(req); } @@ -9010,7 +9481,7 @@ var OfficeExtension; var requestFlags=req.flags; if (!this._requestExecutor) { if (OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)) { - this._requestExecutor=new OfficeExtension.OfficeJsRequestExecutor(); + this._requestExecutor=new OfficeExtension.OfficeJsRequestExecutor(this); } else { this._requestExecutor=new OfficeExtension.HttpRequestExecutor(); @@ -9028,8 +9499,10 @@ var OfficeExtension; req.invalidatePendingInvalidObjectPaths(); var errorFromResponse=null; var errorFromProcessEventHandlers=null; + this._lastSyncStart=performance.now(); return requestExecutor.executeAsync(this._customData, requestFlags, requestExecutorRequestMessage) .then(function (response) { + _this._lastSyncEnd=performance.now(); errorFromResponse=_this.processRequestExecutorResponseMessage(req, response); return _this.processPendingEventHandlers(req) .catch(function (ex) { @@ -9076,7 +9549,13 @@ var OfficeExtension; req._setResponseTraceIds(response.Body.TraceIds); } var traceMessages=req._responseTraceMessages; + var errorStatementInfo=null; if (response.Body) { + if (response.Body.Error && + response.Body.Error.ActionIndex >=0) { + var prettyPrinter=new OfficeExtension.RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions); + errorStatementInfo=prettyPrinter.processForDebugStatementInfo(response.Body.Error.ActionIndex); + } var actionResults=null; if (response.Body.Results) { actionResults=response.Body.Results; @@ -9102,13 +9581,18 @@ var OfficeExtension; }); } else if (response.Body && response.Body.Error) { + var debugInfo={ + errorLocation: response.Body.Error.Location + }; + if (errorStatementInfo) { + debugInfo.statement=errorStatementInfo.statement; + debugInfo.surroundingStatements=errorStatementInfo.surroundingStatements; + } return new OfficeExtension._Internal.RuntimeError({ code: response.Body.Error.Code, message: response.Body.Error.Message, traceMessages: traceMessages, - debugInfo: { - errorLocation: response.Body.Error.Location - } + debugInfo: debugInfo }); } return null; @@ -9124,6 +9608,17 @@ var OfficeExtension; ClientRequestContext.prototype.createProcessOneEventHandlersFunc=function (eventHandlers, req) { return function () { return eventHandlers._processRegistration(req); }; }; + ClientRequestContext.prototype.processPreSyncPromises=function (req) { + var ret=OfficeExtension.Utility._createPromiseFromResult(null); + for (var i=0; i < req._preSyncPromises.length; i++) { + var p=req._preSyncPromises[i]; + ret=ret.then(this.createProcessOneProSyncFunc(p)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneProSyncFunc=function (p) { + return function () { return p; }; + }; ClientRequestContext.prototype.sync=function (passThroughValue) { return this.syncPrivateMain().then(function () { return passThroughValue; }); }; @@ -9162,9 +9657,15 @@ var OfficeExtension; batch=receivedRunArgs[argOffset+0]; } else if (receivedRunArgs.length==argOffset+2) { - if (receivedRunArgs[argOffset+0] instanceof OfficeExtension.ClientObject) { + if (OfficeExtension.Utility.isNullOrUndefined(receivedRunArgs[argOffset+0])) { + ctxRetriever=ctxInitializer; + } + else if (receivedRunArgs[argOffset+0] instanceof OfficeExtension.ClientObject) { ctxRetriever=function () { return receivedRunArgs[argOffset+0].context; }; } + else if (receivedRunArgs[argOffset+0] instanceof ClientRequestContext) { + ctxRetriever=function () { return receivedRunArgs[argOffset+0]; }; + } else if (Array.isArray(receivedRunArgs[argOffset+0])) { var array=receivedRunArgs[argOffset+0]; if (array.length==0) { @@ -9330,6 +9831,79 @@ var OfficeExtension; return ClientResult; }()); OfficeExtension.ClientResult=ClientResult; + var RetrieveResult=(function () { + function RetrieveResult(m_proxy, m_shouldPolyfill) { + this.m_proxy=m_proxy; + this.m_shouldPolyfill=m_shouldPolyfill; + } + Object.defineProperty(RetrieveResult.prototype, "proxy", { + get: function () { + return this.m_proxy; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RetrieveResult.prototype, "data", { + get: function () { + if (!this.m_isLoaded) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.valueNotLoaded, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: "retrieveResult.data" + } + }); + } + return this.m_data; + }, + enumerable: true, + configurable: true + }); + RetrieveResult.prototype._handleResult=function (value) { + this.m_isLoaded=true; + if (typeof (value)==="object" && value && value._IsNull) { + this.m_data=null; + return; + } + if (this.m_shouldPolyfill) { + this.m_data=this.changePropertyNameToCamelLowerCase(value); + } + else { + this.m_data=value; + } + }; + RetrieveResult.prototype.changePropertyNameToCamelLowerCase=function (value) { + var charCodeUnderscore=95; + if (Array.isArray(value)) { + var ret=[]; + for (var i=0; i < value.length; i++) { + ret.push(this.changePropertyNameToCamelLowerCase(value[i])); + } + return ret; + } + else if (typeof (value)==="object" && value !==null) { + var ret={}; + for (var key in value) { + var propValue=value[key]; + if (key==="_Items") { + ret={}; + ret["items"]=this.changePropertyNameToCamelLowerCase(propValue); + break; + } + else if (key.charCodeAt(0) !==charCodeUnderscore) { + var propName=OfficeExtension.Utility._toCamelLowerCase(key); + ret[propName]=this.changePropertyNameToCamelLowerCase(propValue); + } + } + return ret; + } + else { + return value; + } + }; + return RetrieveResult; + }()); + OfficeExtension.RetrieveResult=RetrieveResult; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { @@ -9351,6 +9925,9 @@ var OfficeExtension; Constants.sourceLibHeader="SdkVersion"; Constants.embeddingPageOrigin="EmbeddingPageOrigin"; Constants.embeddingPageSessionInfo="EmbeddingPageSessionInfo"; + Constants.eventMessageCategory=65536; + Constants.eventWorkbookId="Workbook"; + Constants.eventSourceRemote="Remote"; return Constants; }()); OfficeExtension.Constants=Constants; @@ -9681,7 +10258,7 @@ var OfficeExtension; debugInfo[key]=partialDebugInfo[key]; } if (this.innerError) { - if (this.innerError instanceof OfficeExtension.Error) { + if (this.innerError instanceof OfficeExtension._Internal.RuntimeError) { debugInfo.innerError=this.innerError.debugInfo; } else { @@ -9766,6 +10343,20 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(EventHandlers.prototype, "_context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_callback", { + get: function () { + return this.m_callback; + }, + enumerable: true, + configurable: true + }); EventHandlers.prototype.add=function (handler) { var action=OfficeExtension.ActionFactory.createTraceAction(this.m_context, null, false); this.m_context._pendingRequest._addPendingEventHandlerAction(this, { id: action.actionInfo.Id, handler: handler, operation: 0 }); @@ -9859,6 +10450,13 @@ var OfficeExtension; this.m_allHandlers=handlers; this.m_handler=handler; } + Object.defineProperty(EventHandlerResult.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); EventHandlerResult.prototype.remove=function () { if (this.m_allHandlers && this.m_handler) { this.m_allHandlers.remove(this.m_handler); @@ -9893,6 +10491,8 @@ var OfficeExtension; return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged, handler, callback); }); case 1: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.settings.addHandlerAsync(Office.EventType.SettingsChanged, handler, callback); }); + case 5: + return OfficeExtension.Utility.promisify(function (callback) { return OSF.DDA.RichApi.richApiMessageManager.addHandlerAsync("richApiMessage", handler, callback); }); case 13: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.ObjectDeleted, handler, { id: targetId }, callback); }); case 14: @@ -9921,6 +10521,8 @@ var OfficeExtension; return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.DocumentSelectionChanged, { handler: handler }, callback); }); case 1: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.settings.removeHandlerAsync(Office.EventType.SettingsChanged, { handler: handler }, callback); }); + case 5: + return OfficeExtension.Utility.promisify(function (callback) { return OSF.DDA.RichApi.richApiMessageManager.removeHandlerAsync("richApiMessage", { handler: handler }, callback); }); case 13: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDeleted, { id: targetId, handler: handler }, callback); }); case 14: @@ -9991,6 +10593,139 @@ var OfficeExtension; OfficeExtension.EventRegistration=EventRegistration; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var GenericEventRegistration=(function () { + function GenericEventRegistration() { + this.m_eventRegistration=new OfficeExtension.EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)); + this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this); + } + GenericEventRegistration.prototype.ready=function () { + var _this=this; + if (!this.m_ready) { + if (GenericEventRegistration._testReadyImpl) { + this.m_ready=GenericEventRegistration._testReadyImpl() + .then(function () { + _this.m_isReady=true; + }); + } + else { + this.m_ready=OfficeExtension._Internal.officeJsEventRegistration.register(5, "", this.m_richApiMessageHandler) + .then(function () { + _this.m_isReady=true; + }); + } + } + return this.m_ready; + }; + Object.defineProperty(GenericEventRegistration.prototype, "isReady", { + get: function () { + return this.m_isReady; + }, + enumerable: true, + configurable: true + }); + GenericEventRegistration.prototype.register=function (eventId, targetId, handler) { + var _this=this; + return this.ready() + .then(function () { return _this.m_eventRegistration.register(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype.unregister=function (eventId, targetId, handler) { + var _this=this; + return this.ready() + .then(function () { return _this.m_eventRegistration.unregister(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype._registerEventImpl=function (eventId, targetId) { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._unregisterEventImpl=function (eventId, targetId) { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._handleRichApiMessage=function (msg) { + if (msg && msg.entries) { + for (var entryIndex=0; entryIndex < msg.entries.length; entryIndex++) { + var entry=msg.entries[entryIndex]; + if (entry.messageCategory==OfficeExtension.Constants.eventMessageCategory) { + if (OfficeExtension.Utility._logEnabled) { + OfficeExtension.Utility.log(JSON.stringify(entry)); + } + var funcs=this.m_eventRegistration.getHandlers(entry.messageType, entry.targetId); + if (funcs.length > 0) { + var arg=JSON.parse(entry.message); + if (entry.isRemoteOverride) { + arg.source=OfficeExtension.Constants.eventSourceRemote; + } + for (var i=0; i < funcs.length; i++) { + funcs[i](arg); + } + } + } + } + } + }; + GenericEventRegistration.getGenericEventRegistration=function () { + if (!GenericEventRegistration.s_genericEventRegistration) { + GenericEventRegistration.s_genericEventRegistration=new GenericEventRegistration(); + } + return GenericEventRegistration.s_genericEventRegistration; + }; + GenericEventRegistration.richApiMessageEventCategory=65536; + return GenericEventRegistration; + }()); + function _testSetRichApiMessageReadyImpl(impl) { + GenericEventRegistration._testReadyImpl=impl; + } + OfficeExtension._testSetRichApiMessageReadyImpl=_testSetRichApiMessageReadyImpl; + function _testTriggerRichApiMessageEvent(msg) { + GenericEventRegistration.getGenericEventRegistration()._handleRichApiMessage(msg); + } + OfficeExtension._testTriggerRichApiMessageEvent=_testTriggerRichApiMessageEvent; + var GenericEventHandlers=(function (_super) { + __extends(GenericEventHandlers, _super); + function GenericEventHandlers(context, parentObject, name, eventInfo) { + _super.call(this, context, parentObject, name, eventInfo); + this.m_genericEventInfo=eventInfo; + } + GenericEventHandlers.prototype.add=function (handler) { + var _this=this; + if ((this._handlers.length==0) && this.m_genericEventInfo.registerFunc) { + this.m_genericEventInfo.registerFunc(); + } + if (!GenericEventRegistration.getGenericEventRegistration().isReady) { + this._context._pendingRequest._addPreSyncPromise(GenericEventRegistration.getGenericEventRegistration().ready()); + } + OfficeExtension.ActionFactory.createTraceMarkerForCallback(this._context, function () { + _this._handlers.push(handler); + if (_this._handlers.length==1) { + GenericEventRegistration.getGenericEventRegistration().register(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + return new OfficeExtension.EventHandlerResult(this._context, this, handler); + }; + GenericEventHandlers.prototype.remove=function (handler) { + var _this=this; + if ((this._handlers.length==1) && this.m_genericEventInfo.unregisterFunc) { + this.m_genericEventInfo.unregisterFunc(); + } + OfficeExtension.ActionFactory.createTraceMarkerForCallback(this._context, function () { + var handlers=_this._handlers; + for (var index=handlers.length - 1; index >=0; index--) { + if (handlers[index]===handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length==0) { + GenericEventRegistration.getGenericEventRegistration().unregister(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + }; + GenericEventHandlers.prototype.removeAll=function () { + }; + return GenericEventHandlers; + }(OfficeExtension.EventHandlers)); + OfficeExtension.GenericEventHandlers=GenericEventHandlers; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var HttpRequestExecutor=(function () { function HttpRequestExecutor() { @@ -10042,15 +10777,6 @@ var OfficeExtension; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { - var _Internal; - (function (_Internal) { - _Internal.OfficeRequire=function () { - if (typeof (require) !=="undefined") { - return require; - } - return null; - }(); - })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); var HttpUtility=(function () { function HttpUtility() { } @@ -10058,7 +10784,7 @@ var OfficeExtension; HttpUtility.s_customSendRequestFunc=func; }; HttpUtility.xhrSendRequestFunc=function (request) { - return new _Internal.OfficePromise(function (resolve, reject) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { var xhr=new XMLHttpRequest(); xhr.open(request.method, request.url); xhr.onload=function () { @@ -10070,7 +10796,7 @@ var OfficeExtension; resolve(resp); }; xhr.onerror=function () { - reject(new _Internal.RuntimeError({ + reject(new OfficeExtension._Internal.RuntimeError({ code: OfficeExtension.ErrorCodes.connectionFailure, message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.connectionFailureWithStatus, xhr.statusText) })); @@ -10083,34 +10809,11 @@ var OfficeExtension; xhr.send(request.body); }); }; - HttpUtility.nodejsRequestModuleSendRequestFunc=function (requestInfo) { - HttpUtility.logRequest(requestInfo); - var fetch=_Internal.OfficeRequire(HttpUtility.NodeJsRequestModuleName); - return fetch(requestInfo.url, { method: requestInfo.method, headers: requestInfo.headers, body: requestInfo.body }) - .then(function (resp) { - return resp.text() - .then(function (body) { - var statusCode=resp.status; - var headers={}; - resp.headers.forEach(function (value, name) { - headers[name]=value; - }); - var ret={ statusCode: statusCode, headers: headers, body: body }; - HttpUtility.logResponse(ret); - return ret; - }); - }); - }; HttpUtility.sendRequest=function (request) { HttpUtility.validateAndNormalizeRequest(request); var func=HttpUtility.s_customSendRequestFunc; if (!func) { - if (typeof (window)==="undefined" || typeof (XMLHttpRequest)==="undefined") { - func=HttpUtility.nodejsRequestModuleSendRequestFunc; - } - else { - func=HttpUtility.xhrSendRequestFunc; - } + func=HttpUtility.xhrSendRequestFunc; } return func(request); }; @@ -10126,7 +10829,7 @@ var OfficeExtension; HttpUtility.officeJsSendLocalDocumentRequestFunc=function (request) { request=OfficeExtension.Utility._validateLocalDocumentRequest(request); var requestSafeArray=OfficeExtension.Utility._buildRequestMessageSafeArray(request); - return new _Internal.OfficePromise(function (resolve, reject) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { OSF.DDA.RichApi.executeRichApiRequestAsync(requestSafeArray, function (asyncResult) { var response; if (asyncResult.status=="succeeded") { @@ -10146,7 +10849,7 @@ var OfficeExtension; }; HttpUtility.validateAndNormalizeRequest=function (request) { if (OfficeExtension.Utility.isNullOrUndefined(request)) { - throw _Internal.RuntimeError._createInvalidArgError({ + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError({ argumentName: "request" }); } @@ -10183,7 +10886,6 @@ var OfficeExtension; } } }; - HttpUtility.NodeJsRequestModuleName="node-fetch"; HttpUtility._logBody=false; return HttpUtility; }()); @@ -10207,6 +10909,146 @@ var OfficeExtension; ; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var HostBridgeRequestExecutor=(function () { + function HostBridgeRequestExecutor(session) { + this.m_session=session; + } + HostBridgeRequestExecutor.prototype.executeAsync=function (customData, requestFlags, requestMessage) { + var httpRequestInfo={ + url: OfficeExtension.Constants.processQuery, + method: "POST", + headers: requestMessage.Headers, + body: requestMessage.Body + }; + var message={ + id: HostBridgeSession.nextId(), + type: 1, + flags: requestFlags, + message: httpRequestInfo + }; + OfficeExtension.Utility.log(JSON.stringify(message)); + return this.m_session.sendMessageToHost(message) + .then(function (nativeBridgeResponse) { + OfficeExtension.Utility.log("Received response: "+JSON.stringify(nativeBridgeResponse)); + var responseInfo=nativeBridgeResponse.message; + var response; + if (responseInfo.statusCode===200) { + response={ ErrorCode: null, ErrorMessage: null, Headers: responseInfo.headers, Body: responseInfo.body }; + } + else { + OfficeExtension.Utility.log("Error Response:"+responseInfo.body); + var error=OfficeExtension.Utility._parseErrorResponse(responseInfo); + response={ + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null + }; + } + return response; + }); + }; + return HostBridgeRequestExecutor; + }()); + var HostBridgeSession=(function (_super) { + __extends(HostBridgeSession, _super); + function HostBridgeSession(bridge) { + var _this=this; + _super.call(this); + this.m_promiseResolver={}; + this.m_bridge=bridge; + this.m_bridge.onMessageFromHost=function (msg) { + _this.onMessageFromHost(msg); + }; + } + HostBridgeSession.prototype._resolveRequestUrlAndHeaderInfo=function () { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + HostBridgeSession.prototype._createRequestExecutorOrNull=function () { + OfficeExtension.Utility.log("NativeBridgeSession::CreateRequestExecutor"); + return new HostBridgeRequestExecutor(this); + }; + Object.defineProperty(HostBridgeSession.prototype, "eventRegistration", { + get: function () { + return OfficeExtension._Internal.officeJsEventRegistration; + }, + enumerable: true, + configurable: true + }); + HostBridgeSession.init=function (bridge) { + if (bridge && typeof (bridge)==="object") { + var session=new HostBridgeSession(bridge); + OfficeExtension.ClientRequestContext._overrideSession=session; + OfficeExtension.HttpUtility.setCustomSendLocalDocumentRequestFunc(function (request) { + var bridgeMessage={ + id: HostBridgeSession.nextId(), + type: 1, + flags: 0, + message: request + }; + return session.sendMessageToHost(bridgeMessage) + .then(function (bridgeResponse) { + var responseInfo=bridgeResponse.message; + return responseInfo; + }); + }); + } + }; + HostBridgeSession.prototype.sendMessageToHost=function (message) { + var _this=this; + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + var ret=new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { + _this.m_promiseResolver[message.id]=resolve; + }); + return ret; + }; + HostBridgeSession.prototype.onMessageFromHost=function (messageText) { + if (messageText==="test") { + if (HostBridgeTest._testFunc) { + HostBridgeTest._testFunc(); + } + } + else { + var message=JSON.parse(messageText); + if (typeof (message.id)==="number") { + var resolve=this.m_promiseResolver[message.id]; + if (resolve) { + resolve(message); + } + delete this.m_promiseResolver[message.id]; + } + } + }; + HostBridgeSession.nextId=function () { + return HostBridgeSession.s_nextId++; + }; + HostBridgeSession.s_nextId=1; + return HostBridgeSession; + }(OfficeExtension.SessionBase)); + var HostBridge=(function () { + function HostBridge() { + } + HostBridge.init=function (bridge) { + HostBridgeSession.init(bridge); + }; + return HostBridge; + }()); + OfficeExtension.HostBridge=HostBridge; + if (typeof (_richApiNativeBridge)==="object" && _richApiNativeBridge) { + HostBridge.init(_richApiNativeBridge); + } + var HostBridgeTest=(function () { + function HostBridgeTest() { + } + HostBridgeTest.setTestFunc=function (func) { + HostBridgeTest._testFunc=func; + }; + return HostBridgeTest; + }()); + OfficeExtension.HostBridgeTest=HostBridgeTest; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var ObjectPath=(function () { function ObjectPath(objectPathInfo, parentObjectPath, isCollection, isInvalidAfterRequest) { @@ -10234,9 +11076,19 @@ var OfficeExtension; enumerable: true, configurable: true }); - Object.defineProperty(ObjectPath.prototype, "isCollection", { + Object.defineProperty(ObjectPath.prototype, "isRestrictedResourceAccess", { get: function () { - return this.m_isCollection; + return this.m_isRestrictedResourceAccess; + }, + set: function (value) { + this.m_isRestrictedResourceAccess=value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isCollection", { + get: function () { + return this.m_isCollection; }, enumerable: true, configurable: true @@ -10320,6 +11172,7 @@ var OfficeExtension; this.m_objectPathInfo.ObjectPathType=6; this.m_objectPathInfo.Name=referenceId; this.m_objectPathInfo.ArgumentInfo={}; + delete this.m_objectPathInfo.ParentObjectPathId; this.m_parentObjectPath=null; this.m_argumentObjectPaths=null; return; @@ -10334,15 +11187,15 @@ var OfficeExtension; if (!OfficeExtension.Utility.isNullOrUndefined(id)) { this.m_isInvalidAfterRequest=false; this.m_isValid=true; - if (parentIsCollection) { - this.m_objectPathInfo.ObjectPathType=5; - this.m_objectPathInfo.Name=""; - } - else { + if (!OfficeExtension.Utility.isNullOrEmptyString(getByIdMethodName)) { this.m_objectPathInfo.ObjectPathType=3; this.m_objectPathInfo.Name=getByIdMethodName; this.m_getByIdMethodName=null; } + else { + this.m_objectPathInfo.ObjectPathType=5; + this.m_objectPathInfo.Name=""; + } this.isWriteOperation=false; this.m_objectPathInfo.ArgumentInfo={}; this.m_objectPathInfo.ArgumentInfo.Arguments=[id]; @@ -10377,18 +11230,22 @@ var OfficeExtension; var objectPathInfo={ Id: context._nextId(), ObjectPathType: 1, Name: "" }; return new OfficeExtension.ObjectPath(objectPathInfo, null, false, false); }; - ObjectPathFactory.createNewObjectObjectPath=function (context, typeName, isCollection) { + ObjectPathFactory.createNewObjectObjectPath=function (context, typeName, isCollection, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 2, Name: typeName }; - return new OfficeExtension.ObjectPath(objectPathInfo, null, isCollection, false); + var ret=new OfficeExtension.ObjectPath(objectPathInfo, null, isCollection, false); + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; }; - ObjectPathFactory.createPropertyObjectPath=function (context, parent, propertyName, isCollection, isInvalidAfterRequest) { + ObjectPathFactory.createPropertyObjectPath=function (context, parent, propertyName, isCollection, isInvalidAfterRequest, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 4, Name: propertyName, ParentObjectPathId: parent._objectPath.objectPathInfo.Id, }; - return new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest); + var ret=new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest); + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; }; ObjectPathFactory.createIndexerObjectPath=function (context, parent, args) { var objectPathInfo={ @@ -10412,7 +11269,7 @@ var OfficeExtension; objectPathInfo.ArgumentInfo.Arguments=args; return new OfficeExtension.ObjectPath(objectPathInfo, parentObjectPath, false, false); }; - ObjectPathFactory.createMethodObjectPath=function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName) { + ObjectPathFactory.createMethodObjectPath=function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 3, @@ -10425,6 +11282,7 @@ var OfficeExtension; ret.argumentObjectPaths=argumentObjectPaths; ret.isWriteOperation=(operationType !=1); ret.getByIdMethodName=getByIdMethodName; + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; return ret; }; ObjectPathFactory.createReferenceIdObjectPath=function (context, referenceId) { @@ -10486,9 +11344,11 @@ var OfficeExtension; var OfficeExtension; (function (OfficeExtension) { var OfficeJsRequestExecutor=(function () { - function OfficeJsRequestExecutor() { + function OfficeJsRequestExecutor(context) { + this.m_context=context; } OfficeJsRequestExecutor.prototype.executeAsync=function (customData, requestFlags, requestMessage) { + var _this=this; var messageSafearray=OfficeExtension.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, OfficeJsRequestExecutor.SourceLibHeaderValue); return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { OSF.DDA.RichApi.executeRichApiRequestAsync(messageSafearray, function (result) { @@ -10500,6 +11360,7 @@ var OfficeExtension; } else { response=OfficeExtension.RichApiMessageUtility.buildResponseOnError(result.error.code, result.error.message); + _this.m_context._processOfficeJsErrorResponse(result.error.code, response); } resolve(response); }); @@ -10512,6 +11373,12 @@ var OfficeExtension; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + var _Internal; + (function (_Internal) { + _Internal.OfficeRequire=function () { + return null; + }(); + })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); var _Internal; (function (_Internal) { var PromiseImpl; @@ -10615,17 +11482,6 @@ var OfficeExtension; } lib$es6$promise$asap$$len=0; } - function lib$es6$promise$asap$$attemptVertex() { - try { - var r=require; - var vertx=r('vertx'); - lib$es6$promise$asap$$vertxNext=vertx.runOnLoop || vertx.runOnContext; - return lib$es6$promise$asap$$useVertxTimer(); - } - catch (e) { - return lib$es6$promise$asap$$useSetTimeout(); - } - } var lib$es6$promise$asap$$scheduleFlush; if (lib$es6$promise$asap$$isNode) { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useNextTick(); @@ -10636,9 +11492,6 @@ var OfficeExtension; else if (lib$es6$promise$asap$$isWorker) { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useMessageChannel(); } - else if (lib$es6$promise$asap$$browserWindow===undefined && typeof require==='function') { - lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$attemptVertex(); - } else { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useSetTimeout(); } @@ -11156,6 +12009,305 @@ var OfficeExtension; OfficeExtension.TrackedObjects=TrackedObjects; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var RequestPrettyPrinter=(function () { + function RequestPrettyPrinter(globalObjName, referencedObjectPaths, actions, showDispose) { + if (!globalObjName) { + globalObjName="root"; + } + this.m_globalObjName=globalObjName; + this.m_referencedObjectPaths=referencedObjectPaths; + this.m_actions=actions; + this.m_statements=[]; + this.m_variableNameForObjectPathMap={}; + this.m_variableNameToObjectPathMap={}; + this.m_declaredObjectPathMap={}; + this.m_showDispose=showDispose; + } + RequestPrettyPrinter.prototype.process=function () { + if (this.m_showDispose) { + OfficeExtension.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + for (var i=0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + } + return this.m_statements; + }; + RequestPrettyPrinter.prototype.processForDebugStatementInfo=function (actionIndex) { + if (this.m_showDispose) { + OfficeExtension.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + var surroundingCount=5; + this.m_statements=[]; + var oneStatement=""; + var statementIndex=-1; + for (var i=0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + if (actionIndex==i) { + statementIndex=this.m_statements.length - 1; + } + if (statementIndex >=0 && this.m_statements.length > statementIndex+surroundingCount+1) { + break; + } + } + if (statementIndex < 0) { + return null; + } + var startIndex=statementIndex - surroundingCount; + if (startIndex < 0) { + startIndex=0; + } + var endIndex=statementIndex+1+surroundingCount; + if (endIndex > this.m_statements.length) { + endIndex=this.m_statements.length; + } + var surroundingStatements=[]; + if (startIndex !=0) { + surroundingStatements.push("..."); + } + for (var i_1=startIndex; i_1 < statementIndex; i_1++) { + surroundingStatements.push(this.m_statements[i_1]); + } + surroundingStatements.push("// >>>>>"); + surroundingStatements.push(this.m_statements[statementIndex]); + surroundingStatements.push("// <<<<<"); + for (var i_2=statementIndex+1; i_2 < endIndex; i_2++) { + surroundingStatements.push(this.m_statements[i_2]); + } + if (endIndex < this.m_statements.length) { + surroundingStatements.push("..."); + } + return { + statement: this.m_statements[statementIndex], + surroundingStatements: surroundingStatements + }; + }; + RequestPrettyPrinter.prototype.processOneAction=function (action) { + var actionInfo=action.actionInfo; + switch (actionInfo.ActionType) { + case 1: + this.processInstantiateAction(action); + break; + case 3: + this.processMethodAction(action); + break; + case 2: + this.processQueryAction(action); + break; + case 7: + this.processQueryAsJsonAction(action); + break; + case 6: + this.processRecursiveQueryAction(action); + break; + case 4: + this.processSetPropertyAction(action); + break; + case 5: + this.processTraceAction(action); + break; + case 8: + this.processEnsureUnchangedAction(action); + break; + } + }; + RequestPrettyPrinter.prototype.processInstantiateAction=function (action) { + var objId=action.actionInfo.ObjectPathId; + var objPath=this.m_referencedObjectPaths[objId]; + var varName=this.getObjVarName(objId); + if (!this.m_declaredObjectPathMap[objId]) { + var statement="var "+varName+"="+this.buildObjectPathExpressionWithParent(objPath)+";"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + this.m_declaredObjectPathMap[objId]=varName; + } + else { + var statement="// Instantiate {"+varName+"}"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + } + }; + RequestPrettyPrinter.prototype.processMethodAction=function (action) { + var methodName=action.actionInfo.Name; + if (methodName==="_KeepReference") { + methodName="track"; + } + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+"."+OfficeExtension.Utility._toCamelLowerCase(methodName)+"("+this.buildArgumentsExpression(action.actionInfo.ArgumentInfo)+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAction=function (action) { + var queryExp=this.buildQueryExpression(action); + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".load("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAsJsonAction=function (action) { + var queryExp=this.buildQueryExpression(action); + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".loadJson("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processRecursiveQueryAction=function (action) { + var queryExp=""; + if (action.actionInfo.RecursiveQueryInfo) { + queryExp=JSON.stringify(action.actionInfo.RecursiveQueryInfo); + } + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".loadRecursive("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processSetPropertyAction=function (action) { + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+"."+OfficeExtension.Utility._toCamelLowerCase(action.actionInfo.Name)+"="+this.buildArgumentsExpression(action.actionInfo.ArgumentInfo)+";"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processTraceAction=function (action) { + var statement="context.trace();"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processEnsureUnchangedAction=function (action) { + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".ensureUnchanged("+JSON.stringify(action.actionInfo.ObjectState)+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.appendDisposeCommentIfRelevant=function (statement, action) { + var _this=this; + if (this.m_showDispose) { + var lastUsedObjectPathIds=action.actionInfo.L; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + var objectNamesToDispose=lastUsedObjectPathIds.map(function (item) { return _this.getObjVarName(item); }).join(", "); + return statement+" // And then dispose {"+objectNamesToDispose+"}"; + } + } + return statement; + }; + RequestPrettyPrinter.prototype.buildQueryExpression=function (action) { + if (action.actionInfo.QueryInfo) { + var option={}; + option.select=action.actionInfo.QueryInfo.Select; + option.expand=action.actionInfo.QueryInfo.Expand; + option.skip=action.actionInfo.QueryInfo.Skip; + option.top=action.actionInfo.QueryInfo.Top; + if (typeof (option.top)==="undefined" && typeof (option.skip)==="undefined" && typeof (option.expand)==="undefined") { + if (typeof (option.select)==="undefined") { + return ""; + } + else { + return JSON.stringify(option.select); + } + } + else { + return JSON.stringify(option); + } + } + return ""; + }; + RequestPrettyPrinter.prototype.buildObjectPathExpressionWithParent=function (objPath) { + var hasParent=objPath.objectPathInfo.ObjectPathType==5 || + objPath.objectPathInfo.ObjectPathType==3 || + objPath.objectPathInfo.ObjectPathType==4; + if (hasParent && objPath.objectPathInfo.ParentObjectPathId) { + return this.getObjVarName(objPath.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(objPath); + } + return this.buildObjectPathExpression(objPath); + }; + RequestPrettyPrinter.prototype.buildObjectPathExpression=function (objPath) { + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + return "context."+this.m_globalObjName; + case 5: + return "getItem("+this.buildArgumentsExpression(objPath.objectPathInfo.ArgumentInfo)+")"; + case 3: + return OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name)+"("+this.buildArgumentsExpression(objPath.objectPathInfo.ArgumentInfo)+")"; + case 2: + return objPath.objectPathInfo.Name+".newObject()"; + case 7: + return "null"; + case 4: + return OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + case 6: + return "context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(objPath.objectPathInfo.Name)+")"; + } + }; + RequestPrettyPrinter.prototype.buildArgumentsExpression=function (args) { + var ret=""; + if (!args.Arguments) { + return ret; + } + for (var i=0; i < args.Arguments.length; i++) { + if (i > 0) { + ret=ret+", "; + } + ret=ret+this.buildArgumentLiteral(args.Arguments[i], args.ReferencedObjectPathIds ? args.ReferencedObjectPathIds[i] : null); + } + if (ret==="undefined") { + ret=""; + } + return ret; + }; + RequestPrettyPrinter.prototype.buildArgumentLiteral=function (value, objectPathId) { + if (typeof value=="number" && value===objectPathId) { + return this.getObjVarName(objectPathId); + } + else { + return JSON.stringify(value); + } + }; + RequestPrettyPrinter.prototype.getObjVarNameBase=function (objectPathId) { + var ret="v"; + var objPath=this.m_referencedObjectPaths[objectPathId]; + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + ret=this.m_globalObjName; + break; + case 4: + ret=OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + break; + case 3: + var methodName=objPath.objectPathInfo.Name; + if (methodName.length > 3 && methodName.substr(0, 3)==="Get") { + methodName=methodName.substr(3); + } + ret=OfficeExtension.Utility._toCamelLowerCase(methodName); + break; + case 5: + var parentName=this.getObjVarNameBase(objPath.objectPathInfo.ParentObjectPathId); + if (parentName.charAt(parentName.length - 1)==="s") { + ret=parentName.substr(0, parentName.length - 1); + } + else { + ret=parentName+"Item"; + } + break; + } + return ret; + }; + RequestPrettyPrinter.prototype.getObjVarName=function (objectPathId) { + if (this.m_variableNameForObjectPathMap[objectPathId]) { + return this.m_variableNameForObjectPathMap[objectPathId]; + } + var ret=this.getObjVarNameBase(objectPathId); + if (!this.m_variableNameToObjectPathMap[ret]) { + this.m_variableNameForObjectPathMap[objectPathId]=ret; + this.m_variableNameToObjectPathMap[ret]=objectPathId; + return ret; + } + var i=1; + while (this.m_variableNameToObjectPathMap[ret+i.toString()]) { + i++; + } + ret=ret+i.toString(); + this.m_variableNameForObjectPathMap[objectPathId]=ret; + this.m_variableNameToObjectPathMap[ret]=objectPathId; + return ret; + }; + return RequestPrettyPrinter; + }()); + OfficeExtension.RequestPrettyPrinter=RequestPrettyPrinter; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var ResourceStrings=(function () { function ResourceStrings() { @@ -11176,6 +12328,14 @@ var OfficeExtension; ResourceStrings.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod"; ResourceStrings.valueNotLoaded="ValueNotLoaded"; ResourceStrings.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage"; + ResourceStrings.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"; + ResourceStrings.customFunctionDefintionMissing="CustomFunctionDefintionMissing"; + ResourceStrings.customFunctionImplementationMissing="CustomFunctionImplementationMissing"; + ResourceStrings.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars"; + ResourceStrings.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit"; + ResourceStrings.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch"; + ResourceStrings.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing"; + ResourceStrings.apiNotFoundDetails="ApiNotFoundDetails"; return ResourceStrings; }()); OfficeExtension.ResourceStrings=ResourceStrings; @@ -11195,7 +12355,15 @@ var OfficeExtension; ResourceStringValues.RunMustReturnPromise="The batch function passed to the \".run\" method didn't return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from \"context.sync()\"."; ResourceStringValues.Timeout="The operation has timed out."; ResourceStringValues.ValueNotLoaded="The value of the result object has not been loaded yet. Before reading the value property, call \"context.sync()\" on the associated request context."; - ResourceStringValues.invalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page."; + ResourceStringValues.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page."; + ResourceStringValues.InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again."; + ResourceStringValues.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions."; + ResourceStringValues.CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function."; + ResourceStringValues.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods."; + ResourceStringValues.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name."; + ResourceStringValues.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it."; + ResourceStringValues.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable."; + ResourceStringValues.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}."; return ResourceStringValues; }()); OfficeExtension.ResourceStringValues=ResourceStringValues; @@ -11489,6 +12657,34 @@ var OfficeExtension; }; Utility.load=function (clientObj, option) { clientObj.context.load(clientObj, option); + return clientObj; + }; + Utility.loadAndSync=function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj.context.sync().then(function () { return clientObj; }); + }; + Utility.retrieve=function (clientObj, option) { + var shouldPolyfill=OfficeExtension._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + if (typeof (window) !=="undefined" && window.Office && window.Office.context && window.Office.context.requirements) { + shouldPolyfill=!window.Office.context.requirements.isSetSupported("RichApiRuntime", "1.1"); + } + } + var result=new OfficeExtension.RetrieveResult(clientObj, shouldPolyfill); + var queryOption=OfficeExtension.ClientRequestContext._parseQueryOption(option); + var action; + if (shouldPolyfill) { + action=OfficeExtension.ActionFactory.createQueryAction(clientObj.context, clientObj, queryOption); + } + else { + action=OfficeExtension.ActionFactory.createQueryAsJsonAction(clientObj.context, clientObj, queryOption); + } + clientObj.context._pendingRequest.addActionResultHandler(action, result); + return result; + }; + Utility.retrieveAndSync=function (clientObj, option) { + var result=Utility.retrieve(clientObj, option); + return clientObj.context.sync().then(function () { return result; }); }; Utility._parseSelectExpand=function (select) { var args=[]; @@ -11509,11 +12705,32 @@ var OfficeExtension; return '*'; } var itemsSlashLength=6; - if (propertyNameLower.substr(0, itemsSlashLength)==="items/") { + var isItemsSlashOrItemsDot=propertyNameLower.substr(0, itemsSlashLength)==="items/" || + propertyNameLower.substr(0, itemsSlashLength)==="items."; + if (isItemsSlashOrItemsDot) { propertyName=propertyName.substr(itemsSlashLength); } - return propertyName.replace(new RegExp("\/items\/", "gi"), "/"); + return propertyName.replace(new RegExp("[\/\.]items[\/\.]", "gi"), "/"); + } + }; + Utility.toJson=function (clientObj, scalarProperties, navigationProperties, collectionItemsIfAny) { + var result={}; + for (var prop in scalarProperties) { + var value=scalarProperties[prop]; + if (typeof value !=="undefined") { + result[prop]=value; + } } + for (var prop in navigationProperties) { + var value=navigationProperties[prop]; + if (typeof value !=="undefined") { + result[prop]=value.toJSON(); + } + } + if (collectionItemsIfAny) { + result["items"]=collectionItemsIfAny.map(function (item) { return item.toJSON(); }); + } + return result; }; Utility.throwError=function (resourceId, arg, errorLocation) { throw new OfficeExtension._Internal.RuntimeError({ @@ -11575,6 +12792,21 @@ var OfficeExtension; }); } }; + Utility.throwIfApiNotSupported=function (apiFullName, apiSetName, apiSetVersion, hostName) { + if (!Utility._doApiNotSupportedCheck) { + return; + } + if (typeof (window) !=="undefined" && window.Office && window.Office.context) { + if (!window.Office.context.requirements.isSetSupported(apiSetName, apiSetVersion)) { + var message=Utility._getResourceString(OfficeExtension.ResourceStrings.apiNotFoundDetails, [apiFullName, apiSetName+" "+apiSetVersion, hostName]); + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.apiNotFound, + message: message, + debugInfo: { errorLocation: apiFullName } + }); + } + } + }; Utility.getObjectPathExpression=function (objectPath) { var ret=""; while (objectPath) { @@ -11724,7 +12956,10 @@ var OfficeExtension; }; Utility._parseErrorResponse=function (responseInfo) { var errorObj=null; - if (!Utility.isNullOrEmptyString(responseInfo.body)) { + if (Utility.isPlainJsonObject(responseInfo.body)) { + errorObj=responseInfo.body; + } + else if (!Utility.isNullOrEmptyString(responseInfo.body)) { var errorResponseBody=Utility.trim(responseInfo.body); try { errorObj=JSON.parse(errorResponseBody); @@ -11754,8 +12989,24 @@ var OfficeExtension; } } }; + Utility._toCamelLowerCase=function (name) { + if (Utility.isNullOrEmptyString(name)) { + return name; + } + var index=0; + while (index < name.length && name.charCodeAt(index) >=65 && name.charCodeAt(index) <=90) { + index++; + } + if (index < name.length) { + return name.substr(0, index).toLowerCase()+name.substr(index); + } + else { + return name.toLowerCase(); + } + }; Utility._logEnabled=false; Utility._synchronousCleanup=false; + Utility._doApiNotSupportedCheck=false; Utility.s_underscoreCharCode="_".charCodeAt(0); return Utility; }()); @@ -11767,86 +13018,323 @@ var __extends=(this && this.__extends) || function (d, b) { function __() { this.constructor=d; } d.prototype=b===null ? Object.create(b) : (__.prototype=b.prototype, new __()); }; -var Excel; -(function (Excel) { - function lowerCaseFirst(str) { - return str[0].toLowerCase()+str.slice(1); - } - var iconSets=["ThreeArrows", - "ThreeArrowsGray", - "ThreeFlags", - "ThreeTrafficLights1", - "ThreeTrafficLights2", - "ThreeSigns", - "ThreeSymbols", - "ThreeSymbols2", - "FourArrows", - "FourArrowsGray", - "FourRedToBlack", - "FourRating", - "FourTrafficLights", - "FiveArrows", - "FiveArrowsGray", - "FiveRating", - "FiveQuarters", - "ThreeStars", - "ThreeTriangles", - "FiveBoxes"]; - var iconNames=[["RedDownArrow", "YellowSideArrow", "GreenUpArrow"], - ["GrayDownArrow", "GraySideArrow", "GrayUpArrow"], - ["RedFlag", "YellowFlag", "GreenFlag"], - ["RedCircleWithBorder", "YellowCircle", "GreenCircle"], - ["RedTrafficLight", "YellowTrafficLight", "GreenTrafficLight"], - ["RedDiamond", "YellowTriangle", "GreenCircle"], - ["RedCrossSymbol", "YellowExclamationSymbol", "GreenCheckSymbol"], - ["RedCross", "YellowExclamation", "GreenCheck"], - ["RedDownArrow", "YellowDownInclineArrow", "YellowUpInclineArrow", "GreenUpArrow"], - ["GrayDownArrow", "GrayDownInclineArrow", "GrayUpInclineArrow", "GrayUpArrow"], - ["BlackCircle", "GrayCircle", "PinkCircle", "RedCircle"], - ["OneBar", "TwoBars", "ThreeBars", "FourBars"], - ["BlackCircleWithBorder", "RedCircleWithBorder", "YellowCircle", "GreenCircle"], - ["RedDownArrow", "YellowDownInclineArrow", "YellowSideArrow", "YellowUpInclineArrow", "GreenUpArrow"], - ["GrayDownArrow", "GrayDownInclineArrow", "GraySideArrow", "GrayUpInclineArrow", "GrayUpArrow"], - ["NoBars", "OneBar", "TwoBars", "ThreeBars", "FourBars"], - ["WhiteCircleAllWhiteQuarters", "CircleWithThreeWhiteQuarters", "CircleWithTwoWhiteQuarters", "CircleWithOneWhiteQuarter", "BlackCircle"], - ["SilverStar", "HalfGoldStar", "GoldStar"], - ["RedDownTriangle", "YellowDash", "GreenUpTriangle"], - ["NoFilledBoxes", "OneFilledBox", "TwoFilledBoxes", "ThreeFilledBoxes", "FourFilledBoxes"],]; - Excel.icons={}; - iconSets.map(function (title, i) { - var camelTitle=lowerCaseFirst(title); - Excel.icons[camelTitle]=[]; - iconNames[i].map(function (iconName, j) { - iconName=lowerCaseFirst(iconName); - var obj={ set: title, index: j }; - Excel.icons[camelTitle].push(obj); - Excel.icons[camelTitle][iconName]=obj; - }); - }); - function setRangePropertiesInBulk(range, propertyName, values) { - var maxCellCount=1500; - if (Array.isArray(values) && values.length > 0 && Array.isArray(values[0]) && (values.length * values[0].length > maxCellCount) && isExcel1_3OrAbove()) { - var maxRowCount=Math.max(1, Math.round(maxCellCount / values[0].length)); - range._ValidateArraySize(values.length, values[0].length); - for (var startRowIndex=0; startRowIndex < values.length; startRowIndex+=maxRowCount) { - var rowCount=maxRowCount; - if (startRowIndex+rowCount > values.length) { - rowCount=values.length - startRowIndex; - } - var chunk=range.getRow(startRowIndex).getBoundingRect(range.getRow(startRowIndex+rowCount - 1)); - var valueSlice=values.slice(startRowIndex, startRowIndex+rowCount); - _createSetPropertyAction(chunk.context, chunk, propertyName, valueSlice); - } - return true; +var OfficeCore; +(function (OfficeCore) { + var _hostName="OfficeCore"; + var _defaultApiSetName="ExperimentApi"; + var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; + var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; + var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; + var _createNewObjectObjectPath=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath; + var _createChildItemObjectPathUsingIndexer=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer; + var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; + var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; + var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; + var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined=OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; + var _load=OfficeExtension.Utility.load; + var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; + var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; + var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var FlightingService=(function (_super) { + __extends(FlightingService, _super); + function FlightingService() { + _super.apply(this, arguments); } - return false; - } - function isExcel1_3OrAbove() { - if (typeof (window) !=="undefined" && window.Office && window.Office.context && window.Office.context.requirements) { - return window.Office.context.requirements.isSetSupported("ExcelApi", 1.3); + Object.defineProperty(FlightingService.prototype, "_className", { + get: function () { + return "FlightingService"; + }, + enumerable: true, + configurable: true + }); + FlightingService.prototype.getClientSessionId=function () { + var action=_createMethodAction(this.context, this, "GetClientSessionId", 1, []); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + FlightingService.prototype.getDeferredFlights=function () { + var action=_createMethodAction(this.context, this, "GetDeferredFlights", 1, []); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + FlightingService.prototype.getFeature=function (featureName, type, defaultValue, possibleValues) { + return new OfficeCore.ABType(this.context, _createMethodObjectPath(this.context, this, "GetFeature", 1, [featureName, type, defaultValue, possibleValues], false, false, null)); + }; + FlightingService.prototype.getFeatureGate=function (featureName, scope) { + return new OfficeCore.ABType(this.context, _createMethodObjectPath(this.context, this, "GetFeatureGate", 1, [featureName, scope], false, false, null)); + }; + FlightingService.prototype.resetOverride=function (featureName) { + _createMethodAction(this.context, this, "ResetOverride", 0, [featureName]); + }; + FlightingService.prototype.setOverride=function (featureName, type, value) { + _createMethodAction(this.context, this, "SetOverride", 0, [featureName, type, value]); + }; + FlightingService.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + FlightingService.newObject=function (context) { + var ret=new OfficeCore.FlightingService(context, _createNewObjectObjectPath(context, "Microsoft.Experiment.FlightingService", false)); + return ret; + }; + FlightingService.prototype.toJSON=function () { + return {}; + }; + return FlightingService; + }(OfficeExtension.ClientObject)); + OfficeCore.FlightingService=FlightingService; + var ABType=(function (_super) { + __extends(ABType, _super); + function ABType() { + _super.apply(this, arguments); } - else { - return true; + Object.defineProperty(ABType.prototype, "_className", { + get: function () { + return "ABType"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ABType.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this.m_value, "ABType", this._isNull); + return this.m_value; + }, + enumerable: true, + configurable: true + }); + ABType.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Value"])) { + this.m_value=obj["Value"]; + } + }; + ABType.prototype.load=function (option) { + _load(this, option); + return this; + }; + ABType.prototype.toJSON=function () { + return { + "value": this.m_value + }; + }; + return ABType; + }(OfficeExtension.ClientObject)); + OfficeCore.ABType=ABType; + var FeatureType; + (function (FeatureType) { + FeatureType.boolean="Boolean"; + FeatureType.integer="Integer"; + FeatureType.string="String"; + })(FeatureType=OfficeCore.FeatureType || (OfficeCore.FeatureType={})); + var ExperimentErrorCodes; + (function (ExperimentErrorCodes) { + ExperimentErrorCodes.generalException="GeneralException"; + })(ExperimentErrorCodes=OfficeCore.ExperimentErrorCodes || (OfficeCore.ExperimentErrorCodes={})); +})(OfficeCore || (OfficeCore={})); +var OfficeCore; +(function (OfficeCore) { + var RequestContext=(function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + _super.call(this, url); + } + Object.defineProperty(RequestContext.prototype, "flighting", { + get: function () { + return this.flightingService; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "telemetry", { + get: function () { + if (!this.m_telemetry) { + this.m_telemetry=OfficeCore.TelemetryService.newObject(this); + } + return this.m_telemetry; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "flightingService", { + get: function () { + if (!this.m_flightingService) { + this.m_flightingService=OfficeCore.FlightingService.newObject(this); + } + return this.m_flightingService; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeExtension.ClientRequestContext)); + OfficeCore.RequestContext=RequestContext; +})(OfficeCore || (OfficeCore={})); +var OfficeCore; +(function (OfficeCore) { + var _hostName="OfficeCore"; + var _defaultApiSetName="TelemetryApi"; + var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; + var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; + var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; + var _createNewObjectObjectPath=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath; + var _createChildItemObjectPathUsingIndexer=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer; + var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; + var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; + var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; + var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined=OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; + var _load=OfficeExtension.Utility.load; + var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; + var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; + var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var _typeTelemetryService="TelemetryService"; + var TelemetryService=(function (_super) { + __extends(TelemetryService, _super); + function TelemetryService() { + _super.apply(this, arguments); + } + Object.defineProperty(TelemetryService.prototype, "_className", { + get: function () { + return "TelemetryService"; + }, + enumerable: true, + configurable: true + }); + TelemetryService.prototype.sendTelemetryEvent=function (telemetryProperties, eventName, eventContract, eventFlags, value) { + _createMethodAction(this.context, this, "SendTelemetryEvent", 1, [telemetryProperties, eventName, eventContract, eventFlags, value], false); + }; + TelemetryService.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + TelemetryService.newObject=function (context) { + var ret=new OfficeCore.TelemetryService(context, _createNewObjectObjectPath(context, "Microsoft.Telemetry.TelemetryService", false, false)); + return ret; + }; + TelemetryService.prototype.toJSON=function () { + return {}; + }; + return TelemetryService; + }(OfficeExtension.ClientObject)); + OfficeCore.TelemetryService=TelemetryService; + var TelemetryErrorCodes; + (function (TelemetryErrorCodes) { + TelemetryErrorCodes.generalException="GeneralException"; + })(TelemetryErrorCodes=OfficeCore.TelemetryErrorCodes || (OfficeCore.TelemetryErrorCodes={})); +})(OfficeCore || (OfficeCore={})); + +var __extends=(this && this.__extends) || (function () { + var extendStatics=Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__=b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p]=b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor=d; } + d.prototype=b===null ? Object.create(b) : (__.prototype=b.prototype, new __()); + }; +})(); +var Excel; +(function (Excel) { + function lowerCaseFirst(str) { + return str[0].toLowerCase()+str.slice(1); + } + var iconSets=["ThreeArrows", + "ThreeArrowsGray", + "ThreeFlags", + "ThreeTrafficLights1", + "ThreeTrafficLights2", + "ThreeSigns", + "ThreeSymbols", + "ThreeSymbols2", + "FourArrows", + "FourArrowsGray", + "FourRedToBlack", + "FourRating", + "FourTrafficLights", + "FiveArrows", + "FiveArrowsGray", + "FiveRating", + "FiveQuarters", + "ThreeStars", + "ThreeTriangles", + "FiveBoxes"]; + var iconNames=[["RedDownArrow", "YellowSideArrow", "GreenUpArrow"], + ["GrayDownArrow", "GraySideArrow", "GrayUpArrow"], + ["RedFlag", "YellowFlag", "GreenFlag"], + ["RedCircleWithBorder", "YellowCircle", "GreenCircle"], + ["RedTrafficLight", "YellowTrafficLight", "GreenTrafficLight"], + ["RedDiamond", "YellowTriangle", "GreenCircle"], + ["RedCrossSymbol", "YellowExclamationSymbol", "GreenCheckSymbol"], + ["RedCross", "YellowExclamation", "GreenCheck"], + ["RedDownArrow", "YellowDownInclineArrow", "YellowUpInclineArrow", "GreenUpArrow"], + ["GrayDownArrow", "GrayDownInclineArrow", "GrayUpInclineArrow", "GrayUpArrow"], + ["BlackCircle", "GrayCircle", "PinkCircle", "RedCircle"], + ["OneBar", "TwoBars", "ThreeBars", "FourBars"], + ["BlackCircleWithBorder", "RedCircleWithBorder", "YellowCircle", "GreenCircle"], + ["RedDownArrow", "YellowDownInclineArrow", "YellowSideArrow", "YellowUpInclineArrow", "GreenUpArrow"], + ["GrayDownArrow", "GrayDownInclineArrow", "GraySideArrow", "GrayUpInclineArrow", "GrayUpArrow"], + ["NoBars", "OneBar", "TwoBars", "ThreeBars", "FourBars"], + ["WhiteCircleAllWhiteQuarters", "CircleWithThreeWhiteQuarters", "CircleWithTwoWhiteQuarters", "CircleWithOneWhiteQuarter", "BlackCircle"], + ["SilverStar", "HalfGoldStar", "GoldStar"], + ["RedDownTriangle", "YellowDash", "GreenUpTriangle"], + ["NoFilledBoxes", "OneFilledBox", "TwoFilledBoxes", "ThreeFilledBoxes", "FourFilledBoxes"],]; + Excel.icons={}; + iconSets.map(function (title, i) { + var camelTitle=lowerCaseFirst(title); + Excel.icons[camelTitle]=[]; + iconNames[i].map(function (iconName, j) { + iconName=lowerCaseFirst(iconName); + var obj={ set: title, index: j }; + Excel.icons[camelTitle].push(obj); + Excel.icons[camelTitle][iconName]=obj; + }); + }); + function setRangePropertiesInBulk(range, propertyName, values) { + var maxCellCount=1500; + if (Array.isArray(values) && values.length > 0 && Array.isArray(values[0]) && (values.length * values[0].length > maxCellCount) && isExcel1_3OrAbove()) { + var maxRowCount=Math.max(1, Math.round(maxCellCount / values[0].length)); + range._ValidateArraySize(values.length, values[0].length); + for (var startRowIndex=0; startRowIndex < values.length; startRowIndex+=maxRowCount) { + var rowCount=maxRowCount; + if (startRowIndex+rowCount > values.length) { + rowCount=values.length - startRowIndex; + } + var chunk=range.getRow(startRowIndex).getBoundingRect(range.getRow(startRowIndex+rowCount - 1)); + var valueSlice=values.slice(startRowIndex, startRowIndex+rowCount); + _createSetPropertyAction(chunk.context, chunk, propertyName, valueSlice); + } + return true; + } + return false; + } + function isExcel1_3OrAbove() { + if (typeof (window) !=="undefined" && window.Office && window.Office.context && window.Office.context.requirements) { + return window.Office.context.requirements.isSetSupported("ExcelApi", 1.3); + } + else { + return true; } } var Session=(function () { @@ -11943,18 +13431,27 @@ var Excel; return _this.m_requestUrlAndHeaderInfo; }); }; - Session.WorkbookSessionIdHeaderName="Workbook-Session-Id"; - Session.WorkbookSessionIdHeaderNameLower="workbook-session-id"; return Session; }()); + Session.WorkbookSessionIdHeaderName="Workbook-Session-Id"; + Session.WorkbookSessionIdHeaderNameLower="workbook-session-id"; Excel.Session=Session; var RequestContext=(function (_super) { __extends(RequestContext, _super); function RequestContext(url) { - _super.call(this, url); - this.m_workbook=new Workbook(this, OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(this)); - this._rootObject=this.m_workbook; + var _this=_super.call(this, url) || this; + _this.m_workbook=new Workbook(_this, OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(_this)); + _this._rootObject=_this.m_workbook; + _this._rootObjectPropertyName="workbook"; + return _this; } + RequestContext.prototype._processOfficeJsErrorResponse=function (officeJsErrorCode, response) { + var ooeInvalidApiCallInContext=5004; + if (officeJsErrorCode==ooeInvalidApiCallInContext) { + response.ErrorCode=ErrorCodes.invalidOperationInCellEditMode; + response.ErrorMessage=OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidOperationInCellEditMode); + } + }; Object.defineProperty(RequestContext.prototype, "workbook", { get: function () { return this.m_workbook; @@ -11970,7 +13467,7 @@ var Excel; configurable: true }); return RequestContext; - }(OfficeExtension.ClientRequestContext)); + }(OfficeCore.RequestContext)); Excel.RequestContext=RequestContext; function run(arg1, arg2, arg3) { return OfficeExtension.ClientRequestContext._runBatch("Excel.run", arguments, function (requestInfo) { @@ -11979,6 +13476,13 @@ var Excel; }); } Excel.run=run; + function runBatch(arg1, arg2) { + return OfficeExtension.ClientRequestContext._runExplicitBatch("Excel.runBatch", arguments, function (requestInfo) { + var ret=new Excel.RequestContext(requestInfo); + return ret; + }); + } + Excel.runBatch=runBatch; Excel._RedirectV1APIs=false; Excel._V1APIMap={ "GetDataAsync": { @@ -12084,7 +13588,7 @@ var Excel; call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingClearFormats(callArgs); } }, "GetFilePropertiesAsync": { - call: function (ctx, callArgs) { return ctx.workbook._V1Api.getFilePropertiesAsync(callArgs); } + call: function (ctx) { return ctx.workbook._V1Api.getFilePropertiesAsync(); } }, }; function postprocessBindingDescriptor(response) { @@ -12109,6 +13613,40 @@ var Excel; data=window.OSF.DDA.DataCoercion.coerceData(data, callArgs[window.Microsoft.Office.WebExtension.Parameters.CoercionType]); return data==undefined ? null : data; } + function versionNumberIsEarlierThan(desiredMajor, desiredMinor, desiredBuild) { + var hasOfficeVersion=typeof (window) !=="undefined" && + window.Office && + window.Office.context && + window.Office.context.diagnostics && + window.Office.context.diagnostics.version; + if (!hasOfficeVersion) { + return false; + } + var version=window.Office.context.diagnostics.version; + var versionExtractor=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/; + var result=versionExtractor.exec(version); + if (result) { + var major=parseInt(result[1]); + var minor=parseInt(result[2]); + var build=parseInt(result[3]); + var revision=parseInt(result[4]); + var devBuild=3000; + if (major < desiredMajor) { + return true; + } + if (major==desiredMajor && minor < desiredMinor) { + return true; + } + if (major==desiredMajor && minor==desiredMinor && build < desiredBuild) { + if (revision < devBuild) { + return true; + } + } + } + return false; + } + var _hostName="Excel"; + var _defaultApiSetName="ExcelApi"; var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; @@ -12117,19 +13655,25 @@ var Excel; var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createEnsureUnchangedAction=OfficeExtension.ActionFactory.createEnsureUnchangedAction; var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; var _isUndefined=OfficeExtension.Utility.isUndefined; var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; var _load=OfficeExtension.Utility.load; + var _retrieve=OfficeExtension.Utility.retrieve; + var _toJson=OfficeExtension.Utility.toJson; var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult=OfficeExtension.Utility.processRetrieveResult; + var _typeApplication="Application"; var Application=(function (_super) { __extends(Application, _super); function Application() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Application.prototype, "_className", { get: function () { @@ -12138,19 +13682,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Application.prototype, "_scalarPropertyNames", { + get: function () { + return ["calculationMode"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(Application.prototype, "calculationMode", { get: function () { - _throwIfNotLoaded("calculationMode", this.m_calculationMode, "Application", this._isNull); - return this.m_calculationMode; + _throwIfNotLoaded("calculationMode", this._C, _typeApplication, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Application.prototype.calculate=function (calculationType) { - _createMethodAction(this.context, this, "Calculate", 0, [calculationType]); + _createMethodAction(this.context, this, "Calculate", 0, [calculationType], false); }; Application.prototype.suspendApiCalculationUntilNextSync=function () { - _createMethodAction(this.context, this, "SuspendApiCalculationUntilNextSync", 0, []); + _throwIfApiNotSupported("Application.suspendApiCalculationUntilNextSync", _defaultApiSetName, "1.6", _hostName); + _createMethodAction(this.context, this, "SuspendApiCalculationUntilNextSync", 0, [], false); }; Application.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12159,25 +13711,36 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["CalculationMode"])) { - this.m_calculationMode=obj["CalculationMode"]; + this._C=obj["CalculationMode"]; } }; Application.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Application.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Application.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; Application.prototype.toJSON=function () { - return { - "calculationMode": this.m_calculationMode - }; + return _toJson(this, { + "calculationMode": this._C, + }, {}); + }; + Application.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Application; }(OfficeExtension.ClientObject)); Excel.Application=Application; + var _typeWorkbook="Workbook"; var Workbook=(function (_super) { __extends(Workbook, _super); function Workbook() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Workbook.prototype, "_className", { get: function () { @@ -12186,132 +13749,155 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Workbook.prototype, "_navigationPropertyNames", { + get: function () { + return ["worksheets", "names", "tables", "application", "bindings", "functions", "_V1Api", "pivotTables", "settings", "customXmlParts", "internalTest"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(Workbook.prototype, "application", { get: function () { - if (!this.m_application) { - this.m_application=new Excel.Application(this.context, _createPropertyObjectPath(this.context, this, "Application", false, false)); + if (!this._A) { + this._A=new Excel.Application(this.context, _createPropertyObjectPath(this.context, this, "Application", false, false, false)); } - return this.m_application; + return this._A; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "bindings", { get: function () { - if (!this.m_bindings) { - this.m_bindings=new Excel.BindingCollection(this.context, _createPropertyObjectPath(this.context, this, "Bindings", true, false)); + if (!this._B) { + this._B=new Excel.BindingCollection(this.context, _createPropertyObjectPath(this.context, this, "Bindings", true, false, false)); } - return this.m_bindings; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "customXmlParts", { get: function () { - if (!this.m_customXmlParts) { - this.m_customXmlParts=new Excel.CustomXmlPartCollection(this.context, _createPropertyObjectPath(this.context, this, "CustomXmlParts", true, false)); + _throwIfApiNotSupported("Workbook.customXmlParts", _defaultApiSetName, "1.5", _hostName); + if (!this._C) { + this._C=new Excel.CustomXmlPartCollection(this.context, _createPropertyObjectPath(this.context, this, "CustomXmlParts", true, false, false)); } - return this.m_customXmlParts; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "functions", { get: function () { - if (!this.m_functions) { - this.m_functions=new Excel.Functions(this.context, _createPropertyObjectPath(this.context, this, "Functions", false, false)); + _throwIfApiNotSupported("Workbook.functions", _defaultApiSetName, "1.2", _hostName); + if (!this._F) { + this._F=new Excel.Functions(this.context, _createPropertyObjectPath(this.context, this, "Functions", false, false, false)); + } + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Workbook.prototype, "internalTest", { + get: function () { + _throwIfApiNotSupported("Workbook.internalTest", _defaultApiSetName, "1.6", _hostName); + if (!this._I) { + this._I=new Excel.InternalTest(this.context, _createPropertyObjectPath(this.context, this, "InternalTest", false, false, false)); } - return this.m_functions; + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "names", { get: function () { - if (!this.m_names) { - this.m_names=new Excel.NamedItemCollection(this.context, _createPropertyObjectPath(this.context, this, "Names", true, false)); + if (!this._N) { + this._N=new Excel.NamedItemCollection(this.context, _createPropertyObjectPath(this.context, this, "Names", true, false, false)); } - return this.m_names; + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "pivotTables", { get: function () { - if (!this.m_pivotTables) { - this.m_pivotTables=new Excel.PivotTableCollection(this.context, _createPropertyObjectPath(this.context, this, "PivotTables", true, false)); + _throwIfApiNotSupported("Workbook.pivotTables", _defaultApiSetName, "1.3", _hostName); + if (!this._P) { + this._P=new Excel.PivotTableCollection(this.context, _createPropertyObjectPath(this.context, this, "PivotTables", true, false, false)); } - return this.m_pivotTables; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "settings", { get: function () { - if (!this.m_settings) { - this.m_settings=new Excel.SettingCollection(this.context, _createPropertyObjectPath(this.context, this, "Settings", true, false)); + _throwIfApiNotSupported("Workbook.settings", _defaultApiSetName, "1.4", _hostName); + if (!this._S) { + this._S=new Excel.SettingCollection(this.context, _createPropertyObjectPath(this.context, this, "Settings", true, false, false)); } - return this.m_settings; + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "tables", { get: function () { - if (!this.m_tables) { - this.m_tables=new Excel.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false)); + if (!this._T) { + this._T=new Excel.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false, false)); } - return this.m_tables; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "worksheets", { get: function () { - if (!this.m_worksheets) { - this.m_worksheets=new Excel.WorksheetCollection(this.context, _createPropertyObjectPath(this.context, this, "Worksheets", true, false)); + if (!this._W) { + this._W=new Excel.WorksheetCollection(this.context, _createPropertyObjectPath(this.context, this, "Worksheets", true, false, false)); } - return this.m_worksheets; + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "_V1Api", { get: function () { - if (!this.m__V1Api) { - this.m__V1Api=new Excel._V1Api(this.context, _createPropertyObjectPath(this.context, this, "_V1Api", false, false)); + _throwIfApiNotSupported("Workbook._V1Api", _defaultApiSetName, "1.3", _hostName); + if (!this.__V) { + this.__V=new Excel._V1Api(this.context, _createPropertyObjectPath(this.context, this, "_V1Api", false, false, false)); } - return this.m__V1Api; + return this.__V; }, enumerable: true, configurable: true }); Workbook.prototype.getSelectedRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetSelectedRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetSelectedRange", 1, [], false, true, null, false)); }; Workbook.prototype._GetObjectByReferenceId=function (bstrReferenceId) { - var action=_createMethodAction(this.context, this, "_GetObjectByReferenceId", 1, [bstrReferenceId]); + var action=_createMethodAction(this.context, this, "_GetObjectByReferenceId", 1, [bstrReferenceId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Workbook.prototype._GetObjectTypeNameByReferenceId=function (bstrReferenceId) { - var action=_createMethodAction(this.context, this, "_GetObjectTypeNameByReferenceId", 1, [bstrReferenceId]); + var action=_createMethodAction(this.context, this, "_GetObjectTypeNameByReferenceId", 1, [bstrReferenceId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Workbook.prototype._GetReferenceCount=function () { - var action=_createMethodAction(this.context, this, "_GetReferenceCount", 1, []); + var action=_createMethodAction(this.context, this, "_GetReferenceCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Workbook.prototype._RemoveAllReferences=function () { - _createMethodAction(this.context, this, "_RemoveAllReferences", 1, []); + _createMethodAction(this.context, this, "_RemoveAllReferences", 1, [], false); }; Workbook.prototype._RemoveReference=function (bstrReferenceId) { - _createMethodAction(this.context, this, "_RemoveReference", 1, [bstrReferenceId]); + _createMethodAction(this.context, this, "_RemoveReference", 1, [bstrReferenceId], false); }; Workbook.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12319,15 +13905,22 @@ var Excel; return; var obj=value; _fixObjectPathIfNecessary(this, obj); - _handleNavigationPropertyResults(this, obj, ["application", "Application", "bindings", "Bindings", "customXmlParts", "CustomXmlParts", "functions", "Functions", "names", "Names", "pivotTables", "PivotTables", "settings", "Settings", "tables", "Tables", "worksheets", "Worksheets", "_V1Api", "_V1Api"]); + _handleNavigationPropertyResults(this, obj, ["application", "Application", "bindings", "Bindings", "customXmlParts", "CustomXmlParts", "functions", "Functions", "internalTest", "InternalTest", "names", "Names", "pivotTables", "PivotTables", "settings", "Settings", "tables", "Tables", "worksheets", "Worksheets", "_V1Api", "_V1Api"]); }; Workbook.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Workbook.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Workbook.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; Object.defineProperty(Workbook.prototype, "onSelectionChanged", { get: function () { var _this=this; + _throwIfApiNotSupported("Workbook.onSelectionChanged", _defaultApiSetName, "1.3", _hostName); if (!this.m_selectionChanged) { this.m_selectionChanged=new OfficeExtension.EventHandlers(this.context, this, "SelectionChanged", { registerFunc: function (handlerCallback) { @@ -12347,15 +13940,28 @@ var Excel; configurable: true }); Workbook.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, { + "bindings": this._B, + "customXmlParts": this._C, + "names": this._N, + "pivotTables": this._P, + "settings": this._S, + "tables": this._T, + "worksheets": this._W, + }); + }; + Workbook.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Workbook; }(OfficeExtension.ClientObject)); Excel.Workbook=Workbook; + var _typeWorksheet="Worksheet"; var Worksheet=(function (_super) { __extends(Worksheet, _super); function Worksheet() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Worksheet.prototype, "_className", { get: function () { @@ -12364,42 +13970,66 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Worksheet.prototype, "_scalarPropertyNames", { + get: function () { + return ["name", "id", "position", "visibility"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Worksheet.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, false, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Worksheet.prototype, "_navigationPropertyNames", { + get: function () { + return ["charts", "tables", "protection", "pivotTables", "names"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(Worksheet.prototype, "charts", { get: function () { - if (!this.m_charts) { - this.m_charts=new Excel.ChartCollection(this.context, _createPropertyObjectPath(this.context, this, "Charts", true, false)); + if (!this._C) { + this._C=new Excel.ChartCollection(this.context, _createPropertyObjectPath(this.context, this, "Charts", true, false, false)); } - return this.m_charts; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Worksheet.prototype, "names", { get: function () { - if (!this.m_names) { - this.m_names=new Excel.NamedItemCollection(this.context, _createPropertyObjectPath(this.context, this, "Names", true, false)); + _throwIfApiNotSupported("Worksheet.names", _defaultApiSetName, "1.4", _hostName); + if (!this._Na) { + this._Na=new Excel.NamedItemCollection(this.context, _createPropertyObjectPath(this.context, this, "Names", true, false, false)); } - return this.m_names; + return this._Na; }, enumerable: true, configurable: true }); Object.defineProperty(Worksheet.prototype, "pivotTables", { get: function () { - if (!this.m_pivotTables) { - this.m_pivotTables=new Excel.PivotTableCollection(this.context, _createPropertyObjectPath(this.context, this, "PivotTables", true, false)); + _throwIfApiNotSupported("Worksheet.pivotTables", _defaultApiSetName, "1.3", _hostName); + if (!this._P) { + this._P=new Excel.PivotTableCollection(this.context, _createPropertyObjectPath(this.context, this, "PivotTables", true, false, false)); } - return this.m_pivotTables; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Worksheet.prototype, "protection", { get: function () { - if (!this.m_protection) { - this.m_protection=new Excel.WorksheetProtection(this.context, _createPropertyObjectPath(this.context, this, "Protection", false, false)); + _throwIfApiNotSupported("Worksheet.protection", _defaultApiSetName, "1.2", _hostName); + if (!this._Pr) { + this._Pr=new Excel.WorksheetProtection(this.context, _createPropertyObjectPath(this.context, this, "Protection", false, false, false)); } - return this.m_protection; + return this._Pr; }, enumerable: true, configurable: true @@ -12407,8 +14037,9 @@ var Excel; Object.defineProperty(Worksheet.prototype, "tables", { get: function () { if (!this.m_tables) { - this.m_tables=new Excel.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false)); + this.m_tables=new Excel.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false, false)); } + this.m_tables._ParentObject=this; return this.m_tables; }, enumerable: true, @@ -12416,19 +14047,19 @@ var Excel; }); Object.defineProperty(Worksheet.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Worksheet", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeWorksheet, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Worksheet.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "Worksheet", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeWorksheet, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -12436,11 +14067,11 @@ var Excel; }); Object.defineProperty(Worksheet.prototype, "position", { get: function () { - _throwIfNotLoaded("position", this.m_position, "Worksheet", this._isNull); - return this.m_position; + _throwIfNotLoaded("position", this._Po, _typeWorksheet, this._isNull); + return this._Po; }, set: function (value) { - this.m_position=value; + this._Po=value; _createSetPropertyAction(this.context, this, "Position", value); }, enumerable: true, @@ -12448,11 +14079,11 @@ var Excel; }); Object.defineProperty(Worksheet.prototype, "visibility", { get: function () { - _throwIfNotLoaded("visibility", this.m_visibility, "Worksheet", this._isNull); - return this.m_visibility; + _throwIfNotLoaded("visibility", this._V, _typeWorksheet, this._isNull); + return this._V; }, set: function (value) { - this.m_visibility=value; + this._V=value; _createSetPropertyAction(this.context, this, "Visibility", value); }, enumerable: true, @@ -12460,10 +14091,6 @@ var Excel; }); Worksheet.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["name", "position", "visibility"], [], [ - "charts", - "names", - "pivotTables", - "tables", "charts", "names", "pivotTables", @@ -12471,38 +14098,47 @@ var Excel; "tables" ]); }; + Worksheet.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; Worksheet.prototype.activate=function () { - _createMethodAction(this.context, this, "Activate", 1, []); + _createMethodAction(this.context, this, "Activate", 1, [], false); }; Worksheet.prototype.calculate=function (markAllDirty) { - _createMethodAction(this.context, this, "Calculate", 0, [markAllDirty]); + _throwIfApiNotSupported("Worksheet.calculate", _defaultApiSetName, "1.6", _hostName); + _createMethodAction(this.context, this, "Calculate", 0, [markAllDirty], false); }; Worksheet.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Worksheet.prototype.getCell=function (row, column) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [row, column], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [row, column], false, true, null, false)); }; Worksheet.prototype.getNext=function (visibleOnly) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [visibleOnly], false, true, null)); + _throwIfApiNotSupported("Worksheet.getNext", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [visibleOnly], false, true, "_GetSheetById", false)); }; Worksheet.prototype.getNextOrNullObject=function (visibleOnly) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [visibleOnly], false, true, null)); + _throwIfApiNotSupported("Worksheet.getNextOrNullObject", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [visibleOnly], false, true, "_GetSheetById", false)); }; Worksheet.prototype.getPrevious=function (visibleOnly) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetPrevious", 1, [visibleOnly], false, true, null)); + _throwIfApiNotSupported("Worksheet.getPrevious", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetPrevious", 1, [visibleOnly], false, true, "_GetSheetById", false)); }; Worksheet.prototype.getPreviousOrNullObject=function (visibleOnly) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetPreviousOrNullObject", 1, [visibleOnly], false, true, null)); + _throwIfApiNotSupported("Worksheet.getPreviousOrNullObject", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetPreviousOrNullObject", 1, [visibleOnly], false, true, "_GetSheetById", false)); }; Worksheet.prototype.getRange=function (address) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [address], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [address], false, true, null, false)); }; Worksheet.prototype.getUsedRange=function (valuesOnly) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRange", 1, [valuesOnly], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRange", 1, [valuesOnly], false, true, null, false)); }; Worksheet.prototype.getUsedRangeOrNullObject=function (valuesOnly) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRangeOrNullObject", 1, [valuesOnly], false, true, null)); + _throwIfApiNotSupported("Worksheet.getUsedRangeOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRangeOrNullObject", 1, [valuesOnly], false, true, null, false)); }; Worksheet.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12511,22 +14147,24 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Position"])) { - this.m_position=obj["Position"]; + this._Po=obj["Position"]; } if (!_isUndefined(obj["Visibility"])) { - this.m_visibility=obj["Visibility"]; + this._V=obj["Visibility"]; } _handleNavigationPropertyResults(this, obj, ["charts", "Charts", "names", "Names", "pivotTables", "PivotTables", "protection", "Protection", "tables", "Tables"]); }; Worksheet.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Worksheet.prototype.retrieve=function (option) { + return _retrieve(this, option); }; Worksheet.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -12534,25 +14172,39 @@ var Excel; return; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; + Worksheet.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; Worksheet.prototype.toJSON=function () { - return { - "id": this.m_id, - "name": this.m_name, - "position": this.m_position, - "protection": this.m_protection, - "visibility": this.m_visibility - }; + return _toJson(this, { + "id": this._I, + "name": this._N, + "position": this._Po, + "visibility": this._V, + }, { + "charts": this._C, + "names": this._Na, + "pivotTables": this._P, + "protection": this._Pr, + "tables": this.m_tables, + }); + }; + Worksheet.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Worksheet; }(OfficeExtension.ClientObject)); Excel.Worksheet=Worksheet; + var _typeWorksheetCollection="WorksheetCollection"; var WorksheetCollection=(function (_super) { __extends(WorksheetCollection, _super); function WorksheetCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(WorksheetCollection.prototype, "_className", { get: function () { @@ -12561,37 +14213,48 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(WorksheetCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(WorksheetCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "WorksheetCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeWorksheetCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); WorksheetCollection.prototype.add=function (name) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [name], false, true, null)); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [name], false, true, null, false)); }; WorksheetCollection.prototype.getActiveWorksheet=function () { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetActiveWorksheet", 1, [], false, false, null)); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetActiveWorksheet", 1, [], false, false, null, false)); }; WorksheetCollection.prototype.getCount=function (visibleOnly) { - var action=_createMethodAction(this.context, this, "GetCount", 1, [visibleOnly]); + _throwIfApiNotSupported("WorksheetCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [visibleOnly], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; WorksheetCollection.prototype.getFirst=function (visibleOnly) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [visibleOnly], false, true, null)); + _throwIfApiNotSupported("WorksheetCollection.getFirst", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [visibleOnly], false, true, null, false)); }; WorksheetCollection.prototype.getItem=function (key) { return new Excel.Worksheet(this.context, _createIndexerObjectPath(this.context, this, [key])); }; WorksheetCollection.prototype.getItemOrNullObject=function (key) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null)); + _throwIfApiNotSupported("WorksheetCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null, false)); }; WorksheetCollection.prototype.getLast=function (visibleOnly) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetLast", 1, [visibleOnly], false, true, null)); + _throwIfApiNotSupported("WorksheetCollection.getLast", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetLast", 1, [visibleOnly], false, true, null, false)); }; WorksheetCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12610,19 +14273,27 @@ var Excel; } }; WorksheetCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + WorksheetCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + WorksheetCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.Worksheet(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; WorksheetCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return WorksheetCollection; }(OfficeExtension.ClientObject)); Excel.WorksheetCollection=WorksheetCollection; + var _typeWorksheetProtection="WorksheetProtection"; var WorksheetProtection=(function (_super) { __extends(WorksheetProtection, _super); function WorksheetProtection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(WorksheetProtection.prototype, "_className", { get: function () { @@ -12631,27 +14302,38 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(WorksheetProtection.prototype, "_scalarPropertyNames", { + get: function () { + return ["protected", "options"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(WorksheetProtection.prototype, "options", { get: function () { - _throwIfNotLoaded("options", this.m_options, "WorksheetProtection", this._isNull); - return this.m_options; + _throwIfNotLoaded("options", this._O, _typeWorksheetProtection, this._isNull); + return this._O; }, enumerable: true, configurable: true }); Object.defineProperty(WorksheetProtection.prototype, "protected", { get: function () { - _throwIfNotLoaded("protected", this.m_protected, "WorksheetProtection", this._isNull); - return this.m_protected; + _throwIfNotLoaded("protected", this._P, _typeWorksheetProtection, this._isNull); + return this._P; }, enumerable: true, configurable: true }); - WorksheetProtection.prototype.protect=function (options) { - _createMethodAction(this.context, this, "Protect", 0, [options]); + WorksheetProtection.prototype.protect=function (options, password) { + if (versionNumberIsEarlierThan(16, 0, 8716)) { + _createMethodAction(this.context, this, "Protect", 0, [options], false); + return; + } + _createMethodAction(this.context, this, "Protect", 0, [options, password], false); }; - WorksheetProtection.prototype.unprotect=function () { - _createMethodAction(this.context, this, "Unprotect", 0, []); + WorksheetProtection.prototype.unprotect=function (password) { + _createMethodAction(this.context, this, "Unprotect", 0, [password], false); }; WorksheetProtection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12660,29 +14342,40 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Options"])) { - this.m_options=obj["Options"]; + this._O=obj["Options"]; } if (!_isUndefined(obj["Protected"])) { - this.m_protected=obj["Protected"]; + this._P=obj["Protected"]; } }; WorksheetProtection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + WorksheetProtection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + WorksheetProtection.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; WorksheetProtection.prototype.toJSON=function () { - return { - "options": this.m_options, - "protected": this.m_protected - }; + return _toJson(this, { + "options": this._O, + "protected": this._P, + }, {}); + }; + WorksheetProtection.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return WorksheetProtection; }(OfficeExtension.ClientObject)); Excel.WorksheetProtection=WorksheetProtection; + var _typeRange="Range"; var Range=(function (_super) { __extends(Range, _super); function Range() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Range.prototype, "_className", { get: function () { @@ -12691,9 +14384,30 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Range.prototype, "_scalarPropertyNames", { + get: function () { + return ["numberFormat", "values", "text", "formulas", "formulasLocal", "rowIndex", "columnIndex", "rowCount", "columnCount", "address", "addressLocal", "cellCount", "_ReferenceId", "valueTypes", "formulasR1C1", "hidden", "rowHidden", "columnHidden"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, false, true, true, false, false, false, false, false, false, false, false, false, true, false, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "_navigationPropertyNames", { + get: function () { + return ["format", "worksheet", "sort", "conditionalFormats"]; + }, + enumerable: true, + configurable: true + }); Range.prototype._ensureInteger=function (num, methodName) { if (!(typeof num==="number" && isFinite(num) && Math.floor(num)===num)) { - throw new OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, num, methodName); + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, num, methodName); } }; Range.prototype._getAdjacentRange=function (functionName, count, referenceRange, rowDirection, columnDirection) { @@ -12719,83 +14433,86 @@ var Excel; }; Object.defineProperty(Range.prototype, "conditionalFormats", { get: function () { - if (!this.m_conditionalFormats) { - this.m_conditionalFormats=new Excel.ConditionalFormatCollection(this.context, _createPropertyObjectPath(this.context, this, "ConditionalFormats", true, false)); + _throwIfApiNotSupported("Range.conditionalFormats", _defaultApiSetName, "1.6", _hostName); + if (!this._Con) { + this._Con=new Excel.ConditionalFormatCollection(this.context, _createPropertyObjectPath(this.context, this, "ConditionalFormats", true, false, false)); } - return this.m_conditionalFormats; + return this._Con; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.RangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.RangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "sort", { get: function () { - if (!this.m_sort) { - this.m_sort=new Excel.RangeSort(this.context, _createPropertyObjectPath(this.context, this, "Sort", false, false)); + _throwIfApiNotSupported("Range.sort", _defaultApiSetName, "1.2", _hostName); + if (!this._S) { + this._S=new Excel.RangeSort(this.context, _createPropertyObjectPath(this.context, this, "Sort", false, false, false)); } - return this.m_sort; + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "worksheet", { get: function () { - if (!this.m_worksheet) { - this.m_worksheet=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false)); + if (!this._W) { + this._W=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false, false)); } - return this.m_worksheet; + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "address", { get: function () { - _throwIfNotLoaded("address", this.m_address, "Range", this._isNull); - return this.m_address; + _throwIfNotLoaded("address", this._A, _typeRange, this._isNull); + return this._A; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "addressLocal", { get: function () { - _throwIfNotLoaded("addressLocal", this.m_addressLocal, "Range", this._isNull); - return this.m_addressLocal; + _throwIfNotLoaded("addressLocal", this._Ad, _typeRange, this._isNull); + return this._Ad; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "cellCount", { get: function () { - _throwIfNotLoaded("cellCount", this.m_cellCount, "Range", this._isNull); - return this.m_cellCount; + _throwIfNotLoaded("cellCount", this._C, _typeRange, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "columnCount", { get: function () { - _throwIfNotLoaded("columnCount", this.m_columnCount, "Range", this._isNull); - return this.m_columnCount; + _throwIfNotLoaded("columnCount", this._Co, _typeRange, this._isNull); + return this._Co; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "columnHidden", { get: function () { - _throwIfNotLoaded("columnHidden", this.m_columnHidden, "Range", this._isNull); - return this.m_columnHidden; + _throwIfNotLoaded("columnHidden", this._Col, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.columnHidden", _defaultApiSetName, "1.2", _hostName); + return this._Col; }, set: function (value) { - this.m_columnHidden=value; + this._Col=value; _createSetPropertyAction(this.context, this, "ColumnHidden", value); }, enumerable: true, @@ -12803,15 +14520,15 @@ var Excel; }); Object.defineProperty(Range.prototype, "columnIndex", { get: function () { - _throwIfNotLoaded("columnIndex", this.m_columnIndex, "Range", this._isNull); - return this.m_columnIndex; + _throwIfNotLoaded("columnIndex", this._Colu, _typeRange, this._isNull); + return this._Colu; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "formulas", { get: function () { - _throwIfNotLoaded("formulas", this.m_formulas, "Range", this._isNull); + _throwIfNotLoaded("formulas", this.m_formulas, _typeRange, this._isNull); return this.m_formulas; }, set: function (value) { @@ -12827,7 +14544,7 @@ var Excel; }); Object.defineProperty(Range.prototype, "formulasLocal", { get: function () { - _throwIfNotLoaded("formulasLocal", this.m_formulasLocal, "Range", this._isNull); + _throwIfNotLoaded("formulasLocal", this.m_formulasLocal, _typeRange, this._isNull); return this.m_formulasLocal; }, set: function (value) { @@ -12843,7 +14560,8 @@ var Excel; }); Object.defineProperty(Range.prototype, "formulasR1C1", { get: function () { - _throwIfNotLoaded("formulasR1C1", this.m_formulasR1C1, "Range", this._isNull); + _throwIfNotLoaded("formulasR1C1", this.m_formulasR1C1, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.formulasR1C1", _defaultApiSetName, "1.2", _hostName); return this.m_formulasR1C1; }, set: function (value) { @@ -12859,15 +14577,16 @@ var Excel; }); Object.defineProperty(Range.prototype, "hidden", { get: function () { - _throwIfNotLoaded("hidden", this.m_hidden, "Range", this._isNull); - return this.m_hidden; + _throwIfNotLoaded("hidden", this._H, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.hidden", _defaultApiSetName, "1.2", _hostName); + return this._H; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "numberFormat", { get: function () { - _throwIfNotLoaded("numberFormat", this.m_numberFormat, "Range", this._isNull); + _throwIfNotLoaded("numberFormat", this.m_numberFormat, _typeRange, this._isNull); return this.m_numberFormat; }, set: function (value) { @@ -12883,19 +14602,20 @@ var Excel; }); Object.defineProperty(Range.prototype, "rowCount", { get: function () { - _throwIfNotLoaded("rowCount", this.m_rowCount, "Range", this._isNull); - return this.m_rowCount; + _throwIfNotLoaded("rowCount", this._R, _typeRange, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "rowHidden", { get: function () { - _throwIfNotLoaded("rowHidden", this.m_rowHidden, "Range", this._isNull); - return this.m_rowHidden; + _throwIfNotLoaded("rowHidden", this._Ro, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.rowHidden", _defaultApiSetName, "1.2", _hostName); + return this._Ro; }, set: function (value) { - this.m_rowHidden=value; + this._Ro=value; _createSetPropertyAction(this.context, this, "RowHidden", value); }, enumerable: true, @@ -12903,31 +14623,31 @@ var Excel; }); Object.defineProperty(Range.prototype, "rowIndex", { get: function () { - _throwIfNotLoaded("rowIndex", this.m_rowIndex, "Range", this._isNull); - return this.m_rowIndex; + _throwIfNotLoaded("rowIndex", this._Row, _typeRange, this._isNull); + return this._Row; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "Range", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._T, _typeRange, this._isNull); + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "valueTypes", { get: function () { - _throwIfNotLoaded("valueTypes", this.m_valueTypes, "Range", this._isNull); - return this.m_valueTypes; + _throwIfNotLoaded("valueTypes", this._V, _typeRange, this._isNull); + return this._V; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "values", { get: function () { - _throwIfNotLoaded("values", this.m_values, "Range", this._isNull); + _throwIfNotLoaded("values", this.m_values, _typeRange, this._isNull); return this.m_values; }, set: function (value) { @@ -12943,39 +14663,40 @@ var Excel; }); Object.defineProperty(Range.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Range", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeRange, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Range.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["numberFormat", "values", "formulas", "formulasLocal", "formulasR1C1", "rowHidden", "columnHidden"], ["format"], [ - "conditionalFormats", - "sort", - "worksheet", "conditionalFormats", "sort", "worksheet" ]); }; + Range.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; Range.prototype.calculate=function () { - _createMethodAction(this.context, this, "Calculate", 0, []); + _throwIfApiNotSupported("Range.calculate", _defaultApiSetName, "1.6", _hostName); + _createMethodAction(this.context, this, "Calculate", 0, [], false); }; Range.prototype.clear=function (applyTo) { - _createMethodAction(this.context, this, "Clear", 0, [applyTo]); + _createMethodAction(this.context, this, "Clear", 0, [applyTo], false); }; Range.prototype.delete=function (shift) { - _createMethodAction(this.context, this, "Delete", 0, [shift]); + _createMethodAction(this.context, this, "Delete", 0, [shift], false); }; Range.prototype.getBoundingRect=function (anotherRange) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetBoundingRect", 1, [anotherRange], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetBoundingRect", 1, [anotherRange], false, true, null, false)); }; Range.prototype.getCell=function (row, column) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [row, column], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [row, column], false, true, null, false)); }; Range.prototype.getColumn=function (column) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumn", 1, [column], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumn", 1, [column], false, true, null, false)); }; Range.prototype.getColumnsAfter=function (count) { if (!isExcel1_3OrAbove()) { @@ -12984,11 +14705,12 @@ var Excel; } this._ensureInteger(count, "RowsAbove"); if (count==0) { - throw new OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); } return this._getAdjacentRange("getColumnsAfter", count, this.getLastColumn(), 0, 1); } - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumnsAfter", 1, [count], false, true, null)); + _throwIfApiNotSupported("Range.getColumnsAfter", _defaultApiSetName, "1.3", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumnsAfter", 1, [count], false, true, null, false)); }; Range.prototype.getColumnsBefore=function (count) { if (!isExcel1_3OrAbove()) { @@ -12997,35 +14719,37 @@ var Excel; } this._ensureInteger(count, "RowsAbove"); if (count==0) { - throw new OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); } return this._getAdjacentRange("getColumnsBefore", count, this.getColumn(0), 0, -1); } - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumnsBefore", 1, [count], false, true, null)); + _throwIfApiNotSupported("Range.getColumnsBefore", _defaultApiSetName, "1.3", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumnsBefore", 1, [count], false, true, null, false)); }; Range.prototype.getEntireColumn=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetEntireColumn", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetEntireColumn", 1, [], false, true, null, false)); }; Range.prototype.getEntireRow=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetEntireRow", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetEntireRow", 1, [], false, true, null, false)); }; Range.prototype.getIntersection=function (anotherRange) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetIntersection", 1, [anotherRange], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetIntersection", 1, [anotherRange], false, true, null, false)); }; Range.prototype.getIntersectionOrNullObject=function (anotherRange) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetIntersectionOrNullObject", 1, [anotherRange], false, true, null)); + _throwIfApiNotSupported("Range.getIntersectionOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetIntersectionOrNullObject", 1, [anotherRange], false, true, null, false)); }; Range.prototype.getLastCell=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastCell", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastCell", 1, [], false, true, null, false)); }; Range.prototype.getLastColumn=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastColumn", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastColumn", 1, [], false, true, null, false)); }; Range.prototype.getLastRow=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastRow", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastRow", 1, [], false, true, null, false)); }; Range.prototype.getOffsetRange=function (rowOffset, columnOffset) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetOffsetRange", 1, [rowOffset, columnOffset], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetOffsetRange", 1, [rowOffset, columnOffset], false, true, null, false)); }; Range.prototype.getResizedRange=function (deltaRows, deltaColumns) { if (!isExcel1_3OrAbove()) { @@ -13034,10 +14758,11 @@ var Excel; var referenceRange=(deltaRows >=0 && deltaColumns >=0) ? this : this.getCell(0, 0); return referenceRange.getBoundingRect(this.getLastCell().getOffsetRange(deltaRows, deltaColumns)); } - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetResizedRange", 1, [deltaRows, deltaColumns], false, true, null)); + _throwIfApiNotSupported("Range.getResizedRange", _defaultApiSetName, "1.3", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetResizedRange", 1, [deltaRows, deltaColumns], false, true, null, false)); }; Range.prototype.getRow=function (row) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRow", 1, [row], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRow", 1, [row], false, true, null, false)); }; Range.prototype.getRowsAbove=function (count) { if (!isExcel1_3OrAbove()) { @@ -13046,11 +14771,12 @@ var Excel; } this._ensureInteger(count, "RowsAbove"); if (count==0) { - throw new OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); } return this._getAdjacentRange("getRowsAbove", count, this.getRow(0), -1, 0); } - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRowsAbove", 1, [count], false, true, null)); + _throwIfApiNotSupported("Range.getRowsAbove", _defaultApiSetName, "1.3", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRowsAbove", 1, [count], false, true, null, false)); }; Range.prototype.getRowsBelow=function (count) { if (!isExcel1_3OrAbove()) { @@ -13059,38 +14785,44 @@ var Excel; } this._ensureInteger(count, "RowsAbove"); if (count==0) { - throw new OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); } return this._getAdjacentRange("getRowsBelow", count, this.getLastRow(), 1, 0); } - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRowsBelow", 1, [count], false, true, null)); + _throwIfApiNotSupported("Range.getRowsBelow", _defaultApiSetName, "1.3", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRowsBelow", 1, [count], false, true, null, false)); }; Range.prototype.getUsedRange=function (valuesOnly) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRange", 1, [valuesOnly], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRange", 1, [valuesOnly], false, true, null, false)); }; Range.prototype.getUsedRangeOrNullObject=function (valuesOnly) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRangeOrNullObject", 1, [valuesOnly], false, true, null)); + _throwIfApiNotSupported("Range.getUsedRangeOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRangeOrNullObject", 1, [valuesOnly], false, true, null, false)); }; Range.prototype.getVisibleView=function () { - return new Excel.RangeView(this.context, _createMethodObjectPath(this.context, this, "GetVisibleView", 1, [], false, false, null)); + _throwIfApiNotSupported("Range.getVisibleView", _defaultApiSetName, "1.3", _hostName); + return new Excel.RangeView(this.context, _createMethodObjectPath(this.context, this, "GetVisibleView", 1, [], false, false, null, false)); }; Range.prototype.insert=function (shift) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "Insert", 0, [shift], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "Insert", 0, [shift], false, true, null, false)); }; Range.prototype.merge=function (across) { - _createMethodAction(this.context, this, "Merge", 0, [across]); + _throwIfApiNotSupported("Range.merge", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "Merge", 0, [across], false); }; Range.prototype.select=function () { - _createMethodAction(this.context, this, "Select", 1, []); + _createMethodAction(this.context, this, "Select", 1, [], false); }; Range.prototype.unmerge=function () { - _createMethodAction(this.context, this, "Unmerge", 0, []); + _throwIfApiNotSupported("Range.unmerge", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "Unmerge", 0, [], false); }; Range.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Range.prototype._ValidateArraySize=function (rows, columns) { - _createMethodAction(this.context, this, "_ValidateArraySize", 1, [rows, columns]); + _throwIfApiNotSupported("Range._ValidateArraySize", _defaultApiSetName, "1.3", _hostName); + _createMethodAction(this.context, this, "_ValidateArraySize", 1, [rows, columns], false); }; Range.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13099,22 +14831,22 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Address"])) { - this.m_address=obj["Address"]; + this._A=obj["Address"]; } if (!_isUndefined(obj["AddressLocal"])) { - this.m_addressLocal=obj["AddressLocal"]; + this._Ad=obj["AddressLocal"]; } if (!_isUndefined(obj["CellCount"])) { - this.m_cellCount=obj["CellCount"]; + this._C=obj["CellCount"]; } if (!_isUndefined(obj["ColumnCount"])) { - this.m_columnCount=obj["ColumnCount"]; + this._Co=obj["ColumnCount"]; } if (!_isUndefined(obj["ColumnHidden"])) { - this.m_columnHidden=obj["ColumnHidden"]; + this._Col=obj["ColumnHidden"]; } if (!_isUndefined(obj["ColumnIndex"])) { - this.m_columnIndex=obj["ColumnIndex"]; + this._Colu=obj["ColumnIndex"]; } if (!_isUndefined(obj["Formulas"])) { this.m_formulas=obj["Formulas"]; @@ -13126,37 +14858,39 @@ var Excel; this.m_formulasR1C1=obj["FormulasR1C1"]; } if (!_isUndefined(obj["Hidden"])) { - this.m_hidden=obj["Hidden"]; + this._H=obj["Hidden"]; } if (!_isUndefined(obj["NumberFormat"])) { this.m_numberFormat=obj["NumberFormat"]; } if (!_isUndefined(obj["RowCount"])) { - this.m_rowCount=obj["RowCount"]; + this._R=obj["RowCount"]; } if (!_isUndefined(obj["RowHidden"])) { - this.m_rowHidden=obj["RowHidden"]; + this._Ro=obj["RowHidden"]; } if (!_isUndefined(obj["RowIndex"])) { - this.m_rowIndex=obj["RowIndex"]; + this._Row=obj["RowIndex"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._T=obj["Text"]; } if (!_isUndefined(obj["ValueTypes"])) { - this.m_valueTypes=obj["ValueTypes"]; + this._V=obj["ValueTypes"]; } if (!_isUndefined(obj["Values"])) { this.m_values=obj["Values"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["conditionalFormats", "ConditionalFormats", "format", "Format", "sort", "Sort", "worksheet", "Worksheet"]); }; Range.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Range.prototype.retrieve=function (option) { + return _retrieve(this, option); }; Range.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -13164,9 +14898,13 @@ var Excel; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; + Range.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; Range.prototype.track=function () { this.context.trackedObjects.add(this); return this; @@ -13176,34 +14914,41 @@ var Excel; return this; }; Range.prototype.toJSON=function () { - return { - "address": this.m_address, - "addressLocal": this.m_addressLocal, - "cellCount": this.m_cellCount, - "columnCount": this.m_columnCount, - "columnHidden": this.m_columnHidden, - "columnIndex": this.m_columnIndex, - "format": this.m_format, + return _toJson(this, { + "address": this._A, + "addressLocal": this._Ad, + "cellCount": this._C, + "columnCount": this._Co, + "columnHidden": this._Col, + "columnIndex": this._Colu, "formulas": this.m_formulas, "formulasLocal": this.m_formulasLocal, "formulasR1C1": this.m_formulasR1C1, - "hidden": this.m_hidden, + "hidden": this._H, "numberFormat": this.m_numberFormat, - "rowCount": this.m_rowCount, - "rowHidden": this.m_rowHidden, - "rowIndex": this.m_rowIndex, - "text": this.m_text, + "rowCount": this._R, + "rowHidden": this._Ro, + "rowIndex": this._Row, + "text": this._T, "values": this.m_values, - "valueTypes": this.m_valueTypes - }; + "valueTypes": this._V, + }, { + "conditionalFormats": this._Con, + "format": this._F, + }); + }; + Range.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Range; }(OfficeExtension.ClientObject)); Excel.Range=Range; + var _typeRangeView="RangeView"; var RangeView=(function (_super) { __extends(RangeView, _super); function RangeView() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeView.prototype, "_className", { get: function () { @@ -13212,39 +14957,60 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeView.prototype, "_scalarPropertyNames", { + get: function () { + return ["numberFormat", "values", "text", "formulas", "formulasLocal", "formulasR1C1", "valueTypes", "rowCount", "columnCount", "cellAddresses", "index"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeView.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, false, true, true, true, false, false, false, false, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeView.prototype, "_navigationPropertyNames", { + get: function () { + return ["rows"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeView.prototype, "rows", { get: function () { - if (!this.m_rows) { - this.m_rows=new Excel.RangeViewCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false)); + if (!this._Ro) { + this._Ro=new Excel.RangeViewCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false, false)); } - return this.m_rows; + return this._Ro; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "cellAddresses", { get: function () { - _throwIfNotLoaded("cellAddresses", this.m_cellAddresses, "RangeView", this._isNull); - return this.m_cellAddresses; + _throwIfNotLoaded("cellAddresses", this._C, _typeRangeView, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "columnCount", { get: function () { - _throwIfNotLoaded("columnCount", this.m_columnCount, "RangeView", this._isNull); - return this.m_columnCount; + _throwIfNotLoaded("columnCount", this._Co, _typeRangeView, this._isNull); + return this._Co; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "formulas", { get: function () { - _throwIfNotLoaded("formulas", this.m_formulas, "RangeView", this._isNull); - return this.m_formulas; + _throwIfNotLoaded("formulas", this._F, _typeRangeView, this._isNull); + return this._F; }, set: function (value) { - this.m_formulas=value; + this._F=value; _createSetPropertyAction(this.context, this, "Formulas", value); }, enumerable: true, @@ -13252,11 +15018,11 @@ var Excel; }); Object.defineProperty(RangeView.prototype, "formulasLocal", { get: function () { - _throwIfNotLoaded("formulasLocal", this.m_formulasLocal, "RangeView", this._isNull); - return this.m_formulasLocal; + _throwIfNotLoaded("formulasLocal", this._Fo, _typeRangeView, this._isNull); + return this._Fo; }, set: function (value) { - this.m_formulasLocal=value; + this._Fo=value; _createSetPropertyAction(this.context, this, "FormulasLocal", value); }, enumerable: true, @@ -13264,11 +15030,11 @@ var Excel; }); Object.defineProperty(RangeView.prototype, "formulasR1C1", { get: function () { - _throwIfNotLoaded("formulasR1C1", this.m_formulasR1C1, "RangeView", this._isNull); - return this.m_formulasR1C1; + _throwIfNotLoaded("formulasR1C1", this._For, _typeRangeView, this._isNull); + return this._For; }, set: function (value) { - this.m_formulasR1C1=value; + this._For=value; _createSetPropertyAction(this.context, this, "FormulasR1C1", value); }, enumerable: true, @@ -13276,19 +15042,19 @@ var Excel; }); Object.defineProperty(RangeView.prototype, "index", { get: function () { - _throwIfNotLoaded("index", this.m_index, "RangeView", this._isNull); - return this.m_index; + _throwIfNotLoaded("index", this._I, _typeRangeView, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "numberFormat", { get: function () { - _throwIfNotLoaded("numberFormat", this.m_numberFormat, "RangeView", this._isNull); - return this.m_numberFormat; + _throwIfNotLoaded("numberFormat", this._N, _typeRangeView, this._isNull); + return this._N; }, set: function (value) { - this.m_numberFormat=value; + this._N=value; _createSetPropertyAction(this.context, this, "NumberFormat", value); }, enumerable: true, @@ -13296,35 +15062,35 @@ var Excel; }); Object.defineProperty(RangeView.prototype, "rowCount", { get: function () { - _throwIfNotLoaded("rowCount", this.m_rowCount, "RangeView", this._isNull); - return this.m_rowCount; + _throwIfNotLoaded("rowCount", this._R, _typeRangeView, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "RangeView", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._T, _typeRangeView, this._isNull); + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "valueTypes", { get: function () { - _throwIfNotLoaded("valueTypes", this.m_valueTypes, "RangeView", this._isNull); - return this.m_valueTypes; + _throwIfNotLoaded("valueTypes", this._Va, _typeRangeView, this._isNull); + return this._Va; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "values", { get: function () { - _throwIfNotLoaded("values", this.m_values, "RangeView", this._isNull); - return this.m_values; + _throwIfNotLoaded("values", this._V, _typeRangeView, this._isNull); + return this._V; }, set: function (value) { - this.m_values=value; + this._V=value; _createSetPropertyAction(this.context, this, "Values", value); }, enumerable: true, @@ -13332,12 +15098,14 @@ var Excel; }); RangeView.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["numberFormat", "values", "formulas", "formulasLocal", "formulasR1C1"], [], [ - "rows", "rows" ]); }; + RangeView.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; RangeView.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); }; RangeView.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13346,66 +15114,79 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["CellAddresses"])) { - this.m_cellAddresses=obj["CellAddresses"]; + this._C=obj["CellAddresses"]; } if (!_isUndefined(obj["ColumnCount"])) { - this.m_columnCount=obj["ColumnCount"]; + this._Co=obj["ColumnCount"]; } if (!_isUndefined(obj["Formulas"])) { - this.m_formulas=obj["Formulas"]; + this._F=obj["Formulas"]; } if (!_isUndefined(obj["FormulasLocal"])) { - this.m_formulasLocal=obj["FormulasLocal"]; + this._Fo=obj["FormulasLocal"]; } if (!_isUndefined(obj["FormulasR1C1"])) { - this.m_formulasR1C1=obj["FormulasR1C1"]; + this._For=obj["FormulasR1C1"]; } if (!_isUndefined(obj["Index"])) { - this.m_index=obj["Index"]; + this._I=obj["Index"]; } if (!_isUndefined(obj["NumberFormat"])) { - this.m_numberFormat=obj["NumberFormat"]; + this._N=obj["NumberFormat"]; } if (!_isUndefined(obj["RowCount"])) { - this.m_rowCount=obj["RowCount"]; + this._R=obj["RowCount"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._T=obj["Text"]; } if (!_isUndefined(obj["ValueTypes"])) { - this.m_valueTypes=obj["ValueTypes"]; + this._Va=obj["ValueTypes"]; } if (!_isUndefined(obj["Values"])) { - this.m_values=obj["Values"]; + this._V=obj["Values"]; } _handleNavigationPropertyResults(this, obj, ["rows", "Rows"]); }; RangeView.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeView.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeView.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; RangeView.prototype.toJSON=function () { - return { - "cellAddresses": this.m_cellAddresses, - "columnCount": this.m_columnCount, - "formulas": this.m_formulas, - "formulasLocal": this.m_formulasLocal, - "formulasR1C1": this.m_formulasR1C1, - "index": this.m_index, - "numberFormat": this.m_numberFormat, - "rowCount": this.m_rowCount, - "text": this.m_text, - "values": this.m_values, - "valueTypes": this.m_valueTypes - }; + return _toJson(this, { + "cellAddresses": this._C, + "columnCount": this._Co, + "formulas": this._F, + "formulasLocal": this._Fo, + "formulasR1C1": this._For, + "index": this._I, + "numberFormat": this._N, + "rowCount": this._R, + "text": this._T, + "values": this._V, + "valueTypes": this._Va, + }, { + "rows": this._Ro, + }); + }; + RangeView.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return RangeView; }(OfficeExtension.ClientObject)); Excel.RangeView=RangeView; + var _typeRangeViewCollection="RangeViewCollection"; var RangeViewCollection=(function (_super) { __extends(RangeViewCollection, _super); function RangeViewCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeViewCollection.prototype, "_className", { get: function () { @@ -13414,22 +15195,30 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeViewCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeViewCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "RangeViewCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeRangeViewCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); RangeViewCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("RangeViewCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; RangeViewCollection.prototype.getItemAt=function (index) { - return new Excel.RangeView(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.RangeView(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; RangeViewCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13448,19 +15237,27 @@ var Excel; } }; RangeViewCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeViewCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeViewCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.RangeView(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(false, _this.context, _this, childItemData, index)); }); }; RangeViewCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return RangeViewCollection; }(OfficeExtension.ClientObject)); Excel.RangeViewCollection=RangeViewCollection; + var _typeSettingCollection="SettingCollection"; var SettingCollection=(function (_super) { __extends(SettingCollection, _super); function SettingCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(SettingCollection.prototype, "_className", { get: function () { @@ -13469,9 +15266,16 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(SettingCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(SettingCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "SettingCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeSettingCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -13479,10 +15283,10 @@ var Excel; }); SettingCollection.prototype.add=function (key, value) { value=Setting._replaceDateWithStringDate(value); - return new Excel.Setting(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [key, value], false, true, null)); + return new Excel.Setting(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [key, value], false, true, null, false)); }; SettingCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -13491,7 +15295,7 @@ var Excel; return new Excel.Setting(this.context, _createIndexerObjectPath(this.context, this, [key])); }; SettingCollection.prototype.getItemOrNullObject=function (key) { - return new Excel.Setting(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null)); + return new Excel.Setting(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null, false)); }; SettingCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13510,8 +15314,15 @@ var Excel; } }; SettingCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + SettingCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + SettingCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.Setting(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; Object.defineProperty(SettingCollection.prototype, "onSettingsChanged", { get: function () { @@ -13535,15 +15346,16 @@ var Excel; configurable: true }); SettingCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return SettingCollection; }(OfficeExtension.ClientObject)); Excel.SettingCollection=SettingCollection; + var _typeSetting="Setting"; var Setting=(function (_super) { __extends(Setting, _super); function Setting() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Setting.prototype, "_className", { get: function () { @@ -13552,6 +15364,20 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Setting.prototype, "_scalarPropertyNames", { + get: function () { + return ["key", "value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Setting.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true]; + }, + enumerable: true, + configurable: true + }); Setting.replaceStringDateWithDate=function (value) { var strValue=JSON.stringify(value); value=JSON.parse(strValue, function dateReviver(k, v) { @@ -13575,15 +15401,15 @@ var Excel; }; Object.defineProperty(Setting.prototype, "key", { get: function () { - _throwIfNotLoaded("key", this.m_key, "Setting", this._isNull); - return this.m_key; + _throwIfNotLoaded("key", this._K, _typeSetting, this._isNull); + return this._K; }, enumerable: true, configurable: true }); Object.defineProperty(Setting.prototype, "value", { get: function () { - _throwIfNotLoaded("value", this.m_value, "Setting", this._isNull); + _throwIfNotLoaded("value", this.m_value, _typeSetting, this._isNull); return this.m_value; }, set: function (value) { @@ -13602,8 +15428,11 @@ var Excel; Setting.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["value"], [], []); }; + Setting.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; Setting.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Setting.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13612,7 +15441,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Key"])) { - this.m_key=obj["Key"]; + this._K=obj["Key"]; } if (!_isUndefined(obj["Value"])) { this.m_value=obj["Value"]; @@ -13620,24 +15449,35 @@ var Excel; } }; Setting.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Setting.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Setting.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; Setting.prototype.toJSON=function () { - return { - "key": this.m_key, - "value": this.m_value - }; + return _toJson(this, { + "key": this._K, + "value": this.m_value, + }, {}); + }; + Setting.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; - Setting.DateJSONPrefix="Date("; - Setting.DateJSONSuffix=")"; return Setting; }(OfficeExtension.ClientObject)); + Setting.DateJSONPrefix="Date("; + Setting.DateJSONSuffix=")"; Excel.Setting=Setting; + var _typeNamedItemCollection="NamedItemCollection"; var NamedItemCollection=(function (_super) { __extends(NamedItemCollection, _super); function NamedItemCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(NamedItemCollection.prototype, "_className", { get: function () { @@ -13646,22 +15486,32 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(NamedItemCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(NamedItemCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "NamedItemCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeNamedItemCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); NamedItemCollection.prototype.add=function (name, reference, comment) { - return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [name, reference, comment], false, true, null)); + _throwIfApiNotSupported("NamedItemCollection.add", _defaultApiSetName, "1.4", _hostName); + return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [name, reference, comment], false, true, null, false)); }; NamedItemCollection.prototype.addFormulaLocal=function (name, formula, comment) { - return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "AddFormulaLocal", 0, [name, formula, comment], false, false, null)); + _throwIfApiNotSupported("NamedItemCollection.addFormulaLocal", _defaultApiSetName, "1.4", _hostName); + return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "AddFormulaLocal", 0, [name, formula, comment], false, false, null, false)); }; NamedItemCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("NamedItemCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -13670,7 +15520,8 @@ var Excel; return new Excel.NamedItem(this.context, _createIndexerObjectPath(this.context, this, [name])); }; NamedItemCollection.prototype.getItemOrNullObject=function (name) { - return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null)); + _throwIfApiNotSupported("NamedItemCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null, false)); }; NamedItemCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13689,19 +15540,27 @@ var Excel; } }; NamedItemCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + NamedItemCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + NamedItemCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.NamedItem(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; NamedItemCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return NamedItemCollection; }(OfficeExtension.ClientObject)); Excel.NamedItemCollection=NamedItemCollection; + var _typeNamedItem="NamedItem"; var NamedItem=(function (_super) { __extends(NamedItem, _super); function NamedItem() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(NamedItem.prototype, "_className", { get: function () { @@ -13710,33 +15569,57 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(NamedItem.prototype, "_scalarPropertyNames", { + get: function () { + return ["name", "type", "value", "visible", "_Id", "comment", "scope"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NamedItem.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, false, false, true, false, true, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NamedItem.prototype, "_navigationPropertyNames", { + get: function () { + return ["worksheet", "worksheetOrNullObject"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(NamedItem.prototype, "worksheet", { get: function () { - if (!this.m_worksheet) { - this.m_worksheet=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false)); + _throwIfApiNotSupported("NamedItem.worksheet", _defaultApiSetName, "1.4", _hostName); + if (!this._W) { + this._W=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false, false)); } - return this.m_worksheet; + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(NamedItem.prototype, "worksheetOrNullObject", { get: function () { - if (!this.m_worksheetOrNullObject) { - this.m_worksheetOrNullObject=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "WorksheetOrNullObject", false, false)); + _throwIfApiNotSupported("NamedItem.worksheetOrNullObject", _defaultApiSetName, "1.4", _hostName); + if (!this._Wo) { + this._Wo=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "WorksheetOrNullObject", false, false, false)); } - return this.m_worksheetOrNullObject; + return this._Wo; }, enumerable: true, configurable: true }); Object.defineProperty(NamedItem.prototype, "comment", { get: function () { - _throwIfNotLoaded("comment", this.m_comment, "NamedItem", this._isNull); - return this.m_comment; + _throwIfNotLoaded("comment", this._C, _typeNamedItem, this._isNull); + _throwIfApiNotSupported("NamedItem.comment", _defaultApiSetName, "1.4", _hostName); + return this._C; }, set: function (value) { - this.m_comment=value; + this._C=value; _createSetPropertyAction(this.context, this, "Comment", value); }, enumerable: true, @@ -13744,43 +15627,44 @@ var Excel; }); Object.defineProperty(NamedItem.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "NamedItem", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeNamedItem, this._isNull); + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(NamedItem.prototype, "scope", { get: function () { - _throwIfNotLoaded("scope", this.m_scope, "NamedItem", this._isNull); - return this.m_scope; + _throwIfNotLoaded("scope", this._S, _typeNamedItem, this._isNull); + _throwIfApiNotSupported("NamedItem.scope", _defaultApiSetName, "1.4", _hostName); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(NamedItem.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "NamedItem", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._T, _typeNamedItem, this._isNull); + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(NamedItem.prototype, "value", { get: function () { - _throwIfNotLoaded("value", this.m_value, "NamedItem", this._isNull); - return this.m_value; + _throwIfNotLoaded("value", this._V, _typeNamedItem, this._isNull); + return this._V; }, enumerable: true, configurable: true }); Object.defineProperty(NamedItem.prototype, "visible", { get: function () { - _throwIfNotLoaded("visible", this.m_visible, "NamedItem", this._isNull); - return this.m_visible; + _throwIfNotLoaded("visible", this._Vi, _typeNamedItem, this._isNull); + return this._Vi; }, set: function (value) { - this.m_visible=value; + this._Vi=value; _createSetPropertyAction(this.context, this, "Visible", value); }, enumerable: true, @@ -13788,28 +15672,31 @@ var Excel; }); Object.defineProperty(NamedItem.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "NamedItem", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeNamedItem, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); NamedItem.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["visible", "comment"], [], [ - "worksheet", - "worksheetOrNullObject", "worksheet", "worksheetOrNullObject" ]); }; + NamedItem.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; NamedItem.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _throwIfApiNotSupported("NamedItem.delete", _defaultApiSetName, "1.4", _hostName); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; NamedItem.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); }; NamedItem.prototype.getRangeOrNullObject=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRangeOrNullObject", 1, [], false, true, null)); + _throwIfApiNotSupported("NamedItem.getRangeOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRangeOrNullObject", 1, [], false, true, null, false)); }; NamedItem.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13818,31 +15705,33 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Comment"])) { - this.m_comment=obj["Comment"]; + this._C=obj["Comment"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Scope"])) { - this.m_scope=obj["Scope"]; + this._S=obj["Scope"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._T=obj["Type"]; } if (!_isUndefined(obj["Value"])) { - this.m_value=obj["Value"]; + this._V=obj["Value"]; } if (!_isUndefined(obj["Visible"])) { - this.m_visible=obj["Visible"]; + this._Vi=obj["Visible"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } _handleNavigationPropertyResults(this, obj, ["worksheet", "Worksheet", "worksheetOrNullObject", "WorksheetOrNullObject"]); }; NamedItem.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + NamedItem.prototype.retrieve=function (option) { + return _retrieve(this, option); }; NamedItem.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -13850,26 +15739,35 @@ var Excel; return; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; + NamedItem.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; NamedItem.prototype.toJSON=function () { - return { - "comment": this.m_comment, - "name": this.m_name, - "scope": this.m_scope, - "type": this.m_type, - "value": this.m_value, - "visible": this.m_visible - }; + return _toJson(this, { + "comment": this._C, + "name": this._N, + "scope": this._S, + "type": this._T, + "value": this._V, + "visible": this._Vi, + }, {}); + }; + NamedItem.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return NamedItem; }(OfficeExtension.ClientObject)); Excel.NamedItem=NamedItem; + var _typeBinding="Binding"; var Binding=(function (_super) { __extends(Binding, _super); function Binding() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Binding.prototype, "_className", { get: function () { @@ -13878,33 +15776,41 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Binding.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "type"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(Binding.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Binding", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeBinding, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Binding.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "Binding", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._T, _typeBinding, this._isNull); + return this._T; }, enumerable: true, configurable: true }); Binding.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _throwIfApiNotSupported("Binding.delete", _defaultApiSetName, "1.3", _hostName); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Binding.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, false, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, false, null, false)); }; Binding.prototype.getTable=function () { - return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetTable", 1, [], false, false, null)); + return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetTable", 1, [], false, false, null, false)); }; Binding.prototype.getText=function () { - var action=_createMethodAction(this.context, this, "GetText", 1, []); + var action=_createMethodAction(this.context, this, "GetText", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -13916,15 +15822,17 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._T=obj["Type"]; } }; Binding.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Binding.prototype.retrieve=function (option) { + return _retrieve(this, option); }; Binding.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -13932,12 +15840,17 @@ var Excel; return; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; + Binding.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; Object.defineProperty(Binding.prototype, "onDataChanged", { get: function () { var _this=this; + _throwIfApiNotSupported("Binding.onDataChanged", _defaultApiSetName, "1.3", _hostName); if (!this.m_dataChanged) { this.m_dataChanged=new OfficeExtension.EventHandlers(this.context, this, "DataChanged", { registerFunc: function (handlerCallback) { @@ -13962,6 +15875,7 @@ var Excel; Object.defineProperty(Binding.prototype, "onSelectionChanged", { get: function () { var _this=this; + _throwIfApiNotSupported("Binding.onSelectionChanged", _defaultApiSetName, "1.3", _hostName); if (!this.m_selectionChanged) { this.m_selectionChanged=new OfficeExtension.EventHandlers(this.context, this, "SelectionChanged", { registerFunc: function (handlerCallback) { @@ -13988,18 +15902,23 @@ var Excel; configurable: true }); Binding.prototype.toJSON=function () { - return { - "id": this.m_id, - "type": this.m_type - }; + return _toJson(this, { + "id": this._I, + "type": this._T, + }, {}); + }; + Binding.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Binding; }(OfficeExtension.ClientObject)); Excel.Binding=Binding; + var _typeBindingCollection="BindingCollection"; var BindingCollection=(function (_super) { __extends(BindingCollection, _super); function BindingCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(BindingCollection.prototype, "_className", { get: function () { @@ -14008,9 +15927,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(BindingCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(BindingCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(BindingCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "BindingCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeBindingCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14018,23 +15951,27 @@ var Excel; }); Object.defineProperty(BindingCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "BindingCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeBindingCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); BindingCollection.prototype.add=function (range, bindingType, id) { - return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [range, bindingType, id], false, true, null)); + _throwIfApiNotSupported("BindingCollection.add", _defaultApiSetName, "1.3", _hostName); + return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [range, bindingType, id], false, true, null, false)); }; BindingCollection.prototype.addFromNamedItem=function (name, bindingType, id) { - return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "AddFromNamedItem", 0, [name, bindingType, id], false, false, null)); + _throwIfApiNotSupported("BindingCollection.addFromNamedItem", _defaultApiSetName, "1.3", _hostName); + return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "AddFromNamedItem", 0, [name, bindingType, id], false, false, null, false)); }; BindingCollection.prototype.addFromSelection=function (bindingType, id) { - return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "AddFromSelection", 0, [bindingType, id], false, false, null)); + _throwIfApiNotSupported("BindingCollection.addFromSelection", _defaultApiSetName, "1.3", _hostName); + return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "AddFromSelection", 0, [bindingType, id], false, false, null, false)); }; BindingCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("BindingCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -14043,10 +15980,11 @@ var Excel; return new Excel.Binding(this.context, _createIndexerObjectPath(this.context, this, [id])); }; BindingCollection.prototype.getItemAt=function (index) { - return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; BindingCollection.prototype.getItemOrNullObject=function (id) { - return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null)); + _throwIfApiNotSupported("BindingCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null, false)); }; BindingCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14055,7 +15993,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14068,21 +16006,29 @@ var Excel; } }; BindingCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + BindingCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + BindingCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.Binding(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; BindingCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return BindingCollection; }(OfficeExtension.ClientObject)); Excel.BindingCollection=BindingCollection; + var _typeTableCollection="TableCollection"; var TableCollection=(function (_super) { __extends(TableCollection, _super); function TableCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableCollection.prototype, "_className", { get: function () { @@ -14091,9 +16037,33 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TableCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableCollection.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject=value; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TableCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14101,17 +16071,18 @@ var Excel; }); Object.defineProperty(TableCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "TableCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeTableCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); TableCollection.prototype.add=function (address, hasHeaders) { - return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [address, hasHeaders], false, true, null)); + return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [address, hasHeaders], false, true, null, false)); }; TableCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("TableCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -14120,10 +16091,11 @@ var Excel; return new Excel.Table(this.context, _createIndexerObjectPath(this.context, this, [key])); }; TableCollection.prototype.getItemAt=function (index) { - return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; TableCollection.prototype.getItemOrNullObject=function (key) { - return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null)); + _throwIfApiNotSupported("TableCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null, false)); }; TableCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14132,7 +16104,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14145,21 +16117,29 @@ var Excel; } }; TableCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.Table(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; TableCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return TableCollection; }(OfficeExtension.ClientObject)); Excel.TableCollection=TableCollection; + var _typeTable="Table"; var Table=(function (_super) { __extends(Table, _super); function Table() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Table.prototype, "_className", { get: function () { @@ -14168,53 +16148,77 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Table.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "name", "showHeaders", "showTotals", "style", "highlightFirstColumn", "highlightLastColumn", "showBandedRows", "showBandedColumns", "showFilterButton"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Table.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, true, true, true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Table.prototype, "_navigationPropertyNames", { + get: function () { + return ["columns", "rows", "sort", "worksheet"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(Table.prototype, "columns", { get: function () { - if (!this.m_columns) { - this.m_columns=new Excel.TableColumnCollection(this.context, _createPropertyObjectPath(this.context, this, "Columns", true, false)); + if (!this._C) { + this._C=new Excel.TableColumnCollection(this.context, _createPropertyObjectPath(this.context, this, "Columns", true, false, false)); } - return this.m_columns; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "rows", { get: function () { - if (!this.m_rows) { - this.m_rows=new Excel.TableRowCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false)); + if (!this._R) { + this._R=new Excel.TableRowCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false, false)); } - return this.m_rows; + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "sort", { get: function () { - if (!this.m_sort) { - this.m_sort=new Excel.TableSort(this.context, _createPropertyObjectPath(this.context, this, "Sort", false, false)); + _throwIfApiNotSupported("Table.sort", _defaultApiSetName, "1.2", _hostName); + if (!this._So) { + this._So=new Excel.TableSort(this.context, _createPropertyObjectPath(this.context, this, "Sort", false, false, false)); } - return this.m_sort; + return this._So; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "worksheet", { get: function () { - if (!this.m_worksheet) { - this.m_worksheet=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false)); + _throwIfApiNotSupported("Table.worksheet", _defaultApiSetName, "1.2", _hostName); + if (!this._W) { + this._W=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false, false)); } - return this.m_worksheet; + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "highlightFirstColumn", { get: function () { - _throwIfNotLoaded("highlightFirstColumn", this.m_highlightFirstColumn, "Table", this._isNull); - return this.m_highlightFirstColumn; + _throwIfNotLoaded("highlightFirstColumn", this._H, _typeTable, this._isNull); + _throwIfApiNotSupported("Table.highlightFirstColumn", _defaultApiSetName, "1.3", _hostName); + return this._H; }, set: function (value) { - this.m_highlightFirstColumn=value; + this._H=value; _createSetPropertyAction(this.context, this, "HighlightFirstColumn", value); }, enumerable: true, @@ -14222,11 +16226,12 @@ var Excel; }); Object.defineProperty(Table.prototype, "highlightLastColumn", { get: function () { - _throwIfNotLoaded("highlightLastColumn", this.m_highlightLastColumn, "Table", this._isNull); - return this.m_highlightLastColumn; + _throwIfNotLoaded("highlightLastColumn", this._Hi, _typeTable, this._isNull); + _throwIfApiNotSupported("Table.highlightLastColumn", _defaultApiSetName, "1.3", _hostName); + return this._Hi; }, set: function (value) { - this.m_highlightLastColumn=value; + this._Hi=value; _createSetPropertyAction(this.context, this, "HighlightLastColumn", value); }, enumerable: true, @@ -14234,19 +16239,19 @@ var Excel; }); Object.defineProperty(Table.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Table", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeTable, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "Table", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeTable, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -14254,11 +16259,12 @@ var Excel; }); Object.defineProperty(Table.prototype, "showBandedColumns", { get: function () { - _throwIfNotLoaded("showBandedColumns", this.m_showBandedColumns, "Table", this._isNull); - return this.m_showBandedColumns; + _throwIfNotLoaded("showBandedColumns", this._S, _typeTable, this._isNull); + _throwIfApiNotSupported("Table.showBandedColumns", _defaultApiSetName, "1.3", _hostName); + return this._S; }, set: function (value) { - this.m_showBandedColumns=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShowBandedColumns", value); }, enumerable: true, @@ -14266,11 +16272,12 @@ var Excel; }); Object.defineProperty(Table.prototype, "showBandedRows", { get: function () { - _throwIfNotLoaded("showBandedRows", this.m_showBandedRows, "Table", this._isNull); - return this.m_showBandedRows; + _throwIfNotLoaded("showBandedRows", this._Sh, _typeTable, this._isNull); + _throwIfApiNotSupported("Table.showBandedRows", _defaultApiSetName, "1.3", _hostName); + return this._Sh; }, set: function (value) { - this.m_showBandedRows=value; + this._Sh=value; _createSetPropertyAction(this.context, this, "ShowBandedRows", value); }, enumerable: true, @@ -14278,11 +16285,12 @@ var Excel; }); Object.defineProperty(Table.prototype, "showFilterButton", { get: function () { - _throwIfNotLoaded("showFilterButton", this.m_showFilterButton, "Table", this._isNull); - return this.m_showFilterButton; + _throwIfNotLoaded("showFilterButton", this._Sho, _typeTable, this._isNull); + _throwIfApiNotSupported("Table.showFilterButton", _defaultApiSetName, "1.3", _hostName); + return this._Sho; }, set: function (value) { - this.m_showFilterButton=value; + this._Sho=value; _createSetPropertyAction(this.context, this, "ShowFilterButton", value); }, enumerable: true, @@ -14290,11 +16298,11 @@ var Excel; }); Object.defineProperty(Table.prototype, "showHeaders", { get: function () { - _throwIfNotLoaded("showHeaders", this.m_showHeaders, "Table", this._isNull); - return this.m_showHeaders; + _throwIfNotLoaded("showHeaders", this._Show, _typeTable, this._isNull); + return this._Show; }, set: function (value) { - this.m_showHeaders=value; + this._Show=value; _createSetPropertyAction(this.context, this, "ShowHeaders", value); }, enumerable: true, @@ -14302,11 +16310,11 @@ var Excel; }); Object.defineProperty(Table.prototype, "showTotals", { get: function () { - _throwIfNotLoaded("showTotals", this.m_showTotals, "Table", this._isNull); - return this.m_showTotals; + _throwIfNotLoaded("showTotals", this._ShowT, _typeTable, this._isNull); + return this._ShowT; }, set: function (value) { - this.m_showTotals=value; + this._ShowT=value; _createSetPropertyAction(this.context, this, "ShowTotals", value); }, enumerable: true, @@ -14314,11 +16322,11 @@ var Excel; }); Object.defineProperty(Table.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "Table", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._St, _typeTable, this._isNull); + return this._St; }, set: function (value) { - this.m_style=value; + this._St=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -14326,39 +16334,41 @@ var Excel; }); Table.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["name", "showHeaders", "showTotals", "style", "highlightFirstColumn", "highlightLastColumn", "showBandedRows", "showBandedColumns", "showFilterButton"], [], [ - "columns", - "rows", - "sort", - "worksheet", "columns", "rows", "sort", "worksheet" ]); }; + Table.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; Table.prototype.clearFilters=function () { - _createMethodAction(this.context, this, "ClearFilters", 0, []); + _throwIfApiNotSupported("Table.clearFilters", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "ClearFilters", 0, [], false); }; Table.prototype.convertToRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "ConvertToRange", 0, [], false, true, null)); + _throwIfApiNotSupported("Table.convertToRange", _defaultApiSetName, "1.2", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "ConvertToRange", 0, [], false, true, null, false)); }; Table.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Table.prototype.getDataBodyRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetDataBodyRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetDataBodyRange", 1, [], false, true, null, false)); }; Table.prototype.getHeaderRowRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetHeaderRowRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetHeaderRowRange", 1, [], false, true, null, false)); }; Table.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); }; Table.prototype.getTotalRowRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetTotalRowRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetTotalRowRange", 1, [], false, true, null, false)); }; Table.prototype.reapplyFilters=function () { - _createMethodAction(this.context, this, "ReapplyFilters", 0, []); + _throwIfApiNotSupported("Table.reapplyFilters", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "ReapplyFilters", 0, [], false); }; Table.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14366,41 +16376,46 @@ var Excel; return; var obj=value; _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + obj["Id"]=obj["Id"].toString(); + } if (!_isUndefined(obj["HighlightFirstColumn"])) { - this.m_highlightFirstColumn=obj["HighlightFirstColumn"]; + this._H=obj["HighlightFirstColumn"]; } if (!_isUndefined(obj["HighlightLastColumn"])) { - this.m_highlightLastColumn=obj["HighlightLastColumn"]; + this._Hi=obj["HighlightLastColumn"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["ShowBandedColumns"])) { - this.m_showBandedColumns=obj["ShowBandedColumns"]; + this._S=obj["ShowBandedColumns"]; } if (!_isUndefined(obj["ShowBandedRows"])) { - this.m_showBandedRows=obj["ShowBandedRows"]; + this._Sh=obj["ShowBandedRows"]; } if (!_isUndefined(obj["ShowFilterButton"])) { - this.m_showFilterButton=obj["ShowFilterButton"]; + this._Sho=obj["ShowFilterButton"]; } if (!_isUndefined(obj["ShowHeaders"])) { - this.m_showHeaders=obj["ShowHeaders"]; + this._Show=obj["ShowHeaders"]; } if (!_isUndefined(obj["ShowTotals"])) { - this.m_showTotals=obj["ShowTotals"]; + this._ShowT=obj["ShowTotals"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._St=obj["Style"]; } _handleNavigationPropertyResults(this, obj, ["columns", "Columns", "rows", "Rows", "sort", "Sort", "worksheet", "Worksheet"]); }; Table.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Table.prototype.retrieve=function (option) { + return _retrieve(this, option); }; Table.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -14408,30 +16423,44 @@ var Excel; return; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + value["Id"]=value["Id"].toString(); + this._I=value["Id"]; } }; + Table.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; Table.prototype.toJSON=function () { - return { - "highlightFirstColumn": this.m_highlightFirstColumn, - "highlightLastColumn": this.m_highlightLastColumn, - "id": this.m_id, - "name": this.m_name, - "showBandedColumns": this.m_showBandedColumns, - "showBandedRows": this.m_showBandedRows, - "showFilterButton": this.m_showFilterButton, - "showHeaders": this.m_showHeaders, - "showTotals": this.m_showTotals, - "style": this.m_style - }; + return _toJson(this, { + "highlightFirstColumn": this._H, + "highlightLastColumn": this._Hi, + "id": this._I, + "name": this._N, + "showBandedColumns": this._S, + "showBandedRows": this._Sh, + "showFilterButton": this._Sho, + "showHeaders": this._Show, + "showTotals": this._ShowT, + "style": this._St, + }, { + "columns": this._C, + "rows": this._R, + "sort": this._So, + }); + }; + Table.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Table; }(OfficeExtension.ClientObject)); Excel.Table=Table; + var _typeTableColumnCollection="TableColumnCollection"; var TableColumnCollection=(function (_super) { __extends(TableColumnCollection, _super); function TableColumnCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableColumnCollection.prototype, "_className", { get: function () { @@ -14440,9 +16469,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TableColumnCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableColumnCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TableColumnCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableColumnCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableColumnCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14450,17 +16493,18 @@ var Excel; }); Object.defineProperty(TableColumnCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "TableColumnCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeTableColumnCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); TableColumnCollection.prototype.add=function (index, values, name) { - return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [index, values, name], false, true, null)); + return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [index, values, name], false, true, null, false)); }; TableColumnCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("TableColumnCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -14469,10 +16513,11 @@ var Excel; return new Excel.TableColumn(this.context, _createIndexerObjectPath(this.context, this, [key])); }; TableColumnCollection.prototype.getItemAt=function (index) { - return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; TableColumnCollection.prototype.getItemOrNullObject=function (key) { - return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null)); + _throwIfApiNotSupported("TableColumnCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null, false)); }; TableColumnCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14481,7 +16526,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14494,21 +16539,29 @@ var Excel; } }; TableColumnCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableColumnCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableColumnCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.TableColumn(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; TableColumnCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return TableColumnCollection; }(OfficeExtension.ClientObject)); Excel.TableColumnCollection=TableColumnCollection; + var _typeTableColumn="TableColumn"; var TableColumn=(function (_super) { __extends(TableColumn, _super); function TableColumn() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableColumn.prototype, "_className", { get: function () { @@ -14517,39 +16570,61 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TableColumn.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "index", "values", "name"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableColumn.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, false, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableColumn.prototype, "_navigationPropertyNames", { + get: function () { + return ["filter"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TableColumn.prototype, "filter", { get: function () { - if (!this.m_filter) { - this.m_filter=new Excel.Filter(this.context, _createPropertyObjectPath(this.context, this, "Filter", false, false)); + _throwIfApiNotSupported("TableColumn.filter", _defaultApiSetName, "1.2", _hostName); + if (!this._F) { + this._F=new Excel.Filter(this.context, _createPropertyObjectPath(this.context, this, "Filter", false, false, false)); } - return this.m_filter; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(TableColumn.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "TableColumn", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeTableColumn, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(TableColumn.prototype, "index", { get: function () { - _throwIfNotLoaded("index", this.m_index, "TableColumn", this._isNull); - return this.m_index; + _throwIfNotLoaded("index", this._In, _typeTableColumn, this._isNull); + return this._In; }, enumerable: true, configurable: true }); Object.defineProperty(TableColumn.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "TableColumn", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeTableColumn, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -14557,11 +16632,11 @@ var Excel; }); Object.defineProperty(TableColumn.prototype, "values", { get: function () { - _throwIfNotLoaded("values", this.m_values, "TableColumn", this._isNull); - return this.m_values; + _throwIfNotLoaded("values", this._V, _typeTableColumn, this._isNull); + return this._V; }, set: function (value) { - this.m_values=value; + this._V=value; _createSetPropertyAction(this.context, this, "Values", value); }, enumerable: true, @@ -14569,24 +16644,26 @@ var Excel; }); TableColumn.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["values", "name"], [], [ - "filter", "filter" ]); }; + TableColumn.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; TableColumn.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; TableColumn.prototype.getDataBodyRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetDataBodyRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetDataBodyRange", 1, [], false, true, null, false)); }; TableColumn.prototype.getHeaderRowRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetHeaderRowRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetHeaderRowRange", 1, [], false, true, null, false)); }; TableColumn.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); }; TableColumn.prototype.getTotalRowRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetTotalRowRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetTotalRowRange", 1, [], false, true, null, false)); }; TableColumn.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14595,22 +16672,24 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Index"])) { - this.m_index=obj["Index"]; + this._In=obj["Index"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Values"])) { - this.m_values=obj["Values"]; + this._V=obj["Values"]; } _handleNavigationPropertyResults(this, obj, ["filter", "Filter"]); }; TableColumn.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableColumn.prototype.retrieve=function (option) { + return _retrieve(this, option); }; TableColumn.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -14618,24 +16697,35 @@ var Excel; return; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; + TableColumn.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; TableColumn.prototype.toJSON=function () { - return { - "id": this.m_id, - "index": this.m_index, - "name": this.m_name, - "values": this.m_values - }; + return _toJson(this, { + "id": this._I, + "index": this._In, + "name": this._N, + "values": this._V, + }, { + "filter": this._F, + }); + }; + TableColumn.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TableColumn; }(OfficeExtension.ClientObject)); Excel.TableColumn=TableColumn; + var _typeTableRowCollection="TableRowCollection"; var TableRowCollection=(function (_super) { __extends(TableRowCollection, _super); function TableRowCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableRowCollection.prototype, "_className", { get: function () { @@ -14644,9 +16734,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TableRowCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableRowCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TableRowCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableRowCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableRowCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14654,23 +16758,24 @@ var Excel; }); Object.defineProperty(TableRowCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "TableRowCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeTableRowCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); TableRowCollection.prototype.add=function (index, values) { - return new Excel.TableRow(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [index, values], false, true, null)); + return new Excel.TableRow(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [index, values], false, true, null, false)); }; TableRowCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("TableRowCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; TableRowCollection.prototype.getItemAt=function (index) { - return new Excel.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; TableRowCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14679,7 +16784,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14692,21 +16797,29 @@ var Excel; } }; TableRowCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableRowCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableRowCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.TableRow(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(false, _this.context, _this, childItemData, index)); }); }; TableRowCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return TableRowCollection; }(OfficeExtension.ClientObject)); Excel.TableRowCollection=TableRowCollection; + var _typeTableRow="TableRow"; var TableRow=(function (_super) { __extends(TableRow, _super); function TableRow() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableRow.prototype, "_className", { get: function () { @@ -14715,21 +16828,35 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TableRow.prototype, "_scalarPropertyNames", { + get: function () { + return ["index", "values"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableRow.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TableRow.prototype, "index", { get: function () { - _throwIfNotLoaded("index", this.m_index, "TableRow", this._isNull); - return this.m_index; + _throwIfNotLoaded("index", this._I, _typeTableRow, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "values", { get: function () { - _throwIfNotLoaded("values", this.m_values, "TableRow", this._isNull); - return this.m_values; + _throwIfNotLoaded("values", this._V, _typeTableRow, this._isNull); + return this._V; }, set: function (value) { - this.m_values=value; + this._V=value; _createSetPropertyAction(this.context, this, "Values", value); }, enumerable: true, @@ -14738,11 +16865,14 @@ var Excel; TableRow.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["values"], [], []); }; + TableRow.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; TableRow.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; TableRow.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); }; TableRow.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14751,29 +16881,40 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Index"])) { - this.m_index=obj["Index"]; + this._I=obj["Index"]; } if (!_isUndefined(obj["Values"])) { - this.m_values=obj["Values"]; + this._V=obj["Values"]; } }; TableRow.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableRow.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableRow.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; TableRow.prototype.toJSON=function () { - return { - "index": this.m_index, - "values": this.m_values - }; + return _toJson(this, { + "index": this._I, + "values": this._V, + }, {}); + }; + TableRow.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TableRow; }(OfficeExtension.ClientObject)); Excel.TableRow=TableRow; + var _typeRangeFormat="RangeFormat"; var RangeFormat=(function (_super) { __extends(RangeFormat, _super); function RangeFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeFormat.prototype, "_className", { get: function () { @@ -14782,53 +16923,76 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["wrapText", "horizontalAlignment", "verticalAlignment", "columnWidth", "rowHeight"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["fill", "font", "borders", "protection"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeFormat.prototype, "borders", { get: function () { - if (!this.m_borders) { - this.m_borders=new Excel.RangeBorderCollection(this.context, _createPropertyObjectPath(this.context, this, "Borders", true, false)); + if (!this._B) { + this._B=new Excel.RangeBorderCollection(this.context, _createPropertyObjectPath(this.context, this, "Borders", true, false, false)); } - return this.m_borders; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(RangeFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.RangeFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.RangeFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(RangeFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.RangeFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Excel.RangeFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true }); Object.defineProperty(RangeFormat.prototype, "protection", { get: function () { - if (!this.m_protection) { - this.m_protection=new Excel.FormatProtection(this.context, _createPropertyObjectPath(this.context, this, "Protection", false, false)); + _throwIfApiNotSupported("RangeFormat.protection", _defaultApiSetName, "1.2", _hostName); + if (!this._P) { + this._P=new Excel.FormatProtection(this.context, _createPropertyObjectPath(this.context, this, "Protection", false, false, false)); } - return this.m_protection; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(RangeFormat.prototype, "columnWidth", { get: function () { - _throwIfNotLoaded("columnWidth", this.m_columnWidth, "RangeFormat", this._isNull); - return this.m_columnWidth; + _throwIfNotLoaded("columnWidth", this._C, _typeRangeFormat, this._isNull); + _throwIfApiNotSupported("RangeFormat.columnWidth", _defaultApiSetName, "1.2", _hostName); + return this._C; }, set: function (value) { - this.m_columnWidth=value; + this._C=value; _createSetPropertyAction(this.context, this, "ColumnWidth", value); }, enumerable: true, @@ -14836,11 +17000,11 @@ var Excel; }); Object.defineProperty(RangeFormat.prototype, "horizontalAlignment", { get: function () { - _throwIfNotLoaded("horizontalAlignment", this.m_horizontalAlignment, "RangeFormat", this._isNull); - return this.m_horizontalAlignment; + _throwIfNotLoaded("horizontalAlignment", this._H, _typeRangeFormat, this._isNull); + return this._H; }, set: function (value) { - this.m_horizontalAlignment=value; + this._H=value; _createSetPropertyAction(this.context, this, "HorizontalAlignment", value); }, enumerable: true, @@ -14848,11 +17012,12 @@ var Excel; }); Object.defineProperty(RangeFormat.prototype, "rowHeight", { get: function () { - _throwIfNotLoaded("rowHeight", this.m_rowHeight, "RangeFormat", this._isNull); - return this.m_rowHeight; + _throwIfNotLoaded("rowHeight", this._R, _typeRangeFormat, this._isNull); + _throwIfApiNotSupported("RangeFormat.rowHeight", _defaultApiSetName, "1.2", _hostName); + return this._R; }, set: function (value) { - this.m_rowHeight=value; + this._R=value; _createSetPropertyAction(this.context, this, "RowHeight", value); }, enumerable: true, @@ -14860,11 +17025,11 @@ var Excel; }); Object.defineProperty(RangeFormat.prototype, "verticalAlignment", { get: function () { - _throwIfNotLoaded("verticalAlignment", this.m_verticalAlignment, "RangeFormat", this._isNull); - return this.m_verticalAlignment; + _throwIfNotLoaded("verticalAlignment", this._V, _typeRangeFormat, this._isNull); + return this._V; }, set: function (value) { - this.m_verticalAlignment=value; + this._V=value; _createSetPropertyAction(this.context, this, "VerticalAlignment", value); }, enumerable: true, @@ -14872,11 +17037,11 @@ var Excel; }); Object.defineProperty(RangeFormat.prototype, "wrapText", { get: function () { - _throwIfNotLoaded("wrapText", this.m_wrapText, "RangeFormat", this._isNull); - return this.m_wrapText; + _throwIfNotLoaded("wrapText", this._W, _typeRangeFormat, this._isNull); + return this._W; }, set: function (value) { - this.m_wrapText=value; + this._W=value; _createSetPropertyAction(this.context, this, "WrapText", value); }, enumerable: true, @@ -14884,15 +17049,19 @@ var Excel; }); RangeFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["wrapText", "horizontalAlignment", "verticalAlignment", "columnWidth", "rowHeight"], ["fill", "font", "protection"], [ - "borders", "borders" ]); }; + RangeFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; RangeFormat.prototype.autofitColumns=function () { - _createMethodAction(this.context, this, "AutofitColumns", 0, []); + _throwIfApiNotSupported("RangeFormat.autofitColumns", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "AutofitColumns", 0, [], false); }; RangeFormat.prototype.autofitRows=function () { - _createMethodAction(this.context, this, "AutofitRows", 0, []); + _throwIfApiNotSupported("RangeFormat.autofitRows", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "AutofitRows", 0, [], false); }; RangeFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14901,45 +17070,58 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["ColumnWidth"])) { - this.m_columnWidth=obj["ColumnWidth"]; + this._C=obj["ColumnWidth"]; } if (!_isUndefined(obj["HorizontalAlignment"])) { - this.m_horizontalAlignment=obj["HorizontalAlignment"]; + this._H=obj["HorizontalAlignment"]; } if (!_isUndefined(obj["RowHeight"])) { - this.m_rowHeight=obj["RowHeight"]; + this._R=obj["RowHeight"]; } if (!_isUndefined(obj["VerticalAlignment"])) { - this.m_verticalAlignment=obj["VerticalAlignment"]; + this._V=obj["VerticalAlignment"]; } if (!_isUndefined(obj["WrapText"])) { - this.m_wrapText=obj["WrapText"]; + this._W=obj["WrapText"]; } _handleNavigationPropertyResults(this, obj, ["borders", "Borders", "fill", "Fill", "font", "Font", "protection", "Protection"]); }; RangeFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; RangeFormat.prototype.toJSON=function () { - return { - "columnWidth": this.m_columnWidth, - "fill": this.m_fill, - "font": this.m_font, - "horizontalAlignment": this.m_horizontalAlignment, - "protection": this.m_protection, - "rowHeight": this.m_rowHeight, - "verticalAlignment": this.m_verticalAlignment, - "wrapText": this.m_wrapText - }; + return _toJson(this, { + "columnWidth": this._C, + "horizontalAlignment": this._H, + "rowHeight": this._R, + "verticalAlignment": this._V, + "wrapText": this._W, + }, { + "borders": this._B, + "fill": this._F, + "font": this._Fo, + "protection": this._P, + }); + }; + RangeFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return RangeFormat; }(OfficeExtension.ClientObject)); Excel.RangeFormat=RangeFormat; + var _typeFormatProtection="FormatProtection"; var FormatProtection=(function (_super) { __extends(FormatProtection, _super); function FormatProtection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(FormatProtection.prototype, "_className", { get: function () { @@ -14948,13 +17130,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(FormatProtection.prototype, "_scalarPropertyNames", { + get: function () { + return ["locked", "formulaHidden"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FormatProtection.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(FormatProtection.prototype, "formulaHidden", { get: function () { - _throwIfNotLoaded("formulaHidden", this.m_formulaHidden, "FormatProtection", this._isNull); - return this.m_formulaHidden; + _throwIfNotLoaded("formulaHidden", this._F, _typeFormatProtection, this._isNull); + return this._F; }, set: function (value) { - this.m_formulaHidden=value; + this._F=value; _createSetPropertyAction(this.context, this, "FormulaHidden", value); }, enumerable: true, @@ -14962,11 +17158,11 @@ var Excel; }); Object.defineProperty(FormatProtection.prototype, "locked", { get: function () { - _throwIfNotLoaded("locked", this.m_locked, "FormatProtection", this._isNull); - return this.m_locked; + _throwIfNotLoaded("locked", this._L, _typeFormatProtection, this._isNull); + return this._L; }, set: function (value) { - this.m_locked=value; + this._L=value; _createSetPropertyAction(this.context, this, "Locked", value); }, enumerable: true, @@ -14975,6 +17171,9 @@ var Excel; FormatProtection.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["locked", "formulaHidden"], [], []); }; + FormatProtection.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; FormatProtection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -14982,29 +17181,40 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["FormulaHidden"])) { - this.m_formulaHidden=obj["FormulaHidden"]; + this._F=obj["FormulaHidden"]; } if (!_isUndefined(obj["Locked"])) { - this.m_locked=obj["Locked"]; + this._L=obj["Locked"]; } }; FormatProtection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + FormatProtection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + FormatProtection.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; FormatProtection.prototype.toJSON=function () { - return { - "formulaHidden": this.m_formulaHidden, - "locked": this.m_locked - }; + return _toJson(this, { + "formulaHidden": this._F, + "locked": this._L, + }, {}); + }; + FormatProtection.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return FormatProtection; }(OfficeExtension.ClientObject)); Excel.FormatProtection=FormatProtection; + var _typeRangeFill="RangeFill"; var RangeFill=(function (_super) { __extends(RangeFill, _super); function RangeFill() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeFill.prototype, "_className", { get: function () { @@ -15013,13 +17223,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeFill.prototype, "_scalarPropertyNames", { + get: function () { + return ["color"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFill.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeFill.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "RangeFill", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeRangeFill, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -15028,8 +17252,11 @@ var Excel; RangeFill.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["color"], [], []); }; + RangeFill.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; RangeFill.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; RangeFill.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15038,25 +17265,36 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } }; RangeFill.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeFill.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeFill.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; RangeFill.prototype.toJSON=function () { - return { - "color": this.m_color - }; + return _toJson(this, { + "color": this._C, + }, {}); + }; + RangeFill.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return RangeFill; }(OfficeExtension.ClientObject)); Excel.RangeFill=RangeFill; + var _typeRangeBorder="RangeBorder"; var RangeBorder=(function (_super) { __extends(RangeBorder, _super); function RangeBorder() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeBorder.prototype, "_className", { get: function () { @@ -15065,13 +17303,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeBorder.prototype, "_scalarPropertyNames", { + get: function () { + return ["sideIndex", "style", "weight", "color"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeBorder.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeBorder.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "RangeBorder", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeRangeBorder, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -15079,19 +17331,19 @@ var Excel; }); Object.defineProperty(RangeBorder.prototype, "sideIndex", { get: function () { - _throwIfNotLoaded("sideIndex", this.m_sideIndex, "RangeBorder", this._isNull); - return this.m_sideIndex; + _throwIfNotLoaded("sideIndex", this._S, _typeRangeBorder, this._isNull); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(RangeBorder.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "RangeBorder", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._St, _typeRangeBorder, this._isNull); + return this._St; }, set: function (value) { - this.m_style=value; + this._St=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -15099,11 +17351,11 @@ var Excel; }); Object.defineProperty(RangeBorder.prototype, "weight", { get: function () { - _throwIfNotLoaded("weight", this.m_weight, "RangeBorder", this._isNull); - return this.m_weight; + _throwIfNotLoaded("weight", this._W, _typeRangeBorder, this._isNull); + return this._W; }, set: function (value) { - this.m_weight=value; + this._W=value; _createSetPropertyAction(this.context, this, "Weight", value); }, enumerable: true, @@ -15112,6 +17364,9 @@ var Excel; RangeBorder.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["style", "weight", "color"], [], []); }; + RangeBorder.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; RangeBorder.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -15119,37 +17374,48 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["SideIndex"])) { - this.m_sideIndex=obj["SideIndex"]; + this._S=obj["SideIndex"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._St=obj["Style"]; } if (!_isUndefined(obj["Weight"])) { - this.m_weight=obj["Weight"]; + this._W=obj["Weight"]; } }; RangeBorder.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeBorder.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeBorder.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; RangeBorder.prototype.toJSON=function () { - return { - "color": this.m_color, - "sideIndex": this.m_sideIndex, - "style": this.m_style, - "weight": this.m_weight - }; + return _toJson(this, { + "color": this._C, + "sideIndex": this._S, + "style": this._St, + "weight": this._W, + }, {}); + }; + RangeBorder.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return RangeBorder; }(OfficeExtension.ClientObject)); Excel.RangeBorder=RangeBorder; + var _typeRangeBorderCollection="RangeBorderCollection"; var RangeBorderCollection=(function (_super) { __extends(RangeBorderCollection, _super); function RangeBorderCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeBorderCollection.prototype, "_className", { get: function () { @@ -15158,9 +17424,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeBorderCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeBorderCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeBorderCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "RangeBorderCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeRangeBorderCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15168,8 +17448,8 @@ var Excel; }); Object.defineProperty(RangeBorderCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "RangeBorderCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeRangeBorderCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true @@ -15178,7 +17458,7 @@ var Excel; return new Excel.RangeBorder(this.context, _createIndexerObjectPath(this.context, this, [index])); }; RangeBorderCollection.prototype.getItemAt=function (index) { - return new Excel.RangeBorder(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.RangeBorder(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; RangeBorderCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15187,7 +17467,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15200,21 +17480,29 @@ var Excel; } }; RangeBorderCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeBorderCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeBorderCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.RangeBorder(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; RangeBorderCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return RangeBorderCollection; }(OfficeExtension.ClientObject)); Excel.RangeBorderCollection=RangeBorderCollection; + var _typeRangeFont="RangeFont"; var RangeFont=(function (_super) { __extends(RangeFont, _super); function RangeFont() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeFont.prototype, "_className", { get: function () { @@ -15223,13 +17511,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeFont.prototype, "_scalarPropertyNames", { + get: function () { + return ["name", "size", "color", "italic", "bold", "underline"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFont.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeFont.prototype, "bold", { get: function () { - _throwIfNotLoaded("bold", this.m_bold, "RangeFont", this._isNull); - return this.m_bold; + _throwIfNotLoaded("bold", this._B, _typeRangeFont, this._isNull); + return this._B; }, set: function (value) { - this.m_bold=value; + this._B=value; _createSetPropertyAction(this.context, this, "Bold", value); }, enumerable: true, @@ -15237,11 +17539,11 @@ var Excel; }); Object.defineProperty(RangeFont.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "RangeFont", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeRangeFont, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -15249,11 +17551,11 @@ var Excel; }); Object.defineProperty(RangeFont.prototype, "italic", { get: function () { - _throwIfNotLoaded("italic", this.m_italic, "RangeFont", this._isNull); - return this.m_italic; + _throwIfNotLoaded("italic", this._I, _typeRangeFont, this._isNull); + return this._I; }, set: function (value) { - this.m_italic=value; + this._I=value; _createSetPropertyAction(this.context, this, "Italic", value); }, enumerable: true, @@ -15261,11 +17563,11 @@ var Excel; }); Object.defineProperty(RangeFont.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "RangeFont", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeRangeFont, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -15273,11 +17575,11 @@ var Excel; }); Object.defineProperty(RangeFont.prototype, "size", { get: function () { - _throwIfNotLoaded("size", this.m_size, "RangeFont", this._isNull); - return this.m_size; + _throwIfNotLoaded("size", this._S, _typeRangeFont, this._isNull); + return this._S; }, set: function (value) { - this.m_size=value; + this._S=value; _createSetPropertyAction(this.context, this, "Size", value); }, enumerable: true, @@ -15285,11 +17587,11 @@ var Excel; }); Object.defineProperty(RangeFont.prototype, "underline", { get: function () { - _throwIfNotLoaded("underline", this.m_underline, "RangeFont", this._isNull); - return this.m_underline; + _throwIfNotLoaded("underline", this._U, _typeRangeFont, this._isNull); + return this._U; }, set: function (value) { - this.m_underline=value; + this._U=value; _createSetPropertyAction(this.context, this, "Underline", value); }, enumerable: true, @@ -15298,6 +17600,9 @@ var Excel; RangeFont.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["name", "size", "color", "italic", "bold", "underline"], [], []); }; + RangeFont.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; RangeFont.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -15305,45 +17610,56 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Bold"])) { - this.m_bold=obj["Bold"]; + this._B=obj["Bold"]; } if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["Italic"])) { - this.m_italic=obj["Italic"]; + this._I=obj["Italic"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Size"])) { - this.m_size=obj["Size"]; + this._S=obj["Size"]; } if (!_isUndefined(obj["Underline"])) { - this.m_underline=obj["Underline"]; + this._U=obj["Underline"]; } }; RangeFont.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeFont.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeFont.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; RangeFont.prototype.toJSON=function () { - return { - "bold": this.m_bold, - "color": this.m_color, - "italic": this.m_italic, - "name": this.m_name, - "size": this.m_size, - "underline": this.m_underline - }; + return _toJson(this, { + "bold": this._B, + "color": this._C, + "italic": this._I, + "name": this._N, + "size": this._S, + "underline": this._U, + }, {}); + }; + RangeFont.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return RangeFont; }(OfficeExtension.ClientObject)); Excel.RangeFont=RangeFont; + var _typeChartCollection="ChartCollection"; var ChartCollection=(function (_super) { __extends(ChartCollection, _super); function ChartCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartCollection.prototype, "_className", { get: function () { @@ -15352,9 +17668,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ChartCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeChartCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15362,8 +17692,8 @@ var Excel; }); Object.defineProperty(ChartCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "ChartCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeChartCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true @@ -15372,22 +17702,24 @@ var Excel; if (!(sourceData instanceof Range)) { throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument, "sourceData", "Charts.Add"); } - return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [type, sourceData, seriesBy], false, true, null)); + return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [type, sourceData, seriesBy], false, true, null, false)); }; ChartCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("ChartCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; ChartCollection.prototype.getItem=function (name) { - return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItem", 1, [name], false, false, null)); + return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItem", 1, [name], false, false, null, false)); }; ChartCollection.prototype.getItemAt=function (index) { - return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; ChartCollection.prototype.getItemOrNullObject=function (name) { - return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null)); + _throwIfApiNotSupported("ChartCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null, false)); }; ChartCollection.prototype._GetItem=function (key) { return new Excel.Chart(this.context, _createIndexerObjectPath(this.context, this, [key])); @@ -15399,7 +17731,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15412,106 +17744,136 @@ var Excel; } }; ChartCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.Chart(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; ChartCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return ChartCollection; }(OfficeExtension.ClientObject)); Excel.ChartCollection=ChartCollection; + var _typeChart="Chart"; var Chart=(function (_super) { __extends(Chart, _super); function Chart() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Chart.prototype, "_className", { get: function () { - return "Chart"; + return "Chart"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Chart.prototype, "_scalarPropertyNames", { + get: function () { + return ["name", "top", "left", "width", "height"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Chart.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Chart.prototype, "_navigationPropertyNames", { + get: function () { + return ["title", "dataLabels", "legend", "series", "axes", "format", "worksheet"]; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "axes", { get: function () { - if (!this.m_axes) { - this.m_axes=new Excel.ChartAxes(this.context, _createPropertyObjectPath(this.context, this, "Axes", false, false)); + if (!this._A) { + this._A=new Excel.ChartAxes(this.context, _createPropertyObjectPath(this.context, this, "Axes", false, false, false)); } - return this.m_axes; + return this._A; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "dataLabels", { get: function () { - if (!this.m_dataLabels) { - this.m_dataLabels=new Excel.ChartDataLabels(this.context, _createPropertyObjectPath(this.context, this, "DataLabels", false, false)); + if (!this._D) { + this._D=new Excel.ChartDataLabels(this.context, _createPropertyObjectPath(this.context, this, "DataLabels", false, false, false)); } - return this.m_dataLabels; + return this._D; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartAreaFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartAreaFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "legend", { get: function () { - if (!this.m_legend) { - this.m_legend=new Excel.ChartLegend(this.context, _createPropertyObjectPath(this.context, this, "Legend", false, false)); + if (!this._Le) { + this._Le=new Excel.ChartLegend(this.context, _createPropertyObjectPath(this.context, this, "Legend", false, false, false)); } - return this.m_legend; + return this._Le; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "series", { get: function () { - if (!this.m_series) { - this.m_series=new Excel.ChartSeriesCollection(this.context, _createPropertyObjectPath(this.context, this, "Series", true, false)); + if (!this._S) { + this._S=new Excel.ChartSeriesCollection(this.context, _createPropertyObjectPath(this.context, this, "Series", true, false, false)); } - return this.m_series; + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "title", { get: function () { - if (!this.m_title) { - this.m_title=new Excel.ChartTitle(this.context, _createPropertyObjectPath(this.context, this, "Title", false, false)); + if (!this._T) { + this._T=new Excel.ChartTitle(this.context, _createPropertyObjectPath(this.context, this, "Title", false, false, false)); } - return this.m_title; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "worksheet", { get: function () { - if (!this.m_worksheet) { - this.m_worksheet=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false)); + _throwIfApiNotSupported("Chart.worksheet", _defaultApiSetName, "1.2", _hostName); + if (!this._Wo) { + this._Wo=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false, false)); } - return this.m_worksheet; + return this._Wo; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "height", { get: function () { - _throwIfNotLoaded("height", this.m_height, "Chart", this._isNull); - return this.m_height; + _throwIfNotLoaded("height", this._H, _typeChart, this._isNull); + return this._H; }, set: function (value) { - this.m_height=value; + this._H=value; _createSetPropertyAction(this.context, this, "Height", value); }, enumerable: true, @@ -15519,11 +17881,11 @@ var Excel; }); Object.defineProperty(Chart.prototype, "left", { get: function () { - _throwIfNotLoaded("left", this.m_left, "Chart", this._isNull); - return this.m_left; + _throwIfNotLoaded("left", this._L, _typeChart, this._isNull); + return this._L; }, set: function (value) { - this.m_left=value; + this._L=value; _createSetPropertyAction(this.context, this, "Left", value); }, enumerable: true, @@ -15531,11 +17893,11 @@ var Excel; }); Object.defineProperty(Chart.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "Chart", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeChart, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -15543,11 +17905,11 @@ var Excel; }); Object.defineProperty(Chart.prototype, "top", { get: function () { - _throwIfNotLoaded("top", this.m_top, "Chart", this._isNull); - return this.m_top; + _throwIfNotLoaded("top", this._To, _typeChart, this._isNull); + return this._To; }, set: function (value) { - this.m_top=value; + this._To=value; _createSetPropertyAction(this.context, this, "Top", value); }, enumerable: true, @@ -15555,11 +17917,11 @@ var Excel; }); Object.defineProperty(Chart.prototype, "width", { get: function () { - _throwIfNotLoaded("width", this.m_width, "Chart", this._isNull); - return this.m_width; + _throwIfNotLoaded("width", this._W, _typeChart, this._isNull); + return this._W; }, set: function (value) { - this.m_width=value; + this._W=value; _createSetPropertyAction(this.context, this, "Width", value); }, enumerable: true, @@ -15567,17 +17929,19 @@ var Excel; }); Chart.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["name", "top", "left", "width", "height"], ["title", "dataLabels", "legend", "axes", "format"], [ - "series", - "worksheet", "series", "worksheet" ]); }; + Chart.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; Chart.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Chart.prototype.getImage=function (width, height, fittingMode) { - var action=_createMethodAction(this.context, this, "GetImage", 1, [width, height, fittingMode]); + _throwIfApiNotSupported("Chart.getImage", _defaultApiSetName, "1.2", _hostName); + var action=_createMethodAction(this.context, this, "GetImage", 1, [width, height, fittingMode], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -15586,10 +17950,10 @@ var Excel; if (!(sourceData instanceof Range)) { throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument, "sourceData", "Chart.setData"); } - _createMethodAction(this.context, this, "SetData", 0, [sourceData, seriesBy]); + _createMethodAction(this.context, this, "SetData", 0, [sourceData, seriesBy], false); }; Chart.prototype.setPosition=function (startCell, endCell) { - _createMethodAction(this.context, this, "SetPosition", 0, [startCell, endCell]); + _createMethodAction(this.context, this, "SetPosition", 0, [startCell, endCell], false); }; Chart.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15598,47 +17962,60 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Height"])) { - this.m_height=obj["Height"]; + this._H=obj["Height"]; } if (!_isUndefined(obj["Left"])) { - this.m_left=obj["Left"]; + this._L=obj["Left"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Top"])) { - this.m_top=obj["Top"]; + this._To=obj["Top"]; } if (!_isUndefined(obj["Width"])) { - this.m_width=obj["Width"]; + this._W=obj["Width"]; } _handleNavigationPropertyResults(this, obj, ["axes", "Axes", "dataLabels", "DataLabels", "format", "Format", "legend", "Legend", "series", "Series", "title", "Title", "worksheet", "Worksheet"]); }; Chart.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Chart.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Chart.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; Chart.prototype.toJSON=function () { - return { - "axes": this.m_axes, - "dataLabels": this.m_dataLabels, - "format": this.m_format, - "height": this.m_height, - "left": this.m_left, - "legend": this.m_legend, - "name": this.m_name, - "title": this.m_title, - "top": this.m_top, - "width": this.m_width - }; + return _toJson(this, { + "height": this._H, + "left": this._L, + "name": this._N, + "top": this._To, + "width": this._W, + }, { + "axes": this._A, + "dataLabels": this._D, + "format": this._F, + "legend": this._Le, + "series": this._S, + "title": this._T, + }); + }; + Chart.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Chart; }(OfficeExtension.ClientObject)); Excel.Chart=Chart; + var _typeChartAreaFormat="ChartAreaFormat"; var ChartAreaFormat=(function (_super) { __extends(ChartAreaFormat, _super); function ChartAreaFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartAreaFormat.prototype, "_className", { get: function () { @@ -15647,22 +18024,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartAreaFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["fill", "font"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartAreaFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAreaFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true @@ -15672,6 +18056,9 @@ var Excel; "fill" ]); }; + ChartAreaFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartAreaFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -15681,22 +18068,32 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["fill", "Fill", "font", "Font"]); }; ChartAreaFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartAreaFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAreaFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartAreaFormat.prototype.toJSON=function () { - return { - "fill": this.m_fill, - "font": this.m_font - }; + return _toJson(this, {}, { + "font": this._Fo, + }); + }; + ChartAreaFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartAreaFormat; }(OfficeExtension.ClientObject)); Excel.ChartAreaFormat=ChartAreaFormat; + var _typeChartSeriesCollection="ChartSeriesCollection"; var ChartSeriesCollection=(function (_super) { __extends(ChartSeriesCollection, _super); function ChartSeriesCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartSeriesCollection.prototype, "_className", { get: function () { @@ -15705,9 +18102,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartSeriesCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartSeriesCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartSeriesCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ChartSeriesCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeChartSeriesCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15715,20 +18126,21 @@ var Excel; }); Object.defineProperty(ChartSeriesCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "ChartSeriesCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeChartSeriesCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); ChartSeriesCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("ChartSeriesCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; ChartSeriesCollection.prototype.getItemAt=function (index) { - return new Excel.ChartSeries(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.ChartSeries(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; ChartSeriesCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15737,7 +18149,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15750,21 +18162,29 @@ var Excel; } }; ChartSeriesCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartSeriesCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartSeriesCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.ChartSeries(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(false, _this.context, _this, childItemData, index)); }); }; ChartSeriesCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return ChartSeriesCollection; }(OfficeExtension.ClientObject)); Excel.ChartSeriesCollection=ChartSeriesCollection; + var _typeChartSeries="ChartSeries"; var ChartSeries=(function (_super) { __extends(ChartSeries, _super); function ChartSeries() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartSeries.prototype, "_className", { get: function () { @@ -15773,33 +18193,54 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartSeries.prototype, "_scalarPropertyNames", { + get: function () { + return ["name"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartSeries.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartSeries.prototype, "_navigationPropertyNames", { + get: function () { + return ["points", "format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartSeries.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartSeriesFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartSeriesFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartSeries.prototype, "points", { get: function () { - if (!this.m_points) { - this.m_points=new Excel.ChartPointsCollection(this.context, _createPropertyObjectPath(this.context, this, "Points", true, false)); + if (!this._P) { + this._P=new Excel.ChartPointsCollection(this.context, _createPropertyObjectPath(this.context, this, "Points", true, false, false)); } - return this.m_points; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(ChartSeries.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "ChartSeries", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeChartSeries, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -15807,10 +18248,12 @@ var Excel; }); ChartSeries.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["name"], ["format"], [ - "points", "points" ]); }; + ChartSeries.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartSeries.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -15818,27 +18261,40 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format", "points", "Points"]); }; ChartSeries.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartSeries.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartSeries.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartSeries.prototype.toJSON=function () { - return { - "format": this.m_format, - "name": this.m_name - }; + return _toJson(this, { + "name": this._N, + }, { + "format": this._F, + "points": this._P, + }); + }; + ChartSeries.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartSeries; }(OfficeExtension.ClientObject)); Excel.ChartSeries=ChartSeries; + var _typeChartSeriesFormat="ChartSeriesFormat"; var ChartSeriesFormat=(function (_super) { __extends(ChartSeriesFormat, _super); function ChartSeriesFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartSeriesFormat.prototype, "_className", { get: function () { @@ -15847,22 +18303,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartSeriesFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["fill", "line"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartSeriesFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartSeriesFormat.prototype, "line", { get: function () { - if (!this.m_line) { - this.m_line=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false)); + if (!this._L) { + this._L=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false, false)); } - return this.m_line; + return this._L; }, enumerable: true, configurable: true @@ -15872,6 +18335,9 @@ var Excel; "fill" ]); }; + ChartSeriesFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartSeriesFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -15881,22 +18347,32 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["fill", "Fill", "line", "Line"]); }; ChartSeriesFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartSeriesFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartSeriesFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartSeriesFormat.prototype.toJSON=function () { - return { - "fill": this.m_fill, - "line": this.m_line - }; + return _toJson(this, {}, { + "line": this._L, + }); + }; + ChartSeriesFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartSeriesFormat; }(OfficeExtension.ClientObject)); Excel.ChartSeriesFormat=ChartSeriesFormat; + var _typeChartPointsCollection="ChartPointsCollection"; var ChartPointsCollection=(function (_super) { __extends(ChartPointsCollection, _super); function ChartPointsCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartPointsCollection.prototype, "_className", { get: function () { @@ -15905,9 +18381,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartPointsCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartPointsCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartPointsCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ChartPointsCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeChartPointsCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15915,20 +18405,21 @@ var Excel; }); Object.defineProperty(ChartPointsCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "ChartPointsCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeChartPointsCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); ChartPointsCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("ChartPointsCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; ChartPointsCollection.prototype.getItemAt=function (index) { - return new Excel.ChartPoint(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.ChartPoint(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; ChartPointsCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15937,7 +18428,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15950,21 +18441,29 @@ var Excel; } }; ChartPointsCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartPointsCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartPointsCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.ChartPoint(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(false, _this.context, _this, childItemData, index)); }); }; ChartPointsCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return ChartPointsCollection; }(OfficeExtension.ClientObject)); Excel.ChartPointsCollection=ChartPointsCollection; + var _typeChartPoint="ChartPoint"; var ChartPoint=(function (_super) { __extends(ChartPoint, _super); function ChartPoint() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartPoint.prototype, "_className", { get: function () { @@ -15973,20 +18472,34 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartPoint.prototype, "_scalarPropertyNames", { + get: function () { + return ["value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartPoint.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartPoint.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartPointFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartPointFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartPoint.prototype, "value", { get: function () { - _throwIfNotLoaded("value", this.m_value, "ChartPoint", this._isNull); - return this.m_value; + _throwIfNotLoaded("value", this._V, _typeChartPoint, this._isNull); + return this._V; }, enumerable: true, configurable: true @@ -15998,27 +18511,39 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Value"])) { - this.m_value=obj["Value"]; + this._V=obj["Value"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; ChartPoint.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartPoint.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartPoint.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartPoint.prototype.toJSON=function () { - return { - "format": this.m_format, - "value": this.m_value - }; + return _toJson(this, { + "value": this._V, + }, { + "format": this._F, + }); + }; + ChartPoint.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartPoint; }(OfficeExtension.ClientObject)); Excel.ChartPoint=ChartPoint; + var _typeChartPointFormat="ChartPointFormat"; var ChartPointFormat=(function (_super) { __extends(ChartPointFormat, _super); function ChartPointFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartPointFormat.prototype, "_className", { get: function () { @@ -16027,12 +18552,19 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartPointFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["fill"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartPointFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true @@ -16046,21 +18578,26 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["fill", "Fill"]); }; ChartPointFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartPointFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartPointFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartPointFormat.prototype.toJSON=function () { - return { - "fill": this.m_fill - }; + return _toJson(this, {}, {}); }; return ChartPointFormat; }(OfficeExtension.ClientObject)); Excel.ChartPointFormat=ChartPointFormat; + var _typeChartAxes="ChartAxes"; var ChartAxes=(function (_super) { __extends(ChartAxes, _super); function ChartAxes() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartAxes.prototype, "_className", { get: function () { @@ -16069,32 +18606,39 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartAxes.prototype, "_navigationPropertyNames", { + get: function () { + return ["categoryAxis", "seriesAxis", "valueAxis"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartAxes.prototype, "categoryAxis", { get: function () { - if (!this.m_categoryAxis) { - this.m_categoryAxis=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "CategoryAxis", false, false)); + if (!this._C) { + this._C=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "CategoryAxis", false, false, false)); } - return this.m_categoryAxis; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxes.prototype, "seriesAxis", { get: function () { - if (!this.m_seriesAxis) { - this.m_seriesAxis=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "SeriesAxis", false, false)); + if (!this._S) { + this._S=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "SeriesAxis", false, false, false)); } - return this.m_seriesAxis; + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxes.prototype, "valueAxis", { get: function () { - if (!this.m_valueAxis) { - this.m_valueAxis=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "ValueAxis", false, false)); + if (!this._V) { + this._V=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "ValueAxis", false, false, false)); } - return this.m_valueAxis; + return this._V; }, enumerable: true, configurable: true @@ -16102,6 +18646,9 @@ var Excel; ChartAxes.prototype.set=function (properties, options) { this._recursivelySet(properties, options, [], ["categoryAxis", "seriesAxis", "valueAxis"], []); }; + ChartAxes.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartAxes.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16111,23 +18658,34 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["categoryAxis", "CategoryAxis", "seriesAxis", "SeriesAxis", "valueAxis", "ValueAxis"]); }; ChartAxes.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartAxes.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAxes.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartAxes.prototype.toJSON=function () { - return { - "categoryAxis": this.m_categoryAxis, - "seriesAxis": this.m_seriesAxis, - "valueAxis": this.m_valueAxis - }; + return _toJson(this, {}, { + "categoryAxis": this._C, + "seriesAxis": this._S, + "valueAxis": this._V, + }); + }; + ChartAxes.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartAxes; }(OfficeExtension.ClientObject)); Excel.ChartAxes=ChartAxes; + var _typeChartAxis="ChartAxis"; var ChartAxis=(function (_super) { __extends(ChartAxis, _super); function ChartAxis() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartAxis.prototype, "_className", { get: function () { @@ -16136,53 +18694,74 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartAxis.prototype, "_scalarPropertyNames", { + get: function () { + return ["majorUnit", "maximum", "minimum", "minorUnit"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxis.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxis.prototype, "_navigationPropertyNames", { + get: function () { + return ["majorGridlines", "minorGridlines", "title", "format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartAxis.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartAxisFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartAxisFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxis.prototype, "majorGridlines", { get: function () { - if (!this.m_majorGridlines) { - this.m_majorGridlines=new Excel.ChartGridlines(this.context, _createPropertyObjectPath(this.context, this, "MajorGridlines", false, false)); + if (!this._M) { + this._M=new Excel.ChartGridlines(this.context, _createPropertyObjectPath(this.context, this, "MajorGridlines", false, false, false)); } - return this.m_majorGridlines; + return this._M; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxis.prototype, "minorGridlines", { get: function () { - if (!this.m_minorGridlines) { - this.m_minorGridlines=new Excel.ChartGridlines(this.context, _createPropertyObjectPath(this.context, this, "MinorGridlines", false, false)); + if (!this._Min) { + this._Min=new Excel.ChartGridlines(this.context, _createPropertyObjectPath(this.context, this, "MinorGridlines", false, false, false)); } - return this.m_minorGridlines; + return this._Min; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxis.prototype, "title", { get: function () { - if (!this.m_title) { - this.m_title=new Excel.ChartAxisTitle(this.context, _createPropertyObjectPath(this.context, this, "Title", false, false)); + if (!this._T) { + this._T=new Excel.ChartAxisTitle(this.context, _createPropertyObjectPath(this.context, this, "Title", false, false, false)); } - return this.m_title; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxis.prototype, "majorUnit", { get: function () { - _throwIfNotLoaded("majorUnit", this.m_majorUnit, "ChartAxis", this._isNull); - return this.m_majorUnit; + _throwIfNotLoaded("majorUnit", this._Ma, _typeChartAxis, this._isNull); + return this._Ma; }, set: function (value) { - this.m_majorUnit=value; + this._Ma=value; _createSetPropertyAction(this.context, this, "MajorUnit", value); }, enumerable: true, @@ -16190,11 +18769,11 @@ var Excel; }); Object.defineProperty(ChartAxis.prototype, "maximum", { get: function () { - _throwIfNotLoaded("maximum", this.m_maximum, "ChartAxis", this._isNull); - return this.m_maximum; + _throwIfNotLoaded("maximum", this._Max, _typeChartAxis, this._isNull); + return this._Max; }, set: function (value) { - this.m_maximum=value; + this._Max=value; _createSetPropertyAction(this.context, this, "Maximum", value); }, enumerable: true, @@ -16202,11 +18781,11 @@ var Excel; }); Object.defineProperty(ChartAxis.prototype, "minimum", { get: function () { - _throwIfNotLoaded("minimum", this.m_minimum, "ChartAxis", this._isNull); - return this.m_minimum; + _throwIfNotLoaded("minimum", this._Mi, _typeChartAxis, this._isNull); + return this._Mi; }, set: function (value) { - this.m_minimum=value; + this._Mi=value; _createSetPropertyAction(this.context, this, "Minimum", value); }, enumerable: true, @@ -16214,11 +18793,11 @@ var Excel; }); Object.defineProperty(ChartAxis.prototype, "minorUnit", { get: function () { - _throwIfNotLoaded("minorUnit", this.m_minorUnit, "ChartAxis", this._isNull); - return this.m_minorUnit; + _throwIfNotLoaded("minorUnit", this._Mino, _typeChartAxis, this._isNull); + return this._Mino; }, set: function (value) { - this.m_minorUnit=value; + this._Mino=value; _createSetPropertyAction(this.context, this, "MinorUnit", value); }, enumerable: true, @@ -16227,6 +18806,9 @@ var Excel; ChartAxis.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["majorUnit", "maximum", "minimum", "minorUnit"], ["majorGridlines", "minorGridlines", "title", "format"], []); }; + ChartAxis.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartAxis.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16234,42 +18816,54 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["MajorUnit"])) { - this.m_majorUnit=obj["MajorUnit"]; + this._Ma=obj["MajorUnit"]; } if (!_isUndefined(obj["Maximum"])) { - this.m_maximum=obj["Maximum"]; + this._Max=obj["Maximum"]; } if (!_isUndefined(obj["Minimum"])) { - this.m_minimum=obj["Minimum"]; + this._Mi=obj["Minimum"]; } if (!_isUndefined(obj["MinorUnit"])) { - this.m_minorUnit=obj["MinorUnit"]; + this._Mino=obj["MinorUnit"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format", "majorGridlines", "MajorGridlines", "minorGridlines", "MinorGridlines", "title", "Title"]); }; ChartAxis.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartAxis.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAxis.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartAxis.prototype.toJSON=function () { - return { - "format": this.m_format, - "majorGridlines": this.m_majorGridlines, - "majorUnit": this.m_majorUnit, - "maximum": this.m_maximum, - "minimum": this.m_minimum, - "minorGridlines": this.m_minorGridlines, - "minorUnit": this.m_minorUnit, - "title": this.m_title - }; + return _toJson(this, { + "majorUnit": this._Ma, + "maximum": this._Max, + "minimum": this._Mi, + "minorUnit": this._Mino, + }, { + "format": this._F, + "majorGridlines": this._M, + "minorGridlines": this._Min, + "title": this._T, + }); + }; + ChartAxis.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartAxis; }(OfficeExtension.ClientObject)); Excel.ChartAxis=ChartAxis; + var _typeChartAxisFormat="ChartAxisFormat"; var ChartAxisFormat=(function (_super) { __extends(ChartAxisFormat, _super); function ChartAxisFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartAxisFormat.prototype, "_className", { get: function () { @@ -16278,22 +18872,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartAxisFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["font", "line"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartAxisFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._F) { + this._F=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxisFormat.prototype, "line", { get: function () { - if (!this.m_line) { - this.m_line=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false)); + if (!this._L) { + this._L=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false, false)); } - return this.m_line; + return this._L; }, enumerable: true, configurable: true @@ -16301,6 +18902,9 @@ var Excel; ChartAxisFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, [], ["font", "line"], []); }; + ChartAxisFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartAxisFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16310,22 +18914,33 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["font", "Font", "line", "Line"]); }; ChartAxisFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartAxisFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAxisFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartAxisFormat.prototype.toJSON=function () { - return { - "font": this.m_font, - "line": this.m_line - }; + return _toJson(this, {}, { + "font": this._F, + "line": this._L, + }); + }; + ChartAxisFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartAxisFormat; }(OfficeExtension.ClientObject)); Excel.ChartAxisFormat=ChartAxisFormat; + var _typeChartAxisTitle="ChartAxisTitle"; var ChartAxisTitle=(function (_super) { __extends(ChartAxisTitle, _super); function ChartAxisTitle() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartAxisTitle.prototype, "_className", { get: function () { @@ -16334,23 +18949,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartAxisTitle.prototype, "_scalarPropertyNames", { + get: function () { + return ["text", "visible"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxisTitle.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxisTitle.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartAxisTitle.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartAxisTitleFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartAxisTitleFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxisTitle.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "ChartAxisTitle", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._T, _typeChartAxisTitle, this._isNull); + return this._T; }, set: function (value) { - this.m_text=value; + this._T=value; _createSetPropertyAction(this.context, this, "Text", value); }, enumerable: true, @@ -16358,11 +18994,11 @@ var Excel; }); Object.defineProperty(ChartAxisTitle.prototype, "visible", { get: function () { - _throwIfNotLoaded("visible", this.m_visible, "ChartAxisTitle", this._isNull); - return this.m_visible; + _throwIfNotLoaded("visible", this._V, _typeChartAxisTitle, this._isNull); + return this._V; }, set: function (value) { - this.m_visible=value; + this._V=value; _createSetPropertyAction(this.context, this, "Visible", value); }, enumerable: true, @@ -16371,6 +19007,9 @@ var Excel; ChartAxisTitle.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["text", "visible"], ["format"], []); }; + ChartAxisTitle.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartAxisTitle.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16378,31 +19017,43 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._T=obj["Text"]; } if (!_isUndefined(obj["Visible"])) { - this.m_visible=obj["Visible"]; + this._V=obj["Visible"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; ChartAxisTitle.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartAxisTitle.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAxisTitle.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartAxisTitle.prototype.toJSON=function () { - return { - "format": this.m_format, - "text": this.m_text, - "visible": this.m_visible - }; + return _toJson(this, { + "text": this._T, + "visible": this._V, + }, { + "format": this._F, + }); + }; + ChartAxisTitle.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartAxisTitle; }(OfficeExtension.ClientObject)); Excel.ChartAxisTitle=ChartAxisTitle; + var _typeChartAxisTitleFormat="ChartAxisTitleFormat"; var ChartAxisTitleFormat=(function (_super) { __extends(ChartAxisTitleFormat, _super); function ChartAxisTitleFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartAxisTitleFormat.prototype, "_className", { get: function () { @@ -16411,12 +19062,19 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartAxisTitleFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["font"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartAxisTitleFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._F) { + this._F=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._F; }, enumerable: true, configurable: true @@ -16424,6 +19082,9 @@ var Excel; ChartAxisTitleFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, [], ["font"], []); }; + ChartAxisTitleFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartAxisTitleFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16433,46 +19094,78 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["font", "Font"]); }; ChartAxisTitleFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartAxisTitleFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAxisTitleFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartAxisTitleFormat.prototype.toJSON=function () { - return { - "font": this.m_font - }; + return _toJson(this, {}, { + "font": this._F, + }); + }; + ChartAxisTitleFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartAxisTitleFormat; }(OfficeExtension.ClientObject)); Excel.ChartAxisTitleFormat=ChartAxisTitleFormat; + var _typeChartDataLabels="ChartDataLabels"; var ChartDataLabels=(function (_super) { __extends(ChartDataLabels, _super); function ChartDataLabels() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartDataLabels.prototype, "_className", { get: function () { - return "ChartDataLabels"; + return "ChartDataLabels"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartDataLabels.prototype, "_scalarPropertyNames", { + get: function () { + return ["position", "showValue", "showSeriesName", "showCategoryName", "showLegendKey", "showPercentage", "showBubbleSize", "separator"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartDataLabels.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartDataLabels.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; }, enumerable: true, configurable: true }); Object.defineProperty(ChartDataLabels.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartDataLabelFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartDataLabelFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartDataLabels.prototype, "position", { get: function () { - _throwIfNotLoaded("position", this.m_position, "ChartDataLabels", this._isNull); - return this.m_position; + _throwIfNotLoaded("position", this._P, _typeChartDataLabels, this._isNull); + return this._P; }, set: function (value) { - this.m_position=value; + this._P=value; _createSetPropertyAction(this.context, this, "Position", value); }, enumerable: true, @@ -16480,11 +19173,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "separator", { get: function () { - _throwIfNotLoaded("separator", this.m_separator, "ChartDataLabels", this._isNull); - return this.m_separator; + _throwIfNotLoaded("separator", this._S, _typeChartDataLabels, this._isNull); + return this._S; }, set: function (value) { - this.m_separator=value; + this._S=value; _createSetPropertyAction(this.context, this, "Separator", value); }, enumerable: true, @@ -16492,11 +19185,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "showBubbleSize", { get: function () { - _throwIfNotLoaded("showBubbleSize", this.m_showBubbleSize, "ChartDataLabels", this._isNull); - return this.m_showBubbleSize; + _throwIfNotLoaded("showBubbleSize", this._Sh, _typeChartDataLabels, this._isNull); + return this._Sh; }, set: function (value) { - this.m_showBubbleSize=value; + this._Sh=value; _createSetPropertyAction(this.context, this, "ShowBubbleSize", value); }, enumerable: true, @@ -16504,11 +19197,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "showCategoryName", { get: function () { - _throwIfNotLoaded("showCategoryName", this.m_showCategoryName, "ChartDataLabels", this._isNull); - return this.m_showCategoryName; + _throwIfNotLoaded("showCategoryName", this._Sho, _typeChartDataLabels, this._isNull); + return this._Sho; }, set: function (value) { - this.m_showCategoryName=value; + this._Sho=value; _createSetPropertyAction(this.context, this, "ShowCategoryName", value); }, enumerable: true, @@ -16516,11 +19209,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "showLegendKey", { get: function () { - _throwIfNotLoaded("showLegendKey", this.m_showLegendKey, "ChartDataLabels", this._isNull); - return this.m_showLegendKey; + _throwIfNotLoaded("showLegendKey", this._Show, _typeChartDataLabels, this._isNull); + return this._Show; }, set: function (value) { - this.m_showLegendKey=value; + this._Show=value; _createSetPropertyAction(this.context, this, "ShowLegendKey", value); }, enumerable: true, @@ -16528,11 +19221,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "showPercentage", { get: function () { - _throwIfNotLoaded("showPercentage", this.m_showPercentage, "ChartDataLabels", this._isNull); - return this.m_showPercentage; + _throwIfNotLoaded("showPercentage", this._ShowP, _typeChartDataLabels, this._isNull); + return this._ShowP; }, set: function (value) { - this.m_showPercentage=value; + this._ShowP=value; _createSetPropertyAction(this.context, this, "ShowPercentage", value); }, enumerable: true, @@ -16540,11 +19233,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "showSeriesName", { get: function () { - _throwIfNotLoaded("showSeriesName", this.m_showSeriesName, "ChartDataLabels", this._isNull); - return this.m_showSeriesName; + _throwIfNotLoaded("showSeriesName", this._ShowS, _typeChartDataLabels, this._isNull); + return this._ShowS; }, set: function (value) { - this.m_showSeriesName=value; + this._ShowS=value; _createSetPropertyAction(this.context, this, "ShowSeriesName", value); }, enumerable: true, @@ -16552,11 +19245,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "showValue", { get: function () { - _throwIfNotLoaded("showValue", this.m_showValue, "ChartDataLabels", this._isNull); - return this.m_showValue; + _throwIfNotLoaded("showValue", this._ShowV, _typeChartDataLabels, this._isNull); + return this._ShowV; }, set: function (value) { - this.m_showValue=value; + this._ShowV=value; _createSetPropertyAction(this.context, this, "ShowValue", value); }, enumerable: true, @@ -16565,6 +19258,9 @@ var Excel; ChartDataLabels.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["position", "showValue", "showSeriesName", "showCategoryName", "showLegendKey", "showPercentage", "showBubbleSize", "separator"], ["format"], []); }; + ChartDataLabels.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartDataLabels.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16572,55 +19268,67 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Position"])) { - this.m_position=obj["Position"]; + this._P=obj["Position"]; } if (!_isUndefined(obj["Separator"])) { - this.m_separator=obj["Separator"]; + this._S=obj["Separator"]; } if (!_isUndefined(obj["ShowBubbleSize"])) { - this.m_showBubbleSize=obj["ShowBubbleSize"]; + this._Sh=obj["ShowBubbleSize"]; } if (!_isUndefined(obj["ShowCategoryName"])) { - this.m_showCategoryName=obj["ShowCategoryName"]; + this._Sho=obj["ShowCategoryName"]; } if (!_isUndefined(obj["ShowLegendKey"])) { - this.m_showLegendKey=obj["ShowLegendKey"]; + this._Show=obj["ShowLegendKey"]; } if (!_isUndefined(obj["ShowPercentage"])) { - this.m_showPercentage=obj["ShowPercentage"]; + this._ShowP=obj["ShowPercentage"]; } if (!_isUndefined(obj["ShowSeriesName"])) { - this.m_showSeriesName=obj["ShowSeriesName"]; + this._ShowS=obj["ShowSeriesName"]; } if (!_isUndefined(obj["ShowValue"])) { - this.m_showValue=obj["ShowValue"]; + this._ShowV=obj["ShowValue"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; ChartDataLabels.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartDataLabels.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartDataLabels.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartDataLabels.prototype.toJSON=function () { - return { - "format": this.m_format, - "position": this.m_position, - "separator": this.m_separator, - "showBubbleSize": this.m_showBubbleSize, - "showCategoryName": this.m_showCategoryName, - "showLegendKey": this.m_showLegendKey, - "showPercentage": this.m_showPercentage, - "showSeriesName": this.m_showSeriesName, - "showValue": this.m_showValue - }; + return _toJson(this, { + "position": this._P, + "separator": this._S, + "showBubbleSize": this._Sh, + "showCategoryName": this._Sho, + "showLegendKey": this._Show, + "showPercentage": this._ShowP, + "showSeriesName": this._ShowS, + "showValue": this._ShowV, + }, { + "format": this._F, + }); + }; + ChartDataLabels.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartDataLabels; }(OfficeExtension.ClientObject)); Excel.ChartDataLabels=ChartDataLabels; + var _typeChartDataLabelFormat="ChartDataLabelFormat"; var ChartDataLabelFormat=(function (_super) { __extends(ChartDataLabelFormat, _super); function ChartDataLabelFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartDataLabelFormat.prototype, "_className", { get: function () { @@ -16629,22 +19337,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartDataLabelFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["font", "fill"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartDataLabelFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartDataLabelFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true @@ -16654,6 +19369,9 @@ var Excel; "fill" ]); }; + ChartDataLabelFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartDataLabelFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16663,22 +19381,32 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["fill", "Fill", "font", "Font"]); }; ChartDataLabelFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartDataLabelFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartDataLabelFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartDataLabelFormat.prototype.toJSON=function () { - return { - "fill": this.m_fill, - "font": this.m_font - }; + return _toJson(this, {}, { + "font": this._Fo, + }); + }; + ChartDataLabelFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartDataLabelFormat; }(OfficeExtension.ClientObject)); Excel.ChartDataLabelFormat=ChartDataLabelFormat; + var _typeChartGridlines="ChartGridlines"; var ChartGridlines=(function (_super) { __extends(ChartGridlines, _super); function ChartGridlines() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartGridlines.prototype, "_className", { get: function () { @@ -16687,23 +19415,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartGridlines.prototype, "_scalarPropertyNames", { + get: function () { + return ["visible"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartGridlines.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartGridlines.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartGridlines.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartGridlinesFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartGridlinesFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartGridlines.prototype, "visible", { get: function () { - _throwIfNotLoaded("visible", this.m_visible, "ChartGridlines", this._isNull); - return this.m_visible; + _throwIfNotLoaded("visible", this._V, _typeChartGridlines, this._isNull); + return this._V; }, set: function (value) { - this.m_visible=value; + this._V=value; _createSetPropertyAction(this.context, this, "Visible", value); }, enumerable: true, @@ -16712,6 +19461,9 @@ var Excel; ChartGridlines.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["visible"], ["format"], []); }; + ChartGridlines.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartGridlines.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16719,27 +19471,39 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Visible"])) { - this.m_visible=obj["Visible"]; + this._V=obj["Visible"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; ChartGridlines.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartGridlines.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartGridlines.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartGridlines.prototype.toJSON=function () { - return { - "format": this.m_format, - "visible": this.m_visible - }; + return _toJson(this, { + "visible": this._V, + }, { + "format": this._F, + }); + }; + ChartGridlines.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartGridlines; }(OfficeExtension.ClientObject)); Excel.ChartGridlines=ChartGridlines; + var _typeChartGridlinesFormat="ChartGridlinesFormat"; var ChartGridlinesFormat=(function (_super) { __extends(ChartGridlinesFormat, _super); function ChartGridlinesFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartGridlinesFormat.prototype, "_className", { get: function () { @@ -16748,12 +19512,19 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartGridlinesFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["line"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartGridlinesFormat.prototype, "line", { get: function () { - if (!this.m_line) { - this.m_line=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false)); + if (!this._L) { + this._L=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false, false)); } - return this.m_line; + return this._L; }, enumerable: true, configurable: true @@ -16761,6 +19532,9 @@ var Excel; ChartGridlinesFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, [], ["line"], []); }; + ChartGridlinesFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartGridlinesFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16770,21 +19544,32 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["line", "Line"]); }; ChartGridlinesFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartGridlinesFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartGridlinesFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartGridlinesFormat.prototype.toJSON=function () { - return { - "line": this.m_line - }; + return _toJson(this, {}, { + "line": this._L, + }); + }; + ChartGridlinesFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartGridlinesFormat; }(OfficeExtension.ClientObject)); Excel.ChartGridlinesFormat=ChartGridlinesFormat; + var _typeChartLegend="ChartLegend"; var ChartLegend=(function (_super) { __extends(ChartLegend, _super); function ChartLegend() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartLegend.prototype, "_className", { get: function () { @@ -16793,23 +19578,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartLegend.prototype, "_scalarPropertyNames", { + get: function () { + return ["visible", "position", "overlay"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartLegend.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartLegend.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartLegend.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartLegendFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartLegendFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartLegend.prototype, "overlay", { get: function () { - _throwIfNotLoaded("overlay", this.m_overlay, "ChartLegend", this._isNull); - return this.m_overlay; + _throwIfNotLoaded("overlay", this._O, _typeChartLegend, this._isNull); + return this._O; }, set: function (value) { - this.m_overlay=value; + this._O=value; _createSetPropertyAction(this.context, this, "Overlay", value); }, enumerable: true, @@ -16817,11 +19623,11 @@ var Excel; }); Object.defineProperty(ChartLegend.prototype, "position", { get: function () { - _throwIfNotLoaded("position", this.m_position, "ChartLegend", this._isNull); - return this.m_position; + _throwIfNotLoaded("position", this._P, _typeChartLegend, this._isNull); + return this._P; }, set: function (value) { - this.m_position=value; + this._P=value; _createSetPropertyAction(this.context, this, "Position", value); }, enumerable: true, @@ -16829,11 +19635,11 @@ var Excel; }); Object.defineProperty(ChartLegend.prototype, "visible", { get: function () { - _throwIfNotLoaded("visible", this.m_visible, "ChartLegend", this._isNull); - return this.m_visible; + _throwIfNotLoaded("visible", this._V, _typeChartLegend, this._isNull); + return this._V; }, set: function (value) { - this.m_visible=value; + this._V=value; _createSetPropertyAction(this.context, this, "Visible", value); }, enumerable: true, @@ -16842,6 +19648,9 @@ var Excel; ChartLegend.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["visible", "position", "overlay"], ["format"], []); }; + ChartLegend.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartLegend.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16849,35 +19658,47 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Overlay"])) { - this.m_overlay=obj["Overlay"]; + this._O=obj["Overlay"]; } if (!_isUndefined(obj["Position"])) { - this.m_position=obj["Position"]; + this._P=obj["Position"]; } if (!_isUndefined(obj["Visible"])) { - this.m_visible=obj["Visible"]; + this._V=obj["Visible"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; ChartLegend.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartLegend.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartLegend.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartLegend.prototype.toJSON=function () { - return { - "format": this.m_format, - "overlay": this.m_overlay, - "position": this.m_position, - "visible": this.m_visible - }; + return _toJson(this, { + "overlay": this._O, + "position": this._P, + "visible": this._V, + }, { + "format": this._F, + }); + }; + ChartLegend.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartLegend; }(OfficeExtension.ClientObject)); Excel.ChartLegend=ChartLegend; + var _typeChartLegendFormat="ChartLegendFormat"; var ChartLegendFormat=(function (_super) { __extends(ChartLegendFormat, _super); function ChartLegendFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartLegendFormat.prototype, "_className", { get: function () { @@ -16886,22 +19707,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartLegendFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["font", "fill"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartLegendFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartLegendFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true @@ -16911,6 +19739,9 @@ var Excel; "fill" ]); }; + ChartLegendFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartLegendFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16920,22 +19751,32 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["fill", "Fill", "font", "Font"]); }; ChartLegendFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartLegendFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartLegendFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartLegendFormat.prototype.toJSON=function () { - return { - "fill": this.m_fill, - "font": this.m_font - }; + return _toJson(this, {}, { + "font": this._Fo, + }); + }; + ChartLegendFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartLegendFormat; }(OfficeExtension.ClientObject)); Excel.ChartLegendFormat=ChartLegendFormat; + var _typeChartTitle="ChartTitle"; var ChartTitle=(function (_super) { __extends(ChartTitle, _super); function ChartTitle() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartTitle.prototype, "_className", { get: function () { @@ -16944,23 +19785,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartTitle.prototype, "_scalarPropertyNames", { + get: function () { + return ["visible", "text", "overlay"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartTitle.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartTitle.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartTitle.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartTitleFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartTitleFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartTitle.prototype, "overlay", { get: function () { - _throwIfNotLoaded("overlay", this.m_overlay, "ChartTitle", this._isNull); - return this.m_overlay; + _throwIfNotLoaded("overlay", this._O, _typeChartTitle, this._isNull); + return this._O; }, set: function (value) { - this.m_overlay=value; + this._O=value; _createSetPropertyAction(this.context, this, "Overlay", value); }, enumerable: true, @@ -16968,11 +19830,11 @@ var Excel; }); Object.defineProperty(ChartTitle.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "ChartTitle", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._T, _typeChartTitle, this._isNull); + return this._T; }, set: function (value) { - this.m_text=value; + this._T=value; _createSetPropertyAction(this.context, this, "Text", value); }, enumerable: true, @@ -16980,11 +19842,11 @@ var Excel; }); Object.defineProperty(ChartTitle.prototype, "visible", { get: function () { - _throwIfNotLoaded("visible", this.m_visible, "ChartTitle", this._isNull); - return this.m_visible; + _throwIfNotLoaded("visible", this._V, _typeChartTitle, this._isNull); + return this._V; }, set: function (value) { - this.m_visible=value; + this._V=value; _createSetPropertyAction(this.context, this, "Visible", value); }, enumerable: true, @@ -16993,6 +19855,9 @@ var Excel; ChartTitle.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["visible", "text", "overlay"], ["format"], []); }; + ChartTitle.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartTitle.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -17000,35 +19865,47 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Overlay"])) { - this.m_overlay=obj["Overlay"]; + this._O=obj["Overlay"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._T=obj["Text"]; } if (!_isUndefined(obj["Visible"])) { - this.m_visible=obj["Visible"]; + this._V=obj["Visible"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; ChartTitle.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartTitle.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartTitle.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartTitle.prototype.toJSON=function () { - return { - "format": this.m_format, - "overlay": this.m_overlay, - "text": this.m_text, - "visible": this.m_visible - }; + return _toJson(this, { + "overlay": this._O, + "text": this._T, + "visible": this._V, + }, { + "format": this._F, + }); + }; + ChartTitle.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartTitle; }(OfficeExtension.ClientObject)); Excel.ChartTitle=ChartTitle; + var _typeChartTitleFormat="ChartTitleFormat"; var ChartTitleFormat=(function (_super) { __extends(ChartTitleFormat, _super); function ChartTitleFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartTitleFormat.prototype, "_className", { get: function () { @@ -17037,22 +19914,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartTitleFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["font", "fill"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartTitleFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartTitleFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true @@ -17062,6 +19946,9 @@ var Excel; "fill" ]); }; + ChartTitleFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartTitleFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -17071,22 +19958,32 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["fill", "Fill", "font", "Font"]); }; ChartTitleFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartTitleFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartTitleFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartTitleFormat.prototype.toJSON=function () { - return { - "fill": this.m_fill, - "font": this.m_font - }; + return _toJson(this, {}, { + "font": this._Fo, + }); + }; + ChartTitleFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartTitleFormat; }(OfficeExtension.ClientObject)); Excel.ChartTitleFormat=ChartTitleFormat; + var _typeChartFill="ChartFill"; var ChartFill=(function (_super) { __extends(ChartFill, _super); function ChartFill() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartFill.prototype, "_className", { get: function () { @@ -17100,10 +19997,10 @@ var Excel; return this; }; ChartFill.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; ChartFill.prototype.setSolidColor=function (color) { - _createMethodAction(this.context, this, "SetSolidColor", 0, [color]); + _createMethodAction(this.context, this, "SetSolidColor", 0, [color], false); }; ChartFill.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17112,16 +20009,21 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); }; + ChartFill.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; ChartFill.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}); }; return ChartFill; }(OfficeExtension.ClientObject)); Excel.ChartFill=ChartFill; + var _typeChartLineFormat="ChartLineFormat"; var ChartLineFormat=(function (_super) { __extends(ChartLineFormat, _super); function ChartLineFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartLineFormat.prototype, "_className", { get: function () { @@ -17130,13 +20032,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartLineFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["color"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartLineFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartLineFormat.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "ChartLineFormat", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeChartLineFormat, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -17145,8 +20061,11 @@ var Excel; ChartLineFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["color"], [], []); }; + ChartLineFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartLineFormat.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; ChartLineFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17155,25 +20074,36 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } }; ChartLineFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartLineFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartLineFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartLineFormat.prototype.toJSON=function () { - return { - "color": this.m_color - }; + return _toJson(this, { + "color": this._C, + }, {}); + }; + ChartLineFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartLineFormat; }(OfficeExtension.ClientObject)); Excel.ChartLineFormat=ChartLineFormat; + var _typeChartFont="ChartFont"; var ChartFont=(function (_super) { __extends(ChartFont, _super); function ChartFont() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartFont.prototype, "_className", { get: function () { @@ -17182,13 +20112,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartFont.prototype, "_scalarPropertyNames", { + get: function () { + return ["bold", "color", "italic", "name", "size", "underline"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartFont.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartFont.prototype, "bold", { get: function () { - _throwIfNotLoaded("bold", this.m_bold, "ChartFont", this._isNull); - return this.m_bold; + _throwIfNotLoaded("bold", this._B, _typeChartFont, this._isNull); + return this._B; }, set: function (value) { - this.m_bold=value; + this._B=value; _createSetPropertyAction(this.context, this, "Bold", value); }, enumerable: true, @@ -17196,11 +20140,11 @@ var Excel; }); Object.defineProperty(ChartFont.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "ChartFont", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeChartFont, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -17208,11 +20152,11 @@ var Excel; }); Object.defineProperty(ChartFont.prototype, "italic", { get: function () { - _throwIfNotLoaded("italic", this.m_italic, "ChartFont", this._isNull); - return this.m_italic; + _throwIfNotLoaded("italic", this._I, _typeChartFont, this._isNull); + return this._I; }, set: function (value) { - this.m_italic=value; + this._I=value; _createSetPropertyAction(this.context, this, "Italic", value); }, enumerable: true, @@ -17220,11 +20164,11 @@ var Excel; }); Object.defineProperty(ChartFont.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "ChartFont", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeChartFont, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -17232,11 +20176,11 @@ var Excel; }); Object.defineProperty(ChartFont.prototype, "size", { get: function () { - _throwIfNotLoaded("size", this.m_size, "ChartFont", this._isNull); - return this.m_size; + _throwIfNotLoaded("size", this._S, _typeChartFont, this._isNull); + return this._S; }, set: function (value) { - this.m_size=value; + this._S=value; _createSetPropertyAction(this.context, this, "Size", value); }, enumerable: true, @@ -17244,11 +20188,11 @@ var Excel; }); Object.defineProperty(ChartFont.prototype, "underline", { get: function () { - _throwIfNotLoaded("underline", this.m_underline, "ChartFont", this._isNull); - return this.m_underline; + _throwIfNotLoaded("underline", this._U, _typeChartFont, this._isNull); + return this._U; }, set: function (value) { - this.m_underline=value; + this._U=value; _createSetPropertyAction(this.context, this, "Underline", value); }, enumerable: true, @@ -17257,6 +20201,9 @@ var Excel; ChartFont.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["bold", "color", "italic", "name", "size", "underline"], [], []); }; + ChartFont.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartFont.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -17264,45 +20211,56 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Bold"])) { - this.m_bold=obj["Bold"]; + this._B=obj["Bold"]; } if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["Italic"])) { - this.m_italic=obj["Italic"]; + this._I=obj["Italic"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Size"])) { - this.m_size=obj["Size"]; + this._S=obj["Size"]; } if (!_isUndefined(obj["Underline"])) { - this.m_underline=obj["Underline"]; + this._U=obj["Underline"]; } }; ChartFont.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartFont.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartFont.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartFont.prototype.toJSON=function () { - return { - "bold": this.m_bold, - "color": this.m_color, - "italic": this.m_italic, - "name": this.m_name, - "size": this.m_size, - "underline": this.m_underline - }; + return _toJson(this, { + "bold": this._B, + "color": this._C, + "italic": this._I, + "name": this._N, + "size": this._S, + "underline": this._U, + }, {}); + }; + ChartFont.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartFont; }(OfficeExtension.ClientObject)); Excel.ChartFont=ChartFont; + var _typeRangeSort="RangeSort"; var RangeSort=(function (_super) { __extends(RangeSort, _super); function RangeSort() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeSort.prototype, "_className", { get: function () { @@ -17312,7 +20270,7 @@ var Excel; configurable: true }); RangeSort.prototype.apply=function (fields, matchCase, hasHeaders, orientation, method) { - _createMethodAction(this.context, this, "Apply", 0, [fields, matchCase, hasHeaders, orientation, method]); + _createMethodAction(this.context, this, "Apply", 0, [fields, matchCase, hasHeaders, orientation, method], false); }; RangeSort.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17321,16 +20279,21 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); }; + RangeSort.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; RangeSort.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}); }; return RangeSort; }(OfficeExtension.ClientObject)); Excel.RangeSort=RangeSort; + var _typeTableSort="TableSort"; var TableSort=(function (_super) { __extends(TableSort, _super); function TableSort() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableSort.prototype, "_className", { get: function () { @@ -17339,38 +20302,45 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TableSort.prototype, "_scalarPropertyNames", { + get: function () { + return ["matchCase", "method", "fields"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TableSort.prototype, "fields", { get: function () { - _throwIfNotLoaded("fields", this.m_fields, "TableSort", this._isNull); - return this.m_fields; + _throwIfNotLoaded("fields", this._F, _typeTableSort, this._isNull); + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(TableSort.prototype, "matchCase", { get: function () { - _throwIfNotLoaded("matchCase", this.m_matchCase, "TableSort", this._isNull); - return this.m_matchCase; + _throwIfNotLoaded("matchCase", this._M, _typeTableSort, this._isNull); + return this._M; }, enumerable: true, configurable: true }); Object.defineProperty(TableSort.prototype, "method", { get: function () { - _throwIfNotLoaded("method", this.m_method, "TableSort", this._isNull); - return this.m_method; + _throwIfNotLoaded("method", this._Me, _typeTableSort, this._isNull); + return this._Me; }, enumerable: true, configurable: true }); TableSort.prototype.apply=function (fields, matchCase, method) { - _createMethodAction(this.context, this, "Apply", 0, [fields, matchCase, method]); + _createMethodAction(this.context, this, "Apply", 0, [fields, matchCase, method], false); }; TableSort.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; TableSort.prototype.reapply=function () { - _createMethodAction(this.context, this, "Reapply", 0, []); + _createMethodAction(this.context, this, "Reapply", 0, [], false); }; TableSort.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17379,33 +20349,44 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Fields"])) { - this.m_fields=obj["Fields"]; + this._F=obj["Fields"]; } if (!_isUndefined(obj["MatchCase"])) { - this.m_matchCase=obj["MatchCase"]; + this._M=obj["MatchCase"]; } if (!_isUndefined(obj["Method"])) { - this.m_method=obj["Method"]; + this._Me=obj["Method"]; } }; TableSort.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableSort.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableSort.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; TableSort.prototype.toJSON=function () { - return { - "fields": this.m_fields, - "matchCase": this.m_matchCase, - "method": this.m_method - }; + return _toJson(this, { + "fields": this._F, + "matchCase": this._M, + "method": this._Me, + }, {}); + }; + TableSort.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TableSort; }(OfficeExtension.ClientObject)); Excel.TableSort=TableSort; + var _typeFilter="Filter"; var Filter=(function (_super) { __extends(Filter, _super); function Filter() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Filter.prototype, "_className", { get: function () { @@ -17414,49 +20395,56 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Filter.prototype, "_scalarPropertyNames", { + get: function () { + return ["criteria"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(Filter.prototype, "criteria", { get: function () { - _throwIfNotLoaded("criteria", this.m_criteria, "Filter", this._isNull); - return this.m_criteria; + _throwIfNotLoaded("criteria", this._C, _typeFilter, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Filter.prototype.apply=function (criteria) { - _createMethodAction(this.context, this, "Apply", 0, [criteria]); + _createMethodAction(this.context, this, "Apply", 0, [criteria], false); }; Filter.prototype.applyBottomItemsFilter=function (count) { - _createMethodAction(this.context, this, "ApplyBottomItemsFilter", 0, [count]); + _createMethodAction(this.context, this, "ApplyBottomItemsFilter", 0, [count], false); }; Filter.prototype.applyBottomPercentFilter=function (percent) { - _createMethodAction(this.context, this, "ApplyBottomPercentFilter", 0, [percent]); + _createMethodAction(this.context, this, "ApplyBottomPercentFilter", 0, [percent], false); }; Filter.prototype.applyCellColorFilter=function (color) { - _createMethodAction(this.context, this, "ApplyCellColorFilter", 0, [color]); + _createMethodAction(this.context, this, "ApplyCellColorFilter", 0, [color], false); }; Filter.prototype.applyCustomFilter=function (criteria1, criteria2, oper) { - _createMethodAction(this.context, this, "ApplyCustomFilter", 0, [criteria1, criteria2, oper]); + _createMethodAction(this.context, this, "ApplyCustomFilter", 0, [criteria1, criteria2, oper], false); }; Filter.prototype.applyDynamicFilter=function (criteria) { - _createMethodAction(this.context, this, "ApplyDynamicFilter", 0, [criteria]); + _createMethodAction(this.context, this, "ApplyDynamicFilter", 0, [criteria], false); }; Filter.prototype.applyFontColorFilter=function (color) { - _createMethodAction(this.context, this, "ApplyFontColorFilter", 0, [color]); + _createMethodAction(this.context, this, "ApplyFontColorFilter", 0, [color], false); }; Filter.prototype.applyIconFilter=function (icon) { - _createMethodAction(this.context, this, "ApplyIconFilter", 0, [icon]); + _createMethodAction(this.context, this, "ApplyIconFilter", 0, [icon], false); }; Filter.prototype.applyTopItemsFilter=function (count) { - _createMethodAction(this.context, this, "ApplyTopItemsFilter", 0, [count]); + _createMethodAction(this.context, this, "ApplyTopItemsFilter", 0, [count], false); }; Filter.prototype.applyTopPercentFilter=function (percent) { - _createMethodAction(this.context, this, "ApplyTopPercentFilter", 0, [percent]); + _createMethodAction(this.context, this, "ApplyTopPercentFilter", 0, [percent], false); }; Filter.prototype.applyValuesFilter=function (values) { - _createMethodAction(this.context, this, "ApplyValuesFilter", 0, [values]); + _createMethodAction(this.context, this, "ApplyValuesFilter", 0, [values], false); }; Filter.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; Filter.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17465,25 +20453,36 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Criteria"])) { - this.m_criteria=obj["Criteria"]; + this._C=obj["Criteria"]; } }; Filter.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Filter.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Filter.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; Filter.prototype.toJSON=function () { - return { - "criteria": this.m_criteria - }; + return _toJson(this, { + "criteria": this._C, + }, {}); + }; + Filter.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Filter; }(OfficeExtension.ClientObject)); Excel.Filter=Filter; + var _typeCustomXmlPartScopedCollection="CustomXmlPartScopedCollection"; var CustomXmlPartScopedCollection=(function (_super) { __extends(CustomXmlPartScopedCollection, _super); function CustomXmlPartScopedCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CustomXmlPartScopedCollection.prototype, "_className", { get: function () { @@ -17492,16 +20491,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(CustomXmlPartScopedCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(CustomXmlPartScopedCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "CustomXmlPartScopedCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeCustomXmlPartScopedCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); CustomXmlPartScopedCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -17510,13 +20516,13 @@ var Excel; return new Excel.CustomXmlPart(this.context, _createIndexerObjectPath(this.context, this, [id])); }; CustomXmlPartScopedCollection.prototype.getItemOrNullObject=function (id) { - return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null)); + return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null, false)); }; CustomXmlPartScopedCollection.prototype.getOnlyItem=function () { - return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetOnlyItem", 1, [], false, false, null)); + return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetOnlyItem", 1, [], false, false, null, false)); }; CustomXmlPartScopedCollection.prototype.getOnlyItemOrNullObject=function () { - return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetOnlyItemOrNullObject", 1, [], false, false, null)); + return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetOnlyItemOrNullObject", 1, [], false, false, null, false)); }; CustomXmlPartScopedCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17535,19 +20541,27 @@ var Excel; } }; CustomXmlPartScopedCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CustomXmlPartScopedCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CustomXmlPartScopedCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.CustomXmlPart(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; CustomXmlPartScopedCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return CustomXmlPartScopedCollection; }(OfficeExtension.ClientObject)); Excel.CustomXmlPartScopedCollection=CustomXmlPartScopedCollection; + var _typeCustomXmlPartCollection="CustomXmlPartCollection"; var CustomXmlPartCollection=(function (_super) { __extends(CustomXmlPartCollection, _super); function CustomXmlPartCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CustomXmlPartCollection.prototype, "_className", { get: function () { @@ -17556,22 +20570,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(CustomXmlPartCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(CustomXmlPartCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "CustomXmlPartCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeCustomXmlPartCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); CustomXmlPartCollection.prototype.add=function (xml) { - return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [xml], false, true, null)); + return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [xml], false, true, null, false)); }; CustomXmlPartCollection.prototype.getByNamespace=function (namespaceUri) { - return new Excel.CustomXmlPartScopedCollection(this.context, _createMethodObjectPath(this.context, this, "GetByNamespace", 1, [namespaceUri], true, false, null)); + return new Excel.CustomXmlPartScopedCollection(this.context, _createMethodObjectPath(this.context, this, "GetByNamespace", 1, [namespaceUri], true, false, null, false)); }; CustomXmlPartCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -17580,7 +20601,7 @@ var Excel; return new Excel.CustomXmlPart(this.context, _createIndexerObjectPath(this.context, this, [id])); }; CustomXmlPartCollection.prototype.getItemOrNullObject=function (id) { - return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null)); + return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null, false)); }; CustomXmlPartCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17599,19 +20620,27 @@ var Excel; } }; CustomXmlPartCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CustomXmlPartCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CustomXmlPartCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.CustomXmlPart(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; CustomXmlPartCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return CustomXmlPartCollection; }(OfficeExtension.ClientObject)); Excel.CustomXmlPartCollection=CustomXmlPartCollection; + var _typeCustomXmlPart="CustomXmlPart"; var CustomXmlPart=(function (_super) { __extends(CustomXmlPart, _super); function CustomXmlPart() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CustomXmlPart.prototype, "_className", { get: function () { @@ -17620,33 +20649,40 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(CustomXmlPart.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "namespaceUri"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(CustomXmlPart.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "CustomXmlPart", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeCustomXmlPart, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(CustomXmlPart.prototype, "namespaceUri", { get: function () { - _throwIfNotLoaded("namespaceUri", this.m_namespaceUri, "CustomXmlPart", this._isNull); - return this.m_namespaceUri; + _throwIfNotLoaded("namespaceUri", this._N, _typeCustomXmlPart, this._isNull); + return this._N; }, enumerable: true, configurable: true }); CustomXmlPart.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; CustomXmlPart.prototype.getXml=function () { - var action=_createMethodAction(this.context, this, "GetXml", 1, []); + var action=_createMethodAction(this.context, this, "GetXml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; CustomXmlPart.prototype.setXml=function (xml) { - _createMethodAction(this.context, this, "SetXml", 0, [xml]); + _createMethodAction(this.context, this, "SetXml", 0, [xml], false); }; CustomXmlPart.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17655,15 +20691,17 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["NamespaceUri"])) { - this.m_namespaceUri=obj["NamespaceUri"]; + this._N=obj["NamespaceUri"]; } }; CustomXmlPart.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CustomXmlPart.prototype.retrieve=function (option) { + return _retrieve(this, option); }; CustomXmlPart.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -17671,22 +20709,31 @@ var Excel; return; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; + CustomXmlPart.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; CustomXmlPart.prototype.toJSON=function () { - return { - "id": this.m_id, - "namespaceUri": this.m_namespaceUri - }; + return _toJson(this, { + "id": this._I, + "namespaceUri": this._N, + }, {}); + }; + CustomXmlPart.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return CustomXmlPart; }(OfficeExtension.ClientObject)); Excel.CustomXmlPart=CustomXmlPart; + var _type_V1Api="_V1Api"; var _V1Api=(function (_super) { __extends(_V1Api, _super); function _V1Api() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(_V1Api.prototype, "_className", { get: function () { @@ -17696,109 +20743,110 @@ var Excel; configurable: true }); _V1Api.prototype.bindingAddColumns=function (input) { - var action=_createMethodAction(this.context, this, "BindingAddColumns", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingAddColumns", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingAddFromNamedItem=function (input) { - var action=_createMethodAction(this.context, this, "BindingAddFromNamedItem", 1, [input]); + var action=_createMethodAction(this.context, this, "BindingAddFromNamedItem", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingAddFromPrompt=function (input) { - var action=_createMethodAction(this.context, this, "BindingAddFromPrompt", 1, [input]); + var action=_createMethodAction(this.context, this, "BindingAddFromPrompt", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingAddFromSelection=function (input) { - var action=_createMethodAction(this.context, this, "BindingAddFromSelection", 1, [input]); + var action=_createMethodAction(this.context, this, "BindingAddFromSelection", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingAddRows=function (input) { - var action=_createMethodAction(this.context, this, "BindingAddRows", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingAddRows", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingClearFormats=function (input) { - var action=_createMethodAction(this.context, this, "BindingClearFormats", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingClearFormats", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingDeleteAllDataValues=function (input) { - var action=_createMethodAction(this.context, this, "BindingDeleteAllDataValues", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingDeleteAllDataValues", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingGetAll=function () { - var action=_createMethodAction(this.context, this, "BindingGetAll", 1, []); + var action=_createMethodAction(this.context, this, "BindingGetAll", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingGetById=function (input) { - var action=_createMethodAction(this.context, this, "BindingGetById", 1, [input]); + var action=_createMethodAction(this.context, this, "BindingGetById", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingGetData=function (input) { - var action=_createMethodAction(this.context, this, "BindingGetData", 1, [input]); + var action=_createMethodAction(this.context, this, "BindingGetData", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingReleaseById=function (input) { - var action=_createMethodAction(this.context, this, "BindingReleaseById", 1, [input]); + var action=_createMethodAction(this.context, this, "BindingReleaseById", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingSetData=function (input) { - var action=_createMethodAction(this.context, this, "BindingSetData", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingSetData", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingSetFormats=function (input) { - var action=_createMethodAction(this.context, this, "BindingSetFormats", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingSetFormats", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingSetTableOptions=function (input) { - var action=_createMethodAction(this.context, this, "BindingSetTableOptions", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingSetTableOptions", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.getFilePropertiesAsync=function () { - var action=_createMethodAction(this.context, this, "GetFilePropertiesAsync", 1, []); + _throwIfApiNotSupported("_V1Api.getFilePropertiesAsync", _defaultApiSetName, "1.6", _hostName); + var action=_createMethodAction(this.context, this, "GetFilePropertiesAsync", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.getSelectedData=function (input) { - var action=_createMethodAction(this.context, this, "GetSelectedData", 1, [input]); + var action=_createMethodAction(this.context, this, "GetSelectedData", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.gotoById=function (input) { - var action=_createMethodAction(this.context, this, "GotoById", 1, [input]); + var action=_createMethodAction(this.context, this, "GotoById", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.setSelectedData=function (input) { - var action=_createMethodAction(this.context, this, "SetSelectedData", 0, [input]); + var action=_createMethodAction(this.context, this, "SetSelectedData", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -17810,16 +20858,21 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); }; + _V1Api.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; _V1Api.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}); }; return _V1Api; }(OfficeExtension.ClientObject)); Excel._V1Api=_V1Api; + var _typePivotTableCollection="PivotTableCollection"; var PivotTableCollection=(function (_super) { __extends(PivotTableCollection, _super); function PivotTableCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(PivotTableCollection.prototype, "_className", { get: function () { @@ -17828,16 +20881,24 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(PivotTableCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(PivotTableCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "PivotTableCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typePivotTableCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); PivotTableCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("PivotTableCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -17846,10 +20907,11 @@ var Excel; return new Excel.PivotTable(this.context, _createIndexerObjectPath(this.context, this, [name])); }; PivotTableCollection.prototype.getItemOrNullObject=function (name) { - return new Excel.PivotTable(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null)); + _throwIfApiNotSupported("PivotTableCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.PivotTable(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null, false)); }; PivotTableCollection.prototype.refreshAll=function () { - _createMethodAction(this.context, this, "RefreshAll", 0, []); + _createMethodAction(this.context, this, "RefreshAll", 0, [], false); }; PivotTableCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17868,19 +20930,27 @@ var Excel; } }; PivotTableCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + PivotTableCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + PivotTableCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.PivotTable(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; PivotTableCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return PivotTableCollection; }(OfficeExtension.ClientObject)); Excel.PivotTableCollection=PivotTableCollection; + var _typePivotTable="PivotTable"; var PivotTable=(function (_super) { __extends(PivotTable, _super); function PivotTable() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(PivotTable.prototype, "_className", { get: function () { @@ -17889,31 +20959,53 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(PivotTable.prototype, "_scalarPropertyNames", { + get: function () { + return ["name", "id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PivotTable.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PivotTable.prototype, "_navigationPropertyNames", { + get: function () { + return ["worksheet"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(PivotTable.prototype, "worksheet", { get: function () { - if (!this.m_worksheet) { - this.m_worksheet=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false)); + if (!this._W) { + this._W=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false, false)); } - return this.m_worksheet; + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(PivotTable.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "PivotTable", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typePivotTable, this._isNull); + _throwIfApiNotSupported("PivotTable.id", _defaultApiSetName, "1.5", _hostName); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(PivotTable.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "PivotTable", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typePivotTable, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -17921,12 +21013,14 @@ var Excel; }); PivotTable.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["name"], [], [ - "worksheet", "worksheet" ]); }; + PivotTable.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; PivotTable.prototype.refresh=function () { - _createMethodAction(this.context, this, "Refresh", 0, []); + _createMethodAction(this.context, this, "Refresh", 0, [], false); }; PivotTable.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17935,16 +21029,18 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } _handleNavigationPropertyResults(this, obj, ["worksheet", "Worksheet"]); }; PivotTable.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + PivotTable.prototype.retrieve=function (option) { + return _retrieve(this, option); }; PivotTable.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -17952,22 +21048,31 @@ var Excel; return; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; + PivotTable.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; PivotTable.prototype.toJSON=function () { - return { - "id": this.m_id, - "name": this.m_name - }; + return _toJson(this, { + "id": this._I, + "name": this._N, + }, {}); + }; + PivotTable.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return PivotTable; }(OfficeExtension.ClientObject)); Excel.PivotTable=PivotTable; + var _typeConditionalFormatCollection="ConditionalFormatCollection"; var ConditionalFormatCollection=(function (_super) { __extends(ConditionalFormatCollection, _super); function ConditionalFormatCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalFormatCollection.prototype, "_className", { get: function () { @@ -17976,28 +21081,38 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalFormatCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalFormatCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ConditionalFormatCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeConditionalFormatCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); ConditionalFormatCollection.prototype.add=function (type) { - return new Excel.ConditionalFormat(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [type], false, true, null)); + return new Excel.ConditionalFormat(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [type], false, true, null, false)); }; ConditionalFormatCollection.prototype.clearAll=function () { - _createMethodAction(this.context, this, "ClearAll", 0, []); + _createMethodAction(this.context, this, "ClearAll", 0, [], false); }; ConditionalFormatCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; + ConditionalFormatCollection.prototype.getItem=function (id) { + return new Excel.ConditionalFormat(this.context, _createIndexerObjectPath(this.context, this, [id])); + }; ConditionalFormatCollection.prototype.getItemAt=function (index) { - return new Excel.ConditionalFormat(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.ConditionalFormat(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; ConditionalFormatCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -18009,26 +21124,34 @@ var Excel; this.m__items=[]; var _data=obj[OfficeExtension.Constants.items]; for (var i=0; i < _data.length; i++) { - var _item=new Excel.ConditionalFormat(this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(false, this.context, this, _data[i], i)); + var _item=new Excel.ConditionalFormat(this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, this.context, this, _data[i], i)); _item._handleResult(_data[i]); this.m__items.push(_item); } } }; ConditionalFormatCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalFormatCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalFormatCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.ConditionalFormat(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; ConditionalFormatCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return ConditionalFormatCollection; }(OfficeExtension.ClientObject)); Excel.ConditionalFormatCollection=ConditionalFormatCollection; + var _typeConditionalFormat="ConditionalFormat"; var ConditionalFormat=(function (_super) { __extends(ConditionalFormat, _super); function ConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalFormat.prototype, "_className", { get: function () { @@ -18037,173 +21160,202 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["stopIfTrue", "priority", "type", "id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, false, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["dataBarOrNullObject", "dataBar", "customOrNullObject", "custom", "iconSet", "iconSetOrNullObject", "colorScale", "colorScaleOrNullObject", "topBottom", "topBottomOrNullObject", "preset", "presetOrNullObject", "textComparison", "textComparisonOrNullObject", "cellValue", "cellValueOrNullObject"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalFormat.prototype, "cellValue", { get: function () { - if (!this.m_cellValue) { - this.m_cellValue=new Excel.CellValueConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CellValue", false, false)); + if (!this._C) { + this._C=new Excel.CellValueConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CellValue", false, false, false)); } - return this.m_cellValue; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "cellValueOrNullObject", { get: function () { - if (!this.m_cellValueOrNullObject) { - this.m_cellValueOrNullObject=new Excel.CellValueConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CellValueOrNullObject", false, false)); + if (!this._Ce) { + this._Ce=new Excel.CellValueConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CellValueOrNullObject", false, false, false)); } - return this.m_cellValueOrNullObject; + return this._Ce; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "colorScale", { get: function () { - if (!this.m_colorScale) { - this.m_colorScale=new Excel.ColorScaleConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "ColorScale", false, false)); + if (!this._Co) { + this._Co=new Excel.ColorScaleConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "ColorScale", false, false, false)); } - return this.m_colorScale; + return this._Co; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "colorScaleOrNullObject", { get: function () { - if (!this.m_colorScaleOrNullObject) { - this.m_colorScaleOrNullObject=new Excel.ColorScaleConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "ColorScaleOrNullObject", false, false)); + if (!this._Col) { + this._Col=new Excel.ColorScaleConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "ColorScaleOrNullObject", false, false, false)); } - return this.m_colorScaleOrNullObject; + return this._Col; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "custom", { get: function () { - if (!this.m_custom) { - this.m_custom=new Excel.CustomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "Custom", false, false)); + if (!this._Cu) { + this._Cu=new Excel.CustomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "Custom", false, false, false)); } - return this.m_custom; + return this._Cu; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "customOrNullObject", { get: function () { - if (!this.m_customOrNullObject) { - this.m_customOrNullObject=new Excel.CustomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CustomOrNullObject", false, false)); + if (!this._Cus) { + this._Cus=new Excel.CustomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CustomOrNullObject", false, false, false)); } - return this.m_customOrNullObject; + return this._Cus; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "dataBar", { get: function () { - if (!this.m_dataBar) { - this.m_dataBar=new Excel.DataBarConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "DataBar", false, false)); + if (!this._D) { + this._D=new Excel.DataBarConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "DataBar", false, false, false)); } - return this.m_dataBar; + return this._D; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "dataBarOrNullObject", { get: function () { - if (!this.m_dataBarOrNullObject) { - this.m_dataBarOrNullObject=new Excel.DataBarConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "DataBarOrNullObject", false, false)); + if (!this._Da) { + this._Da=new Excel.DataBarConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "DataBarOrNullObject", false, false, false)); } - return this.m_dataBarOrNullObject; + return this._Da; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "iconSet", { get: function () { - if (!this.m_iconSet) { - this.m_iconSet=new Excel.IconSetConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "IconSet", false, false)); + if (!this._I) { + this._I=new Excel.IconSetConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "IconSet", false, false, false)); } - return this.m_iconSet; + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "iconSetOrNullObject", { get: function () { - if (!this.m_iconSetOrNullObject) { - this.m_iconSetOrNullObject=new Excel.IconSetConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "IconSetOrNullObject", false, false)); + if (!this._Ic) { + this._Ic=new Excel.IconSetConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "IconSetOrNullObject", false, false, false)); } - return this.m_iconSetOrNullObject; + return this._Ic; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "preset", { get: function () { - if (!this.m_preset) { - this.m_preset=new Excel.PresetCriteriaConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "Preset", false, false)); + if (!this._P) { + this._P=new Excel.PresetCriteriaConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "Preset", false, false, false)); } - return this.m_preset; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "presetOrNullObject", { get: function () { - if (!this.m_presetOrNullObject) { - this.m_presetOrNullObject=new Excel.PresetCriteriaConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "PresetOrNullObject", false, false)); + if (!this._Pr) { + this._Pr=new Excel.PresetCriteriaConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "PresetOrNullObject", false, false, false)); } - return this.m_presetOrNullObject; + return this._Pr; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "textComparison", { get: function () { - if (!this.m_textComparison) { - this.m_textComparison=new Excel.TextConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TextComparison", false, false)); + if (!this._T) { + this._T=new Excel.TextConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TextComparison", false, false, false)); } - return this.m_textComparison; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "textComparisonOrNullObject", { get: function () { - if (!this.m_textComparisonOrNullObject) { - this.m_textComparisonOrNullObject=new Excel.TextConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TextComparisonOrNullObject", false, false)); + if (!this._Te) { + this._Te=new Excel.TextConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TextComparisonOrNullObject", false, false, false)); } - return this.m_textComparisonOrNullObject; + return this._Te; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "topBottom", { get: function () { - if (!this.m_topBottom) { - this.m_topBottom=new Excel.TopBottomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TopBottom", false, false)); + if (!this._To) { + this._To=new Excel.TopBottomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TopBottom", false, false, false)); } - return this.m_topBottom; + return this._To; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "topBottomOrNullObject", { get: function () { - if (!this.m_topBottomOrNullObject) { - this.m_topBottomOrNullObject=new Excel.TopBottomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TopBottomOrNullObject", false, false)); + if (!this._Top) { + this._Top=new Excel.TopBottomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TopBottomOrNullObject", false, false, false)); } - return this.m_topBottomOrNullObject; + return this._Top; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._Id0, _typeConditionalFormat, this._isNull); + return this._Id0; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "priority", { get: function () { - _throwIfNotLoaded("priority", this.m_priority, "ConditionalFormat", this._isNull); - return this.m_priority; + _throwIfNotLoaded("priority", this._Pri, _typeConditionalFormat, this._isNull); + return this._Pri; }, set: function (value) { - this.m_priority=value; + this._Pri=value; _createSetPropertyAction(this.context, this, "Priority", value); }, enumerable: true, @@ -18211,11 +21363,11 @@ var Excel; }); Object.defineProperty(ConditionalFormat.prototype, "stopIfTrue", { get: function () { - _throwIfNotLoaded("stopIfTrue", this.m_stopIfTrue, "ConditionalFormat", this._isNull); - return this.m_stopIfTrue; + _throwIfNotLoaded("stopIfTrue", this._S, _typeConditionalFormat, this._isNull); + return this._S; }, set: function (value) { - this.m_stopIfTrue=value; + this._S=value; _createSetPropertyAction(this.context, this, "StopIfTrue", value); }, enumerable: true, @@ -18223,8 +21375,8 @@ var Excel; }); Object.defineProperty(ConditionalFormat.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "ConditionalFormat", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._Ty, _typeConditionalFormat, this._isNull); + return this._Ty; }, enumerable: true, configurable: true @@ -18232,14 +21384,17 @@ var Excel; ConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["stopIfTrue", "priority"], ["dataBarOrNullObject", "dataBar", "customOrNullObject", "custom", "iconSet", "iconSetOrNullObject", "colorScale", "colorScaleOrNullObject", "topBottom", "topBottomOrNullObject", "preset", "presetOrNullObject", "textComparison", "textComparisonOrNullObject", "cellValue", "cellValueOrNullObject"], []); }; + ConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalFormat.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; ConditionalFormat.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); }; ConditionalFormat.prototype.getRangeOrNullObject=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRangeOrNullObject", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRangeOrNullObject", 1, [], false, true, null, false)); }; ConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -18247,51 +21402,76 @@ var Excel; return; var obj=value; _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._Id0=obj["Id"]; + } if (!_isUndefined(obj["Priority"])) { - this.m_priority=obj["Priority"]; + this._Pri=obj["Priority"]; } if (!_isUndefined(obj["StopIfTrue"])) { - this.m_stopIfTrue=obj["StopIfTrue"]; + this._S=obj["StopIfTrue"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._Ty=obj["Type"]; } _handleNavigationPropertyResults(this, obj, ["cellValue", "CellValue", "cellValueOrNullObject", "CellValueOrNullObject", "colorScale", "ColorScale", "colorScaleOrNullObject", "ColorScaleOrNullObject", "custom", "Custom", "customOrNullObject", "CustomOrNullObject", "dataBar", "DataBar", "dataBarOrNullObject", "DataBarOrNullObject", "iconSet", "IconSet", "iconSetOrNullObject", "IconSetOrNullObject", "preset", "Preset", "presetOrNullObject", "PresetOrNullObject", "textComparison", "TextComparison", "textComparisonOrNullObject", "TextComparisonOrNullObject", "topBottom", "TopBottom", "topBottomOrNullObject", "TopBottomOrNullObject"]); }; ConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalFormat.prototype._handleIdResult=function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._Id0=value["Id"]; + } + }; + ConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalFormat.prototype.toJSON=function () { - return { - "cellValue": this.m_cellValue, - "cellValueOrNullObject": this.m_cellValueOrNullObject, - "colorScale": this.m_colorScale, - "colorScaleOrNullObject": this.m_colorScaleOrNullObject, - "custom": this.m_custom, - "customOrNullObject": this.m_customOrNullObject, - "dataBar": this.m_dataBar, - "dataBarOrNullObject": this.m_dataBarOrNullObject, - "iconSet": this.m_iconSet, - "iconSetOrNullObject": this.m_iconSetOrNullObject, - "preset": this.m_preset, - "presetOrNullObject": this.m_presetOrNullObject, - "priority": this.m_priority, - "stopIfTrue": this.m_stopIfTrue, - "textComparison": this.m_textComparison, - "textComparisonOrNullObject": this.m_textComparisonOrNullObject, - "topBottom": this.m_topBottom, - "topBottomOrNullObject": this.m_topBottomOrNullObject, - "type": this.m_type - }; + return _toJson(this, { + "id": this._Id0, + "priority": this._Pri, + "stopIfTrue": this._S, + "type": this._Ty, + }, { + "cellValue": this._C, + "cellValueOrNullObject": this._Ce, + "colorScale": this._Co, + "colorScaleOrNullObject": this._Col, + "custom": this._Cu, + "customOrNullObject": this._Cus, + "dataBar": this._D, + "dataBarOrNullObject": this._Da, + "iconSet": this._I, + "iconSetOrNullObject": this._Ic, + "preset": this._P, + "presetOrNullObject": this._Pr, + "textComparison": this._T, + "textComparisonOrNullObject": this._Te, + "topBottom": this._To, + "topBottomOrNullObject": this._Top, + }); + }; + ConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalFormat; }(OfficeExtension.ClientObject)); Excel.ConditionalFormat=ConditionalFormat; + var _typeDataBarConditionalFormat="DataBarConditionalFormat"; var DataBarConditionalFormat=(function (_super) { __extends(DataBarConditionalFormat, _super); function DataBarConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(DataBarConditionalFormat.prototype, "_className", { get: function () { @@ -18300,33 +21480,54 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(DataBarConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["showDataBarOnly", "barDirection", "axisFormat", "axisColor", "lowerBoundRule", "upperBoundRule"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DataBarConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DataBarConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["positiveFormat", "negativeFormat"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(DataBarConditionalFormat.prototype, "negativeFormat", { get: function () { - if (!this.m_negativeFormat) { - this.m_negativeFormat=new Excel.ConditionalDataBarNegativeFormat(this.context, _createPropertyObjectPath(this.context, this, "NegativeFormat", false, false)); + if (!this._N) { + this._N=new Excel.ConditionalDataBarNegativeFormat(this.context, _createPropertyObjectPath(this.context, this, "NegativeFormat", false, false, false)); } - return this.m_negativeFormat; + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(DataBarConditionalFormat.prototype, "positiveFormat", { get: function () { - if (!this.m_positiveFormat) { - this.m_positiveFormat=new Excel.ConditionalDataBarPositiveFormat(this.context, _createPropertyObjectPath(this.context, this, "PositiveFormat", false, false)); + if (!this._P) { + this._P=new Excel.ConditionalDataBarPositiveFormat(this.context, _createPropertyObjectPath(this.context, this, "PositiveFormat", false, false, false)); } - return this.m_positiveFormat; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(DataBarConditionalFormat.prototype, "axisColor", { get: function () { - _throwIfNotLoaded("axisColor", this.m_axisColor, "DataBarConditionalFormat", this._isNull); - return this.m_axisColor; + _throwIfNotLoaded("axisColor", this._A, _typeDataBarConditionalFormat, this._isNull); + return this._A; }, set: function (value) { - this.m_axisColor=value; + this._A=value; _createSetPropertyAction(this.context, this, "AxisColor", value); }, enumerable: true, @@ -18334,11 +21535,11 @@ var Excel; }); Object.defineProperty(DataBarConditionalFormat.prototype, "axisFormat", { get: function () { - _throwIfNotLoaded("axisFormat", this.m_axisFormat, "DataBarConditionalFormat", this._isNull); - return this.m_axisFormat; + _throwIfNotLoaded("axisFormat", this._Ax, _typeDataBarConditionalFormat, this._isNull); + return this._Ax; }, set: function (value) { - this.m_axisFormat=value; + this._Ax=value; _createSetPropertyAction(this.context, this, "AxisFormat", value); }, enumerable: true, @@ -18346,11 +21547,11 @@ var Excel; }); Object.defineProperty(DataBarConditionalFormat.prototype, "barDirection", { get: function () { - _throwIfNotLoaded("barDirection", this.m_barDirection, "DataBarConditionalFormat", this._isNull); - return this.m_barDirection; + _throwIfNotLoaded("barDirection", this._B, _typeDataBarConditionalFormat, this._isNull); + return this._B; }, set: function (value) { - this.m_barDirection=value; + this._B=value; _createSetPropertyAction(this.context, this, "BarDirection", value); }, enumerable: true, @@ -18358,11 +21559,11 @@ var Excel; }); Object.defineProperty(DataBarConditionalFormat.prototype, "lowerBoundRule", { get: function () { - _throwIfNotLoaded("lowerBoundRule", this.m_lowerBoundRule, "DataBarConditionalFormat", this._isNull); - return this.m_lowerBoundRule; + _throwIfNotLoaded("lowerBoundRule", this._L, _typeDataBarConditionalFormat, this._isNull); + return this._L; }, set: function (value) { - this.m_lowerBoundRule=value; + this._L=value; _createSetPropertyAction(this.context, this, "LowerBoundRule", value); }, enumerable: true, @@ -18370,11 +21571,11 @@ var Excel; }); Object.defineProperty(DataBarConditionalFormat.prototype, "showDataBarOnly", { get: function () { - _throwIfNotLoaded("showDataBarOnly", this.m_showDataBarOnly, "DataBarConditionalFormat", this._isNull); - return this.m_showDataBarOnly; + _throwIfNotLoaded("showDataBarOnly", this._S, _typeDataBarConditionalFormat, this._isNull); + return this._S; }, set: function (value) { - this.m_showDataBarOnly=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShowDataBarOnly", value); }, enumerable: true, @@ -18382,11 +21583,11 @@ var Excel; }); Object.defineProperty(DataBarConditionalFormat.prototype, "upperBoundRule", { get: function () { - _throwIfNotLoaded("upperBoundRule", this.m_upperBoundRule, "DataBarConditionalFormat", this._isNull); - return this.m_upperBoundRule; + _throwIfNotLoaded("upperBoundRule", this._U, _typeDataBarConditionalFormat, this._isNull); + return this._U; }, set: function (value) { - this.m_upperBoundRule=value; + this._U=value; _createSetPropertyAction(this.context, this, "UpperBoundRule", value); }, enumerable: true, @@ -18395,6 +21596,9 @@ var Excel; DataBarConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["showDataBarOnly", "barDirection", "axisFormat", "axisColor", "lowerBoundRule", "upperBoundRule"], ["positiveFormat", "negativeFormat"], []); }; + DataBarConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; DataBarConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18402,48 +21606,60 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["AxisColor"])) { - this.m_axisColor=obj["AxisColor"]; + this._A=obj["AxisColor"]; } if (!_isUndefined(obj["AxisFormat"])) { - this.m_axisFormat=obj["AxisFormat"]; + this._Ax=obj["AxisFormat"]; } if (!_isUndefined(obj["BarDirection"])) { - this.m_barDirection=obj["BarDirection"]; + this._B=obj["BarDirection"]; } if (!_isUndefined(obj["LowerBoundRule"])) { - this.m_lowerBoundRule=obj["LowerBoundRule"]; + this._L=obj["LowerBoundRule"]; } if (!_isUndefined(obj["ShowDataBarOnly"])) { - this.m_showDataBarOnly=obj["ShowDataBarOnly"]; + this._S=obj["ShowDataBarOnly"]; } if (!_isUndefined(obj["UpperBoundRule"])) { - this.m_upperBoundRule=obj["UpperBoundRule"]; + this._U=obj["UpperBoundRule"]; } _handleNavigationPropertyResults(this, obj, ["negativeFormat", "NegativeFormat", "positiveFormat", "PositiveFormat"]); }; DataBarConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + DataBarConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + DataBarConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; DataBarConditionalFormat.prototype.toJSON=function () { - return { - "axisColor": this.m_axisColor, - "axisFormat": this.m_axisFormat, - "barDirection": this.m_barDirection, - "lowerBoundRule": this.m_lowerBoundRule, - "negativeFormat": this.m_negativeFormat, - "positiveFormat": this.m_positiveFormat, - "showDataBarOnly": this.m_showDataBarOnly, - "upperBoundRule": this.m_upperBoundRule - }; + return _toJson(this, { + "axisColor": this._A, + "axisFormat": this._Ax, + "barDirection": this._B, + "lowerBoundRule": this._L, + "showDataBarOnly": this._S, + "upperBoundRule": this._U, + }, { + "negativeFormat": this._N, + "positiveFormat": this._P, + }); + }; + DataBarConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return DataBarConditionalFormat; }(OfficeExtension.ClientObject)); Excel.DataBarConditionalFormat=DataBarConditionalFormat; + var _typeConditionalDataBarPositiveFormat="ConditionalDataBarPositiveFormat"; var ConditionalDataBarPositiveFormat=(function (_super) { __extends(ConditionalDataBarPositiveFormat, _super); function ConditionalDataBarPositiveFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "_className", { get: function () { @@ -18452,13 +21668,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["fillColor", "gradientFill", "borderColor"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "borderColor", { get: function () { - _throwIfNotLoaded("borderColor", this.m_borderColor, "ConditionalDataBarPositiveFormat", this._isNull); - return this.m_borderColor; + _throwIfNotLoaded("borderColor", this._B, _typeConditionalDataBarPositiveFormat, this._isNull); + return this._B; }, set: function (value) { - this.m_borderColor=value; + this._B=value; _createSetPropertyAction(this.context, this, "BorderColor", value); }, enumerable: true, @@ -18466,11 +21696,11 @@ var Excel; }); Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "fillColor", { get: function () { - _throwIfNotLoaded("fillColor", this.m_fillColor, "ConditionalDataBarPositiveFormat", this._isNull); - return this.m_fillColor; + _throwIfNotLoaded("fillColor", this._F, _typeConditionalDataBarPositiveFormat, this._isNull); + return this._F; }, set: function (value) { - this.m_fillColor=value; + this._F=value; _createSetPropertyAction(this.context, this, "FillColor", value); }, enumerable: true, @@ -18478,11 +21708,11 @@ var Excel; }); Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "gradientFill", { get: function () { - _throwIfNotLoaded("gradientFill", this.m_gradientFill, "ConditionalDataBarPositiveFormat", this._isNull); - return this.m_gradientFill; + _throwIfNotLoaded("gradientFill", this._G, _typeConditionalDataBarPositiveFormat, this._isNull); + return this._G; }, set: function (value) { - this.m_gradientFill=value; + this._G=value; _createSetPropertyAction(this.context, this, "GradientFill", value); }, enumerable: true, @@ -18491,6 +21721,9 @@ var Excel; ConditionalDataBarPositiveFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["fillColor", "gradientFill", "borderColor"], [], []); }; + ConditionalDataBarPositiveFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalDataBarPositiveFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18498,33 +21731,44 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["BorderColor"])) { - this.m_borderColor=obj["BorderColor"]; + this._B=obj["BorderColor"]; } if (!_isUndefined(obj["FillColor"])) { - this.m_fillColor=obj["FillColor"]; + this._F=obj["FillColor"]; } if (!_isUndefined(obj["GradientFill"])) { - this.m_gradientFill=obj["GradientFill"]; + this._G=obj["GradientFill"]; } }; ConditionalDataBarPositiveFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalDataBarPositiveFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalDataBarPositiveFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalDataBarPositiveFormat.prototype.toJSON=function () { - return { - "borderColor": this.m_borderColor, - "fillColor": this.m_fillColor, - "gradientFill": this.m_gradientFill - }; + return _toJson(this, { + "borderColor": this._B, + "fillColor": this._F, + "gradientFill": this._G, + }, {}); + }; + ConditionalDataBarPositiveFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalDataBarPositiveFormat; }(OfficeExtension.ClientObject)); Excel.ConditionalDataBarPositiveFormat=ConditionalDataBarPositiveFormat; + var _typeConditionalDataBarNegativeFormat="ConditionalDataBarNegativeFormat"; var ConditionalDataBarNegativeFormat=(function (_super) { __extends(ConditionalDataBarNegativeFormat, _super); function ConditionalDataBarNegativeFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "_className", { get: function () { @@ -18533,13 +21777,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["fillColor", "matchPositiveFillColor", "borderColor", "matchPositiveBorderColor"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "borderColor", { get: function () { - _throwIfNotLoaded("borderColor", this.m_borderColor, "ConditionalDataBarNegativeFormat", this._isNull); - return this.m_borderColor; + _throwIfNotLoaded("borderColor", this._B, _typeConditionalDataBarNegativeFormat, this._isNull); + return this._B; }, set: function (value) { - this.m_borderColor=value; + this._B=value; _createSetPropertyAction(this.context, this, "BorderColor", value); }, enumerable: true, @@ -18547,11 +21805,11 @@ var Excel; }); Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "fillColor", { get: function () { - _throwIfNotLoaded("fillColor", this.m_fillColor, "ConditionalDataBarNegativeFormat", this._isNull); - return this.m_fillColor; + _throwIfNotLoaded("fillColor", this._F, _typeConditionalDataBarNegativeFormat, this._isNull); + return this._F; }, set: function (value) { - this.m_fillColor=value; + this._F=value; _createSetPropertyAction(this.context, this, "FillColor", value); }, enumerable: true, @@ -18559,11 +21817,11 @@ var Excel; }); Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "matchPositiveBorderColor", { get: function () { - _throwIfNotLoaded("matchPositiveBorderColor", this.m_matchPositiveBorderColor, "ConditionalDataBarNegativeFormat", this._isNull); - return this.m_matchPositiveBorderColor; + _throwIfNotLoaded("matchPositiveBorderColor", this._M, _typeConditionalDataBarNegativeFormat, this._isNull); + return this._M; }, set: function (value) { - this.m_matchPositiveBorderColor=value; + this._M=value; _createSetPropertyAction(this.context, this, "MatchPositiveBorderColor", value); }, enumerable: true, @@ -18571,11 +21829,11 @@ var Excel; }); Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "matchPositiveFillColor", { get: function () { - _throwIfNotLoaded("matchPositiveFillColor", this.m_matchPositiveFillColor, "ConditionalDataBarNegativeFormat", this._isNull); - return this.m_matchPositiveFillColor; + _throwIfNotLoaded("matchPositiveFillColor", this._Ma, _typeConditionalDataBarNegativeFormat, this._isNull); + return this._Ma; }, set: function (value) { - this.m_matchPositiveFillColor=value; + this._Ma=value; _createSetPropertyAction(this.context, this, "MatchPositiveFillColor", value); }, enumerable: true, @@ -18584,6 +21842,9 @@ var Excel; ConditionalDataBarNegativeFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["fillColor", "matchPositiveFillColor", "borderColor", "matchPositiveBorderColor"], [], []); }; + ConditionalDataBarNegativeFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalDataBarNegativeFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18591,37 +21852,48 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["BorderColor"])) { - this.m_borderColor=obj["BorderColor"]; + this._B=obj["BorderColor"]; } if (!_isUndefined(obj["FillColor"])) { - this.m_fillColor=obj["FillColor"]; + this._F=obj["FillColor"]; } if (!_isUndefined(obj["MatchPositiveBorderColor"])) { - this.m_matchPositiveBorderColor=obj["MatchPositiveBorderColor"]; + this._M=obj["MatchPositiveBorderColor"]; } if (!_isUndefined(obj["MatchPositiveFillColor"])) { - this.m_matchPositiveFillColor=obj["MatchPositiveFillColor"]; + this._Ma=obj["MatchPositiveFillColor"]; } }; ConditionalDataBarNegativeFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalDataBarNegativeFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalDataBarNegativeFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalDataBarNegativeFormat.prototype.toJSON=function () { - return { - "borderColor": this.m_borderColor, - "fillColor": this.m_fillColor, - "matchPositiveBorderColor": this.m_matchPositiveBorderColor, - "matchPositiveFillColor": this.m_matchPositiveFillColor - }; + return _toJson(this, { + "borderColor": this._B, + "fillColor": this._F, + "matchPositiveBorderColor": this._M, + "matchPositiveFillColor": this._Ma, + }, {}); + }; + ConditionalDataBarNegativeFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalDataBarNegativeFormat; }(OfficeExtension.ClientObject)); Excel.ConditionalDataBarNegativeFormat=ConditionalDataBarNegativeFormat; + var _typeCustomConditionalFormat="CustomConditionalFormat"; var CustomConditionalFormat=(function (_super) { __extends(CustomConditionalFormat, _super); function CustomConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CustomConditionalFormat.prototype, "_className", { get: function () { @@ -18630,22 +21902,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(CustomConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["rule", "format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(CustomConditionalFormat.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(CustomConditionalFormat.prototype, "rule", { get: function () { - if (!this.m_rule) { - this.m_rule=new Excel.ConditionalFormatRule(this.context, _createPropertyObjectPath(this.context, this, "Rule", false, false)); + if (!this._R) { + this._R=new Excel.ConditionalFormatRule(this.context, _createPropertyObjectPath(this.context, this, "Rule", false, false, false)); } - return this.m_rule; + return this._R; }, enumerable: true, configurable: true @@ -18653,6 +21932,9 @@ var Excel; CustomConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, [], ["rule", "format"], []); }; + CustomConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; CustomConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18662,22 +21944,33 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["format", "Format", "rule", "Rule"]); }; CustomConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CustomConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CustomConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; CustomConditionalFormat.prototype.toJSON=function () { - return { - "format": this.m_format, - "rule": this.m_rule - }; + return _toJson(this, {}, { + "format": this._F, + "rule": this._R, + }); + }; + CustomConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return CustomConditionalFormat; }(OfficeExtension.ClientObject)); Excel.CustomConditionalFormat=CustomConditionalFormat; + var _typeConditionalFormatRule="ConditionalFormatRule"; var ConditionalFormatRule=(function (_super) { __extends(ConditionalFormatRule, _super); function ConditionalFormatRule() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalFormatRule.prototype, "_className", { get: function () { @@ -18686,13 +21979,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalFormatRule.prototype, "_scalarPropertyNames", { + get: function () { + return ["formula", "formulaLocal", "formulaR1C1"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormatRule.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalFormatRule.prototype, "formula", { get: function () { - _throwIfNotLoaded("formula", this.m_formula, "ConditionalFormatRule", this._isNull); - return this.m_formula; + _throwIfNotLoaded("formula", this._F, _typeConditionalFormatRule, this._isNull); + return this._F; }, set: function (value) { - this.m_formula=value; + this._F=value; _createSetPropertyAction(this.context, this, "Formula", value); }, enumerable: true, @@ -18700,11 +22007,11 @@ var Excel; }); Object.defineProperty(ConditionalFormatRule.prototype, "formulaLocal", { get: function () { - _throwIfNotLoaded("formulaLocal", this.m_formulaLocal, "ConditionalFormatRule", this._isNull); - return this.m_formulaLocal; + _throwIfNotLoaded("formulaLocal", this._Fo, _typeConditionalFormatRule, this._isNull); + return this._Fo; }, set: function (value) { - this.m_formulaLocal=value; + this._Fo=value; _createSetPropertyAction(this.context, this, "FormulaLocal", value); }, enumerable: true, @@ -18712,11 +22019,11 @@ var Excel; }); Object.defineProperty(ConditionalFormatRule.prototype, "formulaR1C1", { get: function () { - _throwIfNotLoaded("formulaR1C1", this.m_formulaR1C1, "ConditionalFormatRule", this._isNull); - return this.m_formulaR1C1; + _throwIfNotLoaded("formulaR1C1", this._For, _typeConditionalFormatRule, this._isNull); + return this._For; }, set: function (value) { - this.m_formulaR1C1=value; + this._For=value; _createSetPropertyAction(this.context, this, "FormulaR1C1", value); }, enumerable: true, @@ -18725,6 +22032,9 @@ var Excel; ConditionalFormatRule.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["formula", "formulaLocal", "formulaR1C1"], [], []); }; + ConditionalFormatRule.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalFormatRule.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18732,33 +22042,44 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Formula"])) { - this.m_formula=obj["Formula"]; + this._F=obj["Formula"]; } if (!_isUndefined(obj["FormulaLocal"])) { - this.m_formulaLocal=obj["FormulaLocal"]; + this._Fo=obj["FormulaLocal"]; } if (!_isUndefined(obj["FormulaR1C1"])) { - this.m_formulaR1C1=obj["FormulaR1C1"]; + this._For=obj["FormulaR1C1"]; } }; ConditionalFormatRule.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalFormatRule.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalFormatRule.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalFormatRule.prototype.toJSON=function () { - return { - "formula": this.m_formula, - "formulaLocal": this.m_formulaLocal, - "formulaR1C1": this.m_formulaR1C1 - }; + return _toJson(this, { + "formula": this._F, + "formulaLocal": this._Fo, + "formulaR1C1": this._For, + }, {}); + }; + ConditionalFormatRule.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalFormatRule; }(OfficeExtension.ClientObject)); Excel.ConditionalFormatRule=ConditionalFormatRule; + var _typeIconSetConditionalFormat="IconSetConditionalFormat"; var IconSetConditionalFormat=(function (_super) { __extends(IconSetConditionalFormat, _super); function IconSetConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(IconSetConditionalFormat.prototype, "_className", { get: function () { @@ -18767,13 +22088,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(IconSetConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["reverseIconOrder", "showIconOnly", "style", "criteria"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(IconSetConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(IconSetConditionalFormat.prototype, "criteria", { get: function () { - _throwIfNotLoaded("criteria", this.m_criteria, "IconSetConditionalFormat", this._isNull); - return this.m_criteria; + _throwIfNotLoaded("criteria", this._C, _typeIconSetConditionalFormat, this._isNull); + return this._C; }, set: function (value) { - this.m_criteria=value; + this._C=value; _createSetPropertyAction(this.context, this, "Criteria", value); }, enumerable: true, @@ -18781,11 +22116,11 @@ var Excel; }); Object.defineProperty(IconSetConditionalFormat.prototype, "reverseIconOrder", { get: function () { - _throwIfNotLoaded("reverseIconOrder", this.m_reverseIconOrder, "IconSetConditionalFormat", this._isNull); - return this.m_reverseIconOrder; + _throwIfNotLoaded("reverseIconOrder", this._R, _typeIconSetConditionalFormat, this._isNull); + return this._R; }, set: function (value) { - this.m_reverseIconOrder=value; + this._R=value; _createSetPropertyAction(this.context, this, "ReverseIconOrder", value); }, enumerable: true, @@ -18793,11 +22128,11 @@ var Excel; }); Object.defineProperty(IconSetConditionalFormat.prototype, "showIconOnly", { get: function () { - _throwIfNotLoaded("showIconOnly", this.m_showIconOnly, "IconSetConditionalFormat", this._isNull); - return this.m_showIconOnly; + _throwIfNotLoaded("showIconOnly", this._S, _typeIconSetConditionalFormat, this._isNull); + return this._S; }, set: function (value) { - this.m_showIconOnly=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShowIconOnly", value); }, enumerable: true, @@ -18805,11 +22140,11 @@ var Excel; }); Object.defineProperty(IconSetConditionalFormat.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "IconSetConditionalFormat", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._St, _typeIconSetConditionalFormat, this._isNull); + return this._St; }, set: function (value) { - this.m_style=value; + this._St=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -18818,6 +22153,9 @@ var Excel; IconSetConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["reverseIconOrder", "showIconOnly", "style", "criteria"], [], []); }; + IconSetConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; IconSetConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18825,37 +22163,48 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Criteria"])) { - this.m_criteria=obj["Criteria"]; + this._C=obj["Criteria"]; } if (!_isUndefined(obj["ReverseIconOrder"])) { - this.m_reverseIconOrder=obj["ReverseIconOrder"]; + this._R=obj["ReverseIconOrder"]; } if (!_isUndefined(obj["ShowIconOnly"])) { - this.m_showIconOnly=obj["ShowIconOnly"]; + this._S=obj["ShowIconOnly"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._St=obj["Style"]; } }; IconSetConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + IconSetConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + IconSetConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; IconSetConditionalFormat.prototype.toJSON=function () { - return { - "criteria": this.m_criteria, - "reverseIconOrder": this.m_reverseIconOrder, - "showIconOnly": this.m_showIconOnly, - "style": this.m_style - }; + return _toJson(this, { + "criteria": this._C, + "reverseIconOrder": this._R, + "showIconOnly": this._S, + "style": this._St, + }, {}); + }; + IconSetConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return IconSetConditionalFormat; }(OfficeExtension.ClientObject)); Excel.IconSetConditionalFormat=IconSetConditionalFormat; + var _typeColorScaleConditionalFormat="ColorScaleConditionalFormat"; var ColorScaleConditionalFormat=(function (_super) { __extends(ColorScaleConditionalFormat, _super); function ColorScaleConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ColorScaleConditionalFormat.prototype, "_className", { get: function () { @@ -18864,13 +22213,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ColorScaleConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["threeColorScale", "criteria"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ColorScaleConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ColorScaleConditionalFormat.prototype, "criteria", { get: function () { - _throwIfNotLoaded("criteria", this.m_criteria, "ColorScaleConditionalFormat", this._isNull); - return this.m_criteria; + _throwIfNotLoaded("criteria", this._C, _typeColorScaleConditionalFormat, this._isNull); + return this._C; }, set: function (value) { - this.m_criteria=value; + this._C=value; _createSetPropertyAction(this.context, this, "Criteria", value); }, enumerable: true, @@ -18878,8 +22241,8 @@ var Excel; }); Object.defineProperty(ColorScaleConditionalFormat.prototype, "threeColorScale", { get: function () { - _throwIfNotLoaded("threeColorScale", this.m_threeColorScale, "ColorScaleConditionalFormat", this._isNull); - return this.m_threeColorScale; + _throwIfNotLoaded("threeColorScale", this._T, _typeColorScaleConditionalFormat, this._isNull); + return this._T; }, enumerable: true, configurable: true @@ -18887,6 +22250,9 @@ var Excel; ColorScaleConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["criteria"], [], []); }; + ColorScaleConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ColorScaleConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18894,29 +22260,40 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Criteria"])) { - this.m_criteria=obj["Criteria"]; + this._C=obj["Criteria"]; } if (!_isUndefined(obj["ThreeColorScale"])) { - this.m_threeColorScale=obj["ThreeColorScale"]; + this._T=obj["ThreeColorScale"]; } }; ColorScaleConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ColorScaleConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ColorScaleConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ColorScaleConditionalFormat.prototype.toJSON=function () { - return { - "criteria": this.m_criteria, - "threeColorScale": this.m_threeColorScale - }; + return _toJson(this, { + "criteria": this._C, + "threeColorScale": this._T, + }, {}); + }; + ColorScaleConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ColorScaleConditionalFormat; }(OfficeExtension.ClientObject)); Excel.ColorScaleConditionalFormat=ColorScaleConditionalFormat; + var _typeTopBottomConditionalFormat="TopBottomConditionalFormat"; var TopBottomConditionalFormat=(function (_super) { __extends(TopBottomConditionalFormat, _super); function TopBottomConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TopBottomConditionalFormat.prototype, "_className", { get: function () { @@ -18925,23 +22302,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TopBottomConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["rule"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TopBottomConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TopBottomConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TopBottomConditionalFormat.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(TopBottomConditionalFormat.prototype, "rule", { get: function () { - _throwIfNotLoaded("rule", this.m_rule, "TopBottomConditionalFormat", this._isNull); - return this.m_rule; + _throwIfNotLoaded("rule", this._R, _typeTopBottomConditionalFormat, this._isNull); + return this._R; }, set: function (value) { - this.m_rule=value; + this._R=value; _createSetPropertyAction(this.context, this, "Rule", value); }, enumerable: true, @@ -18950,6 +22348,9 @@ var Excel; TopBottomConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["rule"], ["format"], []); }; + TopBottomConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; TopBottomConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18957,27 +22358,39 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Rule"])) { - this.m_rule=obj["Rule"]; + this._R=obj["Rule"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; TopBottomConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TopBottomConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TopBottomConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; TopBottomConditionalFormat.prototype.toJSON=function () { - return { - "format": this.m_format, - "rule": this.m_rule - }; + return _toJson(this, { + "rule": this._R, + }, { + "format": this._F, + }); + }; + TopBottomConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TopBottomConditionalFormat; }(OfficeExtension.ClientObject)); Excel.TopBottomConditionalFormat=TopBottomConditionalFormat; + var _typePresetCriteriaConditionalFormat="PresetCriteriaConditionalFormat"; var PresetCriteriaConditionalFormat=(function (_super) { __extends(PresetCriteriaConditionalFormat, _super); function PresetCriteriaConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "_className", { get: function () { @@ -18986,23 +22399,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["rule"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "rule", { get: function () { - _throwIfNotLoaded("rule", this.m_rule, "PresetCriteriaConditionalFormat", this._isNull); - return this.m_rule; + _throwIfNotLoaded("rule", this._R, _typePresetCriteriaConditionalFormat, this._isNull); + return this._R; }, set: function (value) { - this.m_rule=value; + this._R=value; _createSetPropertyAction(this.context, this, "Rule", value); }, enumerable: true, @@ -19011,6 +22445,9 @@ var Excel; PresetCriteriaConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["rule"], ["format"], []); }; + PresetCriteriaConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; PresetCriteriaConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -19018,27 +22455,39 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Rule"])) { - this.m_rule=obj["Rule"]; + this._R=obj["Rule"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; PresetCriteriaConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + PresetCriteriaConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + PresetCriteriaConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; PresetCriteriaConditionalFormat.prototype.toJSON=function () { - return { - "format": this.m_format, - "rule": this.m_rule - }; + return _toJson(this, { + "rule": this._R, + }, { + "format": this._F, + }); + }; + PresetCriteriaConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return PresetCriteriaConditionalFormat; }(OfficeExtension.ClientObject)); Excel.PresetCriteriaConditionalFormat=PresetCriteriaConditionalFormat; + var _typeTextConditionalFormat="TextConditionalFormat"; var TextConditionalFormat=(function (_super) { __extends(TextConditionalFormat, _super); function TextConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TextConditionalFormat.prototype, "_className", { get: function () { @@ -19047,23 +22496,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TextConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["rule"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TextConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TextConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TextConditionalFormat.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(TextConditionalFormat.prototype, "rule", { get: function () { - _throwIfNotLoaded("rule", this.m_rule, "TextConditionalFormat", this._isNull); - return this.m_rule; + _throwIfNotLoaded("rule", this._R, _typeTextConditionalFormat, this._isNull); + return this._R; }, set: function (value) { - this.m_rule=value; + this._R=value; _createSetPropertyAction(this.context, this, "Rule", value); }, enumerable: true, @@ -19072,6 +22542,9 @@ var Excel; TextConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["rule"], ["format"], []); }; + TextConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; TextConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -19079,27 +22552,39 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Rule"])) { - this.m_rule=obj["Rule"]; + this._R=obj["Rule"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; TextConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TextConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TextConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; TextConditionalFormat.prototype.toJSON=function () { - return { - "format": this.m_format, - "rule": this.m_rule - }; + return _toJson(this, { + "rule": this._R, + }, { + "format": this._F, + }); + }; + TextConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TextConditionalFormat; }(OfficeExtension.ClientObject)); Excel.TextConditionalFormat=TextConditionalFormat; + var _typeCellValueConditionalFormat="CellValueConditionalFormat"; var CellValueConditionalFormat=(function (_super) { __extends(CellValueConditionalFormat, _super); function CellValueConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CellValueConditionalFormat.prototype, "_className", { get: function () { @@ -19108,23 +22593,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(CellValueConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["rule"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CellValueConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CellValueConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(CellValueConditionalFormat.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(CellValueConditionalFormat.prototype, "rule", { get: function () { - _throwIfNotLoaded("rule", this.m_rule, "CellValueConditionalFormat", this._isNull); - return this.m_rule; + _throwIfNotLoaded("rule", this._R, _typeCellValueConditionalFormat, this._isNull); + return this._R; }, set: function (value) { - this.m_rule=value; + this._R=value; _createSetPropertyAction(this.context, this, "Rule", value); }, enumerable: true, @@ -19133,6 +22639,9 @@ var Excel; CellValueConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["rule"], ["format"], []); }; + CellValueConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; CellValueConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -19140,27 +22649,39 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Rule"])) { - this.m_rule=obj["Rule"]; + this._R=obj["Rule"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; CellValueConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CellValueConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CellValueConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; CellValueConditionalFormat.prototype.toJSON=function () { - return { - "format": this.m_format, - "rule": this.m_rule - }; + return _toJson(this, { + "rule": this._R, + }, { + "format": this._F, + }); + }; + CellValueConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return CellValueConditionalFormat; }(OfficeExtension.ClientObject)); Excel.CellValueConditionalFormat=CellValueConditionalFormat; + var _typeConditionalRangeFormat="ConditionalRangeFormat"; var ConditionalRangeFormat=(function (_super) { __extends(ConditionalRangeFormat, _super); function ConditionalRangeFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalRangeFormat.prototype, "_className", { get: function () { @@ -19169,58 +22690,77 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalRangeFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["numberFormat"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["fill", "font", "borders"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalRangeFormat.prototype, "borders", { get: function () { - if (!this.m_borders) { - this.m_borders=new Excel.ConditionalRangeBorderCollection(this.context, _createPropertyObjectPath(this.context, this, "Borders", true, false)); + if (!this._B) { + this._B=new Excel.ConditionalRangeBorderCollection(this.context, _createPropertyObjectPath(this.context, this, "Borders", true, false, false)); } - return this.m_borders; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ConditionalRangeFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ConditionalRangeFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ConditionalRangeFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Excel.ConditionalRangeFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeFormat.prototype, "numberFormat", { get: function () { - _throwIfNotLoaded("numberFormat", this.m_numberFormat, "ConditionalRangeFormat", this._isNull); - return this.m_numberFormat; + _throwIfNotLoaded("numberFormat", this._N, _typeConditionalRangeFormat, this._isNull); + return this._N; }, set: function (value) { - this.m_numberFormat=value; + this._N=value; _createSetPropertyAction(this.context, this, "NumberFormat", value); }, enumerable: true, configurable: true }); ConditionalRangeFormat.prototype.set=function (properties, options) { - this._recursivelySet(properties, options, ["numberFormat"], [], [ - "borders", - "fill", - "font", - "borders", - "fill", - "font" + this._recursivelySet(properties, options, ["numberFormat"], ["fill", "font"], [ + "borders" ]); }; + ConditionalRangeFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalRangeFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -19228,26 +22768,41 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["NumberFormat"])) { - this.m_numberFormat=obj["NumberFormat"]; + this._N=obj["NumberFormat"]; } _handleNavigationPropertyResults(this, obj, ["borders", "Borders", "fill", "Fill", "font", "Font"]); }; ConditionalRangeFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalRangeFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalRangeFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalRangeFormat.prototype.toJSON=function () { - return { - "numberFormat": this.m_numberFormat - }; + return _toJson(this, { + "numberFormat": this._N, + }, { + "borders": this._B, + "fill": this._F, + "font": this._Fo, + }); + }; + ConditionalRangeFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalRangeFormat; }(OfficeExtension.ClientObject)); Excel.ConditionalRangeFormat=ConditionalRangeFormat; + var _typeConditionalRangeFont="ConditionalRangeFont"; var ConditionalRangeFont=(function (_super) { __extends(ConditionalRangeFont, _super); function ConditionalRangeFont() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalRangeFont.prototype, "_className", { get: function () { @@ -19256,13 +22811,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalRangeFont.prototype, "_scalarPropertyNames", { + get: function () { + return ["color", "italic", "bold", "underline", "strikethrough"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeFont.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalRangeFont.prototype, "bold", { get: function () { - _throwIfNotLoaded("bold", this.m_bold, "ConditionalRangeFont", this._isNull); - return this.m_bold; + _throwIfNotLoaded("bold", this._B, _typeConditionalRangeFont, this._isNull); + return this._B; }, set: function (value) { - this.m_bold=value; + this._B=value; _createSetPropertyAction(this.context, this, "Bold", value); }, enumerable: true, @@ -19270,11 +22839,11 @@ var Excel; }); Object.defineProperty(ConditionalRangeFont.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "ConditionalRangeFont", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeConditionalRangeFont, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -19282,11 +22851,11 @@ var Excel; }); Object.defineProperty(ConditionalRangeFont.prototype, "italic", { get: function () { - _throwIfNotLoaded("italic", this.m_italic, "ConditionalRangeFont", this._isNull); - return this.m_italic; + _throwIfNotLoaded("italic", this._I, _typeConditionalRangeFont, this._isNull); + return this._I; }, set: function (value) { - this.m_italic=value; + this._I=value; _createSetPropertyAction(this.context, this, "Italic", value); }, enumerable: true, @@ -19294,11 +22863,11 @@ var Excel; }); Object.defineProperty(ConditionalRangeFont.prototype, "strikethrough", { get: function () { - _throwIfNotLoaded("strikethrough", this.m_strikethrough, "ConditionalRangeFont", this._isNull); - return this.m_strikethrough; + _throwIfNotLoaded("strikethrough", this._S, _typeConditionalRangeFont, this._isNull); + return this._S; }, set: function (value) { - this.m_strikethrough=value; + this._S=value; _createSetPropertyAction(this.context, this, "Strikethrough", value); }, enumerable: true, @@ -19306,11 +22875,11 @@ var Excel; }); Object.defineProperty(ConditionalRangeFont.prototype, "underline", { get: function () { - _throwIfNotLoaded("underline", this.m_underline, "ConditionalRangeFont", this._isNull); - return this.m_underline; + _throwIfNotLoaded("underline", this._U, _typeConditionalRangeFont, this._isNull); + return this._U; }, set: function (value) { - this.m_underline=value; + this._U=value; _createSetPropertyAction(this.context, this, "Underline", value); }, enumerable: true, @@ -19319,8 +22888,11 @@ var Excel; ConditionalRangeFont.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["color", "italic", "bold", "underline", "strikethrough"], [], []); }; + ConditionalRangeFont.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalRangeFont.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; ConditionalRangeFont.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -19329,41 +22901,52 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Bold"])) { - this.m_bold=obj["Bold"]; + this._B=obj["Bold"]; } if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["Italic"])) { - this.m_italic=obj["Italic"]; + this._I=obj["Italic"]; } if (!_isUndefined(obj["Strikethrough"])) { - this.m_strikethrough=obj["Strikethrough"]; + this._S=obj["Strikethrough"]; } if (!_isUndefined(obj["Underline"])) { - this.m_underline=obj["Underline"]; + this._U=obj["Underline"]; } }; ConditionalRangeFont.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalRangeFont.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalRangeFont.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalRangeFont.prototype.toJSON=function () { - return { - "bold": this.m_bold, - "color": this.m_color, - "italic": this.m_italic, - "strikethrough": this.m_strikethrough, - "underline": this.m_underline - }; + return _toJson(this, { + "bold": this._B, + "color": this._C, + "italic": this._I, + "strikethrough": this._S, + "underline": this._U, + }, {}); + }; + ConditionalRangeFont.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalRangeFont; }(OfficeExtension.ClientObject)); Excel.ConditionalRangeFont=ConditionalRangeFont; + var _typeConditionalRangeFill="ConditionalRangeFill"; var ConditionalRangeFill=(function (_super) { __extends(ConditionalRangeFill, _super); function ConditionalRangeFill() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalRangeFill.prototype, "_className", { get: function () { @@ -19372,13 +22955,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalRangeFill.prototype, "_scalarPropertyNames", { + get: function () { + return ["color"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeFill.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalRangeFill.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "ConditionalRangeFill", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeConditionalRangeFill, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -19387,8 +22984,11 @@ var Excel; ConditionalRangeFill.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["color"], [], []); }; + ConditionalRangeFill.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalRangeFill.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; ConditionalRangeFill.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -19397,25 +22997,36 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } }; ConditionalRangeFill.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalRangeFill.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalRangeFill.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalRangeFill.prototype.toJSON=function () { - return { - "color": this.m_color - }; + return _toJson(this, { + "color": this._C, + }, {}); + }; + ConditionalRangeFill.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalRangeFill; }(OfficeExtension.ClientObject)); Excel.ConditionalRangeFill=ConditionalRangeFill; + var _typeConditionalRangeBorder="ConditionalRangeBorder"; var ConditionalRangeBorder=(function (_super) { __extends(ConditionalRangeBorder, _super); function ConditionalRangeBorder() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalRangeBorder.prototype, "_className", { get: function () { @@ -19424,13 +23035,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalRangeBorder.prototype, "_scalarPropertyNames", { + get: function () { + return ["sideIndex", "style", "color"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeBorder.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalRangeBorder.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "ConditionalRangeBorder", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeConditionalRangeBorder, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -19438,19 +23063,19 @@ var Excel; }); Object.defineProperty(ConditionalRangeBorder.prototype, "sideIndex", { get: function () { - _throwIfNotLoaded("sideIndex", this.m_sideIndex, "ConditionalRangeBorder", this._isNull); - return this.m_sideIndex; + _throwIfNotLoaded("sideIndex", this._S, _typeConditionalRangeBorder, this._isNull); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeBorder.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "ConditionalRangeBorder", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._St, _typeConditionalRangeBorder, this._isNull); + return this._St; }, set: function (value) { - this.m_style=value; + this._St=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -19459,6 +23084,9 @@ var Excel; ConditionalRangeBorder.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["style", "color"], [], []); }; + ConditionalRangeBorder.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalRangeBorder.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -19466,33 +23094,44 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["SideIndex"])) { - this.m_sideIndex=obj["SideIndex"]; + this._S=obj["SideIndex"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._St=obj["Style"]; } }; ConditionalRangeBorder.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalRangeBorder.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalRangeBorder.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalRangeBorder.prototype.toJSON=function () { - return { - "color": this.m_color, - "sideIndex": this.m_sideIndex, - "style": this.m_style - }; + return _toJson(this, { + "color": this._C, + "sideIndex": this._S, + "style": this._St, + }, {}); + }; + ConditionalRangeBorder.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalRangeBorder; }(OfficeExtension.ClientObject)); Excel.ConditionalRangeBorder=ConditionalRangeBorder; + var _typeConditionalRangeBorderCollection="ConditionalRangeBorderCollection"; var ConditionalRangeBorderCollection=(function (_super) { __extends(ConditionalRangeBorderCollection, _super); function ConditionalRangeBorderCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalRangeBorderCollection.prototype, "_className", { get: function () { @@ -19501,49 +23140,70 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalRangeBorderCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeBorderCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeBorderCollection.prototype, "_navigationPropertyNames", { + get: function () { + return ["top", "bottom", "left", "right"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalRangeBorderCollection.prototype, "bottom", { get: function () { - if (!this.m_bottom) { - this.m_bottom=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Bottom", false, false)); + if (!this._B) { + this._B=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Bottom", false, false, false)); } - return this.m_bottom; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeBorderCollection.prototype, "left", { get: function () { - if (!this.m_left) { - this.m_left=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Left", false, false)); + if (!this._L) { + this._L=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Left", false, false, false)); } - return this.m_left; + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeBorderCollection.prototype, "right", { get: function () { - if (!this.m_right) { - this.m_right=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Right", false, false)); + if (!this._R) { + this._R=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Right", false, false, false)); } - return this.m_right; + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeBorderCollection.prototype, "top", { get: function () { - if (!this.m_top) { - this.m_top=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Top", false, false)); + if (!this._T) { + this._T=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Top", false, false, false)); } - return this.m_top; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeBorderCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ConditionalRangeBorderCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeConditionalRangeBorderCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -19551,8 +23211,8 @@ var Excel; }); Object.defineProperty(ConditionalRangeBorderCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "ConditionalRangeBorderCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeConditionalRangeBorderCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true @@ -19561,7 +23221,7 @@ var Excel; return new Excel.ConditionalRangeBorder(this.context, _createIndexerObjectPath(this.context, this, [index])); }; ConditionalRangeBorderCollection.prototype.getItemAt=function (index) { - return new Excel.ConditionalRangeBorder(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.ConditionalRangeBorder(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; ConditionalRangeBorderCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -19570,7 +23230,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } _handleNavigationPropertyResults(this, obj, ["bottom", "Bottom", "left", "Left", "right", "Right", "top", "Top"]); if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { @@ -19584,17 +23244,65 @@ var Excel; } }; ConditionalRangeBorderCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalRangeBorderCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalRangeBorderCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.ConditionalRangeBorder(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; ConditionalRangeBorderCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, { + "bottom": this._B, + "left": this._L, + "right": this._R, + "top": this._T, + }, this.m__items); }; return ConditionalRangeBorderCollection; }(OfficeExtension.ClientObject)); Excel.ConditionalRangeBorderCollection=ConditionalRangeBorderCollection; + var _typeInternalTest="InternalTest"; + var InternalTest=(function (_super) { + __extends(InternalTest, _super); + function InternalTest() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(InternalTest.prototype, "_className", { + get: function () { + return "InternalTest"; + }, + enumerable: true, + configurable: true + }); + InternalTest.prototype.delay=function (seconds) { + var action=_createMethodAction(this.context, this, "Delay", 0, [seconds], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + InternalTest.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + InternalTest.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + InternalTest.prototype.toJSON=function () { + return _toJson(this, {}, {}); + }; + return InternalTest; + }(OfficeExtension.ClientObject)); + Excel.InternalTest=InternalTest; var BindingType; (function (BindingType) { BindingType.range="Range"; @@ -19648,6 +23356,7 @@ var Excel; ClearApplyTo.formats="Formats"; ClearApplyTo.contents="Contents"; ClearApplyTo.hyperlinks="Hyperlinks"; + ClearApplyTo.removeHyperlinks="RemoveHyperlinks"; })(ClearApplyTo=Excel.ClearApplyTo || (Excel.ClearApplyTo={})); var ChartDataLabelPosition; (function (ChartDataLabelPosition) { @@ -20034,6 +23743,7 @@ var Excel; NamedItemType.boolean="Boolean"; NamedItemType.range="Range"; NamedItemType.error="Error"; + NamedItemType.array="Array"; })(NamedItemType=Excel.NamedItemType || (Excel.NamedItemType={})); var RangeUnderlineStyle; (function (RangeUnderlineStyle) { @@ -20058,6 +23768,7 @@ var Excel; RangeValueType.double="Double"; RangeValueType.boolean="Boolean"; RangeValueType.error="Error"; + RangeValueType.richValue="RichValue"; })(RangeValueType=Excel.RangeValueType || (Excel.RangeValueType={})); var SortOrientation; (function (SortOrientation) { @@ -20089,10 +23800,11 @@ var Excel; VerticalAlignment.justify="Justify"; VerticalAlignment.distributed="Distributed"; })(VerticalAlignment=Excel.VerticalAlignment || (Excel.VerticalAlignment={})); + var _typeFunctionResult="FunctionResult"; var FunctionResult=(function (_super) { __extends(FunctionResult, _super); function FunctionResult() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(FunctionResult.prototype, "_className", { get: function () { @@ -20101,18 +23813,25 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(FunctionResult.prototype, "_scalarPropertyNames", { + get: function () { + return ["error", "value"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(FunctionResult.prototype, "error", { get: function () { - _throwIfNotLoaded("error", this.m_error, "FunctionResult", this._isNull); - return this.m_error; + _throwIfNotLoaded("error", this._E, _typeFunctionResult, this._isNull); + return this._E; }, enumerable: true, configurable: true }); Object.defineProperty(FunctionResult.prototype, "value", { get: function () { - _throwIfNotLoaded("value", this.m_value, "FunctionResult", this._isNull); - return this.m_value; + _throwIfNotLoaded("value", this._V, _typeFunctionResult, this._isNull); + return this._V; }, enumerable: true, configurable: true @@ -20124,29 +23843,40 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Error"])) { - this.m_error=obj["Error"]; + this._E=obj["Error"]; } if (!_isUndefined(obj["Value"])) { - this.m_value=obj["Value"]; + this._V=obj["Value"]; } }; FunctionResult.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + FunctionResult.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + FunctionResult.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; FunctionResult.prototype.toJSON=function () { - return { - "error": this.m_error, - "value": this.m_value - }; + return _toJson(this, { + "error": this._E, + "value": this._V, + }, {}); + }; + FunctionResult.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return FunctionResult; }(OfficeExtension.ClientObject)); Excel.FunctionResult=FunctionResult; + var _typeFunctions="Functions"; var Functions=(function (_super) { __extends(Functions, _super); function Functions() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Functions.prototype, "_className", { get: function () { @@ -20156,1270 +23886,1270 @@ var Excel; configurable: true }); Functions.prototype.abs=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Abs", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Abs", 0, [number], false, true, null, false)); }; Functions.prototype.accrInt=function (issue, firstInterest, settlement, rate, par, frequency, basis, calcMethod) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AccrInt", 0, [issue, firstInterest, settlement, rate, par, frequency, basis, calcMethod], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AccrInt", 0, [issue, firstInterest, settlement, rate, par, frequency, basis, calcMethod], false, true, null, false)); }; Functions.prototype.accrIntM=function (issue, settlement, rate, par, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AccrIntM", 0, [issue, settlement, rate, par, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AccrIntM", 0, [issue, settlement, rate, par, basis], false, true, null, false)); }; Functions.prototype.acos=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acos", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acos", 0, [number], false, true, null, false)); }; Functions.prototype.acosh=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acosh", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acosh", 0, [number], false, true, null, false)); }; Functions.prototype.acot=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acot", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acot", 0, [number], false, true, null, false)); }; Functions.prototype.acoth=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acoth", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acoth", 0, [number], false, true, null, false)); }; Functions.prototype.amorDegrc=function (cost, datePurchased, firstPeriod, salvage, period, rate, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AmorDegrc", 0, [cost, datePurchased, firstPeriod, salvage, period, rate, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AmorDegrc", 0, [cost, datePurchased, firstPeriod, salvage, period, rate, basis], false, true, null, false)); }; Functions.prototype.amorLinc=function (cost, datePurchased, firstPeriod, salvage, period, rate, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AmorLinc", 0, [cost, datePurchased, firstPeriod, salvage, period, rate, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AmorLinc", 0, [cost, datePurchased, firstPeriod, salvage, period, rate, basis], false, true, null, false)); }; Functions.prototype.and=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "And", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "And", 0, [values], false, true, null, false)); }; Functions.prototype.arabic=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Arabic", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Arabic", 0, [text], false, true, null, false)); }; Functions.prototype.areas=function (reference) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Areas", 0, [reference], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Areas", 0, [reference], false, true, null, false)); }; Functions.prototype.asc=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asc", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asc", 0, [text], false, true, null, false)); }; Functions.prototype.asin=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asin", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asin", 0, [number], false, true, null, false)); }; Functions.prototype.asinh=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asinh", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asinh", 0, [number], false, true, null, false)); }; Functions.prototype.atan=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atan", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atan", 0, [number], false, true, null, false)); }; Functions.prototype.atan2=function (xNum, yNum) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atan2", 0, [xNum, yNum], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atan2", 0, [xNum, yNum], false, true, null, false)); }; Functions.prototype.atanh=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atanh", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atanh", 0, [number], false, true, null, false)); }; Functions.prototype.aveDev=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AveDev", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AveDev", 0, [values], false, true, null, false)); }; Functions.prototype.average=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Average", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Average", 0, [values], false, true, null, false)); }; Functions.prototype.averageA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageA", 0, [values], false, true, null, false)); }; Functions.prototype.averageIf=function (range, criteria, averageRange) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageIf", 0, [range, criteria, averageRange], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageIf", 0, [range, criteria, averageRange], false, true, null, false)); }; Functions.prototype.averageIfs=function (averageRange) { var values=[]; for (var _i=1; _i < arguments.length; _i++) { values[_i - 1]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageIfs", 0, [averageRange, values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageIfs", 0, [averageRange, values], false, true, null, false)); }; Functions.prototype.bahtText=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BahtText", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BahtText", 0, [number], false, true, null, false)); }; Functions.prototype.base=function (number, radix, minLength) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Base", 0, [number, radix, minLength], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Base", 0, [number, radix, minLength], false, true, null, false)); }; Functions.prototype.besselI=function (x, n) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselI", 0, [x, n], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselI", 0, [x, n], false, true, null, false)); }; Functions.prototype.besselJ=function (x, n) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselJ", 0, [x, n], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselJ", 0, [x, n], false, true, null, false)); }; Functions.prototype.besselK=function (x, n) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselK", 0, [x, n], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselK", 0, [x, n], false, true, null, false)); }; Functions.prototype.besselY=function (x, n) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselY", 0, [x, n], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselY", 0, [x, n], false, true, null, false)); }; Functions.prototype.beta_Dist=function (x, alpha, beta, cumulative, A, B) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Beta_Dist", 0, [x, alpha, beta, cumulative, A, B], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Beta_Dist", 0, [x, alpha, beta, cumulative, A, B], false, true, null, false)); }; Functions.prototype.beta_Inv=function (probability, alpha, beta, A, B) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Beta_Inv", 0, [probability, alpha, beta, A, B], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Beta_Inv", 0, [probability, alpha, beta, A, B], false, true, null, false)); }; Functions.prototype.bin2Dec=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Dec", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Dec", 0, [number], false, true, null, false)); }; Functions.prototype.bin2Hex=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Hex", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Hex", 0, [number, places], false, true, null, false)); }; Functions.prototype.bin2Oct=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Oct", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Oct", 0, [number, places], false, true, null, false)); }; Functions.prototype.binom_Dist=function (numberS, trials, probabilityS, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Dist", 0, [numberS, trials, probabilityS, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Dist", 0, [numberS, trials, probabilityS, cumulative], false, true, null, false)); }; Functions.prototype.binom_Dist_Range=function (trials, probabilityS, numberS, numberS2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Dist_Range", 0, [trials, probabilityS, numberS, numberS2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Dist_Range", 0, [trials, probabilityS, numberS, numberS2], false, true, null, false)); }; Functions.prototype.binom_Inv=function (trials, probabilityS, alpha) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Inv", 0, [trials, probabilityS, alpha], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Inv", 0, [trials, probabilityS, alpha], false, true, null, false)); }; Functions.prototype.bitand=function (number1, number2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitand", 0, [number1, number2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitand", 0, [number1, number2], false, true, null, false)); }; Functions.prototype.bitlshift=function (number, shiftAmount) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitlshift", 0, [number, shiftAmount], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitlshift", 0, [number, shiftAmount], false, true, null, false)); }; Functions.prototype.bitor=function (number1, number2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitor", 0, [number1, number2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitor", 0, [number1, number2], false, true, null, false)); }; Functions.prototype.bitrshift=function (number, shiftAmount) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitrshift", 0, [number, shiftAmount], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitrshift", 0, [number, shiftAmount], false, true, null, false)); }; Functions.prototype.bitxor=function (number1, number2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitxor", 0, [number1, number2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitxor", 0, [number1, number2], false, true, null, false)); }; Functions.prototype.ceiling_Math=function (number, significance, mode) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ceiling_Math", 0, [number, significance, mode], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ceiling_Math", 0, [number, significance, mode], false, true, null, false)); }; Functions.prototype.ceiling_Precise=function (number, significance) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ceiling_Precise", 0, [number, significance], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ceiling_Precise", 0, [number, significance], false, true, null, false)); }; Functions.prototype.char=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Char", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Char", 0, [number], false, true, null, false)); }; Functions.prototype.chiSq_Dist=function (x, degFreedom, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Dist", 0, [x, degFreedom, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Dist", 0, [x, degFreedom, cumulative], false, true, null, false)); }; Functions.prototype.chiSq_Dist_RT=function (x, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Dist_RT", 0, [x, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Dist_RT", 0, [x, degFreedom], false, true, null, false)); }; Functions.prototype.chiSq_Inv=function (probability, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Inv", 0, [probability, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Inv", 0, [probability, degFreedom], false, true, null, false)); }; Functions.prototype.chiSq_Inv_RT=function (probability, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Inv_RT", 0, [probability, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Inv_RT", 0, [probability, degFreedom], false, true, null, false)); }; Functions.prototype.choose=function (indexNum) { var values=[]; for (var _i=1; _i < arguments.length; _i++) { values[_i - 1]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Choose", 0, [indexNum, values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Choose", 0, [indexNum, values], false, true, null, false)); }; Functions.prototype.clean=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Clean", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Clean", 0, [text], false, true, null, false)); }; Functions.prototype.code=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Code", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Code", 0, [text], false, true, null, false)); }; Functions.prototype.columns=function (array) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Columns", 0, [array], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Columns", 0, [array], false, true, null, false)); }; Functions.prototype.combin=function (number, numberChosen) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Combin", 0, [number, numberChosen], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Combin", 0, [number, numberChosen], false, true, null, false)); }; Functions.prototype.combina=function (number, numberChosen) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Combina", 0, [number, numberChosen], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Combina", 0, [number, numberChosen], false, true, null, false)); }; Functions.prototype.complex=function (realNum, iNum, suffix) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Complex", 0, [realNum, iNum, suffix], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Complex", 0, [realNum, iNum, suffix], false, true, null, false)); }; Functions.prototype.concatenate=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Concatenate", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Concatenate", 0, [values], false, true, null, false)); }; Functions.prototype.confidence_Norm=function (alpha, standardDev, size) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Confidence_Norm", 0, [alpha, standardDev, size], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Confidence_Norm", 0, [alpha, standardDev, size], false, true, null, false)); }; Functions.prototype.confidence_T=function (alpha, standardDev, size) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Confidence_T", 0, [alpha, standardDev, size], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Confidence_T", 0, [alpha, standardDev, size], false, true, null, false)); }; Functions.prototype.convert=function (number, fromUnit, toUnit) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Convert", 0, [number, fromUnit, toUnit], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Convert", 0, [number, fromUnit, toUnit], false, true, null, false)); }; Functions.prototype.cos=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cos", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cos", 0, [number], false, true, null, false)); }; Functions.prototype.cosh=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cosh", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cosh", 0, [number], false, true, null, false)); }; Functions.prototype.cot=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cot", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cot", 0, [number], false, true, null, false)); }; Functions.prototype.coth=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Coth", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Coth", 0, [number], false, true, null, false)); }; Functions.prototype.count=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Count", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Count", 0, [values], false, true, null, false)); }; Functions.prototype.countA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountA", 0, [values], false, true, null, false)); }; Functions.prototype.countBlank=function (range) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountBlank", 0, [range], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountBlank", 0, [range], false, true, null, false)); }; Functions.prototype.countIf=function (range, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountIf", 0, [range, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountIf", 0, [range, criteria], false, true, null, false)); }; Functions.prototype.countIfs=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountIfs", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountIfs", 0, [values], false, true, null, false)); }; Functions.prototype.coupDayBs=function (settlement, maturity, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDayBs", 0, [settlement, maturity, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDayBs", 0, [settlement, maturity, frequency, basis], false, true, null, false)); }; Functions.prototype.coupDays=function (settlement, maturity, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDays", 0, [settlement, maturity, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDays", 0, [settlement, maturity, frequency, basis], false, true, null, false)); }; Functions.prototype.coupDaysNc=function (settlement, maturity, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDaysNc", 0, [settlement, maturity, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDaysNc", 0, [settlement, maturity, frequency, basis], false, true, null, false)); }; Functions.prototype.coupNcd=function (settlement, maturity, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupNcd", 0, [settlement, maturity, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupNcd", 0, [settlement, maturity, frequency, basis], false, true, null, false)); }; Functions.prototype.coupNum=function (settlement, maturity, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupNum", 0, [settlement, maturity, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupNum", 0, [settlement, maturity, frequency, basis], false, true, null, false)); }; Functions.prototype.coupPcd=function (settlement, maturity, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupPcd", 0, [settlement, maturity, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupPcd", 0, [settlement, maturity, frequency, basis], false, true, null, false)); }; Functions.prototype.csc=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Csc", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Csc", 0, [number], false, true, null, false)); }; Functions.prototype.csch=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Csch", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Csch", 0, [number], false, true, null, false)); }; Functions.prototype.cumIPmt=function (rate, nper, pv, startPeriod, endPeriod, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CumIPmt", 0, [rate, nper, pv, startPeriod, endPeriod, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CumIPmt", 0, [rate, nper, pv, startPeriod, endPeriod, type], false, true, null, false)); }; Functions.prototype.cumPrinc=function (rate, nper, pv, startPeriod, endPeriod, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CumPrinc", 0, [rate, nper, pv, startPeriod, endPeriod, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CumPrinc", 0, [rate, nper, pv, startPeriod, endPeriod, type], false, true, null, false)); }; Functions.prototype.daverage=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DAverage", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DAverage", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dcount=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DCount", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DCount", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dcountA=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DCountA", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DCountA", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dget=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DGet", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DGet", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dmax=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DMax", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DMax", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dmin=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DMin", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DMin", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dproduct=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DProduct", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DProduct", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dstDev=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DStDev", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DStDev", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dstDevP=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DStDevP", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DStDevP", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dsum=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DSum", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DSum", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dvar=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DVar", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DVar", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dvarP=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DVarP", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DVarP", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.date=function (year, month, day) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Date", 0, [year, month, day], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Date", 0, [year, month, day], false, true, null, false)); }; Functions.prototype.datevalue=function (dateText) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Datevalue", 0, [dateText], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Datevalue", 0, [dateText], false, true, null, false)); }; Functions.prototype.day=function (serialNumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Day", 0, [serialNumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Day", 0, [serialNumber], false, true, null, false)); }; Functions.prototype.days=function (endDate, startDate) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Days", 0, [endDate, startDate], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Days", 0, [endDate, startDate], false, true, null, false)); }; Functions.prototype.days360=function (startDate, endDate, method) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Days360", 0, [startDate, endDate, method], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Days360", 0, [startDate, endDate, method], false, true, null, false)); }; Functions.prototype.db=function (cost, salvage, life, period, month) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Db", 0, [cost, salvage, life, period, month], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Db", 0, [cost, salvage, life, period, month], false, true, null, false)); }; Functions.prototype.dbcs=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dbcs", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dbcs", 0, [text], false, true, null, false)); }; Functions.prototype.ddb=function (cost, salvage, life, period, factor) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ddb", 0, [cost, salvage, life, period, factor], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ddb", 0, [cost, salvage, life, period, factor], false, true, null, false)); }; Functions.prototype.dec2Bin=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Bin", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Bin", 0, [number, places], false, true, null, false)); }; Functions.prototype.dec2Hex=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Hex", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Hex", 0, [number, places], false, true, null, false)); }; Functions.prototype.dec2Oct=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Oct", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Oct", 0, [number, places], false, true, null, false)); }; Functions.prototype.decimal=function (number, radix) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Decimal", 0, [number, radix], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Decimal", 0, [number, radix], false, true, null, false)); }; Functions.prototype.degrees=function (angle) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Degrees", 0, [angle], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Degrees", 0, [angle], false, true, null, false)); }; Functions.prototype.delta=function (number1, number2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Delta", 0, [number1, number2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Delta", 0, [number1, number2], false, true, null, false)); }; Functions.prototype.devSq=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DevSq", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DevSq", 0, [values], false, true, null, false)); }; Functions.prototype.disc=function (settlement, maturity, pr, redemption, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Disc", 0, [settlement, maturity, pr, redemption, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Disc", 0, [settlement, maturity, pr, redemption, basis], false, true, null, false)); }; Functions.prototype.dollar=function (number, decimals) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dollar", 0, [number, decimals], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dollar", 0, [number, decimals], false, true, null, false)); }; Functions.prototype.dollarDe=function (fractionalDollar, fraction) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DollarDe", 0, [fractionalDollar, fraction], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DollarDe", 0, [fractionalDollar, fraction], false, true, null, false)); }; Functions.prototype.dollarFr=function (decimalDollar, fraction) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DollarFr", 0, [decimalDollar, fraction], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DollarFr", 0, [decimalDollar, fraction], false, true, null, false)); }; Functions.prototype.duration=function (settlement, maturity, coupon, yld, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Duration", 0, [settlement, maturity, coupon, yld, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Duration", 0, [settlement, maturity, coupon, yld, frequency, basis], false, true, null, false)); }; Functions.prototype.ecma_Ceiling=function (number, significance) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ECMA_Ceiling", 0, [number, significance], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ECMA_Ceiling", 0, [number, significance], false, true, null, false)); }; Functions.prototype.edate=function (startDate, months) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "EDate", 0, [startDate, months], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "EDate", 0, [startDate, months], false, true, null, false)); }; Functions.prototype.effect=function (nominalRate, npery) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Effect", 0, [nominalRate, npery], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Effect", 0, [nominalRate, npery], false, true, null, false)); }; Functions.prototype.eoMonth=function (startDate, months) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "EoMonth", 0, [startDate, months], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "EoMonth", 0, [startDate, months], false, true, null, false)); }; Functions.prototype.erf=function (lowerLimit, upperLimit) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Erf", 0, [lowerLimit, upperLimit], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Erf", 0, [lowerLimit, upperLimit], false, true, null, false)); }; Functions.prototype.erfC=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ErfC", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ErfC", 0, [x], false, true, null, false)); }; Functions.prototype.erfC_Precise=function (X) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ErfC_Precise", 0, [X], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ErfC_Precise", 0, [X], false, true, null, false)); }; Functions.prototype.erf_Precise=function (X) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Erf_Precise", 0, [X], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Erf_Precise", 0, [X], false, true, null, false)); }; Functions.prototype.error_Type=function (errorVal) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Error_Type", 0, [errorVal], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Error_Type", 0, [errorVal], false, true, null, false)); }; Functions.prototype.even=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Even", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Even", 0, [number], false, true, null, false)); }; Functions.prototype.exact=function (text1, text2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Exact", 0, [text1, text2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Exact", 0, [text1, text2], false, true, null, false)); }; Functions.prototype.exp=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Exp", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Exp", 0, [number], false, true, null, false)); }; Functions.prototype.expon_Dist=function (x, lambda, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Expon_Dist", 0, [x, lambda, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Expon_Dist", 0, [x, lambda, cumulative], false, true, null, false)); }; Functions.prototype.fvschedule=function (principal, schedule) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FVSchedule", 0, [principal, schedule], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FVSchedule", 0, [principal, schedule], false, true, null, false)); }; Functions.prototype.f_Dist=function (x, degFreedom1, degFreedom2, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Dist", 0, [x, degFreedom1, degFreedom2, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Dist", 0, [x, degFreedom1, degFreedom2, cumulative], false, true, null, false)); }; Functions.prototype.f_Dist_RT=function (x, degFreedom1, degFreedom2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Dist_RT", 0, [x, degFreedom1, degFreedom2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Dist_RT", 0, [x, degFreedom1, degFreedom2], false, true, null, false)); }; Functions.prototype.f_Inv=function (probability, degFreedom1, degFreedom2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Inv", 0, [probability, degFreedom1, degFreedom2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Inv", 0, [probability, degFreedom1, degFreedom2], false, true, null, false)); }; Functions.prototype.f_Inv_RT=function (probability, degFreedom1, degFreedom2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Inv_RT", 0, [probability, degFreedom1, degFreedom2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Inv_RT", 0, [probability, degFreedom1, degFreedom2], false, true, null, false)); }; Functions.prototype.fact=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fact", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fact", 0, [number], false, true, null, false)); }; Functions.prototype.factDouble=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FactDouble", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FactDouble", 0, [number], false, true, null, false)); }; Functions.prototype.false=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "False", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "False", 0, [], false, true, null, false)); }; Functions.prototype.find=function (findText, withinText, startNum) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Find", 0, [findText, withinText, startNum], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Find", 0, [findText, withinText, startNum], false, true, null, false)); }; Functions.prototype.findB=function (findText, withinText, startNum) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FindB", 0, [findText, withinText, startNum], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FindB", 0, [findText, withinText, startNum], false, true, null, false)); }; Functions.prototype.fisher=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fisher", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fisher", 0, [x], false, true, null, false)); }; Functions.prototype.fisherInv=function (y) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FisherInv", 0, [y], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FisherInv", 0, [y], false, true, null, false)); }; Functions.prototype.fixed=function (number, decimals, noCommas) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fixed", 0, [number, decimals, noCommas], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fixed", 0, [number, decimals, noCommas], false, true, null, false)); }; Functions.prototype.floor_Math=function (number, significance, mode) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Floor_Math", 0, [number, significance, mode], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Floor_Math", 0, [number, significance, mode], false, true, null, false)); }; Functions.prototype.floor_Precise=function (number, significance) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Floor_Precise", 0, [number, significance], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Floor_Precise", 0, [number, significance], false, true, null, false)); }; Functions.prototype.fv=function (rate, nper, pmt, pv, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fv", 0, [rate, nper, pmt, pv, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fv", 0, [rate, nper, pmt, pv, type], false, true, null, false)); }; Functions.prototype.gamma=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma", 0, [x], false, true, null, false)); }; Functions.prototype.gammaLn=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GammaLn", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GammaLn", 0, [x], false, true, null, false)); }; Functions.prototype.gammaLn_Precise=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GammaLn_Precise", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GammaLn_Precise", 0, [x], false, true, null, false)); }; Functions.prototype.gamma_Dist=function (x, alpha, beta, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma_Dist", 0, [x, alpha, beta, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma_Dist", 0, [x, alpha, beta, cumulative], false, true, null, false)); }; Functions.prototype.gamma_Inv=function (probability, alpha, beta) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma_Inv", 0, [probability, alpha, beta], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma_Inv", 0, [probability, alpha, beta], false, true, null, false)); }; Functions.prototype.gauss=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gauss", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gauss", 0, [x], false, true, null, false)); }; Functions.prototype.gcd=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gcd", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gcd", 0, [values], false, true, null, false)); }; Functions.prototype.geStep=function (number, step) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GeStep", 0, [number, step], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GeStep", 0, [number, step], false, true, null, false)); }; Functions.prototype.geoMean=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GeoMean", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GeoMean", 0, [values], false, true, null, false)); }; Functions.prototype.hlookup=function (lookupValue, tableArray, rowIndexNum, rangeLookup) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HLookup", 0, [lookupValue, tableArray, rowIndexNum, rangeLookup], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HLookup", 0, [lookupValue, tableArray, rowIndexNum, rangeLookup], false, true, null, false)); }; Functions.prototype.harMean=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HarMean", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HarMean", 0, [values], false, true, null, false)); }; Functions.prototype.hex2Bin=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Bin", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Bin", 0, [number, places], false, true, null, false)); }; Functions.prototype.hex2Dec=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Dec", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Dec", 0, [number], false, true, null, false)); }; Functions.prototype.hex2Oct=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Oct", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Oct", 0, [number, places], false, true, null, false)); }; Functions.prototype.hour=function (serialNumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hour", 0, [serialNumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hour", 0, [serialNumber], false, true, null, false)); }; Functions.prototype.hypGeom_Dist=function (sampleS, numberSample, populationS, numberPop, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HypGeom_Dist", 0, [sampleS, numberSample, populationS, numberPop, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HypGeom_Dist", 0, [sampleS, numberSample, populationS, numberPop, cumulative], false, true, null, false)); }; Functions.prototype.hyperlink=function (linkLocation, friendlyName) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hyperlink", 0, [linkLocation, friendlyName], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hyperlink", 0, [linkLocation, friendlyName], false, true, null, false)); }; Functions.prototype.iso_Ceiling=function (number, significance) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ISO_Ceiling", 0, [number, significance], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ISO_Ceiling", 0, [number, significance], false, true, null, false)); }; Functions.prototype.if=function (logicalTest, valueIfTrue, valueIfFalse) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "If", 0, [logicalTest, valueIfTrue, valueIfFalse], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "If", 0, [logicalTest, valueIfTrue, valueIfFalse], false, true, null, false)); }; Functions.prototype.imAbs=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImAbs", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImAbs", 0, [inumber], false, true, null, false)); }; Functions.prototype.imArgument=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImArgument", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImArgument", 0, [inumber], false, true, null, false)); }; Functions.prototype.imConjugate=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImConjugate", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImConjugate", 0, [inumber], false, true, null, false)); }; Functions.prototype.imCos=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCos", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCos", 0, [inumber], false, true, null, false)); }; Functions.prototype.imCosh=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCosh", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCosh", 0, [inumber], false, true, null, false)); }; Functions.prototype.imCot=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCot", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCot", 0, [inumber], false, true, null, false)); }; Functions.prototype.imCsc=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCsc", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCsc", 0, [inumber], false, true, null, false)); }; Functions.prototype.imCsch=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCsch", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCsch", 0, [inumber], false, true, null, false)); }; Functions.prototype.imDiv=function (inumber1, inumber2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImDiv", 0, [inumber1, inumber2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImDiv", 0, [inumber1, inumber2], false, true, null, false)); }; Functions.prototype.imExp=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImExp", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImExp", 0, [inumber], false, true, null, false)); }; Functions.prototype.imLn=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLn", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLn", 0, [inumber], false, true, null, false)); }; Functions.prototype.imLog10=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLog10", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLog10", 0, [inumber], false, true, null, false)); }; Functions.prototype.imLog2=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLog2", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLog2", 0, [inumber], false, true, null, false)); }; Functions.prototype.imPower=function (inumber, number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImPower", 0, [inumber, number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImPower", 0, [inumber, number], false, true, null, false)); }; Functions.prototype.imProduct=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImProduct", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImProduct", 0, [values], false, true, null, false)); }; Functions.prototype.imReal=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImReal", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImReal", 0, [inumber], false, true, null, false)); }; Functions.prototype.imSec=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSec", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSec", 0, [inumber], false, true, null, false)); }; Functions.prototype.imSech=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSech", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSech", 0, [inumber], false, true, null, false)); }; Functions.prototype.imSin=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSin", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSin", 0, [inumber], false, true, null, false)); }; Functions.prototype.imSinh=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSinh", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSinh", 0, [inumber], false, true, null, false)); }; Functions.prototype.imSqrt=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSqrt", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSqrt", 0, [inumber], false, true, null, false)); }; Functions.prototype.imSub=function (inumber1, inumber2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSub", 0, [inumber1, inumber2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSub", 0, [inumber1, inumber2], false, true, null, false)); }; Functions.prototype.imSum=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSum", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSum", 0, [values], false, true, null, false)); }; Functions.prototype.imTan=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImTan", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImTan", 0, [inumber], false, true, null, false)); }; Functions.prototype.imaginary=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Imaginary", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Imaginary", 0, [inumber], false, true, null, false)); }; Functions.prototype.int=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Int", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Int", 0, [number], false, true, null, false)); }; Functions.prototype.intRate=function (settlement, maturity, investment, redemption, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IntRate", 0, [settlement, maturity, investment, redemption, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IntRate", 0, [settlement, maturity, investment, redemption, basis], false, true, null, false)); }; Functions.prototype.ipmt=function (rate, per, nper, pv, fv, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ipmt", 0, [rate, per, nper, pv, fv, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ipmt", 0, [rate, per, nper, pv, fv, type], false, true, null, false)); }; Functions.prototype.irr=function (values, guess) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Irr", 0, [values, guess], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Irr", 0, [values, guess], false, true, null, false)); }; Functions.prototype.isErr=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsErr", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsErr", 0, [value], false, true, null, false)); }; Functions.prototype.isError=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsError", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsError", 0, [value], false, true, null, false)); }; Functions.prototype.isEven=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsEven", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsEven", 0, [number], false, true, null, false)); }; Functions.prototype.isFormula=function (reference) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsFormula", 0, [reference], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsFormula", 0, [reference], false, true, null, false)); }; Functions.prototype.isLogical=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsLogical", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsLogical", 0, [value], false, true, null, false)); }; Functions.prototype.isNA=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNA", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNA", 0, [value], false, true, null, false)); }; Functions.prototype.isNonText=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNonText", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNonText", 0, [value], false, true, null, false)); }; Functions.prototype.isNumber=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNumber", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNumber", 0, [value], false, true, null, false)); }; Functions.prototype.isOdd=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsOdd", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsOdd", 0, [number], false, true, null, false)); }; Functions.prototype.isText=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsText", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsText", 0, [value], false, true, null, false)); }; Functions.prototype.isoWeekNum=function (date) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsoWeekNum", 0, [date], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsoWeekNum", 0, [date], false, true, null, false)); }; Functions.prototype.ispmt=function (rate, per, nper, pv) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ispmt", 0, [rate, per, nper, pv], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ispmt", 0, [rate, per, nper, pv], false, true, null, false)); }; Functions.prototype.isref=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Isref", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Isref", 0, [value], false, true, null, false)); }; Functions.prototype.kurt=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Kurt", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Kurt", 0, [values], false, true, null, false)); }; Functions.prototype.large=function (array, k) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Large", 0, [array, k], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Large", 0, [array, k], false, true, null, false)); }; Functions.prototype.lcm=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lcm", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lcm", 0, [values], false, true, null, false)); }; Functions.prototype.left=function (text, numChars) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Left", 0, [text, numChars], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Left", 0, [text, numChars], false, true, null, false)); }; Functions.prototype.leftb=function (text, numBytes) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Leftb", 0, [text, numBytes], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Leftb", 0, [text, numBytes], false, true, null, false)); }; Functions.prototype.len=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Len", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Len", 0, [text], false, true, null, false)); }; Functions.prototype.lenb=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lenb", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lenb", 0, [text], false, true, null, false)); }; Functions.prototype.ln=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ln", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ln", 0, [number], false, true, null, false)); }; Functions.prototype.log=function (number, base) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Log", 0, [number, base], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Log", 0, [number, base], false, true, null, false)); }; Functions.prototype.log10=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Log10", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Log10", 0, [number], false, true, null, false)); }; Functions.prototype.logNorm_Dist=function (x, mean, standardDev, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "LogNorm_Dist", 0, [x, mean, standardDev, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "LogNorm_Dist", 0, [x, mean, standardDev, cumulative], false, true, null, false)); }; Functions.prototype.logNorm_Inv=function (probability, mean, standardDev) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "LogNorm_Inv", 0, [probability, mean, standardDev], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "LogNorm_Inv", 0, [probability, mean, standardDev], false, true, null, false)); }; Functions.prototype.lookup=function (lookupValue, lookupVector, resultVector) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lookup", 0, [lookupValue, lookupVector, resultVector], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lookup", 0, [lookupValue, lookupVector, resultVector], false, true, null, false)); }; Functions.prototype.lower=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lower", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lower", 0, [text], false, true, null, false)); }; Functions.prototype.mduration=function (settlement, maturity, coupon, yld, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MDuration", 0, [settlement, maturity, coupon, yld, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MDuration", 0, [settlement, maturity, coupon, yld, frequency, basis], false, true, null, false)); }; Functions.prototype.mirr=function (values, financeRate, reinvestRate) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MIrr", 0, [values, financeRate, reinvestRate], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MIrr", 0, [values, financeRate, reinvestRate], false, true, null, false)); }; Functions.prototype.mround=function (number, multiple) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MRound", 0, [number, multiple], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MRound", 0, [number, multiple], false, true, null, false)); }; Functions.prototype.match=function (lookupValue, lookupArray, matchType) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Match", 0, [lookupValue, lookupArray, matchType], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Match", 0, [lookupValue, lookupArray, matchType], false, true, null, false)); }; Functions.prototype.max=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Max", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Max", 0, [values], false, true, null, false)); }; Functions.prototype.maxA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MaxA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MaxA", 0, [values], false, true, null, false)); }; Functions.prototype.median=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Median", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Median", 0, [values], false, true, null, false)); }; Functions.prototype.mid=function (text, startNum, numChars) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Mid", 0, [text, startNum, numChars], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Mid", 0, [text, startNum, numChars], false, true, null, false)); }; Functions.prototype.midb=function (text, startNum, numBytes) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Midb", 0, [text, startNum, numBytes], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Midb", 0, [text, startNum, numBytes], false, true, null, false)); }; Functions.prototype.min=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Min", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Min", 0, [values], false, true, null, false)); }; Functions.prototype.minA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MinA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MinA", 0, [values], false, true, null, false)); }; Functions.prototype.minute=function (serialNumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Minute", 0, [serialNumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Minute", 0, [serialNumber], false, true, null, false)); }; Functions.prototype.mod=function (number, divisor) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Mod", 0, [number, divisor], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Mod", 0, [number, divisor], false, true, null, false)); }; Functions.prototype.month=function (serialNumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Month", 0, [serialNumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Month", 0, [serialNumber], false, true, null, false)); }; Functions.prototype.multiNomial=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MultiNomial", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MultiNomial", 0, [values], false, true, null, false)); }; Functions.prototype.n=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "N", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "N", 0, [value], false, true, null, false)); }; Functions.prototype.nper=function (rate, pmt, pv, fv, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NPer", 0, [rate, pmt, pv, fv, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NPer", 0, [rate, pmt, pv, fv, type], false, true, null, false)); }; Functions.prototype.na=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Na", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Na", 0, [], false, true, null, false)); }; Functions.prototype.negBinom_Dist=function (numberF, numberS, probabilityS, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NegBinom_Dist", 0, [numberF, numberS, probabilityS, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NegBinom_Dist", 0, [numberF, numberS, probabilityS, cumulative], false, true, null, false)); }; Functions.prototype.networkDays=function (startDate, endDate, holidays) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NetworkDays", 0, [startDate, endDate, holidays], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NetworkDays", 0, [startDate, endDate, holidays], false, true, null, false)); }; Functions.prototype.networkDays_Intl=function (startDate, endDate, weekend, holidays) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NetworkDays_Intl", 0, [startDate, endDate, weekend, holidays], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NetworkDays_Intl", 0, [startDate, endDate, weekend, holidays], false, true, null, false)); }; Functions.prototype.nominal=function (effectRate, npery) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Nominal", 0, [effectRate, npery], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Nominal", 0, [effectRate, npery], false, true, null, false)); }; Functions.prototype.norm_Dist=function (x, mean, standardDev, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_Dist", 0, [x, mean, standardDev, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_Dist", 0, [x, mean, standardDev, cumulative], false, true, null, false)); }; Functions.prototype.norm_Inv=function (probability, mean, standardDev) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_Inv", 0, [probability, mean, standardDev], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_Inv", 0, [probability, mean, standardDev], false, true, null, false)); }; Functions.prototype.norm_S_Dist=function (z, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_S_Dist", 0, [z, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_S_Dist", 0, [z, cumulative], false, true, null, false)); }; Functions.prototype.norm_S_Inv=function (probability) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_S_Inv", 0, [probability], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_S_Inv", 0, [probability], false, true, null, false)); }; Functions.prototype.not=function (logical) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Not", 0, [logical], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Not", 0, [logical], false, true, null, false)); }; Functions.prototype.now=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Now", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Now", 0, [], false, true, null, false)); }; Functions.prototype.npv=function (rate) { var values=[]; for (var _i=1; _i < arguments.length; _i++) { values[_i - 1]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Npv", 0, [rate, values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Npv", 0, [rate, values], false, true, null, false)); }; Functions.prototype.numberValue=function (text, decimalSeparator, groupSeparator) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NumberValue", 0, [text, decimalSeparator, groupSeparator], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NumberValue", 0, [text, decimalSeparator, groupSeparator], false, true, null, false)); }; Functions.prototype.oct2Bin=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Bin", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Bin", 0, [number, places], false, true, null, false)); }; Functions.prototype.oct2Dec=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Dec", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Dec", 0, [number], false, true, null, false)); }; Functions.prototype.oct2Hex=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Hex", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Hex", 0, [number, places], false, true, null, false)); }; Functions.prototype.odd=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Odd", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Odd", 0, [number], false, true, null, false)); }; Functions.prototype.oddFPrice=function (settlement, maturity, issue, firstCoupon, rate, yld, redemption, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddFPrice", 0, [settlement, maturity, issue, firstCoupon, rate, yld, redemption, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddFPrice", 0, [settlement, maturity, issue, firstCoupon, rate, yld, redemption, frequency, basis], false, true, null, false)); }; Functions.prototype.oddFYield=function (settlement, maturity, issue, firstCoupon, rate, pr, redemption, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddFYield", 0, [settlement, maturity, issue, firstCoupon, rate, pr, redemption, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddFYield", 0, [settlement, maturity, issue, firstCoupon, rate, pr, redemption, frequency, basis], false, true, null, false)); }; Functions.prototype.oddLPrice=function (settlement, maturity, lastInterest, rate, yld, redemption, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddLPrice", 0, [settlement, maturity, lastInterest, rate, yld, redemption, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddLPrice", 0, [settlement, maturity, lastInterest, rate, yld, redemption, frequency, basis], false, true, null, false)); }; Functions.prototype.oddLYield=function (settlement, maturity, lastInterest, rate, pr, redemption, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddLYield", 0, [settlement, maturity, lastInterest, rate, pr, redemption, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddLYield", 0, [settlement, maturity, lastInterest, rate, pr, redemption, frequency, basis], false, true, null, false)); }; Functions.prototype.or=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Or", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Or", 0, [values], false, true, null, false)); }; Functions.prototype.pduration=function (rate, pv, fv) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PDuration", 0, [rate, pv, fv], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PDuration", 0, [rate, pv, fv], false, true, null, false)); }; Functions.prototype.percentRank_Exc=function (array, x, significance) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PercentRank_Exc", 0, [array, x, significance], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PercentRank_Exc", 0, [array, x, significance], false, true, null, false)); }; Functions.prototype.percentRank_Inc=function (array, x, significance) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PercentRank_Inc", 0, [array, x, significance], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PercentRank_Inc", 0, [array, x, significance], false, true, null, false)); }; Functions.prototype.percentile_Exc=function (array, k) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Percentile_Exc", 0, [array, k], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Percentile_Exc", 0, [array, k], false, true, null, false)); }; Functions.prototype.percentile_Inc=function (array, k) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Percentile_Inc", 0, [array, k], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Percentile_Inc", 0, [array, k], false, true, null, false)); }; Functions.prototype.permut=function (number, numberChosen) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Permut", 0, [number, numberChosen], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Permut", 0, [number, numberChosen], false, true, null, false)); }; Functions.prototype.permutationa=function (number, numberChosen) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Permutationa", 0, [number, numberChosen], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Permutationa", 0, [number, numberChosen], false, true, null, false)); }; Functions.prototype.phi=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Phi", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Phi", 0, [x], false, true, null, false)); }; Functions.prototype.pi=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pi", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pi", 0, [], false, true, null, false)); }; Functions.prototype.pmt=function (rate, nper, pv, fv, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pmt", 0, [rate, nper, pv, fv, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pmt", 0, [rate, nper, pv, fv, type], false, true, null, false)); }; Functions.prototype.poisson_Dist=function (x, mean, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Poisson_Dist", 0, [x, mean, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Poisson_Dist", 0, [x, mean, cumulative], false, true, null, false)); }; Functions.prototype.power=function (number, power) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Power", 0, [number, power], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Power", 0, [number, power], false, true, null, false)); }; Functions.prototype.ppmt=function (rate, per, nper, pv, fv, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ppmt", 0, [rate, per, nper, pv, fv, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ppmt", 0, [rate, per, nper, pv, fv, type], false, true, null, false)); }; Functions.prototype.price=function (settlement, maturity, rate, yld, redemption, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Price", 0, [settlement, maturity, rate, yld, redemption, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Price", 0, [settlement, maturity, rate, yld, redemption, frequency, basis], false, true, null, false)); }; Functions.prototype.priceDisc=function (settlement, maturity, discount, redemption, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PriceDisc", 0, [settlement, maturity, discount, redemption, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PriceDisc", 0, [settlement, maturity, discount, redemption, basis], false, true, null, false)); }; Functions.prototype.priceMat=function (settlement, maturity, issue, rate, yld, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PriceMat", 0, [settlement, maturity, issue, rate, yld, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PriceMat", 0, [settlement, maturity, issue, rate, yld, basis], false, true, null, false)); }; Functions.prototype.product=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Product", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Product", 0, [values], false, true, null, false)); }; Functions.prototype.proper=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Proper", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Proper", 0, [text], false, true, null, false)); }; Functions.prototype.pv=function (rate, nper, pmt, fv, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pv", 0, [rate, nper, pmt, fv, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pv", 0, [rate, nper, pmt, fv, type], false, true, null, false)); }; Functions.prototype.quartile_Exc=function (array, quart) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quartile_Exc", 0, [array, quart], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quartile_Exc", 0, [array, quart], false, true, null, false)); }; Functions.prototype.quartile_Inc=function (array, quart) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quartile_Inc", 0, [array, quart], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quartile_Inc", 0, [array, quart], false, true, null, false)); }; Functions.prototype.quotient=function (numerator, denominator) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quotient", 0, [numerator, denominator], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quotient", 0, [numerator, denominator], false, true, null, false)); }; Functions.prototype.radians=function (angle) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Radians", 0, [angle], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Radians", 0, [angle], false, true, null, false)); }; Functions.prototype.rand=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rand", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rand", 0, [], false, true, null, false)); }; Functions.prototype.randBetween=function (bottom, top) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RandBetween", 0, [bottom, top], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RandBetween", 0, [bottom, top], false, true, null, false)); }; Functions.prototype.rank_Avg=function (number, ref, order) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rank_Avg", 0, [number, ref, order], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rank_Avg", 0, [number, ref, order], false, true, null, false)); }; Functions.prototype.rank_Eq=function (number, ref, order) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rank_Eq", 0, [number, ref, order], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rank_Eq", 0, [number, ref, order], false, true, null, false)); }; Functions.prototype.rate=function (nper, pmt, pv, fv, type, guess) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rate", 0, [nper, pmt, pv, fv, type, guess], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rate", 0, [nper, pmt, pv, fv, type, guess], false, true, null, false)); }; Functions.prototype.received=function (settlement, maturity, investment, discount, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Received", 0, [settlement, maturity, investment, discount, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Received", 0, [settlement, maturity, investment, discount, basis], false, true, null, false)); }; Functions.prototype.replace=function (oldText, startNum, numChars, newText) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Replace", 0, [oldText, startNum, numChars, newText], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Replace", 0, [oldText, startNum, numChars, newText], false, true, null, false)); }; Functions.prototype.replaceB=function (oldText, startNum, numBytes, newText) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ReplaceB", 0, [oldText, startNum, numBytes, newText], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ReplaceB", 0, [oldText, startNum, numBytes, newText], false, true, null, false)); }; Functions.prototype.rept=function (text, numberTimes) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rept", 0, [text, numberTimes], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rept", 0, [text, numberTimes], false, true, null, false)); }; Functions.prototype.right=function (text, numChars) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Right", 0, [text, numChars], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Right", 0, [text, numChars], false, true, null, false)); }; Functions.prototype.rightb=function (text, numBytes) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rightb", 0, [text, numBytes], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rightb", 0, [text, numBytes], false, true, null, false)); }; Functions.prototype.roman=function (number, form) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Roman", 0, [number, form], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Roman", 0, [number, form], false, true, null, false)); }; Functions.prototype.round=function (number, numDigits) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Round", 0, [number, numDigits], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Round", 0, [number, numDigits], false, true, null, false)); }; Functions.prototype.roundDown=function (number, numDigits) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RoundDown", 0, [number, numDigits], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RoundDown", 0, [number, numDigits], false, true, null, false)); }; Functions.prototype.roundUp=function (number, numDigits) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RoundUp", 0, [number, numDigits], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RoundUp", 0, [number, numDigits], false, true, null, false)); }; Functions.prototype.rows=function (array) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rows", 0, [array], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rows", 0, [array], false, true, null, false)); }; Functions.prototype.rri=function (nper, pv, fv) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rri", 0, [nper, pv, fv], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rri", 0, [nper, pv, fv], false, true, null, false)); }; Functions.prototype.sec=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sec", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sec", 0, [number], false, true, null, false)); }; Functions.prototype.sech=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sech", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sech", 0, [number], false, true, null, false)); }; Functions.prototype.second=function (serialNumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Second", 0, [serialNumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Second", 0, [serialNumber], false, true, null, false)); }; Functions.prototype.seriesSum=function (x, n, m, coefficients) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SeriesSum", 0, [x, n, m, coefficients], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SeriesSum", 0, [x, n, m, coefficients], false, true, null, false)); }; Functions.prototype.sheet=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sheet", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sheet", 0, [value], false, true, null, false)); }; Functions.prototype.sheets=function (reference) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sheets", 0, [reference], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sheets", 0, [reference], false, true, null, false)); }; Functions.prototype.sign=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sign", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sign", 0, [number], false, true, null, false)); }; Functions.prototype.sin=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sin", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sin", 0, [number], false, true, null, false)); }; Functions.prototype.sinh=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sinh", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sinh", 0, [number], false, true, null, false)); }; Functions.prototype.skew=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Skew", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Skew", 0, [values], false, true, null, false)); }; Functions.prototype.skew_p=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Skew_p", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Skew_p", 0, [values], false, true, null, false)); }; Functions.prototype.sln=function (cost, salvage, life) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sln", 0, [cost, salvage, life], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sln", 0, [cost, salvage, life], false, true, null, false)); }; Functions.prototype.small=function (array, k) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Small", 0, [array, k], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Small", 0, [array, k], false, true, null, false)); }; Functions.prototype.sqrt=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sqrt", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sqrt", 0, [number], false, true, null, false)); }; Functions.prototype.sqrtPi=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SqrtPi", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SqrtPi", 0, [number], false, true, null, false)); }; Functions.prototype.stDevA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDevA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDevA", 0, [values], false, true, null, false)); }; Functions.prototype.stDevPA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDevPA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDevPA", 0, [values], false, true, null, false)); }; Functions.prototype.stDev_P=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDev_P", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDev_P", 0, [values], false, true, null, false)); }; Functions.prototype.stDev_S=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDev_S", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDev_S", 0, [values], false, true, null, false)); }; Functions.prototype.standardize=function (x, mean, standardDev) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Standardize", 0, [x, mean, standardDev], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Standardize", 0, [x, mean, standardDev], false, true, null, false)); }; Functions.prototype.substitute=function (text, oldText, newText, instanceNum) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Substitute", 0, [text, oldText, newText, instanceNum], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Substitute", 0, [text, oldText, newText, instanceNum], false, true, null, false)); }; Functions.prototype.subtotal=function (functionNum) { var values=[]; for (var _i=1; _i < arguments.length; _i++) { values[_i - 1]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Subtotal", 0, [functionNum, values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Subtotal", 0, [functionNum, values], false, true, null, false)); }; Functions.prototype.sum=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sum", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sum", 0, [values], false, true, null, false)); }; Functions.prototype.sumIf=function (range, criteria, sumRange) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumIf", 0, [range, criteria, sumRange], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumIf", 0, [range, criteria, sumRange], false, true, null, false)); }; Functions.prototype.sumIfs=function (sumRange) { var values=[]; for (var _i=1; _i < arguments.length; _i++) { values[_i - 1]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumIfs", 0, [sumRange, values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumIfs", 0, [sumRange, values], false, true, null, false)); }; Functions.prototype.sumSq=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumSq", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumSq", 0, [values], false, true, null, false)); }; Functions.prototype.syd=function (cost, salvage, life, per) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Syd", 0, [cost, salvage, life, per], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Syd", 0, [cost, salvage, life, per], false, true, null, false)); }; Functions.prototype.t=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T", 0, [value], false, true, null, false)); }; Functions.prototype.tbillEq=function (settlement, maturity, discount) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillEq", 0, [settlement, maturity, discount], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillEq", 0, [settlement, maturity, discount], false, true, null, false)); }; Functions.prototype.tbillPrice=function (settlement, maturity, discount) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillPrice", 0, [settlement, maturity, discount], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillPrice", 0, [settlement, maturity, discount], false, true, null, false)); }; Functions.prototype.tbillYield=function (settlement, maturity, pr) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillYield", 0, [settlement, maturity, pr], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillYield", 0, [settlement, maturity, pr], false, true, null, false)); }; Functions.prototype.t_Dist=function (x, degFreedom, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist", 0, [x, degFreedom, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist", 0, [x, degFreedom, cumulative], false, true, null, false)); }; Functions.prototype.t_Dist_2T=function (x, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist_2T", 0, [x, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist_2T", 0, [x, degFreedom], false, true, null, false)); }; Functions.prototype.t_Dist_RT=function (x, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist_RT", 0, [x, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist_RT", 0, [x, degFreedom], false, true, null, false)); }; Functions.prototype.t_Inv=function (probability, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Inv", 0, [probability, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Inv", 0, [probability, degFreedom], false, true, null, false)); }; Functions.prototype.t_Inv_2T=function (probability, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Inv_2T", 0, [probability, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Inv_2T", 0, [probability, degFreedom], false, true, null, false)); }; Functions.prototype.tan=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Tan", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Tan", 0, [number], false, true, null, false)); }; Functions.prototype.tanh=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Tanh", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Tanh", 0, [number], false, true, null, false)); }; Functions.prototype.text=function (value, formatText) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Text", 0, [value, formatText], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Text", 0, [value, formatText], false, true, null, false)); }; Functions.prototype.time=function (hour, minute, second) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Time", 0, [hour, minute, second], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Time", 0, [hour, minute, second], false, true, null, false)); }; Functions.prototype.timevalue=function (timeText) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Timevalue", 0, [timeText], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Timevalue", 0, [timeText], false, true, null, false)); }; Functions.prototype.today=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Today", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Today", 0, [], false, true, null, false)); }; Functions.prototype.trim=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Trim", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Trim", 0, [text], false, true, null, false)); }; Functions.prototype.trimMean=function (array, percent) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TrimMean", 0, [array, percent], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TrimMean", 0, [array, percent], false, true, null, false)); }; Functions.prototype.true=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "True", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "True", 0, [], false, true, null, false)); }; Functions.prototype.trunc=function (number, numDigits) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Trunc", 0, [number, numDigits], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Trunc", 0, [number, numDigits], false, true, null, false)); }; Functions.prototype.type=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Type", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Type", 0, [value], false, true, null, false)); }; Functions.prototype.usdollar=function (number, decimals) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "USDollar", 0, [number, decimals], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "USDollar", 0, [number, decimals], false, true, null, false)); }; Functions.prototype.unichar=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Unichar", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Unichar", 0, [number], false, true, null, false)); }; Functions.prototype.unicode=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Unicode", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Unicode", 0, [text], false, true, null, false)); }; Functions.prototype.upper=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Upper", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Upper", 0, [text], false, true, null, false)); }; Functions.prototype.vlookup=function (lookupValue, tableArray, colIndexNum, rangeLookup) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VLookup", 0, [lookupValue, tableArray, colIndexNum, rangeLookup], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VLookup", 0, [lookupValue, tableArray, colIndexNum, rangeLookup], false, true, null, false)); }; Functions.prototype.value=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Value", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Value", 0, [text], false, true, null, false)); }; Functions.prototype.varA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VarA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VarA", 0, [values], false, true, null, false)); }; Functions.prototype.varPA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VarPA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VarPA", 0, [values], false, true, null, false)); }; Functions.prototype.var_P=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Var_P", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Var_P", 0, [values], false, true, null, false)); }; Functions.prototype.var_S=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Var_S", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Var_S", 0, [values], false, true, null, false)); }; Functions.prototype.vdb=function (cost, salvage, life, startPeriod, endPeriod, factor, noSwitch) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Vdb", 0, [cost, salvage, life, startPeriod, endPeriod, factor, noSwitch], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Vdb", 0, [cost, salvage, life, startPeriod, endPeriod, factor, noSwitch], false, true, null, false)); }; Functions.prototype.weekNum=function (serialNumber, returnType) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WeekNum", 0, [serialNumber, returnType], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WeekNum", 0, [serialNumber, returnType], false, true, null, false)); }; Functions.prototype.weekday=function (serialNumber, returnType) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Weekday", 0, [serialNumber, returnType], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Weekday", 0, [serialNumber, returnType], false, true, null, false)); }; Functions.prototype.weibull_Dist=function (x, alpha, beta, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Weibull_Dist", 0, [x, alpha, beta, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Weibull_Dist", 0, [x, alpha, beta, cumulative], false, true, null, false)); }; Functions.prototype.workDay=function (startDate, days, holidays) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WorkDay", 0, [startDate, days, holidays], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WorkDay", 0, [startDate, days, holidays], false, true, null, false)); }; Functions.prototype.workDay_Intl=function (startDate, days, weekend, holidays) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WorkDay_Intl", 0, [startDate, days, weekend, holidays], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WorkDay_Intl", 0, [startDate, days, weekend, holidays], false, true, null, false)); }; Functions.prototype.xirr=function (values, dates, guess) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xirr", 0, [values, dates, guess], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xirr", 0, [values, dates, guess], false, true, null, false)); }; Functions.prototype.xnpv=function (rate, values, dates) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xnpv", 0, [rate, values, dates], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xnpv", 0, [rate, values, dates], false, true, null, false)); }; Functions.prototype.xor=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xor", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xor", 0, [values], false, true, null, false)); }; Functions.prototype.year=function (serialNumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Year", 0, [serialNumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Year", 0, [serialNumber], false, true, null, false)); }; Functions.prototype.yearFrac=function (startDate, endDate, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YearFrac", 0, [startDate, endDate, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YearFrac", 0, [startDate, endDate, basis], false, true, null, false)); }; Functions.prototype.yield=function (settlement, maturity, rate, pr, redemption, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Yield", 0, [settlement, maturity, rate, pr, redemption, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Yield", 0, [settlement, maturity, rate, pr, redemption, frequency, basis], false, true, null, false)); }; Functions.prototype.yieldDisc=function (settlement, maturity, pr, redemption, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YieldDisc", 0, [settlement, maturity, pr, redemption, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YieldDisc", 0, [settlement, maturity, pr, redemption, basis], false, true, null, false)); }; Functions.prototype.yieldMat=function (settlement, maturity, issue, rate, pr, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YieldMat", 0, [settlement, maturity, issue, rate, pr, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YieldMat", 0, [settlement, maturity, issue, rate, pr, basis], false, true, null, false)); }; Functions.prototype.z_Test=function (array, x, sigma) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Z_Test", 0, [array, x, sigma], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Z_Test", 0, [array, x, sigma], false, true, null, false)); }; Functions.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -21428,8 +25158,12 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); }; + Functions.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; Functions.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}); }; return Functions; }(OfficeExtension.ClientObject)); @@ -21438,6 +25172,7 @@ var Excel; (function (ErrorCodes) { ErrorCodes.accessDenied="AccessDenied"; ErrorCodes.apiNotFound="ApiNotFound"; + ErrorCodes.conflict="Conflict"; ErrorCodes.generalException="GeneralException"; ErrorCodes.insertDeleteConflict="InsertDeleteConflict"; ErrorCodes.invalidArgument="InvalidArgument"; @@ -21449,7 +25184,10 @@ var Excel; ErrorCodes.itemNotFound="ItemNotFound"; ErrorCodes.notImplemented="NotImplemented"; ErrorCodes.unsupportedOperation="UnsupportedOperation"; + ErrorCodes.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"; })(ErrorCodes=Excel.ErrorCodes || (Excel.ErrorCodes={})); })(Excel || (Excel={})); +OfficeExtension.Utility._doApiNotSupportedCheck=true; + diff --git a/node_modules/@microsoft/office-js/dist/excel-ios-16.00.js b/node_modules/@microsoft/office-js/dist/excel-ios-16.00.js index 611e6cf..45effc4 100644 --- a/node_modules/@microsoft/office-js/dist/excel-ios-16.00.js +++ b/node_modules/@microsoft/office-js/dist/excel-ios-16.00.js @@ -1,7 +1,7 @@ /* Excel iOS-specific API library */ -/* Version: 16.0.8118.3000 */ +/* Version: 16.0.8904.3000 */ -/* Office.js Version: 16.0.8119.1000 */ +/* Office.js Version: 16.0.8916.1000 */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ @@ -18,4 +18,4 @@ * @version 2.3.0 */ -var __extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},OsfMsAjaxFactory,OfficeExt,OSF,OSFWebkit,OSFLog,Logger,OSFAriaLogger,OSFAppTelemetry,OfficeExtension,Excel;(function(n){var t=function(){function t(){}var n=!0;return t.prototype.isMsAjaxLoaded=function(){var t="function",i="undefined";return typeof Sys!==i&&typeof Type!==i&&Sys.StringBuilder&&typeof Sys.StringBuilder===t&&Type.registerNamespace&&typeof Type.registerNamespace===t&&Type.registerClass&&typeof Type.registerClass===t&&typeof Function._validateParams===t&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===t?n:!1},t.prototype.loadMsAjaxFull=function(n){var t=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,n)},Object.defineProperty(t.prototype,"msAjaxError",{get:function(){var n=this;return n._msAjaxError==null&&n.isMsAjaxLoaded()&&(n._msAjaxError=Error),n._msAjaxError},set:function(n){this._msAjaxError=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxString",{get:function(){var n=this;return n._msAjaxString==null&&n.isMsAjaxLoaded()&&(n._msAjaxString=String),n._msAjaxString},set:function(n){this._msAjaxString=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxDebug",{get:function(){var n=this;return n._msAjaxDebug==null&&n.isMsAjaxLoaded()&&(n._msAjaxDebug=Sys.Debug),n._msAjaxDebug},set:function(n){this._msAjaxDebug=n},enumerable:n,configurable:n}),t}();n.MicrosoftAjaxFactory=t})(OfficeExt||(OfficeExt={}));OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory;OSF=OSF||{},function(n){var t=function(){function n(n){this._internalStorage=n}return n.prototype.getItem=function(n){try{return this._internalStorage&&this._internalStorage.getItem(n)}catch(t){return null}},n.prototype.setItem=function(n,t){try{this._internalStorage&&this._internalStorage.setItem(n,t)}catch(i){}},n.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(n){}},n.prototype.removeItem=function(n){try{this._internalStorage&&this._internalStorage.removeItem(n)}catch(t){}},n.prototype.getKeysWithPrefix=function(n){var r=[],u,t,i;try{for(u=this._internalStorage&&this._internalStorage.length||0,t=0;t0?i.push(t):t.tabIndex===0&&r.push(t):r.push(t);return i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;return r===0&&(r=i.indexOf(n)-i.indexOf(t)),r}),[].concat(i,r)}var f="focus",e="on",b="configurable",k="writable",o="enumerable",s="undefined",i=!0,t=!1,c=2147483647,n=null,r=-1,l=r,d="&_xdm_Info=",g="&_serializer_version=",nt="_xdm_",ut="_serializer_version=",a="#",tt="&",h="class",v={},ft=3e4,y=n,p=n,u=(new Date).getTime();return{set_entropy:function(n){var t,r,i;if(typeof n=="string")for(t=0;t1?l[l.length-1]:n,s,h,c,a;return u&&o!=n&&(o.indexOf(tt)>=0&&(o=o.split(tt)[0]),o=decodeURIComponent(o)),s=w(),!f&&s&&(h=window.name.indexOf(i),h>r&&(c=window.name.indexOf(";",h),c==r&&(c=window.name.length),a=window.name.substring(h,c),o?s.setItem(a,o):o=s.getItem(a))),o},getConversationId:function(){var i=window.location.search,t=n,r;return i&&(r=i.indexOf("&"),t=r>0?i.substring(1,r):i.substr(1),t&&t.charAt(t.length-1)==="="&&(t=t.substring(0,t.length-1),t&&(t=decodeURIComponent(t)))),t},getInfoItems:function(n){var t=n.split("$");return typeof t[1]==s&&(t=n.split("|")),typeof t[1]==s&&(t=n.split("%7C")),t},getXdmFieldValue:function(n,t){var r="",u=OSF.OUtil.parseXdmInfo(t),i;if(u&&(i=OSF.OUtil.getInfoItems(u),i!=undefined&&i.length>=3))switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]),f;if(u)throw u;for(f in r)if(u=Function._validateParameter(n[f],r[f],f),u)throw u;},writeProfilerMark:function(n){window.msWriteProfilerMark&&(window.msWriteProfilerMark(n),OsfMsAjaxFactory.msAjaxDebug.trace(n))},outputDebug:function(n){typeof OsfMsAjaxFactory!==s&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){var e,f;r=r||{};for(e in u)f=u[e],r[f]==undefined&&(r[f]=i);return Object.defineProperty(n,t,r),n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[o])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[o])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[k,o,b])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[k,o,b])},finalizeProperties:function(n,r){var e,u;r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8,f=e&255,i[t++]=r>>2,i[t++]=(r&3)<<4|u>>4,i[t++]=(u&15)<<2|f>>6,i[t++]=f&63,isNaN(e)||(r=e>>8,u=s&255,f=s>>8,i[t++]=r>>2,i[t++]=(r&3)<<4|u>>4,i[t++]=(u&15)<<2|f>>6,i[t++]=f&63),isNaN(e)?i[t-1]=64:isNaN(s)&&(i[t-2]=64,i[t-1]=64),h=0;h0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){var u,i,f,r;if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(u=[],i=0;in)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=rt(u),o=e?u.length-1:0,u.length===0)return n;while(!h&&o>=0&&on)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=rt(u),l=y(u,e),s=v(u.length,l,o),s<0)return n;while(!c&&s>=0&&s0;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[r%16],r=Math.floor(r/16);for(;t<32;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[Math.floor(Math.random()*16)];return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];return i?(i.name||(i.name=n[this.errorCodes.ooeInternalError].name),i.message||(i.message=n[this.errorCodes.ooeInternalError].message)):i=n[this.errorCodes.ooeInternalError],i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage}}}}(),function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}(),r,i,h,u,c,l,f,a,e,v,y,p,w,b,o,k,d,g,s,nt,tt,it,rt;n.RequirementVersion=ut;r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){var f,u,e,i,r;if(n==undefined)return!1;if(t==undefined&&(t=0),f=this._setMap,u=f._sets,u.hasOwnProperty(n.toLowerCase())){e=u[n.toLowerCase()];try{if((i=this._getVersion(e),t=t+"",r=this._getVersion(t),i.major>0&&i.major>r.major)||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),i=0,r=0;if(t.length<2&&isNaN(Number(n)))throw u;else if(i=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(i)||isNaN(r))throw u;return{minor:r,major:i}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;h=function(n){function i(){n.call(this,{dialogapi:t})}return __extends(i,n),i}(i);n.DefaultDialogSetRequirement=h;u=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelClientDefaultSetRequirement=u;c=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(u);n.ExcelClientV1DefaultSetRequirement=c;l=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookClientDefaultSetRequirement=l;f=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return __extends(i,n),i}(i);n.WordClientDefaultSetRequirement=f;a=function(n){function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return __extends(i,n),i}(f);n.WordClientV1DefaultSetRequirement=a;e=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointClientDefaultSetRequirement=e;v=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(e);n.PowerpointClientV1DefaultSetRequirement=v;y=function(n){function i(){n.call(this,{selection:t,textcoercion:t})}return __extends(i,n),i}(i);n.ProjectClientDefaultSetRequirement=y;p=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return __extends(i,n),i}(i);n.ExcelWebDefaultSetRequirement=p;w=function(n){function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordWebDefaultSetRequirement=w;b=function(n){function i(){n.call(this,{activeview:t,settings:t})}return __extends(i,n),i}(i);n.PowerpointWebDefaultSetRequirement=b;o=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookWebDefaultSetRequirement=o;k=function(n){function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.SwayWebDefaultSetRequirement=k;d=function(n){function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return __extends(i,n),i}(i);n.AccessWebDefaultSetRequirement=d;g=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelIOSDefaultSetRequirement=g;s=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordIOSDefaultSetRequirement=s;nt=function(n){function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return __extends(t,n),t}(s);n.WordIOSV1DefaultSetRequirement=nt;tt=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointIOSDefaultSetRequirement=tt;it=function(n){function i(){n.call(this,{mailbox:t})}return __extends(i,n),i}(i);n.OutlookIOSDefaultSetRequirement=it;rt=function(){function n(){}var t="undefined";return n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},n.getDefaultRequirementMatrix=function(u){var f,e,s,o;return this.initializeDefaultSetMatrix(),f=undefined,e=u.get_requirementMatrix(),e!=undefined&&e.length>0&&typeof JSON!==t?(s=JSON.parse(u.get_requirementMatrix().toLowerCase()),f=new r(new i(s))):(o=n.getClientFullVersionString(u),f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[o]!=undefined?new r(n.DefaultSetArrayMatrix[o]):new r(new i({}))),f},n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix(),e;return f!=undefined&&f.length>0&&typeof JSON!==t?(e=JSON.parse(n.get_requirementMatrix().toLowerCase()),u=new r(new i(e))):u=new r(new h),u},n.getClientFullVersionString=function(n){var i=n.get_appMinorVersion(),u="",r="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;return f&&n.get_appVersion()==1?r=t==4096&&i>=15?"16.00.01":"16.00":n.get_appName()==64?r=n.get_appVersion():(u=i<10?"0"+i:""+i,r=n.get_appVersion()+"."+u),n.get_appName()+"-"+r},n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new c;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new v;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new l;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new w;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new b;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new g;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new k;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new nt;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new tt;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new it},n.Excel_RCLIENT_1600="1-16.00",n.Excel_RCLIENT_1601="1-16.01",n.Word_RCLIENT_1600="2-16.00",n.Word_RCLIENT_1601="2-16.01",n.PowerPoint_RCLIENT_1600="4-16.00",n.PowerPoint_RCLIENT_1601="4-16.01",n.Outlook_RCLIENT_1600="8-16.00",n.Excel_WAC_1600="16-16.00",n.Word_WAC_1600="32-16.00",n.Outlook_WAC_1600="64-16.00",n.Outlook_WAC_1601="64-16.01",n.Project_RCLIENT_1600="128-16.00",n.Access_WAC_1600="256-16.00",n.PowerPoint_WAC_1600="512-16.00",n.Excel_IOS_1600="1024-16.00",n.SWAY_WAC_1600="2048-16.00",n.Word_IOS_1600="4096-16.00",n.Word_IOS_16001="4096-16.00.01",n.PowerPoint_IOS_1600="8192-16.00",n.Outlook_IOS_1600="65536-16.00",n.DefaultSetArrayMatrix={},n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))}(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}return n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n},n.getInstance=function(){return n.hostObj===undefined&&(n.hostObj=new n),n.hostObj},n.prototype.getPlatform=function(){var n=this,t;return n.hostInfo.hostPlatform&&(t=n.hostInfo.hostPlatform.toLowerCase(),n.platformRemappings[t])?n.platformRemappings[t]:null},n.prototype.getHost=function(){var n=this,t;if(n.hostInfo.hostType){if(t=n.hostInfo.hostType.toLowerCase(),n.camelCaseMappings[t])return n.camelCaseMappings[t];if(t=n.capitalizeFirstLetter(n.hostInfo.hostType),Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null},n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null},n}();n.Host=t})(t=n.HostName||(n.HostName={}))}(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){n||(window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,n=!0)},disableShortcut:function(){n&&(t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window),n=!1)}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i,r,o,u,f,e;if(n&&typeof n=="string"&&(r=n.indexOf("#"),r!=-1)){o=n.substring(0,r);u=n.substring(r+1);switch(o){case"binding":case"bindings":u&&(i=new OSF.DDA.BindingPromise(u))}}if(i)return i.onFail=t,i;else if(t)if(f=typeof t,f=="function")e={},e[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(e,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext));else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f);};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this,s,e;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.auth&&OSF.OUtil.defineEnumerableProperty(f,"auth",{value:n.auth});n.get_isDialog()?(e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e})):(t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t}),r&&(s=r.displayName||"appOM",delete r.displayName,OSF.OUtil.defineEnumerableProperty(f,s,{value:r})),u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}}),e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e}))};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this,u;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;return OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext()),n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,e=n.length,o=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){var u,i,r;for(u in n){if(i=n[u],r=t[u],i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw o();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw o();}};f.extractRequiredArguments=function(t,i,r){var f,u,h,s,c,l;if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(c=n.length-1;c>=s;c--){l=n[c];switch(typeof l){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=l;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}if(f=o.fillOptions(f,i,r,u),e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;return o.verifyArguments(t,f),f}var h="function",s=n.length,o=new OSF.DDA.ApiMethodCall(n,t,i,f,e);this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),u=c(n,r,t,i);return o.constructCallArgs(r,u,t,i)};this.processResponse=function(n,t,i,f){return n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n)};this.getCallArgs=function(n){for(var t,u,r,i=n.length-1;i>=s;i--){r=n[i];switch(typeof r){case"object":t=r;break;case h:u=r}}return t=t||{},u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u),t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],i=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],t,i,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback],u,r;f&&(u={},u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?u[OSF.DDA.AsyncResultEnum.Properties.Value]=i:(r={},i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i),f(new OSF.DDA.AsyncResult(u,r)))};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.SyncMethodNames[t]=i};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){function o(n,i,r,u){var o,c,s,h;if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(s=n.length-1;s>=e;s--){h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}return o=f.fillOptions(o,i,r,u),f.verifyArguments(t,o),o}var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),u=o(n,r,t,i);return f.constructCallArgs(r,u,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){function e(i,f){var a=i?{}:undefined,s,h,o,v,c,l;for(s in i){if(h=i[s],OSF.DDA.ListType.isListType(s)){o=[];for(v in h)o.push(e(h[v],f))}else OSF.OUtil.listContainsKey(r,s)?o=r[s][f](h):f==u&&n.preserveNesting(s)?o=e(h,f):(c=t[s],c?(l=c[f],l&&(o=l[h],o===undefined&&(o=h))):o=h);a[s]=o}return a}function l(i,r){var e,u,h,s;for(u in r)h=n.isComplexType(u)?l(i,t[u][o]):i[u],h!=undefined&&(e||(e={}),s=r[u],s==f&&(s=u),e[s]=n.pack(u,h));return e}function s(i,r,e){var o,a,h,l,p,v,y;e||(e={});for(o in r){if(a=r[o],a==f)h=i;else if(a==c){e[o]=i.toArray();continue}else h=i[a];if(h===null||h===undefined)e[o]=undefined;else if(h=n.unpack(o,h),n.isComplexType(o))l=t[o][u],n.preserveNesting(o)?e[o]=s(h,l):s(h,l,e);else if(OSF.DDA.ListType.isListType(o)){l={};p=OSF.DDA.ListType.getDescriptor(o);l[p]=f;v=new Array(h.length);for(y in h)v[y]=s(h[y],l);e[o]=v}else e[o]=h}return e}function a(n,i,r){var f=t[n][r],u,o,c;return r=="toHost"?(o=e(i,r),u=l(o,f)):r==h&&(c=s(i,f),u=e(c,r)),u}var h="fromHost",i=this,o="toHost",u=h,c="sourceData",f="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];t||(t={});i.addMapping=function(n,i){var e,h,c,l,r,s,a,v;if(i.map){e=i.map;h={};for(c in e)l=e[c],l==f&&(l=c),h[l]=c}else e=i.toHost,h=i.fromHost;if(r=t[n],r){s=r[o];for(a in s)e[a]=s[a];s=r[u];for(v in s)h[v]=s[v]}else r=t[n]={};r[o]=e;r[u]=h};i.toHost=function(n,t){return a(n,t,o)};i.fromHost=function(n,t){return a(n,t,u)};i.self=f;i.sourceData=c;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){return this.isDynamicType(n)?t[n].toHost(i):i};i.unpack=function(n,i){return this.isDynamicType(n)?t[n].fromHost(i):i}};OSF.DDA.getDecoratedParameterMap=function(n,t){function r(n){var i=null,r,t;if(n)for(i={},r=n.length,t=0;t0){for(r=[],i=0;i=s)break;if(f=Function._validateParameter(n[e],o,h),f)return f.popStackFrame(),f}return t}),Function._validateParameterCount||(Function._validateParameterCount=function(n,r,u){var f,s,e=r.length,h=n.length,c,l,a;if(he)for(s=i,f=0;f0&&t.push(u)}}catch(s){}return t}var i=[],t={};t[Microsoft.Office.WebExtension.Parameters.Data]=function(){var t=0,i=1;return{toHost:function(n){if(OSF.DDA.TableDataProperties&&typeof n!="string"&&n[OSF.DDA.TableDataProperties.TableRows]!==undefined){var r=[];r[t]=n[OSF.DDA.TableDataProperties.TableRows];r[i]=n[OSF.DDA.TableDataProperties.TableHeaders];n=r}return n},fromHost:function(r){var f,e,u;return r.toArray?(e=r.dimensions(),e===2?f=n(r):(u=r.toArray(),u.length===2&&(u[0]!=null&&u[0].toArray||u[1]!=null&&u[1].toArray)?(f={},f[OSF.DDA.TableDataProperties.TableRows]=n(u[t]),f[OSF.DDA.TableDataProperties.TableHeaders]=n(u[i])):f=u)):f=r,f}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,i,t);this.unpack=function(n,i){var r,u;return this.isComplexType(n)||OSF.DDA.ListType.isListType(n)?(u=(i||typeof i=="unknown")&&i.toArray,r=u?i.toArray():i||{}):r=this.isDynamicType(n)?t[n].fromHost(i):i,r}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(n){function t(n){var i=n,f,r,u;if(OSF.OUtil.isArray(n))for(f=i.length,r=0;r2)for(u=[],o=1;o=n.MESSAGE_TIME_DELTA?(h(),e.lastMessageTimestamp=o):(e.lastMessageTimestamp+=n.MESSAGE_TIME_DELTA,setTimeout(function(){h()},e.lastMessageTimestamp-o)),s},n.prototype.generateCorrelationId=function(){return++this.callingIndex,this.conversationId+this.callingIndex},n.getCurrentTimeMS=function(){return(new Date).getTime()},n.MESSAGE_TIME_DELTA=10,n}();n.WebkitScriptMessaging=i})(t=n.ScriptMessaging||(n.ScriptMessaging={}))}(OSFWebkit||(OSFWebkit={}));OSF.ScriptMessaging=OSFWebkit.ScriptMessaging,function(n){var i,r,t;n.MessageHandlerName="Agave";n.PopupMessageHandlerName="WefPopupHandler",function(n){var t="HostFullVersion",i="HostCustomMessage",r="RequirementMatrix",u="CommerceAllowed",f="TouchEnabled",e="InstanceId",o="CorrelationId",s="APISetVersion",h="SolutionToken",c="ControlIntegrationLevel",l="ActivationMode",a="DocumentUrl",v="BindingCount",y="AppDataLocale",p="APPUILocale",w="AppCapabilities",b="APIVersionSequence",k="RevisionVersion",d="MinorVersion",g="MajorVersion",nt="SolutionReferenceId",tt="Settings";n[n[tt]=0]=tt;n[n[nt]=1]=nt;n[n.AppType=2]="AppType";n[n[g]=3]=g;n[n[d]=4]=d;n[n[k]=5]=k;n[n[b]=6]=b;n[n[w]=7]=w;n[n[p]=8]=p;n[n[y]=9]=y;n[n[v]=10]=v;n[n[a]=11]=a;n[n[l]=12]=l;n[n[c]=13]=c;n[n[h]=14]=h;n[n[s]=15]=s;n[n[o]=16]=o;n[n[e]=17]=e;n[n[f]=18]=f;n[n[u]=19]=u;n[n[r]=20]=r;n[n[i]=21]=i;n[n[t]=22]=t}(n.AppContextProperties||(n.AppContextProperties={}));i=n.AppContextProperties,function(n){var t="GetContext",i="WriteSettings",r="UnregisterEvent",u="RegisterEvent";n[n.Execute=1]="Execute";n[n[u]=2]=u;n[n[r]=3]=r;n[n[i]=4]=i;n[n[t]=5]=t}(n.MethodId||(n.MethodId={}));r=n.MethodId;t=function(){function t(n){this.hostScriptProxy=n}var r="message",i=null;return t.prototype.execute=function(t,r,u){var f=r,e,o;f==i&&(f=[]);e={id:t,apiArgs:f};o=function(t){var e,f,r;if(u){if(e=[],OSF.OUtil.isArray(t))for(f=0;f=2&&(i=t[0],u=t[1]);r&&r(u,new n.WebkitSafeArray(i))},e=function(t){if(u)return u(new n.WebkitSafeArray(t))};this.hostScriptProxy.registerEvent(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.RegisterEvent,t,i,f,e)},t.prototype.unregisterEvent=function(t,i,r){var u=function(t){return r(new n.WebkitSafeArray(t))};this.hostScriptProxy.unregisterEvent(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.UnregisterEvent,t,i,u)},t.prototype.messageParent=function(n){var t=n[Microsoft.Office.WebExtension.Parameters.MessageToParent],i={dialogMessage:{messageType:OSF.DialogMessageType.DialogMessageReceived,messageContent:t}};window.opener.postMessage(JSON.stringify(i),window.location.origin)},t.prototype.openDialog=function(n,u,f,e){function c(t){if(t.origin==window.location.origin)try{var i=JSON.parse(t.data);i.dialogMessage&&f(n,[OSF.DialogMessageType.DialogMessageReceived,i.dialogMessage.messageContent])}catch(r){OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handlered. Message:"+t.data)}}function k(){try{(t.popup==i||t.popup.closed)&&(window.clearInterval(t.interval),window.removeEventListener(r,c),t.NotifyError=i,t.popup=i,f(n,[OSF.DialogMessageType.DialogClosed]))}catch(u){OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed.")}}var l,o,h,y;if(t.popup&&!t.popup.closed){e(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened);return}l="action=displayDialog";t.OpenDialogCallback=undefined;var a="#",s=JSON.parse(u),v=s.url;if(v){o=v.split(a);h="?";o[0].indexOf("?")>-1&&(h="&");var p=screen.width*s.width/100,w=screen.height*s.height/100,b="width="+p+", height="+w;o[0]=o[0].concat(h).concat(l);y=o.join(a);t.popup=window.open(y,"",b);t.OpenDialogCallback=function(i){if(i==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){window.addEventListener(r,c);this.messageEventListener=c;t.interval=window.setInterval(k,1e3);function u(t){f(n,[t])}t.NotifyError=u}e(i)}}},t.prototype.closeDialog=function(n,u,f){t.popup?(t.interval&&window.clearInterval(t.interval),t.popup.close(),t.popup=i,window.removeEventListener(r,this.messageEventListener),t.NotifyError=i,f(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)):f(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)},t.prototype.sendMessage=function(){},t}();n.WebkitHostController=t}(OSFWebkit||(OSFWebkit={}));OSF.Webkit=OSFWebkit;OSF.ClientHostController=new OSFWebkit.WebkitHostController(OSF.ScriptMessaging.GetScriptMessenger());OSF.DDA.ClientSettingsManager={getSettingsExecuteMethod:function(n){return function(t){var i,r,u=function(n,i){t.onReceiving&&t.onReceiving();t.onComplete&&t.onComplete(n,i)};try{n(t.hostCallArgs,t.onCalling,u)}catch(f){i=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;r={name:Strings.OfficeOM.L_InternalError,message:f};u(i,r)}}},read:function(n,t){var u=[],f=[],i,r;n&&n();i=OSF._OfficeAppFactory.getInitializationHelper();r=function(n){t&&t(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,n.get_settings())};i.getAppContext(null,r)},write:function(n,t,i,r){var u={},e=[],o=[],f,s;for(f in n)e.push(f),o.push(n[f]);u.keys=e;u.values=o;i&&i();s=function(n){r&&r(n[0],null)};OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.WriteSettings,u,s)}};OSF.InitializationHelper.prototype.initializeSettings=function(n,t){var i=n.get_settings();return this.deserializeSettings(i,t)};OSF.InitializationHelper.prototype.getAppContext=function(n,t){var r=function(n){for(var f,i=OSF.Webkit.AppContextProperties,h=n[i.AppType],e=n[i.Settings],o={},s=e[0],c=e[1],r=0;r40)&&(n=OSF.OUtil.Guid.generateNewGuid(),t.setValue(t.clientIDKey,n)),n},n.prototype.saveLog=function(n,t){var i=this,u=i.getValue(i.logIdSetKey);u=(u&&u.length>0?u+";":r)+n;i.setValue(i.logIdSetKey,u);i.setValue(n,t)},n.prototype.enumerateLog=function(n,t){var i=this,e=i.getValue(i.logIdSetKey),u,o,r,f;if(e){u=e.split(";");for(o in u)r=u[o],f=i.getValue(r),f&&(n&&n(r,f),t&&i.remove(r));t&&i.remove(i.logIdSetKey)}},n.prototype.getValue=function(n){var t=OSF.OUtil.getLocalStorage(),i=r;return t&&(i=t.getItem(n)),i},n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)},n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}},n}(),o=function(){function n(){}return n.prototype.LogData=function(n){OSF.Logger&&(OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n.SerializeRow(),OSF.Logger.SendFlag.none),OSFAriaLogger.AriaLogger.getInstance().logData(n))},n.prototype.LogRawData=function(n){if(OSF.Logger){OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n,OSF.Logger.SendFlag.none);try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(n))}catch(t){}}},n}();n.initialize=v;n.onAppActivated=y;n.onScriptDone=p;n.onCallDone=w;n.onMethodDone=b;n.onPropertyDone=k;n.onEventDone=d;n.onRegisterDone=g;n.onAppClosed=nt;n.setOsfControlAppCorrelationId=tt;n.doAppInitializationLogging=c;n.logAppCommonMessage=it;n.logAppException=rt;OSF.AppTelemetry=n}(OSFAppTelemetry||(OSFAppTelemetry={}));Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(n){var i=this,r,t,u;i._eventHandlers={};i._objectEventHandlers={};i._queuedEventsArgs={};for(r in n)t=n[r],u=t=="objectDeleted"||t=="objectSelectionChanged"||t=="objectDataChanged"||t=="contentControlAdded",u?i._objectEventHandlers[t]={}:i._eventHandlers[t]=[],i._queuedEventsArgs[t]=[]};OSF.EventDispatch.prototype={getSupportedEvents:function(){var n=[];for(var t in this._eventHandlers)n.push(t);for(t in this._objectEventHandlers)n.push(t);return n},supportsEvent:function(n){for(var t in this._eventHandlers)if(n==t)return!0;for(t in this._objectEventHandlers)if(n==t)return!0;return!1},hasEventHandler:function(n,t){var i=this._eventHandlers[n],r;if(i&&i.length>0)for(r in i)if(i[r]===t)return!0;return!1},hasObjectEventHandler:function(n,t,i){var f=this._objectEventHandlers[n],r,u;if(f!=null)for(r=f[t],u=0;r!=null&&u0)for(r=0;r0?(this._eventHandlers[n]=[],!0):!1},clearObjectEventHandlers:function(n,t){return this._objectEventHandlers[n]!=null&&this._objectEventHandlers[n][t]!=null?(this._objectEventHandlers[n][t]=[],!0):!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},getObjectEventHandlerCount:function(n,t){return this._objectEventHandlers[n]==null||this._objectEventHandlers[n][t]==null?0:this._objectEventHandlers[n][t].length},fireEvent:function(n){var t,i,r;if(n.type==undefined)return!1;if(t=n.type,t&&this._eventHandlers[t]){i=this._eventHandlers[t];for(r in i)i[r](n);return!0}else return!1},fireObjectEvent:function(n,t){var i,f,r,u;if(t.type==undefined)return!1;if(i=t.type,i&&this._objectEventHandlers[i]&&(f=this._objectEventHandlers[i],r=f[n],r!=null)){for(u=0;u0)){for(r=t[0];i.length>0;)u=i.shift(),r(u);return!0}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var f="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(n,i[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]=="outlook"||OSF._OfficeAppFactory.getHostInfo()[f]=="outlookwebapp")r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i),t.initialize(r.initialData),t.setCurrentItemNumber(r.itemNumber.itemNumber);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var i=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),t=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];t(arguments,i,n)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(n){var i=OSF.DDA.SyncMethodNames.MessageParent.displayName,t=this,r;t[i]||OSF.OUtil.defineEnumerableProperty(t,i,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return n(arguments,t)}});r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;t[r]||typeof OSF.DialogParentMessageEventDispatch=="undefined"||OSF.DDA.DispIdHost.addEventSupport(t,OSF.DialogParentMessageEventDispatch,n);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(n){n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:n[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}}],privateStateCallbacks:[],onSucceeded:function(n){var f=n[Microsoft.Office.WebExtension.Parameters.Id],i=n[Microsoft.Office.WebExtension.Parameters.Data],t=new OSF.DialogHandler,e=OSF.DDA.AsyncMethodNames.CloseAsync.displayName,r,u;return OSF.OUtil.defineEnumerableProperty(t,e,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];n(arguments,f,i,t)}}),r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName,OSF.OUtil.defineEnumerableProperty(t,r,{value:function(){var r=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],n=r.verifyAndExtractCall(arguments,t,i),u=n[Microsoft.Office.WebExtension.Parameters.EventType],f=n[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(u,f)}}),u=OSF.DDA.SyncMethodNames.SendMessage.displayName,OSF.OUtil.defineEnumerableProperty(t,u,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return n(arguments,i,t)}}),t},checkCallArgs:function(n){return n[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Width]=1),n[Microsoft.Office.WebExtension.Parameters.Width]>100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99),n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1),n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99),n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(n){try{n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,n);OSF.ClientHostController.openDialog(n.dispId,n.targetId,function(t,i){n.onEvent&&n.onEvent(i);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(n){n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,n);try{OSF.ClientHostController.closeDialog(n.dispId,n.targetId,t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.messageParent=function(n){try{n.onCalling&&n.onCalling();var i=(new Date).getTime(),t=OSF.ClientHostController.messageParent(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs((new Date).getTime()-i),t),t}catch(r){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(r)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.sendMessage=function(n){try{n.onCalling&&n.onCalling();var r=(new Date).getTime(),t=OSF.ClientHostController.sendMessage(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),t}catch(i){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(i)}};Microsoft.Office.WebExtension.TableData=function(n,t){function i(n){if(n==null||n==undefined)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(n,2);t<2;t++)n=[n];return n}catch(i){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(n){t=i(n)}},rows:{get:function(){return n},set:function(t){n=t==null||OSF.OUtil.isArray(t)&&t.length==0?[]:i(t)}}});this.headers=t;this.rows=n};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(n){return new Microsoft.Office.WebExtension.TableData(n[OSF.DDA.TableDataProperties.TableRows],n[OSF.DDA.TableDataProperties.TableHeaders])};Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var n=null;return{findArrayDimensionality:function(n){if(OSF.OUtil.isArray(n)){for(var t=0,i=0;i6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix&&(i=new Date(parseInt(t.slice(5,-1))),i)?i:t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,!0);r[i]=t}catch(u){}}return r}};OSF.DDA.Settings=function(n){var t="name",i;n=n||{};i=function(n){var i=OSF.OUtil.getSessionStorage(),t,r;i&&(t=OSF.DDA.SettingsManager.serializeSettings(n),r=JSON?JSON.stringify(t):Sys.Serialization.JavaScriptSerializer.serialize(t),i.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),r))};OSF.OUtil.defineEnumerableProperties(this,{get:{value:function(i){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]),r;if(u)throw u;return r=n[i],typeof r=="undefined"?null:r}},set:{value:function(r,u){var f=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1},{name:"value",mayBeNull:!0}]);if(f)throw f;n[r]=u;i(n)}},remove:{value:function(r){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]);if(u)throw u;delete n[r];i(n)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],n)};OSF.DDA.RefreshableSettings=function(n){OSF.DDA.RefreshableSettings.uber.constructor.call(this,n);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],n);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:n}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(n,t){return t}}],onSucceeded:function(n,t,i){var f=n[OSF.DDA.SettingsManager.SerializedSettings],u=OSF.DDA.SettingsManager.deserializeSettings(f),e=i[OSF.DDA.SettingsManager.RefreshingSettings];for(var r in e)t.remove(r);for(r in u)t.set(r,u[r]);return t}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(n,t){return OSF.DDA.SettingsManager.serializeSettings(t)}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});Microsoft.Office.WebExtension.BindingType={Table:"table",Text:"text",Matrix:"matrix"};OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType};OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{BindingList:"BindingList"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{Subset:"subset",BindingProperties:"BindingProperties"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList,OSF.DDA.PropertyDescriptors.BindingProperties);OSF.DDA.BindingPromise=function(n,t){this._id=n;OSF.OUtil.defineEnumerableProperty(this,"onFail",{get:function(){return t},set:function(n){var i=typeof n;if(i!="undefined"&&i!="function")throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,i);t=n}})};OSF.DDA.BindingPromise.prototype={_fetch:function(n){var t=this,i;return t.binding?n&&n(t.binding):t._binding||(i=t,Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(t._id,function(t){t.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded?(OSF.OUtil.defineEnumerableProperty(i,"binding",{value:t.value}),n&&n(i.binding)):i.onFail&&i.onFail(t)})),t},getDataAsync:function(){var n=arguments;return this._fetch(function(t){t.getDataAsync.apply(t,n)}),this},setDataAsync:function(){var n=arguments;return this._fetch(function(t){t.setDataAsync.apply(t,n)}),this},addHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.addHandlerAsync.apply(t,n)}),this},removeHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.removeHandlerAsync.apply(t,n)}),this}};OSF.DDA.BindingFacade=function(n){this._eventDispatches=[];OSF.OUtil.defineEnumerableProperty(this,"document",{value:n});var t=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[t.AddFromSelectionAsync,t.AddFromNamedItemAsync,t.GetAllAsync,t.GetByIdAsync,t.ReleaseByIdAsync])};OSF.DDA.UnknownBinding=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}})};OSF.DDA.Binding=function(n,t){var r,u,i,f;OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}});r=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[r.GetDataAsync,r.SetDataAsync]);u=Microsoft.Office.WebExtension.EventType;i=t.bindings._eventDispatches;i[n]||(i[n]=new OSF.EventDispatch([u.BindingSelectionChanged,u.BindingDataChanged]));f=i[n];OSF.DDA.DispIdHost.addEventSupport(this,f)};OSF.DDA.generateBindingId=function(){return"UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+(new Date).getTime()};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureBinding=function(n,t){var r=n[OSF.DDA.BindingProperties.Id],u=n[OSF.DDA.BindingProperties.RowCount],f=n[OSF.DDA.BindingProperties.ColumnCount],s=n[OSF.DDA.BindingProperties.HasHeaders],i,e,o;switch(n[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:i=new OSF.DDA.TextBinding(r,t);break;case Microsoft.Office.WebExtension.BindingType.Matrix:i=new OSF.DDA.MatrixBinding(r,t,u,f);break;case Microsoft.Office.WebExtension.BindingType.Table:e=function(){return OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument};o=e()&&OSF.DDA.ExcelTableBinding?OSF.DDA.ExcelTableBinding:OSF.DDA.TableBinding;i=new o(r,t,u,f,s);break;default:i=new OSF.DDA.UnknownBinding(r,t)}return i};OSF.DDA.AsyncMethodNames.addNames({AddFromSelectionAsync:"addFromSelectionAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:"getByIdAsync",ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync"}),function(){function u(n){return OSF.DDA.OMFactory.manufactureBinding(n,Microsoft.Office.WebExtension.context.document)}function f(n){return n.id}function e(n,t,i){var u=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&u&&(u[OSF.DDA.TableDataProperties.TableRows]!=undefined||u[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(u=OSF.DDA.OMFactory.manufactureTableData(u)),u=OSF.DDA.DataCoercion.coerceData(u,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),u==undefined?r:u}var t="number",i="object",n="string",r=null;OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:[n]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return!0}}],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.BindingList],u)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n,t,i){var r=i[Microsoft.Office.WebExtension.Parameters.Id];delete t._eventDispatches[r]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n,t){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&n[Microsoft.Office.WebExtension.Parameters.RowCount]==0&&n[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn],delete n[Microsoft.Office.WebExtension.Parameters.RowCount],delete n[Microsoft.Office.WebExtension.Parameters.ColumnCount]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]||n[Microsoft.Office.WebExtension.Parameters.RowCount]||n[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[n,i,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}]})}();OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.MatrixBinding=function(n,t,i,r){OSF.DDA.MatrixBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Matrix},rowCount:{value:i?i:0},columnCount:{value:r?r:0}})};OSF.OUtil.extend(OSF.DDA.MatrixBinding,OSF.DDA.Binding);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.BindingProperties,fromHost:[{name:OSF.DDA.BindingProperties.Id,value:0},{name:OSF.DDA.BindingProperties.Type,value:1},{name:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,value:2}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.BindingType,toHost:[{name:Microsoft.Office.WebExtension.BindingType.Text,value:0},{name:Microsoft.Office.WebExtension.BindingType.Matrix,value:1},{name:Microsoft.Office.WebExtension.BindingType.Table,value:2}],invertible:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,value:0},{name:Microsoft.Office.WebExtension.Parameters.Id,value:1},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:2},{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseBindingMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAllBindingsMethod,fromHost:[{name:OSF.DDA.ListDescriptors.BindingList,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:2},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:3},{name:OSF.DDA.PropertyDescriptors.Subset,value:4}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.Data,value:2},{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,fromHost:[{name:OSF.DDA.BindingProperties.RowCount,value:0},{name:OSF.DDA.BindingProperties.ColumnCount,value:1},{name:OSF.DDA.BindingProperties.HasHeaders,value:2}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.Subset,toHost:[{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:0},{name:OSF.DDA.SafeArray.UniqueArguments.Run,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Offset,toHost:[{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:0},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Run,toHost:[{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:0},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddColumnsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearAllRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{TableDataProperties:"TableDataProperties"});OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};OSF.DDA.TableBinding=function(n,t,i,r,u){OSF.DDA.TableBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:i?i:0},columnCount:{value:r?r:0},hasHeaders:{value:u?u:!1}});var f=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[f.AddRowsAsync,f.AddColumnsAsync,f.DeleteAllDataValuesAsync])};OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync"}),function(){function n(n){return n.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]})}();OSF.DDA.TextBinding=function(n,t){OSF.DDA.TextBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperty(this,"type",{value:Microsoft.Office.WebExtension.BindingType.Text})};OSF.OUtil.extend(OSF.DDA.TextBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddFromPromptAsync:"addFromPromptAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromPromptAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:["string"],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.PromptText,value:{types:["string"],calculate:function(){return Strings.OfficeOM.L_AddBindingFromPromptDefaultText}}},{name:Microsoft.Office.WebExtension.Parameters.SampleData,value:{types:["object"],defaultValue:null}}],privateStateCallbacks:[],onSucceeded:function(n){return OSF.DDA.OMFactory.manufactureBinding(n,Microsoft.Office.WebExtension.context.document)}});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromPromptMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:1},{name:Microsoft.Office.WebExtension.Parameters.PromptText,value:2}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"});OSF.DDA.DocumentSelectionChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:n}})};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDeleted:"objectDeleted"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectSelectionChanged:"objectSelectionChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDataChanged:"objectDataChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ContentControlAdded:"contentControlAdded"});OSF.DDA.ObjectEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:n},object:{value:t}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDeletedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDataChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidContentControlAddedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{BindingSelectionChanged:"bindingSelectionChanged",BindingDataChanged:"bindingDataChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{BindingSelectionChangedEvent:"BindingSelectionChangedEvent"});OSF.DDA.BindingSelectionChangedEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingSelectionChanged},binding:{value:n}});for(var i in t)OSF.OUtil.defineEnumerableProperty(this,i,{value:t[i]})};OSF.DDA.BindingDataChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingDataChanged},binding:{value:n}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:0},{name:OSF.DDA.PropertyDescriptors.Subset,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingDataChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FilterType,{OnlyVisible:"onlyVisible"});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.OnlyVisible,value:1}]});Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"};Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"};Microsoft.Office.WebExtension.Index={First:"first",Last:"last",Next:"next",Previous:"previous"};OSF.DDA.AsyncMethodNames.addNames({GoToByIdAsync:"goToByIdAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GoToByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string","number"]},{name:Microsoft.Office.WebExtension.Parameters.GoToType,"enum":Microsoft.Office.WebExtension.GoToType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:{"enum":Microsoft.Office.WebExtension.SelectionMode,defaultValue:Microsoft.Office.WebExtension.SelectionMode.Default}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:0},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:1},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:2},{name:Microsoft.Office.WebExtension.GoToType.Index,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:0},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:1},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:1},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:2}]});OSF.DDA.AsyncMethodNames.addNames({ExecuteRichApiRequestAsync:"executeRichApiRequestAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[]});OSF.OUtil.setNamespace("RichApi",OSF.DDA);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidExecuteRichApiRequestMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(n){OSF.OUtil.defineEnumerableProperties(this,{url:{value:n[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(n){return new Microsoft.Office.WebExtension.FileProperties(n)}});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,fromHost:[{name:OSF.DDA.FilePropertiesDescriptor.Url,value:0}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.ExcelTableBinding=function(n,t,i,r,u){var f=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[f.ClearFormatsAsync,f.SetTableOptionsAsync,f.SetFormatsAsync]);OSF.DDA.ExcelTableBinding.uber.constructor.call(this,n,t,i,r,u);OSF.OUtil.finalizeProperties(this)};OSF.OUtil.extend(OSF.DDA.ExcelTableBinding,OSF.DDA.TableBinding),function(){var t="number",n="object",i="string";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[i,n,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:[n],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:[n],defaultValue:[]}}],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[i,n,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[n,i],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[n],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:[n],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:[n],defaultValue:[]}}],checkCallArgs:function(n,t){var i=Microsoft.Office.WebExtension.Parameters;if(n[i.StartRow]==0&&n[i.StartColumn]==0&&OSF.OUtil.isArray(n[i.CellFormat])&&n[i.CellFormat].length===0&&OSF.OUtil.isArray(n[i.TableOptions])&&n[i.TableOptions].length===0&&(delete n[i.StartRow],delete n[i.StartColumn],delete n[i.CellFormat],delete n[i.TableOptions]),n[i.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[i.StartRow]&&n[i.StartRow]!=0||n[i.StartColumn]&&n[i.StartColumn]!=0||n[i.CellFormat]||n[i.TableOptions]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:function(n){return n.id}}]});OSF.DDA.BindingPromise.prototype.setTableOptionsAsync=function(){var n=arguments;return this._fetch(function(t){t.setTableOptionsAsync.apply(t,n)}),this};OSF.DDA.BindingPromise.prototype.setFormatsAsync=function(){var n=arguments;return this._fetch(function(t){t.setFormatsAsync.apply(t,n)}),this};OSF.DDA.BindingPromise.prototype.clearFormatsAsync=function(){var n=arguments;return this._fetch(function(t){t.clearFormatsAsync.apply(t,n)}),this}}(),function(){function n(n){return n.id}OSF.DDA.AsyncMethodNames.addNames({ClearFormatsAsync:"clearFormatsAsync",SetTableOptionsAsync:"setTableOptionsAsync",SetFormatsAsync:"setFormatsAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ClearFormatsAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetTableOptionsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TableOptions,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetFormatsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CellFormat,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]})}();Microsoft.Office.WebExtension.Table={All:0,Data:1,Headers:2},function(){var u="undefined",e="auto fit",o="distributed",f="none";OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearFormatsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetTableOptionsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetFormatsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:2},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.Data,value:2},{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:3},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:4},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:5}]});var s={headerRow:0,bandedRows:1,firstColumn:2,lastColumn:3,bandedColumns:4,filterButton:5,style:6,totalRow:7},h={row:0,column:1},t={alignHorizontal:{text:"alignHorizontal",type:1},alignVertical:{text:"alignVertical",type:2},backgroundColor:{text:"backgroundColor",type:101},borderStyle:{text:"borderStyle",type:201},borderColor:{text:"borderColor",type:202},borderTopStyle:{text:"borderTopStyle",type:203},borderTopColor:{text:"borderTopColor",type:204},borderBottomStyle:{text:"borderBottomStyle",type:205},borderBottomColor:{text:"borderBottomColor",type:206},borderLeftStyle:{text:"borderLeftStyle",type:207},borderLeftColor:{text:"borderLeftColor",type:208},borderRightStyle:{text:"borderRightStyle",type:209},borderRightColor:{text:"borderRightColor",type:210},borderOutlineStyle:{text:"borderOutlineStyle",type:211},borderOutlineColor:{text:"borderOutlineColor",type:212},borderInlineStyle:{text:"borderInlineStyle",type:213},borderInlineColor:{text:"borderInlineColor",type:214},fontFamily:{text:"fontFamily",type:301},fontStyle:{text:"fontStyle",type:302},fontSize:{text:"fontSize",type:303},fontUnderlineStyle:{text:"fontUnderlineStyle",type:304},fontColor:{text:"fontColor",type:305},fontDirection:{text:"fontDirection",type:306},fontStrikethrough:{text:"fontStrikethrough",type:307},fontSuperscript:{text:"fontSuperscript",type:308},fontSubscript:{text:"fontSubscript",type:309},fontNormal:{text:"fontNormal",type:310},indentLeft:{text:"indentLeft",type:401},indentRight:{text:"indentRight",type:402},numberFormat:{text:"numberFormat",type:501},width:{text:"width",type:701},height:{text:"height",type:702},wrapping:{text:"wrapping",type:703}},r=[{name:f,value:0},{name:"thin",value:1},{name:"medium",value:2},{name:"dashed",value:3},{name:"dotted",value:4},{name:"thick",value:5},{name:"double",value:6},{name:"hair",value:7},{name:"medium dashed",value:8},{name:"dash dot",value:9},{name:"medium dash dot",value:10},{name:"dash dot dot",value:11},{name:"medium dash dot dot",value:12},{name:"slant dash dot",value:13}],i=[{name:f,value:0},{name:"black",value:1},{name:"blue",value:2},{name:"gray",value:3},{name:"green",value:4},{name:"orange",value:5},{name:"pink",value:6},{name:"purple",value:7},{name:"red",value:8},{name:"teal",value:9},{name:"turquoise",value:10},{name:"violet",value:11},{name:"white",value:12},{name:"yellow",value:13},{name:"automatic",value:14}],n=OSF.DDA.SafeArray.Delegate.ParameterMap;n.define({type:t.alignHorizontal.text,toHost:[{name:"general",value:0},{name:"left",value:1},{name:"center",value:2},{name:"right",value:3},{name:"fill",value:4},{name:"justify",value:5},{name:"center across selection",value:6},{name:o,value:7}]});n.define({type:t.alignVertical.text,toHost:[{name:"top",value:0},{name:"center",value:1},{name:"bottom",value:2},{name:"justify",value:3},{name:o,value:4}]});n.define({type:t.backgroundColor.text,toHost:i});n.define({type:t.borderStyle.text,toHost:r});n.define({type:t.borderColor.text,toHost:i});n.define({type:t.borderTopStyle.text,toHost:r});n.define({type:t.borderTopColor.text,toHost:i});n.define({type:t.borderBottomStyle.text,toHost:r});n.define({type:t.borderBottomColor.text,toHost:i});n.define({type:t.borderLeftStyle.text,toHost:r});n.define({type:t.borderLeftColor.text,toHost:i});n.define({type:t.borderRightStyle.text,toHost:r});n.define({type:t.borderRightColor.text,toHost:i});n.define({type:t.borderOutlineStyle.text,toHost:r});n.define({type:t.borderOutlineColor.text,toHost:i});n.define({type:t.borderInlineStyle.text,toHost:r});n.define({type:t.borderInlineColor.text,toHost:i});n.define({type:t.fontStyle.text,toHost:[{name:"regular",value:0},{name:"italic",value:1},{name:"bold",value:2},{name:"bold italic",value:3}]});n.define({type:t.fontUnderlineStyle.text,toHost:[{name:f,value:0},{name:"single",value:1},{name:"double",value:2},{name:"single accounting",value:3},{name:"double accounting",value:4}]});n.define({type:t.fontColor.text,toHost:i});n.define({type:t.fontDirection.text,toHost:[{name:"context",value:0},{name:"left-to-right",value:1},{name:"right-to-left",value:2}]});n.define({type:t.width.text,toHost:[{name:e,value:-1}]});n.define({type:t.height.text,toHost:[{name:e,value:-1}]});n.define({type:Microsoft.Office.WebExtension.Parameters.TableOptions,toHost:[{name:"headerRow",value:0},{name:"bandedRows",value:1},{name:"firstColumn",value:2},{name:"lastColumn",value:3},{name:"bandedColumns",value:4},{name:"filterButton",value:5},{name:"style",value:6},{name:"totalRow",value:7}]});n.dynamicTypes[Microsoft.Office.WebExtension.Parameters.CellFormat]={toHost:function(t){for(var i in t)t[i].format&&(t[i].format=n.doMapValues(t[i].format,"toHost"));return t},fromHost:function(n){return n}};n.setDynamicType(Microsoft.Office.WebExtension.Parameters.CellFormat,{toHost:function(n){var c="cells",y="format",w=0,b=1,p=[],l,i,r,f,e,o,a,v,s;for(l in n){if(i=n[l],r=[],typeof i[c]!==u){if(f=i[c],typeof i[c]=="object"){e=[];for(o in f)typeof h[o]!==u&&(e[h[o]]=f[o])}else e=f;r[w]=e}if(i[y]){a=i[y];v=[];for(s in a)typeof t[s]!==u&&v.push([t[s].type,a[s]]);r[b]=v}p[l]=r}return p},fromHost:function(n){return n}});n.setDynamicType(Microsoft.Office.WebExtension.Parameters.TableOptions,{toHost:function(n){var i=[];for(var t in n)typeof s[t]!==u&&(i[s[t]]=n[t]);return i},fromHost:function(n){return n}})}();OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType,{Image:"image"});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.CoercionType,toHost:[{name:Microsoft.Office.WebExtension.CoercionType.Image,value:8}]});OSF.DDA.ExcelDocument=function(n,t){var i=this,r=new OSF.DDA.BindingFacade(i);OSF.DDA.DispIdHost.addAsyncMethods(r,[OSF.DDA.AsyncMethodNames.AddFromPromptAsync]);OSF.DDA.DispIdHost.addAsyncMethods(i,[OSF.DDA.AsyncMethodNames.GoToByIdAsync]);OSF.DDA.DispIdHost.addAsyncMethods(i,[OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync]);OSF.DDA.ExcelDocument.uber.constructor.call(i,n,r,t);OSF.OUtil.finalizeProperties(i)};OSF.OUtil.extend(OSF.DDA.ExcelDocument,OSF.DDA.JsomDocument);OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(n,t){OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM);n.doc=new OSF.DDA.ExcelDocument(n,this._initializeSettings(n,!0));OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi,[OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]);t()},function(){var t="boolean",n="number",i="object";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string",i,n,t]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:[n,i],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:[n,i],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[n,t],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[n,t],defaultValue:!1}}],privateStateCallbacks:[]})}();__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t=function(){function n(n,t){this.m_actionInfo=n;this.m_isWriteOperation=t}return Object.defineProperty(n.prototype,"actionInfo",{get:function(){return this.m_actionInfo},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},enumerable:!0,configurable:!0}),n}();n.Action=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createSetPropertyAction=function(t,i,r,u){var f;n.Utility.validateObjectPath(i);var e={Id:t._nextId(),ActionType:4,Name:r,ObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},s=[u],o=n.Utility.setMethodArguments(t,e.ArgumentInfo,s);return n.Utility.validateReferencedObjectPaths(o),f=new n.Action(e,!0),t._pendingRequest.addAction(f),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addReferencedObjectPaths(o),f},t.createMethodAction=function(t,i,r,u,f){var e,o,h,s;return n.Utility.validateObjectPath(i),e={Id:t._nextId(),ActionType:3,Name:r,ObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},o=n.Utility.setMethodArguments(t,e.ArgumentInfo,f),n.Utility.validateReferencedObjectPaths(o),h=u!=1,s=new n.Action(e,h),t._pendingRequest.addAction(s),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addReferencedObjectPaths(o),s},t.createQueryAction=function(t,i,r){var u,f;return n.Utility.validateObjectPath(i),u={Id:t._nextId(),ActionType:2,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},u.QueryInfo=r,f=new n.Action(u,!1),t._pendingRequest.addAction(f),t._pendingRequest.addReferencedObjectPath(i._objectPath),f},t.createRecursiveQueryAction=function(t,i,r){n.Utility.validateObjectPath(i);var f={Id:t._nextId(),ActionType:6,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id,RecursiveQueryInfo:r},u=new n.Action(f,!1);return t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u},t.createInstantiateAction=function(t,i){n.Utility.validateObjectPath(i);var u={Id:t._nextId(),ActionType:1,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},r=new n.Action(u,!1);return t._pendingRequest.addAction(r),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addActionResultHandler(r,new n.InstantiateActionResultHandler(i)),r},t.createTraceAction=function(t,i,r){var u={Id:t._nextId(),ActionType:5,Name:"Trace",ObjectPathId:0},f=new n.Action(u,!1);return t._pendingRequest.addAction(f),r&&t._pendingRequest.addTrace(u.Id,i),f},t}();n.ActionFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(t,i){n.Utility.checkArgumentNull(t,"context");this.m_context=t;this.m_objectPath=i;this.m_objectPath&&(t._processingResult||(n.ActionFactory.createInstantiateAction(t,this),t._autoCleanup&&this._KeepReference&&t.trackedObjects._autoAdd(this)))}return Object.defineProperty(t.prototype,"context",{get:function(){return this.m_context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_objectPath",{get:function(){return this.m_objectPath},set:function(n){this.m_objectPath=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNull",{get:function(){return n.Utility.throwIfNotLoaded("isNull",this._isNull,null,this._isNull),this._isNull},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNullObject",{get:function(){return n.Utility.throwIfNotLoaded("isNullObject",this._isNull,null,this._isNull),this._isNull},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_isNull",{get:function(){return this.m_isNull},set:function(n){this.m_isNull=n;n&&this.m_objectPath&&this.m_objectPath._updateAsNullObject()},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){this._isNull=n.Utility.isNullOrUndefined(t);this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this,t)},t.prototype._handleIdResult=function(t){this._isNull=n.Utility.isNullOrUndefined(t);n.Utility.fixObjectPathIfNecessary(this,t);this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this,t)},t.prototype._recursivelySet=function(i,r,u,f,e){var l=i instanceof t,o,s,h,c;if(l)if(Object.getPrototypeOf(this)===Object.getPrototypeOf(i))i=JSON.parse(JSON.stringify(i));else throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"properties",errorLocation:this._className+".set"});try{for(s=0;s0},enumerable:!0,configurable:!0}),t.prototype.addTrace=function(n,t){this.m_traceInfos[n]=t},t.prototype.addReferencedObjectPath=function(t){if(!this.m_referencedObjectPaths[t.objectPathInfo.Id]){if(!t.isValid)throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidObjectPath,message:n.Utility._getResourceString(n.ResourceStrings.invalidObjectPath,n.Utility.getObjectPathExpression(t)),debugInfo:{errorLocation:n.Utility.getObjectPathExpression(t)}});while(t)t.isWriteOperation&&(this.m_flags=this.m_flags|1),this.m_referencedObjectPaths[t.objectPathInfo.Id]=t,t.objectPathInfo.ObjectPathType==3&&this.addReferencedObjectPaths(t.argumentObjectPaths),t=t.parentObjectPath}},t.prototype.addReferencedObjectPaths=function(n){if(n)for(var t=0;t0&&(typeof r[0]=="string"||i.isRequestUrlAndHeaderInfo(r[0])||i.isRequestUrlAndHeaderInfoResolver(r[0]))&&(y=r[0],h=1),r.length==h+1)a=u,v=r[h+0];else if(r.length==h+2){if(r[h+0]instanceof n.ClientObject)a=function(){return r[h+0].context};else if(Array.isArray(r[h+0])){if(c=r[h+0],c.length==0)return i.createErrorPromise(t);for(l=0;l0){var n=c._onRunFinishedNotifiers.shift();n()}if(a)return l;else throw l;})},i.prototype._nextId=function(){return++this.m_nextId},i}();n.ClientRequestContext=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_type=n}return Object.defineProperty(t.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){(this.m_isLoaded=!0,typeof t=="object"&&t&&t._IsNull)||(this.m_value=this.m_type===1?n.Utility.adjustToDateTime(t):t)},t}();n.ClientResult=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.flags="flags",n.getItemAt="GetItemAt",n.id="Id",n.idPrivate="_Id",n.index="_Index",n.items="_Items",n.iterativeExecutor="IterativeExecutor",n.localDocument="http://document.localhost/",n.localDocumentApiPrefix="http://document.localhost/_api/",n.processQuery="ProcessQuery",n.referenceId="_ReferenceId",n.isTracked="_IsTracked",n.sourceLibHeader="SdkVersion",n.embeddingPageOrigin="EmbeddingPageOrigin",n.embeddingPageSessionInfo="EmbeddingPageSessionInfo",n}();n.Constants=t}(OfficeExtension||(OfficeExtension={})),function(n){var u=1,r={invokeRequestModifier:function(n){return n.DdaMethod.Version=u,n},invokeResponseModifier:function(n){return u=n.Version,n.Error&&(n.error={},n.error.Code=n.Error),n}},i,t,f,e;(function(n){n[n.Success=0]="Success";n[n.Timeout=1]="Timeout";n[n.InternalError=5001]="InternalError"})(i||(i={})),function(n){n.SendingId="sId";n.RespondingId="rId";n.CommandKey="command";n.SessionInfoKey="sessionInfo";n.ParamsKey="params";n.ApiReadyCommand="apiready";n.ExecuteMethodCommand="executeMethod";n.GetAppContextCommand="getAppContext";n.RegisterEventCommand="registerEvent";n.UnregisterEventCommand="unregisterEvent";n.FireEventCommand="fireEvent"}(t||(t={}));f=function(u){function f(n,t){u.call(this);this.m_chosenWindow=null;this.m_chosenOrigin=null;this.m_enabled=!0;this.m_onMessageHandler=this._onMessage.bind(this);this.m_callbackList={};this.m_id=0;this.m_timeoutId=-1;this.m_appContext=null;this.m_url=n;this.m_options=t;this.m_options||(this.m_options={sessionKey:Math.random().toString()});this.m_options.sessionKey||(this.m_options.sessionKey=Math.random().toString());this.m_options.container||(this.m_options.container=document.body);this.m_options.timeoutInMilliseconds||(this.m_options.timeoutInMilliseconds=6e4);this.m_options.height||(this.m_options.height="400px");this.m_options.width||(this.m_options.width="100%")}return __extends(f,u),f.prototype._getIFrameSrc=function(){var u=window.location.protocol+"//"+window.location.host,i=n.Constants.embeddingPageOrigin+"="+encodeURIComponent(u)+"&"+n.Constants.embeddingPageSessionInfo+"="+encodeURIComponent(this.m_options.sessionKey),r=!1,t;return this.m_url.toLowerCase().indexOf("/_layouts/preauth.aspx")>0&&(r=!0),t=document.createElement("a"),t.href=this.m_url,r?t.hash=t.hash.length===0||t.hash==="#"?"#"+i:t.hash+"&"+i:t.search=t.search.length===0||t.search==="?"?"?"+i:t.search+"&"+i,t.href},f.prototype.init=function(){var t=this,i;return window.addEventListener("message",this.m_onMessageHandler),i=this._getIFrameSrc(),new n._Internal.OfficePromise(function(r,u){var f=document.createElement("iframe");t.m_options.id&&(f.id=t.m_options.id);f.style.height=t.m_options.height;f.style.width=t.m_options.width;f.src=i;t.m_options.container.appendChild(f);t.m_timeoutId=setTimeout(function(){t.close();var i=n.Utility.createRuntimeError(n.ErrorCodes.timeout,n.Utility._getResourceString(n.ResourceStrings.timeout),"EmbeddedSession.init");u(i)},t.m_options.timeoutInMilliseconds);t.m_promiseResolver=r})},f.prototype._invoke=function(n,t,u){if(!this.m_enabled){t(i.InternalError,null);return}r.invokeRequestModifier&&(u=r.invokeRequestModifier(u));this._sendMessageWithCallback(this.m_id++,n,u,function(n){r.invokeResponseModifier&&(n=r.invokeResponseModifier(n));var u=n.Error;delete n.Error;t(u||i.Success,n)})},f.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler);window.clearTimeout(this.m_timeoutId);this.m_enabled=!1},Object.defineProperty(f.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),f.prototype._createRequestExecutorOrNull=function(){return new e(this)},f.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},f.prototype._registerEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.RegisterEventCommand,{EventId:i,TargetId:r},function(){n(null)})})},f.prototype._unregisterEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.UnregisterEventCommand,{EventId:i,TargetId:r},function(){n()})})},f.prototype._onMessage=function(n){var u=this,i,e,r,o,s;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===n.source&&this.m_chosenOrigin===n.origin)){if(i=n.data,i&&i[t.CommandKey]===t.ApiReadyCommand){!this.m_chosenWindow&&this._isValidDescendant(n.source)&&i[t.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=n.source,this.m_chosenOrigin=n.origin,this._sendMessageWithCallback(this.m_id++,t.GetAppContextCommand,null,function(n){u._setupContext(n);window.clearTimeout(u.m_timeoutId);u.m_promiseResolver()}));return}if(i&&i[t.CommandKey]===t.FireEventCommand){var f=i[t.ParamsKey],h=f.EventId,c=f.TargetId,l=f.Data;if(this.m_sessionEventManager)for(e=this.m_sessionEventManager.getHandlers(h,c),r=0;r=0;o--)if(r[o]===e[i].handler){r.splice(o,1);break}break;case 2:r=[];break}}return s&&(!this.m_registered&&r.length>0?u=u.then(function(){return f.m_eventInfo.registerFunc(f.m_callback)}).then(function(){return f.m_registered=!0}):this.m_registered&&r.length==0&&(u=u.then(function(){return f.m_eventInfo.unregisterFunc(f.m_callback)}).catch(function(t){n.Utility.log("Error when unregister event: "+JSON.stringify(t))}).then(function(){return f.m_registered=!1})),u=u.then(function(){return f.m_handlers=r})),u},t.prototype.fireEvent=function(t){for(var u,f,r=[],i=0;i=0;e--)if(f[e]===u){f.splice(e,1);break}return f.length===0?this.m_unregisterEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i}();n.EventRegistration=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var s=JSON.stringify(u.Body),f=u.Url,e,o;if(f.charAt(f.length-1)!="/"&&(f=f+"/"),f=f+n.Constants.processQuery,f=f+"?"+n.Constants.flags+"="+r.toString(),e={method:"POST",url:f,headers:{},body:s},e.headers[n.Constants.sourceLibHeader]=t.SourceLibHeaderValue,e.headers["CONTENT-TYPE"]="application/json",u.Headers)for(o in u.Headers)e.headers[o]=u.Headers[o];return n.HttpUtility.sendRequest(e).then(function(t){var i,r;return t.statusCode===200?i={ErrorCode:null,ErrorMessage:null,Headers:t.headers,Body:JSON.parse(t.body)}:(n.Utility.log("Error Response:"+t.body),r=n.Utility._parseErrorResponse(t),i={ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:t.headers,Body:null}),i})},t.SourceLibHeaderValue="officejs-rest",t}();n.HttpRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){n.OfficeRequire=function(){return typeof require!="undefined"?require:null}()})(t=n._Internal||(n._Internal={}));i=function(){function i(){}return i.setCustomSendRequestFunc=function(n){i.s_customSendRequestFunc=n},i.xhrSendRequestFunc=function(i){return new t.OfficePromise(function(r,u){var f=new XMLHttpRequest,e;if(f.open(i.method,i.url),f.onload=function(){var t={statusCode:f.status,headers:n.Utility._parseHttpResponseHeaders(f.getAllResponseHeaders()),body:f.responseText};r(t)},f.onerror=function(){u(new t.RuntimeError({code:n.ErrorCodes.connectionFailure,message:n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,f.statusText)}))},i.headers)for(e in i.headers)f.setRequestHeader(e,i.headers[e]);f.send(i.body)})},i.nodejsRequestModuleSendRequestFunc=function(n){i.logRequest(n);var r=t.OfficeRequire(i.NodeJsRequestModuleName);return r(n.url,{method:n.method,headers:n.headers,body:n.body}).then(function(n){return n.text().then(function(t){var f=n.status,u={},r;return n.headers.forEach(function(n,t){u[t]=n}),r={statusCode:f,headers:u,body:t},i.logResponse(r),r})})},i.sendRequest=function(n){i.validateAndNormalizeRequest(n);var t=i.s_customSendRequestFunc;return t||(t=typeof window=="undefined"||typeof XMLHttpRequest=="undefined"?i.nodejsRequestModuleSendRequestFunc:i.xhrSendRequestFunc),t(n)},i.setCustomSendLocalDocumentRequestFunc=function(n){i.s_customSendLocalDocumentRequestFunc=n},i.sendLocalDocumentRequest=function(n){i.validateAndNormalizeRequest(n);var t;return t=i.s_customSendLocalDocumentRequestFunc||i.officeJsSendLocalDocumentRequestFunc,t(n)},i.officeJsSendLocalDocumentRequestFunc=function(i){i=n.Utility._validateLocalDocumentRequest(i);var r=n.Utility._buildRequestMessageSafeArray(i);return new t.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(r,function(i){var r;r=i.status=="succeeded"?{statusCode:n.RichApiMessageUtility.getResponseStatusCode(i),headers:n.RichApiMessageUtility.getResponseHeaders(i),body:n.RichApiMessageUtility.getResponseBody(i)}:n.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(i.error.code,i.error.message);n.Utility.log(JSON.stringify(r));t(r)})})},i.validateAndNormalizeRequest=function(i){if(n.Utility.isNullOrUndefined(i))throw t.RuntimeError._createInvalidArgError({argumentName:"request"});n.Utility.isNullOrEmptyString(i.method)&&(i.method="GET");i.method=i.method.toUpperCase()},i.logRequest=function(t){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Request---"),n.Utility.log(t.method+" "+t.url),t.headers)for(var r in t.headers)n.Utility.log(r+": "+t.headers[r]);i._logBody&&n.Utility.log(t.body)}},i.logResponse=function(t){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Response---"),n.Utility.log(""+t.statusCode),t.headers)for(var r in t.headers)n.Utility.log(r+": "+t.headers[r]);i._logBody&&n.Utility.log(t.body)}},i.NodeJsRequestModuleName="node-fetch",i._logBody=!1,i}();n.HttpUtility=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_clientObject=n}return n.prototype._handleResult=function(n){this.m_clientObject._handleIdResult(n)},n}();n.InstantiateActionResultHandler=t}(OfficeExtension||(OfficeExtension={})),function(n){}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){this.m_objectPathInfo=n;this.m_parentObjectPath=t;this.m_isWriteOperation=!1;this.m_isCollection=i;this.m_isInvalidAfterRequest=r;this.m_isValid=!0}return Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},set:function(n){this.m_isWriteOperation=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(n){this.m_argumentObjectPaths=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(n){this.m_isValid=n;!n&&this.m_objectPathInfo.ObjectPathType===6&&this.m_savedObjectPathInfo&&(t.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(n){this.m_getByIdMethodName=n},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null},t.prototype.updateUsingObjectData=function(i){var o=i[n.Constants.referenceId],u,f,e,r;if(!n.Utility.isNullOrEmptyString(o)){this.m_savedObjectPathInfo||this.isInvalidAfterRequest||!t.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)||(u={},t.copyObjectPathInfo(this.m_objectPathInfo,u),this.m_savedObjectPathInfo={pathInfo:u,parent:this.m_parentObjectPath});this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=o;this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null;return}if(f=this.parentObjectPath&&this.parentObjectPath.isCollection,e=this.getByIdMethodName,(f||!n.Utility.isNullOrEmptyString(e))&&(r=i[n.Constants.id],n.Utility.isNullOrUndefined(r)&&(r=i[n.Constants.idPrivate]),!n.Utility.isNullOrUndefined(r))){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;f?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=e,this.m_getByIdMethodName=null);this.isWriteOperation=!1;this.m_objectPathInfo.ArgumentInfo={};this.m_objectPathInfo.ArgumentInfo.Arguments=[r];this.m_argumentObjectPaths=null;return}},t.isRestorableObjectPath=function(n){return n===1||n===5||n===3||n===4},t.copyObjectPathInfo=function(n,t){t.Id=n.Id;t.ArgumentInfo=n.ArgumentInfo;t.Name=n.Name;t.ObjectPathType=n.ObjectPathType;t.ParentObjectPathId=n.ParentObjectPathId},t}();n.ObjectPath=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createGlobalObjectObjectPath=function(t){var i={Id:t._nextId(),ObjectPathType:1,Name:""};return new n.ObjectPath(i,null,!1,!1)},t.createNewObjectObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:2,Name:i};return new n.ObjectPath(u,null,r,!1)},t.createPropertyObjectPath=function(t,i,r,u,f){var e={Id:t._nextId(),ObjectPathType:4,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id};return new n.ObjectPath(e,i._objectPath,u,f)},t.createIndexerObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i._objectPath,!1,!1)},t.createIndexerObjectPathUsingParentPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i,!1,!1)},t.createMethodObjectPath=function(t,i,r,u,f,e,o,s){var c={Id:t._nextId(),ObjectPathType:3,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},l=n.Utility.setMethodArguments(t,c.ArgumentInfo,f),h=new n.ObjectPath(c,i._objectPath,e,o);return h.argumentObjectPaths=l,h.isWriteOperation=u!=1,h.getByIdMethodName=s,h},t.createReferenceIdObjectPath=function(t,i){var r={Id:t._nextId(),ObjectPathType:6,Name:i,ArgumentInfo:{}};return new n.ObjectPath(r,null,!1,!1)},t.createChildItemObjectPathUsingIndexerOrGetItemAt=function(i,r,u,f,e){var o=f[n.Constants.id];return n.Utility.isNullOrUndefined(o)&&(o=f[n.Constants.idPrivate]),i&&!n.Utility.isNullOrUndefined(o)?t.createChildItemObjectPathUsingIndexer(r,u,f):t.createChildItemObjectPathUsingGetItemAt(r,u,f,e)},t.createChildItemObjectPathUsingIndexer=function(t,i,r){var f=r[n.Constants.id],u;return n.Utility.isNullOrUndefined(f)&&(f=r[n.Constants.idPrivate]),u=u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u.ArgumentInfo.Arguments=[f],new n.ObjectPath(u,i._objectPath,!1,!1)},t.createChildItemObjectPathUsingGetItemAt=function(t,i,r,u){var e=r[n.Constants.index],f;return e&&(u=e),f={Id:t._nextId(),ObjectPathType:3,Name:n.Constants.getItemAt,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f.ArgumentInfo.Arguments=[u],new n.ObjectPath(f,i._objectPath,!1,!1)},t}();n.ObjectPathFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var f=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n._Internal.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(f,function(i){n.Utility.log("Response:");n.Utility.log(JSON.stringify(i));var r;r=i.status=="succeeded"?n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBody(i),n.RichApiMessageUtility.getResponseHeaders(i)):n.RichApiMessageUtility.buildResponseOnError(i.error.code,i.error.message);t(r)})})},t.SourceLibHeaderValue="officejs",t}();n.OfficeJsRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){var t;(function(t){function i(){return function(){"use strict";function wt(n){return typeof n=="function"||typeof n=="object"&&n!==null}function b(n){return typeof n=="function"}function bt(n){return typeof n=="object"&&n!==null}function kt(n){k=n}function dt(n){f=n}function ti(){var t=process.nextTick,n=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&n[1]==="0"&&n[2]==="10"&&(t=setImmediate),function(){t(c)}}function ii(){return function(){tt(c)}}function ri(){var n=0,i=new ut(c),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function ui(){var n=new MessageChannel;return n.port1.onmessage=c,function(){n.port2.postMessage(0)}}function ft(){return function(){setTimeout(c,1)}}function c(){for(var t,i,n=0;n=0?(n=n.substring(t+5,n.length),n<"14.14393"?!0:!1):!1}function i(){return typeof window=="undefined"&&typeof Promise=="function"?Promise:typeof window!="undefined"&&window.Promise?t()?n.PromiseImpl.Init():window.Promise:n.PromiseImpl.Init()}n.OfficePromise=i()}(t=n._Internal||(n._Internal={}));i=t.OfficePromise;n.Promise=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this._autoCleanupList={};this.m_context=n}return t.prototype.add=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._addCommon(n,!0)}):this._addCommon(n,!0)},t.prototype._autoAdd=function(n){this._addCommon(n,!1);this._autoCleanupList[n._objectPath.objectPathInfo.Id]=n},t.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(t,i){var r=this.m_context._autoCleanup&&!t[n.Constants.isTracked]&&t!==this.m_context._rootObject&&i&&!n.Utility.isNullOrEmptyString(i[n.Constants.referenceId]);r&&(this._autoCleanupList[t._objectPath.objectPathInfo.Id]=t,t[n.Constants.isTracked]=!0)},t.prototype._addCommon=function(t,i){if(t[n.Constants.isTracked]){i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id];return}var r=t[n.Constants.referenceId];n.Utility.isNullOrEmptyString(r)&&t._KeepReference&&(t._KeepReference(),n.ActionFactory.createInstantiateAction(this.m_context,t),i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id],t[n.Constants.isTracked]=!0)},t.prototype.remove=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._removeCommon(n)}):this._removeCommon(n)},t.prototype._removeCommon=function(t){var r=t[n.Constants.referenceId],i;n.Utility.isNullOrEmptyString(r)||(i=this.m_context._rootObject,i._RemoveReference&&i._RemoveReference(r),delete t[n.Constants.isTracked])},t.prototype._retrieveAndClearAutoCleanupList=function(){var n=this._autoCleanupList;return this._autoCleanupList={},n},t}();n.TrackedObjects=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.cannotRegisterEvent="CannotRegisterEvent",n.connectionFailureWithStatus="ConnectionFailureWithStatus",n.connectionFailureWithDetails="ConnectionFailureWithDetails",n.invalidObjectPath="InvalidObjectPath",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.invalidArgumentGeneric="InvalidArgumentGeneric",n.propertyNotLoaded="PropertyNotLoaded",n.runMustReturnPromise="RunMustReturnPromise",n.timeout="Timeout",n.propertyDoesNotExist="PropertyDoesNotExist",n.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",n.moreInfoInnerError="MoreInfoInnerError",n.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",n.valueNotLoaded="ValueNotLoaded",n.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage",n}();n.ResourceStrings=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.CannotRegisterEvent="The event handler cannot be registered.",n.ConnectionFailureWithStatus="The request failed with status code of {0}.",n.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}",n.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",n.InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',n.InvalidRequestContext="Cannot use the object across different request contexts.",n.PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",n.RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',n.Timeout="The operation has timed out.",n.ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.',n.invalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.",n}();n.ResourceStringValues=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.buildMessageArrayForIRequestExecutor=function(i,r,u,f){var o=JSON.stringify(u.Body),e;return n.Utility.log("Request:"),n.Utility.log(o),e={},e[n.Constants.sourceLibHeader]=f,t.buildRequestMessageSafeArray(i,r,"POST","ProcessQuery",e,o)},t.buildResponseOnSuccess=function(n,t){var i={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return i.Body=JSON.parse(n),i.Headers=t,i},t.buildResponseOnError=function(i,r){var u={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return u.ErrorCode=n.ErrorCodes.generalException,u.ErrorMessage=r,i==t.OfficeJsErrorCode_ooeNoCapability?u.ErrorCode=n.ErrorCodes.accessDenied:i==t.OfficeJsErrorCode_ooeActivityLimitReached?u.ErrorCode=n.ErrorCodes.activityLimitReached:i==t.OfficeJsErrorCode_ooeInvalidOrTimedOutSession&&(u.ErrorCode=n.ErrorCodes.invalidOrTimedOutSession,u.ErrorMessage=n.Utility._getResourceString(n.ResourceStrings.invalidOrTimedOutSessionMessage)),u},t.buildHttpResponseFromOfficeJsError=function(i,r){var f=500,u={};return u.error={},u.error.code=n.ErrorCodes.generalException,u.error.message=r,i===t.OfficeJsErrorCode_ooeNoCapability?(f=403,u.error.code=n.ErrorCodes.accessDenied):i===t.OfficeJsErrorCode_ooeActivityLimitReached&&(f=429,u.error.code=n.ErrorCodes.activityLimitReached),{statusCode:f,headers:{},body:JSON.stringify(u)}},t.buildRequestMessageSafeArray=function(n,t,i,r,u,f){var e=[],o;if(u)for(o in u)e.push(o),e.push(u[o]);var s=0,h="",c="",l="";return[n,i,r,e,f,s,t,h,c,l]},t.getResponseBody=function(n){return t.getResponseBodyFromSafeArray(n.value.data)},t.getResponseHeaders=function(n){return t.getResponseHeadersFromSafeArray(n.value.data)},t.getResponseBodyFromSafeArray=function(n){var t=n[2],i;return typeof t=="string"?t:(i=t,i.join(""))},t.getResponseHeadersFromSafeArray=function(n){var i=n[1],r,t;if(!i)return null;for(r={},t=0;t0&&f.push(i);return f},t.throwError=function(i,r,u){throw new n._Internal.RuntimeError({code:i,message:t._getResourceString(i,r),debugInfo:u?{errorLocation:u}:undefined});},t.createRuntimeError=function(t,i,r){return new n._Internal.RuntimeError({code:t,message:i,debugInfo:{errorLocation:r}})},t._getResourceString=function(i,r){var u,e,f,o;return typeof window!="undefined"&&window.Strings&&window.Strings.OfficeOM&&(e="L_"+i,f=window.Strings.OfficeOM[e],f&&(u=f)),u||(u=n.ResourceStringValues[i]),u||(u=i),t.isNullOrUndefined(r)||(Array.isArray(r)?(o=r,u=t._formatString(u,o)):u=u.replace("{0}",r)),u},t._formatString=function(t,i){return t.replace(/\{\d\}/g,function(t){var r=parseInt(t.substr(1,t.length-2));if(r0?".":"")+i;break;case 3:i=t.normalizeName(n.objectPathInfo.Name)+"()"+(i.length>0?".":"")+i;break;case 4:i=t.normalizeName(n.objectPathInfo.Name)+(i.length>0?".":"")+i;break;case 5:i="getItem()"+(i.length>0?".":"")+i;break;case 6:i="_reference()"+(i.length>0?".":"")+i;break}n=n.parentObjectPath}return i},t._createPromiseFromResult=function(t){return new n._Internal.OfficePromise(function(n,i){n(t)})},t._createTimeoutPromise=function(t){return new n._Internal.OfficePromise(function(n,i){setTimeout(function(){n(null)},t)})},t.promisify=function(t){return new n._Internal.OfficePromise(function(n,i){var r=function(t){t.status=="failed"?i(t.error):n(t.value)};t(r)})},t._addActionResultHandler=function(n,t,i){n.context._pendingRequest.addActionResultHandler(t,i)},t._handleNavigationPropertyResults=function(n,i,r){for(var u=0;u0},t._getLocalDocumentUrlPrefixLength=function(n){for(var i=["http://document.localhost","https://document.localhost","//document.localhost"],r=n.toLowerCase().trim(),t=0;t0))for(s=i.url.substr(f+1),e=s.split("&"),u=0;u0&&(f=i.substr(0,u),e=i.substr(u+1),f=t.trim(f),e=t.trim(e),s[f.toUpperCase()]=e));return s},t._parseErrorResponse=function(i){var r=null,f,e,u;if(!t.isNullOrEmptyString(i.body)){f=t.trim(i.body);try{r=JSON.parse(f)}catch(o){t.log("Error when parse "+f)}}return!t.isNullOrUndefined(r)&&typeof r=="object"&&r.error?(u=r.error.code,e=t._getResourceString(n.ResourceStrings.connectionFailureWithDetails,[i.statusCode.toString(),r.error.code,r.error.message])):e=t._getResourceString(n.ResourceStrings.connectionFailureWithStatus,i.statusCode.toString()),t.isNullOrEmptyString(u)&&(u=n.ErrorCodes.connectionFailure),{errorCode:u,errorMessage:e}},t._copyHeaders=function(n,t){if(n&&t)for(var i in n)t[i]=n[i]},t._logEnabled=!1,t._synchronousCleanup=!1,t.s_underscoreCharCode="_".charCodeAt(0),t}();n.Utility=t}(OfficeExtension||(OfficeExtension={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){function nt(n){return n[0].toLowerCase()+n.slice(1)}function w(n,t,i){var s=1500,e,r,u,o,h;if(Array.isArray(i)&&i.length>0&&Array.isArray(i[0])&&i.length*i[0].length>s&&p()){for(e=Math.max(1,Math.round(s/i[0].length)),n._ValidateArraySize(i.length,i[0].length),r=0;ri.length&&(u=i.length-r),o=n.getRow(r).getBoundingRect(n.getRow(r+u-1)),h=i.slice(r,r+u),f(o.context,o,t,h);return!0}return!1}function p(){return typeof window!="undefined"&&window.Office&&window.Office.context&&window.Office.context.requirements?window.Office.context.requirements.isSetSupported("ExcelApi",1.3):!0}function ku(t,i,r){return OfficeExtension.ClientRequestContext._runBatch("Excel.run",arguments,function(t){return new n.RequestContext(t)})}function b(n){var t={BindingColumnCount:n.bindingColumnCount,BindingId:n.bindingId,BindingRowCount:n.bindingRowCount,bindingType:n.bindingType,HasHeaders:n.hasHeaders};return window.OSF.DDA.OMFactory.manufactureBinding(t,window.Microsoft.Office.WebExtension.context.document)}function rt(n,t){var r=n.headers==null,i;return i=r?n.rows:n,i=window.OSF.DDA.DataCoercion.coerceData(i,t[window.Microsoft.Office.WebExtension.Parameters.CoercionType]),i==undefined?null:i}var wu=["ThreeArrows","ThreeArrowsGray","ThreeFlags","ThreeTrafficLights1","ThreeTrafficLights2","ThreeSigns","ThreeSymbols","ThreeSymbols2","FourArrows","FourArrowsGray","FourRedToBlack","FourRating","FourTrafficLights","FiveArrows","FiveArrowsGray","FiveRating","FiveQuarters","ThreeStars","ThreeTriangles","FiveBoxes"],bu=[["RedDownArrow","YellowSideArrow","GreenUpArrow"],["GrayDownArrow","GraySideArrow","GrayUpArrow"],["RedFlag","YellowFlag","GreenFlag"],["RedCircleWithBorder","YellowCircle","GreenCircle"],["RedTrafficLight","YellowTrafficLight","GreenTrafficLight"],["RedDiamond","YellowTriangle","GreenCircle"],["RedCrossSymbol","YellowExclamationSymbol","GreenCheckSymbol"],["RedCross","YellowExclamation","GreenCheck"],["RedDownArrow","YellowDownInclineArrow","YellowUpInclineArrow","GreenUpArrow"],["GrayDownArrow","GrayDownInclineArrow","GrayUpInclineArrow","GrayUpArrow"],["BlackCircle","GrayCircle","PinkCircle","RedCircle"],["OneBar","TwoBars","ThreeBars","FourBars"],["BlackCircleWithBorder","RedCircleWithBorder","YellowCircle","GreenCircle"],["RedDownArrow","YellowDownInclineArrow","YellowSideArrow","YellowUpInclineArrow","GreenUpArrow"],["GrayDownArrow","GrayDownInclineArrow","GraySideArrow","GrayUpInclineArrow","GrayUpArrow"],["NoBars","OneBar","TwoBars","ThreeBars","FourBars"],["WhiteCircleAllWhiteQuarters","CircleWithThreeWhiteQuarters","CircleWithTwoWhiteQuarters","CircleWithOneWhiteQuarter","BlackCircle"],["SilverStar","HalfGoldStar","GoldStar"],["RedDownTriangle","YellowDash","GreenUpTriangle"],["NoFilledBoxes","OneFilledBox","TwoFilledBoxes","ThreeFilledBoxes","FourFilledBoxes"],],tt,it,d,ut,ft,et,k,ot,st,ht,g,ct,lt,at,vt,yt,pt,wt,bt,kt,dt,gt,ni,ti,ii,ri,ui,fi,ei,oi,si,hi,ci,li,ai,vi,yi,pi,wi,bi,ki,di,gi,nr,tr,ir,rr,ur,fr,er,or,sr,hr,cr,lr,ar,vr,yr,pr,wr,br,kr,dr,gr,nu,tu,iu,ru,uu,fu,eu,ou,su,hu,cu,lu,au,vu,yu,gu,nf,tf,rf,uf,ff,ef,of,sf,hf,cf,lf,af,vf,yf,pf,wf,bf,kf,df,gf,ne,te,ie,re,ue,fe,ee,oe,se,he,ce,le,ae,ve,ye,pe,we,be,ke,de,ge,no,to,io,ro,i,pu,uo;n.icons={};wu.map(function(t,i){var r=nt(t);n.icons[r]=[];bu[i].map(function(i,u){i=nt(i);var f={set:t,index:u};n.icons[r].push(f);n.icons[r][i]=f})});tt=function(){function n(n,t,i){this.m_workbookUrl=n;this.m_requestHeaders=t;this.m_requestHeaders||(this.m_requestHeaders={});OfficeExtension.Utility.isNullOrUndefined(i)&&(i=!0);this.m_persisted=i}return n.prototype.close=function(){var i=this,t,u,r;return this.m_requestUrlAndHeaderInfo&&!OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)?(t=this.m_requestUrlAndHeaderInfo.url,t.charAt(t.length-1)!="/"&&(t=t+"/"),t=t+"closeSession",u=this.m_requestUrlAndHeaderInfo,r={method:"POST",url:t,headers:this.m_requestUrlAndHeaderInfo.headers,body:""},this.m_requestUrlAndHeaderInfo=null,OfficeExtension.HttpUtility.sendRequest(r).then(function(t){var u,r,f;if(t.statusCode!=204){u=OfficeExtension.Utility._parseErrorResponse(t);throw OfficeExtension.Utility.createRuntimeError(u.errorCode,u.errorMessage,"Session.close");}i.m_requestUrlAndHeaderInfo=null;r=null;for(f in i.m_requestHeaders)if(f.toLowerCase()==n.WorkbookSessionIdHeaderNameLower){r=f;break}r&&delete i.m_requestHeaders[r]})):OfficeExtension.Utility._createPromiseFromResult(null)},n.prototype._resolveRequestUrlAndHeaderInfo=function(){var r=this,u,e,t,i,f,o;if(this.m_requestUrlAndHeaderInfo)return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);if(OfficeExtension.Utility.isNullOrEmptyString(this.m_workbookUrl)||OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl))return this.m_requestUrlAndHeaderInfo={url:this.m_workbookUrl,headers:this.m_requestHeaders},OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);u=!1;for(e in this.m_requestHeaders)if(e.toLowerCase()==n.WorkbookSessionIdHeaderNameLower){u=!0;break}return u?(this.m_requestUrlAndHeaderInfo={url:this.m_workbookUrl,headers:this.m_requestHeaders},OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo)):(t=this.m_workbookUrl,t.charAt(t.length-1)!="/"&&(t=t+"/"),t=t+"createSession",i={},OfficeExtension.Utility._copyHeaders(this.m_requestHeaders,i),i["Content-Type"]="application/json",f={},f.persistChanges=this.m_persisted,o={method:"POST",url:t,headers:i,body:JSON.stringify(f)},OfficeExtension.HttpUtility.sendRequest(o).then(function(t){var u,f,e;if(t.statusCode!==201){u=OfficeExtension.Utility._parseErrorResponse(t);throw OfficeExtension.Utility.createRuntimeError(u.errorCode,u.errorMessage,"Session.resolveRequestUrlAndHeaderInfo");}return f=JSON.parse(t.body),e=f.id,i={},OfficeExtension.Utility._copyHeaders(r.m_requestHeaders,i),i[n.WorkbookSessionIdHeaderName]=e,r.m_requestUrlAndHeaderInfo={url:r.m_workbookUrl,headers:i},r.m_requestUrlAndHeaderInfo}))},n.WorkbookSessionIdHeaderName="Workbook-Session-Id",n.WorkbookSessionIdHeaderNameLower="workbook-session-id",n}();n.Session=tt;it=function(n){function t(t){n.call(this,t);this.m_workbook=new d(this,OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(this));this._rootObject=this.m_workbook}return __extends(t,n),Object.defineProperty(t.prototype,"workbook",{get:function(){return this.m_workbook},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"application",{get:function(){return this.workbook.application},enumerable:!0,configurable:!0}),t}(OfficeExtension.ClientRequestContext);n.RequestContext=it;n.run=ku;n._RedirectV1APIs=!1;n._V1APIMap={GetDataAsync:{call:function(n,t){return n.workbook._V1Api.bindingGetData(t)},postprocess:rt},GetSelectedDataAsync:{call:function(n,t){return n.workbook._V1Api.getSelectedData(t)},postprocess:rt},GoToByIdAsync:{call:function(n,t){return n.workbook._V1Api.gotoById(t)}},AddColumnsAsync:{call:function(n,t){return n.workbook._V1Api.bindingAddColumns(t)}},AddFromSelectionAsync:{call:function(n,t){return n.workbook._V1Api.bindingAddFromSelection(t)},postprocess:b},AddFromNamedItemAsync:{call:function(n,t){return n.workbook._V1Api.bindingAddFromNamedItem(t)},postprocess:b},AddFromPromptAsync:{call:function(n,t){return n.workbook._V1Api.bindingAddFromPrompt(t)},postprocess:b},AddRowsAsync:{call:function(n,t){return n.workbook._V1Api.bindingAddRows(t)}},GetByIdAsync:{call:function(n,t){return n.workbook._V1Api.bindingGetById(t)},postprocess:b},ReleaseByIdAsync:{call:function(n,t){return n.workbook._V1Api.bindingReleaseById(t)}},GetAllAsync:{call:function(n){return n.workbook._V1Api.bindingGetAll()},postprocess:function(n){return n.bindings.map(function(n){return b(n)})}},DeleteAllDataValuesAsync:{call:function(n,t){return n.workbook._V1Api.bindingDeleteAllDataValues(t)}},SetSelectedDataAsync:{preprocess:function(n){var t=n.cellFormat;return typeof window!="undefined"&&window.OSF.DDA.SafeArray?window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes,"cellFormat")&&(n.cellFormat=window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes.cellFormat.toHost(t)):typeof window!="undefined"&&window.OSF.DDA.WAC&&window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes,"cellFormat")&&(n.cellFormat=window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes.cellFormat.toHost(t)),n},call:function(n,t){return n.workbook._V1Api.setSelectedData(t)}},SetDataAsync:{preprocess:function(n){var t=n.cellFormat;return typeof window!="undefined"&&window.OSF.DDA.SafeArray?window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes,"cellFormat")&&(n.cellFormat=window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes.cellFormat.toHost(t)):typeof window!="undefined"&&window.OSF.DDA.WAC&&window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes,"cellFormat")&&(n.cellFormat=window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes.cellFormat.toHost(t)),n},call:function(n,t){return n.workbook._V1Api.bindingSetData(t)}},SetFormatsAsync:{preprocess:function(n){var t=n.cellFormat;return typeof window!="undefined"&&window.OSF.DDA.SafeArray?window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes,"cellFormat")&&(n.cellFormat=window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes.cellFormat.toHost(t)):typeof window!="undefined"&&window.OSF.DDA.WAC&&window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes,"cellFormat")&&(n.cellFormat=window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes.cellFormat.toHost(t)),n},call:function(n,t){return n.workbook._V1Api.bindingSetFormats(t)}},SetTableOptionsAsync:{call:function(n,t){return n.workbook._V1Api.bindingSetTableOptions(t)}},ClearFormatsAsync:{call:function(n,t){return n.workbook._V1Api.bindingClearFormats(t)}},GetFilePropertiesAsync:{call:function(n,t){return n.workbook._V1Api.getFilePropertiesAsync(t)}}};var o=OfficeExtension.ObjectPathFactory.createPropertyObjectPath,t=OfficeExtension.ObjectPathFactory.createMethodObjectPath,y=OfficeExtension.ObjectPathFactory.createIndexerObjectPath,fo=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath,eo=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer,oo=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt,v=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt,s=OfficeExtension.ActionFactory.createMethodAction,f=OfficeExtension.ActionFactory.createSetPropertyAction,e=OfficeExtension.Utility.isNullOrUndefined,u=OfficeExtension.Utility.isUndefined,r=OfficeExtension.Utility.throwIfNotLoaded,c=OfficeExtension.Utility.load,h=OfficeExtension.Utility.fixObjectPathIfNecessary,l=OfficeExtension.Utility._addActionResultHandler,a=OfficeExtension.Utility._handleNavigationPropertyResults,so=OfficeExtension.Utility.adjustToDateTime,du=function(n){function t(){n.apply(this,arguments)}return __extends(t,n),Object.defineProperty(t.prototype,"_className",{get:function(){return"Application"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"calculationMode",{get:function(){return r("calculationMode",this.m_calculationMode,"Application",this._isNull),this.m_calculationMode},enumerable:!0,configurable:!0}),t.prototype.calculate=function(n){s(this.context,this,"Calculate",0,[n])},t.prototype.suspendApiCalculationUntilNextSync=function(){s(this.context,this,"SuspendApiCalculationUntilNextSync",0,[])},t.prototype._handleResult=function(t){if(n.prototype._handleResult.call(this,t),!e(t)){var i=t;h(this,i);u(i.CalculationMode)||(this.m_calculationMode=i.CalculationMode)}},t.prototype.load=function(n){return c(this,n),this},t.prototype.toJSON=function(){return{calculationMode:this.m_calculationMode}},t}(OfficeExtension.ClientObject);n.Application=du;d=function(i){function r(){i.apply(this,arguments)}return __extends(r,i),Object.defineProperty(r.prototype,"_className",{get:function(){return"Workbook"},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"application",{get:function(){return this.m_application||(this.m_application=new n.Application(this.context,o(this.context,this,"Application",!1,!1))),this.m_application},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"bindings",{get:function(){return this.m_bindings||(this.m_bindings=new n.BindingCollection(this.context,o(this.context,this,"Bindings",!0,!1))),this.m_bindings},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"customXmlParts",{get:function(){return this.m_customXmlParts||(this.m_customXmlParts=new n.CustomXmlPartCollection(this.context,o(this.context,this,"CustomXmlParts",!0,!1))),this.m_customXmlParts},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"functions",{get:function(){return this.m_functions||(this.m_functions=new n.Functions(this.context,o(this.context,this,"Functions",!1,!1))),this.m_functions},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"names",{get:function(){return this.m_names||(this.m_names=new n.NamedItemCollection(this.context,o(this.context,this,"Names",!0,!1))),this.m_names},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"pivotTables",{get:function(){return this.m_pivotTables||(this.m_pivotTables=new n.PivotTableCollection(this.context,o(this.context,this,"PivotTables",!0,!1))),this.m_pivotTables},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"settings",{get:function(){return this.m_settings||(this.m_settings=new n.SettingCollection(this.context,o(this.context,this,"Settings",!0,!1))),this.m_settings},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"tables",{get:function(){return this.m_tables||(this.m_tables=new n.TableCollection(this.context,o(this.context,this,"Tables",!0,!1))),this.m_tables},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"worksheets",{get:function(){return this.m_worksheets||(this.m_worksheets=new n.WorksheetCollection(this.context,o(this.context,this,"Worksheets",!0,!1))),this.m_worksheets},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"_V1Api",{get:function(){return this.m__V1Api||(this.m__V1Api=new n._V1Api(this.context,o(this.context,this,"_V1Api",!1,!1))),this.m__V1Api},enumerable:!0,configurable:!0}),r.prototype.getSelectedRange=function(){return new n.Range(this.context,t(this.context,this,"GetSelectedRange",1,[],!1,!0,null))},r.prototype._GetObjectByReferenceId=function(n){var i=s(this.context,this,"_GetObjectByReferenceId",1,[n]),t=new OfficeExtension.ClientResult;return l(this,i,t),t},r.prototype._GetObjectTypeNameByReferenceId=function(n){var i=s(this.context,this,"_GetObjectTypeNameByReferenceId",1,[n]),t=new OfficeExtension.ClientResult;return l(this,i,t),t},r.prototype._GetReferenceCount=function(){var t=s(this.context,this,"_GetReferenceCount",1,[]),n=new OfficeExtension.ClientResult;return l(this,t,n),n},r.prototype._RemoveAllReferences=function(){s(this.context,this,"_RemoveAllReferences",1,[])},r.prototype._RemoveReference=function(n){s(this.context,this,"_RemoveReference",1,[n])},r.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;h(this,t);a(this,t,["application","Application","bindings","Bindings","customXmlParts","CustomXmlParts","functions","Functions","names","Names","pivotTables","PivotTables","settings","Settings","tables","Tables","worksheets","Worksheets","_V1Api","_V1Api"])}},r.prototype.load=function(n){return c(this,n),this},Object.defineProperty(r.prototype,"onSelectionChanged",{get:function(){var n=this;return this.m_selectionChanged||(this.m_selectionChanged=new OfficeExtension.EventHandlers(this.context,this,"SelectionChanged",{registerFunc:function(t){return n.context.eventRegistration.register(2,"",t)},unregisterFunc:function(t){return n.context.eventRegistration.unregister(2,"",t)},eventArgsTransformFunc:function(t){return OfficeExtension.Utility._createPromiseFromResult({workbook:n})}})),this.m_selectionChanged},enumerable:!0,configurable:!0}),r.prototype.toJSON=function(){return{}},r}(OfficeExtension.ClientObject);n.Workbook=d;ut=function(i){function l(){i.apply(this,arguments)}return __extends(l,i),Object.defineProperty(l.prototype,"_className",{get:function(){return"Worksheet"},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"charts",{get:function(){return this.m_charts||(this.m_charts=new n.ChartCollection(this.context,o(this.context,this,"Charts",!0,!1))),this.m_charts},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"names",{get:function(){return this.m_names||(this.m_names=new n.NamedItemCollection(this.context,o(this.context,this,"Names",!0,!1))),this.m_names},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"pivotTables",{get:function(){return this.m_pivotTables||(this.m_pivotTables=new n.PivotTableCollection(this.context,o(this.context,this,"PivotTables",!0,!1))),this.m_pivotTables},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"protection",{get:function(){return this.m_protection||(this.m_protection=new n.WorksheetProtection(this.context,o(this.context,this,"Protection",!1,!1))),this.m_protection},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"tables",{get:function(){return this.m_tables||(this.m_tables=new n.TableCollection(this.context,o(this.context,this,"Tables",!0,!1))),this.m_tables},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"id",{get:function(){return r("id",this.m_id,"Worksheet",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"name",{get:function(){return r("name",this.m_name,"Worksheet",this._isNull),this.m_name},set:function(n){this.m_name=n;f(this.context,this,"Name",n)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"position",{get:function(){return r("position",this.m_position,"Worksheet",this._isNull),this.m_position},set:function(n){this.m_position=n;f(this.context,this,"Position",n)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"visibility",{get:function(){return r("visibility",this.m_visibility,"Worksheet",this._isNull),this.m_visibility},set:function(n){this.m_visibility=n;f(this.context,this,"Visibility",n)},enumerable:!0,configurable:!0}),l.prototype.set=function(n,t){this._recursivelySet(n,t,["name","position","visibility"],[],["charts","names","pivotTables","tables","charts","names","pivotTables","protection","tables"])},l.prototype.activate=function(){s(this.context,this,"Activate",1,[])},l.prototype.calculate=function(n){s(this.context,this,"Calculate",0,[n])},l.prototype.delete=function(){s(this.context,this,"Delete",0,[])},l.prototype.getCell=function(i,r){return new n.Range(this.context,t(this.context,this,"GetCell",1,[i,r],!1,!0,null))},l.prototype.getNext=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetNext",1,[i],!1,!0,null))},l.prototype.getNextOrNullObject=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetNextOrNullObject",1,[i],!1,!0,null))},l.prototype.getPrevious=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetPrevious",1,[i],!1,!0,null))},l.prototype.getPreviousOrNullObject=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetPreviousOrNullObject",1,[i],!1,!0,null))},l.prototype.getRange=function(i){return new n.Range(this.context,t(this.context,this,"GetRange",1,[i],!1,!0,null))},l.prototype.getUsedRange=function(i){return new n.Range(this.context,t(this.context,this,"GetUsedRange",1,[i],!1,!0,null))},l.prototype.getUsedRangeOrNullObject=function(i){return new n.Range(this.context,t(this.context,this,"GetUsedRangeOrNullObject",1,[i],!1,!0,null))},l.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;h(this,t);u(t.Id)||(this.m_id=t.Id);u(t.Name)||(this.m_name=t.Name);u(t.Position)||(this.m_position=t.Position);u(t.Visibility)||(this.m_visibility=t.Visibility);a(this,t,["charts","Charts","names","Names","pivotTables","PivotTables","protection","Protection","tables","Tables"])}},l.prototype.load=function(n){return c(this,n),this},l.prototype._handleIdResult=function(n){(i.prototype._handleIdResult.call(this,n),e(n))||u(n.Id)||(this.m_id=n.Id)},l.prototype.toJSON=function(){return{id:this.m_id,name:this.m_name,position:this.m_position,protection:this.m_protection,visibility:this.m_visibility}},l}(OfficeExtension.ClientObject);n.Worksheet=ut;ft=function(i){function u(){i.apply(this,arguments)}return __extends(u,i),Object.defineProperty(u.prototype,"_className",{get:function(){return"WorksheetCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"items",{get:function(){return r("items",this.m__items,"WorksheetCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),u.prototype.add=function(i){return new n.Worksheet(this.context,t(this.context,this,"Add",0,[i],!1,!0,null))},u.prototype.getActiveWorksheet=function(){return new n.Worksheet(this.context,t(this.context,this,"GetActiveWorksheet",1,[],!1,!1,null))},u.prototype.getCount=function(n){var i=s(this.context,this,"GetCount",1,[n]),t=new OfficeExtension.ClientResult;return l(this,i,t),t},u.prototype.getFirst=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetFirst",1,[i],!1,!0,null))},u.prototype.getItem=function(t){return new n.Worksheet(this.context,y(this.context,this,[t]))},u.prototype.getItemOrNullObject=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetItemOrNullObject",1,[i],!1,!1,null))},u.prototype.getLast=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetLast",1,[i],!1,!0,null))},u.prototype._handleResult=function(t){var u,f,r,o;if((i.prototype._handleResult.call(this,t),!e(t))&&(u=t,h(this,u),!e(u[OfficeExtension.Constants.items])))for(this.m__items=[],f=u[OfficeExtension.Constants.items],r=0;r0?f=i.getOffsetRange(r,u):(f=i,e=r,o=u),Math.abs(t)==1)?f:f.getBoundingRect(i.getOffsetRange(r*t+e,u*t+o))},Object.defineProperty(l.prototype,"conditionalFormats",{get:function(){return this.m_conditionalFormats||(this.m_conditionalFormats=new n.ConditionalFormatCollection(this.context,o(this.context,this,"ConditionalFormats",!0,!1))),this.m_conditionalFormats},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"format",{get:function(){return this.m_format||(this.m_format=new n.RangeFormat(this.context,o(this.context,this,"Format",!1,!1))),this.m_format},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"sort",{get:function(){return this.m_sort||(this.m_sort=new n.RangeSort(this.context,o(this.context,this,"Sort",!1,!1))),this.m_sort},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"worksheet",{get:function(){return this.m_worksheet||(this.m_worksheet=new n.Worksheet(this.context,o(this.context,this,"Worksheet",!1,!1))),this.m_worksheet},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"address",{get:function(){return r("address",this.m_address,"Range",this._isNull),this.m_address},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"addressLocal",{get:function(){return r("addressLocal",this.m_addressLocal,"Range",this._isNull),this.m_addressLocal},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"cellCount",{get:function(){return r("cellCount",this.m_cellCount,"Range",this._isNull),this.m_cellCount},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"columnCount",{get:function(){return r("columnCount",this.m_columnCount,"Range",this._isNull),this.m_columnCount},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"columnHidden",{get:function(){return r("columnHidden",this.m_columnHidden,"Range",this._isNull),this.m_columnHidden},set:function(n){this.m_columnHidden=n;f(this.context,this,"ColumnHidden",n)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"columnIndex",{get:function(){return r("columnIndex",this.m_columnIndex,"Range",this._isNull),this.m_columnIndex},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"formulas",{get:function(){return r("formulas",this.m_formulas,"Range",this._isNull),this.m_formulas},set:function(n){(this.m_formulas=n,w(this,"Formulas",n))||(this.m_formulas=n,f(this.context,this,"Formulas",n))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"formulasLocal",{get:function(){return r("formulasLocal",this.m_formulasLocal,"Range",this._isNull),this.m_formulasLocal},set:function(n){(this.m_formulasLocal=n,w(this,"FormulasLocal",n))||(this.m_formulasLocal=n,f(this.context,this,"FormulasLocal",n))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"formulasR1C1",{get:function(){return r("formulasR1C1",this.m_formulasR1C1,"Range",this._isNull),this.m_formulasR1C1},set:function(n){(this.m_formulasR1C1=n,w(this,"FormulasR1C1",n))||(this.m_formulasR1C1=n,f(this.context,this,"FormulasR1C1",n))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"hidden",{get:function(){return r("hidden",this.m_hidden,"Range",this._isNull),this.m_hidden},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"numberFormat",{get:function(){return r("numberFormat",this.m_numberFormat,"Range",this._isNull),this.m_numberFormat},set:function(n){(this.m_numberFormat=n,w(this,"NumberFormat",n))||(this.m_numberFormat=n,f(this.context,this,"NumberFormat",n))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"rowCount",{get:function(){return r("rowCount",this.m_rowCount,"Range",this._isNull),this.m_rowCount},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"rowHidden",{get:function(){return r("rowHidden",this.m_rowHidden,"Range",this._isNull),this.m_rowHidden},set:function(n){this.m_rowHidden=n;f(this.context,this,"RowHidden",n)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"rowIndex",{get:function(){return r("rowIndex",this.m_rowIndex,"Range",this._isNull),this.m_rowIndex},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"text",{get:function(){return r("text",this.m_text,"Range",this._isNull),this.m_text},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"valueTypes",{get:function(){return r("valueTypes",this.m_valueTypes,"Range",this._isNull),this.m_valueTypes},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"values",{get:function(){return r("values",this.m_values,"Range",this._isNull),this.m_values},set:function(n){(this.m_values=n,w(this,"Values",n))||(this.m_values=n,f(this.context,this,"Values",n))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_ReferenceId",{get:function(){return r("_ReferenceId",this.m__ReferenceId,"Range",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),l.prototype.set=function(n,t){this._recursivelySet(n,t,["numberFormat","values","formulas","formulasLocal","formulasR1C1","rowHidden","columnHidden"],["format"],["conditionalFormats","sort","worksheet","conditionalFormats","sort","worksheet"])},l.prototype.calculate=function(){s(this.context,this,"Calculate",0,[])},l.prototype.clear=function(n){s(this.context,this,"Clear",0,[n])},l.prototype.delete=function(n){s(this.context,this,"Delete",0,[n])},l.prototype.getBoundingRect=function(i){return new n.Range(this.context,t(this.context,this,"GetBoundingRect",1,[i],!1,!0,null))},l.prototype.getCell=function(i,r){return new n.Range(this.context,t(this.context,this,"GetCell",1,[i,r],!1,!0,null))},l.prototype.getColumn=function(i){return new n.Range(this.context,t(this.context,this,"GetColumn",1,[i],!1,!0,null))},l.prototype.getColumnsAfter=function(i){if(!p()){if(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0)throw new OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove");return this._getAdjacentRange("getColumnsAfter",i,this.getLastColumn(),0,1)}return new n.Range(this.context,t(this.context,this,"GetColumnsAfter",1,[i],!1,!0,null))},l.prototype.getColumnsBefore=function(i){if(!p()){if(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0)throw new OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove");return this._getAdjacentRange("getColumnsBefore",i,this.getColumn(0),0,-1)}return new n.Range(this.context,t(this.context,this,"GetColumnsBefore",1,[i],!1,!0,null))},l.prototype.getEntireColumn=function(){return new n.Range(this.context,t(this.context,this,"GetEntireColumn",1,[],!1,!0,null))},l.prototype.getEntireRow=function(){return new n.Range(this.context,t(this.context,this,"GetEntireRow",1,[],!1,!0,null))},l.prototype.getIntersection=function(i){return new n.Range(this.context,t(this.context,this,"GetIntersection",1,[i],!1,!0,null))},l.prototype.getIntersectionOrNullObject=function(i){return new n.Range(this.context,t(this.context,this,"GetIntersectionOrNullObject",1,[i],!1,!0,null))},l.prototype.getLastCell=function(){return new n.Range(this.context,t(this.context,this,"GetLastCell",1,[],!1,!0,null))},l.prototype.getLastColumn=function(){return new n.Range(this.context,t(this.context,this,"GetLastColumn",1,[],!1,!0,null))},l.prototype.getLastRow=function(){return new n.Range(this.context,t(this.context,this,"GetLastRow",1,[],!1,!0,null))},l.prototype.getOffsetRange=function(i,r){return new n.Range(this.context,t(this.context,this,"GetOffsetRange",1,[i,r],!1,!0,null))},l.prototype.getResizedRange=function(i,r){if(!p()){this._ensureInteger(i,"getResizedRange");this._ensureInteger(r,"getResizedRange");var u=i>=0&&r>=0?this:this.getCell(0,0);return u.getBoundingRect(this.getLastCell().getOffsetRange(i,r))}return new n.Range(this.context,t(this.context,this,"GetResizedRange",1,[i,r],!1,!0,null))},l.prototype.getRow=function(i){return new n.Range(this.context,t(this.context,this,"GetRow",1,[i],!1,!0,null))},l.prototype.getRowsAbove=function(i){if(!p()){if(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0)throw new OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove");return this._getAdjacentRange("getRowsAbove",i,this.getRow(0),-1,0)}return new n.Range(this.context,t(this.context,this,"GetRowsAbove",1,[i],!1,!0,null))},l.prototype.getRowsBelow=function(i){if(!p()){if(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0)throw new OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove");return this._getAdjacentRange("getRowsBelow",i,this.getLastRow(),1,0)}return new n.Range(this.context,t(this.context,this,"GetRowsBelow",1,[i],!1,!0,null))},l.prototype.getUsedRange=function(i){return new n.Range(this.context,t(this.context,this,"GetUsedRange",1,[i],!1,!0,null))},l.prototype.getUsedRangeOrNullObject=function(i){return new n.Range(this.context,t(this.context,this,"GetUsedRangeOrNullObject",1,[i],!1,!0,null))},l.prototype.getVisibleView=function(){return new n.RangeView(this.context,t(this.context,this,"GetVisibleView",1,[],!1,!1,null))},l.prototype.insert=function(i){return new n.Range(this.context,t(this.context,this,"Insert",0,[i],!1,!0,null))},l.prototype.merge=function(n){s(this.context,this,"Merge",0,[n])},l.prototype.select=function(){s(this.context,this,"Select",1,[])},l.prototype.unmerge=function(){s(this.context,this,"Unmerge",0,[])},l.prototype._KeepReference=function(){s(this.context,this,"_KeepReference",1,[])},l.prototype._ValidateArraySize=function(n,t){s(this.context,this,"_ValidateArraySize",1,[n,t])},l.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;h(this,t);u(t.Address)||(this.m_address=t.Address);u(t.AddressLocal)||(this.m_addressLocal=t.AddressLocal);u(t.CellCount)||(this.m_cellCount=t.CellCount);u(t.ColumnCount)||(this.m_columnCount=t.ColumnCount);u(t.ColumnHidden)||(this.m_columnHidden=t.ColumnHidden);u(t.ColumnIndex)||(this.m_columnIndex=t.ColumnIndex);u(t.Formulas)||(this.m_formulas=t.Formulas);u(t.FormulasLocal)||(this.m_formulasLocal=t.FormulasLocal);u(t.FormulasR1C1)||(this.m_formulasR1C1=t.FormulasR1C1);u(t.Hidden)||(this.m_hidden=t.Hidden);u(t.NumberFormat)||(this.m_numberFormat=t.NumberFormat);u(t.RowCount)||(this.m_rowCount=t.RowCount);u(t.RowHidden)||(this.m_rowHidden=t.RowHidden);u(t.RowIndex)||(this.m_rowIndex=t.RowIndex);u(t.Text)||(this.m_text=t.Text);u(t.ValueTypes)||(this.m_valueTypes=t.ValueTypes);u(t.Values)||(this.m_values=t.Values);u(t._ReferenceId)||(this.m__ReferenceId=t._ReferenceId);a(this,t,["conditionalFormats","ConditionalFormats","format","Format","sort","Sort","worksheet","Worksheet"])}},l.prototype.load=function(n){return c(this,n),this},l.prototype._handleIdResult=function(n){(i.prototype._handleIdResult.call(this,n),e(n))||u(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId)},l.prototype.track=function(){return this.context.trackedObjects.add(this),this},l.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},l.prototype.toJSON=function(){return{address:this.m_address,addressLocal:this.m_addressLocal,cellCount:this.m_cellCount,columnCount:this.m_columnCount,columnHidden:this.m_columnHidden,columnIndex:this.m_columnIndex,format:this.m_format,formulas:this.m_formulas,formulasLocal:this.m_formulasLocal,formulasR1C1:this.m_formulasR1C1,hidden:this.m_hidden,numberFormat:this.m_numberFormat,rowCount:this.m_rowCount,rowHidden:this.m_rowHidden,rowIndex:this.m_rowIndex,text:this.m_text,values:this.m_values,valueTypes:this.m_valueTypes}},l}(OfficeExtension.ClientObject);n.Range=k;ot=function(i){function s(){i.apply(this,arguments)}return __extends(s,i),Object.defineProperty(s.prototype,"_className",{get:function(){return"RangeView"},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rows",{get:function(){return this.m_rows||(this.m_rows=new n.RangeViewCollection(this.context,o(this.context,this,"Rows",!0,!1))),this.m_rows},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"cellAddresses",{get:function(){return r("cellAddresses",this.m_cellAddresses,"RangeView",this._isNull),this.m_cellAddresses},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"columnCount",{get:function(){return r("columnCount",this.m_columnCount,"RangeView",this._isNull),this.m_columnCount},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulas",{get:function(){return r("formulas",this.m_formulas,"RangeView",this._isNull),this.m_formulas},set:function(n){this.m_formulas=n;f(this.context,this,"Formulas",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulasLocal",{get:function(){return r("formulasLocal",this.m_formulasLocal,"RangeView",this._isNull),this.m_formulasLocal},set:function(n){this.m_formulasLocal=n;f(this.context,this,"FormulasLocal",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulasR1C1",{get:function(){return r("formulasR1C1",this.m_formulasR1C1,"RangeView",this._isNull),this.m_formulasR1C1},set:function(n){this.m_formulasR1C1=n;f(this.context,this,"FormulasR1C1",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"index",{get:function(){return r("index",this.m_index,"RangeView",this._isNull),this.m_index},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"numberFormat",{get:function(){return r("numberFormat",this.m_numberFormat,"RangeView",this._isNull),this.m_numberFormat},set:function(n){this.m_numberFormat=n;f(this.context,this,"NumberFormat",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rowCount",{get:function(){return r("rowCount",this.m_rowCount,"RangeView",this._isNull),this.m_rowCount},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"text",{get:function(){return r("text",this.m_text,"RangeView",this._isNull),this.m_text},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"valueTypes",{get:function(){return r("valueTypes",this.m_valueTypes,"RangeView",this._isNull),this.m_valueTypes},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"values",{get:function(){return r("values",this.m_values,"RangeView",this._isNull),this.m_values},set:function(n){this.m_values=n;f(this.context,this,"Values",n)},enumerable:!0,configurable:!0}),s.prototype.set=function(n,t){this._recursivelySet(n,t,["numberFormat","values","formulas","formulasLocal","formulasR1C1"],[],["rows","rows"])},s.prototype.getRange=function(){return new n.Range(this.context,t(this.context,this,"GetRange",1,[],!1,!0,null))},s.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;h(this,t);u(t.CellAddresses)||(this.m_cellAddresses=t.CellAddresses);u(t.ColumnCount)||(this.m_columnCount=t.ColumnCount);u(t.Formulas)||(this.m_formulas=t.Formulas);u(t.FormulasLocal)||(this.m_formulasLocal=t.FormulasLocal);u(t.FormulasR1C1)||(this.m_formulasR1C1=t.FormulasR1C1);u(t.Index)||(this.m_index=t.Index);u(t.NumberFormat)||(this.m_numberFormat=t.NumberFormat);u(t.RowCount)||(this.m_rowCount=t.RowCount);u(t.Text)||(this.m_text=t.Text);u(t.ValueTypes)||(this.m_valueTypes=t.ValueTypes);u(t.Values)||(this.m_values=t.Values);a(this,t,["rows","Rows"])}},s.prototype.load=function(n){return c(this,n),this},s.prototype.toJSON=function(){return{cellAddresses:this.m_cellAddresses,columnCount:this.m_columnCount,formulas:this.m_formulas,formulasLocal:this.m_formulasLocal,formulasR1C1:this.m_formulasR1C1,index:this.m_index,numberFormat:this.m_numberFormat,rowCount:this.m_rowCount,text:this.m_text,values:this.m_values,valueTypes:this.m_valueTypes}},s}(OfficeExtension.ClientObject);n.RangeView=ot;st=function(i){function u(){i.apply(this,arguments)}return __extends(u,i),Object.defineProperty(u.prototype,"_className",{get:function(){return"RangeViewCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"items",{get:function(){return r("items",this.m__items,"RangeViewCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),u.prototype.getCount=function(){var t=s(this.context,this,"GetCount",1,[]),n=new OfficeExtension.ClientResult;return l(this,t,n),n},u.prototype.getItemAt=function(i){return new n.RangeView(this.context,t(this.context,this,"GetItemAt",1,[i],!1,!1,null))},u.prototype._handleResult=function(t){var u,f,r,o;if((i.prototype._handleResult.call(this,t),!e(t))&&(u=t,h(this,u),!e(u[OfficeExtension.Constants.items])))for(this.m__items=[],f=u[OfficeExtension.Constants.items],r=0;r6&&i.slice(0,5)===t.DateJSONPrefix&&i.slice(-1)===t.DateJSONSuffix&&(r=new Date(parseInt(i.slice(5,-1))),r)?r:i})},t._replaceDateWithStringDate=function(n){var i=JSON.stringify(n,function(n,i){return this[n]instanceof Date?t.DateJSONPrefix+this[n].getTime()+t.DateJSONSuffix:i});return JSON.parse(i)},Object.defineProperty(t.prototype,"key",{get:function(){return r("key",this.m_key,"Setting",this._isNull),this.m_key},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return r("value",this.m_value,"Setting",this._isNull),this.m_value},set:function(n){if(!e(n)){this.m_value=n;var i=t._replaceDateWithStringDate(n);f(this.context,this,"Value",i);return}this.m_value=n;f(this.context,this,"Value",n)},enumerable:!0,configurable:!0}),t.prototype.set=function(n,t){this._recursivelySet(n,t,["value"],[],[])},t.prototype.delete=function(){s(this.context,this,"Delete",0,[])},t.prototype._handleResult=function(i){if(n.prototype._handleResult.call(this,i),!e(i)){var r=i;h(this,r);u(r.Key)||(this.m_key=r.Key);u(r.Value)||(this.m_value=r.Value,this.m_value=t.replaceStringDateWithDate(this.m_value))}},t.prototype.load=function(n){return c(this,n),this},t.prototype.toJSON=function(){return{key:this.m_key,value:this.m_value}},t.DateJSONPrefix="Date(",t.DateJSONSuffix=")",t}(OfficeExtension.ClientObject);n.Setting=g;ct=function(i){function u(){i.apply(this,arguments)}return __extends(u,i),Object.defineProperty(u.prototype,"_className",{get:function(){return"NamedItemCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"items",{get:function(){return r("items",this.m__items,"NamedItemCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),u.prototype.add=function(i,r,u){return new n.NamedItem(this.context,t(this.context,this,"Add",0,[i,r,u],!1,!0,null))},u.prototype.addFormulaLocal=function(i,r,u){return new n.NamedItem(this.context,t(this.context,this,"AddFormulaLocal",0,[i,r,u],!1,!1,null))},u.prototype.getCount=function(){var t=s(this.context,this,"GetCount",1,[]),n=new OfficeExtension.ClientResult;return l(this,t,n),n},u.prototype.getItem=function(t){return new n.NamedItem(this.context,y(this.context,this,[t]))},u.prototype.getItemOrNullObject=function(i){return new n.NamedItem(this.context,t(this.context,this,"GetItemOrNullObject",1,[i],!1,!1,null))},u.prototype._handleResult=function(t){var u,f,r,o;if((i.prototype._handleResult.call(this,t),!e(t))&&(u=t,h(this,u),!e(u[OfficeExtension.Constants.items])))for(this.m__items=[],f=u[OfficeExtension.Constants.items],r=0;r"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"error",{get:function(){return r("error",this.m_error,"FunctionResult",this._isNull),this.m_error},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return r("value",this.m_value,"FunctionResult",this._isNull),this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){if(n.prototype._handleResult.call(this,t),!e(t)){var i=t;h(this,i);u(i.Error)||(this.m_error=i.Error);u(i.Value)||(this.m_value=i.Value)}},t.prototype.load=function(n){return c(this,n),this},t.prototype.toJSON=function(){return{error:this.m_error,value:this.m_value}},t}(OfficeExtension.ClientObject);n.FunctionResult=i;pu=function(n){function r(){n.apply(this,arguments)}return __extends(r,n),Object.defineProperty(r.prototype,"_className",{get:function(){return"Functions"},enumerable:!0,configurable:!0}),r.prototype.abs=function(n){return new i(this.context,t(this.context,this,"Abs",0,[n],!1,!0,null))},r.prototype.accrInt=function(n,r,u,f,e,o,s,h){return new i(this.context,t(this.context,this,"AccrInt",0,[n,r,u,f,e,o,s,h],!1,!0,null))},r.prototype.accrIntM=function(n,r,u,f,e){return new i(this.context,t(this.context,this,"AccrIntM",0,[n,r,u,f,e],!1,!0,null))},r.prototype.acos=function(n){return new i(this.context,t(this.context,this,"Acos",0,[n],!1,!0,null))},r.prototype.acosh=function(n){return new i(this.context,t(this.context,this,"Acosh",0,[n],!1,!0,null))},r.prototype.acot=function(n){return new i(this.context,t(this.context,this,"Acot",0,[n],!1,!0,null))},r.prototype.acoth=function(n){return new i(this.context,t(this.context,this,"Acoth",0,[n],!1,!0,null))},r.prototype.amorDegrc=function(n,r,u,f,e,o,s){return new i(this.context,t(this.context,this,"AmorDegrc",0,[n,r,u,f,e,o,s],!1,!0,null))},r.prototype.amorLinc=function(n,r,u,f,e,o,s){return new i(this.context,t(this.context,this,"AmorLinc",0,[n,r,u,f,e,o,s],!1,!0,null))},r.prototype.and=function(){for(var r=[],n=0;n0?i.push(t):t.tabIndex===0&&r.push(t):r.push(t);return i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;return r===0&&(r=i.indexOf(n)-i.indexOf(t)),r}),[].concat(i,r)}var o="focus",s="on",k="configurable",d="writable",h="enumerable",u="",c="undefined",t=!1,i=!0,l=2147483647,n=null,r=-1,a=r,g="&_xdm_Info=",nt="&_serializer_version=",tt="_xdm_",ft="_serializer_version=",v="#",it="&",f="class",y={},et=3e4,p=n,w=n,e=(new Date).getTime();return{set_entropy:function(n){var t,r,i;if(typeof n=="string")for(t=0;t6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(r)===OSF.DDA.SettingsManager.DataJSONSuffix&&(i=new Date(parseInt(t.slice(5,r))),i)?i:t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,i);f[u]=t}catch(e){}}return f},loadScript:function(r,u,f){var s,e,o,h,c;r&&u&&(s=window.document,e=y[r],e?e.loaded?u():e.pendingCallbacks.push(u):(o=s.createElement("script"),o.type="text/javascript",e={loaded:t,pendingCallbacks:[u],timer:n},y[r]=e,h=function(){var r,t,u;for(e.timer!=n&&(clearTimeout(e.timer),delete e.timer),e.loaded=i,r=e.pendingCallbacks.length,t=0;t1?l[l.length-1]:n,s,h,c,a;return u&&o!=n&&(o.indexOf(it)>=0&&(o=o.split(it)[0]),o=decodeURIComponent(o)),s=b(),!f&&s&&(h=window.name.indexOf(i),h>r&&(c=window.name.indexOf(";",h),c==r&&(c=window.name.length),a=window.name.substring(h,c),o?s.setItem(a,o):o=s.getItem(a))),o},getConversationId:function(){var i=window.location.search,t=n,r;return i&&(r=i.indexOf("&"),t=r>0?i.substring(1,r):i.substr(1),t&&t.charAt(t.length-1)==="="&&(t=t.substring(0,t.length-1),t&&(t=decodeURIComponent(t)))),t},getInfoItems:function(n){var t=n.split("$");return typeof t[1]==c&&(t=n.split("|")),typeof t[1]==c&&(t=n.split("%7C")),t},getXdmFieldValue:function(n,t){var r=u,f=OSF.OUtil.parseXdmInfo(t),i;if(f&&(i=OSF.OUtil.getInfoItems(f),i!=undefined&&i.length>=3))switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]),f;if(u)throw u;for(f in r)if(u=Function._validateParameter(n[f],r[f],f),u)throw u;},writeProfilerMark:function(n){window.msWriteProfilerMark&&(window.msWriteProfilerMark(n),OsfMsAjaxFactory.msAjaxDebug.trace(n))},outputDebug:function(n){typeof OsfMsAjaxFactory!==c&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){var e,f;r=r||{};for(e in u)f=u[e],r[f]==undefined&&(r[f]=i);return Object.defineProperty(n,t,r),n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[h])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[h])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[d,h,k])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[d,h,k])},finalizeProperties:function(n,r){var e,u;r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8,e=o&255,i[t++]=r>>2,i[t++]=(r&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63,isNaN(o)||(r=o>>8,f=h&255,e=h>>8,i[t++]=r>>2,i[t++]=(r&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63),isNaN(o)?i[t-1]=64:isNaN(h)&&(i[t-2]=64,i[t-1]=64),c=0;c0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){var u,i,f,r;if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(u=[],i=0;in)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=ut(u),e=f?u.length-1:0,u.length===0)return n;while(!h&&e>=0&&en)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=ut(u),l=y(u,f),s=v(u.length,l,e),s<0)return n;while(!c&&s>=0&&s0;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[r%16],r=Math.floor(r/16);for(;t<32;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[Math.floor(Math.random()*16)];return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3};OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611,WordAndroid:8388613,PowerpointAndroid:8388614};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",Reserved:"reserved",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData",Base64:"base64"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidOpenBrowserWindow:102,dispidCreateDocumentMethod:105,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];return i?(i.name||(i.name=n[this.errorCodes.ooeInternalError].name),i.message||(i.message=n[this.errorCodes.ooeInternalError].message)):i=n[this.errorCodes.ooeInternalError],i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:t.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:t.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:t.L_SSOConnectionLostError,message:t.L_SSOConnectionLostErrorMessage}}}}(),function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}(),r,i,h,u,c,l,f,a,e,v,y,p,w,b,o,k,d,g,s,nt,tt,it,rt;n.RequirementVersion=ut;r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){var f,u,e,i,r;if(n==undefined)return!1;if(t==undefined&&(t=0),f=this._setMap,u=f._sets,u.hasOwnProperty(n.toLowerCase())){e=u[n.toLowerCase()];try{if((i=this._getVersion(e),t=t+"",r=this._getVersion(t),i.major>0&&i.major>r.major)||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),i=0,r=0;if(t.length<2&&isNaN(Number(n)))throw u;else if(i=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(i)||isNaN(r))throw u;return{minor:r,major:i}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;h=function(n){function i(){n.call(this,{dialogapi:t})}return __extends(i,n),i}(i);n.DefaultDialogSetRequirement=h;u=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelClientDefaultSetRequirement=u;c=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(u);n.ExcelClientV1DefaultSetRequirement=c;l=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookClientDefaultSetRequirement=l;f=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return __extends(i,n),i}(i);n.WordClientDefaultSetRequirement=f;a=function(n){function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return __extends(i,n),i}(f);n.WordClientV1DefaultSetRequirement=a;e=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointClientDefaultSetRequirement=e;v=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(e);n.PowerpointClientV1DefaultSetRequirement=v;y=function(n){function i(){n.call(this,{selection:t,textcoercion:t})}return __extends(i,n),i}(i);n.ProjectClientDefaultSetRequirement=y;p=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return __extends(i,n),i}(i);n.ExcelWebDefaultSetRequirement=p;w=function(n){function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordWebDefaultSetRequirement=w;b=function(n){function i(){n.call(this,{activeview:t,settings:t})}return __extends(i,n),i}(i);n.PowerpointWebDefaultSetRequirement=b;o=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookWebDefaultSetRequirement=o;k=function(n){function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.SwayWebDefaultSetRequirement=k;d=function(n){function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return __extends(i,n),i}(i);n.AccessWebDefaultSetRequirement=d;g=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelIOSDefaultSetRequirement=g;s=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordIOSDefaultSetRequirement=s;nt=function(n){function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return __extends(t,n),t}(s);n.WordIOSV1DefaultSetRequirement=nt;tt=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointIOSDefaultSetRequirement=tt;it=function(n){function i(){n.call(this,{mailbox:t})}return __extends(i,n),i}(i);n.OutlookIOSDefaultSetRequirement=it;rt=function(){function n(){}var t="undefined";return n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},n.getDefaultRequirementMatrix=function(u){var f,e,s,o;return this.initializeDefaultSetMatrix(),f=undefined,e=u.get_requirementMatrix(),e!=undefined&&e.length>0&&typeof JSON!==t?(s=JSON.parse(u.get_requirementMatrix().toLowerCase()),f=new r(new i(s))):(o=n.getClientFullVersionString(u),f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[o]!=undefined?new r(n.DefaultSetArrayMatrix[o]):new r(new i({}))),f},n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix(),e;return f!=undefined&&f.length>0&&typeof JSON!==t?(e=JSON.parse(n.get_requirementMatrix().toLowerCase()),u=new r(new i(e))):u=new r(new h),u},n.getClientFullVersionString=function(n){var i=n.get_appMinorVersion(),u="",r="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;return f&&n.get_appVersion()==1?r=t==4096&&i>=15?"16.00.01":"16.00":n.get_appName()==64?r=n.get_appVersion():(u=i<10?"0"+i:""+i,r=n.get_appVersion()+"."+u),n.get_appName()+"-"+r},n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new c;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new v;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new l;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new w;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new b;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new g;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new k;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new nt;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new tt;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new it},n.Excel_RCLIENT_1600="1-16.00",n.Excel_RCLIENT_1601="1-16.01",n.Word_RCLIENT_1600="2-16.00",n.Word_RCLIENT_1601="2-16.01",n.PowerPoint_RCLIENT_1600="4-16.00",n.PowerPoint_RCLIENT_1601="4-16.01",n.Outlook_RCLIENT_1600="8-16.00",n.Excel_WAC_1600="16-16.00",n.Word_WAC_1600="32-16.00",n.Outlook_WAC_1600="64-16.00",n.Outlook_WAC_1601="64-16.01",n.Project_RCLIENT_1600="128-16.00",n.Access_WAC_1600="256-16.00",n.PowerPoint_WAC_1600="512-16.00",n.Excel_IOS_1600="1024-16.00",n.SWAY_WAC_1600="2048-16.00",n.Word_IOS_1600="4096-16.00",n.Word_IOS_16001="4096-16.00.01",n.PowerPoint_IOS_1600="8192-16.00",n.Outlook_IOS_1600="65536-16.00",n.DefaultSetArrayMatrix={},n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))}(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}return n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n},n.getInstance=function(){return n.hostObj===undefined&&(n.hostObj=new n),n.hostObj},n.prototype.getPlatform=function(){var n=this,t;return n.hostInfo.hostPlatform&&(t=n.hostInfo.hostPlatform.toLowerCase(),n.platformRemappings[t])?n.platformRemappings[t]:null},n.prototype.getHost=function(){var n=this,t;if(n.hostInfo.hostType){if(t=n.hostInfo.hostType.toLowerCase(),n.camelCaseMappings[t])return n.camelCaseMappings[t];if(t=n.capitalizeFirstLetter(n.hostInfo.hostType),Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null},n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null},n}();n.Host=t})(t=n.HostName||(n.HostName={}))}(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){n||(window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,n=!0)},disableShortcut:function(){n&&(t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window),n=!1)}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i,r,o,u,f,e;if(n&&typeof n=="string"&&(r=n.indexOf("#"),r!=-1)){o=n.substring(0,r);u=n.substring(r+1);switch(o){case"binding":case"bindings":u&&(i=new OSF.DDA.BindingPromise(u))}}if(i)return i.onFail=t,i;else if(t)if(f=typeof t,f=="function")e={},e[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(e,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext));else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f);};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this,s,e;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.auth&&OSF.OUtil.defineEnumerableProperty(f,"auth",{value:n.auth});n.application&&OSF.OUtil.defineEnumerableProperty(f,"application",{value:n.application});n.get_isDialog()?(e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e})):(t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t}),r&&(s=r.displayName||"appOM",delete r.displayName,OSF.OUtil.defineEnumerableProperty(f,s,{value:r})),u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}}),e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e}))};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Application=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this,u;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;return OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext()),n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,e=n.length,o=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){var u,i,r;for(u in n){if(i=n[u],r=t[u],i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw o();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw o();}};f.extractRequiredArguments=function(t,i,r){var f,u,h,s,c,l;if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(c=n.length-1;c>=s;c--){l=n[c];switch(typeof l){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=l;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}if(f=o.fillOptions(f,i,r,u),e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;return o.verifyArguments(t,f),f}var h="function",s=n.length,o=new OSF.DDA.ApiMethodCall(n,t,i,f,e);this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),u=c(n,r,t,i);return o.constructCallArgs(r,u,t,i)};this.processResponse=function(n,t,i,f){return n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n)};this.getCallArgs=function(n){for(var t,u,r,i=n.length-1;i>=s;i--){r=n[i];switch(typeof r){case"object":t=r;break;case h:u=r}}return t=t||{},u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u),t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],i=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],t,i,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback],u,r;f&&(u={},u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?u[OSF.DDA.AsyncResultEnum.Properties.Value]=i:(r={},i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i),f(new OSF.DDA.AsyncResult(u,r)))};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.SyncMethodNames[t]=i};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){function o(n,i,r,u){var o,c,s,h;if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(s=n.length-1;s>=e;s--){h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}return o=f.fillOptions(o,i,r,u),f.verifyArguments(t,o),o}var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),u=o(n,r,t,i);return f.constructCallArgs(r,u,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){function e(i,f){var a=i?{}:undefined,s,h,o,v,c,l;for(s in i){if(h=i[s],OSF.DDA.ListType.isListType(s)){o=[];for(v in h)o.push(e(h[v],f))}else OSF.OUtil.listContainsKey(r,s)?o=r[s][f](h):f==u&&n.preserveNesting(s)?o=e(h,f):(c=t[s],c?(l=c[f],l&&(o=l[h],o===undefined&&(o=h))):o=h);a[s]=o}return a}function l(i,r){var e,u,h,s;for(u in r)h=n.isComplexType(u)?l(i,t[u][o]):i[u],h!=undefined&&(e||(e={}),s=r[u],s==f&&(s=u),e[s]=n.pack(u,h));return e}function s(i,r,e){var o,a,h,l,p,v,y;e||(e={});for(o in r){if(a=r[o],a==f)h=i;else if(a==c){e[o]=i.toArray();continue}else h=i[a];if(h===null||h===undefined)e[o]=undefined;else if(h=n.unpack(o,h),n.isComplexType(o))l=t[o][u],n.preserveNesting(o)?e[o]=s(h,l):s(h,l,e);else if(OSF.DDA.ListType.isListType(o)){l={};p=OSF.DDA.ListType.getDescriptor(o);l[p]=f;v=new Array(h.length);for(y in h)v[y]=s(h[y],l);e[o]=v}else e[o]=h}return e}function a(n,i,r){var f=t[n][r],u,o,c;return r=="toHost"?(o=e(i,r),u=l(o,f)):r==h&&(c=s(i,f),u=e(c,r)),u}var h="fromHost",i=this,o="toHost",u=h,c="sourceData",f="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];t||(t={});i.addMapping=function(n,i){var e,h,c,l,r,s,a,v;if(i.map){e=i.map;h={};for(c in e)l=e[c],l==f&&(l=c),h[l]=c}else e=i.toHost,h=i.fromHost;if(r=t[n],r){s=r[o];for(a in s)e[a]=s[a];s=r[u];for(v in s)h[v]=s[v]}else r=t[n]={};r[o]=e;r[u]=h};i.toHost=function(n,t){return a(n,t,o)};i.fromHost=function(n,t){return a(n,t,u)};i.self=f;i.sourceData=c;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){return this.isDynamicType(n)?t[n].toHost(i):i};i.unpack=function(n,i){return this.isDynamicType(n)?t[n].fromHost(i):i}};OSF.DDA.getDecoratedParameterMap=function(n,t){function r(n){var i=null,r,t;if(n)for(i={},r=n.length,t=0;t0){for(r=[],i=0;i=s)break;if(f=Function._validateParameter(n[e],o,h),f)return f.popStackFrame(),f}return t}),Function._validateParameterCount||(Function._validateParameterCount=function(n,r,u){var f,s,e=r.length,h=n.length,c,l,a;if(he)for(s=i,f=0;f0&&t.push(u)}}catch(s){}return t}var i=[],t={};t[Microsoft.Office.WebExtension.Parameters.Data]=function(){var t=0,i=1;return{toHost:function(n){if(OSF.DDA.TableDataProperties&&typeof n!="string"&&n[OSF.DDA.TableDataProperties.TableRows]!==undefined){var r=[];r[t]=n[OSF.DDA.TableDataProperties.TableRows];r[i]=n[OSF.DDA.TableDataProperties.TableHeaders];n=r}return n},fromHost:function(r){var f,e,u;return r.toArray?(e=r.dimensions(),e===2?f=n(r):(u=r.toArray(),u.length===2&&(u[0]!=null&&u[0].toArray||u[1]!=null&&u[1].toArray)?(f={},f[OSF.DDA.TableDataProperties.TableRows]=n(u[t]),f[OSF.DDA.TableDataProperties.TableHeaders]=n(u[i])):f=u)):f=r,f}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,i,t);this.unpack=function(n,i){var r,u;return this.isComplexType(n)||OSF.DDA.ListType.isListType(n)?(u=(i||typeof i=="unknown")&&i.toArray,r=u?i.toArray():i||{}):r=this.isDynamicType(n)?t[n].fromHost(i):i,r}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(n){function t(n){var i=n,f,r,u;if(OSF.OUtil.isArray(n))for(f=i.length,r=0;r2)for(r=[],f=1;f=n.MESSAGE_TIME_DELTA?(h(),e.lastMessageTimestamp=o):(e.lastMessageTimestamp+=n.MESSAGE_TIME_DELTA,setTimeout(function(){h()},e.lastMessageTimestamp-o)),s},n.prototype.generateCorrelationId=function(){return++this.callingIndex,this.conversationId+this.callingIndex},n.getCurrentTimeMS=function(){return(new Date).getTime()},n.MESSAGE_TIME_DELTA=10,n}();n.WebkitScriptMessaging=i})(t=n.ScriptMessaging||(n.ScriptMessaging={}))}(OSFWebkit||(OSFWebkit={}));OSF.ScriptMessaging=OSFWebkit.ScriptMessaging,function(n){var i,r,t;n.MessageHandlerName="Agave";n.PopupMessageHandlerName="WefPopupHandler",function(n){var t="HostFullVersion",i="HostCustomMessage",r="RequirementMatrix",u="CommerceAllowed",f="TouchEnabled",e="InstanceId",o="CorrelationId",s="APISetVersion",h="SolutionToken",c="ControlIntegrationLevel",l="ActivationMode",a="DocumentUrl",v="BindingCount",y="AppDataLocale",p="APPUILocale",w="AppCapabilities",b="APIVersionSequence",k="RevisionVersion",d="MinorVersion",g="MajorVersion",nt="SolutionReferenceId",tt="Settings";n[n[tt]=0]=tt;n[n[nt]=1]=nt;n[n.AppType=2]="AppType";n[n[g]=3]=g;n[n[d]=4]=d;n[n[k]=5]=k;n[n[b]=6]=b;n[n[w]=7]=w;n[n[p]=8]=p;n[n[y]=9]=y;n[n[v]=10]=v;n[n[a]=11]=a;n[n[l]=12]=l;n[n[c]=13]=c;n[n[h]=14]=h;n[n[s]=15]=s;n[n[o]=16]=o;n[n[e]=17]=e;n[n[f]=18]=f;n[n[u]=19]=u;n[n[r]=20]=r;n[n[i]=21]=i;n[n[t]=22]=t}(n.AppContextProperties||(n.AppContextProperties={}));i=n.AppContextProperties,function(n){var t="SendMessage",i="GetContext",r="WriteSettings",u="UnregisterEvent",f="RegisterEvent";n[n.Execute=1]="Execute";n[n[f]=2]=f;n[n[u]=3]=u;n[n[r]=4]=r;n[n[i]=5]=i;n[n[t]=6]=t}(n.MethodId||(n.MethodId={}));r=n.MethodId;t=function(){function t(n){this.hostScriptProxy=n}var r="message",i=null;return t.prototype.execute=function(t,r,u){var f=r,e,o;f==i&&(f=[]);e={id:t,apiArgs:f};o=function(t){var e,f,r;if(u){if(e=[],OSF.OUtil.isArray(t))for(f=0;f=2&&(i=t[0],u=t[1]);r&&r(u,new n.WebkitSafeArray(i))},e=function(t){if(u)return u(new n.WebkitSafeArray(t))};this.hostScriptProxy.registerEvent(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.RegisterEvent,t,i,f,e)},t.prototype.unregisterEvent=function(t,i,r){var u=function(t){return r(new n.WebkitSafeArray(t))};this.hostScriptProxy.unregisterEvent(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.UnregisterEvent,t,i,u)},t.prototype.messageParent=function(n){var t=n[Microsoft.Office.WebExtension.Parameters.MessageToParent],i={dialogMessage:{messageType:OSF.DialogMessageType.DialogMessageReceived,messageContent:t}};window.opener.postMessage(JSON.stringify(i),window.location.origin)},t.prototype.openDialog=function(n,u,f,e){function c(t){if(t.origin==window.location.origin)try{var i=JSON.parse(t.data);i.dialogMessage&&f(n,[OSF.DialogMessageType.DialogMessageReceived,i.dialogMessage.messageContent])}catch(r){OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handlered. Message:"+t.data)}}function k(){try{(t.popup==i||t.popup.closed)&&(window.clearInterval(t.interval),window.removeEventListener(r,c),t.NotifyError=i,t.popup=i,f(n,[OSF.DialogMessageType.DialogClosed]))}catch(u){OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed.")}}var l,o,h,y;if(t.popup&&!t.popup.closed){e(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened);return}l="action=displayDialog";t.OpenDialogCallback=undefined;var a="#",s=JSON.parse(u),v=s.url;if(v){o=v.split(a);h="?";o[0].indexOf("?")>-1&&(h="&");var p=screen.width*s.width/100,w=screen.height*s.height/100,b="width="+p+", height="+w;o[0]=o[0].concat(h).concat(l);y=o.join(a);t.popup=window.open(y,"",b);t.OpenDialogCallback=function(i){if(i==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){window.addEventListener(r,c);this.messageEventListener=c;t.interval=window.setInterval(k,1e3);function u(t){f(n,[t])}t.NotifyError=u}e(i)}}},t.prototype.closeDialog=function(n,u,f){t.popup?(t.interval&&window.clearInterval(t.interval),t.popup.close(),t.popup=i,window.removeEventListener(r,this.messageEventListener),t.NotifyError=i,f(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)):f(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)},t.prototype.sendMessage=function(n){var t=n[Microsoft.Office.WebExtension.Parameters.MessageContent];!isNaN(parseFloat(t))&&isFinite(t)&&(t=t.toString());this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.SendMessage,t,i)},t}();n.WebkitHostController=t}(OSFWebkit||(OSFWebkit={}));OSF.Webkit=OSFWebkit;OSF.ClientHostController=new OSFWebkit.WebkitHostController(OSF.ScriptMessaging.GetScriptMessenger());OSF.DDA.ClientSettingsManager={getSettingsExecuteMethod:function(n){return function(t){var i,r,u=function(n,i){t.onReceiving&&t.onReceiving();t.onComplete&&t.onComplete(n,i)};try{n(t.hostCallArgs,t.onCalling,u)}catch(f){i=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;r={name:Strings.OfficeOM.L_InternalError,message:f};u(i,r)}}},read:function(n,t){var u=[],f=[],i,r;n&&n();i=OSF._OfficeAppFactory.getInitializationHelper();r=function(n){t&&t(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,n.get_settings())};i.getAppContext(null,r)},write:function(n,t,i,r){var u={},e=[],o=[],f,s;for(f in n)e.push(f),o.push(n[f]);u.keys=e;u.values=o;i&&i();s=function(n){r&&r(n[0],null)};OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.WriteSettings,u,s)}};OSF.InitializationHelper.prototype.initializeSettings=function(n,t){var i=n.get_settings();return this.deserializeSettings(i,t)};OSF.InitializationHelper.prototype.getAppContext=function(n,t){var r=function(n){for(var f,i=OSF.Webkit.AppContextProperties,h=n[i.AppType],e=n[i.Settings],o={},s=e[0],c=e[1],r=0;r40)&&(n=OSF.OUtil.Guid.generateNewGuid(),t.setValue(t.clientIDKey,n)),n},n.prototype.saveLog=function(n,t){var i=this,u=i.getValue(i.logIdSetKey);u=(u&&u.length>0?u+";":r)+n;i.setValue(i.logIdSetKey,u);i.setValue(n,t)},n.prototype.enumerateLog=function(n,t){var i=this,e=i.getValue(i.logIdSetKey),u,o,r,f;if(e){u=e.split(";");for(o in u)r=u[o],f=i.getValue(r),f&&(n&&n(r,f),t&&i.remove(r));t&&i.remove(i.logIdSetKey)}},n.prototype.getValue=function(n){var t=OSF.OUtil.getLocalStorage(),i=r;return t&&(i=t.getItem(n)),i},n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)},n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}},n}(),o=function(){function t(){}return t.prototype.LogData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(t)}catch(i){}},t.prototype.LogRawData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(t))}catch(i){}},t}();n.initialize=y;n.onAppActivated=p;n.onScriptDone=w;n.onCallDone=b;n.onMethodDone=k;n.onPropertyDone=d;n.onEventDone=g;n.onRegisterDone=nt;n.onAppClosed=tt;n.setOsfControlAppCorrelationId=it;n.doAppInitializationLogging=l;n.logAppCommonMessage=rt;n.logAppException=ut;OSF.AppTelemetry=n}(OSFAppTelemetry||(OSFAppTelemetry={}));Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(n){var i=this,r,t,u;if(i._eventHandlers={},i._objectEventHandlers={},i._queuedEventsArgs={},n!=null)for(r=0;r0)for(r=0;r0)for(r=0;r0?(this._eventHandlers[n]=[],!0):!1},clearObjectEventHandlers:function(n,t){return this._objectEventHandlers[n]!=null&&this._objectEventHandlers[n][t]!=null?(this._objectEventHandlers[n][t]=[],!0):!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},getObjectEventHandlerCount:function(n,t){return this._objectEventHandlers[n]==null||this._objectEventHandlers[n][t]==null?0:this._objectEventHandlers[n][t].length},fireEvent:function(n){var t,r,i;if(n.type==undefined)return!1;if(t=n.type,t&&this._eventHandlers[t]){for(r=this._eventHandlers[t],i=0;i0)){for(r=t[0];i.length>0;)u=i.shift(),r(u);return!0}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var o="hostPlatform",f="outlook",e="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(n,i[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:r=new OSF.DDA.RichApiMessageEventArgs(n,i);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i),t.initialize(r.initialData),(OSF._OfficeAppFactory.getHostInfo()[o]=="win32"||OSF._OfficeAppFactory.getHostInfo()[o]=="mac")&&t.setCurrentItemNumber(r.itemNumber.itemNumber);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkRecipientsChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var i=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),t=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];t(arguments,i,n)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(n){var i=OSF.DDA.SyncMethodNames.MessageParent.displayName,t=this,r;t[i]||OSF.OUtil.defineEnumerableProperty(t,i,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return n(arguments,t)}});r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;t[r]||typeof OSF.DialogParentMessageEventDispatch=="undefined"||OSF.DDA.DispIdHost.addEventSupport(t,OSF.DialogParentMessageEventDispatch,n);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(n){n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:n[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels,value:{types:["boolean"],defaultValue:!1}}],privateStateCallbacks:[],onSucceeded:function(n){var f=n[Microsoft.Office.WebExtension.Parameters.Id],i=n[Microsoft.Office.WebExtension.Parameters.Data],t=new OSF.DialogHandler,e=OSF.DDA.AsyncMethodNames.CloseAsync.displayName,r,u;return OSF.OUtil.defineEnumerableProperty(t,e,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];n(arguments,f,i,t)}}),r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName,OSF.OUtil.defineEnumerableProperty(t,r,{value:function(){var r=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],n=r.verifyAndExtractCall(arguments,t,i),u=n[Microsoft.Office.WebExtension.Parameters.EventType],f=n[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(u,f)}}),u=OSF.DDA.SyncMethodNames.SendMessage.displayName,OSF.OUtil.defineEnumerableProperty(t,u,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return n(arguments,i,t)}}),t},checkCallArgs:function(n){return n[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Width]=1),!n[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&n[Microsoft.Office.WebExtension.Parameters.Width]>100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99),n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1),!n[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99),n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(n){try{n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,n);OSF.ClientHostController.openDialog(n.dispId,n.targetId,function(t,i){n.onEvent&&n.onEvent(i);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(n){n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,n);try{OSF.ClientHostController.closeDialog(n.dispId,n.targetId,t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.messageParent=function(n){try{n.onCalling&&n.onCalling();var i=(new Date).getTime(),t=OSF.ClientHostController.messageParent(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs((new Date).getTime()-i),t),t}catch(r){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(r)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.sendMessage=function(n){try{n.onCalling&&n.onCalling();var r=(new Date).getTime(),t=OSF.ClientHostController.sendMessage(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),t}catch(i){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(i)}};Microsoft.Office.WebExtension.TableData=function(n,t){function i(n){if(n==null||n==undefined)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(n,2);t<2;t++)n=[n];return n}catch(i){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(n){t=i(n)}},rows:{get:function(){return n},set:function(t){n=t==null||OSF.OUtil.isArray(t)&&t.length==0?[]:i(t)}}});this.headers=t;this.rows=n};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(n){return new Microsoft.Office.WebExtension.TableData(n[OSF.DDA.TableDataProperties.TableRows],n[OSF.DDA.TableDataProperties.TableHeaders])};Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var n=null;return{findArrayDimensionality:function(n){if(OSF.OUtil.isArray(n)){for(var t=0,i=0;i0},enumerable:!0,configurable:!0}),t.prototype._getLastAction=function(){return this.m_actions[this.m_actions.length-1]},t.prototype.addTrace=function(n,t){this.m_traceInfos[n]=t},t.prototype.ensureInstantiateObjectPath=function(t){if(t){if(this.m_instantiatedObjectPaths[t.objectPathInfo.Id])return;if(this.ensureInstantiateObjectPath(t.parentObjectPath),this.ensureInstantiateObjectPaths(t.argumentObjectPaths),!this.m_instantiatedObjectPaths[t.objectPathInfo.Id]){var r={Id:this.m_context._nextId(),ActionType:1,Name:"",ObjectPathId:t.objectPathInfo.Id},i=new n.Action(r,!1,!1);i.referencedObjectPath=t;this.addAction(i)}}},t.prototype.ensureInstantiateObjectPaths=function(n){if(n)for(var t=0;t=0;--r)if(i=n[r],u=i.actionInfo.Id,i.referencedObjectPath&&t._updateLastUsedActionIdOfObjectPathId(e,i.referencedObjectPath,u),o=i.referencedArgumentObjectPaths,o)for(v=o.length,s=0;s0?i.actionInfo.L=c:i.actionInfo.L&&delete i.actionInfo.L},t}();n.ClientRequest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;n._internalConfig={showDisposeInfoInDebugInfo:!1,enableEarlyDispose:!0,alwaysPolyfillClientObjectRetrieveMethod:!1};t=function(){function t(){}return t.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},t.prototype._createRequestExecutorOrNull=function(){return null},Object.defineProperty(t.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),t}();n.SessionBase=t;i=function(){function i(r){if(this.m_customRequestHeaders={},this._onRunFinishedNotifiers=[],this.m_nextId=0,i._overrideSession)this.m_requestUrlAndHeaderInfoResolver=i._overrideSession;else if((n.Utility.isNullOrUndefined(r)||typeof r=="string"&&r.length===0)&&(r=i.defaultRequestUrlAndHeaders,r||(r={url:n.Constants.localDocument,headers:{}})),typeof r=="string")this.m_requestUrlAndHeaderInfo={url:r,headers:{}};else if(i.isRequestUrlAndHeaderInfoResolver(r))this.m_requestUrlAndHeaderInfoResolver=r;else if(i.isRequestUrlAndHeaderInfo(r)){var u=r;this.m_requestUrlAndHeaderInfo={url:u.url,headers:{}};n.Utility._copyHeaders(u.headers,this.m_requestUrlAndHeaderInfo.headers)}else throw n._Internal.RuntimeError._createInvalidArgError("url");this.m_requestUrlAndHeaderInfoResolver instanceof t&&(this.m_session=this.m_requestUrlAndHeaderInfoResolver);this._processingResult=!1;this._customData=n.Constants.iterativeExecutor;this.sync=this.sync.bind(this)}return Object.defineProperty(i.prototype,"session",{get:function(){return this.m_session},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"eventRegistration",{get:function(){return this.m_session?this.m_session.eventRegistration:n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_url",{get:function(){return this.m_requestUrlAndHeaderInfo?this.m_requestUrlAndHeaderInfo.url:null},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_pendingRequest",{get:function(){return this.m_pendingRequest==null&&(this.m_pendingRequest=new n.ClientRequest(this)),this.m_pendingRequest},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"debugInfo",{get:function(){var t=new n.RequestPrettyPrinter(this._rootObjectPropertyName,this._pendingRequest._objectPaths,this._pendingRequest._actions,n._internalConfig.showDisposeInfoInDebugInfo),i=t.process();return{pendingStatements:i}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"trackedObjects",{get:function(){return this.m_trackedObjects||(this.m_trackedObjects=new n.TrackedObjects(this)),this.m_trackedObjects},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"requestHeaders",{get:function(){return this.m_customRequestHeaders},enumerable:!0,configurable:!0}),i.prototype.load=function(t,r){n.Utility.validateContext(this,t);var u=i._parseQueryOption(r),f=n.ActionFactory.createQueryAction(this,t,u);this._pendingRequest.addActionResultHandler(f,t)},i.isLoadOption=function(t){if(!n.Utility.isUndefined(t.select)&&(typeof t.select=="string"||Array.isArray(t.select))||!n.Utility.isUndefined(t.expand)&&(typeof t.expand=="string"||Array.isArray(t.expand))||!n.Utility.isUndefined(t.top)&&typeof t.top=="number"||!n.Utility.isUndefined(t.skip)&&typeof t.skip=="number")return!0;for(var i in t)return!1;return!0},i.parseStrictLoadOption=function(n){var t={Select:[]};return i.parseStrictLoadOptionHelper(t,"","option",n),t},i.combineQueryPath=function(n,t,i){return n.length===0?t:n+i+t},i.parseStrictLoadOptionHelper=function(t,r,u,f){var e,o;for(e in f)if(o=f[e],e==="$all"){if(typeof o!="boolean")throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));o&&t.Select.push(i.combineQueryPath(r,"*","/"))}else if(e==="$top"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));t.Top=o}else if(e==="$skip"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));t.Skip=o}else if(typeof o=="boolean")o&&t.Select.push(i.combineQueryPath(r,e,"/"));else if(typeof o=="object")i.parseStrictLoadOptionHelper(t,i.combineQueryPath(r,e,"/"),i.combineQueryPath(u,e,"."),o);else throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));},i._parseQueryOption=function(t){var u={},f,r;if(typeof t=="string")f=t,u.Select=n.Utility._parseSelectExpand(f);else if(Array.isArray(t))u.Select=t;else if(typeof t=="object")if(r=t,i.isLoadOption(r)){if(typeof r.select=="string")u.Select=n.Utility._parseSelectExpand(r.select);else if(Array.isArray(r.select))u.Select=r.select;else if(!n.Utility.isNullOrUndefined(r.select))throw n._Internal.RuntimeError._createInvalidArgError("option.select");if(typeof r.expand=="string")u.Expand=n.Utility._parseSelectExpand(r.expand);else if(Array.isArray(r.expand))u.Expand=r.expand;else if(!n.Utility.isNullOrUndefined(r.expand))throw n._Internal.RuntimeError._createInvalidArgError("option.expand");if(typeof r.top=="number")u.Top=r.top;else if(!n.Utility.isNullOrUndefined(r.top))throw n._Internal.RuntimeError._createInvalidArgError("option.top");if(typeof r.skip=="number")u.Skip=r.skip;else if(!n.Utility.isNullOrUndefined(r.skip))throw n._Internal.RuntimeError._createInvalidArgError("option.skip");}else u=i.parseStrictLoadOption(t);else if(!n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError("option");return u},i.prototype.loadRecursive=function(t,r,u){var f,e,o;if(!n.Utility.isPlainJsonObject(r))throw n._Internal.RuntimeError._createInvalidArgError("options");f={};for(e in r)f[e]=i._parseQueryOption(r[e]);o=n.ActionFactory.createRecursiveQueryAction(this,t,{Queries:f,MaxDepth:u});this._pendingRequest.addActionResultHandler(o,t)},i.prototype.trace=function(t){n.ActionFactory.createTraceAction(this,t,!0)},i.prototype._processOfficeJsErrorResponse=function(n,t){},i.prototype.syncPrivateMain=function(){var t=this;return n.Utility._createPromiseFromResult(null).then(function(){if(!t.m_requestUrlAndHeaderInfo)return t.m_requestUrlAndHeaderInfoResolver._resolveRequestUrlAndHeaderInfo().then(function(i){if(t.m_requestUrlAndHeaderInfo=i,t.m_requestUrlAndHeaderInfo||(t.m_requestUrlAndHeaderInfo={url:n.Constants.localDocument,headers:{}}),n.Utility.isNullOrEmptyString(t.m_requestUrlAndHeaderInfo.url)&&(t.m_requestUrlAndHeaderInfo.url=n.Constants.localDocument),t.m_requestUrlAndHeaderInfo.headers||(t.m_requestUrlAndHeaderInfo.headers={}),typeof t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull=="function"){var r=t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull();r&&(t._requestExecutor=r)}})}).then(function(){var n=t._pendingRequest;return t.m_pendingRequest=null,t.processPreSyncPromises(n).then(function(){return t.syncPrivate(n)})})},i.prototype.syncPrivate=function(t){var f=this,e,o,s,u,h,r,i;return t.hasActions?(e=t.buildRequestMessageBody(),o=t.flags,this._requestExecutor||(this._requestExecutor=n.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)?new n.OfficeJsRequestExecutor(this):new n.HttpRequestExecutor),s=this._requestExecutor,u={},n.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,u),n.Utility._copyHeaders(this.m_customRequestHeaders,u),h={Url:this.m_requestUrlAndHeaderInfo.url,Headers:u,Body:e},t.invalidatePendingInvalidObjectPaths(),r=null,i=null,this._lastSyncStart=performance.now(),s.executeAsync(this._customData,o,h).then(function(u){return f._lastSyncEnd=performance.now(),r=f.processRequestExecutorResponseMessage(t,u),f.processPendingEventHandlers(t).catch(function(t){n.Utility.log("Error in processPendingEventHandlers");n.Utility.log(JSON.stringify(t));i=t})}).then(function(){var u,f;if(r){n.Utility.log("Throw error from response: "+JSON.stringify(r));throw r;}if(i){n.Utility.log("Throw error from ProcessEventHandler: "+JSON.stringify(i));u=null;i instanceof n._Internal.RuntimeError?(u=i,u.traceMessages=t._responseTraceMessages):(f=null,f=typeof i=="string"?i:i.message,n.Utility.isNullOrEmptyString(f)&&(f=n.Utility._getResourceString(n.ResourceStrings.cannotRegisterEvent)),u=new n._Internal.RuntimeError({code:n.ErrorCodes.cannotRegisterEvent,message:f,traceMessages:t._responseTraceMessages}));throw u;}})):this.processPendingEventHandlers(t)},i.prototype.processRequestExecutorResponseMessage=function(t,i){var e,r,o,u,f;if(i.Body&&i.Body.TraceIds&&t._setResponseTraceIds(i.Body.TraceIds),e=t._responseTraceMessages,r=null,i.Body&&(i.Body.Error&&i.Body.Error.ActionIndex>=0&&(o=new n.RequestPrettyPrinter(this._rootObjectPropertyName,t._objectPaths,t._actions),r=o.processForDebugStatementInfo(i.Body.Error.ActionIndex)),u=null,i.Body.Results?u=i.Body.Results:i.Body.ProcessedResults&&i.Body.ProcessedResults.Results&&(u=i.Body.ProcessedResults.Results),u)){this._processingResult=!0;try{t.processResponse(u)}finally{this._processingResult=!1}}if(n.Utility.isNullOrEmptyString(i.ErrorCode)){if(i.Body&&i.Body.Error)return f={errorLocation:i.Body.Error.Location},r&&(f.statement=r.statement,f.surroundingStatements=r.surroundingStatements),new n._Internal.RuntimeError({code:i.Body.Error.Code,message:i.Body.Error.Message,traceMessages:e,debugInfo:f})}else return new n._Internal.RuntimeError({code:i.ErrorCode,message:i.ErrorMessage,traceMessages:e});return null},i.prototype.processPendingEventHandlers=function(t){for(var u,i=n.Utility._createPromiseFromResult(null),r=0;r0&&(typeof r[0]=="string"||i.isRequestUrlAndHeaderInfo(r[0])||i.isRequestUrlAndHeaderInfoResolver(r[0]))&&(y=r[0],h=1),r.length==h+1)l=u,v=r[h+0];else if(r.length==h+2){if(n.Utility.isNullOrUndefined(r[h+0]))l=u;else if(r[h+0]instanceof n.ClientObject)l=function(){return r[h+0].context};else if(r[h+0]instanceof i)l=function(){return r[h+0]};else if(Array.isArray(r[h+0])){if(c=r[h+0],c.length==0)return i.createErrorPromise(t);for(a=0;a0){var n=c._onRunFinishedNotifiers.shift();n()}if(a)return l;else throw l;})},i.prototype._nextId=function(){return++this.m_nextId},i}();n.ClientRequestContext=i}(OfficeExtension||(OfficeExtension={})),function(n){var i=function(){function t(n){this.m_type=n}return Object.defineProperty(t.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){(this.m_isLoaded=!0,typeof t=="object"&&t&&t._IsNull)||(this.m_value=this.m_type===1?n.Utility.adjustToDateTime(t):t)},t}(),t;n.ClientResult=i;t=function(){function t(n,t){this.m_proxy=n;this.m_shouldPolyfill=t}return Object.defineProperty(t.prototype,"proxy",{get:function(){return this.m_proxy},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"retrieveResult.data"}});return this.m_data},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(n){if(this.m_isLoaded=!0,typeof n=="object"&&n&&n._IsNull){this.m_data=null;return}this.m_data=this.m_shouldPolyfill?this.changePropertyNameToCamelLowerCase(n):n},t.prototype.changePropertyNameToCamelLowerCase=function(t){var o=95,u,i,r,f,e;if(Array.isArray(t)){for(i=[],u=0;u0&&(r=!0),t=document.createElement("a"),t.href=this.m_url,r?t.hash=t.hash.length===0||t.hash==="#"?"#"+i:t.hash+"&"+i:t.search=t.search.length===0||t.search==="?"?"?"+i:t.search+"&"+i,t.href},f.prototype.init=function(){var t=this,i;return window.addEventListener("message",this.m_onMessageHandler),i=this._getIFrameSrc(),new n._Internal.OfficePromise(function(r,u){var f=document.createElement("iframe");t.m_options.id&&(f.id=t.m_options.id);f.style.height=t.m_options.height;f.style.width=t.m_options.width;f.src=i;t.m_options.container.appendChild(f);t.m_timeoutId=setTimeout(function(){t.close();var i=n.Utility.createRuntimeError(n.ErrorCodes.timeout,n.Utility._getResourceString(n.ResourceStrings.timeout),"EmbeddedSession.init");u(i)},t.m_options.timeoutInMilliseconds);t.m_promiseResolver=r})},f.prototype._invoke=function(n,t,u){if(!this.m_enabled){t(i.InternalError,null);return}r.invokeRequestModifier&&(u=r.invokeRequestModifier(u));this._sendMessageWithCallback(this.m_id++,n,u,function(n){r.invokeResponseModifier&&(n=r.invokeResponseModifier(n));var u=n.Error;delete n.Error;t(u||i.Success,n)})},f.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler);window.clearTimeout(this.m_timeoutId);this.m_enabled=!1},Object.defineProperty(f.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),f.prototype._createRequestExecutorOrNull=function(){return new e(this)},f.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},f.prototype._registerEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.RegisterEventCommand,{EventId:i,TargetId:r},function(){n(null)})})},f.prototype._unregisterEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.UnregisterEventCommand,{EventId:i,TargetId:r},function(){n()})})},f.prototype._onMessage=function(n){var u=this,i,e,r,o,s;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===n.source&&this.m_chosenOrigin===n.origin)){if(i=n.data,i&&i[t.CommandKey]===t.ApiReadyCommand){!this.m_chosenWindow&&this._isValidDescendant(n.source)&&i[t.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=n.source,this.m_chosenOrigin=n.origin,this._sendMessageWithCallback(this.m_id++,t.GetAppContextCommand,null,function(n){u._setupContext(n);window.clearTimeout(u.m_timeoutId);u.m_promiseResolver()}));return}if(i&&i[t.CommandKey]===t.FireEventCommand){var f=i[t.ParamsKey],h=f.EventId,c=f.TargetId,l=f.Data;if(this.m_sessionEventManager)for(e=this.m_sessionEventManager.getHandlers(h,c),r=0;r=0;o--)if(r[o]===e[i].handler){r.splice(o,1);break}break;case 2:r=[];break}}return s&&(!this.m_registered&&r.length>0?u=u.then(function(){return f.m_eventInfo.registerFunc(f.m_callback)}).then(function(){return f.m_registered=!0}):this.m_registered&&r.length==0&&(u=u.then(function(){return f.m_eventInfo.unregisterFunc(f.m_callback)}).catch(function(t){n.Utility.log("Error when unregister event: "+JSON.stringify(t))}).then(function(){return f.m_registered=!1})),u=u.then(function(){return f.m_handlers=r})),u},t.prototype.fireEvent=function(t){for(var u,f,r=[],i=0;i=0;e--)if(f[e]===u){f.splice(e,1);break}return f.length===0?this.m_unregisterEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i}();n.EventRegistration=i}(OfficeExtension||(OfficeExtension={})),function(n){function r(n){t._testReadyImpl=n}function u(n){t.getGenericEventRegistration()._handleRichApiMessage(n)}var t=function(){function t(){this.m_eventRegistration=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this));this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this)}return t.prototype.ready=function(){var i=this;return this.m_ready||(this.m_ready=t._testReadyImpl?t._testReadyImpl().then(function(){i.m_isReady=!0}):n._Internal.officeJsEventRegistration.register(5,"",this.m_richApiMessageHandler).then(function(){i.m_isReady=!0})),this.m_ready},Object.defineProperty(t.prototype,"isReady",{get:function(){return this.m_isReady},enumerable:!0,configurable:!0}),t.prototype.register=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.register(n,t,i)})},t.prototype.unregister=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.unregister(n,t,i)})},t.prototype._registerEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._unregisterEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._handleRichApiMessage=function(t){var r,i,u,e,f;if(t&&t.entries)for(r=0;r0))for(e=JSON.parse(i.message),i.isRemoteOverride&&(e.source=n.Constants.eventSourceRemote),f=0;f=0;u--)if(n[u]===i){n.splice(u,1);break}n.length==0&&t.getGenericEventRegistration().unregister(r.m_genericEventInfo.eventType,r.m_genericEventInfo.getTargetIdFunc(),r._callback)})},r.prototype.removeAll=function(){},r}(n.EventHandlers);n.GenericEventHandlers=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var s=JSON.stringify(u.Body),f=u.Url,e,o;if(f.charAt(f.length-1)!="/"&&(f=f+"/"),f=f+n.Constants.processQuery,f=f+"?"+n.Constants.flags+"="+r.toString(),e={method:"POST",url:f,headers:{},body:s},e.headers[n.Constants.sourceLibHeader]=t.SourceLibHeaderValue,e.headers["CONTENT-TYPE"]="application/json",u.Headers)for(o in u.Headers)e.headers[o]=u.Headers[o];return n.HttpUtility.sendRequest(e).then(function(t){var i,r;return t.statusCode===200?i={ErrorCode:null,ErrorMessage:null,Headers:t.headers,Body:JSON.parse(t.body)}:(n.Utility.log("Error Response:"+t.body),r=n.Utility._parseErrorResponse(t),i={ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:t.headers,Body:null}),i})},t.SourceLibHeaderValue="officejs-rest",t}();n.HttpRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.setCustomSendRequestFunc=function(n){t.s_customSendRequestFunc=n},t.xhrSendRequestFunc=function(t){return new n._Internal.OfficePromise(function(i,r){var u=new XMLHttpRequest,f;if(u.open(t.method,t.url),u.onload=function(){var t={statusCode:u.status,headers:n.Utility._parseHttpResponseHeaders(u.getAllResponseHeaders()),body:u.responseText};i(t)},u.onerror=function(){r(new n._Internal.RuntimeError({code:n.ErrorCodes.connectionFailure,message:n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,u.statusText)}))},t.headers)for(f in t.headers)u.setRequestHeader(f,t.headers[f]);u.send(t.body)})},t.sendRequest=function(n){t.validateAndNormalizeRequest(n);var i=t.s_customSendRequestFunc;return i||(i=t.xhrSendRequestFunc),i(n)},t.setCustomSendLocalDocumentRequestFunc=function(n){t.s_customSendLocalDocumentRequestFunc=n},t.sendLocalDocumentRequest=function(n){t.validateAndNormalizeRequest(n);var i;return i=t.s_customSendLocalDocumentRequestFunc||t.officeJsSendLocalDocumentRequestFunc,i(n)},t.officeJsSendLocalDocumentRequestFunc=function(t){t=n.Utility._validateLocalDocumentRequest(t);var i=n.Utility._buildRequestMessageSafeArray(t);return new n._Internal.OfficePromise(function(t,r){OSF.DDA.RichApi.executeRichApiRequestAsync(i,function(i){var r;r=i.status=="succeeded"?{statusCode:n.RichApiMessageUtility.getResponseStatusCode(i),headers:n.RichApiMessageUtility.getResponseHeaders(i),body:n.RichApiMessageUtility.getResponseBody(i)}:n.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(i.error.code,i.error.message);n.Utility.log(JSON.stringify(r));t(r)})})},t.validateAndNormalizeRequest=function(t){if(n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"request"});n.Utility.isNullOrEmptyString(t.method)&&(t.method="GET");t.method=t.method.toUpperCase()},t.logRequest=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Request---"),n.Utility.log(i.method+" "+i.url),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t.logResponse=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Response---"),n.Utility.log(""+i.statusCode),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t._logBody=!1,t}();n.HttpUtility=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_clientObject=n}return n.prototype._handleResult=function(n){this.m_clientObject._handleIdResult(n)},n}();n.InstantiateActionResultHandler=t}(OfficeExtension||(OfficeExtension={})),function(n){}(OfficeExtension||(OfficeExtension={})),function(n){var u=function(){function t(n){this.m_session=n}return t.prototype.executeAsync=function(t,r,u){var e={url:n.Constants.processQuery,method:"POST",headers:u.Headers,body:u.Body},f={id:i.nextId(),type:1,flags:r,message:e};return n.Utility.log(JSON.stringify(f)),this.m_session.sendMessageToHost(f).then(function(t){var i,r,u;return n.Utility.log("Received response: "+JSON.stringify(t)),i=t.message,i.statusCode===200?r={ErrorCode:null,ErrorMessage:null,Headers:i.headers,Body:i.body}:(n.Utility.log("Error Response:"+i.body),u=n.Utility._parseErrorResponse(i),r={ErrorCode:u.errorCode,ErrorMessage:u.errorMessage,Headers:i.headers,Body:null}),r})},t}(),i=function(i){function r(n){var t=this;i.call(this);this.m_promiseResolver={};this.m_bridge=n;this.m_bridge.onMessageFromHost=function(n){t.onMessageFromHost(n)}}return __extends(r,i),r.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},r.prototype._createRequestExecutorOrNull=function(){return n.Utility.log("NativeBridgeSession::CreateRequestExecutor"),new u(this)},Object.defineProperty(r.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),r.init=function(t){if(t&&typeof t=="object"){var i=new r(t);n.ClientRequestContext._overrideSession=i;n.HttpUtility.setCustomSendLocalDocumentRequestFunc(function(n){var t={id:r.nextId(),type:1,flags:0,message:n};return i.sendMessageToHost(t).then(function(n){return n.message})})}},r.prototype.sendMessageToHost=function(t){var i=this;return this.m_bridge.sendMessageToHost(JSON.stringify(t)),new n._Internal.OfficePromise(function(n,r){i.m_promiseResolver[t.id]=n})},r.prototype.onMessageFromHost=function(n){var i,r;n==="test"?t._testFunc&&t._testFunc():(i=JSON.parse(n),typeof i.id=="number"&&(r=this.m_promiseResolver[i.id],r&&r(i),delete this.m_promiseResolver[i.id]))},r.nextId=function(){return r.s_nextId++},r.s_nextId=1,r}(n.SessionBase),r=function(){function n(){}return n.init=function(n){i.init(n)},n}(),t;n.HostBridge=r;typeof _richApiNativeBridge=="object"&&_richApiNativeBridge&&r.init(_richApiNativeBridge);t=function(){function n(){}return n.setTestFunc=function(t){n._testFunc=t},n}();n.HostBridgeTest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){this.m_objectPathInfo=n;this.m_parentObjectPath=t;this.m_isWriteOperation=!1;this.m_isCollection=i;this.m_isInvalidAfterRequest=r;this.m_isValid=!0}return Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},set:function(n){this.m_isWriteOperation=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRestrictedResourceAccess",{get:function(){return this.m_isRestrictedResourceAccess},set:function(n){this.m_isRestrictedResourceAccess=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(n){this.m_argumentObjectPaths=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(n){this.m_isValid=n;!n&&this.m_objectPathInfo.ObjectPathType===6&&this.m_savedObjectPathInfo&&(t.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(n){this.m_getByIdMethodName=n},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null},t.prototype.updateUsingObjectData=function(i){var e=i[n.Constants.referenceId],f,o,u,r;if(!n.Utility.isNullOrEmptyString(e)){this.m_savedObjectPathInfo||this.isInvalidAfterRequest||!t.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)||(f={},t.copyObjectPathInfo(this.m_objectPathInfo,f),this.m_savedObjectPathInfo={pathInfo:f,parent:this.m_parentObjectPath});this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=e;this.m_objectPathInfo.ArgumentInfo={};delete this.m_objectPathInfo.ParentObjectPathId;this.m_parentObjectPath=null;this.m_argumentObjectPaths=null;return}if(o=this.parentObjectPath&&this.parentObjectPath.isCollection,u=this.getByIdMethodName,(o||!n.Utility.isNullOrEmptyString(u))&&(r=i[n.Constants.id],n.Utility.isNullOrUndefined(r)&&(r=i[n.Constants.idPrivate]),!n.Utility.isNullOrUndefined(r))){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;n.Utility.isNullOrEmptyString(u)?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=u,this.m_getByIdMethodName=null);this.isWriteOperation=!1;this.m_objectPathInfo.ArgumentInfo={};this.m_objectPathInfo.ArgumentInfo.Arguments=[r];this.m_argumentObjectPaths=null;return}},t.isRestorableObjectPath=function(n){return n===1||n===5||n===3||n===4},t.copyObjectPathInfo=function(n,t){t.Id=n.Id;t.ArgumentInfo=n.ArgumentInfo;t.Name=n.Name;t.ObjectPathType=n.ObjectPathType;t.ParentObjectPathId=n.ParentObjectPathId},t}();n.ObjectPath=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createGlobalObjectObjectPath=function(t){var i={Id:t._nextId(),ObjectPathType:1,Name:""};return new n.ObjectPath(i,null,!1,!1)},t.createNewObjectObjectPath=function(t,i,r,u){var e={Id:t._nextId(),ObjectPathType:2,Name:i},f=new n.ObjectPath(e,null,r,!1);return f.isRestrictedResourceAccess=u,f},t.createPropertyObjectPath=function(t,i,r,u,f,e){var s={Id:t._nextId(),ObjectPathType:4,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id},o=new n.ObjectPath(s,i._objectPath,u,f);return o.isRestrictedResourceAccess=e,o},t.createIndexerObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i._objectPath,!1,!1)},t.createIndexerObjectPathUsingParentPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i,!1,!1)},t.createMethodObjectPath=function(t,i,r,u,f,e,o,s,h){var l={Id:t._nextId(),ObjectPathType:3,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},a=n.Utility.setMethodArguments(t,l.ArgumentInfo,f),c=new n.ObjectPath(l,i._objectPath,e,o);return c.argumentObjectPaths=a,c.isWriteOperation=u!=1,c.getByIdMethodName=s,c.isRestrictedResourceAccess=h,c},t.createReferenceIdObjectPath=function(t,i){var r={Id:t._nextId(),ObjectPathType:6,Name:i,ArgumentInfo:{}};return new n.ObjectPath(r,null,!1,!1)},t.createChildItemObjectPathUsingIndexerOrGetItemAt=function(i,r,u,f,e){var o=f[n.Constants.id];return n.Utility.isNullOrUndefined(o)&&(o=f[n.Constants.idPrivate]),i&&!n.Utility.isNullOrUndefined(o)?t.createChildItemObjectPathUsingIndexer(r,u,f):t.createChildItemObjectPathUsingGetItemAt(r,u,f,e)},t.createChildItemObjectPathUsingIndexer=function(t,i,r){var f=r[n.Constants.id],u;return n.Utility.isNullOrUndefined(f)&&(f=r[n.Constants.idPrivate]),u=u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u.ArgumentInfo.Arguments=[f],new n.ObjectPath(u,i._objectPath,!1,!1)},t.createChildItemObjectPathUsingGetItemAt=function(t,i,r,u){var e=r[n.Constants.index],f;return e&&(u=e),f={Id:t._nextId(),ObjectPathType:3,Name:n.Constants.getItemAt,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f.ArgumentInfo.Arguments=[u],new n.ObjectPath(f,i._objectPath,!1,!1)},t}();n.ObjectPathFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_context=n}return t.prototype.executeAsync=function(i,r,u){var f=this,e=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n._Internal.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(e,function(i){n.Utility.log("Response:");n.Utility.log(JSON.stringify(i));var r;i.status=="succeeded"?r=n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBody(i),n.RichApiMessageUtility.getResponseHeaders(i)):(r=n.RichApiMessageUtility.buildResponseOnError(i.error.code,i.error.message),f.m_context._processOfficeJsErrorResponse(i.error.code,r));t(r)})})},t.SourceLibHeaderValue="officejs",t}();n.OfficeJsRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){n.OfficeRequire=function(){return null}()})(t=n._Internal||(n._Internal={})),function(n){var t;(function(t){function i(){return function(){"use strict";function vt(n){return typeof n=="function"||typeof n=="object"&&n!==null}function b(n){return typeof n=="function"}function yt(n){return typeof n=="object"&&n!==null}function wt(n){k=n}function bt(n){f=n}function ni(){var t=process.nextTick,n=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&n[1]==="0"&&n[2]==="10"&&(t=setImmediate),function(){t(c)}}function tr(){return function(){pt(c)}}function ti(){var n=0,i=new it(c),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function ii(){var n=new MessageChannel;return n.port1.onmessage=c,function(){n.port2.postMessage(0)}}function ri(){return function(){setTimeout(c,1)}}function c(){for(var t,i,n=0;n=0?(n=n.substring(t+5,n.length),n<"14.14393"?!0:!1):!1}function i(){return typeof window=="undefined"&&typeof Promise=="function"?Promise:typeof window!="undefined"&&window.Promise?t()?n.PromiseImpl.Init():window.Promise:n.PromiseImpl.Init()}n.OfficePromise=i()}(t=n._Internal||(n._Internal={}));i=t.OfficePromise;n.Promise=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this._autoCleanupList={};this.m_context=n}return t.prototype.add=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._addCommon(n,!0)}):this._addCommon(n,!0)},t.prototype._autoAdd=function(n){this._addCommon(n,!1);this._autoCleanupList[n._objectPath.objectPathInfo.Id]=n},t.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(t,i){var r=this.m_context._autoCleanup&&!t[n.Constants.isTracked]&&t!==this.m_context._rootObject&&i&&!n.Utility.isNullOrEmptyString(i[n.Constants.referenceId]);r&&(this._autoCleanupList[t._objectPath.objectPathInfo.Id]=t,t[n.Constants.isTracked]=!0)},t.prototype._addCommon=function(t,i){if(t[n.Constants.isTracked]){i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id];return}var r=t[n.Constants.referenceId];n.Utility.isNullOrEmptyString(r)&&t._KeepReference&&(t._KeepReference(),n.ActionFactory.createInstantiateAction(this.m_context,t),i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id],t[n.Constants.isTracked]=!0)},t.prototype.remove=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._removeCommon(n)}):this._removeCommon(n)},t.prototype._removeCommon=function(t){var r=t[n.Constants.referenceId],i;n.Utility.isNullOrEmptyString(r)||(i=this.m_context._rootObject,i._RemoveReference&&i._RemoveReference(r),delete t[n.Constants.isTracked])},t.prototype._retrieveAndClearAutoCleanupList=function(){var n=this._autoCleanupList;return this._autoCleanupList={},n},t}();n.TrackedObjects=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){n||(n="root");this.m_globalObjName=n;this.m_referencedObjectPaths=t;this.m_actions=i;this.m_statements=[];this.m_variableNameForObjectPathMap={};this.m_variableNameToObjectPathMap={};this.m_declaredObjectPathMap={};this.m_showDispose=r}return t.prototype.process=function(){this.m_showDispose&&n.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions);for(var t=0;t=0&&this.m_statements.length>i+o+1)break;if(i<0)return null;for(f=i-o,f<0&&(f=0),e=i+1+o,e>this.m_statements.length&&(e=this.m_statements.length),r=[],f!=0&&r.push("..."),s=f;s>>>>"),r.push(this.m_statements[i]),r.push("// <<<<<"),h=i+1;h0)?(r=i.map(function(n){return u.getObjVarName(n)}).join(", "),n+" // And then dispose {"+r+"}"):n},t.prototype.buildQueryExpression=function(n){if(n.actionInfo.QueryInfo){var t={};return t.select=n.actionInfo.QueryInfo.Select,t.expand=n.actionInfo.QueryInfo.Expand,t.skip=n.actionInfo.QueryInfo.Skip,t.top=n.actionInfo.QueryInfo.Top,typeof t.top=="undefined"&&typeof t.skip=="undefined"&&typeof t.expand=="undefined"?typeof t.select=="undefined"?"":JSON.stringify(t.select):JSON.stringify(t)}return""},t.prototype.buildObjectPathExpressionWithParent=function(n){var t=n.objectPathInfo.ObjectPathType==5||n.objectPathInfo.ObjectPathType==3||n.objectPathInfo.ObjectPathType==4;return t&&n.objectPathInfo.ParentObjectPathId?this.getObjVarName(n.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(n):this.buildObjectPathExpression(n)},t.prototype.buildObjectPathExpression=function(t){switch(t.objectPathInfo.ObjectPathType){case 1:return"context."+this.m_globalObjName;case 5:return"getItem("+this.buildArgumentsExpression(t.objectPathInfo.ArgumentInfo)+")";case 3:return n.Utility._toCamelLowerCase(t.objectPathInfo.Name)+"("+this.buildArgumentsExpression(t.objectPathInfo.ArgumentInfo)+")";case 2:return t.objectPathInfo.Name+".newObject()";case 7:return"null";case 4:return n.Utility._toCamelLowerCase(t.objectPathInfo.Name);case 6:return"context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(t.objectPathInfo.Name)+")"}},t.prototype.buildArgumentsExpression=function(n){var t="",i;if(!n.Arguments)return t;for(i=0;i0&&(t=t+", "),t=t+this.buildArgumentLiteral(n.Arguments[i],n.ReferencedObjectPathIds?n.ReferencedObjectPathIds[i]:null);return t==="undefined"&&(t=""),t},t.prototype.buildArgumentLiteral=function(n,t){return typeof n=="number"&&n===t?this.getObjVarName(t):JSON.stringify(n)},t.prototype.getObjVarNameBase=function(t){var u="v",f=this.m_referencedObjectPaths[t],i,r;switch(f.objectPathInfo.ObjectPathType){case 1:u=this.m_globalObjName;break;case 4:u=n.Utility._toCamelLowerCase(f.objectPathInfo.Name);break;case 3:i=f.objectPathInfo.Name;i.length>3&&i.substr(0,3)==="Get"&&(i=i.substr(3));u=n.Utility._toCamelLowerCase(i);break;case 5:r=this.getObjVarNameBase(f.objectPathInfo.ParentObjectPathId);u=r.charAt(r.length-1)==="s"?r.substr(0,r.length-1):r+"Item";break}return u},t.prototype.getObjVarName=function(n){var t,i;if(this.m_variableNameForObjectPathMap[n])return this.m_variableNameForObjectPathMap[n];if(t=this.getObjVarNameBase(n),!this.m_variableNameToObjectPathMap[t])return this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t;for(i=1;this.m_variableNameToObjectPathMap[t+i.toString()];)i++;return t=t+i.toString(),this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t},t}();n.RequestPrettyPrinter=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.cannotRegisterEvent="CannotRegisterEvent",n.connectionFailureWithStatus="ConnectionFailureWithStatus",n.connectionFailureWithDetails="ConnectionFailureWithDetails",n.invalidObjectPath="InvalidObjectPath",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.invalidArgumentGeneric="InvalidArgumentGeneric",n.propertyNotLoaded="PropertyNotLoaded",n.runMustReturnPromise="RunMustReturnPromise",n.timeout="Timeout",n.propertyDoesNotExist="PropertyDoesNotExist",n.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",n.moreInfoInnerError="MoreInfoInnerError",n.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",n.valueNotLoaded="ValueNotLoaded",n.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage",n.invalidOperationInCellEditMode="InvalidOperationInCellEditMode",n.customFunctionDefintionMissing="CustomFunctionDefintionMissing",n.customFunctionImplementationMissing="CustomFunctionImplementationMissing",n.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars",n.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit",n.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch",n.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing",n.apiNotFoundDetails="ApiNotFoundDetails",n}();n.ResourceStrings=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.CannotRegisterEvent="The event handler cannot be registered.",n.ConnectionFailureWithStatus="The request failed with status code of {0}.",n.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}",n.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",n.InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',n.InvalidRequestContext="Cannot use the object across different request contexts.",n.PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",n.RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',n.Timeout="The operation has timed out.",n.ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.',n.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.",n.InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.",n.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions.",n.CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.",n.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods.",n.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name.",n.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.",n.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.",n.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.",n}();n.ResourceStringValues=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.buildMessageArrayForIRequestExecutor=function(i,r,u,f){var o=JSON.stringify(u.Body),e;return n.Utility.log("Request:"),n.Utility.log(o),e={},e[n.Constants.sourceLibHeader]=f,t.buildRequestMessageSafeArray(i,r,"POST","ProcessQuery",e,o)},t.buildResponseOnSuccess=function(n,t){var i={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return i.Body=JSON.parse(n),i.Headers=t,i},t.buildResponseOnError=function(i,r){var u={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return u.ErrorCode=n.ErrorCodes.generalException,u.ErrorMessage=r,i==t.OfficeJsErrorCode_ooeNoCapability?u.ErrorCode=n.ErrorCodes.accessDenied:i==t.OfficeJsErrorCode_ooeActivityLimitReached?u.ErrorCode=n.ErrorCodes.activityLimitReached:i==t.OfficeJsErrorCode_ooeInvalidOrTimedOutSession&&(u.ErrorCode=n.ErrorCodes.invalidOrTimedOutSession,u.ErrorMessage=n.Utility._getResourceString(n.ResourceStrings.invalidOrTimedOutSessionMessage)),u},t.buildHttpResponseFromOfficeJsError=function(i,r){var f=500,u={};return u.error={},u.error.code=n.ErrorCodes.generalException,u.error.message=r,i===t.OfficeJsErrorCode_ooeNoCapability?(f=403,u.error.code=n.ErrorCodes.accessDenied):i===t.OfficeJsErrorCode_ooeActivityLimitReached&&(f=429,u.error.code=n.ErrorCodes.activityLimitReached),{statusCode:f,headers:{},body:JSON.stringify(u)}},t.buildRequestMessageSafeArray=function(n,t,i,r,u,f){var e=[],o;if(u)for(o in u)e.push(o),e.push(u[o]);var s=0,h="",c="",l="";return[n,i,r,e,f,s,t,h,c,l]},t.getResponseBody=function(n){return t.getResponseBodyFromSafeArray(n.value.data)},t.getResponseHeaders=function(n){return t.getResponseHeadersFromSafeArray(n.value.data)},t.getResponseBodyFromSafeArray=function(n){var t=n[2],i;return typeof t=="string"?t:(i=t,i.join(""))},t.getResponseHeadersFromSafeArray=function(n){var i=n[1],r,t;if(!i)return null;for(r={},t=0;t0&&f.push(i);return f},t.toJson=function(n,t,i,r){var e={},u,f;for(u in t)f=t[u],typeof f!="undefined"&&(e[u]=f);for(u in i)f=i[u],typeof f!="undefined"&&(e[u]=f.toJSON());return r&&(e.items=r.map(function(n){return n.toJSON()})),e},t.throwError=function(i,r,u){throw new n._Internal.RuntimeError({code:i,message:t._getResourceString(i,r),debugInfo:u?{errorLocation:u}:undefined});},t.createRuntimeError=function(t,i,r){return new n._Internal.RuntimeError({code:t,message:i,debugInfo:{errorLocation:r}})},t._getResourceString=function(i,r){var u,e,f,o;return typeof window!="undefined"&&window.Strings&&window.Strings.OfficeOM&&(e="L_"+i,f=window.Strings.OfficeOM[e],f&&(u=f)),u||(u=n.ResourceStringValues[i]),u||(u=i),t.isNullOrUndefined(r)||(Array.isArray(r)?(o=r,u=t._formatString(u,o)):u=u.replace("{0}",r)),u},t._formatString=function(t,i){return t.replace(/\{\d\}/g,function(t){var r=parseInt(t.substr(1,t.length-2));if(r0?".":"")+i;break;case 3:i=t.normalizeName(n.objectPathInfo.Name)+"()"+(i.length>0?".":"")+i;break;case 4:i=t.normalizeName(n.objectPathInfo.Name)+(i.length>0?".":"")+i;break;case 5:i="getItem()"+(i.length>0?".":"")+i;break;case 6:i="_reference()"+(i.length>0?".":"")+i;break}n=n.parentObjectPath}return i},t._createPromiseFromResult=function(t){return new n._Internal.OfficePromise(function(n,i){n(t)})},t._createTimeoutPromise=function(t){return new n._Internal.OfficePromise(function(n,i){setTimeout(function(){n(null)},t)})},t.promisify=function(t){return new n._Internal.OfficePromise(function(n,i){var r=function(t){t.status=="failed"?i(t.error):n(t.value)};t(r)})},t._addActionResultHandler=function(n,t,i){n.context._pendingRequest.addActionResultHandler(t,i)},t._handleNavigationPropertyResults=function(n,i,r){for(var u=0;u0},t._getLocalDocumentUrlPrefixLength=function(n){for(var i=["http://document.localhost","https://document.localhost","//document.localhost"],r=n.toLowerCase().trim(),t=0;t0))for(s=i.url.substr(f+1),e=s.split("&"),u=0;u0&&(f=i.substr(0,u),e=i.substr(u+1),f=t.trim(f),e=t.trim(e),s[f.toUpperCase()]=e));return s},t._parseErrorResponse=function(i){var r=null,f,e,u;if(t.isPlainJsonObject(i.body))r=i.body;else if(!t.isNullOrEmptyString(i.body)){f=t.trim(i.body);try{r=JSON.parse(f)}catch(o){t.log("Error when parse "+f)}}return!t.isNullOrUndefined(r)&&typeof r=="object"&&r.error?(u=r.error.code,e=t._getResourceString(n.ResourceStrings.connectionFailureWithDetails,[i.statusCode.toString(),r.error.code,r.error.message])):e=t._getResourceString(n.ResourceStrings.connectionFailureWithStatus,i.statusCode.toString()),t.isNullOrEmptyString(u)&&(u=n.ErrorCodes.connectionFailure),{errorCode:u,errorMessage:e}},t._copyHeaders=function(n,t){if(n&&t)for(var i in n)t[i]=n[i]},t._toCamelLowerCase=function(n){if(t.isNullOrEmptyString(n))return n;for(var i=0;i=65&&n.charCodeAt(i)<=90;)i++;return i0&&Array.isArray(i[0])&&i.length*i[0].length>s&&ht()){for(e=Math.max(1,Math.round(s/i[0].length)),n._ValidateArraySize(i.length,i[0].length),r=0;ri.length&&(u=i.length-r),o=n.getRow(r).getBoundingRect(n.getRow(r+u-1)),h=i.slice(r,r+u),f(o.context,o,t,h);return!0}return!1}function ht(){return typeof window!="undefined"&&window.Office&&window.Office.context&&window.Office.context.requirements?window.Office.context.requirements.isSetSupported("ExcelApi",1.3):!0}function ss(t,i,r){return OfficeExtension.ClientRequestContext._runBatch("Excel.run",arguments,function(t){return new n.RequestContext(t)})}function hs(t,i){return OfficeExtension.ClientRequestContext._runExplicitBatch("Excel.runBatch",arguments,function(t){return new n.RequestContext(t)})}function yt(n){var t={BindingColumnCount:n.bindingColumnCount,BindingId:n.bindingId,BindingRowCount:n.bindingRowCount,bindingType:n.bindingType,HasHeaders:n.hasHeaders};return window.OSF.DDA.OMFactory.manufactureBinding(t,window.Microsoft.Office.WebExtension.context.document)}function lr(n,t){var r=n.headers==null,i;return i=r?n.rows:n,i=window.OSF.DDA.DataCoercion.coerceData(i,t[window.Microsoft.Office.WebExtension.Parameters.CoercionType]),i==undefined?null:i}function cs(n,t,i){var e=typeof window!="undefined"&&window.Office&&window.Office.context&&window.Office.context.diagnostics&&window.Office.context.diagnostics.version;if(!e)return!1;var o=window.Office.context.diagnostics.version,s=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/,r=s.exec(o);if(r){var u=parseInt(r[1]),f=parseInt(r[2]),h=parseInt(r[3]),c=parseInt(r[4]),l=3e3;if(u0?f=i.getOffsetRange(r,u):(f=i,e=r,o=u),Math.abs(t)==1)?f:f.getBoundingRect(i.getOffsetRange(r*t+e,u*t+o))},Object.defineProperty(k.prototype,"conditionalFormats",{get:function(){return l("Range.conditionalFormats",c,"1.6",h),this._Con||(this._Con=new n.ConditionalFormatCollection(this.context,o(this.context,this,"ConditionalFormats",!0,!1,!1))),this._Con},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"format",{get:function(){return this._F||(this._F=new n.RangeFormat(this.context,o(this.context,this,"Format",!1,!1,!1))),this._F},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"sort",{get:function(){return l("Range.sort",c,"1.2",h),this._S||(this._S=new n.RangeSort(this.context,o(this.context,this,"Sort",!1,!1,!1))),this._S},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"worksheet",{get:function(){return this._W||(this._W=new n.Worksheet(this.context,o(this.context,this,"Worksheet",!1,!1,!1))),this._W},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"address",{get:function(){return r("address",this._A,nt,this._isNull),this._A},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"addressLocal",{get:function(){return r("addressLocal",this._Ad,nt,this._isNull),this._Ad},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"cellCount",{get:function(){return r("cellCount",this._C,nt,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"columnCount",{get:function(){return r("columnCount",this._Co,nt,this._isNull),this._Co},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"columnHidden",{get:function(){return r("columnHidden",this._Col,nt,this._isNull),l("Range.columnHidden",c,"1.2",h),this._Col},set:function(n){this._Col=n;f(this.context,this,"ColumnHidden",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"columnIndex",{get:function(){return r("columnIndex",this._Colu,nt,this._isNull),this._Colu},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"formulas",{get:function(){return r("formulas",this.m_formulas,nt,this._isNull),this.m_formulas},set:function(n){(this.m_formulas=n,vt(this,"Formulas",n))||(this.m_formulas=n,f(this.context,this,"Formulas",n))},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"formulasLocal",{get:function(){return r("formulasLocal",this.m_formulasLocal,nt,this._isNull),this.m_formulasLocal},set:function(n){(this.m_formulasLocal=n,vt(this,"FormulasLocal",n))||(this.m_formulasLocal=n,f(this.context,this,"FormulasLocal",n))},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"formulasR1C1",{get:function(){return r("formulasR1C1",this.m_formulasR1C1,nt,this._isNull),l("Range.formulasR1C1",c,"1.2",h),this.m_formulasR1C1},set:function(n){(this.m_formulasR1C1=n,vt(this,"FormulasR1C1",n))||(this.m_formulasR1C1=n,f(this.context,this,"FormulasR1C1",n))},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"hidden",{get:function(){return r("hidden",this._H,nt,this._isNull),l("Range.hidden",c,"1.2",h),this._H},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"numberFormat",{get:function(){return r("numberFormat",this.m_numberFormat,nt,this._isNull),this.m_numberFormat},set:function(n){(this.m_numberFormat=n,vt(this,"NumberFormat",n))||(this.m_numberFormat=n,f(this.context,this,"NumberFormat",n))},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"rowCount",{get:function(){return r("rowCount",this._R,nt,this._isNull),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"rowHidden",{get:function(){return r("rowHidden",this._Ro,nt,this._isNull),l("Range.rowHidden",c,"1.2",h),this._Ro},set:function(n){this._Ro=n;f(this.context,this,"RowHidden",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"rowIndex",{get:function(){return r("rowIndex",this._Row,nt,this._isNull),this._Row},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"text",{get:function(){return r("text",this._T,nt,this._isNull),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"valueTypes",{get:function(){return r("valueTypes",this._V,nt,this._isNull),this._V},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"values",{get:function(){return r("values",this.m_values,nt,this._isNull),this.m_values},set:function(n){(this.m_values=n,vt(this,"Values",n))||(this.m_values=n,f(this.context,this,"Values",n))},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_ReferenceId",{get:function(){return r("_ReferenceId",this.__R,nt,this._isNull),this.__R},enumerable:!0,configurable:!0}),k.prototype.set=function(n,t){this._recursivelySet(n,t,["numberFormat","values","formulas","formulasLocal","formulasR1C1","rowHidden","columnHidden"],["format"],["conditionalFormats","sort","worksheet"])},k.prototype.update=function(n){this._recursivelyUpdate(n)},k.prototype.calculate=function(){l("Range.calculate",c,"1.6",h);s(this.context,this,"Calculate",0,[],!1)},k.prototype.clear=function(n){s(this.context,this,"Clear",0,[n],!1)},k.prototype.delete=function(n){s(this.context,this,"Delete",0,[n],!1)},k.prototype.getBoundingRect=function(i){return new n.Range(this.context,t(this.context,this,"GetBoundingRect",1,[i],!1,!0,null,!1))},k.prototype.getCell=function(i,r){return new n.Range(this.context,t(this.context,this,"GetCell",1,[i,r],!1,!0,null,!1))},k.prototype.getColumn=function(i){return new n.Range(this.context,t(this.context,this,"GetColumn",1,[i],!1,!0,null,!1))},k.prototype.getColumnsAfter=function(i){return ht()?(l("Range.getColumnsAfter",c,"1.3",h),new n.Range(this.context,t(this.context,this,"GetColumnsAfter",1,[i],!1,!0,null,!1))):(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0&&OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove"),this._getAdjacentRange("getColumnsAfter",i,this.getLastColumn(),0,1))},k.prototype.getColumnsBefore=function(i){return ht()?(l("Range.getColumnsBefore",c,"1.3",h),new n.Range(this.context,t(this.context,this,"GetColumnsBefore",1,[i],!1,!0,null,!1))):(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0&&OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove"),this._getAdjacentRange("getColumnsBefore",i,this.getColumn(0),0,-1))},k.prototype.getEntireColumn=function(){return new n.Range(this.context,t(this.context,this,"GetEntireColumn",1,[],!1,!0,null,!1))},k.prototype.getEntireRow=function(){return new n.Range(this.context,t(this.context,this,"GetEntireRow",1,[],!1,!0,null,!1))},k.prototype.getIntersection=function(i){return new n.Range(this.context,t(this.context,this,"GetIntersection",1,[i],!1,!0,null,!1))},k.prototype.getIntersectionOrNullObject=function(i){return l("Range.getIntersectionOrNullObject",c,"1.4",h),new n.Range(this.context,t(this.context,this,"GetIntersectionOrNullObject",1,[i],!1,!0,null,!1))},k.prototype.getLastCell=function(){return new n.Range(this.context,t(this.context,this,"GetLastCell",1,[],!1,!0,null,!1))},k.prototype.getLastColumn=function(){return new n.Range(this.context,t(this.context,this,"GetLastColumn",1,[],!1,!0,null,!1))},k.prototype.getLastRow=function(){return new n.Range(this.context,t(this.context,this,"GetLastRow",1,[],!1,!0,null,!1))},k.prototype.getOffsetRange=function(i,r){return new n.Range(this.context,t(this.context,this,"GetOffsetRange",1,[i,r],!1,!0,null,!1))},k.prototype.getResizedRange=function(i,r){if(!ht()){this._ensureInteger(i,"getResizedRange");this._ensureInteger(r,"getResizedRange");var u=i>=0&&r>=0?this:this.getCell(0,0);return u.getBoundingRect(this.getLastCell().getOffsetRange(i,r))}return l("Range.getResizedRange",c,"1.3",h),new n.Range(this.context,t(this.context,this,"GetResizedRange",1,[i,r],!1,!0,null,!1))},k.prototype.getRow=function(i){return new n.Range(this.context,t(this.context,this,"GetRow",1,[i],!1,!0,null,!1))},k.prototype.getRowsAbove=function(i){return ht()?(l("Range.getRowsAbove",c,"1.3",h),new n.Range(this.context,t(this.context,this,"GetRowsAbove",1,[i],!1,!0,null,!1))):(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0&&OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove"),this._getAdjacentRange("getRowsAbove",i,this.getRow(0),-1,0))},k.prototype.getRowsBelow=function(i){return ht()?(l("Range.getRowsBelow",c,"1.3",h),new n.Range(this.context,t(this.context,this,"GetRowsBelow",1,[i],!1,!0,null,!1))):(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0&&OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove"),this._getAdjacentRange("getRowsBelow",i,this.getLastRow(),1,0))},k.prototype.getUsedRange=function(i){return new n.Range(this.context,t(this.context,this,"GetUsedRange",1,[i],!1,!0,null,!1))},k.prototype.getUsedRangeOrNullObject=function(i){return l("Range.getUsedRangeOrNullObject",c,"1.4",h),new n.Range(this.context,t(this.context,this,"GetUsedRangeOrNullObject",1,[i],!1,!0,null,!1))},k.prototype.getVisibleView=function(){return l("Range.getVisibleView",c,"1.3",h),new n.RangeView(this.context,t(this.context,this,"GetVisibleView",1,[],!1,!1,null,!1))},k.prototype.insert=function(i){return new n.Range(this.context,t(this.context,this,"Insert",0,[i],!1,!0,null,!1))},k.prototype.merge=function(n){l("Range.merge",c,"1.2",h);s(this.context,this,"Merge",0,[n],!1)},k.prototype.select=function(){s(this.context,this,"Select",1,[],!1)},k.prototype.unmerge=function(){l("Range.unmerge",c,"1.2",h);s(this.context,this,"Unmerge",0,[],!1)},k.prototype._KeepReference=function(){s(this.context,this,"_KeepReference",1,[],!1)},k.prototype._ValidateArraySize=function(n,t){l("Range._ValidateArraySize",c,"1.3",h);s(this.context,this,"_ValidateArraySize",1,[n,t],!1)},k.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;v(this,t);u(t.Address)||(this._A=t.Address);u(t.AddressLocal)||(this._Ad=t.AddressLocal);u(t.CellCount)||(this._C=t.CellCount);u(t.ColumnCount)||(this._Co=t.ColumnCount);u(t.ColumnHidden)||(this._Col=t.ColumnHidden);u(t.ColumnIndex)||(this._Colu=t.ColumnIndex);u(t.Formulas)||(this.m_formulas=t.Formulas);u(t.FormulasLocal)||(this.m_formulasLocal=t.FormulasLocal);u(t.FormulasR1C1)||(this.m_formulasR1C1=t.FormulasR1C1);u(t.Hidden)||(this._H=t.Hidden);u(t.NumberFormat)||(this.m_numberFormat=t.NumberFormat);u(t.RowCount)||(this._R=t.RowCount);u(t.RowHidden)||(this._Ro=t.RowHidden);u(t.RowIndex)||(this._Row=t.RowIndex);u(t.Text)||(this._T=t.Text);u(t.ValueTypes)||(this._V=t.ValueTypes);u(t.Values)||(this.m_values=t.Values);u(t._ReferenceId)||(this.__R=t._ReferenceId);d(this,t,["conditionalFormats","ConditionalFormats","format","Format","sort","Sort","worksheet","Worksheet"])}},k.prototype.load=function(n){return p(this,n)},k.prototype.retrieve=function(n){return w(this,n)},k.prototype._handleIdResult=function(n){(i.prototype._handleIdResult.call(this,n),e(n))||u(n._ReferenceId)||(this.__R=n._ReferenceId)},k.prototype._handleRetrieveResult=function(n,t){i.prototype._handleRetrieveResult.call(this,n,t);y(this,n,t)},k.prototype.track=function(){return this.context.trackedObjects.add(this),this},k.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},k.prototype.toJSON=function(){return a(this,{address:this._A,addressLocal:this._Ad,cellCount:this._C,columnCount:this._Co,columnHidden:this._Col,columnIndex:this._Colu,formulas:this.m_formulas,formulasLocal:this.m_formulasLocal,formulasR1C1:this.m_formulasR1C1,hidden:this._H,numberFormat:this.m_numberFormat,rowCount:this._R,rowHidden:this._Ro,rowIndex:this._Row,text:this._T,values:this.m_values,valueTypes:this._V},{conditionalFormats:this._Con,format:this._F})},k.prototype.ensureUnchanged=function(n){b(this.context,this,n);return},k}(OfficeExtension.ClientObject);n.Range=ri;it="RangeView";wr=function(i){function s(){return i!==null&&i.apply(this,arguments)||this}return __extends(s,i),Object.defineProperty(s.prototype,"_className",{get:function(){return"RangeView"},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_scalarPropertyNames",{get:function(){return["numberFormat","values","text","formulas","formulasLocal","formulasR1C1","valueTypes","rowCount","columnCount","cellAddresses","index"]},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_scalarPropertyUpdateable",{get:function(){return[!0,!0,!1,!0,!0,!0,!1,!1,!1,!1,!1]},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_navigationPropertyNames",{get:function(){return["rows"]},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rows",{get:function(){return this._Ro||(this._Ro=new n.RangeViewCollection(this.context,o(this.context,this,"Rows",!0,!1,!1))),this._Ro},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"cellAddresses",{get:function(){return r("cellAddresses",this._C,it,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"columnCount",{get:function(){return r("columnCount",this._Co,it,this._isNull),this._Co},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulas",{get:function(){return r("formulas",this._F,it,this._isNull),this._F},set:function(n){this._F=n;f(this.context,this,"Formulas",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulasLocal",{get:function(){return r("formulasLocal",this._Fo,it,this._isNull),this._Fo},set:function(n){this._Fo=n;f(this.context,this,"FormulasLocal",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulasR1C1",{get:function(){return r("formulasR1C1",this._For,it,this._isNull),this._For},set:function(n){this._For=n;f(this.context,this,"FormulasR1C1",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"index",{get:function(){return r("index",this._I,it,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"numberFormat",{get:function(){return r("numberFormat",this._N,it,this._isNull),this._N},set:function(n){this._N=n;f(this.context,this,"NumberFormat",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rowCount",{get:function(){return r("rowCount",this._R,it,this._isNull),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"text",{get:function(){return r("text",this._T,it,this._isNull),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"valueTypes",{get:function(){return r("valueTypes",this._Va,it,this._isNull),this._Va},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"values",{get:function(){return r("values",this._V,it,this._isNull),this._V},set:function(n){this._V=n;f(this.context,this,"Values",n)},enumerable:!0,configurable:!0}),s.prototype.set=function(n,t){this._recursivelySet(n,t,["numberFormat","values","formulas","formulasLocal","formulasR1C1"],[],["rows"])},s.prototype.update=function(n){this._recursivelyUpdate(n)},s.prototype.getRange=function(){return new n.Range(this.context,t(this.context,this,"GetRange",1,[],!1,!0,null,!1))},s.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;v(this,t);u(t.CellAddresses)||(this._C=t.CellAddresses);u(t.ColumnCount)||(this._Co=t.ColumnCount);u(t.Formulas)||(this._F=t.Formulas);u(t.FormulasLocal)||(this._Fo=t.FormulasLocal);u(t.FormulasR1C1)||(this._For=t.FormulasR1C1);u(t.Index)||(this._I=t.Index);u(t.NumberFormat)||(this._N=t.NumberFormat);u(t.RowCount)||(this._R=t.RowCount);u(t.Text)||(this._T=t.Text);u(t.ValueTypes)||(this._Va=t.ValueTypes);u(t.Values)||(this._V=t.Values);d(this,t,["rows","Rows"])}},s.prototype.load=function(n){return p(this,n)},s.prototype.retrieve=function(n){return w(this,n)},s.prototype._handleRetrieveResult=function(n,t){i.prototype._handleRetrieveResult.call(this,n,t);y(this,n,t)},s.prototype.toJSON=function(){return a(this,{cellAddresses:this._C,columnCount:this._Co,formulas:this._F,formulasLocal:this._Fo,formulasR1C1:this._For,index:this._I,numberFormat:this._N,rowCount:this._R,text:this._T,values:this._V,valueTypes:this._Va},{rows:this._Ro})},s.prototype.ensureUnchanged=function(n){b(this.context,this,n);return},s}(OfficeExtension.ClientObject);n.RangeView=wr;br="RangeViewCollection";kr=function(i){function u(){return i!==null&&i.apply(this,arguments)||this}return __extends(u,i),Object.defineProperty(u.prototype,"_className",{get:function(){return"RangeViewCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"items",{get:function(){return r("items",this.m__items,br,this._isNull),this.m__items},enumerable:!0,configurable:!0}),u.prototype.getCount=function(){l("RangeViewCollection.getCount",c,"1.4",h);var t=s(this.context,this,"GetCount",1,[],!1),n=new OfficeExtension.ClientResult;return k(this,t,n),n},u.prototype.getItemAt=function(i){return new n.RangeView(this.context,t(this.context,this,"GetItemAt",1,[i],!1,!1,null,!1))},u.prototype._handleResult=function(t){var u,f,r,o;if((i.prototype._handleResult.call(this,t),!e(t))&&(u=t,v(this,u),!e(u[OfficeExtension.Constants.items])))for(this.m__items=[],f=u[OfficeExtension.Constants.items],r=0;r6&&i.slice(0,5)===t.DateJSONPrefix&&i.slice(-1)===t.DateJSONSuffix&&(r=new Date(parseInt(i.slice(5,-1))),r)?r:i})},t._replaceDateWithStringDate=function(n){var i=JSON.stringify(n,function(n,i){return this[n]instanceof Date?t.DateJSONPrefix+this[n].getTime()+t.DateJSONSuffix:i});return JSON.parse(i)},Object.defineProperty(t.prototype,"key",{get:function(){return r("key",this._K,ai,this._isNull),this._K},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return r("value",this.m_value,ai,this._isNull),this.m_value},set:function(n){if(!e(n)){this.m_value=n;var i=t._replaceDateWithStringDate(n);f(this.context,this,"Value",i);return}this.m_value=n;f(this.context,this,"Value",n)},enumerable:!0,configurable:!0}),t.prototype.set=function(n,t){this._recursivelySet(n,t,["value"],[],[])},t.prototype.update=function(n){this._recursivelyUpdate(n)},t.prototype.delete=function(){s(this.context,this,"Delete",0,[],!1)},t.prototype._handleResult=function(i){if(n.prototype._handleResult.call(this,i),!e(i)){var r=i;v(this,r);u(r.Key)||(this._K=r.Key);u(r.Value)||(this.m_value=r.Value,this.m_value=t.replaceStringDateWithDate(this.m_value))}},t.prototype.load=function(n){return p(this,n)},t.prototype.retrieve=function(n){return w(this,n)},t.prototype._handleRetrieveResult=function(t,i){n.prototype._handleRetrieveResult.call(this,t,i);y(this,t,i)},t.prototype.toJSON=function(){return a(this,{key:this._K,value:this.m_value},{})},t.prototype.ensureUnchanged=function(n){b(this.context,this,n);return},t}(OfficeExtension.ClientObject);wt.DateJSONPrefix="Date(";wt.DateJSONSuffix=")";n.Setting=wt;nu="NamedItemCollection";tu=function(i){function u(){return i!==null&&i.apply(this,arguments)||this}return __extends(u,i),Object.defineProperty(u.prototype,"_className",{get:function(){return"NamedItemCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"items",{get:function(){return r("items",this.m__items,nu,this._isNull),this.m__items},enumerable:!0,configurable:!0}),u.prototype.add=function(i,r,u){return l("NamedItemCollection.add",c,"1.4",h),new n.NamedItem(this.context,t(this.context,this,"Add",0,[i,r,u],!1,!0,null,!1))},u.prototype.addFormulaLocal=function(i,r,u){return l("NamedItemCollection.addFormulaLocal",c,"1.4",h),new n.NamedItem(this.context,t(this.context,this,"AddFormulaLocal",0,[i,r,u],!1,!1,null,!1))},u.prototype.getCount=function(){l("NamedItemCollection.getCount",c,"1.4",h);var t=s(this.context,this,"GetCount",1,[],!1),n=new OfficeExtension.ClientResult;return k(this,t,n),n},u.prototype.getItem=function(t){return new n.NamedItem(this.context,tt(this.context,this,[t]))},u.prototype.getItemOrNullObject=function(i){return l("NamedItemCollection.getItemOrNullObject",c,"1.4",h),new n.NamedItem(this.context,t(this.context,this,"GetItemOrNullObject",1,[i],!1,!1,null,!1))},u.prototype._handleResult=function(t){var u,f,r,o;if((i.prototype._handleResult.call(this,t),!e(t))&&(u=t,v(this,u),!e(u[OfficeExtension.Constants.items])))for(this.m__items=[],f=u[OfficeExtension.Constants.items],r=0;r"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyNames",{get:function(){return["error","value"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"error",{get:function(){return r("error",this._E,sr,this._isNull),this._E},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return r("value",this._V,sr,this._isNull),this._V},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){if(n.prototype._handleResult.call(this,t),!e(t)){var i=t;v(this,i);u(i.Error)||(this._E=i.Error);u(i.Value)||(this._V=i.Value)}},t.prototype.load=function(n){return p(this,n)},t.prototype.retrieve=function(n){return w(this,n)},t.prototype._handleRetrieveResult=function(t,i){n.prototype._handleRetrieveResult.call(this,t,i);y(this,t,i)},t.prototype.toJSON=function(){return a(this,{error:this._E,value:this._V},{})},t.prototype.ensureUnchanged=function(n){b(this.context,this,n);return},t}(OfficeExtension.ClientObject);n.FunctionResult=i;al="Functions";us=function(n){function r(){return n!==null&&n.apply(this,arguments)||this}return __extends(r,n),Object.defineProperty(r.prototype,"_className",{get:function(){return"Functions"},enumerable:!0,configurable:!0}),r.prototype.abs=function(n){return new i(this.context,t(this.context,this,"Abs",0,[n],!1,!0,null,!1))},r.prototype.accrInt=function(n,r,u,f,e,o,s,h){return new i(this.context,t(this.context,this,"AccrInt",0,[n,r,u,f,e,o,s,h],!1,!0,null,!1))},r.prototype.accrIntM=function(n,r,u,f,e){return new i(this.context,t(this.context,this,"AccrIntM",0,[n,r,u,f,e],!1,!0,null,!1))},r.prototype.acos=function(n){return new i(this.context,t(this.context,this,"Acos",0,[n],!1,!0,null,!1))},r.prototype.acosh=function(n){return new i(this.context,t(this.context,this,"Acosh",0,[n],!1,!0,null,!1))},r.prototype.acot=function(n){return new i(this.context,t(this.context,this,"Acot",0,[n],!1,!0,null,!1))},r.prototype.acoth=function(n){return new i(this.context,t(this.context,this,"Acoth",0,[n],!1,!0,null,!1))},r.prototype.amorDegrc=function(n,r,u,f,e,o,s){return new i(this.context,t(this.context,this,"AmorDegrc",0,[n,r,u,f,e,o,s],!1,!0,null,!1))},r.prototype.amorLinc=function(n,r,u,f,e,o,s){return new i(this.context,t(this.context,this,"AmorLinc",0,[n,r,u,f,e,o,s],!1,!0,null,!1))},r.prototype.and=function(){for(var r=[],n=0;n 6 && v.slice(0, 5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) { + d=new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + } + else { + value=Sys.Serialization.JavaScriptSerializer.deserialize(value, true); + } + ret[key]=value; + } + catch (ex) { + } + } + return ret; + }, loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) { if (url && callback) { var doc=window.document; @@ -837,6 +885,14 @@ OSF.OUtil=(function () { } } }, + removeClass: function OSF_OUtil$removeClass(elmt, val) { + if (OSF.OUtil.hasClass(elmt, val)) { + var className=elmt.getAttribute(_classN); + var reg=new RegExp('(\\s|^)'+val+'(\\s|$)'); + className=className.replace(reg, ''); + elmt.setAttribute(_classN, className); + } + }, hasClass: function OSF_OUtil$hasClass(elmt, clsName) { var className=elmt.getAttribute(_classN); return className && className.match(new RegExp('(\\s|^)'+clsName+'(\\s|$)')); @@ -973,6 +1029,12 @@ OSF.OUtil.Guid=(function () { })(); window.OSF=OSF; OSF.OUtil.setNamespace("OSF", window); +OSF.MessageIDs={ + "FetchBundleUrl": 0, + "LoadReactBundle": 1, + "LoadBundleSuccess": 2, + "LoadBundleError": 3 +}; OSF.AppName={ Unsupported: 0, Excel: 1, @@ -1000,7 +1062,10 @@ OSF.AppName={ OutlookAndroid: 4194304, OneNoteWinRT: 8388608, ExcelAndroid: 8388609, - VisioWebApp: 8388610 + VisioWebApp: 8388610, + OneNoteIOS: 8388611, + WordAndroid: 8388613, + PowerpointAndroid: 8388614 }; OSF.InternalPerfMarker={ DataCoercionBegin: "Agave.HostCall.CoerceDataStart", @@ -1030,7 +1095,9 @@ OSF.AgaveHostAction={ "EscExit": 15, "F2Exit": 16, "ExitNoFocusable": 17, - "ExitNoFocusableShift": 18 + "ExitNoFocusableShift": 18, + "MouseEnter": 19, + "MouseLeave": 20 }; OSF.SharedConstants={ "NotificationConversationIdSuffix": '_ntf' @@ -1166,6 +1233,8 @@ Microsoft.Office.WebExtension.Parameters={ HostType: "hostType", ForceConsent: "forceConsent", ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + Reserved: "reserved", Xml: "xml", Namespace: "namespace", Prefix: "prefix", @@ -1198,7 +1267,9 @@ Microsoft.Office.WebExtension.Parameters={ DisplayInIframe: "displayInIframe", MessageContent: "messageContent", HideTitle: "hideTitle", - AppCommandInvocationCompletedData: "appCommandInvocationCompletedData" + UseDeviceIndependentPixels: "useDeviceIndependentPixels", + AppCommandInvocationCompletedData: "appCommandInvocationCompletedData", + Base64: "base64" }; OSF.OUtil.setNamespace("DDA", OSF); OSF.DDA.DocumentMode={ @@ -1255,6 +1326,8 @@ OSF.DDA.MethodDispId={ dispidAppCommandInvocationCompletedMethod: 94, dispidCloseContainerMethod: 97, dispidGetAccessTokenMethod: 98, + dispidOpenBrowserWindow: 102, + dispidCreateDocumentMethod: 105, dispidGetSelectedTaskMethod: 110, dispidGetSelectedResourceMethod: 111, dispidGetTaskMethod: 112, @@ -1310,8 +1383,11 @@ OSF.DDA.EventDispId={ dispidObjectDataChangedEvent: 15, dispidContentControlAddedEvent: 16, dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, dispidAppCommandInvokedEvent: 39, dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, dispidTaskSelectionChangedEvent: 56, dispidResourceSelectionChangedEvent: 57, dispidViewSelectionChangedEvent: 58, @@ -1443,7 +1519,9 @@ OSF.DDA.ErrorCodeManager=(function () { ooeSSOInvalidGrant: 13005, ooeSSOClientError: 13006, ooeSSOServerError: 13007, - ooeAddinIsAlreadyRequestingToken: 13008 + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009, + ooeSSOConnectionLost: 13010 }, initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={ name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotSupported }; @@ -1541,6 +1619,8 @@ OSF.DDA.ErrorCodeManager=(function () { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={ name: stringNS.L_SSOClientError, message: stringNS.L_SSOClientErrorMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={ name: stringNS.L_SSOServerError, message: stringNS.L_SSOServerErrorMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={ name: stringNS.L_AddinIsAlreadyRequestingToken, message: stringNS.L_AddinIsAlreadyRequestingTokenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={ name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={ name: stringNS.L_SSOConnectionLostError, message: stringNS.L_SSOConnectionLostErrorMessage }; } }; })(); @@ -2242,6 +2322,11 @@ OSF.DDA.Context=function OSF_DDA_Context(officeAppContext, document, license, ap value: officeAppContext.auth }); } + if (officeAppContext.application) { + OSF.OUtil.defineEnumerableProperty(this, "application", { + value: officeAppContext.application + }); + } if (officeAppContext.get_isDialog()) { var requirements=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); OSF.OUtil.defineEnumerableProperty(this, "requirements", { @@ -2284,6 +2369,8 @@ OSF.DDA.OutlookContext=function OSF_DDA_OutlookContext(appContext, settings, lic }; OSF.OUtil.extend(OSF.DDA.OutlookContext, OSF.DDA.Context); OSF.DDA.OutlookAppOm=function OSF_DDA_OutlookAppOm(appContext, window, appReady) { }; +OSF.DDA.Application=function OSF_DDA_Application(officeAppContext) { +}; OSF.DDA.Document=function OSF_DDA_Document(officeAppContext, settings) { var mode; switch (officeAppContext.get_clientMode()) { @@ -3020,6 +3107,8 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, "ExecuteRichApiRequestAsync": did.dispidExecuteRichApiRequestMethod, "AppCommandInvocationCompletedAsync": did.dispidAppCommandInvocationCompletedMethod, "CloseContainerAsync": did.dispidCloseContainerMethod, + "OpenBrowserWindow": did.dispidOpenBrowserWindow, + "CreateDocumentAsync": did.dispidCreateDocumentMethod, "AddDataPartAsync": did.dispidAddDataPartMethod, "GetDataPartByIdAsync": did.dispidGetDataPartByIdMethod, "GetDataPartsByNameSpaceAsync": did.dispidGetDataPartsByNamespaceMethod, @@ -3059,13 +3148,13 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, } jsom=OSF.DDA.SyncMethodNames; did=OSF.DDA.MethodDispId; - var asyncMethodMap={ + var syncMethodMap={ "MessageParent": did.dispidMessageParentMethod, "SendMessage": did.dispidSendMessageMethod }; - for (var method in asyncMethodMap) { + for (var method in syncMethodMap) { if (jsom[method]) { - dispIdMap[jsom[method].id]=asyncMethodMap[method]; + dispIdMap[jsom[method].id]=syncMethodMap[method]; } } jsom=Microsoft.Office.WebExtension.EventType; @@ -3085,7 +3174,10 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, "ObjectSelectionChanged": did.dispidObjectSelectionChangedEvent, "ObjectDataChanged": did.dispidObjectDataChangedEvent, "ContentControlAdded": did.dispidContentControlAddedEvent, + "RichApiMessage": did.dispidRichApiMessageEvent, "ItemChanged": did.dispidOlkItemSelectedChangedEvent, + "RecipientsChanged": did.dispidOlkRecipientsChangedEvent, + "AppointmentTimeChanged": did.dispidOlkAppointmentTimeChangedEvent, "TaskSelectionChanged": did.dispidTaskSelectionChangedEvent, "ResourceSelectionChanged": did.dispidResourceSelectionChangedEvent, "ViewSelectionChanged": did.dispidViewSelectionChangedEvent, @@ -3161,6 +3253,7 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, else { hostCallArgs=callArgs; } + var startTime=(new Date()).getTime(); delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ "dispId": dispId, "hostCallArgs": hostCallArgs, @@ -3181,6 +3274,9 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, } var payload=asyncMethodCall.processResponse(status, responseArgs, caller, callArgs); OSF.DDA.issueAsyncResult(callArgs, status, payload); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(dispId, hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); + } } }); } @@ -4048,7 +4144,6 @@ OSF.DDA.SafeArray.Delegate.executeAsync=function OSF_DDA_SafeArray_Delegate$Exec if (args.onCalling) { args.onCalling(); } - var startTime=(new Date()).getTime(); OSF.ClientHostController.execute(args.dispId, toArray(args.hostCallArgs), function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode) { var result=hostResponseArgs.toArray(); var status=result[OSF.DDA.SafeArray.Response.Status]; @@ -4095,9 +4190,6 @@ OSF.DDA.SafeArray.Delegate.executeAsync=function OSF_DDA_SafeArray_Delegate$Exec } args.onComplete(status, payload); } - if (OSF.AppTelemetry) { - OSF.AppTelemetry.onMethodDone(args.dispId, args.hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); - } return true; }); } @@ -4213,6 +4305,9 @@ OSF.InitializationHelper.prototype.prepareApiSurface=function OSF_Initialization } } } + if (OSF.DDA.OpenBrowser) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.OpenBrowserWindow]); + } if (OSF.DDA.Auth) { appContext.auth=new OSF.DDA.Auth(); OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth, [OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]); @@ -5011,7 +5106,7 @@ var OSFAriaLogger; function AriaLogger() { } AriaLogger.prototype.getAriaCDNLocation=function () { - return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry-2.8.0.min.js"); + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry.js"); }; AriaLogger.getInstance=function () { if (AriaLogger.AriaLoggerObj===undefined) { @@ -5028,13 +5123,10 @@ var OSFAriaLogger; try { if (!this.ALogger) { var OfficeExtensibilityTenantID="db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; - var configuration=new microsoft.applications.telemetry.LogConfiguration(); - configuration.enableAutoUserSession=true; - microsoft.applications.telemetry.LogManager.initialize(OfficeExtensibilityTenantID, configuration); - this.ALogger=new microsoft.applications.telemetry.Logger(); + this.ALogger=AWTLogManager.initialize(OfficeExtensibilityTenantID); } - var eventProperties=new microsoft.applications.telemetry.EventProperties(); - eventProperties.name="Office.Extensibility.OfficeJS."+tableName; + var eventProperties=new AWTEventProperties(); + eventProperties.setName("Office.Extensibility.OfficeJS."+tableName); for (var key in telemetryData) { if (key.toLowerCase() !=="table") { eventProperties.setProperty(key, telemetryData[key]); @@ -5067,6 +5159,7 @@ var OSFAppTelemetry; var sessionId=OSF.OUtil.Guid.generateNewGuid(); var osfControlAppCorrelationId=""; var omexDomainRegex=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"); + OSFAppTelemetry.enableTelemetry=true; ; var AppInfo=(function () { function AppInfo() { @@ -5150,17 +5243,19 @@ var OSFAppTelemetry; function AppLogger() { } AppLogger.prototype.LogData=function (data) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, data.SerializeRow(), OSF.Logger.SendFlag.none); - OSFAriaLogger.AriaLogger.getInstance().logData(data); + try { + OSFAriaLogger.AriaLogger.getInstance().logData(data); + } + catch (e) { + } }; AppLogger.prototype.LogRawData=function (log) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, log, OSF.Logger.SendFlag.none); try { OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)); } @@ -5200,7 +5295,7 @@ var OSFAppTelemetry; } appInfo.message=context.get_hostCustomMessage(); appInfo.officeJSVersion=OSF.ConstantNames.FileVersion; - appInfo.hostJSVersion="16.0.8119.1000"; + appInfo.hostJSVersion="16.0.8916.1000"; if (context._wacHostEnvironment) { appInfo.wacHostEnvironment=context._wacHostEnvironment; } @@ -5431,14 +5526,16 @@ OSF.EventDispatch=function OSF_EventDispatch(eventTypes) { this._eventHandlers={}; this._objectEventHandlers={}; this._queuedEventsArgs={}; - for (var entry in eventTypes) { - var eventType=eventTypes[entry]; - var isObjectEvent=(eventType=="objectDeleted" || eventType=="objectSelectionChanged" || eventType=="objectDataChanged" || eventType=="contentControlAdded"); - if (!isObjectEvent) - this._eventHandlers[eventType]=[]; - else - this._objectEventHandlers[eventType]={}; - this._queuedEventsArgs[eventType]=[]; + if (eventTypes !=null) { + for (var i=0; i < eventTypes.length; i++) { + var eventType=eventTypes[i]; + var isObjectEvent=(eventType=="objectDeleted" || eventType=="objectSelectionChanged" || eventType=="objectDataChanged" || eventType=="contentControlAdded"); + if (!isObjectEvent) + this._eventHandlers[eventType]=[]; + else + this._objectEventHandlers[eventType]={}; + this._queuedEventsArgs[eventType]=[]; + } } }; OSF.EventDispatch.prototype={ @@ -5464,8 +5561,8 @@ OSF.EventDispatch.prototype={ hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) { var handlers=this._eventHandlers[eventType]; if (handlers && handlers.length > 0) { - for (var h in handlers) { - if (handlers[h]===handler) + for (var i=0; i < handlers.length; i++) { + if (handlers[i]===handler) return true; } } @@ -5570,8 +5667,9 @@ OSF.EventDispatch.prototype={ var eventType=eventArgs.type; if (eventType && this._eventHandlers[eventType]) { var eventHandlers=this._eventHandlers[eventType]; - for (var handler in eventHandlers) - eventHandlers[handler](eventArgs); + for (var i=0; i < eventHandlers.length; i++) { + eventHandlers[i](eventArgs); + } return true; } else { @@ -5668,6 +5766,9 @@ OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEve case Microsoft.Office.WebExtension.EventType.ContentControlAdded: args=new OSF.DDA.ObjectEventArgs(eventType, eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args=new OSF.DDA.RichApiMessageEventArgs(eventType, eventProperties); + break; case Microsoft.Office.WebExtension.EventType.DataNodeInserted: args=new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); break; @@ -5693,10 +5794,28 @@ OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEve args=new OSF.DDA.DialogParentEventArgs(eventProperties); break; case Microsoft.Office.WebExtension.EventType.ItemChanged: - if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlookwebapp") { + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { args=new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); target.initialize(args["initialData"]); - target.setCurrentItemNumber(args["itemNumber"].itemNumber); + if (OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]=="win32" || OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]=="mac") { + target.setCurrentItemNumber(args["itemNumber"].itemNumber); + } + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { + args=new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { + args=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); } else { throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); @@ -5883,6 +6002,13 @@ OSF.DDA.AsyncMethodCalls.define({ "types": ["boolean"], "defaultValue": false } + }, + { + name: Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels, + value: { + "types": ["boolean"], + "defaultValue": false + } } ], privateStateCallbacks: [], @@ -5920,13 +6046,13 @@ OSF.DDA.AsyncMethodCalls.define({ if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] <=0) { callArgs[Microsoft.Office.WebExtension.Parameters.Width]=1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Width]=99; } if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] <=0) { callArgs[Microsoft.Office.WebExtension.Parameters.Height]=1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Height]=99; } if (!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) { @@ -6372,52 +6498,10 @@ OSF.DDA.SettingsManager={ DateJSONPrefix: "Date(", DataJSONSuffix: ")", serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) { - var ret={}; - for (var key in settingsCollection) { - var value=settingsCollection[key]; - try { - if (JSON) { - value=JSON.stringify(value, function dateReplacer(k, v) { - return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix+this[k].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix : v; - }); - } - else { - value=Sys.Serialization.JavaScriptSerializer.serialize(value); - } - ret[key]=value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.serializeSettings(settingsCollection); }, deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) { - var ret={}; - serializedSettings=serializedSettings || {}; - for (var key in serializedSettings) { - var value=serializedSettings[key]; - try { - if (JSON) { - value=JSON.parse(value, function dateReviver(k, v) { - var d; - if (typeof v==='string' && v && v.length > 6 && v.slice(0, 5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) { - d=new Date(parseInt(v.slice(5, -1))); - if (d) { - return d; - } - } - return v; - }); - } - else { - value=Sys.Serialization.JavaScriptSerializer.deserialize(value, true); - } - ret[key]=value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.deserializeSettings(serializedSettings); } }; OSF.DDA.Settings=function OSF_DDA_Settings(settings) { @@ -7457,6 +7541,54 @@ OSF.DDA.SafeArray.Delegate.ParameterMap.define({ { name: Microsoft.Office.WebExtension.Parameters.SelectionMode, value: 2 } ] }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { RichApiMessage: "richApiMessage" }); +OSF.DDA.RichApiMessageEventArgs=function OSF_DDA_RichApiMessageEventArgs(eventType, eventProperties) { + var entryArray=eventProperties[Microsoft.Office.WebExtension.Parameters.Data]; + var entries=[]; + if (entryArray) { + for (var i=0; i < entryArray.length; i++) { + var elem=entryArray[i]; + if (elem.toArray) { + elem=elem.toArray(); + } + entries.push({ + messageCategory: elem[0], + messageType: elem[1], + targetId: elem[2], + message: elem[3], + id: elem[4], + isRemoteOverride: elem[5] + }); + } + } + OSF.OUtil.defineEnumerableProperties(this, { + "type": { value: Microsoft.Office.WebExtension.EventType.RichApiMessage }, + "entries": { value: entries } + }); +}; +var OfficeExt; +(function (OfficeExt) { + var RichApiMessageManager=(function () { + function RichApiMessageManager() { + this._eventDispatch=null; + this._eventDispatch=new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.RichApiMessage, + ]); + OSF.DDA.DispIdHost.addEventSupport(this, this._eventDispatch); + } + return RichApiMessageManager; + })(); + OfficeExt.RichApiMessageManager=RichApiMessageManager; +})(OfficeExt || (OfficeExt={})); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidRichApiMessageEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); OSF.DDA.AsyncMethodNames.addNames({ ExecuteRichApiRequestAsync: "executeRichApiRequestAsync" }); @@ -7480,6 +7612,169 @@ OSF.DDA.SafeArray.Delegate.ParameterMap.define({ { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } ] }); +Microsoft.Office.WebExtension.FileType={ + Text: "text", + Compressed: "compressed", + Pdf: "pdf" +}; +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + FileProperties: "FileProperties", + FileSliceProperties: "FileSliceProperties" +}); +OSF.DDA.FileProperties={ + Handle: "FileHandle", + FileSize: "FileSize", + SliceSize: Microsoft.Office.WebExtension.Parameters.SliceSize +}; +OSF.DDA.File=function OSF_DDA_File(handle, fileSize, sliceSize) { + OSF.OUtil.defineEnumerableProperties(this, { + "size": { + value: fileSize + }, + "sliceCount": { + value: Math.ceil(fileSize / sliceSize) + } + }); + var privateState={}; + privateState[OSF.DDA.FileProperties.Handle]=handle; + privateState[OSF.DDA.FileProperties.SliceSize]=sliceSize; + var am=OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.GetDocumentCopyChunkAsync, + am.ReleaseDocumentCopyAsync + ], privateState); +}; +OSF.DDA.FileSliceOffset="fileSliceoffset"; +OSF.DDA.AsyncMethodNames.addNames({ + GetDocumentCopyAsync: "getFileAsync", + GetDocumentCopyChunkAsync: "getSliceAsync", + ReleaseDocumentCopyAsync: "closeAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.FileType, + "enum": Microsoft.Office.WebExtension.FileType + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.SliceSize, + value: { + "types": ["number"], + "defaultValue": 4 * 1024 * 1024 + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + var sliceSize=callArgs[Microsoft.Office.WebExtension.Parameters.SliceSize]; + if (sliceSize <=0 || sliceSize > (4 * 1024 * 1024)) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize; + } + return callArgs; + }, + onSucceeded: function (fileDescriptor, caller, callArgs) { + return new OSF.DDA.File(fileDescriptor[OSF.DDA.FileProperties.Handle], fileDescriptor[OSF.DDA.FileProperties.FileSize], callArgs[Microsoft.Office.WebExtension.Parameters.SliceSize]); + } +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.SliceIndex, + "types": ["number"] + } + ], + privateStateCallbacks: [ + { + name: OSF.DDA.FileProperties.Handle, + value: function (caller, stateInfo) { return stateInfo[OSF.DDA.FileProperties.Handle]; } + }, + { + name: OSF.DDA.FileProperties.SliceSize, + value: function (caller, stateInfo) { return stateInfo[OSF.DDA.FileProperties.SliceSize]; } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + var index=callArgs[Microsoft.Office.WebExtension.Parameters.SliceIndex]; + if (index < 0 || index >=caller.sliceCount) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange; + } + callArgs[OSF.DDA.FileSliceOffset]=parseInt((index * stateInfo[OSF.DDA.FileProperties.SliceSize]).toString()); + return callArgs; + }, + onSucceeded: function (sliceDescriptor, caller, callArgs) { + var slice={}; + OSF.OUtil.defineEnumerableProperties(slice, { + "data": { + value: OSF.OUtil.shallowCopy(sliceDescriptor[Microsoft.Office.WebExtension.Parameters.Data]) + }, + "index": { + value: callArgs[Microsoft.Office.WebExtension.Parameters.SliceIndex] + }, + "size": { + value: sliceDescriptor[OSF.DDA.FileProperties.SliceSize] + } + }); + return slice; + } +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync, + privateStateCallbacks: [ + { + name: OSF.DDA.FileProperties.Handle, + value: function (caller, stateInfo) { return stateInfo[OSF.DDA.FileProperties.Handle]; } + } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.FileProperties, + fromHost: [ + { name: OSF.DDA.FileProperties.Handle, value: 0 }, + { name: OSF.DDA.FileProperties.FileSize, value: 1 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.FileSliceProperties, + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 0 }, + { name: OSF.DDA.FileProperties.SliceSize, value: 1 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.FileType, + toHost: [ + { name: Microsoft.Office.WebExtension.FileType.Text, value: 0 }, + { name: Microsoft.Office.WebExtension.FileType.Compressed, value: 5 }, + { name: Microsoft.Office.WebExtension.FileType.Pdf, value: 6 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod, + toHost: [{ name: Microsoft.Office.WebExtension.Parameters.FileType, value: 0 }], + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.FileProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod, + toHost: [ + { name: OSF.DDA.FileProperties.Handle, value: 0 }, + { name: OSF.DDA.FileSliceOffset, value: 1 }, + { name: OSF.DDA.FileProperties.SliceSize, value: 2 } + ], + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.FileSliceProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod, + toHost: [{ name: OSF.DDA.FileProperties.Handle, value: 0 }] +}); OSF.DDA.FilePropertiesDescriptor={ Url: "Url" }; @@ -8291,10 +8586,56 @@ var OfficeExt; AppCommand.registerDdaFacade=registerDdaFacade; })(AppCommand=OfficeExt.AppCommand || (OfficeExt.AppCommand={})); })(OfficeExt || (OfficeExt={})); +OSF.DDA.AsyncMethodNames.addNames({ GetAccessTokenAsync: "getAccessTokenAsync" }); +OSF.DDA.Auth=function OSF_DDA_Auth() { +}; +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetAccessTokenAsync, + requiredArguments: [], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.ForceConsent, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, + value: { + "types": ["string"], + "defaultValue": "" + } + } + ], + onSucceeded: function (dataDescriptor, caller, callArgs) { + var data=dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + return data; + } +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetAccessTokenMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.ForceConsent, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, value: 2 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); OSF.DDA.ExcelDocument=function OSF_DDA_ExcelDocument(officeAppContext, settings) { var bf=new OSF.DDA.BindingFacade(this); OSF.DDA.DispIdHost.addAsyncMethods(bf, [OSF.DDA.AsyncMethodNames.AddFromPromptAsync]); OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.GoToByIdAsync]); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync]); OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync]); OSF.DDA.ExcelDocument.uber.constructor.call(this, officeAppContext, bf, settings); OSF.OUtil.finalizeProperties(this); @@ -8308,6 +8649,7 @@ OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function OSF OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM); appContext.doc=new OSF.DDA.ExcelDocument(appContext, this._initializeSettings(true)); OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi, [OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]); + OSF.DDA.RichApi.richApiMessageManager=new OfficeExt.RichApiMessageManager(); appReady(); }; (function () { @@ -8369,9 +8711,10 @@ var __extends=(this && this.__extends) || function (d, b) { var OfficeExtension; (function (OfficeExtension) { var Action=(function () { - function Action(actionInfo, isWriteOperation) { + function Action(actionInfo, isWriteOperation, isRestrictedResourceAccess) { this.m_actionInfo=actionInfo; this.m_isWriteOperation=isWriteOperation; + this.m_isRestrictedResourceAccess=isRestrictedResourceAccess; } Object.defineProperty(Action.prototype, "actionInfo", { get: function () { @@ -8387,12 +8730,30 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(Action.prototype, "isRestrictedResourceAccess", { + get: function () { + return this.m_isRestrictedResourceAccess; + }, + enumerable: true, + configurable: true + }); return Action; }()); OfficeExtension.Action=Action; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + var TraceMarkerActionResultHandler=(function () { + function TraceMarkerActionResultHandler(callback) { + this.m_callback=callback; + } + TraceMarkerActionResultHandler.prototype._handleResult=function (value) { + if (this.m_callback) { + this.m_callback(); + } + }; + return TraceMarkerActionResultHandler; + }()); var ActionFactory=(function () { function ActionFactory() { } @@ -8408,13 +8769,17 @@ var OfficeExtension; var args=[value]; var referencedArgumentObjectPaths=OfficeExtension.Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); OfficeExtension.Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); - var ret=new OfficeExtension.Action(actionInfo, true); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + context._pendingRequest.ensureInstantiateObjectPaths(referencedArgumentObjectPaths); + var ret=new OfficeExtension.Action(actionInfo, true, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); context._pendingRequest.addReferencedObjectPaths(referencedArgumentObjectPaths); + ret.referencedObjectPath=parent._objectPath; + ret.referencedArgumentObjectPaths=referencedArgumentObjectPaths; return ret; }; - ActionFactory.createMethodAction=function (context, parent, methodName, operationType, args) { + ActionFactory.createMethodAction=function (context, parent, methodName, operationType, args, isRestrictedResourceAccess) { OfficeExtension.Utility.validateObjectPath(parent); var actionInfo={ Id: context._nextId(), @@ -8425,15 +8790,20 @@ var OfficeExtension; }; var referencedArgumentObjectPaths=OfficeExtension.Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); OfficeExtension.Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + context._pendingRequest.ensureInstantiateObjectPaths(referencedArgumentObjectPaths); var isWriteOperation=operationType !=1; - var ret=new OfficeExtension.Action(actionInfo, isWriteOperation); + var ret=new OfficeExtension.Action(actionInfo, isWriteOperation, isRestrictedResourceAccess); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); context._pendingRequest.addReferencedObjectPaths(referencedArgumentObjectPaths); + ret.referencedObjectPath=parent._objectPath; + ret.referencedArgumentObjectPaths=referencedArgumentObjectPaths; return ret; }; ActionFactory.createQueryAction=function (context, parent, queryOption) { OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); var actionInfo={ Id: context._nextId(), ActionType: 2, @@ -8441,13 +8811,15 @@ var OfficeExtension; ObjectPathId: parent._objectPath.objectPathInfo.Id, }; actionInfo.QueryInfo=queryOption; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; return ret; }; ActionFactory.createRecursiveQueryAction=function (context, parent, query) { OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); var actionInfo={ Id: context._nextId(), ActionType: 6, @@ -8455,23 +8827,59 @@ var OfficeExtension; ObjectPathId: parent._objectPath.objectPathInfo.Id, RecursiveQueryInfo: query }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; + return ret; + }; + ActionFactory.createQueryAsJsonAction=function (context, parent, queryOption) { + OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + var actionInfo={ + Id: context._nextId(), + ActionType: 7, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + }; + actionInfo.QueryInfo=queryOption; + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; + return ret; + }; + ActionFactory.createEnsureUnchangedAction=function (context, parent, objectState) { + OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + var actionInfo={ + Id: context._nextId(), + ActionType: 8, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }; + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; return ret; }; ActionFactory.createInstantiateAction=function (context, obj) { OfficeExtension.Utility.validateObjectPath(obj); + context._pendingRequest.ensureInstantiateObjectPath(obj._objectPath.parentObjectPath); + context._pendingRequest.ensureInstantiateObjectPaths(obj._objectPath.argumentObjectPaths); var actionInfo={ Id: context._nextId(), ActionType: 1, Name: "", ObjectPathId: obj._objectPath.objectPathInfo.Id }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(obj._objectPath); context._pendingRequest.addActionResultHandler(ret, new OfficeExtension.InstantiateActionResultHandler(obj)); + ret.referencedObjectPath=obj._objectPath; return ret; }; ActionFactory.createTraceAction=function (context, message, addTraceMessage) { @@ -8481,13 +8889,17 @@ var OfficeExtension; Name: "Trace", ObjectPathId: 0 }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); if (addTraceMessage) { context._pendingRequest.addTrace(actionInfo.Id, message); } return ret; }; + ActionFactory.createTraceMarkerForCallback=function (context, callback) { + var action=ActionFactory.createTraceAction(context, null, false); + context._pendingRequest.addActionResultHandler(action, new TraceMarkerActionResultHandler(callback)); + }; return ActionFactory; }()); OfficeExtension.ActionFactory=ActionFactory; @@ -8565,6 +8977,7 @@ var OfficeExtension; }; ClientObject.prototype._recursivelySet=function (input, options, scalarWriteablePropertyNames, objectPropertyNames, notAllowedToBeSetPropertyNames) { var isClientObject=(input instanceof ClientObject); + var originalInput=input; if (isClientObject) { if (Object.getPrototypeOf(this)===Object.getPrototypeOf(input)) { input=JSON.parse(JSON.stringify(input)); @@ -8581,31 +8994,38 @@ var OfficeExtension; for (var i=0; i < scalarWriteablePropertyNames.length; i++) { prop=scalarWriteablePropertyNames[i]; if (input.hasOwnProperty(prop)) { - this[prop]=input[prop]; + if (typeof input[prop] !=="undefined") { + this[prop]=input[prop]; + } } } for (var i=0; i < objectPropertyNames.length; i++) { prop=objectPropertyNames[i]; if (input.hasOwnProperty(prop)) { - this[prop].set(input[prop], options); + if (typeof input[prop] !=="undefined") { + var dataToPassToSet=isClientObject ? originalInput[prop] : input[prop]; + this[prop].set(dataToPassToSet, options); + } } } + var throwOnReadOnly=!isClientObject; + if (options && !OfficeExtension.Utility.isNullOrUndefined(throwOnReadOnly)) { + throwOnReadOnly=options.throwOnReadOnly; + } for (var i=0; i < notAllowedToBeSetPropertyNames.length; i++) { prop=notAllowedToBeSetPropertyNames[i]; if (input.hasOwnProperty(prop)) { - throw new OfficeExtension._Internal.RuntimeError({ - code: OfficeExtension.ErrorCodes.invalidArgument, - message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), - debugInfo: { - errorLocation: prop - } - }); + if (typeof input[prop] !=="undefined" && throwOnReadOnly) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.invalidArgument, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), + debugInfo: { + errorLocation: prop + } + }); + } } } - var throwOnReadOnly=!isClientObject; - if (options && !OfficeExtension.Utility.isNullOrUndefined(throwOnReadOnly)) { - throwOnReadOnly=options.throwOnReadOnly; - } for (prop in input) { if (scalarWriteablePropertyNames.indexOf(prop) < 0 && objectPropertyNames.indexOf(prop) < 0) { var propertyDescriptor=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this), prop); @@ -8653,12 +9073,14 @@ var OfficeExtension; this.m_actions=[]; this.m_actionResultHandler={}; this.m_referencedObjectPaths={}; + this.m_instantiatedObjectPaths={}; this.m_flags=0; this.m_traceInfos={}; this.m_pendingProcessEventHandlers=[]; this.m_pendingEventHandlerActions={}; this.m_responseTraceIds={}; this.m_responseTraceMessages=[]; + this.m_preSyncPromises=[]; } Object.defineProperty(ClientRequest.prototype, "flags", { get: function () { @@ -8704,7 +9126,13 @@ var OfficeExtension; if (action.isWriteOperation) { this.m_flags=this.m_flags | 1; } + if (action.isRestrictedResourceAccess) { + this.m_flags=this.m_flags | 2; + } this.m_actions.push(action); + if (action.actionInfo.ActionType==1) { + this.m_instantiatedObjectPaths[action.actionInfo.ObjectPathId]=action; + } }; Object.defineProperty(ClientRequest.prototype, "hasActions", { get: function () { @@ -8713,9 +9141,39 @@ var OfficeExtension; enumerable: true, configurable: true }); + ClientRequest.prototype._getLastAction=function () { + return this.m_actions[this.m_actions.length - 1]; + }; ClientRequest.prototype.addTrace=function (actionId, message) { this.m_traceInfos[actionId]=message; }; + ClientRequest.prototype.ensureInstantiateObjectPath=function (objectPath) { + if (objectPath) { + if (this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + this.ensureInstantiateObjectPath(objectPath.parentObjectPath); + this.ensureInstantiateObjectPaths(objectPath.argumentObjectPaths); + if (!this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + var actionInfo={ + Id: this.m_context._nextId(), + ActionType: 1, + Name: "", + ObjectPathId: objectPath.objectPathInfo.Id + }; + var instantiateAction=new OfficeExtension.Action(actionInfo, false, false); + instantiateAction.referencedObjectPath=objectPath; + this.addAction(instantiateAction); + } + } + }; + ClientRequest.prototype.ensureInstantiateObjectPaths=function (objectPaths) { + if (objectPaths) { + for (var i=0; i < objectPaths.length; i++) { + this.ensureInstantiateObjectPath(objectPaths[i]); + } + } + }; ClientRequest.prototype.addReferencedObjectPath=function (objectPath) { if (this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]) { return; @@ -8733,6 +9191,9 @@ var OfficeExtension; if (objectPath.isWriteOperation) { this.m_flags=this.m_flags | 1; } + if (objectPath.isRestrictedResourceAccess) { + this.m_flags=this.m_flags | 2; + } this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]=objectPath; if (objectPath.objectPathInfo.ObjectPathType==3) { this.addReferencedObjectPaths(objectPath.argumentObjectPaths); @@ -8751,6 +9212,9 @@ var OfficeExtension; this.m_actionResultHandler[action.actionInfo.Id]=resultHandler; }; ClientRequest.prototype.buildRequestMessageBody=function () { + if (OfficeExtension._internalConfig.enableEarlyDispose) { + ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } var objectPaths={}; for (var i in this.m_referencedObjectPaths) { objectPaths[i]=this.m_referencedObjectPaths[i].objectPathInfo; @@ -8801,12 +9265,95 @@ var OfficeExtension; ClientRequest.prototype._getPendingEventHandlerActions=function (eventHandlers) { return this.m_pendingEventHandlerActions[eventHandlers._id]; }; + ClientRequest.prototype._addPreSyncPromise=function (value) { + this.m_preSyncPromises.push(value); + }; + Object.defineProperty(ClientRequest.prototype, "_preSyncPromises", { + get: function () { + return this.m_preSyncPromises; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_actions", { + get: function () { + return this.m_actions; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_objectPaths", { + get: function () { + return this.m_referencedObjectPaths; + }, + enumerable: true, + configurable: true + }); + ClientRequest._updateLastUsedActionIdOfObjectPathId=function (lastUsedActionIdOfObjectPathId, objectPath, actionId) { + while (objectPath) { + if (lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]) { + return; + } + lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]=actionId; + var argumentObjectPaths=objectPath.argumentObjectPaths; + if (argumentObjectPaths) { + var argumentObjectPathsLength=argumentObjectPaths.length; + for (var i=0; i < argumentObjectPathsLength; i++) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, argumentObjectPaths[i], actionId); + } + } + objectPath=objectPath.parentObjectPath; + } + }; + ClientRequest._calculateLastUsedObjectPathIds=function (actions) { + var lastUsedActionIdOfObjectPathId={}; + var actionsLength=actions.length; + for (var index=actionsLength - 1; index >=0; --index) { + var action=actions[index]; + var actionId=action.actionInfo.Id; + if (action.referencedObjectPath) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, action.referencedObjectPath, actionId); + } + var referencedObjectPaths=action.referencedArgumentObjectPaths; + if (referencedObjectPaths) { + var referencedObjectPathsLength=referencedObjectPaths.length; + for (var refIndex=0; refIndex < referencedObjectPathsLength; refIndex++) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, referencedObjectPaths[refIndex], actionId); + } + } + } + var lastUsedObjectPathIdsOfAction={}; + for (var key in lastUsedActionIdOfObjectPathId) { + var actionId=lastUsedActionIdOfObjectPathId[key]; + var objectPathIds=lastUsedObjectPathIdsOfAction[actionId]; + if (!objectPathIds) { + objectPathIds=[]; + lastUsedObjectPathIdsOfAction[actionId]=objectPathIds; + } + objectPathIds.push(parseInt(key)); + } + for (var index=0; index < actionsLength; index++) { + var action=actions[index]; + var lastUsedObjectPathIds=lastUsedObjectPathIdsOfAction[action.actionInfo.Id]; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + action.actionInfo.L=lastUsedObjectPathIds; + } + else if (action.actionInfo.L) { + delete action.actionInfo.L; + } + } + }; return ClientRequest; }()); OfficeExtension.ClientRequest=ClientRequest; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + OfficeExtension._internalConfig={ + showDisposeInfoInDebugInfo: false, + enableEarlyDispose: true, + alwaysPolyfillClientObjectRetrieveMethod: false + }; var SessionBase=(function () { function SessionBase() { } @@ -8900,6 +9447,15 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(ClientRequestContext.prototype, "debugInfo", { + get: function () { + var prettyPrinter=new OfficeExtension.RequestPrettyPrinter(this._rootObjectPropertyName, this._pendingRequest._objectPaths, this._pendingRequest._actions, OfficeExtension._internalConfig.showDisposeInfoInDebugInfo); + var statements=prettyPrinter.process(); + return { pendingStatements: statements }; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ClientRequestContext.prototype, "trackedObjects", { get: function () { if (!this.m_trackedObjects) { @@ -8919,11 +9475,76 @@ var OfficeExtension; }); ClientRequestContext.prototype.load=function (clientObj, option) { OfficeExtension.Utility.validateContext(this, clientObj); - var queryOption=ClientRequestContext.parseQueryOption(option); + var queryOption=ClientRequestContext._parseQueryOption(option); var action=OfficeExtension.ActionFactory.createQueryAction(this, clientObj, queryOption); this._pendingRequest.addActionResultHandler(action, clientObj); }; - ClientRequestContext.parseQueryOption=function (option) { + ClientRequestContext.isLoadOption=function (loadOption) { + if (!OfficeExtension.Utility.isUndefined(loadOption.select) && (typeof (loadOption.select)==="string" || Array.isArray(loadOption.select))) + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.expand) && (typeof (loadOption.expand)==="string" || Array.isArray(loadOption.expand))) + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.top) && typeof (loadOption.top)==="number") + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.skip) && typeof (loadOption.skip)==="number") + return true; + for (var i in loadOption) { + return false; + } + return true; + }; + ClientRequestContext.parseStrictLoadOption=function (option) { + var ret={ Select: [] }; + ClientRequestContext.parseStrictLoadOptionHelper(ret, "", "option", option); + return ret; + }; + ClientRequestContext.combineQueryPath=function (pathPrefix, key, separator) { + if (pathPrefix.length===0) { + return key; + } + else { + return pathPrefix+separator+key; + } + }; + ClientRequestContext.parseStrictLoadOptionHelper=function (queryInfo, pathPrefix, argPrefix, option) { + for (var key in option) { + var value=option[key]; + if (key==="$all") { + if (typeof (value) !=="boolean") { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + if (value) { + queryInfo.Select.push(ClientRequestContext.combineQueryPath(pathPrefix, "*", "/")); + } + } + else if (key==="$top") { + if (typeof (value) !=="number" || pathPrefix.length > 0) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + queryInfo.Top=value; + } + else if (key==="$skip") { + if (typeof (value) !=="number" || pathPrefix.length > 0) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + queryInfo.Skip=value; + } + else { + if (typeof (value)==="boolean") { + if (value) { + queryInfo.Select.push(ClientRequestContext.combineQueryPath(pathPrefix, key, "/")); + } + } + else if (typeof (value)==="object") { + ClientRequestContext.parseStrictLoadOptionHelper(queryInfo, ClientRequestContext.combineQueryPath(pathPrefix, key, "/"), ClientRequestContext.combineQueryPath(argPrefix, key, "."), value); + } + else { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + } + } + }; + ClientRequestContext._parseQueryOption=function (option) { var queryOption={}; if (typeof (option)=="string") { var select=option; @@ -8932,41 +9553,46 @@ var OfficeExtension; else if (Array.isArray(option)) { queryOption.Select=option; } - else if (typeof (option)=="object") { + else if (typeof (option)==="object") { var loadOption=option; - if (typeof (loadOption.select)=="string") { - queryOption.Select=OfficeExtension.Utility._parseSelectExpand(loadOption.select); - } - else if (Array.isArray(loadOption.select)) { - queryOption.Select=loadOption.select; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.select)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.select"); - } - if (typeof (loadOption.expand)=="string") { - queryOption.Expand=OfficeExtension.Utility._parseSelectExpand(loadOption.expand); - } - else if (Array.isArray(loadOption.expand)) { - queryOption.Expand=loadOption.expand; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.expand)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.expand"); - } - if (typeof (loadOption.top)=="number") { - queryOption.Top=loadOption.top; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.top)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.top"); - } - if (typeof (loadOption.skip)=="number") { - queryOption.Skip=loadOption.skip; + if (ClientRequestContext.isLoadOption(loadOption)) { + if (typeof (loadOption.select)=="string") { + queryOption.Select=OfficeExtension.Utility._parseSelectExpand(loadOption.select); + } + else if (Array.isArray(loadOption.select)) { + queryOption.Select=loadOption.select; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.select)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.select"); + } + if (typeof (loadOption.expand)=="string") { + queryOption.Expand=OfficeExtension.Utility._parseSelectExpand(loadOption.expand); + } + else if (Array.isArray(loadOption.expand)) { + queryOption.Expand=loadOption.expand; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.expand)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.expand"); + } + if (typeof (loadOption.top)==="number") { + queryOption.Top=loadOption.top; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.top)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.top"); + } + if (typeof (loadOption.skip)==="number") { + queryOption.Skip=loadOption.skip; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.skip)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.skip"); + } } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.skip)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.skip"); + else { + queryOption=ClientRequestContext.parseStrictLoadOption(option); } } else if (!OfficeExtension.Utility.isNullOrUndefined(option)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option"); + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option"); } return queryOption; }; @@ -8976,7 +9602,7 @@ var OfficeExtension; } var quries={}; for (var key in options) { - quries[key]=ClientRequestContext.parseQueryOption(options[key]); + quries[key]=ClientRequestContext._parseQueryOption(options[key]); } var action=OfficeExtension.ActionFactory.createRecursiveQueryAction(this, clientObj, { Queries: quries, MaxDepth: maxDepth }); this._pendingRequest.addActionResultHandler(action, clientObj); @@ -8984,6 +9610,8 @@ var OfficeExtension; ClientRequestContext.prototype.trace=function (message) { OfficeExtension.ActionFactory.createTraceAction(this, message, true); }; + ClientRequestContext.prototype._processOfficeJsErrorResponse=function (officeJsErrorCode, response) { + }; ClientRequestContext.prototype.syncPrivateMain=function () { var _this=this; return OfficeExtension.Utility._createPromiseFromResult(null) @@ -9011,13 +9639,14 @@ var OfficeExtension; } }) .then(function () { - return _this.syncPrivate(); + var req=_this._pendingRequest; + _this.m_pendingRequest=null; + return _this.processPreSyncPromises(req) + .then(function () { return _this.syncPrivate(req); }); }); }; - ClientRequestContext.prototype.syncPrivate=function () { + ClientRequestContext.prototype.syncPrivate=function (req) { var _this=this; - var req=this._pendingRequest; - this.m_pendingRequest=null; if (!req.hasActions) { return this.processPendingEventHandlers(req); } @@ -9025,7 +9654,7 @@ var OfficeExtension; var requestFlags=req.flags; if (!this._requestExecutor) { if (OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)) { - this._requestExecutor=new OfficeExtension.OfficeJsRequestExecutor(); + this._requestExecutor=new OfficeExtension.OfficeJsRequestExecutor(this); } else { this._requestExecutor=new OfficeExtension.HttpRequestExecutor(); @@ -9043,8 +9672,10 @@ var OfficeExtension; req.invalidatePendingInvalidObjectPaths(); var errorFromResponse=null; var errorFromProcessEventHandlers=null; + this._lastSyncStart=performance.now(); return requestExecutor.executeAsync(this._customData, requestFlags, requestExecutorRequestMessage) .then(function (response) { + _this._lastSyncEnd=performance.now(); errorFromResponse=_this.processRequestExecutorResponseMessage(req, response); return _this.processPendingEventHandlers(req) .catch(function (ex) { @@ -9091,7 +9722,13 @@ var OfficeExtension; req._setResponseTraceIds(response.Body.TraceIds); } var traceMessages=req._responseTraceMessages; + var errorStatementInfo=null; if (response.Body) { + if (response.Body.Error && + response.Body.Error.ActionIndex >=0) { + var prettyPrinter=new OfficeExtension.RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions); + errorStatementInfo=prettyPrinter.processForDebugStatementInfo(response.Body.Error.ActionIndex); + } var actionResults=null; if (response.Body.Results) { actionResults=response.Body.Results; @@ -9117,13 +9754,18 @@ var OfficeExtension; }); } else if (response.Body && response.Body.Error) { + var debugInfo={ + errorLocation: response.Body.Error.Location + }; + if (errorStatementInfo) { + debugInfo.statement=errorStatementInfo.statement; + debugInfo.surroundingStatements=errorStatementInfo.surroundingStatements; + } return new OfficeExtension._Internal.RuntimeError({ code: response.Body.Error.Code, message: response.Body.Error.Message, traceMessages: traceMessages, - debugInfo: { - errorLocation: response.Body.Error.Location - } + debugInfo: debugInfo }); } return null; @@ -9139,6 +9781,17 @@ var OfficeExtension; ClientRequestContext.prototype.createProcessOneEventHandlersFunc=function (eventHandlers, req) { return function () { return eventHandlers._processRegistration(req); }; }; + ClientRequestContext.prototype.processPreSyncPromises=function (req) { + var ret=OfficeExtension.Utility._createPromiseFromResult(null); + for (var i=0; i < req._preSyncPromises.length; i++) { + var p=req._preSyncPromises[i]; + ret=ret.then(this.createProcessOneProSyncFunc(p)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneProSyncFunc=function (p) { + return function () { return p; }; + }; ClientRequestContext.prototype.sync=function (passThroughValue) { return this.syncPrivateMain().then(function () { return passThroughValue; }); }; @@ -9177,9 +9830,15 @@ var OfficeExtension; batch=receivedRunArgs[argOffset+0]; } else if (receivedRunArgs.length==argOffset+2) { - if (receivedRunArgs[argOffset+0] instanceof OfficeExtension.ClientObject) { + if (OfficeExtension.Utility.isNullOrUndefined(receivedRunArgs[argOffset+0])) { + ctxRetriever=ctxInitializer; + } + else if (receivedRunArgs[argOffset+0] instanceof OfficeExtension.ClientObject) { ctxRetriever=function () { return receivedRunArgs[argOffset+0].context; }; } + else if (receivedRunArgs[argOffset+0] instanceof ClientRequestContext) { + ctxRetriever=function () { return receivedRunArgs[argOffset+0]; }; + } else if (Array.isArray(receivedRunArgs[argOffset+0])) { var array=receivedRunArgs[argOffset+0]; if (array.length==0) { @@ -9345,6 +10004,79 @@ var OfficeExtension; return ClientResult; }()); OfficeExtension.ClientResult=ClientResult; + var RetrieveResult=(function () { + function RetrieveResult(m_proxy, m_shouldPolyfill) { + this.m_proxy=m_proxy; + this.m_shouldPolyfill=m_shouldPolyfill; + } + Object.defineProperty(RetrieveResult.prototype, "proxy", { + get: function () { + return this.m_proxy; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RetrieveResult.prototype, "data", { + get: function () { + if (!this.m_isLoaded) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.valueNotLoaded, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: "retrieveResult.data" + } + }); + } + return this.m_data; + }, + enumerable: true, + configurable: true + }); + RetrieveResult.prototype._handleResult=function (value) { + this.m_isLoaded=true; + if (typeof (value)==="object" && value && value._IsNull) { + this.m_data=null; + return; + } + if (this.m_shouldPolyfill) { + this.m_data=this.changePropertyNameToCamelLowerCase(value); + } + else { + this.m_data=value; + } + }; + RetrieveResult.prototype.changePropertyNameToCamelLowerCase=function (value) { + var charCodeUnderscore=95; + if (Array.isArray(value)) { + var ret=[]; + for (var i=0; i < value.length; i++) { + ret.push(this.changePropertyNameToCamelLowerCase(value[i])); + } + return ret; + } + else if (typeof (value)==="object" && value !==null) { + var ret={}; + for (var key in value) { + var propValue=value[key]; + if (key==="_Items") { + ret={}; + ret["items"]=this.changePropertyNameToCamelLowerCase(propValue); + break; + } + else if (key.charCodeAt(0) !==charCodeUnderscore) { + var propName=OfficeExtension.Utility._toCamelLowerCase(key); + ret[propName]=this.changePropertyNameToCamelLowerCase(propValue); + } + } + return ret; + } + else { + return value; + } + }; + return RetrieveResult; + }()); + OfficeExtension.RetrieveResult=RetrieveResult; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { @@ -9366,6 +10098,9 @@ var OfficeExtension; Constants.sourceLibHeader="SdkVersion"; Constants.embeddingPageOrigin="EmbeddingPageOrigin"; Constants.embeddingPageSessionInfo="EmbeddingPageSessionInfo"; + Constants.eventMessageCategory=65536; + Constants.eventWorkbookId="Workbook"; + Constants.eventSourceRemote="Remote"; return Constants; }()); OfficeExtension.Constants=Constants; @@ -9696,7 +10431,7 @@ var OfficeExtension; debugInfo[key]=partialDebugInfo[key]; } if (this.innerError) { - if (this.innerError instanceof OfficeExtension.Error) { + if (this.innerError instanceof OfficeExtension._Internal.RuntimeError) { debugInfo.innerError=this.innerError.debugInfo; } else { @@ -9781,6 +10516,20 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(EventHandlers.prototype, "_context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_callback", { + get: function () { + return this.m_callback; + }, + enumerable: true, + configurable: true + }); EventHandlers.prototype.add=function (handler) { var action=OfficeExtension.ActionFactory.createTraceAction(this.m_context, null, false); this.m_context._pendingRequest._addPendingEventHandlerAction(this, { id: action.actionInfo.Id, handler: handler, operation: 0 }); @@ -9874,6 +10623,13 @@ var OfficeExtension; this.m_allHandlers=handlers; this.m_handler=handler; } + Object.defineProperty(EventHandlerResult.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); EventHandlerResult.prototype.remove=function () { if (this.m_allHandlers && this.m_handler) { this.m_allHandlers.remove(this.m_handler); @@ -9908,6 +10664,8 @@ var OfficeExtension; return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged, handler, callback); }); case 1: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.settings.addHandlerAsync(Office.EventType.SettingsChanged, handler, callback); }); + case 5: + return OfficeExtension.Utility.promisify(function (callback) { return OSF.DDA.RichApi.richApiMessageManager.addHandlerAsync("richApiMessage", handler, callback); }); case 13: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.ObjectDeleted, handler, { id: targetId }, callback); }); case 14: @@ -9936,6 +10694,8 @@ var OfficeExtension; return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.DocumentSelectionChanged, { handler: handler }, callback); }); case 1: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.settings.removeHandlerAsync(Office.EventType.SettingsChanged, { handler: handler }, callback); }); + case 5: + return OfficeExtension.Utility.promisify(function (callback) { return OSF.DDA.RichApi.richApiMessageManager.removeHandlerAsync("richApiMessage", { handler: handler }, callback); }); case 13: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDeleted, { id: targetId, handler: handler }, callback); }); case 14: @@ -10006,6 +10766,139 @@ var OfficeExtension; OfficeExtension.EventRegistration=EventRegistration; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var GenericEventRegistration=(function () { + function GenericEventRegistration() { + this.m_eventRegistration=new OfficeExtension.EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)); + this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this); + } + GenericEventRegistration.prototype.ready=function () { + var _this=this; + if (!this.m_ready) { + if (GenericEventRegistration._testReadyImpl) { + this.m_ready=GenericEventRegistration._testReadyImpl() + .then(function () { + _this.m_isReady=true; + }); + } + else { + this.m_ready=OfficeExtension._Internal.officeJsEventRegistration.register(5, "", this.m_richApiMessageHandler) + .then(function () { + _this.m_isReady=true; + }); + } + } + return this.m_ready; + }; + Object.defineProperty(GenericEventRegistration.prototype, "isReady", { + get: function () { + return this.m_isReady; + }, + enumerable: true, + configurable: true + }); + GenericEventRegistration.prototype.register=function (eventId, targetId, handler) { + var _this=this; + return this.ready() + .then(function () { return _this.m_eventRegistration.register(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype.unregister=function (eventId, targetId, handler) { + var _this=this; + return this.ready() + .then(function () { return _this.m_eventRegistration.unregister(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype._registerEventImpl=function (eventId, targetId) { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._unregisterEventImpl=function (eventId, targetId) { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._handleRichApiMessage=function (msg) { + if (msg && msg.entries) { + for (var entryIndex=0; entryIndex < msg.entries.length; entryIndex++) { + var entry=msg.entries[entryIndex]; + if (entry.messageCategory==OfficeExtension.Constants.eventMessageCategory) { + if (OfficeExtension.Utility._logEnabled) { + OfficeExtension.Utility.log(JSON.stringify(entry)); + } + var funcs=this.m_eventRegistration.getHandlers(entry.messageType, entry.targetId); + if (funcs.length > 0) { + var arg=JSON.parse(entry.message); + if (entry.isRemoteOverride) { + arg.source=OfficeExtension.Constants.eventSourceRemote; + } + for (var i=0; i < funcs.length; i++) { + funcs[i](arg); + } + } + } + } + } + }; + GenericEventRegistration.getGenericEventRegistration=function () { + if (!GenericEventRegistration.s_genericEventRegistration) { + GenericEventRegistration.s_genericEventRegistration=new GenericEventRegistration(); + } + return GenericEventRegistration.s_genericEventRegistration; + }; + GenericEventRegistration.richApiMessageEventCategory=65536; + return GenericEventRegistration; + }()); + function _testSetRichApiMessageReadyImpl(impl) { + GenericEventRegistration._testReadyImpl=impl; + } + OfficeExtension._testSetRichApiMessageReadyImpl=_testSetRichApiMessageReadyImpl; + function _testTriggerRichApiMessageEvent(msg) { + GenericEventRegistration.getGenericEventRegistration()._handleRichApiMessage(msg); + } + OfficeExtension._testTriggerRichApiMessageEvent=_testTriggerRichApiMessageEvent; + var GenericEventHandlers=(function (_super) { + __extends(GenericEventHandlers, _super); + function GenericEventHandlers(context, parentObject, name, eventInfo) { + _super.call(this, context, parentObject, name, eventInfo); + this.m_genericEventInfo=eventInfo; + } + GenericEventHandlers.prototype.add=function (handler) { + var _this=this; + if ((this._handlers.length==0) && this.m_genericEventInfo.registerFunc) { + this.m_genericEventInfo.registerFunc(); + } + if (!GenericEventRegistration.getGenericEventRegistration().isReady) { + this._context._pendingRequest._addPreSyncPromise(GenericEventRegistration.getGenericEventRegistration().ready()); + } + OfficeExtension.ActionFactory.createTraceMarkerForCallback(this._context, function () { + _this._handlers.push(handler); + if (_this._handlers.length==1) { + GenericEventRegistration.getGenericEventRegistration().register(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + return new OfficeExtension.EventHandlerResult(this._context, this, handler); + }; + GenericEventHandlers.prototype.remove=function (handler) { + var _this=this; + if ((this._handlers.length==1) && this.m_genericEventInfo.unregisterFunc) { + this.m_genericEventInfo.unregisterFunc(); + } + OfficeExtension.ActionFactory.createTraceMarkerForCallback(this._context, function () { + var handlers=_this._handlers; + for (var index=handlers.length - 1; index >=0; index--) { + if (handlers[index]===handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length==0) { + GenericEventRegistration.getGenericEventRegistration().unregister(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + }; + GenericEventHandlers.prototype.removeAll=function () { + }; + return GenericEventHandlers; + }(OfficeExtension.EventHandlers)); + OfficeExtension.GenericEventHandlers=GenericEventHandlers; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var HttpRequestExecutor=(function () { function HttpRequestExecutor() { @@ -10057,15 +10950,6 @@ var OfficeExtension; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { - var _Internal; - (function (_Internal) { - _Internal.OfficeRequire=function () { - if (typeof (require) !=="undefined") { - return require; - } - return null; - }(); - })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); var HttpUtility=(function () { function HttpUtility() { } @@ -10073,7 +10957,7 @@ var OfficeExtension; HttpUtility.s_customSendRequestFunc=func; }; HttpUtility.xhrSendRequestFunc=function (request) { - return new _Internal.OfficePromise(function (resolve, reject) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { var xhr=new XMLHttpRequest(); xhr.open(request.method, request.url); xhr.onload=function () { @@ -10085,7 +10969,7 @@ var OfficeExtension; resolve(resp); }; xhr.onerror=function () { - reject(new _Internal.RuntimeError({ + reject(new OfficeExtension._Internal.RuntimeError({ code: OfficeExtension.ErrorCodes.connectionFailure, message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.connectionFailureWithStatus, xhr.statusText) })); @@ -10098,34 +10982,11 @@ var OfficeExtension; xhr.send(request.body); }); }; - HttpUtility.nodejsRequestModuleSendRequestFunc=function (requestInfo) { - HttpUtility.logRequest(requestInfo); - var fetch=_Internal.OfficeRequire(HttpUtility.NodeJsRequestModuleName); - return fetch(requestInfo.url, { method: requestInfo.method, headers: requestInfo.headers, body: requestInfo.body }) - .then(function (resp) { - return resp.text() - .then(function (body) { - var statusCode=resp.status; - var headers={}; - resp.headers.forEach(function (value, name) { - headers[name]=value; - }); - var ret={ statusCode: statusCode, headers: headers, body: body }; - HttpUtility.logResponse(ret); - return ret; - }); - }); - }; HttpUtility.sendRequest=function (request) { HttpUtility.validateAndNormalizeRequest(request); var func=HttpUtility.s_customSendRequestFunc; if (!func) { - if (typeof (window)==="undefined" || typeof (XMLHttpRequest)==="undefined") { - func=HttpUtility.nodejsRequestModuleSendRequestFunc; - } - else { - func=HttpUtility.xhrSendRequestFunc; - } + func=HttpUtility.xhrSendRequestFunc; } return func(request); }; @@ -10141,7 +11002,7 @@ var OfficeExtension; HttpUtility.officeJsSendLocalDocumentRequestFunc=function (request) { request=OfficeExtension.Utility._validateLocalDocumentRequest(request); var requestSafeArray=OfficeExtension.Utility._buildRequestMessageSafeArray(request); - return new _Internal.OfficePromise(function (resolve, reject) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { OSF.DDA.RichApi.executeRichApiRequestAsync(requestSafeArray, function (asyncResult) { var response; if (asyncResult.status=="succeeded") { @@ -10161,7 +11022,7 @@ var OfficeExtension; }; HttpUtility.validateAndNormalizeRequest=function (request) { if (OfficeExtension.Utility.isNullOrUndefined(request)) { - throw _Internal.RuntimeError._createInvalidArgError({ + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError({ argumentName: "request" }); } @@ -10198,7 +11059,6 @@ var OfficeExtension; } } }; - HttpUtility.NodeJsRequestModuleName="node-fetch"; HttpUtility._logBody=false; return HttpUtility; }()); @@ -10222,6 +11082,146 @@ var OfficeExtension; ; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var HostBridgeRequestExecutor=(function () { + function HostBridgeRequestExecutor(session) { + this.m_session=session; + } + HostBridgeRequestExecutor.prototype.executeAsync=function (customData, requestFlags, requestMessage) { + var httpRequestInfo={ + url: OfficeExtension.Constants.processQuery, + method: "POST", + headers: requestMessage.Headers, + body: requestMessage.Body + }; + var message={ + id: HostBridgeSession.nextId(), + type: 1, + flags: requestFlags, + message: httpRequestInfo + }; + OfficeExtension.Utility.log(JSON.stringify(message)); + return this.m_session.sendMessageToHost(message) + .then(function (nativeBridgeResponse) { + OfficeExtension.Utility.log("Received response: "+JSON.stringify(nativeBridgeResponse)); + var responseInfo=nativeBridgeResponse.message; + var response; + if (responseInfo.statusCode===200) { + response={ ErrorCode: null, ErrorMessage: null, Headers: responseInfo.headers, Body: responseInfo.body }; + } + else { + OfficeExtension.Utility.log("Error Response:"+responseInfo.body); + var error=OfficeExtension.Utility._parseErrorResponse(responseInfo); + response={ + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null + }; + } + return response; + }); + }; + return HostBridgeRequestExecutor; + }()); + var HostBridgeSession=(function (_super) { + __extends(HostBridgeSession, _super); + function HostBridgeSession(bridge) { + var _this=this; + _super.call(this); + this.m_promiseResolver={}; + this.m_bridge=bridge; + this.m_bridge.onMessageFromHost=function (msg) { + _this.onMessageFromHost(msg); + }; + } + HostBridgeSession.prototype._resolveRequestUrlAndHeaderInfo=function () { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + HostBridgeSession.prototype._createRequestExecutorOrNull=function () { + OfficeExtension.Utility.log("NativeBridgeSession::CreateRequestExecutor"); + return new HostBridgeRequestExecutor(this); + }; + Object.defineProperty(HostBridgeSession.prototype, "eventRegistration", { + get: function () { + return OfficeExtension._Internal.officeJsEventRegistration; + }, + enumerable: true, + configurable: true + }); + HostBridgeSession.init=function (bridge) { + if (bridge && typeof (bridge)==="object") { + var session=new HostBridgeSession(bridge); + OfficeExtension.ClientRequestContext._overrideSession=session; + OfficeExtension.HttpUtility.setCustomSendLocalDocumentRequestFunc(function (request) { + var bridgeMessage={ + id: HostBridgeSession.nextId(), + type: 1, + flags: 0, + message: request + }; + return session.sendMessageToHost(bridgeMessage) + .then(function (bridgeResponse) { + var responseInfo=bridgeResponse.message; + return responseInfo; + }); + }); + } + }; + HostBridgeSession.prototype.sendMessageToHost=function (message) { + var _this=this; + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + var ret=new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { + _this.m_promiseResolver[message.id]=resolve; + }); + return ret; + }; + HostBridgeSession.prototype.onMessageFromHost=function (messageText) { + if (messageText==="test") { + if (HostBridgeTest._testFunc) { + HostBridgeTest._testFunc(); + } + } + else { + var message=JSON.parse(messageText); + if (typeof (message.id)==="number") { + var resolve=this.m_promiseResolver[message.id]; + if (resolve) { + resolve(message); + } + delete this.m_promiseResolver[message.id]; + } + } + }; + HostBridgeSession.nextId=function () { + return HostBridgeSession.s_nextId++; + }; + HostBridgeSession.s_nextId=1; + return HostBridgeSession; + }(OfficeExtension.SessionBase)); + var HostBridge=(function () { + function HostBridge() { + } + HostBridge.init=function (bridge) { + HostBridgeSession.init(bridge); + }; + return HostBridge; + }()); + OfficeExtension.HostBridge=HostBridge; + if (typeof (_richApiNativeBridge)==="object" && _richApiNativeBridge) { + HostBridge.init(_richApiNativeBridge); + } + var HostBridgeTest=(function () { + function HostBridgeTest() { + } + HostBridgeTest.setTestFunc=function (func) { + HostBridgeTest._testFunc=func; + }; + return HostBridgeTest; + }()); + OfficeExtension.HostBridgeTest=HostBridgeTest; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var ObjectPath=(function () { function ObjectPath(objectPathInfo, parentObjectPath, isCollection, isInvalidAfterRequest) { @@ -10249,6 +11249,16 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(ObjectPath.prototype, "isRestrictedResourceAccess", { + get: function () { + return this.m_isRestrictedResourceAccess; + }, + set: function (value) { + this.m_isRestrictedResourceAccess=value; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ObjectPath.prototype, "isCollection", { get: function () { return this.m_isCollection; @@ -10335,6 +11345,7 @@ var OfficeExtension; this.m_objectPathInfo.ObjectPathType=6; this.m_objectPathInfo.Name=referenceId; this.m_objectPathInfo.ArgumentInfo={}; + delete this.m_objectPathInfo.ParentObjectPathId; this.m_parentObjectPath=null; this.m_argumentObjectPaths=null; return; @@ -10349,15 +11360,15 @@ var OfficeExtension; if (!OfficeExtension.Utility.isNullOrUndefined(id)) { this.m_isInvalidAfterRequest=false; this.m_isValid=true; - if (parentIsCollection) { - this.m_objectPathInfo.ObjectPathType=5; - this.m_objectPathInfo.Name=""; - } - else { + if (!OfficeExtension.Utility.isNullOrEmptyString(getByIdMethodName)) { this.m_objectPathInfo.ObjectPathType=3; this.m_objectPathInfo.Name=getByIdMethodName; this.m_getByIdMethodName=null; } + else { + this.m_objectPathInfo.ObjectPathType=5; + this.m_objectPathInfo.Name=""; + } this.isWriteOperation=false; this.m_objectPathInfo.ArgumentInfo={}; this.m_objectPathInfo.ArgumentInfo.Arguments=[id]; @@ -10392,18 +11403,22 @@ var OfficeExtension; var objectPathInfo={ Id: context._nextId(), ObjectPathType: 1, Name: "" }; return new OfficeExtension.ObjectPath(objectPathInfo, null, false, false); }; - ObjectPathFactory.createNewObjectObjectPath=function (context, typeName, isCollection) { + ObjectPathFactory.createNewObjectObjectPath=function (context, typeName, isCollection, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 2, Name: typeName }; - return new OfficeExtension.ObjectPath(objectPathInfo, null, isCollection, false); + var ret=new OfficeExtension.ObjectPath(objectPathInfo, null, isCollection, false); + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; }; - ObjectPathFactory.createPropertyObjectPath=function (context, parent, propertyName, isCollection, isInvalidAfterRequest) { + ObjectPathFactory.createPropertyObjectPath=function (context, parent, propertyName, isCollection, isInvalidAfterRequest, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 4, Name: propertyName, ParentObjectPathId: parent._objectPath.objectPathInfo.Id, }; - return new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest); + var ret=new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest); + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; }; ObjectPathFactory.createIndexerObjectPath=function (context, parent, args) { var objectPathInfo={ @@ -10427,7 +11442,7 @@ var OfficeExtension; objectPathInfo.ArgumentInfo.Arguments=args; return new OfficeExtension.ObjectPath(objectPathInfo, parentObjectPath, false, false); }; - ObjectPathFactory.createMethodObjectPath=function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName) { + ObjectPathFactory.createMethodObjectPath=function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 3, @@ -10440,6 +11455,7 @@ var OfficeExtension; ret.argumentObjectPaths=argumentObjectPaths; ret.isWriteOperation=(operationType !=1); ret.getByIdMethodName=getByIdMethodName; + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; return ret; }; ObjectPathFactory.createReferenceIdObjectPath=function (context, referenceId) { @@ -10501,9 +11517,11 @@ var OfficeExtension; var OfficeExtension; (function (OfficeExtension) { var OfficeJsRequestExecutor=(function () { - function OfficeJsRequestExecutor() { + function OfficeJsRequestExecutor(context) { + this.m_context=context; } OfficeJsRequestExecutor.prototype.executeAsync=function (customData, requestFlags, requestMessage) { + var _this=this; var messageSafearray=OfficeExtension.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, OfficeJsRequestExecutor.SourceLibHeaderValue); return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { OSF.DDA.RichApi.executeRichApiRequestAsync(messageSafearray, function (result) { @@ -10515,6 +11533,7 @@ var OfficeExtension; } else { response=OfficeExtension.RichApiMessageUtility.buildResponseOnError(result.error.code, result.error.message); + _this.m_context._processOfficeJsErrorResponse(result.error.code, response); } resolve(response); }); @@ -10527,6 +11546,12 @@ var OfficeExtension; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + var _Internal; + (function (_Internal) { + _Internal.OfficeRequire=function () { + return null; + }(); + })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); var _Internal; (function (_Internal) { var PromiseImpl; @@ -10630,17 +11655,6 @@ var OfficeExtension; } lib$es6$promise$asap$$len=0; } - function lib$es6$promise$asap$$attemptVertex() { - try { - var r=require; - var vertx=r('vertx'); - lib$es6$promise$asap$$vertxNext=vertx.runOnLoop || vertx.runOnContext; - return lib$es6$promise$asap$$useVertxTimer(); - } - catch (e) { - return lib$es6$promise$asap$$useSetTimeout(); - } - } var lib$es6$promise$asap$$scheduleFlush; if (lib$es6$promise$asap$$isNode) { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useNextTick(); @@ -10651,9 +11665,6 @@ var OfficeExtension; else if (lib$es6$promise$asap$$isWorker) { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useMessageChannel(); } - else if (lib$es6$promise$asap$$browserWindow===undefined && typeof require==='function') { - lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$attemptVertex(); - } else { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useSetTimeout(); } @@ -11171,6 +12182,305 @@ var OfficeExtension; OfficeExtension.TrackedObjects=TrackedObjects; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var RequestPrettyPrinter=(function () { + function RequestPrettyPrinter(globalObjName, referencedObjectPaths, actions, showDispose) { + if (!globalObjName) { + globalObjName="root"; + } + this.m_globalObjName=globalObjName; + this.m_referencedObjectPaths=referencedObjectPaths; + this.m_actions=actions; + this.m_statements=[]; + this.m_variableNameForObjectPathMap={}; + this.m_variableNameToObjectPathMap={}; + this.m_declaredObjectPathMap={}; + this.m_showDispose=showDispose; + } + RequestPrettyPrinter.prototype.process=function () { + if (this.m_showDispose) { + OfficeExtension.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + for (var i=0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + } + return this.m_statements; + }; + RequestPrettyPrinter.prototype.processForDebugStatementInfo=function (actionIndex) { + if (this.m_showDispose) { + OfficeExtension.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + var surroundingCount=5; + this.m_statements=[]; + var oneStatement=""; + var statementIndex=-1; + for (var i=0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + if (actionIndex==i) { + statementIndex=this.m_statements.length - 1; + } + if (statementIndex >=0 && this.m_statements.length > statementIndex+surroundingCount+1) { + break; + } + } + if (statementIndex < 0) { + return null; + } + var startIndex=statementIndex - surroundingCount; + if (startIndex < 0) { + startIndex=0; + } + var endIndex=statementIndex+1+surroundingCount; + if (endIndex > this.m_statements.length) { + endIndex=this.m_statements.length; + } + var surroundingStatements=[]; + if (startIndex !=0) { + surroundingStatements.push("..."); + } + for (var i_1=startIndex; i_1 < statementIndex; i_1++) { + surroundingStatements.push(this.m_statements[i_1]); + } + surroundingStatements.push("// >>>>>"); + surroundingStatements.push(this.m_statements[statementIndex]); + surroundingStatements.push("// <<<<<"); + for (var i_2=statementIndex+1; i_2 < endIndex; i_2++) { + surroundingStatements.push(this.m_statements[i_2]); + } + if (endIndex < this.m_statements.length) { + surroundingStatements.push("..."); + } + return { + statement: this.m_statements[statementIndex], + surroundingStatements: surroundingStatements + }; + }; + RequestPrettyPrinter.prototype.processOneAction=function (action) { + var actionInfo=action.actionInfo; + switch (actionInfo.ActionType) { + case 1: + this.processInstantiateAction(action); + break; + case 3: + this.processMethodAction(action); + break; + case 2: + this.processQueryAction(action); + break; + case 7: + this.processQueryAsJsonAction(action); + break; + case 6: + this.processRecursiveQueryAction(action); + break; + case 4: + this.processSetPropertyAction(action); + break; + case 5: + this.processTraceAction(action); + break; + case 8: + this.processEnsureUnchangedAction(action); + break; + } + }; + RequestPrettyPrinter.prototype.processInstantiateAction=function (action) { + var objId=action.actionInfo.ObjectPathId; + var objPath=this.m_referencedObjectPaths[objId]; + var varName=this.getObjVarName(objId); + if (!this.m_declaredObjectPathMap[objId]) { + var statement="var "+varName+"="+this.buildObjectPathExpressionWithParent(objPath)+";"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + this.m_declaredObjectPathMap[objId]=varName; + } + else { + var statement="// Instantiate {"+varName+"}"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + } + }; + RequestPrettyPrinter.prototype.processMethodAction=function (action) { + var methodName=action.actionInfo.Name; + if (methodName==="_KeepReference") { + methodName="track"; + } + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+"."+OfficeExtension.Utility._toCamelLowerCase(methodName)+"("+this.buildArgumentsExpression(action.actionInfo.ArgumentInfo)+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAction=function (action) { + var queryExp=this.buildQueryExpression(action); + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".load("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAsJsonAction=function (action) { + var queryExp=this.buildQueryExpression(action); + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".loadJson("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processRecursiveQueryAction=function (action) { + var queryExp=""; + if (action.actionInfo.RecursiveQueryInfo) { + queryExp=JSON.stringify(action.actionInfo.RecursiveQueryInfo); + } + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".loadRecursive("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processSetPropertyAction=function (action) { + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+"."+OfficeExtension.Utility._toCamelLowerCase(action.actionInfo.Name)+"="+this.buildArgumentsExpression(action.actionInfo.ArgumentInfo)+";"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processTraceAction=function (action) { + var statement="context.trace();"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processEnsureUnchangedAction=function (action) { + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".ensureUnchanged("+JSON.stringify(action.actionInfo.ObjectState)+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.appendDisposeCommentIfRelevant=function (statement, action) { + var _this=this; + if (this.m_showDispose) { + var lastUsedObjectPathIds=action.actionInfo.L; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + var objectNamesToDispose=lastUsedObjectPathIds.map(function (item) { return _this.getObjVarName(item); }).join(", "); + return statement+" // And then dispose {"+objectNamesToDispose+"}"; + } + } + return statement; + }; + RequestPrettyPrinter.prototype.buildQueryExpression=function (action) { + if (action.actionInfo.QueryInfo) { + var option={}; + option.select=action.actionInfo.QueryInfo.Select; + option.expand=action.actionInfo.QueryInfo.Expand; + option.skip=action.actionInfo.QueryInfo.Skip; + option.top=action.actionInfo.QueryInfo.Top; + if (typeof (option.top)==="undefined" && typeof (option.skip)==="undefined" && typeof (option.expand)==="undefined") { + if (typeof (option.select)==="undefined") { + return ""; + } + else { + return JSON.stringify(option.select); + } + } + else { + return JSON.stringify(option); + } + } + return ""; + }; + RequestPrettyPrinter.prototype.buildObjectPathExpressionWithParent=function (objPath) { + var hasParent=objPath.objectPathInfo.ObjectPathType==5 || + objPath.objectPathInfo.ObjectPathType==3 || + objPath.objectPathInfo.ObjectPathType==4; + if (hasParent && objPath.objectPathInfo.ParentObjectPathId) { + return this.getObjVarName(objPath.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(objPath); + } + return this.buildObjectPathExpression(objPath); + }; + RequestPrettyPrinter.prototype.buildObjectPathExpression=function (objPath) { + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + return "context."+this.m_globalObjName; + case 5: + return "getItem("+this.buildArgumentsExpression(objPath.objectPathInfo.ArgumentInfo)+")"; + case 3: + return OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name)+"("+this.buildArgumentsExpression(objPath.objectPathInfo.ArgumentInfo)+")"; + case 2: + return objPath.objectPathInfo.Name+".newObject()"; + case 7: + return "null"; + case 4: + return OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + case 6: + return "context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(objPath.objectPathInfo.Name)+")"; + } + }; + RequestPrettyPrinter.prototype.buildArgumentsExpression=function (args) { + var ret=""; + if (!args.Arguments) { + return ret; + } + for (var i=0; i < args.Arguments.length; i++) { + if (i > 0) { + ret=ret+", "; + } + ret=ret+this.buildArgumentLiteral(args.Arguments[i], args.ReferencedObjectPathIds ? args.ReferencedObjectPathIds[i] : null); + } + if (ret==="undefined") { + ret=""; + } + return ret; + }; + RequestPrettyPrinter.prototype.buildArgumentLiteral=function (value, objectPathId) { + if (typeof value=="number" && value===objectPathId) { + return this.getObjVarName(objectPathId); + } + else { + return JSON.stringify(value); + } + }; + RequestPrettyPrinter.prototype.getObjVarNameBase=function (objectPathId) { + var ret="v"; + var objPath=this.m_referencedObjectPaths[objectPathId]; + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + ret=this.m_globalObjName; + break; + case 4: + ret=OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + break; + case 3: + var methodName=objPath.objectPathInfo.Name; + if (methodName.length > 3 && methodName.substr(0, 3)==="Get") { + methodName=methodName.substr(3); + } + ret=OfficeExtension.Utility._toCamelLowerCase(methodName); + break; + case 5: + var parentName=this.getObjVarNameBase(objPath.objectPathInfo.ParentObjectPathId); + if (parentName.charAt(parentName.length - 1)==="s") { + ret=parentName.substr(0, parentName.length - 1); + } + else { + ret=parentName+"Item"; + } + break; + } + return ret; + }; + RequestPrettyPrinter.prototype.getObjVarName=function (objectPathId) { + if (this.m_variableNameForObjectPathMap[objectPathId]) { + return this.m_variableNameForObjectPathMap[objectPathId]; + } + var ret=this.getObjVarNameBase(objectPathId); + if (!this.m_variableNameToObjectPathMap[ret]) { + this.m_variableNameForObjectPathMap[objectPathId]=ret; + this.m_variableNameToObjectPathMap[ret]=objectPathId; + return ret; + } + var i=1; + while (this.m_variableNameToObjectPathMap[ret+i.toString()]) { + i++; + } + ret=ret+i.toString(); + this.m_variableNameForObjectPathMap[objectPathId]=ret; + this.m_variableNameToObjectPathMap[ret]=objectPathId; + return ret; + }; + return RequestPrettyPrinter; + }()); + OfficeExtension.RequestPrettyPrinter=RequestPrettyPrinter; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var ResourceStrings=(function () { function ResourceStrings() { @@ -11191,6 +12501,14 @@ var OfficeExtension; ResourceStrings.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod"; ResourceStrings.valueNotLoaded="ValueNotLoaded"; ResourceStrings.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage"; + ResourceStrings.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"; + ResourceStrings.customFunctionDefintionMissing="CustomFunctionDefintionMissing"; + ResourceStrings.customFunctionImplementationMissing="CustomFunctionImplementationMissing"; + ResourceStrings.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars"; + ResourceStrings.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit"; + ResourceStrings.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch"; + ResourceStrings.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing"; + ResourceStrings.apiNotFoundDetails="ApiNotFoundDetails"; return ResourceStrings; }()); OfficeExtension.ResourceStrings=ResourceStrings; @@ -11210,7 +12528,15 @@ var OfficeExtension; ResourceStringValues.RunMustReturnPromise="The batch function passed to the \".run\" method didn't return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from \"context.sync()\"."; ResourceStringValues.Timeout="The operation has timed out."; ResourceStringValues.ValueNotLoaded="The value of the result object has not been loaded yet. Before reading the value property, call \"context.sync()\" on the associated request context."; - ResourceStringValues.invalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page."; + ResourceStringValues.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page."; + ResourceStringValues.InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again."; + ResourceStringValues.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions."; + ResourceStringValues.CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function."; + ResourceStringValues.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods."; + ResourceStringValues.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name."; + ResourceStringValues.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it."; + ResourceStringValues.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable."; + ResourceStringValues.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}."; return ResourceStringValues; }()); OfficeExtension.ResourceStringValues=ResourceStringValues; @@ -11504,6 +12830,34 @@ var OfficeExtension; }; Utility.load=function (clientObj, option) { clientObj.context.load(clientObj, option); + return clientObj; + }; + Utility.loadAndSync=function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj.context.sync().then(function () { return clientObj; }); + }; + Utility.retrieve=function (clientObj, option) { + var shouldPolyfill=OfficeExtension._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + if (typeof (window) !=="undefined" && window.Office && window.Office.context && window.Office.context.requirements) { + shouldPolyfill=!window.Office.context.requirements.isSetSupported("RichApiRuntime", "1.1"); + } + } + var result=new OfficeExtension.RetrieveResult(clientObj, shouldPolyfill); + var queryOption=OfficeExtension.ClientRequestContext._parseQueryOption(option); + var action; + if (shouldPolyfill) { + action=OfficeExtension.ActionFactory.createQueryAction(clientObj.context, clientObj, queryOption); + } + else { + action=OfficeExtension.ActionFactory.createQueryAsJsonAction(clientObj.context, clientObj, queryOption); + } + clientObj.context._pendingRequest.addActionResultHandler(action, result); + return result; + }; + Utility.retrieveAndSync=function (clientObj, option) { + var result=Utility.retrieve(clientObj, option); + return clientObj.context.sync().then(function () { return result; }); }; Utility._parseSelectExpand=function (select) { var args=[]; @@ -11524,12 +12878,33 @@ var OfficeExtension; return '*'; } var itemsSlashLength=6; - if (propertyNameLower.substr(0, itemsSlashLength)==="items/") { + var isItemsSlashOrItemsDot=propertyNameLower.substr(0, itemsSlashLength)==="items/" || + propertyNameLower.substr(0, itemsSlashLength)==="items."; + if (isItemsSlashOrItemsDot) { propertyName=propertyName.substr(itemsSlashLength); } - return propertyName.replace(new RegExp("\/items\/", "gi"), "/"); + return propertyName.replace(new RegExp("[\/\.]items[\/\.]", "gi"), "/"); } }; + Utility.toJson=function (clientObj, scalarProperties, navigationProperties, collectionItemsIfAny) { + var result={}; + for (var prop in scalarProperties) { + var value=scalarProperties[prop]; + if (typeof value !=="undefined") { + result[prop]=value; + } + } + for (var prop in navigationProperties) { + var value=navigationProperties[prop]; + if (typeof value !=="undefined") { + result[prop]=value.toJSON(); + } + } + if (collectionItemsIfAny) { + result["items"]=collectionItemsIfAny.map(function (item) { return item.toJSON(); }); + } + return result; + }; Utility.throwError=function (resourceId, arg, errorLocation) { throw new OfficeExtension._Internal.RuntimeError({ code: resourceId, @@ -11590,6 +12965,21 @@ var OfficeExtension; }); } }; + Utility.throwIfApiNotSupported=function (apiFullName, apiSetName, apiSetVersion, hostName) { + if (!Utility._doApiNotSupportedCheck) { + return; + } + if (typeof (window) !=="undefined" && window.Office && window.Office.context) { + if (!window.Office.context.requirements.isSetSupported(apiSetName, apiSetVersion)) { + var message=Utility._getResourceString(OfficeExtension.ResourceStrings.apiNotFoundDetails, [apiFullName, apiSetName+" "+apiSetVersion, hostName]); + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.apiNotFound, + message: message, + debugInfo: { errorLocation: apiFullName } + }); + } + } + }; Utility.getObjectPathExpression=function (objectPath) { var ret=""; while (objectPath) { @@ -11739,7 +13129,10 @@ var OfficeExtension; }; Utility._parseErrorResponse=function (responseInfo) { var errorObj=null; - if (!Utility.isNullOrEmptyString(responseInfo.body)) { + if (Utility.isPlainJsonObject(responseInfo.body)) { + errorObj=responseInfo.body; + } + else if (!Utility.isNullOrEmptyString(responseInfo.body)) { var errorResponseBody=Utility.trim(responseInfo.body); try { errorObj=JSON.parse(errorResponseBody); @@ -11769,8 +13162,24 @@ var OfficeExtension; } } }; + Utility._toCamelLowerCase=function (name) { + if (Utility.isNullOrEmptyString(name)) { + return name; + } + var index=0; + while (index < name.length && name.charCodeAt(index) >=65 && name.charCodeAt(index) <=90) { + index++; + } + if (index < name.length) { + return name.substr(0, index).toLowerCase()+name.substr(index); + } + else { + return name.toLowerCase(); + } + }; Utility._logEnabled=false; Utility._synchronousCleanup=false; + Utility._doApiNotSupportedCheck=false; Utility.s_underscoreCharCode="_".charCodeAt(0); return Utility; }()); @@ -11782,56 +13191,293 @@ var __extends=(this && this.__extends) || function (d, b) { function __() { this.constructor=d; } d.prototype=b===null ? Object.create(b) : (__.prototype=b.prototype, new __()); }; -var Excel; -(function (Excel) { - function lowerCaseFirst(str) { - return str[0].toLowerCase()+str.slice(1); - } - var iconSets=["ThreeArrows", - "ThreeArrowsGray", - "ThreeFlags", - "ThreeTrafficLights1", - "ThreeTrafficLights2", - "ThreeSigns", - "ThreeSymbols", - "ThreeSymbols2", - "FourArrows", - "FourArrowsGray", - "FourRedToBlack", - "FourRating", - "FourTrafficLights", - "FiveArrows", - "FiveArrowsGray", - "FiveRating", - "FiveQuarters", - "ThreeStars", - "ThreeTriangles", - "FiveBoxes"]; - var iconNames=[["RedDownArrow", "YellowSideArrow", "GreenUpArrow"], - ["GrayDownArrow", "GraySideArrow", "GrayUpArrow"], - ["RedFlag", "YellowFlag", "GreenFlag"], - ["RedCircleWithBorder", "YellowCircle", "GreenCircle"], - ["RedTrafficLight", "YellowTrafficLight", "GreenTrafficLight"], - ["RedDiamond", "YellowTriangle", "GreenCircle"], - ["RedCrossSymbol", "YellowExclamationSymbol", "GreenCheckSymbol"], - ["RedCross", "YellowExclamation", "GreenCheck"], - ["RedDownArrow", "YellowDownInclineArrow", "YellowUpInclineArrow", "GreenUpArrow"], - ["GrayDownArrow", "GrayDownInclineArrow", "GrayUpInclineArrow", "GrayUpArrow"], - ["BlackCircle", "GrayCircle", "PinkCircle", "RedCircle"], - ["OneBar", "TwoBars", "ThreeBars", "FourBars"], - ["BlackCircleWithBorder", "RedCircleWithBorder", "YellowCircle", "GreenCircle"], - ["RedDownArrow", "YellowDownInclineArrow", "YellowSideArrow", "YellowUpInclineArrow", "GreenUpArrow"], - ["GrayDownArrow", "GrayDownInclineArrow", "GraySideArrow", "GrayUpInclineArrow", "GrayUpArrow"], - ["NoBars", "OneBar", "TwoBars", "ThreeBars", "FourBars"], - ["WhiteCircleAllWhiteQuarters", "CircleWithThreeWhiteQuarters", "CircleWithTwoWhiteQuarters", "CircleWithOneWhiteQuarter", "BlackCircle"], - ["SilverStar", "HalfGoldStar", "GoldStar"], - ["RedDownTriangle", "YellowDash", "GreenUpTriangle"], - ["NoFilledBoxes", "OneFilledBox", "TwoFilledBoxes", "ThreeFilledBoxes", "FourFilledBoxes"],]; - Excel.icons={}; - iconSets.map(function (title, i) { - var camelTitle=lowerCaseFirst(title); - Excel.icons[camelTitle]=[]; - iconNames[i].map(function (iconName, j) { +var OfficeCore; +(function (OfficeCore) { + var _hostName="OfficeCore"; + var _defaultApiSetName="ExperimentApi"; + var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; + var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; + var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; + var _createNewObjectObjectPath=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath; + var _createChildItemObjectPathUsingIndexer=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer; + var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; + var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; + var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; + var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined=OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; + var _load=OfficeExtension.Utility.load; + var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; + var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; + var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var FlightingService=(function (_super) { + __extends(FlightingService, _super); + function FlightingService() { + _super.apply(this, arguments); + } + Object.defineProperty(FlightingService.prototype, "_className", { + get: function () { + return "FlightingService"; + }, + enumerable: true, + configurable: true + }); + FlightingService.prototype.getClientSessionId=function () { + var action=_createMethodAction(this.context, this, "GetClientSessionId", 1, []); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + FlightingService.prototype.getDeferredFlights=function () { + var action=_createMethodAction(this.context, this, "GetDeferredFlights", 1, []); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + FlightingService.prototype.getFeature=function (featureName, type, defaultValue, possibleValues) { + return new OfficeCore.ABType(this.context, _createMethodObjectPath(this.context, this, "GetFeature", 1, [featureName, type, defaultValue, possibleValues], false, false, null)); + }; + FlightingService.prototype.getFeatureGate=function (featureName, scope) { + return new OfficeCore.ABType(this.context, _createMethodObjectPath(this.context, this, "GetFeatureGate", 1, [featureName, scope], false, false, null)); + }; + FlightingService.prototype.resetOverride=function (featureName) { + _createMethodAction(this.context, this, "ResetOverride", 0, [featureName]); + }; + FlightingService.prototype.setOverride=function (featureName, type, value) { + _createMethodAction(this.context, this, "SetOverride", 0, [featureName, type, value]); + }; + FlightingService.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + FlightingService.newObject=function (context) { + var ret=new OfficeCore.FlightingService(context, _createNewObjectObjectPath(context, "Microsoft.Experiment.FlightingService", false)); + return ret; + }; + FlightingService.prototype.toJSON=function () { + return {}; + }; + return FlightingService; + }(OfficeExtension.ClientObject)); + OfficeCore.FlightingService=FlightingService; + var ABType=(function (_super) { + __extends(ABType, _super); + function ABType() { + _super.apply(this, arguments); + } + Object.defineProperty(ABType.prototype, "_className", { + get: function () { + return "ABType"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ABType.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this.m_value, "ABType", this._isNull); + return this.m_value; + }, + enumerable: true, + configurable: true + }); + ABType.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Value"])) { + this.m_value=obj["Value"]; + } + }; + ABType.prototype.load=function (option) { + _load(this, option); + return this; + }; + ABType.prototype.toJSON=function () { + return { + "value": this.m_value + }; + }; + return ABType; + }(OfficeExtension.ClientObject)); + OfficeCore.ABType=ABType; + var FeatureType; + (function (FeatureType) { + FeatureType.boolean="Boolean"; + FeatureType.integer="Integer"; + FeatureType.string="String"; + })(FeatureType=OfficeCore.FeatureType || (OfficeCore.FeatureType={})); + var ExperimentErrorCodes; + (function (ExperimentErrorCodes) { + ExperimentErrorCodes.generalException="GeneralException"; + })(ExperimentErrorCodes=OfficeCore.ExperimentErrorCodes || (OfficeCore.ExperimentErrorCodes={})); +})(OfficeCore || (OfficeCore={})); +var OfficeCore; +(function (OfficeCore) { + var RequestContext=(function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + _super.call(this, url); + } + Object.defineProperty(RequestContext.prototype, "flighting", { + get: function () { + return this.flightingService; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "telemetry", { + get: function () { + if (!this.m_telemetry) { + this.m_telemetry=OfficeCore.TelemetryService.newObject(this); + } + return this.m_telemetry; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "flightingService", { + get: function () { + if (!this.m_flightingService) { + this.m_flightingService=OfficeCore.FlightingService.newObject(this); + } + return this.m_flightingService; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeExtension.ClientRequestContext)); + OfficeCore.RequestContext=RequestContext; +})(OfficeCore || (OfficeCore={})); +var OfficeCore; +(function (OfficeCore) { + var _hostName="OfficeCore"; + var _defaultApiSetName="TelemetryApi"; + var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; + var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; + var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; + var _createNewObjectObjectPath=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath; + var _createChildItemObjectPathUsingIndexer=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer; + var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; + var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; + var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; + var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined=OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; + var _load=OfficeExtension.Utility.load; + var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; + var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; + var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var _typeTelemetryService="TelemetryService"; + var TelemetryService=(function (_super) { + __extends(TelemetryService, _super); + function TelemetryService() { + _super.apply(this, arguments); + } + Object.defineProperty(TelemetryService.prototype, "_className", { + get: function () { + return "TelemetryService"; + }, + enumerable: true, + configurable: true + }); + TelemetryService.prototype.sendTelemetryEvent=function (telemetryProperties, eventName, eventContract, eventFlags, value) { + _createMethodAction(this.context, this, "SendTelemetryEvent", 1, [telemetryProperties, eventName, eventContract, eventFlags, value], false); + }; + TelemetryService.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + TelemetryService.newObject=function (context) { + var ret=new OfficeCore.TelemetryService(context, _createNewObjectObjectPath(context, "Microsoft.Telemetry.TelemetryService", false, false)); + return ret; + }; + TelemetryService.prototype.toJSON=function () { + return {}; + }; + return TelemetryService; + }(OfficeExtension.ClientObject)); + OfficeCore.TelemetryService=TelemetryService; + var TelemetryErrorCodes; + (function (TelemetryErrorCodes) { + TelemetryErrorCodes.generalException="GeneralException"; + })(TelemetryErrorCodes=OfficeCore.TelemetryErrorCodes || (OfficeCore.TelemetryErrorCodes={})); +})(OfficeCore || (OfficeCore={})); + +var __extends=(this && this.__extends) || (function () { + var extendStatics=Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__=b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p]=b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor=d; } + d.prototype=b===null ? Object.create(b) : (__.prototype=b.prototype, new __()); + }; +})(); +var Excel; +(function (Excel) { + function lowerCaseFirst(str) { + return str[0].toLowerCase()+str.slice(1); + } + var iconSets=["ThreeArrows", + "ThreeArrowsGray", + "ThreeFlags", + "ThreeTrafficLights1", + "ThreeTrafficLights2", + "ThreeSigns", + "ThreeSymbols", + "ThreeSymbols2", + "FourArrows", + "FourArrowsGray", + "FourRedToBlack", + "FourRating", + "FourTrafficLights", + "FiveArrows", + "FiveArrowsGray", + "FiveRating", + "FiveQuarters", + "ThreeStars", + "ThreeTriangles", + "FiveBoxes"]; + var iconNames=[["RedDownArrow", "YellowSideArrow", "GreenUpArrow"], + ["GrayDownArrow", "GraySideArrow", "GrayUpArrow"], + ["RedFlag", "YellowFlag", "GreenFlag"], + ["RedCircleWithBorder", "YellowCircle", "GreenCircle"], + ["RedTrafficLight", "YellowTrafficLight", "GreenTrafficLight"], + ["RedDiamond", "YellowTriangle", "GreenCircle"], + ["RedCrossSymbol", "YellowExclamationSymbol", "GreenCheckSymbol"], + ["RedCross", "YellowExclamation", "GreenCheck"], + ["RedDownArrow", "YellowDownInclineArrow", "YellowUpInclineArrow", "GreenUpArrow"], + ["GrayDownArrow", "GrayDownInclineArrow", "GrayUpInclineArrow", "GrayUpArrow"], + ["BlackCircle", "GrayCircle", "PinkCircle", "RedCircle"], + ["OneBar", "TwoBars", "ThreeBars", "FourBars"], + ["BlackCircleWithBorder", "RedCircleWithBorder", "YellowCircle", "GreenCircle"], + ["RedDownArrow", "YellowDownInclineArrow", "YellowSideArrow", "YellowUpInclineArrow", "GreenUpArrow"], + ["GrayDownArrow", "GrayDownInclineArrow", "GraySideArrow", "GrayUpInclineArrow", "GrayUpArrow"], + ["NoBars", "OneBar", "TwoBars", "ThreeBars", "FourBars"], + ["WhiteCircleAllWhiteQuarters", "CircleWithThreeWhiteQuarters", "CircleWithTwoWhiteQuarters", "CircleWithOneWhiteQuarter", "BlackCircle"], + ["SilverStar", "HalfGoldStar", "GoldStar"], + ["RedDownTriangle", "YellowDash", "GreenUpTriangle"], + ["NoFilledBoxes", "OneFilledBox", "TwoFilledBoxes", "ThreeFilledBoxes", "FourFilledBoxes"],]; + Excel.icons={}; + iconSets.map(function (title, i) { + var camelTitle=lowerCaseFirst(title); + Excel.icons[camelTitle]=[]; + iconNames[i].map(function (iconName, j) { iconName=lowerCaseFirst(iconName); var obj={ set: title, index: j }; Excel.icons[camelTitle].push(obj); @@ -11958,18 +13604,27 @@ var Excel; return _this.m_requestUrlAndHeaderInfo; }); }; - Session.WorkbookSessionIdHeaderName="Workbook-Session-Id"; - Session.WorkbookSessionIdHeaderNameLower="workbook-session-id"; return Session; }()); + Session.WorkbookSessionIdHeaderName="Workbook-Session-Id"; + Session.WorkbookSessionIdHeaderNameLower="workbook-session-id"; Excel.Session=Session; var RequestContext=(function (_super) { __extends(RequestContext, _super); function RequestContext(url) { - _super.call(this, url); - this.m_workbook=new Workbook(this, OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(this)); - this._rootObject=this.m_workbook; + var _this=_super.call(this, url) || this; + _this.m_workbook=new Workbook(_this, OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(_this)); + _this._rootObject=_this.m_workbook; + _this._rootObjectPropertyName="workbook"; + return _this; } + RequestContext.prototype._processOfficeJsErrorResponse=function (officeJsErrorCode, response) { + var ooeInvalidApiCallInContext=5004; + if (officeJsErrorCode==ooeInvalidApiCallInContext) { + response.ErrorCode=ErrorCodes.invalidOperationInCellEditMode; + response.ErrorMessage=OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidOperationInCellEditMode); + } + }; Object.defineProperty(RequestContext.prototype, "workbook", { get: function () { return this.m_workbook; @@ -11985,7 +13640,7 @@ var Excel; configurable: true }); return RequestContext; - }(OfficeExtension.ClientRequestContext)); + }(OfficeCore.RequestContext)); Excel.RequestContext=RequestContext; function run(arg1, arg2, arg3) { return OfficeExtension.ClientRequestContext._runBatch("Excel.run", arguments, function (requestInfo) { @@ -11994,6 +13649,13 @@ var Excel; }); } Excel.run=run; + function runBatch(arg1, arg2) { + return OfficeExtension.ClientRequestContext._runExplicitBatch("Excel.runBatch", arguments, function (requestInfo) { + var ret=new Excel.RequestContext(requestInfo); + return ret; + }); + } + Excel.runBatch=runBatch; Excel._RedirectV1APIs=false; Excel._V1APIMap={ "GetDataAsync": { @@ -12099,7 +13761,7 @@ var Excel; call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingClearFormats(callArgs); } }, "GetFilePropertiesAsync": { - call: function (ctx, callArgs) { return ctx.workbook._V1Api.getFilePropertiesAsync(callArgs); } + call: function (ctx) { return ctx.workbook._V1Api.getFilePropertiesAsync(); } }, }; function postprocessBindingDescriptor(response) { @@ -12124,6 +13786,40 @@ var Excel; data=window.OSF.DDA.DataCoercion.coerceData(data, callArgs[window.Microsoft.Office.WebExtension.Parameters.CoercionType]); return data==undefined ? null : data; } + function versionNumberIsEarlierThan(desiredMajor, desiredMinor, desiredBuild) { + var hasOfficeVersion=typeof (window) !=="undefined" && + window.Office && + window.Office.context && + window.Office.context.diagnostics && + window.Office.context.diagnostics.version; + if (!hasOfficeVersion) { + return false; + } + var version=window.Office.context.diagnostics.version; + var versionExtractor=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/; + var result=versionExtractor.exec(version); + if (result) { + var major=parseInt(result[1]); + var minor=parseInt(result[2]); + var build=parseInt(result[3]); + var revision=parseInt(result[4]); + var devBuild=3000; + if (major < desiredMajor) { + return true; + } + if (major==desiredMajor && minor < desiredMinor) { + return true; + } + if (major==desiredMajor && minor==desiredMinor && build < desiredBuild) { + if (revision < devBuild) { + return true; + } + } + } + return false; + } + var _hostName="Excel"; + var _defaultApiSetName="ExcelApi"; var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; @@ -12132,19 +13828,25 @@ var Excel; var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createEnsureUnchangedAction=OfficeExtension.ActionFactory.createEnsureUnchangedAction; var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; var _isUndefined=OfficeExtension.Utility.isUndefined; var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; var _load=OfficeExtension.Utility.load; + var _retrieve=OfficeExtension.Utility.retrieve; + var _toJson=OfficeExtension.Utility.toJson; var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult=OfficeExtension.Utility.processRetrieveResult; + var _typeApplication="Application"; var Application=(function (_super) { __extends(Application, _super); function Application() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Application.prototype, "_className", { get: function () { @@ -12153,19 +13855,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Application.prototype, "_scalarPropertyNames", { + get: function () { + return ["calculationMode"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(Application.prototype, "calculationMode", { get: function () { - _throwIfNotLoaded("calculationMode", this.m_calculationMode, "Application", this._isNull); - return this.m_calculationMode; + _throwIfNotLoaded("calculationMode", this._C, _typeApplication, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Application.prototype.calculate=function (calculationType) { - _createMethodAction(this.context, this, "Calculate", 0, [calculationType]); + _createMethodAction(this.context, this, "Calculate", 0, [calculationType], false); }; Application.prototype.suspendApiCalculationUntilNextSync=function () { - _createMethodAction(this.context, this, "SuspendApiCalculationUntilNextSync", 0, []); + _throwIfApiNotSupported("Application.suspendApiCalculationUntilNextSync", _defaultApiSetName, "1.6", _hostName); + _createMethodAction(this.context, this, "SuspendApiCalculationUntilNextSync", 0, [], false); }; Application.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12174,25 +13884,36 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["CalculationMode"])) { - this.m_calculationMode=obj["CalculationMode"]; + this._C=obj["CalculationMode"]; } }; Application.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Application.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Application.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; Application.prototype.toJSON=function () { - return { - "calculationMode": this.m_calculationMode - }; + return _toJson(this, { + "calculationMode": this._C, + }, {}); + }; + Application.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Application; }(OfficeExtension.ClientObject)); Excel.Application=Application; + var _typeWorkbook="Workbook"; var Workbook=(function (_super) { __extends(Workbook, _super); function Workbook() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Workbook.prototype, "_className", { get: function () { @@ -12201,132 +13922,155 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Workbook.prototype, "_navigationPropertyNames", { + get: function () { + return ["worksheets", "names", "tables", "application", "bindings", "functions", "_V1Api", "pivotTables", "settings", "customXmlParts", "internalTest"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(Workbook.prototype, "application", { get: function () { - if (!this.m_application) { - this.m_application=new Excel.Application(this.context, _createPropertyObjectPath(this.context, this, "Application", false, false)); + if (!this._A) { + this._A=new Excel.Application(this.context, _createPropertyObjectPath(this.context, this, "Application", false, false, false)); } - return this.m_application; + return this._A; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "bindings", { get: function () { - if (!this.m_bindings) { - this.m_bindings=new Excel.BindingCollection(this.context, _createPropertyObjectPath(this.context, this, "Bindings", true, false)); + if (!this._B) { + this._B=new Excel.BindingCollection(this.context, _createPropertyObjectPath(this.context, this, "Bindings", true, false, false)); } - return this.m_bindings; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "customXmlParts", { get: function () { - if (!this.m_customXmlParts) { - this.m_customXmlParts=new Excel.CustomXmlPartCollection(this.context, _createPropertyObjectPath(this.context, this, "CustomXmlParts", true, false)); + _throwIfApiNotSupported("Workbook.customXmlParts", _defaultApiSetName, "1.5", _hostName); + if (!this._C) { + this._C=new Excel.CustomXmlPartCollection(this.context, _createPropertyObjectPath(this.context, this, "CustomXmlParts", true, false, false)); } - return this.m_customXmlParts; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "functions", { get: function () { - if (!this.m_functions) { - this.m_functions=new Excel.Functions(this.context, _createPropertyObjectPath(this.context, this, "Functions", false, false)); + _throwIfApiNotSupported("Workbook.functions", _defaultApiSetName, "1.2", _hostName); + if (!this._F) { + this._F=new Excel.Functions(this.context, _createPropertyObjectPath(this.context, this, "Functions", false, false, false)); } - return this.m_functions; + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Workbook.prototype, "internalTest", { + get: function () { + _throwIfApiNotSupported("Workbook.internalTest", _defaultApiSetName, "1.6", _hostName); + if (!this._I) { + this._I=new Excel.InternalTest(this.context, _createPropertyObjectPath(this.context, this, "InternalTest", false, false, false)); + } + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "names", { get: function () { - if (!this.m_names) { - this.m_names=new Excel.NamedItemCollection(this.context, _createPropertyObjectPath(this.context, this, "Names", true, false)); + if (!this._N) { + this._N=new Excel.NamedItemCollection(this.context, _createPropertyObjectPath(this.context, this, "Names", true, false, false)); } - return this.m_names; + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "pivotTables", { get: function () { - if (!this.m_pivotTables) { - this.m_pivotTables=new Excel.PivotTableCollection(this.context, _createPropertyObjectPath(this.context, this, "PivotTables", true, false)); + _throwIfApiNotSupported("Workbook.pivotTables", _defaultApiSetName, "1.3", _hostName); + if (!this._P) { + this._P=new Excel.PivotTableCollection(this.context, _createPropertyObjectPath(this.context, this, "PivotTables", true, false, false)); } - return this.m_pivotTables; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "settings", { get: function () { - if (!this.m_settings) { - this.m_settings=new Excel.SettingCollection(this.context, _createPropertyObjectPath(this.context, this, "Settings", true, false)); + _throwIfApiNotSupported("Workbook.settings", _defaultApiSetName, "1.4", _hostName); + if (!this._S) { + this._S=new Excel.SettingCollection(this.context, _createPropertyObjectPath(this.context, this, "Settings", true, false, false)); } - return this.m_settings; + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "tables", { get: function () { - if (!this.m_tables) { - this.m_tables=new Excel.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false)); + if (!this._T) { + this._T=new Excel.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false, false)); } - return this.m_tables; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "worksheets", { get: function () { - if (!this.m_worksheets) { - this.m_worksheets=new Excel.WorksheetCollection(this.context, _createPropertyObjectPath(this.context, this, "Worksheets", true, false)); + if (!this._W) { + this._W=new Excel.WorksheetCollection(this.context, _createPropertyObjectPath(this.context, this, "Worksheets", true, false, false)); } - return this.m_worksheets; + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "_V1Api", { get: function () { - if (!this.m__V1Api) { - this.m__V1Api=new Excel._V1Api(this.context, _createPropertyObjectPath(this.context, this, "_V1Api", false, false)); + _throwIfApiNotSupported("Workbook._V1Api", _defaultApiSetName, "1.3", _hostName); + if (!this.__V) { + this.__V=new Excel._V1Api(this.context, _createPropertyObjectPath(this.context, this, "_V1Api", false, false, false)); } - return this.m__V1Api; + return this.__V; }, enumerable: true, configurable: true }); Workbook.prototype.getSelectedRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetSelectedRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetSelectedRange", 1, [], false, true, null, false)); }; Workbook.prototype._GetObjectByReferenceId=function (bstrReferenceId) { - var action=_createMethodAction(this.context, this, "_GetObjectByReferenceId", 1, [bstrReferenceId]); + var action=_createMethodAction(this.context, this, "_GetObjectByReferenceId", 1, [bstrReferenceId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Workbook.prototype._GetObjectTypeNameByReferenceId=function (bstrReferenceId) { - var action=_createMethodAction(this.context, this, "_GetObjectTypeNameByReferenceId", 1, [bstrReferenceId]); + var action=_createMethodAction(this.context, this, "_GetObjectTypeNameByReferenceId", 1, [bstrReferenceId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Workbook.prototype._GetReferenceCount=function () { - var action=_createMethodAction(this.context, this, "_GetReferenceCount", 1, []); + var action=_createMethodAction(this.context, this, "_GetReferenceCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Workbook.prototype._RemoveAllReferences=function () { - _createMethodAction(this.context, this, "_RemoveAllReferences", 1, []); + _createMethodAction(this.context, this, "_RemoveAllReferences", 1, [], false); }; Workbook.prototype._RemoveReference=function (bstrReferenceId) { - _createMethodAction(this.context, this, "_RemoveReference", 1, [bstrReferenceId]); + _createMethodAction(this.context, this, "_RemoveReference", 1, [bstrReferenceId], false); }; Workbook.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12334,15 +14078,22 @@ var Excel; return; var obj=value; _fixObjectPathIfNecessary(this, obj); - _handleNavigationPropertyResults(this, obj, ["application", "Application", "bindings", "Bindings", "customXmlParts", "CustomXmlParts", "functions", "Functions", "names", "Names", "pivotTables", "PivotTables", "settings", "Settings", "tables", "Tables", "worksheets", "Worksheets", "_V1Api", "_V1Api"]); + _handleNavigationPropertyResults(this, obj, ["application", "Application", "bindings", "Bindings", "customXmlParts", "CustomXmlParts", "functions", "Functions", "internalTest", "InternalTest", "names", "Names", "pivotTables", "PivotTables", "settings", "Settings", "tables", "Tables", "worksheets", "Worksheets", "_V1Api", "_V1Api"]); }; Workbook.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Workbook.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Workbook.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; Object.defineProperty(Workbook.prototype, "onSelectionChanged", { get: function () { var _this=this; + _throwIfApiNotSupported("Workbook.onSelectionChanged", _defaultApiSetName, "1.3", _hostName); if (!this.m_selectionChanged) { this.m_selectionChanged=new OfficeExtension.EventHandlers(this.context, this, "SelectionChanged", { registerFunc: function (handlerCallback) { @@ -12362,15 +14113,28 @@ var Excel; configurable: true }); Workbook.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, { + "bindings": this._B, + "customXmlParts": this._C, + "names": this._N, + "pivotTables": this._P, + "settings": this._S, + "tables": this._T, + "worksheets": this._W, + }); + }; + Workbook.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Workbook; }(OfficeExtension.ClientObject)); Excel.Workbook=Workbook; + var _typeWorksheet="Worksheet"; var Worksheet=(function (_super) { __extends(Worksheet, _super); function Worksheet() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Worksheet.prototype, "_className", { get: function () { @@ -12379,42 +14143,66 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Worksheet.prototype, "_scalarPropertyNames", { + get: function () { + return ["name", "id", "position", "visibility"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Worksheet.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, false, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Worksheet.prototype, "_navigationPropertyNames", { + get: function () { + return ["charts", "tables", "protection", "pivotTables", "names"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(Worksheet.prototype, "charts", { get: function () { - if (!this.m_charts) { - this.m_charts=new Excel.ChartCollection(this.context, _createPropertyObjectPath(this.context, this, "Charts", true, false)); + if (!this._C) { + this._C=new Excel.ChartCollection(this.context, _createPropertyObjectPath(this.context, this, "Charts", true, false, false)); } - return this.m_charts; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Worksheet.prototype, "names", { get: function () { - if (!this.m_names) { - this.m_names=new Excel.NamedItemCollection(this.context, _createPropertyObjectPath(this.context, this, "Names", true, false)); + _throwIfApiNotSupported("Worksheet.names", _defaultApiSetName, "1.4", _hostName); + if (!this._Na) { + this._Na=new Excel.NamedItemCollection(this.context, _createPropertyObjectPath(this.context, this, "Names", true, false, false)); } - return this.m_names; + return this._Na; }, enumerable: true, configurable: true }); Object.defineProperty(Worksheet.prototype, "pivotTables", { get: function () { - if (!this.m_pivotTables) { - this.m_pivotTables=new Excel.PivotTableCollection(this.context, _createPropertyObjectPath(this.context, this, "PivotTables", true, false)); + _throwIfApiNotSupported("Worksheet.pivotTables", _defaultApiSetName, "1.3", _hostName); + if (!this._P) { + this._P=new Excel.PivotTableCollection(this.context, _createPropertyObjectPath(this.context, this, "PivotTables", true, false, false)); } - return this.m_pivotTables; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Worksheet.prototype, "protection", { get: function () { - if (!this.m_protection) { - this.m_protection=new Excel.WorksheetProtection(this.context, _createPropertyObjectPath(this.context, this, "Protection", false, false)); + _throwIfApiNotSupported("Worksheet.protection", _defaultApiSetName, "1.2", _hostName); + if (!this._Pr) { + this._Pr=new Excel.WorksheetProtection(this.context, _createPropertyObjectPath(this.context, this, "Protection", false, false, false)); } - return this.m_protection; + return this._Pr; }, enumerable: true, configurable: true @@ -12422,8 +14210,9 @@ var Excel; Object.defineProperty(Worksheet.prototype, "tables", { get: function () { if (!this.m_tables) { - this.m_tables=new Excel.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false)); + this.m_tables=new Excel.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false, false)); } + this.m_tables._ParentObject=this; return this.m_tables; }, enumerable: true, @@ -12431,19 +14220,19 @@ var Excel; }); Object.defineProperty(Worksheet.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Worksheet", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeWorksheet, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Worksheet.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "Worksheet", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeWorksheet, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -12451,11 +14240,11 @@ var Excel; }); Object.defineProperty(Worksheet.prototype, "position", { get: function () { - _throwIfNotLoaded("position", this.m_position, "Worksheet", this._isNull); - return this.m_position; + _throwIfNotLoaded("position", this._Po, _typeWorksheet, this._isNull); + return this._Po; }, set: function (value) { - this.m_position=value; + this._Po=value; _createSetPropertyAction(this.context, this, "Position", value); }, enumerable: true, @@ -12463,11 +14252,11 @@ var Excel; }); Object.defineProperty(Worksheet.prototype, "visibility", { get: function () { - _throwIfNotLoaded("visibility", this.m_visibility, "Worksheet", this._isNull); - return this.m_visibility; + _throwIfNotLoaded("visibility", this._V, _typeWorksheet, this._isNull); + return this._V; }, set: function (value) { - this.m_visibility=value; + this._V=value; _createSetPropertyAction(this.context, this, "Visibility", value); }, enumerable: true, @@ -12475,10 +14264,6 @@ var Excel; }); Worksheet.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["name", "position", "visibility"], [], [ - "charts", - "names", - "pivotTables", - "tables", "charts", "names", "pivotTables", @@ -12486,38 +14271,47 @@ var Excel; "tables" ]); }; + Worksheet.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; Worksheet.prototype.activate=function () { - _createMethodAction(this.context, this, "Activate", 1, []); + _createMethodAction(this.context, this, "Activate", 1, [], false); }; Worksheet.prototype.calculate=function (markAllDirty) { - _createMethodAction(this.context, this, "Calculate", 0, [markAllDirty]); + _throwIfApiNotSupported("Worksheet.calculate", _defaultApiSetName, "1.6", _hostName); + _createMethodAction(this.context, this, "Calculate", 0, [markAllDirty], false); }; Worksheet.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Worksheet.prototype.getCell=function (row, column) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [row, column], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [row, column], false, true, null, false)); }; Worksheet.prototype.getNext=function (visibleOnly) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [visibleOnly], false, true, null)); + _throwIfApiNotSupported("Worksheet.getNext", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [visibleOnly], false, true, "_GetSheetById", false)); }; Worksheet.prototype.getNextOrNullObject=function (visibleOnly) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [visibleOnly], false, true, null)); + _throwIfApiNotSupported("Worksheet.getNextOrNullObject", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [visibleOnly], false, true, "_GetSheetById", false)); }; Worksheet.prototype.getPrevious=function (visibleOnly) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetPrevious", 1, [visibleOnly], false, true, null)); + _throwIfApiNotSupported("Worksheet.getPrevious", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetPrevious", 1, [visibleOnly], false, true, "_GetSheetById", false)); }; Worksheet.prototype.getPreviousOrNullObject=function (visibleOnly) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetPreviousOrNullObject", 1, [visibleOnly], false, true, null)); + _throwIfApiNotSupported("Worksheet.getPreviousOrNullObject", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetPreviousOrNullObject", 1, [visibleOnly], false, true, "_GetSheetById", false)); }; Worksheet.prototype.getRange=function (address) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [address], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [address], false, true, null, false)); }; Worksheet.prototype.getUsedRange=function (valuesOnly) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRange", 1, [valuesOnly], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRange", 1, [valuesOnly], false, true, null, false)); }; Worksheet.prototype.getUsedRangeOrNullObject=function (valuesOnly) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRangeOrNullObject", 1, [valuesOnly], false, true, null)); + _throwIfApiNotSupported("Worksheet.getUsedRangeOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRangeOrNullObject", 1, [valuesOnly], false, true, null, false)); }; Worksheet.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12526,22 +14320,24 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Position"])) { - this.m_position=obj["Position"]; + this._Po=obj["Position"]; } if (!_isUndefined(obj["Visibility"])) { - this.m_visibility=obj["Visibility"]; + this._V=obj["Visibility"]; } _handleNavigationPropertyResults(this, obj, ["charts", "Charts", "names", "Names", "pivotTables", "PivotTables", "protection", "Protection", "tables", "Tables"]); }; Worksheet.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Worksheet.prototype.retrieve=function (option) { + return _retrieve(this, option); }; Worksheet.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -12549,25 +14345,39 @@ var Excel; return; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; + Worksheet.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; Worksheet.prototype.toJSON=function () { - return { - "id": this.m_id, - "name": this.m_name, - "position": this.m_position, - "protection": this.m_protection, - "visibility": this.m_visibility - }; + return _toJson(this, { + "id": this._I, + "name": this._N, + "position": this._Po, + "visibility": this._V, + }, { + "charts": this._C, + "names": this._Na, + "pivotTables": this._P, + "protection": this._Pr, + "tables": this.m_tables, + }); + }; + Worksheet.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Worksheet; }(OfficeExtension.ClientObject)); Excel.Worksheet=Worksheet; + var _typeWorksheetCollection="WorksheetCollection"; var WorksheetCollection=(function (_super) { __extends(WorksheetCollection, _super); function WorksheetCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(WorksheetCollection.prototype, "_className", { get: function () { @@ -12576,37 +14386,48 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(WorksheetCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(WorksheetCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "WorksheetCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeWorksheetCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); WorksheetCollection.prototype.add=function (name) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [name], false, true, null)); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [name], false, true, null, false)); }; WorksheetCollection.prototype.getActiveWorksheet=function () { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetActiveWorksheet", 1, [], false, false, null)); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetActiveWorksheet", 1, [], false, false, null, false)); }; WorksheetCollection.prototype.getCount=function (visibleOnly) { - var action=_createMethodAction(this.context, this, "GetCount", 1, [visibleOnly]); + _throwIfApiNotSupported("WorksheetCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [visibleOnly], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; WorksheetCollection.prototype.getFirst=function (visibleOnly) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [visibleOnly], false, true, null)); + _throwIfApiNotSupported("WorksheetCollection.getFirst", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [visibleOnly], false, true, null, false)); }; WorksheetCollection.prototype.getItem=function (key) { return new Excel.Worksheet(this.context, _createIndexerObjectPath(this.context, this, [key])); }; WorksheetCollection.prototype.getItemOrNullObject=function (key) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null)); + _throwIfApiNotSupported("WorksheetCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null, false)); }; WorksheetCollection.prototype.getLast=function (visibleOnly) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetLast", 1, [visibleOnly], false, true, null)); + _throwIfApiNotSupported("WorksheetCollection.getLast", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetLast", 1, [visibleOnly], false, true, null, false)); }; WorksheetCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12625,19 +14446,27 @@ var Excel; } }; WorksheetCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + WorksheetCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + WorksheetCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.Worksheet(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; WorksheetCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return WorksheetCollection; }(OfficeExtension.ClientObject)); Excel.WorksheetCollection=WorksheetCollection; + var _typeWorksheetProtection="WorksheetProtection"; var WorksheetProtection=(function (_super) { __extends(WorksheetProtection, _super); function WorksheetProtection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(WorksheetProtection.prototype, "_className", { get: function () { @@ -12646,27 +14475,38 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(WorksheetProtection.prototype, "_scalarPropertyNames", { + get: function () { + return ["protected", "options"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(WorksheetProtection.prototype, "options", { get: function () { - _throwIfNotLoaded("options", this.m_options, "WorksheetProtection", this._isNull); - return this.m_options; + _throwIfNotLoaded("options", this._O, _typeWorksheetProtection, this._isNull); + return this._O; }, enumerable: true, configurable: true }); Object.defineProperty(WorksheetProtection.prototype, "protected", { get: function () { - _throwIfNotLoaded("protected", this.m_protected, "WorksheetProtection", this._isNull); - return this.m_protected; + _throwIfNotLoaded("protected", this._P, _typeWorksheetProtection, this._isNull); + return this._P; }, enumerable: true, configurable: true }); - WorksheetProtection.prototype.protect=function (options) { - _createMethodAction(this.context, this, "Protect", 0, [options]); + WorksheetProtection.prototype.protect=function (options, password) { + if (versionNumberIsEarlierThan(16, 0, 8716)) { + _createMethodAction(this.context, this, "Protect", 0, [options], false); + return; + } + _createMethodAction(this.context, this, "Protect", 0, [options, password], false); }; - WorksheetProtection.prototype.unprotect=function () { - _createMethodAction(this.context, this, "Unprotect", 0, []); + WorksheetProtection.prototype.unprotect=function (password) { + _createMethodAction(this.context, this, "Unprotect", 0, [password], false); }; WorksheetProtection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12675,29 +14515,40 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Options"])) { - this.m_options=obj["Options"]; + this._O=obj["Options"]; } if (!_isUndefined(obj["Protected"])) { - this.m_protected=obj["Protected"]; + this._P=obj["Protected"]; } }; WorksheetProtection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + WorksheetProtection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + WorksheetProtection.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; WorksheetProtection.prototype.toJSON=function () { - return { - "options": this.m_options, - "protected": this.m_protected - }; + return _toJson(this, { + "options": this._O, + "protected": this._P, + }, {}); + }; + WorksheetProtection.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return WorksheetProtection; }(OfficeExtension.ClientObject)); Excel.WorksheetProtection=WorksheetProtection; + var _typeRange="Range"; var Range=(function (_super) { __extends(Range, _super); function Range() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Range.prototype, "_className", { get: function () { @@ -12706,9 +14557,30 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Range.prototype, "_scalarPropertyNames", { + get: function () { + return ["numberFormat", "values", "text", "formulas", "formulasLocal", "rowIndex", "columnIndex", "rowCount", "columnCount", "address", "addressLocal", "cellCount", "_ReferenceId", "valueTypes", "formulasR1C1", "hidden", "rowHidden", "columnHidden"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, false, true, true, false, false, false, false, false, false, false, false, false, true, false, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "_navigationPropertyNames", { + get: function () { + return ["format", "worksheet", "sort", "conditionalFormats"]; + }, + enumerable: true, + configurable: true + }); Range.prototype._ensureInteger=function (num, methodName) { if (!(typeof num==="number" && isFinite(num) && Math.floor(num)===num)) { - throw new OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, num, methodName); + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, num, methodName); } }; Range.prototype._getAdjacentRange=function (functionName, count, referenceRange, rowDirection, columnDirection) { @@ -12734,83 +14606,86 @@ var Excel; }; Object.defineProperty(Range.prototype, "conditionalFormats", { get: function () { - if (!this.m_conditionalFormats) { - this.m_conditionalFormats=new Excel.ConditionalFormatCollection(this.context, _createPropertyObjectPath(this.context, this, "ConditionalFormats", true, false)); + _throwIfApiNotSupported("Range.conditionalFormats", _defaultApiSetName, "1.6", _hostName); + if (!this._Con) { + this._Con=new Excel.ConditionalFormatCollection(this.context, _createPropertyObjectPath(this.context, this, "ConditionalFormats", true, false, false)); } - return this.m_conditionalFormats; + return this._Con; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.RangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.RangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "sort", { get: function () { - if (!this.m_sort) { - this.m_sort=new Excel.RangeSort(this.context, _createPropertyObjectPath(this.context, this, "Sort", false, false)); + _throwIfApiNotSupported("Range.sort", _defaultApiSetName, "1.2", _hostName); + if (!this._S) { + this._S=new Excel.RangeSort(this.context, _createPropertyObjectPath(this.context, this, "Sort", false, false, false)); } - return this.m_sort; + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "worksheet", { get: function () { - if (!this.m_worksheet) { - this.m_worksheet=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false)); + if (!this._W) { + this._W=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false, false)); } - return this.m_worksheet; + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "address", { get: function () { - _throwIfNotLoaded("address", this.m_address, "Range", this._isNull); - return this.m_address; + _throwIfNotLoaded("address", this._A, _typeRange, this._isNull); + return this._A; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "addressLocal", { get: function () { - _throwIfNotLoaded("addressLocal", this.m_addressLocal, "Range", this._isNull); - return this.m_addressLocal; + _throwIfNotLoaded("addressLocal", this._Ad, _typeRange, this._isNull); + return this._Ad; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "cellCount", { get: function () { - _throwIfNotLoaded("cellCount", this.m_cellCount, "Range", this._isNull); - return this.m_cellCount; + _throwIfNotLoaded("cellCount", this._C, _typeRange, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "columnCount", { get: function () { - _throwIfNotLoaded("columnCount", this.m_columnCount, "Range", this._isNull); - return this.m_columnCount; + _throwIfNotLoaded("columnCount", this._Co, _typeRange, this._isNull); + return this._Co; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "columnHidden", { get: function () { - _throwIfNotLoaded("columnHidden", this.m_columnHidden, "Range", this._isNull); - return this.m_columnHidden; + _throwIfNotLoaded("columnHidden", this._Col, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.columnHidden", _defaultApiSetName, "1.2", _hostName); + return this._Col; }, set: function (value) { - this.m_columnHidden=value; + this._Col=value; _createSetPropertyAction(this.context, this, "ColumnHidden", value); }, enumerable: true, @@ -12818,15 +14693,15 @@ var Excel; }); Object.defineProperty(Range.prototype, "columnIndex", { get: function () { - _throwIfNotLoaded("columnIndex", this.m_columnIndex, "Range", this._isNull); - return this.m_columnIndex; + _throwIfNotLoaded("columnIndex", this._Colu, _typeRange, this._isNull); + return this._Colu; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "formulas", { get: function () { - _throwIfNotLoaded("formulas", this.m_formulas, "Range", this._isNull); + _throwIfNotLoaded("formulas", this.m_formulas, _typeRange, this._isNull); return this.m_formulas; }, set: function (value) { @@ -12842,7 +14717,7 @@ var Excel; }); Object.defineProperty(Range.prototype, "formulasLocal", { get: function () { - _throwIfNotLoaded("formulasLocal", this.m_formulasLocal, "Range", this._isNull); + _throwIfNotLoaded("formulasLocal", this.m_formulasLocal, _typeRange, this._isNull); return this.m_formulasLocal; }, set: function (value) { @@ -12858,7 +14733,8 @@ var Excel; }); Object.defineProperty(Range.prototype, "formulasR1C1", { get: function () { - _throwIfNotLoaded("formulasR1C1", this.m_formulasR1C1, "Range", this._isNull); + _throwIfNotLoaded("formulasR1C1", this.m_formulasR1C1, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.formulasR1C1", _defaultApiSetName, "1.2", _hostName); return this.m_formulasR1C1; }, set: function (value) { @@ -12874,15 +14750,16 @@ var Excel; }); Object.defineProperty(Range.prototype, "hidden", { get: function () { - _throwIfNotLoaded("hidden", this.m_hidden, "Range", this._isNull); - return this.m_hidden; + _throwIfNotLoaded("hidden", this._H, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.hidden", _defaultApiSetName, "1.2", _hostName); + return this._H; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "numberFormat", { get: function () { - _throwIfNotLoaded("numberFormat", this.m_numberFormat, "Range", this._isNull); + _throwIfNotLoaded("numberFormat", this.m_numberFormat, _typeRange, this._isNull); return this.m_numberFormat; }, set: function (value) { @@ -12898,19 +14775,20 @@ var Excel; }); Object.defineProperty(Range.prototype, "rowCount", { get: function () { - _throwIfNotLoaded("rowCount", this.m_rowCount, "Range", this._isNull); - return this.m_rowCount; + _throwIfNotLoaded("rowCount", this._R, _typeRange, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "rowHidden", { get: function () { - _throwIfNotLoaded("rowHidden", this.m_rowHidden, "Range", this._isNull); - return this.m_rowHidden; + _throwIfNotLoaded("rowHidden", this._Ro, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.rowHidden", _defaultApiSetName, "1.2", _hostName); + return this._Ro; }, set: function (value) { - this.m_rowHidden=value; + this._Ro=value; _createSetPropertyAction(this.context, this, "RowHidden", value); }, enumerable: true, @@ -12918,31 +14796,31 @@ var Excel; }); Object.defineProperty(Range.prototype, "rowIndex", { get: function () { - _throwIfNotLoaded("rowIndex", this.m_rowIndex, "Range", this._isNull); - return this.m_rowIndex; + _throwIfNotLoaded("rowIndex", this._Row, _typeRange, this._isNull); + return this._Row; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "Range", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._T, _typeRange, this._isNull); + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "valueTypes", { get: function () { - _throwIfNotLoaded("valueTypes", this.m_valueTypes, "Range", this._isNull); - return this.m_valueTypes; + _throwIfNotLoaded("valueTypes", this._V, _typeRange, this._isNull); + return this._V; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "values", { get: function () { - _throwIfNotLoaded("values", this.m_values, "Range", this._isNull); + _throwIfNotLoaded("values", this.m_values, _typeRange, this._isNull); return this.m_values; }, set: function (value) { @@ -12958,39 +14836,40 @@ var Excel; }); Object.defineProperty(Range.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Range", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeRange, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Range.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["numberFormat", "values", "formulas", "formulasLocal", "formulasR1C1", "rowHidden", "columnHidden"], ["format"], [ - "conditionalFormats", - "sort", - "worksheet", "conditionalFormats", "sort", "worksheet" ]); }; + Range.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; Range.prototype.calculate=function () { - _createMethodAction(this.context, this, "Calculate", 0, []); + _throwIfApiNotSupported("Range.calculate", _defaultApiSetName, "1.6", _hostName); + _createMethodAction(this.context, this, "Calculate", 0, [], false); }; Range.prototype.clear=function (applyTo) { - _createMethodAction(this.context, this, "Clear", 0, [applyTo]); + _createMethodAction(this.context, this, "Clear", 0, [applyTo], false); }; Range.prototype.delete=function (shift) { - _createMethodAction(this.context, this, "Delete", 0, [shift]); + _createMethodAction(this.context, this, "Delete", 0, [shift], false); }; Range.prototype.getBoundingRect=function (anotherRange) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetBoundingRect", 1, [anotherRange], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetBoundingRect", 1, [anotherRange], false, true, null, false)); }; Range.prototype.getCell=function (row, column) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [row, column], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [row, column], false, true, null, false)); }; Range.prototype.getColumn=function (column) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumn", 1, [column], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumn", 1, [column], false, true, null, false)); }; Range.prototype.getColumnsAfter=function (count) { if (!isExcel1_3OrAbove()) { @@ -12999,11 +14878,12 @@ var Excel; } this._ensureInteger(count, "RowsAbove"); if (count==0) { - throw new OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); } return this._getAdjacentRange("getColumnsAfter", count, this.getLastColumn(), 0, 1); } - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumnsAfter", 1, [count], false, true, null)); + _throwIfApiNotSupported("Range.getColumnsAfter", _defaultApiSetName, "1.3", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumnsAfter", 1, [count], false, true, null, false)); }; Range.prototype.getColumnsBefore=function (count) { if (!isExcel1_3OrAbove()) { @@ -13012,35 +14892,37 @@ var Excel; } this._ensureInteger(count, "RowsAbove"); if (count==0) { - throw new OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); } return this._getAdjacentRange("getColumnsBefore", count, this.getColumn(0), 0, -1); } - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumnsBefore", 1, [count], false, true, null)); + _throwIfApiNotSupported("Range.getColumnsBefore", _defaultApiSetName, "1.3", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumnsBefore", 1, [count], false, true, null, false)); }; Range.prototype.getEntireColumn=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetEntireColumn", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetEntireColumn", 1, [], false, true, null, false)); }; Range.prototype.getEntireRow=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetEntireRow", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetEntireRow", 1, [], false, true, null, false)); }; Range.prototype.getIntersection=function (anotherRange) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetIntersection", 1, [anotherRange], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetIntersection", 1, [anotherRange], false, true, null, false)); }; Range.prototype.getIntersectionOrNullObject=function (anotherRange) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetIntersectionOrNullObject", 1, [anotherRange], false, true, null)); + _throwIfApiNotSupported("Range.getIntersectionOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetIntersectionOrNullObject", 1, [anotherRange], false, true, null, false)); }; Range.prototype.getLastCell=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastCell", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastCell", 1, [], false, true, null, false)); }; Range.prototype.getLastColumn=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastColumn", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastColumn", 1, [], false, true, null, false)); }; Range.prototype.getLastRow=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastRow", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastRow", 1, [], false, true, null, false)); }; Range.prototype.getOffsetRange=function (rowOffset, columnOffset) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetOffsetRange", 1, [rowOffset, columnOffset], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetOffsetRange", 1, [rowOffset, columnOffset], false, true, null, false)); }; Range.prototype.getResizedRange=function (deltaRows, deltaColumns) { if (!isExcel1_3OrAbove()) { @@ -13049,10 +14931,11 @@ var Excel; var referenceRange=(deltaRows >=0 && deltaColumns >=0) ? this : this.getCell(0, 0); return referenceRange.getBoundingRect(this.getLastCell().getOffsetRange(deltaRows, deltaColumns)); } - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetResizedRange", 1, [deltaRows, deltaColumns], false, true, null)); + _throwIfApiNotSupported("Range.getResizedRange", _defaultApiSetName, "1.3", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetResizedRange", 1, [deltaRows, deltaColumns], false, true, null, false)); }; Range.prototype.getRow=function (row) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRow", 1, [row], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRow", 1, [row], false, true, null, false)); }; Range.prototype.getRowsAbove=function (count) { if (!isExcel1_3OrAbove()) { @@ -13061,11 +14944,12 @@ var Excel; } this._ensureInteger(count, "RowsAbove"); if (count==0) { - throw new OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); } return this._getAdjacentRange("getRowsAbove", count, this.getRow(0), -1, 0); } - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRowsAbove", 1, [count], false, true, null)); + _throwIfApiNotSupported("Range.getRowsAbove", _defaultApiSetName, "1.3", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRowsAbove", 1, [count], false, true, null, false)); }; Range.prototype.getRowsBelow=function (count) { if (!isExcel1_3OrAbove()) { @@ -13074,38 +14958,44 @@ var Excel; } this._ensureInteger(count, "RowsAbove"); if (count==0) { - throw new OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); } return this._getAdjacentRange("getRowsBelow", count, this.getLastRow(), 1, 0); } - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRowsBelow", 1, [count], false, true, null)); + _throwIfApiNotSupported("Range.getRowsBelow", _defaultApiSetName, "1.3", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRowsBelow", 1, [count], false, true, null, false)); }; Range.prototype.getUsedRange=function (valuesOnly) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRange", 1, [valuesOnly], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRange", 1, [valuesOnly], false, true, null, false)); }; Range.prototype.getUsedRangeOrNullObject=function (valuesOnly) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRangeOrNullObject", 1, [valuesOnly], false, true, null)); + _throwIfApiNotSupported("Range.getUsedRangeOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRangeOrNullObject", 1, [valuesOnly], false, true, null, false)); }; Range.prototype.getVisibleView=function () { - return new Excel.RangeView(this.context, _createMethodObjectPath(this.context, this, "GetVisibleView", 1, [], false, false, null)); + _throwIfApiNotSupported("Range.getVisibleView", _defaultApiSetName, "1.3", _hostName); + return new Excel.RangeView(this.context, _createMethodObjectPath(this.context, this, "GetVisibleView", 1, [], false, false, null, false)); }; Range.prototype.insert=function (shift) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "Insert", 0, [shift], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "Insert", 0, [shift], false, true, null, false)); }; Range.prototype.merge=function (across) { - _createMethodAction(this.context, this, "Merge", 0, [across]); + _throwIfApiNotSupported("Range.merge", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "Merge", 0, [across], false); }; Range.prototype.select=function () { - _createMethodAction(this.context, this, "Select", 1, []); + _createMethodAction(this.context, this, "Select", 1, [], false); }; Range.prototype.unmerge=function () { - _createMethodAction(this.context, this, "Unmerge", 0, []); + _throwIfApiNotSupported("Range.unmerge", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "Unmerge", 0, [], false); }; Range.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Range.prototype._ValidateArraySize=function (rows, columns) { - _createMethodAction(this.context, this, "_ValidateArraySize", 1, [rows, columns]); + _throwIfApiNotSupported("Range._ValidateArraySize", _defaultApiSetName, "1.3", _hostName); + _createMethodAction(this.context, this, "_ValidateArraySize", 1, [rows, columns], false); }; Range.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13114,22 +15004,22 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Address"])) { - this.m_address=obj["Address"]; + this._A=obj["Address"]; } if (!_isUndefined(obj["AddressLocal"])) { - this.m_addressLocal=obj["AddressLocal"]; + this._Ad=obj["AddressLocal"]; } if (!_isUndefined(obj["CellCount"])) { - this.m_cellCount=obj["CellCount"]; + this._C=obj["CellCount"]; } if (!_isUndefined(obj["ColumnCount"])) { - this.m_columnCount=obj["ColumnCount"]; + this._Co=obj["ColumnCount"]; } if (!_isUndefined(obj["ColumnHidden"])) { - this.m_columnHidden=obj["ColumnHidden"]; + this._Col=obj["ColumnHidden"]; } if (!_isUndefined(obj["ColumnIndex"])) { - this.m_columnIndex=obj["ColumnIndex"]; + this._Colu=obj["ColumnIndex"]; } if (!_isUndefined(obj["Formulas"])) { this.m_formulas=obj["Formulas"]; @@ -13141,37 +15031,39 @@ var Excel; this.m_formulasR1C1=obj["FormulasR1C1"]; } if (!_isUndefined(obj["Hidden"])) { - this.m_hidden=obj["Hidden"]; + this._H=obj["Hidden"]; } if (!_isUndefined(obj["NumberFormat"])) { this.m_numberFormat=obj["NumberFormat"]; } if (!_isUndefined(obj["RowCount"])) { - this.m_rowCount=obj["RowCount"]; + this._R=obj["RowCount"]; } if (!_isUndefined(obj["RowHidden"])) { - this.m_rowHidden=obj["RowHidden"]; + this._Ro=obj["RowHidden"]; } if (!_isUndefined(obj["RowIndex"])) { - this.m_rowIndex=obj["RowIndex"]; + this._Row=obj["RowIndex"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._T=obj["Text"]; } if (!_isUndefined(obj["ValueTypes"])) { - this.m_valueTypes=obj["ValueTypes"]; + this._V=obj["ValueTypes"]; } if (!_isUndefined(obj["Values"])) { this.m_values=obj["Values"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["conditionalFormats", "ConditionalFormats", "format", "Format", "sort", "Sort", "worksheet", "Worksheet"]); }; Range.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Range.prototype.retrieve=function (option) { + return _retrieve(this, option); }; Range.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -13179,9 +15071,13 @@ var Excel; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; + Range.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; Range.prototype.track=function () { this.context.trackedObjects.add(this); return this; @@ -13191,34 +15087,41 @@ var Excel; return this; }; Range.prototype.toJSON=function () { - return { - "address": this.m_address, - "addressLocal": this.m_addressLocal, - "cellCount": this.m_cellCount, - "columnCount": this.m_columnCount, - "columnHidden": this.m_columnHidden, - "columnIndex": this.m_columnIndex, - "format": this.m_format, + return _toJson(this, { + "address": this._A, + "addressLocal": this._Ad, + "cellCount": this._C, + "columnCount": this._Co, + "columnHidden": this._Col, + "columnIndex": this._Colu, "formulas": this.m_formulas, "formulasLocal": this.m_formulasLocal, "formulasR1C1": this.m_formulasR1C1, - "hidden": this.m_hidden, + "hidden": this._H, "numberFormat": this.m_numberFormat, - "rowCount": this.m_rowCount, - "rowHidden": this.m_rowHidden, - "rowIndex": this.m_rowIndex, - "text": this.m_text, + "rowCount": this._R, + "rowHidden": this._Ro, + "rowIndex": this._Row, + "text": this._T, "values": this.m_values, - "valueTypes": this.m_valueTypes - }; + "valueTypes": this._V, + }, { + "conditionalFormats": this._Con, + "format": this._F, + }); + }; + Range.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Range; }(OfficeExtension.ClientObject)); Excel.Range=Range; + var _typeRangeView="RangeView"; var RangeView=(function (_super) { __extends(RangeView, _super); function RangeView() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeView.prototype, "_className", { get: function () { @@ -13227,39 +15130,60 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeView.prototype, "_scalarPropertyNames", { + get: function () { + return ["numberFormat", "values", "text", "formulas", "formulasLocal", "formulasR1C1", "valueTypes", "rowCount", "columnCount", "cellAddresses", "index"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeView.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, false, true, true, true, false, false, false, false, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeView.prototype, "_navigationPropertyNames", { + get: function () { + return ["rows"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeView.prototype, "rows", { get: function () { - if (!this.m_rows) { - this.m_rows=new Excel.RangeViewCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false)); + if (!this._Ro) { + this._Ro=new Excel.RangeViewCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false, false)); } - return this.m_rows; + return this._Ro; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "cellAddresses", { get: function () { - _throwIfNotLoaded("cellAddresses", this.m_cellAddresses, "RangeView", this._isNull); - return this.m_cellAddresses; + _throwIfNotLoaded("cellAddresses", this._C, _typeRangeView, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "columnCount", { get: function () { - _throwIfNotLoaded("columnCount", this.m_columnCount, "RangeView", this._isNull); - return this.m_columnCount; + _throwIfNotLoaded("columnCount", this._Co, _typeRangeView, this._isNull); + return this._Co; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "formulas", { get: function () { - _throwIfNotLoaded("formulas", this.m_formulas, "RangeView", this._isNull); - return this.m_formulas; + _throwIfNotLoaded("formulas", this._F, _typeRangeView, this._isNull); + return this._F; }, set: function (value) { - this.m_formulas=value; + this._F=value; _createSetPropertyAction(this.context, this, "Formulas", value); }, enumerable: true, @@ -13267,11 +15191,11 @@ var Excel; }); Object.defineProperty(RangeView.prototype, "formulasLocal", { get: function () { - _throwIfNotLoaded("formulasLocal", this.m_formulasLocal, "RangeView", this._isNull); - return this.m_formulasLocal; + _throwIfNotLoaded("formulasLocal", this._Fo, _typeRangeView, this._isNull); + return this._Fo; }, set: function (value) { - this.m_formulasLocal=value; + this._Fo=value; _createSetPropertyAction(this.context, this, "FormulasLocal", value); }, enumerable: true, @@ -13279,11 +15203,11 @@ var Excel; }); Object.defineProperty(RangeView.prototype, "formulasR1C1", { get: function () { - _throwIfNotLoaded("formulasR1C1", this.m_formulasR1C1, "RangeView", this._isNull); - return this.m_formulasR1C1; + _throwIfNotLoaded("formulasR1C1", this._For, _typeRangeView, this._isNull); + return this._For; }, set: function (value) { - this.m_formulasR1C1=value; + this._For=value; _createSetPropertyAction(this.context, this, "FormulasR1C1", value); }, enumerable: true, @@ -13291,19 +15215,19 @@ var Excel; }); Object.defineProperty(RangeView.prototype, "index", { get: function () { - _throwIfNotLoaded("index", this.m_index, "RangeView", this._isNull); - return this.m_index; + _throwIfNotLoaded("index", this._I, _typeRangeView, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "numberFormat", { get: function () { - _throwIfNotLoaded("numberFormat", this.m_numberFormat, "RangeView", this._isNull); - return this.m_numberFormat; + _throwIfNotLoaded("numberFormat", this._N, _typeRangeView, this._isNull); + return this._N; }, set: function (value) { - this.m_numberFormat=value; + this._N=value; _createSetPropertyAction(this.context, this, "NumberFormat", value); }, enumerable: true, @@ -13311,35 +15235,35 @@ var Excel; }); Object.defineProperty(RangeView.prototype, "rowCount", { get: function () { - _throwIfNotLoaded("rowCount", this.m_rowCount, "RangeView", this._isNull); - return this.m_rowCount; + _throwIfNotLoaded("rowCount", this._R, _typeRangeView, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "RangeView", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._T, _typeRangeView, this._isNull); + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "valueTypes", { get: function () { - _throwIfNotLoaded("valueTypes", this.m_valueTypes, "RangeView", this._isNull); - return this.m_valueTypes; + _throwIfNotLoaded("valueTypes", this._Va, _typeRangeView, this._isNull); + return this._Va; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "values", { get: function () { - _throwIfNotLoaded("values", this.m_values, "RangeView", this._isNull); - return this.m_values; + _throwIfNotLoaded("values", this._V, _typeRangeView, this._isNull); + return this._V; }, set: function (value) { - this.m_values=value; + this._V=value; _createSetPropertyAction(this.context, this, "Values", value); }, enumerable: true, @@ -13347,12 +15271,14 @@ var Excel; }); RangeView.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["numberFormat", "values", "formulas", "formulasLocal", "formulasR1C1"], [], [ - "rows", "rows" ]); }; + RangeView.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; RangeView.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); }; RangeView.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13361,66 +15287,79 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["CellAddresses"])) { - this.m_cellAddresses=obj["CellAddresses"]; + this._C=obj["CellAddresses"]; } if (!_isUndefined(obj["ColumnCount"])) { - this.m_columnCount=obj["ColumnCount"]; + this._Co=obj["ColumnCount"]; } if (!_isUndefined(obj["Formulas"])) { - this.m_formulas=obj["Formulas"]; + this._F=obj["Formulas"]; } if (!_isUndefined(obj["FormulasLocal"])) { - this.m_formulasLocal=obj["FormulasLocal"]; + this._Fo=obj["FormulasLocal"]; } if (!_isUndefined(obj["FormulasR1C1"])) { - this.m_formulasR1C1=obj["FormulasR1C1"]; + this._For=obj["FormulasR1C1"]; } if (!_isUndefined(obj["Index"])) { - this.m_index=obj["Index"]; + this._I=obj["Index"]; } if (!_isUndefined(obj["NumberFormat"])) { - this.m_numberFormat=obj["NumberFormat"]; + this._N=obj["NumberFormat"]; } if (!_isUndefined(obj["RowCount"])) { - this.m_rowCount=obj["RowCount"]; + this._R=obj["RowCount"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._T=obj["Text"]; } if (!_isUndefined(obj["ValueTypes"])) { - this.m_valueTypes=obj["ValueTypes"]; + this._Va=obj["ValueTypes"]; } if (!_isUndefined(obj["Values"])) { - this.m_values=obj["Values"]; + this._V=obj["Values"]; } _handleNavigationPropertyResults(this, obj, ["rows", "Rows"]); }; RangeView.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeView.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeView.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; RangeView.prototype.toJSON=function () { - return { - "cellAddresses": this.m_cellAddresses, - "columnCount": this.m_columnCount, - "formulas": this.m_formulas, - "formulasLocal": this.m_formulasLocal, - "formulasR1C1": this.m_formulasR1C1, - "index": this.m_index, - "numberFormat": this.m_numberFormat, - "rowCount": this.m_rowCount, - "text": this.m_text, - "values": this.m_values, - "valueTypes": this.m_valueTypes - }; + return _toJson(this, { + "cellAddresses": this._C, + "columnCount": this._Co, + "formulas": this._F, + "formulasLocal": this._Fo, + "formulasR1C1": this._For, + "index": this._I, + "numberFormat": this._N, + "rowCount": this._R, + "text": this._T, + "values": this._V, + "valueTypes": this._Va, + }, { + "rows": this._Ro, + }); + }; + RangeView.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return RangeView; }(OfficeExtension.ClientObject)); Excel.RangeView=RangeView; + var _typeRangeViewCollection="RangeViewCollection"; var RangeViewCollection=(function (_super) { __extends(RangeViewCollection, _super); function RangeViewCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeViewCollection.prototype, "_className", { get: function () { @@ -13429,22 +15368,30 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeViewCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeViewCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "RangeViewCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeRangeViewCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); RangeViewCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("RangeViewCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; RangeViewCollection.prototype.getItemAt=function (index) { - return new Excel.RangeView(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.RangeView(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; RangeViewCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13463,19 +15410,27 @@ var Excel; } }; RangeViewCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeViewCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeViewCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.RangeView(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(false, _this.context, _this, childItemData, index)); }); }; RangeViewCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return RangeViewCollection; }(OfficeExtension.ClientObject)); Excel.RangeViewCollection=RangeViewCollection; + var _typeSettingCollection="SettingCollection"; var SettingCollection=(function (_super) { __extends(SettingCollection, _super); function SettingCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(SettingCollection.prototype, "_className", { get: function () { @@ -13484,9 +15439,16 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(SettingCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(SettingCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "SettingCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeSettingCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -13494,10 +15456,10 @@ var Excel; }); SettingCollection.prototype.add=function (key, value) { value=Setting._replaceDateWithStringDate(value); - return new Excel.Setting(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [key, value], false, true, null)); + return new Excel.Setting(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [key, value], false, true, null, false)); }; SettingCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -13506,7 +15468,7 @@ var Excel; return new Excel.Setting(this.context, _createIndexerObjectPath(this.context, this, [key])); }; SettingCollection.prototype.getItemOrNullObject=function (key) { - return new Excel.Setting(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null)); + return new Excel.Setting(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null, false)); }; SettingCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13525,8 +15487,15 @@ var Excel; } }; SettingCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + SettingCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + SettingCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.Setting(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; Object.defineProperty(SettingCollection.prototype, "onSettingsChanged", { get: function () { @@ -13550,15 +15519,16 @@ var Excel; configurable: true }); SettingCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return SettingCollection; }(OfficeExtension.ClientObject)); Excel.SettingCollection=SettingCollection; + var _typeSetting="Setting"; var Setting=(function (_super) { __extends(Setting, _super); function Setting() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Setting.prototype, "_className", { get: function () { @@ -13567,6 +15537,20 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Setting.prototype, "_scalarPropertyNames", { + get: function () { + return ["key", "value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Setting.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true]; + }, + enumerable: true, + configurable: true + }); Setting.replaceStringDateWithDate=function (value) { var strValue=JSON.stringify(value); value=JSON.parse(strValue, function dateReviver(k, v) { @@ -13590,15 +15574,15 @@ var Excel; }; Object.defineProperty(Setting.prototype, "key", { get: function () { - _throwIfNotLoaded("key", this.m_key, "Setting", this._isNull); - return this.m_key; + _throwIfNotLoaded("key", this._K, _typeSetting, this._isNull); + return this._K; }, enumerable: true, configurable: true }); Object.defineProperty(Setting.prototype, "value", { get: function () { - _throwIfNotLoaded("value", this.m_value, "Setting", this._isNull); + _throwIfNotLoaded("value", this.m_value, _typeSetting, this._isNull); return this.m_value; }, set: function (value) { @@ -13617,8 +15601,11 @@ var Excel; Setting.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["value"], [], []); }; + Setting.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; Setting.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Setting.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13627,7 +15614,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Key"])) { - this.m_key=obj["Key"]; + this._K=obj["Key"]; } if (!_isUndefined(obj["Value"])) { this.m_value=obj["Value"]; @@ -13635,24 +15622,35 @@ var Excel; } }; Setting.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Setting.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Setting.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; Setting.prototype.toJSON=function () { - return { - "key": this.m_key, - "value": this.m_value - }; + return _toJson(this, { + "key": this._K, + "value": this.m_value, + }, {}); + }; + Setting.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; - Setting.DateJSONPrefix="Date("; - Setting.DateJSONSuffix=")"; return Setting; }(OfficeExtension.ClientObject)); + Setting.DateJSONPrefix="Date("; + Setting.DateJSONSuffix=")"; Excel.Setting=Setting; + var _typeNamedItemCollection="NamedItemCollection"; var NamedItemCollection=(function (_super) { __extends(NamedItemCollection, _super); function NamedItemCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(NamedItemCollection.prototype, "_className", { get: function () { @@ -13661,22 +15659,32 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(NamedItemCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(NamedItemCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "NamedItemCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeNamedItemCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); NamedItemCollection.prototype.add=function (name, reference, comment) { - return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [name, reference, comment], false, true, null)); + _throwIfApiNotSupported("NamedItemCollection.add", _defaultApiSetName, "1.4", _hostName); + return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [name, reference, comment], false, true, null, false)); }; NamedItemCollection.prototype.addFormulaLocal=function (name, formula, comment) { - return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "AddFormulaLocal", 0, [name, formula, comment], false, false, null)); + _throwIfApiNotSupported("NamedItemCollection.addFormulaLocal", _defaultApiSetName, "1.4", _hostName); + return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "AddFormulaLocal", 0, [name, formula, comment], false, false, null, false)); }; NamedItemCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("NamedItemCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -13685,7 +15693,8 @@ var Excel; return new Excel.NamedItem(this.context, _createIndexerObjectPath(this.context, this, [name])); }; NamedItemCollection.prototype.getItemOrNullObject=function (name) { - return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null)); + _throwIfApiNotSupported("NamedItemCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null, false)); }; NamedItemCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13704,19 +15713,27 @@ var Excel; } }; NamedItemCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + NamedItemCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + NamedItemCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.NamedItem(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; NamedItemCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return NamedItemCollection; }(OfficeExtension.ClientObject)); Excel.NamedItemCollection=NamedItemCollection; + var _typeNamedItem="NamedItem"; var NamedItem=(function (_super) { __extends(NamedItem, _super); function NamedItem() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(NamedItem.prototype, "_className", { get: function () { @@ -13725,33 +15742,57 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(NamedItem.prototype, "_scalarPropertyNames", { + get: function () { + return ["name", "type", "value", "visible", "_Id", "comment", "scope"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NamedItem.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, false, false, true, false, true, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NamedItem.prototype, "_navigationPropertyNames", { + get: function () { + return ["worksheet", "worksheetOrNullObject"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(NamedItem.prototype, "worksheet", { get: function () { - if (!this.m_worksheet) { - this.m_worksheet=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false)); + _throwIfApiNotSupported("NamedItem.worksheet", _defaultApiSetName, "1.4", _hostName); + if (!this._W) { + this._W=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false, false)); } - return this.m_worksheet; + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(NamedItem.prototype, "worksheetOrNullObject", { get: function () { - if (!this.m_worksheetOrNullObject) { - this.m_worksheetOrNullObject=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "WorksheetOrNullObject", false, false)); + _throwIfApiNotSupported("NamedItem.worksheetOrNullObject", _defaultApiSetName, "1.4", _hostName); + if (!this._Wo) { + this._Wo=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "WorksheetOrNullObject", false, false, false)); } - return this.m_worksheetOrNullObject; + return this._Wo; }, enumerable: true, configurable: true }); Object.defineProperty(NamedItem.prototype, "comment", { get: function () { - _throwIfNotLoaded("comment", this.m_comment, "NamedItem", this._isNull); - return this.m_comment; + _throwIfNotLoaded("comment", this._C, _typeNamedItem, this._isNull); + _throwIfApiNotSupported("NamedItem.comment", _defaultApiSetName, "1.4", _hostName); + return this._C; }, set: function (value) { - this.m_comment=value; + this._C=value; _createSetPropertyAction(this.context, this, "Comment", value); }, enumerable: true, @@ -13759,43 +15800,44 @@ var Excel; }); Object.defineProperty(NamedItem.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "NamedItem", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeNamedItem, this._isNull); + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(NamedItem.prototype, "scope", { get: function () { - _throwIfNotLoaded("scope", this.m_scope, "NamedItem", this._isNull); - return this.m_scope; + _throwIfNotLoaded("scope", this._S, _typeNamedItem, this._isNull); + _throwIfApiNotSupported("NamedItem.scope", _defaultApiSetName, "1.4", _hostName); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(NamedItem.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "NamedItem", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._T, _typeNamedItem, this._isNull); + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(NamedItem.prototype, "value", { get: function () { - _throwIfNotLoaded("value", this.m_value, "NamedItem", this._isNull); - return this.m_value; + _throwIfNotLoaded("value", this._V, _typeNamedItem, this._isNull); + return this._V; }, enumerable: true, configurable: true }); Object.defineProperty(NamedItem.prototype, "visible", { get: function () { - _throwIfNotLoaded("visible", this.m_visible, "NamedItem", this._isNull); - return this.m_visible; + _throwIfNotLoaded("visible", this._Vi, _typeNamedItem, this._isNull); + return this._Vi; }, set: function (value) { - this.m_visible=value; + this._Vi=value; _createSetPropertyAction(this.context, this, "Visible", value); }, enumerable: true, @@ -13803,28 +15845,31 @@ var Excel; }); Object.defineProperty(NamedItem.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "NamedItem", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeNamedItem, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); NamedItem.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["visible", "comment"], [], [ - "worksheet", - "worksheetOrNullObject", "worksheet", "worksheetOrNullObject" ]); }; + NamedItem.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; NamedItem.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _throwIfApiNotSupported("NamedItem.delete", _defaultApiSetName, "1.4", _hostName); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; NamedItem.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); }; NamedItem.prototype.getRangeOrNullObject=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRangeOrNullObject", 1, [], false, true, null)); + _throwIfApiNotSupported("NamedItem.getRangeOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRangeOrNullObject", 1, [], false, true, null, false)); }; NamedItem.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13833,31 +15878,33 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Comment"])) { - this.m_comment=obj["Comment"]; + this._C=obj["Comment"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Scope"])) { - this.m_scope=obj["Scope"]; + this._S=obj["Scope"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._T=obj["Type"]; } if (!_isUndefined(obj["Value"])) { - this.m_value=obj["Value"]; + this._V=obj["Value"]; } if (!_isUndefined(obj["Visible"])) { - this.m_visible=obj["Visible"]; + this._Vi=obj["Visible"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } _handleNavigationPropertyResults(this, obj, ["worksheet", "Worksheet", "worksheetOrNullObject", "WorksheetOrNullObject"]); }; NamedItem.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + NamedItem.prototype.retrieve=function (option) { + return _retrieve(this, option); }; NamedItem.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -13865,26 +15912,35 @@ var Excel; return; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; + NamedItem.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; NamedItem.prototype.toJSON=function () { - return { - "comment": this.m_comment, - "name": this.m_name, - "scope": this.m_scope, - "type": this.m_type, - "value": this.m_value, - "visible": this.m_visible - }; + return _toJson(this, { + "comment": this._C, + "name": this._N, + "scope": this._S, + "type": this._T, + "value": this._V, + "visible": this._Vi, + }, {}); + }; + NamedItem.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return NamedItem; }(OfficeExtension.ClientObject)); Excel.NamedItem=NamedItem; + var _typeBinding="Binding"; var Binding=(function (_super) { __extends(Binding, _super); function Binding() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Binding.prototype, "_className", { get: function () { @@ -13893,33 +15949,41 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Binding.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "type"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(Binding.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Binding", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeBinding, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Binding.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "Binding", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._T, _typeBinding, this._isNull); + return this._T; }, enumerable: true, configurable: true }); Binding.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _throwIfApiNotSupported("Binding.delete", _defaultApiSetName, "1.3", _hostName); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Binding.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, false, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, false, null, false)); }; Binding.prototype.getTable=function () { - return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetTable", 1, [], false, false, null)); + return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetTable", 1, [], false, false, null, false)); }; Binding.prototype.getText=function () { - var action=_createMethodAction(this.context, this, "GetText", 1, []); + var action=_createMethodAction(this.context, this, "GetText", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -13931,15 +15995,17 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._T=obj["Type"]; } }; Binding.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Binding.prototype.retrieve=function (option) { + return _retrieve(this, option); }; Binding.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -13947,12 +16013,17 @@ var Excel; return; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; + Binding.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; Object.defineProperty(Binding.prototype, "onDataChanged", { get: function () { var _this=this; + _throwIfApiNotSupported("Binding.onDataChanged", _defaultApiSetName, "1.3", _hostName); if (!this.m_dataChanged) { this.m_dataChanged=new OfficeExtension.EventHandlers(this.context, this, "DataChanged", { registerFunc: function (handlerCallback) { @@ -13977,6 +16048,7 @@ var Excel; Object.defineProperty(Binding.prototype, "onSelectionChanged", { get: function () { var _this=this; + _throwIfApiNotSupported("Binding.onSelectionChanged", _defaultApiSetName, "1.3", _hostName); if (!this.m_selectionChanged) { this.m_selectionChanged=new OfficeExtension.EventHandlers(this.context, this, "SelectionChanged", { registerFunc: function (handlerCallback) { @@ -14003,18 +16075,23 @@ var Excel; configurable: true }); Binding.prototype.toJSON=function () { - return { - "id": this.m_id, - "type": this.m_type - }; + return _toJson(this, { + "id": this._I, + "type": this._T, + }, {}); + }; + Binding.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Binding; }(OfficeExtension.ClientObject)); Excel.Binding=Binding; + var _typeBindingCollection="BindingCollection"; var BindingCollection=(function (_super) { __extends(BindingCollection, _super); function BindingCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(BindingCollection.prototype, "_className", { get: function () { @@ -14023,9 +16100,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(BindingCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(BindingCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(BindingCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "BindingCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeBindingCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14033,23 +16124,27 @@ var Excel; }); Object.defineProperty(BindingCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "BindingCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeBindingCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); BindingCollection.prototype.add=function (range, bindingType, id) { - return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [range, bindingType, id], false, true, null)); + _throwIfApiNotSupported("BindingCollection.add", _defaultApiSetName, "1.3", _hostName); + return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [range, bindingType, id], false, true, null, false)); }; BindingCollection.prototype.addFromNamedItem=function (name, bindingType, id) { - return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "AddFromNamedItem", 0, [name, bindingType, id], false, false, null)); + _throwIfApiNotSupported("BindingCollection.addFromNamedItem", _defaultApiSetName, "1.3", _hostName); + return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "AddFromNamedItem", 0, [name, bindingType, id], false, false, null, false)); }; BindingCollection.prototype.addFromSelection=function (bindingType, id) { - return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "AddFromSelection", 0, [bindingType, id], false, false, null)); + _throwIfApiNotSupported("BindingCollection.addFromSelection", _defaultApiSetName, "1.3", _hostName); + return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "AddFromSelection", 0, [bindingType, id], false, false, null, false)); }; BindingCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("BindingCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -14058,10 +16153,11 @@ var Excel; return new Excel.Binding(this.context, _createIndexerObjectPath(this.context, this, [id])); }; BindingCollection.prototype.getItemAt=function (index) { - return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; BindingCollection.prototype.getItemOrNullObject=function (id) { - return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null)); + _throwIfApiNotSupported("BindingCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null, false)); }; BindingCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14070,7 +16166,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14083,21 +16179,29 @@ var Excel; } }; BindingCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + BindingCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + BindingCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.Binding(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; BindingCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return BindingCollection; }(OfficeExtension.ClientObject)); Excel.BindingCollection=BindingCollection; + var _typeTableCollection="TableCollection"; var TableCollection=(function (_super) { __extends(TableCollection, _super); function TableCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableCollection.prototype, "_className", { get: function () { @@ -14106,9 +16210,33 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TableCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableCollection.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject=value; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TableCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14116,17 +16244,18 @@ var Excel; }); Object.defineProperty(TableCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "TableCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeTableCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); TableCollection.prototype.add=function (address, hasHeaders) { - return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [address, hasHeaders], false, true, null)); + return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [address, hasHeaders], false, true, null, false)); }; TableCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("TableCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -14135,10 +16264,11 @@ var Excel; return new Excel.Table(this.context, _createIndexerObjectPath(this.context, this, [key])); }; TableCollection.prototype.getItemAt=function (index) { - return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; TableCollection.prototype.getItemOrNullObject=function (key) { - return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null)); + _throwIfApiNotSupported("TableCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null, false)); }; TableCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14147,7 +16277,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14160,21 +16290,29 @@ var Excel; } }; TableCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.Table(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; TableCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return TableCollection; }(OfficeExtension.ClientObject)); Excel.TableCollection=TableCollection; + var _typeTable="Table"; var Table=(function (_super) { __extends(Table, _super); function Table() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Table.prototype, "_className", { get: function () { @@ -14183,53 +16321,77 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Table.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "name", "showHeaders", "showTotals", "style", "highlightFirstColumn", "highlightLastColumn", "showBandedRows", "showBandedColumns", "showFilterButton"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Table.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, true, true, true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Table.prototype, "_navigationPropertyNames", { + get: function () { + return ["columns", "rows", "sort", "worksheet"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(Table.prototype, "columns", { get: function () { - if (!this.m_columns) { - this.m_columns=new Excel.TableColumnCollection(this.context, _createPropertyObjectPath(this.context, this, "Columns", true, false)); + if (!this._C) { + this._C=new Excel.TableColumnCollection(this.context, _createPropertyObjectPath(this.context, this, "Columns", true, false, false)); } - return this.m_columns; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "rows", { get: function () { - if (!this.m_rows) { - this.m_rows=new Excel.TableRowCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false)); + if (!this._R) { + this._R=new Excel.TableRowCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false, false)); } - return this.m_rows; + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "sort", { get: function () { - if (!this.m_sort) { - this.m_sort=new Excel.TableSort(this.context, _createPropertyObjectPath(this.context, this, "Sort", false, false)); + _throwIfApiNotSupported("Table.sort", _defaultApiSetName, "1.2", _hostName); + if (!this._So) { + this._So=new Excel.TableSort(this.context, _createPropertyObjectPath(this.context, this, "Sort", false, false, false)); } - return this.m_sort; + return this._So; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "worksheet", { get: function () { - if (!this.m_worksheet) { - this.m_worksheet=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false)); + _throwIfApiNotSupported("Table.worksheet", _defaultApiSetName, "1.2", _hostName); + if (!this._W) { + this._W=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false, false)); } - return this.m_worksheet; + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "highlightFirstColumn", { get: function () { - _throwIfNotLoaded("highlightFirstColumn", this.m_highlightFirstColumn, "Table", this._isNull); - return this.m_highlightFirstColumn; + _throwIfNotLoaded("highlightFirstColumn", this._H, _typeTable, this._isNull); + _throwIfApiNotSupported("Table.highlightFirstColumn", _defaultApiSetName, "1.3", _hostName); + return this._H; }, set: function (value) { - this.m_highlightFirstColumn=value; + this._H=value; _createSetPropertyAction(this.context, this, "HighlightFirstColumn", value); }, enumerable: true, @@ -14237,11 +16399,12 @@ var Excel; }); Object.defineProperty(Table.prototype, "highlightLastColumn", { get: function () { - _throwIfNotLoaded("highlightLastColumn", this.m_highlightLastColumn, "Table", this._isNull); - return this.m_highlightLastColumn; + _throwIfNotLoaded("highlightLastColumn", this._Hi, _typeTable, this._isNull); + _throwIfApiNotSupported("Table.highlightLastColumn", _defaultApiSetName, "1.3", _hostName); + return this._Hi; }, set: function (value) { - this.m_highlightLastColumn=value; + this._Hi=value; _createSetPropertyAction(this.context, this, "HighlightLastColumn", value); }, enumerable: true, @@ -14249,19 +16412,19 @@ var Excel; }); Object.defineProperty(Table.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Table", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeTable, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "Table", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeTable, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -14269,11 +16432,12 @@ var Excel; }); Object.defineProperty(Table.prototype, "showBandedColumns", { get: function () { - _throwIfNotLoaded("showBandedColumns", this.m_showBandedColumns, "Table", this._isNull); - return this.m_showBandedColumns; + _throwIfNotLoaded("showBandedColumns", this._S, _typeTable, this._isNull); + _throwIfApiNotSupported("Table.showBandedColumns", _defaultApiSetName, "1.3", _hostName); + return this._S; }, set: function (value) { - this.m_showBandedColumns=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShowBandedColumns", value); }, enumerable: true, @@ -14281,11 +16445,12 @@ var Excel; }); Object.defineProperty(Table.prototype, "showBandedRows", { get: function () { - _throwIfNotLoaded("showBandedRows", this.m_showBandedRows, "Table", this._isNull); - return this.m_showBandedRows; + _throwIfNotLoaded("showBandedRows", this._Sh, _typeTable, this._isNull); + _throwIfApiNotSupported("Table.showBandedRows", _defaultApiSetName, "1.3", _hostName); + return this._Sh; }, set: function (value) { - this.m_showBandedRows=value; + this._Sh=value; _createSetPropertyAction(this.context, this, "ShowBandedRows", value); }, enumerable: true, @@ -14293,11 +16458,12 @@ var Excel; }); Object.defineProperty(Table.prototype, "showFilterButton", { get: function () { - _throwIfNotLoaded("showFilterButton", this.m_showFilterButton, "Table", this._isNull); - return this.m_showFilterButton; + _throwIfNotLoaded("showFilterButton", this._Sho, _typeTable, this._isNull); + _throwIfApiNotSupported("Table.showFilterButton", _defaultApiSetName, "1.3", _hostName); + return this._Sho; }, set: function (value) { - this.m_showFilterButton=value; + this._Sho=value; _createSetPropertyAction(this.context, this, "ShowFilterButton", value); }, enumerable: true, @@ -14305,11 +16471,11 @@ var Excel; }); Object.defineProperty(Table.prototype, "showHeaders", { get: function () { - _throwIfNotLoaded("showHeaders", this.m_showHeaders, "Table", this._isNull); - return this.m_showHeaders; + _throwIfNotLoaded("showHeaders", this._Show, _typeTable, this._isNull); + return this._Show; }, set: function (value) { - this.m_showHeaders=value; + this._Show=value; _createSetPropertyAction(this.context, this, "ShowHeaders", value); }, enumerable: true, @@ -14317,11 +16483,11 @@ var Excel; }); Object.defineProperty(Table.prototype, "showTotals", { get: function () { - _throwIfNotLoaded("showTotals", this.m_showTotals, "Table", this._isNull); - return this.m_showTotals; + _throwIfNotLoaded("showTotals", this._ShowT, _typeTable, this._isNull); + return this._ShowT; }, set: function (value) { - this.m_showTotals=value; + this._ShowT=value; _createSetPropertyAction(this.context, this, "ShowTotals", value); }, enumerable: true, @@ -14329,11 +16495,11 @@ var Excel; }); Object.defineProperty(Table.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "Table", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._St, _typeTable, this._isNull); + return this._St; }, set: function (value) { - this.m_style=value; + this._St=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -14341,39 +16507,41 @@ var Excel; }); Table.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["name", "showHeaders", "showTotals", "style", "highlightFirstColumn", "highlightLastColumn", "showBandedRows", "showBandedColumns", "showFilterButton"], [], [ - "columns", - "rows", - "sort", - "worksheet", "columns", "rows", "sort", "worksheet" ]); }; + Table.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; Table.prototype.clearFilters=function () { - _createMethodAction(this.context, this, "ClearFilters", 0, []); + _throwIfApiNotSupported("Table.clearFilters", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "ClearFilters", 0, [], false); }; Table.prototype.convertToRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "ConvertToRange", 0, [], false, true, null)); + _throwIfApiNotSupported("Table.convertToRange", _defaultApiSetName, "1.2", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "ConvertToRange", 0, [], false, true, null, false)); }; Table.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Table.prototype.getDataBodyRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetDataBodyRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetDataBodyRange", 1, [], false, true, null, false)); }; Table.prototype.getHeaderRowRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetHeaderRowRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetHeaderRowRange", 1, [], false, true, null, false)); }; Table.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); }; Table.prototype.getTotalRowRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetTotalRowRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetTotalRowRange", 1, [], false, true, null, false)); }; Table.prototype.reapplyFilters=function () { - _createMethodAction(this.context, this, "ReapplyFilters", 0, []); + _throwIfApiNotSupported("Table.reapplyFilters", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "ReapplyFilters", 0, [], false); }; Table.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14381,41 +16549,46 @@ var Excel; return; var obj=value; _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + obj["Id"]=obj["Id"].toString(); + } if (!_isUndefined(obj["HighlightFirstColumn"])) { - this.m_highlightFirstColumn=obj["HighlightFirstColumn"]; + this._H=obj["HighlightFirstColumn"]; } if (!_isUndefined(obj["HighlightLastColumn"])) { - this.m_highlightLastColumn=obj["HighlightLastColumn"]; + this._Hi=obj["HighlightLastColumn"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["ShowBandedColumns"])) { - this.m_showBandedColumns=obj["ShowBandedColumns"]; + this._S=obj["ShowBandedColumns"]; } if (!_isUndefined(obj["ShowBandedRows"])) { - this.m_showBandedRows=obj["ShowBandedRows"]; + this._Sh=obj["ShowBandedRows"]; } if (!_isUndefined(obj["ShowFilterButton"])) { - this.m_showFilterButton=obj["ShowFilterButton"]; + this._Sho=obj["ShowFilterButton"]; } if (!_isUndefined(obj["ShowHeaders"])) { - this.m_showHeaders=obj["ShowHeaders"]; + this._Show=obj["ShowHeaders"]; } if (!_isUndefined(obj["ShowTotals"])) { - this.m_showTotals=obj["ShowTotals"]; + this._ShowT=obj["ShowTotals"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._St=obj["Style"]; } _handleNavigationPropertyResults(this, obj, ["columns", "Columns", "rows", "Rows", "sort", "Sort", "worksheet", "Worksheet"]); }; Table.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Table.prototype.retrieve=function (option) { + return _retrieve(this, option); }; Table.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -14423,30 +16596,44 @@ var Excel; return; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + value["Id"]=value["Id"].toString(); + this._I=value["Id"]; } }; + Table.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; Table.prototype.toJSON=function () { - return { - "highlightFirstColumn": this.m_highlightFirstColumn, - "highlightLastColumn": this.m_highlightLastColumn, - "id": this.m_id, - "name": this.m_name, - "showBandedColumns": this.m_showBandedColumns, - "showBandedRows": this.m_showBandedRows, - "showFilterButton": this.m_showFilterButton, - "showHeaders": this.m_showHeaders, - "showTotals": this.m_showTotals, - "style": this.m_style - }; + return _toJson(this, { + "highlightFirstColumn": this._H, + "highlightLastColumn": this._Hi, + "id": this._I, + "name": this._N, + "showBandedColumns": this._S, + "showBandedRows": this._Sh, + "showFilterButton": this._Sho, + "showHeaders": this._Show, + "showTotals": this._ShowT, + "style": this._St, + }, { + "columns": this._C, + "rows": this._R, + "sort": this._So, + }); + }; + Table.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Table; }(OfficeExtension.ClientObject)); Excel.Table=Table; + var _typeTableColumnCollection="TableColumnCollection"; var TableColumnCollection=(function (_super) { __extends(TableColumnCollection, _super); function TableColumnCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableColumnCollection.prototype, "_className", { get: function () { @@ -14455,9 +16642,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TableColumnCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableColumnCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TableColumnCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableColumnCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableColumnCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14465,17 +16666,18 @@ var Excel; }); Object.defineProperty(TableColumnCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "TableColumnCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeTableColumnCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); TableColumnCollection.prototype.add=function (index, values, name) { - return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [index, values, name], false, true, null)); + return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [index, values, name], false, true, null, false)); }; TableColumnCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("TableColumnCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -14484,10 +16686,11 @@ var Excel; return new Excel.TableColumn(this.context, _createIndexerObjectPath(this.context, this, [key])); }; TableColumnCollection.prototype.getItemAt=function (index) { - return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; TableColumnCollection.prototype.getItemOrNullObject=function (key) { - return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null)); + _throwIfApiNotSupported("TableColumnCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null, false)); }; TableColumnCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14496,7 +16699,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14509,21 +16712,29 @@ var Excel; } }; TableColumnCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableColumnCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableColumnCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.TableColumn(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; TableColumnCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return TableColumnCollection; }(OfficeExtension.ClientObject)); Excel.TableColumnCollection=TableColumnCollection; + var _typeTableColumn="TableColumn"; var TableColumn=(function (_super) { __extends(TableColumn, _super); function TableColumn() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableColumn.prototype, "_className", { get: function () { @@ -14532,39 +16743,61 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TableColumn.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "index", "values", "name"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableColumn.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, false, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableColumn.prototype, "_navigationPropertyNames", { + get: function () { + return ["filter"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TableColumn.prototype, "filter", { get: function () { - if (!this.m_filter) { - this.m_filter=new Excel.Filter(this.context, _createPropertyObjectPath(this.context, this, "Filter", false, false)); + _throwIfApiNotSupported("TableColumn.filter", _defaultApiSetName, "1.2", _hostName); + if (!this._F) { + this._F=new Excel.Filter(this.context, _createPropertyObjectPath(this.context, this, "Filter", false, false, false)); } - return this.m_filter; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(TableColumn.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "TableColumn", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeTableColumn, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(TableColumn.prototype, "index", { get: function () { - _throwIfNotLoaded("index", this.m_index, "TableColumn", this._isNull); - return this.m_index; + _throwIfNotLoaded("index", this._In, _typeTableColumn, this._isNull); + return this._In; }, enumerable: true, configurable: true }); Object.defineProperty(TableColumn.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "TableColumn", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeTableColumn, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -14572,11 +16805,11 @@ var Excel; }); Object.defineProperty(TableColumn.prototype, "values", { get: function () { - _throwIfNotLoaded("values", this.m_values, "TableColumn", this._isNull); - return this.m_values; + _throwIfNotLoaded("values", this._V, _typeTableColumn, this._isNull); + return this._V; }, set: function (value) { - this.m_values=value; + this._V=value; _createSetPropertyAction(this.context, this, "Values", value); }, enumerable: true, @@ -14584,24 +16817,26 @@ var Excel; }); TableColumn.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["values", "name"], [], [ - "filter", "filter" ]); }; + TableColumn.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; TableColumn.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; TableColumn.prototype.getDataBodyRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetDataBodyRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetDataBodyRange", 1, [], false, true, null, false)); }; TableColumn.prototype.getHeaderRowRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetHeaderRowRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetHeaderRowRange", 1, [], false, true, null, false)); }; TableColumn.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); }; TableColumn.prototype.getTotalRowRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetTotalRowRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetTotalRowRange", 1, [], false, true, null, false)); }; TableColumn.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14610,22 +16845,24 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Index"])) { - this.m_index=obj["Index"]; + this._In=obj["Index"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Values"])) { - this.m_values=obj["Values"]; + this._V=obj["Values"]; } _handleNavigationPropertyResults(this, obj, ["filter", "Filter"]); }; TableColumn.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableColumn.prototype.retrieve=function (option) { + return _retrieve(this, option); }; TableColumn.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -14633,24 +16870,35 @@ var Excel; return; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; + TableColumn.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; TableColumn.prototype.toJSON=function () { - return { - "id": this.m_id, - "index": this.m_index, - "name": this.m_name, - "values": this.m_values - }; + return _toJson(this, { + "id": this._I, + "index": this._In, + "name": this._N, + "values": this._V, + }, { + "filter": this._F, + }); + }; + TableColumn.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TableColumn; }(OfficeExtension.ClientObject)); Excel.TableColumn=TableColumn; + var _typeTableRowCollection="TableRowCollection"; var TableRowCollection=(function (_super) { __extends(TableRowCollection, _super); function TableRowCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableRowCollection.prototype, "_className", { get: function () { @@ -14659,9 +16907,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TableRowCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableRowCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TableRowCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableRowCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableRowCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14669,23 +16931,24 @@ var Excel; }); Object.defineProperty(TableRowCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "TableRowCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeTableRowCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); TableRowCollection.prototype.add=function (index, values) { - return new Excel.TableRow(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [index, values], false, true, null)); + return new Excel.TableRow(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [index, values], false, true, null, false)); }; TableRowCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("TableRowCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; TableRowCollection.prototype.getItemAt=function (index) { - return new Excel.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; TableRowCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14694,7 +16957,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14707,21 +16970,29 @@ var Excel; } }; TableRowCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableRowCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableRowCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.TableRow(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(false, _this.context, _this, childItemData, index)); }); }; TableRowCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return TableRowCollection; }(OfficeExtension.ClientObject)); Excel.TableRowCollection=TableRowCollection; + var _typeTableRow="TableRow"; var TableRow=(function (_super) { __extends(TableRow, _super); function TableRow() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableRow.prototype, "_className", { get: function () { @@ -14730,21 +17001,35 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TableRow.prototype, "_scalarPropertyNames", { + get: function () { + return ["index", "values"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableRow.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TableRow.prototype, "index", { get: function () { - _throwIfNotLoaded("index", this.m_index, "TableRow", this._isNull); - return this.m_index; + _throwIfNotLoaded("index", this._I, _typeTableRow, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "values", { get: function () { - _throwIfNotLoaded("values", this.m_values, "TableRow", this._isNull); - return this.m_values; + _throwIfNotLoaded("values", this._V, _typeTableRow, this._isNull); + return this._V; }, set: function (value) { - this.m_values=value; + this._V=value; _createSetPropertyAction(this.context, this, "Values", value); }, enumerable: true, @@ -14753,11 +17038,14 @@ var Excel; TableRow.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["values"], [], []); }; + TableRow.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; TableRow.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; TableRow.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); }; TableRow.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14766,29 +17054,40 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Index"])) { - this.m_index=obj["Index"]; + this._I=obj["Index"]; } if (!_isUndefined(obj["Values"])) { - this.m_values=obj["Values"]; + this._V=obj["Values"]; } }; TableRow.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableRow.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableRow.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; TableRow.prototype.toJSON=function () { - return { - "index": this.m_index, - "values": this.m_values - }; + return _toJson(this, { + "index": this._I, + "values": this._V, + }, {}); + }; + TableRow.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TableRow; }(OfficeExtension.ClientObject)); Excel.TableRow=TableRow; + var _typeRangeFormat="RangeFormat"; var RangeFormat=(function (_super) { __extends(RangeFormat, _super); function RangeFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeFormat.prototype, "_className", { get: function () { @@ -14797,53 +17096,76 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["wrapText", "horizontalAlignment", "verticalAlignment", "columnWidth", "rowHeight"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["fill", "font", "borders", "protection"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeFormat.prototype, "borders", { get: function () { - if (!this.m_borders) { - this.m_borders=new Excel.RangeBorderCollection(this.context, _createPropertyObjectPath(this.context, this, "Borders", true, false)); + if (!this._B) { + this._B=new Excel.RangeBorderCollection(this.context, _createPropertyObjectPath(this.context, this, "Borders", true, false, false)); } - return this.m_borders; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(RangeFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.RangeFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.RangeFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(RangeFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.RangeFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Excel.RangeFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true }); Object.defineProperty(RangeFormat.prototype, "protection", { get: function () { - if (!this.m_protection) { - this.m_protection=new Excel.FormatProtection(this.context, _createPropertyObjectPath(this.context, this, "Protection", false, false)); + _throwIfApiNotSupported("RangeFormat.protection", _defaultApiSetName, "1.2", _hostName); + if (!this._P) { + this._P=new Excel.FormatProtection(this.context, _createPropertyObjectPath(this.context, this, "Protection", false, false, false)); } - return this.m_protection; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(RangeFormat.prototype, "columnWidth", { get: function () { - _throwIfNotLoaded("columnWidth", this.m_columnWidth, "RangeFormat", this._isNull); - return this.m_columnWidth; + _throwIfNotLoaded("columnWidth", this._C, _typeRangeFormat, this._isNull); + _throwIfApiNotSupported("RangeFormat.columnWidth", _defaultApiSetName, "1.2", _hostName); + return this._C; }, set: function (value) { - this.m_columnWidth=value; + this._C=value; _createSetPropertyAction(this.context, this, "ColumnWidth", value); }, enumerable: true, @@ -14851,11 +17173,11 @@ var Excel; }); Object.defineProperty(RangeFormat.prototype, "horizontalAlignment", { get: function () { - _throwIfNotLoaded("horizontalAlignment", this.m_horizontalAlignment, "RangeFormat", this._isNull); - return this.m_horizontalAlignment; + _throwIfNotLoaded("horizontalAlignment", this._H, _typeRangeFormat, this._isNull); + return this._H; }, set: function (value) { - this.m_horizontalAlignment=value; + this._H=value; _createSetPropertyAction(this.context, this, "HorizontalAlignment", value); }, enumerable: true, @@ -14863,11 +17185,12 @@ var Excel; }); Object.defineProperty(RangeFormat.prototype, "rowHeight", { get: function () { - _throwIfNotLoaded("rowHeight", this.m_rowHeight, "RangeFormat", this._isNull); - return this.m_rowHeight; + _throwIfNotLoaded("rowHeight", this._R, _typeRangeFormat, this._isNull); + _throwIfApiNotSupported("RangeFormat.rowHeight", _defaultApiSetName, "1.2", _hostName); + return this._R; }, set: function (value) { - this.m_rowHeight=value; + this._R=value; _createSetPropertyAction(this.context, this, "RowHeight", value); }, enumerable: true, @@ -14875,11 +17198,11 @@ var Excel; }); Object.defineProperty(RangeFormat.prototype, "verticalAlignment", { get: function () { - _throwIfNotLoaded("verticalAlignment", this.m_verticalAlignment, "RangeFormat", this._isNull); - return this.m_verticalAlignment; + _throwIfNotLoaded("verticalAlignment", this._V, _typeRangeFormat, this._isNull); + return this._V; }, set: function (value) { - this.m_verticalAlignment=value; + this._V=value; _createSetPropertyAction(this.context, this, "VerticalAlignment", value); }, enumerable: true, @@ -14887,11 +17210,11 @@ var Excel; }); Object.defineProperty(RangeFormat.prototype, "wrapText", { get: function () { - _throwIfNotLoaded("wrapText", this.m_wrapText, "RangeFormat", this._isNull); - return this.m_wrapText; + _throwIfNotLoaded("wrapText", this._W, _typeRangeFormat, this._isNull); + return this._W; }, set: function (value) { - this.m_wrapText=value; + this._W=value; _createSetPropertyAction(this.context, this, "WrapText", value); }, enumerable: true, @@ -14899,15 +17222,19 @@ var Excel; }); RangeFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["wrapText", "horizontalAlignment", "verticalAlignment", "columnWidth", "rowHeight"], ["fill", "font", "protection"], [ - "borders", "borders" ]); }; + RangeFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; RangeFormat.prototype.autofitColumns=function () { - _createMethodAction(this.context, this, "AutofitColumns", 0, []); + _throwIfApiNotSupported("RangeFormat.autofitColumns", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "AutofitColumns", 0, [], false); }; RangeFormat.prototype.autofitRows=function () { - _createMethodAction(this.context, this, "AutofitRows", 0, []); + _throwIfApiNotSupported("RangeFormat.autofitRows", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "AutofitRows", 0, [], false); }; RangeFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14916,45 +17243,58 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["ColumnWidth"])) { - this.m_columnWidth=obj["ColumnWidth"]; + this._C=obj["ColumnWidth"]; } if (!_isUndefined(obj["HorizontalAlignment"])) { - this.m_horizontalAlignment=obj["HorizontalAlignment"]; + this._H=obj["HorizontalAlignment"]; } if (!_isUndefined(obj["RowHeight"])) { - this.m_rowHeight=obj["RowHeight"]; + this._R=obj["RowHeight"]; } if (!_isUndefined(obj["VerticalAlignment"])) { - this.m_verticalAlignment=obj["VerticalAlignment"]; + this._V=obj["VerticalAlignment"]; } if (!_isUndefined(obj["WrapText"])) { - this.m_wrapText=obj["WrapText"]; + this._W=obj["WrapText"]; } _handleNavigationPropertyResults(this, obj, ["borders", "Borders", "fill", "Fill", "font", "Font", "protection", "Protection"]); }; RangeFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; RangeFormat.prototype.toJSON=function () { - return { - "columnWidth": this.m_columnWidth, - "fill": this.m_fill, - "font": this.m_font, - "horizontalAlignment": this.m_horizontalAlignment, - "protection": this.m_protection, - "rowHeight": this.m_rowHeight, - "verticalAlignment": this.m_verticalAlignment, - "wrapText": this.m_wrapText - }; + return _toJson(this, { + "columnWidth": this._C, + "horizontalAlignment": this._H, + "rowHeight": this._R, + "verticalAlignment": this._V, + "wrapText": this._W, + }, { + "borders": this._B, + "fill": this._F, + "font": this._Fo, + "protection": this._P, + }); + }; + RangeFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return RangeFormat; }(OfficeExtension.ClientObject)); Excel.RangeFormat=RangeFormat; + var _typeFormatProtection="FormatProtection"; var FormatProtection=(function (_super) { __extends(FormatProtection, _super); function FormatProtection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(FormatProtection.prototype, "_className", { get: function () { @@ -14963,13 +17303,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(FormatProtection.prototype, "_scalarPropertyNames", { + get: function () { + return ["locked", "formulaHidden"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FormatProtection.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(FormatProtection.prototype, "formulaHidden", { get: function () { - _throwIfNotLoaded("formulaHidden", this.m_formulaHidden, "FormatProtection", this._isNull); - return this.m_formulaHidden; + _throwIfNotLoaded("formulaHidden", this._F, _typeFormatProtection, this._isNull); + return this._F; }, set: function (value) { - this.m_formulaHidden=value; + this._F=value; _createSetPropertyAction(this.context, this, "FormulaHidden", value); }, enumerable: true, @@ -14977,11 +17331,11 @@ var Excel; }); Object.defineProperty(FormatProtection.prototype, "locked", { get: function () { - _throwIfNotLoaded("locked", this.m_locked, "FormatProtection", this._isNull); - return this.m_locked; + _throwIfNotLoaded("locked", this._L, _typeFormatProtection, this._isNull); + return this._L; }, set: function (value) { - this.m_locked=value; + this._L=value; _createSetPropertyAction(this.context, this, "Locked", value); }, enumerable: true, @@ -14990,6 +17344,9 @@ var Excel; FormatProtection.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["locked", "formulaHidden"], [], []); }; + FormatProtection.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; FormatProtection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -14997,29 +17354,40 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["FormulaHidden"])) { - this.m_formulaHidden=obj["FormulaHidden"]; + this._F=obj["FormulaHidden"]; } if (!_isUndefined(obj["Locked"])) { - this.m_locked=obj["Locked"]; + this._L=obj["Locked"]; } }; FormatProtection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + FormatProtection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + FormatProtection.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; FormatProtection.prototype.toJSON=function () { - return { - "formulaHidden": this.m_formulaHidden, - "locked": this.m_locked - }; + return _toJson(this, { + "formulaHidden": this._F, + "locked": this._L, + }, {}); + }; + FormatProtection.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return FormatProtection; }(OfficeExtension.ClientObject)); Excel.FormatProtection=FormatProtection; + var _typeRangeFill="RangeFill"; var RangeFill=(function (_super) { __extends(RangeFill, _super); function RangeFill() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeFill.prototype, "_className", { get: function () { @@ -15028,13 +17396,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeFill.prototype, "_scalarPropertyNames", { + get: function () { + return ["color"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFill.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeFill.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "RangeFill", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeRangeFill, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -15043,8 +17425,11 @@ var Excel; RangeFill.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["color"], [], []); }; + RangeFill.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; RangeFill.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; RangeFill.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15053,25 +17438,36 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } }; RangeFill.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeFill.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeFill.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; RangeFill.prototype.toJSON=function () { - return { - "color": this.m_color - }; + return _toJson(this, { + "color": this._C, + }, {}); + }; + RangeFill.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return RangeFill; }(OfficeExtension.ClientObject)); Excel.RangeFill=RangeFill; + var _typeRangeBorder="RangeBorder"; var RangeBorder=(function (_super) { __extends(RangeBorder, _super); function RangeBorder() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeBorder.prototype, "_className", { get: function () { @@ -15080,13 +17476,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeBorder.prototype, "_scalarPropertyNames", { + get: function () { + return ["sideIndex", "style", "weight", "color"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeBorder.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeBorder.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "RangeBorder", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeRangeBorder, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -15094,19 +17504,19 @@ var Excel; }); Object.defineProperty(RangeBorder.prototype, "sideIndex", { get: function () { - _throwIfNotLoaded("sideIndex", this.m_sideIndex, "RangeBorder", this._isNull); - return this.m_sideIndex; + _throwIfNotLoaded("sideIndex", this._S, _typeRangeBorder, this._isNull); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(RangeBorder.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "RangeBorder", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._St, _typeRangeBorder, this._isNull); + return this._St; }, set: function (value) { - this.m_style=value; + this._St=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -15114,11 +17524,11 @@ var Excel; }); Object.defineProperty(RangeBorder.prototype, "weight", { get: function () { - _throwIfNotLoaded("weight", this.m_weight, "RangeBorder", this._isNull); - return this.m_weight; + _throwIfNotLoaded("weight", this._W, _typeRangeBorder, this._isNull); + return this._W; }, set: function (value) { - this.m_weight=value; + this._W=value; _createSetPropertyAction(this.context, this, "Weight", value); }, enumerable: true, @@ -15127,6 +17537,9 @@ var Excel; RangeBorder.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["style", "weight", "color"], [], []); }; + RangeBorder.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; RangeBorder.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -15134,37 +17547,48 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["SideIndex"])) { - this.m_sideIndex=obj["SideIndex"]; + this._S=obj["SideIndex"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._St=obj["Style"]; } if (!_isUndefined(obj["Weight"])) { - this.m_weight=obj["Weight"]; + this._W=obj["Weight"]; } }; RangeBorder.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeBorder.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeBorder.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; RangeBorder.prototype.toJSON=function () { - return { - "color": this.m_color, - "sideIndex": this.m_sideIndex, - "style": this.m_style, - "weight": this.m_weight - }; + return _toJson(this, { + "color": this._C, + "sideIndex": this._S, + "style": this._St, + "weight": this._W, + }, {}); + }; + RangeBorder.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return RangeBorder; }(OfficeExtension.ClientObject)); Excel.RangeBorder=RangeBorder; + var _typeRangeBorderCollection="RangeBorderCollection"; var RangeBorderCollection=(function (_super) { __extends(RangeBorderCollection, _super); function RangeBorderCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeBorderCollection.prototype, "_className", { get: function () { @@ -15173,9 +17597,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeBorderCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeBorderCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeBorderCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "RangeBorderCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeRangeBorderCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15183,8 +17621,8 @@ var Excel; }); Object.defineProperty(RangeBorderCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "RangeBorderCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeRangeBorderCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true @@ -15193,7 +17631,7 @@ var Excel; return new Excel.RangeBorder(this.context, _createIndexerObjectPath(this.context, this, [index])); }; RangeBorderCollection.prototype.getItemAt=function (index) { - return new Excel.RangeBorder(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.RangeBorder(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; RangeBorderCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15202,7 +17640,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15215,21 +17653,29 @@ var Excel; } }; RangeBorderCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeBorderCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeBorderCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.RangeBorder(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; RangeBorderCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return RangeBorderCollection; }(OfficeExtension.ClientObject)); Excel.RangeBorderCollection=RangeBorderCollection; + var _typeRangeFont="RangeFont"; var RangeFont=(function (_super) { __extends(RangeFont, _super); function RangeFont() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeFont.prototype, "_className", { get: function () { @@ -15238,13 +17684,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeFont.prototype, "_scalarPropertyNames", { + get: function () { + return ["name", "size", "color", "italic", "bold", "underline"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFont.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeFont.prototype, "bold", { get: function () { - _throwIfNotLoaded("bold", this.m_bold, "RangeFont", this._isNull); - return this.m_bold; + _throwIfNotLoaded("bold", this._B, _typeRangeFont, this._isNull); + return this._B; }, set: function (value) { - this.m_bold=value; + this._B=value; _createSetPropertyAction(this.context, this, "Bold", value); }, enumerable: true, @@ -15252,11 +17712,11 @@ var Excel; }); Object.defineProperty(RangeFont.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "RangeFont", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeRangeFont, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -15264,11 +17724,11 @@ var Excel; }); Object.defineProperty(RangeFont.prototype, "italic", { get: function () { - _throwIfNotLoaded("italic", this.m_italic, "RangeFont", this._isNull); - return this.m_italic; + _throwIfNotLoaded("italic", this._I, _typeRangeFont, this._isNull); + return this._I; }, set: function (value) { - this.m_italic=value; + this._I=value; _createSetPropertyAction(this.context, this, "Italic", value); }, enumerable: true, @@ -15276,11 +17736,11 @@ var Excel; }); Object.defineProperty(RangeFont.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "RangeFont", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeRangeFont, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -15288,11 +17748,11 @@ var Excel; }); Object.defineProperty(RangeFont.prototype, "size", { get: function () { - _throwIfNotLoaded("size", this.m_size, "RangeFont", this._isNull); - return this.m_size; + _throwIfNotLoaded("size", this._S, _typeRangeFont, this._isNull); + return this._S; }, set: function (value) { - this.m_size=value; + this._S=value; _createSetPropertyAction(this.context, this, "Size", value); }, enumerable: true, @@ -15300,11 +17760,11 @@ var Excel; }); Object.defineProperty(RangeFont.prototype, "underline", { get: function () { - _throwIfNotLoaded("underline", this.m_underline, "RangeFont", this._isNull); - return this.m_underline; + _throwIfNotLoaded("underline", this._U, _typeRangeFont, this._isNull); + return this._U; }, set: function (value) { - this.m_underline=value; + this._U=value; _createSetPropertyAction(this.context, this, "Underline", value); }, enumerable: true, @@ -15313,6 +17773,9 @@ var Excel; RangeFont.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["name", "size", "color", "italic", "bold", "underline"], [], []); }; + RangeFont.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; RangeFont.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -15320,45 +17783,56 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Bold"])) { - this.m_bold=obj["Bold"]; + this._B=obj["Bold"]; } if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["Italic"])) { - this.m_italic=obj["Italic"]; + this._I=obj["Italic"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Size"])) { - this.m_size=obj["Size"]; + this._S=obj["Size"]; } if (!_isUndefined(obj["Underline"])) { - this.m_underline=obj["Underline"]; + this._U=obj["Underline"]; } }; RangeFont.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeFont.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeFont.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; RangeFont.prototype.toJSON=function () { - return { - "bold": this.m_bold, - "color": this.m_color, - "italic": this.m_italic, - "name": this.m_name, - "size": this.m_size, - "underline": this.m_underline - }; + return _toJson(this, { + "bold": this._B, + "color": this._C, + "italic": this._I, + "name": this._N, + "size": this._S, + "underline": this._U, + }, {}); + }; + RangeFont.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return RangeFont; }(OfficeExtension.ClientObject)); Excel.RangeFont=RangeFont; + var _typeChartCollection="ChartCollection"; var ChartCollection=(function (_super) { __extends(ChartCollection, _super); function ChartCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartCollection.prototype, "_className", { get: function () { @@ -15367,9 +17841,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ChartCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeChartCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15377,8 +17865,8 @@ var Excel; }); Object.defineProperty(ChartCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "ChartCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeChartCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true @@ -15387,22 +17875,24 @@ var Excel; if (!(sourceData instanceof Range)) { throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument, "sourceData", "Charts.Add"); } - return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [type, sourceData, seriesBy], false, true, null)); + return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [type, sourceData, seriesBy], false, true, null, false)); }; ChartCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("ChartCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; ChartCollection.prototype.getItem=function (name) { - return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItem", 1, [name], false, false, null)); + return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItem", 1, [name], false, false, null, false)); }; ChartCollection.prototype.getItemAt=function (index) { - return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; ChartCollection.prototype.getItemOrNullObject=function (name) { - return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null)); + _throwIfApiNotSupported("ChartCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null, false)); }; ChartCollection.prototype._GetItem=function (key) { return new Excel.Chart(this.context, _createIndexerObjectPath(this.context, this, [key])); @@ -15414,7 +17904,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15427,106 +17917,136 @@ var Excel; } }; ChartCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.Chart(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; ChartCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return ChartCollection; }(OfficeExtension.ClientObject)); Excel.ChartCollection=ChartCollection; + var _typeChart="Chart"; var Chart=(function (_super) { __extends(Chart, _super); function Chart() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Chart.prototype, "_className", { get: function () { - return "Chart"; + return "Chart"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Chart.prototype, "_scalarPropertyNames", { + get: function () { + return ["name", "top", "left", "width", "height"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Chart.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Chart.prototype, "_navigationPropertyNames", { + get: function () { + return ["title", "dataLabels", "legend", "series", "axes", "format", "worksheet"]; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "axes", { get: function () { - if (!this.m_axes) { - this.m_axes=new Excel.ChartAxes(this.context, _createPropertyObjectPath(this.context, this, "Axes", false, false)); + if (!this._A) { + this._A=new Excel.ChartAxes(this.context, _createPropertyObjectPath(this.context, this, "Axes", false, false, false)); } - return this.m_axes; + return this._A; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "dataLabels", { get: function () { - if (!this.m_dataLabels) { - this.m_dataLabels=new Excel.ChartDataLabels(this.context, _createPropertyObjectPath(this.context, this, "DataLabels", false, false)); + if (!this._D) { + this._D=new Excel.ChartDataLabels(this.context, _createPropertyObjectPath(this.context, this, "DataLabels", false, false, false)); } - return this.m_dataLabels; + return this._D; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartAreaFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartAreaFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "legend", { get: function () { - if (!this.m_legend) { - this.m_legend=new Excel.ChartLegend(this.context, _createPropertyObjectPath(this.context, this, "Legend", false, false)); + if (!this._Le) { + this._Le=new Excel.ChartLegend(this.context, _createPropertyObjectPath(this.context, this, "Legend", false, false, false)); } - return this.m_legend; + return this._Le; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "series", { get: function () { - if (!this.m_series) { - this.m_series=new Excel.ChartSeriesCollection(this.context, _createPropertyObjectPath(this.context, this, "Series", true, false)); + if (!this._S) { + this._S=new Excel.ChartSeriesCollection(this.context, _createPropertyObjectPath(this.context, this, "Series", true, false, false)); } - return this.m_series; + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "title", { get: function () { - if (!this.m_title) { - this.m_title=new Excel.ChartTitle(this.context, _createPropertyObjectPath(this.context, this, "Title", false, false)); + if (!this._T) { + this._T=new Excel.ChartTitle(this.context, _createPropertyObjectPath(this.context, this, "Title", false, false, false)); } - return this.m_title; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "worksheet", { get: function () { - if (!this.m_worksheet) { - this.m_worksheet=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false)); + _throwIfApiNotSupported("Chart.worksheet", _defaultApiSetName, "1.2", _hostName); + if (!this._Wo) { + this._Wo=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false, false)); } - return this.m_worksheet; + return this._Wo; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "height", { get: function () { - _throwIfNotLoaded("height", this.m_height, "Chart", this._isNull); - return this.m_height; + _throwIfNotLoaded("height", this._H, _typeChart, this._isNull); + return this._H; }, set: function (value) { - this.m_height=value; + this._H=value; _createSetPropertyAction(this.context, this, "Height", value); }, enumerable: true, @@ -15534,11 +18054,11 @@ var Excel; }); Object.defineProperty(Chart.prototype, "left", { get: function () { - _throwIfNotLoaded("left", this.m_left, "Chart", this._isNull); - return this.m_left; + _throwIfNotLoaded("left", this._L, _typeChart, this._isNull); + return this._L; }, set: function (value) { - this.m_left=value; + this._L=value; _createSetPropertyAction(this.context, this, "Left", value); }, enumerable: true, @@ -15546,11 +18066,11 @@ var Excel; }); Object.defineProperty(Chart.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "Chart", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeChart, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -15558,11 +18078,11 @@ var Excel; }); Object.defineProperty(Chart.prototype, "top", { get: function () { - _throwIfNotLoaded("top", this.m_top, "Chart", this._isNull); - return this.m_top; + _throwIfNotLoaded("top", this._To, _typeChart, this._isNull); + return this._To; }, set: function (value) { - this.m_top=value; + this._To=value; _createSetPropertyAction(this.context, this, "Top", value); }, enumerable: true, @@ -15570,11 +18090,11 @@ var Excel; }); Object.defineProperty(Chart.prototype, "width", { get: function () { - _throwIfNotLoaded("width", this.m_width, "Chart", this._isNull); - return this.m_width; + _throwIfNotLoaded("width", this._W, _typeChart, this._isNull); + return this._W; }, set: function (value) { - this.m_width=value; + this._W=value; _createSetPropertyAction(this.context, this, "Width", value); }, enumerable: true, @@ -15582,17 +18102,19 @@ var Excel; }); Chart.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["name", "top", "left", "width", "height"], ["title", "dataLabels", "legend", "axes", "format"], [ - "series", - "worksheet", "series", "worksheet" ]); }; + Chart.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; Chart.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Chart.prototype.getImage=function (width, height, fittingMode) { - var action=_createMethodAction(this.context, this, "GetImage", 1, [width, height, fittingMode]); + _throwIfApiNotSupported("Chart.getImage", _defaultApiSetName, "1.2", _hostName); + var action=_createMethodAction(this.context, this, "GetImage", 1, [width, height, fittingMode], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -15601,10 +18123,10 @@ var Excel; if (!(sourceData instanceof Range)) { throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument, "sourceData", "Chart.setData"); } - _createMethodAction(this.context, this, "SetData", 0, [sourceData, seriesBy]); + _createMethodAction(this.context, this, "SetData", 0, [sourceData, seriesBy], false); }; Chart.prototype.setPosition=function (startCell, endCell) { - _createMethodAction(this.context, this, "SetPosition", 0, [startCell, endCell]); + _createMethodAction(this.context, this, "SetPosition", 0, [startCell, endCell], false); }; Chart.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15613,47 +18135,60 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Height"])) { - this.m_height=obj["Height"]; + this._H=obj["Height"]; } if (!_isUndefined(obj["Left"])) { - this.m_left=obj["Left"]; + this._L=obj["Left"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Top"])) { - this.m_top=obj["Top"]; + this._To=obj["Top"]; } if (!_isUndefined(obj["Width"])) { - this.m_width=obj["Width"]; + this._W=obj["Width"]; } _handleNavigationPropertyResults(this, obj, ["axes", "Axes", "dataLabels", "DataLabels", "format", "Format", "legend", "Legend", "series", "Series", "title", "Title", "worksheet", "Worksheet"]); }; Chart.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Chart.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Chart.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; Chart.prototype.toJSON=function () { - return { - "axes": this.m_axes, - "dataLabels": this.m_dataLabels, - "format": this.m_format, - "height": this.m_height, - "left": this.m_left, - "legend": this.m_legend, - "name": this.m_name, - "title": this.m_title, - "top": this.m_top, - "width": this.m_width - }; + return _toJson(this, { + "height": this._H, + "left": this._L, + "name": this._N, + "top": this._To, + "width": this._W, + }, { + "axes": this._A, + "dataLabels": this._D, + "format": this._F, + "legend": this._Le, + "series": this._S, + "title": this._T, + }); + }; + Chart.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Chart; }(OfficeExtension.ClientObject)); Excel.Chart=Chart; + var _typeChartAreaFormat="ChartAreaFormat"; var ChartAreaFormat=(function (_super) { __extends(ChartAreaFormat, _super); function ChartAreaFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartAreaFormat.prototype, "_className", { get: function () { @@ -15662,22 +18197,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartAreaFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["fill", "font"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartAreaFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAreaFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true @@ -15687,6 +18229,9 @@ var Excel; "fill" ]); }; + ChartAreaFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartAreaFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -15696,22 +18241,32 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["fill", "Fill", "font", "Font"]); }; ChartAreaFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartAreaFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAreaFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartAreaFormat.prototype.toJSON=function () { - return { - "fill": this.m_fill, - "font": this.m_font - }; + return _toJson(this, {}, { + "font": this._Fo, + }); + }; + ChartAreaFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartAreaFormat; }(OfficeExtension.ClientObject)); Excel.ChartAreaFormat=ChartAreaFormat; + var _typeChartSeriesCollection="ChartSeriesCollection"; var ChartSeriesCollection=(function (_super) { __extends(ChartSeriesCollection, _super); function ChartSeriesCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartSeriesCollection.prototype, "_className", { get: function () { @@ -15720,9 +18275,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartSeriesCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartSeriesCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartSeriesCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ChartSeriesCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeChartSeriesCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15730,20 +18299,21 @@ var Excel; }); Object.defineProperty(ChartSeriesCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "ChartSeriesCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeChartSeriesCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); ChartSeriesCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("ChartSeriesCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; ChartSeriesCollection.prototype.getItemAt=function (index) { - return new Excel.ChartSeries(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.ChartSeries(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; ChartSeriesCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15752,7 +18322,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15765,21 +18335,29 @@ var Excel; } }; ChartSeriesCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartSeriesCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartSeriesCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.ChartSeries(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(false, _this.context, _this, childItemData, index)); }); }; ChartSeriesCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return ChartSeriesCollection; }(OfficeExtension.ClientObject)); Excel.ChartSeriesCollection=ChartSeriesCollection; + var _typeChartSeries="ChartSeries"; var ChartSeries=(function (_super) { __extends(ChartSeries, _super); function ChartSeries() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartSeries.prototype, "_className", { get: function () { @@ -15788,33 +18366,54 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartSeries.prototype, "_scalarPropertyNames", { + get: function () { + return ["name"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartSeries.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartSeries.prototype, "_navigationPropertyNames", { + get: function () { + return ["points", "format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartSeries.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartSeriesFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartSeriesFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartSeries.prototype, "points", { get: function () { - if (!this.m_points) { - this.m_points=new Excel.ChartPointsCollection(this.context, _createPropertyObjectPath(this.context, this, "Points", true, false)); + if (!this._P) { + this._P=new Excel.ChartPointsCollection(this.context, _createPropertyObjectPath(this.context, this, "Points", true, false, false)); } - return this.m_points; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(ChartSeries.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "ChartSeries", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeChartSeries, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -15822,10 +18421,12 @@ var Excel; }); ChartSeries.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["name"], ["format"], [ - "points", "points" ]); }; + ChartSeries.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartSeries.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -15833,27 +18434,40 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format", "points", "Points"]); }; ChartSeries.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartSeries.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartSeries.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartSeries.prototype.toJSON=function () { - return { - "format": this.m_format, - "name": this.m_name - }; + return _toJson(this, { + "name": this._N, + }, { + "format": this._F, + "points": this._P, + }); + }; + ChartSeries.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartSeries; }(OfficeExtension.ClientObject)); Excel.ChartSeries=ChartSeries; + var _typeChartSeriesFormat="ChartSeriesFormat"; var ChartSeriesFormat=(function (_super) { __extends(ChartSeriesFormat, _super); function ChartSeriesFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartSeriesFormat.prototype, "_className", { get: function () { @@ -15862,22 +18476,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartSeriesFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["fill", "line"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartSeriesFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartSeriesFormat.prototype, "line", { get: function () { - if (!this.m_line) { - this.m_line=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false)); + if (!this._L) { + this._L=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false, false)); } - return this.m_line; + return this._L; }, enumerable: true, configurable: true @@ -15887,6 +18508,9 @@ var Excel; "fill" ]); }; + ChartSeriesFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartSeriesFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -15896,22 +18520,32 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["fill", "Fill", "line", "Line"]); }; ChartSeriesFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartSeriesFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartSeriesFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartSeriesFormat.prototype.toJSON=function () { - return { - "fill": this.m_fill, - "line": this.m_line - }; + return _toJson(this, {}, { + "line": this._L, + }); + }; + ChartSeriesFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartSeriesFormat; }(OfficeExtension.ClientObject)); Excel.ChartSeriesFormat=ChartSeriesFormat; + var _typeChartPointsCollection="ChartPointsCollection"; var ChartPointsCollection=(function (_super) { __extends(ChartPointsCollection, _super); function ChartPointsCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartPointsCollection.prototype, "_className", { get: function () { @@ -15920,9 +18554,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartPointsCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartPointsCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartPointsCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ChartPointsCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeChartPointsCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15930,20 +18578,21 @@ var Excel; }); Object.defineProperty(ChartPointsCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "ChartPointsCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeChartPointsCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); ChartPointsCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("ChartPointsCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; ChartPointsCollection.prototype.getItemAt=function (index) { - return new Excel.ChartPoint(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.ChartPoint(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; ChartPointsCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15952,7 +18601,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15965,21 +18614,29 @@ var Excel; } }; ChartPointsCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartPointsCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartPointsCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.ChartPoint(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(false, _this.context, _this, childItemData, index)); }); }; ChartPointsCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return ChartPointsCollection; }(OfficeExtension.ClientObject)); Excel.ChartPointsCollection=ChartPointsCollection; + var _typeChartPoint="ChartPoint"; var ChartPoint=(function (_super) { __extends(ChartPoint, _super); function ChartPoint() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartPoint.prototype, "_className", { get: function () { @@ -15988,20 +18645,34 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartPoint.prototype, "_scalarPropertyNames", { + get: function () { + return ["value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartPoint.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartPoint.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartPointFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartPointFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartPoint.prototype, "value", { get: function () { - _throwIfNotLoaded("value", this.m_value, "ChartPoint", this._isNull); - return this.m_value; + _throwIfNotLoaded("value", this._V, _typeChartPoint, this._isNull); + return this._V; }, enumerable: true, configurable: true @@ -16013,27 +18684,39 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Value"])) { - this.m_value=obj["Value"]; + this._V=obj["Value"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; ChartPoint.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartPoint.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartPoint.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartPoint.prototype.toJSON=function () { - return { - "format": this.m_format, - "value": this.m_value - }; + return _toJson(this, { + "value": this._V, + }, { + "format": this._F, + }); + }; + ChartPoint.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartPoint; }(OfficeExtension.ClientObject)); Excel.ChartPoint=ChartPoint; + var _typeChartPointFormat="ChartPointFormat"; var ChartPointFormat=(function (_super) { __extends(ChartPointFormat, _super); function ChartPointFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartPointFormat.prototype, "_className", { get: function () { @@ -16042,12 +18725,19 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartPointFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["fill"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartPointFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true @@ -16061,21 +18751,26 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["fill", "Fill"]); }; ChartPointFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartPointFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartPointFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartPointFormat.prototype.toJSON=function () { - return { - "fill": this.m_fill - }; + return _toJson(this, {}, {}); }; return ChartPointFormat; }(OfficeExtension.ClientObject)); Excel.ChartPointFormat=ChartPointFormat; + var _typeChartAxes="ChartAxes"; var ChartAxes=(function (_super) { __extends(ChartAxes, _super); function ChartAxes() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartAxes.prototype, "_className", { get: function () { @@ -16084,32 +18779,39 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartAxes.prototype, "_navigationPropertyNames", { + get: function () { + return ["categoryAxis", "seriesAxis", "valueAxis"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartAxes.prototype, "categoryAxis", { get: function () { - if (!this.m_categoryAxis) { - this.m_categoryAxis=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "CategoryAxis", false, false)); + if (!this._C) { + this._C=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "CategoryAxis", false, false, false)); } - return this.m_categoryAxis; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxes.prototype, "seriesAxis", { get: function () { - if (!this.m_seriesAxis) { - this.m_seriesAxis=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "SeriesAxis", false, false)); + if (!this._S) { + this._S=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "SeriesAxis", false, false, false)); } - return this.m_seriesAxis; + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxes.prototype, "valueAxis", { get: function () { - if (!this.m_valueAxis) { - this.m_valueAxis=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "ValueAxis", false, false)); + if (!this._V) { + this._V=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "ValueAxis", false, false, false)); } - return this.m_valueAxis; + return this._V; }, enumerable: true, configurable: true @@ -16117,6 +18819,9 @@ var Excel; ChartAxes.prototype.set=function (properties, options) { this._recursivelySet(properties, options, [], ["categoryAxis", "seriesAxis", "valueAxis"], []); }; + ChartAxes.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartAxes.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16126,23 +18831,34 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["categoryAxis", "CategoryAxis", "seriesAxis", "SeriesAxis", "valueAxis", "ValueAxis"]); }; ChartAxes.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartAxes.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAxes.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartAxes.prototype.toJSON=function () { - return { - "categoryAxis": this.m_categoryAxis, - "seriesAxis": this.m_seriesAxis, - "valueAxis": this.m_valueAxis - }; + return _toJson(this, {}, { + "categoryAxis": this._C, + "seriesAxis": this._S, + "valueAxis": this._V, + }); + }; + ChartAxes.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartAxes; }(OfficeExtension.ClientObject)); Excel.ChartAxes=ChartAxes; + var _typeChartAxis="ChartAxis"; var ChartAxis=(function (_super) { __extends(ChartAxis, _super); function ChartAxis() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartAxis.prototype, "_className", { get: function () { @@ -16151,53 +18867,74 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartAxis.prototype, "_scalarPropertyNames", { + get: function () { + return ["majorUnit", "maximum", "minimum", "minorUnit"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxis.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxis.prototype, "_navigationPropertyNames", { + get: function () { + return ["majorGridlines", "minorGridlines", "title", "format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartAxis.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartAxisFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartAxisFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxis.prototype, "majorGridlines", { get: function () { - if (!this.m_majorGridlines) { - this.m_majorGridlines=new Excel.ChartGridlines(this.context, _createPropertyObjectPath(this.context, this, "MajorGridlines", false, false)); + if (!this._M) { + this._M=new Excel.ChartGridlines(this.context, _createPropertyObjectPath(this.context, this, "MajorGridlines", false, false, false)); } - return this.m_majorGridlines; + return this._M; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxis.prototype, "minorGridlines", { get: function () { - if (!this.m_minorGridlines) { - this.m_minorGridlines=new Excel.ChartGridlines(this.context, _createPropertyObjectPath(this.context, this, "MinorGridlines", false, false)); + if (!this._Min) { + this._Min=new Excel.ChartGridlines(this.context, _createPropertyObjectPath(this.context, this, "MinorGridlines", false, false, false)); } - return this.m_minorGridlines; + return this._Min; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxis.prototype, "title", { get: function () { - if (!this.m_title) { - this.m_title=new Excel.ChartAxisTitle(this.context, _createPropertyObjectPath(this.context, this, "Title", false, false)); + if (!this._T) { + this._T=new Excel.ChartAxisTitle(this.context, _createPropertyObjectPath(this.context, this, "Title", false, false, false)); } - return this.m_title; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxis.prototype, "majorUnit", { get: function () { - _throwIfNotLoaded("majorUnit", this.m_majorUnit, "ChartAxis", this._isNull); - return this.m_majorUnit; + _throwIfNotLoaded("majorUnit", this._Ma, _typeChartAxis, this._isNull); + return this._Ma; }, set: function (value) { - this.m_majorUnit=value; + this._Ma=value; _createSetPropertyAction(this.context, this, "MajorUnit", value); }, enumerable: true, @@ -16205,11 +18942,11 @@ var Excel; }); Object.defineProperty(ChartAxis.prototype, "maximum", { get: function () { - _throwIfNotLoaded("maximum", this.m_maximum, "ChartAxis", this._isNull); - return this.m_maximum; + _throwIfNotLoaded("maximum", this._Max, _typeChartAxis, this._isNull); + return this._Max; }, set: function (value) { - this.m_maximum=value; + this._Max=value; _createSetPropertyAction(this.context, this, "Maximum", value); }, enumerable: true, @@ -16217,11 +18954,11 @@ var Excel; }); Object.defineProperty(ChartAxis.prototype, "minimum", { get: function () { - _throwIfNotLoaded("minimum", this.m_minimum, "ChartAxis", this._isNull); - return this.m_minimum; + _throwIfNotLoaded("minimum", this._Mi, _typeChartAxis, this._isNull); + return this._Mi; }, set: function (value) { - this.m_minimum=value; + this._Mi=value; _createSetPropertyAction(this.context, this, "Minimum", value); }, enumerable: true, @@ -16229,11 +18966,11 @@ var Excel; }); Object.defineProperty(ChartAxis.prototype, "minorUnit", { get: function () { - _throwIfNotLoaded("minorUnit", this.m_minorUnit, "ChartAxis", this._isNull); - return this.m_minorUnit; + _throwIfNotLoaded("minorUnit", this._Mino, _typeChartAxis, this._isNull); + return this._Mino; }, set: function (value) { - this.m_minorUnit=value; + this._Mino=value; _createSetPropertyAction(this.context, this, "MinorUnit", value); }, enumerable: true, @@ -16242,6 +18979,9 @@ var Excel; ChartAxis.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["majorUnit", "maximum", "minimum", "minorUnit"], ["majorGridlines", "minorGridlines", "title", "format"], []); }; + ChartAxis.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartAxis.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16249,42 +18989,54 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["MajorUnit"])) { - this.m_majorUnit=obj["MajorUnit"]; + this._Ma=obj["MajorUnit"]; } if (!_isUndefined(obj["Maximum"])) { - this.m_maximum=obj["Maximum"]; + this._Max=obj["Maximum"]; } if (!_isUndefined(obj["Minimum"])) { - this.m_minimum=obj["Minimum"]; + this._Mi=obj["Minimum"]; } if (!_isUndefined(obj["MinorUnit"])) { - this.m_minorUnit=obj["MinorUnit"]; + this._Mino=obj["MinorUnit"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format", "majorGridlines", "MajorGridlines", "minorGridlines", "MinorGridlines", "title", "Title"]); }; ChartAxis.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartAxis.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAxis.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartAxis.prototype.toJSON=function () { - return { - "format": this.m_format, - "majorGridlines": this.m_majorGridlines, - "majorUnit": this.m_majorUnit, - "maximum": this.m_maximum, - "minimum": this.m_minimum, - "minorGridlines": this.m_minorGridlines, - "minorUnit": this.m_minorUnit, - "title": this.m_title - }; + return _toJson(this, { + "majorUnit": this._Ma, + "maximum": this._Max, + "minimum": this._Mi, + "minorUnit": this._Mino, + }, { + "format": this._F, + "majorGridlines": this._M, + "minorGridlines": this._Min, + "title": this._T, + }); + }; + ChartAxis.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartAxis; }(OfficeExtension.ClientObject)); Excel.ChartAxis=ChartAxis; + var _typeChartAxisFormat="ChartAxisFormat"; var ChartAxisFormat=(function (_super) { __extends(ChartAxisFormat, _super); function ChartAxisFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartAxisFormat.prototype, "_className", { get: function () { @@ -16293,22 +19045,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartAxisFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["font", "line"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartAxisFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._F) { + this._F=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxisFormat.prototype, "line", { get: function () { - if (!this.m_line) { - this.m_line=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false)); + if (!this._L) { + this._L=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false, false)); } - return this.m_line; + return this._L; }, enumerable: true, configurable: true @@ -16316,6 +19075,9 @@ var Excel; ChartAxisFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, [], ["font", "line"], []); }; + ChartAxisFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartAxisFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16325,22 +19087,33 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["font", "Font", "line", "Line"]); }; ChartAxisFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartAxisFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAxisFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartAxisFormat.prototype.toJSON=function () { - return { - "font": this.m_font, - "line": this.m_line - }; + return _toJson(this, {}, { + "font": this._F, + "line": this._L, + }); + }; + ChartAxisFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartAxisFormat; }(OfficeExtension.ClientObject)); Excel.ChartAxisFormat=ChartAxisFormat; + var _typeChartAxisTitle="ChartAxisTitle"; var ChartAxisTitle=(function (_super) { __extends(ChartAxisTitle, _super); function ChartAxisTitle() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartAxisTitle.prototype, "_className", { get: function () { @@ -16349,23 +19122,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartAxisTitle.prototype, "_scalarPropertyNames", { + get: function () { + return ["text", "visible"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxisTitle.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxisTitle.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartAxisTitle.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartAxisTitleFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartAxisTitleFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxisTitle.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "ChartAxisTitle", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._T, _typeChartAxisTitle, this._isNull); + return this._T; }, set: function (value) { - this.m_text=value; + this._T=value; _createSetPropertyAction(this.context, this, "Text", value); }, enumerable: true, @@ -16373,11 +19167,11 @@ var Excel; }); Object.defineProperty(ChartAxisTitle.prototype, "visible", { get: function () { - _throwIfNotLoaded("visible", this.m_visible, "ChartAxisTitle", this._isNull); - return this.m_visible; + _throwIfNotLoaded("visible", this._V, _typeChartAxisTitle, this._isNull); + return this._V; }, set: function (value) { - this.m_visible=value; + this._V=value; _createSetPropertyAction(this.context, this, "Visible", value); }, enumerable: true, @@ -16386,6 +19180,9 @@ var Excel; ChartAxisTitle.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["text", "visible"], ["format"], []); }; + ChartAxisTitle.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartAxisTitle.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16393,31 +19190,43 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._T=obj["Text"]; } if (!_isUndefined(obj["Visible"])) { - this.m_visible=obj["Visible"]; + this._V=obj["Visible"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; ChartAxisTitle.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartAxisTitle.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAxisTitle.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartAxisTitle.prototype.toJSON=function () { - return { - "format": this.m_format, - "text": this.m_text, - "visible": this.m_visible - }; + return _toJson(this, { + "text": this._T, + "visible": this._V, + }, { + "format": this._F, + }); + }; + ChartAxisTitle.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartAxisTitle; }(OfficeExtension.ClientObject)); Excel.ChartAxisTitle=ChartAxisTitle; + var _typeChartAxisTitleFormat="ChartAxisTitleFormat"; var ChartAxisTitleFormat=(function (_super) { __extends(ChartAxisTitleFormat, _super); function ChartAxisTitleFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartAxisTitleFormat.prototype, "_className", { get: function () { @@ -16426,12 +19235,19 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartAxisTitleFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["font"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartAxisTitleFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._F) { + this._F=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._F; }, enumerable: true, configurable: true @@ -16439,6 +19255,9 @@ var Excel; ChartAxisTitleFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, [], ["font"], []); }; + ChartAxisTitleFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartAxisTitleFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16448,46 +19267,78 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["font", "Font"]); }; ChartAxisTitleFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartAxisTitleFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAxisTitleFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartAxisTitleFormat.prototype.toJSON=function () { - return { - "font": this.m_font - }; + return _toJson(this, {}, { + "font": this._F, + }); + }; + ChartAxisTitleFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartAxisTitleFormat; }(OfficeExtension.ClientObject)); Excel.ChartAxisTitleFormat=ChartAxisTitleFormat; + var _typeChartDataLabels="ChartDataLabels"; var ChartDataLabels=(function (_super) { __extends(ChartDataLabels, _super); function ChartDataLabels() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartDataLabels.prototype, "_className", { get: function () { - return "ChartDataLabels"; + return "ChartDataLabels"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartDataLabels.prototype, "_scalarPropertyNames", { + get: function () { + return ["position", "showValue", "showSeriesName", "showCategoryName", "showLegendKey", "showPercentage", "showBubbleSize", "separator"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartDataLabels.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartDataLabels.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; }, enumerable: true, configurable: true }); Object.defineProperty(ChartDataLabels.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartDataLabelFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartDataLabelFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartDataLabels.prototype, "position", { get: function () { - _throwIfNotLoaded("position", this.m_position, "ChartDataLabels", this._isNull); - return this.m_position; + _throwIfNotLoaded("position", this._P, _typeChartDataLabels, this._isNull); + return this._P; }, set: function (value) { - this.m_position=value; + this._P=value; _createSetPropertyAction(this.context, this, "Position", value); }, enumerable: true, @@ -16495,11 +19346,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "separator", { get: function () { - _throwIfNotLoaded("separator", this.m_separator, "ChartDataLabels", this._isNull); - return this.m_separator; + _throwIfNotLoaded("separator", this._S, _typeChartDataLabels, this._isNull); + return this._S; }, set: function (value) { - this.m_separator=value; + this._S=value; _createSetPropertyAction(this.context, this, "Separator", value); }, enumerable: true, @@ -16507,11 +19358,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "showBubbleSize", { get: function () { - _throwIfNotLoaded("showBubbleSize", this.m_showBubbleSize, "ChartDataLabels", this._isNull); - return this.m_showBubbleSize; + _throwIfNotLoaded("showBubbleSize", this._Sh, _typeChartDataLabels, this._isNull); + return this._Sh; }, set: function (value) { - this.m_showBubbleSize=value; + this._Sh=value; _createSetPropertyAction(this.context, this, "ShowBubbleSize", value); }, enumerable: true, @@ -16519,11 +19370,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "showCategoryName", { get: function () { - _throwIfNotLoaded("showCategoryName", this.m_showCategoryName, "ChartDataLabels", this._isNull); - return this.m_showCategoryName; + _throwIfNotLoaded("showCategoryName", this._Sho, _typeChartDataLabels, this._isNull); + return this._Sho; }, set: function (value) { - this.m_showCategoryName=value; + this._Sho=value; _createSetPropertyAction(this.context, this, "ShowCategoryName", value); }, enumerable: true, @@ -16531,11 +19382,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "showLegendKey", { get: function () { - _throwIfNotLoaded("showLegendKey", this.m_showLegendKey, "ChartDataLabels", this._isNull); - return this.m_showLegendKey; + _throwIfNotLoaded("showLegendKey", this._Show, _typeChartDataLabels, this._isNull); + return this._Show; }, set: function (value) { - this.m_showLegendKey=value; + this._Show=value; _createSetPropertyAction(this.context, this, "ShowLegendKey", value); }, enumerable: true, @@ -16543,11 +19394,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "showPercentage", { get: function () { - _throwIfNotLoaded("showPercentage", this.m_showPercentage, "ChartDataLabels", this._isNull); - return this.m_showPercentage; + _throwIfNotLoaded("showPercentage", this._ShowP, _typeChartDataLabels, this._isNull); + return this._ShowP; }, set: function (value) { - this.m_showPercentage=value; + this._ShowP=value; _createSetPropertyAction(this.context, this, "ShowPercentage", value); }, enumerable: true, @@ -16555,11 +19406,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "showSeriesName", { get: function () { - _throwIfNotLoaded("showSeriesName", this.m_showSeriesName, "ChartDataLabels", this._isNull); - return this.m_showSeriesName; + _throwIfNotLoaded("showSeriesName", this._ShowS, _typeChartDataLabels, this._isNull); + return this._ShowS; }, set: function (value) { - this.m_showSeriesName=value; + this._ShowS=value; _createSetPropertyAction(this.context, this, "ShowSeriesName", value); }, enumerable: true, @@ -16567,11 +19418,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "showValue", { get: function () { - _throwIfNotLoaded("showValue", this.m_showValue, "ChartDataLabels", this._isNull); - return this.m_showValue; + _throwIfNotLoaded("showValue", this._ShowV, _typeChartDataLabels, this._isNull); + return this._ShowV; }, set: function (value) { - this.m_showValue=value; + this._ShowV=value; _createSetPropertyAction(this.context, this, "ShowValue", value); }, enumerable: true, @@ -16580,6 +19431,9 @@ var Excel; ChartDataLabels.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["position", "showValue", "showSeriesName", "showCategoryName", "showLegendKey", "showPercentage", "showBubbleSize", "separator"], ["format"], []); }; + ChartDataLabels.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartDataLabels.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16587,55 +19441,67 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Position"])) { - this.m_position=obj["Position"]; + this._P=obj["Position"]; } if (!_isUndefined(obj["Separator"])) { - this.m_separator=obj["Separator"]; + this._S=obj["Separator"]; } if (!_isUndefined(obj["ShowBubbleSize"])) { - this.m_showBubbleSize=obj["ShowBubbleSize"]; + this._Sh=obj["ShowBubbleSize"]; } if (!_isUndefined(obj["ShowCategoryName"])) { - this.m_showCategoryName=obj["ShowCategoryName"]; + this._Sho=obj["ShowCategoryName"]; } if (!_isUndefined(obj["ShowLegendKey"])) { - this.m_showLegendKey=obj["ShowLegendKey"]; + this._Show=obj["ShowLegendKey"]; } if (!_isUndefined(obj["ShowPercentage"])) { - this.m_showPercentage=obj["ShowPercentage"]; + this._ShowP=obj["ShowPercentage"]; } if (!_isUndefined(obj["ShowSeriesName"])) { - this.m_showSeriesName=obj["ShowSeriesName"]; + this._ShowS=obj["ShowSeriesName"]; } if (!_isUndefined(obj["ShowValue"])) { - this.m_showValue=obj["ShowValue"]; + this._ShowV=obj["ShowValue"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; ChartDataLabels.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartDataLabels.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartDataLabels.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartDataLabels.prototype.toJSON=function () { - return { - "format": this.m_format, - "position": this.m_position, - "separator": this.m_separator, - "showBubbleSize": this.m_showBubbleSize, - "showCategoryName": this.m_showCategoryName, - "showLegendKey": this.m_showLegendKey, - "showPercentage": this.m_showPercentage, - "showSeriesName": this.m_showSeriesName, - "showValue": this.m_showValue - }; + return _toJson(this, { + "position": this._P, + "separator": this._S, + "showBubbleSize": this._Sh, + "showCategoryName": this._Sho, + "showLegendKey": this._Show, + "showPercentage": this._ShowP, + "showSeriesName": this._ShowS, + "showValue": this._ShowV, + }, { + "format": this._F, + }); + }; + ChartDataLabels.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartDataLabels; }(OfficeExtension.ClientObject)); Excel.ChartDataLabels=ChartDataLabels; + var _typeChartDataLabelFormat="ChartDataLabelFormat"; var ChartDataLabelFormat=(function (_super) { __extends(ChartDataLabelFormat, _super); function ChartDataLabelFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartDataLabelFormat.prototype, "_className", { get: function () { @@ -16644,22 +19510,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartDataLabelFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["font", "fill"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartDataLabelFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartDataLabelFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true @@ -16669,6 +19542,9 @@ var Excel; "fill" ]); }; + ChartDataLabelFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartDataLabelFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16678,22 +19554,32 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["fill", "Fill", "font", "Font"]); }; ChartDataLabelFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartDataLabelFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartDataLabelFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartDataLabelFormat.prototype.toJSON=function () { - return { - "fill": this.m_fill, - "font": this.m_font - }; + return _toJson(this, {}, { + "font": this._Fo, + }); + }; + ChartDataLabelFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartDataLabelFormat; }(OfficeExtension.ClientObject)); Excel.ChartDataLabelFormat=ChartDataLabelFormat; + var _typeChartGridlines="ChartGridlines"; var ChartGridlines=(function (_super) { __extends(ChartGridlines, _super); function ChartGridlines() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartGridlines.prototype, "_className", { get: function () { @@ -16702,23 +19588,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartGridlines.prototype, "_scalarPropertyNames", { + get: function () { + return ["visible"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartGridlines.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartGridlines.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartGridlines.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartGridlinesFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartGridlinesFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartGridlines.prototype, "visible", { get: function () { - _throwIfNotLoaded("visible", this.m_visible, "ChartGridlines", this._isNull); - return this.m_visible; + _throwIfNotLoaded("visible", this._V, _typeChartGridlines, this._isNull); + return this._V; }, set: function (value) { - this.m_visible=value; + this._V=value; _createSetPropertyAction(this.context, this, "Visible", value); }, enumerable: true, @@ -16727,6 +19634,9 @@ var Excel; ChartGridlines.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["visible"], ["format"], []); }; + ChartGridlines.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartGridlines.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16734,27 +19644,39 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Visible"])) { - this.m_visible=obj["Visible"]; + this._V=obj["Visible"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; ChartGridlines.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartGridlines.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartGridlines.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartGridlines.prototype.toJSON=function () { - return { - "format": this.m_format, - "visible": this.m_visible - }; + return _toJson(this, { + "visible": this._V, + }, { + "format": this._F, + }); + }; + ChartGridlines.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartGridlines; }(OfficeExtension.ClientObject)); Excel.ChartGridlines=ChartGridlines; + var _typeChartGridlinesFormat="ChartGridlinesFormat"; var ChartGridlinesFormat=(function (_super) { __extends(ChartGridlinesFormat, _super); function ChartGridlinesFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartGridlinesFormat.prototype, "_className", { get: function () { @@ -16763,12 +19685,19 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartGridlinesFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["line"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartGridlinesFormat.prototype, "line", { get: function () { - if (!this.m_line) { - this.m_line=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false)); + if (!this._L) { + this._L=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false, false)); } - return this.m_line; + return this._L; }, enumerable: true, configurable: true @@ -16776,6 +19705,9 @@ var Excel; ChartGridlinesFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, [], ["line"], []); }; + ChartGridlinesFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartGridlinesFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16785,21 +19717,32 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["line", "Line"]); }; ChartGridlinesFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartGridlinesFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartGridlinesFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartGridlinesFormat.prototype.toJSON=function () { - return { - "line": this.m_line - }; + return _toJson(this, {}, { + "line": this._L, + }); + }; + ChartGridlinesFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartGridlinesFormat; }(OfficeExtension.ClientObject)); Excel.ChartGridlinesFormat=ChartGridlinesFormat; + var _typeChartLegend="ChartLegend"; var ChartLegend=(function (_super) { __extends(ChartLegend, _super); function ChartLegend() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartLegend.prototype, "_className", { get: function () { @@ -16808,23 +19751,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartLegend.prototype, "_scalarPropertyNames", { + get: function () { + return ["visible", "position", "overlay"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartLegend.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartLegend.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartLegend.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartLegendFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartLegendFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartLegend.prototype, "overlay", { get: function () { - _throwIfNotLoaded("overlay", this.m_overlay, "ChartLegend", this._isNull); - return this.m_overlay; + _throwIfNotLoaded("overlay", this._O, _typeChartLegend, this._isNull); + return this._O; }, set: function (value) { - this.m_overlay=value; + this._O=value; _createSetPropertyAction(this.context, this, "Overlay", value); }, enumerable: true, @@ -16832,11 +19796,11 @@ var Excel; }); Object.defineProperty(ChartLegend.prototype, "position", { get: function () { - _throwIfNotLoaded("position", this.m_position, "ChartLegend", this._isNull); - return this.m_position; + _throwIfNotLoaded("position", this._P, _typeChartLegend, this._isNull); + return this._P; }, set: function (value) { - this.m_position=value; + this._P=value; _createSetPropertyAction(this.context, this, "Position", value); }, enumerable: true, @@ -16844,11 +19808,11 @@ var Excel; }); Object.defineProperty(ChartLegend.prototype, "visible", { get: function () { - _throwIfNotLoaded("visible", this.m_visible, "ChartLegend", this._isNull); - return this.m_visible; + _throwIfNotLoaded("visible", this._V, _typeChartLegend, this._isNull); + return this._V; }, set: function (value) { - this.m_visible=value; + this._V=value; _createSetPropertyAction(this.context, this, "Visible", value); }, enumerable: true, @@ -16857,6 +19821,9 @@ var Excel; ChartLegend.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["visible", "position", "overlay"], ["format"], []); }; + ChartLegend.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartLegend.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16864,35 +19831,47 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Overlay"])) { - this.m_overlay=obj["Overlay"]; + this._O=obj["Overlay"]; } if (!_isUndefined(obj["Position"])) { - this.m_position=obj["Position"]; + this._P=obj["Position"]; } if (!_isUndefined(obj["Visible"])) { - this.m_visible=obj["Visible"]; + this._V=obj["Visible"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; ChartLegend.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartLegend.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartLegend.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartLegend.prototype.toJSON=function () { - return { - "format": this.m_format, - "overlay": this.m_overlay, - "position": this.m_position, - "visible": this.m_visible - }; + return _toJson(this, { + "overlay": this._O, + "position": this._P, + "visible": this._V, + }, { + "format": this._F, + }); + }; + ChartLegend.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartLegend; }(OfficeExtension.ClientObject)); Excel.ChartLegend=ChartLegend; + var _typeChartLegendFormat="ChartLegendFormat"; var ChartLegendFormat=(function (_super) { __extends(ChartLegendFormat, _super); function ChartLegendFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartLegendFormat.prototype, "_className", { get: function () { @@ -16901,22 +19880,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartLegendFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["font", "fill"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartLegendFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartLegendFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true @@ -16926,6 +19912,9 @@ var Excel; "fill" ]); }; + ChartLegendFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartLegendFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16935,22 +19924,32 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["fill", "Fill", "font", "Font"]); }; ChartLegendFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartLegendFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartLegendFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartLegendFormat.prototype.toJSON=function () { - return { - "fill": this.m_fill, - "font": this.m_font - }; + return _toJson(this, {}, { + "font": this._Fo, + }); + }; + ChartLegendFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartLegendFormat; }(OfficeExtension.ClientObject)); Excel.ChartLegendFormat=ChartLegendFormat; + var _typeChartTitle="ChartTitle"; var ChartTitle=(function (_super) { __extends(ChartTitle, _super); function ChartTitle() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartTitle.prototype, "_className", { get: function () { @@ -16959,23 +19958,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartTitle.prototype, "_scalarPropertyNames", { + get: function () { + return ["visible", "text", "overlay"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartTitle.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartTitle.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartTitle.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartTitleFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartTitleFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartTitle.prototype, "overlay", { get: function () { - _throwIfNotLoaded("overlay", this.m_overlay, "ChartTitle", this._isNull); - return this.m_overlay; + _throwIfNotLoaded("overlay", this._O, _typeChartTitle, this._isNull); + return this._O; }, set: function (value) { - this.m_overlay=value; + this._O=value; _createSetPropertyAction(this.context, this, "Overlay", value); }, enumerable: true, @@ -16983,11 +20003,11 @@ var Excel; }); Object.defineProperty(ChartTitle.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "ChartTitle", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._T, _typeChartTitle, this._isNull); + return this._T; }, set: function (value) { - this.m_text=value; + this._T=value; _createSetPropertyAction(this.context, this, "Text", value); }, enumerable: true, @@ -16995,11 +20015,11 @@ var Excel; }); Object.defineProperty(ChartTitle.prototype, "visible", { get: function () { - _throwIfNotLoaded("visible", this.m_visible, "ChartTitle", this._isNull); - return this.m_visible; + _throwIfNotLoaded("visible", this._V, _typeChartTitle, this._isNull); + return this._V; }, set: function (value) { - this.m_visible=value; + this._V=value; _createSetPropertyAction(this.context, this, "Visible", value); }, enumerable: true, @@ -17008,6 +20028,9 @@ var Excel; ChartTitle.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["visible", "text", "overlay"], ["format"], []); }; + ChartTitle.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartTitle.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -17015,35 +20038,47 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Overlay"])) { - this.m_overlay=obj["Overlay"]; + this._O=obj["Overlay"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._T=obj["Text"]; } if (!_isUndefined(obj["Visible"])) { - this.m_visible=obj["Visible"]; + this._V=obj["Visible"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; ChartTitle.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartTitle.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartTitle.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartTitle.prototype.toJSON=function () { - return { - "format": this.m_format, - "overlay": this.m_overlay, - "text": this.m_text, - "visible": this.m_visible - }; + return _toJson(this, { + "overlay": this._O, + "text": this._T, + "visible": this._V, + }, { + "format": this._F, + }); + }; + ChartTitle.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartTitle; }(OfficeExtension.ClientObject)); Excel.ChartTitle=ChartTitle; + var _typeChartTitleFormat="ChartTitleFormat"; var ChartTitleFormat=(function (_super) { __extends(ChartTitleFormat, _super); function ChartTitleFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartTitleFormat.prototype, "_className", { get: function () { @@ -17052,22 +20087,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartTitleFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["font", "fill"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartTitleFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartTitleFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true @@ -17077,6 +20119,9 @@ var Excel; "fill" ]); }; + ChartTitleFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartTitleFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -17086,22 +20131,32 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["fill", "Fill", "font", "Font"]); }; ChartTitleFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartTitleFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartTitleFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartTitleFormat.prototype.toJSON=function () { - return { - "fill": this.m_fill, - "font": this.m_font - }; + return _toJson(this, {}, { + "font": this._Fo, + }); + }; + ChartTitleFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartTitleFormat; }(OfficeExtension.ClientObject)); Excel.ChartTitleFormat=ChartTitleFormat; + var _typeChartFill="ChartFill"; var ChartFill=(function (_super) { __extends(ChartFill, _super); function ChartFill() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartFill.prototype, "_className", { get: function () { @@ -17115,10 +20170,10 @@ var Excel; return this; }; ChartFill.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; ChartFill.prototype.setSolidColor=function (color) { - _createMethodAction(this.context, this, "SetSolidColor", 0, [color]); + _createMethodAction(this.context, this, "SetSolidColor", 0, [color], false); }; ChartFill.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17127,16 +20182,21 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); }; + ChartFill.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; ChartFill.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}); }; return ChartFill; }(OfficeExtension.ClientObject)); Excel.ChartFill=ChartFill; + var _typeChartLineFormat="ChartLineFormat"; var ChartLineFormat=(function (_super) { __extends(ChartLineFormat, _super); function ChartLineFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartLineFormat.prototype, "_className", { get: function () { @@ -17145,13 +20205,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartLineFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["color"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartLineFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartLineFormat.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "ChartLineFormat", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeChartLineFormat, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -17160,8 +20234,11 @@ var Excel; ChartLineFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["color"], [], []); }; + ChartLineFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartLineFormat.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; ChartLineFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17170,25 +20247,36 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } }; ChartLineFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartLineFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartLineFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartLineFormat.prototype.toJSON=function () { - return { - "color": this.m_color - }; + return _toJson(this, { + "color": this._C, + }, {}); + }; + ChartLineFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartLineFormat; }(OfficeExtension.ClientObject)); Excel.ChartLineFormat=ChartLineFormat; + var _typeChartFont="ChartFont"; var ChartFont=(function (_super) { __extends(ChartFont, _super); function ChartFont() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartFont.prototype, "_className", { get: function () { @@ -17197,13 +20285,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartFont.prototype, "_scalarPropertyNames", { + get: function () { + return ["bold", "color", "italic", "name", "size", "underline"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartFont.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartFont.prototype, "bold", { get: function () { - _throwIfNotLoaded("bold", this.m_bold, "ChartFont", this._isNull); - return this.m_bold; + _throwIfNotLoaded("bold", this._B, _typeChartFont, this._isNull); + return this._B; }, set: function (value) { - this.m_bold=value; + this._B=value; _createSetPropertyAction(this.context, this, "Bold", value); }, enumerable: true, @@ -17211,11 +20313,11 @@ var Excel; }); Object.defineProperty(ChartFont.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "ChartFont", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeChartFont, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -17223,11 +20325,11 @@ var Excel; }); Object.defineProperty(ChartFont.prototype, "italic", { get: function () { - _throwIfNotLoaded("italic", this.m_italic, "ChartFont", this._isNull); - return this.m_italic; + _throwIfNotLoaded("italic", this._I, _typeChartFont, this._isNull); + return this._I; }, set: function (value) { - this.m_italic=value; + this._I=value; _createSetPropertyAction(this.context, this, "Italic", value); }, enumerable: true, @@ -17235,11 +20337,11 @@ var Excel; }); Object.defineProperty(ChartFont.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "ChartFont", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeChartFont, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -17247,11 +20349,11 @@ var Excel; }); Object.defineProperty(ChartFont.prototype, "size", { get: function () { - _throwIfNotLoaded("size", this.m_size, "ChartFont", this._isNull); - return this.m_size; + _throwIfNotLoaded("size", this._S, _typeChartFont, this._isNull); + return this._S; }, set: function (value) { - this.m_size=value; + this._S=value; _createSetPropertyAction(this.context, this, "Size", value); }, enumerable: true, @@ -17259,11 +20361,11 @@ var Excel; }); Object.defineProperty(ChartFont.prototype, "underline", { get: function () { - _throwIfNotLoaded("underline", this.m_underline, "ChartFont", this._isNull); - return this.m_underline; + _throwIfNotLoaded("underline", this._U, _typeChartFont, this._isNull); + return this._U; }, set: function (value) { - this.m_underline=value; + this._U=value; _createSetPropertyAction(this.context, this, "Underline", value); }, enumerable: true, @@ -17272,6 +20374,9 @@ var Excel; ChartFont.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["bold", "color", "italic", "name", "size", "underline"], [], []); }; + ChartFont.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartFont.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -17279,45 +20384,56 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Bold"])) { - this.m_bold=obj["Bold"]; + this._B=obj["Bold"]; } if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["Italic"])) { - this.m_italic=obj["Italic"]; + this._I=obj["Italic"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Size"])) { - this.m_size=obj["Size"]; + this._S=obj["Size"]; } if (!_isUndefined(obj["Underline"])) { - this.m_underline=obj["Underline"]; + this._U=obj["Underline"]; } }; ChartFont.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartFont.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartFont.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartFont.prototype.toJSON=function () { - return { - "bold": this.m_bold, - "color": this.m_color, - "italic": this.m_italic, - "name": this.m_name, - "size": this.m_size, - "underline": this.m_underline - }; + return _toJson(this, { + "bold": this._B, + "color": this._C, + "italic": this._I, + "name": this._N, + "size": this._S, + "underline": this._U, + }, {}); + }; + ChartFont.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartFont; }(OfficeExtension.ClientObject)); Excel.ChartFont=ChartFont; + var _typeRangeSort="RangeSort"; var RangeSort=(function (_super) { __extends(RangeSort, _super); function RangeSort() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeSort.prototype, "_className", { get: function () { @@ -17327,7 +20443,7 @@ var Excel; configurable: true }); RangeSort.prototype.apply=function (fields, matchCase, hasHeaders, orientation, method) { - _createMethodAction(this.context, this, "Apply", 0, [fields, matchCase, hasHeaders, orientation, method]); + _createMethodAction(this.context, this, "Apply", 0, [fields, matchCase, hasHeaders, orientation, method], false); }; RangeSort.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17336,16 +20452,21 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); }; + RangeSort.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; RangeSort.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}); }; return RangeSort; }(OfficeExtension.ClientObject)); Excel.RangeSort=RangeSort; + var _typeTableSort="TableSort"; var TableSort=(function (_super) { __extends(TableSort, _super); function TableSort() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableSort.prototype, "_className", { get: function () { @@ -17354,38 +20475,45 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TableSort.prototype, "_scalarPropertyNames", { + get: function () { + return ["matchCase", "method", "fields"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TableSort.prototype, "fields", { get: function () { - _throwIfNotLoaded("fields", this.m_fields, "TableSort", this._isNull); - return this.m_fields; + _throwIfNotLoaded("fields", this._F, _typeTableSort, this._isNull); + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(TableSort.prototype, "matchCase", { get: function () { - _throwIfNotLoaded("matchCase", this.m_matchCase, "TableSort", this._isNull); - return this.m_matchCase; + _throwIfNotLoaded("matchCase", this._M, _typeTableSort, this._isNull); + return this._M; }, enumerable: true, configurable: true }); Object.defineProperty(TableSort.prototype, "method", { get: function () { - _throwIfNotLoaded("method", this.m_method, "TableSort", this._isNull); - return this.m_method; + _throwIfNotLoaded("method", this._Me, _typeTableSort, this._isNull); + return this._Me; }, enumerable: true, configurable: true }); TableSort.prototype.apply=function (fields, matchCase, method) { - _createMethodAction(this.context, this, "Apply", 0, [fields, matchCase, method]); + _createMethodAction(this.context, this, "Apply", 0, [fields, matchCase, method], false); }; TableSort.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; TableSort.prototype.reapply=function () { - _createMethodAction(this.context, this, "Reapply", 0, []); + _createMethodAction(this.context, this, "Reapply", 0, [], false); }; TableSort.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17394,33 +20522,44 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Fields"])) { - this.m_fields=obj["Fields"]; + this._F=obj["Fields"]; } if (!_isUndefined(obj["MatchCase"])) { - this.m_matchCase=obj["MatchCase"]; + this._M=obj["MatchCase"]; } if (!_isUndefined(obj["Method"])) { - this.m_method=obj["Method"]; + this._Me=obj["Method"]; } }; TableSort.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableSort.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableSort.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; TableSort.prototype.toJSON=function () { - return { - "fields": this.m_fields, - "matchCase": this.m_matchCase, - "method": this.m_method - }; + return _toJson(this, { + "fields": this._F, + "matchCase": this._M, + "method": this._Me, + }, {}); + }; + TableSort.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TableSort; }(OfficeExtension.ClientObject)); Excel.TableSort=TableSort; + var _typeFilter="Filter"; var Filter=(function (_super) { __extends(Filter, _super); function Filter() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Filter.prototype, "_className", { get: function () { @@ -17429,49 +20568,56 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Filter.prototype, "_scalarPropertyNames", { + get: function () { + return ["criteria"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(Filter.prototype, "criteria", { get: function () { - _throwIfNotLoaded("criteria", this.m_criteria, "Filter", this._isNull); - return this.m_criteria; + _throwIfNotLoaded("criteria", this._C, _typeFilter, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Filter.prototype.apply=function (criteria) { - _createMethodAction(this.context, this, "Apply", 0, [criteria]); + _createMethodAction(this.context, this, "Apply", 0, [criteria], false); }; Filter.prototype.applyBottomItemsFilter=function (count) { - _createMethodAction(this.context, this, "ApplyBottomItemsFilter", 0, [count]); + _createMethodAction(this.context, this, "ApplyBottomItemsFilter", 0, [count], false); }; Filter.prototype.applyBottomPercentFilter=function (percent) { - _createMethodAction(this.context, this, "ApplyBottomPercentFilter", 0, [percent]); + _createMethodAction(this.context, this, "ApplyBottomPercentFilter", 0, [percent], false); }; Filter.prototype.applyCellColorFilter=function (color) { - _createMethodAction(this.context, this, "ApplyCellColorFilter", 0, [color]); + _createMethodAction(this.context, this, "ApplyCellColorFilter", 0, [color], false); }; Filter.prototype.applyCustomFilter=function (criteria1, criteria2, oper) { - _createMethodAction(this.context, this, "ApplyCustomFilter", 0, [criteria1, criteria2, oper]); + _createMethodAction(this.context, this, "ApplyCustomFilter", 0, [criteria1, criteria2, oper], false); }; Filter.prototype.applyDynamicFilter=function (criteria) { - _createMethodAction(this.context, this, "ApplyDynamicFilter", 0, [criteria]); + _createMethodAction(this.context, this, "ApplyDynamicFilter", 0, [criteria], false); }; Filter.prototype.applyFontColorFilter=function (color) { - _createMethodAction(this.context, this, "ApplyFontColorFilter", 0, [color]); + _createMethodAction(this.context, this, "ApplyFontColorFilter", 0, [color], false); }; Filter.prototype.applyIconFilter=function (icon) { - _createMethodAction(this.context, this, "ApplyIconFilter", 0, [icon]); + _createMethodAction(this.context, this, "ApplyIconFilter", 0, [icon], false); }; Filter.prototype.applyTopItemsFilter=function (count) { - _createMethodAction(this.context, this, "ApplyTopItemsFilter", 0, [count]); + _createMethodAction(this.context, this, "ApplyTopItemsFilter", 0, [count], false); }; Filter.prototype.applyTopPercentFilter=function (percent) { - _createMethodAction(this.context, this, "ApplyTopPercentFilter", 0, [percent]); + _createMethodAction(this.context, this, "ApplyTopPercentFilter", 0, [percent], false); }; Filter.prototype.applyValuesFilter=function (values) { - _createMethodAction(this.context, this, "ApplyValuesFilter", 0, [values]); + _createMethodAction(this.context, this, "ApplyValuesFilter", 0, [values], false); }; Filter.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; Filter.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17480,25 +20626,36 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Criteria"])) { - this.m_criteria=obj["Criteria"]; + this._C=obj["Criteria"]; } }; Filter.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Filter.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Filter.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; Filter.prototype.toJSON=function () { - return { - "criteria": this.m_criteria - }; + return _toJson(this, { + "criteria": this._C, + }, {}); + }; + Filter.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Filter; }(OfficeExtension.ClientObject)); Excel.Filter=Filter; + var _typeCustomXmlPartScopedCollection="CustomXmlPartScopedCollection"; var CustomXmlPartScopedCollection=(function (_super) { __extends(CustomXmlPartScopedCollection, _super); function CustomXmlPartScopedCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CustomXmlPartScopedCollection.prototype, "_className", { get: function () { @@ -17507,16 +20664,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(CustomXmlPartScopedCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(CustomXmlPartScopedCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "CustomXmlPartScopedCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeCustomXmlPartScopedCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); CustomXmlPartScopedCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -17525,13 +20689,13 @@ var Excel; return new Excel.CustomXmlPart(this.context, _createIndexerObjectPath(this.context, this, [id])); }; CustomXmlPartScopedCollection.prototype.getItemOrNullObject=function (id) { - return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null)); + return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null, false)); }; CustomXmlPartScopedCollection.prototype.getOnlyItem=function () { - return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetOnlyItem", 1, [], false, false, null)); + return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetOnlyItem", 1, [], false, false, null, false)); }; CustomXmlPartScopedCollection.prototype.getOnlyItemOrNullObject=function () { - return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetOnlyItemOrNullObject", 1, [], false, false, null)); + return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetOnlyItemOrNullObject", 1, [], false, false, null, false)); }; CustomXmlPartScopedCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17550,19 +20714,27 @@ var Excel; } }; CustomXmlPartScopedCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CustomXmlPartScopedCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CustomXmlPartScopedCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.CustomXmlPart(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; CustomXmlPartScopedCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return CustomXmlPartScopedCollection; }(OfficeExtension.ClientObject)); Excel.CustomXmlPartScopedCollection=CustomXmlPartScopedCollection; + var _typeCustomXmlPartCollection="CustomXmlPartCollection"; var CustomXmlPartCollection=(function (_super) { __extends(CustomXmlPartCollection, _super); function CustomXmlPartCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CustomXmlPartCollection.prototype, "_className", { get: function () { @@ -17571,22 +20743,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(CustomXmlPartCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(CustomXmlPartCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "CustomXmlPartCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeCustomXmlPartCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); CustomXmlPartCollection.prototype.add=function (xml) { - return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [xml], false, true, null)); + return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [xml], false, true, null, false)); }; CustomXmlPartCollection.prototype.getByNamespace=function (namespaceUri) { - return new Excel.CustomXmlPartScopedCollection(this.context, _createMethodObjectPath(this.context, this, "GetByNamespace", 1, [namespaceUri], true, false, null)); + return new Excel.CustomXmlPartScopedCollection(this.context, _createMethodObjectPath(this.context, this, "GetByNamespace", 1, [namespaceUri], true, false, null, false)); }; CustomXmlPartCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -17595,7 +20774,7 @@ var Excel; return new Excel.CustomXmlPart(this.context, _createIndexerObjectPath(this.context, this, [id])); }; CustomXmlPartCollection.prototype.getItemOrNullObject=function (id) { - return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null)); + return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null, false)); }; CustomXmlPartCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17614,19 +20793,27 @@ var Excel; } }; CustomXmlPartCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CustomXmlPartCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CustomXmlPartCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.CustomXmlPart(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; CustomXmlPartCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return CustomXmlPartCollection; }(OfficeExtension.ClientObject)); Excel.CustomXmlPartCollection=CustomXmlPartCollection; + var _typeCustomXmlPart="CustomXmlPart"; var CustomXmlPart=(function (_super) { __extends(CustomXmlPart, _super); function CustomXmlPart() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CustomXmlPart.prototype, "_className", { get: function () { @@ -17635,33 +20822,40 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(CustomXmlPart.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "namespaceUri"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(CustomXmlPart.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "CustomXmlPart", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeCustomXmlPart, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(CustomXmlPart.prototype, "namespaceUri", { get: function () { - _throwIfNotLoaded("namespaceUri", this.m_namespaceUri, "CustomXmlPart", this._isNull); - return this.m_namespaceUri; + _throwIfNotLoaded("namespaceUri", this._N, _typeCustomXmlPart, this._isNull); + return this._N; }, enumerable: true, configurable: true }); CustomXmlPart.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; CustomXmlPart.prototype.getXml=function () { - var action=_createMethodAction(this.context, this, "GetXml", 1, []); + var action=_createMethodAction(this.context, this, "GetXml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; CustomXmlPart.prototype.setXml=function (xml) { - _createMethodAction(this.context, this, "SetXml", 0, [xml]); + _createMethodAction(this.context, this, "SetXml", 0, [xml], false); }; CustomXmlPart.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17670,15 +20864,17 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["NamespaceUri"])) { - this.m_namespaceUri=obj["NamespaceUri"]; + this._N=obj["NamespaceUri"]; } }; CustomXmlPart.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CustomXmlPart.prototype.retrieve=function (option) { + return _retrieve(this, option); }; CustomXmlPart.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -17686,22 +20882,31 @@ var Excel; return; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; + CustomXmlPart.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; CustomXmlPart.prototype.toJSON=function () { - return { - "id": this.m_id, - "namespaceUri": this.m_namespaceUri - }; + return _toJson(this, { + "id": this._I, + "namespaceUri": this._N, + }, {}); + }; + CustomXmlPart.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return CustomXmlPart; }(OfficeExtension.ClientObject)); Excel.CustomXmlPart=CustomXmlPart; + var _type_V1Api="_V1Api"; var _V1Api=(function (_super) { __extends(_V1Api, _super); function _V1Api() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(_V1Api.prototype, "_className", { get: function () { @@ -17711,109 +20916,110 @@ var Excel; configurable: true }); _V1Api.prototype.bindingAddColumns=function (input) { - var action=_createMethodAction(this.context, this, "BindingAddColumns", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingAddColumns", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingAddFromNamedItem=function (input) { - var action=_createMethodAction(this.context, this, "BindingAddFromNamedItem", 1, [input]); + var action=_createMethodAction(this.context, this, "BindingAddFromNamedItem", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingAddFromPrompt=function (input) { - var action=_createMethodAction(this.context, this, "BindingAddFromPrompt", 1, [input]); + var action=_createMethodAction(this.context, this, "BindingAddFromPrompt", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingAddFromSelection=function (input) { - var action=_createMethodAction(this.context, this, "BindingAddFromSelection", 1, [input]); + var action=_createMethodAction(this.context, this, "BindingAddFromSelection", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingAddRows=function (input) { - var action=_createMethodAction(this.context, this, "BindingAddRows", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingAddRows", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingClearFormats=function (input) { - var action=_createMethodAction(this.context, this, "BindingClearFormats", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingClearFormats", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingDeleteAllDataValues=function (input) { - var action=_createMethodAction(this.context, this, "BindingDeleteAllDataValues", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingDeleteAllDataValues", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingGetAll=function () { - var action=_createMethodAction(this.context, this, "BindingGetAll", 1, []); + var action=_createMethodAction(this.context, this, "BindingGetAll", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingGetById=function (input) { - var action=_createMethodAction(this.context, this, "BindingGetById", 1, [input]); + var action=_createMethodAction(this.context, this, "BindingGetById", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingGetData=function (input) { - var action=_createMethodAction(this.context, this, "BindingGetData", 1, [input]); + var action=_createMethodAction(this.context, this, "BindingGetData", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingReleaseById=function (input) { - var action=_createMethodAction(this.context, this, "BindingReleaseById", 1, [input]); + var action=_createMethodAction(this.context, this, "BindingReleaseById", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingSetData=function (input) { - var action=_createMethodAction(this.context, this, "BindingSetData", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingSetData", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingSetFormats=function (input) { - var action=_createMethodAction(this.context, this, "BindingSetFormats", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingSetFormats", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingSetTableOptions=function (input) { - var action=_createMethodAction(this.context, this, "BindingSetTableOptions", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingSetTableOptions", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.getFilePropertiesAsync=function () { - var action=_createMethodAction(this.context, this, "GetFilePropertiesAsync", 1, []); + _throwIfApiNotSupported("_V1Api.getFilePropertiesAsync", _defaultApiSetName, "1.6", _hostName); + var action=_createMethodAction(this.context, this, "GetFilePropertiesAsync", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.getSelectedData=function (input) { - var action=_createMethodAction(this.context, this, "GetSelectedData", 1, [input]); + var action=_createMethodAction(this.context, this, "GetSelectedData", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.gotoById=function (input) { - var action=_createMethodAction(this.context, this, "GotoById", 1, [input]); + var action=_createMethodAction(this.context, this, "GotoById", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.setSelectedData=function (input) { - var action=_createMethodAction(this.context, this, "SetSelectedData", 0, [input]); + var action=_createMethodAction(this.context, this, "SetSelectedData", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -17825,16 +21031,21 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); }; + _V1Api.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; _V1Api.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}); }; return _V1Api; }(OfficeExtension.ClientObject)); Excel._V1Api=_V1Api; + var _typePivotTableCollection="PivotTableCollection"; var PivotTableCollection=(function (_super) { __extends(PivotTableCollection, _super); function PivotTableCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(PivotTableCollection.prototype, "_className", { get: function () { @@ -17843,16 +21054,24 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(PivotTableCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(PivotTableCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "PivotTableCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typePivotTableCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); PivotTableCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("PivotTableCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -17861,10 +21080,11 @@ var Excel; return new Excel.PivotTable(this.context, _createIndexerObjectPath(this.context, this, [name])); }; PivotTableCollection.prototype.getItemOrNullObject=function (name) { - return new Excel.PivotTable(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null)); + _throwIfApiNotSupported("PivotTableCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.PivotTable(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null, false)); }; PivotTableCollection.prototype.refreshAll=function () { - _createMethodAction(this.context, this, "RefreshAll", 0, []); + _createMethodAction(this.context, this, "RefreshAll", 0, [], false); }; PivotTableCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17883,19 +21103,27 @@ var Excel; } }; PivotTableCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + PivotTableCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + PivotTableCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.PivotTable(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; PivotTableCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return PivotTableCollection; }(OfficeExtension.ClientObject)); Excel.PivotTableCollection=PivotTableCollection; + var _typePivotTable="PivotTable"; var PivotTable=(function (_super) { __extends(PivotTable, _super); function PivotTable() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(PivotTable.prototype, "_className", { get: function () { @@ -17904,31 +21132,53 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(PivotTable.prototype, "_scalarPropertyNames", { + get: function () { + return ["name", "id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PivotTable.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PivotTable.prototype, "_navigationPropertyNames", { + get: function () { + return ["worksheet"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(PivotTable.prototype, "worksheet", { get: function () { - if (!this.m_worksheet) { - this.m_worksheet=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false)); + if (!this._W) { + this._W=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false, false)); } - return this.m_worksheet; + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(PivotTable.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "PivotTable", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typePivotTable, this._isNull); + _throwIfApiNotSupported("PivotTable.id", _defaultApiSetName, "1.5", _hostName); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(PivotTable.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "PivotTable", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typePivotTable, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -17936,12 +21186,14 @@ var Excel; }); PivotTable.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["name"], [], [ - "worksheet", "worksheet" ]); }; + PivotTable.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; PivotTable.prototype.refresh=function () { - _createMethodAction(this.context, this, "Refresh", 0, []); + _createMethodAction(this.context, this, "Refresh", 0, [], false); }; PivotTable.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17950,16 +21202,18 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } _handleNavigationPropertyResults(this, obj, ["worksheet", "Worksheet"]); }; PivotTable.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + PivotTable.prototype.retrieve=function (option) { + return _retrieve(this, option); }; PivotTable.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -17967,22 +21221,31 @@ var Excel; return; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; + PivotTable.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; PivotTable.prototype.toJSON=function () { - return { - "id": this.m_id, - "name": this.m_name - }; + return _toJson(this, { + "id": this._I, + "name": this._N, + }, {}); + }; + PivotTable.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return PivotTable; }(OfficeExtension.ClientObject)); Excel.PivotTable=PivotTable; + var _typeConditionalFormatCollection="ConditionalFormatCollection"; var ConditionalFormatCollection=(function (_super) { __extends(ConditionalFormatCollection, _super); function ConditionalFormatCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalFormatCollection.prototype, "_className", { get: function () { @@ -17991,28 +21254,38 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalFormatCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalFormatCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ConditionalFormatCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeConditionalFormatCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); ConditionalFormatCollection.prototype.add=function (type) { - return new Excel.ConditionalFormat(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [type], false, true, null)); + return new Excel.ConditionalFormat(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [type], false, true, null, false)); }; ConditionalFormatCollection.prototype.clearAll=function () { - _createMethodAction(this.context, this, "ClearAll", 0, []); + _createMethodAction(this.context, this, "ClearAll", 0, [], false); }; ConditionalFormatCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; + ConditionalFormatCollection.prototype.getItem=function (id) { + return new Excel.ConditionalFormat(this.context, _createIndexerObjectPath(this.context, this, [id])); + }; ConditionalFormatCollection.prototype.getItemAt=function (index) { - return new Excel.ConditionalFormat(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.ConditionalFormat(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; ConditionalFormatCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -18024,26 +21297,34 @@ var Excel; this.m__items=[]; var _data=obj[OfficeExtension.Constants.items]; for (var i=0; i < _data.length; i++) { - var _item=new Excel.ConditionalFormat(this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(false, this.context, this, _data[i], i)); + var _item=new Excel.ConditionalFormat(this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, this.context, this, _data[i], i)); _item._handleResult(_data[i]); this.m__items.push(_item); } } }; ConditionalFormatCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalFormatCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalFormatCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.ConditionalFormat(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; ConditionalFormatCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return ConditionalFormatCollection; }(OfficeExtension.ClientObject)); Excel.ConditionalFormatCollection=ConditionalFormatCollection; + var _typeConditionalFormat="ConditionalFormat"; var ConditionalFormat=(function (_super) { __extends(ConditionalFormat, _super); function ConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalFormat.prototype, "_className", { get: function () { @@ -18052,173 +21333,202 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["stopIfTrue", "priority", "type", "id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, false, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["dataBarOrNullObject", "dataBar", "customOrNullObject", "custom", "iconSet", "iconSetOrNullObject", "colorScale", "colorScaleOrNullObject", "topBottom", "topBottomOrNullObject", "preset", "presetOrNullObject", "textComparison", "textComparisonOrNullObject", "cellValue", "cellValueOrNullObject"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalFormat.prototype, "cellValue", { get: function () { - if (!this.m_cellValue) { - this.m_cellValue=new Excel.CellValueConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CellValue", false, false)); + if (!this._C) { + this._C=new Excel.CellValueConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CellValue", false, false, false)); } - return this.m_cellValue; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "cellValueOrNullObject", { get: function () { - if (!this.m_cellValueOrNullObject) { - this.m_cellValueOrNullObject=new Excel.CellValueConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CellValueOrNullObject", false, false)); + if (!this._Ce) { + this._Ce=new Excel.CellValueConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CellValueOrNullObject", false, false, false)); } - return this.m_cellValueOrNullObject; + return this._Ce; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "colorScale", { get: function () { - if (!this.m_colorScale) { - this.m_colorScale=new Excel.ColorScaleConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "ColorScale", false, false)); + if (!this._Co) { + this._Co=new Excel.ColorScaleConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "ColorScale", false, false, false)); } - return this.m_colorScale; + return this._Co; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "colorScaleOrNullObject", { get: function () { - if (!this.m_colorScaleOrNullObject) { - this.m_colorScaleOrNullObject=new Excel.ColorScaleConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "ColorScaleOrNullObject", false, false)); + if (!this._Col) { + this._Col=new Excel.ColorScaleConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "ColorScaleOrNullObject", false, false, false)); } - return this.m_colorScaleOrNullObject; + return this._Col; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "custom", { get: function () { - if (!this.m_custom) { - this.m_custom=new Excel.CustomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "Custom", false, false)); + if (!this._Cu) { + this._Cu=new Excel.CustomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "Custom", false, false, false)); } - return this.m_custom; + return this._Cu; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "customOrNullObject", { get: function () { - if (!this.m_customOrNullObject) { - this.m_customOrNullObject=new Excel.CustomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CustomOrNullObject", false, false)); + if (!this._Cus) { + this._Cus=new Excel.CustomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CustomOrNullObject", false, false, false)); } - return this.m_customOrNullObject; + return this._Cus; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "dataBar", { get: function () { - if (!this.m_dataBar) { - this.m_dataBar=new Excel.DataBarConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "DataBar", false, false)); + if (!this._D) { + this._D=new Excel.DataBarConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "DataBar", false, false, false)); } - return this.m_dataBar; + return this._D; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "dataBarOrNullObject", { get: function () { - if (!this.m_dataBarOrNullObject) { - this.m_dataBarOrNullObject=new Excel.DataBarConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "DataBarOrNullObject", false, false)); + if (!this._Da) { + this._Da=new Excel.DataBarConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "DataBarOrNullObject", false, false, false)); } - return this.m_dataBarOrNullObject; + return this._Da; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "iconSet", { get: function () { - if (!this.m_iconSet) { - this.m_iconSet=new Excel.IconSetConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "IconSet", false, false)); + if (!this._I) { + this._I=new Excel.IconSetConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "IconSet", false, false, false)); } - return this.m_iconSet; + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "iconSetOrNullObject", { get: function () { - if (!this.m_iconSetOrNullObject) { - this.m_iconSetOrNullObject=new Excel.IconSetConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "IconSetOrNullObject", false, false)); + if (!this._Ic) { + this._Ic=new Excel.IconSetConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "IconSetOrNullObject", false, false, false)); } - return this.m_iconSetOrNullObject; + return this._Ic; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "preset", { get: function () { - if (!this.m_preset) { - this.m_preset=new Excel.PresetCriteriaConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "Preset", false, false)); + if (!this._P) { + this._P=new Excel.PresetCriteriaConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "Preset", false, false, false)); } - return this.m_preset; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "presetOrNullObject", { get: function () { - if (!this.m_presetOrNullObject) { - this.m_presetOrNullObject=new Excel.PresetCriteriaConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "PresetOrNullObject", false, false)); + if (!this._Pr) { + this._Pr=new Excel.PresetCriteriaConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "PresetOrNullObject", false, false, false)); } - return this.m_presetOrNullObject; + return this._Pr; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "textComparison", { get: function () { - if (!this.m_textComparison) { - this.m_textComparison=new Excel.TextConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TextComparison", false, false)); + if (!this._T) { + this._T=new Excel.TextConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TextComparison", false, false, false)); } - return this.m_textComparison; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "textComparisonOrNullObject", { get: function () { - if (!this.m_textComparisonOrNullObject) { - this.m_textComparisonOrNullObject=new Excel.TextConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TextComparisonOrNullObject", false, false)); + if (!this._Te) { + this._Te=new Excel.TextConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TextComparisonOrNullObject", false, false, false)); } - return this.m_textComparisonOrNullObject; + return this._Te; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "topBottom", { get: function () { - if (!this.m_topBottom) { - this.m_topBottom=new Excel.TopBottomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TopBottom", false, false)); + if (!this._To) { + this._To=new Excel.TopBottomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TopBottom", false, false, false)); } - return this.m_topBottom; + return this._To; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "topBottomOrNullObject", { get: function () { - if (!this.m_topBottomOrNullObject) { - this.m_topBottomOrNullObject=new Excel.TopBottomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TopBottomOrNullObject", false, false)); + if (!this._Top) { + this._Top=new Excel.TopBottomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TopBottomOrNullObject", false, false, false)); } - return this.m_topBottomOrNullObject; + return this._Top; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._Id0, _typeConditionalFormat, this._isNull); + return this._Id0; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "priority", { get: function () { - _throwIfNotLoaded("priority", this.m_priority, "ConditionalFormat", this._isNull); - return this.m_priority; + _throwIfNotLoaded("priority", this._Pri, _typeConditionalFormat, this._isNull); + return this._Pri; }, set: function (value) { - this.m_priority=value; + this._Pri=value; _createSetPropertyAction(this.context, this, "Priority", value); }, enumerable: true, @@ -18226,11 +21536,11 @@ var Excel; }); Object.defineProperty(ConditionalFormat.prototype, "stopIfTrue", { get: function () { - _throwIfNotLoaded("stopIfTrue", this.m_stopIfTrue, "ConditionalFormat", this._isNull); - return this.m_stopIfTrue; + _throwIfNotLoaded("stopIfTrue", this._S, _typeConditionalFormat, this._isNull); + return this._S; }, set: function (value) { - this.m_stopIfTrue=value; + this._S=value; _createSetPropertyAction(this.context, this, "StopIfTrue", value); }, enumerable: true, @@ -18238,8 +21548,8 @@ var Excel; }); Object.defineProperty(ConditionalFormat.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "ConditionalFormat", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._Ty, _typeConditionalFormat, this._isNull); + return this._Ty; }, enumerable: true, configurable: true @@ -18247,14 +21557,17 @@ var Excel; ConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["stopIfTrue", "priority"], ["dataBarOrNullObject", "dataBar", "customOrNullObject", "custom", "iconSet", "iconSetOrNullObject", "colorScale", "colorScaleOrNullObject", "topBottom", "topBottomOrNullObject", "preset", "presetOrNullObject", "textComparison", "textComparisonOrNullObject", "cellValue", "cellValueOrNullObject"], []); }; + ConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalFormat.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; ConditionalFormat.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); }; ConditionalFormat.prototype.getRangeOrNullObject=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRangeOrNullObject", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRangeOrNullObject", 1, [], false, true, null, false)); }; ConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -18262,51 +21575,76 @@ var Excel; return; var obj=value; _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._Id0=obj["Id"]; + } if (!_isUndefined(obj["Priority"])) { - this.m_priority=obj["Priority"]; + this._Pri=obj["Priority"]; } if (!_isUndefined(obj["StopIfTrue"])) { - this.m_stopIfTrue=obj["StopIfTrue"]; + this._S=obj["StopIfTrue"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._Ty=obj["Type"]; } _handleNavigationPropertyResults(this, obj, ["cellValue", "CellValue", "cellValueOrNullObject", "CellValueOrNullObject", "colorScale", "ColorScale", "colorScaleOrNullObject", "ColorScaleOrNullObject", "custom", "Custom", "customOrNullObject", "CustomOrNullObject", "dataBar", "DataBar", "dataBarOrNullObject", "DataBarOrNullObject", "iconSet", "IconSet", "iconSetOrNullObject", "IconSetOrNullObject", "preset", "Preset", "presetOrNullObject", "PresetOrNullObject", "textComparison", "TextComparison", "textComparisonOrNullObject", "TextComparisonOrNullObject", "topBottom", "TopBottom", "topBottomOrNullObject", "TopBottomOrNullObject"]); }; ConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalFormat.prototype._handleIdResult=function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._Id0=value["Id"]; + } + }; + ConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalFormat.prototype.toJSON=function () { - return { - "cellValue": this.m_cellValue, - "cellValueOrNullObject": this.m_cellValueOrNullObject, - "colorScale": this.m_colorScale, - "colorScaleOrNullObject": this.m_colorScaleOrNullObject, - "custom": this.m_custom, - "customOrNullObject": this.m_customOrNullObject, - "dataBar": this.m_dataBar, - "dataBarOrNullObject": this.m_dataBarOrNullObject, - "iconSet": this.m_iconSet, - "iconSetOrNullObject": this.m_iconSetOrNullObject, - "preset": this.m_preset, - "presetOrNullObject": this.m_presetOrNullObject, - "priority": this.m_priority, - "stopIfTrue": this.m_stopIfTrue, - "textComparison": this.m_textComparison, - "textComparisonOrNullObject": this.m_textComparisonOrNullObject, - "topBottom": this.m_topBottom, - "topBottomOrNullObject": this.m_topBottomOrNullObject, - "type": this.m_type - }; + return _toJson(this, { + "id": this._Id0, + "priority": this._Pri, + "stopIfTrue": this._S, + "type": this._Ty, + }, { + "cellValue": this._C, + "cellValueOrNullObject": this._Ce, + "colorScale": this._Co, + "colorScaleOrNullObject": this._Col, + "custom": this._Cu, + "customOrNullObject": this._Cus, + "dataBar": this._D, + "dataBarOrNullObject": this._Da, + "iconSet": this._I, + "iconSetOrNullObject": this._Ic, + "preset": this._P, + "presetOrNullObject": this._Pr, + "textComparison": this._T, + "textComparisonOrNullObject": this._Te, + "topBottom": this._To, + "topBottomOrNullObject": this._Top, + }); + }; + ConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalFormat; }(OfficeExtension.ClientObject)); Excel.ConditionalFormat=ConditionalFormat; + var _typeDataBarConditionalFormat="DataBarConditionalFormat"; var DataBarConditionalFormat=(function (_super) { __extends(DataBarConditionalFormat, _super); function DataBarConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(DataBarConditionalFormat.prototype, "_className", { get: function () { @@ -18315,33 +21653,54 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(DataBarConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["showDataBarOnly", "barDirection", "axisFormat", "axisColor", "lowerBoundRule", "upperBoundRule"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DataBarConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DataBarConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["positiveFormat", "negativeFormat"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(DataBarConditionalFormat.prototype, "negativeFormat", { get: function () { - if (!this.m_negativeFormat) { - this.m_negativeFormat=new Excel.ConditionalDataBarNegativeFormat(this.context, _createPropertyObjectPath(this.context, this, "NegativeFormat", false, false)); + if (!this._N) { + this._N=new Excel.ConditionalDataBarNegativeFormat(this.context, _createPropertyObjectPath(this.context, this, "NegativeFormat", false, false, false)); } - return this.m_negativeFormat; + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(DataBarConditionalFormat.prototype, "positiveFormat", { get: function () { - if (!this.m_positiveFormat) { - this.m_positiveFormat=new Excel.ConditionalDataBarPositiveFormat(this.context, _createPropertyObjectPath(this.context, this, "PositiveFormat", false, false)); + if (!this._P) { + this._P=new Excel.ConditionalDataBarPositiveFormat(this.context, _createPropertyObjectPath(this.context, this, "PositiveFormat", false, false, false)); } - return this.m_positiveFormat; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(DataBarConditionalFormat.prototype, "axisColor", { get: function () { - _throwIfNotLoaded("axisColor", this.m_axisColor, "DataBarConditionalFormat", this._isNull); - return this.m_axisColor; + _throwIfNotLoaded("axisColor", this._A, _typeDataBarConditionalFormat, this._isNull); + return this._A; }, set: function (value) { - this.m_axisColor=value; + this._A=value; _createSetPropertyAction(this.context, this, "AxisColor", value); }, enumerable: true, @@ -18349,11 +21708,11 @@ var Excel; }); Object.defineProperty(DataBarConditionalFormat.prototype, "axisFormat", { get: function () { - _throwIfNotLoaded("axisFormat", this.m_axisFormat, "DataBarConditionalFormat", this._isNull); - return this.m_axisFormat; + _throwIfNotLoaded("axisFormat", this._Ax, _typeDataBarConditionalFormat, this._isNull); + return this._Ax; }, set: function (value) { - this.m_axisFormat=value; + this._Ax=value; _createSetPropertyAction(this.context, this, "AxisFormat", value); }, enumerable: true, @@ -18361,11 +21720,11 @@ var Excel; }); Object.defineProperty(DataBarConditionalFormat.prototype, "barDirection", { get: function () { - _throwIfNotLoaded("barDirection", this.m_barDirection, "DataBarConditionalFormat", this._isNull); - return this.m_barDirection; + _throwIfNotLoaded("barDirection", this._B, _typeDataBarConditionalFormat, this._isNull); + return this._B; }, set: function (value) { - this.m_barDirection=value; + this._B=value; _createSetPropertyAction(this.context, this, "BarDirection", value); }, enumerable: true, @@ -18373,11 +21732,11 @@ var Excel; }); Object.defineProperty(DataBarConditionalFormat.prototype, "lowerBoundRule", { get: function () { - _throwIfNotLoaded("lowerBoundRule", this.m_lowerBoundRule, "DataBarConditionalFormat", this._isNull); - return this.m_lowerBoundRule; + _throwIfNotLoaded("lowerBoundRule", this._L, _typeDataBarConditionalFormat, this._isNull); + return this._L; }, set: function (value) { - this.m_lowerBoundRule=value; + this._L=value; _createSetPropertyAction(this.context, this, "LowerBoundRule", value); }, enumerable: true, @@ -18385,11 +21744,11 @@ var Excel; }); Object.defineProperty(DataBarConditionalFormat.prototype, "showDataBarOnly", { get: function () { - _throwIfNotLoaded("showDataBarOnly", this.m_showDataBarOnly, "DataBarConditionalFormat", this._isNull); - return this.m_showDataBarOnly; + _throwIfNotLoaded("showDataBarOnly", this._S, _typeDataBarConditionalFormat, this._isNull); + return this._S; }, set: function (value) { - this.m_showDataBarOnly=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShowDataBarOnly", value); }, enumerable: true, @@ -18397,11 +21756,11 @@ var Excel; }); Object.defineProperty(DataBarConditionalFormat.prototype, "upperBoundRule", { get: function () { - _throwIfNotLoaded("upperBoundRule", this.m_upperBoundRule, "DataBarConditionalFormat", this._isNull); - return this.m_upperBoundRule; + _throwIfNotLoaded("upperBoundRule", this._U, _typeDataBarConditionalFormat, this._isNull); + return this._U; }, set: function (value) { - this.m_upperBoundRule=value; + this._U=value; _createSetPropertyAction(this.context, this, "UpperBoundRule", value); }, enumerable: true, @@ -18410,6 +21769,9 @@ var Excel; DataBarConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["showDataBarOnly", "barDirection", "axisFormat", "axisColor", "lowerBoundRule", "upperBoundRule"], ["positiveFormat", "negativeFormat"], []); }; + DataBarConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; DataBarConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18417,48 +21779,60 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["AxisColor"])) { - this.m_axisColor=obj["AxisColor"]; + this._A=obj["AxisColor"]; } if (!_isUndefined(obj["AxisFormat"])) { - this.m_axisFormat=obj["AxisFormat"]; + this._Ax=obj["AxisFormat"]; } if (!_isUndefined(obj["BarDirection"])) { - this.m_barDirection=obj["BarDirection"]; + this._B=obj["BarDirection"]; } if (!_isUndefined(obj["LowerBoundRule"])) { - this.m_lowerBoundRule=obj["LowerBoundRule"]; + this._L=obj["LowerBoundRule"]; } if (!_isUndefined(obj["ShowDataBarOnly"])) { - this.m_showDataBarOnly=obj["ShowDataBarOnly"]; + this._S=obj["ShowDataBarOnly"]; } if (!_isUndefined(obj["UpperBoundRule"])) { - this.m_upperBoundRule=obj["UpperBoundRule"]; + this._U=obj["UpperBoundRule"]; } _handleNavigationPropertyResults(this, obj, ["negativeFormat", "NegativeFormat", "positiveFormat", "PositiveFormat"]); }; DataBarConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + DataBarConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + DataBarConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; DataBarConditionalFormat.prototype.toJSON=function () { - return { - "axisColor": this.m_axisColor, - "axisFormat": this.m_axisFormat, - "barDirection": this.m_barDirection, - "lowerBoundRule": this.m_lowerBoundRule, - "negativeFormat": this.m_negativeFormat, - "positiveFormat": this.m_positiveFormat, - "showDataBarOnly": this.m_showDataBarOnly, - "upperBoundRule": this.m_upperBoundRule - }; + return _toJson(this, { + "axisColor": this._A, + "axisFormat": this._Ax, + "barDirection": this._B, + "lowerBoundRule": this._L, + "showDataBarOnly": this._S, + "upperBoundRule": this._U, + }, { + "negativeFormat": this._N, + "positiveFormat": this._P, + }); + }; + DataBarConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return DataBarConditionalFormat; }(OfficeExtension.ClientObject)); Excel.DataBarConditionalFormat=DataBarConditionalFormat; + var _typeConditionalDataBarPositiveFormat="ConditionalDataBarPositiveFormat"; var ConditionalDataBarPositiveFormat=(function (_super) { __extends(ConditionalDataBarPositiveFormat, _super); function ConditionalDataBarPositiveFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "_className", { get: function () { @@ -18467,13 +21841,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["fillColor", "gradientFill", "borderColor"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "borderColor", { get: function () { - _throwIfNotLoaded("borderColor", this.m_borderColor, "ConditionalDataBarPositiveFormat", this._isNull); - return this.m_borderColor; + _throwIfNotLoaded("borderColor", this._B, _typeConditionalDataBarPositiveFormat, this._isNull); + return this._B; }, set: function (value) { - this.m_borderColor=value; + this._B=value; _createSetPropertyAction(this.context, this, "BorderColor", value); }, enumerable: true, @@ -18481,11 +21869,11 @@ var Excel; }); Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "fillColor", { get: function () { - _throwIfNotLoaded("fillColor", this.m_fillColor, "ConditionalDataBarPositiveFormat", this._isNull); - return this.m_fillColor; + _throwIfNotLoaded("fillColor", this._F, _typeConditionalDataBarPositiveFormat, this._isNull); + return this._F; }, set: function (value) { - this.m_fillColor=value; + this._F=value; _createSetPropertyAction(this.context, this, "FillColor", value); }, enumerable: true, @@ -18493,11 +21881,11 @@ var Excel; }); Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "gradientFill", { get: function () { - _throwIfNotLoaded("gradientFill", this.m_gradientFill, "ConditionalDataBarPositiveFormat", this._isNull); - return this.m_gradientFill; + _throwIfNotLoaded("gradientFill", this._G, _typeConditionalDataBarPositiveFormat, this._isNull); + return this._G; }, set: function (value) { - this.m_gradientFill=value; + this._G=value; _createSetPropertyAction(this.context, this, "GradientFill", value); }, enumerable: true, @@ -18506,6 +21894,9 @@ var Excel; ConditionalDataBarPositiveFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["fillColor", "gradientFill", "borderColor"], [], []); }; + ConditionalDataBarPositiveFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalDataBarPositiveFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18513,33 +21904,44 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["BorderColor"])) { - this.m_borderColor=obj["BorderColor"]; + this._B=obj["BorderColor"]; } if (!_isUndefined(obj["FillColor"])) { - this.m_fillColor=obj["FillColor"]; + this._F=obj["FillColor"]; } if (!_isUndefined(obj["GradientFill"])) { - this.m_gradientFill=obj["GradientFill"]; + this._G=obj["GradientFill"]; } }; ConditionalDataBarPositiveFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalDataBarPositiveFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalDataBarPositiveFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalDataBarPositiveFormat.prototype.toJSON=function () { - return { - "borderColor": this.m_borderColor, - "fillColor": this.m_fillColor, - "gradientFill": this.m_gradientFill - }; + return _toJson(this, { + "borderColor": this._B, + "fillColor": this._F, + "gradientFill": this._G, + }, {}); + }; + ConditionalDataBarPositiveFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalDataBarPositiveFormat; }(OfficeExtension.ClientObject)); Excel.ConditionalDataBarPositiveFormat=ConditionalDataBarPositiveFormat; + var _typeConditionalDataBarNegativeFormat="ConditionalDataBarNegativeFormat"; var ConditionalDataBarNegativeFormat=(function (_super) { __extends(ConditionalDataBarNegativeFormat, _super); function ConditionalDataBarNegativeFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "_className", { get: function () { @@ -18548,13 +21950,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["fillColor", "matchPositiveFillColor", "borderColor", "matchPositiveBorderColor"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "borderColor", { get: function () { - _throwIfNotLoaded("borderColor", this.m_borderColor, "ConditionalDataBarNegativeFormat", this._isNull); - return this.m_borderColor; + _throwIfNotLoaded("borderColor", this._B, _typeConditionalDataBarNegativeFormat, this._isNull); + return this._B; }, set: function (value) { - this.m_borderColor=value; + this._B=value; _createSetPropertyAction(this.context, this, "BorderColor", value); }, enumerable: true, @@ -18562,11 +21978,11 @@ var Excel; }); Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "fillColor", { get: function () { - _throwIfNotLoaded("fillColor", this.m_fillColor, "ConditionalDataBarNegativeFormat", this._isNull); - return this.m_fillColor; + _throwIfNotLoaded("fillColor", this._F, _typeConditionalDataBarNegativeFormat, this._isNull); + return this._F; }, set: function (value) { - this.m_fillColor=value; + this._F=value; _createSetPropertyAction(this.context, this, "FillColor", value); }, enumerable: true, @@ -18574,11 +21990,11 @@ var Excel; }); Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "matchPositiveBorderColor", { get: function () { - _throwIfNotLoaded("matchPositiveBorderColor", this.m_matchPositiveBorderColor, "ConditionalDataBarNegativeFormat", this._isNull); - return this.m_matchPositiveBorderColor; + _throwIfNotLoaded("matchPositiveBorderColor", this._M, _typeConditionalDataBarNegativeFormat, this._isNull); + return this._M; }, set: function (value) { - this.m_matchPositiveBorderColor=value; + this._M=value; _createSetPropertyAction(this.context, this, "MatchPositiveBorderColor", value); }, enumerable: true, @@ -18586,11 +22002,11 @@ var Excel; }); Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "matchPositiveFillColor", { get: function () { - _throwIfNotLoaded("matchPositiveFillColor", this.m_matchPositiveFillColor, "ConditionalDataBarNegativeFormat", this._isNull); - return this.m_matchPositiveFillColor; + _throwIfNotLoaded("matchPositiveFillColor", this._Ma, _typeConditionalDataBarNegativeFormat, this._isNull); + return this._Ma; }, set: function (value) { - this.m_matchPositiveFillColor=value; + this._Ma=value; _createSetPropertyAction(this.context, this, "MatchPositiveFillColor", value); }, enumerable: true, @@ -18599,6 +22015,9 @@ var Excel; ConditionalDataBarNegativeFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["fillColor", "matchPositiveFillColor", "borderColor", "matchPositiveBorderColor"], [], []); }; + ConditionalDataBarNegativeFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalDataBarNegativeFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18606,37 +22025,48 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["BorderColor"])) { - this.m_borderColor=obj["BorderColor"]; + this._B=obj["BorderColor"]; } if (!_isUndefined(obj["FillColor"])) { - this.m_fillColor=obj["FillColor"]; + this._F=obj["FillColor"]; } if (!_isUndefined(obj["MatchPositiveBorderColor"])) { - this.m_matchPositiveBorderColor=obj["MatchPositiveBorderColor"]; + this._M=obj["MatchPositiveBorderColor"]; } if (!_isUndefined(obj["MatchPositiveFillColor"])) { - this.m_matchPositiveFillColor=obj["MatchPositiveFillColor"]; + this._Ma=obj["MatchPositiveFillColor"]; } }; ConditionalDataBarNegativeFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalDataBarNegativeFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalDataBarNegativeFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalDataBarNegativeFormat.prototype.toJSON=function () { - return { - "borderColor": this.m_borderColor, - "fillColor": this.m_fillColor, - "matchPositiveBorderColor": this.m_matchPositiveBorderColor, - "matchPositiveFillColor": this.m_matchPositiveFillColor - }; + return _toJson(this, { + "borderColor": this._B, + "fillColor": this._F, + "matchPositiveBorderColor": this._M, + "matchPositiveFillColor": this._Ma, + }, {}); + }; + ConditionalDataBarNegativeFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalDataBarNegativeFormat; }(OfficeExtension.ClientObject)); Excel.ConditionalDataBarNegativeFormat=ConditionalDataBarNegativeFormat; + var _typeCustomConditionalFormat="CustomConditionalFormat"; var CustomConditionalFormat=(function (_super) { __extends(CustomConditionalFormat, _super); function CustomConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CustomConditionalFormat.prototype, "_className", { get: function () { @@ -18645,22 +22075,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(CustomConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["rule", "format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(CustomConditionalFormat.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(CustomConditionalFormat.prototype, "rule", { get: function () { - if (!this.m_rule) { - this.m_rule=new Excel.ConditionalFormatRule(this.context, _createPropertyObjectPath(this.context, this, "Rule", false, false)); + if (!this._R) { + this._R=new Excel.ConditionalFormatRule(this.context, _createPropertyObjectPath(this.context, this, "Rule", false, false, false)); } - return this.m_rule; + return this._R; }, enumerable: true, configurable: true @@ -18668,6 +22105,9 @@ var Excel; CustomConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, [], ["rule", "format"], []); }; + CustomConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; CustomConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18677,22 +22117,33 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["format", "Format", "rule", "Rule"]); }; CustomConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CustomConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CustomConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; CustomConditionalFormat.prototype.toJSON=function () { - return { - "format": this.m_format, - "rule": this.m_rule - }; + return _toJson(this, {}, { + "format": this._F, + "rule": this._R, + }); + }; + CustomConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return CustomConditionalFormat; }(OfficeExtension.ClientObject)); Excel.CustomConditionalFormat=CustomConditionalFormat; + var _typeConditionalFormatRule="ConditionalFormatRule"; var ConditionalFormatRule=(function (_super) { __extends(ConditionalFormatRule, _super); function ConditionalFormatRule() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalFormatRule.prototype, "_className", { get: function () { @@ -18701,13 +22152,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalFormatRule.prototype, "_scalarPropertyNames", { + get: function () { + return ["formula", "formulaLocal", "formulaR1C1"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormatRule.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalFormatRule.prototype, "formula", { get: function () { - _throwIfNotLoaded("formula", this.m_formula, "ConditionalFormatRule", this._isNull); - return this.m_formula; + _throwIfNotLoaded("formula", this._F, _typeConditionalFormatRule, this._isNull); + return this._F; }, set: function (value) { - this.m_formula=value; + this._F=value; _createSetPropertyAction(this.context, this, "Formula", value); }, enumerable: true, @@ -18715,11 +22180,11 @@ var Excel; }); Object.defineProperty(ConditionalFormatRule.prototype, "formulaLocal", { get: function () { - _throwIfNotLoaded("formulaLocal", this.m_formulaLocal, "ConditionalFormatRule", this._isNull); - return this.m_formulaLocal; + _throwIfNotLoaded("formulaLocal", this._Fo, _typeConditionalFormatRule, this._isNull); + return this._Fo; }, set: function (value) { - this.m_formulaLocal=value; + this._Fo=value; _createSetPropertyAction(this.context, this, "FormulaLocal", value); }, enumerable: true, @@ -18727,11 +22192,11 @@ var Excel; }); Object.defineProperty(ConditionalFormatRule.prototype, "formulaR1C1", { get: function () { - _throwIfNotLoaded("formulaR1C1", this.m_formulaR1C1, "ConditionalFormatRule", this._isNull); - return this.m_formulaR1C1; + _throwIfNotLoaded("formulaR1C1", this._For, _typeConditionalFormatRule, this._isNull); + return this._For; }, set: function (value) { - this.m_formulaR1C1=value; + this._For=value; _createSetPropertyAction(this.context, this, "FormulaR1C1", value); }, enumerable: true, @@ -18740,6 +22205,9 @@ var Excel; ConditionalFormatRule.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["formula", "formulaLocal", "formulaR1C1"], [], []); }; + ConditionalFormatRule.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalFormatRule.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18747,33 +22215,44 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Formula"])) { - this.m_formula=obj["Formula"]; + this._F=obj["Formula"]; } if (!_isUndefined(obj["FormulaLocal"])) { - this.m_formulaLocal=obj["FormulaLocal"]; + this._Fo=obj["FormulaLocal"]; } if (!_isUndefined(obj["FormulaR1C1"])) { - this.m_formulaR1C1=obj["FormulaR1C1"]; + this._For=obj["FormulaR1C1"]; } }; ConditionalFormatRule.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalFormatRule.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalFormatRule.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalFormatRule.prototype.toJSON=function () { - return { - "formula": this.m_formula, - "formulaLocal": this.m_formulaLocal, - "formulaR1C1": this.m_formulaR1C1 - }; + return _toJson(this, { + "formula": this._F, + "formulaLocal": this._Fo, + "formulaR1C1": this._For, + }, {}); + }; + ConditionalFormatRule.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalFormatRule; }(OfficeExtension.ClientObject)); Excel.ConditionalFormatRule=ConditionalFormatRule; + var _typeIconSetConditionalFormat="IconSetConditionalFormat"; var IconSetConditionalFormat=(function (_super) { __extends(IconSetConditionalFormat, _super); function IconSetConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(IconSetConditionalFormat.prototype, "_className", { get: function () { @@ -18782,13 +22261,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(IconSetConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["reverseIconOrder", "showIconOnly", "style", "criteria"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(IconSetConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(IconSetConditionalFormat.prototype, "criteria", { get: function () { - _throwIfNotLoaded("criteria", this.m_criteria, "IconSetConditionalFormat", this._isNull); - return this.m_criteria; + _throwIfNotLoaded("criteria", this._C, _typeIconSetConditionalFormat, this._isNull); + return this._C; }, set: function (value) { - this.m_criteria=value; + this._C=value; _createSetPropertyAction(this.context, this, "Criteria", value); }, enumerable: true, @@ -18796,11 +22289,11 @@ var Excel; }); Object.defineProperty(IconSetConditionalFormat.prototype, "reverseIconOrder", { get: function () { - _throwIfNotLoaded("reverseIconOrder", this.m_reverseIconOrder, "IconSetConditionalFormat", this._isNull); - return this.m_reverseIconOrder; + _throwIfNotLoaded("reverseIconOrder", this._R, _typeIconSetConditionalFormat, this._isNull); + return this._R; }, set: function (value) { - this.m_reverseIconOrder=value; + this._R=value; _createSetPropertyAction(this.context, this, "ReverseIconOrder", value); }, enumerable: true, @@ -18808,11 +22301,11 @@ var Excel; }); Object.defineProperty(IconSetConditionalFormat.prototype, "showIconOnly", { get: function () { - _throwIfNotLoaded("showIconOnly", this.m_showIconOnly, "IconSetConditionalFormat", this._isNull); - return this.m_showIconOnly; + _throwIfNotLoaded("showIconOnly", this._S, _typeIconSetConditionalFormat, this._isNull); + return this._S; }, set: function (value) { - this.m_showIconOnly=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShowIconOnly", value); }, enumerable: true, @@ -18820,11 +22313,11 @@ var Excel; }); Object.defineProperty(IconSetConditionalFormat.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "IconSetConditionalFormat", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._St, _typeIconSetConditionalFormat, this._isNull); + return this._St; }, set: function (value) { - this.m_style=value; + this._St=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -18833,6 +22326,9 @@ var Excel; IconSetConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["reverseIconOrder", "showIconOnly", "style", "criteria"], [], []); }; + IconSetConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; IconSetConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18840,37 +22336,48 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Criteria"])) { - this.m_criteria=obj["Criteria"]; + this._C=obj["Criteria"]; } if (!_isUndefined(obj["ReverseIconOrder"])) { - this.m_reverseIconOrder=obj["ReverseIconOrder"]; + this._R=obj["ReverseIconOrder"]; } if (!_isUndefined(obj["ShowIconOnly"])) { - this.m_showIconOnly=obj["ShowIconOnly"]; + this._S=obj["ShowIconOnly"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._St=obj["Style"]; } }; IconSetConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + IconSetConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + IconSetConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; IconSetConditionalFormat.prototype.toJSON=function () { - return { - "criteria": this.m_criteria, - "reverseIconOrder": this.m_reverseIconOrder, - "showIconOnly": this.m_showIconOnly, - "style": this.m_style - }; + return _toJson(this, { + "criteria": this._C, + "reverseIconOrder": this._R, + "showIconOnly": this._S, + "style": this._St, + }, {}); + }; + IconSetConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return IconSetConditionalFormat; }(OfficeExtension.ClientObject)); Excel.IconSetConditionalFormat=IconSetConditionalFormat; + var _typeColorScaleConditionalFormat="ColorScaleConditionalFormat"; var ColorScaleConditionalFormat=(function (_super) { __extends(ColorScaleConditionalFormat, _super); function ColorScaleConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ColorScaleConditionalFormat.prototype, "_className", { get: function () { @@ -18879,13 +22386,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ColorScaleConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["threeColorScale", "criteria"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ColorScaleConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ColorScaleConditionalFormat.prototype, "criteria", { get: function () { - _throwIfNotLoaded("criteria", this.m_criteria, "ColorScaleConditionalFormat", this._isNull); - return this.m_criteria; + _throwIfNotLoaded("criteria", this._C, _typeColorScaleConditionalFormat, this._isNull); + return this._C; }, set: function (value) { - this.m_criteria=value; + this._C=value; _createSetPropertyAction(this.context, this, "Criteria", value); }, enumerable: true, @@ -18893,8 +22414,8 @@ var Excel; }); Object.defineProperty(ColorScaleConditionalFormat.prototype, "threeColorScale", { get: function () { - _throwIfNotLoaded("threeColorScale", this.m_threeColorScale, "ColorScaleConditionalFormat", this._isNull); - return this.m_threeColorScale; + _throwIfNotLoaded("threeColorScale", this._T, _typeColorScaleConditionalFormat, this._isNull); + return this._T; }, enumerable: true, configurable: true @@ -18902,6 +22423,9 @@ var Excel; ColorScaleConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["criteria"], [], []); }; + ColorScaleConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ColorScaleConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18909,29 +22433,40 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Criteria"])) { - this.m_criteria=obj["Criteria"]; + this._C=obj["Criteria"]; } if (!_isUndefined(obj["ThreeColorScale"])) { - this.m_threeColorScale=obj["ThreeColorScale"]; + this._T=obj["ThreeColorScale"]; } }; ColorScaleConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ColorScaleConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ColorScaleConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ColorScaleConditionalFormat.prototype.toJSON=function () { - return { - "criteria": this.m_criteria, - "threeColorScale": this.m_threeColorScale - }; + return _toJson(this, { + "criteria": this._C, + "threeColorScale": this._T, + }, {}); + }; + ColorScaleConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ColorScaleConditionalFormat; }(OfficeExtension.ClientObject)); Excel.ColorScaleConditionalFormat=ColorScaleConditionalFormat; + var _typeTopBottomConditionalFormat="TopBottomConditionalFormat"; var TopBottomConditionalFormat=(function (_super) { __extends(TopBottomConditionalFormat, _super); function TopBottomConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TopBottomConditionalFormat.prototype, "_className", { get: function () { @@ -18940,23 +22475,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TopBottomConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["rule"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TopBottomConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TopBottomConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TopBottomConditionalFormat.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(TopBottomConditionalFormat.prototype, "rule", { get: function () { - _throwIfNotLoaded("rule", this.m_rule, "TopBottomConditionalFormat", this._isNull); - return this.m_rule; + _throwIfNotLoaded("rule", this._R, _typeTopBottomConditionalFormat, this._isNull); + return this._R; }, set: function (value) { - this.m_rule=value; + this._R=value; _createSetPropertyAction(this.context, this, "Rule", value); }, enumerable: true, @@ -18965,6 +22521,9 @@ var Excel; TopBottomConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["rule"], ["format"], []); }; + TopBottomConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; TopBottomConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18972,27 +22531,39 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Rule"])) { - this.m_rule=obj["Rule"]; + this._R=obj["Rule"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; TopBottomConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TopBottomConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TopBottomConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; TopBottomConditionalFormat.prototype.toJSON=function () { - return { - "format": this.m_format, - "rule": this.m_rule - }; + return _toJson(this, { + "rule": this._R, + }, { + "format": this._F, + }); + }; + TopBottomConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TopBottomConditionalFormat; }(OfficeExtension.ClientObject)); Excel.TopBottomConditionalFormat=TopBottomConditionalFormat; + var _typePresetCriteriaConditionalFormat="PresetCriteriaConditionalFormat"; var PresetCriteriaConditionalFormat=(function (_super) { __extends(PresetCriteriaConditionalFormat, _super); function PresetCriteriaConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "_className", { get: function () { @@ -19001,23 +22572,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["rule"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "rule", { get: function () { - _throwIfNotLoaded("rule", this.m_rule, "PresetCriteriaConditionalFormat", this._isNull); - return this.m_rule; + _throwIfNotLoaded("rule", this._R, _typePresetCriteriaConditionalFormat, this._isNull); + return this._R; }, set: function (value) { - this.m_rule=value; + this._R=value; _createSetPropertyAction(this.context, this, "Rule", value); }, enumerable: true, @@ -19026,6 +22618,9 @@ var Excel; PresetCriteriaConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["rule"], ["format"], []); }; + PresetCriteriaConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; PresetCriteriaConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -19033,27 +22628,39 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Rule"])) { - this.m_rule=obj["Rule"]; + this._R=obj["Rule"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; PresetCriteriaConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + PresetCriteriaConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + PresetCriteriaConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; PresetCriteriaConditionalFormat.prototype.toJSON=function () { - return { - "format": this.m_format, - "rule": this.m_rule - }; + return _toJson(this, { + "rule": this._R, + }, { + "format": this._F, + }); + }; + PresetCriteriaConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return PresetCriteriaConditionalFormat; }(OfficeExtension.ClientObject)); Excel.PresetCriteriaConditionalFormat=PresetCriteriaConditionalFormat; + var _typeTextConditionalFormat="TextConditionalFormat"; var TextConditionalFormat=(function (_super) { __extends(TextConditionalFormat, _super); function TextConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TextConditionalFormat.prototype, "_className", { get: function () { @@ -19062,23 +22669,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TextConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["rule"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TextConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TextConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TextConditionalFormat.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(TextConditionalFormat.prototype, "rule", { get: function () { - _throwIfNotLoaded("rule", this.m_rule, "TextConditionalFormat", this._isNull); - return this.m_rule; + _throwIfNotLoaded("rule", this._R, _typeTextConditionalFormat, this._isNull); + return this._R; }, set: function (value) { - this.m_rule=value; + this._R=value; _createSetPropertyAction(this.context, this, "Rule", value); }, enumerable: true, @@ -19087,6 +22715,9 @@ var Excel; TextConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["rule"], ["format"], []); }; + TextConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; TextConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -19094,27 +22725,39 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Rule"])) { - this.m_rule=obj["Rule"]; + this._R=obj["Rule"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; TextConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TextConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TextConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; TextConditionalFormat.prototype.toJSON=function () { - return { - "format": this.m_format, - "rule": this.m_rule - }; + return _toJson(this, { + "rule": this._R, + }, { + "format": this._F, + }); + }; + TextConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TextConditionalFormat; }(OfficeExtension.ClientObject)); Excel.TextConditionalFormat=TextConditionalFormat; + var _typeCellValueConditionalFormat="CellValueConditionalFormat"; var CellValueConditionalFormat=(function (_super) { __extends(CellValueConditionalFormat, _super); function CellValueConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CellValueConditionalFormat.prototype, "_className", { get: function () { @@ -19123,23 +22766,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(CellValueConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["rule"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CellValueConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CellValueConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(CellValueConditionalFormat.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(CellValueConditionalFormat.prototype, "rule", { get: function () { - _throwIfNotLoaded("rule", this.m_rule, "CellValueConditionalFormat", this._isNull); - return this.m_rule; + _throwIfNotLoaded("rule", this._R, _typeCellValueConditionalFormat, this._isNull); + return this._R; }, set: function (value) { - this.m_rule=value; + this._R=value; _createSetPropertyAction(this.context, this, "Rule", value); }, enumerable: true, @@ -19148,6 +22812,9 @@ var Excel; CellValueConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["rule"], ["format"], []); }; + CellValueConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; CellValueConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -19155,27 +22822,39 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Rule"])) { - this.m_rule=obj["Rule"]; + this._R=obj["Rule"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; CellValueConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CellValueConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CellValueConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; CellValueConditionalFormat.prototype.toJSON=function () { - return { - "format": this.m_format, - "rule": this.m_rule - }; + return _toJson(this, { + "rule": this._R, + }, { + "format": this._F, + }); + }; + CellValueConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return CellValueConditionalFormat; }(OfficeExtension.ClientObject)); Excel.CellValueConditionalFormat=CellValueConditionalFormat; + var _typeConditionalRangeFormat="ConditionalRangeFormat"; var ConditionalRangeFormat=(function (_super) { __extends(ConditionalRangeFormat, _super); function ConditionalRangeFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalRangeFormat.prototype, "_className", { get: function () { @@ -19184,58 +22863,77 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalRangeFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["numberFormat"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["fill", "font", "borders"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalRangeFormat.prototype, "borders", { get: function () { - if (!this.m_borders) { - this.m_borders=new Excel.ConditionalRangeBorderCollection(this.context, _createPropertyObjectPath(this.context, this, "Borders", true, false)); + if (!this._B) { + this._B=new Excel.ConditionalRangeBorderCollection(this.context, _createPropertyObjectPath(this.context, this, "Borders", true, false, false)); } - return this.m_borders; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ConditionalRangeFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ConditionalRangeFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ConditionalRangeFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Excel.ConditionalRangeFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeFormat.prototype, "numberFormat", { get: function () { - _throwIfNotLoaded("numberFormat", this.m_numberFormat, "ConditionalRangeFormat", this._isNull); - return this.m_numberFormat; + _throwIfNotLoaded("numberFormat", this._N, _typeConditionalRangeFormat, this._isNull); + return this._N; }, set: function (value) { - this.m_numberFormat=value; + this._N=value; _createSetPropertyAction(this.context, this, "NumberFormat", value); }, enumerable: true, configurable: true }); ConditionalRangeFormat.prototype.set=function (properties, options) { - this._recursivelySet(properties, options, ["numberFormat"], [], [ - "borders", - "fill", - "font", - "borders", - "fill", - "font" + this._recursivelySet(properties, options, ["numberFormat"], ["fill", "font"], [ + "borders" ]); }; + ConditionalRangeFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalRangeFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -19243,26 +22941,41 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["NumberFormat"])) { - this.m_numberFormat=obj["NumberFormat"]; + this._N=obj["NumberFormat"]; } _handleNavigationPropertyResults(this, obj, ["borders", "Borders", "fill", "Fill", "font", "Font"]); }; ConditionalRangeFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalRangeFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalRangeFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalRangeFormat.prototype.toJSON=function () { - return { - "numberFormat": this.m_numberFormat - }; + return _toJson(this, { + "numberFormat": this._N, + }, { + "borders": this._B, + "fill": this._F, + "font": this._Fo, + }); + }; + ConditionalRangeFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalRangeFormat; }(OfficeExtension.ClientObject)); Excel.ConditionalRangeFormat=ConditionalRangeFormat; + var _typeConditionalRangeFont="ConditionalRangeFont"; var ConditionalRangeFont=(function (_super) { __extends(ConditionalRangeFont, _super); function ConditionalRangeFont() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalRangeFont.prototype, "_className", { get: function () { @@ -19271,13 +22984,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalRangeFont.prototype, "_scalarPropertyNames", { + get: function () { + return ["color", "italic", "bold", "underline", "strikethrough"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeFont.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalRangeFont.prototype, "bold", { get: function () { - _throwIfNotLoaded("bold", this.m_bold, "ConditionalRangeFont", this._isNull); - return this.m_bold; + _throwIfNotLoaded("bold", this._B, _typeConditionalRangeFont, this._isNull); + return this._B; }, set: function (value) { - this.m_bold=value; + this._B=value; _createSetPropertyAction(this.context, this, "Bold", value); }, enumerable: true, @@ -19285,11 +23012,11 @@ var Excel; }); Object.defineProperty(ConditionalRangeFont.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "ConditionalRangeFont", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeConditionalRangeFont, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -19297,11 +23024,11 @@ var Excel; }); Object.defineProperty(ConditionalRangeFont.prototype, "italic", { get: function () { - _throwIfNotLoaded("italic", this.m_italic, "ConditionalRangeFont", this._isNull); - return this.m_italic; + _throwIfNotLoaded("italic", this._I, _typeConditionalRangeFont, this._isNull); + return this._I; }, set: function (value) { - this.m_italic=value; + this._I=value; _createSetPropertyAction(this.context, this, "Italic", value); }, enumerable: true, @@ -19309,11 +23036,11 @@ var Excel; }); Object.defineProperty(ConditionalRangeFont.prototype, "strikethrough", { get: function () { - _throwIfNotLoaded("strikethrough", this.m_strikethrough, "ConditionalRangeFont", this._isNull); - return this.m_strikethrough; + _throwIfNotLoaded("strikethrough", this._S, _typeConditionalRangeFont, this._isNull); + return this._S; }, set: function (value) { - this.m_strikethrough=value; + this._S=value; _createSetPropertyAction(this.context, this, "Strikethrough", value); }, enumerable: true, @@ -19321,11 +23048,11 @@ var Excel; }); Object.defineProperty(ConditionalRangeFont.prototype, "underline", { get: function () { - _throwIfNotLoaded("underline", this.m_underline, "ConditionalRangeFont", this._isNull); - return this.m_underline; + _throwIfNotLoaded("underline", this._U, _typeConditionalRangeFont, this._isNull); + return this._U; }, set: function (value) { - this.m_underline=value; + this._U=value; _createSetPropertyAction(this.context, this, "Underline", value); }, enumerable: true, @@ -19334,8 +23061,11 @@ var Excel; ConditionalRangeFont.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["color", "italic", "bold", "underline", "strikethrough"], [], []); }; + ConditionalRangeFont.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalRangeFont.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; ConditionalRangeFont.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -19344,41 +23074,52 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Bold"])) { - this.m_bold=obj["Bold"]; + this._B=obj["Bold"]; } if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["Italic"])) { - this.m_italic=obj["Italic"]; + this._I=obj["Italic"]; } if (!_isUndefined(obj["Strikethrough"])) { - this.m_strikethrough=obj["Strikethrough"]; + this._S=obj["Strikethrough"]; } if (!_isUndefined(obj["Underline"])) { - this.m_underline=obj["Underline"]; + this._U=obj["Underline"]; } }; ConditionalRangeFont.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalRangeFont.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalRangeFont.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalRangeFont.prototype.toJSON=function () { - return { - "bold": this.m_bold, - "color": this.m_color, - "italic": this.m_italic, - "strikethrough": this.m_strikethrough, - "underline": this.m_underline - }; + return _toJson(this, { + "bold": this._B, + "color": this._C, + "italic": this._I, + "strikethrough": this._S, + "underline": this._U, + }, {}); + }; + ConditionalRangeFont.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalRangeFont; }(OfficeExtension.ClientObject)); Excel.ConditionalRangeFont=ConditionalRangeFont; + var _typeConditionalRangeFill="ConditionalRangeFill"; var ConditionalRangeFill=(function (_super) { __extends(ConditionalRangeFill, _super); function ConditionalRangeFill() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalRangeFill.prototype, "_className", { get: function () { @@ -19387,13 +23128,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalRangeFill.prototype, "_scalarPropertyNames", { + get: function () { + return ["color"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeFill.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalRangeFill.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "ConditionalRangeFill", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeConditionalRangeFill, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -19402,8 +23157,11 @@ var Excel; ConditionalRangeFill.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["color"], [], []); }; + ConditionalRangeFill.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalRangeFill.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; ConditionalRangeFill.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -19412,25 +23170,36 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } }; ConditionalRangeFill.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalRangeFill.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalRangeFill.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalRangeFill.prototype.toJSON=function () { - return { - "color": this.m_color - }; + return _toJson(this, { + "color": this._C, + }, {}); + }; + ConditionalRangeFill.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalRangeFill; }(OfficeExtension.ClientObject)); Excel.ConditionalRangeFill=ConditionalRangeFill; + var _typeConditionalRangeBorder="ConditionalRangeBorder"; var ConditionalRangeBorder=(function (_super) { __extends(ConditionalRangeBorder, _super); function ConditionalRangeBorder() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalRangeBorder.prototype, "_className", { get: function () { @@ -19439,13 +23208,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalRangeBorder.prototype, "_scalarPropertyNames", { + get: function () { + return ["sideIndex", "style", "color"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeBorder.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalRangeBorder.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "ConditionalRangeBorder", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeConditionalRangeBorder, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -19453,19 +23236,19 @@ var Excel; }); Object.defineProperty(ConditionalRangeBorder.prototype, "sideIndex", { get: function () { - _throwIfNotLoaded("sideIndex", this.m_sideIndex, "ConditionalRangeBorder", this._isNull); - return this.m_sideIndex; + _throwIfNotLoaded("sideIndex", this._S, _typeConditionalRangeBorder, this._isNull); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeBorder.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "ConditionalRangeBorder", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._St, _typeConditionalRangeBorder, this._isNull); + return this._St; }, set: function (value) { - this.m_style=value; + this._St=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -19474,6 +23257,9 @@ var Excel; ConditionalRangeBorder.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["style", "color"], [], []); }; + ConditionalRangeBorder.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalRangeBorder.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -19481,33 +23267,44 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["SideIndex"])) { - this.m_sideIndex=obj["SideIndex"]; + this._S=obj["SideIndex"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._St=obj["Style"]; } }; ConditionalRangeBorder.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalRangeBorder.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalRangeBorder.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalRangeBorder.prototype.toJSON=function () { - return { - "color": this.m_color, - "sideIndex": this.m_sideIndex, - "style": this.m_style - }; + return _toJson(this, { + "color": this._C, + "sideIndex": this._S, + "style": this._St, + }, {}); + }; + ConditionalRangeBorder.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalRangeBorder; }(OfficeExtension.ClientObject)); Excel.ConditionalRangeBorder=ConditionalRangeBorder; + var _typeConditionalRangeBorderCollection="ConditionalRangeBorderCollection"; var ConditionalRangeBorderCollection=(function (_super) { __extends(ConditionalRangeBorderCollection, _super); function ConditionalRangeBorderCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalRangeBorderCollection.prototype, "_className", { get: function () { @@ -19516,49 +23313,70 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalRangeBorderCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeBorderCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeBorderCollection.prototype, "_navigationPropertyNames", { + get: function () { + return ["top", "bottom", "left", "right"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalRangeBorderCollection.prototype, "bottom", { get: function () { - if (!this.m_bottom) { - this.m_bottom=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Bottom", false, false)); + if (!this._B) { + this._B=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Bottom", false, false, false)); } - return this.m_bottom; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeBorderCollection.prototype, "left", { get: function () { - if (!this.m_left) { - this.m_left=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Left", false, false)); + if (!this._L) { + this._L=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Left", false, false, false)); } - return this.m_left; + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeBorderCollection.prototype, "right", { get: function () { - if (!this.m_right) { - this.m_right=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Right", false, false)); + if (!this._R) { + this._R=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Right", false, false, false)); } - return this.m_right; + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeBorderCollection.prototype, "top", { get: function () { - if (!this.m_top) { - this.m_top=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Top", false, false)); + if (!this._T) { + this._T=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Top", false, false, false)); } - return this.m_top; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeBorderCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ConditionalRangeBorderCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeConditionalRangeBorderCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -19566,8 +23384,8 @@ var Excel; }); Object.defineProperty(ConditionalRangeBorderCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "ConditionalRangeBorderCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeConditionalRangeBorderCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true @@ -19576,7 +23394,7 @@ var Excel; return new Excel.ConditionalRangeBorder(this.context, _createIndexerObjectPath(this.context, this, [index])); }; ConditionalRangeBorderCollection.prototype.getItemAt=function (index) { - return new Excel.ConditionalRangeBorder(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.ConditionalRangeBorder(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; ConditionalRangeBorderCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -19585,7 +23403,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } _handleNavigationPropertyResults(this, obj, ["bottom", "Bottom", "left", "Left", "right", "Right", "top", "Top"]); if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { @@ -19599,17 +23417,65 @@ var Excel; } }; ConditionalRangeBorderCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalRangeBorderCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalRangeBorderCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.ConditionalRangeBorder(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; ConditionalRangeBorderCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, { + "bottom": this._B, + "left": this._L, + "right": this._R, + "top": this._T, + }, this.m__items); }; return ConditionalRangeBorderCollection; }(OfficeExtension.ClientObject)); Excel.ConditionalRangeBorderCollection=ConditionalRangeBorderCollection; + var _typeInternalTest="InternalTest"; + var InternalTest=(function (_super) { + __extends(InternalTest, _super); + function InternalTest() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(InternalTest.prototype, "_className", { + get: function () { + return "InternalTest"; + }, + enumerable: true, + configurable: true + }); + InternalTest.prototype.delay=function (seconds) { + var action=_createMethodAction(this.context, this, "Delay", 0, [seconds], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + InternalTest.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + InternalTest.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + InternalTest.prototype.toJSON=function () { + return _toJson(this, {}, {}); + }; + return InternalTest; + }(OfficeExtension.ClientObject)); + Excel.InternalTest=InternalTest; var BindingType; (function (BindingType) { BindingType.range="Range"; @@ -19663,6 +23529,7 @@ var Excel; ClearApplyTo.formats="Formats"; ClearApplyTo.contents="Contents"; ClearApplyTo.hyperlinks="Hyperlinks"; + ClearApplyTo.removeHyperlinks="RemoveHyperlinks"; })(ClearApplyTo=Excel.ClearApplyTo || (Excel.ClearApplyTo={})); var ChartDataLabelPosition; (function (ChartDataLabelPosition) { @@ -20049,6 +23916,7 @@ var Excel; NamedItemType.boolean="Boolean"; NamedItemType.range="Range"; NamedItemType.error="Error"; + NamedItemType.array="Array"; })(NamedItemType=Excel.NamedItemType || (Excel.NamedItemType={})); var RangeUnderlineStyle; (function (RangeUnderlineStyle) { @@ -20073,6 +23941,7 @@ var Excel; RangeValueType.double="Double"; RangeValueType.boolean="Boolean"; RangeValueType.error="Error"; + RangeValueType.richValue="RichValue"; })(RangeValueType=Excel.RangeValueType || (Excel.RangeValueType={})); var SortOrientation; (function (SortOrientation) { @@ -20104,10 +23973,11 @@ var Excel; VerticalAlignment.justify="Justify"; VerticalAlignment.distributed="Distributed"; })(VerticalAlignment=Excel.VerticalAlignment || (Excel.VerticalAlignment={})); + var _typeFunctionResult="FunctionResult"; var FunctionResult=(function (_super) { __extends(FunctionResult, _super); function FunctionResult() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(FunctionResult.prototype, "_className", { get: function () { @@ -20116,18 +23986,25 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(FunctionResult.prototype, "_scalarPropertyNames", { + get: function () { + return ["error", "value"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(FunctionResult.prototype, "error", { get: function () { - _throwIfNotLoaded("error", this.m_error, "FunctionResult", this._isNull); - return this.m_error; + _throwIfNotLoaded("error", this._E, _typeFunctionResult, this._isNull); + return this._E; }, enumerable: true, configurable: true }); Object.defineProperty(FunctionResult.prototype, "value", { get: function () { - _throwIfNotLoaded("value", this.m_value, "FunctionResult", this._isNull); - return this.m_value; + _throwIfNotLoaded("value", this._V, _typeFunctionResult, this._isNull); + return this._V; }, enumerable: true, configurable: true @@ -20139,29 +24016,40 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Error"])) { - this.m_error=obj["Error"]; + this._E=obj["Error"]; } if (!_isUndefined(obj["Value"])) { - this.m_value=obj["Value"]; + this._V=obj["Value"]; } }; FunctionResult.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + FunctionResult.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + FunctionResult.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; FunctionResult.prototype.toJSON=function () { - return { - "error": this.m_error, - "value": this.m_value - }; + return _toJson(this, { + "error": this._E, + "value": this._V, + }, {}); + }; + FunctionResult.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return FunctionResult; }(OfficeExtension.ClientObject)); Excel.FunctionResult=FunctionResult; + var _typeFunctions="Functions"; var Functions=(function (_super) { __extends(Functions, _super); function Functions() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Functions.prototype, "_className", { get: function () { @@ -20171,1270 +24059,1270 @@ var Excel; configurable: true }); Functions.prototype.abs=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Abs", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Abs", 0, [number], false, true, null, false)); }; Functions.prototype.accrInt=function (issue, firstInterest, settlement, rate, par, frequency, basis, calcMethod) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AccrInt", 0, [issue, firstInterest, settlement, rate, par, frequency, basis, calcMethod], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AccrInt", 0, [issue, firstInterest, settlement, rate, par, frequency, basis, calcMethod], false, true, null, false)); }; Functions.prototype.accrIntM=function (issue, settlement, rate, par, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AccrIntM", 0, [issue, settlement, rate, par, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AccrIntM", 0, [issue, settlement, rate, par, basis], false, true, null, false)); }; Functions.prototype.acos=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acos", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acos", 0, [number], false, true, null, false)); }; Functions.prototype.acosh=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acosh", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acosh", 0, [number], false, true, null, false)); }; Functions.prototype.acot=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acot", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acot", 0, [number], false, true, null, false)); }; Functions.prototype.acoth=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acoth", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acoth", 0, [number], false, true, null, false)); }; Functions.prototype.amorDegrc=function (cost, datePurchased, firstPeriod, salvage, period, rate, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AmorDegrc", 0, [cost, datePurchased, firstPeriod, salvage, period, rate, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AmorDegrc", 0, [cost, datePurchased, firstPeriod, salvage, period, rate, basis], false, true, null, false)); }; Functions.prototype.amorLinc=function (cost, datePurchased, firstPeriod, salvage, period, rate, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AmorLinc", 0, [cost, datePurchased, firstPeriod, salvage, period, rate, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AmorLinc", 0, [cost, datePurchased, firstPeriod, salvage, period, rate, basis], false, true, null, false)); }; Functions.prototype.and=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "And", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "And", 0, [values], false, true, null, false)); }; Functions.prototype.arabic=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Arabic", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Arabic", 0, [text], false, true, null, false)); }; Functions.prototype.areas=function (reference) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Areas", 0, [reference], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Areas", 0, [reference], false, true, null, false)); }; Functions.prototype.asc=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asc", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asc", 0, [text], false, true, null, false)); }; Functions.prototype.asin=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asin", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asin", 0, [number], false, true, null, false)); }; Functions.prototype.asinh=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asinh", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asinh", 0, [number], false, true, null, false)); }; Functions.prototype.atan=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atan", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atan", 0, [number], false, true, null, false)); }; Functions.prototype.atan2=function (xNum, yNum) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atan2", 0, [xNum, yNum], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atan2", 0, [xNum, yNum], false, true, null, false)); }; Functions.prototype.atanh=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atanh", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atanh", 0, [number], false, true, null, false)); }; Functions.prototype.aveDev=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AveDev", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AveDev", 0, [values], false, true, null, false)); }; Functions.prototype.average=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Average", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Average", 0, [values], false, true, null, false)); }; Functions.prototype.averageA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageA", 0, [values], false, true, null, false)); }; Functions.prototype.averageIf=function (range, criteria, averageRange) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageIf", 0, [range, criteria, averageRange], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageIf", 0, [range, criteria, averageRange], false, true, null, false)); }; Functions.prototype.averageIfs=function (averageRange) { var values=[]; for (var _i=1; _i < arguments.length; _i++) { values[_i - 1]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageIfs", 0, [averageRange, values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageIfs", 0, [averageRange, values], false, true, null, false)); }; Functions.prototype.bahtText=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BahtText", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BahtText", 0, [number], false, true, null, false)); }; Functions.prototype.base=function (number, radix, minLength) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Base", 0, [number, radix, minLength], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Base", 0, [number, radix, minLength], false, true, null, false)); }; Functions.prototype.besselI=function (x, n) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselI", 0, [x, n], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselI", 0, [x, n], false, true, null, false)); }; Functions.prototype.besselJ=function (x, n) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselJ", 0, [x, n], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselJ", 0, [x, n], false, true, null, false)); }; Functions.prototype.besselK=function (x, n) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselK", 0, [x, n], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselK", 0, [x, n], false, true, null, false)); }; Functions.prototype.besselY=function (x, n) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselY", 0, [x, n], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselY", 0, [x, n], false, true, null, false)); }; Functions.prototype.beta_Dist=function (x, alpha, beta, cumulative, A, B) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Beta_Dist", 0, [x, alpha, beta, cumulative, A, B], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Beta_Dist", 0, [x, alpha, beta, cumulative, A, B], false, true, null, false)); }; Functions.prototype.beta_Inv=function (probability, alpha, beta, A, B) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Beta_Inv", 0, [probability, alpha, beta, A, B], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Beta_Inv", 0, [probability, alpha, beta, A, B], false, true, null, false)); }; Functions.prototype.bin2Dec=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Dec", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Dec", 0, [number], false, true, null, false)); }; Functions.prototype.bin2Hex=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Hex", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Hex", 0, [number, places], false, true, null, false)); }; Functions.prototype.bin2Oct=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Oct", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Oct", 0, [number, places], false, true, null, false)); }; Functions.prototype.binom_Dist=function (numberS, trials, probabilityS, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Dist", 0, [numberS, trials, probabilityS, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Dist", 0, [numberS, trials, probabilityS, cumulative], false, true, null, false)); }; Functions.prototype.binom_Dist_Range=function (trials, probabilityS, numberS, numberS2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Dist_Range", 0, [trials, probabilityS, numberS, numberS2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Dist_Range", 0, [trials, probabilityS, numberS, numberS2], false, true, null, false)); }; Functions.prototype.binom_Inv=function (trials, probabilityS, alpha) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Inv", 0, [trials, probabilityS, alpha], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Inv", 0, [trials, probabilityS, alpha], false, true, null, false)); }; Functions.prototype.bitand=function (number1, number2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitand", 0, [number1, number2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitand", 0, [number1, number2], false, true, null, false)); }; Functions.prototype.bitlshift=function (number, shiftAmount) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitlshift", 0, [number, shiftAmount], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitlshift", 0, [number, shiftAmount], false, true, null, false)); }; Functions.prototype.bitor=function (number1, number2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitor", 0, [number1, number2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitor", 0, [number1, number2], false, true, null, false)); }; Functions.prototype.bitrshift=function (number, shiftAmount) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitrshift", 0, [number, shiftAmount], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitrshift", 0, [number, shiftAmount], false, true, null, false)); }; Functions.prototype.bitxor=function (number1, number2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitxor", 0, [number1, number2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitxor", 0, [number1, number2], false, true, null, false)); }; Functions.prototype.ceiling_Math=function (number, significance, mode) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ceiling_Math", 0, [number, significance, mode], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ceiling_Math", 0, [number, significance, mode], false, true, null, false)); }; Functions.prototype.ceiling_Precise=function (number, significance) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ceiling_Precise", 0, [number, significance], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ceiling_Precise", 0, [number, significance], false, true, null, false)); }; Functions.prototype.char=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Char", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Char", 0, [number], false, true, null, false)); }; Functions.prototype.chiSq_Dist=function (x, degFreedom, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Dist", 0, [x, degFreedom, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Dist", 0, [x, degFreedom, cumulative], false, true, null, false)); }; Functions.prototype.chiSq_Dist_RT=function (x, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Dist_RT", 0, [x, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Dist_RT", 0, [x, degFreedom], false, true, null, false)); }; Functions.prototype.chiSq_Inv=function (probability, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Inv", 0, [probability, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Inv", 0, [probability, degFreedom], false, true, null, false)); }; Functions.prototype.chiSq_Inv_RT=function (probability, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Inv_RT", 0, [probability, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Inv_RT", 0, [probability, degFreedom], false, true, null, false)); }; Functions.prototype.choose=function (indexNum) { var values=[]; for (var _i=1; _i < arguments.length; _i++) { values[_i - 1]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Choose", 0, [indexNum, values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Choose", 0, [indexNum, values], false, true, null, false)); }; Functions.prototype.clean=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Clean", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Clean", 0, [text], false, true, null, false)); }; Functions.prototype.code=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Code", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Code", 0, [text], false, true, null, false)); }; Functions.prototype.columns=function (array) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Columns", 0, [array], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Columns", 0, [array], false, true, null, false)); }; Functions.prototype.combin=function (number, numberChosen) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Combin", 0, [number, numberChosen], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Combin", 0, [number, numberChosen], false, true, null, false)); }; Functions.prototype.combina=function (number, numberChosen) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Combina", 0, [number, numberChosen], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Combina", 0, [number, numberChosen], false, true, null, false)); }; Functions.prototype.complex=function (realNum, iNum, suffix) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Complex", 0, [realNum, iNum, suffix], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Complex", 0, [realNum, iNum, suffix], false, true, null, false)); }; Functions.prototype.concatenate=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Concatenate", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Concatenate", 0, [values], false, true, null, false)); }; Functions.prototype.confidence_Norm=function (alpha, standardDev, size) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Confidence_Norm", 0, [alpha, standardDev, size], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Confidence_Norm", 0, [alpha, standardDev, size], false, true, null, false)); }; Functions.prototype.confidence_T=function (alpha, standardDev, size) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Confidence_T", 0, [alpha, standardDev, size], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Confidence_T", 0, [alpha, standardDev, size], false, true, null, false)); }; Functions.prototype.convert=function (number, fromUnit, toUnit) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Convert", 0, [number, fromUnit, toUnit], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Convert", 0, [number, fromUnit, toUnit], false, true, null, false)); }; Functions.prototype.cos=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cos", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cos", 0, [number], false, true, null, false)); }; Functions.prototype.cosh=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cosh", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cosh", 0, [number], false, true, null, false)); }; Functions.prototype.cot=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cot", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cot", 0, [number], false, true, null, false)); }; Functions.prototype.coth=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Coth", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Coth", 0, [number], false, true, null, false)); }; Functions.prototype.count=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Count", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Count", 0, [values], false, true, null, false)); }; Functions.prototype.countA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountA", 0, [values], false, true, null, false)); }; Functions.prototype.countBlank=function (range) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountBlank", 0, [range], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountBlank", 0, [range], false, true, null, false)); }; Functions.prototype.countIf=function (range, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountIf", 0, [range, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountIf", 0, [range, criteria], false, true, null, false)); }; Functions.prototype.countIfs=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountIfs", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountIfs", 0, [values], false, true, null, false)); }; Functions.prototype.coupDayBs=function (settlement, maturity, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDayBs", 0, [settlement, maturity, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDayBs", 0, [settlement, maturity, frequency, basis], false, true, null, false)); }; Functions.prototype.coupDays=function (settlement, maturity, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDays", 0, [settlement, maturity, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDays", 0, [settlement, maturity, frequency, basis], false, true, null, false)); }; Functions.prototype.coupDaysNc=function (settlement, maturity, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDaysNc", 0, [settlement, maturity, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDaysNc", 0, [settlement, maturity, frequency, basis], false, true, null, false)); }; Functions.prototype.coupNcd=function (settlement, maturity, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupNcd", 0, [settlement, maturity, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupNcd", 0, [settlement, maturity, frequency, basis], false, true, null, false)); }; Functions.prototype.coupNum=function (settlement, maturity, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupNum", 0, [settlement, maturity, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupNum", 0, [settlement, maturity, frequency, basis], false, true, null, false)); }; Functions.prototype.coupPcd=function (settlement, maturity, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupPcd", 0, [settlement, maturity, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupPcd", 0, [settlement, maturity, frequency, basis], false, true, null, false)); }; Functions.prototype.csc=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Csc", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Csc", 0, [number], false, true, null, false)); }; Functions.prototype.csch=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Csch", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Csch", 0, [number], false, true, null, false)); }; Functions.prototype.cumIPmt=function (rate, nper, pv, startPeriod, endPeriod, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CumIPmt", 0, [rate, nper, pv, startPeriod, endPeriod, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CumIPmt", 0, [rate, nper, pv, startPeriod, endPeriod, type], false, true, null, false)); }; Functions.prototype.cumPrinc=function (rate, nper, pv, startPeriod, endPeriod, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CumPrinc", 0, [rate, nper, pv, startPeriod, endPeriod, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CumPrinc", 0, [rate, nper, pv, startPeriod, endPeriod, type], false, true, null, false)); }; Functions.prototype.daverage=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DAverage", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DAverage", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dcount=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DCount", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DCount", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dcountA=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DCountA", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DCountA", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dget=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DGet", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DGet", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dmax=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DMax", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DMax", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dmin=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DMin", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DMin", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dproduct=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DProduct", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DProduct", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dstDev=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DStDev", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DStDev", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dstDevP=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DStDevP", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DStDevP", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dsum=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DSum", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DSum", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dvar=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DVar", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DVar", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dvarP=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DVarP", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DVarP", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.date=function (year, month, day) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Date", 0, [year, month, day], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Date", 0, [year, month, day], false, true, null, false)); }; Functions.prototype.datevalue=function (dateText) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Datevalue", 0, [dateText], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Datevalue", 0, [dateText], false, true, null, false)); }; Functions.prototype.day=function (serialNumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Day", 0, [serialNumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Day", 0, [serialNumber], false, true, null, false)); }; Functions.prototype.days=function (endDate, startDate) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Days", 0, [endDate, startDate], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Days", 0, [endDate, startDate], false, true, null, false)); }; Functions.prototype.days360=function (startDate, endDate, method) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Days360", 0, [startDate, endDate, method], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Days360", 0, [startDate, endDate, method], false, true, null, false)); }; Functions.prototype.db=function (cost, salvage, life, period, month) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Db", 0, [cost, salvage, life, period, month], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Db", 0, [cost, salvage, life, period, month], false, true, null, false)); }; Functions.prototype.dbcs=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dbcs", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dbcs", 0, [text], false, true, null, false)); }; Functions.prototype.ddb=function (cost, salvage, life, period, factor) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ddb", 0, [cost, salvage, life, period, factor], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ddb", 0, [cost, salvage, life, period, factor], false, true, null, false)); }; Functions.prototype.dec2Bin=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Bin", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Bin", 0, [number, places], false, true, null, false)); }; Functions.prototype.dec2Hex=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Hex", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Hex", 0, [number, places], false, true, null, false)); }; Functions.prototype.dec2Oct=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Oct", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Oct", 0, [number, places], false, true, null, false)); }; Functions.prototype.decimal=function (number, radix) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Decimal", 0, [number, radix], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Decimal", 0, [number, radix], false, true, null, false)); }; Functions.prototype.degrees=function (angle) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Degrees", 0, [angle], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Degrees", 0, [angle], false, true, null, false)); }; Functions.prototype.delta=function (number1, number2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Delta", 0, [number1, number2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Delta", 0, [number1, number2], false, true, null, false)); }; Functions.prototype.devSq=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DevSq", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DevSq", 0, [values], false, true, null, false)); }; Functions.prototype.disc=function (settlement, maturity, pr, redemption, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Disc", 0, [settlement, maturity, pr, redemption, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Disc", 0, [settlement, maturity, pr, redemption, basis], false, true, null, false)); }; Functions.prototype.dollar=function (number, decimals) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dollar", 0, [number, decimals], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dollar", 0, [number, decimals], false, true, null, false)); }; Functions.prototype.dollarDe=function (fractionalDollar, fraction) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DollarDe", 0, [fractionalDollar, fraction], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DollarDe", 0, [fractionalDollar, fraction], false, true, null, false)); }; Functions.prototype.dollarFr=function (decimalDollar, fraction) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DollarFr", 0, [decimalDollar, fraction], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DollarFr", 0, [decimalDollar, fraction], false, true, null, false)); }; Functions.prototype.duration=function (settlement, maturity, coupon, yld, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Duration", 0, [settlement, maturity, coupon, yld, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Duration", 0, [settlement, maturity, coupon, yld, frequency, basis], false, true, null, false)); }; Functions.prototype.ecma_Ceiling=function (number, significance) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ECMA_Ceiling", 0, [number, significance], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ECMA_Ceiling", 0, [number, significance], false, true, null, false)); }; Functions.prototype.edate=function (startDate, months) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "EDate", 0, [startDate, months], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "EDate", 0, [startDate, months], false, true, null, false)); }; Functions.prototype.effect=function (nominalRate, npery) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Effect", 0, [nominalRate, npery], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Effect", 0, [nominalRate, npery], false, true, null, false)); }; Functions.prototype.eoMonth=function (startDate, months) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "EoMonth", 0, [startDate, months], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "EoMonth", 0, [startDate, months], false, true, null, false)); }; Functions.prototype.erf=function (lowerLimit, upperLimit) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Erf", 0, [lowerLimit, upperLimit], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Erf", 0, [lowerLimit, upperLimit], false, true, null, false)); }; Functions.prototype.erfC=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ErfC", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ErfC", 0, [x], false, true, null, false)); }; Functions.prototype.erfC_Precise=function (X) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ErfC_Precise", 0, [X], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ErfC_Precise", 0, [X], false, true, null, false)); }; Functions.prototype.erf_Precise=function (X) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Erf_Precise", 0, [X], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Erf_Precise", 0, [X], false, true, null, false)); }; Functions.prototype.error_Type=function (errorVal) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Error_Type", 0, [errorVal], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Error_Type", 0, [errorVal], false, true, null, false)); }; Functions.prototype.even=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Even", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Even", 0, [number], false, true, null, false)); }; Functions.prototype.exact=function (text1, text2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Exact", 0, [text1, text2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Exact", 0, [text1, text2], false, true, null, false)); }; Functions.prototype.exp=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Exp", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Exp", 0, [number], false, true, null, false)); }; Functions.prototype.expon_Dist=function (x, lambda, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Expon_Dist", 0, [x, lambda, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Expon_Dist", 0, [x, lambda, cumulative], false, true, null, false)); }; Functions.prototype.fvschedule=function (principal, schedule) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FVSchedule", 0, [principal, schedule], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FVSchedule", 0, [principal, schedule], false, true, null, false)); }; Functions.prototype.f_Dist=function (x, degFreedom1, degFreedom2, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Dist", 0, [x, degFreedom1, degFreedom2, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Dist", 0, [x, degFreedom1, degFreedom2, cumulative], false, true, null, false)); }; Functions.prototype.f_Dist_RT=function (x, degFreedom1, degFreedom2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Dist_RT", 0, [x, degFreedom1, degFreedom2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Dist_RT", 0, [x, degFreedom1, degFreedom2], false, true, null, false)); }; Functions.prototype.f_Inv=function (probability, degFreedom1, degFreedom2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Inv", 0, [probability, degFreedom1, degFreedom2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Inv", 0, [probability, degFreedom1, degFreedom2], false, true, null, false)); }; Functions.prototype.f_Inv_RT=function (probability, degFreedom1, degFreedom2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Inv_RT", 0, [probability, degFreedom1, degFreedom2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Inv_RT", 0, [probability, degFreedom1, degFreedom2], false, true, null, false)); }; Functions.prototype.fact=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fact", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fact", 0, [number], false, true, null, false)); }; Functions.prototype.factDouble=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FactDouble", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FactDouble", 0, [number], false, true, null, false)); }; Functions.prototype.false=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "False", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "False", 0, [], false, true, null, false)); }; Functions.prototype.find=function (findText, withinText, startNum) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Find", 0, [findText, withinText, startNum], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Find", 0, [findText, withinText, startNum], false, true, null, false)); }; Functions.prototype.findB=function (findText, withinText, startNum) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FindB", 0, [findText, withinText, startNum], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FindB", 0, [findText, withinText, startNum], false, true, null, false)); }; Functions.prototype.fisher=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fisher", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fisher", 0, [x], false, true, null, false)); }; Functions.prototype.fisherInv=function (y) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FisherInv", 0, [y], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FisherInv", 0, [y], false, true, null, false)); }; Functions.prototype.fixed=function (number, decimals, noCommas) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fixed", 0, [number, decimals, noCommas], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fixed", 0, [number, decimals, noCommas], false, true, null, false)); }; Functions.prototype.floor_Math=function (number, significance, mode) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Floor_Math", 0, [number, significance, mode], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Floor_Math", 0, [number, significance, mode], false, true, null, false)); }; Functions.prototype.floor_Precise=function (number, significance) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Floor_Precise", 0, [number, significance], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Floor_Precise", 0, [number, significance], false, true, null, false)); }; Functions.prototype.fv=function (rate, nper, pmt, pv, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fv", 0, [rate, nper, pmt, pv, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fv", 0, [rate, nper, pmt, pv, type], false, true, null, false)); }; Functions.prototype.gamma=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma", 0, [x], false, true, null, false)); }; Functions.prototype.gammaLn=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GammaLn", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GammaLn", 0, [x], false, true, null, false)); }; Functions.prototype.gammaLn_Precise=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GammaLn_Precise", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GammaLn_Precise", 0, [x], false, true, null, false)); }; Functions.prototype.gamma_Dist=function (x, alpha, beta, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma_Dist", 0, [x, alpha, beta, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma_Dist", 0, [x, alpha, beta, cumulative], false, true, null, false)); }; Functions.prototype.gamma_Inv=function (probability, alpha, beta) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma_Inv", 0, [probability, alpha, beta], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma_Inv", 0, [probability, alpha, beta], false, true, null, false)); }; Functions.prototype.gauss=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gauss", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gauss", 0, [x], false, true, null, false)); }; Functions.prototype.gcd=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gcd", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gcd", 0, [values], false, true, null, false)); }; Functions.prototype.geStep=function (number, step) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GeStep", 0, [number, step], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GeStep", 0, [number, step], false, true, null, false)); }; Functions.prototype.geoMean=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GeoMean", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GeoMean", 0, [values], false, true, null, false)); }; Functions.prototype.hlookup=function (lookupValue, tableArray, rowIndexNum, rangeLookup) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HLookup", 0, [lookupValue, tableArray, rowIndexNum, rangeLookup], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HLookup", 0, [lookupValue, tableArray, rowIndexNum, rangeLookup], false, true, null, false)); }; Functions.prototype.harMean=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HarMean", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HarMean", 0, [values], false, true, null, false)); }; Functions.prototype.hex2Bin=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Bin", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Bin", 0, [number, places], false, true, null, false)); }; Functions.prototype.hex2Dec=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Dec", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Dec", 0, [number], false, true, null, false)); }; Functions.prototype.hex2Oct=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Oct", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Oct", 0, [number, places], false, true, null, false)); }; Functions.prototype.hour=function (serialNumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hour", 0, [serialNumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hour", 0, [serialNumber], false, true, null, false)); }; Functions.prototype.hypGeom_Dist=function (sampleS, numberSample, populationS, numberPop, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HypGeom_Dist", 0, [sampleS, numberSample, populationS, numberPop, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HypGeom_Dist", 0, [sampleS, numberSample, populationS, numberPop, cumulative], false, true, null, false)); }; Functions.prototype.hyperlink=function (linkLocation, friendlyName) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hyperlink", 0, [linkLocation, friendlyName], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hyperlink", 0, [linkLocation, friendlyName], false, true, null, false)); }; Functions.prototype.iso_Ceiling=function (number, significance) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ISO_Ceiling", 0, [number, significance], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ISO_Ceiling", 0, [number, significance], false, true, null, false)); }; Functions.prototype.if=function (logicalTest, valueIfTrue, valueIfFalse) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "If", 0, [logicalTest, valueIfTrue, valueIfFalse], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "If", 0, [logicalTest, valueIfTrue, valueIfFalse], false, true, null, false)); }; Functions.prototype.imAbs=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImAbs", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImAbs", 0, [inumber], false, true, null, false)); }; Functions.prototype.imArgument=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImArgument", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImArgument", 0, [inumber], false, true, null, false)); }; Functions.prototype.imConjugate=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImConjugate", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImConjugate", 0, [inumber], false, true, null, false)); }; Functions.prototype.imCos=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCos", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCos", 0, [inumber], false, true, null, false)); }; Functions.prototype.imCosh=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCosh", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCosh", 0, [inumber], false, true, null, false)); }; Functions.prototype.imCot=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCot", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCot", 0, [inumber], false, true, null, false)); }; Functions.prototype.imCsc=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCsc", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCsc", 0, [inumber], false, true, null, false)); }; Functions.prototype.imCsch=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCsch", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCsch", 0, [inumber], false, true, null, false)); }; Functions.prototype.imDiv=function (inumber1, inumber2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImDiv", 0, [inumber1, inumber2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImDiv", 0, [inumber1, inumber2], false, true, null, false)); }; Functions.prototype.imExp=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImExp", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImExp", 0, [inumber], false, true, null, false)); }; Functions.prototype.imLn=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLn", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLn", 0, [inumber], false, true, null, false)); }; Functions.prototype.imLog10=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLog10", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLog10", 0, [inumber], false, true, null, false)); }; Functions.prototype.imLog2=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLog2", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLog2", 0, [inumber], false, true, null, false)); }; Functions.prototype.imPower=function (inumber, number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImPower", 0, [inumber, number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImPower", 0, [inumber, number], false, true, null, false)); }; Functions.prototype.imProduct=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImProduct", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImProduct", 0, [values], false, true, null, false)); }; Functions.prototype.imReal=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImReal", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImReal", 0, [inumber], false, true, null, false)); }; Functions.prototype.imSec=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSec", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSec", 0, [inumber], false, true, null, false)); }; Functions.prototype.imSech=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSech", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSech", 0, [inumber], false, true, null, false)); }; Functions.prototype.imSin=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSin", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSin", 0, [inumber], false, true, null, false)); }; Functions.prototype.imSinh=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSinh", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSinh", 0, [inumber], false, true, null, false)); }; Functions.prototype.imSqrt=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSqrt", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSqrt", 0, [inumber], false, true, null, false)); }; Functions.prototype.imSub=function (inumber1, inumber2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSub", 0, [inumber1, inumber2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSub", 0, [inumber1, inumber2], false, true, null, false)); }; Functions.prototype.imSum=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSum", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSum", 0, [values], false, true, null, false)); }; Functions.prototype.imTan=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImTan", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImTan", 0, [inumber], false, true, null, false)); }; Functions.prototype.imaginary=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Imaginary", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Imaginary", 0, [inumber], false, true, null, false)); }; Functions.prototype.int=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Int", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Int", 0, [number], false, true, null, false)); }; Functions.prototype.intRate=function (settlement, maturity, investment, redemption, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IntRate", 0, [settlement, maturity, investment, redemption, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IntRate", 0, [settlement, maturity, investment, redemption, basis], false, true, null, false)); }; Functions.prototype.ipmt=function (rate, per, nper, pv, fv, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ipmt", 0, [rate, per, nper, pv, fv, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ipmt", 0, [rate, per, nper, pv, fv, type], false, true, null, false)); }; Functions.prototype.irr=function (values, guess) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Irr", 0, [values, guess], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Irr", 0, [values, guess], false, true, null, false)); }; Functions.prototype.isErr=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsErr", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsErr", 0, [value], false, true, null, false)); }; Functions.prototype.isError=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsError", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsError", 0, [value], false, true, null, false)); }; Functions.prototype.isEven=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsEven", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsEven", 0, [number], false, true, null, false)); }; Functions.prototype.isFormula=function (reference) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsFormula", 0, [reference], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsFormula", 0, [reference], false, true, null, false)); }; Functions.prototype.isLogical=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsLogical", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsLogical", 0, [value], false, true, null, false)); }; Functions.prototype.isNA=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNA", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNA", 0, [value], false, true, null, false)); }; Functions.prototype.isNonText=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNonText", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNonText", 0, [value], false, true, null, false)); }; Functions.prototype.isNumber=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNumber", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNumber", 0, [value], false, true, null, false)); }; Functions.prototype.isOdd=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsOdd", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsOdd", 0, [number], false, true, null, false)); }; Functions.prototype.isText=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsText", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsText", 0, [value], false, true, null, false)); }; Functions.prototype.isoWeekNum=function (date) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsoWeekNum", 0, [date], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsoWeekNum", 0, [date], false, true, null, false)); }; Functions.prototype.ispmt=function (rate, per, nper, pv) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ispmt", 0, [rate, per, nper, pv], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ispmt", 0, [rate, per, nper, pv], false, true, null, false)); }; Functions.prototype.isref=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Isref", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Isref", 0, [value], false, true, null, false)); }; Functions.prototype.kurt=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Kurt", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Kurt", 0, [values], false, true, null, false)); }; Functions.prototype.large=function (array, k) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Large", 0, [array, k], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Large", 0, [array, k], false, true, null, false)); }; Functions.prototype.lcm=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lcm", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lcm", 0, [values], false, true, null, false)); }; Functions.prototype.left=function (text, numChars) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Left", 0, [text, numChars], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Left", 0, [text, numChars], false, true, null, false)); }; Functions.prototype.leftb=function (text, numBytes) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Leftb", 0, [text, numBytes], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Leftb", 0, [text, numBytes], false, true, null, false)); }; Functions.prototype.len=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Len", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Len", 0, [text], false, true, null, false)); }; Functions.prototype.lenb=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lenb", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lenb", 0, [text], false, true, null, false)); }; Functions.prototype.ln=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ln", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ln", 0, [number], false, true, null, false)); }; Functions.prototype.log=function (number, base) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Log", 0, [number, base], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Log", 0, [number, base], false, true, null, false)); }; Functions.prototype.log10=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Log10", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Log10", 0, [number], false, true, null, false)); }; Functions.prototype.logNorm_Dist=function (x, mean, standardDev, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "LogNorm_Dist", 0, [x, mean, standardDev, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "LogNorm_Dist", 0, [x, mean, standardDev, cumulative], false, true, null, false)); }; Functions.prototype.logNorm_Inv=function (probability, mean, standardDev) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "LogNorm_Inv", 0, [probability, mean, standardDev], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "LogNorm_Inv", 0, [probability, mean, standardDev], false, true, null, false)); }; Functions.prototype.lookup=function (lookupValue, lookupVector, resultVector) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lookup", 0, [lookupValue, lookupVector, resultVector], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lookup", 0, [lookupValue, lookupVector, resultVector], false, true, null, false)); }; Functions.prototype.lower=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lower", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lower", 0, [text], false, true, null, false)); }; Functions.prototype.mduration=function (settlement, maturity, coupon, yld, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MDuration", 0, [settlement, maturity, coupon, yld, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MDuration", 0, [settlement, maturity, coupon, yld, frequency, basis], false, true, null, false)); }; Functions.prototype.mirr=function (values, financeRate, reinvestRate) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MIrr", 0, [values, financeRate, reinvestRate], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MIrr", 0, [values, financeRate, reinvestRate], false, true, null, false)); }; Functions.prototype.mround=function (number, multiple) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MRound", 0, [number, multiple], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MRound", 0, [number, multiple], false, true, null, false)); }; Functions.prototype.match=function (lookupValue, lookupArray, matchType) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Match", 0, [lookupValue, lookupArray, matchType], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Match", 0, [lookupValue, lookupArray, matchType], false, true, null, false)); }; Functions.prototype.max=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Max", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Max", 0, [values], false, true, null, false)); }; Functions.prototype.maxA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MaxA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MaxA", 0, [values], false, true, null, false)); }; Functions.prototype.median=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Median", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Median", 0, [values], false, true, null, false)); }; Functions.prototype.mid=function (text, startNum, numChars) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Mid", 0, [text, startNum, numChars], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Mid", 0, [text, startNum, numChars], false, true, null, false)); }; Functions.prototype.midb=function (text, startNum, numBytes) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Midb", 0, [text, startNum, numBytes], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Midb", 0, [text, startNum, numBytes], false, true, null, false)); }; Functions.prototype.min=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Min", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Min", 0, [values], false, true, null, false)); }; Functions.prototype.minA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MinA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MinA", 0, [values], false, true, null, false)); }; Functions.prototype.minute=function (serialNumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Minute", 0, [serialNumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Minute", 0, [serialNumber], false, true, null, false)); }; Functions.prototype.mod=function (number, divisor) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Mod", 0, [number, divisor], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Mod", 0, [number, divisor], false, true, null, false)); }; Functions.prototype.month=function (serialNumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Month", 0, [serialNumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Month", 0, [serialNumber], false, true, null, false)); }; Functions.prototype.multiNomial=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MultiNomial", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MultiNomial", 0, [values], false, true, null, false)); }; Functions.prototype.n=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "N", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "N", 0, [value], false, true, null, false)); }; Functions.prototype.nper=function (rate, pmt, pv, fv, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NPer", 0, [rate, pmt, pv, fv, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NPer", 0, [rate, pmt, pv, fv, type], false, true, null, false)); }; Functions.prototype.na=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Na", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Na", 0, [], false, true, null, false)); }; Functions.prototype.negBinom_Dist=function (numberF, numberS, probabilityS, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NegBinom_Dist", 0, [numberF, numberS, probabilityS, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NegBinom_Dist", 0, [numberF, numberS, probabilityS, cumulative], false, true, null, false)); }; Functions.prototype.networkDays=function (startDate, endDate, holidays) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NetworkDays", 0, [startDate, endDate, holidays], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NetworkDays", 0, [startDate, endDate, holidays], false, true, null, false)); }; Functions.prototype.networkDays_Intl=function (startDate, endDate, weekend, holidays) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NetworkDays_Intl", 0, [startDate, endDate, weekend, holidays], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NetworkDays_Intl", 0, [startDate, endDate, weekend, holidays], false, true, null, false)); }; Functions.prototype.nominal=function (effectRate, npery) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Nominal", 0, [effectRate, npery], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Nominal", 0, [effectRate, npery], false, true, null, false)); }; Functions.prototype.norm_Dist=function (x, mean, standardDev, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_Dist", 0, [x, mean, standardDev, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_Dist", 0, [x, mean, standardDev, cumulative], false, true, null, false)); }; Functions.prototype.norm_Inv=function (probability, mean, standardDev) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_Inv", 0, [probability, mean, standardDev], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_Inv", 0, [probability, mean, standardDev], false, true, null, false)); }; Functions.prototype.norm_S_Dist=function (z, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_S_Dist", 0, [z, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_S_Dist", 0, [z, cumulative], false, true, null, false)); }; Functions.prototype.norm_S_Inv=function (probability) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_S_Inv", 0, [probability], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_S_Inv", 0, [probability], false, true, null, false)); }; Functions.prototype.not=function (logical) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Not", 0, [logical], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Not", 0, [logical], false, true, null, false)); }; Functions.prototype.now=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Now", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Now", 0, [], false, true, null, false)); }; Functions.prototype.npv=function (rate) { var values=[]; for (var _i=1; _i < arguments.length; _i++) { values[_i - 1]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Npv", 0, [rate, values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Npv", 0, [rate, values], false, true, null, false)); }; Functions.prototype.numberValue=function (text, decimalSeparator, groupSeparator) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NumberValue", 0, [text, decimalSeparator, groupSeparator], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NumberValue", 0, [text, decimalSeparator, groupSeparator], false, true, null, false)); }; Functions.prototype.oct2Bin=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Bin", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Bin", 0, [number, places], false, true, null, false)); }; Functions.prototype.oct2Dec=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Dec", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Dec", 0, [number], false, true, null, false)); }; Functions.prototype.oct2Hex=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Hex", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Hex", 0, [number, places], false, true, null, false)); }; Functions.prototype.odd=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Odd", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Odd", 0, [number], false, true, null, false)); }; Functions.prototype.oddFPrice=function (settlement, maturity, issue, firstCoupon, rate, yld, redemption, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddFPrice", 0, [settlement, maturity, issue, firstCoupon, rate, yld, redemption, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddFPrice", 0, [settlement, maturity, issue, firstCoupon, rate, yld, redemption, frequency, basis], false, true, null, false)); }; Functions.prototype.oddFYield=function (settlement, maturity, issue, firstCoupon, rate, pr, redemption, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddFYield", 0, [settlement, maturity, issue, firstCoupon, rate, pr, redemption, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddFYield", 0, [settlement, maturity, issue, firstCoupon, rate, pr, redemption, frequency, basis], false, true, null, false)); }; Functions.prototype.oddLPrice=function (settlement, maturity, lastInterest, rate, yld, redemption, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddLPrice", 0, [settlement, maturity, lastInterest, rate, yld, redemption, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddLPrice", 0, [settlement, maturity, lastInterest, rate, yld, redemption, frequency, basis], false, true, null, false)); }; Functions.prototype.oddLYield=function (settlement, maturity, lastInterest, rate, pr, redemption, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddLYield", 0, [settlement, maturity, lastInterest, rate, pr, redemption, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddLYield", 0, [settlement, maturity, lastInterest, rate, pr, redemption, frequency, basis], false, true, null, false)); }; Functions.prototype.or=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Or", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Or", 0, [values], false, true, null, false)); }; Functions.prototype.pduration=function (rate, pv, fv) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PDuration", 0, [rate, pv, fv], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PDuration", 0, [rate, pv, fv], false, true, null, false)); }; Functions.prototype.percentRank_Exc=function (array, x, significance) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PercentRank_Exc", 0, [array, x, significance], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PercentRank_Exc", 0, [array, x, significance], false, true, null, false)); }; Functions.prototype.percentRank_Inc=function (array, x, significance) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PercentRank_Inc", 0, [array, x, significance], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PercentRank_Inc", 0, [array, x, significance], false, true, null, false)); }; Functions.prototype.percentile_Exc=function (array, k) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Percentile_Exc", 0, [array, k], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Percentile_Exc", 0, [array, k], false, true, null, false)); }; Functions.prototype.percentile_Inc=function (array, k) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Percentile_Inc", 0, [array, k], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Percentile_Inc", 0, [array, k], false, true, null, false)); }; Functions.prototype.permut=function (number, numberChosen) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Permut", 0, [number, numberChosen], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Permut", 0, [number, numberChosen], false, true, null, false)); }; Functions.prototype.permutationa=function (number, numberChosen) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Permutationa", 0, [number, numberChosen], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Permutationa", 0, [number, numberChosen], false, true, null, false)); }; Functions.prototype.phi=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Phi", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Phi", 0, [x], false, true, null, false)); }; Functions.prototype.pi=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pi", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pi", 0, [], false, true, null, false)); }; Functions.prototype.pmt=function (rate, nper, pv, fv, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pmt", 0, [rate, nper, pv, fv, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pmt", 0, [rate, nper, pv, fv, type], false, true, null, false)); }; Functions.prototype.poisson_Dist=function (x, mean, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Poisson_Dist", 0, [x, mean, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Poisson_Dist", 0, [x, mean, cumulative], false, true, null, false)); }; Functions.prototype.power=function (number, power) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Power", 0, [number, power], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Power", 0, [number, power], false, true, null, false)); }; Functions.prototype.ppmt=function (rate, per, nper, pv, fv, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ppmt", 0, [rate, per, nper, pv, fv, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ppmt", 0, [rate, per, nper, pv, fv, type], false, true, null, false)); }; Functions.prototype.price=function (settlement, maturity, rate, yld, redemption, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Price", 0, [settlement, maturity, rate, yld, redemption, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Price", 0, [settlement, maturity, rate, yld, redemption, frequency, basis], false, true, null, false)); }; Functions.prototype.priceDisc=function (settlement, maturity, discount, redemption, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PriceDisc", 0, [settlement, maturity, discount, redemption, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PriceDisc", 0, [settlement, maturity, discount, redemption, basis], false, true, null, false)); }; Functions.prototype.priceMat=function (settlement, maturity, issue, rate, yld, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PriceMat", 0, [settlement, maturity, issue, rate, yld, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PriceMat", 0, [settlement, maturity, issue, rate, yld, basis], false, true, null, false)); }; Functions.prototype.product=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Product", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Product", 0, [values], false, true, null, false)); }; Functions.prototype.proper=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Proper", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Proper", 0, [text], false, true, null, false)); }; Functions.prototype.pv=function (rate, nper, pmt, fv, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pv", 0, [rate, nper, pmt, fv, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pv", 0, [rate, nper, pmt, fv, type], false, true, null, false)); }; Functions.prototype.quartile_Exc=function (array, quart) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quartile_Exc", 0, [array, quart], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quartile_Exc", 0, [array, quart], false, true, null, false)); }; Functions.prototype.quartile_Inc=function (array, quart) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quartile_Inc", 0, [array, quart], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quartile_Inc", 0, [array, quart], false, true, null, false)); }; Functions.prototype.quotient=function (numerator, denominator) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quotient", 0, [numerator, denominator], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quotient", 0, [numerator, denominator], false, true, null, false)); }; Functions.prototype.radians=function (angle) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Radians", 0, [angle], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Radians", 0, [angle], false, true, null, false)); }; Functions.prototype.rand=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rand", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rand", 0, [], false, true, null, false)); }; Functions.prototype.randBetween=function (bottom, top) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RandBetween", 0, [bottom, top], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RandBetween", 0, [bottom, top], false, true, null, false)); }; Functions.prototype.rank_Avg=function (number, ref, order) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rank_Avg", 0, [number, ref, order], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rank_Avg", 0, [number, ref, order], false, true, null, false)); }; Functions.prototype.rank_Eq=function (number, ref, order) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rank_Eq", 0, [number, ref, order], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rank_Eq", 0, [number, ref, order], false, true, null, false)); }; Functions.prototype.rate=function (nper, pmt, pv, fv, type, guess) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rate", 0, [nper, pmt, pv, fv, type, guess], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rate", 0, [nper, pmt, pv, fv, type, guess], false, true, null, false)); }; Functions.prototype.received=function (settlement, maturity, investment, discount, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Received", 0, [settlement, maturity, investment, discount, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Received", 0, [settlement, maturity, investment, discount, basis], false, true, null, false)); }; Functions.prototype.replace=function (oldText, startNum, numChars, newText) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Replace", 0, [oldText, startNum, numChars, newText], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Replace", 0, [oldText, startNum, numChars, newText], false, true, null, false)); }; Functions.prototype.replaceB=function (oldText, startNum, numBytes, newText) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ReplaceB", 0, [oldText, startNum, numBytes, newText], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ReplaceB", 0, [oldText, startNum, numBytes, newText], false, true, null, false)); }; Functions.prototype.rept=function (text, numberTimes) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rept", 0, [text, numberTimes], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rept", 0, [text, numberTimes], false, true, null, false)); }; Functions.prototype.right=function (text, numChars) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Right", 0, [text, numChars], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Right", 0, [text, numChars], false, true, null, false)); }; Functions.prototype.rightb=function (text, numBytes) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rightb", 0, [text, numBytes], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rightb", 0, [text, numBytes], false, true, null, false)); }; Functions.prototype.roman=function (number, form) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Roman", 0, [number, form], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Roman", 0, [number, form], false, true, null, false)); }; Functions.prototype.round=function (number, numDigits) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Round", 0, [number, numDigits], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Round", 0, [number, numDigits], false, true, null, false)); }; Functions.prototype.roundDown=function (number, numDigits) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RoundDown", 0, [number, numDigits], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RoundDown", 0, [number, numDigits], false, true, null, false)); }; Functions.prototype.roundUp=function (number, numDigits) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RoundUp", 0, [number, numDigits], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RoundUp", 0, [number, numDigits], false, true, null, false)); }; Functions.prototype.rows=function (array) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rows", 0, [array], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rows", 0, [array], false, true, null, false)); }; Functions.prototype.rri=function (nper, pv, fv) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rri", 0, [nper, pv, fv], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rri", 0, [nper, pv, fv], false, true, null, false)); }; Functions.prototype.sec=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sec", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sec", 0, [number], false, true, null, false)); }; Functions.prototype.sech=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sech", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sech", 0, [number], false, true, null, false)); }; Functions.prototype.second=function (serialNumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Second", 0, [serialNumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Second", 0, [serialNumber], false, true, null, false)); }; Functions.prototype.seriesSum=function (x, n, m, coefficients) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SeriesSum", 0, [x, n, m, coefficients], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SeriesSum", 0, [x, n, m, coefficients], false, true, null, false)); }; Functions.prototype.sheet=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sheet", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sheet", 0, [value], false, true, null, false)); }; Functions.prototype.sheets=function (reference) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sheets", 0, [reference], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sheets", 0, [reference], false, true, null, false)); }; Functions.prototype.sign=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sign", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sign", 0, [number], false, true, null, false)); }; Functions.prototype.sin=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sin", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sin", 0, [number], false, true, null, false)); }; Functions.prototype.sinh=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sinh", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sinh", 0, [number], false, true, null, false)); }; Functions.prototype.skew=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Skew", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Skew", 0, [values], false, true, null, false)); }; Functions.prototype.skew_p=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Skew_p", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Skew_p", 0, [values], false, true, null, false)); }; Functions.prototype.sln=function (cost, salvage, life) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sln", 0, [cost, salvage, life], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sln", 0, [cost, salvage, life], false, true, null, false)); }; Functions.prototype.small=function (array, k) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Small", 0, [array, k], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Small", 0, [array, k], false, true, null, false)); }; Functions.prototype.sqrt=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sqrt", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sqrt", 0, [number], false, true, null, false)); }; Functions.prototype.sqrtPi=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SqrtPi", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SqrtPi", 0, [number], false, true, null, false)); }; Functions.prototype.stDevA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDevA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDevA", 0, [values], false, true, null, false)); }; Functions.prototype.stDevPA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDevPA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDevPA", 0, [values], false, true, null, false)); }; Functions.prototype.stDev_P=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDev_P", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDev_P", 0, [values], false, true, null, false)); }; Functions.prototype.stDev_S=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDev_S", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDev_S", 0, [values], false, true, null, false)); }; Functions.prototype.standardize=function (x, mean, standardDev) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Standardize", 0, [x, mean, standardDev], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Standardize", 0, [x, mean, standardDev], false, true, null, false)); }; Functions.prototype.substitute=function (text, oldText, newText, instanceNum) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Substitute", 0, [text, oldText, newText, instanceNum], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Substitute", 0, [text, oldText, newText, instanceNum], false, true, null, false)); }; Functions.prototype.subtotal=function (functionNum) { var values=[]; for (var _i=1; _i < arguments.length; _i++) { values[_i - 1]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Subtotal", 0, [functionNum, values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Subtotal", 0, [functionNum, values], false, true, null, false)); }; Functions.prototype.sum=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sum", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sum", 0, [values], false, true, null, false)); }; Functions.prototype.sumIf=function (range, criteria, sumRange) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumIf", 0, [range, criteria, sumRange], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumIf", 0, [range, criteria, sumRange], false, true, null, false)); }; Functions.prototype.sumIfs=function (sumRange) { var values=[]; for (var _i=1; _i < arguments.length; _i++) { values[_i - 1]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumIfs", 0, [sumRange, values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumIfs", 0, [sumRange, values], false, true, null, false)); }; Functions.prototype.sumSq=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumSq", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumSq", 0, [values], false, true, null, false)); }; Functions.prototype.syd=function (cost, salvage, life, per) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Syd", 0, [cost, salvage, life, per], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Syd", 0, [cost, salvage, life, per], false, true, null, false)); }; Functions.prototype.t=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T", 0, [value], false, true, null, false)); }; Functions.prototype.tbillEq=function (settlement, maturity, discount) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillEq", 0, [settlement, maturity, discount], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillEq", 0, [settlement, maturity, discount], false, true, null, false)); }; Functions.prototype.tbillPrice=function (settlement, maturity, discount) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillPrice", 0, [settlement, maturity, discount], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillPrice", 0, [settlement, maturity, discount], false, true, null, false)); }; Functions.prototype.tbillYield=function (settlement, maturity, pr) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillYield", 0, [settlement, maturity, pr], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillYield", 0, [settlement, maturity, pr], false, true, null, false)); }; Functions.prototype.t_Dist=function (x, degFreedom, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist", 0, [x, degFreedom, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist", 0, [x, degFreedom, cumulative], false, true, null, false)); }; Functions.prototype.t_Dist_2T=function (x, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist_2T", 0, [x, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist_2T", 0, [x, degFreedom], false, true, null, false)); }; Functions.prototype.t_Dist_RT=function (x, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist_RT", 0, [x, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist_RT", 0, [x, degFreedom], false, true, null, false)); }; Functions.prototype.t_Inv=function (probability, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Inv", 0, [probability, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Inv", 0, [probability, degFreedom], false, true, null, false)); }; Functions.prototype.t_Inv_2T=function (probability, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Inv_2T", 0, [probability, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Inv_2T", 0, [probability, degFreedom], false, true, null, false)); }; Functions.prototype.tan=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Tan", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Tan", 0, [number], false, true, null, false)); }; Functions.prototype.tanh=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Tanh", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Tanh", 0, [number], false, true, null, false)); }; Functions.prototype.text=function (value, formatText) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Text", 0, [value, formatText], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Text", 0, [value, formatText], false, true, null, false)); }; Functions.prototype.time=function (hour, minute, second) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Time", 0, [hour, minute, second], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Time", 0, [hour, minute, second], false, true, null, false)); }; Functions.prototype.timevalue=function (timeText) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Timevalue", 0, [timeText], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Timevalue", 0, [timeText], false, true, null, false)); }; Functions.prototype.today=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Today", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Today", 0, [], false, true, null, false)); }; Functions.prototype.trim=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Trim", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Trim", 0, [text], false, true, null, false)); }; Functions.prototype.trimMean=function (array, percent) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TrimMean", 0, [array, percent], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TrimMean", 0, [array, percent], false, true, null, false)); }; Functions.prototype.true=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "True", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "True", 0, [], false, true, null, false)); }; Functions.prototype.trunc=function (number, numDigits) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Trunc", 0, [number, numDigits], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Trunc", 0, [number, numDigits], false, true, null, false)); }; Functions.prototype.type=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Type", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Type", 0, [value], false, true, null, false)); }; Functions.prototype.usdollar=function (number, decimals) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "USDollar", 0, [number, decimals], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "USDollar", 0, [number, decimals], false, true, null, false)); }; Functions.prototype.unichar=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Unichar", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Unichar", 0, [number], false, true, null, false)); }; Functions.prototype.unicode=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Unicode", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Unicode", 0, [text], false, true, null, false)); }; Functions.prototype.upper=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Upper", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Upper", 0, [text], false, true, null, false)); }; Functions.prototype.vlookup=function (lookupValue, tableArray, colIndexNum, rangeLookup) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VLookup", 0, [lookupValue, tableArray, colIndexNum, rangeLookup], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VLookup", 0, [lookupValue, tableArray, colIndexNum, rangeLookup], false, true, null, false)); }; Functions.prototype.value=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Value", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Value", 0, [text], false, true, null, false)); }; Functions.prototype.varA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VarA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VarA", 0, [values], false, true, null, false)); }; Functions.prototype.varPA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VarPA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VarPA", 0, [values], false, true, null, false)); }; Functions.prototype.var_P=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Var_P", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Var_P", 0, [values], false, true, null, false)); }; Functions.prototype.var_S=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Var_S", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Var_S", 0, [values], false, true, null, false)); }; Functions.prototype.vdb=function (cost, salvage, life, startPeriod, endPeriod, factor, noSwitch) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Vdb", 0, [cost, salvage, life, startPeriod, endPeriod, factor, noSwitch], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Vdb", 0, [cost, salvage, life, startPeriod, endPeriod, factor, noSwitch], false, true, null, false)); }; Functions.prototype.weekNum=function (serialNumber, returnType) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WeekNum", 0, [serialNumber, returnType], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WeekNum", 0, [serialNumber, returnType], false, true, null, false)); }; Functions.prototype.weekday=function (serialNumber, returnType) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Weekday", 0, [serialNumber, returnType], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Weekday", 0, [serialNumber, returnType], false, true, null, false)); }; Functions.prototype.weibull_Dist=function (x, alpha, beta, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Weibull_Dist", 0, [x, alpha, beta, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Weibull_Dist", 0, [x, alpha, beta, cumulative], false, true, null, false)); }; Functions.prototype.workDay=function (startDate, days, holidays) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WorkDay", 0, [startDate, days, holidays], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WorkDay", 0, [startDate, days, holidays], false, true, null, false)); }; Functions.prototype.workDay_Intl=function (startDate, days, weekend, holidays) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WorkDay_Intl", 0, [startDate, days, weekend, holidays], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WorkDay_Intl", 0, [startDate, days, weekend, holidays], false, true, null, false)); }; Functions.prototype.xirr=function (values, dates, guess) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xirr", 0, [values, dates, guess], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xirr", 0, [values, dates, guess], false, true, null, false)); }; Functions.prototype.xnpv=function (rate, values, dates) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xnpv", 0, [rate, values, dates], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xnpv", 0, [rate, values, dates], false, true, null, false)); }; Functions.prototype.xor=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xor", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xor", 0, [values], false, true, null, false)); }; Functions.prototype.year=function (serialNumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Year", 0, [serialNumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Year", 0, [serialNumber], false, true, null, false)); }; Functions.prototype.yearFrac=function (startDate, endDate, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YearFrac", 0, [startDate, endDate, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YearFrac", 0, [startDate, endDate, basis], false, true, null, false)); }; Functions.prototype.yield=function (settlement, maturity, rate, pr, redemption, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Yield", 0, [settlement, maturity, rate, pr, redemption, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Yield", 0, [settlement, maturity, rate, pr, redemption, frequency, basis], false, true, null, false)); }; Functions.prototype.yieldDisc=function (settlement, maturity, pr, redemption, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YieldDisc", 0, [settlement, maturity, pr, redemption, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YieldDisc", 0, [settlement, maturity, pr, redemption, basis], false, true, null, false)); }; Functions.prototype.yieldMat=function (settlement, maturity, issue, rate, pr, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YieldMat", 0, [settlement, maturity, issue, rate, pr, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YieldMat", 0, [settlement, maturity, issue, rate, pr, basis], false, true, null, false)); }; Functions.prototype.z_Test=function (array, x, sigma) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Z_Test", 0, [array, x, sigma], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Z_Test", 0, [array, x, sigma], false, true, null, false)); }; Functions.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -21443,8 +25331,12 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); }; + Functions.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; Functions.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}); }; return Functions; }(OfficeExtension.ClientObject)); @@ -21453,6 +25345,7 @@ var Excel; (function (ErrorCodes) { ErrorCodes.accessDenied="AccessDenied"; ErrorCodes.apiNotFound="ApiNotFound"; + ErrorCodes.conflict="Conflict"; ErrorCodes.generalException="GeneralException"; ErrorCodes.insertDeleteConflict="InsertDeleteConflict"; ErrorCodes.invalidArgument="InvalidArgument"; @@ -21464,7 +25357,10 @@ var Excel; ErrorCodes.itemNotFound="ItemNotFound"; ErrorCodes.notImplemented="NotImplemented"; ErrorCodes.unsupportedOperation="UnsupportedOperation"; + ErrorCodes.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"; })(ErrorCodes=Excel.ErrorCodes || (Excel.ErrorCodes={})); })(Excel || (Excel={})); +OfficeExtension.Utility._doApiNotSupportedCheck=true; + diff --git a/node_modules/@microsoft/office-js/dist/excel-mac-16.00.js b/node_modules/@microsoft/office-js/dist/excel-mac-16.00.js index 6533fdb..86a5800 100644 --- a/node_modules/@microsoft/office-js/dist/excel-mac-16.00.js +++ b/node_modules/@microsoft/office-js/dist/excel-mac-16.00.js @@ -1,7 +1,7 @@ /* Excel Mac-specific API library */ -/* Version: 16.0.8118.3000 */ +/* Version: 16.0.8904.3000 */ -/* Office.js Version: 16.0.8119.1000 */ +/* Office.js Version: 16.0.8916.1000 */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ @@ -18,4 +18,4 @@ * @version 2.3.0 */ -var __extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},OsfMsAjaxFactory,OSF,OSFLog,Logger,OSFAriaLogger,OSFAppTelemetry,OfficeExt,OfficeExtension,Excel;(function(n){var t=function(){function t(){}var n=!0;return t.prototype.isMsAjaxLoaded=function(){var t="function",i="undefined";return typeof Sys!==i&&typeof Type!==i&&Sys.StringBuilder&&typeof Sys.StringBuilder===t&&Type.registerNamespace&&typeof Type.registerNamespace===t&&Type.registerClass&&typeof Type.registerClass===t&&typeof Function._validateParams===t&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===t?n:!1},t.prototype.loadMsAjaxFull=function(n){var t=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,n)},Object.defineProperty(t.prototype,"msAjaxError",{get:function(){var n=this;return n._msAjaxError==null&&n.isMsAjaxLoaded()&&(n._msAjaxError=Error),n._msAjaxError},set:function(n){this._msAjaxError=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxString",{get:function(){var n=this;return n._msAjaxString==null&&n.isMsAjaxLoaded()&&(n._msAjaxString=String),n._msAjaxString},set:function(n){this._msAjaxString=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxDebug",{get:function(){var n=this;return n._msAjaxDebug==null&&n.isMsAjaxLoaded()&&(n._msAjaxDebug=Sys.Debug),n._msAjaxDebug},set:function(n){this._msAjaxDebug=n},enumerable:n,configurable:n}),t}();n.MicrosoftAjaxFactory=t})(OfficeExt||(OfficeExt={}));OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory;OSF=OSF||{},function(n){var t=function(){function n(n){this._internalStorage=n}return n.prototype.getItem=function(n){try{return this._internalStorage&&this._internalStorage.getItem(n)}catch(t){return null}},n.prototype.setItem=function(n,t){try{this._internalStorage&&this._internalStorage.setItem(n,t)}catch(i){}},n.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(n){}},n.prototype.removeItem=function(n){try{this._internalStorage&&this._internalStorage.removeItem(n)}catch(t){}},n.prototype.getKeysWithPrefix=function(n){var r=[],u,t,i;try{for(u=this._internalStorage&&this._internalStorage.length||0,t=0;t0?i.push(t):t.tabIndex===0&&r.push(t):r.push(t);return i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;return r===0&&(r=i.indexOf(n)-i.indexOf(t)),r}),[].concat(i,r)}var f="focus",e="on",b="configurable",k="writable",o="enumerable",s="undefined",i=!0,t=!1,c=2147483647,n=null,r=-1,l=r,d="&_xdm_Info=",g="&_serializer_version=",nt="_xdm_",ut="_serializer_version=",a="#",tt="&",h="class",v={},ft=3e4,y=n,p=n,u=(new Date).getTime();return{set_entropy:function(n){var t,r,i;if(typeof n=="string")for(t=0;t1?l[l.length-1]:n,s,h,c,a;return u&&o!=n&&(o.indexOf(tt)>=0&&(o=o.split(tt)[0]),o=decodeURIComponent(o)),s=w(),!f&&s&&(h=window.name.indexOf(i),h>r&&(c=window.name.indexOf(";",h),c==r&&(c=window.name.length),a=window.name.substring(h,c),o?s.setItem(a,o):o=s.getItem(a))),o},getConversationId:function(){var i=window.location.search,t=n,r;return i&&(r=i.indexOf("&"),t=r>0?i.substring(1,r):i.substr(1),t&&t.charAt(t.length-1)==="="&&(t=t.substring(0,t.length-1),t&&(t=decodeURIComponent(t)))),t},getInfoItems:function(n){var t=n.split("$");return typeof t[1]==s&&(t=n.split("|")),typeof t[1]==s&&(t=n.split("%7C")),t},getXdmFieldValue:function(n,t){var r="",u=OSF.OUtil.parseXdmInfo(t),i;if(u&&(i=OSF.OUtil.getInfoItems(u),i!=undefined&&i.length>=3))switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]),f;if(u)throw u;for(f in r)if(u=Function._validateParameter(n[f],r[f],f),u)throw u;},writeProfilerMark:function(n){window.msWriteProfilerMark&&(window.msWriteProfilerMark(n),OsfMsAjaxFactory.msAjaxDebug.trace(n))},outputDebug:function(n){typeof OsfMsAjaxFactory!==s&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){var e,f;r=r||{};for(e in u)f=u[e],r[f]==undefined&&(r[f]=i);return Object.defineProperty(n,t,r),n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[o])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[o])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[k,o,b])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[k,o,b])},finalizeProperties:function(n,r){var e,u;r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8,f=e&255,i[t++]=r>>2,i[t++]=(r&3)<<4|u>>4,i[t++]=(u&15)<<2|f>>6,i[t++]=f&63,isNaN(e)||(r=e>>8,u=s&255,f=s>>8,i[t++]=r>>2,i[t++]=(r&3)<<4|u>>4,i[t++]=(u&15)<<2|f>>6,i[t++]=f&63),isNaN(e)?i[t-1]=64:isNaN(s)&&(i[t-2]=64,i[t-1]=64),h=0;h0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){var u,i,f,r;if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(u=[],i=0;in)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=rt(u),o=e?u.length-1:0,u.length===0)return n;while(!h&&o>=0&&on)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=rt(u),l=y(u,e),s=v(u.length,l,o),s<0)return n;while(!c&&s>=0&&s0;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[r%16],r=Math.floor(r/16);for(;t<32;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[Math.floor(Math.random()*16)];return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];return i?(i.name||(i.name=n[this.errorCodes.ooeInternalError].name),i.message||(i.message=n[this.errorCodes.ooeInternalError].message)):i=n[this.errorCodes.ooeInternalError],i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage}}}}(),function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}(),r,i,h,u,c,l,f,a,e,v,y,p,w,b,o,k,d,g,s,nt,tt,it,rt;n.RequirementVersion=ut;r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){var f,u,e,i,r;if(n==undefined)return!1;if(t==undefined&&(t=0),f=this._setMap,u=f._sets,u.hasOwnProperty(n.toLowerCase())){e=u[n.toLowerCase()];try{if((i=this._getVersion(e),t=t+"",r=this._getVersion(t),i.major>0&&i.major>r.major)||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),i=0,r=0;if(t.length<2&&isNaN(Number(n)))throw u;else if(i=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(i)||isNaN(r))throw u;return{minor:r,major:i}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;h=function(n){function i(){n.call(this,{dialogapi:t})}return __extends(i,n),i}(i);n.DefaultDialogSetRequirement=h;u=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelClientDefaultSetRequirement=u;c=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(u);n.ExcelClientV1DefaultSetRequirement=c;l=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookClientDefaultSetRequirement=l;f=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return __extends(i,n),i}(i);n.WordClientDefaultSetRequirement=f;a=function(n){function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return __extends(i,n),i}(f);n.WordClientV1DefaultSetRequirement=a;e=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointClientDefaultSetRequirement=e;v=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(e);n.PowerpointClientV1DefaultSetRequirement=v;y=function(n){function i(){n.call(this,{selection:t,textcoercion:t})}return __extends(i,n),i}(i);n.ProjectClientDefaultSetRequirement=y;p=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return __extends(i,n),i}(i);n.ExcelWebDefaultSetRequirement=p;w=function(n){function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordWebDefaultSetRequirement=w;b=function(n){function i(){n.call(this,{activeview:t,settings:t})}return __extends(i,n),i}(i);n.PowerpointWebDefaultSetRequirement=b;o=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookWebDefaultSetRequirement=o;k=function(n){function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.SwayWebDefaultSetRequirement=k;d=function(n){function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return __extends(i,n),i}(i);n.AccessWebDefaultSetRequirement=d;g=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelIOSDefaultSetRequirement=g;s=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordIOSDefaultSetRequirement=s;nt=function(n){function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return __extends(t,n),t}(s);n.WordIOSV1DefaultSetRequirement=nt;tt=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointIOSDefaultSetRequirement=tt;it=function(n){function i(){n.call(this,{mailbox:t})}return __extends(i,n),i}(i);n.OutlookIOSDefaultSetRequirement=it;rt=function(){function n(){}var t="undefined";return n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},n.getDefaultRequirementMatrix=function(u){var f,e,s,o;return this.initializeDefaultSetMatrix(),f=undefined,e=u.get_requirementMatrix(),e!=undefined&&e.length>0&&typeof JSON!==t?(s=JSON.parse(u.get_requirementMatrix().toLowerCase()),f=new r(new i(s))):(o=n.getClientFullVersionString(u),f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[o]!=undefined?new r(n.DefaultSetArrayMatrix[o]):new r(new i({}))),f},n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix(),e;return f!=undefined&&f.length>0&&typeof JSON!==t?(e=JSON.parse(n.get_requirementMatrix().toLowerCase()),u=new r(new i(e))):u=new r(new h),u},n.getClientFullVersionString=function(n){var i=n.get_appMinorVersion(),u="",r="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;return f&&n.get_appVersion()==1?r=t==4096&&i>=15?"16.00.01":"16.00":n.get_appName()==64?r=n.get_appVersion():(u=i<10?"0"+i:""+i,r=n.get_appVersion()+"."+u),n.get_appName()+"-"+r},n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new c;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new v;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new l;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new w;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new b;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new g;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new k;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new nt;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new tt;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new it},n.Excel_RCLIENT_1600="1-16.00",n.Excel_RCLIENT_1601="1-16.01",n.Word_RCLIENT_1600="2-16.00",n.Word_RCLIENT_1601="2-16.01",n.PowerPoint_RCLIENT_1600="4-16.00",n.PowerPoint_RCLIENT_1601="4-16.01",n.Outlook_RCLIENT_1600="8-16.00",n.Excel_WAC_1600="16-16.00",n.Word_WAC_1600="32-16.00",n.Outlook_WAC_1600="64-16.00",n.Outlook_WAC_1601="64-16.01",n.Project_RCLIENT_1600="128-16.00",n.Access_WAC_1600="256-16.00",n.PowerPoint_WAC_1600="512-16.00",n.Excel_IOS_1600="1024-16.00",n.SWAY_WAC_1600="2048-16.00",n.Word_IOS_1600="4096-16.00",n.Word_IOS_16001="4096-16.00.01",n.PowerPoint_IOS_1600="8192-16.00",n.Outlook_IOS_1600="65536-16.00",n.DefaultSetArrayMatrix={},n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))}(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}return n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n},n.getInstance=function(){return n.hostObj===undefined&&(n.hostObj=new n),n.hostObj},n.prototype.getPlatform=function(){var n=this,t;return n.hostInfo.hostPlatform&&(t=n.hostInfo.hostPlatform.toLowerCase(),n.platformRemappings[t])?n.platformRemappings[t]:null},n.prototype.getHost=function(){var n=this,t;if(n.hostInfo.hostType){if(t=n.hostInfo.hostType.toLowerCase(),n.camelCaseMappings[t])return n.camelCaseMappings[t];if(t=n.capitalizeFirstLetter(n.hostInfo.hostType),Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null},n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null},n}();n.Host=t})(t=n.HostName||(n.HostName={}))}(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){n||(window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,n=!0)},disableShortcut:function(){n&&(t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window),n=!1)}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i,r,o,u,f,e;if(n&&typeof n=="string"&&(r=n.indexOf("#"),r!=-1)){o=n.substring(0,r);u=n.substring(r+1);switch(o){case"binding":case"bindings":u&&(i=new OSF.DDA.BindingPromise(u))}}if(i)return i.onFail=t,i;else if(t)if(f=typeof t,f=="function")e={},e[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(e,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext));else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f);};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this,s,e;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.auth&&OSF.OUtil.defineEnumerableProperty(f,"auth",{value:n.auth});n.get_isDialog()?(e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e})):(t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t}),r&&(s=r.displayName||"appOM",delete r.displayName,OSF.OUtil.defineEnumerableProperty(f,s,{value:r})),u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}}),e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e}))};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this,u;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;return OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext()),n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,e=n.length,o=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){var u,i,r;for(u in n){if(i=n[u],r=t[u],i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw o();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw o();}};f.extractRequiredArguments=function(t,i,r){var f,u,h,s,c,l;if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(c=n.length-1;c>=s;c--){l=n[c];switch(typeof l){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=l;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}if(f=o.fillOptions(f,i,r,u),e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;return o.verifyArguments(t,f),f}var h="function",s=n.length,o=new OSF.DDA.ApiMethodCall(n,t,i,f,e);this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),u=c(n,r,t,i);return o.constructCallArgs(r,u,t,i)};this.processResponse=function(n,t,i,f){return n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n)};this.getCallArgs=function(n){for(var t,u,r,i=n.length-1;i>=s;i--){r=n[i];switch(typeof r){case"object":t=r;break;case h:u=r}}return t=t||{},u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u),t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],i=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],t,i,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback],u,r;f&&(u={},u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?u[OSF.DDA.AsyncResultEnum.Properties.Value]=i:(r={},i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i),f(new OSF.DDA.AsyncResult(u,r)))};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.SyncMethodNames[t]=i};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){function o(n,i,r,u){var o,c,s,h;if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(s=n.length-1;s>=e;s--){h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}return o=f.fillOptions(o,i,r,u),f.verifyArguments(t,o),o}var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),u=o(n,r,t,i);return f.constructCallArgs(r,u,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){function e(i,f){var a=i?{}:undefined,s,h,o,v,c,l;for(s in i){if(h=i[s],OSF.DDA.ListType.isListType(s)){o=[];for(v in h)o.push(e(h[v],f))}else OSF.OUtil.listContainsKey(r,s)?o=r[s][f](h):f==u&&n.preserveNesting(s)?o=e(h,f):(c=t[s],c?(l=c[f],l&&(o=l[h],o===undefined&&(o=h))):o=h);a[s]=o}return a}function l(i,r){var e,u,h,s;for(u in r)h=n.isComplexType(u)?l(i,t[u][o]):i[u],h!=undefined&&(e||(e={}),s=r[u],s==f&&(s=u),e[s]=n.pack(u,h));return e}function s(i,r,e){var o,a,h,l,p,v,y;e||(e={});for(o in r){if(a=r[o],a==f)h=i;else if(a==c){e[o]=i.toArray();continue}else h=i[a];if(h===null||h===undefined)e[o]=undefined;else if(h=n.unpack(o,h),n.isComplexType(o))l=t[o][u],n.preserveNesting(o)?e[o]=s(h,l):s(h,l,e);else if(OSF.DDA.ListType.isListType(o)){l={};p=OSF.DDA.ListType.getDescriptor(o);l[p]=f;v=new Array(h.length);for(y in h)v[y]=s(h[y],l);e[o]=v}else e[o]=h}return e}function a(n,i,r){var f=t[n][r],u,o,c;return r=="toHost"?(o=e(i,r),u=l(o,f)):r==h&&(c=s(i,f),u=e(c,r)),u}var h="fromHost",i=this,o="toHost",u=h,c="sourceData",f="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];t||(t={});i.addMapping=function(n,i){var e,h,c,l,r,s,a,v;if(i.map){e=i.map;h={};for(c in e)l=e[c],l==f&&(l=c),h[l]=c}else e=i.toHost,h=i.fromHost;if(r=t[n],r){s=r[o];for(a in s)e[a]=s[a];s=r[u];for(v in s)h[v]=s[v]}else r=t[n]={};r[o]=e;r[u]=h};i.toHost=function(n,t){return a(n,t,o)};i.fromHost=function(n,t){return a(n,t,u)};i.self=f;i.sourceData=c;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){return this.isDynamicType(n)?t[n].toHost(i):i};i.unpack=function(n,i){return this.isDynamicType(n)?t[n].fromHost(i):i}};OSF.DDA.getDecoratedParameterMap=function(n,t){function r(n){var i=null,r,t;if(n)for(i={},r=n.length,t=0;t0){for(r=[],i=0;i=s)break;if(f=Function._validateParameter(n[e],o,h),f)return f.popStackFrame(),f}return t}),Function._validateParameterCount||(Function._validateParameterCount=function(n,r,u){var f,s,e=r.length,h=n.length,c,l,a;if(he)for(s=i,f=0;f0&&t.push(u)}}catch(s){}return t}var i=[],t={};t[Microsoft.Office.WebExtension.Parameters.Data]=function(){var t=0,i=1;return{toHost:function(n){if(OSF.DDA.TableDataProperties&&typeof n!="string"&&n[OSF.DDA.TableDataProperties.TableRows]!==undefined){var r=[];r[t]=n[OSF.DDA.TableDataProperties.TableRows];r[i]=n[OSF.DDA.TableDataProperties.TableHeaders];n=r}return n},fromHost:function(r){var f,e,u;return r.toArray?(e=r.dimensions(),e===2?f=n(r):(u=r.toArray(),u.length===2&&(u[0]!=null&&u[0].toArray||u[1]!=null&&u[1].toArray)?(f={},f[OSF.DDA.TableDataProperties.TableRows]=n(u[t]),f[OSF.DDA.TableDataProperties.TableHeaders]=n(u[i])):f=u)):f=r,f}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,i,t);this.unpack=function(n,i){var r,u;return this.isComplexType(n)||OSF.DDA.ListType.isListType(n)?(u=(i||typeof i=="unknown")&&i.toArray,r=u?i.toArray():i||{}):r=this.isDynamicType(n)?t[n].fromHost(i):i,r}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(n){function t(n){var i=n,f,r,u;if(OSF.OUtil.isArray(n))for(f=i.length,r=0;r2)for(u=[],o=1;o-1&&(o="&");var y=screen.width*e.width/100,p=screen.height*e.height/100,w="width="+y+", height="+p;if(f[0]=f[0].concat(o).concat(h),a=f.join(c),n.popup=window.open(a,"",w),n.popup!=undefined&&window.dialogAPIErrorCode==undefined){window.addEventListener("message",v);n.interval=window.setInterval(b,500);function k(n){r(t,[n])}n.NotifyError=k;u(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}else s=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,window.dialogAPIErrorCode&&(s=window.dialogAPIErrorCode),u(s)}},n.prototype.messageParent=function(n){var t=n[Microsoft.Office.WebExtension.Parameters.MessageToParent],i={dialogMessage:{messageType:OSF.DialogMessageType.DialogMessageReceived,messageContent:t}};window.opener.postMessage(JSON.stringify(i),window.location.origin)},n.prototype.closeDialog=function(t,i,r){n.popup?(n.interval&&window.clearInterval(n.interval),n.popup.close(),n.NotifyError=null,r(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)):r(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)},n.prototype.sendMessage=function(){},n}();n.MacRichClientHostController=t}(OfficeExt||(OfficeExt={}));OSF.ClientHostController=new OfficeExt.MacRichClientHostController,function(n){var t;(function(t){var i=function(){function n(){this._osfOfficeTheme=t;this._osfOfficeThemeTimeStamp=t}var t=null;return n.prototype.getOfficeTheme=function(){var r="GetOfficeThemeInfo",t=this,i;if(OSF.DDA._OsfControlContext){if(t._osfOfficeTheme&&t._osfOfficeThemeTimeStamp&&(new Date).getTime()-t._osfOfficeThemeTimeStamp40)&&(n=OSF.OUtil.Guid.generateNewGuid(),t.setValue(t.clientIDKey,n)),n},n.prototype.saveLog=function(n,t){var i=this,u=i.getValue(i.logIdSetKey);u=(u&&u.length>0?u+";":r)+n;i.setValue(i.logIdSetKey,u);i.setValue(n,t)},n.prototype.enumerateLog=function(n,t){var i=this,e=i.getValue(i.logIdSetKey),u,o,r,f;if(e){u=e.split(";");for(o in u)r=u[o],f=i.getValue(r),f&&(n&&n(r,f),t&&i.remove(r));t&&i.remove(i.logIdSetKey)}},n.prototype.getValue=function(n){var t=OSF.OUtil.getLocalStorage(),i=r;return t&&(i=t.getItem(n)),i},n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)},n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}},n}(),o=function(){function n(){}return n.prototype.LogData=function(n){OSF.Logger&&(OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n.SerializeRow(),OSF.Logger.SendFlag.none),OSFAriaLogger.AriaLogger.getInstance().logData(n))},n.prototype.LogRawData=function(n){if(OSF.Logger){OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n,OSF.Logger.SendFlag.none);try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(n))}catch(t){}}},n}();n.initialize=v;n.onAppActivated=y;n.onScriptDone=p;n.onCallDone=w;n.onMethodDone=b;n.onPropertyDone=k;n.onEventDone=d;n.onRegisterDone=g;n.onAppClosed=nt;n.setOsfControlAppCorrelationId=tt;n.doAppInitializationLogging=c;n.logAppCommonMessage=it;n.logAppException=rt;OSF.AppTelemetry=n}(OSFAppTelemetry||(OSFAppTelemetry={}));Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(n){var i=this,r,t,u;i._eventHandlers={};i._objectEventHandlers={};i._queuedEventsArgs={};for(r in n)t=n[r],u=t=="objectDeleted"||t=="objectSelectionChanged"||t=="objectDataChanged"||t=="contentControlAdded",u?i._objectEventHandlers[t]={}:i._eventHandlers[t]=[],i._queuedEventsArgs[t]=[]};OSF.EventDispatch.prototype={getSupportedEvents:function(){var n=[];for(var t in this._eventHandlers)n.push(t);for(t in this._objectEventHandlers)n.push(t);return n},supportsEvent:function(n){for(var t in this._eventHandlers)if(n==t)return!0;for(t in this._objectEventHandlers)if(n==t)return!0;return!1},hasEventHandler:function(n,t){var i=this._eventHandlers[n],r;if(i&&i.length>0)for(r in i)if(i[r]===t)return!0;return!1},hasObjectEventHandler:function(n,t,i){var f=this._objectEventHandlers[n],r,u;if(f!=null)for(r=f[t],u=0;r!=null&&u0)for(r=0;r0?(this._eventHandlers[n]=[],!0):!1},clearObjectEventHandlers:function(n,t){return this._objectEventHandlers[n]!=null&&this._objectEventHandlers[n][t]!=null?(this._objectEventHandlers[n][t]=[],!0):!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},getObjectEventHandlerCount:function(n,t){return this._objectEventHandlers[n]==null||this._objectEventHandlers[n][t]==null?0:this._objectEventHandlers[n][t].length},fireEvent:function(n){var t,i,r;if(n.type==undefined)return!1;if(t=n.type,t&&this._eventHandlers[t]){i=this._eventHandlers[t];for(r in i)i[r](n);return!0}else return!1},fireObjectEvent:function(n,t){var i,f,r,u;if(t.type==undefined)return!1;if(i=t.type,i&&this._objectEventHandlers[i]&&(f=this._objectEventHandlers[i],r=f[n],r!=null)){for(u=0;u0)){for(r=t[0];i.length>0;)u=i.shift(),r(u);return!0}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var f="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(n,i[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]=="outlook"||OSF._OfficeAppFactory.getHostInfo()[f]=="outlookwebapp")r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i),t.initialize(r.initialData),t.setCurrentItemNumber(r.itemNumber.itemNumber);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var i=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),t=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];t(arguments,i,n)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(n){var i=OSF.DDA.SyncMethodNames.MessageParent.displayName,t=this,r;t[i]||OSF.OUtil.defineEnumerableProperty(t,i,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return n(arguments,t)}});r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;t[r]||typeof OSF.DialogParentMessageEventDispatch=="undefined"||OSF.DDA.DispIdHost.addEventSupport(t,OSF.DialogParentMessageEventDispatch,n);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(n){n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:n[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}}],privateStateCallbacks:[],onSucceeded:function(n){var f=n[Microsoft.Office.WebExtension.Parameters.Id],i=n[Microsoft.Office.WebExtension.Parameters.Data],t=new OSF.DialogHandler,e=OSF.DDA.AsyncMethodNames.CloseAsync.displayName,r,u;return OSF.OUtil.defineEnumerableProperty(t,e,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];n(arguments,f,i,t)}}),r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName,OSF.OUtil.defineEnumerableProperty(t,r,{value:function(){var r=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],n=r.verifyAndExtractCall(arguments,t,i),u=n[Microsoft.Office.WebExtension.Parameters.EventType],f=n[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(u,f)}}),u=OSF.DDA.SyncMethodNames.SendMessage.displayName,OSF.OUtil.defineEnumerableProperty(t,u,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return n(arguments,i,t)}}),t},checkCallArgs:function(n){return n[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Width]=1),n[Microsoft.Office.WebExtension.Parameters.Width]>100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99),n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1),n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99),n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(n){try{n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,n);OSF.ClientHostController.openDialog(n.dispId,n.targetId,function(t,i){n.onEvent&&n.onEvent(i);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(n){n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,n);try{OSF.ClientHostController.closeDialog(n.dispId,n.targetId,t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.messageParent=function(n){try{n.onCalling&&n.onCalling();var i=(new Date).getTime(),t=OSF.ClientHostController.messageParent(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs((new Date).getTime()-i),t),t}catch(r){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(r)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.sendMessage=function(n){try{n.onCalling&&n.onCalling();var r=(new Date).getTime(),t=OSF.ClientHostController.sendMessage(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),t}catch(i){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(i)}};Microsoft.Office.WebExtension.TableData=function(n,t){function i(n){if(n==null||n==undefined)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(n,2);t<2;t++)n=[n];return n}catch(i){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(n){t=i(n)}},rows:{get:function(){return n},set:function(t){n=t==null||OSF.OUtil.isArray(t)&&t.length==0?[]:i(t)}}});this.headers=t;this.rows=n};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(n){return new Microsoft.Office.WebExtension.TableData(n[OSF.DDA.TableDataProperties.TableRows],n[OSF.DDA.TableDataProperties.TableHeaders])};Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var n=null;return{findArrayDimensionality:function(n){if(OSF.OUtil.isArray(n)){for(var t=0,i=0;i6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix&&(i=new Date(parseInt(t.slice(5,-1))),i)?i:t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,!0);r[i]=t}catch(u){}}return r}};OSF.DDA.Settings=function(n){var t="name",i;n=n||{};i=function(n){var i=OSF.OUtil.getSessionStorage(),t,r;i&&(t=OSF.DDA.SettingsManager.serializeSettings(n),r=JSON?JSON.stringify(t):Sys.Serialization.JavaScriptSerializer.serialize(t),i.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),r))};OSF.OUtil.defineEnumerableProperties(this,{get:{value:function(i){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]),r;if(u)throw u;return r=n[i],typeof r=="undefined"?null:r}},set:{value:function(r,u){var f=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1},{name:"value",mayBeNull:!0}]);if(f)throw f;n[r]=u;i(n)}},remove:{value:function(r){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]);if(u)throw u;delete n[r];i(n)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],n)};OSF.DDA.RefreshableSettings=function(n){OSF.DDA.RefreshableSettings.uber.constructor.call(this,n);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],n);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:n}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(n,t){return t}}],onSucceeded:function(n,t,i){var f=n[OSF.DDA.SettingsManager.SerializedSettings],u=OSF.DDA.SettingsManager.deserializeSettings(f),e=i[OSF.DDA.SettingsManager.RefreshingSettings];for(var r in e)t.remove(r);for(r in u)t.set(r,u[r]);return t}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(n,t){return OSF.DDA.SettingsManager.serializeSettings(t)}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});Microsoft.Office.WebExtension.BindingType={Table:"table",Text:"text",Matrix:"matrix"};OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType};OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{BindingList:"BindingList"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{Subset:"subset",BindingProperties:"BindingProperties"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList,OSF.DDA.PropertyDescriptors.BindingProperties);OSF.DDA.BindingPromise=function(n,t){this._id=n;OSF.OUtil.defineEnumerableProperty(this,"onFail",{get:function(){return t},set:function(n){var i=typeof n;if(i!="undefined"&&i!="function")throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,i);t=n}})};OSF.DDA.BindingPromise.prototype={_fetch:function(n){var t=this,i;return t.binding?n&&n(t.binding):t._binding||(i=t,Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(t._id,function(t){t.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded?(OSF.OUtil.defineEnumerableProperty(i,"binding",{value:t.value}),n&&n(i.binding)):i.onFail&&i.onFail(t)})),t},getDataAsync:function(){var n=arguments;return this._fetch(function(t){t.getDataAsync.apply(t,n)}),this},setDataAsync:function(){var n=arguments;return this._fetch(function(t){t.setDataAsync.apply(t,n)}),this},addHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.addHandlerAsync.apply(t,n)}),this},removeHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.removeHandlerAsync.apply(t,n)}),this}};OSF.DDA.BindingFacade=function(n){this._eventDispatches=[];OSF.OUtil.defineEnumerableProperty(this,"document",{value:n});var t=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[t.AddFromSelectionAsync,t.AddFromNamedItemAsync,t.GetAllAsync,t.GetByIdAsync,t.ReleaseByIdAsync])};OSF.DDA.UnknownBinding=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}})};OSF.DDA.Binding=function(n,t){var r,u,i,f;OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}});r=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[r.GetDataAsync,r.SetDataAsync]);u=Microsoft.Office.WebExtension.EventType;i=t.bindings._eventDispatches;i[n]||(i[n]=new OSF.EventDispatch([u.BindingSelectionChanged,u.BindingDataChanged]));f=i[n];OSF.DDA.DispIdHost.addEventSupport(this,f)};OSF.DDA.generateBindingId=function(){return"UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+(new Date).getTime()};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureBinding=function(n,t){var r=n[OSF.DDA.BindingProperties.Id],u=n[OSF.DDA.BindingProperties.RowCount],f=n[OSF.DDA.BindingProperties.ColumnCount],s=n[OSF.DDA.BindingProperties.HasHeaders],i,e,o;switch(n[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:i=new OSF.DDA.TextBinding(r,t);break;case Microsoft.Office.WebExtension.BindingType.Matrix:i=new OSF.DDA.MatrixBinding(r,t,u,f);break;case Microsoft.Office.WebExtension.BindingType.Table:e=function(){return OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument};o=e()&&OSF.DDA.ExcelTableBinding?OSF.DDA.ExcelTableBinding:OSF.DDA.TableBinding;i=new o(r,t,u,f,s);break;default:i=new OSF.DDA.UnknownBinding(r,t)}return i};OSF.DDA.AsyncMethodNames.addNames({AddFromSelectionAsync:"addFromSelectionAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:"getByIdAsync",ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync"}),function(){function u(n){return OSF.DDA.OMFactory.manufactureBinding(n,Microsoft.Office.WebExtension.context.document)}function f(n){return n.id}function e(n,t,i){var u=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&u&&(u[OSF.DDA.TableDataProperties.TableRows]!=undefined||u[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(u=OSF.DDA.OMFactory.manufactureTableData(u)),u=OSF.DDA.DataCoercion.coerceData(u,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),u==undefined?r:u}var t="number",i="object",n="string",r=null;OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:[n]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return!0}}],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.BindingList],u)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n,t,i){var r=i[Microsoft.Office.WebExtension.Parameters.Id];delete t._eventDispatches[r]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n,t){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&n[Microsoft.Office.WebExtension.Parameters.RowCount]==0&&n[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn],delete n[Microsoft.Office.WebExtension.Parameters.RowCount],delete n[Microsoft.Office.WebExtension.Parameters.ColumnCount]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]||n[Microsoft.Office.WebExtension.Parameters.RowCount]||n[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[n,i,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}]})}();OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.MatrixBinding=function(n,t,i,r){OSF.DDA.MatrixBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Matrix},rowCount:{value:i?i:0},columnCount:{value:r?r:0}})};OSF.OUtil.extend(OSF.DDA.MatrixBinding,OSF.DDA.Binding);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.BindingProperties,fromHost:[{name:OSF.DDA.BindingProperties.Id,value:0},{name:OSF.DDA.BindingProperties.Type,value:1},{name:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,value:2}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.BindingType,toHost:[{name:Microsoft.Office.WebExtension.BindingType.Text,value:0},{name:Microsoft.Office.WebExtension.BindingType.Matrix,value:1},{name:Microsoft.Office.WebExtension.BindingType.Table,value:2}],invertible:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,value:0},{name:Microsoft.Office.WebExtension.Parameters.Id,value:1},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:2},{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseBindingMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAllBindingsMethod,fromHost:[{name:OSF.DDA.ListDescriptors.BindingList,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:2},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:3},{name:OSF.DDA.PropertyDescriptors.Subset,value:4}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.Data,value:2},{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,fromHost:[{name:OSF.DDA.BindingProperties.RowCount,value:0},{name:OSF.DDA.BindingProperties.ColumnCount,value:1},{name:OSF.DDA.BindingProperties.HasHeaders,value:2}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.Subset,toHost:[{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:0},{name:OSF.DDA.SafeArray.UniqueArguments.Run,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Offset,toHost:[{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:0},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Run,toHost:[{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:0},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddColumnsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearAllRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{TableDataProperties:"TableDataProperties"});OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};OSF.DDA.TableBinding=function(n,t,i,r,u){OSF.DDA.TableBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:i?i:0},columnCount:{value:r?r:0},hasHeaders:{value:u?u:!1}});var f=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[f.AddRowsAsync,f.AddColumnsAsync,f.DeleteAllDataValuesAsync])};OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync"}),function(){function n(n){return n.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]})}();OSF.DDA.TextBinding=function(n,t){OSF.DDA.TextBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperty(this,"type",{value:Microsoft.Office.WebExtension.BindingType.Text})};OSF.OUtil.extend(OSF.DDA.TextBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddFromPromptAsync:"addFromPromptAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromPromptAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:["string"],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.PromptText,value:{types:["string"],calculate:function(){return Strings.OfficeOM.L_AddBindingFromPromptDefaultText}}},{name:Microsoft.Office.WebExtension.Parameters.SampleData,value:{types:["object"],defaultValue:null}}],privateStateCallbacks:[],onSucceeded:function(n){return OSF.DDA.OMFactory.manufactureBinding(n,Microsoft.Office.WebExtension.context.document)}});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromPromptMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:1},{name:Microsoft.Office.WebExtension.Parameters.PromptText,value:2}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"});OSF.DDA.DocumentSelectionChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:n}})};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDeleted:"objectDeleted"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectSelectionChanged:"objectSelectionChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDataChanged:"objectDataChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ContentControlAdded:"contentControlAdded"});OSF.DDA.ObjectEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:n},object:{value:t}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDeletedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDataChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidContentControlAddedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{BindingSelectionChanged:"bindingSelectionChanged",BindingDataChanged:"bindingDataChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{BindingSelectionChangedEvent:"BindingSelectionChangedEvent"});OSF.DDA.BindingSelectionChangedEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingSelectionChanged},binding:{value:n}});for(var i in t)OSF.OUtil.defineEnumerableProperty(this,i,{value:t[i]})};OSF.DDA.BindingDataChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingDataChanged},binding:{value:n}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:0},{name:OSF.DDA.PropertyDescriptors.Subset,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingDataChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FilterType,{OnlyVisible:"onlyVisible"});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.OnlyVisible,value:1}]});Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"};Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"};Microsoft.Office.WebExtension.Index={First:"first",Last:"last",Next:"next",Previous:"previous"};OSF.DDA.AsyncMethodNames.addNames({GoToByIdAsync:"goToByIdAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GoToByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string","number"]},{name:Microsoft.Office.WebExtension.Parameters.GoToType,"enum":Microsoft.Office.WebExtension.GoToType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:{"enum":Microsoft.Office.WebExtension.SelectionMode,defaultValue:Microsoft.Office.WebExtension.SelectionMode.Default}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:0},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:1},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:2},{name:Microsoft.Office.WebExtension.GoToType.Index,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:0},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:1},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:1},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:2}]});OSF.DDA.AsyncMethodNames.addNames({ExecuteRichApiRequestAsync:"executeRichApiRequestAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[]});OSF.OUtil.setNamespace("RichApi",OSF.DDA);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidExecuteRichApiRequestMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(n){OSF.OUtil.defineEnumerableProperties(this,{url:{value:n[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(n){return new Microsoft.Office.WebExtension.FileProperties(n)}});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,fromHost:[{name:OSF.DDA.FilePropertiesDescriptor.Url,value:0}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.ExcelTableBinding=function(n,t,i,r,u){var f=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[f.ClearFormatsAsync,f.SetTableOptionsAsync,f.SetFormatsAsync]);OSF.DDA.ExcelTableBinding.uber.constructor.call(this,n,t,i,r,u);OSF.OUtil.finalizeProperties(this)};OSF.OUtil.extend(OSF.DDA.ExcelTableBinding,OSF.DDA.TableBinding),function(){var t="number",n="object",i="string";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[i,n,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:[n],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:[n],defaultValue:[]}}],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[i,n,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[n,i],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[n],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:[n],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:[n],defaultValue:[]}}],checkCallArgs:function(n,t){var i=Microsoft.Office.WebExtension.Parameters;if(n[i.StartRow]==0&&n[i.StartColumn]==0&&OSF.OUtil.isArray(n[i.CellFormat])&&n[i.CellFormat].length===0&&OSF.OUtil.isArray(n[i.TableOptions])&&n[i.TableOptions].length===0&&(delete n[i.StartRow],delete n[i.StartColumn],delete n[i.CellFormat],delete n[i.TableOptions]),n[i.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[i.StartRow]&&n[i.StartRow]!=0||n[i.StartColumn]&&n[i.StartColumn]!=0||n[i.CellFormat]||n[i.TableOptions]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:function(n){return n.id}}]});OSF.DDA.BindingPromise.prototype.setTableOptionsAsync=function(){var n=arguments;return this._fetch(function(t){t.setTableOptionsAsync.apply(t,n)}),this};OSF.DDA.BindingPromise.prototype.setFormatsAsync=function(){var n=arguments;return this._fetch(function(t){t.setFormatsAsync.apply(t,n)}),this};OSF.DDA.BindingPromise.prototype.clearFormatsAsync=function(){var n=arguments;return this._fetch(function(t){t.clearFormatsAsync.apply(t,n)}),this}}(),function(){function n(n){return n.id}OSF.DDA.AsyncMethodNames.addNames({ClearFormatsAsync:"clearFormatsAsync",SetTableOptionsAsync:"setTableOptionsAsync",SetFormatsAsync:"setFormatsAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ClearFormatsAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetTableOptionsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TableOptions,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetFormatsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CellFormat,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]})}();Microsoft.Office.WebExtension.Table={All:0,Data:1,Headers:2},function(){var u="undefined",e="auto fit",o="distributed",f="none";OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearFormatsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetTableOptionsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetFormatsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:2},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.Data,value:2},{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:3},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:4},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:5}]});var s={headerRow:0,bandedRows:1,firstColumn:2,lastColumn:3,bandedColumns:4,filterButton:5,style:6,totalRow:7},h={row:0,column:1},t={alignHorizontal:{text:"alignHorizontal",type:1},alignVertical:{text:"alignVertical",type:2},backgroundColor:{text:"backgroundColor",type:101},borderStyle:{text:"borderStyle",type:201},borderColor:{text:"borderColor",type:202},borderTopStyle:{text:"borderTopStyle",type:203},borderTopColor:{text:"borderTopColor",type:204},borderBottomStyle:{text:"borderBottomStyle",type:205},borderBottomColor:{text:"borderBottomColor",type:206},borderLeftStyle:{text:"borderLeftStyle",type:207},borderLeftColor:{text:"borderLeftColor",type:208},borderRightStyle:{text:"borderRightStyle",type:209},borderRightColor:{text:"borderRightColor",type:210},borderOutlineStyle:{text:"borderOutlineStyle",type:211},borderOutlineColor:{text:"borderOutlineColor",type:212},borderInlineStyle:{text:"borderInlineStyle",type:213},borderInlineColor:{text:"borderInlineColor",type:214},fontFamily:{text:"fontFamily",type:301},fontStyle:{text:"fontStyle",type:302},fontSize:{text:"fontSize",type:303},fontUnderlineStyle:{text:"fontUnderlineStyle",type:304},fontColor:{text:"fontColor",type:305},fontDirection:{text:"fontDirection",type:306},fontStrikethrough:{text:"fontStrikethrough",type:307},fontSuperscript:{text:"fontSuperscript",type:308},fontSubscript:{text:"fontSubscript",type:309},fontNormal:{text:"fontNormal",type:310},indentLeft:{text:"indentLeft",type:401},indentRight:{text:"indentRight",type:402},numberFormat:{text:"numberFormat",type:501},width:{text:"width",type:701},height:{text:"height",type:702},wrapping:{text:"wrapping",type:703}},r=[{name:f,value:0},{name:"thin",value:1},{name:"medium",value:2},{name:"dashed",value:3},{name:"dotted",value:4},{name:"thick",value:5},{name:"double",value:6},{name:"hair",value:7},{name:"medium dashed",value:8},{name:"dash dot",value:9},{name:"medium dash dot",value:10},{name:"dash dot dot",value:11},{name:"medium dash dot dot",value:12},{name:"slant dash dot",value:13}],i=[{name:f,value:0},{name:"black",value:1},{name:"blue",value:2},{name:"gray",value:3},{name:"green",value:4},{name:"orange",value:5},{name:"pink",value:6},{name:"purple",value:7},{name:"red",value:8},{name:"teal",value:9},{name:"turquoise",value:10},{name:"violet",value:11},{name:"white",value:12},{name:"yellow",value:13},{name:"automatic",value:14}],n=OSF.DDA.SafeArray.Delegate.ParameterMap;n.define({type:t.alignHorizontal.text,toHost:[{name:"general",value:0},{name:"left",value:1},{name:"center",value:2},{name:"right",value:3},{name:"fill",value:4},{name:"justify",value:5},{name:"center across selection",value:6},{name:o,value:7}]});n.define({type:t.alignVertical.text,toHost:[{name:"top",value:0},{name:"center",value:1},{name:"bottom",value:2},{name:"justify",value:3},{name:o,value:4}]});n.define({type:t.backgroundColor.text,toHost:i});n.define({type:t.borderStyle.text,toHost:r});n.define({type:t.borderColor.text,toHost:i});n.define({type:t.borderTopStyle.text,toHost:r});n.define({type:t.borderTopColor.text,toHost:i});n.define({type:t.borderBottomStyle.text,toHost:r});n.define({type:t.borderBottomColor.text,toHost:i});n.define({type:t.borderLeftStyle.text,toHost:r});n.define({type:t.borderLeftColor.text,toHost:i});n.define({type:t.borderRightStyle.text,toHost:r});n.define({type:t.borderRightColor.text,toHost:i});n.define({type:t.borderOutlineStyle.text,toHost:r});n.define({type:t.borderOutlineColor.text,toHost:i});n.define({type:t.borderInlineStyle.text,toHost:r});n.define({type:t.borderInlineColor.text,toHost:i});n.define({type:t.fontStyle.text,toHost:[{name:"regular",value:0},{name:"italic",value:1},{name:"bold",value:2},{name:"bold italic",value:3}]});n.define({type:t.fontUnderlineStyle.text,toHost:[{name:f,value:0},{name:"single",value:1},{name:"double",value:2},{name:"single accounting",value:3},{name:"double accounting",value:4}]});n.define({type:t.fontColor.text,toHost:i});n.define({type:t.fontDirection.text,toHost:[{name:"context",value:0},{name:"left-to-right",value:1},{name:"right-to-left",value:2}]});n.define({type:t.width.text,toHost:[{name:e,value:-1}]});n.define({type:t.height.text,toHost:[{name:e,value:-1}]});n.define({type:Microsoft.Office.WebExtension.Parameters.TableOptions,toHost:[{name:"headerRow",value:0},{name:"bandedRows",value:1},{name:"firstColumn",value:2},{name:"lastColumn",value:3},{name:"bandedColumns",value:4},{name:"filterButton",value:5},{name:"style",value:6},{name:"totalRow",value:7}]});n.dynamicTypes[Microsoft.Office.WebExtension.Parameters.CellFormat]={toHost:function(t){for(var i in t)t[i].format&&(t[i].format=n.doMapValues(t[i].format,"toHost"));return t},fromHost:function(n){return n}};n.setDynamicType(Microsoft.Office.WebExtension.Parameters.CellFormat,{toHost:function(n){var c="cells",y="format",w=0,b=1,p=[],l,i,r,f,e,o,a,v,s;for(l in n){if(i=n[l],r=[],typeof i[c]!==u){if(f=i[c],typeof i[c]=="object"){e=[];for(o in f)typeof h[o]!==u&&(e[h[o]]=f[o])}else e=f;r[w]=e}if(i[y]){a=i[y];v=[];for(s in a)typeof t[s]!==u&&v.push([t[s].type,a[s]]);r[b]=v}p[l]=r}return p},fromHost:function(n){return n}});n.setDynamicType(Microsoft.Office.WebExtension.Parameters.TableOptions,{toHost:function(n){var i=[];for(var t in n)typeof s[t]!==u&&(i[s[t]]=n[t]);return i},fromHost:function(n){return n}})}();OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType,{Image:"image"});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.CoercionType,toHost:[{name:Microsoft.Office.WebExtension.CoercionType.Image,value:8}]}),function(n){var t;(function(t){var u=function(){function r(){var n=this,t=n;n._pseudoDocument=u;n._eventDispatch=u;n._processAppCommandInvocation=function(n){var i=t._verifyManifestCallback(n.callbackName),r;if(i.errorCode!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){t._invokeAppCommandCompletedMethod(n.appCommandId,i.errorCode,"");return}r=t._constructEventObjectForCallback(n);r?window.setTimeout(function(){i.callback(r)},0):t._invokeAppCommandCompletedMethod(n.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"")}}var f="object",e="string",u=null;return r.initializeOsfDda=function(){OSF.DDA.AsyncMethodNames.addNames({AppCommandInvocationCompletedAsync:"appCommandInvocationCompletedAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[e]},{name:Microsoft.Office.WebExtension.Parameters.Status,types:["number"]},{name:Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData,types:[e]}]});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{AppCommandInvokedEvent:"AppCommandInvokedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppCommandInvoked:"appCommandInvoked"});OSF.OUtil.setNamespace("AppCommand",OSF.DDA);OSF.DDA.AppCommand.AppCommandInvokedEventArgs=n.AppCommand.AppCommandInvokedEventArgs},r.prototype.initializeAndChangeOnce=function(n){var i=this,r;t.registerDdaFacade();i._pseudoDocument={};OSF.DDA.DispIdHost.addAsyncMethods(i._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync]);i._eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked]);r=function(t){n&&(t.status=="succeeded"?n(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):n(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError))};OSF.DDA.DispIdHost.addEventSupport(i._pseudoDocument,i._eventDispatch);i._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,i._processAppCommandInvocation,r)},r.prototype._verifyManifestCallback=function(n){var s="function",e={callback:u,errorCode:OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback},o;n=n.trim();try{for(var t=n.split("."),i=window,r=0;r0},enumerable:!0,configurable:!0}),t.prototype.addTrace=function(n,t){this.m_traceInfos[n]=t},t.prototype.addReferencedObjectPath=function(t){if(!this.m_referencedObjectPaths[t.objectPathInfo.Id]){if(!t.isValid)throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidObjectPath,message:n.Utility._getResourceString(n.ResourceStrings.invalidObjectPath,n.Utility.getObjectPathExpression(t)),debugInfo:{errorLocation:n.Utility.getObjectPathExpression(t)}});while(t)t.isWriteOperation&&(this.m_flags=this.m_flags|1),this.m_referencedObjectPaths[t.objectPathInfo.Id]=t,t.objectPathInfo.ObjectPathType==3&&this.addReferencedObjectPaths(t.argumentObjectPaths),t=t.parentObjectPath}},t.prototype.addReferencedObjectPaths=function(n){if(n)for(var t=0;t0&&(typeof r[0]=="string"||i.isRequestUrlAndHeaderInfo(r[0])||i.isRequestUrlAndHeaderInfoResolver(r[0]))&&(y=r[0],h=1),r.length==h+1)a=u,v=r[h+0];else if(r.length==h+2){if(r[h+0]instanceof n.ClientObject)a=function(){return r[h+0].context};else if(Array.isArray(r[h+0])){if(c=r[h+0],c.length==0)return i.createErrorPromise(t);for(l=0;l0){var n=c._onRunFinishedNotifiers.shift();n()}if(a)return l;else throw l;})},i.prototype._nextId=function(){return++this.m_nextId},i}();n.ClientRequestContext=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_type=n}return Object.defineProperty(t.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){(this.m_isLoaded=!0,typeof t=="object"&&t&&t._IsNull)||(this.m_value=this.m_type===1?n.Utility.adjustToDateTime(t):t)},t}();n.ClientResult=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.flags="flags",n.getItemAt="GetItemAt",n.id="Id",n.idPrivate="_Id",n.index="_Index",n.items="_Items",n.iterativeExecutor="IterativeExecutor",n.localDocument="http://document.localhost/",n.localDocumentApiPrefix="http://document.localhost/_api/",n.processQuery="ProcessQuery",n.referenceId="_ReferenceId",n.isTracked="_IsTracked",n.sourceLibHeader="SdkVersion",n.embeddingPageOrigin="EmbeddingPageOrigin",n.embeddingPageSessionInfo="EmbeddingPageSessionInfo",n}();n.Constants=t}(OfficeExtension||(OfficeExtension={})),function(n){var u=1,r={invokeRequestModifier:function(n){return n.DdaMethod.Version=u,n},invokeResponseModifier:function(n){return u=n.Version,n.Error&&(n.error={},n.error.Code=n.Error),n}},i,t,f,e;(function(n){n[n.Success=0]="Success";n[n.Timeout=1]="Timeout";n[n.InternalError=5001]="InternalError"})(i||(i={})),function(n){n.SendingId="sId";n.RespondingId="rId";n.CommandKey="command";n.SessionInfoKey="sessionInfo";n.ParamsKey="params";n.ApiReadyCommand="apiready";n.ExecuteMethodCommand="executeMethod";n.GetAppContextCommand="getAppContext";n.RegisterEventCommand="registerEvent";n.UnregisterEventCommand="unregisterEvent";n.FireEventCommand="fireEvent"}(t||(t={}));f=function(u){function f(n,t){u.call(this);this.m_chosenWindow=null;this.m_chosenOrigin=null;this.m_enabled=!0;this.m_onMessageHandler=this._onMessage.bind(this);this.m_callbackList={};this.m_id=0;this.m_timeoutId=-1;this.m_appContext=null;this.m_url=n;this.m_options=t;this.m_options||(this.m_options={sessionKey:Math.random().toString()});this.m_options.sessionKey||(this.m_options.sessionKey=Math.random().toString());this.m_options.container||(this.m_options.container=document.body);this.m_options.timeoutInMilliseconds||(this.m_options.timeoutInMilliseconds=6e4);this.m_options.height||(this.m_options.height="400px");this.m_options.width||(this.m_options.width="100%")}return __extends(f,u),f.prototype._getIFrameSrc=function(){var u=window.location.protocol+"//"+window.location.host,i=n.Constants.embeddingPageOrigin+"="+encodeURIComponent(u)+"&"+n.Constants.embeddingPageSessionInfo+"="+encodeURIComponent(this.m_options.sessionKey),r=!1,t;return this.m_url.toLowerCase().indexOf("/_layouts/preauth.aspx")>0&&(r=!0),t=document.createElement("a"),t.href=this.m_url,r?t.hash=t.hash.length===0||t.hash==="#"?"#"+i:t.hash+"&"+i:t.search=t.search.length===0||t.search==="?"?"?"+i:t.search+"&"+i,t.href},f.prototype.init=function(){var t=this,i;return window.addEventListener("message",this.m_onMessageHandler),i=this._getIFrameSrc(),new n._Internal.OfficePromise(function(r,u){var f=document.createElement("iframe");t.m_options.id&&(f.id=t.m_options.id);f.style.height=t.m_options.height;f.style.width=t.m_options.width;f.src=i;t.m_options.container.appendChild(f);t.m_timeoutId=setTimeout(function(){t.close();var i=n.Utility.createRuntimeError(n.ErrorCodes.timeout,n.Utility._getResourceString(n.ResourceStrings.timeout),"EmbeddedSession.init");u(i)},t.m_options.timeoutInMilliseconds);t.m_promiseResolver=r})},f.prototype._invoke=function(n,t,u){if(!this.m_enabled){t(i.InternalError,null);return}r.invokeRequestModifier&&(u=r.invokeRequestModifier(u));this._sendMessageWithCallback(this.m_id++,n,u,function(n){r.invokeResponseModifier&&(n=r.invokeResponseModifier(n));var u=n.Error;delete n.Error;t(u||i.Success,n)})},f.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler);window.clearTimeout(this.m_timeoutId);this.m_enabled=!1},Object.defineProperty(f.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),f.prototype._createRequestExecutorOrNull=function(){return new e(this)},f.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},f.prototype._registerEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.RegisterEventCommand,{EventId:i,TargetId:r},function(){n(null)})})},f.prototype._unregisterEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.UnregisterEventCommand,{EventId:i,TargetId:r},function(){n()})})},f.prototype._onMessage=function(n){var u=this,i,e,r,o,s;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===n.source&&this.m_chosenOrigin===n.origin)){if(i=n.data,i&&i[t.CommandKey]===t.ApiReadyCommand){!this.m_chosenWindow&&this._isValidDescendant(n.source)&&i[t.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=n.source,this.m_chosenOrigin=n.origin,this._sendMessageWithCallback(this.m_id++,t.GetAppContextCommand,null,function(n){u._setupContext(n);window.clearTimeout(u.m_timeoutId);u.m_promiseResolver()}));return}if(i&&i[t.CommandKey]===t.FireEventCommand){var f=i[t.ParamsKey],h=f.EventId,c=f.TargetId,l=f.Data;if(this.m_sessionEventManager)for(e=this.m_sessionEventManager.getHandlers(h,c),r=0;r=0;o--)if(r[o]===e[i].handler){r.splice(o,1);break}break;case 2:r=[];break}}return s&&(!this.m_registered&&r.length>0?u=u.then(function(){return f.m_eventInfo.registerFunc(f.m_callback)}).then(function(){return f.m_registered=!0}):this.m_registered&&r.length==0&&(u=u.then(function(){return f.m_eventInfo.unregisterFunc(f.m_callback)}).catch(function(t){n.Utility.log("Error when unregister event: "+JSON.stringify(t))}).then(function(){return f.m_registered=!1})),u=u.then(function(){return f.m_handlers=r})),u},t.prototype.fireEvent=function(t){for(var u,f,r=[],i=0;i=0;e--)if(f[e]===u){f.splice(e,1);break}return f.length===0?this.m_unregisterEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i}();n.EventRegistration=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var s=JSON.stringify(u.Body),f=u.Url,e,o;if(f.charAt(f.length-1)!="/"&&(f=f+"/"),f=f+n.Constants.processQuery,f=f+"?"+n.Constants.flags+"="+r.toString(),e={method:"POST",url:f,headers:{},body:s},e.headers[n.Constants.sourceLibHeader]=t.SourceLibHeaderValue,e.headers["CONTENT-TYPE"]="application/json",u.Headers)for(o in u.Headers)e.headers[o]=u.Headers[o];return n.HttpUtility.sendRequest(e).then(function(t){var i,r;return t.statusCode===200?i={ErrorCode:null,ErrorMessage:null,Headers:t.headers,Body:JSON.parse(t.body)}:(n.Utility.log("Error Response:"+t.body),r=n.Utility._parseErrorResponse(t),i={ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:t.headers,Body:null}),i})},t.SourceLibHeaderValue="officejs-rest",t}();n.HttpRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){n.OfficeRequire=function(){return typeof require!="undefined"?require:null}()})(t=n._Internal||(n._Internal={}));i=function(){function i(){}return i.setCustomSendRequestFunc=function(n){i.s_customSendRequestFunc=n},i.xhrSendRequestFunc=function(i){return new t.OfficePromise(function(r,u){var f=new XMLHttpRequest,e;if(f.open(i.method,i.url),f.onload=function(){var t={statusCode:f.status,headers:n.Utility._parseHttpResponseHeaders(f.getAllResponseHeaders()),body:f.responseText};r(t)},f.onerror=function(){u(new t.RuntimeError({code:n.ErrorCodes.connectionFailure,message:n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,f.statusText)}))},i.headers)for(e in i.headers)f.setRequestHeader(e,i.headers[e]);f.send(i.body)})},i.nodejsRequestModuleSendRequestFunc=function(n){i.logRequest(n);var r=t.OfficeRequire(i.NodeJsRequestModuleName);return r(n.url,{method:n.method,headers:n.headers,body:n.body}).then(function(n){return n.text().then(function(t){var f=n.status,u={},r;return n.headers.forEach(function(n,t){u[t]=n}),r={statusCode:f,headers:u,body:t},i.logResponse(r),r})})},i.sendRequest=function(n){i.validateAndNormalizeRequest(n);var t=i.s_customSendRequestFunc;return t||(t=typeof window=="undefined"||typeof XMLHttpRequest=="undefined"?i.nodejsRequestModuleSendRequestFunc:i.xhrSendRequestFunc),t(n)},i.setCustomSendLocalDocumentRequestFunc=function(n){i.s_customSendLocalDocumentRequestFunc=n},i.sendLocalDocumentRequest=function(n){i.validateAndNormalizeRequest(n);var t;return t=i.s_customSendLocalDocumentRequestFunc||i.officeJsSendLocalDocumentRequestFunc,t(n)},i.officeJsSendLocalDocumentRequestFunc=function(i){i=n.Utility._validateLocalDocumentRequest(i);var r=n.Utility._buildRequestMessageSafeArray(i);return new t.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(r,function(i){var r;r=i.status=="succeeded"?{statusCode:n.RichApiMessageUtility.getResponseStatusCode(i),headers:n.RichApiMessageUtility.getResponseHeaders(i),body:n.RichApiMessageUtility.getResponseBody(i)}:n.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(i.error.code,i.error.message);n.Utility.log(JSON.stringify(r));t(r)})})},i.validateAndNormalizeRequest=function(i){if(n.Utility.isNullOrUndefined(i))throw t.RuntimeError._createInvalidArgError({argumentName:"request"});n.Utility.isNullOrEmptyString(i.method)&&(i.method="GET");i.method=i.method.toUpperCase()},i.logRequest=function(t){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Request---"),n.Utility.log(t.method+" "+t.url),t.headers)for(var r in t.headers)n.Utility.log(r+": "+t.headers[r]);i._logBody&&n.Utility.log(t.body)}},i.logResponse=function(t){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Response---"),n.Utility.log(""+t.statusCode),t.headers)for(var r in t.headers)n.Utility.log(r+": "+t.headers[r]);i._logBody&&n.Utility.log(t.body)}},i.NodeJsRequestModuleName="node-fetch",i._logBody=!1,i}();n.HttpUtility=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_clientObject=n}return n.prototype._handleResult=function(n){this.m_clientObject._handleIdResult(n)},n}();n.InstantiateActionResultHandler=t}(OfficeExtension||(OfficeExtension={})),function(n){}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){this.m_objectPathInfo=n;this.m_parentObjectPath=t;this.m_isWriteOperation=!1;this.m_isCollection=i;this.m_isInvalidAfterRequest=r;this.m_isValid=!0}return Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},set:function(n){this.m_isWriteOperation=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(n){this.m_argumentObjectPaths=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(n){this.m_isValid=n;!n&&this.m_objectPathInfo.ObjectPathType===6&&this.m_savedObjectPathInfo&&(t.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(n){this.m_getByIdMethodName=n},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null},t.prototype.updateUsingObjectData=function(i){var o=i[n.Constants.referenceId],u,f,e,r;if(!n.Utility.isNullOrEmptyString(o)){this.m_savedObjectPathInfo||this.isInvalidAfterRequest||!t.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)||(u={},t.copyObjectPathInfo(this.m_objectPathInfo,u),this.m_savedObjectPathInfo={pathInfo:u,parent:this.m_parentObjectPath});this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=o;this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null;return}if(f=this.parentObjectPath&&this.parentObjectPath.isCollection,e=this.getByIdMethodName,(f||!n.Utility.isNullOrEmptyString(e))&&(r=i[n.Constants.id],n.Utility.isNullOrUndefined(r)&&(r=i[n.Constants.idPrivate]),!n.Utility.isNullOrUndefined(r))){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;f?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=e,this.m_getByIdMethodName=null);this.isWriteOperation=!1;this.m_objectPathInfo.ArgumentInfo={};this.m_objectPathInfo.ArgumentInfo.Arguments=[r];this.m_argumentObjectPaths=null;return}},t.isRestorableObjectPath=function(n){return n===1||n===5||n===3||n===4},t.copyObjectPathInfo=function(n,t){t.Id=n.Id;t.ArgumentInfo=n.ArgumentInfo;t.Name=n.Name;t.ObjectPathType=n.ObjectPathType;t.ParentObjectPathId=n.ParentObjectPathId},t}();n.ObjectPath=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createGlobalObjectObjectPath=function(t){var i={Id:t._nextId(),ObjectPathType:1,Name:""};return new n.ObjectPath(i,null,!1,!1)},t.createNewObjectObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:2,Name:i};return new n.ObjectPath(u,null,r,!1)},t.createPropertyObjectPath=function(t,i,r,u,f){var e={Id:t._nextId(),ObjectPathType:4,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id};return new n.ObjectPath(e,i._objectPath,u,f)},t.createIndexerObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i._objectPath,!1,!1)},t.createIndexerObjectPathUsingParentPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i,!1,!1)},t.createMethodObjectPath=function(t,i,r,u,f,e,o,s){var c={Id:t._nextId(),ObjectPathType:3,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},l=n.Utility.setMethodArguments(t,c.ArgumentInfo,f),h=new n.ObjectPath(c,i._objectPath,e,o);return h.argumentObjectPaths=l,h.isWriteOperation=u!=1,h.getByIdMethodName=s,h},t.createReferenceIdObjectPath=function(t,i){var r={Id:t._nextId(),ObjectPathType:6,Name:i,ArgumentInfo:{}};return new n.ObjectPath(r,null,!1,!1)},t.createChildItemObjectPathUsingIndexerOrGetItemAt=function(i,r,u,f,e){var o=f[n.Constants.id];return n.Utility.isNullOrUndefined(o)&&(o=f[n.Constants.idPrivate]),i&&!n.Utility.isNullOrUndefined(o)?t.createChildItemObjectPathUsingIndexer(r,u,f):t.createChildItemObjectPathUsingGetItemAt(r,u,f,e)},t.createChildItemObjectPathUsingIndexer=function(t,i,r){var f=r[n.Constants.id],u;return n.Utility.isNullOrUndefined(f)&&(f=r[n.Constants.idPrivate]),u=u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u.ArgumentInfo.Arguments=[f],new n.ObjectPath(u,i._objectPath,!1,!1)},t.createChildItemObjectPathUsingGetItemAt=function(t,i,r,u){var e=r[n.Constants.index],f;return e&&(u=e),f={Id:t._nextId(),ObjectPathType:3,Name:n.Constants.getItemAt,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f.ArgumentInfo.Arguments=[u],new n.ObjectPath(f,i._objectPath,!1,!1)},t}();n.ObjectPathFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var f=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n._Internal.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(f,function(i){n.Utility.log("Response:");n.Utility.log(JSON.stringify(i));var r;r=i.status=="succeeded"?n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBody(i),n.RichApiMessageUtility.getResponseHeaders(i)):n.RichApiMessageUtility.buildResponseOnError(i.error.code,i.error.message);t(r)})})},t.SourceLibHeaderValue="officejs",t}();n.OfficeJsRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){var t;(function(t){function i(){return function(){"use strict";function wt(n){return typeof n=="function"||typeof n=="object"&&n!==null}function b(n){return typeof n=="function"}function bt(n){return typeof n=="object"&&n!==null}function kt(n){k=n}function dt(n){f=n}function ti(){var t=process.nextTick,n=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&n[1]==="0"&&n[2]==="10"&&(t=setImmediate),function(){t(c)}}function ii(){return function(){tt(c)}}function ri(){var n=0,i=new ut(c),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function ui(){var n=new MessageChannel;return n.port1.onmessage=c,function(){n.port2.postMessage(0)}}function ft(){return function(){setTimeout(c,1)}}function c(){for(var t,i,n=0;n=0?(n=n.substring(t+5,n.length),n<"14.14393"?!0:!1):!1}function i(){return typeof window=="undefined"&&typeof Promise=="function"?Promise:typeof window!="undefined"&&window.Promise?t()?n.PromiseImpl.Init():window.Promise:n.PromiseImpl.Init()}n.OfficePromise=i()}(t=n._Internal||(n._Internal={}));i=t.OfficePromise;n.Promise=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this._autoCleanupList={};this.m_context=n}return t.prototype.add=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._addCommon(n,!0)}):this._addCommon(n,!0)},t.prototype._autoAdd=function(n){this._addCommon(n,!1);this._autoCleanupList[n._objectPath.objectPathInfo.Id]=n},t.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(t,i){var r=this.m_context._autoCleanup&&!t[n.Constants.isTracked]&&t!==this.m_context._rootObject&&i&&!n.Utility.isNullOrEmptyString(i[n.Constants.referenceId]);r&&(this._autoCleanupList[t._objectPath.objectPathInfo.Id]=t,t[n.Constants.isTracked]=!0)},t.prototype._addCommon=function(t,i){if(t[n.Constants.isTracked]){i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id];return}var r=t[n.Constants.referenceId];n.Utility.isNullOrEmptyString(r)&&t._KeepReference&&(t._KeepReference(),n.ActionFactory.createInstantiateAction(this.m_context,t),i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id],t[n.Constants.isTracked]=!0)},t.prototype.remove=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._removeCommon(n)}):this._removeCommon(n)},t.prototype._removeCommon=function(t){var r=t[n.Constants.referenceId],i;n.Utility.isNullOrEmptyString(r)||(i=this.m_context._rootObject,i._RemoveReference&&i._RemoveReference(r),delete t[n.Constants.isTracked])},t.prototype._retrieveAndClearAutoCleanupList=function(){var n=this._autoCleanupList;return this._autoCleanupList={},n},t}();n.TrackedObjects=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.cannotRegisterEvent="CannotRegisterEvent",n.connectionFailureWithStatus="ConnectionFailureWithStatus",n.connectionFailureWithDetails="ConnectionFailureWithDetails",n.invalidObjectPath="InvalidObjectPath",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.invalidArgumentGeneric="InvalidArgumentGeneric",n.propertyNotLoaded="PropertyNotLoaded",n.runMustReturnPromise="RunMustReturnPromise",n.timeout="Timeout",n.propertyDoesNotExist="PropertyDoesNotExist",n.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",n.moreInfoInnerError="MoreInfoInnerError",n.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",n.valueNotLoaded="ValueNotLoaded",n.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage",n}();n.ResourceStrings=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.CannotRegisterEvent="The event handler cannot be registered.",n.ConnectionFailureWithStatus="The request failed with status code of {0}.",n.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}",n.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",n.InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',n.InvalidRequestContext="Cannot use the object across different request contexts.",n.PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",n.RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',n.Timeout="The operation has timed out.",n.ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.',n.invalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.",n}();n.ResourceStringValues=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.buildMessageArrayForIRequestExecutor=function(i,r,u,f){var o=JSON.stringify(u.Body),e;return n.Utility.log("Request:"),n.Utility.log(o),e={},e[n.Constants.sourceLibHeader]=f,t.buildRequestMessageSafeArray(i,r,"POST","ProcessQuery",e,o)},t.buildResponseOnSuccess=function(n,t){var i={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return i.Body=JSON.parse(n),i.Headers=t,i},t.buildResponseOnError=function(i,r){var u={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return u.ErrorCode=n.ErrorCodes.generalException,u.ErrorMessage=r,i==t.OfficeJsErrorCode_ooeNoCapability?u.ErrorCode=n.ErrorCodes.accessDenied:i==t.OfficeJsErrorCode_ooeActivityLimitReached?u.ErrorCode=n.ErrorCodes.activityLimitReached:i==t.OfficeJsErrorCode_ooeInvalidOrTimedOutSession&&(u.ErrorCode=n.ErrorCodes.invalidOrTimedOutSession,u.ErrorMessage=n.Utility._getResourceString(n.ResourceStrings.invalidOrTimedOutSessionMessage)),u},t.buildHttpResponseFromOfficeJsError=function(i,r){var f=500,u={};return u.error={},u.error.code=n.ErrorCodes.generalException,u.error.message=r,i===t.OfficeJsErrorCode_ooeNoCapability?(f=403,u.error.code=n.ErrorCodes.accessDenied):i===t.OfficeJsErrorCode_ooeActivityLimitReached&&(f=429,u.error.code=n.ErrorCodes.activityLimitReached),{statusCode:f,headers:{},body:JSON.stringify(u)}},t.buildRequestMessageSafeArray=function(n,t,i,r,u,f){var e=[],o;if(u)for(o in u)e.push(o),e.push(u[o]);var s=0,h="",c="",l="";return[n,i,r,e,f,s,t,h,c,l]},t.getResponseBody=function(n){return t.getResponseBodyFromSafeArray(n.value.data)},t.getResponseHeaders=function(n){return t.getResponseHeadersFromSafeArray(n.value.data)},t.getResponseBodyFromSafeArray=function(n){var t=n[2],i;return typeof t=="string"?t:(i=t,i.join(""))},t.getResponseHeadersFromSafeArray=function(n){var i=n[1],r,t;if(!i)return null;for(r={},t=0;t0&&f.push(i);return f},t.throwError=function(i,r,u){throw new n._Internal.RuntimeError({code:i,message:t._getResourceString(i,r),debugInfo:u?{errorLocation:u}:undefined});},t.createRuntimeError=function(t,i,r){return new n._Internal.RuntimeError({code:t,message:i,debugInfo:{errorLocation:r}})},t._getResourceString=function(i,r){var u,e,f,o;return typeof window!="undefined"&&window.Strings&&window.Strings.OfficeOM&&(e="L_"+i,f=window.Strings.OfficeOM[e],f&&(u=f)),u||(u=n.ResourceStringValues[i]),u||(u=i),t.isNullOrUndefined(r)||(Array.isArray(r)?(o=r,u=t._formatString(u,o)):u=u.replace("{0}",r)),u},t._formatString=function(t,i){return t.replace(/\{\d\}/g,function(t){var r=parseInt(t.substr(1,t.length-2));if(r0?".":"")+i;break;case 3:i=t.normalizeName(n.objectPathInfo.Name)+"()"+(i.length>0?".":"")+i;break;case 4:i=t.normalizeName(n.objectPathInfo.Name)+(i.length>0?".":"")+i;break;case 5:i="getItem()"+(i.length>0?".":"")+i;break;case 6:i="_reference()"+(i.length>0?".":"")+i;break}n=n.parentObjectPath}return i},t._createPromiseFromResult=function(t){return new n._Internal.OfficePromise(function(n,i){n(t)})},t._createTimeoutPromise=function(t){return new n._Internal.OfficePromise(function(n,i){setTimeout(function(){n(null)},t)})},t.promisify=function(t){return new n._Internal.OfficePromise(function(n,i){var r=function(t){t.status=="failed"?i(t.error):n(t.value)};t(r)})},t._addActionResultHandler=function(n,t,i){n.context._pendingRequest.addActionResultHandler(t,i)},t._handleNavigationPropertyResults=function(n,i,r){for(var u=0;u0},t._getLocalDocumentUrlPrefixLength=function(n){for(var i=["http://document.localhost","https://document.localhost","//document.localhost"],r=n.toLowerCase().trim(),t=0;t0))for(s=i.url.substr(f+1),e=s.split("&"),u=0;u0&&(f=i.substr(0,u),e=i.substr(u+1),f=t.trim(f),e=t.trim(e),s[f.toUpperCase()]=e));return s},t._parseErrorResponse=function(i){var r=null,f,e,u;if(!t.isNullOrEmptyString(i.body)){f=t.trim(i.body);try{r=JSON.parse(f)}catch(o){t.log("Error when parse "+f)}}return!t.isNullOrUndefined(r)&&typeof r=="object"&&r.error?(u=r.error.code,e=t._getResourceString(n.ResourceStrings.connectionFailureWithDetails,[i.statusCode.toString(),r.error.code,r.error.message])):e=t._getResourceString(n.ResourceStrings.connectionFailureWithStatus,i.statusCode.toString()),t.isNullOrEmptyString(u)&&(u=n.ErrorCodes.connectionFailure),{errorCode:u,errorMessage:e}},t._copyHeaders=function(n,t){if(n&&t)for(var i in n)t[i]=n[i]},t._logEnabled=!1,t._synchronousCleanup=!1,t.s_underscoreCharCode="_".charCodeAt(0),t}();n.Utility=t}(OfficeExtension||(OfficeExtension={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){function nt(n){return n[0].toLowerCase()+n.slice(1)}function w(n,t,i){var s=1500,e,r,u,o,h;if(Array.isArray(i)&&i.length>0&&Array.isArray(i[0])&&i.length*i[0].length>s&&p()){for(e=Math.max(1,Math.round(s/i[0].length)),n._ValidateArraySize(i.length,i[0].length),r=0;ri.length&&(u=i.length-r),o=n.getRow(r).getBoundingRect(n.getRow(r+u-1)),h=i.slice(r,r+u),f(o.context,o,t,h);return!0}return!1}function p(){return typeof window!="undefined"&&window.Office&&window.Office.context&&window.Office.context.requirements?window.Office.context.requirements.isSetSupported("ExcelApi",1.3):!0}function ku(t,i,r){return OfficeExtension.ClientRequestContext._runBatch("Excel.run",arguments,function(t){return new n.RequestContext(t)})}function b(n){var t={BindingColumnCount:n.bindingColumnCount,BindingId:n.bindingId,BindingRowCount:n.bindingRowCount,bindingType:n.bindingType,HasHeaders:n.hasHeaders};return window.OSF.DDA.OMFactory.manufactureBinding(t,window.Microsoft.Office.WebExtension.context.document)}function rt(n,t){var r=n.headers==null,i;return i=r?n.rows:n,i=window.OSF.DDA.DataCoercion.coerceData(i,t[window.Microsoft.Office.WebExtension.Parameters.CoercionType]),i==undefined?null:i}var wu=["ThreeArrows","ThreeArrowsGray","ThreeFlags","ThreeTrafficLights1","ThreeTrafficLights2","ThreeSigns","ThreeSymbols","ThreeSymbols2","FourArrows","FourArrowsGray","FourRedToBlack","FourRating","FourTrafficLights","FiveArrows","FiveArrowsGray","FiveRating","FiveQuarters","ThreeStars","ThreeTriangles","FiveBoxes"],bu=[["RedDownArrow","YellowSideArrow","GreenUpArrow"],["GrayDownArrow","GraySideArrow","GrayUpArrow"],["RedFlag","YellowFlag","GreenFlag"],["RedCircleWithBorder","YellowCircle","GreenCircle"],["RedTrafficLight","YellowTrafficLight","GreenTrafficLight"],["RedDiamond","YellowTriangle","GreenCircle"],["RedCrossSymbol","YellowExclamationSymbol","GreenCheckSymbol"],["RedCross","YellowExclamation","GreenCheck"],["RedDownArrow","YellowDownInclineArrow","YellowUpInclineArrow","GreenUpArrow"],["GrayDownArrow","GrayDownInclineArrow","GrayUpInclineArrow","GrayUpArrow"],["BlackCircle","GrayCircle","PinkCircle","RedCircle"],["OneBar","TwoBars","ThreeBars","FourBars"],["BlackCircleWithBorder","RedCircleWithBorder","YellowCircle","GreenCircle"],["RedDownArrow","YellowDownInclineArrow","YellowSideArrow","YellowUpInclineArrow","GreenUpArrow"],["GrayDownArrow","GrayDownInclineArrow","GraySideArrow","GrayUpInclineArrow","GrayUpArrow"],["NoBars","OneBar","TwoBars","ThreeBars","FourBars"],["WhiteCircleAllWhiteQuarters","CircleWithThreeWhiteQuarters","CircleWithTwoWhiteQuarters","CircleWithOneWhiteQuarter","BlackCircle"],["SilverStar","HalfGoldStar","GoldStar"],["RedDownTriangle","YellowDash","GreenUpTriangle"],["NoFilledBoxes","OneFilledBox","TwoFilledBoxes","ThreeFilledBoxes","FourFilledBoxes"],],tt,it,d,ut,ft,et,k,ot,st,ht,g,ct,lt,at,vt,yt,pt,wt,bt,kt,dt,gt,ni,ti,ii,ri,ui,fi,ei,oi,si,hi,ci,li,ai,vi,yi,pi,wi,bi,ki,di,gi,nr,tr,ir,rr,ur,fr,er,or,sr,hr,cr,lr,ar,vr,yr,pr,wr,br,kr,dr,gr,nu,tu,iu,ru,uu,fu,eu,ou,su,hu,cu,lu,au,vu,yu,gu,nf,tf,rf,uf,ff,ef,of,sf,hf,cf,lf,af,vf,yf,pf,wf,bf,kf,df,gf,ne,te,ie,re,ue,fe,ee,oe,se,he,ce,le,ae,ve,ye,pe,we,be,ke,de,ge,no,to,io,ro,i,pu,uo;n.icons={};wu.map(function(t,i){var r=nt(t);n.icons[r]=[];bu[i].map(function(i,u){i=nt(i);var f={set:t,index:u};n.icons[r].push(f);n.icons[r][i]=f})});tt=function(){function n(n,t,i){this.m_workbookUrl=n;this.m_requestHeaders=t;this.m_requestHeaders||(this.m_requestHeaders={});OfficeExtension.Utility.isNullOrUndefined(i)&&(i=!0);this.m_persisted=i}return n.prototype.close=function(){var i=this,t,u,r;return this.m_requestUrlAndHeaderInfo&&!OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)?(t=this.m_requestUrlAndHeaderInfo.url,t.charAt(t.length-1)!="/"&&(t=t+"/"),t=t+"closeSession",u=this.m_requestUrlAndHeaderInfo,r={method:"POST",url:t,headers:this.m_requestUrlAndHeaderInfo.headers,body:""},this.m_requestUrlAndHeaderInfo=null,OfficeExtension.HttpUtility.sendRequest(r).then(function(t){var u,r,f;if(t.statusCode!=204){u=OfficeExtension.Utility._parseErrorResponse(t);throw OfficeExtension.Utility.createRuntimeError(u.errorCode,u.errorMessage,"Session.close");}i.m_requestUrlAndHeaderInfo=null;r=null;for(f in i.m_requestHeaders)if(f.toLowerCase()==n.WorkbookSessionIdHeaderNameLower){r=f;break}r&&delete i.m_requestHeaders[r]})):OfficeExtension.Utility._createPromiseFromResult(null)},n.prototype._resolveRequestUrlAndHeaderInfo=function(){var r=this,u,e,t,i,f,o;if(this.m_requestUrlAndHeaderInfo)return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);if(OfficeExtension.Utility.isNullOrEmptyString(this.m_workbookUrl)||OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl))return this.m_requestUrlAndHeaderInfo={url:this.m_workbookUrl,headers:this.m_requestHeaders},OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);u=!1;for(e in this.m_requestHeaders)if(e.toLowerCase()==n.WorkbookSessionIdHeaderNameLower){u=!0;break}return u?(this.m_requestUrlAndHeaderInfo={url:this.m_workbookUrl,headers:this.m_requestHeaders},OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo)):(t=this.m_workbookUrl,t.charAt(t.length-1)!="/"&&(t=t+"/"),t=t+"createSession",i={},OfficeExtension.Utility._copyHeaders(this.m_requestHeaders,i),i["Content-Type"]="application/json",f={},f.persistChanges=this.m_persisted,o={method:"POST",url:t,headers:i,body:JSON.stringify(f)},OfficeExtension.HttpUtility.sendRequest(o).then(function(t){var u,f,e;if(t.statusCode!==201){u=OfficeExtension.Utility._parseErrorResponse(t);throw OfficeExtension.Utility.createRuntimeError(u.errorCode,u.errorMessage,"Session.resolveRequestUrlAndHeaderInfo");}return f=JSON.parse(t.body),e=f.id,i={},OfficeExtension.Utility._copyHeaders(r.m_requestHeaders,i),i[n.WorkbookSessionIdHeaderName]=e,r.m_requestUrlAndHeaderInfo={url:r.m_workbookUrl,headers:i},r.m_requestUrlAndHeaderInfo}))},n.WorkbookSessionIdHeaderName="Workbook-Session-Id",n.WorkbookSessionIdHeaderNameLower="workbook-session-id",n}();n.Session=tt;it=function(n){function t(t){n.call(this,t);this.m_workbook=new d(this,OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(this));this._rootObject=this.m_workbook}return __extends(t,n),Object.defineProperty(t.prototype,"workbook",{get:function(){return this.m_workbook},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"application",{get:function(){return this.workbook.application},enumerable:!0,configurable:!0}),t}(OfficeExtension.ClientRequestContext);n.RequestContext=it;n.run=ku;n._RedirectV1APIs=!1;n._V1APIMap={GetDataAsync:{call:function(n,t){return n.workbook._V1Api.bindingGetData(t)},postprocess:rt},GetSelectedDataAsync:{call:function(n,t){return n.workbook._V1Api.getSelectedData(t)},postprocess:rt},GoToByIdAsync:{call:function(n,t){return n.workbook._V1Api.gotoById(t)}},AddColumnsAsync:{call:function(n,t){return n.workbook._V1Api.bindingAddColumns(t)}},AddFromSelectionAsync:{call:function(n,t){return n.workbook._V1Api.bindingAddFromSelection(t)},postprocess:b},AddFromNamedItemAsync:{call:function(n,t){return n.workbook._V1Api.bindingAddFromNamedItem(t)},postprocess:b},AddFromPromptAsync:{call:function(n,t){return n.workbook._V1Api.bindingAddFromPrompt(t)},postprocess:b},AddRowsAsync:{call:function(n,t){return n.workbook._V1Api.bindingAddRows(t)}},GetByIdAsync:{call:function(n,t){return n.workbook._V1Api.bindingGetById(t)},postprocess:b},ReleaseByIdAsync:{call:function(n,t){return n.workbook._V1Api.bindingReleaseById(t)}},GetAllAsync:{call:function(n){return n.workbook._V1Api.bindingGetAll()},postprocess:function(n){return n.bindings.map(function(n){return b(n)})}},DeleteAllDataValuesAsync:{call:function(n,t){return n.workbook._V1Api.bindingDeleteAllDataValues(t)}},SetSelectedDataAsync:{preprocess:function(n){var t=n.cellFormat;return typeof window!="undefined"&&window.OSF.DDA.SafeArray?window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes,"cellFormat")&&(n.cellFormat=window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes.cellFormat.toHost(t)):typeof window!="undefined"&&window.OSF.DDA.WAC&&window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes,"cellFormat")&&(n.cellFormat=window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes.cellFormat.toHost(t)),n},call:function(n,t){return n.workbook._V1Api.setSelectedData(t)}},SetDataAsync:{preprocess:function(n){var t=n.cellFormat;return typeof window!="undefined"&&window.OSF.DDA.SafeArray?window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes,"cellFormat")&&(n.cellFormat=window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes.cellFormat.toHost(t)):typeof window!="undefined"&&window.OSF.DDA.WAC&&window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes,"cellFormat")&&(n.cellFormat=window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes.cellFormat.toHost(t)),n},call:function(n,t){return n.workbook._V1Api.bindingSetData(t)}},SetFormatsAsync:{preprocess:function(n){var t=n.cellFormat;return typeof window!="undefined"&&window.OSF.DDA.SafeArray?window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes,"cellFormat")&&(n.cellFormat=window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes.cellFormat.toHost(t)):typeof window!="undefined"&&window.OSF.DDA.WAC&&window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes,"cellFormat")&&(n.cellFormat=window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes.cellFormat.toHost(t)),n},call:function(n,t){return n.workbook._V1Api.bindingSetFormats(t)}},SetTableOptionsAsync:{call:function(n,t){return n.workbook._V1Api.bindingSetTableOptions(t)}},ClearFormatsAsync:{call:function(n,t){return n.workbook._V1Api.bindingClearFormats(t)}},GetFilePropertiesAsync:{call:function(n,t){return n.workbook._V1Api.getFilePropertiesAsync(t)}}};var o=OfficeExtension.ObjectPathFactory.createPropertyObjectPath,t=OfficeExtension.ObjectPathFactory.createMethodObjectPath,y=OfficeExtension.ObjectPathFactory.createIndexerObjectPath,fo=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath,eo=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer,oo=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt,v=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt,s=OfficeExtension.ActionFactory.createMethodAction,f=OfficeExtension.ActionFactory.createSetPropertyAction,e=OfficeExtension.Utility.isNullOrUndefined,u=OfficeExtension.Utility.isUndefined,r=OfficeExtension.Utility.throwIfNotLoaded,c=OfficeExtension.Utility.load,h=OfficeExtension.Utility.fixObjectPathIfNecessary,l=OfficeExtension.Utility._addActionResultHandler,a=OfficeExtension.Utility._handleNavigationPropertyResults,so=OfficeExtension.Utility.adjustToDateTime,du=function(n){function t(){n.apply(this,arguments)}return __extends(t,n),Object.defineProperty(t.prototype,"_className",{get:function(){return"Application"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"calculationMode",{get:function(){return r("calculationMode",this.m_calculationMode,"Application",this._isNull),this.m_calculationMode},enumerable:!0,configurable:!0}),t.prototype.calculate=function(n){s(this.context,this,"Calculate",0,[n])},t.prototype.suspendApiCalculationUntilNextSync=function(){s(this.context,this,"SuspendApiCalculationUntilNextSync",0,[])},t.prototype._handleResult=function(t){if(n.prototype._handleResult.call(this,t),!e(t)){var i=t;h(this,i);u(i.CalculationMode)||(this.m_calculationMode=i.CalculationMode)}},t.prototype.load=function(n){return c(this,n),this},t.prototype.toJSON=function(){return{calculationMode:this.m_calculationMode}},t}(OfficeExtension.ClientObject);n.Application=du;d=function(i){function r(){i.apply(this,arguments)}return __extends(r,i),Object.defineProperty(r.prototype,"_className",{get:function(){return"Workbook"},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"application",{get:function(){return this.m_application||(this.m_application=new n.Application(this.context,o(this.context,this,"Application",!1,!1))),this.m_application},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"bindings",{get:function(){return this.m_bindings||(this.m_bindings=new n.BindingCollection(this.context,o(this.context,this,"Bindings",!0,!1))),this.m_bindings},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"customXmlParts",{get:function(){return this.m_customXmlParts||(this.m_customXmlParts=new n.CustomXmlPartCollection(this.context,o(this.context,this,"CustomXmlParts",!0,!1))),this.m_customXmlParts},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"functions",{get:function(){return this.m_functions||(this.m_functions=new n.Functions(this.context,o(this.context,this,"Functions",!1,!1))),this.m_functions},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"names",{get:function(){return this.m_names||(this.m_names=new n.NamedItemCollection(this.context,o(this.context,this,"Names",!0,!1))),this.m_names},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"pivotTables",{get:function(){return this.m_pivotTables||(this.m_pivotTables=new n.PivotTableCollection(this.context,o(this.context,this,"PivotTables",!0,!1))),this.m_pivotTables},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"settings",{get:function(){return this.m_settings||(this.m_settings=new n.SettingCollection(this.context,o(this.context,this,"Settings",!0,!1))),this.m_settings},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"tables",{get:function(){return this.m_tables||(this.m_tables=new n.TableCollection(this.context,o(this.context,this,"Tables",!0,!1))),this.m_tables},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"worksheets",{get:function(){return this.m_worksheets||(this.m_worksheets=new n.WorksheetCollection(this.context,o(this.context,this,"Worksheets",!0,!1))),this.m_worksheets},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"_V1Api",{get:function(){return this.m__V1Api||(this.m__V1Api=new n._V1Api(this.context,o(this.context,this,"_V1Api",!1,!1))),this.m__V1Api},enumerable:!0,configurable:!0}),r.prototype.getSelectedRange=function(){return new n.Range(this.context,t(this.context,this,"GetSelectedRange",1,[],!1,!0,null))},r.prototype._GetObjectByReferenceId=function(n){var i=s(this.context,this,"_GetObjectByReferenceId",1,[n]),t=new OfficeExtension.ClientResult;return l(this,i,t),t},r.prototype._GetObjectTypeNameByReferenceId=function(n){var i=s(this.context,this,"_GetObjectTypeNameByReferenceId",1,[n]),t=new OfficeExtension.ClientResult;return l(this,i,t),t},r.prototype._GetReferenceCount=function(){var t=s(this.context,this,"_GetReferenceCount",1,[]),n=new OfficeExtension.ClientResult;return l(this,t,n),n},r.prototype._RemoveAllReferences=function(){s(this.context,this,"_RemoveAllReferences",1,[])},r.prototype._RemoveReference=function(n){s(this.context,this,"_RemoveReference",1,[n])},r.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;h(this,t);a(this,t,["application","Application","bindings","Bindings","customXmlParts","CustomXmlParts","functions","Functions","names","Names","pivotTables","PivotTables","settings","Settings","tables","Tables","worksheets","Worksheets","_V1Api","_V1Api"])}},r.prototype.load=function(n){return c(this,n),this},Object.defineProperty(r.prototype,"onSelectionChanged",{get:function(){var n=this;return this.m_selectionChanged||(this.m_selectionChanged=new OfficeExtension.EventHandlers(this.context,this,"SelectionChanged",{registerFunc:function(t){return n.context.eventRegistration.register(2,"",t)},unregisterFunc:function(t){return n.context.eventRegistration.unregister(2,"",t)},eventArgsTransformFunc:function(t){return OfficeExtension.Utility._createPromiseFromResult({workbook:n})}})),this.m_selectionChanged},enumerable:!0,configurable:!0}),r.prototype.toJSON=function(){return{}},r}(OfficeExtension.ClientObject);n.Workbook=d;ut=function(i){function l(){i.apply(this,arguments)}return __extends(l,i),Object.defineProperty(l.prototype,"_className",{get:function(){return"Worksheet"},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"charts",{get:function(){return this.m_charts||(this.m_charts=new n.ChartCollection(this.context,o(this.context,this,"Charts",!0,!1))),this.m_charts},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"names",{get:function(){return this.m_names||(this.m_names=new n.NamedItemCollection(this.context,o(this.context,this,"Names",!0,!1))),this.m_names},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"pivotTables",{get:function(){return this.m_pivotTables||(this.m_pivotTables=new n.PivotTableCollection(this.context,o(this.context,this,"PivotTables",!0,!1))),this.m_pivotTables},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"protection",{get:function(){return this.m_protection||(this.m_protection=new n.WorksheetProtection(this.context,o(this.context,this,"Protection",!1,!1))),this.m_protection},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"tables",{get:function(){return this.m_tables||(this.m_tables=new n.TableCollection(this.context,o(this.context,this,"Tables",!0,!1))),this.m_tables},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"id",{get:function(){return r("id",this.m_id,"Worksheet",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"name",{get:function(){return r("name",this.m_name,"Worksheet",this._isNull),this.m_name},set:function(n){this.m_name=n;f(this.context,this,"Name",n)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"position",{get:function(){return r("position",this.m_position,"Worksheet",this._isNull),this.m_position},set:function(n){this.m_position=n;f(this.context,this,"Position",n)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"visibility",{get:function(){return r("visibility",this.m_visibility,"Worksheet",this._isNull),this.m_visibility},set:function(n){this.m_visibility=n;f(this.context,this,"Visibility",n)},enumerable:!0,configurable:!0}),l.prototype.set=function(n,t){this._recursivelySet(n,t,["name","position","visibility"],[],["charts","names","pivotTables","tables","charts","names","pivotTables","protection","tables"])},l.prototype.activate=function(){s(this.context,this,"Activate",1,[])},l.prototype.calculate=function(n){s(this.context,this,"Calculate",0,[n])},l.prototype.delete=function(){s(this.context,this,"Delete",0,[])},l.prototype.getCell=function(i,r){return new n.Range(this.context,t(this.context,this,"GetCell",1,[i,r],!1,!0,null))},l.prototype.getNext=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetNext",1,[i],!1,!0,null))},l.prototype.getNextOrNullObject=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetNextOrNullObject",1,[i],!1,!0,null))},l.prototype.getPrevious=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetPrevious",1,[i],!1,!0,null))},l.prototype.getPreviousOrNullObject=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetPreviousOrNullObject",1,[i],!1,!0,null))},l.prototype.getRange=function(i){return new n.Range(this.context,t(this.context,this,"GetRange",1,[i],!1,!0,null))},l.prototype.getUsedRange=function(i){return new n.Range(this.context,t(this.context,this,"GetUsedRange",1,[i],!1,!0,null))},l.prototype.getUsedRangeOrNullObject=function(i){return new n.Range(this.context,t(this.context,this,"GetUsedRangeOrNullObject",1,[i],!1,!0,null))},l.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;h(this,t);u(t.Id)||(this.m_id=t.Id);u(t.Name)||(this.m_name=t.Name);u(t.Position)||(this.m_position=t.Position);u(t.Visibility)||(this.m_visibility=t.Visibility);a(this,t,["charts","Charts","names","Names","pivotTables","PivotTables","protection","Protection","tables","Tables"])}},l.prototype.load=function(n){return c(this,n),this},l.prototype._handleIdResult=function(n){(i.prototype._handleIdResult.call(this,n),e(n))||u(n.Id)||(this.m_id=n.Id)},l.prototype.toJSON=function(){return{id:this.m_id,name:this.m_name,position:this.m_position,protection:this.m_protection,visibility:this.m_visibility}},l}(OfficeExtension.ClientObject);n.Worksheet=ut;ft=function(i){function u(){i.apply(this,arguments)}return __extends(u,i),Object.defineProperty(u.prototype,"_className",{get:function(){return"WorksheetCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"items",{get:function(){return r("items",this.m__items,"WorksheetCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),u.prototype.add=function(i){return new n.Worksheet(this.context,t(this.context,this,"Add",0,[i],!1,!0,null))},u.prototype.getActiveWorksheet=function(){return new n.Worksheet(this.context,t(this.context,this,"GetActiveWorksheet",1,[],!1,!1,null))},u.prototype.getCount=function(n){var i=s(this.context,this,"GetCount",1,[n]),t=new OfficeExtension.ClientResult;return l(this,i,t),t},u.prototype.getFirst=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetFirst",1,[i],!1,!0,null))},u.prototype.getItem=function(t){return new n.Worksheet(this.context,y(this.context,this,[t]))},u.prototype.getItemOrNullObject=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetItemOrNullObject",1,[i],!1,!1,null))},u.prototype.getLast=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetLast",1,[i],!1,!0,null))},u.prototype._handleResult=function(t){var u,f,r,o;if((i.prototype._handleResult.call(this,t),!e(t))&&(u=t,h(this,u),!e(u[OfficeExtension.Constants.items])))for(this.m__items=[],f=u[OfficeExtension.Constants.items],r=0;r0?f=i.getOffsetRange(r,u):(f=i,e=r,o=u),Math.abs(t)==1)?f:f.getBoundingRect(i.getOffsetRange(r*t+e,u*t+o))},Object.defineProperty(l.prototype,"conditionalFormats",{get:function(){return this.m_conditionalFormats||(this.m_conditionalFormats=new n.ConditionalFormatCollection(this.context,o(this.context,this,"ConditionalFormats",!0,!1))),this.m_conditionalFormats},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"format",{get:function(){return this.m_format||(this.m_format=new n.RangeFormat(this.context,o(this.context,this,"Format",!1,!1))),this.m_format},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"sort",{get:function(){return this.m_sort||(this.m_sort=new n.RangeSort(this.context,o(this.context,this,"Sort",!1,!1))),this.m_sort},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"worksheet",{get:function(){return this.m_worksheet||(this.m_worksheet=new n.Worksheet(this.context,o(this.context,this,"Worksheet",!1,!1))),this.m_worksheet},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"address",{get:function(){return r("address",this.m_address,"Range",this._isNull),this.m_address},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"addressLocal",{get:function(){return r("addressLocal",this.m_addressLocal,"Range",this._isNull),this.m_addressLocal},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"cellCount",{get:function(){return r("cellCount",this.m_cellCount,"Range",this._isNull),this.m_cellCount},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"columnCount",{get:function(){return r("columnCount",this.m_columnCount,"Range",this._isNull),this.m_columnCount},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"columnHidden",{get:function(){return r("columnHidden",this.m_columnHidden,"Range",this._isNull),this.m_columnHidden},set:function(n){this.m_columnHidden=n;f(this.context,this,"ColumnHidden",n)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"columnIndex",{get:function(){return r("columnIndex",this.m_columnIndex,"Range",this._isNull),this.m_columnIndex},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"formulas",{get:function(){return r("formulas",this.m_formulas,"Range",this._isNull),this.m_formulas},set:function(n){(this.m_formulas=n,w(this,"Formulas",n))||(this.m_formulas=n,f(this.context,this,"Formulas",n))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"formulasLocal",{get:function(){return r("formulasLocal",this.m_formulasLocal,"Range",this._isNull),this.m_formulasLocal},set:function(n){(this.m_formulasLocal=n,w(this,"FormulasLocal",n))||(this.m_formulasLocal=n,f(this.context,this,"FormulasLocal",n))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"formulasR1C1",{get:function(){return r("formulasR1C1",this.m_formulasR1C1,"Range",this._isNull),this.m_formulasR1C1},set:function(n){(this.m_formulasR1C1=n,w(this,"FormulasR1C1",n))||(this.m_formulasR1C1=n,f(this.context,this,"FormulasR1C1",n))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"hidden",{get:function(){return r("hidden",this.m_hidden,"Range",this._isNull),this.m_hidden},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"numberFormat",{get:function(){return r("numberFormat",this.m_numberFormat,"Range",this._isNull),this.m_numberFormat},set:function(n){(this.m_numberFormat=n,w(this,"NumberFormat",n))||(this.m_numberFormat=n,f(this.context,this,"NumberFormat",n))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"rowCount",{get:function(){return r("rowCount",this.m_rowCount,"Range",this._isNull),this.m_rowCount},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"rowHidden",{get:function(){return r("rowHidden",this.m_rowHidden,"Range",this._isNull),this.m_rowHidden},set:function(n){this.m_rowHidden=n;f(this.context,this,"RowHidden",n)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"rowIndex",{get:function(){return r("rowIndex",this.m_rowIndex,"Range",this._isNull),this.m_rowIndex},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"text",{get:function(){return r("text",this.m_text,"Range",this._isNull),this.m_text},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"valueTypes",{get:function(){return r("valueTypes",this.m_valueTypes,"Range",this._isNull),this.m_valueTypes},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"values",{get:function(){return r("values",this.m_values,"Range",this._isNull),this.m_values},set:function(n){(this.m_values=n,w(this,"Values",n))||(this.m_values=n,f(this.context,this,"Values",n))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_ReferenceId",{get:function(){return r("_ReferenceId",this.m__ReferenceId,"Range",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),l.prototype.set=function(n,t){this._recursivelySet(n,t,["numberFormat","values","formulas","formulasLocal","formulasR1C1","rowHidden","columnHidden"],["format"],["conditionalFormats","sort","worksheet","conditionalFormats","sort","worksheet"])},l.prototype.calculate=function(){s(this.context,this,"Calculate",0,[])},l.prototype.clear=function(n){s(this.context,this,"Clear",0,[n])},l.prototype.delete=function(n){s(this.context,this,"Delete",0,[n])},l.prototype.getBoundingRect=function(i){return new n.Range(this.context,t(this.context,this,"GetBoundingRect",1,[i],!1,!0,null))},l.prototype.getCell=function(i,r){return new n.Range(this.context,t(this.context,this,"GetCell",1,[i,r],!1,!0,null))},l.prototype.getColumn=function(i){return new n.Range(this.context,t(this.context,this,"GetColumn",1,[i],!1,!0,null))},l.prototype.getColumnsAfter=function(i){if(!p()){if(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0)throw new OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove");return this._getAdjacentRange("getColumnsAfter",i,this.getLastColumn(),0,1)}return new n.Range(this.context,t(this.context,this,"GetColumnsAfter",1,[i],!1,!0,null))},l.prototype.getColumnsBefore=function(i){if(!p()){if(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0)throw new OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove");return this._getAdjacentRange("getColumnsBefore",i,this.getColumn(0),0,-1)}return new n.Range(this.context,t(this.context,this,"GetColumnsBefore",1,[i],!1,!0,null))},l.prototype.getEntireColumn=function(){return new n.Range(this.context,t(this.context,this,"GetEntireColumn",1,[],!1,!0,null))},l.prototype.getEntireRow=function(){return new n.Range(this.context,t(this.context,this,"GetEntireRow",1,[],!1,!0,null))},l.prototype.getIntersection=function(i){return new n.Range(this.context,t(this.context,this,"GetIntersection",1,[i],!1,!0,null))},l.prototype.getIntersectionOrNullObject=function(i){return new n.Range(this.context,t(this.context,this,"GetIntersectionOrNullObject",1,[i],!1,!0,null))},l.prototype.getLastCell=function(){return new n.Range(this.context,t(this.context,this,"GetLastCell",1,[],!1,!0,null))},l.prototype.getLastColumn=function(){return new n.Range(this.context,t(this.context,this,"GetLastColumn",1,[],!1,!0,null))},l.prototype.getLastRow=function(){return new n.Range(this.context,t(this.context,this,"GetLastRow",1,[],!1,!0,null))},l.prototype.getOffsetRange=function(i,r){return new n.Range(this.context,t(this.context,this,"GetOffsetRange",1,[i,r],!1,!0,null))},l.prototype.getResizedRange=function(i,r){if(!p()){this._ensureInteger(i,"getResizedRange");this._ensureInteger(r,"getResizedRange");var u=i>=0&&r>=0?this:this.getCell(0,0);return u.getBoundingRect(this.getLastCell().getOffsetRange(i,r))}return new n.Range(this.context,t(this.context,this,"GetResizedRange",1,[i,r],!1,!0,null))},l.prototype.getRow=function(i){return new n.Range(this.context,t(this.context,this,"GetRow",1,[i],!1,!0,null))},l.prototype.getRowsAbove=function(i){if(!p()){if(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0)throw new OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove");return this._getAdjacentRange("getRowsAbove",i,this.getRow(0),-1,0)}return new n.Range(this.context,t(this.context,this,"GetRowsAbove",1,[i],!1,!0,null))},l.prototype.getRowsBelow=function(i){if(!p()){if(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0)throw new OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove");return this._getAdjacentRange("getRowsBelow",i,this.getLastRow(),1,0)}return new n.Range(this.context,t(this.context,this,"GetRowsBelow",1,[i],!1,!0,null))},l.prototype.getUsedRange=function(i){return new n.Range(this.context,t(this.context,this,"GetUsedRange",1,[i],!1,!0,null))},l.prototype.getUsedRangeOrNullObject=function(i){return new n.Range(this.context,t(this.context,this,"GetUsedRangeOrNullObject",1,[i],!1,!0,null))},l.prototype.getVisibleView=function(){return new n.RangeView(this.context,t(this.context,this,"GetVisibleView",1,[],!1,!1,null))},l.prototype.insert=function(i){return new n.Range(this.context,t(this.context,this,"Insert",0,[i],!1,!0,null))},l.prototype.merge=function(n){s(this.context,this,"Merge",0,[n])},l.prototype.select=function(){s(this.context,this,"Select",1,[])},l.prototype.unmerge=function(){s(this.context,this,"Unmerge",0,[])},l.prototype._KeepReference=function(){s(this.context,this,"_KeepReference",1,[])},l.prototype._ValidateArraySize=function(n,t){s(this.context,this,"_ValidateArraySize",1,[n,t])},l.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;h(this,t);u(t.Address)||(this.m_address=t.Address);u(t.AddressLocal)||(this.m_addressLocal=t.AddressLocal);u(t.CellCount)||(this.m_cellCount=t.CellCount);u(t.ColumnCount)||(this.m_columnCount=t.ColumnCount);u(t.ColumnHidden)||(this.m_columnHidden=t.ColumnHidden);u(t.ColumnIndex)||(this.m_columnIndex=t.ColumnIndex);u(t.Formulas)||(this.m_formulas=t.Formulas);u(t.FormulasLocal)||(this.m_formulasLocal=t.FormulasLocal);u(t.FormulasR1C1)||(this.m_formulasR1C1=t.FormulasR1C1);u(t.Hidden)||(this.m_hidden=t.Hidden);u(t.NumberFormat)||(this.m_numberFormat=t.NumberFormat);u(t.RowCount)||(this.m_rowCount=t.RowCount);u(t.RowHidden)||(this.m_rowHidden=t.RowHidden);u(t.RowIndex)||(this.m_rowIndex=t.RowIndex);u(t.Text)||(this.m_text=t.Text);u(t.ValueTypes)||(this.m_valueTypes=t.ValueTypes);u(t.Values)||(this.m_values=t.Values);u(t._ReferenceId)||(this.m__ReferenceId=t._ReferenceId);a(this,t,["conditionalFormats","ConditionalFormats","format","Format","sort","Sort","worksheet","Worksheet"])}},l.prototype.load=function(n){return c(this,n),this},l.prototype._handleIdResult=function(n){(i.prototype._handleIdResult.call(this,n),e(n))||u(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId)},l.prototype.track=function(){return this.context.trackedObjects.add(this),this},l.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},l.prototype.toJSON=function(){return{address:this.m_address,addressLocal:this.m_addressLocal,cellCount:this.m_cellCount,columnCount:this.m_columnCount,columnHidden:this.m_columnHidden,columnIndex:this.m_columnIndex,format:this.m_format,formulas:this.m_formulas,formulasLocal:this.m_formulasLocal,formulasR1C1:this.m_formulasR1C1,hidden:this.m_hidden,numberFormat:this.m_numberFormat,rowCount:this.m_rowCount,rowHidden:this.m_rowHidden,rowIndex:this.m_rowIndex,text:this.m_text,values:this.m_values,valueTypes:this.m_valueTypes}},l}(OfficeExtension.ClientObject);n.Range=k;ot=function(i){function s(){i.apply(this,arguments)}return __extends(s,i),Object.defineProperty(s.prototype,"_className",{get:function(){return"RangeView"},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rows",{get:function(){return this.m_rows||(this.m_rows=new n.RangeViewCollection(this.context,o(this.context,this,"Rows",!0,!1))),this.m_rows},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"cellAddresses",{get:function(){return r("cellAddresses",this.m_cellAddresses,"RangeView",this._isNull),this.m_cellAddresses},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"columnCount",{get:function(){return r("columnCount",this.m_columnCount,"RangeView",this._isNull),this.m_columnCount},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulas",{get:function(){return r("formulas",this.m_formulas,"RangeView",this._isNull),this.m_formulas},set:function(n){this.m_formulas=n;f(this.context,this,"Formulas",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulasLocal",{get:function(){return r("formulasLocal",this.m_formulasLocal,"RangeView",this._isNull),this.m_formulasLocal},set:function(n){this.m_formulasLocal=n;f(this.context,this,"FormulasLocal",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulasR1C1",{get:function(){return r("formulasR1C1",this.m_formulasR1C1,"RangeView",this._isNull),this.m_formulasR1C1},set:function(n){this.m_formulasR1C1=n;f(this.context,this,"FormulasR1C1",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"index",{get:function(){return r("index",this.m_index,"RangeView",this._isNull),this.m_index},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"numberFormat",{get:function(){return r("numberFormat",this.m_numberFormat,"RangeView",this._isNull),this.m_numberFormat},set:function(n){this.m_numberFormat=n;f(this.context,this,"NumberFormat",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rowCount",{get:function(){return r("rowCount",this.m_rowCount,"RangeView",this._isNull),this.m_rowCount},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"text",{get:function(){return r("text",this.m_text,"RangeView",this._isNull),this.m_text},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"valueTypes",{get:function(){return r("valueTypes",this.m_valueTypes,"RangeView",this._isNull),this.m_valueTypes},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"values",{get:function(){return r("values",this.m_values,"RangeView",this._isNull),this.m_values},set:function(n){this.m_values=n;f(this.context,this,"Values",n)},enumerable:!0,configurable:!0}),s.prototype.set=function(n,t){this._recursivelySet(n,t,["numberFormat","values","formulas","formulasLocal","formulasR1C1"],[],["rows","rows"])},s.prototype.getRange=function(){return new n.Range(this.context,t(this.context,this,"GetRange",1,[],!1,!0,null))},s.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;h(this,t);u(t.CellAddresses)||(this.m_cellAddresses=t.CellAddresses);u(t.ColumnCount)||(this.m_columnCount=t.ColumnCount);u(t.Formulas)||(this.m_formulas=t.Formulas);u(t.FormulasLocal)||(this.m_formulasLocal=t.FormulasLocal);u(t.FormulasR1C1)||(this.m_formulasR1C1=t.FormulasR1C1);u(t.Index)||(this.m_index=t.Index);u(t.NumberFormat)||(this.m_numberFormat=t.NumberFormat);u(t.RowCount)||(this.m_rowCount=t.RowCount);u(t.Text)||(this.m_text=t.Text);u(t.ValueTypes)||(this.m_valueTypes=t.ValueTypes);u(t.Values)||(this.m_values=t.Values);a(this,t,["rows","Rows"])}},s.prototype.load=function(n){return c(this,n),this},s.prototype.toJSON=function(){return{cellAddresses:this.m_cellAddresses,columnCount:this.m_columnCount,formulas:this.m_formulas,formulasLocal:this.m_formulasLocal,formulasR1C1:this.m_formulasR1C1,index:this.m_index,numberFormat:this.m_numberFormat,rowCount:this.m_rowCount,text:this.m_text,values:this.m_values,valueTypes:this.m_valueTypes}},s}(OfficeExtension.ClientObject);n.RangeView=ot;st=function(i){function u(){i.apply(this,arguments)}return __extends(u,i),Object.defineProperty(u.prototype,"_className",{get:function(){return"RangeViewCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"items",{get:function(){return r("items",this.m__items,"RangeViewCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),u.prototype.getCount=function(){var t=s(this.context,this,"GetCount",1,[]),n=new OfficeExtension.ClientResult;return l(this,t,n),n},u.prototype.getItemAt=function(i){return new n.RangeView(this.context,t(this.context,this,"GetItemAt",1,[i],!1,!1,null))},u.prototype._handleResult=function(t){var u,f,r,o;if((i.prototype._handleResult.call(this,t),!e(t))&&(u=t,h(this,u),!e(u[OfficeExtension.Constants.items])))for(this.m__items=[],f=u[OfficeExtension.Constants.items],r=0;r6&&i.slice(0,5)===t.DateJSONPrefix&&i.slice(-1)===t.DateJSONSuffix&&(r=new Date(parseInt(i.slice(5,-1))),r)?r:i})},t._replaceDateWithStringDate=function(n){var i=JSON.stringify(n,function(n,i){return this[n]instanceof Date?t.DateJSONPrefix+this[n].getTime()+t.DateJSONSuffix:i});return JSON.parse(i)},Object.defineProperty(t.prototype,"key",{get:function(){return r("key",this.m_key,"Setting",this._isNull),this.m_key},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return r("value",this.m_value,"Setting",this._isNull),this.m_value},set:function(n){if(!e(n)){this.m_value=n;var i=t._replaceDateWithStringDate(n);f(this.context,this,"Value",i);return}this.m_value=n;f(this.context,this,"Value",n)},enumerable:!0,configurable:!0}),t.prototype.set=function(n,t){this._recursivelySet(n,t,["value"],[],[])},t.prototype.delete=function(){s(this.context,this,"Delete",0,[])},t.prototype._handleResult=function(i){if(n.prototype._handleResult.call(this,i),!e(i)){var r=i;h(this,r);u(r.Key)||(this.m_key=r.Key);u(r.Value)||(this.m_value=r.Value,this.m_value=t.replaceStringDateWithDate(this.m_value))}},t.prototype.load=function(n){return c(this,n),this},t.prototype.toJSON=function(){return{key:this.m_key,value:this.m_value}},t.DateJSONPrefix="Date(",t.DateJSONSuffix=")",t}(OfficeExtension.ClientObject);n.Setting=g;ct=function(i){function u(){i.apply(this,arguments)}return __extends(u,i),Object.defineProperty(u.prototype,"_className",{get:function(){return"NamedItemCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"items",{get:function(){return r("items",this.m__items,"NamedItemCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),u.prototype.add=function(i,r,u){return new n.NamedItem(this.context,t(this.context,this,"Add",0,[i,r,u],!1,!0,null))},u.prototype.addFormulaLocal=function(i,r,u){return new n.NamedItem(this.context,t(this.context,this,"AddFormulaLocal",0,[i,r,u],!1,!1,null))},u.prototype.getCount=function(){var t=s(this.context,this,"GetCount",1,[]),n=new OfficeExtension.ClientResult;return l(this,t,n),n},u.prototype.getItem=function(t){return new n.NamedItem(this.context,y(this.context,this,[t]))},u.prototype.getItemOrNullObject=function(i){return new n.NamedItem(this.context,t(this.context,this,"GetItemOrNullObject",1,[i],!1,!1,null))},u.prototype._handleResult=function(t){var u,f,r,o;if((i.prototype._handleResult.call(this,t),!e(t))&&(u=t,h(this,u),!e(u[OfficeExtension.Constants.items])))for(this.m__items=[],f=u[OfficeExtension.Constants.items],r=0;r"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"error",{get:function(){return r("error",this.m_error,"FunctionResult",this._isNull),this.m_error},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return r("value",this.m_value,"FunctionResult",this._isNull),this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){if(n.prototype._handleResult.call(this,t),!e(t)){var i=t;h(this,i);u(i.Error)||(this.m_error=i.Error);u(i.Value)||(this.m_value=i.Value)}},t.prototype.load=function(n){return c(this,n),this},t.prototype.toJSON=function(){return{error:this.m_error,value:this.m_value}},t}(OfficeExtension.ClientObject);n.FunctionResult=i;pu=function(n){function r(){n.apply(this,arguments)}return __extends(r,n),Object.defineProperty(r.prototype,"_className",{get:function(){return"Functions"},enumerable:!0,configurable:!0}),r.prototype.abs=function(n){return new i(this.context,t(this.context,this,"Abs",0,[n],!1,!0,null))},r.prototype.accrInt=function(n,r,u,f,e,o,s,h){return new i(this.context,t(this.context,this,"AccrInt",0,[n,r,u,f,e,o,s,h],!1,!0,null))},r.prototype.accrIntM=function(n,r,u,f,e){return new i(this.context,t(this.context,this,"AccrIntM",0,[n,r,u,f,e],!1,!0,null))},r.prototype.acos=function(n){return new i(this.context,t(this.context,this,"Acos",0,[n],!1,!0,null))},r.prototype.acosh=function(n){return new i(this.context,t(this.context,this,"Acosh",0,[n],!1,!0,null))},r.prototype.acot=function(n){return new i(this.context,t(this.context,this,"Acot",0,[n],!1,!0,null))},r.prototype.acoth=function(n){return new i(this.context,t(this.context,this,"Acoth",0,[n],!1,!0,null))},r.prototype.amorDegrc=function(n,r,u,f,e,o,s){return new i(this.context,t(this.context,this,"AmorDegrc",0,[n,r,u,f,e,o,s],!1,!0,null))},r.prototype.amorLinc=function(n,r,u,f,e,o,s){return new i(this.context,t(this.context,this,"AmorLinc",0,[n,r,u,f,e,o,s],!1,!0,null))},r.prototype.and=function(){for(var r=[],n=0;n0?i.push(t):t.tabIndex===0&&r.push(t):r.push(t);return i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;return r===0&&(r=i.indexOf(n)-i.indexOf(t)),r}),[].concat(i,r)}var o="focus",s="on",k="configurable",d="writable",h="enumerable",u="",c="undefined",t=!1,i=!0,l=2147483647,n=null,r=-1,a=r,g="&_xdm_Info=",nt="&_serializer_version=",tt="_xdm_",ft="_serializer_version=",v="#",it="&",f="class",y={},et=3e4,p=n,w=n,e=(new Date).getTime();return{set_entropy:function(n){var t,r,i;if(typeof n=="string")for(t=0;t6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(r)===OSF.DDA.SettingsManager.DataJSONSuffix&&(i=new Date(parseInt(t.slice(5,r))),i)?i:t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,i);f[u]=t}catch(e){}}return f},loadScript:function(r,u,f){var s,e,o,h,c;r&&u&&(s=window.document,e=y[r],e?e.loaded?u():e.pendingCallbacks.push(u):(o=s.createElement("script"),o.type="text/javascript",e={loaded:t,pendingCallbacks:[u],timer:n},y[r]=e,h=function(){var r,t,u;for(e.timer!=n&&(clearTimeout(e.timer),delete e.timer),e.loaded=i,r=e.pendingCallbacks.length,t=0;t1?l[l.length-1]:n,s,h,c,a;return u&&o!=n&&(o.indexOf(it)>=0&&(o=o.split(it)[0]),o=decodeURIComponent(o)),s=b(),!f&&s&&(h=window.name.indexOf(i),h>r&&(c=window.name.indexOf(";",h),c==r&&(c=window.name.length),a=window.name.substring(h,c),o?s.setItem(a,o):o=s.getItem(a))),o},getConversationId:function(){var i=window.location.search,t=n,r;return i&&(r=i.indexOf("&"),t=r>0?i.substring(1,r):i.substr(1),t&&t.charAt(t.length-1)==="="&&(t=t.substring(0,t.length-1),t&&(t=decodeURIComponent(t)))),t},getInfoItems:function(n){var t=n.split("$");return typeof t[1]==c&&(t=n.split("|")),typeof t[1]==c&&(t=n.split("%7C")),t},getXdmFieldValue:function(n,t){var r=u,f=OSF.OUtil.parseXdmInfo(t),i;if(f&&(i=OSF.OUtil.getInfoItems(f),i!=undefined&&i.length>=3))switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]),f;if(u)throw u;for(f in r)if(u=Function._validateParameter(n[f],r[f],f),u)throw u;},writeProfilerMark:function(n){window.msWriteProfilerMark&&(window.msWriteProfilerMark(n),OsfMsAjaxFactory.msAjaxDebug.trace(n))},outputDebug:function(n){typeof OsfMsAjaxFactory!==c&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){var e,f;r=r||{};for(e in u)f=u[e],r[f]==undefined&&(r[f]=i);return Object.defineProperty(n,t,r),n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[h])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[h])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[d,h,k])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[d,h,k])},finalizeProperties:function(n,r){var e,u;r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8,e=o&255,i[t++]=r>>2,i[t++]=(r&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63,isNaN(o)||(r=o>>8,f=h&255,e=h>>8,i[t++]=r>>2,i[t++]=(r&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63),isNaN(o)?i[t-1]=64:isNaN(h)&&(i[t-2]=64,i[t-1]=64),c=0;c0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){var u,i,f,r;if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(u=[],i=0;in)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=ut(u),e=f?u.length-1:0,u.length===0)return n;while(!h&&e>=0&&en)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=ut(u),l=y(u,f),s=v(u.length,l,e),s<0)return n;while(!c&&s>=0&&s0;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[r%16],r=Math.floor(r/16);for(;t<32;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[Math.floor(Math.random()*16)];return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3};OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611,WordAndroid:8388613,PowerpointAndroid:8388614};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",Reserved:"reserved",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData",Base64:"base64"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidOpenBrowserWindow:102,dispidCreateDocumentMethod:105,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];return i?(i.name||(i.name=n[this.errorCodes.ooeInternalError].name),i.message||(i.message=n[this.errorCodes.ooeInternalError].message)):i=n[this.errorCodes.ooeInternalError],i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:t.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:t.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:t.L_SSOConnectionLostError,message:t.L_SSOConnectionLostErrorMessage}}}}(),function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}(),r,i,h,u,c,l,f,a,e,v,y,p,w,b,o,k,d,g,s,nt,tt,it,rt;n.RequirementVersion=ut;r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){var f,u,e,i,r;if(n==undefined)return!1;if(t==undefined&&(t=0),f=this._setMap,u=f._sets,u.hasOwnProperty(n.toLowerCase())){e=u[n.toLowerCase()];try{if((i=this._getVersion(e),t=t+"",r=this._getVersion(t),i.major>0&&i.major>r.major)||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),i=0,r=0;if(t.length<2&&isNaN(Number(n)))throw u;else if(i=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(i)||isNaN(r))throw u;return{minor:r,major:i}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;h=function(n){function i(){n.call(this,{dialogapi:t})}return __extends(i,n),i}(i);n.DefaultDialogSetRequirement=h;u=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelClientDefaultSetRequirement=u;c=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(u);n.ExcelClientV1DefaultSetRequirement=c;l=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookClientDefaultSetRequirement=l;f=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return __extends(i,n),i}(i);n.WordClientDefaultSetRequirement=f;a=function(n){function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return __extends(i,n),i}(f);n.WordClientV1DefaultSetRequirement=a;e=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointClientDefaultSetRequirement=e;v=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(e);n.PowerpointClientV1DefaultSetRequirement=v;y=function(n){function i(){n.call(this,{selection:t,textcoercion:t})}return __extends(i,n),i}(i);n.ProjectClientDefaultSetRequirement=y;p=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return __extends(i,n),i}(i);n.ExcelWebDefaultSetRequirement=p;w=function(n){function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordWebDefaultSetRequirement=w;b=function(n){function i(){n.call(this,{activeview:t,settings:t})}return __extends(i,n),i}(i);n.PowerpointWebDefaultSetRequirement=b;o=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookWebDefaultSetRequirement=o;k=function(n){function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.SwayWebDefaultSetRequirement=k;d=function(n){function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return __extends(i,n),i}(i);n.AccessWebDefaultSetRequirement=d;g=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelIOSDefaultSetRequirement=g;s=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordIOSDefaultSetRequirement=s;nt=function(n){function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return __extends(t,n),t}(s);n.WordIOSV1DefaultSetRequirement=nt;tt=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointIOSDefaultSetRequirement=tt;it=function(n){function i(){n.call(this,{mailbox:t})}return __extends(i,n),i}(i);n.OutlookIOSDefaultSetRequirement=it;rt=function(){function n(){}var t="undefined";return n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},n.getDefaultRequirementMatrix=function(u){var f,e,s,o;return this.initializeDefaultSetMatrix(),f=undefined,e=u.get_requirementMatrix(),e!=undefined&&e.length>0&&typeof JSON!==t?(s=JSON.parse(u.get_requirementMatrix().toLowerCase()),f=new r(new i(s))):(o=n.getClientFullVersionString(u),f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[o]!=undefined?new r(n.DefaultSetArrayMatrix[o]):new r(new i({}))),f},n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix(),e;return f!=undefined&&f.length>0&&typeof JSON!==t?(e=JSON.parse(n.get_requirementMatrix().toLowerCase()),u=new r(new i(e))):u=new r(new h),u},n.getClientFullVersionString=function(n){var i=n.get_appMinorVersion(),u="",r="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;return f&&n.get_appVersion()==1?r=t==4096&&i>=15?"16.00.01":"16.00":n.get_appName()==64?r=n.get_appVersion():(u=i<10?"0"+i:""+i,r=n.get_appVersion()+"."+u),n.get_appName()+"-"+r},n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new c;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new v;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new l;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new w;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new b;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new g;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new k;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new nt;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new tt;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new it},n.Excel_RCLIENT_1600="1-16.00",n.Excel_RCLIENT_1601="1-16.01",n.Word_RCLIENT_1600="2-16.00",n.Word_RCLIENT_1601="2-16.01",n.PowerPoint_RCLIENT_1600="4-16.00",n.PowerPoint_RCLIENT_1601="4-16.01",n.Outlook_RCLIENT_1600="8-16.00",n.Excel_WAC_1600="16-16.00",n.Word_WAC_1600="32-16.00",n.Outlook_WAC_1600="64-16.00",n.Outlook_WAC_1601="64-16.01",n.Project_RCLIENT_1600="128-16.00",n.Access_WAC_1600="256-16.00",n.PowerPoint_WAC_1600="512-16.00",n.Excel_IOS_1600="1024-16.00",n.SWAY_WAC_1600="2048-16.00",n.Word_IOS_1600="4096-16.00",n.Word_IOS_16001="4096-16.00.01",n.PowerPoint_IOS_1600="8192-16.00",n.Outlook_IOS_1600="65536-16.00",n.DefaultSetArrayMatrix={},n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))}(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}return n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n},n.getInstance=function(){return n.hostObj===undefined&&(n.hostObj=new n),n.hostObj},n.prototype.getPlatform=function(){var n=this,t;return n.hostInfo.hostPlatform&&(t=n.hostInfo.hostPlatform.toLowerCase(),n.platformRemappings[t])?n.platformRemappings[t]:null},n.prototype.getHost=function(){var n=this,t;if(n.hostInfo.hostType){if(t=n.hostInfo.hostType.toLowerCase(),n.camelCaseMappings[t])return n.camelCaseMappings[t];if(t=n.capitalizeFirstLetter(n.hostInfo.hostType),Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null},n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null},n}();n.Host=t})(t=n.HostName||(n.HostName={}))}(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){n||(window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,n=!0)},disableShortcut:function(){n&&(t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window),n=!1)}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i,r,o,u,f,e;if(n&&typeof n=="string"&&(r=n.indexOf("#"),r!=-1)){o=n.substring(0,r);u=n.substring(r+1);switch(o){case"binding":case"bindings":u&&(i=new OSF.DDA.BindingPromise(u))}}if(i)return i.onFail=t,i;else if(t)if(f=typeof t,f=="function")e={},e[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(e,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext));else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f);};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this,s,e;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.auth&&OSF.OUtil.defineEnumerableProperty(f,"auth",{value:n.auth});n.application&&OSF.OUtil.defineEnumerableProperty(f,"application",{value:n.application});n.get_isDialog()?(e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e})):(t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t}),r&&(s=r.displayName||"appOM",delete r.displayName,OSF.OUtil.defineEnumerableProperty(f,s,{value:r})),u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}}),e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e}))};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Application=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this,u;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;return OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext()),n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,e=n.length,o=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){var u,i,r;for(u in n){if(i=n[u],r=t[u],i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw o();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw o();}};f.extractRequiredArguments=function(t,i,r){var f,u,h,s,c,l;if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(c=n.length-1;c>=s;c--){l=n[c];switch(typeof l){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=l;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}if(f=o.fillOptions(f,i,r,u),e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;return o.verifyArguments(t,f),f}var h="function",s=n.length,o=new OSF.DDA.ApiMethodCall(n,t,i,f,e);this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),u=c(n,r,t,i);return o.constructCallArgs(r,u,t,i)};this.processResponse=function(n,t,i,f){return n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n)};this.getCallArgs=function(n){for(var t,u,r,i=n.length-1;i>=s;i--){r=n[i];switch(typeof r){case"object":t=r;break;case h:u=r}}return t=t||{},u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u),t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],i=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],t,i,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback],u,r;f&&(u={},u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?u[OSF.DDA.AsyncResultEnum.Properties.Value]=i:(r={},i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i),f(new OSF.DDA.AsyncResult(u,r)))};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.SyncMethodNames[t]=i};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){function o(n,i,r,u){var o,c,s,h;if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(s=n.length-1;s>=e;s--){h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}return o=f.fillOptions(o,i,r,u),f.verifyArguments(t,o),o}var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),u=o(n,r,t,i);return f.constructCallArgs(r,u,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){function e(i,f){var a=i?{}:undefined,s,h,o,v,c,l;for(s in i){if(h=i[s],OSF.DDA.ListType.isListType(s)){o=[];for(v in h)o.push(e(h[v],f))}else OSF.OUtil.listContainsKey(r,s)?o=r[s][f](h):f==u&&n.preserveNesting(s)?o=e(h,f):(c=t[s],c?(l=c[f],l&&(o=l[h],o===undefined&&(o=h))):o=h);a[s]=o}return a}function l(i,r){var e,u,h,s;for(u in r)h=n.isComplexType(u)?l(i,t[u][o]):i[u],h!=undefined&&(e||(e={}),s=r[u],s==f&&(s=u),e[s]=n.pack(u,h));return e}function s(i,r,e){var o,a,h,l,p,v,y;e||(e={});for(o in r){if(a=r[o],a==f)h=i;else if(a==c){e[o]=i.toArray();continue}else h=i[a];if(h===null||h===undefined)e[o]=undefined;else if(h=n.unpack(o,h),n.isComplexType(o))l=t[o][u],n.preserveNesting(o)?e[o]=s(h,l):s(h,l,e);else if(OSF.DDA.ListType.isListType(o)){l={};p=OSF.DDA.ListType.getDescriptor(o);l[p]=f;v=new Array(h.length);for(y in h)v[y]=s(h[y],l);e[o]=v}else e[o]=h}return e}function a(n,i,r){var f=t[n][r],u,o,c;return r=="toHost"?(o=e(i,r),u=l(o,f)):r==h&&(c=s(i,f),u=e(c,r)),u}var h="fromHost",i=this,o="toHost",u=h,c="sourceData",f="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];t||(t={});i.addMapping=function(n,i){var e,h,c,l,r,s,a,v;if(i.map){e=i.map;h={};for(c in e)l=e[c],l==f&&(l=c),h[l]=c}else e=i.toHost,h=i.fromHost;if(r=t[n],r){s=r[o];for(a in s)e[a]=s[a];s=r[u];for(v in s)h[v]=s[v]}else r=t[n]={};r[o]=e;r[u]=h};i.toHost=function(n,t){return a(n,t,o)};i.fromHost=function(n,t){return a(n,t,u)};i.self=f;i.sourceData=c;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){return this.isDynamicType(n)?t[n].toHost(i):i};i.unpack=function(n,i){return this.isDynamicType(n)?t[n].fromHost(i):i}};OSF.DDA.getDecoratedParameterMap=function(n,t){function r(n){var i=null,r,t;if(n)for(i={},r=n.length,t=0;t0){for(r=[],i=0;i=s)break;if(f=Function._validateParameter(n[e],o,h),f)return f.popStackFrame(),f}return t}),Function._validateParameterCount||(Function._validateParameterCount=function(n,r,u){var f,s,e=r.length,h=n.length,c,l,a;if(he)for(s=i,f=0;f0&&t.push(u)}}catch(s){}return t}var i=[],t={};t[Microsoft.Office.WebExtension.Parameters.Data]=function(){var t=0,i=1;return{toHost:function(n){if(OSF.DDA.TableDataProperties&&typeof n!="string"&&n[OSF.DDA.TableDataProperties.TableRows]!==undefined){var r=[];r[t]=n[OSF.DDA.TableDataProperties.TableRows];r[i]=n[OSF.DDA.TableDataProperties.TableHeaders];n=r}return n},fromHost:function(r){var f,e,u;return r.toArray?(e=r.dimensions(),e===2?f=n(r):(u=r.toArray(),u.length===2&&(u[0]!=null&&u[0].toArray||u[1]!=null&&u[1].toArray)?(f={},f[OSF.DDA.TableDataProperties.TableRows]=n(u[t]),f[OSF.DDA.TableDataProperties.TableHeaders]=n(u[i])):f=u)):f=r,f}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,i,t);this.unpack=function(n,i){var r,u;return this.isComplexType(n)||OSF.DDA.ListType.isListType(n)?(u=(i||typeof i=="unknown")&&i.toArray,r=u?i.toArray():i||{}):r=this.isDynamicType(n)?t[n].fromHost(i):i,r}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(n){function t(n){var i=n,f,r,u;if(OSF.OUtil.isArray(n))for(f=i.length,r=0;r2)for(r=[],f=1;f-1&&(o="&");var y=screen.width*e.width/100,p=screen.height*e.height/100,w="width="+y+", height="+p;if(f[0]=f[0].concat(o).concat(h),a=f.join(c),n.popup=window.open(a,"",w),n.popup!=undefined&&window.dialogAPIErrorCode==undefined){window.addEventListener("message",v);n.interval=window.setInterval(b,500);function k(n){r(t,[n])}n.NotifyError=k;u(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}else s=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,window.dialogAPIErrorCode&&(s=window.dialogAPIErrorCode),u(s)}},n.prototype.messageParent=function(n){var t=n[Microsoft.Office.WebExtension.Parameters.MessageToParent],i={dialogMessage:{messageType:OSF.DialogMessageType.DialogMessageReceived,messageContent:t}};window.opener.postMessage(JSON.stringify(i),window.location.origin)},n.prototype.closeDialog=function(t,i,r){n.popup?(n.interval&&window.clearInterval(n.interval),n.popup.close(),n.NotifyError=null,r(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)):r(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)},n.prototype.sendMessage=function(){},n}();n.MacRichClientHostController=t}(OfficeExt||(OfficeExt={}));OSF.ClientHostController=new OfficeExt.MacRichClientHostController,function(n){var t;(function(t){var i=function(){function n(){this._osfOfficeTheme=t;this._osfOfficeThemeTimeStamp=t}var t=null;return n.prototype.getOfficeTheme=function(){var r="GetOfficeThemeInfo",t=this,i;if(OSF.DDA._OsfControlContext){if(t._osfOfficeTheme&&t._osfOfficeThemeTimeStamp&&(new Date).getTime()-t._osfOfficeThemeTimeStamp40)&&(n=OSF.OUtil.Guid.generateNewGuid(),t.setValue(t.clientIDKey,n)),n},n.prototype.saveLog=function(n,t){var i=this,u=i.getValue(i.logIdSetKey);u=(u&&u.length>0?u+";":r)+n;i.setValue(i.logIdSetKey,u);i.setValue(n,t)},n.prototype.enumerateLog=function(n,t){var i=this,e=i.getValue(i.logIdSetKey),u,o,r,f;if(e){u=e.split(";");for(o in u)r=u[o],f=i.getValue(r),f&&(n&&n(r,f),t&&i.remove(r));t&&i.remove(i.logIdSetKey)}},n.prototype.getValue=function(n){var t=OSF.OUtil.getLocalStorage(),i=r;return t&&(i=t.getItem(n)),i},n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)},n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}},n}(),o=function(){function t(){}return t.prototype.LogData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(t)}catch(i){}},t.prototype.LogRawData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(t))}catch(i){}},t}();n.initialize=y;n.onAppActivated=p;n.onScriptDone=w;n.onCallDone=b;n.onMethodDone=k;n.onPropertyDone=d;n.onEventDone=g;n.onRegisterDone=nt;n.onAppClosed=tt;n.setOsfControlAppCorrelationId=it;n.doAppInitializationLogging=l;n.logAppCommonMessage=rt;n.logAppException=ut;OSF.AppTelemetry=n}(OSFAppTelemetry||(OSFAppTelemetry={}));Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(n){var i=this,r,t,u;if(i._eventHandlers={},i._objectEventHandlers={},i._queuedEventsArgs={},n!=null)for(r=0;r0)for(r=0;r0)for(r=0;r0?(this._eventHandlers[n]=[],!0):!1},clearObjectEventHandlers:function(n,t){return this._objectEventHandlers[n]!=null&&this._objectEventHandlers[n][t]!=null?(this._objectEventHandlers[n][t]=[],!0):!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},getObjectEventHandlerCount:function(n,t){return this._objectEventHandlers[n]==null||this._objectEventHandlers[n][t]==null?0:this._objectEventHandlers[n][t].length},fireEvent:function(n){var t,r,i;if(n.type==undefined)return!1;if(t=n.type,t&&this._eventHandlers[t]){for(r=this._eventHandlers[t],i=0;i0)){for(r=t[0];i.length>0;)u=i.shift(),r(u);return!0}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var o="hostPlatform",f="outlook",e="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(n,i[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:r=new OSF.DDA.RichApiMessageEventArgs(n,i);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i),t.initialize(r.initialData),(OSF._OfficeAppFactory.getHostInfo()[o]=="win32"||OSF._OfficeAppFactory.getHostInfo()[o]=="mac")&&t.setCurrentItemNumber(r.itemNumber.itemNumber);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkRecipientsChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var i=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),t=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];t(arguments,i,n)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(n){var i=OSF.DDA.SyncMethodNames.MessageParent.displayName,t=this,r;t[i]||OSF.OUtil.defineEnumerableProperty(t,i,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return n(arguments,t)}});r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;t[r]||typeof OSF.DialogParentMessageEventDispatch=="undefined"||OSF.DDA.DispIdHost.addEventSupport(t,OSF.DialogParentMessageEventDispatch,n);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(n){n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:n[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels,value:{types:["boolean"],defaultValue:!1}}],privateStateCallbacks:[],onSucceeded:function(n){var f=n[Microsoft.Office.WebExtension.Parameters.Id],i=n[Microsoft.Office.WebExtension.Parameters.Data],t=new OSF.DialogHandler,e=OSF.DDA.AsyncMethodNames.CloseAsync.displayName,r,u;return OSF.OUtil.defineEnumerableProperty(t,e,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];n(arguments,f,i,t)}}),r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName,OSF.OUtil.defineEnumerableProperty(t,r,{value:function(){var r=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],n=r.verifyAndExtractCall(arguments,t,i),u=n[Microsoft.Office.WebExtension.Parameters.EventType],f=n[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(u,f)}}),u=OSF.DDA.SyncMethodNames.SendMessage.displayName,OSF.OUtil.defineEnumerableProperty(t,u,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return n(arguments,i,t)}}),t},checkCallArgs:function(n){return n[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Width]=1),!n[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&n[Microsoft.Office.WebExtension.Parameters.Width]>100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99),n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1),!n[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99),n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(n){try{n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,n);OSF.ClientHostController.openDialog(n.dispId,n.targetId,function(t,i){n.onEvent&&n.onEvent(i);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(n){n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,n);try{OSF.ClientHostController.closeDialog(n.dispId,n.targetId,t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.messageParent=function(n){try{n.onCalling&&n.onCalling();var i=(new Date).getTime(),t=OSF.ClientHostController.messageParent(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs((new Date).getTime()-i),t),t}catch(r){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(r)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.sendMessage=function(n){try{n.onCalling&&n.onCalling();var r=(new Date).getTime(),t=OSF.ClientHostController.sendMessage(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),t}catch(i){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(i)}};Microsoft.Office.WebExtension.TableData=function(n,t){function i(n){if(n==null||n==undefined)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(n,2);t<2;t++)n=[n];return n}catch(i){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(n){t=i(n)}},rows:{get:function(){return n},set:function(t){n=t==null||OSF.OUtil.isArray(t)&&t.length==0?[]:i(t)}}});this.headers=t;this.rows=n};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(n){return new Microsoft.Office.WebExtension.TableData(n[OSF.DDA.TableDataProperties.TableRows],n[OSF.DDA.TableDataProperties.TableHeaders])};Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var n=null;return{findArrayDimensionality:function(n){if(OSF.OUtil.isArray(n)){for(var t=0,i=0;i4194304)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return n},onSucceeded:function(n,t,i){return new OSF.DDA.File(n[OSF.DDA.FileProperties.Handle],n[OSF.DDA.FileProperties.FileSize],i[Microsoft.Office.WebExtension.Parameters.SliceSize])}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(n,t){return t[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(r<0||r>=t.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;return n[OSF.DDA.FileSliceOffset]=parseInt((r*i[OSF.DDA.FileProperties.SliceSize]).toString()),n},onSucceeded:function(n,t,i){var r={};return OSF.OUtil.defineEnumerableProperties(r,{data:{value:OSF.OUtil.shallowCopy(n[Microsoft.Office.WebExtension.Parameters.Data])},index:{value:i[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:n[OSF.DDA.FileProperties.SliceSize]}}),r}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileProperties.FileSize,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0},{name:OSF.DDA.FileProperties.SliceSize,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:0},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:5},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:6}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:0}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileSliceOffset,value:1},{name:OSF.DDA.FileProperties.SliceSize,value:2}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0}]});OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(n){OSF.OUtil.defineEnumerableProperties(this,{url:{value:n[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(n){return new Microsoft.Office.WebExtension.FileProperties(n)}});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,fromHost:[{name:OSF.DDA.FilePropertiesDescriptor.Url,value:0}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.ExcelTableBinding=function(n,t,i,r,u){var f=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[f.ClearFormatsAsync,f.SetTableOptionsAsync,f.SetFormatsAsync]);OSF.DDA.ExcelTableBinding.uber.constructor.call(this,n,t,i,r,u);OSF.OUtil.finalizeProperties(this)};OSF.OUtil.extend(OSF.DDA.ExcelTableBinding,OSF.DDA.TableBinding),function(){var t="number",n="object",i="string";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[i,n,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:[n],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:[n],defaultValue:[]}}],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[i,n,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[n,i],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[n],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:[n],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:[n],defaultValue:[]}}],checkCallArgs:function(n,t){var i=Microsoft.Office.WebExtension.Parameters;if(n[i.StartRow]==0&&n[i.StartColumn]==0&&OSF.OUtil.isArray(n[i.CellFormat])&&n[i.CellFormat].length===0&&OSF.OUtil.isArray(n[i.TableOptions])&&n[i.TableOptions].length===0&&(delete n[i.StartRow],delete n[i.StartColumn],delete n[i.CellFormat],delete n[i.TableOptions]),n[i.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[i.StartRow]&&n[i.StartRow]!=0||n[i.StartColumn]&&n[i.StartColumn]!=0||n[i.CellFormat]||n[i.TableOptions]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:function(n){return n.id}}]});OSF.DDA.BindingPromise.prototype.setTableOptionsAsync=function(){var n=arguments;return this._fetch(function(t){t.setTableOptionsAsync.apply(t,n)}),this};OSF.DDA.BindingPromise.prototype.setFormatsAsync=function(){var n=arguments;return this._fetch(function(t){t.setFormatsAsync.apply(t,n)}),this};OSF.DDA.BindingPromise.prototype.clearFormatsAsync=function(){var n=arguments;return this._fetch(function(t){t.clearFormatsAsync.apply(t,n)}),this}}(),function(){function n(n){return n.id}OSF.DDA.AsyncMethodNames.addNames({ClearFormatsAsync:"clearFormatsAsync",SetTableOptionsAsync:"setTableOptionsAsync",SetFormatsAsync:"setFormatsAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ClearFormatsAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetTableOptionsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TableOptions,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetFormatsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CellFormat,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]})}();Microsoft.Office.WebExtension.Table={All:0,Data:1,Headers:2},function(){var u="undefined",e="auto fit",o="distributed",f="none";OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearFormatsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetTableOptionsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetFormatsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:2},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.Data,value:2},{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:3},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:4},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:5}]});var s={headerRow:0,bandedRows:1,firstColumn:2,lastColumn:3,bandedColumns:4,filterButton:5,style:6,totalRow:7},h={row:0,column:1},t={alignHorizontal:{text:"alignHorizontal",type:1},alignVertical:{text:"alignVertical",type:2},backgroundColor:{text:"backgroundColor",type:101},borderStyle:{text:"borderStyle",type:201},borderColor:{text:"borderColor",type:202},borderTopStyle:{text:"borderTopStyle",type:203},borderTopColor:{text:"borderTopColor",type:204},borderBottomStyle:{text:"borderBottomStyle",type:205},borderBottomColor:{text:"borderBottomColor",type:206},borderLeftStyle:{text:"borderLeftStyle",type:207},borderLeftColor:{text:"borderLeftColor",type:208},borderRightStyle:{text:"borderRightStyle",type:209},borderRightColor:{text:"borderRightColor",type:210},borderOutlineStyle:{text:"borderOutlineStyle",type:211},borderOutlineColor:{text:"borderOutlineColor",type:212},borderInlineStyle:{text:"borderInlineStyle",type:213},borderInlineColor:{text:"borderInlineColor",type:214},fontFamily:{text:"fontFamily",type:301},fontStyle:{text:"fontStyle",type:302},fontSize:{text:"fontSize",type:303},fontUnderlineStyle:{text:"fontUnderlineStyle",type:304},fontColor:{text:"fontColor",type:305},fontDirection:{text:"fontDirection",type:306},fontStrikethrough:{text:"fontStrikethrough",type:307},fontSuperscript:{text:"fontSuperscript",type:308},fontSubscript:{text:"fontSubscript",type:309},fontNormal:{text:"fontNormal",type:310},indentLeft:{text:"indentLeft",type:401},indentRight:{text:"indentRight",type:402},numberFormat:{text:"numberFormat",type:501},width:{text:"width",type:701},height:{text:"height",type:702},wrapping:{text:"wrapping",type:703}},r=[{name:f,value:0},{name:"thin",value:1},{name:"medium",value:2},{name:"dashed",value:3},{name:"dotted",value:4},{name:"thick",value:5},{name:"double",value:6},{name:"hair",value:7},{name:"medium dashed",value:8},{name:"dash dot",value:9},{name:"medium dash dot",value:10},{name:"dash dot dot",value:11},{name:"medium dash dot dot",value:12},{name:"slant dash dot",value:13}],i=[{name:f,value:0},{name:"black",value:1},{name:"blue",value:2},{name:"gray",value:3},{name:"green",value:4},{name:"orange",value:5},{name:"pink",value:6},{name:"purple",value:7},{name:"red",value:8},{name:"teal",value:9},{name:"turquoise",value:10},{name:"violet",value:11},{name:"white",value:12},{name:"yellow",value:13},{name:"automatic",value:14}],n=OSF.DDA.SafeArray.Delegate.ParameterMap;n.define({type:t.alignHorizontal.text,toHost:[{name:"general",value:0},{name:"left",value:1},{name:"center",value:2},{name:"right",value:3},{name:"fill",value:4},{name:"justify",value:5},{name:"center across selection",value:6},{name:o,value:7}]});n.define({type:t.alignVertical.text,toHost:[{name:"top",value:0},{name:"center",value:1},{name:"bottom",value:2},{name:"justify",value:3},{name:o,value:4}]});n.define({type:t.backgroundColor.text,toHost:i});n.define({type:t.borderStyle.text,toHost:r});n.define({type:t.borderColor.text,toHost:i});n.define({type:t.borderTopStyle.text,toHost:r});n.define({type:t.borderTopColor.text,toHost:i});n.define({type:t.borderBottomStyle.text,toHost:r});n.define({type:t.borderBottomColor.text,toHost:i});n.define({type:t.borderLeftStyle.text,toHost:r});n.define({type:t.borderLeftColor.text,toHost:i});n.define({type:t.borderRightStyle.text,toHost:r});n.define({type:t.borderRightColor.text,toHost:i});n.define({type:t.borderOutlineStyle.text,toHost:r});n.define({type:t.borderOutlineColor.text,toHost:i});n.define({type:t.borderInlineStyle.text,toHost:r});n.define({type:t.borderInlineColor.text,toHost:i});n.define({type:t.fontStyle.text,toHost:[{name:"regular",value:0},{name:"italic",value:1},{name:"bold",value:2},{name:"bold italic",value:3}]});n.define({type:t.fontUnderlineStyle.text,toHost:[{name:f,value:0},{name:"single",value:1},{name:"double",value:2},{name:"single accounting",value:3},{name:"double accounting",value:4}]});n.define({type:t.fontColor.text,toHost:i});n.define({type:t.fontDirection.text,toHost:[{name:"context",value:0},{name:"left-to-right",value:1},{name:"right-to-left",value:2}]});n.define({type:t.width.text,toHost:[{name:e,value:-1}]});n.define({type:t.height.text,toHost:[{name:e,value:-1}]});n.define({type:Microsoft.Office.WebExtension.Parameters.TableOptions,toHost:[{name:"headerRow",value:0},{name:"bandedRows",value:1},{name:"firstColumn",value:2},{name:"lastColumn",value:3},{name:"bandedColumns",value:4},{name:"filterButton",value:5},{name:"style",value:6},{name:"totalRow",value:7}]});n.dynamicTypes[Microsoft.Office.WebExtension.Parameters.CellFormat]={toHost:function(t){for(var i in t)t[i].format&&(t[i].format=n.doMapValues(t[i].format,"toHost"));return t},fromHost:function(n){return n}};n.setDynamicType(Microsoft.Office.WebExtension.Parameters.CellFormat,{toHost:function(n){var c="cells",y="format",w=0,b=1,p=[],l,i,r,f,e,o,a,v,s;for(l in n){if(i=n[l],r=[],typeof i[c]!==u){if(f=i[c],typeof i[c]=="object"){e=[];for(o in f)typeof h[o]!==u&&(e[h[o]]=f[o])}else e=f;r[w]=e}if(i[y]){a=i[y];v=[];for(s in a)typeof t[s]!==u&&v.push([t[s].type,a[s]]);r[b]=v}p[l]=r}return p},fromHost:function(n){return n}});n.setDynamicType(Microsoft.Office.WebExtension.Parameters.TableOptions,{toHost:function(n){var i=[];for(var t in n)typeof s[t]!==u&&(i[s[t]]=n[t]);return i},fromHost:function(n){return n}})}();OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType,{Image:"image"});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.CoercionType,toHost:[{name:Microsoft.Office.WebExtension.CoercionType.Image,value:8}]}),function(n){var t;(function(t){var u=function(){function r(){var n=this,t=n;n._pseudoDocument=u;n._eventDispatch=u;n._processAppCommandInvocation=function(n){var i=t._verifyManifestCallback(n.callbackName),r;if(i.errorCode!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){t._invokeAppCommandCompletedMethod(n.appCommandId,i.errorCode,"");return}r=t._constructEventObjectForCallback(n);r?window.setTimeout(function(){i.callback(r)},0):t._invokeAppCommandCompletedMethod(n.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"")}}var f="object",e="string",u=null;return r.initializeOsfDda=function(){OSF.DDA.AsyncMethodNames.addNames({AppCommandInvocationCompletedAsync:"appCommandInvocationCompletedAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[e]},{name:Microsoft.Office.WebExtension.Parameters.Status,types:["number"]},{name:Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData,types:[e]}]});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{AppCommandInvokedEvent:"AppCommandInvokedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppCommandInvoked:"appCommandInvoked"});OSF.OUtil.setNamespace("AppCommand",OSF.DDA);OSF.DDA.AppCommand.AppCommandInvokedEventArgs=n.AppCommand.AppCommandInvokedEventArgs},r.prototype.initializeAndChangeOnce=function(n){var i=this,r;t.registerDdaFacade();i._pseudoDocument={};OSF.DDA.DispIdHost.addAsyncMethods(i._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync]);i._eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked]);r=function(t){n&&(t.status=="succeeded"?n(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):n(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError))};OSF.DDA.DispIdHost.addEventSupport(i._pseudoDocument,i._eventDispatch);i._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,i._processAppCommandInvocation,r)},r.prototype._verifyManifestCallback=function(n){var s="function",e={callback:u,errorCode:OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback},o;n=n.trim();try{for(var t=n.split("."),i=window,r=0;r0},enumerable:!0,configurable:!0}),t.prototype._getLastAction=function(){return this.m_actions[this.m_actions.length-1]},t.prototype.addTrace=function(n,t){this.m_traceInfos[n]=t},t.prototype.ensureInstantiateObjectPath=function(t){if(t){if(this.m_instantiatedObjectPaths[t.objectPathInfo.Id])return;if(this.ensureInstantiateObjectPath(t.parentObjectPath),this.ensureInstantiateObjectPaths(t.argumentObjectPaths),!this.m_instantiatedObjectPaths[t.objectPathInfo.Id]){var r={Id:this.m_context._nextId(),ActionType:1,Name:"",ObjectPathId:t.objectPathInfo.Id},i=new n.Action(r,!1,!1);i.referencedObjectPath=t;this.addAction(i)}}},t.prototype.ensureInstantiateObjectPaths=function(n){if(n)for(var t=0;t=0;--r)if(i=n[r],u=i.actionInfo.Id,i.referencedObjectPath&&t._updateLastUsedActionIdOfObjectPathId(e,i.referencedObjectPath,u),o=i.referencedArgumentObjectPaths,o)for(v=o.length,s=0;s0?i.actionInfo.L=c:i.actionInfo.L&&delete i.actionInfo.L},t}();n.ClientRequest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;n._internalConfig={showDisposeInfoInDebugInfo:!1,enableEarlyDispose:!0,alwaysPolyfillClientObjectRetrieveMethod:!1};t=function(){function t(){}return t.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},t.prototype._createRequestExecutorOrNull=function(){return null},Object.defineProperty(t.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),t}();n.SessionBase=t;i=function(){function i(r){if(this.m_customRequestHeaders={},this._onRunFinishedNotifiers=[],this.m_nextId=0,i._overrideSession)this.m_requestUrlAndHeaderInfoResolver=i._overrideSession;else if((n.Utility.isNullOrUndefined(r)||typeof r=="string"&&r.length===0)&&(r=i.defaultRequestUrlAndHeaders,r||(r={url:n.Constants.localDocument,headers:{}})),typeof r=="string")this.m_requestUrlAndHeaderInfo={url:r,headers:{}};else if(i.isRequestUrlAndHeaderInfoResolver(r))this.m_requestUrlAndHeaderInfoResolver=r;else if(i.isRequestUrlAndHeaderInfo(r)){var u=r;this.m_requestUrlAndHeaderInfo={url:u.url,headers:{}};n.Utility._copyHeaders(u.headers,this.m_requestUrlAndHeaderInfo.headers)}else throw n._Internal.RuntimeError._createInvalidArgError("url");this.m_requestUrlAndHeaderInfoResolver instanceof t&&(this.m_session=this.m_requestUrlAndHeaderInfoResolver);this._processingResult=!1;this._customData=n.Constants.iterativeExecutor;this.sync=this.sync.bind(this)}return Object.defineProperty(i.prototype,"session",{get:function(){return this.m_session},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"eventRegistration",{get:function(){return this.m_session?this.m_session.eventRegistration:n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_url",{get:function(){return this.m_requestUrlAndHeaderInfo?this.m_requestUrlAndHeaderInfo.url:null},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_pendingRequest",{get:function(){return this.m_pendingRequest==null&&(this.m_pendingRequest=new n.ClientRequest(this)),this.m_pendingRequest},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"debugInfo",{get:function(){var t=new n.RequestPrettyPrinter(this._rootObjectPropertyName,this._pendingRequest._objectPaths,this._pendingRequest._actions,n._internalConfig.showDisposeInfoInDebugInfo),i=t.process();return{pendingStatements:i}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"trackedObjects",{get:function(){return this.m_trackedObjects||(this.m_trackedObjects=new n.TrackedObjects(this)),this.m_trackedObjects},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"requestHeaders",{get:function(){return this.m_customRequestHeaders},enumerable:!0,configurable:!0}),i.prototype.load=function(t,r){n.Utility.validateContext(this,t);var u=i._parseQueryOption(r),f=n.ActionFactory.createQueryAction(this,t,u);this._pendingRequest.addActionResultHandler(f,t)},i.isLoadOption=function(t){if(!n.Utility.isUndefined(t.select)&&(typeof t.select=="string"||Array.isArray(t.select))||!n.Utility.isUndefined(t.expand)&&(typeof t.expand=="string"||Array.isArray(t.expand))||!n.Utility.isUndefined(t.top)&&typeof t.top=="number"||!n.Utility.isUndefined(t.skip)&&typeof t.skip=="number")return!0;for(var i in t)return!1;return!0},i.parseStrictLoadOption=function(n){var t={Select:[]};return i.parseStrictLoadOptionHelper(t,"","option",n),t},i.combineQueryPath=function(n,t,i){return n.length===0?t:n+i+t},i.parseStrictLoadOptionHelper=function(t,r,u,f){var e,o;for(e in f)if(o=f[e],e==="$all"){if(typeof o!="boolean")throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));o&&t.Select.push(i.combineQueryPath(r,"*","/"))}else if(e==="$top"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));t.Top=o}else if(e==="$skip"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));t.Skip=o}else if(typeof o=="boolean")o&&t.Select.push(i.combineQueryPath(r,e,"/"));else if(typeof o=="object")i.parseStrictLoadOptionHelper(t,i.combineQueryPath(r,e,"/"),i.combineQueryPath(u,e,"."),o);else throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));},i._parseQueryOption=function(t){var u={},f,r;if(typeof t=="string")f=t,u.Select=n.Utility._parseSelectExpand(f);else if(Array.isArray(t))u.Select=t;else if(typeof t=="object")if(r=t,i.isLoadOption(r)){if(typeof r.select=="string")u.Select=n.Utility._parseSelectExpand(r.select);else if(Array.isArray(r.select))u.Select=r.select;else if(!n.Utility.isNullOrUndefined(r.select))throw n._Internal.RuntimeError._createInvalidArgError("option.select");if(typeof r.expand=="string")u.Expand=n.Utility._parseSelectExpand(r.expand);else if(Array.isArray(r.expand))u.Expand=r.expand;else if(!n.Utility.isNullOrUndefined(r.expand))throw n._Internal.RuntimeError._createInvalidArgError("option.expand");if(typeof r.top=="number")u.Top=r.top;else if(!n.Utility.isNullOrUndefined(r.top))throw n._Internal.RuntimeError._createInvalidArgError("option.top");if(typeof r.skip=="number")u.Skip=r.skip;else if(!n.Utility.isNullOrUndefined(r.skip))throw n._Internal.RuntimeError._createInvalidArgError("option.skip");}else u=i.parseStrictLoadOption(t);else if(!n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError("option");return u},i.prototype.loadRecursive=function(t,r,u){var f,e,o;if(!n.Utility.isPlainJsonObject(r))throw n._Internal.RuntimeError._createInvalidArgError("options");f={};for(e in r)f[e]=i._parseQueryOption(r[e]);o=n.ActionFactory.createRecursiveQueryAction(this,t,{Queries:f,MaxDepth:u});this._pendingRequest.addActionResultHandler(o,t)},i.prototype.trace=function(t){n.ActionFactory.createTraceAction(this,t,!0)},i.prototype._processOfficeJsErrorResponse=function(n,t){},i.prototype.syncPrivateMain=function(){var t=this;return n.Utility._createPromiseFromResult(null).then(function(){if(!t.m_requestUrlAndHeaderInfo)return t.m_requestUrlAndHeaderInfoResolver._resolveRequestUrlAndHeaderInfo().then(function(i){if(t.m_requestUrlAndHeaderInfo=i,t.m_requestUrlAndHeaderInfo||(t.m_requestUrlAndHeaderInfo={url:n.Constants.localDocument,headers:{}}),n.Utility.isNullOrEmptyString(t.m_requestUrlAndHeaderInfo.url)&&(t.m_requestUrlAndHeaderInfo.url=n.Constants.localDocument),t.m_requestUrlAndHeaderInfo.headers||(t.m_requestUrlAndHeaderInfo.headers={}),typeof t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull=="function"){var r=t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull();r&&(t._requestExecutor=r)}})}).then(function(){var n=t._pendingRequest;return t.m_pendingRequest=null,t.processPreSyncPromises(n).then(function(){return t.syncPrivate(n)})})},i.prototype.syncPrivate=function(t){var f=this,e,o,s,u,h,r,i;return t.hasActions?(e=t.buildRequestMessageBody(),o=t.flags,this._requestExecutor||(this._requestExecutor=n.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)?new n.OfficeJsRequestExecutor(this):new n.HttpRequestExecutor),s=this._requestExecutor,u={},n.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,u),n.Utility._copyHeaders(this.m_customRequestHeaders,u),h={Url:this.m_requestUrlAndHeaderInfo.url,Headers:u,Body:e},t.invalidatePendingInvalidObjectPaths(),r=null,i=null,this._lastSyncStart=performance.now(),s.executeAsync(this._customData,o,h).then(function(u){return f._lastSyncEnd=performance.now(),r=f.processRequestExecutorResponseMessage(t,u),f.processPendingEventHandlers(t).catch(function(t){n.Utility.log("Error in processPendingEventHandlers");n.Utility.log(JSON.stringify(t));i=t})}).then(function(){var u,f;if(r){n.Utility.log("Throw error from response: "+JSON.stringify(r));throw r;}if(i){n.Utility.log("Throw error from ProcessEventHandler: "+JSON.stringify(i));u=null;i instanceof n._Internal.RuntimeError?(u=i,u.traceMessages=t._responseTraceMessages):(f=null,f=typeof i=="string"?i:i.message,n.Utility.isNullOrEmptyString(f)&&(f=n.Utility._getResourceString(n.ResourceStrings.cannotRegisterEvent)),u=new n._Internal.RuntimeError({code:n.ErrorCodes.cannotRegisterEvent,message:f,traceMessages:t._responseTraceMessages}));throw u;}})):this.processPendingEventHandlers(t)},i.prototype.processRequestExecutorResponseMessage=function(t,i){var e,r,o,u,f;if(i.Body&&i.Body.TraceIds&&t._setResponseTraceIds(i.Body.TraceIds),e=t._responseTraceMessages,r=null,i.Body&&(i.Body.Error&&i.Body.Error.ActionIndex>=0&&(o=new n.RequestPrettyPrinter(this._rootObjectPropertyName,t._objectPaths,t._actions),r=o.processForDebugStatementInfo(i.Body.Error.ActionIndex)),u=null,i.Body.Results?u=i.Body.Results:i.Body.ProcessedResults&&i.Body.ProcessedResults.Results&&(u=i.Body.ProcessedResults.Results),u)){this._processingResult=!0;try{t.processResponse(u)}finally{this._processingResult=!1}}if(n.Utility.isNullOrEmptyString(i.ErrorCode)){if(i.Body&&i.Body.Error)return f={errorLocation:i.Body.Error.Location},r&&(f.statement=r.statement,f.surroundingStatements=r.surroundingStatements),new n._Internal.RuntimeError({code:i.Body.Error.Code,message:i.Body.Error.Message,traceMessages:e,debugInfo:f})}else return new n._Internal.RuntimeError({code:i.ErrorCode,message:i.ErrorMessage,traceMessages:e});return null},i.prototype.processPendingEventHandlers=function(t){for(var u,i=n.Utility._createPromiseFromResult(null),r=0;r0&&(typeof r[0]=="string"||i.isRequestUrlAndHeaderInfo(r[0])||i.isRequestUrlAndHeaderInfoResolver(r[0]))&&(y=r[0],h=1),r.length==h+1)l=u,v=r[h+0];else if(r.length==h+2){if(n.Utility.isNullOrUndefined(r[h+0]))l=u;else if(r[h+0]instanceof n.ClientObject)l=function(){return r[h+0].context};else if(r[h+0]instanceof i)l=function(){return r[h+0]};else if(Array.isArray(r[h+0])){if(c=r[h+0],c.length==0)return i.createErrorPromise(t);for(a=0;a0){var n=c._onRunFinishedNotifiers.shift();n()}if(a)return l;else throw l;})},i.prototype._nextId=function(){return++this.m_nextId},i}();n.ClientRequestContext=i}(OfficeExtension||(OfficeExtension={})),function(n){var i=function(){function t(n){this.m_type=n}return Object.defineProperty(t.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){(this.m_isLoaded=!0,typeof t=="object"&&t&&t._IsNull)||(this.m_value=this.m_type===1?n.Utility.adjustToDateTime(t):t)},t}(),t;n.ClientResult=i;t=function(){function t(n,t){this.m_proxy=n;this.m_shouldPolyfill=t}return Object.defineProperty(t.prototype,"proxy",{get:function(){return this.m_proxy},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"retrieveResult.data"}});return this.m_data},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(n){if(this.m_isLoaded=!0,typeof n=="object"&&n&&n._IsNull){this.m_data=null;return}this.m_data=this.m_shouldPolyfill?this.changePropertyNameToCamelLowerCase(n):n},t.prototype.changePropertyNameToCamelLowerCase=function(t){var o=95,u,i,r,f,e;if(Array.isArray(t)){for(i=[],u=0;u0&&(r=!0),t=document.createElement("a"),t.href=this.m_url,r?t.hash=t.hash.length===0||t.hash==="#"?"#"+i:t.hash+"&"+i:t.search=t.search.length===0||t.search==="?"?"?"+i:t.search+"&"+i,t.href},f.prototype.init=function(){var t=this,i;return window.addEventListener("message",this.m_onMessageHandler),i=this._getIFrameSrc(),new n._Internal.OfficePromise(function(r,u){var f=document.createElement("iframe");t.m_options.id&&(f.id=t.m_options.id);f.style.height=t.m_options.height;f.style.width=t.m_options.width;f.src=i;t.m_options.container.appendChild(f);t.m_timeoutId=setTimeout(function(){t.close();var i=n.Utility.createRuntimeError(n.ErrorCodes.timeout,n.Utility._getResourceString(n.ResourceStrings.timeout),"EmbeddedSession.init");u(i)},t.m_options.timeoutInMilliseconds);t.m_promiseResolver=r})},f.prototype._invoke=function(n,t,u){if(!this.m_enabled){t(i.InternalError,null);return}r.invokeRequestModifier&&(u=r.invokeRequestModifier(u));this._sendMessageWithCallback(this.m_id++,n,u,function(n){r.invokeResponseModifier&&(n=r.invokeResponseModifier(n));var u=n.Error;delete n.Error;t(u||i.Success,n)})},f.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler);window.clearTimeout(this.m_timeoutId);this.m_enabled=!1},Object.defineProperty(f.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),f.prototype._createRequestExecutorOrNull=function(){return new e(this)},f.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},f.prototype._registerEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.RegisterEventCommand,{EventId:i,TargetId:r},function(){n(null)})})},f.prototype._unregisterEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.UnregisterEventCommand,{EventId:i,TargetId:r},function(){n()})})},f.prototype._onMessage=function(n){var u=this,i,e,r,o,s;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===n.source&&this.m_chosenOrigin===n.origin)){if(i=n.data,i&&i[t.CommandKey]===t.ApiReadyCommand){!this.m_chosenWindow&&this._isValidDescendant(n.source)&&i[t.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=n.source,this.m_chosenOrigin=n.origin,this._sendMessageWithCallback(this.m_id++,t.GetAppContextCommand,null,function(n){u._setupContext(n);window.clearTimeout(u.m_timeoutId);u.m_promiseResolver()}));return}if(i&&i[t.CommandKey]===t.FireEventCommand){var f=i[t.ParamsKey],h=f.EventId,c=f.TargetId,l=f.Data;if(this.m_sessionEventManager)for(e=this.m_sessionEventManager.getHandlers(h,c),r=0;r=0;o--)if(r[o]===e[i].handler){r.splice(o,1);break}break;case 2:r=[];break}}return s&&(!this.m_registered&&r.length>0?u=u.then(function(){return f.m_eventInfo.registerFunc(f.m_callback)}).then(function(){return f.m_registered=!0}):this.m_registered&&r.length==0&&(u=u.then(function(){return f.m_eventInfo.unregisterFunc(f.m_callback)}).catch(function(t){n.Utility.log("Error when unregister event: "+JSON.stringify(t))}).then(function(){return f.m_registered=!1})),u=u.then(function(){return f.m_handlers=r})),u},t.prototype.fireEvent=function(t){for(var u,f,r=[],i=0;i=0;e--)if(f[e]===u){f.splice(e,1);break}return f.length===0?this.m_unregisterEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i}();n.EventRegistration=i}(OfficeExtension||(OfficeExtension={})),function(n){function r(n){t._testReadyImpl=n}function u(n){t.getGenericEventRegistration()._handleRichApiMessage(n)}var t=function(){function t(){this.m_eventRegistration=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this));this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this)}return t.prototype.ready=function(){var i=this;return this.m_ready||(this.m_ready=t._testReadyImpl?t._testReadyImpl().then(function(){i.m_isReady=!0}):n._Internal.officeJsEventRegistration.register(5,"",this.m_richApiMessageHandler).then(function(){i.m_isReady=!0})),this.m_ready},Object.defineProperty(t.prototype,"isReady",{get:function(){return this.m_isReady},enumerable:!0,configurable:!0}),t.prototype.register=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.register(n,t,i)})},t.prototype.unregister=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.unregister(n,t,i)})},t.prototype._registerEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._unregisterEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._handleRichApiMessage=function(t){var r,i,u,e,f;if(t&&t.entries)for(r=0;r0))for(e=JSON.parse(i.message),i.isRemoteOverride&&(e.source=n.Constants.eventSourceRemote),f=0;f=0;u--)if(n[u]===i){n.splice(u,1);break}n.length==0&&t.getGenericEventRegistration().unregister(r.m_genericEventInfo.eventType,r.m_genericEventInfo.getTargetIdFunc(),r._callback)})},r.prototype.removeAll=function(){},r}(n.EventHandlers);n.GenericEventHandlers=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var s=JSON.stringify(u.Body),f=u.Url,e,o;if(f.charAt(f.length-1)!="/"&&(f=f+"/"),f=f+n.Constants.processQuery,f=f+"?"+n.Constants.flags+"="+r.toString(),e={method:"POST",url:f,headers:{},body:s},e.headers[n.Constants.sourceLibHeader]=t.SourceLibHeaderValue,e.headers["CONTENT-TYPE"]="application/json",u.Headers)for(o in u.Headers)e.headers[o]=u.Headers[o];return n.HttpUtility.sendRequest(e).then(function(t){var i,r;return t.statusCode===200?i={ErrorCode:null,ErrorMessage:null,Headers:t.headers,Body:JSON.parse(t.body)}:(n.Utility.log("Error Response:"+t.body),r=n.Utility._parseErrorResponse(t),i={ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:t.headers,Body:null}),i})},t.SourceLibHeaderValue="officejs-rest",t}();n.HttpRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.setCustomSendRequestFunc=function(n){t.s_customSendRequestFunc=n},t.xhrSendRequestFunc=function(t){return new n._Internal.OfficePromise(function(i,r){var u=new XMLHttpRequest,f;if(u.open(t.method,t.url),u.onload=function(){var t={statusCode:u.status,headers:n.Utility._parseHttpResponseHeaders(u.getAllResponseHeaders()),body:u.responseText};i(t)},u.onerror=function(){r(new n._Internal.RuntimeError({code:n.ErrorCodes.connectionFailure,message:n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,u.statusText)}))},t.headers)for(f in t.headers)u.setRequestHeader(f,t.headers[f]);u.send(t.body)})},t.sendRequest=function(n){t.validateAndNormalizeRequest(n);var i=t.s_customSendRequestFunc;return i||(i=t.xhrSendRequestFunc),i(n)},t.setCustomSendLocalDocumentRequestFunc=function(n){t.s_customSendLocalDocumentRequestFunc=n},t.sendLocalDocumentRequest=function(n){t.validateAndNormalizeRequest(n);var i;return i=t.s_customSendLocalDocumentRequestFunc||t.officeJsSendLocalDocumentRequestFunc,i(n)},t.officeJsSendLocalDocumentRequestFunc=function(t){t=n.Utility._validateLocalDocumentRequest(t);var i=n.Utility._buildRequestMessageSafeArray(t);return new n._Internal.OfficePromise(function(t,r){OSF.DDA.RichApi.executeRichApiRequestAsync(i,function(i){var r;r=i.status=="succeeded"?{statusCode:n.RichApiMessageUtility.getResponseStatusCode(i),headers:n.RichApiMessageUtility.getResponseHeaders(i),body:n.RichApiMessageUtility.getResponseBody(i)}:n.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(i.error.code,i.error.message);n.Utility.log(JSON.stringify(r));t(r)})})},t.validateAndNormalizeRequest=function(t){if(n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"request"});n.Utility.isNullOrEmptyString(t.method)&&(t.method="GET");t.method=t.method.toUpperCase()},t.logRequest=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Request---"),n.Utility.log(i.method+" "+i.url),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t.logResponse=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Response---"),n.Utility.log(""+i.statusCode),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t._logBody=!1,t}();n.HttpUtility=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_clientObject=n}return n.prototype._handleResult=function(n){this.m_clientObject._handleIdResult(n)},n}();n.InstantiateActionResultHandler=t}(OfficeExtension||(OfficeExtension={})),function(n){}(OfficeExtension||(OfficeExtension={})),function(n){var u=function(){function t(n){this.m_session=n}return t.prototype.executeAsync=function(t,r,u){var e={url:n.Constants.processQuery,method:"POST",headers:u.Headers,body:u.Body},f={id:i.nextId(),type:1,flags:r,message:e};return n.Utility.log(JSON.stringify(f)),this.m_session.sendMessageToHost(f).then(function(t){var i,r,u;return n.Utility.log("Received response: "+JSON.stringify(t)),i=t.message,i.statusCode===200?r={ErrorCode:null,ErrorMessage:null,Headers:i.headers,Body:i.body}:(n.Utility.log("Error Response:"+i.body),u=n.Utility._parseErrorResponse(i),r={ErrorCode:u.errorCode,ErrorMessage:u.errorMessage,Headers:i.headers,Body:null}),r})},t}(),i=function(i){function r(n){var t=this;i.call(this);this.m_promiseResolver={};this.m_bridge=n;this.m_bridge.onMessageFromHost=function(n){t.onMessageFromHost(n)}}return __extends(r,i),r.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},r.prototype._createRequestExecutorOrNull=function(){return n.Utility.log("NativeBridgeSession::CreateRequestExecutor"),new u(this)},Object.defineProperty(r.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),r.init=function(t){if(t&&typeof t=="object"){var i=new r(t);n.ClientRequestContext._overrideSession=i;n.HttpUtility.setCustomSendLocalDocumentRequestFunc(function(n){var t={id:r.nextId(),type:1,flags:0,message:n};return i.sendMessageToHost(t).then(function(n){return n.message})})}},r.prototype.sendMessageToHost=function(t){var i=this;return this.m_bridge.sendMessageToHost(JSON.stringify(t)),new n._Internal.OfficePromise(function(n,r){i.m_promiseResolver[t.id]=n})},r.prototype.onMessageFromHost=function(n){var i,r;n==="test"?t._testFunc&&t._testFunc():(i=JSON.parse(n),typeof i.id=="number"&&(r=this.m_promiseResolver[i.id],r&&r(i),delete this.m_promiseResolver[i.id]))},r.nextId=function(){return r.s_nextId++},r.s_nextId=1,r}(n.SessionBase),r=function(){function n(){}return n.init=function(n){i.init(n)},n}(),t;n.HostBridge=r;typeof _richApiNativeBridge=="object"&&_richApiNativeBridge&&r.init(_richApiNativeBridge);t=function(){function n(){}return n.setTestFunc=function(t){n._testFunc=t},n}();n.HostBridgeTest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){this.m_objectPathInfo=n;this.m_parentObjectPath=t;this.m_isWriteOperation=!1;this.m_isCollection=i;this.m_isInvalidAfterRequest=r;this.m_isValid=!0}return Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},set:function(n){this.m_isWriteOperation=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRestrictedResourceAccess",{get:function(){return this.m_isRestrictedResourceAccess},set:function(n){this.m_isRestrictedResourceAccess=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(n){this.m_argumentObjectPaths=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(n){this.m_isValid=n;!n&&this.m_objectPathInfo.ObjectPathType===6&&this.m_savedObjectPathInfo&&(t.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(n){this.m_getByIdMethodName=n},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null},t.prototype.updateUsingObjectData=function(i){var e=i[n.Constants.referenceId],f,o,u,r;if(!n.Utility.isNullOrEmptyString(e)){this.m_savedObjectPathInfo||this.isInvalidAfterRequest||!t.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)||(f={},t.copyObjectPathInfo(this.m_objectPathInfo,f),this.m_savedObjectPathInfo={pathInfo:f,parent:this.m_parentObjectPath});this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=e;this.m_objectPathInfo.ArgumentInfo={};delete this.m_objectPathInfo.ParentObjectPathId;this.m_parentObjectPath=null;this.m_argumentObjectPaths=null;return}if(o=this.parentObjectPath&&this.parentObjectPath.isCollection,u=this.getByIdMethodName,(o||!n.Utility.isNullOrEmptyString(u))&&(r=i[n.Constants.id],n.Utility.isNullOrUndefined(r)&&(r=i[n.Constants.idPrivate]),!n.Utility.isNullOrUndefined(r))){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;n.Utility.isNullOrEmptyString(u)?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=u,this.m_getByIdMethodName=null);this.isWriteOperation=!1;this.m_objectPathInfo.ArgumentInfo={};this.m_objectPathInfo.ArgumentInfo.Arguments=[r];this.m_argumentObjectPaths=null;return}},t.isRestorableObjectPath=function(n){return n===1||n===5||n===3||n===4},t.copyObjectPathInfo=function(n,t){t.Id=n.Id;t.ArgumentInfo=n.ArgumentInfo;t.Name=n.Name;t.ObjectPathType=n.ObjectPathType;t.ParentObjectPathId=n.ParentObjectPathId},t}();n.ObjectPath=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createGlobalObjectObjectPath=function(t){var i={Id:t._nextId(),ObjectPathType:1,Name:""};return new n.ObjectPath(i,null,!1,!1)},t.createNewObjectObjectPath=function(t,i,r,u){var e={Id:t._nextId(),ObjectPathType:2,Name:i},f=new n.ObjectPath(e,null,r,!1);return f.isRestrictedResourceAccess=u,f},t.createPropertyObjectPath=function(t,i,r,u,f,e){var s={Id:t._nextId(),ObjectPathType:4,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id},o=new n.ObjectPath(s,i._objectPath,u,f);return o.isRestrictedResourceAccess=e,o},t.createIndexerObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i._objectPath,!1,!1)},t.createIndexerObjectPathUsingParentPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i,!1,!1)},t.createMethodObjectPath=function(t,i,r,u,f,e,o,s,h){var l={Id:t._nextId(),ObjectPathType:3,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},a=n.Utility.setMethodArguments(t,l.ArgumentInfo,f),c=new n.ObjectPath(l,i._objectPath,e,o);return c.argumentObjectPaths=a,c.isWriteOperation=u!=1,c.getByIdMethodName=s,c.isRestrictedResourceAccess=h,c},t.createReferenceIdObjectPath=function(t,i){var r={Id:t._nextId(),ObjectPathType:6,Name:i,ArgumentInfo:{}};return new n.ObjectPath(r,null,!1,!1)},t.createChildItemObjectPathUsingIndexerOrGetItemAt=function(i,r,u,f,e){var o=f[n.Constants.id];return n.Utility.isNullOrUndefined(o)&&(o=f[n.Constants.idPrivate]),i&&!n.Utility.isNullOrUndefined(o)?t.createChildItemObjectPathUsingIndexer(r,u,f):t.createChildItemObjectPathUsingGetItemAt(r,u,f,e)},t.createChildItemObjectPathUsingIndexer=function(t,i,r){var f=r[n.Constants.id],u;return n.Utility.isNullOrUndefined(f)&&(f=r[n.Constants.idPrivate]),u=u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u.ArgumentInfo.Arguments=[f],new n.ObjectPath(u,i._objectPath,!1,!1)},t.createChildItemObjectPathUsingGetItemAt=function(t,i,r,u){var e=r[n.Constants.index],f;return e&&(u=e),f={Id:t._nextId(),ObjectPathType:3,Name:n.Constants.getItemAt,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f.ArgumentInfo.Arguments=[u],new n.ObjectPath(f,i._objectPath,!1,!1)},t}();n.ObjectPathFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_context=n}return t.prototype.executeAsync=function(i,r,u){var f=this,e=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n._Internal.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(e,function(i){n.Utility.log("Response:");n.Utility.log(JSON.stringify(i));var r;i.status=="succeeded"?r=n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBody(i),n.RichApiMessageUtility.getResponseHeaders(i)):(r=n.RichApiMessageUtility.buildResponseOnError(i.error.code,i.error.message),f.m_context._processOfficeJsErrorResponse(i.error.code,r));t(r)})})},t.SourceLibHeaderValue="officejs",t}();n.OfficeJsRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){n.OfficeRequire=function(){return null}()})(t=n._Internal||(n._Internal={})),function(n){var t;(function(t){function i(){return function(){"use strict";function vt(n){return typeof n=="function"||typeof n=="object"&&n!==null}function b(n){return typeof n=="function"}function yt(n){return typeof n=="object"&&n!==null}function wt(n){k=n}function bt(n){f=n}function ni(){var t=process.nextTick,n=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&n[1]==="0"&&n[2]==="10"&&(t=setImmediate),function(){t(c)}}function tr(){return function(){pt(c)}}function ti(){var n=0,i=new it(c),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function ii(){var n=new MessageChannel;return n.port1.onmessage=c,function(){n.port2.postMessage(0)}}function ri(){return function(){setTimeout(c,1)}}function c(){for(var t,i,n=0;n=0?(n=n.substring(t+5,n.length),n<"14.14393"?!0:!1):!1}function i(){return typeof window=="undefined"&&typeof Promise=="function"?Promise:typeof window!="undefined"&&window.Promise?t()?n.PromiseImpl.Init():window.Promise:n.PromiseImpl.Init()}n.OfficePromise=i()}(t=n._Internal||(n._Internal={}));i=t.OfficePromise;n.Promise=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this._autoCleanupList={};this.m_context=n}return t.prototype.add=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._addCommon(n,!0)}):this._addCommon(n,!0)},t.prototype._autoAdd=function(n){this._addCommon(n,!1);this._autoCleanupList[n._objectPath.objectPathInfo.Id]=n},t.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(t,i){var r=this.m_context._autoCleanup&&!t[n.Constants.isTracked]&&t!==this.m_context._rootObject&&i&&!n.Utility.isNullOrEmptyString(i[n.Constants.referenceId]);r&&(this._autoCleanupList[t._objectPath.objectPathInfo.Id]=t,t[n.Constants.isTracked]=!0)},t.prototype._addCommon=function(t,i){if(t[n.Constants.isTracked]){i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id];return}var r=t[n.Constants.referenceId];n.Utility.isNullOrEmptyString(r)&&t._KeepReference&&(t._KeepReference(),n.ActionFactory.createInstantiateAction(this.m_context,t),i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id],t[n.Constants.isTracked]=!0)},t.prototype.remove=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._removeCommon(n)}):this._removeCommon(n)},t.prototype._removeCommon=function(t){var r=t[n.Constants.referenceId],i;n.Utility.isNullOrEmptyString(r)||(i=this.m_context._rootObject,i._RemoveReference&&i._RemoveReference(r),delete t[n.Constants.isTracked])},t.prototype._retrieveAndClearAutoCleanupList=function(){var n=this._autoCleanupList;return this._autoCleanupList={},n},t}();n.TrackedObjects=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){n||(n="root");this.m_globalObjName=n;this.m_referencedObjectPaths=t;this.m_actions=i;this.m_statements=[];this.m_variableNameForObjectPathMap={};this.m_variableNameToObjectPathMap={};this.m_declaredObjectPathMap={};this.m_showDispose=r}return t.prototype.process=function(){this.m_showDispose&&n.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions);for(var t=0;t=0&&this.m_statements.length>i+o+1)break;if(i<0)return null;for(f=i-o,f<0&&(f=0),e=i+1+o,e>this.m_statements.length&&(e=this.m_statements.length),r=[],f!=0&&r.push("..."),s=f;s>>>>"),r.push(this.m_statements[i]),r.push("// <<<<<"),h=i+1;h0)?(r=i.map(function(n){return u.getObjVarName(n)}).join(", "),n+" // And then dispose {"+r+"}"):n},t.prototype.buildQueryExpression=function(n){if(n.actionInfo.QueryInfo){var t={};return t.select=n.actionInfo.QueryInfo.Select,t.expand=n.actionInfo.QueryInfo.Expand,t.skip=n.actionInfo.QueryInfo.Skip,t.top=n.actionInfo.QueryInfo.Top,typeof t.top=="undefined"&&typeof t.skip=="undefined"&&typeof t.expand=="undefined"?typeof t.select=="undefined"?"":JSON.stringify(t.select):JSON.stringify(t)}return""},t.prototype.buildObjectPathExpressionWithParent=function(n){var t=n.objectPathInfo.ObjectPathType==5||n.objectPathInfo.ObjectPathType==3||n.objectPathInfo.ObjectPathType==4;return t&&n.objectPathInfo.ParentObjectPathId?this.getObjVarName(n.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(n):this.buildObjectPathExpression(n)},t.prototype.buildObjectPathExpression=function(t){switch(t.objectPathInfo.ObjectPathType){case 1:return"context."+this.m_globalObjName;case 5:return"getItem("+this.buildArgumentsExpression(t.objectPathInfo.ArgumentInfo)+")";case 3:return n.Utility._toCamelLowerCase(t.objectPathInfo.Name)+"("+this.buildArgumentsExpression(t.objectPathInfo.ArgumentInfo)+")";case 2:return t.objectPathInfo.Name+".newObject()";case 7:return"null";case 4:return n.Utility._toCamelLowerCase(t.objectPathInfo.Name);case 6:return"context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(t.objectPathInfo.Name)+")"}},t.prototype.buildArgumentsExpression=function(n){var t="",i;if(!n.Arguments)return t;for(i=0;i0&&(t=t+", "),t=t+this.buildArgumentLiteral(n.Arguments[i],n.ReferencedObjectPathIds?n.ReferencedObjectPathIds[i]:null);return t==="undefined"&&(t=""),t},t.prototype.buildArgumentLiteral=function(n,t){return typeof n=="number"&&n===t?this.getObjVarName(t):JSON.stringify(n)},t.prototype.getObjVarNameBase=function(t){var u="v",f=this.m_referencedObjectPaths[t],i,r;switch(f.objectPathInfo.ObjectPathType){case 1:u=this.m_globalObjName;break;case 4:u=n.Utility._toCamelLowerCase(f.objectPathInfo.Name);break;case 3:i=f.objectPathInfo.Name;i.length>3&&i.substr(0,3)==="Get"&&(i=i.substr(3));u=n.Utility._toCamelLowerCase(i);break;case 5:r=this.getObjVarNameBase(f.objectPathInfo.ParentObjectPathId);u=r.charAt(r.length-1)==="s"?r.substr(0,r.length-1):r+"Item";break}return u},t.prototype.getObjVarName=function(n){var t,i;if(this.m_variableNameForObjectPathMap[n])return this.m_variableNameForObjectPathMap[n];if(t=this.getObjVarNameBase(n),!this.m_variableNameToObjectPathMap[t])return this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t;for(i=1;this.m_variableNameToObjectPathMap[t+i.toString()];)i++;return t=t+i.toString(),this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t},t}();n.RequestPrettyPrinter=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.cannotRegisterEvent="CannotRegisterEvent",n.connectionFailureWithStatus="ConnectionFailureWithStatus",n.connectionFailureWithDetails="ConnectionFailureWithDetails",n.invalidObjectPath="InvalidObjectPath",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.invalidArgumentGeneric="InvalidArgumentGeneric",n.propertyNotLoaded="PropertyNotLoaded",n.runMustReturnPromise="RunMustReturnPromise",n.timeout="Timeout",n.propertyDoesNotExist="PropertyDoesNotExist",n.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",n.moreInfoInnerError="MoreInfoInnerError",n.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",n.valueNotLoaded="ValueNotLoaded",n.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage",n.invalidOperationInCellEditMode="InvalidOperationInCellEditMode",n.customFunctionDefintionMissing="CustomFunctionDefintionMissing",n.customFunctionImplementationMissing="CustomFunctionImplementationMissing",n.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars",n.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit",n.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch",n.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing",n.apiNotFoundDetails="ApiNotFoundDetails",n}();n.ResourceStrings=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.CannotRegisterEvent="The event handler cannot be registered.",n.ConnectionFailureWithStatus="The request failed with status code of {0}.",n.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}",n.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",n.InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',n.InvalidRequestContext="Cannot use the object across different request contexts.",n.PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",n.RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',n.Timeout="The operation has timed out.",n.ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.',n.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.",n.InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.",n.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions.",n.CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.",n.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods.",n.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name.",n.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.",n.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.",n.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.",n}();n.ResourceStringValues=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.buildMessageArrayForIRequestExecutor=function(i,r,u,f){var o=JSON.stringify(u.Body),e;return n.Utility.log("Request:"),n.Utility.log(o),e={},e[n.Constants.sourceLibHeader]=f,t.buildRequestMessageSafeArray(i,r,"POST","ProcessQuery",e,o)},t.buildResponseOnSuccess=function(n,t){var i={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return i.Body=JSON.parse(n),i.Headers=t,i},t.buildResponseOnError=function(i,r){var u={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return u.ErrorCode=n.ErrorCodes.generalException,u.ErrorMessage=r,i==t.OfficeJsErrorCode_ooeNoCapability?u.ErrorCode=n.ErrorCodes.accessDenied:i==t.OfficeJsErrorCode_ooeActivityLimitReached?u.ErrorCode=n.ErrorCodes.activityLimitReached:i==t.OfficeJsErrorCode_ooeInvalidOrTimedOutSession&&(u.ErrorCode=n.ErrorCodes.invalidOrTimedOutSession,u.ErrorMessage=n.Utility._getResourceString(n.ResourceStrings.invalidOrTimedOutSessionMessage)),u},t.buildHttpResponseFromOfficeJsError=function(i,r){var f=500,u={};return u.error={},u.error.code=n.ErrorCodes.generalException,u.error.message=r,i===t.OfficeJsErrorCode_ooeNoCapability?(f=403,u.error.code=n.ErrorCodes.accessDenied):i===t.OfficeJsErrorCode_ooeActivityLimitReached&&(f=429,u.error.code=n.ErrorCodes.activityLimitReached),{statusCode:f,headers:{},body:JSON.stringify(u)}},t.buildRequestMessageSafeArray=function(n,t,i,r,u,f){var e=[],o;if(u)for(o in u)e.push(o),e.push(u[o]);var s=0,h="",c="",l="";return[n,i,r,e,f,s,t,h,c,l]},t.getResponseBody=function(n){return t.getResponseBodyFromSafeArray(n.value.data)},t.getResponseHeaders=function(n){return t.getResponseHeadersFromSafeArray(n.value.data)},t.getResponseBodyFromSafeArray=function(n){var t=n[2],i;return typeof t=="string"?t:(i=t,i.join(""))},t.getResponseHeadersFromSafeArray=function(n){var i=n[1],r,t;if(!i)return null;for(r={},t=0;t0&&f.push(i);return f},t.toJson=function(n,t,i,r){var e={},u,f;for(u in t)f=t[u],typeof f!="undefined"&&(e[u]=f);for(u in i)f=i[u],typeof f!="undefined"&&(e[u]=f.toJSON());return r&&(e.items=r.map(function(n){return n.toJSON()})),e},t.throwError=function(i,r,u){throw new n._Internal.RuntimeError({code:i,message:t._getResourceString(i,r),debugInfo:u?{errorLocation:u}:undefined});},t.createRuntimeError=function(t,i,r){return new n._Internal.RuntimeError({code:t,message:i,debugInfo:{errorLocation:r}})},t._getResourceString=function(i,r){var u,e,f,o;return typeof window!="undefined"&&window.Strings&&window.Strings.OfficeOM&&(e="L_"+i,f=window.Strings.OfficeOM[e],f&&(u=f)),u||(u=n.ResourceStringValues[i]),u||(u=i),t.isNullOrUndefined(r)||(Array.isArray(r)?(o=r,u=t._formatString(u,o)):u=u.replace("{0}",r)),u},t._formatString=function(t,i){return t.replace(/\{\d\}/g,function(t){var r=parseInt(t.substr(1,t.length-2));if(r0?".":"")+i;break;case 3:i=t.normalizeName(n.objectPathInfo.Name)+"()"+(i.length>0?".":"")+i;break;case 4:i=t.normalizeName(n.objectPathInfo.Name)+(i.length>0?".":"")+i;break;case 5:i="getItem()"+(i.length>0?".":"")+i;break;case 6:i="_reference()"+(i.length>0?".":"")+i;break}n=n.parentObjectPath}return i},t._createPromiseFromResult=function(t){return new n._Internal.OfficePromise(function(n,i){n(t)})},t._createTimeoutPromise=function(t){return new n._Internal.OfficePromise(function(n,i){setTimeout(function(){n(null)},t)})},t.promisify=function(t){return new n._Internal.OfficePromise(function(n,i){var r=function(t){t.status=="failed"?i(t.error):n(t.value)};t(r)})},t._addActionResultHandler=function(n,t,i){n.context._pendingRequest.addActionResultHandler(t,i)},t._handleNavigationPropertyResults=function(n,i,r){for(var u=0;u0},t._getLocalDocumentUrlPrefixLength=function(n){for(var i=["http://document.localhost","https://document.localhost","//document.localhost"],r=n.toLowerCase().trim(),t=0;t0))for(s=i.url.substr(f+1),e=s.split("&"),u=0;u0&&(f=i.substr(0,u),e=i.substr(u+1),f=t.trim(f),e=t.trim(e),s[f.toUpperCase()]=e));return s},t._parseErrorResponse=function(i){var r=null,f,e,u;if(t.isPlainJsonObject(i.body))r=i.body;else if(!t.isNullOrEmptyString(i.body)){f=t.trim(i.body);try{r=JSON.parse(f)}catch(o){t.log("Error when parse "+f)}}return!t.isNullOrUndefined(r)&&typeof r=="object"&&r.error?(u=r.error.code,e=t._getResourceString(n.ResourceStrings.connectionFailureWithDetails,[i.statusCode.toString(),r.error.code,r.error.message])):e=t._getResourceString(n.ResourceStrings.connectionFailureWithStatus,i.statusCode.toString()),t.isNullOrEmptyString(u)&&(u=n.ErrorCodes.connectionFailure),{errorCode:u,errorMessage:e}},t._copyHeaders=function(n,t){if(n&&t)for(var i in n)t[i]=n[i]},t._toCamelLowerCase=function(n){if(t.isNullOrEmptyString(n))return n;for(var i=0;i=65&&n.charCodeAt(i)<=90;)i++;return i0&&Array.isArray(i[0])&&i.length*i[0].length>s&&ht()){for(e=Math.max(1,Math.round(s/i[0].length)),n._ValidateArraySize(i.length,i[0].length),r=0;ri.length&&(u=i.length-r),o=n.getRow(r).getBoundingRect(n.getRow(r+u-1)),h=i.slice(r,r+u),f(o.context,o,t,h);return!0}return!1}function ht(){return typeof window!="undefined"&&window.Office&&window.Office.context&&window.Office.context.requirements?window.Office.context.requirements.isSetSupported("ExcelApi",1.3):!0}function ss(t,i,r){return OfficeExtension.ClientRequestContext._runBatch("Excel.run",arguments,function(t){return new n.RequestContext(t)})}function hs(t,i){return OfficeExtension.ClientRequestContext._runExplicitBatch("Excel.runBatch",arguments,function(t){return new n.RequestContext(t)})}function yt(n){var t={BindingColumnCount:n.bindingColumnCount,BindingId:n.bindingId,BindingRowCount:n.bindingRowCount,bindingType:n.bindingType,HasHeaders:n.hasHeaders};return window.OSF.DDA.OMFactory.manufactureBinding(t,window.Microsoft.Office.WebExtension.context.document)}function lr(n,t){var r=n.headers==null,i;return i=r?n.rows:n,i=window.OSF.DDA.DataCoercion.coerceData(i,t[window.Microsoft.Office.WebExtension.Parameters.CoercionType]),i==undefined?null:i}function cs(n,t,i){var e=typeof window!="undefined"&&window.Office&&window.Office.context&&window.Office.context.diagnostics&&window.Office.context.diagnostics.version;if(!e)return!1;var o=window.Office.context.diagnostics.version,s=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/,r=s.exec(o);if(r){var u=parseInt(r[1]),f=parseInt(r[2]),h=parseInt(r[3]),c=parseInt(r[4]),l=3e3;if(u0?f=i.getOffsetRange(r,u):(f=i,e=r,o=u),Math.abs(t)==1)?f:f.getBoundingRect(i.getOffsetRange(r*t+e,u*t+o))},Object.defineProperty(k.prototype,"conditionalFormats",{get:function(){return l("Range.conditionalFormats",c,"1.6",h),this._Con||(this._Con=new n.ConditionalFormatCollection(this.context,o(this.context,this,"ConditionalFormats",!0,!1,!1))),this._Con},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"format",{get:function(){return this._F||(this._F=new n.RangeFormat(this.context,o(this.context,this,"Format",!1,!1,!1))),this._F},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"sort",{get:function(){return l("Range.sort",c,"1.2",h),this._S||(this._S=new n.RangeSort(this.context,o(this.context,this,"Sort",!1,!1,!1))),this._S},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"worksheet",{get:function(){return this._W||(this._W=new n.Worksheet(this.context,o(this.context,this,"Worksheet",!1,!1,!1))),this._W},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"address",{get:function(){return r("address",this._A,nt,this._isNull),this._A},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"addressLocal",{get:function(){return r("addressLocal",this._Ad,nt,this._isNull),this._Ad},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"cellCount",{get:function(){return r("cellCount",this._C,nt,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"columnCount",{get:function(){return r("columnCount",this._Co,nt,this._isNull),this._Co},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"columnHidden",{get:function(){return r("columnHidden",this._Col,nt,this._isNull),l("Range.columnHidden",c,"1.2",h),this._Col},set:function(n){this._Col=n;f(this.context,this,"ColumnHidden",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"columnIndex",{get:function(){return r("columnIndex",this._Colu,nt,this._isNull),this._Colu},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"formulas",{get:function(){return r("formulas",this.m_formulas,nt,this._isNull),this.m_formulas},set:function(n){(this.m_formulas=n,vt(this,"Formulas",n))||(this.m_formulas=n,f(this.context,this,"Formulas",n))},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"formulasLocal",{get:function(){return r("formulasLocal",this.m_formulasLocal,nt,this._isNull),this.m_formulasLocal},set:function(n){(this.m_formulasLocal=n,vt(this,"FormulasLocal",n))||(this.m_formulasLocal=n,f(this.context,this,"FormulasLocal",n))},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"formulasR1C1",{get:function(){return r("formulasR1C1",this.m_formulasR1C1,nt,this._isNull),l("Range.formulasR1C1",c,"1.2",h),this.m_formulasR1C1},set:function(n){(this.m_formulasR1C1=n,vt(this,"FormulasR1C1",n))||(this.m_formulasR1C1=n,f(this.context,this,"FormulasR1C1",n))},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"hidden",{get:function(){return r("hidden",this._H,nt,this._isNull),l("Range.hidden",c,"1.2",h),this._H},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"numberFormat",{get:function(){return r("numberFormat",this.m_numberFormat,nt,this._isNull),this.m_numberFormat},set:function(n){(this.m_numberFormat=n,vt(this,"NumberFormat",n))||(this.m_numberFormat=n,f(this.context,this,"NumberFormat",n))},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"rowCount",{get:function(){return r("rowCount",this._R,nt,this._isNull),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"rowHidden",{get:function(){return r("rowHidden",this._Ro,nt,this._isNull),l("Range.rowHidden",c,"1.2",h),this._Ro},set:function(n){this._Ro=n;f(this.context,this,"RowHidden",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"rowIndex",{get:function(){return r("rowIndex",this._Row,nt,this._isNull),this._Row},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"text",{get:function(){return r("text",this._T,nt,this._isNull),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"valueTypes",{get:function(){return r("valueTypes",this._V,nt,this._isNull),this._V},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"values",{get:function(){return r("values",this.m_values,nt,this._isNull),this.m_values},set:function(n){(this.m_values=n,vt(this,"Values",n))||(this.m_values=n,f(this.context,this,"Values",n))},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_ReferenceId",{get:function(){return r("_ReferenceId",this.__R,nt,this._isNull),this.__R},enumerable:!0,configurable:!0}),k.prototype.set=function(n,t){this._recursivelySet(n,t,["numberFormat","values","formulas","formulasLocal","formulasR1C1","rowHidden","columnHidden"],["format"],["conditionalFormats","sort","worksheet"])},k.prototype.update=function(n){this._recursivelyUpdate(n)},k.prototype.calculate=function(){l("Range.calculate",c,"1.6",h);s(this.context,this,"Calculate",0,[],!1)},k.prototype.clear=function(n){s(this.context,this,"Clear",0,[n],!1)},k.prototype.delete=function(n){s(this.context,this,"Delete",0,[n],!1)},k.prototype.getBoundingRect=function(i){return new n.Range(this.context,t(this.context,this,"GetBoundingRect",1,[i],!1,!0,null,!1))},k.prototype.getCell=function(i,r){return new n.Range(this.context,t(this.context,this,"GetCell",1,[i,r],!1,!0,null,!1))},k.prototype.getColumn=function(i){return new n.Range(this.context,t(this.context,this,"GetColumn",1,[i],!1,!0,null,!1))},k.prototype.getColumnsAfter=function(i){return ht()?(l("Range.getColumnsAfter",c,"1.3",h),new n.Range(this.context,t(this.context,this,"GetColumnsAfter",1,[i],!1,!0,null,!1))):(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0&&OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove"),this._getAdjacentRange("getColumnsAfter",i,this.getLastColumn(),0,1))},k.prototype.getColumnsBefore=function(i){return ht()?(l("Range.getColumnsBefore",c,"1.3",h),new n.Range(this.context,t(this.context,this,"GetColumnsBefore",1,[i],!1,!0,null,!1))):(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0&&OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove"),this._getAdjacentRange("getColumnsBefore",i,this.getColumn(0),0,-1))},k.prototype.getEntireColumn=function(){return new n.Range(this.context,t(this.context,this,"GetEntireColumn",1,[],!1,!0,null,!1))},k.prototype.getEntireRow=function(){return new n.Range(this.context,t(this.context,this,"GetEntireRow",1,[],!1,!0,null,!1))},k.prototype.getIntersection=function(i){return new n.Range(this.context,t(this.context,this,"GetIntersection",1,[i],!1,!0,null,!1))},k.prototype.getIntersectionOrNullObject=function(i){return l("Range.getIntersectionOrNullObject",c,"1.4",h),new n.Range(this.context,t(this.context,this,"GetIntersectionOrNullObject",1,[i],!1,!0,null,!1))},k.prototype.getLastCell=function(){return new n.Range(this.context,t(this.context,this,"GetLastCell",1,[],!1,!0,null,!1))},k.prototype.getLastColumn=function(){return new n.Range(this.context,t(this.context,this,"GetLastColumn",1,[],!1,!0,null,!1))},k.prototype.getLastRow=function(){return new n.Range(this.context,t(this.context,this,"GetLastRow",1,[],!1,!0,null,!1))},k.prototype.getOffsetRange=function(i,r){return new n.Range(this.context,t(this.context,this,"GetOffsetRange",1,[i,r],!1,!0,null,!1))},k.prototype.getResizedRange=function(i,r){if(!ht()){this._ensureInteger(i,"getResizedRange");this._ensureInteger(r,"getResizedRange");var u=i>=0&&r>=0?this:this.getCell(0,0);return u.getBoundingRect(this.getLastCell().getOffsetRange(i,r))}return l("Range.getResizedRange",c,"1.3",h),new n.Range(this.context,t(this.context,this,"GetResizedRange",1,[i,r],!1,!0,null,!1))},k.prototype.getRow=function(i){return new n.Range(this.context,t(this.context,this,"GetRow",1,[i],!1,!0,null,!1))},k.prototype.getRowsAbove=function(i){return ht()?(l("Range.getRowsAbove",c,"1.3",h),new n.Range(this.context,t(this.context,this,"GetRowsAbove",1,[i],!1,!0,null,!1))):(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0&&OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove"),this._getAdjacentRange("getRowsAbove",i,this.getRow(0),-1,0))},k.prototype.getRowsBelow=function(i){return ht()?(l("Range.getRowsBelow",c,"1.3",h),new n.Range(this.context,t(this.context,this,"GetRowsBelow",1,[i],!1,!0,null,!1))):(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0&&OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove"),this._getAdjacentRange("getRowsBelow",i,this.getLastRow(),1,0))},k.prototype.getUsedRange=function(i){return new n.Range(this.context,t(this.context,this,"GetUsedRange",1,[i],!1,!0,null,!1))},k.prototype.getUsedRangeOrNullObject=function(i){return l("Range.getUsedRangeOrNullObject",c,"1.4",h),new n.Range(this.context,t(this.context,this,"GetUsedRangeOrNullObject",1,[i],!1,!0,null,!1))},k.prototype.getVisibleView=function(){return l("Range.getVisibleView",c,"1.3",h),new n.RangeView(this.context,t(this.context,this,"GetVisibleView",1,[],!1,!1,null,!1))},k.prototype.insert=function(i){return new n.Range(this.context,t(this.context,this,"Insert",0,[i],!1,!0,null,!1))},k.prototype.merge=function(n){l("Range.merge",c,"1.2",h);s(this.context,this,"Merge",0,[n],!1)},k.prototype.select=function(){s(this.context,this,"Select",1,[],!1)},k.prototype.unmerge=function(){l("Range.unmerge",c,"1.2",h);s(this.context,this,"Unmerge",0,[],!1)},k.prototype._KeepReference=function(){s(this.context,this,"_KeepReference",1,[],!1)},k.prototype._ValidateArraySize=function(n,t){l("Range._ValidateArraySize",c,"1.3",h);s(this.context,this,"_ValidateArraySize",1,[n,t],!1)},k.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;v(this,t);u(t.Address)||(this._A=t.Address);u(t.AddressLocal)||(this._Ad=t.AddressLocal);u(t.CellCount)||(this._C=t.CellCount);u(t.ColumnCount)||(this._Co=t.ColumnCount);u(t.ColumnHidden)||(this._Col=t.ColumnHidden);u(t.ColumnIndex)||(this._Colu=t.ColumnIndex);u(t.Formulas)||(this.m_formulas=t.Formulas);u(t.FormulasLocal)||(this.m_formulasLocal=t.FormulasLocal);u(t.FormulasR1C1)||(this.m_formulasR1C1=t.FormulasR1C1);u(t.Hidden)||(this._H=t.Hidden);u(t.NumberFormat)||(this.m_numberFormat=t.NumberFormat);u(t.RowCount)||(this._R=t.RowCount);u(t.RowHidden)||(this._Ro=t.RowHidden);u(t.RowIndex)||(this._Row=t.RowIndex);u(t.Text)||(this._T=t.Text);u(t.ValueTypes)||(this._V=t.ValueTypes);u(t.Values)||(this.m_values=t.Values);u(t._ReferenceId)||(this.__R=t._ReferenceId);d(this,t,["conditionalFormats","ConditionalFormats","format","Format","sort","Sort","worksheet","Worksheet"])}},k.prototype.load=function(n){return p(this,n)},k.prototype.retrieve=function(n){return w(this,n)},k.prototype._handleIdResult=function(n){(i.prototype._handleIdResult.call(this,n),e(n))||u(n._ReferenceId)||(this.__R=n._ReferenceId)},k.prototype._handleRetrieveResult=function(n,t){i.prototype._handleRetrieveResult.call(this,n,t);y(this,n,t)},k.prototype.track=function(){return this.context.trackedObjects.add(this),this},k.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},k.prototype.toJSON=function(){return a(this,{address:this._A,addressLocal:this._Ad,cellCount:this._C,columnCount:this._Co,columnHidden:this._Col,columnIndex:this._Colu,formulas:this.m_formulas,formulasLocal:this.m_formulasLocal,formulasR1C1:this.m_formulasR1C1,hidden:this._H,numberFormat:this.m_numberFormat,rowCount:this._R,rowHidden:this._Ro,rowIndex:this._Row,text:this._T,values:this.m_values,valueTypes:this._V},{conditionalFormats:this._Con,format:this._F})},k.prototype.ensureUnchanged=function(n){b(this.context,this,n);return},k}(OfficeExtension.ClientObject);n.Range=ri;it="RangeView";wr=function(i){function s(){return i!==null&&i.apply(this,arguments)||this}return __extends(s,i),Object.defineProperty(s.prototype,"_className",{get:function(){return"RangeView"},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_scalarPropertyNames",{get:function(){return["numberFormat","values","text","formulas","formulasLocal","formulasR1C1","valueTypes","rowCount","columnCount","cellAddresses","index"]},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_scalarPropertyUpdateable",{get:function(){return[!0,!0,!1,!0,!0,!0,!1,!1,!1,!1,!1]},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_navigationPropertyNames",{get:function(){return["rows"]},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rows",{get:function(){return this._Ro||(this._Ro=new n.RangeViewCollection(this.context,o(this.context,this,"Rows",!0,!1,!1))),this._Ro},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"cellAddresses",{get:function(){return r("cellAddresses",this._C,it,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"columnCount",{get:function(){return r("columnCount",this._Co,it,this._isNull),this._Co},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulas",{get:function(){return r("formulas",this._F,it,this._isNull),this._F},set:function(n){this._F=n;f(this.context,this,"Formulas",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulasLocal",{get:function(){return r("formulasLocal",this._Fo,it,this._isNull),this._Fo},set:function(n){this._Fo=n;f(this.context,this,"FormulasLocal",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulasR1C1",{get:function(){return r("formulasR1C1",this._For,it,this._isNull),this._For},set:function(n){this._For=n;f(this.context,this,"FormulasR1C1",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"index",{get:function(){return r("index",this._I,it,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"numberFormat",{get:function(){return r("numberFormat",this._N,it,this._isNull),this._N},set:function(n){this._N=n;f(this.context,this,"NumberFormat",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rowCount",{get:function(){return r("rowCount",this._R,it,this._isNull),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"text",{get:function(){return r("text",this._T,it,this._isNull),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"valueTypes",{get:function(){return r("valueTypes",this._Va,it,this._isNull),this._Va},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"values",{get:function(){return r("values",this._V,it,this._isNull),this._V},set:function(n){this._V=n;f(this.context,this,"Values",n)},enumerable:!0,configurable:!0}),s.prototype.set=function(n,t){this._recursivelySet(n,t,["numberFormat","values","formulas","formulasLocal","formulasR1C1"],[],["rows"])},s.prototype.update=function(n){this._recursivelyUpdate(n)},s.prototype.getRange=function(){return new n.Range(this.context,t(this.context,this,"GetRange",1,[],!1,!0,null,!1))},s.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;v(this,t);u(t.CellAddresses)||(this._C=t.CellAddresses);u(t.ColumnCount)||(this._Co=t.ColumnCount);u(t.Formulas)||(this._F=t.Formulas);u(t.FormulasLocal)||(this._Fo=t.FormulasLocal);u(t.FormulasR1C1)||(this._For=t.FormulasR1C1);u(t.Index)||(this._I=t.Index);u(t.NumberFormat)||(this._N=t.NumberFormat);u(t.RowCount)||(this._R=t.RowCount);u(t.Text)||(this._T=t.Text);u(t.ValueTypes)||(this._Va=t.ValueTypes);u(t.Values)||(this._V=t.Values);d(this,t,["rows","Rows"])}},s.prototype.load=function(n){return p(this,n)},s.prototype.retrieve=function(n){return w(this,n)},s.prototype._handleRetrieveResult=function(n,t){i.prototype._handleRetrieveResult.call(this,n,t);y(this,n,t)},s.prototype.toJSON=function(){return a(this,{cellAddresses:this._C,columnCount:this._Co,formulas:this._F,formulasLocal:this._Fo,formulasR1C1:this._For,index:this._I,numberFormat:this._N,rowCount:this._R,text:this._T,values:this._V,valueTypes:this._Va},{rows:this._Ro})},s.prototype.ensureUnchanged=function(n){b(this.context,this,n);return},s}(OfficeExtension.ClientObject);n.RangeView=wr;br="RangeViewCollection";kr=function(i){function u(){return i!==null&&i.apply(this,arguments)||this}return __extends(u,i),Object.defineProperty(u.prototype,"_className",{get:function(){return"RangeViewCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"items",{get:function(){return r("items",this.m__items,br,this._isNull),this.m__items},enumerable:!0,configurable:!0}),u.prototype.getCount=function(){l("RangeViewCollection.getCount",c,"1.4",h);var t=s(this.context,this,"GetCount",1,[],!1),n=new OfficeExtension.ClientResult;return k(this,t,n),n},u.prototype.getItemAt=function(i){return new n.RangeView(this.context,t(this.context,this,"GetItemAt",1,[i],!1,!1,null,!1))},u.prototype._handleResult=function(t){var u,f,r,o;if((i.prototype._handleResult.call(this,t),!e(t))&&(u=t,v(this,u),!e(u[OfficeExtension.Constants.items])))for(this.m__items=[],f=u[OfficeExtension.Constants.items],r=0;r6&&i.slice(0,5)===t.DateJSONPrefix&&i.slice(-1)===t.DateJSONSuffix&&(r=new Date(parseInt(i.slice(5,-1))),r)?r:i})},t._replaceDateWithStringDate=function(n){var i=JSON.stringify(n,function(n,i){return this[n]instanceof Date?t.DateJSONPrefix+this[n].getTime()+t.DateJSONSuffix:i});return JSON.parse(i)},Object.defineProperty(t.prototype,"key",{get:function(){return r("key",this._K,ai,this._isNull),this._K},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return r("value",this.m_value,ai,this._isNull),this.m_value},set:function(n){if(!e(n)){this.m_value=n;var i=t._replaceDateWithStringDate(n);f(this.context,this,"Value",i);return}this.m_value=n;f(this.context,this,"Value",n)},enumerable:!0,configurable:!0}),t.prototype.set=function(n,t){this._recursivelySet(n,t,["value"],[],[])},t.prototype.update=function(n){this._recursivelyUpdate(n)},t.prototype.delete=function(){s(this.context,this,"Delete",0,[],!1)},t.prototype._handleResult=function(i){if(n.prototype._handleResult.call(this,i),!e(i)){var r=i;v(this,r);u(r.Key)||(this._K=r.Key);u(r.Value)||(this.m_value=r.Value,this.m_value=t.replaceStringDateWithDate(this.m_value))}},t.prototype.load=function(n){return p(this,n)},t.prototype.retrieve=function(n){return w(this,n)},t.prototype._handleRetrieveResult=function(t,i){n.prototype._handleRetrieveResult.call(this,t,i);y(this,t,i)},t.prototype.toJSON=function(){return a(this,{key:this._K,value:this.m_value},{})},t.prototype.ensureUnchanged=function(n){b(this.context,this,n);return},t}(OfficeExtension.ClientObject);wt.DateJSONPrefix="Date(";wt.DateJSONSuffix=")";n.Setting=wt;nu="NamedItemCollection";tu=function(i){function u(){return i!==null&&i.apply(this,arguments)||this}return __extends(u,i),Object.defineProperty(u.prototype,"_className",{get:function(){return"NamedItemCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"items",{get:function(){return r("items",this.m__items,nu,this._isNull),this.m__items},enumerable:!0,configurable:!0}),u.prototype.add=function(i,r,u){return l("NamedItemCollection.add",c,"1.4",h),new n.NamedItem(this.context,t(this.context,this,"Add",0,[i,r,u],!1,!0,null,!1))},u.prototype.addFormulaLocal=function(i,r,u){return l("NamedItemCollection.addFormulaLocal",c,"1.4",h),new n.NamedItem(this.context,t(this.context,this,"AddFormulaLocal",0,[i,r,u],!1,!1,null,!1))},u.prototype.getCount=function(){l("NamedItemCollection.getCount",c,"1.4",h);var t=s(this.context,this,"GetCount",1,[],!1),n=new OfficeExtension.ClientResult;return k(this,t,n),n},u.prototype.getItem=function(t){return new n.NamedItem(this.context,tt(this.context,this,[t]))},u.prototype.getItemOrNullObject=function(i){return l("NamedItemCollection.getItemOrNullObject",c,"1.4",h),new n.NamedItem(this.context,t(this.context,this,"GetItemOrNullObject",1,[i],!1,!1,null,!1))},u.prototype._handleResult=function(t){var u,f,r,o;if((i.prototype._handleResult.call(this,t),!e(t))&&(u=t,v(this,u),!e(u[OfficeExtension.Constants.items])))for(this.m__items=[],f=u[OfficeExtension.Constants.items],r=0;r"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyNames",{get:function(){return["error","value"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"error",{get:function(){return r("error",this._E,sr,this._isNull),this._E},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return r("value",this._V,sr,this._isNull),this._V},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){if(n.prototype._handleResult.call(this,t),!e(t)){var i=t;v(this,i);u(i.Error)||(this._E=i.Error);u(i.Value)||(this._V=i.Value)}},t.prototype.load=function(n){return p(this,n)},t.prototype.retrieve=function(n){return w(this,n)},t.prototype._handleRetrieveResult=function(t,i){n.prototype._handleRetrieveResult.call(this,t,i);y(this,t,i)},t.prototype.toJSON=function(){return a(this,{error:this._E,value:this._V},{})},t.prototype.ensureUnchanged=function(n){b(this.context,this,n);return},t}(OfficeExtension.ClientObject);n.FunctionResult=i;al="Functions";us=function(n){function r(){return n!==null&&n.apply(this,arguments)||this}return __extends(r,n),Object.defineProperty(r.prototype,"_className",{get:function(){return"Functions"},enumerable:!0,configurable:!0}),r.prototype.abs=function(n){return new i(this.context,t(this.context,this,"Abs",0,[n],!1,!0,null,!1))},r.prototype.accrInt=function(n,r,u,f,e,o,s,h){return new i(this.context,t(this.context,this,"AccrInt",0,[n,r,u,f,e,o,s,h],!1,!0,null,!1))},r.prototype.accrIntM=function(n,r,u,f,e){return new i(this.context,t(this.context,this,"AccrIntM",0,[n,r,u,f,e],!1,!0,null,!1))},r.prototype.acos=function(n){return new i(this.context,t(this.context,this,"Acos",0,[n],!1,!0,null,!1))},r.prototype.acosh=function(n){return new i(this.context,t(this.context,this,"Acosh",0,[n],!1,!0,null,!1))},r.prototype.acot=function(n){return new i(this.context,t(this.context,this,"Acot",0,[n],!1,!0,null,!1))},r.prototype.acoth=function(n){return new i(this.context,t(this.context,this,"Acoth",0,[n],!1,!0,null,!1))},r.prototype.amorDegrc=function(n,r,u,f,e,o,s){return new i(this.context,t(this.context,this,"AmorDegrc",0,[n,r,u,f,e,o,s],!1,!0,null,!1))},r.prototype.amorLinc=function(n,r,u,f,e,o,s){return new i(this.context,t(this.context,this,"AmorLinc",0,[n,r,u,f,e,o,s],!1,!0,null,!1))},r.prototype.and=function(){for(var r=[],n=0;n 6 && v.slice(0, 5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) { + d=new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + } + else { + value=Sys.Serialization.JavaScriptSerializer.deserialize(value, true); + } + ret[key]=value; + } + catch (ex) { + } + } + return ret; + }, loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) { if (url && callback) { var doc=window.document; @@ -837,6 +885,14 @@ OSF.OUtil=(function () { } } }, + removeClass: function OSF_OUtil$removeClass(elmt, val) { + if (OSF.OUtil.hasClass(elmt, val)) { + var className=elmt.getAttribute(_classN); + var reg=new RegExp('(\\s|^)'+val+'(\\s|$)'); + className=className.replace(reg, ''); + elmt.setAttribute(_classN, className); + } + }, hasClass: function OSF_OUtil$hasClass(elmt, clsName) { var className=elmt.getAttribute(_classN); return className && className.match(new RegExp('(\\s|^)'+clsName+'(\\s|$)')); @@ -973,6 +1029,12 @@ OSF.OUtil.Guid=(function () { })(); window.OSF=OSF; OSF.OUtil.setNamespace("OSF", window); +OSF.MessageIDs={ + "FetchBundleUrl": 0, + "LoadReactBundle": 1, + "LoadBundleSuccess": 2, + "LoadBundleError": 3 +}; OSF.AppName={ Unsupported: 0, Excel: 1, @@ -1000,7 +1062,10 @@ OSF.AppName={ OutlookAndroid: 4194304, OneNoteWinRT: 8388608, ExcelAndroid: 8388609, - VisioWebApp: 8388610 + VisioWebApp: 8388610, + OneNoteIOS: 8388611, + WordAndroid: 8388613, + PowerpointAndroid: 8388614 }; OSF.InternalPerfMarker={ DataCoercionBegin: "Agave.HostCall.CoerceDataStart", @@ -1030,7 +1095,9 @@ OSF.AgaveHostAction={ "EscExit": 15, "F2Exit": 16, "ExitNoFocusable": 17, - "ExitNoFocusableShift": 18 + "ExitNoFocusableShift": 18, + "MouseEnter": 19, + "MouseLeave": 20 }; OSF.SharedConstants={ "NotificationConversationIdSuffix": '_ntf' @@ -1166,6 +1233,8 @@ Microsoft.Office.WebExtension.Parameters={ HostType: "hostType", ForceConsent: "forceConsent", ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + Reserved: "reserved", Xml: "xml", Namespace: "namespace", Prefix: "prefix", @@ -1198,7 +1267,9 @@ Microsoft.Office.WebExtension.Parameters={ DisplayInIframe: "displayInIframe", MessageContent: "messageContent", HideTitle: "hideTitle", - AppCommandInvocationCompletedData: "appCommandInvocationCompletedData" + UseDeviceIndependentPixels: "useDeviceIndependentPixels", + AppCommandInvocationCompletedData: "appCommandInvocationCompletedData", + Base64: "base64" }; OSF.OUtil.setNamespace("DDA", OSF); OSF.DDA.DocumentMode={ @@ -1255,6 +1326,8 @@ OSF.DDA.MethodDispId={ dispidAppCommandInvocationCompletedMethod: 94, dispidCloseContainerMethod: 97, dispidGetAccessTokenMethod: 98, + dispidOpenBrowserWindow: 102, + dispidCreateDocumentMethod: 105, dispidGetSelectedTaskMethod: 110, dispidGetSelectedResourceMethod: 111, dispidGetTaskMethod: 112, @@ -1310,8 +1383,11 @@ OSF.DDA.EventDispId={ dispidObjectDataChangedEvent: 15, dispidContentControlAddedEvent: 16, dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, dispidAppCommandInvokedEvent: 39, dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, dispidTaskSelectionChangedEvent: 56, dispidResourceSelectionChangedEvent: 57, dispidViewSelectionChangedEvent: 58, @@ -1443,7 +1519,9 @@ OSF.DDA.ErrorCodeManager=(function () { ooeSSOInvalidGrant: 13005, ooeSSOClientError: 13006, ooeSSOServerError: 13007, - ooeAddinIsAlreadyRequestingToken: 13008 + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009, + ooeSSOConnectionLost: 13010 }, initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={ name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotSupported }; @@ -1541,6 +1619,8 @@ OSF.DDA.ErrorCodeManager=(function () { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={ name: stringNS.L_SSOClientError, message: stringNS.L_SSOClientErrorMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={ name: stringNS.L_SSOServerError, message: stringNS.L_SSOServerErrorMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={ name: stringNS.L_AddinIsAlreadyRequestingToken, message: stringNS.L_AddinIsAlreadyRequestingTokenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={ name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={ name: stringNS.L_SSOConnectionLostError, message: stringNS.L_SSOConnectionLostErrorMessage }; } }; })(); @@ -2242,6 +2322,11 @@ OSF.DDA.Context=function OSF_DDA_Context(officeAppContext, document, license, ap value: officeAppContext.auth }); } + if (officeAppContext.application) { + OSF.OUtil.defineEnumerableProperty(this, "application", { + value: officeAppContext.application + }); + } if (officeAppContext.get_isDialog()) { var requirements=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); OSF.OUtil.defineEnumerableProperty(this, "requirements", { @@ -2284,6 +2369,8 @@ OSF.DDA.OutlookContext=function OSF_DDA_OutlookContext(appContext, settings, lic }; OSF.OUtil.extend(OSF.DDA.OutlookContext, OSF.DDA.Context); OSF.DDA.OutlookAppOm=function OSF_DDA_OutlookAppOm(appContext, window, appReady) { }; +OSF.DDA.Application=function OSF_DDA_Application(officeAppContext) { +}; OSF.DDA.Document=function OSF_DDA_Document(officeAppContext, settings) { var mode; switch (officeAppContext.get_clientMode()) { @@ -3020,6 +3107,8 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, "ExecuteRichApiRequestAsync": did.dispidExecuteRichApiRequestMethod, "AppCommandInvocationCompletedAsync": did.dispidAppCommandInvocationCompletedMethod, "CloseContainerAsync": did.dispidCloseContainerMethod, + "OpenBrowserWindow": did.dispidOpenBrowserWindow, + "CreateDocumentAsync": did.dispidCreateDocumentMethod, "AddDataPartAsync": did.dispidAddDataPartMethod, "GetDataPartByIdAsync": did.dispidGetDataPartByIdMethod, "GetDataPartsByNameSpaceAsync": did.dispidGetDataPartsByNamespaceMethod, @@ -3059,13 +3148,13 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, } jsom=OSF.DDA.SyncMethodNames; did=OSF.DDA.MethodDispId; - var asyncMethodMap={ + var syncMethodMap={ "MessageParent": did.dispidMessageParentMethod, "SendMessage": did.dispidSendMessageMethod }; - for (var method in asyncMethodMap) { + for (var method in syncMethodMap) { if (jsom[method]) { - dispIdMap[jsom[method].id]=asyncMethodMap[method]; + dispIdMap[jsom[method].id]=syncMethodMap[method]; } } jsom=Microsoft.Office.WebExtension.EventType; @@ -3085,7 +3174,10 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, "ObjectSelectionChanged": did.dispidObjectSelectionChangedEvent, "ObjectDataChanged": did.dispidObjectDataChangedEvent, "ContentControlAdded": did.dispidContentControlAddedEvent, + "RichApiMessage": did.dispidRichApiMessageEvent, "ItemChanged": did.dispidOlkItemSelectedChangedEvent, + "RecipientsChanged": did.dispidOlkRecipientsChangedEvent, + "AppointmentTimeChanged": did.dispidOlkAppointmentTimeChangedEvent, "TaskSelectionChanged": did.dispidTaskSelectionChangedEvent, "ResourceSelectionChanged": did.dispidResourceSelectionChangedEvent, "ViewSelectionChanged": did.dispidViewSelectionChangedEvent, @@ -3161,6 +3253,7 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, else { hostCallArgs=callArgs; } + var startTime=(new Date()).getTime(); delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ "dispId": dispId, "hostCallArgs": hostCallArgs, @@ -3181,6 +3274,9 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, } var payload=asyncMethodCall.processResponse(status, responseArgs, caller, callArgs); OSF.DDA.issueAsyncResult(callArgs, status, payload); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(dispId, hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); + } } }); } @@ -3474,12 +3570,44 @@ OSF.ShowWindowDialogParameterKeys={ Width: "width", Height: "height", DisplayInIframe: "displayInIframe", - HideTitle: "hideTitle" + HideTitle: "hideTitle", + UseDeviceIndependentPixels: "useDeviceIndependentPixels" }; OSF.HostThemeButtonStyleKeys={ ButtonBorderColor: "buttonBorderColor", ButtonBackgroundColor: "buttonBackgroundColor" }; +OSF.OmexPageParameterKeys={ + AppName: "client", + AppVersion: "cv", + AppUILocale: "ui", + AppDomain: "appDomain", + StoreLocator: "rs", + AssetId: "assetid", + NotificationType: "notificationType", + AppCorrelationId: "corr", + AuthType: "authType" +}; +OSF.AuthType={ + Anonymous: 0, + MSA: 1, + OrgId: 2, + ADAL: 3 +}; +OSF.OmexMessageKeys={ + MessageType: "messageType", + MessageValue: "messageValue" +}; +OSF.OmexRemoveAddinMessageKeys={ + RemoveAddinResultCode: "resultCode", + RemoveAddinResultValue: "resultValue" +}; +OSF.OmexRemoveAddinResultCode={ + Success: 0, + ClientError: 400, + ServerError: 500, + UnknownError: 600 +}; var OfficeExt; (function (OfficeExt) { var WACUtils; @@ -3541,6 +3669,38 @@ var OfficeExt; return url_parser.protocol+"//"+url_parser.host; } WACUtils.getDomainForUrl=getDomainForUrl; + function shouldUseLocalStorageToPassMessage() { + try { + var osList=[ + "Windows NT 6.1", + "Windows NT 6.2", + "Windows NT 6.3" + ]; + var userAgent=window.navigator.userAgent; + for (var i=0, len=osList.length; i < len; i++) { + if (userAgent.indexOf(osList[i]) > -1) { + return isInternetExplorer(); + } + } + return false; + } + catch (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("Error happens in shouldUseLocalStorageToPassMessage: "+e); + return false; + } + } + WACUtils.shouldUseLocalStorageToPassMessage=shouldUseLocalStorageToPassMessage; + function isInternetExplorer() { + try { + var userAgent=window.navigator.userAgent; + return userAgent.indexOf("MSIE ") > -1 || userAgent.indexOf("Trident/") > -1 || userAgent.indexOf("Edge/") > -1; + } + catch (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("Error happens in isInternetExplorer: "+e); + return false; + } + } + WACUtils.isInternetExplorer=isInternetExplorer; })(WACUtils=OfficeExt.WACUtils || (OfficeExt.WACUtils={})); })(OfficeExt || (OfficeExt={})); var OfficeExt; @@ -3923,6 +4083,14 @@ var OfficeExt; OSF.OUtil.setNamespace("Microsoft", window); OSF.OUtil.setNamespace("Office", Microsoft); OSF.OUtil.setNamespace("Common", Microsoft.Office); +Microsoft.Office.Common.InvokeType={ + "async": 0, + "sync": 1, + "asyncRegisterEvent": 2, + "asyncUnregisterEvent": 3, + "syncRegisterEvent": 4, + "syncUnregisterEvent": 5 +}; OSF.SerializerVersion={ MsAjax: 0, Browser: 1 @@ -4858,7 +5026,9 @@ OSF.DDA.WAC.Delegate.executeAsync=function OSF_DDA_WAC_Delegate$executeAsync(arg if (args.onCalling) { args.onCalling(); } - var startTime=(new Date()).getTime(); + if (!OSF.getClientEndPoint()) { + return; + } OSF.getClientEndPoint().invoke("executeMethod", function OSF_DDA_WAC_Delegate$OMFacade$OnResponse(xdmStatus, payload) { if (args.onReceiving) { args.onReceiving(); @@ -4881,9 +5051,6 @@ OSF.DDA.WAC.Delegate.executeAsync=function OSF_DDA_WAC_Delegate$executeAsync(arg if (args.onComplete) { args.onComplete(error, payload); } - if (OSF.AppTelemetry) { - OSF.AppTelemetry.onMethodDone(args.dispId, args.hostCallArgs, Math.abs((new Date()).getTime() - startTime), error); - } }, args.hostCallArgs); }; OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent=function OSF_DDA_WAC_Delegate$GetOnAfterRegisterEvent(register, args) { @@ -4928,6 +5095,9 @@ OSF.DDA.WAC.Delegate.registerEventAsync=function OSF_DDA_WAC_Delegate$RegisterEv if (args.onCalling) { args.onCalling(); } + if (!OSF.getClientEndPoint()) { + return; + } OSF.getClientEndPoint().registerForEvent(OSF.DDA.getXdmEventName(args.targetId, args.eventType), function OSF_DDA_WACOMFacade$OnEvent(payload) { if (args.onEvent) { args.onEvent(payload); @@ -4945,6 +5115,9 @@ OSF.DDA.WAC.Delegate.unregisterEventAsync=function OSF_DDA_WAC_Delegate$Unregist if (args.onCalling) { args.onCalling(); } + if (!OSF.getClientEndPoint()) { + return; + } OSF.getClientEndPoint().unregisterForEvent(OSF.DDA.getXdmEventName(args.targetId, args.eventType), OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(false, args), { "controlId": OSF._OfficeAppFactory.getId(), "eventDispId": args.dispId, @@ -5806,7 +5979,7 @@ var OSFAriaLogger; function AriaLogger() { } AriaLogger.prototype.getAriaCDNLocation=function () { - return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry-2.8.0.min.js"); + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry.js"); }; AriaLogger.getInstance=function () { if (AriaLogger.AriaLoggerObj===undefined) { @@ -5823,13 +5996,10 @@ var OSFAriaLogger; try { if (!this.ALogger) { var OfficeExtensibilityTenantID="db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; - var configuration=new microsoft.applications.telemetry.LogConfiguration(); - configuration.enableAutoUserSession=true; - microsoft.applications.telemetry.LogManager.initialize(OfficeExtensibilityTenantID, configuration); - this.ALogger=new microsoft.applications.telemetry.Logger(); + this.ALogger=AWTLogManager.initialize(OfficeExtensibilityTenantID); } - var eventProperties=new microsoft.applications.telemetry.EventProperties(); - eventProperties.name="Office.Extensibility.OfficeJS."+tableName; + var eventProperties=new AWTEventProperties(); + eventProperties.setName("Office.Extensibility.OfficeJS."+tableName); for (var key in telemetryData) { if (key.toLowerCase() !=="table") { eventProperties.setProperty(key, telemetryData[key]); @@ -5862,6 +6032,7 @@ var OSFAppTelemetry; var sessionId=OSF.OUtil.Guid.generateNewGuid(); var osfControlAppCorrelationId=""; var omexDomainRegex=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"); + OSFAppTelemetry.enableTelemetry=true; ; var AppInfo=(function () { function AppInfo() { @@ -5945,17 +6116,19 @@ var OSFAppTelemetry; function AppLogger() { } AppLogger.prototype.LogData=function (data) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, data.SerializeRow(), OSF.Logger.SendFlag.none); - OSFAriaLogger.AriaLogger.getInstance().logData(data); + try { + OSFAriaLogger.AriaLogger.getInstance().logData(data); + } + catch (e) { + } }; AppLogger.prototype.LogRawData=function (log) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, log, OSF.Logger.SendFlag.none); try { OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)); } @@ -5995,7 +6168,7 @@ var OSFAppTelemetry; } appInfo.message=context.get_hostCustomMessage(); appInfo.officeJSVersion=OSF.ConstantNames.FileVersion; - appInfo.hostJSVersion="16.0.8119.1000"; + appInfo.hostJSVersion="16.0.8916.1000"; if (context._wacHostEnvironment) { appInfo.wacHostEnvironment=context._wacHostEnvironment; } @@ -6749,52 +6922,10 @@ OSF.DDA.SettingsManager={ DateJSONPrefix: "Date(", DataJSONSuffix: ")", serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) { - var ret={}; - for (var key in settingsCollection) { - var value=settingsCollection[key]; - try { - if (JSON) { - value=JSON.stringify(value, function dateReplacer(k, v) { - return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix+this[k].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix : v; - }); - } - else { - value=Sys.Serialization.JavaScriptSerializer.serialize(value); - } - ret[key]=value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.serializeSettings(settingsCollection); }, deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) { - var ret={}; - serializedSettings=serializedSettings || {}; - for (var key in serializedSettings) { - var value=serializedSettings[key]; - try { - if (JSON) { - value=JSON.parse(value, function dateReviver(k, v) { - var d; - if (typeof v==='string' && v && v.length > 6 && v.slice(0, 5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) { - d=new Date(parseInt(v.slice(5, -1))); - if (d) { - return d; - } - } - return v; - }); - } - else { - value=Sys.Serialization.JavaScriptSerializer.deserialize(value, true); - } - ret[key]=value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.deserializeSettings(serializedSettings); } }; OSF.DDA.Settings=function OSF_DDA_Settings(settings) { @@ -6856,14 +6987,16 @@ OSF.EventDispatch=function OSF_EventDispatch(eventTypes) { this._eventHandlers={}; this._objectEventHandlers={}; this._queuedEventsArgs={}; - for (var entry in eventTypes) { - var eventType=eventTypes[entry]; - var isObjectEvent=(eventType=="objectDeleted" || eventType=="objectSelectionChanged" || eventType=="objectDataChanged" || eventType=="contentControlAdded"); - if (!isObjectEvent) - this._eventHandlers[eventType]=[]; - else - this._objectEventHandlers[eventType]={}; - this._queuedEventsArgs[eventType]=[]; + if (eventTypes !=null) { + for (var i=0; i < eventTypes.length; i++) { + var eventType=eventTypes[i]; + var isObjectEvent=(eventType=="objectDeleted" || eventType=="objectSelectionChanged" || eventType=="objectDataChanged" || eventType=="contentControlAdded"); + if (!isObjectEvent) + this._eventHandlers[eventType]=[]; + else + this._objectEventHandlers[eventType]={}; + this._queuedEventsArgs[eventType]=[]; + } } }; OSF.EventDispatch.prototype={ @@ -6889,8 +7022,8 @@ OSF.EventDispatch.prototype={ hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) { var handlers=this._eventHandlers[eventType]; if (handlers && handlers.length > 0) { - for (var h in handlers) { - if (handlers[h]===handler) + for (var i=0; i < handlers.length; i++) { + if (handlers[i]===handler) return true; } } @@ -6995,8 +7128,9 @@ OSF.EventDispatch.prototype={ var eventType=eventArgs.type; if (eventType && this._eventHandlers[eventType]) { var eventHandlers=this._eventHandlers[eventType]; - for (var handler in eventHandlers) - eventHandlers[handler](eventArgs); + for (var i=0; i < eventHandlers.length; i++) { + eventHandlers[i](eventArgs); + } return true; } else { @@ -7093,6 +7227,9 @@ OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEve case Microsoft.Office.WebExtension.EventType.ContentControlAdded: args=new OSF.DDA.ObjectEventArgs(eventType, eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args=new OSF.DDA.RichApiMessageEventArgs(eventType, eventProperties); + break; case Microsoft.Office.WebExtension.EventType.DataNodeInserted: args=new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); break; @@ -7118,10 +7255,28 @@ OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEve args=new OSF.DDA.DialogParentEventArgs(eventProperties); break; case Microsoft.Office.WebExtension.EventType.ItemChanged: - if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlookwebapp") { + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { args=new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); target.initialize(args["initialData"]); - target.setCurrentItemNumber(args["itemNumber"].itemNumber); + if (OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]=="win32" || OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]=="mac") { + target.setCurrentItemNumber(args["itemNumber"].itemNumber); + } + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { + args=new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { + args=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); } else { throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); @@ -8967,6 +9122,54 @@ OSF.DDA.WAC.Delegate.ParameterMap.define({ { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.WAC.UniqueArguments.Data } ] }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { RichApiMessage: "richApiMessage" }); +OSF.DDA.RichApiMessageEventArgs=function OSF_DDA_RichApiMessageEventArgs(eventType, eventProperties) { + var entryArray=eventProperties[Microsoft.Office.WebExtension.Parameters.Data]; + var entries=[]; + if (entryArray) { + for (var i=0; i < entryArray.length; i++) { + var elem=entryArray[i]; + if (elem.toArray) { + elem=elem.toArray(); + } + entries.push({ + messageCategory: elem[0], + messageType: elem[1], + targetId: elem[2], + message: elem[3], + id: elem[4], + isRemoteOverride: elem[5] + }); + } + } + OSF.OUtil.defineEnumerableProperties(this, { + "type": { value: Microsoft.Office.WebExtension.EventType.RichApiMessage }, + "entries": { value: entries } + }); +}; +var OfficeExt; +(function (OfficeExt) { + var RichApiMessageManager=(function () { + function RichApiMessageManager() { + this._eventDispatch=null; + this._eventDispatch=new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.RichApiMessage, + ]); + OSF.DDA.DispIdHost.addEventSupport(this, this._eventDispatch); + } + return RichApiMessageManager; + })(); + OfficeExt.RichApiMessageManager=RichApiMessageManager; +})(OfficeExt || (OfficeExt={})); +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidRichApiMessageEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.WAC.UniqueArguments.ArrayData } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.WAC.UniqueArguments.ArrayData } + ] +}); OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FilterType, { OnlyVisible: "onlyVisible" }); var OfficeExt; (function (OfficeExt) { @@ -9359,6 +9562,13 @@ OSF.DDA.AsyncMethodCalls.define({ "types": ["boolean"], "defaultValue": false } + }, + { + name: Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels, + value: { + "types": ["boolean"], + "defaultValue": false + } } ], privateStateCallbacks: [], @@ -9396,13 +9606,13 @@ OSF.DDA.AsyncMethodCalls.define({ if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] <=0) { callArgs[Microsoft.Office.WebExtension.Parameters.Width]=1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Width]=99; } if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] <=0) { callArgs[Microsoft.Office.WebExtension.Parameters.Height]=1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Height]=99; } if (!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) { @@ -9586,6 +9796,7 @@ var OfficeExt; var showDialogCallback=null; var hasCrossZoneNotification=false; var checkWindowDialogCloseInterval=-1; + var messageParentKey="messageParentKey"; var hostThemeButtonStyle=null; var commonButtonBorderColor="#ababab"; var commonButtonBackgroundColor="#ffffff"; @@ -9594,6 +9805,7 @@ var OfficeExt; var crossZoneNotificationId="crossZoneNotification"; var configureBrowserLinkId="configureBrowserLink"; var dialogNotificationTextPanelId="dialogNotificationTextPanel"; + var shouldUseLocalStorageToPassMessage=OfficeExt.WACUtils.shouldUseLocalStorageToPassMessage(); var registerDialogNotificationShownArgs={ "dispId": OSF.DDA.EventDispId.dispidDialogNotificationShownInAddinEvent, "eventType": OSF.DDA.Marshaling.DialogNotificationShownEventType.DialogNotificationShown, @@ -9711,7 +9923,12 @@ var OfficeExt; if (windowInstance !=null && !windowInstance.closed) { windowInstance.close(); } - window.removeEventListener("message", receiveMessage); + if (shouldUseLocalStorageToPassMessage) { + window.removeEventListener("storage", storageChangedHandler); + } + else { + window.removeEventListener("message", receiveMessage); + } window.clearInterval(checkWindowDialogCloseInterval); windowInstance=null; callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); @@ -9730,10 +9947,23 @@ var OfficeExt; Dialog.closeDialog=closeDialog; function messageParent(params) { var message=params.hostCallArgs[Microsoft.Office.WebExtension.Parameters.MessageToParent]; - var appDomains=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains; - if (appDomains) { - for (var i=0; i < appDomains.length && appDomains[i].indexOf("://") !==-1; i++) { - window.opener.postMessage(message, appDomains[i]); + if (shouldUseLocalStorageToPassMessage) { + try { + var messageKey=OSF._OfficeAppFactory.getInitializationHelper()._webAppState.id+messageParentKey; + window.localStorage.setItem(messageKey, message); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Error happened during messageParent method:"+e); + } + } + } + else { + var appDomains=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains; + if (appDomains) { + for (var i=0; i < appDomains.length && appDomains[i].indexOf("://") !==-1; i++) { + window.opener.postMessage(message, appDomains[i]); + } } } } @@ -9854,6 +10084,22 @@ var OfficeExt; } } } + function storageChangedHandler(event) { + var messageKey=OSF._OfficeAppFactory.getInitializationHelper()._webAppState.id+messageParentKey; + if (event.key==messageKey) { + try { + var dialogMessageReceivedArgs={}; + dialogMessageReceivedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogMessageReceived; + dialogMessageReceivedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent]=event.newValue; + handler(dialogMessageReceivedArgs); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Error happened during storage changed handler."+e); + } + } + } + } function showDialog(dialogInfo) { var hostInfoObj=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo; var hostInfoVals=[ @@ -9871,8 +10117,8 @@ var OfficeExt; var windowName=JSON.parse(window.name); windowName[OSF.WindowNameItemKeys.HostInfo]=hostInfo; windowName[OSF.WindowNameItemKeys.AppContext]=appContext; - var width=dialogInfo[OSF.ShowWindowDialogParameterKeys.Width] * appContext._clientWindowWidth / 100; - var height=dialogInfo[OSF.ShowWindowDialogParameterKeys.Height] * appContext._clientWindowHeight / 100; + var width=dialogInfo[OSF.ShowWindowDialogParameterKeys.Width] * screen.width / 100; + var height=dialogInfo[OSF.ShowWindowDialogParameterKeys.Height] * screen.height / 100; var left=appContext._clientWindowWidth / 2 - width / 2; var top=appContext._clientWindowHeight / 2 - height / 2; var windowSpecs="width="+width+", height="+height+", left="+left+", top="+top+",channelmode=no,directories=no,fullscreen=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=yes,toolbar=no"; @@ -9884,12 +10130,22 @@ var OfficeExt; showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone); return; } - window.addEventListener("message", receiveMessage); + if (shouldUseLocalStorageToPassMessage) { + window.addEventListener("storage", storageChangedHandler); + } + else { + window.addEventListener("message", receiveMessage); + } function checkWindowClose() { try { if (windowInstance==null || windowInstance.closed) { window.clearInterval(checkWindowDialogCloseInterval); - window.removeEventListener("message", receiveMessage); + if (shouldUseLocalStorageToPassMessage) { + window.removeEventListener("storage", storageChangedHandler); + } + else { + window.removeEventListener("message", receiveMessage); + } var dialogClosedArgs={}; dialogClosedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogClosed; handler(dialogClosedArgs); @@ -10081,7 +10337,14 @@ OSF.DDA.WAC.Delegate.openDialog=function OSF_DDA_WAC_Delegate$OpenDialog(args) { var callback=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(true, args); function showDialogCallback(status) { var payload={ "Error": status }; - callback(Microsoft.Office.Common.InvokeResultCode.noError, payload); + try { + callback(Microsoft.Office.Common.InvokeResultCode.noError, payload); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Exception happens at showDialogCallback."+e); + } + } } if (OSF.DialogShownStatus.hasDialogShown) { showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened); @@ -10136,7 +10399,14 @@ OSF.DDA.WAC.Delegate.closeDialog=function OSF_DDA_WAC_Delegate$CloseDialog(args) var callback=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(false, args); function closeDialogCallback(status) { var payload={ "Error": status }; - callback(Microsoft.Office.Common.InvokeResultCode.noError, payload); + try { + callback(Microsoft.Office.Common.InvokeResultCode.noError, payload); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Exception happens at closeDialogCallback."+e); + } + } } if (!OSF.DialogShownStatus.hasDialogShown) { closeDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeWebDialogClosed); @@ -10179,6 +10449,13 @@ OSF.DDA.AsyncMethodCalls.define({ "types": ["boolean"], "defaultValue": false } + }, + { + name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, + value: { + "types": ["string"], + "defaultValue": "" + } } ], onSucceeded: function (dataDescriptor, caller, callArgs) { @@ -10190,16 +10467,21 @@ OSF.OUtil.setNamespace("Marshaling", OSF.DDA); OSF.OUtil.setNamespace("SingleSignOn", OSF.DDA.Marshaling); OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys={ ForceConsent: "forceConsent", - ForceAddAccount: "forceAddAccount" + ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge" +}; +OSF.DDA.Marshaling.SingleSignOn.AccessTokenResultKeys={ + AccessToken: "accessToken" }; OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.MethodDispId.dispidGetAccessTokenMethod, toHost: [ { name: Microsoft.Office.WebExtension.Parameters.ForceConsent, value: OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.ForceConsent }, - { name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, value: OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.ForceAddAccount } + { name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, value: OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.ForceAddAccount }, + { name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, value: OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.AuthChallenge } ], fromHost: [ - { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.WAC.Delegate.ParameterMap.self } + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.Marshaling.SingleSignOn.AccessTokenResultKeys.AccessToken } ] }); OSF.DDA.WAC.Delegate.ParameterMap.setDynamicType(Microsoft.Office.WebExtension.Parameters.Data, (function () { @@ -10249,6 +10531,7 @@ OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function OSF OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM); appContext.doc=new OSF.DDA.ExcelDocument(appContext, this._initializeSettings(appContext, true)); OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi, [OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]); + OSF.DDA.RichApi.richApiMessageManager=new OfficeExt.RichApiMessageManager(); appReady(); }; OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize=function OSF_InitializationHelper$prepareRightBeforeWebExtensionInitialize(appContext) { @@ -10277,9 +10560,10 @@ var __extends=(this && this.__extends) || function (d, b) { var OfficeExtension; (function (OfficeExtension) { var Action=(function () { - function Action(actionInfo, isWriteOperation) { + function Action(actionInfo, isWriteOperation, isRestrictedResourceAccess) { this.m_actionInfo=actionInfo; this.m_isWriteOperation=isWriteOperation; + this.m_isRestrictedResourceAccess=isRestrictedResourceAccess; } Object.defineProperty(Action.prototype, "actionInfo", { get: function () { @@ -10295,12 +10579,30 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(Action.prototype, "isRestrictedResourceAccess", { + get: function () { + return this.m_isRestrictedResourceAccess; + }, + enumerable: true, + configurable: true + }); return Action; }()); OfficeExtension.Action=Action; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + var TraceMarkerActionResultHandler=(function () { + function TraceMarkerActionResultHandler(callback) { + this.m_callback=callback; + } + TraceMarkerActionResultHandler.prototype._handleResult=function (value) { + if (this.m_callback) { + this.m_callback(); + } + }; + return TraceMarkerActionResultHandler; + }()); var ActionFactory=(function () { function ActionFactory() { } @@ -10316,13 +10618,17 @@ var OfficeExtension; var args=[value]; var referencedArgumentObjectPaths=OfficeExtension.Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); OfficeExtension.Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); - var ret=new OfficeExtension.Action(actionInfo, true); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + context._pendingRequest.ensureInstantiateObjectPaths(referencedArgumentObjectPaths); + var ret=new OfficeExtension.Action(actionInfo, true, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); context._pendingRequest.addReferencedObjectPaths(referencedArgumentObjectPaths); + ret.referencedObjectPath=parent._objectPath; + ret.referencedArgumentObjectPaths=referencedArgumentObjectPaths; return ret; }; - ActionFactory.createMethodAction=function (context, parent, methodName, operationType, args) { + ActionFactory.createMethodAction=function (context, parent, methodName, operationType, args, isRestrictedResourceAccess) { OfficeExtension.Utility.validateObjectPath(parent); var actionInfo={ Id: context._nextId(), @@ -10333,15 +10639,20 @@ var OfficeExtension; }; var referencedArgumentObjectPaths=OfficeExtension.Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); OfficeExtension.Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + context._pendingRequest.ensureInstantiateObjectPaths(referencedArgumentObjectPaths); var isWriteOperation=operationType !=1; - var ret=new OfficeExtension.Action(actionInfo, isWriteOperation); + var ret=new OfficeExtension.Action(actionInfo, isWriteOperation, isRestrictedResourceAccess); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); context._pendingRequest.addReferencedObjectPaths(referencedArgumentObjectPaths); + ret.referencedObjectPath=parent._objectPath; + ret.referencedArgumentObjectPaths=referencedArgumentObjectPaths; return ret; }; ActionFactory.createQueryAction=function (context, parent, queryOption) { OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); var actionInfo={ Id: context._nextId(), ActionType: 2, @@ -10349,13 +10660,15 @@ var OfficeExtension; ObjectPathId: parent._objectPath.objectPathInfo.Id, }; actionInfo.QueryInfo=queryOption; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; return ret; }; ActionFactory.createRecursiveQueryAction=function (context, parent, query) { OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); var actionInfo={ Id: context._nextId(), ActionType: 6, @@ -10363,23 +10676,59 @@ var OfficeExtension; ObjectPathId: parent._objectPath.objectPathInfo.Id, RecursiveQueryInfo: query }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; + return ret; + }; + ActionFactory.createQueryAsJsonAction=function (context, parent, queryOption) { + OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + var actionInfo={ + Id: context._nextId(), + ActionType: 7, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + }; + actionInfo.QueryInfo=queryOption; + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; + return ret; + }; + ActionFactory.createEnsureUnchangedAction=function (context, parent, objectState) { + OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + var actionInfo={ + Id: context._nextId(), + ActionType: 8, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }; + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; return ret; }; ActionFactory.createInstantiateAction=function (context, obj) { OfficeExtension.Utility.validateObjectPath(obj); + context._pendingRequest.ensureInstantiateObjectPath(obj._objectPath.parentObjectPath); + context._pendingRequest.ensureInstantiateObjectPaths(obj._objectPath.argumentObjectPaths); var actionInfo={ Id: context._nextId(), ActionType: 1, Name: "", ObjectPathId: obj._objectPath.objectPathInfo.Id }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(obj._objectPath); context._pendingRequest.addActionResultHandler(ret, new OfficeExtension.InstantiateActionResultHandler(obj)); + ret.referencedObjectPath=obj._objectPath; return ret; }; ActionFactory.createTraceAction=function (context, message, addTraceMessage) { @@ -10389,13 +10738,17 @@ var OfficeExtension; Name: "Trace", ObjectPathId: 0 }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); if (addTraceMessage) { context._pendingRequest.addTrace(actionInfo.Id, message); } return ret; }; + ActionFactory.createTraceMarkerForCallback=function (context, callback) { + var action=ActionFactory.createTraceAction(context, null, false); + context._pendingRequest.addActionResultHandler(action, new TraceMarkerActionResultHandler(callback)); + }; return ActionFactory; }()); OfficeExtension.ActionFactory=ActionFactory; @@ -10473,6 +10826,7 @@ var OfficeExtension; }; ClientObject.prototype._recursivelySet=function (input, options, scalarWriteablePropertyNames, objectPropertyNames, notAllowedToBeSetPropertyNames) { var isClientObject=(input instanceof ClientObject); + var originalInput=input; if (isClientObject) { if (Object.getPrototypeOf(this)===Object.getPrototypeOf(input)) { input=JSON.parse(JSON.stringify(input)); @@ -10489,31 +10843,38 @@ var OfficeExtension; for (var i=0; i < scalarWriteablePropertyNames.length; i++) { prop=scalarWriteablePropertyNames[i]; if (input.hasOwnProperty(prop)) { - this[prop]=input[prop]; + if (typeof input[prop] !=="undefined") { + this[prop]=input[prop]; + } } } for (var i=0; i < objectPropertyNames.length; i++) { prop=objectPropertyNames[i]; if (input.hasOwnProperty(prop)) { - this[prop].set(input[prop], options); + if (typeof input[prop] !=="undefined") { + var dataToPassToSet=isClientObject ? originalInput[prop] : input[prop]; + this[prop].set(dataToPassToSet, options); + } } } + var throwOnReadOnly=!isClientObject; + if (options && !OfficeExtension.Utility.isNullOrUndefined(throwOnReadOnly)) { + throwOnReadOnly=options.throwOnReadOnly; + } for (var i=0; i < notAllowedToBeSetPropertyNames.length; i++) { prop=notAllowedToBeSetPropertyNames[i]; if (input.hasOwnProperty(prop)) { - throw new OfficeExtension._Internal.RuntimeError({ - code: OfficeExtension.ErrorCodes.invalidArgument, - message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), - debugInfo: { - errorLocation: prop - } - }); + if (typeof input[prop] !=="undefined" && throwOnReadOnly) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.invalidArgument, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), + debugInfo: { + errorLocation: prop + } + }); + } } } - var throwOnReadOnly=!isClientObject; - if (options && !OfficeExtension.Utility.isNullOrUndefined(throwOnReadOnly)) { - throwOnReadOnly=options.throwOnReadOnly; - } for (prop in input) { if (scalarWriteablePropertyNames.indexOf(prop) < 0 && objectPropertyNames.indexOf(prop) < 0) { var propertyDescriptor=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this), prop); @@ -10561,12 +10922,14 @@ var OfficeExtension; this.m_actions=[]; this.m_actionResultHandler={}; this.m_referencedObjectPaths={}; + this.m_instantiatedObjectPaths={}; this.m_flags=0; this.m_traceInfos={}; this.m_pendingProcessEventHandlers=[]; this.m_pendingEventHandlerActions={}; this.m_responseTraceIds={}; this.m_responseTraceMessages=[]; + this.m_preSyncPromises=[]; } Object.defineProperty(ClientRequest.prototype, "flags", { get: function () { @@ -10612,7 +10975,13 @@ var OfficeExtension; if (action.isWriteOperation) { this.m_flags=this.m_flags | 1; } + if (action.isRestrictedResourceAccess) { + this.m_flags=this.m_flags | 2; + } this.m_actions.push(action); + if (action.actionInfo.ActionType==1) { + this.m_instantiatedObjectPaths[action.actionInfo.ObjectPathId]=action; + } }; Object.defineProperty(ClientRequest.prototype, "hasActions", { get: function () { @@ -10621,12 +10990,42 @@ var OfficeExtension; enumerable: true, configurable: true }); + ClientRequest.prototype._getLastAction=function () { + return this.m_actions[this.m_actions.length - 1]; + }; ClientRequest.prototype.addTrace=function (actionId, message) { this.m_traceInfos[actionId]=message; }; - ClientRequest.prototype.addReferencedObjectPath=function (objectPath) { - if (this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]) { - return; + ClientRequest.prototype.ensureInstantiateObjectPath=function (objectPath) { + if (objectPath) { + if (this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + this.ensureInstantiateObjectPath(objectPath.parentObjectPath); + this.ensureInstantiateObjectPaths(objectPath.argumentObjectPaths); + if (!this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + var actionInfo={ + Id: this.m_context._nextId(), + ActionType: 1, + Name: "", + ObjectPathId: objectPath.objectPathInfo.Id + }; + var instantiateAction=new OfficeExtension.Action(actionInfo, false, false); + instantiateAction.referencedObjectPath=objectPath; + this.addAction(instantiateAction); + } + } + }; + ClientRequest.prototype.ensureInstantiateObjectPaths=function (objectPaths) { + if (objectPaths) { + for (var i=0; i < objectPaths.length; i++) { + this.ensureInstantiateObjectPath(objectPaths[i]); + } + } + }; + ClientRequest.prototype.addReferencedObjectPath=function (objectPath) { + if (this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]) { + return; } if (!objectPath.isValid) { throw new OfficeExtension._Internal.RuntimeError({ @@ -10641,6 +11040,9 @@ var OfficeExtension; if (objectPath.isWriteOperation) { this.m_flags=this.m_flags | 1; } + if (objectPath.isRestrictedResourceAccess) { + this.m_flags=this.m_flags | 2; + } this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]=objectPath; if (objectPath.objectPathInfo.ObjectPathType==3) { this.addReferencedObjectPaths(objectPath.argumentObjectPaths); @@ -10659,6 +11061,9 @@ var OfficeExtension; this.m_actionResultHandler[action.actionInfo.Id]=resultHandler; }; ClientRequest.prototype.buildRequestMessageBody=function () { + if (OfficeExtension._internalConfig.enableEarlyDispose) { + ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } var objectPaths={}; for (var i in this.m_referencedObjectPaths) { objectPaths[i]=this.m_referencedObjectPaths[i].objectPathInfo; @@ -10709,12 +11114,95 @@ var OfficeExtension; ClientRequest.prototype._getPendingEventHandlerActions=function (eventHandlers) { return this.m_pendingEventHandlerActions[eventHandlers._id]; }; + ClientRequest.prototype._addPreSyncPromise=function (value) { + this.m_preSyncPromises.push(value); + }; + Object.defineProperty(ClientRequest.prototype, "_preSyncPromises", { + get: function () { + return this.m_preSyncPromises; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_actions", { + get: function () { + return this.m_actions; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_objectPaths", { + get: function () { + return this.m_referencedObjectPaths; + }, + enumerable: true, + configurable: true + }); + ClientRequest._updateLastUsedActionIdOfObjectPathId=function (lastUsedActionIdOfObjectPathId, objectPath, actionId) { + while (objectPath) { + if (lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]) { + return; + } + lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]=actionId; + var argumentObjectPaths=objectPath.argumentObjectPaths; + if (argumentObjectPaths) { + var argumentObjectPathsLength=argumentObjectPaths.length; + for (var i=0; i < argumentObjectPathsLength; i++) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, argumentObjectPaths[i], actionId); + } + } + objectPath=objectPath.parentObjectPath; + } + }; + ClientRequest._calculateLastUsedObjectPathIds=function (actions) { + var lastUsedActionIdOfObjectPathId={}; + var actionsLength=actions.length; + for (var index=actionsLength - 1; index >=0; --index) { + var action=actions[index]; + var actionId=action.actionInfo.Id; + if (action.referencedObjectPath) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, action.referencedObjectPath, actionId); + } + var referencedObjectPaths=action.referencedArgumentObjectPaths; + if (referencedObjectPaths) { + var referencedObjectPathsLength=referencedObjectPaths.length; + for (var refIndex=0; refIndex < referencedObjectPathsLength; refIndex++) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, referencedObjectPaths[refIndex], actionId); + } + } + } + var lastUsedObjectPathIdsOfAction={}; + for (var key in lastUsedActionIdOfObjectPathId) { + var actionId=lastUsedActionIdOfObjectPathId[key]; + var objectPathIds=lastUsedObjectPathIdsOfAction[actionId]; + if (!objectPathIds) { + objectPathIds=[]; + lastUsedObjectPathIdsOfAction[actionId]=objectPathIds; + } + objectPathIds.push(parseInt(key)); + } + for (var index=0; index < actionsLength; index++) { + var action=actions[index]; + var lastUsedObjectPathIds=lastUsedObjectPathIdsOfAction[action.actionInfo.Id]; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + action.actionInfo.L=lastUsedObjectPathIds; + } + else if (action.actionInfo.L) { + delete action.actionInfo.L; + } + } + }; return ClientRequest; }()); OfficeExtension.ClientRequest=ClientRequest; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + OfficeExtension._internalConfig={ + showDisposeInfoInDebugInfo: false, + enableEarlyDispose: true, + alwaysPolyfillClientObjectRetrieveMethod: false + }; var SessionBase=(function () { function SessionBase() { } @@ -10808,6 +11296,15 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(ClientRequestContext.prototype, "debugInfo", { + get: function () { + var prettyPrinter=new OfficeExtension.RequestPrettyPrinter(this._rootObjectPropertyName, this._pendingRequest._objectPaths, this._pendingRequest._actions, OfficeExtension._internalConfig.showDisposeInfoInDebugInfo); + var statements=prettyPrinter.process(); + return { pendingStatements: statements }; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ClientRequestContext.prototype, "trackedObjects", { get: function () { if (!this.m_trackedObjects) { @@ -10827,11 +11324,76 @@ var OfficeExtension; }); ClientRequestContext.prototype.load=function (clientObj, option) { OfficeExtension.Utility.validateContext(this, clientObj); - var queryOption=ClientRequestContext.parseQueryOption(option); + var queryOption=ClientRequestContext._parseQueryOption(option); var action=OfficeExtension.ActionFactory.createQueryAction(this, clientObj, queryOption); this._pendingRequest.addActionResultHandler(action, clientObj); }; - ClientRequestContext.parseQueryOption=function (option) { + ClientRequestContext.isLoadOption=function (loadOption) { + if (!OfficeExtension.Utility.isUndefined(loadOption.select) && (typeof (loadOption.select)==="string" || Array.isArray(loadOption.select))) + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.expand) && (typeof (loadOption.expand)==="string" || Array.isArray(loadOption.expand))) + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.top) && typeof (loadOption.top)==="number") + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.skip) && typeof (loadOption.skip)==="number") + return true; + for (var i in loadOption) { + return false; + } + return true; + }; + ClientRequestContext.parseStrictLoadOption=function (option) { + var ret={ Select: [] }; + ClientRequestContext.parseStrictLoadOptionHelper(ret, "", "option", option); + return ret; + }; + ClientRequestContext.combineQueryPath=function (pathPrefix, key, separator) { + if (pathPrefix.length===0) { + return key; + } + else { + return pathPrefix+separator+key; + } + }; + ClientRequestContext.parseStrictLoadOptionHelper=function (queryInfo, pathPrefix, argPrefix, option) { + for (var key in option) { + var value=option[key]; + if (key==="$all") { + if (typeof (value) !=="boolean") { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + if (value) { + queryInfo.Select.push(ClientRequestContext.combineQueryPath(pathPrefix, "*", "/")); + } + } + else if (key==="$top") { + if (typeof (value) !=="number" || pathPrefix.length > 0) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + queryInfo.Top=value; + } + else if (key==="$skip") { + if (typeof (value) !=="number" || pathPrefix.length > 0) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + queryInfo.Skip=value; + } + else { + if (typeof (value)==="boolean") { + if (value) { + queryInfo.Select.push(ClientRequestContext.combineQueryPath(pathPrefix, key, "/")); + } + } + else if (typeof (value)==="object") { + ClientRequestContext.parseStrictLoadOptionHelper(queryInfo, ClientRequestContext.combineQueryPath(pathPrefix, key, "/"), ClientRequestContext.combineQueryPath(argPrefix, key, "."), value); + } + else { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + } + } + }; + ClientRequestContext._parseQueryOption=function (option) { var queryOption={}; if (typeof (option)=="string") { var select=option; @@ -10840,41 +11402,46 @@ var OfficeExtension; else if (Array.isArray(option)) { queryOption.Select=option; } - else if (typeof (option)=="object") { + else if (typeof (option)==="object") { var loadOption=option; - if (typeof (loadOption.select)=="string") { - queryOption.Select=OfficeExtension.Utility._parseSelectExpand(loadOption.select); - } - else if (Array.isArray(loadOption.select)) { - queryOption.Select=loadOption.select; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.select)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.select"); - } - if (typeof (loadOption.expand)=="string") { - queryOption.Expand=OfficeExtension.Utility._parseSelectExpand(loadOption.expand); - } - else if (Array.isArray(loadOption.expand)) { - queryOption.Expand=loadOption.expand; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.expand)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.expand"); - } - if (typeof (loadOption.top)=="number") { - queryOption.Top=loadOption.top; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.top)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.top"); - } - if (typeof (loadOption.skip)=="number") { - queryOption.Skip=loadOption.skip; + if (ClientRequestContext.isLoadOption(loadOption)) { + if (typeof (loadOption.select)=="string") { + queryOption.Select=OfficeExtension.Utility._parseSelectExpand(loadOption.select); + } + else if (Array.isArray(loadOption.select)) { + queryOption.Select=loadOption.select; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.select)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.select"); + } + if (typeof (loadOption.expand)=="string") { + queryOption.Expand=OfficeExtension.Utility._parseSelectExpand(loadOption.expand); + } + else if (Array.isArray(loadOption.expand)) { + queryOption.Expand=loadOption.expand; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.expand)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.expand"); + } + if (typeof (loadOption.top)==="number") { + queryOption.Top=loadOption.top; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.top)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.top"); + } + if (typeof (loadOption.skip)==="number") { + queryOption.Skip=loadOption.skip; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.skip)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.skip"); + } } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.skip)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.skip"); + else { + queryOption=ClientRequestContext.parseStrictLoadOption(option); } } else if (!OfficeExtension.Utility.isNullOrUndefined(option)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option"); + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option"); } return queryOption; }; @@ -10884,7 +11451,7 @@ var OfficeExtension; } var quries={}; for (var key in options) { - quries[key]=ClientRequestContext.parseQueryOption(options[key]); + quries[key]=ClientRequestContext._parseQueryOption(options[key]); } var action=OfficeExtension.ActionFactory.createRecursiveQueryAction(this, clientObj, { Queries: quries, MaxDepth: maxDepth }); this._pendingRequest.addActionResultHandler(action, clientObj); @@ -10892,6 +11459,8 @@ var OfficeExtension; ClientRequestContext.prototype.trace=function (message) { OfficeExtension.ActionFactory.createTraceAction(this, message, true); }; + ClientRequestContext.prototype._processOfficeJsErrorResponse=function (officeJsErrorCode, response) { + }; ClientRequestContext.prototype.syncPrivateMain=function () { var _this=this; return OfficeExtension.Utility._createPromiseFromResult(null) @@ -10919,13 +11488,14 @@ var OfficeExtension; } }) .then(function () { - return _this.syncPrivate(); + var req=_this._pendingRequest; + _this.m_pendingRequest=null; + return _this.processPreSyncPromises(req) + .then(function () { return _this.syncPrivate(req); }); }); }; - ClientRequestContext.prototype.syncPrivate=function () { + ClientRequestContext.prototype.syncPrivate=function (req) { var _this=this; - var req=this._pendingRequest; - this.m_pendingRequest=null; if (!req.hasActions) { return this.processPendingEventHandlers(req); } @@ -10933,7 +11503,7 @@ var OfficeExtension; var requestFlags=req.flags; if (!this._requestExecutor) { if (OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)) { - this._requestExecutor=new OfficeExtension.OfficeJsRequestExecutor(); + this._requestExecutor=new OfficeExtension.OfficeJsRequestExecutor(this); } else { this._requestExecutor=new OfficeExtension.HttpRequestExecutor(); @@ -10951,8 +11521,10 @@ var OfficeExtension; req.invalidatePendingInvalidObjectPaths(); var errorFromResponse=null; var errorFromProcessEventHandlers=null; + this._lastSyncStart=performance.now(); return requestExecutor.executeAsync(this._customData, requestFlags, requestExecutorRequestMessage) .then(function (response) { + _this._lastSyncEnd=performance.now(); errorFromResponse=_this.processRequestExecutorResponseMessage(req, response); return _this.processPendingEventHandlers(req) .catch(function (ex) { @@ -10999,7 +11571,13 @@ var OfficeExtension; req._setResponseTraceIds(response.Body.TraceIds); } var traceMessages=req._responseTraceMessages; + var errorStatementInfo=null; if (response.Body) { + if (response.Body.Error && + response.Body.Error.ActionIndex >=0) { + var prettyPrinter=new OfficeExtension.RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions); + errorStatementInfo=prettyPrinter.processForDebugStatementInfo(response.Body.Error.ActionIndex); + } var actionResults=null; if (response.Body.Results) { actionResults=response.Body.Results; @@ -11025,13 +11603,18 @@ var OfficeExtension; }); } else if (response.Body && response.Body.Error) { + var debugInfo={ + errorLocation: response.Body.Error.Location + }; + if (errorStatementInfo) { + debugInfo.statement=errorStatementInfo.statement; + debugInfo.surroundingStatements=errorStatementInfo.surroundingStatements; + } return new OfficeExtension._Internal.RuntimeError({ code: response.Body.Error.Code, message: response.Body.Error.Message, traceMessages: traceMessages, - debugInfo: { - errorLocation: response.Body.Error.Location - } + debugInfo: debugInfo }); } return null; @@ -11047,6 +11630,17 @@ var OfficeExtension; ClientRequestContext.prototype.createProcessOneEventHandlersFunc=function (eventHandlers, req) { return function () { return eventHandlers._processRegistration(req); }; }; + ClientRequestContext.prototype.processPreSyncPromises=function (req) { + var ret=OfficeExtension.Utility._createPromiseFromResult(null); + for (var i=0; i < req._preSyncPromises.length; i++) { + var p=req._preSyncPromises[i]; + ret=ret.then(this.createProcessOneProSyncFunc(p)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneProSyncFunc=function (p) { + return function () { return p; }; + }; ClientRequestContext.prototype.sync=function (passThroughValue) { return this.syncPrivateMain().then(function () { return passThroughValue; }); }; @@ -11085,9 +11679,15 @@ var OfficeExtension; batch=receivedRunArgs[argOffset+0]; } else if (receivedRunArgs.length==argOffset+2) { - if (receivedRunArgs[argOffset+0] instanceof OfficeExtension.ClientObject) { + if (OfficeExtension.Utility.isNullOrUndefined(receivedRunArgs[argOffset+0])) { + ctxRetriever=ctxInitializer; + } + else if (receivedRunArgs[argOffset+0] instanceof OfficeExtension.ClientObject) { ctxRetriever=function () { return receivedRunArgs[argOffset+0].context; }; } + else if (receivedRunArgs[argOffset+0] instanceof ClientRequestContext) { + ctxRetriever=function () { return receivedRunArgs[argOffset+0]; }; + } else if (Array.isArray(receivedRunArgs[argOffset+0])) { var array=receivedRunArgs[argOffset+0]; if (array.length==0) { @@ -11253,6 +11853,79 @@ var OfficeExtension; return ClientResult; }()); OfficeExtension.ClientResult=ClientResult; + var RetrieveResult=(function () { + function RetrieveResult(m_proxy, m_shouldPolyfill) { + this.m_proxy=m_proxy; + this.m_shouldPolyfill=m_shouldPolyfill; + } + Object.defineProperty(RetrieveResult.prototype, "proxy", { + get: function () { + return this.m_proxy; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RetrieveResult.prototype, "data", { + get: function () { + if (!this.m_isLoaded) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.valueNotLoaded, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: "retrieveResult.data" + } + }); + } + return this.m_data; + }, + enumerable: true, + configurable: true + }); + RetrieveResult.prototype._handleResult=function (value) { + this.m_isLoaded=true; + if (typeof (value)==="object" && value && value._IsNull) { + this.m_data=null; + return; + } + if (this.m_shouldPolyfill) { + this.m_data=this.changePropertyNameToCamelLowerCase(value); + } + else { + this.m_data=value; + } + }; + RetrieveResult.prototype.changePropertyNameToCamelLowerCase=function (value) { + var charCodeUnderscore=95; + if (Array.isArray(value)) { + var ret=[]; + for (var i=0; i < value.length; i++) { + ret.push(this.changePropertyNameToCamelLowerCase(value[i])); + } + return ret; + } + else if (typeof (value)==="object" && value !==null) { + var ret={}; + for (var key in value) { + var propValue=value[key]; + if (key==="_Items") { + ret={}; + ret["items"]=this.changePropertyNameToCamelLowerCase(propValue); + break; + } + else if (key.charCodeAt(0) !==charCodeUnderscore) { + var propName=OfficeExtension.Utility._toCamelLowerCase(key); + ret[propName]=this.changePropertyNameToCamelLowerCase(propValue); + } + } + return ret; + } + else { + return value; + } + }; + return RetrieveResult; + }()); + OfficeExtension.RetrieveResult=RetrieveResult; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { @@ -11274,6 +11947,9 @@ var OfficeExtension; Constants.sourceLibHeader="SdkVersion"; Constants.embeddingPageOrigin="EmbeddingPageOrigin"; Constants.embeddingPageSessionInfo="EmbeddingPageSessionInfo"; + Constants.eventMessageCategory=65536; + Constants.eventWorkbookId="Workbook"; + Constants.eventSourceRemote="Remote"; return Constants; }()); OfficeExtension.Constants=Constants; @@ -11604,7 +12280,7 @@ var OfficeExtension; debugInfo[key]=partialDebugInfo[key]; } if (this.innerError) { - if (this.innerError instanceof OfficeExtension.Error) { + if (this.innerError instanceof OfficeExtension._Internal.RuntimeError) { debugInfo.innerError=this.innerError.debugInfo; } else { @@ -11689,6 +12365,20 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(EventHandlers.prototype, "_context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_callback", { + get: function () { + return this.m_callback; + }, + enumerable: true, + configurable: true + }); EventHandlers.prototype.add=function (handler) { var action=OfficeExtension.ActionFactory.createTraceAction(this.m_context, null, false); this.m_context._pendingRequest._addPendingEventHandlerAction(this, { id: action.actionInfo.Id, handler: handler, operation: 0 }); @@ -11782,6 +12472,13 @@ var OfficeExtension; this.m_allHandlers=handlers; this.m_handler=handler; } + Object.defineProperty(EventHandlerResult.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); EventHandlerResult.prototype.remove=function () { if (this.m_allHandlers && this.m_handler) { this.m_allHandlers.remove(this.m_handler); @@ -11816,6 +12513,8 @@ var OfficeExtension; return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged, handler, callback); }); case 1: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.settings.addHandlerAsync(Office.EventType.SettingsChanged, handler, callback); }); + case 5: + return OfficeExtension.Utility.promisify(function (callback) { return OSF.DDA.RichApi.richApiMessageManager.addHandlerAsync("richApiMessage", handler, callback); }); case 13: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.ObjectDeleted, handler, { id: targetId }, callback); }); case 14: @@ -11844,6 +12543,8 @@ var OfficeExtension; return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.DocumentSelectionChanged, { handler: handler }, callback); }); case 1: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.settings.removeHandlerAsync(Office.EventType.SettingsChanged, { handler: handler }, callback); }); + case 5: + return OfficeExtension.Utility.promisify(function (callback) { return OSF.DDA.RichApi.richApiMessageManager.removeHandlerAsync("richApiMessage", { handler: handler }, callback); }); case 13: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDeleted, { id: targetId, handler: handler }, callback); }); case 14: @@ -11914,6 +12615,139 @@ var OfficeExtension; OfficeExtension.EventRegistration=EventRegistration; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var GenericEventRegistration=(function () { + function GenericEventRegistration() { + this.m_eventRegistration=new OfficeExtension.EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)); + this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this); + } + GenericEventRegistration.prototype.ready=function () { + var _this=this; + if (!this.m_ready) { + if (GenericEventRegistration._testReadyImpl) { + this.m_ready=GenericEventRegistration._testReadyImpl() + .then(function () { + _this.m_isReady=true; + }); + } + else { + this.m_ready=OfficeExtension._Internal.officeJsEventRegistration.register(5, "", this.m_richApiMessageHandler) + .then(function () { + _this.m_isReady=true; + }); + } + } + return this.m_ready; + }; + Object.defineProperty(GenericEventRegistration.prototype, "isReady", { + get: function () { + return this.m_isReady; + }, + enumerable: true, + configurable: true + }); + GenericEventRegistration.prototype.register=function (eventId, targetId, handler) { + var _this=this; + return this.ready() + .then(function () { return _this.m_eventRegistration.register(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype.unregister=function (eventId, targetId, handler) { + var _this=this; + return this.ready() + .then(function () { return _this.m_eventRegistration.unregister(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype._registerEventImpl=function (eventId, targetId) { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._unregisterEventImpl=function (eventId, targetId) { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._handleRichApiMessage=function (msg) { + if (msg && msg.entries) { + for (var entryIndex=0; entryIndex < msg.entries.length; entryIndex++) { + var entry=msg.entries[entryIndex]; + if (entry.messageCategory==OfficeExtension.Constants.eventMessageCategory) { + if (OfficeExtension.Utility._logEnabled) { + OfficeExtension.Utility.log(JSON.stringify(entry)); + } + var funcs=this.m_eventRegistration.getHandlers(entry.messageType, entry.targetId); + if (funcs.length > 0) { + var arg=JSON.parse(entry.message); + if (entry.isRemoteOverride) { + arg.source=OfficeExtension.Constants.eventSourceRemote; + } + for (var i=0; i < funcs.length; i++) { + funcs[i](arg); + } + } + } + } + } + }; + GenericEventRegistration.getGenericEventRegistration=function () { + if (!GenericEventRegistration.s_genericEventRegistration) { + GenericEventRegistration.s_genericEventRegistration=new GenericEventRegistration(); + } + return GenericEventRegistration.s_genericEventRegistration; + }; + GenericEventRegistration.richApiMessageEventCategory=65536; + return GenericEventRegistration; + }()); + function _testSetRichApiMessageReadyImpl(impl) { + GenericEventRegistration._testReadyImpl=impl; + } + OfficeExtension._testSetRichApiMessageReadyImpl=_testSetRichApiMessageReadyImpl; + function _testTriggerRichApiMessageEvent(msg) { + GenericEventRegistration.getGenericEventRegistration()._handleRichApiMessage(msg); + } + OfficeExtension._testTriggerRichApiMessageEvent=_testTriggerRichApiMessageEvent; + var GenericEventHandlers=(function (_super) { + __extends(GenericEventHandlers, _super); + function GenericEventHandlers(context, parentObject, name, eventInfo) { + _super.call(this, context, parentObject, name, eventInfo); + this.m_genericEventInfo=eventInfo; + } + GenericEventHandlers.prototype.add=function (handler) { + var _this=this; + if ((this._handlers.length==0) && this.m_genericEventInfo.registerFunc) { + this.m_genericEventInfo.registerFunc(); + } + if (!GenericEventRegistration.getGenericEventRegistration().isReady) { + this._context._pendingRequest._addPreSyncPromise(GenericEventRegistration.getGenericEventRegistration().ready()); + } + OfficeExtension.ActionFactory.createTraceMarkerForCallback(this._context, function () { + _this._handlers.push(handler); + if (_this._handlers.length==1) { + GenericEventRegistration.getGenericEventRegistration().register(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + return new OfficeExtension.EventHandlerResult(this._context, this, handler); + }; + GenericEventHandlers.prototype.remove=function (handler) { + var _this=this; + if ((this._handlers.length==1) && this.m_genericEventInfo.unregisterFunc) { + this.m_genericEventInfo.unregisterFunc(); + } + OfficeExtension.ActionFactory.createTraceMarkerForCallback(this._context, function () { + var handlers=_this._handlers; + for (var index=handlers.length - 1; index >=0; index--) { + if (handlers[index]===handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length==0) { + GenericEventRegistration.getGenericEventRegistration().unregister(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + }; + GenericEventHandlers.prototype.removeAll=function () { + }; + return GenericEventHandlers; + }(OfficeExtension.EventHandlers)); + OfficeExtension.GenericEventHandlers=GenericEventHandlers; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var HttpRequestExecutor=(function () { function HttpRequestExecutor() { @@ -11965,15 +12799,6 @@ var OfficeExtension; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { - var _Internal; - (function (_Internal) { - _Internal.OfficeRequire=function () { - if (typeof (require) !=="undefined") { - return require; - } - return null; - }(); - })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); var HttpUtility=(function () { function HttpUtility() { } @@ -11981,7 +12806,7 @@ var OfficeExtension; HttpUtility.s_customSendRequestFunc=func; }; HttpUtility.xhrSendRequestFunc=function (request) { - return new _Internal.OfficePromise(function (resolve, reject) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { var xhr=new XMLHttpRequest(); xhr.open(request.method, request.url); xhr.onload=function () { @@ -11993,7 +12818,7 @@ var OfficeExtension; resolve(resp); }; xhr.onerror=function () { - reject(new _Internal.RuntimeError({ + reject(new OfficeExtension._Internal.RuntimeError({ code: OfficeExtension.ErrorCodes.connectionFailure, message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.connectionFailureWithStatus, xhr.statusText) })); @@ -12006,34 +12831,11 @@ var OfficeExtension; xhr.send(request.body); }); }; - HttpUtility.nodejsRequestModuleSendRequestFunc=function (requestInfo) { - HttpUtility.logRequest(requestInfo); - var fetch=_Internal.OfficeRequire(HttpUtility.NodeJsRequestModuleName); - return fetch(requestInfo.url, { method: requestInfo.method, headers: requestInfo.headers, body: requestInfo.body }) - .then(function (resp) { - return resp.text() - .then(function (body) { - var statusCode=resp.status; - var headers={}; - resp.headers.forEach(function (value, name) { - headers[name]=value; - }); - var ret={ statusCode: statusCode, headers: headers, body: body }; - HttpUtility.logResponse(ret); - return ret; - }); - }); - }; HttpUtility.sendRequest=function (request) { HttpUtility.validateAndNormalizeRequest(request); var func=HttpUtility.s_customSendRequestFunc; if (!func) { - if (typeof (window)==="undefined" || typeof (XMLHttpRequest)==="undefined") { - func=HttpUtility.nodejsRequestModuleSendRequestFunc; - } - else { - func=HttpUtility.xhrSendRequestFunc; - } + func=HttpUtility.xhrSendRequestFunc; } return func(request); }; @@ -12049,7 +12851,7 @@ var OfficeExtension; HttpUtility.officeJsSendLocalDocumentRequestFunc=function (request) { request=OfficeExtension.Utility._validateLocalDocumentRequest(request); var requestSafeArray=OfficeExtension.Utility._buildRequestMessageSafeArray(request); - return new _Internal.OfficePromise(function (resolve, reject) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { OSF.DDA.RichApi.executeRichApiRequestAsync(requestSafeArray, function (asyncResult) { var response; if (asyncResult.status=="succeeded") { @@ -12069,7 +12871,7 @@ var OfficeExtension; }; HttpUtility.validateAndNormalizeRequest=function (request) { if (OfficeExtension.Utility.isNullOrUndefined(request)) { - throw _Internal.RuntimeError._createInvalidArgError({ + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError({ argumentName: "request" }); } @@ -12106,7 +12908,6 @@ var OfficeExtension; } } }; - HttpUtility.NodeJsRequestModuleName="node-fetch"; HttpUtility._logBody=false; return HttpUtility; }()); @@ -12131,14 +12932,154 @@ var OfficeExtension; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { - var ObjectPath=(function () { - function ObjectPath(objectPathInfo, parentObjectPath, isCollection, isInvalidAfterRequest) { - this.m_objectPathInfo=objectPathInfo; - this.m_parentObjectPath=parentObjectPath; - this.m_isWriteOperation=false; - this.m_isCollection=isCollection; - this.m_isInvalidAfterRequest=isInvalidAfterRequest; - this.m_isValid=true; + var HostBridgeRequestExecutor=(function () { + function HostBridgeRequestExecutor(session) { + this.m_session=session; + } + HostBridgeRequestExecutor.prototype.executeAsync=function (customData, requestFlags, requestMessage) { + var httpRequestInfo={ + url: OfficeExtension.Constants.processQuery, + method: "POST", + headers: requestMessage.Headers, + body: requestMessage.Body + }; + var message={ + id: HostBridgeSession.nextId(), + type: 1, + flags: requestFlags, + message: httpRequestInfo + }; + OfficeExtension.Utility.log(JSON.stringify(message)); + return this.m_session.sendMessageToHost(message) + .then(function (nativeBridgeResponse) { + OfficeExtension.Utility.log("Received response: "+JSON.stringify(nativeBridgeResponse)); + var responseInfo=nativeBridgeResponse.message; + var response; + if (responseInfo.statusCode===200) { + response={ ErrorCode: null, ErrorMessage: null, Headers: responseInfo.headers, Body: responseInfo.body }; + } + else { + OfficeExtension.Utility.log("Error Response:"+responseInfo.body); + var error=OfficeExtension.Utility._parseErrorResponse(responseInfo); + response={ + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null + }; + } + return response; + }); + }; + return HostBridgeRequestExecutor; + }()); + var HostBridgeSession=(function (_super) { + __extends(HostBridgeSession, _super); + function HostBridgeSession(bridge) { + var _this=this; + _super.call(this); + this.m_promiseResolver={}; + this.m_bridge=bridge; + this.m_bridge.onMessageFromHost=function (msg) { + _this.onMessageFromHost(msg); + }; + } + HostBridgeSession.prototype._resolveRequestUrlAndHeaderInfo=function () { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + HostBridgeSession.prototype._createRequestExecutorOrNull=function () { + OfficeExtension.Utility.log("NativeBridgeSession::CreateRequestExecutor"); + return new HostBridgeRequestExecutor(this); + }; + Object.defineProperty(HostBridgeSession.prototype, "eventRegistration", { + get: function () { + return OfficeExtension._Internal.officeJsEventRegistration; + }, + enumerable: true, + configurable: true + }); + HostBridgeSession.init=function (bridge) { + if (bridge && typeof (bridge)==="object") { + var session=new HostBridgeSession(bridge); + OfficeExtension.ClientRequestContext._overrideSession=session; + OfficeExtension.HttpUtility.setCustomSendLocalDocumentRequestFunc(function (request) { + var bridgeMessage={ + id: HostBridgeSession.nextId(), + type: 1, + flags: 0, + message: request + }; + return session.sendMessageToHost(bridgeMessage) + .then(function (bridgeResponse) { + var responseInfo=bridgeResponse.message; + return responseInfo; + }); + }); + } + }; + HostBridgeSession.prototype.sendMessageToHost=function (message) { + var _this=this; + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + var ret=new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { + _this.m_promiseResolver[message.id]=resolve; + }); + return ret; + }; + HostBridgeSession.prototype.onMessageFromHost=function (messageText) { + if (messageText==="test") { + if (HostBridgeTest._testFunc) { + HostBridgeTest._testFunc(); + } + } + else { + var message=JSON.parse(messageText); + if (typeof (message.id)==="number") { + var resolve=this.m_promiseResolver[message.id]; + if (resolve) { + resolve(message); + } + delete this.m_promiseResolver[message.id]; + } + } + }; + HostBridgeSession.nextId=function () { + return HostBridgeSession.s_nextId++; + }; + HostBridgeSession.s_nextId=1; + return HostBridgeSession; + }(OfficeExtension.SessionBase)); + var HostBridge=(function () { + function HostBridge() { + } + HostBridge.init=function (bridge) { + HostBridgeSession.init(bridge); + }; + return HostBridge; + }()); + OfficeExtension.HostBridge=HostBridge; + if (typeof (_richApiNativeBridge)==="object" && _richApiNativeBridge) { + HostBridge.init(_richApiNativeBridge); + } + var HostBridgeTest=(function () { + function HostBridgeTest() { + } + HostBridgeTest.setTestFunc=function (func) { + HostBridgeTest._testFunc=func; + }; + return HostBridgeTest; + }()); + OfficeExtension.HostBridgeTest=HostBridgeTest; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + var ObjectPath=(function () { + function ObjectPath(objectPathInfo, parentObjectPath, isCollection, isInvalidAfterRequest) { + this.m_objectPathInfo=objectPathInfo; + this.m_parentObjectPath=parentObjectPath; + this.m_isWriteOperation=false; + this.m_isCollection=isCollection; + this.m_isInvalidAfterRequest=isInvalidAfterRequest; + this.m_isValid=true; } Object.defineProperty(ObjectPath.prototype, "objectPathInfo", { get: function () { @@ -12157,6 +13098,16 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(ObjectPath.prototype, "isRestrictedResourceAccess", { + get: function () { + return this.m_isRestrictedResourceAccess; + }, + set: function (value) { + this.m_isRestrictedResourceAccess=value; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ObjectPath.prototype, "isCollection", { get: function () { return this.m_isCollection; @@ -12243,6 +13194,7 @@ var OfficeExtension; this.m_objectPathInfo.ObjectPathType=6; this.m_objectPathInfo.Name=referenceId; this.m_objectPathInfo.ArgumentInfo={}; + delete this.m_objectPathInfo.ParentObjectPathId; this.m_parentObjectPath=null; this.m_argumentObjectPaths=null; return; @@ -12257,15 +13209,15 @@ var OfficeExtension; if (!OfficeExtension.Utility.isNullOrUndefined(id)) { this.m_isInvalidAfterRequest=false; this.m_isValid=true; - if (parentIsCollection) { - this.m_objectPathInfo.ObjectPathType=5; - this.m_objectPathInfo.Name=""; - } - else { + if (!OfficeExtension.Utility.isNullOrEmptyString(getByIdMethodName)) { this.m_objectPathInfo.ObjectPathType=3; this.m_objectPathInfo.Name=getByIdMethodName; this.m_getByIdMethodName=null; } + else { + this.m_objectPathInfo.ObjectPathType=5; + this.m_objectPathInfo.Name=""; + } this.isWriteOperation=false; this.m_objectPathInfo.ArgumentInfo={}; this.m_objectPathInfo.ArgumentInfo.Arguments=[id]; @@ -12300,18 +13252,22 @@ var OfficeExtension; var objectPathInfo={ Id: context._nextId(), ObjectPathType: 1, Name: "" }; return new OfficeExtension.ObjectPath(objectPathInfo, null, false, false); }; - ObjectPathFactory.createNewObjectObjectPath=function (context, typeName, isCollection) { + ObjectPathFactory.createNewObjectObjectPath=function (context, typeName, isCollection, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 2, Name: typeName }; - return new OfficeExtension.ObjectPath(objectPathInfo, null, isCollection, false); + var ret=new OfficeExtension.ObjectPath(objectPathInfo, null, isCollection, false); + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; }; - ObjectPathFactory.createPropertyObjectPath=function (context, parent, propertyName, isCollection, isInvalidAfterRequest) { + ObjectPathFactory.createPropertyObjectPath=function (context, parent, propertyName, isCollection, isInvalidAfterRequest, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 4, Name: propertyName, ParentObjectPathId: parent._objectPath.objectPathInfo.Id, }; - return new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest); + var ret=new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest); + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; }; ObjectPathFactory.createIndexerObjectPath=function (context, parent, args) { var objectPathInfo={ @@ -12335,7 +13291,7 @@ var OfficeExtension; objectPathInfo.ArgumentInfo.Arguments=args; return new OfficeExtension.ObjectPath(objectPathInfo, parentObjectPath, false, false); }; - ObjectPathFactory.createMethodObjectPath=function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName) { + ObjectPathFactory.createMethodObjectPath=function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 3, @@ -12348,6 +13304,7 @@ var OfficeExtension; ret.argumentObjectPaths=argumentObjectPaths; ret.isWriteOperation=(operationType !=1); ret.getByIdMethodName=getByIdMethodName; + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; return ret; }; ObjectPathFactory.createReferenceIdObjectPath=function (context, referenceId) { @@ -12409,9 +13366,11 @@ var OfficeExtension; var OfficeExtension; (function (OfficeExtension) { var OfficeJsRequestExecutor=(function () { - function OfficeJsRequestExecutor() { + function OfficeJsRequestExecutor(context) { + this.m_context=context; } OfficeJsRequestExecutor.prototype.executeAsync=function (customData, requestFlags, requestMessage) { + var _this=this; var messageSafearray=OfficeExtension.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, OfficeJsRequestExecutor.SourceLibHeaderValue); return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { OSF.DDA.RichApi.executeRichApiRequestAsync(messageSafearray, function (result) { @@ -12423,6 +13382,7 @@ var OfficeExtension; } else { response=OfficeExtension.RichApiMessageUtility.buildResponseOnError(result.error.code, result.error.message); + _this.m_context._processOfficeJsErrorResponse(result.error.code, response); } resolve(response); }); @@ -12435,6 +13395,12 @@ var OfficeExtension; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + var _Internal; + (function (_Internal) { + _Internal.OfficeRequire=function () { + return null; + }(); + })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); var _Internal; (function (_Internal) { var PromiseImpl; @@ -12538,17 +13504,6 @@ var OfficeExtension; } lib$es6$promise$asap$$len=0; } - function lib$es6$promise$asap$$attemptVertex() { - try { - var r=require; - var vertx=r('vertx'); - lib$es6$promise$asap$$vertxNext=vertx.runOnLoop || vertx.runOnContext; - return lib$es6$promise$asap$$useVertxTimer(); - } - catch (e) { - return lib$es6$promise$asap$$useSetTimeout(); - } - } var lib$es6$promise$asap$$scheduleFlush; if (lib$es6$promise$asap$$isNode) { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useNextTick(); @@ -12559,9 +13514,6 @@ var OfficeExtension; else if (lib$es6$promise$asap$$isWorker) { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useMessageChannel(); } - else if (lib$es6$promise$asap$$browserWindow===undefined && typeof require==='function') { - lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$attemptVertex(); - } else { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useSetTimeout(); } @@ -13079,6 +14031,305 @@ var OfficeExtension; OfficeExtension.TrackedObjects=TrackedObjects; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var RequestPrettyPrinter=(function () { + function RequestPrettyPrinter(globalObjName, referencedObjectPaths, actions, showDispose) { + if (!globalObjName) { + globalObjName="root"; + } + this.m_globalObjName=globalObjName; + this.m_referencedObjectPaths=referencedObjectPaths; + this.m_actions=actions; + this.m_statements=[]; + this.m_variableNameForObjectPathMap={}; + this.m_variableNameToObjectPathMap={}; + this.m_declaredObjectPathMap={}; + this.m_showDispose=showDispose; + } + RequestPrettyPrinter.prototype.process=function () { + if (this.m_showDispose) { + OfficeExtension.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + for (var i=0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + } + return this.m_statements; + }; + RequestPrettyPrinter.prototype.processForDebugStatementInfo=function (actionIndex) { + if (this.m_showDispose) { + OfficeExtension.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + var surroundingCount=5; + this.m_statements=[]; + var oneStatement=""; + var statementIndex=-1; + for (var i=0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + if (actionIndex==i) { + statementIndex=this.m_statements.length - 1; + } + if (statementIndex >=0 && this.m_statements.length > statementIndex+surroundingCount+1) { + break; + } + } + if (statementIndex < 0) { + return null; + } + var startIndex=statementIndex - surroundingCount; + if (startIndex < 0) { + startIndex=0; + } + var endIndex=statementIndex+1+surroundingCount; + if (endIndex > this.m_statements.length) { + endIndex=this.m_statements.length; + } + var surroundingStatements=[]; + if (startIndex !=0) { + surroundingStatements.push("..."); + } + for (var i_1=startIndex; i_1 < statementIndex; i_1++) { + surroundingStatements.push(this.m_statements[i_1]); + } + surroundingStatements.push("// >>>>>"); + surroundingStatements.push(this.m_statements[statementIndex]); + surroundingStatements.push("// <<<<<"); + for (var i_2=statementIndex+1; i_2 < endIndex; i_2++) { + surroundingStatements.push(this.m_statements[i_2]); + } + if (endIndex < this.m_statements.length) { + surroundingStatements.push("..."); + } + return { + statement: this.m_statements[statementIndex], + surroundingStatements: surroundingStatements + }; + }; + RequestPrettyPrinter.prototype.processOneAction=function (action) { + var actionInfo=action.actionInfo; + switch (actionInfo.ActionType) { + case 1: + this.processInstantiateAction(action); + break; + case 3: + this.processMethodAction(action); + break; + case 2: + this.processQueryAction(action); + break; + case 7: + this.processQueryAsJsonAction(action); + break; + case 6: + this.processRecursiveQueryAction(action); + break; + case 4: + this.processSetPropertyAction(action); + break; + case 5: + this.processTraceAction(action); + break; + case 8: + this.processEnsureUnchangedAction(action); + break; + } + }; + RequestPrettyPrinter.prototype.processInstantiateAction=function (action) { + var objId=action.actionInfo.ObjectPathId; + var objPath=this.m_referencedObjectPaths[objId]; + var varName=this.getObjVarName(objId); + if (!this.m_declaredObjectPathMap[objId]) { + var statement="var "+varName+"="+this.buildObjectPathExpressionWithParent(objPath)+";"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + this.m_declaredObjectPathMap[objId]=varName; + } + else { + var statement="// Instantiate {"+varName+"}"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + } + }; + RequestPrettyPrinter.prototype.processMethodAction=function (action) { + var methodName=action.actionInfo.Name; + if (methodName==="_KeepReference") { + methodName="track"; + } + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+"."+OfficeExtension.Utility._toCamelLowerCase(methodName)+"("+this.buildArgumentsExpression(action.actionInfo.ArgumentInfo)+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAction=function (action) { + var queryExp=this.buildQueryExpression(action); + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".load("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAsJsonAction=function (action) { + var queryExp=this.buildQueryExpression(action); + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".loadJson("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processRecursiveQueryAction=function (action) { + var queryExp=""; + if (action.actionInfo.RecursiveQueryInfo) { + queryExp=JSON.stringify(action.actionInfo.RecursiveQueryInfo); + } + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".loadRecursive("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processSetPropertyAction=function (action) { + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+"."+OfficeExtension.Utility._toCamelLowerCase(action.actionInfo.Name)+"="+this.buildArgumentsExpression(action.actionInfo.ArgumentInfo)+";"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processTraceAction=function (action) { + var statement="context.trace();"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processEnsureUnchangedAction=function (action) { + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".ensureUnchanged("+JSON.stringify(action.actionInfo.ObjectState)+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.appendDisposeCommentIfRelevant=function (statement, action) { + var _this=this; + if (this.m_showDispose) { + var lastUsedObjectPathIds=action.actionInfo.L; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + var objectNamesToDispose=lastUsedObjectPathIds.map(function (item) { return _this.getObjVarName(item); }).join(", "); + return statement+" // And then dispose {"+objectNamesToDispose+"}"; + } + } + return statement; + }; + RequestPrettyPrinter.prototype.buildQueryExpression=function (action) { + if (action.actionInfo.QueryInfo) { + var option={}; + option.select=action.actionInfo.QueryInfo.Select; + option.expand=action.actionInfo.QueryInfo.Expand; + option.skip=action.actionInfo.QueryInfo.Skip; + option.top=action.actionInfo.QueryInfo.Top; + if (typeof (option.top)==="undefined" && typeof (option.skip)==="undefined" && typeof (option.expand)==="undefined") { + if (typeof (option.select)==="undefined") { + return ""; + } + else { + return JSON.stringify(option.select); + } + } + else { + return JSON.stringify(option); + } + } + return ""; + }; + RequestPrettyPrinter.prototype.buildObjectPathExpressionWithParent=function (objPath) { + var hasParent=objPath.objectPathInfo.ObjectPathType==5 || + objPath.objectPathInfo.ObjectPathType==3 || + objPath.objectPathInfo.ObjectPathType==4; + if (hasParent && objPath.objectPathInfo.ParentObjectPathId) { + return this.getObjVarName(objPath.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(objPath); + } + return this.buildObjectPathExpression(objPath); + }; + RequestPrettyPrinter.prototype.buildObjectPathExpression=function (objPath) { + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + return "context."+this.m_globalObjName; + case 5: + return "getItem("+this.buildArgumentsExpression(objPath.objectPathInfo.ArgumentInfo)+")"; + case 3: + return OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name)+"("+this.buildArgumentsExpression(objPath.objectPathInfo.ArgumentInfo)+")"; + case 2: + return objPath.objectPathInfo.Name+".newObject()"; + case 7: + return "null"; + case 4: + return OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + case 6: + return "context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(objPath.objectPathInfo.Name)+")"; + } + }; + RequestPrettyPrinter.prototype.buildArgumentsExpression=function (args) { + var ret=""; + if (!args.Arguments) { + return ret; + } + for (var i=0; i < args.Arguments.length; i++) { + if (i > 0) { + ret=ret+", "; + } + ret=ret+this.buildArgumentLiteral(args.Arguments[i], args.ReferencedObjectPathIds ? args.ReferencedObjectPathIds[i] : null); + } + if (ret==="undefined") { + ret=""; + } + return ret; + }; + RequestPrettyPrinter.prototype.buildArgumentLiteral=function (value, objectPathId) { + if (typeof value=="number" && value===objectPathId) { + return this.getObjVarName(objectPathId); + } + else { + return JSON.stringify(value); + } + }; + RequestPrettyPrinter.prototype.getObjVarNameBase=function (objectPathId) { + var ret="v"; + var objPath=this.m_referencedObjectPaths[objectPathId]; + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + ret=this.m_globalObjName; + break; + case 4: + ret=OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + break; + case 3: + var methodName=objPath.objectPathInfo.Name; + if (methodName.length > 3 && methodName.substr(0, 3)==="Get") { + methodName=methodName.substr(3); + } + ret=OfficeExtension.Utility._toCamelLowerCase(methodName); + break; + case 5: + var parentName=this.getObjVarNameBase(objPath.objectPathInfo.ParentObjectPathId); + if (parentName.charAt(parentName.length - 1)==="s") { + ret=parentName.substr(0, parentName.length - 1); + } + else { + ret=parentName+"Item"; + } + break; + } + return ret; + }; + RequestPrettyPrinter.prototype.getObjVarName=function (objectPathId) { + if (this.m_variableNameForObjectPathMap[objectPathId]) { + return this.m_variableNameForObjectPathMap[objectPathId]; + } + var ret=this.getObjVarNameBase(objectPathId); + if (!this.m_variableNameToObjectPathMap[ret]) { + this.m_variableNameForObjectPathMap[objectPathId]=ret; + this.m_variableNameToObjectPathMap[ret]=objectPathId; + return ret; + } + var i=1; + while (this.m_variableNameToObjectPathMap[ret+i.toString()]) { + i++; + } + ret=ret+i.toString(); + this.m_variableNameForObjectPathMap[objectPathId]=ret; + this.m_variableNameToObjectPathMap[ret]=objectPathId; + return ret; + }; + return RequestPrettyPrinter; + }()); + OfficeExtension.RequestPrettyPrinter=RequestPrettyPrinter; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var ResourceStrings=(function () { function ResourceStrings() { @@ -13099,6 +14350,14 @@ var OfficeExtension; ResourceStrings.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod"; ResourceStrings.valueNotLoaded="ValueNotLoaded"; ResourceStrings.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage"; + ResourceStrings.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"; + ResourceStrings.customFunctionDefintionMissing="CustomFunctionDefintionMissing"; + ResourceStrings.customFunctionImplementationMissing="CustomFunctionImplementationMissing"; + ResourceStrings.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars"; + ResourceStrings.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit"; + ResourceStrings.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch"; + ResourceStrings.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing"; + ResourceStrings.apiNotFoundDetails="ApiNotFoundDetails"; return ResourceStrings; }()); OfficeExtension.ResourceStrings=ResourceStrings; @@ -13118,7 +14377,15 @@ var OfficeExtension; ResourceStringValues.RunMustReturnPromise="The batch function passed to the \".run\" method didn't return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from \"context.sync()\"."; ResourceStringValues.Timeout="The operation has timed out."; ResourceStringValues.ValueNotLoaded="The value of the result object has not been loaded yet. Before reading the value property, call \"context.sync()\" on the associated request context."; - ResourceStringValues.invalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page."; + ResourceStringValues.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page."; + ResourceStringValues.InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again."; + ResourceStringValues.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions."; + ResourceStringValues.CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function."; + ResourceStringValues.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods."; + ResourceStringValues.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name."; + ResourceStringValues.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it."; + ResourceStringValues.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable."; + ResourceStringValues.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}."; return ResourceStringValues; }()); OfficeExtension.ResourceStringValues=ResourceStringValues; @@ -13412,6 +14679,34 @@ var OfficeExtension; }; Utility.load=function (clientObj, option) { clientObj.context.load(clientObj, option); + return clientObj; + }; + Utility.loadAndSync=function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj.context.sync().then(function () { return clientObj; }); + }; + Utility.retrieve=function (clientObj, option) { + var shouldPolyfill=OfficeExtension._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + if (typeof (window) !=="undefined" && window.Office && window.Office.context && window.Office.context.requirements) { + shouldPolyfill=!window.Office.context.requirements.isSetSupported("RichApiRuntime", "1.1"); + } + } + var result=new OfficeExtension.RetrieveResult(clientObj, shouldPolyfill); + var queryOption=OfficeExtension.ClientRequestContext._parseQueryOption(option); + var action; + if (shouldPolyfill) { + action=OfficeExtension.ActionFactory.createQueryAction(clientObj.context, clientObj, queryOption); + } + else { + action=OfficeExtension.ActionFactory.createQueryAsJsonAction(clientObj.context, clientObj, queryOption); + } + clientObj.context._pendingRequest.addActionResultHandler(action, result); + return result; + }; + Utility.retrieveAndSync=function (clientObj, option) { + var result=Utility.retrieve(clientObj, option); + return clientObj.context.sync().then(function () { return result; }); }; Utility._parseSelectExpand=function (select) { var args=[]; @@ -13432,11 +14727,32 @@ var OfficeExtension; return '*'; } var itemsSlashLength=6; - if (propertyNameLower.substr(0, itemsSlashLength)==="items/") { + var isItemsSlashOrItemsDot=propertyNameLower.substr(0, itemsSlashLength)==="items/" || + propertyNameLower.substr(0, itemsSlashLength)==="items."; + if (isItemsSlashOrItemsDot) { propertyName=propertyName.substr(itemsSlashLength); } - return propertyName.replace(new RegExp("\/items\/", "gi"), "/"); + return propertyName.replace(new RegExp("[\/\.]items[\/\.]", "gi"), "/"); + } + }; + Utility.toJson=function (clientObj, scalarProperties, navigationProperties, collectionItemsIfAny) { + var result={}; + for (var prop in scalarProperties) { + var value=scalarProperties[prop]; + if (typeof value !=="undefined") { + result[prop]=value; + } } + for (var prop in navigationProperties) { + var value=navigationProperties[prop]; + if (typeof value !=="undefined") { + result[prop]=value.toJSON(); + } + } + if (collectionItemsIfAny) { + result["items"]=collectionItemsIfAny.map(function (item) { return item.toJSON(); }); + } + return result; }; Utility.throwError=function (resourceId, arg, errorLocation) { throw new OfficeExtension._Internal.RuntimeError({ @@ -13498,6 +14814,21 @@ var OfficeExtension; }); } }; + Utility.throwIfApiNotSupported=function (apiFullName, apiSetName, apiSetVersion, hostName) { + if (!Utility._doApiNotSupportedCheck) { + return; + } + if (typeof (window) !=="undefined" && window.Office && window.Office.context) { + if (!window.Office.context.requirements.isSetSupported(apiSetName, apiSetVersion)) { + var message=Utility._getResourceString(OfficeExtension.ResourceStrings.apiNotFoundDetails, [apiFullName, apiSetName+" "+apiSetVersion, hostName]); + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.apiNotFound, + message: message, + debugInfo: { errorLocation: apiFullName } + }); + } + } + }; Utility.getObjectPathExpression=function (objectPath) { var ret=""; while (objectPath) { @@ -13647,7 +14978,10 @@ var OfficeExtension; }; Utility._parseErrorResponse=function (responseInfo) { var errorObj=null; - if (!Utility.isNullOrEmptyString(responseInfo.body)) { + if (Utility.isPlainJsonObject(responseInfo.body)) { + errorObj=responseInfo.body; + } + else if (!Utility.isNullOrEmptyString(responseInfo.body)) { var errorResponseBody=Utility.trim(responseInfo.body); try { errorObj=JSON.parse(errorResponseBody); @@ -13677,8 +15011,24 @@ var OfficeExtension; } } }; + Utility._toCamelLowerCase=function (name) { + if (Utility.isNullOrEmptyString(name)) { + return name; + } + var index=0; + while (index < name.length && name.charCodeAt(index) >=65 && name.charCodeAt(index) <=90) { + index++; + } + if (index < name.length) { + return name.substr(0, index).toLowerCase()+name.substr(index); + } + else { + return name.toLowerCase(); + } + }; Utility._logEnabled=false; Utility._synchronousCleanup=false; + Utility._doApiNotSupportedCheck=false; Utility.s_underscoreCharCode="_".charCodeAt(0); return Utility; }()); @@ -13690,59 +15040,296 @@ var __extends=(this && this.__extends) || function (d, b) { function __() { this.constructor=d; } d.prototype=b===null ? Object.create(b) : (__.prototype=b.prototype, new __()); }; -var Excel; -(function (Excel) { - function lowerCaseFirst(str) { - return str[0].toLowerCase()+str.slice(1); - } - var iconSets=["ThreeArrows", - "ThreeArrowsGray", - "ThreeFlags", - "ThreeTrafficLights1", - "ThreeTrafficLights2", - "ThreeSigns", - "ThreeSymbols", - "ThreeSymbols2", - "FourArrows", - "FourArrowsGray", - "FourRedToBlack", - "FourRating", - "FourTrafficLights", - "FiveArrows", - "FiveArrowsGray", - "FiveRating", - "FiveQuarters", - "ThreeStars", - "ThreeTriangles", - "FiveBoxes"]; - var iconNames=[["RedDownArrow", "YellowSideArrow", "GreenUpArrow"], - ["GrayDownArrow", "GraySideArrow", "GrayUpArrow"], - ["RedFlag", "YellowFlag", "GreenFlag"], - ["RedCircleWithBorder", "YellowCircle", "GreenCircle"], - ["RedTrafficLight", "YellowTrafficLight", "GreenTrafficLight"], - ["RedDiamond", "YellowTriangle", "GreenCircle"], - ["RedCrossSymbol", "YellowExclamationSymbol", "GreenCheckSymbol"], - ["RedCross", "YellowExclamation", "GreenCheck"], - ["RedDownArrow", "YellowDownInclineArrow", "YellowUpInclineArrow", "GreenUpArrow"], - ["GrayDownArrow", "GrayDownInclineArrow", "GrayUpInclineArrow", "GrayUpArrow"], - ["BlackCircle", "GrayCircle", "PinkCircle", "RedCircle"], - ["OneBar", "TwoBars", "ThreeBars", "FourBars"], - ["BlackCircleWithBorder", "RedCircleWithBorder", "YellowCircle", "GreenCircle"], - ["RedDownArrow", "YellowDownInclineArrow", "YellowSideArrow", "YellowUpInclineArrow", "GreenUpArrow"], - ["GrayDownArrow", "GrayDownInclineArrow", "GraySideArrow", "GrayUpInclineArrow", "GrayUpArrow"], - ["NoBars", "OneBar", "TwoBars", "ThreeBars", "FourBars"], - ["WhiteCircleAllWhiteQuarters", "CircleWithThreeWhiteQuarters", "CircleWithTwoWhiteQuarters", "CircleWithOneWhiteQuarter", "BlackCircle"], - ["SilverStar", "HalfGoldStar", "GoldStar"], - ["RedDownTriangle", "YellowDash", "GreenUpTriangle"], - ["NoFilledBoxes", "OneFilledBox", "TwoFilledBoxes", "ThreeFilledBoxes", "FourFilledBoxes"],]; - Excel.icons={}; - iconSets.map(function (title, i) { - var camelTitle=lowerCaseFirst(title); - Excel.icons[camelTitle]=[]; - iconNames[i].map(function (iconName, j) { - iconName=lowerCaseFirst(iconName); - var obj={ set: title, index: j }; - Excel.icons[camelTitle].push(obj); +var OfficeCore; +(function (OfficeCore) { + var _hostName="OfficeCore"; + var _defaultApiSetName="ExperimentApi"; + var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; + var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; + var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; + var _createNewObjectObjectPath=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath; + var _createChildItemObjectPathUsingIndexer=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer; + var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; + var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; + var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; + var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined=OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; + var _load=OfficeExtension.Utility.load; + var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; + var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; + var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var FlightingService=(function (_super) { + __extends(FlightingService, _super); + function FlightingService() { + _super.apply(this, arguments); + } + Object.defineProperty(FlightingService.prototype, "_className", { + get: function () { + return "FlightingService"; + }, + enumerable: true, + configurable: true + }); + FlightingService.prototype.getClientSessionId=function () { + var action=_createMethodAction(this.context, this, "GetClientSessionId", 1, []); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + FlightingService.prototype.getDeferredFlights=function () { + var action=_createMethodAction(this.context, this, "GetDeferredFlights", 1, []); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + FlightingService.prototype.getFeature=function (featureName, type, defaultValue, possibleValues) { + return new OfficeCore.ABType(this.context, _createMethodObjectPath(this.context, this, "GetFeature", 1, [featureName, type, defaultValue, possibleValues], false, false, null)); + }; + FlightingService.prototype.getFeatureGate=function (featureName, scope) { + return new OfficeCore.ABType(this.context, _createMethodObjectPath(this.context, this, "GetFeatureGate", 1, [featureName, scope], false, false, null)); + }; + FlightingService.prototype.resetOverride=function (featureName) { + _createMethodAction(this.context, this, "ResetOverride", 0, [featureName]); + }; + FlightingService.prototype.setOverride=function (featureName, type, value) { + _createMethodAction(this.context, this, "SetOverride", 0, [featureName, type, value]); + }; + FlightingService.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + FlightingService.newObject=function (context) { + var ret=new OfficeCore.FlightingService(context, _createNewObjectObjectPath(context, "Microsoft.Experiment.FlightingService", false)); + return ret; + }; + FlightingService.prototype.toJSON=function () { + return {}; + }; + return FlightingService; + }(OfficeExtension.ClientObject)); + OfficeCore.FlightingService=FlightingService; + var ABType=(function (_super) { + __extends(ABType, _super); + function ABType() { + _super.apply(this, arguments); + } + Object.defineProperty(ABType.prototype, "_className", { + get: function () { + return "ABType"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ABType.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this.m_value, "ABType", this._isNull); + return this.m_value; + }, + enumerable: true, + configurable: true + }); + ABType.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Value"])) { + this.m_value=obj["Value"]; + } + }; + ABType.prototype.load=function (option) { + _load(this, option); + return this; + }; + ABType.prototype.toJSON=function () { + return { + "value": this.m_value + }; + }; + return ABType; + }(OfficeExtension.ClientObject)); + OfficeCore.ABType=ABType; + var FeatureType; + (function (FeatureType) { + FeatureType.boolean="Boolean"; + FeatureType.integer="Integer"; + FeatureType.string="String"; + })(FeatureType=OfficeCore.FeatureType || (OfficeCore.FeatureType={})); + var ExperimentErrorCodes; + (function (ExperimentErrorCodes) { + ExperimentErrorCodes.generalException="GeneralException"; + })(ExperimentErrorCodes=OfficeCore.ExperimentErrorCodes || (OfficeCore.ExperimentErrorCodes={})); +})(OfficeCore || (OfficeCore={})); +var OfficeCore; +(function (OfficeCore) { + var RequestContext=(function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + _super.call(this, url); + } + Object.defineProperty(RequestContext.prototype, "flighting", { + get: function () { + return this.flightingService; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "telemetry", { + get: function () { + if (!this.m_telemetry) { + this.m_telemetry=OfficeCore.TelemetryService.newObject(this); + } + return this.m_telemetry; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "flightingService", { + get: function () { + if (!this.m_flightingService) { + this.m_flightingService=OfficeCore.FlightingService.newObject(this); + } + return this.m_flightingService; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeExtension.ClientRequestContext)); + OfficeCore.RequestContext=RequestContext; +})(OfficeCore || (OfficeCore={})); +var OfficeCore; +(function (OfficeCore) { + var _hostName="OfficeCore"; + var _defaultApiSetName="TelemetryApi"; + var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; + var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; + var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; + var _createNewObjectObjectPath=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath; + var _createChildItemObjectPathUsingIndexer=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer; + var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; + var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; + var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; + var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined=OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; + var _load=OfficeExtension.Utility.load; + var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; + var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; + var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var _typeTelemetryService="TelemetryService"; + var TelemetryService=(function (_super) { + __extends(TelemetryService, _super); + function TelemetryService() { + _super.apply(this, arguments); + } + Object.defineProperty(TelemetryService.prototype, "_className", { + get: function () { + return "TelemetryService"; + }, + enumerable: true, + configurable: true + }); + TelemetryService.prototype.sendTelemetryEvent=function (telemetryProperties, eventName, eventContract, eventFlags, value) { + _createMethodAction(this.context, this, "SendTelemetryEvent", 1, [telemetryProperties, eventName, eventContract, eventFlags, value], false); + }; + TelemetryService.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + TelemetryService.newObject=function (context) { + var ret=new OfficeCore.TelemetryService(context, _createNewObjectObjectPath(context, "Microsoft.Telemetry.TelemetryService", false, false)); + return ret; + }; + TelemetryService.prototype.toJSON=function () { + return {}; + }; + return TelemetryService; + }(OfficeExtension.ClientObject)); + OfficeCore.TelemetryService=TelemetryService; + var TelemetryErrorCodes; + (function (TelemetryErrorCodes) { + TelemetryErrorCodes.generalException="GeneralException"; + })(TelemetryErrorCodes=OfficeCore.TelemetryErrorCodes || (OfficeCore.TelemetryErrorCodes={})); +})(OfficeCore || (OfficeCore={})); + +var __extends=(this && this.__extends) || (function () { + var extendStatics=Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__=b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p]=b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor=d; } + d.prototype=b===null ? Object.create(b) : (__.prototype=b.prototype, new __()); + }; +})(); +var Excel; +(function (Excel) { + function lowerCaseFirst(str) { + return str[0].toLowerCase()+str.slice(1); + } + var iconSets=["ThreeArrows", + "ThreeArrowsGray", + "ThreeFlags", + "ThreeTrafficLights1", + "ThreeTrafficLights2", + "ThreeSigns", + "ThreeSymbols", + "ThreeSymbols2", + "FourArrows", + "FourArrowsGray", + "FourRedToBlack", + "FourRating", + "FourTrafficLights", + "FiveArrows", + "FiveArrowsGray", + "FiveRating", + "FiveQuarters", + "ThreeStars", + "ThreeTriangles", + "FiveBoxes"]; + var iconNames=[["RedDownArrow", "YellowSideArrow", "GreenUpArrow"], + ["GrayDownArrow", "GraySideArrow", "GrayUpArrow"], + ["RedFlag", "YellowFlag", "GreenFlag"], + ["RedCircleWithBorder", "YellowCircle", "GreenCircle"], + ["RedTrafficLight", "YellowTrafficLight", "GreenTrafficLight"], + ["RedDiamond", "YellowTriangle", "GreenCircle"], + ["RedCrossSymbol", "YellowExclamationSymbol", "GreenCheckSymbol"], + ["RedCross", "YellowExclamation", "GreenCheck"], + ["RedDownArrow", "YellowDownInclineArrow", "YellowUpInclineArrow", "GreenUpArrow"], + ["GrayDownArrow", "GrayDownInclineArrow", "GrayUpInclineArrow", "GrayUpArrow"], + ["BlackCircle", "GrayCircle", "PinkCircle", "RedCircle"], + ["OneBar", "TwoBars", "ThreeBars", "FourBars"], + ["BlackCircleWithBorder", "RedCircleWithBorder", "YellowCircle", "GreenCircle"], + ["RedDownArrow", "YellowDownInclineArrow", "YellowSideArrow", "YellowUpInclineArrow", "GreenUpArrow"], + ["GrayDownArrow", "GrayDownInclineArrow", "GraySideArrow", "GrayUpInclineArrow", "GrayUpArrow"], + ["NoBars", "OneBar", "TwoBars", "ThreeBars", "FourBars"], + ["WhiteCircleAllWhiteQuarters", "CircleWithThreeWhiteQuarters", "CircleWithTwoWhiteQuarters", "CircleWithOneWhiteQuarter", "BlackCircle"], + ["SilverStar", "HalfGoldStar", "GoldStar"], + ["RedDownTriangle", "YellowDash", "GreenUpTriangle"], + ["NoFilledBoxes", "OneFilledBox", "TwoFilledBoxes", "ThreeFilledBoxes", "FourFilledBoxes"],]; + Excel.icons={}; + iconSets.map(function (title, i) { + var camelTitle=lowerCaseFirst(title); + Excel.icons[camelTitle]=[]; + iconNames[i].map(function (iconName, j) { + iconName=lowerCaseFirst(iconName); + var obj={ set: title, index: j }; + Excel.icons[camelTitle].push(obj); Excel.icons[camelTitle][iconName]=obj; }); }); @@ -13866,18 +15453,27 @@ var Excel; return _this.m_requestUrlAndHeaderInfo; }); }; - Session.WorkbookSessionIdHeaderName="Workbook-Session-Id"; - Session.WorkbookSessionIdHeaderNameLower="workbook-session-id"; return Session; }()); + Session.WorkbookSessionIdHeaderName="Workbook-Session-Id"; + Session.WorkbookSessionIdHeaderNameLower="workbook-session-id"; Excel.Session=Session; var RequestContext=(function (_super) { __extends(RequestContext, _super); function RequestContext(url) { - _super.call(this, url); - this.m_workbook=new Workbook(this, OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(this)); - this._rootObject=this.m_workbook; + var _this=_super.call(this, url) || this; + _this.m_workbook=new Workbook(_this, OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(_this)); + _this._rootObject=_this.m_workbook; + _this._rootObjectPropertyName="workbook"; + return _this; } + RequestContext.prototype._processOfficeJsErrorResponse=function (officeJsErrorCode, response) { + var ooeInvalidApiCallInContext=5004; + if (officeJsErrorCode==ooeInvalidApiCallInContext) { + response.ErrorCode=ErrorCodes.invalidOperationInCellEditMode; + response.ErrorMessage=OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidOperationInCellEditMode); + } + }; Object.defineProperty(RequestContext.prototype, "workbook", { get: function () { return this.m_workbook; @@ -13893,7 +15489,7 @@ var Excel; configurable: true }); return RequestContext; - }(OfficeExtension.ClientRequestContext)); + }(OfficeCore.RequestContext)); Excel.RequestContext=RequestContext; function run(arg1, arg2, arg3) { return OfficeExtension.ClientRequestContext._runBatch("Excel.run", arguments, function (requestInfo) { @@ -13902,6 +15498,13 @@ var Excel; }); } Excel.run=run; + function runBatch(arg1, arg2) { + return OfficeExtension.ClientRequestContext._runExplicitBatch("Excel.runBatch", arguments, function (requestInfo) { + var ret=new Excel.RequestContext(requestInfo); + return ret; + }); + } + Excel.runBatch=runBatch; Excel._RedirectV1APIs=false; Excel._V1APIMap={ "GetDataAsync": { @@ -14007,7 +15610,7 @@ var Excel; call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingClearFormats(callArgs); } }, "GetFilePropertiesAsync": { - call: function (ctx, callArgs) { return ctx.workbook._V1Api.getFilePropertiesAsync(callArgs); } + call: function (ctx) { return ctx.workbook._V1Api.getFilePropertiesAsync(); } }, }; function postprocessBindingDescriptor(response) { @@ -14032,6 +15635,40 @@ var Excel; data=window.OSF.DDA.DataCoercion.coerceData(data, callArgs[window.Microsoft.Office.WebExtension.Parameters.CoercionType]); return data==undefined ? null : data; } + function versionNumberIsEarlierThan(desiredMajor, desiredMinor, desiredBuild) { + var hasOfficeVersion=typeof (window) !=="undefined" && + window.Office && + window.Office.context && + window.Office.context.diagnostics && + window.Office.context.diagnostics.version; + if (!hasOfficeVersion) { + return false; + } + var version=window.Office.context.diagnostics.version; + var versionExtractor=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/; + var result=versionExtractor.exec(version); + if (result) { + var major=parseInt(result[1]); + var minor=parseInt(result[2]); + var build=parseInt(result[3]); + var revision=parseInt(result[4]); + var devBuild=3000; + if (major < desiredMajor) { + return true; + } + if (major==desiredMajor && minor < desiredMinor) { + return true; + } + if (major==desiredMajor && minor==desiredMinor && build < desiredBuild) { + if (revision < devBuild) { + return true; + } + } + } + return false; + } + var _hostName="Excel"; + var _defaultApiSetName="ExcelApi"; var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; @@ -14040,19 +15677,25 @@ var Excel; var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createEnsureUnchangedAction=OfficeExtension.ActionFactory.createEnsureUnchangedAction; var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; var _isUndefined=OfficeExtension.Utility.isUndefined; var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; var _load=OfficeExtension.Utility.load; + var _retrieve=OfficeExtension.Utility.retrieve; + var _toJson=OfficeExtension.Utility.toJson; var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult=OfficeExtension.Utility.processRetrieveResult; + var _typeApplication="Application"; var Application=(function (_super) { __extends(Application, _super); function Application() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Application.prototype, "_className", { get: function () { @@ -14061,19 +15704,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Application.prototype, "_scalarPropertyNames", { + get: function () { + return ["calculationMode"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(Application.prototype, "calculationMode", { get: function () { - _throwIfNotLoaded("calculationMode", this.m_calculationMode, "Application", this._isNull); - return this.m_calculationMode; + _throwIfNotLoaded("calculationMode", this._C, _typeApplication, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Application.prototype.calculate=function (calculationType) { - _createMethodAction(this.context, this, "Calculate", 0, [calculationType]); + _createMethodAction(this.context, this, "Calculate", 0, [calculationType], false); }; Application.prototype.suspendApiCalculationUntilNextSync=function () { - _createMethodAction(this.context, this, "SuspendApiCalculationUntilNextSync", 0, []); + _throwIfApiNotSupported("Application.suspendApiCalculationUntilNextSync", _defaultApiSetName, "1.6", _hostName); + _createMethodAction(this.context, this, "SuspendApiCalculationUntilNextSync", 0, [], false); }; Application.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14082,25 +15733,36 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["CalculationMode"])) { - this.m_calculationMode=obj["CalculationMode"]; + this._C=obj["CalculationMode"]; } }; Application.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Application.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Application.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; Application.prototype.toJSON=function () { - return { - "calculationMode": this.m_calculationMode - }; + return _toJson(this, { + "calculationMode": this._C, + }, {}); + }; + Application.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Application; }(OfficeExtension.ClientObject)); Excel.Application=Application; + var _typeWorkbook="Workbook"; var Workbook=(function (_super) { __extends(Workbook, _super); function Workbook() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Workbook.prototype, "_className", { get: function () { @@ -14109,132 +15771,155 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Workbook.prototype, "_navigationPropertyNames", { + get: function () { + return ["worksheets", "names", "tables", "application", "bindings", "functions", "_V1Api", "pivotTables", "settings", "customXmlParts", "internalTest"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(Workbook.prototype, "application", { get: function () { - if (!this.m_application) { - this.m_application=new Excel.Application(this.context, _createPropertyObjectPath(this.context, this, "Application", false, false)); + if (!this._A) { + this._A=new Excel.Application(this.context, _createPropertyObjectPath(this.context, this, "Application", false, false, false)); } - return this.m_application; + return this._A; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "bindings", { get: function () { - if (!this.m_bindings) { - this.m_bindings=new Excel.BindingCollection(this.context, _createPropertyObjectPath(this.context, this, "Bindings", true, false)); + if (!this._B) { + this._B=new Excel.BindingCollection(this.context, _createPropertyObjectPath(this.context, this, "Bindings", true, false, false)); } - return this.m_bindings; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "customXmlParts", { get: function () { - if (!this.m_customXmlParts) { - this.m_customXmlParts=new Excel.CustomXmlPartCollection(this.context, _createPropertyObjectPath(this.context, this, "CustomXmlParts", true, false)); + _throwIfApiNotSupported("Workbook.customXmlParts", _defaultApiSetName, "1.5", _hostName); + if (!this._C) { + this._C=new Excel.CustomXmlPartCollection(this.context, _createPropertyObjectPath(this.context, this, "CustomXmlParts", true, false, false)); } - return this.m_customXmlParts; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "functions", { get: function () { - if (!this.m_functions) { - this.m_functions=new Excel.Functions(this.context, _createPropertyObjectPath(this.context, this, "Functions", false, false)); + _throwIfApiNotSupported("Workbook.functions", _defaultApiSetName, "1.2", _hostName); + if (!this._F) { + this._F=new Excel.Functions(this.context, _createPropertyObjectPath(this.context, this, "Functions", false, false, false)); } - return this.m_functions; + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Workbook.prototype, "internalTest", { + get: function () { + _throwIfApiNotSupported("Workbook.internalTest", _defaultApiSetName, "1.6", _hostName); + if (!this._I) { + this._I=new Excel.InternalTest(this.context, _createPropertyObjectPath(this.context, this, "InternalTest", false, false, false)); + } + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "names", { get: function () { - if (!this.m_names) { - this.m_names=new Excel.NamedItemCollection(this.context, _createPropertyObjectPath(this.context, this, "Names", true, false)); + if (!this._N) { + this._N=new Excel.NamedItemCollection(this.context, _createPropertyObjectPath(this.context, this, "Names", true, false, false)); } - return this.m_names; + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "pivotTables", { get: function () { - if (!this.m_pivotTables) { - this.m_pivotTables=new Excel.PivotTableCollection(this.context, _createPropertyObjectPath(this.context, this, "PivotTables", true, false)); + _throwIfApiNotSupported("Workbook.pivotTables", _defaultApiSetName, "1.3", _hostName); + if (!this._P) { + this._P=new Excel.PivotTableCollection(this.context, _createPropertyObjectPath(this.context, this, "PivotTables", true, false, false)); } - return this.m_pivotTables; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "settings", { get: function () { - if (!this.m_settings) { - this.m_settings=new Excel.SettingCollection(this.context, _createPropertyObjectPath(this.context, this, "Settings", true, false)); + _throwIfApiNotSupported("Workbook.settings", _defaultApiSetName, "1.4", _hostName); + if (!this._S) { + this._S=new Excel.SettingCollection(this.context, _createPropertyObjectPath(this.context, this, "Settings", true, false, false)); } - return this.m_settings; + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "tables", { get: function () { - if (!this.m_tables) { - this.m_tables=new Excel.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false)); + if (!this._T) { + this._T=new Excel.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false, false)); } - return this.m_tables; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "worksheets", { get: function () { - if (!this.m_worksheets) { - this.m_worksheets=new Excel.WorksheetCollection(this.context, _createPropertyObjectPath(this.context, this, "Worksheets", true, false)); + if (!this._W) { + this._W=new Excel.WorksheetCollection(this.context, _createPropertyObjectPath(this.context, this, "Worksheets", true, false, false)); } - return this.m_worksheets; + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "_V1Api", { get: function () { - if (!this.m__V1Api) { - this.m__V1Api=new Excel._V1Api(this.context, _createPropertyObjectPath(this.context, this, "_V1Api", false, false)); + _throwIfApiNotSupported("Workbook._V1Api", _defaultApiSetName, "1.3", _hostName); + if (!this.__V) { + this.__V=new Excel._V1Api(this.context, _createPropertyObjectPath(this.context, this, "_V1Api", false, false, false)); } - return this.m__V1Api; + return this.__V; }, enumerable: true, configurable: true }); Workbook.prototype.getSelectedRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetSelectedRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetSelectedRange", 1, [], false, true, null, false)); }; Workbook.prototype._GetObjectByReferenceId=function (bstrReferenceId) { - var action=_createMethodAction(this.context, this, "_GetObjectByReferenceId", 1, [bstrReferenceId]); + var action=_createMethodAction(this.context, this, "_GetObjectByReferenceId", 1, [bstrReferenceId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Workbook.prototype._GetObjectTypeNameByReferenceId=function (bstrReferenceId) { - var action=_createMethodAction(this.context, this, "_GetObjectTypeNameByReferenceId", 1, [bstrReferenceId]); + var action=_createMethodAction(this.context, this, "_GetObjectTypeNameByReferenceId", 1, [bstrReferenceId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Workbook.prototype._GetReferenceCount=function () { - var action=_createMethodAction(this.context, this, "_GetReferenceCount", 1, []); + var action=_createMethodAction(this.context, this, "_GetReferenceCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Workbook.prototype._RemoveAllReferences=function () { - _createMethodAction(this.context, this, "_RemoveAllReferences", 1, []); + _createMethodAction(this.context, this, "_RemoveAllReferences", 1, [], false); }; Workbook.prototype._RemoveReference=function (bstrReferenceId) { - _createMethodAction(this.context, this, "_RemoveReference", 1, [bstrReferenceId]); + _createMethodAction(this.context, this, "_RemoveReference", 1, [bstrReferenceId], false); }; Workbook.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14242,15 +15927,22 @@ var Excel; return; var obj=value; _fixObjectPathIfNecessary(this, obj); - _handleNavigationPropertyResults(this, obj, ["application", "Application", "bindings", "Bindings", "customXmlParts", "CustomXmlParts", "functions", "Functions", "names", "Names", "pivotTables", "PivotTables", "settings", "Settings", "tables", "Tables", "worksheets", "Worksheets", "_V1Api", "_V1Api"]); + _handleNavigationPropertyResults(this, obj, ["application", "Application", "bindings", "Bindings", "customXmlParts", "CustomXmlParts", "functions", "Functions", "internalTest", "InternalTest", "names", "Names", "pivotTables", "PivotTables", "settings", "Settings", "tables", "Tables", "worksheets", "Worksheets", "_V1Api", "_V1Api"]); }; Workbook.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Workbook.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Workbook.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; Object.defineProperty(Workbook.prototype, "onSelectionChanged", { get: function () { var _this=this; + _throwIfApiNotSupported("Workbook.onSelectionChanged", _defaultApiSetName, "1.3", _hostName); if (!this.m_selectionChanged) { this.m_selectionChanged=new OfficeExtension.EventHandlers(this.context, this, "SelectionChanged", { registerFunc: function (handlerCallback) { @@ -14270,15 +15962,28 @@ var Excel; configurable: true }); Workbook.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, { + "bindings": this._B, + "customXmlParts": this._C, + "names": this._N, + "pivotTables": this._P, + "settings": this._S, + "tables": this._T, + "worksheets": this._W, + }); + }; + Workbook.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Workbook; }(OfficeExtension.ClientObject)); Excel.Workbook=Workbook; + var _typeWorksheet="Worksheet"; var Worksheet=(function (_super) { __extends(Worksheet, _super); function Worksheet() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Worksheet.prototype, "_className", { get: function () { @@ -14287,42 +15992,66 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Worksheet.prototype, "_scalarPropertyNames", { + get: function () { + return ["name", "id", "position", "visibility"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Worksheet.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, false, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Worksheet.prototype, "_navigationPropertyNames", { + get: function () { + return ["charts", "tables", "protection", "pivotTables", "names"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(Worksheet.prototype, "charts", { get: function () { - if (!this.m_charts) { - this.m_charts=new Excel.ChartCollection(this.context, _createPropertyObjectPath(this.context, this, "Charts", true, false)); + if (!this._C) { + this._C=new Excel.ChartCollection(this.context, _createPropertyObjectPath(this.context, this, "Charts", true, false, false)); } - return this.m_charts; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Worksheet.prototype, "names", { get: function () { - if (!this.m_names) { - this.m_names=new Excel.NamedItemCollection(this.context, _createPropertyObjectPath(this.context, this, "Names", true, false)); + _throwIfApiNotSupported("Worksheet.names", _defaultApiSetName, "1.4", _hostName); + if (!this._Na) { + this._Na=new Excel.NamedItemCollection(this.context, _createPropertyObjectPath(this.context, this, "Names", true, false, false)); } - return this.m_names; + return this._Na; }, enumerable: true, configurable: true }); Object.defineProperty(Worksheet.prototype, "pivotTables", { get: function () { - if (!this.m_pivotTables) { - this.m_pivotTables=new Excel.PivotTableCollection(this.context, _createPropertyObjectPath(this.context, this, "PivotTables", true, false)); + _throwIfApiNotSupported("Worksheet.pivotTables", _defaultApiSetName, "1.3", _hostName); + if (!this._P) { + this._P=new Excel.PivotTableCollection(this.context, _createPropertyObjectPath(this.context, this, "PivotTables", true, false, false)); } - return this.m_pivotTables; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Worksheet.prototype, "protection", { get: function () { - if (!this.m_protection) { - this.m_protection=new Excel.WorksheetProtection(this.context, _createPropertyObjectPath(this.context, this, "Protection", false, false)); + _throwIfApiNotSupported("Worksheet.protection", _defaultApiSetName, "1.2", _hostName); + if (!this._Pr) { + this._Pr=new Excel.WorksheetProtection(this.context, _createPropertyObjectPath(this.context, this, "Protection", false, false, false)); } - return this.m_protection; + return this._Pr; }, enumerable: true, configurable: true @@ -14330,8 +16059,9 @@ var Excel; Object.defineProperty(Worksheet.prototype, "tables", { get: function () { if (!this.m_tables) { - this.m_tables=new Excel.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false)); + this.m_tables=new Excel.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false, false)); } + this.m_tables._ParentObject=this; return this.m_tables; }, enumerable: true, @@ -14339,19 +16069,19 @@ var Excel; }); Object.defineProperty(Worksheet.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Worksheet", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeWorksheet, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Worksheet.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "Worksheet", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeWorksheet, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -14359,11 +16089,11 @@ var Excel; }); Object.defineProperty(Worksheet.prototype, "position", { get: function () { - _throwIfNotLoaded("position", this.m_position, "Worksheet", this._isNull); - return this.m_position; + _throwIfNotLoaded("position", this._Po, _typeWorksheet, this._isNull); + return this._Po; }, set: function (value) { - this.m_position=value; + this._Po=value; _createSetPropertyAction(this.context, this, "Position", value); }, enumerable: true, @@ -14371,11 +16101,11 @@ var Excel; }); Object.defineProperty(Worksheet.prototype, "visibility", { get: function () { - _throwIfNotLoaded("visibility", this.m_visibility, "Worksheet", this._isNull); - return this.m_visibility; + _throwIfNotLoaded("visibility", this._V, _typeWorksheet, this._isNull); + return this._V; }, set: function (value) { - this.m_visibility=value; + this._V=value; _createSetPropertyAction(this.context, this, "Visibility", value); }, enumerable: true, @@ -14383,10 +16113,6 @@ var Excel; }); Worksheet.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["name", "position", "visibility"], [], [ - "charts", - "names", - "pivotTables", - "tables", "charts", "names", "pivotTables", @@ -14394,38 +16120,47 @@ var Excel; "tables" ]); }; + Worksheet.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; Worksheet.prototype.activate=function () { - _createMethodAction(this.context, this, "Activate", 1, []); + _createMethodAction(this.context, this, "Activate", 1, [], false); }; Worksheet.prototype.calculate=function (markAllDirty) { - _createMethodAction(this.context, this, "Calculate", 0, [markAllDirty]); + _throwIfApiNotSupported("Worksheet.calculate", _defaultApiSetName, "1.6", _hostName); + _createMethodAction(this.context, this, "Calculate", 0, [markAllDirty], false); }; Worksheet.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Worksheet.prototype.getCell=function (row, column) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [row, column], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [row, column], false, true, null, false)); }; Worksheet.prototype.getNext=function (visibleOnly) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [visibleOnly], false, true, null)); + _throwIfApiNotSupported("Worksheet.getNext", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [visibleOnly], false, true, "_GetSheetById", false)); }; Worksheet.prototype.getNextOrNullObject=function (visibleOnly) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [visibleOnly], false, true, null)); + _throwIfApiNotSupported("Worksheet.getNextOrNullObject", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [visibleOnly], false, true, "_GetSheetById", false)); }; Worksheet.prototype.getPrevious=function (visibleOnly) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetPrevious", 1, [visibleOnly], false, true, null)); + _throwIfApiNotSupported("Worksheet.getPrevious", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetPrevious", 1, [visibleOnly], false, true, "_GetSheetById", false)); }; Worksheet.prototype.getPreviousOrNullObject=function (visibleOnly) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetPreviousOrNullObject", 1, [visibleOnly], false, true, null)); + _throwIfApiNotSupported("Worksheet.getPreviousOrNullObject", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetPreviousOrNullObject", 1, [visibleOnly], false, true, "_GetSheetById", false)); }; Worksheet.prototype.getRange=function (address) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [address], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [address], false, true, null, false)); }; Worksheet.prototype.getUsedRange=function (valuesOnly) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRange", 1, [valuesOnly], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRange", 1, [valuesOnly], false, true, null, false)); }; Worksheet.prototype.getUsedRangeOrNullObject=function (valuesOnly) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRangeOrNullObject", 1, [valuesOnly], false, true, null)); + _throwIfApiNotSupported("Worksheet.getUsedRangeOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRangeOrNullObject", 1, [valuesOnly], false, true, null, false)); }; Worksheet.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14434,22 +16169,24 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Position"])) { - this.m_position=obj["Position"]; + this._Po=obj["Position"]; } if (!_isUndefined(obj["Visibility"])) { - this.m_visibility=obj["Visibility"]; + this._V=obj["Visibility"]; } _handleNavigationPropertyResults(this, obj, ["charts", "Charts", "names", "Names", "pivotTables", "PivotTables", "protection", "Protection", "tables", "Tables"]); }; Worksheet.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Worksheet.prototype.retrieve=function (option) { + return _retrieve(this, option); }; Worksheet.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -14457,25 +16194,39 @@ var Excel; return; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; + Worksheet.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; Worksheet.prototype.toJSON=function () { - return { - "id": this.m_id, - "name": this.m_name, - "position": this.m_position, - "protection": this.m_protection, - "visibility": this.m_visibility - }; + return _toJson(this, { + "id": this._I, + "name": this._N, + "position": this._Po, + "visibility": this._V, + }, { + "charts": this._C, + "names": this._Na, + "pivotTables": this._P, + "protection": this._Pr, + "tables": this.m_tables, + }); + }; + Worksheet.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Worksheet; }(OfficeExtension.ClientObject)); Excel.Worksheet=Worksheet; + var _typeWorksheetCollection="WorksheetCollection"; var WorksheetCollection=(function (_super) { __extends(WorksheetCollection, _super); function WorksheetCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(WorksheetCollection.prototype, "_className", { get: function () { @@ -14484,37 +16235,48 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(WorksheetCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(WorksheetCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "WorksheetCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeWorksheetCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); WorksheetCollection.prototype.add=function (name) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [name], false, true, null)); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [name], false, true, null, false)); }; WorksheetCollection.prototype.getActiveWorksheet=function () { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetActiveWorksheet", 1, [], false, false, null)); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetActiveWorksheet", 1, [], false, false, null, false)); }; WorksheetCollection.prototype.getCount=function (visibleOnly) { - var action=_createMethodAction(this.context, this, "GetCount", 1, [visibleOnly]); + _throwIfApiNotSupported("WorksheetCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [visibleOnly], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; WorksheetCollection.prototype.getFirst=function (visibleOnly) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [visibleOnly], false, true, null)); + _throwIfApiNotSupported("WorksheetCollection.getFirst", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [visibleOnly], false, true, null, false)); }; WorksheetCollection.prototype.getItem=function (key) { return new Excel.Worksheet(this.context, _createIndexerObjectPath(this.context, this, [key])); }; WorksheetCollection.prototype.getItemOrNullObject=function (key) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null)); + _throwIfApiNotSupported("WorksheetCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null, false)); }; WorksheetCollection.prototype.getLast=function (visibleOnly) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetLast", 1, [visibleOnly], false, true, null)); + _throwIfApiNotSupported("WorksheetCollection.getLast", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetLast", 1, [visibleOnly], false, true, null, false)); }; WorksheetCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14533,19 +16295,27 @@ var Excel; } }; WorksheetCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + WorksheetCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + WorksheetCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.Worksheet(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; WorksheetCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return WorksheetCollection; }(OfficeExtension.ClientObject)); Excel.WorksheetCollection=WorksheetCollection; + var _typeWorksheetProtection="WorksheetProtection"; var WorksheetProtection=(function (_super) { __extends(WorksheetProtection, _super); function WorksheetProtection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(WorksheetProtection.prototype, "_className", { get: function () { @@ -14554,27 +16324,38 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(WorksheetProtection.prototype, "_scalarPropertyNames", { + get: function () { + return ["protected", "options"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(WorksheetProtection.prototype, "options", { get: function () { - _throwIfNotLoaded("options", this.m_options, "WorksheetProtection", this._isNull); - return this.m_options; + _throwIfNotLoaded("options", this._O, _typeWorksheetProtection, this._isNull); + return this._O; }, enumerable: true, configurable: true }); Object.defineProperty(WorksheetProtection.prototype, "protected", { get: function () { - _throwIfNotLoaded("protected", this.m_protected, "WorksheetProtection", this._isNull); - return this.m_protected; + _throwIfNotLoaded("protected", this._P, _typeWorksheetProtection, this._isNull); + return this._P; }, enumerable: true, configurable: true }); - WorksheetProtection.prototype.protect=function (options) { - _createMethodAction(this.context, this, "Protect", 0, [options]); + WorksheetProtection.prototype.protect=function (options, password) { + if (versionNumberIsEarlierThan(16, 0, 8716)) { + _createMethodAction(this.context, this, "Protect", 0, [options], false); + return; + } + _createMethodAction(this.context, this, "Protect", 0, [options, password], false); }; - WorksheetProtection.prototype.unprotect=function () { - _createMethodAction(this.context, this, "Unprotect", 0, []); + WorksheetProtection.prototype.unprotect=function (password) { + _createMethodAction(this.context, this, "Unprotect", 0, [password], false); }; WorksheetProtection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14583,29 +16364,40 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Options"])) { - this.m_options=obj["Options"]; + this._O=obj["Options"]; } if (!_isUndefined(obj["Protected"])) { - this.m_protected=obj["Protected"]; + this._P=obj["Protected"]; } }; WorksheetProtection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + WorksheetProtection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + WorksheetProtection.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; WorksheetProtection.prototype.toJSON=function () { - return { - "options": this.m_options, - "protected": this.m_protected - }; + return _toJson(this, { + "options": this._O, + "protected": this._P, + }, {}); + }; + WorksheetProtection.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return WorksheetProtection; }(OfficeExtension.ClientObject)); Excel.WorksheetProtection=WorksheetProtection; + var _typeRange="Range"; var Range=(function (_super) { __extends(Range, _super); function Range() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Range.prototype, "_className", { get: function () { @@ -14614,9 +16406,30 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Range.prototype, "_scalarPropertyNames", { + get: function () { + return ["numberFormat", "values", "text", "formulas", "formulasLocal", "rowIndex", "columnIndex", "rowCount", "columnCount", "address", "addressLocal", "cellCount", "_ReferenceId", "valueTypes", "formulasR1C1", "hidden", "rowHidden", "columnHidden"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, false, true, true, false, false, false, false, false, false, false, false, false, true, false, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "_navigationPropertyNames", { + get: function () { + return ["format", "worksheet", "sort", "conditionalFormats"]; + }, + enumerable: true, + configurable: true + }); Range.prototype._ensureInteger=function (num, methodName) { if (!(typeof num==="number" && isFinite(num) && Math.floor(num)===num)) { - throw new OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, num, methodName); + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, num, methodName); } }; Range.prototype._getAdjacentRange=function (functionName, count, referenceRange, rowDirection, columnDirection) { @@ -14642,83 +16455,86 @@ var Excel; }; Object.defineProperty(Range.prototype, "conditionalFormats", { get: function () { - if (!this.m_conditionalFormats) { - this.m_conditionalFormats=new Excel.ConditionalFormatCollection(this.context, _createPropertyObjectPath(this.context, this, "ConditionalFormats", true, false)); + _throwIfApiNotSupported("Range.conditionalFormats", _defaultApiSetName, "1.6", _hostName); + if (!this._Con) { + this._Con=new Excel.ConditionalFormatCollection(this.context, _createPropertyObjectPath(this.context, this, "ConditionalFormats", true, false, false)); } - return this.m_conditionalFormats; + return this._Con; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.RangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.RangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "sort", { get: function () { - if (!this.m_sort) { - this.m_sort=new Excel.RangeSort(this.context, _createPropertyObjectPath(this.context, this, "Sort", false, false)); + _throwIfApiNotSupported("Range.sort", _defaultApiSetName, "1.2", _hostName); + if (!this._S) { + this._S=new Excel.RangeSort(this.context, _createPropertyObjectPath(this.context, this, "Sort", false, false, false)); } - return this.m_sort; + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "worksheet", { get: function () { - if (!this.m_worksheet) { - this.m_worksheet=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false)); + if (!this._W) { + this._W=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false, false)); } - return this.m_worksheet; + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "address", { get: function () { - _throwIfNotLoaded("address", this.m_address, "Range", this._isNull); - return this.m_address; + _throwIfNotLoaded("address", this._A, _typeRange, this._isNull); + return this._A; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "addressLocal", { get: function () { - _throwIfNotLoaded("addressLocal", this.m_addressLocal, "Range", this._isNull); - return this.m_addressLocal; + _throwIfNotLoaded("addressLocal", this._Ad, _typeRange, this._isNull); + return this._Ad; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "cellCount", { get: function () { - _throwIfNotLoaded("cellCount", this.m_cellCount, "Range", this._isNull); - return this.m_cellCount; + _throwIfNotLoaded("cellCount", this._C, _typeRange, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "columnCount", { get: function () { - _throwIfNotLoaded("columnCount", this.m_columnCount, "Range", this._isNull); - return this.m_columnCount; + _throwIfNotLoaded("columnCount", this._Co, _typeRange, this._isNull); + return this._Co; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "columnHidden", { get: function () { - _throwIfNotLoaded("columnHidden", this.m_columnHidden, "Range", this._isNull); - return this.m_columnHidden; + _throwIfNotLoaded("columnHidden", this._Col, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.columnHidden", _defaultApiSetName, "1.2", _hostName); + return this._Col; }, set: function (value) { - this.m_columnHidden=value; + this._Col=value; _createSetPropertyAction(this.context, this, "ColumnHidden", value); }, enumerable: true, @@ -14726,15 +16542,15 @@ var Excel; }); Object.defineProperty(Range.prototype, "columnIndex", { get: function () { - _throwIfNotLoaded("columnIndex", this.m_columnIndex, "Range", this._isNull); - return this.m_columnIndex; + _throwIfNotLoaded("columnIndex", this._Colu, _typeRange, this._isNull); + return this._Colu; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "formulas", { get: function () { - _throwIfNotLoaded("formulas", this.m_formulas, "Range", this._isNull); + _throwIfNotLoaded("formulas", this.m_formulas, _typeRange, this._isNull); return this.m_formulas; }, set: function (value) { @@ -14750,7 +16566,7 @@ var Excel; }); Object.defineProperty(Range.prototype, "formulasLocal", { get: function () { - _throwIfNotLoaded("formulasLocal", this.m_formulasLocal, "Range", this._isNull); + _throwIfNotLoaded("formulasLocal", this.m_formulasLocal, _typeRange, this._isNull); return this.m_formulasLocal; }, set: function (value) { @@ -14766,7 +16582,8 @@ var Excel; }); Object.defineProperty(Range.prototype, "formulasR1C1", { get: function () { - _throwIfNotLoaded("formulasR1C1", this.m_formulasR1C1, "Range", this._isNull); + _throwIfNotLoaded("formulasR1C1", this.m_formulasR1C1, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.formulasR1C1", _defaultApiSetName, "1.2", _hostName); return this.m_formulasR1C1; }, set: function (value) { @@ -14782,15 +16599,16 @@ var Excel; }); Object.defineProperty(Range.prototype, "hidden", { get: function () { - _throwIfNotLoaded("hidden", this.m_hidden, "Range", this._isNull); - return this.m_hidden; + _throwIfNotLoaded("hidden", this._H, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.hidden", _defaultApiSetName, "1.2", _hostName); + return this._H; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "numberFormat", { get: function () { - _throwIfNotLoaded("numberFormat", this.m_numberFormat, "Range", this._isNull); + _throwIfNotLoaded("numberFormat", this.m_numberFormat, _typeRange, this._isNull); return this.m_numberFormat; }, set: function (value) { @@ -14806,19 +16624,20 @@ var Excel; }); Object.defineProperty(Range.prototype, "rowCount", { get: function () { - _throwIfNotLoaded("rowCount", this.m_rowCount, "Range", this._isNull); - return this.m_rowCount; + _throwIfNotLoaded("rowCount", this._R, _typeRange, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "rowHidden", { get: function () { - _throwIfNotLoaded("rowHidden", this.m_rowHidden, "Range", this._isNull); - return this.m_rowHidden; + _throwIfNotLoaded("rowHidden", this._Ro, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.rowHidden", _defaultApiSetName, "1.2", _hostName); + return this._Ro; }, set: function (value) { - this.m_rowHidden=value; + this._Ro=value; _createSetPropertyAction(this.context, this, "RowHidden", value); }, enumerable: true, @@ -14826,31 +16645,31 @@ var Excel; }); Object.defineProperty(Range.prototype, "rowIndex", { get: function () { - _throwIfNotLoaded("rowIndex", this.m_rowIndex, "Range", this._isNull); - return this.m_rowIndex; + _throwIfNotLoaded("rowIndex", this._Row, _typeRange, this._isNull); + return this._Row; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "Range", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._T, _typeRange, this._isNull); + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "valueTypes", { get: function () { - _throwIfNotLoaded("valueTypes", this.m_valueTypes, "Range", this._isNull); - return this.m_valueTypes; + _throwIfNotLoaded("valueTypes", this._V, _typeRange, this._isNull); + return this._V; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "values", { get: function () { - _throwIfNotLoaded("values", this.m_values, "Range", this._isNull); + _throwIfNotLoaded("values", this.m_values, _typeRange, this._isNull); return this.m_values; }, set: function (value) { @@ -14866,39 +16685,40 @@ var Excel; }); Object.defineProperty(Range.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Range", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeRange, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Range.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["numberFormat", "values", "formulas", "formulasLocal", "formulasR1C1", "rowHidden", "columnHidden"], ["format"], [ - "conditionalFormats", - "sort", - "worksheet", "conditionalFormats", "sort", "worksheet" ]); }; + Range.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; Range.prototype.calculate=function () { - _createMethodAction(this.context, this, "Calculate", 0, []); + _throwIfApiNotSupported("Range.calculate", _defaultApiSetName, "1.6", _hostName); + _createMethodAction(this.context, this, "Calculate", 0, [], false); }; Range.prototype.clear=function (applyTo) { - _createMethodAction(this.context, this, "Clear", 0, [applyTo]); + _createMethodAction(this.context, this, "Clear", 0, [applyTo], false); }; Range.prototype.delete=function (shift) { - _createMethodAction(this.context, this, "Delete", 0, [shift]); + _createMethodAction(this.context, this, "Delete", 0, [shift], false); }; Range.prototype.getBoundingRect=function (anotherRange) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetBoundingRect", 1, [anotherRange], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetBoundingRect", 1, [anotherRange], false, true, null, false)); }; Range.prototype.getCell=function (row, column) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [row, column], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [row, column], false, true, null, false)); }; Range.prototype.getColumn=function (column) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumn", 1, [column], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumn", 1, [column], false, true, null, false)); }; Range.prototype.getColumnsAfter=function (count) { if (!isExcel1_3OrAbove()) { @@ -14907,11 +16727,12 @@ var Excel; } this._ensureInteger(count, "RowsAbove"); if (count==0) { - throw new OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); } return this._getAdjacentRange("getColumnsAfter", count, this.getLastColumn(), 0, 1); } - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumnsAfter", 1, [count], false, true, null)); + _throwIfApiNotSupported("Range.getColumnsAfter", _defaultApiSetName, "1.3", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumnsAfter", 1, [count], false, true, null, false)); }; Range.prototype.getColumnsBefore=function (count) { if (!isExcel1_3OrAbove()) { @@ -14920,35 +16741,37 @@ var Excel; } this._ensureInteger(count, "RowsAbove"); if (count==0) { - throw new OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); } return this._getAdjacentRange("getColumnsBefore", count, this.getColumn(0), 0, -1); } - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumnsBefore", 1, [count], false, true, null)); + _throwIfApiNotSupported("Range.getColumnsBefore", _defaultApiSetName, "1.3", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumnsBefore", 1, [count], false, true, null, false)); }; Range.prototype.getEntireColumn=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetEntireColumn", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetEntireColumn", 1, [], false, true, null, false)); }; Range.prototype.getEntireRow=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetEntireRow", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetEntireRow", 1, [], false, true, null, false)); }; Range.prototype.getIntersection=function (anotherRange) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetIntersection", 1, [anotherRange], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetIntersection", 1, [anotherRange], false, true, null, false)); }; Range.prototype.getIntersectionOrNullObject=function (anotherRange) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetIntersectionOrNullObject", 1, [anotherRange], false, true, null)); + _throwIfApiNotSupported("Range.getIntersectionOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetIntersectionOrNullObject", 1, [anotherRange], false, true, null, false)); }; Range.prototype.getLastCell=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastCell", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastCell", 1, [], false, true, null, false)); }; Range.prototype.getLastColumn=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastColumn", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastColumn", 1, [], false, true, null, false)); }; Range.prototype.getLastRow=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastRow", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastRow", 1, [], false, true, null, false)); }; Range.prototype.getOffsetRange=function (rowOffset, columnOffset) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetOffsetRange", 1, [rowOffset, columnOffset], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetOffsetRange", 1, [rowOffset, columnOffset], false, true, null, false)); }; Range.prototype.getResizedRange=function (deltaRows, deltaColumns) { if (!isExcel1_3OrAbove()) { @@ -14957,10 +16780,11 @@ var Excel; var referenceRange=(deltaRows >=0 && deltaColumns >=0) ? this : this.getCell(0, 0); return referenceRange.getBoundingRect(this.getLastCell().getOffsetRange(deltaRows, deltaColumns)); } - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetResizedRange", 1, [deltaRows, deltaColumns], false, true, null)); + _throwIfApiNotSupported("Range.getResizedRange", _defaultApiSetName, "1.3", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetResizedRange", 1, [deltaRows, deltaColumns], false, true, null, false)); }; Range.prototype.getRow=function (row) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRow", 1, [row], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRow", 1, [row], false, true, null, false)); }; Range.prototype.getRowsAbove=function (count) { if (!isExcel1_3OrAbove()) { @@ -14969,11 +16793,12 @@ var Excel; } this._ensureInteger(count, "RowsAbove"); if (count==0) { - throw new OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); } return this._getAdjacentRange("getRowsAbove", count, this.getRow(0), -1, 0); } - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRowsAbove", 1, [count], false, true, null)); + _throwIfApiNotSupported("Range.getRowsAbove", _defaultApiSetName, "1.3", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRowsAbove", 1, [count], false, true, null, false)); }; Range.prototype.getRowsBelow=function (count) { if (!isExcel1_3OrAbove()) { @@ -14982,38 +16807,44 @@ var Excel; } this._ensureInteger(count, "RowsAbove"); if (count==0) { - throw new OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); } return this._getAdjacentRange("getRowsBelow", count, this.getLastRow(), 1, 0); } - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRowsBelow", 1, [count], false, true, null)); + _throwIfApiNotSupported("Range.getRowsBelow", _defaultApiSetName, "1.3", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRowsBelow", 1, [count], false, true, null, false)); }; Range.prototype.getUsedRange=function (valuesOnly) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRange", 1, [valuesOnly], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRange", 1, [valuesOnly], false, true, null, false)); }; Range.prototype.getUsedRangeOrNullObject=function (valuesOnly) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRangeOrNullObject", 1, [valuesOnly], false, true, null)); + _throwIfApiNotSupported("Range.getUsedRangeOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRangeOrNullObject", 1, [valuesOnly], false, true, null, false)); }; Range.prototype.getVisibleView=function () { - return new Excel.RangeView(this.context, _createMethodObjectPath(this.context, this, "GetVisibleView", 1, [], false, false, null)); + _throwIfApiNotSupported("Range.getVisibleView", _defaultApiSetName, "1.3", _hostName); + return new Excel.RangeView(this.context, _createMethodObjectPath(this.context, this, "GetVisibleView", 1, [], false, false, null, false)); }; Range.prototype.insert=function (shift) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "Insert", 0, [shift], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "Insert", 0, [shift], false, true, null, false)); }; Range.prototype.merge=function (across) { - _createMethodAction(this.context, this, "Merge", 0, [across]); + _throwIfApiNotSupported("Range.merge", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "Merge", 0, [across], false); }; Range.prototype.select=function () { - _createMethodAction(this.context, this, "Select", 1, []); + _createMethodAction(this.context, this, "Select", 1, [], false); }; Range.prototype.unmerge=function () { - _createMethodAction(this.context, this, "Unmerge", 0, []); + _throwIfApiNotSupported("Range.unmerge", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "Unmerge", 0, [], false); }; Range.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Range.prototype._ValidateArraySize=function (rows, columns) { - _createMethodAction(this.context, this, "_ValidateArraySize", 1, [rows, columns]); + _throwIfApiNotSupported("Range._ValidateArraySize", _defaultApiSetName, "1.3", _hostName); + _createMethodAction(this.context, this, "_ValidateArraySize", 1, [rows, columns], false); }; Range.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15022,22 +16853,22 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Address"])) { - this.m_address=obj["Address"]; + this._A=obj["Address"]; } if (!_isUndefined(obj["AddressLocal"])) { - this.m_addressLocal=obj["AddressLocal"]; + this._Ad=obj["AddressLocal"]; } if (!_isUndefined(obj["CellCount"])) { - this.m_cellCount=obj["CellCount"]; + this._C=obj["CellCount"]; } if (!_isUndefined(obj["ColumnCount"])) { - this.m_columnCount=obj["ColumnCount"]; + this._Co=obj["ColumnCount"]; } if (!_isUndefined(obj["ColumnHidden"])) { - this.m_columnHidden=obj["ColumnHidden"]; + this._Col=obj["ColumnHidden"]; } if (!_isUndefined(obj["ColumnIndex"])) { - this.m_columnIndex=obj["ColumnIndex"]; + this._Colu=obj["ColumnIndex"]; } if (!_isUndefined(obj["Formulas"])) { this.m_formulas=obj["Formulas"]; @@ -15049,37 +16880,39 @@ var Excel; this.m_formulasR1C1=obj["FormulasR1C1"]; } if (!_isUndefined(obj["Hidden"])) { - this.m_hidden=obj["Hidden"]; + this._H=obj["Hidden"]; } if (!_isUndefined(obj["NumberFormat"])) { this.m_numberFormat=obj["NumberFormat"]; } if (!_isUndefined(obj["RowCount"])) { - this.m_rowCount=obj["RowCount"]; + this._R=obj["RowCount"]; } if (!_isUndefined(obj["RowHidden"])) { - this.m_rowHidden=obj["RowHidden"]; + this._Ro=obj["RowHidden"]; } if (!_isUndefined(obj["RowIndex"])) { - this.m_rowIndex=obj["RowIndex"]; + this._Row=obj["RowIndex"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._T=obj["Text"]; } if (!_isUndefined(obj["ValueTypes"])) { - this.m_valueTypes=obj["ValueTypes"]; + this._V=obj["ValueTypes"]; } if (!_isUndefined(obj["Values"])) { this.m_values=obj["Values"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["conditionalFormats", "ConditionalFormats", "format", "Format", "sort", "Sort", "worksheet", "Worksheet"]); }; Range.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Range.prototype.retrieve=function (option) { + return _retrieve(this, option); }; Range.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -15087,9 +16920,13 @@ var Excel; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; + Range.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; Range.prototype.track=function () { this.context.trackedObjects.add(this); return this; @@ -15099,34 +16936,41 @@ var Excel; return this; }; Range.prototype.toJSON=function () { - return { - "address": this.m_address, - "addressLocal": this.m_addressLocal, - "cellCount": this.m_cellCount, - "columnCount": this.m_columnCount, - "columnHidden": this.m_columnHidden, - "columnIndex": this.m_columnIndex, - "format": this.m_format, + return _toJson(this, { + "address": this._A, + "addressLocal": this._Ad, + "cellCount": this._C, + "columnCount": this._Co, + "columnHidden": this._Col, + "columnIndex": this._Colu, "formulas": this.m_formulas, "formulasLocal": this.m_formulasLocal, "formulasR1C1": this.m_formulasR1C1, - "hidden": this.m_hidden, + "hidden": this._H, "numberFormat": this.m_numberFormat, - "rowCount": this.m_rowCount, - "rowHidden": this.m_rowHidden, - "rowIndex": this.m_rowIndex, - "text": this.m_text, + "rowCount": this._R, + "rowHidden": this._Ro, + "rowIndex": this._Row, + "text": this._T, "values": this.m_values, - "valueTypes": this.m_valueTypes - }; + "valueTypes": this._V, + }, { + "conditionalFormats": this._Con, + "format": this._F, + }); + }; + Range.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Range; }(OfficeExtension.ClientObject)); Excel.Range=Range; + var _typeRangeView="RangeView"; var RangeView=(function (_super) { __extends(RangeView, _super); function RangeView() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeView.prototype, "_className", { get: function () { @@ -15135,39 +16979,60 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeView.prototype, "_scalarPropertyNames", { + get: function () { + return ["numberFormat", "values", "text", "formulas", "formulasLocal", "formulasR1C1", "valueTypes", "rowCount", "columnCount", "cellAddresses", "index"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeView.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, false, true, true, true, false, false, false, false, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeView.prototype, "_navigationPropertyNames", { + get: function () { + return ["rows"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeView.prototype, "rows", { get: function () { - if (!this.m_rows) { - this.m_rows=new Excel.RangeViewCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false)); + if (!this._Ro) { + this._Ro=new Excel.RangeViewCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false, false)); } - return this.m_rows; + return this._Ro; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "cellAddresses", { get: function () { - _throwIfNotLoaded("cellAddresses", this.m_cellAddresses, "RangeView", this._isNull); - return this.m_cellAddresses; + _throwIfNotLoaded("cellAddresses", this._C, _typeRangeView, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "columnCount", { get: function () { - _throwIfNotLoaded("columnCount", this.m_columnCount, "RangeView", this._isNull); - return this.m_columnCount; + _throwIfNotLoaded("columnCount", this._Co, _typeRangeView, this._isNull); + return this._Co; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "formulas", { get: function () { - _throwIfNotLoaded("formulas", this.m_formulas, "RangeView", this._isNull); - return this.m_formulas; + _throwIfNotLoaded("formulas", this._F, _typeRangeView, this._isNull); + return this._F; }, set: function (value) { - this.m_formulas=value; + this._F=value; _createSetPropertyAction(this.context, this, "Formulas", value); }, enumerable: true, @@ -15175,11 +17040,11 @@ var Excel; }); Object.defineProperty(RangeView.prototype, "formulasLocal", { get: function () { - _throwIfNotLoaded("formulasLocal", this.m_formulasLocal, "RangeView", this._isNull); - return this.m_formulasLocal; + _throwIfNotLoaded("formulasLocal", this._Fo, _typeRangeView, this._isNull); + return this._Fo; }, set: function (value) { - this.m_formulasLocal=value; + this._Fo=value; _createSetPropertyAction(this.context, this, "FormulasLocal", value); }, enumerable: true, @@ -15187,11 +17052,11 @@ var Excel; }); Object.defineProperty(RangeView.prototype, "formulasR1C1", { get: function () { - _throwIfNotLoaded("formulasR1C1", this.m_formulasR1C1, "RangeView", this._isNull); - return this.m_formulasR1C1; + _throwIfNotLoaded("formulasR1C1", this._For, _typeRangeView, this._isNull); + return this._For; }, set: function (value) { - this.m_formulasR1C1=value; + this._For=value; _createSetPropertyAction(this.context, this, "FormulasR1C1", value); }, enumerable: true, @@ -15199,19 +17064,19 @@ var Excel; }); Object.defineProperty(RangeView.prototype, "index", { get: function () { - _throwIfNotLoaded("index", this.m_index, "RangeView", this._isNull); - return this.m_index; + _throwIfNotLoaded("index", this._I, _typeRangeView, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "numberFormat", { get: function () { - _throwIfNotLoaded("numberFormat", this.m_numberFormat, "RangeView", this._isNull); - return this.m_numberFormat; + _throwIfNotLoaded("numberFormat", this._N, _typeRangeView, this._isNull); + return this._N; }, set: function (value) { - this.m_numberFormat=value; + this._N=value; _createSetPropertyAction(this.context, this, "NumberFormat", value); }, enumerable: true, @@ -15219,35 +17084,35 @@ var Excel; }); Object.defineProperty(RangeView.prototype, "rowCount", { get: function () { - _throwIfNotLoaded("rowCount", this.m_rowCount, "RangeView", this._isNull); - return this.m_rowCount; + _throwIfNotLoaded("rowCount", this._R, _typeRangeView, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "RangeView", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._T, _typeRangeView, this._isNull); + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "valueTypes", { get: function () { - _throwIfNotLoaded("valueTypes", this.m_valueTypes, "RangeView", this._isNull); - return this.m_valueTypes; + _throwIfNotLoaded("valueTypes", this._Va, _typeRangeView, this._isNull); + return this._Va; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "values", { get: function () { - _throwIfNotLoaded("values", this.m_values, "RangeView", this._isNull); - return this.m_values; + _throwIfNotLoaded("values", this._V, _typeRangeView, this._isNull); + return this._V; }, set: function (value) { - this.m_values=value; + this._V=value; _createSetPropertyAction(this.context, this, "Values", value); }, enumerable: true, @@ -15255,12 +17120,14 @@ var Excel; }); RangeView.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["numberFormat", "values", "formulas", "formulasLocal", "formulasR1C1"], [], [ - "rows", "rows" ]); }; + RangeView.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; RangeView.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); }; RangeView.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15269,66 +17136,79 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["CellAddresses"])) { - this.m_cellAddresses=obj["CellAddresses"]; + this._C=obj["CellAddresses"]; } if (!_isUndefined(obj["ColumnCount"])) { - this.m_columnCount=obj["ColumnCount"]; + this._Co=obj["ColumnCount"]; } if (!_isUndefined(obj["Formulas"])) { - this.m_formulas=obj["Formulas"]; + this._F=obj["Formulas"]; } if (!_isUndefined(obj["FormulasLocal"])) { - this.m_formulasLocal=obj["FormulasLocal"]; + this._Fo=obj["FormulasLocal"]; } if (!_isUndefined(obj["FormulasR1C1"])) { - this.m_formulasR1C1=obj["FormulasR1C1"]; + this._For=obj["FormulasR1C1"]; } if (!_isUndefined(obj["Index"])) { - this.m_index=obj["Index"]; + this._I=obj["Index"]; } if (!_isUndefined(obj["NumberFormat"])) { - this.m_numberFormat=obj["NumberFormat"]; + this._N=obj["NumberFormat"]; } if (!_isUndefined(obj["RowCount"])) { - this.m_rowCount=obj["RowCount"]; + this._R=obj["RowCount"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._T=obj["Text"]; } if (!_isUndefined(obj["ValueTypes"])) { - this.m_valueTypes=obj["ValueTypes"]; + this._Va=obj["ValueTypes"]; } if (!_isUndefined(obj["Values"])) { - this.m_values=obj["Values"]; + this._V=obj["Values"]; } _handleNavigationPropertyResults(this, obj, ["rows", "Rows"]); }; RangeView.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeView.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeView.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; RangeView.prototype.toJSON=function () { - return { - "cellAddresses": this.m_cellAddresses, - "columnCount": this.m_columnCount, - "formulas": this.m_formulas, - "formulasLocal": this.m_formulasLocal, - "formulasR1C1": this.m_formulasR1C1, - "index": this.m_index, - "numberFormat": this.m_numberFormat, - "rowCount": this.m_rowCount, - "text": this.m_text, - "values": this.m_values, - "valueTypes": this.m_valueTypes - }; + return _toJson(this, { + "cellAddresses": this._C, + "columnCount": this._Co, + "formulas": this._F, + "formulasLocal": this._Fo, + "formulasR1C1": this._For, + "index": this._I, + "numberFormat": this._N, + "rowCount": this._R, + "text": this._T, + "values": this._V, + "valueTypes": this._Va, + }, { + "rows": this._Ro, + }); + }; + RangeView.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return RangeView; }(OfficeExtension.ClientObject)); Excel.RangeView=RangeView; + var _typeRangeViewCollection="RangeViewCollection"; var RangeViewCollection=(function (_super) { __extends(RangeViewCollection, _super); function RangeViewCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeViewCollection.prototype, "_className", { get: function () { @@ -15337,22 +17217,30 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeViewCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeViewCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "RangeViewCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeRangeViewCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); RangeViewCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("RangeViewCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; RangeViewCollection.prototype.getItemAt=function (index) { - return new Excel.RangeView(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.RangeView(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; RangeViewCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15371,19 +17259,27 @@ var Excel; } }; RangeViewCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeViewCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeViewCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.RangeView(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(false, _this.context, _this, childItemData, index)); }); }; RangeViewCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return RangeViewCollection; }(OfficeExtension.ClientObject)); Excel.RangeViewCollection=RangeViewCollection; + var _typeSettingCollection="SettingCollection"; var SettingCollection=(function (_super) { __extends(SettingCollection, _super); function SettingCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(SettingCollection.prototype, "_className", { get: function () { @@ -15392,9 +17288,16 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(SettingCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(SettingCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "SettingCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeSettingCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15402,10 +17305,10 @@ var Excel; }); SettingCollection.prototype.add=function (key, value) { value=Setting._replaceDateWithStringDate(value); - return new Excel.Setting(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [key, value], false, true, null)); + return new Excel.Setting(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [key, value], false, true, null, false)); }; SettingCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -15414,7 +17317,7 @@ var Excel; return new Excel.Setting(this.context, _createIndexerObjectPath(this.context, this, [key])); }; SettingCollection.prototype.getItemOrNullObject=function (key) { - return new Excel.Setting(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null)); + return new Excel.Setting(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null, false)); }; SettingCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15433,8 +17336,15 @@ var Excel; } }; SettingCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + SettingCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + SettingCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.Setting(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; Object.defineProperty(SettingCollection.prototype, "onSettingsChanged", { get: function () { @@ -15458,15 +17368,16 @@ var Excel; configurable: true }); SettingCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return SettingCollection; }(OfficeExtension.ClientObject)); Excel.SettingCollection=SettingCollection; + var _typeSetting="Setting"; var Setting=(function (_super) { __extends(Setting, _super); function Setting() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Setting.prototype, "_className", { get: function () { @@ -15475,6 +17386,20 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Setting.prototype, "_scalarPropertyNames", { + get: function () { + return ["key", "value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Setting.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true]; + }, + enumerable: true, + configurable: true + }); Setting.replaceStringDateWithDate=function (value) { var strValue=JSON.stringify(value); value=JSON.parse(strValue, function dateReviver(k, v) { @@ -15498,15 +17423,15 @@ var Excel; }; Object.defineProperty(Setting.prototype, "key", { get: function () { - _throwIfNotLoaded("key", this.m_key, "Setting", this._isNull); - return this.m_key; + _throwIfNotLoaded("key", this._K, _typeSetting, this._isNull); + return this._K; }, enumerable: true, configurable: true }); Object.defineProperty(Setting.prototype, "value", { get: function () { - _throwIfNotLoaded("value", this.m_value, "Setting", this._isNull); + _throwIfNotLoaded("value", this.m_value, _typeSetting, this._isNull); return this.m_value; }, set: function (value) { @@ -15525,8 +17450,11 @@ var Excel; Setting.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["value"], [], []); }; + Setting.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; Setting.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Setting.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15535,7 +17463,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Key"])) { - this.m_key=obj["Key"]; + this._K=obj["Key"]; } if (!_isUndefined(obj["Value"])) { this.m_value=obj["Value"]; @@ -15543,24 +17471,35 @@ var Excel; } }; Setting.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Setting.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Setting.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; Setting.prototype.toJSON=function () { - return { - "key": this.m_key, - "value": this.m_value - }; + return _toJson(this, { + "key": this._K, + "value": this.m_value, + }, {}); + }; + Setting.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; - Setting.DateJSONPrefix="Date("; - Setting.DateJSONSuffix=")"; return Setting; }(OfficeExtension.ClientObject)); + Setting.DateJSONPrefix="Date("; + Setting.DateJSONSuffix=")"; Excel.Setting=Setting; + var _typeNamedItemCollection="NamedItemCollection"; var NamedItemCollection=(function (_super) { __extends(NamedItemCollection, _super); function NamedItemCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(NamedItemCollection.prototype, "_className", { get: function () { @@ -15569,22 +17508,32 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(NamedItemCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(NamedItemCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "NamedItemCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeNamedItemCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); NamedItemCollection.prototype.add=function (name, reference, comment) { - return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [name, reference, comment], false, true, null)); + _throwIfApiNotSupported("NamedItemCollection.add", _defaultApiSetName, "1.4", _hostName); + return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [name, reference, comment], false, true, null, false)); }; NamedItemCollection.prototype.addFormulaLocal=function (name, formula, comment) { - return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "AddFormulaLocal", 0, [name, formula, comment], false, false, null)); + _throwIfApiNotSupported("NamedItemCollection.addFormulaLocal", _defaultApiSetName, "1.4", _hostName); + return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "AddFormulaLocal", 0, [name, formula, comment], false, false, null, false)); }; NamedItemCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("NamedItemCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -15593,7 +17542,8 @@ var Excel; return new Excel.NamedItem(this.context, _createIndexerObjectPath(this.context, this, [name])); }; NamedItemCollection.prototype.getItemOrNullObject=function (name) { - return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null)); + _throwIfApiNotSupported("NamedItemCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null, false)); }; NamedItemCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15612,19 +17562,27 @@ var Excel; } }; NamedItemCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + NamedItemCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + NamedItemCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.NamedItem(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; NamedItemCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return NamedItemCollection; }(OfficeExtension.ClientObject)); Excel.NamedItemCollection=NamedItemCollection; + var _typeNamedItem="NamedItem"; var NamedItem=(function (_super) { __extends(NamedItem, _super); function NamedItem() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(NamedItem.prototype, "_className", { get: function () { @@ -15633,33 +17591,57 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(NamedItem.prototype, "_scalarPropertyNames", { + get: function () { + return ["name", "type", "value", "visible", "_Id", "comment", "scope"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NamedItem.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, false, false, true, false, true, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NamedItem.prototype, "_navigationPropertyNames", { + get: function () { + return ["worksheet", "worksheetOrNullObject"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(NamedItem.prototype, "worksheet", { get: function () { - if (!this.m_worksheet) { - this.m_worksheet=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false)); + _throwIfApiNotSupported("NamedItem.worksheet", _defaultApiSetName, "1.4", _hostName); + if (!this._W) { + this._W=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false, false)); } - return this.m_worksheet; + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(NamedItem.prototype, "worksheetOrNullObject", { get: function () { - if (!this.m_worksheetOrNullObject) { - this.m_worksheetOrNullObject=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "WorksheetOrNullObject", false, false)); + _throwIfApiNotSupported("NamedItem.worksheetOrNullObject", _defaultApiSetName, "1.4", _hostName); + if (!this._Wo) { + this._Wo=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "WorksheetOrNullObject", false, false, false)); } - return this.m_worksheetOrNullObject; + return this._Wo; }, enumerable: true, configurable: true }); Object.defineProperty(NamedItem.prototype, "comment", { get: function () { - _throwIfNotLoaded("comment", this.m_comment, "NamedItem", this._isNull); - return this.m_comment; + _throwIfNotLoaded("comment", this._C, _typeNamedItem, this._isNull); + _throwIfApiNotSupported("NamedItem.comment", _defaultApiSetName, "1.4", _hostName); + return this._C; }, set: function (value) { - this.m_comment=value; + this._C=value; _createSetPropertyAction(this.context, this, "Comment", value); }, enumerable: true, @@ -15667,43 +17649,44 @@ var Excel; }); Object.defineProperty(NamedItem.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "NamedItem", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeNamedItem, this._isNull); + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(NamedItem.prototype, "scope", { get: function () { - _throwIfNotLoaded("scope", this.m_scope, "NamedItem", this._isNull); - return this.m_scope; + _throwIfNotLoaded("scope", this._S, _typeNamedItem, this._isNull); + _throwIfApiNotSupported("NamedItem.scope", _defaultApiSetName, "1.4", _hostName); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(NamedItem.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "NamedItem", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._T, _typeNamedItem, this._isNull); + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(NamedItem.prototype, "value", { get: function () { - _throwIfNotLoaded("value", this.m_value, "NamedItem", this._isNull); - return this.m_value; + _throwIfNotLoaded("value", this._V, _typeNamedItem, this._isNull); + return this._V; }, enumerable: true, configurable: true }); Object.defineProperty(NamedItem.prototype, "visible", { get: function () { - _throwIfNotLoaded("visible", this.m_visible, "NamedItem", this._isNull); - return this.m_visible; + _throwIfNotLoaded("visible", this._Vi, _typeNamedItem, this._isNull); + return this._Vi; }, set: function (value) { - this.m_visible=value; + this._Vi=value; _createSetPropertyAction(this.context, this, "Visible", value); }, enumerable: true, @@ -15711,28 +17694,31 @@ var Excel; }); Object.defineProperty(NamedItem.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "NamedItem", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeNamedItem, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); NamedItem.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["visible", "comment"], [], [ - "worksheet", - "worksheetOrNullObject", "worksheet", "worksheetOrNullObject" ]); }; + NamedItem.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; NamedItem.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _throwIfApiNotSupported("NamedItem.delete", _defaultApiSetName, "1.4", _hostName); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; NamedItem.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); }; NamedItem.prototype.getRangeOrNullObject=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRangeOrNullObject", 1, [], false, true, null)); + _throwIfApiNotSupported("NamedItem.getRangeOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRangeOrNullObject", 1, [], false, true, null, false)); }; NamedItem.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15741,31 +17727,33 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Comment"])) { - this.m_comment=obj["Comment"]; + this._C=obj["Comment"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Scope"])) { - this.m_scope=obj["Scope"]; + this._S=obj["Scope"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._T=obj["Type"]; } if (!_isUndefined(obj["Value"])) { - this.m_value=obj["Value"]; + this._V=obj["Value"]; } if (!_isUndefined(obj["Visible"])) { - this.m_visible=obj["Visible"]; + this._Vi=obj["Visible"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } _handleNavigationPropertyResults(this, obj, ["worksheet", "Worksheet", "worksheetOrNullObject", "WorksheetOrNullObject"]); }; NamedItem.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + NamedItem.prototype.retrieve=function (option) { + return _retrieve(this, option); }; NamedItem.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -15773,26 +17761,35 @@ var Excel; return; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; + NamedItem.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; NamedItem.prototype.toJSON=function () { - return { - "comment": this.m_comment, - "name": this.m_name, - "scope": this.m_scope, - "type": this.m_type, - "value": this.m_value, - "visible": this.m_visible - }; + return _toJson(this, { + "comment": this._C, + "name": this._N, + "scope": this._S, + "type": this._T, + "value": this._V, + "visible": this._Vi, + }, {}); + }; + NamedItem.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return NamedItem; }(OfficeExtension.ClientObject)); Excel.NamedItem=NamedItem; + var _typeBinding="Binding"; var Binding=(function (_super) { __extends(Binding, _super); function Binding() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Binding.prototype, "_className", { get: function () { @@ -15801,33 +17798,41 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Binding.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "type"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(Binding.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Binding", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeBinding, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Binding.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "Binding", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._T, _typeBinding, this._isNull); + return this._T; }, enumerable: true, configurable: true }); Binding.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _throwIfApiNotSupported("Binding.delete", _defaultApiSetName, "1.3", _hostName); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Binding.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, false, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, false, null, false)); }; Binding.prototype.getTable=function () { - return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetTable", 1, [], false, false, null)); + return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetTable", 1, [], false, false, null, false)); }; Binding.prototype.getText=function () { - var action=_createMethodAction(this.context, this, "GetText", 1, []); + var action=_createMethodAction(this.context, this, "GetText", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -15839,15 +17844,17 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._T=obj["Type"]; } }; Binding.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Binding.prototype.retrieve=function (option) { + return _retrieve(this, option); }; Binding.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -15855,12 +17862,17 @@ var Excel; return; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; + Binding.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; Object.defineProperty(Binding.prototype, "onDataChanged", { get: function () { var _this=this; + _throwIfApiNotSupported("Binding.onDataChanged", _defaultApiSetName, "1.3", _hostName); if (!this.m_dataChanged) { this.m_dataChanged=new OfficeExtension.EventHandlers(this.context, this, "DataChanged", { registerFunc: function (handlerCallback) { @@ -15885,6 +17897,7 @@ var Excel; Object.defineProperty(Binding.prototype, "onSelectionChanged", { get: function () { var _this=this; + _throwIfApiNotSupported("Binding.onSelectionChanged", _defaultApiSetName, "1.3", _hostName); if (!this.m_selectionChanged) { this.m_selectionChanged=new OfficeExtension.EventHandlers(this.context, this, "SelectionChanged", { registerFunc: function (handlerCallback) { @@ -15911,18 +17924,23 @@ var Excel; configurable: true }); Binding.prototype.toJSON=function () { - return { - "id": this.m_id, - "type": this.m_type - }; + return _toJson(this, { + "id": this._I, + "type": this._T, + }, {}); + }; + Binding.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Binding; }(OfficeExtension.ClientObject)); Excel.Binding=Binding; + var _typeBindingCollection="BindingCollection"; var BindingCollection=(function (_super) { __extends(BindingCollection, _super); function BindingCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(BindingCollection.prototype, "_className", { get: function () { @@ -15931,9 +17949,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(BindingCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(BindingCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(BindingCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "BindingCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeBindingCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15941,23 +17973,27 @@ var Excel; }); Object.defineProperty(BindingCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "BindingCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeBindingCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); BindingCollection.prototype.add=function (range, bindingType, id) { - return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [range, bindingType, id], false, true, null)); + _throwIfApiNotSupported("BindingCollection.add", _defaultApiSetName, "1.3", _hostName); + return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [range, bindingType, id], false, true, null, false)); }; BindingCollection.prototype.addFromNamedItem=function (name, bindingType, id) { - return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "AddFromNamedItem", 0, [name, bindingType, id], false, false, null)); + _throwIfApiNotSupported("BindingCollection.addFromNamedItem", _defaultApiSetName, "1.3", _hostName); + return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "AddFromNamedItem", 0, [name, bindingType, id], false, false, null, false)); }; BindingCollection.prototype.addFromSelection=function (bindingType, id) { - return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "AddFromSelection", 0, [bindingType, id], false, false, null)); + _throwIfApiNotSupported("BindingCollection.addFromSelection", _defaultApiSetName, "1.3", _hostName); + return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "AddFromSelection", 0, [bindingType, id], false, false, null, false)); }; BindingCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("BindingCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -15966,10 +18002,11 @@ var Excel; return new Excel.Binding(this.context, _createIndexerObjectPath(this.context, this, [id])); }; BindingCollection.prototype.getItemAt=function (index) { - return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; BindingCollection.prototype.getItemOrNullObject=function (id) { - return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null)); + _throwIfApiNotSupported("BindingCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null, false)); }; BindingCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15978,7 +18015,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15991,21 +18028,29 @@ var Excel; } }; BindingCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + BindingCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + BindingCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.Binding(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; BindingCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return BindingCollection; }(OfficeExtension.ClientObject)); Excel.BindingCollection=BindingCollection; + var _typeTableCollection="TableCollection"; var TableCollection=(function (_super) { __extends(TableCollection, _super); function TableCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableCollection.prototype, "_className", { get: function () { @@ -16014,9 +18059,33 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TableCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableCollection.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject=value; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TableCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -16024,17 +18093,18 @@ var Excel; }); Object.defineProperty(TableCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "TableCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeTableCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); TableCollection.prototype.add=function (address, hasHeaders) { - return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [address, hasHeaders], false, true, null)); + return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [address, hasHeaders], false, true, null, false)); }; TableCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("TableCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -16043,10 +18113,11 @@ var Excel; return new Excel.Table(this.context, _createIndexerObjectPath(this.context, this, [key])); }; TableCollection.prototype.getItemAt=function (index) { - return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; TableCollection.prototype.getItemOrNullObject=function (key) { - return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null)); + _throwIfApiNotSupported("TableCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null, false)); }; TableCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16055,7 +18126,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -16068,21 +18139,29 @@ var Excel; } }; TableCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.Table(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; TableCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return TableCollection; }(OfficeExtension.ClientObject)); Excel.TableCollection=TableCollection; + var _typeTable="Table"; var Table=(function (_super) { __extends(Table, _super); function Table() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Table.prototype, "_className", { get: function () { @@ -16091,53 +18170,77 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Table.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "name", "showHeaders", "showTotals", "style", "highlightFirstColumn", "highlightLastColumn", "showBandedRows", "showBandedColumns", "showFilterButton"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Table.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, true, true, true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Table.prototype, "_navigationPropertyNames", { + get: function () { + return ["columns", "rows", "sort", "worksheet"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(Table.prototype, "columns", { get: function () { - if (!this.m_columns) { - this.m_columns=new Excel.TableColumnCollection(this.context, _createPropertyObjectPath(this.context, this, "Columns", true, false)); + if (!this._C) { + this._C=new Excel.TableColumnCollection(this.context, _createPropertyObjectPath(this.context, this, "Columns", true, false, false)); } - return this.m_columns; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "rows", { get: function () { - if (!this.m_rows) { - this.m_rows=new Excel.TableRowCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false)); + if (!this._R) { + this._R=new Excel.TableRowCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false, false)); } - return this.m_rows; + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "sort", { get: function () { - if (!this.m_sort) { - this.m_sort=new Excel.TableSort(this.context, _createPropertyObjectPath(this.context, this, "Sort", false, false)); + _throwIfApiNotSupported("Table.sort", _defaultApiSetName, "1.2", _hostName); + if (!this._So) { + this._So=new Excel.TableSort(this.context, _createPropertyObjectPath(this.context, this, "Sort", false, false, false)); } - return this.m_sort; + return this._So; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "worksheet", { get: function () { - if (!this.m_worksheet) { - this.m_worksheet=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false)); + _throwIfApiNotSupported("Table.worksheet", _defaultApiSetName, "1.2", _hostName); + if (!this._W) { + this._W=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false, false)); } - return this.m_worksheet; + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "highlightFirstColumn", { get: function () { - _throwIfNotLoaded("highlightFirstColumn", this.m_highlightFirstColumn, "Table", this._isNull); - return this.m_highlightFirstColumn; + _throwIfNotLoaded("highlightFirstColumn", this._H, _typeTable, this._isNull); + _throwIfApiNotSupported("Table.highlightFirstColumn", _defaultApiSetName, "1.3", _hostName); + return this._H; }, set: function (value) { - this.m_highlightFirstColumn=value; + this._H=value; _createSetPropertyAction(this.context, this, "HighlightFirstColumn", value); }, enumerable: true, @@ -16145,11 +18248,12 @@ var Excel; }); Object.defineProperty(Table.prototype, "highlightLastColumn", { get: function () { - _throwIfNotLoaded("highlightLastColumn", this.m_highlightLastColumn, "Table", this._isNull); - return this.m_highlightLastColumn; + _throwIfNotLoaded("highlightLastColumn", this._Hi, _typeTable, this._isNull); + _throwIfApiNotSupported("Table.highlightLastColumn", _defaultApiSetName, "1.3", _hostName); + return this._Hi; }, set: function (value) { - this.m_highlightLastColumn=value; + this._Hi=value; _createSetPropertyAction(this.context, this, "HighlightLastColumn", value); }, enumerable: true, @@ -16157,19 +18261,19 @@ var Excel; }); Object.defineProperty(Table.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Table", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeTable, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "Table", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeTable, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -16177,11 +18281,12 @@ var Excel; }); Object.defineProperty(Table.prototype, "showBandedColumns", { get: function () { - _throwIfNotLoaded("showBandedColumns", this.m_showBandedColumns, "Table", this._isNull); - return this.m_showBandedColumns; + _throwIfNotLoaded("showBandedColumns", this._S, _typeTable, this._isNull); + _throwIfApiNotSupported("Table.showBandedColumns", _defaultApiSetName, "1.3", _hostName); + return this._S; }, set: function (value) { - this.m_showBandedColumns=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShowBandedColumns", value); }, enumerable: true, @@ -16189,11 +18294,12 @@ var Excel; }); Object.defineProperty(Table.prototype, "showBandedRows", { get: function () { - _throwIfNotLoaded("showBandedRows", this.m_showBandedRows, "Table", this._isNull); - return this.m_showBandedRows; + _throwIfNotLoaded("showBandedRows", this._Sh, _typeTable, this._isNull); + _throwIfApiNotSupported("Table.showBandedRows", _defaultApiSetName, "1.3", _hostName); + return this._Sh; }, set: function (value) { - this.m_showBandedRows=value; + this._Sh=value; _createSetPropertyAction(this.context, this, "ShowBandedRows", value); }, enumerable: true, @@ -16201,11 +18307,12 @@ var Excel; }); Object.defineProperty(Table.prototype, "showFilterButton", { get: function () { - _throwIfNotLoaded("showFilterButton", this.m_showFilterButton, "Table", this._isNull); - return this.m_showFilterButton; + _throwIfNotLoaded("showFilterButton", this._Sho, _typeTable, this._isNull); + _throwIfApiNotSupported("Table.showFilterButton", _defaultApiSetName, "1.3", _hostName); + return this._Sho; }, set: function (value) { - this.m_showFilterButton=value; + this._Sho=value; _createSetPropertyAction(this.context, this, "ShowFilterButton", value); }, enumerable: true, @@ -16213,11 +18320,11 @@ var Excel; }); Object.defineProperty(Table.prototype, "showHeaders", { get: function () { - _throwIfNotLoaded("showHeaders", this.m_showHeaders, "Table", this._isNull); - return this.m_showHeaders; + _throwIfNotLoaded("showHeaders", this._Show, _typeTable, this._isNull); + return this._Show; }, set: function (value) { - this.m_showHeaders=value; + this._Show=value; _createSetPropertyAction(this.context, this, "ShowHeaders", value); }, enumerable: true, @@ -16225,11 +18332,11 @@ var Excel; }); Object.defineProperty(Table.prototype, "showTotals", { get: function () { - _throwIfNotLoaded("showTotals", this.m_showTotals, "Table", this._isNull); - return this.m_showTotals; + _throwIfNotLoaded("showTotals", this._ShowT, _typeTable, this._isNull); + return this._ShowT; }, set: function (value) { - this.m_showTotals=value; + this._ShowT=value; _createSetPropertyAction(this.context, this, "ShowTotals", value); }, enumerable: true, @@ -16237,11 +18344,11 @@ var Excel; }); Object.defineProperty(Table.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "Table", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._St, _typeTable, this._isNull); + return this._St; }, set: function (value) { - this.m_style=value; + this._St=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -16249,39 +18356,41 @@ var Excel; }); Table.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["name", "showHeaders", "showTotals", "style", "highlightFirstColumn", "highlightLastColumn", "showBandedRows", "showBandedColumns", "showFilterButton"], [], [ - "columns", - "rows", - "sort", - "worksheet", "columns", "rows", "sort", "worksheet" ]); }; + Table.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; Table.prototype.clearFilters=function () { - _createMethodAction(this.context, this, "ClearFilters", 0, []); + _throwIfApiNotSupported("Table.clearFilters", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "ClearFilters", 0, [], false); }; Table.prototype.convertToRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "ConvertToRange", 0, [], false, true, null)); + _throwIfApiNotSupported("Table.convertToRange", _defaultApiSetName, "1.2", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "ConvertToRange", 0, [], false, true, null, false)); }; Table.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Table.prototype.getDataBodyRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetDataBodyRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetDataBodyRange", 1, [], false, true, null, false)); }; Table.prototype.getHeaderRowRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetHeaderRowRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetHeaderRowRange", 1, [], false, true, null, false)); }; Table.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); }; Table.prototype.getTotalRowRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetTotalRowRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetTotalRowRange", 1, [], false, true, null, false)); }; Table.prototype.reapplyFilters=function () { - _createMethodAction(this.context, this, "ReapplyFilters", 0, []); + _throwIfApiNotSupported("Table.reapplyFilters", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "ReapplyFilters", 0, [], false); }; Table.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16289,41 +18398,46 @@ var Excel; return; var obj=value; _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + obj["Id"]=obj["Id"].toString(); + } if (!_isUndefined(obj["HighlightFirstColumn"])) { - this.m_highlightFirstColumn=obj["HighlightFirstColumn"]; + this._H=obj["HighlightFirstColumn"]; } if (!_isUndefined(obj["HighlightLastColumn"])) { - this.m_highlightLastColumn=obj["HighlightLastColumn"]; + this._Hi=obj["HighlightLastColumn"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["ShowBandedColumns"])) { - this.m_showBandedColumns=obj["ShowBandedColumns"]; + this._S=obj["ShowBandedColumns"]; } if (!_isUndefined(obj["ShowBandedRows"])) { - this.m_showBandedRows=obj["ShowBandedRows"]; + this._Sh=obj["ShowBandedRows"]; } if (!_isUndefined(obj["ShowFilterButton"])) { - this.m_showFilterButton=obj["ShowFilterButton"]; + this._Sho=obj["ShowFilterButton"]; } if (!_isUndefined(obj["ShowHeaders"])) { - this.m_showHeaders=obj["ShowHeaders"]; + this._Show=obj["ShowHeaders"]; } if (!_isUndefined(obj["ShowTotals"])) { - this.m_showTotals=obj["ShowTotals"]; + this._ShowT=obj["ShowTotals"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._St=obj["Style"]; } _handleNavigationPropertyResults(this, obj, ["columns", "Columns", "rows", "Rows", "sort", "Sort", "worksheet", "Worksheet"]); }; Table.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Table.prototype.retrieve=function (option) { + return _retrieve(this, option); }; Table.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -16331,30 +18445,44 @@ var Excel; return; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + value["Id"]=value["Id"].toString(); + this._I=value["Id"]; } }; + Table.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; Table.prototype.toJSON=function () { - return { - "highlightFirstColumn": this.m_highlightFirstColumn, - "highlightLastColumn": this.m_highlightLastColumn, - "id": this.m_id, - "name": this.m_name, - "showBandedColumns": this.m_showBandedColumns, - "showBandedRows": this.m_showBandedRows, - "showFilterButton": this.m_showFilterButton, - "showHeaders": this.m_showHeaders, - "showTotals": this.m_showTotals, - "style": this.m_style - }; + return _toJson(this, { + "highlightFirstColumn": this._H, + "highlightLastColumn": this._Hi, + "id": this._I, + "name": this._N, + "showBandedColumns": this._S, + "showBandedRows": this._Sh, + "showFilterButton": this._Sho, + "showHeaders": this._Show, + "showTotals": this._ShowT, + "style": this._St, + }, { + "columns": this._C, + "rows": this._R, + "sort": this._So, + }); + }; + Table.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Table; }(OfficeExtension.ClientObject)); Excel.Table=Table; + var _typeTableColumnCollection="TableColumnCollection"; var TableColumnCollection=(function (_super) { __extends(TableColumnCollection, _super); function TableColumnCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableColumnCollection.prototype, "_className", { get: function () { @@ -16363,9 +18491,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TableColumnCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableColumnCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TableColumnCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableColumnCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableColumnCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -16373,17 +18515,18 @@ var Excel; }); Object.defineProperty(TableColumnCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "TableColumnCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeTableColumnCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); TableColumnCollection.prototype.add=function (index, values, name) { - return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [index, values, name], false, true, null)); + return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [index, values, name], false, true, null, false)); }; TableColumnCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("TableColumnCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -16392,10 +18535,11 @@ var Excel; return new Excel.TableColumn(this.context, _createIndexerObjectPath(this.context, this, [key])); }; TableColumnCollection.prototype.getItemAt=function (index) { - return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; TableColumnCollection.prototype.getItemOrNullObject=function (key) { - return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null)); + _throwIfApiNotSupported("TableColumnCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null, false)); }; TableColumnCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16404,7 +18548,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -16417,21 +18561,29 @@ var Excel; } }; TableColumnCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableColumnCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableColumnCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.TableColumn(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; TableColumnCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return TableColumnCollection; }(OfficeExtension.ClientObject)); Excel.TableColumnCollection=TableColumnCollection; + var _typeTableColumn="TableColumn"; var TableColumn=(function (_super) { __extends(TableColumn, _super); function TableColumn() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableColumn.prototype, "_className", { get: function () { @@ -16440,39 +18592,61 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TableColumn.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "index", "values", "name"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableColumn.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, false, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableColumn.prototype, "_navigationPropertyNames", { + get: function () { + return ["filter"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TableColumn.prototype, "filter", { get: function () { - if (!this.m_filter) { - this.m_filter=new Excel.Filter(this.context, _createPropertyObjectPath(this.context, this, "Filter", false, false)); + _throwIfApiNotSupported("TableColumn.filter", _defaultApiSetName, "1.2", _hostName); + if (!this._F) { + this._F=new Excel.Filter(this.context, _createPropertyObjectPath(this.context, this, "Filter", false, false, false)); } - return this.m_filter; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(TableColumn.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "TableColumn", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeTableColumn, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(TableColumn.prototype, "index", { get: function () { - _throwIfNotLoaded("index", this.m_index, "TableColumn", this._isNull); - return this.m_index; + _throwIfNotLoaded("index", this._In, _typeTableColumn, this._isNull); + return this._In; }, enumerable: true, configurable: true }); Object.defineProperty(TableColumn.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "TableColumn", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeTableColumn, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -16480,11 +18654,11 @@ var Excel; }); Object.defineProperty(TableColumn.prototype, "values", { get: function () { - _throwIfNotLoaded("values", this.m_values, "TableColumn", this._isNull); - return this.m_values; + _throwIfNotLoaded("values", this._V, _typeTableColumn, this._isNull); + return this._V; }, set: function (value) { - this.m_values=value; + this._V=value; _createSetPropertyAction(this.context, this, "Values", value); }, enumerable: true, @@ -16492,24 +18666,26 @@ var Excel; }); TableColumn.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["values", "name"], [], [ - "filter", "filter" ]); }; + TableColumn.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; TableColumn.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; TableColumn.prototype.getDataBodyRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetDataBodyRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetDataBodyRange", 1, [], false, true, null, false)); }; TableColumn.prototype.getHeaderRowRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetHeaderRowRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetHeaderRowRange", 1, [], false, true, null, false)); }; TableColumn.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); }; TableColumn.prototype.getTotalRowRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetTotalRowRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetTotalRowRange", 1, [], false, true, null, false)); }; TableColumn.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16518,22 +18694,24 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Index"])) { - this.m_index=obj["Index"]; + this._In=obj["Index"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Values"])) { - this.m_values=obj["Values"]; + this._V=obj["Values"]; } _handleNavigationPropertyResults(this, obj, ["filter", "Filter"]); }; TableColumn.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableColumn.prototype.retrieve=function (option) { + return _retrieve(this, option); }; TableColumn.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -16541,24 +18719,35 @@ var Excel; return; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; + TableColumn.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; TableColumn.prototype.toJSON=function () { - return { - "id": this.m_id, - "index": this.m_index, - "name": this.m_name, - "values": this.m_values - }; + return _toJson(this, { + "id": this._I, + "index": this._In, + "name": this._N, + "values": this._V, + }, { + "filter": this._F, + }); + }; + TableColumn.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TableColumn; }(OfficeExtension.ClientObject)); Excel.TableColumn=TableColumn; + var _typeTableRowCollection="TableRowCollection"; var TableRowCollection=(function (_super) { __extends(TableRowCollection, _super); function TableRowCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableRowCollection.prototype, "_className", { get: function () { @@ -16567,9 +18756,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TableRowCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableRowCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TableRowCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableRowCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableRowCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -16577,23 +18780,24 @@ var Excel; }); Object.defineProperty(TableRowCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "TableRowCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeTableRowCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); TableRowCollection.prototype.add=function (index, values) { - return new Excel.TableRow(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [index, values], false, true, null)); + return new Excel.TableRow(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [index, values], false, true, null, false)); }; TableRowCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("TableRowCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; TableRowCollection.prototype.getItemAt=function (index) { - return new Excel.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; TableRowCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16602,7 +18806,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -16615,21 +18819,29 @@ var Excel; } }; TableRowCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableRowCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableRowCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.TableRow(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(false, _this.context, _this, childItemData, index)); }); }; TableRowCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return TableRowCollection; }(OfficeExtension.ClientObject)); Excel.TableRowCollection=TableRowCollection; + var _typeTableRow="TableRow"; var TableRow=(function (_super) { __extends(TableRow, _super); function TableRow() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableRow.prototype, "_className", { get: function () { @@ -16638,21 +18850,35 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TableRow.prototype, "_scalarPropertyNames", { + get: function () { + return ["index", "values"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableRow.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TableRow.prototype, "index", { get: function () { - _throwIfNotLoaded("index", this.m_index, "TableRow", this._isNull); - return this.m_index; + _throwIfNotLoaded("index", this._I, _typeTableRow, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "values", { get: function () { - _throwIfNotLoaded("values", this.m_values, "TableRow", this._isNull); - return this.m_values; + _throwIfNotLoaded("values", this._V, _typeTableRow, this._isNull); + return this._V; }, set: function (value) { - this.m_values=value; + this._V=value; _createSetPropertyAction(this.context, this, "Values", value); }, enumerable: true, @@ -16661,11 +18887,14 @@ var Excel; TableRow.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["values"], [], []); }; + TableRow.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; TableRow.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; TableRow.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); }; TableRow.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16674,29 +18903,40 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Index"])) { - this.m_index=obj["Index"]; + this._I=obj["Index"]; } if (!_isUndefined(obj["Values"])) { - this.m_values=obj["Values"]; + this._V=obj["Values"]; } }; TableRow.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableRow.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableRow.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; TableRow.prototype.toJSON=function () { - return { - "index": this.m_index, - "values": this.m_values - }; + return _toJson(this, { + "index": this._I, + "values": this._V, + }, {}); + }; + TableRow.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TableRow; }(OfficeExtension.ClientObject)); Excel.TableRow=TableRow; + var _typeRangeFormat="RangeFormat"; var RangeFormat=(function (_super) { __extends(RangeFormat, _super); function RangeFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeFormat.prototype, "_className", { get: function () { @@ -16705,53 +18945,76 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["wrapText", "horizontalAlignment", "verticalAlignment", "columnWidth", "rowHeight"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["fill", "font", "borders", "protection"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeFormat.prototype, "borders", { get: function () { - if (!this.m_borders) { - this.m_borders=new Excel.RangeBorderCollection(this.context, _createPropertyObjectPath(this.context, this, "Borders", true, false)); + if (!this._B) { + this._B=new Excel.RangeBorderCollection(this.context, _createPropertyObjectPath(this.context, this, "Borders", true, false, false)); } - return this.m_borders; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(RangeFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.RangeFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.RangeFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(RangeFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.RangeFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Excel.RangeFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true }); Object.defineProperty(RangeFormat.prototype, "protection", { get: function () { - if (!this.m_protection) { - this.m_protection=new Excel.FormatProtection(this.context, _createPropertyObjectPath(this.context, this, "Protection", false, false)); + _throwIfApiNotSupported("RangeFormat.protection", _defaultApiSetName, "1.2", _hostName); + if (!this._P) { + this._P=new Excel.FormatProtection(this.context, _createPropertyObjectPath(this.context, this, "Protection", false, false, false)); } - return this.m_protection; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(RangeFormat.prototype, "columnWidth", { get: function () { - _throwIfNotLoaded("columnWidth", this.m_columnWidth, "RangeFormat", this._isNull); - return this.m_columnWidth; + _throwIfNotLoaded("columnWidth", this._C, _typeRangeFormat, this._isNull); + _throwIfApiNotSupported("RangeFormat.columnWidth", _defaultApiSetName, "1.2", _hostName); + return this._C; }, set: function (value) { - this.m_columnWidth=value; + this._C=value; _createSetPropertyAction(this.context, this, "ColumnWidth", value); }, enumerable: true, @@ -16759,11 +19022,11 @@ var Excel; }); Object.defineProperty(RangeFormat.prototype, "horizontalAlignment", { get: function () { - _throwIfNotLoaded("horizontalAlignment", this.m_horizontalAlignment, "RangeFormat", this._isNull); - return this.m_horizontalAlignment; + _throwIfNotLoaded("horizontalAlignment", this._H, _typeRangeFormat, this._isNull); + return this._H; }, set: function (value) { - this.m_horizontalAlignment=value; + this._H=value; _createSetPropertyAction(this.context, this, "HorizontalAlignment", value); }, enumerable: true, @@ -16771,11 +19034,12 @@ var Excel; }); Object.defineProperty(RangeFormat.prototype, "rowHeight", { get: function () { - _throwIfNotLoaded("rowHeight", this.m_rowHeight, "RangeFormat", this._isNull); - return this.m_rowHeight; + _throwIfNotLoaded("rowHeight", this._R, _typeRangeFormat, this._isNull); + _throwIfApiNotSupported("RangeFormat.rowHeight", _defaultApiSetName, "1.2", _hostName); + return this._R; }, set: function (value) { - this.m_rowHeight=value; + this._R=value; _createSetPropertyAction(this.context, this, "RowHeight", value); }, enumerable: true, @@ -16783,11 +19047,11 @@ var Excel; }); Object.defineProperty(RangeFormat.prototype, "verticalAlignment", { get: function () { - _throwIfNotLoaded("verticalAlignment", this.m_verticalAlignment, "RangeFormat", this._isNull); - return this.m_verticalAlignment; + _throwIfNotLoaded("verticalAlignment", this._V, _typeRangeFormat, this._isNull); + return this._V; }, set: function (value) { - this.m_verticalAlignment=value; + this._V=value; _createSetPropertyAction(this.context, this, "VerticalAlignment", value); }, enumerable: true, @@ -16795,11 +19059,11 @@ var Excel; }); Object.defineProperty(RangeFormat.prototype, "wrapText", { get: function () { - _throwIfNotLoaded("wrapText", this.m_wrapText, "RangeFormat", this._isNull); - return this.m_wrapText; + _throwIfNotLoaded("wrapText", this._W, _typeRangeFormat, this._isNull); + return this._W; }, set: function (value) { - this.m_wrapText=value; + this._W=value; _createSetPropertyAction(this.context, this, "WrapText", value); }, enumerable: true, @@ -16807,15 +19071,19 @@ var Excel; }); RangeFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["wrapText", "horizontalAlignment", "verticalAlignment", "columnWidth", "rowHeight"], ["fill", "font", "protection"], [ - "borders", "borders" ]); }; + RangeFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; RangeFormat.prototype.autofitColumns=function () { - _createMethodAction(this.context, this, "AutofitColumns", 0, []); + _throwIfApiNotSupported("RangeFormat.autofitColumns", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "AutofitColumns", 0, [], false); }; RangeFormat.prototype.autofitRows=function () { - _createMethodAction(this.context, this, "AutofitRows", 0, []); + _throwIfApiNotSupported("RangeFormat.autofitRows", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "AutofitRows", 0, [], false); }; RangeFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16824,45 +19092,58 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["ColumnWidth"])) { - this.m_columnWidth=obj["ColumnWidth"]; + this._C=obj["ColumnWidth"]; } if (!_isUndefined(obj["HorizontalAlignment"])) { - this.m_horizontalAlignment=obj["HorizontalAlignment"]; + this._H=obj["HorizontalAlignment"]; } if (!_isUndefined(obj["RowHeight"])) { - this.m_rowHeight=obj["RowHeight"]; + this._R=obj["RowHeight"]; } if (!_isUndefined(obj["VerticalAlignment"])) { - this.m_verticalAlignment=obj["VerticalAlignment"]; + this._V=obj["VerticalAlignment"]; } if (!_isUndefined(obj["WrapText"])) { - this.m_wrapText=obj["WrapText"]; + this._W=obj["WrapText"]; } _handleNavigationPropertyResults(this, obj, ["borders", "Borders", "fill", "Fill", "font", "Font", "protection", "Protection"]); }; RangeFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; RangeFormat.prototype.toJSON=function () { - return { - "columnWidth": this.m_columnWidth, - "fill": this.m_fill, - "font": this.m_font, - "horizontalAlignment": this.m_horizontalAlignment, - "protection": this.m_protection, - "rowHeight": this.m_rowHeight, - "verticalAlignment": this.m_verticalAlignment, - "wrapText": this.m_wrapText - }; + return _toJson(this, { + "columnWidth": this._C, + "horizontalAlignment": this._H, + "rowHeight": this._R, + "verticalAlignment": this._V, + "wrapText": this._W, + }, { + "borders": this._B, + "fill": this._F, + "font": this._Fo, + "protection": this._P, + }); + }; + RangeFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return RangeFormat; }(OfficeExtension.ClientObject)); Excel.RangeFormat=RangeFormat; + var _typeFormatProtection="FormatProtection"; var FormatProtection=(function (_super) { __extends(FormatProtection, _super); function FormatProtection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(FormatProtection.prototype, "_className", { get: function () { @@ -16871,13 +19152,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(FormatProtection.prototype, "_scalarPropertyNames", { + get: function () { + return ["locked", "formulaHidden"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FormatProtection.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(FormatProtection.prototype, "formulaHidden", { get: function () { - _throwIfNotLoaded("formulaHidden", this.m_formulaHidden, "FormatProtection", this._isNull); - return this.m_formulaHidden; + _throwIfNotLoaded("formulaHidden", this._F, _typeFormatProtection, this._isNull); + return this._F; }, set: function (value) { - this.m_formulaHidden=value; + this._F=value; _createSetPropertyAction(this.context, this, "FormulaHidden", value); }, enumerable: true, @@ -16885,11 +19180,11 @@ var Excel; }); Object.defineProperty(FormatProtection.prototype, "locked", { get: function () { - _throwIfNotLoaded("locked", this.m_locked, "FormatProtection", this._isNull); - return this.m_locked; + _throwIfNotLoaded("locked", this._L, _typeFormatProtection, this._isNull); + return this._L; }, set: function (value) { - this.m_locked=value; + this._L=value; _createSetPropertyAction(this.context, this, "Locked", value); }, enumerable: true, @@ -16898,6 +19193,9 @@ var Excel; FormatProtection.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["locked", "formulaHidden"], [], []); }; + FormatProtection.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; FormatProtection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16905,29 +19203,40 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["FormulaHidden"])) { - this.m_formulaHidden=obj["FormulaHidden"]; + this._F=obj["FormulaHidden"]; } if (!_isUndefined(obj["Locked"])) { - this.m_locked=obj["Locked"]; + this._L=obj["Locked"]; } }; FormatProtection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + FormatProtection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + FormatProtection.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; FormatProtection.prototype.toJSON=function () { - return { - "formulaHidden": this.m_formulaHidden, - "locked": this.m_locked - }; + return _toJson(this, { + "formulaHidden": this._F, + "locked": this._L, + }, {}); + }; + FormatProtection.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return FormatProtection; }(OfficeExtension.ClientObject)); Excel.FormatProtection=FormatProtection; + var _typeRangeFill="RangeFill"; var RangeFill=(function (_super) { __extends(RangeFill, _super); function RangeFill() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeFill.prototype, "_className", { get: function () { @@ -16936,13 +19245,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeFill.prototype, "_scalarPropertyNames", { + get: function () { + return ["color"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFill.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeFill.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "RangeFill", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeRangeFill, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -16951,8 +19274,11 @@ var Excel; RangeFill.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["color"], [], []); }; + RangeFill.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; RangeFill.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; RangeFill.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16961,25 +19287,36 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } }; RangeFill.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeFill.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeFill.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; RangeFill.prototype.toJSON=function () { - return { - "color": this.m_color - }; + return _toJson(this, { + "color": this._C, + }, {}); + }; + RangeFill.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return RangeFill; }(OfficeExtension.ClientObject)); Excel.RangeFill=RangeFill; + var _typeRangeBorder="RangeBorder"; var RangeBorder=(function (_super) { __extends(RangeBorder, _super); function RangeBorder() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeBorder.prototype, "_className", { get: function () { @@ -16988,13 +19325,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeBorder.prototype, "_scalarPropertyNames", { + get: function () { + return ["sideIndex", "style", "weight", "color"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeBorder.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeBorder.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "RangeBorder", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeRangeBorder, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -17002,19 +19353,19 @@ var Excel; }); Object.defineProperty(RangeBorder.prototype, "sideIndex", { get: function () { - _throwIfNotLoaded("sideIndex", this.m_sideIndex, "RangeBorder", this._isNull); - return this.m_sideIndex; + _throwIfNotLoaded("sideIndex", this._S, _typeRangeBorder, this._isNull); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(RangeBorder.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "RangeBorder", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._St, _typeRangeBorder, this._isNull); + return this._St; }, set: function (value) { - this.m_style=value; + this._St=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -17022,11 +19373,11 @@ var Excel; }); Object.defineProperty(RangeBorder.prototype, "weight", { get: function () { - _throwIfNotLoaded("weight", this.m_weight, "RangeBorder", this._isNull); - return this.m_weight; + _throwIfNotLoaded("weight", this._W, _typeRangeBorder, this._isNull); + return this._W; }, set: function (value) { - this.m_weight=value; + this._W=value; _createSetPropertyAction(this.context, this, "Weight", value); }, enumerable: true, @@ -17035,6 +19386,9 @@ var Excel; RangeBorder.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["style", "weight", "color"], [], []); }; + RangeBorder.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; RangeBorder.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -17042,37 +19396,48 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["SideIndex"])) { - this.m_sideIndex=obj["SideIndex"]; + this._S=obj["SideIndex"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._St=obj["Style"]; } if (!_isUndefined(obj["Weight"])) { - this.m_weight=obj["Weight"]; + this._W=obj["Weight"]; } }; RangeBorder.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeBorder.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeBorder.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; RangeBorder.prototype.toJSON=function () { - return { - "color": this.m_color, - "sideIndex": this.m_sideIndex, - "style": this.m_style, - "weight": this.m_weight - }; + return _toJson(this, { + "color": this._C, + "sideIndex": this._S, + "style": this._St, + "weight": this._W, + }, {}); + }; + RangeBorder.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return RangeBorder; }(OfficeExtension.ClientObject)); Excel.RangeBorder=RangeBorder; + var _typeRangeBorderCollection="RangeBorderCollection"; var RangeBorderCollection=(function (_super) { __extends(RangeBorderCollection, _super); function RangeBorderCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeBorderCollection.prototype, "_className", { get: function () { @@ -17081,9 +19446,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeBorderCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeBorderCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeBorderCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "RangeBorderCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeRangeBorderCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -17091,8 +19470,8 @@ var Excel; }); Object.defineProperty(RangeBorderCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "RangeBorderCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeRangeBorderCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true @@ -17101,7 +19480,7 @@ var Excel; return new Excel.RangeBorder(this.context, _createIndexerObjectPath(this.context, this, [index])); }; RangeBorderCollection.prototype.getItemAt=function (index) { - return new Excel.RangeBorder(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.RangeBorder(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; RangeBorderCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17110,7 +19489,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -17123,21 +19502,29 @@ var Excel; } }; RangeBorderCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeBorderCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeBorderCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.RangeBorder(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; RangeBorderCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return RangeBorderCollection; }(OfficeExtension.ClientObject)); Excel.RangeBorderCollection=RangeBorderCollection; + var _typeRangeFont="RangeFont"; var RangeFont=(function (_super) { __extends(RangeFont, _super); function RangeFont() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeFont.prototype, "_className", { get: function () { @@ -17146,13 +19533,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeFont.prototype, "_scalarPropertyNames", { + get: function () { + return ["name", "size", "color", "italic", "bold", "underline"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFont.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeFont.prototype, "bold", { get: function () { - _throwIfNotLoaded("bold", this.m_bold, "RangeFont", this._isNull); - return this.m_bold; + _throwIfNotLoaded("bold", this._B, _typeRangeFont, this._isNull); + return this._B; }, set: function (value) { - this.m_bold=value; + this._B=value; _createSetPropertyAction(this.context, this, "Bold", value); }, enumerable: true, @@ -17160,11 +19561,11 @@ var Excel; }); Object.defineProperty(RangeFont.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "RangeFont", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeRangeFont, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -17172,11 +19573,11 @@ var Excel; }); Object.defineProperty(RangeFont.prototype, "italic", { get: function () { - _throwIfNotLoaded("italic", this.m_italic, "RangeFont", this._isNull); - return this.m_italic; + _throwIfNotLoaded("italic", this._I, _typeRangeFont, this._isNull); + return this._I; }, set: function (value) { - this.m_italic=value; + this._I=value; _createSetPropertyAction(this.context, this, "Italic", value); }, enumerable: true, @@ -17184,11 +19585,11 @@ var Excel; }); Object.defineProperty(RangeFont.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "RangeFont", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeRangeFont, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -17196,11 +19597,11 @@ var Excel; }); Object.defineProperty(RangeFont.prototype, "size", { get: function () { - _throwIfNotLoaded("size", this.m_size, "RangeFont", this._isNull); - return this.m_size; + _throwIfNotLoaded("size", this._S, _typeRangeFont, this._isNull); + return this._S; }, set: function (value) { - this.m_size=value; + this._S=value; _createSetPropertyAction(this.context, this, "Size", value); }, enumerable: true, @@ -17208,11 +19609,11 @@ var Excel; }); Object.defineProperty(RangeFont.prototype, "underline", { get: function () { - _throwIfNotLoaded("underline", this.m_underline, "RangeFont", this._isNull); - return this.m_underline; + _throwIfNotLoaded("underline", this._U, _typeRangeFont, this._isNull); + return this._U; }, set: function (value) { - this.m_underline=value; + this._U=value; _createSetPropertyAction(this.context, this, "Underline", value); }, enumerable: true, @@ -17221,6 +19622,9 @@ var Excel; RangeFont.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["name", "size", "color", "italic", "bold", "underline"], [], []); }; + RangeFont.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; RangeFont.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -17228,45 +19632,56 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Bold"])) { - this.m_bold=obj["Bold"]; + this._B=obj["Bold"]; } if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["Italic"])) { - this.m_italic=obj["Italic"]; + this._I=obj["Italic"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Size"])) { - this.m_size=obj["Size"]; + this._S=obj["Size"]; } if (!_isUndefined(obj["Underline"])) { - this.m_underline=obj["Underline"]; + this._U=obj["Underline"]; } }; RangeFont.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeFont.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeFont.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; RangeFont.prototype.toJSON=function () { - return { - "bold": this.m_bold, - "color": this.m_color, - "italic": this.m_italic, - "name": this.m_name, - "size": this.m_size, - "underline": this.m_underline - }; + return _toJson(this, { + "bold": this._B, + "color": this._C, + "italic": this._I, + "name": this._N, + "size": this._S, + "underline": this._U, + }, {}); + }; + RangeFont.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return RangeFont; }(OfficeExtension.ClientObject)); Excel.RangeFont=RangeFont; + var _typeChartCollection="ChartCollection"; var ChartCollection=(function (_super) { __extends(ChartCollection, _super); function ChartCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartCollection.prototype, "_className", { get: function () { @@ -17275,9 +19690,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ChartCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeChartCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -17285,8 +19714,8 @@ var Excel; }); Object.defineProperty(ChartCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "ChartCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeChartCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true @@ -17295,22 +19724,24 @@ var Excel; if (!(sourceData instanceof Range)) { throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument, "sourceData", "Charts.Add"); } - return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [type, sourceData, seriesBy], false, true, null)); + return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [type, sourceData, seriesBy], false, true, null, false)); }; ChartCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("ChartCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; ChartCollection.prototype.getItem=function (name) { - return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItem", 1, [name], false, false, null)); + return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItem", 1, [name], false, false, null, false)); }; ChartCollection.prototype.getItemAt=function (index) { - return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; ChartCollection.prototype.getItemOrNullObject=function (name) { - return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null)); + _throwIfApiNotSupported("ChartCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null, false)); }; ChartCollection.prototype._GetItem=function (key) { return new Excel.Chart(this.context, _createIndexerObjectPath(this.context, this, [key])); @@ -17322,7 +19753,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -17335,106 +19766,136 @@ var Excel; } }; ChartCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.Chart(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; ChartCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return ChartCollection; }(OfficeExtension.ClientObject)); Excel.ChartCollection=ChartCollection; + var _typeChart="Chart"; var Chart=(function (_super) { __extends(Chart, _super); function Chart() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Chart.prototype, "_className", { get: function () { - return "Chart"; + return "Chart"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Chart.prototype, "_scalarPropertyNames", { + get: function () { + return ["name", "top", "left", "width", "height"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Chart.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Chart.prototype, "_navigationPropertyNames", { + get: function () { + return ["title", "dataLabels", "legend", "series", "axes", "format", "worksheet"]; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "axes", { get: function () { - if (!this.m_axes) { - this.m_axes=new Excel.ChartAxes(this.context, _createPropertyObjectPath(this.context, this, "Axes", false, false)); + if (!this._A) { + this._A=new Excel.ChartAxes(this.context, _createPropertyObjectPath(this.context, this, "Axes", false, false, false)); } - return this.m_axes; + return this._A; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "dataLabels", { get: function () { - if (!this.m_dataLabels) { - this.m_dataLabels=new Excel.ChartDataLabels(this.context, _createPropertyObjectPath(this.context, this, "DataLabels", false, false)); + if (!this._D) { + this._D=new Excel.ChartDataLabels(this.context, _createPropertyObjectPath(this.context, this, "DataLabels", false, false, false)); } - return this.m_dataLabels; + return this._D; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartAreaFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartAreaFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "legend", { get: function () { - if (!this.m_legend) { - this.m_legend=new Excel.ChartLegend(this.context, _createPropertyObjectPath(this.context, this, "Legend", false, false)); + if (!this._Le) { + this._Le=new Excel.ChartLegend(this.context, _createPropertyObjectPath(this.context, this, "Legend", false, false, false)); } - return this.m_legend; + return this._Le; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "series", { get: function () { - if (!this.m_series) { - this.m_series=new Excel.ChartSeriesCollection(this.context, _createPropertyObjectPath(this.context, this, "Series", true, false)); + if (!this._S) { + this._S=new Excel.ChartSeriesCollection(this.context, _createPropertyObjectPath(this.context, this, "Series", true, false, false)); } - return this.m_series; + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "title", { get: function () { - if (!this.m_title) { - this.m_title=new Excel.ChartTitle(this.context, _createPropertyObjectPath(this.context, this, "Title", false, false)); + if (!this._T) { + this._T=new Excel.ChartTitle(this.context, _createPropertyObjectPath(this.context, this, "Title", false, false, false)); } - return this.m_title; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "worksheet", { get: function () { - if (!this.m_worksheet) { - this.m_worksheet=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false)); + _throwIfApiNotSupported("Chart.worksheet", _defaultApiSetName, "1.2", _hostName); + if (!this._Wo) { + this._Wo=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false, false)); } - return this.m_worksheet; + return this._Wo; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "height", { get: function () { - _throwIfNotLoaded("height", this.m_height, "Chart", this._isNull); - return this.m_height; + _throwIfNotLoaded("height", this._H, _typeChart, this._isNull); + return this._H; }, set: function (value) { - this.m_height=value; + this._H=value; _createSetPropertyAction(this.context, this, "Height", value); }, enumerable: true, @@ -17442,11 +19903,11 @@ var Excel; }); Object.defineProperty(Chart.prototype, "left", { get: function () { - _throwIfNotLoaded("left", this.m_left, "Chart", this._isNull); - return this.m_left; + _throwIfNotLoaded("left", this._L, _typeChart, this._isNull); + return this._L; }, set: function (value) { - this.m_left=value; + this._L=value; _createSetPropertyAction(this.context, this, "Left", value); }, enumerable: true, @@ -17454,11 +19915,11 @@ var Excel; }); Object.defineProperty(Chart.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "Chart", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeChart, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -17466,11 +19927,11 @@ var Excel; }); Object.defineProperty(Chart.prototype, "top", { get: function () { - _throwIfNotLoaded("top", this.m_top, "Chart", this._isNull); - return this.m_top; + _throwIfNotLoaded("top", this._To, _typeChart, this._isNull); + return this._To; }, set: function (value) { - this.m_top=value; + this._To=value; _createSetPropertyAction(this.context, this, "Top", value); }, enumerable: true, @@ -17478,11 +19939,11 @@ var Excel; }); Object.defineProperty(Chart.prototype, "width", { get: function () { - _throwIfNotLoaded("width", this.m_width, "Chart", this._isNull); - return this.m_width; + _throwIfNotLoaded("width", this._W, _typeChart, this._isNull); + return this._W; }, set: function (value) { - this.m_width=value; + this._W=value; _createSetPropertyAction(this.context, this, "Width", value); }, enumerable: true, @@ -17490,17 +19951,19 @@ var Excel; }); Chart.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["name", "top", "left", "width", "height"], ["title", "dataLabels", "legend", "axes", "format"], [ - "series", - "worksheet", "series", "worksheet" ]); }; + Chart.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; Chart.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Chart.prototype.getImage=function (width, height, fittingMode) { - var action=_createMethodAction(this.context, this, "GetImage", 1, [width, height, fittingMode]); + _throwIfApiNotSupported("Chart.getImage", _defaultApiSetName, "1.2", _hostName); + var action=_createMethodAction(this.context, this, "GetImage", 1, [width, height, fittingMode], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -17509,10 +19972,10 @@ var Excel; if (!(sourceData instanceof Range)) { throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument, "sourceData", "Chart.setData"); } - _createMethodAction(this.context, this, "SetData", 0, [sourceData, seriesBy]); + _createMethodAction(this.context, this, "SetData", 0, [sourceData, seriesBy], false); }; Chart.prototype.setPosition=function (startCell, endCell) { - _createMethodAction(this.context, this, "SetPosition", 0, [startCell, endCell]); + _createMethodAction(this.context, this, "SetPosition", 0, [startCell, endCell], false); }; Chart.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17521,47 +19984,60 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Height"])) { - this.m_height=obj["Height"]; + this._H=obj["Height"]; } if (!_isUndefined(obj["Left"])) { - this.m_left=obj["Left"]; + this._L=obj["Left"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Top"])) { - this.m_top=obj["Top"]; + this._To=obj["Top"]; } if (!_isUndefined(obj["Width"])) { - this.m_width=obj["Width"]; + this._W=obj["Width"]; } _handleNavigationPropertyResults(this, obj, ["axes", "Axes", "dataLabels", "DataLabels", "format", "Format", "legend", "Legend", "series", "Series", "title", "Title", "worksheet", "Worksheet"]); }; Chart.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Chart.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Chart.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; Chart.prototype.toJSON=function () { - return { - "axes": this.m_axes, - "dataLabels": this.m_dataLabels, - "format": this.m_format, - "height": this.m_height, - "left": this.m_left, - "legend": this.m_legend, - "name": this.m_name, - "title": this.m_title, - "top": this.m_top, - "width": this.m_width - }; + return _toJson(this, { + "height": this._H, + "left": this._L, + "name": this._N, + "top": this._To, + "width": this._W, + }, { + "axes": this._A, + "dataLabels": this._D, + "format": this._F, + "legend": this._Le, + "series": this._S, + "title": this._T, + }); + }; + Chart.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Chart; }(OfficeExtension.ClientObject)); Excel.Chart=Chart; + var _typeChartAreaFormat="ChartAreaFormat"; var ChartAreaFormat=(function (_super) { __extends(ChartAreaFormat, _super); function ChartAreaFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartAreaFormat.prototype, "_className", { get: function () { @@ -17570,22 +20046,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartAreaFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["fill", "font"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartAreaFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAreaFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true @@ -17595,6 +20078,9 @@ var Excel; "fill" ]); }; + ChartAreaFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartAreaFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -17604,22 +20090,32 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["fill", "Fill", "font", "Font"]); }; ChartAreaFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartAreaFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAreaFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartAreaFormat.prototype.toJSON=function () { - return { - "fill": this.m_fill, - "font": this.m_font - }; + return _toJson(this, {}, { + "font": this._Fo, + }); + }; + ChartAreaFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartAreaFormat; }(OfficeExtension.ClientObject)); Excel.ChartAreaFormat=ChartAreaFormat; + var _typeChartSeriesCollection="ChartSeriesCollection"; var ChartSeriesCollection=(function (_super) { __extends(ChartSeriesCollection, _super); function ChartSeriesCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartSeriesCollection.prototype, "_className", { get: function () { @@ -17628,9 +20124,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartSeriesCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartSeriesCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartSeriesCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ChartSeriesCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeChartSeriesCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -17638,20 +20148,21 @@ var Excel; }); Object.defineProperty(ChartSeriesCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "ChartSeriesCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeChartSeriesCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); ChartSeriesCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("ChartSeriesCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; ChartSeriesCollection.prototype.getItemAt=function (index) { - return new Excel.ChartSeries(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.ChartSeries(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; ChartSeriesCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17660,7 +20171,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -17673,21 +20184,29 @@ var Excel; } }; ChartSeriesCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartSeriesCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartSeriesCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.ChartSeries(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(false, _this.context, _this, childItemData, index)); }); }; ChartSeriesCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return ChartSeriesCollection; }(OfficeExtension.ClientObject)); Excel.ChartSeriesCollection=ChartSeriesCollection; + var _typeChartSeries="ChartSeries"; var ChartSeries=(function (_super) { __extends(ChartSeries, _super); function ChartSeries() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartSeries.prototype, "_className", { get: function () { @@ -17696,33 +20215,54 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartSeries.prototype, "_scalarPropertyNames", { + get: function () { + return ["name"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartSeries.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartSeries.prototype, "_navigationPropertyNames", { + get: function () { + return ["points", "format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartSeries.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartSeriesFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartSeriesFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartSeries.prototype, "points", { get: function () { - if (!this.m_points) { - this.m_points=new Excel.ChartPointsCollection(this.context, _createPropertyObjectPath(this.context, this, "Points", true, false)); + if (!this._P) { + this._P=new Excel.ChartPointsCollection(this.context, _createPropertyObjectPath(this.context, this, "Points", true, false, false)); } - return this.m_points; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(ChartSeries.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "ChartSeries", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeChartSeries, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -17730,10 +20270,12 @@ var Excel; }); ChartSeries.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["name"], ["format"], [ - "points", "points" ]); }; + ChartSeries.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartSeries.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -17741,27 +20283,40 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format", "points", "Points"]); }; ChartSeries.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartSeries.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartSeries.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartSeries.prototype.toJSON=function () { - return { - "format": this.m_format, - "name": this.m_name - }; + return _toJson(this, { + "name": this._N, + }, { + "format": this._F, + "points": this._P, + }); + }; + ChartSeries.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartSeries; }(OfficeExtension.ClientObject)); Excel.ChartSeries=ChartSeries; + var _typeChartSeriesFormat="ChartSeriesFormat"; var ChartSeriesFormat=(function (_super) { __extends(ChartSeriesFormat, _super); function ChartSeriesFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartSeriesFormat.prototype, "_className", { get: function () { @@ -17770,22 +20325,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartSeriesFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["fill", "line"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartSeriesFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartSeriesFormat.prototype, "line", { get: function () { - if (!this.m_line) { - this.m_line=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false)); + if (!this._L) { + this._L=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false, false)); } - return this.m_line; + return this._L; }, enumerable: true, configurable: true @@ -17795,6 +20357,9 @@ var Excel; "fill" ]); }; + ChartSeriesFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartSeriesFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -17804,22 +20369,32 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["fill", "Fill", "line", "Line"]); }; ChartSeriesFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartSeriesFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartSeriesFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartSeriesFormat.prototype.toJSON=function () { - return { - "fill": this.m_fill, - "line": this.m_line - }; + return _toJson(this, {}, { + "line": this._L, + }); + }; + ChartSeriesFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartSeriesFormat; }(OfficeExtension.ClientObject)); Excel.ChartSeriesFormat=ChartSeriesFormat; + var _typeChartPointsCollection="ChartPointsCollection"; var ChartPointsCollection=(function (_super) { __extends(ChartPointsCollection, _super); function ChartPointsCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartPointsCollection.prototype, "_className", { get: function () { @@ -17828,9 +20403,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartPointsCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartPointsCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartPointsCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ChartPointsCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeChartPointsCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -17838,20 +20427,21 @@ var Excel; }); Object.defineProperty(ChartPointsCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "ChartPointsCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeChartPointsCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); ChartPointsCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("ChartPointsCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; ChartPointsCollection.prototype.getItemAt=function (index) { - return new Excel.ChartPoint(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.ChartPoint(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; ChartPointsCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17860,7 +20450,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -17873,21 +20463,29 @@ var Excel; } }; ChartPointsCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartPointsCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartPointsCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.ChartPoint(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(false, _this.context, _this, childItemData, index)); }); }; ChartPointsCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return ChartPointsCollection; }(OfficeExtension.ClientObject)); Excel.ChartPointsCollection=ChartPointsCollection; + var _typeChartPoint="ChartPoint"; var ChartPoint=(function (_super) { __extends(ChartPoint, _super); function ChartPoint() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartPoint.prototype, "_className", { get: function () { @@ -17896,20 +20494,34 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartPoint.prototype, "_scalarPropertyNames", { + get: function () { + return ["value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartPoint.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartPoint.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartPointFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartPointFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartPoint.prototype, "value", { get: function () { - _throwIfNotLoaded("value", this.m_value, "ChartPoint", this._isNull); - return this.m_value; + _throwIfNotLoaded("value", this._V, _typeChartPoint, this._isNull); + return this._V; }, enumerable: true, configurable: true @@ -17921,27 +20533,39 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Value"])) { - this.m_value=obj["Value"]; + this._V=obj["Value"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; ChartPoint.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartPoint.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartPoint.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartPoint.prototype.toJSON=function () { - return { - "format": this.m_format, - "value": this.m_value - }; + return _toJson(this, { + "value": this._V, + }, { + "format": this._F, + }); + }; + ChartPoint.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartPoint; }(OfficeExtension.ClientObject)); Excel.ChartPoint=ChartPoint; + var _typeChartPointFormat="ChartPointFormat"; var ChartPointFormat=(function (_super) { __extends(ChartPointFormat, _super); function ChartPointFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartPointFormat.prototype, "_className", { get: function () { @@ -17950,12 +20574,19 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartPointFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["fill"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartPointFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true @@ -17969,21 +20600,26 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["fill", "Fill"]); }; ChartPointFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartPointFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartPointFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartPointFormat.prototype.toJSON=function () { - return { - "fill": this.m_fill - }; + return _toJson(this, {}, {}); }; return ChartPointFormat; }(OfficeExtension.ClientObject)); Excel.ChartPointFormat=ChartPointFormat; + var _typeChartAxes="ChartAxes"; var ChartAxes=(function (_super) { __extends(ChartAxes, _super); function ChartAxes() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartAxes.prototype, "_className", { get: function () { @@ -17992,32 +20628,39 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartAxes.prototype, "_navigationPropertyNames", { + get: function () { + return ["categoryAxis", "seriesAxis", "valueAxis"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartAxes.prototype, "categoryAxis", { get: function () { - if (!this.m_categoryAxis) { - this.m_categoryAxis=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "CategoryAxis", false, false)); + if (!this._C) { + this._C=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "CategoryAxis", false, false, false)); } - return this.m_categoryAxis; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxes.prototype, "seriesAxis", { get: function () { - if (!this.m_seriesAxis) { - this.m_seriesAxis=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "SeriesAxis", false, false)); + if (!this._S) { + this._S=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "SeriesAxis", false, false, false)); } - return this.m_seriesAxis; + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxes.prototype, "valueAxis", { get: function () { - if (!this.m_valueAxis) { - this.m_valueAxis=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "ValueAxis", false, false)); + if (!this._V) { + this._V=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "ValueAxis", false, false, false)); } - return this.m_valueAxis; + return this._V; }, enumerable: true, configurable: true @@ -18025,6 +20668,9 @@ var Excel; ChartAxes.prototype.set=function (properties, options) { this._recursivelySet(properties, options, [], ["categoryAxis", "seriesAxis", "valueAxis"], []); }; + ChartAxes.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartAxes.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18034,23 +20680,34 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["categoryAxis", "CategoryAxis", "seriesAxis", "SeriesAxis", "valueAxis", "ValueAxis"]); }; ChartAxes.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartAxes.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAxes.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartAxes.prototype.toJSON=function () { - return { - "categoryAxis": this.m_categoryAxis, - "seriesAxis": this.m_seriesAxis, - "valueAxis": this.m_valueAxis - }; + return _toJson(this, {}, { + "categoryAxis": this._C, + "seriesAxis": this._S, + "valueAxis": this._V, + }); + }; + ChartAxes.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartAxes; }(OfficeExtension.ClientObject)); Excel.ChartAxes=ChartAxes; + var _typeChartAxis="ChartAxis"; var ChartAxis=(function (_super) { __extends(ChartAxis, _super); function ChartAxis() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartAxis.prototype, "_className", { get: function () { @@ -18059,53 +20716,74 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartAxis.prototype, "_scalarPropertyNames", { + get: function () { + return ["majorUnit", "maximum", "minimum", "minorUnit"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxis.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxis.prototype, "_navigationPropertyNames", { + get: function () { + return ["majorGridlines", "minorGridlines", "title", "format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartAxis.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartAxisFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartAxisFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxis.prototype, "majorGridlines", { get: function () { - if (!this.m_majorGridlines) { - this.m_majorGridlines=new Excel.ChartGridlines(this.context, _createPropertyObjectPath(this.context, this, "MajorGridlines", false, false)); + if (!this._M) { + this._M=new Excel.ChartGridlines(this.context, _createPropertyObjectPath(this.context, this, "MajorGridlines", false, false, false)); } - return this.m_majorGridlines; + return this._M; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxis.prototype, "minorGridlines", { get: function () { - if (!this.m_minorGridlines) { - this.m_minorGridlines=new Excel.ChartGridlines(this.context, _createPropertyObjectPath(this.context, this, "MinorGridlines", false, false)); + if (!this._Min) { + this._Min=new Excel.ChartGridlines(this.context, _createPropertyObjectPath(this.context, this, "MinorGridlines", false, false, false)); } - return this.m_minorGridlines; + return this._Min; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxis.prototype, "title", { get: function () { - if (!this.m_title) { - this.m_title=new Excel.ChartAxisTitle(this.context, _createPropertyObjectPath(this.context, this, "Title", false, false)); + if (!this._T) { + this._T=new Excel.ChartAxisTitle(this.context, _createPropertyObjectPath(this.context, this, "Title", false, false, false)); } - return this.m_title; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxis.prototype, "majorUnit", { get: function () { - _throwIfNotLoaded("majorUnit", this.m_majorUnit, "ChartAxis", this._isNull); - return this.m_majorUnit; + _throwIfNotLoaded("majorUnit", this._Ma, _typeChartAxis, this._isNull); + return this._Ma; }, set: function (value) { - this.m_majorUnit=value; + this._Ma=value; _createSetPropertyAction(this.context, this, "MajorUnit", value); }, enumerable: true, @@ -18113,11 +20791,11 @@ var Excel; }); Object.defineProperty(ChartAxis.prototype, "maximum", { get: function () { - _throwIfNotLoaded("maximum", this.m_maximum, "ChartAxis", this._isNull); - return this.m_maximum; + _throwIfNotLoaded("maximum", this._Max, _typeChartAxis, this._isNull); + return this._Max; }, set: function (value) { - this.m_maximum=value; + this._Max=value; _createSetPropertyAction(this.context, this, "Maximum", value); }, enumerable: true, @@ -18125,11 +20803,11 @@ var Excel; }); Object.defineProperty(ChartAxis.prototype, "minimum", { get: function () { - _throwIfNotLoaded("minimum", this.m_minimum, "ChartAxis", this._isNull); - return this.m_minimum; + _throwIfNotLoaded("minimum", this._Mi, _typeChartAxis, this._isNull); + return this._Mi; }, set: function (value) { - this.m_minimum=value; + this._Mi=value; _createSetPropertyAction(this.context, this, "Minimum", value); }, enumerable: true, @@ -18137,11 +20815,11 @@ var Excel; }); Object.defineProperty(ChartAxis.prototype, "minorUnit", { get: function () { - _throwIfNotLoaded("minorUnit", this.m_minorUnit, "ChartAxis", this._isNull); - return this.m_minorUnit; + _throwIfNotLoaded("minorUnit", this._Mino, _typeChartAxis, this._isNull); + return this._Mino; }, set: function (value) { - this.m_minorUnit=value; + this._Mino=value; _createSetPropertyAction(this.context, this, "MinorUnit", value); }, enumerable: true, @@ -18150,6 +20828,9 @@ var Excel; ChartAxis.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["majorUnit", "maximum", "minimum", "minorUnit"], ["majorGridlines", "minorGridlines", "title", "format"], []); }; + ChartAxis.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartAxis.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18157,42 +20838,54 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["MajorUnit"])) { - this.m_majorUnit=obj["MajorUnit"]; + this._Ma=obj["MajorUnit"]; } if (!_isUndefined(obj["Maximum"])) { - this.m_maximum=obj["Maximum"]; + this._Max=obj["Maximum"]; } if (!_isUndefined(obj["Minimum"])) { - this.m_minimum=obj["Minimum"]; + this._Mi=obj["Minimum"]; } if (!_isUndefined(obj["MinorUnit"])) { - this.m_minorUnit=obj["MinorUnit"]; + this._Mino=obj["MinorUnit"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format", "majorGridlines", "MajorGridlines", "minorGridlines", "MinorGridlines", "title", "Title"]); }; ChartAxis.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartAxis.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAxis.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartAxis.prototype.toJSON=function () { - return { - "format": this.m_format, - "majorGridlines": this.m_majorGridlines, - "majorUnit": this.m_majorUnit, - "maximum": this.m_maximum, - "minimum": this.m_minimum, - "minorGridlines": this.m_minorGridlines, - "minorUnit": this.m_minorUnit, - "title": this.m_title - }; + return _toJson(this, { + "majorUnit": this._Ma, + "maximum": this._Max, + "minimum": this._Mi, + "minorUnit": this._Mino, + }, { + "format": this._F, + "majorGridlines": this._M, + "minorGridlines": this._Min, + "title": this._T, + }); + }; + ChartAxis.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartAxis; }(OfficeExtension.ClientObject)); Excel.ChartAxis=ChartAxis; + var _typeChartAxisFormat="ChartAxisFormat"; var ChartAxisFormat=(function (_super) { __extends(ChartAxisFormat, _super); function ChartAxisFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartAxisFormat.prototype, "_className", { get: function () { @@ -18201,22 +20894,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartAxisFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["font", "line"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartAxisFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._F) { + this._F=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxisFormat.prototype, "line", { get: function () { - if (!this.m_line) { - this.m_line=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false)); + if (!this._L) { + this._L=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false, false)); } - return this.m_line; + return this._L; }, enumerable: true, configurable: true @@ -18224,6 +20924,9 @@ var Excel; ChartAxisFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, [], ["font", "line"], []); }; + ChartAxisFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartAxisFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18233,22 +20936,33 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["font", "Font", "line", "Line"]); }; ChartAxisFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartAxisFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAxisFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartAxisFormat.prototype.toJSON=function () { - return { - "font": this.m_font, - "line": this.m_line - }; + return _toJson(this, {}, { + "font": this._F, + "line": this._L, + }); + }; + ChartAxisFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartAxisFormat; }(OfficeExtension.ClientObject)); Excel.ChartAxisFormat=ChartAxisFormat; + var _typeChartAxisTitle="ChartAxisTitle"; var ChartAxisTitle=(function (_super) { __extends(ChartAxisTitle, _super); function ChartAxisTitle() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartAxisTitle.prototype, "_className", { get: function () { @@ -18257,23 +20971,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartAxisTitle.prototype, "_scalarPropertyNames", { + get: function () { + return ["text", "visible"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxisTitle.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxisTitle.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartAxisTitle.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartAxisTitleFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartAxisTitleFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxisTitle.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "ChartAxisTitle", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._T, _typeChartAxisTitle, this._isNull); + return this._T; }, set: function (value) { - this.m_text=value; + this._T=value; _createSetPropertyAction(this.context, this, "Text", value); }, enumerable: true, @@ -18281,11 +21016,11 @@ var Excel; }); Object.defineProperty(ChartAxisTitle.prototype, "visible", { get: function () { - _throwIfNotLoaded("visible", this.m_visible, "ChartAxisTitle", this._isNull); - return this.m_visible; + _throwIfNotLoaded("visible", this._V, _typeChartAxisTitle, this._isNull); + return this._V; }, set: function (value) { - this.m_visible=value; + this._V=value; _createSetPropertyAction(this.context, this, "Visible", value); }, enumerable: true, @@ -18294,6 +21029,9 @@ var Excel; ChartAxisTitle.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["text", "visible"], ["format"], []); }; + ChartAxisTitle.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartAxisTitle.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18301,31 +21039,43 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._T=obj["Text"]; } if (!_isUndefined(obj["Visible"])) { - this.m_visible=obj["Visible"]; + this._V=obj["Visible"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; ChartAxisTitle.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartAxisTitle.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAxisTitle.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartAxisTitle.prototype.toJSON=function () { - return { - "format": this.m_format, - "text": this.m_text, - "visible": this.m_visible - }; + return _toJson(this, { + "text": this._T, + "visible": this._V, + }, { + "format": this._F, + }); + }; + ChartAxisTitle.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartAxisTitle; }(OfficeExtension.ClientObject)); Excel.ChartAxisTitle=ChartAxisTitle; + var _typeChartAxisTitleFormat="ChartAxisTitleFormat"; var ChartAxisTitleFormat=(function (_super) { __extends(ChartAxisTitleFormat, _super); function ChartAxisTitleFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartAxisTitleFormat.prototype, "_className", { get: function () { @@ -18334,12 +21084,19 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartAxisTitleFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["font"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartAxisTitleFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._F) { + this._F=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._F; }, enumerable: true, configurable: true @@ -18347,6 +21104,9 @@ var Excel; ChartAxisTitleFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, [], ["font"], []); }; + ChartAxisTitleFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartAxisTitleFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18356,46 +21116,78 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["font", "Font"]); }; ChartAxisTitleFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartAxisTitleFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAxisTitleFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartAxisTitleFormat.prototype.toJSON=function () { - return { - "font": this.m_font - }; + return _toJson(this, {}, { + "font": this._F, + }); + }; + ChartAxisTitleFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartAxisTitleFormat; }(OfficeExtension.ClientObject)); Excel.ChartAxisTitleFormat=ChartAxisTitleFormat; + var _typeChartDataLabels="ChartDataLabels"; var ChartDataLabels=(function (_super) { __extends(ChartDataLabels, _super); function ChartDataLabels() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartDataLabels.prototype, "_className", { get: function () { - return "ChartDataLabels"; + return "ChartDataLabels"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartDataLabels.prototype, "_scalarPropertyNames", { + get: function () { + return ["position", "showValue", "showSeriesName", "showCategoryName", "showLegendKey", "showPercentage", "showBubbleSize", "separator"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartDataLabels.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartDataLabels.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; }, enumerable: true, configurable: true }); Object.defineProperty(ChartDataLabels.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartDataLabelFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartDataLabelFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartDataLabels.prototype, "position", { get: function () { - _throwIfNotLoaded("position", this.m_position, "ChartDataLabels", this._isNull); - return this.m_position; + _throwIfNotLoaded("position", this._P, _typeChartDataLabels, this._isNull); + return this._P; }, set: function (value) { - this.m_position=value; + this._P=value; _createSetPropertyAction(this.context, this, "Position", value); }, enumerable: true, @@ -18403,11 +21195,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "separator", { get: function () { - _throwIfNotLoaded("separator", this.m_separator, "ChartDataLabels", this._isNull); - return this.m_separator; + _throwIfNotLoaded("separator", this._S, _typeChartDataLabels, this._isNull); + return this._S; }, set: function (value) { - this.m_separator=value; + this._S=value; _createSetPropertyAction(this.context, this, "Separator", value); }, enumerable: true, @@ -18415,11 +21207,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "showBubbleSize", { get: function () { - _throwIfNotLoaded("showBubbleSize", this.m_showBubbleSize, "ChartDataLabels", this._isNull); - return this.m_showBubbleSize; + _throwIfNotLoaded("showBubbleSize", this._Sh, _typeChartDataLabels, this._isNull); + return this._Sh; }, set: function (value) { - this.m_showBubbleSize=value; + this._Sh=value; _createSetPropertyAction(this.context, this, "ShowBubbleSize", value); }, enumerable: true, @@ -18427,11 +21219,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "showCategoryName", { get: function () { - _throwIfNotLoaded("showCategoryName", this.m_showCategoryName, "ChartDataLabels", this._isNull); - return this.m_showCategoryName; + _throwIfNotLoaded("showCategoryName", this._Sho, _typeChartDataLabels, this._isNull); + return this._Sho; }, set: function (value) { - this.m_showCategoryName=value; + this._Sho=value; _createSetPropertyAction(this.context, this, "ShowCategoryName", value); }, enumerable: true, @@ -18439,11 +21231,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "showLegendKey", { get: function () { - _throwIfNotLoaded("showLegendKey", this.m_showLegendKey, "ChartDataLabels", this._isNull); - return this.m_showLegendKey; + _throwIfNotLoaded("showLegendKey", this._Show, _typeChartDataLabels, this._isNull); + return this._Show; }, set: function (value) { - this.m_showLegendKey=value; + this._Show=value; _createSetPropertyAction(this.context, this, "ShowLegendKey", value); }, enumerable: true, @@ -18451,11 +21243,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "showPercentage", { get: function () { - _throwIfNotLoaded("showPercentage", this.m_showPercentage, "ChartDataLabels", this._isNull); - return this.m_showPercentage; + _throwIfNotLoaded("showPercentage", this._ShowP, _typeChartDataLabels, this._isNull); + return this._ShowP; }, set: function (value) { - this.m_showPercentage=value; + this._ShowP=value; _createSetPropertyAction(this.context, this, "ShowPercentage", value); }, enumerable: true, @@ -18463,11 +21255,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "showSeriesName", { get: function () { - _throwIfNotLoaded("showSeriesName", this.m_showSeriesName, "ChartDataLabels", this._isNull); - return this.m_showSeriesName; + _throwIfNotLoaded("showSeriesName", this._ShowS, _typeChartDataLabels, this._isNull); + return this._ShowS; }, set: function (value) { - this.m_showSeriesName=value; + this._ShowS=value; _createSetPropertyAction(this.context, this, "ShowSeriesName", value); }, enumerable: true, @@ -18475,11 +21267,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "showValue", { get: function () { - _throwIfNotLoaded("showValue", this.m_showValue, "ChartDataLabels", this._isNull); - return this.m_showValue; + _throwIfNotLoaded("showValue", this._ShowV, _typeChartDataLabels, this._isNull); + return this._ShowV; }, set: function (value) { - this.m_showValue=value; + this._ShowV=value; _createSetPropertyAction(this.context, this, "ShowValue", value); }, enumerable: true, @@ -18488,6 +21280,9 @@ var Excel; ChartDataLabels.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["position", "showValue", "showSeriesName", "showCategoryName", "showLegendKey", "showPercentage", "showBubbleSize", "separator"], ["format"], []); }; + ChartDataLabels.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartDataLabels.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18495,55 +21290,67 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Position"])) { - this.m_position=obj["Position"]; + this._P=obj["Position"]; } if (!_isUndefined(obj["Separator"])) { - this.m_separator=obj["Separator"]; + this._S=obj["Separator"]; } if (!_isUndefined(obj["ShowBubbleSize"])) { - this.m_showBubbleSize=obj["ShowBubbleSize"]; + this._Sh=obj["ShowBubbleSize"]; } if (!_isUndefined(obj["ShowCategoryName"])) { - this.m_showCategoryName=obj["ShowCategoryName"]; + this._Sho=obj["ShowCategoryName"]; } if (!_isUndefined(obj["ShowLegendKey"])) { - this.m_showLegendKey=obj["ShowLegendKey"]; + this._Show=obj["ShowLegendKey"]; } if (!_isUndefined(obj["ShowPercentage"])) { - this.m_showPercentage=obj["ShowPercentage"]; + this._ShowP=obj["ShowPercentage"]; } if (!_isUndefined(obj["ShowSeriesName"])) { - this.m_showSeriesName=obj["ShowSeriesName"]; + this._ShowS=obj["ShowSeriesName"]; } if (!_isUndefined(obj["ShowValue"])) { - this.m_showValue=obj["ShowValue"]; + this._ShowV=obj["ShowValue"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; ChartDataLabels.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartDataLabels.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartDataLabels.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartDataLabels.prototype.toJSON=function () { - return { - "format": this.m_format, - "position": this.m_position, - "separator": this.m_separator, - "showBubbleSize": this.m_showBubbleSize, - "showCategoryName": this.m_showCategoryName, - "showLegendKey": this.m_showLegendKey, - "showPercentage": this.m_showPercentage, - "showSeriesName": this.m_showSeriesName, - "showValue": this.m_showValue - }; + return _toJson(this, { + "position": this._P, + "separator": this._S, + "showBubbleSize": this._Sh, + "showCategoryName": this._Sho, + "showLegendKey": this._Show, + "showPercentage": this._ShowP, + "showSeriesName": this._ShowS, + "showValue": this._ShowV, + }, { + "format": this._F, + }); + }; + ChartDataLabels.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartDataLabels; }(OfficeExtension.ClientObject)); Excel.ChartDataLabels=ChartDataLabels; + var _typeChartDataLabelFormat="ChartDataLabelFormat"; var ChartDataLabelFormat=(function (_super) { __extends(ChartDataLabelFormat, _super); function ChartDataLabelFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartDataLabelFormat.prototype, "_className", { get: function () { @@ -18552,22 +21359,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartDataLabelFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["font", "fill"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartDataLabelFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartDataLabelFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true @@ -18577,6 +21391,9 @@ var Excel; "fill" ]); }; + ChartDataLabelFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartDataLabelFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18586,22 +21403,32 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["fill", "Fill", "font", "Font"]); }; ChartDataLabelFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartDataLabelFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartDataLabelFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartDataLabelFormat.prototype.toJSON=function () { - return { - "fill": this.m_fill, - "font": this.m_font - }; + return _toJson(this, {}, { + "font": this._Fo, + }); + }; + ChartDataLabelFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartDataLabelFormat; }(OfficeExtension.ClientObject)); Excel.ChartDataLabelFormat=ChartDataLabelFormat; + var _typeChartGridlines="ChartGridlines"; var ChartGridlines=(function (_super) { __extends(ChartGridlines, _super); function ChartGridlines() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartGridlines.prototype, "_className", { get: function () { @@ -18610,23 +21437,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartGridlines.prototype, "_scalarPropertyNames", { + get: function () { + return ["visible"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartGridlines.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartGridlines.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartGridlines.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartGridlinesFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartGridlinesFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartGridlines.prototype, "visible", { get: function () { - _throwIfNotLoaded("visible", this.m_visible, "ChartGridlines", this._isNull); - return this.m_visible; + _throwIfNotLoaded("visible", this._V, _typeChartGridlines, this._isNull); + return this._V; }, set: function (value) { - this.m_visible=value; + this._V=value; _createSetPropertyAction(this.context, this, "Visible", value); }, enumerable: true, @@ -18635,6 +21483,9 @@ var Excel; ChartGridlines.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["visible"], ["format"], []); }; + ChartGridlines.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartGridlines.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18642,27 +21493,39 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Visible"])) { - this.m_visible=obj["Visible"]; + this._V=obj["Visible"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; ChartGridlines.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartGridlines.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartGridlines.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartGridlines.prototype.toJSON=function () { - return { - "format": this.m_format, - "visible": this.m_visible - }; + return _toJson(this, { + "visible": this._V, + }, { + "format": this._F, + }); + }; + ChartGridlines.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartGridlines; }(OfficeExtension.ClientObject)); Excel.ChartGridlines=ChartGridlines; + var _typeChartGridlinesFormat="ChartGridlinesFormat"; var ChartGridlinesFormat=(function (_super) { __extends(ChartGridlinesFormat, _super); function ChartGridlinesFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartGridlinesFormat.prototype, "_className", { get: function () { @@ -18671,12 +21534,19 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartGridlinesFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["line"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartGridlinesFormat.prototype, "line", { get: function () { - if (!this.m_line) { - this.m_line=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false)); + if (!this._L) { + this._L=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false, false)); } - return this.m_line; + return this._L; }, enumerable: true, configurable: true @@ -18684,6 +21554,9 @@ var Excel; ChartGridlinesFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, [], ["line"], []); }; + ChartGridlinesFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartGridlinesFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18693,21 +21566,32 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["line", "Line"]); }; ChartGridlinesFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartGridlinesFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartGridlinesFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartGridlinesFormat.prototype.toJSON=function () { - return { - "line": this.m_line - }; + return _toJson(this, {}, { + "line": this._L, + }); + }; + ChartGridlinesFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartGridlinesFormat; }(OfficeExtension.ClientObject)); Excel.ChartGridlinesFormat=ChartGridlinesFormat; + var _typeChartLegend="ChartLegend"; var ChartLegend=(function (_super) { __extends(ChartLegend, _super); function ChartLegend() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartLegend.prototype, "_className", { get: function () { @@ -18716,23 +21600,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartLegend.prototype, "_scalarPropertyNames", { + get: function () { + return ["visible", "position", "overlay"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartLegend.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartLegend.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartLegend.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartLegendFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartLegendFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartLegend.prototype, "overlay", { get: function () { - _throwIfNotLoaded("overlay", this.m_overlay, "ChartLegend", this._isNull); - return this.m_overlay; + _throwIfNotLoaded("overlay", this._O, _typeChartLegend, this._isNull); + return this._O; }, set: function (value) { - this.m_overlay=value; + this._O=value; _createSetPropertyAction(this.context, this, "Overlay", value); }, enumerable: true, @@ -18740,11 +21645,11 @@ var Excel; }); Object.defineProperty(ChartLegend.prototype, "position", { get: function () { - _throwIfNotLoaded("position", this.m_position, "ChartLegend", this._isNull); - return this.m_position; + _throwIfNotLoaded("position", this._P, _typeChartLegend, this._isNull); + return this._P; }, set: function (value) { - this.m_position=value; + this._P=value; _createSetPropertyAction(this.context, this, "Position", value); }, enumerable: true, @@ -18752,11 +21657,11 @@ var Excel; }); Object.defineProperty(ChartLegend.prototype, "visible", { get: function () { - _throwIfNotLoaded("visible", this.m_visible, "ChartLegend", this._isNull); - return this.m_visible; + _throwIfNotLoaded("visible", this._V, _typeChartLegend, this._isNull); + return this._V; }, set: function (value) { - this.m_visible=value; + this._V=value; _createSetPropertyAction(this.context, this, "Visible", value); }, enumerable: true, @@ -18765,6 +21670,9 @@ var Excel; ChartLegend.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["visible", "position", "overlay"], ["format"], []); }; + ChartLegend.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartLegend.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18772,35 +21680,47 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Overlay"])) { - this.m_overlay=obj["Overlay"]; + this._O=obj["Overlay"]; } if (!_isUndefined(obj["Position"])) { - this.m_position=obj["Position"]; + this._P=obj["Position"]; } if (!_isUndefined(obj["Visible"])) { - this.m_visible=obj["Visible"]; + this._V=obj["Visible"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; ChartLegend.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartLegend.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartLegend.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartLegend.prototype.toJSON=function () { - return { - "format": this.m_format, - "overlay": this.m_overlay, - "position": this.m_position, - "visible": this.m_visible - }; + return _toJson(this, { + "overlay": this._O, + "position": this._P, + "visible": this._V, + }, { + "format": this._F, + }); + }; + ChartLegend.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartLegend; }(OfficeExtension.ClientObject)); Excel.ChartLegend=ChartLegend; + var _typeChartLegendFormat="ChartLegendFormat"; var ChartLegendFormat=(function (_super) { __extends(ChartLegendFormat, _super); function ChartLegendFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartLegendFormat.prototype, "_className", { get: function () { @@ -18809,22 +21729,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartLegendFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["font", "fill"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartLegendFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartLegendFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true @@ -18834,6 +21761,9 @@ var Excel; "fill" ]); }; + ChartLegendFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartLegendFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18843,22 +21773,32 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["fill", "Fill", "font", "Font"]); }; ChartLegendFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartLegendFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartLegendFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartLegendFormat.prototype.toJSON=function () { - return { - "fill": this.m_fill, - "font": this.m_font - }; + return _toJson(this, {}, { + "font": this._Fo, + }); + }; + ChartLegendFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartLegendFormat; }(OfficeExtension.ClientObject)); Excel.ChartLegendFormat=ChartLegendFormat; + var _typeChartTitle="ChartTitle"; var ChartTitle=(function (_super) { __extends(ChartTitle, _super); function ChartTitle() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartTitle.prototype, "_className", { get: function () { @@ -18867,23 +21807,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartTitle.prototype, "_scalarPropertyNames", { + get: function () { + return ["visible", "text", "overlay"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartTitle.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartTitle.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartTitle.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartTitleFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartTitleFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartTitle.prototype, "overlay", { get: function () { - _throwIfNotLoaded("overlay", this.m_overlay, "ChartTitle", this._isNull); - return this.m_overlay; + _throwIfNotLoaded("overlay", this._O, _typeChartTitle, this._isNull); + return this._O; }, set: function (value) { - this.m_overlay=value; + this._O=value; _createSetPropertyAction(this.context, this, "Overlay", value); }, enumerable: true, @@ -18891,11 +21852,11 @@ var Excel; }); Object.defineProperty(ChartTitle.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "ChartTitle", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._T, _typeChartTitle, this._isNull); + return this._T; }, set: function (value) { - this.m_text=value; + this._T=value; _createSetPropertyAction(this.context, this, "Text", value); }, enumerable: true, @@ -18903,11 +21864,11 @@ var Excel; }); Object.defineProperty(ChartTitle.prototype, "visible", { get: function () { - _throwIfNotLoaded("visible", this.m_visible, "ChartTitle", this._isNull); - return this.m_visible; + _throwIfNotLoaded("visible", this._V, _typeChartTitle, this._isNull); + return this._V; }, set: function (value) { - this.m_visible=value; + this._V=value; _createSetPropertyAction(this.context, this, "Visible", value); }, enumerable: true, @@ -18916,6 +21877,9 @@ var Excel; ChartTitle.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["visible", "text", "overlay"], ["format"], []); }; + ChartTitle.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartTitle.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18923,35 +21887,47 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Overlay"])) { - this.m_overlay=obj["Overlay"]; + this._O=obj["Overlay"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._T=obj["Text"]; } if (!_isUndefined(obj["Visible"])) { - this.m_visible=obj["Visible"]; + this._V=obj["Visible"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; ChartTitle.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartTitle.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartTitle.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartTitle.prototype.toJSON=function () { - return { - "format": this.m_format, - "overlay": this.m_overlay, - "text": this.m_text, - "visible": this.m_visible - }; + return _toJson(this, { + "overlay": this._O, + "text": this._T, + "visible": this._V, + }, { + "format": this._F, + }); + }; + ChartTitle.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartTitle; }(OfficeExtension.ClientObject)); Excel.ChartTitle=ChartTitle; + var _typeChartTitleFormat="ChartTitleFormat"; var ChartTitleFormat=(function (_super) { __extends(ChartTitleFormat, _super); function ChartTitleFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartTitleFormat.prototype, "_className", { get: function () { @@ -18960,22 +21936,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartTitleFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["font", "fill"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartTitleFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartTitleFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true @@ -18985,6 +21968,9 @@ var Excel; "fill" ]); }; + ChartTitleFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartTitleFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18994,22 +21980,32 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["fill", "Fill", "font", "Font"]); }; ChartTitleFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartTitleFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartTitleFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartTitleFormat.prototype.toJSON=function () { - return { - "fill": this.m_fill, - "font": this.m_font - }; + return _toJson(this, {}, { + "font": this._Fo, + }); + }; + ChartTitleFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartTitleFormat; }(OfficeExtension.ClientObject)); Excel.ChartTitleFormat=ChartTitleFormat; + var _typeChartFill="ChartFill"; var ChartFill=(function (_super) { __extends(ChartFill, _super); function ChartFill() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartFill.prototype, "_className", { get: function () { @@ -19023,10 +22019,10 @@ var Excel; return this; }; ChartFill.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; ChartFill.prototype.setSolidColor=function (color) { - _createMethodAction(this.context, this, "SetSolidColor", 0, [color]); + _createMethodAction(this.context, this, "SetSolidColor", 0, [color], false); }; ChartFill.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -19035,16 +22031,21 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); }; + ChartFill.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; ChartFill.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}); }; return ChartFill; }(OfficeExtension.ClientObject)); Excel.ChartFill=ChartFill; + var _typeChartLineFormat="ChartLineFormat"; var ChartLineFormat=(function (_super) { __extends(ChartLineFormat, _super); function ChartLineFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartLineFormat.prototype, "_className", { get: function () { @@ -19053,13 +22054,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartLineFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["color"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartLineFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartLineFormat.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "ChartLineFormat", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeChartLineFormat, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -19068,8 +22083,11 @@ var Excel; ChartLineFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["color"], [], []); }; + ChartLineFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartLineFormat.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; ChartLineFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -19078,25 +22096,36 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } }; ChartLineFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartLineFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartLineFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartLineFormat.prototype.toJSON=function () { - return { - "color": this.m_color - }; + return _toJson(this, { + "color": this._C, + }, {}); + }; + ChartLineFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartLineFormat; }(OfficeExtension.ClientObject)); Excel.ChartLineFormat=ChartLineFormat; + var _typeChartFont="ChartFont"; var ChartFont=(function (_super) { __extends(ChartFont, _super); function ChartFont() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartFont.prototype, "_className", { get: function () { @@ -19105,13 +22134,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartFont.prototype, "_scalarPropertyNames", { + get: function () { + return ["bold", "color", "italic", "name", "size", "underline"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartFont.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartFont.prototype, "bold", { get: function () { - _throwIfNotLoaded("bold", this.m_bold, "ChartFont", this._isNull); - return this.m_bold; + _throwIfNotLoaded("bold", this._B, _typeChartFont, this._isNull); + return this._B; }, set: function (value) { - this.m_bold=value; + this._B=value; _createSetPropertyAction(this.context, this, "Bold", value); }, enumerable: true, @@ -19119,11 +22162,11 @@ var Excel; }); Object.defineProperty(ChartFont.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "ChartFont", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeChartFont, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -19131,11 +22174,11 @@ var Excel; }); Object.defineProperty(ChartFont.prototype, "italic", { get: function () { - _throwIfNotLoaded("italic", this.m_italic, "ChartFont", this._isNull); - return this.m_italic; + _throwIfNotLoaded("italic", this._I, _typeChartFont, this._isNull); + return this._I; }, set: function (value) { - this.m_italic=value; + this._I=value; _createSetPropertyAction(this.context, this, "Italic", value); }, enumerable: true, @@ -19143,11 +22186,11 @@ var Excel; }); Object.defineProperty(ChartFont.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "ChartFont", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeChartFont, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -19155,11 +22198,11 @@ var Excel; }); Object.defineProperty(ChartFont.prototype, "size", { get: function () { - _throwIfNotLoaded("size", this.m_size, "ChartFont", this._isNull); - return this.m_size; + _throwIfNotLoaded("size", this._S, _typeChartFont, this._isNull); + return this._S; }, set: function (value) { - this.m_size=value; + this._S=value; _createSetPropertyAction(this.context, this, "Size", value); }, enumerable: true, @@ -19167,11 +22210,11 @@ var Excel; }); Object.defineProperty(ChartFont.prototype, "underline", { get: function () { - _throwIfNotLoaded("underline", this.m_underline, "ChartFont", this._isNull); - return this.m_underline; + _throwIfNotLoaded("underline", this._U, _typeChartFont, this._isNull); + return this._U; }, set: function (value) { - this.m_underline=value; + this._U=value; _createSetPropertyAction(this.context, this, "Underline", value); }, enumerable: true, @@ -19180,6 +22223,9 @@ var Excel; ChartFont.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["bold", "color", "italic", "name", "size", "underline"], [], []); }; + ChartFont.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartFont.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -19187,45 +22233,56 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Bold"])) { - this.m_bold=obj["Bold"]; + this._B=obj["Bold"]; } if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["Italic"])) { - this.m_italic=obj["Italic"]; + this._I=obj["Italic"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Size"])) { - this.m_size=obj["Size"]; + this._S=obj["Size"]; } if (!_isUndefined(obj["Underline"])) { - this.m_underline=obj["Underline"]; + this._U=obj["Underline"]; } }; ChartFont.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartFont.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartFont.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartFont.prototype.toJSON=function () { - return { - "bold": this.m_bold, - "color": this.m_color, - "italic": this.m_italic, - "name": this.m_name, - "size": this.m_size, - "underline": this.m_underline - }; + return _toJson(this, { + "bold": this._B, + "color": this._C, + "italic": this._I, + "name": this._N, + "size": this._S, + "underline": this._U, + }, {}); + }; + ChartFont.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartFont; }(OfficeExtension.ClientObject)); Excel.ChartFont=ChartFont; + var _typeRangeSort="RangeSort"; var RangeSort=(function (_super) { __extends(RangeSort, _super); function RangeSort() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeSort.prototype, "_className", { get: function () { @@ -19235,7 +22292,7 @@ var Excel; configurable: true }); RangeSort.prototype.apply=function (fields, matchCase, hasHeaders, orientation, method) { - _createMethodAction(this.context, this, "Apply", 0, [fields, matchCase, hasHeaders, orientation, method]); + _createMethodAction(this.context, this, "Apply", 0, [fields, matchCase, hasHeaders, orientation, method], false); }; RangeSort.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -19244,16 +22301,21 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); }; + RangeSort.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; RangeSort.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}); }; return RangeSort; }(OfficeExtension.ClientObject)); Excel.RangeSort=RangeSort; + var _typeTableSort="TableSort"; var TableSort=(function (_super) { __extends(TableSort, _super); function TableSort() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableSort.prototype, "_className", { get: function () { @@ -19262,38 +22324,45 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TableSort.prototype, "_scalarPropertyNames", { + get: function () { + return ["matchCase", "method", "fields"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TableSort.prototype, "fields", { get: function () { - _throwIfNotLoaded("fields", this.m_fields, "TableSort", this._isNull); - return this.m_fields; + _throwIfNotLoaded("fields", this._F, _typeTableSort, this._isNull); + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(TableSort.prototype, "matchCase", { get: function () { - _throwIfNotLoaded("matchCase", this.m_matchCase, "TableSort", this._isNull); - return this.m_matchCase; + _throwIfNotLoaded("matchCase", this._M, _typeTableSort, this._isNull); + return this._M; }, enumerable: true, configurable: true }); Object.defineProperty(TableSort.prototype, "method", { get: function () { - _throwIfNotLoaded("method", this.m_method, "TableSort", this._isNull); - return this.m_method; + _throwIfNotLoaded("method", this._Me, _typeTableSort, this._isNull); + return this._Me; }, enumerable: true, configurable: true }); TableSort.prototype.apply=function (fields, matchCase, method) { - _createMethodAction(this.context, this, "Apply", 0, [fields, matchCase, method]); + _createMethodAction(this.context, this, "Apply", 0, [fields, matchCase, method], false); }; TableSort.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; TableSort.prototype.reapply=function () { - _createMethodAction(this.context, this, "Reapply", 0, []); + _createMethodAction(this.context, this, "Reapply", 0, [], false); }; TableSort.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -19302,33 +22371,44 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Fields"])) { - this.m_fields=obj["Fields"]; + this._F=obj["Fields"]; } if (!_isUndefined(obj["MatchCase"])) { - this.m_matchCase=obj["MatchCase"]; + this._M=obj["MatchCase"]; } if (!_isUndefined(obj["Method"])) { - this.m_method=obj["Method"]; + this._Me=obj["Method"]; } }; TableSort.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableSort.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableSort.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; TableSort.prototype.toJSON=function () { - return { - "fields": this.m_fields, - "matchCase": this.m_matchCase, - "method": this.m_method - }; + return _toJson(this, { + "fields": this._F, + "matchCase": this._M, + "method": this._Me, + }, {}); + }; + TableSort.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TableSort; }(OfficeExtension.ClientObject)); Excel.TableSort=TableSort; + var _typeFilter="Filter"; var Filter=(function (_super) { __extends(Filter, _super); function Filter() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Filter.prototype, "_className", { get: function () { @@ -19337,49 +22417,56 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Filter.prototype, "_scalarPropertyNames", { + get: function () { + return ["criteria"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(Filter.prototype, "criteria", { get: function () { - _throwIfNotLoaded("criteria", this.m_criteria, "Filter", this._isNull); - return this.m_criteria; + _throwIfNotLoaded("criteria", this._C, _typeFilter, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Filter.prototype.apply=function (criteria) { - _createMethodAction(this.context, this, "Apply", 0, [criteria]); + _createMethodAction(this.context, this, "Apply", 0, [criteria], false); }; Filter.prototype.applyBottomItemsFilter=function (count) { - _createMethodAction(this.context, this, "ApplyBottomItemsFilter", 0, [count]); + _createMethodAction(this.context, this, "ApplyBottomItemsFilter", 0, [count], false); }; Filter.prototype.applyBottomPercentFilter=function (percent) { - _createMethodAction(this.context, this, "ApplyBottomPercentFilter", 0, [percent]); + _createMethodAction(this.context, this, "ApplyBottomPercentFilter", 0, [percent], false); }; Filter.prototype.applyCellColorFilter=function (color) { - _createMethodAction(this.context, this, "ApplyCellColorFilter", 0, [color]); + _createMethodAction(this.context, this, "ApplyCellColorFilter", 0, [color], false); }; Filter.prototype.applyCustomFilter=function (criteria1, criteria2, oper) { - _createMethodAction(this.context, this, "ApplyCustomFilter", 0, [criteria1, criteria2, oper]); + _createMethodAction(this.context, this, "ApplyCustomFilter", 0, [criteria1, criteria2, oper], false); }; Filter.prototype.applyDynamicFilter=function (criteria) { - _createMethodAction(this.context, this, "ApplyDynamicFilter", 0, [criteria]); + _createMethodAction(this.context, this, "ApplyDynamicFilter", 0, [criteria], false); }; Filter.prototype.applyFontColorFilter=function (color) { - _createMethodAction(this.context, this, "ApplyFontColorFilter", 0, [color]); + _createMethodAction(this.context, this, "ApplyFontColorFilter", 0, [color], false); }; Filter.prototype.applyIconFilter=function (icon) { - _createMethodAction(this.context, this, "ApplyIconFilter", 0, [icon]); + _createMethodAction(this.context, this, "ApplyIconFilter", 0, [icon], false); }; Filter.prototype.applyTopItemsFilter=function (count) { - _createMethodAction(this.context, this, "ApplyTopItemsFilter", 0, [count]); + _createMethodAction(this.context, this, "ApplyTopItemsFilter", 0, [count], false); }; Filter.prototype.applyTopPercentFilter=function (percent) { - _createMethodAction(this.context, this, "ApplyTopPercentFilter", 0, [percent]); + _createMethodAction(this.context, this, "ApplyTopPercentFilter", 0, [percent], false); }; Filter.prototype.applyValuesFilter=function (values) { - _createMethodAction(this.context, this, "ApplyValuesFilter", 0, [values]); + _createMethodAction(this.context, this, "ApplyValuesFilter", 0, [values], false); }; Filter.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; Filter.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -19388,25 +22475,36 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Criteria"])) { - this.m_criteria=obj["Criteria"]; + this._C=obj["Criteria"]; } }; Filter.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Filter.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Filter.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; Filter.prototype.toJSON=function () { - return { - "criteria": this.m_criteria - }; + return _toJson(this, { + "criteria": this._C, + }, {}); + }; + Filter.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Filter; }(OfficeExtension.ClientObject)); Excel.Filter=Filter; + var _typeCustomXmlPartScopedCollection="CustomXmlPartScopedCollection"; var CustomXmlPartScopedCollection=(function (_super) { __extends(CustomXmlPartScopedCollection, _super); function CustomXmlPartScopedCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CustomXmlPartScopedCollection.prototype, "_className", { get: function () { @@ -19415,16 +22513,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(CustomXmlPartScopedCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(CustomXmlPartScopedCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "CustomXmlPartScopedCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeCustomXmlPartScopedCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); CustomXmlPartScopedCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -19433,13 +22538,13 @@ var Excel; return new Excel.CustomXmlPart(this.context, _createIndexerObjectPath(this.context, this, [id])); }; CustomXmlPartScopedCollection.prototype.getItemOrNullObject=function (id) { - return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null)); + return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null, false)); }; CustomXmlPartScopedCollection.prototype.getOnlyItem=function () { - return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetOnlyItem", 1, [], false, false, null)); + return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetOnlyItem", 1, [], false, false, null, false)); }; CustomXmlPartScopedCollection.prototype.getOnlyItemOrNullObject=function () { - return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetOnlyItemOrNullObject", 1, [], false, false, null)); + return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetOnlyItemOrNullObject", 1, [], false, false, null, false)); }; CustomXmlPartScopedCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -19458,19 +22563,27 @@ var Excel; } }; CustomXmlPartScopedCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CustomXmlPartScopedCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CustomXmlPartScopedCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.CustomXmlPart(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; CustomXmlPartScopedCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return CustomXmlPartScopedCollection; }(OfficeExtension.ClientObject)); Excel.CustomXmlPartScopedCollection=CustomXmlPartScopedCollection; + var _typeCustomXmlPartCollection="CustomXmlPartCollection"; var CustomXmlPartCollection=(function (_super) { __extends(CustomXmlPartCollection, _super); function CustomXmlPartCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CustomXmlPartCollection.prototype, "_className", { get: function () { @@ -19479,22 +22592,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(CustomXmlPartCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(CustomXmlPartCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "CustomXmlPartCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeCustomXmlPartCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); CustomXmlPartCollection.prototype.add=function (xml) { - return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [xml], false, true, null)); + return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [xml], false, true, null, false)); }; CustomXmlPartCollection.prototype.getByNamespace=function (namespaceUri) { - return new Excel.CustomXmlPartScopedCollection(this.context, _createMethodObjectPath(this.context, this, "GetByNamespace", 1, [namespaceUri], true, false, null)); + return new Excel.CustomXmlPartScopedCollection(this.context, _createMethodObjectPath(this.context, this, "GetByNamespace", 1, [namespaceUri], true, false, null, false)); }; CustomXmlPartCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -19503,7 +22623,7 @@ var Excel; return new Excel.CustomXmlPart(this.context, _createIndexerObjectPath(this.context, this, [id])); }; CustomXmlPartCollection.prototype.getItemOrNullObject=function (id) { - return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null)); + return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null, false)); }; CustomXmlPartCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -19522,19 +22642,27 @@ var Excel; } }; CustomXmlPartCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CustomXmlPartCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CustomXmlPartCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.CustomXmlPart(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; CustomXmlPartCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return CustomXmlPartCollection; }(OfficeExtension.ClientObject)); Excel.CustomXmlPartCollection=CustomXmlPartCollection; + var _typeCustomXmlPart="CustomXmlPart"; var CustomXmlPart=(function (_super) { __extends(CustomXmlPart, _super); function CustomXmlPart() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CustomXmlPart.prototype, "_className", { get: function () { @@ -19543,33 +22671,40 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(CustomXmlPart.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "namespaceUri"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(CustomXmlPart.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "CustomXmlPart", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeCustomXmlPart, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(CustomXmlPart.prototype, "namespaceUri", { get: function () { - _throwIfNotLoaded("namespaceUri", this.m_namespaceUri, "CustomXmlPart", this._isNull); - return this.m_namespaceUri; + _throwIfNotLoaded("namespaceUri", this._N, _typeCustomXmlPart, this._isNull); + return this._N; }, enumerable: true, configurable: true }); CustomXmlPart.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; CustomXmlPart.prototype.getXml=function () { - var action=_createMethodAction(this.context, this, "GetXml", 1, []); + var action=_createMethodAction(this.context, this, "GetXml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; CustomXmlPart.prototype.setXml=function (xml) { - _createMethodAction(this.context, this, "SetXml", 0, [xml]); + _createMethodAction(this.context, this, "SetXml", 0, [xml], false); }; CustomXmlPart.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -19578,15 +22713,17 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["NamespaceUri"])) { - this.m_namespaceUri=obj["NamespaceUri"]; + this._N=obj["NamespaceUri"]; } }; CustomXmlPart.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CustomXmlPart.prototype.retrieve=function (option) { + return _retrieve(this, option); }; CustomXmlPart.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -19594,22 +22731,31 @@ var Excel; return; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; + CustomXmlPart.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; CustomXmlPart.prototype.toJSON=function () { - return { - "id": this.m_id, - "namespaceUri": this.m_namespaceUri - }; + return _toJson(this, { + "id": this._I, + "namespaceUri": this._N, + }, {}); + }; + CustomXmlPart.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return CustomXmlPart; }(OfficeExtension.ClientObject)); Excel.CustomXmlPart=CustomXmlPart; + var _type_V1Api="_V1Api"; var _V1Api=(function (_super) { __extends(_V1Api, _super); function _V1Api() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(_V1Api.prototype, "_className", { get: function () { @@ -19619,109 +22765,110 @@ var Excel; configurable: true }); _V1Api.prototype.bindingAddColumns=function (input) { - var action=_createMethodAction(this.context, this, "BindingAddColumns", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingAddColumns", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingAddFromNamedItem=function (input) { - var action=_createMethodAction(this.context, this, "BindingAddFromNamedItem", 1, [input]); + var action=_createMethodAction(this.context, this, "BindingAddFromNamedItem", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingAddFromPrompt=function (input) { - var action=_createMethodAction(this.context, this, "BindingAddFromPrompt", 1, [input]); + var action=_createMethodAction(this.context, this, "BindingAddFromPrompt", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingAddFromSelection=function (input) { - var action=_createMethodAction(this.context, this, "BindingAddFromSelection", 1, [input]); + var action=_createMethodAction(this.context, this, "BindingAddFromSelection", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingAddRows=function (input) { - var action=_createMethodAction(this.context, this, "BindingAddRows", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingAddRows", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingClearFormats=function (input) { - var action=_createMethodAction(this.context, this, "BindingClearFormats", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingClearFormats", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingDeleteAllDataValues=function (input) { - var action=_createMethodAction(this.context, this, "BindingDeleteAllDataValues", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingDeleteAllDataValues", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingGetAll=function () { - var action=_createMethodAction(this.context, this, "BindingGetAll", 1, []); + var action=_createMethodAction(this.context, this, "BindingGetAll", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingGetById=function (input) { - var action=_createMethodAction(this.context, this, "BindingGetById", 1, [input]); + var action=_createMethodAction(this.context, this, "BindingGetById", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingGetData=function (input) { - var action=_createMethodAction(this.context, this, "BindingGetData", 1, [input]); + var action=_createMethodAction(this.context, this, "BindingGetData", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingReleaseById=function (input) { - var action=_createMethodAction(this.context, this, "BindingReleaseById", 1, [input]); + var action=_createMethodAction(this.context, this, "BindingReleaseById", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingSetData=function (input) { - var action=_createMethodAction(this.context, this, "BindingSetData", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingSetData", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingSetFormats=function (input) { - var action=_createMethodAction(this.context, this, "BindingSetFormats", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingSetFormats", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingSetTableOptions=function (input) { - var action=_createMethodAction(this.context, this, "BindingSetTableOptions", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingSetTableOptions", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.getFilePropertiesAsync=function () { - var action=_createMethodAction(this.context, this, "GetFilePropertiesAsync", 1, []); + _throwIfApiNotSupported("_V1Api.getFilePropertiesAsync", _defaultApiSetName, "1.6", _hostName); + var action=_createMethodAction(this.context, this, "GetFilePropertiesAsync", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.getSelectedData=function (input) { - var action=_createMethodAction(this.context, this, "GetSelectedData", 1, [input]); + var action=_createMethodAction(this.context, this, "GetSelectedData", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.gotoById=function (input) { - var action=_createMethodAction(this.context, this, "GotoById", 1, [input]); + var action=_createMethodAction(this.context, this, "GotoById", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.setSelectedData=function (input) { - var action=_createMethodAction(this.context, this, "SetSelectedData", 0, [input]); + var action=_createMethodAction(this.context, this, "SetSelectedData", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -19733,16 +22880,21 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); }; + _V1Api.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; _V1Api.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}); }; return _V1Api; }(OfficeExtension.ClientObject)); Excel._V1Api=_V1Api; + var _typePivotTableCollection="PivotTableCollection"; var PivotTableCollection=(function (_super) { __extends(PivotTableCollection, _super); function PivotTableCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(PivotTableCollection.prototype, "_className", { get: function () { @@ -19751,16 +22903,24 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(PivotTableCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(PivotTableCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "PivotTableCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typePivotTableCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); PivotTableCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("PivotTableCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -19769,10 +22929,11 @@ var Excel; return new Excel.PivotTable(this.context, _createIndexerObjectPath(this.context, this, [name])); }; PivotTableCollection.prototype.getItemOrNullObject=function (name) { - return new Excel.PivotTable(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null)); + _throwIfApiNotSupported("PivotTableCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.PivotTable(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null, false)); }; PivotTableCollection.prototype.refreshAll=function () { - _createMethodAction(this.context, this, "RefreshAll", 0, []); + _createMethodAction(this.context, this, "RefreshAll", 0, [], false); }; PivotTableCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -19791,19 +22952,27 @@ var Excel; } }; PivotTableCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + PivotTableCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + PivotTableCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.PivotTable(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; PivotTableCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return PivotTableCollection; }(OfficeExtension.ClientObject)); Excel.PivotTableCollection=PivotTableCollection; + var _typePivotTable="PivotTable"; var PivotTable=(function (_super) { __extends(PivotTable, _super); function PivotTable() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(PivotTable.prototype, "_className", { get: function () { @@ -19812,31 +22981,53 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(PivotTable.prototype, "_scalarPropertyNames", { + get: function () { + return ["name", "id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PivotTable.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PivotTable.prototype, "_navigationPropertyNames", { + get: function () { + return ["worksheet"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(PivotTable.prototype, "worksheet", { get: function () { - if (!this.m_worksheet) { - this.m_worksheet=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false)); + if (!this._W) { + this._W=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false, false)); } - return this.m_worksheet; + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(PivotTable.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "PivotTable", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typePivotTable, this._isNull); + _throwIfApiNotSupported("PivotTable.id", _defaultApiSetName, "1.5", _hostName); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(PivotTable.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "PivotTable", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typePivotTable, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -19844,12 +23035,14 @@ var Excel; }); PivotTable.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["name"], [], [ - "worksheet", "worksheet" ]); }; + PivotTable.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; PivotTable.prototype.refresh=function () { - _createMethodAction(this.context, this, "Refresh", 0, []); + _createMethodAction(this.context, this, "Refresh", 0, [], false); }; PivotTable.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -19858,16 +23051,18 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } _handleNavigationPropertyResults(this, obj, ["worksheet", "Worksheet"]); }; PivotTable.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + PivotTable.prototype.retrieve=function (option) { + return _retrieve(this, option); }; PivotTable.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -19875,22 +23070,31 @@ var Excel; return; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; + PivotTable.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; PivotTable.prototype.toJSON=function () { - return { - "id": this.m_id, - "name": this.m_name - }; + return _toJson(this, { + "id": this._I, + "name": this._N, + }, {}); + }; + PivotTable.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return PivotTable; }(OfficeExtension.ClientObject)); Excel.PivotTable=PivotTable; + var _typeConditionalFormatCollection="ConditionalFormatCollection"; var ConditionalFormatCollection=(function (_super) { __extends(ConditionalFormatCollection, _super); function ConditionalFormatCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalFormatCollection.prototype, "_className", { get: function () { @@ -19899,28 +23103,38 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalFormatCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalFormatCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ConditionalFormatCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeConditionalFormatCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); ConditionalFormatCollection.prototype.add=function (type) { - return new Excel.ConditionalFormat(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [type], false, true, null)); + return new Excel.ConditionalFormat(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [type], false, true, null, false)); }; ConditionalFormatCollection.prototype.clearAll=function () { - _createMethodAction(this.context, this, "ClearAll", 0, []); + _createMethodAction(this.context, this, "ClearAll", 0, [], false); }; ConditionalFormatCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; + ConditionalFormatCollection.prototype.getItem=function (id) { + return new Excel.ConditionalFormat(this.context, _createIndexerObjectPath(this.context, this, [id])); + }; ConditionalFormatCollection.prototype.getItemAt=function (index) { - return new Excel.ConditionalFormat(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.ConditionalFormat(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; ConditionalFormatCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -19932,26 +23146,34 @@ var Excel; this.m__items=[]; var _data=obj[OfficeExtension.Constants.items]; for (var i=0; i < _data.length; i++) { - var _item=new Excel.ConditionalFormat(this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(false, this.context, this, _data[i], i)); + var _item=new Excel.ConditionalFormat(this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, this.context, this, _data[i], i)); _item._handleResult(_data[i]); this.m__items.push(_item); } } }; ConditionalFormatCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalFormatCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalFormatCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.ConditionalFormat(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; ConditionalFormatCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return ConditionalFormatCollection; }(OfficeExtension.ClientObject)); Excel.ConditionalFormatCollection=ConditionalFormatCollection; + var _typeConditionalFormat="ConditionalFormat"; var ConditionalFormat=(function (_super) { __extends(ConditionalFormat, _super); function ConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalFormat.prototype, "_className", { get: function () { @@ -19960,173 +23182,202 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["stopIfTrue", "priority", "type", "id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, false, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["dataBarOrNullObject", "dataBar", "customOrNullObject", "custom", "iconSet", "iconSetOrNullObject", "colorScale", "colorScaleOrNullObject", "topBottom", "topBottomOrNullObject", "preset", "presetOrNullObject", "textComparison", "textComparisonOrNullObject", "cellValue", "cellValueOrNullObject"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalFormat.prototype, "cellValue", { get: function () { - if (!this.m_cellValue) { - this.m_cellValue=new Excel.CellValueConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CellValue", false, false)); + if (!this._C) { + this._C=new Excel.CellValueConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CellValue", false, false, false)); } - return this.m_cellValue; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "cellValueOrNullObject", { get: function () { - if (!this.m_cellValueOrNullObject) { - this.m_cellValueOrNullObject=new Excel.CellValueConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CellValueOrNullObject", false, false)); + if (!this._Ce) { + this._Ce=new Excel.CellValueConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CellValueOrNullObject", false, false, false)); } - return this.m_cellValueOrNullObject; + return this._Ce; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "colorScale", { get: function () { - if (!this.m_colorScale) { - this.m_colorScale=new Excel.ColorScaleConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "ColorScale", false, false)); + if (!this._Co) { + this._Co=new Excel.ColorScaleConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "ColorScale", false, false, false)); } - return this.m_colorScale; + return this._Co; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "colorScaleOrNullObject", { get: function () { - if (!this.m_colorScaleOrNullObject) { - this.m_colorScaleOrNullObject=new Excel.ColorScaleConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "ColorScaleOrNullObject", false, false)); + if (!this._Col) { + this._Col=new Excel.ColorScaleConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "ColorScaleOrNullObject", false, false, false)); } - return this.m_colorScaleOrNullObject; + return this._Col; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "custom", { get: function () { - if (!this.m_custom) { - this.m_custom=new Excel.CustomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "Custom", false, false)); + if (!this._Cu) { + this._Cu=new Excel.CustomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "Custom", false, false, false)); } - return this.m_custom; + return this._Cu; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "customOrNullObject", { get: function () { - if (!this.m_customOrNullObject) { - this.m_customOrNullObject=new Excel.CustomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CustomOrNullObject", false, false)); + if (!this._Cus) { + this._Cus=new Excel.CustomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CustomOrNullObject", false, false, false)); } - return this.m_customOrNullObject; + return this._Cus; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "dataBar", { get: function () { - if (!this.m_dataBar) { - this.m_dataBar=new Excel.DataBarConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "DataBar", false, false)); + if (!this._D) { + this._D=new Excel.DataBarConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "DataBar", false, false, false)); } - return this.m_dataBar; + return this._D; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "dataBarOrNullObject", { get: function () { - if (!this.m_dataBarOrNullObject) { - this.m_dataBarOrNullObject=new Excel.DataBarConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "DataBarOrNullObject", false, false)); + if (!this._Da) { + this._Da=new Excel.DataBarConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "DataBarOrNullObject", false, false, false)); } - return this.m_dataBarOrNullObject; + return this._Da; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "iconSet", { get: function () { - if (!this.m_iconSet) { - this.m_iconSet=new Excel.IconSetConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "IconSet", false, false)); + if (!this._I) { + this._I=new Excel.IconSetConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "IconSet", false, false, false)); } - return this.m_iconSet; + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "iconSetOrNullObject", { get: function () { - if (!this.m_iconSetOrNullObject) { - this.m_iconSetOrNullObject=new Excel.IconSetConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "IconSetOrNullObject", false, false)); + if (!this._Ic) { + this._Ic=new Excel.IconSetConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "IconSetOrNullObject", false, false, false)); } - return this.m_iconSetOrNullObject; + return this._Ic; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "preset", { get: function () { - if (!this.m_preset) { - this.m_preset=new Excel.PresetCriteriaConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "Preset", false, false)); + if (!this._P) { + this._P=new Excel.PresetCriteriaConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "Preset", false, false, false)); } - return this.m_preset; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "presetOrNullObject", { get: function () { - if (!this.m_presetOrNullObject) { - this.m_presetOrNullObject=new Excel.PresetCriteriaConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "PresetOrNullObject", false, false)); + if (!this._Pr) { + this._Pr=new Excel.PresetCriteriaConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "PresetOrNullObject", false, false, false)); } - return this.m_presetOrNullObject; + return this._Pr; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "textComparison", { get: function () { - if (!this.m_textComparison) { - this.m_textComparison=new Excel.TextConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TextComparison", false, false)); + if (!this._T) { + this._T=new Excel.TextConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TextComparison", false, false, false)); } - return this.m_textComparison; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "textComparisonOrNullObject", { get: function () { - if (!this.m_textComparisonOrNullObject) { - this.m_textComparisonOrNullObject=new Excel.TextConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TextComparisonOrNullObject", false, false)); + if (!this._Te) { + this._Te=new Excel.TextConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TextComparisonOrNullObject", false, false, false)); } - return this.m_textComparisonOrNullObject; + return this._Te; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "topBottom", { get: function () { - if (!this.m_topBottom) { - this.m_topBottom=new Excel.TopBottomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TopBottom", false, false)); + if (!this._To) { + this._To=new Excel.TopBottomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TopBottom", false, false, false)); } - return this.m_topBottom; + return this._To; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "topBottomOrNullObject", { get: function () { - if (!this.m_topBottomOrNullObject) { - this.m_topBottomOrNullObject=new Excel.TopBottomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TopBottomOrNullObject", false, false)); + if (!this._Top) { + this._Top=new Excel.TopBottomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TopBottomOrNullObject", false, false, false)); } - return this.m_topBottomOrNullObject; + return this._Top; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._Id0, _typeConditionalFormat, this._isNull); + return this._Id0; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "priority", { get: function () { - _throwIfNotLoaded("priority", this.m_priority, "ConditionalFormat", this._isNull); - return this.m_priority; + _throwIfNotLoaded("priority", this._Pri, _typeConditionalFormat, this._isNull); + return this._Pri; }, set: function (value) { - this.m_priority=value; + this._Pri=value; _createSetPropertyAction(this.context, this, "Priority", value); }, enumerable: true, @@ -20134,11 +23385,11 @@ var Excel; }); Object.defineProperty(ConditionalFormat.prototype, "stopIfTrue", { get: function () { - _throwIfNotLoaded("stopIfTrue", this.m_stopIfTrue, "ConditionalFormat", this._isNull); - return this.m_stopIfTrue; + _throwIfNotLoaded("stopIfTrue", this._S, _typeConditionalFormat, this._isNull); + return this._S; }, set: function (value) { - this.m_stopIfTrue=value; + this._S=value; _createSetPropertyAction(this.context, this, "StopIfTrue", value); }, enumerable: true, @@ -20146,8 +23397,8 @@ var Excel; }); Object.defineProperty(ConditionalFormat.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "ConditionalFormat", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._Ty, _typeConditionalFormat, this._isNull); + return this._Ty; }, enumerable: true, configurable: true @@ -20155,14 +23406,17 @@ var Excel; ConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["stopIfTrue", "priority"], ["dataBarOrNullObject", "dataBar", "customOrNullObject", "custom", "iconSet", "iconSetOrNullObject", "colorScale", "colorScaleOrNullObject", "topBottom", "topBottomOrNullObject", "preset", "presetOrNullObject", "textComparison", "textComparisonOrNullObject", "cellValue", "cellValueOrNullObject"], []); }; + ConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalFormat.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; ConditionalFormat.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); }; ConditionalFormat.prototype.getRangeOrNullObject=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRangeOrNullObject", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRangeOrNullObject", 1, [], false, true, null, false)); }; ConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -20170,51 +23424,76 @@ var Excel; return; var obj=value; _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._Id0=obj["Id"]; + } if (!_isUndefined(obj["Priority"])) { - this.m_priority=obj["Priority"]; + this._Pri=obj["Priority"]; } if (!_isUndefined(obj["StopIfTrue"])) { - this.m_stopIfTrue=obj["StopIfTrue"]; + this._S=obj["StopIfTrue"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._Ty=obj["Type"]; } _handleNavigationPropertyResults(this, obj, ["cellValue", "CellValue", "cellValueOrNullObject", "CellValueOrNullObject", "colorScale", "ColorScale", "colorScaleOrNullObject", "ColorScaleOrNullObject", "custom", "Custom", "customOrNullObject", "CustomOrNullObject", "dataBar", "DataBar", "dataBarOrNullObject", "DataBarOrNullObject", "iconSet", "IconSet", "iconSetOrNullObject", "IconSetOrNullObject", "preset", "Preset", "presetOrNullObject", "PresetOrNullObject", "textComparison", "TextComparison", "textComparisonOrNullObject", "TextComparisonOrNullObject", "topBottom", "TopBottom", "topBottomOrNullObject", "TopBottomOrNullObject"]); }; ConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalFormat.prototype._handleIdResult=function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._Id0=value["Id"]; + } + }; + ConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalFormat.prototype.toJSON=function () { - return { - "cellValue": this.m_cellValue, - "cellValueOrNullObject": this.m_cellValueOrNullObject, - "colorScale": this.m_colorScale, - "colorScaleOrNullObject": this.m_colorScaleOrNullObject, - "custom": this.m_custom, - "customOrNullObject": this.m_customOrNullObject, - "dataBar": this.m_dataBar, - "dataBarOrNullObject": this.m_dataBarOrNullObject, - "iconSet": this.m_iconSet, - "iconSetOrNullObject": this.m_iconSetOrNullObject, - "preset": this.m_preset, - "presetOrNullObject": this.m_presetOrNullObject, - "priority": this.m_priority, - "stopIfTrue": this.m_stopIfTrue, - "textComparison": this.m_textComparison, - "textComparisonOrNullObject": this.m_textComparisonOrNullObject, - "topBottom": this.m_topBottom, - "topBottomOrNullObject": this.m_topBottomOrNullObject, - "type": this.m_type - }; + return _toJson(this, { + "id": this._Id0, + "priority": this._Pri, + "stopIfTrue": this._S, + "type": this._Ty, + }, { + "cellValue": this._C, + "cellValueOrNullObject": this._Ce, + "colorScale": this._Co, + "colorScaleOrNullObject": this._Col, + "custom": this._Cu, + "customOrNullObject": this._Cus, + "dataBar": this._D, + "dataBarOrNullObject": this._Da, + "iconSet": this._I, + "iconSetOrNullObject": this._Ic, + "preset": this._P, + "presetOrNullObject": this._Pr, + "textComparison": this._T, + "textComparisonOrNullObject": this._Te, + "topBottom": this._To, + "topBottomOrNullObject": this._Top, + }); + }; + ConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalFormat; }(OfficeExtension.ClientObject)); Excel.ConditionalFormat=ConditionalFormat; + var _typeDataBarConditionalFormat="DataBarConditionalFormat"; var DataBarConditionalFormat=(function (_super) { __extends(DataBarConditionalFormat, _super); function DataBarConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(DataBarConditionalFormat.prototype, "_className", { get: function () { @@ -20223,33 +23502,54 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(DataBarConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["showDataBarOnly", "barDirection", "axisFormat", "axisColor", "lowerBoundRule", "upperBoundRule"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DataBarConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DataBarConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["positiveFormat", "negativeFormat"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(DataBarConditionalFormat.prototype, "negativeFormat", { get: function () { - if (!this.m_negativeFormat) { - this.m_negativeFormat=new Excel.ConditionalDataBarNegativeFormat(this.context, _createPropertyObjectPath(this.context, this, "NegativeFormat", false, false)); + if (!this._N) { + this._N=new Excel.ConditionalDataBarNegativeFormat(this.context, _createPropertyObjectPath(this.context, this, "NegativeFormat", false, false, false)); } - return this.m_negativeFormat; + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(DataBarConditionalFormat.prototype, "positiveFormat", { get: function () { - if (!this.m_positiveFormat) { - this.m_positiveFormat=new Excel.ConditionalDataBarPositiveFormat(this.context, _createPropertyObjectPath(this.context, this, "PositiveFormat", false, false)); + if (!this._P) { + this._P=new Excel.ConditionalDataBarPositiveFormat(this.context, _createPropertyObjectPath(this.context, this, "PositiveFormat", false, false, false)); } - return this.m_positiveFormat; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(DataBarConditionalFormat.prototype, "axisColor", { get: function () { - _throwIfNotLoaded("axisColor", this.m_axisColor, "DataBarConditionalFormat", this._isNull); - return this.m_axisColor; + _throwIfNotLoaded("axisColor", this._A, _typeDataBarConditionalFormat, this._isNull); + return this._A; }, set: function (value) { - this.m_axisColor=value; + this._A=value; _createSetPropertyAction(this.context, this, "AxisColor", value); }, enumerable: true, @@ -20257,11 +23557,11 @@ var Excel; }); Object.defineProperty(DataBarConditionalFormat.prototype, "axisFormat", { get: function () { - _throwIfNotLoaded("axisFormat", this.m_axisFormat, "DataBarConditionalFormat", this._isNull); - return this.m_axisFormat; + _throwIfNotLoaded("axisFormat", this._Ax, _typeDataBarConditionalFormat, this._isNull); + return this._Ax; }, set: function (value) { - this.m_axisFormat=value; + this._Ax=value; _createSetPropertyAction(this.context, this, "AxisFormat", value); }, enumerable: true, @@ -20269,11 +23569,11 @@ var Excel; }); Object.defineProperty(DataBarConditionalFormat.prototype, "barDirection", { get: function () { - _throwIfNotLoaded("barDirection", this.m_barDirection, "DataBarConditionalFormat", this._isNull); - return this.m_barDirection; + _throwIfNotLoaded("barDirection", this._B, _typeDataBarConditionalFormat, this._isNull); + return this._B; }, set: function (value) { - this.m_barDirection=value; + this._B=value; _createSetPropertyAction(this.context, this, "BarDirection", value); }, enumerable: true, @@ -20281,11 +23581,11 @@ var Excel; }); Object.defineProperty(DataBarConditionalFormat.prototype, "lowerBoundRule", { get: function () { - _throwIfNotLoaded("lowerBoundRule", this.m_lowerBoundRule, "DataBarConditionalFormat", this._isNull); - return this.m_lowerBoundRule; + _throwIfNotLoaded("lowerBoundRule", this._L, _typeDataBarConditionalFormat, this._isNull); + return this._L; }, set: function (value) { - this.m_lowerBoundRule=value; + this._L=value; _createSetPropertyAction(this.context, this, "LowerBoundRule", value); }, enumerable: true, @@ -20293,11 +23593,11 @@ var Excel; }); Object.defineProperty(DataBarConditionalFormat.prototype, "showDataBarOnly", { get: function () { - _throwIfNotLoaded("showDataBarOnly", this.m_showDataBarOnly, "DataBarConditionalFormat", this._isNull); - return this.m_showDataBarOnly; + _throwIfNotLoaded("showDataBarOnly", this._S, _typeDataBarConditionalFormat, this._isNull); + return this._S; }, set: function (value) { - this.m_showDataBarOnly=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShowDataBarOnly", value); }, enumerable: true, @@ -20305,11 +23605,11 @@ var Excel; }); Object.defineProperty(DataBarConditionalFormat.prototype, "upperBoundRule", { get: function () { - _throwIfNotLoaded("upperBoundRule", this.m_upperBoundRule, "DataBarConditionalFormat", this._isNull); - return this.m_upperBoundRule; + _throwIfNotLoaded("upperBoundRule", this._U, _typeDataBarConditionalFormat, this._isNull); + return this._U; }, set: function (value) { - this.m_upperBoundRule=value; + this._U=value; _createSetPropertyAction(this.context, this, "UpperBoundRule", value); }, enumerable: true, @@ -20318,6 +23618,9 @@ var Excel; DataBarConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["showDataBarOnly", "barDirection", "axisFormat", "axisColor", "lowerBoundRule", "upperBoundRule"], ["positiveFormat", "negativeFormat"], []); }; + DataBarConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; DataBarConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -20325,48 +23628,60 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["AxisColor"])) { - this.m_axisColor=obj["AxisColor"]; + this._A=obj["AxisColor"]; } if (!_isUndefined(obj["AxisFormat"])) { - this.m_axisFormat=obj["AxisFormat"]; + this._Ax=obj["AxisFormat"]; } if (!_isUndefined(obj["BarDirection"])) { - this.m_barDirection=obj["BarDirection"]; + this._B=obj["BarDirection"]; } if (!_isUndefined(obj["LowerBoundRule"])) { - this.m_lowerBoundRule=obj["LowerBoundRule"]; + this._L=obj["LowerBoundRule"]; } if (!_isUndefined(obj["ShowDataBarOnly"])) { - this.m_showDataBarOnly=obj["ShowDataBarOnly"]; + this._S=obj["ShowDataBarOnly"]; } if (!_isUndefined(obj["UpperBoundRule"])) { - this.m_upperBoundRule=obj["UpperBoundRule"]; + this._U=obj["UpperBoundRule"]; } _handleNavigationPropertyResults(this, obj, ["negativeFormat", "NegativeFormat", "positiveFormat", "PositiveFormat"]); }; DataBarConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + DataBarConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + DataBarConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; DataBarConditionalFormat.prototype.toJSON=function () { - return { - "axisColor": this.m_axisColor, - "axisFormat": this.m_axisFormat, - "barDirection": this.m_barDirection, - "lowerBoundRule": this.m_lowerBoundRule, - "negativeFormat": this.m_negativeFormat, - "positiveFormat": this.m_positiveFormat, - "showDataBarOnly": this.m_showDataBarOnly, - "upperBoundRule": this.m_upperBoundRule - }; + return _toJson(this, { + "axisColor": this._A, + "axisFormat": this._Ax, + "barDirection": this._B, + "lowerBoundRule": this._L, + "showDataBarOnly": this._S, + "upperBoundRule": this._U, + }, { + "negativeFormat": this._N, + "positiveFormat": this._P, + }); + }; + DataBarConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return DataBarConditionalFormat; }(OfficeExtension.ClientObject)); Excel.DataBarConditionalFormat=DataBarConditionalFormat; + var _typeConditionalDataBarPositiveFormat="ConditionalDataBarPositiveFormat"; var ConditionalDataBarPositiveFormat=(function (_super) { __extends(ConditionalDataBarPositiveFormat, _super); function ConditionalDataBarPositiveFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "_className", { get: function () { @@ -20375,13 +23690,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["fillColor", "gradientFill", "borderColor"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "borderColor", { get: function () { - _throwIfNotLoaded("borderColor", this.m_borderColor, "ConditionalDataBarPositiveFormat", this._isNull); - return this.m_borderColor; + _throwIfNotLoaded("borderColor", this._B, _typeConditionalDataBarPositiveFormat, this._isNull); + return this._B; }, set: function (value) { - this.m_borderColor=value; + this._B=value; _createSetPropertyAction(this.context, this, "BorderColor", value); }, enumerable: true, @@ -20389,11 +23718,11 @@ var Excel; }); Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "fillColor", { get: function () { - _throwIfNotLoaded("fillColor", this.m_fillColor, "ConditionalDataBarPositiveFormat", this._isNull); - return this.m_fillColor; + _throwIfNotLoaded("fillColor", this._F, _typeConditionalDataBarPositiveFormat, this._isNull); + return this._F; }, set: function (value) { - this.m_fillColor=value; + this._F=value; _createSetPropertyAction(this.context, this, "FillColor", value); }, enumerable: true, @@ -20401,11 +23730,11 @@ var Excel; }); Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "gradientFill", { get: function () { - _throwIfNotLoaded("gradientFill", this.m_gradientFill, "ConditionalDataBarPositiveFormat", this._isNull); - return this.m_gradientFill; + _throwIfNotLoaded("gradientFill", this._G, _typeConditionalDataBarPositiveFormat, this._isNull); + return this._G; }, set: function (value) { - this.m_gradientFill=value; + this._G=value; _createSetPropertyAction(this.context, this, "GradientFill", value); }, enumerable: true, @@ -20414,6 +23743,9 @@ var Excel; ConditionalDataBarPositiveFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["fillColor", "gradientFill", "borderColor"], [], []); }; + ConditionalDataBarPositiveFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalDataBarPositiveFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -20421,33 +23753,44 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["BorderColor"])) { - this.m_borderColor=obj["BorderColor"]; + this._B=obj["BorderColor"]; } if (!_isUndefined(obj["FillColor"])) { - this.m_fillColor=obj["FillColor"]; + this._F=obj["FillColor"]; } if (!_isUndefined(obj["GradientFill"])) { - this.m_gradientFill=obj["GradientFill"]; + this._G=obj["GradientFill"]; } }; ConditionalDataBarPositiveFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalDataBarPositiveFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalDataBarPositiveFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalDataBarPositiveFormat.prototype.toJSON=function () { - return { - "borderColor": this.m_borderColor, - "fillColor": this.m_fillColor, - "gradientFill": this.m_gradientFill - }; + return _toJson(this, { + "borderColor": this._B, + "fillColor": this._F, + "gradientFill": this._G, + }, {}); + }; + ConditionalDataBarPositiveFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalDataBarPositiveFormat; }(OfficeExtension.ClientObject)); Excel.ConditionalDataBarPositiveFormat=ConditionalDataBarPositiveFormat; + var _typeConditionalDataBarNegativeFormat="ConditionalDataBarNegativeFormat"; var ConditionalDataBarNegativeFormat=(function (_super) { __extends(ConditionalDataBarNegativeFormat, _super); function ConditionalDataBarNegativeFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "_className", { get: function () { @@ -20456,13 +23799,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["fillColor", "matchPositiveFillColor", "borderColor", "matchPositiveBorderColor"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "borderColor", { get: function () { - _throwIfNotLoaded("borderColor", this.m_borderColor, "ConditionalDataBarNegativeFormat", this._isNull); - return this.m_borderColor; + _throwIfNotLoaded("borderColor", this._B, _typeConditionalDataBarNegativeFormat, this._isNull); + return this._B; }, set: function (value) { - this.m_borderColor=value; + this._B=value; _createSetPropertyAction(this.context, this, "BorderColor", value); }, enumerable: true, @@ -20470,11 +23827,11 @@ var Excel; }); Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "fillColor", { get: function () { - _throwIfNotLoaded("fillColor", this.m_fillColor, "ConditionalDataBarNegativeFormat", this._isNull); - return this.m_fillColor; + _throwIfNotLoaded("fillColor", this._F, _typeConditionalDataBarNegativeFormat, this._isNull); + return this._F; }, set: function (value) { - this.m_fillColor=value; + this._F=value; _createSetPropertyAction(this.context, this, "FillColor", value); }, enumerable: true, @@ -20482,11 +23839,11 @@ var Excel; }); Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "matchPositiveBorderColor", { get: function () { - _throwIfNotLoaded("matchPositiveBorderColor", this.m_matchPositiveBorderColor, "ConditionalDataBarNegativeFormat", this._isNull); - return this.m_matchPositiveBorderColor; + _throwIfNotLoaded("matchPositiveBorderColor", this._M, _typeConditionalDataBarNegativeFormat, this._isNull); + return this._M; }, set: function (value) { - this.m_matchPositiveBorderColor=value; + this._M=value; _createSetPropertyAction(this.context, this, "MatchPositiveBorderColor", value); }, enumerable: true, @@ -20494,11 +23851,11 @@ var Excel; }); Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "matchPositiveFillColor", { get: function () { - _throwIfNotLoaded("matchPositiveFillColor", this.m_matchPositiveFillColor, "ConditionalDataBarNegativeFormat", this._isNull); - return this.m_matchPositiveFillColor; + _throwIfNotLoaded("matchPositiveFillColor", this._Ma, _typeConditionalDataBarNegativeFormat, this._isNull); + return this._Ma; }, set: function (value) { - this.m_matchPositiveFillColor=value; + this._Ma=value; _createSetPropertyAction(this.context, this, "MatchPositiveFillColor", value); }, enumerable: true, @@ -20507,6 +23864,9 @@ var Excel; ConditionalDataBarNegativeFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["fillColor", "matchPositiveFillColor", "borderColor", "matchPositiveBorderColor"], [], []); }; + ConditionalDataBarNegativeFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalDataBarNegativeFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -20514,37 +23874,48 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["BorderColor"])) { - this.m_borderColor=obj["BorderColor"]; + this._B=obj["BorderColor"]; } if (!_isUndefined(obj["FillColor"])) { - this.m_fillColor=obj["FillColor"]; + this._F=obj["FillColor"]; } if (!_isUndefined(obj["MatchPositiveBorderColor"])) { - this.m_matchPositiveBorderColor=obj["MatchPositiveBorderColor"]; + this._M=obj["MatchPositiveBorderColor"]; } if (!_isUndefined(obj["MatchPositiveFillColor"])) { - this.m_matchPositiveFillColor=obj["MatchPositiveFillColor"]; + this._Ma=obj["MatchPositiveFillColor"]; } }; ConditionalDataBarNegativeFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalDataBarNegativeFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalDataBarNegativeFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalDataBarNegativeFormat.prototype.toJSON=function () { - return { - "borderColor": this.m_borderColor, - "fillColor": this.m_fillColor, - "matchPositiveBorderColor": this.m_matchPositiveBorderColor, - "matchPositiveFillColor": this.m_matchPositiveFillColor - }; + return _toJson(this, { + "borderColor": this._B, + "fillColor": this._F, + "matchPositiveBorderColor": this._M, + "matchPositiveFillColor": this._Ma, + }, {}); + }; + ConditionalDataBarNegativeFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalDataBarNegativeFormat; }(OfficeExtension.ClientObject)); Excel.ConditionalDataBarNegativeFormat=ConditionalDataBarNegativeFormat; + var _typeCustomConditionalFormat="CustomConditionalFormat"; var CustomConditionalFormat=(function (_super) { __extends(CustomConditionalFormat, _super); function CustomConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CustomConditionalFormat.prototype, "_className", { get: function () { @@ -20553,22 +23924,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(CustomConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["rule", "format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(CustomConditionalFormat.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(CustomConditionalFormat.prototype, "rule", { get: function () { - if (!this.m_rule) { - this.m_rule=new Excel.ConditionalFormatRule(this.context, _createPropertyObjectPath(this.context, this, "Rule", false, false)); + if (!this._R) { + this._R=new Excel.ConditionalFormatRule(this.context, _createPropertyObjectPath(this.context, this, "Rule", false, false, false)); } - return this.m_rule; + return this._R; }, enumerable: true, configurable: true @@ -20576,6 +23954,9 @@ var Excel; CustomConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, [], ["rule", "format"], []); }; + CustomConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; CustomConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -20585,22 +23966,33 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["format", "Format", "rule", "Rule"]); }; CustomConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CustomConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CustomConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; CustomConditionalFormat.prototype.toJSON=function () { - return { - "format": this.m_format, - "rule": this.m_rule - }; + return _toJson(this, {}, { + "format": this._F, + "rule": this._R, + }); + }; + CustomConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return CustomConditionalFormat; }(OfficeExtension.ClientObject)); Excel.CustomConditionalFormat=CustomConditionalFormat; + var _typeConditionalFormatRule="ConditionalFormatRule"; var ConditionalFormatRule=(function (_super) { __extends(ConditionalFormatRule, _super); function ConditionalFormatRule() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalFormatRule.prototype, "_className", { get: function () { @@ -20609,13 +24001,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalFormatRule.prototype, "_scalarPropertyNames", { + get: function () { + return ["formula", "formulaLocal", "formulaR1C1"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormatRule.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalFormatRule.prototype, "formula", { get: function () { - _throwIfNotLoaded("formula", this.m_formula, "ConditionalFormatRule", this._isNull); - return this.m_formula; + _throwIfNotLoaded("formula", this._F, _typeConditionalFormatRule, this._isNull); + return this._F; }, set: function (value) { - this.m_formula=value; + this._F=value; _createSetPropertyAction(this.context, this, "Formula", value); }, enumerable: true, @@ -20623,11 +24029,11 @@ var Excel; }); Object.defineProperty(ConditionalFormatRule.prototype, "formulaLocal", { get: function () { - _throwIfNotLoaded("formulaLocal", this.m_formulaLocal, "ConditionalFormatRule", this._isNull); - return this.m_formulaLocal; + _throwIfNotLoaded("formulaLocal", this._Fo, _typeConditionalFormatRule, this._isNull); + return this._Fo; }, set: function (value) { - this.m_formulaLocal=value; + this._Fo=value; _createSetPropertyAction(this.context, this, "FormulaLocal", value); }, enumerable: true, @@ -20635,11 +24041,11 @@ var Excel; }); Object.defineProperty(ConditionalFormatRule.prototype, "formulaR1C1", { get: function () { - _throwIfNotLoaded("formulaR1C1", this.m_formulaR1C1, "ConditionalFormatRule", this._isNull); - return this.m_formulaR1C1; + _throwIfNotLoaded("formulaR1C1", this._For, _typeConditionalFormatRule, this._isNull); + return this._For; }, set: function (value) { - this.m_formulaR1C1=value; + this._For=value; _createSetPropertyAction(this.context, this, "FormulaR1C1", value); }, enumerable: true, @@ -20648,6 +24054,9 @@ var Excel; ConditionalFormatRule.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["formula", "formulaLocal", "formulaR1C1"], [], []); }; + ConditionalFormatRule.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalFormatRule.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -20655,33 +24064,44 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Formula"])) { - this.m_formula=obj["Formula"]; + this._F=obj["Formula"]; } if (!_isUndefined(obj["FormulaLocal"])) { - this.m_formulaLocal=obj["FormulaLocal"]; + this._Fo=obj["FormulaLocal"]; } if (!_isUndefined(obj["FormulaR1C1"])) { - this.m_formulaR1C1=obj["FormulaR1C1"]; + this._For=obj["FormulaR1C1"]; } }; ConditionalFormatRule.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalFormatRule.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalFormatRule.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalFormatRule.prototype.toJSON=function () { - return { - "formula": this.m_formula, - "formulaLocal": this.m_formulaLocal, - "formulaR1C1": this.m_formulaR1C1 - }; + return _toJson(this, { + "formula": this._F, + "formulaLocal": this._Fo, + "formulaR1C1": this._For, + }, {}); + }; + ConditionalFormatRule.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalFormatRule; }(OfficeExtension.ClientObject)); Excel.ConditionalFormatRule=ConditionalFormatRule; + var _typeIconSetConditionalFormat="IconSetConditionalFormat"; var IconSetConditionalFormat=(function (_super) { __extends(IconSetConditionalFormat, _super); function IconSetConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(IconSetConditionalFormat.prototype, "_className", { get: function () { @@ -20690,13 +24110,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(IconSetConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["reverseIconOrder", "showIconOnly", "style", "criteria"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(IconSetConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(IconSetConditionalFormat.prototype, "criteria", { get: function () { - _throwIfNotLoaded("criteria", this.m_criteria, "IconSetConditionalFormat", this._isNull); - return this.m_criteria; + _throwIfNotLoaded("criteria", this._C, _typeIconSetConditionalFormat, this._isNull); + return this._C; }, set: function (value) { - this.m_criteria=value; + this._C=value; _createSetPropertyAction(this.context, this, "Criteria", value); }, enumerable: true, @@ -20704,11 +24138,11 @@ var Excel; }); Object.defineProperty(IconSetConditionalFormat.prototype, "reverseIconOrder", { get: function () { - _throwIfNotLoaded("reverseIconOrder", this.m_reverseIconOrder, "IconSetConditionalFormat", this._isNull); - return this.m_reverseIconOrder; + _throwIfNotLoaded("reverseIconOrder", this._R, _typeIconSetConditionalFormat, this._isNull); + return this._R; }, set: function (value) { - this.m_reverseIconOrder=value; + this._R=value; _createSetPropertyAction(this.context, this, "ReverseIconOrder", value); }, enumerable: true, @@ -20716,11 +24150,11 @@ var Excel; }); Object.defineProperty(IconSetConditionalFormat.prototype, "showIconOnly", { get: function () { - _throwIfNotLoaded("showIconOnly", this.m_showIconOnly, "IconSetConditionalFormat", this._isNull); - return this.m_showIconOnly; + _throwIfNotLoaded("showIconOnly", this._S, _typeIconSetConditionalFormat, this._isNull); + return this._S; }, set: function (value) { - this.m_showIconOnly=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShowIconOnly", value); }, enumerable: true, @@ -20728,11 +24162,11 @@ var Excel; }); Object.defineProperty(IconSetConditionalFormat.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "IconSetConditionalFormat", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._St, _typeIconSetConditionalFormat, this._isNull); + return this._St; }, set: function (value) { - this.m_style=value; + this._St=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -20741,6 +24175,9 @@ var Excel; IconSetConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["reverseIconOrder", "showIconOnly", "style", "criteria"], [], []); }; + IconSetConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; IconSetConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -20748,37 +24185,48 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Criteria"])) { - this.m_criteria=obj["Criteria"]; + this._C=obj["Criteria"]; } if (!_isUndefined(obj["ReverseIconOrder"])) { - this.m_reverseIconOrder=obj["ReverseIconOrder"]; + this._R=obj["ReverseIconOrder"]; } if (!_isUndefined(obj["ShowIconOnly"])) { - this.m_showIconOnly=obj["ShowIconOnly"]; + this._S=obj["ShowIconOnly"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._St=obj["Style"]; } }; IconSetConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + IconSetConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + IconSetConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; IconSetConditionalFormat.prototype.toJSON=function () { - return { - "criteria": this.m_criteria, - "reverseIconOrder": this.m_reverseIconOrder, - "showIconOnly": this.m_showIconOnly, - "style": this.m_style - }; + return _toJson(this, { + "criteria": this._C, + "reverseIconOrder": this._R, + "showIconOnly": this._S, + "style": this._St, + }, {}); + }; + IconSetConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return IconSetConditionalFormat; }(OfficeExtension.ClientObject)); Excel.IconSetConditionalFormat=IconSetConditionalFormat; + var _typeColorScaleConditionalFormat="ColorScaleConditionalFormat"; var ColorScaleConditionalFormat=(function (_super) { __extends(ColorScaleConditionalFormat, _super); function ColorScaleConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ColorScaleConditionalFormat.prototype, "_className", { get: function () { @@ -20787,13 +24235,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ColorScaleConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["threeColorScale", "criteria"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ColorScaleConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ColorScaleConditionalFormat.prototype, "criteria", { get: function () { - _throwIfNotLoaded("criteria", this.m_criteria, "ColorScaleConditionalFormat", this._isNull); - return this.m_criteria; + _throwIfNotLoaded("criteria", this._C, _typeColorScaleConditionalFormat, this._isNull); + return this._C; }, set: function (value) { - this.m_criteria=value; + this._C=value; _createSetPropertyAction(this.context, this, "Criteria", value); }, enumerable: true, @@ -20801,8 +24263,8 @@ var Excel; }); Object.defineProperty(ColorScaleConditionalFormat.prototype, "threeColorScale", { get: function () { - _throwIfNotLoaded("threeColorScale", this.m_threeColorScale, "ColorScaleConditionalFormat", this._isNull); - return this.m_threeColorScale; + _throwIfNotLoaded("threeColorScale", this._T, _typeColorScaleConditionalFormat, this._isNull); + return this._T; }, enumerable: true, configurable: true @@ -20810,6 +24272,9 @@ var Excel; ColorScaleConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["criteria"], [], []); }; + ColorScaleConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ColorScaleConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -20817,29 +24282,40 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Criteria"])) { - this.m_criteria=obj["Criteria"]; + this._C=obj["Criteria"]; } if (!_isUndefined(obj["ThreeColorScale"])) { - this.m_threeColorScale=obj["ThreeColorScale"]; + this._T=obj["ThreeColorScale"]; } }; ColorScaleConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ColorScaleConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ColorScaleConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ColorScaleConditionalFormat.prototype.toJSON=function () { - return { - "criteria": this.m_criteria, - "threeColorScale": this.m_threeColorScale - }; + return _toJson(this, { + "criteria": this._C, + "threeColorScale": this._T, + }, {}); + }; + ColorScaleConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ColorScaleConditionalFormat; }(OfficeExtension.ClientObject)); Excel.ColorScaleConditionalFormat=ColorScaleConditionalFormat; + var _typeTopBottomConditionalFormat="TopBottomConditionalFormat"; var TopBottomConditionalFormat=(function (_super) { __extends(TopBottomConditionalFormat, _super); function TopBottomConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TopBottomConditionalFormat.prototype, "_className", { get: function () { @@ -20848,23 +24324,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TopBottomConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["rule"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TopBottomConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TopBottomConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TopBottomConditionalFormat.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(TopBottomConditionalFormat.prototype, "rule", { get: function () { - _throwIfNotLoaded("rule", this.m_rule, "TopBottomConditionalFormat", this._isNull); - return this.m_rule; + _throwIfNotLoaded("rule", this._R, _typeTopBottomConditionalFormat, this._isNull); + return this._R; }, set: function (value) { - this.m_rule=value; + this._R=value; _createSetPropertyAction(this.context, this, "Rule", value); }, enumerable: true, @@ -20873,6 +24370,9 @@ var Excel; TopBottomConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["rule"], ["format"], []); }; + TopBottomConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; TopBottomConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -20880,27 +24380,39 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Rule"])) { - this.m_rule=obj["Rule"]; + this._R=obj["Rule"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; TopBottomConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TopBottomConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TopBottomConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; TopBottomConditionalFormat.prototype.toJSON=function () { - return { - "format": this.m_format, - "rule": this.m_rule - }; + return _toJson(this, { + "rule": this._R, + }, { + "format": this._F, + }); + }; + TopBottomConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TopBottomConditionalFormat; }(OfficeExtension.ClientObject)); Excel.TopBottomConditionalFormat=TopBottomConditionalFormat; + var _typePresetCriteriaConditionalFormat="PresetCriteriaConditionalFormat"; var PresetCriteriaConditionalFormat=(function (_super) { __extends(PresetCriteriaConditionalFormat, _super); function PresetCriteriaConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "_className", { get: function () { @@ -20909,23 +24421,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["rule"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "rule", { get: function () { - _throwIfNotLoaded("rule", this.m_rule, "PresetCriteriaConditionalFormat", this._isNull); - return this.m_rule; + _throwIfNotLoaded("rule", this._R, _typePresetCriteriaConditionalFormat, this._isNull); + return this._R; }, set: function (value) { - this.m_rule=value; + this._R=value; _createSetPropertyAction(this.context, this, "Rule", value); }, enumerable: true, @@ -20934,6 +24467,9 @@ var Excel; PresetCriteriaConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["rule"], ["format"], []); }; + PresetCriteriaConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; PresetCriteriaConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -20941,27 +24477,39 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Rule"])) { - this.m_rule=obj["Rule"]; + this._R=obj["Rule"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; PresetCriteriaConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + PresetCriteriaConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + PresetCriteriaConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; PresetCriteriaConditionalFormat.prototype.toJSON=function () { - return { - "format": this.m_format, - "rule": this.m_rule - }; + return _toJson(this, { + "rule": this._R, + }, { + "format": this._F, + }); + }; + PresetCriteriaConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return PresetCriteriaConditionalFormat; }(OfficeExtension.ClientObject)); Excel.PresetCriteriaConditionalFormat=PresetCriteriaConditionalFormat; + var _typeTextConditionalFormat="TextConditionalFormat"; var TextConditionalFormat=(function (_super) { __extends(TextConditionalFormat, _super); function TextConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TextConditionalFormat.prototype, "_className", { get: function () { @@ -20970,23 +24518,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TextConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["rule"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TextConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TextConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TextConditionalFormat.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(TextConditionalFormat.prototype, "rule", { get: function () { - _throwIfNotLoaded("rule", this.m_rule, "TextConditionalFormat", this._isNull); - return this.m_rule; + _throwIfNotLoaded("rule", this._R, _typeTextConditionalFormat, this._isNull); + return this._R; }, set: function (value) { - this.m_rule=value; + this._R=value; _createSetPropertyAction(this.context, this, "Rule", value); }, enumerable: true, @@ -20995,6 +24564,9 @@ var Excel; TextConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["rule"], ["format"], []); }; + TextConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; TextConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -21002,27 +24574,39 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Rule"])) { - this.m_rule=obj["Rule"]; + this._R=obj["Rule"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; TextConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TextConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TextConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; TextConditionalFormat.prototype.toJSON=function () { - return { - "format": this.m_format, - "rule": this.m_rule - }; + return _toJson(this, { + "rule": this._R, + }, { + "format": this._F, + }); + }; + TextConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TextConditionalFormat; }(OfficeExtension.ClientObject)); Excel.TextConditionalFormat=TextConditionalFormat; + var _typeCellValueConditionalFormat="CellValueConditionalFormat"; var CellValueConditionalFormat=(function (_super) { __extends(CellValueConditionalFormat, _super); function CellValueConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CellValueConditionalFormat.prototype, "_className", { get: function () { @@ -21031,23 +24615,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(CellValueConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["rule"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CellValueConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CellValueConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(CellValueConditionalFormat.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(CellValueConditionalFormat.prototype, "rule", { get: function () { - _throwIfNotLoaded("rule", this.m_rule, "CellValueConditionalFormat", this._isNull); - return this.m_rule; + _throwIfNotLoaded("rule", this._R, _typeCellValueConditionalFormat, this._isNull); + return this._R; }, set: function (value) { - this.m_rule=value; + this._R=value; _createSetPropertyAction(this.context, this, "Rule", value); }, enumerable: true, @@ -21056,6 +24661,9 @@ var Excel; CellValueConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["rule"], ["format"], []); }; + CellValueConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; CellValueConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -21063,27 +24671,39 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Rule"])) { - this.m_rule=obj["Rule"]; + this._R=obj["Rule"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; CellValueConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CellValueConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CellValueConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; CellValueConditionalFormat.prototype.toJSON=function () { - return { - "format": this.m_format, - "rule": this.m_rule - }; + return _toJson(this, { + "rule": this._R, + }, { + "format": this._F, + }); + }; + CellValueConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return CellValueConditionalFormat; }(OfficeExtension.ClientObject)); Excel.CellValueConditionalFormat=CellValueConditionalFormat; + var _typeConditionalRangeFormat="ConditionalRangeFormat"; var ConditionalRangeFormat=(function (_super) { __extends(ConditionalRangeFormat, _super); function ConditionalRangeFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalRangeFormat.prototype, "_className", { get: function () { @@ -21092,58 +24712,77 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalRangeFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["numberFormat"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["fill", "font", "borders"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalRangeFormat.prototype, "borders", { get: function () { - if (!this.m_borders) { - this.m_borders=new Excel.ConditionalRangeBorderCollection(this.context, _createPropertyObjectPath(this.context, this, "Borders", true, false)); + if (!this._B) { + this._B=new Excel.ConditionalRangeBorderCollection(this.context, _createPropertyObjectPath(this.context, this, "Borders", true, false, false)); } - return this.m_borders; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ConditionalRangeFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ConditionalRangeFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ConditionalRangeFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Excel.ConditionalRangeFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeFormat.prototype, "numberFormat", { get: function () { - _throwIfNotLoaded("numberFormat", this.m_numberFormat, "ConditionalRangeFormat", this._isNull); - return this.m_numberFormat; + _throwIfNotLoaded("numberFormat", this._N, _typeConditionalRangeFormat, this._isNull); + return this._N; }, set: function (value) { - this.m_numberFormat=value; + this._N=value; _createSetPropertyAction(this.context, this, "NumberFormat", value); }, enumerable: true, configurable: true }); ConditionalRangeFormat.prototype.set=function (properties, options) { - this._recursivelySet(properties, options, ["numberFormat"], [], [ - "borders", - "fill", - "font", - "borders", - "fill", - "font" + this._recursivelySet(properties, options, ["numberFormat"], ["fill", "font"], [ + "borders" ]); }; + ConditionalRangeFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalRangeFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -21151,26 +24790,41 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["NumberFormat"])) { - this.m_numberFormat=obj["NumberFormat"]; + this._N=obj["NumberFormat"]; } _handleNavigationPropertyResults(this, obj, ["borders", "Borders", "fill", "Fill", "font", "Font"]); }; ConditionalRangeFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalRangeFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalRangeFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalRangeFormat.prototype.toJSON=function () { - return { - "numberFormat": this.m_numberFormat - }; + return _toJson(this, { + "numberFormat": this._N, + }, { + "borders": this._B, + "fill": this._F, + "font": this._Fo, + }); + }; + ConditionalRangeFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalRangeFormat; }(OfficeExtension.ClientObject)); Excel.ConditionalRangeFormat=ConditionalRangeFormat; + var _typeConditionalRangeFont="ConditionalRangeFont"; var ConditionalRangeFont=(function (_super) { __extends(ConditionalRangeFont, _super); function ConditionalRangeFont() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalRangeFont.prototype, "_className", { get: function () { @@ -21179,13 +24833,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalRangeFont.prototype, "_scalarPropertyNames", { + get: function () { + return ["color", "italic", "bold", "underline", "strikethrough"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeFont.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalRangeFont.prototype, "bold", { get: function () { - _throwIfNotLoaded("bold", this.m_bold, "ConditionalRangeFont", this._isNull); - return this.m_bold; + _throwIfNotLoaded("bold", this._B, _typeConditionalRangeFont, this._isNull); + return this._B; }, set: function (value) { - this.m_bold=value; + this._B=value; _createSetPropertyAction(this.context, this, "Bold", value); }, enumerable: true, @@ -21193,11 +24861,11 @@ var Excel; }); Object.defineProperty(ConditionalRangeFont.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "ConditionalRangeFont", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeConditionalRangeFont, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -21205,11 +24873,11 @@ var Excel; }); Object.defineProperty(ConditionalRangeFont.prototype, "italic", { get: function () { - _throwIfNotLoaded("italic", this.m_italic, "ConditionalRangeFont", this._isNull); - return this.m_italic; + _throwIfNotLoaded("italic", this._I, _typeConditionalRangeFont, this._isNull); + return this._I; }, set: function (value) { - this.m_italic=value; + this._I=value; _createSetPropertyAction(this.context, this, "Italic", value); }, enumerable: true, @@ -21217,11 +24885,11 @@ var Excel; }); Object.defineProperty(ConditionalRangeFont.prototype, "strikethrough", { get: function () { - _throwIfNotLoaded("strikethrough", this.m_strikethrough, "ConditionalRangeFont", this._isNull); - return this.m_strikethrough; + _throwIfNotLoaded("strikethrough", this._S, _typeConditionalRangeFont, this._isNull); + return this._S; }, set: function (value) { - this.m_strikethrough=value; + this._S=value; _createSetPropertyAction(this.context, this, "Strikethrough", value); }, enumerable: true, @@ -21229,11 +24897,11 @@ var Excel; }); Object.defineProperty(ConditionalRangeFont.prototype, "underline", { get: function () { - _throwIfNotLoaded("underline", this.m_underline, "ConditionalRangeFont", this._isNull); - return this.m_underline; + _throwIfNotLoaded("underline", this._U, _typeConditionalRangeFont, this._isNull); + return this._U; }, set: function (value) { - this.m_underline=value; + this._U=value; _createSetPropertyAction(this.context, this, "Underline", value); }, enumerable: true, @@ -21242,8 +24910,11 @@ var Excel; ConditionalRangeFont.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["color", "italic", "bold", "underline", "strikethrough"], [], []); }; + ConditionalRangeFont.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalRangeFont.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; ConditionalRangeFont.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -21252,41 +24923,52 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Bold"])) { - this.m_bold=obj["Bold"]; + this._B=obj["Bold"]; } if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["Italic"])) { - this.m_italic=obj["Italic"]; + this._I=obj["Italic"]; } if (!_isUndefined(obj["Strikethrough"])) { - this.m_strikethrough=obj["Strikethrough"]; + this._S=obj["Strikethrough"]; } if (!_isUndefined(obj["Underline"])) { - this.m_underline=obj["Underline"]; + this._U=obj["Underline"]; } }; ConditionalRangeFont.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalRangeFont.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalRangeFont.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalRangeFont.prototype.toJSON=function () { - return { - "bold": this.m_bold, - "color": this.m_color, - "italic": this.m_italic, - "strikethrough": this.m_strikethrough, - "underline": this.m_underline - }; + return _toJson(this, { + "bold": this._B, + "color": this._C, + "italic": this._I, + "strikethrough": this._S, + "underline": this._U, + }, {}); + }; + ConditionalRangeFont.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalRangeFont; }(OfficeExtension.ClientObject)); Excel.ConditionalRangeFont=ConditionalRangeFont; + var _typeConditionalRangeFill="ConditionalRangeFill"; var ConditionalRangeFill=(function (_super) { __extends(ConditionalRangeFill, _super); function ConditionalRangeFill() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalRangeFill.prototype, "_className", { get: function () { @@ -21295,13 +24977,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalRangeFill.prototype, "_scalarPropertyNames", { + get: function () { + return ["color"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeFill.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalRangeFill.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "ConditionalRangeFill", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeConditionalRangeFill, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -21310,8 +25006,11 @@ var Excel; ConditionalRangeFill.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["color"], [], []); }; + ConditionalRangeFill.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalRangeFill.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; ConditionalRangeFill.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -21320,25 +25019,36 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } }; ConditionalRangeFill.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalRangeFill.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalRangeFill.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalRangeFill.prototype.toJSON=function () { - return { - "color": this.m_color - }; + return _toJson(this, { + "color": this._C, + }, {}); + }; + ConditionalRangeFill.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalRangeFill; }(OfficeExtension.ClientObject)); Excel.ConditionalRangeFill=ConditionalRangeFill; + var _typeConditionalRangeBorder="ConditionalRangeBorder"; var ConditionalRangeBorder=(function (_super) { __extends(ConditionalRangeBorder, _super); function ConditionalRangeBorder() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalRangeBorder.prototype, "_className", { get: function () { @@ -21347,13 +25057,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalRangeBorder.prototype, "_scalarPropertyNames", { + get: function () { + return ["sideIndex", "style", "color"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeBorder.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalRangeBorder.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "ConditionalRangeBorder", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeConditionalRangeBorder, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -21361,19 +25085,19 @@ var Excel; }); Object.defineProperty(ConditionalRangeBorder.prototype, "sideIndex", { get: function () { - _throwIfNotLoaded("sideIndex", this.m_sideIndex, "ConditionalRangeBorder", this._isNull); - return this.m_sideIndex; + _throwIfNotLoaded("sideIndex", this._S, _typeConditionalRangeBorder, this._isNull); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeBorder.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "ConditionalRangeBorder", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._St, _typeConditionalRangeBorder, this._isNull); + return this._St; }, set: function (value) { - this.m_style=value; + this._St=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -21382,6 +25106,9 @@ var Excel; ConditionalRangeBorder.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["style", "color"], [], []); }; + ConditionalRangeBorder.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalRangeBorder.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -21389,33 +25116,44 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["SideIndex"])) { - this.m_sideIndex=obj["SideIndex"]; + this._S=obj["SideIndex"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._St=obj["Style"]; } }; ConditionalRangeBorder.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalRangeBorder.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalRangeBorder.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalRangeBorder.prototype.toJSON=function () { - return { - "color": this.m_color, - "sideIndex": this.m_sideIndex, - "style": this.m_style - }; + return _toJson(this, { + "color": this._C, + "sideIndex": this._S, + "style": this._St, + }, {}); + }; + ConditionalRangeBorder.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalRangeBorder; }(OfficeExtension.ClientObject)); Excel.ConditionalRangeBorder=ConditionalRangeBorder; + var _typeConditionalRangeBorderCollection="ConditionalRangeBorderCollection"; var ConditionalRangeBorderCollection=(function (_super) { __extends(ConditionalRangeBorderCollection, _super); function ConditionalRangeBorderCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalRangeBorderCollection.prototype, "_className", { get: function () { @@ -21424,49 +25162,70 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalRangeBorderCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeBorderCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeBorderCollection.prototype, "_navigationPropertyNames", { + get: function () { + return ["top", "bottom", "left", "right"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalRangeBorderCollection.prototype, "bottom", { get: function () { - if (!this.m_bottom) { - this.m_bottom=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Bottom", false, false)); + if (!this._B) { + this._B=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Bottom", false, false, false)); } - return this.m_bottom; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeBorderCollection.prototype, "left", { get: function () { - if (!this.m_left) { - this.m_left=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Left", false, false)); + if (!this._L) { + this._L=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Left", false, false, false)); } - return this.m_left; + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeBorderCollection.prototype, "right", { get: function () { - if (!this.m_right) { - this.m_right=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Right", false, false)); + if (!this._R) { + this._R=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Right", false, false, false)); } - return this.m_right; + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeBorderCollection.prototype, "top", { get: function () { - if (!this.m_top) { - this.m_top=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Top", false, false)); + if (!this._T) { + this._T=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Top", false, false, false)); } - return this.m_top; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeBorderCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ConditionalRangeBorderCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeConditionalRangeBorderCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -21474,8 +25233,8 @@ var Excel; }); Object.defineProperty(ConditionalRangeBorderCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "ConditionalRangeBorderCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeConditionalRangeBorderCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true @@ -21484,7 +25243,7 @@ var Excel; return new Excel.ConditionalRangeBorder(this.context, _createIndexerObjectPath(this.context, this, [index])); }; ConditionalRangeBorderCollection.prototype.getItemAt=function (index) { - return new Excel.ConditionalRangeBorder(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.ConditionalRangeBorder(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; ConditionalRangeBorderCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -21493,7 +25252,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } _handleNavigationPropertyResults(this, obj, ["bottom", "Bottom", "left", "Left", "right", "Right", "top", "Top"]); if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { @@ -21507,17 +25266,65 @@ var Excel; } }; ConditionalRangeBorderCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalRangeBorderCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalRangeBorderCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.ConditionalRangeBorder(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; ConditionalRangeBorderCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, { + "bottom": this._B, + "left": this._L, + "right": this._R, + "top": this._T, + }, this.m__items); }; return ConditionalRangeBorderCollection; }(OfficeExtension.ClientObject)); Excel.ConditionalRangeBorderCollection=ConditionalRangeBorderCollection; + var _typeInternalTest="InternalTest"; + var InternalTest=(function (_super) { + __extends(InternalTest, _super); + function InternalTest() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(InternalTest.prototype, "_className", { + get: function () { + return "InternalTest"; + }, + enumerable: true, + configurable: true + }); + InternalTest.prototype.delay=function (seconds) { + var action=_createMethodAction(this.context, this, "Delay", 0, [seconds], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + InternalTest.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + InternalTest.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + InternalTest.prototype.toJSON=function () { + return _toJson(this, {}, {}); + }; + return InternalTest; + }(OfficeExtension.ClientObject)); + Excel.InternalTest=InternalTest; var BindingType; (function (BindingType) { BindingType.range="Range"; @@ -21571,6 +25378,7 @@ var Excel; ClearApplyTo.formats="Formats"; ClearApplyTo.contents="Contents"; ClearApplyTo.hyperlinks="Hyperlinks"; + ClearApplyTo.removeHyperlinks="RemoveHyperlinks"; })(ClearApplyTo=Excel.ClearApplyTo || (Excel.ClearApplyTo={})); var ChartDataLabelPosition; (function (ChartDataLabelPosition) { @@ -21957,6 +25765,7 @@ var Excel; NamedItemType.boolean="Boolean"; NamedItemType.range="Range"; NamedItemType.error="Error"; + NamedItemType.array="Array"; })(NamedItemType=Excel.NamedItemType || (Excel.NamedItemType={})); var RangeUnderlineStyle; (function (RangeUnderlineStyle) { @@ -21981,6 +25790,7 @@ var Excel; RangeValueType.double="Double"; RangeValueType.boolean="Boolean"; RangeValueType.error="Error"; + RangeValueType.richValue="RichValue"; })(RangeValueType=Excel.RangeValueType || (Excel.RangeValueType={})); var SortOrientation; (function (SortOrientation) { @@ -22012,10 +25822,11 @@ var Excel; VerticalAlignment.justify="Justify"; VerticalAlignment.distributed="Distributed"; })(VerticalAlignment=Excel.VerticalAlignment || (Excel.VerticalAlignment={})); + var _typeFunctionResult="FunctionResult"; var FunctionResult=(function (_super) { __extends(FunctionResult, _super); function FunctionResult() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(FunctionResult.prototype, "_className", { get: function () { @@ -22024,18 +25835,25 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(FunctionResult.prototype, "_scalarPropertyNames", { + get: function () { + return ["error", "value"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(FunctionResult.prototype, "error", { get: function () { - _throwIfNotLoaded("error", this.m_error, "FunctionResult", this._isNull); - return this.m_error; + _throwIfNotLoaded("error", this._E, _typeFunctionResult, this._isNull); + return this._E; }, enumerable: true, configurable: true }); Object.defineProperty(FunctionResult.prototype, "value", { get: function () { - _throwIfNotLoaded("value", this.m_value, "FunctionResult", this._isNull); - return this.m_value; + _throwIfNotLoaded("value", this._V, _typeFunctionResult, this._isNull); + return this._V; }, enumerable: true, configurable: true @@ -22047,29 +25865,40 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Error"])) { - this.m_error=obj["Error"]; + this._E=obj["Error"]; } if (!_isUndefined(obj["Value"])) { - this.m_value=obj["Value"]; + this._V=obj["Value"]; } }; FunctionResult.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + FunctionResult.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + FunctionResult.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; FunctionResult.prototype.toJSON=function () { - return { - "error": this.m_error, - "value": this.m_value - }; + return _toJson(this, { + "error": this._E, + "value": this._V, + }, {}); + }; + FunctionResult.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return FunctionResult; }(OfficeExtension.ClientObject)); Excel.FunctionResult=FunctionResult; + var _typeFunctions="Functions"; var Functions=(function (_super) { __extends(Functions, _super); function Functions() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Functions.prototype, "_className", { get: function () { @@ -22079,1270 +25908,1270 @@ var Excel; configurable: true }); Functions.prototype.abs=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Abs", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Abs", 0, [number], false, true, null, false)); }; Functions.prototype.accrInt=function (issue, firstInterest, settlement, rate, par, frequency, basis, calcMethod) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AccrInt", 0, [issue, firstInterest, settlement, rate, par, frequency, basis, calcMethod], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AccrInt", 0, [issue, firstInterest, settlement, rate, par, frequency, basis, calcMethod], false, true, null, false)); }; Functions.prototype.accrIntM=function (issue, settlement, rate, par, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AccrIntM", 0, [issue, settlement, rate, par, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AccrIntM", 0, [issue, settlement, rate, par, basis], false, true, null, false)); }; Functions.prototype.acos=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acos", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acos", 0, [number], false, true, null, false)); }; Functions.prototype.acosh=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acosh", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acosh", 0, [number], false, true, null, false)); }; Functions.prototype.acot=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acot", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acot", 0, [number], false, true, null, false)); }; Functions.prototype.acoth=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acoth", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acoth", 0, [number], false, true, null, false)); }; Functions.prototype.amorDegrc=function (cost, datePurchased, firstPeriod, salvage, period, rate, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AmorDegrc", 0, [cost, datePurchased, firstPeriod, salvage, period, rate, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AmorDegrc", 0, [cost, datePurchased, firstPeriod, salvage, period, rate, basis], false, true, null, false)); }; Functions.prototype.amorLinc=function (cost, datePurchased, firstPeriod, salvage, period, rate, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AmorLinc", 0, [cost, datePurchased, firstPeriod, salvage, period, rate, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AmorLinc", 0, [cost, datePurchased, firstPeriod, salvage, period, rate, basis], false, true, null, false)); }; Functions.prototype.and=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "And", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "And", 0, [values], false, true, null, false)); }; Functions.prototype.arabic=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Arabic", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Arabic", 0, [text], false, true, null, false)); }; Functions.prototype.areas=function (reference) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Areas", 0, [reference], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Areas", 0, [reference], false, true, null, false)); }; Functions.prototype.asc=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asc", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asc", 0, [text], false, true, null, false)); }; Functions.prototype.asin=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asin", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asin", 0, [number], false, true, null, false)); }; Functions.prototype.asinh=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asinh", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asinh", 0, [number], false, true, null, false)); }; Functions.prototype.atan=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atan", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atan", 0, [number], false, true, null, false)); }; Functions.prototype.atan2=function (xNum, yNum) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atan2", 0, [xNum, yNum], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atan2", 0, [xNum, yNum], false, true, null, false)); }; Functions.prototype.atanh=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atanh", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atanh", 0, [number], false, true, null, false)); }; Functions.prototype.aveDev=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AveDev", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AveDev", 0, [values], false, true, null, false)); }; Functions.prototype.average=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Average", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Average", 0, [values], false, true, null, false)); }; Functions.prototype.averageA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageA", 0, [values], false, true, null, false)); }; Functions.prototype.averageIf=function (range, criteria, averageRange) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageIf", 0, [range, criteria, averageRange], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageIf", 0, [range, criteria, averageRange], false, true, null, false)); }; Functions.prototype.averageIfs=function (averageRange) { var values=[]; for (var _i=1; _i < arguments.length; _i++) { values[_i - 1]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageIfs", 0, [averageRange, values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageIfs", 0, [averageRange, values], false, true, null, false)); }; Functions.prototype.bahtText=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BahtText", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BahtText", 0, [number], false, true, null, false)); }; Functions.prototype.base=function (number, radix, minLength) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Base", 0, [number, radix, minLength], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Base", 0, [number, radix, minLength], false, true, null, false)); }; Functions.prototype.besselI=function (x, n) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselI", 0, [x, n], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselI", 0, [x, n], false, true, null, false)); }; Functions.prototype.besselJ=function (x, n) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselJ", 0, [x, n], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselJ", 0, [x, n], false, true, null, false)); }; Functions.prototype.besselK=function (x, n) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselK", 0, [x, n], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselK", 0, [x, n], false, true, null, false)); }; Functions.prototype.besselY=function (x, n) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselY", 0, [x, n], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselY", 0, [x, n], false, true, null, false)); }; Functions.prototype.beta_Dist=function (x, alpha, beta, cumulative, A, B) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Beta_Dist", 0, [x, alpha, beta, cumulative, A, B], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Beta_Dist", 0, [x, alpha, beta, cumulative, A, B], false, true, null, false)); }; Functions.prototype.beta_Inv=function (probability, alpha, beta, A, B) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Beta_Inv", 0, [probability, alpha, beta, A, B], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Beta_Inv", 0, [probability, alpha, beta, A, B], false, true, null, false)); }; Functions.prototype.bin2Dec=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Dec", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Dec", 0, [number], false, true, null, false)); }; Functions.prototype.bin2Hex=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Hex", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Hex", 0, [number, places], false, true, null, false)); }; Functions.prototype.bin2Oct=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Oct", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Oct", 0, [number, places], false, true, null, false)); }; Functions.prototype.binom_Dist=function (numberS, trials, probabilityS, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Dist", 0, [numberS, trials, probabilityS, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Dist", 0, [numberS, trials, probabilityS, cumulative], false, true, null, false)); }; Functions.prototype.binom_Dist_Range=function (trials, probabilityS, numberS, numberS2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Dist_Range", 0, [trials, probabilityS, numberS, numberS2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Dist_Range", 0, [trials, probabilityS, numberS, numberS2], false, true, null, false)); }; Functions.prototype.binom_Inv=function (trials, probabilityS, alpha) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Inv", 0, [trials, probabilityS, alpha], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Inv", 0, [trials, probabilityS, alpha], false, true, null, false)); }; Functions.prototype.bitand=function (number1, number2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitand", 0, [number1, number2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitand", 0, [number1, number2], false, true, null, false)); }; Functions.prototype.bitlshift=function (number, shiftAmount) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitlshift", 0, [number, shiftAmount], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitlshift", 0, [number, shiftAmount], false, true, null, false)); }; Functions.prototype.bitor=function (number1, number2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitor", 0, [number1, number2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitor", 0, [number1, number2], false, true, null, false)); }; Functions.prototype.bitrshift=function (number, shiftAmount) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitrshift", 0, [number, shiftAmount], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitrshift", 0, [number, shiftAmount], false, true, null, false)); }; Functions.prototype.bitxor=function (number1, number2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitxor", 0, [number1, number2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitxor", 0, [number1, number2], false, true, null, false)); }; Functions.prototype.ceiling_Math=function (number, significance, mode) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ceiling_Math", 0, [number, significance, mode], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ceiling_Math", 0, [number, significance, mode], false, true, null, false)); }; Functions.prototype.ceiling_Precise=function (number, significance) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ceiling_Precise", 0, [number, significance], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ceiling_Precise", 0, [number, significance], false, true, null, false)); }; Functions.prototype.char=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Char", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Char", 0, [number], false, true, null, false)); }; Functions.prototype.chiSq_Dist=function (x, degFreedom, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Dist", 0, [x, degFreedom, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Dist", 0, [x, degFreedom, cumulative], false, true, null, false)); }; Functions.prototype.chiSq_Dist_RT=function (x, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Dist_RT", 0, [x, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Dist_RT", 0, [x, degFreedom], false, true, null, false)); }; Functions.prototype.chiSq_Inv=function (probability, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Inv", 0, [probability, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Inv", 0, [probability, degFreedom], false, true, null, false)); }; Functions.prototype.chiSq_Inv_RT=function (probability, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Inv_RT", 0, [probability, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Inv_RT", 0, [probability, degFreedom], false, true, null, false)); }; Functions.prototype.choose=function (indexNum) { var values=[]; for (var _i=1; _i < arguments.length; _i++) { values[_i - 1]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Choose", 0, [indexNum, values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Choose", 0, [indexNum, values], false, true, null, false)); }; Functions.prototype.clean=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Clean", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Clean", 0, [text], false, true, null, false)); }; Functions.prototype.code=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Code", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Code", 0, [text], false, true, null, false)); }; Functions.prototype.columns=function (array) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Columns", 0, [array], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Columns", 0, [array], false, true, null, false)); }; Functions.prototype.combin=function (number, numberChosen) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Combin", 0, [number, numberChosen], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Combin", 0, [number, numberChosen], false, true, null, false)); }; Functions.prototype.combina=function (number, numberChosen) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Combina", 0, [number, numberChosen], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Combina", 0, [number, numberChosen], false, true, null, false)); }; Functions.prototype.complex=function (realNum, iNum, suffix) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Complex", 0, [realNum, iNum, suffix], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Complex", 0, [realNum, iNum, suffix], false, true, null, false)); }; Functions.prototype.concatenate=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Concatenate", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Concatenate", 0, [values], false, true, null, false)); }; Functions.prototype.confidence_Norm=function (alpha, standardDev, size) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Confidence_Norm", 0, [alpha, standardDev, size], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Confidence_Norm", 0, [alpha, standardDev, size], false, true, null, false)); }; Functions.prototype.confidence_T=function (alpha, standardDev, size) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Confidence_T", 0, [alpha, standardDev, size], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Confidence_T", 0, [alpha, standardDev, size], false, true, null, false)); }; Functions.prototype.convert=function (number, fromUnit, toUnit) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Convert", 0, [number, fromUnit, toUnit], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Convert", 0, [number, fromUnit, toUnit], false, true, null, false)); }; Functions.prototype.cos=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cos", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cos", 0, [number], false, true, null, false)); }; Functions.prototype.cosh=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cosh", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cosh", 0, [number], false, true, null, false)); }; Functions.prototype.cot=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cot", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cot", 0, [number], false, true, null, false)); }; Functions.prototype.coth=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Coth", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Coth", 0, [number], false, true, null, false)); }; Functions.prototype.count=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Count", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Count", 0, [values], false, true, null, false)); }; Functions.prototype.countA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountA", 0, [values], false, true, null, false)); }; Functions.prototype.countBlank=function (range) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountBlank", 0, [range], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountBlank", 0, [range], false, true, null, false)); }; Functions.prototype.countIf=function (range, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountIf", 0, [range, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountIf", 0, [range, criteria], false, true, null, false)); }; Functions.prototype.countIfs=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountIfs", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountIfs", 0, [values], false, true, null, false)); }; Functions.prototype.coupDayBs=function (settlement, maturity, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDayBs", 0, [settlement, maturity, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDayBs", 0, [settlement, maturity, frequency, basis], false, true, null, false)); }; Functions.prototype.coupDays=function (settlement, maturity, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDays", 0, [settlement, maturity, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDays", 0, [settlement, maturity, frequency, basis], false, true, null, false)); }; Functions.prototype.coupDaysNc=function (settlement, maturity, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDaysNc", 0, [settlement, maturity, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDaysNc", 0, [settlement, maturity, frequency, basis], false, true, null, false)); }; Functions.prototype.coupNcd=function (settlement, maturity, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupNcd", 0, [settlement, maturity, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupNcd", 0, [settlement, maturity, frequency, basis], false, true, null, false)); }; Functions.prototype.coupNum=function (settlement, maturity, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupNum", 0, [settlement, maturity, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupNum", 0, [settlement, maturity, frequency, basis], false, true, null, false)); }; Functions.prototype.coupPcd=function (settlement, maturity, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupPcd", 0, [settlement, maturity, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupPcd", 0, [settlement, maturity, frequency, basis], false, true, null, false)); }; Functions.prototype.csc=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Csc", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Csc", 0, [number], false, true, null, false)); }; Functions.prototype.csch=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Csch", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Csch", 0, [number], false, true, null, false)); }; Functions.prototype.cumIPmt=function (rate, nper, pv, startPeriod, endPeriod, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CumIPmt", 0, [rate, nper, pv, startPeriod, endPeriod, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CumIPmt", 0, [rate, nper, pv, startPeriod, endPeriod, type], false, true, null, false)); }; Functions.prototype.cumPrinc=function (rate, nper, pv, startPeriod, endPeriod, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CumPrinc", 0, [rate, nper, pv, startPeriod, endPeriod, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CumPrinc", 0, [rate, nper, pv, startPeriod, endPeriod, type], false, true, null, false)); }; Functions.prototype.daverage=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DAverage", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DAverage", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dcount=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DCount", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DCount", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dcountA=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DCountA", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DCountA", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dget=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DGet", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DGet", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dmax=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DMax", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DMax", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dmin=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DMin", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DMin", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dproduct=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DProduct", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DProduct", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dstDev=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DStDev", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DStDev", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dstDevP=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DStDevP", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DStDevP", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dsum=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DSum", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DSum", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dvar=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DVar", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DVar", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dvarP=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DVarP", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DVarP", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.date=function (year, month, day) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Date", 0, [year, month, day], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Date", 0, [year, month, day], false, true, null, false)); }; Functions.prototype.datevalue=function (dateText) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Datevalue", 0, [dateText], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Datevalue", 0, [dateText], false, true, null, false)); }; Functions.prototype.day=function (serialNumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Day", 0, [serialNumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Day", 0, [serialNumber], false, true, null, false)); }; Functions.prototype.days=function (endDate, startDate) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Days", 0, [endDate, startDate], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Days", 0, [endDate, startDate], false, true, null, false)); }; Functions.prototype.days360=function (startDate, endDate, method) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Days360", 0, [startDate, endDate, method], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Days360", 0, [startDate, endDate, method], false, true, null, false)); }; Functions.prototype.db=function (cost, salvage, life, period, month) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Db", 0, [cost, salvage, life, period, month], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Db", 0, [cost, salvage, life, period, month], false, true, null, false)); }; Functions.prototype.dbcs=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dbcs", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dbcs", 0, [text], false, true, null, false)); }; Functions.prototype.ddb=function (cost, salvage, life, period, factor) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ddb", 0, [cost, salvage, life, period, factor], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ddb", 0, [cost, salvage, life, period, factor], false, true, null, false)); }; Functions.prototype.dec2Bin=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Bin", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Bin", 0, [number, places], false, true, null, false)); }; Functions.prototype.dec2Hex=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Hex", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Hex", 0, [number, places], false, true, null, false)); }; Functions.prototype.dec2Oct=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Oct", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Oct", 0, [number, places], false, true, null, false)); }; Functions.prototype.decimal=function (number, radix) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Decimal", 0, [number, radix], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Decimal", 0, [number, radix], false, true, null, false)); }; Functions.prototype.degrees=function (angle) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Degrees", 0, [angle], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Degrees", 0, [angle], false, true, null, false)); }; Functions.prototype.delta=function (number1, number2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Delta", 0, [number1, number2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Delta", 0, [number1, number2], false, true, null, false)); }; Functions.prototype.devSq=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DevSq", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DevSq", 0, [values], false, true, null, false)); }; Functions.prototype.disc=function (settlement, maturity, pr, redemption, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Disc", 0, [settlement, maturity, pr, redemption, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Disc", 0, [settlement, maturity, pr, redemption, basis], false, true, null, false)); }; Functions.prototype.dollar=function (number, decimals) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dollar", 0, [number, decimals], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dollar", 0, [number, decimals], false, true, null, false)); }; Functions.prototype.dollarDe=function (fractionalDollar, fraction) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DollarDe", 0, [fractionalDollar, fraction], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DollarDe", 0, [fractionalDollar, fraction], false, true, null, false)); }; Functions.prototype.dollarFr=function (decimalDollar, fraction) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DollarFr", 0, [decimalDollar, fraction], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DollarFr", 0, [decimalDollar, fraction], false, true, null, false)); }; Functions.prototype.duration=function (settlement, maturity, coupon, yld, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Duration", 0, [settlement, maturity, coupon, yld, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Duration", 0, [settlement, maturity, coupon, yld, frequency, basis], false, true, null, false)); }; Functions.prototype.ecma_Ceiling=function (number, significance) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ECMA_Ceiling", 0, [number, significance], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ECMA_Ceiling", 0, [number, significance], false, true, null, false)); }; Functions.prototype.edate=function (startDate, months) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "EDate", 0, [startDate, months], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "EDate", 0, [startDate, months], false, true, null, false)); }; Functions.prototype.effect=function (nominalRate, npery) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Effect", 0, [nominalRate, npery], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Effect", 0, [nominalRate, npery], false, true, null, false)); }; Functions.prototype.eoMonth=function (startDate, months) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "EoMonth", 0, [startDate, months], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "EoMonth", 0, [startDate, months], false, true, null, false)); }; Functions.prototype.erf=function (lowerLimit, upperLimit) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Erf", 0, [lowerLimit, upperLimit], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Erf", 0, [lowerLimit, upperLimit], false, true, null, false)); }; Functions.prototype.erfC=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ErfC", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ErfC", 0, [x], false, true, null, false)); }; Functions.prototype.erfC_Precise=function (X) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ErfC_Precise", 0, [X], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ErfC_Precise", 0, [X], false, true, null, false)); }; Functions.prototype.erf_Precise=function (X) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Erf_Precise", 0, [X], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Erf_Precise", 0, [X], false, true, null, false)); }; Functions.prototype.error_Type=function (errorVal) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Error_Type", 0, [errorVal], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Error_Type", 0, [errorVal], false, true, null, false)); }; Functions.prototype.even=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Even", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Even", 0, [number], false, true, null, false)); }; Functions.prototype.exact=function (text1, text2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Exact", 0, [text1, text2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Exact", 0, [text1, text2], false, true, null, false)); }; Functions.prototype.exp=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Exp", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Exp", 0, [number], false, true, null, false)); }; Functions.prototype.expon_Dist=function (x, lambda, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Expon_Dist", 0, [x, lambda, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Expon_Dist", 0, [x, lambda, cumulative], false, true, null, false)); }; Functions.prototype.fvschedule=function (principal, schedule) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FVSchedule", 0, [principal, schedule], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FVSchedule", 0, [principal, schedule], false, true, null, false)); }; Functions.prototype.f_Dist=function (x, degFreedom1, degFreedom2, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Dist", 0, [x, degFreedom1, degFreedom2, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Dist", 0, [x, degFreedom1, degFreedom2, cumulative], false, true, null, false)); }; Functions.prototype.f_Dist_RT=function (x, degFreedom1, degFreedom2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Dist_RT", 0, [x, degFreedom1, degFreedom2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Dist_RT", 0, [x, degFreedom1, degFreedom2], false, true, null, false)); }; Functions.prototype.f_Inv=function (probability, degFreedom1, degFreedom2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Inv", 0, [probability, degFreedom1, degFreedom2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Inv", 0, [probability, degFreedom1, degFreedom2], false, true, null, false)); }; Functions.prototype.f_Inv_RT=function (probability, degFreedom1, degFreedom2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Inv_RT", 0, [probability, degFreedom1, degFreedom2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Inv_RT", 0, [probability, degFreedom1, degFreedom2], false, true, null, false)); }; Functions.prototype.fact=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fact", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fact", 0, [number], false, true, null, false)); }; Functions.prototype.factDouble=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FactDouble", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FactDouble", 0, [number], false, true, null, false)); }; Functions.prototype.false=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "False", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "False", 0, [], false, true, null, false)); }; Functions.prototype.find=function (findText, withinText, startNum) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Find", 0, [findText, withinText, startNum], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Find", 0, [findText, withinText, startNum], false, true, null, false)); }; Functions.prototype.findB=function (findText, withinText, startNum) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FindB", 0, [findText, withinText, startNum], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FindB", 0, [findText, withinText, startNum], false, true, null, false)); }; Functions.prototype.fisher=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fisher", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fisher", 0, [x], false, true, null, false)); }; Functions.prototype.fisherInv=function (y) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FisherInv", 0, [y], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FisherInv", 0, [y], false, true, null, false)); }; Functions.prototype.fixed=function (number, decimals, noCommas) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fixed", 0, [number, decimals, noCommas], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fixed", 0, [number, decimals, noCommas], false, true, null, false)); }; Functions.prototype.floor_Math=function (number, significance, mode) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Floor_Math", 0, [number, significance, mode], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Floor_Math", 0, [number, significance, mode], false, true, null, false)); }; Functions.prototype.floor_Precise=function (number, significance) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Floor_Precise", 0, [number, significance], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Floor_Precise", 0, [number, significance], false, true, null, false)); }; Functions.prototype.fv=function (rate, nper, pmt, pv, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fv", 0, [rate, nper, pmt, pv, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fv", 0, [rate, nper, pmt, pv, type], false, true, null, false)); }; Functions.prototype.gamma=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma", 0, [x], false, true, null, false)); }; Functions.prototype.gammaLn=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GammaLn", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GammaLn", 0, [x], false, true, null, false)); }; Functions.prototype.gammaLn_Precise=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GammaLn_Precise", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GammaLn_Precise", 0, [x], false, true, null, false)); }; Functions.prototype.gamma_Dist=function (x, alpha, beta, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma_Dist", 0, [x, alpha, beta, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma_Dist", 0, [x, alpha, beta, cumulative], false, true, null, false)); }; Functions.prototype.gamma_Inv=function (probability, alpha, beta) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma_Inv", 0, [probability, alpha, beta], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma_Inv", 0, [probability, alpha, beta], false, true, null, false)); }; Functions.prototype.gauss=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gauss", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gauss", 0, [x], false, true, null, false)); }; Functions.prototype.gcd=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gcd", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gcd", 0, [values], false, true, null, false)); }; Functions.prototype.geStep=function (number, step) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GeStep", 0, [number, step], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GeStep", 0, [number, step], false, true, null, false)); }; Functions.prototype.geoMean=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GeoMean", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GeoMean", 0, [values], false, true, null, false)); }; Functions.prototype.hlookup=function (lookupValue, tableArray, rowIndexNum, rangeLookup) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HLookup", 0, [lookupValue, tableArray, rowIndexNum, rangeLookup], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HLookup", 0, [lookupValue, tableArray, rowIndexNum, rangeLookup], false, true, null, false)); }; Functions.prototype.harMean=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HarMean", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HarMean", 0, [values], false, true, null, false)); }; Functions.prototype.hex2Bin=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Bin", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Bin", 0, [number, places], false, true, null, false)); }; Functions.prototype.hex2Dec=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Dec", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Dec", 0, [number], false, true, null, false)); }; Functions.prototype.hex2Oct=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Oct", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Oct", 0, [number, places], false, true, null, false)); }; Functions.prototype.hour=function (serialNumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hour", 0, [serialNumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hour", 0, [serialNumber], false, true, null, false)); }; Functions.prototype.hypGeom_Dist=function (sampleS, numberSample, populationS, numberPop, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HypGeom_Dist", 0, [sampleS, numberSample, populationS, numberPop, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HypGeom_Dist", 0, [sampleS, numberSample, populationS, numberPop, cumulative], false, true, null, false)); }; Functions.prototype.hyperlink=function (linkLocation, friendlyName) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hyperlink", 0, [linkLocation, friendlyName], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hyperlink", 0, [linkLocation, friendlyName], false, true, null, false)); }; Functions.prototype.iso_Ceiling=function (number, significance) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ISO_Ceiling", 0, [number, significance], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ISO_Ceiling", 0, [number, significance], false, true, null, false)); }; Functions.prototype.if=function (logicalTest, valueIfTrue, valueIfFalse) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "If", 0, [logicalTest, valueIfTrue, valueIfFalse], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "If", 0, [logicalTest, valueIfTrue, valueIfFalse], false, true, null, false)); }; Functions.prototype.imAbs=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImAbs", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImAbs", 0, [inumber], false, true, null, false)); }; Functions.prototype.imArgument=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImArgument", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImArgument", 0, [inumber], false, true, null, false)); }; Functions.prototype.imConjugate=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImConjugate", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImConjugate", 0, [inumber], false, true, null, false)); }; Functions.prototype.imCos=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCos", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCos", 0, [inumber], false, true, null, false)); }; Functions.prototype.imCosh=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCosh", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCosh", 0, [inumber], false, true, null, false)); }; Functions.prototype.imCot=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCot", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCot", 0, [inumber], false, true, null, false)); }; Functions.prototype.imCsc=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCsc", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCsc", 0, [inumber], false, true, null, false)); }; Functions.prototype.imCsch=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCsch", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCsch", 0, [inumber], false, true, null, false)); }; Functions.prototype.imDiv=function (inumber1, inumber2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImDiv", 0, [inumber1, inumber2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImDiv", 0, [inumber1, inumber2], false, true, null, false)); }; Functions.prototype.imExp=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImExp", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImExp", 0, [inumber], false, true, null, false)); }; Functions.prototype.imLn=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLn", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLn", 0, [inumber], false, true, null, false)); }; Functions.prototype.imLog10=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLog10", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLog10", 0, [inumber], false, true, null, false)); }; Functions.prototype.imLog2=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLog2", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLog2", 0, [inumber], false, true, null, false)); }; Functions.prototype.imPower=function (inumber, number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImPower", 0, [inumber, number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImPower", 0, [inumber, number], false, true, null, false)); }; Functions.prototype.imProduct=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImProduct", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImProduct", 0, [values], false, true, null, false)); }; Functions.prototype.imReal=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImReal", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImReal", 0, [inumber], false, true, null, false)); }; Functions.prototype.imSec=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSec", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSec", 0, [inumber], false, true, null, false)); }; Functions.prototype.imSech=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSech", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSech", 0, [inumber], false, true, null, false)); }; Functions.prototype.imSin=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSin", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSin", 0, [inumber], false, true, null, false)); }; Functions.prototype.imSinh=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSinh", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSinh", 0, [inumber], false, true, null, false)); }; Functions.prototype.imSqrt=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSqrt", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSqrt", 0, [inumber], false, true, null, false)); }; Functions.prototype.imSub=function (inumber1, inumber2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSub", 0, [inumber1, inumber2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSub", 0, [inumber1, inumber2], false, true, null, false)); }; Functions.prototype.imSum=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSum", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSum", 0, [values], false, true, null, false)); }; Functions.prototype.imTan=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImTan", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImTan", 0, [inumber], false, true, null, false)); }; Functions.prototype.imaginary=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Imaginary", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Imaginary", 0, [inumber], false, true, null, false)); }; Functions.prototype.int=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Int", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Int", 0, [number], false, true, null, false)); }; Functions.prototype.intRate=function (settlement, maturity, investment, redemption, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IntRate", 0, [settlement, maturity, investment, redemption, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IntRate", 0, [settlement, maturity, investment, redemption, basis], false, true, null, false)); }; Functions.prototype.ipmt=function (rate, per, nper, pv, fv, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ipmt", 0, [rate, per, nper, pv, fv, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ipmt", 0, [rate, per, nper, pv, fv, type], false, true, null, false)); }; Functions.prototype.irr=function (values, guess) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Irr", 0, [values, guess], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Irr", 0, [values, guess], false, true, null, false)); }; Functions.prototype.isErr=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsErr", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsErr", 0, [value], false, true, null, false)); }; Functions.prototype.isError=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsError", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsError", 0, [value], false, true, null, false)); }; Functions.prototype.isEven=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsEven", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsEven", 0, [number], false, true, null, false)); }; Functions.prototype.isFormula=function (reference) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsFormula", 0, [reference], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsFormula", 0, [reference], false, true, null, false)); }; Functions.prototype.isLogical=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsLogical", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsLogical", 0, [value], false, true, null, false)); }; Functions.prototype.isNA=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNA", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNA", 0, [value], false, true, null, false)); }; Functions.prototype.isNonText=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNonText", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNonText", 0, [value], false, true, null, false)); }; Functions.prototype.isNumber=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNumber", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNumber", 0, [value], false, true, null, false)); }; Functions.prototype.isOdd=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsOdd", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsOdd", 0, [number], false, true, null, false)); }; Functions.prototype.isText=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsText", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsText", 0, [value], false, true, null, false)); }; Functions.prototype.isoWeekNum=function (date) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsoWeekNum", 0, [date], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsoWeekNum", 0, [date], false, true, null, false)); }; Functions.prototype.ispmt=function (rate, per, nper, pv) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ispmt", 0, [rate, per, nper, pv], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ispmt", 0, [rate, per, nper, pv], false, true, null, false)); }; Functions.prototype.isref=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Isref", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Isref", 0, [value], false, true, null, false)); }; Functions.prototype.kurt=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Kurt", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Kurt", 0, [values], false, true, null, false)); }; Functions.prototype.large=function (array, k) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Large", 0, [array, k], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Large", 0, [array, k], false, true, null, false)); }; Functions.prototype.lcm=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lcm", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lcm", 0, [values], false, true, null, false)); }; Functions.prototype.left=function (text, numChars) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Left", 0, [text, numChars], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Left", 0, [text, numChars], false, true, null, false)); }; Functions.prototype.leftb=function (text, numBytes) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Leftb", 0, [text, numBytes], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Leftb", 0, [text, numBytes], false, true, null, false)); }; Functions.prototype.len=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Len", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Len", 0, [text], false, true, null, false)); }; Functions.prototype.lenb=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lenb", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lenb", 0, [text], false, true, null, false)); }; Functions.prototype.ln=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ln", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ln", 0, [number], false, true, null, false)); }; Functions.prototype.log=function (number, base) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Log", 0, [number, base], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Log", 0, [number, base], false, true, null, false)); }; Functions.prototype.log10=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Log10", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Log10", 0, [number], false, true, null, false)); }; Functions.prototype.logNorm_Dist=function (x, mean, standardDev, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "LogNorm_Dist", 0, [x, mean, standardDev, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "LogNorm_Dist", 0, [x, mean, standardDev, cumulative], false, true, null, false)); }; Functions.prototype.logNorm_Inv=function (probability, mean, standardDev) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "LogNorm_Inv", 0, [probability, mean, standardDev], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "LogNorm_Inv", 0, [probability, mean, standardDev], false, true, null, false)); }; Functions.prototype.lookup=function (lookupValue, lookupVector, resultVector) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lookup", 0, [lookupValue, lookupVector, resultVector], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lookup", 0, [lookupValue, lookupVector, resultVector], false, true, null, false)); }; Functions.prototype.lower=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lower", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lower", 0, [text], false, true, null, false)); }; Functions.prototype.mduration=function (settlement, maturity, coupon, yld, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MDuration", 0, [settlement, maturity, coupon, yld, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MDuration", 0, [settlement, maturity, coupon, yld, frequency, basis], false, true, null, false)); }; Functions.prototype.mirr=function (values, financeRate, reinvestRate) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MIrr", 0, [values, financeRate, reinvestRate], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MIrr", 0, [values, financeRate, reinvestRate], false, true, null, false)); }; Functions.prototype.mround=function (number, multiple) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MRound", 0, [number, multiple], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MRound", 0, [number, multiple], false, true, null, false)); }; Functions.prototype.match=function (lookupValue, lookupArray, matchType) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Match", 0, [lookupValue, lookupArray, matchType], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Match", 0, [lookupValue, lookupArray, matchType], false, true, null, false)); }; Functions.prototype.max=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Max", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Max", 0, [values], false, true, null, false)); }; Functions.prototype.maxA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MaxA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MaxA", 0, [values], false, true, null, false)); }; Functions.prototype.median=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Median", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Median", 0, [values], false, true, null, false)); }; Functions.prototype.mid=function (text, startNum, numChars) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Mid", 0, [text, startNum, numChars], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Mid", 0, [text, startNum, numChars], false, true, null, false)); }; Functions.prototype.midb=function (text, startNum, numBytes) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Midb", 0, [text, startNum, numBytes], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Midb", 0, [text, startNum, numBytes], false, true, null, false)); }; Functions.prototype.min=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Min", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Min", 0, [values], false, true, null, false)); }; Functions.prototype.minA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MinA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MinA", 0, [values], false, true, null, false)); }; Functions.prototype.minute=function (serialNumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Minute", 0, [serialNumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Minute", 0, [serialNumber], false, true, null, false)); }; Functions.prototype.mod=function (number, divisor) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Mod", 0, [number, divisor], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Mod", 0, [number, divisor], false, true, null, false)); }; Functions.prototype.month=function (serialNumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Month", 0, [serialNumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Month", 0, [serialNumber], false, true, null, false)); }; Functions.prototype.multiNomial=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MultiNomial", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MultiNomial", 0, [values], false, true, null, false)); }; Functions.prototype.n=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "N", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "N", 0, [value], false, true, null, false)); }; Functions.prototype.nper=function (rate, pmt, pv, fv, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NPer", 0, [rate, pmt, pv, fv, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NPer", 0, [rate, pmt, pv, fv, type], false, true, null, false)); }; Functions.prototype.na=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Na", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Na", 0, [], false, true, null, false)); }; Functions.prototype.negBinom_Dist=function (numberF, numberS, probabilityS, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NegBinom_Dist", 0, [numberF, numberS, probabilityS, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NegBinom_Dist", 0, [numberF, numberS, probabilityS, cumulative], false, true, null, false)); }; Functions.prototype.networkDays=function (startDate, endDate, holidays) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NetworkDays", 0, [startDate, endDate, holidays], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NetworkDays", 0, [startDate, endDate, holidays], false, true, null, false)); }; Functions.prototype.networkDays_Intl=function (startDate, endDate, weekend, holidays) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NetworkDays_Intl", 0, [startDate, endDate, weekend, holidays], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NetworkDays_Intl", 0, [startDate, endDate, weekend, holidays], false, true, null, false)); }; Functions.prototype.nominal=function (effectRate, npery) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Nominal", 0, [effectRate, npery], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Nominal", 0, [effectRate, npery], false, true, null, false)); }; Functions.prototype.norm_Dist=function (x, mean, standardDev, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_Dist", 0, [x, mean, standardDev, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_Dist", 0, [x, mean, standardDev, cumulative], false, true, null, false)); }; Functions.prototype.norm_Inv=function (probability, mean, standardDev) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_Inv", 0, [probability, mean, standardDev], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_Inv", 0, [probability, mean, standardDev], false, true, null, false)); }; Functions.prototype.norm_S_Dist=function (z, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_S_Dist", 0, [z, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_S_Dist", 0, [z, cumulative], false, true, null, false)); }; Functions.prototype.norm_S_Inv=function (probability) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_S_Inv", 0, [probability], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_S_Inv", 0, [probability], false, true, null, false)); }; Functions.prototype.not=function (logical) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Not", 0, [logical], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Not", 0, [logical], false, true, null, false)); }; Functions.prototype.now=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Now", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Now", 0, [], false, true, null, false)); }; Functions.prototype.npv=function (rate) { var values=[]; for (var _i=1; _i < arguments.length; _i++) { values[_i - 1]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Npv", 0, [rate, values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Npv", 0, [rate, values], false, true, null, false)); }; Functions.prototype.numberValue=function (text, decimalSeparator, groupSeparator) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NumberValue", 0, [text, decimalSeparator, groupSeparator], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NumberValue", 0, [text, decimalSeparator, groupSeparator], false, true, null, false)); }; Functions.prototype.oct2Bin=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Bin", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Bin", 0, [number, places], false, true, null, false)); }; Functions.prototype.oct2Dec=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Dec", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Dec", 0, [number], false, true, null, false)); }; Functions.prototype.oct2Hex=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Hex", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Hex", 0, [number, places], false, true, null, false)); }; Functions.prototype.odd=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Odd", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Odd", 0, [number], false, true, null, false)); }; Functions.prototype.oddFPrice=function (settlement, maturity, issue, firstCoupon, rate, yld, redemption, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddFPrice", 0, [settlement, maturity, issue, firstCoupon, rate, yld, redemption, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddFPrice", 0, [settlement, maturity, issue, firstCoupon, rate, yld, redemption, frequency, basis], false, true, null, false)); }; Functions.prototype.oddFYield=function (settlement, maturity, issue, firstCoupon, rate, pr, redemption, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddFYield", 0, [settlement, maturity, issue, firstCoupon, rate, pr, redemption, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddFYield", 0, [settlement, maturity, issue, firstCoupon, rate, pr, redemption, frequency, basis], false, true, null, false)); }; Functions.prototype.oddLPrice=function (settlement, maturity, lastInterest, rate, yld, redemption, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddLPrice", 0, [settlement, maturity, lastInterest, rate, yld, redemption, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddLPrice", 0, [settlement, maturity, lastInterest, rate, yld, redemption, frequency, basis], false, true, null, false)); }; Functions.prototype.oddLYield=function (settlement, maturity, lastInterest, rate, pr, redemption, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddLYield", 0, [settlement, maturity, lastInterest, rate, pr, redemption, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddLYield", 0, [settlement, maturity, lastInterest, rate, pr, redemption, frequency, basis], false, true, null, false)); }; Functions.prototype.or=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Or", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Or", 0, [values], false, true, null, false)); }; Functions.prototype.pduration=function (rate, pv, fv) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PDuration", 0, [rate, pv, fv], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PDuration", 0, [rate, pv, fv], false, true, null, false)); }; Functions.prototype.percentRank_Exc=function (array, x, significance) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PercentRank_Exc", 0, [array, x, significance], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PercentRank_Exc", 0, [array, x, significance], false, true, null, false)); }; Functions.prototype.percentRank_Inc=function (array, x, significance) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PercentRank_Inc", 0, [array, x, significance], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PercentRank_Inc", 0, [array, x, significance], false, true, null, false)); }; Functions.prototype.percentile_Exc=function (array, k) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Percentile_Exc", 0, [array, k], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Percentile_Exc", 0, [array, k], false, true, null, false)); }; Functions.prototype.percentile_Inc=function (array, k) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Percentile_Inc", 0, [array, k], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Percentile_Inc", 0, [array, k], false, true, null, false)); }; Functions.prototype.permut=function (number, numberChosen) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Permut", 0, [number, numberChosen], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Permut", 0, [number, numberChosen], false, true, null, false)); }; Functions.prototype.permutationa=function (number, numberChosen) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Permutationa", 0, [number, numberChosen], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Permutationa", 0, [number, numberChosen], false, true, null, false)); }; Functions.prototype.phi=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Phi", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Phi", 0, [x], false, true, null, false)); }; Functions.prototype.pi=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pi", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pi", 0, [], false, true, null, false)); }; Functions.prototype.pmt=function (rate, nper, pv, fv, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pmt", 0, [rate, nper, pv, fv, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pmt", 0, [rate, nper, pv, fv, type], false, true, null, false)); }; Functions.prototype.poisson_Dist=function (x, mean, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Poisson_Dist", 0, [x, mean, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Poisson_Dist", 0, [x, mean, cumulative], false, true, null, false)); }; Functions.prototype.power=function (number, power) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Power", 0, [number, power], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Power", 0, [number, power], false, true, null, false)); }; Functions.prototype.ppmt=function (rate, per, nper, pv, fv, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ppmt", 0, [rate, per, nper, pv, fv, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ppmt", 0, [rate, per, nper, pv, fv, type], false, true, null, false)); }; Functions.prototype.price=function (settlement, maturity, rate, yld, redemption, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Price", 0, [settlement, maturity, rate, yld, redemption, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Price", 0, [settlement, maturity, rate, yld, redemption, frequency, basis], false, true, null, false)); }; Functions.prototype.priceDisc=function (settlement, maturity, discount, redemption, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PriceDisc", 0, [settlement, maturity, discount, redemption, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PriceDisc", 0, [settlement, maturity, discount, redemption, basis], false, true, null, false)); }; Functions.prototype.priceMat=function (settlement, maturity, issue, rate, yld, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PriceMat", 0, [settlement, maturity, issue, rate, yld, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PriceMat", 0, [settlement, maturity, issue, rate, yld, basis], false, true, null, false)); }; Functions.prototype.product=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Product", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Product", 0, [values], false, true, null, false)); }; Functions.prototype.proper=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Proper", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Proper", 0, [text], false, true, null, false)); }; Functions.prototype.pv=function (rate, nper, pmt, fv, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pv", 0, [rate, nper, pmt, fv, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pv", 0, [rate, nper, pmt, fv, type], false, true, null, false)); }; Functions.prototype.quartile_Exc=function (array, quart) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quartile_Exc", 0, [array, quart], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quartile_Exc", 0, [array, quart], false, true, null, false)); }; Functions.prototype.quartile_Inc=function (array, quart) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quartile_Inc", 0, [array, quart], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quartile_Inc", 0, [array, quart], false, true, null, false)); }; Functions.prototype.quotient=function (numerator, denominator) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quotient", 0, [numerator, denominator], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quotient", 0, [numerator, denominator], false, true, null, false)); }; Functions.prototype.radians=function (angle) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Radians", 0, [angle], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Radians", 0, [angle], false, true, null, false)); }; Functions.prototype.rand=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rand", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rand", 0, [], false, true, null, false)); }; Functions.prototype.randBetween=function (bottom, top) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RandBetween", 0, [bottom, top], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RandBetween", 0, [bottom, top], false, true, null, false)); }; Functions.prototype.rank_Avg=function (number, ref, order) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rank_Avg", 0, [number, ref, order], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rank_Avg", 0, [number, ref, order], false, true, null, false)); }; Functions.prototype.rank_Eq=function (number, ref, order) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rank_Eq", 0, [number, ref, order], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rank_Eq", 0, [number, ref, order], false, true, null, false)); }; Functions.prototype.rate=function (nper, pmt, pv, fv, type, guess) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rate", 0, [nper, pmt, pv, fv, type, guess], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rate", 0, [nper, pmt, pv, fv, type, guess], false, true, null, false)); }; Functions.prototype.received=function (settlement, maturity, investment, discount, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Received", 0, [settlement, maturity, investment, discount, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Received", 0, [settlement, maturity, investment, discount, basis], false, true, null, false)); }; Functions.prototype.replace=function (oldText, startNum, numChars, newText) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Replace", 0, [oldText, startNum, numChars, newText], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Replace", 0, [oldText, startNum, numChars, newText], false, true, null, false)); }; Functions.prototype.replaceB=function (oldText, startNum, numBytes, newText) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ReplaceB", 0, [oldText, startNum, numBytes, newText], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ReplaceB", 0, [oldText, startNum, numBytes, newText], false, true, null, false)); }; Functions.prototype.rept=function (text, numberTimes) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rept", 0, [text, numberTimes], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rept", 0, [text, numberTimes], false, true, null, false)); }; Functions.prototype.right=function (text, numChars) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Right", 0, [text, numChars], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Right", 0, [text, numChars], false, true, null, false)); }; Functions.prototype.rightb=function (text, numBytes) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rightb", 0, [text, numBytes], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rightb", 0, [text, numBytes], false, true, null, false)); }; Functions.prototype.roman=function (number, form) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Roman", 0, [number, form], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Roman", 0, [number, form], false, true, null, false)); }; Functions.prototype.round=function (number, numDigits) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Round", 0, [number, numDigits], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Round", 0, [number, numDigits], false, true, null, false)); }; Functions.prototype.roundDown=function (number, numDigits) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RoundDown", 0, [number, numDigits], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RoundDown", 0, [number, numDigits], false, true, null, false)); }; Functions.prototype.roundUp=function (number, numDigits) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RoundUp", 0, [number, numDigits], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RoundUp", 0, [number, numDigits], false, true, null, false)); }; Functions.prototype.rows=function (array) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rows", 0, [array], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rows", 0, [array], false, true, null, false)); }; Functions.prototype.rri=function (nper, pv, fv) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rri", 0, [nper, pv, fv], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rri", 0, [nper, pv, fv], false, true, null, false)); }; Functions.prototype.sec=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sec", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sec", 0, [number], false, true, null, false)); }; Functions.prototype.sech=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sech", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sech", 0, [number], false, true, null, false)); }; Functions.prototype.second=function (serialNumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Second", 0, [serialNumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Second", 0, [serialNumber], false, true, null, false)); }; Functions.prototype.seriesSum=function (x, n, m, coefficients) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SeriesSum", 0, [x, n, m, coefficients], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SeriesSum", 0, [x, n, m, coefficients], false, true, null, false)); }; Functions.prototype.sheet=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sheet", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sheet", 0, [value], false, true, null, false)); }; Functions.prototype.sheets=function (reference) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sheets", 0, [reference], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sheets", 0, [reference], false, true, null, false)); }; Functions.prototype.sign=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sign", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sign", 0, [number], false, true, null, false)); }; Functions.prototype.sin=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sin", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sin", 0, [number], false, true, null, false)); }; Functions.prototype.sinh=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sinh", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sinh", 0, [number], false, true, null, false)); }; Functions.prototype.skew=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Skew", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Skew", 0, [values], false, true, null, false)); }; Functions.prototype.skew_p=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Skew_p", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Skew_p", 0, [values], false, true, null, false)); }; Functions.prototype.sln=function (cost, salvage, life) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sln", 0, [cost, salvage, life], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sln", 0, [cost, salvage, life], false, true, null, false)); }; Functions.prototype.small=function (array, k) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Small", 0, [array, k], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Small", 0, [array, k], false, true, null, false)); }; Functions.prototype.sqrt=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sqrt", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sqrt", 0, [number], false, true, null, false)); }; Functions.prototype.sqrtPi=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SqrtPi", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SqrtPi", 0, [number], false, true, null, false)); }; Functions.prototype.stDevA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDevA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDevA", 0, [values], false, true, null, false)); }; Functions.prototype.stDevPA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDevPA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDevPA", 0, [values], false, true, null, false)); }; Functions.prototype.stDev_P=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDev_P", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDev_P", 0, [values], false, true, null, false)); }; Functions.prototype.stDev_S=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDev_S", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDev_S", 0, [values], false, true, null, false)); }; Functions.prototype.standardize=function (x, mean, standardDev) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Standardize", 0, [x, mean, standardDev], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Standardize", 0, [x, mean, standardDev], false, true, null, false)); }; Functions.prototype.substitute=function (text, oldText, newText, instanceNum) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Substitute", 0, [text, oldText, newText, instanceNum], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Substitute", 0, [text, oldText, newText, instanceNum], false, true, null, false)); }; Functions.prototype.subtotal=function (functionNum) { var values=[]; for (var _i=1; _i < arguments.length; _i++) { values[_i - 1]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Subtotal", 0, [functionNum, values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Subtotal", 0, [functionNum, values], false, true, null, false)); }; Functions.prototype.sum=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sum", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sum", 0, [values], false, true, null, false)); }; Functions.prototype.sumIf=function (range, criteria, sumRange) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumIf", 0, [range, criteria, sumRange], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumIf", 0, [range, criteria, sumRange], false, true, null, false)); }; Functions.prototype.sumIfs=function (sumRange) { var values=[]; for (var _i=1; _i < arguments.length; _i++) { values[_i - 1]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumIfs", 0, [sumRange, values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumIfs", 0, [sumRange, values], false, true, null, false)); }; Functions.prototype.sumSq=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumSq", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumSq", 0, [values], false, true, null, false)); }; Functions.prototype.syd=function (cost, salvage, life, per) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Syd", 0, [cost, salvage, life, per], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Syd", 0, [cost, salvage, life, per], false, true, null, false)); }; Functions.prototype.t=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T", 0, [value], false, true, null, false)); }; Functions.prototype.tbillEq=function (settlement, maturity, discount) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillEq", 0, [settlement, maturity, discount], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillEq", 0, [settlement, maturity, discount], false, true, null, false)); }; Functions.prototype.tbillPrice=function (settlement, maturity, discount) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillPrice", 0, [settlement, maturity, discount], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillPrice", 0, [settlement, maturity, discount], false, true, null, false)); }; Functions.prototype.tbillYield=function (settlement, maturity, pr) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillYield", 0, [settlement, maturity, pr], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillYield", 0, [settlement, maturity, pr], false, true, null, false)); }; Functions.prototype.t_Dist=function (x, degFreedom, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist", 0, [x, degFreedom, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist", 0, [x, degFreedom, cumulative], false, true, null, false)); }; Functions.prototype.t_Dist_2T=function (x, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist_2T", 0, [x, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist_2T", 0, [x, degFreedom], false, true, null, false)); }; Functions.prototype.t_Dist_RT=function (x, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist_RT", 0, [x, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist_RT", 0, [x, degFreedom], false, true, null, false)); }; Functions.prototype.t_Inv=function (probability, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Inv", 0, [probability, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Inv", 0, [probability, degFreedom], false, true, null, false)); }; Functions.prototype.t_Inv_2T=function (probability, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Inv_2T", 0, [probability, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Inv_2T", 0, [probability, degFreedom], false, true, null, false)); }; Functions.prototype.tan=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Tan", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Tan", 0, [number], false, true, null, false)); }; Functions.prototype.tanh=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Tanh", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Tanh", 0, [number], false, true, null, false)); }; Functions.prototype.text=function (value, formatText) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Text", 0, [value, formatText], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Text", 0, [value, formatText], false, true, null, false)); }; Functions.prototype.time=function (hour, minute, second) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Time", 0, [hour, minute, second], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Time", 0, [hour, minute, second], false, true, null, false)); }; Functions.prototype.timevalue=function (timeText) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Timevalue", 0, [timeText], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Timevalue", 0, [timeText], false, true, null, false)); }; Functions.prototype.today=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Today", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Today", 0, [], false, true, null, false)); }; Functions.prototype.trim=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Trim", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Trim", 0, [text], false, true, null, false)); }; Functions.prototype.trimMean=function (array, percent) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TrimMean", 0, [array, percent], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TrimMean", 0, [array, percent], false, true, null, false)); }; Functions.prototype.true=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "True", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "True", 0, [], false, true, null, false)); }; Functions.prototype.trunc=function (number, numDigits) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Trunc", 0, [number, numDigits], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Trunc", 0, [number, numDigits], false, true, null, false)); }; Functions.prototype.type=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Type", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Type", 0, [value], false, true, null, false)); }; Functions.prototype.usdollar=function (number, decimals) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "USDollar", 0, [number, decimals], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "USDollar", 0, [number, decimals], false, true, null, false)); }; Functions.prototype.unichar=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Unichar", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Unichar", 0, [number], false, true, null, false)); }; Functions.prototype.unicode=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Unicode", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Unicode", 0, [text], false, true, null, false)); }; Functions.prototype.upper=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Upper", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Upper", 0, [text], false, true, null, false)); }; Functions.prototype.vlookup=function (lookupValue, tableArray, colIndexNum, rangeLookup) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VLookup", 0, [lookupValue, tableArray, colIndexNum, rangeLookup], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VLookup", 0, [lookupValue, tableArray, colIndexNum, rangeLookup], false, true, null, false)); }; Functions.prototype.value=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Value", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Value", 0, [text], false, true, null, false)); }; Functions.prototype.varA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VarA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VarA", 0, [values], false, true, null, false)); }; Functions.prototype.varPA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VarPA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VarPA", 0, [values], false, true, null, false)); }; Functions.prototype.var_P=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Var_P", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Var_P", 0, [values], false, true, null, false)); }; Functions.prototype.var_S=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Var_S", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Var_S", 0, [values], false, true, null, false)); }; Functions.prototype.vdb=function (cost, salvage, life, startPeriod, endPeriod, factor, noSwitch) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Vdb", 0, [cost, salvage, life, startPeriod, endPeriod, factor, noSwitch], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Vdb", 0, [cost, salvage, life, startPeriod, endPeriod, factor, noSwitch], false, true, null, false)); }; Functions.prototype.weekNum=function (serialNumber, returnType) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WeekNum", 0, [serialNumber, returnType], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WeekNum", 0, [serialNumber, returnType], false, true, null, false)); }; Functions.prototype.weekday=function (serialNumber, returnType) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Weekday", 0, [serialNumber, returnType], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Weekday", 0, [serialNumber, returnType], false, true, null, false)); }; Functions.prototype.weibull_Dist=function (x, alpha, beta, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Weibull_Dist", 0, [x, alpha, beta, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Weibull_Dist", 0, [x, alpha, beta, cumulative], false, true, null, false)); }; Functions.prototype.workDay=function (startDate, days, holidays) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WorkDay", 0, [startDate, days, holidays], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WorkDay", 0, [startDate, days, holidays], false, true, null, false)); }; Functions.prototype.workDay_Intl=function (startDate, days, weekend, holidays) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WorkDay_Intl", 0, [startDate, days, weekend, holidays], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WorkDay_Intl", 0, [startDate, days, weekend, holidays], false, true, null, false)); }; Functions.prototype.xirr=function (values, dates, guess) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xirr", 0, [values, dates, guess], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xirr", 0, [values, dates, guess], false, true, null, false)); }; Functions.prototype.xnpv=function (rate, values, dates) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xnpv", 0, [rate, values, dates], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xnpv", 0, [rate, values, dates], false, true, null, false)); }; Functions.prototype.xor=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xor", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xor", 0, [values], false, true, null, false)); }; Functions.prototype.year=function (serialNumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Year", 0, [serialNumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Year", 0, [serialNumber], false, true, null, false)); }; Functions.prototype.yearFrac=function (startDate, endDate, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YearFrac", 0, [startDate, endDate, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YearFrac", 0, [startDate, endDate, basis], false, true, null, false)); }; Functions.prototype.yield=function (settlement, maturity, rate, pr, redemption, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Yield", 0, [settlement, maturity, rate, pr, redemption, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Yield", 0, [settlement, maturity, rate, pr, redemption, frequency, basis], false, true, null, false)); }; Functions.prototype.yieldDisc=function (settlement, maturity, pr, redemption, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YieldDisc", 0, [settlement, maturity, pr, redemption, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YieldDisc", 0, [settlement, maturity, pr, redemption, basis], false, true, null, false)); }; Functions.prototype.yieldMat=function (settlement, maturity, issue, rate, pr, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YieldMat", 0, [settlement, maturity, issue, rate, pr, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YieldMat", 0, [settlement, maturity, issue, rate, pr, basis], false, true, null, false)); }; Functions.prototype.z_Test=function (array, x, sigma) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Z_Test", 0, [array, x, sigma], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Z_Test", 0, [array, x, sigma], false, true, null, false)); }; Functions.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -23351,8 +27180,12 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); }; + Functions.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; Functions.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}); }; return Functions; }(OfficeExtension.ClientObject)); @@ -23361,6 +27194,7 @@ var Excel; (function (ErrorCodes) { ErrorCodes.accessDenied="AccessDenied"; ErrorCodes.apiNotFound="ApiNotFound"; + ErrorCodes.conflict="Conflict"; ErrorCodes.generalException="GeneralException"; ErrorCodes.insertDeleteConflict="InsertDeleteConflict"; ErrorCodes.invalidArgument="InvalidArgument"; @@ -23372,7 +27206,10 @@ var Excel; ErrorCodes.itemNotFound="ItemNotFound"; ErrorCodes.notImplemented="NotImplemented"; ErrorCodes.unsupportedOperation="UnsupportedOperation"; + ErrorCodes.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"; })(ErrorCodes=Excel.ErrorCodes || (Excel.ErrorCodes={})); })(Excel || (Excel={})); +OfficeExtension.Utility._doApiNotSupportedCheck=true; + diff --git a/node_modules/@microsoft/office-js/dist/excel-web-16.00.js b/node_modules/@microsoft/office-js/dist/excel-web-16.00.js index 007f130..dc7dc35 100644 --- a/node_modules/@microsoft/office-js/dist/excel-web-16.00.js +++ b/node_modules/@microsoft/office-js/dist/excel-web-16.00.js @@ -1,7 +1,7 @@ /* Excel-Online-specific API library */ -/* Version: 16.0.8118.3000 */ +/* Version: 16.0.8904.3000 */ -/* Office.js Version: 16.0.8119.1000 */ +/* Office.js Version: 16.0.8916.1000 */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ @@ -18,4 +18,4 @@ * @version 2.3.0 */ -var __extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},OsfMsAjaxFactory,OSF,OSFLog,Logger,OSFAriaLogger,OSFAppTelemetry,OSF_DDA_Marshaling_File_FilePropertiesKeys,OSF_DDA_Marshaling_File_SlicePropertiesKeys,OSF_DDA_Marshaling_File_FileType,OSF_DDA_Marshaling_File_ParameterKeys,OSF_DDA_Marshaling_FilePropertiesKeys,OSF_DDA_Marshaling_GoToType,OSF_DDA_Marshaling_SelectionMode,OSF_DDA_Marshaling_TableOptionProperties,OSF_DDA_Marshaling_CellProperties,OSF_DDA_Marshaling_CellFormatProperties,OSF_DDA_Marshaling_BorderStyleType,OSF_DDA_Marshaling_ColorType,OSF_DDA_Marshaling_AlignHorizontalType,OSF_DDA_Marshaling_AlignVerticalType,OSF_DDA_Marshaling_FontStyleType,OSF_DDA_Marshaling_FontUnderlineStyleType,OSF_DDA_Marshaling_FontDirectionType,OSF_DDA_Marshaling_WidthType,OSF_DDA_Marshaling_HeightType,AgaveFormatAPI,OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys,OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys,OfficeExt,OfficeExtension,Excel;(function(n){var t=function(){function t(){}var n=!0;return t.prototype.isMsAjaxLoaded=function(){var t="function",i="undefined";return typeof Sys!==i&&typeof Type!==i&&Sys.StringBuilder&&typeof Sys.StringBuilder===t&&Type.registerNamespace&&typeof Type.registerNamespace===t&&Type.registerClass&&typeof Type.registerClass===t&&typeof Function._validateParams===t&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===t?n:!1},t.prototype.loadMsAjaxFull=function(n){var t=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,n)},Object.defineProperty(t.prototype,"msAjaxError",{get:function(){var n=this;return n._msAjaxError==null&&n.isMsAjaxLoaded()&&(n._msAjaxError=Error),n._msAjaxError},set:function(n){this._msAjaxError=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxString",{get:function(){var n=this;return n._msAjaxString==null&&n.isMsAjaxLoaded()&&(n._msAjaxString=String),n._msAjaxString},set:function(n){this._msAjaxString=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxDebug",{get:function(){var n=this;return n._msAjaxDebug==null&&n.isMsAjaxLoaded()&&(n._msAjaxDebug=Sys.Debug),n._msAjaxDebug},set:function(n){this._msAjaxDebug=n},enumerable:n,configurable:n}),t}();n.MicrosoftAjaxFactory=t})(OfficeExt||(OfficeExt={}));OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory;OSF=OSF||{},function(n){var t=function(){function n(n){this._internalStorage=n}return n.prototype.getItem=function(n){try{return this._internalStorage&&this._internalStorage.getItem(n)}catch(t){return null}},n.prototype.setItem=function(n,t){try{this._internalStorage&&this._internalStorage.setItem(n,t)}catch(i){}},n.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(n){}},n.prototype.removeItem=function(n){try{this._internalStorage&&this._internalStorage.removeItem(n)}catch(t){}},n.prototype.getKeysWithPrefix=function(n){var r=[],u,t,i;try{for(u=this._internalStorage&&this._internalStorage.length||0,t=0;t0?i.push(t):t.tabIndex===0&&r.push(t):r.push(t);return i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;return r===0&&(r=i.indexOf(n)-i.indexOf(t)),r}),[].concat(i,r)}var f="focus",e="on",b="configurable",k="writable",o="enumerable",s="undefined",i=!0,t=!1,c=2147483647,n=null,r=-1,l=r,d="&_xdm_Info=",g="&_serializer_version=",nt="_xdm_",ut="_serializer_version=",a="#",tt="&",h="class",v={},ft=3e4,y=n,p=n,u=(new Date).getTime();return{set_entropy:function(n){var t,r,i;if(typeof n=="string")for(t=0;t1?l[l.length-1]:n,s,h,c,a;return u&&o!=n&&(o.indexOf(tt)>=0&&(o=o.split(tt)[0]),o=decodeURIComponent(o)),s=w(),!f&&s&&(h=window.name.indexOf(i),h>r&&(c=window.name.indexOf(";",h),c==r&&(c=window.name.length),a=window.name.substring(h,c),o?s.setItem(a,o):o=s.getItem(a))),o},getConversationId:function(){var i=window.location.search,t=n,r;return i&&(r=i.indexOf("&"),t=r>0?i.substring(1,r):i.substr(1),t&&t.charAt(t.length-1)==="="&&(t=t.substring(0,t.length-1),t&&(t=decodeURIComponent(t)))),t},getInfoItems:function(n){var t=n.split("$");return typeof t[1]==s&&(t=n.split("|")),typeof t[1]==s&&(t=n.split("%7C")),t},getXdmFieldValue:function(n,t){var r="",u=OSF.OUtil.parseXdmInfo(t),i;if(u&&(i=OSF.OUtil.getInfoItems(u),i!=undefined&&i.length>=3))switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]),f;if(u)throw u;for(f in r)if(u=Function._validateParameter(n[f],r[f],f),u)throw u;},writeProfilerMark:function(n){window.msWriteProfilerMark&&(window.msWriteProfilerMark(n),OsfMsAjaxFactory.msAjaxDebug.trace(n))},outputDebug:function(n){typeof OsfMsAjaxFactory!==s&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){var e,f;r=r||{};for(e in u)f=u[e],r[f]==undefined&&(r[f]=i);return Object.defineProperty(n,t,r),n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[o])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[o])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[k,o,b])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[k,o,b])},finalizeProperties:function(n,r){var e,u;r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8,f=e&255,i[t++]=r>>2,i[t++]=(r&3)<<4|u>>4,i[t++]=(u&15)<<2|f>>6,i[t++]=f&63,isNaN(e)||(r=e>>8,u=s&255,f=s>>8,i[t++]=r>>2,i[t++]=(r&3)<<4|u>>4,i[t++]=(u&15)<<2|f>>6,i[t++]=f&63),isNaN(e)?i[t-1]=64:isNaN(s)&&(i[t-2]=64,i[t-1]=64),h=0;h0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){var u,i,f,r;if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(u=[],i=0;in)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=rt(u),o=e?u.length-1:0,u.length===0)return n;while(!h&&o>=0&&on)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=rt(u),l=y(u,e),s=v(u.length,l,o),s<0)return n;while(!c&&s>=0&&s0;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[r%16],r=Math.floor(r/16);for(;t<32;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[Math.floor(Math.random()*16)];return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];return i?(i.name||(i.name=n[this.errorCodes.ooeInternalError].name),i.message||(i.message=n[this.errorCodes.ooeInternalError].message)):i=n[this.errorCodes.ooeInternalError],i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage}}}}(),function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}(),r,i,h,u,c,l,f,a,e,v,y,p,w,b,o,k,d,g,s,nt,tt,it,rt;n.RequirementVersion=ut;r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){var f,u,e,i,r;if(n==undefined)return!1;if(t==undefined&&(t=0),f=this._setMap,u=f._sets,u.hasOwnProperty(n.toLowerCase())){e=u[n.toLowerCase()];try{if((i=this._getVersion(e),t=t+"",r=this._getVersion(t),i.major>0&&i.major>r.major)||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),i=0,r=0;if(t.length<2&&isNaN(Number(n)))throw u;else if(i=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(i)||isNaN(r))throw u;return{minor:r,major:i}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;h=function(n){function i(){n.call(this,{dialogapi:t})}return __extends(i,n),i}(i);n.DefaultDialogSetRequirement=h;u=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelClientDefaultSetRequirement=u;c=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(u);n.ExcelClientV1DefaultSetRequirement=c;l=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookClientDefaultSetRequirement=l;f=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return __extends(i,n),i}(i);n.WordClientDefaultSetRequirement=f;a=function(n){function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return __extends(i,n),i}(f);n.WordClientV1DefaultSetRequirement=a;e=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointClientDefaultSetRequirement=e;v=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(e);n.PowerpointClientV1DefaultSetRequirement=v;y=function(n){function i(){n.call(this,{selection:t,textcoercion:t})}return __extends(i,n),i}(i);n.ProjectClientDefaultSetRequirement=y;p=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return __extends(i,n),i}(i);n.ExcelWebDefaultSetRequirement=p;w=function(n){function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordWebDefaultSetRequirement=w;b=function(n){function i(){n.call(this,{activeview:t,settings:t})}return __extends(i,n),i}(i);n.PowerpointWebDefaultSetRequirement=b;o=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookWebDefaultSetRequirement=o;k=function(n){function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.SwayWebDefaultSetRequirement=k;d=function(n){function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return __extends(i,n),i}(i);n.AccessWebDefaultSetRequirement=d;g=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelIOSDefaultSetRequirement=g;s=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordIOSDefaultSetRequirement=s;nt=function(n){function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return __extends(t,n),t}(s);n.WordIOSV1DefaultSetRequirement=nt;tt=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointIOSDefaultSetRequirement=tt;it=function(n){function i(){n.call(this,{mailbox:t})}return __extends(i,n),i}(i);n.OutlookIOSDefaultSetRequirement=it;rt=function(){function n(){}var t="undefined";return n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},n.getDefaultRequirementMatrix=function(u){var f,e,s,o;return this.initializeDefaultSetMatrix(),f=undefined,e=u.get_requirementMatrix(),e!=undefined&&e.length>0&&typeof JSON!==t?(s=JSON.parse(u.get_requirementMatrix().toLowerCase()),f=new r(new i(s))):(o=n.getClientFullVersionString(u),f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[o]!=undefined?new r(n.DefaultSetArrayMatrix[o]):new r(new i({}))),f},n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix(),e;return f!=undefined&&f.length>0&&typeof JSON!==t?(e=JSON.parse(n.get_requirementMatrix().toLowerCase()),u=new r(new i(e))):u=new r(new h),u},n.getClientFullVersionString=function(n){var i=n.get_appMinorVersion(),u="",r="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;return f&&n.get_appVersion()==1?r=t==4096&&i>=15?"16.00.01":"16.00":n.get_appName()==64?r=n.get_appVersion():(u=i<10?"0"+i:""+i,r=n.get_appVersion()+"."+u),n.get_appName()+"-"+r},n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new c;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new v;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new l;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new w;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new b;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new g;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new k;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new nt;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new tt;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new it},n.Excel_RCLIENT_1600="1-16.00",n.Excel_RCLIENT_1601="1-16.01",n.Word_RCLIENT_1600="2-16.00",n.Word_RCLIENT_1601="2-16.01",n.PowerPoint_RCLIENT_1600="4-16.00",n.PowerPoint_RCLIENT_1601="4-16.01",n.Outlook_RCLIENT_1600="8-16.00",n.Excel_WAC_1600="16-16.00",n.Word_WAC_1600="32-16.00",n.Outlook_WAC_1600="64-16.00",n.Outlook_WAC_1601="64-16.01",n.Project_RCLIENT_1600="128-16.00",n.Access_WAC_1600="256-16.00",n.PowerPoint_WAC_1600="512-16.00",n.Excel_IOS_1600="1024-16.00",n.SWAY_WAC_1600="2048-16.00",n.Word_IOS_1600="4096-16.00",n.Word_IOS_16001="4096-16.00.01",n.PowerPoint_IOS_1600="8192-16.00",n.Outlook_IOS_1600="65536-16.00",n.DefaultSetArrayMatrix={},n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))}(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}return n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n},n.getInstance=function(){return n.hostObj===undefined&&(n.hostObj=new n),n.hostObj},n.prototype.getPlatform=function(){var n=this,t;return n.hostInfo.hostPlatform&&(t=n.hostInfo.hostPlatform.toLowerCase(),n.platformRemappings[t])?n.platformRemappings[t]:null},n.prototype.getHost=function(){var n=this,t;if(n.hostInfo.hostType){if(t=n.hostInfo.hostType.toLowerCase(),n.camelCaseMappings[t])return n.camelCaseMappings[t];if(t=n.capitalizeFirstLetter(n.hostInfo.hostType),Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null},n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null},n}();n.Host=t})(t=n.HostName||(n.HostName={}))}(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){n||(window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,n=!0)},disableShortcut:function(){n&&(t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window),n=!1)}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i,r,o,u,f,e;if(n&&typeof n=="string"&&(r=n.indexOf("#"),r!=-1)){o=n.substring(0,r);u=n.substring(r+1);switch(o){case"binding":case"bindings":u&&(i=new OSF.DDA.BindingPromise(u))}}if(i)return i.onFail=t,i;else if(t)if(f=typeof t,f=="function")e={},e[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(e,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext));else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f);};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this,s,e;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.auth&&OSF.OUtil.defineEnumerableProperty(f,"auth",{value:n.auth});n.get_isDialog()?(e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e})):(t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t}),r&&(s=r.displayName||"appOM",delete r.displayName,OSF.OUtil.defineEnumerableProperty(f,s,{value:r})),u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}}),e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e}))};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this,u;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;return OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext()),n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,e=n.length,o=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){var u,i,r;for(u in n){if(i=n[u],r=t[u],i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw o();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw o();}};f.extractRequiredArguments=function(t,i,r){var f,u,h,s,c,l;if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(c=n.length-1;c>=s;c--){l=n[c];switch(typeof l){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=l;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}if(f=o.fillOptions(f,i,r,u),e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;return o.verifyArguments(t,f),f}var h="function",s=n.length,o=new OSF.DDA.ApiMethodCall(n,t,i,f,e);this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),u=c(n,r,t,i);return o.constructCallArgs(r,u,t,i)};this.processResponse=function(n,t,i,f){return n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n)};this.getCallArgs=function(n){for(var t,u,r,i=n.length-1;i>=s;i--){r=n[i];switch(typeof r){case"object":t=r;break;case h:u=r}}return t=t||{},u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u),t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],i=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],t,i,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback],u,r;f&&(u={},u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?u[OSF.DDA.AsyncResultEnum.Properties.Value]=i:(r={},i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i),f(new OSF.DDA.AsyncResult(u,r)))};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.SyncMethodNames[t]=i};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){function o(n,i,r,u){var o,c,s,h;if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(s=n.length-1;s>=e;s--){h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}return o=f.fillOptions(o,i,r,u),f.verifyArguments(t,o),o}var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),u=o(n,r,t,i);return f.constructCallArgs(r,u,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){function e(i,f){var a=i?{}:undefined,s,h,o,v,c,l;for(s in i){if(h=i[s],OSF.DDA.ListType.isListType(s)){o=[];for(v in h)o.push(e(h[v],f))}else OSF.OUtil.listContainsKey(r,s)?o=r[s][f](h):f==u&&n.preserveNesting(s)?o=e(h,f):(c=t[s],c?(l=c[f],l&&(o=l[h],o===undefined&&(o=h))):o=h);a[s]=o}return a}function l(i,r){var e,u,h,s;for(u in r)h=n.isComplexType(u)?l(i,t[u][o]):i[u],h!=undefined&&(e||(e={}),s=r[u],s==f&&(s=u),e[s]=n.pack(u,h));return e}function s(i,r,e){var o,a,h,l,p,v,y;e||(e={});for(o in r){if(a=r[o],a==f)h=i;else if(a==c){e[o]=i.toArray();continue}else h=i[a];if(h===null||h===undefined)e[o]=undefined;else if(h=n.unpack(o,h),n.isComplexType(o))l=t[o][u],n.preserveNesting(o)?e[o]=s(h,l):s(h,l,e);else if(OSF.DDA.ListType.isListType(o)){l={};p=OSF.DDA.ListType.getDescriptor(o);l[p]=f;v=new Array(h.length);for(y in h)v[y]=s(h[y],l);e[o]=v}else e[o]=h}return e}function a(n,i,r){var f=t[n][r],u,o,c;return r=="toHost"?(o=e(i,r),u=l(o,f)):r==h&&(c=s(i,f),u=e(c,r)),u}var h="fromHost",i=this,o="toHost",u=h,c="sourceData",f="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];t||(t={});i.addMapping=function(n,i){var e,h,c,l,r,s,a,v;if(i.map){e=i.map;h={};for(c in e)l=e[c],l==f&&(l=c),h[l]=c}else e=i.toHost,h=i.fromHost;if(r=t[n],r){s=r[o];for(a in s)e[a]=s[a];s=r[u];for(v in s)h[v]=s[v]}else r=t[n]={};r[o]=e;r[u]=h};i.toHost=function(n,t){return a(n,t,o)};i.fromHost=function(n,t){return a(n,t,u)};i.self=f;i.sourceData=c;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){return this.isDynamicType(n)?t[n].toHost(i):i};i.unpack=function(n,i){return this.isDynamicType(n)?t[n].fromHost(i):i}};OSF.DDA.getDecoratedParameterMap=function(n,t){function r(n){var i=null,r,t;if(n)for(i={},r=n.length,t=0;t1?i=u+c+t:s.length>0&&(i=u+f+h+t),o?[i,r,o].join(""):i}function e(n){if(!n)return null;var t=document.createElement("a");return t.href=n,t.protocol+"//"+t.host}var t="^https://[a-z0-9-]+.(officeapps.live|officeapps-df.live|partner.officewebapps).com/";n.parseAppContextFromWindowName=i;n.serializeObjectToString=r;n.isHostTrusted=u;n.addHostInfoAsQueryParam=f;n.getDomainForUrl=e})(t=n.WACUtils||(n.WACUtils={}))}(OfficeExt||(OfficeExt={})),function(n){var e="\n",i=!0,t=null,r="undefined",h=function(){function n(){}return n.isInstanceOfType=function(n,u){if(typeof u===r||u===t)return!1;if(u instanceof n)return i;var f=u.constructor;return f&&typeof f=="function"&&f.__typeName&&f.__typeName!=="Object"||(f=Object),!!(f===n)||f.__typeName&&n.__typeName&&f.__typeName===n.__typeName},n}(),o,u,s,f;n.MsAjaxTypeHelper=h;o=function(){function n(){}var i="Parameter name: {0}";return n.create=function(n,t){var i=new Error(n),r;if(i.message=n,t)for(r in t)i[r]=t[r];return i.popStackFrame(),i},n.parameterCount=function(t){var r="Sys.ParameterCountException: "+(t?t:"Parameter count mismatch."),i=n.create(r,{name:"Sys.ParameterCountException"});return i.popStackFrame(),i},n.argument=function(t,r){var o="Sys.ArgumentException: "+(r?r:"Value does not fall within the expected range."),f;return t&&(o+=e+u.format(i,t)),f=n.create(o,{name:"Sys.ArgumentException",paramName:t}),f.popStackFrame(),f},n.argumentNull=function(t,r){var o="Sys.ArgumentNullException: "+(r?r:"Value cannot be null."),f;return t&&(o+=e+u.format(i,t)),f=n.create(o,{name:"Sys.ArgumentNullException",paramName:t}),f.popStackFrame(),f},n.argumentOutOfRange=function(f,o,s){var h="Sys.ArgumentOutOfRangeException: "+(s?s:"Specified argument was out of the range of valid values."),c;return f&&(h+=e+u.format(i,f)),typeof o!==r&&o!==t&&(h+=e+u.format("Actual value was {0}.",o)),c=n.create(h,{name:"Sys.ArgumentOutOfRangeException",paramName:f,actualValue:o}),c.popStackFrame(),c},n.argumentType=function(t,r,f,o){var s="Sys.ArgumentTypeException: ",h;return s+=o?o:r&&f?u.format("Object of type '{0}' cannot be converted to type '{1}'.",r.getName?r.getName():r,f.getName?f.getName():f):"Object cannot be converted to the required type.",t&&(s+=e+u.format(i,t)),h=n.create(s,{name:"Sys.ArgumentTypeException",paramName:t,actualType:r,expectedType:f}),h.popStackFrame(),h},n.argumentUndefined=function(t,r){var o="Sys.ArgumentUndefinedException: "+(r?r:"Value cannot be undefined."),f;return t&&(o+=e+u.format(i,t)),f=n.create(o,{name:"Sys.ArgumentUndefinedException",paramName:t}),f.popStackFrame(),f},n.invalidOperation=function(t){var r="Sys.InvalidOperationException: "+(t?t:"Operation is not valid due to the current state of the object."),i=n.create(r,{name:"Sys.InvalidOperationException"});return i.popStackFrame(),i},n}();n.MsAjaxError=o;u=function(){function n(){}return n.format=function(n){for(var r,i=[],t=1;t0){for(r=[],i=0;i=s)break;if(f=Function._validateParameter(n[e],o,h),f)return f.popStackFrame(),f}return t}),Function._validateParameterCount||(Function._validateParameterCount=function(n,r,u){var f,s,e=r.length,h=n.length,c,l,a;if(he)for(s=i,f=0;f0){var t=h.shift();d(t)}else clearInterval(u),u=n}else OsfMsAjaxFactory.msAjaxDebug.trace(v)}function d(n){o=n.getInvokeBlockingFlag();n.invoke();c=(new Date).getTime()}function ot(){var r,u,s,e,h,o,t;if(f){u=0;s=new Date;for(h in i){r=i[h];for(o in r._callbackList)if(t=r._callbackList[o],e=t.timeout?t.timeout:b,e>=0&&Math.abs(s.getTime()-t.createdOn)>=e)try{t.callback&&t.callback(Microsoft.Office.Common.InvokeResultCode.errorHandlingMethodCallTimedout,n)}finally{delete r._callbackList[o]}else u++}u===0&&(clearInterval(f),f=n)}else OsfMsAjaxFactory.msAjaxDebug.trace(v)}function st(){o=t}function ht(n){if(window.addEventListener)window.addEventListener("message",n,t);else if(navigator.userAgent.indexOf("MSIE")>-1&&window.attachEvent)window.attachEvent("onmessage",n);else{OsfMsAjaxFactory.msAjaxDebug.trace("Browser doesn't support the required API.");throw OsfMsAjaxFactory.msAjaxError.argument("Browser");}}function ct(n,i){var f=t,r,u;return n===e?e:!n||!i||!n.length||!i.length?f:(r=document.createElement("a"),u=document.createElement("a"),r.href=n,u.href=i,f=g(r,u),delete r,u,f)}function l(n,i){var u=t,f,e,r;if(!i||!i.length||!n||!(n instanceof Array)||!n.length)return u;for(f=document.createElement("a"),e=document.createElement("a"),f.href=i,r=0;rp)&&!o?(d(ht),lt=t):u=setInterval(et,p));lt&&ft(ht)}catch(w){s&&s._onHandleRequestError&&s._onHandleRequestError(r,w);nt=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequest;w==tt&&(nt=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied);var pt=new Microsoft.Office.Common.Response(r._actionName,r._conversationId,r._correlationId,nt,Microsoft.Office.Common.ResponseType.forCalling,w),wt=Microsoft.Office.Common.MessagePackager.envelope(pt,f),at=t;try{at=!!(i.source&&i.source.postMessage)}catch(w){}at&&i.source.postMessage(wt,b)}}else if(r._messageType===Microsoft.Office.Common.MessageType.response){if(h=rt(r._conversationId),!h)return;if(h._serializerVersion=f,!ct(h._targetUrl,i.origin))throw"Failed orgin check";if(r._responseType===Microsoft.Office.Common.ResponseType.forCalling){if(v=h._callbackList[r._correlationId],v)try{v.callback&&v.callback(r._errorCode,r._data)}finally{delete h._callbackList[r._correlationId]}}else y=h._eventHandlerList[r._actionName],y!==undefined&&y!==n&&y(r._data)}else return}}function nt(){k||(ht(lt),k=e)}var a="serviceEndPointId",e=!0,v="channel is not ready.",s="conversationId",y="Unknown conversation Id.",t=!1,n=null,h=[],c=n,u=n,p=10,o=t,f=n,tt=2e3,w=65e3,b=w,r={},i={},k=t;return{connect:function(n,t,r,u){var f=i[n];return f||(nt(),f=new Microsoft.Office.Common.ClientEndPoint(n,t,r,u),i[n]=f),f},getClientEndPoint:function(n){var r=Function._validateParams(arguments,[{name:s,type:String,mayBeNull:t}]);if(r)throw r;return i[n]},createServiceEndPoint:function(n){nt();var t=new Microsoft.Office.Common.ServiceEndPoint(n);return r[n]=t,t},getServiceEndPoint:function(n){var i=Function._validateParams(arguments,[{name:a,type:String,mayBeNull:t}]);if(i)throw i;return r[n]},deleteClientEndPoint:function(n){var r=Function._validateParams(arguments,[{name:s,type:String,mayBeNull:t}]);if(r)throw r;delete i[n]},deleteServiceEndPoint:function(n){var i=Function._validateParams(arguments,[{name:a,type:String,mayBeNull:t}]);if(i)throw i;delete r[n]},checkUrlWithAppDomains:function(n,t){return l(n,t)},_setMethodTimeout:function(n){var i=Function._validateParams(arguments,[{name:"methodTimeout",type:Number,mayBeNull:t}]);if(i)throw i;b=n<=0?w:n},_startMethodTimeoutTimer:function(){f||(f=setInterval(ot,tt))}}}();Microsoft.Office.Common.Message=function(n,t,i,r,u){var e=!1,f=this,o=Function._validateParams(arguments,[{name:"messageType",type:Number,mayBeNull:e},{name:"actionName",type:String,mayBeNull:e},{name:"conversationId",type:String,mayBeNull:e},{name:"correlationId",mayBeNull:e},{name:"data",mayBeNull:!0,optional:!0}]);if(o)throw o;f._messageType=n;f._actionName=t;f._conversationId=i;f._correlationId=r;f._origin=window.location.href;f._data=typeof u=="undefined"?null:u};Microsoft.Office.Common.Message.prototype={getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getOrigin:function(){return this._origin},getData:function(){return this._data},getMessageType:function(){return this._messageType}};Microsoft.Office.Common.Request=function(n,t,i,r,u){Microsoft.Office.Common.Request.uber.constructor.call(this,Microsoft.Office.Common.MessageType.request,n,i,r,u);this._actionType=t};OSF.OUtil.extend(Microsoft.Office.Common.Request,Microsoft.Office.Common.Message);Microsoft.Office.Common.Request.prototype.getActionType=function(){return this._actionType};Microsoft.Office.Common.Response=function(n,t,i,r,u,f){Microsoft.Office.Common.Response.uber.constructor.call(this,Microsoft.Office.Common.MessageType.response,n,t,i,f);this._errorCode=r;this._responseType=u};OSF.OUtil.extend(Microsoft.Office.Common.Response,Microsoft.Office.Common.Message);Microsoft.Office.Common.Response.prototype.getErrorCode=function(){return this._errorCode};Microsoft.Office.Common.Response.prototype.getResponseType=function(){return this._responseType};Microsoft.Office.Common.MessagePackager={envelope:function(n){return typeof n=="object"&&(n._serializerVersion=OSF.SerializerVersion.Browser),JSON.stringify(n)},unenvelope:function(n){return JSON.parse(n)}};Microsoft.Office.Common.ResponseSender=function(n,t,i,r,u,f,e){var h=!1,o=this,c=Function._validateParams(arguments,[{name:"requesterWindow",mayBeNull:h},{name:"requesterUrl",type:String,mayBeNull:h},{name:"actionName",type:String,mayBeNull:h},{name:"conversationId",type:String,mayBeNull:h},{name:"correlationId",mayBeNull:h},{name:"responsetype",type:Number,maybeNull:h},{name:"serializerVersion",type:Number,maybeNull:!0,optional:!0}]),s;if(c)throw c;o._requesterWindow=n;o._requesterUrl=t;o._actionName=i;o._conversationId=r;o._correlationId=u;o._invokeResultCode=Microsoft.Office.Common.InvokeResultCode.noError;o._responseType=f;s=o;o._send=function(n){try{var t=new Microsoft.Office.Common.Response(s._actionName,s._conversationId,s._correlationId,s._invokeResultCode,s._responseType,n),i=Microsoft.Office.Common.MessagePackager.envelope(t,e);s._requesterWindow.postMessage(i,s._requesterUrl)}catch(r){OsfMsAjaxFactory.msAjaxDebug.trace("ResponseSender._send error:"+r.message)}}};Microsoft.Office.Common.ResponseSender.prototype={getRequesterWindow:function(){return this._requesterWindow},getRequesterUrl:function(){return this._requesterUrl},getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getSend:function(){return this._send},setResultCode:function(n){this._invokeResultCode=n}};Microsoft.Office.Common.InvokeCompleteCallback=function(n,t,i,r,u,f,e){var s=this,o;Microsoft.Office.Common.InvokeCompleteCallback.uber.constructor.call(s,n,t,i,r,u,Microsoft.Office.Common.ResponseType.forCalling,e);s._postCallbackHandler=f;o=s;s._send=function(n,t){t!=undefined&&(o._invokeResultCode=t);try{var i=new Microsoft.Office.Common.Response(o._actionName,o._conversationId,o._correlationId,o._invokeResultCode,o._responseType,n),r=Microsoft.Office.Common.MessagePackager.envelope(i,e);o._requesterWindow.postMessage(r,o._requesterUrl);o._postCallbackHandler()}catch(u){OsfMsAjaxFactory.msAjaxDebug.trace("InvokeCompleteCallback._send error:"+u.message)}}};OSF.OUtil.extend(Microsoft.Office.Common.InvokeCompleteCallback,Microsoft.Office.Common.ResponseSender);Microsoft.Office.Common.Invoker=function(n,t,i,r,u,f,e){var s=!0,h=!1,o=this,c=Function._validateParams(arguments,[{name:"methodObject",mayBeNull:h},{name:"paramValue",mayBeNull:s},{name:"invokeCompleteCallback",mayBeNull:h},{name:"eventHandlerProxyList",mayBeNull:s},{name:"conversationId",type:String,mayBeNull:h},{name:"eventName",type:String,mayBeNull:h},{name:"serializerVersion",type:Number,mayBeNull:s,optional:s}]);if(c)throw c;o._methodObject=n;o._param=t;o._invokeCompleteCallback=i;o._eventHandlerProxyList=r;o._conversationId=u;o._eventName=f;o._serializerVersion=e};Microsoft.Office.Common.Invoker.prototype={invoke:function(){var n=this,t,i,u,r,f;try{switch(n._methodObject.getInvokeType()){case Microsoft.Office.Common.InvokeType.async:n._methodObject.getMethod()(n._param,n._invokeCompleteCallback.getSend());break;case Microsoft.Office.Common.InvokeType.sync:t=n._methodObject.getMethod()(n._param);n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.syncRegisterEvent:i=n._createEventHandlerProxyObject(n._invokeCompleteCallback);t=n._methodObject.getMethod()(i.getSend(),n._param);n._eventHandlerProxyList[n._conversationId+n._eventName]=i.getSend();n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.syncUnregisterEvent:u=n._eventHandlerProxyList[n._conversationId+n._eventName];t=n._methodObject.getMethod()(u,n._param);delete n._eventHandlerProxyList[n._conversationId+n._eventName];n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.asyncRegisterEvent:r=n._createEventHandlerProxyObject(n._invokeCompleteCallback);n._methodObject.getMethod()(r.getSend(),n._invokeCompleteCallback.getSend(),n._param);n._eventHandlerProxyList[n._callerId+n._eventName]=r.getSend();break;case Microsoft.Office.Common.InvokeType.asyncUnregisterEvent:f=n._eventHandlerProxyList[n._callerId+n._eventName];n._methodObject.getMethod()(f,n._invokeCompleteCallback.getSend(),n._param);delete n._eventHandlerProxyList[n._callerId+n._eventName]}}catch(e){n._invokeCompleteCallback.setResultCode(Microsoft.Office.Common.InvokeResultCode.errorInResponse);n._invokeCompleteCallback.getSend()(e)}},getInvokeBlockingFlag:function(){return this._methodObject.getBlockingFlag()},_createEventHandlerProxyObject:function(n){return new Microsoft.Office.Common.ResponseSender(n.getRequesterWindow(),n.getRequesterUrl(),n.getActionName(),n.getConversationId(),n.getCorrelationId(),Microsoft.Office.Common.ResponseType.forEventing,this._serializerVersion)}};OSF.OUtil.setNamespace("WAC",OSF.DDA);OSF.DDA.WAC.UniqueArguments={Data:"Data",Properties:"Properties",BindingRequest:"DdaBindingsMethod",BindingResponse:"Bindings",SingleBindingResponse:"singleBindingResponse",GetData:"DdaGetBindingData",AddRowsColumns:"DdaAddRowsColumns",SetData:"DdaSetBindingData",ClearFormats:"DdaClearBindingFormats",SetFormats:"DdaSetBindingFormats",SettingsRequest:"DdaSettingsMethod",BindingEventSource:"ddaBinding",ArrayData:"ArrayData"};OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC);OSF.DDA.WAC.Delegate.SpecialProcessor=function(){var n=[OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,OSF.DDA.WAC.UniqueArguments.BindingRequest,OSF.DDA.WAC.UniqueArguments.BindingResponse,OSF.DDA.WAC.UniqueArguments.GetData,OSF.DDA.WAC.UniqueArguments.AddRowsColumns,OSF.DDA.WAC.UniqueArguments.SetData,OSF.DDA.WAC.UniqueArguments.ClearFormats,OSF.DDA.WAC.UniqueArguments.SetFormats,OSF.DDA.WAC.UniqueArguments.SettingsRequest,OSF.DDA.WAC.UniqueArguments.BindingEventSource],t={};OSF.DDA.WAC.Delegate.SpecialProcessor.uber.constructor.call(this,n,t)};OSF.OUtil.extend(OSF.DDA.WAC.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.WAC.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.WAC.Delegate.SpecialProcessor,[]);OSF.OUtil.setNamespace("WAC",OSF.DDA);OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC);OSF.DDA.WAC.getDelegateMethods=function(){var n={};return n[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.WAC.Delegate.executeAsync,n[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.WAC.Delegate.registerEventAsync,n[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.WAC.Delegate.unregisterEventAsync,n[OSF.DDA.DispIdHost.Delegates.OpenDialog]=OSF.DDA.WAC.Delegate.openDialog,n[OSF.DDA.DispIdHost.Delegates.MessageParent]=OSF.DDA.WAC.Delegate.messageParent,n[OSF.DDA.DispIdHost.Delegates.SendMessage]=OSF.DDA.WAC.Delegate.sendMessage,n[OSF.DDA.DispIdHost.Delegates.CloseDialog]=OSF.DDA.WAC.Delegate.closeDialog,n};OSF.DDA.WAC.Delegate.version=1;OSF.DDA.WAC.Delegate.executeAsync=function(n){n.hostCallArgs||(n.hostCallArgs={});n.hostCallArgs.DdaMethod={ControlId:OSF._OfficeAppFactory.getId(),Version:OSF.DDA.WAC.Delegate.version,DispatchId:n.dispId};n.hostCallArgs.__timeout__=-1;n.onCalling&&n.onCalling();var t=(new Date).getTime();OSF.getClientEndPoint().invoke("executeMethod",function(i,r){n.onReceiving&&n.onReceiving();var u;if(i==Microsoft.Office.Common.InvokeResultCode.noError)OSF.DDA.WAC.Delegate.version=r.Version,u=r.Error;else switch(i){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:u=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:u=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}n.onComplete&&n.onComplete(u,r);OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs((new Date).getTime()-t),u)},n.hostCallArgs)};OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent=function(n,t){var i=(new Date).getTime();return function(r,u){t.onReceiving&&t.onReceiving();var f;if(r!=Microsoft.Office.Common.InvokeResultCode.noError)switch(r){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:f=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:f=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}else f=u?u.Error?u.Error:OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess:OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;t.onComplete&&t.onComplete(f);OSF.AppTelemetry&&OSF.AppTelemetry.onRegisterDone(n,t.dispId,Math.abs((new Date).getTime()-i),f)}};OSF.DDA.WAC.Delegate.registerEventAsync=function(n){n.onCalling&&n.onCalling();OSF.getClientEndPoint().registerForEvent(OSF.DDA.getXdmEventName(n.targetId,n.eventType),function(t){n.onEvent&&n.onEvent(t);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!0,n),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:n.dispId,targetId:n.targetId})};OSF.DDA.WAC.Delegate.unregisterEventAsync=function(n){n.onCalling&&n.onCalling();OSF.getClientEndPoint().unregisterForEvent(OSF.DDA.getXdmEventName(n.targetId,n.eventType),OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!1,n),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:n.dispId,targetId:n.targetId})};OSF.OUtil.setNamespace("WebApp",OSF);OSF.WebApp.AddHostInfoAndXdmInfo=function(n){return OSF._OfficeAppFactory.getWindowLocationSearch&&OSF._OfficeAppFactory.getWindowLocationHash?n+OSF._OfficeAppFactory.getWindowLocationSearch()+OSF._OfficeAppFactory.getWindowLocationHash():n};OSF.WebApp._UpdateLinksForHostAndXdmInfo=function(){for(var r,i,t=document.querySelectorAll("a[data-officejs-navigate]"),n=0;n0?n.substr(0,i):null,r=t!==null?t.toLowerCase()==="http"||t.toLowerCase()==="https":!0;return r&&n!="#"&&n!="/"&&n!=""&&n!=OSF._OfficeAppFactory.getWebAppState().webAppUrl};OSF.InitializationHelper=function(n,t,i,r,u){var f=this,e;f._hostInfo=n;f._webAppState=t;f._context=i;f._settings=r;f._hostFacade=u;f._appContext={};f._tabbableElements="a[href]:not([tabindex='-1']),area[href]:not([tabindex='-1']),button:not([disabled]):not([tabindex='-1']),input:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),textarea:not([disabled]):not([tabindex='-1']),*[tabindex]:not([tabindex='-1']),*[contenteditable]:not([disabled]):not([tabindex='-1'])";f._initializeSettings=function(n,t){var r=n.get_settings(),u=OSF.OUtil.getSessionStorage(),i,f;return u&&(i=u.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey()),i?r=JSON.parse(i):(i=JSON.stringify(r),u.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),i))),f=OSF.DDA.SettingsManager.deserializeSettings(r),t?new OSF.DDA.RefreshableSettings(f):new OSF.DDA.Settings(f)};e=function(n){var t=window.open;n.open=function(n,i,r){var u=null,f;try{u=t(n,i,r)}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppCommonMessage("Exception happens at windowOpen."+e)}return u||(f={strUrl:n,strWindowName:i,strWindowFeatures:r},OSF._OfficeAppFactory.getClientEndPoint()&&OSF._OfficeAppFactory.getClientEndPoint().invoke("ContextActivationManager_openWindowInHost",null,f)),u}};e(window)};OSF.InitializationHelper.prototype.saveAndSetDialogInfo=function(n){var u="IsDialog",t=!0,f=function(){var n=OSF.OUtil.parseXdmInfo(t),i;return n?(i=n.split("|"),i[1]):null},i=OSF.OUtil.getSessionStorage(),r;if(i){if(n||(n=OSF.OUtil.parseHostInfoFromWindowName(t,OSF._OfficeAppFactory.getWindowName())),n&&n.indexOf("isDialog")>-1){r=f();r!=null&&i.setItem(r+u,"true");this._hostInfo.isDialog=t;return}this._hostInfo.isDialog=i.getItem(OSF.OUtil.getXdmFieldValue(OSF.XdmFieldName.AppId,!1)+u)!=null?t:!1}};OSF.InitializationHelper.prototype.getAppContext=function(n,t){var i=this,e=i,r=function(n,i){var u,f,c,o,s,r,h;if(i._appName===OSF.AppName.ExcelWebApp){f=i._settings;u={};for(c in f)o=f[c],u[o[0]]=o[1]}else u=i._settings;if(n===0&&i._id!=undefined&&i._appName!=undefined&&i._appVersion!=undefined&&i._appUILocale!=undefined&&i._dataLocale!=undefined&&i._docUrl!=undefined&&i._clientMode!=undefined&&i._settings!=undefined&&i._reason!=undefined){e._appContext=i;var a=i._appInstanceId?i._appInstanceId:i._id,v=!1,y=!0,l=0;i._appMinorVersion!=undefined&&(l=i._appMinorVersion);s=undefined;i._requirementMatrix!=undefined&&(s=i._requirementMatrix);i.eToken=i.eToken?i.eToken:"";r=new OSF.OfficeAppContext(i._id,i._appName,i._appVersion,i._appUILocale,i._dataLocale,i._docUrl,i._clientMode,u,i._reason,i._osfControlType,i._eToken,i._correlationId,a,v,y,l,s,i._hostCustomMessage,i._hostFullVersion,i._clientWindowHeight,i._clientWindowWidth,i._addinName,i._appDomains,i._dialogRequirementMatrix);r._wacHostEnvironment=i._wacHostEnvironment||"0";r._isFromWacAutomation=!!i._isFromWacAutomation;OSF.AppTelemetry&&OSF.AppTelemetry.initialize(r);t(r)}else{h="Function ContextActivationManager_getAppContextAsync call failed. ErrorCode is "+n+", exception: "+i;OSF.AppTelemetry&&OSF.AppTelemetry.logAppException(h);throw h;}},u;try{i._hostInfo.isDialog&&window.opener!=null?(u=OfficeExt.WACUtils.parseAppContextFromWindowName(!1,OSF._OfficeAppFactory.getWindowName()),r(0,u)):i._webAppState.clientEndPoint.invoke("ContextActivationManager_getAppContextAsync",r,i._webAppState.id)}catch(f){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown when trying to invoke getAppContextAsync. Exception:["+f+"]");throw f;}};OSF.InitializationHelper.prototype.setAgaveHostCommunication=function(){var u=null,t=!1,n,r,i,f,e,o;try{if(n=this,r=OSF.OUtil.parseXdmInfoWithGivenFragment(t,OSF._OfficeAppFactory.getWindowLocationHash()),!r&&OSF._OfficeAppFactory.getWindowName&&(r=OSF.OUtil.parseXdmInfoFromWindowName(t,OSF._OfficeAppFactory.getWindowName())),r&&(i=OSF.OUtil.getInfoItems(r),i!=undefined&&i.length>=3&&(n._webAppState.conversationID=i[0],n._webAppState.id=i[1],n._webAppState.webAppUrl=i[2].indexOf(":")>=0?i[2]:decodeURIComponent(i[2]))),n._webAppState.wnd=window.opener!=u?window.opener:window.parent,f=OSF.OUtil.parseSerializerVersionWithGivenFragment(t,OSF._OfficeAppFactory.getWindowLocationHash()),isNaN(f)&&OSF._OfficeAppFactory.getWindowName&&(f=OSF.OUtil.parseSerializerVersionFromWindowName(t,OSF._OfficeAppFactory.getWindowName())),n._webAppState.serializerVersion=f,this._hostInfo.isDialog&&window.opener!=u)return;n._webAppState.clientEndPoint=Microsoft.Office.Common.XdmCommunicationManager.connect(n._webAppState.conversationID,n._webAppState.wnd,n._webAppState.webAppUrl,n._webAppState.serializerVersion);n._webAppState.serviceEndPoint=Microsoft.Office.Common.XdmCommunicationManager.createServiceEndPoint(n._webAppState.id);e=n._webAppState.conversationID+OSF.SharedConstants.NotificationConversationIdSuffix;n._webAppState.serviceEndPoint.registerConversation(e,n._webAppState.webAppUrl);o=function(i){var e="ContextActivationManager_notifyHost",r,f;switch(i){case OSF.AgaveHostAction.Select:n._webAppState.focused=!0;break;case OSF.AgaveHostAction.UnSelect:n._webAppState.focused=t;break;case OSF.AgaveHostAction.TabIn:case OSF.AgaveHostAction.CtrlF6In:window.focus();r=document.querySelectorAll(n._tabbableElements);f=OSF.OUtil.focusToFirstTabbable(r,t);f||(window.blur(),n._webAppState.focused=t,n._webAppState.clientEndPoint.invoke(e,u,[n._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable]));break;case OSF.AgaveHostAction.TabInShift:window.focus();r=document.querySelectorAll(n._tabbableElements);f=OSF.OUtil.focusToFirstTabbable(r,!0);f||(window.blur(),n._webAppState.focused=t,n._webAppState.clientEndPoint.invoke(e,u,[n._webAppState.id,OSF.AgaveHostAction.ExitNoFocusableShift]));break;default:OsfMsAjaxFactory.msAjaxDebug.trace("actionId "+i+" notifyAgave is wrong.")}};n._webAppState.serviceEndPoint.registerMethod("Office_notifyAgave",o,Microsoft.Office.Common.InvokeType.async,t);n.addOrRemoveEventListenersForWindow(!0)}catch(s){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown in setAgaveHostCommunication. Exception:["+s+"]");throw s;}};OSF.InitializationHelper.prototype.addOrRemoveEventListenersForWindow=function(n){var u="keypress",i=null,r="ContextActivationManager_notifyHost",t=this,f=function(){t._webAppState.focused||(t._webAppState.focused=!0);t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.Select])},e=function(){OSF&&(t._webAppState.focused&&(t._webAppState.focused=!1),t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.UnSelect]))},o=function(n){var u,f,e;n.preventDefault=n.preventDefault||function(){n.returnValue=!1};n.keyCode==117&&(n.ctrlKey||n.metaKey)?(u=OSF.AgaveHostAction.CtrlF6Exit,n.shiftKey&&(u=OSF.AgaveHostAction.CtrlF6ExitShift),t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,u])):n.keyCode==9?(n.preventDefault(),f=document.querySelectorAll(t._tabbableElements),e=OSF.OUtil.focusToNextTabbable(f,n.target||n.srcElement,n.shiftKey),e||(t._hostInfo.isDialog?OSF.OUtil.focusToFirstTabbable(f,n.shiftKey):n.shiftKey?t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.TabExitShift]):t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.TabExit]))):n.keyCode==27?(n.preventDefault(),t.dismissDialogNotification&&t.dismissDialogNotification(),t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.EscExit])):n.keyCode==113&&(n.preventDefault(),t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.F2Exit]))},s=function(n){n.keyCode==117&&n.ctrlKey&&(n.preventDefault?n.preventDefault():n.returnValue=!1)};n?(OSF.OUtil.addEventListener(window,"focus",f),OSF.OUtil.addEventListener(window,"blur",e),OSF.OUtil.addEventListener(window,"keydown",o),OSF.OUtil.addEventListener(window,u,s)):(OSF.OUtil.removeEventListener(window,"focus",f),OSF.OUtil.removeEventListener(window,"blur",e),OSF.OUtil.removeEventListener(window,"keydown",o),OSF.OUtil.removeEventListener(window,u,s))};OSF.InitializationHelper.prototype.initWebDialog=function(n){if(n.get_isDialog()){if(OSF.DDA.UI.ChildUI){var t=window.opener!=null;n.ui=new OSF.DDA.UI.ChildUI(t);t&&this.registerMessageReceivedEventForWindowDialog&&this.registerMessageReceivedEventForWindowDialog()}}else OSF.DDA.UI.ParentUI&&(n.ui=new OSF.DDA.UI.ParentUI,OfficeExt.Container&&OSF.DDA.DispIdHost.addAsyncMethods(n.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync]))};OSF.InitializationHelper.prototype.initWebAuth=function(n){OSF.DDA.Auth&&(n.auth=new OSF.DDA.Auth,OSF.DDA.DispIdHost.addAsyncMethods(n.auth,[OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]))};OSF.getClientEndPoint=function(){var n=OSF._OfficeAppFactory.getInitializationHelper();return n._webAppState.clientEndPoint};OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize=function(){var n=this,t,i;n._hostInfo.isDialog&&(window.focus(),t=document.querySelectorAll(n._tabbableElements),i=OSF.OUtil.focusToFirstTabbable(t,!1),i||(window.blur(),n._webAppState.focused=!1,n._webAppState.clientEndPoint&&n._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[n._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable])))};OSF.CommonUI={HostButtonBorderColor:"#86bfa0",HostButtonBackgroundColor:"#d3f0e0"},function(n){var u="ResponseTime",f="Message",i="SessionId",r="CorrelationId",t=!0,e=function(){function n(n){this._table=n;this._fields={}}return Object.defineProperty(n.prototype,"Fields",{get:function(){return this._fields},enumerable:t,configurable:t}),Object.defineProperty(n.prototype,"Table",{get:function(){return this._table},enumerable:t,configurable:t}),n.prototype.SerializeFields=function(){},n.prototype.SetSerializedField=function(n,t){typeof t!="undefined"&&t!==null&&(this._serializedFields[n]=t.toString())},n.prototype.SerializeRow=function(){var n=this;return n._serializedFields={},n.SetSerializedField("Table",n._table),n.SerializeFields(),JSON.stringify(n._serializedFields)},n}(),o,s,h,c,l;n.BaseUsageData=e;o=function(n){function u(){n.call(this,"AppActivated")}var e="IsFromWacAutomation",o="WacHostEnvironment",s="HostJSVersion",h="OfficeJSVersion",c="DocUrl",l="AppSizeHeight",a="AppSizeWidth",v="ClientId",y="HostVersion",p="Host",w="UserId",b="Browser",k="AssetId",d="AppURL",g="AppInstanceId",nt="AppId";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,nt,{get:function(){return this.Fields[nt]},set:function(n){this.Fields[nt]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,g,{get:function(){return this.Fields[g]},set:function(n){this.Fields[g]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,d,{get:function(){return this.Fields[d]},set:function(n){this.Fields[d]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,k,{get:function(){return this.Fields[k]},set:function(n){this.Fields[k]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,b,{get:function(){return this.Fields[b]},set:function(n){this.Fields[b]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,w,{get:function(){return this.Fields[w]},set:function(n){this.Fields[w]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,p,{get:function(){return this.Fields[p]},set:function(n){this.Fields[p]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,y,{get:function(){return this.Fields[y]},set:function(n){this.Fields[y]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,v,{get:function(){return this.Fields[v]},set:function(n){this.Fields[v]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,a,{get:function(){return this.Fields[a]},set:function(n){this.Fields[a]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,l,{get:function(){return this.Fields[l]},set:function(n){this.Fields[l]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,c,{get:function(){return this.Fields[c]},set:function(n){this.Fields[c]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(nt,n.AppId);n.SetSerializedField(g,n.AppInstanceId);n.SetSerializedField(d,n.AppURL);n.SetSerializedField(k,n.AssetId);n.SetSerializedField(b,n.Browser);n.SetSerializedField(w,n.UserId);n.SetSerializedField(p,n.Host);n.SetSerializedField(y,n.HostVersion);n.SetSerializedField(v,n.ClientId);n.SetSerializedField(a,n.AppSizeWidth);n.SetSerializedField(l,n.AppSizeHeight);n.SetSerializedField(f,n.Message);n.SetSerializedField(c,n.DocUrl);n.SetSerializedField(h,n.OfficeJSVersion);n.SetSerializedField(s,n.HostJSVersion);n.SetSerializedField(o,n.WacHostEnvironment);n.SetSerializedField(e,n.IsFromWacAutomation)},u}(e);n.AppActivatedUsageData=o;s=function(n){function f(){n.call(this,"ScriptLoad")}var e="StartTime",o="ScriptId";return __extends(f,n),Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t}),f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(o,n.ScriptId);n.SetSerializedField(e,n.StartTime);n.SetSerializedField(u,n.ResponseTime)},f}(e);n.ScriptLoadUsageData=s;h=function(n){function u(){n.call(this,"AppClosed")}var f="CloseMethod",e="OpenTime",o="AppSizeFinalHeight",s="AppSizeFinalWidth",h="FocusTime";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(h,n.FocusTime);n.SetSerializedField(s,n.AppSizeFinalWidth);n.SetSerializedField(o,n.AppSizeFinalHeight);n.SetSerializedField(e,n.OpenTime);n.SetSerializedField(f,n.CloseMethod)},u}(e);n.AppClosedUsageData=h;c=function(n){function f(){n.call(this,"APIUsage")}var e="ErrorType",o="Parameters",s="APIID",h="APIType";return __extends(f,n),Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(h,n.APIType);n.SetSerializedField(s,n.APIID);n.SetSerializedField(o,n.Parameters);n.SetSerializedField(u,n.ResponseTime);n.SetSerializedField(e,n.ErrorType)},f}(e);n.APIUsageUsageData=c;l=function(n){function u(){n.call(this,"AppInitialization")}var e="SuccessCode";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(e,n.SuccessCode);n.SetSerializedField(f,n.Message)},u}(e);n.AppInitializationUsageData=l}(OSFLog||(OSFLog={})),function(n){"use strict";function u(){OSF.Logger&&OSF.Logger.ulsEndpoint&&OSF.Logger.ulsEndpoint.loadProxyFrame()}function f(n,t,i){if(OSF.Logger&&OSF.Logger.ulsEndpoint){var r={traceLevel:n,message:t,flag:i,internalLog:!0},u=JSON.stringify(r);OSF.Logger.ulsEndpoint.writeLog(u)}}function e(){try{return new t}catch(n){return null}}var i,r,t;(function(n){n[n.info=0]="info";n[n.warning=1]="warning";n[n.error=2]="error"})(n.TraceLevel||(n.TraceLevel={}));i=n.TraceLevel,function(n){n[n.none=0]="none";n[n.flush=1]="flush"}(n.SendFlag||(n.SendFlag={}));r=n.SendFlag;n.allowUploadingData=u;n.sendLog=f;t=function(){function n(){var n=this,t=n;n.proxyFrame=null;n.telemetryEndPoint="https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html";n.buffer=[];n.proxyFrameReady=!1;OSF.OUtil.addEventListener(window,"message",function(n){return t.tellProxyFrameReady(n)});setTimeout(function(){t.loadProxyFrame()},3e3)}return n.prototype.writeLog=function(t){var i=this;i.proxyFrameReady===!0?i.proxyFrame.contentWindow.postMessage(t,n.telemetryOrigin):i.buffer.length<128&&i.buffer.push(t)},n.prototype.loadProxyFrame=function(){var n=this;n.proxyFrame==null&&(n.proxyFrame=document.createElement("iframe"),n.proxyFrame.setAttribute("style","display:none"),n.proxyFrame.setAttribute("src",n.telemetryEndPoint),document.head.appendChild(n.proxyFrame))},n.prototype.tellProxyFrameReady=function(t){var i=this,e=i,r,u,f;if(t.data==="ProxyFrameReadyToLog"){for(i.proxyFrameReady=!0,r=0;r40)&&(n=OSF.OUtil.Guid.generateNewGuid(),t.setValue(t.clientIDKey,n)),n},n.prototype.saveLog=function(n,t){var i=this,u=i.getValue(i.logIdSetKey);u=(u&&u.length>0?u+";":r)+n;i.setValue(i.logIdSetKey,u);i.setValue(n,t)},n.prototype.enumerateLog=function(n,t){var i=this,e=i.getValue(i.logIdSetKey),u,o,r,f;if(e){u=e.split(";");for(o in u)r=u[o],f=i.getValue(r),f&&(n&&n(r,f),t&&i.remove(r));t&&i.remove(i.logIdSetKey)}},n.prototype.getValue=function(n){var t=OSF.OUtil.getLocalStorage(),i=r;return t&&(i=t.getItem(n)),i},n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)},n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}},n}(),o=function(){function n(){}return n.prototype.LogData=function(n){OSF.Logger&&(OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n.SerializeRow(),OSF.Logger.SendFlag.none),OSFAriaLogger.AriaLogger.getInstance().logData(n))},n.prototype.LogRawData=function(n){if(OSF.Logger){OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n,OSF.Logger.SendFlag.none);try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(n))}catch(t){}}},n}();n.initialize=v;n.onAppActivated=y;n.onScriptDone=p;n.onCallDone=w;n.onMethodDone=b;n.onPropertyDone=k;n.onEventDone=d;n.onRegisterDone=g;n.onAppClosed=nt;n.setOsfControlAppCorrelationId=tt;n.doAppInitializationLogging=c;n.logAppCommonMessage=it;n.logAppException=rt;OSF.AppTelemetry=n}(OSFAppTelemetry||(OSFAppTelemetry={}));Microsoft.Office.WebExtension.FileType={Text:"text",Compressed:"compressed",Pdf:"pdf"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FileProperties:"FileProperties",FileSliceProperties:"FileSliceProperties"});OSF.DDA.FileProperties={Handle:"FileHandle",FileSize:"FileSize",SliceSize:Microsoft.Office.WebExtension.Parameters.SliceSize};OSF.DDA.File=function(n,t,i){var r,u;OSF.OUtil.defineEnumerableProperties(this,{size:{value:t},sliceCount:{value:Math.ceil(t/i)}});r={};r[OSF.DDA.FileProperties.Handle]=n;r[OSF.DDA.FileProperties.SliceSize]=i;u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.GetDocumentCopyChunkAsync,u.ReleaseDocumentCopyAsync],r)};OSF.DDA.FileSliceOffset="fileSliceoffset";OSF.DDA.AsyncMethodNames.addNames({GetDocumentCopyAsync:"getFileAsync",GetDocumentCopyChunkAsync:"getSliceAsync",ReleaseDocumentCopyAsync:"closeAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FileType,"enum":Microsoft.Office.WebExtension.FileType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:{types:["number"],defaultValue:4194304}}],checkCallArgs:function(n){var t=n[Microsoft.Office.WebExtension.Parameters.SliceSize];if(t<=0||t>4194304)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return n},onSucceeded:function(n,t,i){return new OSF.DDA.File(n[OSF.DDA.FileProperties.Handle],n[OSF.DDA.FileProperties.FileSize],i[Microsoft.Office.WebExtension.Parameters.SliceSize])}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(n,t){return t[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(r<0||r>=t.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;return n[OSF.DDA.FileSliceOffset]=parseInt((r*i[OSF.DDA.FileProperties.SliceSize]).toString()),n},onSucceeded:function(n,t,i){var r={};return OSF.OUtil.defineEnumerableProperties(r,{data:{value:n[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:i[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:n[OSF.DDA.FileProperties.SliceSize]}}),r}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}}]});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("File",OSF.DDA.Marshaling),function(n){var t="FileSize";n[n.Handle=0]="Handle";n[n[t]=1]=t}(OSF_DDA_Marshaling_File_FilePropertiesKeys||(OSF_DDA_Marshaling_File_FilePropertiesKeys={}));OSF.DDA.Marshaling.File.FilePropertiesKeys=OSF_DDA_Marshaling_File_FilePropertiesKeys,function(n){var t="SliceSize";n[n.Data=0]="Data";n[n[t]=1]=t}(OSF_DDA_Marshaling_File_SlicePropertiesKeys||(OSF_DDA_Marshaling_File_SlicePropertiesKeys={}));OSF.DDA.Marshaling.File.SlicePropertiesKeys=OSF_DDA_Marshaling_File_SlicePropertiesKeys,function(n){var t="Compressed";n[n.Text=0]="Text";n[n[t]=1]=t;n[n.Pdf=2]="Pdf"}(OSF_DDA_Marshaling_File_FileType||(OSF_DDA_Marshaling_File_FileType={}));OSF.DDA.Marshaling.File.FileType=OSF_DDA_Marshaling_File_FileType,function(n){var t="SliceIndex",i="SliceSize",r="FileType";n[n[r]=0]=r;n[n[i]=1]=i;n[n.Handle=2]="Handle";n[n[t]=3]=t}(OSF_DDA_Marshaling_File_ParameterKeys||(OSF_DDA_Marshaling_File_ParameterKeys={}));OSF.DDA.Marshaling.File.ParameterKeys=OSF_DDA_Marshaling_File_ParameterKeys;OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FileProperties);OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FileSliceProperties);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.FilePropertiesKeys.Handle},{name:OSF.DDA.FileProperties.FileSize,value:OSF.DDA.Marshaling.File.FilePropertiesKeys.FileSize}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.Marshaling.File.SlicePropertiesKeys.Data},{name:OSF.DDA.FileProperties.SliceSize,value:OSF.DDA.Marshaling.File.SlicePropertiesKeys.SliceSize}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:OSF.DDA.Marshaling.File.FileType.Text},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:OSF.DDA.Marshaling.File.FileType.Compressed},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:OSF.DDA.Marshaling.File.FileType.Pdf}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:OSF.DDA.Marshaling.File.ParameterKeys.FileType},{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:OSF.DDA.Marshaling.File.ParameterKeys.SliceSize}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.ParameterKeys.Handle},{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,value:OSF.DDA.Marshaling.File.ParameterKeys.SliceIndex}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.ParameterKeys.Handle}]});Microsoft.Office.WebExtension.TableData=function(n,t){function i(n){if(n==null||n==undefined)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(n,2);t<2;t++)n=[n];return n}catch(i){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(n){t=i(n)}},rows:{get:function(){return n},set:function(t){n=t==null||OSF.OUtil.isArray(t)&&t.length==0?[]:i(t)}}});this.headers=t;this.rows=n};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(n){return new Microsoft.Office.WebExtension.TableData(n[OSF.DDA.TableDataProperties.TableRows],n[OSF.DDA.TableDataProperties.TableHeaders])};Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var n=null;return{findArrayDimensionality:function(n){if(OSF.OUtil.isArray(n)){for(var t=0,i=0;i6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix&&(i=new Date(parseInt(t.slice(5,-1))),i)?i:t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,!0);r[i]=t}catch(u){}}return r}};OSF.DDA.Settings=function(n){var t="name",i;n=n||{};i=function(n){var i=OSF.OUtil.getSessionStorage(),t,r;i&&(t=OSF.DDA.SettingsManager.serializeSettings(n),r=JSON?JSON.stringify(t):Sys.Serialization.JavaScriptSerializer.serialize(t),i.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),r))};OSF.OUtil.defineEnumerableProperties(this,{get:{value:function(i){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]),r;if(u)throw u;return r=n[i],typeof r=="undefined"?null:r}},set:{value:function(r,u){var f=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1},{name:"value",mayBeNull:!0}]);if(f)throw f;n[r]=u;i(n)}},remove:{value:function(r){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]);if(u)throw u;delete n[r];i(n)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],n)};OSF.DDA.RefreshableSettings=function(n){OSF.DDA.RefreshableSettings.uber.constructor.call(this,n);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],n);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(n){var i=this,r,t,u;i._eventHandlers={};i._objectEventHandlers={};i._queuedEventsArgs={};for(r in n)t=n[r],u=t=="objectDeleted"||t=="objectSelectionChanged"||t=="objectDataChanged"||t=="contentControlAdded",u?i._objectEventHandlers[t]={}:i._eventHandlers[t]=[],i._queuedEventsArgs[t]=[]};OSF.EventDispatch.prototype={getSupportedEvents:function(){var n=[];for(var t in this._eventHandlers)n.push(t);for(t in this._objectEventHandlers)n.push(t);return n},supportsEvent:function(n){for(var t in this._eventHandlers)if(n==t)return!0;for(t in this._objectEventHandlers)if(n==t)return!0;return!1},hasEventHandler:function(n,t){var i=this._eventHandlers[n],r;if(i&&i.length>0)for(r in i)if(i[r]===t)return!0;return!1},hasObjectEventHandler:function(n,t,i){var f=this._objectEventHandlers[n],r,u;if(f!=null)for(r=f[t],u=0;r!=null&&u0)for(r=0;r0?(this._eventHandlers[n]=[],!0):!1},clearObjectEventHandlers:function(n,t){return this._objectEventHandlers[n]!=null&&this._objectEventHandlers[n][t]!=null?(this._objectEventHandlers[n][t]=[],!0):!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},getObjectEventHandlerCount:function(n,t){return this._objectEventHandlers[n]==null||this._objectEventHandlers[n][t]==null?0:this._objectEventHandlers[n][t].length},fireEvent:function(n){var t,i,r;if(n.type==undefined)return!1;if(t=n.type,t&&this._eventHandlers[t]){i=this._eventHandlers[t];for(r in i)i[r](n);return!0}else return!1},fireObjectEvent:function(n,t){var i,f,r,u;if(t.type==undefined)return!1;if(i=t.type,i&&this._objectEventHandlers[i]&&(f=this._objectEventHandlers[i],r=f[n],r!=null)){for(u=0;u0)){for(r=t[0];i.length>0;)u=i.shift(),r(u);return!0}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var f="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(n,i[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]=="outlook"||OSF._OfficeAppFactory.getHostInfo()[f]=="outlookwebapp")r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i),t.initialize(r.initialData),t.setCurrentItemNumber(r.itemNumber.itemNumber);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:n}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(n,t){return t}}],onSucceeded:function(n,t,i){var f=n[OSF.DDA.SettingsManager.SerializedSettings],u=OSF.DDA.SettingsManager.deserializeSettings(f),e=i[OSF.DDA.SettingsManager.RefreshingSettings];for(var r in e)t.remove(r);for(r in u)t.set(r,u[r]);return t}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(n,t){return OSF.DDA.SettingsManager.serializeSettings(t)}}]});OSF.DDA.WAC.SettingsTranslator=function(){var n=0,t=1;return{read:function(i){var u={},f=i.Settings,e,r;for(e in f)r=f[e],u[r[n]]=r[t];return u},write:function(i){var f=[],u,r;for(u in i)r=[],r[n]=u,r[t]=i[u],f.push(r);return f}}}();OSF.DDA.WAC.Delegate.ParameterMap.setDynamicType(OSF.DDA.SettingsManager.SerializedSettings,{toHost:OSF.DDA.WAC.SettingsTranslator.write,fromHost:OSF.DDA.WAC.SettingsTranslator.read});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.SettingsRequest,toHost:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:"OverwriteIfStale"},{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.WAC.UniqueArguments.Properties}],invertible:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.WAC.UniqueArguments.Properties}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SettingsRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});Microsoft.Office.WebExtension.BindingType={Table:"table",Text:"text",Matrix:"matrix"};OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType};OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{BindingList:"BindingList"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{Subset:"subset",BindingProperties:"BindingProperties"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList,OSF.DDA.PropertyDescriptors.BindingProperties);OSF.DDA.BindingPromise=function(n,t){this._id=n;OSF.OUtil.defineEnumerableProperty(this,"onFail",{get:function(){return t},set:function(n){var i=typeof n;if(i!="undefined"&&i!="function")throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,i);t=n}})};OSF.DDA.BindingPromise.prototype={_fetch:function(n){var t=this,i;return t.binding?n&&n(t.binding):t._binding||(i=t,Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(t._id,function(t){t.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded?(OSF.OUtil.defineEnumerableProperty(i,"binding",{value:t.value}),n&&n(i.binding)):i.onFail&&i.onFail(t)})),t},getDataAsync:function(){var n=arguments;return this._fetch(function(t){t.getDataAsync.apply(t,n)}),this},setDataAsync:function(){var n=arguments;return this._fetch(function(t){t.setDataAsync.apply(t,n)}),this},addHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.addHandlerAsync.apply(t,n)}),this},removeHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.removeHandlerAsync.apply(t,n)}),this}};OSF.DDA.BindingFacade=function(n){this._eventDispatches=[];OSF.OUtil.defineEnumerableProperty(this,"document",{value:n});var t=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[t.AddFromSelectionAsync,t.AddFromNamedItemAsync,t.GetAllAsync,t.GetByIdAsync,t.ReleaseByIdAsync])};OSF.DDA.UnknownBinding=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}})};OSF.DDA.Binding=function(n,t){var r,u,i,f;OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}});r=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[r.GetDataAsync,r.SetDataAsync]);u=Microsoft.Office.WebExtension.EventType;i=t.bindings._eventDispatches;i[n]||(i[n]=new OSF.EventDispatch([u.BindingSelectionChanged,u.BindingDataChanged]));f=i[n];OSF.DDA.DispIdHost.addEventSupport(this,f)};OSF.DDA.generateBindingId=function(){return"UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+(new Date).getTime()};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureBinding=function(n,t){var r=n[OSF.DDA.BindingProperties.Id],u=n[OSF.DDA.BindingProperties.RowCount],f=n[OSF.DDA.BindingProperties.ColumnCount],s=n[OSF.DDA.BindingProperties.HasHeaders],i,e,o;switch(n[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:i=new OSF.DDA.TextBinding(r,t);break;case Microsoft.Office.WebExtension.BindingType.Matrix:i=new OSF.DDA.MatrixBinding(r,t,u,f);break;case Microsoft.Office.WebExtension.BindingType.Table:e=function(){return OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument};o=e()&&OSF.DDA.ExcelTableBinding?OSF.DDA.ExcelTableBinding:OSF.DDA.TableBinding;i=new o(r,t,u,f,s);break;default:i=new OSF.DDA.UnknownBinding(r,t)}return i};OSF.DDA.AsyncMethodNames.addNames({AddFromSelectionAsync:"addFromSelectionAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:"getByIdAsync",ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync"}),function(){function u(n){return OSF.DDA.OMFactory.manufactureBinding(n,Microsoft.Office.WebExtension.context.document)}function f(n){return n.id}function e(n,t,i){var u=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&u&&(u[OSF.DDA.TableDataProperties.TableRows]!=undefined||u[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(u=OSF.DDA.OMFactory.manufactureTableData(u)),u=OSF.DDA.DataCoercion.coerceData(u,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),u==undefined?r:u}var t="number",i="object",n="string",r=null;OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:[n]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return!0}}],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.BindingList],u)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n,t,i){var r=i[Microsoft.Office.WebExtension.Parameters.Id];delete t._eventDispatches[r]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n,t){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&n[Microsoft.Office.WebExtension.Parameters.RowCount]==0&&n[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn],delete n[Microsoft.Office.WebExtension.Parameters.RowCount],delete n[Microsoft.Office.WebExtension.Parameters.ColumnCount]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]||n[Microsoft.Office.WebExtension.Parameters.RowCount]||n[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[n,i,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}]})}();OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{TableDataProperties:"TableDataProperties"});OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};OSF.DDA.TableBinding=function(n,t,i,r,u){OSF.DDA.TableBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:i?i:0},columnCount:{value:r?r:0},hasHeaders:{value:u?u:!1}});var f=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[f.AddRowsAsync,f.AddColumnsAsync,f.DeleteAllDataValuesAsync])};OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync"}),function(){function n(n){return n.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]})}();OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.BindingProperties);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.BindingRequest,toHost:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,value:"ItemName"},{name:Microsoft.Office.WebExtension.Parameters.Id,value:"BindingId"},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:"BindingType"},{name:Microsoft.Office.WebExtension.Parameters.PromptText,value:"PromptText"},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:"Columns"},{name:Microsoft.Office.WebExtension.Parameters.SampleData,value:"SampleData"},{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:"FailOnCollision"}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.BindingType,toHost:[{name:Microsoft.Office.WebExtension.BindingType.Text,value:2},{name:Microsoft.Office.WebExtension.BindingType.Matrix,value:3},{name:Microsoft.Office.WebExtension.BindingType.Table,value:1}],invertible:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.BindingProperties,fromHost:[{name:OSF.DDA.BindingProperties.Id,value:"Name"},{name:OSF.DDA.BindingProperties.Type,value:"BindingType"},{name:OSF.DDA.BindingProperties.RowCount,value:"RowCount"},{name:OSF.DDA.BindingProperties.ColumnCount,value:"ColCount"},{name:OSF.DDA.BindingProperties.HasHeaders,value:"HasHeaders"}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:0}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod,fromHost:[{name:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod,fromHost:[{name:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseBindingMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingMethod,fromHost:[{name:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAllBindingsMethod,fromHost:[{name:OSF.DDA.ListDescriptors.BindingList,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.GetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddRowsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.AddRowsColumns,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddColumnsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.AddRowsColumns,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearAllRowsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.AddRowsColumns,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:"BindingId"},{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.Subset,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:"StartRow"},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:"StartCol"},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:"RowCount"},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:"ColCount"}]});OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.MatrixBinding=function(n,t,i,r){OSF.DDA.MatrixBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Matrix},rowCount:{value:i?i:0},columnCount:{value:r?r:0}})};OSF.OUtil.extend(OSF.DDA.MatrixBinding,OSF.DDA.Binding);OSF.DDA.TextBinding=function(n,t){OSF.DDA.TextBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperty(this,"type",{value:Microsoft.Office.WebExtension.BindingType.Text})};OSF.OUtil.extend(OSF.DDA.TextBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddFromPromptAsync:"addFromPromptAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromPromptAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:["string"],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.PromptText,value:{types:["string"],calculate:function(){return Strings.OfficeOM.L_AddBindingFromPromptDefaultText}}},{name:Microsoft.Office.WebExtension.Parameters.SampleData,value:{types:["object"],defaultValue:null}}],privateStateCallbacks:[],onSucceeded:function(n){return OSF.DDA.OMFactory.manufactureBinding(n,Microsoft.Office.WebExtension.context.document)}});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromPromptMethod,fromHost:[{name:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"});OSF.DDA.DocumentSelectionChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:n}})};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDeleted:"objectDeleted"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectSelectionChanged:"objectSelectionChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDataChanged:"objectDataChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ContentControlAdded:"contentControlAdded"});OSF.DDA.ObjectEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:n},object:{value:t}})};OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{BindingSelectionChanged:"bindingSelectionChanged",BindingDataChanged:"bindingDataChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{BindingSelectionChangedEvent:"BindingSelectionChangedEvent"});OSF.DDA.BindingSelectionChangedEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingSelectionChanged},binding:{value:n}});for(var i in t)OSF.OUtil.defineEnumerableProperty(this,i,{value:t[i]})};OSF.DDA.BindingDataChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingDataChanged},binding:{value:n}})};OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.BindingSelectionChangedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.WAC.UniqueArguments.BindingEventSource},{name:OSF.DDA.PropertyDescriptors.Subset,value:OSF.DDA.PropertyDescriptors.Subset}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingDataChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.WAC.UniqueArguments.BindingEventSource}]});OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(n){OSF.OUtil.defineEnumerableProperties(this,{url:{value:n[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(n){return new Microsoft.Office.WebExtension.FileProperties(n)}});OSF.OUtil.setNamespace("Marshaling",OSF.DDA),function(n){var t="Properties";n[n[t]=0]=t;n[n.Url=1]="Url"}(OSF_DDA_Marshaling_FilePropertiesKeys||(OSF_DDA_Marshaling_FilePropertiesKeys={}));OSF.DDA.Marshaling.FilePropertiesKeys=OSF_DDA_Marshaling_FilePropertiesKeys;OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,fromHost:[{name:OSF.DDA.FilePropertiesDescriptor.Url,value:OSF.DDA.Marshaling.FilePropertiesKeys.Url}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:OSF.DDA.Marshaling.FilePropertiesKeys.Properties}]});Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"};Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"};Microsoft.Office.WebExtension.Index={First:"first",Last:"last",Next:"next",Previous:"previous"};OSF.DDA.AsyncMethodNames.addNames({GoToByIdAsync:"goToByIdAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GoToByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string","number"]},{name:Microsoft.Office.WebExtension.Parameters.GoToType,"enum":Microsoft.Office.WebExtension.GoToType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:{"enum":Microsoft.Office.WebExtension.SelectionMode,defaultValue:Microsoft.Office.WebExtension.SelectionMode.Default}}]});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.DDA.Marshaling.NavigationKeys={NavigationRequest:"DdaGoToByIdMethod",Id:"Id",GoToType:"GoToType",SelectionMode:"SelectionMode"},function(n){var t="NamedItem";n[n.Binding=0]="Binding";n[n[t]=1]=t;n[n.Slide=2]="Slide";n[n.Index=3]="Index"}(OSF_DDA_Marshaling_GoToType||(OSF_DDA_Marshaling_GoToType={}));OSF.DDA.Marshaling.GoToType=OSF_DDA_Marshaling_GoToType,function(n){var t="Selected";n[n.Default=0]="Default";n[n[t]=1]=t;n[n.None=2]="None"}(OSF_DDA_Marshaling_SelectionMode||(OSF_DDA_Marshaling_SelectionMode={}));OSF.DDA.Marshaling.SelectionMode=OSF_DDA_Marshaling_SelectionMode;OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.Marshaling.NavigationKeys.NavigationRequest);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.Marshaling.NavigationKeys.NavigationRequest,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.NavigationKeys.Id},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:OSF.DDA.Marshaling.NavigationKeys.GoToType},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:OSF.DDA.Marshaling.NavigationKeys.SelectionMode}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:OSF.DDA.Marshaling.GoToType.Binding},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:OSF.DDA.Marshaling.GoToType.NamedItem},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:OSF.DDA.Marshaling.GoToType.Slide},{name:Microsoft.Office.WebExtension.GoToType.Index,value:OSF.DDA.Marshaling.GoToType.Index}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:OSF.DDA.Marshaling.SelectionMode.Default},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:OSF.DDA.Marshaling.SelectionMode.Selected},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:OSF.DDA.Marshaling.SelectionMode.None}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:OSF.DDA.Marshaling.NavigationKeys.NavigationRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.ExcelTableBinding=function(n,t,i,r,u){var f=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[f.ClearFormatsAsync,f.SetTableOptionsAsync,f.SetFormatsAsync]);OSF.DDA.ExcelTableBinding.uber.constructor.call(this,n,t,i,r,u);OSF.OUtil.finalizeProperties(this)};OSF.OUtil.extend(OSF.DDA.ExcelTableBinding,OSF.DDA.TableBinding),function(){var t="number",n="object",i="string";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[i,n,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:[n],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:[n],defaultValue:[]}}],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[i,n,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[n,i],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[n],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:[n],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:[n],defaultValue:[]}}],checkCallArgs:function(n,t){var i=Microsoft.Office.WebExtension.Parameters;if(n[i.StartRow]==0&&n[i.StartColumn]==0&&OSF.OUtil.isArray(n[i.CellFormat])&&n[i.CellFormat].length===0&&OSF.OUtil.isArray(n[i.TableOptions])&&n[i.TableOptions].length===0&&(delete n[i.StartRow],delete n[i.StartColumn],delete n[i.CellFormat],delete n[i.TableOptions]),n[i.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[i.StartRow]&&n[i.StartRow]!=0||n[i.StartColumn]&&n[i.StartColumn]!=0||n[i.CellFormat]||n[i.TableOptions]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:function(n){return n.id}}]});OSF.DDA.BindingPromise.prototype.setTableOptionsAsync=function(){var n=arguments;return this._fetch(function(t){t.setTableOptionsAsync.apply(t,n)}),this};OSF.DDA.BindingPromise.prototype.setFormatsAsync=function(){var n=arguments;return this._fetch(function(t){t.setFormatsAsync.apply(t,n)}),this};OSF.DDA.BindingPromise.prototype.clearFormatsAsync=function(){var n=arguments;return this._fetch(function(t){t.clearFormatsAsync.apply(t,n)}),this}}(),function(){function n(n){return n.id}OSF.DDA.AsyncMethodNames.addNames({ClearFormatsAsync:"clearFormatsAsync",SetTableOptionsAsync:"setTableOptionsAsync",SetFormatsAsync:"setFormatsAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ClearFormatsAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetTableOptionsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TableOptions,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetFormatsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CellFormat,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]})}();OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.DDA.Marshaling.FormatKeys={Id:"BindingId",CellFormat:"CellFormat",TableOptions:"TableOptions"},function(n){var t="totalRow",i="filterButton",r="bandedColumns",u="lastColumn",f="firstColumn",e="bandedRows",o="headerRow";n[n[o]=0]=o;n[n[e]=1]=e;n[n[f]=2]=f;n[n[u]=3]=u;n[n[r]=4]=r;n[n[i]=5]=i;n[n.style=6]="style";n[n[t]=7]=t}(OSF_DDA_Marshaling_TableOptionProperties||(OSF_DDA_Marshaling_TableOptionProperties={}));OSF.DDA.Marshaling.TableOptionProperties=OSF_DDA_Marshaling_TableOptionProperties,function(n){n[n.row=0]="row";n[n.column=1]="column"}(OSF_DDA_Marshaling_CellProperties||(OSF_DDA_Marshaling_CellProperties={}));OSF.DDA.Marshaling.CellProperties=OSF_DDA_Marshaling_CellProperties,function(n){var t="wrapping",i="numberFormat",r="indentRight",u="indentLeft",f="fontNormal",e="fontSubscript",o="fontSuperscript",s="fontStrikethrough",h="fontDirection",c="fontColor",l="fontUnderlineStyle",a="fontSize",v="fontStyle",y="fontFamily",p="borderInlineColor",w="borderInlineStyle",b="borderOutlineColor",k="borderOutlineStyle",d="borderRightColor",g="borderRightStyle",nt="borderLeftColor",tt="borderLeftStyle",it="borderBottomColor",rt="borderBottomStyle",ut="borderTopColor",ft="borderTopStyle",et="borderColor",ot="borderStyle",st="backgroundColor",ht="alignVertical",ct="alignHorizontal";n[n[ct]=1]=ct;n[n[ht]=2]=ht;n[n[st]=101]=st;n[n[ot]=201]=ot;n[n[et]=202]=et;n[n[ft]=203]=ft;n[n[ut]=204]=ut;n[n[rt]=205]=rt;n[n[it]=206]=it;n[n[tt]=207]=tt;n[n[nt]=208]=nt;n[n[g]=209]=g;n[n[d]=210]=d;n[n[k]=211]=k;n[n[b]=212]=b;n[n[w]=213]=w;n[n[p]=214]=p;n[n[y]=301]=y;n[n[v]=302]=v;n[n[a]=303]=a;n[n[l]=304]=l;n[n[c]=305]=c;n[n[h]=306]=h;n[n[s]=307]=s;n[n[o]=308]=o;n[n[e]=309]=e;n[n[f]=310]=f;n[n[u]=401]=u;n[n[r]=402]=r;n[n[i]=501]=i;n[n.width=701]="width";n[n.height=702]="height";n[n[t]=703]=t}(OSF_DDA_Marshaling_CellFormatProperties||(OSF_DDA_Marshaling_CellFormatProperties={}));OSF.DDA.Marshaling.CellFormatProperties=OSF_DDA_Marshaling_CellFormatProperties,function(n){var t="slantDashDot",i="mediumDashDotDot",r="dashDotDot",u="mediumDashDot",f="mediumDashed";n[n.none=0]="none";n[n.thin=1]="thin";n[n.medium=2]="medium";n[n.dashed=3]="dashed";n[n.dotted=4]="dotted";n[n.thick=5]="thick";n[n.double=6]="double";n[n.hair=7]="hair";n[n[f]=8]=f;n[n.dashDot=9]="dashDot";n[n[u]=10]=u;n[n[r]=11]=r;n[n[i]=12]=i;n[n[t]=13]=t}(OSF_DDA_Marshaling_BorderStyleType||(OSF_DDA_Marshaling_BorderStyleType={}));OSF.DDA.Marshaling.BorderStyleType=OSF_DDA_Marshaling_BorderStyleType,function(n){var t="automatic",i="turquoise";n[n.none=0]="none";n[n.black=1]="black";n[n.blue=2]="blue";n[n.gray=3]="gray";n[n.green=4]="green";n[n.orange=5]="orange";n[n.pink=6]="pink";n[n.purple=7]="purple";n[n.red=8]="red";n[n.teal=9]="teal";n[n[i]=10]=i;n[n.violet=11]="violet";n[n.white=12]="white";n[n.yellow=13]="yellow";n[n[t]=14]=t}(OSF_DDA_Marshaling_ColorType||(OSF_DDA_Marshaling_ColorType={}));OSF.DDA.Marshaling.ColorType=OSF_DDA_Marshaling_ColorType,function(n){var t="distributed",i="centerAcrossSelection";n[n.general=0]="general";n[n.left=1]="left";n[n.center=2]="center";n[n.right=3]="right";n[n.fill=4]="fill";n[n.justify=5]="justify";n[n[i]=6]=i;n[n[t]=7]=t}(OSF_DDA_Marshaling_AlignHorizontalType||(OSF_DDA_Marshaling_AlignHorizontalType={}));OSF.DDA.Marshaling.AlignHorizontalType=OSF_DDA_Marshaling_AlignHorizontalType,function(n){var t="distributed";n[n.top=0]="top";n[n.center=1]="center";n[n.bottom=2]="bottom";n[n.justify=3]="justify";n[n[t]=4]=t}(OSF_DDA_Marshaling_AlignVerticalType||(OSF_DDA_Marshaling_AlignVerticalType={}));OSF.DDA.Marshaling.AlignVerticalType=OSF_DDA_Marshaling_AlignVerticalType,function(n){var t="boldItalic";n[n.regular=0]="regular";n[n.italic=1]="italic";n[n.bold=2]="bold";n[n[t]=3]=t}(OSF_DDA_Marshaling_FontStyleType||(OSF_DDA_Marshaling_FontStyleType={}));OSF.DDA.Marshaling.FontStyleType=OSF_DDA_Marshaling_FontStyleType,function(n){var t="doubleAccounting",i="singleAccounting";n[n.none=0]="none";n[n.single=1]="single";n[n.double=2]="double";n[n[i]=3]=i;n[n[t]=4]=t}(OSF_DDA_Marshaling_FontUnderlineStyleType||(OSF_DDA_Marshaling_FontUnderlineStyleType={}));OSF.DDA.Marshaling.FontUnderlineStyleType=OSF_DDA_Marshaling_FontUnderlineStyleType,function(n){var t="rightToLeft",i="leftToRight";n[n.context=0]="context";n[n[i]=1]=i;n[n[t]=2]=t}(OSF_DDA_Marshaling_FontDirectionType||(OSF_DDA_Marshaling_FontDirectionType={}));OSF.DDA.Marshaling.FontDirectionType=OSF_DDA_Marshaling_FontDirectionType,function(n){n[n.autoFit=-1]="autoFit"}(OSF_DDA_Marshaling_WidthType||(OSF_DDA_Marshaling_WidthType={}));OSF.DDA.Marshaling.WidthType=OSF_DDA_Marshaling_WidthType,function(n){n[n.autoFit=-1]="autoFit"}(OSF_DDA_Marshaling_HeightType||(OSF_DDA_Marshaling_HeightType={}));OSF.DDA.Marshaling.HeightType=OSF_DDA_Marshaling_HeightType,function(){var e=null,p="undefined",k="auto fit",d="distributed",b="none",s=OSF.DDA.Marshaling.AlignHorizontalType,a=OSF.DDA.Marshaling.AlignVerticalType,f=OSF.DDA.Marshaling.BorderStyleType,t=OSF.DDA.Marshaling.CellFormatProperties,g=OSF.DDA.Marshaling.CellProperties,u=OSF.DDA.Marshaling.ColorType,w=OSF.DDA.Marshaling.FontDirectionType,y=OSF.DDA.Marshaling.FontStyleType,v=OSF.DDA.Marshaling.FontUnderlineStyleType,nt=OSF.DDA.Marshaling.HeightType,c=OSF.DDA.Marshaling.FormatKeys,r=Microsoft.Office.WebExtension.Parameters,n=OSF.DDA.WAC.Delegate.ParameterMap,o=OSF.DDA.Marshaling.TableOptionProperties,tt=OSF.DDA.Marshaling.WidthType;Microsoft.Office.WebExtension.Table={All:0,Data:1,Headers:2};n.define({type:OSF.DDA.WAC.UniqueArguments.ClearFormats,toHost:[{name:r.Id,value:c.Id}]});n.define({type:OSF.DDA.MethodDispId.dispidClearFormatsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.ClearFormats,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});n.define({type:OSF.DDA.WAC.UniqueArguments.SetFormats,toHost:[{name:r.Id,value:c.Id},{name:r.CellFormat,value:c.CellFormat},{name:r.TableOptions,value:c.TableOptions}]});n.define({type:OSF.DDA.MethodDispId.dispidSetTableOptionsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SetFormats,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});n.define({type:OSF.DDA.MethodDispId.dispidSetFormatsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SetFormats,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});n.define({type:OSF.DDA.WAC.UniqueArguments.SetData,toHost:[{name:r.Id,value:c.Id},{name:r.CoercionType,value:"CoerceType"},{name:r.Data,value:OSF.DDA.WAC.UniqueArguments.Data},{name:r.Rows,value:"Rows"},{name:r.Columns,value:"Columns"},{name:r.StartRow,value:"StartRow"},{name:r.StartColumn,value:"StartCol"},{name:r.CellFormat,value:c.CellFormat},{name:r.TableOptions,value:c.TableOptions}]});n.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});n.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});var i={alignHorizontal:{text:"alignHorizontal",type:t.alignHorizontal},alignVertical:{text:"alignVertical",type:t.alignVertical},backgroundColor:{text:"backgroundColor",type:t.backgroundColor},borderStyle:{text:"borderStyle",type:t.borderStyle},borderColor:{text:"borderColor",type:t.borderColor},borderTopStyle:{text:"borderTopStyle",type:t.borderTopStyle},borderTopColor:{text:"borderTopColor",type:t.borderTopColor},borderBottomStyle:{text:"borderBottomStyle",type:t.borderBottomStyle},borderBottomColor:{text:"borderBottomColor",type:t.borderBottomColor},borderLeftStyle:{text:"borderLeftStyle",type:t.borderLeftStyle},borderLeftColor:{text:"borderLeftColor",type:t.borderLeftColor},borderRightStyle:{text:"borderRightStyle",type:t.borderRightStyle},borderRightColor:{text:"borderRightColor",type:t.borderRightColor},borderOutlineStyle:{text:"borderOutlineStyle",type:t.borderOutlineStyle},borderOutlineColor:{text:"borderOutlineColor",type:t.borderOutlineColor},borderInlineStyle:{text:"borderInlineStyle",type:t.borderInlineStyle},borderInlineColor:{text:"borderInlineColor",type:t.borderInlineColor},fontFamily:{text:"fontFamily",type:t.fontFamily},fontStyle:{text:"fontStyle",type:t.fontStyle},fontSize:{text:"fontSize",type:t.fontSize},fontUnderlineStyle:{text:"fontUnderlineStyle",type:t.fontUnderlineStyle},fontColor:{text:"fontColor",type:t.fontColor},fontDirection:{text:"fontDirection",type:t.fontDirection},fontStrikethrough:{text:"fontStrikethrough",type:t.fontStrikethrough},fontSuperscript:{text:"fontSuperscript",type:t.fontSuperscript},fontSubscript:{text:"fontSubscript",type:t.fontSubscript},fontNormal:{text:"fontNormal",type:t.fontNormal},indentLeft:{text:"indentLeft",type:t.indentLeft},indentRight:{text:"indentRight",type:t.indentRight},numberFormat:{text:"numberFormat",type:t.numberFormat},width:{text:"width",type:t.width},height:{text:"height",type:t.height},wrapping:{text:"wrapping",type:t.wrapping}},l=[{name:b,value:f.none},{name:"thin",value:f.thin},{name:"medium",value:f.medium},{name:"dashed",value:f.dashed},{name:"dotted",value:f.dotted},{name:"thick",value:f.thick},{name:"double",value:f.double},{name:"hair",value:f.hair},{name:"medium dashed",value:f.mediumDashed},{name:"dash dot",value:f.dashDot},{name:"medium dash dot",value:f.mediumDashDot},{name:"dash dot dot",value:f.dashDotDot},{name:"medium dash dot dot",value:f.mediumDashDotDot},{name:"slant dash dot",value:f.slantDashDot}],h=[{name:b,value:u.none},{name:"black",value:u.black},{name:"blue",value:u.blue},{name:"gray",value:u.gray},{name:"green",value:u.green},{name:"orange",value:u.orange},{name:"pink",value:u.pink},{name:"purple",value:u.purple},{name:"red",value:u.red},{name:"teal",value:u.teal},{name:"turquoise",value:u.turquoise},{name:"violet",value:u.violet},{name:"white",value:u.white},{name:"yellow",value:u.yellow},{name:"automatic",value:u.automatic}];n.define({type:i.alignHorizontal.text,toHost:[{name:"general",value:s.general},{name:"left",value:s.left},{name:"center",value:s.center},{name:"right",value:s.right},{name:"fill",value:s.fill},{name:"justify",value:s.justify},{name:"center across selection",value:s.centerAcrossSelection},{name:d,value:s.distributed}]});n.define({type:i.alignVertical.text,toHost:[{name:"top",value:a.top},{name:"center",value:a.center},{name:"bottom",value:a.bottom},{name:"justify",value:a.justify},{name:d,value:a.distributed}]});n.define({type:i.backgroundColor.text,toHost:h});n.define({type:i.borderStyle.text,toHost:l});n.define({type:i.borderColor.text,toHost:h});n.define({type:i.borderTopStyle.text,toHost:l});n.define({type:i.borderTopColor.text,toHost:h});n.define({type:i.borderBottomStyle.text,toHost:l});n.define({type:i.borderBottomColor.text,toHost:h});n.define({type:i.borderLeftStyle.text,toHost:l});n.define({type:i.borderLeftColor.text,toHost:h});n.define({type:i.borderRightStyle.text,toHost:l});n.define({type:i.borderRightColor.text,toHost:h});n.define({type:i.borderOutlineStyle.text,toHost:l});n.define({type:i.borderOutlineColor.text,toHost:h});n.define({type:i.borderInlineStyle.text,toHost:l});n.define({type:i.borderInlineColor.text,toHost:h});n.define({type:i.fontStyle.text,toHost:[{name:"regular",value:y.regular},{name:"italic",value:y.italic},{name:"bold",value:y.bold},{name:"bold italic",value:y.boldItalic}]});n.define({type:i.fontUnderlineStyle.text,toHost:[{name:b,value:v.none},{name:"single",value:v.single},{name:"double",value:v.double},{name:"single accounting",value:v.singleAccounting},{name:"double accounting",value:v.doubleAccounting}]});n.define({type:i.fontColor.text,toHost:h});n.define({type:i.fontDirection.text,toHost:[{name:"context",value:w.context},{name:"left-to-right",value:w.leftToRight},{name:"right-to-left",value:w.rightToLeft}]});n.define({type:i.width.text,toHost:[{name:k,value:tt.autoFit}]});n.define({type:i.height.text,toHost:[{name:k,value:nt.autoFit}]});n.define({type:r.TableOptions,toHost:[{name:"headerRow",value:o.headerRow},{name:"bandedRows",value:o.bandedRows},{name:"firstColumn",value:o.firstColumn},{name:"lastColumn",value:o.lastColumn},{name:"bandedColumns",value:o.bandedCoumns},{name:"filterButton",value:o.filterButton},{name:"style",value:o.style},{name:"totalRow",value:o.totalRow}]});n.dynamicTypes[r.CellFormat]={toHost:function(t){for(var i in t)t[i].format&&(t[i].format=n.doMapValues(t[i].format,"toHost"));return t},fromHost:function(n){return n}};n.setDynamicType(r.CellFormat,{toHost:function(n){var s="cells",a="format",y=0,w=1,v=[],h,t,r,u,f,e,c,l,o;for(h in n){if(t=n[h],r=[],typeof t[s]!==p){if(u=t[s],typeof t[s]=="object"){f=[];for(e in u)typeof g[e]!==p&&(f[g[e]]=u[e])}else f=u;r[y]=f}if(t[a]){c=t[a];l=[];for(o in c)typeof i[o]!==p&&l.push([i[o].type,c[o]]);r[w]=l}v[h]=r}return v},fromHost:function(n){return n}});n.setDynamicType(r.TableOptions,{toHost:function(n){var i=[];for(var t in n)typeof o[t]!=p&&(i[o[t]]=n[t]);return i},fromHost:function(n){return n}});s=e;a=e;f=e;t=e;u=e;w=e;y=e;v=e;nt=e;c=e;tt=e}(AgaveFormatAPI||(AgaveFormatAPI={}));OSF.DDA.AsyncMethodNames.addNames({ExecuteRichApiRequestAsync:"executeRichApiRequestAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[]});OSF.OUtil.setNamespace("RichApi",OSF.DDA);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidExecuteRichApiRequestMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.ArrayData}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FilterType,{OnlyVisible:"onlyVisible"}),function(n){var t;(function(t){var u=function(){function r(){var n=this,t=n;n._pseudoDocument=u;n._eventDispatch=u;n._processAppCommandInvocation=function(n){var i=t._verifyManifestCallback(n.callbackName),r;if(i.errorCode!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){t._invokeAppCommandCompletedMethod(n.appCommandId,i.errorCode,"");return}r=t._constructEventObjectForCallback(n);r?window.setTimeout(function(){i.callback(r)},0):t._invokeAppCommandCompletedMethod(n.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"")}}var f="object",e="string",u=null;return r.initializeOsfDda=function(){OSF.DDA.AsyncMethodNames.addNames({AppCommandInvocationCompletedAsync:"appCommandInvocationCompletedAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[e]},{name:Microsoft.Office.WebExtension.Parameters.Status,types:["number"]},{name:Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData,types:[e]}]});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{AppCommandInvokedEvent:"AppCommandInvokedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppCommandInvoked:"appCommandInvoked"});OSF.OUtil.setNamespace("AppCommand",OSF.DDA);OSF.DDA.AppCommand.AppCommandInvokedEventArgs=n.AppCommand.AppCommandInvokedEventArgs},r.prototype.initializeAndChangeOnce=function(n){var i=this,r;t.registerDdaFacade();i._pseudoDocument={};OSF.DDA.DispIdHost.addAsyncMethods(i._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync]);i._eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked]);r=function(t){n&&(t.status=="succeeded"?n(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):n(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError))};OSF.DDA.DispIdHost.addEventSupport(i._pseudoDocument,i._eventDispatch);i._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,i._processAppCommandInvocation,r)},r.prototype._verifyManifestCallback=function(n){var s="function",e={callback:u,errorCode:OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback},o;n=n.trim();try{for(var t=n.split("."),i=window,r=0;r100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99),n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1),n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99),n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("Dialog",OSF.DDA.Marshaling);OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys={MessageType:"messageType",MessageContent:"messageContent"};OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys={MessageType:"messageType",MessageContent:"messageContent"};OSF.DDA.Marshaling.MessageParentKeys={MessageToParent:"messageToParent"};OSF.DDA.Marshaling.DialogNotificationShownEventType={DialogNotificationShown:"dialogNotificationShown"};OSF.DDA.Marshaling.SendMessageKeys={MessageContent:"messageContent"},function(n){var t;(function(n){function r(n){switch(n){case t.Excel:case t.Word:case t.PowerPoint:case t.Outlook:return new i;default:return new i}return null}var t={Excel:"excel",Word:"word",PowerPoint:"powerpoint",Outlook:"outlook"},i;n.getDialogCssManager=r;i=function(){function n(){var r="height: 100px",t="font-size: 14px",i="font-family: Segoe UI,Arial,Verdana,sans-serif",u="margin: 20px 14px",f="width: 100%",e="position: absolute",n=this;n.overlayElementCSS=[e,"top: 0","left: 0",f,"height: 100%","background-color: rgba(198, 198, 198, 0.5)","z-index: 99998"];n.dialogNotificationPanelCSS=[f,"height: 190px",e,"z-index: 99999","background-color: rgba(255, 255, 255, 1)","left: 0px","top: 50%","margin-top: -95px"];n.newWindowNotificationTextPanelCSS=[u,i,t,r,"line-height: 100px"];n.newWindowNotificationTextSpanCSS=["display: inline-block","line-height: normal","vertical-align: middle"];n.crossZoneNotificationTextPanelCSS=[u,i,t,r];n.dialogNotificationButtonPanelCSS="margin:0px 9px";n.buttonStyleCSS=["text-align: center","width: 70px","height: 25px",t,i,"margin: 0px 5px","border-width: 1px","border-style: solid"]}var t=";";return n.prototype.getOverlayElementCSS=function(){return this.overlayElementCSS.join(t)},n.prototype.getDialogNotificationPanelCSS=function(){return this.dialogNotificationPanelCSS.join(t)},n.prototype.getNewWindowNotificationTextPanelCSS=function(){return this.newWindowNotificationTextPanelCSS.join(t)},n.prototype.getNewWindowNotificationTextSpanCSS=function(){return this.newWindowNotificationTextSpanCSS.join(t)},n.prototype.getCrossZoneNotificationTextPanelCSS=function(){return this.crossZoneNotificationTextPanelCSS.join(t)},n.prototype.getDialogNotificationButtonPanelCSS=function(){return this.dialogNotificationButtonPanelCSS},n.prototype.getDialogButtonCSS=function(){return this.buttonStyleCSS.join(t)},n}();n.DefaultDialogCSSManager=i})(t=n.WacCommonUICssManager||(n.WacCommonUICssManager={}))}(OfficeExt||(OfficeExt={})),function(n){var t;(function(t){var i;(function(t){function wt(n){var t=n.input;t!=i&&(v={HostButtonBorderColor:t[OSF.HostThemeButtonStyleKeys.ButtonBorderColor],HostButtonBackgroundColor:t[OSF.HostThemeButtonStyleKeys.ButtonBackgroundColor]});n.completed()}function bt(n){OSF._OfficeAppFactory.getInitializationHelper().addOrRemoveEventListenersForWindow(r);n.completed()}function kt(t){try{if(OSF._OfficeAppFactory.getInitializationHelper()._appContext._skipNewWindowNotification){ht(t);return}w=r;var c=r,p=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo,s=n.WacCommonUICssManager.getDialogCssManager(p.hostType),b=OSF.OUtil.formatString(Strings.OfficeOM.L_ShowWindowDialogNotification,OSF._OfficeAppFactory.getInitializationHelper()._appContext._addinName);o=ct(s);document.body.insertBefore(o,document.body.firstChild);f=ui(s,b);f.id=ot;var l=lt(s),i=nt(s,Strings.OfficeOM.L_ShowWindowDialogNotificationAllow),u=nt(s,Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore);l.appendChild(i);l.appendChild(u);f.appendChild(l);document.body.insertBefore(f,document.body.firstChild);i.onclick=function(){ht(t);w||y()};function v(){function n(n){rt();at(n);e(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore)}h.onComplete=n;OSF.DDA.WAC.Delegate.unregisterEventAsync(h)}u.onclick=v;i.addEventListener(a,function(n){n.shiftKey&&n.keyCode==9&&(it(i),tt(u),u.focus(),n.preventDefault(),n.stopPropagation())},r);u.addEventListener(a,function(n){n.shiftKey||n.keyCode!=9?n.keyCode==13&&(c=!0,n.preventDefault(),n.stopPropagation()):(it(u),tt(i),i.focus(),n.preventDefault(),n.stopPropagation())},r);u.addEventListener("keyup",function(n){n.keyCode==13&&c&&(c=r,v(),n.preventDefault(),n.stopPropagation())},r);window.focus();function k(){i.focus()}h.onComplete=k;OSF.DDA.WAC.Delegate.registerEventAsync(h)}catch(d){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at new window dialog."+d);e(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)}}function dt(n){var t,r;try{if(u!=i){if(t=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains,t)for(r=0;r-1?window.close():(t=n.data,r=typeof t,t&&(r=="object"||r==c)&&(r==c&&(t=JSON.parse(t)),u=OSF.DDA.OMFactory.manufactureEventArgs(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived,i,t),OSF.DialogParentMessageEventDispatch.fireEvent(u))))}window.addEventListener(l,n)}function ii(n,t){p=n;e=t}function ri(){try{f&&f.id==ot&&e&&e(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore)}catch(n){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during executing displayDialogAsync callback."+n)}y()}function st(t,i){var s=r,e=n.WacCommonUICssManager.getDialogCssManager(i),h,u;o=ct(e);document.body.insertBefore(o,document.body.firstChild);f=fi(e,t);f.id=pt;h=lt(e);u=nt(e,Strings.OfficeOM.L_DialogOK?Strings.OfficeOM.L_DialogOK:"OK");h.appendChild(u);f.appendChild(h);document.body.insertBefore(f,document.body.firstChild);w=!0;u.onclick=function(){y()};u.addEventListener(a,function(n){n.keyCode==9?(document.getElementById(k).focus(),n.preventDefault(),n.stopPropagation()):n.keyCode==13&&(s=!0,n.preventDefault(),n.stopPropagation())},r);u.addEventListener("keyup",function(n){n.keyCode==13&&s&&(s=r,y(),n.preventDefault(),n.stopPropagation())},r);document.getElementById(k).addEventListener(a,function(n){n.keyCode==9&&(u.focus(),n.preventDefault(),n.stopPropagation())},r);window.focus();u.focus()}function g(n){if(n.source==u)try{var t={};t[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogMessageReceived;t[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent]=n.data;p(t)}catch(i){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during receive message handler."+i)}}function ht(t){function d(){try{if(u==i||u.closed){window.clearInterval(b);window.removeEventListener(l,g);var n={};n[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogClosed;p(n)}}catch(t){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during check or handle window close."+t)}}var r=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo,v=[r.hostType,r.hostPlatform,r.hostSpecificFileVersion,r.hostLocale,r.osfControlAppCorrelationId,"isDialog"],h=v.join("|"),f=OSF._OfficeAppFactory.getInitializationHelper()._appContext,o=t[OSF.ShowWindowDialogParameterKeys.Url],s;o=n.WACUtils.addHostInfoAsQueryParam(o,h);s=JSON.parse(window.name);s[OSF.WindowNameItemKeys.HostInfo]=h;s[OSF.WindowNameItemKeys.AppContext]=f;var c=t[OSF.ShowWindowDialogParameterKeys.Width]*f._clientWindowWidth/100,a=t[OSF.ShowWindowDialogParameterKeys.Height]*f._clientWindowHeight/100,y=f._clientWindowWidth/2-c/2,w=f._clientWindowHeight/2-a/2,k="width="+c+", height="+a+", left="+y+", top="+w+",channelmode=no,directories=no,fullscreen=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=yes,toolbar=no";if(u=window.open(o,n.WACUtils.serializeObjectToString(s),k),u==i){OSF.AppTelemetry.logAppCommonMessage("Encountered cross zone issue in displayDialogAsync api.");rt();st(o,r.hostType);e(OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone);return}window.addEventListener(l,g);b=window.setInterval(d,1e3);e!=i?e(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("showDialogCallback can not be null.")}function nt(n,t){var i=document.createElement("input"),r,u;return i.setAttribute("type","button"),i.style.cssText=n.getDialogButtonCSS(),i.style.borderColor=ft,i.style.backgroundColor=et,i.setAttribute("value",t),r=function(){tt(i)},u=function(){it(i)},i.addEventListener("mouseover",r),i.addEventListener("focus",r),i.addEventListener("mouseout",u),i.addEventListener("focusout",u),i}function tt(n){v!=i?(n.style.borderColor=v.HostButtonBorderColor,n.style.backgroundColor=v.HostButtonBackgroundColor):OSF.CommonUI&&OSF.CommonUI.HostButtonBorderColor&&OSF.CommonUI.HostButtonBackgroundColor?(n.style.borderColor=OSF.CommonUI.HostButtonBorderColor,n.style.backgroundColor=OSF.CommonUI.HostButtonBackgroundColor):n.style.backgroundColor=yt}function it(n){n.style.borderColor=ft;n.style.backgroundColor=et}function y(){function n(n){rt();at(n)}h.onComplete=n;OSF.DDA.WAC.Delegate.unregisterEventAsync(h)}function rt(){f!=i&&(document.body.removeChild(f),f=i);o!=i&&(document.body.removeChild(o),o=i)}function ct(n){var t=document.createElement(s);return t.style.cssText=n.getOverlayElementCSS(),t}function ui(n,t){var r=document.createElement(s),i,u;return r.style.cssText=n.getDialogNotificationPanelCSS(),vt(r),i=document.createElement(s),i.style.cssText=n.getNewWindowNotificationTextPanelCSS(),i.id=d,document.documentElement.getAttribute("dir")=="rtl"?i.style.paddingRight="30px":i.style.paddingLeft="30px",u=document.createElement("span"),u.style.cssText=n.getNewWindowNotificationTextSpanCSS(),u.innerText=t,i.appendChild(u),r.appendChild(i),r}function lt(n){var t=document.createElement(s);return t.style.cssText=n.getDialogNotificationButtonPanelCSS(),t.style.cssFloat=document.documentElement.getAttribute("dir")=="rtl"?"left":"right",t}function at(n){if(n!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){var t=document.querySelectorAll(OSF._OfficeAppFactory.getInitializationHelper()._tabbableElements);OSF.OUtil.focusToFirstTabbable(t,r)}}function fi(t,i){var f=document.createElement(s),u,r,e;return f.style.cssText=t.getDialogNotificationPanelCSS(),vt(f),u=document.createElement(s),u.style.cssText=t.getCrossZoneNotificationTextPanelCSS(),u.id=d,r=document.createElement("a"),r.id=k,r.href="#",r.innerText=Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink,r.setAttribute("onclick","window.open('https://support.microsoft.com/en-us/help/17479/windows-internet-explorer-11-change-security-privacy-settings', '_blank', 'fullscreen=1')"),e=document.createElement("span"),Strings.OfficeOM.L_NewWindowCrossZone&&(e.innerHTML=OSF.OUtil.formatString(Strings.OfficeOM.L_NewWindowCrossZone,r.outerHTML,n.WACUtils.getDomainForUrl(i))),u.appendChild(e),f.appendChild(u),f}function vt(n){n.setAttribute("role","dialog");n.setAttribute("aria-describedby",d)}var s="div",c="string",l="message",a="keydown",r=!1,i=null,u=i,p=i,o=i,f=i,ut="osfDialogInternal:action=closeDialog",e=i,w=r,b=-1,v=i,ft="#ababab",et="#ffffff",yt="#ccc",ot="newWindowNotificaiton",pt="crossZoneNotification",k="configureBrowserLink",d="dialogNotificationTextPanel",h={dispId:OSF.DDA.EventDispId.dispidDialogNotificationShownInAddinEvent,eventType:OSF.DDA.Marshaling.DialogNotificationShownEventType.DialogNotificationShown,onComplete:i};t.setHostThemeButtonStyle=wt;t.removeEventListenersForDialog=bt;t.handleNewWindowDialog=kt;t.closeDialog=dt;t.messageParent=gt;t.sendMessage=ni;t.registerMessageReceivedEvent=ti;t.setHandlerAndShowDialogCallback=ii;t.escDismissDialogNotification=ri;t.showCrossZoneNotification=st})(i=t.Dialog||(t.Dialog={}))})(t=n.AddinNativeAction||(n.AddinNativeAction={}))}(OfficeExt||(OfficeExt={}));OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogMessageReceivedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageType},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageContent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidMessageParentMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,value:OSF.DDA.Marshaling.MessageParentKeys.MessageToParent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSendMessageMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,value:OSF.DDA.Marshaling.SendMessageKeys.MessageContent}]});OSF.DDA.WAC.Delegate.openDialog=function(n){function t(n){var t={Error:n};e(Microsoft.Office.Common.InvokeResultCode.noError,t)}var u="https://",f="http://",r=JSON.parse(n.targetId),e=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!0,n),i;if(OSF.DialogShownStatus.hasDialogShown){t(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened);return}if(i=r[OSF.ShowWindowDialogParameterKeys.Url].toLowerCase(),i==null||!(i.substr(0,u.length)===u)){i.substr(0,f.length)===f?t(OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS):t(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme);return}r[OSF.ShowWindowDialogParameterKeys.DisplayInIframe]?(OSF.DialogShownStatus.isWindowDialog=!1,OSF.DDA.WAC.Delegate.registerEventAsync(n)):(OSF.DialogShownStatus.isWindowDialog=!0,OfficeExt.AddinNativeAction.Dialog.setHandlerAndShowDialogCallback(function(t){n.onEvent&&n.onEvent(t);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t),OfficeExt.AddinNativeAction.Dialog.handleNewWindowDialog(r))};OSF.DDA.WAC.Delegate.messageParent=function(n){window.opener!=null?OfficeExt.AddinNativeAction.Dialog.messageParent(n):OSF.DDA.WAC.Delegate.executeAsync(n)};OSF.DDA.WAC.Delegate.sendMessage=function(n){OSF.DialogShownStatus.hasDialogShown&&(OSF.DialogShownStatus.isWindowDialog?OfficeExt.AddinNativeAction.Dialog.sendMessage(n):OSF.DDA.WAC.Delegate.executeAsync(n))};OSF.DDA.WAC.Delegate.closeDialog=function(n){function t(n){var t={Error:n};i(Microsoft.Office.Common.InvokeResultCode.noError,t)}var i=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!1,n);OSF.DialogShownStatus.hasDialogShown?OSF.DialogShownStatus.isWindowDialog?(n.onCalling&&n.onCalling(),OfficeExt.AddinNativeAction.Dialog.closeDialog(t)):OSF.DDA.WAC.Delegate.unregisterEventAsync(n):t(OSF.DDA.ErrorCodeManager.errorCodes.ooeWebDialogClosed)};OSF.InitializationHelper.prototype.dismissDialogNotification=function(){OfficeExt.AddinNativeAction.Dialog.escDismissDialogNotification()};OSF.InitializationHelper.prototype.registerMessageReceivedEventForWindowDialog=function(){OfficeExt.AddinNativeAction.Dialog.registerMessageReceivedEvent()};OSF.DDA.AsyncMethodNames.addNames({GetAccessTokenAsync:"getAccessTokenAsync"});OSF.DDA.Auth=function(){};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAccessTokenAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ForceConsent,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.ForceAddAccount,value:{types:["boolean"],defaultValue:!1}}],onSucceeded:function(n){return n[Microsoft.Office.WebExtension.Parameters.Data]}});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("SingleSignOn",OSF.DDA.Marshaling);OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys={ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount"};OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAccessTokenMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.ForceConsent,value:OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.ForceConsent},{name:Microsoft.Office.WebExtension.Parameters.ForceAddAccount,value:OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.ForceAddAccount}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.setDynamicType(Microsoft.Office.WebExtension.Parameters.Data,function(){var n="Rows",t="Headers";return{toHost:function(i){if(typeof i!="string"&&i[OSF.DDA.TableDataProperties.TableRows]!==undefined){var r={};r[n]=i[OSF.DDA.TableDataProperties.TableRows];r[t]=i[OSF.DDA.TableDataProperties.TableHeaders];i=r}else OSF.DDA.DataCoercion.determineCoercionType(i)==Microsoft.Office.WebExtension.CoercionType.Text&&(i=[[i]]);return i},fromHost:function(i){var r;return i[n]!=undefined?(r={},r[OSF.DDA.TableDataProperties.TableRows]=i[n],r[OSF.DDA.TableDataProperties.TableHeaders]=i[t]):r=i,r}}}());OSF.DDA.ExcelDocument=function(n,t){var i=this,r=new OSF.DDA.BindingFacade(i);OSF.DDA.DispIdHost.addAsyncMethods(r,[OSF.DDA.AsyncMethodNames.AddFromPromptAsync]);OSF.DDA.DispIdHost.addAsyncMethods(i,[OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync]);OSF.DDA.DispIdHost.addAsyncMethods(i,[OSF.DDA.AsyncMethodNames.GoToByIdAsync]);OSF.DDA.DispIdHost.addAsyncMethods(i,[OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync]);OSF.DDA.ExcelDocument.uber.constructor.call(i,n,r,t);i.mode==OSF.ClientMode.ReadOnly&&(i.url=document.URL);OSF.OUtil.finalizeProperties(i)};OSF.OUtil.extend(OSF.DDA.ExcelDocument,OSF.DDA.JsomDocument);OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(n,t){OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM);n.doc=new OSF.DDA.ExcelDocument(n,this._initializeSettings(n,!0));OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi,[OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]);t()};OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize=function(n){this.prepareApiSurface(n);Microsoft.Office.WebExtension.initialize(this.getInitializationReason(n))};OSF.InitializationHelper.prototype.prepareApiSurface=function(n){var t,i,r,u;OSF.WebApp._UpdateLinksForHostAndXdmInfo();t=new OSF.DDA.License(n.get_eToken());this.initWebDialog(n);this.initWebAuth(n);OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(n,n.doc,t));i=OSF.DDA.WAC.getDelegateMethods;r=OSF.DDA.WAC.Delegate.ParameterMap;OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(i,r));u=OfficeExt.AppCommand.AppCommandManager.instance();u.initializeAndChangeOnce()};OSF.InitializationHelper.prototype.getInitializationReason=function(n){return n.get_reason()};__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t=function(){function n(n,t){this.m_actionInfo=n;this.m_isWriteOperation=t}return Object.defineProperty(n.prototype,"actionInfo",{get:function(){return this.m_actionInfo},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},enumerable:!0,configurable:!0}),n}();n.Action=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createSetPropertyAction=function(t,i,r,u){var f;n.Utility.validateObjectPath(i);var e={Id:t._nextId(),ActionType:4,Name:r,ObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},s=[u],o=n.Utility.setMethodArguments(t,e.ArgumentInfo,s);return n.Utility.validateReferencedObjectPaths(o),f=new n.Action(e,!0),t._pendingRequest.addAction(f),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addReferencedObjectPaths(o),f},t.createMethodAction=function(t,i,r,u,f){var e,o,h,s;return n.Utility.validateObjectPath(i),e={Id:t._nextId(),ActionType:3,Name:r,ObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},o=n.Utility.setMethodArguments(t,e.ArgumentInfo,f),n.Utility.validateReferencedObjectPaths(o),h=u!=1,s=new n.Action(e,h),t._pendingRequest.addAction(s),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addReferencedObjectPaths(o),s},t.createQueryAction=function(t,i,r){var u,f;return n.Utility.validateObjectPath(i),u={Id:t._nextId(),ActionType:2,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},u.QueryInfo=r,f=new n.Action(u,!1),t._pendingRequest.addAction(f),t._pendingRequest.addReferencedObjectPath(i._objectPath),f},t.createRecursiveQueryAction=function(t,i,r){n.Utility.validateObjectPath(i);var f={Id:t._nextId(),ActionType:6,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id,RecursiveQueryInfo:r},u=new n.Action(f,!1);return t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u},t.createInstantiateAction=function(t,i){n.Utility.validateObjectPath(i);var u={Id:t._nextId(),ActionType:1,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},r=new n.Action(u,!1);return t._pendingRequest.addAction(r),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addActionResultHandler(r,new n.InstantiateActionResultHandler(i)),r},t.createTraceAction=function(t,i,r){var u={Id:t._nextId(),ActionType:5,Name:"Trace",ObjectPathId:0},f=new n.Action(u,!1);return t._pendingRequest.addAction(f),r&&t._pendingRequest.addTrace(u.Id,i),f},t}();n.ActionFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(t,i){n.Utility.checkArgumentNull(t,"context");this.m_context=t;this.m_objectPath=i;this.m_objectPath&&(t._processingResult||(n.ActionFactory.createInstantiateAction(t,this),t._autoCleanup&&this._KeepReference&&t.trackedObjects._autoAdd(this)))}return Object.defineProperty(t.prototype,"context",{get:function(){return this.m_context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_objectPath",{get:function(){return this.m_objectPath},set:function(n){this.m_objectPath=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNull",{get:function(){return n.Utility.throwIfNotLoaded("isNull",this._isNull,null,this._isNull),this._isNull},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNullObject",{get:function(){return n.Utility.throwIfNotLoaded("isNullObject",this._isNull,null,this._isNull),this._isNull},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_isNull",{get:function(){return this.m_isNull},set:function(n){this.m_isNull=n;n&&this.m_objectPath&&this.m_objectPath._updateAsNullObject()},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){this._isNull=n.Utility.isNullOrUndefined(t);this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this,t)},t.prototype._handleIdResult=function(t){this._isNull=n.Utility.isNullOrUndefined(t);n.Utility.fixObjectPathIfNecessary(this,t);this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this,t)},t.prototype._recursivelySet=function(i,r,u,f,e){var l=i instanceof t,o,s,h,c;if(l)if(Object.getPrototypeOf(this)===Object.getPrototypeOf(i))i=JSON.parse(JSON.stringify(i));else throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"properties",errorLocation:this._className+".set"});try{for(s=0;s0},enumerable:!0,configurable:!0}),t.prototype.addTrace=function(n,t){this.m_traceInfos[n]=t},t.prototype.addReferencedObjectPath=function(t){if(!this.m_referencedObjectPaths[t.objectPathInfo.Id]){if(!t.isValid)throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidObjectPath,message:n.Utility._getResourceString(n.ResourceStrings.invalidObjectPath,n.Utility.getObjectPathExpression(t)),debugInfo:{errorLocation:n.Utility.getObjectPathExpression(t)}});while(t)t.isWriteOperation&&(this.m_flags=this.m_flags|1),this.m_referencedObjectPaths[t.objectPathInfo.Id]=t,t.objectPathInfo.ObjectPathType==3&&this.addReferencedObjectPaths(t.argumentObjectPaths),t=t.parentObjectPath}},t.prototype.addReferencedObjectPaths=function(n){if(n)for(var t=0;t0&&(typeof r[0]=="string"||i.isRequestUrlAndHeaderInfo(r[0])||i.isRequestUrlAndHeaderInfoResolver(r[0]))&&(y=r[0],h=1),r.length==h+1)a=u,v=r[h+0];else if(r.length==h+2){if(r[h+0]instanceof n.ClientObject)a=function(){return r[h+0].context};else if(Array.isArray(r[h+0])){if(c=r[h+0],c.length==0)return i.createErrorPromise(t);for(l=0;l0){var n=c._onRunFinishedNotifiers.shift();n()}if(a)return l;else throw l;})},i.prototype._nextId=function(){return++this.m_nextId},i}();n.ClientRequestContext=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_type=n}return Object.defineProperty(t.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){(this.m_isLoaded=!0,typeof t=="object"&&t&&t._IsNull)||(this.m_value=this.m_type===1?n.Utility.adjustToDateTime(t):t)},t}();n.ClientResult=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.flags="flags",n.getItemAt="GetItemAt",n.id="Id",n.idPrivate="_Id",n.index="_Index",n.items="_Items",n.iterativeExecutor="IterativeExecutor",n.localDocument="http://document.localhost/",n.localDocumentApiPrefix="http://document.localhost/_api/",n.processQuery="ProcessQuery",n.referenceId="_ReferenceId",n.isTracked="_IsTracked",n.sourceLibHeader="SdkVersion",n.embeddingPageOrigin="EmbeddingPageOrigin",n.embeddingPageSessionInfo="EmbeddingPageSessionInfo",n}();n.Constants=t}(OfficeExtension||(OfficeExtension={})),function(n){var u=1,r={invokeRequestModifier:function(n){return n.DdaMethod.Version=u,n},invokeResponseModifier:function(n){return u=n.Version,n.Error&&(n.error={},n.error.Code=n.Error),n}},i,t,f,e;(function(n){n[n.Success=0]="Success";n[n.Timeout=1]="Timeout";n[n.InternalError=5001]="InternalError"})(i||(i={})),function(n){n.SendingId="sId";n.RespondingId="rId";n.CommandKey="command";n.SessionInfoKey="sessionInfo";n.ParamsKey="params";n.ApiReadyCommand="apiready";n.ExecuteMethodCommand="executeMethod";n.GetAppContextCommand="getAppContext";n.RegisterEventCommand="registerEvent";n.UnregisterEventCommand="unregisterEvent";n.FireEventCommand="fireEvent"}(t||(t={}));f=function(u){function f(n,t){u.call(this);this.m_chosenWindow=null;this.m_chosenOrigin=null;this.m_enabled=!0;this.m_onMessageHandler=this._onMessage.bind(this);this.m_callbackList={};this.m_id=0;this.m_timeoutId=-1;this.m_appContext=null;this.m_url=n;this.m_options=t;this.m_options||(this.m_options={sessionKey:Math.random().toString()});this.m_options.sessionKey||(this.m_options.sessionKey=Math.random().toString());this.m_options.container||(this.m_options.container=document.body);this.m_options.timeoutInMilliseconds||(this.m_options.timeoutInMilliseconds=6e4);this.m_options.height||(this.m_options.height="400px");this.m_options.width||(this.m_options.width="100%")}return __extends(f,u),f.prototype._getIFrameSrc=function(){var u=window.location.protocol+"//"+window.location.host,i=n.Constants.embeddingPageOrigin+"="+encodeURIComponent(u)+"&"+n.Constants.embeddingPageSessionInfo+"="+encodeURIComponent(this.m_options.sessionKey),r=!1,t;return this.m_url.toLowerCase().indexOf("/_layouts/preauth.aspx")>0&&(r=!0),t=document.createElement("a"),t.href=this.m_url,r?t.hash=t.hash.length===0||t.hash==="#"?"#"+i:t.hash+"&"+i:t.search=t.search.length===0||t.search==="?"?"?"+i:t.search+"&"+i,t.href},f.prototype.init=function(){var t=this,i;return window.addEventListener("message",this.m_onMessageHandler),i=this._getIFrameSrc(),new n._Internal.OfficePromise(function(r,u){var f=document.createElement("iframe");t.m_options.id&&(f.id=t.m_options.id);f.style.height=t.m_options.height;f.style.width=t.m_options.width;f.src=i;t.m_options.container.appendChild(f);t.m_timeoutId=setTimeout(function(){t.close();var i=n.Utility.createRuntimeError(n.ErrorCodes.timeout,n.Utility._getResourceString(n.ResourceStrings.timeout),"EmbeddedSession.init");u(i)},t.m_options.timeoutInMilliseconds);t.m_promiseResolver=r})},f.prototype._invoke=function(n,t,u){if(!this.m_enabled){t(i.InternalError,null);return}r.invokeRequestModifier&&(u=r.invokeRequestModifier(u));this._sendMessageWithCallback(this.m_id++,n,u,function(n){r.invokeResponseModifier&&(n=r.invokeResponseModifier(n));var u=n.Error;delete n.Error;t(u||i.Success,n)})},f.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler);window.clearTimeout(this.m_timeoutId);this.m_enabled=!1},Object.defineProperty(f.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),f.prototype._createRequestExecutorOrNull=function(){return new e(this)},f.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},f.prototype._registerEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.RegisterEventCommand,{EventId:i,TargetId:r},function(){n(null)})})},f.prototype._unregisterEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.UnregisterEventCommand,{EventId:i,TargetId:r},function(){n()})})},f.prototype._onMessage=function(n){var u=this,i,e,r,o,s;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===n.source&&this.m_chosenOrigin===n.origin)){if(i=n.data,i&&i[t.CommandKey]===t.ApiReadyCommand){!this.m_chosenWindow&&this._isValidDescendant(n.source)&&i[t.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=n.source,this.m_chosenOrigin=n.origin,this._sendMessageWithCallback(this.m_id++,t.GetAppContextCommand,null,function(n){u._setupContext(n);window.clearTimeout(u.m_timeoutId);u.m_promiseResolver()}));return}if(i&&i[t.CommandKey]===t.FireEventCommand){var f=i[t.ParamsKey],h=f.EventId,c=f.TargetId,l=f.Data;if(this.m_sessionEventManager)for(e=this.m_sessionEventManager.getHandlers(h,c),r=0;r=0;o--)if(r[o]===e[i].handler){r.splice(o,1);break}break;case 2:r=[];break}}return s&&(!this.m_registered&&r.length>0?u=u.then(function(){return f.m_eventInfo.registerFunc(f.m_callback)}).then(function(){return f.m_registered=!0}):this.m_registered&&r.length==0&&(u=u.then(function(){return f.m_eventInfo.unregisterFunc(f.m_callback)}).catch(function(t){n.Utility.log("Error when unregister event: "+JSON.stringify(t))}).then(function(){return f.m_registered=!1})),u=u.then(function(){return f.m_handlers=r})),u},t.prototype.fireEvent=function(t){for(var u,f,r=[],i=0;i=0;e--)if(f[e]===u){f.splice(e,1);break}return f.length===0?this.m_unregisterEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i}();n.EventRegistration=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var s=JSON.stringify(u.Body),f=u.Url,e,o;if(f.charAt(f.length-1)!="/"&&(f=f+"/"),f=f+n.Constants.processQuery,f=f+"?"+n.Constants.flags+"="+r.toString(),e={method:"POST",url:f,headers:{},body:s},e.headers[n.Constants.sourceLibHeader]=t.SourceLibHeaderValue,e.headers["CONTENT-TYPE"]="application/json",u.Headers)for(o in u.Headers)e.headers[o]=u.Headers[o];return n.HttpUtility.sendRequest(e).then(function(t){var i,r;return t.statusCode===200?i={ErrorCode:null,ErrorMessage:null,Headers:t.headers,Body:JSON.parse(t.body)}:(n.Utility.log("Error Response:"+t.body),r=n.Utility._parseErrorResponse(t),i={ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:t.headers,Body:null}),i})},t.SourceLibHeaderValue="officejs-rest",t}();n.HttpRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){n.OfficeRequire=function(){return typeof require!="undefined"?require:null}()})(t=n._Internal||(n._Internal={}));i=function(){function i(){}return i.setCustomSendRequestFunc=function(n){i.s_customSendRequestFunc=n},i.xhrSendRequestFunc=function(i){return new t.OfficePromise(function(r,u){var f=new XMLHttpRequest,e;if(f.open(i.method,i.url),f.onload=function(){var t={statusCode:f.status,headers:n.Utility._parseHttpResponseHeaders(f.getAllResponseHeaders()),body:f.responseText};r(t)},f.onerror=function(){u(new t.RuntimeError({code:n.ErrorCodes.connectionFailure,message:n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,f.statusText)}))},i.headers)for(e in i.headers)f.setRequestHeader(e,i.headers[e]);f.send(i.body)})},i.nodejsRequestModuleSendRequestFunc=function(n){i.logRequest(n);var r=t.OfficeRequire(i.NodeJsRequestModuleName);return r(n.url,{method:n.method,headers:n.headers,body:n.body}).then(function(n){return n.text().then(function(t){var f=n.status,u={},r;return n.headers.forEach(function(n,t){u[t]=n}),r={statusCode:f,headers:u,body:t},i.logResponse(r),r})})},i.sendRequest=function(n){i.validateAndNormalizeRequest(n);var t=i.s_customSendRequestFunc;return t||(t=typeof window=="undefined"||typeof XMLHttpRequest=="undefined"?i.nodejsRequestModuleSendRequestFunc:i.xhrSendRequestFunc),t(n)},i.setCustomSendLocalDocumentRequestFunc=function(n){i.s_customSendLocalDocumentRequestFunc=n},i.sendLocalDocumentRequest=function(n){i.validateAndNormalizeRequest(n);var t;return t=i.s_customSendLocalDocumentRequestFunc||i.officeJsSendLocalDocumentRequestFunc,t(n)},i.officeJsSendLocalDocumentRequestFunc=function(i){i=n.Utility._validateLocalDocumentRequest(i);var r=n.Utility._buildRequestMessageSafeArray(i);return new t.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(r,function(i){var r;r=i.status=="succeeded"?{statusCode:n.RichApiMessageUtility.getResponseStatusCode(i),headers:n.RichApiMessageUtility.getResponseHeaders(i),body:n.RichApiMessageUtility.getResponseBody(i)}:n.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(i.error.code,i.error.message);n.Utility.log(JSON.stringify(r));t(r)})})},i.validateAndNormalizeRequest=function(i){if(n.Utility.isNullOrUndefined(i))throw t.RuntimeError._createInvalidArgError({argumentName:"request"});n.Utility.isNullOrEmptyString(i.method)&&(i.method="GET");i.method=i.method.toUpperCase()},i.logRequest=function(t){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Request---"),n.Utility.log(t.method+" "+t.url),t.headers)for(var r in t.headers)n.Utility.log(r+": "+t.headers[r]);i._logBody&&n.Utility.log(t.body)}},i.logResponse=function(t){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Response---"),n.Utility.log(""+t.statusCode),t.headers)for(var r in t.headers)n.Utility.log(r+": "+t.headers[r]);i._logBody&&n.Utility.log(t.body)}},i.NodeJsRequestModuleName="node-fetch",i._logBody=!1,i}();n.HttpUtility=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_clientObject=n}return n.prototype._handleResult=function(n){this.m_clientObject._handleIdResult(n)},n}();n.InstantiateActionResultHandler=t}(OfficeExtension||(OfficeExtension={})),function(n){}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){this.m_objectPathInfo=n;this.m_parentObjectPath=t;this.m_isWriteOperation=!1;this.m_isCollection=i;this.m_isInvalidAfterRequest=r;this.m_isValid=!0}return Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},set:function(n){this.m_isWriteOperation=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(n){this.m_argumentObjectPaths=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(n){this.m_isValid=n;!n&&this.m_objectPathInfo.ObjectPathType===6&&this.m_savedObjectPathInfo&&(t.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(n){this.m_getByIdMethodName=n},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null},t.prototype.updateUsingObjectData=function(i){var o=i[n.Constants.referenceId],u,f,e,r;if(!n.Utility.isNullOrEmptyString(o)){this.m_savedObjectPathInfo||this.isInvalidAfterRequest||!t.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)||(u={},t.copyObjectPathInfo(this.m_objectPathInfo,u),this.m_savedObjectPathInfo={pathInfo:u,parent:this.m_parentObjectPath});this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=o;this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null;return}if(f=this.parentObjectPath&&this.parentObjectPath.isCollection,e=this.getByIdMethodName,(f||!n.Utility.isNullOrEmptyString(e))&&(r=i[n.Constants.id],n.Utility.isNullOrUndefined(r)&&(r=i[n.Constants.idPrivate]),!n.Utility.isNullOrUndefined(r))){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;f?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=e,this.m_getByIdMethodName=null);this.isWriteOperation=!1;this.m_objectPathInfo.ArgumentInfo={};this.m_objectPathInfo.ArgumentInfo.Arguments=[r];this.m_argumentObjectPaths=null;return}},t.isRestorableObjectPath=function(n){return n===1||n===5||n===3||n===4},t.copyObjectPathInfo=function(n,t){t.Id=n.Id;t.ArgumentInfo=n.ArgumentInfo;t.Name=n.Name;t.ObjectPathType=n.ObjectPathType;t.ParentObjectPathId=n.ParentObjectPathId},t}();n.ObjectPath=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createGlobalObjectObjectPath=function(t){var i={Id:t._nextId(),ObjectPathType:1,Name:""};return new n.ObjectPath(i,null,!1,!1)},t.createNewObjectObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:2,Name:i};return new n.ObjectPath(u,null,r,!1)},t.createPropertyObjectPath=function(t,i,r,u,f){var e={Id:t._nextId(),ObjectPathType:4,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id};return new n.ObjectPath(e,i._objectPath,u,f)},t.createIndexerObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i._objectPath,!1,!1)},t.createIndexerObjectPathUsingParentPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i,!1,!1)},t.createMethodObjectPath=function(t,i,r,u,f,e,o,s){var c={Id:t._nextId(),ObjectPathType:3,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},l=n.Utility.setMethodArguments(t,c.ArgumentInfo,f),h=new n.ObjectPath(c,i._objectPath,e,o);return h.argumentObjectPaths=l,h.isWriteOperation=u!=1,h.getByIdMethodName=s,h},t.createReferenceIdObjectPath=function(t,i){var r={Id:t._nextId(),ObjectPathType:6,Name:i,ArgumentInfo:{}};return new n.ObjectPath(r,null,!1,!1)},t.createChildItemObjectPathUsingIndexerOrGetItemAt=function(i,r,u,f,e){var o=f[n.Constants.id];return n.Utility.isNullOrUndefined(o)&&(o=f[n.Constants.idPrivate]),i&&!n.Utility.isNullOrUndefined(o)?t.createChildItemObjectPathUsingIndexer(r,u,f):t.createChildItemObjectPathUsingGetItemAt(r,u,f,e)},t.createChildItemObjectPathUsingIndexer=function(t,i,r){var f=r[n.Constants.id],u;return n.Utility.isNullOrUndefined(f)&&(f=r[n.Constants.idPrivate]),u=u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u.ArgumentInfo.Arguments=[f],new n.ObjectPath(u,i._objectPath,!1,!1)},t.createChildItemObjectPathUsingGetItemAt=function(t,i,r,u){var e=r[n.Constants.index],f;return e&&(u=e),f={Id:t._nextId(),ObjectPathType:3,Name:n.Constants.getItemAt,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f.ArgumentInfo.Arguments=[u],new n.ObjectPath(f,i._objectPath,!1,!1)},t}();n.ObjectPathFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var f=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n._Internal.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(f,function(i){n.Utility.log("Response:");n.Utility.log(JSON.stringify(i));var r;r=i.status=="succeeded"?n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBody(i),n.RichApiMessageUtility.getResponseHeaders(i)):n.RichApiMessageUtility.buildResponseOnError(i.error.code,i.error.message);t(r)})})},t.SourceLibHeaderValue="officejs",t}();n.OfficeJsRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){var t;(function(t){function i(){return function(){"use strict";function wt(n){return typeof n=="function"||typeof n=="object"&&n!==null}function b(n){return typeof n=="function"}function bt(n){return typeof n=="object"&&n!==null}function kt(n){k=n}function dt(n){f=n}function ti(){var t=process.nextTick,n=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&n[1]==="0"&&n[2]==="10"&&(t=setImmediate),function(){t(c)}}function ii(){return function(){tt(c)}}function ri(){var n=0,i=new ut(c),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function ui(){var n=new MessageChannel;return n.port1.onmessage=c,function(){n.port2.postMessage(0)}}function ft(){return function(){setTimeout(c,1)}}function c(){for(var t,i,n=0;n=0?(n=n.substring(t+5,n.length),n<"14.14393"?!0:!1):!1}function i(){return typeof window=="undefined"&&typeof Promise=="function"?Promise:typeof window!="undefined"&&window.Promise?t()?n.PromiseImpl.Init():window.Promise:n.PromiseImpl.Init()}n.OfficePromise=i()}(t=n._Internal||(n._Internal={}));i=t.OfficePromise;n.Promise=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this._autoCleanupList={};this.m_context=n}return t.prototype.add=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._addCommon(n,!0)}):this._addCommon(n,!0)},t.prototype._autoAdd=function(n){this._addCommon(n,!1);this._autoCleanupList[n._objectPath.objectPathInfo.Id]=n},t.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(t,i){var r=this.m_context._autoCleanup&&!t[n.Constants.isTracked]&&t!==this.m_context._rootObject&&i&&!n.Utility.isNullOrEmptyString(i[n.Constants.referenceId]);r&&(this._autoCleanupList[t._objectPath.objectPathInfo.Id]=t,t[n.Constants.isTracked]=!0)},t.prototype._addCommon=function(t,i){if(t[n.Constants.isTracked]){i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id];return}var r=t[n.Constants.referenceId];n.Utility.isNullOrEmptyString(r)&&t._KeepReference&&(t._KeepReference(),n.ActionFactory.createInstantiateAction(this.m_context,t),i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id],t[n.Constants.isTracked]=!0)},t.prototype.remove=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._removeCommon(n)}):this._removeCommon(n)},t.prototype._removeCommon=function(t){var r=t[n.Constants.referenceId],i;n.Utility.isNullOrEmptyString(r)||(i=this.m_context._rootObject,i._RemoveReference&&i._RemoveReference(r),delete t[n.Constants.isTracked])},t.prototype._retrieveAndClearAutoCleanupList=function(){var n=this._autoCleanupList;return this._autoCleanupList={},n},t}();n.TrackedObjects=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.cannotRegisterEvent="CannotRegisterEvent",n.connectionFailureWithStatus="ConnectionFailureWithStatus",n.connectionFailureWithDetails="ConnectionFailureWithDetails",n.invalidObjectPath="InvalidObjectPath",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.invalidArgumentGeneric="InvalidArgumentGeneric",n.propertyNotLoaded="PropertyNotLoaded",n.runMustReturnPromise="RunMustReturnPromise",n.timeout="Timeout",n.propertyDoesNotExist="PropertyDoesNotExist",n.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",n.moreInfoInnerError="MoreInfoInnerError",n.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",n.valueNotLoaded="ValueNotLoaded",n.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage",n}();n.ResourceStrings=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.CannotRegisterEvent="The event handler cannot be registered.",n.ConnectionFailureWithStatus="The request failed with status code of {0}.",n.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}",n.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",n.InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',n.InvalidRequestContext="Cannot use the object across different request contexts.",n.PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",n.RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',n.Timeout="The operation has timed out.",n.ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.',n.invalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.",n}();n.ResourceStringValues=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.buildMessageArrayForIRequestExecutor=function(i,r,u,f){var o=JSON.stringify(u.Body),e;return n.Utility.log("Request:"),n.Utility.log(o),e={},e[n.Constants.sourceLibHeader]=f,t.buildRequestMessageSafeArray(i,r,"POST","ProcessQuery",e,o)},t.buildResponseOnSuccess=function(n,t){var i={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return i.Body=JSON.parse(n),i.Headers=t,i},t.buildResponseOnError=function(i,r){var u={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return u.ErrorCode=n.ErrorCodes.generalException,u.ErrorMessage=r,i==t.OfficeJsErrorCode_ooeNoCapability?u.ErrorCode=n.ErrorCodes.accessDenied:i==t.OfficeJsErrorCode_ooeActivityLimitReached?u.ErrorCode=n.ErrorCodes.activityLimitReached:i==t.OfficeJsErrorCode_ooeInvalidOrTimedOutSession&&(u.ErrorCode=n.ErrorCodes.invalidOrTimedOutSession,u.ErrorMessage=n.Utility._getResourceString(n.ResourceStrings.invalidOrTimedOutSessionMessage)),u},t.buildHttpResponseFromOfficeJsError=function(i,r){var f=500,u={};return u.error={},u.error.code=n.ErrorCodes.generalException,u.error.message=r,i===t.OfficeJsErrorCode_ooeNoCapability?(f=403,u.error.code=n.ErrorCodes.accessDenied):i===t.OfficeJsErrorCode_ooeActivityLimitReached&&(f=429,u.error.code=n.ErrorCodes.activityLimitReached),{statusCode:f,headers:{},body:JSON.stringify(u)}},t.buildRequestMessageSafeArray=function(n,t,i,r,u,f){var e=[],o;if(u)for(o in u)e.push(o),e.push(u[o]);var s=0,h="",c="",l="";return[n,i,r,e,f,s,t,h,c,l]},t.getResponseBody=function(n){return t.getResponseBodyFromSafeArray(n.value.data)},t.getResponseHeaders=function(n){return t.getResponseHeadersFromSafeArray(n.value.data)},t.getResponseBodyFromSafeArray=function(n){var t=n[2],i;return typeof t=="string"?t:(i=t,i.join(""))},t.getResponseHeadersFromSafeArray=function(n){var i=n[1],r,t;if(!i)return null;for(r={},t=0;t0&&f.push(i);return f},t.throwError=function(i,r,u){throw new n._Internal.RuntimeError({code:i,message:t._getResourceString(i,r),debugInfo:u?{errorLocation:u}:undefined});},t.createRuntimeError=function(t,i,r){return new n._Internal.RuntimeError({code:t,message:i,debugInfo:{errorLocation:r}})},t._getResourceString=function(i,r){var u,e,f,o;return typeof window!="undefined"&&window.Strings&&window.Strings.OfficeOM&&(e="L_"+i,f=window.Strings.OfficeOM[e],f&&(u=f)),u||(u=n.ResourceStringValues[i]),u||(u=i),t.isNullOrUndefined(r)||(Array.isArray(r)?(o=r,u=t._formatString(u,o)):u=u.replace("{0}",r)),u},t._formatString=function(t,i){return t.replace(/\{\d\}/g,function(t){var r=parseInt(t.substr(1,t.length-2));if(r0?".":"")+i;break;case 3:i=t.normalizeName(n.objectPathInfo.Name)+"()"+(i.length>0?".":"")+i;break;case 4:i=t.normalizeName(n.objectPathInfo.Name)+(i.length>0?".":"")+i;break;case 5:i="getItem()"+(i.length>0?".":"")+i;break;case 6:i="_reference()"+(i.length>0?".":"")+i;break}n=n.parentObjectPath}return i},t._createPromiseFromResult=function(t){return new n._Internal.OfficePromise(function(n,i){n(t)})},t._createTimeoutPromise=function(t){return new n._Internal.OfficePromise(function(n,i){setTimeout(function(){n(null)},t)})},t.promisify=function(t){return new n._Internal.OfficePromise(function(n,i){var r=function(t){t.status=="failed"?i(t.error):n(t.value)};t(r)})},t._addActionResultHandler=function(n,t,i){n.context._pendingRequest.addActionResultHandler(t,i)},t._handleNavigationPropertyResults=function(n,i,r){for(var u=0;u0},t._getLocalDocumentUrlPrefixLength=function(n){for(var i=["http://document.localhost","https://document.localhost","//document.localhost"],r=n.toLowerCase().trim(),t=0;t0))for(s=i.url.substr(f+1),e=s.split("&"),u=0;u0&&(f=i.substr(0,u),e=i.substr(u+1),f=t.trim(f),e=t.trim(e),s[f.toUpperCase()]=e));return s},t._parseErrorResponse=function(i){var r=null,f,e,u;if(!t.isNullOrEmptyString(i.body)){f=t.trim(i.body);try{r=JSON.parse(f)}catch(o){t.log("Error when parse "+f)}}return!t.isNullOrUndefined(r)&&typeof r=="object"&&r.error?(u=r.error.code,e=t._getResourceString(n.ResourceStrings.connectionFailureWithDetails,[i.statusCode.toString(),r.error.code,r.error.message])):e=t._getResourceString(n.ResourceStrings.connectionFailureWithStatus,i.statusCode.toString()),t.isNullOrEmptyString(u)&&(u=n.ErrorCodes.connectionFailure),{errorCode:u,errorMessage:e}},t._copyHeaders=function(n,t){if(n&&t)for(var i in n)t[i]=n[i]},t._logEnabled=!1,t._synchronousCleanup=!1,t.s_underscoreCharCode="_".charCodeAt(0),t}();n.Utility=t}(OfficeExtension||(OfficeExtension={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){function nt(n){return n[0].toLowerCase()+n.slice(1)}function w(n,t,i){var s=1500,e,r,u,o,h;if(Array.isArray(i)&&i.length>0&&Array.isArray(i[0])&&i.length*i[0].length>s&&p()){for(e=Math.max(1,Math.round(s/i[0].length)),n._ValidateArraySize(i.length,i[0].length),r=0;ri.length&&(u=i.length-r),o=n.getRow(r).getBoundingRect(n.getRow(r+u-1)),h=i.slice(r,r+u),f(o.context,o,t,h);return!0}return!1}function p(){return typeof window!="undefined"&&window.Office&&window.Office.context&&window.Office.context.requirements?window.Office.context.requirements.isSetSupported("ExcelApi",1.3):!0}function ku(t,i,r){return OfficeExtension.ClientRequestContext._runBatch("Excel.run",arguments,function(t){return new n.RequestContext(t)})}function b(n){var t={BindingColumnCount:n.bindingColumnCount,BindingId:n.bindingId,BindingRowCount:n.bindingRowCount,bindingType:n.bindingType,HasHeaders:n.hasHeaders};return window.OSF.DDA.OMFactory.manufactureBinding(t,window.Microsoft.Office.WebExtension.context.document)}function rt(n,t){var r=n.headers==null,i;return i=r?n.rows:n,i=window.OSF.DDA.DataCoercion.coerceData(i,t[window.Microsoft.Office.WebExtension.Parameters.CoercionType]),i==undefined?null:i}var wu=["ThreeArrows","ThreeArrowsGray","ThreeFlags","ThreeTrafficLights1","ThreeTrafficLights2","ThreeSigns","ThreeSymbols","ThreeSymbols2","FourArrows","FourArrowsGray","FourRedToBlack","FourRating","FourTrafficLights","FiveArrows","FiveArrowsGray","FiveRating","FiveQuarters","ThreeStars","ThreeTriangles","FiveBoxes"],bu=[["RedDownArrow","YellowSideArrow","GreenUpArrow"],["GrayDownArrow","GraySideArrow","GrayUpArrow"],["RedFlag","YellowFlag","GreenFlag"],["RedCircleWithBorder","YellowCircle","GreenCircle"],["RedTrafficLight","YellowTrafficLight","GreenTrafficLight"],["RedDiamond","YellowTriangle","GreenCircle"],["RedCrossSymbol","YellowExclamationSymbol","GreenCheckSymbol"],["RedCross","YellowExclamation","GreenCheck"],["RedDownArrow","YellowDownInclineArrow","YellowUpInclineArrow","GreenUpArrow"],["GrayDownArrow","GrayDownInclineArrow","GrayUpInclineArrow","GrayUpArrow"],["BlackCircle","GrayCircle","PinkCircle","RedCircle"],["OneBar","TwoBars","ThreeBars","FourBars"],["BlackCircleWithBorder","RedCircleWithBorder","YellowCircle","GreenCircle"],["RedDownArrow","YellowDownInclineArrow","YellowSideArrow","YellowUpInclineArrow","GreenUpArrow"],["GrayDownArrow","GrayDownInclineArrow","GraySideArrow","GrayUpInclineArrow","GrayUpArrow"],["NoBars","OneBar","TwoBars","ThreeBars","FourBars"],["WhiteCircleAllWhiteQuarters","CircleWithThreeWhiteQuarters","CircleWithTwoWhiteQuarters","CircleWithOneWhiteQuarter","BlackCircle"],["SilverStar","HalfGoldStar","GoldStar"],["RedDownTriangle","YellowDash","GreenUpTriangle"],["NoFilledBoxes","OneFilledBox","TwoFilledBoxes","ThreeFilledBoxes","FourFilledBoxes"],],tt,it,d,ut,ft,et,k,ot,st,ht,g,ct,lt,at,vt,yt,pt,wt,bt,kt,dt,gt,ni,ti,ii,ri,ui,fi,ei,oi,si,hi,ci,li,ai,vi,yi,pi,wi,bi,ki,di,gi,nr,tr,ir,rr,ur,fr,er,or,sr,hr,cr,lr,ar,vr,yr,pr,wr,br,kr,dr,gr,nu,tu,iu,ru,uu,fu,eu,ou,su,hu,cu,lu,au,vu,yu,gu,nf,tf,rf,uf,ff,ef,of,sf,hf,cf,lf,af,vf,yf,pf,wf,bf,kf,df,gf,ne,te,ie,re,ue,fe,ee,oe,se,he,ce,le,ae,ve,ye,pe,we,be,ke,de,ge,no,to,io,ro,i,pu,uo;n.icons={};wu.map(function(t,i){var r=nt(t);n.icons[r]=[];bu[i].map(function(i,u){i=nt(i);var f={set:t,index:u};n.icons[r].push(f);n.icons[r][i]=f})});tt=function(){function n(n,t,i){this.m_workbookUrl=n;this.m_requestHeaders=t;this.m_requestHeaders||(this.m_requestHeaders={});OfficeExtension.Utility.isNullOrUndefined(i)&&(i=!0);this.m_persisted=i}return n.prototype.close=function(){var i=this,t,u,r;return this.m_requestUrlAndHeaderInfo&&!OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)?(t=this.m_requestUrlAndHeaderInfo.url,t.charAt(t.length-1)!="/"&&(t=t+"/"),t=t+"closeSession",u=this.m_requestUrlAndHeaderInfo,r={method:"POST",url:t,headers:this.m_requestUrlAndHeaderInfo.headers,body:""},this.m_requestUrlAndHeaderInfo=null,OfficeExtension.HttpUtility.sendRequest(r).then(function(t){var u,r,f;if(t.statusCode!=204){u=OfficeExtension.Utility._parseErrorResponse(t);throw OfficeExtension.Utility.createRuntimeError(u.errorCode,u.errorMessage,"Session.close");}i.m_requestUrlAndHeaderInfo=null;r=null;for(f in i.m_requestHeaders)if(f.toLowerCase()==n.WorkbookSessionIdHeaderNameLower){r=f;break}r&&delete i.m_requestHeaders[r]})):OfficeExtension.Utility._createPromiseFromResult(null)},n.prototype._resolveRequestUrlAndHeaderInfo=function(){var r=this,u,e,t,i,f,o;if(this.m_requestUrlAndHeaderInfo)return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);if(OfficeExtension.Utility.isNullOrEmptyString(this.m_workbookUrl)||OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl))return this.m_requestUrlAndHeaderInfo={url:this.m_workbookUrl,headers:this.m_requestHeaders},OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);u=!1;for(e in this.m_requestHeaders)if(e.toLowerCase()==n.WorkbookSessionIdHeaderNameLower){u=!0;break}return u?(this.m_requestUrlAndHeaderInfo={url:this.m_workbookUrl,headers:this.m_requestHeaders},OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo)):(t=this.m_workbookUrl,t.charAt(t.length-1)!="/"&&(t=t+"/"),t=t+"createSession",i={},OfficeExtension.Utility._copyHeaders(this.m_requestHeaders,i),i["Content-Type"]="application/json",f={},f.persistChanges=this.m_persisted,o={method:"POST",url:t,headers:i,body:JSON.stringify(f)},OfficeExtension.HttpUtility.sendRequest(o).then(function(t){var u,f,e;if(t.statusCode!==201){u=OfficeExtension.Utility._parseErrorResponse(t);throw OfficeExtension.Utility.createRuntimeError(u.errorCode,u.errorMessage,"Session.resolveRequestUrlAndHeaderInfo");}return f=JSON.parse(t.body),e=f.id,i={},OfficeExtension.Utility._copyHeaders(r.m_requestHeaders,i),i[n.WorkbookSessionIdHeaderName]=e,r.m_requestUrlAndHeaderInfo={url:r.m_workbookUrl,headers:i},r.m_requestUrlAndHeaderInfo}))},n.WorkbookSessionIdHeaderName="Workbook-Session-Id",n.WorkbookSessionIdHeaderNameLower="workbook-session-id",n}();n.Session=tt;it=function(n){function t(t){n.call(this,t);this.m_workbook=new d(this,OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(this));this._rootObject=this.m_workbook}return __extends(t,n),Object.defineProperty(t.prototype,"workbook",{get:function(){return this.m_workbook},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"application",{get:function(){return this.workbook.application},enumerable:!0,configurable:!0}),t}(OfficeExtension.ClientRequestContext);n.RequestContext=it;n.run=ku;n._RedirectV1APIs=!1;n._V1APIMap={GetDataAsync:{call:function(n,t){return n.workbook._V1Api.bindingGetData(t)},postprocess:rt},GetSelectedDataAsync:{call:function(n,t){return n.workbook._V1Api.getSelectedData(t)},postprocess:rt},GoToByIdAsync:{call:function(n,t){return n.workbook._V1Api.gotoById(t)}},AddColumnsAsync:{call:function(n,t){return n.workbook._V1Api.bindingAddColumns(t)}},AddFromSelectionAsync:{call:function(n,t){return n.workbook._V1Api.bindingAddFromSelection(t)},postprocess:b},AddFromNamedItemAsync:{call:function(n,t){return n.workbook._V1Api.bindingAddFromNamedItem(t)},postprocess:b},AddFromPromptAsync:{call:function(n,t){return n.workbook._V1Api.bindingAddFromPrompt(t)},postprocess:b},AddRowsAsync:{call:function(n,t){return n.workbook._V1Api.bindingAddRows(t)}},GetByIdAsync:{call:function(n,t){return n.workbook._V1Api.bindingGetById(t)},postprocess:b},ReleaseByIdAsync:{call:function(n,t){return n.workbook._V1Api.bindingReleaseById(t)}},GetAllAsync:{call:function(n){return n.workbook._V1Api.bindingGetAll()},postprocess:function(n){return n.bindings.map(function(n){return b(n)})}},DeleteAllDataValuesAsync:{call:function(n,t){return n.workbook._V1Api.bindingDeleteAllDataValues(t)}},SetSelectedDataAsync:{preprocess:function(n){var t=n.cellFormat;return typeof window!="undefined"&&window.OSF.DDA.SafeArray?window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes,"cellFormat")&&(n.cellFormat=window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes.cellFormat.toHost(t)):typeof window!="undefined"&&window.OSF.DDA.WAC&&window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes,"cellFormat")&&(n.cellFormat=window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes.cellFormat.toHost(t)),n},call:function(n,t){return n.workbook._V1Api.setSelectedData(t)}},SetDataAsync:{preprocess:function(n){var t=n.cellFormat;return typeof window!="undefined"&&window.OSF.DDA.SafeArray?window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes,"cellFormat")&&(n.cellFormat=window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes.cellFormat.toHost(t)):typeof window!="undefined"&&window.OSF.DDA.WAC&&window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes,"cellFormat")&&(n.cellFormat=window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes.cellFormat.toHost(t)),n},call:function(n,t){return n.workbook._V1Api.bindingSetData(t)}},SetFormatsAsync:{preprocess:function(n){var t=n.cellFormat;return typeof window!="undefined"&&window.OSF.DDA.SafeArray?window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes,"cellFormat")&&(n.cellFormat=window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes.cellFormat.toHost(t)):typeof window!="undefined"&&window.OSF.DDA.WAC&&window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes,"cellFormat")&&(n.cellFormat=window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes.cellFormat.toHost(t)),n},call:function(n,t){return n.workbook._V1Api.bindingSetFormats(t)}},SetTableOptionsAsync:{call:function(n,t){return n.workbook._V1Api.bindingSetTableOptions(t)}},ClearFormatsAsync:{call:function(n,t){return n.workbook._V1Api.bindingClearFormats(t)}},GetFilePropertiesAsync:{call:function(n,t){return n.workbook._V1Api.getFilePropertiesAsync(t)}}};var o=OfficeExtension.ObjectPathFactory.createPropertyObjectPath,t=OfficeExtension.ObjectPathFactory.createMethodObjectPath,y=OfficeExtension.ObjectPathFactory.createIndexerObjectPath,fo=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath,eo=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer,oo=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt,v=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt,s=OfficeExtension.ActionFactory.createMethodAction,f=OfficeExtension.ActionFactory.createSetPropertyAction,e=OfficeExtension.Utility.isNullOrUndefined,u=OfficeExtension.Utility.isUndefined,r=OfficeExtension.Utility.throwIfNotLoaded,c=OfficeExtension.Utility.load,h=OfficeExtension.Utility.fixObjectPathIfNecessary,l=OfficeExtension.Utility._addActionResultHandler,a=OfficeExtension.Utility._handleNavigationPropertyResults,so=OfficeExtension.Utility.adjustToDateTime,du=function(n){function t(){n.apply(this,arguments)}return __extends(t,n),Object.defineProperty(t.prototype,"_className",{get:function(){return"Application"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"calculationMode",{get:function(){return r("calculationMode",this.m_calculationMode,"Application",this._isNull),this.m_calculationMode},enumerable:!0,configurable:!0}),t.prototype.calculate=function(n){s(this.context,this,"Calculate",0,[n])},t.prototype.suspendApiCalculationUntilNextSync=function(){s(this.context,this,"SuspendApiCalculationUntilNextSync",0,[])},t.prototype._handleResult=function(t){if(n.prototype._handleResult.call(this,t),!e(t)){var i=t;h(this,i);u(i.CalculationMode)||(this.m_calculationMode=i.CalculationMode)}},t.prototype.load=function(n){return c(this,n),this},t.prototype.toJSON=function(){return{calculationMode:this.m_calculationMode}},t}(OfficeExtension.ClientObject);n.Application=du;d=function(i){function r(){i.apply(this,arguments)}return __extends(r,i),Object.defineProperty(r.prototype,"_className",{get:function(){return"Workbook"},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"application",{get:function(){return this.m_application||(this.m_application=new n.Application(this.context,o(this.context,this,"Application",!1,!1))),this.m_application},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"bindings",{get:function(){return this.m_bindings||(this.m_bindings=new n.BindingCollection(this.context,o(this.context,this,"Bindings",!0,!1))),this.m_bindings},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"customXmlParts",{get:function(){return this.m_customXmlParts||(this.m_customXmlParts=new n.CustomXmlPartCollection(this.context,o(this.context,this,"CustomXmlParts",!0,!1))),this.m_customXmlParts},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"functions",{get:function(){return this.m_functions||(this.m_functions=new n.Functions(this.context,o(this.context,this,"Functions",!1,!1))),this.m_functions},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"names",{get:function(){return this.m_names||(this.m_names=new n.NamedItemCollection(this.context,o(this.context,this,"Names",!0,!1))),this.m_names},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"pivotTables",{get:function(){return this.m_pivotTables||(this.m_pivotTables=new n.PivotTableCollection(this.context,o(this.context,this,"PivotTables",!0,!1))),this.m_pivotTables},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"settings",{get:function(){return this.m_settings||(this.m_settings=new n.SettingCollection(this.context,o(this.context,this,"Settings",!0,!1))),this.m_settings},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"tables",{get:function(){return this.m_tables||(this.m_tables=new n.TableCollection(this.context,o(this.context,this,"Tables",!0,!1))),this.m_tables},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"worksheets",{get:function(){return this.m_worksheets||(this.m_worksheets=new n.WorksheetCollection(this.context,o(this.context,this,"Worksheets",!0,!1))),this.m_worksheets},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"_V1Api",{get:function(){return this.m__V1Api||(this.m__V1Api=new n._V1Api(this.context,o(this.context,this,"_V1Api",!1,!1))),this.m__V1Api},enumerable:!0,configurable:!0}),r.prototype.getSelectedRange=function(){return new n.Range(this.context,t(this.context,this,"GetSelectedRange",1,[],!1,!0,null))},r.prototype._GetObjectByReferenceId=function(n){var i=s(this.context,this,"_GetObjectByReferenceId",1,[n]),t=new OfficeExtension.ClientResult;return l(this,i,t),t},r.prototype._GetObjectTypeNameByReferenceId=function(n){var i=s(this.context,this,"_GetObjectTypeNameByReferenceId",1,[n]),t=new OfficeExtension.ClientResult;return l(this,i,t),t},r.prototype._GetReferenceCount=function(){var t=s(this.context,this,"_GetReferenceCount",1,[]),n=new OfficeExtension.ClientResult;return l(this,t,n),n},r.prototype._RemoveAllReferences=function(){s(this.context,this,"_RemoveAllReferences",1,[])},r.prototype._RemoveReference=function(n){s(this.context,this,"_RemoveReference",1,[n])},r.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;h(this,t);a(this,t,["application","Application","bindings","Bindings","customXmlParts","CustomXmlParts","functions","Functions","names","Names","pivotTables","PivotTables","settings","Settings","tables","Tables","worksheets","Worksheets","_V1Api","_V1Api"])}},r.prototype.load=function(n){return c(this,n),this},Object.defineProperty(r.prototype,"onSelectionChanged",{get:function(){var n=this;return this.m_selectionChanged||(this.m_selectionChanged=new OfficeExtension.EventHandlers(this.context,this,"SelectionChanged",{registerFunc:function(t){return n.context.eventRegistration.register(2,"",t)},unregisterFunc:function(t){return n.context.eventRegistration.unregister(2,"",t)},eventArgsTransformFunc:function(t){return OfficeExtension.Utility._createPromiseFromResult({workbook:n})}})),this.m_selectionChanged},enumerable:!0,configurable:!0}),r.prototype.toJSON=function(){return{}},r}(OfficeExtension.ClientObject);n.Workbook=d;ut=function(i){function l(){i.apply(this,arguments)}return __extends(l,i),Object.defineProperty(l.prototype,"_className",{get:function(){return"Worksheet"},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"charts",{get:function(){return this.m_charts||(this.m_charts=new n.ChartCollection(this.context,o(this.context,this,"Charts",!0,!1))),this.m_charts},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"names",{get:function(){return this.m_names||(this.m_names=new n.NamedItemCollection(this.context,o(this.context,this,"Names",!0,!1))),this.m_names},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"pivotTables",{get:function(){return this.m_pivotTables||(this.m_pivotTables=new n.PivotTableCollection(this.context,o(this.context,this,"PivotTables",!0,!1))),this.m_pivotTables},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"protection",{get:function(){return this.m_protection||(this.m_protection=new n.WorksheetProtection(this.context,o(this.context,this,"Protection",!1,!1))),this.m_protection},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"tables",{get:function(){return this.m_tables||(this.m_tables=new n.TableCollection(this.context,o(this.context,this,"Tables",!0,!1))),this.m_tables},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"id",{get:function(){return r("id",this.m_id,"Worksheet",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"name",{get:function(){return r("name",this.m_name,"Worksheet",this._isNull),this.m_name},set:function(n){this.m_name=n;f(this.context,this,"Name",n)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"position",{get:function(){return r("position",this.m_position,"Worksheet",this._isNull),this.m_position},set:function(n){this.m_position=n;f(this.context,this,"Position",n)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"visibility",{get:function(){return r("visibility",this.m_visibility,"Worksheet",this._isNull),this.m_visibility},set:function(n){this.m_visibility=n;f(this.context,this,"Visibility",n)},enumerable:!0,configurable:!0}),l.prototype.set=function(n,t){this._recursivelySet(n,t,["name","position","visibility"],[],["charts","names","pivotTables","tables","charts","names","pivotTables","protection","tables"])},l.prototype.activate=function(){s(this.context,this,"Activate",1,[])},l.prototype.calculate=function(n){s(this.context,this,"Calculate",0,[n])},l.prototype.delete=function(){s(this.context,this,"Delete",0,[])},l.prototype.getCell=function(i,r){return new n.Range(this.context,t(this.context,this,"GetCell",1,[i,r],!1,!0,null))},l.prototype.getNext=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetNext",1,[i],!1,!0,null))},l.prototype.getNextOrNullObject=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetNextOrNullObject",1,[i],!1,!0,null))},l.prototype.getPrevious=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetPrevious",1,[i],!1,!0,null))},l.prototype.getPreviousOrNullObject=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetPreviousOrNullObject",1,[i],!1,!0,null))},l.prototype.getRange=function(i){return new n.Range(this.context,t(this.context,this,"GetRange",1,[i],!1,!0,null))},l.prototype.getUsedRange=function(i){return new n.Range(this.context,t(this.context,this,"GetUsedRange",1,[i],!1,!0,null))},l.prototype.getUsedRangeOrNullObject=function(i){return new n.Range(this.context,t(this.context,this,"GetUsedRangeOrNullObject",1,[i],!1,!0,null))},l.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;h(this,t);u(t.Id)||(this.m_id=t.Id);u(t.Name)||(this.m_name=t.Name);u(t.Position)||(this.m_position=t.Position);u(t.Visibility)||(this.m_visibility=t.Visibility);a(this,t,["charts","Charts","names","Names","pivotTables","PivotTables","protection","Protection","tables","Tables"])}},l.prototype.load=function(n){return c(this,n),this},l.prototype._handleIdResult=function(n){(i.prototype._handleIdResult.call(this,n),e(n))||u(n.Id)||(this.m_id=n.Id)},l.prototype.toJSON=function(){return{id:this.m_id,name:this.m_name,position:this.m_position,protection:this.m_protection,visibility:this.m_visibility}},l}(OfficeExtension.ClientObject);n.Worksheet=ut;ft=function(i){function u(){i.apply(this,arguments)}return __extends(u,i),Object.defineProperty(u.prototype,"_className",{get:function(){return"WorksheetCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"items",{get:function(){return r("items",this.m__items,"WorksheetCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),u.prototype.add=function(i){return new n.Worksheet(this.context,t(this.context,this,"Add",0,[i],!1,!0,null))},u.prototype.getActiveWorksheet=function(){return new n.Worksheet(this.context,t(this.context,this,"GetActiveWorksheet",1,[],!1,!1,null))},u.prototype.getCount=function(n){var i=s(this.context,this,"GetCount",1,[n]),t=new OfficeExtension.ClientResult;return l(this,i,t),t},u.prototype.getFirst=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetFirst",1,[i],!1,!0,null))},u.prototype.getItem=function(t){return new n.Worksheet(this.context,y(this.context,this,[t]))},u.prototype.getItemOrNullObject=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetItemOrNullObject",1,[i],!1,!1,null))},u.prototype.getLast=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetLast",1,[i],!1,!0,null))},u.prototype._handleResult=function(t){var u,f,r,o;if((i.prototype._handleResult.call(this,t),!e(t))&&(u=t,h(this,u),!e(u[OfficeExtension.Constants.items])))for(this.m__items=[],f=u[OfficeExtension.Constants.items],r=0;r0?f=i.getOffsetRange(r,u):(f=i,e=r,o=u),Math.abs(t)==1)?f:f.getBoundingRect(i.getOffsetRange(r*t+e,u*t+o))},Object.defineProperty(l.prototype,"conditionalFormats",{get:function(){return this.m_conditionalFormats||(this.m_conditionalFormats=new n.ConditionalFormatCollection(this.context,o(this.context,this,"ConditionalFormats",!0,!1))),this.m_conditionalFormats},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"format",{get:function(){return this.m_format||(this.m_format=new n.RangeFormat(this.context,o(this.context,this,"Format",!1,!1))),this.m_format},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"sort",{get:function(){return this.m_sort||(this.m_sort=new n.RangeSort(this.context,o(this.context,this,"Sort",!1,!1))),this.m_sort},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"worksheet",{get:function(){return this.m_worksheet||(this.m_worksheet=new n.Worksheet(this.context,o(this.context,this,"Worksheet",!1,!1))),this.m_worksheet},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"address",{get:function(){return r("address",this.m_address,"Range",this._isNull),this.m_address},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"addressLocal",{get:function(){return r("addressLocal",this.m_addressLocal,"Range",this._isNull),this.m_addressLocal},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"cellCount",{get:function(){return r("cellCount",this.m_cellCount,"Range",this._isNull),this.m_cellCount},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"columnCount",{get:function(){return r("columnCount",this.m_columnCount,"Range",this._isNull),this.m_columnCount},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"columnHidden",{get:function(){return r("columnHidden",this.m_columnHidden,"Range",this._isNull),this.m_columnHidden},set:function(n){this.m_columnHidden=n;f(this.context,this,"ColumnHidden",n)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"columnIndex",{get:function(){return r("columnIndex",this.m_columnIndex,"Range",this._isNull),this.m_columnIndex},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"formulas",{get:function(){return r("formulas",this.m_formulas,"Range",this._isNull),this.m_formulas},set:function(n){(this.m_formulas=n,w(this,"Formulas",n))||(this.m_formulas=n,f(this.context,this,"Formulas",n))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"formulasLocal",{get:function(){return r("formulasLocal",this.m_formulasLocal,"Range",this._isNull),this.m_formulasLocal},set:function(n){(this.m_formulasLocal=n,w(this,"FormulasLocal",n))||(this.m_formulasLocal=n,f(this.context,this,"FormulasLocal",n))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"formulasR1C1",{get:function(){return r("formulasR1C1",this.m_formulasR1C1,"Range",this._isNull),this.m_formulasR1C1},set:function(n){(this.m_formulasR1C1=n,w(this,"FormulasR1C1",n))||(this.m_formulasR1C1=n,f(this.context,this,"FormulasR1C1",n))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"hidden",{get:function(){return r("hidden",this.m_hidden,"Range",this._isNull),this.m_hidden},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"numberFormat",{get:function(){return r("numberFormat",this.m_numberFormat,"Range",this._isNull),this.m_numberFormat},set:function(n){(this.m_numberFormat=n,w(this,"NumberFormat",n))||(this.m_numberFormat=n,f(this.context,this,"NumberFormat",n))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"rowCount",{get:function(){return r("rowCount",this.m_rowCount,"Range",this._isNull),this.m_rowCount},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"rowHidden",{get:function(){return r("rowHidden",this.m_rowHidden,"Range",this._isNull),this.m_rowHidden},set:function(n){this.m_rowHidden=n;f(this.context,this,"RowHidden",n)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"rowIndex",{get:function(){return r("rowIndex",this.m_rowIndex,"Range",this._isNull),this.m_rowIndex},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"text",{get:function(){return r("text",this.m_text,"Range",this._isNull),this.m_text},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"valueTypes",{get:function(){return r("valueTypes",this.m_valueTypes,"Range",this._isNull),this.m_valueTypes},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"values",{get:function(){return r("values",this.m_values,"Range",this._isNull),this.m_values},set:function(n){(this.m_values=n,w(this,"Values",n))||(this.m_values=n,f(this.context,this,"Values",n))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_ReferenceId",{get:function(){return r("_ReferenceId",this.m__ReferenceId,"Range",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),l.prototype.set=function(n,t){this._recursivelySet(n,t,["numberFormat","values","formulas","formulasLocal","formulasR1C1","rowHidden","columnHidden"],["format"],["conditionalFormats","sort","worksheet","conditionalFormats","sort","worksheet"])},l.prototype.calculate=function(){s(this.context,this,"Calculate",0,[])},l.prototype.clear=function(n){s(this.context,this,"Clear",0,[n])},l.prototype.delete=function(n){s(this.context,this,"Delete",0,[n])},l.prototype.getBoundingRect=function(i){return new n.Range(this.context,t(this.context,this,"GetBoundingRect",1,[i],!1,!0,null))},l.prototype.getCell=function(i,r){return new n.Range(this.context,t(this.context,this,"GetCell",1,[i,r],!1,!0,null))},l.prototype.getColumn=function(i){return new n.Range(this.context,t(this.context,this,"GetColumn",1,[i],!1,!0,null))},l.prototype.getColumnsAfter=function(i){if(!p()){if(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0)throw new OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove");return this._getAdjacentRange("getColumnsAfter",i,this.getLastColumn(),0,1)}return new n.Range(this.context,t(this.context,this,"GetColumnsAfter",1,[i],!1,!0,null))},l.prototype.getColumnsBefore=function(i){if(!p()){if(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0)throw new OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove");return this._getAdjacentRange("getColumnsBefore",i,this.getColumn(0),0,-1)}return new n.Range(this.context,t(this.context,this,"GetColumnsBefore",1,[i],!1,!0,null))},l.prototype.getEntireColumn=function(){return new n.Range(this.context,t(this.context,this,"GetEntireColumn",1,[],!1,!0,null))},l.prototype.getEntireRow=function(){return new n.Range(this.context,t(this.context,this,"GetEntireRow",1,[],!1,!0,null))},l.prototype.getIntersection=function(i){return new n.Range(this.context,t(this.context,this,"GetIntersection",1,[i],!1,!0,null))},l.prototype.getIntersectionOrNullObject=function(i){return new n.Range(this.context,t(this.context,this,"GetIntersectionOrNullObject",1,[i],!1,!0,null))},l.prototype.getLastCell=function(){return new n.Range(this.context,t(this.context,this,"GetLastCell",1,[],!1,!0,null))},l.prototype.getLastColumn=function(){return new n.Range(this.context,t(this.context,this,"GetLastColumn",1,[],!1,!0,null))},l.prototype.getLastRow=function(){return new n.Range(this.context,t(this.context,this,"GetLastRow",1,[],!1,!0,null))},l.prototype.getOffsetRange=function(i,r){return new n.Range(this.context,t(this.context,this,"GetOffsetRange",1,[i,r],!1,!0,null))},l.prototype.getResizedRange=function(i,r){if(!p()){this._ensureInteger(i,"getResizedRange");this._ensureInteger(r,"getResizedRange");var u=i>=0&&r>=0?this:this.getCell(0,0);return u.getBoundingRect(this.getLastCell().getOffsetRange(i,r))}return new n.Range(this.context,t(this.context,this,"GetResizedRange",1,[i,r],!1,!0,null))},l.prototype.getRow=function(i){return new n.Range(this.context,t(this.context,this,"GetRow",1,[i],!1,!0,null))},l.prototype.getRowsAbove=function(i){if(!p()){if(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0)throw new OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove");return this._getAdjacentRange("getRowsAbove",i,this.getRow(0),-1,0)}return new n.Range(this.context,t(this.context,this,"GetRowsAbove",1,[i],!1,!0,null))},l.prototype.getRowsBelow=function(i){if(!p()){if(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0)throw new OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove");return this._getAdjacentRange("getRowsBelow",i,this.getLastRow(),1,0)}return new n.Range(this.context,t(this.context,this,"GetRowsBelow",1,[i],!1,!0,null))},l.prototype.getUsedRange=function(i){return new n.Range(this.context,t(this.context,this,"GetUsedRange",1,[i],!1,!0,null))},l.prototype.getUsedRangeOrNullObject=function(i){return new n.Range(this.context,t(this.context,this,"GetUsedRangeOrNullObject",1,[i],!1,!0,null))},l.prototype.getVisibleView=function(){return new n.RangeView(this.context,t(this.context,this,"GetVisibleView",1,[],!1,!1,null))},l.prototype.insert=function(i){return new n.Range(this.context,t(this.context,this,"Insert",0,[i],!1,!0,null))},l.prototype.merge=function(n){s(this.context,this,"Merge",0,[n])},l.prototype.select=function(){s(this.context,this,"Select",1,[])},l.prototype.unmerge=function(){s(this.context,this,"Unmerge",0,[])},l.prototype._KeepReference=function(){s(this.context,this,"_KeepReference",1,[])},l.prototype._ValidateArraySize=function(n,t){s(this.context,this,"_ValidateArraySize",1,[n,t])},l.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;h(this,t);u(t.Address)||(this.m_address=t.Address);u(t.AddressLocal)||(this.m_addressLocal=t.AddressLocal);u(t.CellCount)||(this.m_cellCount=t.CellCount);u(t.ColumnCount)||(this.m_columnCount=t.ColumnCount);u(t.ColumnHidden)||(this.m_columnHidden=t.ColumnHidden);u(t.ColumnIndex)||(this.m_columnIndex=t.ColumnIndex);u(t.Formulas)||(this.m_formulas=t.Formulas);u(t.FormulasLocal)||(this.m_formulasLocal=t.FormulasLocal);u(t.FormulasR1C1)||(this.m_formulasR1C1=t.FormulasR1C1);u(t.Hidden)||(this.m_hidden=t.Hidden);u(t.NumberFormat)||(this.m_numberFormat=t.NumberFormat);u(t.RowCount)||(this.m_rowCount=t.RowCount);u(t.RowHidden)||(this.m_rowHidden=t.RowHidden);u(t.RowIndex)||(this.m_rowIndex=t.RowIndex);u(t.Text)||(this.m_text=t.Text);u(t.ValueTypes)||(this.m_valueTypes=t.ValueTypes);u(t.Values)||(this.m_values=t.Values);u(t._ReferenceId)||(this.m__ReferenceId=t._ReferenceId);a(this,t,["conditionalFormats","ConditionalFormats","format","Format","sort","Sort","worksheet","Worksheet"])}},l.prototype.load=function(n){return c(this,n),this},l.prototype._handleIdResult=function(n){(i.prototype._handleIdResult.call(this,n),e(n))||u(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId)},l.prototype.track=function(){return this.context.trackedObjects.add(this),this},l.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},l.prototype.toJSON=function(){return{address:this.m_address,addressLocal:this.m_addressLocal,cellCount:this.m_cellCount,columnCount:this.m_columnCount,columnHidden:this.m_columnHidden,columnIndex:this.m_columnIndex,format:this.m_format,formulas:this.m_formulas,formulasLocal:this.m_formulasLocal,formulasR1C1:this.m_formulasR1C1,hidden:this.m_hidden,numberFormat:this.m_numberFormat,rowCount:this.m_rowCount,rowHidden:this.m_rowHidden,rowIndex:this.m_rowIndex,text:this.m_text,values:this.m_values,valueTypes:this.m_valueTypes}},l}(OfficeExtension.ClientObject);n.Range=k;ot=function(i){function s(){i.apply(this,arguments)}return __extends(s,i),Object.defineProperty(s.prototype,"_className",{get:function(){return"RangeView"},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rows",{get:function(){return this.m_rows||(this.m_rows=new n.RangeViewCollection(this.context,o(this.context,this,"Rows",!0,!1))),this.m_rows},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"cellAddresses",{get:function(){return r("cellAddresses",this.m_cellAddresses,"RangeView",this._isNull),this.m_cellAddresses},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"columnCount",{get:function(){return r("columnCount",this.m_columnCount,"RangeView",this._isNull),this.m_columnCount},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulas",{get:function(){return r("formulas",this.m_formulas,"RangeView",this._isNull),this.m_formulas},set:function(n){this.m_formulas=n;f(this.context,this,"Formulas",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulasLocal",{get:function(){return r("formulasLocal",this.m_formulasLocal,"RangeView",this._isNull),this.m_formulasLocal},set:function(n){this.m_formulasLocal=n;f(this.context,this,"FormulasLocal",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulasR1C1",{get:function(){return r("formulasR1C1",this.m_formulasR1C1,"RangeView",this._isNull),this.m_formulasR1C1},set:function(n){this.m_formulasR1C1=n;f(this.context,this,"FormulasR1C1",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"index",{get:function(){return r("index",this.m_index,"RangeView",this._isNull),this.m_index},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"numberFormat",{get:function(){return r("numberFormat",this.m_numberFormat,"RangeView",this._isNull),this.m_numberFormat},set:function(n){this.m_numberFormat=n;f(this.context,this,"NumberFormat",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rowCount",{get:function(){return r("rowCount",this.m_rowCount,"RangeView",this._isNull),this.m_rowCount},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"text",{get:function(){return r("text",this.m_text,"RangeView",this._isNull),this.m_text},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"valueTypes",{get:function(){return r("valueTypes",this.m_valueTypes,"RangeView",this._isNull),this.m_valueTypes},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"values",{get:function(){return r("values",this.m_values,"RangeView",this._isNull),this.m_values},set:function(n){this.m_values=n;f(this.context,this,"Values",n)},enumerable:!0,configurable:!0}),s.prototype.set=function(n,t){this._recursivelySet(n,t,["numberFormat","values","formulas","formulasLocal","formulasR1C1"],[],["rows","rows"])},s.prototype.getRange=function(){return new n.Range(this.context,t(this.context,this,"GetRange",1,[],!1,!0,null))},s.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;h(this,t);u(t.CellAddresses)||(this.m_cellAddresses=t.CellAddresses);u(t.ColumnCount)||(this.m_columnCount=t.ColumnCount);u(t.Formulas)||(this.m_formulas=t.Formulas);u(t.FormulasLocal)||(this.m_formulasLocal=t.FormulasLocal);u(t.FormulasR1C1)||(this.m_formulasR1C1=t.FormulasR1C1);u(t.Index)||(this.m_index=t.Index);u(t.NumberFormat)||(this.m_numberFormat=t.NumberFormat);u(t.RowCount)||(this.m_rowCount=t.RowCount);u(t.Text)||(this.m_text=t.Text);u(t.ValueTypes)||(this.m_valueTypes=t.ValueTypes);u(t.Values)||(this.m_values=t.Values);a(this,t,["rows","Rows"])}},s.prototype.load=function(n){return c(this,n),this},s.prototype.toJSON=function(){return{cellAddresses:this.m_cellAddresses,columnCount:this.m_columnCount,formulas:this.m_formulas,formulasLocal:this.m_formulasLocal,formulasR1C1:this.m_formulasR1C1,index:this.m_index,numberFormat:this.m_numberFormat,rowCount:this.m_rowCount,text:this.m_text,values:this.m_values,valueTypes:this.m_valueTypes}},s}(OfficeExtension.ClientObject);n.RangeView=ot;st=function(i){function u(){i.apply(this,arguments)}return __extends(u,i),Object.defineProperty(u.prototype,"_className",{get:function(){return"RangeViewCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"items",{get:function(){return r("items",this.m__items,"RangeViewCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),u.prototype.getCount=function(){var t=s(this.context,this,"GetCount",1,[]),n=new OfficeExtension.ClientResult;return l(this,t,n),n},u.prototype.getItemAt=function(i){return new n.RangeView(this.context,t(this.context,this,"GetItemAt",1,[i],!1,!1,null))},u.prototype._handleResult=function(t){var u,f,r,o;if((i.prototype._handleResult.call(this,t),!e(t))&&(u=t,h(this,u),!e(u[OfficeExtension.Constants.items])))for(this.m__items=[],f=u[OfficeExtension.Constants.items],r=0;r6&&i.slice(0,5)===t.DateJSONPrefix&&i.slice(-1)===t.DateJSONSuffix&&(r=new Date(parseInt(i.slice(5,-1))),r)?r:i})},t._replaceDateWithStringDate=function(n){var i=JSON.stringify(n,function(n,i){return this[n]instanceof Date?t.DateJSONPrefix+this[n].getTime()+t.DateJSONSuffix:i});return JSON.parse(i)},Object.defineProperty(t.prototype,"key",{get:function(){return r("key",this.m_key,"Setting",this._isNull),this.m_key},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return r("value",this.m_value,"Setting",this._isNull),this.m_value},set:function(n){if(!e(n)){this.m_value=n;var i=t._replaceDateWithStringDate(n);f(this.context,this,"Value",i);return}this.m_value=n;f(this.context,this,"Value",n)},enumerable:!0,configurable:!0}),t.prototype.set=function(n,t){this._recursivelySet(n,t,["value"],[],[])},t.prototype.delete=function(){s(this.context,this,"Delete",0,[])},t.prototype._handleResult=function(i){if(n.prototype._handleResult.call(this,i),!e(i)){var r=i;h(this,r);u(r.Key)||(this.m_key=r.Key);u(r.Value)||(this.m_value=r.Value,this.m_value=t.replaceStringDateWithDate(this.m_value))}},t.prototype.load=function(n){return c(this,n),this},t.prototype.toJSON=function(){return{key:this.m_key,value:this.m_value}},t.DateJSONPrefix="Date(",t.DateJSONSuffix=")",t}(OfficeExtension.ClientObject);n.Setting=g;ct=function(i){function u(){i.apply(this,arguments)}return __extends(u,i),Object.defineProperty(u.prototype,"_className",{get:function(){return"NamedItemCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"items",{get:function(){return r("items",this.m__items,"NamedItemCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),u.prototype.add=function(i,r,u){return new n.NamedItem(this.context,t(this.context,this,"Add",0,[i,r,u],!1,!0,null))},u.prototype.addFormulaLocal=function(i,r,u){return new n.NamedItem(this.context,t(this.context,this,"AddFormulaLocal",0,[i,r,u],!1,!1,null))},u.prototype.getCount=function(){var t=s(this.context,this,"GetCount",1,[]),n=new OfficeExtension.ClientResult;return l(this,t,n),n},u.prototype.getItem=function(t){return new n.NamedItem(this.context,y(this.context,this,[t]))},u.prototype.getItemOrNullObject=function(i){return new n.NamedItem(this.context,t(this.context,this,"GetItemOrNullObject",1,[i],!1,!1,null))},u.prototype._handleResult=function(t){var u,f,r,o;if((i.prototype._handleResult.call(this,t),!e(t))&&(u=t,h(this,u),!e(u[OfficeExtension.Constants.items])))for(this.m__items=[],f=u[OfficeExtension.Constants.items],r=0;r"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"error",{get:function(){return r("error",this.m_error,"FunctionResult",this._isNull),this.m_error},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return r("value",this.m_value,"FunctionResult",this._isNull),this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){if(n.prototype._handleResult.call(this,t),!e(t)){var i=t;h(this,i);u(i.Error)||(this.m_error=i.Error);u(i.Value)||(this.m_value=i.Value)}},t.prototype.load=function(n){return c(this,n),this},t.prototype.toJSON=function(){return{error:this.m_error,value:this.m_value}},t}(OfficeExtension.ClientObject);n.FunctionResult=i;pu=function(n){function r(){n.apply(this,arguments)}return __extends(r,n),Object.defineProperty(r.prototype,"_className",{get:function(){return"Functions"},enumerable:!0,configurable:!0}),r.prototype.abs=function(n){return new i(this.context,t(this.context,this,"Abs",0,[n],!1,!0,null))},r.prototype.accrInt=function(n,r,u,f,e,o,s,h){return new i(this.context,t(this.context,this,"AccrInt",0,[n,r,u,f,e,o,s,h],!1,!0,null))},r.prototype.accrIntM=function(n,r,u,f,e){return new i(this.context,t(this.context,this,"AccrIntM",0,[n,r,u,f,e],!1,!0,null))},r.prototype.acos=function(n){return new i(this.context,t(this.context,this,"Acos",0,[n],!1,!0,null))},r.prototype.acosh=function(n){return new i(this.context,t(this.context,this,"Acosh",0,[n],!1,!0,null))},r.prototype.acot=function(n){return new i(this.context,t(this.context,this,"Acot",0,[n],!1,!0,null))},r.prototype.acoth=function(n){return new i(this.context,t(this.context,this,"Acoth",0,[n],!1,!0,null))},r.prototype.amorDegrc=function(n,r,u,f,e,o,s){return new i(this.context,t(this.context,this,"AmorDegrc",0,[n,r,u,f,e,o,s],!1,!0,null))},r.prototype.amorLinc=function(n,r,u,f,e,o,s){return new i(this.context,t(this.context,this,"AmorLinc",0,[n,r,u,f,e,o,s],!1,!0,null))},r.prototype.and=function(){for(var r=[],n=0;n0?i.push(t):t.tabIndex===0&&r.push(t):r.push(t);return i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;return r===0&&(r=i.indexOf(n)-i.indexOf(t)),r}),[].concat(i,r)}var o="focus",s="on",k="configurable",d="writable",h="enumerable",u="",c="undefined",t=!1,i=!0,l=2147483647,n=null,r=-1,a=r,g="&_xdm_Info=",nt="&_serializer_version=",tt="_xdm_",ft="_serializer_version=",v="#",it="&",f="class",y={},et=3e4,p=n,w=n,e=(new Date).getTime();return{set_entropy:function(n){var t,r,i;if(typeof n=="string")for(t=0;t6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(r)===OSF.DDA.SettingsManager.DataJSONSuffix&&(i=new Date(parseInt(t.slice(5,r))),i)?i:t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,i);f[u]=t}catch(e){}}return f},loadScript:function(r,u,f){var s,e,o,h,c;r&&u&&(s=window.document,e=y[r],e?e.loaded?u():e.pendingCallbacks.push(u):(o=s.createElement("script"),o.type="text/javascript",e={loaded:t,pendingCallbacks:[u],timer:n},y[r]=e,h=function(){var r,t,u;for(e.timer!=n&&(clearTimeout(e.timer),delete e.timer),e.loaded=i,r=e.pendingCallbacks.length,t=0;t1?l[l.length-1]:n,s,h,c,a;return u&&o!=n&&(o.indexOf(it)>=0&&(o=o.split(it)[0]),o=decodeURIComponent(o)),s=b(),!f&&s&&(h=window.name.indexOf(i),h>r&&(c=window.name.indexOf(";",h),c==r&&(c=window.name.length),a=window.name.substring(h,c),o?s.setItem(a,o):o=s.getItem(a))),o},getConversationId:function(){var i=window.location.search,t=n,r;return i&&(r=i.indexOf("&"),t=r>0?i.substring(1,r):i.substr(1),t&&t.charAt(t.length-1)==="="&&(t=t.substring(0,t.length-1),t&&(t=decodeURIComponent(t)))),t},getInfoItems:function(n){var t=n.split("$");return typeof t[1]==c&&(t=n.split("|")),typeof t[1]==c&&(t=n.split("%7C")),t},getXdmFieldValue:function(n,t){var r=u,f=OSF.OUtil.parseXdmInfo(t),i;if(f&&(i=OSF.OUtil.getInfoItems(f),i!=undefined&&i.length>=3))switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]),f;if(u)throw u;for(f in r)if(u=Function._validateParameter(n[f],r[f],f),u)throw u;},writeProfilerMark:function(n){window.msWriteProfilerMark&&(window.msWriteProfilerMark(n),OsfMsAjaxFactory.msAjaxDebug.trace(n))},outputDebug:function(n){typeof OsfMsAjaxFactory!==c&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){var e,f;r=r||{};for(e in u)f=u[e],r[f]==undefined&&(r[f]=i);return Object.defineProperty(n,t,r),n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[h])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[h])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[d,h,k])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[d,h,k])},finalizeProperties:function(n,r){var e,u;r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8,e=o&255,i[t++]=r>>2,i[t++]=(r&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63,isNaN(o)||(r=o>>8,f=h&255,e=h>>8,i[t++]=r>>2,i[t++]=(r&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63),isNaN(o)?i[t-1]=64:isNaN(h)&&(i[t-2]=64,i[t-1]=64),c=0;c0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){var u,i,f,r;if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(u=[],i=0;in)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=ut(u),e=f?u.length-1:0,u.length===0)return n;while(!h&&e>=0&&en)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=ut(u),l=y(u,f),s=v(u.length,l,e),s<0)return n;while(!c&&s>=0&&s0;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[r%16],r=Math.floor(r/16);for(;t<32;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[Math.floor(Math.random()*16)];return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3};OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611,WordAndroid:8388613,PowerpointAndroid:8388614};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",Reserved:"reserved",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData",Base64:"base64"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidOpenBrowserWindow:102,dispidCreateDocumentMethod:105,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];return i?(i.name||(i.name=n[this.errorCodes.ooeInternalError].name),i.message||(i.message=n[this.errorCodes.ooeInternalError].message)):i=n[this.errorCodes.ooeInternalError],i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:t.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:t.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:t.L_SSOConnectionLostError,message:t.L_SSOConnectionLostErrorMessage}}}}(),function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}(),r,i,h,u,c,l,f,a,e,v,y,p,w,b,o,k,d,g,s,nt,tt,it,rt;n.RequirementVersion=ut;r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){var f,u,e,i,r;if(n==undefined)return!1;if(t==undefined&&(t=0),f=this._setMap,u=f._sets,u.hasOwnProperty(n.toLowerCase())){e=u[n.toLowerCase()];try{if((i=this._getVersion(e),t=t+"",r=this._getVersion(t),i.major>0&&i.major>r.major)||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),i=0,r=0;if(t.length<2&&isNaN(Number(n)))throw u;else if(i=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(i)||isNaN(r))throw u;return{minor:r,major:i}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;h=function(n){function i(){n.call(this,{dialogapi:t})}return __extends(i,n),i}(i);n.DefaultDialogSetRequirement=h;u=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelClientDefaultSetRequirement=u;c=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(u);n.ExcelClientV1DefaultSetRequirement=c;l=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookClientDefaultSetRequirement=l;f=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return __extends(i,n),i}(i);n.WordClientDefaultSetRequirement=f;a=function(n){function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return __extends(i,n),i}(f);n.WordClientV1DefaultSetRequirement=a;e=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointClientDefaultSetRequirement=e;v=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(e);n.PowerpointClientV1DefaultSetRequirement=v;y=function(n){function i(){n.call(this,{selection:t,textcoercion:t})}return __extends(i,n),i}(i);n.ProjectClientDefaultSetRequirement=y;p=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return __extends(i,n),i}(i);n.ExcelWebDefaultSetRequirement=p;w=function(n){function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordWebDefaultSetRequirement=w;b=function(n){function i(){n.call(this,{activeview:t,settings:t})}return __extends(i,n),i}(i);n.PowerpointWebDefaultSetRequirement=b;o=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookWebDefaultSetRequirement=o;k=function(n){function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.SwayWebDefaultSetRequirement=k;d=function(n){function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return __extends(i,n),i}(i);n.AccessWebDefaultSetRequirement=d;g=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelIOSDefaultSetRequirement=g;s=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordIOSDefaultSetRequirement=s;nt=function(n){function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return __extends(t,n),t}(s);n.WordIOSV1DefaultSetRequirement=nt;tt=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointIOSDefaultSetRequirement=tt;it=function(n){function i(){n.call(this,{mailbox:t})}return __extends(i,n),i}(i);n.OutlookIOSDefaultSetRequirement=it;rt=function(){function n(){}var t="undefined";return n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},n.getDefaultRequirementMatrix=function(u){var f,e,s,o;return this.initializeDefaultSetMatrix(),f=undefined,e=u.get_requirementMatrix(),e!=undefined&&e.length>0&&typeof JSON!==t?(s=JSON.parse(u.get_requirementMatrix().toLowerCase()),f=new r(new i(s))):(o=n.getClientFullVersionString(u),f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[o]!=undefined?new r(n.DefaultSetArrayMatrix[o]):new r(new i({}))),f},n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix(),e;return f!=undefined&&f.length>0&&typeof JSON!==t?(e=JSON.parse(n.get_requirementMatrix().toLowerCase()),u=new r(new i(e))):u=new r(new h),u},n.getClientFullVersionString=function(n){var i=n.get_appMinorVersion(),u="",r="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;return f&&n.get_appVersion()==1?r=t==4096&&i>=15?"16.00.01":"16.00":n.get_appName()==64?r=n.get_appVersion():(u=i<10?"0"+i:""+i,r=n.get_appVersion()+"."+u),n.get_appName()+"-"+r},n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new c;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new v;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new l;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new w;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new b;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new g;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new k;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new nt;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new tt;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new it},n.Excel_RCLIENT_1600="1-16.00",n.Excel_RCLIENT_1601="1-16.01",n.Word_RCLIENT_1600="2-16.00",n.Word_RCLIENT_1601="2-16.01",n.PowerPoint_RCLIENT_1600="4-16.00",n.PowerPoint_RCLIENT_1601="4-16.01",n.Outlook_RCLIENT_1600="8-16.00",n.Excel_WAC_1600="16-16.00",n.Word_WAC_1600="32-16.00",n.Outlook_WAC_1600="64-16.00",n.Outlook_WAC_1601="64-16.01",n.Project_RCLIENT_1600="128-16.00",n.Access_WAC_1600="256-16.00",n.PowerPoint_WAC_1600="512-16.00",n.Excel_IOS_1600="1024-16.00",n.SWAY_WAC_1600="2048-16.00",n.Word_IOS_1600="4096-16.00",n.Word_IOS_16001="4096-16.00.01",n.PowerPoint_IOS_1600="8192-16.00",n.Outlook_IOS_1600="65536-16.00",n.DefaultSetArrayMatrix={},n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))}(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}return n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n},n.getInstance=function(){return n.hostObj===undefined&&(n.hostObj=new n),n.hostObj},n.prototype.getPlatform=function(){var n=this,t;return n.hostInfo.hostPlatform&&(t=n.hostInfo.hostPlatform.toLowerCase(),n.platformRemappings[t])?n.platformRemappings[t]:null},n.prototype.getHost=function(){var n=this,t;if(n.hostInfo.hostType){if(t=n.hostInfo.hostType.toLowerCase(),n.camelCaseMappings[t])return n.camelCaseMappings[t];if(t=n.capitalizeFirstLetter(n.hostInfo.hostType),Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null},n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null},n}();n.Host=t})(t=n.HostName||(n.HostName={}))}(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){n||(window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,n=!0)},disableShortcut:function(){n&&(t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window),n=!1)}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i,r,o,u,f,e;if(n&&typeof n=="string"&&(r=n.indexOf("#"),r!=-1)){o=n.substring(0,r);u=n.substring(r+1);switch(o){case"binding":case"bindings":u&&(i=new OSF.DDA.BindingPromise(u))}}if(i)return i.onFail=t,i;else if(t)if(f=typeof t,f=="function")e={},e[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(e,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext));else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f);};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this,s,e;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.auth&&OSF.OUtil.defineEnumerableProperty(f,"auth",{value:n.auth});n.application&&OSF.OUtil.defineEnumerableProperty(f,"application",{value:n.application});n.get_isDialog()?(e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e})):(t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t}),r&&(s=r.displayName||"appOM",delete r.displayName,OSF.OUtil.defineEnumerableProperty(f,s,{value:r})),u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}}),e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e}))};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Application=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this,u;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;return OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext()),n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,e=n.length,o=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){var u,i,r;for(u in n){if(i=n[u],r=t[u],i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw o();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw o();}};f.extractRequiredArguments=function(t,i,r){var f,u,h,s,c,l;if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(c=n.length-1;c>=s;c--){l=n[c];switch(typeof l){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=l;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}if(f=o.fillOptions(f,i,r,u),e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;return o.verifyArguments(t,f),f}var h="function",s=n.length,o=new OSF.DDA.ApiMethodCall(n,t,i,f,e);this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),u=c(n,r,t,i);return o.constructCallArgs(r,u,t,i)};this.processResponse=function(n,t,i,f){return n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n)};this.getCallArgs=function(n){for(var t,u,r,i=n.length-1;i>=s;i--){r=n[i];switch(typeof r){case"object":t=r;break;case h:u=r}}return t=t||{},u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u),t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],i=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],t,i,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback],u,r;f&&(u={},u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?u[OSF.DDA.AsyncResultEnum.Properties.Value]=i:(r={},i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i),f(new OSF.DDA.AsyncResult(u,r)))};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.SyncMethodNames[t]=i};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){function o(n,i,r,u){var o,c,s,h;if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(s=n.length-1;s>=e;s--){h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}return o=f.fillOptions(o,i,r,u),f.verifyArguments(t,o),o}var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),u=o(n,r,t,i);return f.constructCallArgs(r,u,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){function e(i,f){var a=i?{}:undefined,s,h,o,v,c,l;for(s in i){if(h=i[s],OSF.DDA.ListType.isListType(s)){o=[];for(v in h)o.push(e(h[v],f))}else OSF.OUtil.listContainsKey(r,s)?o=r[s][f](h):f==u&&n.preserveNesting(s)?o=e(h,f):(c=t[s],c?(l=c[f],l&&(o=l[h],o===undefined&&(o=h))):o=h);a[s]=o}return a}function l(i,r){var e,u,h,s;for(u in r)h=n.isComplexType(u)?l(i,t[u][o]):i[u],h!=undefined&&(e||(e={}),s=r[u],s==f&&(s=u),e[s]=n.pack(u,h));return e}function s(i,r,e){var o,a,h,l,p,v,y;e||(e={});for(o in r){if(a=r[o],a==f)h=i;else if(a==c){e[o]=i.toArray();continue}else h=i[a];if(h===null||h===undefined)e[o]=undefined;else if(h=n.unpack(o,h),n.isComplexType(o))l=t[o][u],n.preserveNesting(o)?e[o]=s(h,l):s(h,l,e);else if(OSF.DDA.ListType.isListType(o)){l={};p=OSF.DDA.ListType.getDescriptor(o);l[p]=f;v=new Array(h.length);for(y in h)v[y]=s(h[y],l);e[o]=v}else e[o]=h}return e}function a(n,i,r){var f=t[n][r],u,o,c;return r=="toHost"?(o=e(i,r),u=l(o,f)):r==h&&(c=s(i,f),u=e(c,r)),u}var h="fromHost",i=this,o="toHost",u=h,c="sourceData",f="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];t||(t={});i.addMapping=function(n,i){var e,h,c,l,r,s,a,v;if(i.map){e=i.map;h={};for(c in e)l=e[c],l==f&&(l=c),h[l]=c}else e=i.toHost,h=i.fromHost;if(r=t[n],r){s=r[o];for(a in s)e[a]=s[a];s=r[u];for(v in s)h[v]=s[v]}else r=t[n]={};r[o]=e;r[u]=h};i.toHost=function(n,t){return a(n,t,o)};i.fromHost=function(n,t){return a(n,t,u)};i.self=f;i.sourceData=c;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){return this.isDynamicType(n)?t[n].toHost(i):i};i.unpack=function(n,i){return this.isDynamicType(n)?t[n].fromHost(i):i}};OSF.DDA.getDecoratedParameterMap=function(n,t){function r(n){var i=null,r,t;if(n)for(i={},r=n.length,t=0;t1?i=u+c+t:s.length>0&&(i=u+f+h+t),o?[i,r,o].join(""):i}function o(n){if(!n)return null;var t=document.createElement("a");return t.href=n,t.protocol+"//"+t.host}function s(){try{for(var i=["Windows NT 6.1","Windows NT 6.2","Windows NT 6.3"],r=window.navigator.userAgent,n=0,u=i.length;n-1)return t();return!1}catch(f){return OsfMsAjaxFactory.msAjaxDebug.trace("Error happens in shouldUseLocalStorageToPassMessage: "+f),!1}}function t(){try{var n=window.navigator.userAgent;return n.indexOf("MSIE ")>-1||n.indexOf("Trident/")>-1||n.indexOf("Edge/")>-1}catch(t){return OsfMsAjaxFactory.msAjaxDebug.trace("Error happens in isInternetExplorer: "+t),!1}}var i="^https://[a-z0-9-]+.(officeapps.live|officeapps-df.live|partner.officewebapps).com/";n.parseAppContextFromWindowName=r;n.serializeObjectToString=u;n.isHostTrusted=f;n.addHostInfoAsQueryParam=e;n.getDomainForUrl=o;n.shouldUseLocalStorageToPassMessage=s;n.isInternetExplorer=t})(t=n.WACUtils||(n.WACUtils={}))}(OfficeExt||(OfficeExt={})),function(n){var e="\n",i=!0,t=null,r="undefined",h=function(){function n(){}return n.isInstanceOfType=function(n,u){if(typeof u===r||u===t)return!1;if(u instanceof n)return i;var f=u.constructor;return f&&typeof f=="function"&&f.__typeName&&f.__typeName!=="Object"||(f=Object),!!(f===n)||f.__typeName&&n.__typeName&&f.__typeName===n.__typeName},n}(),o,u,s,f;n.MsAjaxTypeHelper=h;o=function(){function n(){}var i="Parameter name: {0}";return n.create=function(n,t){var i=new Error(n),r;if(i.message=n,t)for(r in t)i[r]=t[r];return i.popStackFrame(),i},n.parameterCount=function(t){var r="Sys.ParameterCountException: "+(t?t:"Parameter count mismatch."),i=n.create(r,{name:"Sys.ParameterCountException"});return i.popStackFrame(),i},n.argument=function(t,r){var o="Sys.ArgumentException: "+(r?r:"Value does not fall within the expected range."),f;return t&&(o+=e+u.format(i,t)),f=n.create(o,{name:"Sys.ArgumentException",paramName:t}),f.popStackFrame(),f},n.argumentNull=function(t,r){var o="Sys.ArgumentNullException: "+(r?r:"Value cannot be null."),f;return t&&(o+=e+u.format(i,t)),f=n.create(o,{name:"Sys.ArgumentNullException",paramName:t}),f.popStackFrame(),f},n.argumentOutOfRange=function(f,o,s){var h="Sys.ArgumentOutOfRangeException: "+(s?s:"Specified argument was out of the range of valid values."),c;return f&&(h+=e+u.format(i,f)),typeof o!==r&&o!==t&&(h+=e+u.format("Actual value was {0}.",o)),c=n.create(h,{name:"Sys.ArgumentOutOfRangeException",paramName:f,actualValue:o}),c.popStackFrame(),c},n.argumentType=function(t,r,f,o){var s="Sys.ArgumentTypeException: ",h;return s+=o?o:r&&f?u.format("Object of type '{0}' cannot be converted to type '{1}'.",r.getName?r.getName():r,f.getName?f.getName():f):"Object cannot be converted to the required type.",t&&(s+=e+u.format(i,t)),h=n.create(s,{name:"Sys.ArgumentTypeException",paramName:t,actualType:r,expectedType:f}),h.popStackFrame(),h},n.argumentUndefined=function(t,r){var o="Sys.ArgumentUndefinedException: "+(r?r:"Value cannot be undefined."),f;return t&&(o+=e+u.format(i,t)),f=n.create(o,{name:"Sys.ArgumentUndefinedException",paramName:t}),f.popStackFrame(),f},n.invalidOperation=function(t){var r="Sys.InvalidOperationException: "+(t?t:"Operation is not valid due to the current state of the object."),i=n.create(r,{name:"Sys.InvalidOperationException"});return i.popStackFrame(),i},n}();n.MsAjaxError=o;u=function(){function n(){}return n.format=function(n){for(var r,i=[],t=1;t0){for(r=[],i=0;i=s)break;if(f=Function._validateParameter(n[e],o,h),f)return f.popStackFrame(),f}return t}),Function._validateParameterCount||(Function._validateParameterCount=function(n,r,u){var f,s,e=r.length,h=n.length,c,l,a;if(he)for(s=i,f=0;f0){var t=h.shift();d(t)}else clearInterval(u),u=n}else OsfMsAjaxFactory.msAjaxDebug.trace(v)}function d(n){o=n.getInvokeBlockingFlag();n.invoke();c=(new Date).getTime()}function ot(){var r,u,s,e,h,o,t;if(f){u=0;s=new Date;for(h in i){r=i[h];for(o in r._callbackList)if(t=r._callbackList[o],e=t.timeout?t.timeout:b,e>=0&&Math.abs(s.getTime()-t.createdOn)>=e)try{t.callback&&t.callback(Microsoft.Office.Common.InvokeResultCode.errorHandlingMethodCallTimedout,n)}finally{delete r._callbackList[o]}else u++}u===0&&(clearInterval(f),f=n)}else OsfMsAjaxFactory.msAjaxDebug.trace(v)}function st(){o=t}function ht(n){if(window.addEventListener)window.addEventListener("message",n,t);else if(navigator.userAgent.indexOf("MSIE")>-1&&window.attachEvent)window.attachEvent("onmessage",n);else{OsfMsAjaxFactory.msAjaxDebug.trace("Browser doesn't support the required API.");throw OsfMsAjaxFactory.msAjaxError.argument("Browser");}}function ct(n,i){var f=t,r,u;return n===e?e:!n||!i||!n.length||!i.length?f:(r=document.createElement("a"),u=document.createElement("a"),r.href=n,u.href=i,f=g(r,u),delete r,u,f)}function l(n,i){var u=t,f,e,r;if(!i||!i.length||!n||!(n instanceof Array)||!n.length)return u;for(f=document.createElement("a"),e=document.createElement("a"),f.href=i,r=0;rp)&&!o?(d(ht),lt=t):u=setInterval(et,p));lt&&ft(ht)}catch(w){s&&s._onHandleRequestError&&s._onHandleRequestError(r,w);nt=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequest;w==tt&&(nt=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied);var pt=new Microsoft.Office.Common.Response(r._actionName,r._conversationId,r._correlationId,nt,Microsoft.Office.Common.ResponseType.forCalling,w),wt=Microsoft.Office.Common.MessagePackager.envelope(pt,f),at=t;try{at=!!(i.source&&i.source.postMessage)}catch(w){}at&&i.source.postMessage(wt,b)}}else if(r._messageType===Microsoft.Office.Common.MessageType.response){if(h=rt(r._conversationId),!h)return;if(h._serializerVersion=f,!ct(h._targetUrl,i.origin))throw"Failed orgin check";if(r._responseType===Microsoft.Office.Common.ResponseType.forCalling){if(v=h._callbackList[r._correlationId],v)try{v.callback&&v.callback(r._errorCode,r._data)}finally{delete h._callbackList[r._correlationId]}}else y=h._eventHandlerList[r._actionName],y!==undefined&&y!==n&&y(r._data)}else return}}function nt(){k||(ht(lt),k=e)}var a="serviceEndPointId",e=!0,v="channel is not ready.",s="conversationId",y="Unknown conversation Id.",t=!1,n=null,h=[],c=n,u=n,p=10,o=t,f=n,tt=2e3,w=65e3,b=w,r={},i={},k=t;return{connect:function(n,t,r,u){var f=i[n];return f||(nt(),f=new Microsoft.Office.Common.ClientEndPoint(n,t,r,u),i[n]=f),f},getClientEndPoint:function(n){var r=Function._validateParams(arguments,[{name:s,type:String,mayBeNull:t}]);if(r)throw r;return i[n]},createServiceEndPoint:function(n){nt();var t=new Microsoft.Office.Common.ServiceEndPoint(n);return r[n]=t,t},getServiceEndPoint:function(n){var i=Function._validateParams(arguments,[{name:a,type:String,mayBeNull:t}]);if(i)throw i;return r[n]},deleteClientEndPoint:function(n){var r=Function._validateParams(arguments,[{name:s,type:String,mayBeNull:t}]);if(r)throw r;delete i[n]},deleteServiceEndPoint:function(n){var i=Function._validateParams(arguments,[{name:a,type:String,mayBeNull:t}]);if(i)throw i;delete r[n]},checkUrlWithAppDomains:function(n,t){return l(n,t)},_setMethodTimeout:function(n){var i=Function._validateParams(arguments,[{name:"methodTimeout",type:Number,mayBeNull:t}]);if(i)throw i;b=n<=0?w:n},_startMethodTimeoutTimer:function(){f||(f=setInterval(ot,tt))}}}();Microsoft.Office.Common.Message=function(n,t,i,r,u){var e=!1,f=this,o=Function._validateParams(arguments,[{name:"messageType",type:Number,mayBeNull:e},{name:"actionName",type:String,mayBeNull:e},{name:"conversationId",type:String,mayBeNull:e},{name:"correlationId",mayBeNull:e},{name:"data",mayBeNull:!0,optional:!0}]);if(o)throw o;f._messageType=n;f._actionName=t;f._conversationId=i;f._correlationId=r;f._origin=window.location.href;f._data=typeof u=="undefined"?null:u};Microsoft.Office.Common.Message.prototype={getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getOrigin:function(){return this._origin},getData:function(){return this._data},getMessageType:function(){return this._messageType}};Microsoft.Office.Common.Request=function(n,t,i,r,u){Microsoft.Office.Common.Request.uber.constructor.call(this,Microsoft.Office.Common.MessageType.request,n,i,r,u);this._actionType=t};OSF.OUtil.extend(Microsoft.Office.Common.Request,Microsoft.Office.Common.Message);Microsoft.Office.Common.Request.prototype.getActionType=function(){return this._actionType};Microsoft.Office.Common.Response=function(n,t,i,r,u,f){Microsoft.Office.Common.Response.uber.constructor.call(this,Microsoft.Office.Common.MessageType.response,n,t,i,f);this._errorCode=r;this._responseType=u};OSF.OUtil.extend(Microsoft.Office.Common.Response,Microsoft.Office.Common.Message);Microsoft.Office.Common.Response.prototype.getErrorCode=function(){return this._errorCode};Microsoft.Office.Common.Response.prototype.getResponseType=function(){return this._responseType};Microsoft.Office.Common.MessagePackager={envelope:function(n){return typeof n=="object"&&(n._serializerVersion=OSF.SerializerVersion.Browser),JSON.stringify(n)},unenvelope:function(n){return JSON.parse(n)}};Microsoft.Office.Common.ResponseSender=function(n,t,i,r,u,f,e){var h=!1,o=this,c=Function._validateParams(arguments,[{name:"requesterWindow",mayBeNull:h},{name:"requesterUrl",type:String,mayBeNull:h},{name:"actionName",type:String,mayBeNull:h},{name:"conversationId",type:String,mayBeNull:h},{name:"correlationId",mayBeNull:h},{name:"responsetype",type:Number,maybeNull:h},{name:"serializerVersion",type:Number,maybeNull:!0,optional:!0}]),s;if(c)throw c;o._requesterWindow=n;o._requesterUrl=t;o._actionName=i;o._conversationId=r;o._correlationId=u;o._invokeResultCode=Microsoft.Office.Common.InvokeResultCode.noError;o._responseType=f;s=o;o._send=function(n){try{var t=new Microsoft.Office.Common.Response(s._actionName,s._conversationId,s._correlationId,s._invokeResultCode,s._responseType,n),i=Microsoft.Office.Common.MessagePackager.envelope(t,e);s._requesterWindow.postMessage(i,s._requesterUrl)}catch(r){OsfMsAjaxFactory.msAjaxDebug.trace("ResponseSender._send error:"+r.message)}}};Microsoft.Office.Common.ResponseSender.prototype={getRequesterWindow:function(){return this._requesterWindow},getRequesterUrl:function(){return this._requesterUrl},getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getSend:function(){return this._send},setResultCode:function(n){this._invokeResultCode=n}};Microsoft.Office.Common.InvokeCompleteCallback=function(n,t,i,r,u,f,e){var s=this,o;Microsoft.Office.Common.InvokeCompleteCallback.uber.constructor.call(s,n,t,i,r,u,Microsoft.Office.Common.ResponseType.forCalling,e);s._postCallbackHandler=f;o=s;s._send=function(n,t){t!=undefined&&(o._invokeResultCode=t);try{var i=new Microsoft.Office.Common.Response(o._actionName,o._conversationId,o._correlationId,o._invokeResultCode,o._responseType,n),r=Microsoft.Office.Common.MessagePackager.envelope(i,e);o._requesterWindow.postMessage(r,o._requesterUrl);o._postCallbackHandler()}catch(u){OsfMsAjaxFactory.msAjaxDebug.trace("InvokeCompleteCallback._send error:"+u.message)}}};OSF.OUtil.extend(Microsoft.Office.Common.InvokeCompleteCallback,Microsoft.Office.Common.ResponseSender);Microsoft.Office.Common.Invoker=function(n,t,i,r,u,f,e){var s=!0,h=!1,o=this,c=Function._validateParams(arguments,[{name:"methodObject",mayBeNull:h},{name:"paramValue",mayBeNull:s},{name:"invokeCompleteCallback",mayBeNull:h},{name:"eventHandlerProxyList",mayBeNull:s},{name:"conversationId",type:String,mayBeNull:h},{name:"eventName",type:String,mayBeNull:h},{name:"serializerVersion",type:Number,mayBeNull:s,optional:s}]);if(c)throw c;o._methodObject=n;o._param=t;o._invokeCompleteCallback=i;o._eventHandlerProxyList=r;o._conversationId=u;o._eventName=f;o._serializerVersion=e};Microsoft.Office.Common.Invoker.prototype={invoke:function(){var n=this,t,i,u,r,f;try{switch(n._methodObject.getInvokeType()){case Microsoft.Office.Common.InvokeType.async:n._methodObject.getMethod()(n._param,n._invokeCompleteCallback.getSend());break;case Microsoft.Office.Common.InvokeType.sync:t=n._methodObject.getMethod()(n._param);n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.syncRegisterEvent:i=n._createEventHandlerProxyObject(n._invokeCompleteCallback);t=n._methodObject.getMethod()(i.getSend(),n._param);n._eventHandlerProxyList[n._conversationId+n._eventName]=i.getSend();n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.syncUnregisterEvent:u=n._eventHandlerProxyList[n._conversationId+n._eventName];t=n._methodObject.getMethod()(u,n._param);delete n._eventHandlerProxyList[n._conversationId+n._eventName];n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.asyncRegisterEvent:r=n._createEventHandlerProxyObject(n._invokeCompleteCallback);n._methodObject.getMethod()(r.getSend(),n._invokeCompleteCallback.getSend(),n._param);n._eventHandlerProxyList[n._callerId+n._eventName]=r.getSend();break;case Microsoft.Office.Common.InvokeType.asyncUnregisterEvent:f=n._eventHandlerProxyList[n._callerId+n._eventName];n._methodObject.getMethod()(f,n._invokeCompleteCallback.getSend(),n._param);delete n._eventHandlerProxyList[n._callerId+n._eventName]}}catch(e){n._invokeCompleteCallback.setResultCode(Microsoft.Office.Common.InvokeResultCode.errorInResponse);n._invokeCompleteCallback.getSend()(e)}},getInvokeBlockingFlag:function(){return this._methodObject.getBlockingFlag()},_createEventHandlerProxyObject:function(n){return new Microsoft.Office.Common.ResponseSender(n.getRequesterWindow(),n.getRequesterUrl(),n.getActionName(),n.getConversationId(),n.getCorrelationId(),Microsoft.Office.Common.ResponseType.forEventing,this._serializerVersion)}};OSF.OUtil.setNamespace("WAC",OSF.DDA);OSF.DDA.WAC.UniqueArguments={Data:"Data",Properties:"Properties",BindingRequest:"DdaBindingsMethod",BindingResponse:"Bindings",SingleBindingResponse:"singleBindingResponse",GetData:"DdaGetBindingData",AddRowsColumns:"DdaAddRowsColumns",SetData:"DdaSetBindingData",ClearFormats:"DdaClearBindingFormats",SetFormats:"DdaSetBindingFormats",SettingsRequest:"DdaSettingsMethod",BindingEventSource:"ddaBinding",ArrayData:"ArrayData"};OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC);OSF.DDA.WAC.Delegate.SpecialProcessor=function(){var n=[OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,OSF.DDA.WAC.UniqueArguments.BindingRequest,OSF.DDA.WAC.UniqueArguments.BindingResponse,OSF.DDA.WAC.UniqueArguments.GetData,OSF.DDA.WAC.UniqueArguments.AddRowsColumns,OSF.DDA.WAC.UniqueArguments.SetData,OSF.DDA.WAC.UniqueArguments.ClearFormats,OSF.DDA.WAC.UniqueArguments.SetFormats,OSF.DDA.WAC.UniqueArguments.SettingsRequest,OSF.DDA.WAC.UniqueArguments.BindingEventSource],t={};OSF.DDA.WAC.Delegate.SpecialProcessor.uber.constructor.call(this,n,t)};OSF.OUtil.extend(OSF.DDA.WAC.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.WAC.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.WAC.Delegate.SpecialProcessor,[]);OSF.OUtil.setNamespace("WAC",OSF.DDA);OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC);OSF.DDA.WAC.getDelegateMethods=function(){var n={};return n[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.WAC.Delegate.executeAsync,n[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.WAC.Delegate.registerEventAsync,n[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.WAC.Delegate.unregisterEventAsync,n[OSF.DDA.DispIdHost.Delegates.OpenDialog]=OSF.DDA.WAC.Delegate.openDialog,n[OSF.DDA.DispIdHost.Delegates.MessageParent]=OSF.DDA.WAC.Delegate.messageParent,n[OSF.DDA.DispIdHost.Delegates.SendMessage]=OSF.DDA.WAC.Delegate.sendMessage,n[OSF.DDA.DispIdHost.Delegates.CloseDialog]=OSF.DDA.WAC.Delegate.closeDialog,n};OSF.DDA.WAC.Delegate.version=1;OSF.DDA.WAC.Delegate.executeAsync=function(n){(n.hostCallArgs||(n.hostCallArgs={}),n.hostCallArgs.DdaMethod={ControlId:OSF._OfficeAppFactory.getId(),Version:OSF.DDA.WAC.Delegate.version,DispatchId:n.dispId},n.hostCallArgs.__timeout__=-1,n.onCalling&&n.onCalling(),OSF.getClientEndPoint())&&OSF.getClientEndPoint().invoke("executeMethod",function(t,i){n.onReceiving&&n.onReceiving();var r;if(t==Microsoft.Office.Common.InvokeResultCode.noError)OSF.DDA.WAC.Delegate.version=i.Version,r=i.Error;else switch(t){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:r=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:r=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}n.onComplete&&n.onComplete(r,i)},n.hostCallArgs)};OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent=function(n,t){var i=(new Date).getTime();return function(r,u){t.onReceiving&&t.onReceiving();var f;if(r!=Microsoft.Office.Common.InvokeResultCode.noError)switch(r){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:f=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:f=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}else f=u?u.Error?u.Error:OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess:OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;t.onComplete&&t.onComplete(f);OSF.AppTelemetry&&OSF.AppTelemetry.onRegisterDone(n,t.dispId,Math.abs((new Date).getTime()-i),f)}};OSF.DDA.WAC.Delegate.registerEventAsync=function(n){(n.onCalling&&n.onCalling(),OSF.getClientEndPoint())&&OSF.getClientEndPoint().registerForEvent(OSF.DDA.getXdmEventName(n.targetId,n.eventType),function(t){n.onEvent&&n.onEvent(t);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!0,n),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:n.dispId,targetId:n.targetId})};OSF.DDA.WAC.Delegate.unregisterEventAsync=function(n){(n.onCalling&&n.onCalling(),OSF.getClientEndPoint())&&OSF.getClientEndPoint().unregisterForEvent(OSF.DDA.getXdmEventName(n.targetId,n.eventType),OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!1,n),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:n.dispId,targetId:n.targetId})};OSF.OUtil.setNamespace("WebApp",OSF);OSF.WebApp.AddHostInfoAndXdmInfo=function(n){return OSF._OfficeAppFactory.getWindowLocationSearch&&OSF._OfficeAppFactory.getWindowLocationHash?n+OSF._OfficeAppFactory.getWindowLocationSearch()+OSF._OfficeAppFactory.getWindowLocationHash():n};OSF.WebApp._UpdateLinksForHostAndXdmInfo=function(){for(var r,i,t=document.querySelectorAll("a[data-officejs-navigate]"),n=0;n0?n.substr(0,i):null,r=t!==null?t.toLowerCase()==="http"||t.toLowerCase()==="https":!0;return r&&n!="#"&&n!="/"&&n!=""&&n!=OSF._OfficeAppFactory.getWebAppState().webAppUrl};OSF.InitializationHelper=function(n,t,i,r,u){var f=this,e;f._hostInfo=n;f._webAppState=t;f._context=i;f._settings=r;f._hostFacade=u;f._appContext={};f._tabbableElements="a[href]:not([tabindex='-1']),area[href]:not([tabindex='-1']),button:not([disabled]):not([tabindex='-1']),input:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),textarea:not([disabled]):not([tabindex='-1']),*[tabindex]:not([tabindex='-1']),*[contenteditable]:not([disabled]):not([tabindex='-1'])";f._initializeSettings=function(n,t){var r=n.get_settings(),u=OSF.OUtil.getSessionStorage(),i,f;return u&&(i=u.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey()),i?r=JSON.parse(i):(i=JSON.stringify(r),u.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),i))),f=OSF.DDA.SettingsManager.deserializeSettings(r),t?new OSF.DDA.RefreshableSettings(f):new OSF.DDA.Settings(f)};e=function(n){var t=window.open;n.open=function(n,i,r){var u=null,f;try{u=t(n,i,r)}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppCommonMessage("Exception happens at windowOpen."+e)}return u||(f={strUrl:n,strWindowName:i,strWindowFeatures:r},OSF._OfficeAppFactory.getClientEndPoint()&&OSF._OfficeAppFactory.getClientEndPoint().invoke("ContextActivationManager_openWindowInHost",null,f)),u}};e(window)};OSF.InitializationHelper.prototype.saveAndSetDialogInfo=function(n){var u="IsDialog",t=!0,f=function(){var n=OSF.OUtil.parseXdmInfo(t),i;return n?(i=n.split("|"),i[1]):null},i=OSF.OUtil.getSessionStorage(),r;if(i){if(n||(n=OSF.OUtil.parseHostInfoFromWindowName(t,OSF._OfficeAppFactory.getWindowName())),n&&n.indexOf("isDialog")>-1){r=f();r!=null&&i.setItem(r+u,"true");this._hostInfo.isDialog=t;return}this._hostInfo.isDialog=i.getItem(OSF.OUtil.getXdmFieldValue(OSF.XdmFieldName.AppId,!1)+u)!=null?t:!1}};OSF.InitializationHelper.prototype.getAppContext=function(n,t){var i=this,e=i,r=function(n,i){var u,f,c,o,s,r,h;if(i._appName===OSF.AppName.ExcelWebApp){f=i._settings;u={};for(c in f)o=f[c],u[o[0]]=o[1]}else u=i._settings;if(n===0&&i._id!=undefined&&i._appName!=undefined&&i._appVersion!=undefined&&i._appUILocale!=undefined&&i._dataLocale!=undefined&&i._docUrl!=undefined&&i._clientMode!=undefined&&i._settings!=undefined&&i._reason!=undefined){e._appContext=i;var a=i._appInstanceId?i._appInstanceId:i._id,v=!1,y=!0,l=0;i._appMinorVersion!=undefined&&(l=i._appMinorVersion);s=undefined;i._requirementMatrix!=undefined&&(s=i._requirementMatrix);i.eToken=i.eToken?i.eToken:"";r=new OSF.OfficeAppContext(i._id,i._appName,i._appVersion,i._appUILocale,i._dataLocale,i._docUrl,i._clientMode,u,i._reason,i._osfControlType,i._eToken,i._correlationId,a,v,y,l,s,i._hostCustomMessage,i._hostFullVersion,i._clientWindowHeight,i._clientWindowWidth,i._addinName,i._appDomains,i._dialogRequirementMatrix);r._wacHostEnvironment=i._wacHostEnvironment||"0";r._isFromWacAutomation=!!i._isFromWacAutomation;OSF.AppTelemetry&&OSF.AppTelemetry.initialize(r);t(r)}else{h="Function ContextActivationManager_getAppContextAsync call failed. ErrorCode is "+n+", exception: "+i;OSF.AppTelemetry&&OSF.AppTelemetry.logAppException(h);throw h;}},u;try{i._hostInfo.isDialog&&window.opener!=null?(u=OfficeExt.WACUtils.parseAppContextFromWindowName(!1,OSF._OfficeAppFactory.getWindowName()),r(0,u)):i._webAppState.clientEndPoint.invoke("ContextActivationManager_getAppContextAsync",r,i._webAppState.id)}catch(f){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown when trying to invoke getAppContextAsync. Exception:["+f+"]");throw f;}};OSF.InitializationHelper.prototype.setAgaveHostCommunication=function(){var u=null,t=!1,n,r,i,f,e,o;try{if(n=this,r=OSF.OUtil.parseXdmInfoWithGivenFragment(t,OSF._OfficeAppFactory.getWindowLocationHash()),!r&&OSF._OfficeAppFactory.getWindowName&&(r=OSF.OUtil.parseXdmInfoFromWindowName(t,OSF._OfficeAppFactory.getWindowName())),r&&(i=OSF.OUtil.getInfoItems(r),i!=undefined&&i.length>=3&&(n._webAppState.conversationID=i[0],n._webAppState.id=i[1],n._webAppState.webAppUrl=i[2].indexOf(":")>=0?i[2]:decodeURIComponent(i[2]))),n._webAppState.wnd=window.opener!=u?window.opener:window.parent,f=OSF.OUtil.parseSerializerVersionWithGivenFragment(t,OSF._OfficeAppFactory.getWindowLocationHash()),isNaN(f)&&OSF._OfficeAppFactory.getWindowName&&(f=OSF.OUtil.parseSerializerVersionFromWindowName(t,OSF._OfficeAppFactory.getWindowName())),n._webAppState.serializerVersion=f,this._hostInfo.isDialog&&window.opener!=u)return;n._webAppState.clientEndPoint=Microsoft.Office.Common.XdmCommunicationManager.connect(n._webAppState.conversationID,n._webAppState.wnd,n._webAppState.webAppUrl,n._webAppState.serializerVersion);n._webAppState.serviceEndPoint=Microsoft.Office.Common.XdmCommunicationManager.createServiceEndPoint(n._webAppState.id);e=n._webAppState.conversationID+OSF.SharedConstants.NotificationConversationIdSuffix;n._webAppState.serviceEndPoint.registerConversation(e,n._webAppState.webAppUrl);o=function(i){var e="ContextActivationManager_notifyHost",r,f;switch(i){case OSF.AgaveHostAction.Select:n._webAppState.focused=!0;break;case OSF.AgaveHostAction.UnSelect:n._webAppState.focused=t;break;case OSF.AgaveHostAction.TabIn:case OSF.AgaveHostAction.CtrlF6In:window.focus();r=document.querySelectorAll(n._tabbableElements);f=OSF.OUtil.focusToFirstTabbable(r,t);f||(window.blur(),n._webAppState.focused=t,n._webAppState.clientEndPoint.invoke(e,u,[n._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable]));break;case OSF.AgaveHostAction.TabInShift:window.focus();r=document.querySelectorAll(n._tabbableElements);f=OSF.OUtil.focusToFirstTabbable(r,!0);f||(window.blur(),n._webAppState.focused=t,n._webAppState.clientEndPoint.invoke(e,u,[n._webAppState.id,OSF.AgaveHostAction.ExitNoFocusableShift]));break;default:OsfMsAjaxFactory.msAjaxDebug.trace("actionId "+i+" notifyAgave is wrong.")}};n._webAppState.serviceEndPoint.registerMethod("Office_notifyAgave",o,Microsoft.Office.Common.InvokeType.async,t);n.addOrRemoveEventListenersForWindow(!0)}catch(s){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown in setAgaveHostCommunication. Exception:["+s+"]");throw s;}};OSF.InitializationHelper.prototype.addOrRemoveEventListenersForWindow=function(n){var u="keypress",i=null,r="ContextActivationManager_notifyHost",t=this,f=function(){t._webAppState.focused||(t._webAppState.focused=!0);t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.Select])},e=function(){OSF&&(t._webAppState.focused&&(t._webAppState.focused=!1),t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.UnSelect]))},o=function(n){var u,f,e;n.preventDefault=n.preventDefault||function(){n.returnValue=!1};n.keyCode==117&&(n.ctrlKey||n.metaKey)?(u=OSF.AgaveHostAction.CtrlF6Exit,n.shiftKey&&(u=OSF.AgaveHostAction.CtrlF6ExitShift),t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,u])):n.keyCode==9?(n.preventDefault(),f=document.querySelectorAll(t._tabbableElements),e=OSF.OUtil.focusToNextTabbable(f,n.target||n.srcElement,n.shiftKey),e||(t._hostInfo.isDialog?OSF.OUtil.focusToFirstTabbable(f,n.shiftKey):n.shiftKey?t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.TabExitShift]):t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.TabExit]))):n.keyCode==27?(n.preventDefault(),t.dismissDialogNotification&&t.dismissDialogNotification(),t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.EscExit])):n.keyCode==113&&(n.preventDefault(),t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.F2Exit]))},s=function(n){n.keyCode==117&&n.ctrlKey&&(n.preventDefault?n.preventDefault():n.returnValue=!1)};n?(OSF.OUtil.addEventListener(window,"focus",f),OSF.OUtil.addEventListener(window,"blur",e),OSF.OUtil.addEventListener(window,"keydown",o),OSF.OUtil.addEventListener(window,u,s)):(OSF.OUtil.removeEventListener(window,"focus",f),OSF.OUtil.removeEventListener(window,"blur",e),OSF.OUtil.removeEventListener(window,"keydown",o),OSF.OUtil.removeEventListener(window,u,s))};OSF.InitializationHelper.prototype.initWebDialog=function(n){if(n.get_isDialog()){if(OSF.DDA.UI.ChildUI){var t=window.opener!=null;n.ui=new OSF.DDA.UI.ChildUI(t);t&&this.registerMessageReceivedEventForWindowDialog&&this.registerMessageReceivedEventForWindowDialog()}}else OSF.DDA.UI.ParentUI&&(n.ui=new OSF.DDA.UI.ParentUI,OfficeExt.Container&&OSF.DDA.DispIdHost.addAsyncMethods(n.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync]))};OSF.InitializationHelper.prototype.initWebAuth=function(n){OSF.DDA.Auth&&(n.auth=new OSF.DDA.Auth,OSF.DDA.DispIdHost.addAsyncMethods(n.auth,[OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]))};OSF.getClientEndPoint=function(){var n=OSF._OfficeAppFactory.getInitializationHelper();return n._webAppState.clientEndPoint};OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize=function(){var n=this,t,i;n._hostInfo.isDialog&&(window.focus(),t=document.querySelectorAll(n._tabbableElements),i=OSF.OUtil.focusToFirstTabbable(t,!1),i||(window.blur(),n._webAppState.focused=!1,n._webAppState.clientEndPoint&&n._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[n._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable])))};OSF.CommonUI={HostButtonBorderColor:"#86bfa0",HostButtonBackgroundColor:"#d3f0e0"},function(n){var u="ResponseTime",f="Message",i="SessionId",r="CorrelationId",t=!0,e=function(){function n(n){this._table=n;this._fields={}}return Object.defineProperty(n.prototype,"Fields",{get:function(){return this._fields},enumerable:t,configurable:t}),Object.defineProperty(n.prototype,"Table",{get:function(){return this._table},enumerable:t,configurable:t}),n.prototype.SerializeFields=function(){},n.prototype.SetSerializedField=function(n,t){typeof t!="undefined"&&t!==null&&(this._serializedFields[n]=t.toString())},n.prototype.SerializeRow=function(){var n=this;return n._serializedFields={},n.SetSerializedField("Table",n._table),n.SerializeFields(),JSON.stringify(n._serializedFields)},n}(),o,s,h,c,l;n.BaseUsageData=e;o=function(n){function u(){n.call(this,"AppActivated")}var e="IsFromWacAutomation",o="WacHostEnvironment",s="HostJSVersion",h="OfficeJSVersion",c="DocUrl",l="AppSizeHeight",a="AppSizeWidth",v="ClientId",y="HostVersion",p="Host",w="UserId",b="Browser",k="AssetId",d="AppURL",g="AppInstanceId",nt="AppId";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,nt,{get:function(){return this.Fields[nt]},set:function(n){this.Fields[nt]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,g,{get:function(){return this.Fields[g]},set:function(n){this.Fields[g]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,d,{get:function(){return this.Fields[d]},set:function(n){this.Fields[d]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,k,{get:function(){return this.Fields[k]},set:function(n){this.Fields[k]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,b,{get:function(){return this.Fields[b]},set:function(n){this.Fields[b]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,w,{get:function(){return this.Fields[w]},set:function(n){this.Fields[w]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,p,{get:function(){return this.Fields[p]},set:function(n){this.Fields[p]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,y,{get:function(){return this.Fields[y]},set:function(n){this.Fields[y]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,v,{get:function(){return this.Fields[v]},set:function(n){this.Fields[v]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,a,{get:function(){return this.Fields[a]},set:function(n){this.Fields[a]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,l,{get:function(){return this.Fields[l]},set:function(n){this.Fields[l]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,c,{get:function(){return this.Fields[c]},set:function(n){this.Fields[c]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(nt,n.AppId);n.SetSerializedField(g,n.AppInstanceId);n.SetSerializedField(d,n.AppURL);n.SetSerializedField(k,n.AssetId);n.SetSerializedField(b,n.Browser);n.SetSerializedField(w,n.UserId);n.SetSerializedField(p,n.Host);n.SetSerializedField(y,n.HostVersion);n.SetSerializedField(v,n.ClientId);n.SetSerializedField(a,n.AppSizeWidth);n.SetSerializedField(l,n.AppSizeHeight);n.SetSerializedField(f,n.Message);n.SetSerializedField(c,n.DocUrl);n.SetSerializedField(h,n.OfficeJSVersion);n.SetSerializedField(s,n.HostJSVersion);n.SetSerializedField(o,n.WacHostEnvironment);n.SetSerializedField(e,n.IsFromWacAutomation)},u}(e);n.AppActivatedUsageData=o;s=function(n){function f(){n.call(this,"ScriptLoad")}var e="StartTime",o="ScriptId";return __extends(f,n),Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t}),f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(o,n.ScriptId);n.SetSerializedField(e,n.StartTime);n.SetSerializedField(u,n.ResponseTime)},f}(e);n.ScriptLoadUsageData=s;h=function(n){function u(){n.call(this,"AppClosed")}var f="CloseMethod",e="OpenTime",o="AppSizeFinalHeight",s="AppSizeFinalWidth",h="FocusTime";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(h,n.FocusTime);n.SetSerializedField(s,n.AppSizeFinalWidth);n.SetSerializedField(o,n.AppSizeFinalHeight);n.SetSerializedField(e,n.OpenTime);n.SetSerializedField(f,n.CloseMethod)},u}(e);n.AppClosedUsageData=h;c=function(n){function f(){n.call(this,"APIUsage")}var e="ErrorType",o="Parameters",s="APIID",h="APIType";return __extends(f,n),Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(h,n.APIType);n.SetSerializedField(s,n.APIID);n.SetSerializedField(o,n.Parameters);n.SetSerializedField(u,n.ResponseTime);n.SetSerializedField(e,n.ErrorType)},f}(e);n.APIUsageUsageData=c;l=function(n){function u(){n.call(this,"AppInitialization")}var e="SuccessCode";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(e,n.SuccessCode);n.SetSerializedField(f,n.Message)},u}(e);n.AppInitializationUsageData=l}(OSFLog||(OSFLog={})),function(n){"use strict";function u(){OSF.Logger&&OSF.Logger.ulsEndpoint&&OSF.Logger.ulsEndpoint.loadProxyFrame()}function f(n,t,i){if(OSF.Logger&&OSF.Logger.ulsEndpoint){var r={traceLevel:n,message:t,flag:i,internalLog:!0},u=JSON.stringify(r);OSF.Logger.ulsEndpoint.writeLog(u)}}function e(){try{return new t}catch(n){return null}}var i,r,t;(function(n){n[n.info=0]="info";n[n.warning=1]="warning";n[n.error=2]="error"})(n.TraceLevel||(n.TraceLevel={}));i=n.TraceLevel,function(n){n[n.none=0]="none";n[n.flush=1]="flush"}(n.SendFlag||(n.SendFlag={}));r=n.SendFlag;n.allowUploadingData=u;n.sendLog=f;t=function(){function n(){var n=this,t=n;n.proxyFrame=null;n.telemetryEndPoint="https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html";n.buffer=[];n.proxyFrameReady=!1;OSF.OUtil.addEventListener(window,"message",function(n){return t.tellProxyFrameReady(n)});setTimeout(function(){t.loadProxyFrame()},3e3)}return n.prototype.writeLog=function(t){var i=this;i.proxyFrameReady===!0?i.proxyFrame.contentWindow.postMessage(t,n.telemetryOrigin):i.buffer.length<128&&i.buffer.push(t)},n.prototype.loadProxyFrame=function(){var n=this;n.proxyFrame==null&&(n.proxyFrame=document.createElement("iframe"),n.proxyFrame.setAttribute("style","display:none"),n.proxyFrame.setAttribute("src",n.telemetryEndPoint),document.head.appendChild(n.proxyFrame))},n.prototype.tellProxyFrameReady=function(t){var i=this,e=i,r,u,f;if(t.data==="ProxyFrameReadyToLog"){for(i.proxyFrameReady=!0,r=0;r40)&&(n=OSF.OUtil.Guid.generateNewGuid(),t.setValue(t.clientIDKey,n)),n},n.prototype.saveLog=function(n,t){var i=this,u=i.getValue(i.logIdSetKey);u=(u&&u.length>0?u+";":r)+n;i.setValue(i.logIdSetKey,u);i.setValue(n,t)},n.prototype.enumerateLog=function(n,t){var i=this,e=i.getValue(i.logIdSetKey),u,o,r,f;if(e){u=e.split(";");for(o in u)r=u[o],f=i.getValue(r),f&&(n&&n(r,f),t&&i.remove(r));t&&i.remove(i.logIdSetKey)}},n.prototype.getValue=function(n){var t=OSF.OUtil.getLocalStorage(),i=r;return t&&(i=t.getItem(n)),i},n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)},n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}},n}(),o=function(){function t(){}return t.prototype.LogData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(t)}catch(i){}},t.prototype.LogRawData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(t))}catch(i){}},t}();n.initialize=y;n.onAppActivated=p;n.onScriptDone=w;n.onCallDone=b;n.onMethodDone=k;n.onPropertyDone=d;n.onEventDone=g;n.onRegisterDone=nt;n.onAppClosed=tt;n.setOsfControlAppCorrelationId=it;n.doAppInitializationLogging=l;n.logAppCommonMessage=rt;n.logAppException=ut;OSF.AppTelemetry=n}(OSFAppTelemetry||(OSFAppTelemetry={}));Microsoft.Office.WebExtension.FileType={Text:"text",Compressed:"compressed",Pdf:"pdf"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FileProperties:"FileProperties",FileSliceProperties:"FileSliceProperties"});OSF.DDA.FileProperties={Handle:"FileHandle",FileSize:"FileSize",SliceSize:Microsoft.Office.WebExtension.Parameters.SliceSize};OSF.DDA.File=function(n,t,i){var r,u;OSF.OUtil.defineEnumerableProperties(this,{size:{value:t},sliceCount:{value:Math.ceil(t/i)}});r={};r[OSF.DDA.FileProperties.Handle]=n;r[OSF.DDA.FileProperties.SliceSize]=i;u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.GetDocumentCopyChunkAsync,u.ReleaseDocumentCopyAsync],r)};OSF.DDA.FileSliceOffset="fileSliceoffset";OSF.DDA.AsyncMethodNames.addNames({GetDocumentCopyAsync:"getFileAsync",GetDocumentCopyChunkAsync:"getSliceAsync",ReleaseDocumentCopyAsync:"closeAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FileType,"enum":Microsoft.Office.WebExtension.FileType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:{types:["number"],defaultValue:4194304}}],checkCallArgs:function(n){var t=n[Microsoft.Office.WebExtension.Parameters.SliceSize];if(t<=0||t>4194304)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return n},onSucceeded:function(n,t,i){return new OSF.DDA.File(n[OSF.DDA.FileProperties.Handle],n[OSF.DDA.FileProperties.FileSize],i[Microsoft.Office.WebExtension.Parameters.SliceSize])}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(n,t){return t[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(r<0||r>=t.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;return n[OSF.DDA.FileSliceOffset]=parseInt((r*i[OSF.DDA.FileProperties.SliceSize]).toString()),n},onSucceeded:function(n,t,i){var r={};return OSF.OUtil.defineEnumerableProperties(r,{data:{value:n[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:i[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:n[OSF.DDA.FileProperties.SliceSize]}}),r}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}}]});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("File",OSF.DDA.Marshaling),function(n){var t="FileSize";n[n.Handle=0]="Handle";n[n[t]=1]=t}(OSF_DDA_Marshaling_File_FilePropertiesKeys||(OSF_DDA_Marshaling_File_FilePropertiesKeys={}));OSF.DDA.Marshaling.File.FilePropertiesKeys=OSF_DDA_Marshaling_File_FilePropertiesKeys,function(n){var t="SliceSize";n[n.Data=0]="Data";n[n[t]=1]=t}(OSF_DDA_Marshaling_File_SlicePropertiesKeys||(OSF_DDA_Marshaling_File_SlicePropertiesKeys={}));OSF.DDA.Marshaling.File.SlicePropertiesKeys=OSF_DDA_Marshaling_File_SlicePropertiesKeys,function(n){var t="Compressed";n[n.Text=0]="Text";n[n[t]=1]=t;n[n.Pdf=2]="Pdf"}(OSF_DDA_Marshaling_File_FileType||(OSF_DDA_Marshaling_File_FileType={}));OSF.DDA.Marshaling.File.FileType=OSF_DDA_Marshaling_File_FileType,function(n){var t="SliceIndex",i="SliceSize",r="FileType";n[n[r]=0]=r;n[n[i]=1]=i;n[n.Handle=2]="Handle";n[n[t]=3]=t}(OSF_DDA_Marshaling_File_ParameterKeys||(OSF_DDA_Marshaling_File_ParameterKeys={}));OSF.DDA.Marshaling.File.ParameterKeys=OSF_DDA_Marshaling_File_ParameterKeys;OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FileProperties);OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FileSliceProperties);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.FilePropertiesKeys.Handle},{name:OSF.DDA.FileProperties.FileSize,value:OSF.DDA.Marshaling.File.FilePropertiesKeys.FileSize}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.Marshaling.File.SlicePropertiesKeys.Data},{name:OSF.DDA.FileProperties.SliceSize,value:OSF.DDA.Marshaling.File.SlicePropertiesKeys.SliceSize}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:OSF.DDA.Marshaling.File.FileType.Text},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:OSF.DDA.Marshaling.File.FileType.Compressed},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:OSF.DDA.Marshaling.File.FileType.Pdf}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:OSF.DDA.Marshaling.File.ParameterKeys.FileType},{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:OSF.DDA.Marshaling.File.ParameterKeys.SliceSize}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.ParameterKeys.Handle},{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,value:OSF.DDA.Marshaling.File.ParameterKeys.SliceIndex}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.ParameterKeys.Handle}]});Microsoft.Office.WebExtension.TableData=function(n,t){function i(n){if(n==null||n==undefined)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(n,2);t<2;t++)n=[n];return n}catch(i){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(n){t=i(n)}},rows:{get:function(){return n},set:function(t){n=t==null||OSF.OUtil.isArray(t)&&t.length==0?[]:i(t)}}});this.headers=t;this.rows=n};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(n){return new Microsoft.Office.WebExtension.TableData(n[OSF.DDA.TableDataProperties.TableRows],n[OSF.DDA.TableDataProperties.TableHeaders])};Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var n=null;return{findArrayDimensionality:function(n){if(OSF.OUtil.isArray(n)){for(var t=0,i=0;i0)for(r=0;r0)for(r=0;r0?(this._eventHandlers[n]=[],!0):!1},clearObjectEventHandlers:function(n,t){return this._objectEventHandlers[n]!=null&&this._objectEventHandlers[n][t]!=null?(this._objectEventHandlers[n][t]=[],!0):!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},getObjectEventHandlerCount:function(n,t){return this._objectEventHandlers[n]==null||this._objectEventHandlers[n][t]==null?0:this._objectEventHandlers[n][t].length},fireEvent:function(n){var t,r,i;if(n.type==undefined)return!1;if(t=n.type,t&&this._eventHandlers[t]){for(r=this._eventHandlers[t],i=0;i0)){for(r=t[0];i.length>0;)u=i.shift(),r(u);return!0}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var o="hostPlatform",f="outlook",e="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(n,i[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:r=new OSF.DDA.RichApiMessageEventArgs(n,i);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i),t.initialize(r.initialData),(OSF._OfficeAppFactory.getHostInfo()[o]=="win32"||OSF._OfficeAppFactory.getHostInfo()[o]=="mac")&&t.setCurrentItemNumber(r.itemNumber.itemNumber);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkRecipientsChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:n}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(n,t){return t}}],onSucceeded:function(n,t,i){var f=n[OSF.DDA.SettingsManager.SerializedSettings],u=OSF.DDA.SettingsManager.deserializeSettings(f),e=i[OSF.DDA.SettingsManager.RefreshingSettings];for(var r in e)t.remove(r);for(r in u)t.set(r,u[r]);return t}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(n,t){return OSF.DDA.SettingsManager.serializeSettings(t)}}]});OSF.DDA.WAC.SettingsTranslator=function(){var n=0,t=1;return{read:function(i){var u={},f=i.Settings,e,r;for(e in f)r=f[e],u[r[n]]=r[t];return u},write:function(i){var f=[],u,r;for(u in i)r=[],r[n]=u,r[t]=i[u],f.push(r);return f}}}();OSF.DDA.WAC.Delegate.ParameterMap.setDynamicType(OSF.DDA.SettingsManager.SerializedSettings,{toHost:OSF.DDA.WAC.SettingsTranslator.write,fromHost:OSF.DDA.WAC.SettingsTranslator.read});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.SettingsRequest,toHost:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:"OverwriteIfStale"},{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.WAC.UniqueArguments.Properties}],invertible:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.WAC.UniqueArguments.Properties}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SettingsRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});Microsoft.Office.WebExtension.BindingType={Table:"table",Text:"text",Matrix:"matrix"};OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType};OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{BindingList:"BindingList"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{Subset:"subset",BindingProperties:"BindingProperties"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList,OSF.DDA.PropertyDescriptors.BindingProperties);OSF.DDA.BindingPromise=function(n,t){this._id=n;OSF.OUtil.defineEnumerableProperty(this,"onFail",{get:function(){return t},set:function(n){var i=typeof n;if(i!="undefined"&&i!="function")throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,i);t=n}})};OSF.DDA.BindingPromise.prototype={_fetch:function(n){var t=this,i;return t.binding?n&&n(t.binding):t._binding||(i=t,Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(t._id,function(t){t.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded?(OSF.OUtil.defineEnumerableProperty(i,"binding",{value:t.value}),n&&n(i.binding)):i.onFail&&i.onFail(t)})),t},getDataAsync:function(){var n=arguments;return this._fetch(function(t){t.getDataAsync.apply(t,n)}),this},setDataAsync:function(){var n=arguments;return this._fetch(function(t){t.setDataAsync.apply(t,n)}),this},addHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.addHandlerAsync.apply(t,n)}),this},removeHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.removeHandlerAsync.apply(t,n)}),this}};OSF.DDA.BindingFacade=function(n){this._eventDispatches=[];OSF.OUtil.defineEnumerableProperty(this,"document",{value:n});var t=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[t.AddFromSelectionAsync,t.AddFromNamedItemAsync,t.GetAllAsync,t.GetByIdAsync,t.ReleaseByIdAsync])};OSF.DDA.UnknownBinding=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}})};OSF.DDA.Binding=function(n,t){var r,u,i,f;OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}});r=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[r.GetDataAsync,r.SetDataAsync]);u=Microsoft.Office.WebExtension.EventType;i=t.bindings._eventDispatches;i[n]||(i[n]=new OSF.EventDispatch([u.BindingSelectionChanged,u.BindingDataChanged]));f=i[n];OSF.DDA.DispIdHost.addEventSupport(this,f)};OSF.DDA.generateBindingId=function(){return"UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+(new Date).getTime()};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureBinding=function(n,t){var r=n[OSF.DDA.BindingProperties.Id],u=n[OSF.DDA.BindingProperties.RowCount],f=n[OSF.DDA.BindingProperties.ColumnCount],s=n[OSF.DDA.BindingProperties.HasHeaders],i,e,o;switch(n[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:i=new OSF.DDA.TextBinding(r,t);break;case Microsoft.Office.WebExtension.BindingType.Matrix:i=new OSF.DDA.MatrixBinding(r,t,u,f);break;case Microsoft.Office.WebExtension.BindingType.Table:e=function(){return OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument};o=e()&&OSF.DDA.ExcelTableBinding?OSF.DDA.ExcelTableBinding:OSF.DDA.TableBinding;i=new o(r,t,u,f,s);break;default:i=new OSF.DDA.UnknownBinding(r,t)}return i};OSF.DDA.AsyncMethodNames.addNames({AddFromSelectionAsync:"addFromSelectionAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:"getByIdAsync",ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync"}),function(){function u(n){return OSF.DDA.OMFactory.manufactureBinding(n,Microsoft.Office.WebExtension.context.document)}function f(n){return n.id}function e(n,t,i){var u=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&u&&(u[OSF.DDA.TableDataProperties.TableRows]!=undefined||u[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(u=OSF.DDA.OMFactory.manufactureTableData(u)),u=OSF.DDA.DataCoercion.coerceData(u,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),u==undefined?r:u}var t="number",i="object",n="string",r=null;OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:[n]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return!0}}],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.BindingList],u)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n,t,i){var r=i[Microsoft.Office.WebExtension.Parameters.Id];delete t._eventDispatches[r]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n,t){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&n[Microsoft.Office.WebExtension.Parameters.RowCount]==0&&n[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn],delete n[Microsoft.Office.WebExtension.Parameters.RowCount],delete n[Microsoft.Office.WebExtension.Parameters.ColumnCount]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]||n[Microsoft.Office.WebExtension.Parameters.RowCount]||n[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[n,i,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}]})}();OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{TableDataProperties:"TableDataProperties"});OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};OSF.DDA.TableBinding=function(n,t,i,r,u){OSF.DDA.TableBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:i?i:0},columnCount:{value:r?r:0},hasHeaders:{value:u?u:!1}});var f=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[f.AddRowsAsync,f.AddColumnsAsync,f.DeleteAllDataValuesAsync])};OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync"}),function(){function n(n){return n.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]})}();OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.BindingProperties);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.BindingRequest,toHost:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,value:"ItemName"},{name:Microsoft.Office.WebExtension.Parameters.Id,value:"BindingId"},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:"BindingType"},{name:Microsoft.Office.WebExtension.Parameters.PromptText,value:"PromptText"},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:"Columns"},{name:Microsoft.Office.WebExtension.Parameters.SampleData,value:"SampleData"},{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:"FailOnCollision"}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.BindingType,toHost:[{name:Microsoft.Office.WebExtension.BindingType.Text,value:2},{name:Microsoft.Office.WebExtension.BindingType.Matrix,value:3},{name:Microsoft.Office.WebExtension.BindingType.Table,value:1}],invertible:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.BindingProperties,fromHost:[{name:OSF.DDA.BindingProperties.Id,value:"Name"},{name:OSF.DDA.BindingProperties.Type,value:"BindingType"},{name:OSF.DDA.BindingProperties.RowCount,value:"RowCount"},{name:OSF.DDA.BindingProperties.ColumnCount,value:"ColCount"},{name:OSF.DDA.BindingProperties.HasHeaders,value:"HasHeaders"}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:0}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod,fromHost:[{name:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod,fromHost:[{name:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseBindingMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingMethod,fromHost:[{name:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAllBindingsMethod,fromHost:[{name:OSF.DDA.ListDescriptors.BindingList,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.GetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddRowsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.AddRowsColumns,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddColumnsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.AddRowsColumns,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearAllRowsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.AddRowsColumns,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:"BindingId"},{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.Subset,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:"StartRow"},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:"StartCol"},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:"RowCount"},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:"ColCount"}]});OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.MatrixBinding=function(n,t,i,r){OSF.DDA.MatrixBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Matrix},rowCount:{value:i?i:0},columnCount:{value:r?r:0}})};OSF.OUtil.extend(OSF.DDA.MatrixBinding,OSF.DDA.Binding);OSF.DDA.TextBinding=function(n,t){OSF.DDA.TextBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperty(this,"type",{value:Microsoft.Office.WebExtension.BindingType.Text})};OSF.OUtil.extend(OSF.DDA.TextBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddFromPromptAsync:"addFromPromptAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromPromptAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:["string"],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.PromptText,value:{types:["string"],calculate:function(){return Strings.OfficeOM.L_AddBindingFromPromptDefaultText}}},{name:Microsoft.Office.WebExtension.Parameters.SampleData,value:{types:["object"],defaultValue:null}}],privateStateCallbacks:[],onSucceeded:function(n){return OSF.DDA.OMFactory.manufactureBinding(n,Microsoft.Office.WebExtension.context.document)}});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromPromptMethod,fromHost:[{name:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"});OSF.DDA.DocumentSelectionChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:n}})};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDeleted:"objectDeleted"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectSelectionChanged:"objectSelectionChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDataChanged:"objectDataChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ContentControlAdded:"contentControlAdded"});OSF.DDA.ObjectEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:n},object:{value:t}})};OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{BindingSelectionChanged:"bindingSelectionChanged",BindingDataChanged:"bindingDataChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{BindingSelectionChangedEvent:"BindingSelectionChangedEvent"});OSF.DDA.BindingSelectionChangedEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingSelectionChanged},binding:{value:n}});for(var i in t)OSF.OUtil.defineEnumerableProperty(this,i,{value:t[i]})};OSF.DDA.BindingDataChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingDataChanged},binding:{value:n}})};OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.BindingSelectionChangedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.WAC.UniqueArguments.BindingEventSource},{name:OSF.DDA.PropertyDescriptors.Subset,value:OSF.DDA.PropertyDescriptors.Subset}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingDataChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.WAC.UniqueArguments.BindingEventSource}]});OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(n){OSF.OUtil.defineEnumerableProperties(this,{url:{value:n[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(n){return new Microsoft.Office.WebExtension.FileProperties(n)}});OSF.OUtil.setNamespace("Marshaling",OSF.DDA),function(n){var t="Properties";n[n[t]=0]=t;n[n.Url=1]="Url"}(OSF_DDA_Marshaling_FilePropertiesKeys||(OSF_DDA_Marshaling_FilePropertiesKeys={}));OSF.DDA.Marshaling.FilePropertiesKeys=OSF_DDA_Marshaling_FilePropertiesKeys;OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,fromHost:[{name:OSF.DDA.FilePropertiesDescriptor.Url,value:OSF.DDA.Marshaling.FilePropertiesKeys.Url}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:OSF.DDA.Marshaling.FilePropertiesKeys.Properties}]});Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"};Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"};Microsoft.Office.WebExtension.Index={First:"first",Last:"last",Next:"next",Previous:"previous"};OSF.DDA.AsyncMethodNames.addNames({GoToByIdAsync:"goToByIdAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GoToByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string","number"]},{name:Microsoft.Office.WebExtension.Parameters.GoToType,"enum":Microsoft.Office.WebExtension.GoToType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:{"enum":Microsoft.Office.WebExtension.SelectionMode,defaultValue:Microsoft.Office.WebExtension.SelectionMode.Default}}]});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.DDA.Marshaling.NavigationKeys={NavigationRequest:"DdaGoToByIdMethod",Id:"Id",GoToType:"GoToType",SelectionMode:"SelectionMode"},function(n){var t="NamedItem";n[n.Binding=0]="Binding";n[n[t]=1]=t;n[n.Slide=2]="Slide";n[n.Index=3]="Index"}(OSF_DDA_Marshaling_GoToType||(OSF_DDA_Marshaling_GoToType={}));OSF.DDA.Marshaling.GoToType=OSF_DDA_Marshaling_GoToType,function(n){var t="Selected";n[n.Default=0]="Default";n[n[t]=1]=t;n[n.None=2]="None"}(OSF_DDA_Marshaling_SelectionMode||(OSF_DDA_Marshaling_SelectionMode={}));OSF.DDA.Marshaling.SelectionMode=OSF_DDA_Marshaling_SelectionMode;OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.Marshaling.NavigationKeys.NavigationRequest);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.Marshaling.NavigationKeys.NavigationRequest,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.NavigationKeys.Id},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:OSF.DDA.Marshaling.NavigationKeys.GoToType},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:OSF.DDA.Marshaling.NavigationKeys.SelectionMode}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:OSF.DDA.Marshaling.GoToType.Binding},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:OSF.DDA.Marshaling.GoToType.NamedItem},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:OSF.DDA.Marshaling.GoToType.Slide},{name:Microsoft.Office.WebExtension.GoToType.Index,value:OSF.DDA.Marshaling.GoToType.Index}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:OSF.DDA.Marshaling.SelectionMode.Default},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:OSF.DDA.Marshaling.SelectionMode.Selected},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:OSF.DDA.Marshaling.SelectionMode.None}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:OSF.DDA.Marshaling.NavigationKeys.NavigationRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.ExcelTableBinding=function(n,t,i,r,u){var f=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[f.ClearFormatsAsync,f.SetTableOptionsAsync,f.SetFormatsAsync]);OSF.DDA.ExcelTableBinding.uber.constructor.call(this,n,t,i,r,u);OSF.OUtil.finalizeProperties(this)};OSF.OUtil.extend(OSF.DDA.ExcelTableBinding,OSF.DDA.TableBinding),function(){var t="number",n="object",i="string";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[i,n,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:[n],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:[n],defaultValue:[]}}],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[i,n,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[n,i],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[n],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:[n],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:[n],defaultValue:[]}}],checkCallArgs:function(n,t){var i=Microsoft.Office.WebExtension.Parameters;if(n[i.StartRow]==0&&n[i.StartColumn]==0&&OSF.OUtil.isArray(n[i.CellFormat])&&n[i.CellFormat].length===0&&OSF.OUtil.isArray(n[i.TableOptions])&&n[i.TableOptions].length===0&&(delete n[i.StartRow],delete n[i.StartColumn],delete n[i.CellFormat],delete n[i.TableOptions]),n[i.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[i.StartRow]&&n[i.StartRow]!=0||n[i.StartColumn]&&n[i.StartColumn]!=0||n[i.CellFormat]||n[i.TableOptions]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:function(n){return n.id}}]});OSF.DDA.BindingPromise.prototype.setTableOptionsAsync=function(){var n=arguments;return this._fetch(function(t){t.setTableOptionsAsync.apply(t,n)}),this};OSF.DDA.BindingPromise.prototype.setFormatsAsync=function(){var n=arguments;return this._fetch(function(t){t.setFormatsAsync.apply(t,n)}),this};OSF.DDA.BindingPromise.prototype.clearFormatsAsync=function(){var n=arguments;return this._fetch(function(t){t.clearFormatsAsync.apply(t,n)}),this}}(),function(){function n(n){return n.id}OSF.DDA.AsyncMethodNames.addNames({ClearFormatsAsync:"clearFormatsAsync",SetTableOptionsAsync:"setTableOptionsAsync",SetFormatsAsync:"setFormatsAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ClearFormatsAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetTableOptionsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TableOptions,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetFormatsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CellFormat,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]})}();OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.DDA.Marshaling.FormatKeys={Id:"BindingId",CellFormat:"CellFormat",TableOptions:"TableOptions"},function(n){var t="totalRow",i="filterButton",r="bandedColumns",u="lastColumn",f="firstColumn",e="bandedRows",o="headerRow";n[n[o]=0]=o;n[n[e]=1]=e;n[n[f]=2]=f;n[n[u]=3]=u;n[n[r]=4]=r;n[n[i]=5]=i;n[n.style=6]="style";n[n[t]=7]=t}(OSF_DDA_Marshaling_TableOptionProperties||(OSF_DDA_Marshaling_TableOptionProperties={}));OSF.DDA.Marshaling.TableOptionProperties=OSF_DDA_Marshaling_TableOptionProperties,function(n){n[n.row=0]="row";n[n.column=1]="column"}(OSF_DDA_Marshaling_CellProperties||(OSF_DDA_Marshaling_CellProperties={}));OSF.DDA.Marshaling.CellProperties=OSF_DDA_Marshaling_CellProperties,function(n){var t="wrapping",i="numberFormat",r="indentRight",u="indentLeft",f="fontNormal",e="fontSubscript",o="fontSuperscript",s="fontStrikethrough",h="fontDirection",c="fontColor",l="fontUnderlineStyle",a="fontSize",v="fontStyle",y="fontFamily",p="borderInlineColor",w="borderInlineStyle",b="borderOutlineColor",k="borderOutlineStyle",d="borderRightColor",g="borderRightStyle",nt="borderLeftColor",tt="borderLeftStyle",it="borderBottomColor",rt="borderBottomStyle",ut="borderTopColor",ft="borderTopStyle",et="borderColor",ot="borderStyle",st="backgroundColor",ht="alignVertical",ct="alignHorizontal";n[n[ct]=1]=ct;n[n[ht]=2]=ht;n[n[st]=101]=st;n[n[ot]=201]=ot;n[n[et]=202]=et;n[n[ft]=203]=ft;n[n[ut]=204]=ut;n[n[rt]=205]=rt;n[n[it]=206]=it;n[n[tt]=207]=tt;n[n[nt]=208]=nt;n[n[g]=209]=g;n[n[d]=210]=d;n[n[k]=211]=k;n[n[b]=212]=b;n[n[w]=213]=w;n[n[p]=214]=p;n[n[y]=301]=y;n[n[v]=302]=v;n[n[a]=303]=a;n[n[l]=304]=l;n[n[c]=305]=c;n[n[h]=306]=h;n[n[s]=307]=s;n[n[o]=308]=o;n[n[e]=309]=e;n[n[f]=310]=f;n[n[u]=401]=u;n[n[r]=402]=r;n[n[i]=501]=i;n[n.width=701]="width";n[n.height=702]="height";n[n[t]=703]=t}(OSF_DDA_Marshaling_CellFormatProperties||(OSF_DDA_Marshaling_CellFormatProperties={}));OSF.DDA.Marshaling.CellFormatProperties=OSF_DDA_Marshaling_CellFormatProperties,function(n){var t="slantDashDot",i="mediumDashDotDot",r="dashDotDot",u="mediumDashDot",f="mediumDashed";n[n.none=0]="none";n[n.thin=1]="thin";n[n.medium=2]="medium";n[n.dashed=3]="dashed";n[n.dotted=4]="dotted";n[n.thick=5]="thick";n[n.double=6]="double";n[n.hair=7]="hair";n[n[f]=8]=f;n[n.dashDot=9]="dashDot";n[n[u]=10]=u;n[n[r]=11]=r;n[n[i]=12]=i;n[n[t]=13]=t}(OSF_DDA_Marshaling_BorderStyleType||(OSF_DDA_Marshaling_BorderStyleType={}));OSF.DDA.Marshaling.BorderStyleType=OSF_DDA_Marshaling_BorderStyleType,function(n){var t="automatic",i="turquoise";n[n.none=0]="none";n[n.black=1]="black";n[n.blue=2]="blue";n[n.gray=3]="gray";n[n.green=4]="green";n[n.orange=5]="orange";n[n.pink=6]="pink";n[n.purple=7]="purple";n[n.red=8]="red";n[n.teal=9]="teal";n[n[i]=10]=i;n[n.violet=11]="violet";n[n.white=12]="white";n[n.yellow=13]="yellow";n[n[t]=14]=t}(OSF_DDA_Marshaling_ColorType||(OSF_DDA_Marshaling_ColorType={}));OSF.DDA.Marshaling.ColorType=OSF_DDA_Marshaling_ColorType,function(n){var t="distributed",i="centerAcrossSelection";n[n.general=0]="general";n[n.left=1]="left";n[n.center=2]="center";n[n.right=3]="right";n[n.fill=4]="fill";n[n.justify=5]="justify";n[n[i]=6]=i;n[n[t]=7]=t}(OSF_DDA_Marshaling_AlignHorizontalType||(OSF_DDA_Marshaling_AlignHorizontalType={}));OSF.DDA.Marshaling.AlignHorizontalType=OSF_DDA_Marshaling_AlignHorizontalType,function(n){var t="distributed";n[n.top=0]="top";n[n.center=1]="center";n[n.bottom=2]="bottom";n[n.justify=3]="justify";n[n[t]=4]=t}(OSF_DDA_Marshaling_AlignVerticalType||(OSF_DDA_Marshaling_AlignVerticalType={}));OSF.DDA.Marshaling.AlignVerticalType=OSF_DDA_Marshaling_AlignVerticalType,function(n){var t="boldItalic";n[n.regular=0]="regular";n[n.italic=1]="italic";n[n.bold=2]="bold";n[n[t]=3]=t}(OSF_DDA_Marshaling_FontStyleType||(OSF_DDA_Marshaling_FontStyleType={}));OSF.DDA.Marshaling.FontStyleType=OSF_DDA_Marshaling_FontStyleType,function(n){var t="doubleAccounting",i="singleAccounting";n[n.none=0]="none";n[n.single=1]="single";n[n.double=2]="double";n[n[i]=3]=i;n[n[t]=4]=t}(OSF_DDA_Marshaling_FontUnderlineStyleType||(OSF_DDA_Marshaling_FontUnderlineStyleType={}));OSF.DDA.Marshaling.FontUnderlineStyleType=OSF_DDA_Marshaling_FontUnderlineStyleType,function(n){var t="rightToLeft",i="leftToRight";n[n.context=0]="context";n[n[i]=1]=i;n[n[t]=2]=t}(OSF_DDA_Marshaling_FontDirectionType||(OSF_DDA_Marshaling_FontDirectionType={}));OSF.DDA.Marshaling.FontDirectionType=OSF_DDA_Marshaling_FontDirectionType,function(n){n[n.autoFit=-1]="autoFit"}(OSF_DDA_Marshaling_WidthType||(OSF_DDA_Marshaling_WidthType={}));OSF.DDA.Marshaling.WidthType=OSF_DDA_Marshaling_WidthType,function(n){n[n.autoFit=-1]="autoFit"}(OSF_DDA_Marshaling_HeightType||(OSF_DDA_Marshaling_HeightType={}));OSF.DDA.Marshaling.HeightType=OSF_DDA_Marshaling_HeightType,function(){var e=null,p="undefined",k="auto fit",d="distributed",b="none",s=OSF.DDA.Marshaling.AlignHorizontalType,a=OSF.DDA.Marshaling.AlignVerticalType,f=OSF.DDA.Marshaling.BorderStyleType,t=OSF.DDA.Marshaling.CellFormatProperties,g=OSF.DDA.Marshaling.CellProperties,u=OSF.DDA.Marshaling.ColorType,w=OSF.DDA.Marshaling.FontDirectionType,y=OSF.DDA.Marshaling.FontStyleType,v=OSF.DDA.Marshaling.FontUnderlineStyleType,nt=OSF.DDA.Marshaling.HeightType,c=OSF.DDA.Marshaling.FormatKeys,r=Microsoft.Office.WebExtension.Parameters,n=OSF.DDA.WAC.Delegate.ParameterMap,o=OSF.DDA.Marshaling.TableOptionProperties,tt=OSF.DDA.Marshaling.WidthType;Microsoft.Office.WebExtension.Table={All:0,Data:1,Headers:2};n.define({type:OSF.DDA.WAC.UniqueArguments.ClearFormats,toHost:[{name:r.Id,value:c.Id}]});n.define({type:OSF.DDA.MethodDispId.dispidClearFormatsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.ClearFormats,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});n.define({type:OSF.DDA.WAC.UniqueArguments.SetFormats,toHost:[{name:r.Id,value:c.Id},{name:r.CellFormat,value:c.CellFormat},{name:r.TableOptions,value:c.TableOptions}]});n.define({type:OSF.DDA.MethodDispId.dispidSetTableOptionsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SetFormats,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});n.define({type:OSF.DDA.MethodDispId.dispidSetFormatsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SetFormats,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});n.define({type:OSF.DDA.WAC.UniqueArguments.SetData,toHost:[{name:r.Id,value:c.Id},{name:r.CoercionType,value:"CoerceType"},{name:r.Data,value:OSF.DDA.WAC.UniqueArguments.Data},{name:r.Rows,value:"Rows"},{name:r.Columns,value:"Columns"},{name:r.StartRow,value:"StartRow"},{name:r.StartColumn,value:"StartCol"},{name:r.CellFormat,value:c.CellFormat},{name:r.TableOptions,value:c.TableOptions}]});n.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});n.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});var i={alignHorizontal:{text:"alignHorizontal",type:t.alignHorizontal},alignVertical:{text:"alignVertical",type:t.alignVertical},backgroundColor:{text:"backgroundColor",type:t.backgroundColor},borderStyle:{text:"borderStyle",type:t.borderStyle},borderColor:{text:"borderColor",type:t.borderColor},borderTopStyle:{text:"borderTopStyle",type:t.borderTopStyle},borderTopColor:{text:"borderTopColor",type:t.borderTopColor},borderBottomStyle:{text:"borderBottomStyle",type:t.borderBottomStyle},borderBottomColor:{text:"borderBottomColor",type:t.borderBottomColor},borderLeftStyle:{text:"borderLeftStyle",type:t.borderLeftStyle},borderLeftColor:{text:"borderLeftColor",type:t.borderLeftColor},borderRightStyle:{text:"borderRightStyle",type:t.borderRightStyle},borderRightColor:{text:"borderRightColor",type:t.borderRightColor},borderOutlineStyle:{text:"borderOutlineStyle",type:t.borderOutlineStyle},borderOutlineColor:{text:"borderOutlineColor",type:t.borderOutlineColor},borderInlineStyle:{text:"borderInlineStyle",type:t.borderInlineStyle},borderInlineColor:{text:"borderInlineColor",type:t.borderInlineColor},fontFamily:{text:"fontFamily",type:t.fontFamily},fontStyle:{text:"fontStyle",type:t.fontStyle},fontSize:{text:"fontSize",type:t.fontSize},fontUnderlineStyle:{text:"fontUnderlineStyle",type:t.fontUnderlineStyle},fontColor:{text:"fontColor",type:t.fontColor},fontDirection:{text:"fontDirection",type:t.fontDirection},fontStrikethrough:{text:"fontStrikethrough",type:t.fontStrikethrough},fontSuperscript:{text:"fontSuperscript",type:t.fontSuperscript},fontSubscript:{text:"fontSubscript",type:t.fontSubscript},fontNormal:{text:"fontNormal",type:t.fontNormal},indentLeft:{text:"indentLeft",type:t.indentLeft},indentRight:{text:"indentRight",type:t.indentRight},numberFormat:{text:"numberFormat",type:t.numberFormat},width:{text:"width",type:t.width},height:{text:"height",type:t.height},wrapping:{text:"wrapping",type:t.wrapping}},l=[{name:b,value:f.none},{name:"thin",value:f.thin},{name:"medium",value:f.medium},{name:"dashed",value:f.dashed},{name:"dotted",value:f.dotted},{name:"thick",value:f.thick},{name:"double",value:f.double},{name:"hair",value:f.hair},{name:"medium dashed",value:f.mediumDashed},{name:"dash dot",value:f.dashDot},{name:"medium dash dot",value:f.mediumDashDot},{name:"dash dot dot",value:f.dashDotDot},{name:"medium dash dot dot",value:f.mediumDashDotDot},{name:"slant dash dot",value:f.slantDashDot}],h=[{name:b,value:u.none},{name:"black",value:u.black},{name:"blue",value:u.blue},{name:"gray",value:u.gray},{name:"green",value:u.green},{name:"orange",value:u.orange},{name:"pink",value:u.pink},{name:"purple",value:u.purple},{name:"red",value:u.red},{name:"teal",value:u.teal},{name:"turquoise",value:u.turquoise},{name:"violet",value:u.violet},{name:"white",value:u.white},{name:"yellow",value:u.yellow},{name:"automatic",value:u.automatic}];n.define({type:i.alignHorizontal.text,toHost:[{name:"general",value:s.general},{name:"left",value:s.left},{name:"center",value:s.center},{name:"right",value:s.right},{name:"fill",value:s.fill},{name:"justify",value:s.justify},{name:"center across selection",value:s.centerAcrossSelection},{name:d,value:s.distributed}]});n.define({type:i.alignVertical.text,toHost:[{name:"top",value:a.top},{name:"center",value:a.center},{name:"bottom",value:a.bottom},{name:"justify",value:a.justify},{name:d,value:a.distributed}]});n.define({type:i.backgroundColor.text,toHost:h});n.define({type:i.borderStyle.text,toHost:l});n.define({type:i.borderColor.text,toHost:h});n.define({type:i.borderTopStyle.text,toHost:l});n.define({type:i.borderTopColor.text,toHost:h});n.define({type:i.borderBottomStyle.text,toHost:l});n.define({type:i.borderBottomColor.text,toHost:h});n.define({type:i.borderLeftStyle.text,toHost:l});n.define({type:i.borderLeftColor.text,toHost:h});n.define({type:i.borderRightStyle.text,toHost:l});n.define({type:i.borderRightColor.text,toHost:h});n.define({type:i.borderOutlineStyle.text,toHost:l});n.define({type:i.borderOutlineColor.text,toHost:h});n.define({type:i.borderInlineStyle.text,toHost:l});n.define({type:i.borderInlineColor.text,toHost:h});n.define({type:i.fontStyle.text,toHost:[{name:"regular",value:y.regular},{name:"italic",value:y.italic},{name:"bold",value:y.bold},{name:"bold italic",value:y.boldItalic}]});n.define({type:i.fontUnderlineStyle.text,toHost:[{name:b,value:v.none},{name:"single",value:v.single},{name:"double",value:v.double},{name:"single accounting",value:v.singleAccounting},{name:"double accounting",value:v.doubleAccounting}]});n.define({type:i.fontColor.text,toHost:h});n.define({type:i.fontDirection.text,toHost:[{name:"context",value:w.context},{name:"left-to-right",value:w.leftToRight},{name:"right-to-left",value:w.rightToLeft}]});n.define({type:i.width.text,toHost:[{name:k,value:tt.autoFit}]});n.define({type:i.height.text,toHost:[{name:k,value:nt.autoFit}]});n.define({type:r.TableOptions,toHost:[{name:"headerRow",value:o.headerRow},{name:"bandedRows",value:o.bandedRows},{name:"firstColumn",value:o.firstColumn},{name:"lastColumn",value:o.lastColumn},{name:"bandedColumns",value:o.bandedCoumns},{name:"filterButton",value:o.filterButton},{name:"style",value:o.style},{name:"totalRow",value:o.totalRow}]});n.dynamicTypes[r.CellFormat]={toHost:function(t){for(var i in t)t[i].format&&(t[i].format=n.doMapValues(t[i].format,"toHost"));return t},fromHost:function(n){return n}};n.setDynamicType(r.CellFormat,{toHost:function(n){var s="cells",a="format",y=0,w=1,v=[],h,t,r,u,f,e,c,l,o;for(h in n){if(t=n[h],r=[],typeof t[s]!==p){if(u=t[s],typeof t[s]=="object"){f=[];for(e in u)typeof g[e]!==p&&(f[g[e]]=u[e])}else f=u;r[y]=f}if(t[a]){c=t[a];l=[];for(o in c)typeof i[o]!==p&&l.push([i[o].type,c[o]]);r[w]=l}v[h]=r}return v},fromHost:function(n){return n}});n.setDynamicType(r.TableOptions,{toHost:function(n){var i=[];for(var t in n)typeof o[t]!=p&&(i[o[t]]=n[t]);return i},fromHost:function(n){return n}});s=e;a=e;f=e;t=e;u=e;w=e;y=e;v=e;nt=e;c=e;tt=e}(AgaveFormatAPI||(AgaveFormatAPI={}));OSF.DDA.AsyncMethodNames.addNames({ExecuteRichApiRequestAsync:"executeRichApiRequestAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[]});OSF.OUtil.setNamespace("RichApi",OSF.DDA);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidExecuteRichApiRequestMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.ArrayData}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{RichApiMessage:"richApiMessage"});OSF.DDA.RichApiMessageEventArgs=function(n,t){var u=t[Microsoft.Office.WebExtension.Parameters.Data],f=[],r,i;if(u)for(r=0;r100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99),n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1),!n[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99),n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("Dialog",OSF.DDA.Marshaling);OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys={MessageType:"messageType",MessageContent:"messageContent"};OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys={MessageType:"messageType",MessageContent:"messageContent"};OSF.DDA.Marshaling.MessageParentKeys={MessageToParent:"messageToParent"};OSF.DDA.Marshaling.DialogNotificationShownEventType={DialogNotificationShown:"dialogNotificationShown"};OSF.DDA.Marshaling.SendMessageKeys={MessageContent:"messageContent"},function(n){var t;(function(n){function r(n){switch(n){case t.Excel:case t.Word:case t.PowerPoint:case t.Outlook:return new i;default:return new i}return null}var t={Excel:"excel",Word:"word",PowerPoint:"powerpoint",Outlook:"outlook"},i;n.getDialogCssManager=r;i=function(){function n(){var r="height: 100px",t="font-size: 14px",i="font-family: Segoe UI,Arial,Verdana,sans-serif",u="margin: 20px 14px",f="width: 100%",e="position: absolute",n=this;n.overlayElementCSS=[e,"top: 0","left: 0",f,"height: 100%","background-color: rgba(198, 198, 198, 0.5)","z-index: 99998"];n.dialogNotificationPanelCSS=[f,"height: 190px",e,"z-index: 99999","background-color: rgba(255, 255, 255, 1)","left: 0px","top: 50%","margin-top: -95px"];n.newWindowNotificationTextPanelCSS=[u,i,t,r,"line-height: 100px"];n.newWindowNotificationTextSpanCSS=["display: inline-block","line-height: normal","vertical-align: middle"];n.crossZoneNotificationTextPanelCSS=[u,i,t,r];n.dialogNotificationButtonPanelCSS="margin:0px 9px";n.buttonStyleCSS=["text-align: center","width: 70px","height: 25px",t,i,"margin: 0px 5px","border-width: 1px","border-style: solid"]}var t=";";return n.prototype.getOverlayElementCSS=function(){return this.overlayElementCSS.join(t)},n.prototype.getDialogNotificationPanelCSS=function(){return this.dialogNotificationPanelCSS.join(t)},n.prototype.getNewWindowNotificationTextPanelCSS=function(){return this.newWindowNotificationTextPanelCSS.join(t)},n.prototype.getNewWindowNotificationTextSpanCSS=function(){return this.newWindowNotificationTextSpanCSS.join(t)},n.prototype.getCrossZoneNotificationTextPanelCSS=function(){return this.crossZoneNotificationTextPanelCSS.join(t)},n.prototype.getDialogNotificationButtonPanelCSS=function(){return this.dialogNotificationButtonPanelCSS},n.prototype.getDialogButtonCSS=function(){return this.buttonStyleCSS.join(t)},n}();n.DefaultDialogCSSManager=i})(t=n.WacCommonUICssManager||(n.WacCommonUICssManager={}))}(OfficeExt||(OfficeExt={})),function(n){var t;(function(t){var i;(function(t){function gt(n){var t=n.input;t!=i&&(y={HostButtonBorderColor:t[OSF.HostThemeButtonStyleKeys.ButtonBorderColor],HostButtonBackgroundColor:t[OSF.HostThemeButtonStyleKeys.ButtonBackgroundColor]});n.completed()}function ni(n){OSF._OfficeAppFactory.getInitializationHelper().addOrRemoveEventListenersForWindow(r);n.completed()}function ti(t){try{if(OSF._OfficeAppFactory.getInitializationHelper()._appContext._skipNewWindowNotification){vt(t);return}k=r;var c=r,y=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo,s=n.WacCommonUICssManager.getDialogCssManager(y.hostType),p=OSF.OUtil.formatString(Strings.OfficeOM.L_ShowWindowDialogNotification,OSF._OfficeAppFactory.getInitializationHelper()._appContext._addinName);o=yt(s);document.body.insertBefore(o,document.body.firstChild);f=si(s,p);f.id=lt;var l=pt(s),i=rt(s,Strings.OfficeOM.L_ShowWindowDialogNotificationAllow),u=rt(s,Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore);l.appendChild(i);l.appendChild(u);f.appendChild(l);document.body.insertBefore(f,document.body.firstChild);i.onclick=function(){vt(t);k||w()};function v(){function n(n){et();wt(n);e(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore)}h.onComplete=n;OSF.DDA.WAC.Delegate.unregisterEventAsync(h)}u.onclick=v;i.addEventListener(a,function(n){n.shiftKey&&n.keyCode==9&&(ft(i),ut(u),u.focus(),n.preventDefault(),n.stopPropagation())},r);u.addEventListener(a,function(n){n.shiftKey||n.keyCode!=9?n.keyCode==13&&(c=!0,n.preventDefault(),n.stopPropagation()):(ft(u),ut(i),i.focus(),n.preventDefault(),n.stopPropagation())},r);u.addEventListener("keyup",function(n){n.keyCode==13&&c&&(c=r,v(),n.preventDefault(),n.stopPropagation())},r);window.focus();function b(){i.focus()}h.onComplete=b;OSF.DDA.WAC.Delegate.registerEventAsync(h)}catch(d){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at new window dialog."+d);e(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)}}function ii(n){var t,r;try{if(u!=i){if(t=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains,t)for(r=0;r-1?window.close():(t=n.data,r=typeof t,t&&(r=="object"||r==c)&&(r==c&&(t=JSON.parse(t)),u=OSF.DDA.OMFactory.manufactureEventArgs(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived,i,t),OSF.DialogParentMessageEventDispatch.fireEvent(u))))}window.addEventListener(l,n)}function ei(n,t){v=n;e=t}function oi(){try{f&&f.id==lt&&e&&e(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore)}catch(n){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during executing displayDialogAsync callback."+n)}w()}function at(t,i){var s=r,e=n.WacCommonUICssManager.getDialogCssManager(i),h,u;o=yt(e);document.body.insertBefore(o,document.body.firstChild);f=hi(e,t);f.id=dt;h=pt(e);u=rt(e,Strings.OfficeOM.L_DialogOK?Strings.OfficeOM.L_DialogOK:"OK");h.appendChild(u);f.appendChild(h);document.body.insertBefore(f,document.body.firstChild);k=!0;u.onclick=function(){w()};u.addEventListener(a,function(n){n.keyCode==9?(document.getElementById(g).focus(),n.preventDefault(),n.stopPropagation()):n.keyCode==13&&(s=!0,n.preventDefault(),n.stopPropagation())},r);u.addEventListener("keyup",function(n){n.keyCode==13&&s&&(s=r,w(),n.preventDefault(),n.stopPropagation())},r);document.getElementById(g).addEventListener(a,function(n){n.keyCode==9&&(u.focus(),n.preventDefault(),n.stopPropagation())},r);window.focus();u.focus()}function tt(n){if(n.source==u)try{var t={};t[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogMessageReceived;t[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent]=n.data;v(t)}catch(i){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during receive message handler."+i)}}function it(n){var i=OSF._OfficeAppFactory.getInitializationHelper()._webAppState.id+st,t;if(n.key==i)try{t={};t[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogMessageReceived;t[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent]=n.newValue;v(t)}catch(r){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during storage changed handler."+r)}}function vt(t){function nt(){try{if(u==i||u.closed){window.clearInterval(d);p?window.removeEventListener(b,it):window.removeEventListener(l,tt);var n={};n[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogClosed;v(n)}}catch(t){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during check or handle window close."+t)}}var r=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo,y=[r.hostType,r.hostPlatform,r.hostSpecificFileVersion,r.hostLocale,r.osfControlAppCorrelationId,"isDialog"],h=y.join("|"),s=OSF._OfficeAppFactory.getInitializationHelper()._appContext,f=t[OSF.ShowWindowDialogParameterKeys.Url],o;f=n.WACUtils.addHostInfoAsQueryParam(f,h);o=JSON.parse(window.name);o[OSF.WindowNameItemKeys.HostInfo]=h;o[OSF.WindowNameItemKeys.AppContext]=s;var c=t[OSF.ShowWindowDialogParameterKeys.Width]*screen.width/100,a=t[OSF.ShowWindowDialogParameterKeys.Height]*screen.height/100,w=s._clientWindowWidth/2-c/2,k=s._clientWindowHeight/2-a/2,g="width="+c+", height="+a+", left="+w+", top="+k+",channelmode=no,directories=no,fullscreen=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=yes,toolbar=no";if(u=window.open(f,n.WACUtils.serializeObjectToString(o),g),u==i){OSF.AppTelemetry.logAppCommonMessage("Encountered cross zone issue in displayDialogAsync api.");et();at(f,r.hostType);e(OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone);return}p?window.addEventListener(b,it):window.addEventListener(l,tt);d=window.setInterval(nt,1e3);e!=i?e(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("showDialogCallback can not be null.")}function rt(n,t){var i=document.createElement("input"),r,u;return i.setAttribute("type","button"),i.style.cssText=n.getDialogButtonCSS(),i.style.borderColor=ht,i.style.backgroundColor=ct,i.setAttribute("value",t),r=function(){ut(i)},u=function(){ft(i)},i.addEventListener("mouseover",r),i.addEventListener("focus",r),i.addEventListener("mouseout",u),i.addEventListener("focusout",u),i}function ut(n){y!=i?(n.style.borderColor=y.HostButtonBorderColor,n.style.backgroundColor=y.HostButtonBackgroundColor):OSF.CommonUI&&OSF.CommonUI.HostButtonBorderColor&&OSF.CommonUI.HostButtonBackgroundColor?(n.style.borderColor=OSF.CommonUI.HostButtonBorderColor,n.style.backgroundColor=OSF.CommonUI.HostButtonBackgroundColor):n.style.backgroundColor=kt}function ft(n){n.style.borderColor=ht;n.style.backgroundColor=ct}function w(){function n(n){et();wt(n)}h.onComplete=n;OSF.DDA.WAC.Delegate.unregisterEventAsync(h)}function et(){f!=i&&(document.body.removeChild(f),f=i);o!=i&&(document.body.removeChild(o),o=i)}function yt(n){var t=document.createElement(s);return t.style.cssText=n.getOverlayElementCSS(),t}function si(n,t){var r=document.createElement(s),i,u;return r.style.cssText=n.getDialogNotificationPanelCSS(),bt(r),i=document.createElement(s),i.style.cssText=n.getNewWindowNotificationTextPanelCSS(),i.id=nt,document.documentElement.getAttribute("dir")=="rtl"?i.style.paddingRight="30px":i.style.paddingLeft="30px",u=document.createElement("span"),u.style.cssText=n.getNewWindowNotificationTextSpanCSS(),u.innerText=t,i.appendChild(u),r.appendChild(i),r}function pt(n){var t=document.createElement(s);return t.style.cssText=n.getDialogNotificationButtonPanelCSS(),t.style.cssFloat=document.documentElement.getAttribute("dir")=="rtl"?"left":"right",t}function wt(n){if(n!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){var t=document.querySelectorAll(OSF._OfficeAppFactory.getInitializationHelper()._tabbableElements);OSF.OUtil.focusToFirstTabbable(t,r)}}function hi(t,i){var f=document.createElement(s),u,r,e;return f.style.cssText=t.getDialogNotificationPanelCSS(),bt(f),u=document.createElement(s),u.style.cssText=t.getCrossZoneNotificationTextPanelCSS(),u.id=nt,r=document.createElement("a"),r.id=g,r.href="#",r.innerText=Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink,r.setAttribute("onclick","window.open('https://support.microsoft.com/en-us/help/17479/windows-internet-explorer-11-change-security-privacy-settings', '_blank', 'fullscreen=1')"),e=document.createElement("span"),Strings.OfficeOM.L_NewWindowCrossZone&&(e.innerHTML=OSF.OUtil.formatString(Strings.OfficeOM.L_NewWindowCrossZone,r.outerHTML,n.WACUtils.getDomainForUrl(i))),u.appendChild(e),f.appendChild(u),f}function bt(n){n.setAttribute("role","dialog");n.setAttribute("aria-describedby",nt)}var s="div",c="string",l="message",b="storage",a="keydown",r=!1,i=null,u=i,v=i,o=i,f=i,ot="osfDialogInternal:action=closeDialog",e=i,k=r,d=-1,st="messageParentKey",y=i,ht="#ababab",ct="#ffffff",kt="#ccc",lt="newWindowNotificaiton",dt="crossZoneNotification",g="configureBrowserLink",nt="dialogNotificationTextPanel",p=n.WACUtils.shouldUseLocalStorageToPassMessage(),h={dispId:OSF.DDA.EventDispId.dispidDialogNotificationShownInAddinEvent,eventType:OSF.DDA.Marshaling.DialogNotificationShownEventType.DialogNotificationShown,onComplete:i};t.setHostThemeButtonStyle=gt;t.removeEventListenersForDialog=ni;t.handleNewWindowDialog=ti;t.closeDialog=ii;t.messageParent=ri;t.sendMessage=ui;t.registerMessageReceivedEvent=fi;t.setHandlerAndShowDialogCallback=ei;t.escDismissDialogNotification=oi;t.showCrossZoneNotification=at})(i=t.Dialog||(t.Dialog={}))})(t=n.AddinNativeAction||(n.AddinNativeAction={}))}(OfficeExt||(OfficeExt={}));OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogMessageReceivedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageType},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageContent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidMessageParentMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,value:OSF.DDA.Marshaling.MessageParentKeys.MessageToParent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSendMessageMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,value:OSF.DDA.Marshaling.SendMessageKeys.MessageContent}]});OSF.DDA.WAC.Delegate.openDialog=function(n){function t(n){var t={Error:n};try{e(Microsoft.Office.Common.InvokeResultCode.noError,t)}catch(i){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at showDialogCallback."+i)}}var u="https://",f="http://",r=JSON.parse(n.targetId),e=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!0,n),i;if(OSF.DialogShownStatus.hasDialogShown){t(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened);return}if(i=r[OSF.ShowWindowDialogParameterKeys.Url].toLowerCase(),i==null||!(i.substr(0,u.length)===u)){i.substr(0,f.length)===f?t(OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS):t(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme);return}r[OSF.ShowWindowDialogParameterKeys.DisplayInIframe]?(OSF.DialogShownStatus.isWindowDialog=!1,OSF.DDA.WAC.Delegate.registerEventAsync(n)):(OSF.DialogShownStatus.isWindowDialog=!0,OfficeExt.AddinNativeAction.Dialog.setHandlerAndShowDialogCallback(function(t){n.onEvent&&n.onEvent(t);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t),OfficeExt.AddinNativeAction.Dialog.handleNewWindowDialog(r))};OSF.DDA.WAC.Delegate.messageParent=function(n){window.opener!=null?OfficeExt.AddinNativeAction.Dialog.messageParent(n):OSF.DDA.WAC.Delegate.executeAsync(n)};OSF.DDA.WAC.Delegate.sendMessage=function(n){OSF.DialogShownStatus.hasDialogShown&&(OSF.DialogShownStatus.isWindowDialog?OfficeExt.AddinNativeAction.Dialog.sendMessage(n):OSF.DDA.WAC.Delegate.executeAsync(n))};OSF.DDA.WAC.Delegate.closeDialog=function(n){function t(n){var t={Error:n};try{i(Microsoft.Office.Common.InvokeResultCode.noError,t)}catch(r){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at closeDialogCallback."+r)}}var i=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!1,n);OSF.DialogShownStatus.hasDialogShown?OSF.DialogShownStatus.isWindowDialog?(n.onCalling&&n.onCalling(),OfficeExt.AddinNativeAction.Dialog.closeDialog(t)):OSF.DDA.WAC.Delegate.unregisterEventAsync(n):t(OSF.DDA.ErrorCodeManager.errorCodes.ooeWebDialogClosed)};OSF.InitializationHelper.prototype.dismissDialogNotification=function(){OfficeExt.AddinNativeAction.Dialog.escDismissDialogNotification()};OSF.InitializationHelper.prototype.registerMessageReceivedEventForWindowDialog=function(){OfficeExt.AddinNativeAction.Dialog.registerMessageReceivedEvent()};OSF.DDA.AsyncMethodNames.addNames({GetAccessTokenAsync:"getAccessTokenAsync"});OSF.DDA.Auth=function(){};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAccessTokenAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ForceConsent,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.ForceAddAccount,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.AuthChallenge,value:{types:["string"],defaultValue:""}}],onSucceeded:function(n){return n[Microsoft.Office.WebExtension.Parameters.Data]}});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("SingleSignOn",OSF.DDA.Marshaling);OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys={ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge"};OSF.DDA.Marshaling.SingleSignOn.AccessTokenResultKeys={AccessToken:"accessToken"};OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAccessTokenMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.ForceConsent,value:OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.ForceConsent},{name:Microsoft.Office.WebExtension.Parameters.ForceAddAccount,value:OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.ForceAddAccount},{name:Microsoft.Office.WebExtension.Parameters.AuthChallenge,value:OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.AuthChallenge}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.Marshaling.SingleSignOn.AccessTokenResultKeys.AccessToken}]});OSF.DDA.WAC.Delegate.ParameterMap.setDynamicType(Microsoft.Office.WebExtension.Parameters.Data,function(){var n="Rows",t="Headers";return{toHost:function(i){if(typeof i!="string"&&i[OSF.DDA.TableDataProperties.TableRows]!==undefined){var r={};r[n]=i[OSF.DDA.TableDataProperties.TableRows];r[t]=i[OSF.DDA.TableDataProperties.TableHeaders];i=r}else OSF.DDA.DataCoercion.determineCoercionType(i)==Microsoft.Office.WebExtension.CoercionType.Text&&(i=[[i]]);return i},fromHost:function(i){var r;return i[n]!=undefined?(r={},r[OSF.DDA.TableDataProperties.TableRows]=i[n],r[OSF.DDA.TableDataProperties.TableHeaders]=i[t]):r=i,r}}}());OSF.DDA.ExcelDocument=function(n,t){var i=this,r=new OSF.DDA.BindingFacade(i);OSF.DDA.DispIdHost.addAsyncMethods(r,[OSF.DDA.AsyncMethodNames.AddFromPromptAsync]);OSF.DDA.DispIdHost.addAsyncMethods(i,[OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync]);OSF.DDA.DispIdHost.addAsyncMethods(i,[OSF.DDA.AsyncMethodNames.GoToByIdAsync]);OSF.DDA.DispIdHost.addAsyncMethods(i,[OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync]);OSF.DDA.ExcelDocument.uber.constructor.call(i,n,r,t);i.mode==OSF.ClientMode.ReadOnly&&(i.url=document.URL);OSF.OUtil.finalizeProperties(i)};OSF.OUtil.extend(OSF.DDA.ExcelDocument,OSF.DDA.JsomDocument);OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(n,t){OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM);n.doc=new OSF.DDA.ExcelDocument(n,this._initializeSettings(n,!0));OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi,[OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]);OSF.DDA.RichApi.richApiMessageManager=new OfficeExt.RichApiMessageManager;t()};OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize=function(n){this.prepareApiSurface(n);Microsoft.Office.WebExtension.initialize(this.getInitializationReason(n))};OSF.InitializationHelper.prototype.prepareApiSurface=function(n){var t,i,r,u;OSF.WebApp._UpdateLinksForHostAndXdmInfo();t=new OSF.DDA.License(n.get_eToken());this.initWebDialog(n);this.initWebAuth(n);OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(n,n.doc,t));i=OSF.DDA.WAC.getDelegateMethods;r=OSF.DDA.WAC.Delegate.ParameterMap;OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(i,r));u=OfficeExt.AppCommand.AppCommandManager.instance();u.initializeAndChangeOnce()};OSF.InitializationHelper.prototype.getInitializationReason=function(n){return n.get_reason()};__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t=function(){function n(n,t,i){this.m_actionInfo=n;this.m_isWriteOperation=t;this.m_isRestrictedResourceAccess=i}return Object.defineProperty(n.prototype,"actionInfo",{get:function(){return this.m_actionInfo},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isRestrictedResourceAccess",{get:function(){return this.m_isRestrictedResourceAccess},enumerable:!0,configurable:!0}),n}();n.Action=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_callback=n}return n.prototype._handleResult=function(n){this.m_callback&&this.m_callback()},n}(),i=function(){function i(){}return i.createSetPropertyAction=function(t,i,r,u){var f;n.Utility.validateObjectPath(i);var o={Id:t._nextId(),ActionType:4,Name:r,ObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},s=[u],e=n.Utility.setMethodArguments(t,o.ArgumentInfo,s);return n.Utility.validateReferencedObjectPaths(e),t._pendingRequest.ensureInstantiateObjectPath(i._objectPath),t._pendingRequest.ensureInstantiateObjectPaths(e),f=new n.Action(o,!0,!1),t._pendingRequest.addAction(f),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addReferencedObjectPaths(e),f.referencedObjectPath=i._objectPath,f.referencedArgumentObjectPaths=e,f},i.createMethodAction=function(t,i,r,u,f,e){var h,o,c,s;return n.Utility.validateObjectPath(i),h={Id:t._nextId(),ActionType:3,Name:r,ObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},o=n.Utility.setMethodArguments(t,h.ArgumentInfo,f),n.Utility.validateReferencedObjectPaths(o),t._pendingRequest.ensureInstantiateObjectPath(i._objectPath),t._pendingRequest.ensureInstantiateObjectPaths(o),c=u!=1,s=new n.Action(h,c,e),t._pendingRequest.addAction(s),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addReferencedObjectPaths(o),s.referencedObjectPath=i._objectPath,s.referencedArgumentObjectPaths=o,s},i.createQueryAction=function(t,i,r){var f,u;return n.Utility.validateObjectPath(i),t._pendingRequest.ensureInstantiateObjectPath(i._objectPath),f={Id:t._nextId(),ActionType:2,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},f.QueryInfo=r,u=new n.Action(f,!1,!1),t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u.referencedObjectPath=i._objectPath,u},i.createRecursiveQueryAction=function(t,i,r){n.Utility.validateObjectPath(i);t._pendingRequest.ensureInstantiateObjectPath(i._objectPath);var f={Id:t._nextId(),ActionType:6,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id,RecursiveQueryInfo:r},u=new n.Action(f,!1,!1);return t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u.referencedObjectPath=i._objectPath,u},i.createQueryAsJsonAction=function(t,i,r){var f,u;return n.Utility.validateObjectPath(i),t._pendingRequest.ensureInstantiateObjectPath(i._objectPath),f={Id:t._nextId(),ActionType:7,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},f.QueryInfo=r,u=new n.Action(f,!1,!1),t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u.referencedObjectPath=i._objectPath,u},i.createEnsureUnchangedAction=function(t,i,r){n.Utility.validateObjectPath(i);t._pendingRequest.ensureInstantiateObjectPath(i._objectPath);var f={Id:t._nextId(),ActionType:8,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id,ObjectState:r},u=new n.Action(f,!1,!1);return t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u.referencedObjectPath=i._objectPath,u},i.createInstantiateAction=function(t,i){n.Utility.validateObjectPath(i);t._pendingRequest.ensureInstantiateObjectPath(i._objectPath.parentObjectPath);t._pendingRequest.ensureInstantiateObjectPaths(i._objectPath.argumentObjectPaths);var u={Id:t._nextId(),ActionType:1,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},r=new n.Action(u,!1,!1);return t._pendingRequest.addAction(r),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addActionResultHandler(r,new n.InstantiateActionResultHandler(i)),r.referencedObjectPath=i._objectPath,r},i.createTraceAction=function(t,i,r){var u={Id:t._nextId(),ActionType:5,Name:"Trace",ObjectPathId:0},f=new n.Action(u,!1,!1);return t._pendingRequest.addAction(f),r&&t._pendingRequest.addTrace(u.Id,i),f},i.createTraceMarkerForCallback=function(n,r){var u=i.createTraceAction(n,null,!1);n._pendingRequest.addActionResultHandler(u,new t(r))},i}();n.ActionFactory=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(t,i){n.Utility.checkArgumentNull(t,"context");this.m_context=t;this.m_objectPath=i;this.m_objectPath&&(t._processingResult||(n.ActionFactory.createInstantiateAction(t,this),t._autoCleanup&&this._KeepReference&&t.trackedObjects._autoAdd(this)))}return Object.defineProperty(t.prototype,"context",{get:function(){return this.m_context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_objectPath",{get:function(){return this.m_objectPath},set:function(n){this.m_objectPath=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNull",{get:function(){return n.Utility.throwIfNotLoaded("isNull",this._isNull,null,this._isNull),this._isNull},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNullObject",{get:function(){return n.Utility.throwIfNotLoaded("isNullObject",this._isNull,null,this._isNull),this._isNull},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_isNull",{get:function(){return this.m_isNull},set:function(n){this.m_isNull=n;n&&this.m_objectPath&&this.m_objectPath._updateAsNullObject()},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){this._isNull=n.Utility.isNullOrUndefined(t);this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this,t)},t.prototype._handleIdResult=function(t){this._isNull=n.Utility.isNullOrUndefined(t);n.Utility.fixObjectPathIfNecessary(this,t);this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this,t)},t.prototype._recursivelySet=function(i,r,u,f,e){var c=i instanceof t,v=i,o,a,h,s,l;if(c)if(Object.getPrototypeOf(this)===Object.getPrototypeOf(i))i=JSON.parse(JSON.stringify(i));else throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"properties",errorLocation:this._className+".set"});try{for(s=0;s0},enumerable:!0,configurable:!0}),t.prototype._getLastAction=function(){return this.m_actions[this.m_actions.length-1]},t.prototype.addTrace=function(n,t){this.m_traceInfos[n]=t},t.prototype.ensureInstantiateObjectPath=function(t){if(t){if(this.m_instantiatedObjectPaths[t.objectPathInfo.Id])return;if(this.ensureInstantiateObjectPath(t.parentObjectPath),this.ensureInstantiateObjectPaths(t.argumentObjectPaths),!this.m_instantiatedObjectPaths[t.objectPathInfo.Id]){var r={Id:this.m_context._nextId(),ActionType:1,Name:"",ObjectPathId:t.objectPathInfo.Id},i=new n.Action(r,!1,!1);i.referencedObjectPath=t;this.addAction(i)}}},t.prototype.ensureInstantiateObjectPaths=function(n){if(n)for(var t=0;t=0;--r)if(i=n[r],u=i.actionInfo.Id,i.referencedObjectPath&&t._updateLastUsedActionIdOfObjectPathId(e,i.referencedObjectPath,u),o=i.referencedArgumentObjectPaths,o)for(v=o.length,s=0;s0?i.actionInfo.L=c:i.actionInfo.L&&delete i.actionInfo.L},t}();n.ClientRequest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;n._internalConfig={showDisposeInfoInDebugInfo:!1,enableEarlyDispose:!0,alwaysPolyfillClientObjectRetrieveMethod:!1};t=function(){function t(){}return t.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},t.prototype._createRequestExecutorOrNull=function(){return null},Object.defineProperty(t.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),t}();n.SessionBase=t;i=function(){function i(r){if(this.m_customRequestHeaders={},this._onRunFinishedNotifiers=[],this.m_nextId=0,i._overrideSession)this.m_requestUrlAndHeaderInfoResolver=i._overrideSession;else if((n.Utility.isNullOrUndefined(r)||typeof r=="string"&&r.length===0)&&(r=i.defaultRequestUrlAndHeaders,r||(r={url:n.Constants.localDocument,headers:{}})),typeof r=="string")this.m_requestUrlAndHeaderInfo={url:r,headers:{}};else if(i.isRequestUrlAndHeaderInfoResolver(r))this.m_requestUrlAndHeaderInfoResolver=r;else if(i.isRequestUrlAndHeaderInfo(r)){var u=r;this.m_requestUrlAndHeaderInfo={url:u.url,headers:{}};n.Utility._copyHeaders(u.headers,this.m_requestUrlAndHeaderInfo.headers)}else throw n._Internal.RuntimeError._createInvalidArgError("url");this.m_requestUrlAndHeaderInfoResolver instanceof t&&(this.m_session=this.m_requestUrlAndHeaderInfoResolver);this._processingResult=!1;this._customData=n.Constants.iterativeExecutor;this.sync=this.sync.bind(this)}return Object.defineProperty(i.prototype,"session",{get:function(){return this.m_session},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"eventRegistration",{get:function(){return this.m_session?this.m_session.eventRegistration:n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_url",{get:function(){return this.m_requestUrlAndHeaderInfo?this.m_requestUrlAndHeaderInfo.url:null},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_pendingRequest",{get:function(){return this.m_pendingRequest==null&&(this.m_pendingRequest=new n.ClientRequest(this)),this.m_pendingRequest},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"debugInfo",{get:function(){var t=new n.RequestPrettyPrinter(this._rootObjectPropertyName,this._pendingRequest._objectPaths,this._pendingRequest._actions,n._internalConfig.showDisposeInfoInDebugInfo),i=t.process();return{pendingStatements:i}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"trackedObjects",{get:function(){return this.m_trackedObjects||(this.m_trackedObjects=new n.TrackedObjects(this)),this.m_trackedObjects},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"requestHeaders",{get:function(){return this.m_customRequestHeaders},enumerable:!0,configurable:!0}),i.prototype.load=function(t,r){n.Utility.validateContext(this,t);var u=i._parseQueryOption(r),f=n.ActionFactory.createQueryAction(this,t,u);this._pendingRequest.addActionResultHandler(f,t)},i.isLoadOption=function(t){if(!n.Utility.isUndefined(t.select)&&(typeof t.select=="string"||Array.isArray(t.select))||!n.Utility.isUndefined(t.expand)&&(typeof t.expand=="string"||Array.isArray(t.expand))||!n.Utility.isUndefined(t.top)&&typeof t.top=="number"||!n.Utility.isUndefined(t.skip)&&typeof t.skip=="number")return!0;for(var i in t)return!1;return!0},i.parseStrictLoadOption=function(n){var t={Select:[]};return i.parseStrictLoadOptionHelper(t,"","option",n),t},i.combineQueryPath=function(n,t,i){return n.length===0?t:n+i+t},i.parseStrictLoadOptionHelper=function(t,r,u,f){var e,o;for(e in f)if(o=f[e],e==="$all"){if(typeof o!="boolean")throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));o&&t.Select.push(i.combineQueryPath(r,"*","/"))}else if(e==="$top"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));t.Top=o}else if(e==="$skip"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));t.Skip=o}else if(typeof o=="boolean")o&&t.Select.push(i.combineQueryPath(r,e,"/"));else if(typeof o=="object")i.parseStrictLoadOptionHelper(t,i.combineQueryPath(r,e,"/"),i.combineQueryPath(u,e,"."),o);else throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));},i._parseQueryOption=function(t){var u={},f,r;if(typeof t=="string")f=t,u.Select=n.Utility._parseSelectExpand(f);else if(Array.isArray(t))u.Select=t;else if(typeof t=="object")if(r=t,i.isLoadOption(r)){if(typeof r.select=="string")u.Select=n.Utility._parseSelectExpand(r.select);else if(Array.isArray(r.select))u.Select=r.select;else if(!n.Utility.isNullOrUndefined(r.select))throw n._Internal.RuntimeError._createInvalidArgError("option.select");if(typeof r.expand=="string")u.Expand=n.Utility._parseSelectExpand(r.expand);else if(Array.isArray(r.expand))u.Expand=r.expand;else if(!n.Utility.isNullOrUndefined(r.expand))throw n._Internal.RuntimeError._createInvalidArgError("option.expand");if(typeof r.top=="number")u.Top=r.top;else if(!n.Utility.isNullOrUndefined(r.top))throw n._Internal.RuntimeError._createInvalidArgError("option.top");if(typeof r.skip=="number")u.Skip=r.skip;else if(!n.Utility.isNullOrUndefined(r.skip))throw n._Internal.RuntimeError._createInvalidArgError("option.skip");}else u=i.parseStrictLoadOption(t);else if(!n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError("option");return u},i.prototype.loadRecursive=function(t,r,u){var f,e,o;if(!n.Utility.isPlainJsonObject(r))throw n._Internal.RuntimeError._createInvalidArgError("options");f={};for(e in r)f[e]=i._parseQueryOption(r[e]);o=n.ActionFactory.createRecursiveQueryAction(this,t,{Queries:f,MaxDepth:u});this._pendingRequest.addActionResultHandler(o,t)},i.prototype.trace=function(t){n.ActionFactory.createTraceAction(this,t,!0)},i.prototype._processOfficeJsErrorResponse=function(n,t){},i.prototype.syncPrivateMain=function(){var t=this;return n.Utility._createPromiseFromResult(null).then(function(){if(!t.m_requestUrlAndHeaderInfo)return t.m_requestUrlAndHeaderInfoResolver._resolveRequestUrlAndHeaderInfo().then(function(i){if(t.m_requestUrlAndHeaderInfo=i,t.m_requestUrlAndHeaderInfo||(t.m_requestUrlAndHeaderInfo={url:n.Constants.localDocument,headers:{}}),n.Utility.isNullOrEmptyString(t.m_requestUrlAndHeaderInfo.url)&&(t.m_requestUrlAndHeaderInfo.url=n.Constants.localDocument),t.m_requestUrlAndHeaderInfo.headers||(t.m_requestUrlAndHeaderInfo.headers={}),typeof t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull=="function"){var r=t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull();r&&(t._requestExecutor=r)}})}).then(function(){var n=t._pendingRequest;return t.m_pendingRequest=null,t.processPreSyncPromises(n).then(function(){return t.syncPrivate(n)})})},i.prototype.syncPrivate=function(t){var f=this,e,o,s,u,h,r,i;return t.hasActions?(e=t.buildRequestMessageBody(),o=t.flags,this._requestExecutor||(this._requestExecutor=n.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)?new n.OfficeJsRequestExecutor(this):new n.HttpRequestExecutor),s=this._requestExecutor,u={},n.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,u),n.Utility._copyHeaders(this.m_customRequestHeaders,u),h={Url:this.m_requestUrlAndHeaderInfo.url,Headers:u,Body:e},t.invalidatePendingInvalidObjectPaths(),r=null,i=null,this._lastSyncStart=performance.now(),s.executeAsync(this._customData,o,h).then(function(u){return f._lastSyncEnd=performance.now(),r=f.processRequestExecutorResponseMessage(t,u),f.processPendingEventHandlers(t).catch(function(t){n.Utility.log("Error in processPendingEventHandlers");n.Utility.log(JSON.stringify(t));i=t})}).then(function(){var u,f;if(r){n.Utility.log("Throw error from response: "+JSON.stringify(r));throw r;}if(i){n.Utility.log("Throw error from ProcessEventHandler: "+JSON.stringify(i));u=null;i instanceof n._Internal.RuntimeError?(u=i,u.traceMessages=t._responseTraceMessages):(f=null,f=typeof i=="string"?i:i.message,n.Utility.isNullOrEmptyString(f)&&(f=n.Utility._getResourceString(n.ResourceStrings.cannotRegisterEvent)),u=new n._Internal.RuntimeError({code:n.ErrorCodes.cannotRegisterEvent,message:f,traceMessages:t._responseTraceMessages}));throw u;}})):this.processPendingEventHandlers(t)},i.prototype.processRequestExecutorResponseMessage=function(t,i){var e,r,o,u,f;if(i.Body&&i.Body.TraceIds&&t._setResponseTraceIds(i.Body.TraceIds),e=t._responseTraceMessages,r=null,i.Body&&(i.Body.Error&&i.Body.Error.ActionIndex>=0&&(o=new n.RequestPrettyPrinter(this._rootObjectPropertyName,t._objectPaths,t._actions),r=o.processForDebugStatementInfo(i.Body.Error.ActionIndex)),u=null,i.Body.Results?u=i.Body.Results:i.Body.ProcessedResults&&i.Body.ProcessedResults.Results&&(u=i.Body.ProcessedResults.Results),u)){this._processingResult=!0;try{t.processResponse(u)}finally{this._processingResult=!1}}if(n.Utility.isNullOrEmptyString(i.ErrorCode)){if(i.Body&&i.Body.Error)return f={errorLocation:i.Body.Error.Location},r&&(f.statement=r.statement,f.surroundingStatements=r.surroundingStatements),new n._Internal.RuntimeError({code:i.Body.Error.Code,message:i.Body.Error.Message,traceMessages:e,debugInfo:f})}else return new n._Internal.RuntimeError({code:i.ErrorCode,message:i.ErrorMessage,traceMessages:e});return null},i.prototype.processPendingEventHandlers=function(t){for(var u,i=n.Utility._createPromiseFromResult(null),r=0;r0&&(typeof r[0]=="string"||i.isRequestUrlAndHeaderInfo(r[0])||i.isRequestUrlAndHeaderInfoResolver(r[0]))&&(y=r[0],h=1),r.length==h+1)l=u,v=r[h+0];else if(r.length==h+2){if(n.Utility.isNullOrUndefined(r[h+0]))l=u;else if(r[h+0]instanceof n.ClientObject)l=function(){return r[h+0].context};else if(r[h+0]instanceof i)l=function(){return r[h+0]};else if(Array.isArray(r[h+0])){if(c=r[h+0],c.length==0)return i.createErrorPromise(t);for(a=0;a0){var n=c._onRunFinishedNotifiers.shift();n()}if(a)return l;else throw l;})},i.prototype._nextId=function(){return++this.m_nextId},i}();n.ClientRequestContext=i}(OfficeExtension||(OfficeExtension={})),function(n){var i=function(){function t(n){this.m_type=n}return Object.defineProperty(t.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){(this.m_isLoaded=!0,typeof t=="object"&&t&&t._IsNull)||(this.m_value=this.m_type===1?n.Utility.adjustToDateTime(t):t)},t}(),t;n.ClientResult=i;t=function(){function t(n,t){this.m_proxy=n;this.m_shouldPolyfill=t}return Object.defineProperty(t.prototype,"proxy",{get:function(){return this.m_proxy},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"retrieveResult.data"}});return this.m_data},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(n){if(this.m_isLoaded=!0,typeof n=="object"&&n&&n._IsNull){this.m_data=null;return}this.m_data=this.m_shouldPolyfill?this.changePropertyNameToCamelLowerCase(n):n},t.prototype.changePropertyNameToCamelLowerCase=function(t){var o=95,u,i,r,f,e;if(Array.isArray(t)){for(i=[],u=0;u0&&(r=!0),t=document.createElement("a"),t.href=this.m_url,r?t.hash=t.hash.length===0||t.hash==="#"?"#"+i:t.hash+"&"+i:t.search=t.search.length===0||t.search==="?"?"?"+i:t.search+"&"+i,t.href},f.prototype.init=function(){var t=this,i;return window.addEventListener("message",this.m_onMessageHandler),i=this._getIFrameSrc(),new n._Internal.OfficePromise(function(r,u){var f=document.createElement("iframe");t.m_options.id&&(f.id=t.m_options.id);f.style.height=t.m_options.height;f.style.width=t.m_options.width;f.src=i;t.m_options.container.appendChild(f);t.m_timeoutId=setTimeout(function(){t.close();var i=n.Utility.createRuntimeError(n.ErrorCodes.timeout,n.Utility._getResourceString(n.ResourceStrings.timeout),"EmbeddedSession.init");u(i)},t.m_options.timeoutInMilliseconds);t.m_promiseResolver=r})},f.prototype._invoke=function(n,t,u){if(!this.m_enabled){t(i.InternalError,null);return}r.invokeRequestModifier&&(u=r.invokeRequestModifier(u));this._sendMessageWithCallback(this.m_id++,n,u,function(n){r.invokeResponseModifier&&(n=r.invokeResponseModifier(n));var u=n.Error;delete n.Error;t(u||i.Success,n)})},f.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler);window.clearTimeout(this.m_timeoutId);this.m_enabled=!1},Object.defineProperty(f.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),f.prototype._createRequestExecutorOrNull=function(){return new e(this)},f.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},f.prototype._registerEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.RegisterEventCommand,{EventId:i,TargetId:r},function(){n(null)})})},f.prototype._unregisterEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.UnregisterEventCommand,{EventId:i,TargetId:r},function(){n()})})},f.prototype._onMessage=function(n){var u=this,i,e,r,o,s;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===n.source&&this.m_chosenOrigin===n.origin)){if(i=n.data,i&&i[t.CommandKey]===t.ApiReadyCommand){!this.m_chosenWindow&&this._isValidDescendant(n.source)&&i[t.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=n.source,this.m_chosenOrigin=n.origin,this._sendMessageWithCallback(this.m_id++,t.GetAppContextCommand,null,function(n){u._setupContext(n);window.clearTimeout(u.m_timeoutId);u.m_promiseResolver()}));return}if(i&&i[t.CommandKey]===t.FireEventCommand){var f=i[t.ParamsKey],h=f.EventId,c=f.TargetId,l=f.Data;if(this.m_sessionEventManager)for(e=this.m_sessionEventManager.getHandlers(h,c),r=0;r=0;o--)if(r[o]===e[i].handler){r.splice(o,1);break}break;case 2:r=[];break}}return s&&(!this.m_registered&&r.length>0?u=u.then(function(){return f.m_eventInfo.registerFunc(f.m_callback)}).then(function(){return f.m_registered=!0}):this.m_registered&&r.length==0&&(u=u.then(function(){return f.m_eventInfo.unregisterFunc(f.m_callback)}).catch(function(t){n.Utility.log("Error when unregister event: "+JSON.stringify(t))}).then(function(){return f.m_registered=!1})),u=u.then(function(){return f.m_handlers=r})),u},t.prototype.fireEvent=function(t){for(var u,f,r=[],i=0;i=0;e--)if(f[e]===u){f.splice(e,1);break}return f.length===0?this.m_unregisterEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i}();n.EventRegistration=i}(OfficeExtension||(OfficeExtension={})),function(n){function r(n){t._testReadyImpl=n}function u(n){t.getGenericEventRegistration()._handleRichApiMessage(n)}var t=function(){function t(){this.m_eventRegistration=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this));this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this)}return t.prototype.ready=function(){var i=this;return this.m_ready||(this.m_ready=t._testReadyImpl?t._testReadyImpl().then(function(){i.m_isReady=!0}):n._Internal.officeJsEventRegistration.register(5,"",this.m_richApiMessageHandler).then(function(){i.m_isReady=!0})),this.m_ready},Object.defineProperty(t.prototype,"isReady",{get:function(){return this.m_isReady},enumerable:!0,configurable:!0}),t.prototype.register=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.register(n,t,i)})},t.prototype.unregister=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.unregister(n,t,i)})},t.prototype._registerEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._unregisterEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._handleRichApiMessage=function(t){var r,i,u,e,f;if(t&&t.entries)for(r=0;r0))for(e=JSON.parse(i.message),i.isRemoteOverride&&(e.source=n.Constants.eventSourceRemote),f=0;f=0;u--)if(n[u]===i){n.splice(u,1);break}n.length==0&&t.getGenericEventRegistration().unregister(r.m_genericEventInfo.eventType,r.m_genericEventInfo.getTargetIdFunc(),r._callback)})},r.prototype.removeAll=function(){},r}(n.EventHandlers);n.GenericEventHandlers=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var s=JSON.stringify(u.Body),f=u.Url,e,o;if(f.charAt(f.length-1)!="/"&&(f=f+"/"),f=f+n.Constants.processQuery,f=f+"?"+n.Constants.flags+"="+r.toString(),e={method:"POST",url:f,headers:{},body:s},e.headers[n.Constants.sourceLibHeader]=t.SourceLibHeaderValue,e.headers["CONTENT-TYPE"]="application/json",u.Headers)for(o in u.Headers)e.headers[o]=u.Headers[o];return n.HttpUtility.sendRequest(e).then(function(t){var i,r;return t.statusCode===200?i={ErrorCode:null,ErrorMessage:null,Headers:t.headers,Body:JSON.parse(t.body)}:(n.Utility.log("Error Response:"+t.body),r=n.Utility._parseErrorResponse(t),i={ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:t.headers,Body:null}),i})},t.SourceLibHeaderValue="officejs-rest",t}();n.HttpRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.setCustomSendRequestFunc=function(n){t.s_customSendRequestFunc=n},t.xhrSendRequestFunc=function(t){return new n._Internal.OfficePromise(function(i,r){var u=new XMLHttpRequest,f;if(u.open(t.method,t.url),u.onload=function(){var t={statusCode:u.status,headers:n.Utility._parseHttpResponseHeaders(u.getAllResponseHeaders()),body:u.responseText};i(t)},u.onerror=function(){r(new n._Internal.RuntimeError({code:n.ErrorCodes.connectionFailure,message:n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,u.statusText)}))},t.headers)for(f in t.headers)u.setRequestHeader(f,t.headers[f]);u.send(t.body)})},t.sendRequest=function(n){t.validateAndNormalizeRequest(n);var i=t.s_customSendRequestFunc;return i||(i=t.xhrSendRequestFunc),i(n)},t.setCustomSendLocalDocumentRequestFunc=function(n){t.s_customSendLocalDocumentRequestFunc=n},t.sendLocalDocumentRequest=function(n){t.validateAndNormalizeRequest(n);var i;return i=t.s_customSendLocalDocumentRequestFunc||t.officeJsSendLocalDocumentRequestFunc,i(n)},t.officeJsSendLocalDocumentRequestFunc=function(t){t=n.Utility._validateLocalDocumentRequest(t);var i=n.Utility._buildRequestMessageSafeArray(t);return new n._Internal.OfficePromise(function(t,r){OSF.DDA.RichApi.executeRichApiRequestAsync(i,function(i){var r;r=i.status=="succeeded"?{statusCode:n.RichApiMessageUtility.getResponseStatusCode(i),headers:n.RichApiMessageUtility.getResponseHeaders(i),body:n.RichApiMessageUtility.getResponseBody(i)}:n.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(i.error.code,i.error.message);n.Utility.log(JSON.stringify(r));t(r)})})},t.validateAndNormalizeRequest=function(t){if(n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"request"});n.Utility.isNullOrEmptyString(t.method)&&(t.method="GET");t.method=t.method.toUpperCase()},t.logRequest=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Request---"),n.Utility.log(i.method+" "+i.url),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t.logResponse=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Response---"),n.Utility.log(""+i.statusCode),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t._logBody=!1,t}();n.HttpUtility=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_clientObject=n}return n.prototype._handleResult=function(n){this.m_clientObject._handleIdResult(n)},n}();n.InstantiateActionResultHandler=t}(OfficeExtension||(OfficeExtension={})),function(n){}(OfficeExtension||(OfficeExtension={})),function(n){var u=function(){function t(n){this.m_session=n}return t.prototype.executeAsync=function(t,r,u){var e={url:n.Constants.processQuery,method:"POST",headers:u.Headers,body:u.Body},f={id:i.nextId(),type:1,flags:r,message:e};return n.Utility.log(JSON.stringify(f)),this.m_session.sendMessageToHost(f).then(function(t){var i,r,u;return n.Utility.log("Received response: "+JSON.stringify(t)),i=t.message,i.statusCode===200?r={ErrorCode:null,ErrorMessage:null,Headers:i.headers,Body:i.body}:(n.Utility.log("Error Response:"+i.body),u=n.Utility._parseErrorResponse(i),r={ErrorCode:u.errorCode,ErrorMessage:u.errorMessage,Headers:i.headers,Body:null}),r})},t}(),i=function(i){function r(n){var t=this;i.call(this);this.m_promiseResolver={};this.m_bridge=n;this.m_bridge.onMessageFromHost=function(n){t.onMessageFromHost(n)}}return __extends(r,i),r.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},r.prototype._createRequestExecutorOrNull=function(){return n.Utility.log("NativeBridgeSession::CreateRequestExecutor"),new u(this)},Object.defineProperty(r.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),r.init=function(t){if(t&&typeof t=="object"){var i=new r(t);n.ClientRequestContext._overrideSession=i;n.HttpUtility.setCustomSendLocalDocumentRequestFunc(function(n){var t={id:r.nextId(),type:1,flags:0,message:n};return i.sendMessageToHost(t).then(function(n){return n.message})})}},r.prototype.sendMessageToHost=function(t){var i=this;return this.m_bridge.sendMessageToHost(JSON.stringify(t)),new n._Internal.OfficePromise(function(n,r){i.m_promiseResolver[t.id]=n})},r.prototype.onMessageFromHost=function(n){var i,r;n==="test"?t._testFunc&&t._testFunc():(i=JSON.parse(n),typeof i.id=="number"&&(r=this.m_promiseResolver[i.id],r&&r(i),delete this.m_promiseResolver[i.id]))},r.nextId=function(){return r.s_nextId++},r.s_nextId=1,r}(n.SessionBase),r=function(){function n(){}return n.init=function(n){i.init(n)},n}(),t;n.HostBridge=r;typeof _richApiNativeBridge=="object"&&_richApiNativeBridge&&r.init(_richApiNativeBridge);t=function(){function n(){}return n.setTestFunc=function(t){n._testFunc=t},n}();n.HostBridgeTest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){this.m_objectPathInfo=n;this.m_parentObjectPath=t;this.m_isWriteOperation=!1;this.m_isCollection=i;this.m_isInvalidAfterRequest=r;this.m_isValid=!0}return Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},set:function(n){this.m_isWriteOperation=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRestrictedResourceAccess",{get:function(){return this.m_isRestrictedResourceAccess},set:function(n){this.m_isRestrictedResourceAccess=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(n){this.m_argumentObjectPaths=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(n){this.m_isValid=n;!n&&this.m_objectPathInfo.ObjectPathType===6&&this.m_savedObjectPathInfo&&(t.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(n){this.m_getByIdMethodName=n},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null},t.prototype.updateUsingObjectData=function(i){var e=i[n.Constants.referenceId],f,o,u,r;if(!n.Utility.isNullOrEmptyString(e)){this.m_savedObjectPathInfo||this.isInvalidAfterRequest||!t.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)||(f={},t.copyObjectPathInfo(this.m_objectPathInfo,f),this.m_savedObjectPathInfo={pathInfo:f,parent:this.m_parentObjectPath});this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=e;this.m_objectPathInfo.ArgumentInfo={};delete this.m_objectPathInfo.ParentObjectPathId;this.m_parentObjectPath=null;this.m_argumentObjectPaths=null;return}if(o=this.parentObjectPath&&this.parentObjectPath.isCollection,u=this.getByIdMethodName,(o||!n.Utility.isNullOrEmptyString(u))&&(r=i[n.Constants.id],n.Utility.isNullOrUndefined(r)&&(r=i[n.Constants.idPrivate]),!n.Utility.isNullOrUndefined(r))){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;n.Utility.isNullOrEmptyString(u)?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=u,this.m_getByIdMethodName=null);this.isWriteOperation=!1;this.m_objectPathInfo.ArgumentInfo={};this.m_objectPathInfo.ArgumentInfo.Arguments=[r];this.m_argumentObjectPaths=null;return}},t.isRestorableObjectPath=function(n){return n===1||n===5||n===3||n===4},t.copyObjectPathInfo=function(n,t){t.Id=n.Id;t.ArgumentInfo=n.ArgumentInfo;t.Name=n.Name;t.ObjectPathType=n.ObjectPathType;t.ParentObjectPathId=n.ParentObjectPathId},t}();n.ObjectPath=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createGlobalObjectObjectPath=function(t){var i={Id:t._nextId(),ObjectPathType:1,Name:""};return new n.ObjectPath(i,null,!1,!1)},t.createNewObjectObjectPath=function(t,i,r,u){var e={Id:t._nextId(),ObjectPathType:2,Name:i},f=new n.ObjectPath(e,null,r,!1);return f.isRestrictedResourceAccess=u,f},t.createPropertyObjectPath=function(t,i,r,u,f,e){var s={Id:t._nextId(),ObjectPathType:4,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id},o=new n.ObjectPath(s,i._objectPath,u,f);return o.isRestrictedResourceAccess=e,o},t.createIndexerObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i._objectPath,!1,!1)},t.createIndexerObjectPathUsingParentPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i,!1,!1)},t.createMethodObjectPath=function(t,i,r,u,f,e,o,s,h){var l={Id:t._nextId(),ObjectPathType:3,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},a=n.Utility.setMethodArguments(t,l.ArgumentInfo,f),c=new n.ObjectPath(l,i._objectPath,e,o);return c.argumentObjectPaths=a,c.isWriteOperation=u!=1,c.getByIdMethodName=s,c.isRestrictedResourceAccess=h,c},t.createReferenceIdObjectPath=function(t,i){var r={Id:t._nextId(),ObjectPathType:6,Name:i,ArgumentInfo:{}};return new n.ObjectPath(r,null,!1,!1)},t.createChildItemObjectPathUsingIndexerOrGetItemAt=function(i,r,u,f,e){var o=f[n.Constants.id];return n.Utility.isNullOrUndefined(o)&&(o=f[n.Constants.idPrivate]),i&&!n.Utility.isNullOrUndefined(o)?t.createChildItemObjectPathUsingIndexer(r,u,f):t.createChildItemObjectPathUsingGetItemAt(r,u,f,e)},t.createChildItemObjectPathUsingIndexer=function(t,i,r){var f=r[n.Constants.id],u;return n.Utility.isNullOrUndefined(f)&&(f=r[n.Constants.idPrivate]),u=u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u.ArgumentInfo.Arguments=[f],new n.ObjectPath(u,i._objectPath,!1,!1)},t.createChildItemObjectPathUsingGetItemAt=function(t,i,r,u){var e=r[n.Constants.index],f;return e&&(u=e),f={Id:t._nextId(),ObjectPathType:3,Name:n.Constants.getItemAt,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f.ArgumentInfo.Arguments=[u],new n.ObjectPath(f,i._objectPath,!1,!1)},t}();n.ObjectPathFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_context=n}return t.prototype.executeAsync=function(i,r,u){var f=this,e=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n._Internal.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(e,function(i){n.Utility.log("Response:");n.Utility.log(JSON.stringify(i));var r;i.status=="succeeded"?r=n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBody(i),n.RichApiMessageUtility.getResponseHeaders(i)):(r=n.RichApiMessageUtility.buildResponseOnError(i.error.code,i.error.message),f.m_context._processOfficeJsErrorResponse(i.error.code,r));t(r)})})},t.SourceLibHeaderValue="officejs",t}();n.OfficeJsRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){n.OfficeRequire=function(){return null}()})(t=n._Internal||(n._Internal={})),function(n){var t;(function(t){function i(){return function(){"use strict";function vt(n){return typeof n=="function"||typeof n=="object"&&n!==null}function b(n){return typeof n=="function"}function yt(n){return typeof n=="object"&&n!==null}function wt(n){k=n}function bt(n){f=n}function ni(){var t=process.nextTick,n=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&n[1]==="0"&&n[2]==="10"&&(t=setImmediate),function(){t(c)}}function tr(){return function(){pt(c)}}function ti(){var n=0,i=new it(c),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function ii(){var n=new MessageChannel;return n.port1.onmessage=c,function(){n.port2.postMessage(0)}}function ri(){return function(){setTimeout(c,1)}}function c(){for(var t,i,n=0;n=0?(n=n.substring(t+5,n.length),n<"14.14393"?!0:!1):!1}function i(){return typeof window=="undefined"&&typeof Promise=="function"?Promise:typeof window!="undefined"&&window.Promise?t()?n.PromiseImpl.Init():window.Promise:n.PromiseImpl.Init()}n.OfficePromise=i()}(t=n._Internal||(n._Internal={}));i=t.OfficePromise;n.Promise=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this._autoCleanupList={};this.m_context=n}return t.prototype.add=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._addCommon(n,!0)}):this._addCommon(n,!0)},t.prototype._autoAdd=function(n){this._addCommon(n,!1);this._autoCleanupList[n._objectPath.objectPathInfo.Id]=n},t.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(t,i){var r=this.m_context._autoCleanup&&!t[n.Constants.isTracked]&&t!==this.m_context._rootObject&&i&&!n.Utility.isNullOrEmptyString(i[n.Constants.referenceId]);r&&(this._autoCleanupList[t._objectPath.objectPathInfo.Id]=t,t[n.Constants.isTracked]=!0)},t.prototype._addCommon=function(t,i){if(t[n.Constants.isTracked]){i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id];return}var r=t[n.Constants.referenceId];n.Utility.isNullOrEmptyString(r)&&t._KeepReference&&(t._KeepReference(),n.ActionFactory.createInstantiateAction(this.m_context,t),i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id],t[n.Constants.isTracked]=!0)},t.prototype.remove=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._removeCommon(n)}):this._removeCommon(n)},t.prototype._removeCommon=function(t){var r=t[n.Constants.referenceId],i;n.Utility.isNullOrEmptyString(r)||(i=this.m_context._rootObject,i._RemoveReference&&i._RemoveReference(r),delete t[n.Constants.isTracked])},t.prototype._retrieveAndClearAutoCleanupList=function(){var n=this._autoCleanupList;return this._autoCleanupList={},n},t}();n.TrackedObjects=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){n||(n="root");this.m_globalObjName=n;this.m_referencedObjectPaths=t;this.m_actions=i;this.m_statements=[];this.m_variableNameForObjectPathMap={};this.m_variableNameToObjectPathMap={};this.m_declaredObjectPathMap={};this.m_showDispose=r}return t.prototype.process=function(){this.m_showDispose&&n.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions);for(var t=0;t=0&&this.m_statements.length>i+o+1)break;if(i<0)return null;for(f=i-o,f<0&&(f=0),e=i+1+o,e>this.m_statements.length&&(e=this.m_statements.length),r=[],f!=0&&r.push("..."),s=f;s>>>>"),r.push(this.m_statements[i]),r.push("// <<<<<"),h=i+1;h0)?(r=i.map(function(n){return u.getObjVarName(n)}).join(", "),n+" // And then dispose {"+r+"}"):n},t.prototype.buildQueryExpression=function(n){if(n.actionInfo.QueryInfo){var t={};return t.select=n.actionInfo.QueryInfo.Select,t.expand=n.actionInfo.QueryInfo.Expand,t.skip=n.actionInfo.QueryInfo.Skip,t.top=n.actionInfo.QueryInfo.Top,typeof t.top=="undefined"&&typeof t.skip=="undefined"&&typeof t.expand=="undefined"?typeof t.select=="undefined"?"":JSON.stringify(t.select):JSON.stringify(t)}return""},t.prototype.buildObjectPathExpressionWithParent=function(n){var t=n.objectPathInfo.ObjectPathType==5||n.objectPathInfo.ObjectPathType==3||n.objectPathInfo.ObjectPathType==4;return t&&n.objectPathInfo.ParentObjectPathId?this.getObjVarName(n.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(n):this.buildObjectPathExpression(n)},t.prototype.buildObjectPathExpression=function(t){switch(t.objectPathInfo.ObjectPathType){case 1:return"context."+this.m_globalObjName;case 5:return"getItem("+this.buildArgumentsExpression(t.objectPathInfo.ArgumentInfo)+")";case 3:return n.Utility._toCamelLowerCase(t.objectPathInfo.Name)+"("+this.buildArgumentsExpression(t.objectPathInfo.ArgumentInfo)+")";case 2:return t.objectPathInfo.Name+".newObject()";case 7:return"null";case 4:return n.Utility._toCamelLowerCase(t.objectPathInfo.Name);case 6:return"context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(t.objectPathInfo.Name)+")"}},t.prototype.buildArgumentsExpression=function(n){var t="",i;if(!n.Arguments)return t;for(i=0;i0&&(t=t+", "),t=t+this.buildArgumentLiteral(n.Arguments[i],n.ReferencedObjectPathIds?n.ReferencedObjectPathIds[i]:null);return t==="undefined"&&(t=""),t},t.prototype.buildArgumentLiteral=function(n,t){return typeof n=="number"&&n===t?this.getObjVarName(t):JSON.stringify(n)},t.prototype.getObjVarNameBase=function(t){var u="v",f=this.m_referencedObjectPaths[t],i,r;switch(f.objectPathInfo.ObjectPathType){case 1:u=this.m_globalObjName;break;case 4:u=n.Utility._toCamelLowerCase(f.objectPathInfo.Name);break;case 3:i=f.objectPathInfo.Name;i.length>3&&i.substr(0,3)==="Get"&&(i=i.substr(3));u=n.Utility._toCamelLowerCase(i);break;case 5:r=this.getObjVarNameBase(f.objectPathInfo.ParentObjectPathId);u=r.charAt(r.length-1)==="s"?r.substr(0,r.length-1):r+"Item";break}return u},t.prototype.getObjVarName=function(n){var t,i;if(this.m_variableNameForObjectPathMap[n])return this.m_variableNameForObjectPathMap[n];if(t=this.getObjVarNameBase(n),!this.m_variableNameToObjectPathMap[t])return this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t;for(i=1;this.m_variableNameToObjectPathMap[t+i.toString()];)i++;return t=t+i.toString(),this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t},t}();n.RequestPrettyPrinter=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.cannotRegisterEvent="CannotRegisterEvent",n.connectionFailureWithStatus="ConnectionFailureWithStatus",n.connectionFailureWithDetails="ConnectionFailureWithDetails",n.invalidObjectPath="InvalidObjectPath",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.invalidArgumentGeneric="InvalidArgumentGeneric",n.propertyNotLoaded="PropertyNotLoaded",n.runMustReturnPromise="RunMustReturnPromise",n.timeout="Timeout",n.propertyDoesNotExist="PropertyDoesNotExist",n.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",n.moreInfoInnerError="MoreInfoInnerError",n.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",n.valueNotLoaded="ValueNotLoaded",n.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage",n.invalidOperationInCellEditMode="InvalidOperationInCellEditMode",n.customFunctionDefintionMissing="CustomFunctionDefintionMissing",n.customFunctionImplementationMissing="CustomFunctionImplementationMissing",n.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars",n.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit",n.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch",n.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing",n.apiNotFoundDetails="ApiNotFoundDetails",n}();n.ResourceStrings=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.CannotRegisterEvent="The event handler cannot be registered.",n.ConnectionFailureWithStatus="The request failed with status code of {0}.",n.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}",n.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",n.InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',n.InvalidRequestContext="Cannot use the object across different request contexts.",n.PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",n.RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',n.Timeout="The operation has timed out.",n.ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.',n.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.",n.InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.",n.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions.",n.CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.",n.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods.",n.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name.",n.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.",n.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.",n.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.",n}();n.ResourceStringValues=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.buildMessageArrayForIRequestExecutor=function(i,r,u,f){var o=JSON.stringify(u.Body),e;return n.Utility.log("Request:"),n.Utility.log(o),e={},e[n.Constants.sourceLibHeader]=f,t.buildRequestMessageSafeArray(i,r,"POST","ProcessQuery",e,o)},t.buildResponseOnSuccess=function(n,t){var i={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return i.Body=JSON.parse(n),i.Headers=t,i},t.buildResponseOnError=function(i,r){var u={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return u.ErrorCode=n.ErrorCodes.generalException,u.ErrorMessage=r,i==t.OfficeJsErrorCode_ooeNoCapability?u.ErrorCode=n.ErrorCodes.accessDenied:i==t.OfficeJsErrorCode_ooeActivityLimitReached?u.ErrorCode=n.ErrorCodes.activityLimitReached:i==t.OfficeJsErrorCode_ooeInvalidOrTimedOutSession&&(u.ErrorCode=n.ErrorCodes.invalidOrTimedOutSession,u.ErrorMessage=n.Utility._getResourceString(n.ResourceStrings.invalidOrTimedOutSessionMessage)),u},t.buildHttpResponseFromOfficeJsError=function(i,r){var f=500,u={};return u.error={},u.error.code=n.ErrorCodes.generalException,u.error.message=r,i===t.OfficeJsErrorCode_ooeNoCapability?(f=403,u.error.code=n.ErrorCodes.accessDenied):i===t.OfficeJsErrorCode_ooeActivityLimitReached&&(f=429,u.error.code=n.ErrorCodes.activityLimitReached),{statusCode:f,headers:{},body:JSON.stringify(u)}},t.buildRequestMessageSafeArray=function(n,t,i,r,u,f){var e=[],o;if(u)for(o in u)e.push(o),e.push(u[o]);var s=0,h="",c="",l="";return[n,i,r,e,f,s,t,h,c,l]},t.getResponseBody=function(n){return t.getResponseBodyFromSafeArray(n.value.data)},t.getResponseHeaders=function(n){return t.getResponseHeadersFromSafeArray(n.value.data)},t.getResponseBodyFromSafeArray=function(n){var t=n[2],i;return typeof t=="string"?t:(i=t,i.join(""))},t.getResponseHeadersFromSafeArray=function(n){var i=n[1],r,t;if(!i)return null;for(r={},t=0;t0&&f.push(i);return f},t.toJson=function(n,t,i,r){var e={},u,f;for(u in t)f=t[u],typeof f!="undefined"&&(e[u]=f);for(u in i)f=i[u],typeof f!="undefined"&&(e[u]=f.toJSON());return r&&(e.items=r.map(function(n){return n.toJSON()})),e},t.throwError=function(i,r,u){throw new n._Internal.RuntimeError({code:i,message:t._getResourceString(i,r),debugInfo:u?{errorLocation:u}:undefined});},t.createRuntimeError=function(t,i,r){return new n._Internal.RuntimeError({code:t,message:i,debugInfo:{errorLocation:r}})},t._getResourceString=function(i,r){var u,e,f,o;return typeof window!="undefined"&&window.Strings&&window.Strings.OfficeOM&&(e="L_"+i,f=window.Strings.OfficeOM[e],f&&(u=f)),u||(u=n.ResourceStringValues[i]),u||(u=i),t.isNullOrUndefined(r)||(Array.isArray(r)?(o=r,u=t._formatString(u,o)):u=u.replace("{0}",r)),u},t._formatString=function(t,i){return t.replace(/\{\d\}/g,function(t){var r=parseInt(t.substr(1,t.length-2));if(r0?".":"")+i;break;case 3:i=t.normalizeName(n.objectPathInfo.Name)+"()"+(i.length>0?".":"")+i;break;case 4:i=t.normalizeName(n.objectPathInfo.Name)+(i.length>0?".":"")+i;break;case 5:i="getItem()"+(i.length>0?".":"")+i;break;case 6:i="_reference()"+(i.length>0?".":"")+i;break}n=n.parentObjectPath}return i},t._createPromiseFromResult=function(t){return new n._Internal.OfficePromise(function(n,i){n(t)})},t._createTimeoutPromise=function(t){return new n._Internal.OfficePromise(function(n,i){setTimeout(function(){n(null)},t)})},t.promisify=function(t){return new n._Internal.OfficePromise(function(n,i){var r=function(t){t.status=="failed"?i(t.error):n(t.value)};t(r)})},t._addActionResultHandler=function(n,t,i){n.context._pendingRequest.addActionResultHandler(t,i)},t._handleNavigationPropertyResults=function(n,i,r){for(var u=0;u0},t._getLocalDocumentUrlPrefixLength=function(n){for(var i=["http://document.localhost","https://document.localhost","//document.localhost"],r=n.toLowerCase().trim(),t=0;t0))for(s=i.url.substr(f+1),e=s.split("&"),u=0;u0&&(f=i.substr(0,u),e=i.substr(u+1),f=t.trim(f),e=t.trim(e),s[f.toUpperCase()]=e));return s},t._parseErrorResponse=function(i){var r=null,f,e,u;if(t.isPlainJsonObject(i.body))r=i.body;else if(!t.isNullOrEmptyString(i.body)){f=t.trim(i.body);try{r=JSON.parse(f)}catch(o){t.log("Error when parse "+f)}}return!t.isNullOrUndefined(r)&&typeof r=="object"&&r.error?(u=r.error.code,e=t._getResourceString(n.ResourceStrings.connectionFailureWithDetails,[i.statusCode.toString(),r.error.code,r.error.message])):e=t._getResourceString(n.ResourceStrings.connectionFailureWithStatus,i.statusCode.toString()),t.isNullOrEmptyString(u)&&(u=n.ErrorCodes.connectionFailure),{errorCode:u,errorMessage:e}},t._copyHeaders=function(n,t){if(n&&t)for(var i in n)t[i]=n[i]},t._toCamelLowerCase=function(n){if(t.isNullOrEmptyString(n))return n;for(var i=0;i=65&&n.charCodeAt(i)<=90;)i++;return i0&&Array.isArray(i[0])&&i.length*i[0].length>s&&ht()){for(e=Math.max(1,Math.round(s/i[0].length)),n._ValidateArraySize(i.length,i[0].length),r=0;ri.length&&(u=i.length-r),o=n.getRow(r).getBoundingRect(n.getRow(r+u-1)),h=i.slice(r,r+u),f(o.context,o,t,h);return!0}return!1}function ht(){return typeof window!="undefined"&&window.Office&&window.Office.context&&window.Office.context.requirements?window.Office.context.requirements.isSetSupported("ExcelApi",1.3):!0}function ss(t,i,r){return OfficeExtension.ClientRequestContext._runBatch("Excel.run",arguments,function(t){return new n.RequestContext(t)})}function hs(t,i){return OfficeExtension.ClientRequestContext._runExplicitBatch("Excel.runBatch",arguments,function(t){return new n.RequestContext(t)})}function yt(n){var t={BindingColumnCount:n.bindingColumnCount,BindingId:n.bindingId,BindingRowCount:n.bindingRowCount,bindingType:n.bindingType,HasHeaders:n.hasHeaders};return window.OSF.DDA.OMFactory.manufactureBinding(t,window.Microsoft.Office.WebExtension.context.document)}function lr(n,t){var r=n.headers==null,i;return i=r?n.rows:n,i=window.OSF.DDA.DataCoercion.coerceData(i,t[window.Microsoft.Office.WebExtension.Parameters.CoercionType]),i==undefined?null:i}function cs(n,t,i){var e=typeof window!="undefined"&&window.Office&&window.Office.context&&window.Office.context.diagnostics&&window.Office.context.diagnostics.version;if(!e)return!1;var o=window.Office.context.diagnostics.version,s=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/,r=s.exec(o);if(r){var u=parseInt(r[1]),f=parseInt(r[2]),h=parseInt(r[3]),c=parseInt(r[4]),l=3e3;if(u0?f=i.getOffsetRange(r,u):(f=i,e=r,o=u),Math.abs(t)==1)?f:f.getBoundingRect(i.getOffsetRange(r*t+e,u*t+o))},Object.defineProperty(k.prototype,"conditionalFormats",{get:function(){return l("Range.conditionalFormats",c,"1.6",h),this._Con||(this._Con=new n.ConditionalFormatCollection(this.context,o(this.context,this,"ConditionalFormats",!0,!1,!1))),this._Con},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"format",{get:function(){return this._F||(this._F=new n.RangeFormat(this.context,o(this.context,this,"Format",!1,!1,!1))),this._F},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"sort",{get:function(){return l("Range.sort",c,"1.2",h),this._S||(this._S=new n.RangeSort(this.context,o(this.context,this,"Sort",!1,!1,!1))),this._S},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"worksheet",{get:function(){return this._W||(this._W=new n.Worksheet(this.context,o(this.context,this,"Worksheet",!1,!1,!1))),this._W},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"address",{get:function(){return r("address",this._A,nt,this._isNull),this._A},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"addressLocal",{get:function(){return r("addressLocal",this._Ad,nt,this._isNull),this._Ad},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"cellCount",{get:function(){return r("cellCount",this._C,nt,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"columnCount",{get:function(){return r("columnCount",this._Co,nt,this._isNull),this._Co},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"columnHidden",{get:function(){return r("columnHidden",this._Col,nt,this._isNull),l("Range.columnHidden",c,"1.2",h),this._Col},set:function(n){this._Col=n;f(this.context,this,"ColumnHidden",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"columnIndex",{get:function(){return r("columnIndex",this._Colu,nt,this._isNull),this._Colu},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"formulas",{get:function(){return r("formulas",this.m_formulas,nt,this._isNull),this.m_formulas},set:function(n){(this.m_formulas=n,vt(this,"Formulas",n))||(this.m_formulas=n,f(this.context,this,"Formulas",n))},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"formulasLocal",{get:function(){return r("formulasLocal",this.m_formulasLocal,nt,this._isNull),this.m_formulasLocal},set:function(n){(this.m_formulasLocal=n,vt(this,"FormulasLocal",n))||(this.m_formulasLocal=n,f(this.context,this,"FormulasLocal",n))},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"formulasR1C1",{get:function(){return r("formulasR1C1",this.m_formulasR1C1,nt,this._isNull),l("Range.formulasR1C1",c,"1.2",h),this.m_formulasR1C1},set:function(n){(this.m_formulasR1C1=n,vt(this,"FormulasR1C1",n))||(this.m_formulasR1C1=n,f(this.context,this,"FormulasR1C1",n))},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"hidden",{get:function(){return r("hidden",this._H,nt,this._isNull),l("Range.hidden",c,"1.2",h),this._H},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"numberFormat",{get:function(){return r("numberFormat",this.m_numberFormat,nt,this._isNull),this.m_numberFormat},set:function(n){(this.m_numberFormat=n,vt(this,"NumberFormat",n))||(this.m_numberFormat=n,f(this.context,this,"NumberFormat",n))},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"rowCount",{get:function(){return r("rowCount",this._R,nt,this._isNull),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"rowHidden",{get:function(){return r("rowHidden",this._Ro,nt,this._isNull),l("Range.rowHidden",c,"1.2",h),this._Ro},set:function(n){this._Ro=n;f(this.context,this,"RowHidden",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"rowIndex",{get:function(){return r("rowIndex",this._Row,nt,this._isNull),this._Row},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"text",{get:function(){return r("text",this._T,nt,this._isNull),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"valueTypes",{get:function(){return r("valueTypes",this._V,nt,this._isNull),this._V},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"values",{get:function(){return r("values",this.m_values,nt,this._isNull),this.m_values},set:function(n){(this.m_values=n,vt(this,"Values",n))||(this.m_values=n,f(this.context,this,"Values",n))},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_ReferenceId",{get:function(){return r("_ReferenceId",this.__R,nt,this._isNull),this.__R},enumerable:!0,configurable:!0}),k.prototype.set=function(n,t){this._recursivelySet(n,t,["numberFormat","values","formulas","formulasLocal","formulasR1C1","rowHidden","columnHidden"],["format"],["conditionalFormats","sort","worksheet"])},k.prototype.update=function(n){this._recursivelyUpdate(n)},k.prototype.calculate=function(){l("Range.calculate",c,"1.6",h);s(this.context,this,"Calculate",0,[],!1)},k.prototype.clear=function(n){s(this.context,this,"Clear",0,[n],!1)},k.prototype.delete=function(n){s(this.context,this,"Delete",0,[n],!1)},k.prototype.getBoundingRect=function(i){return new n.Range(this.context,t(this.context,this,"GetBoundingRect",1,[i],!1,!0,null,!1))},k.prototype.getCell=function(i,r){return new n.Range(this.context,t(this.context,this,"GetCell",1,[i,r],!1,!0,null,!1))},k.prototype.getColumn=function(i){return new n.Range(this.context,t(this.context,this,"GetColumn",1,[i],!1,!0,null,!1))},k.prototype.getColumnsAfter=function(i){return ht()?(l("Range.getColumnsAfter",c,"1.3",h),new n.Range(this.context,t(this.context,this,"GetColumnsAfter",1,[i],!1,!0,null,!1))):(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0&&OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove"),this._getAdjacentRange("getColumnsAfter",i,this.getLastColumn(),0,1))},k.prototype.getColumnsBefore=function(i){return ht()?(l("Range.getColumnsBefore",c,"1.3",h),new n.Range(this.context,t(this.context,this,"GetColumnsBefore",1,[i],!1,!0,null,!1))):(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0&&OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove"),this._getAdjacentRange("getColumnsBefore",i,this.getColumn(0),0,-1))},k.prototype.getEntireColumn=function(){return new n.Range(this.context,t(this.context,this,"GetEntireColumn",1,[],!1,!0,null,!1))},k.prototype.getEntireRow=function(){return new n.Range(this.context,t(this.context,this,"GetEntireRow",1,[],!1,!0,null,!1))},k.prototype.getIntersection=function(i){return new n.Range(this.context,t(this.context,this,"GetIntersection",1,[i],!1,!0,null,!1))},k.prototype.getIntersectionOrNullObject=function(i){return l("Range.getIntersectionOrNullObject",c,"1.4",h),new n.Range(this.context,t(this.context,this,"GetIntersectionOrNullObject",1,[i],!1,!0,null,!1))},k.prototype.getLastCell=function(){return new n.Range(this.context,t(this.context,this,"GetLastCell",1,[],!1,!0,null,!1))},k.prototype.getLastColumn=function(){return new n.Range(this.context,t(this.context,this,"GetLastColumn",1,[],!1,!0,null,!1))},k.prototype.getLastRow=function(){return new n.Range(this.context,t(this.context,this,"GetLastRow",1,[],!1,!0,null,!1))},k.prototype.getOffsetRange=function(i,r){return new n.Range(this.context,t(this.context,this,"GetOffsetRange",1,[i,r],!1,!0,null,!1))},k.prototype.getResizedRange=function(i,r){if(!ht()){this._ensureInteger(i,"getResizedRange");this._ensureInteger(r,"getResizedRange");var u=i>=0&&r>=0?this:this.getCell(0,0);return u.getBoundingRect(this.getLastCell().getOffsetRange(i,r))}return l("Range.getResizedRange",c,"1.3",h),new n.Range(this.context,t(this.context,this,"GetResizedRange",1,[i,r],!1,!0,null,!1))},k.prototype.getRow=function(i){return new n.Range(this.context,t(this.context,this,"GetRow",1,[i],!1,!0,null,!1))},k.prototype.getRowsAbove=function(i){return ht()?(l("Range.getRowsAbove",c,"1.3",h),new n.Range(this.context,t(this.context,this,"GetRowsAbove",1,[i],!1,!0,null,!1))):(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0&&OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove"),this._getAdjacentRange("getRowsAbove",i,this.getRow(0),-1,0))},k.prototype.getRowsBelow=function(i){return ht()?(l("Range.getRowsBelow",c,"1.3",h),new n.Range(this.context,t(this.context,this,"GetRowsBelow",1,[i],!1,!0,null,!1))):(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0&&OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove"),this._getAdjacentRange("getRowsBelow",i,this.getLastRow(),1,0))},k.prototype.getUsedRange=function(i){return new n.Range(this.context,t(this.context,this,"GetUsedRange",1,[i],!1,!0,null,!1))},k.prototype.getUsedRangeOrNullObject=function(i){return l("Range.getUsedRangeOrNullObject",c,"1.4",h),new n.Range(this.context,t(this.context,this,"GetUsedRangeOrNullObject",1,[i],!1,!0,null,!1))},k.prototype.getVisibleView=function(){return l("Range.getVisibleView",c,"1.3",h),new n.RangeView(this.context,t(this.context,this,"GetVisibleView",1,[],!1,!1,null,!1))},k.prototype.insert=function(i){return new n.Range(this.context,t(this.context,this,"Insert",0,[i],!1,!0,null,!1))},k.prototype.merge=function(n){l("Range.merge",c,"1.2",h);s(this.context,this,"Merge",0,[n],!1)},k.prototype.select=function(){s(this.context,this,"Select",1,[],!1)},k.prototype.unmerge=function(){l("Range.unmerge",c,"1.2",h);s(this.context,this,"Unmerge",0,[],!1)},k.prototype._KeepReference=function(){s(this.context,this,"_KeepReference",1,[],!1)},k.prototype._ValidateArraySize=function(n,t){l("Range._ValidateArraySize",c,"1.3",h);s(this.context,this,"_ValidateArraySize",1,[n,t],!1)},k.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;v(this,t);u(t.Address)||(this._A=t.Address);u(t.AddressLocal)||(this._Ad=t.AddressLocal);u(t.CellCount)||(this._C=t.CellCount);u(t.ColumnCount)||(this._Co=t.ColumnCount);u(t.ColumnHidden)||(this._Col=t.ColumnHidden);u(t.ColumnIndex)||(this._Colu=t.ColumnIndex);u(t.Formulas)||(this.m_formulas=t.Formulas);u(t.FormulasLocal)||(this.m_formulasLocal=t.FormulasLocal);u(t.FormulasR1C1)||(this.m_formulasR1C1=t.FormulasR1C1);u(t.Hidden)||(this._H=t.Hidden);u(t.NumberFormat)||(this.m_numberFormat=t.NumberFormat);u(t.RowCount)||(this._R=t.RowCount);u(t.RowHidden)||(this._Ro=t.RowHidden);u(t.RowIndex)||(this._Row=t.RowIndex);u(t.Text)||(this._T=t.Text);u(t.ValueTypes)||(this._V=t.ValueTypes);u(t.Values)||(this.m_values=t.Values);u(t._ReferenceId)||(this.__R=t._ReferenceId);d(this,t,["conditionalFormats","ConditionalFormats","format","Format","sort","Sort","worksheet","Worksheet"])}},k.prototype.load=function(n){return p(this,n)},k.prototype.retrieve=function(n){return w(this,n)},k.prototype._handleIdResult=function(n){(i.prototype._handleIdResult.call(this,n),e(n))||u(n._ReferenceId)||(this.__R=n._ReferenceId)},k.prototype._handleRetrieveResult=function(n,t){i.prototype._handleRetrieveResult.call(this,n,t);y(this,n,t)},k.prototype.track=function(){return this.context.trackedObjects.add(this),this},k.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},k.prototype.toJSON=function(){return a(this,{address:this._A,addressLocal:this._Ad,cellCount:this._C,columnCount:this._Co,columnHidden:this._Col,columnIndex:this._Colu,formulas:this.m_formulas,formulasLocal:this.m_formulasLocal,formulasR1C1:this.m_formulasR1C1,hidden:this._H,numberFormat:this.m_numberFormat,rowCount:this._R,rowHidden:this._Ro,rowIndex:this._Row,text:this._T,values:this.m_values,valueTypes:this._V},{conditionalFormats:this._Con,format:this._F})},k.prototype.ensureUnchanged=function(n){b(this.context,this,n);return},k}(OfficeExtension.ClientObject);n.Range=ri;it="RangeView";wr=function(i){function s(){return i!==null&&i.apply(this,arguments)||this}return __extends(s,i),Object.defineProperty(s.prototype,"_className",{get:function(){return"RangeView"},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_scalarPropertyNames",{get:function(){return["numberFormat","values","text","formulas","formulasLocal","formulasR1C1","valueTypes","rowCount","columnCount","cellAddresses","index"]},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_scalarPropertyUpdateable",{get:function(){return[!0,!0,!1,!0,!0,!0,!1,!1,!1,!1,!1]},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_navigationPropertyNames",{get:function(){return["rows"]},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rows",{get:function(){return this._Ro||(this._Ro=new n.RangeViewCollection(this.context,o(this.context,this,"Rows",!0,!1,!1))),this._Ro},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"cellAddresses",{get:function(){return r("cellAddresses",this._C,it,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"columnCount",{get:function(){return r("columnCount",this._Co,it,this._isNull),this._Co},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulas",{get:function(){return r("formulas",this._F,it,this._isNull),this._F},set:function(n){this._F=n;f(this.context,this,"Formulas",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulasLocal",{get:function(){return r("formulasLocal",this._Fo,it,this._isNull),this._Fo},set:function(n){this._Fo=n;f(this.context,this,"FormulasLocal",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulasR1C1",{get:function(){return r("formulasR1C1",this._For,it,this._isNull),this._For},set:function(n){this._For=n;f(this.context,this,"FormulasR1C1",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"index",{get:function(){return r("index",this._I,it,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"numberFormat",{get:function(){return r("numberFormat",this._N,it,this._isNull),this._N},set:function(n){this._N=n;f(this.context,this,"NumberFormat",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rowCount",{get:function(){return r("rowCount",this._R,it,this._isNull),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"text",{get:function(){return r("text",this._T,it,this._isNull),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"valueTypes",{get:function(){return r("valueTypes",this._Va,it,this._isNull),this._Va},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"values",{get:function(){return r("values",this._V,it,this._isNull),this._V},set:function(n){this._V=n;f(this.context,this,"Values",n)},enumerable:!0,configurable:!0}),s.prototype.set=function(n,t){this._recursivelySet(n,t,["numberFormat","values","formulas","formulasLocal","formulasR1C1"],[],["rows"])},s.prototype.update=function(n){this._recursivelyUpdate(n)},s.prototype.getRange=function(){return new n.Range(this.context,t(this.context,this,"GetRange",1,[],!1,!0,null,!1))},s.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;v(this,t);u(t.CellAddresses)||(this._C=t.CellAddresses);u(t.ColumnCount)||(this._Co=t.ColumnCount);u(t.Formulas)||(this._F=t.Formulas);u(t.FormulasLocal)||(this._Fo=t.FormulasLocal);u(t.FormulasR1C1)||(this._For=t.FormulasR1C1);u(t.Index)||(this._I=t.Index);u(t.NumberFormat)||(this._N=t.NumberFormat);u(t.RowCount)||(this._R=t.RowCount);u(t.Text)||(this._T=t.Text);u(t.ValueTypes)||(this._Va=t.ValueTypes);u(t.Values)||(this._V=t.Values);d(this,t,["rows","Rows"])}},s.prototype.load=function(n){return p(this,n)},s.prototype.retrieve=function(n){return w(this,n)},s.prototype._handleRetrieveResult=function(n,t){i.prototype._handleRetrieveResult.call(this,n,t);y(this,n,t)},s.prototype.toJSON=function(){return a(this,{cellAddresses:this._C,columnCount:this._Co,formulas:this._F,formulasLocal:this._Fo,formulasR1C1:this._For,index:this._I,numberFormat:this._N,rowCount:this._R,text:this._T,values:this._V,valueTypes:this._Va},{rows:this._Ro})},s.prototype.ensureUnchanged=function(n){b(this.context,this,n);return},s}(OfficeExtension.ClientObject);n.RangeView=wr;br="RangeViewCollection";kr=function(i){function u(){return i!==null&&i.apply(this,arguments)||this}return __extends(u,i),Object.defineProperty(u.prototype,"_className",{get:function(){return"RangeViewCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"items",{get:function(){return r("items",this.m__items,br,this._isNull),this.m__items},enumerable:!0,configurable:!0}),u.prototype.getCount=function(){l("RangeViewCollection.getCount",c,"1.4",h);var t=s(this.context,this,"GetCount",1,[],!1),n=new OfficeExtension.ClientResult;return k(this,t,n),n},u.prototype.getItemAt=function(i){return new n.RangeView(this.context,t(this.context,this,"GetItemAt",1,[i],!1,!1,null,!1))},u.prototype._handleResult=function(t){var u,f,r,o;if((i.prototype._handleResult.call(this,t),!e(t))&&(u=t,v(this,u),!e(u[OfficeExtension.Constants.items])))for(this.m__items=[],f=u[OfficeExtension.Constants.items],r=0;r6&&i.slice(0,5)===t.DateJSONPrefix&&i.slice(-1)===t.DateJSONSuffix&&(r=new Date(parseInt(i.slice(5,-1))),r)?r:i})},t._replaceDateWithStringDate=function(n){var i=JSON.stringify(n,function(n,i){return this[n]instanceof Date?t.DateJSONPrefix+this[n].getTime()+t.DateJSONSuffix:i});return JSON.parse(i)},Object.defineProperty(t.prototype,"key",{get:function(){return r("key",this._K,ai,this._isNull),this._K},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return r("value",this.m_value,ai,this._isNull),this.m_value},set:function(n){if(!e(n)){this.m_value=n;var i=t._replaceDateWithStringDate(n);f(this.context,this,"Value",i);return}this.m_value=n;f(this.context,this,"Value",n)},enumerable:!0,configurable:!0}),t.prototype.set=function(n,t){this._recursivelySet(n,t,["value"],[],[])},t.prototype.update=function(n){this._recursivelyUpdate(n)},t.prototype.delete=function(){s(this.context,this,"Delete",0,[],!1)},t.prototype._handleResult=function(i){if(n.prototype._handleResult.call(this,i),!e(i)){var r=i;v(this,r);u(r.Key)||(this._K=r.Key);u(r.Value)||(this.m_value=r.Value,this.m_value=t.replaceStringDateWithDate(this.m_value))}},t.prototype.load=function(n){return p(this,n)},t.prototype.retrieve=function(n){return w(this,n)},t.prototype._handleRetrieveResult=function(t,i){n.prototype._handleRetrieveResult.call(this,t,i);y(this,t,i)},t.prototype.toJSON=function(){return a(this,{key:this._K,value:this.m_value},{})},t.prototype.ensureUnchanged=function(n){b(this.context,this,n);return},t}(OfficeExtension.ClientObject);wt.DateJSONPrefix="Date(";wt.DateJSONSuffix=")";n.Setting=wt;nu="NamedItemCollection";tu=function(i){function u(){return i!==null&&i.apply(this,arguments)||this}return __extends(u,i),Object.defineProperty(u.prototype,"_className",{get:function(){return"NamedItemCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"items",{get:function(){return r("items",this.m__items,nu,this._isNull),this.m__items},enumerable:!0,configurable:!0}),u.prototype.add=function(i,r,u){return l("NamedItemCollection.add",c,"1.4",h),new n.NamedItem(this.context,t(this.context,this,"Add",0,[i,r,u],!1,!0,null,!1))},u.prototype.addFormulaLocal=function(i,r,u){return l("NamedItemCollection.addFormulaLocal",c,"1.4",h),new n.NamedItem(this.context,t(this.context,this,"AddFormulaLocal",0,[i,r,u],!1,!1,null,!1))},u.prototype.getCount=function(){l("NamedItemCollection.getCount",c,"1.4",h);var t=s(this.context,this,"GetCount",1,[],!1),n=new OfficeExtension.ClientResult;return k(this,t,n),n},u.prototype.getItem=function(t){return new n.NamedItem(this.context,tt(this.context,this,[t]))},u.prototype.getItemOrNullObject=function(i){return l("NamedItemCollection.getItemOrNullObject",c,"1.4",h),new n.NamedItem(this.context,t(this.context,this,"GetItemOrNullObject",1,[i],!1,!1,null,!1))},u.prototype._handleResult=function(t){var u,f,r,o;if((i.prototype._handleResult.call(this,t),!e(t))&&(u=t,v(this,u),!e(u[OfficeExtension.Constants.items])))for(this.m__items=[],f=u[OfficeExtension.Constants.items],r=0;r"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyNames",{get:function(){return["error","value"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"error",{get:function(){return r("error",this._E,sr,this._isNull),this._E},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return r("value",this._V,sr,this._isNull),this._V},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){if(n.prototype._handleResult.call(this,t),!e(t)){var i=t;v(this,i);u(i.Error)||(this._E=i.Error);u(i.Value)||(this._V=i.Value)}},t.prototype.load=function(n){return p(this,n)},t.prototype.retrieve=function(n){return w(this,n)},t.prototype._handleRetrieveResult=function(t,i){n.prototype._handleRetrieveResult.call(this,t,i);y(this,t,i)},t.prototype.toJSON=function(){return a(this,{error:this._E,value:this._V},{})},t.prototype.ensureUnchanged=function(n){b(this.context,this,n);return},t}(OfficeExtension.ClientObject);n.FunctionResult=i;al="Functions";us=function(n){function r(){return n!==null&&n.apply(this,arguments)||this}return __extends(r,n),Object.defineProperty(r.prototype,"_className",{get:function(){return"Functions"},enumerable:!0,configurable:!0}),r.prototype.abs=function(n){return new i(this.context,t(this.context,this,"Abs",0,[n],!1,!0,null,!1))},r.prototype.accrInt=function(n,r,u,f,e,o,s,h){return new i(this.context,t(this.context,this,"AccrInt",0,[n,r,u,f,e,o,s,h],!1,!0,null,!1))},r.prototype.accrIntM=function(n,r,u,f,e){return new i(this.context,t(this.context,this,"AccrIntM",0,[n,r,u,f,e],!1,!0,null,!1))},r.prototype.acos=function(n){return new i(this.context,t(this.context,this,"Acos",0,[n],!1,!0,null,!1))},r.prototype.acosh=function(n){return new i(this.context,t(this.context,this,"Acosh",0,[n],!1,!0,null,!1))},r.prototype.acot=function(n){return new i(this.context,t(this.context,this,"Acot",0,[n],!1,!0,null,!1))},r.prototype.acoth=function(n){return new i(this.context,t(this.context,this,"Acoth",0,[n],!1,!0,null,!1))},r.prototype.amorDegrc=function(n,r,u,f,e,o,s){return new i(this.context,t(this.context,this,"AmorDegrc",0,[n,r,u,f,e,o,s],!1,!0,null,!1))},r.prototype.amorLinc=function(n,r,u,f,e,o,s){return new i(this.context,t(this.context,this,"AmorLinc",0,[n,r,u,f,e,o,s],!1,!0,null,!1))},r.prototype.and=function(){for(var r=[],n=0;n 6 && v.slice(0, 5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) { + d=new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + } + else { + value=Sys.Serialization.JavaScriptSerializer.deserialize(value, true); + } + ret[key]=value; + } + catch (ex) { + } + } + return ret; + }, loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) { if (url && callback) { var doc=window.document; @@ -837,6 +885,14 @@ OSF.OUtil=(function () { } } }, + removeClass: function OSF_OUtil$removeClass(elmt, val) { + if (OSF.OUtil.hasClass(elmt, val)) { + var className=elmt.getAttribute(_classN); + var reg=new RegExp('(\\s|^)'+val+'(\\s|$)'); + className=className.replace(reg, ''); + elmt.setAttribute(_classN, className); + } + }, hasClass: function OSF_OUtil$hasClass(elmt, clsName) { var className=elmt.getAttribute(_classN); return className && className.match(new RegExp('(\\s|^)'+clsName+'(\\s|$)')); @@ -973,6 +1029,12 @@ OSF.OUtil.Guid=(function () { })(); window.OSF=OSF; OSF.OUtil.setNamespace("OSF", window); +OSF.MessageIDs={ + "FetchBundleUrl": 0, + "LoadReactBundle": 1, + "LoadBundleSuccess": 2, + "LoadBundleError": 3 +}; OSF.AppName={ Unsupported: 0, Excel: 1, @@ -1000,7 +1062,10 @@ OSF.AppName={ OutlookAndroid: 4194304, OneNoteWinRT: 8388608, ExcelAndroid: 8388609, - VisioWebApp: 8388610 + VisioWebApp: 8388610, + OneNoteIOS: 8388611, + WordAndroid: 8388613, + PowerpointAndroid: 8388614 }; OSF.InternalPerfMarker={ DataCoercionBegin: "Agave.HostCall.CoerceDataStart", @@ -1030,7 +1095,9 @@ OSF.AgaveHostAction={ "EscExit": 15, "F2Exit": 16, "ExitNoFocusable": 17, - "ExitNoFocusableShift": 18 + "ExitNoFocusableShift": 18, + "MouseEnter": 19, + "MouseLeave": 20 }; OSF.SharedConstants={ "NotificationConversationIdSuffix": '_ntf' @@ -1166,6 +1233,8 @@ Microsoft.Office.WebExtension.Parameters={ HostType: "hostType", ForceConsent: "forceConsent", ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + Reserved: "reserved", Xml: "xml", Namespace: "namespace", Prefix: "prefix", @@ -1198,7 +1267,9 @@ Microsoft.Office.WebExtension.Parameters={ DisplayInIframe: "displayInIframe", MessageContent: "messageContent", HideTitle: "hideTitle", - AppCommandInvocationCompletedData: "appCommandInvocationCompletedData" + UseDeviceIndependentPixels: "useDeviceIndependentPixels", + AppCommandInvocationCompletedData: "appCommandInvocationCompletedData", + Base64: "base64" }; OSF.OUtil.setNamespace("DDA", OSF); OSF.DDA.DocumentMode={ @@ -1255,6 +1326,8 @@ OSF.DDA.MethodDispId={ dispidAppCommandInvocationCompletedMethod: 94, dispidCloseContainerMethod: 97, dispidGetAccessTokenMethod: 98, + dispidOpenBrowserWindow: 102, + dispidCreateDocumentMethod: 105, dispidGetSelectedTaskMethod: 110, dispidGetSelectedResourceMethod: 111, dispidGetTaskMethod: 112, @@ -1310,8 +1383,11 @@ OSF.DDA.EventDispId={ dispidObjectDataChangedEvent: 15, dispidContentControlAddedEvent: 16, dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, dispidAppCommandInvokedEvent: 39, dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, dispidTaskSelectionChangedEvent: 56, dispidResourceSelectionChangedEvent: 57, dispidViewSelectionChangedEvent: 58, @@ -1443,7 +1519,9 @@ OSF.DDA.ErrorCodeManager=(function () { ooeSSOInvalidGrant: 13005, ooeSSOClientError: 13006, ooeSSOServerError: 13007, - ooeAddinIsAlreadyRequestingToken: 13008 + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009, + ooeSSOConnectionLost: 13010 }, initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={ name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotSupported }; @@ -1541,6 +1619,8 @@ OSF.DDA.ErrorCodeManager=(function () { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={ name: stringNS.L_SSOClientError, message: stringNS.L_SSOClientErrorMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={ name: stringNS.L_SSOServerError, message: stringNS.L_SSOServerErrorMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={ name: stringNS.L_AddinIsAlreadyRequestingToken, message: stringNS.L_AddinIsAlreadyRequestingTokenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={ name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={ name: stringNS.L_SSOConnectionLostError, message: stringNS.L_SSOConnectionLostErrorMessage }; } }; })(); @@ -2242,6 +2322,11 @@ OSF.DDA.Context=function OSF_DDA_Context(officeAppContext, document, license, ap value: officeAppContext.auth }); } + if (officeAppContext.application) { + OSF.OUtil.defineEnumerableProperty(this, "application", { + value: officeAppContext.application + }); + } if (officeAppContext.get_isDialog()) { var requirements=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); OSF.OUtil.defineEnumerableProperty(this, "requirements", { @@ -2284,6 +2369,8 @@ OSF.DDA.OutlookContext=function OSF_DDA_OutlookContext(appContext, settings, lic }; OSF.OUtil.extend(OSF.DDA.OutlookContext, OSF.DDA.Context); OSF.DDA.OutlookAppOm=function OSF_DDA_OutlookAppOm(appContext, window, appReady) { }; +OSF.DDA.Application=function OSF_DDA_Application(officeAppContext) { +}; OSF.DDA.Document=function OSF_DDA_Document(officeAppContext, settings) { var mode; switch (officeAppContext.get_clientMode()) { @@ -3020,6 +3107,8 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, "ExecuteRichApiRequestAsync": did.dispidExecuteRichApiRequestMethod, "AppCommandInvocationCompletedAsync": did.dispidAppCommandInvocationCompletedMethod, "CloseContainerAsync": did.dispidCloseContainerMethod, + "OpenBrowserWindow": did.dispidOpenBrowserWindow, + "CreateDocumentAsync": did.dispidCreateDocumentMethod, "AddDataPartAsync": did.dispidAddDataPartMethod, "GetDataPartByIdAsync": did.dispidGetDataPartByIdMethod, "GetDataPartsByNameSpaceAsync": did.dispidGetDataPartsByNamespaceMethod, @@ -3059,13 +3148,13 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, } jsom=OSF.DDA.SyncMethodNames; did=OSF.DDA.MethodDispId; - var asyncMethodMap={ + var syncMethodMap={ "MessageParent": did.dispidMessageParentMethod, "SendMessage": did.dispidSendMessageMethod }; - for (var method in asyncMethodMap) { + for (var method in syncMethodMap) { if (jsom[method]) { - dispIdMap[jsom[method].id]=asyncMethodMap[method]; + dispIdMap[jsom[method].id]=syncMethodMap[method]; } } jsom=Microsoft.Office.WebExtension.EventType; @@ -3085,7 +3174,10 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, "ObjectSelectionChanged": did.dispidObjectSelectionChangedEvent, "ObjectDataChanged": did.dispidObjectDataChangedEvent, "ContentControlAdded": did.dispidContentControlAddedEvent, + "RichApiMessage": did.dispidRichApiMessageEvent, "ItemChanged": did.dispidOlkItemSelectedChangedEvent, + "RecipientsChanged": did.dispidOlkRecipientsChangedEvent, + "AppointmentTimeChanged": did.dispidOlkAppointmentTimeChangedEvent, "TaskSelectionChanged": did.dispidTaskSelectionChangedEvent, "ResourceSelectionChanged": did.dispidResourceSelectionChangedEvent, "ViewSelectionChanged": did.dispidViewSelectionChangedEvent, @@ -3161,6 +3253,7 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, else { hostCallArgs=callArgs; } + var startTime=(new Date()).getTime(); delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ "dispId": dispId, "hostCallArgs": hostCallArgs, @@ -3181,6 +3274,9 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, } var payload=asyncMethodCall.processResponse(status, responseArgs, caller, callArgs); OSF.DDA.issueAsyncResult(callArgs, status, payload); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(dispId, hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); + } } }); } @@ -4048,7 +4144,6 @@ OSF.DDA.SafeArray.Delegate.executeAsync=function OSF_DDA_SafeArray_Delegate$Exec if (args.onCalling) { args.onCalling(); } - var startTime=(new Date()).getTime(); OSF.ClientHostController.execute(args.dispId, toArray(args.hostCallArgs), function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode) { var result=hostResponseArgs.toArray(); var status=result[OSF.DDA.SafeArray.Response.Status]; @@ -4095,9 +4190,6 @@ OSF.DDA.SafeArray.Delegate.executeAsync=function OSF_DDA_SafeArray_Delegate$Exec } args.onComplete(status, payload); } - if (OSF.AppTelemetry) { - OSF.AppTelemetry.onMethodDone(args.dispId, args.hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); - } return true; }); } @@ -4213,6 +4305,9 @@ OSF.InitializationHelper.prototype.prepareApiSurface=function OSF_Initialization } } } + if (OSF.DDA.OpenBrowser) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.OpenBrowserWindow]); + } if (OSF.DDA.Auth) { appContext.auth=new OSF.DDA.Auth(); OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth, [OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]); @@ -4941,7 +5036,7 @@ var OSFAriaLogger; function AriaLogger() { } AriaLogger.prototype.getAriaCDNLocation=function () { - return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry-2.8.0.min.js"); + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry.js"); }; AriaLogger.getInstance=function () { if (AriaLogger.AriaLoggerObj===undefined) { @@ -4958,13 +5053,10 @@ var OSFAriaLogger; try { if (!this.ALogger) { var OfficeExtensibilityTenantID="db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; - var configuration=new microsoft.applications.telemetry.LogConfiguration(); - configuration.enableAutoUserSession=true; - microsoft.applications.telemetry.LogManager.initialize(OfficeExtensibilityTenantID, configuration); - this.ALogger=new microsoft.applications.telemetry.Logger(); + this.ALogger=AWTLogManager.initialize(OfficeExtensibilityTenantID); } - var eventProperties=new microsoft.applications.telemetry.EventProperties(); - eventProperties.name="Office.Extensibility.OfficeJS."+tableName; + var eventProperties=new AWTEventProperties(); + eventProperties.setName("Office.Extensibility.OfficeJS."+tableName); for (var key in telemetryData) { if (key.toLowerCase() !=="table") { eventProperties.setProperty(key, telemetryData[key]); @@ -4997,6 +5089,7 @@ var OSFAppTelemetry; var sessionId=OSF.OUtil.Guid.generateNewGuid(); var osfControlAppCorrelationId=""; var omexDomainRegex=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"); + OSFAppTelemetry.enableTelemetry=true; ; var AppInfo=(function () { function AppInfo() { @@ -5080,17 +5173,19 @@ var OSFAppTelemetry; function AppLogger() { } AppLogger.prototype.LogData=function (data) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, data.SerializeRow(), OSF.Logger.SendFlag.none); - OSFAriaLogger.AriaLogger.getInstance().logData(data); + try { + OSFAriaLogger.AriaLogger.getInstance().logData(data); + } + catch (e) { + } }; AppLogger.prototype.LogRawData=function (log) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, log, OSF.Logger.SendFlag.none); try { OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)); } @@ -5130,7 +5225,7 @@ var OSFAppTelemetry; } appInfo.message=context.get_hostCustomMessage(); appInfo.officeJSVersion=OSF.ConstantNames.FileVersion; - appInfo.hostJSVersion="16.0.8119.1000"; + appInfo.hostJSVersion="16.0.8916.1000"; if (context._wacHostEnvironment) { appInfo.wacHostEnvironment=context._wacHostEnvironment; } @@ -5361,14 +5456,16 @@ OSF.EventDispatch=function OSF_EventDispatch(eventTypes) { this._eventHandlers={}; this._objectEventHandlers={}; this._queuedEventsArgs={}; - for (var entry in eventTypes) { - var eventType=eventTypes[entry]; - var isObjectEvent=(eventType=="objectDeleted" || eventType=="objectSelectionChanged" || eventType=="objectDataChanged" || eventType=="contentControlAdded"); - if (!isObjectEvent) - this._eventHandlers[eventType]=[]; - else - this._objectEventHandlers[eventType]={}; - this._queuedEventsArgs[eventType]=[]; + if (eventTypes !=null) { + for (var i=0; i < eventTypes.length; i++) { + var eventType=eventTypes[i]; + var isObjectEvent=(eventType=="objectDeleted" || eventType=="objectSelectionChanged" || eventType=="objectDataChanged" || eventType=="contentControlAdded"); + if (!isObjectEvent) + this._eventHandlers[eventType]=[]; + else + this._objectEventHandlers[eventType]={}; + this._queuedEventsArgs[eventType]=[]; + } } }; OSF.EventDispatch.prototype={ @@ -5394,8 +5491,8 @@ OSF.EventDispatch.prototype={ hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) { var handlers=this._eventHandlers[eventType]; if (handlers && handlers.length > 0) { - for (var h in handlers) { - if (handlers[h]===handler) + for (var i=0; i < handlers.length; i++) { + if (handlers[i]===handler) return true; } } @@ -5500,8 +5597,9 @@ OSF.EventDispatch.prototype={ var eventType=eventArgs.type; if (eventType && this._eventHandlers[eventType]) { var eventHandlers=this._eventHandlers[eventType]; - for (var handler in eventHandlers) - eventHandlers[handler](eventArgs); + for (var i=0; i < eventHandlers.length; i++) { + eventHandlers[i](eventArgs); + } return true; } else { @@ -5598,6 +5696,9 @@ OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEve case Microsoft.Office.WebExtension.EventType.ContentControlAdded: args=new OSF.DDA.ObjectEventArgs(eventType, eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args=new OSF.DDA.RichApiMessageEventArgs(eventType, eventProperties); + break; case Microsoft.Office.WebExtension.EventType.DataNodeInserted: args=new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); break; @@ -5623,10 +5724,28 @@ OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEve args=new OSF.DDA.DialogParentEventArgs(eventProperties); break; case Microsoft.Office.WebExtension.EventType.ItemChanged: - if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlookwebapp") { + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { args=new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); target.initialize(args["initialData"]); - target.setCurrentItemNumber(args["itemNumber"].itemNumber); + if (OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]=="win32" || OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]=="mac") { + target.setCurrentItemNumber(args["itemNumber"].itemNumber); + } + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { + args=new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { + args=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); } else { throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); @@ -5813,6 +5932,13 @@ OSF.DDA.AsyncMethodCalls.define({ "types": ["boolean"], "defaultValue": false } + }, + { + name: Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels, + value: { + "types": ["boolean"], + "defaultValue": false + } } ], privateStateCallbacks: [], @@ -5850,13 +5976,13 @@ OSF.DDA.AsyncMethodCalls.define({ if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] <=0) { callArgs[Microsoft.Office.WebExtension.Parameters.Width]=1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Width]=99; } if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] <=0) { callArgs[Microsoft.Office.WebExtension.Parameters.Height]=1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Height]=99; } if (!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) { @@ -6302,52 +6428,10 @@ OSF.DDA.SettingsManager={ DateJSONPrefix: "Date(", DataJSONSuffix: ")", serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) { - var ret={}; - for (var key in settingsCollection) { - var value=settingsCollection[key]; - try { - if (JSON) { - value=JSON.stringify(value, function dateReplacer(k, v) { - return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix+this[k].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix : v; - }); - } - else { - value=Sys.Serialization.JavaScriptSerializer.serialize(value); - } - ret[key]=value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.serializeSettings(settingsCollection); }, deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) { - var ret={}; - serializedSettings=serializedSettings || {}; - for (var key in serializedSettings) { - var value=serializedSettings[key]; - try { - if (JSON) { - value=JSON.parse(value, function dateReviver(k, v) { - var d; - if (typeof v==='string' && v && v.length > 6 && v.slice(0, 5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) { - d=new Date(parseInt(v.slice(5, -1))); - if (d) { - return d; - } - } - return v; - }); - } - else { - value=Sys.Serialization.JavaScriptSerializer.deserialize(value, true); - } - ret[key]=value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.deserializeSettings(serializedSettings); } }; OSF.DDA.Settings=function OSF_DDA_Settings(settings) { @@ -7410,6 +7494,217 @@ OSF.DDA.SafeArray.Delegate.ParameterMap.define({ { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } ] }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { RichApiMessage: "richApiMessage" }); +OSF.DDA.RichApiMessageEventArgs=function OSF_DDA_RichApiMessageEventArgs(eventType, eventProperties) { + var entryArray=eventProperties[Microsoft.Office.WebExtension.Parameters.Data]; + var entries=[]; + if (entryArray) { + for (var i=0; i < entryArray.length; i++) { + var elem=entryArray[i]; + if (elem.toArray) { + elem=elem.toArray(); + } + entries.push({ + messageCategory: elem[0], + messageType: elem[1], + targetId: elem[2], + message: elem[3], + id: elem[4], + isRemoteOverride: elem[5] + }); + } + } + OSF.OUtil.defineEnumerableProperties(this, { + "type": { value: Microsoft.Office.WebExtension.EventType.RichApiMessage }, + "entries": { value: entries } + }); +}; +var OfficeExt; +(function (OfficeExt) { + var RichApiMessageManager=(function () { + function RichApiMessageManager() { + this._eventDispatch=null; + this._eventDispatch=new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.RichApiMessage, + ]); + OSF.DDA.DispIdHost.addEventSupport(this, this._eventDispatch); + } + return RichApiMessageManager; + })(); + OfficeExt.RichApiMessageManager=RichApiMessageManager; +})(OfficeExt || (OfficeExt={})); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidRichApiMessageEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +Microsoft.Office.WebExtension.FileType={ + Text: "text", + Compressed: "compressed", + Pdf: "pdf" +}; +OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { + FileProperties: "FileProperties", + FileSliceProperties: "FileSliceProperties" +}); +OSF.DDA.FileProperties={ + Handle: "FileHandle", + FileSize: "FileSize", + SliceSize: Microsoft.Office.WebExtension.Parameters.SliceSize +}; +OSF.DDA.File=function OSF_DDA_File(handle, fileSize, sliceSize) { + OSF.OUtil.defineEnumerableProperties(this, { + "size": { + value: fileSize + }, + "sliceCount": { + value: Math.ceil(fileSize / sliceSize) + } + }); + var privateState={}; + privateState[OSF.DDA.FileProperties.Handle]=handle; + privateState[OSF.DDA.FileProperties.SliceSize]=sliceSize; + var am=OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this, [ + am.GetDocumentCopyChunkAsync, + am.ReleaseDocumentCopyAsync + ], privateState); +}; +OSF.DDA.FileSliceOffset="fileSliceoffset"; +OSF.DDA.AsyncMethodNames.addNames({ + GetDocumentCopyAsync: "getFileAsync", + GetDocumentCopyChunkAsync: "getSliceAsync", + ReleaseDocumentCopyAsync: "closeAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.FileType, + "enum": Microsoft.Office.WebExtension.FileType + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.SliceSize, + value: { + "types": ["number"], + "defaultValue": 4 * 1024 * 1024 + } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + var sliceSize=callArgs[Microsoft.Office.WebExtension.Parameters.SliceSize]; + if (sliceSize <=0 || sliceSize > (4 * 1024 * 1024)) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize; + } + return callArgs; + }, + onSucceeded: function (fileDescriptor, caller, callArgs) { + return new OSF.DDA.File(fileDescriptor[OSF.DDA.FileProperties.Handle], fileDescriptor[OSF.DDA.FileProperties.FileSize], callArgs[Microsoft.Office.WebExtension.Parameters.SliceSize]); + } +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.SliceIndex, + "types": ["number"] + } + ], + privateStateCallbacks: [ + { + name: OSF.DDA.FileProperties.Handle, + value: function (caller, stateInfo) { return stateInfo[OSF.DDA.FileProperties.Handle]; } + }, + { + name: OSF.DDA.FileProperties.SliceSize, + value: function (caller, stateInfo) { return stateInfo[OSF.DDA.FileProperties.SliceSize]; } + } + ], + checkCallArgs: function (callArgs, caller, stateInfo) { + var index=callArgs[Microsoft.Office.WebExtension.Parameters.SliceIndex]; + if (index < 0 || index >=caller.sliceCount) { + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange; + } + callArgs[OSF.DDA.FileSliceOffset]=parseInt((index * stateInfo[OSF.DDA.FileProperties.SliceSize]).toString()); + return callArgs; + }, + onSucceeded: function (sliceDescriptor, caller, callArgs) { + var slice={}; + OSF.OUtil.defineEnumerableProperties(slice, { + "data": { + value: sliceDescriptor[Microsoft.Office.WebExtension.Parameters.Data] + }, + "index": { + value: callArgs[Microsoft.Office.WebExtension.Parameters.SliceIndex] + }, + "size": { + value: sliceDescriptor[OSF.DDA.FileProperties.SliceSize] + } + }); + return slice; + } +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync, + privateStateCallbacks: [ + { + name: OSF.DDA.FileProperties.Handle, + value: function (caller, stateInfo) { return stateInfo[OSF.DDA.FileProperties.Handle]; } + } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.FileProperties, + fromHost: [ + { name: OSF.DDA.FileProperties.Handle, value: 0 }, + { name: OSF.DDA.FileProperties.FileSize, value: 1 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.PropertyDescriptors.FileSliceProperties, + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 0 }, + { name: OSF.DDA.FileProperties.SliceSize, value: 1 } + ], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: Microsoft.Office.WebExtension.Parameters.FileType, + toHost: [ + { name: Microsoft.Office.WebExtension.FileType.Text, value: 0 }, + { name: Microsoft.Office.WebExtension.FileType.Compressed, value: 5 }, + { name: Microsoft.Office.WebExtension.FileType.Pdf, value: 6 } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod, + toHost: [{ name: Microsoft.Office.WebExtension.Parameters.FileType, value: 0 }], + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.FileProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod, + toHost: [ + { name: OSF.DDA.FileProperties.Handle, value: 0 }, + { name: OSF.DDA.FileSliceOffset, value: 1 }, + { name: OSF.DDA.FileProperties.SliceSize, value: 2 } + ], + fromHost: [ + { name: OSF.DDA.PropertyDescriptors.FileSliceProperties, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod, + toHost: [{ name: OSF.DDA.FileProperties.Handle, value: 0 }] +}); OSF.DDA.FilePropertiesDescriptor={ Url: "Url" }; @@ -8241,6 +8536,13 @@ OSF.DDA.AsyncMethodCalls.define({ "types": ["boolean"], "defaultValue": false } + }, + { + name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, + value: { + "types": ["string"], + "defaultValue": "" + } } ], onSucceeded: function (dataDescriptor, caller, callArgs) { @@ -8252,16 +8554,49 @@ OSF.DDA.SafeArray.Delegate.ParameterMap.define({ type: OSF.DDA.MethodDispId.dispidGetAccessTokenMethod, toHost: [ { name: Microsoft.Office.WebExtension.Parameters.ForceConsent, value: 0 }, - { name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, value: 1 } + { name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, value: 2 } ], fromHost: [ { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } ] }); +OSF.DDA.AsyncMethodNames.addNames({ + OpenBrowserWindow: "openBrowserWindow" +}); +OSF.DDA.OpenBrowser=function OSF_DDA_OpenBrowser() { +}; +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.OpenBrowserWindow, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Url, + "types": ["string"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.Reserved, + value: { + "types": ["number"], + "defaultValue": 0 + } + } + ], + privateStateCallbacks: [] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidOpenBrowserWindow, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Reserved, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Url, value: 1 } + ] +}); OSF.DDA.ExcelDocument=function OSF_DDA_ExcelDocument(officeAppContext, settings) { var bf=new OSF.DDA.BindingFacade(this); OSF.DDA.DispIdHost.addAsyncMethods(bf, [OSF.DDA.AsyncMethodNames.AddFromPromptAsync]); OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.GoToByIdAsync]); + OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync]); OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync]); OSF.DDA.ExcelDocument.uber.constructor.call(this, officeAppContext, bf, settings); OSF.OUtil.finalizeProperties(this); @@ -8275,6 +8610,7 @@ OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function OSF OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM); appContext.doc=new OSF.DDA.ExcelDocument(appContext, this._initializeSettings(true)); OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi, [OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]); + OSF.DDA.RichApi.richApiMessageManager=new OfficeExt.RichApiMessageManager(); appReady(); }; (function () { @@ -8336,9 +8672,10 @@ var __extends=(this && this.__extends) || function (d, b) { var OfficeExtension; (function (OfficeExtension) { var Action=(function () { - function Action(actionInfo, isWriteOperation) { + function Action(actionInfo, isWriteOperation, isRestrictedResourceAccess) { this.m_actionInfo=actionInfo; this.m_isWriteOperation=isWriteOperation; + this.m_isRestrictedResourceAccess=isRestrictedResourceAccess; } Object.defineProperty(Action.prototype, "actionInfo", { get: function () { @@ -8354,12 +8691,30 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(Action.prototype, "isRestrictedResourceAccess", { + get: function () { + return this.m_isRestrictedResourceAccess; + }, + enumerable: true, + configurable: true + }); return Action; }()); OfficeExtension.Action=Action; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + var TraceMarkerActionResultHandler=(function () { + function TraceMarkerActionResultHandler(callback) { + this.m_callback=callback; + } + TraceMarkerActionResultHandler.prototype._handleResult=function (value) { + if (this.m_callback) { + this.m_callback(); + } + }; + return TraceMarkerActionResultHandler; + }()); var ActionFactory=(function () { function ActionFactory() { } @@ -8375,13 +8730,17 @@ var OfficeExtension; var args=[value]; var referencedArgumentObjectPaths=OfficeExtension.Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); OfficeExtension.Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); - var ret=new OfficeExtension.Action(actionInfo, true); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + context._pendingRequest.ensureInstantiateObjectPaths(referencedArgumentObjectPaths); + var ret=new OfficeExtension.Action(actionInfo, true, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); context._pendingRequest.addReferencedObjectPaths(referencedArgumentObjectPaths); + ret.referencedObjectPath=parent._objectPath; + ret.referencedArgumentObjectPaths=referencedArgumentObjectPaths; return ret; }; - ActionFactory.createMethodAction=function (context, parent, methodName, operationType, args) { + ActionFactory.createMethodAction=function (context, parent, methodName, operationType, args, isRestrictedResourceAccess) { OfficeExtension.Utility.validateObjectPath(parent); var actionInfo={ Id: context._nextId(), @@ -8392,15 +8751,20 @@ var OfficeExtension; }; var referencedArgumentObjectPaths=OfficeExtension.Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); OfficeExtension.Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + context._pendingRequest.ensureInstantiateObjectPaths(referencedArgumentObjectPaths); var isWriteOperation=operationType !=1; - var ret=new OfficeExtension.Action(actionInfo, isWriteOperation); + var ret=new OfficeExtension.Action(actionInfo, isWriteOperation, isRestrictedResourceAccess); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); context._pendingRequest.addReferencedObjectPaths(referencedArgumentObjectPaths); + ret.referencedObjectPath=parent._objectPath; + ret.referencedArgumentObjectPaths=referencedArgumentObjectPaths; return ret; }; ActionFactory.createQueryAction=function (context, parent, queryOption) { OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); var actionInfo={ Id: context._nextId(), ActionType: 2, @@ -8408,13 +8772,15 @@ var OfficeExtension; ObjectPathId: parent._objectPath.objectPathInfo.Id, }; actionInfo.QueryInfo=queryOption; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; return ret; }; ActionFactory.createRecursiveQueryAction=function (context, parent, query) { OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); var actionInfo={ Id: context._nextId(), ActionType: 6, @@ -8422,23 +8788,59 @@ var OfficeExtension; ObjectPathId: parent._objectPath.objectPathInfo.Id, RecursiveQueryInfo: query }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; + return ret; + }; + ActionFactory.createQueryAsJsonAction=function (context, parent, queryOption) { + OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + var actionInfo={ + Id: context._nextId(), + ActionType: 7, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + }; + actionInfo.QueryInfo=queryOption; + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; + return ret; + }; + ActionFactory.createEnsureUnchangedAction=function (context, parent, objectState) { + OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + var actionInfo={ + Id: context._nextId(), + ActionType: 8, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }; + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; return ret; }; ActionFactory.createInstantiateAction=function (context, obj) { OfficeExtension.Utility.validateObjectPath(obj); + context._pendingRequest.ensureInstantiateObjectPath(obj._objectPath.parentObjectPath); + context._pendingRequest.ensureInstantiateObjectPaths(obj._objectPath.argumentObjectPaths); var actionInfo={ Id: context._nextId(), ActionType: 1, Name: "", ObjectPathId: obj._objectPath.objectPathInfo.Id }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(obj._objectPath); context._pendingRequest.addActionResultHandler(ret, new OfficeExtension.InstantiateActionResultHandler(obj)); + ret.referencedObjectPath=obj._objectPath; return ret; }; ActionFactory.createTraceAction=function (context, message, addTraceMessage) { @@ -8448,13 +8850,17 @@ var OfficeExtension; Name: "Trace", ObjectPathId: 0 }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); if (addTraceMessage) { context._pendingRequest.addTrace(actionInfo.Id, message); } return ret; }; + ActionFactory.createTraceMarkerForCallback=function (context, callback) { + var action=ActionFactory.createTraceAction(context, null, false); + context._pendingRequest.addActionResultHandler(action, new TraceMarkerActionResultHandler(callback)); + }; return ActionFactory; }()); OfficeExtension.ActionFactory=ActionFactory; @@ -8532,6 +8938,7 @@ var OfficeExtension; }; ClientObject.prototype._recursivelySet=function (input, options, scalarWriteablePropertyNames, objectPropertyNames, notAllowedToBeSetPropertyNames) { var isClientObject=(input instanceof ClientObject); + var originalInput=input; if (isClientObject) { if (Object.getPrototypeOf(this)===Object.getPrototypeOf(input)) { input=JSON.parse(JSON.stringify(input)); @@ -8548,31 +8955,38 @@ var OfficeExtension; for (var i=0; i < scalarWriteablePropertyNames.length; i++) { prop=scalarWriteablePropertyNames[i]; if (input.hasOwnProperty(prop)) { - this[prop]=input[prop]; + if (typeof input[prop] !=="undefined") { + this[prop]=input[prop]; + } } } for (var i=0; i < objectPropertyNames.length; i++) { prop=objectPropertyNames[i]; if (input.hasOwnProperty(prop)) { - this[prop].set(input[prop], options); - } - } - for (var i=0; i < notAllowedToBeSetPropertyNames.length; i++) { - prop=notAllowedToBeSetPropertyNames[i]; - if (input.hasOwnProperty(prop)) { - throw new OfficeExtension._Internal.RuntimeError({ - code: OfficeExtension.ErrorCodes.invalidArgument, - message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), - debugInfo: { - errorLocation: prop - } - }); + if (typeof input[prop] !=="undefined") { + var dataToPassToSet=isClientObject ? originalInput[prop] : input[prop]; + this[prop].set(dataToPassToSet, options); + } } } var throwOnReadOnly=!isClientObject; if (options && !OfficeExtension.Utility.isNullOrUndefined(throwOnReadOnly)) { throwOnReadOnly=options.throwOnReadOnly; } + for (var i=0; i < notAllowedToBeSetPropertyNames.length; i++) { + prop=notAllowedToBeSetPropertyNames[i]; + if (input.hasOwnProperty(prop)) { + if (typeof input[prop] !=="undefined" && throwOnReadOnly) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.invalidArgument, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), + debugInfo: { + errorLocation: prop + } + }); + } + } + } for (prop in input) { if (scalarWriteablePropertyNames.indexOf(prop) < 0 && objectPropertyNames.indexOf(prop) < 0) { var propertyDescriptor=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this), prop); @@ -8620,12 +9034,14 @@ var OfficeExtension; this.m_actions=[]; this.m_actionResultHandler={}; this.m_referencedObjectPaths={}; + this.m_instantiatedObjectPaths={}; this.m_flags=0; this.m_traceInfos={}; this.m_pendingProcessEventHandlers=[]; this.m_pendingEventHandlerActions={}; this.m_responseTraceIds={}; this.m_responseTraceMessages=[]; + this.m_preSyncPromises=[]; } Object.defineProperty(ClientRequest.prototype, "flags", { get: function () { @@ -8671,7 +9087,13 @@ var OfficeExtension; if (action.isWriteOperation) { this.m_flags=this.m_flags | 1; } + if (action.isRestrictedResourceAccess) { + this.m_flags=this.m_flags | 2; + } this.m_actions.push(action); + if (action.actionInfo.ActionType==1) { + this.m_instantiatedObjectPaths[action.actionInfo.ObjectPathId]=action; + } }; Object.defineProperty(ClientRequest.prototype, "hasActions", { get: function () { @@ -8680,9 +9102,39 @@ var OfficeExtension; enumerable: true, configurable: true }); + ClientRequest.prototype._getLastAction=function () { + return this.m_actions[this.m_actions.length - 1]; + }; ClientRequest.prototype.addTrace=function (actionId, message) { this.m_traceInfos[actionId]=message; }; + ClientRequest.prototype.ensureInstantiateObjectPath=function (objectPath) { + if (objectPath) { + if (this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + this.ensureInstantiateObjectPath(objectPath.parentObjectPath); + this.ensureInstantiateObjectPaths(objectPath.argumentObjectPaths); + if (!this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + var actionInfo={ + Id: this.m_context._nextId(), + ActionType: 1, + Name: "", + ObjectPathId: objectPath.objectPathInfo.Id + }; + var instantiateAction=new OfficeExtension.Action(actionInfo, false, false); + instantiateAction.referencedObjectPath=objectPath; + this.addAction(instantiateAction); + } + } + }; + ClientRequest.prototype.ensureInstantiateObjectPaths=function (objectPaths) { + if (objectPaths) { + for (var i=0; i < objectPaths.length; i++) { + this.ensureInstantiateObjectPath(objectPaths[i]); + } + } + }; ClientRequest.prototype.addReferencedObjectPath=function (objectPath) { if (this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]) { return; @@ -8700,6 +9152,9 @@ var OfficeExtension; if (objectPath.isWriteOperation) { this.m_flags=this.m_flags | 1; } + if (objectPath.isRestrictedResourceAccess) { + this.m_flags=this.m_flags | 2; + } this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]=objectPath; if (objectPath.objectPathInfo.ObjectPathType==3) { this.addReferencedObjectPaths(objectPath.argumentObjectPaths); @@ -8718,6 +9173,9 @@ var OfficeExtension; this.m_actionResultHandler[action.actionInfo.Id]=resultHandler; }; ClientRequest.prototype.buildRequestMessageBody=function () { + if (OfficeExtension._internalConfig.enableEarlyDispose) { + ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } var objectPaths={}; for (var i in this.m_referencedObjectPaths) { objectPaths[i]=this.m_referencedObjectPaths[i].objectPathInfo; @@ -8768,12 +9226,95 @@ var OfficeExtension; ClientRequest.prototype._getPendingEventHandlerActions=function (eventHandlers) { return this.m_pendingEventHandlerActions[eventHandlers._id]; }; + ClientRequest.prototype._addPreSyncPromise=function (value) { + this.m_preSyncPromises.push(value); + }; + Object.defineProperty(ClientRequest.prototype, "_preSyncPromises", { + get: function () { + return this.m_preSyncPromises; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_actions", { + get: function () { + return this.m_actions; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_objectPaths", { + get: function () { + return this.m_referencedObjectPaths; + }, + enumerable: true, + configurable: true + }); + ClientRequest._updateLastUsedActionIdOfObjectPathId=function (lastUsedActionIdOfObjectPathId, objectPath, actionId) { + while (objectPath) { + if (lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]) { + return; + } + lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]=actionId; + var argumentObjectPaths=objectPath.argumentObjectPaths; + if (argumentObjectPaths) { + var argumentObjectPathsLength=argumentObjectPaths.length; + for (var i=0; i < argumentObjectPathsLength; i++) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, argumentObjectPaths[i], actionId); + } + } + objectPath=objectPath.parentObjectPath; + } + }; + ClientRequest._calculateLastUsedObjectPathIds=function (actions) { + var lastUsedActionIdOfObjectPathId={}; + var actionsLength=actions.length; + for (var index=actionsLength - 1; index >=0; --index) { + var action=actions[index]; + var actionId=action.actionInfo.Id; + if (action.referencedObjectPath) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, action.referencedObjectPath, actionId); + } + var referencedObjectPaths=action.referencedArgumentObjectPaths; + if (referencedObjectPaths) { + var referencedObjectPathsLength=referencedObjectPaths.length; + for (var refIndex=0; refIndex < referencedObjectPathsLength; refIndex++) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, referencedObjectPaths[refIndex], actionId); + } + } + } + var lastUsedObjectPathIdsOfAction={}; + for (var key in lastUsedActionIdOfObjectPathId) { + var actionId=lastUsedActionIdOfObjectPathId[key]; + var objectPathIds=lastUsedObjectPathIdsOfAction[actionId]; + if (!objectPathIds) { + objectPathIds=[]; + lastUsedObjectPathIdsOfAction[actionId]=objectPathIds; + } + objectPathIds.push(parseInt(key)); + } + for (var index=0; index < actionsLength; index++) { + var action=actions[index]; + var lastUsedObjectPathIds=lastUsedObjectPathIdsOfAction[action.actionInfo.Id]; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + action.actionInfo.L=lastUsedObjectPathIds; + } + else if (action.actionInfo.L) { + delete action.actionInfo.L; + } + } + }; return ClientRequest; }()); OfficeExtension.ClientRequest=ClientRequest; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + OfficeExtension._internalConfig={ + showDisposeInfoInDebugInfo: false, + enableEarlyDispose: true, + alwaysPolyfillClientObjectRetrieveMethod: false + }; var SessionBase=(function () { function SessionBase() { } @@ -8867,6 +9408,15 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(ClientRequestContext.prototype, "debugInfo", { + get: function () { + var prettyPrinter=new OfficeExtension.RequestPrettyPrinter(this._rootObjectPropertyName, this._pendingRequest._objectPaths, this._pendingRequest._actions, OfficeExtension._internalConfig.showDisposeInfoInDebugInfo); + var statements=prettyPrinter.process(); + return { pendingStatements: statements }; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ClientRequestContext.prototype, "trackedObjects", { get: function () { if (!this.m_trackedObjects) { @@ -8886,11 +9436,76 @@ var OfficeExtension; }); ClientRequestContext.prototype.load=function (clientObj, option) { OfficeExtension.Utility.validateContext(this, clientObj); - var queryOption=ClientRequestContext.parseQueryOption(option); + var queryOption=ClientRequestContext._parseQueryOption(option); var action=OfficeExtension.ActionFactory.createQueryAction(this, clientObj, queryOption); this._pendingRequest.addActionResultHandler(action, clientObj); }; - ClientRequestContext.parseQueryOption=function (option) { + ClientRequestContext.isLoadOption=function (loadOption) { + if (!OfficeExtension.Utility.isUndefined(loadOption.select) && (typeof (loadOption.select)==="string" || Array.isArray(loadOption.select))) + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.expand) && (typeof (loadOption.expand)==="string" || Array.isArray(loadOption.expand))) + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.top) && typeof (loadOption.top)==="number") + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.skip) && typeof (loadOption.skip)==="number") + return true; + for (var i in loadOption) { + return false; + } + return true; + }; + ClientRequestContext.parseStrictLoadOption=function (option) { + var ret={ Select: [] }; + ClientRequestContext.parseStrictLoadOptionHelper(ret, "", "option", option); + return ret; + }; + ClientRequestContext.combineQueryPath=function (pathPrefix, key, separator) { + if (pathPrefix.length===0) { + return key; + } + else { + return pathPrefix+separator+key; + } + }; + ClientRequestContext.parseStrictLoadOptionHelper=function (queryInfo, pathPrefix, argPrefix, option) { + for (var key in option) { + var value=option[key]; + if (key==="$all") { + if (typeof (value) !=="boolean") { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + if (value) { + queryInfo.Select.push(ClientRequestContext.combineQueryPath(pathPrefix, "*", "/")); + } + } + else if (key==="$top") { + if (typeof (value) !=="number" || pathPrefix.length > 0) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + queryInfo.Top=value; + } + else if (key==="$skip") { + if (typeof (value) !=="number" || pathPrefix.length > 0) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + queryInfo.Skip=value; + } + else { + if (typeof (value)==="boolean") { + if (value) { + queryInfo.Select.push(ClientRequestContext.combineQueryPath(pathPrefix, key, "/")); + } + } + else if (typeof (value)==="object") { + ClientRequestContext.parseStrictLoadOptionHelper(queryInfo, ClientRequestContext.combineQueryPath(pathPrefix, key, "/"), ClientRequestContext.combineQueryPath(argPrefix, key, "."), value); + } + else { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + } + } + }; + ClientRequestContext._parseQueryOption=function (option) { var queryOption={}; if (typeof (option)=="string") { var select=option; @@ -8899,41 +9514,46 @@ var OfficeExtension; else if (Array.isArray(option)) { queryOption.Select=option; } - else if (typeof (option)=="object") { + else if (typeof (option)==="object") { var loadOption=option; - if (typeof (loadOption.select)=="string") { - queryOption.Select=OfficeExtension.Utility._parseSelectExpand(loadOption.select); - } - else if (Array.isArray(loadOption.select)) { - queryOption.Select=loadOption.select; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.select)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.select"); - } - if (typeof (loadOption.expand)=="string") { - queryOption.Expand=OfficeExtension.Utility._parseSelectExpand(loadOption.expand); - } - else if (Array.isArray(loadOption.expand)) { - queryOption.Expand=loadOption.expand; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.expand)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.expand"); - } - if (typeof (loadOption.top)=="number") { - queryOption.Top=loadOption.top; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.top)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.top"); - } - if (typeof (loadOption.skip)=="number") { - queryOption.Skip=loadOption.skip; + if (ClientRequestContext.isLoadOption(loadOption)) { + if (typeof (loadOption.select)=="string") { + queryOption.Select=OfficeExtension.Utility._parseSelectExpand(loadOption.select); + } + else if (Array.isArray(loadOption.select)) { + queryOption.Select=loadOption.select; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.select)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.select"); + } + if (typeof (loadOption.expand)=="string") { + queryOption.Expand=OfficeExtension.Utility._parseSelectExpand(loadOption.expand); + } + else if (Array.isArray(loadOption.expand)) { + queryOption.Expand=loadOption.expand; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.expand)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.expand"); + } + if (typeof (loadOption.top)==="number") { + queryOption.Top=loadOption.top; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.top)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.top"); + } + if (typeof (loadOption.skip)==="number") { + queryOption.Skip=loadOption.skip; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.skip)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.skip"); + } } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.skip)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.skip"); + else { + queryOption=ClientRequestContext.parseStrictLoadOption(option); } } else if (!OfficeExtension.Utility.isNullOrUndefined(option)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option"); + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option"); } return queryOption; }; @@ -8943,7 +9563,7 @@ var OfficeExtension; } var quries={}; for (var key in options) { - quries[key]=ClientRequestContext.parseQueryOption(options[key]); + quries[key]=ClientRequestContext._parseQueryOption(options[key]); } var action=OfficeExtension.ActionFactory.createRecursiveQueryAction(this, clientObj, { Queries: quries, MaxDepth: maxDepth }); this._pendingRequest.addActionResultHandler(action, clientObj); @@ -8951,6 +9571,8 @@ var OfficeExtension; ClientRequestContext.prototype.trace=function (message) { OfficeExtension.ActionFactory.createTraceAction(this, message, true); }; + ClientRequestContext.prototype._processOfficeJsErrorResponse=function (officeJsErrorCode, response) { + }; ClientRequestContext.prototype.syncPrivateMain=function () { var _this=this; return OfficeExtension.Utility._createPromiseFromResult(null) @@ -8978,13 +9600,14 @@ var OfficeExtension; } }) .then(function () { - return _this.syncPrivate(); + var req=_this._pendingRequest; + _this.m_pendingRequest=null; + return _this.processPreSyncPromises(req) + .then(function () { return _this.syncPrivate(req); }); }); }; - ClientRequestContext.prototype.syncPrivate=function () { + ClientRequestContext.prototype.syncPrivate=function (req) { var _this=this; - var req=this._pendingRequest; - this.m_pendingRequest=null; if (!req.hasActions) { return this.processPendingEventHandlers(req); } @@ -8992,7 +9615,7 @@ var OfficeExtension; var requestFlags=req.flags; if (!this._requestExecutor) { if (OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)) { - this._requestExecutor=new OfficeExtension.OfficeJsRequestExecutor(); + this._requestExecutor=new OfficeExtension.OfficeJsRequestExecutor(this); } else { this._requestExecutor=new OfficeExtension.HttpRequestExecutor(); @@ -9010,8 +9633,10 @@ var OfficeExtension; req.invalidatePendingInvalidObjectPaths(); var errorFromResponse=null; var errorFromProcessEventHandlers=null; + this._lastSyncStart=performance.now(); return requestExecutor.executeAsync(this._customData, requestFlags, requestExecutorRequestMessage) .then(function (response) { + _this._lastSyncEnd=performance.now(); errorFromResponse=_this.processRequestExecutorResponseMessage(req, response); return _this.processPendingEventHandlers(req) .catch(function (ex) { @@ -9058,7 +9683,13 @@ var OfficeExtension; req._setResponseTraceIds(response.Body.TraceIds); } var traceMessages=req._responseTraceMessages; + var errorStatementInfo=null; if (response.Body) { + if (response.Body.Error && + response.Body.Error.ActionIndex >=0) { + var prettyPrinter=new OfficeExtension.RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions); + errorStatementInfo=prettyPrinter.processForDebugStatementInfo(response.Body.Error.ActionIndex); + } var actionResults=null; if (response.Body.Results) { actionResults=response.Body.Results; @@ -9084,13 +9715,18 @@ var OfficeExtension; }); } else if (response.Body && response.Body.Error) { + var debugInfo={ + errorLocation: response.Body.Error.Location + }; + if (errorStatementInfo) { + debugInfo.statement=errorStatementInfo.statement; + debugInfo.surroundingStatements=errorStatementInfo.surroundingStatements; + } return new OfficeExtension._Internal.RuntimeError({ code: response.Body.Error.Code, message: response.Body.Error.Message, traceMessages: traceMessages, - debugInfo: { - errorLocation: response.Body.Error.Location - } + debugInfo: debugInfo }); } return null; @@ -9106,6 +9742,17 @@ var OfficeExtension; ClientRequestContext.prototype.createProcessOneEventHandlersFunc=function (eventHandlers, req) { return function () { return eventHandlers._processRegistration(req); }; }; + ClientRequestContext.prototype.processPreSyncPromises=function (req) { + var ret=OfficeExtension.Utility._createPromiseFromResult(null); + for (var i=0; i < req._preSyncPromises.length; i++) { + var p=req._preSyncPromises[i]; + ret=ret.then(this.createProcessOneProSyncFunc(p)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneProSyncFunc=function (p) { + return function () { return p; }; + }; ClientRequestContext.prototype.sync=function (passThroughValue) { return this.syncPrivateMain().then(function () { return passThroughValue; }); }; @@ -9144,9 +9791,15 @@ var OfficeExtension; batch=receivedRunArgs[argOffset+0]; } else if (receivedRunArgs.length==argOffset+2) { - if (receivedRunArgs[argOffset+0] instanceof OfficeExtension.ClientObject) { + if (OfficeExtension.Utility.isNullOrUndefined(receivedRunArgs[argOffset+0])) { + ctxRetriever=ctxInitializer; + } + else if (receivedRunArgs[argOffset+0] instanceof OfficeExtension.ClientObject) { ctxRetriever=function () { return receivedRunArgs[argOffset+0].context; }; } + else if (receivedRunArgs[argOffset+0] instanceof ClientRequestContext) { + ctxRetriever=function () { return receivedRunArgs[argOffset+0]; }; + } else if (Array.isArray(receivedRunArgs[argOffset+0])) { var array=receivedRunArgs[argOffset+0]; if (array.length==0) { @@ -9312,6 +9965,79 @@ var OfficeExtension; return ClientResult; }()); OfficeExtension.ClientResult=ClientResult; + var RetrieveResult=(function () { + function RetrieveResult(m_proxy, m_shouldPolyfill) { + this.m_proxy=m_proxy; + this.m_shouldPolyfill=m_shouldPolyfill; + } + Object.defineProperty(RetrieveResult.prototype, "proxy", { + get: function () { + return this.m_proxy; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RetrieveResult.prototype, "data", { + get: function () { + if (!this.m_isLoaded) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.valueNotLoaded, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: "retrieveResult.data" + } + }); + } + return this.m_data; + }, + enumerable: true, + configurable: true + }); + RetrieveResult.prototype._handleResult=function (value) { + this.m_isLoaded=true; + if (typeof (value)==="object" && value && value._IsNull) { + this.m_data=null; + return; + } + if (this.m_shouldPolyfill) { + this.m_data=this.changePropertyNameToCamelLowerCase(value); + } + else { + this.m_data=value; + } + }; + RetrieveResult.prototype.changePropertyNameToCamelLowerCase=function (value) { + var charCodeUnderscore=95; + if (Array.isArray(value)) { + var ret=[]; + for (var i=0; i < value.length; i++) { + ret.push(this.changePropertyNameToCamelLowerCase(value[i])); + } + return ret; + } + else if (typeof (value)==="object" && value !==null) { + var ret={}; + for (var key in value) { + var propValue=value[key]; + if (key==="_Items") { + ret={}; + ret["items"]=this.changePropertyNameToCamelLowerCase(propValue); + break; + } + else if (key.charCodeAt(0) !==charCodeUnderscore) { + var propName=OfficeExtension.Utility._toCamelLowerCase(key); + ret[propName]=this.changePropertyNameToCamelLowerCase(propValue); + } + } + return ret; + } + else { + return value; + } + }; + return RetrieveResult; + }()); + OfficeExtension.RetrieveResult=RetrieveResult; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { @@ -9333,6 +10059,9 @@ var OfficeExtension; Constants.sourceLibHeader="SdkVersion"; Constants.embeddingPageOrigin="EmbeddingPageOrigin"; Constants.embeddingPageSessionInfo="EmbeddingPageSessionInfo"; + Constants.eventMessageCategory=65536; + Constants.eventWorkbookId="Workbook"; + Constants.eventSourceRemote="Remote"; return Constants; }()); OfficeExtension.Constants=Constants; @@ -9663,7 +10392,7 @@ var OfficeExtension; debugInfo[key]=partialDebugInfo[key]; } if (this.innerError) { - if (this.innerError instanceof OfficeExtension.Error) { + if (this.innerError instanceof OfficeExtension._Internal.RuntimeError) { debugInfo.innerError=this.innerError.debugInfo; } else { @@ -9748,6 +10477,20 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(EventHandlers.prototype, "_context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_callback", { + get: function () { + return this.m_callback; + }, + enumerable: true, + configurable: true + }); EventHandlers.prototype.add=function (handler) { var action=OfficeExtension.ActionFactory.createTraceAction(this.m_context, null, false); this.m_context._pendingRequest._addPendingEventHandlerAction(this, { id: action.actionInfo.Id, handler: handler, operation: 0 }); @@ -9841,6 +10584,13 @@ var OfficeExtension; this.m_allHandlers=handlers; this.m_handler=handler; } + Object.defineProperty(EventHandlerResult.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); EventHandlerResult.prototype.remove=function () { if (this.m_allHandlers && this.m_handler) { this.m_allHandlers.remove(this.m_handler); @@ -9875,6 +10625,8 @@ var OfficeExtension; return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged, handler, callback); }); case 1: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.settings.addHandlerAsync(Office.EventType.SettingsChanged, handler, callback); }); + case 5: + return OfficeExtension.Utility.promisify(function (callback) { return OSF.DDA.RichApi.richApiMessageManager.addHandlerAsync("richApiMessage", handler, callback); }); case 13: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.ObjectDeleted, handler, { id: targetId }, callback); }); case 14: @@ -9903,6 +10655,8 @@ var OfficeExtension; return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.DocumentSelectionChanged, { handler: handler }, callback); }); case 1: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.settings.removeHandlerAsync(Office.EventType.SettingsChanged, { handler: handler }, callback); }); + case 5: + return OfficeExtension.Utility.promisify(function (callback) { return OSF.DDA.RichApi.richApiMessageManager.removeHandlerAsync("richApiMessage", { handler: handler }, callback); }); case 13: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDeleted, { id: targetId, handler: handler }, callback); }); case 14: @@ -9973,6 +10727,139 @@ var OfficeExtension; OfficeExtension.EventRegistration=EventRegistration; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var GenericEventRegistration=(function () { + function GenericEventRegistration() { + this.m_eventRegistration=new OfficeExtension.EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)); + this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this); + } + GenericEventRegistration.prototype.ready=function () { + var _this=this; + if (!this.m_ready) { + if (GenericEventRegistration._testReadyImpl) { + this.m_ready=GenericEventRegistration._testReadyImpl() + .then(function () { + _this.m_isReady=true; + }); + } + else { + this.m_ready=OfficeExtension._Internal.officeJsEventRegistration.register(5, "", this.m_richApiMessageHandler) + .then(function () { + _this.m_isReady=true; + }); + } + } + return this.m_ready; + }; + Object.defineProperty(GenericEventRegistration.prototype, "isReady", { + get: function () { + return this.m_isReady; + }, + enumerable: true, + configurable: true + }); + GenericEventRegistration.prototype.register=function (eventId, targetId, handler) { + var _this=this; + return this.ready() + .then(function () { return _this.m_eventRegistration.register(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype.unregister=function (eventId, targetId, handler) { + var _this=this; + return this.ready() + .then(function () { return _this.m_eventRegistration.unregister(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype._registerEventImpl=function (eventId, targetId) { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._unregisterEventImpl=function (eventId, targetId) { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._handleRichApiMessage=function (msg) { + if (msg && msg.entries) { + for (var entryIndex=0; entryIndex < msg.entries.length; entryIndex++) { + var entry=msg.entries[entryIndex]; + if (entry.messageCategory==OfficeExtension.Constants.eventMessageCategory) { + if (OfficeExtension.Utility._logEnabled) { + OfficeExtension.Utility.log(JSON.stringify(entry)); + } + var funcs=this.m_eventRegistration.getHandlers(entry.messageType, entry.targetId); + if (funcs.length > 0) { + var arg=JSON.parse(entry.message); + if (entry.isRemoteOverride) { + arg.source=OfficeExtension.Constants.eventSourceRemote; + } + for (var i=0; i < funcs.length; i++) { + funcs[i](arg); + } + } + } + } + } + }; + GenericEventRegistration.getGenericEventRegistration=function () { + if (!GenericEventRegistration.s_genericEventRegistration) { + GenericEventRegistration.s_genericEventRegistration=new GenericEventRegistration(); + } + return GenericEventRegistration.s_genericEventRegistration; + }; + GenericEventRegistration.richApiMessageEventCategory=65536; + return GenericEventRegistration; + }()); + function _testSetRichApiMessageReadyImpl(impl) { + GenericEventRegistration._testReadyImpl=impl; + } + OfficeExtension._testSetRichApiMessageReadyImpl=_testSetRichApiMessageReadyImpl; + function _testTriggerRichApiMessageEvent(msg) { + GenericEventRegistration.getGenericEventRegistration()._handleRichApiMessage(msg); + } + OfficeExtension._testTriggerRichApiMessageEvent=_testTriggerRichApiMessageEvent; + var GenericEventHandlers=(function (_super) { + __extends(GenericEventHandlers, _super); + function GenericEventHandlers(context, parentObject, name, eventInfo) { + _super.call(this, context, parentObject, name, eventInfo); + this.m_genericEventInfo=eventInfo; + } + GenericEventHandlers.prototype.add=function (handler) { + var _this=this; + if ((this._handlers.length==0) && this.m_genericEventInfo.registerFunc) { + this.m_genericEventInfo.registerFunc(); + } + if (!GenericEventRegistration.getGenericEventRegistration().isReady) { + this._context._pendingRequest._addPreSyncPromise(GenericEventRegistration.getGenericEventRegistration().ready()); + } + OfficeExtension.ActionFactory.createTraceMarkerForCallback(this._context, function () { + _this._handlers.push(handler); + if (_this._handlers.length==1) { + GenericEventRegistration.getGenericEventRegistration().register(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + return new OfficeExtension.EventHandlerResult(this._context, this, handler); + }; + GenericEventHandlers.prototype.remove=function (handler) { + var _this=this; + if ((this._handlers.length==1) && this.m_genericEventInfo.unregisterFunc) { + this.m_genericEventInfo.unregisterFunc(); + } + OfficeExtension.ActionFactory.createTraceMarkerForCallback(this._context, function () { + var handlers=_this._handlers; + for (var index=handlers.length - 1; index >=0; index--) { + if (handlers[index]===handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length==0) { + GenericEventRegistration.getGenericEventRegistration().unregister(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + }; + GenericEventHandlers.prototype.removeAll=function () { + }; + return GenericEventHandlers; + }(OfficeExtension.EventHandlers)); + OfficeExtension.GenericEventHandlers=GenericEventHandlers; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var HttpRequestExecutor=(function () { function HttpRequestExecutor() { @@ -10024,15 +10911,6 @@ var OfficeExtension; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { - var _Internal; - (function (_Internal) { - _Internal.OfficeRequire=function () { - if (typeof (require) !=="undefined") { - return require; - } - return null; - }(); - })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); var HttpUtility=(function () { function HttpUtility() { } @@ -10040,7 +10918,7 @@ var OfficeExtension; HttpUtility.s_customSendRequestFunc=func; }; HttpUtility.xhrSendRequestFunc=function (request) { - return new _Internal.OfficePromise(function (resolve, reject) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { var xhr=new XMLHttpRequest(); xhr.open(request.method, request.url); xhr.onload=function () { @@ -10052,7 +10930,7 @@ var OfficeExtension; resolve(resp); }; xhr.onerror=function () { - reject(new _Internal.RuntimeError({ + reject(new OfficeExtension._Internal.RuntimeError({ code: OfficeExtension.ErrorCodes.connectionFailure, message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.connectionFailureWithStatus, xhr.statusText) })); @@ -10065,34 +10943,11 @@ var OfficeExtension; xhr.send(request.body); }); }; - HttpUtility.nodejsRequestModuleSendRequestFunc=function (requestInfo) { - HttpUtility.logRequest(requestInfo); - var fetch=_Internal.OfficeRequire(HttpUtility.NodeJsRequestModuleName); - return fetch(requestInfo.url, { method: requestInfo.method, headers: requestInfo.headers, body: requestInfo.body }) - .then(function (resp) { - return resp.text() - .then(function (body) { - var statusCode=resp.status; - var headers={}; - resp.headers.forEach(function (value, name) { - headers[name]=value; - }); - var ret={ statusCode: statusCode, headers: headers, body: body }; - HttpUtility.logResponse(ret); - return ret; - }); - }); - }; HttpUtility.sendRequest=function (request) { HttpUtility.validateAndNormalizeRequest(request); var func=HttpUtility.s_customSendRequestFunc; if (!func) { - if (typeof (window)==="undefined" || typeof (XMLHttpRequest)==="undefined") { - func=HttpUtility.nodejsRequestModuleSendRequestFunc; - } - else { - func=HttpUtility.xhrSendRequestFunc; - } + func=HttpUtility.xhrSendRequestFunc; } return func(request); }; @@ -10108,7 +10963,7 @@ var OfficeExtension; HttpUtility.officeJsSendLocalDocumentRequestFunc=function (request) { request=OfficeExtension.Utility._validateLocalDocumentRequest(request); var requestSafeArray=OfficeExtension.Utility._buildRequestMessageSafeArray(request); - return new _Internal.OfficePromise(function (resolve, reject) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { OSF.DDA.RichApi.executeRichApiRequestAsync(requestSafeArray, function (asyncResult) { var response; if (asyncResult.status=="succeeded") { @@ -10128,7 +10983,7 @@ var OfficeExtension; }; HttpUtility.validateAndNormalizeRequest=function (request) { if (OfficeExtension.Utility.isNullOrUndefined(request)) { - throw _Internal.RuntimeError._createInvalidArgError({ + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError({ argumentName: "request" }); } @@ -10165,7 +11020,6 @@ var OfficeExtension; } } }; - HttpUtility.NodeJsRequestModuleName="node-fetch"; HttpUtility._logBody=false; return HttpUtility; }()); @@ -10189,6 +11043,146 @@ var OfficeExtension; ; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var HostBridgeRequestExecutor=(function () { + function HostBridgeRequestExecutor(session) { + this.m_session=session; + } + HostBridgeRequestExecutor.prototype.executeAsync=function (customData, requestFlags, requestMessage) { + var httpRequestInfo={ + url: OfficeExtension.Constants.processQuery, + method: "POST", + headers: requestMessage.Headers, + body: requestMessage.Body + }; + var message={ + id: HostBridgeSession.nextId(), + type: 1, + flags: requestFlags, + message: httpRequestInfo + }; + OfficeExtension.Utility.log(JSON.stringify(message)); + return this.m_session.sendMessageToHost(message) + .then(function (nativeBridgeResponse) { + OfficeExtension.Utility.log("Received response: "+JSON.stringify(nativeBridgeResponse)); + var responseInfo=nativeBridgeResponse.message; + var response; + if (responseInfo.statusCode===200) { + response={ ErrorCode: null, ErrorMessage: null, Headers: responseInfo.headers, Body: responseInfo.body }; + } + else { + OfficeExtension.Utility.log("Error Response:"+responseInfo.body); + var error=OfficeExtension.Utility._parseErrorResponse(responseInfo); + response={ + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null + }; + } + return response; + }); + }; + return HostBridgeRequestExecutor; + }()); + var HostBridgeSession=(function (_super) { + __extends(HostBridgeSession, _super); + function HostBridgeSession(bridge) { + var _this=this; + _super.call(this); + this.m_promiseResolver={}; + this.m_bridge=bridge; + this.m_bridge.onMessageFromHost=function (msg) { + _this.onMessageFromHost(msg); + }; + } + HostBridgeSession.prototype._resolveRequestUrlAndHeaderInfo=function () { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + HostBridgeSession.prototype._createRequestExecutorOrNull=function () { + OfficeExtension.Utility.log("NativeBridgeSession::CreateRequestExecutor"); + return new HostBridgeRequestExecutor(this); + }; + Object.defineProperty(HostBridgeSession.prototype, "eventRegistration", { + get: function () { + return OfficeExtension._Internal.officeJsEventRegistration; + }, + enumerable: true, + configurable: true + }); + HostBridgeSession.init=function (bridge) { + if (bridge && typeof (bridge)==="object") { + var session=new HostBridgeSession(bridge); + OfficeExtension.ClientRequestContext._overrideSession=session; + OfficeExtension.HttpUtility.setCustomSendLocalDocumentRequestFunc(function (request) { + var bridgeMessage={ + id: HostBridgeSession.nextId(), + type: 1, + flags: 0, + message: request + }; + return session.sendMessageToHost(bridgeMessage) + .then(function (bridgeResponse) { + var responseInfo=bridgeResponse.message; + return responseInfo; + }); + }); + } + }; + HostBridgeSession.prototype.sendMessageToHost=function (message) { + var _this=this; + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + var ret=new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { + _this.m_promiseResolver[message.id]=resolve; + }); + return ret; + }; + HostBridgeSession.prototype.onMessageFromHost=function (messageText) { + if (messageText==="test") { + if (HostBridgeTest._testFunc) { + HostBridgeTest._testFunc(); + } + } + else { + var message=JSON.parse(messageText); + if (typeof (message.id)==="number") { + var resolve=this.m_promiseResolver[message.id]; + if (resolve) { + resolve(message); + } + delete this.m_promiseResolver[message.id]; + } + } + }; + HostBridgeSession.nextId=function () { + return HostBridgeSession.s_nextId++; + }; + HostBridgeSession.s_nextId=1; + return HostBridgeSession; + }(OfficeExtension.SessionBase)); + var HostBridge=(function () { + function HostBridge() { + } + HostBridge.init=function (bridge) { + HostBridgeSession.init(bridge); + }; + return HostBridge; + }()); + OfficeExtension.HostBridge=HostBridge; + if (typeof (_richApiNativeBridge)==="object" && _richApiNativeBridge) { + HostBridge.init(_richApiNativeBridge); + } + var HostBridgeTest=(function () { + function HostBridgeTest() { + } + HostBridgeTest.setTestFunc=function (func) { + HostBridgeTest._testFunc=func; + }; + return HostBridgeTest; + }()); + OfficeExtension.HostBridgeTest=HostBridgeTest; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var ObjectPath=(function () { function ObjectPath(objectPathInfo, parentObjectPath, isCollection, isInvalidAfterRequest) { @@ -10216,6 +11210,16 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(ObjectPath.prototype, "isRestrictedResourceAccess", { + get: function () { + return this.m_isRestrictedResourceAccess; + }, + set: function (value) { + this.m_isRestrictedResourceAccess=value; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ObjectPath.prototype, "isCollection", { get: function () { return this.m_isCollection; @@ -10302,6 +11306,7 @@ var OfficeExtension; this.m_objectPathInfo.ObjectPathType=6; this.m_objectPathInfo.Name=referenceId; this.m_objectPathInfo.ArgumentInfo={}; + delete this.m_objectPathInfo.ParentObjectPathId; this.m_parentObjectPath=null; this.m_argumentObjectPaths=null; return; @@ -10316,15 +11321,15 @@ var OfficeExtension; if (!OfficeExtension.Utility.isNullOrUndefined(id)) { this.m_isInvalidAfterRequest=false; this.m_isValid=true; - if (parentIsCollection) { - this.m_objectPathInfo.ObjectPathType=5; - this.m_objectPathInfo.Name=""; - } - else { + if (!OfficeExtension.Utility.isNullOrEmptyString(getByIdMethodName)) { this.m_objectPathInfo.ObjectPathType=3; this.m_objectPathInfo.Name=getByIdMethodName; this.m_getByIdMethodName=null; } + else { + this.m_objectPathInfo.ObjectPathType=5; + this.m_objectPathInfo.Name=""; + } this.isWriteOperation=false; this.m_objectPathInfo.ArgumentInfo={}; this.m_objectPathInfo.ArgumentInfo.Arguments=[id]; @@ -10359,18 +11364,22 @@ var OfficeExtension; var objectPathInfo={ Id: context._nextId(), ObjectPathType: 1, Name: "" }; return new OfficeExtension.ObjectPath(objectPathInfo, null, false, false); }; - ObjectPathFactory.createNewObjectObjectPath=function (context, typeName, isCollection) { + ObjectPathFactory.createNewObjectObjectPath=function (context, typeName, isCollection, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 2, Name: typeName }; - return new OfficeExtension.ObjectPath(objectPathInfo, null, isCollection, false); + var ret=new OfficeExtension.ObjectPath(objectPathInfo, null, isCollection, false); + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; }; - ObjectPathFactory.createPropertyObjectPath=function (context, parent, propertyName, isCollection, isInvalidAfterRequest) { + ObjectPathFactory.createPropertyObjectPath=function (context, parent, propertyName, isCollection, isInvalidAfterRequest, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 4, Name: propertyName, ParentObjectPathId: parent._objectPath.objectPathInfo.Id, }; - return new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest); + var ret=new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest); + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; }; ObjectPathFactory.createIndexerObjectPath=function (context, parent, args) { var objectPathInfo={ @@ -10394,7 +11403,7 @@ var OfficeExtension; objectPathInfo.ArgumentInfo.Arguments=args; return new OfficeExtension.ObjectPath(objectPathInfo, parentObjectPath, false, false); }; - ObjectPathFactory.createMethodObjectPath=function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName) { + ObjectPathFactory.createMethodObjectPath=function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 3, @@ -10407,6 +11416,7 @@ var OfficeExtension; ret.argumentObjectPaths=argumentObjectPaths; ret.isWriteOperation=(operationType !=1); ret.getByIdMethodName=getByIdMethodName; + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; return ret; }; ObjectPathFactory.createReferenceIdObjectPath=function (context, referenceId) { @@ -10468,9 +11478,11 @@ var OfficeExtension; var OfficeExtension; (function (OfficeExtension) { var OfficeJsRequestExecutor=(function () { - function OfficeJsRequestExecutor() { + function OfficeJsRequestExecutor(context) { + this.m_context=context; } OfficeJsRequestExecutor.prototype.executeAsync=function (customData, requestFlags, requestMessage) { + var _this=this; var messageSafearray=OfficeExtension.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, OfficeJsRequestExecutor.SourceLibHeaderValue); return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { OSF.DDA.RichApi.executeRichApiRequestAsync(messageSafearray, function (result) { @@ -10482,6 +11494,7 @@ var OfficeExtension; } else { response=OfficeExtension.RichApiMessageUtility.buildResponseOnError(result.error.code, result.error.message); + _this.m_context._processOfficeJsErrorResponse(result.error.code, response); } resolve(response); }); @@ -10494,6 +11507,12 @@ var OfficeExtension; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + var _Internal; + (function (_Internal) { + _Internal.OfficeRequire=function () { + return null; + }(); + })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); var _Internal; (function (_Internal) { var PromiseImpl; @@ -10597,17 +11616,6 @@ var OfficeExtension; } lib$es6$promise$asap$$len=0; } - function lib$es6$promise$asap$$attemptVertex() { - try { - var r=require; - var vertx=r('vertx'); - lib$es6$promise$asap$$vertxNext=vertx.runOnLoop || vertx.runOnContext; - return lib$es6$promise$asap$$useVertxTimer(); - } - catch (e) { - return lib$es6$promise$asap$$useSetTimeout(); - } - } var lib$es6$promise$asap$$scheduleFlush; if (lib$es6$promise$asap$$isNode) { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useNextTick(); @@ -10618,9 +11626,6 @@ var OfficeExtension; else if (lib$es6$promise$asap$$isWorker) { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useMessageChannel(); } - else if (lib$es6$promise$asap$$browserWindow===undefined && typeof require==='function') { - lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$attemptVertex(); - } else { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useSetTimeout(); } @@ -11138,6 +12143,305 @@ var OfficeExtension; OfficeExtension.TrackedObjects=TrackedObjects; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var RequestPrettyPrinter=(function () { + function RequestPrettyPrinter(globalObjName, referencedObjectPaths, actions, showDispose) { + if (!globalObjName) { + globalObjName="root"; + } + this.m_globalObjName=globalObjName; + this.m_referencedObjectPaths=referencedObjectPaths; + this.m_actions=actions; + this.m_statements=[]; + this.m_variableNameForObjectPathMap={}; + this.m_variableNameToObjectPathMap={}; + this.m_declaredObjectPathMap={}; + this.m_showDispose=showDispose; + } + RequestPrettyPrinter.prototype.process=function () { + if (this.m_showDispose) { + OfficeExtension.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + for (var i=0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + } + return this.m_statements; + }; + RequestPrettyPrinter.prototype.processForDebugStatementInfo=function (actionIndex) { + if (this.m_showDispose) { + OfficeExtension.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + var surroundingCount=5; + this.m_statements=[]; + var oneStatement=""; + var statementIndex=-1; + for (var i=0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + if (actionIndex==i) { + statementIndex=this.m_statements.length - 1; + } + if (statementIndex >=0 && this.m_statements.length > statementIndex+surroundingCount+1) { + break; + } + } + if (statementIndex < 0) { + return null; + } + var startIndex=statementIndex - surroundingCount; + if (startIndex < 0) { + startIndex=0; + } + var endIndex=statementIndex+1+surroundingCount; + if (endIndex > this.m_statements.length) { + endIndex=this.m_statements.length; + } + var surroundingStatements=[]; + if (startIndex !=0) { + surroundingStatements.push("..."); + } + for (var i_1=startIndex; i_1 < statementIndex; i_1++) { + surroundingStatements.push(this.m_statements[i_1]); + } + surroundingStatements.push("// >>>>>"); + surroundingStatements.push(this.m_statements[statementIndex]); + surroundingStatements.push("// <<<<<"); + for (var i_2=statementIndex+1; i_2 < endIndex; i_2++) { + surroundingStatements.push(this.m_statements[i_2]); + } + if (endIndex < this.m_statements.length) { + surroundingStatements.push("..."); + } + return { + statement: this.m_statements[statementIndex], + surroundingStatements: surroundingStatements + }; + }; + RequestPrettyPrinter.prototype.processOneAction=function (action) { + var actionInfo=action.actionInfo; + switch (actionInfo.ActionType) { + case 1: + this.processInstantiateAction(action); + break; + case 3: + this.processMethodAction(action); + break; + case 2: + this.processQueryAction(action); + break; + case 7: + this.processQueryAsJsonAction(action); + break; + case 6: + this.processRecursiveQueryAction(action); + break; + case 4: + this.processSetPropertyAction(action); + break; + case 5: + this.processTraceAction(action); + break; + case 8: + this.processEnsureUnchangedAction(action); + break; + } + }; + RequestPrettyPrinter.prototype.processInstantiateAction=function (action) { + var objId=action.actionInfo.ObjectPathId; + var objPath=this.m_referencedObjectPaths[objId]; + var varName=this.getObjVarName(objId); + if (!this.m_declaredObjectPathMap[objId]) { + var statement="var "+varName+"="+this.buildObjectPathExpressionWithParent(objPath)+";"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + this.m_declaredObjectPathMap[objId]=varName; + } + else { + var statement="// Instantiate {"+varName+"}"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + } + }; + RequestPrettyPrinter.prototype.processMethodAction=function (action) { + var methodName=action.actionInfo.Name; + if (methodName==="_KeepReference") { + methodName="track"; + } + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+"."+OfficeExtension.Utility._toCamelLowerCase(methodName)+"("+this.buildArgumentsExpression(action.actionInfo.ArgumentInfo)+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAction=function (action) { + var queryExp=this.buildQueryExpression(action); + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".load("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAsJsonAction=function (action) { + var queryExp=this.buildQueryExpression(action); + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".loadJson("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processRecursiveQueryAction=function (action) { + var queryExp=""; + if (action.actionInfo.RecursiveQueryInfo) { + queryExp=JSON.stringify(action.actionInfo.RecursiveQueryInfo); + } + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".loadRecursive("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processSetPropertyAction=function (action) { + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+"."+OfficeExtension.Utility._toCamelLowerCase(action.actionInfo.Name)+"="+this.buildArgumentsExpression(action.actionInfo.ArgumentInfo)+";"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processTraceAction=function (action) { + var statement="context.trace();"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processEnsureUnchangedAction=function (action) { + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".ensureUnchanged("+JSON.stringify(action.actionInfo.ObjectState)+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.appendDisposeCommentIfRelevant=function (statement, action) { + var _this=this; + if (this.m_showDispose) { + var lastUsedObjectPathIds=action.actionInfo.L; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + var objectNamesToDispose=lastUsedObjectPathIds.map(function (item) { return _this.getObjVarName(item); }).join(", "); + return statement+" // And then dispose {"+objectNamesToDispose+"}"; + } + } + return statement; + }; + RequestPrettyPrinter.prototype.buildQueryExpression=function (action) { + if (action.actionInfo.QueryInfo) { + var option={}; + option.select=action.actionInfo.QueryInfo.Select; + option.expand=action.actionInfo.QueryInfo.Expand; + option.skip=action.actionInfo.QueryInfo.Skip; + option.top=action.actionInfo.QueryInfo.Top; + if (typeof (option.top)==="undefined" && typeof (option.skip)==="undefined" && typeof (option.expand)==="undefined") { + if (typeof (option.select)==="undefined") { + return ""; + } + else { + return JSON.stringify(option.select); + } + } + else { + return JSON.stringify(option); + } + } + return ""; + }; + RequestPrettyPrinter.prototype.buildObjectPathExpressionWithParent=function (objPath) { + var hasParent=objPath.objectPathInfo.ObjectPathType==5 || + objPath.objectPathInfo.ObjectPathType==3 || + objPath.objectPathInfo.ObjectPathType==4; + if (hasParent && objPath.objectPathInfo.ParentObjectPathId) { + return this.getObjVarName(objPath.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(objPath); + } + return this.buildObjectPathExpression(objPath); + }; + RequestPrettyPrinter.prototype.buildObjectPathExpression=function (objPath) { + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + return "context."+this.m_globalObjName; + case 5: + return "getItem("+this.buildArgumentsExpression(objPath.objectPathInfo.ArgumentInfo)+")"; + case 3: + return OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name)+"("+this.buildArgumentsExpression(objPath.objectPathInfo.ArgumentInfo)+")"; + case 2: + return objPath.objectPathInfo.Name+".newObject()"; + case 7: + return "null"; + case 4: + return OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + case 6: + return "context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(objPath.objectPathInfo.Name)+")"; + } + }; + RequestPrettyPrinter.prototype.buildArgumentsExpression=function (args) { + var ret=""; + if (!args.Arguments) { + return ret; + } + for (var i=0; i < args.Arguments.length; i++) { + if (i > 0) { + ret=ret+", "; + } + ret=ret+this.buildArgumentLiteral(args.Arguments[i], args.ReferencedObjectPathIds ? args.ReferencedObjectPathIds[i] : null); + } + if (ret==="undefined") { + ret=""; + } + return ret; + }; + RequestPrettyPrinter.prototype.buildArgumentLiteral=function (value, objectPathId) { + if (typeof value=="number" && value===objectPathId) { + return this.getObjVarName(objectPathId); + } + else { + return JSON.stringify(value); + } + }; + RequestPrettyPrinter.prototype.getObjVarNameBase=function (objectPathId) { + var ret="v"; + var objPath=this.m_referencedObjectPaths[objectPathId]; + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + ret=this.m_globalObjName; + break; + case 4: + ret=OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + break; + case 3: + var methodName=objPath.objectPathInfo.Name; + if (methodName.length > 3 && methodName.substr(0, 3)==="Get") { + methodName=methodName.substr(3); + } + ret=OfficeExtension.Utility._toCamelLowerCase(methodName); + break; + case 5: + var parentName=this.getObjVarNameBase(objPath.objectPathInfo.ParentObjectPathId); + if (parentName.charAt(parentName.length - 1)==="s") { + ret=parentName.substr(0, parentName.length - 1); + } + else { + ret=parentName+"Item"; + } + break; + } + return ret; + }; + RequestPrettyPrinter.prototype.getObjVarName=function (objectPathId) { + if (this.m_variableNameForObjectPathMap[objectPathId]) { + return this.m_variableNameForObjectPathMap[objectPathId]; + } + var ret=this.getObjVarNameBase(objectPathId); + if (!this.m_variableNameToObjectPathMap[ret]) { + this.m_variableNameForObjectPathMap[objectPathId]=ret; + this.m_variableNameToObjectPathMap[ret]=objectPathId; + return ret; + } + var i=1; + while (this.m_variableNameToObjectPathMap[ret+i.toString()]) { + i++; + } + ret=ret+i.toString(); + this.m_variableNameForObjectPathMap[objectPathId]=ret; + this.m_variableNameToObjectPathMap[ret]=objectPathId; + return ret; + }; + return RequestPrettyPrinter; + }()); + OfficeExtension.RequestPrettyPrinter=RequestPrettyPrinter; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var ResourceStrings=(function () { function ResourceStrings() { @@ -11158,6 +12462,14 @@ var OfficeExtension; ResourceStrings.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod"; ResourceStrings.valueNotLoaded="ValueNotLoaded"; ResourceStrings.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage"; + ResourceStrings.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"; + ResourceStrings.customFunctionDefintionMissing="CustomFunctionDefintionMissing"; + ResourceStrings.customFunctionImplementationMissing="CustomFunctionImplementationMissing"; + ResourceStrings.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars"; + ResourceStrings.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit"; + ResourceStrings.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch"; + ResourceStrings.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing"; + ResourceStrings.apiNotFoundDetails="ApiNotFoundDetails"; return ResourceStrings; }()); OfficeExtension.ResourceStrings=ResourceStrings; @@ -11177,7 +12489,15 @@ var OfficeExtension; ResourceStringValues.RunMustReturnPromise="The batch function passed to the \".run\" method didn't return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from \"context.sync()\"."; ResourceStringValues.Timeout="The operation has timed out."; ResourceStringValues.ValueNotLoaded="The value of the result object has not been loaded yet. Before reading the value property, call \"context.sync()\" on the associated request context."; - ResourceStringValues.invalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page."; + ResourceStringValues.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page."; + ResourceStringValues.InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again."; + ResourceStringValues.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions."; + ResourceStringValues.CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function."; + ResourceStringValues.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods."; + ResourceStringValues.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name."; + ResourceStringValues.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it."; + ResourceStringValues.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable."; + ResourceStringValues.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}."; return ResourceStringValues; }()); OfficeExtension.ResourceStringValues=ResourceStringValues; @@ -11471,6 +12791,34 @@ var OfficeExtension; }; Utility.load=function (clientObj, option) { clientObj.context.load(clientObj, option); + return clientObj; + }; + Utility.loadAndSync=function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj.context.sync().then(function () { return clientObj; }); + }; + Utility.retrieve=function (clientObj, option) { + var shouldPolyfill=OfficeExtension._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + if (typeof (window) !=="undefined" && window.Office && window.Office.context && window.Office.context.requirements) { + shouldPolyfill=!window.Office.context.requirements.isSetSupported("RichApiRuntime", "1.1"); + } + } + var result=new OfficeExtension.RetrieveResult(clientObj, shouldPolyfill); + var queryOption=OfficeExtension.ClientRequestContext._parseQueryOption(option); + var action; + if (shouldPolyfill) { + action=OfficeExtension.ActionFactory.createQueryAction(clientObj.context, clientObj, queryOption); + } + else { + action=OfficeExtension.ActionFactory.createQueryAsJsonAction(clientObj.context, clientObj, queryOption); + } + clientObj.context._pendingRequest.addActionResultHandler(action, result); + return result; + }; + Utility.retrieveAndSync=function (clientObj, option) { + var result=Utility.retrieve(clientObj, option); + return clientObj.context.sync().then(function () { return result; }); }; Utility._parseSelectExpand=function (select) { var args=[]; @@ -11491,11 +12839,32 @@ var OfficeExtension; return '*'; } var itemsSlashLength=6; - if (propertyNameLower.substr(0, itemsSlashLength)==="items/") { + var isItemsSlashOrItemsDot=propertyNameLower.substr(0, itemsSlashLength)==="items/" || + propertyNameLower.substr(0, itemsSlashLength)==="items."; + if (isItemsSlashOrItemsDot) { propertyName=propertyName.substr(itemsSlashLength); } - return propertyName.replace(new RegExp("\/items\/", "gi"), "/"); + return propertyName.replace(new RegExp("[\/\.]items[\/\.]", "gi"), "/"); + } + }; + Utility.toJson=function (clientObj, scalarProperties, navigationProperties, collectionItemsIfAny) { + var result={}; + for (var prop in scalarProperties) { + var value=scalarProperties[prop]; + if (typeof value !=="undefined") { + result[prop]=value; + } + } + for (var prop in navigationProperties) { + var value=navigationProperties[prop]; + if (typeof value !=="undefined") { + result[prop]=value.toJSON(); + } + } + if (collectionItemsIfAny) { + result["items"]=collectionItemsIfAny.map(function (item) { return item.toJSON(); }); } + return result; }; Utility.throwError=function (resourceId, arg, errorLocation) { throw new OfficeExtension._Internal.RuntimeError({ @@ -11557,6 +12926,21 @@ var OfficeExtension; }); } }; + Utility.throwIfApiNotSupported=function (apiFullName, apiSetName, apiSetVersion, hostName) { + if (!Utility._doApiNotSupportedCheck) { + return; + } + if (typeof (window) !=="undefined" && window.Office && window.Office.context) { + if (!window.Office.context.requirements.isSetSupported(apiSetName, apiSetVersion)) { + var message=Utility._getResourceString(OfficeExtension.ResourceStrings.apiNotFoundDetails, [apiFullName, apiSetName+" "+apiSetVersion, hostName]); + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.apiNotFound, + message: message, + debugInfo: { errorLocation: apiFullName } + }); + } + } + }; Utility.getObjectPathExpression=function (objectPath) { var ret=""; while (objectPath) { @@ -11706,7 +13090,10 @@ var OfficeExtension; }; Utility._parseErrorResponse=function (responseInfo) { var errorObj=null; - if (!Utility.isNullOrEmptyString(responseInfo.body)) { + if (Utility.isPlainJsonObject(responseInfo.body)) { + errorObj=responseInfo.body; + } + else if (!Utility.isNullOrEmptyString(responseInfo.body)) { var errorResponseBody=Utility.trim(responseInfo.body); try { errorObj=JSON.parse(errorResponseBody); @@ -11736,8 +13123,24 @@ var OfficeExtension; } } }; + Utility._toCamelLowerCase=function (name) { + if (Utility.isNullOrEmptyString(name)) { + return name; + } + var index=0; + while (index < name.length && name.charCodeAt(index) >=65 && name.charCodeAt(index) <=90) { + index++; + } + if (index < name.length) { + return name.substr(0, index).toLowerCase()+name.substr(index); + } + else { + return name.toLowerCase(); + } + }; Utility._logEnabled=false; Utility._synchronousCleanup=false; + Utility._doApiNotSupportedCheck=false; Utility.s_underscoreCharCode="_".charCodeAt(0); return Utility; }()); @@ -11749,58 +13152,295 @@ var __extends=(this && this.__extends) || function (d, b) { function __() { this.constructor=d; } d.prototype=b===null ? Object.create(b) : (__.prototype=b.prototype, new __()); }; -var Excel; -(function (Excel) { - function lowerCaseFirst(str) { - return str[0].toLowerCase()+str.slice(1); - } - var iconSets=["ThreeArrows", - "ThreeArrowsGray", - "ThreeFlags", - "ThreeTrafficLights1", - "ThreeTrafficLights2", - "ThreeSigns", - "ThreeSymbols", - "ThreeSymbols2", - "FourArrows", - "FourArrowsGray", - "FourRedToBlack", - "FourRating", - "FourTrafficLights", - "FiveArrows", - "FiveArrowsGray", - "FiveRating", - "FiveQuarters", - "ThreeStars", - "ThreeTriangles", - "FiveBoxes"]; - var iconNames=[["RedDownArrow", "YellowSideArrow", "GreenUpArrow"], - ["GrayDownArrow", "GraySideArrow", "GrayUpArrow"], - ["RedFlag", "YellowFlag", "GreenFlag"], - ["RedCircleWithBorder", "YellowCircle", "GreenCircle"], - ["RedTrafficLight", "YellowTrafficLight", "GreenTrafficLight"], - ["RedDiamond", "YellowTriangle", "GreenCircle"], - ["RedCrossSymbol", "YellowExclamationSymbol", "GreenCheckSymbol"], - ["RedCross", "YellowExclamation", "GreenCheck"], - ["RedDownArrow", "YellowDownInclineArrow", "YellowUpInclineArrow", "GreenUpArrow"], - ["GrayDownArrow", "GrayDownInclineArrow", "GrayUpInclineArrow", "GrayUpArrow"], - ["BlackCircle", "GrayCircle", "PinkCircle", "RedCircle"], - ["OneBar", "TwoBars", "ThreeBars", "FourBars"], - ["BlackCircleWithBorder", "RedCircleWithBorder", "YellowCircle", "GreenCircle"], - ["RedDownArrow", "YellowDownInclineArrow", "YellowSideArrow", "YellowUpInclineArrow", "GreenUpArrow"], - ["GrayDownArrow", "GrayDownInclineArrow", "GraySideArrow", "GrayUpInclineArrow", "GrayUpArrow"], - ["NoBars", "OneBar", "TwoBars", "ThreeBars", "FourBars"], - ["WhiteCircleAllWhiteQuarters", "CircleWithThreeWhiteQuarters", "CircleWithTwoWhiteQuarters", "CircleWithOneWhiteQuarter", "BlackCircle"], - ["SilverStar", "HalfGoldStar", "GoldStar"], - ["RedDownTriangle", "YellowDash", "GreenUpTriangle"], - ["NoFilledBoxes", "OneFilledBox", "TwoFilledBoxes", "ThreeFilledBoxes", "FourFilledBoxes"],]; - Excel.icons={}; - iconSets.map(function (title, i) { - var camelTitle=lowerCaseFirst(title); - Excel.icons[camelTitle]=[]; - iconNames[i].map(function (iconName, j) { - iconName=lowerCaseFirst(iconName); - var obj={ set: title, index: j }; +var OfficeCore; +(function (OfficeCore) { + var _hostName="OfficeCore"; + var _defaultApiSetName="ExperimentApi"; + var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; + var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; + var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; + var _createNewObjectObjectPath=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath; + var _createChildItemObjectPathUsingIndexer=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer; + var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; + var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; + var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; + var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined=OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; + var _load=OfficeExtension.Utility.load; + var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; + var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; + var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var FlightingService=(function (_super) { + __extends(FlightingService, _super); + function FlightingService() { + _super.apply(this, arguments); + } + Object.defineProperty(FlightingService.prototype, "_className", { + get: function () { + return "FlightingService"; + }, + enumerable: true, + configurable: true + }); + FlightingService.prototype.getClientSessionId=function () { + var action=_createMethodAction(this.context, this, "GetClientSessionId", 1, []); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + FlightingService.prototype.getDeferredFlights=function () { + var action=_createMethodAction(this.context, this, "GetDeferredFlights", 1, []); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + FlightingService.prototype.getFeature=function (featureName, type, defaultValue, possibleValues) { + return new OfficeCore.ABType(this.context, _createMethodObjectPath(this.context, this, "GetFeature", 1, [featureName, type, defaultValue, possibleValues], false, false, null)); + }; + FlightingService.prototype.getFeatureGate=function (featureName, scope) { + return new OfficeCore.ABType(this.context, _createMethodObjectPath(this.context, this, "GetFeatureGate", 1, [featureName, scope], false, false, null)); + }; + FlightingService.prototype.resetOverride=function (featureName) { + _createMethodAction(this.context, this, "ResetOverride", 0, [featureName]); + }; + FlightingService.prototype.setOverride=function (featureName, type, value) { + _createMethodAction(this.context, this, "SetOverride", 0, [featureName, type, value]); + }; + FlightingService.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + FlightingService.newObject=function (context) { + var ret=new OfficeCore.FlightingService(context, _createNewObjectObjectPath(context, "Microsoft.Experiment.FlightingService", false)); + return ret; + }; + FlightingService.prototype.toJSON=function () { + return {}; + }; + return FlightingService; + }(OfficeExtension.ClientObject)); + OfficeCore.FlightingService=FlightingService; + var ABType=(function (_super) { + __extends(ABType, _super); + function ABType() { + _super.apply(this, arguments); + } + Object.defineProperty(ABType.prototype, "_className", { + get: function () { + return "ABType"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ABType.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this.m_value, "ABType", this._isNull); + return this.m_value; + }, + enumerable: true, + configurable: true + }); + ABType.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Value"])) { + this.m_value=obj["Value"]; + } + }; + ABType.prototype.load=function (option) { + _load(this, option); + return this; + }; + ABType.prototype.toJSON=function () { + return { + "value": this.m_value + }; + }; + return ABType; + }(OfficeExtension.ClientObject)); + OfficeCore.ABType=ABType; + var FeatureType; + (function (FeatureType) { + FeatureType.boolean="Boolean"; + FeatureType.integer="Integer"; + FeatureType.string="String"; + })(FeatureType=OfficeCore.FeatureType || (OfficeCore.FeatureType={})); + var ExperimentErrorCodes; + (function (ExperimentErrorCodes) { + ExperimentErrorCodes.generalException="GeneralException"; + })(ExperimentErrorCodes=OfficeCore.ExperimentErrorCodes || (OfficeCore.ExperimentErrorCodes={})); +})(OfficeCore || (OfficeCore={})); +var OfficeCore; +(function (OfficeCore) { + var RequestContext=(function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + _super.call(this, url); + } + Object.defineProperty(RequestContext.prototype, "flighting", { + get: function () { + return this.flightingService; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "telemetry", { + get: function () { + if (!this.m_telemetry) { + this.m_telemetry=OfficeCore.TelemetryService.newObject(this); + } + return this.m_telemetry; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "flightingService", { + get: function () { + if (!this.m_flightingService) { + this.m_flightingService=OfficeCore.FlightingService.newObject(this); + } + return this.m_flightingService; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeExtension.ClientRequestContext)); + OfficeCore.RequestContext=RequestContext; +})(OfficeCore || (OfficeCore={})); +var OfficeCore; +(function (OfficeCore) { + var _hostName="OfficeCore"; + var _defaultApiSetName="TelemetryApi"; + var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; + var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; + var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; + var _createNewObjectObjectPath=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath; + var _createChildItemObjectPathUsingIndexer=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer; + var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; + var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; + var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; + var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined=OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; + var _load=OfficeExtension.Utility.load; + var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; + var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; + var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var _typeTelemetryService="TelemetryService"; + var TelemetryService=(function (_super) { + __extends(TelemetryService, _super); + function TelemetryService() { + _super.apply(this, arguments); + } + Object.defineProperty(TelemetryService.prototype, "_className", { + get: function () { + return "TelemetryService"; + }, + enumerable: true, + configurable: true + }); + TelemetryService.prototype.sendTelemetryEvent=function (telemetryProperties, eventName, eventContract, eventFlags, value) { + _createMethodAction(this.context, this, "SendTelemetryEvent", 1, [telemetryProperties, eventName, eventContract, eventFlags, value], false); + }; + TelemetryService.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + TelemetryService.newObject=function (context) { + var ret=new OfficeCore.TelemetryService(context, _createNewObjectObjectPath(context, "Microsoft.Telemetry.TelemetryService", false, false)); + return ret; + }; + TelemetryService.prototype.toJSON=function () { + return {}; + }; + return TelemetryService; + }(OfficeExtension.ClientObject)); + OfficeCore.TelemetryService=TelemetryService; + var TelemetryErrorCodes; + (function (TelemetryErrorCodes) { + TelemetryErrorCodes.generalException="GeneralException"; + })(TelemetryErrorCodes=OfficeCore.TelemetryErrorCodes || (OfficeCore.TelemetryErrorCodes={})); +})(OfficeCore || (OfficeCore={})); + +var __extends=(this && this.__extends) || (function () { + var extendStatics=Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__=b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p]=b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor=d; } + d.prototype=b===null ? Object.create(b) : (__.prototype=b.prototype, new __()); + }; +})(); +var Excel; +(function (Excel) { + function lowerCaseFirst(str) { + return str[0].toLowerCase()+str.slice(1); + } + var iconSets=["ThreeArrows", + "ThreeArrowsGray", + "ThreeFlags", + "ThreeTrafficLights1", + "ThreeTrafficLights2", + "ThreeSigns", + "ThreeSymbols", + "ThreeSymbols2", + "FourArrows", + "FourArrowsGray", + "FourRedToBlack", + "FourRating", + "FourTrafficLights", + "FiveArrows", + "FiveArrowsGray", + "FiveRating", + "FiveQuarters", + "ThreeStars", + "ThreeTriangles", + "FiveBoxes"]; + var iconNames=[["RedDownArrow", "YellowSideArrow", "GreenUpArrow"], + ["GrayDownArrow", "GraySideArrow", "GrayUpArrow"], + ["RedFlag", "YellowFlag", "GreenFlag"], + ["RedCircleWithBorder", "YellowCircle", "GreenCircle"], + ["RedTrafficLight", "YellowTrafficLight", "GreenTrafficLight"], + ["RedDiamond", "YellowTriangle", "GreenCircle"], + ["RedCrossSymbol", "YellowExclamationSymbol", "GreenCheckSymbol"], + ["RedCross", "YellowExclamation", "GreenCheck"], + ["RedDownArrow", "YellowDownInclineArrow", "YellowUpInclineArrow", "GreenUpArrow"], + ["GrayDownArrow", "GrayDownInclineArrow", "GrayUpInclineArrow", "GrayUpArrow"], + ["BlackCircle", "GrayCircle", "PinkCircle", "RedCircle"], + ["OneBar", "TwoBars", "ThreeBars", "FourBars"], + ["BlackCircleWithBorder", "RedCircleWithBorder", "YellowCircle", "GreenCircle"], + ["RedDownArrow", "YellowDownInclineArrow", "YellowSideArrow", "YellowUpInclineArrow", "GreenUpArrow"], + ["GrayDownArrow", "GrayDownInclineArrow", "GraySideArrow", "GrayUpInclineArrow", "GrayUpArrow"], + ["NoBars", "OneBar", "TwoBars", "ThreeBars", "FourBars"], + ["WhiteCircleAllWhiteQuarters", "CircleWithThreeWhiteQuarters", "CircleWithTwoWhiteQuarters", "CircleWithOneWhiteQuarter", "BlackCircle"], + ["SilverStar", "HalfGoldStar", "GoldStar"], + ["RedDownTriangle", "YellowDash", "GreenUpTriangle"], + ["NoFilledBoxes", "OneFilledBox", "TwoFilledBoxes", "ThreeFilledBoxes", "FourFilledBoxes"],]; + Excel.icons={}; + iconSets.map(function (title, i) { + var camelTitle=lowerCaseFirst(title); + Excel.icons[camelTitle]=[]; + iconNames[i].map(function (iconName, j) { + iconName=lowerCaseFirst(iconName); + var obj={ set: title, index: j }; Excel.icons[camelTitle].push(obj); Excel.icons[camelTitle][iconName]=obj; }); @@ -11925,18 +13565,27 @@ var Excel; return _this.m_requestUrlAndHeaderInfo; }); }; - Session.WorkbookSessionIdHeaderName="Workbook-Session-Id"; - Session.WorkbookSessionIdHeaderNameLower="workbook-session-id"; return Session; }()); + Session.WorkbookSessionIdHeaderName="Workbook-Session-Id"; + Session.WorkbookSessionIdHeaderNameLower="workbook-session-id"; Excel.Session=Session; var RequestContext=(function (_super) { __extends(RequestContext, _super); function RequestContext(url) { - _super.call(this, url); - this.m_workbook=new Workbook(this, OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(this)); - this._rootObject=this.m_workbook; + var _this=_super.call(this, url) || this; + _this.m_workbook=new Workbook(_this, OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(_this)); + _this._rootObject=_this.m_workbook; + _this._rootObjectPropertyName="workbook"; + return _this; } + RequestContext.prototype._processOfficeJsErrorResponse=function (officeJsErrorCode, response) { + var ooeInvalidApiCallInContext=5004; + if (officeJsErrorCode==ooeInvalidApiCallInContext) { + response.ErrorCode=ErrorCodes.invalidOperationInCellEditMode; + response.ErrorMessage=OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidOperationInCellEditMode); + } + }; Object.defineProperty(RequestContext.prototype, "workbook", { get: function () { return this.m_workbook; @@ -11952,7 +13601,7 @@ var Excel; configurable: true }); return RequestContext; - }(OfficeExtension.ClientRequestContext)); + }(OfficeCore.RequestContext)); Excel.RequestContext=RequestContext; function run(arg1, arg2, arg3) { return OfficeExtension.ClientRequestContext._runBatch("Excel.run", arguments, function (requestInfo) { @@ -11961,6 +13610,13 @@ var Excel; }); } Excel.run=run; + function runBatch(arg1, arg2) { + return OfficeExtension.ClientRequestContext._runExplicitBatch("Excel.runBatch", arguments, function (requestInfo) { + var ret=new Excel.RequestContext(requestInfo); + return ret; + }); + } + Excel.runBatch=runBatch; Excel._RedirectV1APIs=false; Excel._V1APIMap={ "GetDataAsync": { @@ -12066,7 +13722,7 @@ var Excel; call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingClearFormats(callArgs); } }, "GetFilePropertiesAsync": { - call: function (ctx, callArgs) { return ctx.workbook._V1Api.getFilePropertiesAsync(callArgs); } + call: function (ctx) { return ctx.workbook._V1Api.getFilePropertiesAsync(); } }, }; function postprocessBindingDescriptor(response) { @@ -12091,6 +13747,40 @@ var Excel; data=window.OSF.DDA.DataCoercion.coerceData(data, callArgs[window.Microsoft.Office.WebExtension.Parameters.CoercionType]); return data==undefined ? null : data; } + function versionNumberIsEarlierThan(desiredMajor, desiredMinor, desiredBuild) { + var hasOfficeVersion=typeof (window) !=="undefined" && + window.Office && + window.Office.context && + window.Office.context.diagnostics && + window.Office.context.diagnostics.version; + if (!hasOfficeVersion) { + return false; + } + var version=window.Office.context.diagnostics.version; + var versionExtractor=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/; + var result=versionExtractor.exec(version); + if (result) { + var major=parseInt(result[1]); + var minor=parseInt(result[2]); + var build=parseInt(result[3]); + var revision=parseInt(result[4]); + var devBuild=3000; + if (major < desiredMajor) { + return true; + } + if (major==desiredMajor && minor < desiredMinor) { + return true; + } + if (major==desiredMajor && minor==desiredMinor && build < desiredBuild) { + if (revision < devBuild) { + return true; + } + } + } + return false; + } + var _hostName="Excel"; + var _defaultApiSetName="ExcelApi"; var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; @@ -12099,19 +13789,25 @@ var Excel; var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createEnsureUnchangedAction=OfficeExtension.ActionFactory.createEnsureUnchangedAction; var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; var _isUndefined=OfficeExtension.Utility.isUndefined; var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; var _load=OfficeExtension.Utility.load; + var _retrieve=OfficeExtension.Utility.retrieve; + var _toJson=OfficeExtension.Utility.toJson; var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult=OfficeExtension.Utility.processRetrieveResult; + var _typeApplication="Application"; var Application=(function (_super) { __extends(Application, _super); function Application() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Application.prototype, "_className", { get: function () { @@ -12120,19 +13816,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Application.prototype, "_scalarPropertyNames", { + get: function () { + return ["calculationMode"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(Application.prototype, "calculationMode", { get: function () { - _throwIfNotLoaded("calculationMode", this.m_calculationMode, "Application", this._isNull); - return this.m_calculationMode; + _throwIfNotLoaded("calculationMode", this._C, _typeApplication, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Application.prototype.calculate=function (calculationType) { - _createMethodAction(this.context, this, "Calculate", 0, [calculationType]); + _createMethodAction(this.context, this, "Calculate", 0, [calculationType], false); }; Application.prototype.suspendApiCalculationUntilNextSync=function () { - _createMethodAction(this.context, this, "SuspendApiCalculationUntilNextSync", 0, []); + _throwIfApiNotSupported("Application.suspendApiCalculationUntilNextSync", _defaultApiSetName, "1.6", _hostName); + _createMethodAction(this.context, this, "SuspendApiCalculationUntilNextSync", 0, [], false); }; Application.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12141,25 +13845,36 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["CalculationMode"])) { - this.m_calculationMode=obj["CalculationMode"]; + this._C=obj["CalculationMode"]; } }; Application.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Application.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Application.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; Application.prototype.toJSON=function () { - return { - "calculationMode": this.m_calculationMode - }; + return _toJson(this, { + "calculationMode": this._C, + }, {}); + }; + Application.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Application; }(OfficeExtension.ClientObject)); Excel.Application=Application; + var _typeWorkbook="Workbook"; var Workbook=(function (_super) { __extends(Workbook, _super); function Workbook() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Workbook.prototype, "_className", { get: function () { @@ -12168,132 +13883,155 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Workbook.prototype, "_navigationPropertyNames", { + get: function () { + return ["worksheets", "names", "tables", "application", "bindings", "functions", "_V1Api", "pivotTables", "settings", "customXmlParts", "internalTest"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(Workbook.prototype, "application", { get: function () { - if (!this.m_application) { - this.m_application=new Excel.Application(this.context, _createPropertyObjectPath(this.context, this, "Application", false, false)); + if (!this._A) { + this._A=new Excel.Application(this.context, _createPropertyObjectPath(this.context, this, "Application", false, false, false)); } - return this.m_application; + return this._A; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "bindings", { get: function () { - if (!this.m_bindings) { - this.m_bindings=new Excel.BindingCollection(this.context, _createPropertyObjectPath(this.context, this, "Bindings", true, false)); + if (!this._B) { + this._B=new Excel.BindingCollection(this.context, _createPropertyObjectPath(this.context, this, "Bindings", true, false, false)); } - return this.m_bindings; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "customXmlParts", { get: function () { - if (!this.m_customXmlParts) { - this.m_customXmlParts=new Excel.CustomXmlPartCollection(this.context, _createPropertyObjectPath(this.context, this, "CustomXmlParts", true, false)); + _throwIfApiNotSupported("Workbook.customXmlParts", _defaultApiSetName, "1.5", _hostName); + if (!this._C) { + this._C=new Excel.CustomXmlPartCollection(this.context, _createPropertyObjectPath(this.context, this, "CustomXmlParts", true, false, false)); } - return this.m_customXmlParts; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "functions", { get: function () { - if (!this.m_functions) { - this.m_functions=new Excel.Functions(this.context, _createPropertyObjectPath(this.context, this, "Functions", false, false)); + _throwIfApiNotSupported("Workbook.functions", _defaultApiSetName, "1.2", _hostName); + if (!this._F) { + this._F=new Excel.Functions(this.context, _createPropertyObjectPath(this.context, this, "Functions", false, false, false)); } - return this.m_functions; + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Workbook.prototype, "internalTest", { + get: function () { + _throwIfApiNotSupported("Workbook.internalTest", _defaultApiSetName, "1.6", _hostName); + if (!this._I) { + this._I=new Excel.InternalTest(this.context, _createPropertyObjectPath(this.context, this, "InternalTest", false, false, false)); + } + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "names", { get: function () { - if (!this.m_names) { - this.m_names=new Excel.NamedItemCollection(this.context, _createPropertyObjectPath(this.context, this, "Names", true, false)); + if (!this._N) { + this._N=new Excel.NamedItemCollection(this.context, _createPropertyObjectPath(this.context, this, "Names", true, false, false)); } - return this.m_names; + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "pivotTables", { get: function () { - if (!this.m_pivotTables) { - this.m_pivotTables=new Excel.PivotTableCollection(this.context, _createPropertyObjectPath(this.context, this, "PivotTables", true, false)); + _throwIfApiNotSupported("Workbook.pivotTables", _defaultApiSetName, "1.3", _hostName); + if (!this._P) { + this._P=new Excel.PivotTableCollection(this.context, _createPropertyObjectPath(this.context, this, "PivotTables", true, false, false)); } - return this.m_pivotTables; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "settings", { get: function () { - if (!this.m_settings) { - this.m_settings=new Excel.SettingCollection(this.context, _createPropertyObjectPath(this.context, this, "Settings", true, false)); + _throwIfApiNotSupported("Workbook.settings", _defaultApiSetName, "1.4", _hostName); + if (!this._S) { + this._S=new Excel.SettingCollection(this.context, _createPropertyObjectPath(this.context, this, "Settings", true, false, false)); } - return this.m_settings; + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "tables", { get: function () { - if (!this.m_tables) { - this.m_tables=new Excel.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false)); + if (!this._T) { + this._T=new Excel.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false, false)); } - return this.m_tables; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "worksheets", { get: function () { - if (!this.m_worksheets) { - this.m_worksheets=new Excel.WorksheetCollection(this.context, _createPropertyObjectPath(this.context, this, "Worksheets", true, false)); + if (!this._W) { + this._W=new Excel.WorksheetCollection(this.context, _createPropertyObjectPath(this.context, this, "Worksheets", true, false, false)); } - return this.m_worksheets; + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "_V1Api", { get: function () { - if (!this.m__V1Api) { - this.m__V1Api=new Excel._V1Api(this.context, _createPropertyObjectPath(this.context, this, "_V1Api", false, false)); + _throwIfApiNotSupported("Workbook._V1Api", _defaultApiSetName, "1.3", _hostName); + if (!this.__V) { + this.__V=new Excel._V1Api(this.context, _createPropertyObjectPath(this.context, this, "_V1Api", false, false, false)); } - return this.m__V1Api; + return this.__V; }, enumerable: true, configurable: true }); Workbook.prototype.getSelectedRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetSelectedRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetSelectedRange", 1, [], false, true, null, false)); }; Workbook.prototype._GetObjectByReferenceId=function (bstrReferenceId) { - var action=_createMethodAction(this.context, this, "_GetObjectByReferenceId", 1, [bstrReferenceId]); + var action=_createMethodAction(this.context, this, "_GetObjectByReferenceId", 1, [bstrReferenceId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Workbook.prototype._GetObjectTypeNameByReferenceId=function (bstrReferenceId) { - var action=_createMethodAction(this.context, this, "_GetObjectTypeNameByReferenceId", 1, [bstrReferenceId]); + var action=_createMethodAction(this.context, this, "_GetObjectTypeNameByReferenceId", 1, [bstrReferenceId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Workbook.prototype._GetReferenceCount=function () { - var action=_createMethodAction(this.context, this, "_GetReferenceCount", 1, []); + var action=_createMethodAction(this.context, this, "_GetReferenceCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Workbook.prototype._RemoveAllReferences=function () { - _createMethodAction(this.context, this, "_RemoveAllReferences", 1, []); + _createMethodAction(this.context, this, "_RemoveAllReferences", 1, [], false); }; Workbook.prototype._RemoveReference=function (bstrReferenceId) { - _createMethodAction(this.context, this, "_RemoveReference", 1, [bstrReferenceId]); + _createMethodAction(this.context, this, "_RemoveReference", 1, [bstrReferenceId], false); }; Workbook.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12301,15 +14039,22 @@ var Excel; return; var obj=value; _fixObjectPathIfNecessary(this, obj); - _handleNavigationPropertyResults(this, obj, ["application", "Application", "bindings", "Bindings", "customXmlParts", "CustomXmlParts", "functions", "Functions", "names", "Names", "pivotTables", "PivotTables", "settings", "Settings", "tables", "Tables", "worksheets", "Worksheets", "_V1Api", "_V1Api"]); + _handleNavigationPropertyResults(this, obj, ["application", "Application", "bindings", "Bindings", "customXmlParts", "CustomXmlParts", "functions", "Functions", "internalTest", "InternalTest", "names", "Names", "pivotTables", "PivotTables", "settings", "Settings", "tables", "Tables", "worksheets", "Worksheets", "_V1Api", "_V1Api"]); }; Workbook.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Workbook.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Workbook.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; Object.defineProperty(Workbook.prototype, "onSelectionChanged", { get: function () { var _this=this; + _throwIfApiNotSupported("Workbook.onSelectionChanged", _defaultApiSetName, "1.3", _hostName); if (!this.m_selectionChanged) { this.m_selectionChanged=new OfficeExtension.EventHandlers(this.context, this, "SelectionChanged", { registerFunc: function (handlerCallback) { @@ -12329,15 +14074,28 @@ var Excel; configurable: true }); Workbook.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, { + "bindings": this._B, + "customXmlParts": this._C, + "names": this._N, + "pivotTables": this._P, + "settings": this._S, + "tables": this._T, + "worksheets": this._W, + }); + }; + Workbook.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Workbook; }(OfficeExtension.ClientObject)); Excel.Workbook=Workbook; + var _typeWorksheet="Worksheet"; var Worksheet=(function (_super) { __extends(Worksheet, _super); function Worksheet() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Worksheet.prototype, "_className", { get: function () { @@ -12346,42 +14104,66 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Worksheet.prototype, "_scalarPropertyNames", { + get: function () { + return ["name", "id", "position", "visibility"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Worksheet.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, false, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Worksheet.prototype, "_navigationPropertyNames", { + get: function () { + return ["charts", "tables", "protection", "pivotTables", "names"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(Worksheet.prototype, "charts", { get: function () { - if (!this.m_charts) { - this.m_charts=new Excel.ChartCollection(this.context, _createPropertyObjectPath(this.context, this, "Charts", true, false)); + if (!this._C) { + this._C=new Excel.ChartCollection(this.context, _createPropertyObjectPath(this.context, this, "Charts", true, false, false)); } - return this.m_charts; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Worksheet.prototype, "names", { get: function () { - if (!this.m_names) { - this.m_names=new Excel.NamedItemCollection(this.context, _createPropertyObjectPath(this.context, this, "Names", true, false)); + _throwIfApiNotSupported("Worksheet.names", _defaultApiSetName, "1.4", _hostName); + if (!this._Na) { + this._Na=new Excel.NamedItemCollection(this.context, _createPropertyObjectPath(this.context, this, "Names", true, false, false)); } - return this.m_names; + return this._Na; }, enumerable: true, configurable: true }); Object.defineProperty(Worksheet.prototype, "pivotTables", { get: function () { - if (!this.m_pivotTables) { - this.m_pivotTables=new Excel.PivotTableCollection(this.context, _createPropertyObjectPath(this.context, this, "PivotTables", true, false)); + _throwIfApiNotSupported("Worksheet.pivotTables", _defaultApiSetName, "1.3", _hostName); + if (!this._P) { + this._P=new Excel.PivotTableCollection(this.context, _createPropertyObjectPath(this.context, this, "PivotTables", true, false, false)); } - return this.m_pivotTables; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Worksheet.prototype, "protection", { get: function () { - if (!this.m_protection) { - this.m_protection=new Excel.WorksheetProtection(this.context, _createPropertyObjectPath(this.context, this, "Protection", false, false)); + _throwIfApiNotSupported("Worksheet.protection", _defaultApiSetName, "1.2", _hostName); + if (!this._Pr) { + this._Pr=new Excel.WorksheetProtection(this.context, _createPropertyObjectPath(this.context, this, "Protection", false, false, false)); } - return this.m_protection; + return this._Pr; }, enumerable: true, configurable: true @@ -12389,8 +14171,9 @@ var Excel; Object.defineProperty(Worksheet.prototype, "tables", { get: function () { if (!this.m_tables) { - this.m_tables=new Excel.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false)); + this.m_tables=new Excel.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false, false)); } + this.m_tables._ParentObject=this; return this.m_tables; }, enumerable: true, @@ -12398,19 +14181,19 @@ var Excel; }); Object.defineProperty(Worksheet.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Worksheet", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeWorksheet, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Worksheet.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "Worksheet", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeWorksheet, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -12418,11 +14201,11 @@ var Excel; }); Object.defineProperty(Worksheet.prototype, "position", { get: function () { - _throwIfNotLoaded("position", this.m_position, "Worksheet", this._isNull); - return this.m_position; + _throwIfNotLoaded("position", this._Po, _typeWorksheet, this._isNull); + return this._Po; }, set: function (value) { - this.m_position=value; + this._Po=value; _createSetPropertyAction(this.context, this, "Position", value); }, enumerable: true, @@ -12430,11 +14213,11 @@ var Excel; }); Object.defineProperty(Worksheet.prototype, "visibility", { get: function () { - _throwIfNotLoaded("visibility", this.m_visibility, "Worksheet", this._isNull); - return this.m_visibility; + _throwIfNotLoaded("visibility", this._V, _typeWorksheet, this._isNull); + return this._V; }, set: function (value) { - this.m_visibility=value; + this._V=value; _createSetPropertyAction(this.context, this, "Visibility", value); }, enumerable: true, @@ -12442,10 +14225,6 @@ var Excel; }); Worksheet.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["name", "position", "visibility"], [], [ - "charts", - "names", - "pivotTables", - "tables", "charts", "names", "pivotTables", @@ -12453,38 +14232,47 @@ var Excel; "tables" ]); }; + Worksheet.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; Worksheet.prototype.activate=function () { - _createMethodAction(this.context, this, "Activate", 1, []); + _createMethodAction(this.context, this, "Activate", 1, [], false); }; Worksheet.prototype.calculate=function (markAllDirty) { - _createMethodAction(this.context, this, "Calculate", 0, [markAllDirty]); + _throwIfApiNotSupported("Worksheet.calculate", _defaultApiSetName, "1.6", _hostName); + _createMethodAction(this.context, this, "Calculate", 0, [markAllDirty], false); }; Worksheet.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Worksheet.prototype.getCell=function (row, column) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [row, column], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [row, column], false, true, null, false)); }; Worksheet.prototype.getNext=function (visibleOnly) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [visibleOnly], false, true, null)); + _throwIfApiNotSupported("Worksheet.getNext", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [visibleOnly], false, true, "_GetSheetById", false)); }; Worksheet.prototype.getNextOrNullObject=function (visibleOnly) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [visibleOnly], false, true, null)); + _throwIfApiNotSupported("Worksheet.getNextOrNullObject", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [visibleOnly], false, true, "_GetSheetById", false)); }; Worksheet.prototype.getPrevious=function (visibleOnly) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetPrevious", 1, [visibleOnly], false, true, null)); + _throwIfApiNotSupported("Worksheet.getPrevious", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetPrevious", 1, [visibleOnly], false, true, "_GetSheetById", false)); }; Worksheet.prototype.getPreviousOrNullObject=function (visibleOnly) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetPreviousOrNullObject", 1, [visibleOnly], false, true, null)); + _throwIfApiNotSupported("Worksheet.getPreviousOrNullObject", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetPreviousOrNullObject", 1, [visibleOnly], false, true, "_GetSheetById", false)); }; Worksheet.prototype.getRange=function (address) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [address], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [address], false, true, null, false)); }; Worksheet.prototype.getUsedRange=function (valuesOnly) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRange", 1, [valuesOnly], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRange", 1, [valuesOnly], false, true, null, false)); }; Worksheet.prototype.getUsedRangeOrNullObject=function (valuesOnly) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRangeOrNullObject", 1, [valuesOnly], false, true, null)); + _throwIfApiNotSupported("Worksheet.getUsedRangeOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRangeOrNullObject", 1, [valuesOnly], false, true, null, false)); }; Worksheet.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12493,22 +14281,24 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Position"])) { - this.m_position=obj["Position"]; + this._Po=obj["Position"]; } if (!_isUndefined(obj["Visibility"])) { - this.m_visibility=obj["Visibility"]; + this._V=obj["Visibility"]; } _handleNavigationPropertyResults(this, obj, ["charts", "Charts", "names", "Names", "pivotTables", "PivotTables", "protection", "Protection", "tables", "Tables"]); }; Worksheet.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Worksheet.prototype.retrieve=function (option) { + return _retrieve(this, option); }; Worksheet.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -12516,25 +14306,39 @@ var Excel; return; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; + Worksheet.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; Worksheet.prototype.toJSON=function () { - return { - "id": this.m_id, - "name": this.m_name, - "position": this.m_position, - "protection": this.m_protection, - "visibility": this.m_visibility - }; + return _toJson(this, { + "id": this._I, + "name": this._N, + "position": this._Po, + "visibility": this._V, + }, { + "charts": this._C, + "names": this._Na, + "pivotTables": this._P, + "protection": this._Pr, + "tables": this.m_tables, + }); + }; + Worksheet.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Worksheet; }(OfficeExtension.ClientObject)); Excel.Worksheet=Worksheet; + var _typeWorksheetCollection="WorksheetCollection"; var WorksheetCollection=(function (_super) { __extends(WorksheetCollection, _super); function WorksheetCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(WorksheetCollection.prototype, "_className", { get: function () { @@ -12543,37 +14347,48 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(WorksheetCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(WorksheetCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "WorksheetCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeWorksheetCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); WorksheetCollection.prototype.add=function (name) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [name], false, true, null)); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [name], false, true, null, false)); }; WorksheetCollection.prototype.getActiveWorksheet=function () { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetActiveWorksheet", 1, [], false, false, null)); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetActiveWorksheet", 1, [], false, false, null, false)); }; WorksheetCollection.prototype.getCount=function (visibleOnly) { - var action=_createMethodAction(this.context, this, "GetCount", 1, [visibleOnly]); + _throwIfApiNotSupported("WorksheetCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [visibleOnly], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; WorksheetCollection.prototype.getFirst=function (visibleOnly) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [visibleOnly], false, true, null)); + _throwIfApiNotSupported("WorksheetCollection.getFirst", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [visibleOnly], false, true, null, false)); }; WorksheetCollection.prototype.getItem=function (key) { return new Excel.Worksheet(this.context, _createIndexerObjectPath(this.context, this, [key])); }; WorksheetCollection.prototype.getItemOrNullObject=function (key) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null)); + _throwIfApiNotSupported("WorksheetCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null, false)); }; WorksheetCollection.prototype.getLast=function (visibleOnly) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetLast", 1, [visibleOnly], false, true, null)); + _throwIfApiNotSupported("WorksheetCollection.getLast", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetLast", 1, [visibleOnly], false, true, null, false)); }; WorksheetCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12592,19 +14407,27 @@ var Excel; } }; WorksheetCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + WorksheetCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + WorksheetCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.Worksheet(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; WorksheetCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return WorksheetCollection; }(OfficeExtension.ClientObject)); Excel.WorksheetCollection=WorksheetCollection; + var _typeWorksheetProtection="WorksheetProtection"; var WorksheetProtection=(function (_super) { __extends(WorksheetProtection, _super); function WorksheetProtection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(WorksheetProtection.prototype, "_className", { get: function () { @@ -12613,27 +14436,38 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(WorksheetProtection.prototype, "_scalarPropertyNames", { + get: function () { + return ["protected", "options"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(WorksheetProtection.prototype, "options", { get: function () { - _throwIfNotLoaded("options", this.m_options, "WorksheetProtection", this._isNull); - return this.m_options; + _throwIfNotLoaded("options", this._O, _typeWorksheetProtection, this._isNull); + return this._O; }, enumerable: true, configurable: true }); Object.defineProperty(WorksheetProtection.prototype, "protected", { get: function () { - _throwIfNotLoaded("protected", this.m_protected, "WorksheetProtection", this._isNull); - return this.m_protected; + _throwIfNotLoaded("protected", this._P, _typeWorksheetProtection, this._isNull); + return this._P; }, enumerable: true, configurable: true }); - WorksheetProtection.prototype.protect=function (options) { - _createMethodAction(this.context, this, "Protect", 0, [options]); + WorksheetProtection.prototype.protect=function (options, password) { + if (versionNumberIsEarlierThan(16, 0, 8716)) { + _createMethodAction(this.context, this, "Protect", 0, [options], false); + return; + } + _createMethodAction(this.context, this, "Protect", 0, [options, password], false); }; - WorksheetProtection.prototype.unprotect=function () { - _createMethodAction(this.context, this, "Unprotect", 0, []); + WorksheetProtection.prototype.unprotect=function (password) { + _createMethodAction(this.context, this, "Unprotect", 0, [password], false); }; WorksheetProtection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12642,29 +14476,40 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Options"])) { - this.m_options=obj["Options"]; + this._O=obj["Options"]; } if (!_isUndefined(obj["Protected"])) { - this.m_protected=obj["Protected"]; + this._P=obj["Protected"]; } }; WorksheetProtection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + WorksheetProtection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + WorksheetProtection.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; WorksheetProtection.prototype.toJSON=function () { - return { - "options": this.m_options, - "protected": this.m_protected - }; + return _toJson(this, { + "options": this._O, + "protected": this._P, + }, {}); + }; + WorksheetProtection.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return WorksheetProtection; }(OfficeExtension.ClientObject)); Excel.WorksheetProtection=WorksheetProtection; + var _typeRange="Range"; var Range=(function (_super) { __extends(Range, _super); function Range() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Range.prototype, "_className", { get: function () { @@ -12673,9 +14518,30 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Range.prototype, "_scalarPropertyNames", { + get: function () { + return ["numberFormat", "values", "text", "formulas", "formulasLocal", "rowIndex", "columnIndex", "rowCount", "columnCount", "address", "addressLocal", "cellCount", "_ReferenceId", "valueTypes", "formulasR1C1", "hidden", "rowHidden", "columnHidden"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, false, true, true, false, false, false, false, false, false, false, false, false, true, false, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "_navigationPropertyNames", { + get: function () { + return ["format", "worksheet", "sort", "conditionalFormats"]; + }, + enumerable: true, + configurable: true + }); Range.prototype._ensureInteger=function (num, methodName) { if (!(typeof num==="number" && isFinite(num) && Math.floor(num)===num)) { - throw new OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, num, methodName); + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, num, methodName); } }; Range.prototype._getAdjacentRange=function (functionName, count, referenceRange, rowDirection, columnDirection) { @@ -12701,83 +14567,86 @@ var Excel; }; Object.defineProperty(Range.prototype, "conditionalFormats", { get: function () { - if (!this.m_conditionalFormats) { - this.m_conditionalFormats=new Excel.ConditionalFormatCollection(this.context, _createPropertyObjectPath(this.context, this, "ConditionalFormats", true, false)); + _throwIfApiNotSupported("Range.conditionalFormats", _defaultApiSetName, "1.6", _hostName); + if (!this._Con) { + this._Con=new Excel.ConditionalFormatCollection(this.context, _createPropertyObjectPath(this.context, this, "ConditionalFormats", true, false, false)); } - return this.m_conditionalFormats; + return this._Con; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.RangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.RangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "sort", { get: function () { - if (!this.m_sort) { - this.m_sort=new Excel.RangeSort(this.context, _createPropertyObjectPath(this.context, this, "Sort", false, false)); + _throwIfApiNotSupported("Range.sort", _defaultApiSetName, "1.2", _hostName); + if (!this._S) { + this._S=new Excel.RangeSort(this.context, _createPropertyObjectPath(this.context, this, "Sort", false, false, false)); } - return this.m_sort; + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "worksheet", { get: function () { - if (!this.m_worksheet) { - this.m_worksheet=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false)); + if (!this._W) { + this._W=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false, false)); } - return this.m_worksheet; + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "address", { get: function () { - _throwIfNotLoaded("address", this.m_address, "Range", this._isNull); - return this.m_address; + _throwIfNotLoaded("address", this._A, _typeRange, this._isNull); + return this._A; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "addressLocal", { get: function () { - _throwIfNotLoaded("addressLocal", this.m_addressLocal, "Range", this._isNull); - return this.m_addressLocal; + _throwIfNotLoaded("addressLocal", this._Ad, _typeRange, this._isNull); + return this._Ad; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "cellCount", { get: function () { - _throwIfNotLoaded("cellCount", this.m_cellCount, "Range", this._isNull); - return this.m_cellCount; + _throwIfNotLoaded("cellCount", this._C, _typeRange, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "columnCount", { get: function () { - _throwIfNotLoaded("columnCount", this.m_columnCount, "Range", this._isNull); - return this.m_columnCount; + _throwIfNotLoaded("columnCount", this._Co, _typeRange, this._isNull); + return this._Co; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "columnHidden", { get: function () { - _throwIfNotLoaded("columnHidden", this.m_columnHidden, "Range", this._isNull); - return this.m_columnHidden; + _throwIfNotLoaded("columnHidden", this._Col, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.columnHidden", _defaultApiSetName, "1.2", _hostName); + return this._Col; }, set: function (value) { - this.m_columnHidden=value; + this._Col=value; _createSetPropertyAction(this.context, this, "ColumnHidden", value); }, enumerable: true, @@ -12785,15 +14654,15 @@ var Excel; }); Object.defineProperty(Range.prototype, "columnIndex", { get: function () { - _throwIfNotLoaded("columnIndex", this.m_columnIndex, "Range", this._isNull); - return this.m_columnIndex; + _throwIfNotLoaded("columnIndex", this._Colu, _typeRange, this._isNull); + return this._Colu; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "formulas", { get: function () { - _throwIfNotLoaded("formulas", this.m_formulas, "Range", this._isNull); + _throwIfNotLoaded("formulas", this.m_formulas, _typeRange, this._isNull); return this.m_formulas; }, set: function (value) { @@ -12809,7 +14678,7 @@ var Excel; }); Object.defineProperty(Range.prototype, "formulasLocal", { get: function () { - _throwIfNotLoaded("formulasLocal", this.m_formulasLocal, "Range", this._isNull); + _throwIfNotLoaded("formulasLocal", this.m_formulasLocal, _typeRange, this._isNull); return this.m_formulasLocal; }, set: function (value) { @@ -12825,7 +14694,8 @@ var Excel; }); Object.defineProperty(Range.prototype, "formulasR1C1", { get: function () { - _throwIfNotLoaded("formulasR1C1", this.m_formulasR1C1, "Range", this._isNull); + _throwIfNotLoaded("formulasR1C1", this.m_formulasR1C1, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.formulasR1C1", _defaultApiSetName, "1.2", _hostName); return this.m_formulasR1C1; }, set: function (value) { @@ -12841,15 +14711,16 @@ var Excel; }); Object.defineProperty(Range.prototype, "hidden", { get: function () { - _throwIfNotLoaded("hidden", this.m_hidden, "Range", this._isNull); - return this.m_hidden; + _throwIfNotLoaded("hidden", this._H, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.hidden", _defaultApiSetName, "1.2", _hostName); + return this._H; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "numberFormat", { get: function () { - _throwIfNotLoaded("numberFormat", this.m_numberFormat, "Range", this._isNull); + _throwIfNotLoaded("numberFormat", this.m_numberFormat, _typeRange, this._isNull); return this.m_numberFormat; }, set: function (value) { @@ -12865,19 +14736,20 @@ var Excel; }); Object.defineProperty(Range.prototype, "rowCount", { get: function () { - _throwIfNotLoaded("rowCount", this.m_rowCount, "Range", this._isNull); - return this.m_rowCount; + _throwIfNotLoaded("rowCount", this._R, _typeRange, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "rowHidden", { get: function () { - _throwIfNotLoaded("rowHidden", this.m_rowHidden, "Range", this._isNull); - return this.m_rowHidden; + _throwIfNotLoaded("rowHidden", this._Ro, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.rowHidden", _defaultApiSetName, "1.2", _hostName); + return this._Ro; }, set: function (value) { - this.m_rowHidden=value; + this._Ro=value; _createSetPropertyAction(this.context, this, "RowHidden", value); }, enumerable: true, @@ -12885,31 +14757,31 @@ var Excel; }); Object.defineProperty(Range.prototype, "rowIndex", { get: function () { - _throwIfNotLoaded("rowIndex", this.m_rowIndex, "Range", this._isNull); - return this.m_rowIndex; + _throwIfNotLoaded("rowIndex", this._Row, _typeRange, this._isNull); + return this._Row; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "Range", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._T, _typeRange, this._isNull); + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "valueTypes", { get: function () { - _throwIfNotLoaded("valueTypes", this.m_valueTypes, "Range", this._isNull); - return this.m_valueTypes; + _throwIfNotLoaded("valueTypes", this._V, _typeRange, this._isNull); + return this._V; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "values", { get: function () { - _throwIfNotLoaded("values", this.m_values, "Range", this._isNull); + _throwIfNotLoaded("values", this.m_values, _typeRange, this._isNull); return this.m_values; }, set: function (value) { @@ -12925,39 +14797,40 @@ var Excel; }); Object.defineProperty(Range.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Range", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeRange, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Range.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["numberFormat", "values", "formulas", "formulasLocal", "formulasR1C1", "rowHidden", "columnHidden"], ["format"], [ - "conditionalFormats", - "sort", - "worksheet", "conditionalFormats", "sort", "worksheet" ]); }; + Range.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; Range.prototype.calculate=function () { - _createMethodAction(this.context, this, "Calculate", 0, []); + _throwIfApiNotSupported("Range.calculate", _defaultApiSetName, "1.6", _hostName); + _createMethodAction(this.context, this, "Calculate", 0, [], false); }; Range.prototype.clear=function (applyTo) { - _createMethodAction(this.context, this, "Clear", 0, [applyTo]); + _createMethodAction(this.context, this, "Clear", 0, [applyTo], false); }; Range.prototype.delete=function (shift) { - _createMethodAction(this.context, this, "Delete", 0, [shift]); + _createMethodAction(this.context, this, "Delete", 0, [shift], false); }; Range.prototype.getBoundingRect=function (anotherRange) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetBoundingRect", 1, [anotherRange], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetBoundingRect", 1, [anotherRange], false, true, null, false)); }; Range.prototype.getCell=function (row, column) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [row, column], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [row, column], false, true, null, false)); }; Range.prototype.getColumn=function (column) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumn", 1, [column], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumn", 1, [column], false, true, null, false)); }; Range.prototype.getColumnsAfter=function (count) { if (!isExcel1_3OrAbove()) { @@ -12966,11 +14839,12 @@ var Excel; } this._ensureInteger(count, "RowsAbove"); if (count==0) { - throw new OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); } return this._getAdjacentRange("getColumnsAfter", count, this.getLastColumn(), 0, 1); } - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumnsAfter", 1, [count], false, true, null)); + _throwIfApiNotSupported("Range.getColumnsAfter", _defaultApiSetName, "1.3", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumnsAfter", 1, [count], false, true, null, false)); }; Range.prototype.getColumnsBefore=function (count) { if (!isExcel1_3OrAbove()) { @@ -12979,35 +14853,37 @@ var Excel; } this._ensureInteger(count, "RowsAbove"); if (count==0) { - throw new OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); } return this._getAdjacentRange("getColumnsBefore", count, this.getColumn(0), 0, -1); } - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumnsBefore", 1, [count], false, true, null)); + _throwIfApiNotSupported("Range.getColumnsBefore", _defaultApiSetName, "1.3", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumnsBefore", 1, [count], false, true, null, false)); }; Range.prototype.getEntireColumn=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetEntireColumn", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetEntireColumn", 1, [], false, true, null, false)); }; Range.prototype.getEntireRow=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetEntireRow", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetEntireRow", 1, [], false, true, null, false)); }; Range.prototype.getIntersection=function (anotherRange) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetIntersection", 1, [anotherRange], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetIntersection", 1, [anotherRange], false, true, null, false)); }; Range.prototype.getIntersectionOrNullObject=function (anotherRange) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetIntersectionOrNullObject", 1, [anotherRange], false, true, null)); + _throwIfApiNotSupported("Range.getIntersectionOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetIntersectionOrNullObject", 1, [anotherRange], false, true, null, false)); }; Range.prototype.getLastCell=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastCell", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastCell", 1, [], false, true, null, false)); }; Range.prototype.getLastColumn=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastColumn", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastColumn", 1, [], false, true, null, false)); }; Range.prototype.getLastRow=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastRow", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastRow", 1, [], false, true, null, false)); }; Range.prototype.getOffsetRange=function (rowOffset, columnOffset) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetOffsetRange", 1, [rowOffset, columnOffset], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetOffsetRange", 1, [rowOffset, columnOffset], false, true, null, false)); }; Range.prototype.getResizedRange=function (deltaRows, deltaColumns) { if (!isExcel1_3OrAbove()) { @@ -13016,10 +14892,11 @@ var Excel; var referenceRange=(deltaRows >=0 && deltaColumns >=0) ? this : this.getCell(0, 0); return referenceRange.getBoundingRect(this.getLastCell().getOffsetRange(deltaRows, deltaColumns)); } - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetResizedRange", 1, [deltaRows, deltaColumns], false, true, null)); + _throwIfApiNotSupported("Range.getResizedRange", _defaultApiSetName, "1.3", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetResizedRange", 1, [deltaRows, deltaColumns], false, true, null, false)); }; Range.prototype.getRow=function (row) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRow", 1, [row], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRow", 1, [row], false, true, null, false)); }; Range.prototype.getRowsAbove=function (count) { if (!isExcel1_3OrAbove()) { @@ -13028,11 +14905,12 @@ var Excel; } this._ensureInteger(count, "RowsAbove"); if (count==0) { - throw new OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); } return this._getAdjacentRange("getRowsAbove", count, this.getRow(0), -1, 0); } - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRowsAbove", 1, [count], false, true, null)); + _throwIfApiNotSupported("Range.getRowsAbove", _defaultApiSetName, "1.3", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRowsAbove", 1, [count], false, true, null, false)); }; Range.prototype.getRowsBelow=function (count) { if (!isExcel1_3OrAbove()) { @@ -13041,38 +14919,44 @@ var Excel; } this._ensureInteger(count, "RowsAbove"); if (count==0) { - throw new OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); } return this._getAdjacentRange("getRowsBelow", count, this.getLastRow(), 1, 0); } - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRowsBelow", 1, [count], false, true, null)); + _throwIfApiNotSupported("Range.getRowsBelow", _defaultApiSetName, "1.3", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRowsBelow", 1, [count], false, true, null, false)); }; Range.prototype.getUsedRange=function (valuesOnly) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRange", 1, [valuesOnly], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRange", 1, [valuesOnly], false, true, null, false)); }; Range.prototype.getUsedRangeOrNullObject=function (valuesOnly) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRangeOrNullObject", 1, [valuesOnly], false, true, null)); + _throwIfApiNotSupported("Range.getUsedRangeOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRangeOrNullObject", 1, [valuesOnly], false, true, null, false)); }; Range.prototype.getVisibleView=function () { - return new Excel.RangeView(this.context, _createMethodObjectPath(this.context, this, "GetVisibleView", 1, [], false, false, null)); + _throwIfApiNotSupported("Range.getVisibleView", _defaultApiSetName, "1.3", _hostName); + return new Excel.RangeView(this.context, _createMethodObjectPath(this.context, this, "GetVisibleView", 1, [], false, false, null, false)); }; Range.prototype.insert=function (shift) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "Insert", 0, [shift], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "Insert", 0, [shift], false, true, null, false)); }; Range.prototype.merge=function (across) { - _createMethodAction(this.context, this, "Merge", 0, [across]); + _throwIfApiNotSupported("Range.merge", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "Merge", 0, [across], false); }; Range.prototype.select=function () { - _createMethodAction(this.context, this, "Select", 1, []); + _createMethodAction(this.context, this, "Select", 1, [], false); }; Range.prototype.unmerge=function () { - _createMethodAction(this.context, this, "Unmerge", 0, []); + _throwIfApiNotSupported("Range.unmerge", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "Unmerge", 0, [], false); }; Range.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Range.prototype._ValidateArraySize=function (rows, columns) { - _createMethodAction(this.context, this, "_ValidateArraySize", 1, [rows, columns]); + _throwIfApiNotSupported("Range._ValidateArraySize", _defaultApiSetName, "1.3", _hostName); + _createMethodAction(this.context, this, "_ValidateArraySize", 1, [rows, columns], false); }; Range.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13081,22 +14965,22 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Address"])) { - this.m_address=obj["Address"]; + this._A=obj["Address"]; } if (!_isUndefined(obj["AddressLocal"])) { - this.m_addressLocal=obj["AddressLocal"]; + this._Ad=obj["AddressLocal"]; } if (!_isUndefined(obj["CellCount"])) { - this.m_cellCount=obj["CellCount"]; + this._C=obj["CellCount"]; } if (!_isUndefined(obj["ColumnCount"])) { - this.m_columnCount=obj["ColumnCount"]; + this._Co=obj["ColumnCount"]; } if (!_isUndefined(obj["ColumnHidden"])) { - this.m_columnHidden=obj["ColumnHidden"]; + this._Col=obj["ColumnHidden"]; } if (!_isUndefined(obj["ColumnIndex"])) { - this.m_columnIndex=obj["ColumnIndex"]; + this._Colu=obj["ColumnIndex"]; } if (!_isUndefined(obj["Formulas"])) { this.m_formulas=obj["Formulas"]; @@ -13108,37 +14992,39 @@ var Excel; this.m_formulasR1C1=obj["FormulasR1C1"]; } if (!_isUndefined(obj["Hidden"])) { - this.m_hidden=obj["Hidden"]; + this._H=obj["Hidden"]; } if (!_isUndefined(obj["NumberFormat"])) { this.m_numberFormat=obj["NumberFormat"]; } if (!_isUndefined(obj["RowCount"])) { - this.m_rowCount=obj["RowCount"]; + this._R=obj["RowCount"]; } if (!_isUndefined(obj["RowHidden"])) { - this.m_rowHidden=obj["RowHidden"]; + this._Ro=obj["RowHidden"]; } if (!_isUndefined(obj["RowIndex"])) { - this.m_rowIndex=obj["RowIndex"]; + this._Row=obj["RowIndex"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._T=obj["Text"]; } if (!_isUndefined(obj["ValueTypes"])) { - this.m_valueTypes=obj["ValueTypes"]; + this._V=obj["ValueTypes"]; } if (!_isUndefined(obj["Values"])) { this.m_values=obj["Values"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["conditionalFormats", "ConditionalFormats", "format", "Format", "sort", "Sort", "worksheet", "Worksheet"]); }; Range.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Range.prototype.retrieve=function (option) { + return _retrieve(this, option); }; Range.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -13146,9 +15032,13 @@ var Excel; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; + Range.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; Range.prototype.track=function () { this.context.trackedObjects.add(this); return this; @@ -13158,34 +15048,41 @@ var Excel; return this; }; Range.prototype.toJSON=function () { - return { - "address": this.m_address, - "addressLocal": this.m_addressLocal, - "cellCount": this.m_cellCount, - "columnCount": this.m_columnCount, - "columnHidden": this.m_columnHidden, - "columnIndex": this.m_columnIndex, - "format": this.m_format, + return _toJson(this, { + "address": this._A, + "addressLocal": this._Ad, + "cellCount": this._C, + "columnCount": this._Co, + "columnHidden": this._Col, + "columnIndex": this._Colu, "formulas": this.m_formulas, "formulasLocal": this.m_formulasLocal, "formulasR1C1": this.m_formulasR1C1, - "hidden": this.m_hidden, + "hidden": this._H, "numberFormat": this.m_numberFormat, - "rowCount": this.m_rowCount, - "rowHidden": this.m_rowHidden, - "rowIndex": this.m_rowIndex, - "text": this.m_text, + "rowCount": this._R, + "rowHidden": this._Ro, + "rowIndex": this._Row, + "text": this._T, "values": this.m_values, - "valueTypes": this.m_valueTypes - }; + "valueTypes": this._V, + }, { + "conditionalFormats": this._Con, + "format": this._F, + }); + }; + Range.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Range; }(OfficeExtension.ClientObject)); Excel.Range=Range; + var _typeRangeView="RangeView"; var RangeView=(function (_super) { __extends(RangeView, _super); function RangeView() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeView.prototype, "_className", { get: function () { @@ -13194,39 +15091,60 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeView.prototype, "_scalarPropertyNames", { + get: function () { + return ["numberFormat", "values", "text", "formulas", "formulasLocal", "formulasR1C1", "valueTypes", "rowCount", "columnCount", "cellAddresses", "index"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeView.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, false, true, true, true, false, false, false, false, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeView.prototype, "_navigationPropertyNames", { + get: function () { + return ["rows"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeView.prototype, "rows", { get: function () { - if (!this.m_rows) { - this.m_rows=new Excel.RangeViewCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false)); + if (!this._Ro) { + this._Ro=new Excel.RangeViewCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false, false)); } - return this.m_rows; + return this._Ro; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "cellAddresses", { get: function () { - _throwIfNotLoaded("cellAddresses", this.m_cellAddresses, "RangeView", this._isNull); - return this.m_cellAddresses; + _throwIfNotLoaded("cellAddresses", this._C, _typeRangeView, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "columnCount", { get: function () { - _throwIfNotLoaded("columnCount", this.m_columnCount, "RangeView", this._isNull); - return this.m_columnCount; + _throwIfNotLoaded("columnCount", this._Co, _typeRangeView, this._isNull); + return this._Co; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "formulas", { get: function () { - _throwIfNotLoaded("formulas", this.m_formulas, "RangeView", this._isNull); - return this.m_formulas; + _throwIfNotLoaded("formulas", this._F, _typeRangeView, this._isNull); + return this._F; }, set: function (value) { - this.m_formulas=value; + this._F=value; _createSetPropertyAction(this.context, this, "Formulas", value); }, enumerable: true, @@ -13234,11 +15152,11 @@ var Excel; }); Object.defineProperty(RangeView.prototype, "formulasLocal", { get: function () { - _throwIfNotLoaded("formulasLocal", this.m_formulasLocal, "RangeView", this._isNull); - return this.m_formulasLocal; + _throwIfNotLoaded("formulasLocal", this._Fo, _typeRangeView, this._isNull); + return this._Fo; }, set: function (value) { - this.m_formulasLocal=value; + this._Fo=value; _createSetPropertyAction(this.context, this, "FormulasLocal", value); }, enumerable: true, @@ -13246,11 +15164,11 @@ var Excel; }); Object.defineProperty(RangeView.prototype, "formulasR1C1", { get: function () { - _throwIfNotLoaded("formulasR1C1", this.m_formulasR1C1, "RangeView", this._isNull); - return this.m_formulasR1C1; + _throwIfNotLoaded("formulasR1C1", this._For, _typeRangeView, this._isNull); + return this._For; }, set: function (value) { - this.m_formulasR1C1=value; + this._For=value; _createSetPropertyAction(this.context, this, "FormulasR1C1", value); }, enumerable: true, @@ -13258,19 +15176,19 @@ var Excel; }); Object.defineProperty(RangeView.prototype, "index", { get: function () { - _throwIfNotLoaded("index", this.m_index, "RangeView", this._isNull); - return this.m_index; + _throwIfNotLoaded("index", this._I, _typeRangeView, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "numberFormat", { get: function () { - _throwIfNotLoaded("numberFormat", this.m_numberFormat, "RangeView", this._isNull); - return this.m_numberFormat; + _throwIfNotLoaded("numberFormat", this._N, _typeRangeView, this._isNull); + return this._N; }, set: function (value) { - this.m_numberFormat=value; + this._N=value; _createSetPropertyAction(this.context, this, "NumberFormat", value); }, enumerable: true, @@ -13278,35 +15196,35 @@ var Excel; }); Object.defineProperty(RangeView.prototype, "rowCount", { get: function () { - _throwIfNotLoaded("rowCount", this.m_rowCount, "RangeView", this._isNull); - return this.m_rowCount; + _throwIfNotLoaded("rowCount", this._R, _typeRangeView, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "RangeView", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._T, _typeRangeView, this._isNull); + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "valueTypes", { get: function () { - _throwIfNotLoaded("valueTypes", this.m_valueTypes, "RangeView", this._isNull); - return this.m_valueTypes; + _throwIfNotLoaded("valueTypes", this._Va, _typeRangeView, this._isNull); + return this._Va; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "values", { get: function () { - _throwIfNotLoaded("values", this.m_values, "RangeView", this._isNull); - return this.m_values; + _throwIfNotLoaded("values", this._V, _typeRangeView, this._isNull); + return this._V; }, set: function (value) { - this.m_values=value; + this._V=value; _createSetPropertyAction(this.context, this, "Values", value); }, enumerable: true, @@ -13314,12 +15232,14 @@ var Excel; }); RangeView.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["numberFormat", "values", "formulas", "formulasLocal", "formulasR1C1"], [], [ - "rows", "rows" ]); }; + RangeView.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; RangeView.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); }; RangeView.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13328,66 +15248,79 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["CellAddresses"])) { - this.m_cellAddresses=obj["CellAddresses"]; + this._C=obj["CellAddresses"]; } if (!_isUndefined(obj["ColumnCount"])) { - this.m_columnCount=obj["ColumnCount"]; + this._Co=obj["ColumnCount"]; } if (!_isUndefined(obj["Formulas"])) { - this.m_formulas=obj["Formulas"]; + this._F=obj["Formulas"]; } if (!_isUndefined(obj["FormulasLocal"])) { - this.m_formulasLocal=obj["FormulasLocal"]; + this._Fo=obj["FormulasLocal"]; } if (!_isUndefined(obj["FormulasR1C1"])) { - this.m_formulasR1C1=obj["FormulasR1C1"]; + this._For=obj["FormulasR1C1"]; } if (!_isUndefined(obj["Index"])) { - this.m_index=obj["Index"]; + this._I=obj["Index"]; } if (!_isUndefined(obj["NumberFormat"])) { - this.m_numberFormat=obj["NumberFormat"]; + this._N=obj["NumberFormat"]; } if (!_isUndefined(obj["RowCount"])) { - this.m_rowCount=obj["RowCount"]; + this._R=obj["RowCount"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._T=obj["Text"]; } if (!_isUndefined(obj["ValueTypes"])) { - this.m_valueTypes=obj["ValueTypes"]; + this._Va=obj["ValueTypes"]; } if (!_isUndefined(obj["Values"])) { - this.m_values=obj["Values"]; + this._V=obj["Values"]; } _handleNavigationPropertyResults(this, obj, ["rows", "Rows"]); }; RangeView.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeView.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeView.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; RangeView.prototype.toJSON=function () { - return { - "cellAddresses": this.m_cellAddresses, - "columnCount": this.m_columnCount, - "formulas": this.m_formulas, - "formulasLocal": this.m_formulasLocal, - "formulasR1C1": this.m_formulasR1C1, - "index": this.m_index, - "numberFormat": this.m_numberFormat, - "rowCount": this.m_rowCount, - "text": this.m_text, - "values": this.m_values, - "valueTypes": this.m_valueTypes - }; + return _toJson(this, { + "cellAddresses": this._C, + "columnCount": this._Co, + "formulas": this._F, + "formulasLocal": this._Fo, + "formulasR1C1": this._For, + "index": this._I, + "numberFormat": this._N, + "rowCount": this._R, + "text": this._T, + "values": this._V, + "valueTypes": this._Va, + }, { + "rows": this._Ro, + }); + }; + RangeView.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return RangeView; }(OfficeExtension.ClientObject)); Excel.RangeView=RangeView; + var _typeRangeViewCollection="RangeViewCollection"; var RangeViewCollection=(function (_super) { __extends(RangeViewCollection, _super); function RangeViewCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeViewCollection.prototype, "_className", { get: function () { @@ -13396,22 +15329,30 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeViewCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeViewCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "RangeViewCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeRangeViewCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); RangeViewCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("RangeViewCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; RangeViewCollection.prototype.getItemAt=function (index) { - return new Excel.RangeView(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.RangeView(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; RangeViewCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13430,19 +15371,27 @@ var Excel; } }; RangeViewCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeViewCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeViewCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.RangeView(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(false, _this.context, _this, childItemData, index)); }); }; RangeViewCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return RangeViewCollection; }(OfficeExtension.ClientObject)); Excel.RangeViewCollection=RangeViewCollection; + var _typeSettingCollection="SettingCollection"; var SettingCollection=(function (_super) { __extends(SettingCollection, _super); function SettingCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(SettingCollection.prototype, "_className", { get: function () { @@ -13451,9 +15400,16 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(SettingCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(SettingCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "SettingCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeSettingCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -13461,10 +15417,10 @@ var Excel; }); SettingCollection.prototype.add=function (key, value) { value=Setting._replaceDateWithStringDate(value); - return new Excel.Setting(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [key, value], false, true, null)); + return new Excel.Setting(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [key, value], false, true, null, false)); }; SettingCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -13473,7 +15429,7 @@ var Excel; return new Excel.Setting(this.context, _createIndexerObjectPath(this.context, this, [key])); }; SettingCollection.prototype.getItemOrNullObject=function (key) { - return new Excel.Setting(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null)); + return new Excel.Setting(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null, false)); }; SettingCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13492,8 +15448,15 @@ var Excel; } }; SettingCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + SettingCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + SettingCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.Setting(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; Object.defineProperty(SettingCollection.prototype, "onSettingsChanged", { get: function () { @@ -13517,15 +15480,16 @@ var Excel; configurable: true }); SettingCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return SettingCollection; }(OfficeExtension.ClientObject)); Excel.SettingCollection=SettingCollection; + var _typeSetting="Setting"; var Setting=(function (_super) { __extends(Setting, _super); function Setting() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Setting.prototype, "_className", { get: function () { @@ -13534,6 +15498,20 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Setting.prototype, "_scalarPropertyNames", { + get: function () { + return ["key", "value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Setting.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true]; + }, + enumerable: true, + configurable: true + }); Setting.replaceStringDateWithDate=function (value) { var strValue=JSON.stringify(value); value=JSON.parse(strValue, function dateReviver(k, v) { @@ -13557,15 +15535,15 @@ var Excel; }; Object.defineProperty(Setting.prototype, "key", { get: function () { - _throwIfNotLoaded("key", this.m_key, "Setting", this._isNull); - return this.m_key; + _throwIfNotLoaded("key", this._K, _typeSetting, this._isNull); + return this._K; }, enumerable: true, configurable: true }); Object.defineProperty(Setting.prototype, "value", { get: function () { - _throwIfNotLoaded("value", this.m_value, "Setting", this._isNull); + _throwIfNotLoaded("value", this.m_value, _typeSetting, this._isNull); return this.m_value; }, set: function (value) { @@ -13584,8 +15562,11 @@ var Excel; Setting.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["value"], [], []); }; + Setting.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; Setting.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Setting.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13594,7 +15575,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Key"])) { - this.m_key=obj["Key"]; + this._K=obj["Key"]; } if (!_isUndefined(obj["Value"])) { this.m_value=obj["Value"]; @@ -13602,24 +15583,35 @@ var Excel; } }; Setting.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Setting.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Setting.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; Setting.prototype.toJSON=function () { - return { - "key": this.m_key, - "value": this.m_value - }; + return _toJson(this, { + "key": this._K, + "value": this.m_value, + }, {}); + }; + Setting.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; - Setting.DateJSONPrefix="Date("; - Setting.DateJSONSuffix=")"; return Setting; }(OfficeExtension.ClientObject)); + Setting.DateJSONPrefix="Date("; + Setting.DateJSONSuffix=")"; Excel.Setting=Setting; + var _typeNamedItemCollection="NamedItemCollection"; var NamedItemCollection=(function (_super) { __extends(NamedItemCollection, _super); function NamedItemCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(NamedItemCollection.prototype, "_className", { get: function () { @@ -13628,22 +15620,32 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(NamedItemCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(NamedItemCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "NamedItemCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeNamedItemCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); NamedItemCollection.prototype.add=function (name, reference, comment) { - return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [name, reference, comment], false, true, null)); + _throwIfApiNotSupported("NamedItemCollection.add", _defaultApiSetName, "1.4", _hostName); + return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [name, reference, comment], false, true, null, false)); }; NamedItemCollection.prototype.addFormulaLocal=function (name, formula, comment) { - return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "AddFormulaLocal", 0, [name, formula, comment], false, false, null)); + _throwIfApiNotSupported("NamedItemCollection.addFormulaLocal", _defaultApiSetName, "1.4", _hostName); + return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "AddFormulaLocal", 0, [name, formula, comment], false, false, null, false)); }; NamedItemCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("NamedItemCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -13652,7 +15654,8 @@ var Excel; return new Excel.NamedItem(this.context, _createIndexerObjectPath(this.context, this, [name])); }; NamedItemCollection.prototype.getItemOrNullObject=function (name) { - return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null)); + _throwIfApiNotSupported("NamedItemCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null, false)); }; NamedItemCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13671,19 +15674,27 @@ var Excel; } }; NamedItemCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + NamedItemCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + NamedItemCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.NamedItem(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; NamedItemCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return NamedItemCollection; }(OfficeExtension.ClientObject)); Excel.NamedItemCollection=NamedItemCollection; + var _typeNamedItem="NamedItem"; var NamedItem=(function (_super) { __extends(NamedItem, _super); function NamedItem() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(NamedItem.prototype, "_className", { get: function () { @@ -13692,33 +15703,57 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(NamedItem.prototype, "_scalarPropertyNames", { + get: function () { + return ["name", "type", "value", "visible", "_Id", "comment", "scope"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NamedItem.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, false, false, true, false, true, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NamedItem.prototype, "_navigationPropertyNames", { + get: function () { + return ["worksheet", "worksheetOrNullObject"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(NamedItem.prototype, "worksheet", { get: function () { - if (!this.m_worksheet) { - this.m_worksheet=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false)); + _throwIfApiNotSupported("NamedItem.worksheet", _defaultApiSetName, "1.4", _hostName); + if (!this._W) { + this._W=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false, false)); } - return this.m_worksheet; + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(NamedItem.prototype, "worksheetOrNullObject", { get: function () { - if (!this.m_worksheetOrNullObject) { - this.m_worksheetOrNullObject=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "WorksheetOrNullObject", false, false)); + _throwIfApiNotSupported("NamedItem.worksheetOrNullObject", _defaultApiSetName, "1.4", _hostName); + if (!this._Wo) { + this._Wo=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "WorksheetOrNullObject", false, false, false)); } - return this.m_worksheetOrNullObject; + return this._Wo; }, enumerable: true, configurable: true }); Object.defineProperty(NamedItem.prototype, "comment", { get: function () { - _throwIfNotLoaded("comment", this.m_comment, "NamedItem", this._isNull); - return this.m_comment; + _throwIfNotLoaded("comment", this._C, _typeNamedItem, this._isNull); + _throwIfApiNotSupported("NamedItem.comment", _defaultApiSetName, "1.4", _hostName); + return this._C; }, set: function (value) { - this.m_comment=value; + this._C=value; _createSetPropertyAction(this.context, this, "Comment", value); }, enumerable: true, @@ -13726,43 +15761,44 @@ var Excel; }); Object.defineProperty(NamedItem.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "NamedItem", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeNamedItem, this._isNull); + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(NamedItem.prototype, "scope", { get: function () { - _throwIfNotLoaded("scope", this.m_scope, "NamedItem", this._isNull); - return this.m_scope; + _throwIfNotLoaded("scope", this._S, _typeNamedItem, this._isNull); + _throwIfApiNotSupported("NamedItem.scope", _defaultApiSetName, "1.4", _hostName); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(NamedItem.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "NamedItem", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._T, _typeNamedItem, this._isNull); + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(NamedItem.prototype, "value", { get: function () { - _throwIfNotLoaded("value", this.m_value, "NamedItem", this._isNull); - return this.m_value; + _throwIfNotLoaded("value", this._V, _typeNamedItem, this._isNull); + return this._V; }, enumerable: true, configurable: true }); Object.defineProperty(NamedItem.prototype, "visible", { get: function () { - _throwIfNotLoaded("visible", this.m_visible, "NamedItem", this._isNull); - return this.m_visible; + _throwIfNotLoaded("visible", this._Vi, _typeNamedItem, this._isNull); + return this._Vi; }, set: function (value) { - this.m_visible=value; + this._Vi=value; _createSetPropertyAction(this.context, this, "Visible", value); }, enumerable: true, @@ -13770,28 +15806,31 @@ var Excel; }); Object.defineProperty(NamedItem.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "NamedItem", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeNamedItem, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); NamedItem.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["visible", "comment"], [], [ - "worksheet", - "worksheetOrNullObject", "worksheet", "worksheetOrNullObject" ]); }; + NamedItem.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; NamedItem.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _throwIfApiNotSupported("NamedItem.delete", _defaultApiSetName, "1.4", _hostName); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; NamedItem.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); }; NamedItem.prototype.getRangeOrNullObject=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRangeOrNullObject", 1, [], false, true, null)); + _throwIfApiNotSupported("NamedItem.getRangeOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRangeOrNullObject", 1, [], false, true, null, false)); }; NamedItem.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13800,31 +15839,33 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Comment"])) { - this.m_comment=obj["Comment"]; + this._C=obj["Comment"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Scope"])) { - this.m_scope=obj["Scope"]; + this._S=obj["Scope"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._T=obj["Type"]; } if (!_isUndefined(obj["Value"])) { - this.m_value=obj["Value"]; + this._V=obj["Value"]; } if (!_isUndefined(obj["Visible"])) { - this.m_visible=obj["Visible"]; + this._Vi=obj["Visible"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } _handleNavigationPropertyResults(this, obj, ["worksheet", "Worksheet", "worksheetOrNullObject", "WorksheetOrNullObject"]); }; NamedItem.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + NamedItem.prototype.retrieve=function (option) { + return _retrieve(this, option); }; NamedItem.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -13832,26 +15873,35 @@ var Excel; return; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; + NamedItem.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; NamedItem.prototype.toJSON=function () { - return { - "comment": this.m_comment, - "name": this.m_name, - "scope": this.m_scope, - "type": this.m_type, - "value": this.m_value, - "visible": this.m_visible - }; + return _toJson(this, { + "comment": this._C, + "name": this._N, + "scope": this._S, + "type": this._T, + "value": this._V, + "visible": this._Vi, + }, {}); + }; + NamedItem.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return NamedItem; }(OfficeExtension.ClientObject)); Excel.NamedItem=NamedItem; + var _typeBinding="Binding"; var Binding=(function (_super) { __extends(Binding, _super); function Binding() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Binding.prototype, "_className", { get: function () { @@ -13860,33 +15910,41 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Binding.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "type"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(Binding.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Binding", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeBinding, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Binding.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "Binding", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._T, _typeBinding, this._isNull); + return this._T; }, enumerable: true, configurable: true }); Binding.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _throwIfApiNotSupported("Binding.delete", _defaultApiSetName, "1.3", _hostName); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Binding.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, false, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, false, null, false)); }; Binding.prototype.getTable=function () { - return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetTable", 1, [], false, false, null)); + return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetTable", 1, [], false, false, null, false)); }; Binding.prototype.getText=function () { - var action=_createMethodAction(this.context, this, "GetText", 1, []); + var action=_createMethodAction(this.context, this, "GetText", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -13898,15 +15956,17 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._T=obj["Type"]; } }; Binding.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Binding.prototype.retrieve=function (option) { + return _retrieve(this, option); }; Binding.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -13914,12 +15974,17 @@ var Excel; return; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; + Binding.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; Object.defineProperty(Binding.prototype, "onDataChanged", { get: function () { var _this=this; + _throwIfApiNotSupported("Binding.onDataChanged", _defaultApiSetName, "1.3", _hostName); if (!this.m_dataChanged) { this.m_dataChanged=new OfficeExtension.EventHandlers(this.context, this, "DataChanged", { registerFunc: function (handlerCallback) { @@ -13944,6 +16009,7 @@ var Excel; Object.defineProperty(Binding.prototype, "onSelectionChanged", { get: function () { var _this=this; + _throwIfApiNotSupported("Binding.onSelectionChanged", _defaultApiSetName, "1.3", _hostName); if (!this.m_selectionChanged) { this.m_selectionChanged=new OfficeExtension.EventHandlers(this.context, this, "SelectionChanged", { registerFunc: function (handlerCallback) { @@ -13970,18 +16036,23 @@ var Excel; configurable: true }); Binding.prototype.toJSON=function () { - return { - "id": this.m_id, - "type": this.m_type - }; + return _toJson(this, { + "id": this._I, + "type": this._T, + }, {}); + }; + Binding.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Binding; }(OfficeExtension.ClientObject)); Excel.Binding=Binding; + var _typeBindingCollection="BindingCollection"; var BindingCollection=(function (_super) { __extends(BindingCollection, _super); function BindingCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(BindingCollection.prototype, "_className", { get: function () { @@ -13990,9 +16061,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(BindingCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(BindingCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(BindingCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "BindingCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeBindingCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14000,23 +16085,27 @@ var Excel; }); Object.defineProperty(BindingCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "BindingCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeBindingCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); BindingCollection.prototype.add=function (range, bindingType, id) { - return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [range, bindingType, id], false, true, null)); + _throwIfApiNotSupported("BindingCollection.add", _defaultApiSetName, "1.3", _hostName); + return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [range, bindingType, id], false, true, null, false)); }; BindingCollection.prototype.addFromNamedItem=function (name, bindingType, id) { - return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "AddFromNamedItem", 0, [name, bindingType, id], false, false, null)); + _throwIfApiNotSupported("BindingCollection.addFromNamedItem", _defaultApiSetName, "1.3", _hostName); + return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "AddFromNamedItem", 0, [name, bindingType, id], false, false, null, false)); }; BindingCollection.prototype.addFromSelection=function (bindingType, id) { - return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "AddFromSelection", 0, [bindingType, id], false, false, null)); + _throwIfApiNotSupported("BindingCollection.addFromSelection", _defaultApiSetName, "1.3", _hostName); + return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "AddFromSelection", 0, [bindingType, id], false, false, null, false)); }; BindingCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("BindingCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -14025,10 +16114,11 @@ var Excel; return new Excel.Binding(this.context, _createIndexerObjectPath(this.context, this, [id])); }; BindingCollection.prototype.getItemAt=function (index) { - return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; BindingCollection.prototype.getItemOrNullObject=function (id) { - return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null)); + _throwIfApiNotSupported("BindingCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null, false)); }; BindingCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14037,7 +16127,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14050,21 +16140,29 @@ var Excel; } }; BindingCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + BindingCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + BindingCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.Binding(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; BindingCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return BindingCollection; }(OfficeExtension.ClientObject)); Excel.BindingCollection=BindingCollection; + var _typeTableCollection="TableCollection"; var TableCollection=(function (_super) { __extends(TableCollection, _super); function TableCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableCollection.prototype, "_className", { get: function () { @@ -14073,9 +16171,33 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TableCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableCollection.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject=value; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TableCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14083,17 +16205,18 @@ var Excel; }); Object.defineProperty(TableCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "TableCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeTableCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); TableCollection.prototype.add=function (address, hasHeaders) { - return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [address, hasHeaders], false, true, null)); + return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [address, hasHeaders], false, true, null, false)); }; TableCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("TableCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -14102,10 +16225,11 @@ var Excel; return new Excel.Table(this.context, _createIndexerObjectPath(this.context, this, [key])); }; TableCollection.prototype.getItemAt=function (index) { - return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; TableCollection.prototype.getItemOrNullObject=function (key) { - return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null)); + _throwIfApiNotSupported("TableCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null, false)); }; TableCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14114,7 +16238,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14127,21 +16251,29 @@ var Excel; } }; TableCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.Table(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; TableCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return TableCollection; }(OfficeExtension.ClientObject)); Excel.TableCollection=TableCollection; + var _typeTable="Table"; var Table=(function (_super) { __extends(Table, _super); function Table() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Table.prototype, "_className", { get: function () { @@ -14150,53 +16282,77 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Table.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "name", "showHeaders", "showTotals", "style", "highlightFirstColumn", "highlightLastColumn", "showBandedRows", "showBandedColumns", "showFilterButton"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Table.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, true, true, true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Table.prototype, "_navigationPropertyNames", { + get: function () { + return ["columns", "rows", "sort", "worksheet"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(Table.prototype, "columns", { get: function () { - if (!this.m_columns) { - this.m_columns=new Excel.TableColumnCollection(this.context, _createPropertyObjectPath(this.context, this, "Columns", true, false)); + if (!this._C) { + this._C=new Excel.TableColumnCollection(this.context, _createPropertyObjectPath(this.context, this, "Columns", true, false, false)); } - return this.m_columns; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "rows", { get: function () { - if (!this.m_rows) { - this.m_rows=new Excel.TableRowCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false)); + if (!this._R) { + this._R=new Excel.TableRowCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false, false)); } - return this.m_rows; + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "sort", { get: function () { - if (!this.m_sort) { - this.m_sort=new Excel.TableSort(this.context, _createPropertyObjectPath(this.context, this, "Sort", false, false)); + _throwIfApiNotSupported("Table.sort", _defaultApiSetName, "1.2", _hostName); + if (!this._So) { + this._So=new Excel.TableSort(this.context, _createPropertyObjectPath(this.context, this, "Sort", false, false, false)); } - return this.m_sort; + return this._So; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "worksheet", { get: function () { - if (!this.m_worksheet) { - this.m_worksheet=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false)); + _throwIfApiNotSupported("Table.worksheet", _defaultApiSetName, "1.2", _hostName); + if (!this._W) { + this._W=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false, false)); } - return this.m_worksheet; + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "highlightFirstColumn", { get: function () { - _throwIfNotLoaded("highlightFirstColumn", this.m_highlightFirstColumn, "Table", this._isNull); - return this.m_highlightFirstColumn; + _throwIfNotLoaded("highlightFirstColumn", this._H, _typeTable, this._isNull); + _throwIfApiNotSupported("Table.highlightFirstColumn", _defaultApiSetName, "1.3", _hostName); + return this._H; }, set: function (value) { - this.m_highlightFirstColumn=value; + this._H=value; _createSetPropertyAction(this.context, this, "HighlightFirstColumn", value); }, enumerable: true, @@ -14204,11 +16360,12 @@ var Excel; }); Object.defineProperty(Table.prototype, "highlightLastColumn", { get: function () { - _throwIfNotLoaded("highlightLastColumn", this.m_highlightLastColumn, "Table", this._isNull); - return this.m_highlightLastColumn; + _throwIfNotLoaded("highlightLastColumn", this._Hi, _typeTable, this._isNull); + _throwIfApiNotSupported("Table.highlightLastColumn", _defaultApiSetName, "1.3", _hostName); + return this._Hi; }, set: function (value) { - this.m_highlightLastColumn=value; + this._Hi=value; _createSetPropertyAction(this.context, this, "HighlightLastColumn", value); }, enumerable: true, @@ -14216,19 +16373,19 @@ var Excel; }); Object.defineProperty(Table.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Table", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeTable, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "Table", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeTable, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -14236,11 +16393,12 @@ var Excel; }); Object.defineProperty(Table.prototype, "showBandedColumns", { get: function () { - _throwIfNotLoaded("showBandedColumns", this.m_showBandedColumns, "Table", this._isNull); - return this.m_showBandedColumns; + _throwIfNotLoaded("showBandedColumns", this._S, _typeTable, this._isNull); + _throwIfApiNotSupported("Table.showBandedColumns", _defaultApiSetName, "1.3", _hostName); + return this._S; }, set: function (value) { - this.m_showBandedColumns=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShowBandedColumns", value); }, enumerable: true, @@ -14248,11 +16406,12 @@ var Excel; }); Object.defineProperty(Table.prototype, "showBandedRows", { get: function () { - _throwIfNotLoaded("showBandedRows", this.m_showBandedRows, "Table", this._isNull); - return this.m_showBandedRows; + _throwIfNotLoaded("showBandedRows", this._Sh, _typeTable, this._isNull); + _throwIfApiNotSupported("Table.showBandedRows", _defaultApiSetName, "1.3", _hostName); + return this._Sh; }, set: function (value) { - this.m_showBandedRows=value; + this._Sh=value; _createSetPropertyAction(this.context, this, "ShowBandedRows", value); }, enumerable: true, @@ -14260,11 +16419,12 @@ var Excel; }); Object.defineProperty(Table.prototype, "showFilterButton", { get: function () { - _throwIfNotLoaded("showFilterButton", this.m_showFilterButton, "Table", this._isNull); - return this.m_showFilterButton; + _throwIfNotLoaded("showFilterButton", this._Sho, _typeTable, this._isNull); + _throwIfApiNotSupported("Table.showFilterButton", _defaultApiSetName, "1.3", _hostName); + return this._Sho; }, set: function (value) { - this.m_showFilterButton=value; + this._Sho=value; _createSetPropertyAction(this.context, this, "ShowFilterButton", value); }, enumerable: true, @@ -14272,11 +16432,11 @@ var Excel; }); Object.defineProperty(Table.prototype, "showHeaders", { get: function () { - _throwIfNotLoaded("showHeaders", this.m_showHeaders, "Table", this._isNull); - return this.m_showHeaders; + _throwIfNotLoaded("showHeaders", this._Show, _typeTable, this._isNull); + return this._Show; }, set: function (value) { - this.m_showHeaders=value; + this._Show=value; _createSetPropertyAction(this.context, this, "ShowHeaders", value); }, enumerable: true, @@ -14284,11 +16444,11 @@ var Excel; }); Object.defineProperty(Table.prototype, "showTotals", { get: function () { - _throwIfNotLoaded("showTotals", this.m_showTotals, "Table", this._isNull); - return this.m_showTotals; + _throwIfNotLoaded("showTotals", this._ShowT, _typeTable, this._isNull); + return this._ShowT; }, set: function (value) { - this.m_showTotals=value; + this._ShowT=value; _createSetPropertyAction(this.context, this, "ShowTotals", value); }, enumerable: true, @@ -14296,11 +16456,11 @@ var Excel; }); Object.defineProperty(Table.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "Table", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._St, _typeTable, this._isNull); + return this._St; }, set: function (value) { - this.m_style=value; + this._St=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -14308,39 +16468,41 @@ var Excel; }); Table.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["name", "showHeaders", "showTotals", "style", "highlightFirstColumn", "highlightLastColumn", "showBandedRows", "showBandedColumns", "showFilterButton"], [], [ - "columns", - "rows", - "sort", - "worksheet", "columns", "rows", "sort", "worksheet" ]); }; + Table.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; Table.prototype.clearFilters=function () { - _createMethodAction(this.context, this, "ClearFilters", 0, []); + _throwIfApiNotSupported("Table.clearFilters", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "ClearFilters", 0, [], false); }; Table.prototype.convertToRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "ConvertToRange", 0, [], false, true, null)); + _throwIfApiNotSupported("Table.convertToRange", _defaultApiSetName, "1.2", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "ConvertToRange", 0, [], false, true, null, false)); }; Table.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Table.prototype.getDataBodyRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetDataBodyRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetDataBodyRange", 1, [], false, true, null, false)); }; Table.prototype.getHeaderRowRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetHeaderRowRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetHeaderRowRange", 1, [], false, true, null, false)); }; Table.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); }; Table.prototype.getTotalRowRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetTotalRowRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetTotalRowRange", 1, [], false, true, null, false)); }; Table.prototype.reapplyFilters=function () { - _createMethodAction(this.context, this, "ReapplyFilters", 0, []); + _throwIfApiNotSupported("Table.reapplyFilters", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "ReapplyFilters", 0, [], false); }; Table.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14348,41 +16510,46 @@ var Excel; return; var obj=value; _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + obj["Id"]=obj["Id"].toString(); + } if (!_isUndefined(obj["HighlightFirstColumn"])) { - this.m_highlightFirstColumn=obj["HighlightFirstColumn"]; + this._H=obj["HighlightFirstColumn"]; } if (!_isUndefined(obj["HighlightLastColumn"])) { - this.m_highlightLastColumn=obj["HighlightLastColumn"]; + this._Hi=obj["HighlightLastColumn"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["ShowBandedColumns"])) { - this.m_showBandedColumns=obj["ShowBandedColumns"]; + this._S=obj["ShowBandedColumns"]; } if (!_isUndefined(obj["ShowBandedRows"])) { - this.m_showBandedRows=obj["ShowBandedRows"]; + this._Sh=obj["ShowBandedRows"]; } if (!_isUndefined(obj["ShowFilterButton"])) { - this.m_showFilterButton=obj["ShowFilterButton"]; + this._Sho=obj["ShowFilterButton"]; } if (!_isUndefined(obj["ShowHeaders"])) { - this.m_showHeaders=obj["ShowHeaders"]; + this._Show=obj["ShowHeaders"]; } if (!_isUndefined(obj["ShowTotals"])) { - this.m_showTotals=obj["ShowTotals"]; + this._ShowT=obj["ShowTotals"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._St=obj["Style"]; } _handleNavigationPropertyResults(this, obj, ["columns", "Columns", "rows", "Rows", "sort", "Sort", "worksheet", "Worksheet"]); }; Table.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Table.prototype.retrieve=function (option) { + return _retrieve(this, option); }; Table.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -14390,30 +16557,44 @@ var Excel; return; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + value["Id"]=value["Id"].toString(); + this._I=value["Id"]; } }; + Table.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; Table.prototype.toJSON=function () { - return { - "highlightFirstColumn": this.m_highlightFirstColumn, - "highlightLastColumn": this.m_highlightLastColumn, - "id": this.m_id, - "name": this.m_name, - "showBandedColumns": this.m_showBandedColumns, - "showBandedRows": this.m_showBandedRows, - "showFilterButton": this.m_showFilterButton, - "showHeaders": this.m_showHeaders, - "showTotals": this.m_showTotals, - "style": this.m_style - }; + return _toJson(this, { + "highlightFirstColumn": this._H, + "highlightLastColumn": this._Hi, + "id": this._I, + "name": this._N, + "showBandedColumns": this._S, + "showBandedRows": this._Sh, + "showFilterButton": this._Sho, + "showHeaders": this._Show, + "showTotals": this._ShowT, + "style": this._St, + }, { + "columns": this._C, + "rows": this._R, + "sort": this._So, + }); + }; + Table.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Table; }(OfficeExtension.ClientObject)); Excel.Table=Table; + var _typeTableColumnCollection="TableColumnCollection"; var TableColumnCollection=(function (_super) { __extends(TableColumnCollection, _super); function TableColumnCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableColumnCollection.prototype, "_className", { get: function () { @@ -14422,9 +16603,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TableColumnCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableColumnCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TableColumnCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableColumnCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableColumnCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14432,17 +16627,18 @@ var Excel; }); Object.defineProperty(TableColumnCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "TableColumnCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeTableColumnCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); TableColumnCollection.prototype.add=function (index, values, name) { - return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [index, values, name], false, true, null)); + return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [index, values, name], false, true, null, false)); }; TableColumnCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("TableColumnCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -14451,10 +16647,11 @@ var Excel; return new Excel.TableColumn(this.context, _createIndexerObjectPath(this.context, this, [key])); }; TableColumnCollection.prototype.getItemAt=function (index) { - return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; TableColumnCollection.prototype.getItemOrNullObject=function (key) { - return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null)); + _throwIfApiNotSupported("TableColumnCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null, false)); }; TableColumnCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14463,7 +16660,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14476,21 +16673,29 @@ var Excel; } }; TableColumnCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableColumnCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableColumnCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.TableColumn(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; TableColumnCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return TableColumnCollection; }(OfficeExtension.ClientObject)); Excel.TableColumnCollection=TableColumnCollection; + var _typeTableColumn="TableColumn"; var TableColumn=(function (_super) { __extends(TableColumn, _super); function TableColumn() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableColumn.prototype, "_className", { get: function () { @@ -14499,39 +16704,61 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TableColumn.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "index", "values", "name"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableColumn.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, false, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableColumn.prototype, "_navigationPropertyNames", { + get: function () { + return ["filter"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TableColumn.prototype, "filter", { get: function () { - if (!this.m_filter) { - this.m_filter=new Excel.Filter(this.context, _createPropertyObjectPath(this.context, this, "Filter", false, false)); + _throwIfApiNotSupported("TableColumn.filter", _defaultApiSetName, "1.2", _hostName); + if (!this._F) { + this._F=new Excel.Filter(this.context, _createPropertyObjectPath(this.context, this, "Filter", false, false, false)); } - return this.m_filter; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(TableColumn.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "TableColumn", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeTableColumn, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(TableColumn.prototype, "index", { get: function () { - _throwIfNotLoaded("index", this.m_index, "TableColumn", this._isNull); - return this.m_index; + _throwIfNotLoaded("index", this._In, _typeTableColumn, this._isNull); + return this._In; }, enumerable: true, configurable: true }); Object.defineProperty(TableColumn.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "TableColumn", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeTableColumn, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -14539,11 +16766,11 @@ var Excel; }); Object.defineProperty(TableColumn.prototype, "values", { get: function () { - _throwIfNotLoaded("values", this.m_values, "TableColumn", this._isNull); - return this.m_values; + _throwIfNotLoaded("values", this._V, _typeTableColumn, this._isNull); + return this._V; }, set: function (value) { - this.m_values=value; + this._V=value; _createSetPropertyAction(this.context, this, "Values", value); }, enumerable: true, @@ -14551,24 +16778,26 @@ var Excel; }); TableColumn.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["values", "name"], [], [ - "filter", "filter" ]); }; + TableColumn.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; TableColumn.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; TableColumn.prototype.getDataBodyRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetDataBodyRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetDataBodyRange", 1, [], false, true, null, false)); }; TableColumn.prototype.getHeaderRowRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetHeaderRowRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetHeaderRowRange", 1, [], false, true, null, false)); }; TableColumn.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); }; TableColumn.prototype.getTotalRowRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetTotalRowRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetTotalRowRange", 1, [], false, true, null, false)); }; TableColumn.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14577,22 +16806,24 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Index"])) { - this.m_index=obj["Index"]; + this._In=obj["Index"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Values"])) { - this.m_values=obj["Values"]; + this._V=obj["Values"]; } _handleNavigationPropertyResults(this, obj, ["filter", "Filter"]); }; TableColumn.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableColumn.prototype.retrieve=function (option) { + return _retrieve(this, option); }; TableColumn.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -14600,24 +16831,35 @@ var Excel; return; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; + TableColumn.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; TableColumn.prototype.toJSON=function () { - return { - "id": this.m_id, - "index": this.m_index, - "name": this.m_name, - "values": this.m_values - }; + return _toJson(this, { + "id": this._I, + "index": this._In, + "name": this._N, + "values": this._V, + }, { + "filter": this._F, + }); + }; + TableColumn.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TableColumn; }(OfficeExtension.ClientObject)); Excel.TableColumn=TableColumn; + var _typeTableRowCollection="TableRowCollection"; var TableRowCollection=(function (_super) { __extends(TableRowCollection, _super); function TableRowCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableRowCollection.prototype, "_className", { get: function () { @@ -14626,9 +16868,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TableRowCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableRowCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TableRowCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableRowCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableRowCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14636,23 +16892,24 @@ var Excel; }); Object.defineProperty(TableRowCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "TableRowCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeTableRowCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); TableRowCollection.prototype.add=function (index, values) { - return new Excel.TableRow(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [index, values], false, true, null)); + return new Excel.TableRow(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [index, values], false, true, null, false)); }; TableRowCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("TableRowCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; TableRowCollection.prototype.getItemAt=function (index) { - return new Excel.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; TableRowCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14661,7 +16918,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14674,21 +16931,29 @@ var Excel; } }; TableRowCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableRowCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableRowCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.TableRow(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(false, _this.context, _this, childItemData, index)); }); }; TableRowCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return TableRowCollection; }(OfficeExtension.ClientObject)); Excel.TableRowCollection=TableRowCollection; + var _typeTableRow="TableRow"; var TableRow=(function (_super) { __extends(TableRow, _super); function TableRow() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableRow.prototype, "_className", { get: function () { @@ -14697,21 +16962,35 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TableRow.prototype, "_scalarPropertyNames", { + get: function () { + return ["index", "values"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableRow.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TableRow.prototype, "index", { get: function () { - _throwIfNotLoaded("index", this.m_index, "TableRow", this._isNull); - return this.m_index; + _throwIfNotLoaded("index", this._I, _typeTableRow, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "values", { get: function () { - _throwIfNotLoaded("values", this.m_values, "TableRow", this._isNull); - return this.m_values; + _throwIfNotLoaded("values", this._V, _typeTableRow, this._isNull); + return this._V; }, set: function (value) { - this.m_values=value; + this._V=value; _createSetPropertyAction(this.context, this, "Values", value); }, enumerable: true, @@ -14720,11 +16999,14 @@ var Excel; TableRow.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["values"], [], []); }; + TableRow.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; TableRow.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; TableRow.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); }; TableRow.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14733,29 +17015,40 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Index"])) { - this.m_index=obj["Index"]; + this._I=obj["Index"]; } if (!_isUndefined(obj["Values"])) { - this.m_values=obj["Values"]; + this._V=obj["Values"]; } }; TableRow.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableRow.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableRow.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; TableRow.prototype.toJSON=function () { - return { - "index": this.m_index, - "values": this.m_values - }; + return _toJson(this, { + "index": this._I, + "values": this._V, + }, {}); + }; + TableRow.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TableRow; }(OfficeExtension.ClientObject)); Excel.TableRow=TableRow; + var _typeRangeFormat="RangeFormat"; var RangeFormat=(function (_super) { __extends(RangeFormat, _super); function RangeFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeFormat.prototype, "_className", { get: function () { @@ -14764,53 +17057,76 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["wrapText", "horizontalAlignment", "verticalAlignment", "columnWidth", "rowHeight"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["fill", "font", "borders", "protection"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeFormat.prototype, "borders", { get: function () { - if (!this.m_borders) { - this.m_borders=new Excel.RangeBorderCollection(this.context, _createPropertyObjectPath(this.context, this, "Borders", true, false)); + if (!this._B) { + this._B=new Excel.RangeBorderCollection(this.context, _createPropertyObjectPath(this.context, this, "Borders", true, false, false)); } - return this.m_borders; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(RangeFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.RangeFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.RangeFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(RangeFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.RangeFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Excel.RangeFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true }); Object.defineProperty(RangeFormat.prototype, "protection", { get: function () { - if (!this.m_protection) { - this.m_protection=new Excel.FormatProtection(this.context, _createPropertyObjectPath(this.context, this, "Protection", false, false)); + _throwIfApiNotSupported("RangeFormat.protection", _defaultApiSetName, "1.2", _hostName); + if (!this._P) { + this._P=new Excel.FormatProtection(this.context, _createPropertyObjectPath(this.context, this, "Protection", false, false, false)); } - return this.m_protection; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(RangeFormat.prototype, "columnWidth", { get: function () { - _throwIfNotLoaded("columnWidth", this.m_columnWidth, "RangeFormat", this._isNull); - return this.m_columnWidth; + _throwIfNotLoaded("columnWidth", this._C, _typeRangeFormat, this._isNull); + _throwIfApiNotSupported("RangeFormat.columnWidth", _defaultApiSetName, "1.2", _hostName); + return this._C; }, set: function (value) { - this.m_columnWidth=value; + this._C=value; _createSetPropertyAction(this.context, this, "ColumnWidth", value); }, enumerable: true, @@ -14818,11 +17134,11 @@ var Excel; }); Object.defineProperty(RangeFormat.prototype, "horizontalAlignment", { get: function () { - _throwIfNotLoaded("horizontalAlignment", this.m_horizontalAlignment, "RangeFormat", this._isNull); - return this.m_horizontalAlignment; + _throwIfNotLoaded("horizontalAlignment", this._H, _typeRangeFormat, this._isNull); + return this._H; }, set: function (value) { - this.m_horizontalAlignment=value; + this._H=value; _createSetPropertyAction(this.context, this, "HorizontalAlignment", value); }, enumerable: true, @@ -14830,11 +17146,12 @@ var Excel; }); Object.defineProperty(RangeFormat.prototype, "rowHeight", { get: function () { - _throwIfNotLoaded("rowHeight", this.m_rowHeight, "RangeFormat", this._isNull); - return this.m_rowHeight; + _throwIfNotLoaded("rowHeight", this._R, _typeRangeFormat, this._isNull); + _throwIfApiNotSupported("RangeFormat.rowHeight", _defaultApiSetName, "1.2", _hostName); + return this._R; }, set: function (value) { - this.m_rowHeight=value; + this._R=value; _createSetPropertyAction(this.context, this, "RowHeight", value); }, enumerable: true, @@ -14842,11 +17159,11 @@ var Excel; }); Object.defineProperty(RangeFormat.prototype, "verticalAlignment", { get: function () { - _throwIfNotLoaded("verticalAlignment", this.m_verticalAlignment, "RangeFormat", this._isNull); - return this.m_verticalAlignment; + _throwIfNotLoaded("verticalAlignment", this._V, _typeRangeFormat, this._isNull); + return this._V; }, set: function (value) { - this.m_verticalAlignment=value; + this._V=value; _createSetPropertyAction(this.context, this, "VerticalAlignment", value); }, enumerable: true, @@ -14854,11 +17171,11 @@ var Excel; }); Object.defineProperty(RangeFormat.prototype, "wrapText", { get: function () { - _throwIfNotLoaded("wrapText", this.m_wrapText, "RangeFormat", this._isNull); - return this.m_wrapText; + _throwIfNotLoaded("wrapText", this._W, _typeRangeFormat, this._isNull); + return this._W; }, set: function (value) { - this.m_wrapText=value; + this._W=value; _createSetPropertyAction(this.context, this, "WrapText", value); }, enumerable: true, @@ -14866,15 +17183,19 @@ var Excel; }); RangeFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["wrapText", "horizontalAlignment", "verticalAlignment", "columnWidth", "rowHeight"], ["fill", "font", "protection"], [ - "borders", "borders" ]); }; + RangeFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; RangeFormat.prototype.autofitColumns=function () { - _createMethodAction(this.context, this, "AutofitColumns", 0, []); + _throwIfApiNotSupported("RangeFormat.autofitColumns", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "AutofitColumns", 0, [], false); }; RangeFormat.prototype.autofitRows=function () { - _createMethodAction(this.context, this, "AutofitRows", 0, []); + _throwIfApiNotSupported("RangeFormat.autofitRows", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "AutofitRows", 0, [], false); }; RangeFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14883,45 +17204,58 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["ColumnWidth"])) { - this.m_columnWidth=obj["ColumnWidth"]; + this._C=obj["ColumnWidth"]; } if (!_isUndefined(obj["HorizontalAlignment"])) { - this.m_horizontalAlignment=obj["HorizontalAlignment"]; + this._H=obj["HorizontalAlignment"]; } if (!_isUndefined(obj["RowHeight"])) { - this.m_rowHeight=obj["RowHeight"]; + this._R=obj["RowHeight"]; } if (!_isUndefined(obj["VerticalAlignment"])) { - this.m_verticalAlignment=obj["VerticalAlignment"]; + this._V=obj["VerticalAlignment"]; } if (!_isUndefined(obj["WrapText"])) { - this.m_wrapText=obj["WrapText"]; + this._W=obj["WrapText"]; } _handleNavigationPropertyResults(this, obj, ["borders", "Borders", "fill", "Fill", "font", "Font", "protection", "Protection"]); }; RangeFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; RangeFormat.prototype.toJSON=function () { - return { - "columnWidth": this.m_columnWidth, - "fill": this.m_fill, - "font": this.m_font, - "horizontalAlignment": this.m_horizontalAlignment, - "protection": this.m_protection, - "rowHeight": this.m_rowHeight, - "verticalAlignment": this.m_verticalAlignment, - "wrapText": this.m_wrapText - }; + return _toJson(this, { + "columnWidth": this._C, + "horizontalAlignment": this._H, + "rowHeight": this._R, + "verticalAlignment": this._V, + "wrapText": this._W, + }, { + "borders": this._B, + "fill": this._F, + "font": this._Fo, + "protection": this._P, + }); + }; + RangeFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return RangeFormat; }(OfficeExtension.ClientObject)); Excel.RangeFormat=RangeFormat; + var _typeFormatProtection="FormatProtection"; var FormatProtection=(function (_super) { __extends(FormatProtection, _super); function FormatProtection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(FormatProtection.prototype, "_className", { get: function () { @@ -14930,13 +17264,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(FormatProtection.prototype, "_scalarPropertyNames", { + get: function () { + return ["locked", "formulaHidden"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FormatProtection.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(FormatProtection.prototype, "formulaHidden", { get: function () { - _throwIfNotLoaded("formulaHidden", this.m_formulaHidden, "FormatProtection", this._isNull); - return this.m_formulaHidden; + _throwIfNotLoaded("formulaHidden", this._F, _typeFormatProtection, this._isNull); + return this._F; }, set: function (value) { - this.m_formulaHidden=value; + this._F=value; _createSetPropertyAction(this.context, this, "FormulaHidden", value); }, enumerable: true, @@ -14944,11 +17292,11 @@ var Excel; }); Object.defineProperty(FormatProtection.prototype, "locked", { get: function () { - _throwIfNotLoaded("locked", this.m_locked, "FormatProtection", this._isNull); - return this.m_locked; + _throwIfNotLoaded("locked", this._L, _typeFormatProtection, this._isNull); + return this._L; }, set: function (value) { - this.m_locked=value; + this._L=value; _createSetPropertyAction(this.context, this, "Locked", value); }, enumerable: true, @@ -14957,6 +17305,9 @@ var Excel; FormatProtection.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["locked", "formulaHidden"], [], []); }; + FormatProtection.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; FormatProtection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -14964,29 +17315,40 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["FormulaHidden"])) { - this.m_formulaHidden=obj["FormulaHidden"]; + this._F=obj["FormulaHidden"]; } if (!_isUndefined(obj["Locked"])) { - this.m_locked=obj["Locked"]; + this._L=obj["Locked"]; } }; FormatProtection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + FormatProtection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + FormatProtection.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; FormatProtection.prototype.toJSON=function () { - return { - "formulaHidden": this.m_formulaHidden, - "locked": this.m_locked - }; + return _toJson(this, { + "formulaHidden": this._F, + "locked": this._L, + }, {}); + }; + FormatProtection.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return FormatProtection; }(OfficeExtension.ClientObject)); Excel.FormatProtection=FormatProtection; + var _typeRangeFill="RangeFill"; var RangeFill=(function (_super) { __extends(RangeFill, _super); function RangeFill() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeFill.prototype, "_className", { get: function () { @@ -14995,13 +17357,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeFill.prototype, "_scalarPropertyNames", { + get: function () { + return ["color"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFill.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeFill.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "RangeFill", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeRangeFill, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -15010,8 +17386,11 @@ var Excel; RangeFill.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["color"], [], []); }; + RangeFill.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; RangeFill.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; RangeFill.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15020,25 +17399,36 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } }; RangeFill.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeFill.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeFill.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; RangeFill.prototype.toJSON=function () { - return { - "color": this.m_color - }; + return _toJson(this, { + "color": this._C, + }, {}); + }; + RangeFill.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return RangeFill; }(OfficeExtension.ClientObject)); Excel.RangeFill=RangeFill; + var _typeRangeBorder="RangeBorder"; var RangeBorder=(function (_super) { __extends(RangeBorder, _super); function RangeBorder() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeBorder.prototype, "_className", { get: function () { @@ -15047,13 +17437,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeBorder.prototype, "_scalarPropertyNames", { + get: function () { + return ["sideIndex", "style", "weight", "color"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeBorder.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeBorder.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "RangeBorder", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeRangeBorder, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -15061,19 +17465,19 @@ var Excel; }); Object.defineProperty(RangeBorder.prototype, "sideIndex", { get: function () { - _throwIfNotLoaded("sideIndex", this.m_sideIndex, "RangeBorder", this._isNull); - return this.m_sideIndex; + _throwIfNotLoaded("sideIndex", this._S, _typeRangeBorder, this._isNull); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(RangeBorder.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "RangeBorder", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._St, _typeRangeBorder, this._isNull); + return this._St; }, set: function (value) { - this.m_style=value; + this._St=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -15081,11 +17485,11 @@ var Excel; }); Object.defineProperty(RangeBorder.prototype, "weight", { get: function () { - _throwIfNotLoaded("weight", this.m_weight, "RangeBorder", this._isNull); - return this.m_weight; + _throwIfNotLoaded("weight", this._W, _typeRangeBorder, this._isNull); + return this._W; }, set: function (value) { - this.m_weight=value; + this._W=value; _createSetPropertyAction(this.context, this, "Weight", value); }, enumerable: true, @@ -15094,6 +17498,9 @@ var Excel; RangeBorder.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["style", "weight", "color"], [], []); }; + RangeBorder.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; RangeBorder.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -15101,37 +17508,48 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["SideIndex"])) { - this.m_sideIndex=obj["SideIndex"]; + this._S=obj["SideIndex"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._St=obj["Style"]; } if (!_isUndefined(obj["Weight"])) { - this.m_weight=obj["Weight"]; + this._W=obj["Weight"]; } }; RangeBorder.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeBorder.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeBorder.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; RangeBorder.prototype.toJSON=function () { - return { - "color": this.m_color, - "sideIndex": this.m_sideIndex, - "style": this.m_style, - "weight": this.m_weight - }; + return _toJson(this, { + "color": this._C, + "sideIndex": this._S, + "style": this._St, + "weight": this._W, + }, {}); + }; + RangeBorder.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return RangeBorder; }(OfficeExtension.ClientObject)); Excel.RangeBorder=RangeBorder; + var _typeRangeBorderCollection="RangeBorderCollection"; var RangeBorderCollection=(function (_super) { __extends(RangeBorderCollection, _super); function RangeBorderCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeBorderCollection.prototype, "_className", { get: function () { @@ -15140,9 +17558,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeBorderCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeBorderCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeBorderCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "RangeBorderCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeRangeBorderCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15150,8 +17582,8 @@ var Excel; }); Object.defineProperty(RangeBorderCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "RangeBorderCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeRangeBorderCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true @@ -15160,7 +17592,7 @@ var Excel; return new Excel.RangeBorder(this.context, _createIndexerObjectPath(this.context, this, [index])); }; RangeBorderCollection.prototype.getItemAt=function (index) { - return new Excel.RangeBorder(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.RangeBorder(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; RangeBorderCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15169,7 +17601,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15182,21 +17614,29 @@ var Excel; } }; RangeBorderCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeBorderCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeBorderCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.RangeBorder(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; RangeBorderCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return RangeBorderCollection; }(OfficeExtension.ClientObject)); Excel.RangeBorderCollection=RangeBorderCollection; + var _typeRangeFont="RangeFont"; var RangeFont=(function (_super) { __extends(RangeFont, _super); function RangeFont() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeFont.prototype, "_className", { get: function () { @@ -15205,13 +17645,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeFont.prototype, "_scalarPropertyNames", { + get: function () { + return ["name", "size", "color", "italic", "bold", "underline"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFont.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeFont.prototype, "bold", { get: function () { - _throwIfNotLoaded("bold", this.m_bold, "RangeFont", this._isNull); - return this.m_bold; + _throwIfNotLoaded("bold", this._B, _typeRangeFont, this._isNull); + return this._B; }, set: function (value) { - this.m_bold=value; + this._B=value; _createSetPropertyAction(this.context, this, "Bold", value); }, enumerable: true, @@ -15219,11 +17673,11 @@ var Excel; }); Object.defineProperty(RangeFont.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "RangeFont", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeRangeFont, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -15231,11 +17685,11 @@ var Excel; }); Object.defineProperty(RangeFont.prototype, "italic", { get: function () { - _throwIfNotLoaded("italic", this.m_italic, "RangeFont", this._isNull); - return this.m_italic; + _throwIfNotLoaded("italic", this._I, _typeRangeFont, this._isNull); + return this._I; }, set: function (value) { - this.m_italic=value; + this._I=value; _createSetPropertyAction(this.context, this, "Italic", value); }, enumerable: true, @@ -15243,11 +17697,11 @@ var Excel; }); Object.defineProperty(RangeFont.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "RangeFont", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeRangeFont, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -15255,11 +17709,11 @@ var Excel; }); Object.defineProperty(RangeFont.prototype, "size", { get: function () { - _throwIfNotLoaded("size", this.m_size, "RangeFont", this._isNull); - return this.m_size; + _throwIfNotLoaded("size", this._S, _typeRangeFont, this._isNull); + return this._S; }, set: function (value) { - this.m_size=value; + this._S=value; _createSetPropertyAction(this.context, this, "Size", value); }, enumerable: true, @@ -15267,11 +17721,11 @@ var Excel; }); Object.defineProperty(RangeFont.prototype, "underline", { get: function () { - _throwIfNotLoaded("underline", this.m_underline, "RangeFont", this._isNull); - return this.m_underline; + _throwIfNotLoaded("underline", this._U, _typeRangeFont, this._isNull); + return this._U; }, set: function (value) { - this.m_underline=value; + this._U=value; _createSetPropertyAction(this.context, this, "Underline", value); }, enumerable: true, @@ -15280,6 +17734,9 @@ var Excel; RangeFont.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["name", "size", "color", "italic", "bold", "underline"], [], []); }; + RangeFont.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; RangeFont.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -15287,45 +17744,56 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Bold"])) { - this.m_bold=obj["Bold"]; + this._B=obj["Bold"]; } if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["Italic"])) { - this.m_italic=obj["Italic"]; + this._I=obj["Italic"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Size"])) { - this.m_size=obj["Size"]; + this._S=obj["Size"]; } if (!_isUndefined(obj["Underline"])) { - this.m_underline=obj["Underline"]; + this._U=obj["Underline"]; } }; RangeFont.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeFont.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeFont.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; RangeFont.prototype.toJSON=function () { - return { - "bold": this.m_bold, - "color": this.m_color, - "italic": this.m_italic, - "name": this.m_name, - "size": this.m_size, - "underline": this.m_underline - }; + return _toJson(this, { + "bold": this._B, + "color": this._C, + "italic": this._I, + "name": this._N, + "size": this._S, + "underline": this._U, + }, {}); + }; + RangeFont.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return RangeFont; }(OfficeExtension.ClientObject)); Excel.RangeFont=RangeFont; + var _typeChartCollection="ChartCollection"; var ChartCollection=(function (_super) { __extends(ChartCollection, _super); function ChartCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartCollection.prototype, "_className", { get: function () { @@ -15334,9 +17802,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ChartCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeChartCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15344,8 +17826,8 @@ var Excel; }); Object.defineProperty(ChartCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "ChartCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeChartCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true @@ -15354,22 +17836,24 @@ var Excel; if (!(sourceData instanceof Range)) { throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument, "sourceData", "Charts.Add"); } - return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [type, sourceData, seriesBy], false, true, null)); + return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [type, sourceData, seriesBy], false, true, null, false)); }; ChartCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("ChartCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; ChartCollection.prototype.getItem=function (name) { - return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItem", 1, [name], false, false, null)); + return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItem", 1, [name], false, false, null, false)); }; ChartCollection.prototype.getItemAt=function (index) { - return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; ChartCollection.prototype.getItemOrNullObject=function (name) { - return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null)); + _throwIfApiNotSupported("ChartCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null, false)); }; ChartCollection.prototype._GetItem=function (key) { return new Excel.Chart(this.context, _createIndexerObjectPath(this.context, this, [key])); @@ -15381,7 +17865,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15394,106 +17878,136 @@ var Excel; } }; ChartCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.Chart(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; ChartCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return ChartCollection; }(OfficeExtension.ClientObject)); Excel.ChartCollection=ChartCollection; + var _typeChart="Chart"; var Chart=(function (_super) { __extends(Chart, _super); function Chart() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Chart.prototype, "_className", { get: function () { - return "Chart"; + return "Chart"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Chart.prototype, "_scalarPropertyNames", { + get: function () { + return ["name", "top", "left", "width", "height"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Chart.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Chart.prototype, "_navigationPropertyNames", { + get: function () { + return ["title", "dataLabels", "legend", "series", "axes", "format", "worksheet"]; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "axes", { get: function () { - if (!this.m_axes) { - this.m_axes=new Excel.ChartAxes(this.context, _createPropertyObjectPath(this.context, this, "Axes", false, false)); + if (!this._A) { + this._A=new Excel.ChartAxes(this.context, _createPropertyObjectPath(this.context, this, "Axes", false, false, false)); } - return this.m_axes; + return this._A; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "dataLabels", { get: function () { - if (!this.m_dataLabels) { - this.m_dataLabels=new Excel.ChartDataLabels(this.context, _createPropertyObjectPath(this.context, this, "DataLabels", false, false)); + if (!this._D) { + this._D=new Excel.ChartDataLabels(this.context, _createPropertyObjectPath(this.context, this, "DataLabels", false, false, false)); } - return this.m_dataLabels; + return this._D; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartAreaFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartAreaFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "legend", { get: function () { - if (!this.m_legend) { - this.m_legend=new Excel.ChartLegend(this.context, _createPropertyObjectPath(this.context, this, "Legend", false, false)); + if (!this._Le) { + this._Le=new Excel.ChartLegend(this.context, _createPropertyObjectPath(this.context, this, "Legend", false, false, false)); } - return this.m_legend; + return this._Le; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "series", { get: function () { - if (!this.m_series) { - this.m_series=new Excel.ChartSeriesCollection(this.context, _createPropertyObjectPath(this.context, this, "Series", true, false)); + if (!this._S) { + this._S=new Excel.ChartSeriesCollection(this.context, _createPropertyObjectPath(this.context, this, "Series", true, false, false)); } - return this.m_series; + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "title", { get: function () { - if (!this.m_title) { - this.m_title=new Excel.ChartTitle(this.context, _createPropertyObjectPath(this.context, this, "Title", false, false)); + if (!this._T) { + this._T=new Excel.ChartTitle(this.context, _createPropertyObjectPath(this.context, this, "Title", false, false, false)); } - return this.m_title; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "worksheet", { get: function () { - if (!this.m_worksheet) { - this.m_worksheet=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false)); + _throwIfApiNotSupported("Chart.worksheet", _defaultApiSetName, "1.2", _hostName); + if (!this._Wo) { + this._Wo=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false, false)); } - return this.m_worksheet; + return this._Wo; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "height", { get: function () { - _throwIfNotLoaded("height", this.m_height, "Chart", this._isNull); - return this.m_height; + _throwIfNotLoaded("height", this._H, _typeChart, this._isNull); + return this._H; }, set: function (value) { - this.m_height=value; + this._H=value; _createSetPropertyAction(this.context, this, "Height", value); }, enumerable: true, @@ -15501,11 +18015,11 @@ var Excel; }); Object.defineProperty(Chart.prototype, "left", { get: function () { - _throwIfNotLoaded("left", this.m_left, "Chart", this._isNull); - return this.m_left; + _throwIfNotLoaded("left", this._L, _typeChart, this._isNull); + return this._L; }, set: function (value) { - this.m_left=value; + this._L=value; _createSetPropertyAction(this.context, this, "Left", value); }, enumerable: true, @@ -15513,11 +18027,11 @@ var Excel; }); Object.defineProperty(Chart.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "Chart", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeChart, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -15525,11 +18039,11 @@ var Excel; }); Object.defineProperty(Chart.prototype, "top", { get: function () { - _throwIfNotLoaded("top", this.m_top, "Chart", this._isNull); - return this.m_top; + _throwIfNotLoaded("top", this._To, _typeChart, this._isNull); + return this._To; }, set: function (value) { - this.m_top=value; + this._To=value; _createSetPropertyAction(this.context, this, "Top", value); }, enumerable: true, @@ -15537,11 +18051,11 @@ var Excel; }); Object.defineProperty(Chart.prototype, "width", { get: function () { - _throwIfNotLoaded("width", this.m_width, "Chart", this._isNull); - return this.m_width; + _throwIfNotLoaded("width", this._W, _typeChart, this._isNull); + return this._W; }, set: function (value) { - this.m_width=value; + this._W=value; _createSetPropertyAction(this.context, this, "Width", value); }, enumerable: true, @@ -15549,17 +18063,19 @@ var Excel; }); Chart.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["name", "top", "left", "width", "height"], ["title", "dataLabels", "legend", "axes", "format"], [ - "series", - "worksheet", "series", "worksheet" ]); }; + Chart.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; Chart.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Chart.prototype.getImage=function (width, height, fittingMode) { - var action=_createMethodAction(this.context, this, "GetImage", 1, [width, height, fittingMode]); + _throwIfApiNotSupported("Chart.getImage", _defaultApiSetName, "1.2", _hostName); + var action=_createMethodAction(this.context, this, "GetImage", 1, [width, height, fittingMode], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -15568,10 +18084,10 @@ var Excel; if (!(sourceData instanceof Range)) { throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument, "sourceData", "Chart.setData"); } - _createMethodAction(this.context, this, "SetData", 0, [sourceData, seriesBy]); + _createMethodAction(this.context, this, "SetData", 0, [sourceData, seriesBy], false); }; Chart.prototype.setPosition=function (startCell, endCell) { - _createMethodAction(this.context, this, "SetPosition", 0, [startCell, endCell]); + _createMethodAction(this.context, this, "SetPosition", 0, [startCell, endCell], false); }; Chart.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15580,47 +18096,60 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Height"])) { - this.m_height=obj["Height"]; + this._H=obj["Height"]; } if (!_isUndefined(obj["Left"])) { - this.m_left=obj["Left"]; + this._L=obj["Left"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Top"])) { - this.m_top=obj["Top"]; + this._To=obj["Top"]; } if (!_isUndefined(obj["Width"])) { - this.m_width=obj["Width"]; + this._W=obj["Width"]; } _handleNavigationPropertyResults(this, obj, ["axes", "Axes", "dataLabels", "DataLabels", "format", "Format", "legend", "Legend", "series", "Series", "title", "Title", "worksheet", "Worksheet"]); }; Chart.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Chart.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Chart.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; Chart.prototype.toJSON=function () { - return { - "axes": this.m_axes, - "dataLabels": this.m_dataLabels, - "format": this.m_format, - "height": this.m_height, - "left": this.m_left, - "legend": this.m_legend, - "name": this.m_name, - "title": this.m_title, - "top": this.m_top, - "width": this.m_width - }; + return _toJson(this, { + "height": this._H, + "left": this._L, + "name": this._N, + "top": this._To, + "width": this._W, + }, { + "axes": this._A, + "dataLabels": this._D, + "format": this._F, + "legend": this._Le, + "series": this._S, + "title": this._T, + }); + }; + Chart.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Chart; }(OfficeExtension.ClientObject)); Excel.Chart=Chart; + var _typeChartAreaFormat="ChartAreaFormat"; var ChartAreaFormat=(function (_super) { __extends(ChartAreaFormat, _super); function ChartAreaFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartAreaFormat.prototype, "_className", { get: function () { @@ -15629,22 +18158,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartAreaFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["fill", "font"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartAreaFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAreaFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true @@ -15654,6 +18190,9 @@ var Excel; "fill" ]); }; + ChartAreaFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartAreaFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -15663,22 +18202,32 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["fill", "Fill", "font", "Font"]); }; ChartAreaFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartAreaFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAreaFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartAreaFormat.prototype.toJSON=function () { - return { - "fill": this.m_fill, - "font": this.m_font - }; + return _toJson(this, {}, { + "font": this._Fo, + }); + }; + ChartAreaFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartAreaFormat; }(OfficeExtension.ClientObject)); Excel.ChartAreaFormat=ChartAreaFormat; + var _typeChartSeriesCollection="ChartSeriesCollection"; var ChartSeriesCollection=(function (_super) { __extends(ChartSeriesCollection, _super); function ChartSeriesCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartSeriesCollection.prototype, "_className", { get: function () { @@ -15687,9 +18236,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartSeriesCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartSeriesCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartSeriesCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ChartSeriesCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeChartSeriesCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15697,20 +18260,21 @@ var Excel; }); Object.defineProperty(ChartSeriesCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "ChartSeriesCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeChartSeriesCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); ChartSeriesCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("ChartSeriesCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; ChartSeriesCollection.prototype.getItemAt=function (index) { - return new Excel.ChartSeries(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.ChartSeries(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; ChartSeriesCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15719,7 +18283,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15732,21 +18296,29 @@ var Excel; } }; ChartSeriesCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartSeriesCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartSeriesCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.ChartSeries(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(false, _this.context, _this, childItemData, index)); }); }; ChartSeriesCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return ChartSeriesCollection; }(OfficeExtension.ClientObject)); Excel.ChartSeriesCollection=ChartSeriesCollection; + var _typeChartSeries="ChartSeries"; var ChartSeries=(function (_super) { __extends(ChartSeries, _super); function ChartSeries() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartSeries.prototype, "_className", { get: function () { @@ -15755,33 +18327,54 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartSeries.prototype, "_scalarPropertyNames", { + get: function () { + return ["name"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartSeries.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartSeries.prototype, "_navigationPropertyNames", { + get: function () { + return ["points", "format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartSeries.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartSeriesFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartSeriesFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartSeries.prototype, "points", { get: function () { - if (!this.m_points) { - this.m_points=new Excel.ChartPointsCollection(this.context, _createPropertyObjectPath(this.context, this, "Points", true, false)); + if (!this._P) { + this._P=new Excel.ChartPointsCollection(this.context, _createPropertyObjectPath(this.context, this, "Points", true, false, false)); } - return this.m_points; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(ChartSeries.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "ChartSeries", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeChartSeries, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -15789,10 +18382,12 @@ var Excel; }); ChartSeries.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["name"], ["format"], [ - "points", "points" ]); }; + ChartSeries.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartSeries.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -15800,27 +18395,40 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format", "points", "Points"]); }; ChartSeries.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartSeries.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartSeries.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartSeries.prototype.toJSON=function () { - return { - "format": this.m_format, - "name": this.m_name - }; + return _toJson(this, { + "name": this._N, + }, { + "format": this._F, + "points": this._P, + }); + }; + ChartSeries.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartSeries; }(OfficeExtension.ClientObject)); Excel.ChartSeries=ChartSeries; + var _typeChartSeriesFormat="ChartSeriesFormat"; var ChartSeriesFormat=(function (_super) { __extends(ChartSeriesFormat, _super); function ChartSeriesFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartSeriesFormat.prototype, "_className", { get: function () { @@ -15829,22 +18437,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartSeriesFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["fill", "line"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartSeriesFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartSeriesFormat.prototype, "line", { get: function () { - if (!this.m_line) { - this.m_line=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false)); + if (!this._L) { + this._L=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false, false)); } - return this.m_line; + return this._L; }, enumerable: true, configurable: true @@ -15854,6 +18469,9 @@ var Excel; "fill" ]); }; + ChartSeriesFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartSeriesFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -15863,22 +18481,32 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["fill", "Fill", "line", "Line"]); }; ChartSeriesFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartSeriesFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartSeriesFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartSeriesFormat.prototype.toJSON=function () { - return { - "fill": this.m_fill, - "line": this.m_line - }; + return _toJson(this, {}, { + "line": this._L, + }); + }; + ChartSeriesFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartSeriesFormat; }(OfficeExtension.ClientObject)); Excel.ChartSeriesFormat=ChartSeriesFormat; + var _typeChartPointsCollection="ChartPointsCollection"; var ChartPointsCollection=(function (_super) { __extends(ChartPointsCollection, _super); function ChartPointsCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartPointsCollection.prototype, "_className", { get: function () { @@ -15887,9 +18515,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartPointsCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartPointsCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartPointsCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ChartPointsCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeChartPointsCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15897,20 +18539,21 @@ var Excel; }); Object.defineProperty(ChartPointsCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "ChartPointsCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeChartPointsCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); ChartPointsCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("ChartPointsCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; ChartPointsCollection.prototype.getItemAt=function (index) { - return new Excel.ChartPoint(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.ChartPoint(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; ChartPointsCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15919,7 +18562,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15932,21 +18575,29 @@ var Excel; } }; ChartPointsCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartPointsCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartPointsCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.ChartPoint(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(false, _this.context, _this, childItemData, index)); }); }; ChartPointsCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return ChartPointsCollection; }(OfficeExtension.ClientObject)); Excel.ChartPointsCollection=ChartPointsCollection; + var _typeChartPoint="ChartPoint"; var ChartPoint=(function (_super) { __extends(ChartPoint, _super); function ChartPoint() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartPoint.prototype, "_className", { get: function () { @@ -15955,20 +18606,34 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartPoint.prototype, "_scalarPropertyNames", { + get: function () { + return ["value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartPoint.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartPoint.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartPointFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartPointFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartPoint.prototype, "value", { get: function () { - _throwIfNotLoaded("value", this.m_value, "ChartPoint", this._isNull); - return this.m_value; + _throwIfNotLoaded("value", this._V, _typeChartPoint, this._isNull); + return this._V; }, enumerable: true, configurable: true @@ -15980,27 +18645,39 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Value"])) { - this.m_value=obj["Value"]; + this._V=obj["Value"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; ChartPoint.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartPoint.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartPoint.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartPoint.prototype.toJSON=function () { - return { - "format": this.m_format, - "value": this.m_value - }; + return _toJson(this, { + "value": this._V, + }, { + "format": this._F, + }); + }; + ChartPoint.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartPoint; }(OfficeExtension.ClientObject)); Excel.ChartPoint=ChartPoint; + var _typeChartPointFormat="ChartPointFormat"; var ChartPointFormat=(function (_super) { __extends(ChartPointFormat, _super); function ChartPointFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartPointFormat.prototype, "_className", { get: function () { @@ -16009,12 +18686,19 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartPointFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["fill"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartPointFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true @@ -16028,21 +18712,26 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["fill", "Fill"]); }; ChartPointFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartPointFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartPointFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartPointFormat.prototype.toJSON=function () { - return { - "fill": this.m_fill - }; + return _toJson(this, {}, {}); }; return ChartPointFormat; }(OfficeExtension.ClientObject)); Excel.ChartPointFormat=ChartPointFormat; + var _typeChartAxes="ChartAxes"; var ChartAxes=(function (_super) { __extends(ChartAxes, _super); function ChartAxes() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartAxes.prototype, "_className", { get: function () { @@ -16051,32 +18740,39 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartAxes.prototype, "_navigationPropertyNames", { + get: function () { + return ["categoryAxis", "seriesAxis", "valueAxis"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartAxes.prototype, "categoryAxis", { get: function () { - if (!this.m_categoryAxis) { - this.m_categoryAxis=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "CategoryAxis", false, false)); + if (!this._C) { + this._C=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "CategoryAxis", false, false, false)); } - return this.m_categoryAxis; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxes.prototype, "seriesAxis", { get: function () { - if (!this.m_seriesAxis) { - this.m_seriesAxis=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "SeriesAxis", false, false)); + if (!this._S) { + this._S=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "SeriesAxis", false, false, false)); } - return this.m_seriesAxis; + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxes.prototype, "valueAxis", { get: function () { - if (!this.m_valueAxis) { - this.m_valueAxis=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "ValueAxis", false, false)); + if (!this._V) { + this._V=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "ValueAxis", false, false, false)); } - return this.m_valueAxis; + return this._V; }, enumerable: true, configurable: true @@ -16084,6 +18780,9 @@ var Excel; ChartAxes.prototype.set=function (properties, options) { this._recursivelySet(properties, options, [], ["categoryAxis", "seriesAxis", "valueAxis"], []); }; + ChartAxes.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartAxes.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16093,23 +18792,34 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["categoryAxis", "CategoryAxis", "seriesAxis", "SeriesAxis", "valueAxis", "ValueAxis"]); }; ChartAxes.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartAxes.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAxes.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartAxes.prototype.toJSON=function () { - return { - "categoryAxis": this.m_categoryAxis, - "seriesAxis": this.m_seriesAxis, - "valueAxis": this.m_valueAxis - }; + return _toJson(this, {}, { + "categoryAxis": this._C, + "seriesAxis": this._S, + "valueAxis": this._V, + }); + }; + ChartAxes.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartAxes; }(OfficeExtension.ClientObject)); Excel.ChartAxes=ChartAxes; + var _typeChartAxis="ChartAxis"; var ChartAxis=(function (_super) { __extends(ChartAxis, _super); function ChartAxis() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartAxis.prototype, "_className", { get: function () { @@ -16118,53 +18828,74 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartAxis.prototype, "_scalarPropertyNames", { + get: function () { + return ["majorUnit", "maximum", "minimum", "minorUnit"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxis.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxis.prototype, "_navigationPropertyNames", { + get: function () { + return ["majorGridlines", "minorGridlines", "title", "format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartAxis.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartAxisFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartAxisFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxis.prototype, "majorGridlines", { get: function () { - if (!this.m_majorGridlines) { - this.m_majorGridlines=new Excel.ChartGridlines(this.context, _createPropertyObjectPath(this.context, this, "MajorGridlines", false, false)); + if (!this._M) { + this._M=new Excel.ChartGridlines(this.context, _createPropertyObjectPath(this.context, this, "MajorGridlines", false, false, false)); } - return this.m_majorGridlines; + return this._M; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxis.prototype, "minorGridlines", { get: function () { - if (!this.m_minorGridlines) { - this.m_minorGridlines=new Excel.ChartGridlines(this.context, _createPropertyObjectPath(this.context, this, "MinorGridlines", false, false)); + if (!this._Min) { + this._Min=new Excel.ChartGridlines(this.context, _createPropertyObjectPath(this.context, this, "MinorGridlines", false, false, false)); } - return this.m_minorGridlines; + return this._Min; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxis.prototype, "title", { get: function () { - if (!this.m_title) { - this.m_title=new Excel.ChartAxisTitle(this.context, _createPropertyObjectPath(this.context, this, "Title", false, false)); + if (!this._T) { + this._T=new Excel.ChartAxisTitle(this.context, _createPropertyObjectPath(this.context, this, "Title", false, false, false)); } - return this.m_title; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxis.prototype, "majorUnit", { get: function () { - _throwIfNotLoaded("majorUnit", this.m_majorUnit, "ChartAxis", this._isNull); - return this.m_majorUnit; + _throwIfNotLoaded("majorUnit", this._Ma, _typeChartAxis, this._isNull); + return this._Ma; }, set: function (value) { - this.m_majorUnit=value; + this._Ma=value; _createSetPropertyAction(this.context, this, "MajorUnit", value); }, enumerable: true, @@ -16172,11 +18903,11 @@ var Excel; }); Object.defineProperty(ChartAxis.prototype, "maximum", { get: function () { - _throwIfNotLoaded("maximum", this.m_maximum, "ChartAxis", this._isNull); - return this.m_maximum; + _throwIfNotLoaded("maximum", this._Max, _typeChartAxis, this._isNull); + return this._Max; }, set: function (value) { - this.m_maximum=value; + this._Max=value; _createSetPropertyAction(this.context, this, "Maximum", value); }, enumerable: true, @@ -16184,11 +18915,11 @@ var Excel; }); Object.defineProperty(ChartAxis.prototype, "minimum", { get: function () { - _throwIfNotLoaded("minimum", this.m_minimum, "ChartAxis", this._isNull); - return this.m_minimum; + _throwIfNotLoaded("minimum", this._Mi, _typeChartAxis, this._isNull); + return this._Mi; }, set: function (value) { - this.m_minimum=value; + this._Mi=value; _createSetPropertyAction(this.context, this, "Minimum", value); }, enumerable: true, @@ -16196,11 +18927,11 @@ var Excel; }); Object.defineProperty(ChartAxis.prototype, "minorUnit", { get: function () { - _throwIfNotLoaded("minorUnit", this.m_minorUnit, "ChartAxis", this._isNull); - return this.m_minorUnit; + _throwIfNotLoaded("minorUnit", this._Mino, _typeChartAxis, this._isNull); + return this._Mino; }, set: function (value) { - this.m_minorUnit=value; + this._Mino=value; _createSetPropertyAction(this.context, this, "MinorUnit", value); }, enumerable: true, @@ -16209,6 +18940,9 @@ var Excel; ChartAxis.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["majorUnit", "maximum", "minimum", "minorUnit"], ["majorGridlines", "minorGridlines", "title", "format"], []); }; + ChartAxis.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartAxis.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16216,42 +18950,54 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["MajorUnit"])) { - this.m_majorUnit=obj["MajorUnit"]; + this._Ma=obj["MajorUnit"]; } if (!_isUndefined(obj["Maximum"])) { - this.m_maximum=obj["Maximum"]; + this._Max=obj["Maximum"]; } if (!_isUndefined(obj["Minimum"])) { - this.m_minimum=obj["Minimum"]; + this._Mi=obj["Minimum"]; } if (!_isUndefined(obj["MinorUnit"])) { - this.m_minorUnit=obj["MinorUnit"]; + this._Mino=obj["MinorUnit"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format", "majorGridlines", "MajorGridlines", "minorGridlines", "MinorGridlines", "title", "Title"]); }; ChartAxis.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartAxis.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAxis.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartAxis.prototype.toJSON=function () { - return { - "format": this.m_format, - "majorGridlines": this.m_majorGridlines, - "majorUnit": this.m_majorUnit, - "maximum": this.m_maximum, - "minimum": this.m_minimum, - "minorGridlines": this.m_minorGridlines, - "minorUnit": this.m_minorUnit, - "title": this.m_title - }; + return _toJson(this, { + "majorUnit": this._Ma, + "maximum": this._Max, + "minimum": this._Mi, + "minorUnit": this._Mino, + }, { + "format": this._F, + "majorGridlines": this._M, + "minorGridlines": this._Min, + "title": this._T, + }); + }; + ChartAxis.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartAxis; }(OfficeExtension.ClientObject)); Excel.ChartAxis=ChartAxis; + var _typeChartAxisFormat="ChartAxisFormat"; var ChartAxisFormat=(function (_super) { __extends(ChartAxisFormat, _super); function ChartAxisFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartAxisFormat.prototype, "_className", { get: function () { @@ -16260,22 +19006,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartAxisFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["font", "line"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartAxisFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._F) { + this._F=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxisFormat.prototype, "line", { get: function () { - if (!this.m_line) { - this.m_line=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false)); + if (!this._L) { + this._L=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false, false)); } - return this.m_line; + return this._L; }, enumerable: true, configurable: true @@ -16283,6 +19036,9 @@ var Excel; ChartAxisFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, [], ["font", "line"], []); }; + ChartAxisFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartAxisFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16292,22 +19048,33 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["font", "Font", "line", "Line"]); }; ChartAxisFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartAxisFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAxisFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartAxisFormat.prototype.toJSON=function () { - return { - "font": this.m_font, - "line": this.m_line - }; + return _toJson(this, {}, { + "font": this._F, + "line": this._L, + }); + }; + ChartAxisFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartAxisFormat; }(OfficeExtension.ClientObject)); Excel.ChartAxisFormat=ChartAxisFormat; + var _typeChartAxisTitle="ChartAxisTitle"; var ChartAxisTitle=(function (_super) { __extends(ChartAxisTitle, _super); function ChartAxisTitle() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartAxisTitle.prototype, "_className", { get: function () { @@ -16316,23 +19083,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartAxisTitle.prototype, "_scalarPropertyNames", { + get: function () { + return ["text", "visible"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxisTitle.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxisTitle.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartAxisTitle.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartAxisTitleFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartAxisTitleFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxisTitle.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "ChartAxisTitle", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._T, _typeChartAxisTitle, this._isNull); + return this._T; }, set: function (value) { - this.m_text=value; + this._T=value; _createSetPropertyAction(this.context, this, "Text", value); }, enumerable: true, @@ -16340,11 +19128,11 @@ var Excel; }); Object.defineProperty(ChartAxisTitle.prototype, "visible", { get: function () { - _throwIfNotLoaded("visible", this.m_visible, "ChartAxisTitle", this._isNull); - return this.m_visible; + _throwIfNotLoaded("visible", this._V, _typeChartAxisTitle, this._isNull); + return this._V; }, set: function (value) { - this.m_visible=value; + this._V=value; _createSetPropertyAction(this.context, this, "Visible", value); }, enumerable: true, @@ -16353,6 +19141,9 @@ var Excel; ChartAxisTitle.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["text", "visible"], ["format"], []); }; + ChartAxisTitle.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartAxisTitle.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16360,31 +19151,43 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._T=obj["Text"]; } if (!_isUndefined(obj["Visible"])) { - this.m_visible=obj["Visible"]; + this._V=obj["Visible"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; ChartAxisTitle.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartAxisTitle.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAxisTitle.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartAxisTitle.prototype.toJSON=function () { - return { - "format": this.m_format, - "text": this.m_text, - "visible": this.m_visible - }; + return _toJson(this, { + "text": this._T, + "visible": this._V, + }, { + "format": this._F, + }); + }; + ChartAxisTitle.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartAxisTitle; }(OfficeExtension.ClientObject)); Excel.ChartAxisTitle=ChartAxisTitle; + var _typeChartAxisTitleFormat="ChartAxisTitleFormat"; var ChartAxisTitleFormat=(function (_super) { __extends(ChartAxisTitleFormat, _super); function ChartAxisTitleFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartAxisTitleFormat.prototype, "_className", { get: function () { @@ -16393,12 +19196,19 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartAxisTitleFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["font"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartAxisTitleFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._F) { + this._F=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._F; }, enumerable: true, configurable: true @@ -16406,6 +19216,9 @@ var Excel; ChartAxisTitleFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, [], ["font"], []); }; + ChartAxisTitleFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartAxisTitleFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16415,46 +19228,78 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["font", "Font"]); }; ChartAxisTitleFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartAxisTitleFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAxisTitleFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartAxisTitleFormat.prototype.toJSON=function () { - return { - "font": this.m_font - }; + return _toJson(this, {}, { + "font": this._F, + }); + }; + ChartAxisTitleFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartAxisTitleFormat; }(OfficeExtension.ClientObject)); Excel.ChartAxisTitleFormat=ChartAxisTitleFormat; + var _typeChartDataLabels="ChartDataLabels"; var ChartDataLabels=(function (_super) { __extends(ChartDataLabels, _super); function ChartDataLabels() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartDataLabels.prototype, "_className", { get: function () { - return "ChartDataLabels"; + return "ChartDataLabels"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartDataLabels.prototype, "_scalarPropertyNames", { + get: function () { + return ["position", "showValue", "showSeriesName", "showCategoryName", "showLegendKey", "showPercentage", "showBubbleSize", "separator"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartDataLabels.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartDataLabels.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; }, enumerable: true, configurable: true }); Object.defineProperty(ChartDataLabels.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartDataLabelFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartDataLabelFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartDataLabels.prototype, "position", { get: function () { - _throwIfNotLoaded("position", this.m_position, "ChartDataLabels", this._isNull); - return this.m_position; + _throwIfNotLoaded("position", this._P, _typeChartDataLabels, this._isNull); + return this._P; }, set: function (value) { - this.m_position=value; + this._P=value; _createSetPropertyAction(this.context, this, "Position", value); }, enumerable: true, @@ -16462,11 +19307,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "separator", { get: function () { - _throwIfNotLoaded("separator", this.m_separator, "ChartDataLabels", this._isNull); - return this.m_separator; + _throwIfNotLoaded("separator", this._S, _typeChartDataLabels, this._isNull); + return this._S; }, set: function (value) { - this.m_separator=value; + this._S=value; _createSetPropertyAction(this.context, this, "Separator", value); }, enumerable: true, @@ -16474,11 +19319,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "showBubbleSize", { get: function () { - _throwIfNotLoaded("showBubbleSize", this.m_showBubbleSize, "ChartDataLabels", this._isNull); - return this.m_showBubbleSize; + _throwIfNotLoaded("showBubbleSize", this._Sh, _typeChartDataLabels, this._isNull); + return this._Sh; }, set: function (value) { - this.m_showBubbleSize=value; + this._Sh=value; _createSetPropertyAction(this.context, this, "ShowBubbleSize", value); }, enumerable: true, @@ -16486,11 +19331,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "showCategoryName", { get: function () { - _throwIfNotLoaded("showCategoryName", this.m_showCategoryName, "ChartDataLabels", this._isNull); - return this.m_showCategoryName; + _throwIfNotLoaded("showCategoryName", this._Sho, _typeChartDataLabels, this._isNull); + return this._Sho; }, set: function (value) { - this.m_showCategoryName=value; + this._Sho=value; _createSetPropertyAction(this.context, this, "ShowCategoryName", value); }, enumerable: true, @@ -16498,11 +19343,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "showLegendKey", { get: function () { - _throwIfNotLoaded("showLegendKey", this.m_showLegendKey, "ChartDataLabels", this._isNull); - return this.m_showLegendKey; + _throwIfNotLoaded("showLegendKey", this._Show, _typeChartDataLabels, this._isNull); + return this._Show; }, set: function (value) { - this.m_showLegendKey=value; + this._Show=value; _createSetPropertyAction(this.context, this, "ShowLegendKey", value); }, enumerable: true, @@ -16510,11 +19355,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "showPercentage", { get: function () { - _throwIfNotLoaded("showPercentage", this.m_showPercentage, "ChartDataLabels", this._isNull); - return this.m_showPercentage; + _throwIfNotLoaded("showPercentage", this._ShowP, _typeChartDataLabels, this._isNull); + return this._ShowP; }, set: function (value) { - this.m_showPercentage=value; + this._ShowP=value; _createSetPropertyAction(this.context, this, "ShowPercentage", value); }, enumerable: true, @@ -16522,11 +19367,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "showSeriesName", { get: function () { - _throwIfNotLoaded("showSeriesName", this.m_showSeriesName, "ChartDataLabels", this._isNull); - return this.m_showSeriesName; + _throwIfNotLoaded("showSeriesName", this._ShowS, _typeChartDataLabels, this._isNull); + return this._ShowS; }, set: function (value) { - this.m_showSeriesName=value; + this._ShowS=value; _createSetPropertyAction(this.context, this, "ShowSeriesName", value); }, enumerable: true, @@ -16534,11 +19379,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "showValue", { get: function () { - _throwIfNotLoaded("showValue", this.m_showValue, "ChartDataLabels", this._isNull); - return this.m_showValue; + _throwIfNotLoaded("showValue", this._ShowV, _typeChartDataLabels, this._isNull); + return this._ShowV; }, set: function (value) { - this.m_showValue=value; + this._ShowV=value; _createSetPropertyAction(this.context, this, "ShowValue", value); }, enumerable: true, @@ -16547,6 +19392,9 @@ var Excel; ChartDataLabels.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["position", "showValue", "showSeriesName", "showCategoryName", "showLegendKey", "showPercentage", "showBubbleSize", "separator"], ["format"], []); }; + ChartDataLabels.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartDataLabels.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16554,55 +19402,67 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Position"])) { - this.m_position=obj["Position"]; + this._P=obj["Position"]; } if (!_isUndefined(obj["Separator"])) { - this.m_separator=obj["Separator"]; + this._S=obj["Separator"]; } if (!_isUndefined(obj["ShowBubbleSize"])) { - this.m_showBubbleSize=obj["ShowBubbleSize"]; + this._Sh=obj["ShowBubbleSize"]; } if (!_isUndefined(obj["ShowCategoryName"])) { - this.m_showCategoryName=obj["ShowCategoryName"]; + this._Sho=obj["ShowCategoryName"]; } if (!_isUndefined(obj["ShowLegendKey"])) { - this.m_showLegendKey=obj["ShowLegendKey"]; + this._Show=obj["ShowLegendKey"]; } if (!_isUndefined(obj["ShowPercentage"])) { - this.m_showPercentage=obj["ShowPercentage"]; + this._ShowP=obj["ShowPercentage"]; } if (!_isUndefined(obj["ShowSeriesName"])) { - this.m_showSeriesName=obj["ShowSeriesName"]; + this._ShowS=obj["ShowSeriesName"]; } if (!_isUndefined(obj["ShowValue"])) { - this.m_showValue=obj["ShowValue"]; + this._ShowV=obj["ShowValue"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; ChartDataLabels.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartDataLabels.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartDataLabels.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartDataLabels.prototype.toJSON=function () { - return { - "format": this.m_format, - "position": this.m_position, - "separator": this.m_separator, - "showBubbleSize": this.m_showBubbleSize, - "showCategoryName": this.m_showCategoryName, - "showLegendKey": this.m_showLegendKey, - "showPercentage": this.m_showPercentage, - "showSeriesName": this.m_showSeriesName, - "showValue": this.m_showValue - }; + return _toJson(this, { + "position": this._P, + "separator": this._S, + "showBubbleSize": this._Sh, + "showCategoryName": this._Sho, + "showLegendKey": this._Show, + "showPercentage": this._ShowP, + "showSeriesName": this._ShowS, + "showValue": this._ShowV, + }, { + "format": this._F, + }); + }; + ChartDataLabels.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartDataLabels; }(OfficeExtension.ClientObject)); Excel.ChartDataLabels=ChartDataLabels; + var _typeChartDataLabelFormat="ChartDataLabelFormat"; var ChartDataLabelFormat=(function (_super) { __extends(ChartDataLabelFormat, _super); function ChartDataLabelFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartDataLabelFormat.prototype, "_className", { get: function () { @@ -16611,22 +19471,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartDataLabelFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["font", "fill"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartDataLabelFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartDataLabelFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true @@ -16636,6 +19503,9 @@ var Excel; "fill" ]); }; + ChartDataLabelFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartDataLabelFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16645,22 +19515,32 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["fill", "Fill", "font", "Font"]); }; ChartDataLabelFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartDataLabelFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartDataLabelFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartDataLabelFormat.prototype.toJSON=function () { - return { - "fill": this.m_fill, - "font": this.m_font - }; + return _toJson(this, {}, { + "font": this._Fo, + }); + }; + ChartDataLabelFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartDataLabelFormat; }(OfficeExtension.ClientObject)); Excel.ChartDataLabelFormat=ChartDataLabelFormat; + var _typeChartGridlines="ChartGridlines"; var ChartGridlines=(function (_super) { __extends(ChartGridlines, _super); function ChartGridlines() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartGridlines.prototype, "_className", { get: function () { @@ -16669,23 +19549,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartGridlines.prototype, "_scalarPropertyNames", { + get: function () { + return ["visible"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartGridlines.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartGridlines.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartGridlines.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartGridlinesFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartGridlinesFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartGridlines.prototype, "visible", { get: function () { - _throwIfNotLoaded("visible", this.m_visible, "ChartGridlines", this._isNull); - return this.m_visible; + _throwIfNotLoaded("visible", this._V, _typeChartGridlines, this._isNull); + return this._V; }, set: function (value) { - this.m_visible=value; + this._V=value; _createSetPropertyAction(this.context, this, "Visible", value); }, enumerable: true, @@ -16694,6 +19595,9 @@ var Excel; ChartGridlines.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["visible"], ["format"], []); }; + ChartGridlines.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartGridlines.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16701,27 +19605,39 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Visible"])) { - this.m_visible=obj["Visible"]; + this._V=obj["Visible"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; ChartGridlines.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartGridlines.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartGridlines.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartGridlines.prototype.toJSON=function () { - return { - "format": this.m_format, - "visible": this.m_visible - }; + return _toJson(this, { + "visible": this._V, + }, { + "format": this._F, + }); + }; + ChartGridlines.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartGridlines; }(OfficeExtension.ClientObject)); Excel.ChartGridlines=ChartGridlines; + var _typeChartGridlinesFormat="ChartGridlinesFormat"; var ChartGridlinesFormat=(function (_super) { __extends(ChartGridlinesFormat, _super); function ChartGridlinesFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartGridlinesFormat.prototype, "_className", { get: function () { @@ -16730,12 +19646,19 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartGridlinesFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["line"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartGridlinesFormat.prototype, "line", { get: function () { - if (!this.m_line) { - this.m_line=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false)); + if (!this._L) { + this._L=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false, false)); } - return this.m_line; + return this._L; }, enumerable: true, configurable: true @@ -16743,6 +19666,9 @@ var Excel; ChartGridlinesFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, [], ["line"], []); }; + ChartGridlinesFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartGridlinesFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16752,21 +19678,32 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["line", "Line"]); }; ChartGridlinesFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartGridlinesFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartGridlinesFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartGridlinesFormat.prototype.toJSON=function () { - return { - "line": this.m_line - }; + return _toJson(this, {}, { + "line": this._L, + }); + }; + ChartGridlinesFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartGridlinesFormat; }(OfficeExtension.ClientObject)); Excel.ChartGridlinesFormat=ChartGridlinesFormat; + var _typeChartLegend="ChartLegend"; var ChartLegend=(function (_super) { __extends(ChartLegend, _super); function ChartLegend() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartLegend.prototype, "_className", { get: function () { @@ -16775,23 +19712,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartLegend.prototype, "_scalarPropertyNames", { + get: function () { + return ["visible", "position", "overlay"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartLegend.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartLegend.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartLegend.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartLegendFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartLegendFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartLegend.prototype, "overlay", { get: function () { - _throwIfNotLoaded("overlay", this.m_overlay, "ChartLegend", this._isNull); - return this.m_overlay; + _throwIfNotLoaded("overlay", this._O, _typeChartLegend, this._isNull); + return this._O; }, set: function (value) { - this.m_overlay=value; + this._O=value; _createSetPropertyAction(this.context, this, "Overlay", value); }, enumerable: true, @@ -16799,11 +19757,11 @@ var Excel; }); Object.defineProperty(ChartLegend.prototype, "position", { get: function () { - _throwIfNotLoaded("position", this.m_position, "ChartLegend", this._isNull); - return this.m_position; + _throwIfNotLoaded("position", this._P, _typeChartLegend, this._isNull); + return this._P; }, set: function (value) { - this.m_position=value; + this._P=value; _createSetPropertyAction(this.context, this, "Position", value); }, enumerable: true, @@ -16811,11 +19769,11 @@ var Excel; }); Object.defineProperty(ChartLegend.prototype, "visible", { get: function () { - _throwIfNotLoaded("visible", this.m_visible, "ChartLegend", this._isNull); - return this.m_visible; + _throwIfNotLoaded("visible", this._V, _typeChartLegend, this._isNull); + return this._V; }, set: function (value) { - this.m_visible=value; + this._V=value; _createSetPropertyAction(this.context, this, "Visible", value); }, enumerable: true, @@ -16824,6 +19782,9 @@ var Excel; ChartLegend.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["visible", "position", "overlay"], ["format"], []); }; + ChartLegend.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartLegend.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16831,35 +19792,47 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Overlay"])) { - this.m_overlay=obj["Overlay"]; + this._O=obj["Overlay"]; } if (!_isUndefined(obj["Position"])) { - this.m_position=obj["Position"]; + this._P=obj["Position"]; } if (!_isUndefined(obj["Visible"])) { - this.m_visible=obj["Visible"]; + this._V=obj["Visible"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; ChartLegend.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartLegend.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartLegend.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartLegend.prototype.toJSON=function () { - return { - "format": this.m_format, - "overlay": this.m_overlay, - "position": this.m_position, - "visible": this.m_visible - }; + return _toJson(this, { + "overlay": this._O, + "position": this._P, + "visible": this._V, + }, { + "format": this._F, + }); + }; + ChartLegend.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartLegend; }(OfficeExtension.ClientObject)); Excel.ChartLegend=ChartLegend; + var _typeChartLegendFormat="ChartLegendFormat"; var ChartLegendFormat=(function (_super) { __extends(ChartLegendFormat, _super); function ChartLegendFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartLegendFormat.prototype, "_className", { get: function () { @@ -16868,22 +19841,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartLegendFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["font", "fill"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartLegendFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartLegendFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true @@ -16893,6 +19873,9 @@ var Excel; "fill" ]); }; + ChartLegendFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartLegendFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16902,22 +19885,32 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["fill", "Fill", "font", "Font"]); }; ChartLegendFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartLegendFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartLegendFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartLegendFormat.prototype.toJSON=function () { - return { - "fill": this.m_fill, - "font": this.m_font - }; + return _toJson(this, {}, { + "font": this._Fo, + }); + }; + ChartLegendFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartLegendFormat; }(OfficeExtension.ClientObject)); Excel.ChartLegendFormat=ChartLegendFormat; + var _typeChartTitle="ChartTitle"; var ChartTitle=(function (_super) { __extends(ChartTitle, _super); function ChartTitle() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartTitle.prototype, "_className", { get: function () { @@ -16926,23 +19919,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartTitle.prototype, "_scalarPropertyNames", { + get: function () { + return ["visible", "text", "overlay"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartTitle.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartTitle.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartTitle.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartTitleFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartTitleFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartTitle.prototype, "overlay", { get: function () { - _throwIfNotLoaded("overlay", this.m_overlay, "ChartTitle", this._isNull); - return this.m_overlay; + _throwIfNotLoaded("overlay", this._O, _typeChartTitle, this._isNull); + return this._O; }, set: function (value) { - this.m_overlay=value; + this._O=value; _createSetPropertyAction(this.context, this, "Overlay", value); }, enumerable: true, @@ -16950,11 +19964,11 @@ var Excel; }); Object.defineProperty(ChartTitle.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "ChartTitle", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._T, _typeChartTitle, this._isNull); + return this._T; }, set: function (value) { - this.m_text=value; + this._T=value; _createSetPropertyAction(this.context, this, "Text", value); }, enumerable: true, @@ -16962,11 +19976,11 @@ var Excel; }); Object.defineProperty(ChartTitle.prototype, "visible", { get: function () { - _throwIfNotLoaded("visible", this.m_visible, "ChartTitle", this._isNull); - return this.m_visible; + _throwIfNotLoaded("visible", this._V, _typeChartTitle, this._isNull); + return this._V; }, set: function (value) { - this.m_visible=value; + this._V=value; _createSetPropertyAction(this.context, this, "Visible", value); }, enumerable: true, @@ -16975,6 +19989,9 @@ var Excel; ChartTitle.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["visible", "text", "overlay"], ["format"], []); }; + ChartTitle.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartTitle.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16982,35 +19999,47 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Overlay"])) { - this.m_overlay=obj["Overlay"]; + this._O=obj["Overlay"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._T=obj["Text"]; } if (!_isUndefined(obj["Visible"])) { - this.m_visible=obj["Visible"]; + this._V=obj["Visible"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; ChartTitle.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartTitle.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartTitle.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartTitle.prototype.toJSON=function () { - return { - "format": this.m_format, - "overlay": this.m_overlay, - "text": this.m_text, - "visible": this.m_visible - }; + return _toJson(this, { + "overlay": this._O, + "text": this._T, + "visible": this._V, + }, { + "format": this._F, + }); + }; + ChartTitle.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartTitle; }(OfficeExtension.ClientObject)); Excel.ChartTitle=ChartTitle; + var _typeChartTitleFormat="ChartTitleFormat"; var ChartTitleFormat=(function (_super) { __extends(ChartTitleFormat, _super); function ChartTitleFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartTitleFormat.prototype, "_className", { get: function () { @@ -17019,22 +20048,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartTitleFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["font", "fill"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartTitleFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartTitleFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true @@ -17044,6 +20080,9 @@ var Excel; "fill" ]); }; + ChartTitleFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartTitleFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -17053,22 +20092,32 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["fill", "Fill", "font", "Font"]); }; ChartTitleFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartTitleFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartTitleFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartTitleFormat.prototype.toJSON=function () { - return { - "fill": this.m_fill, - "font": this.m_font - }; + return _toJson(this, {}, { + "font": this._Fo, + }); + }; + ChartTitleFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartTitleFormat; }(OfficeExtension.ClientObject)); Excel.ChartTitleFormat=ChartTitleFormat; + var _typeChartFill="ChartFill"; var ChartFill=(function (_super) { __extends(ChartFill, _super); function ChartFill() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartFill.prototype, "_className", { get: function () { @@ -17082,10 +20131,10 @@ var Excel; return this; }; ChartFill.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; ChartFill.prototype.setSolidColor=function (color) { - _createMethodAction(this.context, this, "SetSolidColor", 0, [color]); + _createMethodAction(this.context, this, "SetSolidColor", 0, [color], false); }; ChartFill.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17094,16 +20143,21 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); }; + ChartFill.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; ChartFill.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}); }; return ChartFill; }(OfficeExtension.ClientObject)); Excel.ChartFill=ChartFill; + var _typeChartLineFormat="ChartLineFormat"; var ChartLineFormat=(function (_super) { __extends(ChartLineFormat, _super); function ChartLineFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartLineFormat.prototype, "_className", { get: function () { @@ -17112,13 +20166,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartLineFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["color"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartLineFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartLineFormat.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "ChartLineFormat", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeChartLineFormat, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -17127,8 +20195,11 @@ var Excel; ChartLineFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["color"], [], []); }; + ChartLineFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartLineFormat.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; ChartLineFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17137,25 +20208,36 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } }; ChartLineFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartLineFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartLineFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartLineFormat.prototype.toJSON=function () { - return { - "color": this.m_color - }; + return _toJson(this, { + "color": this._C, + }, {}); + }; + ChartLineFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartLineFormat; }(OfficeExtension.ClientObject)); Excel.ChartLineFormat=ChartLineFormat; + var _typeChartFont="ChartFont"; var ChartFont=(function (_super) { __extends(ChartFont, _super); function ChartFont() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartFont.prototype, "_className", { get: function () { @@ -17164,13 +20246,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartFont.prototype, "_scalarPropertyNames", { + get: function () { + return ["bold", "color", "italic", "name", "size", "underline"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartFont.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartFont.prototype, "bold", { get: function () { - _throwIfNotLoaded("bold", this.m_bold, "ChartFont", this._isNull); - return this.m_bold; + _throwIfNotLoaded("bold", this._B, _typeChartFont, this._isNull); + return this._B; }, set: function (value) { - this.m_bold=value; + this._B=value; _createSetPropertyAction(this.context, this, "Bold", value); }, enumerable: true, @@ -17178,11 +20274,11 @@ var Excel; }); Object.defineProperty(ChartFont.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "ChartFont", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeChartFont, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -17190,11 +20286,11 @@ var Excel; }); Object.defineProperty(ChartFont.prototype, "italic", { get: function () { - _throwIfNotLoaded("italic", this.m_italic, "ChartFont", this._isNull); - return this.m_italic; + _throwIfNotLoaded("italic", this._I, _typeChartFont, this._isNull); + return this._I; }, set: function (value) { - this.m_italic=value; + this._I=value; _createSetPropertyAction(this.context, this, "Italic", value); }, enumerable: true, @@ -17202,11 +20298,11 @@ var Excel; }); Object.defineProperty(ChartFont.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "ChartFont", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeChartFont, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -17214,11 +20310,11 @@ var Excel; }); Object.defineProperty(ChartFont.prototype, "size", { get: function () { - _throwIfNotLoaded("size", this.m_size, "ChartFont", this._isNull); - return this.m_size; + _throwIfNotLoaded("size", this._S, _typeChartFont, this._isNull); + return this._S; }, set: function (value) { - this.m_size=value; + this._S=value; _createSetPropertyAction(this.context, this, "Size", value); }, enumerable: true, @@ -17226,11 +20322,11 @@ var Excel; }); Object.defineProperty(ChartFont.prototype, "underline", { get: function () { - _throwIfNotLoaded("underline", this.m_underline, "ChartFont", this._isNull); - return this.m_underline; + _throwIfNotLoaded("underline", this._U, _typeChartFont, this._isNull); + return this._U; }, set: function (value) { - this.m_underline=value; + this._U=value; _createSetPropertyAction(this.context, this, "Underline", value); }, enumerable: true, @@ -17239,6 +20335,9 @@ var Excel; ChartFont.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["bold", "color", "italic", "name", "size", "underline"], [], []); }; + ChartFont.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartFont.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -17246,45 +20345,56 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Bold"])) { - this.m_bold=obj["Bold"]; + this._B=obj["Bold"]; } if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["Italic"])) { - this.m_italic=obj["Italic"]; + this._I=obj["Italic"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Size"])) { - this.m_size=obj["Size"]; + this._S=obj["Size"]; } if (!_isUndefined(obj["Underline"])) { - this.m_underline=obj["Underline"]; + this._U=obj["Underline"]; } }; ChartFont.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartFont.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartFont.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartFont.prototype.toJSON=function () { - return { - "bold": this.m_bold, - "color": this.m_color, - "italic": this.m_italic, - "name": this.m_name, - "size": this.m_size, - "underline": this.m_underline - }; + return _toJson(this, { + "bold": this._B, + "color": this._C, + "italic": this._I, + "name": this._N, + "size": this._S, + "underline": this._U, + }, {}); + }; + ChartFont.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartFont; }(OfficeExtension.ClientObject)); Excel.ChartFont=ChartFont; + var _typeRangeSort="RangeSort"; var RangeSort=(function (_super) { __extends(RangeSort, _super); function RangeSort() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeSort.prototype, "_className", { get: function () { @@ -17294,7 +20404,7 @@ var Excel; configurable: true }); RangeSort.prototype.apply=function (fields, matchCase, hasHeaders, orientation, method) { - _createMethodAction(this.context, this, "Apply", 0, [fields, matchCase, hasHeaders, orientation, method]); + _createMethodAction(this.context, this, "Apply", 0, [fields, matchCase, hasHeaders, orientation, method], false); }; RangeSort.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17303,16 +20413,21 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); }; + RangeSort.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; RangeSort.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}); }; return RangeSort; }(OfficeExtension.ClientObject)); Excel.RangeSort=RangeSort; + var _typeTableSort="TableSort"; var TableSort=(function (_super) { __extends(TableSort, _super); function TableSort() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableSort.prototype, "_className", { get: function () { @@ -17321,38 +20436,45 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TableSort.prototype, "_scalarPropertyNames", { + get: function () { + return ["matchCase", "method", "fields"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TableSort.prototype, "fields", { get: function () { - _throwIfNotLoaded("fields", this.m_fields, "TableSort", this._isNull); - return this.m_fields; + _throwIfNotLoaded("fields", this._F, _typeTableSort, this._isNull); + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(TableSort.prototype, "matchCase", { get: function () { - _throwIfNotLoaded("matchCase", this.m_matchCase, "TableSort", this._isNull); - return this.m_matchCase; + _throwIfNotLoaded("matchCase", this._M, _typeTableSort, this._isNull); + return this._M; }, enumerable: true, configurable: true }); Object.defineProperty(TableSort.prototype, "method", { get: function () { - _throwIfNotLoaded("method", this.m_method, "TableSort", this._isNull); - return this.m_method; + _throwIfNotLoaded("method", this._Me, _typeTableSort, this._isNull); + return this._Me; }, enumerable: true, configurable: true }); TableSort.prototype.apply=function (fields, matchCase, method) { - _createMethodAction(this.context, this, "Apply", 0, [fields, matchCase, method]); + _createMethodAction(this.context, this, "Apply", 0, [fields, matchCase, method], false); }; TableSort.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; TableSort.prototype.reapply=function () { - _createMethodAction(this.context, this, "Reapply", 0, []); + _createMethodAction(this.context, this, "Reapply", 0, [], false); }; TableSort.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17361,33 +20483,44 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Fields"])) { - this.m_fields=obj["Fields"]; + this._F=obj["Fields"]; } if (!_isUndefined(obj["MatchCase"])) { - this.m_matchCase=obj["MatchCase"]; + this._M=obj["MatchCase"]; } if (!_isUndefined(obj["Method"])) { - this.m_method=obj["Method"]; + this._Me=obj["Method"]; } }; TableSort.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableSort.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableSort.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; TableSort.prototype.toJSON=function () { - return { - "fields": this.m_fields, - "matchCase": this.m_matchCase, - "method": this.m_method - }; + return _toJson(this, { + "fields": this._F, + "matchCase": this._M, + "method": this._Me, + }, {}); + }; + TableSort.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TableSort; }(OfficeExtension.ClientObject)); Excel.TableSort=TableSort; + var _typeFilter="Filter"; var Filter=(function (_super) { __extends(Filter, _super); function Filter() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Filter.prototype, "_className", { get: function () { @@ -17396,49 +20529,56 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Filter.prototype, "_scalarPropertyNames", { + get: function () { + return ["criteria"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(Filter.prototype, "criteria", { get: function () { - _throwIfNotLoaded("criteria", this.m_criteria, "Filter", this._isNull); - return this.m_criteria; + _throwIfNotLoaded("criteria", this._C, _typeFilter, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Filter.prototype.apply=function (criteria) { - _createMethodAction(this.context, this, "Apply", 0, [criteria]); + _createMethodAction(this.context, this, "Apply", 0, [criteria], false); }; Filter.prototype.applyBottomItemsFilter=function (count) { - _createMethodAction(this.context, this, "ApplyBottomItemsFilter", 0, [count]); + _createMethodAction(this.context, this, "ApplyBottomItemsFilter", 0, [count], false); }; Filter.prototype.applyBottomPercentFilter=function (percent) { - _createMethodAction(this.context, this, "ApplyBottomPercentFilter", 0, [percent]); + _createMethodAction(this.context, this, "ApplyBottomPercentFilter", 0, [percent], false); }; Filter.prototype.applyCellColorFilter=function (color) { - _createMethodAction(this.context, this, "ApplyCellColorFilter", 0, [color]); + _createMethodAction(this.context, this, "ApplyCellColorFilter", 0, [color], false); }; Filter.prototype.applyCustomFilter=function (criteria1, criteria2, oper) { - _createMethodAction(this.context, this, "ApplyCustomFilter", 0, [criteria1, criteria2, oper]); + _createMethodAction(this.context, this, "ApplyCustomFilter", 0, [criteria1, criteria2, oper], false); }; Filter.prototype.applyDynamicFilter=function (criteria) { - _createMethodAction(this.context, this, "ApplyDynamicFilter", 0, [criteria]); + _createMethodAction(this.context, this, "ApplyDynamicFilter", 0, [criteria], false); }; Filter.prototype.applyFontColorFilter=function (color) { - _createMethodAction(this.context, this, "ApplyFontColorFilter", 0, [color]); + _createMethodAction(this.context, this, "ApplyFontColorFilter", 0, [color], false); }; Filter.prototype.applyIconFilter=function (icon) { - _createMethodAction(this.context, this, "ApplyIconFilter", 0, [icon]); + _createMethodAction(this.context, this, "ApplyIconFilter", 0, [icon], false); }; Filter.prototype.applyTopItemsFilter=function (count) { - _createMethodAction(this.context, this, "ApplyTopItemsFilter", 0, [count]); + _createMethodAction(this.context, this, "ApplyTopItemsFilter", 0, [count], false); }; Filter.prototype.applyTopPercentFilter=function (percent) { - _createMethodAction(this.context, this, "ApplyTopPercentFilter", 0, [percent]); + _createMethodAction(this.context, this, "ApplyTopPercentFilter", 0, [percent], false); }; Filter.prototype.applyValuesFilter=function (values) { - _createMethodAction(this.context, this, "ApplyValuesFilter", 0, [values]); + _createMethodAction(this.context, this, "ApplyValuesFilter", 0, [values], false); }; Filter.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; Filter.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17447,25 +20587,36 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Criteria"])) { - this.m_criteria=obj["Criteria"]; + this._C=obj["Criteria"]; } }; Filter.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Filter.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Filter.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; Filter.prototype.toJSON=function () { - return { - "criteria": this.m_criteria - }; + return _toJson(this, { + "criteria": this._C, + }, {}); + }; + Filter.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Filter; }(OfficeExtension.ClientObject)); Excel.Filter=Filter; + var _typeCustomXmlPartScopedCollection="CustomXmlPartScopedCollection"; var CustomXmlPartScopedCollection=(function (_super) { __extends(CustomXmlPartScopedCollection, _super); function CustomXmlPartScopedCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CustomXmlPartScopedCollection.prototype, "_className", { get: function () { @@ -17474,16 +20625,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(CustomXmlPartScopedCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(CustomXmlPartScopedCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "CustomXmlPartScopedCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeCustomXmlPartScopedCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); CustomXmlPartScopedCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -17492,13 +20650,13 @@ var Excel; return new Excel.CustomXmlPart(this.context, _createIndexerObjectPath(this.context, this, [id])); }; CustomXmlPartScopedCollection.prototype.getItemOrNullObject=function (id) { - return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null)); + return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null, false)); }; CustomXmlPartScopedCollection.prototype.getOnlyItem=function () { - return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetOnlyItem", 1, [], false, false, null)); + return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetOnlyItem", 1, [], false, false, null, false)); }; CustomXmlPartScopedCollection.prototype.getOnlyItemOrNullObject=function () { - return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetOnlyItemOrNullObject", 1, [], false, false, null)); + return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetOnlyItemOrNullObject", 1, [], false, false, null, false)); }; CustomXmlPartScopedCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17517,19 +20675,27 @@ var Excel; } }; CustomXmlPartScopedCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CustomXmlPartScopedCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CustomXmlPartScopedCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.CustomXmlPart(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; CustomXmlPartScopedCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return CustomXmlPartScopedCollection; }(OfficeExtension.ClientObject)); Excel.CustomXmlPartScopedCollection=CustomXmlPartScopedCollection; + var _typeCustomXmlPartCollection="CustomXmlPartCollection"; var CustomXmlPartCollection=(function (_super) { __extends(CustomXmlPartCollection, _super); function CustomXmlPartCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CustomXmlPartCollection.prototype, "_className", { get: function () { @@ -17538,22 +20704,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(CustomXmlPartCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(CustomXmlPartCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "CustomXmlPartCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeCustomXmlPartCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); CustomXmlPartCollection.prototype.add=function (xml) { - return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [xml], false, true, null)); + return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [xml], false, true, null, false)); }; CustomXmlPartCollection.prototype.getByNamespace=function (namespaceUri) { - return new Excel.CustomXmlPartScopedCollection(this.context, _createMethodObjectPath(this.context, this, "GetByNamespace", 1, [namespaceUri], true, false, null)); + return new Excel.CustomXmlPartScopedCollection(this.context, _createMethodObjectPath(this.context, this, "GetByNamespace", 1, [namespaceUri], true, false, null, false)); }; CustomXmlPartCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -17562,7 +20735,7 @@ var Excel; return new Excel.CustomXmlPart(this.context, _createIndexerObjectPath(this.context, this, [id])); }; CustomXmlPartCollection.prototype.getItemOrNullObject=function (id) { - return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null)); + return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null, false)); }; CustomXmlPartCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17581,19 +20754,27 @@ var Excel; } }; CustomXmlPartCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CustomXmlPartCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CustomXmlPartCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.CustomXmlPart(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; CustomXmlPartCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return CustomXmlPartCollection; }(OfficeExtension.ClientObject)); Excel.CustomXmlPartCollection=CustomXmlPartCollection; + var _typeCustomXmlPart="CustomXmlPart"; var CustomXmlPart=(function (_super) { __extends(CustomXmlPart, _super); function CustomXmlPart() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CustomXmlPart.prototype, "_className", { get: function () { @@ -17602,33 +20783,40 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(CustomXmlPart.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "namespaceUri"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(CustomXmlPart.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "CustomXmlPart", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeCustomXmlPart, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(CustomXmlPart.prototype, "namespaceUri", { get: function () { - _throwIfNotLoaded("namespaceUri", this.m_namespaceUri, "CustomXmlPart", this._isNull); - return this.m_namespaceUri; + _throwIfNotLoaded("namespaceUri", this._N, _typeCustomXmlPart, this._isNull); + return this._N; }, enumerable: true, configurable: true }); CustomXmlPart.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; CustomXmlPart.prototype.getXml=function () { - var action=_createMethodAction(this.context, this, "GetXml", 1, []); + var action=_createMethodAction(this.context, this, "GetXml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; CustomXmlPart.prototype.setXml=function (xml) { - _createMethodAction(this.context, this, "SetXml", 0, [xml]); + _createMethodAction(this.context, this, "SetXml", 0, [xml], false); }; CustomXmlPart.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17637,15 +20825,17 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["NamespaceUri"])) { - this.m_namespaceUri=obj["NamespaceUri"]; + this._N=obj["NamespaceUri"]; } }; CustomXmlPart.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CustomXmlPart.prototype.retrieve=function (option) { + return _retrieve(this, option); }; CustomXmlPart.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -17653,22 +20843,31 @@ var Excel; return; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; + CustomXmlPart.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; CustomXmlPart.prototype.toJSON=function () { - return { - "id": this.m_id, - "namespaceUri": this.m_namespaceUri - }; + return _toJson(this, { + "id": this._I, + "namespaceUri": this._N, + }, {}); + }; + CustomXmlPart.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return CustomXmlPart; }(OfficeExtension.ClientObject)); Excel.CustomXmlPart=CustomXmlPart; + var _type_V1Api="_V1Api"; var _V1Api=(function (_super) { __extends(_V1Api, _super); function _V1Api() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(_V1Api.prototype, "_className", { get: function () { @@ -17678,109 +20877,110 @@ var Excel; configurable: true }); _V1Api.prototype.bindingAddColumns=function (input) { - var action=_createMethodAction(this.context, this, "BindingAddColumns", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingAddColumns", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingAddFromNamedItem=function (input) { - var action=_createMethodAction(this.context, this, "BindingAddFromNamedItem", 1, [input]); + var action=_createMethodAction(this.context, this, "BindingAddFromNamedItem", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingAddFromPrompt=function (input) { - var action=_createMethodAction(this.context, this, "BindingAddFromPrompt", 1, [input]); + var action=_createMethodAction(this.context, this, "BindingAddFromPrompt", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingAddFromSelection=function (input) { - var action=_createMethodAction(this.context, this, "BindingAddFromSelection", 1, [input]); + var action=_createMethodAction(this.context, this, "BindingAddFromSelection", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingAddRows=function (input) { - var action=_createMethodAction(this.context, this, "BindingAddRows", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingAddRows", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingClearFormats=function (input) { - var action=_createMethodAction(this.context, this, "BindingClearFormats", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingClearFormats", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingDeleteAllDataValues=function (input) { - var action=_createMethodAction(this.context, this, "BindingDeleteAllDataValues", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingDeleteAllDataValues", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingGetAll=function () { - var action=_createMethodAction(this.context, this, "BindingGetAll", 1, []); + var action=_createMethodAction(this.context, this, "BindingGetAll", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingGetById=function (input) { - var action=_createMethodAction(this.context, this, "BindingGetById", 1, [input]); + var action=_createMethodAction(this.context, this, "BindingGetById", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingGetData=function (input) { - var action=_createMethodAction(this.context, this, "BindingGetData", 1, [input]); + var action=_createMethodAction(this.context, this, "BindingGetData", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingReleaseById=function (input) { - var action=_createMethodAction(this.context, this, "BindingReleaseById", 1, [input]); + var action=_createMethodAction(this.context, this, "BindingReleaseById", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingSetData=function (input) { - var action=_createMethodAction(this.context, this, "BindingSetData", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingSetData", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingSetFormats=function (input) { - var action=_createMethodAction(this.context, this, "BindingSetFormats", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingSetFormats", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingSetTableOptions=function (input) { - var action=_createMethodAction(this.context, this, "BindingSetTableOptions", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingSetTableOptions", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.getFilePropertiesAsync=function () { - var action=_createMethodAction(this.context, this, "GetFilePropertiesAsync", 1, []); + _throwIfApiNotSupported("_V1Api.getFilePropertiesAsync", _defaultApiSetName, "1.6", _hostName); + var action=_createMethodAction(this.context, this, "GetFilePropertiesAsync", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.getSelectedData=function (input) { - var action=_createMethodAction(this.context, this, "GetSelectedData", 1, [input]); + var action=_createMethodAction(this.context, this, "GetSelectedData", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.gotoById=function (input) { - var action=_createMethodAction(this.context, this, "GotoById", 1, [input]); + var action=_createMethodAction(this.context, this, "GotoById", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.setSelectedData=function (input) { - var action=_createMethodAction(this.context, this, "SetSelectedData", 0, [input]); + var action=_createMethodAction(this.context, this, "SetSelectedData", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -17792,16 +20992,21 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); }; + _V1Api.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; _V1Api.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}); }; return _V1Api; }(OfficeExtension.ClientObject)); Excel._V1Api=_V1Api; + var _typePivotTableCollection="PivotTableCollection"; var PivotTableCollection=(function (_super) { __extends(PivotTableCollection, _super); function PivotTableCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(PivotTableCollection.prototype, "_className", { get: function () { @@ -17810,16 +21015,24 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(PivotTableCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(PivotTableCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "PivotTableCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typePivotTableCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); PivotTableCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("PivotTableCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -17828,10 +21041,11 @@ var Excel; return new Excel.PivotTable(this.context, _createIndexerObjectPath(this.context, this, [name])); }; PivotTableCollection.prototype.getItemOrNullObject=function (name) { - return new Excel.PivotTable(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null)); + _throwIfApiNotSupported("PivotTableCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.PivotTable(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null, false)); }; PivotTableCollection.prototype.refreshAll=function () { - _createMethodAction(this.context, this, "RefreshAll", 0, []); + _createMethodAction(this.context, this, "RefreshAll", 0, [], false); }; PivotTableCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17850,19 +21064,27 @@ var Excel; } }; PivotTableCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + PivotTableCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + PivotTableCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.PivotTable(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; PivotTableCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return PivotTableCollection; }(OfficeExtension.ClientObject)); Excel.PivotTableCollection=PivotTableCollection; + var _typePivotTable="PivotTable"; var PivotTable=(function (_super) { __extends(PivotTable, _super); function PivotTable() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(PivotTable.prototype, "_className", { get: function () { @@ -17871,31 +21093,53 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(PivotTable.prototype, "_scalarPropertyNames", { + get: function () { + return ["name", "id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PivotTable.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PivotTable.prototype, "_navigationPropertyNames", { + get: function () { + return ["worksheet"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(PivotTable.prototype, "worksheet", { get: function () { - if (!this.m_worksheet) { - this.m_worksheet=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false)); + if (!this._W) { + this._W=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false, false)); } - return this.m_worksheet; + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(PivotTable.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "PivotTable", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typePivotTable, this._isNull); + _throwIfApiNotSupported("PivotTable.id", _defaultApiSetName, "1.5", _hostName); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(PivotTable.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "PivotTable", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typePivotTable, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -17903,12 +21147,14 @@ var Excel; }); PivotTable.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["name"], [], [ - "worksheet", "worksheet" ]); }; + PivotTable.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; PivotTable.prototype.refresh=function () { - _createMethodAction(this.context, this, "Refresh", 0, []); + _createMethodAction(this.context, this, "Refresh", 0, [], false); }; PivotTable.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17917,16 +21163,18 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } _handleNavigationPropertyResults(this, obj, ["worksheet", "Worksheet"]); }; PivotTable.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + PivotTable.prototype.retrieve=function (option) { + return _retrieve(this, option); }; PivotTable.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -17934,22 +21182,31 @@ var Excel; return; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; + PivotTable.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; PivotTable.prototype.toJSON=function () { - return { - "id": this.m_id, - "name": this.m_name - }; + return _toJson(this, { + "id": this._I, + "name": this._N, + }, {}); + }; + PivotTable.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return PivotTable; }(OfficeExtension.ClientObject)); Excel.PivotTable=PivotTable; + var _typeConditionalFormatCollection="ConditionalFormatCollection"; var ConditionalFormatCollection=(function (_super) { __extends(ConditionalFormatCollection, _super); function ConditionalFormatCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalFormatCollection.prototype, "_className", { get: function () { @@ -17958,28 +21215,38 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalFormatCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalFormatCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ConditionalFormatCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeConditionalFormatCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); ConditionalFormatCollection.prototype.add=function (type) { - return new Excel.ConditionalFormat(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [type], false, true, null)); + return new Excel.ConditionalFormat(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [type], false, true, null, false)); }; ConditionalFormatCollection.prototype.clearAll=function () { - _createMethodAction(this.context, this, "ClearAll", 0, []); + _createMethodAction(this.context, this, "ClearAll", 0, [], false); }; ConditionalFormatCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; + ConditionalFormatCollection.prototype.getItem=function (id) { + return new Excel.ConditionalFormat(this.context, _createIndexerObjectPath(this.context, this, [id])); + }; ConditionalFormatCollection.prototype.getItemAt=function (index) { - return new Excel.ConditionalFormat(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.ConditionalFormat(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; ConditionalFormatCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17991,26 +21258,34 @@ var Excel; this.m__items=[]; var _data=obj[OfficeExtension.Constants.items]; for (var i=0; i < _data.length; i++) { - var _item=new Excel.ConditionalFormat(this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(false, this.context, this, _data[i], i)); + var _item=new Excel.ConditionalFormat(this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, this.context, this, _data[i], i)); _item._handleResult(_data[i]); this.m__items.push(_item); } } }; ConditionalFormatCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalFormatCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalFormatCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.ConditionalFormat(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; ConditionalFormatCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return ConditionalFormatCollection; }(OfficeExtension.ClientObject)); Excel.ConditionalFormatCollection=ConditionalFormatCollection; + var _typeConditionalFormat="ConditionalFormat"; var ConditionalFormat=(function (_super) { __extends(ConditionalFormat, _super); function ConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalFormat.prototype, "_className", { get: function () { @@ -18019,173 +21294,202 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["stopIfTrue", "priority", "type", "id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, false, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["dataBarOrNullObject", "dataBar", "customOrNullObject", "custom", "iconSet", "iconSetOrNullObject", "colorScale", "colorScaleOrNullObject", "topBottom", "topBottomOrNullObject", "preset", "presetOrNullObject", "textComparison", "textComparisonOrNullObject", "cellValue", "cellValueOrNullObject"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalFormat.prototype, "cellValue", { get: function () { - if (!this.m_cellValue) { - this.m_cellValue=new Excel.CellValueConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CellValue", false, false)); + if (!this._C) { + this._C=new Excel.CellValueConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CellValue", false, false, false)); } - return this.m_cellValue; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "cellValueOrNullObject", { get: function () { - if (!this.m_cellValueOrNullObject) { - this.m_cellValueOrNullObject=new Excel.CellValueConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CellValueOrNullObject", false, false)); + if (!this._Ce) { + this._Ce=new Excel.CellValueConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CellValueOrNullObject", false, false, false)); } - return this.m_cellValueOrNullObject; + return this._Ce; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "colorScale", { get: function () { - if (!this.m_colorScale) { - this.m_colorScale=new Excel.ColorScaleConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "ColorScale", false, false)); + if (!this._Co) { + this._Co=new Excel.ColorScaleConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "ColorScale", false, false, false)); } - return this.m_colorScale; + return this._Co; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "colorScaleOrNullObject", { get: function () { - if (!this.m_colorScaleOrNullObject) { - this.m_colorScaleOrNullObject=new Excel.ColorScaleConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "ColorScaleOrNullObject", false, false)); + if (!this._Col) { + this._Col=new Excel.ColorScaleConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "ColorScaleOrNullObject", false, false, false)); } - return this.m_colorScaleOrNullObject; + return this._Col; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "custom", { get: function () { - if (!this.m_custom) { - this.m_custom=new Excel.CustomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "Custom", false, false)); + if (!this._Cu) { + this._Cu=new Excel.CustomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "Custom", false, false, false)); } - return this.m_custom; + return this._Cu; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "customOrNullObject", { get: function () { - if (!this.m_customOrNullObject) { - this.m_customOrNullObject=new Excel.CustomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CustomOrNullObject", false, false)); + if (!this._Cus) { + this._Cus=new Excel.CustomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CustomOrNullObject", false, false, false)); } - return this.m_customOrNullObject; + return this._Cus; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "dataBar", { get: function () { - if (!this.m_dataBar) { - this.m_dataBar=new Excel.DataBarConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "DataBar", false, false)); + if (!this._D) { + this._D=new Excel.DataBarConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "DataBar", false, false, false)); } - return this.m_dataBar; + return this._D; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "dataBarOrNullObject", { get: function () { - if (!this.m_dataBarOrNullObject) { - this.m_dataBarOrNullObject=new Excel.DataBarConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "DataBarOrNullObject", false, false)); + if (!this._Da) { + this._Da=new Excel.DataBarConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "DataBarOrNullObject", false, false, false)); } - return this.m_dataBarOrNullObject; + return this._Da; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "iconSet", { get: function () { - if (!this.m_iconSet) { - this.m_iconSet=new Excel.IconSetConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "IconSet", false, false)); + if (!this._I) { + this._I=new Excel.IconSetConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "IconSet", false, false, false)); } - return this.m_iconSet; + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "iconSetOrNullObject", { get: function () { - if (!this.m_iconSetOrNullObject) { - this.m_iconSetOrNullObject=new Excel.IconSetConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "IconSetOrNullObject", false, false)); + if (!this._Ic) { + this._Ic=new Excel.IconSetConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "IconSetOrNullObject", false, false, false)); } - return this.m_iconSetOrNullObject; + return this._Ic; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "preset", { get: function () { - if (!this.m_preset) { - this.m_preset=new Excel.PresetCriteriaConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "Preset", false, false)); + if (!this._P) { + this._P=new Excel.PresetCriteriaConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "Preset", false, false, false)); } - return this.m_preset; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "presetOrNullObject", { get: function () { - if (!this.m_presetOrNullObject) { - this.m_presetOrNullObject=new Excel.PresetCriteriaConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "PresetOrNullObject", false, false)); + if (!this._Pr) { + this._Pr=new Excel.PresetCriteriaConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "PresetOrNullObject", false, false, false)); } - return this.m_presetOrNullObject; + return this._Pr; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "textComparison", { get: function () { - if (!this.m_textComparison) { - this.m_textComparison=new Excel.TextConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TextComparison", false, false)); + if (!this._T) { + this._T=new Excel.TextConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TextComparison", false, false, false)); } - return this.m_textComparison; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "textComparisonOrNullObject", { get: function () { - if (!this.m_textComparisonOrNullObject) { - this.m_textComparisonOrNullObject=new Excel.TextConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TextComparisonOrNullObject", false, false)); + if (!this._Te) { + this._Te=new Excel.TextConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TextComparisonOrNullObject", false, false, false)); } - return this.m_textComparisonOrNullObject; + return this._Te; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "topBottom", { get: function () { - if (!this.m_topBottom) { - this.m_topBottom=new Excel.TopBottomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TopBottom", false, false)); + if (!this._To) { + this._To=new Excel.TopBottomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TopBottom", false, false, false)); } - return this.m_topBottom; + return this._To; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "topBottomOrNullObject", { get: function () { - if (!this.m_topBottomOrNullObject) { - this.m_topBottomOrNullObject=new Excel.TopBottomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TopBottomOrNullObject", false, false)); + if (!this._Top) { + this._Top=new Excel.TopBottomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TopBottomOrNullObject", false, false, false)); } - return this.m_topBottomOrNullObject; + return this._Top; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._Id0, _typeConditionalFormat, this._isNull); + return this._Id0; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "priority", { get: function () { - _throwIfNotLoaded("priority", this.m_priority, "ConditionalFormat", this._isNull); - return this.m_priority; + _throwIfNotLoaded("priority", this._Pri, _typeConditionalFormat, this._isNull); + return this._Pri; }, set: function (value) { - this.m_priority=value; + this._Pri=value; _createSetPropertyAction(this.context, this, "Priority", value); }, enumerable: true, @@ -18193,11 +21497,11 @@ var Excel; }); Object.defineProperty(ConditionalFormat.prototype, "stopIfTrue", { get: function () { - _throwIfNotLoaded("stopIfTrue", this.m_stopIfTrue, "ConditionalFormat", this._isNull); - return this.m_stopIfTrue; + _throwIfNotLoaded("stopIfTrue", this._S, _typeConditionalFormat, this._isNull); + return this._S; }, set: function (value) { - this.m_stopIfTrue=value; + this._S=value; _createSetPropertyAction(this.context, this, "StopIfTrue", value); }, enumerable: true, @@ -18205,8 +21509,8 @@ var Excel; }); Object.defineProperty(ConditionalFormat.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "ConditionalFormat", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._Ty, _typeConditionalFormat, this._isNull); + return this._Ty; }, enumerable: true, configurable: true @@ -18214,14 +21518,17 @@ var Excel; ConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["stopIfTrue", "priority"], ["dataBarOrNullObject", "dataBar", "customOrNullObject", "custom", "iconSet", "iconSetOrNullObject", "colorScale", "colorScaleOrNullObject", "topBottom", "topBottomOrNullObject", "preset", "presetOrNullObject", "textComparison", "textComparisonOrNullObject", "cellValue", "cellValueOrNullObject"], []); }; + ConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalFormat.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; ConditionalFormat.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); }; ConditionalFormat.prototype.getRangeOrNullObject=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRangeOrNullObject", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRangeOrNullObject", 1, [], false, true, null, false)); }; ConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -18229,51 +21536,76 @@ var Excel; return; var obj=value; _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._Id0=obj["Id"]; + } if (!_isUndefined(obj["Priority"])) { - this.m_priority=obj["Priority"]; + this._Pri=obj["Priority"]; } if (!_isUndefined(obj["StopIfTrue"])) { - this.m_stopIfTrue=obj["StopIfTrue"]; + this._S=obj["StopIfTrue"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._Ty=obj["Type"]; } _handleNavigationPropertyResults(this, obj, ["cellValue", "CellValue", "cellValueOrNullObject", "CellValueOrNullObject", "colorScale", "ColorScale", "colorScaleOrNullObject", "ColorScaleOrNullObject", "custom", "Custom", "customOrNullObject", "CustomOrNullObject", "dataBar", "DataBar", "dataBarOrNullObject", "DataBarOrNullObject", "iconSet", "IconSet", "iconSetOrNullObject", "IconSetOrNullObject", "preset", "Preset", "presetOrNullObject", "PresetOrNullObject", "textComparison", "TextComparison", "textComparisonOrNullObject", "TextComparisonOrNullObject", "topBottom", "TopBottom", "topBottomOrNullObject", "TopBottomOrNullObject"]); }; ConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalFormat.prototype._handleIdResult=function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._Id0=value["Id"]; + } + }; + ConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalFormat.prototype.toJSON=function () { - return { - "cellValue": this.m_cellValue, - "cellValueOrNullObject": this.m_cellValueOrNullObject, - "colorScale": this.m_colorScale, - "colorScaleOrNullObject": this.m_colorScaleOrNullObject, - "custom": this.m_custom, - "customOrNullObject": this.m_customOrNullObject, - "dataBar": this.m_dataBar, - "dataBarOrNullObject": this.m_dataBarOrNullObject, - "iconSet": this.m_iconSet, - "iconSetOrNullObject": this.m_iconSetOrNullObject, - "preset": this.m_preset, - "presetOrNullObject": this.m_presetOrNullObject, - "priority": this.m_priority, - "stopIfTrue": this.m_stopIfTrue, - "textComparison": this.m_textComparison, - "textComparisonOrNullObject": this.m_textComparisonOrNullObject, - "topBottom": this.m_topBottom, - "topBottomOrNullObject": this.m_topBottomOrNullObject, - "type": this.m_type - }; + return _toJson(this, { + "id": this._Id0, + "priority": this._Pri, + "stopIfTrue": this._S, + "type": this._Ty, + }, { + "cellValue": this._C, + "cellValueOrNullObject": this._Ce, + "colorScale": this._Co, + "colorScaleOrNullObject": this._Col, + "custom": this._Cu, + "customOrNullObject": this._Cus, + "dataBar": this._D, + "dataBarOrNullObject": this._Da, + "iconSet": this._I, + "iconSetOrNullObject": this._Ic, + "preset": this._P, + "presetOrNullObject": this._Pr, + "textComparison": this._T, + "textComparisonOrNullObject": this._Te, + "topBottom": this._To, + "topBottomOrNullObject": this._Top, + }); + }; + ConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalFormat; }(OfficeExtension.ClientObject)); Excel.ConditionalFormat=ConditionalFormat; + var _typeDataBarConditionalFormat="DataBarConditionalFormat"; var DataBarConditionalFormat=(function (_super) { __extends(DataBarConditionalFormat, _super); function DataBarConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(DataBarConditionalFormat.prototype, "_className", { get: function () { @@ -18282,33 +21614,54 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(DataBarConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["showDataBarOnly", "barDirection", "axisFormat", "axisColor", "lowerBoundRule", "upperBoundRule"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DataBarConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DataBarConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["positiveFormat", "negativeFormat"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(DataBarConditionalFormat.prototype, "negativeFormat", { get: function () { - if (!this.m_negativeFormat) { - this.m_negativeFormat=new Excel.ConditionalDataBarNegativeFormat(this.context, _createPropertyObjectPath(this.context, this, "NegativeFormat", false, false)); + if (!this._N) { + this._N=new Excel.ConditionalDataBarNegativeFormat(this.context, _createPropertyObjectPath(this.context, this, "NegativeFormat", false, false, false)); } - return this.m_negativeFormat; + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(DataBarConditionalFormat.prototype, "positiveFormat", { get: function () { - if (!this.m_positiveFormat) { - this.m_positiveFormat=new Excel.ConditionalDataBarPositiveFormat(this.context, _createPropertyObjectPath(this.context, this, "PositiveFormat", false, false)); + if (!this._P) { + this._P=new Excel.ConditionalDataBarPositiveFormat(this.context, _createPropertyObjectPath(this.context, this, "PositiveFormat", false, false, false)); } - return this.m_positiveFormat; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(DataBarConditionalFormat.prototype, "axisColor", { get: function () { - _throwIfNotLoaded("axisColor", this.m_axisColor, "DataBarConditionalFormat", this._isNull); - return this.m_axisColor; + _throwIfNotLoaded("axisColor", this._A, _typeDataBarConditionalFormat, this._isNull); + return this._A; }, set: function (value) { - this.m_axisColor=value; + this._A=value; _createSetPropertyAction(this.context, this, "AxisColor", value); }, enumerable: true, @@ -18316,11 +21669,11 @@ var Excel; }); Object.defineProperty(DataBarConditionalFormat.prototype, "axisFormat", { get: function () { - _throwIfNotLoaded("axisFormat", this.m_axisFormat, "DataBarConditionalFormat", this._isNull); - return this.m_axisFormat; + _throwIfNotLoaded("axisFormat", this._Ax, _typeDataBarConditionalFormat, this._isNull); + return this._Ax; }, set: function (value) { - this.m_axisFormat=value; + this._Ax=value; _createSetPropertyAction(this.context, this, "AxisFormat", value); }, enumerable: true, @@ -18328,11 +21681,11 @@ var Excel; }); Object.defineProperty(DataBarConditionalFormat.prototype, "barDirection", { get: function () { - _throwIfNotLoaded("barDirection", this.m_barDirection, "DataBarConditionalFormat", this._isNull); - return this.m_barDirection; + _throwIfNotLoaded("barDirection", this._B, _typeDataBarConditionalFormat, this._isNull); + return this._B; }, set: function (value) { - this.m_barDirection=value; + this._B=value; _createSetPropertyAction(this.context, this, "BarDirection", value); }, enumerable: true, @@ -18340,11 +21693,11 @@ var Excel; }); Object.defineProperty(DataBarConditionalFormat.prototype, "lowerBoundRule", { get: function () { - _throwIfNotLoaded("lowerBoundRule", this.m_lowerBoundRule, "DataBarConditionalFormat", this._isNull); - return this.m_lowerBoundRule; + _throwIfNotLoaded("lowerBoundRule", this._L, _typeDataBarConditionalFormat, this._isNull); + return this._L; }, set: function (value) { - this.m_lowerBoundRule=value; + this._L=value; _createSetPropertyAction(this.context, this, "LowerBoundRule", value); }, enumerable: true, @@ -18352,11 +21705,11 @@ var Excel; }); Object.defineProperty(DataBarConditionalFormat.prototype, "showDataBarOnly", { get: function () { - _throwIfNotLoaded("showDataBarOnly", this.m_showDataBarOnly, "DataBarConditionalFormat", this._isNull); - return this.m_showDataBarOnly; + _throwIfNotLoaded("showDataBarOnly", this._S, _typeDataBarConditionalFormat, this._isNull); + return this._S; }, set: function (value) { - this.m_showDataBarOnly=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShowDataBarOnly", value); }, enumerable: true, @@ -18364,11 +21717,11 @@ var Excel; }); Object.defineProperty(DataBarConditionalFormat.prototype, "upperBoundRule", { get: function () { - _throwIfNotLoaded("upperBoundRule", this.m_upperBoundRule, "DataBarConditionalFormat", this._isNull); - return this.m_upperBoundRule; + _throwIfNotLoaded("upperBoundRule", this._U, _typeDataBarConditionalFormat, this._isNull); + return this._U; }, set: function (value) { - this.m_upperBoundRule=value; + this._U=value; _createSetPropertyAction(this.context, this, "UpperBoundRule", value); }, enumerable: true, @@ -18377,6 +21730,9 @@ var Excel; DataBarConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["showDataBarOnly", "barDirection", "axisFormat", "axisColor", "lowerBoundRule", "upperBoundRule"], ["positiveFormat", "negativeFormat"], []); }; + DataBarConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; DataBarConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18384,48 +21740,60 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["AxisColor"])) { - this.m_axisColor=obj["AxisColor"]; + this._A=obj["AxisColor"]; } if (!_isUndefined(obj["AxisFormat"])) { - this.m_axisFormat=obj["AxisFormat"]; + this._Ax=obj["AxisFormat"]; } if (!_isUndefined(obj["BarDirection"])) { - this.m_barDirection=obj["BarDirection"]; + this._B=obj["BarDirection"]; } if (!_isUndefined(obj["LowerBoundRule"])) { - this.m_lowerBoundRule=obj["LowerBoundRule"]; + this._L=obj["LowerBoundRule"]; } if (!_isUndefined(obj["ShowDataBarOnly"])) { - this.m_showDataBarOnly=obj["ShowDataBarOnly"]; + this._S=obj["ShowDataBarOnly"]; } if (!_isUndefined(obj["UpperBoundRule"])) { - this.m_upperBoundRule=obj["UpperBoundRule"]; + this._U=obj["UpperBoundRule"]; } _handleNavigationPropertyResults(this, obj, ["negativeFormat", "NegativeFormat", "positiveFormat", "PositiveFormat"]); }; DataBarConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + DataBarConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + DataBarConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; DataBarConditionalFormat.prototype.toJSON=function () { - return { - "axisColor": this.m_axisColor, - "axisFormat": this.m_axisFormat, - "barDirection": this.m_barDirection, - "lowerBoundRule": this.m_lowerBoundRule, - "negativeFormat": this.m_negativeFormat, - "positiveFormat": this.m_positiveFormat, - "showDataBarOnly": this.m_showDataBarOnly, - "upperBoundRule": this.m_upperBoundRule - }; + return _toJson(this, { + "axisColor": this._A, + "axisFormat": this._Ax, + "barDirection": this._B, + "lowerBoundRule": this._L, + "showDataBarOnly": this._S, + "upperBoundRule": this._U, + }, { + "negativeFormat": this._N, + "positiveFormat": this._P, + }); + }; + DataBarConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return DataBarConditionalFormat; }(OfficeExtension.ClientObject)); Excel.DataBarConditionalFormat=DataBarConditionalFormat; + var _typeConditionalDataBarPositiveFormat="ConditionalDataBarPositiveFormat"; var ConditionalDataBarPositiveFormat=(function (_super) { __extends(ConditionalDataBarPositiveFormat, _super); function ConditionalDataBarPositiveFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "_className", { get: function () { @@ -18434,13 +21802,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["fillColor", "gradientFill", "borderColor"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "borderColor", { get: function () { - _throwIfNotLoaded("borderColor", this.m_borderColor, "ConditionalDataBarPositiveFormat", this._isNull); - return this.m_borderColor; + _throwIfNotLoaded("borderColor", this._B, _typeConditionalDataBarPositiveFormat, this._isNull); + return this._B; }, set: function (value) { - this.m_borderColor=value; + this._B=value; _createSetPropertyAction(this.context, this, "BorderColor", value); }, enumerable: true, @@ -18448,11 +21830,11 @@ var Excel; }); Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "fillColor", { get: function () { - _throwIfNotLoaded("fillColor", this.m_fillColor, "ConditionalDataBarPositiveFormat", this._isNull); - return this.m_fillColor; + _throwIfNotLoaded("fillColor", this._F, _typeConditionalDataBarPositiveFormat, this._isNull); + return this._F; }, set: function (value) { - this.m_fillColor=value; + this._F=value; _createSetPropertyAction(this.context, this, "FillColor", value); }, enumerable: true, @@ -18460,11 +21842,11 @@ var Excel; }); Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "gradientFill", { get: function () { - _throwIfNotLoaded("gradientFill", this.m_gradientFill, "ConditionalDataBarPositiveFormat", this._isNull); - return this.m_gradientFill; + _throwIfNotLoaded("gradientFill", this._G, _typeConditionalDataBarPositiveFormat, this._isNull); + return this._G; }, set: function (value) { - this.m_gradientFill=value; + this._G=value; _createSetPropertyAction(this.context, this, "GradientFill", value); }, enumerable: true, @@ -18473,6 +21855,9 @@ var Excel; ConditionalDataBarPositiveFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["fillColor", "gradientFill", "borderColor"], [], []); }; + ConditionalDataBarPositiveFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalDataBarPositiveFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18480,33 +21865,44 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["BorderColor"])) { - this.m_borderColor=obj["BorderColor"]; + this._B=obj["BorderColor"]; } if (!_isUndefined(obj["FillColor"])) { - this.m_fillColor=obj["FillColor"]; + this._F=obj["FillColor"]; } if (!_isUndefined(obj["GradientFill"])) { - this.m_gradientFill=obj["GradientFill"]; + this._G=obj["GradientFill"]; } }; ConditionalDataBarPositiveFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalDataBarPositiveFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalDataBarPositiveFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalDataBarPositiveFormat.prototype.toJSON=function () { - return { - "borderColor": this.m_borderColor, - "fillColor": this.m_fillColor, - "gradientFill": this.m_gradientFill - }; + return _toJson(this, { + "borderColor": this._B, + "fillColor": this._F, + "gradientFill": this._G, + }, {}); + }; + ConditionalDataBarPositiveFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalDataBarPositiveFormat; }(OfficeExtension.ClientObject)); Excel.ConditionalDataBarPositiveFormat=ConditionalDataBarPositiveFormat; + var _typeConditionalDataBarNegativeFormat="ConditionalDataBarNegativeFormat"; var ConditionalDataBarNegativeFormat=(function (_super) { __extends(ConditionalDataBarNegativeFormat, _super); function ConditionalDataBarNegativeFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "_className", { get: function () { @@ -18515,13 +21911,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["fillColor", "matchPositiveFillColor", "borderColor", "matchPositiveBorderColor"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "borderColor", { get: function () { - _throwIfNotLoaded("borderColor", this.m_borderColor, "ConditionalDataBarNegativeFormat", this._isNull); - return this.m_borderColor; + _throwIfNotLoaded("borderColor", this._B, _typeConditionalDataBarNegativeFormat, this._isNull); + return this._B; }, set: function (value) { - this.m_borderColor=value; + this._B=value; _createSetPropertyAction(this.context, this, "BorderColor", value); }, enumerable: true, @@ -18529,11 +21939,11 @@ var Excel; }); Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "fillColor", { get: function () { - _throwIfNotLoaded("fillColor", this.m_fillColor, "ConditionalDataBarNegativeFormat", this._isNull); - return this.m_fillColor; + _throwIfNotLoaded("fillColor", this._F, _typeConditionalDataBarNegativeFormat, this._isNull); + return this._F; }, set: function (value) { - this.m_fillColor=value; + this._F=value; _createSetPropertyAction(this.context, this, "FillColor", value); }, enumerable: true, @@ -18541,11 +21951,11 @@ var Excel; }); Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "matchPositiveBorderColor", { get: function () { - _throwIfNotLoaded("matchPositiveBorderColor", this.m_matchPositiveBorderColor, "ConditionalDataBarNegativeFormat", this._isNull); - return this.m_matchPositiveBorderColor; + _throwIfNotLoaded("matchPositiveBorderColor", this._M, _typeConditionalDataBarNegativeFormat, this._isNull); + return this._M; }, set: function (value) { - this.m_matchPositiveBorderColor=value; + this._M=value; _createSetPropertyAction(this.context, this, "MatchPositiveBorderColor", value); }, enumerable: true, @@ -18553,11 +21963,11 @@ var Excel; }); Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "matchPositiveFillColor", { get: function () { - _throwIfNotLoaded("matchPositiveFillColor", this.m_matchPositiveFillColor, "ConditionalDataBarNegativeFormat", this._isNull); - return this.m_matchPositiveFillColor; + _throwIfNotLoaded("matchPositiveFillColor", this._Ma, _typeConditionalDataBarNegativeFormat, this._isNull); + return this._Ma; }, set: function (value) { - this.m_matchPositiveFillColor=value; + this._Ma=value; _createSetPropertyAction(this.context, this, "MatchPositiveFillColor", value); }, enumerable: true, @@ -18566,6 +21976,9 @@ var Excel; ConditionalDataBarNegativeFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["fillColor", "matchPositiveFillColor", "borderColor", "matchPositiveBorderColor"], [], []); }; + ConditionalDataBarNegativeFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalDataBarNegativeFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18573,37 +21986,48 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["BorderColor"])) { - this.m_borderColor=obj["BorderColor"]; + this._B=obj["BorderColor"]; } if (!_isUndefined(obj["FillColor"])) { - this.m_fillColor=obj["FillColor"]; + this._F=obj["FillColor"]; } if (!_isUndefined(obj["MatchPositiveBorderColor"])) { - this.m_matchPositiveBorderColor=obj["MatchPositiveBorderColor"]; + this._M=obj["MatchPositiveBorderColor"]; } if (!_isUndefined(obj["MatchPositiveFillColor"])) { - this.m_matchPositiveFillColor=obj["MatchPositiveFillColor"]; + this._Ma=obj["MatchPositiveFillColor"]; } }; ConditionalDataBarNegativeFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalDataBarNegativeFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalDataBarNegativeFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalDataBarNegativeFormat.prototype.toJSON=function () { - return { - "borderColor": this.m_borderColor, - "fillColor": this.m_fillColor, - "matchPositiveBorderColor": this.m_matchPositiveBorderColor, - "matchPositiveFillColor": this.m_matchPositiveFillColor - }; + return _toJson(this, { + "borderColor": this._B, + "fillColor": this._F, + "matchPositiveBorderColor": this._M, + "matchPositiveFillColor": this._Ma, + }, {}); + }; + ConditionalDataBarNegativeFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalDataBarNegativeFormat; }(OfficeExtension.ClientObject)); Excel.ConditionalDataBarNegativeFormat=ConditionalDataBarNegativeFormat; + var _typeCustomConditionalFormat="CustomConditionalFormat"; var CustomConditionalFormat=(function (_super) { __extends(CustomConditionalFormat, _super); function CustomConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CustomConditionalFormat.prototype, "_className", { get: function () { @@ -18612,22 +22036,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(CustomConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["rule", "format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(CustomConditionalFormat.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(CustomConditionalFormat.prototype, "rule", { get: function () { - if (!this.m_rule) { - this.m_rule=new Excel.ConditionalFormatRule(this.context, _createPropertyObjectPath(this.context, this, "Rule", false, false)); + if (!this._R) { + this._R=new Excel.ConditionalFormatRule(this.context, _createPropertyObjectPath(this.context, this, "Rule", false, false, false)); } - return this.m_rule; + return this._R; }, enumerable: true, configurable: true @@ -18635,6 +22066,9 @@ var Excel; CustomConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, [], ["rule", "format"], []); }; + CustomConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; CustomConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18644,22 +22078,33 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["format", "Format", "rule", "Rule"]); }; CustomConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CustomConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CustomConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; CustomConditionalFormat.prototype.toJSON=function () { - return { - "format": this.m_format, - "rule": this.m_rule - }; + return _toJson(this, {}, { + "format": this._F, + "rule": this._R, + }); + }; + CustomConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return CustomConditionalFormat; }(OfficeExtension.ClientObject)); Excel.CustomConditionalFormat=CustomConditionalFormat; + var _typeConditionalFormatRule="ConditionalFormatRule"; var ConditionalFormatRule=(function (_super) { __extends(ConditionalFormatRule, _super); function ConditionalFormatRule() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalFormatRule.prototype, "_className", { get: function () { @@ -18668,13 +22113,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalFormatRule.prototype, "_scalarPropertyNames", { + get: function () { + return ["formula", "formulaLocal", "formulaR1C1"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormatRule.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalFormatRule.prototype, "formula", { get: function () { - _throwIfNotLoaded("formula", this.m_formula, "ConditionalFormatRule", this._isNull); - return this.m_formula; + _throwIfNotLoaded("formula", this._F, _typeConditionalFormatRule, this._isNull); + return this._F; }, set: function (value) { - this.m_formula=value; + this._F=value; _createSetPropertyAction(this.context, this, "Formula", value); }, enumerable: true, @@ -18682,11 +22141,11 @@ var Excel; }); Object.defineProperty(ConditionalFormatRule.prototype, "formulaLocal", { get: function () { - _throwIfNotLoaded("formulaLocal", this.m_formulaLocal, "ConditionalFormatRule", this._isNull); - return this.m_formulaLocal; + _throwIfNotLoaded("formulaLocal", this._Fo, _typeConditionalFormatRule, this._isNull); + return this._Fo; }, set: function (value) { - this.m_formulaLocal=value; + this._Fo=value; _createSetPropertyAction(this.context, this, "FormulaLocal", value); }, enumerable: true, @@ -18694,11 +22153,11 @@ var Excel; }); Object.defineProperty(ConditionalFormatRule.prototype, "formulaR1C1", { get: function () { - _throwIfNotLoaded("formulaR1C1", this.m_formulaR1C1, "ConditionalFormatRule", this._isNull); - return this.m_formulaR1C1; + _throwIfNotLoaded("formulaR1C1", this._For, _typeConditionalFormatRule, this._isNull); + return this._For; }, set: function (value) { - this.m_formulaR1C1=value; + this._For=value; _createSetPropertyAction(this.context, this, "FormulaR1C1", value); }, enumerable: true, @@ -18707,6 +22166,9 @@ var Excel; ConditionalFormatRule.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["formula", "formulaLocal", "formulaR1C1"], [], []); }; + ConditionalFormatRule.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalFormatRule.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18714,33 +22176,44 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Formula"])) { - this.m_formula=obj["Formula"]; + this._F=obj["Formula"]; } if (!_isUndefined(obj["FormulaLocal"])) { - this.m_formulaLocal=obj["FormulaLocal"]; + this._Fo=obj["FormulaLocal"]; } if (!_isUndefined(obj["FormulaR1C1"])) { - this.m_formulaR1C1=obj["FormulaR1C1"]; + this._For=obj["FormulaR1C1"]; } }; ConditionalFormatRule.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalFormatRule.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalFormatRule.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalFormatRule.prototype.toJSON=function () { - return { - "formula": this.m_formula, - "formulaLocal": this.m_formulaLocal, - "formulaR1C1": this.m_formulaR1C1 - }; + return _toJson(this, { + "formula": this._F, + "formulaLocal": this._Fo, + "formulaR1C1": this._For, + }, {}); + }; + ConditionalFormatRule.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalFormatRule; }(OfficeExtension.ClientObject)); Excel.ConditionalFormatRule=ConditionalFormatRule; + var _typeIconSetConditionalFormat="IconSetConditionalFormat"; var IconSetConditionalFormat=(function (_super) { __extends(IconSetConditionalFormat, _super); function IconSetConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(IconSetConditionalFormat.prototype, "_className", { get: function () { @@ -18749,13 +22222,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(IconSetConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["reverseIconOrder", "showIconOnly", "style", "criteria"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(IconSetConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(IconSetConditionalFormat.prototype, "criteria", { get: function () { - _throwIfNotLoaded("criteria", this.m_criteria, "IconSetConditionalFormat", this._isNull); - return this.m_criteria; + _throwIfNotLoaded("criteria", this._C, _typeIconSetConditionalFormat, this._isNull); + return this._C; }, set: function (value) { - this.m_criteria=value; + this._C=value; _createSetPropertyAction(this.context, this, "Criteria", value); }, enumerable: true, @@ -18763,11 +22250,11 @@ var Excel; }); Object.defineProperty(IconSetConditionalFormat.prototype, "reverseIconOrder", { get: function () { - _throwIfNotLoaded("reverseIconOrder", this.m_reverseIconOrder, "IconSetConditionalFormat", this._isNull); - return this.m_reverseIconOrder; + _throwIfNotLoaded("reverseIconOrder", this._R, _typeIconSetConditionalFormat, this._isNull); + return this._R; }, set: function (value) { - this.m_reverseIconOrder=value; + this._R=value; _createSetPropertyAction(this.context, this, "ReverseIconOrder", value); }, enumerable: true, @@ -18775,11 +22262,11 @@ var Excel; }); Object.defineProperty(IconSetConditionalFormat.prototype, "showIconOnly", { get: function () { - _throwIfNotLoaded("showIconOnly", this.m_showIconOnly, "IconSetConditionalFormat", this._isNull); - return this.m_showIconOnly; + _throwIfNotLoaded("showIconOnly", this._S, _typeIconSetConditionalFormat, this._isNull); + return this._S; }, set: function (value) { - this.m_showIconOnly=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShowIconOnly", value); }, enumerable: true, @@ -18787,11 +22274,11 @@ var Excel; }); Object.defineProperty(IconSetConditionalFormat.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "IconSetConditionalFormat", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._St, _typeIconSetConditionalFormat, this._isNull); + return this._St; }, set: function (value) { - this.m_style=value; + this._St=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -18800,6 +22287,9 @@ var Excel; IconSetConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["reverseIconOrder", "showIconOnly", "style", "criteria"], [], []); }; + IconSetConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; IconSetConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18807,37 +22297,48 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Criteria"])) { - this.m_criteria=obj["Criteria"]; + this._C=obj["Criteria"]; } if (!_isUndefined(obj["ReverseIconOrder"])) { - this.m_reverseIconOrder=obj["ReverseIconOrder"]; + this._R=obj["ReverseIconOrder"]; } if (!_isUndefined(obj["ShowIconOnly"])) { - this.m_showIconOnly=obj["ShowIconOnly"]; + this._S=obj["ShowIconOnly"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._St=obj["Style"]; } }; IconSetConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + IconSetConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + IconSetConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; IconSetConditionalFormat.prototype.toJSON=function () { - return { - "criteria": this.m_criteria, - "reverseIconOrder": this.m_reverseIconOrder, - "showIconOnly": this.m_showIconOnly, - "style": this.m_style - }; + return _toJson(this, { + "criteria": this._C, + "reverseIconOrder": this._R, + "showIconOnly": this._S, + "style": this._St, + }, {}); + }; + IconSetConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return IconSetConditionalFormat; }(OfficeExtension.ClientObject)); Excel.IconSetConditionalFormat=IconSetConditionalFormat; + var _typeColorScaleConditionalFormat="ColorScaleConditionalFormat"; var ColorScaleConditionalFormat=(function (_super) { __extends(ColorScaleConditionalFormat, _super); function ColorScaleConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ColorScaleConditionalFormat.prototype, "_className", { get: function () { @@ -18846,13 +22347,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ColorScaleConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["threeColorScale", "criteria"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ColorScaleConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ColorScaleConditionalFormat.prototype, "criteria", { get: function () { - _throwIfNotLoaded("criteria", this.m_criteria, "ColorScaleConditionalFormat", this._isNull); - return this.m_criteria; + _throwIfNotLoaded("criteria", this._C, _typeColorScaleConditionalFormat, this._isNull); + return this._C; }, set: function (value) { - this.m_criteria=value; + this._C=value; _createSetPropertyAction(this.context, this, "Criteria", value); }, enumerable: true, @@ -18860,8 +22375,8 @@ var Excel; }); Object.defineProperty(ColorScaleConditionalFormat.prototype, "threeColorScale", { get: function () { - _throwIfNotLoaded("threeColorScale", this.m_threeColorScale, "ColorScaleConditionalFormat", this._isNull); - return this.m_threeColorScale; + _throwIfNotLoaded("threeColorScale", this._T, _typeColorScaleConditionalFormat, this._isNull); + return this._T; }, enumerable: true, configurable: true @@ -18869,6 +22384,9 @@ var Excel; ColorScaleConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["criteria"], [], []); }; + ColorScaleConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ColorScaleConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18876,29 +22394,40 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Criteria"])) { - this.m_criteria=obj["Criteria"]; + this._C=obj["Criteria"]; } if (!_isUndefined(obj["ThreeColorScale"])) { - this.m_threeColorScale=obj["ThreeColorScale"]; + this._T=obj["ThreeColorScale"]; } }; ColorScaleConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ColorScaleConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ColorScaleConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ColorScaleConditionalFormat.prototype.toJSON=function () { - return { - "criteria": this.m_criteria, - "threeColorScale": this.m_threeColorScale - }; + return _toJson(this, { + "criteria": this._C, + "threeColorScale": this._T, + }, {}); + }; + ColorScaleConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ColorScaleConditionalFormat; }(OfficeExtension.ClientObject)); Excel.ColorScaleConditionalFormat=ColorScaleConditionalFormat; + var _typeTopBottomConditionalFormat="TopBottomConditionalFormat"; var TopBottomConditionalFormat=(function (_super) { __extends(TopBottomConditionalFormat, _super); function TopBottomConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TopBottomConditionalFormat.prototype, "_className", { get: function () { @@ -18907,23 +22436,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TopBottomConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["rule"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TopBottomConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TopBottomConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TopBottomConditionalFormat.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(TopBottomConditionalFormat.prototype, "rule", { get: function () { - _throwIfNotLoaded("rule", this.m_rule, "TopBottomConditionalFormat", this._isNull); - return this.m_rule; + _throwIfNotLoaded("rule", this._R, _typeTopBottomConditionalFormat, this._isNull); + return this._R; }, set: function (value) { - this.m_rule=value; + this._R=value; _createSetPropertyAction(this.context, this, "Rule", value); }, enumerable: true, @@ -18932,6 +22482,9 @@ var Excel; TopBottomConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["rule"], ["format"], []); }; + TopBottomConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; TopBottomConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18939,27 +22492,39 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Rule"])) { - this.m_rule=obj["Rule"]; + this._R=obj["Rule"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; TopBottomConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TopBottomConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TopBottomConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; TopBottomConditionalFormat.prototype.toJSON=function () { - return { - "format": this.m_format, - "rule": this.m_rule - }; + return _toJson(this, { + "rule": this._R, + }, { + "format": this._F, + }); + }; + TopBottomConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TopBottomConditionalFormat; }(OfficeExtension.ClientObject)); Excel.TopBottomConditionalFormat=TopBottomConditionalFormat; + var _typePresetCriteriaConditionalFormat="PresetCriteriaConditionalFormat"; var PresetCriteriaConditionalFormat=(function (_super) { __extends(PresetCriteriaConditionalFormat, _super); function PresetCriteriaConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "_className", { get: function () { @@ -18968,23 +22533,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["rule"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "rule", { get: function () { - _throwIfNotLoaded("rule", this.m_rule, "PresetCriteriaConditionalFormat", this._isNull); - return this.m_rule; + _throwIfNotLoaded("rule", this._R, _typePresetCriteriaConditionalFormat, this._isNull); + return this._R; }, set: function (value) { - this.m_rule=value; + this._R=value; _createSetPropertyAction(this.context, this, "Rule", value); }, enumerable: true, @@ -18993,6 +22579,9 @@ var Excel; PresetCriteriaConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["rule"], ["format"], []); }; + PresetCriteriaConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; PresetCriteriaConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -19000,27 +22589,39 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Rule"])) { - this.m_rule=obj["Rule"]; + this._R=obj["Rule"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; PresetCriteriaConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + PresetCriteriaConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + PresetCriteriaConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; PresetCriteriaConditionalFormat.prototype.toJSON=function () { - return { - "format": this.m_format, - "rule": this.m_rule - }; + return _toJson(this, { + "rule": this._R, + }, { + "format": this._F, + }); + }; + PresetCriteriaConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return PresetCriteriaConditionalFormat; }(OfficeExtension.ClientObject)); Excel.PresetCriteriaConditionalFormat=PresetCriteriaConditionalFormat; + var _typeTextConditionalFormat="TextConditionalFormat"; var TextConditionalFormat=(function (_super) { __extends(TextConditionalFormat, _super); function TextConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TextConditionalFormat.prototype, "_className", { get: function () { @@ -19029,23 +22630,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TextConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["rule"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TextConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TextConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TextConditionalFormat.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(TextConditionalFormat.prototype, "rule", { get: function () { - _throwIfNotLoaded("rule", this.m_rule, "TextConditionalFormat", this._isNull); - return this.m_rule; + _throwIfNotLoaded("rule", this._R, _typeTextConditionalFormat, this._isNull); + return this._R; }, set: function (value) { - this.m_rule=value; + this._R=value; _createSetPropertyAction(this.context, this, "Rule", value); }, enumerable: true, @@ -19054,6 +22676,9 @@ var Excel; TextConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["rule"], ["format"], []); }; + TextConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; TextConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -19061,27 +22686,39 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Rule"])) { - this.m_rule=obj["Rule"]; + this._R=obj["Rule"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; TextConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TextConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TextConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; TextConditionalFormat.prototype.toJSON=function () { - return { - "format": this.m_format, - "rule": this.m_rule - }; + return _toJson(this, { + "rule": this._R, + }, { + "format": this._F, + }); + }; + TextConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TextConditionalFormat; }(OfficeExtension.ClientObject)); Excel.TextConditionalFormat=TextConditionalFormat; + var _typeCellValueConditionalFormat="CellValueConditionalFormat"; var CellValueConditionalFormat=(function (_super) { __extends(CellValueConditionalFormat, _super); function CellValueConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CellValueConditionalFormat.prototype, "_className", { get: function () { @@ -19090,23 +22727,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(CellValueConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["rule"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CellValueConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CellValueConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(CellValueConditionalFormat.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(CellValueConditionalFormat.prototype, "rule", { get: function () { - _throwIfNotLoaded("rule", this.m_rule, "CellValueConditionalFormat", this._isNull); - return this.m_rule; + _throwIfNotLoaded("rule", this._R, _typeCellValueConditionalFormat, this._isNull); + return this._R; }, set: function (value) { - this.m_rule=value; + this._R=value; _createSetPropertyAction(this.context, this, "Rule", value); }, enumerable: true, @@ -19115,6 +22773,9 @@ var Excel; CellValueConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["rule"], ["format"], []); }; + CellValueConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; CellValueConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -19122,27 +22783,39 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Rule"])) { - this.m_rule=obj["Rule"]; + this._R=obj["Rule"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; CellValueConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CellValueConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CellValueConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; CellValueConditionalFormat.prototype.toJSON=function () { - return { - "format": this.m_format, - "rule": this.m_rule - }; + return _toJson(this, { + "rule": this._R, + }, { + "format": this._F, + }); + }; + CellValueConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return CellValueConditionalFormat; }(OfficeExtension.ClientObject)); Excel.CellValueConditionalFormat=CellValueConditionalFormat; + var _typeConditionalRangeFormat="ConditionalRangeFormat"; var ConditionalRangeFormat=(function (_super) { __extends(ConditionalRangeFormat, _super); function ConditionalRangeFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalRangeFormat.prototype, "_className", { get: function () { @@ -19151,58 +22824,77 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalRangeFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["numberFormat"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["fill", "font", "borders"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalRangeFormat.prototype, "borders", { get: function () { - if (!this.m_borders) { - this.m_borders=new Excel.ConditionalRangeBorderCollection(this.context, _createPropertyObjectPath(this.context, this, "Borders", true, false)); + if (!this._B) { + this._B=new Excel.ConditionalRangeBorderCollection(this.context, _createPropertyObjectPath(this.context, this, "Borders", true, false, false)); } - return this.m_borders; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ConditionalRangeFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ConditionalRangeFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ConditionalRangeFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Excel.ConditionalRangeFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeFormat.prototype, "numberFormat", { get: function () { - _throwIfNotLoaded("numberFormat", this.m_numberFormat, "ConditionalRangeFormat", this._isNull); - return this.m_numberFormat; + _throwIfNotLoaded("numberFormat", this._N, _typeConditionalRangeFormat, this._isNull); + return this._N; }, set: function (value) { - this.m_numberFormat=value; + this._N=value; _createSetPropertyAction(this.context, this, "NumberFormat", value); }, enumerable: true, configurable: true }); ConditionalRangeFormat.prototype.set=function (properties, options) { - this._recursivelySet(properties, options, ["numberFormat"], [], [ - "borders", - "fill", - "font", - "borders", - "fill", - "font" + this._recursivelySet(properties, options, ["numberFormat"], ["fill", "font"], [ + "borders" ]); }; + ConditionalRangeFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalRangeFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -19210,26 +22902,41 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["NumberFormat"])) { - this.m_numberFormat=obj["NumberFormat"]; + this._N=obj["NumberFormat"]; } _handleNavigationPropertyResults(this, obj, ["borders", "Borders", "fill", "Fill", "font", "Font"]); }; ConditionalRangeFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalRangeFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalRangeFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalRangeFormat.prototype.toJSON=function () { - return { - "numberFormat": this.m_numberFormat - }; + return _toJson(this, { + "numberFormat": this._N, + }, { + "borders": this._B, + "fill": this._F, + "font": this._Fo, + }); + }; + ConditionalRangeFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalRangeFormat; }(OfficeExtension.ClientObject)); Excel.ConditionalRangeFormat=ConditionalRangeFormat; + var _typeConditionalRangeFont="ConditionalRangeFont"; var ConditionalRangeFont=(function (_super) { __extends(ConditionalRangeFont, _super); function ConditionalRangeFont() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalRangeFont.prototype, "_className", { get: function () { @@ -19238,13 +22945,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalRangeFont.prototype, "_scalarPropertyNames", { + get: function () { + return ["color", "italic", "bold", "underline", "strikethrough"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeFont.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalRangeFont.prototype, "bold", { get: function () { - _throwIfNotLoaded("bold", this.m_bold, "ConditionalRangeFont", this._isNull); - return this.m_bold; + _throwIfNotLoaded("bold", this._B, _typeConditionalRangeFont, this._isNull); + return this._B; }, set: function (value) { - this.m_bold=value; + this._B=value; _createSetPropertyAction(this.context, this, "Bold", value); }, enumerable: true, @@ -19252,11 +22973,11 @@ var Excel; }); Object.defineProperty(ConditionalRangeFont.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "ConditionalRangeFont", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeConditionalRangeFont, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -19264,11 +22985,11 @@ var Excel; }); Object.defineProperty(ConditionalRangeFont.prototype, "italic", { get: function () { - _throwIfNotLoaded("italic", this.m_italic, "ConditionalRangeFont", this._isNull); - return this.m_italic; + _throwIfNotLoaded("italic", this._I, _typeConditionalRangeFont, this._isNull); + return this._I; }, set: function (value) { - this.m_italic=value; + this._I=value; _createSetPropertyAction(this.context, this, "Italic", value); }, enumerable: true, @@ -19276,11 +22997,11 @@ var Excel; }); Object.defineProperty(ConditionalRangeFont.prototype, "strikethrough", { get: function () { - _throwIfNotLoaded("strikethrough", this.m_strikethrough, "ConditionalRangeFont", this._isNull); - return this.m_strikethrough; + _throwIfNotLoaded("strikethrough", this._S, _typeConditionalRangeFont, this._isNull); + return this._S; }, set: function (value) { - this.m_strikethrough=value; + this._S=value; _createSetPropertyAction(this.context, this, "Strikethrough", value); }, enumerable: true, @@ -19288,11 +23009,11 @@ var Excel; }); Object.defineProperty(ConditionalRangeFont.prototype, "underline", { get: function () { - _throwIfNotLoaded("underline", this.m_underline, "ConditionalRangeFont", this._isNull); - return this.m_underline; + _throwIfNotLoaded("underline", this._U, _typeConditionalRangeFont, this._isNull); + return this._U; }, set: function (value) { - this.m_underline=value; + this._U=value; _createSetPropertyAction(this.context, this, "Underline", value); }, enumerable: true, @@ -19301,8 +23022,11 @@ var Excel; ConditionalRangeFont.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["color", "italic", "bold", "underline", "strikethrough"], [], []); }; + ConditionalRangeFont.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalRangeFont.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; ConditionalRangeFont.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -19311,41 +23035,52 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Bold"])) { - this.m_bold=obj["Bold"]; + this._B=obj["Bold"]; } if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["Italic"])) { - this.m_italic=obj["Italic"]; + this._I=obj["Italic"]; } if (!_isUndefined(obj["Strikethrough"])) { - this.m_strikethrough=obj["Strikethrough"]; + this._S=obj["Strikethrough"]; } if (!_isUndefined(obj["Underline"])) { - this.m_underline=obj["Underline"]; + this._U=obj["Underline"]; } }; ConditionalRangeFont.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalRangeFont.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalRangeFont.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalRangeFont.prototype.toJSON=function () { - return { - "bold": this.m_bold, - "color": this.m_color, - "italic": this.m_italic, - "strikethrough": this.m_strikethrough, - "underline": this.m_underline - }; + return _toJson(this, { + "bold": this._B, + "color": this._C, + "italic": this._I, + "strikethrough": this._S, + "underline": this._U, + }, {}); + }; + ConditionalRangeFont.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalRangeFont; }(OfficeExtension.ClientObject)); Excel.ConditionalRangeFont=ConditionalRangeFont; + var _typeConditionalRangeFill="ConditionalRangeFill"; var ConditionalRangeFill=(function (_super) { __extends(ConditionalRangeFill, _super); function ConditionalRangeFill() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalRangeFill.prototype, "_className", { get: function () { @@ -19354,13 +23089,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalRangeFill.prototype, "_scalarPropertyNames", { + get: function () { + return ["color"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeFill.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalRangeFill.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "ConditionalRangeFill", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeConditionalRangeFill, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -19369,8 +23118,11 @@ var Excel; ConditionalRangeFill.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["color"], [], []); }; + ConditionalRangeFill.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalRangeFill.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; ConditionalRangeFill.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -19379,25 +23131,36 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } }; ConditionalRangeFill.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalRangeFill.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalRangeFill.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalRangeFill.prototype.toJSON=function () { - return { - "color": this.m_color - }; + return _toJson(this, { + "color": this._C, + }, {}); + }; + ConditionalRangeFill.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalRangeFill; }(OfficeExtension.ClientObject)); Excel.ConditionalRangeFill=ConditionalRangeFill; + var _typeConditionalRangeBorder="ConditionalRangeBorder"; var ConditionalRangeBorder=(function (_super) { __extends(ConditionalRangeBorder, _super); function ConditionalRangeBorder() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalRangeBorder.prototype, "_className", { get: function () { @@ -19406,13 +23169,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalRangeBorder.prototype, "_scalarPropertyNames", { + get: function () { + return ["sideIndex", "style", "color"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeBorder.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalRangeBorder.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "ConditionalRangeBorder", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeConditionalRangeBorder, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -19420,19 +23197,19 @@ var Excel; }); Object.defineProperty(ConditionalRangeBorder.prototype, "sideIndex", { get: function () { - _throwIfNotLoaded("sideIndex", this.m_sideIndex, "ConditionalRangeBorder", this._isNull); - return this.m_sideIndex; + _throwIfNotLoaded("sideIndex", this._S, _typeConditionalRangeBorder, this._isNull); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeBorder.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "ConditionalRangeBorder", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._St, _typeConditionalRangeBorder, this._isNull); + return this._St; }, set: function (value) { - this.m_style=value; + this._St=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -19441,6 +23218,9 @@ var Excel; ConditionalRangeBorder.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["style", "color"], [], []); }; + ConditionalRangeBorder.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalRangeBorder.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -19448,33 +23228,44 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["SideIndex"])) { - this.m_sideIndex=obj["SideIndex"]; + this._S=obj["SideIndex"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._St=obj["Style"]; } }; ConditionalRangeBorder.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalRangeBorder.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalRangeBorder.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalRangeBorder.prototype.toJSON=function () { - return { - "color": this.m_color, - "sideIndex": this.m_sideIndex, - "style": this.m_style - }; + return _toJson(this, { + "color": this._C, + "sideIndex": this._S, + "style": this._St, + }, {}); + }; + ConditionalRangeBorder.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalRangeBorder; }(OfficeExtension.ClientObject)); Excel.ConditionalRangeBorder=ConditionalRangeBorder; + var _typeConditionalRangeBorderCollection="ConditionalRangeBorderCollection"; var ConditionalRangeBorderCollection=(function (_super) { __extends(ConditionalRangeBorderCollection, _super); function ConditionalRangeBorderCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalRangeBorderCollection.prototype, "_className", { get: function () { @@ -19483,49 +23274,70 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalRangeBorderCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeBorderCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeBorderCollection.prototype, "_navigationPropertyNames", { + get: function () { + return ["top", "bottom", "left", "right"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalRangeBorderCollection.prototype, "bottom", { get: function () { - if (!this.m_bottom) { - this.m_bottom=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Bottom", false, false)); + if (!this._B) { + this._B=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Bottom", false, false, false)); } - return this.m_bottom; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeBorderCollection.prototype, "left", { get: function () { - if (!this.m_left) { - this.m_left=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Left", false, false)); + if (!this._L) { + this._L=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Left", false, false, false)); } - return this.m_left; + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeBorderCollection.prototype, "right", { get: function () { - if (!this.m_right) { - this.m_right=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Right", false, false)); + if (!this._R) { + this._R=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Right", false, false, false)); } - return this.m_right; + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeBorderCollection.prototype, "top", { get: function () { - if (!this.m_top) { - this.m_top=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Top", false, false)); + if (!this._T) { + this._T=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Top", false, false, false)); } - return this.m_top; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeBorderCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ConditionalRangeBorderCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeConditionalRangeBorderCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -19533,8 +23345,8 @@ var Excel; }); Object.defineProperty(ConditionalRangeBorderCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "ConditionalRangeBorderCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeConditionalRangeBorderCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true @@ -19543,7 +23355,7 @@ var Excel; return new Excel.ConditionalRangeBorder(this.context, _createIndexerObjectPath(this.context, this, [index])); }; ConditionalRangeBorderCollection.prototype.getItemAt=function (index) { - return new Excel.ConditionalRangeBorder(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.ConditionalRangeBorder(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; ConditionalRangeBorderCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -19552,7 +23364,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } _handleNavigationPropertyResults(this, obj, ["bottom", "Bottom", "left", "Left", "right", "Right", "top", "Top"]); if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { @@ -19566,17 +23378,65 @@ var Excel; } }; ConditionalRangeBorderCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalRangeBorderCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalRangeBorderCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.ConditionalRangeBorder(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; ConditionalRangeBorderCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, { + "bottom": this._B, + "left": this._L, + "right": this._R, + "top": this._T, + }, this.m__items); }; return ConditionalRangeBorderCollection; }(OfficeExtension.ClientObject)); Excel.ConditionalRangeBorderCollection=ConditionalRangeBorderCollection; + var _typeInternalTest="InternalTest"; + var InternalTest=(function (_super) { + __extends(InternalTest, _super); + function InternalTest() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(InternalTest.prototype, "_className", { + get: function () { + return "InternalTest"; + }, + enumerable: true, + configurable: true + }); + InternalTest.prototype.delay=function (seconds) { + var action=_createMethodAction(this.context, this, "Delay", 0, [seconds], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + InternalTest.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + InternalTest.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + InternalTest.prototype.toJSON=function () { + return _toJson(this, {}, {}); + }; + return InternalTest; + }(OfficeExtension.ClientObject)); + Excel.InternalTest=InternalTest; var BindingType; (function (BindingType) { BindingType.range="Range"; @@ -19630,6 +23490,7 @@ var Excel; ClearApplyTo.formats="Formats"; ClearApplyTo.contents="Contents"; ClearApplyTo.hyperlinks="Hyperlinks"; + ClearApplyTo.removeHyperlinks="RemoveHyperlinks"; })(ClearApplyTo=Excel.ClearApplyTo || (Excel.ClearApplyTo={})); var ChartDataLabelPosition; (function (ChartDataLabelPosition) { @@ -20016,6 +23877,7 @@ var Excel; NamedItemType.boolean="Boolean"; NamedItemType.range="Range"; NamedItemType.error="Error"; + NamedItemType.array="Array"; })(NamedItemType=Excel.NamedItemType || (Excel.NamedItemType={})); var RangeUnderlineStyle; (function (RangeUnderlineStyle) { @@ -20040,6 +23902,7 @@ var Excel; RangeValueType.double="Double"; RangeValueType.boolean="Boolean"; RangeValueType.error="Error"; + RangeValueType.richValue="RichValue"; })(RangeValueType=Excel.RangeValueType || (Excel.RangeValueType={})); var SortOrientation; (function (SortOrientation) { @@ -20071,10 +23934,11 @@ var Excel; VerticalAlignment.justify="Justify"; VerticalAlignment.distributed="Distributed"; })(VerticalAlignment=Excel.VerticalAlignment || (Excel.VerticalAlignment={})); + var _typeFunctionResult="FunctionResult"; var FunctionResult=(function (_super) { __extends(FunctionResult, _super); function FunctionResult() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(FunctionResult.prototype, "_className", { get: function () { @@ -20083,18 +23947,25 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(FunctionResult.prototype, "_scalarPropertyNames", { + get: function () { + return ["error", "value"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(FunctionResult.prototype, "error", { get: function () { - _throwIfNotLoaded("error", this.m_error, "FunctionResult", this._isNull); - return this.m_error; + _throwIfNotLoaded("error", this._E, _typeFunctionResult, this._isNull); + return this._E; }, enumerable: true, configurable: true }); Object.defineProperty(FunctionResult.prototype, "value", { get: function () { - _throwIfNotLoaded("value", this.m_value, "FunctionResult", this._isNull); - return this.m_value; + _throwIfNotLoaded("value", this._V, _typeFunctionResult, this._isNull); + return this._V; }, enumerable: true, configurable: true @@ -20106,29 +23977,40 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Error"])) { - this.m_error=obj["Error"]; + this._E=obj["Error"]; } if (!_isUndefined(obj["Value"])) { - this.m_value=obj["Value"]; + this._V=obj["Value"]; } }; FunctionResult.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + FunctionResult.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + FunctionResult.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; FunctionResult.prototype.toJSON=function () { - return { - "error": this.m_error, - "value": this.m_value - }; + return _toJson(this, { + "error": this._E, + "value": this._V, + }, {}); + }; + FunctionResult.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return FunctionResult; }(OfficeExtension.ClientObject)); Excel.FunctionResult=FunctionResult; + var _typeFunctions="Functions"; var Functions=(function (_super) { __extends(Functions, _super); function Functions() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Functions.prototype, "_className", { get: function () { @@ -20138,1270 +24020,1270 @@ var Excel; configurable: true }); Functions.prototype.abs=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Abs", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Abs", 0, [number], false, true, null, false)); }; Functions.prototype.accrInt=function (issue, firstInterest, settlement, rate, par, frequency, basis, calcMethod) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AccrInt", 0, [issue, firstInterest, settlement, rate, par, frequency, basis, calcMethod], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AccrInt", 0, [issue, firstInterest, settlement, rate, par, frequency, basis, calcMethod], false, true, null, false)); }; Functions.prototype.accrIntM=function (issue, settlement, rate, par, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AccrIntM", 0, [issue, settlement, rate, par, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AccrIntM", 0, [issue, settlement, rate, par, basis], false, true, null, false)); }; Functions.prototype.acos=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acos", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acos", 0, [number], false, true, null, false)); }; Functions.prototype.acosh=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acosh", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acosh", 0, [number], false, true, null, false)); }; Functions.prototype.acot=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acot", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acot", 0, [number], false, true, null, false)); }; Functions.prototype.acoth=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acoth", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acoth", 0, [number], false, true, null, false)); }; Functions.prototype.amorDegrc=function (cost, datePurchased, firstPeriod, salvage, period, rate, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AmorDegrc", 0, [cost, datePurchased, firstPeriod, salvage, period, rate, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AmorDegrc", 0, [cost, datePurchased, firstPeriod, salvage, period, rate, basis], false, true, null, false)); }; Functions.prototype.amorLinc=function (cost, datePurchased, firstPeriod, salvage, period, rate, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AmorLinc", 0, [cost, datePurchased, firstPeriod, salvage, period, rate, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AmorLinc", 0, [cost, datePurchased, firstPeriod, salvage, period, rate, basis], false, true, null, false)); }; Functions.prototype.and=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "And", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "And", 0, [values], false, true, null, false)); }; Functions.prototype.arabic=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Arabic", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Arabic", 0, [text], false, true, null, false)); }; Functions.prototype.areas=function (reference) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Areas", 0, [reference], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Areas", 0, [reference], false, true, null, false)); }; Functions.prototype.asc=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asc", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asc", 0, [text], false, true, null, false)); }; Functions.prototype.asin=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asin", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asin", 0, [number], false, true, null, false)); }; Functions.prototype.asinh=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asinh", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asinh", 0, [number], false, true, null, false)); }; Functions.prototype.atan=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atan", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atan", 0, [number], false, true, null, false)); }; Functions.prototype.atan2=function (xNum, yNum) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atan2", 0, [xNum, yNum], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atan2", 0, [xNum, yNum], false, true, null, false)); }; Functions.prototype.atanh=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atanh", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atanh", 0, [number], false, true, null, false)); }; Functions.prototype.aveDev=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AveDev", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AveDev", 0, [values], false, true, null, false)); }; Functions.prototype.average=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Average", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Average", 0, [values], false, true, null, false)); }; Functions.prototype.averageA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageA", 0, [values], false, true, null, false)); }; Functions.prototype.averageIf=function (range, criteria, averageRange) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageIf", 0, [range, criteria, averageRange], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageIf", 0, [range, criteria, averageRange], false, true, null, false)); }; Functions.prototype.averageIfs=function (averageRange) { var values=[]; for (var _i=1; _i < arguments.length; _i++) { values[_i - 1]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageIfs", 0, [averageRange, values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageIfs", 0, [averageRange, values], false, true, null, false)); }; Functions.prototype.bahtText=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BahtText", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BahtText", 0, [number], false, true, null, false)); }; Functions.prototype.base=function (number, radix, minLength) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Base", 0, [number, radix, minLength], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Base", 0, [number, radix, minLength], false, true, null, false)); }; Functions.prototype.besselI=function (x, n) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselI", 0, [x, n], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselI", 0, [x, n], false, true, null, false)); }; Functions.prototype.besselJ=function (x, n) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselJ", 0, [x, n], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselJ", 0, [x, n], false, true, null, false)); }; Functions.prototype.besselK=function (x, n) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselK", 0, [x, n], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselK", 0, [x, n], false, true, null, false)); }; Functions.prototype.besselY=function (x, n) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselY", 0, [x, n], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselY", 0, [x, n], false, true, null, false)); }; Functions.prototype.beta_Dist=function (x, alpha, beta, cumulative, A, B) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Beta_Dist", 0, [x, alpha, beta, cumulative, A, B], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Beta_Dist", 0, [x, alpha, beta, cumulative, A, B], false, true, null, false)); }; Functions.prototype.beta_Inv=function (probability, alpha, beta, A, B) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Beta_Inv", 0, [probability, alpha, beta, A, B], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Beta_Inv", 0, [probability, alpha, beta, A, B], false, true, null, false)); }; Functions.prototype.bin2Dec=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Dec", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Dec", 0, [number], false, true, null, false)); }; Functions.prototype.bin2Hex=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Hex", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Hex", 0, [number, places], false, true, null, false)); }; Functions.prototype.bin2Oct=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Oct", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Oct", 0, [number, places], false, true, null, false)); }; Functions.prototype.binom_Dist=function (numberS, trials, probabilityS, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Dist", 0, [numberS, trials, probabilityS, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Dist", 0, [numberS, trials, probabilityS, cumulative], false, true, null, false)); }; Functions.prototype.binom_Dist_Range=function (trials, probabilityS, numberS, numberS2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Dist_Range", 0, [trials, probabilityS, numberS, numberS2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Dist_Range", 0, [trials, probabilityS, numberS, numberS2], false, true, null, false)); }; Functions.prototype.binom_Inv=function (trials, probabilityS, alpha) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Inv", 0, [trials, probabilityS, alpha], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Inv", 0, [trials, probabilityS, alpha], false, true, null, false)); }; Functions.prototype.bitand=function (number1, number2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitand", 0, [number1, number2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitand", 0, [number1, number2], false, true, null, false)); }; Functions.prototype.bitlshift=function (number, shiftAmount) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitlshift", 0, [number, shiftAmount], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitlshift", 0, [number, shiftAmount], false, true, null, false)); }; Functions.prototype.bitor=function (number1, number2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitor", 0, [number1, number2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitor", 0, [number1, number2], false, true, null, false)); }; Functions.prototype.bitrshift=function (number, shiftAmount) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitrshift", 0, [number, shiftAmount], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitrshift", 0, [number, shiftAmount], false, true, null, false)); }; Functions.prototype.bitxor=function (number1, number2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitxor", 0, [number1, number2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitxor", 0, [number1, number2], false, true, null, false)); }; Functions.prototype.ceiling_Math=function (number, significance, mode) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ceiling_Math", 0, [number, significance, mode], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ceiling_Math", 0, [number, significance, mode], false, true, null, false)); }; Functions.prototype.ceiling_Precise=function (number, significance) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ceiling_Precise", 0, [number, significance], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ceiling_Precise", 0, [number, significance], false, true, null, false)); }; Functions.prototype.char=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Char", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Char", 0, [number], false, true, null, false)); }; Functions.prototype.chiSq_Dist=function (x, degFreedom, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Dist", 0, [x, degFreedom, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Dist", 0, [x, degFreedom, cumulative], false, true, null, false)); }; Functions.prototype.chiSq_Dist_RT=function (x, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Dist_RT", 0, [x, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Dist_RT", 0, [x, degFreedom], false, true, null, false)); }; Functions.prototype.chiSq_Inv=function (probability, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Inv", 0, [probability, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Inv", 0, [probability, degFreedom], false, true, null, false)); }; Functions.prototype.chiSq_Inv_RT=function (probability, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Inv_RT", 0, [probability, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Inv_RT", 0, [probability, degFreedom], false, true, null, false)); }; Functions.prototype.choose=function (indexNum) { var values=[]; for (var _i=1; _i < arguments.length; _i++) { values[_i - 1]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Choose", 0, [indexNum, values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Choose", 0, [indexNum, values], false, true, null, false)); }; Functions.prototype.clean=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Clean", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Clean", 0, [text], false, true, null, false)); }; Functions.prototype.code=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Code", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Code", 0, [text], false, true, null, false)); }; Functions.prototype.columns=function (array) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Columns", 0, [array], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Columns", 0, [array], false, true, null, false)); }; Functions.prototype.combin=function (number, numberChosen) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Combin", 0, [number, numberChosen], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Combin", 0, [number, numberChosen], false, true, null, false)); }; Functions.prototype.combina=function (number, numberChosen) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Combina", 0, [number, numberChosen], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Combina", 0, [number, numberChosen], false, true, null, false)); }; Functions.prototype.complex=function (realNum, iNum, suffix) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Complex", 0, [realNum, iNum, suffix], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Complex", 0, [realNum, iNum, suffix], false, true, null, false)); }; Functions.prototype.concatenate=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Concatenate", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Concatenate", 0, [values], false, true, null, false)); }; Functions.prototype.confidence_Norm=function (alpha, standardDev, size) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Confidence_Norm", 0, [alpha, standardDev, size], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Confidence_Norm", 0, [alpha, standardDev, size], false, true, null, false)); }; Functions.prototype.confidence_T=function (alpha, standardDev, size) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Confidence_T", 0, [alpha, standardDev, size], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Confidence_T", 0, [alpha, standardDev, size], false, true, null, false)); }; Functions.prototype.convert=function (number, fromUnit, toUnit) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Convert", 0, [number, fromUnit, toUnit], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Convert", 0, [number, fromUnit, toUnit], false, true, null, false)); }; Functions.prototype.cos=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cos", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cos", 0, [number], false, true, null, false)); }; Functions.prototype.cosh=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cosh", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cosh", 0, [number], false, true, null, false)); }; Functions.prototype.cot=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cot", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cot", 0, [number], false, true, null, false)); }; Functions.prototype.coth=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Coth", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Coth", 0, [number], false, true, null, false)); }; Functions.prototype.count=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Count", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Count", 0, [values], false, true, null, false)); }; Functions.prototype.countA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountA", 0, [values], false, true, null, false)); }; Functions.prototype.countBlank=function (range) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountBlank", 0, [range], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountBlank", 0, [range], false, true, null, false)); }; Functions.prototype.countIf=function (range, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountIf", 0, [range, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountIf", 0, [range, criteria], false, true, null, false)); }; Functions.prototype.countIfs=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountIfs", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountIfs", 0, [values], false, true, null, false)); }; Functions.prototype.coupDayBs=function (settlement, maturity, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDayBs", 0, [settlement, maturity, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDayBs", 0, [settlement, maturity, frequency, basis], false, true, null, false)); }; Functions.prototype.coupDays=function (settlement, maturity, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDays", 0, [settlement, maturity, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDays", 0, [settlement, maturity, frequency, basis], false, true, null, false)); }; Functions.prototype.coupDaysNc=function (settlement, maturity, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDaysNc", 0, [settlement, maturity, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDaysNc", 0, [settlement, maturity, frequency, basis], false, true, null, false)); }; Functions.prototype.coupNcd=function (settlement, maturity, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupNcd", 0, [settlement, maturity, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupNcd", 0, [settlement, maturity, frequency, basis], false, true, null, false)); }; Functions.prototype.coupNum=function (settlement, maturity, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupNum", 0, [settlement, maturity, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupNum", 0, [settlement, maturity, frequency, basis], false, true, null, false)); }; Functions.prototype.coupPcd=function (settlement, maturity, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupPcd", 0, [settlement, maturity, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupPcd", 0, [settlement, maturity, frequency, basis], false, true, null, false)); }; Functions.prototype.csc=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Csc", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Csc", 0, [number], false, true, null, false)); }; Functions.prototype.csch=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Csch", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Csch", 0, [number], false, true, null, false)); }; Functions.prototype.cumIPmt=function (rate, nper, pv, startPeriod, endPeriod, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CumIPmt", 0, [rate, nper, pv, startPeriod, endPeriod, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CumIPmt", 0, [rate, nper, pv, startPeriod, endPeriod, type], false, true, null, false)); }; Functions.prototype.cumPrinc=function (rate, nper, pv, startPeriod, endPeriod, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CumPrinc", 0, [rate, nper, pv, startPeriod, endPeriod, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CumPrinc", 0, [rate, nper, pv, startPeriod, endPeriod, type], false, true, null, false)); }; Functions.prototype.daverage=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DAverage", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DAverage", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dcount=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DCount", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DCount", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dcountA=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DCountA", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DCountA", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dget=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DGet", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DGet", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dmax=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DMax", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DMax", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dmin=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DMin", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DMin", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dproduct=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DProduct", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DProduct", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dstDev=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DStDev", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DStDev", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dstDevP=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DStDevP", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DStDevP", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dsum=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DSum", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DSum", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dvar=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DVar", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DVar", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dvarP=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DVarP", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DVarP", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.date=function (year, month, day) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Date", 0, [year, month, day], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Date", 0, [year, month, day], false, true, null, false)); }; Functions.prototype.datevalue=function (dateText) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Datevalue", 0, [dateText], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Datevalue", 0, [dateText], false, true, null, false)); }; Functions.prototype.day=function (serialNumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Day", 0, [serialNumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Day", 0, [serialNumber], false, true, null, false)); }; Functions.prototype.days=function (endDate, startDate) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Days", 0, [endDate, startDate], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Days", 0, [endDate, startDate], false, true, null, false)); }; Functions.prototype.days360=function (startDate, endDate, method) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Days360", 0, [startDate, endDate, method], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Days360", 0, [startDate, endDate, method], false, true, null, false)); }; Functions.prototype.db=function (cost, salvage, life, period, month) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Db", 0, [cost, salvage, life, period, month], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Db", 0, [cost, salvage, life, period, month], false, true, null, false)); }; Functions.prototype.dbcs=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dbcs", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dbcs", 0, [text], false, true, null, false)); }; Functions.prototype.ddb=function (cost, salvage, life, period, factor) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ddb", 0, [cost, salvage, life, period, factor], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ddb", 0, [cost, salvage, life, period, factor], false, true, null, false)); }; Functions.prototype.dec2Bin=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Bin", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Bin", 0, [number, places], false, true, null, false)); }; Functions.prototype.dec2Hex=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Hex", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Hex", 0, [number, places], false, true, null, false)); }; Functions.prototype.dec2Oct=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Oct", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Oct", 0, [number, places], false, true, null, false)); }; Functions.prototype.decimal=function (number, radix) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Decimal", 0, [number, radix], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Decimal", 0, [number, radix], false, true, null, false)); }; Functions.prototype.degrees=function (angle) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Degrees", 0, [angle], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Degrees", 0, [angle], false, true, null, false)); }; Functions.prototype.delta=function (number1, number2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Delta", 0, [number1, number2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Delta", 0, [number1, number2], false, true, null, false)); }; Functions.prototype.devSq=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DevSq", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DevSq", 0, [values], false, true, null, false)); }; Functions.prototype.disc=function (settlement, maturity, pr, redemption, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Disc", 0, [settlement, maturity, pr, redemption, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Disc", 0, [settlement, maturity, pr, redemption, basis], false, true, null, false)); }; Functions.prototype.dollar=function (number, decimals) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dollar", 0, [number, decimals], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dollar", 0, [number, decimals], false, true, null, false)); }; Functions.prototype.dollarDe=function (fractionalDollar, fraction) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DollarDe", 0, [fractionalDollar, fraction], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DollarDe", 0, [fractionalDollar, fraction], false, true, null, false)); }; Functions.prototype.dollarFr=function (decimalDollar, fraction) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DollarFr", 0, [decimalDollar, fraction], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DollarFr", 0, [decimalDollar, fraction], false, true, null, false)); }; Functions.prototype.duration=function (settlement, maturity, coupon, yld, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Duration", 0, [settlement, maturity, coupon, yld, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Duration", 0, [settlement, maturity, coupon, yld, frequency, basis], false, true, null, false)); }; Functions.prototype.ecma_Ceiling=function (number, significance) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ECMA_Ceiling", 0, [number, significance], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ECMA_Ceiling", 0, [number, significance], false, true, null, false)); }; Functions.prototype.edate=function (startDate, months) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "EDate", 0, [startDate, months], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "EDate", 0, [startDate, months], false, true, null, false)); }; Functions.prototype.effect=function (nominalRate, npery) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Effect", 0, [nominalRate, npery], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Effect", 0, [nominalRate, npery], false, true, null, false)); }; Functions.prototype.eoMonth=function (startDate, months) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "EoMonth", 0, [startDate, months], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "EoMonth", 0, [startDate, months], false, true, null, false)); }; Functions.prototype.erf=function (lowerLimit, upperLimit) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Erf", 0, [lowerLimit, upperLimit], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Erf", 0, [lowerLimit, upperLimit], false, true, null, false)); }; Functions.prototype.erfC=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ErfC", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ErfC", 0, [x], false, true, null, false)); }; Functions.prototype.erfC_Precise=function (X) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ErfC_Precise", 0, [X], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ErfC_Precise", 0, [X], false, true, null, false)); }; Functions.prototype.erf_Precise=function (X) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Erf_Precise", 0, [X], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Erf_Precise", 0, [X], false, true, null, false)); }; Functions.prototype.error_Type=function (errorVal) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Error_Type", 0, [errorVal], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Error_Type", 0, [errorVal], false, true, null, false)); }; Functions.prototype.even=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Even", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Even", 0, [number], false, true, null, false)); }; Functions.prototype.exact=function (text1, text2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Exact", 0, [text1, text2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Exact", 0, [text1, text2], false, true, null, false)); }; Functions.prototype.exp=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Exp", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Exp", 0, [number], false, true, null, false)); }; Functions.prototype.expon_Dist=function (x, lambda, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Expon_Dist", 0, [x, lambda, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Expon_Dist", 0, [x, lambda, cumulative], false, true, null, false)); }; Functions.prototype.fvschedule=function (principal, schedule) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FVSchedule", 0, [principal, schedule], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FVSchedule", 0, [principal, schedule], false, true, null, false)); }; Functions.prototype.f_Dist=function (x, degFreedom1, degFreedom2, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Dist", 0, [x, degFreedom1, degFreedom2, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Dist", 0, [x, degFreedom1, degFreedom2, cumulative], false, true, null, false)); }; Functions.prototype.f_Dist_RT=function (x, degFreedom1, degFreedom2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Dist_RT", 0, [x, degFreedom1, degFreedom2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Dist_RT", 0, [x, degFreedom1, degFreedom2], false, true, null, false)); }; Functions.prototype.f_Inv=function (probability, degFreedom1, degFreedom2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Inv", 0, [probability, degFreedom1, degFreedom2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Inv", 0, [probability, degFreedom1, degFreedom2], false, true, null, false)); }; Functions.prototype.f_Inv_RT=function (probability, degFreedom1, degFreedom2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Inv_RT", 0, [probability, degFreedom1, degFreedom2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Inv_RT", 0, [probability, degFreedom1, degFreedom2], false, true, null, false)); }; Functions.prototype.fact=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fact", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fact", 0, [number], false, true, null, false)); }; Functions.prototype.factDouble=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FactDouble", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FactDouble", 0, [number], false, true, null, false)); }; Functions.prototype.false=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "False", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "False", 0, [], false, true, null, false)); }; Functions.prototype.find=function (findText, withinText, startNum) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Find", 0, [findText, withinText, startNum], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Find", 0, [findText, withinText, startNum], false, true, null, false)); }; Functions.prototype.findB=function (findText, withinText, startNum) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FindB", 0, [findText, withinText, startNum], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FindB", 0, [findText, withinText, startNum], false, true, null, false)); }; Functions.prototype.fisher=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fisher", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fisher", 0, [x], false, true, null, false)); }; Functions.prototype.fisherInv=function (y) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FisherInv", 0, [y], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FisherInv", 0, [y], false, true, null, false)); }; Functions.prototype.fixed=function (number, decimals, noCommas) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fixed", 0, [number, decimals, noCommas], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fixed", 0, [number, decimals, noCommas], false, true, null, false)); }; Functions.prototype.floor_Math=function (number, significance, mode) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Floor_Math", 0, [number, significance, mode], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Floor_Math", 0, [number, significance, mode], false, true, null, false)); }; Functions.prototype.floor_Precise=function (number, significance) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Floor_Precise", 0, [number, significance], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Floor_Precise", 0, [number, significance], false, true, null, false)); }; Functions.prototype.fv=function (rate, nper, pmt, pv, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fv", 0, [rate, nper, pmt, pv, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fv", 0, [rate, nper, pmt, pv, type], false, true, null, false)); }; Functions.prototype.gamma=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma", 0, [x], false, true, null, false)); }; Functions.prototype.gammaLn=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GammaLn", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GammaLn", 0, [x], false, true, null, false)); }; Functions.prototype.gammaLn_Precise=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GammaLn_Precise", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GammaLn_Precise", 0, [x], false, true, null, false)); }; Functions.prototype.gamma_Dist=function (x, alpha, beta, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma_Dist", 0, [x, alpha, beta, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma_Dist", 0, [x, alpha, beta, cumulative], false, true, null, false)); }; Functions.prototype.gamma_Inv=function (probability, alpha, beta) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma_Inv", 0, [probability, alpha, beta], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma_Inv", 0, [probability, alpha, beta], false, true, null, false)); }; Functions.prototype.gauss=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gauss", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gauss", 0, [x], false, true, null, false)); }; Functions.prototype.gcd=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gcd", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gcd", 0, [values], false, true, null, false)); }; Functions.prototype.geStep=function (number, step) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GeStep", 0, [number, step], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GeStep", 0, [number, step], false, true, null, false)); }; Functions.prototype.geoMean=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GeoMean", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GeoMean", 0, [values], false, true, null, false)); }; Functions.prototype.hlookup=function (lookupValue, tableArray, rowIndexNum, rangeLookup) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HLookup", 0, [lookupValue, tableArray, rowIndexNum, rangeLookup], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HLookup", 0, [lookupValue, tableArray, rowIndexNum, rangeLookup], false, true, null, false)); }; Functions.prototype.harMean=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HarMean", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HarMean", 0, [values], false, true, null, false)); }; Functions.prototype.hex2Bin=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Bin", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Bin", 0, [number, places], false, true, null, false)); }; Functions.prototype.hex2Dec=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Dec", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Dec", 0, [number], false, true, null, false)); }; Functions.prototype.hex2Oct=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Oct", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Oct", 0, [number, places], false, true, null, false)); }; Functions.prototype.hour=function (serialNumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hour", 0, [serialNumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hour", 0, [serialNumber], false, true, null, false)); }; Functions.prototype.hypGeom_Dist=function (sampleS, numberSample, populationS, numberPop, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HypGeom_Dist", 0, [sampleS, numberSample, populationS, numberPop, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HypGeom_Dist", 0, [sampleS, numberSample, populationS, numberPop, cumulative], false, true, null, false)); }; Functions.prototype.hyperlink=function (linkLocation, friendlyName) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hyperlink", 0, [linkLocation, friendlyName], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hyperlink", 0, [linkLocation, friendlyName], false, true, null, false)); }; Functions.prototype.iso_Ceiling=function (number, significance) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ISO_Ceiling", 0, [number, significance], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ISO_Ceiling", 0, [number, significance], false, true, null, false)); }; Functions.prototype.if=function (logicalTest, valueIfTrue, valueIfFalse) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "If", 0, [logicalTest, valueIfTrue, valueIfFalse], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "If", 0, [logicalTest, valueIfTrue, valueIfFalse], false, true, null, false)); }; Functions.prototype.imAbs=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImAbs", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImAbs", 0, [inumber], false, true, null, false)); }; Functions.prototype.imArgument=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImArgument", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImArgument", 0, [inumber], false, true, null, false)); }; Functions.prototype.imConjugate=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImConjugate", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImConjugate", 0, [inumber], false, true, null, false)); }; Functions.prototype.imCos=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCos", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCos", 0, [inumber], false, true, null, false)); }; Functions.prototype.imCosh=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCosh", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCosh", 0, [inumber], false, true, null, false)); }; Functions.prototype.imCot=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCot", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCot", 0, [inumber], false, true, null, false)); }; Functions.prototype.imCsc=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCsc", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCsc", 0, [inumber], false, true, null, false)); }; Functions.prototype.imCsch=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCsch", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCsch", 0, [inumber], false, true, null, false)); }; Functions.prototype.imDiv=function (inumber1, inumber2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImDiv", 0, [inumber1, inumber2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImDiv", 0, [inumber1, inumber2], false, true, null, false)); }; Functions.prototype.imExp=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImExp", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImExp", 0, [inumber], false, true, null, false)); }; Functions.prototype.imLn=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLn", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLn", 0, [inumber], false, true, null, false)); }; Functions.prototype.imLog10=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLog10", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLog10", 0, [inumber], false, true, null, false)); }; Functions.prototype.imLog2=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLog2", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLog2", 0, [inumber], false, true, null, false)); }; Functions.prototype.imPower=function (inumber, number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImPower", 0, [inumber, number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImPower", 0, [inumber, number], false, true, null, false)); }; Functions.prototype.imProduct=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImProduct", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImProduct", 0, [values], false, true, null, false)); }; Functions.prototype.imReal=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImReal", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImReal", 0, [inumber], false, true, null, false)); }; Functions.prototype.imSec=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSec", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSec", 0, [inumber], false, true, null, false)); }; Functions.prototype.imSech=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSech", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSech", 0, [inumber], false, true, null, false)); }; Functions.prototype.imSin=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSin", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSin", 0, [inumber], false, true, null, false)); }; Functions.prototype.imSinh=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSinh", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSinh", 0, [inumber], false, true, null, false)); }; Functions.prototype.imSqrt=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSqrt", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSqrt", 0, [inumber], false, true, null, false)); }; Functions.prototype.imSub=function (inumber1, inumber2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSub", 0, [inumber1, inumber2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSub", 0, [inumber1, inumber2], false, true, null, false)); }; Functions.prototype.imSum=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSum", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSum", 0, [values], false, true, null, false)); }; Functions.prototype.imTan=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImTan", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImTan", 0, [inumber], false, true, null, false)); }; Functions.prototype.imaginary=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Imaginary", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Imaginary", 0, [inumber], false, true, null, false)); }; Functions.prototype.int=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Int", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Int", 0, [number], false, true, null, false)); }; Functions.prototype.intRate=function (settlement, maturity, investment, redemption, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IntRate", 0, [settlement, maturity, investment, redemption, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IntRate", 0, [settlement, maturity, investment, redemption, basis], false, true, null, false)); }; Functions.prototype.ipmt=function (rate, per, nper, pv, fv, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ipmt", 0, [rate, per, nper, pv, fv, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ipmt", 0, [rate, per, nper, pv, fv, type], false, true, null, false)); }; Functions.prototype.irr=function (values, guess) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Irr", 0, [values, guess], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Irr", 0, [values, guess], false, true, null, false)); }; Functions.prototype.isErr=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsErr", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsErr", 0, [value], false, true, null, false)); }; Functions.prototype.isError=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsError", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsError", 0, [value], false, true, null, false)); }; Functions.prototype.isEven=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsEven", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsEven", 0, [number], false, true, null, false)); }; Functions.prototype.isFormula=function (reference) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsFormula", 0, [reference], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsFormula", 0, [reference], false, true, null, false)); }; Functions.prototype.isLogical=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsLogical", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsLogical", 0, [value], false, true, null, false)); }; Functions.prototype.isNA=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNA", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNA", 0, [value], false, true, null, false)); }; Functions.prototype.isNonText=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNonText", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNonText", 0, [value], false, true, null, false)); }; Functions.prototype.isNumber=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNumber", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNumber", 0, [value], false, true, null, false)); }; Functions.prototype.isOdd=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsOdd", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsOdd", 0, [number], false, true, null, false)); }; Functions.prototype.isText=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsText", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsText", 0, [value], false, true, null, false)); }; Functions.prototype.isoWeekNum=function (date) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsoWeekNum", 0, [date], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsoWeekNum", 0, [date], false, true, null, false)); }; Functions.prototype.ispmt=function (rate, per, nper, pv) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ispmt", 0, [rate, per, nper, pv], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ispmt", 0, [rate, per, nper, pv], false, true, null, false)); }; Functions.prototype.isref=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Isref", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Isref", 0, [value], false, true, null, false)); }; Functions.prototype.kurt=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Kurt", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Kurt", 0, [values], false, true, null, false)); }; Functions.prototype.large=function (array, k) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Large", 0, [array, k], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Large", 0, [array, k], false, true, null, false)); }; Functions.prototype.lcm=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lcm", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lcm", 0, [values], false, true, null, false)); }; Functions.prototype.left=function (text, numChars) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Left", 0, [text, numChars], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Left", 0, [text, numChars], false, true, null, false)); }; Functions.prototype.leftb=function (text, numBytes) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Leftb", 0, [text, numBytes], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Leftb", 0, [text, numBytes], false, true, null, false)); }; Functions.prototype.len=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Len", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Len", 0, [text], false, true, null, false)); }; Functions.prototype.lenb=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lenb", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lenb", 0, [text], false, true, null, false)); }; Functions.prototype.ln=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ln", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ln", 0, [number], false, true, null, false)); }; Functions.prototype.log=function (number, base) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Log", 0, [number, base], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Log", 0, [number, base], false, true, null, false)); }; Functions.prototype.log10=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Log10", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Log10", 0, [number], false, true, null, false)); }; Functions.prototype.logNorm_Dist=function (x, mean, standardDev, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "LogNorm_Dist", 0, [x, mean, standardDev, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "LogNorm_Dist", 0, [x, mean, standardDev, cumulative], false, true, null, false)); }; Functions.prototype.logNorm_Inv=function (probability, mean, standardDev) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "LogNorm_Inv", 0, [probability, mean, standardDev], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "LogNorm_Inv", 0, [probability, mean, standardDev], false, true, null, false)); }; Functions.prototype.lookup=function (lookupValue, lookupVector, resultVector) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lookup", 0, [lookupValue, lookupVector, resultVector], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lookup", 0, [lookupValue, lookupVector, resultVector], false, true, null, false)); }; Functions.prototype.lower=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lower", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lower", 0, [text], false, true, null, false)); }; Functions.prototype.mduration=function (settlement, maturity, coupon, yld, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MDuration", 0, [settlement, maturity, coupon, yld, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MDuration", 0, [settlement, maturity, coupon, yld, frequency, basis], false, true, null, false)); }; Functions.prototype.mirr=function (values, financeRate, reinvestRate) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MIrr", 0, [values, financeRate, reinvestRate], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MIrr", 0, [values, financeRate, reinvestRate], false, true, null, false)); }; Functions.prototype.mround=function (number, multiple) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MRound", 0, [number, multiple], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MRound", 0, [number, multiple], false, true, null, false)); }; Functions.prototype.match=function (lookupValue, lookupArray, matchType) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Match", 0, [lookupValue, lookupArray, matchType], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Match", 0, [lookupValue, lookupArray, matchType], false, true, null, false)); }; Functions.prototype.max=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Max", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Max", 0, [values], false, true, null, false)); }; Functions.prototype.maxA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MaxA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MaxA", 0, [values], false, true, null, false)); }; Functions.prototype.median=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Median", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Median", 0, [values], false, true, null, false)); }; Functions.prototype.mid=function (text, startNum, numChars) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Mid", 0, [text, startNum, numChars], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Mid", 0, [text, startNum, numChars], false, true, null, false)); }; Functions.prototype.midb=function (text, startNum, numBytes) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Midb", 0, [text, startNum, numBytes], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Midb", 0, [text, startNum, numBytes], false, true, null, false)); }; Functions.prototype.min=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Min", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Min", 0, [values], false, true, null, false)); }; Functions.prototype.minA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MinA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MinA", 0, [values], false, true, null, false)); }; Functions.prototype.minute=function (serialNumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Minute", 0, [serialNumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Minute", 0, [serialNumber], false, true, null, false)); }; Functions.prototype.mod=function (number, divisor) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Mod", 0, [number, divisor], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Mod", 0, [number, divisor], false, true, null, false)); }; Functions.prototype.month=function (serialNumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Month", 0, [serialNumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Month", 0, [serialNumber], false, true, null, false)); }; Functions.prototype.multiNomial=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MultiNomial", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MultiNomial", 0, [values], false, true, null, false)); }; Functions.prototype.n=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "N", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "N", 0, [value], false, true, null, false)); }; Functions.prototype.nper=function (rate, pmt, pv, fv, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NPer", 0, [rate, pmt, pv, fv, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NPer", 0, [rate, pmt, pv, fv, type], false, true, null, false)); }; Functions.prototype.na=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Na", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Na", 0, [], false, true, null, false)); }; Functions.prototype.negBinom_Dist=function (numberF, numberS, probabilityS, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NegBinom_Dist", 0, [numberF, numberS, probabilityS, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NegBinom_Dist", 0, [numberF, numberS, probabilityS, cumulative], false, true, null, false)); }; Functions.prototype.networkDays=function (startDate, endDate, holidays) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NetworkDays", 0, [startDate, endDate, holidays], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NetworkDays", 0, [startDate, endDate, holidays], false, true, null, false)); }; Functions.prototype.networkDays_Intl=function (startDate, endDate, weekend, holidays) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NetworkDays_Intl", 0, [startDate, endDate, weekend, holidays], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NetworkDays_Intl", 0, [startDate, endDate, weekend, holidays], false, true, null, false)); }; Functions.prototype.nominal=function (effectRate, npery) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Nominal", 0, [effectRate, npery], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Nominal", 0, [effectRate, npery], false, true, null, false)); }; Functions.prototype.norm_Dist=function (x, mean, standardDev, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_Dist", 0, [x, mean, standardDev, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_Dist", 0, [x, mean, standardDev, cumulative], false, true, null, false)); }; Functions.prototype.norm_Inv=function (probability, mean, standardDev) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_Inv", 0, [probability, mean, standardDev], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_Inv", 0, [probability, mean, standardDev], false, true, null, false)); }; Functions.prototype.norm_S_Dist=function (z, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_S_Dist", 0, [z, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_S_Dist", 0, [z, cumulative], false, true, null, false)); }; Functions.prototype.norm_S_Inv=function (probability) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_S_Inv", 0, [probability], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_S_Inv", 0, [probability], false, true, null, false)); }; Functions.prototype.not=function (logical) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Not", 0, [logical], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Not", 0, [logical], false, true, null, false)); }; Functions.prototype.now=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Now", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Now", 0, [], false, true, null, false)); }; Functions.prototype.npv=function (rate) { var values=[]; for (var _i=1; _i < arguments.length; _i++) { values[_i - 1]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Npv", 0, [rate, values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Npv", 0, [rate, values], false, true, null, false)); }; Functions.prototype.numberValue=function (text, decimalSeparator, groupSeparator) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NumberValue", 0, [text, decimalSeparator, groupSeparator], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NumberValue", 0, [text, decimalSeparator, groupSeparator], false, true, null, false)); }; Functions.prototype.oct2Bin=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Bin", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Bin", 0, [number, places], false, true, null, false)); }; Functions.prototype.oct2Dec=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Dec", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Dec", 0, [number], false, true, null, false)); }; Functions.prototype.oct2Hex=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Hex", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Hex", 0, [number, places], false, true, null, false)); }; Functions.prototype.odd=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Odd", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Odd", 0, [number], false, true, null, false)); }; Functions.prototype.oddFPrice=function (settlement, maturity, issue, firstCoupon, rate, yld, redemption, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddFPrice", 0, [settlement, maturity, issue, firstCoupon, rate, yld, redemption, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddFPrice", 0, [settlement, maturity, issue, firstCoupon, rate, yld, redemption, frequency, basis], false, true, null, false)); }; Functions.prototype.oddFYield=function (settlement, maturity, issue, firstCoupon, rate, pr, redemption, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddFYield", 0, [settlement, maturity, issue, firstCoupon, rate, pr, redemption, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddFYield", 0, [settlement, maturity, issue, firstCoupon, rate, pr, redemption, frequency, basis], false, true, null, false)); }; Functions.prototype.oddLPrice=function (settlement, maturity, lastInterest, rate, yld, redemption, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddLPrice", 0, [settlement, maturity, lastInterest, rate, yld, redemption, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddLPrice", 0, [settlement, maturity, lastInterest, rate, yld, redemption, frequency, basis], false, true, null, false)); }; Functions.prototype.oddLYield=function (settlement, maturity, lastInterest, rate, pr, redemption, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddLYield", 0, [settlement, maturity, lastInterest, rate, pr, redemption, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddLYield", 0, [settlement, maturity, lastInterest, rate, pr, redemption, frequency, basis], false, true, null, false)); }; Functions.prototype.or=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Or", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Or", 0, [values], false, true, null, false)); }; Functions.prototype.pduration=function (rate, pv, fv) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PDuration", 0, [rate, pv, fv], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PDuration", 0, [rate, pv, fv], false, true, null, false)); }; Functions.prototype.percentRank_Exc=function (array, x, significance) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PercentRank_Exc", 0, [array, x, significance], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PercentRank_Exc", 0, [array, x, significance], false, true, null, false)); }; Functions.prototype.percentRank_Inc=function (array, x, significance) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PercentRank_Inc", 0, [array, x, significance], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PercentRank_Inc", 0, [array, x, significance], false, true, null, false)); }; Functions.prototype.percentile_Exc=function (array, k) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Percentile_Exc", 0, [array, k], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Percentile_Exc", 0, [array, k], false, true, null, false)); }; Functions.prototype.percentile_Inc=function (array, k) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Percentile_Inc", 0, [array, k], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Percentile_Inc", 0, [array, k], false, true, null, false)); }; Functions.prototype.permut=function (number, numberChosen) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Permut", 0, [number, numberChosen], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Permut", 0, [number, numberChosen], false, true, null, false)); }; Functions.prototype.permutationa=function (number, numberChosen) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Permutationa", 0, [number, numberChosen], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Permutationa", 0, [number, numberChosen], false, true, null, false)); }; Functions.prototype.phi=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Phi", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Phi", 0, [x], false, true, null, false)); }; Functions.prototype.pi=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pi", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pi", 0, [], false, true, null, false)); }; Functions.prototype.pmt=function (rate, nper, pv, fv, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pmt", 0, [rate, nper, pv, fv, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pmt", 0, [rate, nper, pv, fv, type], false, true, null, false)); }; Functions.prototype.poisson_Dist=function (x, mean, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Poisson_Dist", 0, [x, mean, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Poisson_Dist", 0, [x, mean, cumulative], false, true, null, false)); }; Functions.prototype.power=function (number, power) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Power", 0, [number, power], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Power", 0, [number, power], false, true, null, false)); }; Functions.prototype.ppmt=function (rate, per, nper, pv, fv, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ppmt", 0, [rate, per, nper, pv, fv, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ppmt", 0, [rate, per, nper, pv, fv, type], false, true, null, false)); }; Functions.prototype.price=function (settlement, maturity, rate, yld, redemption, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Price", 0, [settlement, maturity, rate, yld, redemption, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Price", 0, [settlement, maturity, rate, yld, redemption, frequency, basis], false, true, null, false)); }; Functions.prototype.priceDisc=function (settlement, maturity, discount, redemption, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PriceDisc", 0, [settlement, maturity, discount, redemption, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PriceDisc", 0, [settlement, maturity, discount, redemption, basis], false, true, null, false)); }; Functions.prototype.priceMat=function (settlement, maturity, issue, rate, yld, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PriceMat", 0, [settlement, maturity, issue, rate, yld, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PriceMat", 0, [settlement, maturity, issue, rate, yld, basis], false, true, null, false)); }; Functions.prototype.product=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Product", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Product", 0, [values], false, true, null, false)); }; Functions.prototype.proper=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Proper", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Proper", 0, [text], false, true, null, false)); }; Functions.prototype.pv=function (rate, nper, pmt, fv, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pv", 0, [rate, nper, pmt, fv, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pv", 0, [rate, nper, pmt, fv, type], false, true, null, false)); }; Functions.prototype.quartile_Exc=function (array, quart) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quartile_Exc", 0, [array, quart], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quartile_Exc", 0, [array, quart], false, true, null, false)); }; Functions.prototype.quartile_Inc=function (array, quart) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quartile_Inc", 0, [array, quart], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quartile_Inc", 0, [array, quart], false, true, null, false)); }; Functions.prototype.quotient=function (numerator, denominator) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quotient", 0, [numerator, denominator], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quotient", 0, [numerator, denominator], false, true, null, false)); }; Functions.prototype.radians=function (angle) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Radians", 0, [angle], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Radians", 0, [angle], false, true, null, false)); }; Functions.prototype.rand=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rand", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rand", 0, [], false, true, null, false)); }; Functions.prototype.randBetween=function (bottom, top) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RandBetween", 0, [bottom, top], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RandBetween", 0, [bottom, top], false, true, null, false)); }; Functions.prototype.rank_Avg=function (number, ref, order) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rank_Avg", 0, [number, ref, order], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rank_Avg", 0, [number, ref, order], false, true, null, false)); }; Functions.prototype.rank_Eq=function (number, ref, order) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rank_Eq", 0, [number, ref, order], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rank_Eq", 0, [number, ref, order], false, true, null, false)); }; Functions.prototype.rate=function (nper, pmt, pv, fv, type, guess) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rate", 0, [nper, pmt, pv, fv, type, guess], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rate", 0, [nper, pmt, pv, fv, type, guess], false, true, null, false)); }; Functions.prototype.received=function (settlement, maturity, investment, discount, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Received", 0, [settlement, maturity, investment, discount, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Received", 0, [settlement, maturity, investment, discount, basis], false, true, null, false)); }; Functions.prototype.replace=function (oldText, startNum, numChars, newText) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Replace", 0, [oldText, startNum, numChars, newText], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Replace", 0, [oldText, startNum, numChars, newText], false, true, null, false)); }; Functions.prototype.replaceB=function (oldText, startNum, numBytes, newText) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ReplaceB", 0, [oldText, startNum, numBytes, newText], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ReplaceB", 0, [oldText, startNum, numBytes, newText], false, true, null, false)); }; Functions.prototype.rept=function (text, numberTimes) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rept", 0, [text, numberTimes], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rept", 0, [text, numberTimes], false, true, null, false)); }; Functions.prototype.right=function (text, numChars) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Right", 0, [text, numChars], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Right", 0, [text, numChars], false, true, null, false)); }; Functions.prototype.rightb=function (text, numBytes) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rightb", 0, [text, numBytes], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rightb", 0, [text, numBytes], false, true, null, false)); }; Functions.prototype.roman=function (number, form) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Roman", 0, [number, form], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Roman", 0, [number, form], false, true, null, false)); }; Functions.prototype.round=function (number, numDigits) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Round", 0, [number, numDigits], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Round", 0, [number, numDigits], false, true, null, false)); }; Functions.prototype.roundDown=function (number, numDigits) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RoundDown", 0, [number, numDigits], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RoundDown", 0, [number, numDigits], false, true, null, false)); }; Functions.prototype.roundUp=function (number, numDigits) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RoundUp", 0, [number, numDigits], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RoundUp", 0, [number, numDigits], false, true, null, false)); }; Functions.prototype.rows=function (array) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rows", 0, [array], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rows", 0, [array], false, true, null, false)); }; Functions.prototype.rri=function (nper, pv, fv) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rri", 0, [nper, pv, fv], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rri", 0, [nper, pv, fv], false, true, null, false)); }; Functions.prototype.sec=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sec", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sec", 0, [number], false, true, null, false)); }; Functions.prototype.sech=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sech", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sech", 0, [number], false, true, null, false)); }; Functions.prototype.second=function (serialNumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Second", 0, [serialNumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Second", 0, [serialNumber], false, true, null, false)); }; Functions.prototype.seriesSum=function (x, n, m, coefficients) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SeriesSum", 0, [x, n, m, coefficients], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SeriesSum", 0, [x, n, m, coefficients], false, true, null, false)); }; Functions.prototype.sheet=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sheet", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sheet", 0, [value], false, true, null, false)); }; Functions.prototype.sheets=function (reference) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sheets", 0, [reference], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sheets", 0, [reference], false, true, null, false)); }; Functions.prototype.sign=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sign", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sign", 0, [number], false, true, null, false)); }; Functions.prototype.sin=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sin", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sin", 0, [number], false, true, null, false)); }; Functions.prototype.sinh=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sinh", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sinh", 0, [number], false, true, null, false)); }; Functions.prototype.skew=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Skew", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Skew", 0, [values], false, true, null, false)); }; Functions.prototype.skew_p=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Skew_p", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Skew_p", 0, [values], false, true, null, false)); }; Functions.prototype.sln=function (cost, salvage, life) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sln", 0, [cost, salvage, life], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sln", 0, [cost, salvage, life], false, true, null, false)); }; Functions.prototype.small=function (array, k) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Small", 0, [array, k], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Small", 0, [array, k], false, true, null, false)); }; Functions.prototype.sqrt=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sqrt", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sqrt", 0, [number], false, true, null, false)); }; Functions.prototype.sqrtPi=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SqrtPi", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SqrtPi", 0, [number], false, true, null, false)); }; Functions.prototype.stDevA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDevA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDevA", 0, [values], false, true, null, false)); }; Functions.prototype.stDevPA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDevPA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDevPA", 0, [values], false, true, null, false)); }; Functions.prototype.stDev_P=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDev_P", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDev_P", 0, [values], false, true, null, false)); }; Functions.prototype.stDev_S=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDev_S", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDev_S", 0, [values], false, true, null, false)); }; Functions.prototype.standardize=function (x, mean, standardDev) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Standardize", 0, [x, mean, standardDev], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Standardize", 0, [x, mean, standardDev], false, true, null, false)); }; Functions.prototype.substitute=function (text, oldText, newText, instanceNum) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Substitute", 0, [text, oldText, newText, instanceNum], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Substitute", 0, [text, oldText, newText, instanceNum], false, true, null, false)); }; Functions.prototype.subtotal=function (functionNum) { var values=[]; for (var _i=1; _i < arguments.length; _i++) { values[_i - 1]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Subtotal", 0, [functionNum, values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Subtotal", 0, [functionNum, values], false, true, null, false)); }; Functions.prototype.sum=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sum", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sum", 0, [values], false, true, null, false)); }; Functions.prototype.sumIf=function (range, criteria, sumRange) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumIf", 0, [range, criteria, sumRange], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumIf", 0, [range, criteria, sumRange], false, true, null, false)); }; Functions.prototype.sumIfs=function (sumRange) { var values=[]; for (var _i=1; _i < arguments.length; _i++) { values[_i - 1]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumIfs", 0, [sumRange, values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumIfs", 0, [sumRange, values], false, true, null, false)); }; Functions.prototype.sumSq=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumSq", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumSq", 0, [values], false, true, null, false)); }; Functions.prototype.syd=function (cost, salvage, life, per) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Syd", 0, [cost, salvage, life, per], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Syd", 0, [cost, salvage, life, per], false, true, null, false)); }; Functions.prototype.t=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T", 0, [value], false, true, null, false)); }; Functions.prototype.tbillEq=function (settlement, maturity, discount) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillEq", 0, [settlement, maturity, discount], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillEq", 0, [settlement, maturity, discount], false, true, null, false)); }; Functions.prototype.tbillPrice=function (settlement, maturity, discount) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillPrice", 0, [settlement, maturity, discount], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillPrice", 0, [settlement, maturity, discount], false, true, null, false)); }; Functions.prototype.tbillYield=function (settlement, maturity, pr) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillYield", 0, [settlement, maturity, pr], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillYield", 0, [settlement, maturity, pr], false, true, null, false)); }; Functions.prototype.t_Dist=function (x, degFreedom, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist", 0, [x, degFreedom, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist", 0, [x, degFreedom, cumulative], false, true, null, false)); }; Functions.prototype.t_Dist_2T=function (x, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist_2T", 0, [x, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist_2T", 0, [x, degFreedom], false, true, null, false)); }; Functions.prototype.t_Dist_RT=function (x, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist_RT", 0, [x, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist_RT", 0, [x, degFreedom], false, true, null, false)); }; Functions.prototype.t_Inv=function (probability, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Inv", 0, [probability, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Inv", 0, [probability, degFreedom], false, true, null, false)); }; Functions.prototype.t_Inv_2T=function (probability, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Inv_2T", 0, [probability, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Inv_2T", 0, [probability, degFreedom], false, true, null, false)); }; Functions.prototype.tan=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Tan", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Tan", 0, [number], false, true, null, false)); }; Functions.prototype.tanh=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Tanh", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Tanh", 0, [number], false, true, null, false)); }; Functions.prototype.text=function (value, formatText) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Text", 0, [value, formatText], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Text", 0, [value, formatText], false, true, null, false)); }; Functions.prototype.time=function (hour, minute, second) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Time", 0, [hour, minute, second], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Time", 0, [hour, minute, second], false, true, null, false)); }; Functions.prototype.timevalue=function (timeText) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Timevalue", 0, [timeText], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Timevalue", 0, [timeText], false, true, null, false)); }; Functions.prototype.today=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Today", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Today", 0, [], false, true, null, false)); }; Functions.prototype.trim=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Trim", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Trim", 0, [text], false, true, null, false)); }; Functions.prototype.trimMean=function (array, percent) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TrimMean", 0, [array, percent], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TrimMean", 0, [array, percent], false, true, null, false)); }; Functions.prototype.true=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "True", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "True", 0, [], false, true, null, false)); }; Functions.prototype.trunc=function (number, numDigits) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Trunc", 0, [number, numDigits], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Trunc", 0, [number, numDigits], false, true, null, false)); }; Functions.prototype.type=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Type", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Type", 0, [value], false, true, null, false)); }; Functions.prototype.usdollar=function (number, decimals) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "USDollar", 0, [number, decimals], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "USDollar", 0, [number, decimals], false, true, null, false)); }; Functions.prototype.unichar=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Unichar", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Unichar", 0, [number], false, true, null, false)); }; Functions.prototype.unicode=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Unicode", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Unicode", 0, [text], false, true, null, false)); }; Functions.prototype.upper=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Upper", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Upper", 0, [text], false, true, null, false)); }; Functions.prototype.vlookup=function (lookupValue, tableArray, colIndexNum, rangeLookup) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VLookup", 0, [lookupValue, tableArray, colIndexNum, rangeLookup], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VLookup", 0, [lookupValue, tableArray, colIndexNum, rangeLookup], false, true, null, false)); }; Functions.prototype.value=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Value", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Value", 0, [text], false, true, null, false)); }; Functions.prototype.varA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VarA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VarA", 0, [values], false, true, null, false)); }; Functions.prototype.varPA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VarPA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VarPA", 0, [values], false, true, null, false)); }; Functions.prototype.var_P=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Var_P", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Var_P", 0, [values], false, true, null, false)); }; Functions.prototype.var_S=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Var_S", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Var_S", 0, [values], false, true, null, false)); }; Functions.prototype.vdb=function (cost, salvage, life, startPeriod, endPeriod, factor, noSwitch) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Vdb", 0, [cost, salvage, life, startPeriod, endPeriod, factor, noSwitch], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Vdb", 0, [cost, salvage, life, startPeriod, endPeriod, factor, noSwitch], false, true, null, false)); }; Functions.prototype.weekNum=function (serialNumber, returnType) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WeekNum", 0, [serialNumber, returnType], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WeekNum", 0, [serialNumber, returnType], false, true, null, false)); }; Functions.prototype.weekday=function (serialNumber, returnType) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Weekday", 0, [serialNumber, returnType], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Weekday", 0, [serialNumber, returnType], false, true, null, false)); }; Functions.prototype.weibull_Dist=function (x, alpha, beta, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Weibull_Dist", 0, [x, alpha, beta, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Weibull_Dist", 0, [x, alpha, beta, cumulative], false, true, null, false)); }; Functions.prototype.workDay=function (startDate, days, holidays) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WorkDay", 0, [startDate, days, holidays], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WorkDay", 0, [startDate, days, holidays], false, true, null, false)); }; Functions.prototype.workDay_Intl=function (startDate, days, weekend, holidays) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WorkDay_Intl", 0, [startDate, days, weekend, holidays], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WorkDay_Intl", 0, [startDate, days, weekend, holidays], false, true, null, false)); }; Functions.prototype.xirr=function (values, dates, guess) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xirr", 0, [values, dates, guess], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xirr", 0, [values, dates, guess], false, true, null, false)); }; Functions.prototype.xnpv=function (rate, values, dates) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xnpv", 0, [rate, values, dates], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xnpv", 0, [rate, values, dates], false, true, null, false)); }; Functions.prototype.xor=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xor", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xor", 0, [values], false, true, null, false)); }; Functions.prototype.year=function (serialNumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Year", 0, [serialNumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Year", 0, [serialNumber], false, true, null, false)); }; Functions.prototype.yearFrac=function (startDate, endDate, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YearFrac", 0, [startDate, endDate, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YearFrac", 0, [startDate, endDate, basis], false, true, null, false)); }; Functions.prototype.yield=function (settlement, maturity, rate, pr, redemption, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Yield", 0, [settlement, maturity, rate, pr, redemption, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Yield", 0, [settlement, maturity, rate, pr, redemption, frequency, basis], false, true, null, false)); }; Functions.prototype.yieldDisc=function (settlement, maturity, pr, redemption, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YieldDisc", 0, [settlement, maturity, pr, redemption, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YieldDisc", 0, [settlement, maturity, pr, redemption, basis], false, true, null, false)); }; Functions.prototype.yieldMat=function (settlement, maturity, issue, rate, pr, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YieldMat", 0, [settlement, maturity, issue, rate, pr, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YieldMat", 0, [settlement, maturity, issue, rate, pr, basis], false, true, null, false)); }; Functions.prototype.z_Test=function (array, x, sigma) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Z_Test", 0, [array, x, sigma], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Z_Test", 0, [array, x, sigma], false, true, null, false)); }; Functions.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -21410,8 +25292,12 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); }; + Functions.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; Functions.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}); }; return Functions; }(OfficeExtension.ClientObject)); @@ -21420,6 +25306,7 @@ var Excel; (function (ErrorCodes) { ErrorCodes.accessDenied="AccessDenied"; ErrorCodes.apiNotFound="ApiNotFound"; + ErrorCodes.conflict="Conflict"; ErrorCodes.generalException="GeneralException"; ErrorCodes.insertDeleteConflict="InsertDeleteConflict"; ErrorCodes.invalidArgument="InvalidArgument"; @@ -21431,7 +25318,10 @@ var Excel; ErrorCodes.itemNotFound="ItemNotFound"; ErrorCodes.notImplemented="NotImplemented"; ErrorCodes.unsupportedOperation="UnsupportedOperation"; + ErrorCodes.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"; })(ErrorCodes=Excel.ErrorCodes || (Excel.ErrorCodes={})); })(Excel || (Excel={})); +OfficeExtension.Utility._doApiNotSupportedCheck=true; + diff --git a/node_modules/@microsoft/office-js/dist/excel-win32-16.01.js b/node_modules/@microsoft/office-js/dist/excel-win32-16.01.js index 64d98f0..403c7c2 100644 --- a/node_modules/@microsoft/office-js/dist/excel-win32-16.01.js +++ b/node_modules/@microsoft/office-js/dist/excel-win32-16.01.js @@ -1,7 +1,7 @@ /* Excel Desktop-specific API library */ -/* Version: 16.0.8118.3000 */ +/* Version: 16.0.8904.3000 */ -/* Office.js Version: 16.0.8119.1000 */ +/* Office.js Version: 16.0.8916.1000 */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ @@ -18,4 +18,4 @@ * @version 2.3.0 */ -var __extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},OsfMsAjaxFactory,OSF,OSFLog,Logger,OSFAriaLogger,OSFAppTelemetry,OfficeExt,OfficeExtension,Excel;(function(n){var t=function(){function t(){}var n=!0;return t.prototype.isMsAjaxLoaded=function(){var t="function",i="undefined";return typeof Sys!==i&&typeof Type!==i&&Sys.StringBuilder&&typeof Sys.StringBuilder===t&&Type.registerNamespace&&typeof Type.registerNamespace===t&&Type.registerClass&&typeof Type.registerClass===t&&typeof Function._validateParams===t&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===t?n:!1},t.prototype.loadMsAjaxFull=function(n){var t=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,n)},Object.defineProperty(t.prototype,"msAjaxError",{get:function(){var n=this;return n._msAjaxError==null&&n.isMsAjaxLoaded()&&(n._msAjaxError=Error),n._msAjaxError},set:function(n){this._msAjaxError=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxString",{get:function(){var n=this;return n._msAjaxString==null&&n.isMsAjaxLoaded()&&(n._msAjaxString=String),n._msAjaxString},set:function(n){this._msAjaxString=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxDebug",{get:function(){var n=this;return n._msAjaxDebug==null&&n.isMsAjaxLoaded()&&(n._msAjaxDebug=Sys.Debug),n._msAjaxDebug},set:function(n){this._msAjaxDebug=n},enumerable:n,configurable:n}),t}();n.MicrosoftAjaxFactory=t})(OfficeExt||(OfficeExt={}));OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory;OSF=OSF||{},function(n){var t=function(){function n(n){this._internalStorage=n}return n.prototype.getItem=function(n){try{return this._internalStorage&&this._internalStorage.getItem(n)}catch(t){return null}},n.prototype.setItem=function(n,t){try{this._internalStorage&&this._internalStorage.setItem(n,t)}catch(i){}},n.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(n){}},n.prototype.removeItem=function(n){try{this._internalStorage&&this._internalStorage.removeItem(n)}catch(t){}},n.prototype.getKeysWithPrefix=function(n){var r=[],u,t,i;try{for(u=this._internalStorage&&this._internalStorage.length||0,t=0;t0?i.push(t):t.tabIndex===0&&r.push(t):r.push(t);return i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;return r===0&&(r=i.indexOf(n)-i.indexOf(t)),r}),[].concat(i,r)}var f="focus",e="on",b="configurable",k="writable",o="enumerable",s="undefined",i=!0,t=!1,c=2147483647,n=null,r=-1,l=r,d="&_xdm_Info=",g="&_serializer_version=",nt="_xdm_",ut="_serializer_version=",a="#",tt="&",h="class",v={},ft=3e4,y=n,p=n,u=(new Date).getTime();return{set_entropy:function(n){var t,r,i;if(typeof n=="string")for(t=0;t1?l[l.length-1]:n,s,h,c,a;return u&&o!=n&&(o.indexOf(tt)>=0&&(o=o.split(tt)[0]),o=decodeURIComponent(o)),s=w(),!f&&s&&(h=window.name.indexOf(i),h>r&&(c=window.name.indexOf(";",h),c==r&&(c=window.name.length),a=window.name.substring(h,c),o?s.setItem(a,o):o=s.getItem(a))),o},getConversationId:function(){var i=window.location.search,t=n,r;return i&&(r=i.indexOf("&"),t=r>0?i.substring(1,r):i.substr(1),t&&t.charAt(t.length-1)==="="&&(t=t.substring(0,t.length-1),t&&(t=decodeURIComponent(t)))),t},getInfoItems:function(n){var t=n.split("$");return typeof t[1]==s&&(t=n.split("|")),typeof t[1]==s&&(t=n.split("%7C")),t},getXdmFieldValue:function(n,t){var r="",u=OSF.OUtil.parseXdmInfo(t),i;if(u&&(i=OSF.OUtil.getInfoItems(u),i!=undefined&&i.length>=3))switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]),f;if(u)throw u;for(f in r)if(u=Function._validateParameter(n[f],r[f],f),u)throw u;},writeProfilerMark:function(n){window.msWriteProfilerMark&&(window.msWriteProfilerMark(n),OsfMsAjaxFactory.msAjaxDebug.trace(n))},outputDebug:function(n){typeof OsfMsAjaxFactory!==s&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){var e,f;r=r||{};for(e in u)f=u[e],r[f]==undefined&&(r[f]=i);return Object.defineProperty(n,t,r),n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[o])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[o])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[k,o,b])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[k,o,b])},finalizeProperties:function(n,r){var e,u;r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8,f=e&255,i[t++]=r>>2,i[t++]=(r&3)<<4|u>>4,i[t++]=(u&15)<<2|f>>6,i[t++]=f&63,isNaN(e)||(r=e>>8,u=s&255,f=s>>8,i[t++]=r>>2,i[t++]=(r&3)<<4|u>>4,i[t++]=(u&15)<<2|f>>6,i[t++]=f&63),isNaN(e)?i[t-1]=64:isNaN(s)&&(i[t-2]=64,i[t-1]=64),h=0;h0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){var u,i,f,r;if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(u=[],i=0;in)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=rt(u),o=e?u.length-1:0,u.length===0)return n;while(!h&&o>=0&&on)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=rt(u),l=y(u,e),s=v(u.length,l,o),s<0)return n;while(!c&&s>=0&&s0;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[r%16],r=Math.floor(r/16);for(;t<32;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[Math.floor(Math.random()*16)];return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];return i?(i.name||(i.name=n[this.errorCodes.ooeInternalError].name),i.message||(i.message=n[this.errorCodes.ooeInternalError].message)):i=n[this.errorCodes.ooeInternalError],i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage}}}}(),function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}(),r,i,h,u,c,l,f,a,e,v,y,p,w,b,o,k,d,g,s,nt,tt,it,rt;n.RequirementVersion=ut;r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){var f,u,e,i,r;if(n==undefined)return!1;if(t==undefined&&(t=0),f=this._setMap,u=f._sets,u.hasOwnProperty(n.toLowerCase())){e=u[n.toLowerCase()];try{if((i=this._getVersion(e),t=t+"",r=this._getVersion(t),i.major>0&&i.major>r.major)||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),i=0,r=0;if(t.length<2&&isNaN(Number(n)))throw u;else if(i=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(i)||isNaN(r))throw u;return{minor:r,major:i}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;h=function(n){function i(){n.call(this,{dialogapi:t})}return __extends(i,n),i}(i);n.DefaultDialogSetRequirement=h;u=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelClientDefaultSetRequirement=u;c=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(u);n.ExcelClientV1DefaultSetRequirement=c;l=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookClientDefaultSetRequirement=l;f=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return __extends(i,n),i}(i);n.WordClientDefaultSetRequirement=f;a=function(n){function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return __extends(i,n),i}(f);n.WordClientV1DefaultSetRequirement=a;e=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointClientDefaultSetRequirement=e;v=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(e);n.PowerpointClientV1DefaultSetRequirement=v;y=function(n){function i(){n.call(this,{selection:t,textcoercion:t})}return __extends(i,n),i}(i);n.ProjectClientDefaultSetRequirement=y;p=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return __extends(i,n),i}(i);n.ExcelWebDefaultSetRequirement=p;w=function(n){function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordWebDefaultSetRequirement=w;b=function(n){function i(){n.call(this,{activeview:t,settings:t})}return __extends(i,n),i}(i);n.PowerpointWebDefaultSetRequirement=b;o=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookWebDefaultSetRequirement=o;k=function(n){function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.SwayWebDefaultSetRequirement=k;d=function(n){function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return __extends(i,n),i}(i);n.AccessWebDefaultSetRequirement=d;g=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelIOSDefaultSetRequirement=g;s=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordIOSDefaultSetRequirement=s;nt=function(n){function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return __extends(t,n),t}(s);n.WordIOSV1DefaultSetRequirement=nt;tt=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointIOSDefaultSetRequirement=tt;it=function(n){function i(){n.call(this,{mailbox:t})}return __extends(i,n),i}(i);n.OutlookIOSDefaultSetRequirement=it;rt=function(){function n(){}var t="undefined";return n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},n.getDefaultRequirementMatrix=function(u){var f,e,s,o;return this.initializeDefaultSetMatrix(),f=undefined,e=u.get_requirementMatrix(),e!=undefined&&e.length>0&&typeof JSON!==t?(s=JSON.parse(u.get_requirementMatrix().toLowerCase()),f=new r(new i(s))):(o=n.getClientFullVersionString(u),f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[o]!=undefined?new r(n.DefaultSetArrayMatrix[o]):new r(new i({}))),f},n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix(),e;return f!=undefined&&f.length>0&&typeof JSON!==t?(e=JSON.parse(n.get_requirementMatrix().toLowerCase()),u=new r(new i(e))):u=new r(new h),u},n.getClientFullVersionString=function(n){var i=n.get_appMinorVersion(),u="",r="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;return f&&n.get_appVersion()==1?r=t==4096&&i>=15?"16.00.01":"16.00":n.get_appName()==64?r=n.get_appVersion():(u=i<10?"0"+i:""+i,r=n.get_appVersion()+"."+u),n.get_appName()+"-"+r},n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new c;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new v;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new l;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new w;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new b;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new g;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new k;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new nt;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new tt;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new it},n.Excel_RCLIENT_1600="1-16.00",n.Excel_RCLIENT_1601="1-16.01",n.Word_RCLIENT_1600="2-16.00",n.Word_RCLIENT_1601="2-16.01",n.PowerPoint_RCLIENT_1600="4-16.00",n.PowerPoint_RCLIENT_1601="4-16.01",n.Outlook_RCLIENT_1600="8-16.00",n.Excel_WAC_1600="16-16.00",n.Word_WAC_1600="32-16.00",n.Outlook_WAC_1600="64-16.00",n.Outlook_WAC_1601="64-16.01",n.Project_RCLIENT_1600="128-16.00",n.Access_WAC_1600="256-16.00",n.PowerPoint_WAC_1600="512-16.00",n.Excel_IOS_1600="1024-16.00",n.SWAY_WAC_1600="2048-16.00",n.Word_IOS_1600="4096-16.00",n.Word_IOS_16001="4096-16.00.01",n.PowerPoint_IOS_1600="8192-16.00",n.Outlook_IOS_1600="65536-16.00",n.DefaultSetArrayMatrix={},n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))}(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}return n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n},n.getInstance=function(){return n.hostObj===undefined&&(n.hostObj=new n),n.hostObj},n.prototype.getPlatform=function(){var n=this,t;return n.hostInfo.hostPlatform&&(t=n.hostInfo.hostPlatform.toLowerCase(),n.platformRemappings[t])?n.platformRemappings[t]:null},n.prototype.getHost=function(){var n=this,t;if(n.hostInfo.hostType){if(t=n.hostInfo.hostType.toLowerCase(),n.camelCaseMappings[t])return n.camelCaseMappings[t];if(t=n.capitalizeFirstLetter(n.hostInfo.hostType),Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null},n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null},n}();n.Host=t})(t=n.HostName||(n.HostName={}))}(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){n||(window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,n=!0)},disableShortcut:function(){n&&(t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window),n=!1)}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i,r,o,u,f,e;if(n&&typeof n=="string"&&(r=n.indexOf("#"),r!=-1)){o=n.substring(0,r);u=n.substring(r+1);switch(o){case"binding":case"bindings":u&&(i=new OSF.DDA.BindingPromise(u))}}if(i)return i.onFail=t,i;else if(t)if(f=typeof t,f=="function")e={},e[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(e,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext));else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f);};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this,s,e;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.auth&&OSF.OUtil.defineEnumerableProperty(f,"auth",{value:n.auth});n.get_isDialog()?(e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e})):(t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t}),r&&(s=r.displayName||"appOM",delete r.displayName,OSF.OUtil.defineEnumerableProperty(f,s,{value:r})),u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}}),e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e}))};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this,u;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;return OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext()),n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,e=n.length,o=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){var u,i,r;for(u in n){if(i=n[u],r=t[u],i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw o();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw o();}};f.extractRequiredArguments=function(t,i,r){var f,u,h,s,c,l;if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(c=n.length-1;c>=s;c--){l=n[c];switch(typeof l){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=l;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}if(f=o.fillOptions(f,i,r,u),e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;return o.verifyArguments(t,f),f}var h="function",s=n.length,o=new OSF.DDA.ApiMethodCall(n,t,i,f,e);this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),u=c(n,r,t,i);return o.constructCallArgs(r,u,t,i)};this.processResponse=function(n,t,i,f){return n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n)};this.getCallArgs=function(n){for(var t,u,r,i=n.length-1;i>=s;i--){r=n[i];switch(typeof r){case"object":t=r;break;case h:u=r}}return t=t||{},u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u),t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],i=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],t,i,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback],u,r;f&&(u={},u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?u[OSF.DDA.AsyncResultEnum.Properties.Value]=i:(r={},i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i),f(new OSF.DDA.AsyncResult(u,r)))};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.SyncMethodNames[t]=i};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){function o(n,i,r,u){var o,c,s,h;if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(s=n.length-1;s>=e;s--){h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}return o=f.fillOptions(o,i,r,u),f.verifyArguments(t,o),o}var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),u=o(n,r,t,i);return f.constructCallArgs(r,u,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){function e(i,f){var a=i?{}:undefined,s,h,o,v,c,l;for(s in i){if(h=i[s],OSF.DDA.ListType.isListType(s)){o=[];for(v in h)o.push(e(h[v],f))}else OSF.OUtil.listContainsKey(r,s)?o=r[s][f](h):f==u&&n.preserveNesting(s)?o=e(h,f):(c=t[s],c?(l=c[f],l&&(o=l[h],o===undefined&&(o=h))):o=h);a[s]=o}return a}function l(i,r){var e,u,h,s;for(u in r)h=n.isComplexType(u)?l(i,t[u][o]):i[u],h!=undefined&&(e||(e={}),s=r[u],s==f&&(s=u),e[s]=n.pack(u,h));return e}function s(i,r,e){var o,a,h,l,p,v,y;e||(e={});for(o in r){if(a=r[o],a==f)h=i;else if(a==c){e[o]=i.toArray();continue}else h=i[a];if(h===null||h===undefined)e[o]=undefined;else if(h=n.unpack(o,h),n.isComplexType(o))l=t[o][u],n.preserveNesting(o)?e[o]=s(h,l):s(h,l,e);else if(OSF.DDA.ListType.isListType(o)){l={};p=OSF.DDA.ListType.getDescriptor(o);l[p]=f;v=new Array(h.length);for(y in h)v[y]=s(h[y],l);e[o]=v}else e[o]=h}return e}function a(n,i,r){var f=t[n][r],u,o,c;return r=="toHost"?(o=e(i,r),u=l(o,f)):r==h&&(c=s(i,f),u=e(c,r)),u}var h="fromHost",i=this,o="toHost",u=h,c="sourceData",f="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];t||(t={});i.addMapping=function(n,i){var e,h,c,l,r,s,a,v;if(i.map){e=i.map;h={};for(c in e)l=e[c],l==f&&(l=c),h[l]=c}else e=i.toHost,h=i.fromHost;if(r=t[n],r){s=r[o];for(a in s)e[a]=s[a];s=r[u];for(v in s)h[v]=s[v]}else r=t[n]={};r[o]=e;r[u]=h};i.toHost=function(n,t){return a(n,t,o)};i.fromHost=function(n,t){return a(n,t,u)};i.self=f;i.sourceData=c;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){return this.isDynamicType(n)?t[n].toHost(i):i};i.unpack=function(n,i){return this.isDynamicType(n)?t[n].fromHost(i):i}};OSF.DDA.getDecoratedParameterMap=function(n,t){function r(n){var i=null,r,t;if(n)for(i={},r=n.length,t=0;t0){for(r=[],i=0;i=s)break;if(f=Function._validateParameter(n[e],o,h),f)return f.popStackFrame(),f}return t}),Function._validateParameterCount||(Function._validateParameterCount=function(n,r,u){var f,s,e=r.length,h=n.length,c,l,a;if(he)for(s=i,f=0;f0&&t.push(u)}}catch(s){}return t}var i=[],t={};t[Microsoft.Office.WebExtension.Parameters.Data]=function(){var t=0,i=1;return{toHost:function(n){if(OSF.DDA.TableDataProperties&&typeof n!="string"&&n[OSF.DDA.TableDataProperties.TableRows]!==undefined){var r=[];r[t]=n[OSF.DDA.TableDataProperties.TableRows];r[i]=n[OSF.DDA.TableDataProperties.TableHeaders];n=r}return n},fromHost:function(r){var f,e,u;return r.toArray?(e=r.dimensions(),e===2?f=n(r):(u=r.toArray(),u.length===2&&(u[0]!=null&&u[0].toArray||u[1]!=null&&u[1].toArray)?(f={},f[OSF.DDA.TableDataProperties.TableRows]=n(u[t]),f[OSF.DDA.TableDataProperties.TableHeaders]=n(u[i])):f=u)):f=r,f}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,i,t);this.unpack=function(n,i){var r,u;return this.isComplexType(n)||OSF.DDA.ListType.isListType(n)?(u=(i||typeof i=="unknown")&&i.toArray,r=u?i.toArray():i||{}):r=this.isDynamicType(n)?t[n].fromHost(i):i,r}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(n){function t(n){var i=n,f,r,u;if(OSF.OUtil.isArray(n))for(f=i.length,r=0;r2)for(u=[],o=1;o40)&&(n=OSF.OUtil.Guid.generateNewGuid(),t.setValue(t.clientIDKey,n)),n},n.prototype.saveLog=function(n,t){var i=this,u=i.getValue(i.logIdSetKey);u=(u&&u.length>0?u+";":r)+n;i.setValue(i.logIdSetKey,u);i.setValue(n,t)},n.prototype.enumerateLog=function(n,t){var i=this,e=i.getValue(i.logIdSetKey),u,o,r,f;if(e){u=e.split(";");for(o in u)r=u[o],f=i.getValue(r),f&&(n&&n(r,f),t&&i.remove(r));t&&i.remove(i.logIdSetKey)}},n.prototype.getValue=function(n){var t=OSF.OUtil.getLocalStorage(),i=r;return t&&(i=t.getItem(n)),i},n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)},n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}},n}(),o=function(){function n(){}return n.prototype.LogData=function(n){OSF.Logger&&(OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n.SerializeRow(),OSF.Logger.SendFlag.none),OSFAriaLogger.AriaLogger.getInstance().logData(n))},n.prototype.LogRawData=function(n){if(OSF.Logger){OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n,OSF.Logger.SendFlag.none);try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(n))}catch(t){}}},n}();n.initialize=v;n.onAppActivated=y;n.onScriptDone=p;n.onCallDone=w;n.onMethodDone=b;n.onPropertyDone=k;n.onEventDone=d;n.onRegisterDone=g;n.onAppClosed=nt;n.setOsfControlAppCorrelationId=tt;n.doAppInitializationLogging=c;n.logAppCommonMessage=it;n.logAppException=rt;OSF.AppTelemetry=n}(OSFAppTelemetry||(OSFAppTelemetry={}));Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(n){var i=this,r,t,u;i._eventHandlers={};i._objectEventHandlers={};i._queuedEventsArgs={};for(r in n)t=n[r],u=t=="objectDeleted"||t=="objectSelectionChanged"||t=="objectDataChanged"||t=="contentControlAdded",u?i._objectEventHandlers[t]={}:i._eventHandlers[t]=[],i._queuedEventsArgs[t]=[]};OSF.EventDispatch.prototype={getSupportedEvents:function(){var n=[];for(var t in this._eventHandlers)n.push(t);for(t in this._objectEventHandlers)n.push(t);return n},supportsEvent:function(n){for(var t in this._eventHandlers)if(n==t)return!0;for(t in this._objectEventHandlers)if(n==t)return!0;return!1},hasEventHandler:function(n,t){var i=this._eventHandlers[n],r;if(i&&i.length>0)for(r in i)if(i[r]===t)return!0;return!1},hasObjectEventHandler:function(n,t,i){var f=this._objectEventHandlers[n],r,u;if(f!=null)for(r=f[t],u=0;r!=null&&u0)for(r=0;r0?(this._eventHandlers[n]=[],!0):!1},clearObjectEventHandlers:function(n,t){return this._objectEventHandlers[n]!=null&&this._objectEventHandlers[n][t]!=null?(this._objectEventHandlers[n][t]=[],!0):!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},getObjectEventHandlerCount:function(n,t){return this._objectEventHandlers[n]==null||this._objectEventHandlers[n][t]==null?0:this._objectEventHandlers[n][t].length},fireEvent:function(n){var t,i,r;if(n.type==undefined)return!1;if(t=n.type,t&&this._eventHandlers[t]){i=this._eventHandlers[t];for(r in i)i[r](n);return!0}else return!1},fireObjectEvent:function(n,t){var i,f,r,u;if(t.type==undefined)return!1;if(i=t.type,i&&this._objectEventHandlers[i]&&(f=this._objectEventHandlers[i],r=f[n],r!=null)){for(u=0;u0)){for(r=t[0];i.length>0;)u=i.shift(),r(u);return!0}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var f="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(n,i[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]=="outlook"||OSF._OfficeAppFactory.getHostInfo()[f]=="outlookwebapp")r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i),t.initialize(r.initialData),t.setCurrentItemNumber(r.itemNumber.itemNumber);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var i=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),t=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];t(arguments,i,n)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(n){var i=OSF.DDA.SyncMethodNames.MessageParent.displayName,t=this,r;t[i]||OSF.OUtil.defineEnumerableProperty(t,i,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return n(arguments,t)}});r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;t[r]||typeof OSF.DialogParentMessageEventDispatch=="undefined"||OSF.DDA.DispIdHost.addEventSupport(t,OSF.DialogParentMessageEventDispatch,n);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(n){n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:n[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}}],privateStateCallbacks:[],onSucceeded:function(n){var f=n[Microsoft.Office.WebExtension.Parameters.Id],i=n[Microsoft.Office.WebExtension.Parameters.Data],t=new OSF.DialogHandler,e=OSF.DDA.AsyncMethodNames.CloseAsync.displayName,r,u;return OSF.OUtil.defineEnumerableProperty(t,e,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];n(arguments,f,i,t)}}),r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName,OSF.OUtil.defineEnumerableProperty(t,r,{value:function(){var r=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],n=r.verifyAndExtractCall(arguments,t,i),u=n[Microsoft.Office.WebExtension.Parameters.EventType],f=n[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(u,f)}}),u=OSF.DDA.SyncMethodNames.SendMessage.displayName,OSF.OUtil.defineEnumerableProperty(t,u,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return n(arguments,i,t)}}),t},checkCallArgs:function(n){return n[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Width]=1),n[Microsoft.Office.WebExtension.Parameters.Width]>100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99),n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1),n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99),n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(n){try{n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,n);OSF.ClientHostController.openDialog(n.dispId,n.targetId,function(t,i){n.onEvent&&n.onEvent(i);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(n){n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,n);try{OSF.ClientHostController.closeDialog(n.dispId,n.targetId,t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.messageParent=function(n){try{n.onCalling&&n.onCalling();var i=(new Date).getTime(),t=OSF.ClientHostController.messageParent(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs((new Date).getTime()-i),t),t}catch(r){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(r)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.sendMessage=function(n){try{n.onCalling&&n.onCalling();var r=(new Date).getTime(),t=OSF.ClientHostController.sendMessage(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),t}catch(i){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(i)}};Microsoft.Office.WebExtension.TableData=function(n,t){function i(n){if(n==null||n==undefined)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(n,2);t<2;t++)n=[n];return n}catch(i){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(n){t=i(n)}},rows:{get:function(){return n},set:function(t){n=t==null||OSF.OUtil.isArray(t)&&t.length==0?[]:i(t)}}});this.headers=t;this.rows=n};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(n){return new Microsoft.Office.WebExtension.TableData(n[OSF.DDA.TableDataProperties.TableRows],n[OSF.DDA.TableDataProperties.TableHeaders])};Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var n=null;return{findArrayDimensionality:function(n){if(OSF.OUtil.isArray(n)){for(var t=0,i=0;i6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix&&(i=new Date(parseInt(t.slice(5,-1))),i)?i:t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,!0);r[i]=t}catch(u){}}return r}};OSF.DDA.Settings=function(n){var t="name",i;n=n||{};i=function(n){var i=OSF.OUtil.getSessionStorage(),t,r;i&&(t=OSF.DDA.SettingsManager.serializeSettings(n),r=JSON?JSON.stringify(t):Sys.Serialization.JavaScriptSerializer.serialize(t),i.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),r))};OSF.OUtil.defineEnumerableProperties(this,{get:{value:function(i){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]),r;if(u)throw u;return r=n[i],typeof r=="undefined"?null:r}},set:{value:function(r,u){var f=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1},{name:"value",mayBeNull:!0}]);if(f)throw f;n[r]=u;i(n)}},remove:{value:function(r){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]);if(u)throw u;delete n[r];i(n)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],n)};OSF.DDA.RefreshableSettings=function(n){OSF.DDA.RefreshableSettings.uber.constructor.call(this,n);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],n);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:n}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(n,t){return t}}],onSucceeded:function(n,t,i){var f=n[OSF.DDA.SettingsManager.SerializedSettings],u=OSF.DDA.SettingsManager.deserializeSettings(f),e=i[OSF.DDA.SettingsManager.RefreshingSettings];for(var r in e)t.remove(r);for(r in u)t.set(r,u[r]);return t}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(n,t){return OSF.DDA.SettingsManager.serializeSettings(t)}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});Microsoft.Office.WebExtension.BindingType={Table:"table",Text:"text",Matrix:"matrix"};OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType};OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{BindingList:"BindingList"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{Subset:"subset",BindingProperties:"BindingProperties"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList,OSF.DDA.PropertyDescriptors.BindingProperties);OSF.DDA.BindingPromise=function(n,t){this._id=n;OSF.OUtil.defineEnumerableProperty(this,"onFail",{get:function(){return t},set:function(n){var i=typeof n;if(i!="undefined"&&i!="function")throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,i);t=n}})};OSF.DDA.BindingPromise.prototype={_fetch:function(n){var t=this,i;return t.binding?n&&n(t.binding):t._binding||(i=t,Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(t._id,function(t){t.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded?(OSF.OUtil.defineEnumerableProperty(i,"binding",{value:t.value}),n&&n(i.binding)):i.onFail&&i.onFail(t)})),t},getDataAsync:function(){var n=arguments;return this._fetch(function(t){t.getDataAsync.apply(t,n)}),this},setDataAsync:function(){var n=arguments;return this._fetch(function(t){t.setDataAsync.apply(t,n)}),this},addHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.addHandlerAsync.apply(t,n)}),this},removeHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.removeHandlerAsync.apply(t,n)}),this}};OSF.DDA.BindingFacade=function(n){this._eventDispatches=[];OSF.OUtil.defineEnumerableProperty(this,"document",{value:n});var t=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[t.AddFromSelectionAsync,t.AddFromNamedItemAsync,t.GetAllAsync,t.GetByIdAsync,t.ReleaseByIdAsync])};OSF.DDA.UnknownBinding=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}})};OSF.DDA.Binding=function(n,t){var r,u,i,f;OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}});r=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[r.GetDataAsync,r.SetDataAsync]);u=Microsoft.Office.WebExtension.EventType;i=t.bindings._eventDispatches;i[n]||(i[n]=new OSF.EventDispatch([u.BindingSelectionChanged,u.BindingDataChanged]));f=i[n];OSF.DDA.DispIdHost.addEventSupport(this,f)};OSF.DDA.generateBindingId=function(){return"UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+(new Date).getTime()};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureBinding=function(n,t){var r=n[OSF.DDA.BindingProperties.Id],u=n[OSF.DDA.BindingProperties.RowCount],f=n[OSF.DDA.BindingProperties.ColumnCount],s=n[OSF.DDA.BindingProperties.HasHeaders],i,e,o;switch(n[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:i=new OSF.DDA.TextBinding(r,t);break;case Microsoft.Office.WebExtension.BindingType.Matrix:i=new OSF.DDA.MatrixBinding(r,t,u,f);break;case Microsoft.Office.WebExtension.BindingType.Table:e=function(){return OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument};o=e()&&OSF.DDA.ExcelTableBinding?OSF.DDA.ExcelTableBinding:OSF.DDA.TableBinding;i=new o(r,t,u,f,s);break;default:i=new OSF.DDA.UnknownBinding(r,t)}return i};OSF.DDA.AsyncMethodNames.addNames({AddFromSelectionAsync:"addFromSelectionAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:"getByIdAsync",ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync"}),function(){function u(n){return OSF.DDA.OMFactory.manufactureBinding(n,Microsoft.Office.WebExtension.context.document)}function f(n){return n.id}function e(n,t,i){var u=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&u&&(u[OSF.DDA.TableDataProperties.TableRows]!=undefined||u[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(u=OSF.DDA.OMFactory.manufactureTableData(u)),u=OSF.DDA.DataCoercion.coerceData(u,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),u==undefined?r:u}var t="number",i="object",n="string",r=null;OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:[n]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return!0}}],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.BindingList],u)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n,t,i){var r=i[Microsoft.Office.WebExtension.Parameters.Id];delete t._eventDispatches[r]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n,t){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&n[Microsoft.Office.WebExtension.Parameters.RowCount]==0&&n[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn],delete n[Microsoft.Office.WebExtension.Parameters.RowCount],delete n[Microsoft.Office.WebExtension.Parameters.ColumnCount]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]||n[Microsoft.Office.WebExtension.Parameters.RowCount]||n[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[n,i,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}]})}();OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.MatrixBinding=function(n,t,i,r){OSF.DDA.MatrixBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Matrix},rowCount:{value:i?i:0},columnCount:{value:r?r:0}})};OSF.OUtil.extend(OSF.DDA.MatrixBinding,OSF.DDA.Binding);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.BindingProperties,fromHost:[{name:OSF.DDA.BindingProperties.Id,value:0},{name:OSF.DDA.BindingProperties.Type,value:1},{name:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,value:2}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.BindingType,toHost:[{name:Microsoft.Office.WebExtension.BindingType.Text,value:0},{name:Microsoft.Office.WebExtension.BindingType.Matrix,value:1},{name:Microsoft.Office.WebExtension.BindingType.Table,value:2}],invertible:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,value:0},{name:Microsoft.Office.WebExtension.Parameters.Id,value:1},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:2},{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseBindingMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAllBindingsMethod,fromHost:[{name:OSF.DDA.ListDescriptors.BindingList,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:2},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:3},{name:OSF.DDA.PropertyDescriptors.Subset,value:4}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.Data,value:2},{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,fromHost:[{name:OSF.DDA.BindingProperties.RowCount,value:0},{name:OSF.DDA.BindingProperties.ColumnCount,value:1},{name:OSF.DDA.BindingProperties.HasHeaders,value:2}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.Subset,toHost:[{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:0},{name:OSF.DDA.SafeArray.UniqueArguments.Run,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Offset,toHost:[{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:0},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Run,toHost:[{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:0},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddColumnsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearAllRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{TableDataProperties:"TableDataProperties"});OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};OSF.DDA.TableBinding=function(n,t,i,r,u){OSF.DDA.TableBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:i?i:0},columnCount:{value:r?r:0},hasHeaders:{value:u?u:!1}});var f=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[f.AddRowsAsync,f.AddColumnsAsync,f.DeleteAllDataValuesAsync])};OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync"}),function(){function n(n){return n.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]})}();OSF.DDA.TextBinding=function(n,t){OSF.DDA.TextBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperty(this,"type",{value:Microsoft.Office.WebExtension.BindingType.Text})};OSF.OUtil.extend(OSF.DDA.TextBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddFromPromptAsync:"addFromPromptAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromPromptAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:["string"],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.PromptText,value:{types:["string"],calculate:function(){return Strings.OfficeOM.L_AddBindingFromPromptDefaultText}}},{name:Microsoft.Office.WebExtension.Parameters.SampleData,value:{types:["object"],defaultValue:null}}],privateStateCallbacks:[],onSucceeded:function(n){return OSF.DDA.OMFactory.manufactureBinding(n,Microsoft.Office.WebExtension.context.document)}});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromPromptMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:1},{name:Microsoft.Office.WebExtension.Parameters.PromptText,value:2}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"});OSF.DDA.DocumentSelectionChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:n}})};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDeleted:"objectDeleted"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectSelectionChanged:"objectSelectionChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDataChanged:"objectDataChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ContentControlAdded:"contentControlAdded"});OSF.DDA.ObjectEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:n},object:{value:t}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDeletedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDataChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidContentControlAddedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{BindingSelectionChanged:"bindingSelectionChanged",BindingDataChanged:"bindingDataChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{BindingSelectionChangedEvent:"BindingSelectionChangedEvent"});OSF.DDA.BindingSelectionChangedEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingSelectionChanged},binding:{value:n}});for(var i in t)OSF.OUtil.defineEnumerableProperty(this,i,{value:t[i]})};OSF.DDA.BindingDataChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingDataChanged},binding:{value:n}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:0},{name:OSF.DDA.PropertyDescriptors.Subset,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingDataChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FilterType,{OnlyVisible:"onlyVisible"});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.OnlyVisible,value:1}]});Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"};Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"};Microsoft.Office.WebExtension.Index={First:"first",Last:"last",Next:"next",Previous:"previous"};OSF.DDA.AsyncMethodNames.addNames({GoToByIdAsync:"goToByIdAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GoToByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string","number"]},{name:Microsoft.Office.WebExtension.Parameters.GoToType,"enum":Microsoft.Office.WebExtension.GoToType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:{"enum":Microsoft.Office.WebExtension.SelectionMode,defaultValue:Microsoft.Office.WebExtension.SelectionMode.Default}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:0},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:1},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:2},{name:Microsoft.Office.WebExtension.GoToType.Index,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:0},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:1},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:1},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:2}]});OSF.DDA.AsyncMethodNames.addNames({ExecuteRichApiRequestAsync:"executeRichApiRequestAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[]});OSF.OUtil.setNamespace("RichApi",OSF.DDA);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidExecuteRichApiRequestMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(n){OSF.OUtil.defineEnumerableProperties(this,{url:{value:n[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(n){return new Microsoft.Office.WebExtension.FileProperties(n)}});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,fromHost:[{name:OSF.DDA.FilePropertiesDescriptor.Url,value:0}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.ExcelTableBinding=function(n,t,i,r,u){var f=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[f.ClearFormatsAsync,f.SetTableOptionsAsync,f.SetFormatsAsync]);OSF.DDA.ExcelTableBinding.uber.constructor.call(this,n,t,i,r,u);OSF.OUtil.finalizeProperties(this)};OSF.OUtil.extend(OSF.DDA.ExcelTableBinding,OSF.DDA.TableBinding),function(){var t="number",n="object",i="string";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[i,n,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:[n],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:[n],defaultValue:[]}}],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[i,n,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[n,i],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[n],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:[n],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:[n],defaultValue:[]}}],checkCallArgs:function(n,t){var i=Microsoft.Office.WebExtension.Parameters;if(n[i.StartRow]==0&&n[i.StartColumn]==0&&OSF.OUtil.isArray(n[i.CellFormat])&&n[i.CellFormat].length===0&&OSF.OUtil.isArray(n[i.TableOptions])&&n[i.TableOptions].length===0&&(delete n[i.StartRow],delete n[i.StartColumn],delete n[i.CellFormat],delete n[i.TableOptions]),n[i.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[i.StartRow]&&n[i.StartRow]!=0||n[i.StartColumn]&&n[i.StartColumn]!=0||n[i.CellFormat]||n[i.TableOptions]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:function(n){return n.id}}]});OSF.DDA.BindingPromise.prototype.setTableOptionsAsync=function(){var n=arguments;return this._fetch(function(t){t.setTableOptionsAsync.apply(t,n)}),this};OSF.DDA.BindingPromise.prototype.setFormatsAsync=function(){var n=arguments;return this._fetch(function(t){t.setFormatsAsync.apply(t,n)}),this};OSF.DDA.BindingPromise.prototype.clearFormatsAsync=function(){var n=arguments;return this._fetch(function(t){t.clearFormatsAsync.apply(t,n)}),this}}(),function(){function n(n){return n.id}OSF.DDA.AsyncMethodNames.addNames({ClearFormatsAsync:"clearFormatsAsync",SetTableOptionsAsync:"setTableOptionsAsync",SetFormatsAsync:"setFormatsAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ClearFormatsAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetTableOptionsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TableOptions,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetFormatsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CellFormat,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]})}();Microsoft.Office.WebExtension.Table={All:0,Data:1,Headers:2},function(){var u="undefined",e="auto fit",o="distributed",f="none";OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearFormatsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetTableOptionsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetFormatsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:2},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.Data,value:2},{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:3},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:4},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:5}]});var s={headerRow:0,bandedRows:1,firstColumn:2,lastColumn:3,bandedColumns:4,filterButton:5,style:6,totalRow:7},h={row:0,column:1},t={alignHorizontal:{text:"alignHorizontal",type:1},alignVertical:{text:"alignVertical",type:2},backgroundColor:{text:"backgroundColor",type:101},borderStyle:{text:"borderStyle",type:201},borderColor:{text:"borderColor",type:202},borderTopStyle:{text:"borderTopStyle",type:203},borderTopColor:{text:"borderTopColor",type:204},borderBottomStyle:{text:"borderBottomStyle",type:205},borderBottomColor:{text:"borderBottomColor",type:206},borderLeftStyle:{text:"borderLeftStyle",type:207},borderLeftColor:{text:"borderLeftColor",type:208},borderRightStyle:{text:"borderRightStyle",type:209},borderRightColor:{text:"borderRightColor",type:210},borderOutlineStyle:{text:"borderOutlineStyle",type:211},borderOutlineColor:{text:"borderOutlineColor",type:212},borderInlineStyle:{text:"borderInlineStyle",type:213},borderInlineColor:{text:"borderInlineColor",type:214},fontFamily:{text:"fontFamily",type:301},fontStyle:{text:"fontStyle",type:302},fontSize:{text:"fontSize",type:303},fontUnderlineStyle:{text:"fontUnderlineStyle",type:304},fontColor:{text:"fontColor",type:305},fontDirection:{text:"fontDirection",type:306},fontStrikethrough:{text:"fontStrikethrough",type:307},fontSuperscript:{text:"fontSuperscript",type:308},fontSubscript:{text:"fontSubscript",type:309},fontNormal:{text:"fontNormal",type:310},indentLeft:{text:"indentLeft",type:401},indentRight:{text:"indentRight",type:402},numberFormat:{text:"numberFormat",type:501},width:{text:"width",type:701},height:{text:"height",type:702},wrapping:{text:"wrapping",type:703}},r=[{name:f,value:0},{name:"thin",value:1},{name:"medium",value:2},{name:"dashed",value:3},{name:"dotted",value:4},{name:"thick",value:5},{name:"double",value:6},{name:"hair",value:7},{name:"medium dashed",value:8},{name:"dash dot",value:9},{name:"medium dash dot",value:10},{name:"dash dot dot",value:11},{name:"medium dash dot dot",value:12},{name:"slant dash dot",value:13}],i=[{name:f,value:0},{name:"black",value:1},{name:"blue",value:2},{name:"gray",value:3},{name:"green",value:4},{name:"orange",value:5},{name:"pink",value:6},{name:"purple",value:7},{name:"red",value:8},{name:"teal",value:9},{name:"turquoise",value:10},{name:"violet",value:11},{name:"white",value:12},{name:"yellow",value:13},{name:"automatic",value:14}],n=OSF.DDA.SafeArray.Delegate.ParameterMap;n.define({type:t.alignHorizontal.text,toHost:[{name:"general",value:0},{name:"left",value:1},{name:"center",value:2},{name:"right",value:3},{name:"fill",value:4},{name:"justify",value:5},{name:"center across selection",value:6},{name:o,value:7}]});n.define({type:t.alignVertical.text,toHost:[{name:"top",value:0},{name:"center",value:1},{name:"bottom",value:2},{name:"justify",value:3},{name:o,value:4}]});n.define({type:t.backgroundColor.text,toHost:i});n.define({type:t.borderStyle.text,toHost:r});n.define({type:t.borderColor.text,toHost:i});n.define({type:t.borderTopStyle.text,toHost:r});n.define({type:t.borderTopColor.text,toHost:i});n.define({type:t.borderBottomStyle.text,toHost:r});n.define({type:t.borderBottomColor.text,toHost:i});n.define({type:t.borderLeftStyle.text,toHost:r});n.define({type:t.borderLeftColor.text,toHost:i});n.define({type:t.borderRightStyle.text,toHost:r});n.define({type:t.borderRightColor.text,toHost:i});n.define({type:t.borderOutlineStyle.text,toHost:r});n.define({type:t.borderOutlineColor.text,toHost:i});n.define({type:t.borderInlineStyle.text,toHost:r});n.define({type:t.borderInlineColor.text,toHost:i});n.define({type:t.fontStyle.text,toHost:[{name:"regular",value:0},{name:"italic",value:1},{name:"bold",value:2},{name:"bold italic",value:3}]});n.define({type:t.fontUnderlineStyle.text,toHost:[{name:f,value:0},{name:"single",value:1},{name:"double",value:2},{name:"single accounting",value:3},{name:"double accounting",value:4}]});n.define({type:t.fontColor.text,toHost:i});n.define({type:t.fontDirection.text,toHost:[{name:"context",value:0},{name:"left-to-right",value:1},{name:"right-to-left",value:2}]});n.define({type:t.width.text,toHost:[{name:e,value:-1}]});n.define({type:t.height.text,toHost:[{name:e,value:-1}]});n.define({type:Microsoft.Office.WebExtension.Parameters.TableOptions,toHost:[{name:"headerRow",value:0},{name:"bandedRows",value:1},{name:"firstColumn",value:2},{name:"lastColumn",value:3},{name:"bandedColumns",value:4},{name:"filterButton",value:5},{name:"style",value:6},{name:"totalRow",value:7}]});n.dynamicTypes[Microsoft.Office.WebExtension.Parameters.CellFormat]={toHost:function(t){for(var i in t)t[i].format&&(t[i].format=n.doMapValues(t[i].format,"toHost"));return t},fromHost:function(n){return n}};n.setDynamicType(Microsoft.Office.WebExtension.Parameters.CellFormat,{toHost:function(n){var c="cells",y="format",w=0,b=1,p=[],l,i,r,f,e,o,a,v,s;for(l in n){if(i=n[l],r=[],typeof i[c]!==u){if(f=i[c],typeof i[c]=="object"){e=[];for(o in f)typeof h[o]!==u&&(e[h[o]]=f[o])}else e=f;r[w]=e}if(i[y]){a=i[y];v=[];for(s in a)typeof t[s]!==u&&v.push([t[s].type,a[s]]);r[b]=v}p[l]=r}return p},fromHost:function(n){return n}});n.setDynamicType(Microsoft.Office.WebExtension.Parameters.TableOptions,{toHost:function(n){var i=[];for(var t in n)typeof s[t]!==u&&(i[s[t]]=n[t]);return i},fromHost:function(n){return n}})}(),function(n){var t;(function(t){var u=function(){function r(){var n=this,t=n;n._pseudoDocument=u;n._eventDispatch=u;n._processAppCommandInvocation=function(n){var i=t._verifyManifestCallback(n.callbackName),r;if(i.errorCode!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){t._invokeAppCommandCompletedMethod(n.appCommandId,i.errorCode,"");return}r=t._constructEventObjectForCallback(n);r?window.setTimeout(function(){i.callback(r)},0):t._invokeAppCommandCompletedMethod(n.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"")}}var f="object",e="string",u=null;return r.initializeOsfDda=function(){OSF.DDA.AsyncMethodNames.addNames({AppCommandInvocationCompletedAsync:"appCommandInvocationCompletedAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[e]},{name:Microsoft.Office.WebExtension.Parameters.Status,types:["number"]},{name:Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData,types:[e]}]});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{AppCommandInvokedEvent:"AppCommandInvokedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppCommandInvoked:"appCommandInvoked"});OSF.OUtil.setNamespace("AppCommand",OSF.DDA);OSF.DDA.AppCommand.AppCommandInvokedEventArgs=n.AppCommand.AppCommandInvokedEventArgs},r.prototype.initializeAndChangeOnce=function(n){var i=this,r;t.registerDdaFacade();i._pseudoDocument={};OSF.DDA.DispIdHost.addAsyncMethods(i._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync]);i._eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked]);r=function(t){n&&(t.status=="succeeded"?n(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):n(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError))};OSF.DDA.DispIdHost.addEventSupport(i._pseudoDocument,i._eventDispatch);i._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,i._processAppCommandInvocation,r)},r.prototype._verifyManifestCallback=function(n){var s="function",e={callback:u,errorCode:OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback},o;n=n.trim();try{for(var t=n.split("."),i=window,r=0;r0},enumerable:!0,configurable:!0}),t.prototype.addTrace=function(n,t){this.m_traceInfos[n]=t},t.prototype.addReferencedObjectPath=function(t){if(!this.m_referencedObjectPaths[t.objectPathInfo.Id]){if(!t.isValid)throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidObjectPath,message:n.Utility._getResourceString(n.ResourceStrings.invalidObjectPath,n.Utility.getObjectPathExpression(t)),debugInfo:{errorLocation:n.Utility.getObjectPathExpression(t)}});while(t)t.isWriteOperation&&(this.m_flags=this.m_flags|1),this.m_referencedObjectPaths[t.objectPathInfo.Id]=t,t.objectPathInfo.ObjectPathType==3&&this.addReferencedObjectPaths(t.argumentObjectPaths),t=t.parentObjectPath}},t.prototype.addReferencedObjectPaths=function(n){if(n)for(var t=0;t0&&(typeof r[0]=="string"||i.isRequestUrlAndHeaderInfo(r[0])||i.isRequestUrlAndHeaderInfoResolver(r[0]))&&(y=r[0],h=1),r.length==h+1)a=u,v=r[h+0];else if(r.length==h+2){if(r[h+0]instanceof n.ClientObject)a=function(){return r[h+0].context};else if(Array.isArray(r[h+0])){if(c=r[h+0],c.length==0)return i.createErrorPromise(t);for(l=0;l0){var n=c._onRunFinishedNotifiers.shift();n()}if(a)return l;else throw l;})},i.prototype._nextId=function(){return++this.m_nextId},i}();n.ClientRequestContext=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_type=n}return Object.defineProperty(t.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){(this.m_isLoaded=!0,typeof t=="object"&&t&&t._IsNull)||(this.m_value=this.m_type===1?n.Utility.adjustToDateTime(t):t)},t}();n.ClientResult=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.flags="flags",n.getItemAt="GetItemAt",n.id="Id",n.idPrivate="_Id",n.index="_Index",n.items="_Items",n.iterativeExecutor="IterativeExecutor",n.localDocument="http://document.localhost/",n.localDocumentApiPrefix="http://document.localhost/_api/",n.processQuery="ProcessQuery",n.referenceId="_ReferenceId",n.isTracked="_IsTracked",n.sourceLibHeader="SdkVersion",n.embeddingPageOrigin="EmbeddingPageOrigin",n.embeddingPageSessionInfo="EmbeddingPageSessionInfo",n}();n.Constants=t}(OfficeExtension||(OfficeExtension={})),function(n){var u=1,r={invokeRequestModifier:function(n){return n.DdaMethod.Version=u,n},invokeResponseModifier:function(n){return u=n.Version,n.Error&&(n.error={},n.error.Code=n.Error),n}},i,t,f,e;(function(n){n[n.Success=0]="Success";n[n.Timeout=1]="Timeout";n[n.InternalError=5001]="InternalError"})(i||(i={})),function(n){n.SendingId="sId";n.RespondingId="rId";n.CommandKey="command";n.SessionInfoKey="sessionInfo";n.ParamsKey="params";n.ApiReadyCommand="apiready";n.ExecuteMethodCommand="executeMethod";n.GetAppContextCommand="getAppContext";n.RegisterEventCommand="registerEvent";n.UnregisterEventCommand="unregisterEvent";n.FireEventCommand="fireEvent"}(t||(t={}));f=function(u){function f(n,t){u.call(this);this.m_chosenWindow=null;this.m_chosenOrigin=null;this.m_enabled=!0;this.m_onMessageHandler=this._onMessage.bind(this);this.m_callbackList={};this.m_id=0;this.m_timeoutId=-1;this.m_appContext=null;this.m_url=n;this.m_options=t;this.m_options||(this.m_options={sessionKey:Math.random().toString()});this.m_options.sessionKey||(this.m_options.sessionKey=Math.random().toString());this.m_options.container||(this.m_options.container=document.body);this.m_options.timeoutInMilliseconds||(this.m_options.timeoutInMilliseconds=6e4);this.m_options.height||(this.m_options.height="400px");this.m_options.width||(this.m_options.width="100%")}return __extends(f,u),f.prototype._getIFrameSrc=function(){var u=window.location.protocol+"//"+window.location.host,i=n.Constants.embeddingPageOrigin+"="+encodeURIComponent(u)+"&"+n.Constants.embeddingPageSessionInfo+"="+encodeURIComponent(this.m_options.sessionKey),r=!1,t;return this.m_url.toLowerCase().indexOf("/_layouts/preauth.aspx")>0&&(r=!0),t=document.createElement("a"),t.href=this.m_url,r?t.hash=t.hash.length===0||t.hash==="#"?"#"+i:t.hash+"&"+i:t.search=t.search.length===0||t.search==="?"?"?"+i:t.search+"&"+i,t.href},f.prototype.init=function(){var t=this,i;return window.addEventListener("message",this.m_onMessageHandler),i=this._getIFrameSrc(),new n._Internal.OfficePromise(function(r,u){var f=document.createElement("iframe");t.m_options.id&&(f.id=t.m_options.id);f.style.height=t.m_options.height;f.style.width=t.m_options.width;f.src=i;t.m_options.container.appendChild(f);t.m_timeoutId=setTimeout(function(){t.close();var i=n.Utility.createRuntimeError(n.ErrorCodes.timeout,n.Utility._getResourceString(n.ResourceStrings.timeout),"EmbeddedSession.init");u(i)},t.m_options.timeoutInMilliseconds);t.m_promiseResolver=r})},f.prototype._invoke=function(n,t,u){if(!this.m_enabled){t(i.InternalError,null);return}r.invokeRequestModifier&&(u=r.invokeRequestModifier(u));this._sendMessageWithCallback(this.m_id++,n,u,function(n){r.invokeResponseModifier&&(n=r.invokeResponseModifier(n));var u=n.Error;delete n.Error;t(u||i.Success,n)})},f.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler);window.clearTimeout(this.m_timeoutId);this.m_enabled=!1},Object.defineProperty(f.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),f.prototype._createRequestExecutorOrNull=function(){return new e(this)},f.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},f.prototype._registerEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.RegisterEventCommand,{EventId:i,TargetId:r},function(){n(null)})})},f.prototype._unregisterEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.UnregisterEventCommand,{EventId:i,TargetId:r},function(){n()})})},f.prototype._onMessage=function(n){var u=this,i,e,r,o,s;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===n.source&&this.m_chosenOrigin===n.origin)){if(i=n.data,i&&i[t.CommandKey]===t.ApiReadyCommand){!this.m_chosenWindow&&this._isValidDescendant(n.source)&&i[t.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=n.source,this.m_chosenOrigin=n.origin,this._sendMessageWithCallback(this.m_id++,t.GetAppContextCommand,null,function(n){u._setupContext(n);window.clearTimeout(u.m_timeoutId);u.m_promiseResolver()}));return}if(i&&i[t.CommandKey]===t.FireEventCommand){var f=i[t.ParamsKey],h=f.EventId,c=f.TargetId,l=f.Data;if(this.m_sessionEventManager)for(e=this.m_sessionEventManager.getHandlers(h,c),r=0;r=0;o--)if(r[o]===e[i].handler){r.splice(o,1);break}break;case 2:r=[];break}}return s&&(!this.m_registered&&r.length>0?u=u.then(function(){return f.m_eventInfo.registerFunc(f.m_callback)}).then(function(){return f.m_registered=!0}):this.m_registered&&r.length==0&&(u=u.then(function(){return f.m_eventInfo.unregisterFunc(f.m_callback)}).catch(function(t){n.Utility.log("Error when unregister event: "+JSON.stringify(t))}).then(function(){return f.m_registered=!1})),u=u.then(function(){return f.m_handlers=r})),u},t.prototype.fireEvent=function(t){for(var u,f,r=[],i=0;i=0;e--)if(f[e]===u){f.splice(e,1);break}return f.length===0?this.m_unregisterEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i}();n.EventRegistration=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var s=JSON.stringify(u.Body),f=u.Url,e,o;if(f.charAt(f.length-1)!="/"&&(f=f+"/"),f=f+n.Constants.processQuery,f=f+"?"+n.Constants.flags+"="+r.toString(),e={method:"POST",url:f,headers:{},body:s},e.headers[n.Constants.sourceLibHeader]=t.SourceLibHeaderValue,e.headers["CONTENT-TYPE"]="application/json",u.Headers)for(o in u.Headers)e.headers[o]=u.Headers[o];return n.HttpUtility.sendRequest(e).then(function(t){var i,r;return t.statusCode===200?i={ErrorCode:null,ErrorMessage:null,Headers:t.headers,Body:JSON.parse(t.body)}:(n.Utility.log("Error Response:"+t.body),r=n.Utility._parseErrorResponse(t),i={ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:t.headers,Body:null}),i})},t.SourceLibHeaderValue="officejs-rest",t}();n.HttpRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){n.OfficeRequire=function(){return typeof require!="undefined"?require:null}()})(t=n._Internal||(n._Internal={}));i=function(){function i(){}return i.setCustomSendRequestFunc=function(n){i.s_customSendRequestFunc=n},i.xhrSendRequestFunc=function(i){return new t.OfficePromise(function(r,u){var f=new XMLHttpRequest,e;if(f.open(i.method,i.url),f.onload=function(){var t={statusCode:f.status,headers:n.Utility._parseHttpResponseHeaders(f.getAllResponseHeaders()),body:f.responseText};r(t)},f.onerror=function(){u(new t.RuntimeError({code:n.ErrorCodes.connectionFailure,message:n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,f.statusText)}))},i.headers)for(e in i.headers)f.setRequestHeader(e,i.headers[e]);f.send(i.body)})},i.nodejsRequestModuleSendRequestFunc=function(n){i.logRequest(n);var r=t.OfficeRequire(i.NodeJsRequestModuleName);return r(n.url,{method:n.method,headers:n.headers,body:n.body}).then(function(n){return n.text().then(function(t){var f=n.status,u={},r;return n.headers.forEach(function(n,t){u[t]=n}),r={statusCode:f,headers:u,body:t},i.logResponse(r),r})})},i.sendRequest=function(n){i.validateAndNormalizeRequest(n);var t=i.s_customSendRequestFunc;return t||(t=typeof window=="undefined"||typeof XMLHttpRequest=="undefined"?i.nodejsRequestModuleSendRequestFunc:i.xhrSendRequestFunc),t(n)},i.setCustomSendLocalDocumentRequestFunc=function(n){i.s_customSendLocalDocumentRequestFunc=n},i.sendLocalDocumentRequest=function(n){i.validateAndNormalizeRequest(n);var t;return t=i.s_customSendLocalDocumentRequestFunc||i.officeJsSendLocalDocumentRequestFunc,t(n)},i.officeJsSendLocalDocumentRequestFunc=function(i){i=n.Utility._validateLocalDocumentRequest(i);var r=n.Utility._buildRequestMessageSafeArray(i);return new t.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(r,function(i){var r;r=i.status=="succeeded"?{statusCode:n.RichApiMessageUtility.getResponseStatusCode(i),headers:n.RichApiMessageUtility.getResponseHeaders(i),body:n.RichApiMessageUtility.getResponseBody(i)}:n.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(i.error.code,i.error.message);n.Utility.log(JSON.stringify(r));t(r)})})},i.validateAndNormalizeRequest=function(i){if(n.Utility.isNullOrUndefined(i))throw t.RuntimeError._createInvalidArgError({argumentName:"request"});n.Utility.isNullOrEmptyString(i.method)&&(i.method="GET");i.method=i.method.toUpperCase()},i.logRequest=function(t){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Request---"),n.Utility.log(t.method+" "+t.url),t.headers)for(var r in t.headers)n.Utility.log(r+": "+t.headers[r]);i._logBody&&n.Utility.log(t.body)}},i.logResponse=function(t){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Response---"),n.Utility.log(""+t.statusCode),t.headers)for(var r in t.headers)n.Utility.log(r+": "+t.headers[r]);i._logBody&&n.Utility.log(t.body)}},i.NodeJsRequestModuleName="node-fetch",i._logBody=!1,i}();n.HttpUtility=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_clientObject=n}return n.prototype._handleResult=function(n){this.m_clientObject._handleIdResult(n)},n}();n.InstantiateActionResultHandler=t}(OfficeExtension||(OfficeExtension={})),function(n){}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){this.m_objectPathInfo=n;this.m_parentObjectPath=t;this.m_isWriteOperation=!1;this.m_isCollection=i;this.m_isInvalidAfterRequest=r;this.m_isValid=!0}return Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},set:function(n){this.m_isWriteOperation=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(n){this.m_argumentObjectPaths=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(n){this.m_isValid=n;!n&&this.m_objectPathInfo.ObjectPathType===6&&this.m_savedObjectPathInfo&&(t.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(n){this.m_getByIdMethodName=n},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null},t.prototype.updateUsingObjectData=function(i){var o=i[n.Constants.referenceId],u,f,e,r;if(!n.Utility.isNullOrEmptyString(o)){this.m_savedObjectPathInfo||this.isInvalidAfterRequest||!t.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)||(u={},t.copyObjectPathInfo(this.m_objectPathInfo,u),this.m_savedObjectPathInfo={pathInfo:u,parent:this.m_parentObjectPath});this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=o;this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null;return}if(f=this.parentObjectPath&&this.parentObjectPath.isCollection,e=this.getByIdMethodName,(f||!n.Utility.isNullOrEmptyString(e))&&(r=i[n.Constants.id],n.Utility.isNullOrUndefined(r)&&(r=i[n.Constants.idPrivate]),!n.Utility.isNullOrUndefined(r))){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;f?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=e,this.m_getByIdMethodName=null);this.isWriteOperation=!1;this.m_objectPathInfo.ArgumentInfo={};this.m_objectPathInfo.ArgumentInfo.Arguments=[r];this.m_argumentObjectPaths=null;return}},t.isRestorableObjectPath=function(n){return n===1||n===5||n===3||n===4},t.copyObjectPathInfo=function(n,t){t.Id=n.Id;t.ArgumentInfo=n.ArgumentInfo;t.Name=n.Name;t.ObjectPathType=n.ObjectPathType;t.ParentObjectPathId=n.ParentObjectPathId},t}();n.ObjectPath=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createGlobalObjectObjectPath=function(t){var i={Id:t._nextId(),ObjectPathType:1,Name:""};return new n.ObjectPath(i,null,!1,!1)},t.createNewObjectObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:2,Name:i};return new n.ObjectPath(u,null,r,!1)},t.createPropertyObjectPath=function(t,i,r,u,f){var e={Id:t._nextId(),ObjectPathType:4,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id};return new n.ObjectPath(e,i._objectPath,u,f)},t.createIndexerObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i._objectPath,!1,!1)},t.createIndexerObjectPathUsingParentPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i,!1,!1)},t.createMethodObjectPath=function(t,i,r,u,f,e,o,s){var c={Id:t._nextId(),ObjectPathType:3,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},l=n.Utility.setMethodArguments(t,c.ArgumentInfo,f),h=new n.ObjectPath(c,i._objectPath,e,o);return h.argumentObjectPaths=l,h.isWriteOperation=u!=1,h.getByIdMethodName=s,h},t.createReferenceIdObjectPath=function(t,i){var r={Id:t._nextId(),ObjectPathType:6,Name:i,ArgumentInfo:{}};return new n.ObjectPath(r,null,!1,!1)},t.createChildItemObjectPathUsingIndexerOrGetItemAt=function(i,r,u,f,e){var o=f[n.Constants.id];return n.Utility.isNullOrUndefined(o)&&(o=f[n.Constants.idPrivate]),i&&!n.Utility.isNullOrUndefined(o)?t.createChildItemObjectPathUsingIndexer(r,u,f):t.createChildItemObjectPathUsingGetItemAt(r,u,f,e)},t.createChildItemObjectPathUsingIndexer=function(t,i,r){var f=r[n.Constants.id],u;return n.Utility.isNullOrUndefined(f)&&(f=r[n.Constants.idPrivate]),u=u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u.ArgumentInfo.Arguments=[f],new n.ObjectPath(u,i._objectPath,!1,!1)},t.createChildItemObjectPathUsingGetItemAt=function(t,i,r,u){var e=r[n.Constants.index],f;return e&&(u=e),f={Id:t._nextId(),ObjectPathType:3,Name:n.Constants.getItemAt,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f.ArgumentInfo.Arguments=[u],new n.ObjectPath(f,i._objectPath,!1,!1)},t}();n.ObjectPathFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var f=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n._Internal.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(f,function(i){n.Utility.log("Response:");n.Utility.log(JSON.stringify(i));var r;r=i.status=="succeeded"?n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBody(i),n.RichApiMessageUtility.getResponseHeaders(i)):n.RichApiMessageUtility.buildResponseOnError(i.error.code,i.error.message);t(r)})})},t.SourceLibHeaderValue="officejs",t}();n.OfficeJsRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){var t;(function(t){function i(){return function(){"use strict";function wt(n){return typeof n=="function"||typeof n=="object"&&n!==null}function b(n){return typeof n=="function"}function bt(n){return typeof n=="object"&&n!==null}function kt(n){k=n}function dt(n){f=n}function ti(){var t=process.nextTick,n=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&n[1]==="0"&&n[2]==="10"&&(t=setImmediate),function(){t(c)}}function ii(){return function(){tt(c)}}function ri(){var n=0,i=new ut(c),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function ui(){var n=new MessageChannel;return n.port1.onmessage=c,function(){n.port2.postMessage(0)}}function ft(){return function(){setTimeout(c,1)}}function c(){for(var t,i,n=0;n=0?(n=n.substring(t+5,n.length),n<"14.14393"?!0:!1):!1}function i(){return typeof window=="undefined"&&typeof Promise=="function"?Promise:typeof window!="undefined"&&window.Promise?t()?n.PromiseImpl.Init():window.Promise:n.PromiseImpl.Init()}n.OfficePromise=i()}(t=n._Internal||(n._Internal={}));i=t.OfficePromise;n.Promise=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this._autoCleanupList={};this.m_context=n}return t.prototype.add=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._addCommon(n,!0)}):this._addCommon(n,!0)},t.prototype._autoAdd=function(n){this._addCommon(n,!1);this._autoCleanupList[n._objectPath.objectPathInfo.Id]=n},t.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(t,i){var r=this.m_context._autoCleanup&&!t[n.Constants.isTracked]&&t!==this.m_context._rootObject&&i&&!n.Utility.isNullOrEmptyString(i[n.Constants.referenceId]);r&&(this._autoCleanupList[t._objectPath.objectPathInfo.Id]=t,t[n.Constants.isTracked]=!0)},t.prototype._addCommon=function(t,i){if(t[n.Constants.isTracked]){i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id];return}var r=t[n.Constants.referenceId];n.Utility.isNullOrEmptyString(r)&&t._KeepReference&&(t._KeepReference(),n.ActionFactory.createInstantiateAction(this.m_context,t),i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id],t[n.Constants.isTracked]=!0)},t.prototype.remove=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._removeCommon(n)}):this._removeCommon(n)},t.prototype._removeCommon=function(t){var r=t[n.Constants.referenceId],i;n.Utility.isNullOrEmptyString(r)||(i=this.m_context._rootObject,i._RemoveReference&&i._RemoveReference(r),delete t[n.Constants.isTracked])},t.prototype._retrieveAndClearAutoCleanupList=function(){var n=this._autoCleanupList;return this._autoCleanupList={},n},t}();n.TrackedObjects=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.cannotRegisterEvent="CannotRegisterEvent",n.connectionFailureWithStatus="ConnectionFailureWithStatus",n.connectionFailureWithDetails="ConnectionFailureWithDetails",n.invalidObjectPath="InvalidObjectPath",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.invalidArgumentGeneric="InvalidArgumentGeneric",n.propertyNotLoaded="PropertyNotLoaded",n.runMustReturnPromise="RunMustReturnPromise",n.timeout="Timeout",n.propertyDoesNotExist="PropertyDoesNotExist",n.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",n.moreInfoInnerError="MoreInfoInnerError",n.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",n.valueNotLoaded="ValueNotLoaded",n.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage",n}();n.ResourceStrings=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.CannotRegisterEvent="The event handler cannot be registered.",n.ConnectionFailureWithStatus="The request failed with status code of {0}.",n.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}",n.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",n.InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',n.InvalidRequestContext="Cannot use the object across different request contexts.",n.PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",n.RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',n.Timeout="The operation has timed out.",n.ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.',n.invalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.",n}();n.ResourceStringValues=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.buildMessageArrayForIRequestExecutor=function(i,r,u,f){var o=JSON.stringify(u.Body),e;return n.Utility.log("Request:"),n.Utility.log(o),e={},e[n.Constants.sourceLibHeader]=f,t.buildRequestMessageSafeArray(i,r,"POST","ProcessQuery",e,o)},t.buildResponseOnSuccess=function(n,t){var i={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return i.Body=JSON.parse(n),i.Headers=t,i},t.buildResponseOnError=function(i,r){var u={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return u.ErrorCode=n.ErrorCodes.generalException,u.ErrorMessage=r,i==t.OfficeJsErrorCode_ooeNoCapability?u.ErrorCode=n.ErrorCodes.accessDenied:i==t.OfficeJsErrorCode_ooeActivityLimitReached?u.ErrorCode=n.ErrorCodes.activityLimitReached:i==t.OfficeJsErrorCode_ooeInvalidOrTimedOutSession&&(u.ErrorCode=n.ErrorCodes.invalidOrTimedOutSession,u.ErrorMessage=n.Utility._getResourceString(n.ResourceStrings.invalidOrTimedOutSessionMessage)),u},t.buildHttpResponseFromOfficeJsError=function(i,r){var f=500,u={};return u.error={},u.error.code=n.ErrorCodes.generalException,u.error.message=r,i===t.OfficeJsErrorCode_ooeNoCapability?(f=403,u.error.code=n.ErrorCodes.accessDenied):i===t.OfficeJsErrorCode_ooeActivityLimitReached&&(f=429,u.error.code=n.ErrorCodes.activityLimitReached),{statusCode:f,headers:{},body:JSON.stringify(u)}},t.buildRequestMessageSafeArray=function(n,t,i,r,u,f){var e=[],o;if(u)for(o in u)e.push(o),e.push(u[o]);var s=0,h="",c="",l="";return[n,i,r,e,f,s,t,h,c,l]},t.getResponseBody=function(n){return t.getResponseBodyFromSafeArray(n.value.data)},t.getResponseHeaders=function(n){return t.getResponseHeadersFromSafeArray(n.value.data)},t.getResponseBodyFromSafeArray=function(n){var t=n[2],i;return typeof t=="string"?t:(i=t,i.join(""))},t.getResponseHeadersFromSafeArray=function(n){var i=n[1],r,t;if(!i)return null;for(r={},t=0;t0&&f.push(i);return f},t.throwError=function(i,r,u){throw new n._Internal.RuntimeError({code:i,message:t._getResourceString(i,r),debugInfo:u?{errorLocation:u}:undefined});},t.createRuntimeError=function(t,i,r){return new n._Internal.RuntimeError({code:t,message:i,debugInfo:{errorLocation:r}})},t._getResourceString=function(i,r){var u,e,f,o;return typeof window!="undefined"&&window.Strings&&window.Strings.OfficeOM&&(e="L_"+i,f=window.Strings.OfficeOM[e],f&&(u=f)),u||(u=n.ResourceStringValues[i]),u||(u=i),t.isNullOrUndefined(r)||(Array.isArray(r)?(o=r,u=t._formatString(u,o)):u=u.replace("{0}",r)),u},t._formatString=function(t,i){return t.replace(/\{\d\}/g,function(t){var r=parseInt(t.substr(1,t.length-2));if(r0?".":"")+i;break;case 3:i=t.normalizeName(n.objectPathInfo.Name)+"()"+(i.length>0?".":"")+i;break;case 4:i=t.normalizeName(n.objectPathInfo.Name)+(i.length>0?".":"")+i;break;case 5:i="getItem()"+(i.length>0?".":"")+i;break;case 6:i="_reference()"+(i.length>0?".":"")+i;break}n=n.parentObjectPath}return i},t._createPromiseFromResult=function(t){return new n._Internal.OfficePromise(function(n,i){n(t)})},t._createTimeoutPromise=function(t){return new n._Internal.OfficePromise(function(n,i){setTimeout(function(){n(null)},t)})},t.promisify=function(t){return new n._Internal.OfficePromise(function(n,i){var r=function(t){t.status=="failed"?i(t.error):n(t.value)};t(r)})},t._addActionResultHandler=function(n,t,i){n.context._pendingRequest.addActionResultHandler(t,i)},t._handleNavigationPropertyResults=function(n,i,r){for(var u=0;u0},t._getLocalDocumentUrlPrefixLength=function(n){for(var i=["http://document.localhost","https://document.localhost","//document.localhost"],r=n.toLowerCase().trim(),t=0;t0))for(s=i.url.substr(f+1),e=s.split("&"),u=0;u0&&(f=i.substr(0,u),e=i.substr(u+1),f=t.trim(f),e=t.trim(e),s[f.toUpperCase()]=e));return s},t._parseErrorResponse=function(i){var r=null,f,e,u;if(!t.isNullOrEmptyString(i.body)){f=t.trim(i.body);try{r=JSON.parse(f)}catch(o){t.log("Error when parse "+f)}}return!t.isNullOrUndefined(r)&&typeof r=="object"&&r.error?(u=r.error.code,e=t._getResourceString(n.ResourceStrings.connectionFailureWithDetails,[i.statusCode.toString(),r.error.code,r.error.message])):e=t._getResourceString(n.ResourceStrings.connectionFailureWithStatus,i.statusCode.toString()),t.isNullOrEmptyString(u)&&(u=n.ErrorCodes.connectionFailure),{errorCode:u,errorMessage:e}},t._copyHeaders=function(n,t){if(n&&t)for(var i in n)t[i]=n[i]},t._logEnabled=!1,t._synchronousCleanup=!1,t.s_underscoreCharCode="_".charCodeAt(0),t}();n.Utility=t}(OfficeExtension||(OfficeExtension={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){function nt(n){return n[0].toLowerCase()+n.slice(1)}function w(n,t,i){var s=1500,e,r,u,o,h;if(Array.isArray(i)&&i.length>0&&Array.isArray(i[0])&&i.length*i[0].length>s&&p()){for(e=Math.max(1,Math.round(s/i[0].length)),n._ValidateArraySize(i.length,i[0].length),r=0;ri.length&&(u=i.length-r),o=n.getRow(r).getBoundingRect(n.getRow(r+u-1)),h=i.slice(r,r+u),f(o.context,o,t,h);return!0}return!1}function p(){return typeof window!="undefined"&&window.Office&&window.Office.context&&window.Office.context.requirements?window.Office.context.requirements.isSetSupported("ExcelApi",1.3):!0}function ku(t,i,r){return OfficeExtension.ClientRequestContext._runBatch("Excel.run",arguments,function(t){return new n.RequestContext(t)})}function b(n){var t={BindingColumnCount:n.bindingColumnCount,BindingId:n.bindingId,BindingRowCount:n.bindingRowCount,bindingType:n.bindingType,HasHeaders:n.hasHeaders};return window.OSF.DDA.OMFactory.manufactureBinding(t,window.Microsoft.Office.WebExtension.context.document)}function rt(n,t){var r=n.headers==null,i;return i=r?n.rows:n,i=window.OSF.DDA.DataCoercion.coerceData(i,t[window.Microsoft.Office.WebExtension.Parameters.CoercionType]),i==undefined?null:i}var wu=["ThreeArrows","ThreeArrowsGray","ThreeFlags","ThreeTrafficLights1","ThreeTrafficLights2","ThreeSigns","ThreeSymbols","ThreeSymbols2","FourArrows","FourArrowsGray","FourRedToBlack","FourRating","FourTrafficLights","FiveArrows","FiveArrowsGray","FiveRating","FiveQuarters","ThreeStars","ThreeTriangles","FiveBoxes"],bu=[["RedDownArrow","YellowSideArrow","GreenUpArrow"],["GrayDownArrow","GraySideArrow","GrayUpArrow"],["RedFlag","YellowFlag","GreenFlag"],["RedCircleWithBorder","YellowCircle","GreenCircle"],["RedTrafficLight","YellowTrafficLight","GreenTrafficLight"],["RedDiamond","YellowTriangle","GreenCircle"],["RedCrossSymbol","YellowExclamationSymbol","GreenCheckSymbol"],["RedCross","YellowExclamation","GreenCheck"],["RedDownArrow","YellowDownInclineArrow","YellowUpInclineArrow","GreenUpArrow"],["GrayDownArrow","GrayDownInclineArrow","GrayUpInclineArrow","GrayUpArrow"],["BlackCircle","GrayCircle","PinkCircle","RedCircle"],["OneBar","TwoBars","ThreeBars","FourBars"],["BlackCircleWithBorder","RedCircleWithBorder","YellowCircle","GreenCircle"],["RedDownArrow","YellowDownInclineArrow","YellowSideArrow","YellowUpInclineArrow","GreenUpArrow"],["GrayDownArrow","GrayDownInclineArrow","GraySideArrow","GrayUpInclineArrow","GrayUpArrow"],["NoBars","OneBar","TwoBars","ThreeBars","FourBars"],["WhiteCircleAllWhiteQuarters","CircleWithThreeWhiteQuarters","CircleWithTwoWhiteQuarters","CircleWithOneWhiteQuarter","BlackCircle"],["SilverStar","HalfGoldStar","GoldStar"],["RedDownTriangle","YellowDash","GreenUpTriangle"],["NoFilledBoxes","OneFilledBox","TwoFilledBoxes","ThreeFilledBoxes","FourFilledBoxes"],],tt,it,d,ut,ft,et,k,ot,st,ht,g,ct,lt,at,vt,yt,pt,wt,bt,kt,dt,gt,ni,ti,ii,ri,ui,fi,ei,oi,si,hi,ci,li,ai,vi,yi,pi,wi,bi,ki,di,gi,nr,tr,ir,rr,ur,fr,er,or,sr,hr,cr,lr,ar,vr,yr,pr,wr,br,kr,dr,gr,nu,tu,iu,ru,uu,fu,eu,ou,su,hu,cu,lu,au,vu,yu,gu,nf,tf,rf,uf,ff,ef,of,sf,hf,cf,lf,af,vf,yf,pf,wf,bf,kf,df,gf,ne,te,ie,re,ue,fe,ee,oe,se,he,ce,le,ae,ve,ye,pe,we,be,ke,de,ge,no,to,io,ro,i,pu,uo;n.icons={};wu.map(function(t,i){var r=nt(t);n.icons[r]=[];bu[i].map(function(i,u){i=nt(i);var f={set:t,index:u};n.icons[r].push(f);n.icons[r][i]=f})});tt=function(){function n(n,t,i){this.m_workbookUrl=n;this.m_requestHeaders=t;this.m_requestHeaders||(this.m_requestHeaders={});OfficeExtension.Utility.isNullOrUndefined(i)&&(i=!0);this.m_persisted=i}return n.prototype.close=function(){var i=this,t,u,r;return this.m_requestUrlAndHeaderInfo&&!OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)?(t=this.m_requestUrlAndHeaderInfo.url,t.charAt(t.length-1)!="/"&&(t=t+"/"),t=t+"closeSession",u=this.m_requestUrlAndHeaderInfo,r={method:"POST",url:t,headers:this.m_requestUrlAndHeaderInfo.headers,body:""},this.m_requestUrlAndHeaderInfo=null,OfficeExtension.HttpUtility.sendRequest(r).then(function(t){var u,r,f;if(t.statusCode!=204){u=OfficeExtension.Utility._parseErrorResponse(t);throw OfficeExtension.Utility.createRuntimeError(u.errorCode,u.errorMessage,"Session.close");}i.m_requestUrlAndHeaderInfo=null;r=null;for(f in i.m_requestHeaders)if(f.toLowerCase()==n.WorkbookSessionIdHeaderNameLower){r=f;break}r&&delete i.m_requestHeaders[r]})):OfficeExtension.Utility._createPromiseFromResult(null)},n.prototype._resolveRequestUrlAndHeaderInfo=function(){var r=this,u,e,t,i,f,o;if(this.m_requestUrlAndHeaderInfo)return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);if(OfficeExtension.Utility.isNullOrEmptyString(this.m_workbookUrl)||OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl))return this.m_requestUrlAndHeaderInfo={url:this.m_workbookUrl,headers:this.m_requestHeaders},OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);u=!1;for(e in this.m_requestHeaders)if(e.toLowerCase()==n.WorkbookSessionIdHeaderNameLower){u=!0;break}return u?(this.m_requestUrlAndHeaderInfo={url:this.m_workbookUrl,headers:this.m_requestHeaders},OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo)):(t=this.m_workbookUrl,t.charAt(t.length-1)!="/"&&(t=t+"/"),t=t+"createSession",i={},OfficeExtension.Utility._copyHeaders(this.m_requestHeaders,i),i["Content-Type"]="application/json",f={},f.persistChanges=this.m_persisted,o={method:"POST",url:t,headers:i,body:JSON.stringify(f)},OfficeExtension.HttpUtility.sendRequest(o).then(function(t){var u,f,e;if(t.statusCode!==201){u=OfficeExtension.Utility._parseErrorResponse(t);throw OfficeExtension.Utility.createRuntimeError(u.errorCode,u.errorMessage,"Session.resolveRequestUrlAndHeaderInfo");}return f=JSON.parse(t.body),e=f.id,i={},OfficeExtension.Utility._copyHeaders(r.m_requestHeaders,i),i[n.WorkbookSessionIdHeaderName]=e,r.m_requestUrlAndHeaderInfo={url:r.m_workbookUrl,headers:i},r.m_requestUrlAndHeaderInfo}))},n.WorkbookSessionIdHeaderName="Workbook-Session-Id",n.WorkbookSessionIdHeaderNameLower="workbook-session-id",n}();n.Session=tt;it=function(n){function t(t){n.call(this,t);this.m_workbook=new d(this,OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(this));this._rootObject=this.m_workbook}return __extends(t,n),Object.defineProperty(t.prototype,"workbook",{get:function(){return this.m_workbook},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"application",{get:function(){return this.workbook.application},enumerable:!0,configurable:!0}),t}(OfficeExtension.ClientRequestContext);n.RequestContext=it;n.run=ku;n._RedirectV1APIs=!1;n._V1APIMap={GetDataAsync:{call:function(n,t){return n.workbook._V1Api.bindingGetData(t)},postprocess:rt},GetSelectedDataAsync:{call:function(n,t){return n.workbook._V1Api.getSelectedData(t)},postprocess:rt},GoToByIdAsync:{call:function(n,t){return n.workbook._V1Api.gotoById(t)}},AddColumnsAsync:{call:function(n,t){return n.workbook._V1Api.bindingAddColumns(t)}},AddFromSelectionAsync:{call:function(n,t){return n.workbook._V1Api.bindingAddFromSelection(t)},postprocess:b},AddFromNamedItemAsync:{call:function(n,t){return n.workbook._V1Api.bindingAddFromNamedItem(t)},postprocess:b},AddFromPromptAsync:{call:function(n,t){return n.workbook._V1Api.bindingAddFromPrompt(t)},postprocess:b},AddRowsAsync:{call:function(n,t){return n.workbook._V1Api.bindingAddRows(t)}},GetByIdAsync:{call:function(n,t){return n.workbook._V1Api.bindingGetById(t)},postprocess:b},ReleaseByIdAsync:{call:function(n,t){return n.workbook._V1Api.bindingReleaseById(t)}},GetAllAsync:{call:function(n){return n.workbook._V1Api.bindingGetAll()},postprocess:function(n){return n.bindings.map(function(n){return b(n)})}},DeleteAllDataValuesAsync:{call:function(n,t){return n.workbook._V1Api.bindingDeleteAllDataValues(t)}},SetSelectedDataAsync:{preprocess:function(n){var t=n.cellFormat;return typeof window!="undefined"&&window.OSF.DDA.SafeArray?window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes,"cellFormat")&&(n.cellFormat=window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes.cellFormat.toHost(t)):typeof window!="undefined"&&window.OSF.DDA.WAC&&window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes,"cellFormat")&&(n.cellFormat=window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes.cellFormat.toHost(t)),n},call:function(n,t){return n.workbook._V1Api.setSelectedData(t)}},SetDataAsync:{preprocess:function(n){var t=n.cellFormat;return typeof window!="undefined"&&window.OSF.DDA.SafeArray?window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes,"cellFormat")&&(n.cellFormat=window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes.cellFormat.toHost(t)):typeof window!="undefined"&&window.OSF.DDA.WAC&&window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes,"cellFormat")&&(n.cellFormat=window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes.cellFormat.toHost(t)),n},call:function(n,t){return n.workbook._V1Api.bindingSetData(t)}},SetFormatsAsync:{preprocess:function(n){var t=n.cellFormat;return typeof window!="undefined"&&window.OSF.DDA.SafeArray?window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes,"cellFormat")&&(n.cellFormat=window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes.cellFormat.toHost(t)):typeof window!="undefined"&&window.OSF.DDA.WAC&&window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes,"cellFormat")&&(n.cellFormat=window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes.cellFormat.toHost(t)),n},call:function(n,t){return n.workbook._V1Api.bindingSetFormats(t)}},SetTableOptionsAsync:{call:function(n,t){return n.workbook._V1Api.bindingSetTableOptions(t)}},ClearFormatsAsync:{call:function(n,t){return n.workbook._V1Api.bindingClearFormats(t)}},GetFilePropertiesAsync:{call:function(n,t){return n.workbook._V1Api.getFilePropertiesAsync(t)}}};var o=OfficeExtension.ObjectPathFactory.createPropertyObjectPath,t=OfficeExtension.ObjectPathFactory.createMethodObjectPath,y=OfficeExtension.ObjectPathFactory.createIndexerObjectPath,fo=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath,eo=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer,oo=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt,v=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt,s=OfficeExtension.ActionFactory.createMethodAction,f=OfficeExtension.ActionFactory.createSetPropertyAction,e=OfficeExtension.Utility.isNullOrUndefined,u=OfficeExtension.Utility.isUndefined,r=OfficeExtension.Utility.throwIfNotLoaded,c=OfficeExtension.Utility.load,h=OfficeExtension.Utility.fixObjectPathIfNecessary,l=OfficeExtension.Utility._addActionResultHandler,a=OfficeExtension.Utility._handleNavigationPropertyResults,so=OfficeExtension.Utility.adjustToDateTime,du=function(n){function t(){n.apply(this,arguments)}return __extends(t,n),Object.defineProperty(t.prototype,"_className",{get:function(){return"Application"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"calculationMode",{get:function(){return r("calculationMode",this.m_calculationMode,"Application",this._isNull),this.m_calculationMode},enumerable:!0,configurable:!0}),t.prototype.calculate=function(n){s(this.context,this,"Calculate",0,[n])},t.prototype.suspendApiCalculationUntilNextSync=function(){s(this.context,this,"SuspendApiCalculationUntilNextSync",0,[])},t.prototype._handleResult=function(t){if(n.prototype._handleResult.call(this,t),!e(t)){var i=t;h(this,i);u(i.CalculationMode)||(this.m_calculationMode=i.CalculationMode)}},t.prototype.load=function(n){return c(this,n),this},t.prototype.toJSON=function(){return{calculationMode:this.m_calculationMode}},t}(OfficeExtension.ClientObject);n.Application=du;d=function(i){function r(){i.apply(this,arguments)}return __extends(r,i),Object.defineProperty(r.prototype,"_className",{get:function(){return"Workbook"},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"application",{get:function(){return this.m_application||(this.m_application=new n.Application(this.context,o(this.context,this,"Application",!1,!1))),this.m_application},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"bindings",{get:function(){return this.m_bindings||(this.m_bindings=new n.BindingCollection(this.context,o(this.context,this,"Bindings",!0,!1))),this.m_bindings},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"customXmlParts",{get:function(){return this.m_customXmlParts||(this.m_customXmlParts=new n.CustomXmlPartCollection(this.context,o(this.context,this,"CustomXmlParts",!0,!1))),this.m_customXmlParts},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"functions",{get:function(){return this.m_functions||(this.m_functions=new n.Functions(this.context,o(this.context,this,"Functions",!1,!1))),this.m_functions},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"names",{get:function(){return this.m_names||(this.m_names=new n.NamedItemCollection(this.context,o(this.context,this,"Names",!0,!1))),this.m_names},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"pivotTables",{get:function(){return this.m_pivotTables||(this.m_pivotTables=new n.PivotTableCollection(this.context,o(this.context,this,"PivotTables",!0,!1))),this.m_pivotTables},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"settings",{get:function(){return this.m_settings||(this.m_settings=new n.SettingCollection(this.context,o(this.context,this,"Settings",!0,!1))),this.m_settings},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"tables",{get:function(){return this.m_tables||(this.m_tables=new n.TableCollection(this.context,o(this.context,this,"Tables",!0,!1))),this.m_tables},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"worksheets",{get:function(){return this.m_worksheets||(this.m_worksheets=new n.WorksheetCollection(this.context,o(this.context,this,"Worksheets",!0,!1))),this.m_worksheets},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"_V1Api",{get:function(){return this.m__V1Api||(this.m__V1Api=new n._V1Api(this.context,o(this.context,this,"_V1Api",!1,!1))),this.m__V1Api},enumerable:!0,configurable:!0}),r.prototype.getSelectedRange=function(){return new n.Range(this.context,t(this.context,this,"GetSelectedRange",1,[],!1,!0,null))},r.prototype._GetObjectByReferenceId=function(n){var i=s(this.context,this,"_GetObjectByReferenceId",1,[n]),t=new OfficeExtension.ClientResult;return l(this,i,t),t},r.prototype._GetObjectTypeNameByReferenceId=function(n){var i=s(this.context,this,"_GetObjectTypeNameByReferenceId",1,[n]),t=new OfficeExtension.ClientResult;return l(this,i,t),t},r.prototype._GetReferenceCount=function(){var t=s(this.context,this,"_GetReferenceCount",1,[]),n=new OfficeExtension.ClientResult;return l(this,t,n),n},r.prototype._RemoveAllReferences=function(){s(this.context,this,"_RemoveAllReferences",1,[])},r.prototype._RemoveReference=function(n){s(this.context,this,"_RemoveReference",1,[n])},r.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;h(this,t);a(this,t,["application","Application","bindings","Bindings","customXmlParts","CustomXmlParts","functions","Functions","names","Names","pivotTables","PivotTables","settings","Settings","tables","Tables","worksheets","Worksheets","_V1Api","_V1Api"])}},r.prototype.load=function(n){return c(this,n),this},Object.defineProperty(r.prototype,"onSelectionChanged",{get:function(){var n=this;return this.m_selectionChanged||(this.m_selectionChanged=new OfficeExtension.EventHandlers(this.context,this,"SelectionChanged",{registerFunc:function(t){return n.context.eventRegistration.register(2,"",t)},unregisterFunc:function(t){return n.context.eventRegistration.unregister(2,"",t)},eventArgsTransformFunc:function(t){return OfficeExtension.Utility._createPromiseFromResult({workbook:n})}})),this.m_selectionChanged},enumerable:!0,configurable:!0}),r.prototype.toJSON=function(){return{}},r}(OfficeExtension.ClientObject);n.Workbook=d;ut=function(i){function l(){i.apply(this,arguments)}return __extends(l,i),Object.defineProperty(l.prototype,"_className",{get:function(){return"Worksheet"},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"charts",{get:function(){return this.m_charts||(this.m_charts=new n.ChartCollection(this.context,o(this.context,this,"Charts",!0,!1))),this.m_charts},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"names",{get:function(){return this.m_names||(this.m_names=new n.NamedItemCollection(this.context,o(this.context,this,"Names",!0,!1))),this.m_names},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"pivotTables",{get:function(){return this.m_pivotTables||(this.m_pivotTables=new n.PivotTableCollection(this.context,o(this.context,this,"PivotTables",!0,!1))),this.m_pivotTables},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"protection",{get:function(){return this.m_protection||(this.m_protection=new n.WorksheetProtection(this.context,o(this.context,this,"Protection",!1,!1))),this.m_protection},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"tables",{get:function(){return this.m_tables||(this.m_tables=new n.TableCollection(this.context,o(this.context,this,"Tables",!0,!1))),this.m_tables},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"id",{get:function(){return r("id",this.m_id,"Worksheet",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"name",{get:function(){return r("name",this.m_name,"Worksheet",this._isNull),this.m_name},set:function(n){this.m_name=n;f(this.context,this,"Name",n)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"position",{get:function(){return r("position",this.m_position,"Worksheet",this._isNull),this.m_position},set:function(n){this.m_position=n;f(this.context,this,"Position",n)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"visibility",{get:function(){return r("visibility",this.m_visibility,"Worksheet",this._isNull),this.m_visibility},set:function(n){this.m_visibility=n;f(this.context,this,"Visibility",n)},enumerable:!0,configurable:!0}),l.prototype.set=function(n,t){this._recursivelySet(n,t,["name","position","visibility"],[],["charts","names","pivotTables","tables","charts","names","pivotTables","protection","tables"])},l.prototype.activate=function(){s(this.context,this,"Activate",1,[])},l.prototype.calculate=function(n){s(this.context,this,"Calculate",0,[n])},l.prototype.delete=function(){s(this.context,this,"Delete",0,[])},l.prototype.getCell=function(i,r){return new n.Range(this.context,t(this.context,this,"GetCell",1,[i,r],!1,!0,null))},l.prototype.getNext=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetNext",1,[i],!1,!0,null))},l.prototype.getNextOrNullObject=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetNextOrNullObject",1,[i],!1,!0,null))},l.prototype.getPrevious=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetPrevious",1,[i],!1,!0,null))},l.prototype.getPreviousOrNullObject=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetPreviousOrNullObject",1,[i],!1,!0,null))},l.prototype.getRange=function(i){return new n.Range(this.context,t(this.context,this,"GetRange",1,[i],!1,!0,null))},l.prototype.getUsedRange=function(i){return new n.Range(this.context,t(this.context,this,"GetUsedRange",1,[i],!1,!0,null))},l.prototype.getUsedRangeOrNullObject=function(i){return new n.Range(this.context,t(this.context,this,"GetUsedRangeOrNullObject",1,[i],!1,!0,null))},l.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;h(this,t);u(t.Id)||(this.m_id=t.Id);u(t.Name)||(this.m_name=t.Name);u(t.Position)||(this.m_position=t.Position);u(t.Visibility)||(this.m_visibility=t.Visibility);a(this,t,["charts","Charts","names","Names","pivotTables","PivotTables","protection","Protection","tables","Tables"])}},l.prototype.load=function(n){return c(this,n),this},l.prototype._handleIdResult=function(n){(i.prototype._handleIdResult.call(this,n),e(n))||u(n.Id)||(this.m_id=n.Id)},l.prototype.toJSON=function(){return{id:this.m_id,name:this.m_name,position:this.m_position,protection:this.m_protection,visibility:this.m_visibility}},l}(OfficeExtension.ClientObject);n.Worksheet=ut;ft=function(i){function u(){i.apply(this,arguments)}return __extends(u,i),Object.defineProperty(u.prototype,"_className",{get:function(){return"WorksheetCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"items",{get:function(){return r("items",this.m__items,"WorksheetCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),u.prototype.add=function(i){return new n.Worksheet(this.context,t(this.context,this,"Add",0,[i],!1,!0,null))},u.prototype.getActiveWorksheet=function(){return new n.Worksheet(this.context,t(this.context,this,"GetActiveWorksheet",1,[],!1,!1,null))},u.prototype.getCount=function(n){var i=s(this.context,this,"GetCount",1,[n]),t=new OfficeExtension.ClientResult;return l(this,i,t),t},u.prototype.getFirst=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetFirst",1,[i],!1,!0,null))},u.prototype.getItem=function(t){return new n.Worksheet(this.context,y(this.context,this,[t]))},u.prototype.getItemOrNullObject=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetItemOrNullObject",1,[i],!1,!1,null))},u.prototype.getLast=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetLast",1,[i],!1,!0,null))},u.prototype._handleResult=function(t){var u,f,r,o;if((i.prototype._handleResult.call(this,t),!e(t))&&(u=t,h(this,u),!e(u[OfficeExtension.Constants.items])))for(this.m__items=[],f=u[OfficeExtension.Constants.items],r=0;r0?f=i.getOffsetRange(r,u):(f=i,e=r,o=u),Math.abs(t)==1)?f:f.getBoundingRect(i.getOffsetRange(r*t+e,u*t+o))},Object.defineProperty(l.prototype,"conditionalFormats",{get:function(){return this.m_conditionalFormats||(this.m_conditionalFormats=new n.ConditionalFormatCollection(this.context,o(this.context,this,"ConditionalFormats",!0,!1))),this.m_conditionalFormats},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"format",{get:function(){return this.m_format||(this.m_format=new n.RangeFormat(this.context,o(this.context,this,"Format",!1,!1))),this.m_format},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"sort",{get:function(){return this.m_sort||(this.m_sort=new n.RangeSort(this.context,o(this.context,this,"Sort",!1,!1))),this.m_sort},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"worksheet",{get:function(){return this.m_worksheet||(this.m_worksheet=new n.Worksheet(this.context,o(this.context,this,"Worksheet",!1,!1))),this.m_worksheet},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"address",{get:function(){return r("address",this.m_address,"Range",this._isNull),this.m_address},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"addressLocal",{get:function(){return r("addressLocal",this.m_addressLocal,"Range",this._isNull),this.m_addressLocal},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"cellCount",{get:function(){return r("cellCount",this.m_cellCount,"Range",this._isNull),this.m_cellCount},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"columnCount",{get:function(){return r("columnCount",this.m_columnCount,"Range",this._isNull),this.m_columnCount},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"columnHidden",{get:function(){return r("columnHidden",this.m_columnHidden,"Range",this._isNull),this.m_columnHidden},set:function(n){this.m_columnHidden=n;f(this.context,this,"ColumnHidden",n)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"columnIndex",{get:function(){return r("columnIndex",this.m_columnIndex,"Range",this._isNull),this.m_columnIndex},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"formulas",{get:function(){return r("formulas",this.m_formulas,"Range",this._isNull),this.m_formulas},set:function(n){(this.m_formulas=n,w(this,"Formulas",n))||(this.m_formulas=n,f(this.context,this,"Formulas",n))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"formulasLocal",{get:function(){return r("formulasLocal",this.m_formulasLocal,"Range",this._isNull),this.m_formulasLocal},set:function(n){(this.m_formulasLocal=n,w(this,"FormulasLocal",n))||(this.m_formulasLocal=n,f(this.context,this,"FormulasLocal",n))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"formulasR1C1",{get:function(){return r("formulasR1C1",this.m_formulasR1C1,"Range",this._isNull),this.m_formulasR1C1},set:function(n){(this.m_formulasR1C1=n,w(this,"FormulasR1C1",n))||(this.m_formulasR1C1=n,f(this.context,this,"FormulasR1C1",n))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"hidden",{get:function(){return r("hidden",this.m_hidden,"Range",this._isNull),this.m_hidden},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"numberFormat",{get:function(){return r("numberFormat",this.m_numberFormat,"Range",this._isNull),this.m_numberFormat},set:function(n){(this.m_numberFormat=n,w(this,"NumberFormat",n))||(this.m_numberFormat=n,f(this.context,this,"NumberFormat",n))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"rowCount",{get:function(){return r("rowCount",this.m_rowCount,"Range",this._isNull),this.m_rowCount},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"rowHidden",{get:function(){return r("rowHidden",this.m_rowHidden,"Range",this._isNull),this.m_rowHidden},set:function(n){this.m_rowHidden=n;f(this.context,this,"RowHidden",n)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"rowIndex",{get:function(){return r("rowIndex",this.m_rowIndex,"Range",this._isNull),this.m_rowIndex},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"text",{get:function(){return r("text",this.m_text,"Range",this._isNull),this.m_text},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"valueTypes",{get:function(){return r("valueTypes",this.m_valueTypes,"Range",this._isNull),this.m_valueTypes},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"values",{get:function(){return r("values",this.m_values,"Range",this._isNull),this.m_values},set:function(n){(this.m_values=n,w(this,"Values",n))||(this.m_values=n,f(this.context,this,"Values",n))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_ReferenceId",{get:function(){return r("_ReferenceId",this.m__ReferenceId,"Range",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),l.prototype.set=function(n,t){this._recursivelySet(n,t,["numberFormat","values","formulas","formulasLocal","formulasR1C1","rowHidden","columnHidden"],["format"],["conditionalFormats","sort","worksheet","conditionalFormats","sort","worksheet"])},l.prototype.calculate=function(){s(this.context,this,"Calculate",0,[])},l.prototype.clear=function(n){s(this.context,this,"Clear",0,[n])},l.prototype.delete=function(n){s(this.context,this,"Delete",0,[n])},l.prototype.getBoundingRect=function(i){return new n.Range(this.context,t(this.context,this,"GetBoundingRect",1,[i],!1,!0,null))},l.prototype.getCell=function(i,r){return new n.Range(this.context,t(this.context,this,"GetCell",1,[i,r],!1,!0,null))},l.prototype.getColumn=function(i){return new n.Range(this.context,t(this.context,this,"GetColumn",1,[i],!1,!0,null))},l.prototype.getColumnsAfter=function(i){if(!p()){if(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0)throw new OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove");return this._getAdjacentRange("getColumnsAfter",i,this.getLastColumn(),0,1)}return new n.Range(this.context,t(this.context,this,"GetColumnsAfter",1,[i],!1,!0,null))},l.prototype.getColumnsBefore=function(i){if(!p()){if(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0)throw new OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove");return this._getAdjacentRange("getColumnsBefore",i,this.getColumn(0),0,-1)}return new n.Range(this.context,t(this.context,this,"GetColumnsBefore",1,[i],!1,!0,null))},l.prototype.getEntireColumn=function(){return new n.Range(this.context,t(this.context,this,"GetEntireColumn",1,[],!1,!0,null))},l.prototype.getEntireRow=function(){return new n.Range(this.context,t(this.context,this,"GetEntireRow",1,[],!1,!0,null))},l.prototype.getIntersection=function(i){return new n.Range(this.context,t(this.context,this,"GetIntersection",1,[i],!1,!0,null))},l.prototype.getIntersectionOrNullObject=function(i){return new n.Range(this.context,t(this.context,this,"GetIntersectionOrNullObject",1,[i],!1,!0,null))},l.prototype.getLastCell=function(){return new n.Range(this.context,t(this.context,this,"GetLastCell",1,[],!1,!0,null))},l.prototype.getLastColumn=function(){return new n.Range(this.context,t(this.context,this,"GetLastColumn",1,[],!1,!0,null))},l.prototype.getLastRow=function(){return new n.Range(this.context,t(this.context,this,"GetLastRow",1,[],!1,!0,null))},l.prototype.getOffsetRange=function(i,r){return new n.Range(this.context,t(this.context,this,"GetOffsetRange",1,[i,r],!1,!0,null))},l.prototype.getResizedRange=function(i,r){if(!p()){this._ensureInteger(i,"getResizedRange");this._ensureInteger(r,"getResizedRange");var u=i>=0&&r>=0?this:this.getCell(0,0);return u.getBoundingRect(this.getLastCell().getOffsetRange(i,r))}return new n.Range(this.context,t(this.context,this,"GetResizedRange",1,[i,r],!1,!0,null))},l.prototype.getRow=function(i){return new n.Range(this.context,t(this.context,this,"GetRow",1,[i],!1,!0,null))},l.prototype.getRowsAbove=function(i){if(!p()){if(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0)throw new OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove");return this._getAdjacentRange("getRowsAbove",i,this.getRow(0),-1,0)}return new n.Range(this.context,t(this.context,this,"GetRowsAbove",1,[i],!1,!0,null))},l.prototype.getRowsBelow=function(i){if(!p()){if(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0)throw new OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove");return this._getAdjacentRange("getRowsBelow",i,this.getLastRow(),1,0)}return new n.Range(this.context,t(this.context,this,"GetRowsBelow",1,[i],!1,!0,null))},l.prototype.getUsedRange=function(i){return new n.Range(this.context,t(this.context,this,"GetUsedRange",1,[i],!1,!0,null))},l.prototype.getUsedRangeOrNullObject=function(i){return new n.Range(this.context,t(this.context,this,"GetUsedRangeOrNullObject",1,[i],!1,!0,null))},l.prototype.getVisibleView=function(){return new n.RangeView(this.context,t(this.context,this,"GetVisibleView",1,[],!1,!1,null))},l.prototype.insert=function(i){return new n.Range(this.context,t(this.context,this,"Insert",0,[i],!1,!0,null))},l.prototype.merge=function(n){s(this.context,this,"Merge",0,[n])},l.prototype.select=function(){s(this.context,this,"Select",1,[])},l.prototype.unmerge=function(){s(this.context,this,"Unmerge",0,[])},l.prototype._KeepReference=function(){s(this.context,this,"_KeepReference",1,[])},l.prototype._ValidateArraySize=function(n,t){s(this.context,this,"_ValidateArraySize",1,[n,t])},l.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;h(this,t);u(t.Address)||(this.m_address=t.Address);u(t.AddressLocal)||(this.m_addressLocal=t.AddressLocal);u(t.CellCount)||(this.m_cellCount=t.CellCount);u(t.ColumnCount)||(this.m_columnCount=t.ColumnCount);u(t.ColumnHidden)||(this.m_columnHidden=t.ColumnHidden);u(t.ColumnIndex)||(this.m_columnIndex=t.ColumnIndex);u(t.Formulas)||(this.m_formulas=t.Formulas);u(t.FormulasLocal)||(this.m_formulasLocal=t.FormulasLocal);u(t.FormulasR1C1)||(this.m_formulasR1C1=t.FormulasR1C1);u(t.Hidden)||(this.m_hidden=t.Hidden);u(t.NumberFormat)||(this.m_numberFormat=t.NumberFormat);u(t.RowCount)||(this.m_rowCount=t.RowCount);u(t.RowHidden)||(this.m_rowHidden=t.RowHidden);u(t.RowIndex)||(this.m_rowIndex=t.RowIndex);u(t.Text)||(this.m_text=t.Text);u(t.ValueTypes)||(this.m_valueTypes=t.ValueTypes);u(t.Values)||(this.m_values=t.Values);u(t._ReferenceId)||(this.m__ReferenceId=t._ReferenceId);a(this,t,["conditionalFormats","ConditionalFormats","format","Format","sort","Sort","worksheet","Worksheet"])}},l.prototype.load=function(n){return c(this,n),this},l.prototype._handleIdResult=function(n){(i.prototype._handleIdResult.call(this,n),e(n))||u(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId)},l.prototype.track=function(){return this.context.trackedObjects.add(this),this},l.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},l.prototype.toJSON=function(){return{address:this.m_address,addressLocal:this.m_addressLocal,cellCount:this.m_cellCount,columnCount:this.m_columnCount,columnHidden:this.m_columnHidden,columnIndex:this.m_columnIndex,format:this.m_format,formulas:this.m_formulas,formulasLocal:this.m_formulasLocal,formulasR1C1:this.m_formulasR1C1,hidden:this.m_hidden,numberFormat:this.m_numberFormat,rowCount:this.m_rowCount,rowHidden:this.m_rowHidden,rowIndex:this.m_rowIndex,text:this.m_text,values:this.m_values,valueTypes:this.m_valueTypes}},l}(OfficeExtension.ClientObject);n.Range=k;ot=function(i){function s(){i.apply(this,arguments)}return __extends(s,i),Object.defineProperty(s.prototype,"_className",{get:function(){return"RangeView"},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rows",{get:function(){return this.m_rows||(this.m_rows=new n.RangeViewCollection(this.context,o(this.context,this,"Rows",!0,!1))),this.m_rows},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"cellAddresses",{get:function(){return r("cellAddresses",this.m_cellAddresses,"RangeView",this._isNull),this.m_cellAddresses},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"columnCount",{get:function(){return r("columnCount",this.m_columnCount,"RangeView",this._isNull),this.m_columnCount},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulas",{get:function(){return r("formulas",this.m_formulas,"RangeView",this._isNull),this.m_formulas},set:function(n){this.m_formulas=n;f(this.context,this,"Formulas",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulasLocal",{get:function(){return r("formulasLocal",this.m_formulasLocal,"RangeView",this._isNull),this.m_formulasLocal},set:function(n){this.m_formulasLocal=n;f(this.context,this,"FormulasLocal",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulasR1C1",{get:function(){return r("formulasR1C1",this.m_formulasR1C1,"RangeView",this._isNull),this.m_formulasR1C1},set:function(n){this.m_formulasR1C1=n;f(this.context,this,"FormulasR1C1",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"index",{get:function(){return r("index",this.m_index,"RangeView",this._isNull),this.m_index},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"numberFormat",{get:function(){return r("numberFormat",this.m_numberFormat,"RangeView",this._isNull),this.m_numberFormat},set:function(n){this.m_numberFormat=n;f(this.context,this,"NumberFormat",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rowCount",{get:function(){return r("rowCount",this.m_rowCount,"RangeView",this._isNull),this.m_rowCount},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"text",{get:function(){return r("text",this.m_text,"RangeView",this._isNull),this.m_text},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"valueTypes",{get:function(){return r("valueTypes",this.m_valueTypes,"RangeView",this._isNull),this.m_valueTypes},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"values",{get:function(){return r("values",this.m_values,"RangeView",this._isNull),this.m_values},set:function(n){this.m_values=n;f(this.context,this,"Values",n)},enumerable:!0,configurable:!0}),s.prototype.set=function(n,t){this._recursivelySet(n,t,["numberFormat","values","formulas","formulasLocal","formulasR1C1"],[],["rows","rows"])},s.prototype.getRange=function(){return new n.Range(this.context,t(this.context,this,"GetRange",1,[],!1,!0,null))},s.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;h(this,t);u(t.CellAddresses)||(this.m_cellAddresses=t.CellAddresses);u(t.ColumnCount)||(this.m_columnCount=t.ColumnCount);u(t.Formulas)||(this.m_formulas=t.Formulas);u(t.FormulasLocal)||(this.m_formulasLocal=t.FormulasLocal);u(t.FormulasR1C1)||(this.m_formulasR1C1=t.FormulasR1C1);u(t.Index)||(this.m_index=t.Index);u(t.NumberFormat)||(this.m_numberFormat=t.NumberFormat);u(t.RowCount)||(this.m_rowCount=t.RowCount);u(t.Text)||(this.m_text=t.Text);u(t.ValueTypes)||(this.m_valueTypes=t.ValueTypes);u(t.Values)||(this.m_values=t.Values);a(this,t,["rows","Rows"])}},s.prototype.load=function(n){return c(this,n),this},s.prototype.toJSON=function(){return{cellAddresses:this.m_cellAddresses,columnCount:this.m_columnCount,formulas:this.m_formulas,formulasLocal:this.m_formulasLocal,formulasR1C1:this.m_formulasR1C1,index:this.m_index,numberFormat:this.m_numberFormat,rowCount:this.m_rowCount,text:this.m_text,values:this.m_values,valueTypes:this.m_valueTypes}},s}(OfficeExtension.ClientObject);n.RangeView=ot;st=function(i){function u(){i.apply(this,arguments)}return __extends(u,i),Object.defineProperty(u.prototype,"_className",{get:function(){return"RangeViewCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"items",{get:function(){return r("items",this.m__items,"RangeViewCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),u.prototype.getCount=function(){var t=s(this.context,this,"GetCount",1,[]),n=new OfficeExtension.ClientResult;return l(this,t,n),n},u.prototype.getItemAt=function(i){return new n.RangeView(this.context,t(this.context,this,"GetItemAt",1,[i],!1,!1,null))},u.prototype._handleResult=function(t){var u,f,r,o;if((i.prototype._handleResult.call(this,t),!e(t))&&(u=t,h(this,u),!e(u[OfficeExtension.Constants.items])))for(this.m__items=[],f=u[OfficeExtension.Constants.items],r=0;r6&&i.slice(0,5)===t.DateJSONPrefix&&i.slice(-1)===t.DateJSONSuffix&&(r=new Date(parseInt(i.slice(5,-1))),r)?r:i})},t._replaceDateWithStringDate=function(n){var i=JSON.stringify(n,function(n,i){return this[n]instanceof Date?t.DateJSONPrefix+this[n].getTime()+t.DateJSONSuffix:i});return JSON.parse(i)},Object.defineProperty(t.prototype,"key",{get:function(){return r("key",this.m_key,"Setting",this._isNull),this.m_key},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return r("value",this.m_value,"Setting",this._isNull),this.m_value},set:function(n){if(!e(n)){this.m_value=n;var i=t._replaceDateWithStringDate(n);f(this.context,this,"Value",i);return}this.m_value=n;f(this.context,this,"Value",n)},enumerable:!0,configurable:!0}),t.prototype.set=function(n,t){this._recursivelySet(n,t,["value"],[],[])},t.prototype.delete=function(){s(this.context,this,"Delete",0,[])},t.prototype._handleResult=function(i){if(n.prototype._handleResult.call(this,i),!e(i)){var r=i;h(this,r);u(r.Key)||(this.m_key=r.Key);u(r.Value)||(this.m_value=r.Value,this.m_value=t.replaceStringDateWithDate(this.m_value))}},t.prototype.load=function(n){return c(this,n),this},t.prototype.toJSON=function(){return{key:this.m_key,value:this.m_value}},t.DateJSONPrefix="Date(",t.DateJSONSuffix=")",t}(OfficeExtension.ClientObject);n.Setting=g;ct=function(i){function u(){i.apply(this,arguments)}return __extends(u,i),Object.defineProperty(u.prototype,"_className",{get:function(){return"NamedItemCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"items",{get:function(){return r("items",this.m__items,"NamedItemCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),u.prototype.add=function(i,r,u){return new n.NamedItem(this.context,t(this.context,this,"Add",0,[i,r,u],!1,!0,null))},u.prototype.addFormulaLocal=function(i,r,u){return new n.NamedItem(this.context,t(this.context,this,"AddFormulaLocal",0,[i,r,u],!1,!1,null))},u.prototype.getCount=function(){var t=s(this.context,this,"GetCount",1,[]),n=new OfficeExtension.ClientResult;return l(this,t,n),n},u.prototype.getItem=function(t){return new n.NamedItem(this.context,y(this.context,this,[t]))},u.prototype.getItemOrNullObject=function(i){return new n.NamedItem(this.context,t(this.context,this,"GetItemOrNullObject",1,[i],!1,!1,null))},u.prototype._handleResult=function(t){var u,f,r,o;if((i.prototype._handleResult.call(this,t),!e(t))&&(u=t,h(this,u),!e(u[OfficeExtension.Constants.items])))for(this.m__items=[],f=u[OfficeExtension.Constants.items],r=0;r"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"error",{get:function(){return r("error",this.m_error,"FunctionResult",this._isNull),this.m_error},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return r("value",this.m_value,"FunctionResult",this._isNull),this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){if(n.prototype._handleResult.call(this,t),!e(t)){var i=t;h(this,i);u(i.Error)||(this.m_error=i.Error);u(i.Value)||(this.m_value=i.Value)}},t.prototype.load=function(n){return c(this,n),this},t.prototype.toJSON=function(){return{error:this.m_error,value:this.m_value}},t}(OfficeExtension.ClientObject);n.FunctionResult=i;pu=function(n){function r(){n.apply(this,arguments)}return __extends(r,n),Object.defineProperty(r.prototype,"_className",{get:function(){return"Functions"},enumerable:!0,configurable:!0}),r.prototype.abs=function(n){return new i(this.context,t(this.context,this,"Abs",0,[n],!1,!0,null))},r.prototype.accrInt=function(n,r,u,f,e,o,s,h){return new i(this.context,t(this.context,this,"AccrInt",0,[n,r,u,f,e,o,s,h],!1,!0,null))},r.prototype.accrIntM=function(n,r,u,f,e){return new i(this.context,t(this.context,this,"AccrIntM",0,[n,r,u,f,e],!1,!0,null))},r.prototype.acos=function(n){return new i(this.context,t(this.context,this,"Acos",0,[n],!1,!0,null))},r.prototype.acosh=function(n){return new i(this.context,t(this.context,this,"Acosh",0,[n],!1,!0,null))},r.prototype.acot=function(n){return new i(this.context,t(this.context,this,"Acot",0,[n],!1,!0,null))},r.prototype.acoth=function(n){return new i(this.context,t(this.context,this,"Acoth",0,[n],!1,!0,null))},r.prototype.amorDegrc=function(n,r,u,f,e,o,s){return new i(this.context,t(this.context,this,"AmorDegrc",0,[n,r,u,f,e,o,s],!1,!0,null))},r.prototype.amorLinc=function(n,r,u,f,e,o,s){return new i(this.context,t(this.context,this,"AmorLinc",0,[n,r,u,f,e,o,s],!1,!0,null))},r.prototype.and=function(){for(var r=[],n=0;n0?i.push(t):t.tabIndex===0&&r.push(t):r.push(t);return i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;return r===0&&(r=i.indexOf(n)-i.indexOf(t)),r}),[].concat(i,r)}var o="focus",s="on",k="configurable",d="writable",h="enumerable",u="",c="undefined",t=!1,i=!0,l=2147483647,n=null,r=-1,a=r,g="&_xdm_Info=",nt="&_serializer_version=",tt="_xdm_",ft="_serializer_version=",v="#",it="&",f="class",y={},et=3e4,p=n,w=n,e=(new Date).getTime();return{set_entropy:function(n){var t,r,i;if(typeof n=="string")for(t=0;t6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(r)===OSF.DDA.SettingsManager.DataJSONSuffix&&(i=new Date(parseInt(t.slice(5,r))),i)?i:t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,i);f[u]=t}catch(e){}}return f},loadScript:function(r,u,f){var s,e,o,h,c;r&&u&&(s=window.document,e=y[r],e?e.loaded?u():e.pendingCallbacks.push(u):(o=s.createElement("script"),o.type="text/javascript",e={loaded:t,pendingCallbacks:[u],timer:n},y[r]=e,h=function(){var r,t,u;for(e.timer!=n&&(clearTimeout(e.timer),delete e.timer),e.loaded=i,r=e.pendingCallbacks.length,t=0;t1?l[l.length-1]:n,s,h,c,a;return u&&o!=n&&(o.indexOf(it)>=0&&(o=o.split(it)[0]),o=decodeURIComponent(o)),s=b(),!f&&s&&(h=window.name.indexOf(i),h>r&&(c=window.name.indexOf(";",h),c==r&&(c=window.name.length),a=window.name.substring(h,c),o?s.setItem(a,o):o=s.getItem(a))),o},getConversationId:function(){var i=window.location.search,t=n,r;return i&&(r=i.indexOf("&"),t=r>0?i.substring(1,r):i.substr(1),t&&t.charAt(t.length-1)==="="&&(t=t.substring(0,t.length-1),t&&(t=decodeURIComponent(t)))),t},getInfoItems:function(n){var t=n.split("$");return typeof t[1]==c&&(t=n.split("|")),typeof t[1]==c&&(t=n.split("%7C")),t},getXdmFieldValue:function(n,t){var r=u,f=OSF.OUtil.parseXdmInfo(t),i;if(f&&(i=OSF.OUtil.getInfoItems(f),i!=undefined&&i.length>=3))switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]),f;if(u)throw u;for(f in r)if(u=Function._validateParameter(n[f],r[f],f),u)throw u;},writeProfilerMark:function(n){window.msWriteProfilerMark&&(window.msWriteProfilerMark(n),OsfMsAjaxFactory.msAjaxDebug.trace(n))},outputDebug:function(n){typeof OsfMsAjaxFactory!==c&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){var e,f;r=r||{};for(e in u)f=u[e],r[f]==undefined&&(r[f]=i);return Object.defineProperty(n,t,r),n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[h])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[h])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[d,h,k])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[d,h,k])},finalizeProperties:function(n,r){var e,u;r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8,e=o&255,i[t++]=r>>2,i[t++]=(r&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63,isNaN(o)||(r=o>>8,f=h&255,e=h>>8,i[t++]=r>>2,i[t++]=(r&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63),isNaN(o)?i[t-1]=64:isNaN(h)&&(i[t-2]=64,i[t-1]=64),c=0;c0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){var u,i,f,r;if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(u=[],i=0;in)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=ut(u),e=f?u.length-1:0,u.length===0)return n;while(!h&&e>=0&&en)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=ut(u),l=y(u,f),s=v(u.length,l,e),s<0)return n;while(!c&&s>=0&&s0;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[r%16],r=Math.floor(r/16);for(;t<32;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[Math.floor(Math.random()*16)];return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3};OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611,WordAndroid:8388613,PowerpointAndroid:8388614};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",Reserved:"reserved",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData",Base64:"base64"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidOpenBrowserWindow:102,dispidCreateDocumentMethod:105,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];return i?(i.name||(i.name=n[this.errorCodes.ooeInternalError].name),i.message||(i.message=n[this.errorCodes.ooeInternalError].message)):i=n[this.errorCodes.ooeInternalError],i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:t.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:t.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:t.L_SSOConnectionLostError,message:t.L_SSOConnectionLostErrorMessage}}}}(),function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}(),r,i,h,u,c,l,f,a,e,v,y,p,w,b,o,k,d,g,s,nt,tt,it,rt;n.RequirementVersion=ut;r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){var f,u,e,i,r;if(n==undefined)return!1;if(t==undefined&&(t=0),f=this._setMap,u=f._sets,u.hasOwnProperty(n.toLowerCase())){e=u[n.toLowerCase()];try{if((i=this._getVersion(e),t=t+"",r=this._getVersion(t),i.major>0&&i.major>r.major)||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),i=0,r=0;if(t.length<2&&isNaN(Number(n)))throw u;else if(i=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(i)||isNaN(r))throw u;return{minor:r,major:i}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;h=function(n){function i(){n.call(this,{dialogapi:t})}return __extends(i,n),i}(i);n.DefaultDialogSetRequirement=h;u=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelClientDefaultSetRequirement=u;c=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(u);n.ExcelClientV1DefaultSetRequirement=c;l=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookClientDefaultSetRequirement=l;f=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return __extends(i,n),i}(i);n.WordClientDefaultSetRequirement=f;a=function(n){function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return __extends(i,n),i}(f);n.WordClientV1DefaultSetRequirement=a;e=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointClientDefaultSetRequirement=e;v=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(e);n.PowerpointClientV1DefaultSetRequirement=v;y=function(n){function i(){n.call(this,{selection:t,textcoercion:t})}return __extends(i,n),i}(i);n.ProjectClientDefaultSetRequirement=y;p=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return __extends(i,n),i}(i);n.ExcelWebDefaultSetRequirement=p;w=function(n){function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordWebDefaultSetRequirement=w;b=function(n){function i(){n.call(this,{activeview:t,settings:t})}return __extends(i,n),i}(i);n.PowerpointWebDefaultSetRequirement=b;o=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookWebDefaultSetRequirement=o;k=function(n){function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.SwayWebDefaultSetRequirement=k;d=function(n){function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return __extends(i,n),i}(i);n.AccessWebDefaultSetRequirement=d;g=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelIOSDefaultSetRequirement=g;s=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordIOSDefaultSetRequirement=s;nt=function(n){function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return __extends(t,n),t}(s);n.WordIOSV1DefaultSetRequirement=nt;tt=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointIOSDefaultSetRequirement=tt;it=function(n){function i(){n.call(this,{mailbox:t})}return __extends(i,n),i}(i);n.OutlookIOSDefaultSetRequirement=it;rt=function(){function n(){}var t="undefined";return n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},n.getDefaultRequirementMatrix=function(u){var f,e,s,o;return this.initializeDefaultSetMatrix(),f=undefined,e=u.get_requirementMatrix(),e!=undefined&&e.length>0&&typeof JSON!==t?(s=JSON.parse(u.get_requirementMatrix().toLowerCase()),f=new r(new i(s))):(o=n.getClientFullVersionString(u),f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[o]!=undefined?new r(n.DefaultSetArrayMatrix[o]):new r(new i({}))),f},n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix(),e;return f!=undefined&&f.length>0&&typeof JSON!==t?(e=JSON.parse(n.get_requirementMatrix().toLowerCase()),u=new r(new i(e))):u=new r(new h),u},n.getClientFullVersionString=function(n){var i=n.get_appMinorVersion(),u="",r="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;return f&&n.get_appVersion()==1?r=t==4096&&i>=15?"16.00.01":"16.00":n.get_appName()==64?r=n.get_appVersion():(u=i<10?"0"+i:""+i,r=n.get_appVersion()+"."+u),n.get_appName()+"-"+r},n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new c;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new v;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new l;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new w;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new b;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new g;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new k;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new nt;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new tt;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new it},n.Excel_RCLIENT_1600="1-16.00",n.Excel_RCLIENT_1601="1-16.01",n.Word_RCLIENT_1600="2-16.00",n.Word_RCLIENT_1601="2-16.01",n.PowerPoint_RCLIENT_1600="4-16.00",n.PowerPoint_RCLIENT_1601="4-16.01",n.Outlook_RCLIENT_1600="8-16.00",n.Excel_WAC_1600="16-16.00",n.Word_WAC_1600="32-16.00",n.Outlook_WAC_1600="64-16.00",n.Outlook_WAC_1601="64-16.01",n.Project_RCLIENT_1600="128-16.00",n.Access_WAC_1600="256-16.00",n.PowerPoint_WAC_1600="512-16.00",n.Excel_IOS_1600="1024-16.00",n.SWAY_WAC_1600="2048-16.00",n.Word_IOS_1600="4096-16.00",n.Word_IOS_16001="4096-16.00.01",n.PowerPoint_IOS_1600="8192-16.00",n.Outlook_IOS_1600="65536-16.00",n.DefaultSetArrayMatrix={},n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))}(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}return n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n},n.getInstance=function(){return n.hostObj===undefined&&(n.hostObj=new n),n.hostObj},n.prototype.getPlatform=function(){var n=this,t;return n.hostInfo.hostPlatform&&(t=n.hostInfo.hostPlatform.toLowerCase(),n.platformRemappings[t])?n.platformRemappings[t]:null},n.prototype.getHost=function(){var n=this,t;if(n.hostInfo.hostType){if(t=n.hostInfo.hostType.toLowerCase(),n.camelCaseMappings[t])return n.camelCaseMappings[t];if(t=n.capitalizeFirstLetter(n.hostInfo.hostType),Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null},n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null},n}();n.Host=t})(t=n.HostName||(n.HostName={}))}(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){n||(window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,n=!0)},disableShortcut:function(){n&&(t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window),n=!1)}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i,r,o,u,f,e;if(n&&typeof n=="string"&&(r=n.indexOf("#"),r!=-1)){o=n.substring(0,r);u=n.substring(r+1);switch(o){case"binding":case"bindings":u&&(i=new OSF.DDA.BindingPromise(u))}}if(i)return i.onFail=t,i;else if(t)if(f=typeof t,f=="function")e={},e[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(e,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext));else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f);};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this,s,e;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.auth&&OSF.OUtil.defineEnumerableProperty(f,"auth",{value:n.auth});n.application&&OSF.OUtil.defineEnumerableProperty(f,"application",{value:n.application});n.get_isDialog()?(e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e})):(t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t}),r&&(s=r.displayName||"appOM",delete r.displayName,OSF.OUtil.defineEnumerableProperty(f,s,{value:r})),u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}}),e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e}))};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Application=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this,u;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;return OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext()),n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,e=n.length,o=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){var u,i,r;for(u in n){if(i=n[u],r=t[u],i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw o();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw o();}};f.extractRequiredArguments=function(t,i,r){var f,u,h,s,c,l;if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(c=n.length-1;c>=s;c--){l=n[c];switch(typeof l){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=l;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}if(f=o.fillOptions(f,i,r,u),e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;return o.verifyArguments(t,f),f}var h="function",s=n.length,o=new OSF.DDA.ApiMethodCall(n,t,i,f,e);this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),u=c(n,r,t,i);return o.constructCallArgs(r,u,t,i)};this.processResponse=function(n,t,i,f){return n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n)};this.getCallArgs=function(n){for(var t,u,r,i=n.length-1;i>=s;i--){r=n[i];switch(typeof r){case"object":t=r;break;case h:u=r}}return t=t||{},u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u),t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],i=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],t,i,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback],u,r;f&&(u={},u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?u[OSF.DDA.AsyncResultEnum.Properties.Value]=i:(r={},i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i),f(new OSF.DDA.AsyncResult(u,r)))};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.SyncMethodNames[t]=i};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){function o(n,i,r,u){var o,c,s,h;if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(s=n.length-1;s>=e;s--){h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}return o=f.fillOptions(o,i,r,u),f.verifyArguments(t,o),o}var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),u=o(n,r,t,i);return f.constructCallArgs(r,u,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){function e(i,f){var a=i?{}:undefined,s,h,o,v,c,l;for(s in i){if(h=i[s],OSF.DDA.ListType.isListType(s)){o=[];for(v in h)o.push(e(h[v],f))}else OSF.OUtil.listContainsKey(r,s)?o=r[s][f](h):f==u&&n.preserveNesting(s)?o=e(h,f):(c=t[s],c?(l=c[f],l&&(o=l[h],o===undefined&&(o=h))):o=h);a[s]=o}return a}function l(i,r){var e,u,h,s;for(u in r)h=n.isComplexType(u)?l(i,t[u][o]):i[u],h!=undefined&&(e||(e={}),s=r[u],s==f&&(s=u),e[s]=n.pack(u,h));return e}function s(i,r,e){var o,a,h,l,p,v,y;e||(e={});for(o in r){if(a=r[o],a==f)h=i;else if(a==c){e[o]=i.toArray();continue}else h=i[a];if(h===null||h===undefined)e[o]=undefined;else if(h=n.unpack(o,h),n.isComplexType(o))l=t[o][u],n.preserveNesting(o)?e[o]=s(h,l):s(h,l,e);else if(OSF.DDA.ListType.isListType(o)){l={};p=OSF.DDA.ListType.getDescriptor(o);l[p]=f;v=new Array(h.length);for(y in h)v[y]=s(h[y],l);e[o]=v}else e[o]=h}return e}function a(n,i,r){var f=t[n][r],u,o,c;return r=="toHost"?(o=e(i,r),u=l(o,f)):r==h&&(c=s(i,f),u=e(c,r)),u}var h="fromHost",i=this,o="toHost",u=h,c="sourceData",f="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];t||(t={});i.addMapping=function(n,i){var e,h,c,l,r,s,a,v;if(i.map){e=i.map;h={};for(c in e)l=e[c],l==f&&(l=c),h[l]=c}else e=i.toHost,h=i.fromHost;if(r=t[n],r){s=r[o];for(a in s)e[a]=s[a];s=r[u];for(v in s)h[v]=s[v]}else r=t[n]={};r[o]=e;r[u]=h};i.toHost=function(n,t){return a(n,t,o)};i.fromHost=function(n,t){return a(n,t,u)};i.self=f;i.sourceData=c;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){return this.isDynamicType(n)?t[n].toHost(i):i};i.unpack=function(n,i){return this.isDynamicType(n)?t[n].fromHost(i):i}};OSF.DDA.getDecoratedParameterMap=function(n,t){function r(n){var i=null,r,t;if(n)for(i={},r=n.length,t=0;t0){for(r=[],i=0;i=s)break;if(f=Function._validateParameter(n[e],o,h),f)return f.popStackFrame(),f}return t}),Function._validateParameterCount||(Function._validateParameterCount=function(n,r,u){var f,s,e=r.length,h=n.length,c,l,a;if(he)for(s=i,f=0;f0&&t.push(u)}}catch(s){}return t}var i=[],t={};t[Microsoft.Office.WebExtension.Parameters.Data]=function(){var t=0,i=1;return{toHost:function(n){if(OSF.DDA.TableDataProperties&&typeof n!="string"&&n[OSF.DDA.TableDataProperties.TableRows]!==undefined){var r=[];r[t]=n[OSF.DDA.TableDataProperties.TableRows];r[i]=n[OSF.DDA.TableDataProperties.TableHeaders];n=r}return n},fromHost:function(r){var f,e,u;return r.toArray?(e=r.dimensions(),e===2?f=n(r):(u=r.toArray(),u.length===2&&(u[0]!=null&&u[0].toArray||u[1]!=null&&u[1].toArray)?(f={},f[OSF.DDA.TableDataProperties.TableRows]=n(u[t]),f[OSF.DDA.TableDataProperties.TableHeaders]=n(u[i])):f=u)):f=r,f}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,i,t);this.unpack=function(n,i){var r,u;return this.isComplexType(n)||OSF.DDA.ListType.isListType(n)?(u=(i||typeof i=="unknown")&&i.toArray,r=u?i.toArray():i||{}):r=this.isDynamicType(n)?t[n].fromHost(i):i,r}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(n){function t(n){var i=n,f,r,u;if(OSF.OUtil.isArray(n))for(f=i.length,r=0;r2)for(r=[],f=1;f40)&&(n=OSF.OUtil.Guid.generateNewGuid(),t.setValue(t.clientIDKey,n)),n},n.prototype.saveLog=function(n,t){var i=this,u=i.getValue(i.logIdSetKey);u=(u&&u.length>0?u+";":r)+n;i.setValue(i.logIdSetKey,u);i.setValue(n,t)},n.prototype.enumerateLog=function(n,t){var i=this,e=i.getValue(i.logIdSetKey),u,o,r,f;if(e){u=e.split(";");for(o in u)r=u[o],f=i.getValue(r),f&&(n&&n(r,f),t&&i.remove(r));t&&i.remove(i.logIdSetKey)}},n.prototype.getValue=function(n){var t=OSF.OUtil.getLocalStorage(),i=r;return t&&(i=t.getItem(n)),i},n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)},n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}},n}(),o=function(){function t(){}return t.prototype.LogData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(t)}catch(i){}},t.prototype.LogRawData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(t))}catch(i){}},t}();n.initialize=y;n.onAppActivated=p;n.onScriptDone=w;n.onCallDone=b;n.onMethodDone=k;n.onPropertyDone=d;n.onEventDone=g;n.onRegisterDone=nt;n.onAppClosed=tt;n.setOsfControlAppCorrelationId=it;n.doAppInitializationLogging=l;n.logAppCommonMessage=rt;n.logAppException=ut;OSF.AppTelemetry=n}(OSFAppTelemetry||(OSFAppTelemetry={}));Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(n){var i=this,r,t,u;if(i._eventHandlers={},i._objectEventHandlers={},i._queuedEventsArgs={},n!=null)for(r=0;r0)for(r=0;r0)for(r=0;r0?(this._eventHandlers[n]=[],!0):!1},clearObjectEventHandlers:function(n,t){return this._objectEventHandlers[n]!=null&&this._objectEventHandlers[n][t]!=null?(this._objectEventHandlers[n][t]=[],!0):!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},getObjectEventHandlerCount:function(n,t){return this._objectEventHandlers[n]==null||this._objectEventHandlers[n][t]==null?0:this._objectEventHandlers[n][t].length},fireEvent:function(n){var t,r,i;if(n.type==undefined)return!1;if(t=n.type,t&&this._eventHandlers[t]){for(r=this._eventHandlers[t],i=0;i0)){for(r=t[0];i.length>0;)u=i.shift(),r(u);return!0}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var o="hostPlatform",f="outlook",e="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(n,i[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:r=new OSF.DDA.RichApiMessageEventArgs(n,i);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i),t.initialize(r.initialData),(OSF._OfficeAppFactory.getHostInfo()[o]=="win32"||OSF._OfficeAppFactory.getHostInfo()[o]=="mac")&&t.setCurrentItemNumber(r.itemNumber.itemNumber);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkRecipientsChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var i=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),t=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];t(arguments,i,n)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(n){var i=OSF.DDA.SyncMethodNames.MessageParent.displayName,t=this,r;t[i]||OSF.OUtil.defineEnumerableProperty(t,i,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return n(arguments,t)}});r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;t[r]||typeof OSF.DialogParentMessageEventDispatch=="undefined"||OSF.DDA.DispIdHost.addEventSupport(t,OSF.DialogParentMessageEventDispatch,n);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(n){n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:n[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels,value:{types:["boolean"],defaultValue:!1}}],privateStateCallbacks:[],onSucceeded:function(n){var f=n[Microsoft.Office.WebExtension.Parameters.Id],i=n[Microsoft.Office.WebExtension.Parameters.Data],t=new OSF.DialogHandler,e=OSF.DDA.AsyncMethodNames.CloseAsync.displayName,r,u;return OSF.OUtil.defineEnumerableProperty(t,e,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];n(arguments,f,i,t)}}),r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName,OSF.OUtil.defineEnumerableProperty(t,r,{value:function(){var r=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],n=r.verifyAndExtractCall(arguments,t,i),u=n[Microsoft.Office.WebExtension.Parameters.EventType],f=n[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(u,f)}}),u=OSF.DDA.SyncMethodNames.SendMessage.displayName,OSF.OUtil.defineEnumerableProperty(t,u,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return n(arguments,i,t)}}),t},checkCallArgs:function(n){return n[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Width]=1),!n[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&n[Microsoft.Office.WebExtension.Parameters.Width]>100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99),n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1),!n[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99),n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(n){try{n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,n);OSF.ClientHostController.openDialog(n.dispId,n.targetId,function(t,i){n.onEvent&&n.onEvent(i);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(n){n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,n);try{OSF.ClientHostController.closeDialog(n.dispId,n.targetId,t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.messageParent=function(n){try{n.onCalling&&n.onCalling();var i=(new Date).getTime(),t=OSF.ClientHostController.messageParent(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs((new Date).getTime()-i),t),t}catch(r){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(r)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.sendMessage=function(n){try{n.onCalling&&n.onCalling();var r=(new Date).getTime(),t=OSF.ClientHostController.sendMessage(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),t}catch(i){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(i)}};Microsoft.Office.WebExtension.TableData=function(n,t){function i(n){if(n==null||n==undefined)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(n,2);t<2;t++)n=[n];return n}catch(i){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(n){t=i(n)}},rows:{get:function(){return n},set:function(t){n=t==null||OSF.OUtil.isArray(t)&&t.length==0?[]:i(t)}}});this.headers=t;this.rows=n};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(n){return new Microsoft.Office.WebExtension.TableData(n[OSF.DDA.TableDataProperties.TableRows],n[OSF.DDA.TableDataProperties.TableHeaders])};Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var n=null;return{findArrayDimensionality:function(n){if(OSF.OUtil.isArray(n)){for(var t=0,i=0;i4194304)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return n},onSucceeded:function(n,t,i){return new OSF.DDA.File(n[OSF.DDA.FileProperties.Handle],n[OSF.DDA.FileProperties.FileSize],i[Microsoft.Office.WebExtension.Parameters.SliceSize])}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(n,t){return t[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(r<0||r>=t.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;return n[OSF.DDA.FileSliceOffset]=parseInt((r*i[OSF.DDA.FileProperties.SliceSize]).toString()),n},onSucceeded:function(n,t,i){var r={};return OSF.OUtil.defineEnumerableProperties(r,{data:{value:n[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:i[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:n[OSF.DDA.FileProperties.SliceSize]}}),r}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileProperties.FileSize,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0},{name:OSF.DDA.FileProperties.SliceSize,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:0},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:5},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:6}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:0}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileSliceOffset,value:1},{name:OSF.DDA.FileProperties.SliceSize,value:2}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0}]});OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(n){OSF.OUtil.defineEnumerableProperties(this,{url:{value:n[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(n){return new Microsoft.Office.WebExtension.FileProperties(n)}});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,fromHost:[{name:OSF.DDA.FilePropertiesDescriptor.Url,value:0}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.ExcelTableBinding=function(n,t,i,r,u){var f=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[f.ClearFormatsAsync,f.SetTableOptionsAsync,f.SetFormatsAsync]);OSF.DDA.ExcelTableBinding.uber.constructor.call(this,n,t,i,r,u);OSF.OUtil.finalizeProperties(this)};OSF.OUtil.extend(OSF.DDA.ExcelTableBinding,OSF.DDA.TableBinding),function(){var t="number",n="object",i="string";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[i,n,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:[n],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:[n],defaultValue:[]}}],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[i,n,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[n,i],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[n],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:[n],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:[n],defaultValue:[]}}],checkCallArgs:function(n,t){var i=Microsoft.Office.WebExtension.Parameters;if(n[i.StartRow]==0&&n[i.StartColumn]==0&&OSF.OUtil.isArray(n[i.CellFormat])&&n[i.CellFormat].length===0&&OSF.OUtil.isArray(n[i.TableOptions])&&n[i.TableOptions].length===0&&(delete n[i.StartRow],delete n[i.StartColumn],delete n[i.CellFormat],delete n[i.TableOptions]),n[i.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[i.StartRow]&&n[i.StartRow]!=0||n[i.StartColumn]&&n[i.StartColumn]!=0||n[i.CellFormat]||n[i.TableOptions]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:function(n){return n.id}}]});OSF.DDA.BindingPromise.prototype.setTableOptionsAsync=function(){var n=arguments;return this._fetch(function(t){t.setTableOptionsAsync.apply(t,n)}),this};OSF.DDA.BindingPromise.prototype.setFormatsAsync=function(){var n=arguments;return this._fetch(function(t){t.setFormatsAsync.apply(t,n)}),this};OSF.DDA.BindingPromise.prototype.clearFormatsAsync=function(){var n=arguments;return this._fetch(function(t){t.clearFormatsAsync.apply(t,n)}),this}}(),function(){function n(n){return n.id}OSF.DDA.AsyncMethodNames.addNames({ClearFormatsAsync:"clearFormatsAsync",SetTableOptionsAsync:"setTableOptionsAsync",SetFormatsAsync:"setFormatsAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ClearFormatsAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetTableOptionsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TableOptions,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetFormatsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CellFormat,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]})}();Microsoft.Office.WebExtension.Table={All:0,Data:1,Headers:2},function(){var u="undefined",e="auto fit",o="distributed",f="none";OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearFormatsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetTableOptionsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetFormatsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:2},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.Data,value:2},{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:3},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:4},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:5}]});var s={headerRow:0,bandedRows:1,firstColumn:2,lastColumn:3,bandedColumns:4,filterButton:5,style:6,totalRow:7},h={row:0,column:1},t={alignHorizontal:{text:"alignHorizontal",type:1},alignVertical:{text:"alignVertical",type:2},backgroundColor:{text:"backgroundColor",type:101},borderStyle:{text:"borderStyle",type:201},borderColor:{text:"borderColor",type:202},borderTopStyle:{text:"borderTopStyle",type:203},borderTopColor:{text:"borderTopColor",type:204},borderBottomStyle:{text:"borderBottomStyle",type:205},borderBottomColor:{text:"borderBottomColor",type:206},borderLeftStyle:{text:"borderLeftStyle",type:207},borderLeftColor:{text:"borderLeftColor",type:208},borderRightStyle:{text:"borderRightStyle",type:209},borderRightColor:{text:"borderRightColor",type:210},borderOutlineStyle:{text:"borderOutlineStyle",type:211},borderOutlineColor:{text:"borderOutlineColor",type:212},borderInlineStyle:{text:"borderInlineStyle",type:213},borderInlineColor:{text:"borderInlineColor",type:214},fontFamily:{text:"fontFamily",type:301},fontStyle:{text:"fontStyle",type:302},fontSize:{text:"fontSize",type:303},fontUnderlineStyle:{text:"fontUnderlineStyle",type:304},fontColor:{text:"fontColor",type:305},fontDirection:{text:"fontDirection",type:306},fontStrikethrough:{text:"fontStrikethrough",type:307},fontSuperscript:{text:"fontSuperscript",type:308},fontSubscript:{text:"fontSubscript",type:309},fontNormal:{text:"fontNormal",type:310},indentLeft:{text:"indentLeft",type:401},indentRight:{text:"indentRight",type:402},numberFormat:{text:"numberFormat",type:501},width:{text:"width",type:701},height:{text:"height",type:702},wrapping:{text:"wrapping",type:703}},r=[{name:f,value:0},{name:"thin",value:1},{name:"medium",value:2},{name:"dashed",value:3},{name:"dotted",value:4},{name:"thick",value:5},{name:"double",value:6},{name:"hair",value:7},{name:"medium dashed",value:8},{name:"dash dot",value:9},{name:"medium dash dot",value:10},{name:"dash dot dot",value:11},{name:"medium dash dot dot",value:12},{name:"slant dash dot",value:13}],i=[{name:f,value:0},{name:"black",value:1},{name:"blue",value:2},{name:"gray",value:3},{name:"green",value:4},{name:"orange",value:5},{name:"pink",value:6},{name:"purple",value:7},{name:"red",value:8},{name:"teal",value:9},{name:"turquoise",value:10},{name:"violet",value:11},{name:"white",value:12},{name:"yellow",value:13},{name:"automatic",value:14}],n=OSF.DDA.SafeArray.Delegate.ParameterMap;n.define({type:t.alignHorizontal.text,toHost:[{name:"general",value:0},{name:"left",value:1},{name:"center",value:2},{name:"right",value:3},{name:"fill",value:4},{name:"justify",value:5},{name:"center across selection",value:6},{name:o,value:7}]});n.define({type:t.alignVertical.text,toHost:[{name:"top",value:0},{name:"center",value:1},{name:"bottom",value:2},{name:"justify",value:3},{name:o,value:4}]});n.define({type:t.backgroundColor.text,toHost:i});n.define({type:t.borderStyle.text,toHost:r});n.define({type:t.borderColor.text,toHost:i});n.define({type:t.borderTopStyle.text,toHost:r});n.define({type:t.borderTopColor.text,toHost:i});n.define({type:t.borderBottomStyle.text,toHost:r});n.define({type:t.borderBottomColor.text,toHost:i});n.define({type:t.borderLeftStyle.text,toHost:r});n.define({type:t.borderLeftColor.text,toHost:i});n.define({type:t.borderRightStyle.text,toHost:r});n.define({type:t.borderRightColor.text,toHost:i});n.define({type:t.borderOutlineStyle.text,toHost:r});n.define({type:t.borderOutlineColor.text,toHost:i});n.define({type:t.borderInlineStyle.text,toHost:r});n.define({type:t.borderInlineColor.text,toHost:i});n.define({type:t.fontStyle.text,toHost:[{name:"regular",value:0},{name:"italic",value:1},{name:"bold",value:2},{name:"bold italic",value:3}]});n.define({type:t.fontUnderlineStyle.text,toHost:[{name:f,value:0},{name:"single",value:1},{name:"double",value:2},{name:"single accounting",value:3},{name:"double accounting",value:4}]});n.define({type:t.fontColor.text,toHost:i});n.define({type:t.fontDirection.text,toHost:[{name:"context",value:0},{name:"left-to-right",value:1},{name:"right-to-left",value:2}]});n.define({type:t.width.text,toHost:[{name:e,value:-1}]});n.define({type:t.height.text,toHost:[{name:e,value:-1}]});n.define({type:Microsoft.Office.WebExtension.Parameters.TableOptions,toHost:[{name:"headerRow",value:0},{name:"bandedRows",value:1},{name:"firstColumn",value:2},{name:"lastColumn",value:3},{name:"bandedColumns",value:4},{name:"filterButton",value:5},{name:"style",value:6},{name:"totalRow",value:7}]});n.dynamicTypes[Microsoft.Office.WebExtension.Parameters.CellFormat]={toHost:function(t){for(var i in t)t[i].format&&(t[i].format=n.doMapValues(t[i].format,"toHost"));return t},fromHost:function(n){return n}};n.setDynamicType(Microsoft.Office.WebExtension.Parameters.CellFormat,{toHost:function(n){var c="cells",y="format",w=0,b=1,p=[],l,i,r,f,e,o,a,v,s;for(l in n){if(i=n[l],r=[],typeof i[c]!==u){if(f=i[c],typeof i[c]=="object"){e=[];for(o in f)typeof h[o]!==u&&(e[h[o]]=f[o])}else e=f;r[w]=e}if(i[y]){a=i[y];v=[];for(s in a)typeof t[s]!==u&&v.push([t[s].type,a[s]]);r[b]=v}p[l]=r}return p},fromHost:function(n){return n}});n.setDynamicType(Microsoft.Office.WebExtension.Parameters.TableOptions,{toHost:function(n){var i=[];for(var t in n)typeof s[t]!==u&&(i[s[t]]=n[t]);return i},fromHost:function(n){return n}})}(),function(n){var t;(function(t){var u=function(){function r(){var n=this,t=n;n._pseudoDocument=u;n._eventDispatch=u;n._processAppCommandInvocation=function(n){var i=t._verifyManifestCallback(n.callbackName),r;if(i.errorCode!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){t._invokeAppCommandCompletedMethod(n.appCommandId,i.errorCode,"");return}r=t._constructEventObjectForCallback(n);r?window.setTimeout(function(){i.callback(r)},0):t._invokeAppCommandCompletedMethod(n.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"")}}var f="object",e="string",u=null;return r.initializeOsfDda=function(){OSF.DDA.AsyncMethodNames.addNames({AppCommandInvocationCompletedAsync:"appCommandInvocationCompletedAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[e]},{name:Microsoft.Office.WebExtension.Parameters.Status,types:["number"]},{name:Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData,types:[e]}]});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{AppCommandInvokedEvent:"AppCommandInvokedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppCommandInvoked:"appCommandInvoked"});OSF.OUtil.setNamespace("AppCommand",OSF.DDA);OSF.DDA.AppCommand.AppCommandInvokedEventArgs=n.AppCommand.AppCommandInvokedEventArgs},r.prototype.initializeAndChangeOnce=function(n){var i=this,r;t.registerDdaFacade();i._pseudoDocument={};OSF.DDA.DispIdHost.addAsyncMethods(i._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync]);i._eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked]);r=function(t){n&&(t.status=="succeeded"?n(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):n(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError))};OSF.DDA.DispIdHost.addEventSupport(i._pseudoDocument,i._eventDispatch);i._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,i._processAppCommandInvocation,r)},r.prototype._verifyManifestCallback=function(n){var s="function",e={callback:u,errorCode:OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback},o;n=n.trim();try{for(var t=n.split("."),i=window,r=0;r0},enumerable:!0,configurable:!0}),t.prototype._getLastAction=function(){return this.m_actions[this.m_actions.length-1]},t.prototype.addTrace=function(n,t){this.m_traceInfos[n]=t},t.prototype.ensureInstantiateObjectPath=function(t){if(t){if(this.m_instantiatedObjectPaths[t.objectPathInfo.Id])return;if(this.ensureInstantiateObjectPath(t.parentObjectPath),this.ensureInstantiateObjectPaths(t.argumentObjectPaths),!this.m_instantiatedObjectPaths[t.objectPathInfo.Id]){var r={Id:this.m_context._nextId(),ActionType:1,Name:"",ObjectPathId:t.objectPathInfo.Id},i=new n.Action(r,!1,!1);i.referencedObjectPath=t;this.addAction(i)}}},t.prototype.ensureInstantiateObjectPaths=function(n){if(n)for(var t=0;t=0;--r)if(i=n[r],u=i.actionInfo.Id,i.referencedObjectPath&&t._updateLastUsedActionIdOfObjectPathId(e,i.referencedObjectPath,u),o=i.referencedArgumentObjectPaths,o)for(v=o.length,s=0;s0?i.actionInfo.L=c:i.actionInfo.L&&delete i.actionInfo.L},t}();n.ClientRequest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;n._internalConfig={showDisposeInfoInDebugInfo:!1,enableEarlyDispose:!0,alwaysPolyfillClientObjectRetrieveMethod:!1};t=function(){function t(){}return t.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},t.prototype._createRequestExecutorOrNull=function(){return null},Object.defineProperty(t.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),t}();n.SessionBase=t;i=function(){function i(r){if(this.m_customRequestHeaders={},this._onRunFinishedNotifiers=[],this.m_nextId=0,i._overrideSession)this.m_requestUrlAndHeaderInfoResolver=i._overrideSession;else if((n.Utility.isNullOrUndefined(r)||typeof r=="string"&&r.length===0)&&(r=i.defaultRequestUrlAndHeaders,r||(r={url:n.Constants.localDocument,headers:{}})),typeof r=="string")this.m_requestUrlAndHeaderInfo={url:r,headers:{}};else if(i.isRequestUrlAndHeaderInfoResolver(r))this.m_requestUrlAndHeaderInfoResolver=r;else if(i.isRequestUrlAndHeaderInfo(r)){var u=r;this.m_requestUrlAndHeaderInfo={url:u.url,headers:{}};n.Utility._copyHeaders(u.headers,this.m_requestUrlAndHeaderInfo.headers)}else throw n._Internal.RuntimeError._createInvalidArgError("url");this.m_requestUrlAndHeaderInfoResolver instanceof t&&(this.m_session=this.m_requestUrlAndHeaderInfoResolver);this._processingResult=!1;this._customData=n.Constants.iterativeExecutor;this.sync=this.sync.bind(this)}return Object.defineProperty(i.prototype,"session",{get:function(){return this.m_session},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"eventRegistration",{get:function(){return this.m_session?this.m_session.eventRegistration:n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_url",{get:function(){return this.m_requestUrlAndHeaderInfo?this.m_requestUrlAndHeaderInfo.url:null},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_pendingRequest",{get:function(){return this.m_pendingRequest==null&&(this.m_pendingRequest=new n.ClientRequest(this)),this.m_pendingRequest},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"debugInfo",{get:function(){var t=new n.RequestPrettyPrinter(this._rootObjectPropertyName,this._pendingRequest._objectPaths,this._pendingRequest._actions,n._internalConfig.showDisposeInfoInDebugInfo),i=t.process();return{pendingStatements:i}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"trackedObjects",{get:function(){return this.m_trackedObjects||(this.m_trackedObjects=new n.TrackedObjects(this)),this.m_trackedObjects},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"requestHeaders",{get:function(){return this.m_customRequestHeaders},enumerable:!0,configurable:!0}),i.prototype.load=function(t,r){n.Utility.validateContext(this,t);var u=i._parseQueryOption(r),f=n.ActionFactory.createQueryAction(this,t,u);this._pendingRequest.addActionResultHandler(f,t)},i.isLoadOption=function(t){if(!n.Utility.isUndefined(t.select)&&(typeof t.select=="string"||Array.isArray(t.select))||!n.Utility.isUndefined(t.expand)&&(typeof t.expand=="string"||Array.isArray(t.expand))||!n.Utility.isUndefined(t.top)&&typeof t.top=="number"||!n.Utility.isUndefined(t.skip)&&typeof t.skip=="number")return!0;for(var i in t)return!1;return!0},i.parseStrictLoadOption=function(n){var t={Select:[]};return i.parseStrictLoadOptionHelper(t,"","option",n),t},i.combineQueryPath=function(n,t,i){return n.length===0?t:n+i+t},i.parseStrictLoadOptionHelper=function(t,r,u,f){var e,o;for(e in f)if(o=f[e],e==="$all"){if(typeof o!="boolean")throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));o&&t.Select.push(i.combineQueryPath(r,"*","/"))}else if(e==="$top"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));t.Top=o}else if(e==="$skip"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));t.Skip=o}else if(typeof o=="boolean")o&&t.Select.push(i.combineQueryPath(r,e,"/"));else if(typeof o=="object")i.parseStrictLoadOptionHelper(t,i.combineQueryPath(r,e,"/"),i.combineQueryPath(u,e,"."),o);else throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));},i._parseQueryOption=function(t){var u={},f,r;if(typeof t=="string")f=t,u.Select=n.Utility._parseSelectExpand(f);else if(Array.isArray(t))u.Select=t;else if(typeof t=="object")if(r=t,i.isLoadOption(r)){if(typeof r.select=="string")u.Select=n.Utility._parseSelectExpand(r.select);else if(Array.isArray(r.select))u.Select=r.select;else if(!n.Utility.isNullOrUndefined(r.select))throw n._Internal.RuntimeError._createInvalidArgError("option.select");if(typeof r.expand=="string")u.Expand=n.Utility._parseSelectExpand(r.expand);else if(Array.isArray(r.expand))u.Expand=r.expand;else if(!n.Utility.isNullOrUndefined(r.expand))throw n._Internal.RuntimeError._createInvalidArgError("option.expand");if(typeof r.top=="number")u.Top=r.top;else if(!n.Utility.isNullOrUndefined(r.top))throw n._Internal.RuntimeError._createInvalidArgError("option.top");if(typeof r.skip=="number")u.Skip=r.skip;else if(!n.Utility.isNullOrUndefined(r.skip))throw n._Internal.RuntimeError._createInvalidArgError("option.skip");}else u=i.parseStrictLoadOption(t);else if(!n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError("option");return u},i.prototype.loadRecursive=function(t,r,u){var f,e,o;if(!n.Utility.isPlainJsonObject(r))throw n._Internal.RuntimeError._createInvalidArgError("options");f={};for(e in r)f[e]=i._parseQueryOption(r[e]);o=n.ActionFactory.createRecursiveQueryAction(this,t,{Queries:f,MaxDepth:u});this._pendingRequest.addActionResultHandler(o,t)},i.prototype.trace=function(t){n.ActionFactory.createTraceAction(this,t,!0)},i.prototype._processOfficeJsErrorResponse=function(n,t){},i.prototype.syncPrivateMain=function(){var t=this;return n.Utility._createPromiseFromResult(null).then(function(){if(!t.m_requestUrlAndHeaderInfo)return t.m_requestUrlAndHeaderInfoResolver._resolveRequestUrlAndHeaderInfo().then(function(i){if(t.m_requestUrlAndHeaderInfo=i,t.m_requestUrlAndHeaderInfo||(t.m_requestUrlAndHeaderInfo={url:n.Constants.localDocument,headers:{}}),n.Utility.isNullOrEmptyString(t.m_requestUrlAndHeaderInfo.url)&&(t.m_requestUrlAndHeaderInfo.url=n.Constants.localDocument),t.m_requestUrlAndHeaderInfo.headers||(t.m_requestUrlAndHeaderInfo.headers={}),typeof t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull=="function"){var r=t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull();r&&(t._requestExecutor=r)}})}).then(function(){var n=t._pendingRequest;return t.m_pendingRequest=null,t.processPreSyncPromises(n).then(function(){return t.syncPrivate(n)})})},i.prototype.syncPrivate=function(t){var f=this,e,o,s,u,h,r,i;return t.hasActions?(e=t.buildRequestMessageBody(),o=t.flags,this._requestExecutor||(this._requestExecutor=n.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)?new n.OfficeJsRequestExecutor(this):new n.HttpRequestExecutor),s=this._requestExecutor,u={},n.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,u),n.Utility._copyHeaders(this.m_customRequestHeaders,u),h={Url:this.m_requestUrlAndHeaderInfo.url,Headers:u,Body:e},t.invalidatePendingInvalidObjectPaths(),r=null,i=null,this._lastSyncStart=performance.now(),s.executeAsync(this._customData,o,h).then(function(u){return f._lastSyncEnd=performance.now(),r=f.processRequestExecutorResponseMessage(t,u),f.processPendingEventHandlers(t).catch(function(t){n.Utility.log("Error in processPendingEventHandlers");n.Utility.log(JSON.stringify(t));i=t})}).then(function(){var u,f;if(r){n.Utility.log("Throw error from response: "+JSON.stringify(r));throw r;}if(i){n.Utility.log("Throw error from ProcessEventHandler: "+JSON.stringify(i));u=null;i instanceof n._Internal.RuntimeError?(u=i,u.traceMessages=t._responseTraceMessages):(f=null,f=typeof i=="string"?i:i.message,n.Utility.isNullOrEmptyString(f)&&(f=n.Utility._getResourceString(n.ResourceStrings.cannotRegisterEvent)),u=new n._Internal.RuntimeError({code:n.ErrorCodes.cannotRegisterEvent,message:f,traceMessages:t._responseTraceMessages}));throw u;}})):this.processPendingEventHandlers(t)},i.prototype.processRequestExecutorResponseMessage=function(t,i){var e,r,o,u,f;if(i.Body&&i.Body.TraceIds&&t._setResponseTraceIds(i.Body.TraceIds),e=t._responseTraceMessages,r=null,i.Body&&(i.Body.Error&&i.Body.Error.ActionIndex>=0&&(o=new n.RequestPrettyPrinter(this._rootObjectPropertyName,t._objectPaths,t._actions),r=o.processForDebugStatementInfo(i.Body.Error.ActionIndex)),u=null,i.Body.Results?u=i.Body.Results:i.Body.ProcessedResults&&i.Body.ProcessedResults.Results&&(u=i.Body.ProcessedResults.Results),u)){this._processingResult=!0;try{t.processResponse(u)}finally{this._processingResult=!1}}if(n.Utility.isNullOrEmptyString(i.ErrorCode)){if(i.Body&&i.Body.Error)return f={errorLocation:i.Body.Error.Location},r&&(f.statement=r.statement,f.surroundingStatements=r.surroundingStatements),new n._Internal.RuntimeError({code:i.Body.Error.Code,message:i.Body.Error.Message,traceMessages:e,debugInfo:f})}else return new n._Internal.RuntimeError({code:i.ErrorCode,message:i.ErrorMessage,traceMessages:e});return null},i.prototype.processPendingEventHandlers=function(t){for(var u,i=n.Utility._createPromiseFromResult(null),r=0;r0&&(typeof r[0]=="string"||i.isRequestUrlAndHeaderInfo(r[0])||i.isRequestUrlAndHeaderInfoResolver(r[0]))&&(y=r[0],h=1),r.length==h+1)l=u,v=r[h+0];else if(r.length==h+2){if(n.Utility.isNullOrUndefined(r[h+0]))l=u;else if(r[h+0]instanceof n.ClientObject)l=function(){return r[h+0].context};else if(r[h+0]instanceof i)l=function(){return r[h+0]};else if(Array.isArray(r[h+0])){if(c=r[h+0],c.length==0)return i.createErrorPromise(t);for(a=0;a0){var n=c._onRunFinishedNotifiers.shift();n()}if(a)return l;else throw l;})},i.prototype._nextId=function(){return++this.m_nextId},i}();n.ClientRequestContext=i}(OfficeExtension||(OfficeExtension={})),function(n){var i=function(){function t(n){this.m_type=n}return Object.defineProperty(t.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){(this.m_isLoaded=!0,typeof t=="object"&&t&&t._IsNull)||(this.m_value=this.m_type===1?n.Utility.adjustToDateTime(t):t)},t}(),t;n.ClientResult=i;t=function(){function t(n,t){this.m_proxy=n;this.m_shouldPolyfill=t}return Object.defineProperty(t.prototype,"proxy",{get:function(){return this.m_proxy},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"retrieveResult.data"}});return this.m_data},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(n){if(this.m_isLoaded=!0,typeof n=="object"&&n&&n._IsNull){this.m_data=null;return}this.m_data=this.m_shouldPolyfill?this.changePropertyNameToCamelLowerCase(n):n},t.prototype.changePropertyNameToCamelLowerCase=function(t){var o=95,u,i,r,f,e;if(Array.isArray(t)){for(i=[],u=0;u0&&(r=!0),t=document.createElement("a"),t.href=this.m_url,r?t.hash=t.hash.length===0||t.hash==="#"?"#"+i:t.hash+"&"+i:t.search=t.search.length===0||t.search==="?"?"?"+i:t.search+"&"+i,t.href},f.prototype.init=function(){var t=this,i;return window.addEventListener("message",this.m_onMessageHandler),i=this._getIFrameSrc(),new n._Internal.OfficePromise(function(r,u){var f=document.createElement("iframe");t.m_options.id&&(f.id=t.m_options.id);f.style.height=t.m_options.height;f.style.width=t.m_options.width;f.src=i;t.m_options.container.appendChild(f);t.m_timeoutId=setTimeout(function(){t.close();var i=n.Utility.createRuntimeError(n.ErrorCodes.timeout,n.Utility._getResourceString(n.ResourceStrings.timeout),"EmbeddedSession.init");u(i)},t.m_options.timeoutInMilliseconds);t.m_promiseResolver=r})},f.prototype._invoke=function(n,t,u){if(!this.m_enabled){t(i.InternalError,null);return}r.invokeRequestModifier&&(u=r.invokeRequestModifier(u));this._sendMessageWithCallback(this.m_id++,n,u,function(n){r.invokeResponseModifier&&(n=r.invokeResponseModifier(n));var u=n.Error;delete n.Error;t(u||i.Success,n)})},f.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler);window.clearTimeout(this.m_timeoutId);this.m_enabled=!1},Object.defineProperty(f.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),f.prototype._createRequestExecutorOrNull=function(){return new e(this)},f.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},f.prototype._registerEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.RegisterEventCommand,{EventId:i,TargetId:r},function(){n(null)})})},f.prototype._unregisterEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.UnregisterEventCommand,{EventId:i,TargetId:r},function(){n()})})},f.prototype._onMessage=function(n){var u=this,i,e,r,o,s;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===n.source&&this.m_chosenOrigin===n.origin)){if(i=n.data,i&&i[t.CommandKey]===t.ApiReadyCommand){!this.m_chosenWindow&&this._isValidDescendant(n.source)&&i[t.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=n.source,this.m_chosenOrigin=n.origin,this._sendMessageWithCallback(this.m_id++,t.GetAppContextCommand,null,function(n){u._setupContext(n);window.clearTimeout(u.m_timeoutId);u.m_promiseResolver()}));return}if(i&&i[t.CommandKey]===t.FireEventCommand){var f=i[t.ParamsKey],h=f.EventId,c=f.TargetId,l=f.Data;if(this.m_sessionEventManager)for(e=this.m_sessionEventManager.getHandlers(h,c),r=0;r=0;o--)if(r[o]===e[i].handler){r.splice(o,1);break}break;case 2:r=[];break}}return s&&(!this.m_registered&&r.length>0?u=u.then(function(){return f.m_eventInfo.registerFunc(f.m_callback)}).then(function(){return f.m_registered=!0}):this.m_registered&&r.length==0&&(u=u.then(function(){return f.m_eventInfo.unregisterFunc(f.m_callback)}).catch(function(t){n.Utility.log("Error when unregister event: "+JSON.stringify(t))}).then(function(){return f.m_registered=!1})),u=u.then(function(){return f.m_handlers=r})),u},t.prototype.fireEvent=function(t){for(var u,f,r=[],i=0;i=0;e--)if(f[e]===u){f.splice(e,1);break}return f.length===0?this.m_unregisterEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i}();n.EventRegistration=i}(OfficeExtension||(OfficeExtension={})),function(n){function r(n){t._testReadyImpl=n}function u(n){t.getGenericEventRegistration()._handleRichApiMessage(n)}var t=function(){function t(){this.m_eventRegistration=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this));this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this)}return t.prototype.ready=function(){var i=this;return this.m_ready||(this.m_ready=t._testReadyImpl?t._testReadyImpl().then(function(){i.m_isReady=!0}):n._Internal.officeJsEventRegistration.register(5,"",this.m_richApiMessageHandler).then(function(){i.m_isReady=!0})),this.m_ready},Object.defineProperty(t.prototype,"isReady",{get:function(){return this.m_isReady},enumerable:!0,configurable:!0}),t.prototype.register=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.register(n,t,i)})},t.prototype.unregister=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.unregister(n,t,i)})},t.prototype._registerEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._unregisterEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._handleRichApiMessage=function(t){var r,i,u,e,f;if(t&&t.entries)for(r=0;r0))for(e=JSON.parse(i.message),i.isRemoteOverride&&(e.source=n.Constants.eventSourceRemote),f=0;f=0;u--)if(n[u]===i){n.splice(u,1);break}n.length==0&&t.getGenericEventRegistration().unregister(r.m_genericEventInfo.eventType,r.m_genericEventInfo.getTargetIdFunc(),r._callback)})},r.prototype.removeAll=function(){},r}(n.EventHandlers);n.GenericEventHandlers=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var s=JSON.stringify(u.Body),f=u.Url,e,o;if(f.charAt(f.length-1)!="/"&&(f=f+"/"),f=f+n.Constants.processQuery,f=f+"?"+n.Constants.flags+"="+r.toString(),e={method:"POST",url:f,headers:{},body:s},e.headers[n.Constants.sourceLibHeader]=t.SourceLibHeaderValue,e.headers["CONTENT-TYPE"]="application/json",u.Headers)for(o in u.Headers)e.headers[o]=u.Headers[o];return n.HttpUtility.sendRequest(e).then(function(t){var i,r;return t.statusCode===200?i={ErrorCode:null,ErrorMessage:null,Headers:t.headers,Body:JSON.parse(t.body)}:(n.Utility.log("Error Response:"+t.body),r=n.Utility._parseErrorResponse(t),i={ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:t.headers,Body:null}),i})},t.SourceLibHeaderValue="officejs-rest",t}();n.HttpRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.setCustomSendRequestFunc=function(n){t.s_customSendRequestFunc=n},t.xhrSendRequestFunc=function(t){return new n._Internal.OfficePromise(function(i,r){var u=new XMLHttpRequest,f;if(u.open(t.method,t.url),u.onload=function(){var t={statusCode:u.status,headers:n.Utility._parseHttpResponseHeaders(u.getAllResponseHeaders()),body:u.responseText};i(t)},u.onerror=function(){r(new n._Internal.RuntimeError({code:n.ErrorCodes.connectionFailure,message:n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,u.statusText)}))},t.headers)for(f in t.headers)u.setRequestHeader(f,t.headers[f]);u.send(t.body)})},t.sendRequest=function(n){t.validateAndNormalizeRequest(n);var i=t.s_customSendRequestFunc;return i||(i=t.xhrSendRequestFunc),i(n)},t.setCustomSendLocalDocumentRequestFunc=function(n){t.s_customSendLocalDocumentRequestFunc=n},t.sendLocalDocumentRequest=function(n){t.validateAndNormalizeRequest(n);var i;return i=t.s_customSendLocalDocumentRequestFunc||t.officeJsSendLocalDocumentRequestFunc,i(n)},t.officeJsSendLocalDocumentRequestFunc=function(t){t=n.Utility._validateLocalDocumentRequest(t);var i=n.Utility._buildRequestMessageSafeArray(t);return new n._Internal.OfficePromise(function(t,r){OSF.DDA.RichApi.executeRichApiRequestAsync(i,function(i){var r;r=i.status=="succeeded"?{statusCode:n.RichApiMessageUtility.getResponseStatusCode(i),headers:n.RichApiMessageUtility.getResponseHeaders(i),body:n.RichApiMessageUtility.getResponseBody(i)}:n.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(i.error.code,i.error.message);n.Utility.log(JSON.stringify(r));t(r)})})},t.validateAndNormalizeRequest=function(t){if(n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"request"});n.Utility.isNullOrEmptyString(t.method)&&(t.method="GET");t.method=t.method.toUpperCase()},t.logRequest=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Request---"),n.Utility.log(i.method+" "+i.url),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t.logResponse=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Response---"),n.Utility.log(""+i.statusCode),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t._logBody=!1,t}();n.HttpUtility=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_clientObject=n}return n.prototype._handleResult=function(n){this.m_clientObject._handleIdResult(n)},n}();n.InstantiateActionResultHandler=t}(OfficeExtension||(OfficeExtension={})),function(n){}(OfficeExtension||(OfficeExtension={})),function(n){var u=function(){function t(n){this.m_session=n}return t.prototype.executeAsync=function(t,r,u){var e={url:n.Constants.processQuery,method:"POST",headers:u.Headers,body:u.Body},f={id:i.nextId(),type:1,flags:r,message:e};return n.Utility.log(JSON.stringify(f)),this.m_session.sendMessageToHost(f).then(function(t){var i,r,u;return n.Utility.log("Received response: "+JSON.stringify(t)),i=t.message,i.statusCode===200?r={ErrorCode:null,ErrorMessage:null,Headers:i.headers,Body:i.body}:(n.Utility.log("Error Response:"+i.body),u=n.Utility._parseErrorResponse(i),r={ErrorCode:u.errorCode,ErrorMessage:u.errorMessage,Headers:i.headers,Body:null}),r})},t}(),i=function(i){function r(n){var t=this;i.call(this);this.m_promiseResolver={};this.m_bridge=n;this.m_bridge.onMessageFromHost=function(n){t.onMessageFromHost(n)}}return __extends(r,i),r.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},r.prototype._createRequestExecutorOrNull=function(){return n.Utility.log("NativeBridgeSession::CreateRequestExecutor"),new u(this)},Object.defineProperty(r.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),r.init=function(t){if(t&&typeof t=="object"){var i=new r(t);n.ClientRequestContext._overrideSession=i;n.HttpUtility.setCustomSendLocalDocumentRequestFunc(function(n){var t={id:r.nextId(),type:1,flags:0,message:n};return i.sendMessageToHost(t).then(function(n){return n.message})})}},r.prototype.sendMessageToHost=function(t){var i=this;return this.m_bridge.sendMessageToHost(JSON.stringify(t)),new n._Internal.OfficePromise(function(n,r){i.m_promiseResolver[t.id]=n})},r.prototype.onMessageFromHost=function(n){var i,r;n==="test"?t._testFunc&&t._testFunc():(i=JSON.parse(n),typeof i.id=="number"&&(r=this.m_promiseResolver[i.id],r&&r(i),delete this.m_promiseResolver[i.id]))},r.nextId=function(){return r.s_nextId++},r.s_nextId=1,r}(n.SessionBase),r=function(){function n(){}return n.init=function(n){i.init(n)},n}(),t;n.HostBridge=r;typeof _richApiNativeBridge=="object"&&_richApiNativeBridge&&r.init(_richApiNativeBridge);t=function(){function n(){}return n.setTestFunc=function(t){n._testFunc=t},n}();n.HostBridgeTest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){this.m_objectPathInfo=n;this.m_parentObjectPath=t;this.m_isWriteOperation=!1;this.m_isCollection=i;this.m_isInvalidAfterRequest=r;this.m_isValid=!0}return Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},set:function(n){this.m_isWriteOperation=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRestrictedResourceAccess",{get:function(){return this.m_isRestrictedResourceAccess},set:function(n){this.m_isRestrictedResourceAccess=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(n){this.m_argumentObjectPaths=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(n){this.m_isValid=n;!n&&this.m_objectPathInfo.ObjectPathType===6&&this.m_savedObjectPathInfo&&(t.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(n){this.m_getByIdMethodName=n},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null},t.prototype.updateUsingObjectData=function(i){var e=i[n.Constants.referenceId],f,o,u,r;if(!n.Utility.isNullOrEmptyString(e)){this.m_savedObjectPathInfo||this.isInvalidAfterRequest||!t.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)||(f={},t.copyObjectPathInfo(this.m_objectPathInfo,f),this.m_savedObjectPathInfo={pathInfo:f,parent:this.m_parentObjectPath});this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=e;this.m_objectPathInfo.ArgumentInfo={};delete this.m_objectPathInfo.ParentObjectPathId;this.m_parentObjectPath=null;this.m_argumentObjectPaths=null;return}if(o=this.parentObjectPath&&this.parentObjectPath.isCollection,u=this.getByIdMethodName,(o||!n.Utility.isNullOrEmptyString(u))&&(r=i[n.Constants.id],n.Utility.isNullOrUndefined(r)&&(r=i[n.Constants.idPrivate]),!n.Utility.isNullOrUndefined(r))){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;n.Utility.isNullOrEmptyString(u)?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=u,this.m_getByIdMethodName=null);this.isWriteOperation=!1;this.m_objectPathInfo.ArgumentInfo={};this.m_objectPathInfo.ArgumentInfo.Arguments=[r];this.m_argumentObjectPaths=null;return}},t.isRestorableObjectPath=function(n){return n===1||n===5||n===3||n===4},t.copyObjectPathInfo=function(n,t){t.Id=n.Id;t.ArgumentInfo=n.ArgumentInfo;t.Name=n.Name;t.ObjectPathType=n.ObjectPathType;t.ParentObjectPathId=n.ParentObjectPathId},t}();n.ObjectPath=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createGlobalObjectObjectPath=function(t){var i={Id:t._nextId(),ObjectPathType:1,Name:""};return new n.ObjectPath(i,null,!1,!1)},t.createNewObjectObjectPath=function(t,i,r,u){var e={Id:t._nextId(),ObjectPathType:2,Name:i},f=new n.ObjectPath(e,null,r,!1);return f.isRestrictedResourceAccess=u,f},t.createPropertyObjectPath=function(t,i,r,u,f,e){var s={Id:t._nextId(),ObjectPathType:4,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id},o=new n.ObjectPath(s,i._objectPath,u,f);return o.isRestrictedResourceAccess=e,o},t.createIndexerObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i._objectPath,!1,!1)},t.createIndexerObjectPathUsingParentPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i,!1,!1)},t.createMethodObjectPath=function(t,i,r,u,f,e,o,s,h){var l={Id:t._nextId(),ObjectPathType:3,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},a=n.Utility.setMethodArguments(t,l.ArgumentInfo,f),c=new n.ObjectPath(l,i._objectPath,e,o);return c.argumentObjectPaths=a,c.isWriteOperation=u!=1,c.getByIdMethodName=s,c.isRestrictedResourceAccess=h,c},t.createReferenceIdObjectPath=function(t,i){var r={Id:t._nextId(),ObjectPathType:6,Name:i,ArgumentInfo:{}};return new n.ObjectPath(r,null,!1,!1)},t.createChildItemObjectPathUsingIndexerOrGetItemAt=function(i,r,u,f,e){var o=f[n.Constants.id];return n.Utility.isNullOrUndefined(o)&&(o=f[n.Constants.idPrivate]),i&&!n.Utility.isNullOrUndefined(o)?t.createChildItemObjectPathUsingIndexer(r,u,f):t.createChildItemObjectPathUsingGetItemAt(r,u,f,e)},t.createChildItemObjectPathUsingIndexer=function(t,i,r){var f=r[n.Constants.id],u;return n.Utility.isNullOrUndefined(f)&&(f=r[n.Constants.idPrivate]),u=u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u.ArgumentInfo.Arguments=[f],new n.ObjectPath(u,i._objectPath,!1,!1)},t.createChildItemObjectPathUsingGetItemAt=function(t,i,r,u){var e=r[n.Constants.index],f;return e&&(u=e),f={Id:t._nextId(),ObjectPathType:3,Name:n.Constants.getItemAt,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f.ArgumentInfo.Arguments=[u],new n.ObjectPath(f,i._objectPath,!1,!1)},t}();n.ObjectPathFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_context=n}return t.prototype.executeAsync=function(i,r,u){var f=this,e=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n._Internal.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(e,function(i){n.Utility.log("Response:");n.Utility.log(JSON.stringify(i));var r;i.status=="succeeded"?r=n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBody(i),n.RichApiMessageUtility.getResponseHeaders(i)):(r=n.RichApiMessageUtility.buildResponseOnError(i.error.code,i.error.message),f.m_context._processOfficeJsErrorResponse(i.error.code,r));t(r)})})},t.SourceLibHeaderValue="officejs",t}();n.OfficeJsRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){n.OfficeRequire=function(){return null}()})(t=n._Internal||(n._Internal={})),function(n){var t;(function(t){function i(){return function(){"use strict";function vt(n){return typeof n=="function"||typeof n=="object"&&n!==null}function b(n){return typeof n=="function"}function yt(n){return typeof n=="object"&&n!==null}function wt(n){k=n}function bt(n){f=n}function ni(){var t=process.nextTick,n=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&n[1]==="0"&&n[2]==="10"&&(t=setImmediate),function(){t(c)}}function tr(){return function(){pt(c)}}function ti(){var n=0,i=new it(c),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function ii(){var n=new MessageChannel;return n.port1.onmessage=c,function(){n.port2.postMessage(0)}}function ri(){return function(){setTimeout(c,1)}}function c(){for(var t,i,n=0;n=0?(n=n.substring(t+5,n.length),n<"14.14393"?!0:!1):!1}function i(){return typeof window=="undefined"&&typeof Promise=="function"?Promise:typeof window!="undefined"&&window.Promise?t()?n.PromiseImpl.Init():window.Promise:n.PromiseImpl.Init()}n.OfficePromise=i()}(t=n._Internal||(n._Internal={}));i=t.OfficePromise;n.Promise=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this._autoCleanupList={};this.m_context=n}return t.prototype.add=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._addCommon(n,!0)}):this._addCommon(n,!0)},t.prototype._autoAdd=function(n){this._addCommon(n,!1);this._autoCleanupList[n._objectPath.objectPathInfo.Id]=n},t.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(t,i){var r=this.m_context._autoCleanup&&!t[n.Constants.isTracked]&&t!==this.m_context._rootObject&&i&&!n.Utility.isNullOrEmptyString(i[n.Constants.referenceId]);r&&(this._autoCleanupList[t._objectPath.objectPathInfo.Id]=t,t[n.Constants.isTracked]=!0)},t.prototype._addCommon=function(t,i){if(t[n.Constants.isTracked]){i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id];return}var r=t[n.Constants.referenceId];n.Utility.isNullOrEmptyString(r)&&t._KeepReference&&(t._KeepReference(),n.ActionFactory.createInstantiateAction(this.m_context,t),i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id],t[n.Constants.isTracked]=!0)},t.prototype.remove=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._removeCommon(n)}):this._removeCommon(n)},t.prototype._removeCommon=function(t){var r=t[n.Constants.referenceId],i;n.Utility.isNullOrEmptyString(r)||(i=this.m_context._rootObject,i._RemoveReference&&i._RemoveReference(r),delete t[n.Constants.isTracked])},t.prototype._retrieveAndClearAutoCleanupList=function(){var n=this._autoCleanupList;return this._autoCleanupList={},n},t}();n.TrackedObjects=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){n||(n="root");this.m_globalObjName=n;this.m_referencedObjectPaths=t;this.m_actions=i;this.m_statements=[];this.m_variableNameForObjectPathMap={};this.m_variableNameToObjectPathMap={};this.m_declaredObjectPathMap={};this.m_showDispose=r}return t.prototype.process=function(){this.m_showDispose&&n.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions);for(var t=0;t=0&&this.m_statements.length>i+o+1)break;if(i<0)return null;for(f=i-o,f<0&&(f=0),e=i+1+o,e>this.m_statements.length&&(e=this.m_statements.length),r=[],f!=0&&r.push("..."),s=f;s>>>>"),r.push(this.m_statements[i]),r.push("// <<<<<"),h=i+1;h0)?(r=i.map(function(n){return u.getObjVarName(n)}).join(", "),n+" // And then dispose {"+r+"}"):n},t.prototype.buildQueryExpression=function(n){if(n.actionInfo.QueryInfo){var t={};return t.select=n.actionInfo.QueryInfo.Select,t.expand=n.actionInfo.QueryInfo.Expand,t.skip=n.actionInfo.QueryInfo.Skip,t.top=n.actionInfo.QueryInfo.Top,typeof t.top=="undefined"&&typeof t.skip=="undefined"&&typeof t.expand=="undefined"?typeof t.select=="undefined"?"":JSON.stringify(t.select):JSON.stringify(t)}return""},t.prototype.buildObjectPathExpressionWithParent=function(n){var t=n.objectPathInfo.ObjectPathType==5||n.objectPathInfo.ObjectPathType==3||n.objectPathInfo.ObjectPathType==4;return t&&n.objectPathInfo.ParentObjectPathId?this.getObjVarName(n.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(n):this.buildObjectPathExpression(n)},t.prototype.buildObjectPathExpression=function(t){switch(t.objectPathInfo.ObjectPathType){case 1:return"context."+this.m_globalObjName;case 5:return"getItem("+this.buildArgumentsExpression(t.objectPathInfo.ArgumentInfo)+")";case 3:return n.Utility._toCamelLowerCase(t.objectPathInfo.Name)+"("+this.buildArgumentsExpression(t.objectPathInfo.ArgumentInfo)+")";case 2:return t.objectPathInfo.Name+".newObject()";case 7:return"null";case 4:return n.Utility._toCamelLowerCase(t.objectPathInfo.Name);case 6:return"context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(t.objectPathInfo.Name)+")"}},t.prototype.buildArgumentsExpression=function(n){var t="",i;if(!n.Arguments)return t;for(i=0;i0&&(t=t+", "),t=t+this.buildArgumentLiteral(n.Arguments[i],n.ReferencedObjectPathIds?n.ReferencedObjectPathIds[i]:null);return t==="undefined"&&(t=""),t},t.prototype.buildArgumentLiteral=function(n,t){return typeof n=="number"&&n===t?this.getObjVarName(t):JSON.stringify(n)},t.prototype.getObjVarNameBase=function(t){var u="v",f=this.m_referencedObjectPaths[t],i,r;switch(f.objectPathInfo.ObjectPathType){case 1:u=this.m_globalObjName;break;case 4:u=n.Utility._toCamelLowerCase(f.objectPathInfo.Name);break;case 3:i=f.objectPathInfo.Name;i.length>3&&i.substr(0,3)==="Get"&&(i=i.substr(3));u=n.Utility._toCamelLowerCase(i);break;case 5:r=this.getObjVarNameBase(f.objectPathInfo.ParentObjectPathId);u=r.charAt(r.length-1)==="s"?r.substr(0,r.length-1):r+"Item";break}return u},t.prototype.getObjVarName=function(n){var t,i;if(this.m_variableNameForObjectPathMap[n])return this.m_variableNameForObjectPathMap[n];if(t=this.getObjVarNameBase(n),!this.m_variableNameToObjectPathMap[t])return this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t;for(i=1;this.m_variableNameToObjectPathMap[t+i.toString()];)i++;return t=t+i.toString(),this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t},t}();n.RequestPrettyPrinter=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.cannotRegisterEvent="CannotRegisterEvent",n.connectionFailureWithStatus="ConnectionFailureWithStatus",n.connectionFailureWithDetails="ConnectionFailureWithDetails",n.invalidObjectPath="InvalidObjectPath",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.invalidArgumentGeneric="InvalidArgumentGeneric",n.propertyNotLoaded="PropertyNotLoaded",n.runMustReturnPromise="RunMustReturnPromise",n.timeout="Timeout",n.propertyDoesNotExist="PropertyDoesNotExist",n.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",n.moreInfoInnerError="MoreInfoInnerError",n.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",n.valueNotLoaded="ValueNotLoaded",n.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage",n.invalidOperationInCellEditMode="InvalidOperationInCellEditMode",n.customFunctionDefintionMissing="CustomFunctionDefintionMissing",n.customFunctionImplementationMissing="CustomFunctionImplementationMissing",n.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars",n.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit",n.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch",n.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing",n.apiNotFoundDetails="ApiNotFoundDetails",n}();n.ResourceStrings=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.CannotRegisterEvent="The event handler cannot be registered.",n.ConnectionFailureWithStatus="The request failed with status code of {0}.",n.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}",n.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",n.InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',n.InvalidRequestContext="Cannot use the object across different request contexts.",n.PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",n.RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',n.Timeout="The operation has timed out.",n.ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.',n.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.",n.InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.",n.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions.",n.CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.",n.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods.",n.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name.",n.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.",n.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.",n.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.",n}();n.ResourceStringValues=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.buildMessageArrayForIRequestExecutor=function(i,r,u,f){var o=JSON.stringify(u.Body),e;return n.Utility.log("Request:"),n.Utility.log(o),e={},e[n.Constants.sourceLibHeader]=f,t.buildRequestMessageSafeArray(i,r,"POST","ProcessQuery",e,o)},t.buildResponseOnSuccess=function(n,t){var i={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return i.Body=JSON.parse(n),i.Headers=t,i},t.buildResponseOnError=function(i,r){var u={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return u.ErrorCode=n.ErrorCodes.generalException,u.ErrorMessage=r,i==t.OfficeJsErrorCode_ooeNoCapability?u.ErrorCode=n.ErrorCodes.accessDenied:i==t.OfficeJsErrorCode_ooeActivityLimitReached?u.ErrorCode=n.ErrorCodes.activityLimitReached:i==t.OfficeJsErrorCode_ooeInvalidOrTimedOutSession&&(u.ErrorCode=n.ErrorCodes.invalidOrTimedOutSession,u.ErrorMessage=n.Utility._getResourceString(n.ResourceStrings.invalidOrTimedOutSessionMessage)),u},t.buildHttpResponseFromOfficeJsError=function(i,r){var f=500,u={};return u.error={},u.error.code=n.ErrorCodes.generalException,u.error.message=r,i===t.OfficeJsErrorCode_ooeNoCapability?(f=403,u.error.code=n.ErrorCodes.accessDenied):i===t.OfficeJsErrorCode_ooeActivityLimitReached&&(f=429,u.error.code=n.ErrorCodes.activityLimitReached),{statusCode:f,headers:{},body:JSON.stringify(u)}},t.buildRequestMessageSafeArray=function(n,t,i,r,u,f){var e=[],o;if(u)for(o in u)e.push(o),e.push(u[o]);var s=0,h="",c="",l="";return[n,i,r,e,f,s,t,h,c,l]},t.getResponseBody=function(n){return t.getResponseBodyFromSafeArray(n.value.data)},t.getResponseHeaders=function(n){return t.getResponseHeadersFromSafeArray(n.value.data)},t.getResponseBodyFromSafeArray=function(n){var t=n[2],i;return typeof t=="string"?t:(i=t,i.join(""))},t.getResponseHeadersFromSafeArray=function(n){var i=n[1],r,t;if(!i)return null;for(r={},t=0;t0&&f.push(i);return f},t.toJson=function(n,t,i,r){var e={},u,f;for(u in t)f=t[u],typeof f!="undefined"&&(e[u]=f);for(u in i)f=i[u],typeof f!="undefined"&&(e[u]=f.toJSON());return r&&(e.items=r.map(function(n){return n.toJSON()})),e},t.throwError=function(i,r,u){throw new n._Internal.RuntimeError({code:i,message:t._getResourceString(i,r),debugInfo:u?{errorLocation:u}:undefined});},t.createRuntimeError=function(t,i,r){return new n._Internal.RuntimeError({code:t,message:i,debugInfo:{errorLocation:r}})},t._getResourceString=function(i,r){var u,e,f,o;return typeof window!="undefined"&&window.Strings&&window.Strings.OfficeOM&&(e="L_"+i,f=window.Strings.OfficeOM[e],f&&(u=f)),u||(u=n.ResourceStringValues[i]),u||(u=i),t.isNullOrUndefined(r)||(Array.isArray(r)?(o=r,u=t._formatString(u,o)):u=u.replace("{0}",r)),u},t._formatString=function(t,i){return t.replace(/\{\d\}/g,function(t){var r=parseInt(t.substr(1,t.length-2));if(r0?".":"")+i;break;case 3:i=t.normalizeName(n.objectPathInfo.Name)+"()"+(i.length>0?".":"")+i;break;case 4:i=t.normalizeName(n.objectPathInfo.Name)+(i.length>0?".":"")+i;break;case 5:i="getItem()"+(i.length>0?".":"")+i;break;case 6:i="_reference()"+(i.length>0?".":"")+i;break}n=n.parentObjectPath}return i},t._createPromiseFromResult=function(t){return new n._Internal.OfficePromise(function(n,i){n(t)})},t._createTimeoutPromise=function(t){return new n._Internal.OfficePromise(function(n,i){setTimeout(function(){n(null)},t)})},t.promisify=function(t){return new n._Internal.OfficePromise(function(n,i){var r=function(t){t.status=="failed"?i(t.error):n(t.value)};t(r)})},t._addActionResultHandler=function(n,t,i){n.context._pendingRequest.addActionResultHandler(t,i)},t._handleNavigationPropertyResults=function(n,i,r){for(var u=0;u0},t._getLocalDocumentUrlPrefixLength=function(n){for(var i=["http://document.localhost","https://document.localhost","//document.localhost"],r=n.toLowerCase().trim(),t=0;t0))for(s=i.url.substr(f+1),e=s.split("&"),u=0;u0&&(f=i.substr(0,u),e=i.substr(u+1),f=t.trim(f),e=t.trim(e),s[f.toUpperCase()]=e));return s},t._parseErrorResponse=function(i){var r=null,f,e,u;if(t.isPlainJsonObject(i.body))r=i.body;else if(!t.isNullOrEmptyString(i.body)){f=t.trim(i.body);try{r=JSON.parse(f)}catch(o){t.log("Error when parse "+f)}}return!t.isNullOrUndefined(r)&&typeof r=="object"&&r.error?(u=r.error.code,e=t._getResourceString(n.ResourceStrings.connectionFailureWithDetails,[i.statusCode.toString(),r.error.code,r.error.message])):e=t._getResourceString(n.ResourceStrings.connectionFailureWithStatus,i.statusCode.toString()),t.isNullOrEmptyString(u)&&(u=n.ErrorCodes.connectionFailure),{errorCode:u,errorMessage:e}},t._copyHeaders=function(n,t){if(n&&t)for(var i in n)t[i]=n[i]},t._toCamelLowerCase=function(n){if(t.isNullOrEmptyString(n))return n;for(var i=0;i=65&&n.charCodeAt(i)<=90;)i++;return i0&&Array.isArray(i[0])&&i.length*i[0].length>s&&ht()){for(e=Math.max(1,Math.round(s/i[0].length)),n._ValidateArraySize(i.length,i[0].length),r=0;ri.length&&(u=i.length-r),o=n.getRow(r).getBoundingRect(n.getRow(r+u-1)),h=i.slice(r,r+u),f(o.context,o,t,h);return!0}return!1}function ht(){return typeof window!="undefined"&&window.Office&&window.Office.context&&window.Office.context.requirements?window.Office.context.requirements.isSetSupported("ExcelApi",1.3):!0}function ss(t,i,r){return OfficeExtension.ClientRequestContext._runBatch("Excel.run",arguments,function(t){return new n.RequestContext(t)})}function hs(t,i){return OfficeExtension.ClientRequestContext._runExplicitBatch("Excel.runBatch",arguments,function(t){return new n.RequestContext(t)})}function yt(n){var t={BindingColumnCount:n.bindingColumnCount,BindingId:n.bindingId,BindingRowCount:n.bindingRowCount,bindingType:n.bindingType,HasHeaders:n.hasHeaders};return window.OSF.DDA.OMFactory.manufactureBinding(t,window.Microsoft.Office.WebExtension.context.document)}function lr(n,t){var r=n.headers==null,i;return i=r?n.rows:n,i=window.OSF.DDA.DataCoercion.coerceData(i,t[window.Microsoft.Office.WebExtension.Parameters.CoercionType]),i==undefined?null:i}function cs(n,t,i){var e=typeof window!="undefined"&&window.Office&&window.Office.context&&window.Office.context.diagnostics&&window.Office.context.diagnostics.version;if(!e)return!1;var o=window.Office.context.diagnostics.version,s=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/,r=s.exec(o);if(r){var u=parseInt(r[1]),f=parseInt(r[2]),h=parseInt(r[3]),c=parseInt(r[4]),l=3e3;if(u0?f=i.getOffsetRange(r,u):(f=i,e=r,o=u),Math.abs(t)==1)?f:f.getBoundingRect(i.getOffsetRange(r*t+e,u*t+o))},Object.defineProperty(k.prototype,"conditionalFormats",{get:function(){return l("Range.conditionalFormats",c,"1.6",h),this._Con||(this._Con=new n.ConditionalFormatCollection(this.context,o(this.context,this,"ConditionalFormats",!0,!1,!1))),this._Con},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"format",{get:function(){return this._F||(this._F=new n.RangeFormat(this.context,o(this.context,this,"Format",!1,!1,!1))),this._F},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"sort",{get:function(){return l("Range.sort",c,"1.2",h),this._S||(this._S=new n.RangeSort(this.context,o(this.context,this,"Sort",!1,!1,!1))),this._S},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"worksheet",{get:function(){return this._W||(this._W=new n.Worksheet(this.context,o(this.context,this,"Worksheet",!1,!1,!1))),this._W},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"address",{get:function(){return r("address",this._A,nt,this._isNull),this._A},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"addressLocal",{get:function(){return r("addressLocal",this._Ad,nt,this._isNull),this._Ad},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"cellCount",{get:function(){return r("cellCount",this._C,nt,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"columnCount",{get:function(){return r("columnCount",this._Co,nt,this._isNull),this._Co},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"columnHidden",{get:function(){return r("columnHidden",this._Col,nt,this._isNull),l("Range.columnHidden",c,"1.2",h),this._Col},set:function(n){this._Col=n;f(this.context,this,"ColumnHidden",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"columnIndex",{get:function(){return r("columnIndex",this._Colu,nt,this._isNull),this._Colu},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"formulas",{get:function(){return r("formulas",this.m_formulas,nt,this._isNull),this.m_formulas},set:function(n){(this.m_formulas=n,vt(this,"Formulas",n))||(this.m_formulas=n,f(this.context,this,"Formulas",n))},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"formulasLocal",{get:function(){return r("formulasLocal",this.m_formulasLocal,nt,this._isNull),this.m_formulasLocal},set:function(n){(this.m_formulasLocal=n,vt(this,"FormulasLocal",n))||(this.m_formulasLocal=n,f(this.context,this,"FormulasLocal",n))},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"formulasR1C1",{get:function(){return r("formulasR1C1",this.m_formulasR1C1,nt,this._isNull),l("Range.formulasR1C1",c,"1.2",h),this.m_formulasR1C1},set:function(n){(this.m_formulasR1C1=n,vt(this,"FormulasR1C1",n))||(this.m_formulasR1C1=n,f(this.context,this,"FormulasR1C1",n))},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"hidden",{get:function(){return r("hidden",this._H,nt,this._isNull),l("Range.hidden",c,"1.2",h),this._H},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"numberFormat",{get:function(){return r("numberFormat",this.m_numberFormat,nt,this._isNull),this.m_numberFormat},set:function(n){(this.m_numberFormat=n,vt(this,"NumberFormat",n))||(this.m_numberFormat=n,f(this.context,this,"NumberFormat",n))},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"rowCount",{get:function(){return r("rowCount",this._R,nt,this._isNull),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"rowHidden",{get:function(){return r("rowHidden",this._Ro,nt,this._isNull),l("Range.rowHidden",c,"1.2",h),this._Ro},set:function(n){this._Ro=n;f(this.context,this,"RowHidden",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"rowIndex",{get:function(){return r("rowIndex",this._Row,nt,this._isNull),this._Row},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"text",{get:function(){return r("text",this._T,nt,this._isNull),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"valueTypes",{get:function(){return r("valueTypes",this._V,nt,this._isNull),this._V},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"values",{get:function(){return r("values",this.m_values,nt,this._isNull),this.m_values},set:function(n){(this.m_values=n,vt(this,"Values",n))||(this.m_values=n,f(this.context,this,"Values",n))},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_ReferenceId",{get:function(){return r("_ReferenceId",this.__R,nt,this._isNull),this.__R},enumerable:!0,configurable:!0}),k.prototype.set=function(n,t){this._recursivelySet(n,t,["numberFormat","values","formulas","formulasLocal","formulasR1C1","rowHidden","columnHidden"],["format"],["conditionalFormats","sort","worksheet"])},k.prototype.update=function(n){this._recursivelyUpdate(n)},k.prototype.calculate=function(){l("Range.calculate",c,"1.6",h);s(this.context,this,"Calculate",0,[],!1)},k.prototype.clear=function(n){s(this.context,this,"Clear",0,[n],!1)},k.prototype.delete=function(n){s(this.context,this,"Delete",0,[n],!1)},k.prototype.getBoundingRect=function(i){return new n.Range(this.context,t(this.context,this,"GetBoundingRect",1,[i],!1,!0,null,!1))},k.prototype.getCell=function(i,r){return new n.Range(this.context,t(this.context,this,"GetCell",1,[i,r],!1,!0,null,!1))},k.prototype.getColumn=function(i){return new n.Range(this.context,t(this.context,this,"GetColumn",1,[i],!1,!0,null,!1))},k.prototype.getColumnsAfter=function(i){return ht()?(l("Range.getColumnsAfter",c,"1.3",h),new n.Range(this.context,t(this.context,this,"GetColumnsAfter",1,[i],!1,!0,null,!1))):(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0&&OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove"),this._getAdjacentRange("getColumnsAfter",i,this.getLastColumn(),0,1))},k.prototype.getColumnsBefore=function(i){return ht()?(l("Range.getColumnsBefore",c,"1.3",h),new n.Range(this.context,t(this.context,this,"GetColumnsBefore",1,[i],!1,!0,null,!1))):(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0&&OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove"),this._getAdjacentRange("getColumnsBefore",i,this.getColumn(0),0,-1))},k.prototype.getEntireColumn=function(){return new n.Range(this.context,t(this.context,this,"GetEntireColumn",1,[],!1,!0,null,!1))},k.prototype.getEntireRow=function(){return new n.Range(this.context,t(this.context,this,"GetEntireRow",1,[],!1,!0,null,!1))},k.prototype.getIntersection=function(i){return new n.Range(this.context,t(this.context,this,"GetIntersection",1,[i],!1,!0,null,!1))},k.prototype.getIntersectionOrNullObject=function(i){return l("Range.getIntersectionOrNullObject",c,"1.4",h),new n.Range(this.context,t(this.context,this,"GetIntersectionOrNullObject",1,[i],!1,!0,null,!1))},k.prototype.getLastCell=function(){return new n.Range(this.context,t(this.context,this,"GetLastCell",1,[],!1,!0,null,!1))},k.prototype.getLastColumn=function(){return new n.Range(this.context,t(this.context,this,"GetLastColumn",1,[],!1,!0,null,!1))},k.prototype.getLastRow=function(){return new n.Range(this.context,t(this.context,this,"GetLastRow",1,[],!1,!0,null,!1))},k.prototype.getOffsetRange=function(i,r){return new n.Range(this.context,t(this.context,this,"GetOffsetRange",1,[i,r],!1,!0,null,!1))},k.prototype.getResizedRange=function(i,r){if(!ht()){this._ensureInteger(i,"getResizedRange");this._ensureInteger(r,"getResizedRange");var u=i>=0&&r>=0?this:this.getCell(0,0);return u.getBoundingRect(this.getLastCell().getOffsetRange(i,r))}return l("Range.getResizedRange",c,"1.3",h),new n.Range(this.context,t(this.context,this,"GetResizedRange",1,[i,r],!1,!0,null,!1))},k.prototype.getRow=function(i){return new n.Range(this.context,t(this.context,this,"GetRow",1,[i],!1,!0,null,!1))},k.prototype.getRowsAbove=function(i){return ht()?(l("Range.getRowsAbove",c,"1.3",h),new n.Range(this.context,t(this.context,this,"GetRowsAbove",1,[i],!1,!0,null,!1))):(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0&&OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove"),this._getAdjacentRange("getRowsAbove",i,this.getRow(0),-1,0))},k.prototype.getRowsBelow=function(i){return ht()?(l("Range.getRowsBelow",c,"1.3",h),new n.Range(this.context,t(this.context,this,"GetRowsBelow",1,[i],!1,!0,null,!1))):(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0&&OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove"),this._getAdjacentRange("getRowsBelow",i,this.getLastRow(),1,0))},k.prototype.getUsedRange=function(i){return new n.Range(this.context,t(this.context,this,"GetUsedRange",1,[i],!1,!0,null,!1))},k.prototype.getUsedRangeOrNullObject=function(i){return l("Range.getUsedRangeOrNullObject",c,"1.4",h),new n.Range(this.context,t(this.context,this,"GetUsedRangeOrNullObject",1,[i],!1,!0,null,!1))},k.prototype.getVisibleView=function(){return l("Range.getVisibleView",c,"1.3",h),new n.RangeView(this.context,t(this.context,this,"GetVisibleView",1,[],!1,!1,null,!1))},k.prototype.insert=function(i){return new n.Range(this.context,t(this.context,this,"Insert",0,[i],!1,!0,null,!1))},k.prototype.merge=function(n){l("Range.merge",c,"1.2",h);s(this.context,this,"Merge",0,[n],!1)},k.prototype.select=function(){s(this.context,this,"Select",1,[],!1)},k.prototype.unmerge=function(){l("Range.unmerge",c,"1.2",h);s(this.context,this,"Unmerge",0,[],!1)},k.prototype._KeepReference=function(){s(this.context,this,"_KeepReference",1,[],!1)},k.prototype._ValidateArraySize=function(n,t){l("Range._ValidateArraySize",c,"1.3",h);s(this.context,this,"_ValidateArraySize",1,[n,t],!1)},k.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;v(this,t);u(t.Address)||(this._A=t.Address);u(t.AddressLocal)||(this._Ad=t.AddressLocal);u(t.CellCount)||(this._C=t.CellCount);u(t.ColumnCount)||(this._Co=t.ColumnCount);u(t.ColumnHidden)||(this._Col=t.ColumnHidden);u(t.ColumnIndex)||(this._Colu=t.ColumnIndex);u(t.Formulas)||(this.m_formulas=t.Formulas);u(t.FormulasLocal)||(this.m_formulasLocal=t.FormulasLocal);u(t.FormulasR1C1)||(this.m_formulasR1C1=t.FormulasR1C1);u(t.Hidden)||(this._H=t.Hidden);u(t.NumberFormat)||(this.m_numberFormat=t.NumberFormat);u(t.RowCount)||(this._R=t.RowCount);u(t.RowHidden)||(this._Ro=t.RowHidden);u(t.RowIndex)||(this._Row=t.RowIndex);u(t.Text)||(this._T=t.Text);u(t.ValueTypes)||(this._V=t.ValueTypes);u(t.Values)||(this.m_values=t.Values);u(t._ReferenceId)||(this.__R=t._ReferenceId);d(this,t,["conditionalFormats","ConditionalFormats","format","Format","sort","Sort","worksheet","Worksheet"])}},k.prototype.load=function(n){return p(this,n)},k.prototype.retrieve=function(n){return w(this,n)},k.prototype._handleIdResult=function(n){(i.prototype._handleIdResult.call(this,n),e(n))||u(n._ReferenceId)||(this.__R=n._ReferenceId)},k.prototype._handleRetrieveResult=function(n,t){i.prototype._handleRetrieveResult.call(this,n,t);y(this,n,t)},k.prototype.track=function(){return this.context.trackedObjects.add(this),this},k.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},k.prototype.toJSON=function(){return a(this,{address:this._A,addressLocal:this._Ad,cellCount:this._C,columnCount:this._Co,columnHidden:this._Col,columnIndex:this._Colu,formulas:this.m_formulas,formulasLocal:this.m_formulasLocal,formulasR1C1:this.m_formulasR1C1,hidden:this._H,numberFormat:this.m_numberFormat,rowCount:this._R,rowHidden:this._Ro,rowIndex:this._Row,text:this._T,values:this.m_values,valueTypes:this._V},{conditionalFormats:this._Con,format:this._F})},k.prototype.ensureUnchanged=function(n){b(this.context,this,n);return},k}(OfficeExtension.ClientObject);n.Range=ri;it="RangeView";wr=function(i){function s(){return i!==null&&i.apply(this,arguments)||this}return __extends(s,i),Object.defineProperty(s.prototype,"_className",{get:function(){return"RangeView"},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_scalarPropertyNames",{get:function(){return["numberFormat","values","text","formulas","formulasLocal","formulasR1C1","valueTypes","rowCount","columnCount","cellAddresses","index"]},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_scalarPropertyUpdateable",{get:function(){return[!0,!0,!1,!0,!0,!0,!1,!1,!1,!1,!1]},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_navigationPropertyNames",{get:function(){return["rows"]},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rows",{get:function(){return this._Ro||(this._Ro=new n.RangeViewCollection(this.context,o(this.context,this,"Rows",!0,!1,!1))),this._Ro},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"cellAddresses",{get:function(){return r("cellAddresses",this._C,it,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"columnCount",{get:function(){return r("columnCount",this._Co,it,this._isNull),this._Co},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulas",{get:function(){return r("formulas",this._F,it,this._isNull),this._F},set:function(n){this._F=n;f(this.context,this,"Formulas",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulasLocal",{get:function(){return r("formulasLocal",this._Fo,it,this._isNull),this._Fo},set:function(n){this._Fo=n;f(this.context,this,"FormulasLocal",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulasR1C1",{get:function(){return r("formulasR1C1",this._For,it,this._isNull),this._For},set:function(n){this._For=n;f(this.context,this,"FormulasR1C1",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"index",{get:function(){return r("index",this._I,it,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"numberFormat",{get:function(){return r("numberFormat",this._N,it,this._isNull),this._N},set:function(n){this._N=n;f(this.context,this,"NumberFormat",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rowCount",{get:function(){return r("rowCount",this._R,it,this._isNull),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"text",{get:function(){return r("text",this._T,it,this._isNull),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"valueTypes",{get:function(){return r("valueTypes",this._Va,it,this._isNull),this._Va},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"values",{get:function(){return r("values",this._V,it,this._isNull),this._V},set:function(n){this._V=n;f(this.context,this,"Values",n)},enumerable:!0,configurable:!0}),s.prototype.set=function(n,t){this._recursivelySet(n,t,["numberFormat","values","formulas","formulasLocal","formulasR1C1"],[],["rows"])},s.prototype.update=function(n){this._recursivelyUpdate(n)},s.prototype.getRange=function(){return new n.Range(this.context,t(this.context,this,"GetRange",1,[],!1,!0,null,!1))},s.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;v(this,t);u(t.CellAddresses)||(this._C=t.CellAddresses);u(t.ColumnCount)||(this._Co=t.ColumnCount);u(t.Formulas)||(this._F=t.Formulas);u(t.FormulasLocal)||(this._Fo=t.FormulasLocal);u(t.FormulasR1C1)||(this._For=t.FormulasR1C1);u(t.Index)||(this._I=t.Index);u(t.NumberFormat)||(this._N=t.NumberFormat);u(t.RowCount)||(this._R=t.RowCount);u(t.Text)||(this._T=t.Text);u(t.ValueTypes)||(this._Va=t.ValueTypes);u(t.Values)||(this._V=t.Values);d(this,t,["rows","Rows"])}},s.prototype.load=function(n){return p(this,n)},s.prototype.retrieve=function(n){return w(this,n)},s.prototype._handleRetrieveResult=function(n,t){i.prototype._handleRetrieveResult.call(this,n,t);y(this,n,t)},s.prototype.toJSON=function(){return a(this,{cellAddresses:this._C,columnCount:this._Co,formulas:this._F,formulasLocal:this._Fo,formulasR1C1:this._For,index:this._I,numberFormat:this._N,rowCount:this._R,text:this._T,values:this._V,valueTypes:this._Va},{rows:this._Ro})},s.prototype.ensureUnchanged=function(n){b(this.context,this,n);return},s}(OfficeExtension.ClientObject);n.RangeView=wr;br="RangeViewCollection";kr=function(i){function u(){return i!==null&&i.apply(this,arguments)||this}return __extends(u,i),Object.defineProperty(u.prototype,"_className",{get:function(){return"RangeViewCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"items",{get:function(){return r("items",this.m__items,br,this._isNull),this.m__items},enumerable:!0,configurable:!0}),u.prototype.getCount=function(){l("RangeViewCollection.getCount",c,"1.4",h);var t=s(this.context,this,"GetCount",1,[],!1),n=new OfficeExtension.ClientResult;return k(this,t,n),n},u.prototype.getItemAt=function(i){return new n.RangeView(this.context,t(this.context,this,"GetItemAt",1,[i],!1,!1,null,!1))},u.prototype._handleResult=function(t){var u,f,r,o;if((i.prototype._handleResult.call(this,t),!e(t))&&(u=t,v(this,u),!e(u[OfficeExtension.Constants.items])))for(this.m__items=[],f=u[OfficeExtension.Constants.items],r=0;r6&&i.slice(0,5)===t.DateJSONPrefix&&i.slice(-1)===t.DateJSONSuffix&&(r=new Date(parseInt(i.slice(5,-1))),r)?r:i})},t._replaceDateWithStringDate=function(n){var i=JSON.stringify(n,function(n,i){return this[n]instanceof Date?t.DateJSONPrefix+this[n].getTime()+t.DateJSONSuffix:i});return JSON.parse(i)},Object.defineProperty(t.prototype,"key",{get:function(){return r("key",this._K,ai,this._isNull),this._K},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return r("value",this.m_value,ai,this._isNull),this.m_value},set:function(n){if(!e(n)){this.m_value=n;var i=t._replaceDateWithStringDate(n);f(this.context,this,"Value",i);return}this.m_value=n;f(this.context,this,"Value",n)},enumerable:!0,configurable:!0}),t.prototype.set=function(n,t){this._recursivelySet(n,t,["value"],[],[])},t.prototype.update=function(n){this._recursivelyUpdate(n)},t.prototype.delete=function(){s(this.context,this,"Delete",0,[],!1)},t.prototype._handleResult=function(i){if(n.prototype._handleResult.call(this,i),!e(i)){var r=i;v(this,r);u(r.Key)||(this._K=r.Key);u(r.Value)||(this.m_value=r.Value,this.m_value=t.replaceStringDateWithDate(this.m_value))}},t.prototype.load=function(n){return p(this,n)},t.prototype.retrieve=function(n){return w(this,n)},t.prototype._handleRetrieveResult=function(t,i){n.prototype._handleRetrieveResult.call(this,t,i);y(this,t,i)},t.prototype.toJSON=function(){return a(this,{key:this._K,value:this.m_value},{})},t.prototype.ensureUnchanged=function(n){b(this.context,this,n);return},t}(OfficeExtension.ClientObject);wt.DateJSONPrefix="Date(";wt.DateJSONSuffix=")";n.Setting=wt;nu="NamedItemCollection";tu=function(i){function u(){return i!==null&&i.apply(this,arguments)||this}return __extends(u,i),Object.defineProperty(u.prototype,"_className",{get:function(){return"NamedItemCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"items",{get:function(){return r("items",this.m__items,nu,this._isNull),this.m__items},enumerable:!0,configurable:!0}),u.prototype.add=function(i,r,u){return l("NamedItemCollection.add",c,"1.4",h),new n.NamedItem(this.context,t(this.context,this,"Add",0,[i,r,u],!1,!0,null,!1))},u.prototype.addFormulaLocal=function(i,r,u){return l("NamedItemCollection.addFormulaLocal",c,"1.4",h),new n.NamedItem(this.context,t(this.context,this,"AddFormulaLocal",0,[i,r,u],!1,!1,null,!1))},u.prototype.getCount=function(){l("NamedItemCollection.getCount",c,"1.4",h);var t=s(this.context,this,"GetCount",1,[],!1),n=new OfficeExtension.ClientResult;return k(this,t,n),n},u.prototype.getItem=function(t){return new n.NamedItem(this.context,tt(this.context,this,[t]))},u.prototype.getItemOrNullObject=function(i){return l("NamedItemCollection.getItemOrNullObject",c,"1.4",h),new n.NamedItem(this.context,t(this.context,this,"GetItemOrNullObject",1,[i],!1,!1,null,!1))},u.prototype._handleResult=function(t){var u,f,r,o;if((i.prototype._handleResult.call(this,t),!e(t))&&(u=t,v(this,u),!e(u[OfficeExtension.Constants.items])))for(this.m__items=[],f=u[OfficeExtension.Constants.items],r=0;r"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyNames",{get:function(){return["error","value"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"error",{get:function(){return r("error",this._E,sr,this._isNull),this._E},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return r("value",this._V,sr,this._isNull),this._V},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){if(n.prototype._handleResult.call(this,t),!e(t)){var i=t;v(this,i);u(i.Error)||(this._E=i.Error);u(i.Value)||(this._V=i.Value)}},t.prototype.load=function(n){return p(this,n)},t.prototype.retrieve=function(n){return w(this,n)},t.prototype._handleRetrieveResult=function(t,i){n.prototype._handleRetrieveResult.call(this,t,i);y(this,t,i)},t.prototype.toJSON=function(){return a(this,{error:this._E,value:this._V},{})},t.prototype.ensureUnchanged=function(n){b(this.context,this,n);return},t}(OfficeExtension.ClientObject);n.FunctionResult=i;al="Functions";us=function(n){function r(){return n!==null&&n.apply(this,arguments)||this}return __extends(r,n),Object.defineProperty(r.prototype,"_className",{get:function(){return"Functions"},enumerable:!0,configurable:!0}),r.prototype.abs=function(n){return new i(this.context,t(this.context,this,"Abs",0,[n],!1,!0,null,!1))},r.prototype.accrInt=function(n,r,u,f,e,o,s,h){return new i(this.context,t(this.context,this,"AccrInt",0,[n,r,u,f,e,o,s,h],!1,!0,null,!1))},r.prototype.accrIntM=function(n,r,u,f,e){return new i(this.context,t(this.context,this,"AccrIntM",0,[n,r,u,f,e],!1,!0,null,!1))},r.prototype.acos=function(n){return new i(this.context,t(this.context,this,"Acos",0,[n],!1,!0,null,!1))},r.prototype.acosh=function(n){return new i(this.context,t(this.context,this,"Acosh",0,[n],!1,!0,null,!1))},r.prototype.acot=function(n){return new i(this.context,t(this.context,this,"Acot",0,[n],!1,!0,null,!1))},r.prototype.acoth=function(n){return new i(this.context,t(this.context,this,"Acoth",0,[n],!1,!0,null,!1))},r.prototype.amorDegrc=function(n,r,u,f,e,o,s){return new i(this.context,t(this.context,this,"AmorDegrc",0,[n,r,u,f,e,o,s],!1,!0,null,!1))},r.prototype.amorLinc=function(n,r,u,f,e,o,s){return new i(this.context,t(this.context,this,"AmorLinc",0,[n,r,u,f,e,o,s],!1,!0,null,!1))},r.prototype.and=function(){for(var r=[],n=0;n 6 && v.slice(0, 5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) { + d=new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + } + else { + value=Sys.Serialization.JavaScriptSerializer.deserialize(value, true); + } + ret[key]=value; + } + catch (ex) { + } + } + return ret; + }, loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) { if (url && callback) { var doc=window.document; @@ -837,6 +885,14 @@ OSF.OUtil=(function () { } } }, + removeClass: function OSF_OUtil$removeClass(elmt, val) { + if (OSF.OUtil.hasClass(elmt, val)) { + var className=elmt.getAttribute(_classN); + var reg=new RegExp('(\\s|^)'+val+'(\\s|$)'); + className=className.replace(reg, ''); + elmt.setAttribute(_classN, className); + } + }, hasClass: function OSF_OUtil$hasClass(elmt, clsName) { var className=elmt.getAttribute(_classN); return className && className.match(new RegExp('(\\s|^)'+clsName+'(\\s|$)')); @@ -973,6 +1029,12 @@ OSF.OUtil.Guid=(function () { })(); window.OSF=OSF; OSF.OUtil.setNamespace("OSF", window); +OSF.MessageIDs={ + "FetchBundleUrl": 0, + "LoadReactBundle": 1, + "LoadBundleSuccess": 2, + "LoadBundleError": 3 +}; OSF.AppName={ Unsupported: 0, Excel: 1, @@ -1000,7 +1062,10 @@ OSF.AppName={ OutlookAndroid: 4194304, OneNoteWinRT: 8388608, ExcelAndroid: 8388609, - VisioWebApp: 8388610 + VisioWebApp: 8388610, + OneNoteIOS: 8388611, + WordAndroid: 8388613, + PowerpointAndroid: 8388614 }; OSF.InternalPerfMarker={ DataCoercionBegin: "Agave.HostCall.CoerceDataStart", @@ -1030,7 +1095,9 @@ OSF.AgaveHostAction={ "EscExit": 15, "F2Exit": 16, "ExitNoFocusable": 17, - "ExitNoFocusableShift": 18 + "ExitNoFocusableShift": 18, + "MouseEnter": 19, + "MouseLeave": 20 }; OSF.SharedConstants={ "NotificationConversationIdSuffix": '_ntf' @@ -1166,6 +1233,8 @@ Microsoft.Office.WebExtension.Parameters={ HostType: "hostType", ForceConsent: "forceConsent", ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + Reserved: "reserved", Xml: "xml", Namespace: "namespace", Prefix: "prefix", @@ -1198,7 +1267,9 @@ Microsoft.Office.WebExtension.Parameters={ DisplayInIframe: "displayInIframe", MessageContent: "messageContent", HideTitle: "hideTitle", - AppCommandInvocationCompletedData: "appCommandInvocationCompletedData" + UseDeviceIndependentPixels: "useDeviceIndependentPixels", + AppCommandInvocationCompletedData: "appCommandInvocationCompletedData", + Base64: "base64" }; OSF.OUtil.setNamespace("DDA", OSF); OSF.DDA.DocumentMode={ @@ -1255,6 +1326,8 @@ OSF.DDA.MethodDispId={ dispidAppCommandInvocationCompletedMethod: 94, dispidCloseContainerMethod: 97, dispidGetAccessTokenMethod: 98, + dispidOpenBrowserWindow: 102, + dispidCreateDocumentMethod: 105, dispidGetSelectedTaskMethod: 110, dispidGetSelectedResourceMethod: 111, dispidGetTaskMethod: 112, @@ -1310,8 +1383,11 @@ OSF.DDA.EventDispId={ dispidObjectDataChangedEvent: 15, dispidContentControlAddedEvent: 16, dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, dispidAppCommandInvokedEvent: 39, dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, dispidTaskSelectionChangedEvent: 56, dispidResourceSelectionChangedEvent: 57, dispidViewSelectionChangedEvent: 58, @@ -1443,7 +1519,9 @@ OSF.DDA.ErrorCodeManager=(function () { ooeSSOInvalidGrant: 13005, ooeSSOClientError: 13006, ooeSSOServerError: 13007, - ooeAddinIsAlreadyRequestingToken: 13008 + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009, + ooeSSOConnectionLost: 13010 }, initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={ name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotSupported }; @@ -1541,6 +1619,8 @@ OSF.DDA.ErrorCodeManager=(function () { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={ name: stringNS.L_SSOClientError, message: stringNS.L_SSOClientErrorMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={ name: stringNS.L_SSOServerError, message: stringNS.L_SSOServerErrorMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={ name: stringNS.L_AddinIsAlreadyRequestingToken, message: stringNS.L_AddinIsAlreadyRequestingTokenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={ name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={ name: stringNS.L_SSOConnectionLostError, message: stringNS.L_SSOConnectionLostErrorMessage }; } }; })(); @@ -2242,6 +2322,11 @@ OSF.DDA.Context=function OSF_DDA_Context(officeAppContext, document, license, ap value: officeAppContext.auth }); } + if (officeAppContext.application) { + OSF.OUtil.defineEnumerableProperty(this, "application", { + value: officeAppContext.application + }); + } if (officeAppContext.get_isDialog()) { var requirements=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); OSF.OUtil.defineEnumerableProperty(this, "requirements", { @@ -2284,6 +2369,8 @@ OSF.DDA.OutlookContext=function OSF_DDA_OutlookContext(appContext, settings, lic }; OSF.OUtil.extend(OSF.DDA.OutlookContext, OSF.DDA.Context); OSF.DDA.OutlookAppOm=function OSF_DDA_OutlookAppOm(appContext, window, appReady) { }; +OSF.DDA.Application=function OSF_DDA_Application(officeAppContext) { +}; OSF.DDA.Document=function OSF_DDA_Document(officeAppContext, settings) { var mode; switch (officeAppContext.get_clientMode()) { @@ -3020,6 +3107,8 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, "ExecuteRichApiRequestAsync": did.dispidExecuteRichApiRequestMethod, "AppCommandInvocationCompletedAsync": did.dispidAppCommandInvocationCompletedMethod, "CloseContainerAsync": did.dispidCloseContainerMethod, + "OpenBrowserWindow": did.dispidOpenBrowserWindow, + "CreateDocumentAsync": did.dispidCreateDocumentMethod, "AddDataPartAsync": did.dispidAddDataPartMethod, "GetDataPartByIdAsync": did.dispidGetDataPartByIdMethod, "GetDataPartsByNameSpaceAsync": did.dispidGetDataPartsByNamespaceMethod, @@ -3059,13 +3148,13 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, } jsom=OSF.DDA.SyncMethodNames; did=OSF.DDA.MethodDispId; - var asyncMethodMap={ + var syncMethodMap={ "MessageParent": did.dispidMessageParentMethod, "SendMessage": did.dispidSendMessageMethod }; - for (var method in asyncMethodMap) { + for (var method in syncMethodMap) { if (jsom[method]) { - dispIdMap[jsom[method].id]=asyncMethodMap[method]; + dispIdMap[jsom[method].id]=syncMethodMap[method]; } } jsom=Microsoft.Office.WebExtension.EventType; @@ -3085,7 +3174,10 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, "ObjectSelectionChanged": did.dispidObjectSelectionChangedEvent, "ObjectDataChanged": did.dispidObjectDataChangedEvent, "ContentControlAdded": did.dispidContentControlAddedEvent, + "RichApiMessage": did.dispidRichApiMessageEvent, "ItemChanged": did.dispidOlkItemSelectedChangedEvent, + "RecipientsChanged": did.dispidOlkRecipientsChangedEvent, + "AppointmentTimeChanged": did.dispidOlkAppointmentTimeChangedEvent, "TaskSelectionChanged": did.dispidTaskSelectionChangedEvent, "ResourceSelectionChanged": did.dispidResourceSelectionChangedEvent, "ViewSelectionChanged": did.dispidViewSelectionChangedEvent, @@ -3161,6 +3253,7 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, else { hostCallArgs=callArgs; } + var startTime=(new Date()).getTime(); delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ "dispId": dispId, "hostCallArgs": hostCallArgs, @@ -3181,6 +3274,9 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, } var payload=asyncMethodCall.processResponse(status, responseArgs, caller, callArgs); OSF.DDA.issueAsyncResult(callArgs, status, payload); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(dispId, hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); + } } }); } @@ -4048,7 +4144,6 @@ OSF.DDA.SafeArray.Delegate.executeAsync=function OSF_DDA_SafeArray_Delegate$Exec if (args.onCalling) { args.onCalling(); } - var startTime=(new Date()).getTime(); OSF.ClientHostController.execute(args.dispId, toArray(args.hostCallArgs), function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode) { var result=hostResponseArgs.toArray(); var status=result[OSF.DDA.SafeArray.Response.Status]; @@ -4095,9 +4190,6 @@ OSF.DDA.SafeArray.Delegate.executeAsync=function OSF_DDA_SafeArray_Delegate$Exec } args.onComplete(status, payload); } - if (OSF.AppTelemetry) { - OSF.AppTelemetry.onMethodDone(args.dispId, args.hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); - } return true; }); } @@ -4213,6 +4305,9 @@ OSF.InitializationHelper.prototype.prepareApiSurface=function OSF_Initialization } } } + if (OSF.DDA.OpenBrowser) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.OpenBrowserWindow]); + } if (OSF.DDA.Auth) { appContext.auth=new OSF.DDA.Auth(); OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth, [OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]); @@ -4555,10 +4650,10 @@ var OSFWebView; }; WebViewHostController.prototype.openDialog=function (id, targetId, handler, callback) { var callArgs=JSON.parse(targetId); - if (isNaN(callArgs.width) || callArgs.width <=0 || callArgs.width > 100) { + if (isNaN(callArgs.width) || callArgs.width <=0 || (!callArgs.useDeviceIndependentPixels && callArgs.width > 100)) { callArgs.width=99; } - if (isNaN(callArgs.height) || callArgs.height <=0 || callArgs.height > 100) { + if (isNaN(callArgs.height) || callArgs.height <=0 || (!callArgs.useDeviceIndependentPixels && callArgs.height > 100)) { callArgs.height=99; } targetId=JSON.stringify(callArgs); @@ -4794,12 +4889,35 @@ OSF.InitializationHelper.prototype.setAgaveHostCommunication=function OSF_Initia }; }; windowOpen(window); - if (document.activeElement==null || document.activeElement==document.body) { - var allTabbableElements=getAllTabElements(); - if (allTabbableElements.length) { - OSF.OUtil.focusToFirstTabbable(allTabbableElements, false); + var setDefaultFocus=function OSF_InitializationHelper$setDefaultFocus() { + try { + if (document.activeElement==null || document.activeElement==document.body) { + var allTabbableElements=getAllTabElements(); + if (allTabbableElements && allTabbableElements.length > 0) { + OSF.OUtil.focusToFirstTabbable(allTabbableElements, false); + } + } } + catch (err) { + OsfMsAjaxFactory.msAjaxDebug.trace("Setting Agave default focus failed. Exception:"+err); + } + }; + if (document.body) { + setDefaultFocus(); } + else { + document.addEventListener('DOMContentLoaded', setDefaultFocus); + } + window.addEventListener("blur", function () { + try { + if (document.activeElement) { + document.activeElement.blur(); + } + } + catch (err) { + OsfMsAjaxFactory.msAjaxDebug.trace("Clearing Agave focus failed. Exception:"+err); + } + }); }; OSF.WebView=OSFWebView; OSF.ClientHostController=new OSFWebView.WebViewHostController(OSF.ScriptMessaging.GetScriptMessenger("agaveHostCallback", "agaveHostEventCallback", new WinRT.Poster())); @@ -5281,7 +5399,7 @@ var OSFAriaLogger; function AriaLogger() { } AriaLogger.prototype.getAriaCDNLocation=function () { - return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry-2.8.0.min.js"); + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry.js"); }; AriaLogger.getInstance=function () { if (AriaLogger.AriaLoggerObj===undefined) { @@ -5298,13 +5416,10 @@ var OSFAriaLogger; try { if (!this.ALogger) { var OfficeExtensibilityTenantID="db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; - var configuration=new microsoft.applications.telemetry.LogConfiguration(); - configuration.enableAutoUserSession=true; - microsoft.applications.telemetry.LogManager.initialize(OfficeExtensibilityTenantID, configuration); - this.ALogger=new microsoft.applications.telemetry.Logger(); + this.ALogger=AWTLogManager.initialize(OfficeExtensibilityTenantID); } - var eventProperties=new microsoft.applications.telemetry.EventProperties(); - eventProperties.name="Office.Extensibility.OfficeJS."+tableName; + var eventProperties=new AWTEventProperties(); + eventProperties.setName("Office.Extensibility.OfficeJS."+tableName); for (var key in telemetryData) { if (key.toLowerCase() !=="table") { eventProperties.setProperty(key, telemetryData[key]); @@ -5337,6 +5452,7 @@ var OSFAppTelemetry; var sessionId=OSF.OUtil.Guid.generateNewGuid(); var osfControlAppCorrelationId=""; var omexDomainRegex=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"); + OSFAppTelemetry.enableTelemetry=true; ; var AppInfo=(function () { function AppInfo() { @@ -5420,17 +5536,19 @@ var OSFAppTelemetry; function AppLogger() { } AppLogger.prototype.LogData=function (data) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, data.SerializeRow(), OSF.Logger.SendFlag.none); - OSFAriaLogger.AriaLogger.getInstance().logData(data); + try { + OSFAriaLogger.AriaLogger.getInstance().logData(data); + } + catch (e) { + } }; AppLogger.prototype.LogRawData=function (log) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, log, OSF.Logger.SendFlag.none); try { OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)); } @@ -5470,7 +5588,7 @@ var OSFAppTelemetry; } appInfo.message=context.get_hostCustomMessage(); appInfo.officeJSVersion=OSF.ConstantNames.FileVersion; - appInfo.hostJSVersion="16.0.8119.1000"; + appInfo.hostJSVersion="16.0.8916.1000"; if (context._wacHostEnvironment) { appInfo.wacHostEnvironment=context._wacHostEnvironment; } @@ -6010,52 +6128,10 @@ OSF.DDA.SettingsManager={ DateJSONPrefix: "Date(", DataJSONSuffix: ")", serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) { - var ret={}; - for (var key in settingsCollection) { - var value=settingsCollection[key]; - try { - if (JSON) { - value=JSON.stringify(value, function dateReplacer(k, v) { - return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix+this[k].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix : v; - }); - } - else { - value=Sys.Serialization.JavaScriptSerializer.serialize(value); - } - ret[key]=value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.serializeSettings(settingsCollection); }, deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) { - var ret={}; - serializedSettings=serializedSettings || {}; - for (var key in serializedSettings) { - var value=serializedSettings[key]; - try { - if (JSON) { - value=JSON.parse(value, function dateReviver(k, v) { - var d; - if (typeof v==='string' && v && v.length > 6 && v.slice(0, 5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) { - d=new Date(parseInt(v.slice(5, -1))); - if (d) { - return d; - } - } - return v; - }); - } - else { - value=Sys.Serialization.JavaScriptSerializer.deserialize(value, true); - } - ret[key]=value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.deserializeSettings(serializedSettings); } }; OSF.DDA.Settings=function OSF_DDA_Settings(settings) { @@ -6117,14 +6193,16 @@ OSF.EventDispatch=function OSF_EventDispatch(eventTypes) { this._eventHandlers={}; this._objectEventHandlers={}; this._queuedEventsArgs={}; - for (var entry in eventTypes) { - var eventType=eventTypes[entry]; - var isObjectEvent=(eventType=="objectDeleted" || eventType=="objectSelectionChanged" || eventType=="objectDataChanged" || eventType=="contentControlAdded"); - if (!isObjectEvent) - this._eventHandlers[eventType]=[]; - else - this._objectEventHandlers[eventType]={}; - this._queuedEventsArgs[eventType]=[]; + if (eventTypes !=null) { + for (var i=0; i < eventTypes.length; i++) { + var eventType=eventTypes[i]; + var isObjectEvent=(eventType=="objectDeleted" || eventType=="objectSelectionChanged" || eventType=="objectDataChanged" || eventType=="contentControlAdded"); + if (!isObjectEvent) + this._eventHandlers[eventType]=[]; + else + this._objectEventHandlers[eventType]={}; + this._queuedEventsArgs[eventType]=[]; + } } }; OSF.EventDispatch.prototype={ @@ -6150,8 +6228,8 @@ OSF.EventDispatch.prototype={ hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) { var handlers=this._eventHandlers[eventType]; if (handlers && handlers.length > 0) { - for (var h in handlers) { - if (handlers[h]===handler) + for (var i=0; i < handlers.length; i++) { + if (handlers[i]===handler) return true; } } @@ -6256,8 +6334,9 @@ OSF.EventDispatch.prototype={ var eventType=eventArgs.type; if (eventType && this._eventHandlers[eventType]) { var eventHandlers=this._eventHandlers[eventType]; - for (var handler in eventHandlers) - eventHandlers[handler](eventArgs); + for (var i=0; i < eventHandlers.length; i++) { + eventHandlers[i](eventArgs); + } return true; } else { @@ -6354,6 +6433,9 @@ OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEve case Microsoft.Office.WebExtension.EventType.ContentControlAdded: args=new OSF.DDA.ObjectEventArgs(eventType, eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args=new OSF.DDA.RichApiMessageEventArgs(eventType, eventProperties); + break; case Microsoft.Office.WebExtension.EventType.DataNodeInserted: args=new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); break; @@ -6379,10 +6461,28 @@ OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEve args=new OSF.DDA.DialogParentEventArgs(eventProperties); break; case Microsoft.Office.WebExtension.EventType.ItemChanged: - if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlookwebapp") { + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { args=new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); target.initialize(args["initialData"]); - target.setCurrentItemNumber(args["itemNumber"].itemNumber); + if (OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]=="win32" || OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]=="mac") { + target.setCurrentItemNumber(args["itemNumber"].itemNumber); + } + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { + args=new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { + args=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); } else { throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); @@ -8029,9 +8129,10 @@ var __extends=(this && this.__extends) || function (d, b) { var OfficeExtension; (function (OfficeExtension) { var Action=(function () { - function Action(actionInfo, isWriteOperation) { + function Action(actionInfo, isWriteOperation, isRestrictedResourceAccess) { this.m_actionInfo=actionInfo; this.m_isWriteOperation=isWriteOperation; + this.m_isRestrictedResourceAccess=isRestrictedResourceAccess; } Object.defineProperty(Action.prototype, "actionInfo", { get: function () { @@ -8047,12 +8148,30 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(Action.prototype, "isRestrictedResourceAccess", { + get: function () { + return this.m_isRestrictedResourceAccess; + }, + enumerable: true, + configurable: true + }); return Action; }()); OfficeExtension.Action=Action; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + var TraceMarkerActionResultHandler=(function () { + function TraceMarkerActionResultHandler(callback) { + this.m_callback=callback; + } + TraceMarkerActionResultHandler.prototype._handleResult=function (value) { + if (this.m_callback) { + this.m_callback(); + } + }; + return TraceMarkerActionResultHandler; + }()); var ActionFactory=(function () { function ActionFactory() { } @@ -8068,13 +8187,17 @@ var OfficeExtension; var args=[value]; var referencedArgumentObjectPaths=OfficeExtension.Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); OfficeExtension.Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); - var ret=new OfficeExtension.Action(actionInfo, true); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + context._pendingRequest.ensureInstantiateObjectPaths(referencedArgumentObjectPaths); + var ret=new OfficeExtension.Action(actionInfo, true, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); context._pendingRequest.addReferencedObjectPaths(referencedArgumentObjectPaths); + ret.referencedObjectPath=parent._objectPath; + ret.referencedArgumentObjectPaths=referencedArgumentObjectPaths; return ret; }; - ActionFactory.createMethodAction=function (context, parent, methodName, operationType, args) { + ActionFactory.createMethodAction=function (context, parent, methodName, operationType, args, isRestrictedResourceAccess) { OfficeExtension.Utility.validateObjectPath(parent); var actionInfo={ Id: context._nextId(), @@ -8085,15 +8208,20 @@ var OfficeExtension; }; var referencedArgumentObjectPaths=OfficeExtension.Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); OfficeExtension.Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + context._pendingRequest.ensureInstantiateObjectPaths(referencedArgumentObjectPaths); var isWriteOperation=operationType !=1; - var ret=new OfficeExtension.Action(actionInfo, isWriteOperation); + var ret=new OfficeExtension.Action(actionInfo, isWriteOperation, isRestrictedResourceAccess); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); context._pendingRequest.addReferencedObjectPaths(referencedArgumentObjectPaths); + ret.referencedObjectPath=parent._objectPath; + ret.referencedArgumentObjectPaths=referencedArgumentObjectPaths; return ret; }; ActionFactory.createQueryAction=function (context, parent, queryOption) { OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); var actionInfo={ Id: context._nextId(), ActionType: 2, @@ -8101,13 +8229,15 @@ var OfficeExtension; ObjectPathId: parent._objectPath.objectPathInfo.Id, }; actionInfo.QueryInfo=queryOption; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; return ret; }; ActionFactory.createRecursiveQueryAction=function (context, parent, query) { OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); var actionInfo={ Id: context._nextId(), ActionType: 6, @@ -8115,23 +8245,59 @@ var OfficeExtension; ObjectPathId: parent._objectPath.objectPathInfo.Id, RecursiveQueryInfo: query }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; + return ret; + }; + ActionFactory.createQueryAsJsonAction=function (context, parent, queryOption) { + OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + var actionInfo={ + Id: context._nextId(), + ActionType: 7, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + }; + actionInfo.QueryInfo=queryOption; + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; + return ret; + }; + ActionFactory.createEnsureUnchangedAction=function (context, parent, objectState) { + OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + var actionInfo={ + Id: context._nextId(), + ActionType: 8, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }; + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; return ret; }; ActionFactory.createInstantiateAction=function (context, obj) { OfficeExtension.Utility.validateObjectPath(obj); + context._pendingRequest.ensureInstantiateObjectPath(obj._objectPath.parentObjectPath); + context._pendingRequest.ensureInstantiateObjectPaths(obj._objectPath.argumentObjectPaths); var actionInfo={ Id: context._nextId(), ActionType: 1, Name: "", ObjectPathId: obj._objectPath.objectPathInfo.Id }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(obj._objectPath); context._pendingRequest.addActionResultHandler(ret, new OfficeExtension.InstantiateActionResultHandler(obj)); + ret.referencedObjectPath=obj._objectPath; return ret; }; ActionFactory.createTraceAction=function (context, message, addTraceMessage) { @@ -8141,13 +8307,17 @@ var OfficeExtension; Name: "Trace", ObjectPathId: 0 }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); if (addTraceMessage) { context._pendingRequest.addTrace(actionInfo.Id, message); } return ret; }; + ActionFactory.createTraceMarkerForCallback=function (context, callback) { + var action=ActionFactory.createTraceAction(context, null, false); + context._pendingRequest.addActionResultHandler(action, new TraceMarkerActionResultHandler(callback)); + }; return ActionFactory; }()); OfficeExtension.ActionFactory=ActionFactory; @@ -8225,6 +8395,7 @@ var OfficeExtension; }; ClientObject.prototype._recursivelySet=function (input, options, scalarWriteablePropertyNames, objectPropertyNames, notAllowedToBeSetPropertyNames) { var isClientObject=(input instanceof ClientObject); + var originalInput=input; if (isClientObject) { if (Object.getPrototypeOf(this)===Object.getPrototypeOf(input)) { input=JSON.parse(JSON.stringify(input)); @@ -8241,31 +8412,38 @@ var OfficeExtension; for (var i=0; i < scalarWriteablePropertyNames.length; i++) { prop=scalarWriteablePropertyNames[i]; if (input.hasOwnProperty(prop)) { - this[prop]=input[prop]; + if (typeof input[prop] !=="undefined") { + this[prop]=input[prop]; + } } } for (var i=0; i < objectPropertyNames.length; i++) { prop=objectPropertyNames[i]; if (input.hasOwnProperty(prop)) { - this[prop].set(input[prop], options); + if (typeof input[prop] !=="undefined") { + var dataToPassToSet=isClientObject ? originalInput[prop] : input[prop]; + this[prop].set(dataToPassToSet, options); + } } } + var throwOnReadOnly=!isClientObject; + if (options && !OfficeExtension.Utility.isNullOrUndefined(throwOnReadOnly)) { + throwOnReadOnly=options.throwOnReadOnly; + } for (var i=0; i < notAllowedToBeSetPropertyNames.length; i++) { prop=notAllowedToBeSetPropertyNames[i]; if (input.hasOwnProperty(prop)) { - throw new OfficeExtension._Internal.RuntimeError({ - code: OfficeExtension.ErrorCodes.invalidArgument, - message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), - debugInfo: { - errorLocation: prop - } - }); + if (typeof input[prop] !=="undefined" && throwOnReadOnly) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.invalidArgument, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), + debugInfo: { + errorLocation: prop + } + }); + } } } - var throwOnReadOnly=!isClientObject; - if (options && !OfficeExtension.Utility.isNullOrUndefined(throwOnReadOnly)) { - throwOnReadOnly=options.throwOnReadOnly; - } for (prop in input) { if (scalarWriteablePropertyNames.indexOf(prop) < 0 && objectPropertyNames.indexOf(prop) < 0) { var propertyDescriptor=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this), prop); @@ -8313,12 +8491,14 @@ var OfficeExtension; this.m_actions=[]; this.m_actionResultHandler={}; this.m_referencedObjectPaths={}; + this.m_instantiatedObjectPaths={}; this.m_flags=0; this.m_traceInfos={}; this.m_pendingProcessEventHandlers=[]; this.m_pendingEventHandlerActions={}; this.m_responseTraceIds={}; this.m_responseTraceMessages=[]; + this.m_preSyncPromises=[]; } Object.defineProperty(ClientRequest.prototype, "flags", { get: function () { @@ -8364,7 +8544,13 @@ var OfficeExtension; if (action.isWriteOperation) { this.m_flags=this.m_flags | 1; } + if (action.isRestrictedResourceAccess) { + this.m_flags=this.m_flags | 2; + } this.m_actions.push(action); + if (action.actionInfo.ActionType==1) { + this.m_instantiatedObjectPaths[action.actionInfo.ObjectPathId]=action; + } }; Object.defineProperty(ClientRequest.prototype, "hasActions", { get: function () { @@ -8373,9 +8559,39 @@ var OfficeExtension; enumerable: true, configurable: true }); + ClientRequest.prototype._getLastAction=function () { + return this.m_actions[this.m_actions.length - 1]; + }; ClientRequest.prototype.addTrace=function (actionId, message) { this.m_traceInfos[actionId]=message; }; + ClientRequest.prototype.ensureInstantiateObjectPath=function (objectPath) { + if (objectPath) { + if (this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + this.ensureInstantiateObjectPath(objectPath.parentObjectPath); + this.ensureInstantiateObjectPaths(objectPath.argumentObjectPaths); + if (!this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + var actionInfo={ + Id: this.m_context._nextId(), + ActionType: 1, + Name: "", + ObjectPathId: objectPath.objectPathInfo.Id + }; + var instantiateAction=new OfficeExtension.Action(actionInfo, false, false); + instantiateAction.referencedObjectPath=objectPath; + this.addAction(instantiateAction); + } + } + }; + ClientRequest.prototype.ensureInstantiateObjectPaths=function (objectPaths) { + if (objectPaths) { + for (var i=0; i < objectPaths.length; i++) { + this.ensureInstantiateObjectPath(objectPaths[i]); + } + } + }; ClientRequest.prototype.addReferencedObjectPath=function (objectPath) { if (this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]) { return; @@ -8393,6 +8609,9 @@ var OfficeExtension; if (objectPath.isWriteOperation) { this.m_flags=this.m_flags | 1; } + if (objectPath.isRestrictedResourceAccess) { + this.m_flags=this.m_flags | 2; + } this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]=objectPath; if (objectPath.objectPathInfo.ObjectPathType==3) { this.addReferencedObjectPaths(objectPath.argumentObjectPaths); @@ -8411,6 +8630,9 @@ var OfficeExtension; this.m_actionResultHandler[action.actionInfo.Id]=resultHandler; }; ClientRequest.prototype.buildRequestMessageBody=function () { + if (OfficeExtension._internalConfig.enableEarlyDispose) { + ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } var objectPaths={}; for (var i in this.m_referencedObjectPaths) { objectPaths[i]=this.m_referencedObjectPaths[i].objectPathInfo; @@ -8461,12 +8683,95 @@ var OfficeExtension; ClientRequest.prototype._getPendingEventHandlerActions=function (eventHandlers) { return this.m_pendingEventHandlerActions[eventHandlers._id]; }; + ClientRequest.prototype._addPreSyncPromise=function (value) { + this.m_preSyncPromises.push(value); + }; + Object.defineProperty(ClientRequest.prototype, "_preSyncPromises", { + get: function () { + return this.m_preSyncPromises; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_actions", { + get: function () { + return this.m_actions; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_objectPaths", { + get: function () { + return this.m_referencedObjectPaths; + }, + enumerable: true, + configurable: true + }); + ClientRequest._updateLastUsedActionIdOfObjectPathId=function (lastUsedActionIdOfObjectPathId, objectPath, actionId) { + while (objectPath) { + if (lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]) { + return; + } + lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]=actionId; + var argumentObjectPaths=objectPath.argumentObjectPaths; + if (argumentObjectPaths) { + var argumentObjectPathsLength=argumentObjectPaths.length; + for (var i=0; i < argumentObjectPathsLength; i++) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, argumentObjectPaths[i], actionId); + } + } + objectPath=objectPath.parentObjectPath; + } + }; + ClientRequest._calculateLastUsedObjectPathIds=function (actions) { + var lastUsedActionIdOfObjectPathId={}; + var actionsLength=actions.length; + for (var index=actionsLength - 1; index >=0; --index) { + var action=actions[index]; + var actionId=action.actionInfo.Id; + if (action.referencedObjectPath) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, action.referencedObjectPath, actionId); + } + var referencedObjectPaths=action.referencedArgumentObjectPaths; + if (referencedObjectPaths) { + var referencedObjectPathsLength=referencedObjectPaths.length; + for (var refIndex=0; refIndex < referencedObjectPathsLength; refIndex++) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, referencedObjectPaths[refIndex], actionId); + } + } + } + var lastUsedObjectPathIdsOfAction={}; + for (var key in lastUsedActionIdOfObjectPathId) { + var actionId=lastUsedActionIdOfObjectPathId[key]; + var objectPathIds=lastUsedObjectPathIdsOfAction[actionId]; + if (!objectPathIds) { + objectPathIds=[]; + lastUsedObjectPathIdsOfAction[actionId]=objectPathIds; + } + objectPathIds.push(parseInt(key)); + } + for (var index=0; index < actionsLength; index++) { + var action=actions[index]; + var lastUsedObjectPathIds=lastUsedObjectPathIdsOfAction[action.actionInfo.Id]; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + action.actionInfo.L=lastUsedObjectPathIds; + } + else if (action.actionInfo.L) { + delete action.actionInfo.L; + } + } + }; return ClientRequest; }()); OfficeExtension.ClientRequest=ClientRequest; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + OfficeExtension._internalConfig={ + showDisposeInfoInDebugInfo: false, + enableEarlyDispose: true, + alwaysPolyfillClientObjectRetrieveMethod: false + }; var SessionBase=(function () { function SessionBase() { } @@ -8560,6 +8865,15 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(ClientRequestContext.prototype, "debugInfo", { + get: function () { + var prettyPrinter=new OfficeExtension.RequestPrettyPrinter(this._rootObjectPropertyName, this._pendingRequest._objectPaths, this._pendingRequest._actions, OfficeExtension._internalConfig.showDisposeInfoInDebugInfo); + var statements=prettyPrinter.process(); + return { pendingStatements: statements }; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ClientRequestContext.prototype, "trackedObjects", { get: function () { if (!this.m_trackedObjects) { @@ -8579,11 +8893,76 @@ var OfficeExtension; }); ClientRequestContext.prototype.load=function (clientObj, option) { OfficeExtension.Utility.validateContext(this, clientObj); - var queryOption=ClientRequestContext.parseQueryOption(option); + var queryOption=ClientRequestContext._parseQueryOption(option); var action=OfficeExtension.ActionFactory.createQueryAction(this, clientObj, queryOption); this._pendingRequest.addActionResultHandler(action, clientObj); }; - ClientRequestContext.parseQueryOption=function (option) { + ClientRequestContext.isLoadOption=function (loadOption) { + if (!OfficeExtension.Utility.isUndefined(loadOption.select) && (typeof (loadOption.select)==="string" || Array.isArray(loadOption.select))) + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.expand) && (typeof (loadOption.expand)==="string" || Array.isArray(loadOption.expand))) + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.top) && typeof (loadOption.top)==="number") + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.skip) && typeof (loadOption.skip)==="number") + return true; + for (var i in loadOption) { + return false; + } + return true; + }; + ClientRequestContext.parseStrictLoadOption=function (option) { + var ret={ Select: [] }; + ClientRequestContext.parseStrictLoadOptionHelper(ret, "", "option", option); + return ret; + }; + ClientRequestContext.combineQueryPath=function (pathPrefix, key, separator) { + if (pathPrefix.length===0) { + return key; + } + else { + return pathPrefix+separator+key; + } + }; + ClientRequestContext.parseStrictLoadOptionHelper=function (queryInfo, pathPrefix, argPrefix, option) { + for (var key in option) { + var value=option[key]; + if (key==="$all") { + if (typeof (value) !=="boolean") { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + if (value) { + queryInfo.Select.push(ClientRequestContext.combineQueryPath(pathPrefix, "*", "/")); + } + } + else if (key==="$top") { + if (typeof (value) !=="number" || pathPrefix.length > 0) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + queryInfo.Top=value; + } + else if (key==="$skip") { + if (typeof (value) !=="number" || pathPrefix.length > 0) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + queryInfo.Skip=value; + } + else { + if (typeof (value)==="boolean") { + if (value) { + queryInfo.Select.push(ClientRequestContext.combineQueryPath(pathPrefix, key, "/")); + } + } + else if (typeof (value)==="object") { + ClientRequestContext.parseStrictLoadOptionHelper(queryInfo, ClientRequestContext.combineQueryPath(pathPrefix, key, "/"), ClientRequestContext.combineQueryPath(argPrefix, key, "."), value); + } + else { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + } + } + }; + ClientRequestContext._parseQueryOption=function (option) { var queryOption={}; if (typeof (option)=="string") { var select=option; @@ -8592,41 +8971,46 @@ var OfficeExtension; else if (Array.isArray(option)) { queryOption.Select=option; } - else if (typeof (option)=="object") { + else if (typeof (option)==="object") { var loadOption=option; - if (typeof (loadOption.select)=="string") { - queryOption.Select=OfficeExtension.Utility._parseSelectExpand(loadOption.select); - } - else if (Array.isArray(loadOption.select)) { - queryOption.Select=loadOption.select; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.select)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.select"); - } - if (typeof (loadOption.expand)=="string") { - queryOption.Expand=OfficeExtension.Utility._parseSelectExpand(loadOption.expand); - } - else if (Array.isArray(loadOption.expand)) { - queryOption.Expand=loadOption.expand; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.expand)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.expand"); - } - if (typeof (loadOption.top)=="number") { - queryOption.Top=loadOption.top; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.top)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.top"); - } - if (typeof (loadOption.skip)=="number") { - queryOption.Skip=loadOption.skip; + if (ClientRequestContext.isLoadOption(loadOption)) { + if (typeof (loadOption.select)=="string") { + queryOption.Select=OfficeExtension.Utility._parseSelectExpand(loadOption.select); + } + else if (Array.isArray(loadOption.select)) { + queryOption.Select=loadOption.select; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.select)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.select"); + } + if (typeof (loadOption.expand)=="string") { + queryOption.Expand=OfficeExtension.Utility._parseSelectExpand(loadOption.expand); + } + else if (Array.isArray(loadOption.expand)) { + queryOption.Expand=loadOption.expand; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.expand)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.expand"); + } + if (typeof (loadOption.top)==="number") { + queryOption.Top=loadOption.top; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.top)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.top"); + } + if (typeof (loadOption.skip)==="number") { + queryOption.Skip=loadOption.skip; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.skip)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.skip"); + } } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.skip)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.skip"); + else { + queryOption=ClientRequestContext.parseStrictLoadOption(option); } } else if (!OfficeExtension.Utility.isNullOrUndefined(option)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option"); + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option"); } return queryOption; }; @@ -8636,7 +9020,7 @@ var OfficeExtension; } var quries={}; for (var key in options) { - quries[key]=ClientRequestContext.parseQueryOption(options[key]); + quries[key]=ClientRequestContext._parseQueryOption(options[key]); } var action=OfficeExtension.ActionFactory.createRecursiveQueryAction(this, clientObj, { Queries: quries, MaxDepth: maxDepth }); this._pendingRequest.addActionResultHandler(action, clientObj); @@ -8644,6 +9028,8 @@ var OfficeExtension; ClientRequestContext.prototype.trace=function (message) { OfficeExtension.ActionFactory.createTraceAction(this, message, true); }; + ClientRequestContext.prototype._processOfficeJsErrorResponse=function (officeJsErrorCode, response) { + }; ClientRequestContext.prototype.syncPrivateMain=function () { var _this=this; return OfficeExtension.Utility._createPromiseFromResult(null) @@ -8671,13 +9057,14 @@ var OfficeExtension; } }) .then(function () { - return _this.syncPrivate(); + var req=_this._pendingRequest; + _this.m_pendingRequest=null; + return _this.processPreSyncPromises(req) + .then(function () { return _this.syncPrivate(req); }); }); }; - ClientRequestContext.prototype.syncPrivate=function () { + ClientRequestContext.prototype.syncPrivate=function (req) { var _this=this; - var req=this._pendingRequest; - this.m_pendingRequest=null; if (!req.hasActions) { return this.processPendingEventHandlers(req); } @@ -8685,7 +9072,7 @@ var OfficeExtension; var requestFlags=req.flags; if (!this._requestExecutor) { if (OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)) { - this._requestExecutor=new OfficeExtension.OfficeJsRequestExecutor(); + this._requestExecutor=new OfficeExtension.OfficeJsRequestExecutor(this); } else { this._requestExecutor=new OfficeExtension.HttpRequestExecutor(); @@ -8703,8 +9090,10 @@ var OfficeExtension; req.invalidatePendingInvalidObjectPaths(); var errorFromResponse=null; var errorFromProcessEventHandlers=null; + this._lastSyncStart=performance.now(); return requestExecutor.executeAsync(this._customData, requestFlags, requestExecutorRequestMessage) .then(function (response) { + _this._lastSyncEnd=performance.now(); errorFromResponse=_this.processRequestExecutorResponseMessage(req, response); return _this.processPendingEventHandlers(req) .catch(function (ex) { @@ -8751,7 +9140,13 @@ var OfficeExtension; req._setResponseTraceIds(response.Body.TraceIds); } var traceMessages=req._responseTraceMessages; + var errorStatementInfo=null; if (response.Body) { + if (response.Body.Error && + response.Body.Error.ActionIndex >=0) { + var prettyPrinter=new OfficeExtension.RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions); + errorStatementInfo=prettyPrinter.processForDebugStatementInfo(response.Body.Error.ActionIndex); + } var actionResults=null; if (response.Body.Results) { actionResults=response.Body.Results; @@ -8777,13 +9172,18 @@ var OfficeExtension; }); } else if (response.Body && response.Body.Error) { + var debugInfo={ + errorLocation: response.Body.Error.Location + }; + if (errorStatementInfo) { + debugInfo.statement=errorStatementInfo.statement; + debugInfo.surroundingStatements=errorStatementInfo.surroundingStatements; + } return new OfficeExtension._Internal.RuntimeError({ code: response.Body.Error.Code, message: response.Body.Error.Message, traceMessages: traceMessages, - debugInfo: { - errorLocation: response.Body.Error.Location - } + debugInfo: debugInfo }); } return null; @@ -8799,8 +9199,19 @@ var OfficeExtension; ClientRequestContext.prototype.createProcessOneEventHandlersFunc=function (eventHandlers, req) { return function () { return eventHandlers._processRegistration(req); }; }; - ClientRequestContext.prototype.sync=function (passThroughValue) { - return this.syncPrivateMain().then(function () { return passThroughValue; }); + ClientRequestContext.prototype.processPreSyncPromises=function (req) { + var ret=OfficeExtension.Utility._createPromiseFromResult(null); + for (var i=0; i < req._preSyncPromises.length; i++) { + var p=req._preSyncPromises[i]; + ret=ret.then(this.createProcessOneProSyncFunc(p)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneProSyncFunc=function (p) { + return function () { return p; }; + }; + ClientRequestContext.prototype.sync=function (passThroughValue) { + return this.syncPrivateMain().then(function () { return passThroughValue; }); }; ClientRequestContext._run=function (ctxInitializer, batch, numCleanupAttempts, retryDelay, onCleanupSuccess, onCleanupFailure) { if (numCleanupAttempts===void 0) { numCleanupAttempts=3; } @@ -8837,9 +9248,15 @@ var OfficeExtension; batch=receivedRunArgs[argOffset+0]; } else if (receivedRunArgs.length==argOffset+2) { - if (receivedRunArgs[argOffset+0] instanceof OfficeExtension.ClientObject) { + if (OfficeExtension.Utility.isNullOrUndefined(receivedRunArgs[argOffset+0])) { + ctxRetriever=ctxInitializer; + } + else if (receivedRunArgs[argOffset+0] instanceof OfficeExtension.ClientObject) { ctxRetriever=function () { return receivedRunArgs[argOffset+0].context; }; } + else if (receivedRunArgs[argOffset+0] instanceof ClientRequestContext) { + ctxRetriever=function () { return receivedRunArgs[argOffset+0]; }; + } else if (Array.isArray(receivedRunArgs[argOffset+0])) { var array=receivedRunArgs[argOffset+0]; if (array.length==0) { @@ -9005,6 +9422,79 @@ var OfficeExtension; return ClientResult; }()); OfficeExtension.ClientResult=ClientResult; + var RetrieveResult=(function () { + function RetrieveResult(m_proxy, m_shouldPolyfill) { + this.m_proxy=m_proxy; + this.m_shouldPolyfill=m_shouldPolyfill; + } + Object.defineProperty(RetrieveResult.prototype, "proxy", { + get: function () { + return this.m_proxy; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RetrieveResult.prototype, "data", { + get: function () { + if (!this.m_isLoaded) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.valueNotLoaded, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: "retrieveResult.data" + } + }); + } + return this.m_data; + }, + enumerable: true, + configurable: true + }); + RetrieveResult.prototype._handleResult=function (value) { + this.m_isLoaded=true; + if (typeof (value)==="object" && value && value._IsNull) { + this.m_data=null; + return; + } + if (this.m_shouldPolyfill) { + this.m_data=this.changePropertyNameToCamelLowerCase(value); + } + else { + this.m_data=value; + } + }; + RetrieveResult.prototype.changePropertyNameToCamelLowerCase=function (value) { + var charCodeUnderscore=95; + if (Array.isArray(value)) { + var ret=[]; + for (var i=0; i < value.length; i++) { + ret.push(this.changePropertyNameToCamelLowerCase(value[i])); + } + return ret; + } + else if (typeof (value)==="object" && value !==null) { + var ret={}; + for (var key in value) { + var propValue=value[key]; + if (key==="_Items") { + ret={}; + ret["items"]=this.changePropertyNameToCamelLowerCase(propValue); + break; + } + else if (key.charCodeAt(0) !==charCodeUnderscore) { + var propName=OfficeExtension.Utility._toCamelLowerCase(key); + ret[propName]=this.changePropertyNameToCamelLowerCase(propValue); + } + } + return ret; + } + else { + return value; + } + }; + return RetrieveResult; + }()); + OfficeExtension.RetrieveResult=RetrieveResult; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { @@ -9026,6 +9516,9 @@ var OfficeExtension; Constants.sourceLibHeader="SdkVersion"; Constants.embeddingPageOrigin="EmbeddingPageOrigin"; Constants.embeddingPageSessionInfo="EmbeddingPageSessionInfo"; + Constants.eventMessageCategory=65536; + Constants.eventWorkbookId="Workbook"; + Constants.eventSourceRemote="Remote"; return Constants; }()); OfficeExtension.Constants=Constants; @@ -9356,7 +9849,7 @@ var OfficeExtension; debugInfo[key]=partialDebugInfo[key]; } if (this.innerError) { - if (this.innerError instanceof OfficeExtension.Error) { + if (this.innerError instanceof OfficeExtension._Internal.RuntimeError) { debugInfo.innerError=this.innerError.debugInfo; } else { @@ -9441,6 +9934,20 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(EventHandlers.prototype, "_context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_callback", { + get: function () { + return this.m_callback; + }, + enumerable: true, + configurable: true + }); EventHandlers.prototype.add=function (handler) { var action=OfficeExtension.ActionFactory.createTraceAction(this.m_context, null, false); this.m_context._pendingRequest._addPendingEventHandlerAction(this, { id: action.actionInfo.Id, handler: handler, operation: 0 }); @@ -9534,6 +10041,13 @@ var OfficeExtension; this.m_allHandlers=handlers; this.m_handler=handler; } + Object.defineProperty(EventHandlerResult.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); EventHandlerResult.prototype.remove=function () { if (this.m_allHandlers && this.m_handler) { this.m_allHandlers.remove(this.m_handler); @@ -9568,6 +10082,8 @@ var OfficeExtension; return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged, handler, callback); }); case 1: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.settings.addHandlerAsync(Office.EventType.SettingsChanged, handler, callback); }); + case 5: + return OfficeExtension.Utility.promisify(function (callback) { return OSF.DDA.RichApi.richApiMessageManager.addHandlerAsync("richApiMessage", handler, callback); }); case 13: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.ObjectDeleted, handler, { id: targetId }, callback); }); case 14: @@ -9596,6 +10112,8 @@ var OfficeExtension; return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.DocumentSelectionChanged, { handler: handler }, callback); }); case 1: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.settings.removeHandlerAsync(Office.EventType.SettingsChanged, { handler: handler }, callback); }); + case 5: + return OfficeExtension.Utility.promisify(function (callback) { return OSF.DDA.RichApi.richApiMessageManager.removeHandlerAsync("richApiMessage", { handler: handler }, callback); }); case 13: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDeleted, { id: targetId, handler: handler }, callback); }); case 14: @@ -9666,6 +10184,139 @@ var OfficeExtension; OfficeExtension.EventRegistration=EventRegistration; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var GenericEventRegistration=(function () { + function GenericEventRegistration() { + this.m_eventRegistration=new OfficeExtension.EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)); + this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this); + } + GenericEventRegistration.prototype.ready=function () { + var _this=this; + if (!this.m_ready) { + if (GenericEventRegistration._testReadyImpl) { + this.m_ready=GenericEventRegistration._testReadyImpl() + .then(function () { + _this.m_isReady=true; + }); + } + else { + this.m_ready=OfficeExtension._Internal.officeJsEventRegistration.register(5, "", this.m_richApiMessageHandler) + .then(function () { + _this.m_isReady=true; + }); + } + } + return this.m_ready; + }; + Object.defineProperty(GenericEventRegistration.prototype, "isReady", { + get: function () { + return this.m_isReady; + }, + enumerable: true, + configurable: true + }); + GenericEventRegistration.prototype.register=function (eventId, targetId, handler) { + var _this=this; + return this.ready() + .then(function () { return _this.m_eventRegistration.register(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype.unregister=function (eventId, targetId, handler) { + var _this=this; + return this.ready() + .then(function () { return _this.m_eventRegistration.unregister(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype._registerEventImpl=function (eventId, targetId) { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._unregisterEventImpl=function (eventId, targetId) { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._handleRichApiMessage=function (msg) { + if (msg && msg.entries) { + for (var entryIndex=0; entryIndex < msg.entries.length; entryIndex++) { + var entry=msg.entries[entryIndex]; + if (entry.messageCategory==OfficeExtension.Constants.eventMessageCategory) { + if (OfficeExtension.Utility._logEnabled) { + OfficeExtension.Utility.log(JSON.stringify(entry)); + } + var funcs=this.m_eventRegistration.getHandlers(entry.messageType, entry.targetId); + if (funcs.length > 0) { + var arg=JSON.parse(entry.message); + if (entry.isRemoteOverride) { + arg.source=OfficeExtension.Constants.eventSourceRemote; + } + for (var i=0; i < funcs.length; i++) { + funcs[i](arg); + } + } + } + } + } + }; + GenericEventRegistration.getGenericEventRegistration=function () { + if (!GenericEventRegistration.s_genericEventRegistration) { + GenericEventRegistration.s_genericEventRegistration=new GenericEventRegistration(); + } + return GenericEventRegistration.s_genericEventRegistration; + }; + GenericEventRegistration.richApiMessageEventCategory=65536; + return GenericEventRegistration; + }()); + function _testSetRichApiMessageReadyImpl(impl) { + GenericEventRegistration._testReadyImpl=impl; + } + OfficeExtension._testSetRichApiMessageReadyImpl=_testSetRichApiMessageReadyImpl; + function _testTriggerRichApiMessageEvent(msg) { + GenericEventRegistration.getGenericEventRegistration()._handleRichApiMessage(msg); + } + OfficeExtension._testTriggerRichApiMessageEvent=_testTriggerRichApiMessageEvent; + var GenericEventHandlers=(function (_super) { + __extends(GenericEventHandlers, _super); + function GenericEventHandlers(context, parentObject, name, eventInfo) { + _super.call(this, context, parentObject, name, eventInfo); + this.m_genericEventInfo=eventInfo; + } + GenericEventHandlers.prototype.add=function (handler) { + var _this=this; + if ((this._handlers.length==0) && this.m_genericEventInfo.registerFunc) { + this.m_genericEventInfo.registerFunc(); + } + if (!GenericEventRegistration.getGenericEventRegistration().isReady) { + this._context._pendingRequest._addPreSyncPromise(GenericEventRegistration.getGenericEventRegistration().ready()); + } + OfficeExtension.ActionFactory.createTraceMarkerForCallback(this._context, function () { + _this._handlers.push(handler); + if (_this._handlers.length==1) { + GenericEventRegistration.getGenericEventRegistration().register(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + return new OfficeExtension.EventHandlerResult(this._context, this, handler); + }; + GenericEventHandlers.prototype.remove=function (handler) { + var _this=this; + if ((this._handlers.length==1) && this.m_genericEventInfo.unregisterFunc) { + this.m_genericEventInfo.unregisterFunc(); + } + OfficeExtension.ActionFactory.createTraceMarkerForCallback(this._context, function () { + var handlers=_this._handlers; + for (var index=handlers.length - 1; index >=0; index--) { + if (handlers[index]===handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length==0) { + GenericEventRegistration.getGenericEventRegistration().unregister(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + }; + GenericEventHandlers.prototype.removeAll=function () { + }; + return GenericEventHandlers; + }(OfficeExtension.EventHandlers)); + OfficeExtension.GenericEventHandlers=GenericEventHandlers; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var HttpRequestExecutor=(function () { function HttpRequestExecutor() { @@ -9717,15 +10368,6 @@ var OfficeExtension; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { - var _Internal; - (function (_Internal) { - _Internal.OfficeRequire=function () { - if (typeof (require) !=="undefined") { - return require; - } - return null; - }(); - })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); var HttpUtility=(function () { function HttpUtility() { } @@ -9733,7 +10375,7 @@ var OfficeExtension; HttpUtility.s_customSendRequestFunc=func; }; HttpUtility.xhrSendRequestFunc=function (request) { - return new _Internal.OfficePromise(function (resolve, reject) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { var xhr=new XMLHttpRequest(); xhr.open(request.method, request.url); xhr.onload=function () { @@ -9745,7 +10387,7 @@ var OfficeExtension; resolve(resp); }; xhr.onerror=function () { - reject(new _Internal.RuntimeError({ + reject(new OfficeExtension._Internal.RuntimeError({ code: OfficeExtension.ErrorCodes.connectionFailure, message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.connectionFailureWithStatus, xhr.statusText) })); @@ -9758,34 +10400,11 @@ var OfficeExtension; xhr.send(request.body); }); }; - HttpUtility.nodejsRequestModuleSendRequestFunc=function (requestInfo) { - HttpUtility.logRequest(requestInfo); - var fetch=_Internal.OfficeRequire(HttpUtility.NodeJsRequestModuleName); - return fetch(requestInfo.url, { method: requestInfo.method, headers: requestInfo.headers, body: requestInfo.body }) - .then(function (resp) { - return resp.text() - .then(function (body) { - var statusCode=resp.status; - var headers={}; - resp.headers.forEach(function (value, name) { - headers[name]=value; - }); - var ret={ statusCode: statusCode, headers: headers, body: body }; - HttpUtility.logResponse(ret); - return ret; - }); - }); - }; HttpUtility.sendRequest=function (request) { HttpUtility.validateAndNormalizeRequest(request); var func=HttpUtility.s_customSendRequestFunc; if (!func) { - if (typeof (window)==="undefined" || typeof (XMLHttpRequest)==="undefined") { - func=HttpUtility.nodejsRequestModuleSendRequestFunc; - } - else { - func=HttpUtility.xhrSendRequestFunc; - } + func=HttpUtility.xhrSendRequestFunc; } return func(request); }; @@ -9801,7 +10420,7 @@ var OfficeExtension; HttpUtility.officeJsSendLocalDocumentRequestFunc=function (request) { request=OfficeExtension.Utility._validateLocalDocumentRequest(request); var requestSafeArray=OfficeExtension.Utility._buildRequestMessageSafeArray(request); - return new _Internal.OfficePromise(function (resolve, reject) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { OSF.DDA.RichApi.executeRichApiRequestAsync(requestSafeArray, function (asyncResult) { var response; if (asyncResult.status=="succeeded") { @@ -9821,7 +10440,7 @@ var OfficeExtension; }; HttpUtility.validateAndNormalizeRequest=function (request) { if (OfficeExtension.Utility.isNullOrUndefined(request)) { - throw _Internal.RuntimeError._createInvalidArgError({ + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError({ argumentName: "request" }); } @@ -9858,7 +10477,6 @@ var OfficeExtension; } } }; - HttpUtility.NodeJsRequestModuleName="node-fetch"; HttpUtility._logBody=false; return HttpUtility; }()); @@ -9882,6 +10500,146 @@ var OfficeExtension; ; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var HostBridgeRequestExecutor=(function () { + function HostBridgeRequestExecutor(session) { + this.m_session=session; + } + HostBridgeRequestExecutor.prototype.executeAsync=function (customData, requestFlags, requestMessage) { + var httpRequestInfo={ + url: OfficeExtension.Constants.processQuery, + method: "POST", + headers: requestMessage.Headers, + body: requestMessage.Body + }; + var message={ + id: HostBridgeSession.nextId(), + type: 1, + flags: requestFlags, + message: httpRequestInfo + }; + OfficeExtension.Utility.log(JSON.stringify(message)); + return this.m_session.sendMessageToHost(message) + .then(function (nativeBridgeResponse) { + OfficeExtension.Utility.log("Received response: "+JSON.stringify(nativeBridgeResponse)); + var responseInfo=nativeBridgeResponse.message; + var response; + if (responseInfo.statusCode===200) { + response={ ErrorCode: null, ErrorMessage: null, Headers: responseInfo.headers, Body: responseInfo.body }; + } + else { + OfficeExtension.Utility.log("Error Response:"+responseInfo.body); + var error=OfficeExtension.Utility._parseErrorResponse(responseInfo); + response={ + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null + }; + } + return response; + }); + }; + return HostBridgeRequestExecutor; + }()); + var HostBridgeSession=(function (_super) { + __extends(HostBridgeSession, _super); + function HostBridgeSession(bridge) { + var _this=this; + _super.call(this); + this.m_promiseResolver={}; + this.m_bridge=bridge; + this.m_bridge.onMessageFromHost=function (msg) { + _this.onMessageFromHost(msg); + }; + } + HostBridgeSession.prototype._resolveRequestUrlAndHeaderInfo=function () { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + HostBridgeSession.prototype._createRequestExecutorOrNull=function () { + OfficeExtension.Utility.log("NativeBridgeSession::CreateRequestExecutor"); + return new HostBridgeRequestExecutor(this); + }; + Object.defineProperty(HostBridgeSession.prototype, "eventRegistration", { + get: function () { + return OfficeExtension._Internal.officeJsEventRegistration; + }, + enumerable: true, + configurable: true + }); + HostBridgeSession.init=function (bridge) { + if (bridge && typeof (bridge)==="object") { + var session=new HostBridgeSession(bridge); + OfficeExtension.ClientRequestContext._overrideSession=session; + OfficeExtension.HttpUtility.setCustomSendLocalDocumentRequestFunc(function (request) { + var bridgeMessage={ + id: HostBridgeSession.nextId(), + type: 1, + flags: 0, + message: request + }; + return session.sendMessageToHost(bridgeMessage) + .then(function (bridgeResponse) { + var responseInfo=bridgeResponse.message; + return responseInfo; + }); + }); + } + }; + HostBridgeSession.prototype.sendMessageToHost=function (message) { + var _this=this; + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + var ret=new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { + _this.m_promiseResolver[message.id]=resolve; + }); + return ret; + }; + HostBridgeSession.prototype.onMessageFromHost=function (messageText) { + if (messageText==="test") { + if (HostBridgeTest._testFunc) { + HostBridgeTest._testFunc(); + } + } + else { + var message=JSON.parse(messageText); + if (typeof (message.id)==="number") { + var resolve=this.m_promiseResolver[message.id]; + if (resolve) { + resolve(message); + } + delete this.m_promiseResolver[message.id]; + } + } + }; + HostBridgeSession.nextId=function () { + return HostBridgeSession.s_nextId++; + }; + HostBridgeSession.s_nextId=1; + return HostBridgeSession; + }(OfficeExtension.SessionBase)); + var HostBridge=(function () { + function HostBridge() { + } + HostBridge.init=function (bridge) { + HostBridgeSession.init(bridge); + }; + return HostBridge; + }()); + OfficeExtension.HostBridge=HostBridge; + if (typeof (_richApiNativeBridge)==="object" && _richApiNativeBridge) { + HostBridge.init(_richApiNativeBridge); + } + var HostBridgeTest=(function () { + function HostBridgeTest() { + } + HostBridgeTest.setTestFunc=function (func) { + HostBridgeTest._testFunc=func; + }; + return HostBridgeTest; + }()); + OfficeExtension.HostBridgeTest=HostBridgeTest; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var ObjectPath=(function () { function ObjectPath(objectPathInfo, parentObjectPath, isCollection, isInvalidAfterRequest) { @@ -9909,6 +10667,16 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(ObjectPath.prototype, "isRestrictedResourceAccess", { + get: function () { + return this.m_isRestrictedResourceAccess; + }, + set: function (value) { + this.m_isRestrictedResourceAccess=value; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ObjectPath.prototype, "isCollection", { get: function () { return this.m_isCollection; @@ -9995,6 +10763,7 @@ var OfficeExtension; this.m_objectPathInfo.ObjectPathType=6; this.m_objectPathInfo.Name=referenceId; this.m_objectPathInfo.ArgumentInfo={}; + delete this.m_objectPathInfo.ParentObjectPathId; this.m_parentObjectPath=null; this.m_argumentObjectPaths=null; return; @@ -10009,15 +10778,15 @@ var OfficeExtension; if (!OfficeExtension.Utility.isNullOrUndefined(id)) { this.m_isInvalidAfterRequest=false; this.m_isValid=true; - if (parentIsCollection) { - this.m_objectPathInfo.ObjectPathType=5; - this.m_objectPathInfo.Name=""; - } - else { + if (!OfficeExtension.Utility.isNullOrEmptyString(getByIdMethodName)) { this.m_objectPathInfo.ObjectPathType=3; this.m_objectPathInfo.Name=getByIdMethodName; this.m_getByIdMethodName=null; } + else { + this.m_objectPathInfo.ObjectPathType=5; + this.m_objectPathInfo.Name=""; + } this.isWriteOperation=false; this.m_objectPathInfo.ArgumentInfo={}; this.m_objectPathInfo.ArgumentInfo.Arguments=[id]; @@ -10052,18 +10821,22 @@ var OfficeExtension; var objectPathInfo={ Id: context._nextId(), ObjectPathType: 1, Name: "" }; return new OfficeExtension.ObjectPath(objectPathInfo, null, false, false); }; - ObjectPathFactory.createNewObjectObjectPath=function (context, typeName, isCollection) { + ObjectPathFactory.createNewObjectObjectPath=function (context, typeName, isCollection, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 2, Name: typeName }; - return new OfficeExtension.ObjectPath(objectPathInfo, null, isCollection, false); + var ret=new OfficeExtension.ObjectPath(objectPathInfo, null, isCollection, false); + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; }; - ObjectPathFactory.createPropertyObjectPath=function (context, parent, propertyName, isCollection, isInvalidAfterRequest) { + ObjectPathFactory.createPropertyObjectPath=function (context, parent, propertyName, isCollection, isInvalidAfterRequest, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 4, Name: propertyName, ParentObjectPathId: parent._objectPath.objectPathInfo.Id, }; - return new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest); + var ret=new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest); + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; }; ObjectPathFactory.createIndexerObjectPath=function (context, parent, args) { var objectPathInfo={ @@ -10087,7 +10860,7 @@ var OfficeExtension; objectPathInfo.ArgumentInfo.Arguments=args; return new OfficeExtension.ObjectPath(objectPathInfo, parentObjectPath, false, false); }; - ObjectPathFactory.createMethodObjectPath=function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName) { + ObjectPathFactory.createMethodObjectPath=function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 3, @@ -10100,6 +10873,7 @@ var OfficeExtension; ret.argumentObjectPaths=argumentObjectPaths; ret.isWriteOperation=(operationType !=1); ret.getByIdMethodName=getByIdMethodName; + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; return ret; }; ObjectPathFactory.createReferenceIdObjectPath=function (context, referenceId) { @@ -10161,9 +10935,11 @@ var OfficeExtension; var OfficeExtension; (function (OfficeExtension) { var OfficeJsRequestExecutor=(function () { - function OfficeJsRequestExecutor() { + function OfficeJsRequestExecutor(context) { + this.m_context=context; } OfficeJsRequestExecutor.prototype.executeAsync=function (customData, requestFlags, requestMessage) { + var _this=this; var messageSafearray=OfficeExtension.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, OfficeJsRequestExecutor.SourceLibHeaderValue); return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { OSF.DDA.RichApi.executeRichApiRequestAsync(messageSafearray, function (result) { @@ -10175,6 +10951,7 @@ var OfficeExtension; } else { response=OfficeExtension.RichApiMessageUtility.buildResponseOnError(result.error.code, result.error.message); + _this.m_context._processOfficeJsErrorResponse(result.error.code, response); } resolve(response); }); @@ -10187,6 +10964,12 @@ var OfficeExtension; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + var _Internal; + (function (_Internal) { + _Internal.OfficeRequire=function () { + return null; + }(); + })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); var _Internal; (function (_Internal) { var PromiseImpl; @@ -10290,17 +11073,6 @@ var OfficeExtension; } lib$es6$promise$asap$$len=0; } - function lib$es6$promise$asap$$attemptVertex() { - try { - var r=require; - var vertx=r('vertx'); - lib$es6$promise$asap$$vertxNext=vertx.runOnLoop || vertx.runOnContext; - return lib$es6$promise$asap$$useVertxTimer(); - } - catch (e) { - return lib$es6$promise$asap$$useSetTimeout(); - } - } var lib$es6$promise$asap$$scheduleFlush; if (lib$es6$promise$asap$$isNode) { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useNextTick(); @@ -10311,9 +11083,6 @@ var OfficeExtension; else if (lib$es6$promise$asap$$isWorker) { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useMessageChannel(); } - else if (lib$es6$promise$asap$$browserWindow===undefined && typeof require==='function') { - lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$attemptVertex(); - } else { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useSetTimeout(); } @@ -10832,25 +11601,332 @@ var OfficeExtension; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { - var ResourceStrings=(function () { - function ResourceStrings() { - } - ResourceStrings.cannotRegisterEvent="CannotRegisterEvent"; - ResourceStrings.connectionFailureWithStatus="ConnectionFailureWithStatus"; - ResourceStrings.connectionFailureWithDetails="ConnectionFailureWithDetails"; - ResourceStrings.invalidObjectPath="InvalidObjectPath"; - ResourceStrings.invalidRequestContext="InvalidRequestContext"; - ResourceStrings.invalidArgument="InvalidArgument"; - ResourceStrings.invalidArgumentGeneric="InvalidArgumentGeneric"; - ResourceStrings.propertyNotLoaded="PropertyNotLoaded"; - ResourceStrings.runMustReturnPromise="RunMustReturnPromise"; - ResourceStrings.timeout="Timeout"; - ResourceStrings.propertyDoesNotExist="PropertyDoesNotExist"; - ResourceStrings.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty"; - ResourceStrings.moreInfoInnerError="MoreInfoInnerError"; - ResourceStrings.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod"; - ResourceStrings.valueNotLoaded="ValueNotLoaded"; - ResourceStrings.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage"; + var RequestPrettyPrinter=(function () { + function RequestPrettyPrinter(globalObjName, referencedObjectPaths, actions, showDispose) { + if (!globalObjName) { + globalObjName="root"; + } + this.m_globalObjName=globalObjName; + this.m_referencedObjectPaths=referencedObjectPaths; + this.m_actions=actions; + this.m_statements=[]; + this.m_variableNameForObjectPathMap={}; + this.m_variableNameToObjectPathMap={}; + this.m_declaredObjectPathMap={}; + this.m_showDispose=showDispose; + } + RequestPrettyPrinter.prototype.process=function () { + if (this.m_showDispose) { + OfficeExtension.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + for (var i=0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + } + return this.m_statements; + }; + RequestPrettyPrinter.prototype.processForDebugStatementInfo=function (actionIndex) { + if (this.m_showDispose) { + OfficeExtension.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + var surroundingCount=5; + this.m_statements=[]; + var oneStatement=""; + var statementIndex=-1; + for (var i=0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + if (actionIndex==i) { + statementIndex=this.m_statements.length - 1; + } + if (statementIndex >=0 && this.m_statements.length > statementIndex+surroundingCount+1) { + break; + } + } + if (statementIndex < 0) { + return null; + } + var startIndex=statementIndex - surroundingCount; + if (startIndex < 0) { + startIndex=0; + } + var endIndex=statementIndex+1+surroundingCount; + if (endIndex > this.m_statements.length) { + endIndex=this.m_statements.length; + } + var surroundingStatements=[]; + if (startIndex !=0) { + surroundingStatements.push("..."); + } + for (var i_1=startIndex; i_1 < statementIndex; i_1++) { + surroundingStatements.push(this.m_statements[i_1]); + } + surroundingStatements.push("// >>>>>"); + surroundingStatements.push(this.m_statements[statementIndex]); + surroundingStatements.push("// <<<<<"); + for (var i_2=statementIndex+1; i_2 < endIndex; i_2++) { + surroundingStatements.push(this.m_statements[i_2]); + } + if (endIndex < this.m_statements.length) { + surroundingStatements.push("..."); + } + return { + statement: this.m_statements[statementIndex], + surroundingStatements: surroundingStatements + }; + }; + RequestPrettyPrinter.prototype.processOneAction=function (action) { + var actionInfo=action.actionInfo; + switch (actionInfo.ActionType) { + case 1: + this.processInstantiateAction(action); + break; + case 3: + this.processMethodAction(action); + break; + case 2: + this.processQueryAction(action); + break; + case 7: + this.processQueryAsJsonAction(action); + break; + case 6: + this.processRecursiveQueryAction(action); + break; + case 4: + this.processSetPropertyAction(action); + break; + case 5: + this.processTraceAction(action); + break; + case 8: + this.processEnsureUnchangedAction(action); + break; + } + }; + RequestPrettyPrinter.prototype.processInstantiateAction=function (action) { + var objId=action.actionInfo.ObjectPathId; + var objPath=this.m_referencedObjectPaths[objId]; + var varName=this.getObjVarName(objId); + if (!this.m_declaredObjectPathMap[objId]) { + var statement="var "+varName+"="+this.buildObjectPathExpressionWithParent(objPath)+";"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + this.m_declaredObjectPathMap[objId]=varName; + } + else { + var statement="// Instantiate {"+varName+"}"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + } + }; + RequestPrettyPrinter.prototype.processMethodAction=function (action) { + var methodName=action.actionInfo.Name; + if (methodName==="_KeepReference") { + methodName="track"; + } + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+"."+OfficeExtension.Utility._toCamelLowerCase(methodName)+"("+this.buildArgumentsExpression(action.actionInfo.ArgumentInfo)+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAction=function (action) { + var queryExp=this.buildQueryExpression(action); + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".load("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAsJsonAction=function (action) { + var queryExp=this.buildQueryExpression(action); + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".loadJson("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processRecursiveQueryAction=function (action) { + var queryExp=""; + if (action.actionInfo.RecursiveQueryInfo) { + queryExp=JSON.stringify(action.actionInfo.RecursiveQueryInfo); + } + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".loadRecursive("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processSetPropertyAction=function (action) { + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+"."+OfficeExtension.Utility._toCamelLowerCase(action.actionInfo.Name)+"="+this.buildArgumentsExpression(action.actionInfo.ArgumentInfo)+";"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processTraceAction=function (action) { + var statement="context.trace();"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processEnsureUnchangedAction=function (action) { + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".ensureUnchanged("+JSON.stringify(action.actionInfo.ObjectState)+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.appendDisposeCommentIfRelevant=function (statement, action) { + var _this=this; + if (this.m_showDispose) { + var lastUsedObjectPathIds=action.actionInfo.L; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + var objectNamesToDispose=lastUsedObjectPathIds.map(function (item) { return _this.getObjVarName(item); }).join(", "); + return statement+" // And then dispose {"+objectNamesToDispose+"}"; + } + } + return statement; + }; + RequestPrettyPrinter.prototype.buildQueryExpression=function (action) { + if (action.actionInfo.QueryInfo) { + var option={}; + option.select=action.actionInfo.QueryInfo.Select; + option.expand=action.actionInfo.QueryInfo.Expand; + option.skip=action.actionInfo.QueryInfo.Skip; + option.top=action.actionInfo.QueryInfo.Top; + if (typeof (option.top)==="undefined" && typeof (option.skip)==="undefined" && typeof (option.expand)==="undefined") { + if (typeof (option.select)==="undefined") { + return ""; + } + else { + return JSON.stringify(option.select); + } + } + else { + return JSON.stringify(option); + } + } + return ""; + }; + RequestPrettyPrinter.prototype.buildObjectPathExpressionWithParent=function (objPath) { + var hasParent=objPath.objectPathInfo.ObjectPathType==5 || + objPath.objectPathInfo.ObjectPathType==3 || + objPath.objectPathInfo.ObjectPathType==4; + if (hasParent && objPath.objectPathInfo.ParentObjectPathId) { + return this.getObjVarName(objPath.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(objPath); + } + return this.buildObjectPathExpression(objPath); + }; + RequestPrettyPrinter.prototype.buildObjectPathExpression=function (objPath) { + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + return "context."+this.m_globalObjName; + case 5: + return "getItem("+this.buildArgumentsExpression(objPath.objectPathInfo.ArgumentInfo)+")"; + case 3: + return OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name)+"("+this.buildArgumentsExpression(objPath.objectPathInfo.ArgumentInfo)+")"; + case 2: + return objPath.objectPathInfo.Name+".newObject()"; + case 7: + return "null"; + case 4: + return OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + case 6: + return "context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(objPath.objectPathInfo.Name)+")"; + } + }; + RequestPrettyPrinter.prototype.buildArgumentsExpression=function (args) { + var ret=""; + if (!args.Arguments) { + return ret; + } + for (var i=0; i < args.Arguments.length; i++) { + if (i > 0) { + ret=ret+", "; + } + ret=ret+this.buildArgumentLiteral(args.Arguments[i], args.ReferencedObjectPathIds ? args.ReferencedObjectPathIds[i] : null); + } + if (ret==="undefined") { + ret=""; + } + return ret; + }; + RequestPrettyPrinter.prototype.buildArgumentLiteral=function (value, objectPathId) { + if (typeof value=="number" && value===objectPathId) { + return this.getObjVarName(objectPathId); + } + else { + return JSON.stringify(value); + } + }; + RequestPrettyPrinter.prototype.getObjVarNameBase=function (objectPathId) { + var ret="v"; + var objPath=this.m_referencedObjectPaths[objectPathId]; + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + ret=this.m_globalObjName; + break; + case 4: + ret=OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + break; + case 3: + var methodName=objPath.objectPathInfo.Name; + if (methodName.length > 3 && methodName.substr(0, 3)==="Get") { + methodName=methodName.substr(3); + } + ret=OfficeExtension.Utility._toCamelLowerCase(methodName); + break; + case 5: + var parentName=this.getObjVarNameBase(objPath.objectPathInfo.ParentObjectPathId); + if (parentName.charAt(parentName.length - 1)==="s") { + ret=parentName.substr(0, parentName.length - 1); + } + else { + ret=parentName+"Item"; + } + break; + } + return ret; + }; + RequestPrettyPrinter.prototype.getObjVarName=function (objectPathId) { + if (this.m_variableNameForObjectPathMap[objectPathId]) { + return this.m_variableNameForObjectPathMap[objectPathId]; + } + var ret=this.getObjVarNameBase(objectPathId); + if (!this.m_variableNameToObjectPathMap[ret]) { + this.m_variableNameForObjectPathMap[objectPathId]=ret; + this.m_variableNameToObjectPathMap[ret]=objectPathId; + return ret; + } + var i=1; + while (this.m_variableNameToObjectPathMap[ret+i.toString()]) { + i++; + } + ret=ret+i.toString(); + this.m_variableNameForObjectPathMap[objectPathId]=ret; + this.m_variableNameToObjectPathMap[ret]=objectPathId; + return ret; + }; + return RequestPrettyPrinter; + }()); + OfficeExtension.RequestPrettyPrinter=RequestPrettyPrinter; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + var ResourceStrings=(function () { + function ResourceStrings() { + } + ResourceStrings.cannotRegisterEvent="CannotRegisterEvent"; + ResourceStrings.connectionFailureWithStatus="ConnectionFailureWithStatus"; + ResourceStrings.connectionFailureWithDetails="ConnectionFailureWithDetails"; + ResourceStrings.invalidObjectPath="InvalidObjectPath"; + ResourceStrings.invalidRequestContext="InvalidRequestContext"; + ResourceStrings.invalidArgument="InvalidArgument"; + ResourceStrings.invalidArgumentGeneric="InvalidArgumentGeneric"; + ResourceStrings.propertyNotLoaded="PropertyNotLoaded"; + ResourceStrings.runMustReturnPromise="RunMustReturnPromise"; + ResourceStrings.timeout="Timeout"; + ResourceStrings.propertyDoesNotExist="PropertyDoesNotExist"; + ResourceStrings.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty"; + ResourceStrings.moreInfoInnerError="MoreInfoInnerError"; + ResourceStrings.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod"; + ResourceStrings.valueNotLoaded="ValueNotLoaded"; + ResourceStrings.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage"; + ResourceStrings.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"; + ResourceStrings.customFunctionDefintionMissing="CustomFunctionDefintionMissing"; + ResourceStrings.customFunctionImplementationMissing="CustomFunctionImplementationMissing"; + ResourceStrings.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars"; + ResourceStrings.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit"; + ResourceStrings.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch"; + ResourceStrings.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing"; + ResourceStrings.apiNotFoundDetails="ApiNotFoundDetails"; return ResourceStrings; }()); OfficeExtension.ResourceStrings=ResourceStrings; @@ -10870,7 +11946,15 @@ var OfficeExtension; ResourceStringValues.RunMustReturnPromise="The batch function passed to the \".run\" method didn't return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from \"context.sync()\"."; ResourceStringValues.Timeout="The operation has timed out."; ResourceStringValues.ValueNotLoaded="The value of the result object has not been loaded yet. Before reading the value property, call \"context.sync()\" on the associated request context."; - ResourceStringValues.invalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page."; + ResourceStringValues.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page."; + ResourceStringValues.InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again."; + ResourceStringValues.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions."; + ResourceStringValues.CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function."; + ResourceStringValues.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods."; + ResourceStringValues.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name."; + ResourceStringValues.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it."; + ResourceStringValues.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable."; + ResourceStringValues.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}."; return ResourceStringValues; }()); OfficeExtension.ResourceStringValues=ResourceStringValues; @@ -11164,6 +12248,34 @@ var OfficeExtension; }; Utility.load=function (clientObj, option) { clientObj.context.load(clientObj, option); + return clientObj; + }; + Utility.loadAndSync=function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj.context.sync().then(function () { return clientObj; }); + }; + Utility.retrieve=function (clientObj, option) { + var shouldPolyfill=OfficeExtension._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + if (typeof (window) !=="undefined" && window.Office && window.Office.context && window.Office.context.requirements) { + shouldPolyfill=!window.Office.context.requirements.isSetSupported("RichApiRuntime", "1.1"); + } + } + var result=new OfficeExtension.RetrieveResult(clientObj, shouldPolyfill); + var queryOption=OfficeExtension.ClientRequestContext._parseQueryOption(option); + var action; + if (shouldPolyfill) { + action=OfficeExtension.ActionFactory.createQueryAction(clientObj.context, clientObj, queryOption); + } + else { + action=OfficeExtension.ActionFactory.createQueryAsJsonAction(clientObj.context, clientObj, queryOption); + } + clientObj.context._pendingRequest.addActionResultHandler(action, result); + return result; + }; + Utility.retrieveAndSync=function (clientObj, option) { + var result=Utility.retrieve(clientObj, option); + return clientObj.context.sync().then(function () { return result; }); }; Utility._parseSelectExpand=function (select) { var args=[]; @@ -11184,11 +12296,32 @@ var OfficeExtension; return '*'; } var itemsSlashLength=6; - if (propertyNameLower.substr(0, itemsSlashLength)==="items/") { + var isItemsSlashOrItemsDot=propertyNameLower.substr(0, itemsSlashLength)==="items/" || + propertyNameLower.substr(0, itemsSlashLength)==="items."; + if (isItemsSlashOrItemsDot) { propertyName=propertyName.substr(itemsSlashLength); } - return propertyName.replace(new RegExp("\/items\/", "gi"), "/"); + return propertyName.replace(new RegExp("[\/\.]items[\/\.]", "gi"), "/"); + } + }; + Utility.toJson=function (clientObj, scalarProperties, navigationProperties, collectionItemsIfAny) { + var result={}; + for (var prop in scalarProperties) { + var value=scalarProperties[prop]; + if (typeof value !=="undefined") { + result[prop]=value; + } } + for (var prop in navigationProperties) { + var value=navigationProperties[prop]; + if (typeof value !=="undefined") { + result[prop]=value.toJSON(); + } + } + if (collectionItemsIfAny) { + result["items"]=collectionItemsIfAny.map(function (item) { return item.toJSON(); }); + } + return result; }; Utility.throwError=function (resourceId, arg, errorLocation) { throw new OfficeExtension._Internal.RuntimeError({ @@ -11250,6 +12383,21 @@ var OfficeExtension; }); } }; + Utility.throwIfApiNotSupported=function (apiFullName, apiSetName, apiSetVersion, hostName) { + if (!Utility._doApiNotSupportedCheck) { + return; + } + if (typeof (window) !=="undefined" && window.Office && window.Office.context) { + if (!window.Office.context.requirements.isSetSupported(apiSetName, apiSetVersion)) { + var message=Utility._getResourceString(OfficeExtension.ResourceStrings.apiNotFoundDetails, [apiFullName, apiSetName+" "+apiSetVersion, hostName]); + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.apiNotFound, + message: message, + debugInfo: { errorLocation: apiFullName } + }); + } + } + }; Utility.getObjectPathExpression=function (objectPath) { var ret=""; while (objectPath) { @@ -11399,7 +12547,10 @@ var OfficeExtension; }; Utility._parseErrorResponse=function (responseInfo) { var errorObj=null; - if (!Utility.isNullOrEmptyString(responseInfo.body)) { + if (Utility.isPlainJsonObject(responseInfo.body)) { + errorObj=responseInfo.body; + } + else if (!Utility.isNullOrEmptyString(responseInfo.body)) { var errorResponseBody=Utility.trim(responseInfo.body); try { errorObj=JSON.parse(errorResponseBody); @@ -11429,8 +12580,24 @@ var OfficeExtension; } } }; + Utility._toCamelLowerCase=function (name) { + if (Utility.isNullOrEmptyString(name)) { + return name; + } + var index=0; + while (index < name.length && name.charCodeAt(index) >=65 && name.charCodeAt(index) <=90) { + index++; + } + if (index < name.length) { + return name.substr(0, index).toLowerCase()+name.substr(index); + } + else { + return name.toLowerCase(); + } + }; Utility._logEnabled=false; Utility._synchronousCleanup=false; + Utility._doApiNotSupportedCheck=false; Utility.s_underscoreCharCode="_".charCodeAt(0); return Utility; }()); @@ -11442,6 +12609,243 @@ var __extends=(this && this.__extends) || function (d, b) { function __() { this.constructor=d; } d.prototype=b===null ? Object.create(b) : (__.prototype=b.prototype, new __()); }; +var OfficeCore; +(function (OfficeCore) { + var _hostName="OfficeCore"; + var _defaultApiSetName="ExperimentApi"; + var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; + var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; + var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; + var _createNewObjectObjectPath=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath; + var _createChildItemObjectPathUsingIndexer=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer; + var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; + var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; + var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; + var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined=OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; + var _load=OfficeExtension.Utility.load; + var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; + var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; + var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var FlightingService=(function (_super) { + __extends(FlightingService, _super); + function FlightingService() { + _super.apply(this, arguments); + } + Object.defineProperty(FlightingService.prototype, "_className", { + get: function () { + return "FlightingService"; + }, + enumerable: true, + configurable: true + }); + FlightingService.prototype.getClientSessionId=function () { + var action=_createMethodAction(this.context, this, "GetClientSessionId", 1, []); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + FlightingService.prototype.getDeferredFlights=function () { + var action=_createMethodAction(this.context, this, "GetDeferredFlights", 1, []); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + FlightingService.prototype.getFeature=function (featureName, type, defaultValue, possibleValues) { + return new OfficeCore.ABType(this.context, _createMethodObjectPath(this.context, this, "GetFeature", 1, [featureName, type, defaultValue, possibleValues], false, false, null)); + }; + FlightingService.prototype.getFeatureGate=function (featureName, scope) { + return new OfficeCore.ABType(this.context, _createMethodObjectPath(this.context, this, "GetFeatureGate", 1, [featureName, scope], false, false, null)); + }; + FlightingService.prototype.resetOverride=function (featureName) { + _createMethodAction(this.context, this, "ResetOverride", 0, [featureName]); + }; + FlightingService.prototype.setOverride=function (featureName, type, value) { + _createMethodAction(this.context, this, "SetOverride", 0, [featureName, type, value]); + }; + FlightingService.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + FlightingService.newObject=function (context) { + var ret=new OfficeCore.FlightingService(context, _createNewObjectObjectPath(context, "Microsoft.Experiment.FlightingService", false)); + return ret; + }; + FlightingService.prototype.toJSON=function () { + return {}; + }; + return FlightingService; + }(OfficeExtension.ClientObject)); + OfficeCore.FlightingService=FlightingService; + var ABType=(function (_super) { + __extends(ABType, _super); + function ABType() { + _super.apply(this, arguments); + } + Object.defineProperty(ABType.prototype, "_className", { + get: function () { + return "ABType"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ABType.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this.m_value, "ABType", this._isNull); + return this.m_value; + }, + enumerable: true, + configurable: true + }); + ABType.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Value"])) { + this.m_value=obj["Value"]; + } + }; + ABType.prototype.load=function (option) { + _load(this, option); + return this; + }; + ABType.prototype.toJSON=function () { + return { + "value": this.m_value + }; + }; + return ABType; + }(OfficeExtension.ClientObject)); + OfficeCore.ABType=ABType; + var FeatureType; + (function (FeatureType) { + FeatureType.boolean="Boolean"; + FeatureType.integer="Integer"; + FeatureType.string="String"; + })(FeatureType=OfficeCore.FeatureType || (OfficeCore.FeatureType={})); + var ExperimentErrorCodes; + (function (ExperimentErrorCodes) { + ExperimentErrorCodes.generalException="GeneralException"; + })(ExperimentErrorCodes=OfficeCore.ExperimentErrorCodes || (OfficeCore.ExperimentErrorCodes={})); +})(OfficeCore || (OfficeCore={})); +var OfficeCore; +(function (OfficeCore) { + var RequestContext=(function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + _super.call(this, url); + } + Object.defineProperty(RequestContext.prototype, "flighting", { + get: function () { + return this.flightingService; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "telemetry", { + get: function () { + if (!this.m_telemetry) { + this.m_telemetry=OfficeCore.TelemetryService.newObject(this); + } + return this.m_telemetry; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "flightingService", { + get: function () { + if (!this.m_flightingService) { + this.m_flightingService=OfficeCore.FlightingService.newObject(this); + } + return this.m_flightingService; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeExtension.ClientRequestContext)); + OfficeCore.RequestContext=RequestContext; +})(OfficeCore || (OfficeCore={})); +var OfficeCore; +(function (OfficeCore) { + var _hostName="OfficeCore"; + var _defaultApiSetName="TelemetryApi"; + var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; + var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; + var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; + var _createNewObjectObjectPath=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath; + var _createChildItemObjectPathUsingIndexer=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer; + var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; + var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; + var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; + var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined=OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; + var _load=OfficeExtension.Utility.load; + var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; + var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; + var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var _typeTelemetryService="TelemetryService"; + var TelemetryService=(function (_super) { + __extends(TelemetryService, _super); + function TelemetryService() { + _super.apply(this, arguments); + } + Object.defineProperty(TelemetryService.prototype, "_className", { + get: function () { + return "TelemetryService"; + }, + enumerable: true, + configurable: true + }); + TelemetryService.prototype.sendTelemetryEvent=function (telemetryProperties, eventName, eventContract, eventFlags, value) { + _createMethodAction(this.context, this, "SendTelemetryEvent", 1, [telemetryProperties, eventName, eventContract, eventFlags, value], false); + }; + TelemetryService.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + TelemetryService.newObject=function (context) { + var ret=new OfficeCore.TelemetryService(context, _createNewObjectObjectPath(context, "Microsoft.Telemetry.TelemetryService", false, false)); + return ret; + }; + TelemetryService.prototype.toJSON=function () { + return {}; + }; + return TelemetryService; + }(OfficeExtension.ClientObject)); + OfficeCore.TelemetryService=TelemetryService; + var TelemetryErrorCodes; + (function (TelemetryErrorCodes) { + TelemetryErrorCodes.generalException="GeneralException"; + })(TelemetryErrorCodes=OfficeCore.TelemetryErrorCodes || (OfficeCore.TelemetryErrorCodes={})); +})(OfficeCore || (OfficeCore={})); + +var __extends=(this && this.__extends) || (function () { + var extendStatics=Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__=b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p]=b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor=d; } + d.prototype=b===null ? Object.create(b) : (__.prototype=b.prototype, new __()); + }; +})(); var Excel; (function (Excel) { function lowerCaseFirst(str) { @@ -11618,18 +13022,27 @@ var Excel; return _this.m_requestUrlAndHeaderInfo; }); }; - Session.WorkbookSessionIdHeaderName="Workbook-Session-Id"; - Session.WorkbookSessionIdHeaderNameLower="workbook-session-id"; return Session; }()); + Session.WorkbookSessionIdHeaderName="Workbook-Session-Id"; + Session.WorkbookSessionIdHeaderNameLower="workbook-session-id"; Excel.Session=Session; var RequestContext=(function (_super) { __extends(RequestContext, _super); function RequestContext(url) { - _super.call(this, url); - this.m_workbook=new Workbook(this, OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(this)); - this._rootObject=this.m_workbook; + var _this=_super.call(this, url) || this; + _this.m_workbook=new Workbook(_this, OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(_this)); + _this._rootObject=_this.m_workbook; + _this._rootObjectPropertyName="workbook"; + return _this; } + RequestContext.prototype._processOfficeJsErrorResponse=function (officeJsErrorCode, response) { + var ooeInvalidApiCallInContext=5004; + if (officeJsErrorCode==ooeInvalidApiCallInContext) { + response.ErrorCode=ErrorCodes.invalidOperationInCellEditMode; + response.ErrorMessage=OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidOperationInCellEditMode); + } + }; Object.defineProperty(RequestContext.prototype, "workbook", { get: function () { return this.m_workbook; @@ -11645,7 +13058,7 @@ var Excel; configurable: true }); return RequestContext; - }(OfficeExtension.ClientRequestContext)); + }(OfficeCore.RequestContext)); Excel.RequestContext=RequestContext; function run(arg1, arg2, arg3) { return OfficeExtension.ClientRequestContext._runBatch("Excel.run", arguments, function (requestInfo) { @@ -11654,6 +13067,13 @@ var Excel; }); } Excel.run=run; + function runBatch(arg1, arg2) { + return OfficeExtension.ClientRequestContext._runExplicitBatch("Excel.runBatch", arguments, function (requestInfo) { + var ret=new Excel.RequestContext(requestInfo); + return ret; + }); + } + Excel.runBatch=runBatch; Excel._RedirectV1APIs=false; Excel._V1APIMap={ "GetDataAsync": { @@ -11759,7 +13179,7 @@ var Excel; call: function (ctx, callArgs) { return ctx.workbook._V1Api.bindingClearFormats(callArgs); } }, "GetFilePropertiesAsync": { - call: function (ctx, callArgs) { return ctx.workbook._V1Api.getFilePropertiesAsync(callArgs); } + call: function (ctx) { return ctx.workbook._V1Api.getFilePropertiesAsync(); } }, }; function postprocessBindingDescriptor(response) { @@ -11784,6 +13204,40 @@ var Excel; data=window.OSF.DDA.DataCoercion.coerceData(data, callArgs[window.Microsoft.Office.WebExtension.Parameters.CoercionType]); return data==undefined ? null : data; } + function versionNumberIsEarlierThan(desiredMajor, desiredMinor, desiredBuild) { + var hasOfficeVersion=typeof (window) !=="undefined" && + window.Office && + window.Office.context && + window.Office.context.diagnostics && + window.Office.context.diagnostics.version; + if (!hasOfficeVersion) { + return false; + } + var version=window.Office.context.diagnostics.version; + var versionExtractor=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/; + var result=versionExtractor.exec(version); + if (result) { + var major=parseInt(result[1]); + var minor=parseInt(result[2]); + var build=parseInt(result[3]); + var revision=parseInt(result[4]); + var devBuild=3000; + if (major < desiredMajor) { + return true; + } + if (major==desiredMajor && minor < desiredMinor) { + return true; + } + if (major==desiredMajor && minor==desiredMinor && build < desiredBuild) { + if (revision < devBuild) { + return true; + } + } + } + return false; + } + var _hostName="Excel"; + var _defaultApiSetName="ExcelApi"; var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; @@ -11792,19 +13246,25 @@ var Excel; var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createEnsureUnchangedAction=OfficeExtension.ActionFactory.createEnsureUnchangedAction; var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; var _isUndefined=OfficeExtension.Utility.isUndefined; var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; var _load=OfficeExtension.Utility.load; + var _retrieve=OfficeExtension.Utility.retrieve; + var _toJson=OfficeExtension.Utility.toJson; var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var _processRetrieveResult=OfficeExtension.Utility.processRetrieveResult; + var _typeApplication="Application"; var Application=(function (_super) { __extends(Application, _super); function Application() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Application.prototype, "_className", { get: function () { @@ -11813,19 +13273,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Application.prototype, "_scalarPropertyNames", { + get: function () { + return ["calculationMode"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(Application.prototype, "calculationMode", { get: function () { - _throwIfNotLoaded("calculationMode", this.m_calculationMode, "Application", this._isNull); - return this.m_calculationMode; + _throwIfNotLoaded("calculationMode", this._C, _typeApplication, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Application.prototype.calculate=function (calculationType) { - _createMethodAction(this.context, this, "Calculate", 0, [calculationType]); + _createMethodAction(this.context, this, "Calculate", 0, [calculationType], false); }; Application.prototype.suspendApiCalculationUntilNextSync=function () { - _createMethodAction(this.context, this, "SuspendApiCalculationUntilNextSync", 0, []); + _throwIfApiNotSupported("Application.suspendApiCalculationUntilNextSync", _defaultApiSetName, "1.6", _hostName); + _createMethodAction(this.context, this, "SuspendApiCalculationUntilNextSync", 0, [], false); }; Application.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -11834,25 +13302,36 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["CalculationMode"])) { - this.m_calculationMode=obj["CalculationMode"]; + this._C=obj["CalculationMode"]; } }; Application.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Application.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Application.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; Application.prototype.toJSON=function () { - return { - "calculationMode": this.m_calculationMode - }; + return _toJson(this, { + "calculationMode": this._C, + }, {}); + }; + Application.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Application; }(OfficeExtension.ClientObject)); Excel.Application=Application; + var _typeWorkbook="Workbook"; var Workbook=(function (_super) { __extends(Workbook, _super); function Workbook() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Workbook.prototype, "_className", { get: function () { @@ -11861,132 +13340,155 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Workbook.prototype, "_navigationPropertyNames", { + get: function () { + return ["worksheets", "names", "tables", "application", "bindings", "functions", "_V1Api", "pivotTables", "settings", "customXmlParts", "internalTest"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(Workbook.prototype, "application", { get: function () { - if (!this.m_application) { - this.m_application=new Excel.Application(this.context, _createPropertyObjectPath(this.context, this, "Application", false, false)); + if (!this._A) { + this._A=new Excel.Application(this.context, _createPropertyObjectPath(this.context, this, "Application", false, false, false)); } - return this.m_application; + return this._A; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "bindings", { get: function () { - if (!this.m_bindings) { - this.m_bindings=new Excel.BindingCollection(this.context, _createPropertyObjectPath(this.context, this, "Bindings", true, false)); + if (!this._B) { + this._B=new Excel.BindingCollection(this.context, _createPropertyObjectPath(this.context, this, "Bindings", true, false, false)); } - return this.m_bindings; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "customXmlParts", { get: function () { - if (!this.m_customXmlParts) { - this.m_customXmlParts=new Excel.CustomXmlPartCollection(this.context, _createPropertyObjectPath(this.context, this, "CustomXmlParts", true, false)); + _throwIfApiNotSupported("Workbook.customXmlParts", _defaultApiSetName, "1.5", _hostName); + if (!this._C) { + this._C=new Excel.CustomXmlPartCollection(this.context, _createPropertyObjectPath(this.context, this, "CustomXmlParts", true, false, false)); } - return this.m_customXmlParts; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "functions", { get: function () { - if (!this.m_functions) { - this.m_functions=new Excel.Functions(this.context, _createPropertyObjectPath(this.context, this, "Functions", false, false)); + _throwIfApiNotSupported("Workbook.functions", _defaultApiSetName, "1.2", _hostName); + if (!this._F) { + this._F=new Excel.Functions(this.context, _createPropertyObjectPath(this.context, this, "Functions", false, false, false)); } - return this.m_functions; + return this._F; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Workbook.prototype, "internalTest", { + get: function () { + _throwIfApiNotSupported("Workbook.internalTest", _defaultApiSetName, "1.6", _hostName); + if (!this._I) { + this._I=new Excel.InternalTest(this.context, _createPropertyObjectPath(this.context, this, "InternalTest", false, false, false)); + } + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "names", { get: function () { - if (!this.m_names) { - this.m_names=new Excel.NamedItemCollection(this.context, _createPropertyObjectPath(this.context, this, "Names", true, false)); + if (!this._N) { + this._N=new Excel.NamedItemCollection(this.context, _createPropertyObjectPath(this.context, this, "Names", true, false, false)); } - return this.m_names; + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "pivotTables", { get: function () { - if (!this.m_pivotTables) { - this.m_pivotTables=new Excel.PivotTableCollection(this.context, _createPropertyObjectPath(this.context, this, "PivotTables", true, false)); + _throwIfApiNotSupported("Workbook.pivotTables", _defaultApiSetName, "1.3", _hostName); + if (!this._P) { + this._P=new Excel.PivotTableCollection(this.context, _createPropertyObjectPath(this.context, this, "PivotTables", true, false, false)); } - return this.m_pivotTables; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "settings", { get: function () { - if (!this.m_settings) { - this.m_settings=new Excel.SettingCollection(this.context, _createPropertyObjectPath(this.context, this, "Settings", true, false)); + _throwIfApiNotSupported("Workbook.settings", _defaultApiSetName, "1.4", _hostName); + if (!this._S) { + this._S=new Excel.SettingCollection(this.context, _createPropertyObjectPath(this.context, this, "Settings", true, false, false)); } - return this.m_settings; + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "tables", { get: function () { - if (!this.m_tables) { - this.m_tables=new Excel.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false)); + if (!this._T) { + this._T=new Excel.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false, false)); } - return this.m_tables; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "worksheets", { get: function () { - if (!this.m_worksheets) { - this.m_worksheets=new Excel.WorksheetCollection(this.context, _createPropertyObjectPath(this.context, this, "Worksheets", true, false)); + if (!this._W) { + this._W=new Excel.WorksheetCollection(this.context, _createPropertyObjectPath(this.context, this, "Worksheets", true, false, false)); } - return this.m_worksheets; + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(Workbook.prototype, "_V1Api", { get: function () { - if (!this.m__V1Api) { - this.m__V1Api=new Excel._V1Api(this.context, _createPropertyObjectPath(this.context, this, "_V1Api", false, false)); + _throwIfApiNotSupported("Workbook._V1Api", _defaultApiSetName, "1.3", _hostName); + if (!this.__V) { + this.__V=new Excel._V1Api(this.context, _createPropertyObjectPath(this.context, this, "_V1Api", false, false, false)); } - return this.m__V1Api; + return this.__V; }, enumerable: true, configurable: true }); Workbook.prototype.getSelectedRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetSelectedRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetSelectedRange", 1, [], false, true, null, false)); }; Workbook.prototype._GetObjectByReferenceId=function (bstrReferenceId) { - var action=_createMethodAction(this.context, this, "_GetObjectByReferenceId", 1, [bstrReferenceId]); + var action=_createMethodAction(this.context, this, "_GetObjectByReferenceId", 1, [bstrReferenceId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Workbook.prototype._GetObjectTypeNameByReferenceId=function (bstrReferenceId) { - var action=_createMethodAction(this.context, this, "_GetObjectTypeNameByReferenceId", 1, [bstrReferenceId]); + var action=_createMethodAction(this.context, this, "_GetObjectTypeNameByReferenceId", 1, [bstrReferenceId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Workbook.prototype._GetReferenceCount=function () { - var action=_createMethodAction(this.context, this, "_GetReferenceCount", 1, []); + var action=_createMethodAction(this.context, this, "_GetReferenceCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Workbook.prototype._RemoveAllReferences=function () { - _createMethodAction(this.context, this, "_RemoveAllReferences", 1, []); + _createMethodAction(this.context, this, "_RemoveAllReferences", 1, [], false); }; Workbook.prototype._RemoveReference=function (bstrReferenceId) { - _createMethodAction(this.context, this, "_RemoveReference", 1, [bstrReferenceId]); + _createMethodAction(this.context, this, "_RemoveReference", 1, [bstrReferenceId], false); }; Workbook.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -11994,15 +13496,22 @@ var Excel; return; var obj=value; _fixObjectPathIfNecessary(this, obj); - _handleNavigationPropertyResults(this, obj, ["application", "Application", "bindings", "Bindings", "customXmlParts", "CustomXmlParts", "functions", "Functions", "names", "Names", "pivotTables", "PivotTables", "settings", "Settings", "tables", "Tables", "worksheets", "Worksheets", "_V1Api", "_V1Api"]); + _handleNavigationPropertyResults(this, obj, ["application", "Application", "bindings", "Bindings", "customXmlParts", "CustomXmlParts", "functions", "Functions", "internalTest", "InternalTest", "names", "Names", "pivotTables", "PivotTables", "settings", "Settings", "tables", "Tables", "worksheets", "Worksheets", "_V1Api", "_V1Api"]); }; Workbook.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Workbook.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Workbook.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; Object.defineProperty(Workbook.prototype, "onSelectionChanged", { get: function () { var _this=this; + _throwIfApiNotSupported("Workbook.onSelectionChanged", _defaultApiSetName, "1.3", _hostName); if (!this.m_selectionChanged) { this.m_selectionChanged=new OfficeExtension.EventHandlers(this.context, this, "SelectionChanged", { registerFunc: function (handlerCallback) { @@ -12022,15 +13531,28 @@ var Excel; configurable: true }); Workbook.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, { + "bindings": this._B, + "customXmlParts": this._C, + "names": this._N, + "pivotTables": this._P, + "settings": this._S, + "tables": this._T, + "worksheets": this._W, + }); + }; + Workbook.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Workbook; }(OfficeExtension.ClientObject)); Excel.Workbook=Workbook; + var _typeWorksheet="Worksheet"; var Worksheet=(function (_super) { __extends(Worksheet, _super); function Worksheet() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Worksheet.prototype, "_className", { get: function () { @@ -12039,42 +13561,66 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Worksheet.prototype, "_scalarPropertyNames", { + get: function () { + return ["name", "id", "position", "visibility"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Worksheet.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, false, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Worksheet.prototype, "_navigationPropertyNames", { + get: function () { + return ["charts", "tables", "protection", "pivotTables", "names"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(Worksheet.prototype, "charts", { get: function () { - if (!this.m_charts) { - this.m_charts=new Excel.ChartCollection(this.context, _createPropertyObjectPath(this.context, this, "Charts", true, false)); + if (!this._C) { + this._C=new Excel.ChartCollection(this.context, _createPropertyObjectPath(this.context, this, "Charts", true, false, false)); } - return this.m_charts; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Worksheet.prototype, "names", { get: function () { - if (!this.m_names) { - this.m_names=new Excel.NamedItemCollection(this.context, _createPropertyObjectPath(this.context, this, "Names", true, false)); + _throwIfApiNotSupported("Worksheet.names", _defaultApiSetName, "1.4", _hostName); + if (!this._Na) { + this._Na=new Excel.NamedItemCollection(this.context, _createPropertyObjectPath(this.context, this, "Names", true, false, false)); } - return this.m_names; + return this._Na; }, enumerable: true, configurable: true }); Object.defineProperty(Worksheet.prototype, "pivotTables", { get: function () { - if (!this.m_pivotTables) { - this.m_pivotTables=new Excel.PivotTableCollection(this.context, _createPropertyObjectPath(this.context, this, "PivotTables", true, false)); + _throwIfApiNotSupported("Worksheet.pivotTables", _defaultApiSetName, "1.3", _hostName); + if (!this._P) { + this._P=new Excel.PivotTableCollection(this.context, _createPropertyObjectPath(this.context, this, "PivotTables", true, false, false)); } - return this.m_pivotTables; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Worksheet.prototype, "protection", { get: function () { - if (!this.m_protection) { - this.m_protection=new Excel.WorksheetProtection(this.context, _createPropertyObjectPath(this.context, this, "Protection", false, false)); + _throwIfApiNotSupported("Worksheet.protection", _defaultApiSetName, "1.2", _hostName); + if (!this._Pr) { + this._Pr=new Excel.WorksheetProtection(this.context, _createPropertyObjectPath(this.context, this, "Protection", false, false, false)); } - return this.m_protection; + return this._Pr; }, enumerable: true, configurable: true @@ -12082,8 +13628,9 @@ var Excel; Object.defineProperty(Worksheet.prototype, "tables", { get: function () { if (!this.m_tables) { - this.m_tables=new Excel.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false)); + this.m_tables=new Excel.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false, false)); } + this.m_tables._ParentObject=this; return this.m_tables; }, enumerable: true, @@ -12091,19 +13638,19 @@ var Excel; }); Object.defineProperty(Worksheet.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Worksheet", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeWorksheet, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Worksheet.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "Worksheet", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeWorksheet, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -12111,11 +13658,11 @@ var Excel; }); Object.defineProperty(Worksheet.prototype, "position", { get: function () { - _throwIfNotLoaded("position", this.m_position, "Worksheet", this._isNull); - return this.m_position; + _throwIfNotLoaded("position", this._Po, _typeWorksheet, this._isNull); + return this._Po; }, set: function (value) { - this.m_position=value; + this._Po=value; _createSetPropertyAction(this.context, this, "Position", value); }, enumerable: true, @@ -12123,11 +13670,11 @@ var Excel; }); Object.defineProperty(Worksheet.prototype, "visibility", { get: function () { - _throwIfNotLoaded("visibility", this.m_visibility, "Worksheet", this._isNull); - return this.m_visibility; + _throwIfNotLoaded("visibility", this._V, _typeWorksheet, this._isNull); + return this._V; }, set: function (value) { - this.m_visibility=value; + this._V=value; _createSetPropertyAction(this.context, this, "Visibility", value); }, enumerable: true, @@ -12135,10 +13682,6 @@ var Excel; }); Worksheet.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["name", "position", "visibility"], [], [ - "charts", - "names", - "pivotTables", - "tables", "charts", "names", "pivotTables", @@ -12146,38 +13689,47 @@ var Excel; "tables" ]); }; + Worksheet.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; Worksheet.prototype.activate=function () { - _createMethodAction(this.context, this, "Activate", 1, []); + _createMethodAction(this.context, this, "Activate", 1, [], false); }; Worksheet.prototype.calculate=function (markAllDirty) { - _createMethodAction(this.context, this, "Calculate", 0, [markAllDirty]); + _throwIfApiNotSupported("Worksheet.calculate", _defaultApiSetName, "1.6", _hostName); + _createMethodAction(this.context, this, "Calculate", 0, [markAllDirty], false); }; Worksheet.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Worksheet.prototype.getCell=function (row, column) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [row, column], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [row, column], false, true, null, false)); }; Worksheet.prototype.getNext=function (visibleOnly) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [visibleOnly], false, true, null)); + _throwIfApiNotSupported("Worksheet.getNext", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [visibleOnly], false, true, "_GetSheetById", false)); }; Worksheet.prototype.getNextOrNullObject=function (visibleOnly) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [visibleOnly], false, true, null)); + _throwIfApiNotSupported("Worksheet.getNextOrNullObject", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [visibleOnly], false, true, "_GetSheetById", false)); }; Worksheet.prototype.getPrevious=function (visibleOnly) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetPrevious", 1, [visibleOnly], false, true, null)); + _throwIfApiNotSupported("Worksheet.getPrevious", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetPrevious", 1, [visibleOnly], false, true, "_GetSheetById", false)); }; Worksheet.prototype.getPreviousOrNullObject=function (visibleOnly) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetPreviousOrNullObject", 1, [visibleOnly], false, true, null)); + _throwIfApiNotSupported("Worksheet.getPreviousOrNullObject", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetPreviousOrNullObject", 1, [visibleOnly], false, true, "_GetSheetById", false)); }; Worksheet.prototype.getRange=function (address) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [address], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [address], false, true, null, false)); }; Worksheet.prototype.getUsedRange=function (valuesOnly) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRange", 1, [valuesOnly], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRange", 1, [valuesOnly], false, true, null, false)); }; Worksheet.prototype.getUsedRangeOrNullObject=function (valuesOnly) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRangeOrNullObject", 1, [valuesOnly], false, true, null)); + _throwIfApiNotSupported("Worksheet.getUsedRangeOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRangeOrNullObject", 1, [valuesOnly], false, true, null, false)); }; Worksheet.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12186,22 +13738,24 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Position"])) { - this.m_position=obj["Position"]; + this._Po=obj["Position"]; } if (!_isUndefined(obj["Visibility"])) { - this.m_visibility=obj["Visibility"]; + this._V=obj["Visibility"]; } _handleNavigationPropertyResults(this, obj, ["charts", "Charts", "names", "Names", "pivotTables", "PivotTables", "protection", "Protection", "tables", "Tables"]); }; Worksheet.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Worksheet.prototype.retrieve=function (option) { + return _retrieve(this, option); }; Worksheet.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -12209,25 +13763,39 @@ var Excel; return; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; + Worksheet.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; Worksheet.prototype.toJSON=function () { - return { - "id": this.m_id, - "name": this.m_name, - "position": this.m_position, - "protection": this.m_protection, - "visibility": this.m_visibility - }; + return _toJson(this, { + "id": this._I, + "name": this._N, + "position": this._Po, + "visibility": this._V, + }, { + "charts": this._C, + "names": this._Na, + "pivotTables": this._P, + "protection": this._Pr, + "tables": this.m_tables, + }); + }; + Worksheet.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Worksheet; }(OfficeExtension.ClientObject)); Excel.Worksheet=Worksheet; + var _typeWorksheetCollection="WorksheetCollection"; var WorksheetCollection=(function (_super) { __extends(WorksheetCollection, _super); function WorksheetCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(WorksheetCollection.prototype, "_className", { get: function () { @@ -12236,37 +13804,48 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(WorksheetCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(WorksheetCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "WorksheetCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeWorksheetCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); WorksheetCollection.prototype.add=function (name) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [name], false, true, null)); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [name], false, true, null, false)); }; WorksheetCollection.prototype.getActiveWorksheet=function () { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetActiveWorksheet", 1, [], false, false, null)); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetActiveWorksheet", 1, [], false, false, null, false)); }; WorksheetCollection.prototype.getCount=function (visibleOnly) { - var action=_createMethodAction(this.context, this, "GetCount", 1, [visibleOnly]); + _throwIfApiNotSupported("WorksheetCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [visibleOnly], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; WorksheetCollection.prototype.getFirst=function (visibleOnly) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [visibleOnly], false, true, null)); + _throwIfApiNotSupported("WorksheetCollection.getFirst", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [visibleOnly], false, true, null, false)); }; WorksheetCollection.prototype.getItem=function (key) { return new Excel.Worksheet(this.context, _createIndexerObjectPath(this.context, this, [key])); }; WorksheetCollection.prototype.getItemOrNullObject=function (key) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null)); + _throwIfApiNotSupported("WorksheetCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null, false)); }; WorksheetCollection.prototype.getLast=function (visibleOnly) { - return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetLast", 1, [visibleOnly], false, true, null)); + _throwIfApiNotSupported("WorksheetCollection.getLast", _defaultApiSetName, "1.5", _hostName); + return new Excel.Worksheet(this.context, _createMethodObjectPath(this.context, this, "GetLast", 1, [visibleOnly], false, true, null, false)); }; WorksheetCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12285,19 +13864,27 @@ var Excel; } }; WorksheetCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + WorksheetCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + WorksheetCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.Worksheet(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; WorksheetCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return WorksheetCollection; }(OfficeExtension.ClientObject)); Excel.WorksheetCollection=WorksheetCollection; + var _typeWorksheetProtection="WorksheetProtection"; var WorksheetProtection=(function (_super) { __extends(WorksheetProtection, _super); function WorksheetProtection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(WorksheetProtection.prototype, "_className", { get: function () { @@ -12306,27 +13893,38 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(WorksheetProtection.prototype, "_scalarPropertyNames", { + get: function () { + return ["protected", "options"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(WorksheetProtection.prototype, "options", { get: function () { - _throwIfNotLoaded("options", this.m_options, "WorksheetProtection", this._isNull); - return this.m_options; + _throwIfNotLoaded("options", this._O, _typeWorksheetProtection, this._isNull); + return this._O; }, enumerable: true, configurable: true }); Object.defineProperty(WorksheetProtection.prototype, "protected", { get: function () { - _throwIfNotLoaded("protected", this.m_protected, "WorksheetProtection", this._isNull); - return this.m_protected; + _throwIfNotLoaded("protected", this._P, _typeWorksheetProtection, this._isNull); + return this._P; }, enumerable: true, configurable: true }); - WorksheetProtection.prototype.protect=function (options) { - _createMethodAction(this.context, this, "Protect", 0, [options]); + WorksheetProtection.prototype.protect=function (options, password) { + if (versionNumberIsEarlierThan(16, 0, 8716)) { + _createMethodAction(this.context, this, "Protect", 0, [options], false); + return; + } + _createMethodAction(this.context, this, "Protect", 0, [options, password], false); }; - WorksheetProtection.prototype.unprotect=function () { - _createMethodAction(this.context, this, "Unprotect", 0, []); + WorksheetProtection.prototype.unprotect=function (password) { + _createMethodAction(this.context, this, "Unprotect", 0, [password], false); }; WorksheetProtection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12335,29 +13933,40 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Options"])) { - this.m_options=obj["Options"]; + this._O=obj["Options"]; } if (!_isUndefined(obj["Protected"])) { - this.m_protected=obj["Protected"]; + this._P=obj["Protected"]; } }; WorksheetProtection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + WorksheetProtection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + WorksheetProtection.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; WorksheetProtection.prototype.toJSON=function () { - return { - "options": this.m_options, - "protected": this.m_protected - }; + return _toJson(this, { + "options": this._O, + "protected": this._P, + }, {}); + }; + WorksheetProtection.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return WorksheetProtection; }(OfficeExtension.ClientObject)); Excel.WorksheetProtection=WorksheetProtection; + var _typeRange="Range"; var Range=(function (_super) { __extends(Range, _super); function Range() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Range.prototype, "_className", { get: function () { @@ -12366,9 +13975,30 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Range.prototype, "_scalarPropertyNames", { + get: function () { + return ["numberFormat", "values", "text", "formulas", "formulasLocal", "rowIndex", "columnIndex", "rowCount", "columnCount", "address", "addressLocal", "cellCount", "_ReferenceId", "valueTypes", "formulasR1C1", "hidden", "rowHidden", "columnHidden"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, false, true, true, false, false, false, false, false, false, false, false, false, true, false, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Range.prototype, "_navigationPropertyNames", { + get: function () { + return ["format", "worksheet", "sort", "conditionalFormats"]; + }, + enumerable: true, + configurable: true + }); Range.prototype._ensureInteger=function (num, methodName) { if (!(typeof num==="number" && isFinite(num) && Math.floor(num)===num)) { - throw new OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, num, methodName); + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, num, methodName); } }; Range.prototype._getAdjacentRange=function (functionName, count, referenceRange, rowDirection, columnDirection) { @@ -12394,83 +14024,86 @@ var Excel; }; Object.defineProperty(Range.prototype, "conditionalFormats", { get: function () { - if (!this.m_conditionalFormats) { - this.m_conditionalFormats=new Excel.ConditionalFormatCollection(this.context, _createPropertyObjectPath(this.context, this, "ConditionalFormats", true, false)); + _throwIfApiNotSupported("Range.conditionalFormats", _defaultApiSetName, "1.6", _hostName); + if (!this._Con) { + this._Con=new Excel.ConditionalFormatCollection(this.context, _createPropertyObjectPath(this.context, this, "ConditionalFormats", true, false, false)); } - return this.m_conditionalFormats; + return this._Con; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.RangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.RangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "sort", { get: function () { - if (!this.m_sort) { - this.m_sort=new Excel.RangeSort(this.context, _createPropertyObjectPath(this.context, this, "Sort", false, false)); + _throwIfApiNotSupported("Range.sort", _defaultApiSetName, "1.2", _hostName); + if (!this._S) { + this._S=new Excel.RangeSort(this.context, _createPropertyObjectPath(this.context, this, "Sort", false, false, false)); } - return this.m_sort; + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "worksheet", { get: function () { - if (!this.m_worksheet) { - this.m_worksheet=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false)); + if (!this._W) { + this._W=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false, false)); } - return this.m_worksheet; + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "address", { get: function () { - _throwIfNotLoaded("address", this.m_address, "Range", this._isNull); - return this.m_address; + _throwIfNotLoaded("address", this._A, _typeRange, this._isNull); + return this._A; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "addressLocal", { get: function () { - _throwIfNotLoaded("addressLocal", this.m_addressLocal, "Range", this._isNull); - return this.m_addressLocal; + _throwIfNotLoaded("addressLocal", this._Ad, _typeRange, this._isNull); + return this._Ad; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "cellCount", { get: function () { - _throwIfNotLoaded("cellCount", this.m_cellCount, "Range", this._isNull); - return this.m_cellCount; + _throwIfNotLoaded("cellCount", this._C, _typeRange, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "columnCount", { get: function () { - _throwIfNotLoaded("columnCount", this.m_columnCount, "Range", this._isNull); - return this.m_columnCount; + _throwIfNotLoaded("columnCount", this._Co, _typeRange, this._isNull); + return this._Co; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "columnHidden", { get: function () { - _throwIfNotLoaded("columnHidden", this.m_columnHidden, "Range", this._isNull); - return this.m_columnHidden; + _throwIfNotLoaded("columnHidden", this._Col, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.columnHidden", _defaultApiSetName, "1.2", _hostName); + return this._Col; }, set: function (value) { - this.m_columnHidden=value; + this._Col=value; _createSetPropertyAction(this.context, this, "ColumnHidden", value); }, enumerable: true, @@ -12478,15 +14111,15 @@ var Excel; }); Object.defineProperty(Range.prototype, "columnIndex", { get: function () { - _throwIfNotLoaded("columnIndex", this.m_columnIndex, "Range", this._isNull); - return this.m_columnIndex; + _throwIfNotLoaded("columnIndex", this._Colu, _typeRange, this._isNull); + return this._Colu; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "formulas", { get: function () { - _throwIfNotLoaded("formulas", this.m_formulas, "Range", this._isNull); + _throwIfNotLoaded("formulas", this.m_formulas, _typeRange, this._isNull); return this.m_formulas; }, set: function (value) { @@ -12502,7 +14135,7 @@ var Excel; }); Object.defineProperty(Range.prototype, "formulasLocal", { get: function () { - _throwIfNotLoaded("formulasLocal", this.m_formulasLocal, "Range", this._isNull); + _throwIfNotLoaded("formulasLocal", this.m_formulasLocal, _typeRange, this._isNull); return this.m_formulasLocal; }, set: function (value) { @@ -12518,7 +14151,8 @@ var Excel; }); Object.defineProperty(Range.prototype, "formulasR1C1", { get: function () { - _throwIfNotLoaded("formulasR1C1", this.m_formulasR1C1, "Range", this._isNull); + _throwIfNotLoaded("formulasR1C1", this.m_formulasR1C1, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.formulasR1C1", _defaultApiSetName, "1.2", _hostName); return this.m_formulasR1C1; }, set: function (value) { @@ -12534,15 +14168,16 @@ var Excel; }); Object.defineProperty(Range.prototype, "hidden", { get: function () { - _throwIfNotLoaded("hidden", this.m_hidden, "Range", this._isNull); - return this.m_hidden; + _throwIfNotLoaded("hidden", this._H, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.hidden", _defaultApiSetName, "1.2", _hostName); + return this._H; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "numberFormat", { get: function () { - _throwIfNotLoaded("numberFormat", this.m_numberFormat, "Range", this._isNull); + _throwIfNotLoaded("numberFormat", this.m_numberFormat, _typeRange, this._isNull); return this.m_numberFormat; }, set: function (value) { @@ -12558,19 +14193,20 @@ var Excel; }); Object.defineProperty(Range.prototype, "rowCount", { get: function () { - _throwIfNotLoaded("rowCount", this.m_rowCount, "Range", this._isNull); - return this.m_rowCount; + _throwIfNotLoaded("rowCount", this._R, _typeRange, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "rowHidden", { get: function () { - _throwIfNotLoaded("rowHidden", this.m_rowHidden, "Range", this._isNull); - return this.m_rowHidden; + _throwIfNotLoaded("rowHidden", this._Ro, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.rowHidden", _defaultApiSetName, "1.2", _hostName); + return this._Ro; }, set: function (value) { - this.m_rowHidden=value; + this._Ro=value; _createSetPropertyAction(this.context, this, "RowHidden", value); }, enumerable: true, @@ -12578,31 +14214,31 @@ var Excel; }); Object.defineProperty(Range.prototype, "rowIndex", { get: function () { - _throwIfNotLoaded("rowIndex", this.m_rowIndex, "Range", this._isNull); - return this.m_rowIndex; + _throwIfNotLoaded("rowIndex", this._Row, _typeRange, this._isNull); + return this._Row; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "Range", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._T, _typeRange, this._isNull); + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "valueTypes", { get: function () { - _throwIfNotLoaded("valueTypes", this.m_valueTypes, "Range", this._isNull); - return this.m_valueTypes; + _throwIfNotLoaded("valueTypes", this._V, _typeRange, this._isNull); + return this._V; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "values", { get: function () { - _throwIfNotLoaded("values", this.m_values, "Range", this._isNull); + _throwIfNotLoaded("values", this.m_values, _typeRange, this._isNull); return this.m_values; }, set: function (value) { @@ -12618,39 +14254,40 @@ var Excel; }); Object.defineProperty(Range.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Range", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeRange, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Range.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["numberFormat", "values", "formulas", "formulasLocal", "formulasR1C1", "rowHidden", "columnHidden"], ["format"], [ - "conditionalFormats", - "sort", - "worksheet", "conditionalFormats", "sort", "worksheet" ]); }; + Range.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; Range.prototype.calculate=function () { - _createMethodAction(this.context, this, "Calculate", 0, []); + _throwIfApiNotSupported("Range.calculate", _defaultApiSetName, "1.6", _hostName); + _createMethodAction(this.context, this, "Calculate", 0, [], false); }; Range.prototype.clear=function (applyTo) { - _createMethodAction(this.context, this, "Clear", 0, [applyTo]); + _createMethodAction(this.context, this, "Clear", 0, [applyTo], false); }; Range.prototype.delete=function (shift) { - _createMethodAction(this.context, this, "Delete", 0, [shift]); + _createMethodAction(this.context, this, "Delete", 0, [shift], false); }; Range.prototype.getBoundingRect=function (anotherRange) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetBoundingRect", 1, [anotherRange], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetBoundingRect", 1, [anotherRange], false, true, null, false)); }; Range.prototype.getCell=function (row, column) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [row, column], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [row, column], false, true, null, false)); }; Range.prototype.getColumn=function (column) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumn", 1, [column], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumn", 1, [column], false, true, null, false)); }; Range.prototype.getColumnsAfter=function (count) { if (!isExcel1_3OrAbove()) { @@ -12659,11 +14296,12 @@ var Excel; } this._ensureInteger(count, "RowsAbove"); if (count==0) { - throw new OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); } return this._getAdjacentRange("getColumnsAfter", count, this.getLastColumn(), 0, 1); } - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumnsAfter", 1, [count], false, true, null)); + _throwIfApiNotSupported("Range.getColumnsAfter", _defaultApiSetName, "1.3", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumnsAfter", 1, [count], false, true, null, false)); }; Range.prototype.getColumnsBefore=function (count) { if (!isExcel1_3OrAbove()) { @@ -12672,35 +14310,37 @@ var Excel; } this._ensureInteger(count, "RowsAbove"); if (count==0) { - throw new OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); } return this._getAdjacentRange("getColumnsBefore", count, this.getColumn(0), 0, -1); } - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumnsBefore", 1, [count], false, true, null)); + _throwIfApiNotSupported("Range.getColumnsBefore", _defaultApiSetName, "1.3", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetColumnsBefore", 1, [count], false, true, null, false)); }; Range.prototype.getEntireColumn=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetEntireColumn", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetEntireColumn", 1, [], false, true, null, false)); }; Range.prototype.getEntireRow=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetEntireRow", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetEntireRow", 1, [], false, true, null, false)); }; Range.prototype.getIntersection=function (anotherRange) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetIntersection", 1, [anotherRange], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetIntersection", 1, [anotherRange], false, true, null, false)); }; Range.prototype.getIntersectionOrNullObject=function (anotherRange) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetIntersectionOrNullObject", 1, [anotherRange], false, true, null)); + _throwIfApiNotSupported("Range.getIntersectionOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetIntersectionOrNullObject", 1, [anotherRange], false, true, null, false)); }; Range.prototype.getLastCell=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastCell", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastCell", 1, [], false, true, null, false)); }; Range.prototype.getLastColumn=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastColumn", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastColumn", 1, [], false, true, null, false)); }; Range.prototype.getLastRow=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastRow", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetLastRow", 1, [], false, true, null, false)); }; Range.prototype.getOffsetRange=function (rowOffset, columnOffset) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetOffsetRange", 1, [rowOffset, columnOffset], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetOffsetRange", 1, [rowOffset, columnOffset], false, true, null, false)); }; Range.prototype.getResizedRange=function (deltaRows, deltaColumns) { if (!isExcel1_3OrAbove()) { @@ -12709,10 +14349,11 @@ var Excel; var referenceRange=(deltaRows >=0 && deltaColumns >=0) ? this : this.getCell(0, 0); return referenceRange.getBoundingRect(this.getLastCell().getOffsetRange(deltaRows, deltaColumns)); } - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetResizedRange", 1, [deltaRows, deltaColumns], false, true, null)); + _throwIfApiNotSupported("Range.getResizedRange", _defaultApiSetName, "1.3", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetResizedRange", 1, [deltaRows, deltaColumns], false, true, null, false)); }; Range.prototype.getRow=function (row) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRow", 1, [row], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRow", 1, [row], false, true, null, false)); }; Range.prototype.getRowsAbove=function (count) { if (!isExcel1_3OrAbove()) { @@ -12721,11 +14362,12 @@ var Excel; } this._ensureInteger(count, "RowsAbove"); if (count==0) { - throw new OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); } return this._getAdjacentRange("getRowsAbove", count, this.getRow(0), -1, 0); } - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRowsAbove", 1, [count], false, true, null)); + _throwIfApiNotSupported("Range.getRowsAbove", _defaultApiSetName, "1.3", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRowsAbove", 1, [count], false, true, null, false)); }; Range.prototype.getRowsBelow=function (count) { if (!isExcel1_3OrAbove()) { @@ -12734,38 +14376,44 @@ var Excel; } this._ensureInteger(count, "RowsAbove"); if (count==0) { - throw new OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); + OfficeExtension.Utility.throwError(Excel.ErrorCodes.invalidArgument, "count", "RowsAbove"); } return this._getAdjacentRange("getRowsBelow", count, this.getLastRow(), 1, 0); } - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRowsBelow", 1, [count], false, true, null)); + _throwIfApiNotSupported("Range.getRowsBelow", _defaultApiSetName, "1.3", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRowsBelow", 1, [count], false, true, null, false)); }; Range.prototype.getUsedRange=function (valuesOnly) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRange", 1, [valuesOnly], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRange", 1, [valuesOnly], false, true, null, false)); }; Range.prototype.getUsedRangeOrNullObject=function (valuesOnly) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRangeOrNullObject", 1, [valuesOnly], false, true, null)); + _throwIfApiNotSupported("Range.getUsedRangeOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetUsedRangeOrNullObject", 1, [valuesOnly], false, true, null, false)); }; Range.prototype.getVisibleView=function () { - return new Excel.RangeView(this.context, _createMethodObjectPath(this.context, this, "GetVisibleView", 1, [], false, false, null)); + _throwIfApiNotSupported("Range.getVisibleView", _defaultApiSetName, "1.3", _hostName); + return new Excel.RangeView(this.context, _createMethodObjectPath(this.context, this, "GetVisibleView", 1, [], false, false, null, false)); }; Range.prototype.insert=function (shift) { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "Insert", 0, [shift], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "Insert", 0, [shift], false, true, null, false)); }; Range.prototype.merge=function (across) { - _createMethodAction(this.context, this, "Merge", 0, [across]); + _throwIfApiNotSupported("Range.merge", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "Merge", 0, [across], false); }; Range.prototype.select=function () { - _createMethodAction(this.context, this, "Select", 1, []); + _createMethodAction(this.context, this, "Select", 1, [], false); }; Range.prototype.unmerge=function () { - _createMethodAction(this.context, this, "Unmerge", 0, []); + _throwIfApiNotSupported("Range.unmerge", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "Unmerge", 0, [], false); }; Range.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Range.prototype._ValidateArraySize=function (rows, columns) { - _createMethodAction(this.context, this, "_ValidateArraySize", 1, [rows, columns]); + _throwIfApiNotSupported("Range._ValidateArraySize", _defaultApiSetName, "1.3", _hostName); + _createMethodAction(this.context, this, "_ValidateArraySize", 1, [rows, columns], false); }; Range.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12774,22 +14422,22 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Address"])) { - this.m_address=obj["Address"]; + this._A=obj["Address"]; } if (!_isUndefined(obj["AddressLocal"])) { - this.m_addressLocal=obj["AddressLocal"]; + this._Ad=obj["AddressLocal"]; } if (!_isUndefined(obj["CellCount"])) { - this.m_cellCount=obj["CellCount"]; + this._C=obj["CellCount"]; } if (!_isUndefined(obj["ColumnCount"])) { - this.m_columnCount=obj["ColumnCount"]; + this._Co=obj["ColumnCount"]; } if (!_isUndefined(obj["ColumnHidden"])) { - this.m_columnHidden=obj["ColumnHidden"]; + this._Col=obj["ColumnHidden"]; } if (!_isUndefined(obj["ColumnIndex"])) { - this.m_columnIndex=obj["ColumnIndex"]; + this._Colu=obj["ColumnIndex"]; } if (!_isUndefined(obj["Formulas"])) { this.m_formulas=obj["Formulas"]; @@ -12801,37 +14449,39 @@ var Excel; this.m_formulasR1C1=obj["FormulasR1C1"]; } if (!_isUndefined(obj["Hidden"])) { - this.m_hidden=obj["Hidden"]; + this._H=obj["Hidden"]; } if (!_isUndefined(obj["NumberFormat"])) { this.m_numberFormat=obj["NumberFormat"]; } if (!_isUndefined(obj["RowCount"])) { - this.m_rowCount=obj["RowCount"]; + this._R=obj["RowCount"]; } if (!_isUndefined(obj["RowHidden"])) { - this.m_rowHidden=obj["RowHidden"]; + this._Ro=obj["RowHidden"]; } if (!_isUndefined(obj["RowIndex"])) { - this.m_rowIndex=obj["RowIndex"]; + this._Row=obj["RowIndex"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._T=obj["Text"]; } if (!_isUndefined(obj["ValueTypes"])) { - this.m_valueTypes=obj["ValueTypes"]; + this._V=obj["ValueTypes"]; } if (!_isUndefined(obj["Values"])) { this.m_values=obj["Values"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["conditionalFormats", "ConditionalFormats", "format", "Format", "sort", "Sort", "worksheet", "Worksheet"]); }; Range.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Range.prototype.retrieve=function (option) { + return _retrieve(this, option); }; Range.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -12839,9 +14489,13 @@ var Excel; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; + Range.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; Range.prototype.track=function () { this.context.trackedObjects.add(this); return this; @@ -12851,34 +14505,41 @@ var Excel; return this; }; Range.prototype.toJSON=function () { - return { - "address": this.m_address, - "addressLocal": this.m_addressLocal, - "cellCount": this.m_cellCount, - "columnCount": this.m_columnCount, - "columnHidden": this.m_columnHidden, - "columnIndex": this.m_columnIndex, - "format": this.m_format, + return _toJson(this, { + "address": this._A, + "addressLocal": this._Ad, + "cellCount": this._C, + "columnCount": this._Co, + "columnHidden": this._Col, + "columnIndex": this._Colu, "formulas": this.m_formulas, "formulasLocal": this.m_formulasLocal, "formulasR1C1": this.m_formulasR1C1, - "hidden": this.m_hidden, + "hidden": this._H, "numberFormat": this.m_numberFormat, - "rowCount": this.m_rowCount, - "rowHidden": this.m_rowHidden, - "rowIndex": this.m_rowIndex, - "text": this.m_text, + "rowCount": this._R, + "rowHidden": this._Ro, + "rowIndex": this._Row, + "text": this._T, "values": this.m_values, - "valueTypes": this.m_valueTypes - }; + "valueTypes": this._V, + }, { + "conditionalFormats": this._Con, + "format": this._F, + }); + }; + Range.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Range; }(OfficeExtension.ClientObject)); Excel.Range=Range; + var _typeRangeView="RangeView"; var RangeView=(function (_super) { __extends(RangeView, _super); function RangeView() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeView.prototype, "_className", { get: function () { @@ -12887,39 +14548,60 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeView.prototype, "_scalarPropertyNames", { + get: function () { + return ["numberFormat", "values", "text", "formulas", "formulasLocal", "formulasR1C1", "valueTypes", "rowCount", "columnCount", "cellAddresses", "index"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeView.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, false, true, true, true, false, false, false, false, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeView.prototype, "_navigationPropertyNames", { + get: function () { + return ["rows"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeView.prototype, "rows", { get: function () { - if (!this.m_rows) { - this.m_rows=new Excel.RangeViewCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false)); + if (!this._Ro) { + this._Ro=new Excel.RangeViewCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false, false)); } - return this.m_rows; + return this._Ro; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "cellAddresses", { get: function () { - _throwIfNotLoaded("cellAddresses", this.m_cellAddresses, "RangeView", this._isNull); - return this.m_cellAddresses; + _throwIfNotLoaded("cellAddresses", this._C, _typeRangeView, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "columnCount", { get: function () { - _throwIfNotLoaded("columnCount", this.m_columnCount, "RangeView", this._isNull); - return this.m_columnCount; + _throwIfNotLoaded("columnCount", this._Co, _typeRangeView, this._isNull); + return this._Co; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "formulas", { get: function () { - _throwIfNotLoaded("formulas", this.m_formulas, "RangeView", this._isNull); - return this.m_formulas; + _throwIfNotLoaded("formulas", this._F, _typeRangeView, this._isNull); + return this._F; }, set: function (value) { - this.m_formulas=value; + this._F=value; _createSetPropertyAction(this.context, this, "Formulas", value); }, enumerable: true, @@ -12927,11 +14609,11 @@ var Excel; }); Object.defineProperty(RangeView.prototype, "formulasLocal", { get: function () { - _throwIfNotLoaded("formulasLocal", this.m_formulasLocal, "RangeView", this._isNull); - return this.m_formulasLocal; + _throwIfNotLoaded("formulasLocal", this._Fo, _typeRangeView, this._isNull); + return this._Fo; }, set: function (value) { - this.m_formulasLocal=value; + this._Fo=value; _createSetPropertyAction(this.context, this, "FormulasLocal", value); }, enumerable: true, @@ -12939,11 +14621,11 @@ var Excel; }); Object.defineProperty(RangeView.prototype, "formulasR1C1", { get: function () { - _throwIfNotLoaded("formulasR1C1", this.m_formulasR1C1, "RangeView", this._isNull); - return this.m_formulasR1C1; + _throwIfNotLoaded("formulasR1C1", this._For, _typeRangeView, this._isNull); + return this._For; }, set: function (value) { - this.m_formulasR1C1=value; + this._For=value; _createSetPropertyAction(this.context, this, "FormulasR1C1", value); }, enumerable: true, @@ -12951,19 +14633,19 @@ var Excel; }); Object.defineProperty(RangeView.prototype, "index", { get: function () { - _throwIfNotLoaded("index", this.m_index, "RangeView", this._isNull); - return this.m_index; + _throwIfNotLoaded("index", this._I, _typeRangeView, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "numberFormat", { get: function () { - _throwIfNotLoaded("numberFormat", this.m_numberFormat, "RangeView", this._isNull); - return this.m_numberFormat; + _throwIfNotLoaded("numberFormat", this._N, _typeRangeView, this._isNull); + return this._N; }, set: function (value) { - this.m_numberFormat=value; + this._N=value; _createSetPropertyAction(this.context, this, "NumberFormat", value); }, enumerable: true, @@ -12971,35 +14653,35 @@ var Excel; }); Object.defineProperty(RangeView.prototype, "rowCount", { get: function () { - _throwIfNotLoaded("rowCount", this.m_rowCount, "RangeView", this._isNull); - return this.m_rowCount; + _throwIfNotLoaded("rowCount", this._R, _typeRangeView, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "RangeView", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._T, _typeRangeView, this._isNull); + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "valueTypes", { get: function () { - _throwIfNotLoaded("valueTypes", this.m_valueTypes, "RangeView", this._isNull); - return this.m_valueTypes; + _throwIfNotLoaded("valueTypes", this._Va, _typeRangeView, this._isNull); + return this._Va; }, enumerable: true, configurable: true }); Object.defineProperty(RangeView.prototype, "values", { get: function () { - _throwIfNotLoaded("values", this.m_values, "RangeView", this._isNull); - return this.m_values; + _throwIfNotLoaded("values", this._V, _typeRangeView, this._isNull); + return this._V; }, set: function (value) { - this.m_values=value; + this._V=value; _createSetPropertyAction(this.context, this, "Values", value); }, enumerable: true, @@ -13007,12 +14689,14 @@ var Excel; }); RangeView.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["numberFormat", "values", "formulas", "formulasLocal", "formulasR1C1"], [], [ - "rows", "rows" ]); }; + RangeView.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; RangeView.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); }; RangeView.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13021,66 +14705,79 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["CellAddresses"])) { - this.m_cellAddresses=obj["CellAddresses"]; + this._C=obj["CellAddresses"]; } if (!_isUndefined(obj["ColumnCount"])) { - this.m_columnCount=obj["ColumnCount"]; + this._Co=obj["ColumnCount"]; } if (!_isUndefined(obj["Formulas"])) { - this.m_formulas=obj["Formulas"]; + this._F=obj["Formulas"]; } if (!_isUndefined(obj["FormulasLocal"])) { - this.m_formulasLocal=obj["FormulasLocal"]; + this._Fo=obj["FormulasLocal"]; } if (!_isUndefined(obj["FormulasR1C1"])) { - this.m_formulasR1C1=obj["FormulasR1C1"]; + this._For=obj["FormulasR1C1"]; } if (!_isUndefined(obj["Index"])) { - this.m_index=obj["Index"]; + this._I=obj["Index"]; } if (!_isUndefined(obj["NumberFormat"])) { - this.m_numberFormat=obj["NumberFormat"]; + this._N=obj["NumberFormat"]; } if (!_isUndefined(obj["RowCount"])) { - this.m_rowCount=obj["RowCount"]; + this._R=obj["RowCount"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._T=obj["Text"]; } if (!_isUndefined(obj["ValueTypes"])) { - this.m_valueTypes=obj["ValueTypes"]; + this._Va=obj["ValueTypes"]; } if (!_isUndefined(obj["Values"])) { - this.m_values=obj["Values"]; + this._V=obj["Values"]; } _handleNavigationPropertyResults(this, obj, ["rows", "Rows"]); }; RangeView.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeView.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeView.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; RangeView.prototype.toJSON=function () { - return { - "cellAddresses": this.m_cellAddresses, - "columnCount": this.m_columnCount, - "formulas": this.m_formulas, - "formulasLocal": this.m_formulasLocal, - "formulasR1C1": this.m_formulasR1C1, - "index": this.m_index, - "numberFormat": this.m_numberFormat, - "rowCount": this.m_rowCount, - "text": this.m_text, - "values": this.m_values, - "valueTypes": this.m_valueTypes - }; + return _toJson(this, { + "cellAddresses": this._C, + "columnCount": this._Co, + "formulas": this._F, + "formulasLocal": this._Fo, + "formulasR1C1": this._For, + "index": this._I, + "numberFormat": this._N, + "rowCount": this._R, + "text": this._T, + "values": this._V, + "valueTypes": this._Va, + }, { + "rows": this._Ro, + }); + }; + RangeView.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return RangeView; }(OfficeExtension.ClientObject)); Excel.RangeView=RangeView; + var _typeRangeViewCollection="RangeViewCollection"; var RangeViewCollection=(function (_super) { __extends(RangeViewCollection, _super); function RangeViewCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeViewCollection.prototype, "_className", { get: function () { @@ -13089,22 +14786,30 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeViewCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeViewCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "RangeViewCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeRangeViewCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); RangeViewCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("RangeViewCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; RangeViewCollection.prototype.getItemAt=function (index) { - return new Excel.RangeView(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.RangeView(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; RangeViewCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13123,19 +14828,27 @@ var Excel; } }; RangeViewCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeViewCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeViewCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.RangeView(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(false, _this.context, _this, childItemData, index)); }); }; RangeViewCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return RangeViewCollection; }(OfficeExtension.ClientObject)); Excel.RangeViewCollection=RangeViewCollection; + var _typeSettingCollection="SettingCollection"; var SettingCollection=(function (_super) { __extends(SettingCollection, _super); function SettingCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(SettingCollection.prototype, "_className", { get: function () { @@ -13144,9 +14857,16 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(SettingCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(SettingCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "SettingCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeSettingCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -13154,10 +14874,10 @@ var Excel; }); SettingCollection.prototype.add=function (key, value) { value=Setting._replaceDateWithStringDate(value); - return new Excel.Setting(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [key, value], false, true, null)); + return new Excel.Setting(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [key, value], false, true, null, false)); }; SettingCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -13166,7 +14886,7 @@ var Excel; return new Excel.Setting(this.context, _createIndexerObjectPath(this.context, this, [key])); }; SettingCollection.prototype.getItemOrNullObject=function (key) { - return new Excel.Setting(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null)); + return new Excel.Setting(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null, false)); }; SettingCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13185,8 +14905,15 @@ var Excel; } }; SettingCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + SettingCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + SettingCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.Setting(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; Object.defineProperty(SettingCollection.prototype, "onSettingsChanged", { get: function () { @@ -13210,15 +14937,16 @@ var Excel; configurable: true }); SettingCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return SettingCollection; }(OfficeExtension.ClientObject)); Excel.SettingCollection=SettingCollection; + var _typeSetting="Setting"; var Setting=(function (_super) { __extends(Setting, _super); function Setting() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Setting.prototype, "_className", { get: function () { @@ -13227,6 +14955,20 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Setting.prototype, "_scalarPropertyNames", { + get: function () { + return ["key", "value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Setting.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true]; + }, + enumerable: true, + configurable: true + }); Setting.replaceStringDateWithDate=function (value) { var strValue=JSON.stringify(value); value=JSON.parse(strValue, function dateReviver(k, v) { @@ -13250,15 +14992,15 @@ var Excel; }; Object.defineProperty(Setting.prototype, "key", { get: function () { - _throwIfNotLoaded("key", this.m_key, "Setting", this._isNull); - return this.m_key; + _throwIfNotLoaded("key", this._K, _typeSetting, this._isNull); + return this._K; }, enumerable: true, configurable: true }); Object.defineProperty(Setting.prototype, "value", { get: function () { - _throwIfNotLoaded("value", this.m_value, "Setting", this._isNull); + _throwIfNotLoaded("value", this.m_value, _typeSetting, this._isNull); return this.m_value; }, set: function (value) { @@ -13277,8 +15019,11 @@ var Excel; Setting.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["value"], [], []); }; + Setting.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; Setting.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Setting.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13287,7 +15032,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Key"])) { - this.m_key=obj["Key"]; + this._K=obj["Key"]; } if (!_isUndefined(obj["Value"])) { this.m_value=obj["Value"]; @@ -13295,24 +15040,35 @@ var Excel; } }; Setting.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Setting.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Setting.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; Setting.prototype.toJSON=function () { - return { - "key": this.m_key, - "value": this.m_value - }; + return _toJson(this, { + "key": this._K, + "value": this.m_value, + }, {}); + }; + Setting.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; - Setting.DateJSONPrefix="Date("; - Setting.DateJSONSuffix=")"; return Setting; }(OfficeExtension.ClientObject)); + Setting.DateJSONPrefix="Date("; + Setting.DateJSONSuffix=")"; Excel.Setting=Setting; + var _typeNamedItemCollection="NamedItemCollection"; var NamedItemCollection=(function (_super) { __extends(NamedItemCollection, _super); function NamedItemCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(NamedItemCollection.prototype, "_className", { get: function () { @@ -13321,22 +15077,32 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(NamedItemCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(NamedItemCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "NamedItemCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeNamedItemCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); NamedItemCollection.prototype.add=function (name, reference, comment) { - return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [name, reference, comment], false, true, null)); + _throwIfApiNotSupported("NamedItemCollection.add", _defaultApiSetName, "1.4", _hostName); + return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [name, reference, comment], false, true, null, false)); }; NamedItemCollection.prototype.addFormulaLocal=function (name, formula, comment) { - return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "AddFormulaLocal", 0, [name, formula, comment], false, false, null)); + _throwIfApiNotSupported("NamedItemCollection.addFormulaLocal", _defaultApiSetName, "1.4", _hostName); + return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "AddFormulaLocal", 0, [name, formula, comment], false, false, null, false)); }; NamedItemCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("NamedItemCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -13345,7 +15111,8 @@ var Excel; return new Excel.NamedItem(this.context, _createIndexerObjectPath(this.context, this, [name])); }; NamedItemCollection.prototype.getItemOrNullObject=function (name) { - return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null)); + _throwIfApiNotSupported("NamedItemCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.NamedItem(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null, false)); }; NamedItemCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13364,19 +15131,27 @@ var Excel; } }; NamedItemCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + NamedItemCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + NamedItemCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.NamedItem(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; NamedItemCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return NamedItemCollection; }(OfficeExtension.ClientObject)); Excel.NamedItemCollection=NamedItemCollection; + var _typeNamedItem="NamedItem"; var NamedItem=(function (_super) { __extends(NamedItem, _super); function NamedItem() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(NamedItem.prototype, "_className", { get: function () { @@ -13385,33 +15160,57 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(NamedItem.prototype, "_scalarPropertyNames", { + get: function () { + return ["name", "type", "value", "visible", "_Id", "comment", "scope"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NamedItem.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, false, false, true, false, true, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NamedItem.prototype, "_navigationPropertyNames", { + get: function () { + return ["worksheet", "worksheetOrNullObject"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(NamedItem.prototype, "worksheet", { get: function () { - if (!this.m_worksheet) { - this.m_worksheet=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false)); + _throwIfApiNotSupported("NamedItem.worksheet", _defaultApiSetName, "1.4", _hostName); + if (!this._W) { + this._W=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false, false)); } - return this.m_worksheet; + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(NamedItem.prototype, "worksheetOrNullObject", { get: function () { - if (!this.m_worksheetOrNullObject) { - this.m_worksheetOrNullObject=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "WorksheetOrNullObject", false, false)); + _throwIfApiNotSupported("NamedItem.worksheetOrNullObject", _defaultApiSetName, "1.4", _hostName); + if (!this._Wo) { + this._Wo=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "WorksheetOrNullObject", false, false, false)); } - return this.m_worksheetOrNullObject; + return this._Wo; }, enumerable: true, configurable: true }); Object.defineProperty(NamedItem.prototype, "comment", { get: function () { - _throwIfNotLoaded("comment", this.m_comment, "NamedItem", this._isNull); - return this.m_comment; + _throwIfNotLoaded("comment", this._C, _typeNamedItem, this._isNull); + _throwIfApiNotSupported("NamedItem.comment", _defaultApiSetName, "1.4", _hostName); + return this._C; }, set: function (value) { - this.m_comment=value; + this._C=value; _createSetPropertyAction(this.context, this, "Comment", value); }, enumerable: true, @@ -13419,43 +15218,44 @@ var Excel; }); Object.defineProperty(NamedItem.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "NamedItem", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeNamedItem, this._isNull); + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(NamedItem.prototype, "scope", { get: function () { - _throwIfNotLoaded("scope", this.m_scope, "NamedItem", this._isNull); - return this.m_scope; + _throwIfNotLoaded("scope", this._S, _typeNamedItem, this._isNull); + _throwIfApiNotSupported("NamedItem.scope", _defaultApiSetName, "1.4", _hostName); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(NamedItem.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "NamedItem", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._T, _typeNamedItem, this._isNull); + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(NamedItem.prototype, "value", { get: function () { - _throwIfNotLoaded("value", this.m_value, "NamedItem", this._isNull); - return this.m_value; + _throwIfNotLoaded("value", this._V, _typeNamedItem, this._isNull); + return this._V; }, enumerable: true, configurable: true }); Object.defineProperty(NamedItem.prototype, "visible", { get: function () { - _throwIfNotLoaded("visible", this.m_visible, "NamedItem", this._isNull); - return this.m_visible; + _throwIfNotLoaded("visible", this._Vi, _typeNamedItem, this._isNull); + return this._Vi; }, set: function (value) { - this.m_visible=value; + this._Vi=value; _createSetPropertyAction(this.context, this, "Visible", value); }, enumerable: true, @@ -13463,28 +15263,31 @@ var Excel; }); Object.defineProperty(NamedItem.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "NamedItem", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeNamedItem, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); NamedItem.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["visible", "comment"], [], [ - "worksheet", - "worksheetOrNullObject", "worksheet", "worksheetOrNullObject" ]); }; + NamedItem.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; NamedItem.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _throwIfApiNotSupported("NamedItem.delete", _defaultApiSetName, "1.4", _hostName); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; NamedItem.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); }; NamedItem.prototype.getRangeOrNullObject=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRangeOrNullObject", 1, [], false, true, null)); + _throwIfApiNotSupported("NamedItem.getRangeOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRangeOrNullObject", 1, [], false, true, null, false)); }; NamedItem.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13493,31 +15296,33 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Comment"])) { - this.m_comment=obj["Comment"]; + this._C=obj["Comment"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Scope"])) { - this.m_scope=obj["Scope"]; + this._S=obj["Scope"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._T=obj["Type"]; } if (!_isUndefined(obj["Value"])) { - this.m_value=obj["Value"]; + this._V=obj["Value"]; } if (!_isUndefined(obj["Visible"])) { - this.m_visible=obj["Visible"]; + this._Vi=obj["Visible"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } _handleNavigationPropertyResults(this, obj, ["worksheet", "Worksheet", "worksheetOrNullObject", "WorksheetOrNullObject"]); }; NamedItem.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + NamedItem.prototype.retrieve=function (option) { + return _retrieve(this, option); }; NamedItem.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -13525,26 +15330,35 @@ var Excel; return; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; + NamedItem.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; NamedItem.prototype.toJSON=function () { - return { - "comment": this.m_comment, - "name": this.m_name, - "scope": this.m_scope, - "type": this.m_type, - "value": this.m_value, - "visible": this.m_visible - }; + return _toJson(this, { + "comment": this._C, + "name": this._N, + "scope": this._S, + "type": this._T, + "value": this._V, + "visible": this._Vi, + }, {}); + }; + NamedItem.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return NamedItem; }(OfficeExtension.ClientObject)); Excel.NamedItem=NamedItem; + var _typeBinding="Binding"; var Binding=(function (_super) { __extends(Binding, _super); function Binding() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Binding.prototype, "_className", { get: function () { @@ -13553,33 +15367,41 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Binding.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "type"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(Binding.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Binding", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeBinding, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Binding.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "Binding", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._T, _typeBinding, this._isNull); + return this._T; }, enumerable: true, configurable: true }); Binding.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _throwIfApiNotSupported("Binding.delete", _defaultApiSetName, "1.3", _hostName); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Binding.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, false, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, false, null, false)); }; Binding.prototype.getTable=function () { - return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetTable", 1, [], false, false, null)); + return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetTable", 1, [], false, false, null, false)); }; Binding.prototype.getText=function () { - var action=_createMethodAction(this.context, this, "GetText", 1, []); + var action=_createMethodAction(this.context, this, "GetText", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -13591,15 +15413,17 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._T=obj["Type"]; } }; Binding.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Binding.prototype.retrieve=function (option) { + return _retrieve(this, option); }; Binding.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -13607,12 +15431,17 @@ var Excel; return; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; + Binding.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; Object.defineProperty(Binding.prototype, "onDataChanged", { get: function () { var _this=this; + _throwIfApiNotSupported("Binding.onDataChanged", _defaultApiSetName, "1.3", _hostName); if (!this.m_dataChanged) { this.m_dataChanged=new OfficeExtension.EventHandlers(this.context, this, "DataChanged", { registerFunc: function (handlerCallback) { @@ -13637,6 +15466,7 @@ var Excel; Object.defineProperty(Binding.prototype, "onSelectionChanged", { get: function () { var _this=this; + _throwIfApiNotSupported("Binding.onSelectionChanged", _defaultApiSetName, "1.3", _hostName); if (!this.m_selectionChanged) { this.m_selectionChanged=new OfficeExtension.EventHandlers(this.context, this, "SelectionChanged", { registerFunc: function (handlerCallback) { @@ -13663,18 +15493,23 @@ var Excel; configurable: true }); Binding.prototype.toJSON=function () { - return { - "id": this.m_id, - "type": this.m_type - }; + return _toJson(this, { + "id": this._I, + "type": this._T, + }, {}); + }; + Binding.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Binding; }(OfficeExtension.ClientObject)); Excel.Binding=Binding; + var _typeBindingCollection="BindingCollection"; var BindingCollection=(function (_super) { __extends(BindingCollection, _super); function BindingCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(BindingCollection.prototype, "_className", { get: function () { @@ -13683,9 +15518,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(BindingCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(BindingCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(BindingCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "BindingCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeBindingCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -13693,23 +15542,27 @@ var Excel; }); Object.defineProperty(BindingCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "BindingCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeBindingCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); BindingCollection.prototype.add=function (range, bindingType, id) { - return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [range, bindingType, id], false, true, null)); + _throwIfApiNotSupported("BindingCollection.add", _defaultApiSetName, "1.3", _hostName); + return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [range, bindingType, id], false, true, null, false)); }; BindingCollection.prototype.addFromNamedItem=function (name, bindingType, id) { - return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "AddFromNamedItem", 0, [name, bindingType, id], false, false, null)); + _throwIfApiNotSupported("BindingCollection.addFromNamedItem", _defaultApiSetName, "1.3", _hostName); + return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "AddFromNamedItem", 0, [name, bindingType, id], false, false, null, false)); }; BindingCollection.prototype.addFromSelection=function (bindingType, id) { - return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "AddFromSelection", 0, [bindingType, id], false, false, null)); + _throwIfApiNotSupported("BindingCollection.addFromSelection", _defaultApiSetName, "1.3", _hostName); + return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "AddFromSelection", 0, [bindingType, id], false, false, null, false)); }; BindingCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("BindingCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -13718,10 +15571,11 @@ var Excel; return new Excel.Binding(this.context, _createIndexerObjectPath(this.context, this, [id])); }; BindingCollection.prototype.getItemAt=function (index) { - return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; BindingCollection.prototype.getItemOrNullObject=function (id) { - return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null)); + _throwIfApiNotSupported("BindingCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Binding(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null, false)); }; BindingCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13730,7 +15584,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -13743,21 +15597,29 @@ var Excel; } }; BindingCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + BindingCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + BindingCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.Binding(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; BindingCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return BindingCollection; }(OfficeExtension.ClientObject)); Excel.BindingCollection=BindingCollection; + var _typeTableCollection="TableCollection"; var TableCollection=(function (_super) { __extends(TableCollection, _super); function TableCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableCollection.prototype, "_className", { get: function () { @@ -13766,9 +15628,33 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TableCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableCollection.prototype, "_ParentObject", { + get: function () { + return this.m__ParentObject; + }, + set: function (value) { + this.m__ParentObject=value; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TableCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -13776,17 +15662,18 @@ var Excel; }); Object.defineProperty(TableCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "TableCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeTableCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); TableCollection.prototype.add=function (address, hasHeaders) { - return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [address, hasHeaders], false, true, null)); + return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [address, hasHeaders], false, true, null, false)); }; TableCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("TableCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -13795,10 +15682,11 @@ var Excel; return new Excel.Table(this.context, _createIndexerObjectPath(this.context, this, [key])); }; TableCollection.prototype.getItemAt=function (index) { - return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; TableCollection.prototype.getItemOrNullObject=function (key) { - return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null)); + _throwIfApiNotSupported("TableCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Table(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null, false)); }; TableCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13807,7 +15695,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -13820,21 +15708,29 @@ var Excel; } }; TableCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.Table(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; TableCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return TableCollection; }(OfficeExtension.ClientObject)); Excel.TableCollection=TableCollection; + var _typeTable="Table"; var Table=(function (_super) { __extends(Table, _super); function Table() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Table.prototype, "_className", { get: function () { @@ -13843,53 +15739,77 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Table.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "name", "showHeaders", "showTotals", "style", "highlightFirstColumn", "highlightLastColumn", "showBandedRows", "showBandedColumns", "showFilterButton"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Table.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, true, true, true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Table.prototype, "_navigationPropertyNames", { + get: function () { + return ["columns", "rows", "sort", "worksheet"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(Table.prototype, "columns", { get: function () { - if (!this.m_columns) { - this.m_columns=new Excel.TableColumnCollection(this.context, _createPropertyObjectPath(this.context, this, "Columns", true, false)); + if (!this._C) { + this._C=new Excel.TableColumnCollection(this.context, _createPropertyObjectPath(this.context, this, "Columns", true, false, false)); } - return this.m_columns; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "rows", { get: function () { - if (!this.m_rows) { - this.m_rows=new Excel.TableRowCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false)); + if (!this._R) { + this._R=new Excel.TableRowCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false, false)); } - return this.m_rows; + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "sort", { get: function () { - if (!this.m_sort) { - this.m_sort=new Excel.TableSort(this.context, _createPropertyObjectPath(this.context, this, "Sort", false, false)); + _throwIfApiNotSupported("Table.sort", _defaultApiSetName, "1.2", _hostName); + if (!this._So) { + this._So=new Excel.TableSort(this.context, _createPropertyObjectPath(this.context, this, "Sort", false, false, false)); } - return this.m_sort; + return this._So; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "worksheet", { get: function () { - if (!this.m_worksheet) { - this.m_worksheet=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false)); + _throwIfApiNotSupported("Table.worksheet", _defaultApiSetName, "1.2", _hostName); + if (!this._W) { + this._W=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false, false)); } - return this.m_worksheet; + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "highlightFirstColumn", { get: function () { - _throwIfNotLoaded("highlightFirstColumn", this.m_highlightFirstColumn, "Table", this._isNull); - return this.m_highlightFirstColumn; + _throwIfNotLoaded("highlightFirstColumn", this._H, _typeTable, this._isNull); + _throwIfApiNotSupported("Table.highlightFirstColumn", _defaultApiSetName, "1.3", _hostName); + return this._H; }, set: function (value) { - this.m_highlightFirstColumn=value; + this._H=value; _createSetPropertyAction(this.context, this, "HighlightFirstColumn", value); }, enumerable: true, @@ -13897,11 +15817,12 @@ var Excel; }); Object.defineProperty(Table.prototype, "highlightLastColumn", { get: function () { - _throwIfNotLoaded("highlightLastColumn", this.m_highlightLastColumn, "Table", this._isNull); - return this.m_highlightLastColumn; + _throwIfNotLoaded("highlightLastColumn", this._Hi, _typeTable, this._isNull); + _throwIfApiNotSupported("Table.highlightLastColumn", _defaultApiSetName, "1.3", _hostName); + return this._Hi; }, set: function (value) { - this.m_highlightLastColumn=value; + this._Hi=value; _createSetPropertyAction(this.context, this, "HighlightLastColumn", value); }, enumerable: true, @@ -13909,19 +15830,19 @@ var Excel; }); Object.defineProperty(Table.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Table", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeTable, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "Table", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeTable, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -13929,11 +15850,12 @@ var Excel; }); Object.defineProperty(Table.prototype, "showBandedColumns", { get: function () { - _throwIfNotLoaded("showBandedColumns", this.m_showBandedColumns, "Table", this._isNull); - return this.m_showBandedColumns; + _throwIfNotLoaded("showBandedColumns", this._S, _typeTable, this._isNull); + _throwIfApiNotSupported("Table.showBandedColumns", _defaultApiSetName, "1.3", _hostName); + return this._S; }, set: function (value) { - this.m_showBandedColumns=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShowBandedColumns", value); }, enumerable: true, @@ -13941,11 +15863,12 @@ var Excel; }); Object.defineProperty(Table.prototype, "showBandedRows", { get: function () { - _throwIfNotLoaded("showBandedRows", this.m_showBandedRows, "Table", this._isNull); - return this.m_showBandedRows; + _throwIfNotLoaded("showBandedRows", this._Sh, _typeTable, this._isNull); + _throwIfApiNotSupported("Table.showBandedRows", _defaultApiSetName, "1.3", _hostName); + return this._Sh; }, set: function (value) { - this.m_showBandedRows=value; + this._Sh=value; _createSetPropertyAction(this.context, this, "ShowBandedRows", value); }, enumerable: true, @@ -13953,11 +15876,12 @@ var Excel; }); Object.defineProperty(Table.prototype, "showFilterButton", { get: function () { - _throwIfNotLoaded("showFilterButton", this.m_showFilterButton, "Table", this._isNull); - return this.m_showFilterButton; + _throwIfNotLoaded("showFilterButton", this._Sho, _typeTable, this._isNull); + _throwIfApiNotSupported("Table.showFilterButton", _defaultApiSetName, "1.3", _hostName); + return this._Sho; }, set: function (value) { - this.m_showFilterButton=value; + this._Sho=value; _createSetPropertyAction(this.context, this, "ShowFilterButton", value); }, enumerable: true, @@ -13965,11 +15889,11 @@ var Excel; }); Object.defineProperty(Table.prototype, "showHeaders", { get: function () { - _throwIfNotLoaded("showHeaders", this.m_showHeaders, "Table", this._isNull); - return this.m_showHeaders; + _throwIfNotLoaded("showHeaders", this._Show, _typeTable, this._isNull); + return this._Show; }, set: function (value) { - this.m_showHeaders=value; + this._Show=value; _createSetPropertyAction(this.context, this, "ShowHeaders", value); }, enumerable: true, @@ -13977,11 +15901,11 @@ var Excel; }); Object.defineProperty(Table.prototype, "showTotals", { get: function () { - _throwIfNotLoaded("showTotals", this.m_showTotals, "Table", this._isNull); - return this.m_showTotals; + _throwIfNotLoaded("showTotals", this._ShowT, _typeTable, this._isNull); + return this._ShowT; }, set: function (value) { - this.m_showTotals=value; + this._ShowT=value; _createSetPropertyAction(this.context, this, "ShowTotals", value); }, enumerable: true, @@ -13989,11 +15913,11 @@ var Excel; }); Object.defineProperty(Table.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "Table", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._St, _typeTable, this._isNull); + return this._St; }, set: function (value) { - this.m_style=value; + this._St=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -14001,39 +15925,41 @@ var Excel; }); Table.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["name", "showHeaders", "showTotals", "style", "highlightFirstColumn", "highlightLastColumn", "showBandedRows", "showBandedColumns", "showFilterButton"], [], [ - "columns", - "rows", - "sort", - "worksheet", "columns", "rows", "sort", "worksheet" ]); }; + Table.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; Table.prototype.clearFilters=function () { - _createMethodAction(this.context, this, "ClearFilters", 0, []); + _throwIfApiNotSupported("Table.clearFilters", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "ClearFilters", 0, [], false); }; Table.prototype.convertToRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "ConvertToRange", 0, [], false, true, null)); + _throwIfApiNotSupported("Table.convertToRange", _defaultApiSetName, "1.2", _hostName); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "ConvertToRange", 0, [], false, true, null, false)); }; Table.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Table.prototype.getDataBodyRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetDataBodyRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetDataBodyRange", 1, [], false, true, null, false)); }; Table.prototype.getHeaderRowRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetHeaderRowRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetHeaderRowRange", 1, [], false, true, null, false)); }; Table.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); }; Table.prototype.getTotalRowRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetTotalRowRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetTotalRowRange", 1, [], false, true, null, false)); }; Table.prototype.reapplyFilters=function () { - _createMethodAction(this.context, this, "ReapplyFilters", 0, []); + _throwIfApiNotSupported("Table.reapplyFilters", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "ReapplyFilters", 0, [], false); }; Table.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14041,41 +15967,46 @@ var Excel; return; var obj=value; _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + obj["Id"]=obj["Id"].toString(); + } if (!_isUndefined(obj["HighlightFirstColumn"])) { - this.m_highlightFirstColumn=obj["HighlightFirstColumn"]; + this._H=obj["HighlightFirstColumn"]; } if (!_isUndefined(obj["HighlightLastColumn"])) { - this.m_highlightLastColumn=obj["HighlightLastColumn"]; + this._Hi=obj["HighlightLastColumn"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["ShowBandedColumns"])) { - this.m_showBandedColumns=obj["ShowBandedColumns"]; + this._S=obj["ShowBandedColumns"]; } if (!_isUndefined(obj["ShowBandedRows"])) { - this.m_showBandedRows=obj["ShowBandedRows"]; + this._Sh=obj["ShowBandedRows"]; } if (!_isUndefined(obj["ShowFilterButton"])) { - this.m_showFilterButton=obj["ShowFilterButton"]; + this._Sho=obj["ShowFilterButton"]; } if (!_isUndefined(obj["ShowHeaders"])) { - this.m_showHeaders=obj["ShowHeaders"]; + this._Show=obj["ShowHeaders"]; } if (!_isUndefined(obj["ShowTotals"])) { - this.m_showTotals=obj["ShowTotals"]; + this._ShowT=obj["ShowTotals"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._St=obj["Style"]; } _handleNavigationPropertyResults(this, obj, ["columns", "Columns", "rows", "Rows", "sort", "Sort", "worksheet", "Worksheet"]); }; Table.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Table.prototype.retrieve=function (option) { + return _retrieve(this, option); }; Table.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -14083,30 +16014,44 @@ var Excel; return; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + value["Id"]=value["Id"].toString(); + this._I=value["Id"]; } }; + Table.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; Table.prototype.toJSON=function () { - return { - "highlightFirstColumn": this.m_highlightFirstColumn, - "highlightLastColumn": this.m_highlightLastColumn, - "id": this.m_id, - "name": this.m_name, - "showBandedColumns": this.m_showBandedColumns, - "showBandedRows": this.m_showBandedRows, - "showFilterButton": this.m_showFilterButton, - "showHeaders": this.m_showHeaders, - "showTotals": this.m_showTotals, - "style": this.m_style - }; + return _toJson(this, { + "highlightFirstColumn": this._H, + "highlightLastColumn": this._Hi, + "id": this._I, + "name": this._N, + "showBandedColumns": this._S, + "showBandedRows": this._Sh, + "showFilterButton": this._Sho, + "showHeaders": this._Show, + "showTotals": this._ShowT, + "style": this._St, + }, { + "columns": this._C, + "rows": this._R, + "sort": this._So, + }); + }; + Table.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Table; }(OfficeExtension.ClientObject)); Excel.Table=Table; + var _typeTableColumnCollection="TableColumnCollection"; var TableColumnCollection=(function (_super) { __extends(TableColumnCollection, _super); function TableColumnCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableColumnCollection.prototype, "_className", { get: function () { @@ -14115,9 +16060,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TableColumnCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableColumnCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TableColumnCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableColumnCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableColumnCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14125,17 +16084,18 @@ var Excel; }); Object.defineProperty(TableColumnCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "TableColumnCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeTableColumnCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); TableColumnCollection.prototype.add=function (index, values, name) { - return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [index, values, name], false, true, null)); + return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [index, values, name], false, true, null, false)); }; TableColumnCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("TableColumnCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -14144,10 +16104,11 @@ var Excel; return new Excel.TableColumn(this.context, _createIndexerObjectPath(this.context, this, [key])); }; TableColumnCollection.prototype.getItemAt=function (index) { - return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; TableColumnCollection.prototype.getItemOrNullObject=function (key) { - return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null)); + _throwIfApiNotSupported("TableColumnCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.TableColumn(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null, false)); }; TableColumnCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14156,7 +16117,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14169,21 +16130,29 @@ var Excel; } }; TableColumnCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableColumnCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableColumnCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.TableColumn(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; TableColumnCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return TableColumnCollection; }(OfficeExtension.ClientObject)); Excel.TableColumnCollection=TableColumnCollection; + var _typeTableColumn="TableColumn"; var TableColumn=(function (_super) { __extends(TableColumn, _super); function TableColumn() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableColumn.prototype, "_className", { get: function () { @@ -14192,39 +16161,61 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TableColumn.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "index", "values", "name"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableColumn.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, false, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableColumn.prototype, "_navigationPropertyNames", { + get: function () { + return ["filter"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TableColumn.prototype, "filter", { get: function () { - if (!this.m_filter) { - this.m_filter=new Excel.Filter(this.context, _createPropertyObjectPath(this.context, this, "Filter", false, false)); + _throwIfApiNotSupported("TableColumn.filter", _defaultApiSetName, "1.2", _hostName); + if (!this._F) { + this._F=new Excel.Filter(this.context, _createPropertyObjectPath(this.context, this, "Filter", false, false, false)); } - return this.m_filter; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(TableColumn.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "TableColumn", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeTableColumn, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(TableColumn.prototype, "index", { get: function () { - _throwIfNotLoaded("index", this.m_index, "TableColumn", this._isNull); - return this.m_index; + _throwIfNotLoaded("index", this._In, _typeTableColumn, this._isNull); + return this._In; }, enumerable: true, configurable: true }); Object.defineProperty(TableColumn.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "TableColumn", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeTableColumn, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -14232,11 +16223,11 @@ var Excel; }); Object.defineProperty(TableColumn.prototype, "values", { get: function () { - _throwIfNotLoaded("values", this.m_values, "TableColumn", this._isNull); - return this.m_values; + _throwIfNotLoaded("values", this._V, _typeTableColumn, this._isNull); + return this._V; }, set: function (value) { - this.m_values=value; + this._V=value; _createSetPropertyAction(this.context, this, "Values", value); }, enumerable: true, @@ -14244,24 +16235,26 @@ var Excel; }); TableColumn.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["values", "name"], [], [ - "filter", "filter" ]); }; + TableColumn.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; TableColumn.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; TableColumn.prototype.getDataBodyRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetDataBodyRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetDataBodyRange", 1, [], false, true, null, false)); }; TableColumn.prototype.getHeaderRowRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetHeaderRowRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetHeaderRowRange", 1, [], false, true, null, false)); }; TableColumn.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); }; TableColumn.prototype.getTotalRowRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetTotalRowRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetTotalRowRange", 1, [], false, true, null, false)); }; TableColumn.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14270,22 +16263,24 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Index"])) { - this.m_index=obj["Index"]; + this._In=obj["Index"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Values"])) { - this.m_values=obj["Values"]; + this._V=obj["Values"]; } _handleNavigationPropertyResults(this, obj, ["filter", "Filter"]); }; TableColumn.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableColumn.prototype.retrieve=function (option) { + return _retrieve(this, option); }; TableColumn.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -14293,24 +16288,35 @@ var Excel; return; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; + TableColumn.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; TableColumn.prototype.toJSON=function () { - return { - "id": this.m_id, - "index": this.m_index, - "name": this.m_name, - "values": this.m_values - }; + return _toJson(this, { + "id": this._I, + "index": this._In, + "name": this._N, + "values": this._V, + }, { + "filter": this._F, + }); + }; + TableColumn.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TableColumn; }(OfficeExtension.ClientObject)); Excel.TableColumn=TableColumn; + var _typeTableRowCollection="TableRowCollection"; var TableRowCollection=(function (_super) { __extends(TableRowCollection, _super); function TableRowCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableRowCollection.prototype, "_className", { get: function () { @@ -14319,9 +16325,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TableRowCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableRowCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TableRowCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableRowCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableRowCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14329,23 +16349,24 @@ var Excel; }); Object.defineProperty(TableRowCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "TableRowCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeTableRowCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); TableRowCollection.prototype.add=function (index, values) { - return new Excel.TableRow(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [index, values], false, true, null)); + return new Excel.TableRow(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [index, values], false, true, null, false)); }; TableRowCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("TableRowCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; TableRowCollection.prototype.getItemAt=function (index) { - return new Excel.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; TableRowCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14354,7 +16375,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14367,21 +16388,29 @@ var Excel; } }; TableRowCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableRowCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableRowCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.TableRow(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(false, _this.context, _this, childItemData, index)); }); }; TableRowCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return TableRowCollection; }(OfficeExtension.ClientObject)); Excel.TableRowCollection=TableRowCollection; + var _typeTableRow="TableRow"; var TableRow=(function (_super) { __extends(TableRow, _super); function TableRow() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableRow.prototype, "_className", { get: function () { @@ -14390,21 +16419,35 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TableRow.prototype, "_scalarPropertyNames", { + get: function () { + return ["index", "values"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TableRow.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TableRow.prototype, "index", { get: function () { - _throwIfNotLoaded("index", this.m_index, "TableRow", this._isNull); - return this.m_index; + _throwIfNotLoaded("index", this._I, _typeTableRow, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "values", { get: function () { - _throwIfNotLoaded("values", this.m_values, "TableRow", this._isNull); - return this.m_values; + _throwIfNotLoaded("values", this._V, _typeTableRow, this._isNull); + return this._V; }, set: function (value) { - this.m_values=value; + this._V=value; _createSetPropertyAction(this.context, this, "Values", value); }, enumerable: true, @@ -14413,11 +16456,14 @@ var Excel; TableRow.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["values"], [], []); }; + TableRow.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; TableRow.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; TableRow.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); }; TableRow.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14426,29 +16472,40 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Index"])) { - this.m_index=obj["Index"]; + this._I=obj["Index"]; } if (!_isUndefined(obj["Values"])) { - this.m_values=obj["Values"]; + this._V=obj["Values"]; } }; TableRow.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableRow.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableRow.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; TableRow.prototype.toJSON=function () { - return { - "index": this.m_index, - "values": this.m_values - }; + return _toJson(this, { + "index": this._I, + "values": this._V, + }, {}); + }; + TableRow.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TableRow; }(OfficeExtension.ClientObject)); Excel.TableRow=TableRow; + var _typeRangeFormat="RangeFormat"; var RangeFormat=(function (_super) { __extends(RangeFormat, _super); function RangeFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeFormat.prototype, "_className", { get: function () { @@ -14457,53 +16514,76 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["wrapText", "horizontalAlignment", "verticalAlignment", "columnWidth", "rowHeight"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["fill", "font", "borders", "protection"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeFormat.prototype, "borders", { get: function () { - if (!this.m_borders) { - this.m_borders=new Excel.RangeBorderCollection(this.context, _createPropertyObjectPath(this.context, this, "Borders", true, false)); + if (!this._B) { + this._B=new Excel.RangeBorderCollection(this.context, _createPropertyObjectPath(this.context, this, "Borders", true, false, false)); } - return this.m_borders; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(RangeFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.RangeFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.RangeFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(RangeFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.RangeFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Excel.RangeFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true }); Object.defineProperty(RangeFormat.prototype, "protection", { get: function () { - if (!this.m_protection) { - this.m_protection=new Excel.FormatProtection(this.context, _createPropertyObjectPath(this.context, this, "Protection", false, false)); + _throwIfApiNotSupported("RangeFormat.protection", _defaultApiSetName, "1.2", _hostName); + if (!this._P) { + this._P=new Excel.FormatProtection(this.context, _createPropertyObjectPath(this.context, this, "Protection", false, false, false)); } - return this.m_protection; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(RangeFormat.prototype, "columnWidth", { get: function () { - _throwIfNotLoaded("columnWidth", this.m_columnWidth, "RangeFormat", this._isNull); - return this.m_columnWidth; + _throwIfNotLoaded("columnWidth", this._C, _typeRangeFormat, this._isNull); + _throwIfApiNotSupported("RangeFormat.columnWidth", _defaultApiSetName, "1.2", _hostName); + return this._C; }, set: function (value) { - this.m_columnWidth=value; + this._C=value; _createSetPropertyAction(this.context, this, "ColumnWidth", value); }, enumerable: true, @@ -14511,11 +16591,11 @@ var Excel; }); Object.defineProperty(RangeFormat.prototype, "horizontalAlignment", { get: function () { - _throwIfNotLoaded("horizontalAlignment", this.m_horizontalAlignment, "RangeFormat", this._isNull); - return this.m_horizontalAlignment; + _throwIfNotLoaded("horizontalAlignment", this._H, _typeRangeFormat, this._isNull); + return this._H; }, set: function (value) { - this.m_horizontalAlignment=value; + this._H=value; _createSetPropertyAction(this.context, this, "HorizontalAlignment", value); }, enumerable: true, @@ -14523,11 +16603,12 @@ var Excel; }); Object.defineProperty(RangeFormat.prototype, "rowHeight", { get: function () { - _throwIfNotLoaded("rowHeight", this.m_rowHeight, "RangeFormat", this._isNull); - return this.m_rowHeight; + _throwIfNotLoaded("rowHeight", this._R, _typeRangeFormat, this._isNull); + _throwIfApiNotSupported("RangeFormat.rowHeight", _defaultApiSetName, "1.2", _hostName); + return this._R; }, set: function (value) { - this.m_rowHeight=value; + this._R=value; _createSetPropertyAction(this.context, this, "RowHeight", value); }, enumerable: true, @@ -14535,11 +16616,11 @@ var Excel; }); Object.defineProperty(RangeFormat.prototype, "verticalAlignment", { get: function () { - _throwIfNotLoaded("verticalAlignment", this.m_verticalAlignment, "RangeFormat", this._isNull); - return this.m_verticalAlignment; + _throwIfNotLoaded("verticalAlignment", this._V, _typeRangeFormat, this._isNull); + return this._V; }, set: function (value) { - this.m_verticalAlignment=value; + this._V=value; _createSetPropertyAction(this.context, this, "VerticalAlignment", value); }, enumerable: true, @@ -14547,11 +16628,11 @@ var Excel; }); Object.defineProperty(RangeFormat.prototype, "wrapText", { get: function () { - _throwIfNotLoaded("wrapText", this.m_wrapText, "RangeFormat", this._isNull); - return this.m_wrapText; + _throwIfNotLoaded("wrapText", this._W, _typeRangeFormat, this._isNull); + return this._W; }, set: function (value) { - this.m_wrapText=value; + this._W=value; _createSetPropertyAction(this.context, this, "WrapText", value); }, enumerable: true, @@ -14559,15 +16640,19 @@ var Excel; }); RangeFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["wrapText", "horizontalAlignment", "verticalAlignment", "columnWidth", "rowHeight"], ["fill", "font", "protection"], [ - "borders", "borders" ]); }; + RangeFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; RangeFormat.prototype.autofitColumns=function () { - _createMethodAction(this.context, this, "AutofitColumns", 0, []); + _throwIfApiNotSupported("RangeFormat.autofitColumns", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "AutofitColumns", 0, [], false); }; RangeFormat.prototype.autofitRows=function () { - _createMethodAction(this.context, this, "AutofitRows", 0, []); + _throwIfApiNotSupported("RangeFormat.autofitRows", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "AutofitRows", 0, [], false); }; RangeFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14576,45 +16661,58 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["ColumnWidth"])) { - this.m_columnWidth=obj["ColumnWidth"]; + this._C=obj["ColumnWidth"]; } if (!_isUndefined(obj["HorizontalAlignment"])) { - this.m_horizontalAlignment=obj["HorizontalAlignment"]; + this._H=obj["HorizontalAlignment"]; } if (!_isUndefined(obj["RowHeight"])) { - this.m_rowHeight=obj["RowHeight"]; + this._R=obj["RowHeight"]; } if (!_isUndefined(obj["VerticalAlignment"])) { - this.m_verticalAlignment=obj["VerticalAlignment"]; + this._V=obj["VerticalAlignment"]; } if (!_isUndefined(obj["WrapText"])) { - this.m_wrapText=obj["WrapText"]; + this._W=obj["WrapText"]; } _handleNavigationPropertyResults(this, obj, ["borders", "Borders", "fill", "Fill", "font", "Font", "protection", "Protection"]); }; RangeFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; RangeFormat.prototype.toJSON=function () { - return { - "columnWidth": this.m_columnWidth, - "fill": this.m_fill, - "font": this.m_font, - "horizontalAlignment": this.m_horizontalAlignment, - "protection": this.m_protection, - "rowHeight": this.m_rowHeight, - "verticalAlignment": this.m_verticalAlignment, - "wrapText": this.m_wrapText - }; + return _toJson(this, { + "columnWidth": this._C, + "horizontalAlignment": this._H, + "rowHeight": this._R, + "verticalAlignment": this._V, + "wrapText": this._W, + }, { + "borders": this._B, + "fill": this._F, + "font": this._Fo, + "protection": this._P, + }); + }; + RangeFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return RangeFormat; }(OfficeExtension.ClientObject)); Excel.RangeFormat=RangeFormat; + var _typeFormatProtection="FormatProtection"; var FormatProtection=(function (_super) { __extends(FormatProtection, _super); function FormatProtection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(FormatProtection.prototype, "_className", { get: function () { @@ -14623,13 +16721,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(FormatProtection.prototype, "_scalarPropertyNames", { + get: function () { + return ["locked", "formulaHidden"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FormatProtection.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(FormatProtection.prototype, "formulaHidden", { get: function () { - _throwIfNotLoaded("formulaHidden", this.m_formulaHidden, "FormatProtection", this._isNull); - return this.m_formulaHidden; + _throwIfNotLoaded("formulaHidden", this._F, _typeFormatProtection, this._isNull); + return this._F; }, set: function (value) { - this.m_formulaHidden=value; + this._F=value; _createSetPropertyAction(this.context, this, "FormulaHidden", value); }, enumerable: true, @@ -14637,11 +16749,11 @@ var Excel; }); Object.defineProperty(FormatProtection.prototype, "locked", { get: function () { - _throwIfNotLoaded("locked", this.m_locked, "FormatProtection", this._isNull); - return this.m_locked; + _throwIfNotLoaded("locked", this._L, _typeFormatProtection, this._isNull); + return this._L; }, set: function (value) { - this.m_locked=value; + this._L=value; _createSetPropertyAction(this.context, this, "Locked", value); }, enumerable: true, @@ -14650,6 +16762,9 @@ var Excel; FormatProtection.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["locked", "formulaHidden"], [], []); }; + FormatProtection.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; FormatProtection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -14657,29 +16772,40 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["FormulaHidden"])) { - this.m_formulaHidden=obj["FormulaHidden"]; + this._F=obj["FormulaHidden"]; } if (!_isUndefined(obj["Locked"])) { - this.m_locked=obj["Locked"]; + this._L=obj["Locked"]; } }; FormatProtection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + FormatProtection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + FormatProtection.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; FormatProtection.prototype.toJSON=function () { - return { - "formulaHidden": this.m_formulaHidden, - "locked": this.m_locked - }; + return _toJson(this, { + "formulaHidden": this._F, + "locked": this._L, + }, {}); + }; + FormatProtection.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return FormatProtection; }(OfficeExtension.ClientObject)); Excel.FormatProtection=FormatProtection; + var _typeRangeFill="RangeFill"; var RangeFill=(function (_super) { __extends(RangeFill, _super); function RangeFill() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeFill.prototype, "_className", { get: function () { @@ -14688,13 +16814,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeFill.prototype, "_scalarPropertyNames", { + get: function () { + return ["color"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFill.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeFill.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "RangeFill", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeRangeFill, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -14703,8 +16843,11 @@ var Excel; RangeFill.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["color"], [], []); }; + RangeFill.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; RangeFill.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; RangeFill.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14713,25 +16856,36 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } }; RangeFill.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeFill.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeFill.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; RangeFill.prototype.toJSON=function () { - return { - "color": this.m_color - }; + return _toJson(this, { + "color": this._C, + }, {}); + }; + RangeFill.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return RangeFill; }(OfficeExtension.ClientObject)); Excel.RangeFill=RangeFill; + var _typeRangeBorder="RangeBorder"; var RangeBorder=(function (_super) { __extends(RangeBorder, _super); function RangeBorder() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeBorder.prototype, "_className", { get: function () { @@ -14740,13 +16894,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeBorder.prototype, "_scalarPropertyNames", { + get: function () { + return ["sideIndex", "style", "weight", "color"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeBorder.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeBorder.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "RangeBorder", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeRangeBorder, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -14754,19 +16922,19 @@ var Excel; }); Object.defineProperty(RangeBorder.prototype, "sideIndex", { get: function () { - _throwIfNotLoaded("sideIndex", this.m_sideIndex, "RangeBorder", this._isNull); - return this.m_sideIndex; + _throwIfNotLoaded("sideIndex", this._S, _typeRangeBorder, this._isNull); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(RangeBorder.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "RangeBorder", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._St, _typeRangeBorder, this._isNull); + return this._St; }, set: function (value) { - this.m_style=value; + this._St=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -14774,11 +16942,11 @@ var Excel; }); Object.defineProperty(RangeBorder.prototype, "weight", { get: function () { - _throwIfNotLoaded("weight", this.m_weight, "RangeBorder", this._isNull); - return this.m_weight; + _throwIfNotLoaded("weight", this._W, _typeRangeBorder, this._isNull); + return this._W; }, set: function (value) { - this.m_weight=value; + this._W=value; _createSetPropertyAction(this.context, this, "Weight", value); }, enumerable: true, @@ -14787,6 +16955,9 @@ var Excel; RangeBorder.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["style", "weight", "color"], [], []); }; + RangeBorder.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; RangeBorder.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -14794,37 +16965,48 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["SideIndex"])) { - this.m_sideIndex=obj["SideIndex"]; + this._S=obj["SideIndex"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._St=obj["Style"]; } if (!_isUndefined(obj["Weight"])) { - this.m_weight=obj["Weight"]; + this._W=obj["Weight"]; } }; RangeBorder.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeBorder.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeBorder.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; RangeBorder.prototype.toJSON=function () { - return { - "color": this.m_color, - "sideIndex": this.m_sideIndex, - "style": this.m_style, - "weight": this.m_weight - }; + return _toJson(this, { + "color": this._C, + "sideIndex": this._S, + "style": this._St, + "weight": this._W, + }, {}); + }; + RangeBorder.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return RangeBorder; }(OfficeExtension.ClientObject)); Excel.RangeBorder=RangeBorder; + var _typeRangeBorderCollection="RangeBorderCollection"; var RangeBorderCollection=(function (_super) { __extends(RangeBorderCollection, _super); function RangeBorderCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeBorderCollection.prototype, "_className", { get: function () { @@ -14833,9 +17015,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeBorderCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeBorderCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeBorderCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "RangeBorderCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeRangeBorderCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14843,8 +17039,8 @@ var Excel; }); Object.defineProperty(RangeBorderCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "RangeBorderCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeRangeBorderCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true @@ -14853,7 +17049,7 @@ var Excel; return new Excel.RangeBorder(this.context, _createIndexerObjectPath(this.context, this, [index])); }; RangeBorderCollection.prototype.getItemAt=function (index) { - return new Excel.RangeBorder(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.RangeBorder(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; RangeBorderCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14862,7 +17058,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14875,21 +17071,29 @@ var Excel; } }; RangeBorderCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeBorderCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeBorderCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.RangeBorder(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; RangeBorderCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return RangeBorderCollection; }(OfficeExtension.ClientObject)); Excel.RangeBorderCollection=RangeBorderCollection; + var _typeRangeFont="RangeFont"; var RangeFont=(function (_super) { __extends(RangeFont, _super); function RangeFont() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeFont.prototype, "_className", { get: function () { @@ -14898,13 +17102,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(RangeFont.prototype, "_scalarPropertyNames", { + get: function () { + return ["name", "size", "color", "italic", "bold", "underline"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RangeFont.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(RangeFont.prototype, "bold", { get: function () { - _throwIfNotLoaded("bold", this.m_bold, "RangeFont", this._isNull); - return this.m_bold; + _throwIfNotLoaded("bold", this._B, _typeRangeFont, this._isNull); + return this._B; }, set: function (value) { - this.m_bold=value; + this._B=value; _createSetPropertyAction(this.context, this, "Bold", value); }, enumerable: true, @@ -14912,11 +17130,11 @@ var Excel; }); Object.defineProperty(RangeFont.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "RangeFont", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeRangeFont, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -14924,11 +17142,11 @@ var Excel; }); Object.defineProperty(RangeFont.prototype, "italic", { get: function () { - _throwIfNotLoaded("italic", this.m_italic, "RangeFont", this._isNull); - return this.m_italic; + _throwIfNotLoaded("italic", this._I, _typeRangeFont, this._isNull); + return this._I; }, set: function (value) { - this.m_italic=value; + this._I=value; _createSetPropertyAction(this.context, this, "Italic", value); }, enumerable: true, @@ -14936,11 +17154,11 @@ var Excel; }); Object.defineProperty(RangeFont.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "RangeFont", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeRangeFont, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -14948,11 +17166,11 @@ var Excel; }); Object.defineProperty(RangeFont.prototype, "size", { get: function () { - _throwIfNotLoaded("size", this.m_size, "RangeFont", this._isNull); - return this.m_size; + _throwIfNotLoaded("size", this._S, _typeRangeFont, this._isNull); + return this._S; }, set: function (value) { - this.m_size=value; + this._S=value; _createSetPropertyAction(this.context, this, "Size", value); }, enumerable: true, @@ -14960,11 +17178,11 @@ var Excel; }); Object.defineProperty(RangeFont.prototype, "underline", { get: function () { - _throwIfNotLoaded("underline", this.m_underline, "RangeFont", this._isNull); - return this.m_underline; + _throwIfNotLoaded("underline", this._U, _typeRangeFont, this._isNull); + return this._U; }, set: function (value) { - this.m_underline=value; + this._U=value; _createSetPropertyAction(this.context, this, "Underline", value); }, enumerable: true, @@ -14973,6 +17191,9 @@ var Excel; RangeFont.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["name", "size", "color", "italic", "bold", "underline"], [], []); }; + RangeFont.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; RangeFont.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -14980,45 +17201,56 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Bold"])) { - this.m_bold=obj["Bold"]; + this._B=obj["Bold"]; } if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["Italic"])) { - this.m_italic=obj["Italic"]; + this._I=obj["Italic"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Size"])) { - this.m_size=obj["Size"]; + this._S=obj["Size"]; } if (!_isUndefined(obj["Underline"])) { - this.m_underline=obj["Underline"]; + this._U=obj["Underline"]; } }; RangeFont.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeFont.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeFont.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; RangeFont.prototype.toJSON=function () { - return { - "bold": this.m_bold, - "color": this.m_color, - "italic": this.m_italic, - "name": this.m_name, - "size": this.m_size, - "underline": this.m_underline - }; + return _toJson(this, { + "bold": this._B, + "color": this._C, + "italic": this._I, + "name": this._N, + "size": this._S, + "underline": this._U, + }, {}); + }; + RangeFont.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return RangeFont; }(OfficeExtension.ClientObject)); Excel.RangeFont=RangeFont; + var _typeChartCollection="ChartCollection"; var ChartCollection=(function (_super) { __extends(ChartCollection, _super); function ChartCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartCollection.prototype, "_className", { get: function () { @@ -15027,9 +17259,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ChartCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeChartCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15037,8 +17283,8 @@ var Excel; }); Object.defineProperty(ChartCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "ChartCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeChartCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true @@ -15047,22 +17293,24 @@ var Excel; if (!(sourceData instanceof Range)) { throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument, "sourceData", "Charts.Add"); } - return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [type, sourceData, seriesBy], false, true, null)); + return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [type, sourceData, seriesBy], false, true, null, false)); }; ChartCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("ChartCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; ChartCollection.prototype.getItem=function (name) { - return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItem", 1, [name], false, false, null)); + return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItem", 1, [name], false, false, null, false)); }; ChartCollection.prototype.getItemAt=function (index) { - return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; ChartCollection.prototype.getItemOrNullObject=function (name) { - return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null)); + _throwIfApiNotSupported("ChartCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.Chart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null, false)); }; ChartCollection.prototype._GetItem=function (key) { return new Excel.Chart(this.context, _createIndexerObjectPath(this.context, this, [key])); @@ -15074,7 +17322,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15087,106 +17335,136 @@ var Excel; } }; ChartCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.Chart(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; ChartCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return ChartCollection; }(OfficeExtension.ClientObject)); Excel.ChartCollection=ChartCollection; + var _typeChart="Chart"; var Chart=(function (_super) { __extends(Chart, _super); function Chart() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Chart.prototype, "_className", { get: function () { - return "Chart"; + return "Chart"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Chart.prototype, "_scalarPropertyNames", { + get: function () { + return ["name", "top", "left", "width", "height"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Chart.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Chart.prototype, "_navigationPropertyNames", { + get: function () { + return ["title", "dataLabels", "legend", "series", "axes", "format", "worksheet"]; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "axes", { get: function () { - if (!this.m_axes) { - this.m_axes=new Excel.ChartAxes(this.context, _createPropertyObjectPath(this.context, this, "Axes", false, false)); + if (!this._A) { + this._A=new Excel.ChartAxes(this.context, _createPropertyObjectPath(this.context, this, "Axes", false, false, false)); } - return this.m_axes; + return this._A; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "dataLabels", { get: function () { - if (!this.m_dataLabels) { - this.m_dataLabels=new Excel.ChartDataLabels(this.context, _createPropertyObjectPath(this.context, this, "DataLabels", false, false)); + if (!this._D) { + this._D=new Excel.ChartDataLabels(this.context, _createPropertyObjectPath(this.context, this, "DataLabels", false, false, false)); } - return this.m_dataLabels; + return this._D; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartAreaFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartAreaFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "legend", { get: function () { - if (!this.m_legend) { - this.m_legend=new Excel.ChartLegend(this.context, _createPropertyObjectPath(this.context, this, "Legend", false, false)); + if (!this._Le) { + this._Le=new Excel.ChartLegend(this.context, _createPropertyObjectPath(this.context, this, "Legend", false, false, false)); } - return this.m_legend; + return this._Le; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "series", { get: function () { - if (!this.m_series) { - this.m_series=new Excel.ChartSeriesCollection(this.context, _createPropertyObjectPath(this.context, this, "Series", true, false)); + if (!this._S) { + this._S=new Excel.ChartSeriesCollection(this.context, _createPropertyObjectPath(this.context, this, "Series", true, false, false)); } - return this.m_series; + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "title", { get: function () { - if (!this.m_title) { - this.m_title=new Excel.ChartTitle(this.context, _createPropertyObjectPath(this.context, this, "Title", false, false)); + if (!this._T) { + this._T=new Excel.ChartTitle(this.context, _createPropertyObjectPath(this.context, this, "Title", false, false, false)); } - return this.m_title; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "worksheet", { get: function () { - if (!this.m_worksheet) { - this.m_worksheet=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false)); + _throwIfApiNotSupported("Chart.worksheet", _defaultApiSetName, "1.2", _hostName); + if (!this._Wo) { + this._Wo=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false, false)); } - return this.m_worksheet; + return this._Wo; }, enumerable: true, configurable: true }); Object.defineProperty(Chart.prototype, "height", { get: function () { - _throwIfNotLoaded("height", this.m_height, "Chart", this._isNull); - return this.m_height; + _throwIfNotLoaded("height", this._H, _typeChart, this._isNull); + return this._H; }, set: function (value) { - this.m_height=value; + this._H=value; _createSetPropertyAction(this.context, this, "Height", value); }, enumerable: true, @@ -15194,11 +17472,11 @@ var Excel; }); Object.defineProperty(Chart.prototype, "left", { get: function () { - _throwIfNotLoaded("left", this.m_left, "Chart", this._isNull); - return this.m_left; + _throwIfNotLoaded("left", this._L, _typeChart, this._isNull); + return this._L; }, set: function (value) { - this.m_left=value; + this._L=value; _createSetPropertyAction(this.context, this, "Left", value); }, enumerable: true, @@ -15206,11 +17484,11 @@ var Excel; }); Object.defineProperty(Chart.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "Chart", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeChart, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -15218,11 +17496,11 @@ var Excel; }); Object.defineProperty(Chart.prototype, "top", { get: function () { - _throwIfNotLoaded("top", this.m_top, "Chart", this._isNull); - return this.m_top; + _throwIfNotLoaded("top", this._To, _typeChart, this._isNull); + return this._To; }, set: function (value) { - this.m_top=value; + this._To=value; _createSetPropertyAction(this.context, this, "Top", value); }, enumerable: true, @@ -15230,11 +17508,11 @@ var Excel; }); Object.defineProperty(Chart.prototype, "width", { get: function () { - _throwIfNotLoaded("width", this.m_width, "Chart", this._isNull); - return this.m_width; + _throwIfNotLoaded("width", this._W, _typeChart, this._isNull); + return this._W; }, set: function (value) { - this.m_width=value; + this._W=value; _createSetPropertyAction(this.context, this, "Width", value); }, enumerable: true, @@ -15242,17 +17520,19 @@ var Excel; }); Chart.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["name", "top", "left", "width", "height"], ["title", "dataLabels", "legend", "axes", "format"], [ - "series", - "worksheet", "series", "worksheet" ]); }; + Chart.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; Chart.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Chart.prototype.getImage=function (width, height, fittingMode) { - var action=_createMethodAction(this.context, this, "GetImage", 1, [width, height, fittingMode]); + _throwIfApiNotSupported("Chart.getImage", _defaultApiSetName, "1.2", _hostName); + var action=_createMethodAction(this.context, this, "GetImage", 1, [width, height, fittingMode], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -15261,10 +17541,10 @@ var Excel; if (!(sourceData instanceof Range)) { throw OfficeExtension.Utility.createRuntimeError(OfficeExtension.ResourceStrings.invalidArgument, "sourceData", "Chart.setData"); } - _createMethodAction(this.context, this, "SetData", 0, [sourceData, seriesBy]); + _createMethodAction(this.context, this, "SetData", 0, [sourceData, seriesBy], false); }; Chart.prototype.setPosition=function (startCell, endCell) { - _createMethodAction(this.context, this, "SetPosition", 0, [startCell, endCell]); + _createMethodAction(this.context, this, "SetPosition", 0, [startCell, endCell], false); }; Chart.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15273,47 +17553,60 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Height"])) { - this.m_height=obj["Height"]; + this._H=obj["Height"]; } if (!_isUndefined(obj["Left"])) { - this.m_left=obj["Left"]; + this._L=obj["Left"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Top"])) { - this.m_top=obj["Top"]; + this._To=obj["Top"]; } if (!_isUndefined(obj["Width"])) { - this.m_width=obj["Width"]; + this._W=obj["Width"]; } _handleNavigationPropertyResults(this, obj, ["axes", "Axes", "dataLabels", "DataLabels", "format", "Format", "legend", "Legend", "series", "Series", "title", "Title", "worksheet", "Worksheet"]); }; Chart.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Chart.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Chart.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; Chart.prototype.toJSON=function () { - return { - "axes": this.m_axes, - "dataLabels": this.m_dataLabels, - "format": this.m_format, - "height": this.m_height, - "left": this.m_left, - "legend": this.m_legend, - "name": this.m_name, - "title": this.m_title, - "top": this.m_top, - "width": this.m_width - }; + return _toJson(this, { + "height": this._H, + "left": this._L, + "name": this._N, + "top": this._To, + "width": this._W, + }, { + "axes": this._A, + "dataLabels": this._D, + "format": this._F, + "legend": this._Le, + "series": this._S, + "title": this._T, + }); + }; + Chart.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Chart; }(OfficeExtension.ClientObject)); Excel.Chart=Chart; + var _typeChartAreaFormat="ChartAreaFormat"; var ChartAreaFormat=(function (_super) { __extends(ChartAreaFormat, _super); function ChartAreaFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartAreaFormat.prototype, "_className", { get: function () { @@ -15322,22 +17615,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartAreaFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["fill", "font"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartAreaFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAreaFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true @@ -15347,6 +17647,9 @@ var Excel; "fill" ]); }; + ChartAreaFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartAreaFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -15356,22 +17659,32 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["fill", "Fill", "font", "Font"]); }; ChartAreaFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartAreaFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAreaFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartAreaFormat.prototype.toJSON=function () { - return { - "fill": this.m_fill, - "font": this.m_font - }; + return _toJson(this, {}, { + "font": this._Fo, + }); + }; + ChartAreaFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartAreaFormat; }(OfficeExtension.ClientObject)); Excel.ChartAreaFormat=ChartAreaFormat; + var _typeChartSeriesCollection="ChartSeriesCollection"; var ChartSeriesCollection=(function (_super) { __extends(ChartSeriesCollection, _super); function ChartSeriesCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartSeriesCollection.prototype, "_className", { get: function () { @@ -15380,9 +17693,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartSeriesCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartSeriesCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartSeriesCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ChartSeriesCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeChartSeriesCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15390,20 +17717,21 @@ var Excel; }); Object.defineProperty(ChartSeriesCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "ChartSeriesCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeChartSeriesCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); ChartSeriesCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("ChartSeriesCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; ChartSeriesCollection.prototype.getItemAt=function (index) { - return new Excel.ChartSeries(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.ChartSeries(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; ChartSeriesCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15412,7 +17740,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15425,21 +17753,29 @@ var Excel; } }; ChartSeriesCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartSeriesCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartSeriesCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.ChartSeries(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(false, _this.context, _this, childItemData, index)); }); }; ChartSeriesCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return ChartSeriesCollection; }(OfficeExtension.ClientObject)); Excel.ChartSeriesCollection=ChartSeriesCollection; + var _typeChartSeries="ChartSeries"; var ChartSeries=(function (_super) { __extends(ChartSeries, _super); function ChartSeries() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartSeries.prototype, "_className", { get: function () { @@ -15448,33 +17784,54 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartSeries.prototype, "_scalarPropertyNames", { + get: function () { + return ["name"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartSeries.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartSeries.prototype, "_navigationPropertyNames", { + get: function () { + return ["points", "format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartSeries.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartSeriesFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartSeriesFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartSeries.prototype, "points", { get: function () { - if (!this.m_points) { - this.m_points=new Excel.ChartPointsCollection(this.context, _createPropertyObjectPath(this.context, this, "Points", true, false)); + if (!this._P) { + this._P=new Excel.ChartPointsCollection(this.context, _createPropertyObjectPath(this.context, this, "Points", true, false, false)); } - return this.m_points; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(ChartSeries.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "ChartSeries", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeChartSeries, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -15482,10 +17839,12 @@ var Excel; }); ChartSeries.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["name"], ["format"], [ - "points", "points" ]); }; + ChartSeries.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartSeries.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -15493,27 +17852,40 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format", "points", "Points"]); }; ChartSeries.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartSeries.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartSeries.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartSeries.prototype.toJSON=function () { - return { - "format": this.m_format, - "name": this.m_name - }; + return _toJson(this, { + "name": this._N, + }, { + "format": this._F, + "points": this._P, + }); + }; + ChartSeries.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartSeries; }(OfficeExtension.ClientObject)); Excel.ChartSeries=ChartSeries; + var _typeChartSeriesFormat="ChartSeriesFormat"; var ChartSeriesFormat=(function (_super) { __extends(ChartSeriesFormat, _super); function ChartSeriesFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartSeriesFormat.prototype, "_className", { get: function () { @@ -15522,22 +17894,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartSeriesFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["fill", "line"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartSeriesFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartSeriesFormat.prototype, "line", { get: function () { - if (!this.m_line) { - this.m_line=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false)); + if (!this._L) { + this._L=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false, false)); } - return this.m_line; + return this._L; }, enumerable: true, configurable: true @@ -15547,6 +17926,9 @@ var Excel; "fill" ]); }; + ChartSeriesFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartSeriesFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -15556,22 +17938,32 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["fill", "Fill", "line", "Line"]); }; ChartSeriesFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartSeriesFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartSeriesFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartSeriesFormat.prototype.toJSON=function () { - return { - "fill": this.m_fill, - "line": this.m_line - }; + return _toJson(this, {}, { + "line": this._L, + }); + }; + ChartSeriesFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartSeriesFormat; }(OfficeExtension.ClientObject)); Excel.ChartSeriesFormat=ChartSeriesFormat; + var _typeChartPointsCollection="ChartPointsCollection"; var ChartPointsCollection=(function (_super) { __extends(ChartPointsCollection, _super); function ChartPointsCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartPointsCollection.prototype, "_className", { get: function () { @@ -15580,9 +17972,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartPointsCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartPointsCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartPointsCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ChartPointsCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeChartPointsCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15590,20 +17996,21 @@ var Excel; }); Object.defineProperty(ChartPointsCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "ChartPointsCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeChartPointsCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); ChartPointsCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("ChartPointsCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; ChartPointsCollection.prototype.getItemAt=function (index) { - return new Excel.ChartPoint(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.ChartPoint(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; ChartPointsCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15612,7 +18019,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15625,21 +18032,29 @@ var Excel; } }; ChartPointsCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartPointsCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartPointsCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.ChartPoint(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(false, _this.context, _this, childItemData, index)); }); }; ChartPointsCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, {}, this.m__items); }; return ChartPointsCollection; }(OfficeExtension.ClientObject)); Excel.ChartPointsCollection=ChartPointsCollection; + var _typeChartPoint="ChartPoint"; var ChartPoint=(function (_super) { __extends(ChartPoint, _super); function ChartPoint() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartPoint.prototype, "_className", { get: function () { @@ -15648,20 +18063,34 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartPoint.prototype, "_scalarPropertyNames", { + get: function () { + return ["value"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartPoint.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartPoint.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartPointFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartPointFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartPoint.prototype, "value", { get: function () { - _throwIfNotLoaded("value", this.m_value, "ChartPoint", this._isNull); - return this.m_value; + _throwIfNotLoaded("value", this._V, _typeChartPoint, this._isNull); + return this._V; }, enumerable: true, configurable: true @@ -15673,27 +18102,39 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Value"])) { - this.m_value=obj["Value"]; + this._V=obj["Value"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; ChartPoint.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartPoint.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartPoint.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartPoint.prototype.toJSON=function () { - return { - "format": this.m_format, - "value": this.m_value - }; + return _toJson(this, { + "value": this._V, + }, { + "format": this._F, + }); + }; + ChartPoint.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartPoint; }(OfficeExtension.ClientObject)); Excel.ChartPoint=ChartPoint; + var _typeChartPointFormat="ChartPointFormat"; var ChartPointFormat=(function (_super) { __extends(ChartPointFormat, _super); function ChartPointFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartPointFormat.prototype, "_className", { get: function () { @@ -15702,12 +18143,19 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartPointFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["fill"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartPointFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true @@ -15721,21 +18169,26 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["fill", "Fill"]); }; ChartPointFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartPointFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartPointFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartPointFormat.prototype.toJSON=function () { - return { - "fill": this.m_fill - }; + return _toJson(this, {}, {}); }; return ChartPointFormat; }(OfficeExtension.ClientObject)); Excel.ChartPointFormat=ChartPointFormat; + var _typeChartAxes="ChartAxes"; var ChartAxes=(function (_super) { __extends(ChartAxes, _super); function ChartAxes() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartAxes.prototype, "_className", { get: function () { @@ -15744,32 +18197,39 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartAxes.prototype, "_navigationPropertyNames", { + get: function () { + return ["categoryAxis", "seriesAxis", "valueAxis"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartAxes.prototype, "categoryAxis", { get: function () { - if (!this.m_categoryAxis) { - this.m_categoryAxis=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "CategoryAxis", false, false)); + if (!this._C) { + this._C=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "CategoryAxis", false, false, false)); } - return this.m_categoryAxis; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxes.prototype, "seriesAxis", { get: function () { - if (!this.m_seriesAxis) { - this.m_seriesAxis=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "SeriesAxis", false, false)); + if (!this._S) { + this._S=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "SeriesAxis", false, false, false)); } - return this.m_seriesAxis; + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxes.prototype, "valueAxis", { get: function () { - if (!this.m_valueAxis) { - this.m_valueAxis=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "ValueAxis", false, false)); + if (!this._V) { + this._V=new Excel.ChartAxis(this.context, _createPropertyObjectPath(this.context, this, "ValueAxis", false, false, false)); } - return this.m_valueAxis; + return this._V; }, enumerable: true, configurable: true @@ -15777,6 +18237,9 @@ var Excel; ChartAxes.prototype.set=function (properties, options) { this._recursivelySet(properties, options, [], ["categoryAxis", "seriesAxis", "valueAxis"], []); }; + ChartAxes.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartAxes.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -15786,23 +18249,34 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["categoryAxis", "CategoryAxis", "seriesAxis", "SeriesAxis", "valueAxis", "ValueAxis"]); }; ChartAxes.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartAxes.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAxes.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartAxes.prototype.toJSON=function () { - return { - "categoryAxis": this.m_categoryAxis, - "seriesAxis": this.m_seriesAxis, - "valueAxis": this.m_valueAxis - }; + return _toJson(this, {}, { + "categoryAxis": this._C, + "seriesAxis": this._S, + "valueAxis": this._V, + }); + }; + ChartAxes.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartAxes; }(OfficeExtension.ClientObject)); Excel.ChartAxes=ChartAxes; + var _typeChartAxis="ChartAxis"; var ChartAxis=(function (_super) { __extends(ChartAxis, _super); function ChartAxis() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartAxis.prototype, "_className", { get: function () { @@ -15811,53 +18285,74 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartAxis.prototype, "_scalarPropertyNames", { + get: function () { + return ["majorUnit", "maximum", "minimum", "minorUnit"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxis.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxis.prototype, "_navigationPropertyNames", { + get: function () { + return ["majorGridlines", "minorGridlines", "title", "format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartAxis.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartAxisFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartAxisFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxis.prototype, "majorGridlines", { get: function () { - if (!this.m_majorGridlines) { - this.m_majorGridlines=new Excel.ChartGridlines(this.context, _createPropertyObjectPath(this.context, this, "MajorGridlines", false, false)); + if (!this._M) { + this._M=new Excel.ChartGridlines(this.context, _createPropertyObjectPath(this.context, this, "MajorGridlines", false, false, false)); } - return this.m_majorGridlines; + return this._M; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxis.prototype, "minorGridlines", { get: function () { - if (!this.m_minorGridlines) { - this.m_minorGridlines=new Excel.ChartGridlines(this.context, _createPropertyObjectPath(this.context, this, "MinorGridlines", false, false)); + if (!this._Min) { + this._Min=new Excel.ChartGridlines(this.context, _createPropertyObjectPath(this.context, this, "MinorGridlines", false, false, false)); } - return this.m_minorGridlines; + return this._Min; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxis.prototype, "title", { get: function () { - if (!this.m_title) { - this.m_title=new Excel.ChartAxisTitle(this.context, _createPropertyObjectPath(this.context, this, "Title", false, false)); + if (!this._T) { + this._T=new Excel.ChartAxisTitle(this.context, _createPropertyObjectPath(this.context, this, "Title", false, false, false)); } - return this.m_title; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxis.prototype, "majorUnit", { get: function () { - _throwIfNotLoaded("majorUnit", this.m_majorUnit, "ChartAxis", this._isNull); - return this.m_majorUnit; + _throwIfNotLoaded("majorUnit", this._Ma, _typeChartAxis, this._isNull); + return this._Ma; }, set: function (value) { - this.m_majorUnit=value; + this._Ma=value; _createSetPropertyAction(this.context, this, "MajorUnit", value); }, enumerable: true, @@ -15865,11 +18360,11 @@ var Excel; }); Object.defineProperty(ChartAxis.prototype, "maximum", { get: function () { - _throwIfNotLoaded("maximum", this.m_maximum, "ChartAxis", this._isNull); - return this.m_maximum; + _throwIfNotLoaded("maximum", this._Max, _typeChartAxis, this._isNull); + return this._Max; }, set: function (value) { - this.m_maximum=value; + this._Max=value; _createSetPropertyAction(this.context, this, "Maximum", value); }, enumerable: true, @@ -15877,11 +18372,11 @@ var Excel; }); Object.defineProperty(ChartAxis.prototype, "minimum", { get: function () { - _throwIfNotLoaded("minimum", this.m_minimum, "ChartAxis", this._isNull); - return this.m_minimum; + _throwIfNotLoaded("minimum", this._Mi, _typeChartAxis, this._isNull); + return this._Mi; }, set: function (value) { - this.m_minimum=value; + this._Mi=value; _createSetPropertyAction(this.context, this, "Minimum", value); }, enumerable: true, @@ -15889,11 +18384,11 @@ var Excel; }); Object.defineProperty(ChartAxis.prototype, "minorUnit", { get: function () { - _throwIfNotLoaded("minorUnit", this.m_minorUnit, "ChartAxis", this._isNull); - return this.m_minorUnit; + _throwIfNotLoaded("minorUnit", this._Mino, _typeChartAxis, this._isNull); + return this._Mino; }, set: function (value) { - this.m_minorUnit=value; + this._Mino=value; _createSetPropertyAction(this.context, this, "MinorUnit", value); }, enumerable: true, @@ -15902,6 +18397,9 @@ var Excel; ChartAxis.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["majorUnit", "maximum", "minimum", "minorUnit"], ["majorGridlines", "minorGridlines", "title", "format"], []); }; + ChartAxis.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartAxis.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -15909,42 +18407,54 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["MajorUnit"])) { - this.m_majorUnit=obj["MajorUnit"]; + this._Ma=obj["MajorUnit"]; } if (!_isUndefined(obj["Maximum"])) { - this.m_maximum=obj["Maximum"]; + this._Max=obj["Maximum"]; } if (!_isUndefined(obj["Minimum"])) { - this.m_minimum=obj["Minimum"]; + this._Mi=obj["Minimum"]; } if (!_isUndefined(obj["MinorUnit"])) { - this.m_minorUnit=obj["MinorUnit"]; + this._Mino=obj["MinorUnit"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format", "majorGridlines", "MajorGridlines", "minorGridlines", "MinorGridlines", "title", "Title"]); }; ChartAxis.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartAxis.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAxis.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartAxis.prototype.toJSON=function () { - return { - "format": this.m_format, - "majorGridlines": this.m_majorGridlines, - "majorUnit": this.m_majorUnit, - "maximum": this.m_maximum, - "minimum": this.m_minimum, - "minorGridlines": this.m_minorGridlines, - "minorUnit": this.m_minorUnit, - "title": this.m_title - }; + return _toJson(this, { + "majorUnit": this._Ma, + "maximum": this._Max, + "minimum": this._Mi, + "minorUnit": this._Mino, + }, { + "format": this._F, + "majorGridlines": this._M, + "minorGridlines": this._Min, + "title": this._T, + }); + }; + ChartAxis.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartAxis; }(OfficeExtension.ClientObject)); Excel.ChartAxis=ChartAxis; + var _typeChartAxisFormat="ChartAxisFormat"; var ChartAxisFormat=(function (_super) { __extends(ChartAxisFormat, _super); function ChartAxisFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartAxisFormat.prototype, "_className", { get: function () { @@ -15953,22 +18463,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartAxisFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["font", "line"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartAxisFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._F) { + this._F=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxisFormat.prototype, "line", { get: function () { - if (!this.m_line) { - this.m_line=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false)); + if (!this._L) { + this._L=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false, false)); } - return this.m_line; + return this._L; }, enumerable: true, configurable: true @@ -15976,6 +18493,9 @@ var Excel; ChartAxisFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, [], ["font", "line"], []); }; + ChartAxisFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartAxisFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -15985,22 +18505,33 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["font", "Font", "line", "Line"]); }; ChartAxisFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartAxisFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAxisFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartAxisFormat.prototype.toJSON=function () { - return { - "font": this.m_font, - "line": this.m_line - }; + return _toJson(this, {}, { + "font": this._F, + "line": this._L, + }); + }; + ChartAxisFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartAxisFormat; }(OfficeExtension.ClientObject)); Excel.ChartAxisFormat=ChartAxisFormat; + var _typeChartAxisTitle="ChartAxisTitle"; var ChartAxisTitle=(function (_super) { __extends(ChartAxisTitle, _super); function ChartAxisTitle() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartAxisTitle.prototype, "_className", { get: function () { @@ -16009,23 +18540,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartAxisTitle.prototype, "_scalarPropertyNames", { + get: function () { + return ["text", "visible"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxisTitle.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartAxisTitle.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartAxisTitle.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartAxisTitleFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartAxisTitleFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartAxisTitle.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "ChartAxisTitle", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._T, _typeChartAxisTitle, this._isNull); + return this._T; }, set: function (value) { - this.m_text=value; + this._T=value; _createSetPropertyAction(this.context, this, "Text", value); }, enumerable: true, @@ -16033,11 +18585,11 @@ var Excel; }); Object.defineProperty(ChartAxisTitle.prototype, "visible", { get: function () { - _throwIfNotLoaded("visible", this.m_visible, "ChartAxisTitle", this._isNull); - return this.m_visible; + _throwIfNotLoaded("visible", this._V, _typeChartAxisTitle, this._isNull); + return this._V; }, set: function (value) { - this.m_visible=value; + this._V=value; _createSetPropertyAction(this.context, this, "Visible", value); }, enumerable: true, @@ -16046,6 +18598,9 @@ var Excel; ChartAxisTitle.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["text", "visible"], ["format"], []); }; + ChartAxisTitle.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartAxisTitle.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16053,31 +18608,43 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._T=obj["Text"]; } if (!_isUndefined(obj["Visible"])) { - this.m_visible=obj["Visible"]; + this._V=obj["Visible"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; ChartAxisTitle.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartAxisTitle.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAxisTitle.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartAxisTitle.prototype.toJSON=function () { - return { - "format": this.m_format, - "text": this.m_text, - "visible": this.m_visible - }; + return _toJson(this, { + "text": this._T, + "visible": this._V, + }, { + "format": this._F, + }); + }; + ChartAxisTitle.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartAxisTitle; }(OfficeExtension.ClientObject)); Excel.ChartAxisTitle=ChartAxisTitle; + var _typeChartAxisTitleFormat="ChartAxisTitleFormat"; var ChartAxisTitleFormat=(function (_super) { __extends(ChartAxisTitleFormat, _super); function ChartAxisTitleFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartAxisTitleFormat.prototype, "_className", { get: function () { @@ -16086,12 +18653,19 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartAxisTitleFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["font"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartAxisTitleFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._F) { + this._F=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._F; }, enumerable: true, configurable: true @@ -16099,6 +18673,9 @@ var Excel; ChartAxisTitleFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, [], ["font"], []); }; + ChartAxisTitleFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartAxisTitleFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16108,46 +18685,78 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["font", "Font"]); }; ChartAxisTitleFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartAxisTitleFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartAxisTitleFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartAxisTitleFormat.prototype.toJSON=function () { - return { - "font": this.m_font - }; + return _toJson(this, {}, { + "font": this._F, + }); + }; + ChartAxisTitleFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartAxisTitleFormat; }(OfficeExtension.ClientObject)); Excel.ChartAxisTitleFormat=ChartAxisTitleFormat; + var _typeChartDataLabels="ChartDataLabels"; var ChartDataLabels=(function (_super) { __extends(ChartDataLabels, _super); function ChartDataLabels() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartDataLabels.prototype, "_className", { get: function () { - return "ChartDataLabels"; + return "ChartDataLabels"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartDataLabels.prototype, "_scalarPropertyNames", { + get: function () { + return ["position", "showValue", "showSeriesName", "showCategoryName", "showLegendKey", "showPercentage", "showBubbleSize", "separator"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartDataLabels.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartDataLabels.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; }, enumerable: true, configurable: true }); Object.defineProperty(ChartDataLabels.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartDataLabelFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartDataLabelFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartDataLabels.prototype, "position", { get: function () { - _throwIfNotLoaded("position", this.m_position, "ChartDataLabels", this._isNull); - return this.m_position; + _throwIfNotLoaded("position", this._P, _typeChartDataLabels, this._isNull); + return this._P; }, set: function (value) { - this.m_position=value; + this._P=value; _createSetPropertyAction(this.context, this, "Position", value); }, enumerable: true, @@ -16155,11 +18764,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "separator", { get: function () { - _throwIfNotLoaded("separator", this.m_separator, "ChartDataLabels", this._isNull); - return this.m_separator; + _throwIfNotLoaded("separator", this._S, _typeChartDataLabels, this._isNull); + return this._S; }, set: function (value) { - this.m_separator=value; + this._S=value; _createSetPropertyAction(this.context, this, "Separator", value); }, enumerable: true, @@ -16167,11 +18776,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "showBubbleSize", { get: function () { - _throwIfNotLoaded("showBubbleSize", this.m_showBubbleSize, "ChartDataLabels", this._isNull); - return this.m_showBubbleSize; + _throwIfNotLoaded("showBubbleSize", this._Sh, _typeChartDataLabels, this._isNull); + return this._Sh; }, set: function (value) { - this.m_showBubbleSize=value; + this._Sh=value; _createSetPropertyAction(this.context, this, "ShowBubbleSize", value); }, enumerable: true, @@ -16179,11 +18788,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "showCategoryName", { get: function () { - _throwIfNotLoaded("showCategoryName", this.m_showCategoryName, "ChartDataLabels", this._isNull); - return this.m_showCategoryName; + _throwIfNotLoaded("showCategoryName", this._Sho, _typeChartDataLabels, this._isNull); + return this._Sho; }, set: function (value) { - this.m_showCategoryName=value; + this._Sho=value; _createSetPropertyAction(this.context, this, "ShowCategoryName", value); }, enumerable: true, @@ -16191,11 +18800,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "showLegendKey", { get: function () { - _throwIfNotLoaded("showLegendKey", this.m_showLegendKey, "ChartDataLabels", this._isNull); - return this.m_showLegendKey; + _throwIfNotLoaded("showLegendKey", this._Show, _typeChartDataLabels, this._isNull); + return this._Show; }, set: function (value) { - this.m_showLegendKey=value; + this._Show=value; _createSetPropertyAction(this.context, this, "ShowLegendKey", value); }, enumerable: true, @@ -16203,11 +18812,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "showPercentage", { get: function () { - _throwIfNotLoaded("showPercentage", this.m_showPercentage, "ChartDataLabels", this._isNull); - return this.m_showPercentage; + _throwIfNotLoaded("showPercentage", this._ShowP, _typeChartDataLabels, this._isNull); + return this._ShowP; }, set: function (value) { - this.m_showPercentage=value; + this._ShowP=value; _createSetPropertyAction(this.context, this, "ShowPercentage", value); }, enumerable: true, @@ -16215,11 +18824,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "showSeriesName", { get: function () { - _throwIfNotLoaded("showSeriesName", this.m_showSeriesName, "ChartDataLabels", this._isNull); - return this.m_showSeriesName; + _throwIfNotLoaded("showSeriesName", this._ShowS, _typeChartDataLabels, this._isNull); + return this._ShowS; }, set: function (value) { - this.m_showSeriesName=value; + this._ShowS=value; _createSetPropertyAction(this.context, this, "ShowSeriesName", value); }, enumerable: true, @@ -16227,11 +18836,11 @@ var Excel; }); Object.defineProperty(ChartDataLabels.prototype, "showValue", { get: function () { - _throwIfNotLoaded("showValue", this.m_showValue, "ChartDataLabels", this._isNull); - return this.m_showValue; + _throwIfNotLoaded("showValue", this._ShowV, _typeChartDataLabels, this._isNull); + return this._ShowV; }, set: function (value) { - this.m_showValue=value; + this._ShowV=value; _createSetPropertyAction(this.context, this, "ShowValue", value); }, enumerable: true, @@ -16240,6 +18849,9 @@ var Excel; ChartDataLabels.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["position", "showValue", "showSeriesName", "showCategoryName", "showLegendKey", "showPercentage", "showBubbleSize", "separator"], ["format"], []); }; + ChartDataLabels.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartDataLabels.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16247,55 +18859,67 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Position"])) { - this.m_position=obj["Position"]; + this._P=obj["Position"]; } if (!_isUndefined(obj["Separator"])) { - this.m_separator=obj["Separator"]; + this._S=obj["Separator"]; } if (!_isUndefined(obj["ShowBubbleSize"])) { - this.m_showBubbleSize=obj["ShowBubbleSize"]; + this._Sh=obj["ShowBubbleSize"]; } if (!_isUndefined(obj["ShowCategoryName"])) { - this.m_showCategoryName=obj["ShowCategoryName"]; + this._Sho=obj["ShowCategoryName"]; } if (!_isUndefined(obj["ShowLegendKey"])) { - this.m_showLegendKey=obj["ShowLegendKey"]; + this._Show=obj["ShowLegendKey"]; } if (!_isUndefined(obj["ShowPercentage"])) { - this.m_showPercentage=obj["ShowPercentage"]; + this._ShowP=obj["ShowPercentage"]; } if (!_isUndefined(obj["ShowSeriesName"])) { - this.m_showSeriesName=obj["ShowSeriesName"]; + this._ShowS=obj["ShowSeriesName"]; } if (!_isUndefined(obj["ShowValue"])) { - this.m_showValue=obj["ShowValue"]; + this._ShowV=obj["ShowValue"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; ChartDataLabels.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartDataLabels.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartDataLabels.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartDataLabels.prototype.toJSON=function () { - return { - "format": this.m_format, - "position": this.m_position, - "separator": this.m_separator, - "showBubbleSize": this.m_showBubbleSize, - "showCategoryName": this.m_showCategoryName, - "showLegendKey": this.m_showLegendKey, - "showPercentage": this.m_showPercentage, - "showSeriesName": this.m_showSeriesName, - "showValue": this.m_showValue - }; + return _toJson(this, { + "position": this._P, + "separator": this._S, + "showBubbleSize": this._Sh, + "showCategoryName": this._Sho, + "showLegendKey": this._Show, + "showPercentage": this._ShowP, + "showSeriesName": this._ShowS, + "showValue": this._ShowV, + }, { + "format": this._F, + }); + }; + ChartDataLabels.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartDataLabels; }(OfficeExtension.ClientObject)); Excel.ChartDataLabels=ChartDataLabels; + var _typeChartDataLabelFormat="ChartDataLabelFormat"; var ChartDataLabelFormat=(function (_super) { __extends(ChartDataLabelFormat, _super); function ChartDataLabelFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartDataLabelFormat.prototype, "_className", { get: function () { @@ -16304,22 +18928,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartDataLabelFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["font", "fill"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartDataLabelFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartDataLabelFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true @@ -16329,6 +18960,9 @@ var Excel; "fill" ]); }; + ChartDataLabelFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartDataLabelFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16338,22 +18972,32 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["fill", "Fill", "font", "Font"]); }; ChartDataLabelFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartDataLabelFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartDataLabelFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartDataLabelFormat.prototype.toJSON=function () { - return { - "fill": this.m_fill, - "font": this.m_font - }; + return _toJson(this, {}, { + "font": this._Fo, + }); + }; + ChartDataLabelFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartDataLabelFormat; }(OfficeExtension.ClientObject)); Excel.ChartDataLabelFormat=ChartDataLabelFormat; + var _typeChartGridlines="ChartGridlines"; var ChartGridlines=(function (_super) { __extends(ChartGridlines, _super); function ChartGridlines() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartGridlines.prototype, "_className", { get: function () { @@ -16362,23 +19006,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartGridlines.prototype, "_scalarPropertyNames", { + get: function () { + return ["visible"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartGridlines.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartGridlines.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartGridlines.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartGridlinesFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartGridlinesFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartGridlines.prototype, "visible", { get: function () { - _throwIfNotLoaded("visible", this.m_visible, "ChartGridlines", this._isNull); - return this.m_visible; + _throwIfNotLoaded("visible", this._V, _typeChartGridlines, this._isNull); + return this._V; }, set: function (value) { - this.m_visible=value; + this._V=value; _createSetPropertyAction(this.context, this, "Visible", value); }, enumerable: true, @@ -16387,6 +19052,9 @@ var Excel; ChartGridlines.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["visible"], ["format"], []); }; + ChartGridlines.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartGridlines.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16394,27 +19062,39 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Visible"])) { - this.m_visible=obj["Visible"]; + this._V=obj["Visible"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; ChartGridlines.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartGridlines.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartGridlines.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartGridlines.prototype.toJSON=function () { - return { - "format": this.m_format, - "visible": this.m_visible - }; + return _toJson(this, { + "visible": this._V, + }, { + "format": this._F, + }); + }; + ChartGridlines.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartGridlines; }(OfficeExtension.ClientObject)); Excel.ChartGridlines=ChartGridlines; + var _typeChartGridlinesFormat="ChartGridlinesFormat"; var ChartGridlinesFormat=(function (_super) { __extends(ChartGridlinesFormat, _super); function ChartGridlinesFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartGridlinesFormat.prototype, "_className", { get: function () { @@ -16423,12 +19103,19 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartGridlinesFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["line"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartGridlinesFormat.prototype, "line", { get: function () { - if (!this.m_line) { - this.m_line=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false)); + if (!this._L) { + this._L=new Excel.ChartLineFormat(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false, false)); } - return this.m_line; + return this._L; }, enumerable: true, configurable: true @@ -16436,6 +19123,9 @@ var Excel; ChartGridlinesFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, [], ["line"], []); }; + ChartGridlinesFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartGridlinesFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16445,21 +19135,32 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["line", "Line"]); }; ChartGridlinesFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartGridlinesFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartGridlinesFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartGridlinesFormat.prototype.toJSON=function () { - return { - "line": this.m_line - }; + return _toJson(this, {}, { + "line": this._L, + }); + }; + ChartGridlinesFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartGridlinesFormat; }(OfficeExtension.ClientObject)); Excel.ChartGridlinesFormat=ChartGridlinesFormat; + var _typeChartLegend="ChartLegend"; var ChartLegend=(function (_super) { __extends(ChartLegend, _super); function ChartLegend() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartLegend.prototype, "_className", { get: function () { @@ -16468,23 +19169,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartLegend.prototype, "_scalarPropertyNames", { + get: function () { + return ["visible", "position", "overlay"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartLegend.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartLegend.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartLegend.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartLegendFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartLegendFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartLegend.prototype, "overlay", { get: function () { - _throwIfNotLoaded("overlay", this.m_overlay, "ChartLegend", this._isNull); - return this.m_overlay; + _throwIfNotLoaded("overlay", this._O, _typeChartLegend, this._isNull); + return this._O; }, set: function (value) { - this.m_overlay=value; + this._O=value; _createSetPropertyAction(this.context, this, "Overlay", value); }, enumerable: true, @@ -16492,11 +19214,11 @@ var Excel; }); Object.defineProperty(ChartLegend.prototype, "position", { get: function () { - _throwIfNotLoaded("position", this.m_position, "ChartLegend", this._isNull); - return this.m_position; + _throwIfNotLoaded("position", this._P, _typeChartLegend, this._isNull); + return this._P; }, set: function (value) { - this.m_position=value; + this._P=value; _createSetPropertyAction(this.context, this, "Position", value); }, enumerable: true, @@ -16504,11 +19226,11 @@ var Excel; }); Object.defineProperty(ChartLegend.prototype, "visible", { get: function () { - _throwIfNotLoaded("visible", this.m_visible, "ChartLegend", this._isNull); - return this.m_visible; + _throwIfNotLoaded("visible", this._V, _typeChartLegend, this._isNull); + return this._V; }, set: function (value) { - this.m_visible=value; + this._V=value; _createSetPropertyAction(this.context, this, "Visible", value); }, enumerable: true, @@ -16517,6 +19239,9 @@ var Excel; ChartLegend.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["visible", "position", "overlay"], ["format"], []); }; + ChartLegend.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartLegend.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16524,35 +19249,47 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Overlay"])) { - this.m_overlay=obj["Overlay"]; + this._O=obj["Overlay"]; } if (!_isUndefined(obj["Position"])) { - this.m_position=obj["Position"]; + this._P=obj["Position"]; } if (!_isUndefined(obj["Visible"])) { - this.m_visible=obj["Visible"]; + this._V=obj["Visible"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; ChartLegend.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartLegend.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartLegend.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartLegend.prototype.toJSON=function () { - return { - "format": this.m_format, - "overlay": this.m_overlay, - "position": this.m_position, - "visible": this.m_visible - }; + return _toJson(this, { + "overlay": this._O, + "position": this._P, + "visible": this._V, + }, { + "format": this._F, + }); + }; + ChartLegend.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartLegend; }(OfficeExtension.ClientObject)); Excel.ChartLegend=ChartLegend; + var _typeChartLegendFormat="ChartLegendFormat"; var ChartLegendFormat=(function (_super) { __extends(ChartLegendFormat, _super); function ChartLegendFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartLegendFormat.prototype, "_className", { get: function () { @@ -16561,22 +19298,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartLegendFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["font", "fill"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartLegendFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartLegendFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true @@ -16586,6 +19330,9 @@ var Excel; "fill" ]); }; + ChartLegendFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartLegendFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16595,22 +19342,32 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["fill", "Fill", "font", "Font"]); }; ChartLegendFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartLegendFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartLegendFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartLegendFormat.prototype.toJSON=function () { - return { - "fill": this.m_fill, - "font": this.m_font - }; + return _toJson(this, {}, { + "font": this._Fo, + }); + }; + ChartLegendFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartLegendFormat; }(OfficeExtension.ClientObject)); Excel.ChartLegendFormat=ChartLegendFormat; + var _typeChartTitle="ChartTitle"; var ChartTitle=(function (_super) { __extends(ChartTitle, _super); function ChartTitle() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartTitle.prototype, "_className", { get: function () { @@ -16619,23 +19376,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartTitle.prototype, "_scalarPropertyNames", { + get: function () { + return ["visible", "text", "overlay"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartTitle.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartTitle.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartTitle.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ChartTitleFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ChartTitleFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartTitle.prototype, "overlay", { get: function () { - _throwIfNotLoaded("overlay", this.m_overlay, "ChartTitle", this._isNull); - return this.m_overlay; + _throwIfNotLoaded("overlay", this._O, _typeChartTitle, this._isNull); + return this._O; }, set: function (value) { - this.m_overlay=value; + this._O=value; _createSetPropertyAction(this.context, this, "Overlay", value); }, enumerable: true, @@ -16643,11 +19421,11 @@ var Excel; }); Object.defineProperty(ChartTitle.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "ChartTitle", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._T, _typeChartTitle, this._isNull); + return this._T; }, set: function (value) { - this.m_text=value; + this._T=value; _createSetPropertyAction(this.context, this, "Text", value); }, enumerable: true, @@ -16655,11 +19433,11 @@ var Excel; }); Object.defineProperty(ChartTitle.prototype, "visible", { get: function () { - _throwIfNotLoaded("visible", this.m_visible, "ChartTitle", this._isNull); - return this.m_visible; + _throwIfNotLoaded("visible", this._V, _typeChartTitle, this._isNull); + return this._V; }, set: function (value) { - this.m_visible=value; + this._V=value; _createSetPropertyAction(this.context, this, "Visible", value); }, enumerable: true, @@ -16668,6 +19446,9 @@ var Excel; ChartTitle.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["visible", "text", "overlay"], ["format"], []); }; + ChartTitle.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartTitle.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16675,35 +19456,47 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Overlay"])) { - this.m_overlay=obj["Overlay"]; + this._O=obj["Overlay"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._T=obj["Text"]; } if (!_isUndefined(obj["Visible"])) { - this.m_visible=obj["Visible"]; + this._V=obj["Visible"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; ChartTitle.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartTitle.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartTitle.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartTitle.prototype.toJSON=function () { - return { - "format": this.m_format, - "overlay": this.m_overlay, - "text": this.m_text, - "visible": this.m_visible - }; + return _toJson(this, { + "overlay": this._O, + "text": this._T, + "visible": this._V, + }, { + "format": this._F, + }); + }; + ChartTitle.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartTitle; }(OfficeExtension.ClientObject)); Excel.ChartTitle=ChartTitle; + var _typeChartTitleFormat="ChartTitleFormat"; var ChartTitleFormat=(function (_super) { __extends(ChartTitleFormat, _super); function ChartTitleFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartTitleFormat.prototype, "_className", { get: function () { @@ -16712,22 +19505,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartTitleFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["font", "fill"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartTitleFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ChartFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ChartTitleFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Excel.ChartFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true @@ -16737,6 +19537,9 @@ var Excel; "fill" ]); }; + ChartTitleFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartTitleFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16746,22 +19549,32 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["fill", "Fill", "font", "Font"]); }; ChartTitleFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartTitleFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartTitleFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartTitleFormat.prototype.toJSON=function () { - return { - "fill": this.m_fill, - "font": this.m_font - }; + return _toJson(this, {}, { + "font": this._Fo, + }); + }; + ChartTitleFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartTitleFormat; }(OfficeExtension.ClientObject)); Excel.ChartTitleFormat=ChartTitleFormat; + var _typeChartFill="ChartFill"; var ChartFill=(function (_super) { __extends(ChartFill, _super); function ChartFill() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartFill.prototype, "_className", { get: function () { @@ -16775,10 +19588,10 @@ var Excel; return this; }; ChartFill.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; ChartFill.prototype.setSolidColor=function (color) { - _createMethodAction(this.context, this, "SetSolidColor", 0, [color]); + _createMethodAction(this.context, this, "SetSolidColor", 0, [color], false); }; ChartFill.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16787,16 +19600,21 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); }; + ChartFill.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; ChartFill.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}); }; return ChartFill; }(OfficeExtension.ClientObject)); Excel.ChartFill=ChartFill; + var _typeChartLineFormat="ChartLineFormat"; var ChartLineFormat=(function (_super) { __extends(ChartLineFormat, _super); function ChartLineFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartLineFormat.prototype, "_className", { get: function () { @@ -16805,13 +19623,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartLineFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["color"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartLineFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartLineFormat.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "ChartLineFormat", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeChartLineFormat, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -16820,8 +19652,11 @@ var Excel; ChartLineFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["color"], [], []); }; + ChartLineFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartLineFormat.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; ChartLineFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16830,25 +19665,36 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } }; ChartLineFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartLineFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartLineFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartLineFormat.prototype.toJSON=function () { - return { - "color": this.m_color - }; + return _toJson(this, { + "color": this._C, + }, {}); + }; + ChartLineFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartLineFormat; }(OfficeExtension.ClientObject)); Excel.ChartLineFormat=ChartLineFormat; + var _typeChartFont="ChartFont"; var ChartFont=(function (_super) { __extends(ChartFont, _super); function ChartFont() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ChartFont.prototype, "_className", { get: function () { @@ -16857,13 +19703,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ChartFont.prototype, "_scalarPropertyNames", { + get: function () { + return ["bold", "color", "italic", "name", "size", "underline"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ChartFont.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ChartFont.prototype, "bold", { get: function () { - _throwIfNotLoaded("bold", this.m_bold, "ChartFont", this._isNull); - return this.m_bold; + _throwIfNotLoaded("bold", this._B, _typeChartFont, this._isNull); + return this._B; }, set: function (value) { - this.m_bold=value; + this._B=value; _createSetPropertyAction(this.context, this, "Bold", value); }, enumerable: true, @@ -16871,11 +19731,11 @@ var Excel; }); Object.defineProperty(ChartFont.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "ChartFont", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeChartFont, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -16883,11 +19743,11 @@ var Excel; }); Object.defineProperty(ChartFont.prototype, "italic", { get: function () { - _throwIfNotLoaded("italic", this.m_italic, "ChartFont", this._isNull); - return this.m_italic; + _throwIfNotLoaded("italic", this._I, _typeChartFont, this._isNull); + return this._I; }, set: function (value) { - this.m_italic=value; + this._I=value; _createSetPropertyAction(this.context, this, "Italic", value); }, enumerable: true, @@ -16895,11 +19755,11 @@ var Excel; }); Object.defineProperty(ChartFont.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "ChartFont", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeChartFont, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -16907,11 +19767,11 @@ var Excel; }); Object.defineProperty(ChartFont.prototype, "size", { get: function () { - _throwIfNotLoaded("size", this.m_size, "ChartFont", this._isNull); - return this.m_size; + _throwIfNotLoaded("size", this._S, _typeChartFont, this._isNull); + return this._S; }, set: function (value) { - this.m_size=value; + this._S=value; _createSetPropertyAction(this.context, this, "Size", value); }, enumerable: true, @@ -16919,11 +19779,11 @@ var Excel; }); Object.defineProperty(ChartFont.prototype, "underline", { get: function () { - _throwIfNotLoaded("underline", this.m_underline, "ChartFont", this._isNull); - return this.m_underline; + _throwIfNotLoaded("underline", this._U, _typeChartFont, this._isNull); + return this._U; }, set: function (value) { - this.m_underline=value; + this._U=value; _createSetPropertyAction(this.context, this, "Underline", value); }, enumerable: true, @@ -16932,6 +19792,9 @@ var Excel; ChartFont.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["bold", "color", "italic", "name", "size", "underline"], [], []); }; + ChartFont.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ChartFont.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -16939,45 +19802,56 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Bold"])) { - this.m_bold=obj["Bold"]; + this._B=obj["Bold"]; } if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["Italic"])) { - this.m_italic=obj["Italic"]; + this._I=obj["Italic"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Size"])) { - this.m_size=obj["Size"]; + this._S=obj["Size"]; } if (!_isUndefined(obj["Underline"])) { - this.m_underline=obj["Underline"]; + this._U=obj["Underline"]; } }; ChartFont.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ChartFont.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ChartFont.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ChartFont.prototype.toJSON=function () { - return { - "bold": this.m_bold, - "color": this.m_color, - "italic": this.m_italic, - "name": this.m_name, - "size": this.m_size, - "underline": this.m_underline - }; + return _toJson(this, { + "bold": this._B, + "color": this._C, + "italic": this._I, + "name": this._N, + "size": this._S, + "underline": this._U, + }, {}); + }; + ChartFont.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ChartFont; }(OfficeExtension.ClientObject)); Excel.ChartFont=ChartFont; + var _typeRangeSort="RangeSort"; var RangeSort=(function (_super) { __extends(RangeSort, _super); function RangeSort() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeSort.prototype, "_className", { get: function () { @@ -16987,7 +19861,7 @@ var Excel; configurable: true }); RangeSort.prototype.apply=function (fields, matchCase, hasHeaders, orientation, method) { - _createMethodAction(this.context, this, "Apply", 0, [fields, matchCase, hasHeaders, orientation, method]); + _createMethodAction(this.context, this, "Apply", 0, [fields, matchCase, hasHeaders, orientation, method], false); }; RangeSort.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16996,16 +19870,21 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); }; + RangeSort.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; RangeSort.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}); }; return RangeSort; }(OfficeExtension.ClientObject)); Excel.RangeSort=RangeSort; + var _typeTableSort="TableSort"; var TableSort=(function (_super) { __extends(TableSort, _super); function TableSort() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableSort.prototype, "_className", { get: function () { @@ -17014,38 +19893,45 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TableSort.prototype, "_scalarPropertyNames", { + get: function () { + return ["matchCase", "method", "fields"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TableSort.prototype, "fields", { get: function () { - _throwIfNotLoaded("fields", this.m_fields, "TableSort", this._isNull); - return this.m_fields; + _throwIfNotLoaded("fields", this._F, _typeTableSort, this._isNull); + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(TableSort.prototype, "matchCase", { get: function () { - _throwIfNotLoaded("matchCase", this.m_matchCase, "TableSort", this._isNull); - return this.m_matchCase; + _throwIfNotLoaded("matchCase", this._M, _typeTableSort, this._isNull); + return this._M; }, enumerable: true, configurable: true }); Object.defineProperty(TableSort.prototype, "method", { get: function () { - _throwIfNotLoaded("method", this.m_method, "TableSort", this._isNull); - return this.m_method; + _throwIfNotLoaded("method", this._Me, _typeTableSort, this._isNull); + return this._Me; }, enumerable: true, configurable: true }); TableSort.prototype.apply=function (fields, matchCase, method) { - _createMethodAction(this.context, this, "Apply", 0, [fields, matchCase, method]); + _createMethodAction(this.context, this, "Apply", 0, [fields, matchCase, method], false); }; TableSort.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; TableSort.prototype.reapply=function () { - _createMethodAction(this.context, this, "Reapply", 0, []); + _createMethodAction(this.context, this, "Reapply", 0, [], false); }; TableSort.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17054,33 +19940,44 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Fields"])) { - this.m_fields=obj["Fields"]; + this._F=obj["Fields"]; } if (!_isUndefined(obj["MatchCase"])) { - this.m_matchCase=obj["MatchCase"]; + this._M=obj["MatchCase"]; } if (!_isUndefined(obj["Method"])) { - this.m_method=obj["Method"]; + this._Me=obj["Method"]; } }; TableSort.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableSort.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableSort.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; TableSort.prototype.toJSON=function () { - return { - "fields": this.m_fields, - "matchCase": this.m_matchCase, - "method": this.m_method - }; + return _toJson(this, { + "fields": this._F, + "matchCase": this._M, + "method": this._Me, + }, {}); + }; + TableSort.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TableSort; }(OfficeExtension.ClientObject)); Excel.TableSort=TableSort; + var _typeFilter="Filter"; var Filter=(function (_super) { __extends(Filter, _super); function Filter() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Filter.prototype, "_className", { get: function () { @@ -17089,49 +19986,56 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(Filter.prototype, "_scalarPropertyNames", { + get: function () { + return ["criteria"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(Filter.prototype, "criteria", { get: function () { - _throwIfNotLoaded("criteria", this.m_criteria, "Filter", this._isNull); - return this.m_criteria; + _throwIfNotLoaded("criteria", this._C, _typeFilter, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Filter.prototype.apply=function (criteria) { - _createMethodAction(this.context, this, "Apply", 0, [criteria]); + _createMethodAction(this.context, this, "Apply", 0, [criteria], false); }; Filter.prototype.applyBottomItemsFilter=function (count) { - _createMethodAction(this.context, this, "ApplyBottomItemsFilter", 0, [count]); + _createMethodAction(this.context, this, "ApplyBottomItemsFilter", 0, [count], false); }; Filter.prototype.applyBottomPercentFilter=function (percent) { - _createMethodAction(this.context, this, "ApplyBottomPercentFilter", 0, [percent]); + _createMethodAction(this.context, this, "ApplyBottomPercentFilter", 0, [percent], false); }; Filter.prototype.applyCellColorFilter=function (color) { - _createMethodAction(this.context, this, "ApplyCellColorFilter", 0, [color]); + _createMethodAction(this.context, this, "ApplyCellColorFilter", 0, [color], false); }; Filter.prototype.applyCustomFilter=function (criteria1, criteria2, oper) { - _createMethodAction(this.context, this, "ApplyCustomFilter", 0, [criteria1, criteria2, oper]); + _createMethodAction(this.context, this, "ApplyCustomFilter", 0, [criteria1, criteria2, oper], false); }; Filter.prototype.applyDynamicFilter=function (criteria) { - _createMethodAction(this.context, this, "ApplyDynamicFilter", 0, [criteria]); + _createMethodAction(this.context, this, "ApplyDynamicFilter", 0, [criteria], false); }; Filter.prototype.applyFontColorFilter=function (color) { - _createMethodAction(this.context, this, "ApplyFontColorFilter", 0, [color]); + _createMethodAction(this.context, this, "ApplyFontColorFilter", 0, [color], false); }; Filter.prototype.applyIconFilter=function (icon) { - _createMethodAction(this.context, this, "ApplyIconFilter", 0, [icon]); + _createMethodAction(this.context, this, "ApplyIconFilter", 0, [icon], false); }; Filter.prototype.applyTopItemsFilter=function (count) { - _createMethodAction(this.context, this, "ApplyTopItemsFilter", 0, [count]); + _createMethodAction(this.context, this, "ApplyTopItemsFilter", 0, [count], false); }; Filter.prototype.applyTopPercentFilter=function (percent) { - _createMethodAction(this.context, this, "ApplyTopPercentFilter", 0, [percent]); + _createMethodAction(this.context, this, "ApplyTopPercentFilter", 0, [percent], false); }; Filter.prototype.applyValuesFilter=function (values) { - _createMethodAction(this.context, this, "ApplyValuesFilter", 0, [values]); + _createMethodAction(this.context, this, "ApplyValuesFilter", 0, [values], false); }; Filter.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; Filter.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17140,25 +20044,36 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Criteria"])) { - this.m_criteria=obj["Criteria"]; + this._C=obj["Criteria"]; } }; Filter.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Filter.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Filter.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; Filter.prototype.toJSON=function () { - return { - "criteria": this.m_criteria - }; + return _toJson(this, { + "criteria": this._C, + }, {}); + }; + Filter.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Filter; }(OfficeExtension.ClientObject)); Excel.Filter=Filter; + var _typeCustomXmlPartScopedCollection="CustomXmlPartScopedCollection"; var CustomXmlPartScopedCollection=(function (_super) { __extends(CustomXmlPartScopedCollection, _super); function CustomXmlPartScopedCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CustomXmlPartScopedCollection.prototype, "_className", { get: function () { @@ -17167,16 +20082,23 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(CustomXmlPartScopedCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(CustomXmlPartScopedCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "CustomXmlPartScopedCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeCustomXmlPartScopedCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); CustomXmlPartScopedCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -17185,13 +20107,13 @@ var Excel; return new Excel.CustomXmlPart(this.context, _createIndexerObjectPath(this.context, this, [id])); }; CustomXmlPartScopedCollection.prototype.getItemOrNullObject=function (id) { - return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null)); + return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null, false)); }; CustomXmlPartScopedCollection.prototype.getOnlyItem=function () { - return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetOnlyItem", 1, [], false, false, null)); + return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetOnlyItem", 1, [], false, false, null, false)); }; CustomXmlPartScopedCollection.prototype.getOnlyItemOrNullObject=function () { - return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetOnlyItemOrNullObject", 1, [], false, false, null)); + return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetOnlyItemOrNullObject", 1, [], false, false, null, false)); }; CustomXmlPartScopedCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17210,19 +20132,27 @@ var Excel; } }; CustomXmlPartScopedCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CustomXmlPartScopedCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CustomXmlPartScopedCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.CustomXmlPart(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; CustomXmlPartScopedCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return CustomXmlPartScopedCollection; }(OfficeExtension.ClientObject)); Excel.CustomXmlPartScopedCollection=CustomXmlPartScopedCollection; + var _typeCustomXmlPartCollection="CustomXmlPartCollection"; var CustomXmlPartCollection=(function (_super) { __extends(CustomXmlPartCollection, _super); function CustomXmlPartCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CustomXmlPartCollection.prototype, "_className", { get: function () { @@ -17231,22 +20161,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(CustomXmlPartCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(CustomXmlPartCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "CustomXmlPartCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeCustomXmlPartCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); CustomXmlPartCollection.prototype.add=function (xml) { - return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [xml], false, true, null)); + return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [xml], false, true, null, false)); }; CustomXmlPartCollection.prototype.getByNamespace=function (namespaceUri) { - return new Excel.CustomXmlPartScopedCollection(this.context, _createMethodObjectPath(this.context, this, "GetByNamespace", 1, [namespaceUri], true, false, null)); + return new Excel.CustomXmlPartScopedCollection(this.context, _createMethodObjectPath(this.context, this, "GetByNamespace", 1, [namespaceUri], true, false, null, false)); }; CustomXmlPartCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -17255,7 +20192,7 @@ var Excel; return new Excel.CustomXmlPart(this.context, _createIndexerObjectPath(this.context, this, [id])); }; CustomXmlPartCollection.prototype.getItemOrNullObject=function (id) { - return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null)); + return new Excel.CustomXmlPart(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [id], false, false, null, false)); }; CustomXmlPartCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17274,19 +20211,27 @@ var Excel; } }; CustomXmlPartCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CustomXmlPartCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CustomXmlPartCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.CustomXmlPart(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; CustomXmlPartCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return CustomXmlPartCollection; }(OfficeExtension.ClientObject)); Excel.CustomXmlPartCollection=CustomXmlPartCollection; + var _typeCustomXmlPart="CustomXmlPart"; var CustomXmlPart=(function (_super) { __extends(CustomXmlPart, _super); function CustomXmlPart() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CustomXmlPart.prototype, "_className", { get: function () { @@ -17295,33 +20240,40 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(CustomXmlPart.prototype, "_scalarPropertyNames", { + get: function () { + return ["id", "namespaceUri"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(CustomXmlPart.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "CustomXmlPart", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeCustomXmlPart, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(CustomXmlPart.prototype, "namespaceUri", { get: function () { - _throwIfNotLoaded("namespaceUri", this.m_namespaceUri, "CustomXmlPart", this._isNull); - return this.m_namespaceUri; + _throwIfNotLoaded("namespaceUri", this._N, _typeCustomXmlPart, this._isNull); + return this._N; }, enumerable: true, configurable: true }); CustomXmlPart.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; CustomXmlPart.prototype.getXml=function () { - var action=_createMethodAction(this.context, this, "GetXml", 1, []); + var action=_createMethodAction(this.context, this, "GetXml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; CustomXmlPart.prototype.setXml=function (xml) { - _createMethodAction(this.context, this, "SetXml", 0, [xml]); + _createMethodAction(this.context, this, "SetXml", 0, [xml], false); }; CustomXmlPart.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17330,15 +20282,17 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["NamespaceUri"])) { - this.m_namespaceUri=obj["NamespaceUri"]; + this._N=obj["NamespaceUri"]; } }; CustomXmlPart.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CustomXmlPart.prototype.retrieve=function (option) { + return _retrieve(this, option); }; CustomXmlPart.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -17346,22 +20300,31 @@ var Excel; return; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; + CustomXmlPart.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; CustomXmlPart.prototype.toJSON=function () { - return { - "id": this.m_id, - "namespaceUri": this.m_namespaceUri - }; + return _toJson(this, { + "id": this._I, + "namespaceUri": this._N, + }, {}); + }; + CustomXmlPart.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return CustomXmlPart; }(OfficeExtension.ClientObject)); Excel.CustomXmlPart=CustomXmlPart; + var _type_V1Api="_V1Api"; var _V1Api=(function (_super) { __extends(_V1Api, _super); function _V1Api() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(_V1Api.prototype, "_className", { get: function () { @@ -17371,109 +20334,110 @@ var Excel; configurable: true }); _V1Api.prototype.bindingAddColumns=function (input) { - var action=_createMethodAction(this.context, this, "BindingAddColumns", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingAddColumns", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingAddFromNamedItem=function (input) { - var action=_createMethodAction(this.context, this, "BindingAddFromNamedItem", 1, [input]); + var action=_createMethodAction(this.context, this, "BindingAddFromNamedItem", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingAddFromPrompt=function (input) { - var action=_createMethodAction(this.context, this, "BindingAddFromPrompt", 1, [input]); + var action=_createMethodAction(this.context, this, "BindingAddFromPrompt", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingAddFromSelection=function (input) { - var action=_createMethodAction(this.context, this, "BindingAddFromSelection", 1, [input]); + var action=_createMethodAction(this.context, this, "BindingAddFromSelection", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingAddRows=function (input) { - var action=_createMethodAction(this.context, this, "BindingAddRows", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingAddRows", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingClearFormats=function (input) { - var action=_createMethodAction(this.context, this, "BindingClearFormats", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingClearFormats", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingDeleteAllDataValues=function (input) { - var action=_createMethodAction(this.context, this, "BindingDeleteAllDataValues", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingDeleteAllDataValues", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingGetAll=function () { - var action=_createMethodAction(this.context, this, "BindingGetAll", 1, []); + var action=_createMethodAction(this.context, this, "BindingGetAll", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingGetById=function (input) { - var action=_createMethodAction(this.context, this, "BindingGetById", 1, [input]); + var action=_createMethodAction(this.context, this, "BindingGetById", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingGetData=function (input) { - var action=_createMethodAction(this.context, this, "BindingGetData", 1, [input]); + var action=_createMethodAction(this.context, this, "BindingGetData", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingReleaseById=function (input) { - var action=_createMethodAction(this.context, this, "BindingReleaseById", 1, [input]); + var action=_createMethodAction(this.context, this, "BindingReleaseById", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingSetData=function (input) { - var action=_createMethodAction(this.context, this, "BindingSetData", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingSetData", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingSetFormats=function (input) { - var action=_createMethodAction(this.context, this, "BindingSetFormats", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingSetFormats", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.bindingSetTableOptions=function (input) { - var action=_createMethodAction(this.context, this, "BindingSetTableOptions", 0, [input]); + var action=_createMethodAction(this.context, this, "BindingSetTableOptions", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.getFilePropertiesAsync=function () { - var action=_createMethodAction(this.context, this, "GetFilePropertiesAsync", 1, []); + _throwIfApiNotSupported("_V1Api.getFilePropertiesAsync", _defaultApiSetName, "1.6", _hostName); + var action=_createMethodAction(this.context, this, "GetFilePropertiesAsync", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.getSelectedData=function (input) { - var action=_createMethodAction(this.context, this, "GetSelectedData", 1, [input]); + var action=_createMethodAction(this.context, this, "GetSelectedData", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.gotoById=function (input) { - var action=_createMethodAction(this.context, this, "GotoById", 1, [input]); + var action=_createMethodAction(this.context, this, "GotoById", 1, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; _V1Api.prototype.setSelectedData=function (input) { - var action=_createMethodAction(this.context, this, "SetSelectedData", 0, [input]); + var action=_createMethodAction(this.context, this, "SetSelectedData", 0, [input], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -17485,16 +20449,21 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); }; + _V1Api.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; _V1Api.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}); }; return _V1Api; }(OfficeExtension.ClientObject)); Excel._V1Api=_V1Api; + var _typePivotTableCollection="PivotTableCollection"; var PivotTableCollection=(function (_super) { __extends(PivotTableCollection, _super); function PivotTableCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(PivotTableCollection.prototype, "_className", { get: function () { @@ -17503,16 +20472,24 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(PivotTableCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(PivotTableCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "PivotTableCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typePivotTableCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); PivotTableCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + _throwIfApiNotSupported("PivotTableCollection.getCount", _defaultApiSetName, "1.4", _hostName); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -17521,10 +20498,11 @@ var Excel; return new Excel.PivotTable(this.context, _createIndexerObjectPath(this.context, this, [name])); }; PivotTableCollection.prototype.getItemOrNullObject=function (name) { - return new Excel.PivotTable(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null)); + _throwIfApiNotSupported("PivotTableCollection.getItemOrNullObject", _defaultApiSetName, "1.4", _hostName); + return new Excel.PivotTable(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [name], false, false, null, false)); }; PivotTableCollection.prototype.refreshAll=function () { - _createMethodAction(this.context, this, "RefreshAll", 0, []); + _createMethodAction(this.context, this, "RefreshAll", 0, [], false); }; PivotTableCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17543,19 +20521,27 @@ var Excel; } }; PivotTableCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + PivotTableCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + PivotTableCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.PivotTable(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; PivotTableCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return PivotTableCollection; }(OfficeExtension.ClientObject)); Excel.PivotTableCollection=PivotTableCollection; + var _typePivotTable="PivotTable"; var PivotTable=(function (_super) { __extends(PivotTable, _super); function PivotTable() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(PivotTable.prototype, "_className", { get: function () { @@ -17564,31 +20550,53 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(PivotTable.prototype, "_scalarPropertyNames", { + get: function () { + return ["name", "id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PivotTable.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PivotTable.prototype, "_navigationPropertyNames", { + get: function () { + return ["worksheet"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(PivotTable.prototype, "worksheet", { get: function () { - if (!this.m_worksheet) { - this.m_worksheet=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false)); + if (!this._W) { + this._W=new Excel.Worksheet(this.context, _createPropertyObjectPath(this.context, this, "Worksheet", false, false, false)); } - return this.m_worksheet; + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(PivotTable.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "PivotTable", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typePivotTable, this._isNull); + _throwIfApiNotSupported("PivotTable.id", _defaultApiSetName, "1.5", _hostName); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(PivotTable.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "PivotTable", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typePivotTable, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -17596,12 +20604,14 @@ var Excel; }); PivotTable.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["name"], [], [ - "worksheet", "worksheet" ]); }; + PivotTable.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; PivotTable.prototype.refresh=function () { - _createMethodAction(this.context, this, "Refresh", 0, []); + _createMethodAction(this.context, this, "Refresh", 0, [], false); }; PivotTable.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17610,16 +20620,18 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } _handleNavigationPropertyResults(this, obj, ["worksheet", "Worksheet"]); }; PivotTable.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + PivotTable.prototype.retrieve=function (option) { + return _retrieve(this, option); }; PivotTable.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -17627,22 +20639,31 @@ var Excel; return; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; + PivotTable.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; PivotTable.prototype.toJSON=function () { - return { - "id": this.m_id, - "name": this.m_name - }; + return _toJson(this, { + "id": this._I, + "name": this._N, + }, {}); + }; + PivotTable.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return PivotTable; }(OfficeExtension.ClientObject)); Excel.PivotTable=PivotTable; + var _typeConditionalFormatCollection="ConditionalFormatCollection"; var ConditionalFormatCollection=(function (_super) { __extends(ConditionalFormatCollection, _super); function ConditionalFormatCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalFormatCollection.prototype, "_className", { get: function () { @@ -17651,28 +20672,38 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalFormatCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalFormatCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ConditionalFormatCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeConditionalFormatCollection, this._isNull); return this.m__items; }, enumerable: true, configurable: true }); ConditionalFormatCollection.prototype.add=function (type) { - return new Excel.ConditionalFormat(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [type], false, true, null)); + return new Excel.ConditionalFormat(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [type], false, true, null, false)); }; ConditionalFormatCollection.prototype.clearAll=function () { - _createMethodAction(this.context, this, "ClearAll", 0, []); + _createMethodAction(this.context, this, "ClearAll", 0, [], false); }; ConditionalFormatCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; + ConditionalFormatCollection.prototype.getItem=function (id) { + return new Excel.ConditionalFormat(this.context, _createIndexerObjectPath(this.context, this, [id])); + }; ConditionalFormatCollection.prototype.getItemAt=function (index) { - return new Excel.ConditionalFormat(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.ConditionalFormat(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; ConditionalFormatCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17684,26 +20715,34 @@ var Excel; this.m__items=[]; var _data=obj[OfficeExtension.Constants.items]; for (var i=0; i < _data.length; i++) { - var _item=new Excel.ConditionalFormat(this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(false, this.context, this, _data[i], i)); + var _item=new Excel.ConditionalFormat(this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, this.context, this, _data[i], i)); _item._handleResult(_data[i]); this.m__items.push(_item); } } }; ConditionalFormatCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalFormatCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalFormatCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.ConditionalFormat(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; ConditionalFormatCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return ConditionalFormatCollection; }(OfficeExtension.ClientObject)); Excel.ConditionalFormatCollection=ConditionalFormatCollection; + var _typeConditionalFormat="ConditionalFormat"; var ConditionalFormat=(function (_super) { __extends(ConditionalFormat, _super); function ConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalFormat.prototype, "_className", { get: function () { @@ -17712,173 +20751,202 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["stopIfTrue", "priority", "type", "id"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, false, false]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["dataBarOrNullObject", "dataBar", "customOrNullObject", "custom", "iconSet", "iconSetOrNullObject", "colorScale", "colorScaleOrNullObject", "topBottom", "topBottomOrNullObject", "preset", "presetOrNullObject", "textComparison", "textComparisonOrNullObject", "cellValue", "cellValueOrNullObject"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalFormat.prototype, "cellValue", { get: function () { - if (!this.m_cellValue) { - this.m_cellValue=new Excel.CellValueConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CellValue", false, false)); + if (!this._C) { + this._C=new Excel.CellValueConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CellValue", false, false, false)); } - return this.m_cellValue; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "cellValueOrNullObject", { get: function () { - if (!this.m_cellValueOrNullObject) { - this.m_cellValueOrNullObject=new Excel.CellValueConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CellValueOrNullObject", false, false)); + if (!this._Ce) { + this._Ce=new Excel.CellValueConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CellValueOrNullObject", false, false, false)); } - return this.m_cellValueOrNullObject; + return this._Ce; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "colorScale", { get: function () { - if (!this.m_colorScale) { - this.m_colorScale=new Excel.ColorScaleConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "ColorScale", false, false)); + if (!this._Co) { + this._Co=new Excel.ColorScaleConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "ColorScale", false, false, false)); } - return this.m_colorScale; + return this._Co; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "colorScaleOrNullObject", { get: function () { - if (!this.m_colorScaleOrNullObject) { - this.m_colorScaleOrNullObject=new Excel.ColorScaleConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "ColorScaleOrNullObject", false, false)); + if (!this._Col) { + this._Col=new Excel.ColorScaleConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "ColorScaleOrNullObject", false, false, false)); } - return this.m_colorScaleOrNullObject; + return this._Col; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "custom", { get: function () { - if (!this.m_custom) { - this.m_custom=new Excel.CustomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "Custom", false, false)); + if (!this._Cu) { + this._Cu=new Excel.CustomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "Custom", false, false, false)); } - return this.m_custom; + return this._Cu; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "customOrNullObject", { get: function () { - if (!this.m_customOrNullObject) { - this.m_customOrNullObject=new Excel.CustomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CustomOrNullObject", false, false)); + if (!this._Cus) { + this._Cus=new Excel.CustomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "CustomOrNullObject", false, false, false)); } - return this.m_customOrNullObject; + return this._Cus; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "dataBar", { get: function () { - if (!this.m_dataBar) { - this.m_dataBar=new Excel.DataBarConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "DataBar", false, false)); + if (!this._D) { + this._D=new Excel.DataBarConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "DataBar", false, false, false)); } - return this.m_dataBar; + return this._D; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "dataBarOrNullObject", { get: function () { - if (!this.m_dataBarOrNullObject) { - this.m_dataBarOrNullObject=new Excel.DataBarConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "DataBarOrNullObject", false, false)); + if (!this._Da) { + this._Da=new Excel.DataBarConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "DataBarOrNullObject", false, false, false)); } - return this.m_dataBarOrNullObject; + return this._Da; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "iconSet", { get: function () { - if (!this.m_iconSet) { - this.m_iconSet=new Excel.IconSetConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "IconSet", false, false)); + if (!this._I) { + this._I=new Excel.IconSetConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "IconSet", false, false, false)); } - return this.m_iconSet; + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "iconSetOrNullObject", { get: function () { - if (!this.m_iconSetOrNullObject) { - this.m_iconSetOrNullObject=new Excel.IconSetConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "IconSetOrNullObject", false, false)); + if (!this._Ic) { + this._Ic=new Excel.IconSetConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "IconSetOrNullObject", false, false, false)); } - return this.m_iconSetOrNullObject; + return this._Ic; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "preset", { get: function () { - if (!this.m_preset) { - this.m_preset=new Excel.PresetCriteriaConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "Preset", false, false)); + if (!this._P) { + this._P=new Excel.PresetCriteriaConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "Preset", false, false, false)); } - return this.m_preset; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "presetOrNullObject", { get: function () { - if (!this.m_presetOrNullObject) { - this.m_presetOrNullObject=new Excel.PresetCriteriaConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "PresetOrNullObject", false, false)); + if (!this._Pr) { + this._Pr=new Excel.PresetCriteriaConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "PresetOrNullObject", false, false, false)); } - return this.m_presetOrNullObject; + return this._Pr; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "textComparison", { get: function () { - if (!this.m_textComparison) { - this.m_textComparison=new Excel.TextConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TextComparison", false, false)); + if (!this._T) { + this._T=new Excel.TextConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TextComparison", false, false, false)); } - return this.m_textComparison; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "textComparisonOrNullObject", { get: function () { - if (!this.m_textComparisonOrNullObject) { - this.m_textComparisonOrNullObject=new Excel.TextConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TextComparisonOrNullObject", false, false)); + if (!this._Te) { + this._Te=new Excel.TextConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TextComparisonOrNullObject", false, false, false)); } - return this.m_textComparisonOrNullObject; + return this._Te; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "topBottom", { get: function () { - if (!this.m_topBottom) { - this.m_topBottom=new Excel.TopBottomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TopBottom", false, false)); + if (!this._To) { + this._To=new Excel.TopBottomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TopBottom", false, false, false)); } - return this.m_topBottom; + return this._To; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "topBottomOrNullObject", { get: function () { - if (!this.m_topBottomOrNullObject) { - this.m_topBottomOrNullObject=new Excel.TopBottomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TopBottomOrNullObject", false, false)); + if (!this._Top) { + this._Top=new Excel.TopBottomConditionalFormat(this.context, _createPropertyObjectPath(this.context, this, "TopBottomOrNullObject", false, false, false)); } - return this.m_topBottomOrNullObject; + return this._Top; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormat.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._Id0, _typeConditionalFormat, this._isNull); + return this._Id0; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalFormat.prototype, "priority", { get: function () { - _throwIfNotLoaded("priority", this.m_priority, "ConditionalFormat", this._isNull); - return this.m_priority; + _throwIfNotLoaded("priority", this._Pri, _typeConditionalFormat, this._isNull); + return this._Pri; }, set: function (value) { - this.m_priority=value; + this._Pri=value; _createSetPropertyAction(this.context, this, "Priority", value); }, enumerable: true, @@ -17886,11 +20954,11 @@ var Excel; }); Object.defineProperty(ConditionalFormat.prototype, "stopIfTrue", { get: function () { - _throwIfNotLoaded("stopIfTrue", this.m_stopIfTrue, "ConditionalFormat", this._isNull); - return this.m_stopIfTrue; + _throwIfNotLoaded("stopIfTrue", this._S, _typeConditionalFormat, this._isNull); + return this._S; }, set: function (value) { - this.m_stopIfTrue=value; + this._S=value; _createSetPropertyAction(this.context, this, "StopIfTrue", value); }, enumerable: true, @@ -17898,8 +20966,8 @@ var Excel; }); Object.defineProperty(ConditionalFormat.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "ConditionalFormat", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._Ty, _typeConditionalFormat, this._isNull); + return this._Ty; }, enumerable: true, configurable: true @@ -17907,14 +20975,17 @@ var Excel; ConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["stopIfTrue", "priority"], ["dataBarOrNullObject", "dataBar", "customOrNullObject", "custom", "iconSet", "iconSetOrNullObject", "colorScale", "colorScaleOrNullObject", "topBottom", "topBottomOrNullObject", "preset", "presetOrNullObject", "textComparison", "textComparisonOrNullObject", "cellValue", "cellValueOrNullObject"], []); }; + ConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalFormat.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; ConditionalFormat.prototype.getRange=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [], false, true, null, false)); }; ConditionalFormat.prototype.getRangeOrNullObject=function () { - return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRangeOrNullObject", 1, [], false, true, null)); + return new Excel.Range(this.context, _createMethodObjectPath(this.context, this, "GetRangeOrNullObject", 1, [], false, true, null, false)); }; ConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17922,51 +20993,76 @@ var Excel; return; var obj=value; _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._Id0=obj["Id"]; + } if (!_isUndefined(obj["Priority"])) { - this.m_priority=obj["Priority"]; + this._Pri=obj["Priority"]; } if (!_isUndefined(obj["StopIfTrue"])) { - this.m_stopIfTrue=obj["StopIfTrue"]; + this._S=obj["StopIfTrue"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._Ty=obj["Type"]; } _handleNavigationPropertyResults(this, obj, ["cellValue", "CellValue", "cellValueOrNullObject", "CellValueOrNullObject", "colorScale", "ColorScale", "colorScaleOrNullObject", "ColorScaleOrNullObject", "custom", "Custom", "customOrNullObject", "CustomOrNullObject", "dataBar", "DataBar", "dataBarOrNullObject", "DataBarOrNullObject", "iconSet", "IconSet", "iconSetOrNullObject", "IconSetOrNullObject", "preset", "Preset", "presetOrNullObject", "PresetOrNullObject", "textComparison", "TextComparison", "textComparisonOrNullObject", "TextComparisonOrNullObject", "topBottom", "TopBottom", "topBottomOrNullObject", "TopBottomOrNullObject"]); }; ConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalFormat.prototype._handleIdResult=function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._Id0=value["Id"]; + } + }; + ConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalFormat.prototype.toJSON=function () { - return { - "cellValue": this.m_cellValue, - "cellValueOrNullObject": this.m_cellValueOrNullObject, - "colorScale": this.m_colorScale, - "colorScaleOrNullObject": this.m_colorScaleOrNullObject, - "custom": this.m_custom, - "customOrNullObject": this.m_customOrNullObject, - "dataBar": this.m_dataBar, - "dataBarOrNullObject": this.m_dataBarOrNullObject, - "iconSet": this.m_iconSet, - "iconSetOrNullObject": this.m_iconSetOrNullObject, - "preset": this.m_preset, - "presetOrNullObject": this.m_presetOrNullObject, - "priority": this.m_priority, - "stopIfTrue": this.m_stopIfTrue, - "textComparison": this.m_textComparison, - "textComparisonOrNullObject": this.m_textComparisonOrNullObject, - "topBottom": this.m_topBottom, - "topBottomOrNullObject": this.m_topBottomOrNullObject, - "type": this.m_type - }; + return _toJson(this, { + "id": this._Id0, + "priority": this._Pri, + "stopIfTrue": this._S, + "type": this._Ty, + }, { + "cellValue": this._C, + "cellValueOrNullObject": this._Ce, + "colorScale": this._Co, + "colorScaleOrNullObject": this._Col, + "custom": this._Cu, + "customOrNullObject": this._Cus, + "dataBar": this._D, + "dataBarOrNullObject": this._Da, + "iconSet": this._I, + "iconSetOrNullObject": this._Ic, + "preset": this._P, + "presetOrNullObject": this._Pr, + "textComparison": this._T, + "textComparisonOrNullObject": this._Te, + "topBottom": this._To, + "topBottomOrNullObject": this._Top, + }); + }; + ConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalFormat; }(OfficeExtension.ClientObject)); Excel.ConditionalFormat=ConditionalFormat; + var _typeDataBarConditionalFormat="DataBarConditionalFormat"; var DataBarConditionalFormat=(function (_super) { __extends(DataBarConditionalFormat, _super); function DataBarConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(DataBarConditionalFormat.prototype, "_className", { get: function () { @@ -17975,33 +21071,54 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(DataBarConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["showDataBarOnly", "barDirection", "axisFormat", "axisColor", "lowerBoundRule", "upperBoundRule"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DataBarConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DataBarConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["positiveFormat", "negativeFormat"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(DataBarConditionalFormat.prototype, "negativeFormat", { get: function () { - if (!this.m_negativeFormat) { - this.m_negativeFormat=new Excel.ConditionalDataBarNegativeFormat(this.context, _createPropertyObjectPath(this.context, this, "NegativeFormat", false, false)); + if (!this._N) { + this._N=new Excel.ConditionalDataBarNegativeFormat(this.context, _createPropertyObjectPath(this.context, this, "NegativeFormat", false, false, false)); } - return this.m_negativeFormat; + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(DataBarConditionalFormat.prototype, "positiveFormat", { get: function () { - if (!this.m_positiveFormat) { - this.m_positiveFormat=new Excel.ConditionalDataBarPositiveFormat(this.context, _createPropertyObjectPath(this.context, this, "PositiveFormat", false, false)); + if (!this._P) { + this._P=new Excel.ConditionalDataBarPositiveFormat(this.context, _createPropertyObjectPath(this.context, this, "PositiveFormat", false, false, false)); } - return this.m_positiveFormat; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(DataBarConditionalFormat.prototype, "axisColor", { get: function () { - _throwIfNotLoaded("axisColor", this.m_axisColor, "DataBarConditionalFormat", this._isNull); - return this.m_axisColor; + _throwIfNotLoaded("axisColor", this._A, _typeDataBarConditionalFormat, this._isNull); + return this._A; }, set: function (value) { - this.m_axisColor=value; + this._A=value; _createSetPropertyAction(this.context, this, "AxisColor", value); }, enumerable: true, @@ -18009,11 +21126,11 @@ var Excel; }); Object.defineProperty(DataBarConditionalFormat.prototype, "axisFormat", { get: function () { - _throwIfNotLoaded("axisFormat", this.m_axisFormat, "DataBarConditionalFormat", this._isNull); - return this.m_axisFormat; + _throwIfNotLoaded("axisFormat", this._Ax, _typeDataBarConditionalFormat, this._isNull); + return this._Ax; }, set: function (value) { - this.m_axisFormat=value; + this._Ax=value; _createSetPropertyAction(this.context, this, "AxisFormat", value); }, enumerable: true, @@ -18021,11 +21138,11 @@ var Excel; }); Object.defineProperty(DataBarConditionalFormat.prototype, "barDirection", { get: function () { - _throwIfNotLoaded("barDirection", this.m_barDirection, "DataBarConditionalFormat", this._isNull); - return this.m_barDirection; + _throwIfNotLoaded("barDirection", this._B, _typeDataBarConditionalFormat, this._isNull); + return this._B; }, set: function (value) { - this.m_barDirection=value; + this._B=value; _createSetPropertyAction(this.context, this, "BarDirection", value); }, enumerable: true, @@ -18033,11 +21150,11 @@ var Excel; }); Object.defineProperty(DataBarConditionalFormat.prototype, "lowerBoundRule", { get: function () { - _throwIfNotLoaded("lowerBoundRule", this.m_lowerBoundRule, "DataBarConditionalFormat", this._isNull); - return this.m_lowerBoundRule; + _throwIfNotLoaded("lowerBoundRule", this._L, _typeDataBarConditionalFormat, this._isNull); + return this._L; }, set: function (value) { - this.m_lowerBoundRule=value; + this._L=value; _createSetPropertyAction(this.context, this, "LowerBoundRule", value); }, enumerable: true, @@ -18045,11 +21162,11 @@ var Excel; }); Object.defineProperty(DataBarConditionalFormat.prototype, "showDataBarOnly", { get: function () { - _throwIfNotLoaded("showDataBarOnly", this.m_showDataBarOnly, "DataBarConditionalFormat", this._isNull); - return this.m_showDataBarOnly; + _throwIfNotLoaded("showDataBarOnly", this._S, _typeDataBarConditionalFormat, this._isNull); + return this._S; }, set: function (value) { - this.m_showDataBarOnly=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShowDataBarOnly", value); }, enumerable: true, @@ -18057,11 +21174,11 @@ var Excel; }); Object.defineProperty(DataBarConditionalFormat.prototype, "upperBoundRule", { get: function () { - _throwIfNotLoaded("upperBoundRule", this.m_upperBoundRule, "DataBarConditionalFormat", this._isNull); - return this.m_upperBoundRule; + _throwIfNotLoaded("upperBoundRule", this._U, _typeDataBarConditionalFormat, this._isNull); + return this._U; }, set: function (value) { - this.m_upperBoundRule=value; + this._U=value; _createSetPropertyAction(this.context, this, "UpperBoundRule", value); }, enumerable: true, @@ -18070,6 +21187,9 @@ var Excel; DataBarConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["showDataBarOnly", "barDirection", "axisFormat", "axisColor", "lowerBoundRule", "upperBoundRule"], ["positiveFormat", "negativeFormat"], []); }; + DataBarConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; DataBarConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18077,48 +21197,60 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["AxisColor"])) { - this.m_axisColor=obj["AxisColor"]; + this._A=obj["AxisColor"]; } if (!_isUndefined(obj["AxisFormat"])) { - this.m_axisFormat=obj["AxisFormat"]; + this._Ax=obj["AxisFormat"]; } if (!_isUndefined(obj["BarDirection"])) { - this.m_barDirection=obj["BarDirection"]; + this._B=obj["BarDirection"]; } if (!_isUndefined(obj["LowerBoundRule"])) { - this.m_lowerBoundRule=obj["LowerBoundRule"]; + this._L=obj["LowerBoundRule"]; } if (!_isUndefined(obj["ShowDataBarOnly"])) { - this.m_showDataBarOnly=obj["ShowDataBarOnly"]; + this._S=obj["ShowDataBarOnly"]; } if (!_isUndefined(obj["UpperBoundRule"])) { - this.m_upperBoundRule=obj["UpperBoundRule"]; + this._U=obj["UpperBoundRule"]; } _handleNavigationPropertyResults(this, obj, ["negativeFormat", "NegativeFormat", "positiveFormat", "PositiveFormat"]); }; DataBarConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + DataBarConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + DataBarConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; DataBarConditionalFormat.prototype.toJSON=function () { - return { - "axisColor": this.m_axisColor, - "axisFormat": this.m_axisFormat, - "barDirection": this.m_barDirection, - "lowerBoundRule": this.m_lowerBoundRule, - "negativeFormat": this.m_negativeFormat, - "positiveFormat": this.m_positiveFormat, - "showDataBarOnly": this.m_showDataBarOnly, - "upperBoundRule": this.m_upperBoundRule - }; + return _toJson(this, { + "axisColor": this._A, + "axisFormat": this._Ax, + "barDirection": this._B, + "lowerBoundRule": this._L, + "showDataBarOnly": this._S, + "upperBoundRule": this._U, + }, { + "negativeFormat": this._N, + "positiveFormat": this._P, + }); + }; + DataBarConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return DataBarConditionalFormat; }(OfficeExtension.ClientObject)); Excel.DataBarConditionalFormat=DataBarConditionalFormat; + var _typeConditionalDataBarPositiveFormat="ConditionalDataBarPositiveFormat"; var ConditionalDataBarPositiveFormat=(function (_super) { __extends(ConditionalDataBarPositiveFormat, _super); function ConditionalDataBarPositiveFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "_className", { get: function () { @@ -18127,13 +21259,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["fillColor", "gradientFill", "borderColor"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "borderColor", { get: function () { - _throwIfNotLoaded("borderColor", this.m_borderColor, "ConditionalDataBarPositiveFormat", this._isNull); - return this.m_borderColor; + _throwIfNotLoaded("borderColor", this._B, _typeConditionalDataBarPositiveFormat, this._isNull); + return this._B; }, set: function (value) { - this.m_borderColor=value; + this._B=value; _createSetPropertyAction(this.context, this, "BorderColor", value); }, enumerable: true, @@ -18141,11 +21287,11 @@ var Excel; }); Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "fillColor", { get: function () { - _throwIfNotLoaded("fillColor", this.m_fillColor, "ConditionalDataBarPositiveFormat", this._isNull); - return this.m_fillColor; + _throwIfNotLoaded("fillColor", this._F, _typeConditionalDataBarPositiveFormat, this._isNull); + return this._F; }, set: function (value) { - this.m_fillColor=value; + this._F=value; _createSetPropertyAction(this.context, this, "FillColor", value); }, enumerable: true, @@ -18153,11 +21299,11 @@ var Excel; }); Object.defineProperty(ConditionalDataBarPositiveFormat.prototype, "gradientFill", { get: function () { - _throwIfNotLoaded("gradientFill", this.m_gradientFill, "ConditionalDataBarPositiveFormat", this._isNull); - return this.m_gradientFill; + _throwIfNotLoaded("gradientFill", this._G, _typeConditionalDataBarPositiveFormat, this._isNull); + return this._G; }, set: function (value) { - this.m_gradientFill=value; + this._G=value; _createSetPropertyAction(this.context, this, "GradientFill", value); }, enumerable: true, @@ -18166,6 +21312,9 @@ var Excel; ConditionalDataBarPositiveFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["fillColor", "gradientFill", "borderColor"], [], []); }; + ConditionalDataBarPositiveFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalDataBarPositiveFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18173,33 +21322,44 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["BorderColor"])) { - this.m_borderColor=obj["BorderColor"]; + this._B=obj["BorderColor"]; } if (!_isUndefined(obj["FillColor"])) { - this.m_fillColor=obj["FillColor"]; + this._F=obj["FillColor"]; } if (!_isUndefined(obj["GradientFill"])) { - this.m_gradientFill=obj["GradientFill"]; + this._G=obj["GradientFill"]; } }; ConditionalDataBarPositiveFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalDataBarPositiveFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalDataBarPositiveFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalDataBarPositiveFormat.prototype.toJSON=function () { - return { - "borderColor": this.m_borderColor, - "fillColor": this.m_fillColor, - "gradientFill": this.m_gradientFill - }; + return _toJson(this, { + "borderColor": this._B, + "fillColor": this._F, + "gradientFill": this._G, + }, {}); + }; + ConditionalDataBarPositiveFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalDataBarPositiveFormat; }(OfficeExtension.ClientObject)); Excel.ConditionalDataBarPositiveFormat=ConditionalDataBarPositiveFormat; + var _typeConditionalDataBarNegativeFormat="ConditionalDataBarNegativeFormat"; var ConditionalDataBarNegativeFormat=(function (_super) { __extends(ConditionalDataBarNegativeFormat, _super); function ConditionalDataBarNegativeFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "_className", { get: function () { @@ -18208,13 +21368,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["fillColor", "matchPositiveFillColor", "borderColor", "matchPositiveBorderColor"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "borderColor", { get: function () { - _throwIfNotLoaded("borderColor", this.m_borderColor, "ConditionalDataBarNegativeFormat", this._isNull); - return this.m_borderColor; + _throwIfNotLoaded("borderColor", this._B, _typeConditionalDataBarNegativeFormat, this._isNull); + return this._B; }, set: function (value) { - this.m_borderColor=value; + this._B=value; _createSetPropertyAction(this.context, this, "BorderColor", value); }, enumerable: true, @@ -18222,11 +21396,11 @@ var Excel; }); Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "fillColor", { get: function () { - _throwIfNotLoaded("fillColor", this.m_fillColor, "ConditionalDataBarNegativeFormat", this._isNull); - return this.m_fillColor; + _throwIfNotLoaded("fillColor", this._F, _typeConditionalDataBarNegativeFormat, this._isNull); + return this._F; }, set: function (value) { - this.m_fillColor=value; + this._F=value; _createSetPropertyAction(this.context, this, "FillColor", value); }, enumerable: true, @@ -18234,11 +21408,11 @@ var Excel; }); Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "matchPositiveBorderColor", { get: function () { - _throwIfNotLoaded("matchPositiveBorderColor", this.m_matchPositiveBorderColor, "ConditionalDataBarNegativeFormat", this._isNull); - return this.m_matchPositiveBorderColor; + _throwIfNotLoaded("matchPositiveBorderColor", this._M, _typeConditionalDataBarNegativeFormat, this._isNull); + return this._M; }, set: function (value) { - this.m_matchPositiveBorderColor=value; + this._M=value; _createSetPropertyAction(this.context, this, "MatchPositiveBorderColor", value); }, enumerable: true, @@ -18246,11 +21420,11 @@ var Excel; }); Object.defineProperty(ConditionalDataBarNegativeFormat.prototype, "matchPositiveFillColor", { get: function () { - _throwIfNotLoaded("matchPositiveFillColor", this.m_matchPositiveFillColor, "ConditionalDataBarNegativeFormat", this._isNull); - return this.m_matchPositiveFillColor; + _throwIfNotLoaded("matchPositiveFillColor", this._Ma, _typeConditionalDataBarNegativeFormat, this._isNull); + return this._Ma; }, set: function (value) { - this.m_matchPositiveFillColor=value; + this._Ma=value; _createSetPropertyAction(this.context, this, "MatchPositiveFillColor", value); }, enumerable: true, @@ -18259,6 +21433,9 @@ var Excel; ConditionalDataBarNegativeFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["fillColor", "matchPositiveFillColor", "borderColor", "matchPositiveBorderColor"], [], []); }; + ConditionalDataBarNegativeFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalDataBarNegativeFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18266,37 +21443,48 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["BorderColor"])) { - this.m_borderColor=obj["BorderColor"]; + this._B=obj["BorderColor"]; } if (!_isUndefined(obj["FillColor"])) { - this.m_fillColor=obj["FillColor"]; + this._F=obj["FillColor"]; } if (!_isUndefined(obj["MatchPositiveBorderColor"])) { - this.m_matchPositiveBorderColor=obj["MatchPositiveBorderColor"]; + this._M=obj["MatchPositiveBorderColor"]; } if (!_isUndefined(obj["MatchPositiveFillColor"])) { - this.m_matchPositiveFillColor=obj["MatchPositiveFillColor"]; + this._Ma=obj["MatchPositiveFillColor"]; } }; ConditionalDataBarNegativeFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalDataBarNegativeFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalDataBarNegativeFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalDataBarNegativeFormat.prototype.toJSON=function () { - return { - "borderColor": this.m_borderColor, - "fillColor": this.m_fillColor, - "matchPositiveBorderColor": this.m_matchPositiveBorderColor, - "matchPositiveFillColor": this.m_matchPositiveFillColor - }; + return _toJson(this, { + "borderColor": this._B, + "fillColor": this._F, + "matchPositiveBorderColor": this._M, + "matchPositiveFillColor": this._Ma, + }, {}); + }; + ConditionalDataBarNegativeFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalDataBarNegativeFormat; }(OfficeExtension.ClientObject)); Excel.ConditionalDataBarNegativeFormat=ConditionalDataBarNegativeFormat; + var _typeCustomConditionalFormat="CustomConditionalFormat"; var CustomConditionalFormat=(function (_super) { __extends(CustomConditionalFormat, _super); function CustomConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CustomConditionalFormat.prototype, "_className", { get: function () { @@ -18305,22 +21493,29 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(CustomConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["rule", "format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(CustomConditionalFormat.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(CustomConditionalFormat.prototype, "rule", { get: function () { - if (!this.m_rule) { - this.m_rule=new Excel.ConditionalFormatRule(this.context, _createPropertyObjectPath(this.context, this, "Rule", false, false)); + if (!this._R) { + this._R=new Excel.ConditionalFormatRule(this.context, _createPropertyObjectPath(this.context, this, "Rule", false, false, false)); } - return this.m_rule; + return this._R; }, enumerable: true, configurable: true @@ -18328,6 +21523,9 @@ var Excel; CustomConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, [], ["rule", "format"], []); }; + CustomConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; CustomConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18337,22 +21535,33 @@ var Excel; _handleNavigationPropertyResults(this, obj, ["format", "Format", "rule", "Rule"]); }; CustomConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CustomConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CustomConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; CustomConditionalFormat.prototype.toJSON=function () { - return { - "format": this.m_format, - "rule": this.m_rule - }; + return _toJson(this, {}, { + "format": this._F, + "rule": this._R, + }); + }; + CustomConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return CustomConditionalFormat; }(OfficeExtension.ClientObject)); Excel.CustomConditionalFormat=CustomConditionalFormat; + var _typeConditionalFormatRule="ConditionalFormatRule"; var ConditionalFormatRule=(function (_super) { __extends(ConditionalFormatRule, _super); function ConditionalFormatRule() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalFormatRule.prototype, "_className", { get: function () { @@ -18361,13 +21570,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalFormatRule.prototype, "_scalarPropertyNames", { + get: function () { + return ["formula", "formulaLocal", "formulaR1C1"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalFormatRule.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalFormatRule.prototype, "formula", { get: function () { - _throwIfNotLoaded("formula", this.m_formula, "ConditionalFormatRule", this._isNull); - return this.m_formula; + _throwIfNotLoaded("formula", this._F, _typeConditionalFormatRule, this._isNull); + return this._F; }, set: function (value) { - this.m_formula=value; + this._F=value; _createSetPropertyAction(this.context, this, "Formula", value); }, enumerable: true, @@ -18375,11 +21598,11 @@ var Excel; }); Object.defineProperty(ConditionalFormatRule.prototype, "formulaLocal", { get: function () { - _throwIfNotLoaded("formulaLocal", this.m_formulaLocal, "ConditionalFormatRule", this._isNull); - return this.m_formulaLocal; + _throwIfNotLoaded("formulaLocal", this._Fo, _typeConditionalFormatRule, this._isNull); + return this._Fo; }, set: function (value) { - this.m_formulaLocal=value; + this._Fo=value; _createSetPropertyAction(this.context, this, "FormulaLocal", value); }, enumerable: true, @@ -18387,11 +21610,11 @@ var Excel; }); Object.defineProperty(ConditionalFormatRule.prototype, "formulaR1C1", { get: function () { - _throwIfNotLoaded("formulaR1C1", this.m_formulaR1C1, "ConditionalFormatRule", this._isNull); - return this.m_formulaR1C1; + _throwIfNotLoaded("formulaR1C1", this._For, _typeConditionalFormatRule, this._isNull); + return this._For; }, set: function (value) { - this.m_formulaR1C1=value; + this._For=value; _createSetPropertyAction(this.context, this, "FormulaR1C1", value); }, enumerable: true, @@ -18400,6 +21623,9 @@ var Excel; ConditionalFormatRule.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["formula", "formulaLocal", "formulaR1C1"], [], []); }; + ConditionalFormatRule.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalFormatRule.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18407,33 +21633,44 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Formula"])) { - this.m_formula=obj["Formula"]; + this._F=obj["Formula"]; } if (!_isUndefined(obj["FormulaLocal"])) { - this.m_formulaLocal=obj["FormulaLocal"]; + this._Fo=obj["FormulaLocal"]; } if (!_isUndefined(obj["FormulaR1C1"])) { - this.m_formulaR1C1=obj["FormulaR1C1"]; + this._For=obj["FormulaR1C1"]; } }; ConditionalFormatRule.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalFormatRule.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalFormatRule.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalFormatRule.prototype.toJSON=function () { - return { - "formula": this.m_formula, - "formulaLocal": this.m_formulaLocal, - "formulaR1C1": this.m_formulaR1C1 - }; + return _toJson(this, { + "formula": this._F, + "formulaLocal": this._Fo, + "formulaR1C1": this._For, + }, {}); + }; + ConditionalFormatRule.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalFormatRule; }(OfficeExtension.ClientObject)); Excel.ConditionalFormatRule=ConditionalFormatRule; + var _typeIconSetConditionalFormat="IconSetConditionalFormat"; var IconSetConditionalFormat=(function (_super) { __extends(IconSetConditionalFormat, _super); function IconSetConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(IconSetConditionalFormat.prototype, "_className", { get: function () { @@ -18442,13 +21679,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(IconSetConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["reverseIconOrder", "showIconOnly", "style", "criteria"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(IconSetConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(IconSetConditionalFormat.prototype, "criteria", { get: function () { - _throwIfNotLoaded("criteria", this.m_criteria, "IconSetConditionalFormat", this._isNull); - return this.m_criteria; + _throwIfNotLoaded("criteria", this._C, _typeIconSetConditionalFormat, this._isNull); + return this._C; }, set: function (value) { - this.m_criteria=value; + this._C=value; _createSetPropertyAction(this.context, this, "Criteria", value); }, enumerable: true, @@ -18456,11 +21707,11 @@ var Excel; }); Object.defineProperty(IconSetConditionalFormat.prototype, "reverseIconOrder", { get: function () { - _throwIfNotLoaded("reverseIconOrder", this.m_reverseIconOrder, "IconSetConditionalFormat", this._isNull); - return this.m_reverseIconOrder; + _throwIfNotLoaded("reverseIconOrder", this._R, _typeIconSetConditionalFormat, this._isNull); + return this._R; }, set: function (value) { - this.m_reverseIconOrder=value; + this._R=value; _createSetPropertyAction(this.context, this, "ReverseIconOrder", value); }, enumerable: true, @@ -18468,11 +21719,11 @@ var Excel; }); Object.defineProperty(IconSetConditionalFormat.prototype, "showIconOnly", { get: function () { - _throwIfNotLoaded("showIconOnly", this.m_showIconOnly, "IconSetConditionalFormat", this._isNull); - return this.m_showIconOnly; + _throwIfNotLoaded("showIconOnly", this._S, _typeIconSetConditionalFormat, this._isNull); + return this._S; }, set: function (value) { - this.m_showIconOnly=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShowIconOnly", value); }, enumerable: true, @@ -18480,11 +21731,11 @@ var Excel; }); Object.defineProperty(IconSetConditionalFormat.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "IconSetConditionalFormat", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._St, _typeIconSetConditionalFormat, this._isNull); + return this._St; }, set: function (value) { - this.m_style=value; + this._St=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -18493,6 +21744,9 @@ var Excel; IconSetConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["reverseIconOrder", "showIconOnly", "style", "criteria"], [], []); }; + IconSetConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; IconSetConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18500,37 +21754,48 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Criteria"])) { - this.m_criteria=obj["Criteria"]; + this._C=obj["Criteria"]; } if (!_isUndefined(obj["ReverseIconOrder"])) { - this.m_reverseIconOrder=obj["ReverseIconOrder"]; + this._R=obj["ReverseIconOrder"]; } if (!_isUndefined(obj["ShowIconOnly"])) { - this.m_showIconOnly=obj["ShowIconOnly"]; + this._S=obj["ShowIconOnly"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._St=obj["Style"]; } }; IconSetConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + IconSetConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + IconSetConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; IconSetConditionalFormat.prototype.toJSON=function () { - return { - "criteria": this.m_criteria, - "reverseIconOrder": this.m_reverseIconOrder, - "showIconOnly": this.m_showIconOnly, - "style": this.m_style - }; + return _toJson(this, { + "criteria": this._C, + "reverseIconOrder": this._R, + "showIconOnly": this._S, + "style": this._St, + }, {}); + }; + IconSetConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return IconSetConditionalFormat; }(OfficeExtension.ClientObject)); Excel.IconSetConditionalFormat=IconSetConditionalFormat; + var _typeColorScaleConditionalFormat="ColorScaleConditionalFormat"; var ColorScaleConditionalFormat=(function (_super) { __extends(ColorScaleConditionalFormat, _super); function ColorScaleConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ColorScaleConditionalFormat.prototype, "_className", { get: function () { @@ -18539,13 +21804,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ColorScaleConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["threeColorScale", "criteria"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ColorScaleConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ColorScaleConditionalFormat.prototype, "criteria", { get: function () { - _throwIfNotLoaded("criteria", this.m_criteria, "ColorScaleConditionalFormat", this._isNull); - return this.m_criteria; + _throwIfNotLoaded("criteria", this._C, _typeColorScaleConditionalFormat, this._isNull); + return this._C; }, set: function (value) { - this.m_criteria=value; + this._C=value; _createSetPropertyAction(this.context, this, "Criteria", value); }, enumerable: true, @@ -18553,8 +21832,8 @@ var Excel; }); Object.defineProperty(ColorScaleConditionalFormat.prototype, "threeColorScale", { get: function () { - _throwIfNotLoaded("threeColorScale", this.m_threeColorScale, "ColorScaleConditionalFormat", this._isNull); - return this.m_threeColorScale; + _throwIfNotLoaded("threeColorScale", this._T, _typeColorScaleConditionalFormat, this._isNull); + return this._T; }, enumerable: true, configurable: true @@ -18562,6 +21841,9 @@ var Excel; ColorScaleConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["criteria"], [], []); }; + ColorScaleConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ColorScaleConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18569,29 +21851,40 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Criteria"])) { - this.m_criteria=obj["Criteria"]; + this._C=obj["Criteria"]; } if (!_isUndefined(obj["ThreeColorScale"])) { - this.m_threeColorScale=obj["ThreeColorScale"]; + this._T=obj["ThreeColorScale"]; } }; ColorScaleConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ColorScaleConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ColorScaleConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ColorScaleConditionalFormat.prototype.toJSON=function () { - return { - "criteria": this.m_criteria, - "threeColorScale": this.m_threeColorScale - }; + return _toJson(this, { + "criteria": this._C, + "threeColorScale": this._T, + }, {}); + }; + ColorScaleConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ColorScaleConditionalFormat; }(OfficeExtension.ClientObject)); Excel.ColorScaleConditionalFormat=ColorScaleConditionalFormat; + var _typeTopBottomConditionalFormat="TopBottomConditionalFormat"; var TopBottomConditionalFormat=(function (_super) { __extends(TopBottomConditionalFormat, _super); function TopBottomConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TopBottomConditionalFormat.prototype, "_className", { get: function () { @@ -18600,23 +21893,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TopBottomConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["rule"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TopBottomConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TopBottomConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TopBottomConditionalFormat.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(TopBottomConditionalFormat.prototype, "rule", { get: function () { - _throwIfNotLoaded("rule", this.m_rule, "TopBottomConditionalFormat", this._isNull); - return this.m_rule; + _throwIfNotLoaded("rule", this._R, _typeTopBottomConditionalFormat, this._isNull); + return this._R; }, set: function (value) { - this.m_rule=value; + this._R=value; _createSetPropertyAction(this.context, this, "Rule", value); }, enumerable: true, @@ -18625,6 +21939,9 @@ var Excel; TopBottomConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["rule"], ["format"], []); }; + TopBottomConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; TopBottomConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18632,27 +21949,39 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Rule"])) { - this.m_rule=obj["Rule"]; + this._R=obj["Rule"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; TopBottomConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TopBottomConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TopBottomConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; TopBottomConditionalFormat.prototype.toJSON=function () { - return { - "format": this.m_format, - "rule": this.m_rule - }; + return _toJson(this, { + "rule": this._R, + }, { + "format": this._F, + }); + }; + TopBottomConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TopBottomConditionalFormat; }(OfficeExtension.ClientObject)); Excel.TopBottomConditionalFormat=TopBottomConditionalFormat; + var _typePresetCriteriaConditionalFormat="PresetCriteriaConditionalFormat"; var PresetCriteriaConditionalFormat=(function (_super) { __extends(PresetCriteriaConditionalFormat, _super); function PresetCriteriaConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "_className", { get: function () { @@ -18661,23 +21990,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["rule"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(PresetCriteriaConditionalFormat.prototype, "rule", { get: function () { - _throwIfNotLoaded("rule", this.m_rule, "PresetCriteriaConditionalFormat", this._isNull); - return this.m_rule; + _throwIfNotLoaded("rule", this._R, _typePresetCriteriaConditionalFormat, this._isNull); + return this._R; }, set: function (value) { - this.m_rule=value; + this._R=value; _createSetPropertyAction(this.context, this, "Rule", value); }, enumerable: true, @@ -18686,6 +22036,9 @@ var Excel; PresetCriteriaConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["rule"], ["format"], []); }; + PresetCriteriaConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; PresetCriteriaConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18693,27 +22046,39 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Rule"])) { - this.m_rule=obj["Rule"]; + this._R=obj["Rule"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; PresetCriteriaConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + PresetCriteriaConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + PresetCriteriaConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; PresetCriteriaConditionalFormat.prototype.toJSON=function () { - return { - "format": this.m_format, - "rule": this.m_rule - }; + return _toJson(this, { + "rule": this._R, + }, { + "format": this._F, + }); + }; + PresetCriteriaConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return PresetCriteriaConditionalFormat; }(OfficeExtension.ClientObject)); Excel.PresetCriteriaConditionalFormat=PresetCriteriaConditionalFormat; + var _typeTextConditionalFormat="TextConditionalFormat"; var TextConditionalFormat=(function (_super) { __extends(TextConditionalFormat, _super); function TextConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TextConditionalFormat.prototype, "_className", { get: function () { @@ -18722,23 +22087,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(TextConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["rule"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TextConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TextConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(TextConditionalFormat.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(TextConditionalFormat.prototype, "rule", { get: function () { - _throwIfNotLoaded("rule", this.m_rule, "TextConditionalFormat", this._isNull); - return this.m_rule; + _throwIfNotLoaded("rule", this._R, _typeTextConditionalFormat, this._isNull); + return this._R; }, set: function (value) { - this.m_rule=value; + this._R=value; _createSetPropertyAction(this.context, this, "Rule", value); }, enumerable: true, @@ -18747,6 +22133,9 @@ var Excel; TextConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["rule"], ["format"], []); }; + TextConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; TextConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18754,27 +22143,39 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Rule"])) { - this.m_rule=obj["Rule"]; + this._R=obj["Rule"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; TextConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TextConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TextConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; TextConditionalFormat.prototype.toJSON=function () { - return { - "format": this.m_format, - "rule": this.m_rule - }; + return _toJson(this, { + "rule": this._R, + }, { + "format": this._F, + }); + }; + TextConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TextConditionalFormat; }(OfficeExtension.ClientObject)); Excel.TextConditionalFormat=TextConditionalFormat; + var _typeCellValueConditionalFormat="CellValueConditionalFormat"; var CellValueConditionalFormat=(function (_super) { __extends(CellValueConditionalFormat, _super); function CellValueConditionalFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CellValueConditionalFormat.prototype, "_className", { get: function () { @@ -18783,23 +22184,44 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(CellValueConditionalFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["rule"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CellValueConditionalFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(CellValueConditionalFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["format"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(CellValueConditionalFormat.prototype, "format", { get: function () { - if (!this.m_format) { - this.m_format=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false)); + if (!this._F) { + this._F=new Excel.ConditionalRangeFormat(this.context, _createPropertyObjectPath(this.context, this, "Format", false, false, false)); } - return this.m_format; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(CellValueConditionalFormat.prototype, "rule", { get: function () { - _throwIfNotLoaded("rule", this.m_rule, "CellValueConditionalFormat", this._isNull); - return this.m_rule; + _throwIfNotLoaded("rule", this._R, _typeCellValueConditionalFormat, this._isNull); + return this._R; }, set: function (value) { - this.m_rule=value; + this._R=value; _createSetPropertyAction(this.context, this, "Rule", value); }, enumerable: true, @@ -18808,6 +22230,9 @@ var Excel; CellValueConditionalFormat.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["rule"], ["format"], []); }; + CellValueConditionalFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; CellValueConditionalFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18815,27 +22240,39 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Rule"])) { - this.m_rule=obj["Rule"]; + this._R=obj["Rule"]; } _handleNavigationPropertyResults(this, obj, ["format", "Format"]); }; CellValueConditionalFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CellValueConditionalFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CellValueConditionalFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; CellValueConditionalFormat.prototype.toJSON=function () { - return { - "format": this.m_format, - "rule": this.m_rule - }; + return _toJson(this, { + "rule": this._R, + }, { + "format": this._F, + }); + }; + CellValueConditionalFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return CellValueConditionalFormat; }(OfficeExtension.ClientObject)); Excel.CellValueConditionalFormat=CellValueConditionalFormat; + var _typeConditionalRangeFormat="ConditionalRangeFormat"; var ConditionalRangeFormat=(function (_super) { __extends(ConditionalRangeFormat, _super); function ConditionalRangeFormat() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalRangeFormat.prototype, "_className", { get: function () { @@ -18844,58 +22281,77 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalRangeFormat.prototype, "_scalarPropertyNames", { + get: function () { + return ["numberFormat"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeFormat.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeFormat.prototype, "_navigationPropertyNames", { + get: function () { + return ["fill", "font", "borders"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalRangeFormat.prototype, "borders", { get: function () { - if (!this.m_borders) { - this.m_borders=new Excel.ConditionalRangeBorderCollection(this.context, _createPropertyObjectPath(this.context, this, "Borders", true, false)); + if (!this._B) { + this._B=new Excel.ConditionalRangeBorderCollection(this.context, _createPropertyObjectPath(this.context, this, "Borders", true, false, false)); } - return this.m_borders; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeFormat.prototype, "fill", { get: function () { - if (!this.m_fill) { - this.m_fill=new Excel.ConditionalRangeFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false)); + if (!this._F) { + this._F=new Excel.ConditionalRangeFill(this.context, _createPropertyObjectPath(this.context, this, "Fill", false, false, false)); } - return this.m_fill; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeFormat.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Excel.ConditionalRangeFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Excel.ConditionalRangeFont(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeFormat.prototype, "numberFormat", { get: function () { - _throwIfNotLoaded("numberFormat", this.m_numberFormat, "ConditionalRangeFormat", this._isNull); - return this.m_numberFormat; + _throwIfNotLoaded("numberFormat", this._N, _typeConditionalRangeFormat, this._isNull); + return this._N; }, set: function (value) { - this.m_numberFormat=value; + this._N=value; _createSetPropertyAction(this.context, this, "NumberFormat", value); }, enumerable: true, configurable: true }); ConditionalRangeFormat.prototype.set=function (properties, options) { - this._recursivelySet(properties, options, ["numberFormat"], [], [ - "borders", - "fill", - "font", - "borders", - "fill", - "font" + this._recursivelySet(properties, options, ["numberFormat"], ["fill", "font"], [ + "borders" ]); }; + ConditionalRangeFormat.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalRangeFormat.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -18903,26 +22359,41 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["NumberFormat"])) { - this.m_numberFormat=obj["NumberFormat"]; + this._N=obj["NumberFormat"]; } _handleNavigationPropertyResults(this, obj, ["borders", "Borders", "fill", "Fill", "font", "Font"]); }; ConditionalRangeFormat.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalRangeFormat.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalRangeFormat.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalRangeFormat.prototype.toJSON=function () { - return { - "numberFormat": this.m_numberFormat - }; + return _toJson(this, { + "numberFormat": this._N, + }, { + "borders": this._B, + "fill": this._F, + "font": this._Fo, + }); + }; + ConditionalRangeFormat.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalRangeFormat; }(OfficeExtension.ClientObject)); Excel.ConditionalRangeFormat=ConditionalRangeFormat; + var _typeConditionalRangeFont="ConditionalRangeFont"; var ConditionalRangeFont=(function (_super) { __extends(ConditionalRangeFont, _super); function ConditionalRangeFont() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalRangeFont.prototype, "_className", { get: function () { @@ -18931,13 +22402,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalRangeFont.prototype, "_scalarPropertyNames", { + get: function () { + return ["color", "italic", "bold", "underline", "strikethrough"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeFont.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true, true, true, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalRangeFont.prototype, "bold", { get: function () { - _throwIfNotLoaded("bold", this.m_bold, "ConditionalRangeFont", this._isNull); - return this.m_bold; + _throwIfNotLoaded("bold", this._B, _typeConditionalRangeFont, this._isNull); + return this._B; }, set: function (value) { - this.m_bold=value; + this._B=value; _createSetPropertyAction(this.context, this, "Bold", value); }, enumerable: true, @@ -18945,11 +22430,11 @@ var Excel; }); Object.defineProperty(ConditionalRangeFont.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "ConditionalRangeFont", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeConditionalRangeFont, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -18957,11 +22442,11 @@ var Excel; }); Object.defineProperty(ConditionalRangeFont.prototype, "italic", { get: function () { - _throwIfNotLoaded("italic", this.m_italic, "ConditionalRangeFont", this._isNull); - return this.m_italic; + _throwIfNotLoaded("italic", this._I, _typeConditionalRangeFont, this._isNull); + return this._I; }, set: function (value) { - this.m_italic=value; + this._I=value; _createSetPropertyAction(this.context, this, "Italic", value); }, enumerable: true, @@ -18969,11 +22454,11 @@ var Excel; }); Object.defineProperty(ConditionalRangeFont.prototype, "strikethrough", { get: function () { - _throwIfNotLoaded("strikethrough", this.m_strikethrough, "ConditionalRangeFont", this._isNull); - return this.m_strikethrough; + _throwIfNotLoaded("strikethrough", this._S, _typeConditionalRangeFont, this._isNull); + return this._S; }, set: function (value) { - this.m_strikethrough=value; + this._S=value; _createSetPropertyAction(this.context, this, "Strikethrough", value); }, enumerable: true, @@ -18981,11 +22466,11 @@ var Excel; }); Object.defineProperty(ConditionalRangeFont.prototype, "underline", { get: function () { - _throwIfNotLoaded("underline", this.m_underline, "ConditionalRangeFont", this._isNull); - return this.m_underline; + _throwIfNotLoaded("underline", this._U, _typeConditionalRangeFont, this._isNull); + return this._U; }, set: function (value) { - this.m_underline=value; + this._U=value; _createSetPropertyAction(this.context, this, "Underline", value); }, enumerable: true, @@ -18994,8 +22479,11 @@ var Excel; ConditionalRangeFont.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["color", "italic", "bold", "underline", "strikethrough"], [], []); }; + ConditionalRangeFont.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalRangeFont.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; ConditionalRangeFont.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -19004,41 +22492,52 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Bold"])) { - this.m_bold=obj["Bold"]; + this._B=obj["Bold"]; } if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["Italic"])) { - this.m_italic=obj["Italic"]; + this._I=obj["Italic"]; } if (!_isUndefined(obj["Strikethrough"])) { - this.m_strikethrough=obj["Strikethrough"]; + this._S=obj["Strikethrough"]; } if (!_isUndefined(obj["Underline"])) { - this.m_underline=obj["Underline"]; + this._U=obj["Underline"]; } }; ConditionalRangeFont.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalRangeFont.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalRangeFont.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalRangeFont.prototype.toJSON=function () { - return { - "bold": this.m_bold, - "color": this.m_color, - "italic": this.m_italic, - "strikethrough": this.m_strikethrough, - "underline": this.m_underline - }; + return _toJson(this, { + "bold": this._B, + "color": this._C, + "italic": this._I, + "strikethrough": this._S, + "underline": this._U, + }, {}); + }; + ConditionalRangeFont.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalRangeFont; }(OfficeExtension.ClientObject)); Excel.ConditionalRangeFont=ConditionalRangeFont; + var _typeConditionalRangeFill="ConditionalRangeFill"; var ConditionalRangeFill=(function (_super) { __extends(ConditionalRangeFill, _super); function ConditionalRangeFill() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalRangeFill.prototype, "_className", { get: function () { @@ -19047,13 +22546,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalRangeFill.prototype, "_scalarPropertyNames", { + get: function () { + return ["color"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeFill.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalRangeFill.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "ConditionalRangeFill", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeConditionalRangeFill, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -19062,8 +22575,11 @@ var Excel; ConditionalRangeFill.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["color"], [], []); }; + ConditionalRangeFill.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalRangeFill.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; ConditionalRangeFill.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -19072,25 +22588,36 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } }; ConditionalRangeFill.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalRangeFill.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalRangeFill.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalRangeFill.prototype.toJSON=function () { - return { - "color": this.m_color - }; + return _toJson(this, { + "color": this._C, + }, {}); + }; + ConditionalRangeFill.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalRangeFill; }(OfficeExtension.ClientObject)); Excel.ConditionalRangeFill=ConditionalRangeFill; + var _typeConditionalRangeBorder="ConditionalRangeBorder"; var ConditionalRangeBorder=(function (_super) { __extends(ConditionalRangeBorder, _super); function ConditionalRangeBorder() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalRangeBorder.prototype, "_className", { get: function () { @@ -19099,13 +22626,27 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalRangeBorder.prototype, "_scalarPropertyNames", { + get: function () { + return ["sideIndex", "style", "color"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeBorder.prototype, "_scalarPropertyUpdateable", { + get: function () { + return [false, true, true]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalRangeBorder.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "ConditionalRangeBorder", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeConditionalRangeBorder, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -19113,19 +22654,19 @@ var Excel; }); Object.defineProperty(ConditionalRangeBorder.prototype, "sideIndex", { get: function () { - _throwIfNotLoaded("sideIndex", this.m_sideIndex, "ConditionalRangeBorder", this._isNull); - return this.m_sideIndex; + _throwIfNotLoaded("sideIndex", this._S, _typeConditionalRangeBorder, this._isNull); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeBorder.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "ConditionalRangeBorder", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._St, _typeConditionalRangeBorder, this._isNull); + return this._St; }, set: function (value) { - this.m_style=value; + this._St=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -19134,6 +22675,9 @@ var Excel; ConditionalRangeBorder.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["style", "color"], [], []); }; + ConditionalRangeBorder.prototype.update=function (properties) { + this._recursivelyUpdate(properties); + }; ConditionalRangeBorder.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -19141,33 +22685,44 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["SideIndex"])) { - this.m_sideIndex=obj["SideIndex"]; + this._S=obj["SideIndex"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._St=obj["Style"]; } }; ConditionalRangeBorder.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalRangeBorder.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalRangeBorder.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; ConditionalRangeBorder.prototype.toJSON=function () { - return { - "color": this.m_color, - "sideIndex": this.m_sideIndex, - "style": this.m_style - }; + return _toJson(this, { + "color": this._C, + "sideIndex": this._S, + "style": this._St, + }, {}); + }; + ConditionalRangeBorder.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ConditionalRangeBorder; }(OfficeExtension.ClientObject)); Excel.ConditionalRangeBorder=ConditionalRangeBorder; + var _typeConditionalRangeBorderCollection="ConditionalRangeBorderCollection"; var ConditionalRangeBorderCollection=(function (_super) { __extends(ConditionalRangeBorderCollection, _super); function ConditionalRangeBorderCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ConditionalRangeBorderCollection.prototype, "_className", { get: function () { @@ -19176,49 +22731,70 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(ConditionalRangeBorderCollection.prototype, "_isCollection", { + get: function () { + return true; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeBorderCollection.prototype, "_scalarPropertyNames", { + get: function () { + return ["count"]; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ConditionalRangeBorderCollection.prototype, "_navigationPropertyNames", { + get: function () { + return ["top", "bottom", "left", "right"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ConditionalRangeBorderCollection.prototype, "bottom", { get: function () { - if (!this.m_bottom) { - this.m_bottom=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Bottom", false, false)); + if (!this._B) { + this._B=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Bottom", false, false, false)); } - return this.m_bottom; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeBorderCollection.prototype, "left", { get: function () { - if (!this.m_left) { - this.m_left=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Left", false, false)); + if (!this._L) { + this._L=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Left", false, false, false)); } - return this.m_left; + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeBorderCollection.prototype, "right", { get: function () { - if (!this.m_right) { - this.m_right=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Right", false, false)); + if (!this._R) { + this._R=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Right", false, false, false)); } - return this.m_right; + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeBorderCollection.prototype, "top", { get: function () { - if (!this.m_top) { - this.m_top=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Top", false, false)); + if (!this._T) { + this._T=new Excel.ConditionalRangeBorder(this.context, _createPropertyObjectPath(this.context, this, "Top", false, false, false)); } - return this.m_top; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(ConditionalRangeBorderCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ConditionalRangeBorderCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeConditionalRangeBorderCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -19226,8 +22802,8 @@ var Excel; }); Object.defineProperty(ConditionalRangeBorderCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "ConditionalRangeBorderCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeConditionalRangeBorderCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true @@ -19236,7 +22812,7 @@ var Excel; return new Excel.ConditionalRangeBorder(this.context, _createIndexerObjectPath(this.context, this, [index])); }; ConditionalRangeBorderCollection.prototype.getItemAt=function (index) { - return new Excel.ConditionalRangeBorder(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new Excel.ConditionalRangeBorder(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; ConditionalRangeBorderCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -19245,7 +22821,7 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } _handleNavigationPropertyResults(this, obj, ["bottom", "Bottom", "left", "Left", "right", "Right", "top", "Top"]); if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { @@ -19259,17 +22835,65 @@ var Excel; } }; ConditionalRangeBorderCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ConditionalRangeBorderCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ConditionalRangeBorderCollection.prototype._handleRetrieveResult=function (value, result) { + var _this=this; + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result, function (childItemData, index) { return new Excel.ConditionalRangeBorder(_this.context, _createChildItemObjectPathUsingIndexerOrGetItemAt(true, _this.context, _this, childItemData, index)); }); }; ConditionalRangeBorderCollection.prototype.toJSON=function () { - return { - "count": this.m_count - }; + return _toJson(this, { + "count": this._C, + }, { + "bottom": this._B, + "left": this._L, + "right": this._R, + "top": this._T, + }, this.m__items); }; return ConditionalRangeBorderCollection; }(OfficeExtension.ClientObject)); Excel.ConditionalRangeBorderCollection=ConditionalRangeBorderCollection; + var _typeInternalTest="InternalTest"; + var InternalTest=(function (_super) { + __extends(InternalTest, _super); + function InternalTest() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(InternalTest.prototype, "_className", { + get: function () { + return "InternalTest"; + }, + enumerable: true, + configurable: true + }); + InternalTest.prototype.delay=function (seconds) { + var action=_createMethodAction(this.context, this, "Delay", 0, [seconds], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + InternalTest.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + InternalTest.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; + InternalTest.prototype.toJSON=function () { + return _toJson(this, {}, {}); + }; + return InternalTest; + }(OfficeExtension.ClientObject)); + Excel.InternalTest=InternalTest; var BindingType; (function (BindingType) { BindingType.range="Range"; @@ -19323,6 +22947,7 @@ var Excel; ClearApplyTo.formats="Formats"; ClearApplyTo.contents="Contents"; ClearApplyTo.hyperlinks="Hyperlinks"; + ClearApplyTo.removeHyperlinks="RemoveHyperlinks"; })(ClearApplyTo=Excel.ClearApplyTo || (Excel.ClearApplyTo={})); var ChartDataLabelPosition; (function (ChartDataLabelPosition) { @@ -19709,6 +23334,7 @@ var Excel; NamedItemType.boolean="Boolean"; NamedItemType.range="Range"; NamedItemType.error="Error"; + NamedItemType.array="Array"; })(NamedItemType=Excel.NamedItemType || (Excel.NamedItemType={})); var RangeUnderlineStyle; (function (RangeUnderlineStyle) { @@ -19733,6 +23359,7 @@ var Excel; RangeValueType.double="Double"; RangeValueType.boolean="Boolean"; RangeValueType.error="Error"; + RangeValueType.richValue="RichValue"; })(RangeValueType=Excel.RangeValueType || (Excel.RangeValueType={})); var SortOrientation; (function (SortOrientation) { @@ -19764,10 +23391,11 @@ var Excel; VerticalAlignment.justify="Justify"; VerticalAlignment.distributed="Distributed"; })(VerticalAlignment=Excel.VerticalAlignment || (Excel.VerticalAlignment={})); + var _typeFunctionResult="FunctionResult"; var FunctionResult=(function (_super) { __extends(FunctionResult, _super); function FunctionResult() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(FunctionResult.prototype, "_className", { get: function () { @@ -19776,18 +23404,25 @@ var Excel; enumerable: true, configurable: true }); + Object.defineProperty(FunctionResult.prototype, "_scalarPropertyNames", { + get: function () { + return ["error", "value"]; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(FunctionResult.prototype, "error", { get: function () { - _throwIfNotLoaded("error", this.m_error, "FunctionResult", this._isNull); - return this.m_error; + _throwIfNotLoaded("error", this._E, _typeFunctionResult, this._isNull); + return this._E; }, enumerable: true, configurable: true }); Object.defineProperty(FunctionResult.prototype, "value", { get: function () { - _throwIfNotLoaded("value", this.m_value, "FunctionResult", this._isNull); - return this.m_value; + _throwIfNotLoaded("value", this._V, _typeFunctionResult, this._isNull); + return this._V; }, enumerable: true, configurable: true @@ -19799,29 +23434,40 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Error"])) { - this.m_error=obj["Error"]; + this._E=obj["Error"]; } if (!_isUndefined(obj["Value"])) { - this.m_value=obj["Value"]; + this._V=obj["Value"]; } }; FunctionResult.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + FunctionResult.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + FunctionResult.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); }; FunctionResult.prototype.toJSON=function () { - return { - "error": this.m_error, - "value": this.m_value - }; + return _toJson(this, { + "error": this._E, + "value": this._V, + }, {}); + }; + FunctionResult.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return FunctionResult; }(OfficeExtension.ClientObject)); Excel.FunctionResult=FunctionResult; + var _typeFunctions="Functions"; var Functions=(function (_super) { __extends(Functions, _super); function Functions() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Functions.prototype, "_className", { get: function () { @@ -19831,1270 +23477,1270 @@ var Excel; configurable: true }); Functions.prototype.abs=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Abs", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Abs", 0, [number], false, true, null, false)); }; Functions.prototype.accrInt=function (issue, firstInterest, settlement, rate, par, frequency, basis, calcMethod) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AccrInt", 0, [issue, firstInterest, settlement, rate, par, frequency, basis, calcMethod], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AccrInt", 0, [issue, firstInterest, settlement, rate, par, frequency, basis, calcMethod], false, true, null, false)); }; Functions.prototype.accrIntM=function (issue, settlement, rate, par, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AccrIntM", 0, [issue, settlement, rate, par, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AccrIntM", 0, [issue, settlement, rate, par, basis], false, true, null, false)); }; Functions.prototype.acos=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acos", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acos", 0, [number], false, true, null, false)); }; Functions.prototype.acosh=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acosh", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acosh", 0, [number], false, true, null, false)); }; Functions.prototype.acot=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acot", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acot", 0, [number], false, true, null, false)); }; Functions.prototype.acoth=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acoth", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Acoth", 0, [number], false, true, null, false)); }; Functions.prototype.amorDegrc=function (cost, datePurchased, firstPeriod, salvage, period, rate, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AmorDegrc", 0, [cost, datePurchased, firstPeriod, salvage, period, rate, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AmorDegrc", 0, [cost, datePurchased, firstPeriod, salvage, period, rate, basis], false, true, null, false)); }; Functions.prototype.amorLinc=function (cost, datePurchased, firstPeriod, salvage, period, rate, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AmorLinc", 0, [cost, datePurchased, firstPeriod, salvage, period, rate, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AmorLinc", 0, [cost, datePurchased, firstPeriod, salvage, period, rate, basis], false, true, null, false)); }; Functions.prototype.and=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "And", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "And", 0, [values], false, true, null, false)); }; Functions.prototype.arabic=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Arabic", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Arabic", 0, [text], false, true, null, false)); }; Functions.prototype.areas=function (reference) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Areas", 0, [reference], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Areas", 0, [reference], false, true, null, false)); }; Functions.prototype.asc=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asc", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asc", 0, [text], false, true, null, false)); }; Functions.prototype.asin=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asin", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asin", 0, [number], false, true, null, false)); }; Functions.prototype.asinh=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asinh", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Asinh", 0, [number], false, true, null, false)); }; Functions.prototype.atan=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atan", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atan", 0, [number], false, true, null, false)); }; Functions.prototype.atan2=function (xNum, yNum) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atan2", 0, [xNum, yNum], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atan2", 0, [xNum, yNum], false, true, null, false)); }; Functions.prototype.atanh=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atanh", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Atanh", 0, [number], false, true, null, false)); }; Functions.prototype.aveDev=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AveDev", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AveDev", 0, [values], false, true, null, false)); }; Functions.prototype.average=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Average", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Average", 0, [values], false, true, null, false)); }; Functions.prototype.averageA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageA", 0, [values], false, true, null, false)); }; Functions.prototype.averageIf=function (range, criteria, averageRange) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageIf", 0, [range, criteria, averageRange], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageIf", 0, [range, criteria, averageRange], false, true, null, false)); }; Functions.prototype.averageIfs=function (averageRange) { var values=[]; for (var _i=1; _i < arguments.length; _i++) { values[_i - 1]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageIfs", 0, [averageRange, values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "AverageIfs", 0, [averageRange, values], false, true, null, false)); }; Functions.prototype.bahtText=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BahtText", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BahtText", 0, [number], false, true, null, false)); }; Functions.prototype.base=function (number, radix, minLength) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Base", 0, [number, radix, minLength], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Base", 0, [number, radix, minLength], false, true, null, false)); }; Functions.prototype.besselI=function (x, n) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselI", 0, [x, n], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselI", 0, [x, n], false, true, null, false)); }; Functions.prototype.besselJ=function (x, n) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselJ", 0, [x, n], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselJ", 0, [x, n], false, true, null, false)); }; Functions.prototype.besselK=function (x, n) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselK", 0, [x, n], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselK", 0, [x, n], false, true, null, false)); }; Functions.prototype.besselY=function (x, n) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselY", 0, [x, n], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "BesselY", 0, [x, n], false, true, null, false)); }; Functions.prototype.beta_Dist=function (x, alpha, beta, cumulative, A, B) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Beta_Dist", 0, [x, alpha, beta, cumulative, A, B], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Beta_Dist", 0, [x, alpha, beta, cumulative, A, B], false, true, null, false)); }; Functions.prototype.beta_Inv=function (probability, alpha, beta, A, B) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Beta_Inv", 0, [probability, alpha, beta, A, B], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Beta_Inv", 0, [probability, alpha, beta, A, B], false, true, null, false)); }; Functions.prototype.bin2Dec=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Dec", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Dec", 0, [number], false, true, null, false)); }; Functions.prototype.bin2Hex=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Hex", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Hex", 0, [number, places], false, true, null, false)); }; Functions.prototype.bin2Oct=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Oct", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bin2Oct", 0, [number, places], false, true, null, false)); }; Functions.prototype.binom_Dist=function (numberS, trials, probabilityS, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Dist", 0, [numberS, trials, probabilityS, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Dist", 0, [numberS, trials, probabilityS, cumulative], false, true, null, false)); }; Functions.prototype.binom_Dist_Range=function (trials, probabilityS, numberS, numberS2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Dist_Range", 0, [trials, probabilityS, numberS, numberS2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Dist_Range", 0, [trials, probabilityS, numberS, numberS2], false, true, null, false)); }; Functions.prototype.binom_Inv=function (trials, probabilityS, alpha) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Inv", 0, [trials, probabilityS, alpha], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Binom_Inv", 0, [trials, probabilityS, alpha], false, true, null, false)); }; Functions.prototype.bitand=function (number1, number2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitand", 0, [number1, number2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitand", 0, [number1, number2], false, true, null, false)); }; Functions.prototype.bitlshift=function (number, shiftAmount) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitlshift", 0, [number, shiftAmount], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitlshift", 0, [number, shiftAmount], false, true, null, false)); }; Functions.prototype.bitor=function (number1, number2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitor", 0, [number1, number2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitor", 0, [number1, number2], false, true, null, false)); }; Functions.prototype.bitrshift=function (number, shiftAmount) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitrshift", 0, [number, shiftAmount], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitrshift", 0, [number, shiftAmount], false, true, null, false)); }; Functions.prototype.bitxor=function (number1, number2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitxor", 0, [number1, number2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Bitxor", 0, [number1, number2], false, true, null, false)); }; Functions.prototype.ceiling_Math=function (number, significance, mode) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ceiling_Math", 0, [number, significance, mode], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ceiling_Math", 0, [number, significance, mode], false, true, null, false)); }; Functions.prototype.ceiling_Precise=function (number, significance) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ceiling_Precise", 0, [number, significance], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ceiling_Precise", 0, [number, significance], false, true, null, false)); }; Functions.prototype.char=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Char", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Char", 0, [number], false, true, null, false)); }; Functions.prototype.chiSq_Dist=function (x, degFreedom, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Dist", 0, [x, degFreedom, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Dist", 0, [x, degFreedom, cumulative], false, true, null, false)); }; Functions.prototype.chiSq_Dist_RT=function (x, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Dist_RT", 0, [x, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Dist_RT", 0, [x, degFreedom], false, true, null, false)); }; Functions.prototype.chiSq_Inv=function (probability, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Inv", 0, [probability, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Inv", 0, [probability, degFreedom], false, true, null, false)); }; Functions.prototype.chiSq_Inv_RT=function (probability, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Inv_RT", 0, [probability, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ChiSq_Inv_RT", 0, [probability, degFreedom], false, true, null, false)); }; Functions.prototype.choose=function (indexNum) { var values=[]; for (var _i=1; _i < arguments.length; _i++) { values[_i - 1]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Choose", 0, [indexNum, values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Choose", 0, [indexNum, values], false, true, null, false)); }; Functions.prototype.clean=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Clean", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Clean", 0, [text], false, true, null, false)); }; Functions.prototype.code=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Code", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Code", 0, [text], false, true, null, false)); }; Functions.prototype.columns=function (array) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Columns", 0, [array], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Columns", 0, [array], false, true, null, false)); }; Functions.prototype.combin=function (number, numberChosen) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Combin", 0, [number, numberChosen], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Combin", 0, [number, numberChosen], false, true, null, false)); }; Functions.prototype.combina=function (number, numberChosen) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Combina", 0, [number, numberChosen], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Combina", 0, [number, numberChosen], false, true, null, false)); }; Functions.prototype.complex=function (realNum, iNum, suffix) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Complex", 0, [realNum, iNum, suffix], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Complex", 0, [realNum, iNum, suffix], false, true, null, false)); }; Functions.prototype.concatenate=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Concatenate", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Concatenate", 0, [values], false, true, null, false)); }; Functions.prototype.confidence_Norm=function (alpha, standardDev, size) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Confidence_Norm", 0, [alpha, standardDev, size], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Confidence_Norm", 0, [alpha, standardDev, size], false, true, null, false)); }; Functions.prototype.confidence_T=function (alpha, standardDev, size) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Confidence_T", 0, [alpha, standardDev, size], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Confidence_T", 0, [alpha, standardDev, size], false, true, null, false)); }; Functions.prototype.convert=function (number, fromUnit, toUnit) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Convert", 0, [number, fromUnit, toUnit], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Convert", 0, [number, fromUnit, toUnit], false, true, null, false)); }; Functions.prototype.cos=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cos", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cos", 0, [number], false, true, null, false)); }; Functions.prototype.cosh=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cosh", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cosh", 0, [number], false, true, null, false)); }; Functions.prototype.cot=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cot", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Cot", 0, [number], false, true, null, false)); }; Functions.prototype.coth=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Coth", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Coth", 0, [number], false, true, null, false)); }; Functions.prototype.count=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Count", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Count", 0, [values], false, true, null, false)); }; Functions.prototype.countA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountA", 0, [values], false, true, null, false)); }; Functions.prototype.countBlank=function (range) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountBlank", 0, [range], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountBlank", 0, [range], false, true, null, false)); }; Functions.prototype.countIf=function (range, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountIf", 0, [range, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountIf", 0, [range, criteria], false, true, null, false)); }; Functions.prototype.countIfs=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountIfs", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CountIfs", 0, [values], false, true, null, false)); }; Functions.prototype.coupDayBs=function (settlement, maturity, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDayBs", 0, [settlement, maturity, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDayBs", 0, [settlement, maturity, frequency, basis], false, true, null, false)); }; Functions.prototype.coupDays=function (settlement, maturity, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDays", 0, [settlement, maturity, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDays", 0, [settlement, maturity, frequency, basis], false, true, null, false)); }; Functions.prototype.coupDaysNc=function (settlement, maturity, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDaysNc", 0, [settlement, maturity, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupDaysNc", 0, [settlement, maturity, frequency, basis], false, true, null, false)); }; Functions.prototype.coupNcd=function (settlement, maturity, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupNcd", 0, [settlement, maturity, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupNcd", 0, [settlement, maturity, frequency, basis], false, true, null, false)); }; Functions.prototype.coupNum=function (settlement, maturity, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupNum", 0, [settlement, maturity, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupNum", 0, [settlement, maturity, frequency, basis], false, true, null, false)); }; Functions.prototype.coupPcd=function (settlement, maturity, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupPcd", 0, [settlement, maturity, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CoupPcd", 0, [settlement, maturity, frequency, basis], false, true, null, false)); }; Functions.prototype.csc=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Csc", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Csc", 0, [number], false, true, null, false)); }; Functions.prototype.csch=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Csch", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Csch", 0, [number], false, true, null, false)); }; Functions.prototype.cumIPmt=function (rate, nper, pv, startPeriod, endPeriod, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CumIPmt", 0, [rate, nper, pv, startPeriod, endPeriod, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CumIPmt", 0, [rate, nper, pv, startPeriod, endPeriod, type], false, true, null, false)); }; Functions.prototype.cumPrinc=function (rate, nper, pv, startPeriod, endPeriod, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CumPrinc", 0, [rate, nper, pv, startPeriod, endPeriod, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "CumPrinc", 0, [rate, nper, pv, startPeriod, endPeriod, type], false, true, null, false)); }; Functions.prototype.daverage=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DAverage", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DAverage", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dcount=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DCount", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DCount", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dcountA=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DCountA", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DCountA", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dget=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DGet", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DGet", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dmax=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DMax", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DMax", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dmin=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DMin", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DMin", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dproduct=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DProduct", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DProduct", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dstDev=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DStDev", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DStDev", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dstDevP=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DStDevP", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DStDevP", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dsum=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DSum", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DSum", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dvar=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DVar", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DVar", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.dvarP=function (database, field, criteria) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DVarP", 0, [database, field, criteria], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DVarP", 0, [database, field, criteria], false, true, null, false)); }; Functions.prototype.date=function (year, month, day) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Date", 0, [year, month, day], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Date", 0, [year, month, day], false, true, null, false)); }; Functions.prototype.datevalue=function (dateText) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Datevalue", 0, [dateText], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Datevalue", 0, [dateText], false, true, null, false)); }; Functions.prototype.day=function (serialNumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Day", 0, [serialNumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Day", 0, [serialNumber], false, true, null, false)); }; Functions.prototype.days=function (endDate, startDate) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Days", 0, [endDate, startDate], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Days", 0, [endDate, startDate], false, true, null, false)); }; Functions.prototype.days360=function (startDate, endDate, method) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Days360", 0, [startDate, endDate, method], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Days360", 0, [startDate, endDate, method], false, true, null, false)); }; Functions.prototype.db=function (cost, salvage, life, period, month) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Db", 0, [cost, salvage, life, period, month], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Db", 0, [cost, salvage, life, period, month], false, true, null, false)); }; Functions.prototype.dbcs=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dbcs", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dbcs", 0, [text], false, true, null, false)); }; Functions.prototype.ddb=function (cost, salvage, life, period, factor) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ddb", 0, [cost, salvage, life, period, factor], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ddb", 0, [cost, salvage, life, period, factor], false, true, null, false)); }; Functions.prototype.dec2Bin=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Bin", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Bin", 0, [number, places], false, true, null, false)); }; Functions.prototype.dec2Hex=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Hex", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Hex", 0, [number, places], false, true, null, false)); }; Functions.prototype.dec2Oct=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Oct", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dec2Oct", 0, [number, places], false, true, null, false)); }; Functions.prototype.decimal=function (number, radix) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Decimal", 0, [number, radix], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Decimal", 0, [number, radix], false, true, null, false)); }; Functions.prototype.degrees=function (angle) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Degrees", 0, [angle], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Degrees", 0, [angle], false, true, null, false)); }; Functions.prototype.delta=function (number1, number2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Delta", 0, [number1, number2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Delta", 0, [number1, number2], false, true, null, false)); }; Functions.prototype.devSq=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DevSq", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DevSq", 0, [values], false, true, null, false)); }; Functions.prototype.disc=function (settlement, maturity, pr, redemption, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Disc", 0, [settlement, maturity, pr, redemption, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Disc", 0, [settlement, maturity, pr, redemption, basis], false, true, null, false)); }; Functions.prototype.dollar=function (number, decimals) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dollar", 0, [number, decimals], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Dollar", 0, [number, decimals], false, true, null, false)); }; Functions.prototype.dollarDe=function (fractionalDollar, fraction) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DollarDe", 0, [fractionalDollar, fraction], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DollarDe", 0, [fractionalDollar, fraction], false, true, null, false)); }; Functions.prototype.dollarFr=function (decimalDollar, fraction) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DollarFr", 0, [decimalDollar, fraction], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "DollarFr", 0, [decimalDollar, fraction], false, true, null, false)); }; Functions.prototype.duration=function (settlement, maturity, coupon, yld, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Duration", 0, [settlement, maturity, coupon, yld, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Duration", 0, [settlement, maturity, coupon, yld, frequency, basis], false, true, null, false)); }; Functions.prototype.ecma_Ceiling=function (number, significance) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ECMA_Ceiling", 0, [number, significance], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ECMA_Ceiling", 0, [number, significance], false, true, null, false)); }; Functions.prototype.edate=function (startDate, months) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "EDate", 0, [startDate, months], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "EDate", 0, [startDate, months], false, true, null, false)); }; Functions.prototype.effect=function (nominalRate, npery) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Effect", 0, [nominalRate, npery], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Effect", 0, [nominalRate, npery], false, true, null, false)); }; Functions.prototype.eoMonth=function (startDate, months) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "EoMonth", 0, [startDate, months], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "EoMonth", 0, [startDate, months], false, true, null, false)); }; Functions.prototype.erf=function (lowerLimit, upperLimit) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Erf", 0, [lowerLimit, upperLimit], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Erf", 0, [lowerLimit, upperLimit], false, true, null, false)); }; Functions.prototype.erfC=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ErfC", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ErfC", 0, [x], false, true, null, false)); }; Functions.prototype.erfC_Precise=function (X) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ErfC_Precise", 0, [X], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ErfC_Precise", 0, [X], false, true, null, false)); }; Functions.prototype.erf_Precise=function (X) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Erf_Precise", 0, [X], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Erf_Precise", 0, [X], false, true, null, false)); }; Functions.prototype.error_Type=function (errorVal) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Error_Type", 0, [errorVal], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Error_Type", 0, [errorVal], false, true, null, false)); }; Functions.prototype.even=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Even", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Even", 0, [number], false, true, null, false)); }; Functions.prototype.exact=function (text1, text2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Exact", 0, [text1, text2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Exact", 0, [text1, text2], false, true, null, false)); }; Functions.prototype.exp=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Exp", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Exp", 0, [number], false, true, null, false)); }; Functions.prototype.expon_Dist=function (x, lambda, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Expon_Dist", 0, [x, lambda, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Expon_Dist", 0, [x, lambda, cumulative], false, true, null, false)); }; Functions.prototype.fvschedule=function (principal, schedule) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FVSchedule", 0, [principal, schedule], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FVSchedule", 0, [principal, schedule], false, true, null, false)); }; Functions.prototype.f_Dist=function (x, degFreedom1, degFreedom2, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Dist", 0, [x, degFreedom1, degFreedom2, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Dist", 0, [x, degFreedom1, degFreedom2, cumulative], false, true, null, false)); }; Functions.prototype.f_Dist_RT=function (x, degFreedom1, degFreedom2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Dist_RT", 0, [x, degFreedom1, degFreedom2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Dist_RT", 0, [x, degFreedom1, degFreedom2], false, true, null, false)); }; Functions.prototype.f_Inv=function (probability, degFreedom1, degFreedom2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Inv", 0, [probability, degFreedom1, degFreedom2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Inv", 0, [probability, degFreedom1, degFreedom2], false, true, null, false)); }; Functions.prototype.f_Inv_RT=function (probability, degFreedom1, degFreedom2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Inv_RT", 0, [probability, degFreedom1, degFreedom2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "F_Inv_RT", 0, [probability, degFreedom1, degFreedom2], false, true, null, false)); }; Functions.prototype.fact=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fact", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fact", 0, [number], false, true, null, false)); }; Functions.prototype.factDouble=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FactDouble", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FactDouble", 0, [number], false, true, null, false)); }; Functions.prototype.false=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "False", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "False", 0, [], false, true, null, false)); }; Functions.prototype.find=function (findText, withinText, startNum) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Find", 0, [findText, withinText, startNum], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Find", 0, [findText, withinText, startNum], false, true, null, false)); }; Functions.prototype.findB=function (findText, withinText, startNum) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FindB", 0, [findText, withinText, startNum], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FindB", 0, [findText, withinText, startNum], false, true, null, false)); }; Functions.prototype.fisher=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fisher", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fisher", 0, [x], false, true, null, false)); }; Functions.prototype.fisherInv=function (y) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FisherInv", 0, [y], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "FisherInv", 0, [y], false, true, null, false)); }; Functions.prototype.fixed=function (number, decimals, noCommas) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fixed", 0, [number, decimals, noCommas], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fixed", 0, [number, decimals, noCommas], false, true, null, false)); }; Functions.prototype.floor_Math=function (number, significance, mode) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Floor_Math", 0, [number, significance, mode], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Floor_Math", 0, [number, significance, mode], false, true, null, false)); }; Functions.prototype.floor_Precise=function (number, significance) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Floor_Precise", 0, [number, significance], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Floor_Precise", 0, [number, significance], false, true, null, false)); }; Functions.prototype.fv=function (rate, nper, pmt, pv, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fv", 0, [rate, nper, pmt, pv, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Fv", 0, [rate, nper, pmt, pv, type], false, true, null, false)); }; Functions.prototype.gamma=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma", 0, [x], false, true, null, false)); }; Functions.prototype.gammaLn=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GammaLn", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GammaLn", 0, [x], false, true, null, false)); }; Functions.prototype.gammaLn_Precise=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GammaLn_Precise", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GammaLn_Precise", 0, [x], false, true, null, false)); }; Functions.prototype.gamma_Dist=function (x, alpha, beta, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma_Dist", 0, [x, alpha, beta, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma_Dist", 0, [x, alpha, beta, cumulative], false, true, null, false)); }; Functions.prototype.gamma_Inv=function (probability, alpha, beta) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma_Inv", 0, [probability, alpha, beta], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gamma_Inv", 0, [probability, alpha, beta], false, true, null, false)); }; Functions.prototype.gauss=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gauss", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gauss", 0, [x], false, true, null, false)); }; Functions.prototype.gcd=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gcd", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Gcd", 0, [values], false, true, null, false)); }; Functions.prototype.geStep=function (number, step) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GeStep", 0, [number, step], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GeStep", 0, [number, step], false, true, null, false)); }; Functions.prototype.geoMean=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GeoMean", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "GeoMean", 0, [values], false, true, null, false)); }; Functions.prototype.hlookup=function (lookupValue, tableArray, rowIndexNum, rangeLookup) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HLookup", 0, [lookupValue, tableArray, rowIndexNum, rangeLookup], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HLookup", 0, [lookupValue, tableArray, rowIndexNum, rangeLookup], false, true, null, false)); }; Functions.prototype.harMean=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HarMean", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HarMean", 0, [values], false, true, null, false)); }; Functions.prototype.hex2Bin=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Bin", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Bin", 0, [number, places], false, true, null, false)); }; Functions.prototype.hex2Dec=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Dec", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Dec", 0, [number], false, true, null, false)); }; Functions.prototype.hex2Oct=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Oct", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hex2Oct", 0, [number, places], false, true, null, false)); }; Functions.prototype.hour=function (serialNumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hour", 0, [serialNumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hour", 0, [serialNumber], false, true, null, false)); }; Functions.prototype.hypGeom_Dist=function (sampleS, numberSample, populationS, numberPop, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HypGeom_Dist", 0, [sampleS, numberSample, populationS, numberPop, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "HypGeom_Dist", 0, [sampleS, numberSample, populationS, numberPop, cumulative], false, true, null, false)); }; Functions.prototype.hyperlink=function (linkLocation, friendlyName) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hyperlink", 0, [linkLocation, friendlyName], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Hyperlink", 0, [linkLocation, friendlyName], false, true, null, false)); }; Functions.prototype.iso_Ceiling=function (number, significance) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ISO_Ceiling", 0, [number, significance], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ISO_Ceiling", 0, [number, significance], false, true, null, false)); }; Functions.prototype.if=function (logicalTest, valueIfTrue, valueIfFalse) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "If", 0, [logicalTest, valueIfTrue, valueIfFalse], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "If", 0, [logicalTest, valueIfTrue, valueIfFalse], false, true, null, false)); }; Functions.prototype.imAbs=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImAbs", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImAbs", 0, [inumber], false, true, null, false)); }; Functions.prototype.imArgument=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImArgument", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImArgument", 0, [inumber], false, true, null, false)); }; Functions.prototype.imConjugate=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImConjugate", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImConjugate", 0, [inumber], false, true, null, false)); }; Functions.prototype.imCos=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCos", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCos", 0, [inumber], false, true, null, false)); }; Functions.prototype.imCosh=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCosh", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCosh", 0, [inumber], false, true, null, false)); }; Functions.prototype.imCot=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCot", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCot", 0, [inumber], false, true, null, false)); }; Functions.prototype.imCsc=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCsc", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCsc", 0, [inumber], false, true, null, false)); }; Functions.prototype.imCsch=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCsch", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImCsch", 0, [inumber], false, true, null, false)); }; Functions.prototype.imDiv=function (inumber1, inumber2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImDiv", 0, [inumber1, inumber2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImDiv", 0, [inumber1, inumber2], false, true, null, false)); }; Functions.prototype.imExp=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImExp", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImExp", 0, [inumber], false, true, null, false)); }; Functions.prototype.imLn=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLn", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLn", 0, [inumber], false, true, null, false)); }; Functions.prototype.imLog10=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLog10", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLog10", 0, [inumber], false, true, null, false)); }; Functions.prototype.imLog2=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLog2", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImLog2", 0, [inumber], false, true, null, false)); }; Functions.prototype.imPower=function (inumber, number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImPower", 0, [inumber, number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImPower", 0, [inumber, number], false, true, null, false)); }; Functions.prototype.imProduct=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImProduct", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImProduct", 0, [values], false, true, null, false)); }; Functions.prototype.imReal=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImReal", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImReal", 0, [inumber], false, true, null, false)); }; Functions.prototype.imSec=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSec", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSec", 0, [inumber], false, true, null, false)); }; Functions.prototype.imSech=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSech", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSech", 0, [inumber], false, true, null, false)); }; Functions.prototype.imSin=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSin", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSin", 0, [inumber], false, true, null, false)); }; Functions.prototype.imSinh=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSinh", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSinh", 0, [inumber], false, true, null, false)); }; Functions.prototype.imSqrt=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSqrt", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSqrt", 0, [inumber], false, true, null, false)); }; Functions.prototype.imSub=function (inumber1, inumber2) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSub", 0, [inumber1, inumber2], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSub", 0, [inumber1, inumber2], false, true, null, false)); }; Functions.prototype.imSum=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSum", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImSum", 0, [values], false, true, null, false)); }; Functions.prototype.imTan=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImTan", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ImTan", 0, [inumber], false, true, null, false)); }; Functions.prototype.imaginary=function (inumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Imaginary", 0, [inumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Imaginary", 0, [inumber], false, true, null, false)); }; Functions.prototype.int=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Int", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Int", 0, [number], false, true, null, false)); }; Functions.prototype.intRate=function (settlement, maturity, investment, redemption, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IntRate", 0, [settlement, maturity, investment, redemption, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IntRate", 0, [settlement, maturity, investment, redemption, basis], false, true, null, false)); }; Functions.prototype.ipmt=function (rate, per, nper, pv, fv, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ipmt", 0, [rate, per, nper, pv, fv, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ipmt", 0, [rate, per, nper, pv, fv, type], false, true, null, false)); }; Functions.prototype.irr=function (values, guess) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Irr", 0, [values, guess], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Irr", 0, [values, guess], false, true, null, false)); }; Functions.prototype.isErr=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsErr", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsErr", 0, [value], false, true, null, false)); }; Functions.prototype.isError=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsError", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsError", 0, [value], false, true, null, false)); }; Functions.prototype.isEven=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsEven", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsEven", 0, [number], false, true, null, false)); }; Functions.prototype.isFormula=function (reference) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsFormula", 0, [reference], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsFormula", 0, [reference], false, true, null, false)); }; Functions.prototype.isLogical=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsLogical", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsLogical", 0, [value], false, true, null, false)); }; Functions.prototype.isNA=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNA", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNA", 0, [value], false, true, null, false)); }; Functions.prototype.isNonText=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNonText", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNonText", 0, [value], false, true, null, false)); }; Functions.prototype.isNumber=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNumber", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsNumber", 0, [value], false, true, null, false)); }; Functions.prototype.isOdd=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsOdd", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsOdd", 0, [number], false, true, null, false)); }; Functions.prototype.isText=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsText", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsText", 0, [value], false, true, null, false)); }; Functions.prototype.isoWeekNum=function (date) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsoWeekNum", 0, [date], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "IsoWeekNum", 0, [date], false, true, null, false)); }; Functions.prototype.ispmt=function (rate, per, nper, pv) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ispmt", 0, [rate, per, nper, pv], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ispmt", 0, [rate, per, nper, pv], false, true, null, false)); }; Functions.prototype.isref=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Isref", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Isref", 0, [value], false, true, null, false)); }; Functions.prototype.kurt=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Kurt", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Kurt", 0, [values], false, true, null, false)); }; Functions.prototype.large=function (array, k) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Large", 0, [array, k], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Large", 0, [array, k], false, true, null, false)); }; Functions.prototype.lcm=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lcm", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lcm", 0, [values], false, true, null, false)); }; Functions.prototype.left=function (text, numChars) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Left", 0, [text, numChars], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Left", 0, [text, numChars], false, true, null, false)); }; Functions.prototype.leftb=function (text, numBytes) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Leftb", 0, [text, numBytes], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Leftb", 0, [text, numBytes], false, true, null, false)); }; Functions.prototype.len=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Len", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Len", 0, [text], false, true, null, false)); }; Functions.prototype.lenb=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lenb", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lenb", 0, [text], false, true, null, false)); }; Functions.prototype.ln=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ln", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ln", 0, [number], false, true, null, false)); }; Functions.prototype.log=function (number, base) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Log", 0, [number, base], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Log", 0, [number, base], false, true, null, false)); }; Functions.prototype.log10=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Log10", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Log10", 0, [number], false, true, null, false)); }; Functions.prototype.logNorm_Dist=function (x, mean, standardDev, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "LogNorm_Dist", 0, [x, mean, standardDev, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "LogNorm_Dist", 0, [x, mean, standardDev, cumulative], false, true, null, false)); }; Functions.prototype.logNorm_Inv=function (probability, mean, standardDev) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "LogNorm_Inv", 0, [probability, mean, standardDev], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "LogNorm_Inv", 0, [probability, mean, standardDev], false, true, null, false)); }; Functions.prototype.lookup=function (lookupValue, lookupVector, resultVector) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lookup", 0, [lookupValue, lookupVector, resultVector], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lookup", 0, [lookupValue, lookupVector, resultVector], false, true, null, false)); }; Functions.prototype.lower=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lower", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Lower", 0, [text], false, true, null, false)); }; Functions.prototype.mduration=function (settlement, maturity, coupon, yld, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MDuration", 0, [settlement, maturity, coupon, yld, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MDuration", 0, [settlement, maturity, coupon, yld, frequency, basis], false, true, null, false)); }; Functions.prototype.mirr=function (values, financeRate, reinvestRate) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MIrr", 0, [values, financeRate, reinvestRate], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MIrr", 0, [values, financeRate, reinvestRate], false, true, null, false)); }; Functions.prototype.mround=function (number, multiple) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MRound", 0, [number, multiple], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MRound", 0, [number, multiple], false, true, null, false)); }; Functions.prototype.match=function (lookupValue, lookupArray, matchType) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Match", 0, [lookupValue, lookupArray, matchType], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Match", 0, [lookupValue, lookupArray, matchType], false, true, null, false)); }; Functions.prototype.max=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Max", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Max", 0, [values], false, true, null, false)); }; Functions.prototype.maxA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MaxA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MaxA", 0, [values], false, true, null, false)); }; Functions.prototype.median=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Median", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Median", 0, [values], false, true, null, false)); }; Functions.prototype.mid=function (text, startNum, numChars) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Mid", 0, [text, startNum, numChars], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Mid", 0, [text, startNum, numChars], false, true, null, false)); }; Functions.prototype.midb=function (text, startNum, numBytes) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Midb", 0, [text, startNum, numBytes], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Midb", 0, [text, startNum, numBytes], false, true, null, false)); }; Functions.prototype.min=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Min", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Min", 0, [values], false, true, null, false)); }; Functions.prototype.minA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MinA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MinA", 0, [values], false, true, null, false)); }; Functions.prototype.minute=function (serialNumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Minute", 0, [serialNumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Minute", 0, [serialNumber], false, true, null, false)); }; Functions.prototype.mod=function (number, divisor) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Mod", 0, [number, divisor], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Mod", 0, [number, divisor], false, true, null, false)); }; Functions.prototype.month=function (serialNumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Month", 0, [serialNumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Month", 0, [serialNumber], false, true, null, false)); }; Functions.prototype.multiNomial=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MultiNomial", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "MultiNomial", 0, [values], false, true, null, false)); }; Functions.prototype.n=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "N", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "N", 0, [value], false, true, null, false)); }; Functions.prototype.nper=function (rate, pmt, pv, fv, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NPer", 0, [rate, pmt, pv, fv, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NPer", 0, [rate, pmt, pv, fv, type], false, true, null, false)); }; Functions.prototype.na=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Na", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Na", 0, [], false, true, null, false)); }; Functions.prototype.negBinom_Dist=function (numberF, numberS, probabilityS, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NegBinom_Dist", 0, [numberF, numberS, probabilityS, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NegBinom_Dist", 0, [numberF, numberS, probabilityS, cumulative], false, true, null, false)); }; Functions.prototype.networkDays=function (startDate, endDate, holidays) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NetworkDays", 0, [startDate, endDate, holidays], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NetworkDays", 0, [startDate, endDate, holidays], false, true, null, false)); }; Functions.prototype.networkDays_Intl=function (startDate, endDate, weekend, holidays) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NetworkDays_Intl", 0, [startDate, endDate, weekend, holidays], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NetworkDays_Intl", 0, [startDate, endDate, weekend, holidays], false, true, null, false)); }; Functions.prototype.nominal=function (effectRate, npery) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Nominal", 0, [effectRate, npery], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Nominal", 0, [effectRate, npery], false, true, null, false)); }; Functions.prototype.norm_Dist=function (x, mean, standardDev, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_Dist", 0, [x, mean, standardDev, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_Dist", 0, [x, mean, standardDev, cumulative], false, true, null, false)); }; Functions.prototype.norm_Inv=function (probability, mean, standardDev) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_Inv", 0, [probability, mean, standardDev], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_Inv", 0, [probability, mean, standardDev], false, true, null, false)); }; Functions.prototype.norm_S_Dist=function (z, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_S_Dist", 0, [z, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_S_Dist", 0, [z, cumulative], false, true, null, false)); }; Functions.prototype.norm_S_Inv=function (probability) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_S_Inv", 0, [probability], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Norm_S_Inv", 0, [probability], false, true, null, false)); }; Functions.prototype.not=function (logical) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Not", 0, [logical], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Not", 0, [logical], false, true, null, false)); }; Functions.prototype.now=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Now", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Now", 0, [], false, true, null, false)); }; Functions.prototype.npv=function (rate) { var values=[]; for (var _i=1; _i < arguments.length; _i++) { values[_i - 1]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Npv", 0, [rate, values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Npv", 0, [rate, values], false, true, null, false)); }; Functions.prototype.numberValue=function (text, decimalSeparator, groupSeparator) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NumberValue", 0, [text, decimalSeparator, groupSeparator], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "NumberValue", 0, [text, decimalSeparator, groupSeparator], false, true, null, false)); }; Functions.prototype.oct2Bin=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Bin", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Bin", 0, [number, places], false, true, null, false)); }; Functions.prototype.oct2Dec=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Dec", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Dec", 0, [number], false, true, null, false)); }; Functions.prototype.oct2Hex=function (number, places) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Hex", 0, [number, places], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Oct2Hex", 0, [number, places], false, true, null, false)); }; Functions.prototype.odd=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Odd", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Odd", 0, [number], false, true, null, false)); }; Functions.prototype.oddFPrice=function (settlement, maturity, issue, firstCoupon, rate, yld, redemption, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddFPrice", 0, [settlement, maturity, issue, firstCoupon, rate, yld, redemption, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddFPrice", 0, [settlement, maturity, issue, firstCoupon, rate, yld, redemption, frequency, basis], false, true, null, false)); }; Functions.prototype.oddFYield=function (settlement, maturity, issue, firstCoupon, rate, pr, redemption, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddFYield", 0, [settlement, maturity, issue, firstCoupon, rate, pr, redemption, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddFYield", 0, [settlement, maturity, issue, firstCoupon, rate, pr, redemption, frequency, basis], false, true, null, false)); }; Functions.prototype.oddLPrice=function (settlement, maturity, lastInterest, rate, yld, redemption, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddLPrice", 0, [settlement, maturity, lastInterest, rate, yld, redemption, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddLPrice", 0, [settlement, maturity, lastInterest, rate, yld, redemption, frequency, basis], false, true, null, false)); }; Functions.prototype.oddLYield=function (settlement, maturity, lastInterest, rate, pr, redemption, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddLYield", 0, [settlement, maturity, lastInterest, rate, pr, redemption, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "OddLYield", 0, [settlement, maturity, lastInterest, rate, pr, redemption, frequency, basis], false, true, null, false)); }; Functions.prototype.or=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Or", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Or", 0, [values], false, true, null, false)); }; Functions.prototype.pduration=function (rate, pv, fv) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PDuration", 0, [rate, pv, fv], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PDuration", 0, [rate, pv, fv], false, true, null, false)); }; Functions.prototype.percentRank_Exc=function (array, x, significance) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PercentRank_Exc", 0, [array, x, significance], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PercentRank_Exc", 0, [array, x, significance], false, true, null, false)); }; Functions.prototype.percentRank_Inc=function (array, x, significance) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PercentRank_Inc", 0, [array, x, significance], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PercentRank_Inc", 0, [array, x, significance], false, true, null, false)); }; Functions.prototype.percentile_Exc=function (array, k) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Percentile_Exc", 0, [array, k], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Percentile_Exc", 0, [array, k], false, true, null, false)); }; Functions.prototype.percentile_Inc=function (array, k) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Percentile_Inc", 0, [array, k], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Percentile_Inc", 0, [array, k], false, true, null, false)); }; Functions.prototype.permut=function (number, numberChosen) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Permut", 0, [number, numberChosen], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Permut", 0, [number, numberChosen], false, true, null, false)); }; Functions.prototype.permutationa=function (number, numberChosen) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Permutationa", 0, [number, numberChosen], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Permutationa", 0, [number, numberChosen], false, true, null, false)); }; Functions.prototype.phi=function (x) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Phi", 0, [x], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Phi", 0, [x], false, true, null, false)); }; Functions.prototype.pi=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pi", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pi", 0, [], false, true, null, false)); }; Functions.prototype.pmt=function (rate, nper, pv, fv, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pmt", 0, [rate, nper, pv, fv, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pmt", 0, [rate, nper, pv, fv, type], false, true, null, false)); }; Functions.prototype.poisson_Dist=function (x, mean, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Poisson_Dist", 0, [x, mean, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Poisson_Dist", 0, [x, mean, cumulative], false, true, null, false)); }; Functions.prototype.power=function (number, power) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Power", 0, [number, power], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Power", 0, [number, power], false, true, null, false)); }; Functions.prototype.ppmt=function (rate, per, nper, pv, fv, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ppmt", 0, [rate, per, nper, pv, fv, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Ppmt", 0, [rate, per, nper, pv, fv, type], false, true, null, false)); }; Functions.prototype.price=function (settlement, maturity, rate, yld, redemption, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Price", 0, [settlement, maturity, rate, yld, redemption, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Price", 0, [settlement, maturity, rate, yld, redemption, frequency, basis], false, true, null, false)); }; Functions.prototype.priceDisc=function (settlement, maturity, discount, redemption, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PriceDisc", 0, [settlement, maturity, discount, redemption, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PriceDisc", 0, [settlement, maturity, discount, redemption, basis], false, true, null, false)); }; Functions.prototype.priceMat=function (settlement, maturity, issue, rate, yld, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PriceMat", 0, [settlement, maturity, issue, rate, yld, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "PriceMat", 0, [settlement, maturity, issue, rate, yld, basis], false, true, null, false)); }; Functions.prototype.product=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Product", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Product", 0, [values], false, true, null, false)); }; Functions.prototype.proper=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Proper", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Proper", 0, [text], false, true, null, false)); }; Functions.prototype.pv=function (rate, nper, pmt, fv, type) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pv", 0, [rate, nper, pmt, fv, type], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Pv", 0, [rate, nper, pmt, fv, type], false, true, null, false)); }; Functions.prototype.quartile_Exc=function (array, quart) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quartile_Exc", 0, [array, quart], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quartile_Exc", 0, [array, quart], false, true, null, false)); }; Functions.prototype.quartile_Inc=function (array, quart) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quartile_Inc", 0, [array, quart], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quartile_Inc", 0, [array, quart], false, true, null, false)); }; Functions.prototype.quotient=function (numerator, denominator) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quotient", 0, [numerator, denominator], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Quotient", 0, [numerator, denominator], false, true, null, false)); }; Functions.prototype.radians=function (angle) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Radians", 0, [angle], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Radians", 0, [angle], false, true, null, false)); }; Functions.prototype.rand=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rand", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rand", 0, [], false, true, null, false)); }; Functions.prototype.randBetween=function (bottom, top) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RandBetween", 0, [bottom, top], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RandBetween", 0, [bottom, top], false, true, null, false)); }; Functions.prototype.rank_Avg=function (number, ref, order) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rank_Avg", 0, [number, ref, order], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rank_Avg", 0, [number, ref, order], false, true, null, false)); }; Functions.prototype.rank_Eq=function (number, ref, order) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rank_Eq", 0, [number, ref, order], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rank_Eq", 0, [number, ref, order], false, true, null, false)); }; Functions.prototype.rate=function (nper, pmt, pv, fv, type, guess) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rate", 0, [nper, pmt, pv, fv, type, guess], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rate", 0, [nper, pmt, pv, fv, type, guess], false, true, null, false)); }; Functions.prototype.received=function (settlement, maturity, investment, discount, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Received", 0, [settlement, maturity, investment, discount, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Received", 0, [settlement, maturity, investment, discount, basis], false, true, null, false)); }; Functions.prototype.replace=function (oldText, startNum, numChars, newText) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Replace", 0, [oldText, startNum, numChars, newText], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Replace", 0, [oldText, startNum, numChars, newText], false, true, null, false)); }; Functions.prototype.replaceB=function (oldText, startNum, numBytes, newText) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ReplaceB", 0, [oldText, startNum, numBytes, newText], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "ReplaceB", 0, [oldText, startNum, numBytes, newText], false, true, null, false)); }; Functions.prototype.rept=function (text, numberTimes) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rept", 0, [text, numberTimes], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rept", 0, [text, numberTimes], false, true, null, false)); }; Functions.prototype.right=function (text, numChars) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Right", 0, [text, numChars], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Right", 0, [text, numChars], false, true, null, false)); }; Functions.prototype.rightb=function (text, numBytes) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rightb", 0, [text, numBytes], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rightb", 0, [text, numBytes], false, true, null, false)); }; Functions.prototype.roman=function (number, form) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Roman", 0, [number, form], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Roman", 0, [number, form], false, true, null, false)); }; Functions.prototype.round=function (number, numDigits) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Round", 0, [number, numDigits], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Round", 0, [number, numDigits], false, true, null, false)); }; Functions.prototype.roundDown=function (number, numDigits) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RoundDown", 0, [number, numDigits], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RoundDown", 0, [number, numDigits], false, true, null, false)); }; Functions.prototype.roundUp=function (number, numDigits) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RoundUp", 0, [number, numDigits], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "RoundUp", 0, [number, numDigits], false, true, null, false)); }; Functions.prototype.rows=function (array) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rows", 0, [array], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rows", 0, [array], false, true, null, false)); }; Functions.prototype.rri=function (nper, pv, fv) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rri", 0, [nper, pv, fv], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Rri", 0, [nper, pv, fv], false, true, null, false)); }; Functions.prototype.sec=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sec", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sec", 0, [number], false, true, null, false)); }; Functions.prototype.sech=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sech", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sech", 0, [number], false, true, null, false)); }; Functions.prototype.second=function (serialNumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Second", 0, [serialNumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Second", 0, [serialNumber], false, true, null, false)); }; Functions.prototype.seriesSum=function (x, n, m, coefficients) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SeriesSum", 0, [x, n, m, coefficients], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SeriesSum", 0, [x, n, m, coefficients], false, true, null, false)); }; Functions.prototype.sheet=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sheet", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sheet", 0, [value], false, true, null, false)); }; Functions.prototype.sheets=function (reference) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sheets", 0, [reference], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sheets", 0, [reference], false, true, null, false)); }; Functions.prototype.sign=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sign", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sign", 0, [number], false, true, null, false)); }; Functions.prototype.sin=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sin", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sin", 0, [number], false, true, null, false)); }; Functions.prototype.sinh=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sinh", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sinh", 0, [number], false, true, null, false)); }; Functions.prototype.skew=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Skew", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Skew", 0, [values], false, true, null, false)); }; Functions.prototype.skew_p=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Skew_p", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Skew_p", 0, [values], false, true, null, false)); }; Functions.prototype.sln=function (cost, salvage, life) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sln", 0, [cost, salvage, life], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sln", 0, [cost, salvage, life], false, true, null, false)); }; Functions.prototype.small=function (array, k) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Small", 0, [array, k], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Small", 0, [array, k], false, true, null, false)); }; Functions.prototype.sqrt=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sqrt", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sqrt", 0, [number], false, true, null, false)); }; Functions.prototype.sqrtPi=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SqrtPi", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SqrtPi", 0, [number], false, true, null, false)); }; Functions.prototype.stDevA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDevA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDevA", 0, [values], false, true, null, false)); }; Functions.prototype.stDevPA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDevPA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDevPA", 0, [values], false, true, null, false)); }; Functions.prototype.stDev_P=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDev_P", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDev_P", 0, [values], false, true, null, false)); }; Functions.prototype.stDev_S=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDev_S", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "StDev_S", 0, [values], false, true, null, false)); }; Functions.prototype.standardize=function (x, mean, standardDev) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Standardize", 0, [x, mean, standardDev], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Standardize", 0, [x, mean, standardDev], false, true, null, false)); }; Functions.prototype.substitute=function (text, oldText, newText, instanceNum) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Substitute", 0, [text, oldText, newText, instanceNum], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Substitute", 0, [text, oldText, newText, instanceNum], false, true, null, false)); }; Functions.prototype.subtotal=function (functionNum) { var values=[]; for (var _i=1; _i < arguments.length; _i++) { values[_i - 1]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Subtotal", 0, [functionNum, values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Subtotal", 0, [functionNum, values], false, true, null, false)); }; Functions.prototype.sum=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sum", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Sum", 0, [values], false, true, null, false)); }; Functions.prototype.sumIf=function (range, criteria, sumRange) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumIf", 0, [range, criteria, sumRange], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumIf", 0, [range, criteria, sumRange], false, true, null, false)); }; Functions.prototype.sumIfs=function (sumRange) { var values=[]; for (var _i=1; _i < arguments.length; _i++) { values[_i - 1]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumIfs", 0, [sumRange, values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumIfs", 0, [sumRange, values], false, true, null, false)); }; Functions.prototype.sumSq=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumSq", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "SumSq", 0, [values], false, true, null, false)); }; Functions.prototype.syd=function (cost, salvage, life, per) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Syd", 0, [cost, salvage, life, per], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Syd", 0, [cost, salvage, life, per], false, true, null, false)); }; Functions.prototype.t=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T", 0, [value], false, true, null, false)); }; Functions.prototype.tbillEq=function (settlement, maturity, discount) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillEq", 0, [settlement, maturity, discount], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillEq", 0, [settlement, maturity, discount], false, true, null, false)); }; Functions.prototype.tbillPrice=function (settlement, maturity, discount) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillPrice", 0, [settlement, maturity, discount], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillPrice", 0, [settlement, maturity, discount], false, true, null, false)); }; Functions.prototype.tbillYield=function (settlement, maturity, pr) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillYield", 0, [settlement, maturity, pr], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TBillYield", 0, [settlement, maturity, pr], false, true, null, false)); }; Functions.prototype.t_Dist=function (x, degFreedom, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist", 0, [x, degFreedom, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist", 0, [x, degFreedom, cumulative], false, true, null, false)); }; Functions.prototype.t_Dist_2T=function (x, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist_2T", 0, [x, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist_2T", 0, [x, degFreedom], false, true, null, false)); }; Functions.prototype.t_Dist_RT=function (x, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist_RT", 0, [x, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Dist_RT", 0, [x, degFreedom], false, true, null, false)); }; Functions.prototype.t_Inv=function (probability, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Inv", 0, [probability, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Inv", 0, [probability, degFreedom], false, true, null, false)); }; Functions.prototype.t_Inv_2T=function (probability, degFreedom) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Inv_2T", 0, [probability, degFreedom], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "T_Inv_2T", 0, [probability, degFreedom], false, true, null, false)); }; Functions.prototype.tan=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Tan", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Tan", 0, [number], false, true, null, false)); }; Functions.prototype.tanh=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Tanh", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Tanh", 0, [number], false, true, null, false)); }; Functions.prototype.text=function (value, formatText) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Text", 0, [value, formatText], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Text", 0, [value, formatText], false, true, null, false)); }; Functions.prototype.time=function (hour, minute, second) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Time", 0, [hour, minute, second], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Time", 0, [hour, minute, second], false, true, null, false)); }; Functions.prototype.timevalue=function (timeText) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Timevalue", 0, [timeText], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Timevalue", 0, [timeText], false, true, null, false)); }; Functions.prototype.today=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Today", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Today", 0, [], false, true, null, false)); }; Functions.prototype.trim=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Trim", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Trim", 0, [text], false, true, null, false)); }; Functions.prototype.trimMean=function (array, percent) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TrimMean", 0, [array, percent], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "TrimMean", 0, [array, percent], false, true, null, false)); }; Functions.prototype.true=function () { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "True", 0, [], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "True", 0, [], false, true, null, false)); }; Functions.prototype.trunc=function (number, numDigits) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Trunc", 0, [number, numDigits], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Trunc", 0, [number, numDigits], false, true, null, false)); }; Functions.prototype.type=function (value) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Type", 0, [value], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Type", 0, [value], false, true, null, false)); }; Functions.prototype.usdollar=function (number, decimals) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "USDollar", 0, [number, decimals], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "USDollar", 0, [number, decimals], false, true, null, false)); }; Functions.prototype.unichar=function (number) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Unichar", 0, [number], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Unichar", 0, [number], false, true, null, false)); }; Functions.prototype.unicode=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Unicode", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Unicode", 0, [text], false, true, null, false)); }; Functions.prototype.upper=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Upper", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Upper", 0, [text], false, true, null, false)); }; Functions.prototype.vlookup=function (lookupValue, tableArray, colIndexNum, rangeLookup) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VLookup", 0, [lookupValue, tableArray, colIndexNum, rangeLookup], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VLookup", 0, [lookupValue, tableArray, colIndexNum, rangeLookup], false, true, null, false)); }; Functions.prototype.value=function (text) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Value", 0, [text], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Value", 0, [text], false, true, null, false)); }; Functions.prototype.varA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VarA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VarA", 0, [values], false, true, null, false)); }; Functions.prototype.varPA=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VarPA", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "VarPA", 0, [values], false, true, null, false)); }; Functions.prototype.var_P=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Var_P", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Var_P", 0, [values], false, true, null, false)); }; Functions.prototype.var_S=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Var_S", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Var_S", 0, [values], false, true, null, false)); }; Functions.prototype.vdb=function (cost, salvage, life, startPeriod, endPeriod, factor, noSwitch) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Vdb", 0, [cost, salvage, life, startPeriod, endPeriod, factor, noSwitch], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Vdb", 0, [cost, salvage, life, startPeriod, endPeriod, factor, noSwitch], false, true, null, false)); }; Functions.prototype.weekNum=function (serialNumber, returnType) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WeekNum", 0, [serialNumber, returnType], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WeekNum", 0, [serialNumber, returnType], false, true, null, false)); }; Functions.prototype.weekday=function (serialNumber, returnType) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Weekday", 0, [serialNumber, returnType], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Weekday", 0, [serialNumber, returnType], false, true, null, false)); }; Functions.prototype.weibull_Dist=function (x, alpha, beta, cumulative) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Weibull_Dist", 0, [x, alpha, beta, cumulative], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Weibull_Dist", 0, [x, alpha, beta, cumulative], false, true, null, false)); }; Functions.prototype.workDay=function (startDate, days, holidays) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WorkDay", 0, [startDate, days, holidays], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WorkDay", 0, [startDate, days, holidays], false, true, null, false)); }; Functions.prototype.workDay_Intl=function (startDate, days, weekend, holidays) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WorkDay_Intl", 0, [startDate, days, weekend, holidays], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "WorkDay_Intl", 0, [startDate, days, weekend, holidays], false, true, null, false)); }; Functions.prototype.xirr=function (values, dates, guess) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xirr", 0, [values, dates, guess], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xirr", 0, [values, dates, guess], false, true, null, false)); }; Functions.prototype.xnpv=function (rate, values, dates) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xnpv", 0, [rate, values, dates], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xnpv", 0, [rate, values, dates], false, true, null, false)); }; Functions.prototype.xor=function () { var values=[]; for (var _i=0; _i < arguments.length; _i++) { - values[_i - 0]=arguments[_i]; + values[_i]=arguments[_i]; } - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xor", 0, [values], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Xor", 0, [values], false, true, null, false)); }; Functions.prototype.year=function (serialNumber) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Year", 0, [serialNumber], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Year", 0, [serialNumber], false, true, null, false)); }; Functions.prototype.yearFrac=function (startDate, endDate, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YearFrac", 0, [startDate, endDate, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YearFrac", 0, [startDate, endDate, basis], false, true, null, false)); }; Functions.prototype.yield=function (settlement, maturity, rate, pr, redemption, frequency, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Yield", 0, [settlement, maturity, rate, pr, redemption, frequency, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Yield", 0, [settlement, maturity, rate, pr, redemption, frequency, basis], false, true, null, false)); }; Functions.prototype.yieldDisc=function (settlement, maturity, pr, redemption, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YieldDisc", 0, [settlement, maturity, pr, redemption, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YieldDisc", 0, [settlement, maturity, pr, redemption, basis], false, true, null, false)); }; Functions.prototype.yieldMat=function (settlement, maturity, issue, rate, pr, basis) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YieldMat", 0, [settlement, maturity, issue, rate, pr, basis], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "YieldMat", 0, [settlement, maturity, issue, rate, pr, basis], false, true, null, false)); }; Functions.prototype.z_Test=function (array, x, sigma) { - return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Z_Test", 0, [array, x, sigma], false, true, null)); + return new FunctionResult(this.context, _createMethodObjectPath(this.context, this, "Z_Test", 0, [array, x, sigma], false, true, null, false)); }; Functions.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -21103,8 +24749,12 @@ var Excel; var obj=value; _fixObjectPathIfNecessary(this, obj); }; + Functions.prototype._handleRetrieveResult=function (value, result) { + _super.prototype._handleRetrieveResult.call(this, value, result); + _processRetrieveResult(this, value, result); + }; Functions.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}); }; return Functions; }(OfficeExtension.ClientObject)); @@ -21113,6 +24763,7 @@ var Excel; (function (ErrorCodes) { ErrorCodes.accessDenied="AccessDenied"; ErrorCodes.apiNotFound="ApiNotFound"; + ErrorCodes.conflict="Conflict"; ErrorCodes.generalException="GeneralException"; ErrorCodes.insertDeleteConflict="InsertDeleteConflict"; ErrorCodes.invalidArgument="InvalidArgument"; @@ -21124,7 +24775,10 @@ var Excel; ErrorCodes.itemNotFound="ItemNotFound"; ErrorCodes.notImplemented="NotImplemented"; ErrorCodes.unsupportedOperation="UnsupportedOperation"; + ErrorCodes.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"; })(ErrorCodes=Excel.ErrorCodes || (Excel.ErrorCodes={})); })(Excel || (Excel={})); +OfficeExtension.Utility._doApiNotSupportedCheck=true; + diff --git a/node_modules/@microsoft/office-js/dist/excel-winrt-16.00.js b/node_modules/@microsoft/office-js/dist/excel-winrt-16.00.js index 605d455..7d87698 100644 --- a/node_modules/@microsoft/office-js/dist/excel-winrt-16.00.js +++ b/node_modules/@microsoft/office-js/dist/excel-winrt-16.00.js @@ -1,7 +1,7 @@ /* Excel WinRT-specific API library */ -/* Version: 16.0.8118.3000 */ +/* Version: 16.0.8904.3000 */ -/* Office.js Version: 16.0.8119.1000 */ +/* Office.js Version: 16.0.8916.1000 */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ @@ -18,4 +18,4 @@ * @version 2.3.0 */ -var __extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},OsfMsAjaxFactory,OfficeExt,OSF,OSFWebView,CrossIFrameCommon,WinRT,OSFLog,Logger,OSFAriaLogger,OSFAppTelemetry,OfficeExtension,Excel;(function(n){var t=function(){function t(){}var n=!0;return t.prototype.isMsAjaxLoaded=function(){var t="function",i="undefined";return typeof Sys!==i&&typeof Type!==i&&Sys.StringBuilder&&typeof Sys.StringBuilder===t&&Type.registerNamespace&&typeof Type.registerNamespace===t&&Type.registerClass&&typeof Type.registerClass===t&&typeof Function._validateParams===t&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===t?n:!1},t.prototype.loadMsAjaxFull=function(n){var t=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,n)},Object.defineProperty(t.prototype,"msAjaxError",{get:function(){var n=this;return n._msAjaxError==null&&n.isMsAjaxLoaded()&&(n._msAjaxError=Error),n._msAjaxError},set:function(n){this._msAjaxError=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxString",{get:function(){var n=this;return n._msAjaxString==null&&n.isMsAjaxLoaded()&&(n._msAjaxString=String),n._msAjaxString},set:function(n){this._msAjaxString=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxDebug",{get:function(){var n=this;return n._msAjaxDebug==null&&n.isMsAjaxLoaded()&&(n._msAjaxDebug=Sys.Debug),n._msAjaxDebug},set:function(n){this._msAjaxDebug=n},enumerable:n,configurable:n}),t}();n.MicrosoftAjaxFactory=t})(OfficeExt||(OfficeExt={}));OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory;OSF=OSF||{},function(n){var t=function(){function n(n){this._internalStorage=n}return n.prototype.getItem=function(n){try{return this._internalStorage&&this._internalStorage.getItem(n)}catch(t){return null}},n.prototype.setItem=function(n,t){try{this._internalStorage&&this._internalStorage.setItem(n,t)}catch(i){}},n.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(n){}},n.prototype.removeItem=function(n){try{this._internalStorage&&this._internalStorage.removeItem(n)}catch(t){}},n.prototype.getKeysWithPrefix=function(n){var r=[],u,t,i;try{for(u=this._internalStorage&&this._internalStorage.length||0,t=0;t0?i.push(t):t.tabIndex===0&&r.push(t):r.push(t);return i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;return r===0&&(r=i.indexOf(n)-i.indexOf(t)),r}),[].concat(i,r)}var f="focus",e="on",b="configurable",k="writable",o="enumerable",s="undefined",i=!0,t=!1,c=2147483647,n=null,r=-1,l=r,d="&_xdm_Info=",g="&_serializer_version=",nt="_xdm_",ut="_serializer_version=",a="#",tt="&",h="class",v={},ft=3e4,y=n,p=n,u=(new Date).getTime();return{set_entropy:function(n){var t,r,i;if(typeof n=="string")for(t=0;t1?l[l.length-1]:n,s,h,c,a;return u&&o!=n&&(o.indexOf(tt)>=0&&(o=o.split(tt)[0]),o=decodeURIComponent(o)),s=w(),!f&&s&&(h=window.name.indexOf(i),h>r&&(c=window.name.indexOf(";",h),c==r&&(c=window.name.length),a=window.name.substring(h,c),o?s.setItem(a,o):o=s.getItem(a))),o},getConversationId:function(){var i=window.location.search,t=n,r;return i&&(r=i.indexOf("&"),t=r>0?i.substring(1,r):i.substr(1),t&&t.charAt(t.length-1)==="="&&(t=t.substring(0,t.length-1),t&&(t=decodeURIComponent(t)))),t},getInfoItems:function(n){var t=n.split("$");return typeof t[1]==s&&(t=n.split("|")),typeof t[1]==s&&(t=n.split("%7C")),t},getXdmFieldValue:function(n,t){var r="",u=OSF.OUtil.parseXdmInfo(t),i;if(u&&(i=OSF.OUtil.getInfoItems(u),i!=undefined&&i.length>=3))switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]),f;if(u)throw u;for(f in r)if(u=Function._validateParameter(n[f],r[f],f),u)throw u;},writeProfilerMark:function(n){window.msWriteProfilerMark&&(window.msWriteProfilerMark(n),OsfMsAjaxFactory.msAjaxDebug.trace(n))},outputDebug:function(n){typeof OsfMsAjaxFactory!==s&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){var e,f;r=r||{};for(e in u)f=u[e],r[f]==undefined&&(r[f]=i);return Object.defineProperty(n,t,r),n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[o])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[o])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[k,o,b])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[k,o,b])},finalizeProperties:function(n,r){var e,u;r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8,f=e&255,i[t++]=r>>2,i[t++]=(r&3)<<4|u>>4,i[t++]=(u&15)<<2|f>>6,i[t++]=f&63,isNaN(e)||(r=e>>8,u=s&255,f=s>>8,i[t++]=r>>2,i[t++]=(r&3)<<4|u>>4,i[t++]=(u&15)<<2|f>>6,i[t++]=f&63),isNaN(e)?i[t-1]=64:isNaN(s)&&(i[t-2]=64,i[t-1]=64),h=0;h0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){var u,i,f,r;if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(u=[],i=0;in)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=rt(u),o=e?u.length-1:0,u.length===0)return n;while(!h&&o>=0&&on)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=rt(u),l=y(u,e),s=v(u.length,l,o),s<0)return n;while(!c&&s>=0&&s0;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[r%16],r=Math.floor(r/16);for(;t<32;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[Math.floor(Math.random()*16)];return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];return i?(i.name||(i.name=n[this.errorCodes.ooeInternalError].name),i.message||(i.message=n[this.errorCodes.ooeInternalError].message)):i=n[this.errorCodes.ooeInternalError],i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage}}}}(),function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}(),r,i,h,u,c,l,f,a,e,v,y,p,w,b,o,k,d,g,s,nt,tt,it,rt;n.RequirementVersion=ut;r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){var f,u,e,i,r;if(n==undefined)return!1;if(t==undefined&&(t=0),f=this._setMap,u=f._sets,u.hasOwnProperty(n.toLowerCase())){e=u[n.toLowerCase()];try{if((i=this._getVersion(e),t=t+"",r=this._getVersion(t),i.major>0&&i.major>r.major)||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),i=0,r=0;if(t.length<2&&isNaN(Number(n)))throw u;else if(i=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(i)||isNaN(r))throw u;return{minor:r,major:i}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;h=function(n){function i(){n.call(this,{dialogapi:t})}return __extends(i,n),i}(i);n.DefaultDialogSetRequirement=h;u=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelClientDefaultSetRequirement=u;c=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(u);n.ExcelClientV1DefaultSetRequirement=c;l=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookClientDefaultSetRequirement=l;f=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return __extends(i,n),i}(i);n.WordClientDefaultSetRequirement=f;a=function(n){function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return __extends(i,n),i}(f);n.WordClientV1DefaultSetRequirement=a;e=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointClientDefaultSetRequirement=e;v=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(e);n.PowerpointClientV1DefaultSetRequirement=v;y=function(n){function i(){n.call(this,{selection:t,textcoercion:t})}return __extends(i,n),i}(i);n.ProjectClientDefaultSetRequirement=y;p=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return __extends(i,n),i}(i);n.ExcelWebDefaultSetRequirement=p;w=function(n){function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordWebDefaultSetRequirement=w;b=function(n){function i(){n.call(this,{activeview:t,settings:t})}return __extends(i,n),i}(i);n.PowerpointWebDefaultSetRequirement=b;o=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookWebDefaultSetRequirement=o;k=function(n){function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.SwayWebDefaultSetRequirement=k;d=function(n){function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return __extends(i,n),i}(i);n.AccessWebDefaultSetRequirement=d;g=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelIOSDefaultSetRequirement=g;s=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordIOSDefaultSetRequirement=s;nt=function(n){function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return __extends(t,n),t}(s);n.WordIOSV1DefaultSetRequirement=nt;tt=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointIOSDefaultSetRequirement=tt;it=function(n){function i(){n.call(this,{mailbox:t})}return __extends(i,n),i}(i);n.OutlookIOSDefaultSetRequirement=it;rt=function(){function n(){}var t="undefined";return n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},n.getDefaultRequirementMatrix=function(u){var f,e,s,o;return this.initializeDefaultSetMatrix(),f=undefined,e=u.get_requirementMatrix(),e!=undefined&&e.length>0&&typeof JSON!==t?(s=JSON.parse(u.get_requirementMatrix().toLowerCase()),f=new r(new i(s))):(o=n.getClientFullVersionString(u),f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[o]!=undefined?new r(n.DefaultSetArrayMatrix[o]):new r(new i({}))),f},n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix(),e;return f!=undefined&&f.length>0&&typeof JSON!==t?(e=JSON.parse(n.get_requirementMatrix().toLowerCase()),u=new r(new i(e))):u=new r(new h),u},n.getClientFullVersionString=function(n){var i=n.get_appMinorVersion(),u="",r="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;return f&&n.get_appVersion()==1?r=t==4096&&i>=15?"16.00.01":"16.00":n.get_appName()==64?r=n.get_appVersion():(u=i<10?"0"+i:""+i,r=n.get_appVersion()+"."+u),n.get_appName()+"-"+r},n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new c;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new v;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new l;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new w;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new b;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new g;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new k;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new nt;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new tt;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new it},n.Excel_RCLIENT_1600="1-16.00",n.Excel_RCLIENT_1601="1-16.01",n.Word_RCLIENT_1600="2-16.00",n.Word_RCLIENT_1601="2-16.01",n.PowerPoint_RCLIENT_1600="4-16.00",n.PowerPoint_RCLIENT_1601="4-16.01",n.Outlook_RCLIENT_1600="8-16.00",n.Excel_WAC_1600="16-16.00",n.Word_WAC_1600="32-16.00",n.Outlook_WAC_1600="64-16.00",n.Outlook_WAC_1601="64-16.01",n.Project_RCLIENT_1600="128-16.00",n.Access_WAC_1600="256-16.00",n.PowerPoint_WAC_1600="512-16.00",n.Excel_IOS_1600="1024-16.00",n.SWAY_WAC_1600="2048-16.00",n.Word_IOS_1600="4096-16.00",n.Word_IOS_16001="4096-16.00.01",n.PowerPoint_IOS_1600="8192-16.00",n.Outlook_IOS_1600="65536-16.00",n.DefaultSetArrayMatrix={},n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))}(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}return n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n},n.getInstance=function(){return n.hostObj===undefined&&(n.hostObj=new n),n.hostObj},n.prototype.getPlatform=function(){var n=this,t;return n.hostInfo.hostPlatform&&(t=n.hostInfo.hostPlatform.toLowerCase(),n.platformRemappings[t])?n.platformRemappings[t]:null},n.prototype.getHost=function(){var n=this,t;if(n.hostInfo.hostType){if(t=n.hostInfo.hostType.toLowerCase(),n.camelCaseMappings[t])return n.camelCaseMappings[t];if(t=n.capitalizeFirstLetter(n.hostInfo.hostType),Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null},n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null},n}();n.Host=t})(t=n.HostName||(n.HostName={}))}(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){n||(window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,n=!0)},disableShortcut:function(){n&&(t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window),n=!1)}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i,r,o,u,f,e;if(n&&typeof n=="string"&&(r=n.indexOf("#"),r!=-1)){o=n.substring(0,r);u=n.substring(r+1);switch(o){case"binding":case"bindings":u&&(i=new OSF.DDA.BindingPromise(u))}}if(i)return i.onFail=t,i;else if(t)if(f=typeof t,f=="function")e={},e[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(e,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext));else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f);};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this,s,e;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.auth&&OSF.OUtil.defineEnumerableProperty(f,"auth",{value:n.auth});n.get_isDialog()?(e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e})):(t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t}),r&&(s=r.displayName||"appOM",delete r.displayName,OSF.OUtil.defineEnumerableProperty(f,s,{value:r})),u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}}),e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e}))};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this,u;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;return OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext()),n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,e=n.length,o=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){var u,i,r;for(u in n){if(i=n[u],r=t[u],i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw o();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw o();}};f.extractRequiredArguments=function(t,i,r){var f,u,h,s,c,l;if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(c=n.length-1;c>=s;c--){l=n[c];switch(typeof l){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=l;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}if(f=o.fillOptions(f,i,r,u),e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;return o.verifyArguments(t,f),f}var h="function",s=n.length,o=new OSF.DDA.ApiMethodCall(n,t,i,f,e);this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),u=c(n,r,t,i);return o.constructCallArgs(r,u,t,i)};this.processResponse=function(n,t,i,f){return n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n)};this.getCallArgs=function(n){for(var t,u,r,i=n.length-1;i>=s;i--){r=n[i];switch(typeof r){case"object":t=r;break;case h:u=r}}return t=t||{},u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u),t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],i=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],t,i,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback],u,r;f&&(u={},u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?u[OSF.DDA.AsyncResultEnum.Properties.Value]=i:(r={},i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i),f(new OSF.DDA.AsyncResult(u,r)))};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.SyncMethodNames[t]=i};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){function o(n,i,r,u){var o,c,s,h;if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(s=n.length-1;s>=e;s--){h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}return o=f.fillOptions(o,i,r,u),f.verifyArguments(t,o),o}var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),u=o(n,r,t,i);return f.constructCallArgs(r,u,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){function e(i,f){var a=i?{}:undefined,s,h,o,v,c,l;for(s in i){if(h=i[s],OSF.DDA.ListType.isListType(s)){o=[];for(v in h)o.push(e(h[v],f))}else OSF.OUtil.listContainsKey(r,s)?o=r[s][f](h):f==u&&n.preserveNesting(s)?o=e(h,f):(c=t[s],c?(l=c[f],l&&(o=l[h],o===undefined&&(o=h))):o=h);a[s]=o}return a}function l(i,r){var e,u,h,s;for(u in r)h=n.isComplexType(u)?l(i,t[u][o]):i[u],h!=undefined&&(e||(e={}),s=r[u],s==f&&(s=u),e[s]=n.pack(u,h));return e}function s(i,r,e){var o,a,h,l,p,v,y;e||(e={});for(o in r){if(a=r[o],a==f)h=i;else if(a==c){e[o]=i.toArray();continue}else h=i[a];if(h===null||h===undefined)e[o]=undefined;else if(h=n.unpack(o,h),n.isComplexType(o))l=t[o][u],n.preserveNesting(o)?e[o]=s(h,l):s(h,l,e);else if(OSF.DDA.ListType.isListType(o)){l={};p=OSF.DDA.ListType.getDescriptor(o);l[p]=f;v=new Array(h.length);for(y in h)v[y]=s(h[y],l);e[o]=v}else e[o]=h}return e}function a(n,i,r){var f=t[n][r],u,o,c;return r=="toHost"?(o=e(i,r),u=l(o,f)):r==h&&(c=s(i,f),u=e(c,r)),u}var h="fromHost",i=this,o="toHost",u=h,c="sourceData",f="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];t||(t={});i.addMapping=function(n,i){var e,h,c,l,r,s,a,v;if(i.map){e=i.map;h={};for(c in e)l=e[c],l==f&&(l=c),h[l]=c}else e=i.toHost,h=i.fromHost;if(r=t[n],r){s=r[o];for(a in s)e[a]=s[a];s=r[u];for(v in s)h[v]=s[v]}else r=t[n]={};r[o]=e;r[u]=h};i.toHost=function(n,t){return a(n,t,o)};i.fromHost=function(n,t){return a(n,t,u)};i.self=f;i.sourceData=c;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){return this.isDynamicType(n)?t[n].toHost(i):i};i.unpack=function(n,i){return this.isDynamicType(n)?t[n].fromHost(i):i}};OSF.DDA.getDecoratedParameterMap=function(n,t){function r(n){var i=null,r,t;if(n)for(i={},r=n.length,t=0;t0){for(r=[],i=0;i=s)break;if(f=Function._validateParameter(n[e],o,h),f)return f.popStackFrame(),f}return t}),Function._validateParameterCount||(Function._validateParameterCount=function(n,r,u){var f,s,e=r.length,h=n.length,c,l,a;if(he)for(s=i,f=0;f0&&t.push(u)}}catch(s){}return t}var i=[],t={};t[Microsoft.Office.WebExtension.Parameters.Data]=function(){var t=0,i=1;return{toHost:function(n){if(OSF.DDA.TableDataProperties&&typeof n!="string"&&n[OSF.DDA.TableDataProperties.TableRows]!==undefined){var r=[];r[t]=n[OSF.DDA.TableDataProperties.TableRows];r[i]=n[OSF.DDA.TableDataProperties.TableHeaders];n=r}return n},fromHost:function(r){var f,e,u;return r.toArray?(e=r.dimensions(),e===2?f=n(r):(u=r.toArray(),u.length===2&&(u[0]!=null&&u[0].toArray||u[1]!=null&&u[1].toArray)?(f={},f[OSF.DDA.TableDataProperties.TableRows]=n(u[t]),f[OSF.DDA.TableDataProperties.TableHeaders]=n(u[i])):f=u)):f=r,f}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,i,t);this.unpack=function(n,i){var r,u;return this.isComplexType(n)||OSF.DDA.ListType.isListType(n)?(u=(i||typeof i=="unknown")&&i.toArray,r=u?i.toArray():i||{}):r=this.isDynamicType(n)?t[n].fromHost(i):i,r}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(n){function t(n){var i=n,f,r,u;if(OSF.OUtil.isArray(n))for(f=i.length,r=0;r2)for(u=[],o=1;o=2&&(u=t[0],i=t[1]),r?r(new n.WebViewSafeArray(i)):void 0};this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.Execute,f,e)},t.prototype.registerEvent=function(t,i,r,u){var f=function(t){var i=t,u=0;OSF.OUtil.isArray(t)&&t.length>=2&&(u=t[0],i=t[1]);r&&r(u,new n.WebViewSafeArray(i))},e=function(t){if(u)return u(new n.WebViewSafeArray(t))};this.hostScriptProxy.registerEvent(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.RegisterEvent,t,i,f,e)},t.prototype.unregisterEvent=function(t,i,r){var u=function(t){return r(new n.WebViewSafeArray(t))};this.hostScriptProxy.unregisterEvent(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.UnregisterEvent,t,i,u)},t.prototype.messageParent=function(n){var t=n[Microsoft.Office.WebExtension.Parameters.MessageToParent];!isNaN(parseFloat(t))&&isFinite(t)&&(t=t.toString());this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.MessageParent,t,null)},t.prototype.openDialog=function(n,t,i,r){var u=JSON.parse(t);(isNaN(u.width)||u.width<=0||u.width>100)&&(u.width=99);(isNaN(u.height)||u.height<=0||u.height>100)&&(u.height=99);t=JSON.stringify(u);this.registerEvent(n,t,i,r)},t.prototype.closeDialog=function(n,t,i){this.unregisterEvent(n,t,i)},t.prototype.sendMessage=function(n){var t=n[Microsoft.Office.WebExtension.Parameters.MessageContent];!isNaN(parseFloat(t))&&isFinite(t)&&(t=t.toString());this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.SendMessage,t,null)},t}();n.WebViewHostController=t}(OSFWebView||(OSFWebView={})),function(n){(function(n){var t="EventCallback",i="MethodCallback";n[n[i]=0]=i;n[n[t]=1]=t})(n.CallbackType||(n.CallbackType={}));var i=n.CallbackType,t=function(){function n(n,t,i){this.callbackType=n;this.callbackId=t;this.params=i}return n}();n.CallbackData=t}(CrossIFrameCommon||(CrossIFrameCommon={})),function(n){var t=function(){function n(){window.addEventListener("message",this.OnReceiveMessage)}return n.prototype.postMessage=function(n,t){window.parent.postMessage(t,"*")},n.prototype.OnReceiveMessage=function(n){if(n.source==window.parent&&window.parent==window.top&&n.origin.startsWith("ms-appx-web://")){var t;try{t=JSON.parse(n.data)}catch(i){return}switch(t.callbackType){case CrossIFrameCommon.CallbackType.MethodCallback:OSFWebView.ScriptMessaging.agaveHostCallback(t.callbackId,JSON.parse(t.params));break;case CrossIFrameCommon.CallbackType.EventCallback:OSFWebView.ScriptMessaging.agaveHostEventCallback(t.callbackId,JSON.parse(t.params))}}},n}();n.Poster=t}(WinRT||(WinRT={}));OSF.DDA.ClientSettingsManager={getSettingsExecuteMethod:function(n){return function(t){var i,r,u=function(n,i){t.onReceiving&&t.onReceiving();t.onComplete&&t.onComplete(n,i)};try{n(t.hostCallArgs,t.onCalling,u)}catch(f){i=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;r={name:Strings.OfficeOM.L_InternalError,message:f};u(i,r)}}},read:function(n,t){var u=[],f=[],i,r;n&&n();i=OSF._OfficeAppFactory.getInitializationHelper();r=function(n){t&&t(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,n.get_settings())};i.getAppContext(null,r)},write:function(n,t,i,r){var u={},e=[],o=[],f,s;for(f in n)e.push(f),o.push(n[f]);u.keys=e;u.values=o;i&&i();s=function(n){r&&r(n[0],null)};OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.WriteSettings,u,s)}};OSF.InitializationHelper.prototype.initializeSettings=function(n,t){var i=n.get_settings();return this.deserializeSettings(i,t)};OSF.InitializationHelper.prototype.getAppContext=function(n,t){var r=function(n){var f,i=OSF.WebView.AppContextProperties,e=n[i.AppType],o=!1;for(var l in OSF.AppName)if(OSF.AppName[l]==e){o=!0;break}if(!o)throw"Unsupported client type "+e;for(var s=n[i.Settings],h={},c=s[0],a=s[1],r=0;r40)&&(n=OSF.OUtil.Guid.generateNewGuid(),t.setValue(t.clientIDKey,n)),n},n.prototype.saveLog=function(n,t){var i=this,u=i.getValue(i.logIdSetKey);u=(u&&u.length>0?u+";":r)+n;i.setValue(i.logIdSetKey,u);i.setValue(n,t)},n.prototype.enumerateLog=function(n,t){var i=this,e=i.getValue(i.logIdSetKey),u,o,r,f;if(e){u=e.split(";");for(o in u)r=u[o],f=i.getValue(r),f&&(n&&n(r,f),t&&i.remove(r));t&&i.remove(i.logIdSetKey)}},n.prototype.getValue=function(n){var t=OSF.OUtil.getLocalStorage(),i=r;return t&&(i=t.getItem(n)),i},n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)},n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}},n}(),o=function(){function n(){}return n.prototype.LogData=function(n){OSF.Logger&&(OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n.SerializeRow(),OSF.Logger.SendFlag.none),OSFAriaLogger.AriaLogger.getInstance().logData(n))},n.prototype.LogRawData=function(n){if(OSF.Logger){OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n,OSF.Logger.SendFlag.none);try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(n))}catch(t){}}},n}();n.initialize=v;n.onAppActivated=y;n.onScriptDone=p;n.onCallDone=w;n.onMethodDone=b;n.onPropertyDone=k;n.onEventDone=d;n.onRegisterDone=g;n.onAppClosed=nt;n.setOsfControlAppCorrelationId=tt;n.doAppInitializationLogging=c;n.logAppCommonMessage=it;n.logAppException=rt;OSF.AppTelemetry=n}(OSFAppTelemetry||(OSFAppTelemetry={}));Microsoft.Office.WebExtension.TableData=function(n,t){function i(n){if(n==null||n==undefined)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(n,2);t<2;t++)n=[n];return n}catch(i){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(n){t=i(n)}},rows:{get:function(){return n},set:function(t){n=t==null||OSF.OUtil.isArray(t)&&t.length==0?[]:i(t)}}});this.headers=t;this.rows=n};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(n){return new Microsoft.Office.WebExtension.TableData(n[OSF.DDA.TableDataProperties.TableRows],n[OSF.DDA.TableDataProperties.TableHeaders])};Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var n=null;return{findArrayDimensionality:function(n){if(OSF.OUtil.isArray(n)){for(var t=0,i=0;i6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix&&(i=new Date(parseInt(t.slice(5,-1))),i)?i:t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,!0);r[i]=t}catch(u){}}return r}};OSF.DDA.Settings=function(n){var t="name",i;n=n||{};i=function(n){var i=OSF.OUtil.getSessionStorage(),t,r;i&&(t=OSF.DDA.SettingsManager.serializeSettings(n),r=JSON?JSON.stringify(t):Sys.Serialization.JavaScriptSerializer.serialize(t),i.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),r))};OSF.OUtil.defineEnumerableProperties(this,{get:{value:function(i){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]),r;if(u)throw u;return r=n[i],typeof r=="undefined"?null:r}},set:{value:function(r,u){var f=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1},{name:"value",mayBeNull:!0}]);if(f)throw f;n[r]=u;i(n)}},remove:{value:function(r){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]);if(u)throw u;delete n[r];i(n)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],n)};OSF.DDA.RefreshableSettings=function(n){OSF.DDA.RefreshableSettings.uber.constructor.call(this,n);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],n);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(n){var i=this,r,t,u;i._eventHandlers={};i._objectEventHandlers={};i._queuedEventsArgs={};for(r in n)t=n[r],u=t=="objectDeleted"||t=="objectSelectionChanged"||t=="objectDataChanged"||t=="contentControlAdded",u?i._objectEventHandlers[t]={}:i._eventHandlers[t]=[],i._queuedEventsArgs[t]=[]};OSF.EventDispatch.prototype={getSupportedEvents:function(){var n=[];for(var t in this._eventHandlers)n.push(t);for(t in this._objectEventHandlers)n.push(t);return n},supportsEvent:function(n){for(var t in this._eventHandlers)if(n==t)return!0;for(t in this._objectEventHandlers)if(n==t)return!0;return!1},hasEventHandler:function(n,t){var i=this._eventHandlers[n],r;if(i&&i.length>0)for(r in i)if(i[r]===t)return!0;return!1},hasObjectEventHandler:function(n,t,i){var f=this._objectEventHandlers[n],r,u;if(f!=null)for(r=f[t],u=0;r!=null&&u0)for(r=0;r0?(this._eventHandlers[n]=[],!0):!1},clearObjectEventHandlers:function(n,t){return this._objectEventHandlers[n]!=null&&this._objectEventHandlers[n][t]!=null?(this._objectEventHandlers[n][t]=[],!0):!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},getObjectEventHandlerCount:function(n,t){return this._objectEventHandlers[n]==null||this._objectEventHandlers[n][t]==null?0:this._objectEventHandlers[n][t].length},fireEvent:function(n){var t,i,r;if(n.type==undefined)return!1;if(t=n.type,t&&this._eventHandlers[t]){i=this._eventHandlers[t];for(r in i)i[r](n);return!0}else return!1},fireObjectEvent:function(n,t){var i,f,r,u;if(t.type==undefined)return!1;if(i=t.type,i&&this._objectEventHandlers[i]&&(f=this._objectEventHandlers[i],r=f[n],r!=null)){for(u=0;u0)){for(r=t[0];i.length>0;)u=i.shift(),r(u);return!0}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var f="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(n,i[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]=="outlook"||OSF._OfficeAppFactory.getHostInfo()[f]=="outlookwebapp")r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i),t.initialize(r.initialData),t.setCurrentItemNumber(r.itemNumber.itemNumber);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:n}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(n,t){return t}}],onSucceeded:function(n,t,i){var f=n[OSF.DDA.SettingsManager.SerializedSettings],u=OSF.DDA.SettingsManager.deserializeSettings(f),e=i[OSF.DDA.SettingsManager.RefreshingSettings];for(var r in e)t.remove(r);for(r in u)t.set(r,u[r]);return t}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(n,t){return OSF.DDA.SettingsManager.serializeSettings(t)}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});Microsoft.Office.WebExtension.BindingType={Table:"table",Text:"text",Matrix:"matrix"};OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType};OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{BindingList:"BindingList"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{Subset:"subset",BindingProperties:"BindingProperties"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList,OSF.DDA.PropertyDescriptors.BindingProperties);OSF.DDA.BindingPromise=function(n,t){this._id=n;OSF.OUtil.defineEnumerableProperty(this,"onFail",{get:function(){return t},set:function(n){var i=typeof n;if(i!="undefined"&&i!="function")throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,i);t=n}})};OSF.DDA.BindingPromise.prototype={_fetch:function(n){var t=this,i;return t.binding?n&&n(t.binding):t._binding||(i=t,Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(t._id,function(t){t.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded?(OSF.OUtil.defineEnumerableProperty(i,"binding",{value:t.value}),n&&n(i.binding)):i.onFail&&i.onFail(t)})),t},getDataAsync:function(){var n=arguments;return this._fetch(function(t){t.getDataAsync.apply(t,n)}),this},setDataAsync:function(){var n=arguments;return this._fetch(function(t){t.setDataAsync.apply(t,n)}),this},addHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.addHandlerAsync.apply(t,n)}),this},removeHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.removeHandlerAsync.apply(t,n)}),this}};OSF.DDA.BindingFacade=function(n){this._eventDispatches=[];OSF.OUtil.defineEnumerableProperty(this,"document",{value:n});var t=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[t.AddFromSelectionAsync,t.AddFromNamedItemAsync,t.GetAllAsync,t.GetByIdAsync,t.ReleaseByIdAsync])};OSF.DDA.UnknownBinding=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}})};OSF.DDA.Binding=function(n,t){var r,u,i,f;OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}});r=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[r.GetDataAsync,r.SetDataAsync]);u=Microsoft.Office.WebExtension.EventType;i=t.bindings._eventDispatches;i[n]||(i[n]=new OSF.EventDispatch([u.BindingSelectionChanged,u.BindingDataChanged]));f=i[n];OSF.DDA.DispIdHost.addEventSupport(this,f)};OSF.DDA.generateBindingId=function(){return"UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+(new Date).getTime()};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureBinding=function(n,t){var r=n[OSF.DDA.BindingProperties.Id],u=n[OSF.DDA.BindingProperties.RowCount],f=n[OSF.DDA.BindingProperties.ColumnCount],s=n[OSF.DDA.BindingProperties.HasHeaders],i,e,o;switch(n[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:i=new OSF.DDA.TextBinding(r,t);break;case Microsoft.Office.WebExtension.BindingType.Matrix:i=new OSF.DDA.MatrixBinding(r,t,u,f);break;case Microsoft.Office.WebExtension.BindingType.Table:e=function(){return OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument};o=e()&&OSF.DDA.ExcelTableBinding?OSF.DDA.ExcelTableBinding:OSF.DDA.TableBinding;i=new o(r,t,u,f,s);break;default:i=new OSF.DDA.UnknownBinding(r,t)}return i};OSF.DDA.AsyncMethodNames.addNames({AddFromSelectionAsync:"addFromSelectionAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:"getByIdAsync",ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync"}),function(){function u(n){return OSF.DDA.OMFactory.manufactureBinding(n,Microsoft.Office.WebExtension.context.document)}function f(n){return n.id}function e(n,t,i){var u=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&u&&(u[OSF.DDA.TableDataProperties.TableRows]!=undefined||u[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(u=OSF.DDA.OMFactory.manufactureTableData(u)),u=OSF.DDA.DataCoercion.coerceData(u,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),u==undefined?r:u}var t="number",i="object",n="string",r=null;OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:[n]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return!0}}],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.BindingList],u)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n,t,i){var r=i[Microsoft.Office.WebExtension.Parameters.Id];delete t._eventDispatches[r]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n,t){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&n[Microsoft.Office.WebExtension.Parameters.RowCount]==0&&n[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn],delete n[Microsoft.Office.WebExtension.Parameters.RowCount],delete n[Microsoft.Office.WebExtension.Parameters.ColumnCount]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]||n[Microsoft.Office.WebExtension.Parameters.RowCount]||n[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[n,i,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}]})}();OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.MatrixBinding=function(n,t,i,r){OSF.DDA.MatrixBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Matrix},rowCount:{value:i?i:0},columnCount:{value:r?r:0}})};OSF.OUtil.extend(OSF.DDA.MatrixBinding,OSF.DDA.Binding);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.BindingProperties,fromHost:[{name:OSF.DDA.BindingProperties.Id,value:0},{name:OSF.DDA.BindingProperties.Type,value:1},{name:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,value:2}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.BindingType,toHost:[{name:Microsoft.Office.WebExtension.BindingType.Text,value:0},{name:Microsoft.Office.WebExtension.BindingType.Matrix,value:1},{name:Microsoft.Office.WebExtension.BindingType.Table,value:2}],invertible:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,value:0},{name:Microsoft.Office.WebExtension.Parameters.Id,value:1},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:2},{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseBindingMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAllBindingsMethod,fromHost:[{name:OSF.DDA.ListDescriptors.BindingList,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:2},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:3},{name:OSF.DDA.PropertyDescriptors.Subset,value:4}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.Data,value:2},{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,fromHost:[{name:OSF.DDA.BindingProperties.RowCount,value:0},{name:OSF.DDA.BindingProperties.ColumnCount,value:1},{name:OSF.DDA.BindingProperties.HasHeaders,value:2}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.Subset,toHost:[{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:0},{name:OSF.DDA.SafeArray.UniqueArguments.Run,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Offset,toHost:[{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:0},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Run,toHost:[{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:0},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddColumnsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearAllRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{TableDataProperties:"TableDataProperties"});OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};OSF.DDA.TableBinding=function(n,t,i,r,u){OSF.DDA.TableBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:i?i:0},columnCount:{value:r?r:0},hasHeaders:{value:u?u:!1}});var f=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[f.AddRowsAsync,f.AddColumnsAsync,f.DeleteAllDataValuesAsync])};OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync"}),function(){function n(n){return n.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]})}();OSF.DDA.TextBinding=function(n,t){OSF.DDA.TextBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperty(this,"type",{value:Microsoft.Office.WebExtension.BindingType.Text})};OSF.OUtil.extend(OSF.DDA.TextBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddFromPromptAsync:"addFromPromptAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromPromptAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:["string"],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.PromptText,value:{types:["string"],calculate:function(){return Strings.OfficeOM.L_AddBindingFromPromptDefaultText}}},{name:Microsoft.Office.WebExtension.Parameters.SampleData,value:{types:["object"],defaultValue:null}}],privateStateCallbacks:[],onSucceeded:function(n){return OSF.DDA.OMFactory.manufactureBinding(n,Microsoft.Office.WebExtension.context.document)}});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromPromptMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:1},{name:Microsoft.Office.WebExtension.Parameters.PromptText,value:2}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"});OSF.DDA.DocumentSelectionChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:n}})};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDeleted:"objectDeleted"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectSelectionChanged:"objectSelectionChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDataChanged:"objectDataChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ContentControlAdded:"contentControlAdded"});OSF.DDA.ObjectEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:n},object:{value:t}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDeletedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDataChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidContentControlAddedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{BindingSelectionChanged:"bindingSelectionChanged",BindingDataChanged:"bindingDataChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{BindingSelectionChangedEvent:"BindingSelectionChangedEvent"});OSF.DDA.BindingSelectionChangedEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingSelectionChanged},binding:{value:n}});for(var i in t)OSF.OUtil.defineEnumerableProperty(this,i,{value:t[i]})};OSF.DDA.BindingDataChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingDataChanged},binding:{value:n}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:0},{name:OSF.DDA.PropertyDescriptors.Subset,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingDataChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FilterType,{OnlyVisible:"onlyVisible"});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.OnlyVisible,value:1}]});Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"};Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"};Microsoft.Office.WebExtension.Index={First:"first",Last:"last",Next:"next",Previous:"previous"};OSF.DDA.AsyncMethodNames.addNames({GoToByIdAsync:"goToByIdAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GoToByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string","number"]},{name:Microsoft.Office.WebExtension.Parameters.GoToType,"enum":Microsoft.Office.WebExtension.GoToType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:{"enum":Microsoft.Office.WebExtension.SelectionMode,defaultValue:Microsoft.Office.WebExtension.SelectionMode.Default}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:0},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:1},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:2},{name:Microsoft.Office.WebExtension.GoToType.Index,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:0},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:1},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:1},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:2}]});OSF.DDA.AsyncMethodNames.addNames({ExecuteRichApiRequestAsync:"executeRichApiRequestAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[]});OSF.OUtil.setNamespace("RichApi",OSF.DDA);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidExecuteRichApiRequestMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(n){OSF.OUtil.defineEnumerableProperties(this,{url:{value:n[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(n){return new Microsoft.Office.WebExtension.FileProperties(n)}});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,fromHost:[{name:OSF.DDA.FilePropertiesDescriptor.Url,value:0}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.ExcelTableBinding=function(n,t,i,r,u){var f=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[f.ClearFormatsAsync,f.SetTableOptionsAsync,f.SetFormatsAsync]);OSF.DDA.ExcelTableBinding.uber.constructor.call(this,n,t,i,r,u);OSF.OUtil.finalizeProperties(this)};OSF.OUtil.extend(OSF.DDA.ExcelTableBinding,OSF.DDA.TableBinding),function(){var t="number",n="object",i="string";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[i,n,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:[n],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:[n],defaultValue:[]}}],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[i,n,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[n,i],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[n],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:[n],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:[n],defaultValue:[]}}],checkCallArgs:function(n,t){var i=Microsoft.Office.WebExtension.Parameters;if(n[i.StartRow]==0&&n[i.StartColumn]==0&&OSF.OUtil.isArray(n[i.CellFormat])&&n[i.CellFormat].length===0&&OSF.OUtil.isArray(n[i.TableOptions])&&n[i.TableOptions].length===0&&(delete n[i.StartRow],delete n[i.StartColumn],delete n[i.CellFormat],delete n[i.TableOptions]),n[i.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[i.StartRow]&&n[i.StartRow]!=0||n[i.StartColumn]&&n[i.StartColumn]!=0||n[i.CellFormat]||n[i.TableOptions]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:function(n){return n.id}}]});OSF.DDA.BindingPromise.prototype.setTableOptionsAsync=function(){var n=arguments;return this._fetch(function(t){t.setTableOptionsAsync.apply(t,n)}),this};OSF.DDA.BindingPromise.prototype.setFormatsAsync=function(){var n=arguments;return this._fetch(function(t){t.setFormatsAsync.apply(t,n)}),this};OSF.DDA.BindingPromise.prototype.clearFormatsAsync=function(){var n=arguments;return this._fetch(function(t){t.clearFormatsAsync.apply(t,n)}),this}}(),function(){function n(n){return n.id}OSF.DDA.AsyncMethodNames.addNames({ClearFormatsAsync:"clearFormatsAsync",SetTableOptionsAsync:"setTableOptionsAsync",SetFormatsAsync:"setFormatsAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ClearFormatsAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetTableOptionsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TableOptions,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetFormatsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CellFormat,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]})}();Microsoft.Office.WebExtension.Table={All:0,Data:1,Headers:2},function(){var u="undefined",e="auto fit",o="distributed",f="none";OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearFormatsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetTableOptionsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetFormatsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:2},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.Data,value:2},{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:3},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:4},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:5}]});var s={headerRow:0,bandedRows:1,firstColumn:2,lastColumn:3,bandedColumns:4,filterButton:5,style:6,totalRow:7},h={row:0,column:1},t={alignHorizontal:{text:"alignHorizontal",type:1},alignVertical:{text:"alignVertical",type:2},backgroundColor:{text:"backgroundColor",type:101},borderStyle:{text:"borderStyle",type:201},borderColor:{text:"borderColor",type:202},borderTopStyle:{text:"borderTopStyle",type:203},borderTopColor:{text:"borderTopColor",type:204},borderBottomStyle:{text:"borderBottomStyle",type:205},borderBottomColor:{text:"borderBottomColor",type:206},borderLeftStyle:{text:"borderLeftStyle",type:207},borderLeftColor:{text:"borderLeftColor",type:208},borderRightStyle:{text:"borderRightStyle",type:209},borderRightColor:{text:"borderRightColor",type:210},borderOutlineStyle:{text:"borderOutlineStyle",type:211},borderOutlineColor:{text:"borderOutlineColor",type:212},borderInlineStyle:{text:"borderInlineStyle",type:213},borderInlineColor:{text:"borderInlineColor",type:214},fontFamily:{text:"fontFamily",type:301},fontStyle:{text:"fontStyle",type:302},fontSize:{text:"fontSize",type:303},fontUnderlineStyle:{text:"fontUnderlineStyle",type:304},fontColor:{text:"fontColor",type:305},fontDirection:{text:"fontDirection",type:306},fontStrikethrough:{text:"fontStrikethrough",type:307},fontSuperscript:{text:"fontSuperscript",type:308},fontSubscript:{text:"fontSubscript",type:309},fontNormal:{text:"fontNormal",type:310},indentLeft:{text:"indentLeft",type:401},indentRight:{text:"indentRight",type:402},numberFormat:{text:"numberFormat",type:501},width:{text:"width",type:701},height:{text:"height",type:702},wrapping:{text:"wrapping",type:703}},r=[{name:f,value:0},{name:"thin",value:1},{name:"medium",value:2},{name:"dashed",value:3},{name:"dotted",value:4},{name:"thick",value:5},{name:"double",value:6},{name:"hair",value:7},{name:"medium dashed",value:8},{name:"dash dot",value:9},{name:"medium dash dot",value:10},{name:"dash dot dot",value:11},{name:"medium dash dot dot",value:12},{name:"slant dash dot",value:13}],i=[{name:f,value:0},{name:"black",value:1},{name:"blue",value:2},{name:"gray",value:3},{name:"green",value:4},{name:"orange",value:5},{name:"pink",value:6},{name:"purple",value:7},{name:"red",value:8},{name:"teal",value:9},{name:"turquoise",value:10},{name:"violet",value:11},{name:"white",value:12},{name:"yellow",value:13},{name:"automatic",value:14}],n=OSF.DDA.SafeArray.Delegate.ParameterMap;n.define({type:t.alignHorizontal.text,toHost:[{name:"general",value:0},{name:"left",value:1},{name:"center",value:2},{name:"right",value:3},{name:"fill",value:4},{name:"justify",value:5},{name:"center across selection",value:6},{name:o,value:7}]});n.define({type:t.alignVertical.text,toHost:[{name:"top",value:0},{name:"center",value:1},{name:"bottom",value:2},{name:"justify",value:3},{name:o,value:4}]});n.define({type:t.backgroundColor.text,toHost:i});n.define({type:t.borderStyle.text,toHost:r});n.define({type:t.borderColor.text,toHost:i});n.define({type:t.borderTopStyle.text,toHost:r});n.define({type:t.borderTopColor.text,toHost:i});n.define({type:t.borderBottomStyle.text,toHost:r});n.define({type:t.borderBottomColor.text,toHost:i});n.define({type:t.borderLeftStyle.text,toHost:r});n.define({type:t.borderLeftColor.text,toHost:i});n.define({type:t.borderRightStyle.text,toHost:r});n.define({type:t.borderRightColor.text,toHost:i});n.define({type:t.borderOutlineStyle.text,toHost:r});n.define({type:t.borderOutlineColor.text,toHost:i});n.define({type:t.borderInlineStyle.text,toHost:r});n.define({type:t.borderInlineColor.text,toHost:i});n.define({type:t.fontStyle.text,toHost:[{name:"regular",value:0},{name:"italic",value:1},{name:"bold",value:2},{name:"bold italic",value:3}]});n.define({type:t.fontUnderlineStyle.text,toHost:[{name:f,value:0},{name:"single",value:1},{name:"double",value:2},{name:"single accounting",value:3},{name:"double accounting",value:4}]});n.define({type:t.fontColor.text,toHost:i});n.define({type:t.fontDirection.text,toHost:[{name:"context",value:0},{name:"left-to-right",value:1},{name:"right-to-left",value:2}]});n.define({type:t.width.text,toHost:[{name:e,value:-1}]});n.define({type:t.height.text,toHost:[{name:e,value:-1}]});n.define({type:Microsoft.Office.WebExtension.Parameters.TableOptions,toHost:[{name:"headerRow",value:0},{name:"bandedRows",value:1},{name:"firstColumn",value:2},{name:"lastColumn",value:3},{name:"bandedColumns",value:4},{name:"filterButton",value:5},{name:"style",value:6},{name:"totalRow",value:7}]});n.dynamicTypes[Microsoft.Office.WebExtension.Parameters.CellFormat]={toHost:function(t){for(var i in t)t[i].format&&(t[i].format=n.doMapValues(t[i].format,"toHost"));return t},fromHost:function(n){return n}};n.setDynamicType(Microsoft.Office.WebExtension.Parameters.CellFormat,{toHost:function(n){var c="cells",y="format",w=0,b=1,p=[],l,i,r,f,e,o,a,v,s;for(l in n){if(i=n[l],r=[],typeof i[c]!==u){if(f=i[c],typeof i[c]=="object"){e=[];for(o in f)typeof h[o]!==u&&(e[h[o]]=f[o])}else e=f;r[w]=e}if(i[y]){a=i[y];v=[];for(s in a)typeof t[s]!==u&&v.push([t[s].type,a[s]]);r[b]=v}p[l]=r}return p},fromHost:function(n){return n}});n.setDynamicType(Microsoft.Office.WebExtension.Parameters.TableOptions,{toHost:function(n){var i=[];for(var t in n)typeof s[t]!==u&&(i[s[t]]=n[t]);return i},fromHost:function(n){return n}})}();OSF.DDA.ExcelDocument=function(n,t){var i=this,r=new OSF.DDA.BindingFacade(i);OSF.DDA.DispIdHost.addAsyncMethods(r,[OSF.DDA.AsyncMethodNames.AddFromPromptAsync]);OSF.DDA.DispIdHost.addAsyncMethods(i,[OSF.DDA.AsyncMethodNames.GoToByIdAsync]);OSF.DDA.DispIdHost.addAsyncMethods(i,[OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync]);OSF.DDA.ExcelDocument.uber.constructor.call(i,n,r,t);OSF.OUtil.finalizeProperties(i)};OSF.OUtil.extend(OSF.DDA.ExcelDocument,OSF.DDA.JsomDocument);OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(n,t){OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM);n.doc=new OSF.DDA.ExcelDocument(n,this._initializeSettings(n,!1));OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi,[OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]);t()};__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t=function(){function n(n,t){this.m_actionInfo=n;this.m_isWriteOperation=t}return Object.defineProperty(n.prototype,"actionInfo",{get:function(){return this.m_actionInfo},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},enumerable:!0,configurable:!0}),n}();n.Action=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createSetPropertyAction=function(t,i,r,u){var f;n.Utility.validateObjectPath(i);var e={Id:t._nextId(),ActionType:4,Name:r,ObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},s=[u],o=n.Utility.setMethodArguments(t,e.ArgumentInfo,s);return n.Utility.validateReferencedObjectPaths(o),f=new n.Action(e,!0),t._pendingRequest.addAction(f),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addReferencedObjectPaths(o),f},t.createMethodAction=function(t,i,r,u,f){var e,o,h,s;return n.Utility.validateObjectPath(i),e={Id:t._nextId(),ActionType:3,Name:r,ObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},o=n.Utility.setMethodArguments(t,e.ArgumentInfo,f),n.Utility.validateReferencedObjectPaths(o),h=u!=1,s=new n.Action(e,h),t._pendingRequest.addAction(s),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addReferencedObjectPaths(o),s},t.createQueryAction=function(t,i,r){var u,f;return n.Utility.validateObjectPath(i),u={Id:t._nextId(),ActionType:2,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},u.QueryInfo=r,f=new n.Action(u,!1),t._pendingRequest.addAction(f),t._pendingRequest.addReferencedObjectPath(i._objectPath),f},t.createRecursiveQueryAction=function(t,i,r){n.Utility.validateObjectPath(i);var f={Id:t._nextId(),ActionType:6,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id,RecursiveQueryInfo:r},u=new n.Action(f,!1);return t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u},t.createInstantiateAction=function(t,i){n.Utility.validateObjectPath(i);var u={Id:t._nextId(),ActionType:1,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},r=new n.Action(u,!1);return t._pendingRequest.addAction(r),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addActionResultHandler(r,new n.InstantiateActionResultHandler(i)),r},t.createTraceAction=function(t,i,r){var u={Id:t._nextId(),ActionType:5,Name:"Trace",ObjectPathId:0},f=new n.Action(u,!1);return t._pendingRequest.addAction(f),r&&t._pendingRequest.addTrace(u.Id,i),f},t}();n.ActionFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(t,i){n.Utility.checkArgumentNull(t,"context");this.m_context=t;this.m_objectPath=i;this.m_objectPath&&(t._processingResult||(n.ActionFactory.createInstantiateAction(t,this),t._autoCleanup&&this._KeepReference&&t.trackedObjects._autoAdd(this)))}return Object.defineProperty(t.prototype,"context",{get:function(){return this.m_context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_objectPath",{get:function(){return this.m_objectPath},set:function(n){this.m_objectPath=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNull",{get:function(){return n.Utility.throwIfNotLoaded("isNull",this._isNull,null,this._isNull),this._isNull},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNullObject",{get:function(){return n.Utility.throwIfNotLoaded("isNullObject",this._isNull,null,this._isNull),this._isNull},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_isNull",{get:function(){return this.m_isNull},set:function(n){this.m_isNull=n;n&&this.m_objectPath&&this.m_objectPath._updateAsNullObject()},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){this._isNull=n.Utility.isNullOrUndefined(t);this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this,t)},t.prototype._handleIdResult=function(t){this._isNull=n.Utility.isNullOrUndefined(t);n.Utility.fixObjectPathIfNecessary(this,t);this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this,t)},t.prototype._recursivelySet=function(i,r,u,f,e){var l=i instanceof t,o,s,h,c;if(l)if(Object.getPrototypeOf(this)===Object.getPrototypeOf(i))i=JSON.parse(JSON.stringify(i));else throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"properties",errorLocation:this._className+".set"});try{for(s=0;s0},enumerable:!0,configurable:!0}),t.prototype.addTrace=function(n,t){this.m_traceInfos[n]=t},t.prototype.addReferencedObjectPath=function(t){if(!this.m_referencedObjectPaths[t.objectPathInfo.Id]){if(!t.isValid)throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidObjectPath,message:n.Utility._getResourceString(n.ResourceStrings.invalidObjectPath,n.Utility.getObjectPathExpression(t)),debugInfo:{errorLocation:n.Utility.getObjectPathExpression(t)}});while(t)t.isWriteOperation&&(this.m_flags=this.m_flags|1),this.m_referencedObjectPaths[t.objectPathInfo.Id]=t,t.objectPathInfo.ObjectPathType==3&&this.addReferencedObjectPaths(t.argumentObjectPaths),t=t.parentObjectPath}},t.prototype.addReferencedObjectPaths=function(n){if(n)for(var t=0;t0&&(typeof r[0]=="string"||i.isRequestUrlAndHeaderInfo(r[0])||i.isRequestUrlAndHeaderInfoResolver(r[0]))&&(y=r[0],h=1),r.length==h+1)a=u,v=r[h+0];else if(r.length==h+2){if(r[h+0]instanceof n.ClientObject)a=function(){return r[h+0].context};else if(Array.isArray(r[h+0])){if(c=r[h+0],c.length==0)return i.createErrorPromise(t);for(l=0;l0){var n=c._onRunFinishedNotifiers.shift();n()}if(a)return l;else throw l;})},i.prototype._nextId=function(){return++this.m_nextId},i}();n.ClientRequestContext=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_type=n}return Object.defineProperty(t.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){(this.m_isLoaded=!0,typeof t=="object"&&t&&t._IsNull)||(this.m_value=this.m_type===1?n.Utility.adjustToDateTime(t):t)},t}();n.ClientResult=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.flags="flags",n.getItemAt="GetItemAt",n.id="Id",n.idPrivate="_Id",n.index="_Index",n.items="_Items",n.iterativeExecutor="IterativeExecutor",n.localDocument="http://document.localhost/",n.localDocumentApiPrefix="http://document.localhost/_api/",n.processQuery="ProcessQuery",n.referenceId="_ReferenceId",n.isTracked="_IsTracked",n.sourceLibHeader="SdkVersion",n.embeddingPageOrigin="EmbeddingPageOrigin",n.embeddingPageSessionInfo="EmbeddingPageSessionInfo",n}();n.Constants=t}(OfficeExtension||(OfficeExtension={})),function(n){var u=1,r={invokeRequestModifier:function(n){return n.DdaMethod.Version=u,n},invokeResponseModifier:function(n){return u=n.Version,n.Error&&(n.error={},n.error.Code=n.Error),n}},i,t,f,e;(function(n){n[n.Success=0]="Success";n[n.Timeout=1]="Timeout";n[n.InternalError=5001]="InternalError"})(i||(i={})),function(n){n.SendingId="sId";n.RespondingId="rId";n.CommandKey="command";n.SessionInfoKey="sessionInfo";n.ParamsKey="params";n.ApiReadyCommand="apiready";n.ExecuteMethodCommand="executeMethod";n.GetAppContextCommand="getAppContext";n.RegisterEventCommand="registerEvent";n.UnregisterEventCommand="unregisterEvent";n.FireEventCommand="fireEvent"}(t||(t={}));f=function(u){function f(n,t){u.call(this);this.m_chosenWindow=null;this.m_chosenOrigin=null;this.m_enabled=!0;this.m_onMessageHandler=this._onMessage.bind(this);this.m_callbackList={};this.m_id=0;this.m_timeoutId=-1;this.m_appContext=null;this.m_url=n;this.m_options=t;this.m_options||(this.m_options={sessionKey:Math.random().toString()});this.m_options.sessionKey||(this.m_options.sessionKey=Math.random().toString());this.m_options.container||(this.m_options.container=document.body);this.m_options.timeoutInMilliseconds||(this.m_options.timeoutInMilliseconds=6e4);this.m_options.height||(this.m_options.height="400px");this.m_options.width||(this.m_options.width="100%")}return __extends(f,u),f.prototype._getIFrameSrc=function(){var u=window.location.protocol+"//"+window.location.host,i=n.Constants.embeddingPageOrigin+"="+encodeURIComponent(u)+"&"+n.Constants.embeddingPageSessionInfo+"="+encodeURIComponent(this.m_options.sessionKey),r=!1,t;return this.m_url.toLowerCase().indexOf("/_layouts/preauth.aspx")>0&&(r=!0),t=document.createElement("a"),t.href=this.m_url,r?t.hash=t.hash.length===0||t.hash==="#"?"#"+i:t.hash+"&"+i:t.search=t.search.length===0||t.search==="?"?"?"+i:t.search+"&"+i,t.href},f.prototype.init=function(){var t=this,i;return window.addEventListener("message",this.m_onMessageHandler),i=this._getIFrameSrc(),new n._Internal.OfficePromise(function(r,u){var f=document.createElement("iframe");t.m_options.id&&(f.id=t.m_options.id);f.style.height=t.m_options.height;f.style.width=t.m_options.width;f.src=i;t.m_options.container.appendChild(f);t.m_timeoutId=setTimeout(function(){t.close();var i=n.Utility.createRuntimeError(n.ErrorCodes.timeout,n.Utility._getResourceString(n.ResourceStrings.timeout),"EmbeddedSession.init");u(i)},t.m_options.timeoutInMilliseconds);t.m_promiseResolver=r})},f.prototype._invoke=function(n,t,u){if(!this.m_enabled){t(i.InternalError,null);return}r.invokeRequestModifier&&(u=r.invokeRequestModifier(u));this._sendMessageWithCallback(this.m_id++,n,u,function(n){r.invokeResponseModifier&&(n=r.invokeResponseModifier(n));var u=n.Error;delete n.Error;t(u||i.Success,n)})},f.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler);window.clearTimeout(this.m_timeoutId);this.m_enabled=!1},Object.defineProperty(f.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),f.prototype._createRequestExecutorOrNull=function(){return new e(this)},f.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},f.prototype._registerEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.RegisterEventCommand,{EventId:i,TargetId:r},function(){n(null)})})},f.prototype._unregisterEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.UnregisterEventCommand,{EventId:i,TargetId:r},function(){n()})})},f.prototype._onMessage=function(n){var u=this,i,e,r,o,s;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===n.source&&this.m_chosenOrigin===n.origin)){if(i=n.data,i&&i[t.CommandKey]===t.ApiReadyCommand){!this.m_chosenWindow&&this._isValidDescendant(n.source)&&i[t.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=n.source,this.m_chosenOrigin=n.origin,this._sendMessageWithCallback(this.m_id++,t.GetAppContextCommand,null,function(n){u._setupContext(n);window.clearTimeout(u.m_timeoutId);u.m_promiseResolver()}));return}if(i&&i[t.CommandKey]===t.FireEventCommand){var f=i[t.ParamsKey],h=f.EventId,c=f.TargetId,l=f.Data;if(this.m_sessionEventManager)for(e=this.m_sessionEventManager.getHandlers(h,c),r=0;r=0;o--)if(r[o]===e[i].handler){r.splice(o,1);break}break;case 2:r=[];break}}return s&&(!this.m_registered&&r.length>0?u=u.then(function(){return f.m_eventInfo.registerFunc(f.m_callback)}).then(function(){return f.m_registered=!0}):this.m_registered&&r.length==0&&(u=u.then(function(){return f.m_eventInfo.unregisterFunc(f.m_callback)}).catch(function(t){n.Utility.log("Error when unregister event: "+JSON.stringify(t))}).then(function(){return f.m_registered=!1})),u=u.then(function(){return f.m_handlers=r})),u},t.prototype.fireEvent=function(t){for(var u,f,r=[],i=0;i=0;e--)if(f[e]===u){f.splice(e,1);break}return f.length===0?this.m_unregisterEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i}();n.EventRegistration=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var s=JSON.stringify(u.Body),f=u.Url,e,o;if(f.charAt(f.length-1)!="/"&&(f=f+"/"),f=f+n.Constants.processQuery,f=f+"?"+n.Constants.flags+"="+r.toString(),e={method:"POST",url:f,headers:{},body:s},e.headers[n.Constants.sourceLibHeader]=t.SourceLibHeaderValue,e.headers["CONTENT-TYPE"]="application/json",u.Headers)for(o in u.Headers)e.headers[o]=u.Headers[o];return n.HttpUtility.sendRequest(e).then(function(t){var i,r;return t.statusCode===200?i={ErrorCode:null,ErrorMessage:null,Headers:t.headers,Body:JSON.parse(t.body)}:(n.Utility.log("Error Response:"+t.body),r=n.Utility._parseErrorResponse(t),i={ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:t.headers,Body:null}),i})},t.SourceLibHeaderValue="officejs-rest",t}();n.HttpRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){n.OfficeRequire=function(){return typeof require!="undefined"?require:null}()})(t=n._Internal||(n._Internal={}));i=function(){function i(){}return i.setCustomSendRequestFunc=function(n){i.s_customSendRequestFunc=n},i.xhrSendRequestFunc=function(i){return new t.OfficePromise(function(r,u){var f=new XMLHttpRequest,e;if(f.open(i.method,i.url),f.onload=function(){var t={statusCode:f.status,headers:n.Utility._parseHttpResponseHeaders(f.getAllResponseHeaders()),body:f.responseText};r(t)},f.onerror=function(){u(new t.RuntimeError({code:n.ErrorCodes.connectionFailure,message:n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,f.statusText)}))},i.headers)for(e in i.headers)f.setRequestHeader(e,i.headers[e]);f.send(i.body)})},i.nodejsRequestModuleSendRequestFunc=function(n){i.logRequest(n);var r=t.OfficeRequire(i.NodeJsRequestModuleName);return r(n.url,{method:n.method,headers:n.headers,body:n.body}).then(function(n){return n.text().then(function(t){var f=n.status,u={},r;return n.headers.forEach(function(n,t){u[t]=n}),r={statusCode:f,headers:u,body:t},i.logResponse(r),r})})},i.sendRequest=function(n){i.validateAndNormalizeRequest(n);var t=i.s_customSendRequestFunc;return t||(t=typeof window=="undefined"||typeof XMLHttpRequest=="undefined"?i.nodejsRequestModuleSendRequestFunc:i.xhrSendRequestFunc),t(n)},i.setCustomSendLocalDocumentRequestFunc=function(n){i.s_customSendLocalDocumentRequestFunc=n},i.sendLocalDocumentRequest=function(n){i.validateAndNormalizeRequest(n);var t;return t=i.s_customSendLocalDocumentRequestFunc||i.officeJsSendLocalDocumentRequestFunc,t(n)},i.officeJsSendLocalDocumentRequestFunc=function(i){i=n.Utility._validateLocalDocumentRequest(i);var r=n.Utility._buildRequestMessageSafeArray(i);return new t.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(r,function(i){var r;r=i.status=="succeeded"?{statusCode:n.RichApiMessageUtility.getResponseStatusCode(i),headers:n.RichApiMessageUtility.getResponseHeaders(i),body:n.RichApiMessageUtility.getResponseBody(i)}:n.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(i.error.code,i.error.message);n.Utility.log(JSON.stringify(r));t(r)})})},i.validateAndNormalizeRequest=function(i){if(n.Utility.isNullOrUndefined(i))throw t.RuntimeError._createInvalidArgError({argumentName:"request"});n.Utility.isNullOrEmptyString(i.method)&&(i.method="GET");i.method=i.method.toUpperCase()},i.logRequest=function(t){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Request---"),n.Utility.log(t.method+" "+t.url),t.headers)for(var r in t.headers)n.Utility.log(r+": "+t.headers[r]);i._logBody&&n.Utility.log(t.body)}},i.logResponse=function(t){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Response---"),n.Utility.log(""+t.statusCode),t.headers)for(var r in t.headers)n.Utility.log(r+": "+t.headers[r]);i._logBody&&n.Utility.log(t.body)}},i.NodeJsRequestModuleName="node-fetch",i._logBody=!1,i}();n.HttpUtility=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_clientObject=n}return n.prototype._handleResult=function(n){this.m_clientObject._handleIdResult(n)},n}();n.InstantiateActionResultHandler=t}(OfficeExtension||(OfficeExtension={})),function(n){}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){this.m_objectPathInfo=n;this.m_parentObjectPath=t;this.m_isWriteOperation=!1;this.m_isCollection=i;this.m_isInvalidAfterRequest=r;this.m_isValid=!0}return Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},set:function(n){this.m_isWriteOperation=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(n){this.m_argumentObjectPaths=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(n){this.m_isValid=n;!n&&this.m_objectPathInfo.ObjectPathType===6&&this.m_savedObjectPathInfo&&(t.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(n){this.m_getByIdMethodName=n},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null},t.prototype.updateUsingObjectData=function(i){var o=i[n.Constants.referenceId],u,f,e,r;if(!n.Utility.isNullOrEmptyString(o)){this.m_savedObjectPathInfo||this.isInvalidAfterRequest||!t.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)||(u={},t.copyObjectPathInfo(this.m_objectPathInfo,u),this.m_savedObjectPathInfo={pathInfo:u,parent:this.m_parentObjectPath});this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=o;this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null;return}if(f=this.parentObjectPath&&this.parentObjectPath.isCollection,e=this.getByIdMethodName,(f||!n.Utility.isNullOrEmptyString(e))&&(r=i[n.Constants.id],n.Utility.isNullOrUndefined(r)&&(r=i[n.Constants.idPrivate]),!n.Utility.isNullOrUndefined(r))){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;f?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=e,this.m_getByIdMethodName=null);this.isWriteOperation=!1;this.m_objectPathInfo.ArgumentInfo={};this.m_objectPathInfo.ArgumentInfo.Arguments=[r];this.m_argumentObjectPaths=null;return}},t.isRestorableObjectPath=function(n){return n===1||n===5||n===3||n===4},t.copyObjectPathInfo=function(n,t){t.Id=n.Id;t.ArgumentInfo=n.ArgumentInfo;t.Name=n.Name;t.ObjectPathType=n.ObjectPathType;t.ParentObjectPathId=n.ParentObjectPathId},t}();n.ObjectPath=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createGlobalObjectObjectPath=function(t){var i={Id:t._nextId(),ObjectPathType:1,Name:""};return new n.ObjectPath(i,null,!1,!1)},t.createNewObjectObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:2,Name:i};return new n.ObjectPath(u,null,r,!1)},t.createPropertyObjectPath=function(t,i,r,u,f){var e={Id:t._nextId(),ObjectPathType:4,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id};return new n.ObjectPath(e,i._objectPath,u,f)},t.createIndexerObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i._objectPath,!1,!1)},t.createIndexerObjectPathUsingParentPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i,!1,!1)},t.createMethodObjectPath=function(t,i,r,u,f,e,o,s){var c={Id:t._nextId(),ObjectPathType:3,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},l=n.Utility.setMethodArguments(t,c.ArgumentInfo,f),h=new n.ObjectPath(c,i._objectPath,e,o);return h.argumentObjectPaths=l,h.isWriteOperation=u!=1,h.getByIdMethodName=s,h},t.createReferenceIdObjectPath=function(t,i){var r={Id:t._nextId(),ObjectPathType:6,Name:i,ArgumentInfo:{}};return new n.ObjectPath(r,null,!1,!1)},t.createChildItemObjectPathUsingIndexerOrGetItemAt=function(i,r,u,f,e){var o=f[n.Constants.id];return n.Utility.isNullOrUndefined(o)&&(o=f[n.Constants.idPrivate]),i&&!n.Utility.isNullOrUndefined(o)?t.createChildItemObjectPathUsingIndexer(r,u,f):t.createChildItemObjectPathUsingGetItemAt(r,u,f,e)},t.createChildItemObjectPathUsingIndexer=function(t,i,r){var f=r[n.Constants.id],u;return n.Utility.isNullOrUndefined(f)&&(f=r[n.Constants.idPrivate]),u=u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u.ArgumentInfo.Arguments=[f],new n.ObjectPath(u,i._objectPath,!1,!1)},t.createChildItemObjectPathUsingGetItemAt=function(t,i,r,u){var e=r[n.Constants.index],f;return e&&(u=e),f={Id:t._nextId(),ObjectPathType:3,Name:n.Constants.getItemAt,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f.ArgumentInfo.Arguments=[u],new n.ObjectPath(f,i._objectPath,!1,!1)},t}();n.ObjectPathFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var f=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n._Internal.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(f,function(i){n.Utility.log("Response:");n.Utility.log(JSON.stringify(i));var r;r=i.status=="succeeded"?n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBody(i),n.RichApiMessageUtility.getResponseHeaders(i)):n.RichApiMessageUtility.buildResponseOnError(i.error.code,i.error.message);t(r)})})},t.SourceLibHeaderValue="officejs",t}();n.OfficeJsRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){var t;(function(t){function i(){return function(){"use strict";function wt(n){return typeof n=="function"||typeof n=="object"&&n!==null}function b(n){return typeof n=="function"}function bt(n){return typeof n=="object"&&n!==null}function kt(n){k=n}function dt(n){f=n}function ti(){var t=process.nextTick,n=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&n[1]==="0"&&n[2]==="10"&&(t=setImmediate),function(){t(c)}}function ii(){return function(){tt(c)}}function ri(){var n=0,i=new ut(c),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function ui(){var n=new MessageChannel;return n.port1.onmessage=c,function(){n.port2.postMessage(0)}}function ft(){return function(){setTimeout(c,1)}}function c(){for(var t,i,n=0;n=0?(n=n.substring(t+5,n.length),n<"14.14393"?!0:!1):!1}function i(){return typeof window=="undefined"&&typeof Promise=="function"?Promise:typeof window!="undefined"&&window.Promise?t()?n.PromiseImpl.Init():window.Promise:n.PromiseImpl.Init()}n.OfficePromise=i()}(t=n._Internal||(n._Internal={}));i=t.OfficePromise;n.Promise=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this._autoCleanupList={};this.m_context=n}return t.prototype.add=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._addCommon(n,!0)}):this._addCommon(n,!0)},t.prototype._autoAdd=function(n){this._addCommon(n,!1);this._autoCleanupList[n._objectPath.objectPathInfo.Id]=n},t.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(t,i){var r=this.m_context._autoCleanup&&!t[n.Constants.isTracked]&&t!==this.m_context._rootObject&&i&&!n.Utility.isNullOrEmptyString(i[n.Constants.referenceId]);r&&(this._autoCleanupList[t._objectPath.objectPathInfo.Id]=t,t[n.Constants.isTracked]=!0)},t.prototype._addCommon=function(t,i){if(t[n.Constants.isTracked]){i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id];return}var r=t[n.Constants.referenceId];n.Utility.isNullOrEmptyString(r)&&t._KeepReference&&(t._KeepReference(),n.ActionFactory.createInstantiateAction(this.m_context,t),i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id],t[n.Constants.isTracked]=!0)},t.prototype.remove=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._removeCommon(n)}):this._removeCommon(n)},t.prototype._removeCommon=function(t){var r=t[n.Constants.referenceId],i;n.Utility.isNullOrEmptyString(r)||(i=this.m_context._rootObject,i._RemoveReference&&i._RemoveReference(r),delete t[n.Constants.isTracked])},t.prototype._retrieveAndClearAutoCleanupList=function(){var n=this._autoCleanupList;return this._autoCleanupList={},n},t}();n.TrackedObjects=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.cannotRegisterEvent="CannotRegisterEvent",n.connectionFailureWithStatus="ConnectionFailureWithStatus",n.connectionFailureWithDetails="ConnectionFailureWithDetails",n.invalidObjectPath="InvalidObjectPath",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.invalidArgumentGeneric="InvalidArgumentGeneric",n.propertyNotLoaded="PropertyNotLoaded",n.runMustReturnPromise="RunMustReturnPromise",n.timeout="Timeout",n.propertyDoesNotExist="PropertyDoesNotExist",n.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",n.moreInfoInnerError="MoreInfoInnerError",n.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",n.valueNotLoaded="ValueNotLoaded",n.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage",n}();n.ResourceStrings=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.CannotRegisterEvent="The event handler cannot be registered.",n.ConnectionFailureWithStatus="The request failed with status code of {0}.",n.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}",n.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",n.InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',n.InvalidRequestContext="Cannot use the object across different request contexts.",n.PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",n.RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',n.Timeout="The operation has timed out.",n.ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.',n.invalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.",n}();n.ResourceStringValues=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.buildMessageArrayForIRequestExecutor=function(i,r,u,f){var o=JSON.stringify(u.Body),e;return n.Utility.log("Request:"),n.Utility.log(o),e={},e[n.Constants.sourceLibHeader]=f,t.buildRequestMessageSafeArray(i,r,"POST","ProcessQuery",e,o)},t.buildResponseOnSuccess=function(n,t){var i={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return i.Body=JSON.parse(n),i.Headers=t,i},t.buildResponseOnError=function(i,r){var u={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return u.ErrorCode=n.ErrorCodes.generalException,u.ErrorMessage=r,i==t.OfficeJsErrorCode_ooeNoCapability?u.ErrorCode=n.ErrorCodes.accessDenied:i==t.OfficeJsErrorCode_ooeActivityLimitReached?u.ErrorCode=n.ErrorCodes.activityLimitReached:i==t.OfficeJsErrorCode_ooeInvalidOrTimedOutSession&&(u.ErrorCode=n.ErrorCodes.invalidOrTimedOutSession,u.ErrorMessage=n.Utility._getResourceString(n.ResourceStrings.invalidOrTimedOutSessionMessage)),u},t.buildHttpResponseFromOfficeJsError=function(i,r){var f=500,u={};return u.error={},u.error.code=n.ErrorCodes.generalException,u.error.message=r,i===t.OfficeJsErrorCode_ooeNoCapability?(f=403,u.error.code=n.ErrorCodes.accessDenied):i===t.OfficeJsErrorCode_ooeActivityLimitReached&&(f=429,u.error.code=n.ErrorCodes.activityLimitReached),{statusCode:f,headers:{},body:JSON.stringify(u)}},t.buildRequestMessageSafeArray=function(n,t,i,r,u,f){var e=[],o;if(u)for(o in u)e.push(o),e.push(u[o]);var s=0,h="",c="",l="";return[n,i,r,e,f,s,t,h,c,l]},t.getResponseBody=function(n){return t.getResponseBodyFromSafeArray(n.value.data)},t.getResponseHeaders=function(n){return t.getResponseHeadersFromSafeArray(n.value.data)},t.getResponseBodyFromSafeArray=function(n){var t=n[2],i;return typeof t=="string"?t:(i=t,i.join(""))},t.getResponseHeadersFromSafeArray=function(n){var i=n[1],r,t;if(!i)return null;for(r={},t=0;t0&&f.push(i);return f},t.throwError=function(i,r,u){throw new n._Internal.RuntimeError({code:i,message:t._getResourceString(i,r),debugInfo:u?{errorLocation:u}:undefined});},t.createRuntimeError=function(t,i,r){return new n._Internal.RuntimeError({code:t,message:i,debugInfo:{errorLocation:r}})},t._getResourceString=function(i,r){var u,e,f,o;return typeof window!="undefined"&&window.Strings&&window.Strings.OfficeOM&&(e="L_"+i,f=window.Strings.OfficeOM[e],f&&(u=f)),u||(u=n.ResourceStringValues[i]),u||(u=i),t.isNullOrUndefined(r)||(Array.isArray(r)?(o=r,u=t._formatString(u,o)):u=u.replace("{0}",r)),u},t._formatString=function(t,i){return t.replace(/\{\d\}/g,function(t){var r=parseInt(t.substr(1,t.length-2));if(r0?".":"")+i;break;case 3:i=t.normalizeName(n.objectPathInfo.Name)+"()"+(i.length>0?".":"")+i;break;case 4:i=t.normalizeName(n.objectPathInfo.Name)+(i.length>0?".":"")+i;break;case 5:i="getItem()"+(i.length>0?".":"")+i;break;case 6:i="_reference()"+(i.length>0?".":"")+i;break}n=n.parentObjectPath}return i},t._createPromiseFromResult=function(t){return new n._Internal.OfficePromise(function(n,i){n(t)})},t._createTimeoutPromise=function(t){return new n._Internal.OfficePromise(function(n,i){setTimeout(function(){n(null)},t)})},t.promisify=function(t){return new n._Internal.OfficePromise(function(n,i){var r=function(t){t.status=="failed"?i(t.error):n(t.value)};t(r)})},t._addActionResultHandler=function(n,t,i){n.context._pendingRequest.addActionResultHandler(t,i)},t._handleNavigationPropertyResults=function(n,i,r){for(var u=0;u0},t._getLocalDocumentUrlPrefixLength=function(n){for(var i=["http://document.localhost","https://document.localhost","//document.localhost"],r=n.toLowerCase().trim(),t=0;t0))for(s=i.url.substr(f+1),e=s.split("&"),u=0;u0&&(f=i.substr(0,u),e=i.substr(u+1),f=t.trim(f),e=t.trim(e),s[f.toUpperCase()]=e));return s},t._parseErrorResponse=function(i){var r=null,f,e,u;if(!t.isNullOrEmptyString(i.body)){f=t.trim(i.body);try{r=JSON.parse(f)}catch(o){t.log("Error when parse "+f)}}return!t.isNullOrUndefined(r)&&typeof r=="object"&&r.error?(u=r.error.code,e=t._getResourceString(n.ResourceStrings.connectionFailureWithDetails,[i.statusCode.toString(),r.error.code,r.error.message])):e=t._getResourceString(n.ResourceStrings.connectionFailureWithStatus,i.statusCode.toString()),t.isNullOrEmptyString(u)&&(u=n.ErrorCodes.connectionFailure),{errorCode:u,errorMessage:e}},t._copyHeaders=function(n,t){if(n&&t)for(var i in n)t[i]=n[i]},t._logEnabled=!1,t._synchronousCleanup=!1,t.s_underscoreCharCode="_".charCodeAt(0),t}();n.Utility=t}(OfficeExtension||(OfficeExtension={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){function nt(n){return n[0].toLowerCase()+n.slice(1)}function w(n,t,i){var s=1500,e,r,u,o,h;if(Array.isArray(i)&&i.length>0&&Array.isArray(i[0])&&i.length*i[0].length>s&&p()){for(e=Math.max(1,Math.round(s/i[0].length)),n._ValidateArraySize(i.length,i[0].length),r=0;ri.length&&(u=i.length-r),o=n.getRow(r).getBoundingRect(n.getRow(r+u-1)),h=i.slice(r,r+u),f(o.context,o,t,h);return!0}return!1}function p(){return typeof window!="undefined"&&window.Office&&window.Office.context&&window.Office.context.requirements?window.Office.context.requirements.isSetSupported("ExcelApi",1.3):!0}function ku(t,i,r){return OfficeExtension.ClientRequestContext._runBatch("Excel.run",arguments,function(t){return new n.RequestContext(t)})}function b(n){var t={BindingColumnCount:n.bindingColumnCount,BindingId:n.bindingId,BindingRowCount:n.bindingRowCount,bindingType:n.bindingType,HasHeaders:n.hasHeaders};return window.OSF.DDA.OMFactory.manufactureBinding(t,window.Microsoft.Office.WebExtension.context.document)}function rt(n,t){var r=n.headers==null,i;return i=r?n.rows:n,i=window.OSF.DDA.DataCoercion.coerceData(i,t[window.Microsoft.Office.WebExtension.Parameters.CoercionType]),i==undefined?null:i}var wu=["ThreeArrows","ThreeArrowsGray","ThreeFlags","ThreeTrafficLights1","ThreeTrafficLights2","ThreeSigns","ThreeSymbols","ThreeSymbols2","FourArrows","FourArrowsGray","FourRedToBlack","FourRating","FourTrafficLights","FiveArrows","FiveArrowsGray","FiveRating","FiveQuarters","ThreeStars","ThreeTriangles","FiveBoxes"],bu=[["RedDownArrow","YellowSideArrow","GreenUpArrow"],["GrayDownArrow","GraySideArrow","GrayUpArrow"],["RedFlag","YellowFlag","GreenFlag"],["RedCircleWithBorder","YellowCircle","GreenCircle"],["RedTrafficLight","YellowTrafficLight","GreenTrafficLight"],["RedDiamond","YellowTriangle","GreenCircle"],["RedCrossSymbol","YellowExclamationSymbol","GreenCheckSymbol"],["RedCross","YellowExclamation","GreenCheck"],["RedDownArrow","YellowDownInclineArrow","YellowUpInclineArrow","GreenUpArrow"],["GrayDownArrow","GrayDownInclineArrow","GrayUpInclineArrow","GrayUpArrow"],["BlackCircle","GrayCircle","PinkCircle","RedCircle"],["OneBar","TwoBars","ThreeBars","FourBars"],["BlackCircleWithBorder","RedCircleWithBorder","YellowCircle","GreenCircle"],["RedDownArrow","YellowDownInclineArrow","YellowSideArrow","YellowUpInclineArrow","GreenUpArrow"],["GrayDownArrow","GrayDownInclineArrow","GraySideArrow","GrayUpInclineArrow","GrayUpArrow"],["NoBars","OneBar","TwoBars","ThreeBars","FourBars"],["WhiteCircleAllWhiteQuarters","CircleWithThreeWhiteQuarters","CircleWithTwoWhiteQuarters","CircleWithOneWhiteQuarter","BlackCircle"],["SilverStar","HalfGoldStar","GoldStar"],["RedDownTriangle","YellowDash","GreenUpTriangle"],["NoFilledBoxes","OneFilledBox","TwoFilledBoxes","ThreeFilledBoxes","FourFilledBoxes"],],tt,it,d,ut,ft,et,k,ot,st,ht,g,ct,lt,at,vt,yt,pt,wt,bt,kt,dt,gt,ni,ti,ii,ri,ui,fi,ei,oi,si,hi,ci,li,ai,vi,yi,pi,wi,bi,ki,di,gi,nr,tr,ir,rr,ur,fr,er,or,sr,hr,cr,lr,ar,vr,yr,pr,wr,br,kr,dr,gr,nu,tu,iu,ru,uu,fu,eu,ou,su,hu,cu,lu,au,vu,yu,gu,nf,tf,rf,uf,ff,ef,of,sf,hf,cf,lf,af,vf,yf,pf,wf,bf,kf,df,gf,ne,te,ie,re,ue,fe,ee,oe,se,he,ce,le,ae,ve,ye,pe,we,be,ke,de,ge,no,to,io,ro,i,pu,uo;n.icons={};wu.map(function(t,i){var r=nt(t);n.icons[r]=[];bu[i].map(function(i,u){i=nt(i);var f={set:t,index:u};n.icons[r].push(f);n.icons[r][i]=f})});tt=function(){function n(n,t,i){this.m_workbookUrl=n;this.m_requestHeaders=t;this.m_requestHeaders||(this.m_requestHeaders={});OfficeExtension.Utility.isNullOrUndefined(i)&&(i=!0);this.m_persisted=i}return n.prototype.close=function(){var i=this,t,u,r;return this.m_requestUrlAndHeaderInfo&&!OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)?(t=this.m_requestUrlAndHeaderInfo.url,t.charAt(t.length-1)!="/"&&(t=t+"/"),t=t+"closeSession",u=this.m_requestUrlAndHeaderInfo,r={method:"POST",url:t,headers:this.m_requestUrlAndHeaderInfo.headers,body:""},this.m_requestUrlAndHeaderInfo=null,OfficeExtension.HttpUtility.sendRequest(r).then(function(t){var u,r,f;if(t.statusCode!=204){u=OfficeExtension.Utility._parseErrorResponse(t);throw OfficeExtension.Utility.createRuntimeError(u.errorCode,u.errorMessage,"Session.close");}i.m_requestUrlAndHeaderInfo=null;r=null;for(f in i.m_requestHeaders)if(f.toLowerCase()==n.WorkbookSessionIdHeaderNameLower){r=f;break}r&&delete i.m_requestHeaders[r]})):OfficeExtension.Utility._createPromiseFromResult(null)},n.prototype._resolveRequestUrlAndHeaderInfo=function(){var r=this,u,e,t,i,f,o;if(this.m_requestUrlAndHeaderInfo)return OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);if(OfficeExtension.Utility.isNullOrEmptyString(this.m_workbookUrl)||OfficeExtension.Utility._isLocalDocumentUrl(this.m_workbookUrl))return this.m_requestUrlAndHeaderInfo={url:this.m_workbookUrl,headers:this.m_requestHeaders},OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo);u=!1;for(e in this.m_requestHeaders)if(e.toLowerCase()==n.WorkbookSessionIdHeaderNameLower){u=!0;break}return u?(this.m_requestUrlAndHeaderInfo={url:this.m_workbookUrl,headers:this.m_requestHeaders},OfficeExtension.Utility._createPromiseFromResult(this.m_requestUrlAndHeaderInfo)):(t=this.m_workbookUrl,t.charAt(t.length-1)!="/"&&(t=t+"/"),t=t+"createSession",i={},OfficeExtension.Utility._copyHeaders(this.m_requestHeaders,i),i["Content-Type"]="application/json",f={},f.persistChanges=this.m_persisted,o={method:"POST",url:t,headers:i,body:JSON.stringify(f)},OfficeExtension.HttpUtility.sendRequest(o).then(function(t){var u,f,e;if(t.statusCode!==201){u=OfficeExtension.Utility._parseErrorResponse(t);throw OfficeExtension.Utility.createRuntimeError(u.errorCode,u.errorMessage,"Session.resolveRequestUrlAndHeaderInfo");}return f=JSON.parse(t.body),e=f.id,i={},OfficeExtension.Utility._copyHeaders(r.m_requestHeaders,i),i[n.WorkbookSessionIdHeaderName]=e,r.m_requestUrlAndHeaderInfo={url:r.m_workbookUrl,headers:i},r.m_requestUrlAndHeaderInfo}))},n.WorkbookSessionIdHeaderName="Workbook-Session-Id",n.WorkbookSessionIdHeaderNameLower="workbook-session-id",n}();n.Session=tt;it=function(n){function t(t){n.call(this,t);this.m_workbook=new d(this,OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(this));this._rootObject=this.m_workbook}return __extends(t,n),Object.defineProperty(t.prototype,"workbook",{get:function(){return this.m_workbook},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"application",{get:function(){return this.workbook.application},enumerable:!0,configurable:!0}),t}(OfficeExtension.ClientRequestContext);n.RequestContext=it;n.run=ku;n._RedirectV1APIs=!1;n._V1APIMap={GetDataAsync:{call:function(n,t){return n.workbook._V1Api.bindingGetData(t)},postprocess:rt},GetSelectedDataAsync:{call:function(n,t){return n.workbook._V1Api.getSelectedData(t)},postprocess:rt},GoToByIdAsync:{call:function(n,t){return n.workbook._V1Api.gotoById(t)}},AddColumnsAsync:{call:function(n,t){return n.workbook._V1Api.bindingAddColumns(t)}},AddFromSelectionAsync:{call:function(n,t){return n.workbook._V1Api.bindingAddFromSelection(t)},postprocess:b},AddFromNamedItemAsync:{call:function(n,t){return n.workbook._V1Api.bindingAddFromNamedItem(t)},postprocess:b},AddFromPromptAsync:{call:function(n,t){return n.workbook._V1Api.bindingAddFromPrompt(t)},postprocess:b},AddRowsAsync:{call:function(n,t){return n.workbook._V1Api.bindingAddRows(t)}},GetByIdAsync:{call:function(n,t){return n.workbook._V1Api.bindingGetById(t)},postprocess:b},ReleaseByIdAsync:{call:function(n,t){return n.workbook._V1Api.bindingReleaseById(t)}},GetAllAsync:{call:function(n){return n.workbook._V1Api.bindingGetAll()},postprocess:function(n){return n.bindings.map(function(n){return b(n)})}},DeleteAllDataValuesAsync:{call:function(n,t){return n.workbook._V1Api.bindingDeleteAllDataValues(t)}},SetSelectedDataAsync:{preprocess:function(n){var t=n.cellFormat;return typeof window!="undefined"&&window.OSF.DDA.SafeArray?window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes,"cellFormat")&&(n.cellFormat=window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes.cellFormat.toHost(t)):typeof window!="undefined"&&window.OSF.DDA.WAC&&window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes,"cellFormat")&&(n.cellFormat=window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes.cellFormat.toHost(t)),n},call:function(n,t){return n.workbook._V1Api.setSelectedData(t)}},SetDataAsync:{preprocess:function(n){var t=n.cellFormat;return typeof window!="undefined"&&window.OSF.DDA.SafeArray?window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes,"cellFormat")&&(n.cellFormat=window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes.cellFormat.toHost(t)):typeof window!="undefined"&&window.OSF.DDA.WAC&&window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes,"cellFormat")&&(n.cellFormat=window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes.cellFormat.toHost(t)),n},call:function(n,t){return n.workbook._V1Api.bindingSetData(t)}},SetFormatsAsync:{preprocess:function(n){var t=n.cellFormat;return typeof window!="undefined"&&window.OSF.DDA.SafeArray?window.OSF.OUtil.listContainsKey(window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes,"cellFormat")&&(n.cellFormat=window.OSF.DDA.SafeArray.Delegate.ParameterMap.dynamicTypes.cellFormat.toHost(t)):typeof window!="undefined"&&window.OSF.DDA.WAC&&window.OSF.OUtil.listContainsKey(window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes,"cellFormat")&&(n.cellFormat=window.OSF.DDA.WAC.Delegate.ParameterMap.dynamicTypes.cellFormat.toHost(t)),n},call:function(n,t){return n.workbook._V1Api.bindingSetFormats(t)}},SetTableOptionsAsync:{call:function(n,t){return n.workbook._V1Api.bindingSetTableOptions(t)}},ClearFormatsAsync:{call:function(n,t){return n.workbook._V1Api.bindingClearFormats(t)}},GetFilePropertiesAsync:{call:function(n,t){return n.workbook._V1Api.getFilePropertiesAsync(t)}}};var o=OfficeExtension.ObjectPathFactory.createPropertyObjectPath,t=OfficeExtension.ObjectPathFactory.createMethodObjectPath,y=OfficeExtension.ObjectPathFactory.createIndexerObjectPath,fo=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath,eo=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer,oo=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt,v=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt,s=OfficeExtension.ActionFactory.createMethodAction,f=OfficeExtension.ActionFactory.createSetPropertyAction,e=OfficeExtension.Utility.isNullOrUndefined,u=OfficeExtension.Utility.isUndefined,r=OfficeExtension.Utility.throwIfNotLoaded,c=OfficeExtension.Utility.load,h=OfficeExtension.Utility.fixObjectPathIfNecessary,l=OfficeExtension.Utility._addActionResultHandler,a=OfficeExtension.Utility._handleNavigationPropertyResults,so=OfficeExtension.Utility.adjustToDateTime,du=function(n){function t(){n.apply(this,arguments)}return __extends(t,n),Object.defineProperty(t.prototype,"_className",{get:function(){return"Application"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"calculationMode",{get:function(){return r("calculationMode",this.m_calculationMode,"Application",this._isNull),this.m_calculationMode},enumerable:!0,configurable:!0}),t.prototype.calculate=function(n){s(this.context,this,"Calculate",0,[n])},t.prototype.suspendApiCalculationUntilNextSync=function(){s(this.context,this,"SuspendApiCalculationUntilNextSync",0,[])},t.prototype._handleResult=function(t){if(n.prototype._handleResult.call(this,t),!e(t)){var i=t;h(this,i);u(i.CalculationMode)||(this.m_calculationMode=i.CalculationMode)}},t.prototype.load=function(n){return c(this,n),this},t.prototype.toJSON=function(){return{calculationMode:this.m_calculationMode}},t}(OfficeExtension.ClientObject);n.Application=du;d=function(i){function r(){i.apply(this,arguments)}return __extends(r,i),Object.defineProperty(r.prototype,"_className",{get:function(){return"Workbook"},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"application",{get:function(){return this.m_application||(this.m_application=new n.Application(this.context,o(this.context,this,"Application",!1,!1))),this.m_application},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"bindings",{get:function(){return this.m_bindings||(this.m_bindings=new n.BindingCollection(this.context,o(this.context,this,"Bindings",!0,!1))),this.m_bindings},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"customXmlParts",{get:function(){return this.m_customXmlParts||(this.m_customXmlParts=new n.CustomXmlPartCollection(this.context,o(this.context,this,"CustomXmlParts",!0,!1))),this.m_customXmlParts},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"functions",{get:function(){return this.m_functions||(this.m_functions=new n.Functions(this.context,o(this.context,this,"Functions",!1,!1))),this.m_functions},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"names",{get:function(){return this.m_names||(this.m_names=new n.NamedItemCollection(this.context,o(this.context,this,"Names",!0,!1))),this.m_names},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"pivotTables",{get:function(){return this.m_pivotTables||(this.m_pivotTables=new n.PivotTableCollection(this.context,o(this.context,this,"PivotTables",!0,!1))),this.m_pivotTables},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"settings",{get:function(){return this.m_settings||(this.m_settings=new n.SettingCollection(this.context,o(this.context,this,"Settings",!0,!1))),this.m_settings},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"tables",{get:function(){return this.m_tables||(this.m_tables=new n.TableCollection(this.context,o(this.context,this,"Tables",!0,!1))),this.m_tables},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"worksheets",{get:function(){return this.m_worksheets||(this.m_worksheets=new n.WorksheetCollection(this.context,o(this.context,this,"Worksheets",!0,!1))),this.m_worksheets},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"_V1Api",{get:function(){return this.m__V1Api||(this.m__V1Api=new n._V1Api(this.context,o(this.context,this,"_V1Api",!1,!1))),this.m__V1Api},enumerable:!0,configurable:!0}),r.prototype.getSelectedRange=function(){return new n.Range(this.context,t(this.context,this,"GetSelectedRange",1,[],!1,!0,null))},r.prototype._GetObjectByReferenceId=function(n){var i=s(this.context,this,"_GetObjectByReferenceId",1,[n]),t=new OfficeExtension.ClientResult;return l(this,i,t),t},r.prototype._GetObjectTypeNameByReferenceId=function(n){var i=s(this.context,this,"_GetObjectTypeNameByReferenceId",1,[n]),t=new OfficeExtension.ClientResult;return l(this,i,t),t},r.prototype._GetReferenceCount=function(){var t=s(this.context,this,"_GetReferenceCount",1,[]),n=new OfficeExtension.ClientResult;return l(this,t,n),n},r.prototype._RemoveAllReferences=function(){s(this.context,this,"_RemoveAllReferences",1,[])},r.prototype._RemoveReference=function(n){s(this.context,this,"_RemoveReference",1,[n])},r.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;h(this,t);a(this,t,["application","Application","bindings","Bindings","customXmlParts","CustomXmlParts","functions","Functions","names","Names","pivotTables","PivotTables","settings","Settings","tables","Tables","worksheets","Worksheets","_V1Api","_V1Api"])}},r.prototype.load=function(n){return c(this,n),this},Object.defineProperty(r.prototype,"onSelectionChanged",{get:function(){var n=this;return this.m_selectionChanged||(this.m_selectionChanged=new OfficeExtension.EventHandlers(this.context,this,"SelectionChanged",{registerFunc:function(t){return n.context.eventRegistration.register(2,"",t)},unregisterFunc:function(t){return n.context.eventRegistration.unregister(2,"",t)},eventArgsTransformFunc:function(t){return OfficeExtension.Utility._createPromiseFromResult({workbook:n})}})),this.m_selectionChanged},enumerable:!0,configurable:!0}),r.prototype.toJSON=function(){return{}},r}(OfficeExtension.ClientObject);n.Workbook=d;ut=function(i){function l(){i.apply(this,arguments)}return __extends(l,i),Object.defineProperty(l.prototype,"_className",{get:function(){return"Worksheet"},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"charts",{get:function(){return this.m_charts||(this.m_charts=new n.ChartCollection(this.context,o(this.context,this,"Charts",!0,!1))),this.m_charts},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"names",{get:function(){return this.m_names||(this.m_names=new n.NamedItemCollection(this.context,o(this.context,this,"Names",!0,!1))),this.m_names},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"pivotTables",{get:function(){return this.m_pivotTables||(this.m_pivotTables=new n.PivotTableCollection(this.context,o(this.context,this,"PivotTables",!0,!1))),this.m_pivotTables},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"protection",{get:function(){return this.m_protection||(this.m_protection=new n.WorksheetProtection(this.context,o(this.context,this,"Protection",!1,!1))),this.m_protection},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"tables",{get:function(){return this.m_tables||(this.m_tables=new n.TableCollection(this.context,o(this.context,this,"Tables",!0,!1))),this.m_tables},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"id",{get:function(){return r("id",this.m_id,"Worksheet",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"name",{get:function(){return r("name",this.m_name,"Worksheet",this._isNull),this.m_name},set:function(n){this.m_name=n;f(this.context,this,"Name",n)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"position",{get:function(){return r("position",this.m_position,"Worksheet",this._isNull),this.m_position},set:function(n){this.m_position=n;f(this.context,this,"Position",n)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"visibility",{get:function(){return r("visibility",this.m_visibility,"Worksheet",this._isNull),this.m_visibility},set:function(n){this.m_visibility=n;f(this.context,this,"Visibility",n)},enumerable:!0,configurable:!0}),l.prototype.set=function(n,t){this._recursivelySet(n,t,["name","position","visibility"],[],["charts","names","pivotTables","tables","charts","names","pivotTables","protection","tables"])},l.prototype.activate=function(){s(this.context,this,"Activate",1,[])},l.prototype.calculate=function(n){s(this.context,this,"Calculate",0,[n])},l.prototype.delete=function(){s(this.context,this,"Delete",0,[])},l.prototype.getCell=function(i,r){return new n.Range(this.context,t(this.context,this,"GetCell",1,[i,r],!1,!0,null))},l.prototype.getNext=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetNext",1,[i],!1,!0,null))},l.prototype.getNextOrNullObject=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetNextOrNullObject",1,[i],!1,!0,null))},l.prototype.getPrevious=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetPrevious",1,[i],!1,!0,null))},l.prototype.getPreviousOrNullObject=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetPreviousOrNullObject",1,[i],!1,!0,null))},l.prototype.getRange=function(i){return new n.Range(this.context,t(this.context,this,"GetRange",1,[i],!1,!0,null))},l.prototype.getUsedRange=function(i){return new n.Range(this.context,t(this.context,this,"GetUsedRange",1,[i],!1,!0,null))},l.prototype.getUsedRangeOrNullObject=function(i){return new n.Range(this.context,t(this.context,this,"GetUsedRangeOrNullObject",1,[i],!1,!0,null))},l.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;h(this,t);u(t.Id)||(this.m_id=t.Id);u(t.Name)||(this.m_name=t.Name);u(t.Position)||(this.m_position=t.Position);u(t.Visibility)||(this.m_visibility=t.Visibility);a(this,t,["charts","Charts","names","Names","pivotTables","PivotTables","protection","Protection","tables","Tables"])}},l.prototype.load=function(n){return c(this,n),this},l.prototype._handleIdResult=function(n){(i.prototype._handleIdResult.call(this,n),e(n))||u(n.Id)||(this.m_id=n.Id)},l.prototype.toJSON=function(){return{id:this.m_id,name:this.m_name,position:this.m_position,protection:this.m_protection,visibility:this.m_visibility}},l}(OfficeExtension.ClientObject);n.Worksheet=ut;ft=function(i){function u(){i.apply(this,arguments)}return __extends(u,i),Object.defineProperty(u.prototype,"_className",{get:function(){return"WorksheetCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"items",{get:function(){return r("items",this.m__items,"WorksheetCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),u.prototype.add=function(i){return new n.Worksheet(this.context,t(this.context,this,"Add",0,[i],!1,!0,null))},u.prototype.getActiveWorksheet=function(){return new n.Worksheet(this.context,t(this.context,this,"GetActiveWorksheet",1,[],!1,!1,null))},u.prototype.getCount=function(n){var i=s(this.context,this,"GetCount",1,[n]),t=new OfficeExtension.ClientResult;return l(this,i,t),t},u.prototype.getFirst=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetFirst",1,[i],!1,!0,null))},u.prototype.getItem=function(t){return new n.Worksheet(this.context,y(this.context,this,[t]))},u.prototype.getItemOrNullObject=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetItemOrNullObject",1,[i],!1,!1,null))},u.prototype.getLast=function(i){return new n.Worksheet(this.context,t(this.context,this,"GetLast",1,[i],!1,!0,null))},u.prototype._handleResult=function(t){var u,f,r,o;if((i.prototype._handleResult.call(this,t),!e(t))&&(u=t,h(this,u),!e(u[OfficeExtension.Constants.items])))for(this.m__items=[],f=u[OfficeExtension.Constants.items],r=0;r0?f=i.getOffsetRange(r,u):(f=i,e=r,o=u),Math.abs(t)==1)?f:f.getBoundingRect(i.getOffsetRange(r*t+e,u*t+o))},Object.defineProperty(l.prototype,"conditionalFormats",{get:function(){return this.m_conditionalFormats||(this.m_conditionalFormats=new n.ConditionalFormatCollection(this.context,o(this.context,this,"ConditionalFormats",!0,!1))),this.m_conditionalFormats},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"format",{get:function(){return this.m_format||(this.m_format=new n.RangeFormat(this.context,o(this.context,this,"Format",!1,!1))),this.m_format},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"sort",{get:function(){return this.m_sort||(this.m_sort=new n.RangeSort(this.context,o(this.context,this,"Sort",!1,!1))),this.m_sort},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"worksheet",{get:function(){return this.m_worksheet||(this.m_worksheet=new n.Worksheet(this.context,o(this.context,this,"Worksheet",!1,!1))),this.m_worksheet},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"address",{get:function(){return r("address",this.m_address,"Range",this._isNull),this.m_address},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"addressLocal",{get:function(){return r("addressLocal",this.m_addressLocal,"Range",this._isNull),this.m_addressLocal},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"cellCount",{get:function(){return r("cellCount",this.m_cellCount,"Range",this._isNull),this.m_cellCount},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"columnCount",{get:function(){return r("columnCount",this.m_columnCount,"Range",this._isNull),this.m_columnCount},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"columnHidden",{get:function(){return r("columnHidden",this.m_columnHidden,"Range",this._isNull),this.m_columnHidden},set:function(n){this.m_columnHidden=n;f(this.context,this,"ColumnHidden",n)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"columnIndex",{get:function(){return r("columnIndex",this.m_columnIndex,"Range",this._isNull),this.m_columnIndex},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"formulas",{get:function(){return r("formulas",this.m_formulas,"Range",this._isNull),this.m_formulas},set:function(n){(this.m_formulas=n,w(this,"Formulas",n))||(this.m_formulas=n,f(this.context,this,"Formulas",n))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"formulasLocal",{get:function(){return r("formulasLocal",this.m_formulasLocal,"Range",this._isNull),this.m_formulasLocal},set:function(n){(this.m_formulasLocal=n,w(this,"FormulasLocal",n))||(this.m_formulasLocal=n,f(this.context,this,"FormulasLocal",n))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"formulasR1C1",{get:function(){return r("formulasR1C1",this.m_formulasR1C1,"Range",this._isNull),this.m_formulasR1C1},set:function(n){(this.m_formulasR1C1=n,w(this,"FormulasR1C1",n))||(this.m_formulasR1C1=n,f(this.context,this,"FormulasR1C1",n))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"hidden",{get:function(){return r("hidden",this.m_hidden,"Range",this._isNull),this.m_hidden},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"numberFormat",{get:function(){return r("numberFormat",this.m_numberFormat,"Range",this._isNull),this.m_numberFormat},set:function(n){(this.m_numberFormat=n,w(this,"NumberFormat",n))||(this.m_numberFormat=n,f(this.context,this,"NumberFormat",n))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"rowCount",{get:function(){return r("rowCount",this.m_rowCount,"Range",this._isNull),this.m_rowCount},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"rowHidden",{get:function(){return r("rowHidden",this.m_rowHidden,"Range",this._isNull),this.m_rowHidden},set:function(n){this.m_rowHidden=n;f(this.context,this,"RowHidden",n)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"rowIndex",{get:function(){return r("rowIndex",this.m_rowIndex,"Range",this._isNull),this.m_rowIndex},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"text",{get:function(){return r("text",this.m_text,"Range",this._isNull),this.m_text},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"valueTypes",{get:function(){return r("valueTypes",this.m_valueTypes,"Range",this._isNull),this.m_valueTypes},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"values",{get:function(){return r("values",this.m_values,"Range",this._isNull),this.m_values},set:function(n){(this.m_values=n,w(this,"Values",n))||(this.m_values=n,f(this.context,this,"Values",n))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_ReferenceId",{get:function(){return r("_ReferenceId",this.m__ReferenceId,"Range",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),l.prototype.set=function(n,t){this._recursivelySet(n,t,["numberFormat","values","formulas","formulasLocal","formulasR1C1","rowHidden","columnHidden"],["format"],["conditionalFormats","sort","worksheet","conditionalFormats","sort","worksheet"])},l.prototype.calculate=function(){s(this.context,this,"Calculate",0,[])},l.prototype.clear=function(n){s(this.context,this,"Clear",0,[n])},l.prototype.delete=function(n){s(this.context,this,"Delete",0,[n])},l.prototype.getBoundingRect=function(i){return new n.Range(this.context,t(this.context,this,"GetBoundingRect",1,[i],!1,!0,null))},l.prototype.getCell=function(i,r){return new n.Range(this.context,t(this.context,this,"GetCell",1,[i,r],!1,!0,null))},l.prototype.getColumn=function(i){return new n.Range(this.context,t(this.context,this,"GetColumn",1,[i],!1,!0,null))},l.prototype.getColumnsAfter=function(i){if(!p()){if(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0)throw new OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove");return this._getAdjacentRange("getColumnsAfter",i,this.getLastColumn(),0,1)}return new n.Range(this.context,t(this.context,this,"GetColumnsAfter",1,[i],!1,!0,null))},l.prototype.getColumnsBefore=function(i){if(!p()){if(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0)throw new OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove");return this._getAdjacentRange("getColumnsBefore",i,this.getColumn(0),0,-1)}return new n.Range(this.context,t(this.context,this,"GetColumnsBefore",1,[i],!1,!0,null))},l.prototype.getEntireColumn=function(){return new n.Range(this.context,t(this.context,this,"GetEntireColumn",1,[],!1,!0,null))},l.prototype.getEntireRow=function(){return new n.Range(this.context,t(this.context,this,"GetEntireRow",1,[],!1,!0,null))},l.prototype.getIntersection=function(i){return new n.Range(this.context,t(this.context,this,"GetIntersection",1,[i],!1,!0,null))},l.prototype.getIntersectionOrNullObject=function(i){return new n.Range(this.context,t(this.context,this,"GetIntersectionOrNullObject",1,[i],!1,!0,null))},l.prototype.getLastCell=function(){return new n.Range(this.context,t(this.context,this,"GetLastCell",1,[],!1,!0,null))},l.prototype.getLastColumn=function(){return new n.Range(this.context,t(this.context,this,"GetLastColumn",1,[],!1,!0,null))},l.prototype.getLastRow=function(){return new n.Range(this.context,t(this.context,this,"GetLastRow",1,[],!1,!0,null))},l.prototype.getOffsetRange=function(i,r){return new n.Range(this.context,t(this.context,this,"GetOffsetRange",1,[i,r],!1,!0,null))},l.prototype.getResizedRange=function(i,r){if(!p()){this._ensureInteger(i,"getResizedRange");this._ensureInteger(r,"getResizedRange");var u=i>=0&&r>=0?this:this.getCell(0,0);return u.getBoundingRect(this.getLastCell().getOffsetRange(i,r))}return new n.Range(this.context,t(this.context,this,"GetResizedRange",1,[i,r],!1,!0,null))},l.prototype.getRow=function(i){return new n.Range(this.context,t(this.context,this,"GetRow",1,[i],!1,!0,null))},l.prototype.getRowsAbove=function(i){if(!p()){if(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0)throw new OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove");return this._getAdjacentRange("getRowsAbove",i,this.getRow(0),-1,0)}return new n.Range(this.context,t(this.context,this,"GetRowsAbove",1,[i],!1,!0,null))},l.prototype.getRowsBelow=function(i){if(!p()){if(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0)throw new OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove");return this._getAdjacentRange("getRowsBelow",i,this.getLastRow(),1,0)}return new n.Range(this.context,t(this.context,this,"GetRowsBelow",1,[i],!1,!0,null))},l.prototype.getUsedRange=function(i){return new n.Range(this.context,t(this.context,this,"GetUsedRange",1,[i],!1,!0,null))},l.prototype.getUsedRangeOrNullObject=function(i){return new n.Range(this.context,t(this.context,this,"GetUsedRangeOrNullObject",1,[i],!1,!0,null))},l.prototype.getVisibleView=function(){return new n.RangeView(this.context,t(this.context,this,"GetVisibleView",1,[],!1,!1,null))},l.prototype.insert=function(i){return new n.Range(this.context,t(this.context,this,"Insert",0,[i],!1,!0,null))},l.prototype.merge=function(n){s(this.context,this,"Merge",0,[n])},l.prototype.select=function(){s(this.context,this,"Select",1,[])},l.prototype.unmerge=function(){s(this.context,this,"Unmerge",0,[])},l.prototype._KeepReference=function(){s(this.context,this,"_KeepReference",1,[])},l.prototype._ValidateArraySize=function(n,t){s(this.context,this,"_ValidateArraySize",1,[n,t])},l.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;h(this,t);u(t.Address)||(this.m_address=t.Address);u(t.AddressLocal)||(this.m_addressLocal=t.AddressLocal);u(t.CellCount)||(this.m_cellCount=t.CellCount);u(t.ColumnCount)||(this.m_columnCount=t.ColumnCount);u(t.ColumnHidden)||(this.m_columnHidden=t.ColumnHidden);u(t.ColumnIndex)||(this.m_columnIndex=t.ColumnIndex);u(t.Formulas)||(this.m_formulas=t.Formulas);u(t.FormulasLocal)||(this.m_formulasLocal=t.FormulasLocal);u(t.FormulasR1C1)||(this.m_formulasR1C1=t.FormulasR1C1);u(t.Hidden)||(this.m_hidden=t.Hidden);u(t.NumberFormat)||(this.m_numberFormat=t.NumberFormat);u(t.RowCount)||(this.m_rowCount=t.RowCount);u(t.RowHidden)||(this.m_rowHidden=t.RowHidden);u(t.RowIndex)||(this.m_rowIndex=t.RowIndex);u(t.Text)||(this.m_text=t.Text);u(t.ValueTypes)||(this.m_valueTypes=t.ValueTypes);u(t.Values)||(this.m_values=t.Values);u(t._ReferenceId)||(this.m__ReferenceId=t._ReferenceId);a(this,t,["conditionalFormats","ConditionalFormats","format","Format","sort","Sort","worksheet","Worksheet"])}},l.prototype.load=function(n){return c(this,n),this},l.prototype._handleIdResult=function(n){(i.prototype._handleIdResult.call(this,n),e(n))||u(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId)},l.prototype.track=function(){return this.context.trackedObjects.add(this),this},l.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},l.prototype.toJSON=function(){return{address:this.m_address,addressLocal:this.m_addressLocal,cellCount:this.m_cellCount,columnCount:this.m_columnCount,columnHidden:this.m_columnHidden,columnIndex:this.m_columnIndex,format:this.m_format,formulas:this.m_formulas,formulasLocal:this.m_formulasLocal,formulasR1C1:this.m_formulasR1C1,hidden:this.m_hidden,numberFormat:this.m_numberFormat,rowCount:this.m_rowCount,rowHidden:this.m_rowHidden,rowIndex:this.m_rowIndex,text:this.m_text,values:this.m_values,valueTypes:this.m_valueTypes}},l}(OfficeExtension.ClientObject);n.Range=k;ot=function(i){function s(){i.apply(this,arguments)}return __extends(s,i),Object.defineProperty(s.prototype,"_className",{get:function(){return"RangeView"},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rows",{get:function(){return this.m_rows||(this.m_rows=new n.RangeViewCollection(this.context,o(this.context,this,"Rows",!0,!1))),this.m_rows},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"cellAddresses",{get:function(){return r("cellAddresses",this.m_cellAddresses,"RangeView",this._isNull),this.m_cellAddresses},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"columnCount",{get:function(){return r("columnCount",this.m_columnCount,"RangeView",this._isNull),this.m_columnCount},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulas",{get:function(){return r("formulas",this.m_formulas,"RangeView",this._isNull),this.m_formulas},set:function(n){this.m_formulas=n;f(this.context,this,"Formulas",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulasLocal",{get:function(){return r("formulasLocal",this.m_formulasLocal,"RangeView",this._isNull),this.m_formulasLocal},set:function(n){this.m_formulasLocal=n;f(this.context,this,"FormulasLocal",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulasR1C1",{get:function(){return r("formulasR1C1",this.m_formulasR1C1,"RangeView",this._isNull),this.m_formulasR1C1},set:function(n){this.m_formulasR1C1=n;f(this.context,this,"FormulasR1C1",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"index",{get:function(){return r("index",this.m_index,"RangeView",this._isNull),this.m_index},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"numberFormat",{get:function(){return r("numberFormat",this.m_numberFormat,"RangeView",this._isNull),this.m_numberFormat},set:function(n){this.m_numberFormat=n;f(this.context,this,"NumberFormat",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rowCount",{get:function(){return r("rowCount",this.m_rowCount,"RangeView",this._isNull),this.m_rowCount},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"text",{get:function(){return r("text",this.m_text,"RangeView",this._isNull),this.m_text},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"valueTypes",{get:function(){return r("valueTypes",this.m_valueTypes,"RangeView",this._isNull),this.m_valueTypes},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"values",{get:function(){return r("values",this.m_values,"RangeView",this._isNull),this.m_values},set:function(n){this.m_values=n;f(this.context,this,"Values",n)},enumerable:!0,configurable:!0}),s.prototype.set=function(n,t){this._recursivelySet(n,t,["numberFormat","values","formulas","formulasLocal","formulasR1C1"],[],["rows","rows"])},s.prototype.getRange=function(){return new n.Range(this.context,t(this.context,this,"GetRange",1,[],!1,!0,null))},s.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;h(this,t);u(t.CellAddresses)||(this.m_cellAddresses=t.CellAddresses);u(t.ColumnCount)||(this.m_columnCount=t.ColumnCount);u(t.Formulas)||(this.m_formulas=t.Formulas);u(t.FormulasLocal)||(this.m_formulasLocal=t.FormulasLocal);u(t.FormulasR1C1)||(this.m_formulasR1C1=t.FormulasR1C1);u(t.Index)||(this.m_index=t.Index);u(t.NumberFormat)||(this.m_numberFormat=t.NumberFormat);u(t.RowCount)||(this.m_rowCount=t.RowCount);u(t.Text)||(this.m_text=t.Text);u(t.ValueTypes)||(this.m_valueTypes=t.ValueTypes);u(t.Values)||(this.m_values=t.Values);a(this,t,["rows","Rows"])}},s.prototype.load=function(n){return c(this,n),this},s.prototype.toJSON=function(){return{cellAddresses:this.m_cellAddresses,columnCount:this.m_columnCount,formulas:this.m_formulas,formulasLocal:this.m_formulasLocal,formulasR1C1:this.m_formulasR1C1,index:this.m_index,numberFormat:this.m_numberFormat,rowCount:this.m_rowCount,text:this.m_text,values:this.m_values,valueTypes:this.m_valueTypes}},s}(OfficeExtension.ClientObject);n.RangeView=ot;st=function(i){function u(){i.apply(this,arguments)}return __extends(u,i),Object.defineProperty(u.prototype,"_className",{get:function(){return"RangeViewCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"items",{get:function(){return r("items",this.m__items,"RangeViewCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),u.prototype.getCount=function(){var t=s(this.context,this,"GetCount",1,[]),n=new OfficeExtension.ClientResult;return l(this,t,n),n},u.prototype.getItemAt=function(i){return new n.RangeView(this.context,t(this.context,this,"GetItemAt",1,[i],!1,!1,null))},u.prototype._handleResult=function(t){var u,f,r,o;if((i.prototype._handleResult.call(this,t),!e(t))&&(u=t,h(this,u),!e(u[OfficeExtension.Constants.items])))for(this.m__items=[],f=u[OfficeExtension.Constants.items],r=0;r6&&i.slice(0,5)===t.DateJSONPrefix&&i.slice(-1)===t.DateJSONSuffix&&(r=new Date(parseInt(i.slice(5,-1))),r)?r:i})},t._replaceDateWithStringDate=function(n){var i=JSON.stringify(n,function(n,i){return this[n]instanceof Date?t.DateJSONPrefix+this[n].getTime()+t.DateJSONSuffix:i});return JSON.parse(i)},Object.defineProperty(t.prototype,"key",{get:function(){return r("key",this.m_key,"Setting",this._isNull),this.m_key},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return r("value",this.m_value,"Setting",this._isNull),this.m_value},set:function(n){if(!e(n)){this.m_value=n;var i=t._replaceDateWithStringDate(n);f(this.context,this,"Value",i);return}this.m_value=n;f(this.context,this,"Value",n)},enumerable:!0,configurable:!0}),t.prototype.set=function(n,t){this._recursivelySet(n,t,["value"],[],[])},t.prototype.delete=function(){s(this.context,this,"Delete",0,[])},t.prototype._handleResult=function(i){if(n.prototype._handleResult.call(this,i),!e(i)){var r=i;h(this,r);u(r.Key)||(this.m_key=r.Key);u(r.Value)||(this.m_value=r.Value,this.m_value=t.replaceStringDateWithDate(this.m_value))}},t.prototype.load=function(n){return c(this,n),this},t.prototype.toJSON=function(){return{key:this.m_key,value:this.m_value}},t.DateJSONPrefix="Date(",t.DateJSONSuffix=")",t}(OfficeExtension.ClientObject);n.Setting=g;ct=function(i){function u(){i.apply(this,arguments)}return __extends(u,i),Object.defineProperty(u.prototype,"_className",{get:function(){return"NamedItemCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"items",{get:function(){return r("items",this.m__items,"NamedItemCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),u.prototype.add=function(i,r,u){return new n.NamedItem(this.context,t(this.context,this,"Add",0,[i,r,u],!1,!0,null))},u.prototype.addFormulaLocal=function(i,r,u){return new n.NamedItem(this.context,t(this.context,this,"AddFormulaLocal",0,[i,r,u],!1,!1,null))},u.prototype.getCount=function(){var t=s(this.context,this,"GetCount",1,[]),n=new OfficeExtension.ClientResult;return l(this,t,n),n},u.prototype.getItem=function(t){return new n.NamedItem(this.context,y(this.context,this,[t]))},u.prototype.getItemOrNullObject=function(i){return new n.NamedItem(this.context,t(this.context,this,"GetItemOrNullObject",1,[i],!1,!1,null))},u.prototype._handleResult=function(t){var u,f,r,o;if((i.prototype._handleResult.call(this,t),!e(t))&&(u=t,h(this,u),!e(u[OfficeExtension.Constants.items])))for(this.m__items=[],f=u[OfficeExtension.Constants.items],r=0;r"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"error",{get:function(){return r("error",this.m_error,"FunctionResult",this._isNull),this.m_error},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return r("value",this.m_value,"FunctionResult",this._isNull),this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){if(n.prototype._handleResult.call(this,t),!e(t)){var i=t;h(this,i);u(i.Error)||(this.m_error=i.Error);u(i.Value)||(this.m_value=i.Value)}},t.prototype.load=function(n){return c(this,n),this},t.prototype.toJSON=function(){return{error:this.m_error,value:this.m_value}},t}(OfficeExtension.ClientObject);n.FunctionResult=i;pu=function(n){function r(){n.apply(this,arguments)}return __extends(r,n),Object.defineProperty(r.prototype,"_className",{get:function(){return"Functions"},enumerable:!0,configurable:!0}),r.prototype.abs=function(n){return new i(this.context,t(this.context,this,"Abs",0,[n],!1,!0,null))},r.prototype.accrInt=function(n,r,u,f,e,o,s,h){return new i(this.context,t(this.context,this,"AccrInt",0,[n,r,u,f,e,o,s,h],!1,!0,null))},r.prototype.accrIntM=function(n,r,u,f,e){return new i(this.context,t(this.context,this,"AccrIntM",0,[n,r,u,f,e],!1,!0,null))},r.prototype.acos=function(n){return new i(this.context,t(this.context,this,"Acos",0,[n],!1,!0,null))},r.prototype.acosh=function(n){return new i(this.context,t(this.context,this,"Acosh",0,[n],!1,!0,null))},r.prototype.acot=function(n){return new i(this.context,t(this.context,this,"Acot",0,[n],!1,!0,null))},r.prototype.acoth=function(n){return new i(this.context,t(this.context,this,"Acoth",0,[n],!1,!0,null))},r.prototype.amorDegrc=function(n,r,u,f,e,o,s){return new i(this.context,t(this.context,this,"AmorDegrc",0,[n,r,u,f,e,o,s],!1,!0,null))},r.prototype.amorLinc=function(n,r,u,f,e,o,s){return new i(this.context,t(this.context,this,"AmorLinc",0,[n,r,u,f,e,o,s],!1,!0,null))},r.prototype.and=function(){for(var r=[],n=0;n0?i.push(t):t.tabIndex===0&&r.push(t):r.push(t);return i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;return r===0&&(r=i.indexOf(n)-i.indexOf(t)),r}),[].concat(i,r)}var o="focus",s="on",k="configurable",d="writable",h="enumerable",u="",c="undefined",t=!1,i=!0,l=2147483647,n=null,r=-1,a=r,g="&_xdm_Info=",nt="&_serializer_version=",tt="_xdm_",ft="_serializer_version=",v="#",it="&",f="class",y={},et=3e4,p=n,w=n,e=(new Date).getTime();return{set_entropy:function(n){var t,r,i;if(typeof n=="string")for(t=0;t6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(r)===OSF.DDA.SettingsManager.DataJSONSuffix&&(i=new Date(parseInt(t.slice(5,r))),i)?i:t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,i);f[u]=t}catch(e){}}return f},loadScript:function(r,u,f){var s,e,o,h,c;r&&u&&(s=window.document,e=y[r],e?e.loaded?u():e.pendingCallbacks.push(u):(o=s.createElement("script"),o.type="text/javascript",e={loaded:t,pendingCallbacks:[u],timer:n},y[r]=e,h=function(){var r,t,u;for(e.timer!=n&&(clearTimeout(e.timer),delete e.timer),e.loaded=i,r=e.pendingCallbacks.length,t=0;t1?l[l.length-1]:n,s,h,c,a;return u&&o!=n&&(o.indexOf(it)>=0&&(o=o.split(it)[0]),o=decodeURIComponent(o)),s=b(),!f&&s&&(h=window.name.indexOf(i),h>r&&(c=window.name.indexOf(";",h),c==r&&(c=window.name.length),a=window.name.substring(h,c),o?s.setItem(a,o):o=s.getItem(a))),o},getConversationId:function(){var i=window.location.search,t=n,r;return i&&(r=i.indexOf("&"),t=r>0?i.substring(1,r):i.substr(1),t&&t.charAt(t.length-1)==="="&&(t=t.substring(0,t.length-1),t&&(t=decodeURIComponent(t)))),t},getInfoItems:function(n){var t=n.split("$");return typeof t[1]==c&&(t=n.split("|")),typeof t[1]==c&&(t=n.split("%7C")),t},getXdmFieldValue:function(n,t){var r=u,f=OSF.OUtil.parseXdmInfo(t),i;if(f&&(i=OSF.OUtil.getInfoItems(f),i!=undefined&&i.length>=3))switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]),f;if(u)throw u;for(f in r)if(u=Function._validateParameter(n[f],r[f],f),u)throw u;},writeProfilerMark:function(n){window.msWriteProfilerMark&&(window.msWriteProfilerMark(n),OsfMsAjaxFactory.msAjaxDebug.trace(n))},outputDebug:function(n){typeof OsfMsAjaxFactory!==c&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){var e,f;r=r||{};for(e in u)f=u[e],r[f]==undefined&&(r[f]=i);return Object.defineProperty(n,t,r),n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[h])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[h])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[d,h,k])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[d,h,k])},finalizeProperties:function(n,r){var e,u;r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8,e=o&255,i[t++]=r>>2,i[t++]=(r&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63,isNaN(o)||(r=o>>8,f=h&255,e=h>>8,i[t++]=r>>2,i[t++]=(r&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63),isNaN(o)?i[t-1]=64:isNaN(h)&&(i[t-2]=64,i[t-1]=64),c=0;c0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){var u,i,f,r;if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(u=[],i=0;in)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=ut(u),e=f?u.length-1:0,u.length===0)return n;while(!h&&e>=0&&en)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=ut(u),l=y(u,f),s=v(u.length,l,e),s<0)return n;while(!c&&s>=0&&s0;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[r%16],r=Math.floor(r/16);for(;t<32;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[Math.floor(Math.random()*16)];return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3};OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611,WordAndroid:8388613,PowerpointAndroid:8388614};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",Reserved:"reserved",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData",Base64:"base64"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidOpenBrowserWindow:102,dispidCreateDocumentMethod:105,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];return i?(i.name||(i.name=n[this.errorCodes.ooeInternalError].name),i.message||(i.message=n[this.errorCodes.ooeInternalError].message)):i=n[this.errorCodes.ooeInternalError],i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:t.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:t.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:t.L_SSOConnectionLostError,message:t.L_SSOConnectionLostErrorMessage}}}}(),function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}(),r,i,h,u,c,l,f,a,e,v,y,p,w,b,o,k,d,g,s,nt,tt,it,rt;n.RequirementVersion=ut;r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){var f,u,e,i,r;if(n==undefined)return!1;if(t==undefined&&(t=0),f=this._setMap,u=f._sets,u.hasOwnProperty(n.toLowerCase())){e=u[n.toLowerCase()];try{if((i=this._getVersion(e),t=t+"",r=this._getVersion(t),i.major>0&&i.major>r.major)||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),i=0,r=0;if(t.length<2&&isNaN(Number(n)))throw u;else if(i=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(i)||isNaN(r))throw u;return{minor:r,major:i}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;h=function(n){function i(){n.call(this,{dialogapi:t})}return __extends(i,n),i}(i);n.DefaultDialogSetRequirement=h;u=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelClientDefaultSetRequirement=u;c=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(u);n.ExcelClientV1DefaultSetRequirement=c;l=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookClientDefaultSetRequirement=l;f=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return __extends(i,n),i}(i);n.WordClientDefaultSetRequirement=f;a=function(n){function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return __extends(i,n),i}(f);n.WordClientV1DefaultSetRequirement=a;e=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointClientDefaultSetRequirement=e;v=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(e);n.PowerpointClientV1DefaultSetRequirement=v;y=function(n){function i(){n.call(this,{selection:t,textcoercion:t})}return __extends(i,n),i}(i);n.ProjectClientDefaultSetRequirement=y;p=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return __extends(i,n),i}(i);n.ExcelWebDefaultSetRequirement=p;w=function(n){function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordWebDefaultSetRequirement=w;b=function(n){function i(){n.call(this,{activeview:t,settings:t})}return __extends(i,n),i}(i);n.PowerpointWebDefaultSetRequirement=b;o=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookWebDefaultSetRequirement=o;k=function(n){function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.SwayWebDefaultSetRequirement=k;d=function(n){function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return __extends(i,n),i}(i);n.AccessWebDefaultSetRequirement=d;g=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelIOSDefaultSetRequirement=g;s=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordIOSDefaultSetRequirement=s;nt=function(n){function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return __extends(t,n),t}(s);n.WordIOSV1DefaultSetRequirement=nt;tt=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointIOSDefaultSetRequirement=tt;it=function(n){function i(){n.call(this,{mailbox:t})}return __extends(i,n),i}(i);n.OutlookIOSDefaultSetRequirement=it;rt=function(){function n(){}var t="undefined";return n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},n.getDefaultRequirementMatrix=function(u){var f,e,s,o;return this.initializeDefaultSetMatrix(),f=undefined,e=u.get_requirementMatrix(),e!=undefined&&e.length>0&&typeof JSON!==t?(s=JSON.parse(u.get_requirementMatrix().toLowerCase()),f=new r(new i(s))):(o=n.getClientFullVersionString(u),f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[o]!=undefined?new r(n.DefaultSetArrayMatrix[o]):new r(new i({}))),f},n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix(),e;return f!=undefined&&f.length>0&&typeof JSON!==t?(e=JSON.parse(n.get_requirementMatrix().toLowerCase()),u=new r(new i(e))):u=new r(new h),u},n.getClientFullVersionString=function(n){var i=n.get_appMinorVersion(),u="",r="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;return f&&n.get_appVersion()==1?r=t==4096&&i>=15?"16.00.01":"16.00":n.get_appName()==64?r=n.get_appVersion():(u=i<10?"0"+i:""+i,r=n.get_appVersion()+"."+u),n.get_appName()+"-"+r},n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new c;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new v;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new l;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new w;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new b;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new g;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new k;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new nt;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new tt;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new it},n.Excel_RCLIENT_1600="1-16.00",n.Excel_RCLIENT_1601="1-16.01",n.Word_RCLIENT_1600="2-16.00",n.Word_RCLIENT_1601="2-16.01",n.PowerPoint_RCLIENT_1600="4-16.00",n.PowerPoint_RCLIENT_1601="4-16.01",n.Outlook_RCLIENT_1600="8-16.00",n.Excel_WAC_1600="16-16.00",n.Word_WAC_1600="32-16.00",n.Outlook_WAC_1600="64-16.00",n.Outlook_WAC_1601="64-16.01",n.Project_RCLIENT_1600="128-16.00",n.Access_WAC_1600="256-16.00",n.PowerPoint_WAC_1600="512-16.00",n.Excel_IOS_1600="1024-16.00",n.SWAY_WAC_1600="2048-16.00",n.Word_IOS_1600="4096-16.00",n.Word_IOS_16001="4096-16.00.01",n.PowerPoint_IOS_1600="8192-16.00",n.Outlook_IOS_1600="65536-16.00",n.DefaultSetArrayMatrix={},n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))}(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}return n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n},n.getInstance=function(){return n.hostObj===undefined&&(n.hostObj=new n),n.hostObj},n.prototype.getPlatform=function(){var n=this,t;return n.hostInfo.hostPlatform&&(t=n.hostInfo.hostPlatform.toLowerCase(),n.platformRemappings[t])?n.platformRemappings[t]:null},n.prototype.getHost=function(){var n=this,t;if(n.hostInfo.hostType){if(t=n.hostInfo.hostType.toLowerCase(),n.camelCaseMappings[t])return n.camelCaseMappings[t];if(t=n.capitalizeFirstLetter(n.hostInfo.hostType),Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null},n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null},n}();n.Host=t})(t=n.HostName||(n.HostName={}))}(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){n||(window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,n=!0)},disableShortcut:function(){n&&(t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window),n=!1)}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i,r,o,u,f,e;if(n&&typeof n=="string"&&(r=n.indexOf("#"),r!=-1)){o=n.substring(0,r);u=n.substring(r+1);switch(o){case"binding":case"bindings":u&&(i=new OSF.DDA.BindingPromise(u))}}if(i)return i.onFail=t,i;else if(t)if(f=typeof t,f=="function")e={},e[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(e,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext));else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f);};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this,s,e;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.auth&&OSF.OUtil.defineEnumerableProperty(f,"auth",{value:n.auth});n.application&&OSF.OUtil.defineEnumerableProperty(f,"application",{value:n.application});n.get_isDialog()?(e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e})):(t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t}),r&&(s=r.displayName||"appOM",delete r.displayName,OSF.OUtil.defineEnumerableProperty(f,s,{value:r})),u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}}),e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e}))};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Application=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this,u;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;return OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext()),n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,e=n.length,o=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){var u,i,r;for(u in n){if(i=n[u],r=t[u],i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw o();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw o();}};f.extractRequiredArguments=function(t,i,r){var f,u,h,s,c,l;if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(c=n.length-1;c>=s;c--){l=n[c];switch(typeof l){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=l;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}if(f=o.fillOptions(f,i,r,u),e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;return o.verifyArguments(t,f),f}var h="function",s=n.length,o=new OSF.DDA.ApiMethodCall(n,t,i,f,e);this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),u=c(n,r,t,i);return o.constructCallArgs(r,u,t,i)};this.processResponse=function(n,t,i,f){return n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n)};this.getCallArgs=function(n){for(var t,u,r,i=n.length-1;i>=s;i--){r=n[i];switch(typeof r){case"object":t=r;break;case h:u=r}}return t=t||{},u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u),t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],i=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],t,i,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback],u,r;f&&(u={},u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?u[OSF.DDA.AsyncResultEnum.Properties.Value]=i:(r={},i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i),f(new OSF.DDA.AsyncResult(u,r)))};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.SyncMethodNames[t]=i};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){function o(n,i,r,u){var o,c,s,h;if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(s=n.length-1;s>=e;s--){h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}return o=f.fillOptions(o,i,r,u),f.verifyArguments(t,o),o}var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),u=o(n,r,t,i);return f.constructCallArgs(r,u,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){function e(i,f){var a=i?{}:undefined,s,h,o,v,c,l;for(s in i){if(h=i[s],OSF.DDA.ListType.isListType(s)){o=[];for(v in h)o.push(e(h[v],f))}else OSF.OUtil.listContainsKey(r,s)?o=r[s][f](h):f==u&&n.preserveNesting(s)?o=e(h,f):(c=t[s],c?(l=c[f],l&&(o=l[h],o===undefined&&(o=h))):o=h);a[s]=o}return a}function l(i,r){var e,u,h,s;for(u in r)h=n.isComplexType(u)?l(i,t[u][o]):i[u],h!=undefined&&(e||(e={}),s=r[u],s==f&&(s=u),e[s]=n.pack(u,h));return e}function s(i,r,e){var o,a,h,l,p,v,y;e||(e={});for(o in r){if(a=r[o],a==f)h=i;else if(a==c){e[o]=i.toArray();continue}else h=i[a];if(h===null||h===undefined)e[o]=undefined;else if(h=n.unpack(o,h),n.isComplexType(o))l=t[o][u],n.preserveNesting(o)?e[o]=s(h,l):s(h,l,e);else if(OSF.DDA.ListType.isListType(o)){l={};p=OSF.DDA.ListType.getDescriptor(o);l[p]=f;v=new Array(h.length);for(y in h)v[y]=s(h[y],l);e[o]=v}else e[o]=h}return e}function a(n,i,r){var f=t[n][r],u,o,c;return r=="toHost"?(o=e(i,r),u=l(o,f)):r==h&&(c=s(i,f),u=e(c,r)),u}var h="fromHost",i=this,o="toHost",u=h,c="sourceData",f="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];t||(t={});i.addMapping=function(n,i){var e,h,c,l,r,s,a,v;if(i.map){e=i.map;h={};for(c in e)l=e[c],l==f&&(l=c),h[l]=c}else e=i.toHost,h=i.fromHost;if(r=t[n],r){s=r[o];for(a in s)e[a]=s[a];s=r[u];for(v in s)h[v]=s[v]}else r=t[n]={};r[o]=e;r[u]=h};i.toHost=function(n,t){return a(n,t,o)};i.fromHost=function(n,t){return a(n,t,u)};i.self=f;i.sourceData=c;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){return this.isDynamicType(n)?t[n].toHost(i):i};i.unpack=function(n,i){return this.isDynamicType(n)?t[n].fromHost(i):i}};OSF.DDA.getDecoratedParameterMap=function(n,t){function r(n){var i=null,r,t;if(n)for(i={},r=n.length,t=0;t0){for(r=[],i=0;i=s)break;if(f=Function._validateParameter(n[e],o,h),f)return f.popStackFrame(),f}return t}),Function._validateParameterCount||(Function._validateParameterCount=function(n,r,u){var f,s,e=r.length,h=n.length,c,l,a;if(he)for(s=i,f=0;f0&&t.push(u)}}catch(s){}return t}var i=[],t={};t[Microsoft.Office.WebExtension.Parameters.Data]=function(){var t=0,i=1;return{toHost:function(n){if(OSF.DDA.TableDataProperties&&typeof n!="string"&&n[OSF.DDA.TableDataProperties.TableRows]!==undefined){var r=[];r[t]=n[OSF.DDA.TableDataProperties.TableRows];r[i]=n[OSF.DDA.TableDataProperties.TableHeaders];n=r}return n},fromHost:function(r){var f,e,u;return r.toArray?(e=r.dimensions(),e===2?f=n(r):(u=r.toArray(),u.length===2&&(u[0]!=null&&u[0].toArray||u[1]!=null&&u[1].toArray)?(f={},f[OSF.DDA.TableDataProperties.TableRows]=n(u[t]),f[OSF.DDA.TableDataProperties.TableHeaders]=n(u[i])):f=u)):f=r,f}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,i,t);this.unpack=function(n,i){var r,u;return this.isComplexType(n)||OSF.DDA.ListType.isListType(n)?(u=(i||typeof i=="unknown")&&i.toArray,r=u?i.toArray():i||{}):r=this.isDynamicType(n)?t[n].fromHost(i):i,r}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(n){function t(n){var i=n,f,r,u;if(OSF.OUtil.isArray(n))for(f=i.length,r=0;r2)for(r=[],f=1;f=2&&(u=t[0],i=t[1]),r?r(new n.WebViewSafeArray(i)):void 0};this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.Execute,f,e)},t.prototype.registerEvent=function(t,i,r,u){var f=function(t){var i=t,u=0;OSF.OUtil.isArray(t)&&t.length>=2&&(u=t[0],i=t[1]);r&&r(u,new n.WebViewSafeArray(i))},e=function(t){if(u)return u(new n.WebViewSafeArray(t))};this.hostScriptProxy.registerEvent(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.RegisterEvent,t,i,f,e)},t.prototype.unregisterEvent=function(t,i,r){var u=function(t){return r(new n.WebViewSafeArray(t))};this.hostScriptProxy.unregisterEvent(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.UnregisterEvent,t,i,u)},t.prototype.messageParent=function(n){var t=n[Microsoft.Office.WebExtension.Parameters.MessageToParent];!isNaN(parseFloat(t))&&isFinite(t)&&(t=t.toString());this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.MessageParent,t,null)},t.prototype.openDialog=function(n,t,i,r){var u=JSON.parse(t);(isNaN(u.width)||u.width<=0||!u.useDeviceIndependentPixels&&u.width>100)&&(u.width=99);(isNaN(u.height)||u.height<=0||!u.useDeviceIndependentPixels&&u.height>100)&&(u.height=99);t=JSON.stringify(u);this.registerEvent(n,t,i,r)},t.prototype.closeDialog=function(n,t,i){this.unregisterEvent(n,t,i)},t.prototype.sendMessage=function(n){var t=n[Microsoft.Office.WebExtension.Parameters.MessageContent];!isNaN(parseFloat(t))&&isFinite(t)&&(t=t.toString());this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.SendMessage,t,null)},t}();n.WebViewHostController=t}(OSFWebView||(OSFWebView={})),function(n){(function(n){var t="EventCallback",i="MethodCallback";n[n[i]=0]=i;n[n[t]=1]=t})(n.CallbackType||(n.CallbackType={}));var i=n.CallbackType,t=function(){function n(n,t,i){this.callbackType=n;this.callbackId=t;this.params=i}return n}();n.CallbackData=t}(CrossIFrameCommon||(CrossIFrameCommon={})),function(n){var t=function(){function n(){window.addEventListener("message",this.OnReceiveMessage)}return n.prototype.postMessage=function(n,t){window.parent.postMessage(t,"*")},n.prototype.OnReceiveMessage=function(n){if(n.source==window.parent&&window.parent==window.top&&n.origin.startsWith("ms-appx-web://")){var t;try{t=JSON.parse(n.data)}catch(i){return}switch(t.callbackType){case CrossIFrameCommon.CallbackType.MethodCallback:OSFWebView.ScriptMessaging.agaveHostCallback(t.callbackId,JSON.parse(t.params));break;case CrossIFrameCommon.CallbackType.EventCallback:OSFWebView.ScriptMessaging.agaveHostEventCallback(t.callbackId,JSON.parse(t.params))}}},n}();n.Poster=t}(WinRT||(WinRT={}));OSF.DDA.ClientSettingsManager={getSettingsExecuteMethod:function(n){return function(t){var i,r,u=function(n,i){t.onReceiving&&t.onReceiving();t.onComplete&&t.onComplete(n,i)};try{n(t.hostCallArgs,t.onCalling,u)}catch(f){i=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;r={name:Strings.OfficeOM.L_InternalError,message:f};u(i,r)}}},read:function(n,t){var u=[],f=[],i,r;n&&n();i=OSF._OfficeAppFactory.getInitializationHelper();r=function(n){t&&t(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,n.get_settings())};i.getAppContext(null,r)},write:function(n,t,i,r){var u={},e=[],o=[],f,s;for(f in n)e.push(f),o.push(n[f]);u.keys=e;u.values=o;i&&i();s=function(n){r&&r(n[0],null)};OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.WriteSettings,u,s)}};OSF.InitializationHelper.prototype.initializeSettings=function(n,t){var i=n.get_settings();return this.deserializeSettings(i,t)};OSF.InitializationHelper.prototype.getAppContext=function(n,t){var r=function(n){var f,i=OSF.WebView.AppContextProperties,e=n[i.AppType],o=!1;for(var l in OSF.AppName)if(OSF.AppName[l]==e){o=!0;break}if(!o)throw"Unsupported client type "+e;for(var s=n[i.Settings],h={},c=s[0],a=s[1],r=0;r0&&OSF.OUtil.focusToFirstTabbable(n,!1)}}catch(i){OsfMsAjaxFactory.msAjaxDebug.trace("Setting Agave default focus failed. Exception:"+i)}};document.body?n():document.addEventListener("DOMContentLoaded",n);window.addEventListener("blur",function(){try{document.activeElement&&document.activeElement.blur()}catch(n){OsfMsAjaxFactory.msAjaxDebug.trace("Clearing Agave focus failed. Exception:"+n)}})};OSF.WebView=OSFWebView;OSF.ClientHostController=new OSFWebView.WebViewHostController(OSF.ScriptMessaging.GetScriptMessenger("agaveHostCallback","agaveHostEventCallback",new WinRT.Poster)),function(n){var u="ResponseTime",f="Message",i="SessionId",r="CorrelationId",t=!0,e=function(){function n(n){this._table=n;this._fields={}}return Object.defineProperty(n.prototype,"Fields",{get:function(){return this._fields},enumerable:t,configurable:t}),Object.defineProperty(n.prototype,"Table",{get:function(){return this._table},enumerable:t,configurable:t}),n.prototype.SerializeFields=function(){},n.prototype.SetSerializedField=function(n,t){typeof t!="undefined"&&t!==null&&(this._serializedFields[n]=t.toString())},n.prototype.SerializeRow=function(){var n=this;return n._serializedFields={},n.SetSerializedField("Table",n._table),n.SerializeFields(),JSON.stringify(n._serializedFields)},n}(),o,s,h,c,l;n.BaseUsageData=e;o=function(n){function u(){n.call(this,"AppActivated")}var e="IsFromWacAutomation",o="WacHostEnvironment",s="HostJSVersion",h="OfficeJSVersion",c="DocUrl",l="AppSizeHeight",a="AppSizeWidth",v="ClientId",y="HostVersion",p="Host",w="UserId",b="Browser",k="AssetId",d="AppURL",g="AppInstanceId",nt="AppId";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,nt,{get:function(){return this.Fields[nt]},set:function(n){this.Fields[nt]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,g,{get:function(){return this.Fields[g]},set:function(n){this.Fields[g]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,d,{get:function(){return this.Fields[d]},set:function(n){this.Fields[d]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,k,{get:function(){return this.Fields[k]},set:function(n){this.Fields[k]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,b,{get:function(){return this.Fields[b]},set:function(n){this.Fields[b]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,w,{get:function(){return this.Fields[w]},set:function(n){this.Fields[w]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,p,{get:function(){return this.Fields[p]},set:function(n){this.Fields[p]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,y,{get:function(){return this.Fields[y]},set:function(n){this.Fields[y]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,v,{get:function(){return this.Fields[v]},set:function(n){this.Fields[v]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,a,{get:function(){return this.Fields[a]},set:function(n){this.Fields[a]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,l,{get:function(){return this.Fields[l]},set:function(n){this.Fields[l]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,c,{get:function(){return this.Fields[c]},set:function(n){this.Fields[c]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(nt,n.AppId);n.SetSerializedField(g,n.AppInstanceId);n.SetSerializedField(d,n.AppURL);n.SetSerializedField(k,n.AssetId);n.SetSerializedField(b,n.Browser);n.SetSerializedField(w,n.UserId);n.SetSerializedField(p,n.Host);n.SetSerializedField(y,n.HostVersion);n.SetSerializedField(v,n.ClientId);n.SetSerializedField(a,n.AppSizeWidth);n.SetSerializedField(l,n.AppSizeHeight);n.SetSerializedField(f,n.Message);n.SetSerializedField(c,n.DocUrl);n.SetSerializedField(h,n.OfficeJSVersion);n.SetSerializedField(s,n.HostJSVersion);n.SetSerializedField(o,n.WacHostEnvironment);n.SetSerializedField(e,n.IsFromWacAutomation)},u}(e);n.AppActivatedUsageData=o;s=function(n){function f(){n.call(this,"ScriptLoad")}var e="StartTime",o="ScriptId";return __extends(f,n),Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t}),f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(o,n.ScriptId);n.SetSerializedField(e,n.StartTime);n.SetSerializedField(u,n.ResponseTime)},f}(e);n.ScriptLoadUsageData=s;h=function(n){function u(){n.call(this,"AppClosed")}var f="CloseMethod",e="OpenTime",o="AppSizeFinalHeight",s="AppSizeFinalWidth",h="FocusTime";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(h,n.FocusTime);n.SetSerializedField(s,n.AppSizeFinalWidth);n.SetSerializedField(o,n.AppSizeFinalHeight);n.SetSerializedField(e,n.OpenTime);n.SetSerializedField(f,n.CloseMethod)},u}(e);n.AppClosedUsageData=h;c=function(n){function f(){n.call(this,"APIUsage")}var e="ErrorType",o="Parameters",s="APIID",h="APIType";return __extends(f,n),Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(h,n.APIType);n.SetSerializedField(s,n.APIID);n.SetSerializedField(o,n.Parameters);n.SetSerializedField(u,n.ResponseTime);n.SetSerializedField(e,n.ErrorType)},f}(e);n.APIUsageUsageData=c;l=function(n){function u(){n.call(this,"AppInitialization")}var e="SuccessCode";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(e,n.SuccessCode);n.SetSerializedField(f,n.Message)},u}(e);n.AppInitializationUsageData=l}(OSFLog||(OSFLog={})),function(n){"use strict";function u(){OSF.Logger&&OSF.Logger.ulsEndpoint&&OSF.Logger.ulsEndpoint.loadProxyFrame()}function f(n,t,i){if(OSF.Logger&&OSF.Logger.ulsEndpoint){var r={traceLevel:n,message:t,flag:i,internalLog:!0},u=JSON.stringify(r);OSF.Logger.ulsEndpoint.writeLog(u)}}function e(){try{return new t}catch(n){return null}}var i,r,t;(function(n){n[n.info=0]="info";n[n.warning=1]="warning";n[n.error=2]="error"})(n.TraceLevel||(n.TraceLevel={}));i=n.TraceLevel,function(n){n[n.none=0]="none";n[n.flush=1]="flush"}(n.SendFlag||(n.SendFlag={}));r=n.SendFlag;n.allowUploadingData=u;n.sendLog=f;t=function(){function n(){var n=this,t=n;n.proxyFrame=null;n.telemetryEndPoint="https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html";n.buffer=[];n.proxyFrameReady=!1;OSF.OUtil.addEventListener(window,"message",function(n){return t.tellProxyFrameReady(n)});setTimeout(function(){t.loadProxyFrame()},3e3)}return n.prototype.writeLog=function(t){var i=this;i.proxyFrameReady===!0?i.proxyFrame.contentWindow.postMessage(t,n.telemetryOrigin):i.buffer.length<128&&i.buffer.push(t)},n.prototype.loadProxyFrame=function(){var n=this;n.proxyFrame==null&&(n.proxyFrame=document.createElement("iframe"),n.proxyFrame.setAttribute("style","display:none"),n.proxyFrame.setAttribute("src",n.telemetryEndPoint),document.head.appendChild(n.proxyFrame))},n.prototype.tellProxyFrameReady=function(t){var i=this,e=i,r,u,f;if(t.data==="ProxyFrameReadyToLog"){for(i.proxyFrameReady=!0,r=0;r40)&&(n=OSF.OUtil.Guid.generateNewGuid(),t.setValue(t.clientIDKey,n)),n},n.prototype.saveLog=function(n,t){var i=this,u=i.getValue(i.logIdSetKey);u=(u&&u.length>0?u+";":r)+n;i.setValue(i.logIdSetKey,u);i.setValue(n,t)},n.prototype.enumerateLog=function(n,t){var i=this,e=i.getValue(i.logIdSetKey),u,o,r,f;if(e){u=e.split(";");for(o in u)r=u[o],f=i.getValue(r),f&&(n&&n(r,f),t&&i.remove(r));t&&i.remove(i.logIdSetKey)}},n.prototype.getValue=function(n){var t=OSF.OUtil.getLocalStorage(),i=r;return t&&(i=t.getItem(n)),i},n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)},n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}},n}(),o=function(){function t(){}return t.prototype.LogData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(t)}catch(i){}},t.prototype.LogRawData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(t))}catch(i){}},t}();n.initialize=y;n.onAppActivated=p;n.onScriptDone=w;n.onCallDone=b;n.onMethodDone=k;n.onPropertyDone=d;n.onEventDone=g;n.onRegisterDone=nt;n.onAppClosed=tt;n.setOsfControlAppCorrelationId=it;n.doAppInitializationLogging=l;n.logAppCommonMessage=rt;n.logAppException=ut;OSF.AppTelemetry=n}(OSFAppTelemetry||(OSFAppTelemetry={}));Microsoft.Office.WebExtension.TableData=function(n,t){function i(n){if(n==null||n==undefined)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(n,2);t<2;t++)n=[n];return n}catch(i){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(n){t=i(n)}},rows:{get:function(){return n},set:function(t){n=t==null||OSF.OUtil.isArray(t)&&t.length==0?[]:i(t)}}});this.headers=t;this.rows=n};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(n){return new Microsoft.Office.WebExtension.TableData(n[OSF.DDA.TableDataProperties.TableRows],n[OSF.DDA.TableDataProperties.TableHeaders])};Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var n=null;return{findArrayDimensionality:function(n){if(OSF.OUtil.isArray(n)){for(var t=0,i=0;i0)for(r=0;r0)for(r=0;r0?(this._eventHandlers[n]=[],!0):!1},clearObjectEventHandlers:function(n,t){return this._objectEventHandlers[n]!=null&&this._objectEventHandlers[n][t]!=null?(this._objectEventHandlers[n][t]=[],!0):!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},getObjectEventHandlerCount:function(n,t){return this._objectEventHandlers[n]==null||this._objectEventHandlers[n][t]==null?0:this._objectEventHandlers[n][t].length},fireEvent:function(n){var t,r,i;if(n.type==undefined)return!1;if(t=n.type,t&&this._eventHandlers[t]){for(r=this._eventHandlers[t],i=0;i0)){for(r=t[0];i.length>0;)u=i.shift(),r(u);return!0}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var o="hostPlatform",f="outlook",e="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(n,i[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:r=new OSF.DDA.RichApiMessageEventArgs(n,i);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i),t.initialize(r.initialData),(OSF._OfficeAppFactory.getHostInfo()[o]=="win32"||OSF._OfficeAppFactory.getHostInfo()[o]=="mac")&&t.setCurrentItemNumber(r.itemNumber.itemNumber);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkRecipientsChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:n}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(n,t){return t}}],onSucceeded:function(n,t,i){var f=n[OSF.DDA.SettingsManager.SerializedSettings],u=OSF.DDA.SettingsManager.deserializeSettings(f),e=i[OSF.DDA.SettingsManager.RefreshingSettings];for(var r in e)t.remove(r);for(r in u)t.set(r,u[r]);return t}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(n,t){return OSF.DDA.SettingsManager.serializeSettings(t)}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});Microsoft.Office.WebExtension.BindingType={Table:"table",Text:"text",Matrix:"matrix"};OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType};OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{BindingList:"BindingList"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{Subset:"subset",BindingProperties:"BindingProperties"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList,OSF.DDA.PropertyDescriptors.BindingProperties);OSF.DDA.BindingPromise=function(n,t){this._id=n;OSF.OUtil.defineEnumerableProperty(this,"onFail",{get:function(){return t},set:function(n){var i=typeof n;if(i!="undefined"&&i!="function")throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,i);t=n}})};OSF.DDA.BindingPromise.prototype={_fetch:function(n){var t=this,i;return t.binding?n&&n(t.binding):t._binding||(i=t,Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(t._id,function(t){t.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded?(OSF.OUtil.defineEnumerableProperty(i,"binding",{value:t.value}),n&&n(i.binding)):i.onFail&&i.onFail(t)})),t},getDataAsync:function(){var n=arguments;return this._fetch(function(t){t.getDataAsync.apply(t,n)}),this},setDataAsync:function(){var n=arguments;return this._fetch(function(t){t.setDataAsync.apply(t,n)}),this},addHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.addHandlerAsync.apply(t,n)}),this},removeHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.removeHandlerAsync.apply(t,n)}),this}};OSF.DDA.BindingFacade=function(n){this._eventDispatches=[];OSF.OUtil.defineEnumerableProperty(this,"document",{value:n});var t=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[t.AddFromSelectionAsync,t.AddFromNamedItemAsync,t.GetAllAsync,t.GetByIdAsync,t.ReleaseByIdAsync])};OSF.DDA.UnknownBinding=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}})};OSF.DDA.Binding=function(n,t){var r,u,i,f;OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}});r=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[r.GetDataAsync,r.SetDataAsync]);u=Microsoft.Office.WebExtension.EventType;i=t.bindings._eventDispatches;i[n]||(i[n]=new OSF.EventDispatch([u.BindingSelectionChanged,u.BindingDataChanged]));f=i[n];OSF.DDA.DispIdHost.addEventSupport(this,f)};OSF.DDA.generateBindingId=function(){return"UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+(new Date).getTime()};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureBinding=function(n,t){var r=n[OSF.DDA.BindingProperties.Id],u=n[OSF.DDA.BindingProperties.RowCount],f=n[OSF.DDA.BindingProperties.ColumnCount],s=n[OSF.DDA.BindingProperties.HasHeaders],i,e,o;switch(n[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:i=new OSF.DDA.TextBinding(r,t);break;case Microsoft.Office.WebExtension.BindingType.Matrix:i=new OSF.DDA.MatrixBinding(r,t,u,f);break;case Microsoft.Office.WebExtension.BindingType.Table:e=function(){return OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument};o=e()&&OSF.DDA.ExcelTableBinding?OSF.DDA.ExcelTableBinding:OSF.DDA.TableBinding;i=new o(r,t,u,f,s);break;default:i=new OSF.DDA.UnknownBinding(r,t)}return i};OSF.DDA.AsyncMethodNames.addNames({AddFromSelectionAsync:"addFromSelectionAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:"getByIdAsync",ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync"}),function(){function u(n){return OSF.DDA.OMFactory.manufactureBinding(n,Microsoft.Office.WebExtension.context.document)}function f(n){return n.id}function e(n,t,i){var u=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&u&&(u[OSF.DDA.TableDataProperties.TableRows]!=undefined||u[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(u=OSF.DDA.OMFactory.manufactureTableData(u)),u=OSF.DDA.DataCoercion.coerceData(u,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),u==undefined?r:u}var t="number",i="object",n="string",r=null;OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:[n]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return!0}}],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.BindingList],u)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n,t,i){var r=i[Microsoft.Office.WebExtension.Parameters.Id];delete t._eventDispatches[r]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n,t){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&n[Microsoft.Office.WebExtension.Parameters.RowCount]==0&&n[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn],delete n[Microsoft.Office.WebExtension.Parameters.RowCount],delete n[Microsoft.Office.WebExtension.Parameters.ColumnCount]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]||n[Microsoft.Office.WebExtension.Parameters.RowCount]||n[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[n,i,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}]})}();OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.MatrixBinding=function(n,t,i,r){OSF.DDA.MatrixBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Matrix},rowCount:{value:i?i:0},columnCount:{value:r?r:0}})};OSF.OUtil.extend(OSF.DDA.MatrixBinding,OSF.DDA.Binding);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.BindingProperties,fromHost:[{name:OSF.DDA.BindingProperties.Id,value:0},{name:OSF.DDA.BindingProperties.Type,value:1},{name:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,value:2}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.BindingType,toHost:[{name:Microsoft.Office.WebExtension.BindingType.Text,value:0},{name:Microsoft.Office.WebExtension.BindingType.Matrix,value:1},{name:Microsoft.Office.WebExtension.BindingType.Table,value:2}],invertible:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,value:0},{name:Microsoft.Office.WebExtension.Parameters.Id,value:1},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:2},{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseBindingMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAllBindingsMethod,fromHost:[{name:OSF.DDA.ListDescriptors.BindingList,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:2},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:3},{name:OSF.DDA.PropertyDescriptors.Subset,value:4}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.Data,value:2},{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,fromHost:[{name:OSF.DDA.BindingProperties.RowCount,value:0},{name:OSF.DDA.BindingProperties.ColumnCount,value:1},{name:OSF.DDA.BindingProperties.HasHeaders,value:2}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.Subset,toHost:[{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:0},{name:OSF.DDA.SafeArray.UniqueArguments.Run,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Offset,toHost:[{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:0},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Run,toHost:[{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:0},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddColumnsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearAllRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{TableDataProperties:"TableDataProperties"});OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};OSF.DDA.TableBinding=function(n,t,i,r,u){OSF.DDA.TableBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:i?i:0},columnCount:{value:r?r:0},hasHeaders:{value:u?u:!1}});var f=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[f.AddRowsAsync,f.AddColumnsAsync,f.DeleteAllDataValuesAsync])};OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync"}),function(){function n(n){return n.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]})}();OSF.DDA.TextBinding=function(n,t){OSF.DDA.TextBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperty(this,"type",{value:Microsoft.Office.WebExtension.BindingType.Text})};OSF.OUtil.extend(OSF.DDA.TextBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddFromPromptAsync:"addFromPromptAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromPromptAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:["string"],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.PromptText,value:{types:["string"],calculate:function(){return Strings.OfficeOM.L_AddBindingFromPromptDefaultText}}},{name:Microsoft.Office.WebExtension.Parameters.SampleData,value:{types:["object"],defaultValue:null}}],privateStateCallbacks:[],onSucceeded:function(n){return OSF.DDA.OMFactory.manufactureBinding(n,Microsoft.Office.WebExtension.context.document)}});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromPromptMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:1},{name:Microsoft.Office.WebExtension.Parameters.PromptText,value:2}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"});OSF.DDA.DocumentSelectionChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:n}})};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDeleted:"objectDeleted"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectSelectionChanged:"objectSelectionChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDataChanged:"objectDataChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ContentControlAdded:"contentControlAdded"});OSF.DDA.ObjectEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:n},object:{value:t}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDeletedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDataChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidContentControlAddedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{BindingSelectionChanged:"bindingSelectionChanged",BindingDataChanged:"bindingDataChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{BindingSelectionChangedEvent:"BindingSelectionChangedEvent"});OSF.DDA.BindingSelectionChangedEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingSelectionChanged},binding:{value:n}});for(var i in t)OSF.OUtil.defineEnumerableProperty(this,i,{value:t[i]})};OSF.DDA.BindingDataChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingDataChanged},binding:{value:n}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:0},{name:OSF.DDA.PropertyDescriptors.Subset,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingDataChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FilterType,{OnlyVisible:"onlyVisible"});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.OnlyVisible,value:1}]});Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"};Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"};Microsoft.Office.WebExtension.Index={First:"first",Last:"last",Next:"next",Previous:"previous"};OSF.DDA.AsyncMethodNames.addNames({GoToByIdAsync:"goToByIdAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GoToByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string","number"]},{name:Microsoft.Office.WebExtension.Parameters.GoToType,"enum":Microsoft.Office.WebExtension.GoToType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:{"enum":Microsoft.Office.WebExtension.SelectionMode,defaultValue:Microsoft.Office.WebExtension.SelectionMode.Default}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:0},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:1},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:2},{name:Microsoft.Office.WebExtension.GoToType.Index,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:0},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:1},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:1},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:2}]});OSF.DDA.AsyncMethodNames.addNames({ExecuteRichApiRequestAsync:"executeRichApiRequestAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[]});OSF.OUtil.setNamespace("RichApi",OSF.DDA);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidExecuteRichApiRequestMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(n){OSF.OUtil.defineEnumerableProperties(this,{url:{value:n[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(n){return new Microsoft.Office.WebExtension.FileProperties(n)}});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,fromHost:[{name:OSF.DDA.FilePropertiesDescriptor.Url,value:0}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.ExcelTableBinding=function(n,t,i,r,u){var f=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[f.ClearFormatsAsync,f.SetTableOptionsAsync,f.SetFormatsAsync]);OSF.DDA.ExcelTableBinding.uber.constructor.call(this,n,t,i,r,u);OSF.OUtil.finalizeProperties(this)};OSF.OUtil.extend(OSF.DDA.ExcelTableBinding,OSF.DDA.TableBinding),function(){var t="number",n="object",i="string";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[i,n,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:[n],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:[n],defaultValue:[]}}],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[i,n,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[n,i],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[n],defaultValue:null}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:[n],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:[n],defaultValue:[]}}],checkCallArgs:function(n,t){var i=Microsoft.Office.WebExtension.Parameters;if(n[i.StartRow]==0&&n[i.StartColumn]==0&&OSF.OUtil.isArray(n[i.CellFormat])&&n[i.CellFormat].length===0&&OSF.OUtil.isArray(n[i.TableOptions])&&n[i.TableOptions].length===0&&(delete n[i.StartRow],delete n[i.StartColumn],delete n[i.CellFormat],delete n[i.TableOptions]),n[i.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[i.StartRow]&&n[i.StartRow]!=0||n[i.StartColumn]&&n[i.StartColumn]!=0||n[i.CellFormat]||n[i.TableOptions]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:function(n){return n.id}}]});OSF.DDA.BindingPromise.prototype.setTableOptionsAsync=function(){var n=arguments;return this._fetch(function(t){t.setTableOptionsAsync.apply(t,n)}),this};OSF.DDA.BindingPromise.prototype.setFormatsAsync=function(){var n=arguments;return this._fetch(function(t){t.setFormatsAsync.apply(t,n)}),this};OSF.DDA.BindingPromise.prototype.clearFormatsAsync=function(){var n=arguments;return this._fetch(function(t){t.clearFormatsAsync.apply(t,n)}),this}}(),function(){function n(n){return n.id}OSF.DDA.AsyncMethodNames.addNames({ClearFormatsAsync:"clearFormatsAsync",SetTableOptionsAsync:"setTableOptionsAsync",SetFormatsAsync:"setFormatsAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ClearFormatsAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetTableOptionsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TableOptions,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetFormatsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CellFormat,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]})}();Microsoft.Office.WebExtension.Table={All:0,Data:1,Headers:2},function(){var u="undefined",e="auto fit",o="distributed",f="none";OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearFormatsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetTableOptionsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetFormatsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:2},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.Data,value:2},{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:3},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:4},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:5}]});var s={headerRow:0,bandedRows:1,firstColumn:2,lastColumn:3,bandedColumns:4,filterButton:5,style:6,totalRow:7},h={row:0,column:1},t={alignHorizontal:{text:"alignHorizontal",type:1},alignVertical:{text:"alignVertical",type:2},backgroundColor:{text:"backgroundColor",type:101},borderStyle:{text:"borderStyle",type:201},borderColor:{text:"borderColor",type:202},borderTopStyle:{text:"borderTopStyle",type:203},borderTopColor:{text:"borderTopColor",type:204},borderBottomStyle:{text:"borderBottomStyle",type:205},borderBottomColor:{text:"borderBottomColor",type:206},borderLeftStyle:{text:"borderLeftStyle",type:207},borderLeftColor:{text:"borderLeftColor",type:208},borderRightStyle:{text:"borderRightStyle",type:209},borderRightColor:{text:"borderRightColor",type:210},borderOutlineStyle:{text:"borderOutlineStyle",type:211},borderOutlineColor:{text:"borderOutlineColor",type:212},borderInlineStyle:{text:"borderInlineStyle",type:213},borderInlineColor:{text:"borderInlineColor",type:214},fontFamily:{text:"fontFamily",type:301},fontStyle:{text:"fontStyle",type:302},fontSize:{text:"fontSize",type:303},fontUnderlineStyle:{text:"fontUnderlineStyle",type:304},fontColor:{text:"fontColor",type:305},fontDirection:{text:"fontDirection",type:306},fontStrikethrough:{text:"fontStrikethrough",type:307},fontSuperscript:{text:"fontSuperscript",type:308},fontSubscript:{text:"fontSubscript",type:309},fontNormal:{text:"fontNormal",type:310},indentLeft:{text:"indentLeft",type:401},indentRight:{text:"indentRight",type:402},numberFormat:{text:"numberFormat",type:501},width:{text:"width",type:701},height:{text:"height",type:702},wrapping:{text:"wrapping",type:703}},r=[{name:f,value:0},{name:"thin",value:1},{name:"medium",value:2},{name:"dashed",value:3},{name:"dotted",value:4},{name:"thick",value:5},{name:"double",value:6},{name:"hair",value:7},{name:"medium dashed",value:8},{name:"dash dot",value:9},{name:"medium dash dot",value:10},{name:"dash dot dot",value:11},{name:"medium dash dot dot",value:12},{name:"slant dash dot",value:13}],i=[{name:f,value:0},{name:"black",value:1},{name:"blue",value:2},{name:"gray",value:3},{name:"green",value:4},{name:"orange",value:5},{name:"pink",value:6},{name:"purple",value:7},{name:"red",value:8},{name:"teal",value:9},{name:"turquoise",value:10},{name:"violet",value:11},{name:"white",value:12},{name:"yellow",value:13},{name:"automatic",value:14}],n=OSF.DDA.SafeArray.Delegate.ParameterMap;n.define({type:t.alignHorizontal.text,toHost:[{name:"general",value:0},{name:"left",value:1},{name:"center",value:2},{name:"right",value:3},{name:"fill",value:4},{name:"justify",value:5},{name:"center across selection",value:6},{name:o,value:7}]});n.define({type:t.alignVertical.text,toHost:[{name:"top",value:0},{name:"center",value:1},{name:"bottom",value:2},{name:"justify",value:3},{name:o,value:4}]});n.define({type:t.backgroundColor.text,toHost:i});n.define({type:t.borderStyle.text,toHost:r});n.define({type:t.borderColor.text,toHost:i});n.define({type:t.borderTopStyle.text,toHost:r});n.define({type:t.borderTopColor.text,toHost:i});n.define({type:t.borderBottomStyle.text,toHost:r});n.define({type:t.borderBottomColor.text,toHost:i});n.define({type:t.borderLeftStyle.text,toHost:r});n.define({type:t.borderLeftColor.text,toHost:i});n.define({type:t.borderRightStyle.text,toHost:r});n.define({type:t.borderRightColor.text,toHost:i});n.define({type:t.borderOutlineStyle.text,toHost:r});n.define({type:t.borderOutlineColor.text,toHost:i});n.define({type:t.borderInlineStyle.text,toHost:r});n.define({type:t.borderInlineColor.text,toHost:i});n.define({type:t.fontStyle.text,toHost:[{name:"regular",value:0},{name:"italic",value:1},{name:"bold",value:2},{name:"bold italic",value:3}]});n.define({type:t.fontUnderlineStyle.text,toHost:[{name:f,value:0},{name:"single",value:1},{name:"double",value:2},{name:"single accounting",value:3},{name:"double accounting",value:4}]});n.define({type:t.fontColor.text,toHost:i});n.define({type:t.fontDirection.text,toHost:[{name:"context",value:0},{name:"left-to-right",value:1},{name:"right-to-left",value:2}]});n.define({type:t.width.text,toHost:[{name:e,value:-1}]});n.define({type:t.height.text,toHost:[{name:e,value:-1}]});n.define({type:Microsoft.Office.WebExtension.Parameters.TableOptions,toHost:[{name:"headerRow",value:0},{name:"bandedRows",value:1},{name:"firstColumn",value:2},{name:"lastColumn",value:3},{name:"bandedColumns",value:4},{name:"filterButton",value:5},{name:"style",value:6},{name:"totalRow",value:7}]});n.dynamicTypes[Microsoft.Office.WebExtension.Parameters.CellFormat]={toHost:function(t){for(var i in t)t[i].format&&(t[i].format=n.doMapValues(t[i].format,"toHost"));return t},fromHost:function(n){return n}};n.setDynamicType(Microsoft.Office.WebExtension.Parameters.CellFormat,{toHost:function(n){var c="cells",y="format",w=0,b=1,p=[],l,i,r,f,e,o,a,v,s;for(l in n){if(i=n[l],r=[],typeof i[c]!==u){if(f=i[c],typeof i[c]=="object"){e=[];for(o in f)typeof h[o]!==u&&(e[h[o]]=f[o])}else e=f;r[w]=e}if(i[y]){a=i[y];v=[];for(s in a)typeof t[s]!==u&&v.push([t[s].type,a[s]]);r[b]=v}p[l]=r}return p},fromHost:function(n){return n}});n.setDynamicType(Microsoft.Office.WebExtension.Parameters.TableOptions,{toHost:function(n){var i=[];for(var t in n)typeof s[t]!==u&&(i[s[t]]=n[t]);return i},fromHost:function(n){return n}})}();OSF.DDA.ExcelDocument=function(n,t){var i=this,r=new OSF.DDA.BindingFacade(i);OSF.DDA.DispIdHost.addAsyncMethods(r,[OSF.DDA.AsyncMethodNames.AddFromPromptAsync]);OSF.DDA.DispIdHost.addAsyncMethods(i,[OSF.DDA.AsyncMethodNames.GoToByIdAsync]);OSF.DDA.DispIdHost.addAsyncMethods(i,[OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync]);OSF.DDA.ExcelDocument.uber.constructor.call(i,n,r,t);OSF.OUtil.finalizeProperties(i)};OSF.OUtil.extend(OSF.DDA.ExcelDocument,OSF.DDA.JsomDocument);OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(n,t){OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM);n.doc=new OSF.DDA.ExcelDocument(n,this._initializeSettings(n,!1));OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi,[OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]);t()};__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t=function(){function n(n,t,i){this.m_actionInfo=n;this.m_isWriteOperation=t;this.m_isRestrictedResourceAccess=i}return Object.defineProperty(n.prototype,"actionInfo",{get:function(){return this.m_actionInfo},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isRestrictedResourceAccess",{get:function(){return this.m_isRestrictedResourceAccess},enumerable:!0,configurable:!0}),n}();n.Action=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_callback=n}return n.prototype._handleResult=function(n){this.m_callback&&this.m_callback()},n}(),i=function(){function i(){}return i.createSetPropertyAction=function(t,i,r,u){var f;n.Utility.validateObjectPath(i);var o={Id:t._nextId(),ActionType:4,Name:r,ObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},s=[u],e=n.Utility.setMethodArguments(t,o.ArgumentInfo,s);return n.Utility.validateReferencedObjectPaths(e),t._pendingRequest.ensureInstantiateObjectPath(i._objectPath),t._pendingRequest.ensureInstantiateObjectPaths(e),f=new n.Action(o,!0,!1),t._pendingRequest.addAction(f),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addReferencedObjectPaths(e),f.referencedObjectPath=i._objectPath,f.referencedArgumentObjectPaths=e,f},i.createMethodAction=function(t,i,r,u,f,e){var h,o,c,s;return n.Utility.validateObjectPath(i),h={Id:t._nextId(),ActionType:3,Name:r,ObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},o=n.Utility.setMethodArguments(t,h.ArgumentInfo,f),n.Utility.validateReferencedObjectPaths(o),t._pendingRequest.ensureInstantiateObjectPath(i._objectPath),t._pendingRequest.ensureInstantiateObjectPaths(o),c=u!=1,s=new n.Action(h,c,e),t._pendingRequest.addAction(s),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addReferencedObjectPaths(o),s.referencedObjectPath=i._objectPath,s.referencedArgumentObjectPaths=o,s},i.createQueryAction=function(t,i,r){var f,u;return n.Utility.validateObjectPath(i),t._pendingRequest.ensureInstantiateObjectPath(i._objectPath),f={Id:t._nextId(),ActionType:2,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},f.QueryInfo=r,u=new n.Action(f,!1,!1),t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u.referencedObjectPath=i._objectPath,u},i.createRecursiveQueryAction=function(t,i,r){n.Utility.validateObjectPath(i);t._pendingRequest.ensureInstantiateObjectPath(i._objectPath);var f={Id:t._nextId(),ActionType:6,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id,RecursiveQueryInfo:r},u=new n.Action(f,!1,!1);return t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u.referencedObjectPath=i._objectPath,u},i.createQueryAsJsonAction=function(t,i,r){var f,u;return n.Utility.validateObjectPath(i),t._pendingRequest.ensureInstantiateObjectPath(i._objectPath),f={Id:t._nextId(),ActionType:7,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},f.QueryInfo=r,u=new n.Action(f,!1,!1),t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u.referencedObjectPath=i._objectPath,u},i.createEnsureUnchangedAction=function(t,i,r){n.Utility.validateObjectPath(i);t._pendingRequest.ensureInstantiateObjectPath(i._objectPath);var f={Id:t._nextId(),ActionType:8,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id,ObjectState:r},u=new n.Action(f,!1,!1);return t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u.referencedObjectPath=i._objectPath,u},i.createInstantiateAction=function(t,i){n.Utility.validateObjectPath(i);t._pendingRequest.ensureInstantiateObjectPath(i._objectPath.parentObjectPath);t._pendingRequest.ensureInstantiateObjectPaths(i._objectPath.argumentObjectPaths);var u={Id:t._nextId(),ActionType:1,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},r=new n.Action(u,!1,!1);return t._pendingRequest.addAction(r),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addActionResultHandler(r,new n.InstantiateActionResultHandler(i)),r.referencedObjectPath=i._objectPath,r},i.createTraceAction=function(t,i,r){var u={Id:t._nextId(),ActionType:5,Name:"Trace",ObjectPathId:0},f=new n.Action(u,!1,!1);return t._pendingRequest.addAction(f),r&&t._pendingRequest.addTrace(u.Id,i),f},i.createTraceMarkerForCallback=function(n,r){var u=i.createTraceAction(n,null,!1);n._pendingRequest.addActionResultHandler(u,new t(r))},i}();n.ActionFactory=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(t,i){n.Utility.checkArgumentNull(t,"context");this.m_context=t;this.m_objectPath=i;this.m_objectPath&&(t._processingResult||(n.ActionFactory.createInstantiateAction(t,this),t._autoCleanup&&this._KeepReference&&t.trackedObjects._autoAdd(this)))}return Object.defineProperty(t.prototype,"context",{get:function(){return this.m_context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_objectPath",{get:function(){return this.m_objectPath},set:function(n){this.m_objectPath=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNull",{get:function(){return n.Utility.throwIfNotLoaded("isNull",this._isNull,null,this._isNull),this._isNull},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNullObject",{get:function(){return n.Utility.throwIfNotLoaded("isNullObject",this._isNull,null,this._isNull),this._isNull},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_isNull",{get:function(){return this.m_isNull},set:function(n){this.m_isNull=n;n&&this.m_objectPath&&this.m_objectPath._updateAsNullObject()},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){this._isNull=n.Utility.isNullOrUndefined(t);this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this,t)},t.prototype._handleIdResult=function(t){this._isNull=n.Utility.isNullOrUndefined(t);n.Utility.fixObjectPathIfNecessary(this,t);this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this,t)},t.prototype._recursivelySet=function(i,r,u,f,e){var c=i instanceof t,v=i,o,a,h,s,l;if(c)if(Object.getPrototypeOf(this)===Object.getPrototypeOf(i))i=JSON.parse(JSON.stringify(i));else throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"properties",errorLocation:this._className+".set"});try{for(s=0;s0},enumerable:!0,configurable:!0}),t.prototype._getLastAction=function(){return this.m_actions[this.m_actions.length-1]},t.prototype.addTrace=function(n,t){this.m_traceInfos[n]=t},t.prototype.ensureInstantiateObjectPath=function(t){if(t){if(this.m_instantiatedObjectPaths[t.objectPathInfo.Id])return;if(this.ensureInstantiateObjectPath(t.parentObjectPath),this.ensureInstantiateObjectPaths(t.argumentObjectPaths),!this.m_instantiatedObjectPaths[t.objectPathInfo.Id]){var r={Id:this.m_context._nextId(),ActionType:1,Name:"",ObjectPathId:t.objectPathInfo.Id},i=new n.Action(r,!1,!1);i.referencedObjectPath=t;this.addAction(i)}}},t.prototype.ensureInstantiateObjectPaths=function(n){if(n)for(var t=0;t=0;--r)if(i=n[r],u=i.actionInfo.Id,i.referencedObjectPath&&t._updateLastUsedActionIdOfObjectPathId(e,i.referencedObjectPath,u),o=i.referencedArgumentObjectPaths,o)for(v=o.length,s=0;s0?i.actionInfo.L=c:i.actionInfo.L&&delete i.actionInfo.L},t}();n.ClientRequest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;n._internalConfig={showDisposeInfoInDebugInfo:!1,enableEarlyDispose:!0,alwaysPolyfillClientObjectRetrieveMethod:!1};t=function(){function t(){}return t.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},t.prototype._createRequestExecutorOrNull=function(){return null},Object.defineProperty(t.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),t}();n.SessionBase=t;i=function(){function i(r){if(this.m_customRequestHeaders={},this._onRunFinishedNotifiers=[],this.m_nextId=0,i._overrideSession)this.m_requestUrlAndHeaderInfoResolver=i._overrideSession;else if((n.Utility.isNullOrUndefined(r)||typeof r=="string"&&r.length===0)&&(r=i.defaultRequestUrlAndHeaders,r||(r={url:n.Constants.localDocument,headers:{}})),typeof r=="string")this.m_requestUrlAndHeaderInfo={url:r,headers:{}};else if(i.isRequestUrlAndHeaderInfoResolver(r))this.m_requestUrlAndHeaderInfoResolver=r;else if(i.isRequestUrlAndHeaderInfo(r)){var u=r;this.m_requestUrlAndHeaderInfo={url:u.url,headers:{}};n.Utility._copyHeaders(u.headers,this.m_requestUrlAndHeaderInfo.headers)}else throw n._Internal.RuntimeError._createInvalidArgError("url");this.m_requestUrlAndHeaderInfoResolver instanceof t&&(this.m_session=this.m_requestUrlAndHeaderInfoResolver);this._processingResult=!1;this._customData=n.Constants.iterativeExecutor;this.sync=this.sync.bind(this)}return Object.defineProperty(i.prototype,"session",{get:function(){return this.m_session},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"eventRegistration",{get:function(){return this.m_session?this.m_session.eventRegistration:n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_url",{get:function(){return this.m_requestUrlAndHeaderInfo?this.m_requestUrlAndHeaderInfo.url:null},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_pendingRequest",{get:function(){return this.m_pendingRequest==null&&(this.m_pendingRequest=new n.ClientRequest(this)),this.m_pendingRequest},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"debugInfo",{get:function(){var t=new n.RequestPrettyPrinter(this._rootObjectPropertyName,this._pendingRequest._objectPaths,this._pendingRequest._actions,n._internalConfig.showDisposeInfoInDebugInfo),i=t.process();return{pendingStatements:i}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"trackedObjects",{get:function(){return this.m_trackedObjects||(this.m_trackedObjects=new n.TrackedObjects(this)),this.m_trackedObjects},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"requestHeaders",{get:function(){return this.m_customRequestHeaders},enumerable:!0,configurable:!0}),i.prototype.load=function(t,r){n.Utility.validateContext(this,t);var u=i._parseQueryOption(r),f=n.ActionFactory.createQueryAction(this,t,u);this._pendingRequest.addActionResultHandler(f,t)},i.isLoadOption=function(t){if(!n.Utility.isUndefined(t.select)&&(typeof t.select=="string"||Array.isArray(t.select))||!n.Utility.isUndefined(t.expand)&&(typeof t.expand=="string"||Array.isArray(t.expand))||!n.Utility.isUndefined(t.top)&&typeof t.top=="number"||!n.Utility.isUndefined(t.skip)&&typeof t.skip=="number")return!0;for(var i in t)return!1;return!0},i.parseStrictLoadOption=function(n){var t={Select:[]};return i.parseStrictLoadOptionHelper(t,"","option",n),t},i.combineQueryPath=function(n,t,i){return n.length===0?t:n+i+t},i.parseStrictLoadOptionHelper=function(t,r,u,f){var e,o;for(e in f)if(o=f[e],e==="$all"){if(typeof o!="boolean")throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));o&&t.Select.push(i.combineQueryPath(r,"*","/"))}else if(e==="$top"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));t.Top=o}else if(e==="$skip"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));t.Skip=o}else if(typeof o=="boolean")o&&t.Select.push(i.combineQueryPath(r,e,"/"));else if(typeof o=="object")i.parseStrictLoadOptionHelper(t,i.combineQueryPath(r,e,"/"),i.combineQueryPath(u,e,"."),o);else throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));},i._parseQueryOption=function(t){var u={},f,r;if(typeof t=="string")f=t,u.Select=n.Utility._parseSelectExpand(f);else if(Array.isArray(t))u.Select=t;else if(typeof t=="object")if(r=t,i.isLoadOption(r)){if(typeof r.select=="string")u.Select=n.Utility._parseSelectExpand(r.select);else if(Array.isArray(r.select))u.Select=r.select;else if(!n.Utility.isNullOrUndefined(r.select))throw n._Internal.RuntimeError._createInvalidArgError("option.select");if(typeof r.expand=="string")u.Expand=n.Utility._parseSelectExpand(r.expand);else if(Array.isArray(r.expand))u.Expand=r.expand;else if(!n.Utility.isNullOrUndefined(r.expand))throw n._Internal.RuntimeError._createInvalidArgError("option.expand");if(typeof r.top=="number")u.Top=r.top;else if(!n.Utility.isNullOrUndefined(r.top))throw n._Internal.RuntimeError._createInvalidArgError("option.top");if(typeof r.skip=="number")u.Skip=r.skip;else if(!n.Utility.isNullOrUndefined(r.skip))throw n._Internal.RuntimeError._createInvalidArgError("option.skip");}else u=i.parseStrictLoadOption(t);else if(!n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError("option");return u},i.prototype.loadRecursive=function(t,r,u){var f,e,o;if(!n.Utility.isPlainJsonObject(r))throw n._Internal.RuntimeError._createInvalidArgError("options");f={};for(e in r)f[e]=i._parseQueryOption(r[e]);o=n.ActionFactory.createRecursiveQueryAction(this,t,{Queries:f,MaxDepth:u});this._pendingRequest.addActionResultHandler(o,t)},i.prototype.trace=function(t){n.ActionFactory.createTraceAction(this,t,!0)},i.prototype._processOfficeJsErrorResponse=function(n,t){},i.prototype.syncPrivateMain=function(){var t=this;return n.Utility._createPromiseFromResult(null).then(function(){if(!t.m_requestUrlAndHeaderInfo)return t.m_requestUrlAndHeaderInfoResolver._resolveRequestUrlAndHeaderInfo().then(function(i){if(t.m_requestUrlAndHeaderInfo=i,t.m_requestUrlAndHeaderInfo||(t.m_requestUrlAndHeaderInfo={url:n.Constants.localDocument,headers:{}}),n.Utility.isNullOrEmptyString(t.m_requestUrlAndHeaderInfo.url)&&(t.m_requestUrlAndHeaderInfo.url=n.Constants.localDocument),t.m_requestUrlAndHeaderInfo.headers||(t.m_requestUrlAndHeaderInfo.headers={}),typeof t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull=="function"){var r=t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull();r&&(t._requestExecutor=r)}})}).then(function(){var n=t._pendingRequest;return t.m_pendingRequest=null,t.processPreSyncPromises(n).then(function(){return t.syncPrivate(n)})})},i.prototype.syncPrivate=function(t){var f=this,e,o,s,u,h,r,i;return t.hasActions?(e=t.buildRequestMessageBody(),o=t.flags,this._requestExecutor||(this._requestExecutor=n.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)?new n.OfficeJsRequestExecutor(this):new n.HttpRequestExecutor),s=this._requestExecutor,u={},n.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,u),n.Utility._copyHeaders(this.m_customRequestHeaders,u),h={Url:this.m_requestUrlAndHeaderInfo.url,Headers:u,Body:e},t.invalidatePendingInvalidObjectPaths(),r=null,i=null,this._lastSyncStart=performance.now(),s.executeAsync(this._customData,o,h).then(function(u){return f._lastSyncEnd=performance.now(),r=f.processRequestExecutorResponseMessage(t,u),f.processPendingEventHandlers(t).catch(function(t){n.Utility.log("Error in processPendingEventHandlers");n.Utility.log(JSON.stringify(t));i=t})}).then(function(){var u,f;if(r){n.Utility.log("Throw error from response: "+JSON.stringify(r));throw r;}if(i){n.Utility.log("Throw error from ProcessEventHandler: "+JSON.stringify(i));u=null;i instanceof n._Internal.RuntimeError?(u=i,u.traceMessages=t._responseTraceMessages):(f=null,f=typeof i=="string"?i:i.message,n.Utility.isNullOrEmptyString(f)&&(f=n.Utility._getResourceString(n.ResourceStrings.cannotRegisterEvent)),u=new n._Internal.RuntimeError({code:n.ErrorCodes.cannotRegisterEvent,message:f,traceMessages:t._responseTraceMessages}));throw u;}})):this.processPendingEventHandlers(t)},i.prototype.processRequestExecutorResponseMessage=function(t,i){var e,r,o,u,f;if(i.Body&&i.Body.TraceIds&&t._setResponseTraceIds(i.Body.TraceIds),e=t._responseTraceMessages,r=null,i.Body&&(i.Body.Error&&i.Body.Error.ActionIndex>=0&&(o=new n.RequestPrettyPrinter(this._rootObjectPropertyName,t._objectPaths,t._actions),r=o.processForDebugStatementInfo(i.Body.Error.ActionIndex)),u=null,i.Body.Results?u=i.Body.Results:i.Body.ProcessedResults&&i.Body.ProcessedResults.Results&&(u=i.Body.ProcessedResults.Results),u)){this._processingResult=!0;try{t.processResponse(u)}finally{this._processingResult=!1}}if(n.Utility.isNullOrEmptyString(i.ErrorCode)){if(i.Body&&i.Body.Error)return f={errorLocation:i.Body.Error.Location},r&&(f.statement=r.statement,f.surroundingStatements=r.surroundingStatements),new n._Internal.RuntimeError({code:i.Body.Error.Code,message:i.Body.Error.Message,traceMessages:e,debugInfo:f})}else return new n._Internal.RuntimeError({code:i.ErrorCode,message:i.ErrorMessage,traceMessages:e});return null},i.prototype.processPendingEventHandlers=function(t){for(var u,i=n.Utility._createPromiseFromResult(null),r=0;r0&&(typeof r[0]=="string"||i.isRequestUrlAndHeaderInfo(r[0])||i.isRequestUrlAndHeaderInfoResolver(r[0]))&&(y=r[0],h=1),r.length==h+1)l=u,v=r[h+0];else if(r.length==h+2){if(n.Utility.isNullOrUndefined(r[h+0]))l=u;else if(r[h+0]instanceof n.ClientObject)l=function(){return r[h+0].context};else if(r[h+0]instanceof i)l=function(){return r[h+0]};else if(Array.isArray(r[h+0])){if(c=r[h+0],c.length==0)return i.createErrorPromise(t);for(a=0;a0){var n=c._onRunFinishedNotifiers.shift();n()}if(a)return l;else throw l;})},i.prototype._nextId=function(){return++this.m_nextId},i}();n.ClientRequestContext=i}(OfficeExtension||(OfficeExtension={})),function(n){var i=function(){function t(n){this.m_type=n}return Object.defineProperty(t.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){(this.m_isLoaded=!0,typeof t=="object"&&t&&t._IsNull)||(this.m_value=this.m_type===1?n.Utility.adjustToDateTime(t):t)},t}(),t;n.ClientResult=i;t=function(){function t(n,t){this.m_proxy=n;this.m_shouldPolyfill=t}return Object.defineProperty(t.prototype,"proxy",{get:function(){return this.m_proxy},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"retrieveResult.data"}});return this.m_data},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(n){if(this.m_isLoaded=!0,typeof n=="object"&&n&&n._IsNull){this.m_data=null;return}this.m_data=this.m_shouldPolyfill?this.changePropertyNameToCamelLowerCase(n):n},t.prototype.changePropertyNameToCamelLowerCase=function(t){var o=95,u,i,r,f,e;if(Array.isArray(t)){for(i=[],u=0;u0&&(r=!0),t=document.createElement("a"),t.href=this.m_url,r?t.hash=t.hash.length===0||t.hash==="#"?"#"+i:t.hash+"&"+i:t.search=t.search.length===0||t.search==="?"?"?"+i:t.search+"&"+i,t.href},f.prototype.init=function(){var t=this,i;return window.addEventListener("message",this.m_onMessageHandler),i=this._getIFrameSrc(),new n._Internal.OfficePromise(function(r,u){var f=document.createElement("iframe");t.m_options.id&&(f.id=t.m_options.id);f.style.height=t.m_options.height;f.style.width=t.m_options.width;f.src=i;t.m_options.container.appendChild(f);t.m_timeoutId=setTimeout(function(){t.close();var i=n.Utility.createRuntimeError(n.ErrorCodes.timeout,n.Utility._getResourceString(n.ResourceStrings.timeout),"EmbeddedSession.init");u(i)},t.m_options.timeoutInMilliseconds);t.m_promiseResolver=r})},f.prototype._invoke=function(n,t,u){if(!this.m_enabled){t(i.InternalError,null);return}r.invokeRequestModifier&&(u=r.invokeRequestModifier(u));this._sendMessageWithCallback(this.m_id++,n,u,function(n){r.invokeResponseModifier&&(n=r.invokeResponseModifier(n));var u=n.Error;delete n.Error;t(u||i.Success,n)})},f.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler);window.clearTimeout(this.m_timeoutId);this.m_enabled=!1},Object.defineProperty(f.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),f.prototype._createRequestExecutorOrNull=function(){return new e(this)},f.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},f.prototype._registerEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.RegisterEventCommand,{EventId:i,TargetId:r},function(){n(null)})})},f.prototype._unregisterEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.UnregisterEventCommand,{EventId:i,TargetId:r},function(){n()})})},f.prototype._onMessage=function(n){var u=this,i,e,r,o,s;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===n.source&&this.m_chosenOrigin===n.origin)){if(i=n.data,i&&i[t.CommandKey]===t.ApiReadyCommand){!this.m_chosenWindow&&this._isValidDescendant(n.source)&&i[t.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=n.source,this.m_chosenOrigin=n.origin,this._sendMessageWithCallback(this.m_id++,t.GetAppContextCommand,null,function(n){u._setupContext(n);window.clearTimeout(u.m_timeoutId);u.m_promiseResolver()}));return}if(i&&i[t.CommandKey]===t.FireEventCommand){var f=i[t.ParamsKey],h=f.EventId,c=f.TargetId,l=f.Data;if(this.m_sessionEventManager)for(e=this.m_sessionEventManager.getHandlers(h,c),r=0;r=0;o--)if(r[o]===e[i].handler){r.splice(o,1);break}break;case 2:r=[];break}}return s&&(!this.m_registered&&r.length>0?u=u.then(function(){return f.m_eventInfo.registerFunc(f.m_callback)}).then(function(){return f.m_registered=!0}):this.m_registered&&r.length==0&&(u=u.then(function(){return f.m_eventInfo.unregisterFunc(f.m_callback)}).catch(function(t){n.Utility.log("Error when unregister event: "+JSON.stringify(t))}).then(function(){return f.m_registered=!1})),u=u.then(function(){return f.m_handlers=r})),u},t.prototype.fireEvent=function(t){for(var u,f,r=[],i=0;i=0;e--)if(f[e]===u){f.splice(e,1);break}return f.length===0?this.m_unregisterEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i}();n.EventRegistration=i}(OfficeExtension||(OfficeExtension={})),function(n){function r(n){t._testReadyImpl=n}function u(n){t.getGenericEventRegistration()._handleRichApiMessage(n)}var t=function(){function t(){this.m_eventRegistration=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this));this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this)}return t.prototype.ready=function(){var i=this;return this.m_ready||(this.m_ready=t._testReadyImpl?t._testReadyImpl().then(function(){i.m_isReady=!0}):n._Internal.officeJsEventRegistration.register(5,"",this.m_richApiMessageHandler).then(function(){i.m_isReady=!0})),this.m_ready},Object.defineProperty(t.prototype,"isReady",{get:function(){return this.m_isReady},enumerable:!0,configurable:!0}),t.prototype.register=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.register(n,t,i)})},t.prototype.unregister=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.unregister(n,t,i)})},t.prototype._registerEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._unregisterEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._handleRichApiMessage=function(t){var r,i,u,e,f;if(t&&t.entries)for(r=0;r0))for(e=JSON.parse(i.message),i.isRemoteOverride&&(e.source=n.Constants.eventSourceRemote),f=0;f=0;u--)if(n[u]===i){n.splice(u,1);break}n.length==0&&t.getGenericEventRegistration().unregister(r.m_genericEventInfo.eventType,r.m_genericEventInfo.getTargetIdFunc(),r._callback)})},r.prototype.removeAll=function(){},r}(n.EventHandlers);n.GenericEventHandlers=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var s=JSON.stringify(u.Body),f=u.Url,e,o;if(f.charAt(f.length-1)!="/"&&(f=f+"/"),f=f+n.Constants.processQuery,f=f+"?"+n.Constants.flags+"="+r.toString(),e={method:"POST",url:f,headers:{},body:s},e.headers[n.Constants.sourceLibHeader]=t.SourceLibHeaderValue,e.headers["CONTENT-TYPE"]="application/json",u.Headers)for(o in u.Headers)e.headers[o]=u.Headers[o];return n.HttpUtility.sendRequest(e).then(function(t){var i,r;return t.statusCode===200?i={ErrorCode:null,ErrorMessage:null,Headers:t.headers,Body:JSON.parse(t.body)}:(n.Utility.log("Error Response:"+t.body),r=n.Utility._parseErrorResponse(t),i={ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:t.headers,Body:null}),i})},t.SourceLibHeaderValue="officejs-rest",t}();n.HttpRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.setCustomSendRequestFunc=function(n){t.s_customSendRequestFunc=n},t.xhrSendRequestFunc=function(t){return new n._Internal.OfficePromise(function(i,r){var u=new XMLHttpRequest,f;if(u.open(t.method,t.url),u.onload=function(){var t={statusCode:u.status,headers:n.Utility._parseHttpResponseHeaders(u.getAllResponseHeaders()),body:u.responseText};i(t)},u.onerror=function(){r(new n._Internal.RuntimeError({code:n.ErrorCodes.connectionFailure,message:n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,u.statusText)}))},t.headers)for(f in t.headers)u.setRequestHeader(f,t.headers[f]);u.send(t.body)})},t.sendRequest=function(n){t.validateAndNormalizeRequest(n);var i=t.s_customSendRequestFunc;return i||(i=t.xhrSendRequestFunc),i(n)},t.setCustomSendLocalDocumentRequestFunc=function(n){t.s_customSendLocalDocumentRequestFunc=n},t.sendLocalDocumentRequest=function(n){t.validateAndNormalizeRequest(n);var i;return i=t.s_customSendLocalDocumentRequestFunc||t.officeJsSendLocalDocumentRequestFunc,i(n)},t.officeJsSendLocalDocumentRequestFunc=function(t){t=n.Utility._validateLocalDocumentRequest(t);var i=n.Utility._buildRequestMessageSafeArray(t);return new n._Internal.OfficePromise(function(t,r){OSF.DDA.RichApi.executeRichApiRequestAsync(i,function(i){var r;r=i.status=="succeeded"?{statusCode:n.RichApiMessageUtility.getResponseStatusCode(i),headers:n.RichApiMessageUtility.getResponseHeaders(i),body:n.RichApiMessageUtility.getResponseBody(i)}:n.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(i.error.code,i.error.message);n.Utility.log(JSON.stringify(r));t(r)})})},t.validateAndNormalizeRequest=function(t){if(n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"request"});n.Utility.isNullOrEmptyString(t.method)&&(t.method="GET");t.method=t.method.toUpperCase()},t.logRequest=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Request---"),n.Utility.log(i.method+" "+i.url),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t.logResponse=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Response---"),n.Utility.log(""+i.statusCode),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t._logBody=!1,t}();n.HttpUtility=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_clientObject=n}return n.prototype._handleResult=function(n){this.m_clientObject._handleIdResult(n)},n}();n.InstantiateActionResultHandler=t}(OfficeExtension||(OfficeExtension={})),function(n){}(OfficeExtension||(OfficeExtension={})),function(n){var u=function(){function t(n){this.m_session=n}return t.prototype.executeAsync=function(t,r,u){var e={url:n.Constants.processQuery,method:"POST",headers:u.Headers,body:u.Body},f={id:i.nextId(),type:1,flags:r,message:e};return n.Utility.log(JSON.stringify(f)),this.m_session.sendMessageToHost(f).then(function(t){var i,r,u;return n.Utility.log("Received response: "+JSON.stringify(t)),i=t.message,i.statusCode===200?r={ErrorCode:null,ErrorMessage:null,Headers:i.headers,Body:i.body}:(n.Utility.log("Error Response:"+i.body),u=n.Utility._parseErrorResponse(i),r={ErrorCode:u.errorCode,ErrorMessage:u.errorMessage,Headers:i.headers,Body:null}),r})},t}(),i=function(i){function r(n){var t=this;i.call(this);this.m_promiseResolver={};this.m_bridge=n;this.m_bridge.onMessageFromHost=function(n){t.onMessageFromHost(n)}}return __extends(r,i),r.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},r.prototype._createRequestExecutorOrNull=function(){return n.Utility.log("NativeBridgeSession::CreateRequestExecutor"),new u(this)},Object.defineProperty(r.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),r.init=function(t){if(t&&typeof t=="object"){var i=new r(t);n.ClientRequestContext._overrideSession=i;n.HttpUtility.setCustomSendLocalDocumentRequestFunc(function(n){var t={id:r.nextId(),type:1,flags:0,message:n};return i.sendMessageToHost(t).then(function(n){return n.message})})}},r.prototype.sendMessageToHost=function(t){var i=this;return this.m_bridge.sendMessageToHost(JSON.stringify(t)),new n._Internal.OfficePromise(function(n,r){i.m_promiseResolver[t.id]=n})},r.prototype.onMessageFromHost=function(n){var i,r;n==="test"?t._testFunc&&t._testFunc():(i=JSON.parse(n),typeof i.id=="number"&&(r=this.m_promiseResolver[i.id],r&&r(i),delete this.m_promiseResolver[i.id]))},r.nextId=function(){return r.s_nextId++},r.s_nextId=1,r}(n.SessionBase),r=function(){function n(){}return n.init=function(n){i.init(n)},n}(),t;n.HostBridge=r;typeof _richApiNativeBridge=="object"&&_richApiNativeBridge&&r.init(_richApiNativeBridge);t=function(){function n(){}return n.setTestFunc=function(t){n._testFunc=t},n}();n.HostBridgeTest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){this.m_objectPathInfo=n;this.m_parentObjectPath=t;this.m_isWriteOperation=!1;this.m_isCollection=i;this.m_isInvalidAfterRequest=r;this.m_isValid=!0}return Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},set:function(n){this.m_isWriteOperation=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRestrictedResourceAccess",{get:function(){return this.m_isRestrictedResourceAccess},set:function(n){this.m_isRestrictedResourceAccess=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(n){this.m_argumentObjectPaths=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(n){this.m_isValid=n;!n&&this.m_objectPathInfo.ObjectPathType===6&&this.m_savedObjectPathInfo&&(t.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(n){this.m_getByIdMethodName=n},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null},t.prototype.updateUsingObjectData=function(i){var e=i[n.Constants.referenceId],f,o,u,r;if(!n.Utility.isNullOrEmptyString(e)){this.m_savedObjectPathInfo||this.isInvalidAfterRequest||!t.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)||(f={},t.copyObjectPathInfo(this.m_objectPathInfo,f),this.m_savedObjectPathInfo={pathInfo:f,parent:this.m_parentObjectPath});this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=e;this.m_objectPathInfo.ArgumentInfo={};delete this.m_objectPathInfo.ParentObjectPathId;this.m_parentObjectPath=null;this.m_argumentObjectPaths=null;return}if(o=this.parentObjectPath&&this.parentObjectPath.isCollection,u=this.getByIdMethodName,(o||!n.Utility.isNullOrEmptyString(u))&&(r=i[n.Constants.id],n.Utility.isNullOrUndefined(r)&&(r=i[n.Constants.idPrivate]),!n.Utility.isNullOrUndefined(r))){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;n.Utility.isNullOrEmptyString(u)?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=u,this.m_getByIdMethodName=null);this.isWriteOperation=!1;this.m_objectPathInfo.ArgumentInfo={};this.m_objectPathInfo.ArgumentInfo.Arguments=[r];this.m_argumentObjectPaths=null;return}},t.isRestorableObjectPath=function(n){return n===1||n===5||n===3||n===4},t.copyObjectPathInfo=function(n,t){t.Id=n.Id;t.ArgumentInfo=n.ArgumentInfo;t.Name=n.Name;t.ObjectPathType=n.ObjectPathType;t.ParentObjectPathId=n.ParentObjectPathId},t}();n.ObjectPath=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createGlobalObjectObjectPath=function(t){var i={Id:t._nextId(),ObjectPathType:1,Name:""};return new n.ObjectPath(i,null,!1,!1)},t.createNewObjectObjectPath=function(t,i,r,u){var e={Id:t._nextId(),ObjectPathType:2,Name:i},f=new n.ObjectPath(e,null,r,!1);return f.isRestrictedResourceAccess=u,f},t.createPropertyObjectPath=function(t,i,r,u,f,e){var s={Id:t._nextId(),ObjectPathType:4,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id},o=new n.ObjectPath(s,i._objectPath,u,f);return o.isRestrictedResourceAccess=e,o},t.createIndexerObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i._objectPath,!1,!1)},t.createIndexerObjectPathUsingParentPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i,!1,!1)},t.createMethodObjectPath=function(t,i,r,u,f,e,o,s,h){var l={Id:t._nextId(),ObjectPathType:3,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},a=n.Utility.setMethodArguments(t,l.ArgumentInfo,f),c=new n.ObjectPath(l,i._objectPath,e,o);return c.argumentObjectPaths=a,c.isWriteOperation=u!=1,c.getByIdMethodName=s,c.isRestrictedResourceAccess=h,c},t.createReferenceIdObjectPath=function(t,i){var r={Id:t._nextId(),ObjectPathType:6,Name:i,ArgumentInfo:{}};return new n.ObjectPath(r,null,!1,!1)},t.createChildItemObjectPathUsingIndexerOrGetItemAt=function(i,r,u,f,e){var o=f[n.Constants.id];return n.Utility.isNullOrUndefined(o)&&(o=f[n.Constants.idPrivate]),i&&!n.Utility.isNullOrUndefined(o)?t.createChildItemObjectPathUsingIndexer(r,u,f):t.createChildItemObjectPathUsingGetItemAt(r,u,f,e)},t.createChildItemObjectPathUsingIndexer=function(t,i,r){var f=r[n.Constants.id],u;return n.Utility.isNullOrUndefined(f)&&(f=r[n.Constants.idPrivate]),u=u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u.ArgumentInfo.Arguments=[f],new n.ObjectPath(u,i._objectPath,!1,!1)},t.createChildItemObjectPathUsingGetItemAt=function(t,i,r,u){var e=r[n.Constants.index],f;return e&&(u=e),f={Id:t._nextId(),ObjectPathType:3,Name:n.Constants.getItemAt,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f.ArgumentInfo.Arguments=[u],new n.ObjectPath(f,i._objectPath,!1,!1)},t}();n.ObjectPathFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_context=n}return t.prototype.executeAsync=function(i,r,u){var f=this,e=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n._Internal.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(e,function(i){n.Utility.log("Response:");n.Utility.log(JSON.stringify(i));var r;i.status=="succeeded"?r=n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBody(i),n.RichApiMessageUtility.getResponseHeaders(i)):(r=n.RichApiMessageUtility.buildResponseOnError(i.error.code,i.error.message),f.m_context._processOfficeJsErrorResponse(i.error.code,r));t(r)})})},t.SourceLibHeaderValue="officejs",t}();n.OfficeJsRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){n.OfficeRequire=function(){return null}()})(t=n._Internal||(n._Internal={})),function(n){var t;(function(t){function i(){return function(){"use strict";function vt(n){return typeof n=="function"||typeof n=="object"&&n!==null}function b(n){return typeof n=="function"}function yt(n){return typeof n=="object"&&n!==null}function wt(n){k=n}function bt(n){f=n}function ni(){var t=process.nextTick,n=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&n[1]==="0"&&n[2]==="10"&&(t=setImmediate),function(){t(c)}}function tr(){return function(){pt(c)}}function ti(){var n=0,i=new it(c),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function ii(){var n=new MessageChannel;return n.port1.onmessage=c,function(){n.port2.postMessage(0)}}function ri(){return function(){setTimeout(c,1)}}function c(){for(var t,i,n=0;n=0?(n=n.substring(t+5,n.length),n<"14.14393"?!0:!1):!1}function i(){return typeof window=="undefined"&&typeof Promise=="function"?Promise:typeof window!="undefined"&&window.Promise?t()?n.PromiseImpl.Init():window.Promise:n.PromiseImpl.Init()}n.OfficePromise=i()}(t=n._Internal||(n._Internal={}));i=t.OfficePromise;n.Promise=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this._autoCleanupList={};this.m_context=n}return t.prototype.add=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._addCommon(n,!0)}):this._addCommon(n,!0)},t.prototype._autoAdd=function(n){this._addCommon(n,!1);this._autoCleanupList[n._objectPath.objectPathInfo.Id]=n},t.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(t,i){var r=this.m_context._autoCleanup&&!t[n.Constants.isTracked]&&t!==this.m_context._rootObject&&i&&!n.Utility.isNullOrEmptyString(i[n.Constants.referenceId]);r&&(this._autoCleanupList[t._objectPath.objectPathInfo.Id]=t,t[n.Constants.isTracked]=!0)},t.prototype._addCommon=function(t,i){if(t[n.Constants.isTracked]){i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id];return}var r=t[n.Constants.referenceId];n.Utility.isNullOrEmptyString(r)&&t._KeepReference&&(t._KeepReference(),n.ActionFactory.createInstantiateAction(this.m_context,t),i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id],t[n.Constants.isTracked]=!0)},t.prototype.remove=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._removeCommon(n)}):this._removeCommon(n)},t.prototype._removeCommon=function(t){var r=t[n.Constants.referenceId],i;n.Utility.isNullOrEmptyString(r)||(i=this.m_context._rootObject,i._RemoveReference&&i._RemoveReference(r),delete t[n.Constants.isTracked])},t.prototype._retrieveAndClearAutoCleanupList=function(){var n=this._autoCleanupList;return this._autoCleanupList={},n},t}();n.TrackedObjects=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){n||(n="root");this.m_globalObjName=n;this.m_referencedObjectPaths=t;this.m_actions=i;this.m_statements=[];this.m_variableNameForObjectPathMap={};this.m_variableNameToObjectPathMap={};this.m_declaredObjectPathMap={};this.m_showDispose=r}return t.prototype.process=function(){this.m_showDispose&&n.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions);for(var t=0;t=0&&this.m_statements.length>i+o+1)break;if(i<0)return null;for(f=i-o,f<0&&(f=0),e=i+1+o,e>this.m_statements.length&&(e=this.m_statements.length),r=[],f!=0&&r.push("..."),s=f;s>>>>"),r.push(this.m_statements[i]),r.push("// <<<<<"),h=i+1;h0)?(r=i.map(function(n){return u.getObjVarName(n)}).join(", "),n+" // And then dispose {"+r+"}"):n},t.prototype.buildQueryExpression=function(n){if(n.actionInfo.QueryInfo){var t={};return t.select=n.actionInfo.QueryInfo.Select,t.expand=n.actionInfo.QueryInfo.Expand,t.skip=n.actionInfo.QueryInfo.Skip,t.top=n.actionInfo.QueryInfo.Top,typeof t.top=="undefined"&&typeof t.skip=="undefined"&&typeof t.expand=="undefined"?typeof t.select=="undefined"?"":JSON.stringify(t.select):JSON.stringify(t)}return""},t.prototype.buildObjectPathExpressionWithParent=function(n){var t=n.objectPathInfo.ObjectPathType==5||n.objectPathInfo.ObjectPathType==3||n.objectPathInfo.ObjectPathType==4;return t&&n.objectPathInfo.ParentObjectPathId?this.getObjVarName(n.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(n):this.buildObjectPathExpression(n)},t.prototype.buildObjectPathExpression=function(t){switch(t.objectPathInfo.ObjectPathType){case 1:return"context."+this.m_globalObjName;case 5:return"getItem("+this.buildArgumentsExpression(t.objectPathInfo.ArgumentInfo)+")";case 3:return n.Utility._toCamelLowerCase(t.objectPathInfo.Name)+"("+this.buildArgumentsExpression(t.objectPathInfo.ArgumentInfo)+")";case 2:return t.objectPathInfo.Name+".newObject()";case 7:return"null";case 4:return n.Utility._toCamelLowerCase(t.objectPathInfo.Name);case 6:return"context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(t.objectPathInfo.Name)+")"}},t.prototype.buildArgumentsExpression=function(n){var t="",i;if(!n.Arguments)return t;for(i=0;i0&&(t=t+", "),t=t+this.buildArgumentLiteral(n.Arguments[i],n.ReferencedObjectPathIds?n.ReferencedObjectPathIds[i]:null);return t==="undefined"&&(t=""),t},t.prototype.buildArgumentLiteral=function(n,t){return typeof n=="number"&&n===t?this.getObjVarName(t):JSON.stringify(n)},t.prototype.getObjVarNameBase=function(t){var u="v",f=this.m_referencedObjectPaths[t],i,r;switch(f.objectPathInfo.ObjectPathType){case 1:u=this.m_globalObjName;break;case 4:u=n.Utility._toCamelLowerCase(f.objectPathInfo.Name);break;case 3:i=f.objectPathInfo.Name;i.length>3&&i.substr(0,3)==="Get"&&(i=i.substr(3));u=n.Utility._toCamelLowerCase(i);break;case 5:r=this.getObjVarNameBase(f.objectPathInfo.ParentObjectPathId);u=r.charAt(r.length-1)==="s"?r.substr(0,r.length-1):r+"Item";break}return u},t.prototype.getObjVarName=function(n){var t,i;if(this.m_variableNameForObjectPathMap[n])return this.m_variableNameForObjectPathMap[n];if(t=this.getObjVarNameBase(n),!this.m_variableNameToObjectPathMap[t])return this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t;for(i=1;this.m_variableNameToObjectPathMap[t+i.toString()];)i++;return t=t+i.toString(),this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t},t}();n.RequestPrettyPrinter=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.cannotRegisterEvent="CannotRegisterEvent",n.connectionFailureWithStatus="ConnectionFailureWithStatus",n.connectionFailureWithDetails="ConnectionFailureWithDetails",n.invalidObjectPath="InvalidObjectPath",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.invalidArgumentGeneric="InvalidArgumentGeneric",n.propertyNotLoaded="PropertyNotLoaded",n.runMustReturnPromise="RunMustReturnPromise",n.timeout="Timeout",n.propertyDoesNotExist="PropertyDoesNotExist",n.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",n.moreInfoInnerError="MoreInfoInnerError",n.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",n.valueNotLoaded="ValueNotLoaded",n.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage",n.invalidOperationInCellEditMode="InvalidOperationInCellEditMode",n.customFunctionDefintionMissing="CustomFunctionDefintionMissing",n.customFunctionImplementationMissing="CustomFunctionImplementationMissing",n.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars",n.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit",n.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch",n.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing",n.apiNotFoundDetails="ApiNotFoundDetails",n}();n.ResourceStrings=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.CannotRegisterEvent="The event handler cannot be registered.",n.ConnectionFailureWithStatus="The request failed with status code of {0}.",n.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}",n.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",n.InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',n.InvalidRequestContext="Cannot use the object across different request contexts.",n.PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",n.RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',n.Timeout="The operation has timed out.",n.ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.',n.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.",n.InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.",n.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions.",n.CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.",n.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods.",n.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name.",n.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.",n.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.",n.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.",n}();n.ResourceStringValues=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.buildMessageArrayForIRequestExecutor=function(i,r,u,f){var o=JSON.stringify(u.Body),e;return n.Utility.log("Request:"),n.Utility.log(o),e={},e[n.Constants.sourceLibHeader]=f,t.buildRequestMessageSafeArray(i,r,"POST","ProcessQuery",e,o)},t.buildResponseOnSuccess=function(n,t){var i={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return i.Body=JSON.parse(n),i.Headers=t,i},t.buildResponseOnError=function(i,r){var u={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return u.ErrorCode=n.ErrorCodes.generalException,u.ErrorMessage=r,i==t.OfficeJsErrorCode_ooeNoCapability?u.ErrorCode=n.ErrorCodes.accessDenied:i==t.OfficeJsErrorCode_ooeActivityLimitReached?u.ErrorCode=n.ErrorCodes.activityLimitReached:i==t.OfficeJsErrorCode_ooeInvalidOrTimedOutSession&&(u.ErrorCode=n.ErrorCodes.invalidOrTimedOutSession,u.ErrorMessage=n.Utility._getResourceString(n.ResourceStrings.invalidOrTimedOutSessionMessage)),u},t.buildHttpResponseFromOfficeJsError=function(i,r){var f=500,u={};return u.error={},u.error.code=n.ErrorCodes.generalException,u.error.message=r,i===t.OfficeJsErrorCode_ooeNoCapability?(f=403,u.error.code=n.ErrorCodes.accessDenied):i===t.OfficeJsErrorCode_ooeActivityLimitReached&&(f=429,u.error.code=n.ErrorCodes.activityLimitReached),{statusCode:f,headers:{},body:JSON.stringify(u)}},t.buildRequestMessageSafeArray=function(n,t,i,r,u,f){var e=[],o;if(u)for(o in u)e.push(o),e.push(u[o]);var s=0,h="",c="",l="";return[n,i,r,e,f,s,t,h,c,l]},t.getResponseBody=function(n){return t.getResponseBodyFromSafeArray(n.value.data)},t.getResponseHeaders=function(n){return t.getResponseHeadersFromSafeArray(n.value.data)},t.getResponseBodyFromSafeArray=function(n){var t=n[2],i;return typeof t=="string"?t:(i=t,i.join(""))},t.getResponseHeadersFromSafeArray=function(n){var i=n[1],r,t;if(!i)return null;for(r={},t=0;t0&&f.push(i);return f},t.toJson=function(n,t,i,r){var e={},u,f;for(u in t)f=t[u],typeof f!="undefined"&&(e[u]=f);for(u in i)f=i[u],typeof f!="undefined"&&(e[u]=f.toJSON());return r&&(e.items=r.map(function(n){return n.toJSON()})),e},t.throwError=function(i,r,u){throw new n._Internal.RuntimeError({code:i,message:t._getResourceString(i,r),debugInfo:u?{errorLocation:u}:undefined});},t.createRuntimeError=function(t,i,r){return new n._Internal.RuntimeError({code:t,message:i,debugInfo:{errorLocation:r}})},t._getResourceString=function(i,r){var u,e,f,o;return typeof window!="undefined"&&window.Strings&&window.Strings.OfficeOM&&(e="L_"+i,f=window.Strings.OfficeOM[e],f&&(u=f)),u||(u=n.ResourceStringValues[i]),u||(u=i),t.isNullOrUndefined(r)||(Array.isArray(r)?(o=r,u=t._formatString(u,o)):u=u.replace("{0}",r)),u},t._formatString=function(t,i){return t.replace(/\{\d\}/g,function(t){var r=parseInt(t.substr(1,t.length-2));if(r0?".":"")+i;break;case 3:i=t.normalizeName(n.objectPathInfo.Name)+"()"+(i.length>0?".":"")+i;break;case 4:i=t.normalizeName(n.objectPathInfo.Name)+(i.length>0?".":"")+i;break;case 5:i="getItem()"+(i.length>0?".":"")+i;break;case 6:i="_reference()"+(i.length>0?".":"")+i;break}n=n.parentObjectPath}return i},t._createPromiseFromResult=function(t){return new n._Internal.OfficePromise(function(n,i){n(t)})},t._createTimeoutPromise=function(t){return new n._Internal.OfficePromise(function(n,i){setTimeout(function(){n(null)},t)})},t.promisify=function(t){return new n._Internal.OfficePromise(function(n,i){var r=function(t){t.status=="failed"?i(t.error):n(t.value)};t(r)})},t._addActionResultHandler=function(n,t,i){n.context._pendingRequest.addActionResultHandler(t,i)},t._handleNavigationPropertyResults=function(n,i,r){for(var u=0;u0},t._getLocalDocumentUrlPrefixLength=function(n){for(var i=["http://document.localhost","https://document.localhost","//document.localhost"],r=n.toLowerCase().trim(),t=0;t0))for(s=i.url.substr(f+1),e=s.split("&"),u=0;u0&&(f=i.substr(0,u),e=i.substr(u+1),f=t.trim(f),e=t.trim(e),s[f.toUpperCase()]=e));return s},t._parseErrorResponse=function(i){var r=null,f,e,u;if(t.isPlainJsonObject(i.body))r=i.body;else if(!t.isNullOrEmptyString(i.body)){f=t.trim(i.body);try{r=JSON.parse(f)}catch(o){t.log("Error when parse "+f)}}return!t.isNullOrUndefined(r)&&typeof r=="object"&&r.error?(u=r.error.code,e=t._getResourceString(n.ResourceStrings.connectionFailureWithDetails,[i.statusCode.toString(),r.error.code,r.error.message])):e=t._getResourceString(n.ResourceStrings.connectionFailureWithStatus,i.statusCode.toString()),t.isNullOrEmptyString(u)&&(u=n.ErrorCodes.connectionFailure),{errorCode:u,errorMessage:e}},t._copyHeaders=function(n,t){if(n&&t)for(var i in n)t[i]=n[i]},t._toCamelLowerCase=function(n){if(t.isNullOrEmptyString(n))return n;for(var i=0;i=65&&n.charCodeAt(i)<=90;)i++;return i0&&Array.isArray(i[0])&&i.length*i[0].length>s&&ht()){for(e=Math.max(1,Math.round(s/i[0].length)),n._ValidateArraySize(i.length,i[0].length),r=0;ri.length&&(u=i.length-r),o=n.getRow(r).getBoundingRect(n.getRow(r+u-1)),h=i.slice(r,r+u),f(o.context,o,t,h);return!0}return!1}function ht(){return typeof window!="undefined"&&window.Office&&window.Office.context&&window.Office.context.requirements?window.Office.context.requirements.isSetSupported("ExcelApi",1.3):!0}function ss(t,i,r){return OfficeExtension.ClientRequestContext._runBatch("Excel.run",arguments,function(t){return new n.RequestContext(t)})}function hs(t,i){return OfficeExtension.ClientRequestContext._runExplicitBatch("Excel.runBatch",arguments,function(t){return new n.RequestContext(t)})}function yt(n){var t={BindingColumnCount:n.bindingColumnCount,BindingId:n.bindingId,BindingRowCount:n.bindingRowCount,bindingType:n.bindingType,HasHeaders:n.hasHeaders};return window.OSF.DDA.OMFactory.manufactureBinding(t,window.Microsoft.Office.WebExtension.context.document)}function lr(n,t){var r=n.headers==null,i;return i=r?n.rows:n,i=window.OSF.DDA.DataCoercion.coerceData(i,t[window.Microsoft.Office.WebExtension.Parameters.CoercionType]),i==undefined?null:i}function cs(n,t,i){var e=typeof window!="undefined"&&window.Office&&window.Office.context&&window.Office.context.diagnostics&&window.Office.context.diagnostics.version;if(!e)return!1;var o=window.Office.context.diagnostics.version,s=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/,r=s.exec(o);if(r){var u=parseInt(r[1]),f=parseInt(r[2]),h=parseInt(r[3]),c=parseInt(r[4]),l=3e3;if(u0?f=i.getOffsetRange(r,u):(f=i,e=r,o=u),Math.abs(t)==1)?f:f.getBoundingRect(i.getOffsetRange(r*t+e,u*t+o))},Object.defineProperty(k.prototype,"conditionalFormats",{get:function(){return l("Range.conditionalFormats",c,"1.6",h),this._Con||(this._Con=new n.ConditionalFormatCollection(this.context,o(this.context,this,"ConditionalFormats",!0,!1,!1))),this._Con},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"format",{get:function(){return this._F||(this._F=new n.RangeFormat(this.context,o(this.context,this,"Format",!1,!1,!1))),this._F},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"sort",{get:function(){return l("Range.sort",c,"1.2",h),this._S||(this._S=new n.RangeSort(this.context,o(this.context,this,"Sort",!1,!1,!1))),this._S},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"worksheet",{get:function(){return this._W||(this._W=new n.Worksheet(this.context,o(this.context,this,"Worksheet",!1,!1,!1))),this._W},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"address",{get:function(){return r("address",this._A,nt,this._isNull),this._A},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"addressLocal",{get:function(){return r("addressLocal",this._Ad,nt,this._isNull),this._Ad},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"cellCount",{get:function(){return r("cellCount",this._C,nt,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"columnCount",{get:function(){return r("columnCount",this._Co,nt,this._isNull),this._Co},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"columnHidden",{get:function(){return r("columnHidden",this._Col,nt,this._isNull),l("Range.columnHidden",c,"1.2",h),this._Col},set:function(n){this._Col=n;f(this.context,this,"ColumnHidden",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"columnIndex",{get:function(){return r("columnIndex",this._Colu,nt,this._isNull),this._Colu},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"formulas",{get:function(){return r("formulas",this.m_formulas,nt,this._isNull),this.m_formulas},set:function(n){(this.m_formulas=n,vt(this,"Formulas",n))||(this.m_formulas=n,f(this.context,this,"Formulas",n))},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"formulasLocal",{get:function(){return r("formulasLocal",this.m_formulasLocal,nt,this._isNull),this.m_formulasLocal},set:function(n){(this.m_formulasLocal=n,vt(this,"FormulasLocal",n))||(this.m_formulasLocal=n,f(this.context,this,"FormulasLocal",n))},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"formulasR1C1",{get:function(){return r("formulasR1C1",this.m_formulasR1C1,nt,this._isNull),l("Range.formulasR1C1",c,"1.2",h),this.m_formulasR1C1},set:function(n){(this.m_formulasR1C1=n,vt(this,"FormulasR1C1",n))||(this.m_formulasR1C1=n,f(this.context,this,"FormulasR1C1",n))},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"hidden",{get:function(){return r("hidden",this._H,nt,this._isNull),l("Range.hidden",c,"1.2",h),this._H},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"numberFormat",{get:function(){return r("numberFormat",this.m_numberFormat,nt,this._isNull),this.m_numberFormat},set:function(n){(this.m_numberFormat=n,vt(this,"NumberFormat",n))||(this.m_numberFormat=n,f(this.context,this,"NumberFormat",n))},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"rowCount",{get:function(){return r("rowCount",this._R,nt,this._isNull),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"rowHidden",{get:function(){return r("rowHidden",this._Ro,nt,this._isNull),l("Range.rowHidden",c,"1.2",h),this._Ro},set:function(n){this._Ro=n;f(this.context,this,"RowHidden",n)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"rowIndex",{get:function(){return r("rowIndex",this._Row,nt,this._isNull),this._Row},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"text",{get:function(){return r("text",this._T,nt,this._isNull),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"valueTypes",{get:function(){return r("valueTypes",this._V,nt,this._isNull),this._V},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"values",{get:function(){return r("values",this.m_values,nt,this._isNull),this.m_values},set:function(n){(this.m_values=n,vt(this,"Values",n))||(this.m_values=n,f(this.context,this,"Values",n))},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"_ReferenceId",{get:function(){return r("_ReferenceId",this.__R,nt,this._isNull),this.__R},enumerable:!0,configurable:!0}),k.prototype.set=function(n,t){this._recursivelySet(n,t,["numberFormat","values","formulas","formulasLocal","formulasR1C1","rowHidden","columnHidden"],["format"],["conditionalFormats","sort","worksheet"])},k.prototype.update=function(n){this._recursivelyUpdate(n)},k.prototype.calculate=function(){l("Range.calculate",c,"1.6",h);s(this.context,this,"Calculate",0,[],!1)},k.prototype.clear=function(n){s(this.context,this,"Clear",0,[n],!1)},k.prototype.delete=function(n){s(this.context,this,"Delete",0,[n],!1)},k.prototype.getBoundingRect=function(i){return new n.Range(this.context,t(this.context,this,"GetBoundingRect",1,[i],!1,!0,null,!1))},k.prototype.getCell=function(i,r){return new n.Range(this.context,t(this.context,this,"GetCell",1,[i,r],!1,!0,null,!1))},k.prototype.getColumn=function(i){return new n.Range(this.context,t(this.context,this,"GetColumn",1,[i],!1,!0,null,!1))},k.prototype.getColumnsAfter=function(i){return ht()?(l("Range.getColumnsAfter",c,"1.3",h),new n.Range(this.context,t(this.context,this,"GetColumnsAfter",1,[i],!1,!0,null,!1))):(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0&&OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove"),this._getAdjacentRange("getColumnsAfter",i,this.getLastColumn(),0,1))},k.prototype.getColumnsBefore=function(i){return ht()?(l("Range.getColumnsBefore",c,"1.3",h),new n.Range(this.context,t(this.context,this,"GetColumnsBefore",1,[i],!1,!0,null,!1))):(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0&&OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove"),this._getAdjacentRange("getColumnsBefore",i,this.getColumn(0),0,-1))},k.prototype.getEntireColumn=function(){return new n.Range(this.context,t(this.context,this,"GetEntireColumn",1,[],!1,!0,null,!1))},k.prototype.getEntireRow=function(){return new n.Range(this.context,t(this.context,this,"GetEntireRow",1,[],!1,!0,null,!1))},k.prototype.getIntersection=function(i){return new n.Range(this.context,t(this.context,this,"GetIntersection",1,[i],!1,!0,null,!1))},k.prototype.getIntersectionOrNullObject=function(i){return l("Range.getIntersectionOrNullObject",c,"1.4",h),new n.Range(this.context,t(this.context,this,"GetIntersectionOrNullObject",1,[i],!1,!0,null,!1))},k.prototype.getLastCell=function(){return new n.Range(this.context,t(this.context,this,"GetLastCell",1,[],!1,!0,null,!1))},k.prototype.getLastColumn=function(){return new n.Range(this.context,t(this.context,this,"GetLastColumn",1,[],!1,!0,null,!1))},k.prototype.getLastRow=function(){return new n.Range(this.context,t(this.context,this,"GetLastRow",1,[],!1,!0,null,!1))},k.prototype.getOffsetRange=function(i,r){return new n.Range(this.context,t(this.context,this,"GetOffsetRange",1,[i,r],!1,!0,null,!1))},k.prototype.getResizedRange=function(i,r){if(!ht()){this._ensureInteger(i,"getResizedRange");this._ensureInteger(r,"getResizedRange");var u=i>=0&&r>=0?this:this.getCell(0,0);return u.getBoundingRect(this.getLastCell().getOffsetRange(i,r))}return l("Range.getResizedRange",c,"1.3",h),new n.Range(this.context,t(this.context,this,"GetResizedRange",1,[i,r],!1,!0,null,!1))},k.prototype.getRow=function(i){return new n.Range(this.context,t(this.context,this,"GetRow",1,[i],!1,!0,null,!1))},k.prototype.getRowsAbove=function(i){return ht()?(l("Range.getRowsAbove",c,"1.3",h),new n.Range(this.context,t(this.context,this,"GetRowsAbove",1,[i],!1,!0,null,!1))):(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0&&OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove"),this._getAdjacentRange("getRowsAbove",i,this.getRow(0),-1,0))},k.prototype.getRowsBelow=function(i){return ht()?(l("Range.getRowsBelow",c,"1.3",h),new n.Range(this.context,t(this.context,this,"GetRowsBelow",1,[i],!1,!0,null,!1))):(i==null&&(i=1),this._ensureInteger(i,"RowsAbove"),i==0&&OfficeExtension.Utility.throwError(n.ErrorCodes.invalidArgument,"count","RowsAbove"),this._getAdjacentRange("getRowsBelow",i,this.getLastRow(),1,0))},k.prototype.getUsedRange=function(i){return new n.Range(this.context,t(this.context,this,"GetUsedRange",1,[i],!1,!0,null,!1))},k.prototype.getUsedRangeOrNullObject=function(i){return l("Range.getUsedRangeOrNullObject",c,"1.4",h),new n.Range(this.context,t(this.context,this,"GetUsedRangeOrNullObject",1,[i],!1,!0,null,!1))},k.prototype.getVisibleView=function(){return l("Range.getVisibleView",c,"1.3",h),new n.RangeView(this.context,t(this.context,this,"GetVisibleView",1,[],!1,!1,null,!1))},k.prototype.insert=function(i){return new n.Range(this.context,t(this.context,this,"Insert",0,[i],!1,!0,null,!1))},k.prototype.merge=function(n){l("Range.merge",c,"1.2",h);s(this.context,this,"Merge",0,[n],!1)},k.prototype.select=function(){s(this.context,this,"Select",1,[],!1)},k.prototype.unmerge=function(){l("Range.unmerge",c,"1.2",h);s(this.context,this,"Unmerge",0,[],!1)},k.prototype._KeepReference=function(){s(this.context,this,"_KeepReference",1,[],!1)},k.prototype._ValidateArraySize=function(n,t){l("Range._ValidateArraySize",c,"1.3",h);s(this.context,this,"_ValidateArraySize",1,[n,t],!1)},k.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;v(this,t);u(t.Address)||(this._A=t.Address);u(t.AddressLocal)||(this._Ad=t.AddressLocal);u(t.CellCount)||(this._C=t.CellCount);u(t.ColumnCount)||(this._Co=t.ColumnCount);u(t.ColumnHidden)||(this._Col=t.ColumnHidden);u(t.ColumnIndex)||(this._Colu=t.ColumnIndex);u(t.Formulas)||(this.m_formulas=t.Formulas);u(t.FormulasLocal)||(this.m_formulasLocal=t.FormulasLocal);u(t.FormulasR1C1)||(this.m_formulasR1C1=t.FormulasR1C1);u(t.Hidden)||(this._H=t.Hidden);u(t.NumberFormat)||(this.m_numberFormat=t.NumberFormat);u(t.RowCount)||(this._R=t.RowCount);u(t.RowHidden)||(this._Ro=t.RowHidden);u(t.RowIndex)||(this._Row=t.RowIndex);u(t.Text)||(this._T=t.Text);u(t.ValueTypes)||(this._V=t.ValueTypes);u(t.Values)||(this.m_values=t.Values);u(t._ReferenceId)||(this.__R=t._ReferenceId);d(this,t,["conditionalFormats","ConditionalFormats","format","Format","sort","Sort","worksheet","Worksheet"])}},k.prototype.load=function(n){return p(this,n)},k.prototype.retrieve=function(n){return w(this,n)},k.prototype._handleIdResult=function(n){(i.prototype._handleIdResult.call(this,n),e(n))||u(n._ReferenceId)||(this.__R=n._ReferenceId)},k.prototype._handleRetrieveResult=function(n,t){i.prototype._handleRetrieveResult.call(this,n,t);y(this,n,t)},k.prototype.track=function(){return this.context.trackedObjects.add(this),this},k.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},k.prototype.toJSON=function(){return a(this,{address:this._A,addressLocal:this._Ad,cellCount:this._C,columnCount:this._Co,columnHidden:this._Col,columnIndex:this._Colu,formulas:this.m_formulas,formulasLocal:this.m_formulasLocal,formulasR1C1:this.m_formulasR1C1,hidden:this._H,numberFormat:this.m_numberFormat,rowCount:this._R,rowHidden:this._Ro,rowIndex:this._Row,text:this._T,values:this.m_values,valueTypes:this._V},{conditionalFormats:this._Con,format:this._F})},k.prototype.ensureUnchanged=function(n){b(this.context,this,n);return},k}(OfficeExtension.ClientObject);n.Range=ri;it="RangeView";wr=function(i){function s(){return i!==null&&i.apply(this,arguments)||this}return __extends(s,i),Object.defineProperty(s.prototype,"_className",{get:function(){return"RangeView"},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_scalarPropertyNames",{get:function(){return["numberFormat","values","text","formulas","formulasLocal","formulasR1C1","valueTypes","rowCount","columnCount","cellAddresses","index"]},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_scalarPropertyUpdateable",{get:function(){return[!0,!0,!1,!0,!0,!0,!1,!1,!1,!1,!1]},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"_navigationPropertyNames",{get:function(){return["rows"]},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rows",{get:function(){return this._Ro||(this._Ro=new n.RangeViewCollection(this.context,o(this.context,this,"Rows",!0,!1,!1))),this._Ro},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"cellAddresses",{get:function(){return r("cellAddresses",this._C,it,this._isNull),this._C},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"columnCount",{get:function(){return r("columnCount",this._Co,it,this._isNull),this._Co},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulas",{get:function(){return r("formulas",this._F,it,this._isNull),this._F},set:function(n){this._F=n;f(this.context,this,"Formulas",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulasLocal",{get:function(){return r("formulasLocal",this._Fo,it,this._isNull),this._Fo},set:function(n){this._Fo=n;f(this.context,this,"FormulasLocal",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"formulasR1C1",{get:function(){return r("formulasR1C1",this._For,it,this._isNull),this._For},set:function(n){this._For=n;f(this.context,this,"FormulasR1C1",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"index",{get:function(){return r("index",this._I,it,this._isNull),this._I},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"numberFormat",{get:function(){return r("numberFormat",this._N,it,this._isNull),this._N},set:function(n){this._N=n;f(this.context,this,"NumberFormat",n)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"rowCount",{get:function(){return r("rowCount",this._R,it,this._isNull),this._R},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"text",{get:function(){return r("text",this._T,it,this._isNull),this._T},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"valueTypes",{get:function(){return r("valueTypes",this._Va,it,this._isNull),this._Va},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"values",{get:function(){return r("values",this._V,it,this._isNull),this._V},set:function(n){this._V=n;f(this.context,this,"Values",n)},enumerable:!0,configurable:!0}),s.prototype.set=function(n,t){this._recursivelySet(n,t,["numberFormat","values","formulas","formulasLocal","formulasR1C1"],[],["rows"])},s.prototype.update=function(n){this._recursivelyUpdate(n)},s.prototype.getRange=function(){return new n.Range(this.context,t(this.context,this,"GetRange",1,[],!1,!0,null,!1))},s.prototype._handleResult=function(n){if(i.prototype._handleResult.call(this,n),!e(n)){var t=n;v(this,t);u(t.CellAddresses)||(this._C=t.CellAddresses);u(t.ColumnCount)||(this._Co=t.ColumnCount);u(t.Formulas)||(this._F=t.Formulas);u(t.FormulasLocal)||(this._Fo=t.FormulasLocal);u(t.FormulasR1C1)||(this._For=t.FormulasR1C1);u(t.Index)||(this._I=t.Index);u(t.NumberFormat)||(this._N=t.NumberFormat);u(t.RowCount)||(this._R=t.RowCount);u(t.Text)||(this._T=t.Text);u(t.ValueTypes)||(this._Va=t.ValueTypes);u(t.Values)||(this._V=t.Values);d(this,t,["rows","Rows"])}},s.prototype.load=function(n){return p(this,n)},s.prototype.retrieve=function(n){return w(this,n)},s.prototype._handleRetrieveResult=function(n,t){i.prototype._handleRetrieveResult.call(this,n,t);y(this,n,t)},s.prototype.toJSON=function(){return a(this,{cellAddresses:this._C,columnCount:this._Co,formulas:this._F,formulasLocal:this._Fo,formulasR1C1:this._For,index:this._I,numberFormat:this._N,rowCount:this._R,text:this._T,values:this._V,valueTypes:this._Va},{rows:this._Ro})},s.prototype.ensureUnchanged=function(n){b(this.context,this,n);return},s}(OfficeExtension.ClientObject);n.RangeView=wr;br="RangeViewCollection";kr=function(i){function u(){return i!==null&&i.apply(this,arguments)||this}return __extends(u,i),Object.defineProperty(u.prototype,"_className",{get:function(){return"RangeViewCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"items",{get:function(){return r("items",this.m__items,br,this._isNull),this.m__items},enumerable:!0,configurable:!0}),u.prototype.getCount=function(){l("RangeViewCollection.getCount",c,"1.4",h);var t=s(this.context,this,"GetCount",1,[],!1),n=new OfficeExtension.ClientResult;return k(this,t,n),n},u.prototype.getItemAt=function(i){return new n.RangeView(this.context,t(this.context,this,"GetItemAt",1,[i],!1,!1,null,!1))},u.prototype._handleResult=function(t){var u,f,r,o;if((i.prototype._handleResult.call(this,t),!e(t))&&(u=t,v(this,u),!e(u[OfficeExtension.Constants.items])))for(this.m__items=[],f=u[OfficeExtension.Constants.items],r=0;r6&&i.slice(0,5)===t.DateJSONPrefix&&i.slice(-1)===t.DateJSONSuffix&&(r=new Date(parseInt(i.slice(5,-1))),r)?r:i})},t._replaceDateWithStringDate=function(n){var i=JSON.stringify(n,function(n,i){return this[n]instanceof Date?t.DateJSONPrefix+this[n].getTime()+t.DateJSONSuffix:i});return JSON.parse(i)},Object.defineProperty(t.prototype,"key",{get:function(){return r("key",this._K,ai,this._isNull),this._K},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return r("value",this.m_value,ai,this._isNull),this.m_value},set:function(n){if(!e(n)){this.m_value=n;var i=t._replaceDateWithStringDate(n);f(this.context,this,"Value",i);return}this.m_value=n;f(this.context,this,"Value",n)},enumerable:!0,configurable:!0}),t.prototype.set=function(n,t){this._recursivelySet(n,t,["value"],[],[])},t.prototype.update=function(n){this._recursivelyUpdate(n)},t.prototype.delete=function(){s(this.context,this,"Delete",0,[],!1)},t.prototype._handleResult=function(i){if(n.prototype._handleResult.call(this,i),!e(i)){var r=i;v(this,r);u(r.Key)||(this._K=r.Key);u(r.Value)||(this.m_value=r.Value,this.m_value=t.replaceStringDateWithDate(this.m_value))}},t.prototype.load=function(n){return p(this,n)},t.prototype.retrieve=function(n){return w(this,n)},t.prototype._handleRetrieveResult=function(t,i){n.prototype._handleRetrieveResult.call(this,t,i);y(this,t,i)},t.prototype.toJSON=function(){return a(this,{key:this._K,value:this.m_value},{})},t.prototype.ensureUnchanged=function(n){b(this.context,this,n);return},t}(OfficeExtension.ClientObject);wt.DateJSONPrefix="Date(";wt.DateJSONSuffix=")";n.Setting=wt;nu="NamedItemCollection";tu=function(i){function u(){return i!==null&&i.apply(this,arguments)||this}return __extends(u,i),Object.defineProperty(u.prototype,"_className",{get:function(){return"NamedItemCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"_isCollection",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"items",{get:function(){return r("items",this.m__items,nu,this._isNull),this.m__items},enumerable:!0,configurable:!0}),u.prototype.add=function(i,r,u){return l("NamedItemCollection.add",c,"1.4",h),new n.NamedItem(this.context,t(this.context,this,"Add",0,[i,r,u],!1,!0,null,!1))},u.prototype.addFormulaLocal=function(i,r,u){return l("NamedItemCollection.addFormulaLocal",c,"1.4",h),new n.NamedItem(this.context,t(this.context,this,"AddFormulaLocal",0,[i,r,u],!1,!1,null,!1))},u.prototype.getCount=function(){l("NamedItemCollection.getCount",c,"1.4",h);var t=s(this.context,this,"GetCount",1,[],!1),n=new OfficeExtension.ClientResult;return k(this,t,n),n},u.prototype.getItem=function(t){return new n.NamedItem(this.context,tt(this.context,this,[t]))},u.prototype.getItemOrNullObject=function(i){return l("NamedItemCollection.getItemOrNullObject",c,"1.4",h),new n.NamedItem(this.context,t(this.context,this,"GetItemOrNullObject",1,[i],!1,!1,null,!1))},u.prototype._handleResult=function(t){var u,f,r,o;if((i.prototype._handleResult.call(this,t),!e(t))&&(u=t,v(this,u),!e(u[OfficeExtension.Constants.items])))for(this.m__items=[],f=u[OfficeExtension.Constants.items],r=0;r"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_scalarPropertyNames",{get:function(){return["error","value"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"error",{get:function(){return r("error",this._E,sr,this._isNull),this._E},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return r("value",this._V,sr,this._isNull),this._V},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){if(n.prototype._handleResult.call(this,t),!e(t)){var i=t;v(this,i);u(i.Error)||(this._E=i.Error);u(i.Value)||(this._V=i.Value)}},t.prototype.load=function(n){return p(this,n)},t.prototype.retrieve=function(n){return w(this,n)},t.prototype._handleRetrieveResult=function(t,i){n.prototype._handleRetrieveResult.call(this,t,i);y(this,t,i)},t.prototype.toJSON=function(){return a(this,{error:this._E,value:this._V},{})},t.prototype.ensureUnchanged=function(n){b(this.context,this,n);return},t}(OfficeExtension.ClientObject);n.FunctionResult=i;al="Functions";us=function(n){function r(){return n!==null&&n.apply(this,arguments)||this}return __extends(r,n),Object.defineProperty(r.prototype,"_className",{get:function(){return"Functions"},enumerable:!0,configurable:!0}),r.prototype.abs=function(n){return new i(this.context,t(this.context,this,"Abs",0,[n],!1,!0,null,!1))},r.prototype.accrInt=function(n,r,u,f,e,o,s,h){return new i(this.context,t(this.context,this,"AccrInt",0,[n,r,u,f,e,o,s,h],!1,!0,null,!1))},r.prototype.accrIntM=function(n,r,u,f,e){return new i(this.context,t(this.context,this,"AccrIntM",0,[n,r,u,f,e],!1,!0,null,!1))},r.prototype.acos=function(n){return new i(this.context,t(this.context,this,"Acos",0,[n],!1,!0,null,!1))},r.prototype.acosh=function(n){return new i(this.context,t(this.context,this,"Acosh",0,[n],!1,!0,null,!1))},r.prototype.acot=function(n){return new i(this.context,t(this.context,this,"Acot",0,[n],!1,!0,null,!1))},r.prototype.acoth=function(n){return new i(this.context,t(this.context,this,"Acoth",0,[n],!1,!0,null,!1))},r.prototype.amorDegrc=function(n,r,u,f,e,o,s){return new i(this.context,t(this.context,this,"AmorDegrc",0,[n,r,u,f,e,o,s],!1,!0,null,!1))},r.prototype.amorLinc=function(n,r,u,f,e,o,s){return new i(this.context,t(this.context,this,"AmorLinc",0,[n,r,u,f,e,o,s],!1,!0,null,!1))},r.prototype.and=function(){for(var r=[],n=0;n 1 ? fragmentParts[fragmentParts.length - 1] : null; + if (window.sessionStorage) { + var sessionKeyStart=window.name.indexOf(_xdmSessionKeyPrefix); + if (sessionKeyStart > -1) { + var sessionKeyEnd=window.name.indexOf(";", sessionKeyStart); + if (sessionKeyEnd==-1) { + sessionKeyEnd=window.name.length; + } + var sessionKey=window.name.substring(sessionKeyStart, sessionKeyEnd); + if (xdmInfoValue) { + window.sessionStorage.setItem(sessionKey, xdmInfoValue); + } else { + xdmInfoValue=window.sessionStorage.getItem(sessionKey); + } + } + } + return xdmInfoValue; + }, + getConversationId: function OSF_OUtil$getConversationId() { + var searchString=window.location.search; + var conversationId=null; + if (searchString) { + var index=searchString.indexOf("&"); + conversationId=index > 0 ? searchString.substring(1, index) : searchString.substr(1); + if(conversationId && conversationId.charAt(conversationId.length-1)==='='){ + conversationId=conversationId.substring(0, conversationId.length-1); + if(conversationId) { + conversationId=decodeURIComponent(conversationId); + } + } + } + return conversationId; + }, + validateParamObject: function OSF_OUtil$validateParamObject(params, expectedProperties, callback) { + var e=Function._validateParams(arguments, [ + { name: "params", type: Object, mayBeNull: false }, + { name: "expectedProperties", type: Object, mayBeNull: false }, + { name: "callback", type: Function, mayBeNull: true } + ]); + if (e) throw e; + for (var p in expectedProperties) { + e=Function._validateParameter(params[p], expectedProperties[p], p); + if (e) throw e; + } + }, + writeProfilerMark: function OSF_OUtil$writeProfilerMark(text) { + if (window.msWriteProfilerMark) { + window.msWriteProfilerMark(text); + OsfMsAjaxFactory.msAjaxDebug.trace(text); + } + }, + defineNondefaultProperty: function OSF_OUtil$defineNondefaultProperty(obj, prop, descriptor, attributes) { + descriptor=descriptor || {}; + for (var nd in attributes) { + var attribute=attributes[nd]; + if (descriptor[attribute]==undefined) { + descriptor[attribute]=true; + } + } + Object.defineProperty(obj, prop, descriptor); + return obj; + }, + defineNondefaultProperties: function OSF_OUtil$defineNondefaultProperties(obj, descriptors, attributes) { + descriptors=descriptors || {}; + for (var prop in descriptors) { + OSF.OUtil.defineNondefaultProperty(obj, prop, descriptors[prop], attributes); + } + return obj; + }, + defineEnumerableProperty: function OSF_OUtil$defineEnumerableProperty(obj, prop, descriptor) { + return OSF.OUtil.defineNondefaultProperty(obj, prop, descriptor, ["enumerable"]); + }, + defineEnumerableProperties: function OSF_OUtil$defineEnumerableProperties(obj, descriptors) { + return OSF.OUtil.defineNondefaultProperties(obj, descriptors, ["enumerable"]); + }, + defineMutableProperty: function OSF_OUtil$defineMutableProperty(obj, prop, descriptor) { + return OSF.OUtil.defineNondefaultProperty(obj, prop, descriptor, ["writable", "enumerable", "configurable"]); + }, + defineMutableProperties: function OSF_OUtil$defineMutableProperties(obj, descriptors) { + return OSF.OUtil.defineNondefaultProperties(obj, descriptors, ["writable", "enumerable", "configurable"]); + }, + finalizeProperties: function OSF_OUtil$finalizeProperties(obj, descriptor) { + descriptor=descriptor || {}; + var props=Object.getOwnPropertyNames(obj); + var propsLength=props.length; + for (var i=0; i < propsLength; i++) { + var prop=props[i]; + var desc=Object.getOwnPropertyDescriptor(obj, prop); + if (!desc.get && !desc.set) { + desc.writable=descriptor.writable || false; + } + desc.configurable=descriptor.configurable || false; + desc.enumerable=descriptor.enumerable || true; + Object.defineProperty(obj, prop, desc); + } + return obj; + }, + mapList: function OSF_OUtil$MapList(list, mapFunction) { + var ret=[]; + if (list) { + for (var item in list) { + ret.push(mapFunction(list[item])); + } + } + return ret; + }, + listContainsKey: function OSF_OUtil$listContainsKey(list, key) { + for (var item in list) { + if (key==item) { + return true; + } + } + return false; + }, + listContainsValue: function OSF_OUtil$listContainsElement(list, value) { + for (var item in list) { + if (value==list[item]) { + return true; + } + } + return false; + }, + augmentList: function OSF_OUtil$augmentList(list, addenda) { + var add=list.push ? function (key, value) { list.push(value); } : function (key, value) { list[key]=value; }; + for (var key in addenda) { + add(key, addenda[key]); + } + }, + redefineList: function OSF_Outil$redefineList(oldList, newList) { + for (var key1 in oldList) { + delete oldList[key1]; + } + for (var key2 in newList) { + oldList[key2]=newList[key2]; + } + }, + isArray: function OSF_OUtil$isArray(obj) { + return Object.prototype.toString.apply(obj)==="[object Array]"; + }, + isFunction: function OSF_OUtil$isFunction(obj) { + return Object.prototype.toString.apply(obj)==="[object Function]"; + }, + isDate: function OSF_OUtil$isDate(obj) { + return Object.prototype.toString.apply(obj)==="[object Date]"; + }, + addEventListener: function OSF_OUtil$addEventListener(element, eventName, listener) { + if (element.attachEvent) { + element.attachEvent("on"+eventName, listener); + } else if (element.addEventListener) { + element.addEventListener(eventName, listener, false); + } else { + element["on"+eventName]=listener; + } + }, + removeEventListener: function OSF_OUtil$removeEventListener(element, eventName, listener) { + if (element.detachEvent) { + element.detachEvent("on"+eventName, listener); + } else if (element.removeEventListener) { + element.removeEventListener(eventName, listener, false); + } else { + element["on"+eventName]=null; + } + }, + encodeBase64: function OSF_Outil$encodeBase64(input) { + var codex="ABCDEFGHIJKLMNOP"+ "QRSTUVWXYZabcdef"+ "ghijklmnopqrstuv"+ "wxyz0123456789+/"+ "="; + var output=[]; + var temp=[]; + var index=0; + var a, b, c; + var length=input.length; + do { + a=input[index++]; + b=input[index++]; + c=input[index++]; + temp[0]=a >> 2; + temp[1]=((a & 3) << 4) | (b >> 4); + temp[2]=((b & 15) << 2) | (c >> 6); + temp[3]=c & 63; + if (isNaN(b)) { + temp[2]=temp[3]=64; + } else if (isNaN(c)) { + temp[3]=64; + } + for (var t=0; t < 4; t++) { + output.push(codex.charAt(temp[t])); + } + } while (index < length); + return output.join(""); + }, + getLocalStorage: function OSF_Outil$getLocalStorage() { + var osfLocalStorage=null; + if (!_localStorageNotWorking) { + try { + if (window.localStorage) { + osfLocalStorage=window.localStorage; + } + } + catch (ex) { + _localStorageNotWorking=true; + } + } + return osfLocalStorage; + }, + splitStringToList: function OSF_Outil$splitStringToList(input, spliter) { + var backslash=false; + var index=-1; + var res=[]; + var insideStr=false; + var s=spliter+input; + for (var i=0; i < s.length; i++) { + if (s[i]=="\\" && !backslash) { + backslash=true; + } else { + if (s[i]==spliter && !insideStr) { + res.push(""); + index++; + } else if (s[i]=="\"" && !backslash) { + insideStr=!insideStr; + } else { + res[index]+=s[i]; + } + backslash=false; + } + } + return res; + }, + convertIntToHex: function OSF_Outil$convertIntToHex(val) { + var hex="#"+(Number(val)+0x1000000).toString(16).slice(-6); + return hex; + } + }; +})(); +OSF.OUtil.Guid=(function() { + var hexCode=["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]; + return { + generateNewGuid: function OSF_Outil_Guid$generateNewGuid() { + var result=""; + var tick=(new Date()).getTime(); + var index=0; + for (; index < 32 && tick > 0; index++) { + if (index==8 || index==12 || index==16 || index==20) { + result+="-"; + } + result+=hexCode[tick % 16]; + tick=Math.floor(tick / 16); + } + for (; index < 32; index++) { + if (index==8 || index==12 || index==16 || index==20) { + result+="-"; + } + result+=hexCode[Math.floor(Math.random() * 16)]; + } + return result; + } + } +})(); +window.OSF=OSF; +AriaLogger=(function() { + var _basePath=null; + var _ALogger; + function _isIUsageData(arg) { + return arg["Fields"] !==undefined; + } + function _getScriptBase(scriptSrc, scriptNameToCheck) { + var scriptBase, indexOfJS; + scriptSrc=scriptSrc.toLowerCase(); + scriptNameToCheck=scriptNameToCheck.toLowerCase(); + indexOfJS=scriptSrc.indexOf(scriptNameToCheck); + if (indexOfJS >=0 && indexOfJS===(scriptSrc.length - scriptNameToCheck.length) && (indexOfJS===0 || scriptSrc.charAt(indexOfJS-1)==='/' || scriptSrc.charAt(indexOfJS-1)==='\\')) { + scriptBase=scriptSrc.substring(0, indexOfJS); + } + return scriptBase; + } + function _getBasePath() { + if(_basePath) { + return _basePath; + } + else { + var scripts=document.getElementsByTagName("script") || []; + var scriptsCount=scripts.length; + var officeScripts=["office.js", "office.debug.js"]; + var officeScriptsCount=officeScripts.length; + var i, j, basePath; + for (i=0; !basePath && i < scriptsCount; i++) { + if (scripts[i].src) { + for(j=0; !basePath && j < officeScriptsCount; j++) { + basePath=_getScriptBase(scripts[i].src, officeScripts[j]); + } + } + } + _basePath=basePath; + return _basePath; + } + } + function _getAriaCDNLocation() { + return (_getBasePath()+"ariatelemetry/aria-web-telemetry.js"); + } + function _loadAriaScriptAndLog(tableName, telemetryData) { + var startAfterMs=1000; + OSF.OUtil.loadScript ( + _getAriaCDNLocation(), + function() { + try { + if(!_ALogger) { + var OfficeExtensibilityTenantID="db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; + _ALogger=AWTLogManager.initialize(OfficeExtensibilityTenantID); + } + var eventProperties=new AWTEventProperties(); + eventProperties.setName("Office.Extensibility.OfficeJS."+tableName); + for(var key in telemetryData) { + if(key.toLowerCase() !=="table") { + eventProperties.setProperty(key, telemetryData[key]); + } + } + var today=new Date(); + eventProperties.setProperty("Date", today.toISOString()); + _ALogger.logEvent(eventProperties); + } + catch (e) { + } + }, + startAfterMs + ); + }; + return { + logData: function AriaLogger$LogData(data) { + if(_isIUsageData(data)) { + _loadAriaScriptAndLog(data["Table"], data["Fields"]); + } + else { + _loadAriaScriptAndLog(data["Table"], data); + } + } + } +})(); var __extends=this.__extends || function (d, b) { function __() { this.constructor=d; } __.prototype=b.prototype; @@ -6726,13 +7207,19 @@ var OSFAppTelemetry; if (!OSF.Logger) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, data.SerializeRow(), OSF.Logger.SendFlag.none); + try { + AriaLogger.logData(data); + } catch (e) { + } }; AppLogger.prototype.LogRawData=function (log) { if (!OSF.Logger) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, log, OSF.Logger.SendFlag.none); + try { + AriaLogger.logData(JSON.parse(log)); + } catch (e) { + } }; return AppLogger; })(); @@ -7193,7 +7680,7 @@ OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize=func else if (appContext.get_appName()==OSF.AppName.Outlook) { OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(appContext, this._settings, license, appContext.appOM)); if (typeof OfficeJsClient_OutlookWin32 !=='undefined') { - if(OfficeJsClient_OutlookWin32.prepareRightAfterWebExtensionInitialize !=='undefined') { + if(typeof OfficeJsClient_OutlookWin32.prepareRightAfterWebExtensionInitialize !=='undefined') { OfficeJsClient_OutlookWin32.prepareRightBeforeWebExtensionInitialize(); Microsoft.Office.WebExtension.initialize(); OfficeJsClient_OutlookWin32.prepareRightAfterWebExtensionInitialize(); diff --git a/node_modules/@microsoft/office-js/dist/o15apptofilemappingtable.js b/node_modules/@microsoft/office-js/dist/o15apptofilemappingtable.js index ba506eb..e7b303d 100644 --- a/node_modules/@microsoft/office-js/dist/o15apptofilemappingtable.js +++ b/node_modules/@microsoft/office-js/dist/o15apptofilemappingtable.js @@ -1,5 +1,5 @@ /* Excel specific API library */ -/* Version: 15.0.4927.1000 */ +/* Version: 15.0.4980.3004 */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ @@ -8,4 +8,4 @@ Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419. */ -var OSF=OSF||{};OSF.OUtil=function(){var e="on",g="configurable",f="writable",d="enumerable",c=true,b=null,a=false,j=-1,m="&_xdm_Info=",l="_xdm_",h="#",i={},o=3e4,k=a;function n(){return Math.floor(100000001*Math.random()).toString()}return {extend:function(b,a){var c=function(){};c.prototype=a.prototype;b.prototype=new c;b.prototype.constructor=b;b.uber=a.prototype;if(a.prototype.constructor===Object.prototype.constructor)a.prototype.constructor=a},setNamespace:function(b,a){if(a&&b&&!a[b])a[b]={}},unsetNamespace:function(b,a){if(a&&b&&a[b])delete a[b]},loadScript:function(f,g,h){if(f&&g){var l=window.document,d=i[f];if(!d){var e=l.createElement("script");e.type="text/javascript";d={loaded:a,pendingCallbacks:[g],timer:b};i[f]=d;var j=function(){if(d.timer!=b){clearTimeout(d.timer);delete d.timer}d.loaded=c;for(var e=d.pendingCallbacks.length,a=0;a1?d[d.length-1]:b;if(window.sessionStorage){var c=window.name.indexOf(l);if(c>-1){var e=window.name.indexOf(";",c);if(e==-1)e=window.name.length;var f=window.name.substring(c,e);if(a)window.sessionStorage.setItem(f,a);else a=window.sessionStorage.getItem(f)}}return a},getConversationId:function(){var c=window.location.search,a=b;if(c){var d=c.indexOf("&");a=d>0?c.substring(1,d):c.substr(1);if(a&&a.charAt(a.length-1)==="="){a=a.substring(0,a.length-1);if(a)a=decodeURIComponent(a)}}return a},validateParamObject:function(f,e){var b=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:a},{name:"expectedProperties",type:Object,mayBeNull:a},{name:"callback",type:Function,mayBeNull:c}]);if(b)throw b;for(var d in e){b=Function._validateParameter(f[d],e[d],d);if(b)throw b}},writeProfilerMark:function(a){if(window.msWriteProfilerMark){window.msWriteProfilerMark(a);OsfMsAjaxFactory.msAjaxDebug.trace(a)}},defineNondefaultProperty:function(e,f,a,b){a=a||{};for(var g in b){var d=b[g];if(a[d]==undefined)a[d]=c}Object.defineProperty(e,f,a);return e},defineNondefaultProperties:function(c,a,d){a=a||{};for(var b in a)OSF.OUtil.defineNondefaultProperty(c,b,a[b],d);return c},defineEnumerableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[d])},defineEnumerableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[d])},defineMutableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[f,d,g])},defineMutableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[f,d,g])},finalizeProperties:function(e,d){d=d||{};for(var g=Object.getOwnPropertyNames(e),i=g.length,f=0;f>2;a[1]=(f&3)<<4|d>>4;a[2]=(d&15)<<2|e>>6;a[3]=e&63;if(isNaN(d))a[2]=a[3]=64;else if(isNaN(e))a[3]=64;for(var g=0;g<4;g++)h.push(j.charAt(a[g]))}while(b0;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[d%16];d=Math.floor(d/16)}for(;b<32;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[Math.floor(Math.random()*16)]}return c}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.OfficeAppContext=function(q,m,i,h,k,n,j,l,p,e,o,g,f,s,r,d,c,b){var a=this;a._id=q;a._appName=m;a._appVersion=i;a._appUILocale=h;a._dataLocale=k;a._docUrl=n;a._clientMode=j;a._settings=l;a._reason=p;a._osfControlType=e;a._eToken=o;a._correlationId=g;a._appMinorVersion=d;a._requirementMatrix=c;a._appInstanceId=f;a._isDialog=false;a._dialogRequirementMatrix=b;a.get_id=function(){return this._id};a.get_appName=function(){return this._appName};a.get_appVersion=function(){return this._appVersion};a.get_appUILocale=function(){return this._appUILocale};a.get_dataLocale=function(){return this._dataLocale};a.get_docUrl=function(){return this._docUrl};a.get_clientMode=function(){return this._clientMode};a.get_bindings=function(){return this._bindings};a.get_settings=function(){return this._settings};a.get_reason=function(){return this._reason};a.get_osfControlType=function(){return this._osfControlType};a.get_eToken=function(){return this._eToken};a.get_correlationId=function(){return this._correlationId};a.get_appInstanceId=function(){return this._appInstanceId};a.get_appMinorVersion=function(){return this._appMinorVersion};a.get_requirementMatrix=function(){return this._requirementMatrix};a.get_isDialog=function(){return this._isDialog};a.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix}};OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);OSF.OUtil.setNamespace("Internal",Microsoft.Office);OSF.NamespaceManager=function(){var b,a=false;return {enableShortcut:function(){if(!a){if(window.Office)b=window.Office;else OSF.OUtil.setNamespace("Office",window);window.Office=Microsoft.Office.WebExtension;a=true}},disableShortcut:function(){if(a){if(b)window.Office=b;else OSF.OUtil.unsetNamespace("Office",window);a=false}}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened",Browser:"browser"};Microsoft.Office.WebExtension.ActiveView={Read:"read",Edit:"edit"};Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table",Image:"image"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.BindingType={Text:"text",Matrix:"matrix",Table:"table"};Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"};Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"};Microsoft.Office.WebExtension.EventType={DocumentSelectionChanged:"documentSelectionChanged",BindingSelectionChanged:"bindingSelectionChanged",BindingDataChanged:"bindingDataChanged",DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"};Microsoft.Office.Internal.EventType={OfficeThemeChanged:"officeThemeChanged",DocumentThemeChanged:"documentThemeChanged"};Microsoft.Office.WebExtension.AsyncResultStatus={Succeeded:"succeeded",Failed:"failed"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Id:"id",GoToType:"goToType",SelectionMode:"selectionMode",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",HostType:"hostType",PlatformType:"platformType",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",XFrameDenySafe:"xFrameDenySafe"};Microsoft.Office.Internal.Parameters={DocumentTheme:"documentTheme",OfficeTheme:"officeTheme"};Microsoft.Office.WebExtension.DefaultParameterValues={};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.OUtil.setNamespace("DispIdHost",OSF.DDA);OSF.DDA.DispIdHost.Methods={InvokeMethod:"invokeMethod",AddEventHandler:"addEventHandler",RemoveEventHandler:"removeEventHandler",OpenDialog:"openDialog",CloseDialog:"closeDialog",MessageParent:"messageParent"};OSF.DDA.DispIdHost.Delegates={ExecuteAsync:"executeAsync",RegisterEventAsync:"registerEventAsync",UnregisterEventAsync:"unregisterEventAsync",ParameterMap:"parameterMap",MessageParent:"messageParent"};OSF.OUtil.setNamespace("AsyncResultEnum",OSF.DDA);OSF.DDA.AsyncResultEnum.Properties={Context:"Context",Value:"Value",Status:"Status",Error:"Error"};OSF.DDA.AsyncResultEnum.ErrorProperties={Name:"Name",Message:"Message",Code:"Code"};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus",FileProperties:"FileProperties",FilePropertiesDescriptor:"FilePropertiesDescriptor",FileSliceProperties:"FileSliceProperties",Subset:"subset",BindingProperties:"BindingProperties",TableDataProperties:"TableDataProperties",DataPartProperties:"DataPartProperties",DataNodeProperties:"DataNodeProperties",MessageType:"messageType",MessageContent:"messageContent"};OSF.DDA.EventDescriptors={BindingSelectionChangedEvent:"BindingSelectionChangedEvent",DataNodeInsertedEvent:"DataNodeInsertedEvent",DataNodeReplacedEvent:"DataNodeReplacedEvent",DataNodeDeletedEvent:"DataNodeDeletedEvent",OfficeThemeChangedEvent:"OfficeThemeChangedEvent",DocumentThemeChangedEvent:"DocumentThemeChangedEvent",ActiveViewChangedEvent:"ActiveViewChangedEvent",AppCommandInvokedEvent:"AppCommandInvokedEvent",DialogMessageReceivedEvent:"DialogMessageReceivedEvent"};OSF.DDA.ListDescriptors={BindingList:"BindingList",DataPartList:"DataPartList",DataNodeList:"DataNodeList"};OSF.DDA.FileProperties={Handle:"FileHandle",FileSize:"FileSize",SliceSize:Microsoft.Office.WebExtension.Parameters.SliceSize};OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType,RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"};OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};OSF.DDA.DataPartProperties={Id:Microsoft.Office.WebExtension.Parameters.Id,BuiltIn:"DataPartBuiltIn"};OSF.DDA.DataNodeProperties={Handle:"DataNodeHandle",BaseName:"DataNodeBaseName",NamespaceUri:"DataNodeNamespaceUri",NodeType:"DataNodeType"};OSF.DDA.DataNodeEventProperties={OldNode:"OldNode",NewNode:"NewNode",NextSiblingNode:"NextSiblingNode",InUndoRedo:"InUndoRedo"};OSF.DDA.AsyncResultEnum.ErrorCode={Success:0,Failed:1};OSF.DialogMessageType={DialogMessageReceived:0,DialogClosed:12006};OSF.DDA.getXdmEventName=function(b,a){if(a==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||a==Microsoft.Office.WebExtension.EventType.BindingDataChanged)return b+"_"+a;else return a};var __extends=this.__extends||function(b,a){for(var c in a)if(a.hasOwnProperty(c))b[c]=a[c];function d(){this.constructor=b}d.prototype=a.prototype;b.prototype=new d},OfficeExt;(function(a){var b;(function(b){var a=1.1,d=function(){function a(a){this.isSetSupported=function(b,a){if(b==undefined)return false;if(a==undefined)a=0;var e=this._setMap,d=e._sets;if(d.hasOwnProperty(b.toLowerCase())){var c=d[b.toLowerCase()];return c>0&&c>=a}else return false};this._setMap=a}return a}();b.RequirementMatrix=d;var c=function(){function a(a){this._addSetMap=function(a){for(var b in a)this._sets[b]=a[b]};this._sets=a}return a}();b.DefaultSetRequirement=c;var t=function(c){__extends(b,c);function b(){c.call(this,{dialogapi:a})}return b}(c);b.DefaultDialogSetRequirement=t;var f=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a})}return b}(c);b.ExcelClientDefaultSetRequirement=f;var n=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({imagecoercion:a})}return b}(f);b.ExcelClientV2DefaultSetRequirement=n;var o=function(c){__extends(b,c);function b(){c.call(this,{mailbox:a})}return b}(c);b.OutlookClientDefaultSetRequirement=o;var k=function(c){__extends(b,c);function b(){c.call(this,{mailbox:a})}return b}(c);b.OutlookClientV1DefaultSetRequirement=k;var l=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.2})}return a}(c);b.OutlookClientV2DefaultSetRequirement=l;var m=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.3})}return a}(c);b.OutlookClientV3DefaultSetRequirement=m;var g=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,compressedfile:a,customxmlparts:a,documentevents:a,file:a,htmlcoercion:a,matrixbindings:a,matrixcoercion:a,ooxmlcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,textfile:a})}return b}(c);b.WordClientDefaultSetRequirement=g;var q=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({imagecoercion:a,pdffile:a})}return b}(g);b.WordClientV2DefaultSetRequirement=q;var e=function(c){__extends(b,c);function b(){c.call(this,{compressedfile:a,documentevents:a,file:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.PowerpointClientDefaultSetRequirement=e;var j=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({activeview:a,imagecoercion:a,pdffile:a})}return b}(e);b.PowerpointClientV2DefaultSetRequirement=j;var h=function(c){__extends(b,c);function b(){c.call(this,{selection:a,textcoercion:a})}return b}(c);b.ProjectClientDefaultSetRequirement=h;var i=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,file:a})}return b}(c);b.ExcelWebDefaultSetRequirement=i;var r=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({activeview:a})}return b}(i);b.ExcelWebV2DefaultSetRequirement=r;var s=function(c){__extends(b,c);function b(){c.call(this,{mailbox:a})}return b}(c);b.OutlookWebDefaultSetRequirement=s;var p=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.3})}return a}(c);b.OutlookWebV1DefaultSetRequirement=p;var u=function(){var b="undefined";function a(){}a.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)};a.getDefaultRequirementMatrix=function(f){this.initializeDefaultSetMatrix();var e=undefined,g=f.get_requirementMatrix();if(g!=undefined&&g.length>0&&typeof JSON!==b){var j=JSON.parse(f.get_requirementMatrix().toLowerCase());e=new d(new c(j))}else{var i=f.get_appVersion(),h=f.get_appName()+"-"+i;if(a.DefaultSetArrayMatrix!=undefined&&a.DefaultSetArrayMatrix[h]!=undefined)e=new d(a.DefaultSetArrayMatrix[h]);else e=new d(new c({}))}return e};a.getDialogDefaultRequirementMatrix=function(f){var a=undefined,e=f.get_dialogRequirementMatrix();if(e!=undefined&&e.length>0&&typeof JSON!==b){var g=JSON.parse(f.get_requirementMatrix().toLowerCase());a=new d(new c(g))}else a=new d(new t);return a};a.initializeDefaultSetMatrix=function(){a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1500]=new f;a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1501]=new f;a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1502]=new n;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1500]=new g;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1501]=new g;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1502]=new q;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1500]=new e;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1501]=new e;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1502]=new j;a.DefaultSetArrayMatrix[a.Outlook_RCLIENT_1500]=new o;a.DefaultSetArrayMatrix[a.Outlook_RCLIENT_1501]=new k;a.DefaultSetArrayMatrix[a.Outlook_RCLIENT_1502]=new l;a.DefaultSetArrayMatrix[a.Outlook_RCLIENT_1503]=new m;a.DefaultSetArrayMatrix[a.Excel_WAC_1500]=new i;a.DefaultSetArrayMatrix[a.Excel_WAC_1501]=new i;a.DefaultSetArrayMatrix[a.Excel_WAC_1502]=new r;a.DefaultSetArrayMatrix[a.Outlook_WAC_1500]=new s;a.DefaultSetArrayMatrix[a.Outlook_WAC_1501]=new p;a.DefaultSetArrayMatrix[a.Project_RCLIENT_1500]=new h;a.DefaultSetArrayMatrix[a.Project_RCLIENT_1501]=new h;a.DefaultSetArrayMatrix[a.Project_RCLIENT_1502]=new h;a.DefaultSetArrayMatrix[a.Excel_IOS_1500]=new f;a.DefaultSetArrayMatrix[a.Word_IOS_1500]=new g;a.DefaultSetArrayMatrix[a.PowerPoint_IOS_1500]=new e};a.Excel_RCLIENT_1500="1-15.00";a.Excel_RCLIENT_1501="1-15.01";a.Excel_RCLIENT_1502="1-15.02";a.Word_RCLIENT_1500="2-15.00";a.Word_RCLIENT_1501="2-15.01";a.Word_RCLIENT_1502="2-15.02";a.PowerPoint_RCLIENT_1500="4-15.00";a.PowerPoint_RCLIENT_1501="4-15.01";a.PowerPoint_RCLIENT_1502="4-15.02";a.Outlook_RCLIENT_1500="8-15.00";a.Outlook_RCLIENT_1501="8-15.01";a.Outlook_RCLIENT_1502="8-15.02";a.Outlook_RCLIENT_1503="8-15.03";a.Excel_WAC_1500="16-15.00";a.Excel_WAC_1501="16-15.01";a.Excel_WAC_1502="16-15.02";a.Outlook_WAC_1500="64-15.00";a.Outlook_WAC_1501="64-15.01";a.Project_RCLIENT_1500="128-15.00";a.Project_RCLIENT_1501="128-15.01";a.Project_RCLIENT_1502="128-15.02";a.Excel_IOS_1500="1024-15.00";a.Word_IOS_1500="4096-15.00";a.PowerPoint_IOS_1500="8192-15.00";a.DefaultSetArrayMatrix={};return a}();b.RequirementsMatrixFactory=u})(b=a.Requirement||(a.Requirement={}))})(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda();var OfficeExt;(function(a){var b;(function(a){var b=function(){var a=null;function b(){var b=this;b.getHost=function(d){var b=this.getFullHost(d);if(b){for(var e in this.platformPossibilities){var c=b.indexOf(e);if(c>=0){b=b.substring(0,c);return Microsoft.Office.WebExtension.HostType[b]||a}}return Microsoft.Office.WebExtension.HostType[b]||a}return a};b.getDiagnostics=function(a){var b={host:this.getHost(a),version:"15.0.0000.0000",platform:this.getPlatform(a)};return b};b.platformPossibilities={WebApp:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,Unsupported:a};b.getHost=b.getHost.bind(b);b.getDiagnostics=b.getDiagnostics.bind(b)}b.getInstance=function(){if(b.hostObj===undefined)b.hostObj=new b;return b.hostObj};b.prototype.getPlatform=function(d){var b=this.getFullHost(d);if(b===a)return a;var e=Microsoft.Office.WebExtension.PlatformType.PC;for(var c in this.platformPossibilities)if(b.indexOf(c)>=0)return this.platformPossibilities[c];return e};b.prototype.getFullHost=function(d){var b=a;for(var c in OSF.AppName)if(OSF.AppName[c]===d){b=c;break}return b};return b}();a.Host=b})(b=a.HostName||(a.HostName={}))})(OfficeExt||(OfficeExt={}));OSF.DDA.ErrorCodeManager=function(){var a={};return {getErrorArgs:function(b){return a[b]||a[this.errorCodes.ooeInternalError]},addErrorMessage:function(c,b){a[c]=b},errorCodes:{ooeSuccess:0,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022},initializeErrorMessages:function(b){a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:b.L_DataReadError,message:b.L_GetSelectionNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotMatchBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:b.L_DataReadError,message:b.L_InvalidGetRowColumnCounts};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:b.L_DataReadError,message:b.L_SelectionNotSupportCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:b.L_DataReadError,message:b.L_InvalidGetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:b.L_DataReadError,message:b.L_NonUniformPartialGetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:b.L_DataReadError,message:b.L_GetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:b.L_DataReadError,message:b.L_FileTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:b.L_DataWriteError,message:b.L_UnsupportedDataObject};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:b.L_DataWriteError,message:b.L_CannotWriteToSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:b.L_DataWriteError,message:b.L_DataNotMatchSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:b.L_DataWriteError,message:b.L_OverwriteWorksheetData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:b.L_DataWriteError,message:b.L_DataNotMatchBindingSize};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:b.L_DataWriteError,message:b.L_InvalidSetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:b.L_InvalidFormat,message:b.L_InvalidDataFormat};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:b.L_DataWriteError,message:b.L_SetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:b.L_DataWriteError,message:b.L_NonUniformPartialSetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:b.L_BindingCreationError,message:b.L_SelectionCannotBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:b.L_InvalidBindingError,message:b.L_BindingNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:b.L_BindingCreationError,message:b.L_BindingToMultipleSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidSelectionForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnThisBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:b.L_BindingCreationError,message:b.L_NamedItemNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:b.L_BindingCreationError,message:b.L_MultipleNamedItemFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidNamedItemForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:b.L_InvalidBinding,message:b.L_UnknownBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnMatrixData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:b.L_ReadSettingsError,message:b.L_SettingNameNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:b.L_SaveSettingsError,message:b.L_SettingsCannotSave};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:b.L_SettingsStaleError,message:b.L_SettingsAreStale};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:b.L_HostError,message:b.L_OperationNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:b.L_InternalError,message:b.L_InternalErrorDescription};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:b.L_PermissionDenied,message:b.L_DocumentReadOnly};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:b.L_EventRegistrationError,message:b.L_EventHandlerNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:b.L_InvalidAPICall,message:b.L_InvalidApiCallInContext};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:b.L_ShuttingDown,message:b.L_ShuttingDown};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:b.L_UnsupportedEnumeration,message:b.L_UnsupportedEnumerationMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:b.L_InvalidNode,message:b.L_CustomXmlNodeNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:b.L_CustomXmlError,message:b.L_CustomXmlError};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:b.L_CannotNavigateTo,message:b.L_CannotNavigateTo};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:b.L_SpecifiedIdNotExist,message:b.L_SpecifiedIdNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:b.L_NavOutOfBound,message:b.L_NavOutOfBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:b.L_MissingParameter,message:b.L_ElementMissing};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:b.L_InvalidValue,message:b.L_InvalidCellsValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:b.L_InvalidValue,message:b.L_InvalidTableOptionValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:b.L_InvalidValue,message:b.L_InvalidFormatValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_RowIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_ColIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:b.L_OutOfRange,message:b.L_FormatValueOutOfRange}}}}();OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMethodMax:143,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidAppCommandInvokedEvent:39,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Common",Microsoft.Office);Microsoft.Office.Common.InvokeType={async:0,sync:1,asyncRegisterEvent:2,asyncUnregisterEvent:3,syncRegisterEvent:4,syncUnregisterEvent:5};Microsoft.Office.Common.InvokeResultCode={noError:0,errorInRequest:-1,errorHandlingRequest:-2,errorInResponse:-3,errorHandlingResponse:-4,errorHandlingRequestAccessDenied:-5,errorHandlingMethodCallTimedout:-6};Microsoft.Office.Common.MessageType={request:0,response:1};Microsoft.Office.Common.ActionType={invoke:0,registerEvent:1,unregisterEvent:2};Microsoft.Office.Common.ResponseType={forCalling:0,forEventing:1};Microsoft.Office.Common.MethodObject=function(c,b,a){this._method=c;this._invokeType=b;this._blockingOthers=a};Microsoft.Office.Common.MethodObject.prototype={getMethod:function(){return this._method},getInvokeType:function(){return this._invokeType},getBlockingFlag:function(){return this._blockingOthers}};Microsoft.Office.Common.EventMethodObject=function(b,a){this._registerMethodObject=b;this._unregisterMethodObject=a};Microsoft.Office.Common.EventMethodObject.prototype={getRegisterMethodObject:function(){return this._registerMethodObject},getUnregisterMethodObject:function(){return this._unregisterMethodObject}};Microsoft.Office.Common.ServiceEndPoint=function(c){var a=this,b=Function._validateParams(arguments,[{name:"serviceEndPointId",type:String,mayBeNull:false}]);if(b)throw b;a._methodObjectList={};a._eventHandlerProxyList={};a._Id=c;a._conversations={};a._policyManager=null};Microsoft.Office.Common.ServiceEndPoint.prototype={registerMethod:function(g,h,b,e){var c="invokeType",a=false,d=Function._validateParams(arguments,[{name:"methodName",type:String,mayBeNull:a},{name:"method",type:Function,mayBeNull:a},{name:c,type:Number,mayBeNull:a},{name:"blockingOthers",type:Boolean,mayBeNull:a}]);if(d)throw d;if(b!==Microsoft.Office.Common.InvokeType.async&&b!==Microsoft.Office.Common.InvokeType.sync)throw OsfMsAjaxFactory.msAjaxError.argument(c);var f=new Microsoft.Office.Common.MethodObject(h,b,e);this._methodObjectList[g]=f},unregisterMethod:function(b){var a=Function._validateParams(arguments,[{name:"methodName",type:String,mayBeNull:false}]);if(a)throw a;delete this._methodObjectList[b]},registerEvent:function(f,d,c){var a=false,b=Function._validateParams(arguments,[{name:"eventName",type:String,mayBeNull:a},{name:"registerMethod",type:Function,mayBeNull:a},{name:"unregisterMethod",type:Function,mayBeNull:a}]);if(b)throw b;var e=new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(d,Microsoft.Office.Common.InvokeType.syncRegisterEvent,a),new Microsoft.Office.Common.MethodObject(c,Microsoft.Office.Common.InvokeType.syncUnregisterEvent,a));this._methodObjectList[f]=e},registerEventEx:function(h,f,d,e,c){var a=false,b=Function._validateParams(arguments,[{name:"eventName",type:String,mayBeNull:a},{name:"registerMethod",type:Function,mayBeNull:a},{name:"registerMethodInvokeType",type:Number,mayBeNull:a},{name:"unregisterMethod",type:Function,mayBeNull:a},{name:"unregisterMethodInvokeType",type:Number,mayBeNull:a}]);if(b)throw b;var g=new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(f,d,a),new Microsoft.Office.Common.MethodObject(e,c,a));this._methodObjectList[h]=g},unregisterEvent:function(b){var a=Function._validateParams(arguments,[{name:"eventName",type:String,mayBeNull:false}]);if(a)throw a;this.unregisterMethod(b)},registerConversation:function(b){var a=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:false}]);if(a)throw a;this._conversations[b]=true},unregisterConversation:function(b){var a=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:false}]);if(a)throw a;delete this._conversations[b]},setPolicyManager:function(a){var b="policyManager",c=Function._validateParams(arguments,[{name:b,type:Object,mayBeNull:false}]);if(c)throw c;if(!a.checkPermission)throw OsfMsAjaxFactory.msAjaxError.argument(b);this._policyManager=a},getPolicyManager:function(){return this._policyManager}};Microsoft.Office.Common.ClientEndPoint=function(e,b,f){var c="targetWindow",a=this,d=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:false},{name:c,mayBeNull:false},{name:"targetUrl",type:String,mayBeNull:false}]);if(d)throw d;if(!b.postMessage)throw OsfMsAjaxFactory.msAjaxError.argument(c);a._conversationId=e;a._targetWindow=b;a._targetUrl=f;a._callingIndex=0;a._callbackList={};a._eventHandlerList={}};Microsoft.Office.Common.ClientEndPoint.prototype={invoke:function(h,d,b){var a=this,g=Function._validateParams(arguments,[{name:"targetMethodName",type:String,mayBeNull:false},{name:"callback",type:Function,mayBeNull:true},{name:"param",mayBeNull:true}]);if(g)throw g;var c=a._callingIndex++,k=new Date,e={callback:d,createdOn:k.getTime()};if(b&&typeof b==="object"&&typeof b.__timeout__==="number"){e.timeout=b.__timeout__;delete b.__timeout__}a._callbackList[c]=e;try{var i=new Microsoft.Office.Common.Request(h,Microsoft.Office.Common.ActionType.invoke,a._conversationId,c,b),j=Microsoft.Office.Common.MessagePackager.envelope(i);a._targetWindow.postMessage(j,a._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer()}catch(f){try{d!==null&&d(Microsoft.Office.Common.InvokeResultCode.errorInRequest,f)}finally{delete a._callbackList[c]}}},registerForEvent:function(d,g,c,i){var a=this,f=Function._validateParams(arguments,[{name:"targetEventName",type:String,mayBeNull:false},{name:"eventHandler",type:Function,mayBeNull:false},{name:"callback",type:Function,mayBeNull:true},{name:"data",mayBeNull:true,optional:true}]);if(f)throw f;var b=a._callingIndex++,k=new Date;a._callbackList[b]={callback:c,createdOn:k.getTime()};try{var h=new Microsoft.Office.Common.Request(d,Microsoft.Office.Common.ActionType.registerEvent,a._conversationId,b,i),j=Microsoft.Office.Common.MessagePackager.envelope(h);a._targetWindow.postMessage(j,a._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer();a._eventHandlerList[d]=g}catch(e){try{c!==null&&c(Microsoft.Office.Common.InvokeResultCode.errorInRequest,e)}finally{delete a._callbackList[b]}}},unregisterForEvent:function(d,c,h){var a=this,f=Function._validateParams(arguments,[{name:"targetEventName",type:String,mayBeNull:false},{name:"callback",type:Function,mayBeNull:true},{name:"data",mayBeNull:true,optional:true}]);if(f)throw f;var b=a._callingIndex++,j=new Date;a._callbackList[b]={callback:c,createdOn:j.getTime()};try{var g=new Microsoft.Office.Common.Request(d,Microsoft.Office.Common.ActionType.unregisterEvent,a._conversationId,b,h),i=Microsoft.Office.Common.MessagePackager.envelope(g);a._targetWindow.postMessage(i,a._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer()}catch(e){try{c!==null&&c(Microsoft.Office.Common.InvokeResultCode.errorInRequest,e)}finally{delete a._callbackList[b]}}finally{delete a._eventHandlerList[d]}}};Microsoft.Office.Common.XdmCommunicationManager=function(){var i="channel is not ready.",c="conversationId",h="Unknown conversation Id.",b=false,a=null,k=[],e=a,v=10,j=b,f=a,o=2e3,l=6e4,g={},d={},m=b;function p(b){for(var a in g)if(g[a]._conversations[b])return g[a];OsfMsAjaxFactory.msAjaxDebug.trace(h);throw OsfMsAjaxFactory.msAjaxError.argument(c)}function q(b){var a=d[b];if(!a){OsfMsAjaxFactory.msAjaxDebug.trace(h);throw OsfMsAjaxFactory.msAjaxError.argument(c)}return a}function t(e,c){var b=e._methodObjectList[c._actionName];if(!b){OsfMsAjaxFactory.msAjaxDebug.trace("The specified method is not registered on service endpoint:"+c._actionName);throw OsfMsAjaxFactory.msAjaxError.argument("messageObject")}var d=a;if(c._actionType===Microsoft.Office.Common.ActionType.invoke)d=b;else if(c._actionType===Microsoft.Office.Common.ActionType.registerEvent)d=b.getRegisterMethodObject();else d=b.getUnregisterMethodObject();return d}function x(a){k.push(a)}function w(){if(e!==a){if(!j)if(k.length>0){var b=k.shift();j=b.getInvokeBlockingFlag();b.invoke()}else{clearInterval(e);e=a}}else OsfMsAjaxFactory.msAjaxDebug.trace(i)}function s(){if(f){var c,e=0,k=new Date,h;for(var j in d){c=d[j];for(var g in c._callbackList){var b=c._callbackList[g];h=b.timeout?b.timeout:l;if(Math.abs(k.getTime()-b.createdOn)>=h)try{b.callback&&b.callback(Microsoft.Office.Common.InvokeResultCode.errorHandlingMethodCallTimedout,a)}finally{delete c._callbackList[g]}else e++}}if(e===0){clearInterval(f);f=a}}else OsfMsAjaxFactory.msAjaxDebug.trace(i)}function r(){j=b}function u(a){if(window.addEventListener)window.addEventListener("message",a,b);else if(navigator.userAgent.indexOf("MSIE")>-1&&window.attachEvent)window.attachEvent("onmessage",a);else{OsfMsAjaxFactory.msAjaxDebug.trace("Browser doesn't support the required API.");throw OsfMsAjaxFactory.msAjaxError.argument("Browser")}}function y(c){var d="Access Denied";if(c.data!=""){var b;try{b=Microsoft.Office.Common.MessagePackager.unenvelope(c.data)}catch(f){return}if(typeof b._messageType=="undefined")return;if(b._messageType===Microsoft.Office.Common.MessageType.request){var l=c.origin==a||c.origin=="null"?b._origin:c.origin;try{var g=p(b._conversationId),k=g.getPolicyManager();if(k&&!k.checkPermission(b._conversationId,b._actionName,b._data))throw d;var u=t(g,b),n=new Microsoft.Office.Common.InvokeCompleteCallback(c.source,l,b._actionName,b._conversationId,b._correlationId,r),y=new Microsoft.Office.Common.Invoker(u,b._data,n,g._eventHandlerProxyList,b._conversationId,b._actionName);if(e==a)e=setInterval(w,v);x(y)}catch(f){var m=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequest;if(f==d)m=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied;var s=new Microsoft.Office.Common.Response(b._actionName,b._conversationId,b._correlationId,m,Microsoft.Office.Common.ResponseType.forCalling,f),o=Microsoft.Office.Common.MessagePackager.envelope(s);c.source&&c.source.postMessage&&c.source.postMessage(o,l)}}else if(b._messageType===Microsoft.Office.Common.MessageType.response){var h=q(b._conversationId);if(b._responseType===Microsoft.Office.Common.ResponseType.forCalling){var i=h._callbackList[b._correlationId];if(i)try{i.callback&&i.callback(b._errorCode,b._data)}finally{delete h._callbackList[b._correlationId]}}else{var j=h._eventHandlerList[b._actionName];j!==undefined&&j!==a&&j(b._data)}}else return}}function n(){if(!m){u(y);m=true}}return {connect:function(b,c,e){var a=d[b];if(!a){n();a=new Microsoft.Office.Common.ClientEndPoint(b,c,e);d[b]=a}return a},getClientEndPoint:function(e){var a=Function._validateParams(arguments,[{name:c,type:String,mayBeNull:b}]);if(a)throw a;return d[e]},createServiceEndPoint:function(a){n();var b=new Microsoft.Office.Common.ServiceEndPoint(a);g[a]=b;return b},getServiceEndPoint:function(c){var a=Function._validateParams(arguments,[{name:"serviceEndPointId",type:String,mayBeNull:b}]);if(a)throw a;return g[c]},deleteClientEndPoint:function(e){var a=Function._validateParams(arguments,[{name:c,type:String,mayBeNull:b}]);if(a)throw a;delete d[e]},_setMethodTimeout:function(a){var c=Function._validateParams(arguments,[{name:"methodTimeout",type:Number,mayBeNull:b}]);if(c)throw c;l=a<=0?6e4:a},_startMethodTimeoutTimer:function(){if(!f)f=setInterval(s,o)}}}();Microsoft.Office.Common.Message=function(g,h,e,f,c){var b=false,a=this,d=Function._validateParams(arguments,[{name:"messageType",type:Number,mayBeNull:b},{name:"actionName",type:String,mayBeNull:b},{name:"conversationId",type:String,mayBeNull:b},{name:"correlationId",mayBeNull:b},{name:"data",mayBeNull:true,optional:true}]);if(d)throw d;a._messageType=g;a._actionName=h;a._conversationId=e;a._correlationId=f;a._origin=window.location.href;if(typeof c=="undefined")a._data=null;else a._data=c};Microsoft.Office.Common.Message.prototype={getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getOrigin:function(){return this._origin},getData:function(){return this._data},getMessageType:function(){return this._messageType}};Microsoft.Office.Common.Request=function(c,d,a,b,e){Microsoft.Office.Common.Request.uber.constructor.call(this,Microsoft.Office.Common.MessageType.request,c,a,b,e);this._actionType=d};OSF.OUtil.extend(Microsoft.Office.Common.Request,Microsoft.Office.Common.Message);Microsoft.Office.Common.Request.prototype.getActionType=function(){return this._actionType};Microsoft.Office.Common.Response=function(d,a,b,e,c,f){Microsoft.Office.Common.Response.uber.constructor.call(this,Microsoft.Office.Common.MessageType.response,d,a,b,f);this._errorCode=e;this._responseType=c};OSF.OUtil.extend(Microsoft.Office.Common.Response,Microsoft.Office.Common.Message);Microsoft.Office.Common.Response.prototype.getErrorCode=function(){return this._errorCode};Microsoft.Office.Common.Response.prototype.getResponseType=function(){return this._responseType};Microsoft.Office.Common.MessagePackager={envelope:function(a){return OsfMsAjaxFactory.msAjaxSerializer.serialize(a)},unenvelope:function(a){return OsfMsAjaxFactory.msAjaxSerializer.deserialize(a,true)}};Microsoft.Office.Common.ResponseSender=function(e,h,j,f,g,i){var c=false,a=this,d=Function._validateParams(arguments,[{name:"requesterWindow",mayBeNull:c},{name:"requesterUrl",type:String,mayBeNull:c},{name:"actionName",type:String,mayBeNull:c},{name:"conversationId",type:String,mayBeNull:c},{name:"correlationId",mayBeNull:c},{name:"responsetype",type:Number,maybeNull:c}]);if(d)throw d;a._requesterWindow=e;a._requesterUrl=h;a._actionName=j;a._conversationId=f;a._correlationId=g;a._invokeResultCode=Microsoft.Office.Common.InvokeResultCode.noError;a._responseType=i;var b=a;a._send=function(d){var c=new Microsoft.Office.Common.Response(b._actionName,b._conversationId,b._correlationId,b._invokeResultCode,b._responseType,d),a=Microsoft.Office.Common.MessagePackager.envelope(c);b._requesterWindow.postMessage(a,b._requesterUrl)}};Microsoft.Office.Common.ResponseSender.prototype={getRequesterWindow:function(){return this._requesterWindow},getRequesterUrl:function(){return this._requesterUrl},getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getSend:function(){return this._send},setResultCode:function(a){this._invokeResultCode=a}};Microsoft.Office.Common.InvokeCompleteCallback=function(d,g,h,e,f,c){var b=this;Microsoft.Office.Common.InvokeCompleteCallback.uber.constructor.call(b,d,g,h,e,f,Microsoft.Office.Common.ResponseType.forCalling);b._postCallbackHandler=c;var a=b;b._send=function(d){var c=new Microsoft.Office.Common.Response(a._actionName,a._conversationId,a._correlationId,a._invokeResultCode,a._responseType,d),b=Microsoft.Office.Common.MessagePackager.envelope(c);a._requesterWindow.postMessage(b,a._requesterUrl);a._postCallbackHandler()}};OSF.OUtil.extend(Microsoft.Office.Common.InvokeCompleteCallback,Microsoft.Office.Common.ResponseSender);Microsoft.Office.Common.Invoker=function(g,h,d,e,f,i){var b=false,a=this,c=Function._validateParams(arguments,[{name:"methodObject",mayBeNull:b},{name:"paramValue",mayBeNull:true},{name:"invokeCompleteCallback",mayBeNull:b},{name:"eventHandlerProxyList",mayBeNull:true},{name:"conversationId",type:String,mayBeNull:b},{name:"eventName",type:String,mayBeNull:b}]);if(c)throw c;a._methodObject=g;a._param=h;a._invokeCompleteCallback=d;a._eventHandlerProxyList=e;a._conversationId=f;a._eventName=i};Microsoft.Office.Common.Invoker.prototype={invoke:function(){var a=this;try{var b;switch(a._methodObject.getInvokeType()){case Microsoft.Office.Common.InvokeType.async:a._methodObject.getMethod()(a._param,a._invokeCompleteCallback.getSend());break;case Microsoft.Office.Common.InvokeType.sync:b=a._methodObject.getMethod()(a._param);a._invokeCompleteCallback.getSend()(b);break;case Microsoft.Office.Common.InvokeType.syncRegisterEvent:var d=a._createEventHandlerProxyObject(a._invokeCompleteCallback);b=a._methodObject.getMethod()(d.getSend(),a._param);a._eventHandlerProxyList[a._conversationId+a._eventName]=d.getSend();a._invokeCompleteCallback.getSend()(b);break;case Microsoft.Office.Common.InvokeType.syncUnregisterEvent:var g=a._eventHandlerProxyList[a._conversationId+a._eventName];b=a._methodObject.getMethod()(g,a._param);delete a._eventHandlerProxyList[a._conversationId+a._eventName];a._invokeCompleteCallback.getSend()(b);break;case Microsoft.Office.Common.InvokeType.asyncRegisterEvent:var c=a._createEventHandlerProxyObject(a._invokeCompleteCallback);a._methodObject.getMethod()(c.getSend(),a._invokeCompleteCallback.getSend(),a._param);a._eventHandlerProxyList[a._callerId+a._eventName]=c.getSend();break;case Microsoft.Office.Common.InvokeType.asyncUnregisterEvent:var f=a._eventHandlerProxyList[a._callerId+a._eventName];a._methodObject.getMethod()(f,a._invokeCompleteCallback.getSend(),a._param);delete a._eventHandlerProxyList[a._callerId+a._eventName]}}catch(e){a._invokeCompleteCallback.setResultCode(Microsoft.Office.Common.InvokeResultCode.errorInResponse);a._invokeCompleteCallback.getSend()(e)}},getInvokeBlockingFlag:function(){return this._methodObject.getBlockingFlag()},_createEventHandlerProxyObject:function(a){return new Microsoft.Office.Common.ResponseSender(a.getRequesterWindow(),a.getRequesterUrl(),a.getActionName(),a.getConversationId(),a.getCorrelationId(),Microsoft.Office.Common.ResponseType.forEventing)}};OSF.EventDispatch=function(b){var a=this;a._eventHandlers={};a._queuedEventsArgs={};for(var d in b){var c=b[d];a._eventHandlers[c]=[];a._queuedEventsArgs[c]=[]}};OSF.EventDispatch.prototype={getSupportedEvents:function(){var a=[];for(var b in this._eventHandlers)a.push(b);return a},supportsEvent:function(c){var a=false;for(var b in this._eventHandlers)if(c==b){a=true;break}return a},hasEventHandler:function(b,c){var a=this._eventHandlers[b];if(a&&a.length>0)for(var d in a)if(a[d]===c)return true;return false},addEventHandler:function(b,a){if(typeof a!="function")return false;var c=this._eventHandlers[b];if(c&&!this.hasEventHandler(b,a)){c.push(a);return true}else return false},addEventHandlerAndFireQueuedEvent:function(a,e){var d=this._eventHandlers[a],c=d.length==0,b=this.addEventHandler(a,e);c&&b&&this.fireQueuedEvent(a);return b},removeEventHandler:function(c,d){var a=this._eventHandlers[c];if(a&&a.length>0)for(var b=0;b0){var d=b[0];while(c.length>0){var e=c.shift();d(e)}return true}}return false}};OSF.DDA.DataCoercion=function(){var a=null;return {findArrayDimensionality:function(c){if(OSF.OUtil.isArray(c)){for(var b=0,a=0;a6&&a.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&a.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix){b=new Date(parseInt(a.slice(5,-1)));if(b)return b}return a});else a=Sys.Serialization.JavaScriptSerializer.deserialize(a,true);d[c]=a}catch(e){}}return d}};OSF.DDA.OMFactory={manufactureBinding:function(a,c){var d=a[OSF.DDA.BindingProperties.Id],g=a[OSF.DDA.BindingProperties.RowCount],f=a[OSF.DDA.BindingProperties.ColumnCount],h=a[OSF.DDA.BindingProperties.HasHeaders],b;switch(a[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:b=new OSF.DDA.TextBinding(d,c);break;case Microsoft.Office.WebExtension.BindingType.Matrix:b=new OSF.DDA.MatrixBinding(d,c,g,f);break;case Microsoft.Office.WebExtension.BindingType.Table:var i=function(){return OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument},e;if(i()&&OSF.DDA.ExcelTableBinding)e=OSF.DDA.ExcelTableBinding;else e=OSF.DDA.TableBinding;b=new e(d,c,g,f,h);break;default:b=new OSF.DDA.UnknownBinding(d,c)}return b},manufactureTableData:function(a){return new Microsoft.Office.WebExtension.TableData(a[OSF.DDA.TableDataProperties.TableRows],a[OSF.DDA.TableDataProperties.TableHeaders])},manufactureDataNode:function(a){if(a)return new OSF.DDA.CustomXmlNode(a[OSF.DDA.DataNodeProperties.Handle],a[OSF.DDA.DataNodeProperties.NodeType],a[OSF.DDA.DataNodeProperties.NamespaceUri],a[OSF.DDA.DataNodeProperties.BaseName])},manufactureDataPart:function(a,b){return new OSF.DDA.CustomXmlPart(b,a[OSF.DDA.DataPartProperties.Id],a[OSF.DDA.DataPartProperties.BuiltIn])},manufactureEventArgs:function(e,c,a){var d=this,b;switch(e){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:b=new OSF.DDA.DocumentSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:b=new OSF.DDA.BindingSelectionChangedEventArgs(d.manufactureBinding(a,c.document),a[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:b=new OSF.DDA.BindingDataChangedEventArgs(d.manufactureBinding(a,c.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:b=new OSF.DDA.SettingsChangedEventArgs(c);break;case Microsoft.Office.Internal.EventType.OfficeThemeChanged:b=new OSF.DDA.OfficeThemeChangedEventArgs(a);break;case Microsoft.Office.Internal.EventType.DocumentThemeChanged:b=new OSF.DDA.DocumentThemeChangedEventArgs(a);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:b=new OSF.DDA.ActiveViewChangedEventArgs(a);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:b=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(a);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:b=new OSF.DDA.NodeInsertedEventArgs(d.manufactureDataNode(a[OSF.DDA.DataNodeEventProperties.NewNode]),a[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:b=new OSF.DDA.NodeReplacedEventArgs(d.manufactureDataNode(a[OSF.DDA.DataNodeEventProperties.OldNode]),d.manufactureDataNode(a[OSF.DDA.DataNodeEventProperties.NewNode]),a[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:b=new OSF.DDA.NodeDeletedEventArgs(d.manufactureDataNode(a[OSF.DDA.DataNodeEventProperties.OldNode]),d.manufactureDataNode(a[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),a[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:b=new OSF.DDA.TaskSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:b=new OSF.DDA.ResourceSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:b=new OSF.DDA.ViewSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:b=new OSF.DDA.DialogEventArgs(a);break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e))}return b}};OSF.DDA.UI={};OSF.DDA.UI.ParentUI=function(){var c=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived]),b=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,a=this;!a[b]&&OSF.OUtil.defineEnumerableProperty(a,b,{value:function(){var b=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];b(arguments,c,a)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(){var b=OSF.DDA.SyncMethodNames.MessageParent.displayName,a=this;!a[b]&&OSF.OUtil.defineEnumerableProperty(a,b,{value:function(){var b=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return b(arguments,a)}});OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(a){if(a[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived)OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:a[OSF.DDA.PropertyDescriptors.MessageContent]}});else OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:a[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.ListType=function(){var a={};a[OSF.DDA.ListDescriptors.BindingList]=OSF.DDA.PropertyDescriptors.BindingProperties;a[OSF.DDA.ListDescriptors.DataPartList]=OSF.DDA.PropertyDescriptors.DataPartProperties;a[OSF.DDA.ListDescriptors.DataNodeList]=OSF.DDA.PropertyDescriptors.DataNodeProperties;return {isListType:function(b){return OSF.OUtil.listContainsKey(a,b)},getDescriptor:function(b){return a[b]}}}();OSF.DDA.ApiMethodCall=function(c,f,e,g,h){var a=this,d=c.length,b=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,h)});a.verifyArguments=function(d,f){for(var e in d){var a=d[e],c=f[e];if(a["enum"])switch(typeof c){case "string":if(OSF.OUtil.listContainsValue(a["enum"],c))break;case "undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw b()}if(a["types"])if(!OSF.OUtil.listContainsValue(a["types"],typeof c))throw b()}};a.extractRequiredArguments=function(g,l,j){if(g.lengthc+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var d,f,i=h.length-1;i>=c;i--){var g=h[i];switch(typeof g){case "object":if(d)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else d=g;break;case a:if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else f=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}d=b.fillOptions(d,j,l,k);if(f)if(d[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else d[Microsoft.Office.WebExtension.Parameters.Callback]=f;b.verifyArguments(e,d);return d}this.verifyAndExtractCall=function(e,c,a){var d=b.extractRequiredArguments(e,c,a),g=h(e,d,c,a),f=b.constructCallArgs(d,g,c,a);return f};this.processResponse=function(c,b,d,e){var a;if(c==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)if(f)a=f(b,d,e);else a=b;else if(g)a=g(c,b);else a=OSF.DDA.ErrorCodeManager.getErrorArgs(c);return a};this.getCallArgs=function(g){for(var b,d,f=g.length-1;f>=c;f--){var e=g[f];switch(typeof e){case "object":b=e;break;case a:d=e}}b=b||{};if(d)b[Microsoft.Office.WebExtension.Parameters.Callback]=d;return b}};OSF.DDA.SyncMethodCall=function(b,c,f,g,h){var d=b.length,a=new OSF.DDA.ApiMethodCall(b,c,f,g,h);function e(e,h,j,i){if(e.length>d+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var b,k,f=e.length-1;f>=d;f--){var g=e[f];switch(typeof g){case "object":if(b)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else b=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}b=a.fillOptions(b,h,j,i);a.verifyArguments(c,b);return b}this.verifyAndExtractCall=function(f,c,b){var d=a.extractRequiredArguments(f,c,b),h=e(f,d,c,b),g=a.constructCallArgs(d,h,c,b);return g}};OSF.DDA.ConvertToDocumentTheme=function(f){var b=false,a=true;for(var d=[{name:"primaryFontColor",needToConvertToHex:a},{name:"primaryBackgroundColor",needToConvertToHex:a},{name:"secondaryFontColor",needToConvertToHex:a},{name:"secondaryBackgroundColor",needToConvertToHex:a},{name:"accent1",needToConvertToHex:a},{name:"accent2",needToConvertToHex:a},{name:"accent3",needToConvertToHex:a},{name:"accent4",needToConvertToHex:a},{name:"accent5",needToConvertToHex:a},{name:"accent6",needToConvertToHex:a},{name:"hyperlink",needToConvertToHex:a},{name:"followedHyperlink",needToConvertToHex:a},{name:"headerLatinFont",needToConvertToHex:b},{name:"headerEastAsianFont",needToConvertToHex:b},{name:"headerScriptFont",needToConvertToHex:b},{name:"headerLocalizedFont",needToConvertToHex:b},{name:"bodyLatinFont",needToConvertToHex:b},{name:"bodyEastAsianFont",needToConvertToHex:b},{name:"bodyScriptFont",needToConvertToHex:b},{name:"bodyLocalizedFont",needToConvertToHex:b}],e={},c=0;c=d.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;a[OSF.DDA.FileSliceOffset]=parseInt(b*c[OSF.DDA.FileProperties.SliceSize]);return a},onSucceeded:function(a,d,c){var b={};OSF.OUtil.defineEnumerableProperties(b,{data:{value:a[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:c[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:a[OSF.DDA.FileProperties.SliceSize]}});return b}});a({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(b,a){return a[OSF.DDA.FileProperties.Handle]}}]});a({method:OSF.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[b],calculate:OSF.DDA.generateBindingId}}],privateStateCallbacks:[],onSucceeded:j});a({method:OSF.DDA.AsyncMethodNames.AddFromPromptAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[b],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.PromptText,value:{types:[b],calculate:function(){return Strings.OfficeOM.L_AddBindingFromPromptDefaultText}}}],privateStateCallbacks:[],onSucceeded:j});a({method:OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:[b]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[b],calculate:OSF.DDA.generateBindingId}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return k}}],onSucceeded:j});a({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(a){return OSF.OUtil.mapList(a[OSF.DDA.ListDescriptors.BindingList],j)}});a({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[b]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:j});a({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[b]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(d,a,b){var c=b[Microsoft.Office.WebExtension.Parameters.Id];delete a._eventDispatches[c]}});a({method:OSF.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(b,a){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(a.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[c],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[c],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:[c],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:[c],defaultValue:0}}],checkCallArgs:function(a,b){if(a[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&a[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&a[Microsoft.Office.WebExtension.Parameters.RowCount]==0&&a[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0){delete a[Microsoft.Office.WebExtension.Parameters.StartRow];delete a[Microsoft.Office.WebExtension.Parameters.StartColumn];delete a[Microsoft.Office.WebExtension.Parameters.RowCount];delete a[Microsoft.Office.WebExtension.Parameters.ColumnCount]}if(a[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(b.type)&&(a[Microsoft.Office.WebExtension.Parameters.StartRow]||a[Microsoft.Office.WebExtension.Parameters.StartColumn]||a[Microsoft.Office.WebExtension.Parameters.RowCount]||a[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return a},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}],onSucceeded:g});a({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[b,f,c,d]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(a){return OSF.DDA.DataCoercion.determineCoercionType(a[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[c],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[c],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:[f],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:[f],defaultValue:[]}}],checkCallArgs:function(a,c){var b=Microsoft.Office.WebExtension.Parameters;if(a[b.StartRow]==0&&a[b.StartColumn]==0&&OSF.OUtil.isArray(a[b.CellFormat])&&a[b.CellFormat].length===0&&OSF.OUtil.isArray(a[b.TableOptions])&&a[b.TableOptions].length===0){delete a[b.StartRow];delete a[b.StartColumn];delete a[b.CellFormat];delete a[b.TableOptions]}if(a[b.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(c.type)&&(a[b.StartRow]&&a[b.StartRow]!=0||a[b.StartColumn]&&a[b.StartColumn]!=0||a[b.CellFormat]||a[b.TableOptions]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return a},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]});a({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[f]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]});a({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[f]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]});a({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]});a({method:OSF.DDA.AsyncMethodNames.ClearFormatsAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]});a({method:OSF.DDA.AsyncMethodNames.SetTableOptionsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TableOptions,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]});a({method:OSF.DDA.AsyncMethodNames.SetFormatsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CellFormat,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]});a({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(a){var b=a[OSF.DDA.SettingsManager.SerializedSettings],c=OSF.DDA.SettingsManager.deserializeSettings(b);return c}});a({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:[d],defaultValue:k}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(b,a){return OSF.DDA.SettingsManager.serializeSettings(a)}}]});a({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:[o]}],supportedOptions:[],privateStateCallbacks:[]});a({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:[o],defaultValue:null}}],privateStateCallbacks:[]});a({method:OSF.DDA.AsyncMethodNames.GetDocumentThemeAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:OSF.DDA.ConvertToDocumentTheme});a({method:OSF.DDA.AsyncMethodNames.GetOfficeThemeAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:OSF.DDA.ConvertToOfficeTheme});a({method:OSF.DDA.AsyncMethodNames.GetActiveViewAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(b){var a=b[Microsoft.Office.WebExtension.Parameters.ActiveView];return a==undefined?null:a}});a({method:OSF.DDA.AsyncMethodNames.AddDataPartAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Xml,types:[b]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:l});a({method:OSF.DDA.AsyncMethodNames.GetDataPartByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[b]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:l});a({method:OSF.DDA.AsyncMethodNames.GetDataPartsByNameSpaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[b]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(a){return OSF.OUtil.mapList(a[OSF.DDA.ListDescriptors.DataPartList],l)}});a({method:OSF.DDA.AsyncMethodNames.DeleteDataPartAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:e}]});a({method:OSF.DDA.AsyncMethodNames.GetPartNodesAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.XPath,types:[b]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:e}],onSucceeded:function(a){return OSF.OUtil.mapList(a[OSF.DDA.ListDescriptors.DataNodeList],n)}});a({method:OSF.DDA.AsyncMethodNames.GetPartXmlAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:e}],onSucceeded:g});a({method:OSF.DDA.AsyncMethodNames.AddDataPartNamespaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Prefix,types:[b]},{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[b]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:m}]});a({method:OSF.DDA.AsyncMethodNames.GetDataPartNamespaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Prefix,types:[b]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:m}],onSucceeded:g});a({method:OSF.DDA.AsyncMethodNames.GetDataPartPrefixAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[b]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:m}],onSucceeded:g});a({method:OSF.DDA.AsyncMethodNames.GetRelativeNodesAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.XPath,types:[b]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:h}],onSucceeded:function(a){return OSF.OUtil.mapList(a[OSF.DDA.ListDescriptors.DataNodeList],n)}});a({method:OSF.DDA.AsyncMethodNames.GetNodeValueAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:h}],onSucceeded:g});a({method:OSF.DDA.AsyncMethodNames.GetNodeXmlAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:h}],onSucceeded:g});a({method:OSF.DDA.AsyncMethodNames.SetNodeValueAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[b]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:h}]});a({method:OSF.DDA.AsyncMethodNames.SetNodeXmlAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Xml,types:[b]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:h}]});a({method:OSF.DDA.AsyncMethodNames.GetNodeTextAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:h}],onSucceeded:g});a({method:OSF.DDA.AsyncMethodNames.SetNodeTextAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Text,types:[b]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:h}]});a({method:OSF.DDA.AsyncMethodNames.GetSelectedTask,onSucceeded:function(a){return a[Microsoft.Office.WebExtension.Parameters.TaskId]}});a({method:OSF.DDA.AsyncMethodNames.GetTask,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TaskId,types:[b]}]});a({method:OSF.DDA.AsyncMethodNames.GetTaskField,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TaskId,types:[b]},{name:Microsoft.Office.WebExtension.Parameters.FieldId,types:[c]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.GetRawValue,value:{types:[d],defaultValue:i}}]});a({method:OSF.DDA.AsyncMethodNames.GetResourceField,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ResourceId,types:[b]},{name:Microsoft.Office.WebExtension.Parameters.FieldId,types:[c]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.GetRawValue,value:{types:[d],defaultValue:i}}]});a({method:OSF.DDA.AsyncMethodNames.GetProjectField,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FieldId,types:[c]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.GetRawValue,value:{types:[d],defaultValue:i}}]});a({method:OSF.DDA.AsyncMethodNames.GetSelectedResource,onSucceeded:function(a){return a[Microsoft.Office.WebExtension.Parameters.ResourceId]}});a({method:OSF.DDA.AsyncMethodNames.GetWSSUrl});a({method:OSF.DDA.AsyncMethodNames.GetSelectedView});a({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:[b]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:[c],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:[c],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:[d],defaultValue:k}},{name:Microsoft.Office.WebExtension.Parameters.XFrameDenySafe,value:{types:[d],defaultValue:k}}],privateStateCallbacks:[],onSucceeded:function(c){var f=c[Microsoft.Office.WebExtension.Parameters.Id],b=c[Microsoft.Office.WebExtension.Parameters.Data],a=new OSF.DialogHandler,d=OSF.DDA.AsyncMethodNames.CloseAsync.displayName;OSF.OUtil.defineEnumerableProperty(a,d,{value:function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];c(arguments,f,b,a)}});var e=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;OSF.OUtil.defineEnumerableProperty(a,e,{value:function(){var d=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],c=d.verifyAndExtractCall(arguments,a,b),e=c[Microsoft.Office.WebExtension.Parameters.EventType],f=c[Microsoft.Office.WebExtension.Parameters.Handler];return b.addEventHandlerAndFireQueuedEvent(e,f)}});return a},checkCallArgs:function(a){if(a[Microsoft.Office.WebExtension.Parameters.Width]<=0)a[Microsoft.Office.WebExtension.Parameters.Width]=1;if(a[Microsoft.Office.WebExtension.Parameters.Width]>100)a[Microsoft.Office.WebExtension.Parameters.Width]=99;if(a[Microsoft.Office.WebExtension.Parameters.Height]<=0)a[Microsoft.Office.WebExtension.Parameters.Height]=1;if(a[Microsoft.Office.WebExtension.Parameters.Height]>100)a[Microsoft.Office.WebExtension.Parameters.Height]=99;return a}});a({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]})})();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(a){OSF.DDA.SyncMethodCalls[a.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(a)};(function(){OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]})})();OSF.DDA.HostParameterMap=function(a,b){var i="fromHost",c=this,j="toHost",h=i,e="self",g={};g[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(a){if(a.rows!==undefined){var b={};b[OSF.DDA.TableDataProperties.TableRows]=a.rows;b[OSF.DDA.TableDataProperties.TableHeaders]=a.headers;a=b}return a},fromHost:function(a){return a}};function d(j,i){var m=j?{}:undefined;for(var f in j){var e=j[f],c;if(OSF.DDA.ListType.isListType(f)){c=[];for(var n in e)c.push(d(e[n],i))}else if(OSF.OUtil.listContainsKey(g,f))c=g[f][i](e);else if(i==h&&a.preserveNesting(f))c=d(e,i);else{var k=b[f];if(k){var l=k[i];if(l){c=l[e];if(c===undefined)c=e}}else c=e}m[f]=c}return m}function k(i,h){var f;for(var c in h){var d;if(a.isComplexType(c))d=k(i,b[c][j]);else d=i[c];if(d!=undefined){if(!f)f={};var g=h[c];if(g==e)g=c;f[g]=a.pack(c,d)}}return f}function f(k,j,g){if(!g)g={};for(var d in j){var l=j[d],c;if(l==e)c=k;else c=k[l];if(c===null||c===undefined)g[d]=undefined;else{c=a.unpack(d,c);var i;if(a.isComplexType(d)){i=b[d][h];if(a.preserveNesting(d))g[d]=f(c,i);else f(c,i,g)}else{if(OSF.DDA.ListType.isListType(d)){i={};var n=OSF.DDA.ListType.getDescriptor(d);i[n]=e;for(var m in c)c[m]=f(c[m],i)}g[d]=c}}}return g}function l(l,g,a){var e=b[l][a],c;if(a=="toHost"){var j=d(g,a);c=k(j,e)}else if(a==i){var h=f(g,e);c=d(h,a)}return c}if(!b)b={};c.setMapping=function(k,c){var a,d;if(c.map){a=c.map;d={};for(var f in a){var g=a[f];if(g==e)g=f;d[g]=f}}else{a=c.toHost;d=c.fromHost}var i=b[k]={};i[j]=a;i[h]=d};c.toHost=function(b,a){return l(b,a,j)};c.fromHost=function(a,b){return l(a,b,h)};c.self=e;c.dynamicTypes=g;c.mapValues=d;c.specialProcessorDynamicTypes=a.dynamicTypes};OSF.DDA.SpecialProcessor=function(c,b){var a=this;a.sharedComplexType=[OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,OSF.DDA.EventDescriptors.DialogMessageReceivedEvent];a.isComplexType=function(a){return OSF.OUtil.listContainsValue(this.sharedComplexType,a)||OSF.OUtil.listContainsValue(c,a)};a.isDynamicType=function(a){return OSF.OUtil.listContainsKey(b,a)};a.preserveNesting=function(b){var a=[OSF.DDA.PropertyDescriptors.Subset,OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode];return OSF.OUtil.listContainsValue(a,b)};a.pack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].toHost(d);else a=d;return a};a.unpack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].fromHost(d);else a=d;return a}};OSF.DDA.DispIdHost.Facade=function(d,e){var f=this,a={},b=OSF.DDA.AsyncMethodNames,c=OSF.DDA.MethodDispId;a[b.GoToByIdAsync.id]=c.dispidNavigateToMethod;a[b.GetSelectedDataAsync.id]=c.dispidGetSelectedDataMethod;a[b.SetSelectedDataAsync.id]=c.dispidSetSelectedDataMethod;a[b.GetDocumentCopyChunkAsync.id]=c.dispidGetDocumentCopyChunkMethod;a[b.ReleaseDocumentCopyAsync.id]=c.dispidReleaseDocumentCopyMethod;a[b.GetDocumentCopyAsync.id]=c.dispidGetDocumentCopyMethod;a[b.AddFromSelectionAsync.id]=c.dispidAddBindingFromSelectionMethod;a[b.AddFromPromptAsync.id]=c.dispidAddBindingFromPromptMethod;a[b.AddFromNamedItemAsync.id]=c.dispidAddBindingFromNamedItemMethod;a[b.GetAllAsync.id]=c.dispidGetAllBindingsMethod;a[b.GetByIdAsync.id]=c.dispidGetBindingMethod;a[b.ReleaseByIdAsync.id]=c.dispidReleaseBindingMethod;a[b.GetDataAsync.id]=c.dispidGetBindingDataMethod;a[b.SetDataAsync.id]=c.dispidSetBindingDataMethod;a[b.GetFilePropertiesAsync.id]=c.dispidGetFilePropertiesMethod;a[b.AddRowsAsync.id]=c.dispidAddRowsMethod;a[b.AddColumnsAsync.id]=c.dispidAddColumnsMethod;a[b.DeleteAllDataValuesAsync.id]=c.dispidClearAllRowsMethod;a[b.ClearFormatsAsync.id]=c.dispidClearFormatsMethod;a[b.RefreshAsync.id]=c.dispidLoadSettingsMethod;a[b.SaveAsync.id]=c.dispidSaveSettingsMethod;a[b.SetTableOptionsAsync.id]=c.dispidSetTableOptionsMethod;a[b.SetFormatsAsync.id]=c.dispidSetFormatsMethod;a[b.GetActiveViewAsync.id]=c.dispidGetActiveViewMethod;a[b.AppCommandInvocationCompletedAsync.id]=c.dispidAppCommandInvocationCompletedMethod;a[b.AddDataPartAsync.id]=c.dispidAddDataPartMethod;a[b.GetDataPartByIdAsync.id]=c.dispidGetDataPartByIdMethod;a[b.GetDataPartsByNameSpaceAsync.id]=c.dispidGetDataPartsByNamespaceMethod;a[b.GetPartXmlAsync.id]=c.dispidGetDataPartXmlMethod;a[b.GetPartNodesAsync.id]=c.dispidGetDataPartNodesMethod;a[b.DeleteDataPartAsync.id]=c.dispidDeleteDataPartMethod;a[b.GetNodeValueAsync.id]=c.dispidGetDataNodeValueMethod;a[b.GetNodeXmlAsync.id]=c.dispidGetDataNodeXmlMethod;a[b.GetRelativeNodesAsync.id]=c.dispidGetDataNodesMethod;a[b.SetNodeValueAsync.id]=c.dispidSetDataNodeValueMethod;a[b.SetNodeXmlAsync.id]=c.dispidSetDataNodeXmlMethod;a[b.AddDataPartNamespaceAsync.id]=c.dispidAddDataNamespaceMethod;a[b.GetDataPartNamespaceAsync.id]=c.dispidGetDataUriByPrefixMethod;a[b.GetDataPartPrefixAsync.id]=c.dispidGetDataPrefixByUriMethod;a[b.GetNodeTextAsync.id]=c.dispidGetDataNodeTextMethod;a[b.SetNodeTextAsync.id]=c.dispidSetDataNodeTextMethod;a[b.GetDocumentThemeAsync.id]=c.dispidGetDocumentThemeMethod;a[b.GetOfficeThemeAsync.id]=c.dispidGetOfficeThemeMethod;a[b.GetSelectedTask.id]=c.dispidGetSelectedTaskMethod;a[b.GetTask.id]=c.dispidGetTaskMethod;a[b.GetWSSUrl.id]=c.dispidGetWSSUrlMethod;a[b.GetTaskField.id]=c.dispidGetTaskFieldMethod;a[b.GetSelectedResource.id]=c.dispidGetSelectedResourceMethod;a[b.GetResourceField.id]=c.dispidGetResourceFieldMethod;a[b.GetProjectField.id]=c.dispidGetProjectFieldMethod;a[b.GetSelectedView.id]=c.dispidGetSelectedViewMethod;b=Microsoft.Office.WebExtension.EventType;c=OSF.DDA.EventDispId;a[b.SettingsChanged]=c.dispidSettingsChangedEvent;a[b.DocumentSelectionChanged]=c.dispidDocumentSelectionChangedEvent;a[b.BindingSelectionChanged]=c.dispidBindingSelectionChangedEvent;a[b.BindingDataChanged]=c.dispidBindingDataChangedEvent;a[b.ActiveViewChanged]=c.dispidActiveViewChangedEvent;a[b.DocumentThemeChanged]=c.dispidDocumentThemeChangedEvent;a[b.OfficeThemeChanged]=c.dispidOfficeThemeChangedEvent;a[b.DialogMessageReceived]=c.dispidDialogMessageReceivedEvent,a[b.AppCommandInvoked]=c.dispidAppCommandInvokedEvent;a[b.TaskSelectionChanged]=c.dispidTaskSelectionChangedEvent;a[b.ResourceSelectionChanged]=c.dispidResourceSelectionChangedEvent;a[b.ViewSelectionChanged]=c.dispidViewSelectionChangedEvent;a[b.DataNodeInserted]=c.dispidDataNodeAddedEvent;a[b.DataNodeReplaced]=c.dispidDataNodeReplacedEvent;a[b.DataNodeDeleted]=c.dispidDataNodeDeletedEvent;function g(a,c,d,b){if(typeof a=="number"){if(!b)b=c.getCallArgs(d);OSF.DDA.issueAsyncResult(b,a,OSF.DDA.ErrorCodeManager.getErrorArgs(a))}else throw a}f[OSF.DDA.DispIdHost.Methods.InvokeMethod]=function(o,j,k,m){var b;try{var h=o.id,c=OSF.DDA.AsyncMethodCalls[h];b=c.verifyAndExtractCall(j,k,m);var i=a[h],n=d(h),f;if(e.toHost)f=e.toHost(i,b);else f=b;n[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({dispId:i,hostCallArgs:f,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:function(f,d){var a;if(f==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)if(e.fromHost)a=e.fromHost(i,d);else a=d;else a=d;var g=c.processResponse(f,a,k,b);OSF.DDA.issueAsyncResult(b,f,g)}})}catch(l){g(l,c,j,b)}};f[OSF.DDA.DispIdHost.Methods.AddEventHandler]=function(j,f,h){var c,b,l;function i(a){if(a==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){var e=f.addEventHandler(b,l);if(!e)a=OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed}var d;if(a!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)d=OSF.DDA.ErrorCodeManager.getErrorArgs(a);OSF.DDA.issueAsyncResult(c,a,d)}try{var k=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id];c=k.verifyAndExtractCall(j,h,f);b=c[Microsoft.Office.WebExtension.Parameters.EventType];l=c[Microsoft.Office.WebExtension.Parameters.Handler];if(f.getEventHandlerCount(b)==0){var m=a[b],o=d(b)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync];o({eventType:b,dispId:m,targetId:h.id||"",onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:i,onEvent:function(a){var c=e.fromHost(m,a);f.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(b,h,c))}})}else i(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}catch(n){g(n,k,j,c)}};f[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]=function(j,c,l){var e,b,f;function i(a){var b;if(a!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)b=OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist);OSF.DDA.issueAsyncResult(e,a,b)}try{var k=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id];e=k.verifyAndExtractCall(j,l,c);b=e[Microsoft.Office.WebExtension.Parameters.EventType];f=e[Microsoft.Office.WebExtension.Parameters.Handler];var h;if(f==null){c.clearEventHandlers(b);h=true}else if(!c.hasEventHandler(b,f))h=false;else h=c.removeEventHandler(b,f);if(c.getEventHandlerCount(b)==0){var o=a[b],n=d(b)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync];n({eventType:b,dispId:o,targetId:l.id||"",onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:i})}else i(h?OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess:Strings.OfficeOM.L_EventRegistrationError)}catch(m){g(m,k,j,e)}};f[OSF.DDA.DispIdHost.Methods.OpenDialog]=function(m,c,l){var f,b,h,k;function i(a){var d;if(a!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)d=OSF.DDA.ErrorCodeManager.getErrorArgs(a);else{var b={};b[Microsoft.Office.WebExtension.Parameters.Id]=k;b[Microsoft.Office.WebExtension.Parameters.Data]=c;var d=j.processResponse(a,b,l,f)}OSF.DDA.issueAsyncResult(f,a,d)}try{b=Microsoft.Office.WebExtension.EventType.DialogMessageReceived;h=Microsoft.Office.WebExtension.EventType.DialogEventReceived;(b==undefined||h==undefined)&&i(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported);if(OSF.DDA.AsyncMethodNames.DisplayDialogAsync==null){i(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);return}var j=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id];f=j.verifyAndExtractCall(m,l,c);c.clearEventHandlers(b);c.clearEventHandlers(h);var n=a[b],p=d(b)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync];k=f[Microsoft.Office.WebExtension.Parameters.Url]+">"+f[Microsoft.Office.WebExtension.Parameters.Width]+">"+f[Microsoft.Office.WebExtension.Parameters.Height];p({eventType:b,dispId:n,targetId:k,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:i,onEvent:function(i){var g=e.fromHost(n,i),f=OSF.DDA.OMFactory.manufactureEventArgs(b,l,g);if(f.type==h){var d=OSF.DDA.ErrorCodeManager.getErrorArgs(f.error),a={};a[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=status||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;a[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=d.name||d;a[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=d.message||d;f.error=new OSF.DDA.Error(a[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])}c.fireOrQueueEvent(f);if(g[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogClosed){c.clearEventHandlers(b);c.clearEventHandlers(h)}}})}catch(o){g(o,j,m,f)}};f[OSF.DDA.DispIdHost.Methods.CloseDialog]=function(f,m,c,o){var j,b,h,e=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess;function l(a){e=a}try{var i=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id];j=i.verifyAndExtractCall(f,o,c);b=Microsoft.Office.WebExtension.EventType.DialogMessageReceived;h=Microsoft.Office.WebExtension.EventType.DialogEventReceived;c.clearEventHandlers(b);c.clearEventHandlers(h);var p=a[b],n=d(b)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync];n({eventType:b,dispId:p,targetId:m,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:l})}catch(k){g(k,i,f,j)}if(e!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed,OSF.DDA.AsyncMethodNames.CloseAsync.displayName,e)};f[OSF.DDA.DispIdHost.Methods.MessageParent]=function(b,i){var e={},c=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id],f=c.verifyAndExtractCall(b,i,e),g=d(OSF.DDA.SyncMethodNames.MessageParent.id),h=g[OSF.DDA.DispIdHost.Delegates.MessageParent],j=a[OSF.DDA.SyncMethodNames.MessageParent.id];return h({dispId:j,hostCallArgs:f,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)}})}};OSF.DDA.DispIdHost.addAsyncMethods=function(a,b,e){for(var f in b){var c=b[f],d=c.displayName;!a[d]&&OSF.OUtil.defineEnumerableProperty(a,d,{value:function(b){return function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod];c(b,arguments,a,e)}}(c)})}};OSF.DDA.DispIdHost.addEventSupport=function(a,b){var d=OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName,c=OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName;!a[d]&&OSF.OUtil.defineEnumerableProperty(a,d,{value:function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler];c(arguments,b,a)}});!a[c]&&OSF.OUtil.defineEnumerableProperty(a,c,{value:function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler];c(arguments,b,a)}})};OSF.DDA.Context=function(a,f,g,c){var e="requirements",b=this;OSF.OUtil.defineEnumerableProperties(b,{contentLanguage:{value:a.get_dataLocale()},displayLanguage:{value:a.get_appUILocale()},host:{value:OfficeExt.HostName.Host.getInstance().getHost(a.get_appName())},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform(a.get_appName())},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(a.get_appName())}});g&&OSF.OUtil.defineEnumerableProperty(b,"license",{value:g});a.ui&&OSF.OUtil.defineEnumerableProperty(b,"ui",{value:a.ui});if(a.get_isDialog()){var d=OfficeExt.Requirement.RequirementsMatrixFactory.getDialogDefaultRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,e,{value:d})}else{f&&OSF.OUtil.defineEnumerableProperty(b,"document",{value:f});if(c){var h=c.displayName||"appOM";delete c.displayName;OSF.OUtil.defineEnumerableProperty(b,h,{value:c})}var d=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,e,{value:d})}};OSF.DDA.OutlookContext=function(b,a,c,d){OSF.DDA.OutlookContext.uber.constructor.call(this,b,null,c,d);a&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:a})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{"get":function(){var a;if(OSF&&OSF._OfficeAppFactory)a=OSF._OfficeAppFactory.getContext();return a}});Microsoft.Office.WebExtension.useShortNamespace=function(a){if(a)OSF.NamespaceManager.enableShortcut();else OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(a,b){var c;if(a&&typeof a=="string"){var d=a.indexOf("#");if(d!=-1){var h=a.substring(0,d),g=a.substring(d+1);switch(h){case "binding":case "bindings":if(g)c=new OSF.DDA.BindingPromise(g)}}}if(!c){if(b){var e=typeof b;if(e=="function"){var f={};f[Microsoft.Office.WebExtension.Parameters.Callback]=b;OSF.DDA.issueAsyncResult(f,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,e)}}else{c.onFail=b;return c}};OSF.DDA.BindingPromise=function(b,a){this._id=b;OSF.OUtil.defineEnumerableProperty(this,"onFail",{"get":function(){return a},"set":function(c){var b=typeof c;if(b!="undefined"&&b!="function")throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,b);a=c}})};OSF.DDA.BindingPromise.prototype={_fetch:function(b){var a=this;if(a.binding)b&&b(a.binding);else if(!a._binding){var c=a;Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(a._id,function(a){if(a.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded){OSF.OUtil.defineEnumerableProperty(c,"binding",{value:a.value});b&&b(c.binding)}else c.onFail&&c.onFail(a)})}return a},getDataAsync:function(){var a=arguments;this._fetch(function(b){b.getDataAsync.apply(b,a)});return this},setDataAsync:function(){var a=arguments;this._fetch(function(b){b.setDataAsync.apply(b,a)});return this},addHandlerAsync:function(){var a=arguments;this._fetch(function(b){b.addHandlerAsync.apply(b,a)});return this},removeHandlerAsync:function(){var a=arguments;this._fetch(function(b){b.removeHandlerAsync.apply(b,a)});return this},setTableOptionsAsync:function(){var a=arguments;this._fetch(function(b){b.setTableOptionsAsync.apply(b,a)});return this},setFormatsAsync:function(){var a=arguments;this._fetch(function(b){b.setFormatsAsync.apply(b,a)});return this},clearFormatsAsync:function(){var a=arguments;this._fetch(function(b){b.clearFormatsAsync.apply(b,a)});return this}};OSF.DDA.License=function(a){OSF.OUtil.defineEnumerableProperty(this,"value",{value:a})};OSF.DDA.Settings=function(b){var a="name";b=b||{};OSF.OUtil.defineEnumerableProperties(this,{"get":{value:function(e){var d=Function._validateParams(arguments,[{name:a,type:String,mayBeNull:false}]);if(d)throw d;var c=b[e];return typeof c==="undefined"?null:c}},"set":{value:function(e,d){var c=Function._validateParams(arguments,[{name:a,type:String,mayBeNull:false},{name:"value",mayBeNull:true}]);if(c)throw c;b[e]=d}},remove:{value:function(d){var c=Function._validateParams(arguments,[{name:a,type:String,mayBeNull:false}]);if(c)throw c;delete b[d]}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],b)};OSF.DDA.RefreshableSettings=function(a){OSF.DDA.RefreshableSettings.uber.constructor.call(this,a);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],a);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(b,c){var a;switch(b.get_clientMode()){case OSF.ClientMode.ReadOnly:a=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:a=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}c&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:c});OSF.OUtil.defineMutableProperties(this,{mode:{value:a},url:{value:b.get_docUrl()}})};OSF.DDA.JsomDocument=function(c,d,e){var a=this;OSF.DDA.JsomDocument.uber.constructor.call(a,c,e);OSF.OUtil.defineEnumerableProperty(a,"bindings",{"get":function(){return d}});var b=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(a,[b.GetSelectedDataAsync,b.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(a,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.DDA.BindingFacade=function(b){this._eventDispatches=[];OSF.OUtil.defineEnumerableProperty(this,"document",{value:b});var a=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[a.AddFromSelectionAsync,a.AddFromNamedItemAsync,a.GetAllAsync,a.GetByIdAsync,a.ReleaseByIdAsync])};OSF.DDA.UnknownBinding=function(b,a){OSF.OUtil.defineEnumerableProperties(this,{document:{value:a},id:{value:b}})};OSF.DDA.Binding=function(a,c){OSF.OUtil.defineEnumerableProperties(this,{document:{value:c},id:{value:a}});var d=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[d.GetDataAsync,d.SetDataAsync]);var e=Microsoft.Office.WebExtension.EventType,b=c.bindings._eventDispatches;if(!b[a])b[a]=new OSF.EventDispatch([e.BindingSelectionChanged,e.BindingDataChanged]);var f=b[a];OSF.DDA.DispIdHost.addEventSupport(this,f)};OSF.DDA.TextBinding=function(b,a){OSF.DDA.TextBinding.uber.constructor.call(this,b,a);OSF.OUtil.defineEnumerableProperty(this,"type",{value:Microsoft.Office.WebExtension.BindingType.Text})};OSF.OUtil.extend(OSF.DDA.TextBinding,OSF.DDA.Binding);OSF.DDA.MatrixBinding=function(d,c,b,a){OSF.DDA.MatrixBinding.uber.constructor.call(this,d,c);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Matrix},rowCount:{value:b?b:0},columnCount:{value:a?a:0}})};OSF.OUtil.extend(OSF.DDA.MatrixBinding,OSF.DDA.Binding);OSF.DDA.TableBinding=function(f,e,d,c,b){OSF.DDA.TableBinding.uber.constructor.call(this,f,e);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:d?d:0},columnCount:{value:c?c:0},hasHeaders:{value:b?b:false}});var a=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[a.AddRowsAsync,a.AddColumnsAsync,a.DeleteAllDataValuesAsync])};OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding);Microsoft.Office.WebExtension.TableData=function(b,a){function c(a){if(a==null||a==undefined)return null;try{for(var b=OSF.DDA.DataCoercion.findArrayDimensionality(a,2);b<2;b++)a=[a];return a}catch(c){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{"get":function(){return a},"set":function(b){a=c(b)}},rows:{"get":function(){return b},"set":function(a){b=a==null||OSF.OUtil.isArray(a)&&a.length==0?[]:c(a)}}});this.headers=a;this.rows=b};Microsoft.Office.WebExtension.FileProperties=function(a){OSF.OUtil.defineEnumerableProperties(this,{url:{value:a[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.Error=function(c,a,b){OSF.OUtil.defineEnumerableProperties(this,{name:{value:c},message:{value:a},code:{value:b}})};OSF.DDA.AsyncResult=function(b,a){OSF.OUtil.defineEnumerableProperties(this,{value:{value:b[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:a?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});b[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:b[OSF.DDA.AsyncResultEnum.Properties.Context]});a&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(a[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.DocumentSelectionChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:a}})};OSF.DDA.BindingSelectionChangedEventArgs=function(c,a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingSelectionChanged},binding:{value:c}});for(var b in a)OSF.OUtil.defineEnumerableProperty(this,b,{value:a[b]})};OSF.DDA.BindingDataChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingDataChanged},binding:{value:a}})};OSF.DDA.SettingsChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:a}})};OSF.DDA.OfficeThemeChangedEventArgs=function(a){var b=OSF.DDA.ConvertToOfficeTheme(a);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.Internal.EventType.OfficeThemeChanged},officeTheme:{value:b}})};OSF.DDA.DocumentThemeChangedEventArgs=function(a){var b=OSF.DDA.ConvertToDocumentTheme(a);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.Internal.EventType.DocumentThemeChanged},documentTheme:{value:b}})};OSF.DDA.ActiveViewChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.ActiveViewChanged},activeView:{value:a.activeView}})};OSF.O15HostSpecificFileVersion={GetFallbackVersion:function(e){var a="15.02",d="15.01",c={"1":a,"2":a,"4":a,"8":"15.04","16":a,"128":a},b=c[e];if(b)return b;else return d},GenerateVersion:function(d,c){var a=2;return b(d,a)+"."+b(c,a);function b(b,c){b=b||0;c=c||0;for(var a=b.toString(),e=c-a.length,d=0;d0){for(var d=[],c=0;c=f)break;c=Function._validateParameter(i[d],h,j);if(c){c.popStackFrame();return c}}return a};if(!Function._validateParameterCount)Function._validateParameterCount=function(m,f,l){var b,e,c=f.length,g=m.length;if(gc){e=d;for(b=0;b-1||navigator.userAgent.indexOf("Firefox")>-1)a=a.split(b).join(d._escapeChars[b]);else a=a.replace(d._charsToEscapeRegExs[b],d._escapeChars[b])}}c.append(a);c.append(f)};d.serializeWithBuilder=function(e,c,l,f){var g;switch(typeof e){case "object":if(e){if(f){for(var m=0;m0&&c.append(",");d.serializeWithBuilder(e[g],c,false,f)}c.append("]")}else{if(b.MsAjaxTypeHelper.isInstanceOfType(Date,e)){c.append('"\\/Date(');c.append(e.getTime());c.append(')\\/"');break}var h=[],i=0;for(var j in e){if(b.MsAjaxString.startsWith(j,"$"))continue;if(j===d._serverTypeFieldName&&i!==0){h[i++]=h[0];h[0]=j}else h[i++]=j}l&&h.sort();c.append("{");var n=false;for(g=0;g=0&&c.splice(a,1);return a>=0};b.indexOf=function(e,f,b){if(typeof f===a)return -1;var d=e.length;if(d!==0){b=b-0;if(isNaN(b))b=0;else{if(isFinite(b))b=b-b%1;if(b<0)b=Math.max(0,d+b)}for(var c=b;c40){a=OSF.OUtil.Guid.generateNewGuid();b.setValue(b.clientIDKey,a)}return a};a.prototype.saveLog=function(c,d){var b=this,a=b.getValue(b.logIdSetKey);a=(a&&a.length>0?a+";":"")+c;b.setValue(b.logIdSetKey,a);b.setValue(c,d)};a.prototype.enumerateLog=function(c,e){var a=this,d=a.getValue(a.logIdSetKey);if(d){var f=d.split(";");for(var h in f){var b=f[h],g=a.getValue(b);if(g){c&&c(b,g);e&&a.remove(b)}}e&&a.remove(a.logIdSetKey)}};a.prototype.getValue=function(c){var a=OSF.OUtil.getLocalStorage(),b="";if(a)b=a.getItem(c);return b};a.prototype.setValue=function(c,b){var a=OSF.OUtil.getLocalStorage();a&&a.setItem(c,b)};a.prototype.remove=function(b){var a=OSF.OUtil.getLocalStorage();if(a)try{a.removeItem(b)}catch(c){}};return a}(),f=function(){function a(){}a.prototype.LogData=function(a){if(!OSF.Logger)return;OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,a.SerializeRow(),OSF.Logger.SendFlag.none)};a.prototype.LogRawData=function(a){if(!OSF.Logger)return;OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,a,OSF.Logger.SendFlag.none)};return a}();function t(d){if(!OSF.Logger)return;if(b)return;b=new v;b.hostVersion=d.get_appVersion();b.appId=d.get_id();b.host=d.get_appName();b.browser=window.navigator.userAgent;b.correlationId=d.get_correlationId();b.clientId=(new i).getClientId();b.appInstanceId=d.get_appInstanceId();if(b.appInstanceId)b.appInstanceId=b.appInstanceId.replace(/[{}]/g,"").toLowerCase();var h=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/","i"),g=d.get_docUrl();b.docUrl=h.test(g)?g:"";var f=location.href;if(f)f=f.split("?")[0].split("#")[0];b.appURL=f;(function(f,b){var d,e,c;b.assetId="";b.userId="";try{d=decodeURIComponent(f);e=new DOMParser;c=e.parseFromString(d,"text/xml");b.userId=c.getElementsByTagName("t")[0].attributes.getNamedItem("cid").nodeValue;b.assetId=c.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(g){}finally{d=a;c=a;e=a}})(d.get_eToken(),b);(function(){var k=new Date,d=a,h=0,j=false,f=function(){if(document.hasFocus()){if(d==a)d=new Date}else if(d){h+=Math.abs((new Date).getTime()-d.getTime());d=a}},b=[];b.push(new e("focus",f));b.push(new e("blur",f));b.push(new e("focusout",f));b.push(new e("focusin",f));var i=function(){for(var e=0;e=3){a._webAppState.conversationID=b[0];a._webAppState.id=b[1];a._webAppState.webAppUrl=b[2]}}else a._hostInfo.isRichClient=true;if(!a._hostInfo.isRichClient){a._webAppState.clientEndPoint=Microsoft.Office.Common.XdmCommunicationManager.connect(a._webAppState.conversationID,a._webAppState.wnd,a._webAppState.webAppUrl);a._webAppState.serviceEndPoint=Microsoft.Office.Common.XdmCommunicationManager.createServiceEndPoint(a._webAppState.id);var f=a._webAppState.conversationID+OSF.SharedConstants.NotificationConversationIdSuffix;a._webAppState.serviceEndPoint.registerConversation(f);var g=function(b){switch(b){case OSF.AgaveHostAction.Select:a._webAppState.focused=true;window.focus();break;case OSF.AgaveHostAction.UnSelect:a._webAppState.focused=c;break;default:OsfMsAjaxFactory.msAjaxDebug.trace("actionId "+b+" notifyAgave is wrong.")}};a._webAppState.serviceEndPoint.registerMethod("Office_notifyAgave",g,Microsoft.Office.Common.InvokeType.async,c);window.onfocus=function(){if(!a._webAppState.focused){a._webAppState.focused=true;a._webAppState.clientEndPoint.invoke(d,null,[a._webAppState.id,OSF.AgaveHostAction.Select])}};window.onblur=function(){if(a._webAppState.focused){a._webAppState.focused=c;a._webAppState.clientEndPoint.invoke(d,null,[a._webAppState.id,OSF.AgaveHostAction.UnSelect])}}}};OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize=function(a){var i="undefined",d=this,f=new OSF.DDA.License(a.get_eToken()),l=window.open;window.open=function(d,c,b){var a=null;try{a=l(d,c,b)}catch(f){}if(!a&&OSF._OfficeAppFactory.getClientEndPoint()&&OSF._OfficeAppFactory.getClientEndPoint().invoke){var e={strUrl:d,strWindowName:c,strWindowFeatures:b};OSF._OfficeAppFactory.getClientEndPoint().invoke("ContextActivationManager_openWindowInHost",null,e)}return a};if(d._hostInfo.isRichClient){var h=true;try{h=a.get_appName()==OSF.AppName.Outlook&&parseFloat(a.get_appVersion())<15.04}catch(m){}if(!h)if(a.get_isDialog()){if(OSF.DDA.UI.ChildUI)a.ui=new OSF.DDA.UI.ChildUI}else if(OSF.DDA.UI.ParentUI)a.ui=new OSF.DDA.UI.ParentUI;if(OSF.DDA.SafeArray!=undefined){var b=OSF.DDA.SafeArray.Delegate.ParameterMap,c={};c[OSF.DDA.EventDescriptors.DialogMessageReceivedEvent]=OSF.DDA.SafeArray.Delegate.ParameterMap.self;b.setMapping(OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,{fromHost:c});c={};c[OSF.DDA.PropertyDescriptors.MessageType]=0;c[OSF.DDA.PropertyDescriptors.MessageContent]=1;b.setMapping(OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,{fromHost:c});OSF.DDA.SafeArray.Delegate.ParameterMap=b}}if(a.get_appName()==OSF.AppName.OutlookWebApp){OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(a,d._settings,f,a.appOM));Microsoft.Office.WebExtension.initialize()}else if(a.get_appName()==OSF.AppName.Outlook){OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(a,d._settings,f,a.appOM));if(typeof OfficeJsClient_OutlookWin32!==i)if(OfficeJsClient_OutlookWin32.prepareRightAfterWebExtensionInitialize!==i){OfficeJsClient_OutlookWin32.prepareRightBeforeWebExtensionInitialize();Microsoft.Office.WebExtension.initialize();OfficeJsClient_OutlookWin32.prepareRightAfterWebExtensionInitialize()}else{Microsoft.Office.WebExtension.initialize();OfficeJsClient_OutlookWin32.prepareRightBeforeWebExtensionInitialize()}else Microsoft.Office.WebExtension.initialize()}else if(a.get_osfControlType()===OSF.OsfControlType.DocumentLevel||a.get_osfControlType()===OSF.OsfControlType.ContainerLevel){OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(a,a.doc,f));var e,b,g=a.get_reason();if(d._hostInfo.isRichClient){function j(a){try{a.onCalling&&a.onCalling();var e=(new Date).getTime(),f=a.hostCallArgs[Microsoft.Office.WebExtension.Parameters.MessageToParent];window.external.MessageParent(f);a.onReceiving&&a.onReceiving();OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(a.dispId,a.hostCallArgs,Math.abs((new Date).getTime()-e),result);return result}catch(d){var b,c=d.number;if(c)switch(c){case -2146828218:b=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;case -2146827850:default:b=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}return b||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}}function k(b){var a=OSF.DDA.DispIdHost.getRichClientDelegateMethods(b);if(a[OSF.DDA.DispIdHost.Delegates.MessageParent]==undefined)a[OSF.DDA.DispIdHost.Delegates.MessageParent]=j;return a}e=k;g=OSF.DDA.RichInitializationReason[g];b=OSF.DDA.SafeArray.Delegate.ParameterMap}else{e=OSF.DDA.DispIdHost.getXLSDelegateMethods;b=OSF.DDA.XLS.Delegate.ParameterMap}OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(e,b));Microsoft.Office.WebExtension.initialize(g)}else throw OSF.OUtil.formatString(Strings.OfficeOM.L_OsfControlTypeNotSupported)};OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(a,f,t){var c=false,b;b=".js";var q={"1-15.00":"excel-15"+b,"1-15.01":"excel-15.01"+b,"1-15.02":"excel-15.02"+b,"2-15.00":"word-15"+b,"2-15.01":"word-15.01"+b,"2-15.02":"word-15.02"+b,"4-15.00":"powerpoint-15"+b,"4-15.01":"powerpoint-15.01"+b,"4-15.02":"powerpoint-15.02"+b,"8-15.00":"outlook-15"+b,"8-15.01":"outlook-15.01"+b,"8-15.02":"outlook-15.02"+b,"8-15.03":"outlook-15.03"+b,"8-15.04":"outlook-15.04"+b,"16-15":"excelwebapp-15"+b,"16-15.01":"excelwebapp-15.01"+b,"16-15.02":"excelwebapp-15.02"+b,"64-15":"outlookwebapp-15"+b,"64-15.01":"outlookwebapp-15.01"+b,"128-15.00":"project-15"+b,"128-15.01":"project-15.01"+b,"128-15.02":"project-15.02"+b},n=function(){var a=function(a){a&&OSF.OUtil.loadScript(a,function(){OsfMsAjaxFactory.msAjaxDebug.trace("loaded customized script:"+a)})},c=OSF._OfficeAppFactory.getClientEndPoint(),b=null;if(!c){try{if(typeof window.external.getCustomizedScriptPath!=="undefined")b=window.external.getCustomizedScriptPath()}catch(d){OsfMsAjaxFactory.msAjaxDebug.trace("no script override through window.external.")}a(b)}else try{c.invoke("getCustomizedScriptPathAsync",function(c,b){a(c===0?b:null)},{__timeout__:1e3})}catch(d){OsfMsAjaxFactory.msAjaxDebug.trace("no script override through cross frame communication.")}};OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM);var i=this;function g(e){var c,b;if(i._hostInfo.isRichClient)b=OSF.DDA.RichClientSettingsManager.read();else b=a.get_settings();var d=OSF.DDA.SettingsManager.deserializeSettings(b);if(e)c=new OSF.DDA.RefreshableSettings(d);else c=new OSF.DDA.Settings(d);return c}var h=a.get_appVersion(),k=OSF.O15HostSpecificFileVersion.GetFallbackVersion(a.get_appName());if(h>k)h=k;var e=t+q[a.get_appName()+"-"+h],d=function(a,c,b){if(OSF._OfficeAppFactory.getLoadScriptHelper)OSF._OfficeAppFactory.getLoadScriptHelper().loadScript(a,c,b);else OSF.OUtil.loadScript(a,b)};if(a.get_appName()==OSF.AppName.Excel){var p=function(){a.doc=new OSF.DDA.ExcelDocument(a,g(c));f()};d(e,OSF.ConstantNames.HostFileId,p)}else if(a.get_appName()==OSF.AppName.ExcelWebApp){var l=function(){a.doc=new OSF.DDA.ExcelWebAppDocument(a,g(true));f()};d(e,OSF.ConstantNames.HostFileId,l)}else if(a.get_appName()==OSF.AppName.Word){var s=function(){a.doc=new OSF.DDA.WordDocument(a,g(c));f()};d(e,OSF.ConstantNames.HostFileId,s)}else if(a.get_appName()==OSF.AppName.PowerPoint){var m=function(){a.doc=new OSF.DDA.PowerPointDocument(a,g(c));f()};d(e,OSF.ConstantNames.HostFileId,m)}else if(a.get_appName()==OSF.AppName.OutlookWebApp||a.get_appName()==OSF.AppName.Outlook){var o=function(){i._settings=g(c);a.appOM=new OSF.DDA.OutlookAppOm(a,i._webAppState.wnd,f)},j=function(){d(e,OSF.ConstantNames.HostFileId,o)};if(!OsfMsAjaxFactory.isMsAjaxLoaded())OsfMsAjaxFactory.loadMsAjaxFull(j);else j();n()}else if(a.get_appName()==OSF.AppName.Project){var r=function(){a.doc=new OSF.DDA.ProjectDocument(a);f()};d(e,OSF.ConstantNames.HostFileId,r)}else throw OSF.OUtil.formatString(stringNS.L_AppNotExistInitializeNotCalled,a.get_appName())} \ No newline at end of file +var OSF=OSF||{};OSF.OUtil=function(){var e="on",g="configurable",f="writable",d="enumerable",c=true,b=null,a=false,j=-1,m="&_xdm_Info=",l="_xdm_",h="#",i={},o=3e4,k=a;function n(){return Math.floor(100000001*Math.random()).toString()}return {extend:function(b,a){var c=function(){};c.prototype=a.prototype;b.prototype=new c;b.prototype.constructor=b;b.uber=a.prototype;if(a.prototype.constructor===Object.prototype.constructor)a.prototype.constructor=a},setNamespace:function(b,a){if(a&&b&&!a[b])a[b]={}},unsetNamespace:function(b,a){if(a&&b&&a[b])delete a[b]},loadScript:function(f,g,h){if(f&&g){var l=window.document,d=i[f];if(!d){var e=l.createElement("script");e.type="text/javascript";d={loaded:a,pendingCallbacks:[g],timer:b};i[f]=d;var j=function(){if(d.timer!=b){clearTimeout(d.timer);delete d.timer}d.loaded=c;for(var e=d.pendingCallbacks.length,a=0;a1?d[d.length-1]:b;if(window.sessionStorage){var c=window.name.indexOf(l);if(c>-1){var e=window.name.indexOf(";",c);if(e==-1)e=window.name.length;var f=window.name.substring(c,e);if(a)window.sessionStorage.setItem(f,a);else a=window.sessionStorage.getItem(f)}}return a},getConversationId:function(){var c=window.location.search,a=b;if(c){var d=c.indexOf("&");a=d>0?c.substring(1,d):c.substr(1);if(a&&a.charAt(a.length-1)==="="){a=a.substring(0,a.length-1);if(a)a=decodeURIComponent(a)}}return a},validateParamObject:function(f,e){var b=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:a},{name:"expectedProperties",type:Object,mayBeNull:a},{name:"callback",type:Function,mayBeNull:c}]);if(b)throw b;for(var d in e){b=Function._validateParameter(f[d],e[d],d);if(b)throw b}},writeProfilerMark:function(a){if(window.msWriteProfilerMark){window.msWriteProfilerMark(a);OsfMsAjaxFactory.msAjaxDebug.trace(a)}},defineNondefaultProperty:function(e,f,a,b){a=a||{};for(var g in b){var d=b[g];if(a[d]==undefined)a[d]=c}Object.defineProperty(e,f,a);return e},defineNondefaultProperties:function(c,a,d){a=a||{};for(var b in a)OSF.OUtil.defineNondefaultProperty(c,b,a[b],d);return c},defineEnumerableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[d])},defineEnumerableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[d])},defineMutableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[f,d,g])},defineMutableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[f,d,g])},finalizeProperties:function(e,d){d=d||{};for(var g=Object.getOwnPropertyNames(e),i=g.length,f=0;f>2;a[1]=(f&3)<<4|d>>4;a[2]=(d&15)<<2|e>>6;a[3]=e&63;if(isNaN(d))a[2]=a[3]=64;else if(isNaN(e))a[3]=64;for(var g=0;g<4;g++)h.push(j.charAt(a[g]))}while(b0;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[d%16];d=Math.floor(d/16)}for(;b<32;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[Math.floor(Math.random()*16)]}return c}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.OfficeAppContext=function(q,m,i,h,k,n,j,l,p,e,o,g,f,s,r,d,c,b){var a=this;a._id=q;a._appName=m;a._appVersion=i;a._appUILocale=h;a._dataLocale=k;a._docUrl=n;a._clientMode=j;a._settings=l;a._reason=p;a._osfControlType=e;a._eToken=o;a._correlationId=g;a._appMinorVersion=d;a._requirementMatrix=c;a._appInstanceId=f;a._isDialog=false;a._dialogRequirementMatrix=b;a.get_id=function(){return this._id};a.get_appName=function(){return this._appName};a.get_appVersion=function(){return this._appVersion};a.get_appUILocale=function(){return this._appUILocale};a.get_dataLocale=function(){return this._dataLocale};a.get_docUrl=function(){return this._docUrl};a.get_clientMode=function(){return this._clientMode};a.get_bindings=function(){return this._bindings};a.get_settings=function(){return this._settings};a.get_reason=function(){return this._reason};a.get_osfControlType=function(){return this._osfControlType};a.get_eToken=function(){return this._eToken};a.get_correlationId=function(){return this._correlationId};a.get_appInstanceId=function(){return this._appInstanceId};a.get_appMinorVersion=function(){return this._appMinorVersion};a.get_requirementMatrix=function(){return this._requirementMatrix};a.get_isDialog=function(){return this._isDialog};a.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix}};OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);OSF.OUtil.setNamespace("Internal",Microsoft.Office);OSF.NamespaceManager=function(){var b,a=false;return {enableShortcut:function(){if(!a){if(window.Office)b=window.Office;else OSF.OUtil.setNamespace("Office",window);window.Office=Microsoft.Office.WebExtension;a=true}},disableShortcut:function(){if(a){if(b)window.Office=b;else OSF.OUtil.unsetNamespace("Office",window);a=false}}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened",Browser:"browser"};Microsoft.Office.WebExtension.ActiveView={Read:"read",Edit:"edit"};Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table",Image:"image"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.BindingType={Text:"text",Matrix:"matrix",Table:"table"};Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"};Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"};Microsoft.Office.WebExtension.EventType={DocumentSelectionChanged:"documentSelectionChanged",BindingSelectionChanged:"bindingSelectionChanged",BindingDataChanged:"bindingDataChanged",DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"};Microsoft.Office.Internal.EventType={OfficeThemeChanged:"officeThemeChanged",DocumentThemeChanged:"documentThemeChanged"};Microsoft.Office.WebExtension.AsyncResultStatus={Succeeded:"succeeded",Failed:"failed"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Id:"id",GoToType:"goToType",SelectionMode:"selectionMode",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",HostType:"hostType",PlatformType:"platformType",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",XFrameDenySafe:"xFrameDenySafe"};Microsoft.Office.Internal.Parameters={DocumentTheme:"documentTheme",OfficeTheme:"officeTheme"};Microsoft.Office.WebExtension.DefaultParameterValues={};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.OUtil.setNamespace("DispIdHost",OSF.DDA);OSF.DDA.DispIdHost.Methods={InvokeMethod:"invokeMethod",AddEventHandler:"addEventHandler",RemoveEventHandler:"removeEventHandler",OpenDialog:"openDialog",CloseDialog:"closeDialog",MessageParent:"messageParent"};OSF.DDA.DispIdHost.Delegates={ExecuteAsync:"executeAsync",RegisterEventAsync:"registerEventAsync",UnregisterEventAsync:"unregisterEventAsync",ParameterMap:"parameterMap",MessageParent:"messageParent"};OSF.OUtil.setNamespace("AsyncResultEnum",OSF.DDA);OSF.DDA.AsyncResultEnum.Properties={Context:"Context",Value:"Value",Status:"Status",Error:"Error"};OSF.DDA.AsyncResultEnum.ErrorProperties={Name:"Name",Message:"Message",Code:"Code"};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus",FileProperties:"FileProperties",FilePropertiesDescriptor:"FilePropertiesDescriptor",FileSliceProperties:"FileSliceProperties",Subset:"subset",BindingProperties:"BindingProperties",TableDataProperties:"TableDataProperties",DataPartProperties:"DataPartProperties",DataNodeProperties:"DataNodeProperties",MessageType:"messageType",MessageContent:"messageContent"};OSF.DDA.EventDescriptors={BindingSelectionChangedEvent:"BindingSelectionChangedEvent",DataNodeInsertedEvent:"DataNodeInsertedEvent",DataNodeReplacedEvent:"DataNodeReplacedEvent",DataNodeDeletedEvent:"DataNodeDeletedEvent",OfficeThemeChangedEvent:"OfficeThemeChangedEvent",DocumentThemeChangedEvent:"DocumentThemeChangedEvent",ActiveViewChangedEvent:"ActiveViewChangedEvent",AppCommandInvokedEvent:"AppCommandInvokedEvent",DialogMessageReceivedEvent:"DialogMessageReceivedEvent"};OSF.DDA.ListDescriptors={BindingList:"BindingList",DataPartList:"DataPartList",DataNodeList:"DataNodeList"};OSF.DDA.FileProperties={Handle:"FileHandle",FileSize:"FileSize",SliceSize:Microsoft.Office.WebExtension.Parameters.SliceSize};OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType,RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"};OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};OSF.DDA.DataPartProperties={Id:Microsoft.Office.WebExtension.Parameters.Id,BuiltIn:"DataPartBuiltIn"};OSF.DDA.DataNodeProperties={Handle:"DataNodeHandle",BaseName:"DataNodeBaseName",NamespaceUri:"DataNodeNamespaceUri",NodeType:"DataNodeType"};OSF.DDA.DataNodeEventProperties={OldNode:"OldNode",NewNode:"NewNode",NextSiblingNode:"NextSiblingNode",InUndoRedo:"InUndoRedo"};OSF.DDA.AsyncResultEnum.ErrorCode={Success:0,Failed:1};OSF.DialogMessageType={DialogMessageReceived:0,DialogClosed:12006};OSF.DDA.getXdmEventName=function(b,a){if(a==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||a==Microsoft.Office.WebExtension.EventType.BindingDataChanged)return b+"_"+a;else return a};var __extends=this.__extends||function(b,a){for(var c in a)if(a.hasOwnProperty(c))b[c]=a[c];function d(){this.constructor=b}d.prototype=a.prototype;b.prototype=new d},OfficeExt;(function(a){var b;(function(b){var a=1.1,d=function(){function a(a){this.isSetSupported=function(b,a){if(b==undefined)return false;if(a==undefined)a=0;var e=this._setMap,d=e._sets;if(d.hasOwnProperty(b.toLowerCase())){var c=d[b.toLowerCase()];return c>0&&c>=a}else return false};this._setMap=a}return a}();b.RequirementMatrix=d;var c=function(){function a(a){this._addSetMap=function(a){for(var b in a)this._sets[b]=a[b]};this._sets=a}return a}();b.DefaultSetRequirement=c;var t=function(c){__extends(b,c);function b(){c.call(this,{dialogapi:a})}return b}(c);b.DefaultDialogSetRequirement=t;var f=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a})}return b}(c);b.ExcelClientDefaultSetRequirement=f;var n=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({imagecoercion:a})}return b}(f);b.ExcelClientV2DefaultSetRequirement=n;var o=function(c){__extends(b,c);function b(){c.call(this,{mailbox:a})}return b}(c);b.OutlookClientDefaultSetRequirement=o;var k=function(c){__extends(b,c);function b(){c.call(this,{mailbox:a})}return b}(c);b.OutlookClientV1DefaultSetRequirement=k;var l=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.2})}return a}(c);b.OutlookClientV2DefaultSetRequirement=l;var m=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.3})}return a}(c);b.OutlookClientV3DefaultSetRequirement=m;var g=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,compressedfile:a,customxmlparts:a,documentevents:a,file:a,htmlcoercion:a,matrixbindings:a,matrixcoercion:a,ooxmlcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,textfile:a})}return b}(c);b.WordClientDefaultSetRequirement=g;var q=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({imagecoercion:a,pdffile:a})}return b}(g);b.WordClientV2DefaultSetRequirement=q;var e=function(c){__extends(b,c);function b(){c.call(this,{compressedfile:a,documentevents:a,file:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.PowerpointClientDefaultSetRequirement=e;var j=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({activeview:a,imagecoercion:a,pdffile:a})}return b}(e);b.PowerpointClientV2DefaultSetRequirement=j;var h=function(c){__extends(b,c);function b(){c.call(this,{selection:a,textcoercion:a})}return b}(c);b.ProjectClientDefaultSetRequirement=h;var i=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,file:a})}return b}(c);b.ExcelWebDefaultSetRequirement=i;var r=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({activeview:a})}return b}(i);b.ExcelWebV2DefaultSetRequirement=r;var s=function(c){__extends(b,c);function b(){c.call(this,{mailbox:a})}return b}(c);b.OutlookWebDefaultSetRequirement=s;var p=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.3})}return a}(c);b.OutlookWebV1DefaultSetRequirement=p;var u=function(){var b="undefined";function a(){}a.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)};a.getDefaultRequirementMatrix=function(f){this.initializeDefaultSetMatrix();var e=undefined,g=f.get_requirementMatrix();if(g!=undefined&&g.length>0&&typeof JSON!==b){var j=JSON.parse(f.get_requirementMatrix().toLowerCase());e=new d(new c(j))}else{var i=f.get_appVersion(),h=f.get_appName()+"-"+i;if(a.DefaultSetArrayMatrix!=undefined&&a.DefaultSetArrayMatrix[h]!=undefined)e=new d(a.DefaultSetArrayMatrix[h]);else e=new d(new c({}))}return e};a.getDialogDefaultRequirementMatrix=function(f){var a=undefined,e=f.get_dialogRequirementMatrix();if(e!=undefined&&e.length>0&&typeof JSON!==b){var g=JSON.parse(f.get_requirementMatrix().toLowerCase());a=new d(new c(g))}else a=new d(new t);return a};a.initializeDefaultSetMatrix=function(){a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1500]=new f;a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1501]=new f;a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1502]=new n;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1500]=new g;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1501]=new g;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1502]=new q;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1500]=new e;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1501]=new e;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1502]=new j;a.DefaultSetArrayMatrix[a.Outlook_RCLIENT_1500]=new o;a.DefaultSetArrayMatrix[a.Outlook_RCLIENT_1501]=new k;a.DefaultSetArrayMatrix[a.Outlook_RCLIENT_1502]=new l;a.DefaultSetArrayMatrix[a.Outlook_RCLIENT_1503]=new m;a.DefaultSetArrayMatrix[a.Excel_WAC_1500]=new i;a.DefaultSetArrayMatrix[a.Excel_WAC_1501]=new i;a.DefaultSetArrayMatrix[a.Excel_WAC_1502]=new r;a.DefaultSetArrayMatrix[a.Outlook_WAC_1500]=new s;a.DefaultSetArrayMatrix[a.Outlook_WAC_1501]=new p;a.DefaultSetArrayMatrix[a.Project_RCLIENT_1500]=new h;a.DefaultSetArrayMatrix[a.Project_RCLIENT_1501]=new h;a.DefaultSetArrayMatrix[a.Project_RCLIENT_1502]=new h;a.DefaultSetArrayMatrix[a.Excel_IOS_1500]=new f;a.DefaultSetArrayMatrix[a.Word_IOS_1500]=new g;a.DefaultSetArrayMatrix[a.PowerPoint_IOS_1500]=new e};a.Excel_RCLIENT_1500="1-15.00";a.Excel_RCLIENT_1501="1-15.01";a.Excel_RCLIENT_1502="1-15.02";a.Word_RCLIENT_1500="2-15.00";a.Word_RCLIENT_1501="2-15.01";a.Word_RCLIENT_1502="2-15.02";a.PowerPoint_RCLIENT_1500="4-15.00";a.PowerPoint_RCLIENT_1501="4-15.01";a.PowerPoint_RCLIENT_1502="4-15.02";a.Outlook_RCLIENT_1500="8-15.00";a.Outlook_RCLIENT_1501="8-15.01";a.Outlook_RCLIENT_1502="8-15.02";a.Outlook_RCLIENT_1503="8-15.03";a.Excel_WAC_1500="16-15.00";a.Excel_WAC_1501="16-15.01";a.Excel_WAC_1502="16-15.02";a.Outlook_WAC_1500="64-15.00";a.Outlook_WAC_1501="64-15.01";a.Project_RCLIENT_1500="128-15.00";a.Project_RCLIENT_1501="128-15.01";a.Project_RCLIENT_1502="128-15.02";a.Excel_IOS_1500="1024-15.00";a.Word_IOS_1500="4096-15.00";a.PowerPoint_IOS_1500="8192-15.00";a.DefaultSetArrayMatrix={};return a}();b.RequirementsMatrixFactory=u})(b=a.Requirement||(a.Requirement={}))})(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda();var OfficeExt;(function(a){var b;(function(a){var b=function(){var a=null;function b(){var b=this;b.getHost=function(d){var b=this.getFullHost(d);if(b){for(var e in this.platformPossibilities){var c=b.indexOf(e);if(c>=0){b=b.substring(0,c);return Microsoft.Office.WebExtension.HostType[b]||a}}return Microsoft.Office.WebExtension.HostType[b]||a}return a};b.getDiagnostics=function(a){var b={host:this.getHost(a),version:"15.0.0000.0000",platform:this.getPlatform(a)};return b};b.platformPossibilities={WebApp:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,Unsupported:a};b.getHost=b.getHost.bind(b);b.getDiagnostics=b.getDiagnostics.bind(b)}b.getInstance=function(){if(b.hostObj===undefined)b.hostObj=new b;return b.hostObj};b.prototype.getPlatform=function(d){var b=this.getFullHost(d);if(b===a)return a;var e=Microsoft.Office.WebExtension.PlatformType.PC;for(var c in this.platformPossibilities)if(b.indexOf(c)>=0)return this.platformPossibilities[c];return e};b.prototype.getFullHost=function(d){var b=a;for(var c in OSF.AppName)if(OSF.AppName[c]===d){b=c;break}return b};return b}();a.Host=b})(b=a.HostName||(a.HostName={}))})(OfficeExt||(OfficeExt={}));OSF.DDA.ErrorCodeManager=function(){var a={};return {getErrorArgs:function(b){return a[b]||a[this.errorCodes.ooeInternalError]},addErrorMessage:function(c,b){a[c]=b},errorCodes:{ooeSuccess:0,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022},initializeErrorMessages:function(b){a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:b.L_DataReadError,message:b.L_GetSelectionNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotMatchBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:b.L_DataReadError,message:b.L_InvalidGetRowColumnCounts};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:b.L_DataReadError,message:b.L_SelectionNotSupportCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:b.L_DataReadError,message:b.L_InvalidGetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:b.L_DataReadError,message:b.L_NonUniformPartialGetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:b.L_DataReadError,message:b.L_GetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:b.L_DataReadError,message:b.L_FileTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:b.L_DataWriteError,message:b.L_UnsupportedDataObject};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:b.L_DataWriteError,message:b.L_CannotWriteToSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:b.L_DataWriteError,message:b.L_DataNotMatchSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:b.L_DataWriteError,message:b.L_OverwriteWorksheetData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:b.L_DataWriteError,message:b.L_DataNotMatchBindingSize};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:b.L_DataWriteError,message:b.L_InvalidSetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:b.L_InvalidFormat,message:b.L_InvalidDataFormat};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:b.L_DataWriteError,message:b.L_SetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:b.L_DataWriteError,message:b.L_NonUniformPartialSetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:b.L_BindingCreationError,message:b.L_SelectionCannotBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:b.L_InvalidBindingError,message:b.L_BindingNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:b.L_BindingCreationError,message:b.L_BindingToMultipleSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidSelectionForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnThisBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:b.L_BindingCreationError,message:b.L_NamedItemNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:b.L_BindingCreationError,message:b.L_MultipleNamedItemFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidNamedItemForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:b.L_InvalidBinding,message:b.L_UnknownBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnMatrixData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:b.L_ReadSettingsError,message:b.L_SettingNameNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:b.L_SaveSettingsError,message:b.L_SettingsCannotSave};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:b.L_SettingsStaleError,message:b.L_SettingsAreStale};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:b.L_HostError,message:b.L_OperationNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:b.L_InternalError,message:b.L_InternalErrorDescription};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:b.L_PermissionDenied,message:b.L_DocumentReadOnly};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:b.L_EventRegistrationError,message:b.L_EventHandlerNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:b.L_InvalidAPICall,message:b.L_InvalidApiCallInContext};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:b.L_ShuttingDown,message:b.L_ShuttingDown};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:b.L_UnsupportedEnumeration,message:b.L_UnsupportedEnumerationMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:b.L_InvalidNode,message:b.L_CustomXmlNodeNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:b.L_CustomXmlError,message:b.L_CustomXmlError};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:b.L_CannotNavigateTo,message:b.L_CannotNavigateTo};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:b.L_SpecifiedIdNotExist,message:b.L_SpecifiedIdNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:b.L_NavOutOfBound,message:b.L_NavOutOfBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:b.L_MissingParameter,message:b.L_ElementMissing};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:b.L_InvalidValue,message:b.L_InvalidCellsValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:b.L_InvalidValue,message:b.L_InvalidTableOptionValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:b.L_InvalidValue,message:b.L_InvalidFormatValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_RowIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_ColIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:b.L_OutOfRange,message:b.L_FormatValueOutOfRange}}}}();OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMethodMax:143,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidAppCommandInvokedEvent:39,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Common",Microsoft.Office);Microsoft.Office.Common.InvokeType={async:0,sync:1,asyncRegisterEvent:2,asyncUnregisterEvent:3,syncRegisterEvent:4,syncUnregisterEvent:5};Microsoft.Office.Common.InvokeResultCode={noError:0,errorInRequest:-1,errorHandlingRequest:-2,errorInResponse:-3,errorHandlingResponse:-4,errorHandlingRequestAccessDenied:-5,errorHandlingMethodCallTimedout:-6};Microsoft.Office.Common.MessageType={request:0,response:1};Microsoft.Office.Common.ActionType={invoke:0,registerEvent:1,unregisterEvent:2};Microsoft.Office.Common.ResponseType={forCalling:0,forEventing:1};Microsoft.Office.Common.MethodObject=function(c,b,a){this._method=c;this._invokeType=b;this._blockingOthers=a};Microsoft.Office.Common.MethodObject.prototype={getMethod:function(){return this._method},getInvokeType:function(){return this._invokeType},getBlockingFlag:function(){return this._blockingOthers}};Microsoft.Office.Common.EventMethodObject=function(b,a){this._registerMethodObject=b;this._unregisterMethodObject=a};Microsoft.Office.Common.EventMethodObject.prototype={getRegisterMethodObject:function(){return this._registerMethodObject},getUnregisterMethodObject:function(){return this._unregisterMethodObject}};Microsoft.Office.Common.ServiceEndPoint=function(c){var a=this,b=Function._validateParams(arguments,[{name:"serviceEndPointId",type:String,mayBeNull:false}]);if(b)throw b;a._methodObjectList={};a._eventHandlerProxyList={};a._Id=c;a._conversations={};a._policyManager=null};Microsoft.Office.Common.ServiceEndPoint.prototype={registerMethod:function(g,h,b,e){var c="invokeType",a=false,d=Function._validateParams(arguments,[{name:"methodName",type:String,mayBeNull:a},{name:"method",type:Function,mayBeNull:a},{name:c,type:Number,mayBeNull:a},{name:"blockingOthers",type:Boolean,mayBeNull:a}]);if(d)throw d;if(b!==Microsoft.Office.Common.InvokeType.async&&b!==Microsoft.Office.Common.InvokeType.sync)throw OsfMsAjaxFactory.msAjaxError.argument(c);var f=new Microsoft.Office.Common.MethodObject(h,b,e);this._methodObjectList[g]=f},unregisterMethod:function(b){var a=Function._validateParams(arguments,[{name:"methodName",type:String,mayBeNull:false}]);if(a)throw a;delete this._methodObjectList[b]},registerEvent:function(f,d,c){var a=false,b=Function._validateParams(arguments,[{name:"eventName",type:String,mayBeNull:a},{name:"registerMethod",type:Function,mayBeNull:a},{name:"unregisterMethod",type:Function,mayBeNull:a}]);if(b)throw b;var e=new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(d,Microsoft.Office.Common.InvokeType.syncRegisterEvent,a),new Microsoft.Office.Common.MethodObject(c,Microsoft.Office.Common.InvokeType.syncUnregisterEvent,a));this._methodObjectList[f]=e},registerEventEx:function(h,f,d,e,c){var a=false,b=Function._validateParams(arguments,[{name:"eventName",type:String,mayBeNull:a},{name:"registerMethod",type:Function,mayBeNull:a},{name:"registerMethodInvokeType",type:Number,mayBeNull:a},{name:"unregisterMethod",type:Function,mayBeNull:a},{name:"unregisterMethodInvokeType",type:Number,mayBeNull:a}]);if(b)throw b;var g=new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(f,d,a),new Microsoft.Office.Common.MethodObject(e,c,a));this._methodObjectList[h]=g},unregisterEvent:function(b){var a=Function._validateParams(arguments,[{name:"eventName",type:String,mayBeNull:false}]);if(a)throw a;this.unregisterMethod(b)},registerConversation:function(b){var a=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:false}]);if(a)throw a;this._conversations[b]=true},unregisterConversation:function(b){var a=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:false}]);if(a)throw a;delete this._conversations[b]},setPolicyManager:function(a){var b="policyManager",c=Function._validateParams(arguments,[{name:b,type:Object,mayBeNull:false}]);if(c)throw c;if(!a.checkPermission)throw OsfMsAjaxFactory.msAjaxError.argument(b);this._policyManager=a},getPolicyManager:function(){return this._policyManager}};Microsoft.Office.Common.ClientEndPoint=function(e,b,f){var c="targetWindow",a=this,d=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:false},{name:c,mayBeNull:false},{name:"targetUrl",type:String,mayBeNull:false}]);if(d)throw d;if(!b.postMessage)throw OsfMsAjaxFactory.msAjaxError.argument(c);a._conversationId=e;a._targetWindow=b;a._targetUrl=f;a._callingIndex=0;a._callbackList={};a._eventHandlerList={}};Microsoft.Office.Common.ClientEndPoint.prototype={invoke:function(h,d,b){var a=this,g=Function._validateParams(arguments,[{name:"targetMethodName",type:String,mayBeNull:false},{name:"callback",type:Function,mayBeNull:true},{name:"param",mayBeNull:true}]);if(g)throw g;var c=a._callingIndex++,k=new Date,e={callback:d,createdOn:k.getTime()};if(b&&typeof b==="object"&&typeof b.__timeout__==="number"){e.timeout=b.__timeout__;delete b.__timeout__}a._callbackList[c]=e;try{var i=new Microsoft.Office.Common.Request(h,Microsoft.Office.Common.ActionType.invoke,a._conversationId,c,b),j=Microsoft.Office.Common.MessagePackager.envelope(i);a._targetWindow.postMessage(j,a._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer()}catch(f){try{d!==null&&d(Microsoft.Office.Common.InvokeResultCode.errorInRequest,f)}finally{delete a._callbackList[c]}}},registerForEvent:function(d,g,c,i){var a=this,f=Function._validateParams(arguments,[{name:"targetEventName",type:String,mayBeNull:false},{name:"eventHandler",type:Function,mayBeNull:false},{name:"callback",type:Function,mayBeNull:true},{name:"data",mayBeNull:true,optional:true}]);if(f)throw f;var b=a._callingIndex++,k=new Date;a._callbackList[b]={callback:c,createdOn:k.getTime()};try{var h=new Microsoft.Office.Common.Request(d,Microsoft.Office.Common.ActionType.registerEvent,a._conversationId,b,i),j=Microsoft.Office.Common.MessagePackager.envelope(h);a._targetWindow.postMessage(j,a._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer();a._eventHandlerList[d]=g}catch(e){try{c!==null&&c(Microsoft.Office.Common.InvokeResultCode.errorInRequest,e)}finally{delete a._callbackList[b]}}},unregisterForEvent:function(d,c,h){var a=this,f=Function._validateParams(arguments,[{name:"targetEventName",type:String,mayBeNull:false},{name:"callback",type:Function,mayBeNull:true},{name:"data",mayBeNull:true,optional:true}]);if(f)throw f;var b=a._callingIndex++,j=new Date;a._callbackList[b]={callback:c,createdOn:j.getTime()};try{var g=new Microsoft.Office.Common.Request(d,Microsoft.Office.Common.ActionType.unregisterEvent,a._conversationId,b,h),i=Microsoft.Office.Common.MessagePackager.envelope(g);a._targetWindow.postMessage(i,a._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer()}catch(e){try{c!==null&&c(Microsoft.Office.Common.InvokeResultCode.errorInRequest,e)}finally{delete a._callbackList[b]}}finally{delete a._eventHandlerList[d]}}};Microsoft.Office.Common.XdmCommunicationManager=function(){var i="channel is not ready.",c="conversationId",h="Unknown conversation Id.",b=false,a=null,k=[],e=a,v=10,j=b,f=a,o=2e3,l=6e4,g={},d={},m=b;function p(b){for(var a in g)if(g[a]._conversations[b])return g[a];OsfMsAjaxFactory.msAjaxDebug.trace(h);throw OsfMsAjaxFactory.msAjaxError.argument(c)}function q(b){var a=d[b];if(!a){OsfMsAjaxFactory.msAjaxDebug.trace(h);throw OsfMsAjaxFactory.msAjaxError.argument(c)}return a}function t(e,c){var b=e._methodObjectList[c._actionName];if(!b){OsfMsAjaxFactory.msAjaxDebug.trace("The specified method is not registered on service endpoint:"+c._actionName);throw OsfMsAjaxFactory.msAjaxError.argument("messageObject")}var d=a;if(c._actionType===Microsoft.Office.Common.ActionType.invoke)d=b;else if(c._actionType===Microsoft.Office.Common.ActionType.registerEvent)d=b.getRegisterMethodObject();else d=b.getUnregisterMethodObject();return d}function x(a){k.push(a)}function w(){if(e!==a){if(!j)if(k.length>0){var b=k.shift();j=b.getInvokeBlockingFlag();b.invoke()}else{clearInterval(e);e=a}}else OsfMsAjaxFactory.msAjaxDebug.trace(i)}function s(){if(f){var c,e=0,k=new Date,h;for(var j in d){c=d[j];for(var g in c._callbackList){var b=c._callbackList[g];h=b.timeout?b.timeout:l;if(Math.abs(k.getTime()-b.createdOn)>=h)try{b.callback&&b.callback(Microsoft.Office.Common.InvokeResultCode.errorHandlingMethodCallTimedout,a)}finally{delete c._callbackList[g]}else e++}}if(e===0){clearInterval(f);f=a}}else OsfMsAjaxFactory.msAjaxDebug.trace(i)}function r(){j=b}function u(a){if(window.addEventListener)window.addEventListener("message",a,b);else if(navigator.userAgent.indexOf("MSIE")>-1&&window.attachEvent)window.attachEvent("onmessage",a);else{OsfMsAjaxFactory.msAjaxDebug.trace("Browser doesn't support the required API.");throw OsfMsAjaxFactory.msAjaxError.argument("Browser")}}function y(c){var d="Access Denied";if(c.data!=""){var b;try{b=Microsoft.Office.Common.MessagePackager.unenvelope(c.data)}catch(f){return}if(typeof b._messageType=="undefined")return;if(b._messageType===Microsoft.Office.Common.MessageType.request){var l=c.origin==a||c.origin=="null"?b._origin:c.origin;try{var g=p(b._conversationId),k=g.getPolicyManager();if(k&&!k.checkPermission(b._conversationId,b._actionName,b._data))throw d;var u=t(g,b),n=new Microsoft.Office.Common.InvokeCompleteCallback(c.source,l,b._actionName,b._conversationId,b._correlationId,r),y=new Microsoft.Office.Common.Invoker(u,b._data,n,g._eventHandlerProxyList,b._conversationId,b._actionName);if(e==a)e=setInterval(w,v);x(y)}catch(f){var m=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequest;if(f==d)m=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied;var s=new Microsoft.Office.Common.Response(b._actionName,b._conversationId,b._correlationId,m,Microsoft.Office.Common.ResponseType.forCalling,f),o=Microsoft.Office.Common.MessagePackager.envelope(s);c.source&&c.source.postMessage&&c.source.postMessage(o,l)}}else if(b._messageType===Microsoft.Office.Common.MessageType.response){var h=q(b._conversationId);if(b._responseType===Microsoft.Office.Common.ResponseType.forCalling){var i=h._callbackList[b._correlationId];if(i)try{i.callback&&i.callback(b._errorCode,b._data)}finally{delete h._callbackList[b._correlationId]}}else{var j=h._eventHandlerList[b._actionName];j!==undefined&&j!==a&&j(b._data)}}else return}}function n(){if(!m){u(y);m=true}}return {connect:function(b,c,e){var a=d[b];if(!a){n();a=new Microsoft.Office.Common.ClientEndPoint(b,c,e);d[b]=a}return a},getClientEndPoint:function(e){var a=Function._validateParams(arguments,[{name:c,type:String,mayBeNull:b}]);if(a)throw a;return d[e]},createServiceEndPoint:function(a){n();var b=new Microsoft.Office.Common.ServiceEndPoint(a);g[a]=b;return b},getServiceEndPoint:function(c){var a=Function._validateParams(arguments,[{name:"serviceEndPointId",type:String,mayBeNull:b}]);if(a)throw a;return g[c]},deleteClientEndPoint:function(e){var a=Function._validateParams(arguments,[{name:c,type:String,mayBeNull:b}]);if(a)throw a;delete d[e]},_setMethodTimeout:function(a){var c=Function._validateParams(arguments,[{name:"methodTimeout",type:Number,mayBeNull:b}]);if(c)throw c;l=a<=0?6e4:a},_startMethodTimeoutTimer:function(){if(!f)f=setInterval(s,o)}}}();Microsoft.Office.Common.Message=function(g,h,e,f,c){var b=false,a=this,d=Function._validateParams(arguments,[{name:"messageType",type:Number,mayBeNull:b},{name:"actionName",type:String,mayBeNull:b},{name:"conversationId",type:String,mayBeNull:b},{name:"correlationId",mayBeNull:b},{name:"data",mayBeNull:true,optional:true}]);if(d)throw d;a._messageType=g;a._actionName=h;a._conversationId=e;a._correlationId=f;a._origin=window.location.href;if(typeof c=="undefined")a._data=null;else a._data=c};Microsoft.Office.Common.Message.prototype={getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getOrigin:function(){return this._origin},getData:function(){return this._data},getMessageType:function(){return this._messageType}};Microsoft.Office.Common.Request=function(c,d,a,b,e){Microsoft.Office.Common.Request.uber.constructor.call(this,Microsoft.Office.Common.MessageType.request,c,a,b,e);this._actionType=d};OSF.OUtil.extend(Microsoft.Office.Common.Request,Microsoft.Office.Common.Message);Microsoft.Office.Common.Request.prototype.getActionType=function(){return this._actionType};Microsoft.Office.Common.Response=function(d,a,b,e,c,f){Microsoft.Office.Common.Response.uber.constructor.call(this,Microsoft.Office.Common.MessageType.response,d,a,b,f);this._errorCode=e;this._responseType=c};OSF.OUtil.extend(Microsoft.Office.Common.Response,Microsoft.Office.Common.Message);Microsoft.Office.Common.Response.prototype.getErrorCode=function(){return this._errorCode};Microsoft.Office.Common.Response.prototype.getResponseType=function(){return this._responseType};Microsoft.Office.Common.MessagePackager={envelope:function(a){return OsfMsAjaxFactory.msAjaxSerializer.serialize(a)},unenvelope:function(a){return OsfMsAjaxFactory.msAjaxSerializer.deserialize(a,true)}};Microsoft.Office.Common.ResponseSender=function(e,h,j,f,g,i){var c=false,a=this,d=Function._validateParams(arguments,[{name:"requesterWindow",mayBeNull:c},{name:"requesterUrl",type:String,mayBeNull:c},{name:"actionName",type:String,mayBeNull:c},{name:"conversationId",type:String,mayBeNull:c},{name:"correlationId",mayBeNull:c},{name:"responsetype",type:Number,maybeNull:c}]);if(d)throw d;a._requesterWindow=e;a._requesterUrl=h;a._actionName=j;a._conversationId=f;a._correlationId=g;a._invokeResultCode=Microsoft.Office.Common.InvokeResultCode.noError;a._responseType=i;var b=a;a._send=function(d){var c=new Microsoft.Office.Common.Response(b._actionName,b._conversationId,b._correlationId,b._invokeResultCode,b._responseType,d),a=Microsoft.Office.Common.MessagePackager.envelope(c);b._requesterWindow.postMessage(a,b._requesterUrl)}};Microsoft.Office.Common.ResponseSender.prototype={getRequesterWindow:function(){return this._requesterWindow},getRequesterUrl:function(){return this._requesterUrl},getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getSend:function(){return this._send},setResultCode:function(a){this._invokeResultCode=a}};Microsoft.Office.Common.InvokeCompleteCallback=function(d,g,h,e,f,c){var b=this;Microsoft.Office.Common.InvokeCompleteCallback.uber.constructor.call(b,d,g,h,e,f,Microsoft.Office.Common.ResponseType.forCalling);b._postCallbackHandler=c;var a=b;b._send=function(d){var c=new Microsoft.Office.Common.Response(a._actionName,a._conversationId,a._correlationId,a._invokeResultCode,a._responseType,d),b=Microsoft.Office.Common.MessagePackager.envelope(c);a._requesterWindow.postMessage(b,a._requesterUrl);a._postCallbackHandler()}};OSF.OUtil.extend(Microsoft.Office.Common.InvokeCompleteCallback,Microsoft.Office.Common.ResponseSender);Microsoft.Office.Common.Invoker=function(g,h,d,e,f,i){var b=false,a=this,c=Function._validateParams(arguments,[{name:"methodObject",mayBeNull:b},{name:"paramValue",mayBeNull:true},{name:"invokeCompleteCallback",mayBeNull:b},{name:"eventHandlerProxyList",mayBeNull:true},{name:"conversationId",type:String,mayBeNull:b},{name:"eventName",type:String,mayBeNull:b}]);if(c)throw c;a._methodObject=g;a._param=h;a._invokeCompleteCallback=d;a._eventHandlerProxyList=e;a._conversationId=f;a._eventName=i};Microsoft.Office.Common.Invoker.prototype={invoke:function(){var a=this;try{var b;switch(a._methodObject.getInvokeType()){case Microsoft.Office.Common.InvokeType.async:a._methodObject.getMethod()(a._param,a._invokeCompleteCallback.getSend());break;case Microsoft.Office.Common.InvokeType.sync:b=a._methodObject.getMethod()(a._param);a._invokeCompleteCallback.getSend()(b);break;case Microsoft.Office.Common.InvokeType.syncRegisterEvent:var d=a._createEventHandlerProxyObject(a._invokeCompleteCallback);b=a._methodObject.getMethod()(d.getSend(),a._param);a._eventHandlerProxyList[a._conversationId+a._eventName]=d.getSend();a._invokeCompleteCallback.getSend()(b);break;case Microsoft.Office.Common.InvokeType.syncUnregisterEvent:var g=a._eventHandlerProxyList[a._conversationId+a._eventName];b=a._methodObject.getMethod()(g,a._param);delete a._eventHandlerProxyList[a._conversationId+a._eventName];a._invokeCompleteCallback.getSend()(b);break;case Microsoft.Office.Common.InvokeType.asyncRegisterEvent:var c=a._createEventHandlerProxyObject(a._invokeCompleteCallback);a._methodObject.getMethod()(c.getSend(),a._invokeCompleteCallback.getSend(),a._param);a._eventHandlerProxyList[a._callerId+a._eventName]=c.getSend();break;case Microsoft.Office.Common.InvokeType.asyncUnregisterEvent:var f=a._eventHandlerProxyList[a._callerId+a._eventName];a._methodObject.getMethod()(f,a._invokeCompleteCallback.getSend(),a._param);delete a._eventHandlerProxyList[a._callerId+a._eventName]}}catch(e){a._invokeCompleteCallback.setResultCode(Microsoft.Office.Common.InvokeResultCode.errorInResponse);a._invokeCompleteCallback.getSend()(e)}},getInvokeBlockingFlag:function(){return this._methodObject.getBlockingFlag()},_createEventHandlerProxyObject:function(a){return new Microsoft.Office.Common.ResponseSender(a.getRequesterWindow(),a.getRequesterUrl(),a.getActionName(),a.getConversationId(),a.getCorrelationId(),Microsoft.Office.Common.ResponseType.forEventing)}};OSF.EventDispatch=function(b){var a=this;a._eventHandlers={};a._queuedEventsArgs={};for(var d in b){var c=b[d];a._eventHandlers[c]=[];a._queuedEventsArgs[c]=[]}};OSF.EventDispatch.prototype={getSupportedEvents:function(){var a=[];for(var b in this._eventHandlers)a.push(b);return a},supportsEvent:function(c){var a=false;for(var b in this._eventHandlers)if(c==b){a=true;break}return a},hasEventHandler:function(b,c){var a=this._eventHandlers[b];if(a&&a.length>0)for(var d in a)if(a[d]===c)return true;return false},addEventHandler:function(b,a){if(typeof a!="function")return false;var c=this._eventHandlers[b];if(c&&!this.hasEventHandler(b,a)){c.push(a);return true}else return false},addEventHandlerAndFireQueuedEvent:function(a,e){var d=this._eventHandlers[a],c=d.length==0,b=this.addEventHandler(a,e);c&&b&&this.fireQueuedEvent(a);return b},removeEventHandler:function(c,d){var a=this._eventHandlers[c];if(a&&a.length>0)for(var b=0;b0){var d=b[0];while(c.length>0){var e=c.shift();d(e)}return true}}return false}};OSF.DDA.DataCoercion=function(){var a=null;return {findArrayDimensionality:function(c){if(OSF.OUtil.isArray(c)){for(var b=0,a=0;a6&&a.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&a.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix){b=new Date(parseInt(a.slice(5,-1)));if(b)return b}return a});else a=Sys.Serialization.JavaScriptSerializer.deserialize(a,true);d[c]=a}catch(e){}}return d}};OSF.DDA.OMFactory={manufactureBinding:function(a,c){var d=a[OSF.DDA.BindingProperties.Id],g=a[OSF.DDA.BindingProperties.RowCount],f=a[OSF.DDA.BindingProperties.ColumnCount],h=a[OSF.DDA.BindingProperties.HasHeaders],b;switch(a[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:b=new OSF.DDA.TextBinding(d,c);break;case Microsoft.Office.WebExtension.BindingType.Matrix:b=new OSF.DDA.MatrixBinding(d,c,g,f);break;case Microsoft.Office.WebExtension.BindingType.Table:var i=function(){return OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument},e;if(i()&&OSF.DDA.ExcelTableBinding)e=OSF.DDA.ExcelTableBinding;else e=OSF.DDA.TableBinding;b=new e(d,c,g,f,h);break;default:b=new OSF.DDA.UnknownBinding(d,c)}return b},manufactureTableData:function(a){return new Microsoft.Office.WebExtension.TableData(a[OSF.DDA.TableDataProperties.TableRows],a[OSF.DDA.TableDataProperties.TableHeaders])},manufactureDataNode:function(a){if(a)return new OSF.DDA.CustomXmlNode(a[OSF.DDA.DataNodeProperties.Handle],a[OSF.DDA.DataNodeProperties.NodeType],a[OSF.DDA.DataNodeProperties.NamespaceUri],a[OSF.DDA.DataNodeProperties.BaseName])},manufactureDataPart:function(a,b){return new OSF.DDA.CustomXmlPart(b,a[OSF.DDA.DataPartProperties.Id],a[OSF.DDA.DataPartProperties.BuiltIn])},manufactureEventArgs:function(e,c,a){var d=this,b;switch(e){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:b=new OSF.DDA.DocumentSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:b=new OSF.DDA.BindingSelectionChangedEventArgs(d.manufactureBinding(a,c.document),a[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:b=new OSF.DDA.BindingDataChangedEventArgs(d.manufactureBinding(a,c.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:b=new OSF.DDA.SettingsChangedEventArgs(c);break;case Microsoft.Office.Internal.EventType.OfficeThemeChanged:b=new OSF.DDA.OfficeThemeChangedEventArgs(a);break;case Microsoft.Office.Internal.EventType.DocumentThemeChanged:b=new OSF.DDA.DocumentThemeChangedEventArgs(a);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:b=new OSF.DDA.ActiveViewChangedEventArgs(a);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:b=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(a);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:b=new OSF.DDA.NodeInsertedEventArgs(d.manufactureDataNode(a[OSF.DDA.DataNodeEventProperties.NewNode]),a[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:b=new OSF.DDA.NodeReplacedEventArgs(d.manufactureDataNode(a[OSF.DDA.DataNodeEventProperties.OldNode]),d.manufactureDataNode(a[OSF.DDA.DataNodeEventProperties.NewNode]),a[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:b=new OSF.DDA.NodeDeletedEventArgs(d.manufactureDataNode(a[OSF.DDA.DataNodeEventProperties.OldNode]),d.manufactureDataNode(a[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),a[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:b=new OSF.DDA.TaskSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:b=new OSF.DDA.ResourceSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:b=new OSF.DDA.ViewSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:b=new OSF.DDA.DialogEventArgs(a);break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e))}return b}};OSF.DDA.UI={};OSF.DDA.UI.ParentUI=function(){var c=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived]),b=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,a=this;!a[b]&&OSF.OUtil.defineEnumerableProperty(a,b,{value:function(){var b=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];b(arguments,c,a)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(){var b=OSF.DDA.SyncMethodNames.MessageParent.displayName,a=this;!a[b]&&OSF.OUtil.defineEnumerableProperty(a,b,{value:function(){var b=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return b(arguments,a)}});OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(a){if(a[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived)OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:a[OSF.DDA.PropertyDescriptors.MessageContent]}});else OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:a[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.ListType=function(){var a={};a[OSF.DDA.ListDescriptors.BindingList]=OSF.DDA.PropertyDescriptors.BindingProperties;a[OSF.DDA.ListDescriptors.DataPartList]=OSF.DDA.PropertyDescriptors.DataPartProperties;a[OSF.DDA.ListDescriptors.DataNodeList]=OSF.DDA.PropertyDescriptors.DataNodeProperties;return {isListType:function(b){return OSF.OUtil.listContainsKey(a,b)},getDescriptor:function(b){return a[b]}}}();OSF.DDA.ApiMethodCall=function(c,f,e,g,h){var a=this,d=c.length,b=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,h)});a.verifyArguments=function(d,f){for(var e in d){var a=d[e],c=f[e];if(a["enum"])switch(typeof c){case "string":if(OSF.OUtil.listContainsValue(a["enum"],c))break;case "undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw b()}if(a["types"])if(!OSF.OUtil.listContainsValue(a["types"],typeof c))throw b()}};a.extractRequiredArguments=function(g,l,j){if(g.lengthc+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var d,f,i=h.length-1;i>=c;i--){var g=h[i];switch(typeof g){case "object":if(d)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else d=g;break;case a:if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else f=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}d=b.fillOptions(d,j,l,k);if(f)if(d[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else d[Microsoft.Office.WebExtension.Parameters.Callback]=f;b.verifyArguments(e,d);return d}this.verifyAndExtractCall=function(e,c,a){var d=b.extractRequiredArguments(e,c,a),g=h(e,d,c,a),f=b.constructCallArgs(d,g,c,a);return f};this.processResponse=function(c,b,d,e){var a;if(c==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)if(f)a=f(b,d,e);else a=b;else if(g)a=g(c,b);else a=OSF.DDA.ErrorCodeManager.getErrorArgs(c);return a};this.getCallArgs=function(g){for(var b,d,f=g.length-1;f>=c;f--){var e=g[f];switch(typeof e){case "object":b=e;break;case a:d=e}}b=b||{};if(d)b[Microsoft.Office.WebExtension.Parameters.Callback]=d;return b}};OSF.DDA.SyncMethodCall=function(b,c,f,g,h){var d=b.length,a=new OSF.DDA.ApiMethodCall(b,c,f,g,h);function e(e,h,j,i){if(e.length>d+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var b,k,f=e.length-1;f>=d;f--){var g=e[f];switch(typeof g){case "object":if(b)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else b=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}b=a.fillOptions(b,h,j,i);a.verifyArguments(c,b);return b}this.verifyAndExtractCall=function(f,c,b){var d=a.extractRequiredArguments(f,c,b),h=e(f,d,c,b),g=a.constructCallArgs(d,h,c,b);return g}};OSF.DDA.ConvertToDocumentTheme=function(f){var b=false,a=true;for(var d=[{name:"primaryFontColor",needToConvertToHex:a},{name:"primaryBackgroundColor",needToConvertToHex:a},{name:"secondaryFontColor",needToConvertToHex:a},{name:"secondaryBackgroundColor",needToConvertToHex:a},{name:"accent1",needToConvertToHex:a},{name:"accent2",needToConvertToHex:a},{name:"accent3",needToConvertToHex:a},{name:"accent4",needToConvertToHex:a},{name:"accent5",needToConvertToHex:a},{name:"accent6",needToConvertToHex:a},{name:"hyperlink",needToConvertToHex:a},{name:"followedHyperlink",needToConvertToHex:a},{name:"headerLatinFont",needToConvertToHex:b},{name:"headerEastAsianFont",needToConvertToHex:b},{name:"headerScriptFont",needToConvertToHex:b},{name:"headerLocalizedFont",needToConvertToHex:b},{name:"bodyLatinFont",needToConvertToHex:b},{name:"bodyEastAsianFont",needToConvertToHex:b},{name:"bodyScriptFont",needToConvertToHex:b},{name:"bodyLocalizedFont",needToConvertToHex:b}],e={},c=0;c=d.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;a[OSF.DDA.FileSliceOffset]=parseInt(b*c[OSF.DDA.FileProperties.SliceSize]);return a},onSucceeded:function(a,d,c){var b={};OSF.OUtil.defineEnumerableProperties(b,{data:{value:a[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:c[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:a[OSF.DDA.FileProperties.SliceSize]}});return b}});a({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(b,a){return a[OSF.DDA.FileProperties.Handle]}}]});a({method:OSF.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[b],calculate:OSF.DDA.generateBindingId}}],privateStateCallbacks:[],onSucceeded:j});a({method:OSF.DDA.AsyncMethodNames.AddFromPromptAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[b],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.PromptText,value:{types:[b],calculate:function(){return Strings.OfficeOM.L_AddBindingFromPromptDefaultText}}}],privateStateCallbacks:[],onSucceeded:j});a({method:OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:[b]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[b],calculate:OSF.DDA.generateBindingId}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return k}}],onSucceeded:j});a({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(a){return OSF.OUtil.mapList(a[OSF.DDA.ListDescriptors.BindingList],j)}});a({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[b]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:j});a({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[b]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(d,a,b){var c=b[Microsoft.Office.WebExtension.Parameters.Id];delete a._eventDispatches[c]}});a({method:OSF.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(b,a){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(a.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[c],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[c],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:[c],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:[c],defaultValue:0}}],checkCallArgs:function(a,b){if(a[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&a[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&a[Microsoft.Office.WebExtension.Parameters.RowCount]==0&&a[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0){delete a[Microsoft.Office.WebExtension.Parameters.StartRow];delete a[Microsoft.Office.WebExtension.Parameters.StartColumn];delete a[Microsoft.Office.WebExtension.Parameters.RowCount];delete a[Microsoft.Office.WebExtension.Parameters.ColumnCount]}if(a[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(b.type)&&(a[Microsoft.Office.WebExtension.Parameters.StartRow]||a[Microsoft.Office.WebExtension.Parameters.StartColumn]||a[Microsoft.Office.WebExtension.Parameters.RowCount]||a[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return a},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}],onSucceeded:g});a({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[b,f,c,d]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(a){return OSF.DDA.DataCoercion.determineCoercionType(a[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[c],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[c],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:[f],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:[f],defaultValue:[]}}],checkCallArgs:function(a,c){var b=Microsoft.Office.WebExtension.Parameters;if(a[b.StartRow]==0&&a[b.StartColumn]==0&&OSF.OUtil.isArray(a[b.CellFormat])&&a[b.CellFormat].length===0&&OSF.OUtil.isArray(a[b.TableOptions])&&a[b.TableOptions].length===0){delete a[b.StartRow];delete a[b.StartColumn];delete a[b.CellFormat];delete a[b.TableOptions]}if(a[b.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(c.type)&&(a[b.StartRow]&&a[b.StartRow]!=0||a[b.StartColumn]&&a[b.StartColumn]!=0||a[b.CellFormat]||a[b.TableOptions]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return a},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]});a({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[f]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]});a({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[f]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]});a({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]});a({method:OSF.DDA.AsyncMethodNames.ClearFormatsAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]});a({method:OSF.DDA.AsyncMethodNames.SetTableOptionsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TableOptions,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]});a({method:OSF.DDA.AsyncMethodNames.SetFormatsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CellFormat,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]});a({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(a){var b=a[OSF.DDA.SettingsManager.SerializedSettings],c=OSF.DDA.SettingsManager.deserializeSettings(b);return c}});a({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:[d],defaultValue:k}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(b,a){return OSF.DDA.SettingsManager.serializeSettings(a)}}]});a({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:[o]}],supportedOptions:[],privateStateCallbacks:[]});a({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:[o],defaultValue:null}}],privateStateCallbacks:[]});a({method:OSF.DDA.AsyncMethodNames.GetDocumentThemeAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:OSF.DDA.ConvertToDocumentTheme});a({method:OSF.DDA.AsyncMethodNames.GetOfficeThemeAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:OSF.DDA.ConvertToOfficeTheme});a({method:OSF.DDA.AsyncMethodNames.GetActiveViewAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(b){var a=b[Microsoft.Office.WebExtension.Parameters.ActiveView];return a==undefined?null:a}});a({method:OSF.DDA.AsyncMethodNames.AddDataPartAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Xml,types:[b]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:l});a({method:OSF.DDA.AsyncMethodNames.GetDataPartByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[b]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:l});a({method:OSF.DDA.AsyncMethodNames.GetDataPartsByNameSpaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[b]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(a){return OSF.OUtil.mapList(a[OSF.DDA.ListDescriptors.DataPartList],l)}});a({method:OSF.DDA.AsyncMethodNames.DeleteDataPartAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:e}]});a({method:OSF.DDA.AsyncMethodNames.GetPartNodesAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.XPath,types:[b]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:e}],onSucceeded:function(a){return OSF.OUtil.mapList(a[OSF.DDA.ListDescriptors.DataNodeList],n)}});a({method:OSF.DDA.AsyncMethodNames.GetPartXmlAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:e}],onSucceeded:g});a({method:OSF.DDA.AsyncMethodNames.AddDataPartNamespaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Prefix,types:[b]},{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[b]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:m}]});a({method:OSF.DDA.AsyncMethodNames.GetDataPartNamespaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Prefix,types:[b]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:m}],onSucceeded:g});a({method:OSF.DDA.AsyncMethodNames.GetDataPartPrefixAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[b]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:m}],onSucceeded:g});a({method:OSF.DDA.AsyncMethodNames.GetRelativeNodesAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.XPath,types:[b]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:h}],onSucceeded:function(a){return OSF.OUtil.mapList(a[OSF.DDA.ListDescriptors.DataNodeList],n)}});a({method:OSF.DDA.AsyncMethodNames.GetNodeValueAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:h}],onSucceeded:g});a({method:OSF.DDA.AsyncMethodNames.GetNodeXmlAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:h}],onSucceeded:g});a({method:OSF.DDA.AsyncMethodNames.SetNodeValueAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[b]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:h}]});a({method:OSF.DDA.AsyncMethodNames.SetNodeXmlAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Xml,types:[b]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:h}]});a({method:OSF.DDA.AsyncMethodNames.GetNodeTextAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:h}],onSucceeded:g});a({method:OSF.DDA.AsyncMethodNames.SetNodeTextAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Text,types:[b]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:h}]});a({method:OSF.DDA.AsyncMethodNames.GetSelectedTask,onSucceeded:function(a){return a[Microsoft.Office.WebExtension.Parameters.TaskId]}});a({method:OSF.DDA.AsyncMethodNames.GetTask,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TaskId,types:[b]}]});a({method:OSF.DDA.AsyncMethodNames.GetTaskField,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TaskId,types:[b]},{name:Microsoft.Office.WebExtension.Parameters.FieldId,types:[c]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.GetRawValue,value:{types:[d],defaultValue:i}}]});a({method:OSF.DDA.AsyncMethodNames.GetResourceField,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ResourceId,types:[b]},{name:Microsoft.Office.WebExtension.Parameters.FieldId,types:[c]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.GetRawValue,value:{types:[d],defaultValue:i}}]});a({method:OSF.DDA.AsyncMethodNames.GetProjectField,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FieldId,types:[c]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.GetRawValue,value:{types:[d],defaultValue:i}}]});a({method:OSF.DDA.AsyncMethodNames.GetSelectedResource,onSucceeded:function(a){return a[Microsoft.Office.WebExtension.Parameters.ResourceId]}});a({method:OSF.DDA.AsyncMethodNames.GetWSSUrl});a({method:OSF.DDA.AsyncMethodNames.GetSelectedView});a({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:[b]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:[c],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:[c],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:[d],defaultValue:k}},{name:Microsoft.Office.WebExtension.Parameters.XFrameDenySafe,value:{types:[d],defaultValue:k}}],privateStateCallbacks:[],onSucceeded:function(c){var f=c[Microsoft.Office.WebExtension.Parameters.Id],b=c[Microsoft.Office.WebExtension.Parameters.Data],a=new OSF.DialogHandler,d=OSF.DDA.AsyncMethodNames.CloseAsync.displayName;OSF.OUtil.defineEnumerableProperty(a,d,{value:function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];c(arguments,f,b,a)}});var e=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;OSF.OUtil.defineEnumerableProperty(a,e,{value:function(){var d=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],c=d.verifyAndExtractCall(arguments,a,b),e=c[Microsoft.Office.WebExtension.Parameters.EventType],f=c[Microsoft.Office.WebExtension.Parameters.Handler];return b.addEventHandlerAndFireQueuedEvent(e,f)}});return a},checkCallArgs:function(a){if(a[Microsoft.Office.WebExtension.Parameters.Width]<=0)a[Microsoft.Office.WebExtension.Parameters.Width]=1;if(a[Microsoft.Office.WebExtension.Parameters.Width]>100)a[Microsoft.Office.WebExtension.Parameters.Width]=99;if(a[Microsoft.Office.WebExtension.Parameters.Height]<=0)a[Microsoft.Office.WebExtension.Parameters.Height]=1;if(a[Microsoft.Office.WebExtension.Parameters.Height]>100)a[Microsoft.Office.WebExtension.Parameters.Height]=99;return a}});a({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]})})();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(a){OSF.DDA.SyncMethodCalls[a.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(a)};(function(){OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]})})();OSF.DDA.HostParameterMap=function(a,b){var i="fromHost",c=this,j="toHost",h=i,e="self",g={};g[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(a){if(a.rows!==undefined){var b={};b[OSF.DDA.TableDataProperties.TableRows]=a.rows;b[OSF.DDA.TableDataProperties.TableHeaders]=a.headers;a=b}return a},fromHost:function(a){return a}};function d(j,i){var m=j?{}:undefined;for(var f in j){var e=j[f],c;if(OSF.DDA.ListType.isListType(f)){c=[];for(var n in e)c.push(d(e[n],i))}else if(OSF.OUtil.listContainsKey(g,f))c=g[f][i](e);else if(i==h&&a.preserveNesting(f))c=d(e,i);else{var k=b[f];if(k){var l=k[i];if(l){c=l[e];if(c===undefined)c=e}}else c=e}m[f]=c}return m}function k(i,h){var f;for(var c in h){var d;if(a.isComplexType(c))d=k(i,b[c][j]);else d=i[c];if(d!=undefined){if(!f)f={};var g=h[c];if(g==e)g=c;f[g]=a.pack(c,d)}}return f}function f(k,j,g){if(!g)g={};for(var d in j){var l=j[d],c;if(l==e)c=k;else c=k[l];if(c===null||c===undefined)g[d]=undefined;else{c=a.unpack(d,c);var i;if(a.isComplexType(d)){i=b[d][h];if(a.preserveNesting(d))g[d]=f(c,i);else f(c,i,g)}else{if(OSF.DDA.ListType.isListType(d)){i={};var n=OSF.DDA.ListType.getDescriptor(d);i[n]=e;for(var m in c)c[m]=f(c[m],i)}g[d]=c}}}return g}function l(l,g,a){var e=b[l][a],c;if(a=="toHost"){var j=d(g,a);c=k(j,e)}else if(a==i){var h=f(g,e);c=d(h,a)}return c}if(!b)b={};c.setMapping=function(k,c){var a,d;if(c.map){a=c.map;d={};for(var f in a){var g=a[f];if(g==e)g=f;d[g]=f}}else{a=c.toHost;d=c.fromHost}var i=b[k]={};i[j]=a;i[h]=d};c.toHost=function(b,a){return l(b,a,j)};c.fromHost=function(a,b){return l(a,b,h)};c.self=e;c.dynamicTypes=g;c.mapValues=d;c.specialProcessorDynamicTypes=a.dynamicTypes};OSF.DDA.SpecialProcessor=function(c,b){var a=this;a.sharedComplexType=[OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,OSF.DDA.EventDescriptors.DialogMessageReceivedEvent];a.isComplexType=function(a){return OSF.OUtil.listContainsValue(this.sharedComplexType,a)||OSF.OUtil.listContainsValue(c,a)};a.isDynamicType=function(a){return OSF.OUtil.listContainsKey(b,a)};a.preserveNesting=function(b){var a=[OSF.DDA.PropertyDescriptors.Subset,OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode];return OSF.OUtil.listContainsValue(a,b)};a.pack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].toHost(d);else a=d;return a};a.unpack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].fromHost(d);else a=d;return a}};OSF.DDA.DispIdHost.Facade=function(d,e){var f=this,a={},b=OSF.DDA.AsyncMethodNames,c=OSF.DDA.MethodDispId;a[b.GoToByIdAsync.id]=c.dispidNavigateToMethod;a[b.GetSelectedDataAsync.id]=c.dispidGetSelectedDataMethod;a[b.SetSelectedDataAsync.id]=c.dispidSetSelectedDataMethod;a[b.GetDocumentCopyChunkAsync.id]=c.dispidGetDocumentCopyChunkMethod;a[b.ReleaseDocumentCopyAsync.id]=c.dispidReleaseDocumentCopyMethod;a[b.GetDocumentCopyAsync.id]=c.dispidGetDocumentCopyMethod;a[b.AddFromSelectionAsync.id]=c.dispidAddBindingFromSelectionMethod;a[b.AddFromPromptAsync.id]=c.dispidAddBindingFromPromptMethod;a[b.AddFromNamedItemAsync.id]=c.dispidAddBindingFromNamedItemMethod;a[b.GetAllAsync.id]=c.dispidGetAllBindingsMethod;a[b.GetByIdAsync.id]=c.dispidGetBindingMethod;a[b.ReleaseByIdAsync.id]=c.dispidReleaseBindingMethod;a[b.GetDataAsync.id]=c.dispidGetBindingDataMethod;a[b.SetDataAsync.id]=c.dispidSetBindingDataMethod;a[b.GetFilePropertiesAsync.id]=c.dispidGetFilePropertiesMethod;a[b.AddRowsAsync.id]=c.dispidAddRowsMethod;a[b.AddColumnsAsync.id]=c.dispidAddColumnsMethod;a[b.DeleteAllDataValuesAsync.id]=c.dispidClearAllRowsMethod;a[b.ClearFormatsAsync.id]=c.dispidClearFormatsMethod;a[b.RefreshAsync.id]=c.dispidLoadSettingsMethod;a[b.SaveAsync.id]=c.dispidSaveSettingsMethod;a[b.SetTableOptionsAsync.id]=c.dispidSetTableOptionsMethod;a[b.SetFormatsAsync.id]=c.dispidSetFormatsMethod;a[b.GetActiveViewAsync.id]=c.dispidGetActiveViewMethod;a[b.AppCommandInvocationCompletedAsync.id]=c.dispidAppCommandInvocationCompletedMethod;a[b.AddDataPartAsync.id]=c.dispidAddDataPartMethod;a[b.GetDataPartByIdAsync.id]=c.dispidGetDataPartByIdMethod;a[b.GetDataPartsByNameSpaceAsync.id]=c.dispidGetDataPartsByNamespaceMethod;a[b.GetPartXmlAsync.id]=c.dispidGetDataPartXmlMethod;a[b.GetPartNodesAsync.id]=c.dispidGetDataPartNodesMethod;a[b.DeleteDataPartAsync.id]=c.dispidDeleteDataPartMethod;a[b.GetNodeValueAsync.id]=c.dispidGetDataNodeValueMethod;a[b.GetNodeXmlAsync.id]=c.dispidGetDataNodeXmlMethod;a[b.GetRelativeNodesAsync.id]=c.dispidGetDataNodesMethod;a[b.SetNodeValueAsync.id]=c.dispidSetDataNodeValueMethod;a[b.SetNodeXmlAsync.id]=c.dispidSetDataNodeXmlMethod;a[b.AddDataPartNamespaceAsync.id]=c.dispidAddDataNamespaceMethod;a[b.GetDataPartNamespaceAsync.id]=c.dispidGetDataUriByPrefixMethod;a[b.GetDataPartPrefixAsync.id]=c.dispidGetDataPrefixByUriMethod;a[b.GetNodeTextAsync.id]=c.dispidGetDataNodeTextMethod;a[b.SetNodeTextAsync.id]=c.dispidSetDataNodeTextMethod;a[b.GetDocumentThemeAsync.id]=c.dispidGetDocumentThemeMethod;a[b.GetOfficeThemeAsync.id]=c.dispidGetOfficeThemeMethod;a[b.GetSelectedTask.id]=c.dispidGetSelectedTaskMethod;a[b.GetTask.id]=c.dispidGetTaskMethod;a[b.GetWSSUrl.id]=c.dispidGetWSSUrlMethod;a[b.GetTaskField.id]=c.dispidGetTaskFieldMethod;a[b.GetSelectedResource.id]=c.dispidGetSelectedResourceMethod;a[b.GetResourceField.id]=c.dispidGetResourceFieldMethod;a[b.GetProjectField.id]=c.dispidGetProjectFieldMethod;a[b.GetSelectedView.id]=c.dispidGetSelectedViewMethod;b=Microsoft.Office.WebExtension.EventType;c=OSF.DDA.EventDispId;a[b.SettingsChanged]=c.dispidSettingsChangedEvent;a[b.DocumentSelectionChanged]=c.dispidDocumentSelectionChangedEvent;a[b.BindingSelectionChanged]=c.dispidBindingSelectionChangedEvent;a[b.BindingDataChanged]=c.dispidBindingDataChangedEvent;a[b.ActiveViewChanged]=c.dispidActiveViewChangedEvent;a[b.DocumentThemeChanged]=c.dispidDocumentThemeChangedEvent;a[b.OfficeThemeChanged]=c.dispidOfficeThemeChangedEvent;a[b.DialogMessageReceived]=c.dispidDialogMessageReceivedEvent,a[b.AppCommandInvoked]=c.dispidAppCommandInvokedEvent;a[b.TaskSelectionChanged]=c.dispidTaskSelectionChangedEvent;a[b.ResourceSelectionChanged]=c.dispidResourceSelectionChangedEvent;a[b.ViewSelectionChanged]=c.dispidViewSelectionChangedEvent;a[b.DataNodeInserted]=c.dispidDataNodeAddedEvent;a[b.DataNodeReplaced]=c.dispidDataNodeReplacedEvent;a[b.DataNodeDeleted]=c.dispidDataNodeDeletedEvent;function g(a,c,d,b){if(typeof a=="number"){if(!b)b=c.getCallArgs(d);OSF.DDA.issueAsyncResult(b,a,OSF.DDA.ErrorCodeManager.getErrorArgs(a))}else throw a}f[OSF.DDA.DispIdHost.Methods.InvokeMethod]=function(o,j,k,m){var b;try{var h=o.id,c=OSF.DDA.AsyncMethodCalls[h];b=c.verifyAndExtractCall(j,k,m);var i=a[h],n=d(h),f;if(e.toHost)f=e.toHost(i,b);else f=b;n[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({dispId:i,hostCallArgs:f,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:function(f,d){var a;if(f==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)if(e.fromHost)a=e.fromHost(i,d);else a=d;else a=d;var g=c.processResponse(f,a,k,b);OSF.DDA.issueAsyncResult(b,f,g)}})}catch(l){g(l,c,j,b)}};f[OSF.DDA.DispIdHost.Methods.AddEventHandler]=function(j,f,h){var c,b,l;function i(a){if(a==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){var e=f.addEventHandler(b,l);if(!e)a=OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed}var d;if(a!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)d=OSF.DDA.ErrorCodeManager.getErrorArgs(a);OSF.DDA.issueAsyncResult(c,a,d)}try{var k=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id];c=k.verifyAndExtractCall(j,h,f);b=c[Microsoft.Office.WebExtension.Parameters.EventType];l=c[Microsoft.Office.WebExtension.Parameters.Handler];if(f.getEventHandlerCount(b)==0){var m=a[b],o=d(b)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync];o({eventType:b,dispId:m,targetId:h.id||"",onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:i,onEvent:function(a){var c=e.fromHost(m,a);f.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(b,h,c))}})}else i(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}catch(n){g(n,k,j,c)}};f[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]=function(j,c,l){var e,b,f;function i(a){var b;if(a!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)b=OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist);OSF.DDA.issueAsyncResult(e,a,b)}try{var k=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id];e=k.verifyAndExtractCall(j,l,c);b=e[Microsoft.Office.WebExtension.Parameters.EventType];f=e[Microsoft.Office.WebExtension.Parameters.Handler];var h;if(f==null){c.clearEventHandlers(b);h=true}else if(!c.hasEventHandler(b,f))h=false;else h=c.removeEventHandler(b,f);if(c.getEventHandlerCount(b)==0){var o=a[b],n=d(b)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync];n({eventType:b,dispId:o,targetId:l.id||"",onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:i})}else i(h?OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess:Strings.OfficeOM.L_EventRegistrationError)}catch(m){g(m,k,j,e)}};f[OSF.DDA.DispIdHost.Methods.OpenDialog]=function(m,c,l){var f,b,h,k;function i(a){var d;if(a!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)d=OSF.DDA.ErrorCodeManager.getErrorArgs(a);else{var b={};b[Microsoft.Office.WebExtension.Parameters.Id]=k;b[Microsoft.Office.WebExtension.Parameters.Data]=c;var d=j.processResponse(a,b,l,f)}OSF.DDA.issueAsyncResult(f,a,d)}try{b=Microsoft.Office.WebExtension.EventType.DialogMessageReceived;h=Microsoft.Office.WebExtension.EventType.DialogEventReceived;(b==undefined||h==undefined)&&i(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported);if(OSF.DDA.AsyncMethodNames.DisplayDialogAsync==null){i(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);return}var j=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id];f=j.verifyAndExtractCall(m,l,c);c.clearEventHandlers(b);c.clearEventHandlers(h);var n=a[b],p=d(b)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync];k=f[Microsoft.Office.WebExtension.Parameters.Url]+">"+f[Microsoft.Office.WebExtension.Parameters.Width]+">"+f[Microsoft.Office.WebExtension.Parameters.Height];p({eventType:b,dispId:n,targetId:k,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:i,onEvent:function(i){var g=e.fromHost(n,i),f=OSF.DDA.OMFactory.manufactureEventArgs(b,l,g);if(f.type==h){var d=OSF.DDA.ErrorCodeManager.getErrorArgs(f.error),a={};a[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=status||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;a[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=d.name||d;a[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=d.message||d;f.error=new OSF.DDA.Error(a[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])}c.fireOrQueueEvent(f);if(g[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogClosed){c.clearEventHandlers(b);c.clearEventHandlers(h)}}})}catch(o){g(o,j,m,f)}};f[OSF.DDA.DispIdHost.Methods.CloseDialog]=function(f,m,c,o){var j,b,h,e=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess;function l(a){e=a}try{var i=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id];j=i.verifyAndExtractCall(f,o,c);b=Microsoft.Office.WebExtension.EventType.DialogMessageReceived;h=Microsoft.Office.WebExtension.EventType.DialogEventReceived;c.clearEventHandlers(b);c.clearEventHandlers(h);var p=a[b],n=d(b)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync];n({eventType:b,dispId:p,targetId:m,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:l})}catch(k){g(k,i,f,j)}if(e!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed,OSF.DDA.AsyncMethodNames.CloseAsync.displayName,e)};f[OSF.DDA.DispIdHost.Methods.MessageParent]=function(b,i){var e={},c=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id],f=c.verifyAndExtractCall(b,i,e),g=d(OSF.DDA.SyncMethodNames.MessageParent.id),h=g[OSF.DDA.DispIdHost.Delegates.MessageParent],j=a[OSF.DDA.SyncMethodNames.MessageParent.id];return h({dispId:j,hostCallArgs:f,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)}})}};OSF.DDA.DispIdHost.addAsyncMethods=function(a,b,e){for(var f in b){var c=b[f],d=c.displayName;!a[d]&&OSF.OUtil.defineEnumerableProperty(a,d,{value:function(b){return function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod];c(b,arguments,a,e)}}(c)})}};OSF.DDA.DispIdHost.addEventSupport=function(a,b){var d=OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName,c=OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName;!a[d]&&OSF.OUtil.defineEnumerableProperty(a,d,{value:function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler];c(arguments,b,a)}});!a[c]&&OSF.OUtil.defineEnumerableProperty(a,c,{value:function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler];c(arguments,b,a)}})};OSF.DDA.Context=function(a,f,g,c){var e="requirements",b=this;OSF.OUtil.defineEnumerableProperties(b,{contentLanguage:{value:a.get_dataLocale()},displayLanguage:{value:a.get_appUILocale()},host:{value:OfficeExt.HostName.Host.getInstance().getHost(a.get_appName())},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform(a.get_appName())},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(a.get_appName())}});g&&OSF.OUtil.defineEnumerableProperty(b,"license",{value:g});a.ui&&OSF.OUtil.defineEnumerableProperty(b,"ui",{value:a.ui});if(a.get_isDialog()){var d=OfficeExt.Requirement.RequirementsMatrixFactory.getDialogDefaultRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,e,{value:d})}else{f&&OSF.OUtil.defineEnumerableProperty(b,"document",{value:f});if(c){var h=c.displayName||"appOM";delete c.displayName;OSF.OUtil.defineEnumerableProperty(b,h,{value:c})}var d=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,e,{value:d})}};OSF.DDA.OutlookContext=function(b,a,c,d){OSF.DDA.OutlookContext.uber.constructor.call(this,b,null,c,d);a&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:a})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{"get":function(){var a;if(OSF&&OSF._OfficeAppFactory)a=OSF._OfficeAppFactory.getContext();return a}});Microsoft.Office.WebExtension.useShortNamespace=function(a){if(a)OSF.NamespaceManager.enableShortcut();else OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(a,b){var c;if(a&&typeof a=="string"){var d=a.indexOf("#");if(d!=-1){var h=a.substring(0,d),g=a.substring(d+1);switch(h){case "binding":case "bindings":if(g)c=new OSF.DDA.BindingPromise(g)}}}if(!c){if(b){var e=typeof b;if(e=="function"){var f={};f[Microsoft.Office.WebExtension.Parameters.Callback]=b;OSF.DDA.issueAsyncResult(f,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,e)}}else{c.onFail=b;return c}};OSF.DDA.BindingPromise=function(b,a){this._id=b;OSF.OUtil.defineEnumerableProperty(this,"onFail",{"get":function(){return a},"set":function(c){var b=typeof c;if(b!="undefined"&&b!="function")throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,b);a=c}})};OSF.DDA.BindingPromise.prototype={_fetch:function(b){var a=this;if(a.binding)b&&b(a.binding);else if(!a._binding){var c=a;Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(a._id,function(a){if(a.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded){OSF.OUtil.defineEnumerableProperty(c,"binding",{value:a.value});b&&b(c.binding)}else c.onFail&&c.onFail(a)})}return a},getDataAsync:function(){var a=arguments;this._fetch(function(b){b.getDataAsync.apply(b,a)});return this},setDataAsync:function(){var a=arguments;this._fetch(function(b){b.setDataAsync.apply(b,a)});return this},addHandlerAsync:function(){var a=arguments;this._fetch(function(b){b.addHandlerAsync.apply(b,a)});return this},removeHandlerAsync:function(){var a=arguments;this._fetch(function(b){b.removeHandlerAsync.apply(b,a)});return this},setTableOptionsAsync:function(){var a=arguments;this._fetch(function(b){b.setTableOptionsAsync.apply(b,a)});return this},setFormatsAsync:function(){var a=arguments;this._fetch(function(b){b.setFormatsAsync.apply(b,a)});return this},clearFormatsAsync:function(){var a=arguments;this._fetch(function(b){b.clearFormatsAsync.apply(b,a)});return this}};OSF.DDA.License=function(a){OSF.OUtil.defineEnumerableProperty(this,"value",{value:a})};OSF.DDA.Settings=function(b){var a="name";b=b||{};OSF.OUtil.defineEnumerableProperties(this,{"get":{value:function(e){var d=Function._validateParams(arguments,[{name:a,type:String,mayBeNull:false}]);if(d)throw d;var c=b[e];return typeof c==="undefined"?null:c}},"set":{value:function(e,d){var c=Function._validateParams(arguments,[{name:a,type:String,mayBeNull:false},{name:"value",mayBeNull:true}]);if(c)throw c;b[e]=d}},remove:{value:function(d){var c=Function._validateParams(arguments,[{name:a,type:String,mayBeNull:false}]);if(c)throw c;delete b[d]}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],b)};OSF.DDA.RefreshableSettings=function(a){OSF.DDA.RefreshableSettings.uber.constructor.call(this,a);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],a);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(b,c){var a;switch(b.get_clientMode()){case OSF.ClientMode.ReadOnly:a=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:a=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}c&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:c});OSF.OUtil.defineMutableProperties(this,{mode:{value:a},url:{value:b.get_docUrl()}})};OSF.DDA.JsomDocument=function(c,d,e){var a=this;OSF.DDA.JsomDocument.uber.constructor.call(a,c,e);OSF.OUtil.defineEnumerableProperty(a,"bindings",{"get":function(){return d}});var b=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(a,[b.GetSelectedDataAsync,b.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(a,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.DDA.BindingFacade=function(b){this._eventDispatches=[];OSF.OUtil.defineEnumerableProperty(this,"document",{value:b});var a=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[a.AddFromSelectionAsync,a.AddFromNamedItemAsync,a.GetAllAsync,a.GetByIdAsync,a.ReleaseByIdAsync])};OSF.DDA.UnknownBinding=function(b,a){OSF.OUtil.defineEnumerableProperties(this,{document:{value:a},id:{value:b}})};OSF.DDA.Binding=function(a,c){OSF.OUtil.defineEnumerableProperties(this,{document:{value:c},id:{value:a}});var d=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[d.GetDataAsync,d.SetDataAsync]);var e=Microsoft.Office.WebExtension.EventType,b=c.bindings._eventDispatches;if(!b[a])b[a]=new OSF.EventDispatch([e.BindingSelectionChanged,e.BindingDataChanged]);var f=b[a];OSF.DDA.DispIdHost.addEventSupport(this,f)};OSF.DDA.TextBinding=function(b,a){OSF.DDA.TextBinding.uber.constructor.call(this,b,a);OSF.OUtil.defineEnumerableProperty(this,"type",{value:Microsoft.Office.WebExtension.BindingType.Text})};OSF.OUtil.extend(OSF.DDA.TextBinding,OSF.DDA.Binding);OSF.DDA.MatrixBinding=function(d,c,b,a){OSF.DDA.MatrixBinding.uber.constructor.call(this,d,c);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Matrix},rowCount:{value:b?b:0},columnCount:{value:a?a:0}})};OSF.OUtil.extend(OSF.DDA.MatrixBinding,OSF.DDA.Binding);OSF.DDA.TableBinding=function(f,e,d,c,b){OSF.DDA.TableBinding.uber.constructor.call(this,f,e);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:d?d:0},columnCount:{value:c?c:0},hasHeaders:{value:b?b:false}});var a=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[a.AddRowsAsync,a.AddColumnsAsync,a.DeleteAllDataValuesAsync])};OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding);Microsoft.Office.WebExtension.TableData=function(b,a){function c(a){if(a==null||a==undefined)return null;try{for(var b=OSF.DDA.DataCoercion.findArrayDimensionality(a,2);b<2;b++)a=[a];return a}catch(c){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{"get":function(){return a},"set":function(b){a=c(b)}},rows:{"get":function(){return b},"set":function(a){b=a==null||OSF.OUtil.isArray(a)&&a.length==0?[]:c(a)}}});this.headers=a;this.rows=b};Microsoft.Office.WebExtension.FileProperties=function(a){OSF.OUtil.defineEnumerableProperties(this,{url:{value:a[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.Error=function(c,a,b){OSF.OUtil.defineEnumerableProperties(this,{name:{value:c},message:{value:a},code:{value:b}})};OSF.DDA.AsyncResult=function(b,a){OSF.OUtil.defineEnumerableProperties(this,{value:{value:b[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:a?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});b[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:b[OSF.DDA.AsyncResultEnum.Properties.Context]});a&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(a[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.DocumentSelectionChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:a}})};OSF.DDA.BindingSelectionChangedEventArgs=function(c,a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingSelectionChanged},binding:{value:c}});for(var b in a)OSF.OUtil.defineEnumerableProperty(this,b,{value:a[b]})};OSF.DDA.BindingDataChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingDataChanged},binding:{value:a}})};OSF.DDA.SettingsChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:a}})};OSF.DDA.OfficeThemeChangedEventArgs=function(a){var b=OSF.DDA.ConvertToOfficeTheme(a);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.Internal.EventType.OfficeThemeChanged},officeTheme:{value:b}})};OSF.DDA.DocumentThemeChangedEventArgs=function(a){var b=OSF.DDA.ConvertToDocumentTheme(a);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.Internal.EventType.DocumentThemeChanged},documentTheme:{value:b}})};OSF.DDA.ActiveViewChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.ActiveViewChanged},activeView:{value:a.activeView}})};OSF.O15HostSpecificFileVersion={GetFallbackVersion:function(e){var a="15.02",d="15.01",c={"1":a,"2":a,"4":a,"8":"15.04","16":a,"128":a},b=c[e];if(b)return b;else return d},GenerateVersion:function(d,c){var a=2;return b(d,a)+"."+b(c,a);function b(b,c){b=b||0;c=c||0;for(var a=b.toString(),e=c-a.length,d=0;d0){for(var d=[],c=0;c=f)break;c=Function._validateParameter(i[d],h,j);if(c){c.popStackFrame();return c}}return a};if(!Function._validateParameterCount)Function._validateParameterCount=function(m,f,l){var b,e,c=f.length,g=m.length;if(gc){e=d;for(b=0;b-1||navigator.userAgent.indexOf("Firefox")>-1)a=a.split(b).join(d._escapeChars[b]);else a=a.replace(d._charsToEscapeRegExs[b],d._escapeChars[b])}}c.append(a);c.append(f)};d.serializeWithBuilder=function(e,c,l,f){var g;switch(typeof e){case "object":if(e){if(f){for(var m=0;m0&&c.append(",");d.serializeWithBuilder(e[g],c,false,f)}c.append("]")}else{if(b.MsAjaxTypeHelper.isInstanceOfType(Date,e)){c.append('"\\/Date(');c.append(e.getTime());c.append(')\\/"');break}var h=[],i=0;for(var j in e){if(b.MsAjaxString.startsWith(j,"$"))continue;if(j===d._serverTypeFieldName&&i!==0){h[i++]=h[0];h[0]=j}else h[i++]=j}l&&h.sort();c.append("{");var n=false;for(g=0;g=0&&c.splice(a,1);return a>=0};b.indexOf=function(e,f,b){if(typeof f===a)return -1;var d=e.length;if(d!==0){b=b-0;if(isNaN(b))b=0;else{if(isFinite(b))b=b-b%1;if(b<0)b=Math.max(0,d+b)}for(var c=b;c1?d[d.length-1]:b;if(window.sessionStorage){var c=window.name.indexOf(l);if(c>-1){var e=window.name.indexOf(";",c);if(e==-1)e=window.name.length;var f=window.name.substring(c,e);if(a)window.sessionStorage.setItem(f,a);else a=window.sessionStorage.getItem(f)}}return a},getConversationId:function(){var c=window.location.search,a=b;if(c){var d=c.indexOf("&");a=d>0?c.substring(1,d):c.substr(1);if(a&&a.charAt(a.length-1)==="="){a=a.substring(0,a.length-1);if(a)a=decodeURIComponent(a)}}return a},validateParamObject:function(f,e){var b=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:a},{name:"expectedProperties",type:Object,mayBeNull:a},{name:"callback",type:Function,mayBeNull:c}]);if(b)throw b;for(var d in e){b=Function._validateParameter(f[d],e[d],d);if(b)throw b}},writeProfilerMark:function(a){if(window.msWriteProfilerMark){window.msWriteProfilerMark(a);OsfMsAjaxFactory.msAjaxDebug.trace(a)}},defineNondefaultProperty:function(e,f,a,b){a=a||{};for(var g in b){var d=b[g];if(a[d]==undefined)a[d]=c}Object.defineProperty(e,f,a);return e},defineNondefaultProperties:function(c,a,d){a=a||{};for(var b in a)OSF.OUtil.defineNondefaultProperty(c,b,a[b],d);return c},defineEnumerableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[d])},defineEnumerableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[d])},defineMutableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[f,d,g])},defineMutableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[f,d,g])},finalizeProperties:function(e,d){d=d||{};for(var g=Object.getOwnPropertyNames(e),i=g.length,f=0;f>2;a[1]=(f&3)<<4|d>>4;a[2]=(d&15)<<2|e>>6;a[3]=e&63;if(isNaN(d))a[2]=a[3]=64;else if(isNaN(e))a[3]=64;for(var g=0;g<4;g++)h.push(j.charAt(a[g]))}while(b0;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[d%16];d=Math.floor(d/16)}for(;b<32;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[Math.floor(Math.random()*16)]}return c}}}();window.OSF=OSF;AriaLogger=function(){var a=null,b;function f(a){return a["Fields"]!==undefined}function e(b,c){var d,a;b=b.toLowerCase();c=c.toLowerCase();a=b.indexOf(c);if(a>=0&&a===b.length-c.length&&(a===0||b.charAt(a-1)==="/"||b.charAt(a-1)==="\\"))d=b.substring(0,a);return d}function g(){if(a)return a;else{for(var f=document.getElementsByTagName("script")||[],i=f.length,g=["office.js","office.debug.js"],h=g.length,d,b,c=0;!b&&c40){a=OSF.OUtil.Guid.generateNewGuid();b.setValue(b.clientIDKey,a)}return a};a.prototype.saveLog=function(c,d){var b=this,a=b.getValue(b.logIdSetKey);a=(a&&a.length>0?a+";":"")+c;b.setValue(b.logIdSetKey,a);b.setValue(c,d)};a.prototype.enumerateLog=function(c,e){var a=this,d=a.getValue(a.logIdSetKey);if(d){var f=d.split(";");for(var h in f){var b=f[h],g=a.getValue(b);if(g){c&&c(b,g);e&&a.remove(b)}}e&&a.remove(a.logIdSetKey)}};a.prototype.getValue=function(c){var a=OSF.OUtil.getLocalStorage(),b="";if(a)b=a.getItem(c);return b};a.prototype.setValue=function(c,b){var a=OSF.OUtil.getLocalStorage();a&&a.setItem(c,b)};a.prototype.remove=function(b){var a=OSF.OUtil.getLocalStorage();if(a)try{a.removeItem(b)}catch(c){}};return a}(),f=function(){function a(){}a.prototype.LogData=function(a){if(!OSF.Logger)return;try{AriaLogger.logData(a)}catch(b){}};a.prototype.LogRawData=function(a){if(!OSF.Logger)return;try{AriaLogger.logData(JSON.parse(a))}catch(b){}};return a}();function t(d){if(!OSF.Logger)return;if(b)return;b=new v;b.hostVersion=d.get_appVersion();b.appId=d.get_id();b.host=d.get_appName();b.browser=window.navigator.userAgent;b.correlationId=d.get_correlationId();b.clientId=(new i).getClientId();b.appInstanceId=d.get_appInstanceId();if(b.appInstanceId)b.appInstanceId=b.appInstanceId.replace(/[{}]/g,"").toLowerCase();var h=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/","i"),g=d.get_docUrl();b.docUrl=h.test(g)?g:"";var f=location.href;if(f)f=f.split("?")[0].split("#")[0];b.appURL=f;(function(f,b){var d,e,c;b.assetId="";b.userId="";try{d=decodeURIComponent(f);e=new DOMParser;c=e.parseFromString(d,"text/xml");b.userId=c.getElementsByTagName("t")[0].attributes.getNamedItem("cid").nodeValue;b.assetId=c.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(g){}finally{d=a;c=a;e=a}})(d.get_eToken(),b);(function(){var k=new Date,d=a,h=0,j=false,f=function(){if(document.hasFocus()){if(d==a)d=new Date}else if(d){h+=Math.abs((new Date).getTime()-d.getTime());d=a}},b=[];b.push(new e("focus",f));b.push(new e("blur",f));b.push(new e("focusout",f));b.push(new e("focusin",f));var i=function(){for(var e=0;e=3){a._webAppState.conversationID=b[0];a._webAppState.id=b[1];a._webAppState.webAppUrl=b[2]}}else a._hostInfo.isRichClient=true;if(!a._hostInfo.isRichClient){a._webAppState.clientEndPoint=Microsoft.Office.Common.XdmCommunicationManager.connect(a._webAppState.conversationID,a._webAppState.wnd,a._webAppState.webAppUrl);a._webAppState.serviceEndPoint=Microsoft.Office.Common.XdmCommunicationManager.createServiceEndPoint(a._webAppState.id);var f=a._webAppState.conversationID+OSF.SharedConstants.NotificationConversationIdSuffix;a._webAppState.serviceEndPoint.registerConversation(f);var g=function(b){switch(b){case OSF.AgaveHostAction.Select:a._webAppState.focused=true;window.focus();break;case OSF.AgaveHostAction.UnSelect:a._webAppState.focused=c;break;default:OsfMsAjaxFactory.msAjaxDebug.trace("actionId "+b+" notifyAgave is wrong.")}};a._webAppState.serviceEndPoint.registerMethod("Office_notifyAgave",g,Microsoft.Office.Common.InvokeType.async,c);window.onfocus=function(){if(!a._webAppState.focused){a._webAppState.focused=true;a._webAppState.clientEndPoint.invoke(d,null,[a._webAppState.id,OSF.AgaveHostAction.Select])}};window.onblur=function(){if(a._webAppState.focused){a._webAppState.focused=c;a._webAppState.clientEndPoint.invoke(d,null,[a._webAppState.id,OSF.AgaveHostAction.UnSelect])}}}};OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize=function(a){var i="undefined",d=this,f=new OSF.DDA.License(a.get_eToken()),l=window.open;window.open=function(d,c,b){var a=null;try{a=l(d,c,b)}catch(f){}if(!a&&OSF._OfficeAppFactory.getClientEndPoint()&&OSF._OfficeAppFactory.getClientEndPoint().invoke){var e={strUrl:d,strWindowName:c,strWindowFeatures:b};OSF._OfficeAppFactory.getClientEndPoint().invoke("ContextActivationManager_openWindowInHost",null,e)}return a};if(d._hostInfo.isRichClient){var h=true;try{h=a.get_appName()==OSF.AppName.Outlook&&parseFloat(a.get_appVersion())<15.04}catch(m){}if(!h)if(a.get_isDialog()){if(OSF.DDA.UI.ChildUI)a.ui=new OSF.DDA.UI.ChildUI}else if(OSF.DDA.UI.ParentUI)a.ui=new OSF.DDA.UI.ParentUI;if(OSF.DDA.SafeArray!=undefined){var b=OSF.DDA.SafeArray.Delegate.ParameterMap,c={};c[OSF.DDA.EventDescriptors.DialogMessageReceivedEvent]=OSF.DDA.SafeArray.Delegate.ParameterMap.self;b.setMapping(OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,{fromHost:c});c={};c[OSF.DDA.PropertyDescriptors.MessageType]=0;c[OSF.DDA.PropertyDescriptors.MessageContent]=1;b.setMapping(OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,{fromHost:c});OSF.DDA.SafeArray.Delegate.ParameterMap=b}}if(a.get_appName()==OSF.AppName.OutlookWebApp){OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(a,d._settings,f,a.appOM));Microsoft.Office.WebExtension.initialize()}else if(a.get_appName()==OSF.AppName.Outlook){OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(a,d._settings,f,a.appOM));if(typeof OfficeJsClient_OutlookWin32!==i)if(typeof OfficeJsClient_OutlookWin32.prepareRightAfterWebExtensionInitialize!==i){OfficeJsClient_OutlookWin32.prepareRightBeforeWebExtensionInitialize();Microsoft.Office.WebExtension.initialize();OfficeJsClient_OutlookWin32.prepareRightAfterWebExtensionInitialize()}else{Microsoft.Office.WebExtension.initialize();OfficeJsClient_OutlookWin32.prepareRightBeforeWebExtensionInitialize()}else Microsoft.Office.WebExtension.initialize()}else if(a.get_osfControlType()===OSF.OsfControlType.DocumentLevel||a.get_osfControlType()===OSF.OsfControlType.ContainerLevel){OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(a,a.doc,f));var e,b,g=a.get_reason();if(d._hostInfo.isRichClient){function j(a){try{a.onCalling&&a.onCalling();var e=(new Date).getTime(),f=a.hostCallArgs[Microsoft.Office.WebExtension.Parameters.MessageToParent];window.external.MessageParent(f);a.onReceiving&&a.onReceiving();OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(a.dispId,a.hostCallArgs,Math.abs((new Date).getTime()-e),result);return result}catch(d){var b,c=d.number;if(c)switch(c){case -2146828218:b=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;case -2146827850:default:b=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}return b||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}}function k(b){var a=OSF.DDA.DispIdHost.getRichClientDelegateMethods(b);if(a[OSF.DDA.DispIdHost.Delegates.MessageParent]==undefined)a[OSF.DDA.DispIdHost.Delegates.MessageParent]=j;return a}e=k;g=OSF.DDA.RichInitializationReason[g];b=OSF.DDA.SafeArray.Delegate.ParameterMap}else{e=OSF.DDA.DispIdHost.getXLSDelegateMethods;b=OSF.DDA.XLS.Delegate.ParameterMap}OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(e,b));Microsoft.Office.WebExtension.initialize(g)}else throw OSF.OUtil.formatString(Strings.OfficeOM.L_OsfControlTypeNotSupported)};OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(a,f,t){var c=false,b;b=".js";var q={"1-15.00":"excel-15"+b,"1-15.01":"excel-15.01"+b,"1-15.02":"excel-15.02"+b,"2-15.00":"word-15"+b,"2-15.01":"word-15.01"+b,"2-15.02":"word-15.02"+b,"4-15.00":"powerpoint-15"+b,"4-15.01":"powerpoint-15.01"+b,"4-15.02":"powerpoint-15.02"+b,"8-15.00":"outlook-15"+b,"8-15.01":"outlook-15.01"+b,"8-15.02":"outlook-15.02"+b,"8-15.03":"outlook-15.03"+b,"8-15.04":"outlook-15.04"+b,"16-15":"excelwebapp-15"+b,"16-15.01":"excelwebapp-15.01"+b,"16-15.02":"excelwebapp-15.02"+b,"64-15":"outlookwebapp-15"+b,"64-15.01":"outlookwebapp-15.01"+b,"128-15.00":"project-15"+b,"128-15.01":"project-15.01"+b,"128-15.02":"project-15.02"+b},n=function(){var a=function(a){a&&OSF.OUtil.loadScript(a,function(){OsfMsAjaxFactory.msAjaxDebug.trace("loaded customized script:"+a)})},c=OSF._OfficeAppFactory.getClientEndPoint(),b=null;if(!c){try{if(typeof window.external.getCustomizedScriptPath!=="undefined")b=window.external.getCustomizedScriptPath()}catch(d){OsfMsAjaxFactory.msAjaxDebug.trace("no script override through window.external.")}a(b)}else try{c.invoke("getCustomizedScriptPathAsync",function(c,b){a(c===0?b:null)},{__timeout__:1e3})}catch(d){OsfMsAjaxFactory.msAjaxDebug.trace("no script override through cross frame communication.")}};OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM);var i=this;function g(e){var c,b;if(i._hostInfo.isRichClient)b=OSF.DDA.RichClientSettingsManager.read();else b=a.get_settings();var d=OSF.DDA.SettingsManager.deserializeSettings(b);if(e)c=new OSF.DDA.RefreshableSettings(d);else c=new OSF.DDA.Settings(d);return c}var h=a.get_appVersion(),k=OSF.O15HostSpecificFileVersion.GetFallbackVersion(a.get_appName());if(h>k)h=k;var e=t+q[a.get_appName()+"-"+h],d=function(a,c,b){if(OSF._OfficeAppFactory.getLoadScriptHelper)OSF._OfficeAppFactory.getLoadScriptHelper().loadScript(a,c,b);else OSF.OUtil.loadScript(a,b)};if(a.get_appName()==OSF.AppName.Excel){var p=function(){a.doc=new OSF.DDA.ExcelDocument(a,g(c));f()};d(e,OSF.ConstantNames.HostFileId,p)}else if(a.get_appName()==OSF.AppName.ExcelWebApp){var l=function(){a.doc=new OSF.DDA.ExcelWebAppDocument(a,g(true));f()};d(e,OSF.ConstantNames.HostFileId,l)}else if(a.get_appName()==OSF.AppName.Word){var s=function(){a.doc=new OSF.DDA.WordDocument(a,g(c));f()};d(e,OSF.ConstantNames.HostFileId,s)}else if(a.get_appName()==OSF.AppName.PowerPoint){var m=function(){a.doc=new OSF.DDA.PowerPointDocument(a,g(c));f()};d(e,OSF.ConstantNames.HostFileId,m)}else if(a.get_appName()==OSF.AppName.OutlookWebApp||a.get_appName()==OSF.AppName.Outlook){var o=function(){i._settings=g(c);a.appOM=new OSF.DDA.OutlookAppOm(a,i._webAppState.wnd,f)},j=function(){d(e,OSF.ConstantNames.HostFileId,o)};if(!OsfMsAjaxFactory.isMsAjaxLoaded())OsfMsAjaxFactory.loadMsAjaxFull(j);else j();n()}else if(a.get_appName()==OSF.AppName.Project){var r=function(){a.doc=new OSF.DDA.ProjectDocument(a);f()};d(e,OSF.ConstantNames.HostFileId,r)}else throw OSF.OUtil.formatString(stringNS.L_AppNotExistInitializeNotCalled,a.get_appName())} \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/office-vsdoc.js b/node_modules/@microsoft/office-js/dist/office-vsdoc.js index 517e29b..f598801 100644 --- a/node_modules/@microsoft/office-js/dist/office-vsdoc.js +++ b/node_modules/@microsoft/office-js/dist/office-vsdoc.js @@ -1,4 +1,4 @@ -/* Version: 16.0.8119.1000 */ +/* Version: 16.0.8828.1000 */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ @@ -67,7 +67,7 @@ Office._AccessWebAppMask = 0x40; } } - Office._DialogEventArgs = function (eventType) { + Office._DialogEventArgs = function (eventType) { Office._processContents(this, { type: { annotate: { @@ -89,7 +89,7 @@ Office._AccessWebAppMask = 0x40; "message" ); } else if (eventType == "dialogEventReceived") { - Office._processItem( + Office._processItem( this, { annotate: { @@ -99,7 +99,7 @@ Office._AccessWebAppMask = 0x40; }, "error" ); - } + } } Office._CustomXmlNodeEvents = function (eventType) { @@ -463,12 +463,12 @@ Office._AccessWebAppMask = 0x40; this.size = {}; } - Office._Dialog = function () { - this.data = {}; + Office._Dialog = function () { + this.data = {}; this.close = function () { /// Allows the add-in to close its dialog box. }; - this.addEventHandler = function (eventType, handler) { + this.addEventHandler = function (eventType, handler) { /// Registers an event handler. /// The two supported events are: DialogMessageReceived or DialogEventReceived /// The name of the handler @@ -690,32 +690,53 @@ Office._AccessWebAppMask = 0x40; }; - Office._context_ui = { - displayDialogAsync: { - value: function (startAddress, options, callback) { - /// Displays a dialog box in an Office host. - /// Accepts the initial HTTPS(TLS) URL that opens in the dialog box. - /// + Office._context_ui = { + displayDialogAsync: { + value: function (startAddress, options, callback) { + /// Displays a dialog box in an Office host. + /// Accepts the initial HTTPS(TLS) URL that opens in the dialog box. + /// /// Syntax example: {width:80} /// width: Defines the width of the dialog box as a percentage of the current display. /// height: Defines the height of the dialog box as a percentage of the current display. /// displayInIFrame: false (defult): The dialog will be displayed as a new browser window - /// true: The dialog will be displayed as a floating overlay with an IFrame. + /// true: The dialog will be displayed as a floating overlay with an IFrame. /// ///The optional callback method /// - if (arguments.length == 2) { callback = options; }; + if (arguments.length == 2) { callback = options; }; var result = new Office._AsyncResult("displayDialogAsync"); callback(result); - } - }, - messageParent: { - value: function (messageObject) { - /// Delivers a message from the dialog box to its parent/opener page. The page calling this API must be on the same domain as the parent. + } + }, + closeContainer: { + value: function () { + /// + /// Closes the UI container where the JavaScript is executing. + ///
+ ///
+ /// Supported hosts: + ///
+ /// * Outlook. Minimum requirement set: Mailbox 1.5 + ///
+ ///
+ /// The behavior of this method is specified as follows. When called from: + ///
+ /// * A UI-less command button: No effect. Any dialogs opened by displayDialogAsync will remain open. + ///
+ /// * A taskpane: The taskpane will close. Any dialogs opened by displayDialogAsync will also close. If the taskpane supports pinning and was pinned by the user, it will be un-pinned. + ///
+ /// * A module extension: No effect. + ///
+ } + }, + messageParent: { + value: function (messageObject) { + /// Delivers a message from the dialog box to its parent/opener page. The page calling this API must be on the same domain as the parent. /// Accepts a message from the dialog box to deliver to the add-in. - } - } - } + } + } + } Office._context_document = { mode: { @@ -1018,9 +1039,9 @@ Office._AccessWebAppMask = 0x40; Office._items = { context: { contents: { - host: "", + host: "", platform: "", - diagnostics: {}, + diagnostics: {}, contentLanguage: {}, displayLanguage: {}, license: { @@ -1074,16 +1095,13 @@ Office._items = { }, } }, - ui: { - conditions: { - reqs: ["set DialogAPI GE 1.1"] - }, + ui: { annotate: { // Office UI ui: undefined }, contents: Office._context_ui - } + } } }, initialize: { @@ -2897,7 +2915,7 @@ Office.context.diagnostics = { __proto__: null, host: "", platform: "", - version: "" + version: "" }; if (!!intellisense) { @@ -2914,7 +2932,7 @@ Office._processContents(Office, Office._items); document.addEventListener("DOMContentLoaded", function () { Office.initialize(); }); - + var __extends = this.__extends || function (d, b) { @@ -2973,7 +2991,7 @@ var OfficeExtension; }; ClientRequestContext.prototype.sync = function (passThroughValue) { /// - /// Synchronizes the state between JavaScript proxy objects and the Office document, by executing instructions queued on the request context and retrieving properties of loaded Office objects for use in your code. This method returns a promise, which is resolved when the synchronization is complete. + /// Synchronizes the state between JavaScript proxy objects and the Office document, by executing instructions queued on the request context and retrieving properties of loaded Office objects for use in your code.�This method returns a promise, which is resolved when the synchronization is complete. /// /// return new OfficeExtension.Promise(); @@ -3159,7 +3177,6 @@ var OfficeExtension; return new EventHandlerResult(null, null, handler); }; EventHandlers.prototype.remove = function (handler) { }; - EventHandlers.prototype.removeAll = function () { }; EventHandlers.prototype.__proto__ = null; return EventHandlers; }()); @@ -3175,157 +3192,67 @@ var OfficeExtension; })(OfficeExtension || (OfficeExtension = {__proto__: null})); OfficeExtension.__proto__ = null; - - -var Excel; -(function (Excel) { - var _V1Api = (function(_super) { - __extends(_V1Api, _super); - function _V1Api() { - /// [Api set: ExcelApi 1.3] - /// The request context associated with this object. - /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. - } - _V1Api.prototype.load = function(option) { + +var OfficeCore; +(function (OfficeCore) { + var RequestContext = (function (_super) { + __extends(RequestContext, _super); + function RequestContext() { /// - /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// The RequestContext object facilitates requests to the OfficeCore application. Since the Office add-in and the OfficeCore application run in two different processes, the request context is required to get access to the OfficeCore object model from the add-in. /// - /// - /// - } - _V1Api.prototype.bindingAddColumns = function(input) { - /// - var result = new OfficeExtension.ClientResult(); - result.__proto__ = null; - result.value = {}; - return result; - } - _V1Api.prototype.bindingAddFromNamedItem = function(input) { - /// - var result = new OfficeExtension.ClientResult(); - result.__proto__ = null; - result.value = {}; - return result; - } - _V1Api.prototype.bindingAddFromPrompt = function(input) { - /// - var result = new OfficeExtension.ClientResult(); - result.__proto__ = null; - result.value = {}; - return result; - } - _V1Api.prototype.bindingAddFromSelection = function(input) { - /// - var result = new OfficeExtension.ClientResult(); - result.__proto__ = null; - result.value = {}; - return result; - } - _V1Api.prototype.bindingAddRows = function(input) { - /// - var result = new OfficeExtension.ClientResult(); - result.__proto__ = null; - result.value = {}; - return result; - } - _V1Api.prototype.bindingClearFormats = function(input) { - /// - var result = new OfficeExtension.ClientResult(); - result.__proto__ = null; - result.value = {}; - return result; - } - _V1Api.prototype.bindingDeleteAllDataValues = function(input) { - /// - var result = new OfficeExtension.ClientResult(); - result.__proto__ = null; - result.value = {}; - return result; - } - _V1Api.prototype.bindingGetAll = function() { - /// - var result = new OfficeExtension.ClientResult(); - result.__proto__ = null; - result.value = {}; - return result; - } - _V1Api.prototype.bindingGetById = function(input) { - /// - var result = new OfficeExtension.ClientResult(); - result.__proto__ = null; - result.value = {}; - return result; - } - _V1Api.prototype.bindingGetData = function(input) { - /// - var result = new OfficeExtension.ClientResult(); - result.__proto__ = null; - result.value = {}; - return result; - } - _V1Api.prototype.bindingReleaseById = function(input) { - /// - var result = new OfficeExtension.ClientResult(); - result.__proto__ = null; - result.value = {}; - return result; - } - _V1Api.prototype.bindingSetData = function(input) { - /// - var result = new OfficeExtension.ClientResult(); - result.__proto__ = null; - result.value = {}; - return result; - } - _V1Api.prototype.bindingSetFormats = function(input) { - /// - var result = new OfficeExtension.ClientResult(); - result.__proto__ = null; - result.value = {}; - return result; - } - _V1Api.prototype.bindingSetTableOptions = function(input) { - /// - var result = new OfficeExtension.ClientResult(); - result.__proto__ = null; - result.value = {}; - return result; - } - _V1Api.prototype.getFilePropertiesAsync = function() { - /// - var result = new OfficeExtension.ClientResult(); - result.__proto__ = null; - result.value = {}; - return result; - } - _V1Api.prototype.getSelectedData = function(input) { - /// - var result = new OfficeExtension.ClientResult(); - result.__proto__ = null; - result.value = {}; - return result; - } - _V1Api.prototype.gotoById = function(input) { - /// - var result = new OfficeExtension.ClientResult(); - result.__proto__ = null; - result.value = {}; - return result; - } - _V1Api.prototype.setSelectedData = function(input) { - /// - var result = new OfficeExtension.ClientResult(); - result.__proto__ = null; - result.value = {}; - return result; + _super.call(this, null); } + return RequestContext; + })(OfficeExtension.ClientRequestContext); + OfficeCore.RequestContext = RequestContext; + + OfficeCore.run = function (batch) { + /// + /// + /// Executes a batch script that performs actions on the OfficeCore object model, using a new RequestContext. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. + /// + /// + /// A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). + ///
+ /// The context parameter facilitates requests to the OfficeCore application. Since the Office add-in and the OfficeCore application run in two different processes, the RequestContext is required to get access to the OfficeCore object model from the add-in. + /// + ///
+ /// + /// + /// Executes a batch script that performs actions on the OfficeCore object model, using the RequestContext of a previously-created API object. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. + /// + /// + /// A previously-created API object. The batch will use the same RequestContext as the passed-in object, which means that any changes applied to the object will be picked up by "context.sync()". + /// + /// + /// A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). + ///
+ /// The context parameter facilitates requests to the OfficeCore application. Since the Office add-in and the OfficeCore application run in two different processes, the RequestContext is required to get access to the OfficeCore object model from the add-in. + /// + ///
+ /// + /// + /// Executes a batch script that performs actions on the OfficeCore object model, using the RequestContext of a previously-created API object. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. + /// + /// + /// An array of previously-created API objects. The array will be validated to make sure that all of the objects share the same context. The batch will use this shared RequestContext, which means that any changes applied to these objects will be picked up by "context.sync()". + /// + /// + /// A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). + ///
+ /// The context parameter facilitates requests to the OfficeCore application. Since the Office add-in and the OfficeCore application run in two different processes, the RequestContext is required to get access to the OfficeCore object model from the add-in. + /// + ///
+ arguments[arguments.length - 1](new OfficeCore.RequestContext()); + return new OfficeExtension.Promise(); + } +})(OfficeCore || (OfficeCore = {__proto__: null})); +OfficeCore.__proto__ = null; + - return _V1Api; - })(OfficeExtension.ClientObject); - Excel._V1Api = _V1Api; -})(Excel || (Excel = {__proto__: null})); var Excel; (function (Excel) { @@ -3354,7 +3281,7 @@ var Excel; } Application.prototype.suspendApiCalculationUntilNextSync = function() { /// - /// Suspends calculation until the next "context.sync()" is called. Once set, it is the developer's responsibility to re-calc the workbook, to ensure that any dependencies are propagated. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Suspends calculation until the next "context.sync()" is called. Once set, it is the developer's responsibility to re-calc the workbook, to ensure that any dependencies are propagated. [Api set: ExcelApi 1.6] /// /// } @@ -3425,9 +3352,6 @@ var Excel; remove: function (handler) { /// Handler for the event. return; - }, - removeAll: function () { - return; } }; Binding.prototype.onSelectionChanged = { @@ -3442,9 +3366,6 @@ var Excel; remove: function (handler) { /// Handler for the event. return; - }, - removeAll: function () { - return; } }; @@ -3659,11 +3580,11 @@ var Excel; var CellValueConditionalFormat = (function(_super) { __extends(CellValueConditionalFormat, _super); function CellValueConditionalFormat() { - /// Represents a cell value conditional format. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents a cell value conditional format. [Api set: ExcelApi 1.6] /// The request context associated with this object. /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. - /// Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Represents the Rule object on this conditional format. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. [Api set: ExcelApi 1.6] + /// Represents the Rule object on this conditional format. [Api set: ExcelApi 1.6] } CellValueConditionalFormat.prototype.load = function(option) { @@ -4676,7 +4597,7 @@ var Excel; } ChartSeriesCollection.prototype.getItemAt = function(index) { /// - /// Retrieves a series based on its position in the collection [Api set: ExcelApi 1.1] + /// Retrieves a series based on its position in the collection. [Api set: ExcelApi 1.1] /// /// Index value of the object to be retrieved. Zero-indexed. /// @@ -4905,13 +4826,14 @@ var Excel; var Excel; (function (Excel) { - /// [Api set: ExcelApi 1.1 for All/Formats/Contents, 1.7 for Hyperlinks.] + /// [Api set: ExcelApi 1.1 for All/Formats/Contents, 1.7 for Hyperlinks & HyperlinksAndFormats.] var ClearApplyTo = { __proto__: null, "all": "all", "formats": "formats", "contents": "contents", "hyperlinks": "hyperlinks", + "removeHyperlinks": "removeHyperlinks", } Excel.ClearApplyTo = ClearApplyTo; })(Excel || (Excel = {__proto__: null})); @@ -4921,11 +4843,11 @@ var Excel; var ColorScaleConditionalFormat = (function(_super) { __extends(ColorScaleConditionalFormat, _super); function ColorScaleConditionalFormat() { - /// Represents an IconSet criteria for conditional formatting. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents an IconSet criteria for conditional formatting. [Api set: ExcelApi 1.6] /// The request context associated with this object. /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. - /// The criteria of the color scale. Midpoint is optional when using a two point color scale. [Api set: ExcelApi 1.6 (PREVIEW)] - /// If true the color scale will have three points (minimum, midpoint, maximum), otherwise it will have two (minimum, maximum). [Api set: ExcelApi 1.6 (PREVIEW)] + /// The criteria of the color scale. Midpoint is optional when using a two point color scale. [Api set: ExcelApi 1.6] + /// If true the color scale will have three points (minimum, midpoint, maximum), otherwise it will have two (minimum, maximum). [Api set: ExcelApi 1.6] } ColorScaleConditionalFormat.prototype.load = function(option) { @@ -4958,7 +4880,7 @@ var Excel; var Excel; (function (Excel) { - /// Represents the operator of the text conditional format type. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents the operator of the text conditional format type. [Api set: ExcelApi 1.6] var ConditionalCellValueOperator = { __proto__: null, "invalid": "invalid", @@ -4980,10 +4902,10 @@ var Excel; (function (Interfaces) { var ConditionalCellValueRule = (function() { function ConditionalCellValueRule() { - /// Represents a Cell Value Conditional Format Rule [Api set: ExcelApi 1.6 (PREVIEW)] - /// The formula, if required, to evaluate the conditional format rule on. [Api set: ExcelApi 1.6 (PREVIEW)] - /// The formula, if required, to evaluate the conditional format rule on. [Api set: ExcelApi 1.6 (PREVIEW)] - /// The operator of the text conditional format. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents a Cell Value Conditional Format Rule [Api set: ExcelApi 1.6] + /// The formula, if required, to evaluate the conditional format rule on. [Api set: ExcelApi 1.6] + /// The formula, if required, to evaluate the conditional format rule on. [Api set: ExcelApi 1.6] + /// The operator of the text conditional format. [Api set: ExcelApi 1.6] } return ConditionalCellValueRule; })(); @@ -4998,10 +4920,10 @@ var Excel; (function (Interfaces) { var ConditionalColorScaleCriteria = (function() { function ConditionalColorScaleCriteria() { - /// Represents the criteria of the color scale. [Api set: ExcelApi 1.6 (PREVIEW)] - /// The maximum point Color Scale Criterion. [Api set: ExcelApi 1.6 (PREVIEW)] - /// The midpoint Color Scale Criterion if the color scale is a 3-color scale. [Api set: ExcelApi 1.6 (PREVIEW)] - /// The minimum point Color Scale Criterion. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents the criteria of the color scale. [Api set: ExcelApi 1.6] + /// The maximum point Color Scale Criterion. [Api set: ExcelApi 1.6] + /// The midpoint Color Scale Criterion if the color scale is a 3-color scale. [Api set: ExcelApi 1.6] + /// The minimum point Color Scale Criterion. [Api set: ExcelApi 1.6] } return ConditionalColorScaleCriteria; })(); @@ -5016,10 +4938,10 @@ var Excel; (function (Interfaces) { var ConditionalColorScaleCriterion = (function() { function ConditionalColorScaleCriterion() { - /// Represents a Color Scale Criterion which contains a type, value and a color. [Api set: ExcelApi 1.6 (PREVIEW)] - /// HTML color code representation of the color scale color. E.g. #FF0000 represents Red. [Api set: ExcelApi 1.6 (PREVIEW)] - /// A number, a formula, or null (if Type is LowestValue). [Api set: ExcelApi 1.6 (PREVIEW)] - /// What the icon conditional formula should be based on. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents a Color Scale Criterion which contains a type, value and a color. [Api set: ExcelApi 1.6] + /// HTML color code representation of the color scale color. E.g. #FF0000 represents Red. [Api set: ExcelApi 1.6] + /// A number, a formula, or null (if Type is LowestValue). [Api set: ExcelApi 1.6] + /// What the icon conditional formula should be based on. [Api set: ExcelApi 1.6] } return ConditionalColorScaleCriterion; })(); @@ -5030,7 +4952,7 @@ var Excel; var Excel; (function (Excel) { - /// Represents the format options for a Data Bar Axis. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents the format options for a Data Bar Axis. [Api set: ExcelApi 1.6] var ConditionalDataBarAxisFormat = { __proto__: null, "automatic": "automatic", @@ -5042,7 +4964,7 @@ var Excel; var Excel; (function (Excel) { - /// Represents the Data Bar direction within a cell. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents the Data Bar direction within a cell. [Api set: ExcelApi 1.6] var ConditionalDataBarDirection = { __proto__: null, "context": "context", @@ -5057,13 +4979,13 @@ var Excel; var ConditionalDataBarNegativeFormat = (function(_super) { __extends(ConditionalDataBarNegativeFormat, _super); function ConditionalDataBarNegativeFormat() { - /// Represents a conditional format DataBar Format for the negative side of the data bar. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents a conditional format DataBar Format for the negative side of the data bar. [Api set: ExcelApi 1.6] /// The request context associated with this object. /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. - /// HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). "Empty String" if no border is present or set. [Api set: ExcelApi 1.6 (PREVIEW)] - /// HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). [Api set: ExcelApi 1.6 (PREVIEW)] - /// Boolean representation of whether or not the negative DataBar has the same border color as the positive DataBar. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Boolean representation of whether or not the negative DataBar has the same fill color as the positive DataBar. [Api set: ExcelApi 1.6 (PREVIEW)] + /// HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). "Empty String" if no border is present or set. [Api set: ExcelApi 1.6] + /// HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). [Api set: ExcelApi 1.6] + /// Boolean representation of whether or not the negative DataBar has the same border color as the positive DataBar. [Api set: ExcelApi 1.6] + /// Boolean representation of whether or not the negative DataBar has the same fill color as the positive DataBar. [Api set: ExcelApi 1.6] } ConditionalDataBarNegativeFormat.prototype.load = function(option) { @@ -5099,12 +5021,12 @@ var Excel; var ConditionalDataBarPositiveFormat = (function(_super) { __extends(ConditionalDataBarPositiveFormat, _super); function ConditionalDataBarPositiveFormat() { - /// Represents a conditional format DataBar Format for the positive side of the data bar. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents a conditional format DataBar Format for the positive side of the data bar. [Api set: ExcelApi 1.6] /// The request context associated with this object. /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. - /// HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). "" (empty string) if no border is present or set. [Api set: ExcelApi 1.6 (PREVIEW)] - /// HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). [Api set: ExcelApi 1.6 (PREVIEW)] - /// Boolean representation of whether or not the DataBar has a gradient. [Api set: ExcelApi 1.6 (PREVIEW)] + /// HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). "" (empty string) if no border is present or set. [Api set: ExcelApi 1.6] + /// HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). [Api set: ExcelApi 1.6] + /// Boolean representation of whether or not the DataBar has a gradient. [Api set: ExcelApi 1.6] } ConditionalDataBarPositiveFormat.prototype.load = function(option) { @@ -5141,9 +5063,9 @@ var Excel; (function (Interfaces) { var ConditionalDataBarRule = (function() { function ConditionalDataBarRule() { - /// Represents a rule-type for a Data Bar. [Api set: ExcelApi 1.6 (PREVIEW)] - /// The formula, if required, to evaluate the databar rule on. [Api set: ExcelApi 1.6 (PREVIEW)] - /// The type of rule for the databar. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents a rule-type for a Data Bar. [Api set: ExcelApi 1.6] + /// The formula, if required, to evaluate the databar rule on. [Api set: ExcelApi 1.6] + /// The type of rule for the databar. [Api set: ExcelApi 1.6] } return ConditionalDataBarRule; })(); @@ -5157,28 +5079,29 @@ var Excel; var ConditionalFormat = (function(_super) { __extends(ConditionalFormat, _super); function ConditionalFormat() { - /// An object encapsulating a conditional format's range, format, rule, and other properties. [Api set: ExcelApi 1.6 (PREVIEW)] + /// An object encapsulating a conditional format's range, format, rule, and other properties. [Api set: ExcelApi 1.6] /// The request context associated with this object. /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. - /// Returns the cell value conditional format properties if the current conditional format is a CellValue type. For example to format all cells between 5 and 10. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the cell value conditional format properties if the current conditional format is a CellValue type. For example to format all cells between 5 and 10. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the custom conditional format properties if the current conditional format is a custom type. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the custom conditional format properties if the current conditional format is a custom type. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the data bar properties if the current conditional format is a data bar. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the data bar properties if the current conditional format is a data bar. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the IconSet conditional format properties if the current conditional format is an IconSet type. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the IconSet conditional format properties if the current conditional format is an IconSet type. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror properties. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror properties. [Api set: ExcelApi 1.6 (PREVIEW)] - /// The priority (or index) within the conditional format collection that this conditional format currently exists in. Changing this also changes other conditional formats' priorities, to allow for a contiguous priority order. Use a negative priority to begin from the back. Priorities greater than than bounds will get and set to the maximum (or minimum if negative) priority. [Api set: ExcelApi 1.6 (PREVIEW)] - /// If the conditions of this conditional format are met, no lower-priority formats shall take effect on that cell. Null on databars, icon sets, and colorscales as there's no concept of StopIfTrue for these [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the specific text conditional format properties if the current conditional format is a text type. For example to format cells matching the word "Text". [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the specific text conditional format properties if the current conditional format is a text type. For example to format cells matching the word "Text". [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. For example to format the top 10% or bottom 10 items. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. For example to format the top 10% or bottom 10 items. [Api set: ExcelApi 1.6 (PREVIEW)] - /// A type of conditional format. Only one can be set at a time. Read-Only. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Returns the cell value conditional format properties if the current conditional format is a CellValue type. For example to format all cells between 5 and 10. [Api set: ExcelApi 1.6] + /// Returns the cell value conditional format properties if the current conditional format is a CellValue type. For example to format all cells between 5 and 10. [Api set: ExcelApi 1.6] + /// Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. [Api set: ExcelApi 1.6] + /// Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. [Api set: ExcelApi 1.6] + /// Returns the custom conditional format properties if the current conditional format is a custom type. [Api set: ExcelApi 1.6] + /// Returns the custom conditional format properties if the current conditional format is a custom type. [Api set: ExcelApi 1.6] + /// Returns the data bar properties if the current conditional format is a data bar. [Api set: ExcelApi 1.6] + /// Returns the data bar properties if the current conditional format is a data bar. [Api set: ExcelApi 1.6] + /// Returns the IconSet conditional format properties if the current conditional format is an IconSet type. [Api set: ExcelApi 1.6] + /// Returns the IconSet conditional format properties if the current conditional format is an IconSet type. [Api set: ExcelApi 1.6] + /// The Priority of the Conditional Format within the current ConditionalFormatCollection. [Api set: ExcelApi 1.6] + /// Returns the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror properties. [Api set: ExcelApi 1.6] + /// Returns the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror properties. [Api set: ExcelApi 1.6] + /// The priority (or index) within the conditional format collection that this conditional format currently exists in. Changing this also changes other conditional formats' priorities, to allow for a contiguous priority order. Use a negative priority to begin from the back. Priorities greater than than bounds will get and set to the maximum (or minimum if negative) priority. Also note that if you change the priority, you have to re-fetch a new copy of the object at that new priority location if you want to make further changes to it. [Api set: ExcelApi 1.6] + /// If the conditions of this conditional format are met, no lower-priority formats shall take effect on that cell. Null on databars, icon sets, and colorscales as there's no concept of StopIfTrue for these [Api set: ExcelApi 1.6] + /// Returns the specific text conditional format properties if the current conditional format is a text type. For example to format cells matching the word "Text". [Api set: ExcelApi 1.6] + /// Returns the specific text conditional format properties if the current conditional format is a text type. For example to format cells matching the word "Text". [Api set: ExcelApi 1.6] + /// Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. For example to format the top 10% or bottom 10 items. [Api set: ExcelApi 1.6] + /// Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. For example to format the top 10% or bottom 10 items. [Api set: ExcelApi 1.6] + /// A type of conditional format. Only one can be set at a time. Read-Only. [Api set: ExcelApi 1.6] } ConditionalFormat.prototype.load = function(option) { @@ -5205,19 +5128,19 @@ var Excel; } ConditionalFormat.prototype.delete = function() { /// - /// Deletes this conditional format. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Deletes this conditional format. [Api set: ExcelApi 1.6] /// /// } ConditionalFormat.prototype.getRange = function() { /// - /// Returns the range the conditonal format is applied to or a null object if the range is discontiguous. Read-only. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Returns the range the conditonal format is applied to or a null object if the range is discontiguous. Read-only. [Api set: ExcelApi 1.6] /// /// } ConditionalFormat.prototype.getRangeOrNullObject = function() { /// - /// Returns the range the conditonal format is applied to or a null object if the range is discontiguous. Read-only. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Returns the range the conditonal format is applied to or a null object if the range is discontiguous. Read-only. [Api set: ExcelApi 1.6] /// /// } @@ -5232,7 +5155,7 @@ var Excel; var ConditionalFormatCollection = (function(_super) { __extends(ConditionalFormatCollection, _super); function ConditionalFormatCollection() { - /// Represents a collection of all the conditional formats that are overlap the range. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents a collection of all the conditional formats that are overlap the range. [Api set: ExcelApi 1.6] /// The request context associated with this object. /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. /// Gets the loaded child items in this collection. @@ -5247,20 +5170,20 @@ var Excel; } ConditionalFormatCollection.prototype.add = function(type) { /// - /// Adds a new conditional format to the collection at the first/top priority. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Adds a new conditional format to the collection at the first/top priority. [Api set: ExcelApi 1.6] /// /// The type of conditional format being added. See Excel.ConditionalFormatType for details. /// } ConditionalFormatCollection.prototype.clearAll = function() { /// - /// Clears all conditional formats active on the current specified range. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Clears all conditional formats active on the current specified range. [Api set: ExcelApi 1.6] /// /// } ConditionalFormatCollection.prototype.getCount = function() { /// - /// Returns the number of conditional formats in the workbook. Read-only. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Returns the number of conditional formats in the workbook. Read-only. [Api set: ExcelApi 1.6] /// /// var result = new OfficeExtension.ClientResult(); @@ -5268,9 +5191,16 @@ var Excel; result.value = 0; return result; } + ConditionalFormatCollection.prototype.getItem = function(id) { + /// + /// Returns a conditional format for the given ID. [Api set: ExcelApi 1.6] + /// + /// The id of the conditional format. + /// Conditional Format object. + } ConditionalFormatCollection.prototype.getItemAt = function(index) { /// - /// Returns a conditional format at the given index. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Returns a conditional format at the given index. [Api set: ExcelApi 1.6] /// /// Index of the conditional formats to be retrieved. /// @@ -5283,7 +5213,7 @@ var Excel; var Excel; (function (Excel) { - /// Represents the types of conditional format values. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents the types of conditional format values. [Api set: ExcelApi 1.6] var ConditionalFormatColorCriterionType = { __proto__: null, "invalid": "invalid", @@ -5299,7 +5229,7 @@ var Excel; var Excel; (function (Excel) { - /// Represents the direction for a selection. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents the direction for a selection. [Api set: ExcelApi 1.6] var ConditionalFormatDirection = { __proto__: null, "top": "top", @@ -5310,7 +5240,7 @@ var Excel; var Excel; (function (Excel) { - /// Represents the types of conditional format values. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents the types of conditional format values. [Api set: ExcelApi 1.6] var ConditionalFormatIconRuleType = { __proto__: null, "invalid": "invalid", @@ -5324,7 +5254,7 @@ var Excel; var Excel; (function (Excel) { - /// Represents the criteria for the Preset Criteria conditional format type. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents the criteria for the Preset Criteria conditional format type. [Api set: ExcelApi 1.6] var ConditionalFormatPresetCriterion = { __proto__: null, "invalid": "invalid", @@ -5363,12 +5293,12 @@ var Excel; var ConditionalFormatRule = (function(_super) { __extends(ConditionalFormatRule, _super); function ConditionalFormatRule() { - /// Represents a rule, for all traditional rule/format pairings. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents a rule, for all traditional rule/format pairings. [Api set: ExcelApi 1.6] /// The request context associated with this object. /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. - /// The formula, if required, to evaluate the conditional format rule on. [Api set: ExcelApi 1.6 (PREVIEW)] - /// The formula, if required, to evaluate the conditional format rule on in the user's language. [Api set: ExcelApi 1.6 (PREVIEW)] - /// The formula, if required, to evaluate the conditional format rule on in R1C1-style notation. [Api set: ExcelApi 1.6 (PREVIEW)] + /// The formula, if required, to evaluate the conditional format rule on. [Api set: ExcelApi 1.6] + /// The formula, if required, to evaluate the conditional format rule on in the user's language. [Api set: ExcelApi 1.6] + /// The formula, if required, to evaluate the conditional format rule on in R1C1-style notation. [Api set: ExcelApi 1.6] } ConditionalFormatRule.prototype.load = function(option) { @@ -5401,7 +5331,7 @@ var Excel; var Excel; (function (Excel) { - /// Represents the types of conditional format values. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents the types of conditional format values. [Api set: ExcelApi 1.6] var ConditionalFormatRuleType = { __proto__: null, "invalid": "invalid", @@ -5418,7 +5348,7 @@ var Excel; var Excel; (function (Excel) { - /// [Api set: ExcelApi 1.6 (PREVIEW)] + /// [Api set: ExcelApi 1.6] var ConditionalFormatType = { __proto__: null, "custom": "custom", @@ -5439,11 +5369,11 @@ var Excel; (function (Interfaces) { var ConditionalIconCriterion = (function() { function ConditionalIconCriterion() { - /// Represents an Icon Criterion which contains a type, value, an Operator, and an optional custom icon, if not using an iconset. [Api set: ExcelApi 1.6 (PREVIEW)] - /// The custom icon for the current criterion if different from the default IconSet, else null will be returned. [Api set: ExcelApi 1.6 (PREVIEW)] - /// A number or a formula depending on the type. [Api set: ExcelApi 1.6 (PREVIEW)] - /// GreaterThan or GreaterThanOrEqual for each of the rule type for the Icon conditional format. [Api set: ExcelApi 1.6 (PREVIEW)] - /// What the icon conditional formula should be based on. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents an Icon Criterion which contains a type, value, an Operator, and an optional custom icon, if not using an iconset. [Api set: ExcelApi 1.6] + /// The custom icon for the current criterion if different from the default IconSet, else null will be returned. [Api set: ExcelApi 1.6] + /// A number or a formula depending on the type. [Api set: ExcelApi 1.6] + /// GreaterThan or GreaterThanOrEqual for each of the rule type for the Icon conditional format. [Api set: ExcelApi 1.6] + /// What the icon conditional formula should be based on. [Api set: ExcelApi 1.6] } return ConditionalIconCriterion; })(); @@ -5454,7 +5384,7 @@ var Excel; var Excel; (function (Excel) { - /// Represents the operator for each icon criteria. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents the operator for each icon criteria. [Api set: ExcelApi 1.6] var ConditionalIconCriterionOperator = { __proto__: null, "invalid": "invalid", @@ -5470,8 +5400,8 @@ var Excel; (function (Interfaces) { var ConditionalPresetCriteriaRule = (function() { function ConditionalPresetCriteriaRule() { - /// Represents the Preset Criteria Conditional Format Rule [Api set: ExcelApi 1.6 (PREVIEW)] - /// The criterion of the conditional format. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents the Preset Criteria Conditional Format Rule [Api set: ExcelApi 1.6] + /// The criterion of the conditional format. [Api set: ExcelApi 1.6] } return ConditionalPresetCriteriaRule; })(); @@ -5485,12 +5415,12 @@ var Excel; var ConditionalRangeBorder = (function(_super) { __extends(ConditionalRangeBorder, _super); function ConditionalRangeBorder() { - /// Represents the border of an object. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents the border of an object. [Api set: ExcelApi 1.6] /// The request context associated with this object. /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. - /// HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). [Api set: ExcelApi 1.6 (PREVIEW)] - /// Constant value that indicates the specific side of the border. See Excel.ConditionalRangeBorderIndex for details. Read-only. [Api set: ExcelApi 1.6 (PREVIEW)] - /// One of the constants of line style specifying the line style for the border. See Excel.BorderLineStyle for details. [Api set: ExcelApi 1.6 (PREVIEW)] + /// HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). [Api set: ExcelApi 1.6] + /// Constant value that indicates the specific side of the border. See Excel.ConditionalRangeBorderIndex for details. Read-only. [Api set: ExcelApi 1.6] + /// One of the constants of line style specifying the line style for the border. See Excel.BorderLineStyle for details. [Api set: ExcelApi 1.6] } ConditionalRangeBorder.prototype.load = function(option) { @@ -5526,14 +5456,14 @@ var Excel; var ConditionalRangeBorderCollection = (function(_super) { __extends(ConditionalRangeBorderCollection, _super); function ConditionalRangeBorderCollection() { - /// Represents the border objects that make up range border. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents the border objects that make up range border. [Api set: ExcelApi 1.6] /// The request context associated with this object. /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. - /// Gets the top border [Api set: ExcelApi 1.6 (PREVIEW)] - /// Number of border objects in the collection. Read-only. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Gets the top border [Api set: ExcelApi 1.6 (PREVIEW)] - /// Gets the top border [Api set: ExcelApi 1.6 (PREVIEW)] - /// Gets the top border [Api set: ExcelApi 1.6 (PREVIEW)] + /// Gets the top border [Api set: ExcelApi 1.6] + /// Number of border objects in the collection. Read-only. [Api set: ExcelApi 1.6] + /// Gets the top border [Api set: ExcelApi 1.6] + /// Gets the top border [Api set: ExcelApi 1.6] + /// Gets the top border [Api set: ExcelApi 1.6] /// Gets the loaded child items in this collection. } @@ -5544,16 +5474,31 @@ var Excel; /// /// } + + ConditionalRangeBorderCollection.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Excel.Interfaces.ConditionalRangeBorderCollectionUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing ConditionalRangeBorderCollection object, with properties that have already been loaded and synced. + /// + } ConditionalRangeBorderCollection.prototype.getItem = function(index) { /// - /// Gets a border object using its name [Api set: ExcelApi 1.6 (PREVIEW)] + /// Gets a border object using its name [Api set: ExcelApi 1.6] /// /// Index value of the border object to be retrieved. See Excel.ConditionalRangeBorderIndex for details. /// } ConditionalRangeBorderCollection.prototype.getItemAt = function(index) { /// - /// Gets a border object using its index [Api set: ExcelApi 1.6 (PREVIEW)] + /// Gets a border object using its index [Api set: ExcelApi 1.6] /// /// Index value of the object to be retrieved. Zero-indexed. /// @@ -5566,7 +5511,7 @@ var Excel; var Excel; (function (Excel) { - /// [Api set: ExcelApi 1.6 (PREVIEW)] + /// [Api set: ExcelApi 1.6] var ConditionalRangeBorderIndex = { __proto__: null, "edgeTop": "edgeTop", @@ -5579,7 +5524,7 @@ var Excel; var Excel; (function (Excel) { - /// [Api set: ExcelApi 1.6 (PREVIEW)] + /// [Api set: ExcelApi 1.6] var ConditionalRangeBorderLineStyle = { __proto__: null, "none": "none", @@ -5597,10 +5542,10 @@ var Excel; var ConditionalRangeFill = (function(_super) { __extends(ConditionalRangeFill, _super); function ConditionalRangeFill() { - /// Represents the background of a conditional range object. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents the background of a conditional range object. [Api set: ExcelApi 1.6] /// The request context associated with this object. /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. - /// HTML color code representing the color of the fill, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). [Api set: ExcelApi 1.6 (PREVIEW)] + /// HTML color code representing the color of the fill, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). [Api set: ExcelApi 1.6] } ConditionalRangeFill.prototype.load = function(option) { @@ -5627,7 +5572,7 @@ var Excel; } ConditionalRangeFill.prototype.clear = function() { /// - /// Resets the fill. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Resets the fill. [Api set: ExcelApi 1.6] /// /// } @@ -5642,14 +5587,14 @@ var Excel; var ConditionalRangeFont = (function(_super) { __extends(ConditionalRangeFont, _super); function ConditionalRangeFont() { - /// This object represents the font attributes (font style,, color, etc.) for an object. [Api set: ExcelApi 1.6 (PREVIEW)] + /// This object represents the font attributes (font style,, color, etc.) for an object. [Api set: ExcelApi 1.6] /// The request context associated with this object. /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. - /// Represents the bold status of font. [Api set: ExcelApi 1.6 (PREVIEW)] - /// HTML color code representation of the text color. E.g. #FF0000 represents Red. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Represents the italic status of the font. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Represents the strikethrough status of the font. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Type of underline applied to the font. See Excel.ConditionalRangeFontUnderlineStyle for details. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents the bold status of font. [Api set: ExcelApi 1.6] + /// HTML color code representation of the text color. E.g. #FF0000 represents Red. [Api set: ExcelApi 1.6] + /// Represents the italic status of the font. [Api set: ExcelApi 1.6] + /// Represents the strikethrough status of the font. [Api set: ExcelApi 1.6] + /// Type of underline applied to the font. See Excel.ConditionalRangeFontUnderlineStyle for details. [Api set: ExcelApi 1.6] } ConditionalRangeFont.prototype.load = function(option) { @@ -5676,7 +5621,7 @@ var Excel; } ConditionalRangeFont.prototype.clear = function() { /// - /// Resets the font formats. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Resets the font formats. [Api set: ExcelApi 1.6] /// /// } @@ -5688,7 +5633,7 @@ var Excel; var Excel; (function (Excel) { - /// [Api set: ExcelApi 1.6 (PREVIEW)] + /// [Api set: ExcelApi 1.6] var ConditionalRangeFontUnderlineStyle = { __proto__: null, "none": "none", @@ -5703,13 +5648,13 @@ var Excel; var ConditionalRangeFormat = (function(_super) { __extends(ConditionalRangeFormat, _super); function ConditionalRangeFormat() { - /// A format object encapsulating the conditional formats range's font, fill, borders, and other properties. [Api set: ExcelApi 1.6 (PREVIEW)] + /// A format object encapsulating the conditional formats range's font, fill, borders, and other properties. [Api set: ExcelApi 1.6] /// The request context associated with this object. /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. - /// Collection of border objects that apply to the overall conditional format range. Read-only. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the fill object defined on the overall conditional format range. Read-only. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the font object defined on the overall conditional format range. Read-only. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Represents Excel's number format code for the given range. Cleared if null is passed in. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Collection of border objects that apply to the overall conditional format range. Read-only. [Api set: ExcelApi 1.6] + /// Returns the fill object defined on the overall conditional format range. Read-only. [Api set: ExcelApi 1.6] + /// Returns the font object defined on the overall conditional format range. Read-only. [Api set: ExcelApi 1.6] + /// Represents Excel's number format code for the given range. Cleared if null is passed in. [Api set: ExcelApi 1.6] } ConditionalRangeFormat.prototype.load = function(option) { @@ -5746,9 +5691,9 @@ var Excel; (function (Interfaces) { var ConditionalTextComparisonRule = (function() { function ConditionalTextComparisonRule() { - /// Represents a Cell Value Conditional Format Rule [Api set: ExcelApi 1.6 (PREVIEW)] - /// The operator of the text conditional format. [Api set: ExcelApi 1.6 (PREVIEW)] - /// The Text value of conditional format. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents a Cell Value Conditional Format Rule [Api set: ExcelApi 1.6] + /// The operator of the text conditional format. [Api set: ExcelApi 1.6] + /// The Text value of conditional format. [Api set: ExcelApi 1.6] } return ConditionalTextComparisonRule; })(); @@ -5759,7 +5704,7 @@ var Excel; var Excel; (function (Excel) { - /// Represents the operator of the text conditional format type. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents the operator of the text conditional format type. [Api set: ExcelApi 1.6] var ConditionalTextOperator = { __proto__: null, "invalid": "invalid", @@ -5773,7 +5718,7 @@ var Excel; var Excel; (function (Excel) { - /// Represents the criteria for the above/below average conditional format type. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents the criteria for the above/below average conditional format type. [Api set: ExcelApi 1.6] var ConditionalTopBottomCriterionType = { __proto__: null, "invalid": "invalid", @@ -5791,9 +5736,9 @@ var Excel; (function (Interfaces) { var ConditionalTopBottomRule = (function() { function ConditionalTopBottomRule() { - /// Represents the rule of the top/bottom conditional format. [Api set: ExcelApi 1.6 (PREVIEW)] - /// The rank between 1 and 1000 for numeric ranks or 1 and 100 for percent ranks. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Format values based on the top or bottom rank. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents the rule of the top/bottom conditional format. [Api set: ExcelApi 1.6] + /// The rank between 1 and 1000 for numeric ranks or 1 and 100 for percent ranks. [Api set: ExcelApi 1.6] + /// Format values based on the top or bottom rank. [Api set: ExcelApi 1.6] } return ConditionalTopBottomRule; })(); @@ -5807,11 +5752,11 @@ var Excel; var CustomConditionalFormat = (function(_super) { __extends(CustomConditionalFormat, _super); function CustomConditionalFormat() { - /// Represents a custom conditional format type. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents a custom conditional format type. [Api set: ExcelApi 1.6] /// The request context associated with this object. /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. - /// Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Represents the Rule object on this conditional format. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. [Api set: ExcelApi 1.6] + /// Represents the Rule object on this conditional format. [Api set: ExcelApi 1.6] } CustomConditionalFormat.prototype.load = function(option) { @@ -6017,17 +5962,17 @@ var Excel; var DataBarConditionalFormat = (function(_super) { __extends(DataBarConditionalFormat, _super); function DataBarConditionalFormat() { - /// Represents an Excel Conditional Data Bar Type. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents an Excel Conditional Data Bar Type. [Api set: ExcelApi 1.6] /// The request context associated with this object. /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. - /// HTML color code representing the color of the Axis line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). "" (empty string) if no axis is present or set. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Representation of how the axis is determined for an Excel data bar. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Represents the direction that the data bar graphic should be based on. [Api set: ExcelApi 1.6 (PREVIEW)] - /// The rule for what consistutes the lower bound (and how to calculate it, if applicable) for a data bar. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Representation of all values to the left of the axis in an Excel data bar. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Representation of all values to the right of the axis in an Excel data bar. [Api set: ExcelApi 1.6 (PREVIEW)] - /// If true, hides the values from the cells where the data bar is applied. [Api set: ExcelApi 1.6 (PREVIEW)] - /// The rule for what constitutes the upper bound (and how to calculate it, if applicable) for a data bar. [Api set: ExcelApi 1.6 (PREVIEW)] + /// HTML color code representing the color of the Axis line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). "" (empty string) if no axis is present or set. [Api set: ExcelApi 1.6] + /// Representation of how the axis is determined for an Excel data bar. [Api set: ExcelApi 1.6] + /// Represents the direction that the data bar graphic should be based on. [Api set: ExcelApi 1.6] + /// The rule for what consistutes the lower bound (and how to calculate it, if applicable) for a data bar. [Api set: ExcelApi 1.6] + /// Representation of all values to the left of the axis in an Excel data bar. [Api set: ExcelApi 1.6] + /// Representation of all values to the right of the axis in an Excel data bar. [Api set: ExcelApi 1.6] + /// If true, hides the values from the cells where the data bar is applied. [Api set: ExcelApi 1.6] + /// The rule for what constitutes the upper bound (and how to calculate it, if applicable) for a data bar. [Api set: ExcelApi 1.6] } DataBarConditionalFormat.prototype.load = function(option) { @@ -9475,13 +9420,13 @@ var Excel; var IconSetConditionalFormat = (function(_super) { __extends(IconSetConditionalFormat, _super); function IconSetConditionalFormat() { - /// Represents an IconSet criteria for conditional formatting. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents an IconSet criteria for conditional formatting. [Api set: ExcelApi 1.6] /// The request context associated with this object. /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. - /// An array of Criteria and IconSets for the rules and potential custom icons for conditional icons. Note that for the first criterion only the custom icon can be modified, while type, formula and operator will be ignored when set. [Api set: ExcelApi 1.6 (PREVIEW)] - /// If true, reverses the icon orders for the IconSet. Note that this cannot be set if custom icons are used. [Api set: ExcelApi 1.6 (PREVIEW)] - /// If true, hides the values and only shows icons. [Api set: ExcelApi 1.6 (PREVIEW)] - /// If set, displays the IconSet option for the conditional format. [Api set: ExcelApi 1.6 (PREVIEW)] + /// An array of Criteria and IconSets for the rules and potential custom icons for conditional icons. Note that for the first criterion only the custom icon can be modified, while type, formula and operator will be ignored when set. [Api set: ExcelApi 1.6] + /// If true, reverses the icon orders for the IconSet. Note that this cannot be set if custom icons are used. [Api set: ExcelApi 1.6] + /// If true, hides the values and only shows icons. [Api set: ExcelApi 1.6] + /// If set, displays the IconSet option for the conditional format. [Api set: ExcelApi 1.6] } IconSetConditionalFormat.prototype.load = function(option) { @@ -9546,7 +9491,7 @@ var Excel; /// Represents the comment associated with this name. [Api set: ExcelApi 1.4] /// The name of the object. Read-only. [Api set: ExcelApi 1.1] /// Indicates whether the name is scoped to the workbook or to a specific worksheet. Read-only. [Api set: ExcelApi 1.4] - /// Indicates the type of the value returned by the name's formula. See Excel.NamedItemType for details. Read-only. [Api set: ExcelApi 1.1] + /// Indicates the type of the value returned by the name's formula. See Excel.NamedItemType for details. Read-only. [Api set: ExcelApi 1.1 for String,Integer,Double,Boolean,Range,Error; 1.7 for Array] /// Represents the value computed by the name's formula. For a named range, will return the range address. Read-only. [Api set: ExcelApi 1.1] /// Specifies whether the object is visible or not. [Api set: ExcelApi 1.1] /// Returns the worksheet on which the named item is scoped to. Throws an error if the items is scoped to the workbook instead. [Api set: ExcelApi 1.4] @@ -9678,7 +9623,7 @@ var Excel; var Excel; (function (Excel) { - /// [Api set: ExcelApi 1.1] + /// [Api set: ExcelApi 1.1 for String,Integer,Double,Boolean,Range,Error; 1.7 for Array] var NamedItemType = { __proto__: null, "string": "string", @@ -9687,6 +9632,7 @@ var Excel; "boolean": "boolean", "range": "range", "error": "error", + "array": "array", } Excel.NamedItemType = NamedItemType; })(Excel || (Excel = {__proto__: null})); @@ -9797,11 +9743,11 @@ var Excel; var PresetCriteriaConditionalFormat = (function(_super) { __extends(PresetCriteriaConditionalFormat, _super); function PresetCriteriaConditionalFormat() { - /// Represents the the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents the the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror. [Api set: ExcelApi 1.6] /// The request context associated with this object. /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. - /// Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. [Api set: ExcelApi 1.6 (PREVIEW)] - /// The rule of the conditional format. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. [Api set: ExcelApi 1.6] + /// The rule of the conditional format. [Api set: ExcelApi 1.6] } PresetCriteriaConditionalFormat.prototype.load = function(option) { @@ -9846,7 +9792,7 @@ var Excel; /// Represents the total number of columns in the range. Read-only. [Api set: ExcelApi 1.1] /// Represents if all columns of the current range are hidden. [Api set: ExcelApi 1.2] /// Represents the column number of the first cell in the range. Zero-indexed. Read-only. [Api set: ExcelApi 1.1] - /// Collection of ConditionalFormats that intersect the range. Read-only. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Collection of ConditionalFormats that intersect the range. Read-only. [Api set: ExcelApi 1.6] /// Returns a format object, encapsulating the range's font, fill, borders, alignment, and other properties. Read-only. [Api set: ExcelApi 1.1] /// Represents the formula in A1-style notation. [Api set: ExcelApi 1.1] /// Represents the formula in A1-style notation, in the user's language and number-formatting locale. For example, the English "=SUM(A1, 1.5)" formula would become "=SUMME(A1; 1,5)" in German. [Api set: ExcelApi 1.1] @@ -9887,7 +9833,7 @@ var Excel; } Range.prototype.calculate = function() { /// - /// Calculates a range of cells on a worksheet. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Calculates a range of cells on a worksheet. [Api set: ExcelApi 1.6] /// /// } @@ -10383,7 +10329,7 @@ var Excel; var Excel; (function (Excel) { - /// [Api set: ExcelApi 1.1] + /// [Api set: ExcelApi 1.1 for Unknown, Empty, String, Integer, Double, Boolean, Error. 1.7 for RichValue] var RangeValueType = { __proto__: null, "unknown": "unknown", @@ -10393,6 +10339,7 @@ var Excel; "double": "double", "boolean": "boolean", "error": "error", + "richValue": "richValue", } Excel.RangeValueType = RangeValueType; })(Excel || (Excel = {__proto__: null})); @@ -10619,9 +10566,6 @@ var Excel; remove: function (handler) { /// Handler for the event. return; - }, - removeAll: function () { - return; } }; @@ -10736,7 +10680,7 @@ var Excel; /// Represents a collection of all the columns in the table. Read-only. [Api set: ExcelApi 1.1] /// Indicates whether the first column contains special formatting. [Api set: ExcelApi 1.3] /// Indicates whether the last column contains special formatting. [Api set: ExcelApi 1.3] - /// Returns a value that uniquely identifies the table in a given workbook. The value of the identifier remains the same even when the table is renamed. Read-only. [Api set: ExcelApi 1.1] + /// Returns a value that uniquely identifies the table in a given workbook. The value of the identifier remains the same even when the table is renamed. Read-only. [Api set: ExcelApi 1.1] /// Name of the table. [Api set: ExcelApi 1.1] /// Represents a collection of all the rows in the table. Read-only. [Api set: ExcelApi 1.1] /// Indicates whether the columns show banded formatting in which odd columns are highlighted differently from even ones to make reading the table easier. [Api set: ExcelApi 1.3] @@ -11181,11 +11125,11 @@ var Excel; var TextConditionalFormat = (function(_super) { __extends(TextConditionalFormat, _super); function TextConditionalFormat() { - /// Represents a specific text conditional format. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents a specific text conditional format. [Api set: ExcelApi 1.6] /// The request context associated with this object. /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. - /// Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. [Api set: ExcelApi 1.6 (PREVIEW)] - /// The rule of the conditional format. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. [Api set: ExcelApi 1.6] + /// The rule of the conditional format. [Api set: ExcelApi 1.6] } TextConditionalFormat.prototype.load = function(option) { @@ -11221,11 +11165,11 @@ var Excel; var TopBottomConditionalFormat = (function(_super) { __extends(TopBottomConditionalFormat, _super); function TopBottomConditionalFormat() { - /// Represents a Top/Bottom conditional format. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Represents a Top/Bottom conditional format. [Api set: ExcelApi 1.6] /// The request context associated with this object. /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. - /// Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. [Api set: ExcelApi 1.6 (PREVIEW)] - /// The criteria of the Top/Bottom conditional format. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. [Api set: ExcelApi 1.6] + /// The criteria of the Top/Bottom conditional format. [Api set: ExcelApi 1.6] } TopBottomConditionalFormat.prototype.load = function(option) { @@ -11303,10 +11247,10 @@ var Excel; /// Workbook is the top level object which contains related workbook objects such as worksheets, tables, ranges, etc. [Api set: ExcelApi 1.1] /// The request context associated with this object. /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. - /// Represents Excel application instance that contains this workbook. Read-only. [Api set: ExcelApi 1.1] + /// Represents the Excel application instance that contains this workbook. Read-only. [Api set: ExcelApi 1.1] /// Represents a collection of bindings that are part of the workbook. Read-only. [Api set: ExcelApi 1.1] /// Represents the collection of custom XML parts contained by this workbook. Read-only. [Api set: ExcelApi 1.5] - /// Represents Excel application instance that contains this workbook. Read-only. [Api set: ExcelApi 1.2] + /// Represents a collection of worksheet functions that can be used for computation. Read-only. [Api set: ExcelApi 1.2] /// Represents a collection of workbook scoped named items (named ranges and constants). Read-only. [Api set: ExcelApi 1.1] /// Represents a collection of PivotTables associated with the workbook. Read-only. [Api set: ExcelApi 1.3] /// Represents a collection of Settings associated with the workbook. Read-only. [Api set: ExcelApi 1.4] @@ -11340,9 +11284,6 @@ var Excel; remove: function (handler) { /// Handler for the event. return; - }, - removeAll: function () { - return; } }; @@ -11400,7 +11341,7 @@ var Excel; } Worksheet.prototype.calculate = function(markAllDirty) { /// - /// Calculates all cells on a worksheet. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Calculates all cells on a worksheet. [Api set: ExcelApi 1.6] /// /// } @@ -11565,17 +11506,19 @@ var Excel; /// /// } - WorksheetProtection.prototype.protect = function(options) { + WorksheetProtection.prototype.protect = function(options, password) { /// - /// Protects a worksheet. Fails if the worksheet has been protected. [Api set: ExcelApi 1.2] + /// Protects a worksheet. Fails if the worksheet has already been protected. [Api set: ExcelApi 1.2 for options; 1.7 for password] /// /// sheet protection options. + /// sheet protection password. /// } - WorksheetProtection.prototype.unprotect = function() { + WorksheetProtection.prototype.unprotect = function(password) { /// - /// Unprotects a worksheet. [Api set: ExcelApi 1.2] + /// Unprotects a worksheet. [Api set: ExcelApi BETA (PREVIEW ONLY) for password] /// + /// sheet protection password. /// } @@ -12225,24 +12168,24 @@ var Excel; var ConditionalFormatUpdateData = (function() { function ConditionalFormatUpdateData() { /// An interface for updating data on the ConditionalFormat object, for use in "conditionalFormat.set({ ... })". - /// Returns the cell value conditional format properties if the current conditional format is a CellValue type. For example to format all cells between 5 and 10. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the cell value conditional format properties if the current conditional format is a CellValue type. For example to format all cells between 5 and 10. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the custom conditional format properties if the current conditional format is a custom type. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the custom conditional format properties if the current conditional format is a custom type. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the data bar properties if the current conditional format is a data bar. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the data bar properties if the current conditional format is a data bar. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the IconSet conditional format properties if the current conditional format is an IconSet type. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the IconSet conditional format properties if the current conditional format is an IconSet type. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror properties. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror properties. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the specific text conditional format properties if the current conditional format is a text type. For example to format cells matching the word "Text". [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the specific text conditional format properties if the current conditional format is a text type. For example to format cells matching the word "Text". [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. For example to format the top 10% or bottom 10 items. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. For example to format the top 10% or bottom 10 items. [Api set: ExcelApi 1.6 (PREVIEW)] - /// The priority (or index) within the conditional format collection that this conditional format currently exists in. Changing this also changes other conditional formats' priorities, to allow for a contiguous priority order. Use a negative priority to begin from the back. Priorities greater than than bounds will get and set to the maximum (or minimum if negative) priority. [Api set: ExcelApi 1.6 (PREVIEW)]; - /// If the conditions of this conditional format are met, no lower-priority formats shall take effect on that cell. Null on databars, icon sets, and colorscales as there's no concept of StopIfTrue for these [Api set: ExcelApi 1.6 (PREVIEW)]; + /// Returns the cell value conditional format properties if the current conditional format is a CellValue type. For example to format all cells between 5 and 10. [Api set: ExcelApi 1.6] + /// Returns the cell value conditional format properties if the current conditional format is a CellValue type. For example to format all cells between 5 and 10. [Api set: ExcelApi 1.6] + /// Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. [Api set: ExcelApi 1.6] + /// Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. [Api set: ExcelApi 1.6] + /// Returns the custom conditional format properties if the current conditional format is a custom type. [Api set: ExcelApi 1.6] + /// Returns the custom conditional format properties if the current conditional format is a custom type. [Api set: ExcelApi 1.6] + /// Returns the data bar properties if the current conditional format is a data bar. [Api set: ExcelApi 1.6] + /// Returns the data bar properties if the current conditional format is a data bar. [Api set: ExcelApi 1.6] + /// Returns the IconSet conditional format properties if the current conditional format is an IconSet type. [Api set: ExcelApi 1.6] + /// Returns the IconSet conditional format properties if the current conditional format is an IconSet type. [Api set: ExcelApi 1.6] + /// Returns the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror properties. [Api set: ExcelApi 1.6] + /// Returns the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror properties. [Api set: ExcelApi 1.6] + /// Returns the specific text conditional format properties if the current conditional format is a text type. For example to format cells matching the word "Text". [Api set: ExcelApi 1.6] + /// Returns the specific text conditional format properties if the current conditional format is a text type. For example to format cells matching the word "Text". [Api set: ExcelApi 1.6] + /// Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. For example to format the top 10% or bottom 10 items. [Api set: ExcelApi 1.6] + /// Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. For example to format the top 10% or bottom 10 items. [Api set: ExcelApi 1.6] + /// The priority (or index) within the conditional format collection that this conditional format currently exists in. Changing this also changes other conditional formats' priorities, to allow for a contiguous priority order. Use a negative priority to begin from the back. Priorities greater than than bounds will get and set to the maximum (or minimum if negative) priority. Also note that if you change the priority, you have to re-fetch a new copy of the object at that new priority location if you want to make further changes to it. [Api set: ExcelApi 1.6]; + /// If the conditions of this conditional format are met, no lower-priority formats shall take effect on that cell. Null on databars, icon sets, and colorscales as there's no concept of StopIfTrue for these [Api set: ExcelApi 1.6]; } return ConditionalFormatUpdateData; })(); @@ -12258,14 +12201,14 @@ var Excel; var DataBarConditionalFormatUpdateData = (function() { function DataBarConditionalFormatUpdateData() { /// An interface for updating data on the DataBarConditionalFormat object, for use in "dataBarConditionalFormat.set({ ... })". - /// Representation of all values to the left of the axis in an Excel data bar. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Representation of all values to the right of the axis in an Excel data bar. [Api set: ExcelApi 1.6 (PREVIEW)] - /// HTML color code representing the color of the Axis line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). "" (empty string) if no axis is present or set. [Api set: ExcelApi 1.6 (PREVIEW)]; - /// Representation of how the axis is determined for an Excel data bar. [Api set: ExcelApi 1.6 (PREVIEW)]; - /// Represents the direction that the data bar graphic should be based on. [Api set: ExcelApi 1.6 (PREVIEW)]; - /// The rule for what consistutes the lower bound (and how to calculate it, if applicable) for a data bar. [Api set: ExcelApi 1.6 (PREVIEW)]; - /// If true, hides the values from the cells where the data bar is applied. [Api set: ExcelApi 1.6 (PREVIEW)]; - /// The rule for what constitutes the upper bound (and how to calculate it, if applicable) for a data bar. [Api set: ExcelApi 1.6 (PREVIEW)]; + /// Representation of all values to the left of the axis in an Excel data bar. [Api set: ExcelApi 1.6] + /// Representation of all values to the right of the axis in an Excel data bar. [Api set: ExcelApi 1.6] + /// HTML color code representing the color of the Axis line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). "" (empty string) if no axis is present or set. [Api set: ExcelApi 1.6]; + /// Representation of how the axis is determined for an Excel data bar. [Api set: ExcelApi 1.6]; + /// Represents the direction that the data bar graphic should be based on. [Api set: ExcelApi 1.6]; + /// The rule for what consistutes the lower bound (and how to calculate it, if applicable) for a data bar. [Api set: ExcelApi 1.6]; + /// If true, hides the values from the cells where the data bar is applied. [Api set: ExcelApi 1.6]; + /// The rule for what constitutes the upper bound (and how to calculate it, if applicable) for a data bar. [Api set: ExcelApi 1.6]; } return DataBarConditionalFormatUpdateData; })(); @@ -12281,9 +12224,9 @@ var Excel; var ConditionalDataBarPositiveFormatUpdateData = (function() { function ConditionalDataBarPositiveFormatUpdateData() { /// An interface for updating data on the ConditionalDataBarPositiveFormat object, for use in "conditionalDataBarPositiveFormat.set({ ... })". - /// HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). "" (empty string) if no border is present or set. [Api set: ExcelApi 1.6 (PREVIEW)]; - /// HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). [Api set: ExcelApi 1.6 (PREVIEW)]; - /// Boolean representation of whether or not the DataBar has a gradient. [Api set: ExcelApi 1.6 (PREVIEW)]; + /// HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). "" (empty string) if no border is present or set. [Api set: ExcelApi 1.6]; + /// HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). [Api set: ExcelApi 1.6]; + /// Boolean representation of whether or not the DataBar has a gradient. [Api set: ExcelApi 1.6]; } return ConditionalDataBarPositiveFormatUpdateData; })(); @@ -12299,10 +12242,10 @@ var Excel; var ConditionalDataBarNegativeFormatUpdateData = (function() { function ConditionalDataBarNegativeFormatUpdateData() { /// An interface for updating data on the ConditionalDataBarNegativeFormat object, for use in "conditionalDataBarNegativeFormat.set({ ... })". - /// HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). "Empty String" if no border is present or set. [Api set: ExcelApi 1.6 (PREVIEW)]; - /// HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). [Api set: ExcelApi 1.6 (PREVIEW)]; - /// Boolean representation of whether or not the negative DataBar has the same border color as the positive DataBar. [Api set: ExcelApi 1.6 (PREVIEW)]; - /// Boolean representation of whether or not the negative DataBar has the same fill color as the positive DataBar. [Api set: ExcelApi 1.6 (PREVIEW)]; + /// HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). "Empty String" if no border is present or set. [Api set: ExcelApi 1.6]; + /// HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). [Api set: ExcelApi 1.6]; + /// Boolean representation of whether or not the negative DataBar has the same border color as the positive DataBar. [Api set: ExcelApi 1.6]; + /// Boolean representation of whether or not the negative DataBar has the same fill color as the positive DataBar. [Api set: ExcelApi 1.6]; } return ConditionalDataBarNegativeFormatUpdateData; })(); @@ -12318,8 +12261,8 @@ var Excel; var CustomConditionalFormatUpdateData = (function() { function CustomConditionalFormatUpdateData() { /// An interface for updating data on the CustomConditionalFormat object, for use in "customConditionalFormat.set({ ... })". - /// Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Represents the Rule object on this conditional format. [Api set: ExcelApi 1.6 (PREVIEW)] + /// Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. [Api set: ExcelApi 1.6] + /// Represents the Rule object on this conditional format. [Api set: ExcelApi 1.6] } return CustomConditionalFormatUpdateData; })(); @@ -12335,9 +12278,9 @@ var Excel; var ConditionalFormatRuleUpdateData = (function() { function ConditionalFormatRuleUpdateData() { /// An interface for updating data on the ConditionalFormatRule object, for use in "conditionalFormatRule.set({ ... })". - /// The formula, if required, to evaluate the conditional format rule on. [Api set: ExcelApi 1.6 (PREVIEW)]; - /// The formula, if required, to evaluate the conditional format rule on in the user's language. [Api set: ExcelApi 1.6 (PREVIEW)]; - /// The formula, if required, to evaluate the conditional format rule on in R1C1-style notation. [Api set: ExcelApi 1.6 (PREVIEW)]; + /// The formula, if required, to evaluate the conditional format rule on. [Api set: ExcelApi 1.6]; + /// The formula, if required, to evaluate the conditional format rule on in the user's language. [Api set: ExcelApi 1.6]; + /// The formula, if required, to evaluate the conditional format rule on in R1C1-style notation. [Api set: ExcelApi 1.6]; } return ConditionalFormatRuleUpdateData; })(); @@ -12353,10 +12296,10 @@ var Excel; var IconSetConditionalFormatUpdateData = (function() { function IconSetConditionalFormatUpdateData() { /// An interface for updating data on the IconSetConditionalFormat object, for use in "iconSetConditionalFormat.set({ ... })". - /// An array of Criteria and IconSets for the rules and potential custom icons for conditional icons. Note that for the first criterion only the custom icon can be modified, while type, formula and operator will be ignored when set. [Api set: ExcelApi 1.6 (PREVIEW)]; - /// If true, reverses the icon orders for the IconSet. Note that this cannot be set if custom icons are used. [Api set: ExcelApi 1.6 (PREVIEW)]; - /// If true, hides the values and only shows icons. [Api set: ExcelApi 1.6 (PREVIEW)]; - /// If set, displays the IconSet option for the conditional format. [Api set: ExcelApi 1.6 (PREVIEW)]; + /// An array of Criteria and IconSets for the rules and potential custom icons for conditional icons. Note that for the first criterion only the custom icon can be modified, while type, formula and operator will be ignored when set. [Api set: ExcelApi 1.6]; + /// If true, reverses the icon orders for the IconSet. Note that this cannot be set if custom icons are used. [Api set: ExcelApi 1.6]; + /// If true, hides the values and only shows icons. [Api set: ExcelApi 1.6]; + /// If set, displays the IconSet option for the conditional format. [Api set: ExcelApi 1.6]; } return IconSetConditionalFormatUpdateData; })(); @@ -12372,7 +12315,7 @@ var Excel; var ColorScaleConditionalFormatUpdateData = (function() { function ColorScaleConditionalFormatUpdateData() { /// An interface for updating data on the ColorScaleConditionalFormat object, for use in "colorScaleConditionalFormat.set({ ... })". - /// The criteria of the color scale. Midpoint is optional when using a two point color scale. [Api set: ExcelApi 1.6 (PREVIEW)]; + /// The criteria of the color scale. Midpoint is optional when using a two point color scale. [Api set: ExcelApi 1.6]; } return ColorScaleConditionalFormatUpdateData; })(); @@ -12388,8 +12331,8 @@ var Excel; var TopBottomConditionalFormatUpdateData = (function() { function TopBottomConditionalFormatUpdateData() { /// An interface for updating data on the TopBottomConditionalFormat object, for use in "topBottomConditionalFormat.set({ ... })". - /// Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. [Api set: ExcelApi 1.6 (PREVIEW)] - /// The criteria of the Top/Bottom conditional format. [Api set: ExcelApi 1.6 (PREVIEW)]; + /// Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. [Api set: ExcelApi 1.6] + /// The criteria of the Top/Bottom conditional format. [Api set: ExcelApi 1.6]; } return TopBottomConditionalFormatUpdateData; })(); @@ -12405,8 +12348,8 @@ var Excel; var PresetCriteriaConditionalFormatUpdateData = (function() { function PresetCriteriaConditionalFormatUpdateData() { /// An interface for updating data on the PresetCriteriaConditionalFormat object, for use in "presetCriteriaConditionalFormat.set({ ... })". - /// Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. [Api set: ExcelApi 1.6 (PREVIEW)] - /// The rule of the conditional format. [Api set: ExcelApi 1.6 (PREVIEW)]; + /// Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. [Api set: ExcelApi 1.6] + /// The rule of the conditional format. [Api set: ExcelApi 1.6]; } return PresetCriteriaConditionalFormatUpdateData; })(); @@ -12422,8 +12365,8 @@ var Excel; var TextConditionalFormatUpdateData = (function() { function TextConditionalFormatUpdateData() { /// An interface for updating data on the TextConditionalFormat object, for use in "textConditionalFormat.set({ ... })". - /// Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. [Api set: ExcelApi 1.6 (PREVIEW)] - /// The rule of the conditional format. [Api set: ExcelApi 1.6 (PREVIEW)]; + /// Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. [Api set: ExcelApi 1.6] + /// The rule of the conditional format. [Api set: ExcelApi 1.6]; } return TextConditionalFormatUpdateData; })(); @@ -12439,8 +12382,8 @@ var Excel; var CellValueConditionalFormatUpdateData = (function() { function CellValueConditionalFormatUpdateData() { /// An interface for updating data on the CellValueConditionalFormat object, for use in "cellValueConditionalFormat.set({ ... })". - /// Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. [Api set: ExcelApi 1.6 (PREVIEW)] - /// Represents the Rule object on this conditional format. [Api set: ExcelApi 1.6 (PREVIEW)]; + /// Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. [Api set: ExcelApi 1.6] + /// Represents the Rule object on this conditional format. [Api set: ExcelApi 1.6]; } return CellValueConditionalFormatUpdateData; })(); @@ -12456,7 +12399,10 @@ var Excel; var ConditionalRangeFormatUpdateData = (function() { function ConditionalRangeFormatUpdateData() { /// An interface for updating data on the ConditionalRangeFormat object, for use in "conditionalRangeFormat.set({ ... })". - /// Represents Excel's number format code for the given range. Cleared if null is passed in. [Api set: ExcelApi 1.6 (PREVIEW)]; + /// Collection of border objects that apply to the overall conditional format range. [Api set: ExcelApi 1.6] + /// Returns the fill object defined on the overall conditional format range. [Api set: ExcelApi 1.6] + /// Returns the font object defined on the overall conditional format range. [Api set: ExcelApi 1.6] + /// Represents Excel's number format code for the given range. Cleared if null is passed in. [Api set: ExcelApi 1.6]; } return ConditionalRangeFormatUpdateData; })(); @@ -12472,11 +12418,11 @@ var Excel; var ConditionalRangeFontUpdateData = (function() { function ConditionalRangeFontUpdateData() { /// An interface for updating data on the ConditionalRangeFont object, for use in "conditionalRangeFont.set({ ... })". - /// Represents the bold status of font. [Api set: ExcelApi 1.6 (PREVIEW)]; - /// HTML color code representation of the text color. E.g. #FF0000 represents Red. [Api set: ExcelApi 1.6 (PREVIEW)]; - /// Represents the italic status of the font. [Api set: ExcelApi 1.6 (PREVIEW)]; - /// Represents the strikethrough status of the font. [Api set: ExcelApi 1.6 (PREVIEW)]; - /// Type of underline applied to the font. See Excel.ConditionalRangeFontUnderlineStyle for details. [Api set: ExcelApi 1.6 (PREVIEW)]; + /// Represents the bold status of font. [Api set: ExcelApi 1.6]; + /// HTML color code representation of the text color. E.g. #FF0000 represents Red. [Api set: ExcelApi 1.6]; + /// Represents the italic status of the font. [Api set: ExcelApi 1.6]; + /// Represents the strikethrough status of the font. [Api set: ExcelApi 1.6]; + /// Type of underline applied to the font. See Excel.ConditionalRangeFontUnderlineStyle for details. [Api set: ExcelApi 1.6]; } return ConditionalRangeFontUpdateData; })(); @@ -12492,7 +12438,7 @@ var Excel; var ConditionalRangeFillUpdateData = (function() { function ConditionalRangeFillUpdateData() { /// An interface for updating data on the ConditionalRangeFill object, for use in "conditionalRangeFill.set({ ... })". - /// HTML color code representing the color of the fill, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). [Api set: ExcelApi 1.6 (PREVIEW)]; + /// HTML color code representing the color of the fill, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). [Api set: ExcelApi 1.6]; } return ConditionalRangeFillUpdateData; })(); @@ -12508,8 +12454,8 @@ var Excel; var ConditionalRangeBorderUpdateData = (function() { function ConditionalRangeBorderUpdateData() { /// An interface for updating data on the ConditionalRangeBorder object, for use in "conditionalRangeBorder.set({ ... })". - /// HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). [Api set: ExcelApi 1.6 (PREVIEW)]; - /// One of the constants of line style specifying the line style for the border. See Excel.BorderLineStyle for details. [Api set: ExcelApi 1.6 (PREVIEW)]; + /// HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). [Api set: ExcelApi 1.6]; + /// One of the constants of line style specifying the line style for the border. See Excel.BorderLineStyle for details. [Api set: ExcelApi 1.6]; } return ConditionalRangeBorderUpdateData; })(); @@ -12517,6 +12463,25 @@ var Excel; Interfaces.ConditionalRangeBorderUpdateData = ConditionalRangeBorderUpdateData; })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); })(Excel || (Excel = {__proto__: null})); + +var Excel; +(function (Excel) { + var Interfaces; + (function (Interfaces) { + var ConditionalRangeBorderCollectionUpdateData = (function() { + function ConditionalRangeBorderCollectionUpdateData() { + /// An interface for updating data on the ConditionalRangeBorderCollection object, for use in "conditionalRangeBorderCollection.set({ ... })". + /// Gets the top border [Api set: ExcelApi 1.6] + /// Gets the top border [Api set: ExcelApi 1.6] + /// Gets the top border [Api set: ExcelApi 1.6] + /// Gets the top border [Api set: ExcelApi 1.6] + } + return ConditionalRangeBorderCollectionUpdateData; + })(); + Interfaces.ConditionalRangeBorderCollectionUpdateData.__proto__ = null; + Interfaces.ConditionalRangeBorderCollectionUpdateData = ConditionalRangeBorderCollectionUpdateData; + })(Interfaces = Excel.Interfaces || (Excel.Interfaces = { __proto__: null})); +})(Excel || (Excel = {__proto__: null})); var Excel; (function (Excel) { var RequestContext = (function (_super) { @@ -12525,7 +12490,7 @@ var Excel; /// /// The RequestContext object facilitates requests to the Excel application. Since the Office add-in and the Excel application run in two different processes, the request context is required to get access to the Excel object model from the add-in. /// - /// Root object for interacting with the document + /// Root object for interacting with the document _super.call(this, null); } return RequestContext; @@ -12575,7 +12540,7 @@ var Excel; })(Excel || (Excel = {__proto__: null})); Excel.__proto__ = null; - + var Word; (function (Word) { @@ -12592,6 +12557,36 @@ var Word; Word.Alignment = Alignment; })(Word || (Word = {__proto__: null})); +var Word; +(function (Word) { + var Application = (function(_super) { + __extends(Application, _super); + function Application() { + /// The Application object. [Api set: WordApi 1.3] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + } + + Application.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + Application.prototype.createDocument = function(base64File) { + /// + /// Creates a new hidden document by using an optional base64 encoded .docx file. [Api set: WordApi 1.3] + /// + /// Optional. The base64 encoded .docx file. The default value is null. + /// + } + + return Application; + })(OfficeExtension.ClientObject); + Word.Application = Application; +})(Word || (Word = {__proto__: null})); + var Word; (function (Word) { var Body = (function(_super) { @@ -13231,8 +13226,8 @@ var Word; /// The request context associated with this object. /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. /// Gets the key of the custom property. Read only. [Api set: WordApi 1.3] - /// Gets the value type of the custom property. Read only. [Api set: WordApi 1.3] - /// Gets or sets the value of the custom property. [Api set: WordApi 1.3] + /// Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. Read only. [Api set: WordApi 1.3] + /// Gets or sets the value of the custom property. Note that even though Word Online and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). [Api set: WordApi 1.3] } CustomProperty.prototype.load = function(option) { @@ -13368,8 +13363,8 @@ var Word; /// The request context associated with this object. /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. /// Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.. Read-only. [Api set: WordApi 1.1] - /// Gets the collection of content control objects in the current document. This includes content controls in the body of the document, headers, footers, textboxes, etc.. Read-only. [Api set: WordApi 1.1] - /// Gets the properties of the current document. Read-only. [Api set: WordApi 1.3] + /// Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc.. Read-only. [Api set: WordApi 1.1] + /// Gets the properties of the document. Read-only. [Api set: WordApi 1.3] /// Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. Read-only. [Api set: WordApi 1.1] /// Gets the collection of section objects in the document. Read-only. [Api set: WordApi 1.1] } @@ -13402,6 +13397,12 @@ var Word; /// /// } + Document.prototype.open = function() { + /// + /// Open the document. [Api set: WordApi 1.3] + /// + /// + } Document.prototype.save = function() { /// /// Saves the document. This will use the Word default file naming convention if the document has not been saved before. [Api set: WordApi 1.1] @@ -13428,6 +13429,75 @@ var Word; Word.Document = Document; })(Word || (Word = {__proto__: null})); +var Word; +(function (Word) { + var DocumentCreated = (function(_super) { + __extends(DocumentCreated, _super); + function DocumentCreated() { + /// The DocumentCreated object is the top level object created by Application.CreateDocument. A DocumentCreated object is a special Document object. [Api set: WordApi 1.3] + /// The request context associated with this object. + /// Returns a boolean value for whether the corresponding object is null. You must call "context.sync()" before reading the isNull property. + /// Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.. Read-only. [Api set: WordApiHiddenDocument 1.3] + /// Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc.. Read-only. [Api set: WordApiHiddenDocument 1.3] + /// Gets the properties of the document. Read-only. [Api set: WordApiHiddenDocument 1.3] + /// Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. Read-only. [Api set: WordApiHiddenDocument 1.3] + /// Gets the collection of section objects in the document. Read-only. [Api set: WordApiHiddenDocument 1.3] + } + + DocumentCreated.prototype.load = function(option) { + /// + /// Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + /// + /// + /// + } + + DocumentCreated.prototype.set = function() { + /// + /// Sets multiple properties on the object at the same time, based on JSON input. + /// Properties described by the Word.Interfaces.DocumentCreatedUpdateData interface. + /// Options of the form { throwOnReadOnly?: boolean } + ///
+ /// * throwOnReadOnly: Throw an error if the passed-in property list includes read-only properties (default = true). + /// + ///
+ /// + /// Sets multiple properties on the object at the same time, based on an existing loaded object. + /// An existing DocumentCreated object, with properties that have already been loaded and synced. + /// + } + DocumentCreated.prototype.open = function() { + /// + /// Open the document. [Api set: WordApi 1.3] + /// + /// + } + DocumentCreated.prototype.save = function() { + /// + /// Saves the document. This will use the Word default file naming convention if the document has not been saved before. [Api set: WordApiHiddenDocument 1.3] + /// + /// + } + + DocumentCreated.prototype.track = function() { + /// + /// Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + /// + /// + } + + DocumentCreated.prototype.untrack = function() { + /// + /// Release the memory associated with this object, if has previous been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + /// + /// + } + + return DocumentCreated; + })(OfficeExtension.ClientObject); + Word.DocumentCreated = DocumentCreated; +})(Word || (Word = {__proto__: null})); + var Word; (function (Word) { var DocumentProperties = (function(_super) { @@ -16006,7 +16076,7 @@ var Word; var CustomPropertyUpdateData = (function() { function CustomPropertyUpdateData() { /// An interface for updating data on the CustomProperty object, for use in "customProperty.set({ ... })". - /// Gets or sets the value of the custom property. [Api set: WordApi 1.3]; + /// Gets or sets the value of the custom property. Note that even though Word Online and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). [Api set: WordApi 1.3]; } return CustomPropertyUpdateData; })(); @@ -16023,7 +16093,7 @@ var Word; function DocumentUpdateData() { /// An interface for updating data on the Document object, for use in "document.set({ ... })". /// Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.. [Api set: WordApi 1.1] - /// Gets the properties of the current document. [Api set: WordApi 1.3] + /// Gets the properties of the document. [Api set: WordApi 1.3] } return DocumentUpdateData; })(); @@ -16032,6 +16102,23 @@ var Word; })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); })(Word || (Word = {__proto__: null})); +var Word; +(function (Word) { + var Interfaces; + (function (Interfaces) { + var DocumentCreatedUpdateData = (function() { + function DocumentCreatedUpdateData() { + /// An interface for updating data on the DocumentCreated object, for use in "documentCreated.set({ ... })". + /// Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.. [Api set: WordApiHiddenDocument 1.3] + /// Gets the properties of the document. [Api set: WordApiHiddenDocument 1.3] + } + return DocumentCreatedUpdateData; + })(); + Interfaces.DocumentCreatedUpdateData.__proto__ = null; + Interfaces.DocumentCreatedUpdateData = DocumentCreatedUpdateData; + })(Interfaces = Word.Interfaces || (Word.Interfaces = { __proto__: null})); +})(Word || (Word = {__proto__: null})); + var Word; (function (Word) { var Interfaces; @@ -16303,7 +16390,7 @@ var Word; /// /// The RequestContext object facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the request context is required to get access to the Word object model from the add-in. /// - /// Root object for interacting with the document + /// Root object for interacting with the document _super.call(this, null); } return RequestContext; @@ -16351,4 +16438,4 @@ var Word; return new OfficeExtension.Promise(); } })(Word || (Word = {__proto__: null})); -Word.__proto__ = null; +Word.__proto__ = null; \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/office.d.ts b/node_modules/@microsoft/office-js/dist/office.d.ts index 935c7b3..ad55b61 100644 --- a/node_modules/@microsoft/office-js/dist/office.d.ts +++ b/node_modules/@microsoft/office-js/dist/office.d.ts @@ -105,6 +105,7 @@ declare namespace Office { value: any; } export interface Context { + auth: Auth; contentLanguage: string; displayLanguage: string; license: string; @@ -148,18 +149,50 @@ declare namespace Office { name: string; } export interface UI { + /** + * Displays a dialog to show or collect information from the user or to facilitate Web navigation. + * @param startAddress Accepts the initial HTTPS Url that opens in the dialog. + */ + displayDialogAsync(startAddress: string): void; + /** + * Displays a dialog to show or collect information from the user or to facilitate Web navigation. + * @param startAddress Accepts the initial HTTPS Url that opens in the dialog. + * @param options Optional. Accepts a DialogOptions object to define dialog behaviors. + */ + displayDialogAsync(startAddress: string, options: DialogOptions): void; + /** + * Displays a dialog to show or collect information from the user or to facilitate Web navigation. + * @param startAddress Accepts the initial HTTPS Url that opens in the dialog. + * @param callback Optional. Accepts a callback method to handle the dialog creation attempt. + */ + displayDialogAsync(startAddress: string, callback: (result: AsyncResult) => void): void; /** * Displays a dialog to show or collect information from the user or to facilitate Web navigation. * @param startAddress Accepts the initial HTTPS Url that opens in the dialog. * @param options Optional. Accepts a DialogOptions object to define dialog behaviors. * @param callback Optional. Accepts a callback method to handle the dialog creation attempt. */ - displayDialogAsync(startAddress: string, options?: DialogOptions, callback?: (result: AsyncResult) => void): void; + displayDialogAsync(startAddress: string, options: DialogOptions, callback: (result: AsyncResult) => void): void; + /** * Synchronously delivers a message from the dialog to its parent add-in. * @param messageObject Accepts a message from the dialog to deliver to the add-in. */ messageParent(messageObject: any): void; + /** + * Closes the UI container where the JavaScript is executing. + * + * Supported hosts: Outlook - Minimum requirement set: Mailbox 1.5 + * + * The behavior of this method is specified by the following: + * + * Called from a UI-less command button: No effect. Any dialog opened by displayDialogAsync will remain open. + * + * Called from a taskpane: The taskpane will close. Any dialog opened by displayDialogAsync will also close. If the taskpane supports pinning and was pinned by the user, it will be un-pinned. + * + * Called from a module extension: No effect. + */ + closeContainer(): void; } export interface DialogOptions { /** @@ -175,6 +208,38 @@ declare namespace Office { */ displayInIframe?: boolean } + export interface Auth { + /** + * Obtains an access token from AAD V 2.0 endpoint to grant the Office host application access to the add-in's web application. + * @param callback Optional. Accepts a callback method to handle the token acquisition attempt. If AsyncResult.status is "succeeded", then AsyncResult.value is the raw AAD v. 2.0-formatted access token. + */ + getAccessTokenAsync(callback: (result: AsyncResult) => void): void; + /** + * Obtains an access token from AAD V 2.0 endpoint to grant the Office host application access to the add-in's web application. + * @param options Optional. Accepts an AuthOptions object to define sign-on behaviors. + * @param callback Optional. Accepts a callback method to handle the token acquisition attempt. If AsyncResult.status is "succeeded", then AsyncResult.value is the raw AAD v. 2.0-formatted access token. + */ + getAccessTokenAsync(options: AuthOptions, callback: (result: AsyncResult) => void): void; + + } + export interface AuthOptions { + /** + * Optional. Causes Office to display the add-in consent experience. Useful if the add-in's Azure permissions have changed or if the user's consent has been revoked. + */ + forceConsent?: boolean, + /** + * Optional. Prompts the user to add (or to switch if already added) his or her Office account. + */ + forceAddAccount?: boolean, + /** + * Optional. Causes Office to prompt the user to provide the additional factor when the tenancy being targeted by Microsoft Graph requires multifactor authentication. The string value identifies the type of additional factor that is required. In most cases, you won't know at development time whether the user's tenant requires an additional factor or what the string should be. So this option would be used in a "second try" call of getAccessTokenAsync after Microsoft Graph has sent an error requesting the additional factor and containing the string that should be used with the authChallenge option. + */ + authChallenge?: string + /** + * Optional. A user-defined item of any type that is returned in the AsyncResult object without being altered. + */ + asyncContext?: any + } export interface OfficeTheme { bodyBackgroundColor: string; bodyForegroundColor: string; @@ -288,6 +353,10 @@ declare namespace Office { * Triggers when a document level selection happens */ DocumentSelectionChanged, + /** + * Triggers when the active item changes + */ + ItemChanged, /** * Triggers when a customXmlPart node was deleted */ @@ -1665,13 +1734,20 @@ declare namespace Office { size: number; } export interface Body { + /** + * Returns the current body in a specified format + * @param coercionType The format of the returned body + * @param callback optional method to call when the getAsync method returns + */ + getAsync(coercionType: CoercionType, callback: (result: AsyncResult) => void): void; /** * Returns the current body in a specified format * @param coercionType The format of the returned body * @param options Any optional parameters or state data passed to the method - * @param The optional method to call when the getAsync method returns + * @param callback optional method to call when the getAsync method returns */ - getAsync(coercionType: CoercionType, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + getAsync(coercionType: CoercionType, options: AsyncContextOptions, callback: (result: AsyncResult) => void): void; + /* * Gets a value that indicates whether the content is in HTML or text format * @param tableData A TableData object with the headers and rows @@ -1679,27 +1755,81 @@ declare namespace Office { * @param callback The optional method to call when the getTypeAsync method returns */ getTypeAsync(options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Adds the specified content to the beginning of the item body + * @param data The string to be inserted at the beginning of the body. The string is limited to 1,000,000 characters + */ + prependAsync(data: string): void; + /** + * Adds the specified content to the beginning of the item body + * @param data The string to be inserted at the beginning of the body. The string is limited to 1,000,000 characters + * @param options Any optional parameters or state data passed to the method + */ + prependAsync(data: string, options: AsyncContextOptions & CoercionTypeOptions): void; + /** + * Adds the specified content to the beginning of the item body + * @param data The string to be inserted at the beginning of the body. The string is limited to 1,000,000 characters + * @param callback The optional method to call when the string is inserted + */ + prependAsync(data: string, callback: (result: AsyncResult) => void): void; /** * Adds the specified content to the beginning of the item body * @param data The string to be inserted at the beginning of the body. The string is limited to 1,000,000 characters * @param options Any optional parameters or state data passed to the method * @param callback The optional method to call when the string is inserted */ - prependAsync(data: string, options?: AsyncContextOptions & CoercionTypeOptions, callback?: (result: AsyncResult) => void): void; + prependAsync(data: string, options: AsyncContextOptions & CoercionTypeOptions, callback: (result: AsyncResult) => void): void; + + /** + * Replaces the entire body with the specified text. + * @param data The string that will replace the existing body. The string is limited to 1,000,000 characters + */ + setAsync(data: string): void; + /** + * Replaces the entire body with the specified text. + * @param data The string that will replace the existing body. The string is limited to 1,000,000 characters + * @param options Any optional parameters or state data passed to the method + */ + setAsync(data: string, options: AsyncContextOptions & CoercionTypeOptions): void; + /** + * Replaces the entire body with the specified text. + * @param data The string that will replace the existing body. The string is limited to 1,000,000 characters + * @param callback the optional method to call when the body is replaced + */ + setAsync(data: string, callback: (result: AsyncResult) => void): void; /** * Replaces the entire body with the specified text. * @param data The string that will replace the existing body. The string is limited to 1,000,000 characters * @param options Any optional parameters or state data passed to the method * @param callback the optional method to call when the body is replaced */ - setAsync(data: string, options?: AsyncContextOptions & CoercionTypeOptions, callback?: (result: AsyncResult) => void): void; + setAsync(data: string, options: AsyncContextOptions & CoercionTypeOptions, callback: (result: AsyncResult) => void): void; + + /** + * Replaces the selection in the body with the specified text + * @param data The string to be inserted at the beginning of the body. The string is limited to 1,000,000 characters + */ + setSelectedDataAsync(data: string): void; + /** + * Replaces the selection in the body with the specified text + * @param data The string to be inserted at the beginning of the body. The string is limited to 1,000,000 characters + * @param options Any optional parameters or state data passed to the method + */ + setSelectedDataAsync(data: string, options: AsyncContextOptions & CoercionTypeOptions): void; + /** + * Replaces the selection in the body with the specified text + * @param data The string to be inserted at the beginning of the body. The string is limited to 1,000,000 characters + * @param callback The optional method to call when the string is inserted + */ + setSelectedDataAsync(data: string, callback: (result: AsyncResult) => void): void; /** * Replaces the selection in the body with the specified text * @param data The string to be inserted at the beginning of the body. The string is limited to 1,000,000 characters * @param options Any optional parameters or state data passed to the method * @param callback The optional method to call when the string is inserted */ - setSelectedDataAsync(data: string, options?: AsyncContextOptions & CoercionTypeOptions, callback?: (result: AsyncResult) => void): void; + setSelectedDataAsync(data: string, options: AsyncContextOptions & CoercionTypeOptions, callback: (result: AsyncResult) => void): void; + } export interface Contact { addresses: Array; @@ -1762,9 +1892,15 @@ declare namespace Office { urls: Array; } export interface Item { + /** + * You can cast item with `(Item as Office.[CAST_TYPE])` where CAST_TYPE is one of the following: ItemRead, ItemCompose, Message, + * MessageRead, MessageCompose, Appointment, AppointmentRead, AppointmentCompose + */ + __BeSureToCastThisObject__: void; body: Body; itemType: Office.MailboxEnums.ItemType; notificationMessages: NotificationMessages; + dateTimeCreated: Date; /** * Asynchronously loads custom properties that are specific to the item and a app for Office * @param callback The optional callback method @@ -1774,14 +1910,55 @@ declare namespace Office { } export interface ItemCompose extends Item { subject: Subject; + /** + * Adds a file to a message as an attachment + * @param uri The URI that provides the location of the file to attach to the message. The maximum length is 2048 characters + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters + */ + addFileAttachmentAsync(uri: string, attachmentName: string): void; /** * Adds a file to a message as an attachment * @param uri The URI that provides the location of the file to attach to the message. The maximum length is 2048 characters * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters * @param options Any optional parameters or state data passed to the method + */ + addFileAttachmentAsync(uri: string, attachmentName: string, options: AsyncContextOptions): void; + /** + * Adds a file to a message as an attachment + * @param uri The URI that provides the location of the file to attach to the message. The maximum length is 2048 characters + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters + * @param callback The optional callback method + */ + addFileAttachmentAsync(uri: string, attachmentName: string, callback: (result: AsyncResult) => void): void; + /** + * Adds a file to a message as an attachment + * @param uri The URI that provides the location of the file to attach to the message. The maximum length is 2048 characters + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters + * @param options Any optional parameters or state data passed to the method + * @param callback The optional callback method + */ + addFileAttachmentAsync(uri: string, attachmentName: string, options: AsyncContextOptions, callback: (result: AsyncResult) => void): void; + + /** + * Adds an Exchange item, such as a message, as an attachment to the message + * @param itemId The Exchange identifier of the item to attach. The maximum length is 100 characters + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters + */ + addItemAttachmentAsync(itemId: any, attachmentName: string): void; + /** + * Adds an Exchange item, such as a message, as an attachment to the message + * @param itemId The Exchange identifier of the item to attach. The maximum length is 100 characters + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters + * @param options Any optional parameters or state data passed to the method + */ + addItemAttachmentAsync(itemId: any, attachmentName: string, options: AsyncContextOptions): void; + /** + * Adds an Exchange item, such as a message, as an attachment to the message + * @param itemId The Exchange identifier of the item to attach. The maximum length is 100 characters + * @param attachmentName The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters * @param callback The optional callback method */ - addFileAttachmentAsync(uri: string, attachmentName: string, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + addItemAttachmentAsync(itemId: any, attachmentName: string, callback: (result: AsyncResult) => void): void; /** * Adds an Exchange item, such as a message, as an attachment to the message * @param itemId The Exchange identifier of the item to attach. The maximum length is 100 characters @@ -1789,57 +1966,120 @@ declare namespace Office { * @param options Any optional parameters or state data passed to the method * @param callback The optional callback method */ - addItemAttachmentAsync(itemId: any, attachmentName: string, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + addItemAttachmentAsync(itemId: any, attachmentName: string, options: AsyncContextOptions, callback: (result: AsyncResult) => void): void; + /** * Closes the current item that is being composed - * + * * The behaviors of the close method depends on the current state of the item being composed. If the item has unsaved changes, the client * prompts the user to save, discard, or close the action. - * + * * In the Outlook desktop client, if the message is an inline reply, the close method has no effect. */ close(): void; /** * Asynchronously returns selected data from the subject or body of a message. - * + * + * If there is no selection but the cursor is in the body or the subject, the method returns null for the selected data. If a field other + * than the body or subject is selected, the method returns the InvalidSelection error + */ + getSelectedDataAsync(coercionType: CoercionType, callback: (result: AsyncResult) => void): void; + /** + * Asynchronously returns selected data from the subject or body of a message. + * * If there is no selection but the cursor is in the body or the subject, the method returns null for the selected data. If a field other * than the body or subject is selected, the method returns the InvalidSelection error */ - getSelectedDataAsync(coercionType: CoercionType, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + getSelectedDataAsync(coercionType: CoercionType, options: AsyncContextOptions, callback: (result: AsyncResult) => void): void; + + /** + * Removes an attachment from a message + * @param attachmentIndex The index of the attachment to remove. The maximum length of the string is 100 characters + */ + removeAttachmentAsync(attachmentIndex: string): void; + /** + * Removes an attachment from a message + * @param attachmentIndex The index of the attachment to remove. The maximum length of the string is 100 characters + * @param options Any optional parameters or state data passed to the method + */ + removeAttachmentAsync(attachmentIndex: string, options: AsyncContextOptions): void; + /** + * Removes an attachment from a message + * @param attachmentIndex The index of the attachment to remove. The maximum length of the string is 100 characters + * @param callback The optional callback method + */ + removeAttachmentAsync(attachmentIndex: string, callback: (result: AsyncResult) => void): void; /** * Removes an attachment from a message * @param attachmentIndex The index of the attachment to remove. The maximum length of the string is 100 characters * @param options Any optional parameters or state data passed to the method * @param callback The optional callback method */ - removeAttachmentAsync(attachmentIndex: string, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + removeAttachmentAsync(attachmentIndex: string, options: AsyncContextOptions, callback: (result: AsyncResult) => void): void; + /** * Asynchronously saves an item. - * - * When invoked, this method saves the current message as a draft and returns the item id via the callback method. In Outlook Web App or + * + * When invoked, this method saves the current message as a draft and returns the item id via the callback method. In Outlook Web App or + * Outlook in online mode, the item is saved to the server. In Outlook in cached mode, the item is saved to the local cache. + */ + saveAsync(): void; + /** + * Asynchronously saves an item. + * + * When invoked, this method saves the current message as a draft and returns the item id via the callback method. In Outlook Web App or + * Outlook in online mode, the item is saved to the server. In Outlook in cached mode, the item is saved to the local cache. + */ + saveAsync(options: AsyncContextOptions): void; + /** + * Asynchronously saves an item. + * + * When invoked, this method saves the current message as a draft and returns the item id via the callback method. In Outlook Web App or + * Outlook in online mode, the item is saved to the server. In Outlook in cached mode, the item is saved to the local cache. + */ + saveAsync(callback: (result: AsyncResult) => void): void; + /** + * Asynchronously saves an item. + * + * When invoked, this method saves the current message as a draft and returns the item id via the callback method. In Outlook Web App or * Outlook in online mode, the item is saved to the server. In Outlook in cached mode, the item is saved to the local cache. */ - saveAsync(options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + saveAsync(options: AsyncContextOptions, callback: (result: AsyncResult) => void): void; + + /** + * Asynchronously inserts data into the body or subject of a message. + */ + setSelectedDataAsync(data: string): void; /** * Asynchronously inserts data into the body or subject of a message. */ - setSelectedDataAsync(data: string, options?: AsyncContextOptions & CoercionTypeOptions, callback?: (result: AsyncResult) => void): void; + setSelectedDataAsync(data: string, options: AsyncContextOptions & CoercionTypeOptions): void; + /** + * Asynchronously inserts data into the body or subject of a message. + */ + setSelectedDataAsync(data: string, callback: (result: AsyncResult) => void): void; + /** + * Asynchronously inserts data into the body or subject of a message. + */ + setSelectedDataAsync(data: string, options: AsyncContextOptions & CoercionTypeOptions, callback: (result: AsyncResult) => void): void; + } export interface ItemRead extends Item { + attachments: Array; itemClass: string; itemId: string; normalizedSubject: string; subject: string; /** * Displays a reply form that includes the sender and all the recipients of the selected message - * @param formData A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB + * @param formData A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB * OR * An object that contains body or attachment data and a callback function */ displayReplyAllForm(formData: string | ReplyFormData): void; /** * Displays a reply form that includes only the sender of the selected message - * @param formData A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB + * @param formData A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB * OR * An object that contains body or attachment data and a callback function */ @@ -1878,25 +2118,57 @@ declare namespace Office { timezoneOffset: number; } export interface Location { + /** + * Begins an asynchronous request for the location of an appointment + * @param callback The optional method to call when the string is inserted + */ + getAsync(callback: (result: AsyncResult) => void): void; /** * Begins an asynchronous request for the location of an appointment * @param options Any optional parameters or state data passed to the method * @param callback The optional method to call when the string is inserted */ - getAsync(options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + getAsync(options: AsyncContextOptions, callback: (result: AsyncResult) => void): void; + + /** + * Begins an asynchronous request to set the location of an appointment + * @param data The location of the appointment. The string is limited to 255 characters + */ + setAsync(location: string): void; + /** + * Begins an asynchronous request to set the location of an appointment + * @param data The location of the appointment. The string is limited to 255 characters + * @param options Any optional parameters or state data passed to the method + */ + setAsync(location: string, options: AsyncContextOptions): void; + /** + * Begins an asynchronous request to set the location of an appointment + * @param data The location of the appointment. The string is limited to 255 characters + * @param callback The optional method to call when the location is set + */ + setAsync(location: string, callback: (result: AsyncResult) => void): void; /** * Begins an asynchronous request to set the location of an appointment * @param data The location of the appointment. The string is limited to 255 characters * @param options Any optional parameters or state data passed to the method * @param callback The optional method to call when the location is set */ - setAsync(location: string, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + setAsync(location: string, options: AsyncContextOptions, callback: (result: AsyncResult) => void): void; + } export interface Mailbox { diagnostics: Diagnostics; ewsUrl: string; item: Item; userProfile: UserProfile; + /** + * Adds an event handler for a supported event + * @param eventType The event that should invoke the handler + * @param handler The function to handle the event + * @param options Any optional parameters or state data passed to the method + * @param callback The optional method to call when the handler is added + */ + addHandlerAsync(eventType: Office.EventType, handler: (type: Office.EventType) => void, options?: any, callback?: (result: AsyncResult) => void): void; /** * Converts an item ID formatted for REST into EWS format. * @param itemId An item ID formatted for the Outlook REST APIs @@ -1991,64 +2263,171 @@ declare namespace Office { persistent?: Boolean; } export interface NotificationMessages { + /** + * Adds a notification to an item + * @param key A developer-specified key used to refrence this notification message. Developers can use it to modify this message later. + * @param JSONmessage A JSON object that contains the notification message to be added to this item + */ + addAsync(key: string, JSONmessage: NotificationMessageDetails): void; /** * Adds a notification to an item * @param key A developer-specified key used to refrence this notification message. Developers can use it to modify this message later. * @param JSONmessage A JSON object that contains the notification message to be added to this item * @param options Any optional parameters or state data passed to the method + */ + addAsync(key: string, JSONmessage: NotificationMessageDetails, options: AsyncContextOptions): void; + /** + * Adds a notification to an item + * @param key A developer-specified key used to refrence this notification message. Developers can use it to modify this message later. + * @param JSONmessage A JSON object that contains the notification message to be added to this item * @param callback The optional callback method */ - addAsync(key: string, JSONmessage: NotificationMessageDetails, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + addAsync(key: string, JSONmessage: NotificationMessageDetails, callback: (result: AsyncResult) => void): void; /** - * Returns all keys and messages for an item. + * Adds a notification to an item + * @param key A developer-specified key used to refrence this notification message. Developers can use it to modify this message later. + * @param JSONmessage A JSON object that contains the notification message to be added to this item * @param options Any optional parameters or state data passed to the method * @param callback The optional callback method */ - getAllAsync(options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + addAsync(key: string, JSONmessage: NotificationMessageDetails, options: AsyncContextOptions, callback: (result: AsyncResult) => void): void; + /** - * Removes a notification message for an item. - * @param key The key for the notification message to remove - * @param options Any optional parameters or state data passed to the method + * Returns all keys and messages for an item. * @param callback The optional callback method */ - removeAsync(key: string, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + getAllAsync(callback: (result: AsyncResult) => void): void; /** - * Replaces a notification message that has a given key with another message - * @param key The key for the notification message to replace. - * @param JSONmessage A JSON object that contains the new notification message to replace the existing message + * Returns all keys and messages for an item. * @param options Any optional parameters or state data passed to the method * @param callback The optional callback method */ - replaceAsync(key: string, JSONmessage: NotificationMessageDetails, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; - } - export interface PhoneNumber { - phoneString: string; - originalPhoneString: string; - type: string; - } - export interface Recipients { + getAllAsync(options: AsyncContextOptions, callback: (result: AsyncResult) => void): void; + /** - * Begins an asynchronous request to add a recipient list to an appointment or message - * @param recipients The recipients to add to the recipients list - * @param options Any optional parameters or state data passed to the method - * @param callback The optional method to call when the string is inserted + * Removes a notification message for an item. + * @param key The key for the notification message to remove */ - addAsync(recipients: Array, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + removeAsync(key: string): void; /** - * Begins an asynchronous request to get the recipient list for an appointment or message + * Removes a notification message for an item. + * @param key The key for the notification message to remove * @param options Any optional parameters or state data passed to the method - * @param callback The optional method to call when the string is inserted */ - getAsync(options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + removeAsync(key: string, options: AsyncContextOptions): void; /** - * Begins an asynchronous request to set the recipient list for an appointment or message - * @param recipients The recipients to add to the recipients list - * @param options Any optional parameters or state data passed to the method - * @param callback The optional method to call when the string is inserted + * Removes a notification message for an item. + * @param key The key for the notification message to remove + * @param callback The optional callback method */ - setAsync(recipients: Array, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; - } - export interface ReplyFormAttachment { + removeAsync(key: string, callback: (result: AsyncResult) => void): void; + /** + * Removes a notification message for an item. + * @param key The key for the notification message to remove + * @param options Any optional parameters or state data passed to the method + * @param callback The optional callback method + */ + removeAsync(key: string, options: AsyncContextOptions, callback: (result: AsyncResult) => void): void; + + /** + * Replaces a notification message that has a given key with another message + * @param key The key for the notification message to replace. + * @param JSONmessage A JSON object that contains the new notification message to replace the existing message + */ + replaceAsync(key: string, JSONmessage: NotificationMessageDetails): void; + /** + * Replaces a notification message that has a given key with another message + * @param key The key for the notification message to replace. + * @param JSONmessage A JSON object that contains the new notification message to replace the existing message + * @param options Any optional parameters or state data passed to the method + */ + replaceAsync(key: string, JSONmessage: NotificationMessageDetails, options: AsyncContextOptions): void; + /** + * Replaces a notification message that has a given key with another message + * @param key The key for the notification message to replace. + * @param JSONmessage A JSON object that contains the new notification message to replace the existing message + * @param callback The optional callback method + */ + replaceAsync(key: string, JSONmessage: NotificationMessageDetails, callback: (result: AsyncResult) => void): void; + /** + * Replaces a notification message that has a given key with another message + * @param key The key for the notification message to replace. + * @param JSONmessage A JSON object that contains the new notification message to replace the existing message + * @param options Any optional parameters or state data passed to the method + * @param callback The optional callback method + */ + replaceAsync(key: string, JSONmessage: NotificationMessageDetails, options: AsyncContextOptions, callback: (result: AsyncResult) => void): void; + + } + export interface PhoneNumber { + phoneString: string; + originalPhoneString: string; + type: string; + } + export interface Recipients { + /** + * Begins an asynchronous request to add a recipient list to an appointment or message + * @param recipients The recipients to add to the recipients list + */ + addAsync(recipients: Array): void; + /** + * Begins an asynchronous request to add a recipient list to an appointment or message + * @param recipients The recipients to add to the recipients list + * @param options Any optional parameters or state data passed to the method + */ + addAsync(recipients: Array, options: AsyncContextOptions): void; + /** + * Begins an asynchronous request to add a recipient list to an appointment or message + * @param recipients The recipients to add to the recipients list + * @param callback The optional method to call when the string is inserted + */ + addAsync(recipients: Array, callback: (result: AsyncResult) => void): void; + /** + * Begins an asynchronous request to add a recipient list to an appointment or message + * @param recipients The recipients to add to the recipients list + * @param options Any optional parameters or state data passed to the method + * @param callback The optional method to call when the string is inserted + */ + addAsync(recipients: Array, options: AsyncContextOptions, callback: (result: AsyncResult) => void): void; + /** + * Begins an asynchronous request to get the recipient list for an appointment or message + * @param callback The optional method to call when the string is inserted + */ + getAsync(callback: (result: AsyncResult) => void): void; + /** + * Begins an asynchronous request to get the recipient list for an appointment or message + * @param options Any optional parameters or state data passed to the method + * @param callback The optional method to call when the string is inserted + */ + getAsync(options: AsyncContextOptions, callback: (result: AsyncResult) => void): void; + + /** + * Begins an asynchronous request to set the recipient list for an appointment or message + * @param recipients The recipients to add to the recipients list + */ + setAsync(recipients: Array): void; + /** + * Begins an asynchronous request to set the recipient list for an appointment or message + * @param recipients The recipients to add to the recipients list + * @param options Any optional parameters or state data passed to the method + */ + setAsync(recipients: Array, options: AsyncContextOptions): void; + /** + * Begins an asynchronous request to set the recipient list for an appointment or message + * @param recipients The recipients to add to the recipients list + * @param callback The optional method to call when the string is inserted + */ + setAsync(recipients: Array, callback: (result: AsyncResult) => void): void; + /** + * Begins an asynchronous request to set the recipient list for an appointment or message + * @param recipients The recipients to add to the recipients list + * @param options Any optional parameters or state data passed to the method + * @param callback The optional method to call when the string is inserted + */ + setAsync(recipients: Array, options: AsyncContextOptions, callback: (result: AsyncResult) => void): void; + + } + export interface ReplyFormAttachment { type: string; name: string; url?: string; @@ -2083,19 +2462,43 @@ declare namespace Office { set(name: string, value: any): void; } export interface Subject { + /** + * Begins an asynchronous request to get the subject of an appointment or message + * @param callback The optional method to call when the string is inserted + */ + getAsync(callback: (result: AsyncResult) => void): void; /** * Begins an asynchronous request to get the subject of an appointment or message * @param options Any optional parameters or state data passed to the method * @param callback The optional method to call when the string is inserted */ - getAsync(options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + getAsync(options: AsyncContextOptions, callback: (result: AsyncResult) => void): void; + + /** + * Begins an asynchronous call to set the subject of an appointment or message + * @param data The subject of the appointment. The string is limited to 255 characters + */ + setAsync(data: string): void; + /** + * Begins an asynchronous call to set the subject of an appointment or message + * @param data The subject of the appointment. The string is limited to 255 characters + * @param options Any optional parameters or state data passed to the method + */ + setAsync(data: string, options: AsyncContextOptions): void; + /** + * Begins an asynchronous call to set the subject of an appointment or message + * @param data The subject of the appointment. The string is limited to 255 characters + * @param callback The optional method to call when the string is inserted + */ + setAsync(data: string, callback: (result: AsyncResult) => void): void; /** * Begins an asynchronous call to set the subject of an appointment or message * @param data The subject of the appointment. The string is limited to 255 characters * @param options Any optional parameters or state data passed to the method * @param callback The optional method to call when the string is inserted */ - setAsync(data: string, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + setAsync(data: string, options: AsyncContextOptions, callback: (result: AsyncResult) => void): void; + } export interface TaskSuggestion { assignees: Array; @@ -2104,17 +2507,41 @@ declare namespace Office { export interface Time { /** * Begins an asynchronous request to get the start or end time + * @param callback The optional method to call when the string is inserted + */ + getAsync(callback: (result: AsyncResult) => void): void; + /** + * Begins an asynchronous request to get the start or end time + * @param options Any optional parameters or state data passed to the method + * @param callback The optional method to call when the string is inserted + */ + getAsync(options: AsyncContextOptions, callback: (result: AsyncResult) => void): void; + + /** + * Begins an asynchronous request to set the start or end time + * @param dateTime A date-time object in Coordinated Universal Time (UTC) + */ + setAsync(dateTime: Date): void; + /** + * Begins an asynchronous request to set the start or end time + * @param dateTime A date-time object in Coordinated Universal Time (UTC) * @param options Any optional parameters or state data passed to the method + */ + setAsync(dateTime: Date, options: AsyncContextOptions): void; + /** + * Begins an asynchronous request to set the start or end time + * @param dateTime A date-time object in Coordinated Universal Time (UTC) * @param callback The optional method to call when the string is inserted */ - getAsync(options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + setAsync(dateTime: Date, callback: (result: AsyncResult) => void): void; /** * Begins an asynchronous request to set the start or end time * @param dateTime A date-time object in Coordinated Universal Time (UTC) * @param options Any optional parameters or state data passed to the method * @param callback The optional method to call when the string is inserted */ - setAsync(dateTime: Date, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + setAsync(dateTime: Date, options: AsyncContextOptions, callback: (result: AsyncResult) => void): void; + } export interface UserProfile { displayName: string; @@ -2435,6 +2862,8 @@ declare namespace OfficeExtension { export class EventHandlerResult { constructor(context: ClientRequestContext, handlers: EventHandlers, handler: (args: T) => IPromise); + /** The request context associated with the object */ + context: ClientRequestContext; remove(): void; } @@ -2461,63 +2890,6 @@ declare namespace OfficeExtension { declare namespace OfficeCore { - /** - * [Api set: Experiment 1.1 (PREVIEW)] - */ - class FlightingService extends OfficeExtension.ClientObject { - getFeature(featureName: string, type: string, defaultValue: number | boolean | string, possibleValues?: Array | Array | Array | Array): OfficeCore.ABType; - getFeatureGate(featureName: string, scope?: string): OfficeCore.ABType; - resetOverride(featureName: string): void; - setOverride(featureName: string, type: string, value: number | boolean | string): void; - /** - * Create a new instance of OfficeCore.FlightingService object - */ - static newObject(context: OfficeExtension.ClientRequestContext): OfficeCore.FlightingService; - toJSON(): {}; - } - /** - * - * Provides information about the scoped value. - * - * [Api set: Experiment 1.1 (PREVIEW)] - */ - interface ScopedValue { - /** - * - * Gets the scope. - * - * [Api set: Experiment 1.1 (PREVIEW)] - */ - scope: string; - /** - * - * Gets the value. - * - * [Api set: Experiment 1.1 (PREVIEW)] - */ - value: string | number | boolean; - } - /** - * [Api set: Experiment 1.1 (PREVIEW)] - */ - class ABType extends OfficeExtension.ClientObject { - readonly value: string | number | boolean; - /** - * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. - */ - load(option?: string | string[] | OfficeExtension.LoadOption): OfficeCore.ABType; - toJSON(): { - "value": string | number | boolean; - }; - } - /** - * [Api set: Experiment 1.1 (PREVIEW)] - */ - namespace FeatureType { - var boolean: string; - var integer: string; - var string: string; - } namespace ExperimentErrorCodes { var generalException: string; } @@ -2527,7 +2899,13 @@ declare namespace OfficeCore { declare namespace OfficeCore { class RequestContext extends OfficeExtension.ClientRequestContext { constructor(url?: string | OfficeExtension.RequestUrlAndHeaderInfo | any); - readonly flightingService: FlightingService; + } +} +declare namespace OfficeCore { + namespace TelemetryErrorCodes { + var generalException: string; + } + module Interfaces { } } @@ -2738,6 +3116,12 @@ declare namespace Excel { * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Excel application. Since the Office add-in and the Excel application run in two different processes, the RequestContext is required to get access to the Excel object model from the add-in. */ function run(requestInfo: OfficeExtension.RequestUrlAndHeaderInfo | Session, batch: (context: Excel.RequestContext) => OfficeExtension.IPromise): OfficeExtension.IPromise; + /** + * Executes a batch script that performs actions on the Excel object model, using the RequestContext of a previously-created object. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. + * @param contextObject - A previously-created object. The batch will use the same RequestContext as the passed-in object, which means that any changes applied to the object will be picked up by "context.sync()". + * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Excel application. Since the Office add-in and the Excel application run in two different processes, the RequestContext is required to get access to the Excel object model from the add-in. + */ + function run(contextObject: OfficeExtension.ClientRequestContext, batch: (context: Excel.RequestContext) => OfficeExtension.IPromise): OfficeExtension.IPromise; /** * Executes a batch script that performs actions on the Excel object model, using the RequestContext of a previously-created API object. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. * @param object - A previously-created API object. The batch will use the same RequestContext as the passed-in object, which means that any changes applied to the object will be picked up by "context.sync()". @@ -2879,16 +3263,19 @@ declare namespace Excel { * * Suspends calculation until the next "context.sync()" is called. Once set, it is the developer's responsibility to re-calc the workbook, to ensure that any dependencies are propagated. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ suspendApiCalculationUntilNextSync(): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.Application; - toJSON(): { - "calculationMode": string; - }; + load(option?: Excel.Interfaces.ApplicationLoadOptions): Excel.Application; + load(option?: string | string[]): Excel.Application; + load(option?: { + select?: string; + expand?: string; + }): Excel.Application; + toJSON(): Excel.Interfaces.ApplicationData; } /** * @@ -2899,7 +3286,7 @@ declare namespace Excel { class Workbook extends OfficeExtension.ClientObject { /** * - * Represents Excel application instance that contains this workbook. Read-only. + * Represents the Excel application instance that contains this workbook. Read-only. * * [Api set: ExcelApi 1.1] */ @@ -2920,7 +3307,7 @@ declare namespace Excel { readonly customXmlParts: Excel.CustomXmlPartCollection; /** * - * Represents Excel application instance that contains this workbook. Read-only. + * Represents a collection of worksheet functions that can be used for computation. Read-only. * * [Api set: ExcelApi 1.2] */ @@ -2970,7 +3357,12 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.Workbook; + load(option?: Excel.Interfaces.WorkbookLoadOptions): Excel.Workbook; + load(option?: string | string[]): Excel.Workbook; + load(option?: { + select?: string; + expand?: string; + }): Excel.Workbook; /** * * Occurs when the selection in the document is changed. @@ -2978,7 +3370,7 @@ declare namespace Excel { * [Api set: ExcelApi 1.2] */ readonly onSelectionChanged: OfficeExtension.EventHandlers; - toJSON(): {}; + toJSON(): Excel.Interfaces.WorkbookData; } /** * @@ -3070,7 +3462,7 @@ declare namespace Excel { * * Calculates all cells on a worksheet. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ calculate(markAllDirty: boolean): void; /** @@ -3156,14 +3548,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.Worksheet; - toJSON(): { - "id": string; - "name": string; - "position": number; - "protection": WorksheetProtection; - "visibility": string; - }; + load(option?: Excel.Interfaces.WorksheetLoadOptions): Excel.Worksheet; + load(option?: string | string[]): Excel.Worksheet; + load(option?: { + select?: string; + expand?: string; + }): Excel.Worksheet; + toJSON(): Excel.Interfaces.WorksheetData; } /** * @@ -3234,8 +3625,10 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.WorksheetCollection; - toJSON(): {}; + load(option?: Excel.Interfaces.WorksheetCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.WorksheetCollection; + load(option?: string | string[]): Excel.WorksheetCollection; + load(option?: OfficeExtension.LoadOption): Excel.WorksheetCollection; + toJSON(): Excel.Interfaces.WorksheetCollectionData; } /** * @@ -3260,28 +3653,33 @@ declare namespace Excel { readonly protected: boolean; /** * - * Protects a worksheet. Fails if the worksheet has been protected. + * Protects a worksheet. Fails if the worksheet has already been protected. * - * [Api set: ExcelApi 1.2] + * [Api set: ExcelApi 1.2 for options; 1.7 for password] * * @param options sheet protection options. + * @param password sheet protection password. */ - protect(options?: Excel.WorksheetProtectionOptions): void; + protect(options?: Excel.WorksheetProtectionOptions, password?: string): void; /** * * Unprotects a worksheet. * - * [Api set: ExcelApi 1.2] + * [Api set: ExcelApi BETA (PREVIEW ONLY) for password] + * + * @param password sheet protection password. */ - unprotect(): void; + unprotect(password?: string): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.WorksheetProtection; - toJSON(): { - "options": WorksheetProtectionOptions; - "protected": boolean; - }; + load(option?: Excel.Interfaces.WorksheetProtectionLoadOptions): Excel.WorksheetProtection; + load(option?: string | string[]): Excel.WorksheetProtection; + load(option?: { + select?: string; + expand?: string; + }): Excel.WorksheetProtection; + toJSON(): Excel.Interfaces.WorksheetProtectionData; } /** * @@ -3379,7 +3777,7 @@ declare namespace Excel { * * Collection of ConditionalFormats that intersect the range. Read-only. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly conditionalFormats: Excel.ConditionalFormatCollection; /** @@ -3507,7 +3905,7 @@ declare namespace Excel { * * [Api set: ExcelApi 1.1] */ - readonly text: Array>; + readonly text: Array>; /** * * Represents the type of data of each cell. Read-only. @@ -3535,7 +3933,7 @@ declare namespace Excel { * * Calculates a range of cells on a worksheet. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ calculate(): void; /** @@ -3762,7 +4160,12 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.Range; + load(option?: Excel.Interfaces.RangeLoadOptions): Excel.Range; + load(option?: string | string[]): Excel.Range; + load(option?: { + select?: string; + expand?: string; + }): Excel.Range; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ @@ -3771,26 +4174,7 @@ declare namespace Excel { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Excel.Range; - toJSON(): { - "address": string; - "addressLocal": string; - "cellCount": number; - "columnCount": number; - "columnHidden": boolean; - "columnIndex": number; - "format": RangeFormat; - "formulas": any[][]; - "formulasLocal": any[][]; - "formulasR1C1": any[][]; - "hidden": boolean; - "numberFormat": any[][]; - "rowCount": number; - "rowHidden": boolean; - "rowIndex": number; - "text": any[][]; - "values": any[][]; - "valueTypes": string[][]; - }; + toJSON(): Excel.Interfaces.RangeData; } /** * @@ -3877,7 +4261,7 @@ declare namespace Excel { * * [Api set: ExcelApi 1.3] */ - readonly text: Array>; + readonly text: Array>; /** * * Represents the type of data of each cell. Read-only. @@ -3911,20 +4295,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.RangeView; - toJSON(): { - "cellAddresses": any[][]; - "columnCount": number; - "formulas": any[][]; - "formulasLocal": any[][]; - "formulasR1C1": any[][]; - "index": number; - "numberFormat": any[][]; - "rowCount": number; - "text": any[][]; - "values": any[][]; - "valueTypes": string[][]; - }; + load(option?: Excel.Interfaces.RangeViewLoadOptions): Excel.RangeView; + load(option?: string | string[]): Excel.RangeView; + load(option?: { + select?: string; + expand?: string; + }): Excel.RangeView; + toJSON(): Excel.Interfaces.RangeViewData; } /** * @@ -3954,8 +4331,10 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.RangeViewCollection; - toJSON(): {}; + load(option?: Excel.Interfaces.RangeViewCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.RangeViewCollection; + load(option?: string | string[]): Excel.RangeViewCollection; + load(option?: OfficeExtension.LoadOption): Excel.RangeViewCollection; + toJSON(): Excel.Interfaces.RangeViewCollectionData; } /** * @@ -3975,7 +4354,7 @@ declare namespace Excel { * @param key The Key of the new setting. * @param value The Value for the new setting. */ - add(key: string, value: string | number | boolean | Array | any): Excel.Setting; + add(key: string, value: string | number | boolean | Date | Array | any): Excel.Setting; /** * * Gets the number of Settings in the collection. @@ -4004,7 +4383,9 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.SettingCollection; + load(option?: Excel.Interfaces.SettingCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.SettingCollection; + load(option?: string | string[]): Excel.SettingCollection; + load(option?: OfficeExtension.LoadOption): Excel.SettingCollection; /** * * Occurs when the Settings in the document are changed. @@ -4012,7 +4393,7 @@ declare namespace Excel { * [Api set: ExcelApi 1.4] */ readonly onSettingsChanged: OfficeExtension.EventHandlers; - toJSON(): {}; + toJSON(): Excel.Interfaces.SettingCollectionData; } /** * @@ -4057,11 +4438,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.Setting; - toJSON(): { - "key": string; - "value": any; - }; + load(option?: Excel.Interfaces.SettingLoadOptions): Excel.Setting; + load(option?: string | string[]): Excel.Setting; + load(option?: { + select?: string; + expand?: string; + }): Excel.Setting; + toJSON(): Excel.Interfaces.SettingData; } /** * @@ -4124,8 +4507,10 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.NamedItemCollection; - toJSON(): {}; + load(option?: Excel.Interfaces.NamedItemCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.NamedItemCollection; + load(option?: string | string[]): Excel.NamedItemCollection; + load(option?: OfficeExtension.LoadOption): Excel.NamedItemCollection; + toJSON(): Excel.Interfaces.NamedItemCollectionData; } /** * @@ -4173,7 +4558,7 @@ declare namespace Excel { * * Indicates the type of the value returned by the name's formula. See Excel.NamedItemType for details. Read-only. * - * [Api set: ExcelApi 1.1] + * [Api set: ExcelApi 1.1 for String,Integer,Double,Boolean,Range,Error; 1.7 for Array] */ readonly type: string; /** @@ -4223,15 +4608,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.NamedItem; - toJSON(): { - "comment": string; - "name": string; - "scope": string; - "type": string; - "value": any; - "visible": boolean; - }; + load(option?: Excel.Interfaces.NamedItemLoadOptions): Excel.NamedItem; + load(option?: string | string[]): Excel.NamedItem; + load(option?: { + select?: string; + expand?: string; + }): Excel.NamedItem; + toJSON(): Excel.Interfaces.NamedItemData; } /** * @@ -4285,7 +4668,12 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.Binding; + load(option?: Excel.Interfaces.BindingLoadOptions): Excel.Binding; + load(option?: string | string[]): Excel.Binding; + load(option?: { + select?: string; + expand?: string; + }): Excel.Binding; /** * * Occurs when data or formatting within the binding is changed. @@ -4300,10 +4688,7 @@ declare namespace Excel { * [Api set: ExcelApi 1.2] */ readonly onSelectionChanged: OfficeExtension.EventHandlers; - toJSON(): { - "id": string; - "type": string; - }; + toJSON(): Excel.Interfaces.BindingData; } /** * @@ -4390,10 +4775,10 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.BindingCollection; - toJSON(): { - "count": number; - }; + load(option?: Excel.Interfaces.BindingCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.BindingCollection; + load(option?: string | string[]): Excel.BindingCollection; + load(option?: OfficeExtension.LoadOption): Excel.BindingCollection; + toJSON(): Excel.Interfaces.BindingCollectionData; } /** * @@ -4436,7 +4821,7 @@ declare namespace Excel { * * @param key Name or ID of the table to be retrieved. */ - getItem(key: number | string): Excel.Table; + getItem(key: string): Excel.Table; /** * * Gets a table based on its position in the collection. @@ -4454,14 +4839,14 @@ declare namespace Excel { * * @param key Name or ID of the table to be retrieved. */ - getItemOrNullObject(key: number | string): Excel.Table; + getItemOrNullObject(key: string): Excel.Table; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.TableCollection; - toJSON(): { - "count": number; - }; + load(option?: Excel.Interfaces.TableCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TableCollection; + load(option?: string | string[]): Excel.TableCollection; + load(option?: OfficeExtension.LoadOption): Excel.TableCollection; + toJSON(): Excel.Interfaces.TableCollectionData; } /** * @@ -4518,7 +4903,7 @@ declare namespace Excel { * * [Api set: ExcelApi 1.1] */ - readonly id: number; + readonly id: string; /** * * Name of the table. @@ -4636,19 +5021,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.Table; - toJSON(): { - "highlightFirstColumn": boolean; - "highlightLastColumn": boolean; - "id": number; - "name": string; - "showBandedColumns": boolean; - "showBandedRows": boolean; - "showFilterButton": boolean; - "showHeaders": boolean; - "showTotals": boolean; - "style": string; - }; + load(option?: Excel.Interfaces.TableLoadOptions): Excel.Table; + load(option?: string | string[]): Excel.Table; + load(option?: { + select?: string; + expand?: string; + }): Excel.Table; + toJSON(): Excel.Interfaces.TableData; } /** * @@ -4714,10 +5093,10 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.TableColumnCollection; - toJSON(): { - "count": number; - }; + load(option?: Excel.Interfaces.TableColumnCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TableColumnCollection; + load(option?: string | string[]): Excel.TableColumnCollection; + load(option?: OfficeExtension.LoadOption): Excel.TableColumnCollection; + toJSON(): Excel.Interfaces.TableColumnCollectionData; } /** * @@ -4808,13 +5187,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.TableColumn; - toJSON(): { - "id": number; - "index": number; - "name": string; - "values": any[][]; - }; + load(option?: Excel.Interfaces.TableColumnLoadOptions): Excel.TableColumn; + load(option?: string | string[]): Excel.TableColumn; + load(option?: { + select?: string; + expand?: string; + }): Excel.TableColumn; + toJSON(): Excel.Interfaces.TableColumnData; } /** * @@ -4876,10 +5255,10 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.TableRowCollection; - toJSON(): { - "count": number; - }; + load(option?: Excel.Interfaces.TableRowCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.TableRowCollection; + load(option?: string | string[]): Excel.TableRowCollection; + load(option?: OfficeExtension.LoadOption): Excel.TableRowCollection; + toJSON(): Excel.Interfaces.TableRowCollectionData; } /** * @@ -4933,11 +5312,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.TableRow; - toJSON(): { - "index": number; - "values": any[][]; - }; + load(option?: Excel.Interfaces.TableRowLoadOptions): Excel.TableRow; + load(option?: string | string[]): Excel.TableRow; + load(option?: { + select?: string; + expand?: string; + }): Excel.TableRow; + toJSON(): Excel.Interfaces.TableRowData; } /** * @@ -5035,17 +5416,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.RangeFormat; - toJSON(): { - "columnWidth": number; - "fill": RangeFill; - "font": RangeFont; - "horizontalAlignment": string; - "protection": FormatProtection; - "rowHeight": number; - "verticalAlignment": string; - "wrapText": boolean; - }; + load(option?: Excel.Interfaces.RangeFormatLoadOptions): Excel.RangeFormat; + load(option?: string | string[]): Excel.RangeFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.RangeFormat; + toJSON(): Excel.Interfaces.RangeFormatData; } /** * @@ -5080,11 +5457,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.FormatProtection; - toJSON(): { - "formulaHidden": boolean; - "locked": boolean; - }; + load(option?: Excel.Interfaces.FormatProtectionLoadOptions): Excel.FormatProtection; + load(option?: string | string[]): Excel.FormatProtection; + load(option?: { + select?: string; + expand?: string; + }): Excel.FormatProtection; + toJSON(): Excel.Interfaces.FormatProtectionData; } /** * @@ -5119,10 +5498,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.RangeFill; - toJSON(): { - "color": string; - }; + load(option?: Excel.Interfaces.RangeFillLoadOptions): Excel.RangeFill; + load(option?: string | string[]): Excel.RangeFill; + load(option?: { + select?: string; + expand?: string; + }): Excel.RangeFill; + toJSON(): Excel.Interfaces.RangeFillData; } /** * @@ -5171,13 +5553,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.RangeBorder; - toJSON(): { - "color": string; - "sideIndex": string; - "style": string; - "weight": string; - }; + load(option?: Excel.Interfaces.RangeBorderLoadOptions): Excel.RangeBorder; + load(option?: string | string[]): Excel.RangeBorder; + load(option?: { + select?: string; + expand?: string; + }): Excel.RangeBorder; + toJSON(): Excel.Interfaces.RangeBorderData; } /** * @@ -5216,10 +5598,10 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.RangeBorderCollection; - toJSON(): { - "count": number; - }; + load(option?: Excel.Interfaces.RangeBorderCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.RangeBorderCollection; + load(option?: string | string[]): Excel.RangeBorderCollection; + load(option?: OfficeExtension.LoadOption): Excel.RangeBorderCollection; + toJSON(): Excel.Interfaces.RangeBorderCollectionData; } /** * @@ -5282,15 +5664,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.RangeFont; - toJSON(): { - "bold": boolean; - "color": string; - "italic": boolean; - "name": string; - "size": number; - "underline": string; - }; + load(option?: Excel.Interfaces.RangeFontLoadOptions): Excel.RangeFont; + load(option?: string | string[]): Excel.RangeFont; + load(option?: { + select?: string; + expand?: string; + }): Excel.RangeFont; + toJSON(): Excel.Interfaces.RangeFontData; } /** * @@ -5357,10 +5737,10 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartCollection; - toJSON(): { - "count": number; - }; + load(option?: Excel.Interfaces.ChartCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartCollection; + load(option?: string | string[]): Excel.ChartCollection; + load(option?: OfficeExtension.LoadOption): Excel.ChartCollection; + toJSON(): Excel.Interfaces.ChartCollectionData; } /** * @@ -5504,19 +5884,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.Chart; - toJSON(): { - "axes": ChartAxes; - "dataLabels": ChartDataLabels; - "format": ChartAreaFormat; - "height": number; - "left": number; - "legend": ChartLegend; - "name": string; - "title": ChartTitle; - "top": number; - "width": number; - }; + load(option?: Excel.Interfaces.ChartLoadOptions): Excel.Chart; + load(option?: string | string[]): Excel.Chart; + load(option?: { + select?: string; + expand?: string; + }): Excel.Chart; + toJSON(): Excel.Interfaces.ChartData; } /** * @@ -5551,11 +5925,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartAreaFormat; - toJSON(): { - "fill": ChartFill; - "font": ChartFont; - }; + load(option?: Excel.Interfaces.ChartAreaFormatLoadOptions): Excel.ChartAreaFormat; + load(option?: string | string[]): Excel.ChartAreaFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartAreaFormat; + toJSON(): Excel.Interfaces.ChartAreaFormatData; } /** * @@ -5582,7 +5958,7 @@ declare namespace Excel { getCount(): OfficeExtension.ClientResult; /** * - * Retrieves a series based on its position in the collection + * Retrieves a series based on its position in the collection. * * [Api set: ExcelApi 1.1] * @@ -5592,10 +5968,10 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartSeriesCollection; - toJSON(): { - "count": number; - }; + load(option?: Excel.Interfaces.ChartSeriesCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartSeriesCollection; + load(option?: string | string[]): Excel.ChartSeriesCollection; + load(option?: OfficeExtension.LoadOption): Excel.ChartSeriesCollection; + toJSON(): Excel.Interfaces.ChartSeriesCollectionData; } /** * @@ -5637,11 +6013,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartSeries; - toJSON(): { - "format": ChartSeriesFormat; - "name": string; - }; + load(option?: Excel.Interfaces.ChartSeriesLoadOptions): Excel.ChartSeries; + load(option?: string | string[]): Excel.ChartSeries; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartSeries; + toJSON(): Excel.Interfaces.ChartSeriesData; } /** * @@ -5676,11 +6054,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartSeriesFormat; - toJSON(): { - "fill": ChartFill; - "line": ChartLineFormat; - }; + load(option?: Excel.Interfaces.ChartSeriesFormatLoadOptions): Excel.ChartSeriesFormat; + load(option?: string | string[]): Excel.ChartSeriesFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartSeriesFormat; + toJSON(): Excel.Interfaces.ChartSeriesFormatData; } /** * @@ -5717,10 +6097,10 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartPointsCollection; - toJSON(): { - "count": number; - }; + load(option?: Excel.Interfaces.ChartPointsCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ChartPointsCollection; + load(option?: string | string[]): Excel.ChartPointsCollection; + load(option?: OfficeExtension.LoadOption): Excel.ChartPointsCollection; + toJSON(): Excel.Interfaces.ChartPointsCollectionData; } /** * @@ -5746,11 +6126,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartPoint; - toJSON(): { - "format": ChartPointFormat; - "value": any; - }; + load(option?: Excel.Interfaces.ChartPointLoadOptions): Excel.ChartPoint; + load(option?: string | string[]): Excel.ChartPoint; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartPoint; + toJSON(): Excel.Interfaces.ChartPointData; } /** * @@ -5769,10 +6151,12 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartPointFormat; - toJSON(): { - "fill": ChartFill; - }; + load(option?: string | string[]): Excel.ChartPointFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartPointFormat; + toJSON(): Excel.Interfaces.ChartPointFormatData; } /** * @@ -5814,12 +6198,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartAxes; - toJSON(): { - "categoryAxis": ChartAxis; - "seriesAxis": ChartAxis; - "valueAxis": ChartAxis; - }; + load(option?: Excel.Interfaces.ChartAxesLoadOptions): Excel.ChartAxes; + load(option?: string | string[]): Excel.ChartAxes; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartAxes; + toJSON(): Excel.Interfaces.ChartAxesData; } /** * @@ -5896,17 +6281,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartAxis; - toJSON(): { - "format": ChartAxisFormat; - "majorGridlines": ChartGridlines; - "majorUnit": any; - "maximum": any; - "minimum": any; - "minorGridlines": ChartGridlines; - "minorUnit": any; - "title": ChartAxisTitle; - }; + load(option?: Excel.Interfaces.ChartAxisLoadOptions): Excel.ChartAxis; + load(option?: string | string[]): Excel.ChartAxis; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartAxis; + toJSON(): Excel.Interfaces.ChartAxisData; } /** * @@ -5941,11 +6322,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartAxisFormat; - toJSON(): { - "font": ChartFont; - "line": ChartLineFormat; - }; + load(option?: Excel.Interfaces.ChartAxisFormatLoadOptions): Excel.ChartAxisFormat; + load(option?: string | string[]): Excel.ChartAxisFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartAxisFormat; + toJSON(): Excel.Interfaces.ChartAxisFormatData; } /** * @@ -5987,12 +6370,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartAxisTitle; - toJSON(): { - "format": ChartAxisTitleFormat; - "text": string; - "visible": boolean; - }; + load(option?: Excel.Interfaces.ChartAxisTitleLoadOptions): Excel.ChartAxisTitle; + load(option?: string | string[]): Excel.ChartAxisTitle; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartAxisTitle; + toJSON(): Excel.Interfaces.ChartAxisTitleData; } /** * @@ -6020,10 +6404,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartAxisTitleFormat; - toJSON(): { - "font": ChartFont; - }; + load(option?: Excel.Interfaces.ChartAxisTitleFormatLoadOptions): Excel.ChartAxisTitleFormat; + load(option?: string | string[]): Excel.ChartAxisTitleFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartAxisTitleFormat; + toJSON(): Excel.Interfaces.ChartAxisTitleFormatData; } /** * @@ -6107,18 +6494,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartDataLabels; - toJSON(): { - "format": ChartDataLabelFormat; - "position": string; - "separator": string; - "showBubbleSize": boolean; - "showCategoryName": boolean; - "showLegendKey": boolean; - "showPercentage": boolean; - "showSeriesName": boolean; - "showValue": boolean; - }; + load(option?: Excel.Interfaces.ChartDataLabelsLoadOptions): Excel.ChartDataLabels; + load(option?: string | string[]): Excel.ChartDataLabels; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartDataLabels; + toJSON(): Excel.Interfaces.ChartDataLabelsData; } /** * @@ -6153,11 +6535,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartDataLabelFormat; - toJSON(): { - "fill": ChartFill; - "font": ChartFont; - }; + load(option?: Excel.Interfaces.ChartDataLabelFormatLoadOptions): Excel.ChartDataLabelFormat; + load(option?: string | string[]): Excel.ChartDataLabelFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartDataLabelFormat; + toJSON(): Excel.Interfaces.ChartDataLabelFormatData; } /** * @@ -6192,11 +6576,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartGridlines; - toJSON(): { - "format": ChartGridlinesFormat; - "visible": boolean; - }; + load(option?: Excel.Interfaces.ChartGridlinesLoadOptions): Excel.ChartGridlines; + load(option?: string | string[]): Excel.ChartGridlines; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartGridlines; + toJSON(): Excel.Interfaces.ChartGridlinesData; } /** * @@ -6224,10 +6610,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartGridlinesFormat; - toJSON(): { - "line": ChartLineFormat; - }; + load(option?: Excel.Interfaces.ChartGridlinesFormatLoadOptions): Excel.ChartGridlinesFormat; + load(option?: string | string[]): Excel.ChartGridlinesFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartGridlinesFormat; + toJSON(): Excel.Interfaces.ChartGridlinesFormatData; } /** * @@ -6276,13 +6665,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartLegend; - toJSON(): { - "format": ChartLegendFormat; - "overlay": boolean; - "position": string; - "visible": boolean; - }; + load(option?: Excel.Interfaces.ChartLegendLoadOptions): Excel.ChartLegend; + load(option?: string | string[]): Excel.ChartLegend; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartLegend; + toJSON(): Excel.Interfaces.ChartLegendData; } /** * @@ -6317,11 +6706,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartLegendFormat; - toJSON(): { - "fill": ChartFill; - "font": ChartFont; - }; + load(option?: Excel.Interfaces.ChartLegendFormatLoadOptions): Excel.ChartLegendFormat; + load(option?: string | string[]): Excel.ChartLegendFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartLegendFormat; + toJSON(): Excel.Interfaces.ChartLegendFormatData; } /** * @@ -6370,13 +6761,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartTitle; - toJSON(): { - "format": ChartTitleFormat; - "overlay": boolean; - "text": string; - "visible": boolean; - }; + load(option?: Excel.Interfaces.ChartTitleLoadOptions): Excel.ChartTitle; + load(option?: string | string[]): Excel.ChartTitle; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartTitle; + toJSON(): Excel.Interfaces.ChartTitleData; } /** * @@ -6411,11 +6802,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartTitleFormat; - toJSON(): { - "fill": ChartFill; - "font": ChartFont; - }; + load(option?: Excel.Interfaces.ChartTitleFormatLoadOptions): Excel.ChartTitleFormat; + load(option?: string | string[]): Excel.ChartTitleFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartTitleFormat; + toJSON(): Excel.Interfaces.ChartTitleFormatData; } /** * @@ -6444,7 +6837,9 @@ declare namespace Excel { * @param color HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). */ setSolidColor(color: string): void; - toJSON(): {}; + toJSON(): { + [key: string]: string; + }; } /** * @@ -6479,10 +6874,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartLineFormat; - toJSON(): { - "color": string; - }; + load(option?: Excel.Interfaces.ChartLineFormatLoadOptions): Excel.ChartLineFormat; + load(option?: string | string[]): Excel.ChartLineFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartLineFormat; + toJSON(): Excel.Interfaces.ChartLineFormatData; } /** * @@ -6545,15 +6943,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ChartFont; - toJSON(): { - "bold": boolean; - "color": string; - "italic": boolean; - "name": string; - "size": number; - "underline": string; - }; + load(option?: Excel.Interfaces.ChartFontLoadOptions): Excel.ChartFont; + load(option?: string | string[]): Excel.ChartFont; + load(option?: { + select?: string; + expand?: string; + }): Excel.ChartFont; + toJSON(): Excel.Interfaces.ChartFontData; } /** * @@ -6575,7 +6971,9 @@ declare namespace Excel { * @param method The ordering method used for Chinese characters. */ apply(fields: Array, matchCase?: boolean, hasHeaders?: boolean, orientation?: string, method?: string): void; - toJSON(): {}; + toJSON(): { + [key: string]: string; + }; } /** * @@ -6633,12 +7031,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.TableSort; - toJSON(): { - "fields": SortField[]; - "matchCase": boolean; - "method": string; - }; + load(option?: Excel.Interfaces.TableSortLoadOptions): Excel.TableSort; + load(option?: string | string[]): Excel.TableSort; + load(option?: { + select?: string; + expand?: string; + }): Excel.TableSort; + toJSON(): Excel.Interfaces.TableSortData; } /** * @@ -6815,10 +7214,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.Filter; - toJSON(): { - "criteria": FilterCriteria; - }; + load(option?: Excel.Interfaces.FilterLoadOptions): Excel.Filter; + load(option?: string | string[]): Excel.Filter; + load(option?: { + select?: string; + expand?: string; + }): Excel.Filter; + toJSON(): Excel.Interfaces.FilterData; } /** * @@ -6987,8 +7389,10 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.CustomXmlPartScopedCollection; - toJSON(): {}; + load(option?: Excel.Interfaces.CustomXmlPartScopedCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.CustomXmlPartScopedCollection; + load(option?: string | string[]): Excel.CustomXmlPartScopedCollection; + load(option?: OfficeExtension.LoadOption): Excel.CustomXmlPartScopedCollection; + toJSON(): Excel.Interfaces.CustomXmlPartScopedCollectionData; } /** * @@ -7046,8 +7450,10 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.CustomXmlPartCollection; - toJSON(): {}; + load(option?: Excel.Interfaces.CustomXmlPartCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.CustomXmlPartCollection; + load(option?: string | string[]): Excel.CustomXmlPartCollection; + load(option?: OfficeExtension.LoadOption): Excel.CustomXmlPartCollection; + toJSON(): Excel.Interfaces.CustomXmlPartCollectionData; } /** * @@ -7096,11 +7502,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.CustomXmlPart; - toJSON(): { - "id": string; - "namespaceUri": string; - }; + load(option?: Excel.Interfaces.CustomXmlPartLoadOptions): Excel.CustomXmlPart; + load(option?: string | string[]): Excel.CustomXmlPart; + load(option?: { + select?: string; + expand?: string; + }): Excel.CustomXmlPart; + toJSON(): Excel.Interfaces.CustomXmlPartData; } /** * @@ -7146,8 +7554,10 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.PivotTableCollection; - toJSON(): {}; + load(option?: Excel.Interfaces.PivotTableCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.PivotTableCollection; + load(option?: string | string[]): Excel.PivotTableCollection; + load(option?: OfficeExtension.LoadOption): Excel.PivotTableCollection; + toJSON(): Excel.Interfaces.PivotTableCollectionData; } /** * @@ -7196,17 +7606,19 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.PivotTable; - toJSON(): { - "id": string; - "name": string; - }; + load(option?: Excel.Interfaces.PivotTableLoadOptions): Excel.PivotTable; + load(option?: string | string[]): Excel.PivotTable; + load(option?: { + select?: string; + expand?: string; + }): Excel.PivotTable; + toJSON(): Excel.Interfaces.PivotTableData; } /** * * Represents a collection of all the conditional formats that are overlap the range. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class ConditionalFormatCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ @@ -7215,7 +7627,7 @@ declare namespace Excel { * * Adds a new conditional format to the collection at the first/top priority. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] * * @param type The type of conditional format being added. See Excel.ConditionalFormatType for details. */ @@ -7224,21 +7636,31 @@ declare namespace Excel { * * Clears all conditional formats active on the current specified range. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ clearAll(): void; /** * * Returns the number of conditional formats in the workbook. Read-only. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ getCount(): OfficeExtension.ClientResult; + /** + * + * Returns a conditional format for the given ID. + * + * [Api set: ExcelApi 1.6] + * + * @param id The id of the conditional format. + * @returns Conditional Format object. + */ + getItem(id: string): Excel.ConditionalFormat; /** * * Returns a conditional format at the given index. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] * * @param index Index of the conditional formats to be retrieved. */ @@ -7246,14 +7668,16 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ConditionalFormatCollection; - toJSON(): {}; + load(option?: Excel.Interfaces.ConditionalFormatCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ConditionalFormatCollection; + load(option?: string | string[]): Excel.ConditionalFormatCollection; + load(option?: OfficeExtension.LoadOption): Excel.ConditionalFormatCollection; + toJSON(): Excel.Interfaces.ConditionalFormatCollectionData; } /** * * An object encapsulating a conditional format's range, format, rule, and other properties. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class ConditionalFormat extends OfficeExtension.ClientObject { /** @@ -7261,7 +7685,7 @@ declare namespace Excel { * Returns the cell value conditional format properties if the current conditional format is a CellValue type. For example to format all cells between 5 and 10. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly cellValue: Excel.CellValueConditionalFormat; /** @@ -7269,77 +7693,77 @@ declare namespace Excel { * Returns the cell value conditional format properties if the current conditional format is a CellValue type. For example to format all cells between 5 and 10. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly cellValueOrNullObject: Excel.CellValueConditionalFormat; /** * * Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly colorScale: Excel.ColorScaleConditionalFormat; /** * * Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly colorScaleOrNullObject: Excel.ColorScaleConditionalFormat; /** * * Returns the custom conditional format properties if the current conditional format is a custom type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly custom: Excel.CustomConditionalFormat; /** * * Returns the custom conditional format properties if the current conditional format is a custom type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly customOrNullObject: Excel.CustomConditionalFormat; /** * * Returns the data bar properties if the current conditional format is a data bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly dataBar: Excel.DataBarConditionalFormat; /** * * Returns the data bar properties if the current conditional format is a data bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly dataBarOrNullObject: Excel.DataBarConditionalFormat; /** * * Returns the IconSet conditional format properties if the current conditional format is an IconSet type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly iconSet: Excel.IconSetConditionalFormat; /** * * Returns the IconSet conditional format properties if the current conditional format is an IconSet type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly iconSetOrNullObject: Excel.IconSetConditionalFormat; /** * * Returns the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror properties. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly preset: Excel.PresetCriteriaConditionalFormat; /** * * Returns the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror properties. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly presetOrNullObject: Excel.PresetCriteriaConditionalFormat; /** @@ -7347,7 +7771,7 @@ declare namespace Excel { * Returns the specific text conditional format properties if the current conditional format is a text type. For example to format cells matching the word "Text". * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly textComparison: Excel.TextConditionalFormat; /** @@ -7355,7 +7779,7 @@ declare namespace Excel { * Returns the specific text conditional format properties if the current conditional format is a text type. For example to format cells matching the word "Text". * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly textComparisonOrNullObject: Excel.TextConditionalFormat; /** @@ -7363,7 +7787,7 @@ declare namespace Excel { * Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. For example to format the top 10% or bottom 10 items. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly topBottom: Excel.TopBottomConditionalFormat; /** @@ -7371,17 +7795,25 @@ declare namespace Excel { * Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. For example to format the top 10% or bottom 10 items. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly topBottomOrNullObject: Excel.TopBottomConditionalFormat; + /** + * + * The Priority of the Conditional Format within the current ConditionalFormatCollection. + * + * [Api set: ExcelApi 1.6] + */ + readonly id: string; /** * * The priority (or index) within the conditional format collection that this conditional format currently exists in. Changing this also changes other conditional formats' priorities, to allow for a contiguous priority order. Use a negative priority to begin from the back. Priorities greater than than bounds will get and set to the maximum (or minimum if negative) priority. + Also note that if you change the priority, you have to re-fetch a new copy of the object at that new priority location if you want to make further changes to it. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ priority: number; /** @@ -7389,14 +7821,14 @@ declare namespace Excel { * If the conditions of this conditional format are met, no lower-priority formats shall take effect on that cell. Null on databars, icon sets, and colorscales as there's no concept of StopIfTrue for these * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ stopIfTrue: boolean; /** * * A type of conditional format. Only one can be set at a time. Read-Only. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly type: string; /** Sets multiple properties on the object at the same time, based on JSON input. */ @@ -7412,68 +7844,53 @@ declare namespace Excel { * * Deletes this conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ delete(): void; /** * * Returns the range the conditonal format is applied to or a null object if the range is discontiguous. Read-only. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ getRange(): Excel.Range; /** * * Returns the range the conditonal format is applied to or a null object if the range is discontiguous. Read-only. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ getRangeOrNullObject(): Excel.Range; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ConditionalFormat; - toJSON(): { - "cellValue": CellValueConditionalFormat; - "cellValueOrNullObject": CellValueConditionalFormat; - "colorScale": ColorScaleConditionalFormat; - "colorScaleOrNullObject": ColorScaleConditionalFormat; - "custom": CustomConditionalFormat; - "customOrNullObject": CustomConditionalFormat; - "dataBar": DataBarConditionalFormat; - "dataBarOrNullObject": DataBarConditionalFormat; - "iconSet": IconSetConditionalFormat; - "iconSetOrNullObject": IconSetConditionalFormat; - "preset": PresetCriteriaConditionalFormat; - "presetOrNullObject": PresetCriteriaConditionalFormat; - "priority": number; - "stopIfTrue": boolean; - "textComparison": TextConditionalFormat; - "textComparisonOrNullObject": TextConditionalFormat; - "topBottom": TopBottomConditionalFormat; - "topBottomOrNullObject": TopBottomConditionalFormat; - "type": string; - }; + load(option?: Excel.Interfaces.ConditionalFormatLoadOptions): Excel.ConditionalFormat; + load(option?: string | string[]): Excel.ConditionalFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ConditionalFormat; + toJSON(): Excel.Interfaces.ConditionalFormatData; } /** * * Represents an Excel Conditional Data Bar Type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class DataBarConditionalFormat extends OfficeExtension.ClientObject { /** * * Representation of all values to the left of the axis in an Excel data bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly negativeFormat: Excel.ConditionalDataBarNegativeFormat; /** * * Representation of all values to the right of the axis in an Excel data bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly positiveFormat: Excel.ConditionalDataBarPositiveFormat; /** @@ -7481,42 +7898,42 @@ declare namespace Excel { * HTML color code representing the color of the Axis line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). "" (empty string) if no axis is present or set. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ axisColor: string; /** * * Representation of how the axis is determined for an Excel data bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ axisFormat: string; /** * * Represents the direction that the data bar graphic should be based on. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ barDirection: string; /** * * The rule for what consistutes the lower bound (and how to calculate it, if applicable) for a data bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ lowerBoundRule: Excel.ConditionalDataBarRule; /** * * If true, hides the values from the cells where the data bar is applied. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ showDataBarOnly: boolean; /** * * The rule for what constitutes the upper bound (and how to calculate it, if applicable) for a data bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ upperBoundRule: Excel.ConditionalDataBarRule; /** Sets multiple properties on the object at the same time, based on JSON input. */ @@ -7531,23 +7948,19 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.DataBarConditionalFormat; - toJSON(): { - "axisColor": string; - "axisFormat": string; - "barDirection": string; - "lowerBoundRule": ConditionalDataBarRule; - "negativeFormat": ConditionalDataBarNegativeFormat; - "positiveFormat": ConditionalDataBarPositiveFormat; - "showDataBarOnly": boolean; - "upperBoundRule": ConditionalDataBarRule; - }; + load(option?: Excel.Interfaces.DataBarConditionalFormatLoadOptions): Excel.DataBarConditionalFormat; + load(option?: string | string[]): Excel.DataBarConditionalFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.DataBarConditionalFormat; + toJSON(): Excel.Interfaces.DataBarConditionalFormatData; } /** * * Represents a conditional format DataBar Format for the positive side of the data bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class ConditionalDataBarPositiveFormat extends OfficeExtension.ClientObject { /** @@ -7555,21 +7968,21 @@ declare namespace Excel { * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). "" (empty string) if no border is present or set. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ borderColor: string; /** * * HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ fillColor: string; /** * * Boolean representation of whether or not the DataBar has a gradient. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ gradientFill: boolean; /** Sets multiple properties on the object at the same time, based on JSON input. */ @@ -7584,18 +7997,19 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ConditionalDataBarPositiveFormat; - toJSON(): { - "borderColor": string; - "fillColor": string; - "gradientFill": boolean; - }; + load(option?: Excel.Interfaces.ConditionalDataBarPositiveFormatLoadOptions): Excel.ConditionalDataBarPositiveFormat; + load(option?: string | string[]): Excel.ConditionalDataBarPositiveFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ConditionalDataBarPositiveFormat; + toJSON(): Excel.Interfaces.ConditionalDataBarPositiveFormatData; } /** * * Represents a conditional format DataBar Format for the negative side of the data bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class ConditionalDataBarNegativeFormat extends OfficeExtension.ClientObject { /** @@ -7603,28 +8017,28 @@ declare namespace Excel { * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). "Empty String" if no border is present or set. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ borderColor: string; /** * * HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ fillColor: string; /** * * Boolean representation of whether or not the negative DataBar has the same border color as the positive DataBar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ matchPositiveBorderColor: boolean; /** * * Boolean representation of whether or not the negative DataBar has the same fill color as the positive DataBar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ matchPositiveFillColor: boolean; /** Sets multiple properties on the object at the same time, based on JSON input. */ @@ -7639,33 +8053,33 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ConditionalDataBarNegativeFormat; - toJSON(): { - "borderColor": string; - "fillColor": string; - "matchPositiveBorderColor": boolean; - "matchPositiveFillColor": boolean; - }; + load(option?: Excel.Interfaces.ConditionalDataBarNegativeFormatLoadOptions): Excel.ConditionalDataBarNegativeFormat; + load(option?: string | string[]): Excel.ConditionalDataBarNegativeFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ConditionalDataBarNegativeFormat; + toJSON(): Excel.Interfaces.ConditionalDataBarNegativeFormatData; } /** * * Represents a rule-type for a Data Bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ interface ConditionalDataBarRule { /** * * The formula, if required, to evaluate the databar rule on. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ formula?: string; /** * * The type of rule for the databar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ type: string; } @@ -7673,21 +8087,21 @@ declare namespace Excel { * * Represents a custom conditional format type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class CustomConditionalFormat extends OfficeExtension.ClientObject { /** * * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly format: Excel.ConditionalRangeFormat; /** * * Represents the Rule object on this conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly rule: Excel.ConditionalFormatRule; /** Sets multiple properties on the object at the same time, based on JSON input. */ @@ -7702,38 +8116,40 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.CustomConditionalFormat; - toJSON(): { - "format": ConditionalRangeFormat; - "rule": ConditionalFormatRule; - }; + load(option?: Excel.Interfaces.CustomConditionalFormatLoadOptions): Excel.CustomConditionalFormat; + load(option?: string | string[]): Excel.CustomConditionalFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.CustomConditionalFormat; + toJSON(): Excel.Interfaces.CustomConditionalFormatData; } /** * * Represents a rule, for all traditional rule/format pairings. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class ConditionalFormatRule extends OfficeExtension.ClientObject { /** * * The formula, if required, to evaluate the conditional format rule on. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ formula: string; /** * * The formula, if required, to evaluate the conditional format rule on in the user's language. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ formulaLocal: string; /** * * The formula, if required, to evaluate the conditional format rule on in R1C1-style notation. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ formulaR1C1: string; /** Sets multiple properties on the object at the same time, based on JSON input. */ @@ -7748,46 +8164,47 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ConditionalFormatRule; - toJSON(): { - "formula": string; - "formulaLocal": string; - "formulaR1C1": string; - }; + load(option?: Excel.Interfaces.ConditionalFormatRuleLoadOptions): Excel.ConditionalFormatRule; + load(option?: string | string[]): Excel.ConditionalFormatRule; + load(option?: { + select?: string; + expand?: string; + }): Excel.ConditionalFormatRule; + toJSON(): Excel.Interfaces.ConditionalFormatRuleData; } /** * * Represents an IconSet criteria for conditional formatting. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class IconSetConditionalFormat extends OfficeExtension.ClientObject { /** * * An array of Criteria and IconSets for the rules and potential custom icons for conditional icons. Note that for the first criterion only the custom icon can be modified, while type, formula and operator will be ignored when set. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ criteria: Array; /** * * If true, reverses the icon orders for the IconSet. Note that this cannot be set if custom icons are used. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ reverseIconOrder: boolean; /** * * If true, hides the values and only shows icons. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ showIconOnly: boolean; /** * * If set, displays the IconSet option for the conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ style: string; /** Sets multiple properties on the object at the same time, based on JSON input. */ @@ -7802,47 +8219,47 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.IconSetConditionalFormat; - toJSON(): { - "criteria": ConditionalIconCriterion[]; - "reverseIconOrder": boolean; - "showIconOnly": boolean; - "style": string; - }; + load(option?: Excel.Interfaces.IconSetConditionalFormatLoadOptions): Excel.IconSetConditionalFormat; + load(option?: string | string[]): Excel.IconSetConditionalFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.IconSetConditionalFormat; + toJSON(): Excel.Interfaces.IconSetConditionalFormatData; } /** * * Represents an Icon Criterion which contains a type, value, an Operator, and an optional custom icon, if not using an iconset. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ interface ConditionalIconCriterion { /** * * The custom icon for the current criterion if different from the default IconSet, else null will be returned. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ customIcon?: Excel.Icon; /** * * A number or a formula depending on the type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ formula: string; /** * * GreaterThan or GreaterThanOrEqual for each of the rule type for the Icon conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ operator: string; /** * * What the icon conditional formula should be based on. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ type: string; } @@ -7850,21 +8267,21 @@ declare namespace Excel { * * Represents an IconSet criteria for conditional formatting. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class ColorScaleConditionalFormat extends OfficeExtension.ClientObject { /** * * The criteria of the color scale. Midpoint is optional when using a two point color scale. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ criteria: Excel.ConditionalColorScaleCriteria; /** * * If true the color scale will have three points (minimum, midpoint, maximum), otherwise it will have two (minimum, maximum). * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly threeColorScale: boolean; /** Sets multiple properties on the object at the same time, based on JSON input. */ @@ -7879,38 +8296,40 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ColorScaleConditionalFormat; - toJSON(): { - "criteria": ConditionalColorScaleCriteria; - "threeColorScale": boolean; - }; + load(option?: Excel.Interfaces.ColorScaleConditionalFormatLoadOptions): Excel.ColorScaleConditionalFormat; + load(option?: string | string[]): Excel.ColorScaleConditionalFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ColorScaleConditionalFormat; + toJSON(): Excel.Interfaces.ColorScaleConditionalFormatData; } /** * * Represents the criteria of the color scale. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ interface ConditionalColorScaleCriteria { /** * * The maximum point Color Scale Criterion. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ maximum: Excel.ConditionalColorScaleCriterion; /** * * The midpoint Color Scale Criterion if the color scale is a 3-color scale. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ midpoint?: Excel.ConditionalColorScaleCriterion; /** * * The minimum point Color Scale Criterion. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ minimum: Excel.ConditionalColorScaleCriterion; } @@ -7918,28 +8337,28 @@ declare namespace Excel { * * Represents a Color Scale Criterion which contains a type, value and a color. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ interface ConditionalColorScaleCriterion { /** * * HTML color code representation of the color scale color. E.g. #FF0000 represents Red. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ color?: string; /** * * A number, a formula, or null (if Type is LowestValue). * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ formula?: string; /** * * What the icon conditional formula should be based on. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ type: string; } @@ -7947,21 +8366,21 @@ declare namespace Excel { * * Represents a Top/Bottom conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class TopBottomConditionalFormat extends OfficeExtension.ClientObject { /** * * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly format: Excel.ConditionalRangeFormat; /** * * The criteria of the Top/Bottom conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ rule: Excel.ConditionalTopBottomRule; /** Sets multiple properties on the object at the same time, based on JSON input. */ @@ -7976,31 +8395,33 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.TopBottomConditionalFormat; - toJSON(): { - "format": ConditionalRangeFormat; - "rule": ConditionalTopBottomRule; - }; + load(option?: Excel.Interfaces.TopBottomConditionalFormatLoadOptions): Excel.TopBottomConditionalFormat; + load(option?: string | string[]): Excel.TopBottomConditionalFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.TopBottomConditionalFormat; + toJSON(): Excel.Interfaces.TopBottomConditionalFormatData; } /** * * Represents the rule of the top/bottom conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ interface ConditionalTopBottomRule { /** * * The rank between 1 and 1000 for numeric ranks or 1 and 100 for percent ranks. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ rank: number; /** * * Format values based on the top or bottom rank. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ type: string; } @@ -8008,21 +8429,21 @@ declare namespace Excel { * * Represents the the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class PresetCriteriaConditionalFormat extends OfficeExtension.ClientObject { /** * * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly format: Excel.ConditionalRangeFormat; /** * * The rule of the conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ rule: Excel.ConditionalPresetCriteriaRule; /** Sets multiple properties on the object at the same time, based on JSON input. */ @@ -8037,24 +8458,26 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.PresetCriteriaConditionalFormat; - toJSON(): { - "format": ConditionalRangeFormat; - "rule": ConditionalPresetCriteriaRule; - }; + load(option?: Excel.Interfaces.PresetCriteriaConditionalFormatLoadOptions): Excel.PresetCriteriaConditionalFormat; + load(option?: string | string[]): Excel.PresetCriteriaConditionalFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.PresetCriteriaConditionalFormat; + toJSON(): Excel.Interfaces.PresetCriteriaConditionalFormatData; } /** * * Represents the Preset Criteria Conditional Format Rule * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ interface ConditionalPresetCriteriaRule { /** * * The criterion of the conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ criterion: string; } @@ -8062,21 +8485,21 @@ declare namespace Excel { * * Represents a specific text conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class TextConditionalFormat extends OfficeExtension.ClientObject { /** * * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly format: Excel.ConditionalRangeFormat; /** * * The rule of the conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ rule: Excel.ConditionalTextComparisonRule; /** Sets multiple properties on the object at the same time, based on JSON input. */ @@ -8091,31 +8514,33 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.TextConditionalFormat; - toJSON(): { - "format": ConditionalRangeFormat; - "rule": ConditionalTextComparisonRule; - }; + load(option?: Excel.Interfaces.TextConditionalFormatLoadOptions): Excel.TextConditionalFormat; + load(option?: string | string[]): Excel.TextConditionalFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.TextConditionalFormat; + toJSON(): Excel.Interfaces.TextConditionalFormatData; } /** * * Represents a Cell Value Conditional Format Rule * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ interface ConditionalTextComparisonRule { /** * * The operator of the text conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ operator: string; /** * * The Text value of conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ text: string; } @@ -8123,21 +8548,21 @@ declare namespace Excel { * * Represents a cell value conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class CellValueConditionalFormat extends OfficeExtension.ClientObject { /** * * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly format: Excel.ConditionalRangeFormat; /** * * Represents the Rule object on this conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ rule: Excel.ConditionalCellValueRule; /** Sets multiple properties on the object at the same time, based on JSON input. */ @@ -8152,38 +8577,40 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.CellValueConditionalFormat; - toJSON(): { - "format": ConditionalRangeFormat; - "rule": ConditionalCellValueRule; - }; + load(option?: Excel.Interfaces.CellValueConditionalFormatLoadOptions): Excel.CellValueConditionalFormat; + load(option?: string | string[]): Excel.CellValueConditionalFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.CellValueConditionalFormat; + toJSON(): Excel.Interfaces.CellValueConditionalFormatData; } /** * * Represents a Cell Value Conditional Format Rule * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ interface ConditionalCellValueRule { /** * * The formula, if required, to evaluate the conditional format rule on. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ formula1: string; /** * * The formula, if required, to evaluate the conditional format rule on. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ formula2?: string; /** * * The operator of the text conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ operator: string; } @@ -8191,35 +8618,35 @@ declare namespace Excel { * * A format object encapsulating the conditional formats range's font, fill, borders, and other properties. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class ConditionalRangeFormat extends OfficeExtension.ClientObject { /** * * Collection of border objects that apply to the overall conditional format range. Read-only. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly borders: Excel.ConditionalRangeBorderCollection; /** * * Returns the fill object defined on the overall conditional format range. Read-only. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly fill: Excel.ConditionalRangeFill; /** * * Returns the font object defined on the overall conditional format range. Read-only. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly font: Excel.ConditionalRangeFont; /** * * Represents Excel's number format code for the given range. Cleared if null is passed in. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ numberFormat: any; /** Sets multiple properties on the object at the same time, based on JSON input. */ @@ -8234,51 +8661,54 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ConditionalRangeFormat; - toJSON(): { - "numberFormat": any; - }; + load(option?: Excel.Interfaces.ConditionalRangeFormatLoadOptions): Excel.ConditionalRangeFormat; + load(option?: string | string[]): Excel.ConditionalRangeFormat; + load(option?: { + select?: string; + expand?: string; + }): Excel.ConditionalRangeFormat; + toJSON(): Excel.Interfaces.ConditionalRangeFormatData; } /** * * This object represents the font attributes (font style,, color, etc.) for an object. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class ConditionalRangeFont extends OfficeExtension.ClientObject { /** * * Represents the bold status of font. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ bold: boolean; /** * * HTML color code representation of the text color. E.g. #FF0000 represents Red. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ color: string; /** * * Represents the italic status of the font. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ italic: boolean; /** * * Represents the strikethrough status of the font. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ strikethrough: boolean; /** * * Type of underline applied to the font. See Excel.ConditionalRangeFontUnderlineStyle for details. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ underline: string; /** Sets multiple properties on the object at the same time, based on JSON input. */ @@ -8294,33 +8724,32 @@ declare namespace Excel { * * Resets the font formats. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ clear(): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ConditionalRangeFont; - toJSON(): { - "bold": boolean; - "color": string; - "italic": boolean; - "strikethrough": boolean; - "underline": string; - }; + load(option?: Excel.Interfaces.ConditionalRangeFontLoadOptions): Excel.ConditionalRangeFont; + load(option?: string | string[]): Excel.ConditionalRangeFont; + load(option?: { + select?: string; + expand?: string; + }): Excel.ConditionalRangeFont; + toJSON(): Excel.Interfaces.ConditionalRangeFontData; } /** * * Represents the background of a conditional range object. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class ConditionalRangeFill extends OfficeExtension.ClientObject { /** * * HTML color code representing the color of the fill, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ color: string; /** Sets multiple properties on the object at the same time, based on JSON input. */ @@ -8336,43 +8765,46 @@ declare namespace Excel { * * Resets the fill. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ clear(): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ConditionalRangeFill; - toJSON(): { - "color": string; - }; + load(option?: Excel.Interfaces.ConditionalRangeFillLoadOptions): Excel.ConditionalRangeFill; + load(option?: string | string[]): Excel.ConditionalRangeFill; + load(option?: { + select?: string; + expand?: string; + }): Excel.ConditionalRangeFill; + toJSON(): Excel.Interfaces.ConditionalRangeFillData; } /** * * Represents the border of an object. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class ConditionalRangeBorder extends OfficeExtension.ClientObject { /** * * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ color: string; /** * * Constant value that indicates the specific side of the border. See Excel.ConditionalRangeBorderIndex for details. Read-only. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly sideIndex: string; /** * * One of the constants of line style specifying the line style for the border. See Excel.BorderLineStyle for details. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ style: string; /** Sets multiple properties on the object at the same time, based on JSON input. */ @@ -8387,46 +8819,47 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ConditionalRangeBorder; - toJSON(): { - "color": string; - "sideIndex": string; - "style": string; - }; + load(option?: Excel.Interfaces.ConditionalRangeBorderLoadOptions): Excel.ConditionalRangeBorder; + load(option?: string | string[]): Excel.ConditionalRangeBorder; + load(option?: { + select?: string; + expand?: string; + }): Excel.ConditionalRangeBorder; + toJSON(): Excel.Interfaces.ConditionalRangeBorderData; } /** * * Represents the border objects that make up range border. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ class ConditionalRangeBorderCollection extends OfficeExtension.ClientObject { /** * * Gets the top border * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly bottom: Excel.ConditionalRangeBorder; /** * * Gets the top border * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly left: Excel.ConditionalRangeBorder; /** * * Gets the top border * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly right: Excel.ConditionalRangeBorder; /** * * Gets the top border * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly top: Excel.ConditionalRangeBorder; /** Gets the loaded child items in this collection. */ @@ -8435,14 +8868,14 @@ declare namespace Excel { * * Number of border objects in the collection. Read-only. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ readonly count: number; /** * * Gets a border object using its name * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] * * @param index Index value of the border object to be retrieved. See Excel.ConditionalRangeBorderIndex for details. */ @@ -8451,7 +8884,7 @@ declare namespace Excel { * * Gets a border object using its index * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] * * @param index Index value of the object to be retrieved. Zero-indexed. */ @@ -8459,10 +8892,10 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Excel.ConditionalRangeBorderCollection; - toJSON(): { - "count": number; - }; + load(option?: Excel.Interfaces.ConditionalRangeBorderCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.ConditionalRangeBorderCollection; + load(option?: string | string[]): Excel.ConditionalRangeBorderCollection; + load(option?: OfficeExtension.LoadOption): Excel.ConditionalRangeBorderCollection; + toJSON(): Excel.Interfaces.ConditionalRangeBorderCollectionData; } /** * [Api set: ExcelApi 1.1] @@ -8539,13 +8972,34 @@ declare namespace Excel { var fullRebuild: string; } /** - * [Api set: ExcelApi 1.1 for All/Formats/Contents, 1.7 for Hyperlinks.] + * [Api set: ExcelApi 1.1 for All/Formats/Contents, 1.7 for Hyperlinks & HyperlinksAndFormats.] */ namespace ClearApplyTo { var all: string; + /** + * + * Clears all formatting for the range. + * + */ var formats: string; + /** + * + * Clears the contents of the range. + * + */ var contents: string; + /** + * + * Clears all hyperlinks, but leaves all content and formatting intact. + * + */ var hyperlinks: string; + /** + * + * Removes hyperlinks and formatting for the cell but leaves content, conditional formats and data validation intact. + * + */ + var removeHyperlinks: string; } /** * [Api set: ExcelApi 1.1] @@ -8682,7 +9136,7 @@ declare namespace Excel { * * Represents the format options for a Data Bar Axis. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ namespace ConditionalDataBarAxisFormat { var automatic: string; @@ -8693,7 +9147,7 @@ declare namespace Excel { * * Represents the Data Bar direction within a cell. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ namespace ConditionalDataBarDirection { var context: string; @@ -8704,14 +9158,14 @@ declare namespace Excel { * * Represents the direction for a selection. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ namespace ConditionalFormatDirection { var top: string; var bottom: string; } /** - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ namespace ConditionalFormatType { var custom: string; @@ -8727,7 +9181,7 @@ declare namespace Excel { * * Represents the types of conditional format values. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ namespace ConditionalFormatRuleType { var invalid: string; @@ -8743,7 +9197,7 @@ declare namespace Excel { * * Represents the types of conditional format values. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ namespace ConditionalFormatIconRuleType { var invalid: string; @@ -8756,7 +9210,7 @@ declare namespace Excel { * * Represents the types of conditional format values. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ namespace ConditionalFormatColorCriterionType { var invalid: string; @@ -8771,7 +9225,7 @@ declare namespace Excel { * * Represents the criteria for the above/below average conditional format type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ namespace ConditionalTopBottomCriterionType { var invalid: string; @@ -8784,7 +9238,7 @@ declare namespace Excel { * * Represents the criteria for the Preset Criteria conditional format type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ namespace ConditionalFormatPresetCriterion { var invalid: string; @@ -8819,7 +9273,7 @@ declare namespace Excel { * * Represents the operator of the text conditional format type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ namespace ConditionalTextOperator { var invalid: string; @@ -8832,7 +9286,7 @@ declare namespace Excel { * * Represents the operator of the text conditional format type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ namespace ConditionalCellValueOperator { var invalid: string; @@ -8849,7 +9303,7 @@ declare namespace Excel { * * Represents the operator for each icon criteria. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ namespace ConditionalIconCriterionOperator { var invalid: string; @@ -8857,7 +9311,7 @@ declare namespace Excel { var greaterThanOrEqual: string; } /** - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ namespace ConditionalRangeBorderIndex { var edgeTop: string; @@ -8866,7 +9320,7 @@ declare namespace Excel { var edgeRight: string; } /** - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ namespace ConditionalRangeBorderLineStyle { var none: string; @@ -8877,7 +9331,7 @@ declare namespace Excel { var dot: string; } /** - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ namespace ConditionalRangeFontUnderlineStyle { var none: string; @@ -9026,7 +9480,7 @@ declare namespace Excel { var workbook: string; } /** - * [Api set: ExcelApi 1.1] + * [Api set: ExcelApi 1.1 for String,Integer,Double,Boolean,Range,Error; 1.7 for Array] */ namespace NamedItemType { var string: string; @@ -9035,6 +9489,7 @@ declare namespace Excel { var boolean: string; var range: string; var error: string; + var array: string; } /** * [Api set: ExcelApi 1.1] @@ -9055,7 +9510,7 @@ declare namespace Excel { var veryHidden: string; } /** - * [Api set: ExcelApi 1.1] + * [Api set: ExcelApi 1.1 for Unknown, Empty, String, Integer, Double, Boolean, Error. 1.7 for RichValue] */ namespace RangeValueType { var unknown: string; @@ -9065,6 +9520,7 @@ declare namespace Excel { var double: string; var boolean: string; var error: string; + var richValue: string; } /** * [Api set: ExcelApi 1.2] @@ -9130,11 +9586,13 @@ declare namespace Excel { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): FunctionResult; - toJSON(): { - "error": string; - "value": T; - }; + load(option?: Excel.Interfaces.FunctionResultLoadOptions): FunctionResult; + load(option?: string | string[]): FunctionResult; + load(option?: { + select?: string; + expand?: string; + }): FunctionResult; + toJSON(): Interfaces.FunctionResultData; } /** * @@ -12879,11 +13337,14 @@ declare namespace Excel { * @param sigma Is the population (known) standard deviation. If omitted, the sample standard deviation is used. */ z_Test(array: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, x: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult, sigma?: number | Excel.Range | Excel.RangeReference | Excel.FunctionResult): FunctionResult; - toJSON(): {}; + toJSON(): { + [key: string]: string; + }; } namespace ErrorCodes { var accessDenied: string; var apiNotFound: string; + var conflict: string; var generalException: string; var insertDeleteConflict: string; var invalidArgument: string; @@ -12898,6 +13359,10 @@ declare namespace Excel { var invalidOperationInCellEditMode: string; } module Interfaces { + interface CollectionLoadOptions { + $top?: number; + $skip?: number; + } /** An interface for updating data on the Worksheet object, for use in "worksheet.set({ ... })". */ interface WorksheetUpdateData { /** @@ -12922,6 +13387,10 @@ declare namespace Excel { */ visibility?: string; } + /** An interface for updating data on the WorksheetCollection object, for use in "worksheetCollection.set({ ... })". */ + interface WorksheetCollectionUpdateData { + items?: Excel.Interfaces.WorksheetData[]; + } /** An interface for updating data on the Range object, for use in "range.set({ ... })". */ interface RangeUpdateData { /** @@ -13019,6 +13488,14 @@ declare namespace Excel { */ values?: Array>; } + /** An interface for updating data on the RangeViewCollection object, for use in "rangeViewCollection.set({ ... })". */ + interface RangeViewCollectionUpdateData { + items?: Excel.Interfaces.RangeViewData[]; + } + /** An interface for updating data on the SettingCollection object, for use in "settingCollection.set({ ... })". */ + interface SettingCollectionUpdateData { + items?: Excel.Interfaces.SettingData[]; + } /** An interface for updating data on the Setting object, for use in "setting.set({ ... })". */ interface SettingUpdateData { /** @@ -13029,6 +13506,10 @@ declare namespace Excel { */ value?: any; } + /** An interface for updating data on the NamedItemCollection object, for use in "namedItemCollection.set({ ... })". */ + interface NamedItemCollectionUpdateData { + items?: Excel.Interfaces.NamedItemData[]; + } /** An interface for updating data on the NamedItem object, for use in "namedItem.set({ ... })". */ interface NamedItemUpdateData { /** @@ -13046,6 +13527,14 @@ declare namespace Excel { */ visible?: boolean; } + /** An interface for updating data on the BindingCollection object, for use in "bindingCollection.set({ ... })". */ + interface BindingCollectionUpdateData { + items?: Excel.Interfaces.BindingData[]; + } + /** An interface for updating data on the TableCollection object, for use in "tableCollection.set({ ... })". */ + interface TableCollectionUpdateData { + items?: Excel.Interfaces.TableData[]; + } /** An interface for updating data on the Table object, for use in "table.set({ ... })". */ interface TableUpdateData { /** @@ -13112,6 +13601,10 @@ declare namespace Excel { */ style?: string; } + /** An interface for updating data on the TableColumnCollection object, for use in "tableColumnCollection.set({ ... })". */ + interface TableColumnCollectionUpdateData { + items?: Excel.Interfaces.TableColumnData[]; + } /** An interface for updating data on the TableColumn object, for use in "tableColumn.set({ ... })". */ interface TableColumnUpdateData { /** @@ -13129,6 +13622,10 @@ declare namespace Excel { */ values?: Array>; } + /** An interface for updating data on the TableRowCollection object, for use in "tableRowCollection.set({ ... })". */ + interface TableRowCollectionUpdateData { + items?: Excel.Interfaces.TableRowData[]; + } /** An interface for updating data on the TableRow object, for use in "tableRow.set({ ... })". */ interface TableRowUpdateData { /** @@ -13249,6 +13746,10 @@ declare namespace Excel { */ weight?: string; } + /** An interface for updating data on the RangeBorderCollection object, for use in "rangeBorderCollection.set({ ... })". */ + interface RangeBorderCollectionUpdateData { + items?: Excel.Interfaces.RangeBorderData[]; + } /** An interface for updating data on the RangeFont object, for use in "rangeFont.set({ ... })". */ interface RangeFontUpdateData { /** @@ -13294,6 +13795,10 @@ declare namespace Excel { */ underline?: string; } + /** An interface for updating data on the ChartCollection object, for use in "chartCollection.set({ ... })". */ + interface ChartCollectionUpdateData { + items?: Excel.Interfaces.ChartData[]; + } /** An interface for updating data on the Chart object, for use in "chart.set({ ... })". */ interface ChartUpdateData { /** @@ -13377,6 +13882,10 @@ declare namespace Excel { */ font?: Excel.Interfaces.ChartFontUpdateData; } + /** An interface for updating data on the ChartSeriesCollection object, for use in "chartSeriesCollection.set({ ... })". */ + interface ChartSeriesCollectionUpdateData { + items?: Excel.Interfaces.ChartSeriesData[]; + } /** An interface for updating data on the ChartSeries object, for use in "chartSeries.set({ ... })". */ interface ChartSeriesUpdateData { /** @@ -13404,6 +13913,10 @@ declare namespace Excel { */ line?: Excel.Interfaces.ChartLineFormatUpdateData; } + /** An interface for updating data on the ChartPointsCollection object, for use in "chartPointsCollection.set({ ... })". */ + interface ChartPointsCollectionUpdateData { + items?: Excel.Interfaces.ChartPointData[]; + } /** An interface for updating data on the ChartAxes object, for use in "chartAxes.set({ ... })". */ interface ChartAxesUpdateData { /** @@ -13778,6 +14291,18 @@ declare namespace Excel { */ underline?: string; } + /** An interface for updating data on the CustomXmlPartScopedCollection object, for use in "customXmlPartScopedCollection.set({ ... })". */ + interface CustomXmlPartScopedCollectionUpdateData { + items?: Excel.Interfaces.CustomXmlPartData[]; + } + /** An interface for updating data on the CustomXmlPartCollection object, for use in "customXmlPartCollection.set({ ... })". */ + interface CustomXmlPartCollectionUpdateData { + items?: Excel.Interfaces.CustomXmlPartData[]; + } + /** An interface for updating data on the PivotTableCollection object, for use in "pivotTableCollection.set({ ... })". */ + interface PivotTableCollectionUpdateData { + items?: Excel.Interfaces.PivotTableData[]; + } /** An interface for updating data on the PivotTable object, for use in "pivotTable.set({ ... })". */ interface PivotTableUpdateData { /** @@ -13788,6 +14313,10 @@ declare namespace Excel { */ name?: string; } + /** An interface for updating data on the ConditionalFormatCollection object, for use in "conditionalFormatCollection.set({ ... })". */ + interface ConditionalFormatCollectionUpdateData { + items?: Excel.Interfaces.ConditionalFormatData[]; + } /** An interface for updating data on the ConditionalFormat object, for use in "conditionalFormat.set({ ... })". */ interface ConditionalFormatUpdateData { /** @@ -13795,7 +14324,7 @@ declare namespace Excel { * Returns the cell value conditional format properties if the current conditional format is a CellValue type. For example to format all cells between 5 and 10. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ cellValue?: Excel.Interfaces.CellValueConditionalFormatUpdateData; /** @@ -13803,77 +14332,77 @@ declare namespace Excel { * Returns the cell value conditional format properties if the current conditional format is a CellValue type. For example to format all cells between 5 and 10. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ cellValueOrNullObject?: Excel.Interfaces.CellValueConditionalFormatUpdateData; /** * * Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ colorScale?: Excel.Interfaces.ColorScaleConditionalFormatUpdateData; /** * * Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ colorScaleOrNullObject?: Excel.Interfaces.ColorScaleConditionalFormatUpdateData; /** * * Returns the custom conditional format properties if the current conditional format is a custom type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ custom?: Excel.Interfaces.CustomConditionalFormatUpdateData; /** * * Returns the custom conditional format properties if the current conditional format is a custom type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ customOrNullObject?: Excel.Interfaces.CustomConditionalFormatUpdateData; /** * * Returns the data bar properties if the current conditional format is a data bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ dataBar?: Excel.Interfaces.DataBarConditionalFormatUpdateData; /** * * Returns the data bar properties if the current conditional format is a data bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ dataBarOrNullObject?: Excel.Interfaces.DataBarConditionalFormatUpdateData; /** * * Returns the IconSet conditional format properties if the current conditional format is an IconSet type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ iconSet?: Excel.Interfaces.IconSetConditionalFormatUpdateData; /** * * Returns the IconSet conditional format properties if the current conditional format is an IconSet type. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ iconSetOrNullObject?: Excel.Interfaces.IconSetConditionalFormatUpdateData; /** * * Returns the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror properties. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ preset?: Excel.Interfaces.PresetCriteriaConditionalFormatUpdateData; /** * * Returns the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror properties. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ presetOrNullObject?: Excel.Interfaces.PresetCriteriaConditionalFormatUpdateData; /** @@ -13881,7 +14410,7 @@ declare namespace Excel { * Returns the specific text conditional format properties if the current conditional format is a text type. For example to format cells matching the word "Text". * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ textComparison?: Excel.Interfaces.TextConditionalFormatUpdateData; /** @@ -13889,7 +14418,7 @@ declare namespace Excel { * Returns the specific text conditional format properties if the current conditional format is a text type. For example to format cells matching the word "Text". * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ textComparisonOrNullObject?: Excel.Interfaces.TextConditionalFormatUpdateData; /** @@ -13897,7 +14426,7 @@ declare namespace Excel { * Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. For example to format the top 10% or bottom 10 items. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ topBottom?: Excel.Interfaces.TopBottomConditionalFormatUpdateData; /** @@ -13905,7 +14434,7 @@ declare namespace Excel { * Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. For example to format the top 10% or bottom 10 items. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ topBottomOrNullObject?: Excel.Interfaces.TopBottomConditionalFormatUpdateData; /** @@ -13914,8 +14443,9 @@ declare namespace Excel { changes other conditional formats' priorities, to allow for a contiguous priority order. Use a negative priority to begin from the back. Priorities greater than than bounds will get and set to the maximum (or minimum if negative) priority. + Also note that if you change the priority, you have to re-fetch a new copy of the object at that new priority location if you want to make further changes to it. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ priority?: number; /** @@ -13923,7 +14453,7 @@ declare namespace Excel { * If the conditions of this conditional format are met, no lower-priority formats shall take effect on that cell. Null on databars, icon sets, and colorscales as there's no concept of StopIfTrue for these * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ stopIfTrue?: boolean; } @@ -13933,14 +14463,14 @@ declare namespace Excel { * * Representation of all values to the left of the axis in an Excel data bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ negativeFormat?: Excel.Interfaces.ConditionalDataBarNegativeFormatUpdateData; /** * * Representation of all values to the right of the axis in an Excel data bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ positiveFormat?: Excel.Interfaces.ConditionalDataBarPositiveFormatUpdateData; /** @@ -13948,42 +14478,42 @@ declare namespace Excel { * HTML color code representing the color of the Axis line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). "" (empty string) if no axis is present or set. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ axisColor?: string; /** * * Representation of how the axis is determined for an Excel data bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ axisFormat?: string; /** * * Represents the direction that the data bar graphic should be based on. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ barDirection?: string; /** * * The rule for what consistutes the lower bound (and how to calculate it, if applicable) for a data bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ lowerBoundRule?: Excel.ConditionalDataBarRule; /** * * If true, hides the values from the cells where the data bar is applied. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ showDataBarOnly?: boolean; /** * * The rule for what constitutes the upper bound (and how to calculate it, if applicable) for a data bar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ upperBoundRule?: Excel.ConditionalDataBarRule; } @@ -13994,21 +14524,21 @@ declare namespace Excel { * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). "" (empty string) if no border is present or set. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ borderColor?: string; /** * * HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ fillColor?: string; /** * * Boolean representation of whether or not the DataBar has a gradient. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ gradientFill?: boolean; } @@ -14019,28 +14549,28 @@ declare namespace Excel { * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). "Empty String" if no border is present or set. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ borderColor?: string; /** * * HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ fillColor?: string; /** * * Boolean representation of whether or not the negative DataBar has the same border color as the positive DataBar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ matchPositiveBorderColor?: boolean; /** * * Boolean representation of whether or not the negative DataBar has the same fill color as the positive DataBar. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ matchPositiveFillColor?: boolean; } @@ -14050,14 +14580,14 @@ declare namespace Excel { * * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ format?: Excel.Interfaces.ConditionalRangeFormatUpdateData; /** * * Represents the Rule object on this conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ rule?: Excel.Interfaces.ConditionalFormatRuleUpdateData; } @@ -14067,21 +14597,21 @@ declare namespace Excel { * * The formula, if required, to evaluate the conditional format rule on. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ formula?: string; /** * * The formula, if required, to evaluate the conditional format rule on in the user's language. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ formulaLocal?: string; /** * * The formula, if required, to evaluate the conditional format rule on in R1C1-style notation. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ formulaR1C1?: string; } @@ -14091,28 +14621,28 @@ declare namespace Excel { * * An array of Criteria and IconSets for the rules and potential custom icons for conditional icons. Note that for the first criterion only the custom icon can be modified, while type, formula and operator will be ignored when set. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ criteria?: Array; /** * * If true, reverses the icon orders for the IconSet. Note that this cannot be set if custom icons are used. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ reverseIconOrder?: boolean; /** * * If true, hides the values and only shows icons. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ showIconOnly?: boolean; /** * * If set, displays the IconSet option for the conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ style?: string; } @@ -14122,7 +14652,7 @@ declare namespace Excel { * * The criteria of the color scale. Midpoint is optional when using a two point color scale. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ criteria?: Excel.ConditionalColorScaleCriteria; } @@ -14132,14 +14662,14 @@ declare namespace Excel { * * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ format?: Excel.Interfaces.ConditionalRangeFormatUpdateData; /** * * The criteria of the Top/Bottom conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ rule?: Excel.ConditionalTopBottomRule; } @@ -14149,14 +14679,14 @@ declare namespace Excel { * * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ format?: Excel.Interfaces.ConditionalRangeFormatUpdateData; /** * * The rule of the conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ rule?: Excel.ConditionalPresetCriteriaRule; } @@ -14166,14 +14696,14 @@ declare namespace Excel { * * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ format?: Excel.Interfaces.ConditionalRangeFormatUpdateData; /** * * The rule of the conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ rule?: Excel.ConditionalTextComparisonRule; } @@ -14183,24 +14713,45 @@ declare namespace Excel { * * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ format?: Excel.Interfaces.ConditionalRangeFormatUpdateData; /** * * Represents the Rule object on this conditional format. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ rule?: Excel.ConditionalCellValueRule; } /** An interface for updating data on the ConditionalRangeFormat object, for use in "conditionalRangeFormat.set({ ... })". */ interface ConditionalRangeFormatUpdateData { + /** + * + * Collection of border objects that apply to the overall conditional format range. + * + * [Api set: ExcelApi 1.6] + */ + borders?: Excel.Interfaces.ConditionalRangeBorderCollectionUpdateData; + /** + * + * Returns the fill object defined on the overall conditional format range. + * + * [Api set: ExcelApi 1.6] + */ + fill?: Excel.Interfaces.ConditionalRangeFillUpdateData; + /** + * + * Returns the font object defined on the overall conditional format range. + * + * [Api set: ExcelApi 1.6] + */ + font?: Excel.Interfaces.ConditionalRangeFontUpdateData; /** * * Represents Excel's number format code for the given range. Cleared if null is passed in. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ numberFormat?: any; } @@ -14210,35 +14761,35 @@ declare namespace Excel { * * Represents the bold status of font. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ bold?: boolean; /** * * HTML color code representation of the text color. E.g. #FF0000 represents Red. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ color?: string; /** * * Represents the italic status of the font. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ italic?: boolean; /** * * Represents the strikethrough status of the font. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ strikethrough?: boolean; /** * * Type of underline applied to the font. See Excel.ConditionalRangeFontUnderlineStyle for details. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ underline?: string; } @@ -14248,7 +14799,7 @@ declare namespace Excel { * * HTML color code representing the color of the fill, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ color?: string; } @@ -14258,164 +14809,5461 @@ declare namespace Excel { * * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ color?: string; /** * * One of the constants of line style specifying the line style for the border. See Excel.BorderLineStyle for details. * - * [Api set: ExcelApi 1.6 (PREVIEW)] + * [Api set: ExcelApi 1.6] */ style?: string; } - } -} - - -//////////////////////////////////////////////////////////////// -//////////////////////// End Excel APIs //////////////////////// -//////////////////////////////////////////////////////////////// - - - - -//////////////////////////////////////////////////////////////// - - - - -//////////////////////////////////////////////////////////////// -/////////////////////// Begin Word APIs //////////////////////// -//////////////////////////////////////////////////////////////// - -declare namespace Word { - /** - * - * Represents the body of a document or a section. - * - * [Api set: WordApi 1.1] - */ - class Body extends OfficeExtension.ClientObject { - /** - * - * Gets the collection of rich text content control objects in the body. Read-only. - * - * [Api set: WordApi 1.1] - */ - contentControls: Word.ContentControlCollection; - /** - * - * Gets the text format of the body. Use this to get and set font name, size, color and other properties. Read-only. - * - * [Api set: WordApi 1.1] - */ - font: Word.Font; - /** - * - * Gets the collection of inlinePicture objects in the body. The collection does not include floating images. Read-only. - * - * [Api set: WordApi 1.1] - */ - inlinePictures: Word.InlinePictureCollection; - /** - * - * Gets the collection of list objects in the body. Read-only. - * - * [Api set: WordApi 1.3] - */ - lists: Word.ListCollection; - /** - * - * Gets the collection of paragraph objects in the body. Read-only. - * - * [Api set: WordApi 1.1] - */ - paragraphs: Word.ParagraphCollection; - /** - * - * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Throws if there isn't a parent body. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentBody: Word.Body; - /** - * - * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Returns a null object if there isn't a parent body. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentBodyOrNullObject: Word.Body; - /** - * - * Gets the content control that contains the body. Throws if there isn't a parent content control. Read-only. - * - * [Api set: WordApi 1.1] - */ - parentContentControl: Word.ContentControl; - /** - * - * Gets the content control that contains the body. Returns a null object if there isn't a parent content control. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject: Word.ContentControl; - /** - * - * Gets the parent section of the body. Throws if there isn't a parent section. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentSection: Word.Section; - /** - * - * Gets the parent section of the body. Returns a null object if there isn't a parent section. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentSectionOrNullObject: Word.Section; - /** - * - * Gets the collection of table objects in the body. Read-only. - * - * [Api set: WordApi 1.3] - */ - tables: Word.TableCollection; - /** - * - * Gets or sets the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * [Api set: WordApi 1.1] - */ - style: string; - /** - * - * Gets or sets the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * [Api set: WordApi 1.3] - */ - styleBuiltIn: string; - /** - * - * Gets the text of the body. Use the insertText method to insert text. Read-only. - * - * [Api set: WordApi 1.1] - */ - text: string; - /** - * - * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Read-only. - * - * [Api set: WordApi 1.3] - */ - type: string; - /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.BodyUpdateData, options?: { + /** An interface for updating data on the ConditionalRangeBorderCollection object, for use in "conditionalRangeBorderCollection.set({ ... })". */ + interface ConditionalRangeBorderCollectionUpdateData { /** - * Throw an error if the passed-in property list includes read-only properties (default = true). - */ - throwOnReadOnly?: boolean; - }): void; + * + * Gets the top border + * + * [Api set: ExcelApi 1.6] + */ + bottom?: Excel.Interfaces.ConditionalRangeBorderUpdateData; + /** + * + * Gets the top border + * + * [Api set: ExcelApi 1.6] + */ + left?: Excel.Interfaces.ConditionalRangeBorderUpdateData; + /** + * + * Gets the top border + * + * [Api set: ExcelApi 1.6] + */ + right?: Excel.Interfaces.ConditionalRangeBorderUpdateData; + /** + * + * Gets the top border + * + * [Api set: ExcelApi 1.6] + */ + top?: Excel.Interfaces.ConditionalRangeBorderUpdateData; + items?: Excel.Interfaces.ConditionalRangeBorderData[]; + } + /** An interface describing the data returned by calling "application.toJSON()". */ + interface ApplicationData { + /** + * + * Returns the calculation mode used in the workbook. See Excel.CalculationMode for details. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + calculationMode?: string; + } + /** An interface describing the data returned by calling "workbook.toJSON()". */ + interface WorkbookData { + /** + * + * Represents the Excel application instance that contains this workbook. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + application?: Excel.Interfaces.ApplicationData; + /** + * + * Represents a collection of bindings that are part of the workbook. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + bindings?: Excel.Interfaces.BindingCollectionData; + /** + * + * Represents the collection of custom XML parts contained by this workbook. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + customXmlParts?: Excel.Interfaces.CustomXmlPartCollectionData; + /** + * + * Represents a collection of workbook scoped named items (named ranges and constants). Read-only. + * + * [Api set: ExcelApi 1.1] + */ + names?: Excel.Interfaces.NamedItemCollectionData; + /** + * + * Represents a collection of PivotTables associated with the workbook. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + pivotTables?: Excel.Interfaces.PivotTableCollectionData; + /** + * + * Represents a collection of Settings associated with the workbook. Read-only. + * + * [Api set: ExcelApi 1.4] + */ + settings?: Excel.Interfaces.SettingCollectionData; + /** + * + * Represents a collection of tables associated with the workbook. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + tables?: Excel.Interfaces.TableCollectionData; + /** + * + * Represents a collection of worksheets associated with the workbook. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + worksheets?: Excel.Interfaces.WorksheetCollectionData; + } + /** An interface describing the data returned by calling "worksheet.toJSON()". */ + interface WorksheetData { + /** + * + * Returns collection of charts that are part of the worksheet. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + charts?: Excel.Interfaces.ChartCollectionData; + /** + * + * Collection of names scoped to the current worksheet. Read-only. + * + * [Api set: ExcelApi 1.4] + */ + names?: Excel.Interfaces.NamedItemCollectionData; + /** + * + * Collection of PivotTables that are part of the worksheet. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + pivotTables?: Excel.Interfaces.PivotTableCollectionData; + /** + * + * Returns sheet protection object for a worksheet. + * + * [Api set: ExcelApi 1.2] + */ + protection?: Excel.Interfaces.WorksheetProtectionData; + /** + * + * Collection of tables that are part of the worksheet. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + tables?: Excel.Interfaces.TableCollectionData; + /** + * + * Returns a value that uniquely identifies the worksheet in a given workbook. The value of the identifier remains the same even when the worksheet is renamed or moved. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: string; + /** + * + * The display name of the worksheet. + * + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * + * The zero-based position of the worksheet within the workbook. + * + * [Api set: ExcelApi 1.1] + */ + position?: number; + /** + * + * The Visibility of the worksheet. + * + * [Api set: ExcelApi 1.1 for reading visibility; 1.2 for setting it.] + */ + visibility?: string; + } + /** An interface describing the data returned by calling "worksheetCollection.toJSON()". */ + interface WorksheetCollectionData { + items?: Excel.Interfaces.WorksheetData[]; + } + /** An interface describing the data returned by calling "worksheetProtection.toJSON()". */ + interface WorksheetProtectionData { + /** + * + * Sheet protection options. Read-Only. + * + * [Api set: ExcelApi 1.2] + */ + options?: Excel.WorksheetProtectionOptions; + /** + * + * Indicates if the worksheet is protected. Read-Only. + * + * [Api set: ExcelApi 1.2] + */ + protected?: boolean; + } + /** An interface describing the data returned by calling "range.toJSON()". */ + interface RangeData { + /** + * + * Collection of ConditionalFormats that intersect the range. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + conditionalFormats?: Excel.Interfaces.ConditionalFormatCollectionData; + /** + * + * Returns a format object, encapsulating the range's font, fill, borders, alignment, and other properties. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.RangeFormatData; + /** + * + * The worksheet containing the current range. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + worksheet?: Excel.Interfaces.WorksheetData; + /** + * + * Represents the range reference in A1-style. Address value will contain the Sheet reference (e.g. Sheet1!A1:B4). Read-only. + * + * [Api set: ExcelApi 1.1] + */ + address?: string; + /** + * + * Represents range reference for the specified range in the language of the user. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + addressLocal?: string; + /** + * + * Number of cells in the range. This API will return -1 if the cell count exceeds 2^31-1 (2,147,483,647). Read-only. + * + * [Api set: ExcelApi 1.1] + */ + cellCount?: number; + /** + * + * Represents the total number of columns in the range. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + columnCount?: number; + /** + * + * Represents if all columns of the current range are hidden. + * + * [Api set: ExcelApi 1.2] + */ + columnHidden?: boolean; + /** + * + * Represents the column number of the first cell in the range. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + columnIndex?: number; + /** + * + * Represents the formula in A1-style notation. + * + * [Api set: ExcelApi 1.1] + */ + formulas?: Array>; + /** + * + * Represents the formula in A1-style notation, in the user's language and number-formatting locale. For example, the English "=SUM(A1, 1.5)" formula would become "=SUMME(A1; 1,5)" in German. + * + * [Api set: ExcelApi 1.1] + */ + formulasLocal?: Array>; + /** + * + * Represents the formula in R1C1-style notation. + * + * [Api set: ExcelApi 1.2] + */ + formulasR1C1?: Array>; + /** + * + * Represents if all cells of the current range are hidden. + * + * [Api set: ExcelApi 1.2] + */ + hidden?: boolean; + /** + * + * Represents Excel's number format code for the given cell. + * + * [Api set: ExcelApi 1.1] + */ + numberFormat?: Array>; + /** + * + * Returns the total number of rows in the range. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + rowCount?: number; + /** + * + * Represents if all rows of the current range are hidden. + * + * [Api set: ExcelApi 1.2] + */ + rowHidden?: boolean; + /** + * + * Returns the row number of the first cell in the range. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + rowIndex?: number; + /** + * + * Text values of the specified range. The Text value will not depend on the cell width. The # sign substitution that happens in Excel UI will not affect the text value returned by the API. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + text?: Array>; + /** + * + * Represents the type of data of each cell. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + valueTypes?: Array>; + /** + * + * Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cell that contain an error will return the error string. + * + * [Api set: ExcelApi 1.1] + */ + values?: Array>; + } + /** An interface describing the data returned by calling "rangeView.toJSON()". */ + interface RangeViewData { + /** + * + * Represents a collection of range views associated with the range. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + rows?: Excel.Interfaces.RangeViewCollectionData; + /** + * + * Represents the cell addresses of the RangeView. + * + * [Api set: ExcelApi 1.3] + */ + cellAddresses?: Array>; + /** + * + * Returns the number of visible columns. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + columnCount?: number; + /** + * + * Represents the formula in A1-style notation. + * + * [Api set: ExcelApi 1.3] + */ + formulas?: Array>; + /** + * + * Represents the formula in A1-style notation, in the user's language and number-formatting locale. For example, the English "=SUM(A1, 1.5)" formula would become "=SUMME(A1; 1,5)" in German. + * + * [Api set: ExcelApi 1.3] + */ + formulasLocal?: Array>; + /** + * + * Represents the formula in R1C1-style notation. + * + * [Api set: ExcelApi 1.3] + */ + formulasR1C1?: Array>; + /** + * + * Returns a value that represents the index of the RangeView. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + index?: number; + /** + * + * Represents Excel's number format code for the given cell. + * + * [Api set: ExcelApi 1.3] + */ + numberFormat?: Array>; + /** + * + * Returns the number of visible rows. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + rowCount?: number; + /** + * + * Text values of the specified range. The Text value will not depend on the cell width. The # sign substitution that happens in Excel UI will not affect the text value returned by the API. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + text?: Array>; + /** + * + * Represents the type of data of each cell. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + valueTypes?: Array>; + /** + * + * Represents the raw values of the specified range view. The data returned could be of type string, number, or a boolean. Cell that contain an error will return the error string. + * + * [Api set: ExcelApi 1.3] + */ + values?: Array>; + } + /** An interface describing the data returned by calling "rangeViewCollection.toJSON()". */ + interface RangeViewCollectionData { + items?: Excel.Interfaces.RangeViewData[]; + } + /** An interface describing the data returned by calling "settingCollection.toJSON()". */ + interface SettingCollectionData { + items?: Excel.Interfaces.SettingData[]; + } + /** An interface describing the data returned by calling "setting.toJSON()". */ + interface SettingData { + /** + * + * Returns the key that represents the id of the Setting. Read-only. + * + * [Api set: ExcelApi 1.4] + */ + key?: string; + /** + * + * Represents the value stored for this setting. + * + * [Api set: ExcelApi 1.4] + */ + value?: any; + } + /** An interface describing the data returned by calling "namedItemCollection.toJSON()". */ + interface NamedItemCollectionData { + items?: Excel.Interfaces.NamedItemData[]; + } + /** An interface describing the data returned by calling "namedItem.toJSON()". */ + interface NamedItemData { + /** + * + * Returns the worksheet on which the named item is scoped to. Throws an error if the items is scoped to the workbook instead. + * + * [Api set: ExcelApi 1.4] + */ + worksheet?: Excel.Interfaces.WorksheetData; + /** + * + * Returns the worksheet on which the named item is scoped to. Returns a null object if the item is scoped to the workbook instead. + * + * [Api set: ExcelApi 1.4] + */ + worksheetOrNullObject?: Excel.Interfaces.WorksheetData; + /** + * + * Represents the comment associated with this name. + * + * [Api set: ExcelApi 1.4] + */ + comment?: string; + /** + * + * The name of the object. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * + * Indicates whether the name is scoped to the workbook or to a specific worksheet. Read-only. + * + * [Api set: ExcelApi 1.4] + */ + scope?: string; + /** + * + * Indicates the type of the value returned by the name's formula. See Excel.NamedItemType for details. Read-only. + * + * [Api set: ExcelApi 1.1 for String,Integer,Double,Boolean,Range,Error; 1.7 for Array] + */ + type?: string; + /** + * + * Represents the value computed by the name's formula. For a named range, will return the range address. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + value?: any; + /** + * + * Specifies whether the object is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** An interface describing the data returned by calling "binding.toJSON()". */ + interface BindingData { + /** + * + * Represents binding identifier. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: string; + /** + * + * Returns the type of the binding. See Excel.BindingType for details. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + type?: string; + } + /** An interface describing the data returned by calling "bindingCollection.toJSON()". */ + interface BindingCollectionData { + /** + * + * Returns the number of bindings in the collection. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + count?: number; + items?: Excel.Interfaces.BindingData[]; + } + /** An interface describing the data returned by calling "tableCollection.toJSON()". */ + interface TableCollectionData { + /** + * + * Returns the number of tables in the workbook. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + count?: number; + items?: Excel.Interfaces.TableData[]; + } + /** An interface describing the data returned by calling "table.toJSON()". */ + interface TableData { + /** + * + * Represents a collection of all the columns in the table. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + columns?: Excel.Interfaces.TableColumnCollectionData; + /** + * + * Represents a collection of all the rows in the table. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + rows?: Excel.Interfaces.TableRowCollectionData; + /** + * + * Represents the sorting for the table. + * + * [Api set: ExcelApi 1.2] + */ + sort?: Excel.Interfaces.TableSortData; + /** + * + * The worksheet containing the current table. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + worksheet?: Excel.Interfaces.WorksheetData; + /** + * + * Indicates whether the first column contains special formatting. + * + * [Api set: ExcelApi 1.3] + */ + highlightFirstColumn?: boolean; + /** + * + * Indicates whether the last column contains special formatting. + * + * [Api set: ExcelApi 1.3] + */ + highlightLastColumn?: boolean; + /** + * + * Returns a value that uniquely identifies the table in a given workbook. The value of the identifier remains the same even when the table is renamed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: string; + /** + * + * Name of the table. + * + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * + * Indicates whether the columns show banded formatting in which odd columns are highlighted differently from even ones to make reading the table easier. + * + * [Api set: ExcelApi 1.3] + */ + showBandedColumns?: boolean; + /** + * + * Indicates whether the rows show banded formatting in which odd rows are highlighted differently from even ones to make reading the table easier. + * + * [Api set: ExcelApi 1.3] + */ + showBandedRows?: boolean; + /** + * + * Indicates whether the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. + * + * [Api set: ExcelApi 1.3] + */ + showFilterButton?: boolean; + /** + * + * Indicates whether the header row is visible or not. This value can be set to show or remove the header row. + * + * [Api set: ExcelApi 1.1] + */ + showHeaders?: boolean; + /** + * + * Indicates whether the total row is visible or not. This value can be set to show or remove the total row. + * + * [Api set: ExcelApi 1.1] + */ + showTotals?: boolean; + /** + * + * Constant value that represents the Table style. Possible values are: TableStyleLight1 thru TableStyleLight21, TableStyleMedium1 thru TableStyleMedium28, TableStyleStyleDark1 thru TableStyleStyleDark11. A custom user-defined style present in the workbook can also be specified. + * + * [Api set: ExcelApi 1.1] + */ + style?: string; + } + /** An interface describing the data returned by calling "tableColumnCollection.toJSON()". */ + interface TableColumnCollectionData { + /** + * + * Returns the number of columns in the table. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + count?: number; + items?: Excel.Interfaces.TableColumnData[]; + } + /** An interface describing the data returned by calling "tableColumn.toJSON()". */ + interface TableColumnData { + /** + * + * Retrieve the filter applied to the column. + * + * [Api set: ExcelApi 1.2] + */ + filter?: Excel.Interfaces.FilterData; + /** + * + * Returns a unique key that identifies the column within the table. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: number; + /** + * + * Returns the index number of the column within the columns collection of the table. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + index?: number; + /** + * + * Represents the name of the table column. + * + * [Api set: ExcelApi 1.1 for getting the name; 1.4 for setting it.] + */ + name?: string; + /** + * + * Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cell that contain an error will return the error string. + * + * [Api set: ExcelApi 1.1] + */ + values?: Array>; + } + /** An interface describing the data returned by calling "tableRowCollection.toJSON()". */ + interface TableRowCollectionData { + /** + * + * Returns the number of rows in the table. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + count?: number; + items?: Excel.Interfaces.TableRowData[]; + } + /** An interface describing the data returned by calling "tableRow.toJSON()". */ + interface TableRowData { + /** + * + * Returns the index number of the row within the rows collection of the table. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + index?: number; + /** + * + * Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cell that contain an error will return the error string. + * + * [Api set: ExcelApi 1.1] + */ + values?: Array>; + } + /** An interface describing the data returned by calling "rangeFormat.toJSON()". */ + interface RangeFormatData { + /** + * + * Collection of border objects that apply to the overall range. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + borders?: Excel.Interfaces.RangeBorderCollectionData; + /** + * + * Returns the fill object defined on the overall range. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + fill?: Excel.Interfaces.RangeFillData; + /** + * + * Returns the font object defined on the overall range. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.RangeFontData; + /** + * + * Returns the format protection object for a range. + * + * [Api set: ExcelApi 1.2] + */ + protection?: Excel.Interfaces.FormatProtectionData; + /** + * + * Gets or sets the width of all colums within the range. If the column widths are not uniform, null will be returned. + * + * [Api set: ExcelApi 1.2] + */ + columnWidth?: number; + /** + * + * Represents the horizontal alignment for the specified object. See Excel.HorizontalAlignment for details. + * + * [Api set: ExcelApi 1.1] + */ + horizontalAlignment?: string; + /** + * + * Gets or sets the height of all rows in the range. If the row heights are not uniform null will be returned. + * + * [Api set: ExcelApi 1.2] + */ + rowHeight?: number; + /** + * + * Represents the vertical alignment for the specified object. See Excel.VerticalAlignment for details. + * + * [Api set: ExcelApi 1.1] + */ + verticalAlignment?: string; + /** + * + * Indicates if Excel wraps the text in the object. A null value indicates that the entire range doesn't have uniform wrap setting + * + * [Api set: ExcelApi 1.1] + */ + wrapText?: boolean; + } + /** An interface describing the data returned by calling "formatProtection.toJSON()". */ + interface FormatProtectionData { + /** + * + * Indicates if Excel hides the formula for the cells in the range. A null value indicates that the entire range doesn't have uniform formula hidden setting. + * + * [Api set: ExcelApi 1.2] + */ + formulaHidden?: boolean; + /** + * + * Indicates if Excel locks the cells in the object. A null value indicates that the entire range doesn't have uniform lock setting. + * + * [Api set: ExcelApi 1.2] + */ + locked?: boolean; + } + /** An interface describing the data returned by calling "rangeFill.toJSON()". */ + interface RangeFillData { + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange") + * + * [Api set: ExcelApi 1.1] + */ + color?: string; + } + /** An interface describing the data returned by calling "rangeBorder.toJSON()". */ + interface RangeBorderData { + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * + * Constant value that indicates the specific side of the border. See Excel.BorderIndex for details. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + sideIndex?: string; + /** + * + * One of the constants of line style specifying the line style for the border. See Excel.BorderLineStyle for details. + * + * [Api set: ExcelApi 1.1] + */ + style?: string; + /** + * + * Specifies the weight of the border around a range. See Excel.BorderWeight for details. + * + * [Api set: ExcelApi 1.1] + */ + weight?: string; + } + /** An interface describing the data returned by calling "rangeBorderCollection.toJSON()". */ + interface RangeBorderCollectionData { + /** + * + * Number of border objects in the collection. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + count?: number; + items?: Excel.Interfaces.RangeBorderData[]; + } + /** An interface describing the data returned by calling "rangeFont.toJSON()". */ + interface RangeFontData { + /** + * + * Represents the bold status of font. + * + * [Api set: ExcelApi 1.1] + */ + bold?: boolean; + /** + * + * HTML color code representation of the text color. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * + * Represents the italic status of the font. + * + * [Api set: ExcelApi 1.1] + */ + italic?: boolean; + /** + * + * Font name (e.g. "Calibri") + * + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * + * Font size. + * + * [Api set: ExcelApi 1.1] + */ + size?: number; + /** + * + * Type of underline applied to the font. See Excel.RangeUnderlineStyle for details. + * + * [Api set: ExcelApi 1.1] + */ + underline?: string; + } + /** An interface describing the data returned by calling "chartCollection.toJSON()". */ + interface ChartCollectionData { + /** + * + * Returns the number of charts in the worksheet. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + count?: number; + items?: Excel.Interfaces.ChartData[]; + } + /** An interface describing the data returned by calling "chart.toJSON()". */ + interface ChartData { + /** + * + * Represents chart axes. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + axes?: Excel.Interfaces.ChartAxesData; + /** + * + * Represents the datalabels on the chart. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + dataLabels?: Excel.Interfaces.ChartDataLabelsData; + /** + * + * Encapsulates the format properties for the chart area. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAreaFormatData; + /** + * + * Represents the legend for the chart. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + legend?: Excel.Interfaces.ChartLegendData; + /** + * + * Represents either a single series or collection of series in the chart. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + series?: Excel.Interfaces.ChartSeriesCollectionData; + /** + * + * Represents the title of the specified chart, including the text, visibility, position and formating of the title. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartTitleData; + /** + * + * The worksheet containing the current chart. Read-only. + * + * [Api set: ExcelApi 1.2] + */ + worksheet?: Excel.Interfaces.WorksheetData; + /** + * + * Represents the height, in points, of the chart object. + * + * [Api set: ExcelApi 1.1] + */ + height?: number; + /** + * + * The distance, in points, from the left side of the chart to the worksheet origin. + * + * [Api set: ExcelApi 1.1] + */ + left?: number; + /** + * + * Represents the name of a chart object. + * + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * + * Represents the distance, in points, from the top edge of the object to the top of row 1 (on a worksheet) or the top of the chart area (on a chart). + * + * [Api set: ExcelApi 1.1] + */ + top?: number; + /** + * + * Represents the width, in points, of the chart object. + * + * [Api set: ExcelApi 1.1] + */ + width?: number; + } + /** An interface describing the data returned by calling "chartAreaFormat.toJSON()". */ + interface ChartAreaFormatData { + /** + * + * Represents the font attributes (font name, font size, color, etc.) for the current object. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontData; + } + /** An interface describing the data returned by calling "chartSeriesCollection.toJSON()". */ + interface ChartSeriesCollectionData { + /** + * + * Returns the number of series in the collection. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + count?: number; + items?: Excel.Interfaces.ChartSeriesData[]; + } + /** An interface describing the data returned by calling "chartSeries.toJSON()". */ + interface ChartSeriesData { + /** + * + * Represents the formatting of a chart series, which includes fill and line formatting. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartSeriesFormatData; + /** + * + * Represents a collection of all points in the series. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + points?: Excel.Interfaces.ChartPointsCollectionData; + /** + * + * Represents the name of a series in a chart. + * + * [Api set: ExcelApi 1.1] + */ + name?: string; + } + /** An interface describing the data returned by calling "chartSeriesFormat.toJSON()". */ + interface ChartSeriesFormatData { + /** + * + * Represents line formatting. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + line?: Excel.Interfaces.ChartLineFormatData; + } + /** An interface describing the data returned by calling "chartPointsCollection.toJSON()". */ + interface ChartPointsCollectionData { + /** + * + * Returns the number of chart points in the series. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + count?: number; + items?: Excel.Interfaces.ChartPointData[]; + } + /** An interface describing the data returned by calling "chartPoint.toJSON()". */ + interface ChartPointData { + /** + * + * Encapsulates the format properties chart point. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartPointFormatData; + /** + * + * Returns the value of a chart point. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + value?: any; + } + /** An interface describing the data returned by calling "chartPointFormat.toJSON()". */ + interface ChartPointFormatData { + } + /** An interface describing the data returned by calling "chartAxes.toJSON()". */ + interface ChartAxesData { + /** + * + * Represents the category axis in a chart. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + categoryAxis?: Excel.Interfaces.ChartAxisData; + /** + * + * Represents the series axis of a 3-dimensional chart. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + seriesAxis?: Excel.Interfaces.ChartAxisData; + /** + * + * Represents the value axis in an axis. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + valueAxis?: Excel.Interfaces.ChartAxisData; + } + /** An interface describing the data returned by calling "chartAxis.toJSON()". */ + interface ChartAxisData { + /** + * + * Represents the formatting of a chart object, which includes line and font formatting. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAxisFormatData; + /** + * + * Returns a gridlines object that represents the major gridlines for the specified axis. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + majorGridlines?: Excel.Interfaces.ChartGridlinesData; + /** + * + * Returns a Gridlines object that represents the minor gridlines for the specified axis. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + minorGridlines?: Excel.Interfaces.ChartGridlinesData; + /** + * + * Represents the axis title. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartAxisTitleData; + /** + * + * Represents the interval between two major tick marks. Can be set to a numeric value or an empty string. The returned value is always a number. + * + * [Api set: ExcelApi 1.1] + */ + majorUnit?: any; + /** + * + * Represents the maximum value on the value axis. Can be set to a numeric value or an empty string (for automatic axis values). The returned value is always a number. + * + * [Api set: ExcelApi 1.1] + */ + maximum?: any; + /** + * + * Represents the minimum value on the value axis. Can be set to a numeric value or an empty string (for automatic axis values). The returned value is always a number. + * + * [Api set: ExcelApi 1.1] + */ + minimum?: any; + /** + * + * Represents the interval between two minor tick marks. "Can be set to a numeric value or an empty string (for automatic axis values). The returned value is always a number. + * + * [Api set: ExcelApi 1.1] + */ + minorUnit?: any; + } + /** An interface describing the data returned by calling "chartAxisFormat.toJSON()". */ + interface ChartAxisFormatData { + /** + * + * Represents the font attributes (font name, font size, color, etc.) for a chart axis element. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontData; + /** + * + * Represents chart line formatting. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + line?: Excel.Interfaces.ChartLineFormatData; + } + /** An interface describing the data returned by calling "chartAxisTitle.toJSON()". */ + interface ChartAxisTitleData { + /** + * + * Represents the formatting of chart axis title. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAxisTitleFormatData; + /** + * + * Represents the axis title. + * + * [Api set: ExcelApi 1.1] + */ + text?: string; + /** + * + * A boolean that specifies the visibility of an axis title. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** An interface describing the data returned by calling "chartAxisTitleFormat.toJSON()". */ + interface ChartAxisTitleFormatData { + /** + * + * Represents the font attributes, such as font name, font size, color, etc. of chart axis title object. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontData; + } + /** An interface describing the data returned by calling "chartDataLabels.toJSON()". */ + interface ChartDataLabelsData { + /** + * + * Represents the format of chart data labels, which includes fill and font formatting. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartDataLabelFormatData; + /** + * + * DataLabelPosition value that represents the position of the data label. See Excel.ChartDataLabelPosition for details. + * + * [Api set: ExcelApi 1.1] + */ + position?: string; + /** + * + * String representing the separator used for the data labels on a chart. + * + * [Api set: ExcelApi 1.1] + */ + separator?: string; + /** + * + * Boolean value representing if the data label bubble size is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showBubbleSize?: boolean; + /** + * + * Boolean value representing if the data label category name is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showCategoryName?: boolean; + /** + * + * Boolean value representing if the data label legend key is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showLegendKey?: boolean; + /** + * + * Boolean value representing if the data label percentage is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showPercentage?: boolean; + /** + * + * Boolean value representing if the data label series name is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showSeriesName?: boolean; + /** + * + * Boolean value representing if the data label value is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showValue?: boolean; + } + /** An interface describing the data returned by calling "chartDataLabelFormat.toJSON()". */ + interface ChartDataLabelFormatData { + /** + * + * Represents the font attributes (font name, font size, color, etc.) for a chart data label. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontData; + } + /** An interface describing the data returned by calling "chartGridlines.toJSON()". */ + interface ChartGridlinesData { + /** + * + * Represents the formatting of chart gridlines. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartGridlinesFormatData; + /** + * + * Boolean value representing if the axis gridlines are visible or not. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** An interface describing the data returned by calling "chartGridlinesFormat.toJSON()". */ + interface ChartGridlinesFormatData { + /** + * + * Represents chart line formatting. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + line?: Excel.Interfaces.ChartLineFormatData; + } + /** An interface describing the data returned by calling "chartLegend.toJSON()". */ + interface ChartLegendData { + /** + * + * Represents the formatting of a chart legend, which includes fill and font formatting. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartLegendFormatData; + /** + * + * Boolean value for whether the chart legend should overlap with the main body of the chart. + * + * [Api set: ExcelApi 1.1] + */ + overlay?: boolean; + /** + * + * Represents the position of the legend on the chart. See Excel.ChartLegendPosition for details. + * + * [Api set: ExcelApi 1.1] + */ + position?: string; + /** + * + * A boolean value the represents the visibility of a ChartLegend object. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** An interface describing the data returned by calling "chartLegendFormat.toJSON()". */ + interface ChartLegendFormatData { + /** + * + * Represents the font attributes such as font name, font size, color, etc. of a chart legend. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontData; + } + /** An interface describing the data returned by calling "chartTitle.toJSON()". */ + interface ChartTitleData { + /** + * + * Represents the formatting of a chart title, which includes fill and font formatting. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartTitleFormatData; + /** + * + * Boolean value representing if the chart title will overlay the chart or not. + * + * [Api set: ExcelApi 1.1] + */ + overlay?: boolean; + /** + * + * Represents the title text of a chart. + * + * [Api set: ExcelApi 1.1] + */ + text?: string; + /** + * + * A boolean value the represents the visibility of a chart title object. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** An interface describing the data returned by calling "chartTitleFormat.toJSON()". */ + interface ChartTitleFormatData { + /** + * + * Represents the font attributes (font name, font size, color, etc.) for an object. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontData; + } + /** An interface describing the data returned by calling "chartLineFormat.toJSON()". */ + interface ChartLineFormatData { + /** + * + * HTML color code representing the color of lines in the chart. + * + * [Api set: ExcelApi 1.1] + */ + color?: string; + } + /** An interface describing the data returned by calling "chartFont.toJSON()". */ + interface ChartFontData { + /** + * + * Represents the bold status of font. + * + * [Api set: ExcelApi 1.1] + */ + bold?: boolean; + /** + * + * HTML color code representation of the text color. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.1] + */ + color?: string; + /** + * + * Represents the italic status of the font. + * + * [Api set: ExcelApi 1.1] + */ + italic?: boolean; + /** + * + * Font name (e.g. "Calibri") + * + * [Api set: ExcelApi 1.1] + */ + name?: string; + /** + * + * Size of the font (e.g. 11) + * + * [Api set: ExcelApi 1.1] + */ + size?: number; + /** + * + * Type of underline applied to the font. See Excel.ChartUnderlineStyle for details. + * + * [Api set: ExcelApi 1.1] + */ + underline?: string; + } + /** An interface describing the data returned by calling "tableSort.toJSON()". */ + interface TableSortData { + /** + * + * Represents the current conditions used to last sort the table. + * + * [Api set: ExcelApi 1.2] + */ + fields?: Array; + /** + * + * Represents whether the casing impacted the last sort of the table. + * + * [Api set: ExcelApi 1.2] + */ + matchCase?: boolean; + /** + * + * Represents Chinese character ordering method last used to sort the table. + * + * [Api set: ExcelApi 1.2] + */ + method?: string; + } + /** An interface describing the data returned by calling "filter.toJSON()". */ + interface FilterData { + /** + * + * The currently applied filter on the given column. + * + * [Api set: ExcelApi 1.2] + */ + criteria?: Excel.FilterCriteria; + } + /** An interface describing the data returned by calling "customXmlPartScopedCollection.toJSON()". */ + interface CustomXmlPartScopedCollectionData { + items?: Excel.Interfaces.CustomXmlPartData[]; + } + /** An interface describing the data returned by calling "customXmlPartCollection.toJSON()". */ + interface CustomXmlPartCollectionData { + items?: Excel.Interfaces.CustomXmlPartData[]; + } + /** An interface describing the data returned by calling "customXmlPart.toJSON()". */ + interface CustomXmlPartData { + /** + * + * The custom XML part's ID. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + id?: string; + /** + * + * The custom XML part's namespace URI. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + namespaceUri?: string; + } + /** An interface describing the data returned by calling "pivotTableCollection.toJSON()". */ + interface PivotTableCollectionData { + items?: Excel.Interfaces.PivotTableData[]; + } + /** An interface describing the data returned by calling "pivotTable.toJSON()". */ + interface PivotTableData { + /** + * + * The worksheet containing the current PivotTable. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + worksheet?: Excel.Interfaces.WorksheetData; + /** + * + * Id of the PivotTable. + * + * [Api set: ExcelApi 1.5] + */ + id?: string; + /** + * + * Name of the PivotTable. + * + * [Api set: ExcelApi 1.3] + */ + name?: string; + } + /** An interface describing the data returned by calling "conditionalFormatCollection.toJSON()". */ + interface ConditionalFormatCollectionData { + items?: Excel.Interfaces.ConditionalFormatData[]; + } + /** An interface describing the data returned by calling "conditionalFormat.toJSON()". */ + interface ConditionalFormatData { + /** + * + * Returns the cell value conditional format properties if the current conditional format is a CellValue type. + For example to format all cells between 5 and 10. + * + * [Api set: ExcelApi 1.6] + */ + cellValue?: Excel.Interfaces.CellValueConditionalFormatData; + /** + * + * Returns the cell value conditional format properties if the current conditional format is a CellValue type. + For example to format all cells between 5 and 10. + * + * [Api set: ExcelApi 1.6] + */ + cellValueOrNullObject?: Excel.Interfaces.CellValueConditionalFormatData; + /** + * + * Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. + * + * [Api set: ExcelApi 1.6] + */ + colorScale?: Excel.Interfaces.ColorScaleConditionalFormatData; + /** + * + * Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. + * + * [Api set: ExcelApi 1.6] + */ + colorScaleOrNullObject?: Excel.Interfaces.ColorScaleConditionalFormatData; + /** + * + * Returns the custom conditional format properties if the current conditional format is a custom type. + * + * [Api set: ExcelApi 1.6] + */ + custom?: Excel.Interfaces.CustomConditionalFormatData; + /** + * + * Returns the custom conditional format properties if the current conditional format is a custom type. + * + * [Api set: ExcelApi 1.6] + */ + customOrNullObject?: Excel.Interfaces.CustomConditionalFormatData; + /** + * + * Returns the data bar properties if the current conditional format is a data bar. + * + * [Api set: ExcelApi 1.6] + */ + dataBar?: Excel.Interfaces.DataBarConditionalFormatData; + /** + * + * Returns the data bar properties if the current conditional format is a data bar. + * + * [Api set: ExcelApi 1.6] + */ + dataBarOrNullObject?: Excel.Interfaces.DataBarConditionalFormatData; + /** + * + * Returns the IconSet conditional format properties if the current conditional format is an IconSet type. + * + * [Api set: ExcelApi 1.6] + */ + iconSet?: Excel.Interfaces.IconSetConditionalFormatData; + /** + * + * Returns the IconSet conditional format properties if the current conditional format is an IconSet type. + * + * [Api set: ExcelApi 1.6] + */ + iconSetOrNullObject?: Excel.Interfaces.IconSetConditionalFormatData; + /** + * + * Returns the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror properties. + * + * [Api set: ExcelApi 1.6] + */ + preset?: Excel.Interfaces.PresetCriteriaConditionalFormatData; + /** + * + * Returns the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror properties. + * + * [Api set: ExcelApi 1.6] + */ + presetOrNullObject?: Excel.Interfaces.PresetCriteriaConditionalFormatData; + /** + * + * Returns the specific text conditional format properties if the current conditional format is a text type. + For example to format cells matching the word "Text". + * + * [Api set: ExcelApi 1.6] + */ + textComparison?: Excel.Interfaces.TextConditionalFormatData; + /** + * + * Returns the specific text conditional format properties if the current conditional format is a text type. + For example to format cells matching the word "Text". + * + * [Api set: ExcelApi 1.6] + */ + textComparisonOrNullObject?: Excel.Interfaces.TextConditionalFormatData; + /** + * + * Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. + For example to format the top 10% or bottom 10 items. + * + * [Api set: ExcelApi 1.6] + */ + topBottom?: Excel.Interfaces.TopBottomConditionalFormatData; + /** + * + * Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. + For example to format the top 10% or bottom 10 items. + * + * [Api set: ExcelApi 1.6] + */ + topBottomOrNullObject?: Excel.Interfaces.TopBottomConditionalFormatData; + /** + * + * The Priority of the Conditional Format within the current ConditionalFormatCollection. + * + * [Api set: ExcelApi 1.6] + */ + id?: string; + /** + * + * The priority (or index) within the conditional format collection that this conditional format currently exists in. Changing this also + changes other conditional formats' priorities, to allow for a contiguous priority order. + Use a negative priority to begin from the back. + Priorities greater than than bounds will get and set to the maximum (or minimum if negative) priority. + Also note that if you change the priority, you have to re-fetch a new copy of the object at that new priority location if you want to make further changes to it. + * + * [Api set: ExcelApi 1.6] + */ + priority?: number; + /** + * + * If the conditions of this conditional format are met, no lower-priority formats shall take effect on that cell. + Null on databars, icon sets, and colorscales as there's no concept of StopIfTrue for these + * + * [Api set: ExcelApi 1.6] + */ + stopIfTrue?: boolean; + /** + * + * A type of conditional format. Only one can be set at a time. Read-Only. + * + * [Api set: ExcelApi 1.6] + */ + type?: string; + } + /** An interface describing the data returned by calling "dataBarConditionalFormat.toJSON()". */ + interface DataBarConditionalFormatData { + /** + * + * Representation of all values to the left of the axis in an Excel data bar. + * + * [Api set: ExcelApi 1.6] + */ + negativeFormat?: Excel.Interfaces.ConditionalDataBarNegativeFormatData; + /** + * + * Representation of all values to the right of the axis in an Excel data bar. + * + * [Api set: ExcelApi 1.6] + */ + positiveFormat?: Excel.Interfaces.ConditionalDataBarPositiveFormatData; + /** + * + * HTML color code representing the color of the Axis line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + "" (empty string) if no axis is present or set. + * + * [Api set: ExcelApi 1.6] + */ + axisColor?: string; + /** + * + * Representation of how the axis is determined for an Excel data bar. + * + * [Api set: ExcelApi 1.6] + */ + axisFormat?: string; + /** + * + * Represents the direction that the data bar graphic should be based on. + * + * [Api set: ExcelApi 1.6] + */ + barDirection?: string; + /** + * + * The rule for what consistutes the lower bound (and how to calculate it, if applicable) for a data bar. + * + * [Api set: ExcelApi 1.6] + */ + lowerBoundRule?: Excel.ConditionalDataBarRule; + /** + * + * If true, hides the values from the cells where the data bar is applied. + * + * [Api set: ExcelApi 1.6] + */ + showDataBarOnly?: boolean; + /** + * + * The rule for what constitutes the upper bound (and how to calculate it, if applicable) for a data bar. + * + * [Api set: ExcelApi 1.6] + */ + upperBoundRule?: Excel.ConditionalDataBarRule; + } + /** An interface describing the data returned by calling "conditionalDataBarPositiveFormat.toJSON()". */ + interface ConditionalDataBarPositiveFormatData { + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + "" (empty string) if no border is present or set. + * + * [Api set: ExcelApi 1.6] + */ + borderColor?: string; + /** + * + * HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + fillColor?: string; + /** + * + * Boolean representation of whether or not the DataBar has a gradient. + * + * [Api set: ExcelApi 1.6] + */ + gradientFill?: boolean; + } + /** An interface describing the data returned by calling "conditionalDataBarNegativeFormat.toJSON()". */ + interface ConditionalDataBarNegativeFormatData { + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + "Empty String" if no border is present or set. + * + * [Api set: ExcelApi 1.6] + */ + borderColor?: string; + /** + * + * HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + fillColor?: string; + /** + * + * Boolean representation of whether or not the negative DataBar has the same border color as the positive DataBar. + * + * [Api set: ExcelApi 1.6] + */ + matchPositiveBorderColor?: boolean; + /** + * + * Boolean representation of whether or not the negative DataBar has the same fill color as the positive DataBar. + * + * [Api set: ExcelApi 1.6] + */ + matchPositiveFillColor?: boolean; + } + /** An interface describing the data returned by calling "customConditionalFormat.toJSON()". */ + interface CustomConditionalFormatData { + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatData; + /** + * + * Represents the Rule object on this conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule?: Excel.Interfaces.ConditionalFormatRuleData; + } + /** An interface describing the data returned by calling "conditionalFormatRule.toJSON()". */ + interface ConditionalFormatRuleData { + /** + * + * The formula, if required, to evaluate the conditional format rule on. + * + * [Api set: ExcelApi 1.6] + */ + formula?: string; + /** + * + * The formula, if required, to evaluate the conditional format rule on in the user's language. + * + * [Api set: ExcelApi 1.6] + */ + formulaLocal?: string; + /** + * + * The formula, if required, to evaluate the conditional format rule on in R1C1-style notation. + * + * [Api set: ExcelApi 1.6] + */ + formulaR1C1?: string; + } + /** An interface describing the data returned by calling "iconSetConditionalFormat.toJSON()". */ + interface IconSetConditionalFormatData { + /** + * + * An array of Criteria and IconSets for the rules and potential custom icons for conditional icons. Note that for the first criterion only the custom icon can be modified, while type, formula and operator will be ignored when set. + * + * [Api set: ExcelApi 1.6] + */ + criteria?: Array; + /** + * + * If true, reverses the icon orders for the IconSet. Note that this cannot be set if custom icons are used. + * + * [Api set: ExcelApi 1.6] + */ + reverseIconOrder?: boolean; + /** + * + * If true, hides the values and only shows icons. + * + * [Api set: ExcelApi 1.6] + */ + showIconOnly?: boolean; + /** + * + * If set, displays the IconSet option for the conditional format. + * + * [Api set: ExcelApi 1.6] + */ + style?: string; + } + /** An interface describing the data returned by calling "colorScaleConditionalFormat.toJSON()". */ + interface ColorScaleConditionalFormatData { + /** + * + * The criteria of the color scale. Midpoint is optional when using a two point color scale. + * + * [Api set: ExcelApi 1.6] + */ + criteria?: Excel.ConditionalColorScaleCriteria; + /** + * + * If true the color scale will have three points (minimum, midpoint, maximum), otherwise it will have two (minimum, maximum). + * + * [Api set: ExcelApi 1.6] + */ + threeColorScale?: boolean; + } + /** An interface describing the data returned by calling "topBottomConditionalFormat.toJSON()". */ + interface TopBottomConditionalFormatData { + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatData; + /** + * + * The criteria of the Top/Bottom conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule?: Excel.ConditionalTopBottomRule; + } + /** An interface describing the data returned by calling "presetCriteriaConditionalFormat.toJSON()". */ + interface PresetCriteriaConditionalFormatData { + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatData; + /** + * + * The rule of the conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule?: Excel.ConditionalPresetCriteriaRule; + } + /** An interface describing the data returned by calling "textConditionalFormat.toJSON()". */ + interface TextConditionalFormatData { + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatData; + /** + * + * The rule of the conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule?: Excel.ConditionalTextComparisonRule; + } + /** An interface describing the data returned by calling "cellValueConditionalFormat.toJSON()". */ + interface CellValueConditionalFormatData { + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatData; + /** + * + * Represents the Rule object on this conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule?: Excel.ConditionalCellValueRule; + } + /** An interface describing the data returned by calling "conditionalRangeFormat.toJSON()". */ + interface ConditionalRangeFormatData { + /** + * + * Collection of border objects that apply to the overall conditional format range. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + borders?: Excel.Interfaces.ConditionalRangeBorderCollectionData; + /** + * + * Returns the fill object defined on the overall conditional format range. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + fill?: Excel.Interfaces.ConditionalRangeFillData; + /** + * + * Returns the font object defined on the overall conditional format range. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + font?: Excel.Interfaces.ConditionalRangeFontData; + /** + * + * Represents Excel's number format code for the given range. Cleared if null is passed in. + * + * [Api set: ExcelApi 1.6] + */ + numberFormat?: any; + } + /** An interface describing the data returned by calling "conditionalRangeFont.toJSON()". */ + interface ConditionalRangeFontData { + /** + * + * Represents the bold status of font. + * + * [Api set: ExcelApi 1.6] + */ + bold?: boolean; + /** + * + * HTML color code representation of the text color. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.6] + */ + color?: string; + /** + * + * Represents the italic status of the font. + * + * [Api set: ExcelApi 1.6] + */ + italic?: boolean; + /** + * + * Represents the strikethrough status of the font. + * + * [Api set: ExcelApi 1.6] + */ + strikethrough?: boolean; + /** + * + * Type of underline applied to the font. See Excel.ConditionalRangeFontUnderlineStyle for details. + * + * [Api set: ExcelApi 1.6] + */ + underline?: string; + } + /** An interface describing the data returned by calling "conditionalRangeFill.toJSON()". */ + interface ConditionalRangeFillData { + /** + * + * HTML color code representing the color of the fill, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + color?: string; + } + /** An interface describing the data returned by calling "conditionalRangeBorder.toJSON()". */ + interface ConditionalRangeBorderData { + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + color?: string; + /** + * + * Constant value that indicates the specific side of the border. See Excel.ConditionalRangeBorderIndex for details. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + sideIndex?: string; + /** + * + * One of the constants of line style specifying the line style for the border. See Excel.BorderLineStyle for details. + * + * [Api set: ExcelApi 1.6] + */ + style?: string; + } + /** An interface describing the data returned by calling "conditionalRangeBorderCollection.toJSON()". */ + interface ConditionalRangeBorderCollectionData { + /** + * + * Gets the top border + * + * [Api set: ExcelApi 1.6] + */ + bottom?: Excel.Interfaces.ConditionalRangeBorderData; + /** + * + * Gets the top border + * + * [Api set: ExcelApi 1.6] + */ + left?: Excel.Interfaces.ConditionalRangeBorderData; + /** + * + * Gets the top border + * + * [Api set: ExcelApi 1.6] + */ + right?: Excel.Interfaces.ConditionalRangeBorderData; + /** + * + * Gets the top border + * + * [Api set: ExcelApi 1.6] + */ + top?: Excel.Interfaces.ConditionalRangeBorderData; + /** + * + * Number of border objects in the collection. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + count?: number; + items?: Excel.Interfaces.ConditionalRangeBorderData[]; + } + /** An interface describing the data returned by calling "functionResult.toJSON()". */ + interface FunctionResultData { + /** + * + * Error value (such as "#DIV/0") representing the error. If the error string is not set, then the function succeeded, and its result is written to the Value field. The error is always in the English locale. + * + * [Api set: ExcelApi 1.2] + */ + error?: string; + /** + * + * The value of function evaluation. The value field will be populated only if no error has occurred (i.e., the Error property is not set). + * + * [Api set: ExcelApi 1.2] + */ + value?: T; + } + /** + * + * Represents the Excel application that manages the workbook. + * + * [Api set: ExcelApi 1.1] + */ + interface ApplicationLoadOptions { + $all?: boolean; + /** + * + * Returns the calculation mode used in the workbook. See Excel.CalculationMode for details. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + calculationMode?: boolean; + } + /** + * + * Workbook is the top level object which contains related workbook objects such as worksheets, tables, ranges, etc. + * + * [Api set: ExcelApi 1.1] + */ + interface WorkbookLoadOptions { + $all?: boolean; + /** + * + * Represents the Excel application instance that contains this workbook. + * + * [Api set: ExcelApi 1.1] + */ + application?: Excel.Interfaces.ApplicationLoadOptions; + /** + * + * Represents a collection of bindings that are part of the workbook. + * + * [Api set: ExcelApi 1.1] + */ + bindings?: Excel.Interfaces.BindingCollectionLoadOptions; + /** + * + * Represents a collection of tables associated with the workbook. + * + * [Api set: ExcelApi 1.1] + */ + tables?: Excel.Interfaces.TableCollectionLoadOptions; + } + /** + * + * An Excel worksheet is a grid of cells. It can contain data, tables, charts, etc. + * + * [Api set: ExcelApi 1.1] + */ + interface WorksheetLoadOptions { + $all?: boolean; + /** + * + * Returns collection of charts that are part of the worksheet. + * + * [Api set: ExcelApi 1.1] + */ + charts?: Excel.Interfaces.ChartCollectionLoadOptions; + /** + * + * Returns sheet protection object for a worksheet. + * + * [Api set: ExcelApi 1.2] + */ + protection?: Excel.Interfaces.WorksheetProtectionLoadOptions; + /** + * + * Collection of tables that are part of the worksheet. + * + * [Api set: ExcelApi 1.1] + */ + tables?: Excel.Interfaces.TableCollectionLoadOptions; + /** + * + * Returns a value that uniquely identifies the worksheet in a given workbook. The value of the identifier remains the same even when the worksheet is renamed or moved. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * + * The display name of the worksheet. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * The zero-based position of the worksheet within the workbook. + * + * [Api set: ExcelApi 1.1] + */ + position?: boolean; + /** + * + * The Visibility of the worksheet. + * + * [Api set: ExcelApi 1.1 for reading visibility; 1.2 for setting it.] + */ + visibility?: boolean; + } + /** + * + * Represents a collection of worksheet objects that are part of the workbook. + * + * [Api set: ExcelApi 1.1] + */ + interface WorksheetCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Returns collection of charts that are part of the worksheet. + * + * [Api set: ExcelApi 1.1] + */ + charts?: Excel.Interfaces.ChartCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns sheet protection object for a worksheet. + * + * [Api set: ExcelApi 1.2] + */ + protection?: Excel.Interfaces.WorksheetProtectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Collection of tables that are part of the worksheet. + * + * [Api set: ExcelApi 1.1] + */ + tables?: Excel.Interfaces.TableCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns a value that uniquely identifies the worksheet in a given workbook. The value of the identifier remains the same even when the worksheet is renamed or moved. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: The display name of the worksheet. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: The zero-based position of the worksheet within the workbook. + * + * [Api set: ExcelApi 1.1] + */ + position?: boolean; + /** + * + * For EACH ITEM in the collection: The Visibility of the worksheet. + * + * [Api set: ExcelApi 1.1 for reading visibility; 1.2 for setting it.] + */ + visibility?: boolean; + } + /** + * + * Represents the protection of a sheet object. + * + * [Api set: ExcelApi 1.2] + */ + interface WorksheetProtectionLoadOptions { + $all?: boolean; + /** + * + * Sheet protection options. Read-Only. + * + * [Api set: ExcelApi 1.2] + */ + options?: boolean; + /** + * + * Indicates if the worksheet is protected. Read-Only. + * + * [Api set: ExcelApi 1.2] + */ + protected?: boolean; + } + /** + * + * Range represents a set of one or more contiguous cells such as a cell, a row, a column, block of cells, etc. + * + * [Api set: ExcelApi 1.1] + */ + interface RangeLoadOptions { + $all?: boolean; + /** + * + * Returns a format object, encapsulating the range's font, fill, borders, alignment, and other properties. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.RangeFormatLoadOptions; + /** + * + * The worksheet containing the current range. + * + * [Api set: ExcelApi 1.1] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * Represents the range reference in A1-style. Address value will contain the Sheet reference (e.g. Sheet1!A1:B4). Read-only. + * + * [Api set: ExcelApi 1.1] + */ + address?: boolean; + /** + * + * Represents range reference for the specified range in the language of the user. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + addressLocal?: boolean; + /** + * + * Number of cells in the range. This API will return -1 if the cell count exceeds 2^31-1 (2,147,483,647). Read-only. + * + * [Api set: ExcelApi 1.1] + */ + cellCount?: boolean; + /** + * + * Represents the total number of columns in the range. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + columnCount?: boolean; + /** + * + * Represents if all columns of the current range are hidden. + * + * [Api set: ExcelApi 1.2] + */ + columnHidden?: boolean; + /** + * + * Represents the column number of the first cell in the range. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + columnIndex?: boolean; + /** + * + * Represents the formula in A1-style notation. + * + * [Api set: ExcelApi 1.1] + */ + formulas?: boolean; + /** + * + * Represents the formula in A1-style notation, in the user's language and number-formatting locale. For example, the English "=SUM(A1, 1.5)" formula would become "=SUMME(A1; 1,5)" in German. + * + * [Api set: ExcelApi 1.1] + */ + formulasLocal?: boolean; + /** + * + * Represents the formula in R1C1-style notation. + * + * [Api set: ExcelApi 1.2] + */ + formulasR1C1?: boolean; + /** + * + * Represents if all cells of the current range are hidden. + * + * [Api set: ExcelApi 1.2] + */ + hidden?: boolean; + /** + * + * Represents Excel's number format code for the given cell. + * + * [Api set: ExcelApi 1.1] + */ + numberFormat?: boolean; + /** + * + * Returns the total number of rows in the range. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + rowCount?: boolean; + /** + * + * Represents if all rows of the current range are hidden. + * + * [Api set: ExcelApi 1.2] + */ + rowHidden?: boolean; + /** + * + * Returns the row number of the first cell in the range. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + rowIndex?: boolean; + /** + * + * Text values of the specified range. The Text value will not depend on the cell width. The # sign substitution that happens in Excel UI will not affect the text value returned by the API. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + text?: boolean; + /** + * + * Represents the type of data of each cell. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + valueTypes?: boolean; + /** + * + * Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cell that contain an error will return the error string. + * + * [Api set: ExcelApi 1.1] + */ + values?: boolean; + } + /** + * + * RangeView represents a set of visible cells of the parent range. + * + * [Api set: ExcelApi 1.3] + */ + interface RangeViewLoadOptions { + $all?: boolean; + /** + * + * Represents the cell addresses of the RangeView. + * + * [Api set: ExcelApi 1.3] + */ + cellAddresses?: boolean; + /** + * + * Returns the number of visible columns. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + columnCount?: boolean; + /** + * + * Represents the formula in A1-style notation. + * + * [Api set: ExcelApi 1.3] + */ + formulas?: boolean; + /** + * + * Represents the formula in A1-style notation, in the user's language and number-formatting locale. For example, the English "=SUM(A1, 1.5)" formula would become "=SUMME(A1; 1,5)" in German. + * + * [Api set: ExcelApi 1.3] + */ + formulasLocal?: boolean; + /** + * + * Represents the formula in R1C1-style notation. + * + * [Api set: ExcelApi 1.3] + */ + formulasR1C1?: boolean; + /** + * + * Returns a value that represents the index of the RangeView. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + index?: boolean; + /** + * + * Represents Excel's number format code for the given cell. + * + * [Api set: ExcelApi 1.3] + */ + numberFormat?: boolean; + /** + * + * Returns the number of visible rows. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + rowCount?: boolean; + /** + * + * Text values of the specified range. The Text value will not depend on the cell width. The # sign substitution that happens in Excel UI will not affect the text value returned by the API. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + text?: boolean; + /** + * + * Represents the type of data of each cell. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + valueTypes?: boolean; + /** + * + * Represents the raw values of the specified range view. The data returned could be of type string, number, or a boolean. Cell that contain an error will return the error string. + * + * [Api set: ExcelApi 1.3] + */ + values?: boolean; + } + /** + * + * Represents a collection of RangeView objects. + * + * [Api set: ExcelApi 1.3] + */ + interface RangeViewCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the cell addresses of the RangeView. + * + * [Api set: ExcelApi 1.3] + */ + cellAddresses?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the number of visible columns. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + columnCount?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the formula in A1-style notation. + * + * [Api set: ExcelApi 1.3] + */ + formulas?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the formula in A1-style notation, in the user's language and number-formatting locale. For example, the English "=SUM(A1, 1.5)" formula would become "=SUMME(A1; 1,5)" in German. + * + * [Api set: ExcelApi 1.3] + */ + formulasLocal?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the formula in R1C1-style notation. + * + * [Api set: ExcelApi 1.3] + */ + formulasR1C1?: boolean; + /** + * + * For EACH ITEM in the collection: Returns a value that represents the index of the RangeView. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + index?: boolean; + /** + * + * For EACH ITEM in the collection: Represents Excel's number format code for the given cell. + * + * [Api set: ExcelApi 1.3] + */ + numberFormat?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the number of visible rows. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + rowCount?: boolean; + /** + * + * For EACH ITEM in the collection: Text values of the specified range. The Text value will not depend on the cell width. The # sign substitution that happens in Excel UI will not affect the text value returned by the API. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + text?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the type of data of each cell. Read-only. + * + * [Api set: ExcelApi 1.3] + */ + valueTypes?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the raw values of the specified range view. The data returned could be of type string, number, or a boolean. Cell that contain an error will return the error string. + * + * [Api set: ExcelApi 1.3] + */ + values?: boolean; + } + /** + * + * Represents a collection of worksheet objects that are part of the workbook. + * + * [Api set: ExcelApi 1.4] + */ + interface SettingCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the key that represents the id of the Setting. Read-only. + * + * [Api set: ExcelApi 1.4] + */ + key?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the value stored for this setting. + * + * [Api set: ExcelApi 1.4] + */ + value?: boolean; + } + /** + * + * Setting represents a key-value pair of a setting persisted to the document. + * + * [Api set: ExcelApi 1.4] + */ + interface SettingLoadOptions { + $all?: boolean; + /** + * + * Returns the key that represents the id of the Setting. Read-only. + * + * [Api set: ExcelApi 1.4] + */ + key?: boolean; + /** + * + * Represents the value stored for this setting. + * + * [Api set: ExcelApi 1.4] + */ + value?: boolean; + } + /** + * + * A collection of all the nameditem objects that are part of the workbook or worksheet, depending on how it was reached. + * + * [Api set: ExcelApi 1.1] + */ + interface NamedItemCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the worksheet on which the named item is scoped to. Throws an error if the items is scoped to the workbook instead. + * + * [Api set: ExcelApi 1.4] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the worksheet on which the named item is scoped to. Returns a null object if the item is scoped to the workbook instead. + * + * [Api set: ExcelApi 1.4] + */ + worksheetOrNullObject?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents the comment associated with this name. + * + * [Api set: ExcelApi 1.4] + */ + comment?: boolean; + /** + * + * For EACH ITEM in the collection: The name of the object. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates whether the name is scoped to the workbook or to a specific worksheet. Read-only. + * + * [Api set: ExcelApi 1.4] + */ + scope?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates the type of the value returned by the name's formula. See Excel.NamedItemType for details. Read-only. + * + * [Api set: ExcelApi 1.1 for String,Integer,Double,Boolean,Range,Error; 1.7 for Array] + */ + type?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the value computed by the name's formula. For a named range, will return the range address. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + value?: boolean; + /** + * + * For EACH ITEM in the collection: Specifies whether the object is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** + * + * Represents a defined name for a range of cells or value. Names can be primitive named objects (as seen in the type below), range object, reference to a range. This object can be used to obtain range object associated with names. + * + * [Api set: ExcelApi 1.1] + */ + interface NamedItemLoadOptions { + $all?: boolean; + /** + * + * Returns the worksheet on which the named item is scoped to. Throws an error if the items is scoped to the workbook instead. + * + * [Api set: ExcelApi 1.4] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * Returns the worksheet on which the named item is scoped to. Returns a null object if the item is scoped to the workbook instead. + * + * [Api set: ExcelApi 1.4] + */ + worksheetOrNullObject?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * Represents the comment associated with this name. + * + * [Api set: ExcelApi 1.4] + */ + comment?: boolean; + /** + * + * The name of the object. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * Indicates whether the name is scoped to the workbook or to a specific worksheet. Read-only. + * + * [Api set: ExcelApi 1.4] + */ + scope?: boolean; + /** + * + * Indicates the type of the value returned by the name's formula. See Excel.NamedItemType for details. Read-only. + * + * [Api set: ExcelApi 1.1 for String,Integer,Double,Boolean,Range,Error; 1.7 for Array] + */ + type?: boolean; + /** + * + * Represents the value computed by the name's formula. For a named range, will return the range address. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + value?: boolean; + /** + * + * Specifies whether the object is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** + * + * Represents an Office.js binding that is defined in the workbook. + * + * [Api set: ExcelApi 1.1] + */ + interface BindingLoadOptions { + $all?: boolean; + /** + * + * Represents binding identifier. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * + * Returns the type of the binding. See Excel.BindingType for details. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + type?: boolean; + } + /** + * + * Represents the collection of all the binding objects that are part of the workbook. + * + * [Api set: ExcelApi 1.1] + */ + interface BindingCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Represents binding identifier. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the type of the binding. See Excel.BindingType for details. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + type?: boolean; + } + /** + * + * Represents a collection of all the tables that are part of the workbook or worksheet, depending on how it was reached. + * + * [Api set: ExcelApi 1.1] + */ + interface TableCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Represents a collection of all the columns in the table. + * + * [Api set: ExcelApi 1.1] + */ + columns?: Excel.Interfaces.TableColumnCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents a collection of all the rows in the table. + * + * [Api set: ExcelApi 1.1] + */ + rows?: Excel.Interfaces.TableRowCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents the sorting for the table. + * + * [Api set: ExcelApi 1.2] + */ + sort?: Excel.Interfaces.TableSortLoadOptions; + /** + * + * For EACH ITEM in the collection: The worksheet containing the current table. + * + * [Api set: ExcelApi 1.2] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * For EACH ITEM in the collection: Indicates whether the first column contains special formatting. + * + * [Api set: ExcelApi 1.3] + */ + highlightFirstColumn?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates whether the last column contains special formatting. + * + * [Api set: ExcelApi 1.3] + */ + highlightLastColumn?: boolean; + /** + * + * For EACH ITEM in the collection: Returns a value that uniquely identifies the table in a given workbook. The value of the identifier remains the same even when the table is renamed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Name of the table. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates whether the columns show banded formatting in which odd columns are highlighted differently from even ones to make reading the table easier. + * + * [Api set: ExcelApi 1.3] + */ + showBandedColumns?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates whether the rows show banded formatting in which odd rows are highlighted differently from even ones to make reading the table easier. + * + * [Api set: ExcelApi 1.3] + */ + showBandedRows?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates whether the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. + * + * [Api set: ExcelApi 1.3] + */ + showFilterButton?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates whether the header row is visible or not. This value can be set to show or remove the header row. + * + * [Api set: ExcelApi 1.1] + */ + showHeaders?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates whether the total row is visible or not. This value can be set to show or remove the total row. + * + * [Api set: ExcelApi 1.1] + */ + showTotals?: boolean; + /** + * + * For EACH ITEM in the collection: Constant value that represents the Table style. Possible values are: TableStyleLight1 thru TableStyleLight21, TableStyleMedium1 thru TableStyleMedium28, TableStyleStyleDark1 thru TableStyleStyleDark11. A custom user-defined style present in the workbook can also be specified. + * + * [Api set: ExcelApi 1.1] + */ + style?: boolean; + } + /** + * + * Represents an Excel table. + * + * [Api set: ExcelApi 1.1] + */ + interface TableLoadOptions { + $all?: boolean; + /** + * + * Represents a collection of all the columns in the table. + * + * [Api set: ExcelApi 1.1] + */ + columns?: Excel.Interfaces.TableColumnCollectionLoadOptions; + /** + * + * Represents a collection of all the rows in the table. + * + * [Api set: ExcelApi 1.1] + */ + rows?: Excel.Interfaces.TableRowCollectionLoadOptions; + /** + * + * Represents the sorting for the table. + * + * [Api set: ExcelApi 1.2] + */ + sort?: Excel.Interfaces.TableSortLoadOptions; + /** + * + * The worksheet containing the current table. + * + * [Api set: ExcelApi 1.2] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * Indicates whether the first column contains special formatting. + * + * [Api set: ExcelApi 1.3] + */ + highlightFirstColumn?: boolean; + /** + * + * Indicates whether the last column contains special formatting. + * + * [Api set: ExcelApi 1.3] + */ + highlightLastColumn?: boolean; + /** + * + * Returns a value that uniquely identifies the table in a given workbook. The value of the identifier remains the same even when the table is renamed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * + * Name of the table. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * Indicates whether the columns show banded formatting in which odd columns are highlighted differently from even ones to make reading the table easier. + * + * [Api set: ExcelApi 1.3] + */ + showBandedColumns?: boolean; + /** + * + * Indicates whether the rows show banded formatting in which odd rows are highlighted differently from even ones to make reading the table easier. + * + * [Api set: ExcelApi 1.3] + */ + showBandedRows?: boolean; + /** + * + * Indicates whether the filter buttons are visible at the top of each column header. Setting this is only allowed if the table contains a header row. + * + * [Api set: ExcelApi 1.3] + */ + showFilterButton?: boolean; + /** + * + * Indicates whether the header row is visible or not. This value can be set to show or remove the header row. + * + * [Api set: ExcelApi 1.1] + */ + showHeaders?: boolean; + /** + * + * Indicates whether the total row is visible or not. This value can be set to show or remove the total row. + * + * [Api set: ExcelApi 1.1] + */ + showTotals?: boolean; + /** + * + * Constant value that represents the Table style. Possible values are: TableStyleLight1 thru TableStyleLight21, TableStyleMedium1 thru TableStyleMedium28, TableStyleStyleDark1 thru TableStyleStyleDark11. A custom user-defined style present in the workbook can also be specified. + * + * [Api set: ExcelApi 1.1] + */ + style?: boolean; + } + /** + * + * Represents a collection of all the columns that are part of the table. + * + * [Api set: ExcelApi 1.1] + */ + interface TableColumnCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Retrieve the filter applied to the column. + * + * [Api set: ExcelApi 1.2] + */ + filter?: Excel.Interfaces.FilterLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns a unique key that identifies the column within the table. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the index number of the column within the columns collection of the table. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + index?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the name of the table column. + * + * [Api set: ExcelApi 1.1 for getting the name; 1.4 for setting it.] + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cell that contain an error will return the error string. + * + * [Api set: ExcelApi 1.1] + */ + values?: boolean; + } + /** + * + * Represents a column in a table. + * + * [Api set: ExcelApi 1.1] + */ + interface TableColumnLoadOptions { + $all?: boolean; + /** + * + * Retrieve the filter applied to the column. + * + * [Api set: ExcelApi 1.2] + */ + filter?: Excel.Interfaces.FilterLoadOptions; + /** + * + * Returns a unique key that identifies the column within the table. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + id?: boolean; + /** + * + * Returns the index number of the column within the columns collection of the table. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + index?: boolean; + /** + * + * Represents the name of the table column. + * + * [Api set: ExcelApi 1.1 for getting the name; 1.4 for setting it.] + */ + name?: boolean; + /** + * + * Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cell that contain an error will return the error string. + * + * [Api set: ExcelApi 1.1] + */ + values?: boolean; + } + /** + * + * Represents a collection of all the rows that are part of the table. + + Note that unlike Ranges or Columns, which will adjust if new rows/columns are added before them, + a TableRow object represent the physical location of the table row, but not the data. + That is, if the data is sorted or if new rows are added, a table row will continue + to point at the index for which it was created. + * + * [Api set: ExcelApi 1.1] + */ + interface TableRowCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the index number of the row within the rows collection of the table. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + index?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cell that contain an error will return the error string. + * + * [Api set: ExcelApi 1.1] + */ + values?: boolean; + } + /** + * + * Represents a row in a table. + + Note that unlike Ranges or Columns, which will adjust if new rows/columns are added before them, + a TableRow object represent the physical location of the table row, but not the data. + That is, if the data is sorted or if new rows are added, a table row will continue + to point at the index for which it was created. + * + * [Api set: ExcelApi 1.1] + */ + interface TableRowLoadOptions { + $all?: boolean; + /** + * + * Returns the index number of the row within the rows collection of the table. Zero-indexed. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + index?: boolean; + /** + * + * Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cell that contain an error will return the error string. + * + * [Api set: ExcelApi 1.1] + */ + values?: boolean; + } + /** + * + * A format object encapsulating the range's font, fill, borders, alignment, and other properties. + * + * [Api set: ExcelApi 1.1] + */ + interface RangeFormatLoadOptions { + $all?: boolean; + /** + * + * Collection of border objects that apply to the overall range. + * + * [Api set: ExcelApi 1.1] + */ + borders?: Excel.Interfaces.RangeBorderCollectionLoadOptions; + /** + * + * Returns the fill object defined on the overall range. + * + * [Api set: ExcelApi 1.1] + */ + fill?: Excel.Interfaces.RangeFillLoadOptions; + /** + * + * Returns the font object defined on the overall range. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.RangeFontLoadOptions; + /** + * + * Returns the format protection object for a range. + * + * [Api set: ExcelApi 1.2] + */ + protection?: Excel.Interfaces.FormatProtectionLoadOptions; + /** + * + * Gets or sets the width of all colums within the range. If the column widths are not uniform, null will be returned. + * + * [Api set: ExcelApi 1.2] + */ + columnWidth?: boolean; + /** + * + * Represents the horizontal alignment for the specified object. See Excel.HorizontalAlignment for details. + * + * [Api set: ExcelApi 1.1] + */ + horizontalAlignment?: boolean; + /** + * + * Gets or sets the height of all rows in the range. If the row heights are not uniform null will be returned. + * + * [Api set: ExcelApi 1.2] + */ + rowHeight?: boolean; + /** + * + * Represents the vertical alignment for the specified object. See Excel.VerticalAlignment for details. + * + * [Api set: ExcelApi 1.1] + */ + verticalAlignment?: boolean; + /** + * + * Indicates if Excel wraps the text in the object. A null value indicates that the entire range doesn't have uniform wrap setting + * + * [Api set: ExcelApi 1.1] + */ + wrapText?: boolean; + } + /** + * + * Represents the format protection of a range object. + * + * [Api set: ExcelApi 1.2] + */ + interface FormatProtectionLoadOptions { + $all?: boolean; + /** + * + * Indicates if Excel hides the formula for the cells in the range. A null value indicates that the entire range doesn't have uniform formula hidden setting. + * + * [Api set: ExcelApi 1.2] + */ + formulaHidden?: boolean; + /** + * + * Indicates if Excel locks the cells in the object. A null value indicates that the entire range doesn't have uniform lock setting. + * + * [Api set: ExcelApi 1.2] + */ + locked?: boolean; + } + /** + * + * Represents the background of a range object. + * + * [Api set: ExcelApi 1.1] + */ + interface RangeFillLoadOptions { + $all?: boolean; + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange") + * + * [Api set: ExcelApi 1.1] + */ + color?: boolean; + } + /** + * + * Represents the border of an object. + * + * [Api set: ExcelApi 1.1] + */ + interface RangeBorderLoadOptions { + $all?: boolean; + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.1] + */ + color?: boolean; + /** + * + * Constant value that indicates the specific side of the border. See Excel.BorderIndex for details. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + sideIndex?: boolean; + /** + * + * One of the constants of line style specifying the line style for the border. See Excel.BorderLineStyle for details. + * + * [Api set: ExcelApi 1.1] + */ + style?: boolean; + /** + * + * Specifies the weight of the border around a range. See Excel.BorderWeight for details. + * + * [Api set: ExcelApi 1.1] + */ + weight?: boolean; + } + /** + * + * Represents the border objects that make up the range border. + * + * [Api set: ExcelApi 1.1] + */ + interface RangeBorderCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.1] + */ + color?: boolean; + /** + * + * For EACH ITEM in the collection: Constant value that indicates the specific side of the border. See Excel.BorderIndex for details. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + sideIndex?: boolean; + /** + * + * For EACH ITEM in the collection: One of the constants of line style specifying the line style for the border. See Excel.BorderLineStyle for details. + * + * [Api set: ExcelApi 1.1] + */ + style?: boolean; + /** + * + * For EACH ITEM in the collection: Specifies the weight of the border around a range. See Excel.BorderWeight for details. + * + * [Api set: ExcelApi 1.1] + */ + weight?: boolean; + } + /** + * + * This object represents the font attributes (font name, font size, color, etc.) for an object. + * + * [Api set: ExcelApi 1.1] + */ + interface RangeFontLoadOptions { + $all?: boolean; + /** + * + * Represents the bold status of font. + * + * [Api set: ExcelApi 1.1] + */ + bold?: boolean; + /** + * + * HTML color code representation of the text color. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.1] + */ + color?: boolean; + /** + * + * Represents the italic status of the font. + * + * [Api set: ExcelApi 1.1] + */ + italic?: boolean; + /** + * + * Font name (e.g. "Calibri") + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * Font size. + * + * [Api set: ExcelApi 1.1] + */ + size?: boolean; + /** + * + * Type of underline applied to the font. See Excel.RangeUnderlineStyle for details. + * + * [Api set: ExcelApi 1.1] + */ + underline?: boolean; + } + /** + * + * A collection of all the chart objects on a worksheet. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Represents chart axes. + * + * [Api set: ExcelApi 1.1] + */ + axes?: Excel.Interfaces.ChartAxesLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents the datalabels on the chart. + * + * [Api set: ExcelApi 1.1] + */ + dataLabels?: Excel.Interfaces.ChartDataLabelsLoadOptions; + /** + * + * For EACH ITEM in the collection: Encapsulates the format properties for the chart area. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAreaFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents the legend for the chart. + * + * [Api set: ExcelApi 1.1] + */ + legend?: Excel.Interfaces.ChartLegendLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents either a single series or collection of series in the chart. + * + * [Api set: ExcelApi 1.1] + */ + series?: Excel.Interfaces.ChartSeriesCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents the title of the specified chart, including the text, visibility, position and formating of the title. + * + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartTitleLoadOptions; + /** + * + * For EACH ITEM in the collection: The worksheet containing the current chart. + * + * [Api set: ExcelApi 1.2] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents the height, in points, of the chart object. + * + * [Api set: ExcelApi 1.1] + */ + height?: boolean; + /** + * + * For EACH ITEM in the collection: The distance, in points, from the left side of the chart to the worksheet origin. + * + * [Api set: ExcelApi 1.1] + */ + left?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the name of a chart object. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the distance, in points, from the top edge of the object to the top of row 1 (on a worksheet) or the top of the chart area (on a chart). + * + * [Api set: ExcelApi 1.1] + */ + top?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the width, in points, of the chart object. + * + * [Api set: ExcelApi 1.1] + */ + width?: boolean; + } + /** + * + * Represents a chart object in a workbook. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartLoadOptions { + $all?: boolean; + /** + * + * Represents chart axes. + * + * [Api set: ExcelApi 1.1] + */ + axes?: Excel.Interfaces.ChartAxesLoadOptions; + /** + * + * Represents the datalabels on the chart. + * + * [Api set: ExcelApi 1.1] + */ + dataLabels?: Excel.Interfaces.ChartDataLabelsLoadOptions; + /** + * + * Encapsulates the format properties for the chart area. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAreaFormatLoadOptions; + /** + * + * Represents the legend for the chart. + * + * [Api set: ExcelApi 1.1] + */ + legend?: Excel.Interfaces.ChartLegendLoadOptions; + /** + * + * Represents either a single series or collection of series in the chart. + * + * [Api set: ExcelApi 1.1] + */ + series?: Excel.Interfaces.ChartSeriesCollectionLoadOptions; + /** + * + * Represents the title of the specified chart, including the text, visibility, position and formating of the title. + * + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartTitleLoadOptions; + /** + * + * The worksheet containing the current chart. + * + * [Api set: ExcelApi 1.2] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * Represents the height, in points, of the chart object. + * + * [Api set: ExcelApi 1.1] + */ + height?: boolean; + /** + * + * The distance, in points, from the left side of the chart to the worksheet origin. + * + * [Api set: ExcelApi 1.1] + */ + left?: boolean; + /** + * + * Represents the name of a chart object. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * Represents the distance, in points, from the top edge of the object to the top of row 1 (on a worksheet) or the top of the chart area (on a chart). + * + * [Api set: ExcelApi 1.1] + */ + top?: boolean; + /** + * + * Represents the width, in points, of the chart object. + * + * [Api set: ExcelApi 1.1] + */ + width?: boolean; + } + /** + * + * Encapsulates the format properties for the overall chart area. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartAreaFormatLoadOptions { + $all?: boolean; + /** + * + * Represents the font attributes (font name, font size, color, etc.) for the current object. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * + * Represents a collection of chart series. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartSeriesCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Represents the formatting of a chart series, which includes fill and line formatting. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartSeriesFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents a collection of all points in the series. + * + * [Api set: ExcelApi 1.1] + */ + points?: Excel.Interfaces.ChartPointsCollectionLoadOptions; + /** + * + * For EACH ITEM in the collection: Represents the name of a series in a chart. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + } + /** + * + * Represents a series in a chart. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartSeriesLoadOptions { + $all?: boolean; + /** + * + * Represents the formatting of a chart series, which includes fill and line formatting. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartSeriesFormatLoadOptions; + /** + * + * Represents a collection of all points in the series. + * + * [Api set: ExcelApi 1.1] + */ + points?: Excel.Interfaces.ChartPointsCollectionLoadOptions; + /** + * + * Represents the name of a series in a chart. + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + } + /** + * + * encapsulates the format properties for the chart series + * + * [Api set: ExcelApi 1.1] + */ + interface ChartSeriesFormatLoadOptions { + $all?: boolean; + /** + * + * Represents line formatting. + * + * [Api set: ExcelApi 1.1] + */ + line?: Excel.Interfaces.ChartLineFormatLoadOptions; + } + /** + * + * A collection of all the chart points within a series inside a chart. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartPointsCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the value of a chart point. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + value?: boolean; + } + /** + * + * Represents a point of a series in a chart. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartPointLoadOptions { + $all?: boolean; + /** + * + * Returns the value of a chart point. Read-only. + * + * [Api set: ExcelApi 1.1] + */ + value?: boolean; + } + /** + * + * Represents the chart axes. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartAxesLoadOptions { + $all?: boolean; + /** + * + * Represents the category axis in a chart. + * + * [Api set: ExcelApi 1.1] + */ + categoryAxis?: Excel.Interfaces.ChartAxisLoadOptions; + /** + * + * Represents the series axis of a 3-dimensional chart. + * + * [Api set: ExcelApi 1.1] + */ + seriesAxis?: Excel.Interfaces.ChartAxisLoadOptions; + /** + * + * Represents the value axis in an axis. + * + * [Api set: ExcelApi 1.1] + */ + valueAxis?: Excel.Interfaces.ChartAxisLoadOptions; + } + /** + * + * Represents a single axis in a chart. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartAxisLoadOptions { + $all?: boolean; + /** + * + * Represents the formatting of a chart object, which includes line and font formatting. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAxisFormatLoadOptions; + /** + * + * Returns a gridlines object that represents the major gridlines for the specified axis. + * + * [Api set: ExcelApi 1.1] + */ + majorGridlines?: Excel.Interfaces.ChartGridlinesLoadOptions; + /** + * + * Returns a Gridlines object that represents the minor gridlines for the specified axis. + * + * [Api set: ExcelApi 1.1] + */ + minorGridlines?: Excel.Interfaces.ChartGridlinesLoadOptions; + /** + * + * Represents the axis title. + * + * [Api set: ExcelApi 1.1] + */ + title?: Excel.Interfaces.ChartAxisTitleLoadOptions; + /** + * + * Represents the interval between two major tick marks. Can be set to a numeric value or an empty string. The returned value is always a number. + * + * [Api set: ExcelApi 1.1] + */ + majorUnit?: boolean; + /** + * + * Represents the maximum value on the value axis. Can be set to a numeric value or an empty string (for automatic axis values). The returned value is always a number. + * + * [Api set: ExcelApi 1.1] + */ + maximum?: boolean; + /** + * + * Represents the minimum value on the value axis. Can be set to a numeric value or an empty string (for automatic axis values). The returned value is always a number. + * + * [Api set: ExcelApi 1.1] + */ + minimum?: boolean; + /** + * + * Represents the interval between two minor tick marks. "Can be set to a numeric value or an empty string (for automatic axis values). The returned value is always a number. + * + * [Api set: ExcelApi 1.1] + */ + minorUnit?: boolean; + } + /** + * + * Encapsulates the format properties for the chart axis. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartAxisFormatLoadOptions { + $all?: boolean; + /** + * + * Represents the font attributes (font name, font size, color, etc.) for a chart axis element. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + /** + * + * Represents chart line formatting. + * + * [Api set: ExcelApi 1.1] + */ + line?: Excel.Interfaces.ChartLineFormatLoadOptions; + } + /** + * + * Represents the title of a chart axis. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartAxisTitleLoadOptions { + $all?: boolean; + /** + * + * Represents the formatting of chart axis title. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartAxisTitleFormatLoadOptions; + /** + * + * Represents the axis title. + * + * [Api set: ExcelApi 1.1] + */ + text?: boolean; + /** + * + * A boolean that specifies the visibility of an axis title. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** + * + * Represents the chart axis title formatting. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartAxisTitleFormatLoadOptions { + $all?: boolean; + /** + * + * Represents the font attributes, such as font name, font size, color, etc. of chart axis title object. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * + * Represents a collection of all the data labels on a chart point. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartDataLabelsLoadOptions { + $all?: boolean; + /** + * + * Represents the format of chart data labels, which includes fill and font formatting. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartDataLabelFormatLoadOptions; + /** + * + * DataLabelPosition value that represents the position of the data label. See Excel.ChartDataLabelPosition for details. + * + * [Api set: ExcelApi 1.1] + */ + position?: boolean; + /** + * + * String representing the separator used for the data labels on a chart. + * + * [Api set: ExcelApi 1.1] + */ + separator?: boolean; + /** + * + * Boolean value representing if the data label bubble size is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showBubbleSize?: boolean; + /** + * + * Boolean value representing if the data label category name is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showCategoryName?: boolean; + /** + * + * Boolean value representing if the data label legend key is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showLegendKey?: boolean; + /** + * + * Boolean value representing if the data label percentage is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showPercentage?: boolean; + /** + * + * Boolean value representing if the data label series name is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showSeriesName?: boolean; + /** + * + * Boolean value representing if the data label value is visible or not. + * + * [Api set: ExcelApi 1.1] + */ + showValue?: boolean; + } + /** + * + * Encapsulates the format properties for the chart data labels. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartDataLabelFormatLoadOptions { + $all?: boolean; + /** + * + * Represents the font attributes (font name, font size, color, etc.) for a chart data label. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * + * Represents major or minor gridlines on a chart axis. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartGridlinesLoadOptions { + $all?: boolean; + /** + * + * Represents the formatting of chart gridlines. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartGridlinesFormatLoadOptions; + /** + * + * Boolean value representing if the axis gridlines are visible or not. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** + * + * Encapsulates the format properties for chart gridlines. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartGridlinesFormatLoadOptions { + $all?: boolean; + /** + * + * Represents chart line formatting. + * + * [Api set: ExcelApi 1.1] + */ + line?: Excel.Interfaces.ChartLineFormatLoadOptions; + } + /** + * + * Represents the legend in a chart. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartLegendLoadOptions { + $all?: boolean; + /** + * + * Represents the formatting of a chart legend, which includes fill and font formatting. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartLegendFormatLoadOptions; + /** + * + * Boolean value for whether the chart legend should overlap with the main body of the chart. + * + * [Api set: ExcelApi 1.1] + */ + overlay?: boolean; + /** + * + * Represents the position of the legend on the chart. See Excel.ChartLegendPosition for details. + * + * [Api set: ExcelApi 1.1] + */ + position?: boolean; + /** + * + * A boolean value the represents the visibility of a ChartLegend object. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** + * + * Encapsulates the format properties of a chart legend. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartLegendFormatLoadOptions { + $all?: boolean; + /** + * + * Represents the font attributes such as font name, font size, color, etc. of a chart legend. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * + * Represents a chart title object of a chart. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartTitleLoadOptions { + $all?: boolean; + /** + * + * Represents the formatting of a chart title, which includes fill and font formatting. + * + * [Api set: ExcelApi 1.1] + */ + format?: Excel.Interfaces.ChartTitleFormatLoadOptions; + /** + * + * Boolean value representing if the chart title will overlay the chart or not. + * + * [Api set: ExcelApi 1.1] + */ + overlay?: boolean; + /** + * + * Represents the title text of a chart. + * + * [Api set: ExcelApi 1.1] + */ + text?: boolean; + /** + * + * A boolean value the represents the visibility of a chart title object. + * + * [Api set: ExcelApi 1.1] + */ + visible?: boolean; + } + /** + * + * Provides access to the office art formatting for chart title. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartTitleFormatLoadOptions { + $all?: boolean; + /** + * + * Represents the font attributes (font name, font size, color, etc.) for an object. + * + * [Api set: ExcelApi 1.1] + */ + font?: Excel.Interfaces.ChartFontLoadOptions; + } + /** + * + * Enapsulates the formatting options for line elements. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartLineFormatLoadOptions { + $all?: boolean; + /** + * + * HTML color code representing the color of lines in the chart. + * + * [Api set: ExcelApi 1.1] + */ + color?: boolean; + } + /** + * + * This object represents the font attributes (font name, font size, color, etc.) for a chart object. + * + * [Api set: ExcelApi 1.1] + */ + interface ChartFontLoadOptions { + $all?: boolean; + /** + * + * Represents the bold status of font. + * + * [Api set: ExcelApi 1.1] + */ + bold?: boolean; + /** + * + * HTML color code representation of the text color. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.1] + */ + color?: boolean; + /** + * + * Represents the italic status of the font. + * + * [Api set: ExcelApi 1.1] + */ + italic?: boolean; + /** + * + * Font name (e.g. "Calibri") + * + * [Api set: ExcelApi 1.1] + */ + name?: boolean; + /** + * + * Size of the font (e.g. 11) + * + * [Api set: ExcelApi 1.1] + */ + size?: boolean; + /** + * + * Type of underline applied to the font. See Excel.ChartUnderlineStyle for details. + * + * [Api set: ExcelApi 1.1] + */ + underline?: boolean; + } + /** + * + * Manages sorting operations on Table objects. + * + * [Api set: ExcelApi 1.2] + */ + interface TableSortLoadOptions { + $all?: boolean; + /** + * + * Represents the current conditions used to last sort the table. + * + * [Api set: ExcelApi 1.2] + */ + fields?: boolean; + /** + * + * Represents whether the casing impacted the last sort of the table. + * + * [Api set: ExcelApi 1.2] + */ + matchCase?: boolean; + /** + * + * Represents Chinese character ordering method last used to sort the table. + * + * [Api set: ExcelApi 1.2] + */ + method?: boolean; + } + /** + * + * Manages the filtering of a table's column. + * + * [Api set: ExcelApi 1.2] + */ + interface FilterLoadOptions { + $all?: boolean; + /** + * + * The currently applied filter on the given column. + * + * [Api set: ExcelApi 1.2] + */ + criteria?: boolean; + } + /** + * + * A scoped collection of custom XML parts. + A scoped collection is the result of some operation, e.g. filtering by namespace. + A scoped collection cannot be scoped any further. + * + * [Api set: ExcelApi 1.5] + */ + interface CustomXmlPartScopedCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: The custom XML part's ID. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: The custom XML part's namespace URI. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + namespaceUri?: boolean; + } + /** + * + * A collection of custom XML parts. + * + * [Api set: ExcelApi 1.5] + */ + interface CustomXmlPartCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: The custom XML part's ID. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: The custom XML part's namespace URI. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + namespaceUri?: boolean; + } + /** + * + * Represents a custom XML part object in a workbook. + * + * [Api set: ExcelApi 1.5] + */ + interface CustomXmlPartLoadOptions { + $all?: boolean; + /** + * + * The custom XML part's ID. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + id?: boolean; + /** + * + * The custom XML part's namespace URI. Read-only. + * + * [Api set: ExcelApi 1.5] + */ + namespaceUri?: boolean; + } + /** + * + * Represents a collection of all the PivotTables that are part of the workbook or worksheet. + * + * [Api set: ExcelApi 1.3] + */ + interface PivotTableCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: The worksheet containing the current PivotTable. + * + * [Api set: ExcelApi 1.3] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * For EACH ITEM in the collection: Id of the PivotTable. + * + * [Api set: ExcelApi 1.5] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Name of the PivotTable. + * + * [Api set: ExcelApi 1.3] + */ + name?: boolean; + } + /** + * + * Represents an Excel PivotTable. + * + * [Api set: ExcelApi 1.3] + */ + interface PivotTableLoadOptions { + $all?: boolean; + /** + * + * The worksheet containing the current PivotTable. + * + * [Api set: ExcelApi 1.3] + */ + worksheet?: Excel.Interfaces.WorksheetLoadOptions; + /** + * + * Id of the PivotTable. + * + * [Api set: ExcelApi 1.5] + */ + id?: boolean; + /** + * + * Name of the PivotTable. + * + * [Api set: ExcelApi 1.3] + */ + name?: boolean; + } + /** + * + * Represents a collection of all the conditional formats that are overlap the range. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalFormatCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Returns the cell value conditional format properties if the current conditional format is a CellValue type. + For example to format all cells between 5 and 10. + * + * [Api set: ExcelApi 1.6] + */ + cellValue?: Excel.Interfaces.CellValueConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the cell value conditional format properties if the current conditional format is a CellValue type. + For example to format all cells between 5 and 10. + * + * [Api set: ExcelApi 1.6] + */ + cellValueOrNullObject?: Excel.Interfaces.CellValueConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. + * + * [Api set: ExcelApi 1.6] + */ + colorScale?: Excel.Interfaces.ColorScaleConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. + * + * [Api set: ExcelApi 1.6] + */ + colorScaleOrNullObject?: Excel.Interfaces.ColorScaleConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the custom conditional format properties if the current conditional format is a custom type. + * + * [Api set: ExcelApi 1.6] + */ + custom?: Excel.Interfaces.CustomConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the custom conditional format properties if the current conditional format is a custom type. + * + * [Api set: ExcelApi 1.6] + */ + customOrNullObject?: Excel.Interfaces.CustomConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the data bar properties if the current conditional format is a data bar. + * + * [Api set: ExcelApi 1.6] + */ + dataBar?: Excel.Interfaces.DataBarConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the data bar properties if the current conditional format is a data bar. + * + * [Api set: ExcelApi 1.6] + */ + dataBarOrNullObject?: Excel.Interfaces.DataBarConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the IconSet conditional format properties if the current conditional format is an IconSet type. + * + * [Api set: ExcelApi 1.6] + */ + iconSet?: Excel.Interfaces.IconSetConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the IconSet conditional format properties if the current conditional format is an IconSet type. + * + * [Api set: ExcelApi 1.6] + */ + iconSetOrNullObject?: Excel.Interfaces.IconSetConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror properties. + * + * [Api set: ExcelApi 1.6] + */ + preset?: Excel.Interfaces.PresetCriteriaConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror properties. + * + * [Api set: ExcelApi 1.6] + */ + presetOrNullObject?: Excel.Interfaces.PresetCriteriaConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the specific text conditional format properties if the current conditional format is a text type. + For example to format cells matching the word "Text". + * + * [Api set: ExcelApi 1.6] + */ + textComparison?: Excel.Interfaces.TextConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the specific text conditional format properties if the current conditional format is a text type. + For example to format cells matching the word "Text". + * + * [Api set: ExcelApi 1.6] + */ + textComparisonOrNullObject?: Excel.Interfaces.TextConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. + For example to format the top 10% or bottom 10 items. + * + * [Api set: ExcelApi 1.6] + */ + topBottom?: Excel.Interfaces.TopBottomConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. + For example to format the top 10% or bottom 10 items. + * + * [Api set: ExcelApi 1.6] + */ + topBottomOrNullObject?: Excel.Interfaces.TopBottomConditionalFormatLoadOptions; + /** + * + * For EACH ITEM in the collection: The Priority of the Conditional Format within the current ConditionalFormatCollection. + * + * [Api set: ExcelApi 1.6] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: The priority (or index) within the conditional format collection that this conditional format currently exists in. Changing this also + changes other conditional formats' priorities, to allow for a contiguous priority order. + Use a negative priority to begin from the back. + Priorities greater than than bounds will get and set to the maximum (or minimum if negative) priority. + Also note that if you change the priority, you have to re-fetch a new copy of the object at that new priority location if you want to make further changes to it. + * + * [Api set: ExcelApi 1.6] + */ + priority?: boolean; + /** + * + * For EACH ITEM in the collection: If the conditions of this conditional format are met, no lower-priority formats shall take effect on that cell. + Null on databars, icon sets, and colorscales as there's no concept of StopIfTrue for these + * + * [Api set: ExcelApi 1.6] + */ + stopIfTrue?: boolean; + /** + * + * For EACH ITEM in the collection: A type of conditional format. Only one can be set at a time. Read-Only. + * + * [Api set: ExcelApi 1.6] + */ + type?: boolean; + } + /** + * + * An object encapsulating a conditional format's range, format, rule, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalFormatLoadOptions { + $all?: boolean; + /** + * + * Returns the cell value conditional format properties if the current conditional format is a CellValue type. + For example to format all cells between 5 and 10. + * + * [Api set: ExcelApi 1.6] + */ + cellValue?: Excel.Interfaces.CellValueConditionalFormatLoadOptions; + /** + * + * Returns the cell value conditional format properties if the current conditional format is a CellValue type. + For example to format all cells between 5 and 10. + * + * [Api set: ExcelApi 1.6] + */ + cellValueOrNullObject?: Excel.Interfaces.CellValueConditionalFormatLoadOptions; + /** + * + * Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. + * + * [Api set: ExcelApi 1.6] + */ + colorScale?: Excel.Interfaces.ColorScaleConditionalFormatLoadOptions; + /** + * + * Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. + * + * [Api set: ExcelApi 1.6] + */ + colorScaleOrNullObject?: Excel.Interfaces.ColorScaleConditionalFormatLoadOptions; + /** + * + * Returns the custom conditional format properties if the current conditional format is a custom type. + * + * [Api set: ExcelApi 1.6] + */ + custom?: Excel.Interfaces.CustomConditionalFormatLoadOptions; + /** + * + * Returns the custom conditional format properties if the current conditional format is a custom type. + * + * [Api set: ExcelApi 1.6] + */ + customOrNullObject?: Excel.Interfaces.CustomConditionalFormatLoadOptions; + /** + * + * Returns the data bar properties if the current conditional format is a data bar. + * + * [Api set: ExcelApi 1.6] + */ + dataBar?: Excel.Interfaces.DataBarConditionalFormatLoadOptions; + /** + * + * Returns the data bar properties if the current conditional format is a data bar. + * + * [Api set: ExcelApi 1.6] + */ + dataBarOrNullObject?: Excel.Interfaces.DataBarConditionalFormatLoadOptions; + /** + * + * Returns the IconSet conditional format properties if the current conditional format is an IconSet type. + * + * [Api set: ExcelApi 1.6] + */ + iconSet?: Excel.Interfaces.IconSetConditionalFormatLoadOptions; + /** + * + * Returns the IconSet conditional format properties if the current conditional format is an IconSet type. + * + * [Api set: ExcelApi 1.6] + */ + iconSetOrNullObject?: Excel.Interfaces.IconSetConditionalFormatLoadOptions; + /** + * + * Returns the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror properties. + * + * [Api set: ExcelApi 1.6] + */ + preset?: Excel.Interfaces.PresetCriteriaConditionalFormatLoadOptions; + /** + * + * Returns the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror properties. + * + * [Api set: ExcelApi 1.6] + */ + presetOrNullObject?: Excel.Interfaces.PresetCriteriaConditionalFormatLoadOptions; + /** + * + * Returns the specific text conditional format properties if the current conditional format is a text type. + For example to format cells matching the word "Text". + * + * [Api set: ExcelApi 1.6] + */ + textComparison?: Excel.Interfaces.TextConditionalFormatLoadOptions; + /** + * + * Returns the specific text conditional format properties if the current conditional format is a text type. + For example to format cells matching the word "Text". + * + * [Api set: ExcelApi 1.6] + */ + textComparisonOrNullObject?: Excel.Interfaces.TextConditionalFormatLoadOptions; + /** + * + * Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. + For example to format the top 10% or bottom 10 items. + * + * [Api set: ExcelApi 1.6] + */ + topBottom?: Excel.Interfaces.TopBottomConditionalFormatLoadOptions; + /** + * + * Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. + For example to format the top 10% or bottom 10 items. + * + * [Api set: ExcelApi 1.6] + */ + topBottomOrNullObject?: Excel.Interfaces.TopBottomConditionalFormatLoadOptions; + /** + * + * The Priority of the Conditional Format within the current ConditionalFormatCollection. + * + * [Api set: ExcelApi 1.6] + */ + id?: boolean; + /** + * + * The priority (or index) within the conditional format collection that this conditional format currently exists in. Changing this also + changes other conditional formats' priorities, to allow for a contiguous priority order. + Use a negative priority to begin from the back. + Priorities greater than than bounds will get and set to the maximum (or minimum if negative) priority. + Also note that if you change the priority, you have to re-fetch a new copy of the object at that new priority location if you want to make further changes to it. + * + * [Api set: ExcelApi 1.6] + */ + priority?: boolean; + /** + * + * If the conditions of this conditional format are met, no lower-priority formats shall take effect on that cell. + Null on databars, icon sets, and colorscales as there's no concept of StopIfTrue for these + * + * [Api set: ExcelApi 1.6] + */ + stopIfTrue?: boolean; + /** + * + * A type of conditional format. Only one can be set at a time. Read-Only. + * + * [Api set: ExcelApi 1.6] + */ + type?: boolean; + } + /** + * + * Represents an Excel Conditional Data Bar Type. + * + * [Api set: ExcelApi 1.6] + */ + interface DataBarConditionalFormatLoadOptions { + $all?: boolean; + /** + * + * Representation of all values to the left of the axis in an Excel data bar. + * + * [Api set: ExcelApi 1.6] + */ + negativeFormat?: Excel.Interfaces.ConditionalDataBarNegativeFormatLoadOptions; + /** + * + * Representation of all values to the right of the axis in an Excel data bar. + * + * [Api set: ExcelApi 1.6] + */ + positiveFormat?: Excel.Interfaces.ConditionalDataBarPositiveFormatLoadOptions; + /** + * + * HTML color code representing the color of the Axis line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + "" (empty string) if no axis is present or set. + * + * [Api set: ExcelApi 1.6] + */ + axisColor?: boolean; + /** + * + * Representation of how the axis is determined for an Excel data bar. + * + * [Api set: ExcelApi 1.6] + */ + axisFormat?: boolean; + /** + * + * Represents the direction that the data bar graphic should be based on. + * + * [Api set: ExcelApi 1.6] + */ + barDirection?: boolean; + /** + * + * The rule for what consistutes the lower bound (and how to calculate it, if applicable) for a data bar. + * + * [Api set: ExcelApi 1.6] + */ + lowerBoundRule?: boolean; + /** + * + * If true, hides the values from the cells where the data bar is applied. + * + * [Api set: ExcelApi 1.6] + */ + showDataBarOnly?: boolean; + /** + * + * The rule for what constitutes the upper bound (and how to calculate it, if applicable) for a data bar. + * + * [Api set: ExcelApi 1.6] + */ + upperBoundRule?: boolean; + } + /** + * + * Represents a conditional format DataBar Format for the positive side of the data bar. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalDataBarPositiveFormatLoadOptions { + $all?: boolean; + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + "" (empty string) if no border is present or set. + * + * [Api set: ExcelApi 1.6] + */ + borderColor?: boolean; + /** + * + * HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + fillColor?: boolean; + /** + * + * Boolean representation of whether or not the DataBar has a gradient. + * + * [Api set: ExcelApi 1.6] + */ + gradientFill?: boolean; + } + /** + * + * Represents a conditional format DataBar Format for the negative side of the data bar. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalDataBarNegativeFormatLoadOptions { + $all?: boolean; + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + "Empty String" if no border is present or set. + * + * [Api set: ExcelApi 1.6] + */ + borderColor?: boolean; + /** + * + * HTML color code representing the fill color, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + fillColor?: boolean; + /** + * + * Boolean representation of whether or not the negative DataBar has the same border color as the positive DataBar. + * + * [Api set: ExcelApi 1.6] + */ + matchPositiveBorderColor?: boolean; + /** + * + * Boolean representation of whether or not the negative DataBar has the same fill color as the positive DataBar. + * + * [Api set: ExcelApi 1.6] + */ + matchPositiveFillColor?: boolean; + } + /** + * + * Represents a custom conditional format type. + * + * [Api set: ExcelApi 1.6] + */ + interface CustomConditionalFormatLoadOptions { + $all?: boolean; + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatLoadOptions; + /** + * + * Represents the Rule object on this conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule?: Excel.Interfaces.ConditionalFormatRuleLoadOptions; + } + /** + * + * Represents a rule, for all traditional rule/format pairings. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalFormatRuleLoadOptions { + $all?: boolean; + /** + * + * The formula, if required, to evaluate the conditional format rule on. + * + * [Api set: ExcelApi 1.6] + */ + formula?: boolean; + /** + * + * The formula, if required, to evaluate the conditional format rule on in the user's language. + * + * [Api set: ExcelApi 1.6] + */ + formulaLocal?: boolean; + /** + * + * The formula, if required, to evaluate the conditional format rule on in R1C1-style notation. + * + * [Api set: ExcelApi 1.6] + */ + formulaR1C1?: boolean; + } + /** + * + * Represents an IconSet criteria for conditional formatting. + * + * [Api set: ExcelApi 1.6] + */ + interface IconSetConditionalFormatLoadOptions { + $all?: boolean; + /** + * + * An array of Criteria and IconSets for the rules and potential custom icons for conditional icons. Note that for the first criterion only the custom icon can be modified, while type, formula and operator will be ignored when set. + * + * [Api set: ExcelApi 1.6] + */ + criteria?: boolean; + /** + * + * If true, reverses the icon orders for the IconSet. Note that this cannot be set if custom icons are used. + * + * [Api set: ExcelApi 1.6] + */ + reverseIconOrder?: boolean; + /** + * + * If true, hides the values and only shows icons. + * + * [Api set: ExcelApi 1.6] + */ + showIconOnly?: boolean; + /** + * + * If set, displays the IconSet option for the conditional format. + * + * [Api set: ExcelApi 1.6] + */ + style?: boolean; + } + /** + * + * Represents an IconSet criteria for conditional formatting. + * + * [Api set: ExcelApi 1.6] + */ + interface ColorScaleConditionalFormatLoadOptions { + $all?: boolean; + /** + * + * The criteria of the color scale. Midpoint is optional when using a two point color scale. + * + * [Api set: ExcelApi 1.6] + */ + criteria?: boolean; + /** + * + * If true the color scale will have three points (minimum, midpoint, maximum), otherwise it will have two (minimum, maximum). + * + * [Api set: ExcelApi 1.6] + */ + threeColorScale?: boolean; + } + /** + * + * Represents a Top/Bottom conditional format. + * + * [Api set: ExcelApi 1.6] + */ + interface TopBottomConditionalFormatLoadOptions { + $all?: boolean; + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatLoadOptions; + /** + * + * The criteria of the Top/Bottom conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule?: boolean; + } + /** + * + * Represents the the preset criteria conditional format such as above average/below average/unique values/contains blank/nonblank/error/noerror. + * + * [Api set: ExcelApi 1.6] + */ + interface PresetCriteriaConditionalFormatLoadOptions { + $all?: boolean; + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatLoadOptions; + /** + * + * The rule of the conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule?: boolean; + } + /** + * + * Represents a specific text conditional format. + * + * [Api set: ExcelApi 1.6] + */ + interface TextConditionalFormatLoadOptions { + $all?: boolean; + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatLoadOptions; + /** + * + * The rule of the conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule?: boolean; + } + /** + * + * Represents a cell value conditional format. + * + * [Api set: ExcelApi 1.6] + */ + interface CellValueConditionalFormatLoadOptions { + $all?: boolean; + /** + * + * Returns a format object, encapsulating the conditional formats font, fill, borders, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + format?: Excel.Interfaces.ConditionalRangeFormatLoadOptions; + /** + * + * Represents the Rule object on this conditional format. + * + * [Api set: ExcelApi 1.6] + */ + rule?: boolean; + } + /** + * + * A format object encapsulating the conditional formats range's font, fill, borders, and other properties. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalRangeFormatLoadOptions { + $all?: boolean; + /** + * + * Collection of border objects that apply to the overall conditional format range. + * + * [Api set: ExcelApi 1.6] + */ + borders?: Excel.Interfaces.ConditionalRangeBorderCollectionLoadOptions; + /** + * + * Returns the fill object defined on the overall conditional format range. + * + * [Api set: ExcelApi 1.6] + */ + fill?: Excel.Interfaces.ConditionalRangeFillLoadOptions; + /** + * + * Returns the font object defined on the overall conditional format range. + * + * [Api set: ExcelApi 1.6] + */ + font?: Excel.Interfaces.ConditionalRangeFontLoadOptions; + /** + * + * Represents Excel's number format code for the given range. Cleared if null is passed in. + * + * [Api set: ExcelApi 1.6] + */ + numberFormat?: boolean; + } + /** + * + * This object represents the font attributes (font style,, color, etc.) for an object. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalRangeFontLoadOptions { + $all?: boolean; + /** + * + * Represents the bold status of font. + * + * [Api set: ExcelApi 1.6] + */ + bold?: boolean; + /** + * + * HTML color code representation of the text color. E.g. #FF0000 represents Red. + * + * [Api set: ExcelApi 1.6] + */ + color?: boolean; + /** + * + * Represents the italic status of the font. + * + * [Api set: ExcelApi 1.6] + */ + italic?: boolean; + /** + * + * Represents the strikethrough status of the font. + * + * [Api set: ExcelApi 1.6] + */ + strikethrough?: boolean; + /** + * + * Type of underline applied to the font. See Excel.ConditionalRangeFontUnderlineStyle for details. + * + * [Api set: ExcelApi 1.6] + */ + underline?: boolean; + } + /** + * + * Represents the background of a conditional range object. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalRangeFillLoadOptions { + $all?: boolean; + /** + * + * HTML color code representing the color of the fill, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + color?: boolean; + } + /** + * + * Represents the border of an object. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalRangeBorderLoadOptions { + $all?: boolean; + /** + * + * HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + color?: boolean; + /** + * + * Constant value that indicates the specific side of the border. See Excel.ConditionalRangeBorderIndex for details. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + sideIndex?: boolean; + /** + * + * One of the constants of line style specifying the line style for the border. See Excel.BorderLineStyle for details. + * + * [Api set: ExcelApi 1.6] + */ + style?: boolean; + } + /** + * + * Represents the border objects that make up range border. + * + * [Api set: ExcelApi 1.6] + */ + interface ConditionalRangeBorderCollectionLoadOptions { + $all?: boolean; + /** + * + * Gets the top border + * + * [Api set: ExcelApi 1.6] + */ + bottom?: Excel.Interfaces.ConditionalRangeBorderLoadOptions; + /** + * + * Gets the top border + * + * [Api set: ExcelApi 1.6] + */ + left?: Excel.Interfaces.ConditionalRangeBorderLoadOptions; + /** + * + * Gets the top border + * + * [Api set: ExcelApi 1.6] + */ + right?: Excel.Interfaces.ConditionalRangeBorderLoadOptions; + /** + * + * Gets the top border + * + * [Api set: ExcelApi 1.6] + */ + top?: Excel.Interfaces.ConditionalRangeBorderLoadOptions; + /** + * + * For EACH ITEM in the collection: HTML color code representing the color of the border line, of the form #RRGGBB (e.g. "FFA500") or as a named HTML color (e.g. "orange"). + * + * [Api set: ExcelApi 1.6] + */ + color?: boolean; + /** + * + * For EACH ITEM in the collection: Constant value that indicates the specific side of the border. See Excel.ConditionalRangeBorderIndex for details. Read-only. + * + * [Api set: ExcelApi 1.6] + */ + sideIndex?: boolean; + /** + * + * For EACH ITEM in the collection: One of the constants of line style specifying the line style for the border. See Excel.BorderLineStyle for details. + * + * [Api set: ExcelApi 1.6] + */ + style?: boolean; + } + /** + * + * An object containing the result of a function-evaluation operation + * + * [Api set: ExcelApi 1.2] + */ + interface FunctionResultLoadOptions { + $all?: boolean; + /** + * + * Error value (such as "#DIV/0") representing the error. If the error string is not set, then the function succeeded, and its result is written to the Value field. The error is always in the English locale. + * + * [Api set: ExcelApi 1.2] + */ + error?: boolean; + /** + * + * The value of function evaluation. The value field will be populated only if no error has occurred (i.e., the Error property is not set). + * + * [Api set: ExcelApi 1.2] + */ + value?: boolean; + } + } +} + + +//////////////////////////////////////////////////////////////// +//////////////////////// End Excel APIs //////////////////////// +//////////////////////////////////////////////////////////////// + + + + +//////////////////////////////////////////////////////////////// + + + + +//////////////////////////////////////////////////////////////// +/////////////////////// Begin Word APIs //////////////////////// +//////////////////////////////////////////////////////////////// + +declare namespace Word { + /** + * + * The Application object. + * + * [Api set: WordApi 1.3] + */ + class Application extends OfficeExtension.ClientObject { + /** + * + * Creates a new hidden document by using an optional base64 encoded .docx file. + * + * [Api set: WordApi 1.3] + * + * @param base64File Optional. The base64 encoded .docx file. The default value is null. + */ + createDocument(base64File?: string): Word.DocumentCreated; + /** + * Create a new instance of Word.Application object + */ + static newObject(context: OfficeExtension.ClientRequestContext): Word.Application; + toJSON(): { + [key: string]: string; + }; + } + /** + * + * Represents the body of a document or a section. + * + * [Api set: WordApi 1.1] + */ + class Body extends OfficeExtension.ClientObject { + /** + * + * Gets the collection of rich text content control objects in the body. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * + * Gets the text format of the body. Use this to get and set font name, size, color and other properties. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly font: Word.Font; + /** + * + * Gets the collection of inlinePicture objects in the body. The collection does not include floating images. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly inlinePictures: Word.InlinePictureCollection; + /** + * + * Gets the collection of list objects in the body. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly lists: Word.ListCollection; + /** + * + * Gets the collection of paragraph objects in the body. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly paragraphs: Word.ParagraphCollection; + /** + * + * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Throws if there isn't a parent body. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentBody: Word.Body; + /** + * + * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Returns a null object if there isn't a parent body. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentBodyOrNullObject: Word.Body; + /** + * + * Gets the content control that contains the body. Throws if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly parentContentControl: Word.ContentControl; + /** + * + * Gets the content control that contains the body. Returns a null object if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentContentControlOrNullObject: Word.ContentControl; + /** + * + * Gets the parent section of the body. Throws if there isn't a parent section. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentSection: Word.Section; + /** + * + * Gets the parent section of the body. Returns a null object if there isn't a parent section. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly parentSectionOrNullObject: Word.Section; + /** + * + * Gets the collection of table objects in the body. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly tables: Word.TableCollection; + /** + * + * Gets or sets the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style: string; + /** + * + * Gets or sets the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn: string; + /** + * + * Gets the text of the body. Use the insertText method to insert text. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly text: string; + /** + * + * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly type: string; + /** Sets multiple properties on the object at the same time, based on JSON input. */ + set(properties: Interfaces.BodyUpdateData, options?: { + /** + * Throw an error if the passed-in property list includes read-only properties (default = true). + */ + throwOnReadOnly?: boolean; + }): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Body): void; /** @@ -14567,7 +20415,12 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.Body; + load(option?: Word.Interfaces.BodyLoadOptions): Word.Body; + load(option?: string | string[]): Word.Body; + load(option?: { + select?: string; + expand?: string; + }): Word.Body; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ @@ -14576,13 +20429,7 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.Body; - toJSON(): { - "font": Font; - "style": string; - "styleBuiltIn": string; - "text": string; - "type": string; - }; + toJSON(): Word.Interfaces.BodyData; } /** * @@ -14597,91 +20444,91 @@ declare namespace Word { * * [Api set: WordApi 1.1] */ - contentControls: Word.ContentControlCollection; + readonly contentControls: Word.ContentControlCollection; /** * * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. Read-only. * * [Api set: WordApi 1.1] */ - font: Word.Font; + readonly font: Word.Font; /** * * Gets the collection of inlinePicture objects in the content control. The collection does not include floating images. Read-only. * * [Api set: WordApi 1.1] */ - inlinePictures: Word.InlinePictureCollection; + readonly inlinePictures: Word.InlinePictureCollection; /** * * Gets the collection of list objects in the content control. Read-only. * * [Api set: WordApi 1.3] */ - lists: Word.ListCollection; + readonly lists: Word.ListCollection; /** * * Get the collection of paragraph objects in the content control. Read-only. * * [Api set: WordApi 1.1] */ - paragraphs: Word.ParagraphCollection; + readonly paragraphs: Word.ParagraphCollection; /** * * Gets the parent body of the content control. Read-only. * * [Api set: WordApi 1.3] */ - parentBody: Word.Body; + readonly parentBody: Word.Body; /** * * Gets the content control that contains the content control. Throws if there isn't a parent content control. Read-only. * * [Api set: WordApi 1.1] */ - parentContentControl: Word.ContentControl; + readonly parentContentControl: Word.ContentControl; /** * * Gets the content control that contains the content control. Returns a null object if there isn't a parent content control. Read-only. * * [Api set: WordApi 1.3] */ - parentContentControlOrNullObject: Word.ContentControl; + readonly parentContentControlOrNullObject: Word.ContentControl; /** * * Gets the table that contains the content control. Throws if it is not contained in a table. Read-only. * * [Api set: WordApi 1.3] */ - parentTable: Word.Table; + readonly parentTable: Word.Table; /** * * Gets the table cell that contains the content control. Throws if it is not contained in a table cell. Read-only. * * [Api set: WordApi 1.3] */ - parentTableCell: Word.TableCell; + readonly parentTableCell: Word.TableCell; /** * * Gets the table cell that contains the content control. Returns a null object if it is not contained in a table cell. Read-only. * * [Api set: WordApi 1.3] */ - parentTableCellOrNullObject: Word.TableCell; + readonly parentTableCellOrNullObject: Word.TableCell; /** * * Gets the table that contains the content control. Returns a null object if it is not contained in a table. Read-only. * * [Api set: WordApi 1.3] */ - parentTableOrNullObject: Word.Table; + readonly parentTableOrNullObject: Word.Table; /** * * Gets the collection of table objects in the content control. Read-only. * * [Api set: WordApi 1.3] */ - tables: Word.TableCollection; + readonly tables: Word.TableCollection; /** * * Gets or sets the appearance of the content control. The value can be 'boundingBox', 'tags' or 'hidden'. @@ -14716,7 +20563,7 @@ declare namespace Word { * * [Api set: WordApi 1.1] */ - id: number; + readonly id: number; /** * * Gets or sets the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. @@ -14751,7 +20598,7 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - subtype: string; + readonly subtype: string; /** * * Gets or sets a tag to identify a content control. @@ -14765,7 +20612,7 @@ declare namespace Word { * * [Api set: WordApi 1.1] */ - text: string; + readonly text: string; /** * * Gets or sets the title for a content control. @@ -14779,7 +20626,7 @@ declare namespace Word { * * [Api set: WordApi 1.1] */ - type: string; + readonly type: string; /** Sets multiple properties on the object at the same time, based on JSON input. */ set(properties: Interfaces.ContentControlUpdateData, options?: { /** @@ -14962,7 +20809,12 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.ContentControl; + load(option?: Word.Interfaces.ContentControlLoadOptions): Word.ContentControl; + load(option?: string | string[]): Word.ContentControl; + load(option?: { + select?: string; + expand?: string; + }): Word.ContentControl; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ @@ -14971,23 +20823,7 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.ContentControl; - toJSON(): { - "appearance": string; - "cannotDelete": boolean; - "cannotEdit": boolean; - "color": string; - "font": Font; - "id": number; - "placeholderText": string; - "removeWhenEdited": boolean; - "style": string; - "styleBuiltIn": string; - "subtype": string; - "tag": string; - "text": string; - "title": string; - "type": string; - }; + toJSON(): Word.Interfaces.ContentControlData; } /** * @@ -14997,7 +20833,7 @@ declare namespace Word { */ class ContentControlCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Array; /** * * Gets a content control by its identifier. Throws if there isn't a content control with the identifier in this collection. @@ -15069,7 +20905,9 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.ContentControlCollection; + load(option?: Word.Interfaces.ContentControlCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ContentControlCollection; + load(option?: string | string[]): Word.ContentControlCollection; + load(option?: OfficeExtension.LoadOption): Word.ContentControlCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ @@ -15078,7 +20916,7 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.ContentControlCollection; - toJSON(): {}; + toJSON(): Word.Interfaces.ContentControlCollectionData; } /** * @@ -15093,17 +20931,17 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - key: string; + readonly key: string; /** * - * Gets the value type of the custom property. Read only. + * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. Read only. * * [Api set: WordApi 1.3] */ - type: string; + readonly type: string; /** * - * Gets or sets the value of the custom property. + * Gets or sets the value of the custom property. Note that even though Word Online and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). * * [Api set: WordApi 1.3] */ @@ -15127,7 +20965,12 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.CustomProperty; + load(option?: Word.Interfaces.CustomPropertyLoadOptions): Word.CustomProperty; + load(option?: string | string[]): Word.CustomProperty; + load(option?: { + select?: string; + expand?: string; + }): Word.CustomProperty; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ @@ -15136,11 +20979,7 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.CustomProperty; - toJSON(): { - "key": string; - "type": string; - "value": any; - }; + toJSON(): Word.Interfaces.CustomPropertyData; } /** * @@ -15150,7 +20989,7 @@ declare namespace Word { */ class CustomPropertyCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Array; /** * * Creates a new or sets an existing custom property. @@ -15172,123 +21011,217 @@ declare namespace Word { * * Gets the count of custom properties. * - * [Api set: WordApi 1.3] + * [Api set: WordApi 1.3] + */ + getCount(): OfficeExtension.ClientResult; + /** + * + * Gets a custom property object by its key, which is case-insensitive. Throws if the custom property does not exist. + * + * [Api set: WordApi 1.3] + * + * @param key The key that identifies the custom property object. + */ + getItem(key: string): Word.CustomProperty; + /** + * + * Gets a custom property object by its key, which is case-insensitive. Returns a null object if the custom property does not exist. + * + * [Api set: WordApi 1.3] + * + * @param key Required. The key that identifies the custom property object. + */ + getItemOrNullObject(key: string): Word.CustomProperty; + /** + * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. + */ + load(option?: Word.Interfaces.CustomPropertyCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomPropertyCollection; + load(option?: string | string[]): Word.CustomPropertyCollection; + load(option?: OfficeExtension.LoadOption): Word.CustomPropertyCollection; + /** + * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. + */ + track(): Word.CustomPropertyCollection; + /** + * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. + */ + untrack(): Word.CustomPropertyCollection; + toJSON(): Word.Interfaces.CustomPropertyCollectionData; + } + /** + * + * The Document object is the top level object. A Document object contains one or more sections, content controls, and the body that contains the contents of the document. + * + * [Api set: WordApi 1.1] + */ + class Document extends OfficeExtension.ClientObject { + /** + * + * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly body: Word.Body; + /** + * + * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc.. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly contentControls: Word.ContentControlCollection; + /** + * + * Gets the properties of the document. Read-only. + * + * [Api set: WordApi 1.3] + */ + readonly properties: Word.DocumentProperties; + /** + * + * Gets the collection of section objects in the document. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly sections: Word.SectionCollection; + /** + * + * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. Read-only. + * + * [Api set: WordApi 1.1] + */ + readonly saved: boolean; + /** Sets multiple properties on the object at the same time, based on JSON input. */ + set(properties: Interfaces.DocumentUpdateData, options?: { + /** + * Throw an error if the passed-in property list includes read-only properties (default = true). + */ + throwOnReadOnly?: boolean; + }): void; + /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ + set(properties: Document): void; + /** + * + * Gets the current selection of the document. Multiple selections are not supported. + * + * [Api set: WordApi 1.1] */ - getCount(): OfficeExtension.ClientResult; + getSelection(): Word.Range; /** * - * Gets a custom property object by its key, which is case-insensitive. Throws if the custom property does not exist. + * Open the document. * * [Api set: WordApi 1.3] - * - * @param key The key that identifies the custom property object. */ - getItem(key: string): Word.CustomProperty; + open(): void; /** * - * Gets a custom property object by its key, which is case-insensitive. Returns a null object if the custom property does not exist. - * - * [Api set: WordApi 1.3] + * Saves the document. This will use the Word default file naming convention if the document has not been saved before. * - * @param key Required. The key that identifies the custom property object. + * [Api set: WordApi 1.1] */ - getItemOrNullObject(key: string): Word.CustomProperty; + save(): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.CustomPropertyCollection; + load(option?: Word.Interfaces.DocumentLoadOptions): Word.Document; + load(option?: string | string[]): Word.Document; + load(option?: { + select?: string; + expand?: string; + }): Word.Document; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ - track(): Word.CustomPropertyCollection; + track(): Word.Document; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ - untrack(): Word.CustomPropertyCollection; - toJSON(): {}; + untrack(): Word.Document; + toJSON(): Word.Interfaces.DocumentData; } /** * - * The Document object is the top level object. A Document object contains one or more sections, content controls, and the body that contains the contents of the document. + * The DocumentCreated object is the top level object created by Application.CreateDocument. A DocumentCreated object is a special Document object. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - class Document extends OfficeExtension.ClientObject { + class DocumentCreated extends OfficeExtension.ClientObject { /** * * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.. Read-only. * - * [Api set: WordApi 1.1] + * [Api set: WordApiHiddenDocument 1.3] */ - body: Word.Body; + readonly body: Word.Body; /** * - * Gets the collection of content control objects in the current document. This includes content controls in the body of the document, headers, footers, textboxes, etc.. Read-only. + * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc.. Read-only. * - * [Api set: WordApi 1.1] + * [Api set: WordApiHiddenDocument 1.3] */ - contentControls: Word.ContentControlCollection; + readonly contentControls: Word.ContentControlCollection; /** * - * Gets the properties of the current document. Read-only. + * Gets the properties of the document. Read-only. * - * [Api set: WordApi 1.3] + * [Api set: WordApiHiddenDocument 1.3] */ - properties: Word.DocumentProperties; + readonly properties: Word.DocumentProperties; /** * * Gets the collection of section objects in the document. Read-only. * - * [Api set: WordApi 1.1] + * [Api set: WordApiHiddenDocument 1.3] */ - sections: Word.SectionCollection; + readonly sections: Word.SectionCollection; /** * * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. Read-only. * - * [Api set: WordApi 1.1] + * [Api set: WordApiHiddenDocument 1.3] */ - saved: boolean; + readonly saved: boolean; /** Sets multiple properties on the object at the same time, based on JSON input. */ - set(properties: Interfaces.DocumentUpdateData, options?: { + set(properties: Interfaces.DocumentCreatedUpdateData, options?: { /** * Throw an error if the passed-in property list includes read-only properties (default = true). */ throwOnReadOnly?: boolean; }): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Document): void; + set(properties: DocumentCreated): void; /** * - * Gets the current selection of the document. Multiple selections are not supported. + * Open the document. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - getSelection(): Word.Range; + open(): void; /** * * Saves the document. This will use the Word default file naming convention if the document has not been saved before. * - * [Api set: WordApi 1.1] + * [Api set: WordApiHiddenDocument 1.3] */ save(): void; /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.Document; + load(option?: Word.Interfaces.DocumentCreatedLoadOptions): Word.DocumentCreated; + load(option?: string | string[]): Word.DocumentCreated; + load(option?: { + select?: string; + expand?: string; + }): Word.DocumentCreated; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ - track(): Word.Document; + track(): Word.DocumentCreated; /** * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ - untrack(): Word.Document; - toJSON(): { - "body": Body; - "properties": DocumentProperties; - "saved": boolean; - }; + untrack(): Word.DocumentCreated; + toJSON(): Word.Interfaces.DocumentCreatedData; } /** * @@ -15303,14 +21236,14 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - customProperties: Word.CustomPropertyCollection; + readonly customProperties: Word.CustomPropertyCollection; /** * * Gets the application name of the document. Read only. * * [Api set: WordApi 1.3] */ - applicationName: string; + readonly applicationName: string; /** * * Gets or sets the author of the document. @@ -15345,7 +21278,7 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - creationDate: Date; + readonly creationDate: Date; /** * * Gets or sets the format of the document. @@ -15366,21 +21299,21 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - lastAuthor: string; + readonly lastAuthor: string; /** * * Gets the last print date of the document. Read only. * * [Api set: WordApi 1.3] */ - lastPrintDate: Date; + readonly lastPrintDate: Date; /** * * Gets the last save time of the document. Read only. * * [Api set: WordApi 1.3] */ - lastSaveTime: Date; + readonly lastSaveTime: Date; /** * * Gets or sets the manager of the document. @@ -15394,14 +21327,14 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - revisionNumber: string; + readonly revisionNumber: string; /** * * Gets the security of the document. Read only. * * [Api set: WordApi 1.3] */ - security: number; + readonly security: number; /** * * Gets or sets the subject of the document. @@ -15415,7 +21348,7 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - template: string; + readonly template: string; /** * * Gets or sets the title of the document. @@ -15435,7 +21368,12 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.DocumentProperties; + load(option?: Word.Interfaces.DocumentPropertiesLoadOptions): Word.DocumentProperties; + load(option?: string | string[]): Word.DocumentProperties; + load(option?: { + select?: string; + expand?: string; + }): Word.DocumentProperties; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ @@ -15444,25 +21382,7 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.DocumentProperties; - toJSON(): { - "applicationName": string; - "author": string; - "category": string; - "comments": string; - "company": string; - "creationDate": Date; - "format": string; - "keywords": string; - "lastAuthor": string; - "lastPrintDate": Date; - "lastSaveTime": Date; - "manager": string; - "revisionNumber": string; - "security": number; - "subject": string; - "template": string; - "title": string; - }; + toJSON(): Word.Interfaces.DocumentPropertiesData; } /** * @@ -15560,7 +21480,12 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.Font; + load(option?: Word.Interfaces.FontLoadOptions): Word.Font; + load(option?: string | string[]): Word.Font; + load(option?: { + select?: string; + expand?: string; + }): Word.Font; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ @@ -15569,19 +21494,7 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.Font; - toJSON(): { - "bold": boolean; - "color": string; - "doubleStrikeThrough": boolean; - "highlightColor": string; - "italic": boolean; - "name": string; - "size": number; - "strikeThrough": boolean; - "subscript": boolean; - "superscript": boolean; - "underline": string; - }; + toJSON(): Word.Interfaces.FontData; } /** * @@ -15596,49 +21509,49 @@ declare namespace Word { * * [Api set: WordApi 1.2] */ - paragraph: Word.Paragraph; + readonly paragraph: Word.Paragraph; /** * * Gets the content control that contains the inline image. Throws if there isn't a parent content control. Read-only. * * [Api set: WordApi 1.1] */ - parentContentControl: Word.ContentControl; + readonly parentContentControl: Word.ContentControl; /** * * Gets the content control that contains the inline image. Returns a null object if there isn't a parent content control. Read-only. * * [Api set: WordApi 1.3] */ - parentContentControlOrNullObject: Word.ContentControl; + readonly parentContentControlOrNullObject: Word.ContentControl; /** * * Gets the table that contains the inline image. Throws if it is not contained in a table. Read-only. * * [Api set: WordApi 1.3] */ - parentTable: Word.Table; + readonly parentTable: Word.Table; /** * * Gets the table cell that contains the inline image. Throws if it is not contained in a table cell. Read-only. * * [Api set: WordApi 1.3] */ - parentTableCell: Word.TableCell; + readonly parentTableCell: Word.TableCell; /** * * Gets the table cell that contains the inline image. Returns a null object if it is not contained in a table cell. Read-only. * * [Api set: WordApi 1.3] */ - parentTableCellOrNullObject: Word.TableCell; + readonly parentTableCellOrNullObject: Word.TableCell; /** * * Gets the table that contains the inline image. Returns a null object if it is not contained in a table. Read-only. * * [Api set: WordApi 1.3] */ - parentTableOrNullObject: Word.Table; + readonly parentTableOrNullObject: Word.Table; /** * * Gets or sets a string that represents the alternative text associated with the inline image @@ -15816,7 +21729,12 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.InlinePicture; + load(option?: Word.Interfaces.InlinePictureLoadOptions): Word.InlinePicture; + load(option?: string | string[]): Word.InlinePicture; + load(option?: { + select?: string; + expand?: string; + }): Word.InlinePicture; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ @@ -15825,14 +21743,7 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.InlinePicture; - toJSON(): { - "altTextDescription": string; - "altTextTitle": string; - "height": number; - "hyperlink": string; - "lockAspectRatio": boolean; - "width": number; - }; + toJSON(): Word.Interfaces.InlinePictureData; } /** * @@ -15842,7 +21753,7 @@ declare namespace Word { */ class InlinePictureCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Array; /** * * Gets the first inline image in this collection. Throws if this collection is empty. @@ -15860,7 +21771,9 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.InlinePictureCollection; + load(option?: Word.Interfaces.InlinePictureCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.InlinePictureCollection; + load(option?: string | string[]): Word.InlinePictureCollection; + load(option?: OfficeExtension.LoadOption): Word.InlinePictureCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ @@ -15869,7 +21782,7 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.InlinePictureCollection; - toJSON(): {}; + toJSON(): Word.Interfaces.InlinePictureCollectionData; } /** * @@ -15884,28 +21797,28 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - paragraphs: Word.ParagraphCollection; + readonly paragraphs: Word.ParagraphCollection; /** * * Gets the list's id. * * [Api set: WordApi 1.3] */ - id: number; + readonly id: number; /** * * Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. Read-only. * * [Api set: WordApi 1.3] */ - levelExistences: Array; + readonly levelExistences: Array; /** * * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number' or 'Picture'. Read-only. * * [Api set: WordApi 1.3] */ - levelTypes: Array; + readonly levelTypes: Array; /** * * Gets the paragraphs that occur at the specified level in the list. @@ -15991,7 +21904,12 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.List; + load(option?: Word.Interfaces.ListLoadOptions): Word.List; + load(option?: string | string[]): Word.List; + load(option?: { + select?: string; + expand?: string; + }): Word.List; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ @@ -16000,11 +21918,7 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.List; - toJSON(): { - "id": number; - "levelExistences": boolean[]; - "levelTypes": string[]; - }; + toJSON(): Word.Interfaces.ListData; } /** * @@ -16014,7 +21928,7 @@ declare namespace Word { */ class ListCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Array; /** * * Gets a list by its identifier. Throws if there isn't a list with the identifier in this collection. @@ -16059,7 +21973,9 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.ListCollection; + load(option?: Word.Interfaces.ListCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ListCollection; + load(option?: string | string[]): Word.ListCollection; + load(option?: OfficeExtension.LoadOption): Word.ListCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ @@ -16068,7 +21984,7 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.ListCollection; - toJSON(): {}; + toJSON(): Word.Interfaces.ListCollectionData; } /** * @@ -16090,14 +22006,14 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - listString: string; + readonly listString: string; /** * * Gets the list item order number in relation to its siblings. Read-only. * * [Api set: WordApi 1.3] */ - siblingIndex: number; + readonly siblingIndex: number; /** Sets multiple properties on the object at the same time, based on JSON input. */ set(properties: Interfaces.ListItemUpdateData, options?: { /** @@ -16137,7 +22053,12 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.ListItem; + load(option?: Word.Interfaces.ListItemLoadOptions): Word.ListItem; + load(option?: string | string[]): Word.ListItem; + load(option?: { + select?: string; + expand?: string; + }): Word.ListItem; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ @@ -16146,11 +22067,7 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.ListItem; - toJSON(): { - "level": number; - "listString": string; - "siblingIndex": number; - }; + toJSON(): Word.Interfaces.ListItemData; } /** * @@ -16165,98 +22082,98 @@ declare namespace Word { * * [Api set: WordApi 1.1] */ - contentControls: Word.ContentControlCollection; + readonly contentControls: Word.ContentControlCollection; /** * * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. Read-only. * * [Api set: WordApi 1.1] */ - font: Word.Font; + readonly font: Word.Font; /** * * Gets the collection of inlinePicture objects in the paragraph. The collection does not include floating images. Read-only. * * [Api set: WordApi 1.1] */ - inlinePictures: Word.InlinePictureCollection; + readonly inlinePictures: Word.InlinePictureCollection; /** * * Gets the List to which this paragraph belongs. Throws if the paragraph is not in a list. Read-only. * * [Api set: WordApi 1.3] */ - list: Word.List; + readonly list: Word.List; /** * * Gets the ListItem for the paragraph. Throws if the paragraph is not part of a list. Read-only. * * [Api set: WordApi 1.3] */ - listItem: Word.ListItem; + readonly listItem: Word.ListItem; /** * * Gets the ListItem for the paragraph. Returns a null object if the paragraph is not part of a list. Read-only. * * [Api set: WordApi 1.3] */ - listItemOrNullObject: Word.ListItem; + readonly listItemOrNullObject: Word.ListItem; /** * * Gets the List to which this paragraph belongs. Returns a null object if the paragraph is not in a list. Read-only. * * [Api set: WordApi 1.3] */ - listOrNullObject: Word.List; + readonly listOrNullObject: Word.List; /** * * Gets the parent body of the paragraph. Read-only. * * [Api set: WordApi 1.3] */ - parentBody: Word.Body; + readonly parentBody: Word.Body; /** * * Gets the content control that contains the paragraph. Throws if there isn't a parent content control. Read-only. * * [Api set: WordApi 1.1] */ - parentContentControl: Word.ContentControl; + readonly parentContentControl: Word.ContentControl; /** * * Gets the content control that contains the paragraph. Returns a null object if there isn't a parent content control. Read-only. * * [Api set: WordApi 1.3] */ - parentContentControlOrNullObject: Word.ContentControl; + readonly parentContentControlOrNullObject: Word.ContentControl; /** * * Gets the table that contains the paragraph. Throws if it is not contained in a table. Read-only. * * [Api set: WordApi 1.3] */ - parentTable: Word.Table; + readonly parentTable: Word.Table; /** * * Gets the table cell that contains the paragraph. Throws if it is not contained in a table cell. Read-only. * * [Api set: WordApi 1.3] */ - parentTableCell: Word.TableCell; + readonly parentTableCell: Word.TableCell; /** * * Gets the table cell that contains the paragraph. Returns a null object if it is not contained in a table cell. Read-only. * * [Api set: WordApi 1.3] */ - parentTableCellOrNullObject: Word.TableCell; + readonly parentTableCellOrNullObject: Word.TableCell; /** * * Gets the table that contains the paragraph. Returns a null object if it is not contained in a table. Read-only. * * [Api set: WordApi 1.3] */ - parentTableOrNullObject: Word.Table; + readonly parentTableOrNullObject: Word.Table; /** * * Gets or sets the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. @@ -16277,14 +22194,14 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - isLastParagraph: boolean; + readonly isLastParagraph: boolean; /** * * Checks whether the paragraph is a list item. Read-only. * * [Api set: WordApi 1.3] */ - isListItem: boolean; + readonly isListItem: boolean; /** * * Gets or sets the left indent value, in points, for the paragraph. @@ -16361,14 +22278,14 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - tableNestingLevel: number; + readonly tableNestingLevel: number; /** * * Gets the text of the paragraph. Read-only. * * [Api set: WordApi 1.1] */ - text: string; + readonly text: string; /** Sets multiple properties on the object at the same time, based on JSON input. */ set(properties: Interfaces.ParagraphUpdateData, options?: { /** @@ -16607,7 +22524,12 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.Paragraph; + load(option?: Word.Interfaces.ParagraphLoadOptions): Word.Paragraph; + load(option?: string | string[]): Word.Paragraph; + load(option?: { + select?: string; + expand?: string; + }): Word.Paragraph; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ @@ -16616,27 +22538,7 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.Paragraph; - toJSON(): { - "alignment": string; - "firstLineIndent": number; - "font": Font; - "isLastParagraph": boolean; - "isListItem": boolean; - "leftIndent": number; - "lineSpacing": number; - "lineUnitAfter": number; - "lineUnitBefore": number; - "listItem": ListItem; - "listItemOrNullObject": ListItem; - "outlineLevel": number; - "rightIndent": number; - "spaceAfter": number; - "spaceBefore": number; - "style": string; - "styleBuiltIn": string; - "tableNestingLevel": number; - "text": string; - }; + toJSON(): Word.Interfaces.ParagraphData; } /** * @@ -16646,7 +22548,7 @@ declare namespace Word { */ class ParagraphCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Array; /** * * Gets the first paragraph in this collection. Throws if the collection is empty. @@ -16678,7 +22580,9 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.ParagraphCollection; + load(option?: Word.Interfaces.ParagraphCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ParagraphCollection; + load(option?: string | string[]): Word.ParagraphCollection; + load(option?: OfficeExtension.LoadOption): Word.ParagraphCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ @@ -16687,7 +22591,7 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.ParagraphCollection; - toJSON(): {}; + toJSON(): Word.Interfaces.ParagraphCollectionData; } /** * @@ -16702,91 +22606,91 @@ declare namespace Word { * * [Api set: WordApi 1.1] */ - contentControls: Word.ContentControlCollection; + readonly contentControls: Word.ContentControlCollection; /** * * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. Read-only. * * [Api set: WordApi 1.1] */ - font: Word.Font; + readonly font: Word.Font; /** * * Gets the collection of inline picture objects in the range. Read-only. * * [Api set: WordApi 1.2] */ - inlinePictures: Word.InlinePictureCollection; + readonly inlinePictures: Word.InlinePictureCollection; /** * * Gets the collection of list objects in the range. Read-only. * * [Api set: WordApi 1.3] */ - lists: Word.ListCollection; + readonly lists: Word.ListCollection; /** * * Gets the collection of paragraph objects in the range. Read-only. * * [Api set: WordApi 1.1] */ - paragraphs: Word.ParagraphCollection; + readonly paragraphs: Word.ParagraphCollection; /** * * Gets the parent body of the range. Read-only. * * [Api set: WordApi 1.3] */ - parentBody: Word.Body; + readonly parentBody: Word.Body; /** * * Gets the content control that contains the range. Throws if there isn't a parent content control. Read-only. * * [Api set: WordApi 1.1] */ - parentContentControl: Word.ContentControl; + readonly parentContentControl: Word.ContentControl; /** * * Gets the content control that contains the range. Returns a null object if there isn't a parent content control. Read-only. * * [Api set: WordApi 1.3] */ - parentContentControlOrNullObject: Word.ContentControl; + readonly parentContentControlOrNullObject: Word.ContentControl; /** * * Gets the table that contains the range. Throws if it is not contained in a table. Read-only. * * [Api set: WordApi 1.3] */ - parentTable: Word.Table; + readonly parentTable: Word.Table; /** * * Gets the table cell that contains the range. Throws if it is not contained in a table cell. Read-only. * * [Api set: WordApi 1.3] */ - parentTableCell: Word.TableCell; + readonly parentTableCell: Word.TableCell; /** * * Gets the table cell that contains the range. Returns a null object if it is not contained in a table cell. Read-only. * * [Api set: WordApi 1.3] */ - parentTableCellOrNullObject: Word.TableCell; + readonly parentTableCellOrNullObject: Word.TableCell; /** * * Gets the table that contains the range. Returns a null object if it is not contained in a table. Read-only. * * [Api set: WordApi 1.3] */ - parentTableOrNullObject: Word.Table; + readonly parentTableOrNullObject: Word.Table; /** * * Gets the collection of table objects in the range. Read-only. * * [Api set: WordApi 1.3] */ - tables: Word.TableCollection; + readonly tables: Word.TableCollection; /** * * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. @@ -16800,7 +22704,7 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - isEmpty: boolean; + readonly isEmpty: boolean; /** * * Gets or sets the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. @@ -16821,7 +22725,7 @@ declare namespace Word { * * [Api set: WordApi 1.1] */ - text: string; + readonly text: string; /** Sets multiple properties on the object at the same time, based on JSON input. */ set(properties: Interfaces.RangeUpdateData, options?: { /** @@ -17081,7 +22985,12 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.Range; + load(option?: Word.Interfaces.RangeLoadOptions): Word.Range; + load(option?: string | string[]): Word.Range; + load(option?: { + select?: string; + expand?: string; + }): Word.Range; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ @@ -17090,14 +22999,7 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.Range; - toJSON(): { - "font": Font; - "hyperlink": string; - "isEmpty": boolean; - "style": string; - "styleBuiltIn": string; - "text": string; - }; + toJSON(): Word.Interfaces.RangeData; } /** * @@ -17107,7 +23009,7 @@ declare namespace Word { */ class RangeCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Array; /** * * Gets the first range in this collection. Throws if this collection is empty. @@ -17125,7 +23027,9 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.RangeCollection; + load(option?: Word.Interfaces.RangeCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.RangeCollection; + load(option?: string | string[]): Word.RangeCollection; + load(option?: OfficeExtension.LoadOption): Word.RangeCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ @@ -17134,7 +23038,7 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.RangeCollection; - toJSON(): {}; + toJSON(): Word.Interfaces.RangeCollectionData; } /** * @@ -17205,20 +23109,17 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.SearchOptions; + load(option?: Word.Interfaces.SearchOptionsLoadOptions): Word.SearchOptions; + load(option?: string | string[]): Word.SearchOptions; + load(option?: { + select?: string; + expand?: string; + }): Word.SearchOptions; /** * Create a new instance of Word.SearchOptions object */ static newObject(context: OfficeExtension.ClientRequestContext): Word.SearchOptions; - toJSON(): { - "ignorePunct": boolean; - "ignoreSpace": boolean; - "matchCase": boolean; - "matchPrefix": boolean; - "matchSuffix": boolean; - "matchWholeWord": boolean; - "matchWildcards": boolean; - }; + toJSON(): Word.Interfaces.SearchOptionsData; } /** * @@ -17233,7 +23134,7 @@ declare namespace Word { * * [Api set: WordApi 1.1] */ - body: Word.Body; + readonly body: Word.Body; /** Sets multiple properties on the object at the same time, based on JSON input. */ set(properties: Interfaces.SectionUpdateData, options?: { /** @@ -17278,7 +23179,12 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.Section; + load(option?: Word.Interfaces.SectionLoadOptions): Word.Section; + load(option?: string | string[]): Word.Section; + load(option?: { + select?: string; + expand?: string; + }): Word.Section; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ @@ -17287,9 +23193,7 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.Section; - toJSON(): { - "body": Body; - }; + toJSON(): Word.Interfaces.SectionData; } /** * @@ -17299,7 +23203,7 @@ declare namespace Word { */ class SectionCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Array; /** * * Gets the first section in this collection. Throws if this collection is empty. @@ -17317,7 +23221,9 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.SectionCollection; + load(option?: Word.Interfaces.SectionCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.SectionCollection; + load(option?: string | string[]): Word.SectionCollection; + load(option?: OfficeExtension.LoadOption): Word.SectionCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ @@ -17326,7 +23232,7 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.SectionCollection; - toJSON(): {}; + toJSON(): Word.Interfaces.SectionCollectionData; } /** * @@ -17341,70 +23247,70 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - font: Word.Font; + readonly font: Word.Font; /** * * Gets the parent body of the table. Read-only. * * [Api set: WordApi 1.3] */ - parentBody: Word.Body; + readonly parentBody: Word.Body; /** * * Gets the content control that contains the table. Throws if there isn't a parent content control. Read-only. * * [Api set: WordApi 1.3] */ - parentContentControl: Word.ContentControl; + readonly parentContentControl: Word.ContentControl; /** * * Gets the content control that contains the table. Returns a null object if there isn't a parent content control. Read-only. * * [Api set: WordApi 1.3] */ - parentContentControlOrNullObject: Word.ContentControl; + readonly parentContentControlOrNullObject: Word.ContentControl; /** * * Gets the table that contains this table. Throws if it is not contained in a table. Read-only. * * [Api set: WordApi 1.3] */ - parentTable: Word.Table; + readonly parentTable: Word.Table; /** * * Gets the table cell that contains this table. Throws if it is not contained in a table cell. Read-only. * * [Api set: WordApi 1.3] */ - parentTableCell: Word.TableCell; + readonly parentTableCell: Word.TableCell; /** * * Gets the table cell that contains this table. Returns a null object if it is not contained in a table cell. Read-only. * * [Api set: WordApi 1.3] */ - parentTableCellOrNullObject: Word.TableCell; + readonly parentTableCellOrNullObject: Word.TableCell; /** * * Gets the table that contains this table. Returns a null object if it is not contained in a table. Read-only. * * [Api set: WordApi 1.3] */ - parentTableOrNullObject: Word.Table; + readonly parentTableOrNullObject: Word.Table; /** * * Gets all of the table rows. Read-only. * * [Api set: WordApi 1.3] */ - rows: Word.TableRowCollection; + readonly rows: Word.TableRowCollection; /** * * Gets the child tables nested one level deeper. Read-only. * * [Api set: WordApi 1.3] */ - tables: Word.TableCollection; + readonly tables: Word.TableCollection; /** * * Gets or sets the alignment of the table against the page column. The value can be 'left', 'centered' or 'right'. @@ -17432,21 +23338,21 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - isUniform: boolean; + readonly isUniform: boolean; /** * * Gets the nesting level of the table. Top-level tables have level 1. Read-only. * * [Api set: WordApi 1.3] */ - nestingLevel: number; + readonly nestingLevel: number; /** * * Gets the number of rows in the table. Read-only. * * [Api set: WordApi 1.3] */ - rowCount: number; + readonly rowCount: number; /** * * Gets and sets the shading color. @@ -17761,7 +23667,12 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.Table; + load(option?: Word.Interfaces.TableLoadOptions): Word.Table; + load(option?: string | string[]): Word.Table; + load(option?: { + select?: string; + expand?: string; + }): Word.Table; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ @@ -17770,26 +23681,7 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.Table; - toJSON(): { - "alignment": string; - "font": Font; - "headerRowCount": number; - "horizontalAlignment": string; - "isUniform": boolean; - "nestingLevel": number; - "rowCount": number; - "shadingColor": string; - "style": string; - "styleBandedColumns": boolean; - "styleBandedRows": boolean; - "styleBuiltIn": string; - "styleFirstColumn": boolean; - "styleLastColumn": boolean; - "styleTotalRow": boolean; - "values": string[][]; - "verticalAlignment": string; - "width": number; - }; + toJSON(): Word.Interfaces.TableData; } /** * @@ -17799,7 +23691,7 @@ declare namespace Word { */ class TableCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Array; /** * * Gets the first table in this collection. Throws if this collection is empty. @@ -17817,7 +23709,9 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.TableCollection; + load(option?: Word.Interfaces.TableCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableCollection; + load(option?: string | string[]): Word.TableCollection; + load(option?: OfficeExtension.LoadOption): Word.TableCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ @@ -17826,7 +23720,7 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.TableCollection; - toJSON(): {}; + toJSON(): Word.Interfaces.TableCollectionData; } /** * @@ -17841,28 +23735,28 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - cells: Word.TableCellCollection; + readonly cells: Word.TableCellCollection; /** * * Gets the font. Use this to get and set font name, size, color, and other properties. Read-only. * * [Api set: WordApi 1.3] */ - font: Word.Font; + readonly font: Word.Font; /** * * Gets parent table. Read-only. * * [Api set: WordApi 1.3] */ - parentTable: Word.Table; + readonly parentTable: Word.Table; /** * * Gets the number of cells in the row. Read-only. * * [Api set: WordApi 1.3] */ - cellCount: number; + readonly cellCount: number; /** * * Gets and sets the horizontal alignment of every cell in the row. The value can be 'left', 'centered', 'right', or 'justified'. @@ -17876,7 +23770,7 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - isHeader: boolean; + readonly isHeader: boolean; /** * * Gets and sets the preferred height of the row in points. @@ -17890,7 +23784,7 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - rowIndex: number; + readonly rowIndex: number; /** * * Gets and sets the shading color. @@ -18018,7 +23912,12 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.TableRow; + load(option?: Word.Interfaces.TableRowLoadOptions): Word.TableRow; + load(option?: string | string[]): Word.TableRow; + load(option?: { + select?: string; + expand?: string; + }): Word.TableRow; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ @@ -18027,17 +23926,7 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.TableRow; - toJSON(): { - "cellCount": number; - "font": Font; - "horizontalAlignment": string; - "isHeader": boolean; - "preferredHeight": number; - "rowIndex": number; - "shadingColor": string; - "values": string[][]; - "verticalAlignment": string; - }; + toJSON(): Word.Interfaces.TableRowData; } /** * @@ -18047,7 +23936,7 @@ declare namespace Word { */ class TableRowCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Array; /** * * Gets the first row in this collection. Throws if this collection is empty. @@ -18065,7 +23954,9 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.TableRowCollection; + load(option?: Word.Interfaces.TableRowCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableRowCollection; + load(option?: string | string[]): Word.TableRowCollection; + load(option?: OfficeExtension.LoadOption): Word.TableRowCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ @@ -18074,7 +23965,7 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.TableRowCollection; - toJSON(): {}; + toJSON(): Word.Interfaces.TableRowCollectionData; } /** * @@ -18089,28 +23980,28 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - body: Word.Body; + readonly body: Word.Body; /** * * Gets the parent row of the cell. Read-only. * * [Api set: WordApi 1.3] */ - parentRow: Word.TableRow; + readonly parentRow: Word.TableRow; /** * * Gets the parent table of the cell. Read-only. * * [Api set: WordApi 1.3] */ - parentTable: Word.Table; + readonly parentTable: Word.Table; /** * * Gets the index of the cell in its row. Read-only. * * [Api set: WordApi 1.3] */ - cellIndex: number; + readonly cellIndex: number; /** * * Gets and sets the width of the cell's column in points. This is applicable to uniform tables. @@ -18131,7 +24022,7 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - rowIndex: number; + readonly rowIndex: number; /** * * Gets or sets the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. @@ -18159,7 +24050,7 @@ declare namespace Word { * * [Api set: WordApi 1.3] */ - width: number; + readonly width: number; /** Sets multiple properties on the object at the same time, based on JSON input. */ set(properties: Interfaces.TableCellUpdateData, options?: { /** @@ -18250,7 +24141,12 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.TableCell; + load(option?: Word.Interfaces.TableCellLoadOptions): Word.TableCell; + load(option?: string | string[]): Word.TableCell; + load(option?: { + select?: string; + expand?: string; + }): Word.TableCell; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ @@ -18259,17 +24155,7 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.TableCell; - toJSON(): { - "body": Body; - "cellIndex": number; - "columnWidth": number; - "horizontalAlignment": string; - "rowIndex": number; - "shadingColor": string; - "value": string; - "verticalAlignment": string; - "width": number; - }; + toJSON(): Word.Interfaces.TableCellData; } /** * @@ -18279,7 +24165,7 @@ declare namespace Word { */ class TableCellCollection extends OfficeExtension.ClientObject { /** Gets the loaded child items in this collection. */ - items: Array; + readonly items: Array; /** * * Gets the first table cell in this collection. Throws if this collection is empty. @@ -18297,7 +24183,9 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.TableCellCollection; + load(option?: Word.Interfaces.TableCellCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableCellCollection; + load(option?: string | string[]): Word.TableCellCollection; + load(option?: OfficeExtension.LoadOption): Word.TableCellCollection; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ @@ -18306,7 +24194,7 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.TableCellCollection; - toJSON(): {}; + toJSON(): Word.Interfaces.TableCellCollectionData; } /** * @@ -18348,7 +24236,12 @@ declare namespace Word { /** * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. */ - load(option?: string | string[] | OfficeExtension.LoadOption): Word.TableBorder; + load(option?: Word.Interfaces.TableBorderLoadOptions): Word.TableBorder; + load(option?: string | string[]): Word.TableBorder; + load(option?: { + select?: string; + expand?: string; + }): Word.TableBorder; /** * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for context.trackedObjects.add(thisObject). If you are using this object across ".sync" calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you needed to have added the object to the tracked object collection when the object was first created. */ @@ -18357,11 +24250,7 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.TableBorder; - toJSON(): { - "color": string; - "type": string; - "width": number; - }; + toJSON(): Word.Interfaces.TableBorderData; } /** * @@ -18649,1018 +24538,5128 @@ declare namespace Word { /** * [Api set: WordApi] */ - namespace ListLevelType { - var bullet: string; + namespace ListLevelType { + var bullet: string; + var number: string; + var picture: string; + } + /** + * [Api set: WordApi] + */ + namespace ListBullet { + var custom: string; + var solid: string; + var hollow: string; + var square: string; + var diamonds: string; + var arrow: string; + var checkmark: string; + } + /** + * [Api set: WordApi] + */ + namespace ListNumbering { + var none: string; + var arabic: string; + var upperRoman: string; + var lowerRoman: string; + var upperLetter: string; + var lowerLetter: string; + } + /** + * [Api set: WordApi] + */ + namespace Style { + /** + * + * Mixed styles or other style not in this list. + * + */ + var other: string; + /** + * + * Reset character and paragraph style to default. + * + */ + var normal: string; + var heading1: string; + var heading2: string; + var heading3: string; + var heading4: string; + var heading5: string; + var heading6: string; + var heading7: string; + var heading8: string; + var heading9: string; + /** + * + * Table-of-content level 1. + * + */ + var toc1: string; + /** + * + * Table-of-content level 2. + * + */ + var toc2: string; + /** + * + * Table-of-content level 3. + * + */ + var toc3: string; + /** + * + * Table-of-content level 4. + * + */ + var toc4: string; + /** + * + * Table-of-content level 5. + * + */ + var toc5: string; + /** + * + * Table-of-content level 6. + * + */ + var toc6: string; + /** + * + * Table-of-content level 7. + * + */ + var toc7: string; + /** + * + * Table-of-content level 8. + * + */ + var toc8: string; + /** + * + * Table-of-content level 9. + * + */ + var toc9: string; + var footnoteText: string; + var header: string; + var footer: string; + var caption: string; + var footnoteReference: string; + var endnoteReference: string; + var endnoteText: string; + var title: string; + var subtitle: string; + var hyperlink: string; + var strong: string; + var emphasis: string; + var noSpacing: string; + var listParagraph: string; + var quote: string; + var intenseQuote: string; + var subtleEmphasis: string; + var intenseEmphasis: string; + var subtleReference: string; + var intenseReference: string; + var bookTitle: string; + var bibliography: string; + /** + * + * Table-of-content heading. + * + */ + var tocHeading: string; + var tableGrid: string; + var plainTable1: string; + var plainTable2: string; + var plainTable3: string; + var plainTable4: string; + var plainTable5: string; + var tableGridLight: string; + var gridTable1Light: string; + var gridTable1Light_Accent1: string; + var gridTable1Light_Accent2: string; + var gridTable1Light_Accent3: string; + var gridTable1Light_Accent4: string; + var gridTable1Light_Accent5: string; + var gridTable1Light_Accent6: string; + var gridTable2: string; + var gridTable2_Accent1: string; + var gridTable2_Accent2: string; + var gridTable2_Accent3: string; + var gridTable2_Accent4: string; + var gridTable2_Accent5: string; + var gridTable2_Accent6: string; + var gridTable3: string; + var gridTable3_Accent1: string; + var gridTable3_Accent2: string; + var gridTable3_Accent3: string; + var gridTable3_Accent4: string; + var gridTable3_Accent5: string; + var gridTable3_Accent6: string; + var gridTable4: string; + var gridTable4_Accent1: string; + var gridTable4_Accent2: string; + var gridTable4_Accent3: string; + var gridTable4_Accent4: string; + var gridTable4_Accent5: string; + var gridTable4_Accent6: string; + var gridTable5Dark: string; + var gridTable5Dark_Accent1: string; + var gridTable5Dark_Accent2: string; + var gridTable5Dark_Accent3: string; + var gridTable5Dark_Accent4: string; + var gridTable5Dark_Accent5: string; + var gridTable5Dark_Accent6: string; + var gridTable6Colorful: string; + var gridTable6Colorful_Accent1: string; + var gridTable6Colorful_Accent2: string; + var gridTable6Colorful_Accent3: string; + var gridTable6Colorful_Accent4: string; + var gridTable6Colorful_Accent5: string; + var gridTable6Colorful_Accent6: string; + var gridTable7Colorful: string; + var gridTable7Colorful_Accent1: string; + var gridTable7Colorful_Accent2: string; + var gridTable7Colorful_Accent3: string; + var gridTable7Colorful_Accent4: string; + var gridTable7Colorful_Accent5: string; + var gridTable7Colorful_Accent6: string; + var listTable1Light: string; + var listTable1Light_Accent1: string; + var listTable1Light_Accent2: string; + var listTable1Light_Accent3: string; + var listTable1Light_Accent4: string; + var listTable1Light_Accent5: string; + var listTable1Light_Accent6: string; + var listTable2: string; + var listTable2_Accent1: string; + var listTable2_Accent2: string; + var listTable2_Accent3: string; + var listTable2_Accent4: string; + var listTable2_Accent5: string; + var listTable2_Accent6: string; + var listTable3: string; + var listTable3_Accent1: string; + var listTable3_Accent2: string; + var listTable3_Accent3: string; + var listTable3_Accent4: string; + var listTable3_Accent5: string; + var listTable3_Accent6: string; + var listTable4: string; + var listTable4_Accent1: string; + var listTable4_Accent2: string; + var listTable4_Accent3: string; + var listTable4_Accent4: string; + var listTable4_Accent5: string; + var listTable4_Accent6: string; + var listTable5Dark: string; + var listTable5Dark_Accent1: string; + var listTable5Dark_Accent2: string; + var listTable5Dark_Accent3: string; + var listTable5Dark_Accent4: string; + var listTable5Dark_Accent5: string; + var listTable5Dark_Accent6: string; + var listTable6Colorful: string; + var listTable6Colorful_Accent1: string; + var listTable6Colorful_Accent2: string; + var listTable6Colorful_Accent3: string; + var listTable6Colorful_Accent4: string; + var listTable6Colorful_Accent5: string; + var listTable6Colorful_Accent6: string; + var listTable7Colorful: string; + var listTable7Colorful_Accent1: string; + var listTable7Colorful_Accent2: string; + var listTable7Colorful_Accent3: string; + var listTable7Colorful_Accent4: string; + var listTable7Colorful_Accent5: string; + var listTable7Colorful_Accent6: string; + } + /** + * [Api set: WordApi] + */ + namespace DocumentPropertyType { + var string: string; var number: string; - var picture: string; - } - /** - * [Api set: WordApi] - */ - namespace ListBullet { - var custom: string; - var solid: string; - var hollow: string; - var square: string; - var diamonds: string; - var arrow: string; - var checkmark: string; + var date: string; + var boolean: string; } - /** - * [Api set: WordApi] - */ - namespace ListNumbering { - var none: string; - var arabic: string; - var upperRoman: string; - var lowerRoman: string; - var upperLetter: string; - var lowerLetter: string; + namespace ErrorCodes { + var accessDenied: string; + var generalException: string; + var invalidArgument: string; + var itemNotFound: string; + var notImplemented: string; } - /** - * [Api set: WordApi] - */ - namespace Style { + module Interfaces { + interface CollectionLoadOptions { + $top?: number; + $skip?: number; + } + /** An interface for updating data on the Body object, for use in "body.set({ ... })". */ + interface BodyUpdateData { + /** + * + * Gets the text format of the body. Use this to get and set font name, size, color and other properties. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * + * Gets or sets the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * + * Gets or sets the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: string; + } + /** An interface for updating data on the ContentControl object, for use in "contentControl.set({ ... })". */ + interface ContentControlUpdateData { + /** + * + * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * + * Gets or sets the appearance of the content control. The value can be 'boundingBox', 'tags' or 'hidden'. + * + * [Api set: WordApi 1.1] + */ + appearance?: string; + /** + * + * Gets or sets a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * [Api set: WordApi 1.1] + */ + cannotDelete?: boolean; + /** + * + * Gets or sets a value that indicates whether the user can edit the contents of the content control. + * + * [Api set: WordApi 1.1] + */ + cannotEdit?: boolean; + /** + * + * Gets or sets the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * [Api set: WordApi 1.1] + */ + color?: string; + /** + * + * Gets or sets the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. + * + * [Api set: WordApi 1.1] + */ + placeholderText?: string; + /** + * + * Gets or sets a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * [Api set: WordApi 1.1] + */ + removeWhenEdited?: boolean; + /** + * + * Gets or sets the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * + * Gets or sets the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: string; + /** + * + * Gets or sets a tag to identify a content control. + * + * [Api set: WordApi 1.1] + */ + tag?: string; + /** + * + * Gets or sets the title for a content control. + * + * [Api set: WordApi 1.1] + */ + title?: string; + } + /** An interface for updating data on the ContentControlCollection object, for use in "contentControlCollection.set({ ... })". */ + interface ContentControlCollectionUpdateData { + items?: Word.Interfaces.ContentControlData[]; + } + /** An interface for updating data on the CustomProperty object, for use in "customProperty.set({ ... })". */ + interface CustomPropertyUpdateData { + /** + * + * Gets or sets the value of the custom property. Note that even though Word Online and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). + * + * [Api set: WordApi 1.3] + */ + value?: any; + } + /** An interface for updating data on the CustomPropertyCollection object, for use in "customPropertyCollection.set({ ... })". */ + interface CustomPropertyCollectionUpdateData { + items?: Word.Interfaces.CustomPropertyData[]; + } + /** An interface for updating data on the Document object, for use in "document.set({ ... })". */ + interface DocumentUpdateData { + /** + * + * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.. + * + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyUpdateData; + /** + * + * Gets the properties of the document. + * + * [Api set: WordApi 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesUpdateData; + } + /** An interface for updating data on the DocumentCreated object, for use in "documentCreated.set({ ... })". */ + interface DocumentCreatedUpdateData { + /** + * + * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + body?: Word.Interfaces.BodyUpdateData; + /** + * + * Gets the properties of the document. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesUpdateData; + } + /** An interface for updating data on the DocumentProperties object, for use in "documentProperties.set({ ... })". */ + interface DocumentPropertiesUpdateData { + /** + * + * Gets or sets the author of the document. + * + * [Api set: WordApi 1.3] + */ + author?: string; + /** + * + * Gets or sets the category of the document. + * + * [Api set: WordApi 1.3] + */ + category?: string; + /** + * + * Gets or sets the comments of the document. + * + * [Api set: WordApi 1.3] + */ + comments?: string; + /** + * + * Gets or sets the company of the document. + * + * [Api set: WordApi 1.3] + */ + company?: string; + /** + * + * Gets or sets the format of the document. + * + * [Api set: WordApi 1.3] + */ + format?: string; + /** + * + * Gets or sets the keywords of the document. + * + * [Api set: WordApi 1.3] + */ + keywords?: string; + /** + * + * Gets or sets the manager of the document. + * + * [Api set: WordApi 1.3] + */ + manager?: string; + /** + * + * Gets or sets the subject of the document. + * + * [Api set: WordApi 1.3] + */ + subject?: string; + /** + * + * Gets or sets the title of the document. + * + * [Api set: WordApi 1.3] + */ + title?: string; + } + /** An interface for updating data on the Font object, for use in "font.set({ ... })". */ + interface FontUpdateData { + /** + * + * Gets or sets a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + bold?: boolean; + /** + * + * Gets or sets the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. + * + * [Api set: WordApi 1.1] + */ + color?: string; + /** + * + * Gets or sets a value that indicates whether the font has a double strike through. True if the font is formatted as double strikethrough text, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + doubleStrikeThrough?: boolean; + /** + * + * Gets or sets the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, or an empty string for mixed highlight colors, or null for no highlight color. + * + * [Api set: WordApi 1.1] + */ + highlightColor?: string; + /** + * + * Gets or sets a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + italic?: boolean; + /** + * + * Gets or sets a value that represents the name of the font. + * + * [Api set: WordApi 1.1] + */ + name?: string; + /** + * + * Gets or sets a value that represents the font size in points. + * + * [Api set: WordApi 1.1] + */ + size?: number; + /** + * + * Gets or sets a value that indicates whether the font has a strike through. True if the font is formatted as strikethrough text, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + strikeThrough?: boolean; + /** + * + * Gets or sets a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + subscript?: boolean; + /** + * + * Gets or sets a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + superscript?: boolean; + /** + * + * Gets or sets a value that indicates the font's underline type. 'None' if the font is not underlined. + * + * [Api set: WordApi 1.1] + */ + underline?: string; + } + /** An interface for updating data on the InlinePicture object, for use in "inlinePicture.set({ ... })". */ + interface InlinePictureUpdateData { + /** + * + * Gets or sets a string that represents the alternative text associated with the inline image + * + * [Api set: WordApi 1.1] + */ + altTextDescription?: string; + /** + * + * Gets or sets a string that contains the title for the inline image. + * + * [Api set: WordApi 1.1] + */ + altTextTitle?: string; + /** + * + * Gets or sets a number that describes the height of the inline image. + * + * [Api set: WordApi 1.1] + */ + height?: number; + /** + * + * Gets or sets a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * [Api set: WordApi 1.1] + */ + hyperlink?: string; + /** + * + * Gets or sets a value that indicates whether the inline image retains its original proportions when you resize it. + * + * [Api set: WordApi 1.1] + */ + lockAspectRatio?: boolean; + /** + * + * Gets or sets a number that describes the width of the inline image. + * + * [Api set: WordApi 1.1] + */ + width?: number; + } + /** An interface for updating data on the InlinePictureCollection object, for use in "inlinePictureCollection.set({ ... })". */ + interface InlinePictureCollectionUpdateData { + items?: Word.Interfaces.InlinePictureData[]; + } + /** An interface for updating data on the ListCollection object, for use in "listCollection.set({ ... })". */ + interface ListCollectionUpdateData { + items?: Word.Interfaces.ListData[]; + } + /** An interface for updating data on the ListItem object, for use in "listItem.set({ ... })". */ + interface ListItemUpdateData { + /** + * + * Gets or sets the level of the item in the list. + * + * [Api set: WordApi 1.3] + */ + level?: number; + } + /** An interface for updating data on the Paragraph object, for use in "paragraph.set({ ... })". */ + interface ParagraphUpdateData { + /** + * + * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * + * Gets the ListItem for the paragraph. Throws if the paragraph is not part of a list. + * + * [Api set: WordApi 1.3] + */ + listItem?: Word.Interfaces.ListItemUpdateData; + /** + * + * Gets the ListItem for the paragraph. Returns a null object if the paragraph is not part of a list. + * + * [Api set: WordApi 1.3] + */ + listItemOrNullObject?: Word.Interfaces.ListItemUpdateData; + /** + * + * Gets or sets the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * [Api set: WordApi 1.1] + */ + alignment?: string; + /** + * + * Gets or sets the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. + * + * [Api set: WordApi 1.1] + */ + firstLineIndent?: number; + /** + * + * Gets or sets the left indent value, in points, for the paragraph. + * + * [Api set: WordApi 1.1] + */ + leftIndent?: number; + /** + * + * Gets or sets the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * [Api set: WordApi 1.1] + */ + lineSpacing?: number; + /** + * + * Gets or sets the amount of spacing, in grid lines. after the paragraph. + * + * [Api set: WordApi 1.1] + */ + lineUnitAfter?: number; + /** + * + * Gets or sets the amount of spacing, in grid lines, before the paragraph. + * + * [Api set: WordApi 1.1] + */ + lineUnitBefore?: number; + /** + * + * Gets or sets the outline level for the paragraph. + * + * [Api set: WordApi 1.1] + */ + outlineLevel?: number; + /** + * + * Gets or sets the right indent value, in points, for the paragraph. + * + * [Api set: WordApi 1.1] + */ + rightIndent?: number; + /** + * + * Gets or sets the spacing, in points, after the paragraph. + * + * [Api set: WordApi 1.1] + */ + spaceAfter?: number; + /** + * + * Gets or sets the spacing, in points, before the paragraph. + * + * [Api set: WordApi 1.1] + */ + spaceBefore?: number; + /** + * + * Gets or sets the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * + * Gets or sets the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: string; + } + /** An interface for updating data on the ParagraphCollection object, for use in "paragraphCollection.set({ ... })". */ + interface ParagraphCollectionUpdateData { + items?: Word.Interfaces.ParagraphData[]; + } + /** An interface for updating data on the Range object, for use in "range.set({ ... })". */ + interface RangeUpdateData { + /** + * + * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * + * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. + * + * [Api set: WordApi 1.3] + */ + hyperlink?: string; + /** + * + * Gets or sets the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * + * Gets or sets the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: string; + } + /** An interface for updating data on the RangeCollection object, for use in "rangeCollection.set({ ... })". */ + interface RangeCollectionUpdateData { + items?: Word.Interfaces.RangeData[]; + } + /** An interface for updating data on the SearchOptions object, for use in "searchOptions.set({ ... })". */ + interface SearchOptionsUpdateData { + /** + * + * Gets or sets a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + ignorePunct?: boolean; + /** + * + * Gets or sets a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + ignoreSpace?: boolean; + /** + * + * Gets or sets a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box (Edit menu). + * + * [Api set: WordApi 1.1] + */ + matchCase?: boolean; + /** + * + * Gets or sets a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + matchPrefix?: boolean; + /** + * + * Gets or sets a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + matchSuffix?: boolean; + /** + * + * Gets or sets a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + matchWholeWord?: boolean; + /** + * + * Gets or sets a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + matchWildcards?: boolean; + } + /** An interface for updating data on the Section object, for use in "section.set({ ... })". */ + interface SectionUpdateData { + /** + * + * Gets the body object of the section. This does not include the header/footer and other section metadata. + * + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyUpdateData; + } + /** An interface for updating data on the SectionCollection object, for use in "sectionCollection.set({ ... })". */ + interface SectionCollectionUpdateData { + items?: Word.Interfaces.SectionData[]; + } + /** An interface for updating data on the Table object, for use in "table.set({ ... })". */ + interface TableUpdateData { + /** + * + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * + * Gets or sets the alignment of the table against the page column. The value can be 'left', 'centered' or 'right'. + * + * [Api set: WordApi 1.3] + */ + alignment?: string; + /** + * + * Gets and sets the number of header rows. + * + * [Api set: WordApi 1.3] + */ + headerRowCount?: number; + /** + * + * Gets and sets the horizontal alignment of every cell in the table. The value can be 'left', 'centered', 'right', or 'justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: string; + /** + * + * Gets and sets the shading color. + * + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * + * Gets or sets the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.3] + */ + style?: string; + /** + * + * Gets and sets whether the table has banded columns. + * + * [Api set: WordApi 1.3] + */ + styleBandedColumns?: boolean; + /** + * + * Gets and sets whether the table has banded rows. + * + * [Api set: WordApi 1.3] + */ + styleBandedRows?: boolean; + /** + * + * Gets or sets the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: string; + /** + * + * Gets and sets whether the table has a first column with a special style. + * + * [Api set: WordApi 1.3] + */ + styleFirstColumn?: boolean; + /** + * + * Gets and sets whether the table has a last column with a special style. + * + * [Api set: WordApi 1.3] + */ + styleLastColumn?: boolean; + /** + * + * Gets and sets whether the table has a total (last) row with a special style. + * + * [Api set: WordApi 1.3] + */ + styleTotalRow?: boolean; + /** + * + * Gets and sets the text values in the table, as a 2D Javascript array. + * + * [Api set: WordApi 1.3] + */ + values?: Array>; + /** + * + * Gets and sets the vertical alignment of every cell in the table. The value can be 'top', 'center' or 'bottom'. + * + * [Api set: WordApi 1.3] + */ + verticalAlignment?: string; + /** + * + * Gets and sets the width of the table in points. + * + * [Api set: WordApi 1.3] + */ + width?: number; + } + /** An interface for updating data on the TableCollection object, for use in "tableCollection.set({ ... })". */ + interface TableCollectionUpdateData { + items?: Word.Interfaces.TableData[]; + } + /** An interface for updating data on the TableRow object, for use in "tableRow.set({ ... })". */ + interface TableRowUpdateData { + /** + * + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontUpdateData; + /** + * + * Gets and sets the horizontal alignment of every cell in the row. The value can be 'left', 'centered', 'right', or 'justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: string; + /** + * + * Gets and sets the preferred height of the row in points. + * + * [Api set: WordApi 1.3] + */ + preferredHeight?: number; + /** + * + * Gets and sets the shading color. + * + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * + * Gets and sets the text values in the row, as a 2D Javascript array. + * + * [Api set: WordApi 1.3] + */ + values?: Array>; + /** + * + * Gets and sets the vertical alignment of the cells in the row. The value can be 'top', 'center' or 'bottom'. + * + * [Api set: WordApi 1.3] + */ + verticalAlignment?: string; + } + /** An interface for updating data on the TableRowCollection object, for use in "tableRowCollection.set({ ... })". */ + interface TableRowCollectionUpdateData { + items?: Word.Interfaces.TableRowData[]; + } + /** An interface for updating data on the TableCell object, for use in "tableCell.set({ ... })". */ + interface TableCellUpdateData { + /** + * + * Gets the body object of the cell. + * + * [Api set: WordApi 1.3] + */ + body?: Word.Interfaces.BodyUpdateData; + /** + * + * Gets and sets the width of the cell's column in points. This is applicable to uniform tables. + * + * [Api set: WordApi 1.3] + */ + columnWidth?: number; + /** + * + * Gets and sets the horizontal alignment of the cell. The value can be 'left', 'centered', 'right', or 'justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: string; + /** + * + * Gets or sets the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * + * Gets and sets the text of the cell. + * + * [Api set: WordApi 1.3] + */ + value?: string; + /** + * + * Gets and sets the vertical alignment of the cell. The value can be 'top', 'center' or 'bottom'. + * + * [Api set: WordApi 1.3] + */ + verticalAlignment?: string; + } + /** An interface for updating data on the TableCellCollection object, for use in "tableCellCollection.set({ ... })". */ + interface TableCellCollectionUpdateData { + items?: Word.Interfaces.TableCellData[]; + } + /** An interface for updating data on the TableBorder object, for use in "tableBorder.set({ ... })". */ + interface TableBorderUpdateData { + /** + * + * Gets or sets the table border color, as a hex value or name. + * + * [Api set: WordApi 1.3] + */ + color?: string; + /** + * + * Gets or sets the type of the table border. + * + * [Api set: WordApi 1.3] + */ + type?: string; + /** + * + * Gets or sets the width, in points, of the table border. Not applicable to table border types that have fixed widths. + * + * [Api set: WordApi 1.3] + */ + width?: number; + } + /** An interface describing the data returned by calling "body.toJSON()". */ + interface BodyData { + /** + * + * Gets the collection of rich text content control objects in the body. Read-only. + * + * [Api set: WordApi 1.1] + */ + contentControls?: Word.Interfaces.ContentControlCollectionData; + /** + * + * Gets the text format of the body. Use this to get and set font name, size, color and other properties. Read-only. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontData; + /** + * + * Gets the collection of inlinePicture objects in the body. The collection does not include floating images. Read-only. + * + * [Api set: WordApi 1.1] + */ + inlinePictures?: Word.Interfaces.InlinePictureCollectionData; + /** + * + * Gets the collection of list objects in the body. Read-only. + * + * [Api set: WordApi 1.3] + */ + lists?: Word.Interfaces.ListCollectionData; + /** + * + * Gets the collection of paragraph objects in the body. Read-only. + * + * [Api set: WordApi 1.1] + */ + paragraphs?: Word.Interfaces.ParagraphCollectionData; + /** + * + * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Throws if there isn't a parent body. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyData; + /** + * + * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Returns a null object if there isn't a parent body. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentBodyOrNullObject?: Word.Interfaces.BodyData; + /** + * + * Gets the content control that contains the body. Throws if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlData; + /** + * + * Gets the content control that contains the body. Returns a null object if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlData; + /** + * + * Gets the parent section of the body. Throws if there isn't a parent section. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentSection?: Word.Interfaces.SectionData; + /** + * + * Gets the parent section of the body. Returns a null object if there isn't a parent section. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentSectionOrNullObject?: Word.Interfaces.SectionData; + /** + * + * Gets the collection of table objects in the body. Read-only. + * + * [Api set: WordApi 1.3] + */ + tables?: Word.Interfaces.TableCollectionData; + /** + * + * Gets or sets the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * + * Gets or sets the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: string; + /** + * + * Gets the text of the body. Use the insertText method to insert text. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: string; + /** + * + * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Read-only. + * + * [Api set: WordApi 1.3] + */ + type?: string; + } + /** An interface describing the data returned by calling "contentControl.toJSON()". */ + interface ContentControlData { + /** + * + * Gets the collection of content control objects in the content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + contentControls?: Word.Interfaces.ContentControlCollectionData; + /** + * + * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. Read-only. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontData; + /** + * + * Gets the collection of inlinePicture objects in the content control. The collection does not include floating images. Read-only. + * + * [Api set: WordApi 1.1] + */ + inlinePictures?: Word.Interfaces.InlinePictureCollectionData; + /** + * + * Gets the collection of list objects in the content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + lists?: Word.Interfaces.ListCollectionData; + /** + * + * Get the collection of paragraph objects in the content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + paragraphs?: Word.Interfaces.ParagraphCollectionData; + /** + * + * Gets the parent body of the content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyData; + /** + * + * Gets the content control that contains the content control. Throws if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlData; + /** + * + * Gets the content control that contains the content control. Returns a null object if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlData; + /** + * + * Gets the table that contains the content control. Throws if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableData; + /** + * + * Gets the table cell that contains the content control. Throws if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellData; + /** + * + * Gets the table cell that contains the content control. Returns a null object if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellData; + /** + * + * Gets the table that contains the content control. Returns a null object if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableData; + /** + * + * Gets the collection of table objects in the content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + tables?: Word.Interfaces.TableCollectionData; + /** + * + * Gets or sets the appearance of the content control. The value can be 'boundingBox', 'tags' or 'hidden'. + * + * [Api set: WordApi 1.1] + */ + appearance?: string; + /** + * + * Gets or sets a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * [Api set: WordApi 1.1] + */ + cannotDelete?: boolean; + /** + * + * Gets or sets a value that indicates whether the user can edit the contents of the content control. + * + * [Api set: WordApi 1.1] + */ + cannotEdit?: boolean; + /** + * + * Gets or sets the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * [Api set: WordApi 1.1] + */ + color?: string; + /** + * + * Gets an integer that represents the content control identifier. Read-only. + * + * [Api set: WordApi 1.1] + */ + id?: number; + /** + * + * Gets or sets the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. + * + * [Api set: WordApi 1.1] + */ + placeholderText?: string; + /** + * + * Gets or sets a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * [Api set: WordApi 1.1] + */ + removeWhenEdited?: boolean; + /** + * + * Gets or sets the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * + * Gets or sets the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: string; + /** + * + * Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls. Read-only. + * + * [Api set: WordApi 1.3] + */ + subtype?: string; + /** + * + * Gets or sets a tag to identify a content control. + * + * [Api set: WordApi 1.1] + */ + tag?: string; + /** + * + * Gets the text of the content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: string; + /** + * + * Gets or sets the title for a content control. + * + * [Api set: WordApi 1.1] + */ + title?: string; + /** + * + * Gets the content control type. Only rich text content controls are supported currently. Read-only. + * + * [Api set: WordApi 1.1] + */ + type?: string; + } + /** An interface describing the data returned by calling "contentControlCollection.toJSON()". */ + interface ContentControlCollectionData { + items?: Word.Interfaces.ContentControlData[]; + } + /** An interface describing the data returned by calling "customProperty.toJSON()". */ + interface CustomPropertyData { + /** + * + * Gets the key of the custom property. Read only. + * + * [Api set: WordApi 1.3] + */ + key?: string; + /** + * + * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. Read only. + * + * [Api set: WordApi 1.3] + */ + type?: string; + /** + * + * Gets or sets the value of the custom property. Note that even though Word Online and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). + * + * [Api set: WordApi 1.3] + */ + value?: any; + } + /** An interface describing the data returned by calling "customPropertyCollection.toJSON()". */ + interface CustomPropertyCollectionData { + items?: Word.Interfaces.CustomPropertyData[]; + } + /** An interface describing the data returned by calling "document.toJSON()". */ + interface DocumentData { + /** + * + * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.. Read-only. + * + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyData; + /** + * + * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc.. Read-only. + * + * [Api set: WordApi 1.1] + */ + contentControls?: Word.Interfaces.ContentControlCollectionData; + /** + * + * Gets the properties of the document. Read-only. + * + * [Api set: WordApi 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesData; + /** + * + * Gets the collection of section objects in the document. Read-only. + * + * [Api set: WordApi 1.1] + */ + sections?: Word.Interfaces.SectionCollectionData; + /** + * + * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. Read-only. + * + * [Api set: WordApi 1.1] + */ + saved?: boolean; + } + /** An interface describing the data returned by calling "documentCreated.toJSON()". */ + interface DocumentCreatedData { + /** + * + * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.. Read-only. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + body?: Word.Interfaces.BodyData; + /** + * + * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc.. Read-only. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + contentControls?: Word.Interfaces.ContentControlCollectionData; + /** + * + * Gets the properties of the document. Read-only. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesData; + /** + * + * Gets the collection of section objects in the document. Read-only. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + sections?: Word.Interfaces.SectionCollectionData; + /** + * + * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. Read-only. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + saved?: boolean; + } + /** An interface describing the data returned by calling "documentProperties.toJSON()". */ + interface DocumentPropertiesData { + /** + * + * Gets the collection of custom properties of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + customProperties?: Word.Interfaces.CustomPropertyCollectionData; + /** + * + * Gets the application name of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + applicationName?: string; + /** + * + * Gets or sets the author of the document. + * + * [Api set: WordApi 1.3] + */ + author?: string; + /** + * + * Gets or sets the category of the document. + * + * [Api set: WordApi 1.3] + */ + category?: string; + /** + * + * Gets or sets the comments of the document. + * + * [Api set: WordApi 1.3] + */ + comments?: string; + /** + * + * Gets or sets the company of the document. + * + * [Api set: WordApi 1.3] + */ + company?: string; + /** + * + * Gets the creation date of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + creationDate?: Date; + /** + * + * Gets or sets the format of the document. + * + * [Api set: WordApi 1.3] + */ + format?: string; + /** + * + * Gets or sets the keywords of the document. + * + * [Api set: WordApi 1.3] + */ + keywords?: string; + /** + * + * Gets the last author of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + lastAuthor?: string; + /** + * + * Gets the last print date of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + lastPrintDate?: Date; + /** + * + * Gets the last save time of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + lastSaveTime?: Date; + /** + * + * Gets or sets the manager of the document. + * + * [Api set: WordApi 1.3] + */ + manager?: string; + /** + * + * Gets the revision number of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + revisionNumber?: string; + /** + * + * Gets the security of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + security?: number; + /** + * + * Gets or sets the subject of the document. + * + * [Api set: WordApi 1.3] + */ + subject?: string; + /** + * + * Gets the template of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + template?: string; + /** + * + * Gets or sets the title of the document. + * + * [Api set: WordApi 1.3] + */ + title?: string; + } + /** An interface describing the data returned by calling "font.toJSON()". */ + interface FontData { + /** + * + * Gets or sets a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + bold?: boolean; + /** + * + * Gets or sets the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. + * + * [Api set: WordApi 1.1] + */ + color?: string; + /** + * + * Gets or sets a value that indicates whether the font has a double strike through. True if the font is formatted as double strikethrough text, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + doubleStrikeThrough?: boolean; + /** + * + * Gets or sets the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, or an empty string for mixed highlight colors, or null for no highlight color. + * + * [Api set: WordApi 1.1] + */ + highlightColor?: string; + /** + * + * Gets or sets a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + italic?: boolean; + /** + * + * Gets or sets a value that represents the name of the font. + * + * [Api set: WordApi 1.1] + */ + name?: string; + /** + * + * Gets or sets a value that represents the font size in points. + * + * [Api set: WordApi 1.1] + */ + size?: number; + /** + * + * Gets or sets a value that indicates whether the font has a strike through. True if the font is formatted as strikethrough text, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + strikeThrough?: boolean; + /** + * + * Gets or sets a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + subscript?: boolean; + /** + * + * Gets or sets a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + superscript?: boolean; + /** + * + * Gets or sets a value that indicates the font's underline type. 'None' if the font is not underlined. + * + * [Api set: WordApi 1.1] + */ + underline?: string; + } + /** An interface describing the data returned by calling "inlinePicture.toJSON()". */ + interface InlinePictureData { + /** + * + * Gets the parent paragraph that contains the inline image. Read-only. + * + * [Api set: WordApi 1.2] + */ + paragraph?: Word.Interfaces.ParagraphData; + /** + * + * Gets the content control that contains the inline image. Throws if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlData; + /** + * + * Gets the content control that contains the inline image. Returns a null object if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlData; + /** + * + * Gets the table that contains the inline image. Throws if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableData; + /** + * + * Gets the table cell that contains the inline image. Throws if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellData; + /** + * + * Gets the table cell that contains the inline image. Returns a null object if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellData; + /** + * + * Gets the table that contains the inline image. Returns a null object if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableData; + /** + * + * Gets or sets a string that represents the alternative text associated with the inline image + * + * [Api set: WordApi 1.1] + */ + altTextDescription?: string; + /** + * + * Gets or sets a string that contains the title for the inline image. + * + * [Api set: WordApi 1.1] + */ + altTextTitle?: string; + /** + * + * Gets or sets a number that describes the height of the inline image. + * + * [Api set: WordApi 1.1] + */ + height?: number; + /** + * + * Gets or sets a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * [Api set: WordApi 1.1] + */ + hyperlink?: string; + /** + * + * Gets or sets a value that indicates whether the inline image retains its original proportions when you resize it. + * + * [Api set: WordApi 1.1] + */ + lockAspectRatio?: boolean; + /** + * + * Gets or sets a number that describes the width of the inline image. + * + * [Api set: WordApi 1.1] + */ + width?: number; + } + /** An interface describing the data returned by calling "inlinePictureCollection.toJSON()". */ + interface InlinePictureCollectionData { + items?: Word.Interfaces.InlinePictureData[]; + } + /** An interface describing the data returned by calling "list.toJSON()". */ + interface ListData { + /** + * + * Gets paragraphs in the list. Read-only. + * + * [Api set: WordApi 1.3] + */ + paragraphs?: Word.Interfaces.ParagraphCollectionData; + /** + * + * Gets the list's id. + * + * [Api set: WordApi 1.3] + */ + id?: number; + /** + * + * Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. Read-only. + * + * [Api set: WordApi 1.3] + */ + levelExistences?: Array; + /** + * + * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number' or 'Picture'. Read-only. + * + * [Api set: WordApi 1.3] + */ + levelTypes?: Array; + } + /** An interface describing the data returned by calling "listCollection.toJSON()". */ + interface ListCollectionData { + items?: Word.Interfaces.ListData[]; + } + /** An interface describing the data returned by calling "listItem.toJSON()". */ + interface ListItemData { + /** + * + * Gets or sets the level of the item in the list. + * + * [Api set: WordApi 1.3] + */ + level?: number; + /** + * + * Gets the list item bullet, number or picture as a string. Read-only. + * + * [Api set: WordApi 1.3] + */ + listString?: string; + /** + * + * Gets the list item order number in relation to its siblings. Read-only. + * + * [Api set: WordApi 1.3] + */ + siblingIndex?: number; + } + /** An interface describing the data returned by calling "paragraph.toJSON()". */ + interface ParagraphData { + /** + * + * Gets the collection of content control objects in the paragraph. Read-only. + * + * [Api set: WordApi 1.1] + */ + contentControls?: Word.Interfaces.ContentControlCollectionData; + /** + * + * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. Read-only. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontData; + /** + * + * Gets the collection of inlinePicture objects in the paragraph. The collection does not include floating images. Read-only. + * + * [Api set: WordApi 1.1] + */ + inlinePictures?: Word.Interfaces.InlinePictureCollectionData; + /** + * + * Gets the List to which this paragraph belongs. Throws if the paragraph is not in a list. Read-only. + * + * [Api set: WordApi 1.3] + */ + list?: Word.Interfaces.ListData; + /** + * + * Gets the ListItem for the paragraph. Throws if the paragraph is not part of a list. Read-only. + * + * [Api set: WordApi 1.3] + */ + listItem?: Word.Interfaces.ListItemData; + /** + * + * Gets the ListItem for the paragraph. Returns a null object if the paragraph is not part of a list. Read-only. + * + * [Api set: WordApi 1.3] + */ + listItemOrNullObject?: Word.Interfaces.ListItemData; + /** + * + * Gets the List to which this paragraph belongs. Returns a null object if the paragraph is not in a list. Read-only. + * + * [Api set: WordApi 1.3] + */ + listOrNullObject?: Word.Interfaces.ListData; + /** + * + * Gets the parent body of the paragraph. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyData; + /** + * + * Gets the content control that contains the paragraph. Throws if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlData; + /** + * + * Gets the content control that contains the paragraph. Returns a null object if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlData; + /** + * + * Gets the table that contains the paragraph. Throws if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableData; + /** + * + * Gets the table cell that contains the paragraph. Throws if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellData; + /** + * + * Gets the table cell that contains the paragraph. Returns a null object if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellData; + /** + * + * Gets the table that contains the paragraph. Returns a null object if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableData; + /** + * + * Gets or sets the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * [Api set: WordApi 1.1] + */ + alignment?: string; + /** + * + * Gets or sets the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. + * + * [Api set: WordApi 1.1] + */ + firstLineIndent?: number; + /** + * + * Indicates the paragraph is the last one inside its parent body. Read-only. + * + * [Api set: WordApi 1.3] + */ + isLastParagraph?: boolean; + /** + * + * Checks whether the paragraph is a list item. Read-only. + * + * [Api set: WordApi 1.3] + */ + isListItem?: boolean; + /** + * + * Gets or sets the left indent value, in points, for the paragraph. + * + * [Api set: WordApi 1.1] + */ + leftIndent?: number; + /** + * + * Gets or sets the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * [Api set: WordApi 1.1] + */ + lineSpacing?: number; + /** + * + * Gets or sets the amount of spacing, in grid lines. after the paragraph. + * + * [Api set: WordApi 1.1] + */ + lineUnitAfter?: number; + /** + * + * Gets or sets the amount of spacing, in grid lines, before the paragraph. + * + * [Api set: WordApi 1.1] + */ + lineUnitBefore?: number; + /** + * + * Gets or sets the outline level for the paragraph. + * + * [Api set: WordApi 1.1] + */ + outlineLevel?: number; + /** + * + * Gets or sets the right indent value, in points, for the paragraph. + * + * [Api set: WordApi 1.1] + */ + rightIndent?: number; + /** + * + * Gets or sets the spacing, in points, after the paragraph. + * + * [Api set: WordApi 1.1] + */ + spaceAfter?: number; + /** + * + * Gets or sets the spacing, in points, before the paragraph. + * + * [Api set: WordApi 1.1] + */ + spaceBefore?: number; + /** + * + * Gets or sets the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * + * Gets or sets the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: string; + /** + * + * Gets the level of the paragraph's table. It returns 0 if the paragraph is not in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + tableNestingLevel?: number; + /** + * + * Gets the text of the paragraph. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: string; + } + /** An interface describing the data returned by calling "paragraphCollection.toJSON()". */ + interface ParagraphCollectionData { + items?: Word.Interfaces.ParagraphData[]; + } + /** An interface describing the data returned by calling "range.toJSON()". */ + interface RangeData { + /** + * + * Gets the collection of content control objects in the range. Read-only. + * + * [Api set: WordApi 1.1] + */ + contentControls?: Word.Interfaces.ContentControlCollectionData; + /** + * + * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. Read-only. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontData; + /** + * + * Gets the collection of inline picture objects in the range. Read-only. + * + * [Api set: WordApi 1.2] + */ + inlinePictures?: Word.Interfaces.InlinePictureCollectionData; + /** + * + * Gets the collection of list objects in the range. Read-only. + * + * [Api set: WordApi 1.3] + */ + lists?: Word.Interfaces.ListCollectionData; + /** + * + * Gets the collection of paragraph objects in the range. Read-only. + * + * [Api set: WordApi 1.1] + */ + paragraphs?: Word.Interfaces.ParagraphCollectionData; + /** + * + * Gets the parent body of the range. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyData; + /** + * + * Gets the content control that contains the range. Throws if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlData; + /** + * + * Gets the content control that contains the range. Returns a null object if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlData; + /** + * + * Gets the table that contains the range. Throws if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableData; + /** + * + * Gets the table cell that contains the range. Throws if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellData; + /** + * + * Gets the table cell that contains the range. Returns a null object if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellData; + /** + * + * Gets the table that contains the range. Returns a null object if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableData; + /** + * + * Gets the collection of table objects in the range. Read-only. + * + * [Api set: WordApi 1.3] + */ + tables?: Word.Interfaces.TableCollectionData; + /** + * + * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. + * + * [Api set: WordApi 1.3] + */ + hyperlink?: string; + /** + * + * Checks whether the range length is zero. Read-only. + * + * [Api set: WordApi 1.3] + */ + isEmpty?: boolean; + /** + * + * Gets or sets the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style?: string; + /** + * + * Gets or sets the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: string; + /** + * + * Gets the text of the range. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: string; + } + /** An interface describing the data returned by calling "rangeCollection.toJSON()". */ + interface RangeCollectionData { + items?: Word.Interfaces.RangeData[]; + } + /** An interface describing the data returned by calling "searchOptions.toJSON()". */ + interface SearchOptionsData { + /** + * + * Gets or sets a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + ignorePunct?: boolean; + /** + * + * Gets or sets a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + ignoreSpace?: boolean; + /** + * + * Gets or sets a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box (Edit menu). + * + * [Api set: WordApi 1.1] + */ + matchCase?: boolean; + /** + * + * Gets or sets a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + matchPrefix?: boolean; + /** + * + * Gets or sets a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + matchSuffix?: boolean; + /** + * + * Gets or sets a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + matchWholeWord?: boolean; + /** + * + * Gets or sets a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + matchWildcards?: boolean; + } + /** An interface describing the data returned by calling "section.toJSON()". */ + interface SectionData { + /** + * + * Gets the body object of the section. This does not include the header/footer and other section metadata. Read-only. + * + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyData; + } + /** An interface describing the data returned by calling "sectionCollection.toJSON()". */ + interface SectionCollectionData { + items?: Word.Interfaces.SectionData[]; + } + /** An interface describing the data returned by calling "table.toJSON()". */ + interface TableData { + /** + * + * Gets the font. Use this to get and set font name, size, color, and other properties. Read-only. + * + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontData; + /** + * + * Gets the parent body of the table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyData; + /** + * + * Gets the content control that contains the table. Throws if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentContentControl?: Word.Interfaces.ContentControlData; + /** + * + * Gets the content control that contains the table. Returns a null object if there isn't a parent content control. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlData; + /** + * + * Gets the table that contains this table. Throws if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableData; + /** + * + * Gets the table cell that contains this table. Throws if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellData; + /** + * + * Gets the table cell that contains this table. Returns a null object if it is not contained in a table cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellData; + /** + * + * Gets the table that contains this table. Returns a null object if it is not contained in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableData; + /** + * + * Gets all of the table rows. Read-only. + * + * [Api set: WordApi 1.3] + */ + rows?: Word.Interfaces.TableRowCollectionData; + /** + * + * Gets the child tables nested one level deeper. Read-only. + * + * [Api set: WordApi 1.3] + */ + tables?: Word.Interfaces.TableCollectionData; + /** + * + * Gets or sets the alignment of the table against the page column. The value can be 'left', 'centered' or 'right'. + * + * [Api set: WordApi 1.3] + */ + alignment?: string; + /** + * + * Gets and sets the number of header rows. + * + * [Api set: WordApi 1.3] + */ + headerRowCount?: number; + /** + * + * Gets and sets the horizontal alignment of every cell in the table. The value can be 'left', 'centered', 'right', or 'justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: string; + /** + * + * Indicates whether all of the table rows are uniform. Read-only. + * + * [Api set: WordApi 1.3] + */ + isUniform?: boolean; + /** + * + * Gets the nesting level of the table. Top-level tables have level 1. Read-only. + * + * [Api set: WordApi 1.3] + */ + nestingLevel?: number; + /** + * + * Gets the number of rows in the table. Read-only. + * + * [Api set: WordApi 1.3] + */ + rowCount?: number; + /** + * + * Gets and sets the shading color. + * + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * + * Gets or sets the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.3] + */ + style?: string; + /** + * + * Gets and sets whether the table has banded columns. + * + * [Api set: WordApi 1.3] + */ + styleBandedColumns?: boolean; + /** + * + * Gets and sets whether the table has banded rows. + * + * [Api set: WordApi 1.3] + */ + styleBandedRows?: boolean; + /** + * + * Gets or sets the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: string; + /** + * + * Gets and sets whether the table has a first column with a special style. + * + * [Api set: WordApi 1.3] + */ + styleFirstColumn?: boolean; + /** + * + * Gets and sets whether the table has a last column with a special style. + * + * [Api set: WordApi 1.3] + */ + styleLastColumn?: boolean; + /** + * + * Gets and sets whether the table has a total (last) row with a special style. + * + * [Api set: WordApi 1.3] + */ + styleTotalRow?: boolean; + /** + * + * Gets and sets the text values in the table, as a 2D Javascript array. + * + * [Api set: WordApi 1.3] + */ + values?: Array>; + /** + * + * Gets and sets the vertical alignment of every cell in the table. The value can be 'top', 'center' or 'bottom'. + * + * [Api set: WordApi 1.3] + */ + verticalAlignment?: string; + /** + * + * Gets and sets the width of the table in points. + * + * [Api set: WordApi 1.3] + */ + width?: number; + } + /** An interface describing the data returned by calling "tableCollection.toJSON()". */ + interface TableCollectionData { + items?: Word.Interfaces.TableData[]; + } + /** An interface describing the data returned by calling "tableRow.toJSON()". */ + interface TableRowData { + /** + * + * Gets cells. Read-only. + * + * [Api set: WordApi 1.3] + */ + cells?: Word.Interfaces.TableCellCollectionData; + /** + * + * Gets the font. Use this to get and set font name, size, color, and other properties. Read-only. + * + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontData; + /** + * + * Gets parent table. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableData; + /** + * + * Gets the number of cells in the row. Read-only. + * + * [Api set: WordApi 1.3] + */ + cellCount?: number; + /** + * + * Gets and sets the horizontal alignment of every cell in the row. The value can be 'left', 'centered', 'right', or 'justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: string; + /** + * + * Checks whether the row is a header row. Read-only. To set the number of header rows, use HeaderRowCount on the Table object. + * + * [Api set: WordApi 1.3] + */ + isHeader?: boolean; + /** + * + * Gets and sets the preferred height of the row in points. + * + * [Api set: WordApi 1.3] + */ + preferredHeight?: number; + /** + * + * Gets the index of the row in its parent table. Read-only. + * + * [Api set: WordApi 1.3] + */ + rowIndex?: number; + /** + * + * Gets and sets the shading color. + * + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * + * Gets and sets the text values in the row, as a 2D Javascript array. + * + * [Api set: WordApi 1.3] + */ + values?: Array>; + /** + * + * Gets and sets the vertical alignment of the cells in the row. The value can be 'top', 'center' or 'bottom'. + * + * [Api set: WordApi 1.3] + */ + verticalAlignment?: string; + } + /** An interface describing the data returned by calling "tableRowCollection.toJSON()". */ + interface TableRowCollectionData { + items?: Word.Interfaces.TableRowData[]; + } + /** An interface describing the data returned by calling "tableCell.toJSON()". */ + interface TableCellData { + /** + * + * Gets the body object of the cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + body?: Word.Interfaces.BodyData; + /** + * + * Gets the parent row of the cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentRow?: Word.Interfaces.TableRowData; + /** + * + * Gets the parent table of the cell. Read-only. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableData; + /** + * + * Gets the index of the cell in its row. Read-only. + * + * [Api set: WordApi 1.3] + */ + cellIndex?: number; + /** + * + * Gets and sets the width of the cell's column in points. This is applicable to uniform tables. + * + * [Api set: WordApi 1.3] + */ + columnWidth?: number; + /** + * + * Gets and sets the horizontal alignment of the cell. The value can be 'left', 'centered', 'right', or 'justified'. + * + * [Api set: WordApi 1.3] + */ + horizontalAlignment?: string; + /** + * + * Gets the index of the cell's row in the table. Read-only. + * + * [Api set: WordApi 1.3] + */ + rowIndex?: number; + /** + * + * Gets or sets the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * + * [Api set: WordApi 1.3] + */ + shadingColor?: string; + /** + * + * Gets and sets the text of the cell. + * + * [Api set: WordApi 1.3] + */ + value?: string; + /** + * + * Gets and sets the vertical alignment of the cell. The value can be 'top', 'center' or 'bottom'. + * + * [Api set: WordApi 1.3] + */ + verticalAlignment?: string; + /** + * + * Gets the width of the cell in points. Read-only. + * + * [Api set: WordApi 1.3] + */ + width?: number; + } + /** An interface describing the data returned by calling "tableCellCollection.toJSON()". */ + interface TableCellCollectionData { + items?: Word.Interfaces.TableCellData[]; + } + /** An interface describing the data returned by calling "tableBorder.toJSON()". */ + interface TableBorderData { + /** + * + * Gets or sets the table border color, as a hex value or name. + * + * [Api set: WordApi 1.3] + */ + color?: string; + /** + * + * Gets or sets the type of the table border. + * + * [Api set: WordApi 1.3] + */ + type?: string; + /** + * + * Gets or sets the width, in points, of the table border. Not applicable to table border types that have fixed widths. + * + * [Api set: WordApi 1.3] + */ + width?: number; + } + /** + * + * Represents the body of a document or a section. + * + * [Api set: WordApi 1.1] + */ + interface BodyLoadOptions { + $all?: boolean; + /** + * + * Gets the text format of the body. Use this to get and set font name, size, color and other properties. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * + * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Throws if there isn't a parent body. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * + * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Returns a null object if there isn't a parent body. + * + * [Api set: WordApi 1.3] + */ + parentBodyOrNullObject?: Word.Interfaces.BodyLoadOptions; + /** + * + * Gets the content control that contains the body. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the content control that contains the body. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the parent section of the body. Throws if there isn't a parent section. + * + * [Api set: WordApi 1.3] + */ + parentSection?: Word.Interfaces.SectionLoadOptions; + /** + * + * Gets the parent section of the body. Returns a null object if there isn't a parent section. + * + * [Api set: WordApi 1.3] + */ + parentSectionOrNullObject?: Word.Interfaces.SectionLoadOptions; + /** + * + * Gets or sets the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * + * Gets or sets the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * + * Gets the text of the body. Use the insertText method to insert text. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: boolean; + /** + * + * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Read-only. + * + * [Api set: WordApi 1.3] + */ + type?: boolean; + } + /** + * + * Represents a content control. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text content controls are supported. + * + * [Api set: WordApi 1.1] + */ + interface ContentControlLoadOptions { + $all?: boolean; + /** + * + * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * + * Gets the parent body of the content control. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * + * Gets the content control that contains the content control. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the content control that contains the content control. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the table that contains the content control. Throws if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * Gets the table cell that contains the content control. Throws if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * + * Gets the table cell that contains the content control. Returns a null object if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * + * Gets the table that contains the content control. Returns a null object if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * + * Gets or sets the appearance of the content control. The value can be 'boundingBox', 'tags' or 'hidden'. + * + * [Api set: WordApi 1.1] + */ + appearance?: boolean; + /** + * + * Gets or sets a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * [Api set: WordApi 1.1] + */ + cannotDelete?: boolean; + /** + * + * Gets or sets a value that indicates whether the user can edit the contents of the content control. + * + * [Api set: WordApi 1.1] + */ + cannotEdit?: boolean; + /** + * + * Gets or sets the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * [Api set: WordApi 1.1] + */ + color?: boolean; + /** + * + * Gets an integer that represents the content control identifier. Read-only. + * + * [Api set: WordApi 1.1] + */ + id?: boolean; + /** + * + * Gets or sets the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. + * + * [Api set: WordApi 1.1] + */ + placeholderText?: boolean; + /** + * + * Gets or sets a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * [Api set: WordApi 1.1] + */ + removeWhenEdited?: boolean; + /** + * + * Gets or sets the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * + * Gets or sets the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * + * Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls. Read-only. + * + * [Api set: WordApi 1.3] + */ + subtype?: boolean; + /** + * + * Gets or sets a tag to identify a content control. + * + * [Api set: WordApi 1.1] + */ + tag?: boolean; + /** + * + * Gets the text of the content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: boolean; + /** + * + * Gets or sets the title for a content control. + * + * [Api set: WordApi 1.1] + */ + title?: boolean; + /** + * + * Gets the content control type. Only rich text content controls are supported currently. Read-only. + * + * [Api set: WordApi 1.1] + */ + type?: boolean; + } /** * - * Mixed styles or other style not in this list. + * Contains a collection of [contentControl](contentControl.md) objects. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text content controls are supported. * + * [Api set: WordApi 1.1] */ - var other: string; + interface ContentControlCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the parent body of the content control. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the content control that contains the content control. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the content control that contains the content control. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table that contains the content control. Throws if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table cell that contains the content control. Throws if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table cell that contains the content control. Returns a null object if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table that contains the content control. Returns a null object if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets or sets the appearance of the content control. The value can be 'boundingBox', 'tags' or 'hidden'. + * + * [Api set: WordApi 1.1] + */ + appearance?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * + * [Api set: WordApi 1.1] + */ + cannotDelete?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets a value that indicates whether the user can edit the contents of the content control. + * + * [Api set: WordApi 1.1] + */ + cannotEdit?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * + * [Api set: WordApi 1.1] + */ + color?: boolean; + /** + * + * For EACH ITEM in the collection: Gets an integer that represents the content control identifier. Read-only. + * + * [Api set: WordApi 1.1] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. + * + * [Api set: WordApi 1.1] + */ + placeholderText?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * + * [Api set: WordApi 1.1] + */ + removeWhenEdited?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls. Read-only. + * + * [Api set: WordApi 1.3] + */ + subtype?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets a tag to identify a content control. + * + * [Api set: WordApi 1.1] + */ + tag?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the text of the content control. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the title for a content control. + * + * [Api set: WordApi 1.1] + */ + title?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the content control type. Only rich text content controls are supported currently. Read-only. + * + * [Api set: WordApi 1.1] + */ + type?: boolean; + } /** * - * Reset character and paragraph style to default. + * Represents a custom property. * + * [Api set: WordApi 1.3] */ - var normal: string; - var heading1: string; - var heading2: string; - var heading3: string; - var heading4: string; - var heading5: string; - var heading6: string; - var heading7: string; - var heading8: string; - var heading9: string; + interface CustomPropertyLoadOptions { + $all?: boolean; + /** + * + * Gets the key of the custom property. Read only. + * + * [Api set: WordApi 1.3] + */ + key?: boolean; + /** + * + * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. Read only. + * + * [Api set: WordApi 1.3] + */ + type?: boolean; + /** + * + * Gets or sets the value of the custom property. Note that even though Word Online and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). + * + * [Api set: WordApi 1.3] + */ + value?: boolean; + } /** * - * Table-of-content level 1. + * Contains the collection of [customProperty](customProperty.md) objects. + * + * [Api set: WordApi 1.3] + */ + interface CustomPropertyCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the key of the custom property. Read only. + * + * [Api set: WordApi 1.3] + */ + key?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. Read only. + * + * [Api set: WordApi 1.3] + */ + type?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the value of the custom property. Note that even though Word Online and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). + * + * [Api set: WordApi 1.3] + */ + value?: boolean; + } + /** + * + * The Document object is the top level object. A Document object contains one or more sections, content controls, and the body that contains the contents of the document. * + * [Api set: WordApi 1.1] */ - var toc1: string; + interface DocumentLoadOptions { + $all?: boolean; + /** + * + * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.. + * + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * + * Gets the properties of the document. + * + * [Api set: WordApi 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesLoadOptions; + /** + * + * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. Read-only. + * + * [Api set: WordApi 1.1] + */ + saved?: boolean; + } /** * - * Table-of-content level 2. + * The DocumentCreated object is the top level object created by Application.CreateDocument. A DocumentCreated object is a special Document object. * + * [Api set: WordApi 1.3] */ - var toc2: string; + interface DocumentCreatedLoadOptions { + $all?: boolean; + /** + * + * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * + * Gets the properties of the document. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + properties?: Word.Interfaces.DocumentPropertiesLoadOptions; + /** + * + * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. Read-only. + * + * [Api set: WordApiHiddenDocument 1.3] + */ + saved?: boolean; + } + /** + * + * Represents document properties. + * + * [Api set: WordApi 1.3] + */ + interface DocumentPropertiesLoadOptions { + $all?: boolean; + /** + * + * Gets the application name of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + applicationName?: boolean; + /** + * + * Gets or sets the author of the document. + * + * [Api set: WordApi 1.3] + */ + author?: boolean; + /** + * + * Gets or sets the category of the document. + * + * [Api set: WordApi 1.3] + */ + category?: boolean; + /** + * + * Gets or sets the comments of the document. + * + * [Api set: WordApi 1.3] + */ + comments?: boolean; + /** + * + * Gets or sets the company of the document. + * + * [Api set: WordApi 1.3] + */ + company?: boolean; + /** + * + * Gets the creation date of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + creationDate?: boolean; + /** + * + * Gets or sets the format of the document. + * + * [Api set: WordApi 1.3] + */ + format?: boolean; + /** + * + * Gets or sets the keywords of the document. + * + * [Api set: WordApi 1.3] + */ + keywords?: boolean; + /** + * + * Gets the last author of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + lastAuthor?: boolean; + /** + * + * Gets the last print date of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + lastPrintDate?: boolean; + /** + * + * Gets the last save time of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + lastSaveTime?: boolean; + /** + * + * Gets or sets the manager of the document. + * + * [Api set: WordApi 1.3] + */ + manager?: boolean; + /** + * + * Gets the revision number of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + revisionNumber?: boolean; + /** + * + * Gets the security of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + security?: boolean; + /** + * + * Gets or sets the subject of the document. + * + * [Api set: WordApi 1.3] + */ + subject?: boolean; + /** + * + * Gets the template of the document. Read only. + * + * [Api set: WordApi 1.3] + */ + template?: boolean; + /** + * + * Gets or sets the title of the document. + * + * [Api set: WordApi 1.3] + */ + title?: boolean; + } /** * - * Table-of-content level 3. + * Represents a font. * + * [Api set: WordApi 1.1] */ - var toc3: string; + interface FontLoadOptions { + $all?: boolean; + /** + * + * Gets or sets a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + bold?: boolean; + /** + * + * Gets or sets the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. + * + * [Api set: WordApi 1.1] + */ + color?: boolean; + /** + * + * Gets or sets a value that indicates whether the font has a double strike through. True if the font is formatted as double strikethrough text, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + doubleStrikeThrough?: boolean; + /** + * + * Gets or sets the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, or an empty string for mixed highlight colors, or null for no highlight color. + * + * [Api set: WordApi 1.1] + */ + highlightColor?: boolean; + /** + * + * Gets or sets a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + italic?: boolean; + /** + * + * Gets or sets a value that represents the name of the font. + * + * [Api set: WordApi 1.1] + */ + name?: boolean; + /** + * + * Gets or sets a value that represents the font size in points. + * + * [Api set: WordApi 1.1] + */ + size?: boolean; + /** + * + * Gets or sets a value that indicates whether the font has a strike through. True if the font is formatted as strikethrough text, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + strikeThrough?: boolean; + /** + * + * Gets or sets a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + subscript?: boolean; + /** + * + * Gets or sets a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. + * + * [Api set: WordApi 1.1] + */ + superscript?: boolean; + /** + * + * Gets or sets a value that indicates the font's underline type. 'None' if the font is not underlined. + * + * [Api set: WordApi 1.1] + */ + underline?: boolean; + } /** * - * Table-of-content level 4. + * Represents an inline picture. * + * [Api set: WordApi 1.1] */ - var toc4: string; + interface InlinePictureLoadOptions { + $all?: boolean; + /** + * + * Gets the parent paragraph that contains the inline image. + * + * [Api set: WordApi 1.2] + */ + paragraph?: Word.Interfaces.ParagraphLoadOptions; + /** + * + * Gets the content control that contains the inline image. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the content control that contains the inline image. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the table that contains the inline image. Throws if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * Gets the table cell that contains the inline image. Throws if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * + * Gets the table cell that contains the inline image. Returns a null object if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * + * Gets the table that contains the inline image. Returns a null object if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * + * Gets or sets a string that represents the alternative text associated with the inline image + * + * [Api set: WordApi 1.1] + */ + altTextDescription?: boolean; + /** + * + * Gets or sets a string that contains the title for the inline image. + * + * [Api set: WordApi 1.1] + */ + altTextTitle?: boolean; + /** + * + * Gets or sets a number that describes the height of the inline image. + * + * [Api set: WordApi 1.1] + */ + height?: boolean; + /** + * + * Gets or sets a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * [Api set: WordApi 1.1] + */ + hyperlink?: boolean; + /** + * + * Gets or sets a value that indicates whether the inline image retains its original proportions when you resize it. + * + * [Api set: WordApi 1.1] + */ + lockAspectRatio?: boolean; + /** + * + * Gets or sets a number that describes the width of the inline image. + * + * [Api set: WordApi 1.1] + */ + width?: boolean; + } /** * - * Table-of-content level 5. + * Contains a collection of [inlinePicture](inlinePicture.md) objects. * + * [Api set: WordApi 1.1] */ - var toc5: string; + interface InlinePictureCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the parent paragraph that contains the inline image. + * + * [Api set: WordApi 1.2] + */ + paragraph?: Word.Interfaces.ParagraphLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the content control that contains the inline image. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the content control that contains the inline image. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table that contains the inline image. Throws if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table cell that contains the inline image. Throws if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table cell that contains the inline image. Returns a null object if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table that contains the inline image. Returns a null object if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets or sets a string that represents the alternative text associated with the inline image + * + * [Api set: WordApi 1.1] + */ + altTextDescription?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets a string that contains the title for the inline image. + * + * [Api set: WordApi 1.1] + */ + altTextTitle?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets a number that describes the height of the inline image. + * + * [Api set: WordApi 1.1] + */ + height?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * + * [Api set: WordApi 1.1] + */ + hyperlink?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets a value that indicates whether the inline image retains its original proportions when you resize it. + * + * [Api set: WordApi 1.1] + */ + lockAspectRatio?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets a number that describes the width of the inline image. + * + * [Api set: WordApi 1.1] + */ + width?: boolean; + } /** * - * Table-of-content level 6. + * Contains a collection of [paragraph](paragraph.md) objects. * + * [Api set: WordApi 1.3] */ - var toc6: string; + interface ListLoadOptions { + $all?: boolean; + /** + * + * Gets the list's id. + * + * [Api set: WordApi 1.3] + */ + id?: boolean; + /** + * + * Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. Read-only. + * + * [Api set: WordApi 1.3] + */ + levelExistences?: boolean; + /** + * + * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number' or 'Picture'. Read-only. + * + * [Api set: WordApi 1.3] + */ + levelTypes?: boolean; + } /** * - * Table-of-content level 7. + * Contains a collection of [list](list.md) objects. * + * [Api set: WordApi 1.3] */ - var toc7: string; + interface ListCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the list's id. + * + * [Api set: WordApi 1.3] + */ + id?: boolean; + /** + * + * For EACH ITEM in the collection: Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. Read-only. + * + * [Api set: WordApi 1.3] + */ + levelExistences?: boolean; + /** + * + * For EACH ITEM in the collection: Gets all 9 level types in the list. Each type can be 'Bullet', 'Number' or 'Picture'. Read-only. + * + * [Api set: WordApi 1.3] + */ + levelTypes?: boolean; + } /** * - * Table-of-content level 8. + * Represents the paragraph list item format. * + * [Api set: WordApi 1.3] */ - var toc8: string; + interface ListItemLoadOptions { + $all?: boolean; + /** + * + * Gets or sets the level of the item in the list. + * + * [Api set: WordApi 1.3] + */ + level?: boolean; + /** + * + * Gets the list item bullet, number or picture as a string. Read-only. + * + * [Api set: WordApi 1.3] + */ + listString?: boolean; + /** + * + * Gets the list item order number in relation to its siblings. Read-only. + * + * [Api set: WordApi 1.3] + */ + siblingIndex?: boolean; + } /** * - * Table-of-content level 9. + * Represents a single paragraph in a selection, range, content control, or document body. * + * [Api set: WordApi 1.1] */ - var toc9: string; - var footnoteText: string; - var header: string; - var footer: string; - var caption: string; - var footnoteReference: string; - var endnoteReference: string; - var endnoteText: string; - var title: string; - var subtitle: string; - var hyperlink: string; - var strong: string; - var emphasis: string; - var noSpacing: string; - var listParagraph: string; - var quote: string; - var intenseQuote: string; - var subtleEmphasis: string; - var intenseEmphasis: string; - var subtleReference: string; - var intenseReference: string; - var bookTitle: string; - var bibliography: string; + interface ParagraphLoadOptions { + $all?: boolean; + /** + * + * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * + * Gets the List to which this paragraph belongs. Throws if the paragraph is not in a list. + * + * [Api set: WordApi 1.3] + */ + list?: Word.Interfaces.ListLoadOptions; + /** + * + * Gets the ListItem for the paragraph. Throws if the paragraph is not part of a list. + * + * [Api set: WordApi 1.3] + */ + listItem?: Word.Interfaces.ListItemLoadOptions; + /** + * + * Gets the ListItem for the paragraph. Returns a null object if the paragraph is not part of a list. + * + * [Api set: WordApi 1.3] + */ + listItemOrNullObject?: Word.Interfaces.ListItemLoadOptions; + /** + * + * Gets the List to which this paragraph belongs. Returns a null object if the paragraph is not in a list. + * + * [Api set: WordApi 1.3] + */ + listOrNullObject?: Word.Interfaces.ListLoadOptions; + /** + * + * Gets the parent body of the paragraph. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * + * Gets the content control that contains the paragraph. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the content control that contains the paragraph. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the table that contains the paragraph. Throws if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * Gets the table cell that contains the paragraph. Throws if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * + * Gets the table cell that contains the paragraph. Returns a null object if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * + * Gets the table that contains the paragraph. Returns a null object if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * + * Gets or sets the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * [Api set: WordApi 1.1] + */ + alignment?: boolean; + /** + * + * Gets or sets the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. + * + * [Api set: WordApi 1.1] + */ + firstLineIndent?: boolean; + /** + * + * Indicates the paragraph is the last one inside its parent body. Read-only. + * + * [Api set: WordApi 1.3] + */ + isLastParagraph?: boolean; + /** + * + * Checks whether the paragraph is a list item. Read-only. + * + * [Api set: WordApi 1.3] + */ + isListItem?: boolean; + /** + * + * Gets or sets the left indent value, in points, for the paragraph. + * + * [Api set: WordApi 1.1] + */ + leftIndent?: boolean; + /** + * + * Gets or sets the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * [Api set: WordApi 1.1] + */ + lineSpacing?: boolean; + /** + * + * Gets or sets the amount of spacing, in grid lines. after the paragraph. + * + * [Api set: WordApi 1.1] + */ + lineUnitAfter?: boolean; + /** + * + * Gets or sets the amount of spacing, in grid lines, before the paragraph. + * + * [Api set: WordApi 1.1] + */ + lineUnitBefore?: boolean; + /** + * + * Gets or sets the outline level for the paragraph. + * + * [Api set: WordApi 1.1] + */ + outlineLevel?: boolean; + /** + * + * Gets or sets the right indent value, in points, for the paragraph. + * + * [Api set: WordApi 1.1] + */ + rightIndent?: boolean; + /** + * + * Gets or sets the spacing, in points, after the paragraph. + * + * [Api set: WordApi 1.1] + */ + spaceAfter?: boolean; + /** + * + * Gets or sets the spacing, in points, before the paragraph. + * + * [Api set: WordApi 1.1] + */ + spaceBefore?: boolean; + /** + * + * Gets or sets the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * + * Gets or sets the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * + * Gets the level of the paragraph's table. It returns 0 if the paragraph is not in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + tableNestingLevel?: boolean; + /** + * + * Gets the text of the paragraph. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: boolean; + } /** * - * Table-of-content heading. + * Contains a collection of [paragraph](paragraph.md) objects. * + * [Api set: WordApi 1.1] */ - var tocHeading: string; - var tableGrid: string; - var plainTable1: string; - var plainTable2: string; - var plainTable3: string; - var plainTable4: string; - var plainTable5: string; - var tableGridLight: string; - var gridTable1Light: string; - var gridTable1Light_Accent1: string; - var gridTable1Light_Accent2: string; - var gridTable1Light_Accent3: string; - var gridTable1Light_Accent4: string; - var gridTable1Light_Accent5: string; - var gridTable1Light_Accent6: string; - var gridTable2: string; - var gridTable2_Accent1: string; - var gridTable2_Accent2: string; - var gridTable2_Accent3: string; - var gridTable2_Accent4: string; - var gridTable2_Accent5: string; - var gridTable2_Accent6: string; - var gridTable3: string; - var gridTable3_Accent1: string; - var gridTable3_Accent2: string; - var gridTable3_Accent3: string; - var gridTable3_Accent4: string; - var gridTable3_Accent5: string; - var gridTable3_Accent6: string; - var gridTable4: string; - var gridTable4_Accent1: string; - var gridTable4_Accent2: string; - var gridTable4_Accent3: string; - var gridTable4_Accent4: string; - var gridTable4_Accent5: string; - var gridTable4_Accent6: string; - var gridTable5Dark: string; - var gridTable5Dark_Accent1: string; - var gridTable5Dark_Accent2: string; - var gridTable5Dark_Accent3: string; - var gridTable5Dark_Accent4: string; - var gridTable5Dark_Accent5: string; - var gridTable5Dark_Accent6: string; - var gridTable6Colorful: string; - var gridTable6Colorful_Accent1: string; - var gridTable6Colorful_Accent2: string; - var gridTable6Colorful_Accent3: string; - var gridTable6Colorful_Accent4: string; - var gridTable6Colorful_Accent5: string; - var gridTable6Colorful_Accent6: string; - var gridTable7Colorful: string; - var gridTable7Colorful_Accent1: string; - var gridTable7Colorful_Accent2: string; - var gridTable7Colorful_Accent3: string; - var gridTable7Colorful_Accent4: string; - var gridTable7Colorful_Accent5: string; - var gridTable7Colorful_Accent6: string; - var listTable1Light: string; - var listTable1Light_Accent1: string; - var listTable1Light_Accent2: string; - var listTable1Light_Accent3: string; - var listTable1Light_Accent4: string; - var listTable1Light_Accent5: string; - var listTable1Light_Accent6: string; - var listTable2: string; - var listTable2_Accent1: string; - var listTable2_Accent2: string; - var listTable2_Accent3: string; - var listTable2_Accent4: string; - var listTable2_Accent5: string; - var listTable2_Accent6: string; - var listTable3: string; - var listTable3_Accent1: string; - var listTable3_Accent2: string; - var listTable3_Accent3: string; - var listTable3_Accent4: string; - var listTable3_Accent5: string; - var listTable3_Accent6: string; - var listTable4: string; - var listTable4_Accent1: string; - var listTable4_Accent2: string; - var listTable4_Accent3: string; - var listTable4_Accent4: string; - var listTable4_Accent5: string; - var listTable4_Accent6: string; - var listTable5Dark: string; - var listTable5Dark_Accent1: string; - var listTable5Dark_Accent2: string; - var listTable5Dark_Accent3: string; - var listTable5Dark_Accent4: string; - var listTable5Dark_Accent5: string; - var listTable5Dark_Accent6: string; - var listTable6Colorful: string; - var listTable6Colorful_Accent1: string; - var listTable6Colorful_Accent2: string; - var listTable6Colorful_Accent3: string; - var listTable6Colorful_Accent4: string; - var listTable6Colorful_Accent5: string; - var listTable6Colorful_Accent6: string; - var listTable7Colorful: string; - var listTable7Colorful_Accent1: string; - var listTable7Colorful_Accent2: string; - var listTable7Colorful_Accent3: string; - var listTable7Colorful_Accent4: string; - var listTable7Colorful_Accent5: string; - var listTable7Colorful_Accent6: string; - } - /** - * [Api set: WordApi] - */ - namespace DocumentPropertyType { - var string: string; - var number: string; - var date: string; - var boolean: string; - } - namespace ErrorCodes { - var accessDenied: string; - var generalException: string; - var invalidArgument: string; - var itemNotFound: string; - var notImplemented: string; - } - module Interfaces { - /** An interface for updating data on the Body object, for use in "body.set({ ... })". */ - interface BodyUpdateData { + interface ParagraphCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.1] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the List to which this paragraph belongs. Throws if the paragraph is not in a list. + * + * [Api set: WordApi 1.3] + */ + list?: Word.Interfaces.ListLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the ListItem for the paragraph. Throws if the paragraph is not part of a list. + * + * [Api set: WordApi 1.3] + */ + listItem?: Word.Interfaces.ListItemLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the ListItem for the paragraph. Returns a null object if the paragraph is not part of a list. + * + * [Api set: WordApi 1.3] + */ + listItemOrNullObject?: Word.Interfaces.ListItemLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the List to which this paragraph belongs. Returns a null object if the paragraph is not in a list. + * + * [Api set: WordApi 1.3] + */ + listOrNullObject?: Word.Interfaces.ListLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the parent body of the paragraph. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the content control that contains the paragraph. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the content control that contains the paragraph. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table that contains the paragraph. Throws if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table cell that contains the paragraph. Throws if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table cell that contains the paragraph. Returns a null object if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table that contains the paragraph. Returns a null object if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets or sets the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * + * [Api set: WordApi 1.1] + */ + alignment?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. + * + * [Api set: WordApi 1.1] + */ + firstLineIndent?: boolean; + /** + * + * For EACH ITEM in the collection: Indicates the paragraph is the last one inside its parent body. Read-only. + * + * [Api set: WordApi 1.3] + */ + isLastParagraph?: boolean; + /** + * + * For EACH ITEM in the collection: Checks whether the paragraph is a list item. Read-only. + * + * [Api set: WordApi 1.3] + */ + isListItem?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the left indent value, in points, for the paragraph. + * + * [Api set: WordApi 1.1] + */ + leftIndent?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * + * [Api set: WordApi 1.1] + */ + lineSpacing?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the amount of spacing, in grid lines. after the paragraph. + * + * [Api set: WordApi 1.1] + */ + lineUnitAfter?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the amount of spacing, in grid lines, before the paragraph. + * + * [Api set: WordApi 1.1] + */ + lineUnitBefore?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the outline level for the paragraph. + * + * [Api set: WordApi 1.1] + */ + outlineLevel?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the right indent value, in points, for the paragraph. + * + * [Api set: WordApi 1.1] + */ + rightIndent?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the spacing, in points, after the paragraph. + * + * [Api set: WordApi 1.1] + */ + spaceAfter?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the spacing, in points, before the paragraph. + * + * [Api set: WordApi 1.1] + */ + spaceBefore?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * + * [Api set: WordApi 1.1] + */ + style?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the level of the paragraph's table. It returns 0 if the paragraph is not in a table. Read-only. + * + * [Api set: WordApi 1.3] + */ + tableNestingLevel?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the text of the paragraph. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: boolean; + } + /** + * + * Represents a contiguous area in a document. + * + * [Api set: WordApi 1.1] + */ + interface RangeLoadOptions { + $all?: boolean; /** * - * Gets the text format of the body. Use this to get and set font name, size, color and other properties. + * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. * * [Api set: WordApi 1.1] */ - font?: Word.Interfaces.FontUpdateData; + font?: Word.Interfaces.FontLoadOptions; + /** + * + * Gets the parent body of the range. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * + * Gets the content control that contains the range. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the content control that contains the range. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * Gets the table that contains the range. Throws if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * Gets the table cell that contains the range. Throws if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * + * Gets the table cell that contains the range. Returns a null object if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * + * Gets the table that contains the range. Returns a null object if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; /** * - * Gets or sets the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. + * + * [Api set: WordApi 1.3] + */ + hyperlink?: boolean; + /** + * + * Checks whether the range length is zero. Read-only. + * + * [Api set: WordApi 1.3] + */ + isEmpty?: boolean; + /** + * + * Gets or sets the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * [Api set: WordApi 1.1] */ - style?: string; + style?: boolean; /** * - * Gets or sets the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * Gets or sets the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. * * [Api set: WordApi 1.3] */ - styleBuiltIn?: string; + styleBuiltIn?: boolean; + /** + * + * Gets the text of the range. Read-only. + * + * [Api set: WordApi 1.1] + */ + text?: boolean; } - /** An interface for updating data on the ContentControl object, for use in "contentControl.set({ ... })". */ - interface ContentControlUpdateData { + /** + * + * Contains a collection of [range](range.md) objects. + * + * [Api set: WordApi 1.1] + */ + interface RangeCollectionLoadOptions { + $all?: boolean; /** * - * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. + * For EACH ITEM in the collection: Gets the text format of the range. Use this to get and set font name, size, color, and other properties. * * [Api set: WordApi 1.1] */ - font?: Word.Interfaces.FontUpdateData; + font?: Word.Interfaces.FontLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the parent body of the range. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the content control that contains the range. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.1] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the content control that contains the range. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table that contains the range. Throws if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table cell that contains the range. Throws if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table cell that contains the range. Returns a null object if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table that contains the range. Returns a null object if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; /** * - * Gets or sets the appearance of the content control. The value can be 'boundingBox', 'tags' or 'hidden'. + * For EACH ITEM in the collection: Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. + * + * [Api set: WordApi 1.3] + */ + hyperlink?: boolean; + /** + * + * For EACH ITEM in the collection: Checks whether the range length is zero. Read-only. + * + * [Api set: WordApi 1.3] + */ + isEmpty?: boolean; + /** + * + * For EACH ITEM in the collection: Gets or sets the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * [Api set: WordApi 1.1] */ - appearance?: string; + style?: boolean; /** * - * Gets or sets a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. + * For EACH ITEM in the collection: Gets or sets the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * + * [Api set: WordApi 1.3] + */ + styleBuiltIn?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the text of the range. Read-only. * * [Api set: WordApi 1.1] */ - cannotDelete?: boolean; + text?: boolean; + } + /** + * + * Specifies the options to be included in a search operation. + * + * [Api set: WordApi 1.1] + */ + interface SearchOptionsLoadOptions { + $all?: boolean; /** * - * Gets or sets a value that indicates whether the user can edit the contents of the content control. + * Gets or sets a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. * * [Api set: WordApi 1.1] */ - cannotEdit?: boolean; + ignorePunct?: boolean; /** * - * Gets or sets the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. + * Gets or sets a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. * * [Api set: WordApi 1.1] */ - color?: string; + ignoreSpace?: boolean; /** * - * Gets or sets the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. + * Gets or sets a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box (Edit menu). * * [Api set: WordApi 1.1] */ - placeholderText?: string; + matchCase?: boolean; /** * - * Gets or sets a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. + * Gets or sets a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. * * [Api set: WordApi 1.1] */ - removeWhenEdited?: boolean; + matchPrefix?: boolean; /** * - * Gets or sets the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * Gets or sets a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. * * [Api set: WordApi 1.1] */ - style?: string; + matchSuffix?: boolean; + /** + * + * Gets or sets a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + matchWholeWord?: boolean; + /** + * + * Gets or sets a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. + * + * [Api set: WordApi 1.1] + */ + matchWildcards?: boolean; + } + /** + * + * Represents a section in a Word document. + * + * [Api set: WordApi 1.1] + */ + interface SectionLoadOptions { + $all?: boolean; + /** + * + * Gets the body object of the section. This does not include the header/footer and other section metadata. + * + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyLoadOptions; + } + /** + * + * Contains the collection of the document's [section](section.md) objects. + * + * [Api set: WordApi 1.1] + */ + interface SectionCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the body object of the section. This does not include the header/footer and other section metadata. + * + * [Api set: WordApi 1.1] + */ + body?: Word.Interfaces.BodyLoadOptions; + } + /** + * + * Represents a table in a Word document. + * + * [Api set: WordApi 1.3] + */ + interface TableLoadOptions { + $all?: boolean; + /** + * + * Gets the font. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontLoadOptions; + /** + * + * Gets the parent body of the table. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; /** - * - * Gets or sets the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: string; + * + * Gets the content control that contains the table. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; /** - * - * Gets or sets a tag to identify a content control. - * - * [Api set: WordApi 1.1] - */ - tag?: string; + * + * Gets the content control that contains the table. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; /** - * - * Gets or sets the title for a content control. - * - * [Api set: WordApi 1.1] - */ - title?: string; - } - /** An interface for updating data on the CustomProperty object, for use in "customProperty.set({ ... })". */ - interface CustomPropertyUpdateData { + * + * Gets the table that contains this table. Throws if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; /** - * - * Gets or sets the value of the custom property. - * - * [Api set: WordApi 1.3] - */ - value?: any; - } - /** An interface for updating data on the Document object, for use in "document.set({ ... })". */ - interface DocumentUpdateData { + * + * Gets the table cell that contains this table. Throws if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; /** * - * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc.. + * Gets the table cell that contains this table. Returns a null object if it is not contained in a table cell. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - body?: Word.Interfaces.BodyUpdateData; + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; /** * - * Gets the properties of the current document. + * Gets the table that contains this table. Returns a null object if it is not contained in a table. * * [Api set: WordApi 1.3] */ - properties?: Word.Interfaces.DocumentPropertiesUpdateData; - } - /** An interface for updating data on the DocumentProperties object, for use in "documentProperties.set({ ... })". */ - interface DocumentPropertiesUpdateData { + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; /** * - * Gets or sets the author of the document. + * Gets or sets the alignment of the table against the page column. The value can be 'left', 'centered' or 'right'. * * [Api set: WordApi 1.3] */ - author?: string; + alignment?: boolean; /** * - * Gets or sets the category of the document. + * Gets and sets the number of header rows. * * [Api set: WordApi 1.3] */ - category?: string; + headerRowCount?: boolean; /** * - * Gets or sets the comments of the document. + * Gets and sets the horizontal alignment of every cell in the table. The value can be 'left', 'centered', 'right', or 'justified'. * * [Api set: WordApi 1.3] */ - comments?: string; + horizontalAlignment?: boolean; /** * - * Gets or sets the company of the document. + * Indicates whether all of the table rows are uniform. Read-only. * * [Api set: WordApi 1.3] */ - company?: string; + isUniform?: boolean; /** * - * Gets or sets the format of the document. + * Gets the nesting level of the table. Top-level tables have level 1. Read-only. * * [Api set: WordApi 1.3] */ - format?: string; + nestingLevel?: boolean; /** * - * Gets or sets the keywords of the document. + * Gets the number of rows in the table. Read-only. * * [Api set: WordApi 1.3] */ - keywords?: string; + rowCount?: boolean; /** * - * Gets or sets the manager of the document. + * Gets and sets the shading color. * * [Api set: WordApi 1.3] */ - manager?: string; + shadingColor?: boolean; /** * - * Gets or sets the subject of the document. + * Gets or sets the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * * [Api set: WordApi 1.3] */ - subject?: string; + style?: boolean; /** * - * Gets or sets the title of the document. + * Gets and sets whether the table has banded columns. * * [Api set: WordApi 1.3] */ - title?: string; - } - /** An interface for updating data on the Font object, for use in "font.set({ ... })". */ - interface FontUpdateData { + styleBandedColumns?: boolean; /** * - * Gets or sets a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. + * Gets and sets whether the table has banded rows. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - bold?: boolean; + styleBandedRows?: boolean; /** * - * Gets or sets the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. + * Gets or sets the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - color?: string; + styleBuiltIn?: boolean; /** * - * Gets or sets a value that indicates whether the font has a double strike through. True if the font is formatted as double strikethrough text, otherwise, false. + * Gets and sets whether the table has a first column with a special style. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - doubleStrikeThrough?: boolean; + styleFirstColumn?: boolean; /** * - * Gets or sets the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, or an empty string for mixed highlight colors, or null for no highlight color. + * Gets and sets whether the table has a last column with a special style. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - highlightColor?: string; + styleLastColumn?: boolean; /** * - * Gets or sets a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. + * Gets and sets whether the table has a total (last) row with a special style. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - italic?: boolean; + styleTotalRow?: boolean; /** * - * Gets or sets a value that represents the name of the font. + * Gets and sets the text values in the table, as a 2D Javascript array. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - name?: string; + values?: boolean; /** * - * Gets or sets a value that represents the font size in points. + * Gets and sets the vertical alignment of every cell in the table. The value can be 'top', 'center' or 'bottom'. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - size?: number; + verticalAlignment?: boolean; /** * - * Gets or sets a value that indicates whether the font has a strike through. True if the font is formatted as strikethrough text, otherwise, false. + * Gets and sets the width of the table in points. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - strikeThrough?: boolean; + width?: boolean; + } + /** + * + * Contains the collection of the document's Table objects. + * + * [Api set: WordApi 1.3] + */ + interface TableCollectionLoadOptions { + $all?: boolean; /** - * - * Gets or sets a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. - * - * [Api set: WordApi 1.1] - */ - subscript?: boolean; + * + * For EACH ITEM in the collection: Gets the font. Use this to get and set font name, size, color, and other properties. + * + * [Api set: WordApi 1.3] + */ + font?: Word.Interfaces.FontLoadOptions; /** - * - * Gets or sets a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. - * - * [Api set: WordApi 1.1] - */ - superscript?: boolean; + * + * For EACH ITEM in the collection: Gets the parent body of the table. + * + * [Api set: WordApi 1.3] + */ + parentBody?: Word.Interfaces.BodyLoadOptions; /** - * - * Gets or sets a value that indicates the font's underline type. 'None' if the font is not underlined. - * - * [Api set: WordApi 1.1] - */ - underline?: string; - } - /** An interface for updating data on the InlinePicture object, for use in "inlinePicture.set({ ... })". */ - interface InlinePictureUpdateData { + * + * For EACH ITEM in the collection: Gets the content control that contains the table. Throws if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControl?: Word.Interfaces.ContentControlLoadOptions; /** - * - * Gets or sets a string that represents the alternative text associated with the inline image - * - * [Api set: WordApi 1.1] - */ - altTextDescription?: string; + * + * For EACH ITEM in the collection: Gets the content control that contains the table. Returns a null object if there isn't a parent content control. + * + * [Api set: WordApi 1.3] + */ + parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; /** - * - * Gets or sets a string that contains the title for the inline image. - * - * [Api set: WordApi 1.1] - */ - altTextTitle?: string; + * + * For EACH ITEM in the collection: Gets the table that contains this table. Throws if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table cell that contains this table. Throws if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCell?: Word.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table cell that contains this table. Returns a null object if it is not contained in a table cell. + * + * [Api set: WordApi 1.3] + */ + parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the table that contains this table. Returns a null object if it is not contained in a table. + * + * [Api set: WordApi 1.3] + */ + parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; /** * - * Gets or sets a number that describes the height of the inline image. + * For EACH ITEM in the collection: Gets or sets the alignment of the table against the page column. The value can be 'left', 'centered' or 'right'. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - height?: number; + alignment?: boolean; /** * - * Gets or sets a hyperlink on the image. Use a '#' to separate the address part from the optional location part. + * For EACH ITEM in the collection: Gets and sets the number of header rows. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - hyperlink?: string; + headerRowCount?: boolean; /** * - * Gets or sets a value that indicates whether the inline image retains its original proportions when you resize it. + * For EACH ITEM in the collection: Gets and sets the horizontal alignment of every cell in the table. The value can be 'left', 'centered', 'right', or 'justified'. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - lockAspectRatio?: boolean; + horizontalAlignment?: boolean; /** * - * Gets or sets a number that describes the width of the inline image. + * For EACH ITEM in the collection: Indicates whether all of the table rows are uniform. Read-only. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - width?: number; - } - /** An interface for updating data on the ListItem object, for use in "listItem.set({ ... })". */ - interface ListItemUpdateData { + isUniform?: boolean; /** * - * Gets or sets the level of the item in the list. + * For EACH ITEM in the collection: Gets the nesting level of the table. Top-level tables have level 1. Read-only. * * [Api set: WordApi 1.3] */ - level?: number; - } - /** An interface for updating data on the Paragraph object, for use in "paragraph.set({ ... })". */ - interface ParagraphUpdateData { - /** - * - * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. - * - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontUpdateData; - /** - * - * Gets the ListItem for the paragraph. Throws if the paragraph is not part of a list. - * - * [Api set: WordApi 1.3] - */ - listItem?: Word.Interfaces.ListItemUpdateData; - /** - * - * Gets the ListItem for the paragraph. Returns a null object if the paragraph is not part of a list. - * - * [Api set: WordApi 1.3] - */ - listItemOrNullObject?: Word.Interfaces.ListItemUpdateData; + nestingLevel?: boolean; /** * - * Gets or sets the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. + * For EACH ITEM in the collection: Gets the number of rows in the table. Read-only. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - alignment?: string; + rowCount?: boolean; /** * - * Gets or sets the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. + * For EACH ITEM in the collection: Gets and sets the shading color. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - firstLineIndent?: number; + shadingColor?: boolean; /** * - * Gets or sets the left indent value, in points, for the paragraph. + * For EACH ITEM in the collection: Gets or sets the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - leftIndent?: number; + style?: boolean; /** * - * Gets or sets the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. + * For EACH ITEM in the collection: Gets and sets whether the table has banded columns. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - lineSpacing?: number; + styleBandedColumns?: boolean; /** * - * Gets or sets the amount of spacing, in grid lines. after the paragraph. + * For EACH ITEM in the collection: Gets and sets whether the table has banded rows. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - lineUnitAfter?: number; + styleBandedRows?: boolean; /** * - * Gets or sets the amount of spacing, in grid lines, before the paragraph. + * For EACH ITEM in the collection: Gets or sets the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - lineUnitBefore?: number; + styleBuiltIn?: boolean; /** * - * Gets or sets the outline level for the paragraph. + * For EACH ITEM in the collection: Gets and sets whether the table has a first column with a special style. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - outlineLevel?: number; + styleFirstColumn?: boolean; /** * - * Gets or sets the right indent value, in points, for the paragraph. + * For EACH ITEM in the collection: Gets and sets whether the table has a last column with a special style. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - rightIndent?: number; + styleLastColumn?: boolean; /** * - * Gets or sets the spacing, in points, after the paragraph. + * For EACH ITEM in the collection: Gets and sets whether the table has a total (last) row with a special style. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - spaceAfter?: number; + styleTotalRow?: boolean; /** * - * Gets or sets the spacing, in points, before the paragraph. + * For EACH ITEM in the collection: Gets and sets the text values in the table, as a 2D Javascript array. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - spaceBefore?: number; + values?: boolean; /** * - * Gets or sets the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * For EACH ITEM in the collection: Gets and sets the vertical alignment of every cell in the table. The value can be 'top', 'center' or 'bottom'. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - style?: string; + verticalAlignment?: boolean; /** * - * Gets or sets the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * For EACH ITEM in the collection: Gets and sets the width of the table in points. * * [Api set: WordApi 1.3] */ - styleBuiltIn?: string; + width?: boolean; } - /** An interface for updating data on the Range object, for use in "range.set({ ... })". */ - interface RangeUpdateData { + /** + * + * Represents a row in a Word document. + * + * [Api set: WordApi 1.3] + */ + interface TableRowLoadOptions { + $all?: boolean; /** * - * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. + * Gets the font. Use this to get and set font name, size, color, and other properties. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - font?: Word.Interfaces.FontUpdateData; - /** - * - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. - * - * [Api set: WordApi 1.3] - */ - hyperlink?: string; + font?: Word.Interfaces.FontLoadOptions; /** - * - * Gets or sets the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * [Api set: WordApi 1.1] - */ - style?: string; + * + * Gets parent table. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; /** * - * Gets or sets the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * Gets the number of cells in the row. Read-only. * * [Api set: WordApi 1.3] */ - styleBuiltIn?: string; - } - /** An interface for updating data on the SearchOptions object, for use in "searchOptions.set({ ... })". */ - interface SearchOptionsUpdateData { + cellCount?: boolean; /** * - * Gets or sets a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. + * Gets and sets the horizontal alignment of every cell in the row. The value can be 'left', 'centered', 'right', or 'justified'. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - ignorePunct?: boolean; + horizontalAlignment?: boolean; /** * - * Gets or sets a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. + * Checks whether the row is a header row. Read-only. To set the number of header rows, use HeaderRowCount on the Table object. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - ignoreSpace?: boolean; + isHeader?: boolean; /** * - * Gets or sets a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box (Edit menu). + * Gets and sets the preferred height of the row in points. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - matchCase?: boolean; + preferredHeight?: boolean; /** * - * Gets or sets a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. + * Gets the index of the row in its parent table. Read-only. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - matchPrefix?: boolean; + rowIndex?: boolean; /** * - * Gets or sets a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. + * Gets and sets the shading color. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - matchSuffix?: boolean; + shadingColor?: boolean; /** * - * Gets or sets a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. + * Gets and sets the text values in the row, as a 2D Javascript array. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - matchWholeWord?: boolean; + values?: boolean; /** * - * Gets or sets a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. + * Gets and sets the vertical alignment of the cells in the row. The value can be 'top', 'center' or 'bottom'. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - matchWildcards?: boolean; + verticalAlignment?: boolean; } - /** An interface for updating data on the Section object, for use in "section.set({ ... })". */ - interface SectionUpdateData { + /** + * + * Contains the collection of the document's TableRow objects. + * + * [Api set: WordApi 1.3] + */ + interface TableRowCollectionLoadOptions { + $all?: boolean; /** * - * Gets the body object of the section. This does not include the header/footer and other section metadata. + * For EACH ITEM in the collection: Gets the font. Use this to get and set font name, size, color, and other properties. * - * [Api set: WordApi 1.1] + * [Api set: WordApi 1.3] */ - body?: Word.Interfaces.BodyUpdateData; - } - /** An interface for updating data on the Table object, for use in "table.set({ ... })". */ - interface TableUpdateData { + font?: Word.Interfaces.FontLoadOptions; /** * - * Gets the font. Use this to get and set font name, size, color, and other properties. + * For EACH ITEM in the collection: Gets parent table. * * [Api set: WordApi 1.3] */ - font?: Word.Interfaces.FontUpdateData; + parentTable?: Word.Interfaces.TableLoadOptions; /** * - * Gets or sets the alignment of the table against the page column. The value can be 'left', 'centered' or 'right'. + * For EACH ITEM in the collection: Gets the number of cells in the row. Read-only. * * [Api set: WordApi 1.3] */ - alignment?: string; + cellCount?: boolean; /** * - * Gets and sets the number of header rows. + * For EACH ITEM in the collection: Gets and sets the horizontal alignment of every cell in the row. The value can be 'left', 'centered', 'right', or 'justified'. * * [Api set: WordApi 1.3] */ - headerRowCount?: number; + horizontalAlignment?: boolean; /** * - * Gets and sets the horizontal alignment of every cell in the table. The value can be 'left', 'centered', 'right', or 'justified'. + * For EACH ITEM in the collection: Checks whether the row is a header row. Read-only. To set the number of header rows, use HeaderRowCount on the Table object. * * [Api set: WordApi 1.3] */ - horizontalAlignment?: string; + isHeader?: boolean; /** * - * Gets and sets the shading color. + * For EACH ITEM in the collection: Gets and sets the preferred height of the row in points. * * [Api set: WordApi 1.3] */ - shadingColor?: string; + preferredHeight?: boolean; /** * - * Gets or sets the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. + * For EACH ITEM in the collection: Gets the index of the row in its parent table. Read-only. * * [Api set: WordApi 1.3] */ - style?: string; + rowIndex?: boolean; /** * - * Gets and sets whether the table has banded columns. + * For EACH ITEM in the collection: Gets and sets the shading color. * * [Api set: WordApi 1.3] */ - styleBandedColumns?: boolean; + shadingColor?: boolean; /** * - * Gets and sets whether the table has banded rows. + * For EACH ITEM in the collection: Gets and sets the text values in the row, as a 2D Javascript array. * * [Api set: WordApi 1.3] */ - styleBandedRows?: boolean; + values?: boolean; /** * - * Gets or sets the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. + * For EACH ITEM in the collection: Gets and sets the vertical alignment of the cells in the row. The value can be 'top', 'center' or 'bottom'. * * [Api set: WordApi 1.3] */ - styleBuiltIn?: string; + verticalAlignment?: boolean; + } + /** + * + * Represents a table cell in a Word document. + * + * [Api set: WordApi 1.3] + */ + interface TableCellLoadOptions { + $all?: boolean; + /** + * + * Gets the body object of the cell. + * + * [Api set: WordApi 1.3] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * + * Gets the parent row of the cell. + * + * [Api set: WordApi 1.3] + */ + parentRow?: Word.Interfaces.TableRowLoadOptions; + /** + * + * Gets the parent table of the cell. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; /** * - * Gets and sets whether the table has a first column with a special style. + * Gets the index of the cell in its row. Read-only. * * [Api set: WordApi 1.3] */ - styleFirstColumn?: boolean; + cellIndex?: boolean; /** * - * Gets and sets whether the table has a last column with a special style. + * Gets and sets the width of the cell's column in points. This is applicable to uniform tables. * * [Api set: WordApi 1.3] */ - styleLastColumn?: boolean; + columnWidth?: boolean; /** * - * Gets and sets whether the table has a total (last) row with a special style. + * Gets and sets the horizontal alignment of the cell. The value can be 'left', 'centered', 'right', or 'justified'. * * [Api set: WordApi 1.3] */ - styleTotalRow?: boolean; + horizontalAlignment?: boolean; /** * - * Gets and sets the text values in the table, as a 2D Javascript array. + * Gets the index of the cell's row in the table. Read-only. * * [Api set: WordApi 1.3] */ - values?: Array>; + rowIndex?: boolean; /** * - * Gets and sets the vertical alignment of every cell in the table. The value can be 'top', 'center' or 'bottom'. + * Gets or sets the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. * * [Api set: WordApi 1.3] */ - verticalAlignment?: string; + shadingColor?: boolean; /** * - * Gets and sets the width of the table in points. + * Gets and sets the text of the cell. * * [Api set: WordApi 1.3] */ - width?: number; - } - /** An interface for updating data on the TableRow object, for use in "tableRow.set({ ... })". */ - interface TableRowUpdateData { - /** - * - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontUpdateData; + value?: boolean; /** * - * Gets and sets the horizontal alignment of every cell in the row. The value can be 'left', 'centered', 'right', or 'justified'. + * Gets and sets the vertical alignment of the cell. The value can be 'top', 'center' or 'bottom'. * * [Api set: WordApi 1.3] */ - horizontalAlignment?: string; + verticalAlignment?: boolean; /** * - * Gets and sets the preferred height of the row in points. + * Gets the width of the cell in points. Read-only. * * [Api set: WordApi 1.3] */ - preferredHeight?: number; + width?: boolean; + } + /** + * + * Contains the collection of the document's TableCell objects. + * + * [Api set: WordApi 1.3] + */ + interface TableCellCollectionLoadOptions { + $all?: boolean; + /** + * + * For EACH ITEM in the collection: Gets the body object of the cell. + * + * [Api set: WordApi 1.3] + */ + body?: Word.Interfaces.BodyLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the parent row of the cell. + * + * [Api set: WordApi 1.3] + */ + parentRow?: Word.Interfaces.TableRowLoadOptions; + /** + * + * For EACH ITEM in the collection: Gets the parent table of the cell. + * + * [Api set: WordApi 1.3] + */ + parentTable?: Word.Interfaces.TableLoadOptions; /** * - * Gets and sets the shading color. + * For EACH ITEM in the collection: Gets the index of the cell in its row. Read-only. * * [Api set: WordApi 1.3] */ - shadingColor?: string; + cellIndex?: boolean; /** * - * Gets and sets the text values in the row, as a 2D Javascript array. + * For EACH ITEM in the collection: Gets and sets the width of the cell's column in points. This is applicable to uniform tables. * * [Api set: WordApi 1.3] */ - values?: Array>; + columnWidth?: boolean; /** * - * Gets and sets the vertical alignment of the cells in the row. The value can be 'top', 'center' or 'bottom'. + * For EACH ITEM in the collection: Gets and sets the horizontal alignment of the cell. The value can be 'left', 'centered', 'right', or 'justified'. * * [Api set: WordApi 1.3] */ - verticalAlignment?: string; - } - /** An interface for updating data on the TableCell object, for use in "tableCell.set({ ... })". */ - interface TableCellUpdateData { - /** - * - * Gets the body object of the cell. - * - * [Api set: WordApi 1.3] - */ - body?: Word.Interfaces.BodyUpdateData; + horizontalAlignment?: boolean; /** * - * Gets and sets the width of the cell's column in points. This is applicable to uniform tables. + * For EACH ITEM in the collection: Gets the index of the cell's row in the table. Read-only. * * [Api set: WordApi 1.3] */ - columnWidth?: number; + rowIndex?: boolean; /** * - * Gets and sets the horizontal alignment of the cell. The value can be 'left', 'centered', 'right', or 'justified'. + * For EACH ITEM in the collection: Gets or sets the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. * * [Api set: WordApi 1.3] */ - horizontalAlignment?: string; + shadingColor?: boolean; /** * - * Gets or sets the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. + * For EACH ITEM in the collection: Gets and sets the text of the cell. * * [Api set: WordApi 1.3] */ - shadingColor?: string; + value?: boolean; /** * - * Gets and sets the text of the cell. + * For EACH ITEM in the collection: Gets and sets the vertical alignment of the cell. The value can be 'top', 'center' or 'bottom'. * * [Api set: WordApi 1.3] */ - value?: string; + verticalAlignment?: boolean; /** * - * Gets and sets the vertical alignment of the cell. The value can be 'top', 'center' or 'bottom'. + * For EACH ITEM in the collection: Gets the width of the cell in points. Read-only. * * [Api set: WordApi 1.3] */ - verticalAlignment?: string; + width?: boolean; } - /** An interface for updating data on the TableBorder object, for use in "tableBorder.set({ ... })". */ - interface TableBorderUpdateData { + /** + * + * Specifies the border style + * + * [Api set: WordApi 1.3] + */ + interface TableBorderLoadOptions { + $all?: boolean; /** * * Gets or sets the table border color, as a hex value or name. * * [Api set: WordApi 1.3] */ - color?: string; + color?: boolean; /** * * Gets or sets the type of the table border. * * [Api set: WordApi 1.3] */ - type?: string; + type?: boolean; /** * * Gets or sets the width, in points, of the table border. Not applicable to table border types that have fixed widths. * * [Api set: WordApi 1.3] */ - width?: number; + width?: boolean; } } } @@ -19668,9 +29667,9 @@ declare module Word { /** * The RequestContext object facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the request context is required to get access to the Word object model from the add-in. */ - class RequestContext extends OfficeExtension.ClientRequestContext { + class RequestContext extends OfficeCore.RequestContext { constructor(url?: string); - document: Document; + readonly document: Document; } /** * Executes a batch script that performs actions on the Word object model, using a new RequestContext. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. @@ -21886,4 +31885,4 @@ declare namespace OneNote { //////////////////////////////////////////////////////////////// /////////////////////// End OneNote APIs /////////////////////// -//////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/office.debug.js b/node_modules/@microsoft/office-js/dist/office.debug.js index 8e5c702..5bdcfc6 100644 --- a/node_modules/@microsoft/office-js/dist/office.debug.js +++ b/node_modules/@microsoft/office-js/dist/office.debug.js @@ -1,5 +1,5 @@ /* Office JavaScript API library */ -/* Version: 16.0.8119.1000 */ +/* Version: 16.0.8828.1000 */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ @@ -60,6 +60,7 @@ OSF.HostSpecificFileVersionMap = { OSF.SupportedLocales = { "ar-sa": true, "bg-bg": true, + "bn-in": true, "ca-es": true, "cs-cz": true, "da-dk": true, @@ -69,6 +70,7 @@ OSF.SupportedLocales = { "es-es": true, "et-ee": true, "eu-es": true, + "fa-ir": true, "fi-fi": true, "fr-fr": true, "gl-es": true, @@ -86,6 +88,7 @@ OSF.SupportedLocales = { "ms-my": true, "nb-no": true, "nl-nl": true, + "nn-no": true, "pl-pl": true, "pt-br": true, "pt-pt": true, @@ -101,6 +104,7 @@ OSF.SupportedLocales = { "th-th": true, "tr-tr": true, "uk-ua": true, + "ur-pk": true, "vi-vn": true, "zh-cn": true, "zh-tw": true @@ -108,6 +112,7 @@ OSF.SupportedLocales = { OSF.AssociatedLocales = { ar: "ar-sa", bg: "bg-bg", + bn: "bn-in", ca: "ca-es", cs: "cs-cz", da: "da-dk", @@ -117,6 +122,7 @@ OSF.AssociatedLocales = { es: "es-es", et: "et-ee", eu: "eu-es", + fa: "fa-ir", fi: "fi-fi", fr: "fr-fr", gl: "gl-es", @@ -134,6 +140,7 @@ OSF.AssociatedLocales = { ms: "ms-my", nb: "nb-no", nl: "nl-nl", + nn: "nn-no", pl: "pl-pl", pt: "pt-br", ro: "ro-ro", @@ -145,6 +152,7 @@ OSF.AssociatedLocales = { th: "th-th", tr: "tr-tr", uk: "uk-ua", + ur: "ur-pk", vi: "vi-vn", zh: "zh-cn" }; @@ -371,6 +379,9 @@ var ScriptLoading; self.flushTelemetryBuffer(); }; var onLoadCallback = function OSF_OUtil_loadScript$onLoadCallback() { + if (OSF._OfficeAppFactory.getHostInfo().hostType == "onenote" && (typeof OSF.AppTelemetry !== 'undefined') && (typeof OSF.AppTelemetry.enableTelemetry !== 'undefined')) { + OSF.AppTelemetry.enableTelemetry = false; + } logTelemetry(true); loadedScriptEntry.isReady = true; if (loadedScriptEntry.timer != null) { @@ -458,7 +469,7 @@ var ScriptLoading; ScriptLoading.LoadScriptHelper = LoadScriptHelper; })(ScriptLoading || (ScriptLoading = {})); OSF.ConstantNames = { - FileVersion: "16.0.8119.1000", + FileVersion: "16.0.8828.1000", OfficeJS: "office.js", OfficeDebugJS: "office.debug.js", DefaultLocale: "en-us", @@ -565,6 +576,12 @@ OSF._OfficeAppFactory = (function OSF__OfficeAppFactory() { } if (!hostInfoValue) { try { + window.external = window.external || {}; + if (typeof agaveHost !== "undefined" && agaveHost.GetHostInfo) { + window.external.GetHostInfo = function () { + return agaveHost.GetHostInfo(); + }; + } var fallbackHostInfo = window.external.GetHostInfo(); if (fallbackHostInfo == "isDialog") { _hostInfo.isO15 = true; @@ -803,8 +820,11 @@ OSF._OfficeAppFactory = (function OSF__OfficeAppFactory() { throw 'Function window.prompt is not supported.'; return null; }; - window.history.replaceState = null; - window.history.pushState = null; + var isOutlookAndroid = _hostInfo.hostType == "outlook" && _hostInfo.hostPlatform == "android"; + if (!isOutlookAndroid) { + window.history.replaceState = null; + window.history.pushState = null; + } }; initialize(); return { diff --git a/node_modules/@microsoft/office-js/dist/office.js b/node_modules/@microsoft/office-js/dist/office.js index 719fcec..4c8a1ea 100644 --- a/node_modules/@microsoft/office-js/dist/office.js +++ b/node_modules/@microsoft/office-js/dist/office.js @@ -1,5 +1,5 @@ /* Office JavaScript API library */ -/* Version: 16.0.8119.1000 */ +/* Version: 16.0.8828.1000 */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ @@ -9,4 +9,4 @@ Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419. */ -var OSF=OSF||{};OSF.HostSpecificFileVersionDefault="16.00";OSF.HostSpecificFileVersionMap={access:{web:"16.00"},agavito:{winrt:"16.00"},excel:{ios:"16.00",mac:"16.00",web:"16.00",win32:"16.01",winrt:"16.00"},onenote:{web:"16.00",win32:"16.00",winrt:"16.00"},outlook:{ios:"16.00",mac:"16.00",web:"16.01",win32:"16.02"},powerpoint:{ios:"16.00",mac:"16.00",web:"16.00",win32:"16.01",winrt:"16.00"},project:{win32:"16.00"},sway:{web:"16.00"},word:{ios:"16.00",mac:"16.00",web:"16.00",win32:"16.01",winrt:"16.00"}};OSF.SupportedLocales={"ar-sa":true,"bg-bg":true,"ca-es":true,"cs-cz":true,"da-dk":true,"de-de":true,"el-gr":true,"en-us":true,"es-es":true,"et-ee":true,"eu-es":true,"fi-fi":true,"fr-fr":true,"gl-es":true,"he-il":true,"hi-in":true,"hr-hr":true,"hu-hu":true,"id-id":true,"it-it":true,"ja-jp":true,"kk-kz":true,"ko-kr":true,"lt-lt":true,"lv-lv":true,"ms-my":true,"nb-no":true,"nl-nl":true,"pl-pl":true,"pt-br":true,"pt-pt":true,"ro-ro":true,"ru-ru":true,"sk-sk":true,"sl-si":true,"sr-cyrl-cs":true,"sr-cyrl-rs":true,"sr-latn-cs":true,"sr-latn-rs":true,"sv-se":true,"th-th":true,"tr-tr":true,"uk-ua":true,"vi-vn":true,"zh-cn":true,"zh-tw":true};OSF.AssociatedLocales={ar:"ar-sa",bg:"bg-bg",ca:"ca-es",cs:"cs-cz",da:"da-dk",de:"de-de",el:"el-gr",en:"en-us",es:"es-es",et:"et-ee",eu:"eu-es",fi:"fi-fi",fr:"fr-fr",gl:"gl-es",he:"he-il",hi:"hi-in",hr:"hr-hr",hu:"hu-hu",id:"id-id",it:"it-it",ja:"ja-jp",kk:"kk-kz",ko:"ko-kr",lt:"lt-lt",lv:"lv-lv",ms:"ms-my",nb:"nb-no",nl:"nl-nl",pl:"pl-pl",pt:"pt-br",ro:"ro-ro",ru:"ru-ru",sk:"sk-sk",sl:"sl-si",sr:"sr-cyrl-cs",sv:"sv-se",th:"th-th",tr:"tr-tr",uk:"uk-ua",vi:"vi-vn",zh:"zh-cn"};OSF.getSupportedLocale=function(a,c){if(c===void 0)c="en-us";if(!a)return c;var b;a=a.toLowerCase();if(a in OSF.SupportedLocales)b=a;else{var d=a.split("-",1);if(d&&d.length>0)b=OSF.AssociatedLocales[d[0]]}if(!b)b=c;return b};var ScriptLoading;(function(e){var a=false,b=function(){function b(g,e,d,f,c){var b=this;b.url=g;b.isReady=e;b.hasStarted=d;b.timer=f;b.hasError=a;b.pendingCallbacks=[];b.pendingCallbacks.push(c)}return b}(),d=function(){function a(c,b,a){this.scriptId=c;this.startTime=b;this.msResponseTime=a}return a}(),c=function(){var c=true,e=null;function f(){var a=this;a.defaultScriptLoadingTimeout=1e4;a.loadedScriptByIds={};a.scriptTelemetryBuffer=[];a.osfControlAppCorrelationId="";a.basePath=e;a.constantNames={OfficeJS:"office.js",OfficeDebugJS:"office.debug.js"}}f.prototype.isScriptLoading=function(a){return !!(this.loadedScriptByIds[a]&&this.loadedScriptByIds[a].hasStarted)};f.prototype.getOfficeJsBasePath=function(){var a=this;if(a.basePath)return a.basePath;else{for(var g=function(b,c){var d,a,e;e=b.toLowerCase();a=e.indexOf(c);if(a>=0&&a===b.length-c.length&&(a===0||b.charAt(a-1)==="/"||b.charAt(a-1)==="\\"))d=b.substring(0,a);else if(a>=0&&a0){f=window.setTimeout(d,i);b--}else{window.clearTimeout(f);e(a)}};d()};f.prototype.waitForScripts=function(b,e){var f=this;if(this.invokeCallbackIfScriptsReady(b,e)==a)for(var c=0;c1){var e=b[1],f=new RegExp("[&#]","g"),a=e.split(f);if(a.length>0)c=a[0]}}return c},v=function(f,g){var b=f.split("."),e=g.split("."),a;for(a in b)if(parseInt(b[a])parseInt(e[a]))return d;return c},t=function(){var b="15.30.1128.0",a=window.external.GetContext().GetHostFullVersion();return !!v(b,a)},u=function(){var i="hostInfoValue",n="isDialog",q=j,h=l(q);if(!h)try{var s=JSON.parse(p);h=s?s["hostInfo"]:e}catch(u){}if(!h)try{var m=window.external.GetHostInfo();if(m==n){a.isO15=d;a.isDialog=d}else if(m.toLowerCase().indexOf("mac")!==-1&&m.toLowerCase().indexOf("outlook")!==-1&&t())a.isO15=d;else{var r=m.split(q+"=");if(r.length>1)h=r[1];else h=m}}catch(u){}var w=function(){var a=e;try{if(window.sessionStorage)a=window.sessionStorage}catch(b){}return a},k=w();if(!h&&k&&k.getItem(i))h=k.getItem(i);if(h){h=decodeURIComponent(h);a.isO15=c;var g=h.split("$");if(typeof g[2]==b)g=h.split("|");a.hostType=typeof g[0]==b?f:g[0].toLowerCase();a.hostPlatform=typeof g[1]==b?f:g[1].toLowerCase();a.hostSpecificFileVersion=typeof g[2]==b?f:g[2].toLowerCase();a.hostLocale=typeof g[3]==b?f:g[3].toLowerCase();a.osfControlAppCorrelationId=typeof g[4]==b?f:g[4];if(a.osfControlAppCorrelationId=="telemetry")a.osfControlAppCorrelationId=f;a.isDialog=typeof g[5]!=b&&g[5]==n?d:c;var v=parseFloat(a.hostSpecificFileVersion),o=OSF.HostSpecificFileVersionDefault;if(OSF.HostSpecificFileVersionMap[a.hostType]&&OSF.HostSpecificFileVersionMap[a.hostType][a.hostPlatform])o=OSF.HostSpecificFileVersionMap[a.hostType][a.hostPlatform];if(v>parseFloat(o))a.hostSpecificFileVersion=o;if(k)try{k.setItem(i,h)}catch(x){}}else{a.isO15=d;a.hostLocale=l("locale")}},s=function(b,a){OSF.AppTelemetry&&OSF.AppTelemetry.logAppCommonMessage&&OSF.AppTelemetry.logAppCommonMessage("getAppContextAsync starts");h.getAppContext(b,a)},w=function(){u();if(a.hostPlatform=="web"&&a.isDialog&&window==window.top&&window.opener==e){window.open(f,"_self",f);window.close()}g.setAppCorrelationId(a.osfControlAppCorrelationId);var k=g.getOfficeJsBasePath(),y=c;if(!k)throw"Office Web Extension script library file name should be "+OSF.ConstantNames.OfficeJS+" or "+OSF.ConstantNames.OfficeDebugJS+".";var p=function(){var a="function";if(typeof Sys!==b&&typeof Type!==b&&Sys.StringBuilder&&typeof Sys.StringBuilder===a&&Type.registerNamespace&&typeof Type.registerNamespace===a&&Type.registerClass&&typeof Type.registerClass===a||typeof OfficeExt!==b&&OfficeExt.MsAjaxError)return d;else return c},q=e,v=function(f){var a=c,e=function(){if(typeof Strings==b||typeof Strings.OfficeOM==b)if(!a){a=d;var h=k+OSF.ConstantNames.DefaultLocale+"/"+OSF.ConstantNames.OfficeStringJS;g.loadScript(h,OSF.ConstantNames.OfficeStringsId,e,d,OSF.ConstantNames.LocaleStringLoadingTimeout);return c}else throw"Neither the locale, "+f.toLowerCase()+", provided by the host app nor the fallback locale "+OSF.ConstantNames.DefaultLocale+" are supported.";else{a=c;q=Strings.OfficeOM}};if(!p()){window.Type=Function;Type.registerNamespace=function(a){window[a]=window[a]||{}};Type.prototype.registerClass=function(a){a={}}}var h=k+OSF.getSupportedLocale(f,OSF.ConstantNames.DefaultLocale)+"/"+OSF.ConstantNames.OfficeStringJS;g.loadScript(h,OSF.ConstantNames.OfficeStringsId,e,d,OSF.ConstantNames.LocaleStringLoadingTimeout)},r=function(c){if(c){h=new OSF.InitializationHelper(a,i,n,x,m);a.hostPlatform=="web"&&h.saveAndSetDialogInfo&&h.saveAndSetDialogInfo(l(j));h.setAgaveHostCommunication();s(i.wnd,function(b){OSF.AppTelemetry&&OSF.AppTelemetry.logAppCommonMessage&&OSF.AppTelemetry.logAppCommonMessage("getAppContextAsync callback start");o=b._appInstanceId;var c=function(){var c=a.hostSpecificFileVersion.split(".");if(b.get_appMinorVersion){var d=a.hostPlatform=="ios";if(!d)if(isNaN(b.get_appMinorVersion()))b._appMinorVersion=parseInt(c[1]);else if(c.length>1&&!isNaN(Number(c[1])))b._appMinorVersion=parseInt(c[1])}if(a.isDialog)b._isDialog=a.isDialog};c();var d=function(){h.prepareApiSurface&&h.prepareApiSurface(b);g.waitForFunction(function(){return Microsoft.Office.WebExtension.initialize!=undefined},function(a){if(a){if(h.prepareApiSurface)Microsoft.Office.WebExtension.initialize(h.getInitializationReason(b));else h.prepareRightBeforeWebExtensionInitialize(b);h.prepareRightAfterWebExtensionInitialize&&h.prepareRightAfterWebExtensionInitialize()}else throw"Office.js has not been fully loaded yet. Please try again later or make sure to add your initialization code on the Office.initialize function."},400,50)};!g.isScriptLoading(OSF.ConstantNames.OfficeStringsId)&&v(b.get_appUILocale());g.waitForScripts([OSF.ConstantNames.OfficeStringsId],function(){if(q&&!Strings.OfficeOM)Strings.OfficeOM=q;h.loadAppSpecificScriptAndCreateOM(b,d,k)})})}else{var b="MicrosoftAjax.js is not loaded successfully.";OSF.AppTelemetry&&OSF.AppTelemetry.logAppException&&OSF.AppTelemetry.logAppException(b);throw b}},w=function(){OSF.AppTelemetry&&OSF.AppTelemetry.setOsfControlAppCorrelationId&&OSF.AppTelemetry.setOsfControlAppCorrelationId(a.osfControlAppCorrelationId);if(g.isScriptLoading(OSF.ConstantNames.MicrosoftAjaxId))g.waitForScripts([OSF.ConstantNames.MicrosoftAjaxId],r);else g.waitForFunction(p,r,500,100)};if(a.isO15)g.loadScript(k+OSF.ConstantNames.O15InitHelper,OSF.ConstantNames.O15MappingId,w);else{var t;t=a.hostType+"-"+a.hostPlatform+"-"+a.hostSpecificFileVersion+".js";g.loadScript(k+t.toLowerCase(),OSF.ConstantNames.HostFileId,w)}a.hostLocale&&v(a.hostLocale);if(y&&!p()){var z=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";g.loadScriptParallel(z,OSF.ConstantNames.MicrosoftAjaxId)}window.confirm=function(){throw"Function window.confirm is not supported.";return c};window.alert=function(){throw"Function window.alert is not supported."};window.prompt=function(){throw"Function window.prompt is not supported.";return e};window.history.replaceState=e;window.history.pushState=e};w();return {getId:function(){return i.id},getClientEndPoint:function(){return i.clientEndPoint},getContext:function(){return n},setContext:function(a){n=a},getHostInfo:function(){return a},getHostFacade:function(){return m},setHostFacade:function(a){m=a},getInitializationHelper:function(){return h},getCachedSessionSettingsKey:function(){return (i.conversationID!=e?i.conversationID:o)+"CachedSessionSettings"},getWebAppState:function(){return i},getWindowLocationHash:function(){return r},getWindowLocationSearch:function(){return q},getLoadScriptHelper:function(){return g},getWindowName:function(){return p}}}() \ No newline at end of file +var OSF=OSF||{};OSF.HostSpecificFileVersionDefault="16.00";OSF.HostSpecificFileVersionMap={access:{web:"16.00"},agavito:{winrt:"16.00"},excel:{ios:"16.00",mac:"16.00",web:"16.00",win32:"16.01",winrt:"16.00"},onenote:{web:"16.00",win32:"16.00",winrt:"16.00"},outlook:{ios:"16.00",mac:"16.00",web:"16.01",win32:"16.02"},powerpoint:{ios:"16.00",mac:"16.00",web:"16.00",win32:"16.01",winrt:"16.00"},project:{win32:"16.00"},sway:{web:"16.00"},word:{ios:"16.00",mac:"16.00",web:"16.00",win32:"16.01",winrt:"16.00"}};OSF.SupportedLocales={"ar-sa":true,"bg-bg":true,"bn-in":true,"ca-es":true,"cs-cz":true,"da-dk":true,"de-de":true,"el-gr":true,"en-us":true,"es-es":true,"et-ee":true,"eu-es":true,"fa-ir":true,"fi-fi":true,"fr-fr":true,"gl-es":true,"he-il":true,"hi-in":true,"hr-hr":true,"hu-hu":true,"id-id":true,"it-it":true,"ja-jp":true,"kk-kz":true,"ko-kr":true,"lt-lt":true,"lv-lv":true,"ms-my":true,"nb-no":true,"nl-nl":true,"nn-no":true,"pl-pl":true,"pt-br":true,"pt-pt":true,"ro-ro":true,"ru-ru":true,"sk-sk":true,"sl-si":true,"sr-cyrl-cs":true,"sr-cyrl-rs":true,"sr-latn-cs":true,"sr-latn-rs":true,"sv-se":true,"th-th":true,"tr-tr":true,"uk-ua":true,"ur-pk":true,"vi-vn":true,"zh-cn":true,"zh-tw":true};OSF.AssociatedLocales={ar:"ar-sa",bg:"bg-bg",bn:"bn-in",ca:"ca-es",cs:"cs-cz",da:"da-dk",de:"de-de",el:"el-gr",en:"en-us",es:"es-es",et:"et-ee",eu:"eu-es",fa:"fa-ir",fi:"fi-fi",fr:"fr-fr",gl:"gl-es",he:"he-il",hi:"hi-in",hr:"hr-hr",hu:"hu-hu",id:"id-id",it:"it-it",ja:"ja-jp",kk:"kk-kz",ko:"ko-kr",lt:"lt-lt",lv:"lv-lv",ms:"ms-my",nb:"nb-no",nl:"nl-nl",nn:"nn-no",pl:"pl-pl",pt:"pt-br",ro:"ro-ro",ru:"ru-ru",sk:"sk-sk",sl:"sl-si",sr:"sr-cyrl-cs",sv:"sv-se",th:"th-th",tr:"tr-tr",uk:"uk-ua",ur:"ur-pk",vi:"vi-vn",zh:"zh-cn"};OSF.getSupportedLocale=function(a,c){if(c===void 0)c="en-us";if(!a)return c;var b;a=a.toLowerCase();if(a in OSF.SupportedLocales)b=a;else{var d=a.split("-",1);if(d&&d.length>0)b=OSF.AssociatedLocales[d[0]]}if(!b)b=c;return b};var ScriptLoading;(function(e){var a=false,b=function(){function b(g,e,d,f,c){var b=this;b.url=g;b.isReady=e;b.hasStarted=d;b.timer=f;b.hasError=a;b.pendingCallbacks=[];b.pendingCallbacks.push(c)}return b}(),d=function(){function a(c,b,a){this.scriptId=c;this.startTime=b;this.msResponseTime=a}return a}(),c=function(){var c=true,e=null;function f(){var a=this;a.defaultScriptLoadingTimeout=1e4;a.loadedScriptByIds={};a.scriptTelemetryBuffer=[];a.osfControlAppCorrelationId="";a.basePath=e;a.constantNames={OfficeJS:"office.js",OfficeDebugJS:"office.debug.js"}}f.prototype.isScriptLoading=function(a){return !!(this.loadedScriptByIds[a]&&this.loadedScriptByIds[a].hasStarted)};f.prototype.getOfficeJsBasePath=function(){var a=this;if(a.basePath)return a.basePath;else{for(var g=function(b,c){var d,a,e;e=b.toLowerCase();a=e.indexOf(c);if(a>=0&&a===b.length-c.length&&(a===0||b.charAt(a-1)==="/"||b.charAt(a-1)==="\\"))d=b.substring(0,a);else if(a>=0&&a0){f=window.setTimeout(d,i);b--}else{window.clearTimeout(f);e(a)}};d()};f.prototype.waitForScripts=function(b,e){var f=this;if(this.invokeCallbackIfScriptsReady(b,e)==a)for(var c=0;c1){var e=b[1],f=new RegExp("[&#]","g"),a=e.split(f);if(a.length>0)c=a[0]}}return c},v=function(f,g){var b=f.split("."),e=g.split("."),a;for(a in b)if(parseInt(b[a])parseInt(e[a]))return d;return c},t=function(){var b="15.30.1128.0",a=window.external.GetContext().GetHostFullVersion();return !!v(b,a)},u=function(){var i="hostInfoValue",n="isDialog",q=j,h=l(q);if(!h)try{var s=JSON.parse(p);h=s?s["hostInfo"]:e}catch(u){}if(!h)try{window.external=window.external||{};if(typeof agaveHost!==b&&agaveHost.GetHostInfo)window.external.GetHostInfo=function(){return agaveHost.GetHostInfo()};var m=window.external.GetHostInfo();if(m==n){a.isO15=d;a.isDialog=d}else if(m.toLowerCase().indexOf("mac")!==-1&&m.toLowerCase().indexOf("outlook")!==-1&&t())a.isO15=d;else{var r=m.split(q+"=");if(r.length>1)h=r[1];else h=m}}catch(u){}var w=function(){var a=e;try{if(window.sessionStorage)a=window.sessionStorage}catch(b){}return a},k=w();if(!h&&k&&k.getItem(i))h=k.getItem(i);if(h){h=decodeURIComponent(h);a.isO15=c;var g=h.split("$");if(typeof g[2]==b)g=h.split("|");a.hostType=typeof g[0]==b?f:g[0].toLowerCase();a.hostPlatform=typeof g[1]==b?f:g[1].toLowerCase();a.hostSpecificFileVersion=typeof g[2]==b?f:g[2].toLowerCase();a.hostLocale=typeof g[3]==b?f:g[3].toLowerCase();a.osfControlAppCorrelationId=typeof g[4]==b?f:g[4];if(a.osfControlAppCorrelationId=="telemetry")a.osfControlAppCorrelationId=f;a.isDialog=typeof g[5]!=b&&g[5]==n?d:c;var v=parseFloat(a.hostSpecificFileVersion),o=OSF.HostSpecificFileVersionDefault;if(OSF.HostSpecificFileVersionMap[a.hostType]&&OSF.HostSpecificFileVersionMap[a.hostType][a.hostPlatform])o=OSF.HostSpecificFileVersionMap[a.hostType][a.hostPlatform];if(v>parseFloat(o))a.hostSpecificFileVersion=o;if(k)try{k.setItem(i,h)}catch(x){}}else{a.isO15=d;a.hostLocale=l("locale")}},s=function(b,a){OSF.AppTelemetry&&OSF.AppTelemetry.logAppCommonMessage&&OSF.AppTelemetry.logAppCommonMessage("getAppContextAsync starts");h.getAppContext(b,a)},w=function(){u();if(a.hostPlatform=="web"&&a.isDialog&&window==window.top&&window.opener==e){window.open(f,"_self",f);window.close()}g.setAppCorrelationId(a.osfControlAppCorrelationId);var k=g.getOfficeJsBasePath(),z=c;if(!k)throw"Office Web Extension script library file name should be "+OSF.ConstantNames.OfficeJS+" or "+OSF.ConstantNames.OfficeDebugJS+".";var p=function(){var a="function";if(typeof Sys!==b&&typeof Type!==b&&Sys.StringBuilder&&typeof Sys.StringBuilder===a&&Type.registerNamespace&&typeof Type.registerNamespace===a&&Type.registerClass&&typeof Type.registerClass===a||typeof OfficeExt!==b&&OfficeExt.MsAjaxError)return d;else return c},q=e,v=function(f){var a=c,e=function(){if(typeof Strings==b||typeof Strings.OfficeOM==b)if(!a){a=d;var h=k+OSF.ConstantNames.DefaultLocale+"/"+OSF.ConstantNames.OfficeStringJS;g.loadScript(h,OSF.ConstantNames.OfficeStringsId,e,d,OSF.ConstantNames.LocaleStringLoadingTimeout);return c}else throw"Neither the locale, "+f.toLowerCase()+", provided by the host app nor the fallback locale "+OSF.ConstantNames.DefaultLocale+" are supported.";else{a=c;q=Strings.OfficeOM}};if(!p()){window.Type=Function;Type.registerNamespace=function(a){window[a]=window[a]||{}};Type.prototype.registerClass=function(a){a={}}}var h=k+OSF.getSupportedLocale(f,OSF.ConstantNames.DefaultLocale)+"/"+OSF.ConstantNames.OfficeStringJS;g.loadScript(h,OSF.ConstantNames.OfficeStringsId,e,d,OSF.ConstantNames.LocaleStringLoadingTimeout)},r=function(c){if(c){h=new OSF.InitializationHelper(a,i,n,x,m);a.hostPlatform=="web"&&h.saveAndSetDialogInfo&&h.saveAndSetDialogInfo(l(j));h.setAgaveHostCommunication();s(i.wnd,function(b){OSF.AppTelemetry&&OSF.AppTelemetry.logAppCommonMessage&&OSF.AppTelemetry.logAppCommonMessage("getAppContextAsync callback start");o=b._appInstanceId;var c=function(){var c=a.hostSpecificFileVersion.split(".");if(b.get_appMinorVersion){var d=a.hostPlatform=="ios";if(!d)if(isNaN(b.get_appMinorVersion()))b._appMinorVersion=parseInt(c[1]);else if(c.length>1&&!isNaN(Number(c[1])))b._appMinorVersion=parseInt(c[1])}if(a.isDialog)b._isDialog=a.isDialog};c();var d=function(){h.prepareApiSurface&&h.prepareApiSurface(b);g.waitForFunction(function(){return Microsoft.Office.WebExtension.initialize!=undefined},function(a){if(a){if(h.prepareApiSurface)Microsoft.Office.WebExtension.initialize(h.getInitializationReason(b));else h.prepareRightBeforeWebExtensionInitialize(b);h.prepareRightAfterWebExtensionInitialize&&h.prepareRightAfterWebExtensionInitialize()}else throw"Office.js has not been fully loaded yet. Please try again later or make sure to add your initialization code on the Office.initialize function."},400,50)};!g.isScriptLoading(OSF.ConstantNames.OfficeStringsId)&&v(b.get_appUILocale());g.waitForScripts([OSF.ConstantNames.OfficeStringsId],function(){if(q&&!Strings.OfficeOM)Strings.OfficeOM=q;h.loadAppSpecificScriptAndCreateOM(b,d,k)})})}else{var b="MicrosoftAjax.js is not loaded successfully.";OSF.AppTelemetry&&OSF.AppTelemetry.logAppException&&OSF.AppTelemetry.logAppException(b);throw b}},w=function(){OSF.AppTelemetry&&OSF.AppTelemetry.setOsfControlAppCorrelationId&&OSF.AppTelemetry.setOsfControlAppCorrelationId(a.osfControlAppCorrelationId);if(g.isScriptLoading(OSF.ConstantNames.MicrosoftAjaxId))g.waitForScripts([OSF.ConstantNames.MicrosoftAjaxId],r);else g.waitForFunction(p,r,500,100)};if(a.isO15)g.loadScript(k+OSF.ConstantNames.O15InitHelper,OSF.ConstantNames.O15MappingId,w);else{var t;t=a.hostType+"-"+a.hostPlatform+"-"+a.hostSpecificFileVersion+".js";g.loadScript(k+t.toLowerCase(),OSF.ConstantNames.HostFileId,w)}a.hostLocale&&v(a.hostLocale);if(z&&!p()){var A=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";g.loadScriptParallel(A,OSF.ConstantNames.MicrosoftAjaxId)}window.confirm=function(){throw"Function window.confirm is not supported.";return c};window.alert=function(){throw"Function window.alert is not supported."};window.prompt=function(){throw"Function window.prompt is not supported.";return e};var y=a.hostType=="outlook"&&a.hostPlatform=="android";if(!y){window.history.replaceState=e;window.history.pushState=e}};w();return {getId:function(){return i.id},getClientEndPoint:function(){return i.clientEndPoint},getContext:function(){return n},setContext:function(a){n=a},getHostInfo:function(){return a},getHostFacade:function(){return m},setHostFacade:function(a){m=a},getInitializationHelper:function(){return h},getCachedSessionSettingsKey:function(){return (i.conversationID!=e?i.conversationID:o)+"CachedSessionSettings"},getWebAppState:function(){return i},getWindowLocationHash:function(){return r},getWindowLocationSearch:function(){return q},getLoadScriptHelper:function(){return g},getWindowName:function(){return p}}}() \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/onenote-ios-16.00.debug.js b/node_modules/@microsoft/office-js/dist/onenote-ios-16.00.debug.js index 1df7a41..144bc59 100644 --- a/node_modules/@microsoft/office-js/dist/onenote-ios-16.00.debug.js +++ b/node_modules/@microsoft/office-js/dist/onenote-ios-16.00.debug.js @@ -1,5 +1,7 @@ -/* OneNote specific JavaScript API library */ -/* Version: 16.0.8204.1000 */ +/* OneNote iOS-specific API library */ +/* Version: 16.0.8827.3000 */ + +/* Office.js Version: 16.0.8828.1000 */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ @@ -255,6 +257,54 @@ OSF.OUtil=(function () { delete parent[name]; } }, + serializeSettings: function OSF_OUtil$serializeSettings(settingsCollection) { + var ret={}; + for (var key in settingsCollection) { + var value=settingsCollection[key]; + try { + if (JSON) { + value=JSON.stringify(value, function dateReplacer(k, v) { + return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix+this[k].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix : v; + }); + } + else { + value=Sys.Serialization.JavaScriptSerializer.serialize(value); + } + ret[key]=value; + } + catch (ex) { + } + } + return ret; + }, + deserializeSettings: function OSF_OUtil$deserializeSettings(serializedSettings) { + var ret={}; + serializedSettings=serializedSettings || {}; + for (var key in serializedSettings) { + var value=serializedSettings[key]; + try { + if (JSON) { + value=JSON.parse(value, function dateReviver(k, v) { + var d; + if (typeof v==='string' && v && v.length > 6 && v.slice(0, 5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) { + d=new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + } + else { + value=Sys.Serialization.JavaScriptSerializer.deserialize(value, true); + } + ret[key]=value; + } + catch (ex) { + } + } + return ret; + }, loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) { if (url && callback) { var doc=window.document; @@ -835,6 +885,14 @@ OSF.OUtil=(function () { } } }, + removeClass: function OSF_OUtil$removeClass(elmt, val) { + if (OSF.OUtil.hasClass(elmt, val)) { + var className=elmt.getAttribute(_classN); + var reg=new RegExp('(\\s|^)'+val+'(\\s|$)'); + className=className.replace(reg, ''); + elmt.setAttribute(_classN, className); + } + }, hasClass: function OSF_OUtil$hasClass(elmt, clsName) { var className=elmt.getAttribute(_classN); return className && className.match(new RegExp('(\\s|^)'+clsName+'(\\s|$)')); @@ -971,6 +1029,12 @@ OSF.OUtil.Guid=(function () { })(); window.OSF=OSF; OSF.OUtil.setNamespace("OSF", window); +OSF.MessageIDs={ + "FetchBundleUrl": 0, + "LoadReactBundle": 1, + "LoadBundleSuccess": 2, + "LoadBundleError": 3 +}; OSF.AppName={ Unsupported: 0, Excel: 1, @@ -1029,7 +1093,9 @@ OSF.AgaveHostAction={ "EscExit": 15, "F2Exit": 16, "ExitNoFocusable": 17, - "ExitNoFocusableShift": 18 + "ExitNoFocusableShift": 18, + "MouseEnter": 19, + "MouseLeave": 20 }; OSF.SharedConstants={ "NotificationConversationIdSuffix": '_ntf' @@ -1165,6 +1231,8 @@ Microsoft.Office.WebExtension.Parameters={ HostType: "hostType", ForceConsent: "forceConsent", ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + Reserved: "reserved", Xml: "xml", Namespace: "namespace", Prefix: "prefix", @@ -1197,6 +1265,7 @@ Microsoft.Office.WebExtension.Parameters={ DisplayInIframe: "displayInIframe", MessageContent: "messageContent", HideTitle: "hideTitle", + UseDeviceIndependentPixels: "useDeviceIndependentPixels", AppCommandInvocationCompletedData: "appCommandInvocationCompletedData" }; OSF.OUtil.setNamespace("DDA", OSF); @@ -1254,6 +1323,7 @@ OSF.DDA.MethodDispId={ dispidAppCommandInvocationCompletedMethod: 94, dispidCloseContainerMethod: 97, dispidGetAccessTokenMethod: 98, + dispidOpenBrowserWindow: 102, dispidGetSelectedTaskMethod: 110, dispidGetSelectedResourceMethod: 111, dispidGetTaskMethod: 112, @@ -1309,8 +1379,11 @@ OSF.DDA.EventDispId={ dispidObjectDataChangedEvent: 15, dispidContentControlAddedEvent: 16, dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, dispidAppCommandInvokedEvent: 39, dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, dispidTaskSelectionChangedEvent: 56, dispidResourceSelectionChangedEvent: 57, dispidViewSelectionChangedEvent: 58, @@ -1442,7 +1515,9 @@ OSF.DDA.ErrorCodeManager=(function () { ooeSSOInvalidGrant: 13005, ooeSSOClientError: 13006, ooeSSOServerError: 13007, - ooeAddinIsAlreadyRequestingToken: 13008 + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009, + ooeSSOConnectionLost: 13010 }, initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={ name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotSupported }; @@ -1540,6 +1615,8 @@ OSF.DDA.ErrorCodeManager=(function () { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={ name: stringNS.L_SSOClientError, message: stringNS.L_SSOClientErrorMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={ name: stringNS.L_SSOServerError, message: stringNS.L_SSOServerErrorMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={ name: stringNS.L_AddinIsAlreadyRequestingToken, message: stringNS.L_AddinIsAlreadyRequestingTokenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={ name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={ name: stringNS.L_SSOConnectionLostError, message: stringNS.L_SSOConnectionLostErrorMessage }; } }; })(); @@ -3019,6 +3096,7 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, "ExecuteRichApiRequestAsync": did.dispidExecuteRichApiRequestMethod, "AppCommandInvocationCompletedAsync": did.dispidAppCommandInvocationCompletedMethod, "CloseContainerAsync": did.dispidCloseContainerMethod, + "OpenBrowserWindow": did.dispidOpenBrowserWindow, "AddDataPartAsync": did.dispidAddDataPartMethod, "GetDataPartByIdAsync": did.dispidGetDataPartByIdMethod, "GetDataPartsByNameSpaceAsync": did.dispidGetDataPartsByNamespaceMethod, @@ -3058,13 +3136,13 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, } jsom=OSF.DDA.SyncMethodNames; did=OSF.DDA.MethodDispId; - var asyncMethodMap={ + var syncMethodMap={ "MessageParent": did.dispidMessageParentMethod, "SendMessage": did.dispidSendMessageMethod }; - for (var method in asyncMethodMap) { + for (var method in syncMethodMap) { if (jsom[method]) { - dispIdMap[jsom[method].id]=asyncMethodMap[method]; + dispIdMap[jsom[method].id]=syncMethodMap[method]; } } jsom=Microsoft.Office.WebExtension.EventType; @@ -3084,7 +3162,10 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, "ObjectSelectionChanged": did.dispidObjectSelectionChangedEvent, "ObjectDataChanged": did.dispidObjectDataChangedEvent, "ContentControlAdded": did.dispidContentControlAddedEvent, + "RichApiMessage": did.dispidRichApiMessageEvent, "ItemChanged": did.dispidOlkItemSelectedChangedEvent, + "RecipientsChanged": did.dispidOlkRecipientsChangedEvent, + "AppointmentTimeChanged": did.dispidOlkAppointmentTimeChangedEvent, "TaskSelectionChanged": did.dispidTaskSelectionChangedEvent, "ResourceSelectionChanged": did.dispidResourceSelectionChangedEvent, "ViewSelectionChanged": did.dispidViewSelectionChangedEvent, @@ -3160,6 +3241,7 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, else { hostCallArgs=callArgs; } + var startTime=(new Date()).getTime(); delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ "dispId": dispId, "hostCallArgs": hostCallArgs, @@ -3180,6 +3262,9 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, } var payload=asyncMethodCall.processResponse(status, responseArgs, caller, callArgs); OSF.DDA.issueAsyncResult(callArgs, status, payload); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(dispId, hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); + } } }); } @@ -4047,7 +4132,6 @@ OSF.DDA.SafeArray.Delegate.executeAsync=function OSF_DDA_SafeArray_Delegate$Exec if (args.onCalling) { args.onCalling(); } - var startTime=(new Date()).getTime(); OSF.ClientHostController.execute(args.dispId, toArray(args.hostCallArgs), function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode) { var result=hostResponseArgs.toArray(); var status=result[OSF.DDA.SafeArray.Response.Status]; @@ -4094,9 +4178,6 @@ OSF.DDA.SafeArray.Delegate.executeAsync=function OSF_DDA_SafeArray_Delegate$Exec } args.onComplete(status, payload); } - if (OSF.AppTelemetry) { - OSF.AppTelemetry.onMethodDone(args.dispId, args.hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); - } return true; }); } @@ -4212,6 +4293,9 @@ OSF.InitializationHelper.prototype.prepareApiSurface=function OSF_Initialization } } } + if (OSF.DDA.OpenBrowser) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.OpenBrowserWindow]); + } if (OSF.DDA.Auth) { appContext.auth=new OSF.DDA.Auth(); OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth, [OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]); @@ -4247,14 +4331,14 @@ OSF.DDA.DispIdHost.getClientDelegateMethods=function (actionId) { return delegateMethods; }; var OSF=OSF || {}; -var OSFWebView; -(function (OSFWebView) { - var WebViewSafeArray=(function () { - function WebViewSafeArray(data) { +var OSFWebkit; +(function (OSFWebkit) { + var WebkitSafeArray=(function () { + function WebkitSafeArray(data) { this.data=data; this.safeArrayFlag=this.isSafeArray(data); } - WebViewSafeArray.prototype.dimensions=function () { + WebkitSafeArray.prototype.dimensions=function () { var dimensions=0; if (this.safeArrayFlag) { dimensions=this.data[0][0]; @@ -4264,7 +4348,7 @@ var OSFWebView; } return dimensions; }; - WebViewSafeArray.prototype.getItem=function () { + WebkitSafeArray.prototype.getItem=function () { var array=[]; var element=null; if (this.safeArrayFlag) { @@ -4279,10 +4363,10 @@ var OSFWebView; } return element; }; - WebViewSafeArray.prototype.lbound=function (dimension) { + WebkitSafeArray.prototype.lbound=function (dimension) { return 0; }; - WebViewSafeArray.prototype.ubound=function (dimension) { + WebkitSafeArray.prototype.ubound=function (dimension) { var ubound=0; if (this.safeArrayFlag) { ubound=this.data[0][dimension]; @@ -4302,7 +4386,7 @@ var OSFWebView; } return ubound; }; - WebViewSafeArray.prototype.toArray=function () { + WebkitSafeArray.prototype.toArray=function () { if (this.isArray()==false) { return this.data; } @@ -4311,7 +4395,7 @@ var OSFWebView; for (var i=startingIndex; i < this.data.length; i++) { var element=this.data[i]; if (this.isSafeArray(element)) { - arr.push(new WebViewSafeArray(element)); + arr.push(new WebkitSafeArray(element)); } else { arr.push(element); @@ -4319,10 +4403,10 @@ var OSFWebView; } return arr; }; - WebViewSafeArray.prototype.isArray=function () { + WebkitSafeArray.prototype.isArray=function () { return OSF.OUtil.isArray(this.data); }; - WebViewSafeArray.prototype.isSafeArray=function (obj) { + WebkitSafeArray.prototype.isSafeArray=function (obj) { var isSafeArray=false; if (OSF.OUtil.isArray(obj) && OSF.OUtil.isArray(obj[0])) { var bounds=obj[0]; @@ -4343,12 +4427,12 @@ var OSFWebView; } return isSafeArray; }; - return WebViewSafeArray; + return WebkitSafeArray; })(); - OSFWebView.WebViewSafeArray=WebViewSafeArray; -})(OSFWebView || (OSFWebView={})); -var OSFWebView; -(function (OSFWebView) { + OSFWebkit.WebkitSafeArray=WebkitSafeArray; +})(OSFWebkit || (OSFWebkit={})); +var OSFWebkit; +(function (OSFWebkit) { var ScriptMessaging; (function (ScriptMessaging) { var scriptMessenger=null; @@ -4360,9 +4444,9 @@ var OSFWebView; scriptMessenger.agaveHostEventCallback(callbackId, params); } ScriptMessaging.agaveHostEventCallback=agaveHostEventCallback; - function GetScriptMessenger(agaveHostCallbackName, agaveHostEventCallbackName, poster) { + function GetScriptMessenger() { if (scriptMessenger==null) { - scriptMessenger=new Messenger(agaveHostCallbackName, agaveHostEventCallbackName, poster); + scriptMessenger=new WebkitScriptMessaging("OSF.ScriptMessaging.agaveHostCallback", "OSF.ScriptMessaging.agaveHostEventCallback"); } return scriptMessenger; } @@ -4375,21 +4459,20 @@ var OSFWebView; } return EventHandlerCallback; })(); - var Messenger=(function () { - function Messenger(methodCallbackName, eventCallbackName, messagePoster) { + var WebkitScriptMessaging=(function () { + function WebkitScriptMessaging(methodCallbackName, eventCallbackName) { this.callingIndex=0; this.callbackList={}; this.eventHandlerList={}; this.asyncMethodCallbackFunctionName=methodCallbackName; this.eventCallbackFunctionName=eventCallbackName; - this.poster=messagePoster; - this.conversationId=Messenger.getCurrentTimeMS().toString(); + this.conversationId=WebkitScriptMessaging.getCurrentTimeMS().toString(); } - Messenger.prototype.invokeMethod=function (handlerName, methodId, params, callback) { + WebkitScriptMessaging.prototype.invokeMethod=function (handlerName, methodId, params, callback) { var messagingArgs={}; - this.postMessage(messagingArgs, handlerName, methodId, params, callback); + this.postWebkitMessage(messagingArgs, handlerName, methodId, params, callback); }; - Messenger.prototype.registerEvent=function (handlerName, methodId, dispId, targetId, handler, callback) { + WebkitScriptMessaging.prototype.registerEvent=function (handlerName, methodId, dispId, targetId, handler, callback) { var messagingArgs={ eventCallbackFunction: this.eventCallbackFunctionName }; @@ -4397,10 +4480,10 @@ var OSFWebView; id: dispId, targetId: targetId }; - var correlationId=this.postMessage(messagingArgs, handlerName, methodId, hostArgs, callback); + var correlationId=this.postWebkitMessage(messagingArgs, handlerName, methodId, hostArgs, callback); this.eventHandlerList[correlationId]=new EventHandlerCallback(dispId, targetId, handler); }; - Messenger.prototype.unregisterEvent=function (handlerName, methodId, dispId, targetId, callback) { + WebkitScriptMessaging.prototype.unregisterEvent=function (handlerName, methodId, dispId, targetId, callback) { var hostArgs={ id: dispId, targetId: targetId @@ -4415,7 +4498,7 @@ var OSFWebView; } this.invokeMethod(handlerName, methodId, hostArgs, callback); }; - Messenger.prototype.agaveHostCallback=function (callbackId, params) { + WebkitScriptMessaging.prototype.agaveHostCallback=function (callbackId, params) { var callbackFunction=this.callbackList[callbackId]; if (callbackFunction) { var callbacksDone=callbackFunction(params); @@ -4424,40 +4507,53 @@ var OSFWebView; } } }; - Messenger.prototype.agaveHostEventCallback=function (callbackId, params) { + WebkitScriptMessaging.prototype.agaveHostEventCallback=function (callbackId, params) { var eventCallback=this.eventHandlerList[callbackId]; if (eventCallback) { eventCallback.handler(params); } }; - Messenger.prototype.postMessage=function (messagingArgs, handlerName, methodId, params, callback) { + WebkitScriptMessaging.prototype.postWebkitMessage=function (messagingArgs, handlerName, methodId, params, callback) { var correlationId=this.generateCorrelationId(); this.callbackList[correlationId]=callback; messagingArgs.methodId=methodId; messagingArgs.params=params; messagingArgs.callbackId=correlationId; messagingArgs.callbackFunction=this.asyncMethodCallbackFunctionName; - this.poster.postMessage(handlerName, JSON.stringify(messagingArgs)); + var invokePostMessage=function () { + window.webkit.messageHandlers[handlerName].postMessage(JSON.stringify(messagingArgs)); + }; + var currentTimestamp=WebkitScriptMessaging.getCurrentTimeMS(); + if (this.lastMessageTimestamp==null || (currentTimestamp - this.lastMessageTimestamp >=WebkitScriptMessaging.MESSAGE_TIME_DELTA)) { + invokePostMessage(); + this.lastMessageTimestamp=currentTimestamp; + } + else { + this.lastMessageTimestamp+=WebkitScriptMessaging.MESSAGE_TIME_DELTA; + setTimeout(function () { + invokePostMessage(); + }, this.lastMessageTimestamp - currentTimestamp); + } return correlationId; }; - Messenger.prototype.generateCorrelationId=function () { + WebkitScriptMessaging.prototype.generateCorrelationId=function () { ++this.callingIndex; return this.conversationId+this.callingIndex; }; - Messenger.getCurrentTimeMS=function () { + WebkitScriptMessaging.getCurrentTimeMS=function () { return (new Date).getTime(); }; - Messenger.MESSAGE_TIME_DELTA=10; - return Messenger; + WebkitScriptMessaging.MESSAGE_TIME_DELTA=10; + return WebkitScriptMessaging; })(); - ScriptMessaging.Messenger=Messenger; - })(ScriptMessaging=OSFWebView.ScriptMessaging || (OSFWebView.ScriptMessaging={})); -})(OSFWebView || (OSFWebView={})); -OSF.ScriptMessaging=OSFWebView.ScriptMessaging; -var OSFWebView; -(function (OSFWebView) { - OSFWebView.MessageHandlerName="Agave"; - OSFWebView.PopupMessageHandlerName="WefPopupHandler"; + ScriptMessaging.WebkitScriptMessaging=WebkitScriptMessaging; + })(ScriptMessaging=OSFWebkit.ScriptMessaging || (OSFWebkit.ScriptMessaging={})); +})(OSFWebkit || (OSFWebkit={})); +OSF.ScriptMessaging=OSFWebkit.ScriptMessaging; +var OSFWebkit; +(function (OSFWebkit) { + OSFWebkit.MessageHandlerName="Agave"; + OSFWebkit.PopupMessageHandlerName="WefPopupHandler"; (function (AppContextProperties) { AppContextProperties[AppContextProperties["Settings"]=0]="Settings"; AppContextProperties[AppContextProperties["SolutionReferenceId"]=1]="SolutionReferenceId"; @@ -4480,26 +4576,24 @@ var OSFWebView; AppContextProperties[AppContextProperties["TouchEnabled"]=18]="TouchEnabled"; AppContextProperties[AppContextProperties["CommerceAllowed"]=19]="CommerceAllowed"; AppContextProperties[AppContextProperties["RequirementMatrix"]=20]="RequirementMatrix"; - })(OSFWebView.AppContextProperties || (OSFWebView.AppContextProperties={})); - var AppContextProperties=OSFWebView.AppContextProperties; + AppContextProperties[AppContextProperties["HostCustomMessage"]=21]="HostCustomMessage"; + AppContextProperties[AppContextProperties["HostFullVersion"]=22]="HostFullVersion"; + })(OSFWebkit.AppContextProperties || (OSFWebkit.AppContextProperties={})); + var AppContextProperties=OSFWebkit.AppContextProperties; (function (MethodId) { MethodId[MethodId["Execute"]=1]="Execute"; MethodId[MethodId["RegisterEvent"]=2]="RegisterEvent"; MethodId[MethodId["UnregisterEvent"]=3]="UnregisterEvent"; MethodId[MethodId["WriteSettings"]=4]="WriteSettings"; MethodId[MethodId["GetContext"]=5]="GetContext"; - MethodId[MethodId["OnKeydown"]=6]="OnKeydown"; - MethodId[MethodId["AddinInitialized"]=7]="AddinInitialized"; - MethodId[MethodId["OpenWindow"]=8]="OpenWindow"; - MethodId[MethodId["MessageParent"]=9]="MessageParent"; - MethodId[MethodId["SendMessage"]=10]="SendMessage"; - })(OSFWebView.MethodId || (OSFWebView.MethodId={})); - var MethodId=OSFWebView.MethodId; - var WebViewHostController=(function () { - function WebViewHostController(hostScriptProxy) { + MethodId[MethodId["SendMessage"]=6]="SendMessage"; + })(OSFWebkit.MethodId || (OSFWebkit.MethodId={})); + var MethodId=OSFWebkit.MethodId; + var WebkitHostController=(function () { + function WebkitHostController(hostScriptProxy) { this.hostScriptProxy=hostScriptProxy; } - WebViewHostController.prototype.execute=function (id, params, callback) { + WebkitHostController.prototype.execute=function (id, params, callback) { var args=params; if (args==null) { args=[]; @@ -4509,126 +4603,144 @@ var OSFWebView; apiArgs: args }; var agaveResponseCallback=function (payload) { - var safeArraySource=payload; - if (OSF.OUtil.isArray(payload) && payload.length >=2) { - var hrStatus=payload[0]; - safeArraySource=payload[1]; - } if (callback) { - return callback(new OSFWebView.WebViewSafeArray(safeArraySource)); + var invokeArguments=[]; + if (OSF.OUtil.isArray(payload)) { + for (var i=0; i < payload.length; i++) { + var element=payload[i]; + if (OSF.OUtil.isArray(element)) { + element=new OSFWebkit.WebkitSafeArray(element); + } + invokeArguments.unshift(element); + } + } + return callback.apply(null, invokeArguments); } }; - this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.Execute, hostParams, agaveResponseCallback); + this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName, OSF.Webkit.MethodId.Execute, hostParams, agaveResponseCallback); }; - WebViewHostController.prototype.registerEvent=function (id, targetId, handler, callback) { + WebkitHostController.prototype.registerEvent=function (id, targetId, handler, callback) { var agaveEventHandlerCallback=function (payload) { var safeArraySource=payload; var eventId=0; if (OSF.OUtil.isArray(payload) && payload.length >=2) { - eventId=payload[0]; - safeArraySource=payload[1]; + safeArraySource=payload[0]; + eventId=payload[1]; } if (handler) { - handler(eventId, new OSFWebView.WebViewSafeArray(safeArraySource)); + handler(eventId, new OSFWebkit.WebkitSafeArray(safeArraySource)); } }; var agaveResponseCallback=function (payload) { if (callback) { - return callback(new OSFWebView.WebViewSafeArray(payload)); + return callback(new OSFWebkit.WebkitSafeArray(payload)); } }; - this.hostScriptProxy.registerEvent(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.RegisterEvent, id, targetId, agaveEventHandlerCallback, agaveResponseCallback); + this.hostScriptProxy.registerEvent(OSF.Webkit.MessageHandlerName, OSF.Webkit.MethodId.RegisterEvent, id, targetId, agaveEventHandlerCallback, agaveResponseCallback); }; - WebViewHostController.prototype.unregisterEvent=function (id, targetId, callback) { + WebkitHostController.prototype.unregisterEvent=function (id, targetId, callback) { var agaveResponseCallback=function (response) { - return callback(new OSFWebView.WebViewSafeArray(response)); + return callback(new OSFWebkit.WebkitSafeArray(response)); }; - this.hostScriptProxy.unregisterEvent(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.UnregisterEvent, id, targetId, agaveResponseCallback); + this.hostScriptProxy.unregisterEvent(OSF.Webkit.MessageHandlerName, OSF.Webkit.MethodId.UnregisterEvent, id, targetId, agaveResponseCallback); }; - WebViewHostController.prototype.messageParent=function (params) { + WebkitHostController.prototype.messageParent=function (params) { var message=params[Microsoft.Office.WebExtension.Parameters.MessageToParent]; - if (!isNaN(parseFloat(message)) && isFinite(message)) { - message=message.toString(); - } - this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.MessageParent, message, null); + var messageObj={ dialogMessage: { messageType: OSF.DialogMessageType.DialogMessageReceived, messageContent: message } }; + window.opener.postMessage(JSON.stringify(messageObj), window.location.origin); }; - WebViewHostController.prototype.openDialog=function (id, targetId, handler, callback) { + WebkitHostController.prototype.openDialog=function (id, targetId, handler, callback) { + if (WebkitHostController.popup && !WebkitHostController.popup.closed) { + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened); + return; + } + var magicWord="action=displayDialog"; + WebkitHostController.OpenDialogCallback=undefined; + var fragmentSeparator='#'; var callArgs=JSON.parse(targetId); - if (isNaN(callArgs.width) || callArgs.width <=0 || callArgs.width > 100) { - callArgs.width=99; + var callUrl=callArgs.url; + if (!callUrl) { + return; } - if (isNaN(callArgs.height) || callArgs.height <=0 || callArgs.height > 100) { - callArgs.height=99; + var urlParts=callUrl.split(fragmentSeparator); + var seperator="?"; + if (urlParts[0].indexOf("?") > -1) { + seperator="&"; + } + var width=screen.width * callArgs.width / 100; + var height=screen.height * callArgs.height / 100; + var params="width="+width+", height="+height; + urlParts[0]=urlParts[0].concat(seperator).concat(magicWord); + var openUrl=urlParts.join(fragmentSeparator); + WebkitHostController.popup=window.open(openUrl, "", params); + function receiveMessage(event) { + if (event.origin==window.location.origin) { + try { + var messageObj=JSON.parse(event.data); + if (messageObj.dialogMessage) { + handler(id, [OSF.DialogMessageType.DialogMessageReceived, messageObj.dialogMessage.messageContent]); + } + } + catch (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handlered. Message:"+event.data); + } + } } - targetId=JSON.stringify(callArgs); - this.registerEvent(id, targetId, handler, callback); + function checkWindowClose() { + try { + if (WebkitHostController.popup==null || WebkitHostController.popup.closed) { + window.clearInterval(WebkitHostController.interval); + window.removeEventListener("message", receiveMessage); + WebkitHostController.NotifyError=null; + WebkitHostController.popup=null; + handler(id, [OSF.DialogMessageType.DialogClosed]); + } + } + catch (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed."); + } + } + WebkitHostController.OpenDialogCallback=function (code) { + if (code==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { + window.addEventListener("message", receiveMessage); + this.messageEventListener=receiveMessage; + WebkitHostController.interval=window.setInterval(checkWindowClose, 1000); + function notifyError(errorCode) { + handler(id, [errorCode]); + } + WebkitHostController.NotifyError=notifyError; + } + callback(code); + }; }; - WebViewHostController.prototype.closeDialog=function (id, targetId, callback) { - this.unregisterEvent(id, targetId, callback); + WebkitHostController.prototype.closeDialog=function (id, targetId, callback) { + if (WebkitHostController.popup) { + if (WebkitHostController.interval) { + window.clearInterval(WebkitHostController.interval); + } + WebkitHostController.popup.close(); + WebkitHostController.popup=null; + window.removeEventListener("message", this.messageEventListener); + WebkitHostController.NotifyError=null; + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + } + else { + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + } }; - WebViewHostController.prototype.sendMessage=function (params) { + WebkitHostController.prototype.sendMessage=function (params) { var message=params[Microsoft.Office.WebExtension.Parameters.MessageContent]; if (!isNaN(parseFloat(message)) && isFinite(message)) { message=message.toString(); } - this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.SendMessage, message, null); - }; - return WebViewHostController; - })(); - OSFWebView.WebViewHostController=WebViewHostController; -})(OSFWebView || (OSFWebView={})); -var CrossIFrameCommon; -(function (CrossIFrameCommon) { - (function (CallbackType) { - CallbackType[CallbackType["MethodCallback"]=0]="MethodCallback"; - CallbackType[CallbackType["EventCallback"]=1]="EventCallback"; - })(CrossIFrameCommon.CallbackType || (CrossIFrameCommon.CallbackType={})); - var CallbackType=CrossIFrameCommon.CallbackType; - var CallbackData=(function () { - function CallbackData(callbackType, callbackId, params) { - this.callbackType=callbackType; - this.callbackId=callbackId; - this.params=params; - } - return CallbackData; - })(); - CrossIFrameCommon.CallbackData=CallbackData; -})(CrossIFrameCommon || (CrossIFrameCommon={})); -var WinRT; -(function (WinRT) { - var Poster=(function () { - function Poster() { - window.addEventListener("message", this.OnReceiveMessage); - } - Poster.prototype.postMessage=function (handlerName, message) { - window.parent.postMessage(message, "*"); - }; - Poster.prototype.OnReceiveMessage=function (event) { - if (event.source !=window.parent || window.parent !=window.top || !event.origin.startsWith("ms-appx-web://")) { - return; - } - var cbData; - try { - cbData=JSON.parse(event.data); - } - catch (ex) { - return; - } - switch (cbData.callbackType) { - case CrossIFrameCommon.CallbackType.MethodCallback: - OSFWebView.ScriptMessaging.agaveHostCallback(cbData.callbackId, JSON.parse(cbData.params)); - break; - case CrossIFrameCommon.CallbackType.EventCallback: - OSFWebView.ScriptMessaging.agaveHostEventCallback(cbData.callbackId, JSON.parse(cbData.params)); - break; - default: - break; - } + this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName, OSF.Webkit.MethodId.SendMessage, message, null); }; - return Poster; + return WebkitHostController; })(); - WinRT.Poster=Poster; -})(WinRT || (WinRT={})); + OSFWebkit.WebkitHostController=WebkitHostController; +})(OSFWebkit || (OSFWebkit={})); +OSF.Webkit=OSFWebkit; +OSF.ClientHostController=new OSFWebkit.WebkitHostController(OSF.ScriptMessaging.GetScriptMessenger()); OSF.DDA.ClientSettingsManager={ getSettingsExecuteMethod: function OSF_DDA_ClientSettingsManager$getSettingsExecuteMethod(hostDelegateMethod) { return function (args) { @@ -4683,7 +4795,7 @@ OSF.DDA.ClientSettingsManager={ onComplete(status[0], null); } }; - OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.WriteSettings, hostParams, onWriteCompleted); + OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.Webkit.MessageHandlerName, OSF.Webkit.MethodId.WriteSettings, hostParams, onWriteCompleted); } }; OSF.InitializationHelper.prototype.initializeSettings=function OSF_InitializationHelper$initializeSettings(appContext, refreshSupported) { @@ -4694,18 +4806,8 @@ OSF.InitializationHelper.prototype.initializeSettings=function OSF_Initializatio OSF.InitializationHelper.prototype.getAppContext=function OSF_InitializationHelper$getAppContext(wnd, gotAppContext) { var getInvocationCallback=function OSF_InitializationHelper_getAppContextAsync$getInvocationCallbackWebApp(appContext) { var returnedContext; - var appContextProperties=OSF.WebView.AppContextProperties; + var appContextProperties=OSF.Webkit.AppContextProperties; var appType=appContext[appContextProperties.AppType]; - var appTypeSupported=false; - for (var appEntry in OSF.AppName) { - if (OSF.AppName[appEntry]==appType) { - appTypeSupported=true; - break; - } - } - if (!appTypeSupported) { - throw "Unsupported client type "+appType; - } var hostSettings=appContext[appContextProperties.Settings]; var serializedSettings={}; var keys=hostSettings[0]; @@ -4715,6 +4817,7 @@ OSF.InitializationHelper.prototype.getAppContext=function OSF_InitializationHelp } var id=appContext[appContextProperties.SolutionReferenceId]; var version=appContext[appContextProperties.MajorVersion]; + var minorVersion=appContext[appContextProperties.MinorVersion]; var clientMode=appContext[appContextProperties.AppCapabilities]; var UILocale=appContext[appContextProperties.APPUILocale]; var dataLocale=appContext[appContextProperties.AppDataLocale]; @@ -4727,9 +4830,10 @@ OSF.InitializationHelper.prototype.getAppContext=function OSF_InitializationHelp var appInstanceId=appContext[appContextProperties.InstanceId]; var touchEnabled=appContext[appContextProperties.TouchEnabled]; var commerceAllowed=appContext[appContextProperties.CommerceAllowed]; - var minorVersion=appContext[appContextProperties.MinorVersion]; var requirementMatrix=appContext[appContextProperties.RequirementMatrix]; - returnedContext=new OSF.OfficeAppContext(id, appType, version, UILocale, dataLocale, docUrl, clientMode, serializedSettings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, minorVersion, requirementMatrix); + var hostCustomMessage=appContext[appContextProperties.HostCustomMessage]; + var hostFullVersion=appContext[appContextProperties.HostFullVersion]; + returnedContext=new OSF.OfficeAppContext(id, appType, version, UILocale, dataLocale, docUrl, clientMode, serializedSettings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, minorVersion, requirementMatrix, hostCustomMessage, hostFullVersion); if (OSF.AppTelemetry) { OSF.AppTelemetry.initialize(returnedContext); } @@ -4737,71 +4841,13 @@ OSF.InitializationHelper.prototype.getAppContext=function OSF_InitializationHelp }; var handler; if (this._hostInfo.isDialog) { - handler=OSF.WebView.PopupMessageHandlerName; + handler=OSF.Webkit.PopupMessageHandlerName; } else { - handler=OSF.WebView.MessageHandlerName; - } - OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(handler, OSF.WebView.MethodId.GetContext, [], getInvocationCallback); -}; -OSF.InitializationHelper.prototype.setAgaveHostCommunication=function OSF_InitializationHelper$setAgaveHostCommunicationOverride() { - var getAllTabElements=function () { - var tabbableElementsSelector="a[href]:not([tabindex='-1'])," -+"area[href]:not([tabindex='-1'])," -+"button:not([disabled]):not([tabindex='-1'])," -+"input:not([disabled]):not([tabindex='-1'])," -+"select:not([disabled]):not([tabindex='-1'])," -+"textarea:not([disabled]):not([tabindex='-1'])," -+"*[tabindex]:not([tabindex='-1'])," -+"*[contenteditable]:not([disabled]):not([tabindex='-1'])"; - return document.querySelectorAll(tabbableElementsSelector); - }; - OSF.OUtil.addEventListener(window, "keydown", function (e) { - e.preventDefault=e.preventDefault || function () { - e.returnValue=false; - }; - if (e.keyCode==117) { - e.preventDefault(); - e.stopPropagation(); - var actionId=OSF.AgaveHostAction.CtrlF6Exit; - if (e.shiftKey) { - actionId=OSF.AgaveHostAction.CtrlF6ExitShift; - } - OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.OnKeydown, { "actionId": actionId }, null); - } - else if (e.keyCode==27) { - e.preventDefault(); - e.stopPropagation(); - OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.OnKeydown, { "actionId": OSF.AgaveHostAction.EscExit }, null); - } - else if (e.keyCode==9) { - e.preventDefault(); - e.stopPropagation(); - var allTabbableElements=getAllTabElements(); - if (allTabbableElements.length==0) { - return; - } - var focused=OSF.OUtil.focusToNextTabbable(allTabbableElements, e.target || e.srcElement, e.shiftKey); - if (!focused) { - OSF.OUtil.focusToFirstTabbable(allTabbableElements, e.shiftKey); - } - } - }); - var windowOpen=function OSF_InitializationHelper$windowOpen(windowObj) { - windowObj.open=function (strUrl) { - OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.OpenWindow, strUrl); - }; - }; - windowOpen(window); - if (document.activeElement==null || document.activeElement==document.body) { - var allTabbableElements=getAllTabElements(); - if (allTabbableElements.length) { - OSF.OUtil.focusToFirstTabbable(allTabbableElements, false); - } + handler=OSF.Webkit.MessageHandlerName; } + OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(handler, OSF.Webkit.MethodId.GetContext, [], getInvocationCallback); }; -OSF.WebView=OSFWebView; -OSF.ClientHostController=new OSFWebView.WebViewHostController(OSF.ScriptMessaging.GetScriptMessenger("agaveHostCallback", "agaveHostEventCallback", new WinRT.Poster())); var OSFLog; (function (OSFLog) { var BaseUsageData=(function () { @@ -5280,7 +5326,7 @@ var OSFAriaLogger; function AriaLogger() { } AriaLogger.prototype.getAriaCDNLocation=function () { - return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry-2.8.0.min.js"); + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry.js"); }; AriaLogger.getInstance=function () { if (AriaLogger.AriaLoggerObj===undefined) { @@ -5297,13 +5343,10 @@ var OSFAriaLogger; try { if (!this.ALogger) { var OfficeExtensibilityTenantID="db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; - var configuration=new microsoft.applications.telemetry.LogConfiguration(); - configuration.enableAutoUserSession=true; - microsoft.applications.telemetry.LogManager.initialize(OfficeExtensibilityTenantID, configuration); - this.ALogger=new microsoft.applications.telemetry.Logger(); + this.ALogger=AWTLogManager.initialize(OfficeExtensibilityTenantID); } - var eventProperties=new microsoft.applications.telemetry.EventProperties(); - eventProperties.name="Office.Extensibility.OfficeJS."+tableName; + var eventProperties=new AWTEventProperties(); + eventProperties.setName("Office.Extensibility.OfficeJS."+tableName); for (var key in telemetryData) { if (key.toLowerCase() !=="table") { eventProperties.setProperty(key, telemetryData[key]); @@ -5336,6 +5379,7 @@ var OSFAppTelemetry; var sessionId=OSF.OUtil.Guid.generateNewGuid(); var osfControlAppCorrelationId=""; var omexDomainRegex=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"); + OSFAppTelemetry.enableTelemetry=true; ; var AppInfo=(function () { function AppInfo() { @@ -5419,17 +5463,19 @@ var OSFAppTelemetry; function AppLogger() { } AppLogger.prototype.LogData=function (data) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, data.SerializeRow(), OSF.Logger.SendFlag.none); - OSFAriaLogger.AriaLogger.getInstance().logData(data); + try { + OSFAriaLogger.AriaLogger.getInstance().logData(data); + } + catch (e) { + } }; AppLogger.prototype.LogRawData=function (log) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, log, OSF.Logger.SendFlag.none); try { OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)); } @@ -5469,7 +5515,7 @@ var OSFAppTelemetry; } appInfo.message=context.get_hostCustomMessage(); appInfo.officeJSVersion=OSF.ConstantNames.FileVersion; - appInfo.hostJSVersion="16.0.8204.1000"; + appInfo.hostJSVersion="16.0.8828.1000"; if (context._wacHostEnvironment) { appInfo.wacHostEnvironment=context._wacHostEnvironment; } @@ -5960,6 +6006,9 @@ OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEve case Microsoft.Office.WebExtension.EventType.ContentControlAdded: args=new OSF.DDA.ObjectEventArgs(eventType, eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args=new OSF.DDA.RichApiMessageEventArgs(eventType, eventProperties); + break; case Microsoft.Office.WebExtension.EventType.DataNodeInserted: args=new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); break; @@ -5985,10 +6034,28 @@ OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEve args=new OSF.DDA.DialogParentEventArgs(eventProperties); break; case Microsoft.Office.WebExtension.EventType.ItemChanged: - if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlookwebapp") { + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { args=new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); target.initialize(args["initialData"]); - target.setCurrentItemNumber(args["itemNumber"].itemNumber); + if (OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]=="win32") { + target.setCurrentItemNumber(args["itemNumber"].itemNumber); + } + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { + args=new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { + args=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); } else { throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); @@ -6175,6 +6242,13 @@ OSF.DDA.AsyncMethodCalls.define({ "types": ["boolean"], "defaultValue": false } + }, + { + name: Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels, + value: { + "types": ["boolean"], + "defaultValue": false + } } ], privateStateCallbacks: [], @@ -6212,13 +6286,13 @@ OSF.DDA.AsyncMethodCalls.define({ if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] <=0) { callArgs[Microsoft.Office.WebExtension.Parameters.Width]=1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Width]=99; } if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] <=0) { callArgs[Microsoft.Office.WebExtension.Parameters.Height]=1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Height]=99; } if (!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) { @@ -6750,52 +6824,10 @@ OSF.DDA.SettingsManager={ DateJSONPrefix: "Date(", DataJSONSuffix: ")", serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) { - var ret={}; - for (var key in settingsCollection) { - var value=settingsCollection[key]; - try { - if (JSON) { - value=JSON.stringify(value, function dateReplacer(k, v) { - return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix+this[k].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix : v; - }); - } - else { - value=Sys.Serialization.JavaScriptSerializer.serialize(value); - } - ret[key]=value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.serializeSettings(settingsCollection); }, deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) { - var ret={}; - serializedSettings=serializedSettings || {}; - for (var key in serializedSettings) { - var value=serializedSettings[key]; - try { - if (JSON) { - value=JSON.parse(value, function dateReviver(k, v) { - var d; - if (typeof v==='string' && v && v.length > 6 && v.slice(0, 5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) { - d=new Date(parseInt(v.slice(5, -1))); - if (d) { - return d; - } - } - return v; - }); - } - else { - value=Sys.Serialization.JavaScriptSerializer.deserialize(value, true); - } - ret[key]=value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.deserializeSettings(serializedSettings); } }; OSF.DDA.Settings=function OSF_DDA_Settings(settings) { @@ -7229,7 +7261,10 @@ OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { DataNodeDeleted: "nodeDeleted", DataNodeInserted: "nodeInserted", - DataNodeReplaced: "nodeReplaced" + DataNodeReplaced: "nodeReplaced", + NodeDeleted: "nodeDeleted", + NodeInserted: "nodeInserted", + NodeReplaced: "nodeReplaced" }); OSF.DDA.CustomXmlParts=function OSF_DDA_CustomXmlParts() { this._eventDispatches=[]; @@ -8120,7 +8155,7 @@ var OfficeExt; OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize=function OSF_InitializationHelper$prepareRightAfterWebExtensionInitialize() { var appCommandHandler=OfficeExt.AppCommand.AppCommandManager.instance(); appCommandHandler.initializeAndChangeOnce(); - OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.AddinInitialized, {}); + OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.Webkit.MessageHandlerName, OSF.Webkit.MethodId.AddinInitialized, {}); }; OSF.DDA.OneNoteDocument=function OSF_DDA_OneNoteDocument(officeAppContext, settings) { OSF.DDA.OneNoteDocument.uber.constructor.call(this, officeAppContext, null, settings); @@ -8142,9 +8177,10 @@ var __extends=(this && this.__extends) || function (d, b) { var OfficeExtension; (function (OfficeExtension) { var Action=(function () { - function Action(actionInfo, isWriteOperation) { + function Action(actionInfo, isWriteOperation, isRestrictedResourceAccess) { this.m_actionInfo=actionInfo; this.m_isWriteOperation=isWriteOperation; + this.m_isRestrictedResourceAccess=isRestrictedResourceAccess; } Object.defineProperty(Action.prototype, "actionInfo", { get: function () { @@ -8160,12 +8196,30 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(Action.prototype, "isRestrictedResourceAccess", { + get: function () { + return this.m_isRestrictedResourceAccess; + }, + enumerable: true, + configurable: true + }); return Action; }()); OfficeExtension.Action=Action; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + var TraceMarkerActionResultHandler=(function () { + function TraceMarkerActionResultHandler(callback) { + this.m_callback=callback; + } + TraceMarkerActionResultHandler.prototype._handleResult=function (value) { + if (this.m_callback) { + this.m_callback(); + } + }; + return TraceMarkerActionResultHandler; + }()); var ActionFactory=(function () { function ActionFactory() { } @@ -8181,13 +8235,17 @@ var OfficeExtension; var args=[value]; var referencedArgumentObjectPaths=OfficeExtension.Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); OfficeExtension.Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); - var ret=new OfficeExtension.Action(actionInfo, true); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + context._pendingRequest.ensureInstantiateObjectPaths(referencedArgumentObjectPaths); + var ret=new OfficeExtension.Action(actionInfo, true, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); context._pendingRequest.addReferencedObjectPaths(referencedArgumentObjectPaths); + ret.referencedObjectPath=parent._objectPath; + ret.referencedArgumentObjectPaths=referencedArgumentObjectPaths; return ret; }; - ActionFactory.createMethodAction=function (context, parent, methodName, operationType, args) { + ActionFactory.createMethodAction=function (context, parent, methodName, operationType, args, isRestrictedResourceAccess) { OfficeExtension.Utility.validateObjectPath(parent); var actionInfo={ Id: context._nextId(), @@ -8198,15 +8256,20 @@ var OfficeExtension; }; var referencedArgumentObjectPaths=OfficeExtension.Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); OfficeExtension.Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + context._pendingRequest.ensureInstantiateObjectPaths(referencedArgumentObjectPaths); var isWriteOperation=operationType !=1; - var ret=new OfficeExtension.Action(actionInfo, isWriteOperation); + var ret=new OfficeExtension.Action(actionInfo, isWriteOperation, isRestrictedResourceAccess); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); context._pendingRequest.addReferencedObjectPaths(referencedArgumentObjectPaths); + ret.referencedObjectPath=parent._objectPath; + ret.referencedArgumentObjectPaths=referencedArgumentObjectPaths; return ret; }; ActionFactory.createQueryAction=function (context, parent, queryOption) { OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); var actionInfo={ Id: context._nextId(), ActionType: 2, @@ -8214,13 +8277,15 @@ var OfficeExtension; ObjectPathId: parent._objectPath.objectPathInfo.Id, }; actionInfo.QueryInfo=queryOption; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; return ret; }; ActionFactory.createRecursiveQueryAction=function (context, parent, query) { OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); var actionInfo={ Id: context._nextId(), ActionType: 6, @@ -8228,23 +8293,59 @@ var OfficeExtension; ObjectPathId: parent._objectPath.objectPathInfo.Id, RecursiveQueryInfo: query }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; + return ret; + }; + ActionFactory.createQueryAsJsonAction=function (context, parent, queryOption) { + OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + var actionInfo={ + Id: context._nextId(), + ActionType: 7, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + }; + actionInfo.QueryInfo=queryOption; + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; + return ret; + }; + ActionFactory.createEnsureUnchangedAction=function (context, parent, objectState) { + OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + var actionInfo={ + Id: context._nextId(), + ActionType: 8, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }; + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; return ret; }; ActionFactory.createInstantiateAction=function (context, obj) { OfficeExtension.Utility.validateObjectPath(obj); + context._pendingRequest.ensureInstantiateObjectPath(obj._objectPath.parentObjectPath); + context._pendingRequest.ensureInstantiateObjectPaths(obj._objectPath.argumentObjectPaths); var actionInfo={ Id: context._nextId(), ActionType: 1, Name: "", ObjectPathId: obj._objectPath.objectPathInfo.Id }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(obj._objectPath); context._pendingRequest.addActionResultHandler(ret, new OfficeExtension.InstantiateActionResultHandler(obj)); + ret.referencedObjectPath=obj._objectPath; return ret; }; ActionFactory.createTraceAction=function (context, message, addTraceMessage) { @@ -8254,13 +8355,17 @@ var OfficeExtension; Name: "Trace", ObjectPathId: 0 }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); if (addTraceMessage) { context._pendingRequest.addTrace(actionInfo.Id, message); } return ret; }; + ActionFactory.createTraceMarkerForCallback=function (context, callback) { + var action=ActionFactory.createTraceAction(context, null, false); + context._pendingRequest.addActionResultHandler(action, new TraceMarkerActionResultHandler(callback)); + }; return ActionFactory; }()); OfficeExtension.ActionFactory=ActionFactory; @@ -8338,6 +8443,7 @@ var OfficeExtension; }; ClientObject.prototype._recursivelySet=function (input, options, scalarWriteablePropertyNames, objectPropertyNames, notAllowedToBeSetPropertyNames) { var isClientObject=(input instanceof ClientObject); + var originalInput=input; if (isClientObject) { if (Object.getPrototypeOf(this)===Object.getPrototypeOf(input)) { input=JSON.parse(JSON.stringify(input)); @@ -8354,31 +8460,38 @@ var OfficeExtension; for (var i=0; i < scalarWriteablePropertyNames.length; i++) { prop=scalarWriteablePropertyNames[i]; if (input.hasOwnProperty(prop)) { - this[prop]=input[prop]; + if (typeof input[prop] !=="undefined") { + this[prop]=input[prop]; + } } } for (var i=0; i < objectPropertyNames.length; i++) { prop=objectPropertyNames[i]; if (input.hasOwnProperty(prop)) { - this[prop].set(input[prop], options); + if (typeof input[prop] !=="undefined") { + var dataToPassToSet=isClientObject ? originalInput[prop] : input[prop]; + this[prop].set(dataToPassToSet, options); + } } } + var throwOnReadOnly=!isClientObject; + if (options && !OfficeExtension.Utility.isNullOrUndefined(throwOnReadOnly)) { + throwOnReadOnly=options.throwOnReadOnly; + } for (var i=0; i < notAllowedToBeSetPropertyNames.length; i++) { prop=notAllowedToBeSetPropertyNames[i]; if (input.hasOwnProperty(prop)) { - throw new OfficeExtension._Internal.RuntimeError({ - code: OfficeExtension.ErrorCodes.invalidArgument, - message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), - debugInfo: { - errorLocation: prop - } - }); + if (typeof input[prop] !=="undefined" && throwOnReadOnly) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.invalidArgument, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), + debugInfo: { + errorLocation: prop + } + }); + } } } - var throwOnReadOnly=!isClientObject; - if (options && !OfficeExtension.Utility.isNullOrUndefined(throwOnReadOnly)) { - throwOnReadOnly=options.throwOnReadOnly; - } for (prop in input) { if (scalarWriteablePropertyNames.indexOf(prop) < 0 && objectPropertyNames.indexOf(prop) < 0) { var propertyDescriptor=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this), prop); @@ -8426,12 +8539,14 @@ var OfficeExtension; this.m_actions=[]; this.m_actionResultHandler={}; this.m_referencedObjectPaths={}; + this.m_instantiatedObjectPaths={}; this.m_flags=0; this.m_traceInfos={}; this.m_pendingProcessEventHandlers=[]; this.m_pendingEventHandlerActions={}; this.m_responseTraceIds={}; this.m_responseTraceMessages=[]; + this.m_preSyncPromises=[]; } Object.defineProperty(ClientRequest.prototype, "flags", { get: function () { @@ -8477,7 +8592,13 @@ var OfficeExtension; if (action.isWriteOperation) { this.m_flags=this.m_flags | 1; } + if (action.isRestrictedResourceAccess) { + this.m_flags=this.m_flags | 2; + } this.m_actions.push(action); + if (action.actionInfo.ActionType==1) { + this.m_instantiatedObjectPaths[action.actionInfo.ObjectPathId]=action; + } }; Object.defineProperty(ClientRequest.prototype, "hasActions", { get: function () { @@ -8486,9 +8607,39 @@ var OfficeExtension; enumerable: true, configurable: true }); + ClientRequest.prototype._getLastAction=function () { + return this.m_actions[this.m_actions.length - 1]; + }; ClientRequest.prototype.addTrace=function (actionId, message) { this.m_traceInfos[actionId]=message; }; + ClientRequest.prototype.ensureInstantiateObjectPath=function (objectPath) { + if (objectPath) { + if (this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + this.ensureInstantiateObjectPath(objectPath.parentObjectPath); + this.ensureInstantiateObjectPaths(objectPath.argumentObjectPaths); + if (!this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + var actionInfo={ + Id: this.m_context._nextId(), + ActionType: 1, + Name: "", + ObjectPathId: objectPath.objectPathInfo.Id + }; + var instantiateAction=new OfficeExtension.Action(actionInfo, false, false); + instantiateAction.referencedObjectPath=objectPath; + this.addAction(instantiateAction); + } + } + }; + ClientRequest.prototype.ensureInstantiateObjectPaths=function (objectPaths) { + if (objectPaths) { + for (var i=0; i < objectPaths.length; i++) { + this.ensureInstantiateObjectPath(objectPaths[i]); + } + } + }; ClientRequest.prototype.addReferencedObjectPath=function (objectPath) { if (this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]) { return; @@ -8506,6 +8657,9 @@ var OfficeExtension; if (objectPath.isWriteOperation) { this.m_flags=this.m_flags | 1; } + if (objectPath.isRestrictedResourceAccess) { + this.m_flags=this.m_flags | 2; + } this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]=objectPath; if (objectPath.objectPathInfo.ObjectPathType==3) { this.addReferencedObjectPaths(objectPath.argumentObjectPaths); @@ -8524,6 +8678,9 @@ var OfficeExtension; this.m_actionResultHandler[action.actionInfo.Id]=resultHandler; }; ClientRequest.prototype.buildRequestMessageBody=function () { + if (OfficeExtension._internalConfig.enableEarlyDispose) { + ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } var objectPaths={}; for (var i in this.m_referencedObjectPaths) { objectPaths[i]=this.m_referencedObjectPaths[i].objectPathInfo; @@ -8574,12 +8731,95 @@ var OfficeExtension; ClientRequest.prototype._getPendingEventHandlerActions=function (eventHandlers) { return this.m_pendingEventHandlerActions[eventHandlers._id]; }; + ClientRequest.prototype._addPreSyncPromise=function (value) { + this.m_preSyncPromises.push(value); + }; + Object.defineProperty(ClientRequest.prototype, "_preSyncPromises", { + get: function () { + return this.m_preSyncPromises; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_actions", { + get: function () { + return this.m_actions; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_objectPaths", { + get: function () { + return this.m_referencedObjectPaths; + }, + enumerable: true, + configurable: true + }); + ClientRequest._updateLastUsedActionIdOfObjectPathId=function (lastUsedActionIdOfObjectPathId, objectPath, actionId) { + while (objectPath) { + if (lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]) { + return; + } + lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]=actionId; + var argumentObjectPaths=objectPath.argumentObjectPaths; + if (argumentObjectPaths) { + var argumentObjectPathsLength=argumentObjectPaths.length; + for (var i=0; i < argumentObjectPathsLength; i++) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, argumentObjectPaths[i], actionId); + } + } + objectPath=objectPath.parentObjectPath; + } + }; + ClientRequest._calculateLastUsedObjectPathIds=function (actions) { + var lastUsedActionIdOfObjectPathId={}; + var actionsLength=actions.length; + for (var index=actionsLength - 1; index >=0; --index) { + var action=actions[index]; + var actionId=action.actionInfo.Id; + if (action.referencedObjectPath) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, action.referencedObjectPath, actionId); + } + var referencedObjectPaths=action.referencedArgumentObjectPaths; + if (referencedObjectPaths) { + var referencedObjectPathsLength=referencedObjectPaths.length; + for (var refIndex=0; refIndex < referencedObjectPathsLength; refIndex++) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, referencedObjectPaths[refIndex], actionId); + } + } + } + var lastUsedObjectPathIdsOfAction={}; + for (var key in lastUsedActionIdOfObjectPathId) { + var actionId=lastUsedActionIdOfObjectPathId[key]; + var objectPathIds=lastUsedObjectPathIdsOfAction[actionId]; + if (!objectPathIds) { + objectPathIds=[]; + lastUsedObjectPathIdsOfAction[actionId]=objectPathIds; + } + objectPathIds.push(parseInt(key)); + } + for (var index=0; index < actionsLength; index++) { + var action=actions[index]; + var lastUsedObjectPathIds=lastUsedObjectPathIdsOfAction[action.actionInfo.Id]; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + action.actionInfo.L=lastUsedObjectPathIds; + } + else if (action.actionInfo.L) { + delete action.actionInfo.L; + } + } + }; return ClientRequest; }()); OfficeExtension.ClientRequest=ClientRequest; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + OfficeExtension._internalConfig={ + showDisposeInfoInDebugInfo: false, + enableEarlyDispose: true, + alwaysPolyfillClientObjectRetrieveMethod: false + }; var SessionBase=(function () { function SessionBase() { } @@ -8673,6 +8913,15 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(ClientRequestContext.prototype, "debugInfo", { + get: function () { + var prettyPrinter=new OfficeExtension.RequestPrettyPrinter(this._rootObjectPropertyName, this._pendingRequest._objectPaths, this._pendingRequest._actions, OfficeExtension._internalConfig.showDisposeInfoInDebugInfo); + var statements=prettyPrinter.process(); + return { pendingStatements: statements }; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ClientRequestContext.prototype, "trackedObjects", { get: function () { if (!this.m_trackedObjects) { @@ -8692,12 +8941,77 @@ var OfficeExtension; }); ClientRequestContext.prototype.load=function (clientObj, option) { OfficeExtension.Utility.validateContext(this, clientObj); - var queryOption=ClientRequestContext.parseQueryOption(option); + var queryOption=ClientRequestContext._parseQueryOption(option); var action=OfficeExtension.ActionFactory.createQueryAction(this, clientObj, queryOption); this._pendingRequest.addActionResultHandler(action, clientObj); }; - ClientRequestContext.parseQueryOption=function (option) { - var queryOption={}; + ClientRequestContext.isLoadOption=function (loadOption) { + if (!OfficeExtension.Utility.isUndefined(loadOption.select) && (typeof (loadOption.select)==="string" || Array.isArray(loadOption.select))) + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.expand) && (typeof (loadOption.expand)==="string" || Array.isArray(loadOption.expand))) + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.top) && typeof (loadOption.top)==="number") + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.skip) && typeof (loadOption.skip)==="number") + return true; + for (var i in loadOption) { + return false; + } + return true; + }; + ClientRequestContext.parseStrictLoadOption=function (option) { + var ret={ Select: [] }; + ClientRequestContext.parseStrictLoadOptionHelper(ret, "", "option", option); + return ret; + }; + ClientRequestContext.combineQueryPath=function (pathPrefix, key, separator) { + if (pathPrefix.length===0) { + return key; + } + else { + return pathPrefix+separator+key; + } + }; + ClientRequestContext.parseStrictLoadOptionHelper=function (queryInfo, pathPrefix, argPrefix, option) { + for (var key in option) { + var value=option[key]; + if (key==="$all") { + if (typeof (value) !=="boolean") { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + if (value) { + queryInfo.Select.push(ClientRequestContext.combineQueryPath(pathPrefix, "*", "/")); + } + } + else if (key==="$top") { + if (typeof (value) !=="number" || pathPrefix.length > 0) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + queryInfo.Top=value; + } + else if (key==="$skip") { + if (typeof (value) !=="number" || pathPrefix.length > 0) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + queryInfo.Skip=value; + } + else { + if (typeof (value)==="boolean") { + if (value) { + queryInfo.Select.push(ClientRequestContext.combineQueryPath(pathPrefix, key, "/")); + } + } + else if (typeof (value)==="object") { + ClientRequestContext.parseStrictLoadOptionHelper(queryInfo, ClientRequestContext.combineQueryPath(pathPrefix, key, "/"), ClientRequestContext.combineQueryPath(argPrefix, key, "."), value); + } + else { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + } + } + }; + ClientRequestContext._parseQueryOption=function (option) { + var queryOption={}; if (typeof (option)=="string") { var select=option; queryOption.Select=OfficeExtension.Utility._parseSelectExpand(select); @@ -8705,41 +9019,46 @@ var OfficeExtension; else if (Array.isArray(option)) { queryOption.Select=option; } - else if (typeof (option)=="object") { + else if (typeof (option)==="object") { var loadOption=option; - if (typeof (loadOption.select)=="string") { - queryOption.Select=OfficeExtension.Utility._parseSelectExpand(loadOption.select); - } - else if (Array.isArray(loadOption.select)) { - queryOption.Select=loadOption.select; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.select)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.select"); - } - if (typeof (loadOption.expand)=="string") { - queryOption.Expand=OfficeExtension.Utility._parseSelectExpand(loadOption.expand); - } - else if (Array.isArray(loadOption.expand)) { - queryOption.Expand=loadOption.expand; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.expand)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.expand"); - } - if (typeof (loadOption.top)=="number") { - queryOption.Top=loadOption.top; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.top)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.top"); - } - if (typeof (loadOption.skip)=="number") { - queryOption.Skip=loadOption.skip; + if (ClientRequestContext.isLoadOption(loadOption)) { + if (typeof (loadOption.select)=="string") { + queryOption.Select=OfficeExtension.Utility._parseSelectExpand(loadOption.select); + } + else if (Array.isArray(loadOption.select)) { + queryOption.Select=loadOption.select; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.select)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.select"); + } + if (typeof (loadOption.expand)=="string") { + queryOption.Expand=OfficeExtension.Utility._parseSelectExpand(loadOption.expand); + } + else if (Array.isArray(loadOption.expand)) { + queryOption.Expand=loadOption.expand; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.expand)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.expand"); + } + if (typeof (loadOption.top)==="number") { + queryOption.Top=loadOption.top; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.top)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.top"); + } + if (typeof (loadOption.skip)==="number") { + queryOption.Skip=loadOption.skip; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.skip)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.skip"); + } } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.skip)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.skip"); + else { + queryOption=ClientRequestContext.parseStrictLoadOption(option); } } else if (!OfficeExtension.Utility.isNullOrUndefined(option)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option"); + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option"); } return queryOption; }; @@ -8749,7 +9068,7 @@ var OfficeExtension; } var quries={}; for (var key in options) { - quries[key]=ClientRequestContext.parseQueryOption(options[key]); + quries[key]=ClientRequestContext._parseQueryOption(options[key]); } var action=OfficeExtension.ActionFactory.createRecursiveQueryAction(this, clientObj, { Queries: quries, MaxDepth: maxDepth }); this._pendingRequest.addActionResultHandler(action, clientObj); @@ -8757,6 +9076,8 @@ var OfficeExtension; ClientRequestContext.prototype.trace=function (message) { OfficeExtension.ActionFactory.createTraceAction(this, message, true); }; + ClientRequestContext.prototype._processOfficeJsErrorResponse=function (officeJsErrorCode, response) { + }; ClientRequestContext.prototype.syncPrivateMain=function () { var _this=this; return OfficeExtension.Utility._createPromiseFromResult(null) @@ -8784,13 +9105,14 @@ var OfficeExtension; } }) .then(function () { - return _this.syncPrivate(); + var req=_this._pendingRequest; + _this.m_pendingRequest=null; + return _this.processPreSyncPromises(req) + .then(function () { return _this.syncPrivate(req); }); }); }; - ClientRequestContext.prototype.syncPrivate=function () { + ClientRequestContext.prototype.syncPrivate=function (req) { var _this=this; - var req=this._pendingRequest; - this.m_pendingRequest=null; if (!req.hasActions) { return this.processPendingEventHandlers(req); } @@ -8798,7 +9120,7 @@ var OfficeExtension; var requestFlags=req.flags; if (!this._requestExecutor) { if (OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)) { - this._requestExecutor=new OfficeExtension.OfficeJsRequestExecutor(); + this._requestExecutor=new OfficeExtension.OfficeJsRequestExecutor(this); } else { this._requestExecutor=new OfficeExtension.HttpRequestExecutor(); @@ -8816,8 +9138,10 @@ var OfficeExtension; req.invalidatePendingInvalidObjectPaths(); var errorFromResponse=null; var errorFromProcessEventHandlers=null; + this._lastSyncStart=performance.now(); return requestExecutor.executeAsync(this._customData, requestFlags, requestExecutorRequestMessage) .then(function (response) { + _this._lastSyncEnd=performance.now(); errorFromResponse=_this.processRequestExecutorResponseMessage(req, response); return _this.processPendingEventHandlers(req) .catch(function (ex) { @@ -8864,7 +9188,13 @@ var OfficeExtension; req._setResponseTraceIds(response.Body.TraceIds); } var traceMessages=req._responseTraceMessages; + var errorStatementInfo=null; if (response.Body) { + if (response.Body.Error && + response.Body.Error.ActionIndex >=0) { + var prettyPrinter=new OfficeExtension.RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions); + errorStatementInfo=prettyPrinter.processForDebugStatementInfo(response.Body.Error.ActionIndex); + } var actionResults=null; if (response.Body.Results) { actionResults=response.Body.Results; @@ -8890,13 +9220,18 @@ var OfficeExtension; }); } else if (response.Body && response.Body.Error) { + var debugInfo={ + errorLocation: response.Body.Error.Location + }; + if (errorStatementInfo) { + debugInfo.statement=errorStatementInfo.statement; + debugInfo.surroundingStatements=errorStatementInfo.surroundingStatements; + } return new OfficeExtension._Internal.RuntimeError({ code: response.Body.Error.Code, message: response.Body.Error.Message, traceMessages: traceMessages, - debugInfo: { - errorLocation: response.Body.Error.Location - } + debugInfo: debugInfo }); } return null; @@ -8912,6 +9247,17 @@ var OfficeExtension; ClientRequestContext.prototype.createProcessOneEventHandlersFunc=function (eventHandlers, req) { return function () { return eventHandlers._processRegistration(req); }; }; + ClientRequestContext.prototype.processPreSyncPromises=function (req) { + var ret=OfficeExtension.Utility._createPromiseFromResult(null); + for (var i=0; i < req._preSyncPromises.length; i++) { + var p=req._preSyncPromises[i]; + ret=ret.then(this.createProcessOneProSyncFunc(p)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneProSyncFunc=function (p) { + return function () { return p; }; + }; ClientRequestContext.prototype.sync=function (passThroughValue) { return this.syncPrivateMain().then(function () { return passThroughValue; }); }; @@ -8950,9 +9296,15 @@ var OfficeExtension; batch=receivedRunArgs[argOffset+0]; } else if (receivedRunArgs.length==argOffset+2) { - if (receivedRunArgs[argOffset+0] instanceof OfficeExtension.ClientObject) { + if (OfficeExtension.Utility.isNullOrUndefined(receivedRunArgs[argOffset+0])) { + ctxRetriever=ctxInitializer; + } + else if (receivedRunArgs[argOffset+0] instanceof OfficeExtension.ClientObject) { ctxRetriever=function () { return receivedRunArgs[argOffset+0].context; }; } + else if (receivedRunArgs[argOffset+0] instanceof ClientRequestContext) { + ctxRetriever=function () { return receivedRunArgs[argOffset+0]; }; + } else if (Array.isArray(receivedRunArgs[argOffset+0])) { var array=receivedRunArgs[argOffset+0]; if (array.length==0) { @@ -9118,6 +9470,79 @@ var OfficeExtension; return ClientResult; }()); OfficeExtension.ClientResult=ClientResult; + var RetrieveResult=(function () { + function RetrieveResult(m_proxy, m_shouldPolyfill) { + this.m_proxy=m_proxy; + this.m_shouldPolyfill=m_shouldPolyfill; + } + Object.defineProperty(RetrieveResult.prototype, "proxy", { + get: function () { + return this.m_proxy; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RetrieveResult.prototype, "data", { + get: function () { + if (!this.m_isLoaded) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.valueNotLoaded, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: "retrieveResult.data" + } + }); + } + return this.m_data; + }, + enumerable: true, + configurable: true + }); + RetrieveResult.prototype._handleResult=function (value) { + this.m_isLoaded=true; + if (typeof (value)==="object" && value && value._IsNull) { + this.m_data=null; + return; + } + if (this.m_shouldPolyfill) { + this.m_data=this.changePropertyNameToCamelLowerCase(value); + } + else { + this.m_data=value; + } + }; + RetrieveResult.prototype.changePropertyNameToCamelLowerCase=function (value) { + var charCodeUnderscore=95; + if (Array.isArray(value)) { + var ret=[]; + for (var i=0; i < value.length; i++) { + ret.push(this.changePropertyNameToCamelLowerCase(value[i])); + } + return ret; + } + else if (typeof (value)==="object" && value !==null) { + var ret={}; + for (var key in value) { + var propValue=value[key]; + if (key==="_Items") { + ret={}; + ret["items"]=this.changePropertyNameToCamelLowerCase(propValue); + break; + } + else if (key.charCodeAt(0) !==charCodeUnderscore) { + var propName=OfficeExtension.Utility._toCamelLowerCase(key); + ret[propName]=this.changePropertyNameToCamelLowerCase(propValue); + } + } + return ret; + } + else { + return value; + } + }; + return RetrieveResult; + }()); + OfficeExtension.RetrieveResult=RetrieveResult; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { @@ -9139,6 +9564,9 @@ var OfficeExtension; Constants.sourceLibHeader="SdkVersion"; Constants.embeddingPageOrigin="EmbeddingPageOrigin"; Constants.embeddingPageSessionInfo="EmbeddingPageSessionInfo"; + Constants.eventMessageCategory=65536; + Constants.eventWorkbookId="Workbook"; + Constants.eventSourceRemote="Remote"; return Constants; }()); OfficeExtension.Constants=Constants; @@ -9469,7 +9897,7 @@ var OfficeExtension; debugInfo[key]=partialDebugInfo[key]; } if (this.innerError) { - if (this.innerError instanceof OfficeExtension.Error) { + if (this.innerError instanceof OfficeExtension._Internal.RuntimeError) { debugInfo.innerError=this.innerError.debugInfo; } else { @@ -9554,6 +9982,20 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(EventHandlers.prototype, "_context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_callback", { + get: function () { + return this.m_callback; + }, + enumerable: true, + configurable: true + }); EventHandlers.prototype.add=function (handler) { var action=OfficeExtension.ActionFactory.createTraceAction(this.m_context, null, false); this.m_context._pendingRequest._addPendingEventHandlerAction(this, { id: action.actionInfo.Id, handler: handler, operation: 0 }); @@ -9647,6 +10089,13 @@ var OfficeExtension; this.m_allHandlers=handlers; this.m_handler=handler; } + Object.defineProperty(EventHandlerResult.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); EventHandlerResult.prototype.remove=function () { if (this.m_allHandlers && this.m_handler) { this.m_allHandlers.remove(this.m_handler); @@ -9681,6 +10130,8 @@ var OfficeExtension; return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged, handler, callback); }); case 1: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.settings.addHandlerAsync(Office.EventType.SettingsChanged, handler, callback); }); + case 5: + return OfficeExtension.Utility.promisify(function (callback) { return OSF.DDA.RichApi.richApiMessageManager.addHandlerAsync("richApiMessage", handler, callback); }); case 13: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.ObjectDeleted, handler, { id: targetId }, callback); }); case 14: @@ -9709,6 +10160,8 @@ var OfficeExtension; return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.DocumentSelectionChanged, { handler: handler }, callback); }); case 1: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.settings.removeHandlerAsync(Office.EventType.SettingsChanged, { handler: handler }, callback); }); + case 5: + return OfficeExtension.Utility.promisify(function (callback) { return OSF.DDA.RichApi.richApiMessageManager.removeHandlerAsync("richApiMessage", { handler: handler }, callback); }); case 13: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDeleted, { id: targetId, handler: handler }, callback); }); case 14: @@ -9779,6 +10232,139 @@ var OfficeExtension; OfficeExtension.EventRegistration=EventRegistration; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var GenericEventRegistration=(function () { + function GenericEventRegistration() { + this.m_eventRegistration=new OfficeExtension.EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)); + this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this); + } + GenericEventRegistration.prototype.ready=function () { + var _this=this; + if (!this.m_ready) { + if (GenericEventRegistration._testReadyImpl) { + this.m_ready=GenericEventRegistration._testReadyImpl() + .then(function () { + _this.m_isReady=true; + }); + } + else { + this.m_ready=OfficeExtension._Internal.officeJsEventRegistration.register(5, "", this.m_richApiMessageHandler) + .then(function () { + _this.m_isReady=true; + }); + } + } + return this.m_ready; + }; + Object.defineProperty(GenericEventRegistration.prototype, "isReady", { + get: function () { + return this.m_isReady; + }, + enumerable: true, + configurable: true + }); + GenericEventRegistration.prototype.register=function (eventId, targetId, handler) { + var _this=this; + return this.ready() + .then(function () { return _this.m_eventRegistration.register(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype.unregister=function (eventId, targetId, handler) { + var _this=this; + return this.ready() + .then(function () { return _this.m_eventRegistration.unregister(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype._registerEventImpl=function (eventId, targetId) { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._unregisterEventImpl=function (eventId, targetId) { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._handleRichApiMessage=function (msg) { + if (msg && msg.entries) { + for (var entryIndex=0; entryIndex < msg.entries.length; entryIndex++) { + var entry=msg.entries[entryIndex]; + if (entry.messageCategory==OfficeExtension.Constants.eventMessageCategory) { + if (OfficeExtension.Utility._logEnabled) { + OfficeExtension.Utility.log(JSON.stringify(entry)); + } + var funcs=this.m_eventRegistration.getHandlers(entry.messageType, entry.targetId); + if (funcs.length > 0) { + var arg=JSON.parse(entry.message); + if (entry.isRemoteOverride) { + arg.source=OfficeExtension.Constants.eventSourceRemote; + } + for (var i=0; i < funcs.length; i++) { + funcs[i](arg); + } + } + } + } + } + }; + GenericEventRegistration.getGenericEventRegistration=function () { + if (!GenericEventRegistration.s_genericEventRegistration) { + GenericEventRegistration.s_genericEventRegistration=new GenericEventRegistration(); + } + return GenericEventRegistration.s_genericEventRegistration; + }; + GenericEventRegistration.richApiMessageEventCategory=65536; + return GenericEventRegistration; + }()); + function _testSetRichApiMessageReadyImpl(impl) { + GenericEventRegistration._testReadyImpl=impl; + } + OfficeExtension._testSetRichApiMessageReadyImpl=_testSetRichApiMessageReadyImpl; + function _testTriggerRichApiMessageEvent(msg) { + GenericEventRegistration.getGenericEventRegistration()._handleRichApiMessage(msg); + } + OfficeExtension._testTriggerRichApiMessageEvent=_testTriggerRichApiMessageEvent; + var GenericEventHandlers=(function (_super) { + __extends(GenericEventHandlers, _super); + function GenericEventHandlers(context, parentObject, name, eventInfo) { + _super.call(this, context, parentObject, name, eventInfo); + this.m_genericEventInfo=eventInfo; + } + GenericEventHandlers.prototype.add=function (handler) { + var _this=this; + if ((this._handlers.length==0) && this.m_genericEventInfo.registerFunc) { + this.m_genericEventInfo.registerFunc(); + } + if (!GenericEventRegistration.getGenericEventRegistration().isReady) { + this._context._pendingRequest._addPreSyncPromise(GenericEventRegistration.getGenericEventRegistration().ready()); + } + OfficeExtension.ActionFactory.createTraceMarkerForCallback(this._context, function () { + _this._handlers.push(handler); + if (_this._handlers.length==1) { + GenericEventRegistration.getGenericEventRegistration().register(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + return new OfficeExtension.EventHandlerResult(this._context, this, handler); + }; + GenericEventHandlers.prototype.remove=function (handler) { + var _this=this; + if ((this._handlers.length==1) && this.m_genericEventInfo.unregisterFunc) { + this.m_genericEventInfo.unregisterFunc(); + } + OfficeExtension.ActionFactory.createTraceMarkerForCallback(this._context, function () { + var handlers=_this._handlers; + for (var index=handlers.length - 1; index >=0; index--) { + if (handlers[index]===handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length==0) { + GenericEventRegistration.getGenericEventRegistration().unregister(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + }; + GenericEventHandlers.prototype.removeAll=function () { + }; + return GenericEventHandlers; + }(OfficeExtension.EventHandlers)); + OfficeExtension.GenericEventHandlers=GenericEventHandlers; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var HttpRequestExecutor=(function () { function HttpRequestExecutor() { @@ -9830,15 +10416,6 @@ var OfficeExtension; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { - var _Internal; - (function (_Internal) { - _Internal.OfficeRequire=function () { - if (typeof (require) !=="undefined") { - return require; - } - return null; - }(); - })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); var HttpUtility=(function () { function HttpUtility() { } @@ -9846,7 +10423,7 @@ var OfficeExtension; HttpUtility.s_customSendRequestFunc=func; }; HttpUtility.xhrSendRequestFunc=function (request) { - return new _Internal.OfficePromise(function (resolve, reject) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { var xhr=new XMLHttpRequest(); xhr.open(request.method, request.url); xhr.onload=function () { @@ -9858,7 +10435,7 @@ var OfficeExtension; resolve(resp); }; xhr.onerror=function () { - reject(new _Internal.RuntimeError({ + reject(new OfficeExtension._Internal.RuntimeError({ code: OfficeExtension.ErrorCodes.connectionFailure, message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.connectionFailureWithStatus, xhr.statusText) })); @@ -9871,34 +10448,11 @@ var OfficeExtension; xhr.send(request.body); }); }; - HttpUtility.nodejsRequestModuleSendRequestFunc=function (requestInfo) { - HttpUtility.logRequest(requestInfo); - var fetch=_Internal.OfficeRequire(HttpUtility.NodeJsRequestModuleName); - return fetch(requestInfo.url, { method: requestInfo.method, headers: requestInfo.headers, body: requestInfo.body }) - .then(function (resp) { - return resp.text() - .then(function (body) { - var statusCode=resp.status; - var headers={}; - resp.headers.forEach(function (value, name) { - headers[name]=value; - }); - var ret={ statusCode: statusCode, headers: headers, body: body }; - HttpUtility.logResponse(ret); - return ret; - }); - }); - }; HttpUtility.sendRequest=function (request) { HttpUtility.validateAndNormalizeRequest(request); var func=HttpUtility.s_customSendRequestFunc; if (!func) { - if (typeof (window)==="undefined" || typeof (XMLHttpRequest)==="undefined") { - func=HttpUtility.nodejsRequestModuleSendRequestFunc; - } - else { - func=HttpUtility.xhrSendRequestFunc; - } + func=HttpUtility.xhrSendRequestFunc; } return func(request); }; @@ -9914,7 +10468,7 @@ var OfficeExtension; HttpUtility.officeJsSendLocalDocumentRequestFunc=function (request) { request=OfficeExtension.Utility._validateLocalDocumentRequest(request); var requestSafeArray=OfficeExtension.Utility._buildRequestMessageSafeArray(request); - return new _Internal.OfficePromise(function (resolve, reject) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { OSF.DDA.RichApi.executeRichApiRequestAsync(requestSafeArray, function (asyncResult) { var response; if (asyncResult.status=="succeeded") { @@ -9934,7 +10488,7 @@ var OfficeExtension; }; HttpUtility.validateAndNormalizeRequest=function (request) { if (OfficeExtension.Utility.isNullOrUndefined(request)) { - throw _Internal.RuntimeError._createInvalidArgError({ + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError({ argumentName: "request" }); } @@ -9971,7 +10525,6 @@ var OfficeExtension; } } }; - HttpUtility.NodeJsRequestModuleName="node-fetch"; HttpUtility._logBody=false; return HttpUtility; }()); @@ -9995,6 +10548,146 @@ var OfficeExtension; ; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var HostBridgeRequestExecutor=(function () { + function HostBridgeRequestExecutor(session) { + this.m_session=session; + } + HostBridgeRequestExecutor.prototype.executeAsync=function (customData, requestFlags, requestMessage) { + var httpRequestInfo={ + url: OfficeExtension.Constants.processQuery, + method: "POST", + headers: requestMessage.Headers, + body: requestMessage.Body + }; + var message={ + id: HostBridgeSession.nextId(), + type: 1, + flags: requestFlags, + message: httpRequestInfo + }; + OfficeExtension.Utility.log(JSON.stringify(message)); + return this.m_session.sendMessageToHost(message) + .then(function (nativeBridgeResponse) { + OfficeExtension.Utility.log("Received response: "+JSON.stringify(nativeBridgeResponse)); + var responseInfo=nativeBridgeResponse.message; + var response; + if (responseInfo.statusCode===200) { + response={ ErrorCode: null, ErrorMessage: null, Headers: responseInfo.headers, Body: responseInfo.body }; + } + else { + OfficeExtension.Utility.log("Error Response:"+responseInfo.body); + var error=OfficeExtension.Utility._parseErrorResponse(responseInfo); + response={ + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null + }; + } + return response; + }); + }; + return HostBridgeRequestExecutor; + }()); + var HostBridgeSession=(function (_super) { + __extends(HostBridgeSession, _super); + function HostBridgeSession(bridge) { + var _this=this; + _super.call(this); + this.m_promiseResolver={}; + this.m_bridge=bridge; + this.m_bridge.onMessageFromHost=function (msg) { + _this.onMessageFromHost(msg); + }; + } + HostBridgeSession.prototype._resolveRequestUrlAndHeaderInfo=function () { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + HostBridgeSession.prototype._createRequestExecutorOrNull=function () { + OfficeExtension.Utility.log("NativeBridgeSession::CreateRequestExecutor"); + return new HostBridgeRequestExecutor(this); + }; + Object.defineProperty(HostBridgeSession.prototype, "eventRegistration", { + get: function () { + return OfficeExtension._Internal.officeJsEventRegistration; + }, + enumerable: true, + configurable: true + }); + HostBridgeSession.init=function (bridge) { + if (bridge && typeof (bridge)==="object") { + var session=new HostBridgeSession(bridge); + OfficeExtension.ClientRequestContext._overrideSession=session; + OfficeExtension.HttpUtility.setCustomSendLocalDocumentRequestFunc(function (request) { + var bridgeMessage={ + id: HostBridgeSession.nextId(), + type: 1, + flags: 0, + message: request + }; + return session.sendMessageToHost(bridgeMessage) + .then(function (bridgeResponse) { + var responseInfo=bridgeResponse.message; + return responseInfo; + }); + }); + } + }; + HostBridgeSession.prototype.sendMessageToHost=function (message) { + var _this=this; + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + var ret=new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { + _this.m_promiseResolver[message.id]=resolve; + }); + return ret; + }; + HostBridgeSession.prototype.onMessageFromHost=function (messageText) { + if (messageText==="test") { + if (HostBridgeTest._testFunc) { + HostBridgeTest._testFunc(); + } + } + else { + var message=JSON.parse(messageText); + if (typeof (message.id)==="number") { + var resolve=this.m_promiseResolver[message.id]; + if (resolve) { + resolve(message); + } + delete this.m_promiseResolver[message.id]; + } + } + }; + HostBridgeSession.nextId=function () { + return HostBridgeSession.s_nextId++; + }; + HostBridgeSession.s_nextId=1; + return HostBridgeSession; + }(OfficeExtension.SessionBase)); + var HostBridge=(function () { + function HostBridge() { + } + HostBridge.init=function (bridge) { + HostBridgeSession.init(bridge); + }; + return HostBridge; + }()); + OfficeExtension.HostBridge=HostBridge; + if (typeof (_richApiNativeBridge)==="object" && _richApiNativeBridge) { + HostBridge.init(_richApiNativeBridge); + } + var HostBridgeTest=(function () { + function HostBridgeTest() { + } + HostBridgeTest.setTestFunc=function (func) { + HostBridgeTest._testFunc=func; + }; + return HostBridgeTest; + }()); + OfficeExtension.HostBridgeTest=HostBridgeTest; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var ObjectPath=(function () { function ObjectPath(objectPathInfo, parentObjectPath, isCollection, isInvalidAfterRequest) { @@ -10022,6 +10715,16 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(ObjectPath.prototype, "isRestrictedResourceAccess", { + get: function () { + return this.m_isRestrictedResourceAccess; + }, + set: function (value) { + this.m_isRestrictedResourceAccess=value; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ObjectPath.prototype, "isCollection", { get: function () { return this.m_isCollection; @@ -10108,6 +10811,7 @@ var OfficeExtension; this.m_objectPathInfo.ObjectPathType=6; this.m_objectPathInfo.Name=referenceId; this.m_objectPathInfo.ArgumentInfo={}; + delete this.m_objectPathInfo.ParentObjectPathId; this.m_parentObjectPath=null; this.m_argumentObjectPaths=null; return; @@ -10122,15 +10826,15 @@ var OfficeExtension; if (!OfficeExtension.Utility.isNullOrUndefined(id)) { this.m_isInvalidAfterRequest=false; this.m_isValid=true; - if (parentIsCollection) { - this.m_objectPathInfo.ObjectPathType=5; - this.m_objectPathInfo.Name=""; - } - else { + if (!OfficeExtension.Utility.isNullOrEmptyString(getByIdMethodName)) { this.m_objectPathInfo.ObjectPathType=3; this.m_objectPathInfo.Name=getByIdMethodName; this.m_getByIdMethodName=null; } + else { + this.m_objectPathInfo.ObjectPathType=5; + this.m_objectPathInfo.Name=""; + } this.isWriteOperation=false; this.m_objectPathInfo.ArgumentInfo={}; this.m_objectPathInfo.ArgumentInfo.Arguments=[id]; @@ -10165,18 +10869,22 @@ var OfficeExtension; var objectPathInfo={ Id: context._nextId(), ObjectPathType: 1, Name: "" }; return new OfficeExtension.ObjectPath(objectPathInfo, null, false, false); }; - ObjectPathFactory.createNewObjectObjectPath=function (context, typeName, isCollection) { + ObjectPathFactory.createNewObjectObjectPath=function (context, typeName, isCollection, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 2, Name: typeName }; - return new OfficeExtension.ObjectPath(objectPathInfo, null, isCollection, false); + var ret=new OfficeExtension.ObjectPath(objectPathInfo, null, isCollection, false); + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; }; - ObjectPathFactory.createPropertyObjectPath=function (context, parent, propertyName, isCollection, isInvalidAfterRequest) { + ObjectPathFactory.createPropertyObjectPath=function (context, parent, propertyName, isCollection, isInvalidAfterRequest, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 4, Name: propertyName, ParentObjectPathId: parent._objectPath.objectPathInfo.Id, }; - return new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest); + var ret=new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest); + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; }; ObjectPathFactory.createIndexerObjectPath=function (context, parent, args) { var objectPathInfo={ @@ -10200,7 +10908,7 @@ var OfficeExtension; objectPathInfo.ArgumentInfo.Arguments=args; return new OfficeExtension.ObjectPath(objectPathInfo, parentObjectPath, false, false); }; - ObjectPathFactory.createMethodObjectPath=function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName) { + ObjectPathFactory.createMethodObjectPath=function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 3, @@ -10213,6 +10921,7 @@ var OfficeExtension; ret.argumentObjectPaths=argumentObjectPaths; ret.isWriteOperation=(operationType !=1); ret.getByIdMethodName=getByIdMethodName; + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; return ret; }; ObjectPathFactory.createReferenceIdObjectPath=function (context, referenceId) { @@ -10274,9 +10983,11 @@ var OfficeExtension; var OfficeExtension; (function (OfficeExtension) { var OfficeJsRequestExecutor=(function () { - function OfficeJsRequestExecutor() { + function OfficeJsRequestExecutor(context) { + this.m_context=context; } OfficeJsRequestExecutor.prototype.executeAsync=function (customData, requestFlags, requestMessage) { + var _this=this; var messageSafearray=OfficeExtension.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, OfficeJsRequestExecutor.SourceLibHeaderValue); return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { OSF.DDA.RichApi.executeRichApiRequestAsync(messageSafearray, function (result) { @@ -10288,6 +10999,7 @@ var OfficeExtension; } else { response=OfficeExtension.RichApiMessageUtility.buildResponseOnError(result.error.code, result.error.message); + _this.m_context._processOfficeJsErrorResponse(result.error.code, response); } resolve(response); }); @@ -10300,6 +11012,12 @@ var OfficeExtension; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + var _Internal; + (function (_Internal) { + _Internal.OfficeRequire=function () { + return null; + }(); + })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); var _Internal; (function (_Internal) { var PromiseImpl; @@ -10403,17 +11121,6 @@ var OfficeExtension; } lib$es6$promise$asap$$len=0; } - function lib$es6$promise$asap$$attemptVertex() { - try { - var r=require; - var vertx=r('vertx'); - lib$es6$promise$asap$$vertxNext=vertx.runOnLoop || vertx.runOnContext; - return lib$es6$promise$asap$$useVertxTimer(); - } - catch (e) { - return lib$es6$promise$asap$$useSetTimeout(); - } - } var lib$es6$promise$asap$$scheduleFlush; if (lib$es6$promise$asap$$isNode) { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useNextTick(); @@ -10424,9 +11131,6 @@ var OfficeExtension; else if (lib$es6$promise$asap$$isWorker) { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useMessageChannel(); } - else if (lib$es6$promise$asap$$browserWindow===undefined && typeof require==='function') { - lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$attemptVertex(); - } else { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useSetTimeout(); } @@ -10944,6 +11648,305 @@ var OfficeExtension; OfficeExtension.TrackedObjects=TrackedObjects; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var RequestPrettyPrinter=(function () { + function RequestPrettyPrinter(globalObjName, referencedObjectPaths, actions, showDispose) { + if (!globalObjName) { + globalObjName="root"; + } + this.m_globalObjName=globalObjName; + this.m_referencedObjectPaths=referencedObjectPaths; + this.m_actions=actions; + this.m_statements=[]; + this.m_variableNameForObjectPathMap={}; + this.m_variableNameToObjectPathMap={}; + this.m_declaredObjectPathMap={}; + this.m_showDispose=showDispose; + } + RequestPrettyPrinter.prototype.process=function () { + if (this.m_showDispose) { + OfficeExtension.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + for (var i=0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + } + return this.m_statements; + }; + RequestPrettyPrinter.prototype.processForDebugStatementInfo=function (actionIndex) { + if (this.m_showDispose) { + OfficeExtension.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + var surroundingCount=5; + this.m_statements=[]; + var oneStatement=""; + var statementIndex=-1; + for (var i=0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + if (actionIndex==i) { + statementIndex=this.m_statements.length - 1; + } + if (statementIndex >=0 && this.m_statements.length > statementIndex+surroundingCount+1) { + break; + } + } + if (statementIndex < 0) { + return null; + } + var startIndex=statementIndex - surroundingCount; + if (startIndex < 0) { + startIndex=0; + } + var endIndex=statementIndex+1+surroundingCount; + if (endIndex > this.m_statements.length) { + endIndex=this.m_statements.length; + } + var surroundingStatements=[]; + if (startIndex !=0) { + surroundingStatements.push("..."); + } + for (var i_1=startIndex; i_1 < statementIndex; i_1++) { + surroundingStatements.push(this.m_statements[i_1]); + } + surroundingStatements.push("// >>>>>"); + surroundingStatements.push(this.m_statements[statementIndex]); + surroundingStatements.push("// <<<<<"); + for (var i_2=statementIndex+1; i_2 < endIndex; i_2++) { + surroundingStatements.push(this.m_statements[i_2]); + } + if (endIndex < this.m_statements.length) { + surroundingStatements.push("..."); + } + return { + statement: this.m_statements[statementIndex], + surroundingStatements: surroundingStatements + }; + }; + RequestPrettyPrinter.prototype.processOneAction=function (action) { + var actionInfo=action.actionInfo; + switch (actionInfo.ActionType) { + case 1: + this.processInstantiateAction(action); + break; + case 3: + this.processMethodAction(action); + break; + case 2: + this.processQueryAction(action); + break; + case 7: + this.processQueryAsJsonAction(action); + break; + case 6: + this.processRecursiveQueryAction(action); + break; + case 4: + this.processSetPropertyAction(action); + break; + case 5: + this.processTraceAction(action); + break; + case 8: + this.processEnsureUnchangedAction(action); + break; + } + }; + RequestPrettyPrinter.prototype.processInstantiateAction=function (action) { + var objId=action.actionInfo.ObjectPathId; + var objPath=this.m_referencedObjectPaths[objId]; + var varName=this.getObjVarName(objId); + if (!this.m_declaredObjectPathMap[objId]) { + var statement="var "+varName+"="+this.buildObjectPathExpressionWithParent(objPath)+";"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + this.m_declaredObjectPathMap[objId]=varName; + } + else { + var statement="// Instantiate {"+varName+"}"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + } + }; + RequestPrettyPrinter.prototype.processMethodAction=function (action) { + var methodName=action.actionInfo.Name; + if (methodName==="_KeepReference") { + methodName="track"; + } + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+"."+OfficeExtension.Utility._toCamelLowerCase(methodName)+"("+this.buildArgumentsExpression(action.actionInfo.ArgumentInfo)+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAction=function (action) { + var queryExp=this.buildQueryExpression(action); + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".load("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAsJsonAction=function (action) { + var queryExp=this.buildQueryExpression(action); + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".loadJson("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processRecursiveQueryAction=function (action) { + var queryExp=""; + if (action.actionInfo.RecursiveQueryInfo) { + queryExp=JSON.stringify(action.actionInfo.RecursiveQueryInfo); + } + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".loadRecursive("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processSetPropertyAction=function (action) { + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+"."+OfficeExtension.Utility._toCamelLowerCase(action.actionInfo.Name)+"="+this.buildArgumentsExpression(action.actionInfo.ArgumentInfo)+";"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processTraceAction=function (action) { + var statement="context.trace();"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processEnsureUnchangedAction=function (action) { + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".ensureUnchanged("+JSON.stringify(action.actionInfo.ObjectState)+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.appendDisposeCommentIfRelevant=function (statement, action) { + var _this=this; + if (this.m_showDispose) { + var lastUsedObjectPathIds=action.actionInfo.L; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + var objectNamesToDispose=lastUsedObjectPathIds.map(function (item) { return _this.getObjVarName(item); }).join(", "); + return statement+" // And then dispose {"+objectNamesToDispose+"}"; + } + } + return statement; + }; + RequestPrettyPrinter.prototype.buildQueryExpression=function (action) { + if (action.actionInfo.QueryInfo) { + var option={}; + option.select=action.actionInfo.QueryInfo.Select; + option.expand=action.actionInfo.QueryInfo.Expand; + option.skip=action.actionInfo.QueryInfo.Skip; + option.top=action.actionInfo.QueryInfo.Top; + if (typeof (option.top)==="undefined" && typeof (option.skip)==="undefined" && typeof (option.expand)==="undefined") { + if (typeof (option.select)==="undefined") { + return ""; + } + else { + return JSON.stringify(option.select); + } + } + else { + return JSON.stringify(option); + } + } + return ""; + }; + RequestPrettyPrinter.prototype.buildObjectPathExpressionWithParent=function (objPath) { + var hasParent=objPath.objectPathInfo.ObjectPathType==5 || + objPath.objectPathInfo.ObjectPathType==3 || + objPath.objectPathInfo.ObjectPathType==4; + if (hasParent && objPath.objectPathInfo.ParentObjectPathId) { + return this.getObjVarName(objPath.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(objPath); + } + return this.buildObjectPathExpression(objPath); + }; + RequestPrettyPrinter.prototype.buildObjectPathExpression=function (objPath) { + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + return "context."+this.m_globalObjName; + case 5: + return "getItem("+this.buildArgumentsExpression(objPath.objectPathInfo.ArgumentInfo)+")"; + case 3: + return OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name)+"("+this.buildArgumentsExpression(objPath.objectPathInfo.ArgumentInfo)+")"; + case 2: + return objPath.objectPathInfo.Name+".newObject()"; + case 7: + return "null"; + case 4: + return OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + case 6: + return "context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(objPath.objectPathInfo.Name)+")"; + } + }; + RequestPrettyPrinter.prototype.buildArgumentsExpression=function (args) { + var ret=""; + if (!args.Arguments) { + return ret; + } + for (var i=0; i < args.Arguments.length; i++) { + if (i > 0) { + ret=ret+", "; + } + ret=ret+this.buildArgumentLiteral(args.Arguments[i], args.ReferencedObjectPathIds ? args.ReferencedObjectPathIds[i] : null); + } + if (ret==="undefined") { + ret=""; + } + return ret; + }; + RequestPrettyPrinter.prototype.buildArgumentLiteral=function (value, objectPathId) { + if (typeof value=="number" && value===objectPathId) { + return this.getObjVarName(objectPathId); + } + else { + return JSON.stringify(value); + } + }; + RequestPrettyPrinter.prototype.getObjVarNameBase=function (objectPathId) { + var ret="v"; + var objPath=this.m_referencedObjectPaths[objectPathId]; + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + ret=this.m_globalObjName; + break; + case 4: + ret=OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + break; + case 3: + var methodName=objPath.objectPathInfo.Name; + if (methodName.length > 3 && methodName.substr(0, 3)==="Get") { + methodName=methodName.substr(3); + } + ret=OfficeExtension.Utility._toCamelLowerCase(methodName); + break; + case 5: + var parentName=this.getObjVarNameBase(objPath.objectPathInfo.ParentObjectPathId); + if (parentName.charAt(parentName.length - 1)==="s") { + ret=parentName.substr(0, parentName.length - 1); + } + else { + ret=parentName+"Item"; + } + break; + } + return ret; + }; + RequestPrettyPrinter.prototype.getObjVarName=function (objectPathId) { + if (this.m_variableNameForObjectPathMap[objectPathId]) { + return this.m_variableNameForObjectPathMap[objectPathId]; + } + var ret=this.getObjVarNameBase(objectPathId); + if (!this.m_variableNameToObjectPathMap[ret]) { + this.m_variableNameForObjectPathMap[objectPathId]=ret; + this.m_variableNameToObjectPathMap[ret]=objectPathId; + return ret; + } + var i=1; + while (this.m_variableNameToObjectPathMap[ret+i.toString()]) { + i++; + } + ret=ret+i.toString(); + this.m_variableNameForObjectPathMap[objectPathId]=ret; + this.m_variableNameToObjectPathMap[ret]=objectPathId; + return ret; + }; + return RequestPrettyPrinter; + }()); + OfficeExtension.RequestPrettyPrinter=RequestPrettyPrinter; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var ResourceStrings=(function () { function ResourceStrings() { @@ -10964,6 +11967,14 @@ var OfficeExtension; ResourceStrings.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod"; ResourceStrings.valueNotLoaded="ValueNotLoaded"; ResourceStrings.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage"; + ResourceStrings.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"; + ResourceStrings.customFunctionDefintionMissing="CustomFunctionDefintionMissing"; + ResourceStrings.customFunctionImplementationMissing="CustomFunctionImplementationMissing"; + ResourceStrings.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars"; + ResourceStrings.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit"; + ResourceStrings.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch"; + ResourceStrings.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing"; + ResourceStrings.apiNotFoundDetails="ApiNotFoundDetails"; return ResourceStrings; }()); OfficeExtension.ResourceStrings=ResourceStrings; @@ -10983,7 +11994,15 @@ var OfficeExtension; ResourceStringValues.RunMustReturnPromise="The batch function passed to the \".run\" method didn't return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from \"context.sync()\"."; ResourceStringValues.Timeout="The operation has timed out."; ResourceStringValues.ValueNotLoaded="The value of the result object has not been loaded yet. Before reading the value property, call \"context.sync()\" on the associated request context."; - ResourceStringValues.invalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page."; + ResourceStringValues.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page."; + ResourceStringValues.InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again."; + ResourceStringValues.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions."; + ResourceStringValues.CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function."; + ResourceStringValues.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods."; + ResourceStringValues.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name."; + ResourceStringValues.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it."; + ResourceStringValues.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable."; + ResourceStringValues.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}."; return ResourceStringValues; }()); OfficeExtension.ResourceStringValues=ResourceStringValues; @@ -11277,6 +12296,34 @@ var OfficeExtension; }; Utility.load=function (clientObj, option) { clientObj.context.load(clientObj, option); + return clientObj; + }; + Utility.loadAndSync=function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj.context.sync().then(function () { return clientObj; }); + }; + Utility.retrieve=function (clientObj, option) { + var shouldPolyfill=OfficeExtension._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + if (typeof (window) !=="undefined" && window.Office && window.Office.context && window.Office.context.requirements) { + shouldPolyfill=!window.Office.context.requirements.isSetSupported("RichApiRuntime", "1.1"); + } + } + var result=new OfficeExtension.RetrieveResult(clientObj, shouldPolyfill); + var queryOption=OfficeExtension.ClientRequestContext._parseQueryOption(option); + var action; + if (shouldPolyfill) { + action=OfficeExtension.ActionFactory.createQueryAction(clientObj.context, clientObj, queryOption); + } + else { + action=OfficeExtension.ActionFactory.createQueryAsJsonAction(clientObj.context, clientObj, queryOption); + } + clientObj.context._pendingRequest.addActionResultHandler(action, result); + return result; + }; + Utility.retrieveAndSync=function (clientObj, option) { + var result=Utility.retrieve(clientObj, option); + return clientObj.context.sync().then(function () { return result; }); }; Utility._parseSelectExpand=function (select) { var args=[]; @@ -11297,11 +12344,32 @@ var OfficeExtension; return '*'; } var itemsSlashLength=6; - if (propertyNameLower.substr(0, itemsSlashLength)==="items/") { + var isItemsSlashOrItemsDot=propertyNameLower.substr(0, itemsSlashLength)==="items/" || + propertyNameLower.substr(0, itemsSlashLength)==="items."; + if (isItemsSlashOrItemsDot) { propertyName=propertyName.substr(itemsSlashLength); } - return propertyName.replace(new RegExp("\/items\/", "gi"), "/"); + return propertyName.replace(new RegExp("[\/\.]items[\/\.]", "gi"), "/"); + } + }; + Utility.toJson=function (clientObj, scalarProperties, navigationProperties, collectionItemsIfAny) { + var result={}; + for (var prop in scalarProperties) { + var value=scalarProperties[prop]; + if (typeof value !=="undefined") { + result[prop]=value; + } + } + for (var prop in navigationProperties) { + var value=navigationProperties[prop]; + if (typeof value !=="undefined") { + result[prop]=value.toJSON(); + } + } + if (collectionItemsIfAny) { + result["items"]=collectionItemsIfAny.map(function (item) { return item.toJSON(); }); } + return result; }; Utility.throwError=function (resourceId, arg, errorLocation) { throw new OfficeExtension._Internal.RuntimeError({ @@ -11363,6 +12431,21 @@ var OfficeExtension; }); } }; + Utility.throwIfApiNotSupported=function (apiFullName, apiSetName, apiSetVersion, hostName) { + if (!Utility._doApiNotSupportedCheck) { + return; + } + if (typeof (window) !=="undefined" && window.Office && window.Office.context) { + if (!window.Office.context.requirements.isSetSupported(apiSetName, apiSetVersion)) { + var message=Utility._getResourceString(OfficeExtension.ResourceStrings.apiNotFoundDetails, [apiFullName, apiSetName+" "+apiSetVersion, hostName]); + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.apiNotFound, + message: message, + debugInfo: { errorLocation: apiFullName } + }); + } + } + }; Utility.getObjectPathExpression=function (objectPath) { var ret=""; while (objectPath) { @@ -11512,7 +12595,10 @@ var OfficeExtension; }; Utility._parseErrorResponse=function (responseInfo) { var errorObj=null; - if (!Utility.isNullOrEmptyString(responseInfo.body)) { + if (Utility.isPlainJsonObject(responseInfo.body)) { + errorObj=responseInfo.body; + } + else if (!Utility.isNullOrEmptyString(responseInfo.body)) { var errorResponseBody=Utility.trim(responseInfo.body); try { errorObj=JSON.parse(errorResponseBody); @@ -11542,14 +12628,262 @@ var OfficeExtension; } } }; + Utility._toCamelLowerCase=function (name) { + if (Utility.isNullOrEmptyString(name)) { + return name; + } + var index=0; + while (index < name.length && name.charCodeAt(index) >=65 && name.charCodeAt(index) <=90) { + index++; + } + if (index < name.length) { + return name.substr(0, index).toLowerCase()+name.substr(index); + } + else { + return name.toLowerCase(); + } + }; Utility._logEnabled=false; Utility._synchronousCleanup=false; + Utility._doApiNotSupportedCheck=false; Utility.s_underscoreCharCode="_".charCodeAt(0); return Utility; }()); OfficeExtension.Utility=Utility; })(OfficeExtension || (OfficeExtension={})); +var __extends=(this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p]=b[p]; + function __() { this.constructor=d; } + d.prototype=b===null ? Object.create(b) : (__.prototype=b.prototype, new __()); +}; +var OfficeCore; +(function (OfficeCore) { + var _hostName="OfficeCore"; + var _defaultApiSetName="ExperimentApi"; + var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; + var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; + var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; + var _createNewObjectObjectPath=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath; + var _createChildItemObjectPathUsingIndexer=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer; + var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; + var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; + var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; + var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined=OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; + var _load=OfficeExtension.Utility.load; + var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; + var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; + var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var FlightingService=(function (_super) { + __extends(FlightingService, _super); + function FlightingService() { + _super.apply(this, arguments); + } + Object.defineProperty(FlightingService.prototype, "_className", { + get: function () { + return "FlightingService"; + }, + enumerable: true, + configurable: true + }); + FlightingService.prototype.getClientSessionId=function () { + var action=_createMethodAction(this.context, this, "GetClientSessionId", 1, []); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + FlightingService.prototype.getDeferredFlights=function () { + var action=_createMethodAction(this.context, this, "GetDeferredFlights", 1, []); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + FlightingService.prototype.getFeature=function (featureName, type, defaultValue, possibleValues) { + return new OfficeCore.ABType(this.context, _createMethodObjectPath(this.context, this, "GetFeature", 1, [featureName, type, defaultValue, possibleValues], false, false, null)); + }; + FlightingService.prototype.getFeatureGate=function (featureName, scope) { + return new OfficeCore.ABType(this.context, _createMethodObjectPath(this.context, this, "GetFeatureGate", 1, [featureName, scope], false, false, null)); + }; + FlightingService.prototype.resetOverride=function (featureName) { + _createMethodAction(this.context, this, "ResetOverride", 0, [featureName]); + }; + FlightingService.prototype.setOverride=function (featureName, type, value) { + _createMethodAction(this.context, this, "SetOverride", 0, [featureName, type, value]); + }; + FlightingService.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + FlightingService.newObject=function (context) { + var ret=new OfficeCore.FlightingService(context, _createNewObjectObjectPath(context, "Microsoft.Experiment.FlightingService", false)); + return ret; + }; + FlightingService.prototype.toJSON=function () { + return {}; + }; + return FlightingService; + }(OfficeExtension.ClientObject)); + OfficeCore.FlightingService=FlightingService; + var ABType=(function (_super) { + __extends(ABType, _super); + function ABType() { + _super.apply(this, arguments); + } + Object.defineProperty(ABType.prototype, "_className", { + get: function () { + return "ABType"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ABType.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this.m_value, "ABType", this._isNull); + return this.m_value; + }, + enumerable: true, + configurable: true + }); + ABType.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Value"])) { + this.m_value=obj["Value"]; + } + }; + ABType.prototype.load=function (option) { + _load(this, option); + return this; + }; + ABType.prototype.toJSON=function () { + return { + "value": this.m_value + }; + }; + return ABType; + }(OfficeExtension.ClientObject)); + OfficeCore.ABType=ABType; + var FeatureType; + (function (FeatureType) { + FeatureType.boolean="Boolean"; + FeatureType.integer="Integer"; + FeatureType.string="String"; + })(FeatureType=OfficeCore.FeatureType || (OfficeCore.FeatureType={})); + var ExperimentErrorCodes; + (function (ExperimentErrorCodes) { + ExperimentErrorCodes.generalException="GeneralException"; + })(ExperimentErrorCodes=OfficeCore.ExperimentErrorCodes || (OfficeCore.ExperimentErrorCodes={})); +})(OfficeCore || (OfficeCore={})); +var OfficeCore; +(function (OfficeCore) { + var RequestContext=(function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + _super.call(this, url); + } + Object.defineProperty(RequestContext.prototype, "flighting", { + get: function () { + return this.flightingService; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "telemetry", { + get: function () { + if (!this.m_telemetry) { + this.m_telemetry=OfficeCore.TelemetryService.newObject(this); + } + return this.m_telemetry; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "flightingService", { + get: function () { + if (!this.m_flightingService) { + this.m_flightingService=OfficeCore.FlightingService.newObject(this); + } + return this.m_flightingService; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeExtension.ClientRequestContext)); + OfficeCore.RequestContext=RequestContext; +})(OfficeCore || (OfficeCore={})); +var OfficeCore; +(function (OfficeCore) { + var _hostName="OfficeCore"; + var _defaultApiSetName="TelemetryApi"; + var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; + var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; + var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; + var _createNewObjectObjectPath=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath; + var _createChildItemObjectPathUsingIndexer=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer; + var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; + var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; + var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; + var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined=OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; + var _load=OfficeExtension.Utility.load; + var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; + var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; + var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var _typeTelemetryService="TelemetryService"; + var TelemetryService=(function (_super) { + __extends(TelemetryService, _super); + function TelemetryService() { + _super.apply(this, arguments); + } + Object.defineProperty(TelemetryService.prototype, "_className", { + get: function () { + return "TelemetryService"; + }, + enumerable: true, + configurable: true + }); + TelemetryService.prototype.sendTelemetryEvent=function (telemetryProperties, eventName, eventContract, eventFlags, value) { + _createMethodAction(this.context, this, "SendTelemetryEvent", 1, [telemetryProperties, eventName, eventContract, eventFlags, value], false); + }; + TelemetryService.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + TelemetryService.newObject=function (context) { + var ret=new OfficeCore.TelemetryService(context, _createNewObjectObjectPath(context, "Microsoft.Telemetry.TelemetryService", false, false)); + return ret; + }; + TelemetryService.prototype.toJSON=function () { + return {}; + }; + return TelemetryService; + }(OfficeExtension.ClientObject)); + OfficeCore.TelemetryService=TelemetryService; + var TelemetryErrorCodes; + (function (TelemetryErrorCodes) { + TelemetryErrorCodes.generalException="GeneralException"; + })(TelemetryErrorCodes=OfficeCore.TelemetryErrorCodes || (OfficeCore.TelemetryErrorCodes={})); +})(OfficeCore || (OfficeCore={})); + var __extends=(this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p]=b[p]; function __() { this.constructor=d; } @@ -11557,6 +12891,8 @@ var __extends=(this && this.__extends) || function (d, b) { }; var OneNote; (function (OneNote) { + var _hostName="OneNote"; + var _defaultApiSetName="OneNoteApi"; var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; @@ -11569,11 +12905,13 @@ var OneNote; var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; var _isUndefined=OfficeExtension.Utility.isUndefined; var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; var _load=OfficeExtension.Utility.load; var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var _typeApplication="Application"; var Application=(function (_super) { __extends(Application, _super); function Application() { @@ -11588,129 +12926,165 @@ var OneNote; }); Object.defineProperty(Application.prototype, "notebooks", { get: function () { - if (!this.m_notebooks) { - this.m_notebooks=new OneNote.NotebookCollection(this.context, _createPropertyObjectPath(this.context, this, "Notebooks", true, false)); + if (!this._N) { + this._N=new OneNote.NotebookCollection(this.context, _createPropertyObjectPath(this.context, this, "Notebooks", true, false, false)); } - return this.m_notebooks; + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(Application.prototype, "_platform", { get: function () { - _throwIfNotLoaded("_platform", this.m__platform, "Application", this._isNull); - return this.m__platform; + _throwIfNotLoaded("_platform", this.__p, _typeApplication, this._isNull); + return this.__p; }, enumerable: true, configurable: true }); Application.prototype.getActiveNotebook=function () { - return new OneNote.Notebook(this.context, _createMethodObjectPath(this.context, this, "GetActiveNotebook", 1, [], false, false, null)); + return new OneNote.Notebook(this.context, _createMethodObjectPath(this.context, this, "GetActiveNotebook", 1, [], false, false, null, false)); }; Application.prototype.getActiveNotebookOrNull=function () { - return new OneNote.Notebook(this.context, _createMethodObjectPath(this.context, this, "GetActiveNotebookOrNull", 1, [], false, false, null)); + return new OneNote.Notebook(this.context, _createMethodObjectPath(this.context, this, "GetActiveNotebookOrNull", 1, [], false, false, null, false)); }; Application.prototype.getActiveOutline=function () { - return new OneNote.Outline(this.context, _createMethodObjectPath(this.context, this, "GetActiveOutline", 1, [], false, false, null)); + return new OneNote.Outline(this.context, _createMethodObjectPath(this.context, this, "GetActiveOutline", 1, [], false, false, null, false)); }; Application.prototype.getActiveOutlineOrNull=function () { - return new OneNote.Outline(this.context, _createMethodObjectPath(this.context, this, "GetActiveOutlineOrNull", 1, [], false, false, null)); + return new OneNote.Outline(this.context, _createMethodObjectPath(this.context, this, "GetActiveOutlineOrNull", 1, [], false, false, null, false)); }; Application.prototype.getActivePage=function () { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "GetActivePage", 1, [], false, false, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "GetActivePage", 1, [], false, false, null, false)); }; Application.prototype.getActivePageOrNull=function () { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "GetActivePageOrNull", 1, [], false, false, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "GetActivePageOrNull", 1, [], false, false, null, false)); }; Application.prototype.getActiveParagraph=function () { - return new OneNote.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetActiveParagraph", 1, [], false, false, null)); + return new OneNote.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetActiveParagraph", 1, [], false, false, null, false)); }; Application.prototype.getActiveParagraphOrNull=function () { - return new OneNote.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetActiveParagraphOrNull", 1, [], false, false, null)); + return new OneNote.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetActiveParagraphOrNull", 1, [], false, false, null, false)); }; Application.prototype.getActiveSection=function () { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "GetActiveSection", 1, [], false, false, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "GetActiveSection", 1, [], false, false, null, false)); }; Application.prototype.getActiveSectionOrNull=function () { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "GetActiveSectionOrNull", 1, [], false, false, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "GetActiveSectionOrNull", 1, [], false, false, null, false)); + }; + Application.prototype.getSelectedPages=function () { + return new OneNote.PageCollection(this.context, _createMethodObjectPath(this.context, this, "GetSelectedPages", 1, [], true, false, null, false)); + }; + Application.prototype.getWindowSize=function () { + var action=_createMethodAction(this.context, this, "GetWindowSize", 0, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Application.prototype.insertHtmlAtCurrentPosition=function (html) { + _createMethodAction(this.context, this, "InsertHtmlAtCurrentPosition", 0, [html], false); }; Application.prototype.navigateToPage=function (page) { - _createMethodAction(this.context, this, "NavigateToPage", 1, [page]); + _createMethodAction(this.context, this, "NavigateToPage", 1, [page], false); }; Application.prototype.navigateToPageWithClientUrl=function (url) { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "NavigateToPageWithClientUrl", 1, [url], false, false, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "NavigateToPageWithClientUrl", 1, [url], false, false, null, false)); }; Application.prototype._ClientLog=function (level, eventName, flag, data) { - _createMethodAction(this.context, this, "_ClientLog", 1, [level, eventName, flag, data]); + _createMethodAction(this.context, this, "_ClientLog", 1, [level, eventName, flag, data], false); + }; + Application.prototype._EnableControl=function (controlId, enable) { + _createMethodAction(this.context, this, "_EnableControl", 0, [controlId, enable], false); + }; + Application.prototype._EnterFullScreen=function () { + _createMethodAction(this.context, this, "_EnterFullScreen", 0, [], false); + }; + Application.prototype._ExitFullScreen=function () { + _createMethodAction(this.context, this, "_ExitFullScreen", 0, [], false); + }; + Application.prototype._FocusCanvas=function () { + _createMethodAction(this.context, this, "_FocusCanvas", 0, [], false); }; Application.prototype._GetAccountInfo=function () { - var action=_createMethodAction(this.context, this, "_GetAccountInfo", 1, []); + var action=_createMethodAction(this.context, this, "_GetAccountInfo", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Application.prototype._GetAccountInfoByType=function (filter) { + var action=_createMethodAction(this.context, this, "_GetAccountInfoByType", 1, [filter], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; - Application.prototype._GetControlVisibility=function (visibilityType) { - var action=_createMethodAction(this.context, this, "_GetControlVisibility", 1, [visibilityType]); + Application.prototype._GetControlVisibility=function (controlId) { + var action=_createMethodAction(this.context, this, "_GetControlVisibility", 1, [controlId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Application.prototype._GetLoggingInfo=function () { - var action=_createMethodAction(this.context, this, "_GetLoggingInfo", 1, []); + var action=_createMethodAction(this.context, this, "_GetLoggingInfo", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Application.prototype._GetObjectByReferenceId=function (referenceId) { - var action=_createMethodAction(this.context, this, "_GetObjectByReferenceId", 1, [referenceId]); + var action=_createMethodAction(this.context, this, "_GetObjectByReferenceId", 1, [referenceId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Application.prototype._GetObjectTypeNameByReferenceId=function (referenceId) { - var action=_createMethodAction(this.context, this, "_GetObjectTypeNameByReferenceId", 1, [referenceId]); + var action=_createMethodAction(this.context, this, "_GetObjectTypeNameByReferenceId", 1, [referenceId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Application.prototype._GetServiceTokenByUrl=function (url) { - var action=_createMethodAction(this.context, this, "_GetServiceTokenByUrl", 1, [url]); + var action=_createMethodAction(this.context, this, "_GetServiceTokenByUrl", 1, [url], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Application.prototype._GetServiceTokens=function (id) { - var action=_createMethodAction(this.context, this, "_GetServiceTokens", 1, [id]); + var action=_createMethodAction(this.context, this, "_GetServiceTokens", 1, [id], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Application.prototype._GetServiceTokensExt=function (id, filter) { - var action=_createMethodAction(this.context, this, "_GetServiceTokensExt", 1, [id, filter]); + var action=_createMethodAction(this.context, this, "_GetServiceTokensExt", 1, [id, filter], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Application.prototype._GetServiceUrl=function (id) { - var action=_createMethodAction(this.context, this, "_GetServiceUrl", 1, [id]); + var action=_createMethodAction(this.context, this, "_GetServiceUrl", 1, [id], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Application.prototype._IsControlEnabled=function (controlId) { + var action=_createMethodAction(this.context, this, "_IsControlEnabled", 1, [controlId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Application.prototype._RemoveAllReferences=function () { - _createMethodAction(this.context, this, "_RemoveAllReferences", 1, []); + _createMethodAction(this.context, this, "_RemoveAllReferences", 1, [], false); }; Application.prototype._RemoveReference=function (referenceId) { - _createMethodAction(this.context, this, "_RemoveReference", 1, [referenceId]); + _createMethodAction(this.context, this, "_RemoveReference", 1, [referenceId], false); }; Application.prototype._SendDataToLearningTools=function (data, sessionId) { - var action=_createMethodAction(this.context, this, "_SendDataToLearningTools", 0, [data, sessionId]); + var action=_createMethodAction(this.context, this, "_SendDataToLearningTools", 0, [data, sessionId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; - Application.prototype._SetControlVisibility=function (visibilityType, visible) { - _createMethodAction(this.context, this, "_SetControlVisibility", 0, [visibilityType, visible]); + Application.prototype._SetControlVisibility=function (controlId, visible) { + _createMethodAction(this.context, this, "_SetControlVisibility", 0, [controlId, visible], false); }; Application.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -11719,7 +13093,7 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_platform"])) { - this.m__platform=obj["_platform"]; + this.__p=obj["_platform"]; } _handleNavigationPropertyResults(this, obj, ["notebooks", "Notebooks"]); }; @@ -11733,6 +13107,7 @@ var OneNote; return Application; }(OfficeExtension.ClientObject)); OneNote.Application=Application; + var _typeInkAnalysis="InkAnalysis"; var InkAnalysis=(function (_super) { __extends(InkAnalysis, _super); function InkAnalysis() { @@ -11747,42 +13122,42 @@ var OneNote; }); Object.defineProperty(InkAnalysis.prototype, "page", { get: function () { - if (!this.m_page) { - this.m_page=new OneNote.Page(this.context, _createPropertyObjectPath(this.context, this, "Page", false, false)); + if (!this._P) { + this._P=new OneNote.Page(this.context, _createPropertyObjectPath(this.context, this, "Page", false, false, false)); } - return this.m_page; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysis.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new OneNote.InkAnalysisParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._Pa) { + this._Pa=new OneNote.InkAnalysisParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysis.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "InkAnalysis", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeInkAnalysis, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysis.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkAnalysis", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkAnalysis, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InkAnalysis.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkAnalysis.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -11791,10 +13166,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["page", "Page", "paragraphs", "Paragraphs"]); }; @@ -11808,10 +13183,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; InkAnalysis.prototype.track=function () { @@ -11824,12 +13199,13 @@ var OneNote; }; InkAnalysis.prototype.toJSON=function () { return { - "id": this.m_id + "id": this._I }; }; return InkAnalysis; }(OfficeExtension.ClientObject)); OneNote.InkAnalysis=InkAnalysis; + var _typeInkAnalysisParagraph="InkAnalysisParagraph"; var InkAnalysisParagraph=(function (_super) { __extends(InkAnalysisParagraph, _super); function InkAnalysisParagraph() { @@ -11844,42 +13220,42 @@ var OneNote; }); Object.defineProperty(InkAnalysisParagraph.prototype, "inkAnalysis", { get: function () { - if (!this.m_inkAnalysis) { - this.m_inkAnalysis=new OneNote.InkAnalysis(this.context, _createPropertyObjectPath(this.context, this, "InkAnalysis", false, false)); + if (!this._In) { + this._In=new OneNote.InkAnalysis(this.context, _createPropertyObjectPath(this.context, this, "InkAnalysis", false, false, false)); } - return this.m_inkAnalysis; + return this._In; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisParagraph.prototype, "lines", { get: function () { - if (!this.m_lines) { - this.m_lines=new OneNote.InkAnalysisLineCollection(this.context, _createPropertyObjectPath(this.context, this, "Lines", true, false)); + if (!this._L) { + this._L=new OneNote.InkAnalysisLineCollection(this.context, _createPropertyObjectPath(this.context, this, "Lines", true, false, false)); } - return this.m_lines; + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisParagraph.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "InkAnalysisParagraph", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeInkAnalysisParagraph, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisParagraph.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkAnalysisParagraph", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkAnalysisParagraph, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InkAnalysisParagraph.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkAnalysisParagraph.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -11888,10 +13264,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["inkAnalysis", "InkAnalysis", "lines", "Lines"]); }; @@ -11905,10 +13281,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; InkAnalysisParagraph.prototype.track=function () { @@ -11921,12 +13297,13 @@ var OneNote; }; InkAnalysisParagraph.prototype.toJSON=function () { return { - "id": this.m_id + "id": this._I }; }; return InkAnalysisParagraph; }(OfficeExtension.ClientObject)); OneNote.InkAnalysisParagraph=InkAnalysisParagraph; + var _typeInkAnalysisParagraphCollection="InkAnalysisParagraphCollection"; var InkAnalysisParagraphCollection=(function (_super) { __extends(InkAnalysisParagraphCollection, _super); function InkAnalysisParagraphCollection() { @@ -11941,7 +13318,7 @@ var OneNote; }); Object.defineProperty(InkAnalysisParagraphCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "InkAnalysisParagraphCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeInkAnalysisParagraphCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -11949,16 +13326,16 @@ var OneNote; }); Object.defineProperty(InkAnalysisParagraphCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "InkAnalysisParagraphCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeInkAnalysisParagraphCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisParagraphCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkAnalysisParagraphCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkAnalysisParagraphCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -11967,10 +13344,10 @@ var OneNote; return new OneNote.InkAnalysisParagraph(this.context, _createIndexerObjectPath(this.context, this, [index])); }; InkAnalysisParagraphCollection.prototype.getItemAt=function (index) { - return new OneNote.InkAnalysisParagraph(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.InkAnalysisParagraph(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; InkAnalysisParagraphCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkAnalysisParagraphCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -11979,10 +13356,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -12004,7 +13381,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; InkAnalysisParagraphCollection.prototype.track=function () { @@ -12017,12 +13394,13 @@ var OneNote; }; InkAnalysisParagraphCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return InkAnalysisParagraphCollection; }(OfficeExtension.ClientObject)); OneNote.InkAnalysisParagraphCollection=InkAnalysisParagraphCollection; + var _typeInkAnalysisLine="InkAnalysisLine"; var InkAnalysisLine=(function (_super) { __extends(InkAnalysisLine, _super); function InkAnalysisLine() { @@ -12037,42 +13415,42 @@ var OneNote; }); Object.defineProperty(InkAnalysisLine.prototype, "paragraph", { get: function () { - if (!this.m_paragraph) { - this.m_paragraph=new OneNote.InkAnalysisParagraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false)); + if (!this._P) { + this._P=new OneNote.InkAnalysisParagraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false, false)); } - return this.m_paragraph; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisLine.prototype, "words", { get: function () { - if (!this.m_words) { - this.m_words=new OneNote.InkAnalysisWordCollection(this.context, _createPropertyObjectPath(this.context, this, "Words", true, false)); + if (!this._W) { + this._W=new OneNote.InkAnalysisWordCollection(this.context, _createPropertyObjectPath(this.context, this, "Words", true, false, false)); } - return this.m_words; + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisLine.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "InkAnalysisLine", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeInkAnalysisLine, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisLine.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkAnalysisLine", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkAnalysisLine, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InkAnalysisLine.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkAnalysisLine.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12081,10 +13459,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["paragraph", "Paragraph", "words", "Words"]); }; @@ -12098,10 +13476,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; InkAnalysisLine.prototype.track=function () { @@ -12114,12 +13492,13 @@ var OneNote; }; InkAnalysisLine.prototype.toJSON=function () { return { - "id": this.m_id + "id": this._I }; }; return InkAnalysisLine; }(OfficeExtension.ClientObject)); OneNote.InkAnalysisLine=InkAnalysisLine; + var _typeInkAnalysisLineCollection="InkAnalysisLineCollection"; var InkAnalysisLineCollection=(function (_super) { __extends(InkAnalysisLineCollection, _super); function InkAnalysisLineCollection() { @@ -12134,7 +13513,7 @@ var OneNote; }); Object.defineProperty(InkAnalysisLineCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "InkAnalysisLineCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeInkAnalysisLineCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -12142,16 +13521,16 @@ var OneNote; }); Object.defineProperty(InkAnalysisLineCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "InkAnalysisLineCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeInkAnalysisLineCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisLineCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkAnalysisLineCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkAnalysisLineCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -12160,10 +13539,10 @@ var OneNote; return new OneNote.InkAnalysisLine(this.context, _createIndexerObjectPath(this.context, this, [index])); }; InkAnalysisLineCollection.prototype.getItemAt=function (index) { - return new OneNote.InkAnalysisLine(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.InkAnalysisLine(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; InkAnalysisLineCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkAnalysisLineCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12172,10 +13551,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -12197,7 +13576,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; InkAnalysisLineCollection.prototype.track=function () { @@ -12210,12 +13589,13 @@ var OneNote; }; InkAnalysisLineCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return InkAnalysisLineCollection; }(OfficeExtension.ClientObject)); OneNote.InkAnalysisLineCollection=InkAnalysisLineCollection; + var _typeInkAnalysisWord="InkAnalysisWord"; var InkAnalysisWord=(function (_super) { __extends(InkAnalysisWord, _super); function InkAnalysisWord() { @@ -12230,56 +13610,56 @@ var OneNote; }); Object.defineProperty(InkAnalysisWord.prototype, "line", { get: function () { - if (!this.m_line) { - this.m_line=new OneNote.InkAnalysisLine(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false)); + if (!this._Li) { + this._Li=new OneNote.InkAnalysisLine(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false, false)); } - return this.m_line; + return this._Li; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisWord.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "InkAnalysisWord", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeInkAnalysisWord, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisWord.prototype, "languageId", { get: function () { - _throwIfNotLoaded("languageId", this.m_languageId, "InkAnalysisWord", this._isNull); - return this.m_languageId; + _throwIfNotLoaded("languageId", this._L, _typeInkAnalysisWord, this._isNull); + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisWord.prototype, "strokePointers", { get: function () { - _throwIfNotLoaded("strokePointers", this.m_strokePointers, "InkAnalysisWord", this._isNull); - return this.m_strokePointers; + _throwIfNotLoaded("strokePointers", this._S, _typeInkAnalysisWord, this._isNull); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisWord.prototype, "wordAlternates", { get: function () { - _throwIfNotLoaded("wordAlternates", this.m_wordAlternates, "InkAnalysisWord", this._isNull); - return this.m_wordAlternates; + _throwIfNotLoaded("wordAlternates", this._W, _typeInkAnalysisWord, this._isNull); + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisWord.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkAnalysisWord", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkAnalysisWord, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InkAnalysisWord.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkAnalysisWord.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12288,19 +13668,19 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["LanguageId"])) { - this.m_languageId=obj["LanguageId"]; + this._L=obj["LanguageId"]; } if (!_isUndefined(obj["StrokePointers"])) { - this.m_strokePointers=obj["StrokePointers"]; + this._S=obj["StrokePointers"]; } if (!_isUndefined(obj["WordAlternates"])) { - this.m_wordAlternates=obj["WordAlternates"]; + this._W=obj["WordAlternates"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["line", "Line"]); }; @@ -12314,10 +13694,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; InkAnalysisWord.prototype.track=function () { @@ -12330,15 +13710,16 @@ var OneNote; }; InkAnalysisWord.prototype.toJSON=function () { return { - "id": this.m_id, - "languageId": this.m_languageId, - "strokePointers": this.m_strokePointers, - "wordAlternates": this.m_wordAlternates + "id": this._I, + "languageId": this._L, + "strokePointers": this._S, + "wordAlternates": this._W }; }; return InkAnalysisWord; }(OfficeExtension.ClientObject)); OneNote.InkAnalysisWord=InkAnalysisWord; + var _typeInkAnalysisWordCollection="InkAnalysisWordCollection"; var InkAnalysisWordCollection=(function (_super) { __extends(InkAnalysisWordCollection, _super); function InkAnalysisWordCollection() { @@ -12353,7 +13734,7 @@ var OneNote; }); Object.defineProperty(InkAnalysisWordCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "InkAnalysisWordCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeInkAnalysisWordCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -12361,16 +13742,16 @@ var OneNote; }); Object.defineProperty(InkAnalysisWordCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "InkAnalysisWordCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeInkAnalysisWordCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisWordCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkAnalysisWordCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkAnalysisWordCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -12379,10 +13760,10 @@ var OneNote; return new OneNote.InkAnalysisWord(this.context, _createIndexerObjectPath(this.context, this, [index])); }; InkAnalysisWordCollection.prototype.getItemAt=function (index) { - return new OneNote.InkAnalysisWord(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.InkAnalysisWord(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; InkAnalysisWordCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkAnalysisWordCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12391,10 +13772,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -12416,7 +13797,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; InkAnalysisWordCollection.prototype.track=function () { @@ -12429,12 +13810,13 @@ var OneNote; }; InkAnalysisWordCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return InkAnalysisWordCollection; }(OfficeExtension.ClientObject)); OneNote.InkAnalysisWordCollection=InkAnalysisWordCollection; + var _typeFloatingInk="FloatingInk"; var FloatingInk=(function (_super) { __extends(FloatingInk, _super); function FloatingInk() { @@ -12449,42 +13831,42 @@ var OneNote; }); Object.defineProperty(FloatingInk.prototype, "inkStrokes", { get: function () { - if (!this.m_inkStrokes) { - this.m_inkStrokes=new OneNote.InkStrokeCollection(this.context, _createPropertyObjectPath(this.context, this, "InkStrokes", true, false)); + if (!this._In) { + this._In=new OneNote.InkStrokeCollection(this.context, _createPropertyObjectPath(this.context, this, "InkStrokes", true, false, false)); } - return this.m_inkStrokes; + return this._In; }, enumerable: true, configurable: true }); Object.defineProperty(FloatingInk.prototype, "pageContent", { get: function () { - if (!this.m_pageContent) { - this.m_pageContent=new OneNote.PageContent(this.context, _createPropertyObjectPath(this.context, this, "PageContent", false, false)); + if (!this._P) { + this._P=new OneNote.PageContent(this.context, _createPropertyObjectPath(this.context, this, "PageContent", false, false, false)); } - return this.m_pageContent; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(FloatingInk.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "FloatingInk", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeFloatingInk, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(FloatingInk.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "FloatingInk", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeFloatingInk, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); FloatingInk.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; FloatingInk.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12493,10 +13875,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["inkStrokes", "InkStrokes", "pageContent", "PageContent"]); }; @@ -12510,10 +13892,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; FloatingInk.prototype.track=function () { @@ -12526,12 +13908,13 @@ var OneNote; }; FloatingInk.prototype.toJSON=function () { return { - "id": this.m_id + "id": this._I }; }; return FloatingInk; }(OfficeExtension.ClientObject)); OneNote.FloatingInk=FloatingInk; + var _typeInkStroke="InkStroke"; var InkStroke=(function (_super) { __extends(InkStroke, _super); function InkStroke() { @@ -12546,32 +13929,32 @@ var OneNote; }); Object.defineProperty(InkStroke.prototype, "floatingInk", { get: function () { - if (!this.m_floatingInk) { - this.m_floatingInk=new OneNote.FloatingInk(this.context, _createPropertyObjectPath(this.context, this, "FloatingInk", false, false)); + if (!this._F) { + this._F=new OneNote.FloatingInk(this.context, _createPropertyObjectPath(this.context, this, "FloatingInk", false, false, false)); } - return this.m_floatingInk; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(InkStroke.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "InkStroke", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeInkStroke, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(InkStroke.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkStroke", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkStroke, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InkStroke.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkStroke.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12580,10 +13963,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["floatingInk", "FloatingInk"]); }; @@ -12597,10 +13980,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; InkStroke.prototype.track=function () { @@ -12613,12 +13996,13 @@ var OneNote; }; InkStroke.prototype.toJSON=function () { return { - "id": this.m_id + "id": this._I }; }; return InkStroke; }(OfficeExtension.ClientObject)); OneNote.InkStroke=InkStroke; + var _typeInkStrokeCollection="InkStrokeCollection"; var InkStrokeCollection=(function (_super) { __extends(InkStrokeCollection, _super); function InkStrokeCollection() { @@ -12633,7 +14017,7 @@ var OneNote; }); Object.defineProperty(InkStrokeCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "InkStrokeCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeInkStrokeCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -12641,16 +14025,16 @@ var OneNote; }); Object.defineProperty(InkStrokeCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "InkStrokeCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeInkStrokeCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(InkStrokeCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkStrokeCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkStrokeCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -12659,10 +14043,10 @@ var OneNote; return new OneNote.InkStroke(this.context, _createIndexerObjectPath(this.context, this, [index])); }; InkStrokeCollection.prototype.getItemAt=function (index) { - return new OneNote.InkStroke(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.InkStroke(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; InkStrokeCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkStrokeCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12671,10 +14055,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -12696,7 +14080,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; InkStrokeCollection.prototype.track=function () { @@ -12709,12 +14093,13 @@ var OneNote; }; InkStrokeCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return InkStrokeCollection; }(OfficeExtension.ClientObject)); OneNote.InkStrokeCollection=InkStrokeCollection; + var _typeInkWord="InkWord"; var InkWord=(function (_super) { __extends(InkWord, _super); function InkWord() { @@ -12729,48 +14114,48 @@ var OneNote; }); Object.defineProperty(InkWord.prototype, "paragraph", { get: function () { - if (!this.m_paragraph) { - this.m_paragraph=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false)); + if (!this._P) { + this._P=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false, false)); } - return this.m_paragraph; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(InkWord.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "InkWord", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeInkWord, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(InkWord.prototype, "languageId", { get: function () { - _throwIfNotLoaded("languageId", this.m_languageId, "InkWord", this._isNull); - return this.m_languageId; + _throwIfNotLoaded("languageId", this._L, _typeInkWord, this._isNull); + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(InkWord.prototype, "wordAlternates", { get: function () { - _throwIfNotLoaded("wordAlternates", this.m_wordAlternates, "InkWord", this._isNull); - return this.m_wordAlternates; + _throwIfNotLoaded("wordAlternates", this._W, _typeInkWord, this._isNull); + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(InkWord.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkWord", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkWord, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InkWord.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkWord.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12779,16 +14164,16 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["LanguageId"])) { - this.m_languageId=obj["LanguageId"]; + this._L=obj["LanguageId"]; } if (!_isUndefined(obj["WordAlternates"])) { - this.m_wordAlternates=obj["WordAlternates"]; + this._W=obj["WordAlternates"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["paragraph", "Paragraph"]); }; @@ -12802,10 +14187,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; InkWord.prototype.track=function () { @@ -12818,14 +14203,15 @@ var OneNote; }; InkWord.prototype.toJSON=function () { return { - "id": this.m_id, - "languageId": this.m_languageId, - "wordAlternates": this.m_wordAlternates + "id": this._I, + "languageId": this._L, + "wordAlternates": this._W }; }; return InkWord; }(OfficeExtension.ClientObject)); OneNote.InkWord=InkWord; + var _typeInkWordCollection="InkWordCollection"; var InkWordCollection=(function (_super) { __extends(InkWordCollection, _super); function InkWordCollection() { @@ -12840,7 +14226,7 @@ var OneNote; }); Object.defineProperty(InkWordCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "InkWordCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeInkWordCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -12848,16 +14234,16 @@ var OneNote; }); Object.defineProperty(InkWordCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "InkWordCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeInkWordCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(InkWordCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkWordCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkWordCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -12866,10 +14252,10 @@ var OneNote; return new OneNote.InkWord(this.context, _createIndexerObjectPath(this.context, this, [index])); }; InkWordCollection.prototype.getItemAt=function (index) { - return new OneNote.InkWord(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.InkWord(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; InkWordCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkWordCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12878,10 +14264,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -12903,7 +14289,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; InkWordCollection.prototype.track=function () { @@ -12916,12 +14302,13 @@ var OneNote; }; InkWordCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return InkWordCollection; }(OfficeExtension.ClientObject)); OneNote.InkWordCollection=InkWordCollection; + var _typeNotebook="Notebook"; var Notebook=(function (_super) { __extends(Notebook, _super); function Notebook() { @@ -12936,81 +14323,81 @@ var OneNote; }); Object.defineProperty(Notebook.prototype, "sectionGroups", { get: function () { - if (!this.m_sectionGroups) { - this.m_sectionGroups=new OneNote.SectionGroupCollection(this.context, _createPropertyObjectPath(this.context, this, "SectionGroups", true, false)); + if (!this._S) { + this._S=new OneNote.SectionGroupCollection(this.context, _createPropertyObjectPath(this.context, this, "SectionGroups", true, false, false)); } - return this.m_sectionGroups; + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(Notebook.prototype, "sections", { get: function () { - if (!this.m_sections) { - this.m_sections=new OneNote.SectionCollection(this.context, _createPropertyObjectPath(this.context, this, "Sections", true, false)); + if (!this._Se) { + this._Se=new OneNote.SectionCollection(this.context, _createPropertyObjectPath(this.context, this, "Sections", true, false, false)); } - return this.m_sections; + return this._Se; }, enumerable: true, configurable: true }); Object.defineProperty(Notebook.prototype, "baseUrl", { get: function () { - _throwIfNotLoaded("baseUrl", this.m_baseUrl, "Notebook", this._isNull); - return this.m_baseUrl; + _throwIfNotLoaded("baseUrl", this._B, _typeNotebook, this._isNull); + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(Notebook.prototype, "clientUrl", { get: function () { - _throwIfNotLoaded("clientUrl", this.m_clientUrl, "Notebook", this._isNull); - return this.m_clientUrl; + _throwIfNotLoaded("clientUrl", this._C, _typeNotebook, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Notebook.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Notebook", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeNotebook, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Notebook.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "Notebook", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeNotebook, this._isNull); + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(Notebook.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Notebook", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeNotebook, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Notebook.prototype.addSection=function (name) { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "AddSection", 0, [name], false, true, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "AddSection", 0, [name], false, true, null, false)); }; Notebook.prototype.addSectionGroup=function (name) { - return new OneNote.SectionGroup(this.context, _createMethodObjectPath(this.context, this, "AddSectionGroup", 0, [name], false, true, null)); + return new OneNote.SectionGroup(this.context, _createMethodObjectPath(this.context, this, "AddSectionGroup", 0, [name], false, true, null, false)); }; Notebook.prototype.getRestApiId=function () { - var action=_createMethodAction(this.context, this, "GetRestApiId", 1, []); + var action=_createMethodAction(this.context, this, "GetRestApiId", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Notebook.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Notebook.prototype._Sync=function () { - _createMethodAction(this.context, this, "_Sync", 0, []); + _createMethodAction(this.context, this, "_Sync", 0, [], false); }; Notebook.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13019,19 +14406,19 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["BaseUrl"])) { - this.m_baseUrl=obj["BaseUrl"]; + this._B=obj["BaseUrl"]; } if (!_isUndefined(obj["ClientUrl"])) { - this.m_clientUrl=obj["ClientUrl"]; + this._C=obj["ClientUrl"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["sectionGroups", "SectionGroups", "sections", "Sections"]); }; @@ -13045,10 +14432,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; Notebook.prototype.track=function () { @@ -13061,15 +14448,16 @@ var OneNote; }; Notebook.prototype.toJSON=function () { return { - "baseUrl": this.m_baseUrl, - "clientUrl": this.m_clientUrl, - "id": this.m_id, - "name": this.m_name + "baseUrl": this._B, + "clientUrl": this._C, + "id": this._I, + "name": this._N }; }; return Notebook; }(OfficeExtension.ClientObject)); OneNote.Notebook=Notebook; + var _typeNotebookCollection="NotebookCollection"; var NotebookCollection=(function (_super) { __extends(NotebookCollection, _super); function NotebookCollection() { @@ -13084,7 +14472,7 @@ var OneNote; }); Object.defineProperty(NotebookCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "NotebookCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeNotebookCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -13092,31 +14480,31 @@ var OneNote; }); Object.defineProperty(NotebookCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "NotebookCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeNotebookCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(NotebookCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "NotebookCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeNotebookCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); NotebookCollection.prototype.getByName=function (name) { - return new OneNote.NotebookCollection(this.context, _createMethodObjectPath(this.context, this, "GetByName", 1, [name], true, false, null)); + return new OneNote.NotebookCollection(this.context, _createMethodObjectPath(this.context, this, "GetByName", 1, [name], true, false, null, false)); }; NotebookCollection.prototype.getItem=function (index) { return new OneNote.Notebook(this.context, _createIndexerObjectPath(this.context, this, [index])); }; NotebookCollection.prototype.getItemAt=function (index) { - return new OneNote.Notebook(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.Notebook(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; NotebookCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; NotebookCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13125,10 +14513,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -13150,7 +14538,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; NotebookCollection.prototype.track=function () { @@ -13163,12 +14551,13 @@ var OneNote; }; NotebookCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return NotebookCollection; }(OfficeExtension.ClientObject)); OneNote.NotebookCollection=NotebookCollection; + var _typeSectionGroup="SectionGroup"; var SectionGroup=(function (_super) { __extends(SectionGroup, _super); function SectionGroup() { @@ -13183,100 +14572,100 @@ var OneNote; }); Object.defineProperty(SectionGroup.prototype, "notebook", { get: function () { - if (!this.m_notebook) { - this.m_notebook=new OneNote.Notebook(this.context, _createPropertyObjectPath(this.context, this, "Notebook", false, false)); + if (!this._No) { + this._No=new OneNote.Notebook(this.context, _createPropertyObjectPath(this.context, this, "Notebook", false, false, false)); } - return this.m_notebook; + return this._No; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "parentSectionGroup", { get: function () { - if (!this.m_parentSectionGroup) { - this.m_parentSectionGroup=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroup", false, false)); + if (!this._P) { + this._P=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroup", false, false, false)); } - return this.m_parentSectionGroup; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "parentSectionGroupOrNull", { get: function () { - if (!this.m_parentSectionGroupOrNull) { - this.m_parentSectionGroupOrNull=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroupOrNull", false, false)); + if (!this._Pa) { + this._Pa=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroupOrNull", false, false, false)); } - return this.m_parentSectionGroupOrNull; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "sectionGroups", { get: function () { - if (!this.m_sectionGroups) { - this.m_sectionGroups=new OneNote.SectionGroupCollection(this.context, _createPropertyObjectPath(this.context, this, "SectionGroups", true, false)); + if (!this._S) { + this._S=new OneNote.SectionGroupCollection(this.context, _createPropertyObjectPath(this.context, this, "SectionGroups", true, false, false)); } - return this.m_sectionGroups; + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "sections", { get: function () { - if (!this.m_sections) { - this.m_sections=new OneNote.SectionCollection(this.context, _createPropertyObjectPath(this.context, this, "Sections", true, false)); + if (!this._Se) { + this._Se=new OneNote.SectionCollection(this.context, _createPropertyObjectPath(this.context, this, "Sections", true, false, false)); } - return this.m_sections; + return this._Se; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "clientUrl", { get: function () { - _throwIfNotLoaded("clientUrl", this.m_clientUrl, "SectionGroup", this._isNull); - return this.m_clientUrl; + _throwIfNotLoaded("clientUrl", this._C, _typeSectionGroup, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "SectionGroup", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeSectionGroup, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "SectionGroup", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeSectionGroup, this._isNull); + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "SectionGroup", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeSectionGroup, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); SectionGroup.prototype.addSection=function (title) { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "AddSection", 0, [title], false, true, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "AddSection", 0, [title], false, true, null, false)); }; SectionGroup.prototype.addSectionGroup=function (name) { - return new OneNote.SectionGroup(this.context, _createMethodObjectPath(this.context, this, "AddSectionGroup", 0, [name], false, true, null)); + return new OneNote.SectionGroup(this.context, _createMethodObjectPath(this.context, this, "AddSectionGroup", 0, [name], false, true, null, false)); }; SectionGroup.prototype.getRestApiId=function () { - var action=_createMethodAction(this.context, this, "GetRestApiId", 1, []); + var action=_createMethodAction(this.context, this, "GetRestApiId", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; SectionGroup.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; SectionGroup.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13285,16 +14674,16 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["ClientUrl"])) { - this.m_clientUrl=obj["ClientUrl"]; + this._C=obj["ClientUrl"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["notebook", "Notebook", "parentSectionGroup", "ParentSectionGroup", "parentSectionGroupOrNull", "ParentSectionGroupOrNull", "sectionGroups", "SectionGroups", "sections", "Sections"]); }; @@ -13308,10 +14697,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; SectionGroup.prototype.track=function () { @@ -13324,14 +14713,15 @@ var OneNote; }; SectionGroup.prototype.toJSON=function () { return { - "clientUrl": this.m_clientUrl, - "id": this.m_id, - "name": this.m_name + "clientUrl": this._C, + "id": this._I, + "name": this._N }; }; return SectionGroup; }(OfficeExtension.ClientObject)); OneNote.SectionGroup=SectionGroup; + var _typeSectionGroupCollection="SectionGroupCollection"; var SectionGroupCollection=(function (_super) { __extends(SectionGroupCollection, _super); function SectionGroupCollection() { @@ -13346,7 +14736,7 @@ var OneNote; }); Object.defineProperty(SectionGroupCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "SectionGroupCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeSectionGroupCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -13354,31 +14744,31 @@ var OneNote; }); Object.defineProperty(SectionGroupCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "SectionGroupCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeSectionGroupCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroupCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "SectionGroupCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeSectionGroupCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); SectionGroupCollection.prototype.getByName=function (name) { - return new OneNote.SectionGroupCollection(this.context, _createMethodObjectPath(this.context, this, "GetByName", 1, [name], true, false, null)); + return new OneNote.SectionGroupCollection(this.context, _createMethodObjectPath(this.context, this, "GetByName", 1, [name], true, false, null, false)); }; SectionGroupCollection.prototype.getItem=function (index) { return new OneNote.SectionGroup(this.context, _createIndexerObjectPath(this.context, this, [index])); }; SectionGroupCollection.prototype.getItemAt=function (index) { - return new OneNote.SectionGroup(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.SectionGroup(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; SectionGroupCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; SectionGroupCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13387,10 +14777,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -13412,7 +14802,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; SectionGroupCollection.prototype.track=function () { @@ -13425,12 +14815,13 @@ var OneNote; }; SectionGroupCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return SectionGroupCollection; }(OfficeExtension.ClientObject)); OneNote.SectionGroupCollection=SectionGroupCollection; + var _typeSection="Section"; var Section=(function (_super) { __extends(Section, _super); function Section() { @@ -13445,96 +14836,116 @@ var OneNote; }); Object.defineProperty(Section.prototype, "notebook", { get: function () { - if (!this.m_notebook) { - this.m_notebook=new OneNote.Notebook(this.context, _createPropertyObjectPath(this.context, this, "Notebook", false, false)); + if (!this._No) { + this._No=new OneNote.Notebook(this.context, _createPropertyObjectPath(this.context, this, "Notebook", false, false, false)); } - return this.m_notebook; + return this._No; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "pages", { get: function () { - if (!this.m_pages) { - this.m_pages=new OneNote.PageCollection(this.context, _createPropertyObjectPath(this.context, this, "Pages", true, false)); + if (!this._P) { + this._P=new OneNote.PageCollection(this.context, _createPropertyObjectPath(this.context, this, "Pages", true, false, false)); } - return this.m_pages; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "parentSectionGroup", { get: function () { - if (!this.m_parentSectionGroup) { - this.m_parentSectionGroup=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroup", false, false)); + if (!this._Pa) { + this._Pa=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroup", false, false, false)); } - return this.m_parentSectionGroup; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "parentSectionGroupOrNull", { get: function () { - if (!this.m_parentSectionGroupOrNull) { - this.m_parentSectionGroupOrNull=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroupOrNull", false, false)); + if (!this._Par) { + this._Par=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroupOrNull", false, false, false)); } - return this.m_parentSectionGroupOrNull; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "clientUrl", { get: function () { - _throwIfNotLoaded("clientUrl", this.m_clientUrl, "Section", this._isNull); - return this.m_clientUrl; + _throwIfNotLoaded("clientUrl", this._C, _typeSection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Section", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeSection, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "Section", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeSection, this._isNull); + return this._N; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Section.prototype, "webUrl", { + get: function () { + _throwIfNotLoaded("webUrl", this._W, _typeSection, this._isNull); + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Section", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeSection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Section.prototype.addPage=function (title) { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "AddPage", 0, [title], false, true, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "AddPage", 0, [title], false, true, null, false)); }; Section.prototype.copyToNotebook=function (destinationNotebook) { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "CopyToNotebook", 0, [destinationNotebook], false, true, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "CopyToNotebook", 0, [destinationNotebook], false, true, null, false)); }; Section.prototype.copyToSectionGroup=function (destinationSectionGroup) { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "CopyToSectionGroup", 0, [destinationSectionGroup], false, true, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "CopyToSectionGroup", 0, [destinationSectionGroup], false, true, null, false)); }; Section.prototype.getRestApiId=function () { - var action=_createMethodAction(this.context, this, "GetRestApiId", 1, []); + var action=_createMethodAction(this.context, this, "GetRestApiId", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Section.prototype.insertSectionAsSibling=function (location, title) { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "InsertSectionAsSibling", 0, [location, title], false, true, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "InsertSectionAsSibling", 0, [location, title], false, true, null, false)); + }; + Section.prototype._GetGeoInfo=function () { + var action=_createMethodAction(this.context, this, "_GetGeoInfo", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Section.prototype._GetGeoInfoAsync=function () { + var action=_createMethodAction(this.context, this, "_GetGeoInfoAsync", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; }; Section.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Section.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13543,16 +14954,19 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["ClientUrl"])) { - this.m_clientUrl=obj["ClientUrl"]; + this._C=obj["ClientUrl"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; + } + if (!_isUndefined(obj["WebUrl"])) { + this._W=obj["WebUrl"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["notebook", "Notebook", "pages", "Pages", "parentSectionGroup", "ParentSectionGroup", "parentSectionGroupOrNull", "ParentSectionGroupOrNull"]); }; @@ -13566,10 +14980,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; Section.prototype.track=function () { @@ -13582,14 +14996,16 @@ var OneNote; }; Section.prototype.toJSON=function () { return { - "clientUrl": this.m_clientUrl, - "id": this.m_id, - "name": this.m_name + "clientUrl": this._C, + "id": this._I, + "name": this._N, + "webUrl": this._W }; }; return Section; }(OfficeExtension.ClientObject)); OneNote.Section=Section; + var _typeSectionCollection="SectionCollection"; var SectionCollection=(function (_super) { __extends(SectionCollection, _super); function SectionCollection() { @@ -13604,7 +15020,7 @@ var OneNote; }); Object.defineProperty(SectionCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "SectionCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeSectionCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -13612,31 +15028,31 @@ var OneNote; }); Object.defineProperty(SectionCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "SectionCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeSectionCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(SectionCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "SectionCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeSectionCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); SectionCollection.prototype.getByName=function (name) { - return new OneNote.SectionCollection(this.context, _createMethodObjectPath(this.context, this, "GetByName", 1, [name], true, false, null)); + return new OneNote.SectionCollection(this.context, _createMethodObjectPath(this.context, this, "GetByName", 1, [name], true, false, null, false)); }; SectionCollection.prototype.getItem=function (index) { return new OneNote.Section(this.context, _createIndexerObjectPath(this.context, this, [index])); }; SectionCollection.prototype.getItemAt=function (index) { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; SectionCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; SectionCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13645,10 +15061,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -13670,7 +15086,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; SectionCollection.prototype.track=function () { @@ -13683,12 +15099,13 @@ var OneNote; }; SectionCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return SectionCollection; }(OfficeExtension.ClientObject)); OneNote.SectionCollection=SectionCollection; + var _typePage="Page"; var Page=(function (_super) { __extends(Page, _super); function Page() { @@ -13703,65 +15120,65 @@ var OneNote; }); Object.defineProperty(Page.prototype, "contents", { get: function () { - if (!this.m_contents) { - this.m_contents=new OneNote.PageContentCollection(this.context, _createPropertyObjectPath(this.context, this, "Contents", true, false)); + if (!this._Co) { + this._Co=new OneNote.PageContentCollection(this.context, _createPropertyObjectPath(this.context, this, "Contents", true, false, false)); } - return this.m_contents; + return this._Co; }, enumerable: true, configurable: true }); Object.defineProperty(Page.prototype, "inkAnalysisOrNull", { get: function () { - if (!this.m_inkAnalysisOrNull) { - this.m_inkAnalysisOrNull=new OneNote.InkAnalysis(this.context, _createPropertyObjectPath(this.context, this, "InkAnalysisOrNull", false, false)); + if (!this._In) { + this._In=new OneNote.InkAnalysis(this.context, _createPropertyObjectPath(this.context, this, "InkAnalysisOrNull", false, false, false)); } - return this.m_inkAnalysisOrNull; + return this._In; }, enumerable: true, configurable: true }); Object.defineProperty(Page.prototype, "parentSection", { get: function () { - if (!this.m_parentSection) { - this.m_parentSection=new OneNote.Section(this.context, _createPropertyObjectPath(this.context, this, "ParentSection", false, false)); + if (!this._Pa) { + this._Pa=new OneNote.Section(this.context, _createPropertyObjectPath(this.context, this, "ParentSection", false, false, false)); } - return this.m_parentSection; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Page.prototype, "classNotebookPageSource", { get: function () { - _throwIfNotLoaded("classNotebookPageSource", this.m_classNotebookPageSource, "Page", this._isNull); - return this.m_classNotebookPageSource; + _throwIfNotLoaded("classNotebookPageSource", this._C, _typePage, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Page.prototype, "clientUrl", { get: function () { - _throwIfNotLoaded("clientUrl", this.m_clientUrl, "Page", this._isNull); - return this.m_clientUrl; + _throwIfNotLoaded("clientUrl", this._Cl, _typePage, this._isNull); + return this._Cl; }, enumerable: true, configurable: true }); Object.defineProperty(Page.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Page", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typePage, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Page.prototype, "pageLevel", { get: function () { - _throwIfNotLoaded("pageLevel", this.m_pageLevel, "Page", this._isNull); - return this.m_pageLevel; + _throwIfNotLoaded("pageLevel", this._P, _typePage, this._isNull); + return this._P; }, set: function (value) { - this.m_pageLevel=value; + this._P=value; _createSetPropertyAction(this.context, this, "PageLevel", value); }, enumerable: true, @@ -13769,11 +15186,11 @@ var OneNote; }); Object.defineProperty(Page.prototype, "title", { get: function () { - _throwIfNotLoaded("title", this.m_title, "Page", this._isNull); - return this.m_title; + _throwIfNotLoaded("title", this._T, _typePage, this._isNull); + return this._T; }, set: function (value) { - this.m_title=value; + this._T=value; _createSetPropertyAction(this.context, this, "Title", value); }, enumerable: true, @@ -13781,16 +15198,16 @@ var OneNote; }); Object.defineProperty(Page.prototype, "webUrl", { get: function () { - _throwIfNotLoaded("webUrl", this.m_webUrl, "Page", this._isNull); - return this.m_webUrl; + _throwIfNotLoaded("webUrl", this._W, _typePage, this._isNull); + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(Page.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Page", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typePage, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -13806,34 +15223,34 @@ var OneNote; ]); }; Page.prototype.addOutline=function (left, top, html) { - return new OneNote.Outline(this.context, _createMethodObjectPath(this.context, this, "AddOutline", 0, [left, top, html], false, true, null)); + return new OneNote.Outline(this.context, _createMethodObjectPath(this.context, this, "AddOutline", 0, [left, top, html], false, true, null, false)); }; Page.prototype.copyToSection=function (destinationSection) { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "CopyToSection", 0, [destinationSection], false, true, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "CopyToSection", 0, [destinationSection], false, true, null, false)); }; Page.prototype.copyToSectionAndSetClassNotebookPageSource=function (destinationSection) { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "CopyToSectionAndSetClassNotebookPageSource", 0, [destinationSection], false, true, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "CopyToSectionAndSetClassNotebookPageSource", 0, [destinationSection], false, true, null, false)); }; Page.prototype.getRestApiId=function () { - var action=_createMethodAction(this.context, this, "GetRestApiId", 1, []); + var action=_createMethodAction(this.context, this, "GetRestApiId", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Page.prototype.hasTitleContent=function () { - var action=_createMethodAction(this.context, this, "HasTitleContent", 1, []); + var action=_createMethodAction(this.context, this, "HasTitleContent", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Page.prototype.insertPageAsSibling=function (location, title) { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "InsertPageAsSibling", 0, [location, title], false, true, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "InsertPageAsSibling", 0, [location, title], false, true, null, false)); }; Page.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Page.prototype._Sync=function () { - _createMethodAction(this.context, this, "_Sync", 0, []); + _createMethodAction(this.context, this, "_Sync", 0, [], false); }; Page.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13842,25 +15259,25 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["ClassNotebookPageSource"])) { - this.m_classNotebookPageSource=obj["ClassNotebookPageSource"]; + this._C=obj["ClassNotebookPageSource"]; } if (!_isUndefined(obj["ClientUrl"])) { - this.m_clientUrl=obj["ClientUrl"]; + this._Cl=obj["ClientUrl"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["PageLevel"])) { - this.m_pageLevel=obj["PageLevel"]; + this._P=obj["PageLevel"]; } if (!_isUndefined(obj["Title"])) { - this.m_title=obj["Title"]; + this._T=obj["Title"]; } if (!_isUndefined(obj["WebUrl"])) { - this.m_webUrl=obj["WebUrl"]; + this._W=obj["WebUrl"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["contents", "Contents", "inkAnalysisOrNull", "InkAnalysisOrNull", "parentSection", "ParentSection"]); }; @@ -13874,10 +15291,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; Page.prototype.track=function () { @@ -13890,17 +15307,18 @@ var OneNote; }; Page.prototype.toJSON=function () { return { - "classNotebookPageSource": this.m_classNotebookPageSource, - "clientUrl": this.m_clientUrl, - "id": this.m_id, - "pageLevel": this.m_pageLevel, - "title": this.m_title, - "webUrl": this.m_webUrl + "classNotebookPageSource": this._C, + "clientUrl": this._Cl, + "id": this._I, + "pageLevel": this._P, + "title": this._T, + "webUrl": this._W }; }; return Page; }(OfficeExtension.ClientObject)); OneNote.Page=Page; + var _typePageCollection="PageCollection"; var PageCollection=(function (_super) { __extends(PageCollection, _super); function PageCollection() { @@ -13915,7 +15333,7 @@ var OneNote; }); Object.defineProperty(PageCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "PageCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typePageCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -13923,31 +15341,31 @@ var OneNote; }); Object.defineProperty(PageCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "PageCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typePageCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(PageCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "PageCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typePageCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); PageCollection.prototype.getByTitle=function (title) { - return new OneNote.PageCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTitle", 1, [title], true, false, null)); + return new OneNote.PageCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTitle", 1, [title], true, false, null, false)); }; PageCollection.prototype.getItem=function (index) { return new OneNote.Page(this.context, _createIndexerObjectPath(this.context, this, [index])); }; PageCollection.prototype.getItemAt=function (index) { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; PageCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; PageCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13956,10 +15374,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -13981,7 +15399,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; PageCollection.prototype.track=function () { @@ -13994,12 +15412,13 @@ var OneNote; }; PageCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return PageCollection; }(OfficeExtension.ClientObject)); OneNote.PageCollection=PageCollection; + var _typePageContent="PageContent"; var PageContent=(function (_super) { __extends(PageContent, _super); function PageContent() { @@ -14014,59 +15433,59 @@ var OneNote; }); Object.defineProperty(PageContent.prototype, "image", { get: function () { - if (!this.m_image) { - this.m_image=new OneNote.Image(this.context, _createPropertyObjectPath(this.context, this, "Image", false, false)); + if (!this._Im) { + this._Im=new OneNote.Image(this.context, _createPropertyObjectPath(this.context, this, "Image", false, false, false)); } - return this.m_image; + return this._Im; }, enumerable: true, configurable: true }); Object.defineProperty(PageContent.prototype, "ink", { get: function () { - if (!this.m_ink) { - this.m_ink=new OneNote.FloatingInk(this.context, _createPropertyObjectPath(this.context, this, "Ink", false, false)); + if (!this._In) { + this._In=new OneNote.FloatingInk(this.context, _createPropertyObjectPath(this.context, this, "Ink", false, false, false)); } - return this.m_ink; + return this._In; }, enumerable: true, configurable: true }); Object.defineProperty(PageContent.prototype, "outline", { get: function () { - if (!this.m_outline) { - this.m_outline=new OneNote.Outline(this.context, _createPropertyObjectPath(this.context, this, "Outline", false, false)); + if (!this._O) { + this._O=new OneNote.Outline(this.context, _createPropertyObjectPath(this.context, this, "Outline", false, false, false)); } - return this.m_outline; + return this._O; }, enumerable: true, configurable: true }); Object.defineProperty(PageContent.prototype, "parentPage", { get: function () { - if (!this.m_parentPage) { - this.m_parentPage=new OneNote.Page(this.context, _createPropertyObjectPath(this.context, this, "ParentPage", false, false)); + if (!this._P) { + this._P=new OneNote.Page(this.context, _createPropertyObjectPath(this.context, this, "ParentPage", false, false, false)); } - return this.m_parentPage; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(PageContent.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "PageContent", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typePageContent, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(PageContent.prototype, "left", { get: function () { - _throwIfNotLoaded("left", this.m_left, "PageContent", this._isNull); - return this.m_left; + _throwIfNotLoaded("left", this._L, _typePageContent, this._isNull); + return this._L; }, set: function (value) { - this.m_left=value; + this._L=value; _createSetPropertyAction(this.context, this, "Left", value); }, enumerable: true, @@ -14074,11 +15493,11 @@ var OneNote; }); Object.defineProperty(PageContent.prototype, "top", { get: function () { - _throwIfNotLoaded("top", this.m_top, "PageContent", this._isNull); - return this.m_top; + _throwIfNotLoaded("top", this._T, _typePageContent, this._isNull); + return this._T; }, set: function (value) { - this.m_top=value; + this._T=value; _createSetPropertyAction(this.context, this, "Top", value); }, enumerable: true, @@ -14086,16 +15505,16 @@ var OneNote; }); Object.defineProperty(PageContent.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "PageContent", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._Ty, _typePageContent, this._isNull); + return this._Ty; }, enumerable: true, configurable: true }); Object.defineProperty(PageContent.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "PageContent", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typePageContent, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -14113,10 +15532,10 @@ var OneNote; ]); }; PageContent.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; PageContent.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; PageContent.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14125,19 +15544,19 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Left"])) { - this.m_left=obj["Left"]; + this._L=obj["Left"]; } if (!_isUndefined(obj["Top"])) { - this.m_top=obj["Top"]; + this._T=obj["Top"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._Ty=obj["Type"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["image", "Image", "ink", "Ink", "outline", "Outline", "parentPage", "ParentPage"]); }; @@ -14151,10 +15570,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; PageContent.prototype.track=function () { @@ -14167,15 +15586,16 @@ var OneNote; }; PageContent.prototype.toJSON=function () { return { - "id": this.m_id, - "left": this.m_left, - "top": this.m_top, - "type": this.m_type + "id": this._I, + "left": this._L, + "top": this._T, + "type": this._Ty }; }; return PageContent; }(OfficeExtension.ClientObject)); OneNote.PageContent=PageContent; + var _typePageContentCollection="PageContentCollection"; var PageContentCollection=(function (_super) { __extends(PageContentCollection, _super); function PageContentCollection() { @@ -14190,7 +15610,7 @@ var OneNote; }); Object.defineProperty(PageContentCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "PageContentCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typePageContentCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14198,16 +15618,16 @@ var OneNote; }); Object.defineProperty(PageContentCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "PageContentCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typePageContentCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(PageContentCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "PageContentCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typePageContentCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -14216,10 +15636,10 @@ var OneNote; return new OneNote.PageContent(this.context, _createIndexerObjectPath(this.context, this, [index])); }; PageContentCollection.prototype.getItemAt=function (index) { - return new OneNote.PageContent(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.PageContent(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; PageContentCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; PageContentCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14228,10 +15648,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14253,7 +15673,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; PageContentCollection.prototype.track=function () { @@ -14266,12 +15686,13 @@ var OneNote; }; PageContentCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return PageContentCollection; }(OfficeExtension.ClientObject)); OneNote.PageContentCollection=PageContentCollection; + var _typeOutline="Outline"; var Outline=(function (_super) { __extends(Outline, _super); function Outline() { @@ -14286,54 +15707,60 @@ var OneNote; }); Object.defineProperty(Outline.prototype, "pageContent", { get: function () { - if (!this.m_pageContent) { - this.m_pageContent=new OneNote.PageContent(this.context, _createPropertyObjectPath(this.context, this, "PageContent", false, false)); + if (!this._P) { + this._P=new OneNote.PageContent(this.context, _createPropertyObjectPath(this.context, this, "PageContent", false, false, false)); } - return this.m_pageContent; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Outline.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new OneNote.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._Pa) { + this._Pa=new OneNote.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Outline.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Outline", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeOutline, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Outline.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Outline", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeOutline, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Outline.prototype.appendHtml=function (html) { - _createMethodAction(this.context, this, "AppendHtml", 0, [html]); + _createMethodAction(this.context, this, "AppendHtml", 0, [html], false); }; Outline.prototype.appendImage=function (base64EncodedImage, width, height) { - return new OneNote.Image(this.context, _createMethodObjectPath(this.context, this, "AppendImage", 0, [base64EncodedImage, width, height], false, true, null)); + return new OneNote.Image(this.context, _createMethodObjectPath(this.context, this, "AppendImage", 0, [base64EncodedImage, width, height], false, true, null, false)); }; Outline.prototype.appendRichText=function (paragraphText) { - return new OneNote.RichText(this.context, _createMethodObjectPath(this.context, this, "AppendRichText", 0, [paragraphText], false, true, null)); + return new OneNote.RichText(this.context, _createMethodObjectPath(this.context, this, "AppendRichText", 0, [paragraphText], false, true, null, false)); }; Outline.prototype.appendTable=function (rowCount, columnCount, values) { - return new OneNote.Table(this.context, _createMethodObjectPath(this.context, this, "AppendTable", 0, [rowCount, columnCount, values], false, true, null)); + return new OneNote.Table(this.context, _createMethodObjectPath(this.context, this, "AppendTable", 0, [rowCount, columnCount, values], false, true, null, false)); + }; + Outline.prototype.isTitle=function () { + var action=_createMethodAction(this.context, this, "IsTitle", 0, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; }; Outline.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Outline.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14342,10 +15769,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["pageContent", "PageContent", "paragraphs", "Paragraphs"]); }; @@ -14359,10 +15786,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; Outline.prototype.track=function () { @@ -14375,12 +15802,13 @@ var OneNote; }; Outline.prototype.toJSON=function () { return { - "id": this.m_id + "id": this._I }; }; return Outline; }(OfficeExtension.ClientObject)); OneNote.Outline=Outline; + var _typeParagraph="Paragraph"; var Paragraph=(function (_super) { __extends(Paragraph, _super); function Paragraph() { @@ -14395,151 +15823,154 @@ var OneNote; }); Object.defineProperty(Paragraph.prototype, "image", { get: function () { - if (!this.m_image) { - this.m_image=new OneNote.Image(this.context, _createPropertyObjectPath(this.context, this, "Image", false, false)); + if (!this._Im) { + this._Im=new OneNote.Image(this.context, _createPropertyObjectPath(this.context, this, "Image", false, false, false)); } - return this.m_image; + return this._Im; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "inkWords", { get: function () { - if (!this.m_inkWords) { - this.m_inkWords=new OneNote.InkWordCollection(this.context, _createPropertyObjectPath(this.context, this, "InkWords", true, false)); + if (!this._In) { + this._In=new OneNote.InkWordCollection(this.context, _createPropertyObjectPath(this.context, this, "InkWords", true, false, false)); } - return this.m_inkWords; + return this._In; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "outline", { get: function () { - if (!this.m_outline) { - this.m_outline=new OneNote.Outline(this.context, _createPropertyObjectPath(this.context, this, "Outline", false, false)); + if (!this._O) { + this._O=new OneNote.Outline(this.context, _createPropertyObjectPath(this.context, this, "Outline", false, false, false)); } - return this.m_outline; + return this._O; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new OneNote.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._P) { + this._P=new OneNote.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentParagraph", { get: function () { - if (!this.m_parentParagraph) { - this.m_parentParagraph=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "ParentParagraph", false, false)); + if (!this._Pa) { + this._Pa=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "ParentParagraph", false, false, false)); } - return this.m_parentParagraph; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentParagraphOrNull", { get: function () { - if (!this.m_parentParagraphOrNull) { - this.m_parentParagraphOrNull=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "ParentParagraphOrNull", false, false)); + if (!this._Par) { + this._Par=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "ParentParagraphOrNull", false, false, false)); } - return this.m_parentParagraphOrNull; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentTableCell", { get: function () { - if (!this.m_parentTableCell) { - this.m_parentTableCell=new OneNote.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false)); + if (!this._Pare) { + this._Pare=new OneNote.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false, false)); } - return this.m_parentTableCell; + return this._Pare; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentTableCellOrNull", { get: function () { - if (!this.m_parentTableCellOrNull) { - this.m_parentTableCellOrNull=new OneNote.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNull", false, false)); + if (!this._Paren) { + this._Paren=new OneNote.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNull", false, false, false)); } - return this.m_parentTableCellOrNull; + return this._Paren; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "richText", { get: function () { - if (!this.m_richText) { - this.m_richText=new OneNote.RichText(this.context, _createPropertyObjectPath(this.context, this, "RichText", false, false)); + if (!this._R) { + this._R=new OneNote.RichText(this.context, _createPropertyObjectPath(this.context, this, "RichText", false, false, false)); } - return this.m_richText; + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "table", { get: function () { - if (!this.m_table) { - this.m_table=new OneNote.Table(this.context, _createPropertyObjectPath(this.context, this, "Table", false, false)); + if (!this._T) { + this._T=new OneNote.Table(this.context, _createPropertyObjectPath(this.context, this, "Table", false, false, false)); } - return this.m_table; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Paragraph", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeParagraph, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "Paragraph", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._Ty, _typeParagraph, this._isNull); + return this._Ty; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Paragraph", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeParagraph, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); + Paragraph.prototype.addNoteTag=function (type, status) { + return new OneNote.NoteTag(this.context, _createMethodObjectPath(this.context, this, "AddNoteTag", 0, [type, status], false, true, null, false)); + }; Paragraph.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Paragraph.prototype.getParagraphInfo=function () { - var action=_createMethodAction(this.context, this, "GetParagraphInfo", 0, []); + var action=_createMethodAction(this.context, this, "GetParagraphInfo", 0, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Paragraph.prototype.insertHtmlAsSibling=function (insertLocation, html) { - _createMethodAction(this.context, this, "InsertHtmlAsSibling", 0, [insertLocation, html]); + _createMethodAction(this.context, this, "InsertHtmlAsSibling", 0, [insertLocation, html], false); }; Paragraph.prototype.insertImageAsSibling=function (insertLocation, base64EncodedImage, width, height) { - return new OneNote.Image(this.context, _createMethodObjectPath(this.context, this, "InsertImageAsSibling", 0, [insertLocation, base64EncodedImage, width, height], false, true, null)); + return new OneNote.Image(this.context, _createMethodObjectPath(this.context, this, "InsertImageAsSibling", 0, [insertLocation, base64EncodedImage, width, height], false, true, null, false)); }; Paragraph.prototype.insertRichTextAsSibling=function (insertLocation, paragraphText) { - return new OneNote.RichText(this.context, _createMethodObjectPath(this.context, this, "InsertRichTextAsSibling", 0, [insertLocation, paragraphText], false, true, null)); + return new OneNote.RichText(this.context, _createMethodObjectPath(this.context, this, "InsertRichTextAsSibling", 0, [insertLocation, paragraphText], false, true, null, false)); }; Paragraph.prototype.insertTableAsSibling=function (insertLocation, rowCount, columnCount, values) { - return new OneNote.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTableAsSibling", 0, [insertLocation, rowCount, columnCount, values], false, true, null)); + return new OneNote.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTableAsSibling", 0, [insertLocation, rowCount, columnCount, values], false, true, null, false)); }; Paragraph.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Paragraph.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14548,13 +15979,13 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._Ty=obj["Type"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["image", "Image", "inkWords", "InkWords", "outline", "Outline", "paragraphs", "Paragraphs", "parentParagraph", "ParentParagraph", "parentParagraphOrNull", "ParentParagraphOrNull", "parentTableCell", "ParentTableCell", "parentTableCellOrNull", "ParentTableCellOrNull", "richText", "RichText", "table", "Table"]); }; @@ -14568,10 +15999,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; Paragraph.prototype.track=function () { @@ -14584,13 +16015,14 @@ var OneNote; }; Paragraph.prototype.toJSON=function () { return { - "id": this.m_id, - "type": this.m_type + "id": this._I, + "type": this._Ty }; }; return Paragraph; }(OfficeExtension.ClientObject)); OneNote.Paragraph=Paragraph; + var _typeParagraphCollection="ParagraphCollection"; var ParagraphCollection=(function (_super) { __extends(ParagraphCollection, _super); function ParagraphCollection() { @@ -14605,7 +16037,7 @@ var OneNote; }); Object.defineProperty(ParagraphCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ParagraphCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeParagraphCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14613,16 +16045,16 @@ var OneNote; }); Object.defineProperty(ParagraphCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "ParagraphCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeParagraphCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(ParagraphCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "ParagraphCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeParagraphCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -14631,10 +16063,10 @@ var OneNote; return new OneNote.Paragraph(this.context, _createIndexerObjectPath(this.context, this, [index])); }; ParagraphCollection.prototype.getItemAt=function (index) { - return new OneNote.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; ParagraphCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; ParagraphCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14643,10 +16075,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14668,7 +16100,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; ParagraphCollection.prototype.track=function () { @@ -14681,12 +16113,100 @@ var OneNote; }; ParagraphCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return ParagraphCollection; }(OfficeExtension.ClientObject)); OneNote.ParagraphCollection=ParagraphCollection; + var _typeNoteTag="NoteTag"; + var NoteTag=(function (_super) { + __extends(NoteTag, _super); + function NoteTag() { + _super.apply(this, arguments); + } + Object.defineProperty(NoteTag.prototype, "_className", { + get: function () { + return "NoteTag"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NoteTag.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeNoteTag, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NoteTag.prototype, "status", { + get: function () { + _throwIfNotLoaded("status", this._S, _typeNoteTag, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NoteTag.prototype, "type", { + get: function () { + _throwIfNotLoaded("type", this._T, _typeNoteTag, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + NoteTag.prototype._KeepReference=function () { + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); + }; + NoteTag.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I=obj["Id"]; + } + if (!_isUndefined(obj["Status"])) { + this._S=obj["Status"]; + } + if (!_isUndefined(obj["Type"])) { + this._T=obj["Type"]; + } + }; + NoteTag.prototype.load=function (option) { + _load(this, option); + return this; + }; + NoteTag.prototype._handleIdResult=function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I=value["Id"]; + } + }; + NoteTag.prototype.track=function () { + this.context.trackedObjects.add(this); + return this; + }; + NoteTag.prototype.untrack=function () { + this.context.trackedObjects.remove(this); + return this; + }; + NoteTag.prototype.toJSON=function () { + return { + "id": this._I, + "status": this._S, + "type": this._T + }; + }; + return NoteTag; + }(OfficeExtension.ClientObject)); + OneNote.NoteTag=NoteTag; + var _typeRichText="RichText"; var RichText=(function (_super) { __extends(RichText, _super); function RichText() { @@ -14701,54 +16221,54 @@ var OneNote; }); Object.defineProperty(RichText.prototype, "paragraph", { get: function () { - if (!this.m_paragraph) { - this.m_paragraph=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false)); + if (!this._P) { + this._P=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false, false)); } - return this.m_paragraph; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(RichText.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "RichText", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeRichText, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(RichText.prototype, "languageId", { get: function () { - _throwIfNotLoaded("languageId", this.m_languageId, "RichText", this._isNull); - return this.m_languageId; + _throwIfNotLoaded("languageId", this._L, _typeRichText, this._isNull); + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(RichText.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "RichText", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._T, _typeRichText, this._isNull); + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(RichText.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "RichText", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeRichText, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); RichText.prototype.getHtml=function () { - var action=_createMethodAction(this.context, this, "GetHtml", 1, []); + var action=_createMethodAction(this.context, this, "GetHtml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; RichText.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; RichText.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14757,16 +16277,16 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["LanguageId"])) { - this.m_languageId=obj["LanguageId"]; + this._L=obj["LanguageId"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._T=obj["Text"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["paragraph", "Paragraph"]); }; @@ -14780,10 +16300,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; RichText.prototype.track=function () { @@ -14796,14 +16316,15 @@ var OneNote; }; RichText.prototype.toJSON=function () { return { - "id": this.m_id, - "languageId": this.m_languageId, - "text": this.m_text + "id": this._I, + "languageId": this._L, + "text": this._T }; }; return RichText; }(OfficeExtension.ClientObject)); OneNote.RichText=RichText; + var _typeImage="Image"; var Image=(function (_super) { __extends(Image, _super); function Image() { @@ -14818,31 +16339,31 @@ var OneNote; }); Object.defineProperty(Image.prototype, "pageContent", { get: function () { - if (!this.m_pageContent) { - this.m_pageContent=new OneNote.PageContent(this.context, _createPropertyObjectPath(this.context, this, "PageContent", false, false)); + if (!this._P) { + this._P=new OneNote.PageContent(this.context, _createPropertyObjectPath(this.context, this, "PageContent", false, false, false)); } - return this.m_pageContent; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Image.prototype, "paragraph", { get: function () { - if (!this.m_paragraph) { - this.m_paragraph=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false)); + if (!this._Pa) { + this._Pa=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false, false)); } - return this.m_paragraph; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Image.prototype, "description", { get: function () { - _throwIfNotLoaded("description", this.m_description, "Image", this._isNull); - return this.m_description; + _throwIfNotLoaded("description", this._D, _typeImage, this._isNull); + return this._D; }, set: function (value) { - this.m_description=value; + this._D=value; _createSetPropertyAction(this.context, this, "Description", value); }, enumerable: true, @@ -14850,11 +16371,11 @@ var OneNote; }); Object.defineProperty(Image.prototype, "height", { get: function () { - _throwIfNotLoaded("height", this.m_height, "Image", this._isNull); - return this.m_height; + _throwIfNotLoaded("height", this._H, _typeImage, this._isNull); + return this._H; }, set: function (value) { - this.m_height=value; + this._H=value; _createSetPropertyAction(this.context, this, "Height", value); }, enumerable: true, @@ -14862,11 +16383,11 @@ var OneNote; }); Object.defineProperty(Image.prototype, "hyperlink", { get: function () { - _throwIfNotLoaded("hyperlink", this.m_hyperlink, "Image", this._isNull); - return this.m_hyperlink; + _throwIfNotLoaded("hyperlink", this._Hy, _typeImage, this._isNull); + return this._Hy; }, set: function (value) { - this.m_hyperlink=value; + this._Hy=value; _createSetPropertyAction(this.context, this, "Hyperlink", value); }, enumerable: true, @@ -14874,27 +16395,27 @@ var OneNote; }); Object.defineProperty(Image.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Image", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeImage, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Image.prototype, "ocrData", { get: function () { - _throwIfNotLoaded("ocrData", this.m_ocrData, "Image", this._isNull); - return this.m_ocrData; + _throwIfNotLoaded("ocrData", this._O, _typeImage, this._isNull); + return this._O; }, enumerable: true, configurable: true }); Object.defineProperty(Image.prototype, "width", { get: function () { - _throwIfNotLoaded("width", this.m_width, "Image", this._isNull); - return this.m_width; + _throwIfNotLoaded("width", this._W, _typeImage, this._isNull); + return this._W; }, set: function (value) { - this.m_width=value; + this._W=value; _createSetPropertyAction(this.context, this, "Width", value); }, enumerable: true, @@ -14902,8 +16423,8 @@ var OneNote; }); Object.defineProperty(Image.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Image", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeImage, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -14917,13 +16438,13 @@ var OneNote; ]); }; Image.prototype.getBase64Image=function () { - var action=_createMethodAction(this.context, this, "GetBase64Image", 1, []); + var action=_createMethodAction(this.context, this, "GetBase64Image", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Image.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Image.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14932,25 +16453,25 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Description"])) { - this.m_description=obj["Description"]; + this._D=obj["Description"]; } if (!_isUndefined(obj["Height"])) { - this.m_height=obj["Height"]; + this._H=obj["Height"]; } if (!_isUndefined(obj["Hyperlink"])) { - this.m_hyperlink=obj["Hyperlink"]; + this._Hy=obj["Hyperlink"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["OcrData"])) { - this.m_ocrData=obj["OcrData"]; + this._O=obj["OcrData"]; } if (!_isUndefined(obj["Width"])) { - this.m_width=obj["Width"]; + this._W=obj["Width"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["pageContent", "PageContent", "paragraph", "Paragraph"]); }; @@ -14964,10 +16485,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; Image.prototype.track=function () { @@ -14980,17 +16501,18 @@ var OneNote; }; Image.prototype.toJSON=function () { return { - "description": this.m_description, - "height": this.m_height, - "hyperlink": this.m_hyperlink, - "id": this.m_id, - "ocrData": this.m_ocrData, - "width": this.m_width + "description": this._D, + "height": this._H, + "hyperlink": this._Hy, + "id": this._I, + "ocrData": this._O, + "width": this._W }; }; return Image; }(OfficeExtension.ClientObject)); OneNote.Image=Image; + var _typeTable="Table"; var Table=(function (_super) { __extends(Table, _super); function Table() { @@ -15005,31 +16527,31 @@ var OneNote; }); Object.defineProperty(Table.prototype, "paragraph", { get: function () { - if (!this.m_paragraph) { - this.m_paragraph=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false)); + if (!this._P) { + this._P=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false, false)); } - return this.m_paragraph; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "rows", { get: function () { - if (!this.m_rows) { - this.m_rows=new OneNote.TableRowCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false)); + if (!this._Ro) { + this._Ro=new OneNote.TableRowCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false, false)); } - return this.m_rows; + return this._Ro; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "borderVisible", { get: function () { - _throwIfNotLoaded("borderVisible", this.m_borderVisible, "Table", this._isNull); - return this.m_borderVisible; + _throwIfNotLoaded("borderVisible", this._B, _typeTable, this._isNull); + return this._B; }, set: function (value) { - this.m_borderVisible=value; + this._B=value; _createSetPropertyAction(this.context, this, "BorderVisible", value); }, enumerable: true, @@ -15037,32 +16559,32 @@ var OneNote; }); Object.defineProperty(Table.prototype, "columnCount", { get: function () { - _throwIfNotLoaded("columnCount", this.m_columnCount, "Table", this._isNull); - return this.m_columnCount; + _throwIfNotLoaded("columnCount", this._C, _typeTable, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Table", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeTable, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "rowCount", { get: function () { - _throwIfNotLoaded("rowCount", this.m_rowCount, "Table", this._isNull); - return this.m_rowCount; + _throwIfNotLoaded("rowCount", this._R, _typeTable, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Table", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTable, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -15076,28 +16598,28 @@ var OneNote; ]); }; Table.prototype.appendColumn=function (values) { - _createMethodAction(this.context, this, "AppendColumn", 0, [values]); + _createMethodAction(this.context, this, "AppendColumn", 0, [values], false); }; Table.prototype.appendRow=function (values) { - return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "AppendRow", 0, [values], false, true, null)); + return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "AppendRow", 0, [values], false, true, null, false)); }; Table.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; Table.prototype.getCell=function (rowIndex, cellIndex) { - return new OneNote.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [rowIndex, cellIndex], false, false, null)); + return new OneNote.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [rowIndex, cellIndex], false, false, null, false)); }; Table.prototype.insertColumn=function (index, values) { - _createMethodAction(this.context, this, "InsertColumn", 0, [index, values]); + _createMethodAction(this.context, this, "InsertColumn", 0, [index, values], false); }; Table.prototype.insertRow=function (index, values) { - return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "InsertRow", 0, [index, values], false, true, null)); + return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "InsertRow", 0, [index, values], false, true, null, false)); }; Table.prototype.setShadingColor=function (colorCode) { - _createMethodAction(this.context, this, "SetShadingColor", 0, [colorCode]); + _createMethodAction(this.context, this, "SetShadingColor", 0, [colorCode], false); }; Table.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Table.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15106,19 +16628,19 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["BorderVisible"])) { - this.m_borderVisible=obj["BorderVisible"]; + this._B=obj["BorderVisible"]; } if (!_isUndefined(obj["ColumnCount"])) { - this.m_columnCount=obj["ColumnCount"]; + this._C=obj["ColumnCount"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["RowCount"])) { - this.m_rowCount=obj["RowCount"]; + this._R=obj["RowCount"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["paragraph", "Paragraph", "rows", "Rows"]); }; @@ -15132,10 +16654,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; Table.prototype.track=function () { @@ -15148,15 +16670,16 @@ var OneNote; }; Table.prototype.toJSON=function () { return { - "borderVisible": this.m_borderVisible, - "columnCount": this.m_columnCount, - "id": this.m_id, - "rowCount": this.m_rowCount + "borderVisible": this._B, + "columnCount": this._C, + "id": this._I, + "rowCount": this._R }; }; return Table; }(OfficeExtension.ClientObject)); OneNote.Table=Table; + var _typeTableRow="TableRow"; var TableRow=(function (_super) { __extends(TableRow, _super); function TableRow() { @@ -15171,67 +16694,67 @@ var OneNote; }); Object.defineProperty(TableRow.prototype, "cells", { get: function () { - if (!this.m_cells) { - this.m_cells=new OneNote.TableCellCollection(this.context, _createPropertyObjectPath(this.context, this, "Cells", true, false)); + if (!this._Ce) { + this._Ce=new OneNote.TableCellCollection(this.context, _createPropertyObjectPath(this.context, this, "Cells", true, false, false)); } - return this.m_cells; + return this._Ce; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new OneNote.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + if (!this._P) { + this._P=new OneNote.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "cellCount", { get: function () { - _throwIfNotLoaded("cellCount", this.m_cellCount, "TableRow", this._isNull); - return this.m_cellCount; + _throwIfNotLoaded("cellCount", this._C, _typeTableRow, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "TableRow", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeTableRow, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "rowIndex", { get: function () { - _throwIfNotLoaded("rowIndex", this.m_rowIndex, "TableRow", this._isNull); - return this.m_rowIndex; + _throwIfNotLoaded("rowIndex", this._R, _typeTableRow, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableRow", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableRow, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); TableRow.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; TableRow.prototype.insertRowAsSibling=function (insertLocation, values) { - return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "InsertRowAsSibling", 0, [insertLocation, values], false, true, null)); + return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "InsertRowAsSibling", 0, [insertLocation, values], false, true, null, false)); }; TableRow.prototype.setShadingColor=function (colorCode) { - _createMethodAction(this.context, this, "SetShadingColor", 0, [colorCode]); + _createMethodAction(this.context, this, "SetShadingColor", 0, [colorCode], false); }; TableRow.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableRow.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15240,16 +16763,16 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["CellCount"])) { - this.m_cellCount=obj["CellCount"]; + this._C=obj["CellCount"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["RowIndex"])) { - this.m_rowIndex=obj["RowIndex"]; + this._R=obj["RowIndex"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["cells", "Cells", "parentTable", "ParentTable"]); }; @@ -15263,10 +16786,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; TableRow.prototype.track=function () { @@ -15279,14 +16802,15 @@ var OneNote; }; TableRow.prototype.toJSON=function () { return { - "cellCount": this.m_cellCount, - "id": this.m_id, - "rowIndex": this.m_rowIndex + "cellCount": this._C, + "id": this._I, + "rowIndex": this._R }; }; return TableRow; }(OfficeExtension.ClientObject)); OneNote.TableRow=TableRow; + var _typeTableRowCollection="TableRowCollection"; var TableRowCollection=(function (_super) { __extends(TableRowCollection, _super); function TableRowCollection() { @@ -15301,7 +16825,7 @@ var OneNote; }); Object.defineProperty(TableRowCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableRowCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableRowCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15309,16 +16833,16 @@ var OneNote; }); Object.defineProperty(TableRowCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "TableRowCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeTableRowCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(TableRowCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableRowCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableRowCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -15327,10 +16851,10 @@ var OneNote; return new OneNote.TableRow(this.context, _createIndexerObjectPath(this.context, this, [index])); }; TableRowCollection.prototype.getItemAt=function (index) { - return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; TableRowCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableRowCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15339,10 +16863,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15364,7 +16888,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; TableRowCollection.prototype.track=function () { @@ -15377,12 +16901,13 @@ var OneNote; }; TableRowCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return TableRowCollection; }(OfficeExtension.ClientObject)); OneNote.TableRowCollection=TableRowCollection; + var _typeTableCell="TableCell"; var TableCell=(function (_super) { __extends(TableCell, _super); function TableCell() { @@ -15397,55 +16922,55 @@ var OneNote; }); Object.defineProperty(TableCell.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new OneNote.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._P) { + this._P=new OneNote.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "parentRow", { get: function () { - if (!this.m_parentRow) { - this.m_parentRow=new OneNote.TableRow(this.context, _createPropertyObjectPath(this.context, this, "ParentRow", false, false)); + if (!this._Pa) { + this._Pa=new OneNote.TableRow(this.context, _createPropertyObjectPath(this.context, this, "ParentRow", false, false, false)); } - return this.m_parentRow; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "cellIndex", { get: function () { - _throwIfNotLoaded("cellIndex", this.m_cellIndex, "TableCell", this._isNull); - return this.m_cellIndex; + _throwIfNotLoaded("cellIndex", this._C, _typeTableCell, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "TableCell", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeTableCell, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "rowIndex", { get: function () { - _throwIfNotLoaded("rowIndex", this.m_rowIndex, "TableCell", this._isNull); - return this.m_rowIndex; + _throwIfNotLoaded("rowIndex", this._R, _typeTableCell, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "shadingColor", { get: function () { - _throwIfNotLoaded("shadingColor", this.m_shadingColor, "TableCell", this._isNull); - return this.m_shadingColor; + _throwIfNotLoaded("shadingColor", this._S, _typeTableCell, this._isNull); + return this._S; }, set: function (value) { - this.m_shadingColor=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShadingColor", value); }, enumerable: true, @@ -15453,8 +16978,8 @@ var OneNote; }); Object.defineProperty(TableCell.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableCell", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableCell, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -15468,22 +16993,22 @@ var OneNote; ]); }; TableCell.prototype.appendHtml=function (html) { - _createMethodAction(this.context, this, "AppendHtml", 0, [html]); + _createMethodAction(this.context, this, "AppendHtml", 0, [html], false); }; TableCell.prototype.appendImage=function (base64EncodedImage, width, height) { - return new OneNote.Image(this.context, _createMethodObjectPath(this.context, this, "AppendImage", 0, [base64EncodedImage, width, height], false, true, null)); + return new OneNote.Image(this.context, _createMethodObjectPath(this.context, this, "AppendImage", 0, [base64EncodedImage, width, height], false, true, null, false)); }; TableCell.prototype.appendRichText=function (paragraphText) { - return new OneNote.RichText(this.context, _createMethodObjectPath(this.context, this, "AppendRichText", 0, [paragraphText], false, true, null)); + return new OneNote.RichText(this.context, _createMethodObjectPath(this.context, this, "AppendRichText", 0, [paragraphText], false, true, null, false)); }; TableCell.prototype.appendTable=function (rowCount, columnCount, values) { - return new OneNote.Table(this.context, _createMethodObjectPath(this.context, this, "AppendTable", 0, [rowCount, columnCount, values], false, true, null)); + return new OneNote.Table(this.context, _createMethodObjectPath(this.context, this, "AppendTable", 0, [rowCount, columnCount, values], false, true, null, false)); }; TableCell.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; TableCell.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableCell.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15492,19 +17017,19 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["CellIndex"])) { - this.m_cellIndex=obj["CellIndex"]; + this._C=obj["CellIndex"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["RowIndex"])) { - this.m_rowIndex=obj["RowIndex"]; + this._R=obj["RowIndex"]; } if (!_isUndefined(obj["ShadingColor"])) { - this.m_shadingColor=obj["ShadingColor"]; + this._S=obj["ShadingColor"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["paragraphs", "Paragraphs", "parentRow", "ParentRow"]); }; @@ -15518,10 +17043,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; TableCell.prototype.track=function () { @@ -15534,15 +17059,16 @@ var OneNote; }; TableCell.prototype.toJSON=function () { return { - "cellIndex": this.m_cellIndex, - "id": this.m_id, - "rowIndex": this.m_rowIndex, - "shadingColor": this.m_shadingColor + "cellIndex": this._C, + "id": this._I, + "rowIndex": this._R, + "shadingColor": this._S }; }; return TableCell; }(OfficeExtension.ClientObject)); OneNote.TableCell=TableCell; + var _typeTableCellCollection="TableCellCollection"; var TableCellCollection=(function (_super) { __extends(TableCellCollection, _super); function TableCellCollection() { @@ -15557,7 +17083,7 @@ var OneNote; }); Object.defineProperty(TableCellCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableCellCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableCellCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15565,16 +17091,16 @@ var OneNote; }); Object.defineProperty(TableCellCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "TableCellCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeTableCellCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(TableCellCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableCellCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableCellCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -15583,10 +17109,10 @@ var OneNote; return new OneNote.TableCell(this.context, _createIndexerObjectPath(this.context, this, [index])); }; TableCellCollection.prototype.getItemAt=function (index) { - return new OneNote.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; TableCellCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableCellCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15595,10 +17121,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15620,7 +17146,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; TableCellCollection.prototype.track=function () { @@ -15633,7 +17159,7 @@ var OneNote; }; TableCellCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return TableCellCollection; @@ -15681,6 +17207,31 @@ var OneNote; ParagraphType.ink="Ink"; ParagraphType.other="Other"; })(ParagraphType=OneNote.ParagraphType || (OneNote.ParagraphType={})); + var NoteTagType; + (function (NoteTagType) { + NoteTagType.unknown="Unknown"; + NoteTagType.toDo="ToDo"; + NoteTagType.important="Important"; + NoteTagType.question="Question"; + NoteTagType.contact="Contact"; + NoteTagType.address="Address"; + NoteTagType.phoneNumber="PhoneNumber"; + NoteTagType.website="Website"; + NoteTagType.idea="Idea"; + NoteTagType.critical="Critical"; + NoteTagType.toDoPriority1="ToDoPriority1"; + NoteTagType.toDoPriority2="ToDoPriority2"; + })(NoteTagType=OneNote.NoteTagType || (OneNote.NoteTagType={})); + var NoteTagStatus; + (function (NoteTagStatus) { + NoteTagStatus.unknown="Unknown"; + NoteTagStatus.normal="Normal"; + NoteTagStatus.completed="Completed"; + NoteTagStatus.disabled="Disabled"; + NoteTagStatus.outlookTask="OutlookTask"; + NoteTagStatus.taskNotSyncedYet="TaskNotSyncedYet"; + NoteTagStatus.taskRemoved="TaskRemoved"; + })(NoteTagStatus=OneNote.NoteTagStatus || (OneNote.NoteTagStatus={})); var ServiceId; (function (ServiceId) { ServiceId.form="Form"; @@ -15695,6 +17246,7 @@ var OneNote; IdentityFilter.liveId="LiveId"; IdentityFilter.orgId="OrgId"; IdentityFilter.adal="ADAL"; + IdentityFilter.notebook="Notebook"; })(IdentityFilter=OneNote.IdentityFilter || (OneNote.IdentityFilter={})); var ListType; (function (ListType) { @@ -15714,6 +17266,7 @@ var OneNote; LogLevel.trace="Trace"; LogLevel.data="Data"; LogLevel.exception="Exception"; + LogLevel.warning="Warning"; })(LogLevel=OneNote.LogLevel || (OneNote.LogLevel={})); var EventFlag; (function (EventFlag) { @@ -15786,24 +17339,29 @@ var OneNote; NumberType.lim="Lim"; NumberType.custom="Custom"; })(NumberType=OneNote.NumberType || (OneNote.NumberType={})); - var VisibilityType; - (function (VisibilityType) { - VisibilityType.preinstallClassNotebook="PreinstallClassNotebook"; - VisibilityType.distributePageId="DistributePageId"; - VisibilityType.distributeSection="DistributeSection"; - VisibilityType.reviewStudentWork="ReviewStudentWork"; - VisibilityType.openTabForCreateClassNotebook="OpenTabForCreateClassNotebook"; - VisibilityType.openTabForManageStudent="OpenTabForManageStudent"; - VisibilityType.openTabForManageTeacher="OpenTabForManageTeacher"; - VisibilityType.openTabForGetNotebookLink="OpenTabForGetNotebookLink"; - VisibilityType.openTabForTeacherTraining="OpenTabForTeacherTraining"; - VisibilityType.openTabForAddinGuide="OpenTabForAddinGuide"; - VisibilityType.openTabForEducationBlog="OpenTabForEducationBlog"; - VisibilityType.openTabForEducatorCommunity="OpenTabForEducatorCommunity"; - VisibilityType.openTabToSendFeedback="OpenTabToSendFeedback"; - VisibilityType.openTabForViewKnowledgeBase="OpenTabForViewKnowledgeBase"; - VisibilityType.openTabForSuggestingFeature="OpenTabForSuggestingFeature"; - })(VisibilityType=OneNote.VisibilityType || (OneNote.VisibilityType={})); + var ControlId; + (function (ControlId) { + ControlId.preinstallClassNotebook="PreinstallClassNotebook"; + ControlId.distributePageId="DistributePageId"; + ControlId.distributeSection="DistributeSection"; + ControlId.reviewStudentWork="ReviewStudentWork"; + ControlId.openTabForCreateClassNotebook="OpenTabForCreateClassNotebook"; + ControlId.openTabForManageStudent="OpenTabForManageStudent"; + ControlId.openTabForManageTeacher="OpenTabForManageTeacher"; + ControlId.openTabForGetNotebookLink="OpenTabForGetNotebookLink"; + ControlId.openTabForTeacherTraining="OpenTabForTeacherTraining"; + ControlId.openTabForAddinGuide="OpenTabForAddinGuide"; + ControlId.openTabForEducationBlog="OpenTabForEducationBlog"; + ControlId.openTabForEducatorCommunity="OpenTabForEducatorCommunity"; + ControlId.openTabToSendFeedback="OpenTabToSendFeedback"; + ControlId.openTabForViewKnowledgeBase="OpenTabForViewKnowledgeBase"; + ControlId.openTabForSuggestingFeature="OpenTabForSuggestingFeature"; + ControlId.createAssignment="CreateAssignment"; + ControlId.connections="Connections"; + ControlId.mapClassNotebooks="MapClassNotebooks"; + ControlId.mapStudents="MapStudents"; + ControlId.manageClasses="ManageClasses"; + })(ControlId=OneNote.ControlId || (OneNote.ControlId={})); var ErrorCodes; (function (ErrorCodes) { ErrorCodes.generalException="GeneralException"; @@ -15834,4 +17392,6 @@ var OneNote; OneNote.run=run; })(OneNote || (OneNote={})); +OfficeExtension.Utility._doApiNotSupportedCheck=true; + diff --git a/node_modules/@microsoft/office-js/dist/onenote-ios-16.00.js b/node_modules/@microsoft/office-js/dist/onenote-ios-16.00.js index 97ce24c..5e16b0f 100644 --- a/node_modules/@microsoft/office-js/dist/onenote-ios-16.00.js +++ b/node_modules/@microsoft/office-js/dist/onenote-ios-16.00.js @@ -1,5 +1,7 @@ -/* OneNote specific JavaScript API library */ -/* Version: 16.0.8204.1000 */ +/* OneNote iOS-specific API library */ +/* Version: 16.0.8827.3000 */ + +/* Office.js Version: 16.0.8828.1000 */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ @@ -16,4 +18,4 @@ * @version 2.3.0 */ -var __extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},OsfMsAjaxFactory,OSF,OSFWebView,CrossIFrameCommon,WinRT,OSFLog,Logger,OSFAriaLogger,OSFAppTelemetry,OfficeExt,OfficeExtension,OneNote;(function(n){var t=function(){function t(){}var n=!0;return t.prototype.isMsAjaxLoaded=function(){var t="function",i="undefined";return typeof Sys!==i&&typeof Type!==i&&Sys.StringBuilder&&typeof Sys.StringBuilder===t&&Type.registerNamespace&&typeof Type.registerNamespace===t&&Type.registerClass&&typeof Type.registerClass===t&&typeof Function._validateParams===t&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===t?n:!1},t.prototype.loadMsAjaxFull=function(n){var t=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,n)},Object.defineProperty(t.prototype,"msAjaxError",{get:function(){var n=this;return n._msAjaxError==null&&n.isMsAjaxLoaded()&&(n._msAjaxError=Error),n._msAjaxError},set:function(n){this._msAjaxError=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxString",{get:function(){var n=this;return n._msAjaxString==null&&n.isMsAjaxLoaded()&&(n._msAjaxString=String),n._msAjaxString},set:function(n){this._msAjaxString=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxDebug",{get:function(){var n=this;return n._msAjaxDebug==null&&n.isMsAjaxLoaded()&&(n._msAjaxDebug=Sys.Debug),n._msAjaxDebug},set:function(n){this._msAjaxDebug=n},enumerable:n,configurable:n}),t}();n.MicrosoftAjaxFactory=t})(OfficeExt||(OfficeExt={}));OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory;OSF=OSF||{},function(n){var t=function(){function n(n){this._internalStorage=n}return n.prototype.getItem=function(n){try{return this._internalStorage&&this._internalStorage.getItem(n)}catch(t){return null}},n.prototype.setItem=function(n,t){try{this._internalStorage&&this._internalStorage.setItem(n,t)}catch(i){}},n.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(n){}},n.prototype.removeItem=function(n){try{this._internalStorage&&this._internalStorage.removeItem(n)}catch(t){}},n.prototype.getKeysWithPrefix=function(n){var r=[],u,t,i;try{for(u=this._internalStorage&&this._internalStorage.length||0,t=0;t0?i.push(t):t.tabIndex===0&&r.push(t):r.push(t);return i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;return r===0&&(r=i.indexOf(n)-i.indexOf(t)),r}),[].concat(i,r)}var f="focus",e="on",b="configurable",k="writable",o="enumerable",s="undefined",i=!0,t=!1,c=2147483647,n=null,r=-1,l=r,d="&_xdm_Info=",g="&_serializer_version=",nt="_xdm_",ut="_serializer_version=",a="#",tt="&",h="class",v={},ft=3e4,y=n,p=n,u=(new Date).getTime();return{set_entropy:function(n){var t,r,i;if(typeof n=="string")for(t=0;t1?l[l.length-1]:n,s,h,c,a;return u&&o!=n&&(o.indexOf(tt)>=0&&(o=o.split(tt)[0]),o=decodeURIComponent(o)),s=w(),!f&&s&&(h=window.name.indexOf(i),h>r&&(c=window.name.indexOf(";",h),c==r&&(c=window.name.length),a=window.name.substring(h,c),o?s.setItem(a,o):o=s.getItem(a))),o},getConversationId:function(){var i=window.location.search,t=n,r;return i&&(r=i.indexOf("&"),t=r>0?i.substring(1,r):i.substr(1),t&&t.charAt(t.length-1)==="="&&(t=t.substring(0,t.length-1),t&&(t=decodeURIComponent(t)))),t},getInfoItems:function(n){var t=n.split("$");return typeof t[1]==s&&(t=n.split("|")),typeof t[1]==s&&(t=n.split("%7C")),t},getXdmFieldValue:function(n,t){var r="",u=OSF.OUtil.parseXdmInfo(t),i;if(u&&(i=OSF.OUtil.getInfoItems(u),i!=undefined&&i.length>=3))switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]),f;if(u)throw u;for(f in r)if(u=Function._validateParameter(n[f],r[f],f),u)throw u;},writeProfilerMark:function(n){window.msWriteProfilerMark&&(window.msWriteProfilerMark(n),OsfMsAjaxFactory.msAjaxDebug.trace(n))},outputDebug:function(n){typeof OsfMsAjaxFactory!==s&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){var e,f;r=r||{};for(e in u)f=u[e],r[f]==undefined&&(r[f]=i);return Object.defineProperty(n,t,r),n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[o])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[o])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[k,o,b])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[k,o,b])},finalizeProperties:function(n,r){var e,u;r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8,f=e&255,i[t++]=r>>2,i[t++]=(r&3)<<4|u>>4,i[t++]=(u&15)<<2|f>>6,i[t++]=f&63,isNaN(e)||(r=e>>8,u=s&255,f=s>>8,i[t++]=r>>2,i[t++]=(r&3)<<4|u>>4,i[t++]=(u&15)<<2|f>>6,i[t++]=f&63),isNaN(e)?i[t-1]=64:isNaN(s)&&(i[t-2]=64,i[t-1]=64),h=0;h0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){var u,i,f,r;if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(u=[],i=0;in)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=rt(u),o=e?u.length-1:0,u.length===0)return n;while(!h&&o>=0&&on)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=rt(u),l=y(u,e),s=v(u.length,l,o),s<0)return n;while(!c&&s>=0&&s0;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[r%16],r=Math.floor(r/16);for(;t<32;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[Math.floor(Math.random()*16)];return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];return i?(i.name||(i.name=n[this.errorCodes.ooeInternalError].name),i.message||(i.message=n[this.errorCodes.ooeInternalError].message)):i=n[this.errorCodes.ooeInternalError],i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage}}}}(),function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}(),r,i,h,u,c,l,f,a,e,v,y,p,w,b,o,k,d,g,s,nt,tt,it,rt;n.RequirementVersion=ut;r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){var f,u,e,i,r;if(n==undefined)return!1;if(t==undefined&&(t=0),f=this._setMap,u=f._sets,u.hasOwnProperty(n.toLowerCase())){e=u[n.toLowerCase()];try{if((i=this._getVersion(e),t=t+"",r=this._getVersion(t),i.major>0&&i.major>r.major)||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),i=0,r=0;if(t.length<2&&isNaN(Number(n)))throw u;else if(i=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(i)||isNaN(r))throw u;return{minor:r,major:i}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;h=function(n){function i(){n.call(this,{dialogapi:t})}return __extends(i,n),i}(i);n.DefaultDialogSetRequirement=h;u=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelClientDefaultSetRequirement=u;c=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(u);n.ExcelClientV1DefaultSetRequirement=c;l=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookClientDefaultSetRequirement=l;f=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return __extends(i,n),i}(i);n.WordClientDefaultSetRequirement=f;a=function(n){function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return __extends(i,n),i}(f);n.WordClientV1DefaultSetRequirement=a;e=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointClientDefaultSetRequirement=e;v=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(e);n.PowerpointClientV1DefaultSetRequirement=v;y=function(n){function i(){n.call(this,{selection:t,textcoercion:t})}return __extends(i,n),i}(i);n.ProjectClientDefaultSetRequirement=y;p=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return __extends(i,n),i}(i);n.ExcelWebDefaultSetRequirement=p;w=function(n){function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordWebDefaultSetRequirement=w;b=function(n){function i(){n.call(this,{activeview:t,settings:t})}return __extends(i,n),i}(i);n.PowerpointWebDefaultSetRequirement=b;o=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookWebDefaultSetRequirement=o;k=function(n){function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.SwayWebDefaultSetRequirement=k;d=function(n){function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return __extends(i,n),i}(i);n.AccessWebDefaultSetRequirement=d;g=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelIOSDefaultSetRequirement=g;s=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordIOSDefaultSetRequirement=s;nt=function(n){function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return __extends(t,n),t}(s);n.WordIOSV1DefaultSetRequirement=nt;tt=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointIOSDefaultSetRequirement=tt;it=function(n){function i(){n.call(this,{mailbox:t})}return __extends(i,n),i}(i);n.OutlookIOSDefaultSetRequirement=it;rt=function(){function n(){}var t="undefined";return n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},n.getDefaultRequirementMatrix=function(u){var f,e,s,o;return this.initializeDefaultSetMatrix(),f=undefined,e=u.get_requirementMatrix(),e!=undefined&&e.length>0&&typeof JSON!==t?(s=JSON.parse(u.get_requirementMatrix().toLowerCase()),f=new r(new i(s))):(o=n.getClientFullVersionString(u),f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[o]!=undefined?new r(n.DefaultSetArrayMatrix[o]):new r(new i({}))),f},n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix(),e;return f!=undefined&&f.length>0&&typeof JSON!==t?(e=JSON.parse(n.get_requirementMatrix().toLowerCase()),u=new r(new i(e))):u=new r(new h),u},n.getClientFullVersionString=function(n){var i=n.get_appMinorVersion(),u="",r="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;return f&&n.get_appVersion()==1?r=t==4096&&i>=15?"16.00.01":"16.00":n.get_appName()==64?r=n.get_appVersion():(u=i<10?"0"+i:""+i,r=n.get_appVersion()+"."+u),n.get_appName()+"-"+r},n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new c;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new v;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new l;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new w;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new b;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new g;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new k;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new nt;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new tt;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new it},n.Excel_RCLIENT_1600="1-16.00",n.Excel_RCLIENT_1601="1-16.01",n.Word_RCLIENT_1600="2-16.00",n.Word_RCLIENT_1601="2-16.01",n.PowerPoint_RCLIENT_1600="4-16.00",n.PowerPoint_RCLIENT_1601="4-16.01",n.Outlook_RCLIENT_1600="8-16.00",n.Excel_WAC_1600="16-16.00",n.Word_WAC_1600="32-16.00",n.Outlook_WAC_1600="64-16.00",n.Outlook_WAC_1601="64-16.01",n.Project_RCLIENT_1600="128-16.00",n.Access_WAC_1600="256-16.00",n.PowerPoint_WAC_1600="512-16.00",n.Excel_IOS_1600="1024-16.00",n.SWAY_WAC_1600="2048-16.00",n.Word_IOS_1600="4096-16.00",n.Word_IOS_16001="4096-16.00.01",n.PowerPoint_IOS_1600="8192-16.00",n.Outlook_IOS_1600="65536-16.00",n.DefaultSetArrayMatrix={},n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))}(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}return n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n},n.getInstance=function(){return n.hostObj===undefined&&(n.hostObj=new n),n.hostObj},n.prototype.getPlatform=function(){var n=this,t;return n.hostInfo.hostPlatform&&(t=n.hostInfo.hostPlatform.toLowerCase(),n.platformRemappings[t])?n.platformRemappings[t]:null},n.prototype.getHost=function(){var n=this,t;if(n.hostInfo.hostType){if(t=n.hostInfo.hostType.toLowerCase(),n.camelCaseMappings[t])return n.camelCaseMappings[t];if(t=n.capitalizeFirstLetter(n.hostInfo.hostType),Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null},n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null},n}();n.Host=t})(t=n.HostName||(n.HostName={}))}(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){n||(window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,n=!0)},disableShortcut:function(){n&&(t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window),n=!1)}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i,r,o,u,f,e;if(n&&typeof n=="string"&&(r=n.indexOf("#"),r!=-1)){o=n.substring(0,r);u=n.substring(r+1);switch(o){case"binding":case"bindings":u&&(i=new OSF.DDA.BindingPromise(u))}}if(i)return i.onFail=t,i;else if(t)if(f=typeof t,f=="function")e={},e[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(e,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext));else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f);};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this,s,e;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.auth&&OSF.OUtil.defineEnumerableProperty(f,"auth",{value:n.auth});n.get_isDialog()?(e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e})):(t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t}),r&&(s=r.displayName||"appOM",delete r.displayName,OSF.OUtil.defineEnumerableProperty(f,s,{value:r})),u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}}),e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e}))};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this,u;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;return OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext()),n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,e=n.length,o=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){var u,i,r;for(u in n){if(i=n[u],r=t[u],i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw o();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw o();}};f.extractRequiredArguments=function(t,i,r){var f,u,h,s,c,l;if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(c=n.length-1;c>=s;c--){l=n[c];switch(typeof l){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=l;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}if(f=o.fillOptions(f,i,r,u),e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;return o.verifyArguments(t,f),f}var h="function",s=n.length,o=new OSF.DDA.ApiMethodCall(n,t,i,f,e);this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),u=c(n,r,t,i);return o.constructCallArgs(r,u,t,i)};this.processResponse=function(n,t,i,f){return n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n)};this.getCallArgs=function(n){for(var t,u,r,i=n.length-1;i>=s;i--){r=n[i];switch(typeof r){case"object":t=r;break;case h:u=r}}return t=t||{},u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u),t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],i=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],t,i,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback],u,r;f&&(u={},u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?u[OSF.DDA.AsyncResultEnum.Properties.Value]=i:(r={},i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i),f(new OSF.DDA.AsyncResult(u,r)))};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.SyncMethodNames[t]=i};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){function o(n,i,r,u){var o,c,s,h;if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(s=n.length-1;s>=e;s--){h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}return o=f.fillOptions(o,i,r,u),f.verifyArguments(t,o),o}var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),u=o(n,r,t,i);return f.constructCallArgs(r,u,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){function e(i,f){var a=i?{}:undefined,s,h,o,v,c,l;for(s in i){if(h=i[s],OSF.DDA.ListType.isListType(s)){o=[];for(v in h)o.push(e(h[v],f))}else OSF.OUtil.listContainsKey(r,s)?o=r[s][f](h):f==u&&n.preserveNesting(s)?o=e(h,f):(c=t[s],c?(l=c[f],l&&(o=l[h],o===undefined&&(o=h))):o=h);a[s]=o}return a}function l(i,r){var e,u,h,s;for(u in r)h=n.isComplexType(u)?l(i,t[u][o]):i[u],h!=undefined&&(e||(e={}),s=r[u],s==f&&(s=u),e[s]=n.pack(u,h));return e}function s(i,r,e){var o,a,h,l,p,v,y;e||(e={});for(o in r){if(a=r[o],a==f)h=i;else if(a==c){e[o]=i.toArray();continue}else h=i[a];if(h===null||h===undefined)e[o]=undefined;else if(h=n.unpack(o,h),n.isComplexType(o))l=t[o][u],n.preserveNesting(o)?e[o]=s(h,l):s(h,l,e);else if(OSF.DDA.ListType.isListType(o)){l={};p=OSF.DDA.ListType.getDescriptor(o);l[p]=f;v=new Array(h.length);for(y in h)v[y]=s(h[y],l);e[o]=v}else e[o]=h}return e}function a(n,i,r){var f=t[n][r],u,o,c;return r=="toHost"?(o=e(i,r),u=l(o,f)):r==h&&(c=s(i,f),u=e(c,r)),u}var h="fromHost",i=this,o="toHost",u=h,c="sourceData",f="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];t||(t={});i.addMapping=function(n,i){var e,h,c,l,r,s,a,v;if(i.map){e=i.map;h={};for(c in e)l=e[c],l==f&&(l=c),h[l]=c}else e=i.toHost,h=i.fromHost;if(r=t[n],r){s=r[o];for(a in s)e[a]=s[a];s=r[u];for(v in s)h[v]=s[v]}else r=t[n]={};r[o]=e;r[u]=h};i.toHost=function(n,t){return a(n,t,o)};i.fromHost=function(n,t){return a(n,t,u)};i.self=f;i.sourceData=c;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){return this.isDynamicType(n)?t[n].toHost(i):i};i.unpack=function(n,i){return this.isDynamicType(n)?t[n].fromHost(i):i}};OSF.DDA.getDecoratedParameterMap=function(n,t){function r(n){var i=null,r,t;if(n)for(i={},r=n.length,t=0;t0){for(r=[],i=0;i=s)break;if(f=Function._validateParameter(n[e],o,h),f)return f.popStackFrame(),f}return t}),Function._validateParameterCount||(Function._validateParameterCount=function(n,r,u){var f,s,e=r.length,h=n.length,c,l,a;if(he)for(s=i,f=0;f0&&t.push(u)}}catch(s){}return t}var i=[],t={};t[Microsoft.Office.WebExtension.Parameters.Data]=function(){var t=0,i=1;return{toHost:function(n){if(OSF.DDA.TableDataProperties&&typeof n!="string"&&n[OSF.DDA.TableDataProperties.TableRows]!==undefined){var r=[];r[t]=n[OSF.DDA.TableDataProperties.TableRows];r[i]=n[OSF.DDA.TableDataProperties.TableHeaders];n=r}return n},fromHost:function(r){var f,e,u;return r.toArray?(e=r.dimensions(),e===2?f=n(r):(u=r.toArray(),u.length===2&&(u[0]!=null&&u[0].toArray||u[1]!=null&&u[1].toArray)?(f={},f[OSF.DDA.TableDataProperties.TableRows]=n(u[t]),f[OSF.DDA.TableDataProperties.TableHeaders]=n(u[i])):f=u)):f=r,f}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,i,t);this.unpack=function(n,i){var r,u;return this.isComplexType(n)||OSF.DDA.ListType.isListType(n)?(u=(i||typeof i=="unknown")&&i.toArray,r=u?i.toArray():i||{}):r=this.isDynamicType(n)?t[n].fromHost(i):i,r}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(n){function t(n){var i=n,f,r,u;if(OSF.OUtil.isArray(n))for(f=i.length,r=0;r2)for(u=[],o=1;o=2&&(u=t[0],i=t[1]),r?r(new n.WebViewSafeArray(i)):void 0};this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.Execute,f,e)},t.prototype.registerEvent=function(t,i,r,u){var f=function(t){var i=t,u=0;OSF.OUtil.isArray(t)&&t.length>=2&&(u=t[0],i=t[1]);r&&r(u,new n.WebViewSafeArray(i))},e=function(t){if(u)return u(new n.WebViewSafeArray(t))};this.hostScriptProxy.registerEvent(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.RegisterEvent,t,i,f,e)},t.prototype.unregisterEvent=function(t,i,r){var u=function(t){return r(new n.WebViewSafeArray(t))};this.hostScriptProxy.unregisterEvent(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.UnregisterEvent,t,i,u)},t.prototype.messageParent=function(n){var t=n[Microsoft.Office.WebExtension.Parameters.MessageToParent];!isNaN(parseFloat(t))&&isFinite(t)&&(t=t.toString());this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.MessageParent,t,null)},t.prototype.openDialog=function(n,t,i,r){var u=JSON.parse(t);(isNaN(u.width)||u.width<=0||u.width>100)&&(u.width=99);(isNaN(u.height)||u.height<=0||u.height>100)&&(u.height=99);t=JSON.stringify(u);this.registerEvent(n,t,i,r)},t.prototype.closeDialog=function(n,t,i){this.unregisterEvent(n,t,i)},t.prototype.sendMessage=function(n){var t=n[Microsoft.Office.WebExtension.Parameters.MessageContent];!isNaN(parseFloat(t))&&isFinite(t)&&(t=t.toString());this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.SendMessage,t,null)},t}();n.WebViewHostController=t}(OSFWebView||(OSFWebView={})),function(n){(function(n){var t="EventCallback",i="MethodCallback";n[n[i]=0]=i;n[n[t]=1]=t})(n.CallbackType||(n.CallbackType={}));var i=n.CallbackType,t=function(){function n(n,t,i){this.callbackType=n;this.callbackId=t;this.params=i}return n}();n.CallbackData=t}(CrossIFrameCommon||(CrossIFrameCommon={})),function(n){var t=function(){function n(){window.addEventListener("message",this.OnReceiveMessage)}return n.prototype.postMessage=function(n,t){window.parent.postMessage(t,"*")},n.prototype.OnReceiveMessage=function(n){if(n.source==window.parent&&window.parent==window.top&&n.origin.startsWith("ms-appx-web://")){var t;try{t=JSON.parse(n.data)}catch(i){return}switch(t.callbackType){case CrossIFrameCommon.CallbackType.MethodCallback:OSFWebView.ScriptMessaging.agaveHostCallback(t.callbackId,JSON.parse(t.params));break;case CrossIFrameCommon.CallbackType.EventCallback:OSFWebView.ScriptMessaging.agaveHostEventCallback(t.callbackId,JSON.parse(t.params))}}},n}();n.Poster=t}(WinRT||(WinRT={}));OSF.DDA.ClientSettingsManager={getSettingsExecuteMethod:function(n){return function(t){var i,r,u=function(n,i){t.onReceiving&&t.onReceiving();t.onComplete&&t.onComplete(n,i)};try{n(t.hostCallArgs,t.onCalling,u)}catch(f){i=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;r={name:Strings.OfficeOM.L_InternalError,message:f};u(i,r)}}},read:function(n,t){var u=[],f=[],i,r;n&&n();i=OSF._OfficeAppFactory.getInitializationHelper();r=function(n){t&&t(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,n.get_settings())};i.getAppContext(null,r)},write:function(n,t,i,r){var u={},e=[],o=[],f,s;for(f in n)e.push(f),o.push(n[f]);u.keys=e;u.values=o;i&&i();s=function(n){r&&r(n[0],null)};OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.WriteSettings,u,s)}};OSF.InitializationHelper.prototype.initializeSettings=function(n,t){var i=n.get_settings();return this.deserializeSettings(i,t)};OSF.InitializationHelper.prototype.getAppContext=function(n,t){var r=function(n){var f,i=OSF.WebView.AppContextProperties,e=n[i.AppType],o=!1;for(var l in OSF.AppName)if(OSF.AppName[l]==e){o=!0;break}if(!o)throw"Unsupported client type "+e;for(var s=n[i.Settings],h={},c=s[0],a=s[1],r=0;r40)&&(n=OSF.OUtil.Guid.generateNewGuid(),t.setValue(t.clientIDKey,n)),n},n.prototype.saveLog=function(n,t){var i=this,u=i.getValue(i.logIdSetKey);u=(u&&u.length>0?u+";":r)+n;i.setValue(i.logIdSetKey,u);i.setValue(n,t)},n.prototype.enumerateLog=function(n,t){var i=this,e=i.getValue(i.logIdSetKey),u,o,r,f;if(e){u=e.split(";");for(o in u)r=u[o],f=i.getValue(r),f&&(n&&n(r,f),t&&i.remove(r));t&&i.remove(i.logIdSetKey)}},n.prototype.getValue=function(n){var t=OSF.OUtil.getLocalStorage(),i=r;return t&&(i=t.getItem(n)),i},n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)},n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}},n}(),o=function(){function n(){}return n.prototype.LogData=function(n){OSF.Logger&&(OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n.SerializeRow(),OSF.Logger.SendFlag.none),OSFAriaLogger.AriaLogger.getInstance().logData(n))},n.prototype.LogRawData=function(n){if(OSF.Logger){OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n,OSF.Logger.SendFlag.none);try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(n))}catch(t){}}},n}();n.initialize=v;n.onAppActivated=y;n.onScriptDone=p;n.onCallDone=w;n.onMethodDone=b;n.onPropertyDone=k;n.onEventDone=d;n.onRegisterDone=g;n.onAppClosed=nt;n.setOsfControlAppCorrelationId=tt;n.doAppInitializationLogging=c;n.logAppCommonMessage=it;n.logAppException=rt;OSF.AppTelemetry=n}(OSFAppTelemetry||(OSFAppTelemetry={}));OSF.DDA.AsyncMethodNames.addNames({CloseContainerAsync:"closeContainer"}),function(n){var t=function(){function n(){}return n}();n.Container=t}(OfficeExt||(OfficeExt={}));OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseContainerAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidCloseContainerMethod,fromHost:[],toHost:[]});Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(n){var i=this,r,t,u;i._eventHandlers={};i._objectEventHandlers={};i._queuedEventsArgs={};for(r in n)t=n[r],u=t=="objectDeleted"||t=="objectSelectionChanged"||t=="objectDataChanged"||t=="contentControlAdded",u?i._objectEventHandlers[t]={}:i._eventHandlers[t]=[],i._queuedEventsArgs[t]=[]};OSF.EventDispatch.prototype={getSupportedEvents:function(){var n=[];for(var t in this._eventHandlers)n.push(t);for(t in this._objectEventHandlers)n.push(t);return n},supportsEvent:function(n){for(var t in this._eventHandlers)if(n==t)return!0;for(t in this._objectEventHandlers)if(n==t)return!0;return!1},hasEventHandler:function(n,t){var i=this._eventHandlers[n],r;if(i&&i.length>0)for(r in i)if(i[r]===t)return!0;return!1},hasObjectEventHandler:function(n,t,i){var f=this._objectEventHandlers[n],r,u;if(f!=null)for(r=f[t],u=0;r!=null&&u0)for(r=0;r0?(this._eventHandlers[n]=[],!0):!1},clearObjectEventHandlers:function(n,t){return this._objectEventHandlers[n]!=null&&this._objectEventHandlers[n][t]!=null?(this._objectEventHandlers[n][t]=[],!0):!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},getObjectEventHandlerCount:function(n,t){return this._objectEventHandlers[n]==null||this._objectEventHandlers[n][t]==null?0:this._objectEventHandlers[n][t].length},fireEvent:function(n){var t,i,r;if(n.type==undefined)return!1;if(t=n.type,t&&this._eventHandlers[t]){i=this._eventHandlers[t];for(r in i)i[r](n);return!0}else return!1},fireObjectEvent:function(n,t){var i,f,r,u;if(t.type==undefined)return!1;if(i=t.type,i&&this._objectEventHandlers[i]&&(f=this._objectEventHandlers[i],r=f[n],r!=null)){for(u=0;u0)){for(r=t[0];i.length>0;)u=i.shift(),r(u);return!0}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var f="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(n,i[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]=="outlook"||OSF._OfficeAppFactory.getHostInfo()[f]=="outlookwebapp")r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i),t.initialize(r.initialData),t.setCurrentItemNumber(r.itemNumber.itemNumber);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var i=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),t=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];t(arguments,i,n)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(n){var i=OSF.DDA.SyncMethodNames.MessageParent.displayName,t=this,r;t[i]||OSF.OUtil.defineEnumerableProperty(t,i,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return n(arguments,t)}});r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;t[r]||typeof OSF.DialogParentMessageEventDispatch=="undefined"||OSF.DDA.DispIdHost.addEventSupport(t,OSF.DialogParentMessageEventDispatch,n);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(n){n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:n[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}}],privateStateCallbacks:[],onSucceeded:function(n){var f=n[Microsoft.Office.WebExtension.Parameters.Id],i=n[Microsoft.Office.WebExtension.Parameters.Data],t=new OSF.DialogHandler,e=OSF.DDA.AsyncMethodNames.CloseAsync.displayName,r,u;return OSF.OUtil.defineEnumerableProperty(t,e,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];n(arguments,f,i,t)}}),r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName,OSF.OUtil.defineEnumerableProperty(t,r,{value:function(){var r=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],n=r.verifyAndExtractCall(arguments,t,i),u=n[Microsoft.Office.WebExtension.Parameters.EventType],f=n[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(u,f)}}),u=OSF.DDA.SyncMethodNames.SendMessage.displayName,OSF.OUtil.defineEnumerableProperty(t,u,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return n(arguments,i,t)}}),t},checkCallArgs:function(n){return n[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Width]=1),n[Microsoft.Office.WebExtension.Parameters.Width]>100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99),n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1),n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99),n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(n){try{n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,n);OSF.ClientHostController.openDialog(n.dispId,n.targetId,function(t,i){n.onEvent&&n.onEvent(i);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(n){n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,n);try{OSF.ClientHostController.closeDialog(n.dispId,n.targetId,t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.messageParent=function(n){try{n.onCalling&&n.onCalling();var i=(new Date).getTime(),t=OSF.ClientHostController.messageParent(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs((new Date).getTime()-i),t),t}catch(r){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(r)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.sendMessage=function(n){try{n.onCalling&&n.onCalling();var r=(new Date).getTime(),t=OSF.ClientHostController.sendMessage(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),t}catch(i){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(i)}};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogParentMessageReceivedEvent:"DialogParentMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogParentMessageReceived:"dialogParentMessageReceived",DialogParentEventReceived:"dialogParentEventReceived"});OSF.DialogParentMessageEventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived,Microsoft.Office.WebExtension.EventType.DialogParentEventReceived]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});Microsoft.Office.WebExtension.FileType={Text:"text",Compressed:"compressed",Pdf:"pdf"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FileProperties:"FileProperties",FileSliceProperties:"FileSliceProperties"});OSF.DDA.FileProperties={Handle:"FileHandle",FileSize:"FileSize",SliceSize:Microsoft.Office.WebExtension.Parameters.SliceSize};OSF.DDA.File=function(n,t,i){var r,u;OSF.OUtil.defineEnumerableProperties(this,{size:{value:t},sliceCount:{value:Math.ceil(t/i)}});r={};r[OSF.DDA.FileProperties.Handle]=n;r[OSF.DDA.FileProperties.SliceSize]=i;u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.GetDocumentCopyChunkAsync,u.ReleaseDocumentCopyAsync],r)};OSF.DDA.FileSliceOffset="fileSliceoffset";OSF.DDA.AsyncMethodNames.addNames({GetDocumentCopyAsync:"getFileAsync",GetDocumentCopyChunkAsync:"getSliceAsync",ReleaseDocumentCopyAsync:"closeAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FileType,"enum":Microsoft.Office.WebExtension.FileType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:{types:["number"],defaultValue:65536}}],checkCallArgs:function(n){var t=n[Microsoft.Office.WebExtension.Parameters.SliceSize];if(t<=0||t>4194304)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return n},onSucceeded:function(n,t,i){return new OSF.DDA.File(n[OSF.DDA.FileProperties.Handle],n[OSF.DDA.FileProperties.FileSize],i[Microsoft.Office.WebExtension.Parameters.SliceSize])}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(n,t){return t[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(r<0||r>=t.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;return n[OSF.DDA.FileSliceOffset]=parseInt((r*i[OSF.DDA.FileProperties.SliceSize]).toString()),n},onSucceeded:function(n,t,i){var r={};return OSF.OUtil.defineEnumerableProperties(r,{data:{value:n[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:i[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:n[OSF.DDA.FileProperties.SliceSize]}}),r}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FileType,{Text:"text",Pdf:"pdf"});OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(n){OSF.OUtil.defineEnumerableProperties(this,{url:{value:n[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(n){return new Microsoft.Office.WebExtension.FileProperties(n)}});Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"};Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"};Microsoft.Office.WebExtension.Index={First:"first",Last:"last",Next:"next",Previous:"previous"};OSF.DDA.AsyncMethodNames.addNames({GoToByIdAsync:"goToByIdAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GoToByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string","number"]},{name:Microsoft.Office.WebExtension.Parameters.GoToType,"enum":Microsoft.Office.WebExtension.GoToType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:{"enum":Microsoft.Office.WebExtension.SelectionMode,defaultValue:Microsoft.Office.WebExtension.SelectionMode.Default}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:0},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:1},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:2},{name:Microsoft.Office.WebExtension.GoToType.Index,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:0},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:1},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:1},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileProperties.FileSize,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0},{name:OSF.DDA.FileProperties.SliceSize,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:0},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:5},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:6}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:0}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileSliceOffset,value:1},{name:OSF.DDA.FileProperties.SliceSize,value:2}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0}]});OSF.DDA.AsyncMethodNames.addNames({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync"}),function(){function r(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&r&&(r[OSF.DDA.TableDataProperties.TableRows]!=undefined||r[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(r=OSF.DDA.OMFactory.manufactureTableData(r)),r=OSF.DDA.DataCoercion.coerceData(r,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),r==undefined?null:r}var i=!1,n="boolean",t="number";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,"enum":Microsoft.Office.WebExtension.CoercionType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}}],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object",t,n]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[t,n],defaultValue:i}}],privateStateCallbacks:[]})}();OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:1},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:2},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:3},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:4},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:5}]});OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",RefreshingSettings:"refreshingSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(n){var r={},i,t;for(i in n){t=n[i];try{t=JSON?JSON.stringify(t,function(n,t){return OSF.OUtil.isDate(this[n])?OSF.DDA.SettingsManager.DateJSONPrefix+this[n].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix:t}):Sys.Serialization.JavaScriptSerializer.serialize(t);r[i]=t}catch(u){}}return r},deserializeSettings:function(n){var r={},i,t;n=n||{};for(i in n){t=n[i];try{t=JSON?JSON.parse(t,function(n,t){var i;return typeof t=="string"&&t&&t.length>6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix&&(i=new Date(parseInt(t.slice(5,-1))),i)?i:t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,!0);r[i]=t}catch(u){}}return r}};OSF.DDA.Settings=function(n){var t="name",i;n=n||{};i=function(n){var i=OSF.OUtil.getSessionStorage(),t,r;i&&(t=OSF.DDA.SettingsManager.serializeSettings(n),r=JSON?JSON.stringify(t):Sys.Serialization.JavaScriptSerializer.serialize(t),i.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),r))};OSF.OUtil.defineEnumerableProperties(this,{get:{value:function(i){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]),r;if(u)throw u;return r=n[i],typeof r=="undefined"?null:r}},set:{value:function(r,u){var f=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1},{name:"value",mayBeNull:!0}]);if(f)throw f;n[r]=u;i(n)}},remove:{value:function(r){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]);if(u)throw u;delete n[r];i(n)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],n)};OSF.DDA.RefreshableSettings=function(n){OSF.DDA.RefreshableSettings.uber.constructor.call(this,n);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],n);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:n}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(n,t){return t}}],onSucceeded:function(n,t,i){var f=n[OSF.DDA.SettingsManager.SerializedSettings],u=OSF.DDA.SettingsManager.deserializeSettings(f),e=i[OSF.DDA.SettingsManager.RefreshingSettings];for(var r in e)t.remove(r);for(r in u)t.set(r,u[r]);return t}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(n,t){return OSF.DDA.SettingsManager.serializeSettings(t)}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"});OSF.DDA.DocumentSelectionChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:n}})};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDeleted:"objectDeleted"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectSelectionChanged:"objectSelectionChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDataChanged:"objectDataChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ContentControlAdded:"contentControlAdded"});OSF.DDA.ObjectEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:n},object:{value:t}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDeletedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDataChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidContentControlAddedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});Microsoft.Office.WebExtension.TableData=function(n,t){function i(n){if(n==null||n==undefined)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(n,2);t<2;t++)n=[n];return n}catch(i){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(n){t=i(n)}},rows:{get:function(){return n},set:function(t){n=t==null||OSF.OUtil.isArray(t)&&t.length==0?[]:i(t)}}});this.headers=t;this.rows=n};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(n){return new Microsoft.Office.WebExtension.TableData(n[OSF.DDA.TableDataProperties.TableRows],n[OSF.DDA.TableDataProperties.TableHeaders])};Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var n=null;return{findArrayDimensionality:function(n){if(OSF.OUtil.isArray(n)){for(var t=0,i=0;i0},enumerable:!0,configurable:!0}),t.prototype.addTrace=function(n,t){this.m_traceInfos[n]=t},t.prototype.addReferencedObjectPath=function(t){if(!this.m_referencedObjectPaths[t.objectPathInfo.Id]){if(!t.isValid)throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidObjectPath,message:n.Utility._getResourceString(n.ResourceStrings.invalidObjectPath,n.Utility.getObjectPathExpression(t)),debugInfo:{errorLocation:n.Utility.getObjectPathExpression(t)}});while(t)t.isWriteOperation&&(this.m_flags=this.m_flags|1),this.m_referencedObjectPaths[t.objectPathInfo.Id]=t,t.objectPathInfo.ObjectPathType==3&&this.addReferencedObjectPaths(t.argumentObjectPaths),t=t.parentObjectPath}},t.prototype.addReferencedObjectPaths=function(n){if(n)for(var t=0;t0&&(typeof r[0]=="string"||i.isRequestUrlAndHeaderInfo(r[0])||i.isRequestUrlAndHeaderInfoResolver(r[0]))&&(y=r[0],h=1),r.length==h+1)a=u,v=r[h+0];else if(r.length==h+2){if(r[h+0]instanceof n.ClientObject)a=function(){return r[h+0].context};else if(Array.isArray(r[h+0])){if(c=r[h+0],c.length==0)return i.createErrorPromise(t);for(l=0;l0){var n=c._onRunFinishedNotifiers.shift();n()}if(a)return l;else throw l;})},i.prototype._nextId=function(){return++this.m_nextId},i}();n.ClientRequestContext=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_type=n}return Object.defineProperty(t.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){(this.m_isLoaded=!0,typeof t=="object"&&t&&t._IsNull)||(this.m_value=this.m_type===1?n.Utility.adjustToDateTime(t):t)},t}();n.ClientResult=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.flags="flags",n.getItemAt="GetItemAt",n.id="Id",n.idPrivate="_Id",n.index="_Index",n.items="_Items",n.iterativeExecutor="IterativeExecutor",n.localDocument="http://document.localhost/",n.localDocumentApiPrefix="http://document.localhost/_api/",n.processQuery="ProcessQuery",n.referenceId="_ReferenceId",n.isTracked="_IsTracked",n.sourceLibHeader="SdkVersion",n.embeddingPageOrigin="EmbeddingPageOrigin",n.embeddingPageSessionInfo="EmbeddingPageSessionInfo",n}();n.Constants=t}(OfficeExtension||(OfficeExtension={})),function(n){var u=1,r={invokeRequestModifier:function(n){return n.DdaMethod.Version=u,n},invokeResponseModifier:function(n){return u=n.Version,n.Error&&(n.error={},n.error.Code=n.Error),n}},i,t,f,e;(function(n){n[n.Success=0]="Success";n[n.Timeout=1]="Timeout";n[n.InternalError=5001]="InternalError"})(i||(i={})),function(n){n.SendingId="sId";n.RespondingId="rId";n.CommandKey="command";n.SessionInfoKey="sessionInfo";n.ParamsKey="params";n.ApiReadyCommand="apiready";n.ExecuteMethodCommand="executeMethod";n.GetAppContextCommand="getAppContext";n.RegisterEventCommand="registerEvent";n.UnregisterEventCommand="unregisterEvent";n.FireEventCommand="fireEvent"}(t||(t={}));f=function(u){function f(n,t){u.call(this);this.m_chosenWindow=null;this.m_chosenOrigin=null;this.m_enabled=!0;this.m_onMessageHandler=this._onMessage.bind(this);this.m_callbackList={};this.m_id=0;this.m_timeoutId=-1;this.m_appContext=null;this.m_url=n;this.m_options=t;this.m_options||(this.m_options={sessionKey:Math.random().toString()});this.m_options.sessionKey||(this.m_options.sessionKey=Math.random().toString());this.m_options.container||(this.m_options.container=document.body);this.m_options.timeoutInMilliseconds||(this.m_options.timeoutInMilliseconds=6e4);this.m_options.height||(this.m_options.height="400px");this.m_options.width||(this.m_options.width="100%")}return __extends(f,u),f.prototype._getIFrameSrc=function(){var u=window.location.protocol+"//"+window.location.host,i=n.Constants.embeddingPageOrigin+"="+encodeURIComponent(u)+"&"+n.Constants.embeddingPageSessionInfo+"="+encodeURIComponent(this.m_options.sessionKey),r=!1,t;return this.m_url.toLowerCase().indexOf("/_layouts/preauth.aspx")>0&&(r=!0),t=document.createElement("a"),t.href=this.m_url,r?t.hash=t.hash.length===0||t.hash==="#"?"#"+i:t.hash+"&"+i:t.search=t.search.length===0||t.search==="?"?"?"+i:t.search+"&"+i,t.href},f.prototype.init=function(){var t=this,i;return window.addEventListener("message",this.m_onMessageHandler),i=this._getIFrameSrc(),new n._Internal.OfficePromise(function(r,u){var f=document.createElement("iframe");t.m_options.id&&(f.id=t.m_options.id);f.style.height=t.m_options.height;f.style.width=t.m_options.width;f.src=i;t.m_options.container.appendChild(f);t.m_timeoutId=setTimeout(function(){t.close();var i=n.Utility.createRuntimeError(n.ErrorCodes.timeout,n.Utility._getResourceString(n.ResourceStrings.timeout),"EmbeddedSession.init");u(i)},t.m_options.timeoutInMilliseconds);t.m_promiseResolver=r})},f.prototype._invoke=function(n,t,u){if(!this.m_enabled){t(i.InternalError,null);return}r.invokeRequestModifier&&(u=r.invokeRequestModifier(u));this._sendMessageWithCallback(this.m_id++,n,u,function(n){r.invokeResponseModifier&&(n=r.invokeResponseModifier(n));var u=n.Error;delete n.Error;t(u||i.Success,n)})},f.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler);window.clearTimeout(this.m_timeoutId);this.m_enabled=!1},Object.defineProperty(f.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),f.prototype._createRequestExecutorOrNull=function(){return new e(this)},f.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},f.prototype._registerEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.RegisterEventCommand,{EventId:i,TargetId:r},function(){n(null)})})},f.prototype._unregisterEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.UnregisterEventCommand,{EventId:i,TargetId:r},function(){n()})})},f.prototype._onMessage=function(n){var u=this,i,e,r,o,s;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===n.source&&this.m_chosenOrigin===n.origin)){if(i=n.data,i&&i[t.CommandKey]===t.ApiReadyCommand){!this.m_chosenWindow&&this._isValidDescendant(n.source)&&i[t.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=n.source,this.m_chosenOrigin=n.origin,this._sendMessageWithCallback(this.m_id++,t.GetAppContextCommand,null,function(n){u._setupContext(n);window.clearTimeout(u.m_timeoutId);u.m_promiseResolver()}));return}if(i&&i[t.CommandKey]===t.FireEventCommand){var f=i[t.ParamsKey],h=f.EventId,c=f.TargetId,l=f.Data;if(this.m_sessionEventManager)for(e=this.m_sessionEventManager.getHandlers(h,c),r=0;r=0;o--)if(r[o]===e[i].handler){r.splice(o,1);break}break;case 2:r=[];break}}return s&&(!this.m_registered&&r.length>0?u=u.then(function(){return f.m_eventInfo.registerFunc(f.m_callback)}).then(function(){return f.m_registered=!0}):this.m_registered&&r.length==0&&(u=u.then(function(){return f.m_eventInfo.unregisterFunc(f.m_callback)}).catch(function(t){n.Utility.log("Error when unregister event: "+JSON.stringify(t))}).then(function(){return f.m_registered=!1})),u=u.then(function(){return f.m_handlers=r})),u},t.prototype.fireEvent=function(t){for(var u,f,r=[],i=0;i=0;e--)if(f[e]===u){f.splice(e,1);break}return f.length===0?this.m_unregisterEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i}();n.EventRegistration=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var s=JSON.stringify(u.Body),f=u.Url,e,o;if(f.charAt(f.length-1)!="/"&&(f=f+"/"),f=f+n.Constants.processQuery,f=f+"?"+n.Constants.flags+"="+r.toString(),e={method:"POST",url:f,headers:{},body:s},e.headers[n.Constants.sourceLibHeader]=t.SourceLibHeaderValue,e.headers["CONTENT-TYPE"]="application/json",u.Headers)for(o in u.Headers)e.headers[o]=u.Headers[o];return n.HttpUtility.sendRequest(e).then(function(t){var i,r;return t.statusCode===200?i={ErrorCode:null,ErrorMessage:null,Headers:t.headers,Body:JSON.parse(t.body)}:(n.Utility.log("Error Response:"+t.body),r=n.Utility._parseErrorResponse(t),i={ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:t.headers,Body:null}),i})},t.SourceLibHeaderValue="officejs-rest",t}();n.HttpRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){n.OfficeRequire=function(){return typeof require!="undefined"?require:null}()})(t=n._Internal||(n._Internal={}));i=function(){function i(){}return i.setCustomSendRequestFunc=function(n){i.s_customSendRequestFunc=n},i.xhrSendRequestFunc=function(i){return new t.OfficePromise(function(r,u){var f=new XMLHttpRequest,e;if(f.open(i.method,i.url),f.onload=function(){var t={statusCode:f.status,headers:n.Utility._parseHttpResponseHeaders(f.getAllResponseHeaders()),body:f.responseText};r(t)},f.onerror=function(){u(new t.RuntimeError({code:n.ErrorCodes.connectionFailure,message:n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,f.statusText)}))},i.headers)for(e in i.headers)f.setRequestHeader(e,i.headers[e]);f.send(i.body)})},i.nodejsRequestModuleSendRequestFunc=function(n){i.logRequest(n);var r=t.OfficeRequire(i.NodeJsRequestModuleName);return r(n.url,{method:n.method,headers:n.headers,body:n.body}).then(function(n){return n.text().then(function(t){var f=n.status,u={},r;return n.headers.forEach(function(n,t){u[t]=n}),r={statusCode:f,headers:u,body:t},i.logResponse(r),r})})},i.sendRequest=function(n){i.validateAndNormalizeRequest(n);var t=i.s_customSendRequestFunc;return t||(t=typeof window=="undefined"||typeof XMLHttpRequest=="undefined"?i.nodejsRequestModuleSendRequestFunc:i.xhrSendRequestFunc),t(n)},i.setCustomSendLocalDocumentRequestFunc=function(n){i.s_customSendLocalDocumentRequestFunc=n},i.sendLocalDocumentRequest=function(n){i.validateAndNormalizeRequest(n);var t;return t=i.s_customSendLocalDocumentRequestFunc||i.officeJsSendLocalDocumentRequestFunc,t(n)},i.officeJsSendLocalDocumentRequestFunc=function(i){i=n.Utility._validateLocalDocumentRequest(i);var r=n.Utility._buildRequestMessageSafeArray(i);return new t.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(r,function(i){var r;r=i.status=="succeeded"?{statusCode:n.RichApiMessageUtility.getResponseStatusCode(i),headers:n.RichApiMessageUtility.getResponseHeaders(i),body:n.RichApiMessageUtility.getResponseBody(i)}:n.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(i.error.code,i.error.message);n.Utility.log(JSON.stringify(r));t(r)})})},i.validateAndNormalizeRequest=function(i){if(n.Utility.isNullOrUndefined(i))throw t.RuntimeError._createInvalidArgError({argumentName:"request"});n.Utility.isNullOrEmptyString(i.method)&&(i.method="GET");i.method=i.method.toUpperCase()},i.logRequest=function(t){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Request---"),n.Utility.log(t.method+" "+t.url),t.headers)for(var r in t.headers)n.Utility.log(r+": "+t.headers[r]);i._logBody&&n.Utility.log(t.body)}},i.logResponse=function(t){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Response---"),n.Utility.log(""+t.statusCode),t.headers)for(var r in t.headers)n.Utility.log(r+": "+t.headers[r]);i._logBody&&n.Utility.log(t.body)}},i.NodeJsRequestModuleName="node-fetch",i._logBody=!1,i}();n.HttpUtility=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_clientObject=n}return n.prototype._handleResult=function(n){this.m_clientObject._handleIdResult(n)},n}();n.InstantiateActionResultHandler=t}(OfficeExtension||(OfficeExtension={})),function(n){}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){this.m_objectPathInfo=n;this.m_parentObjectPath=t;this.m_isWriteOperation=!1;this.m_isCollection=i;this.m_isInvalidAfterRequest=r;this.m_isValid=!0}return Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},set:function(n){this.m_isWriteOperation=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(n){this.m_argumentObjectPaths=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(n){this.m_isValid=n;!n&&this.m_objectPathInfo.ObjectPathType===6&&this.m_savedObjectPathInfo&&(t.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(n){this.m_getByIdMethodName=n},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null},t.prototype.updateUsingObjectData=function(i){var o=i[n.Constants.referenceId],u,f,e,r;if(!n.Utility.isNullOrEmptyString(o)){this.m_savedObjectPathInfo||this.isInvalidAfterRequest||!t.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)||(u={},t.copyObjectPathInfo(this.m_objectPathInfo,u),this.m_savedObjectPathInfo={pathInfo:u,parent:this.m_parentObjectPath});this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=o;this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null;return}if(f=this.parentObjectPath&&this.parentObjectPath.isCollection,e=this.getByIdMethodName,(f||!n.Utility.isNullOrEmptyString(e))&&(r=i[n.Constants.id],n.Utility.isNullOrUndefined(r)&&(r=i[n.Constants.idPrivate]),!n.Utility.isNullOrUndefined(r))){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;f?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=e,this.m_getByIdMethodName=null);this.isWriteOperation=!1;this.m_objectPathInfo.ArgumentInfo={};this.m_objectPathInfo.ArgumentInfo.Arguments=[r];this.m_argumentObjectPaths=null;return}},t.isRestorableObjectPath=function(n){return n===1||n===5||n===3||n===4},t.copyObjectPathInfo=function(n,t){t.Id=n.Id;t.ArgumentInfo=n.ArgumentInfo;t.Name=n.Name;t.ObjectPathType=n.ObjectPathType;t.ParentObjectPathId=n.ParentObjectPathId},t}();n.ObjectPath=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createGlobalObjectObjectPath=function(t){var i={Id:t._nextId(),ObjectPathType:1,Name:""};return new n.ObjectPath(i,null,!1,!1)},t.createNewObjectObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:2,Name:i};return new n.ObjectPath(u,null,r,!1)},t.createPropertyObjectPath=function(t,i,r,u,f){var e={Id:t._nextId(),ObjectPathType:4,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id};return new n.ObjectPath(e,i._objectPath,u,f)},t.createIndexerObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i._objectPath,!1,!1)},t.createIndexerObjectPathUsingParentPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i,!1,!1)},t.createMethodObjectPath=function(t,i,r,u,f,e,o,s){var c={Id:t._nextId(),ObjectPathType:3,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},l=n.Utility.setMethodArguments(t,c.ArgumentInfo,f),h=new n.ObjectPath(c,i._objectPath,e,o);return h.argumentObjectPaths=l,h.isWriteOperation=u!=1,h.getByIdMethodName=s,h},t.createReferenceIdObjectPath=function(t,i){var r={Id:t._nextId(),ObjectPathType:6,Name:i,ArgumentInfo:{}};return new n.ObjectPath(r,null,!1,!1)},t.createChildItemObjectPathUsingIndexerOrGetItemAt=function(i,r,u,f,e){var o=f[n.Constants.id];return n.Utility.isNullOrUndefined(o)&&(o=f[n.Constants.idPrivate]),i&&!n.Utility.isNullOrUndefined(o)?t.createChildItemObjectPathUsingIndexer(r,u,f):t.createChildItemObjectPathUsingGetItemAt(r,u,f,e)},t.createChildItemObjectPathUsingIndexer=function(t,i,r){var f=r[n.Constants.id],u;return n.Utility.isNullOrUndefined(f)&&(f=r[n.Constants.idPrivate]),u=u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u.ArgumentInfo.Arguments=[f],new n.ObjectPath(u,i._objectPath,!1,!1)},t.createChildItemObjectPathUsingGetItemAt=function(t,i,r,u){var e=r[n.Constants.index],f;return e&&(u=e),f={Id:t._nextId(),ObjectPathType:3,Name:n.Constants.getItemAt,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f.ArgumentInfo.Arguments=[u],new n.ObjectPath(f,i._objectPath,!1,!1)},t}();n.ObjectPathFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var f=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n._Internal.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(f,function(i){n.Utility.log("Response:");n.Utility.log(JSON.stringify(i));var r;r=i.status=="succeeded"?n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBody(i),n.RichApiMessageUtility.getResponseHeaders(i)):n.RichApiMessageUtility.buildResponseOnError(i.error.code,i.error.message);t(r)})})},t.SourceLibHeaderValue="officejs",t}();n.OfficeJsRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){var t;(function(t){function i(){return function(){"use strict";function wt(n){return typeof n=="function"||typeof n=="object"&&n!==null}function b(n){return typeof n=="function"}function bt(n){return typeof n=="object"&&n!==null}function kt(n){k=n}function dt(n){f=n}function ti(){var t=process.nextTick,n=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&n[1]==="0"&&n[2]==="10"&&(t=setImmediate),function(){t(c)}}function ii(){return function(){tt(c)}}function ri(){var n=0,i=new ut(c),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function ui(){var n=new MessageChannel;return n.port1.onmessage=c,function(){n.port2.postMessage(0)}}function ft(){return function(){setTimeout(c,1)}}function c(){for(var t,i,n=0;n=0?(n=n.substring(t+5,n.length),n<"14.14393"?!0:!1):!1}function i(){return typeof window=="undefined"&&typeof Promise=="function"?Promise:typeof window!="undefined"&&window.Promise?t()?n.PromiseImpl.Init():window.Promise:n.PromiseImpl.Init()}n.OfficePromise=i()}(t=n._Internal||(n._Internal={}));i=t.OfficePromise;n.Promise=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this._autoCleanupList={};this.m_context=n}return t.prototype.add=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._addCommon(n,!0)}):this._addCommon(n,!0)},t.prototype._autoAdd=function(n){this._addCommon(n,!1);this._autoCleanupList[n._objectPath.objectPathInfo.Id]=n},t.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(t,i){var r=this.m_context._autoCleanup&&!t[n.Constants.isTracked]&&t!==this.m_context._rootObject&&i&&!n.Utility.isNullOrEmptyString(i[n.Constants.referenceId]);r&&(this._autoCleanupList[t._objectPath.objectPathInfo.Id]=t,t[n.Constants.isTracked]=!0)},t.prototype._addCommon=function(t,i){if(t[n.Constants.isTracked]){i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id];return}var r=t[n.Constants.referenceId];n.Utility.isNullOrEmptyString(r)&&t._KeepReference&&(t._KeepReference(),n.ActionFactory.createInstantiateAction(this.m_context,t),i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id],t[n.Constants.isTracked]=!0)},t.prototype.remove=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._removeCommon(n)}):this._removeCommon(n)},t.prototype._removeCommon=function(t){var r=t[n.Constants.referenceId],i;n.Utility.isNullOrEmptyString(r)||(i=this.m_context._rootObject,i._RemoveReference&&i._RemoveReference(r),delete t[n.Constants.isTracked])},t.prototype._retrieveAndClearAutoCleanupList=function(){var n=this._autoCleanupList;return this._autoCleanupList={},n},t}();n.TrackedObjects=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.cannotRegisterEvent="CannotRegisterEvent",n.connectionFailureWithStatus="ConnectionFailureWithStatus",n.connectionFailureWithDetails="ConnectionFailureWithDetails",n.invalidObjectPath="InvalidObjectPath",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.invalidArgumentGeneric="InvalidArgumentGeneric",n.propertyNotLoaded="PropertyNotLoaded",n.runMustReturnPromise="RunMustReturnPromise",n.timeout="Timeout",n.propertyDoesNotExist="PropertyDoesNotExist",n.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",n.moreInfoInnerError="MoreInfoInnerError",n.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",n.valueNotLoaded="ValueNotLoaded",n.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage",n}();n.ResourceStrings=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.CannotRegisterEvent="The event handler cannot be registered.",n.ConnectionFailureWithStatus="The request failed with status code of {0}.",n.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}",n.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",n.InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',n.InvalidRequestContext="Cannot use the object across different request contexts.",n.PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",n.RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',n.Timeout="The operation has timed out.",n.ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.',n.invalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.",n}();n.ResourceStringValues=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.buildMessageArrayForIRequestExecutor=function(i,r,u,f){var o=JSON.stringify(u.Body),e;return n.Utility.log("Request:"),n.Utility.log(o),e={},e[n.Constants.sourceLibHeader]=f,t.buildRequestMessageSafeArray(i,r,"POST","ProcessQuery",e,o)},t.buildResponseOnSuccess=function(n,t){var i={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return i.Body=JSON.parse(n),i.Headers=t,i},t.buildResponseOnError=function(i,r){var u={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return u.ErrorCode=n.ErrorCodes.generalException,u.ErrorMessage=r,i==t.OfficeJsErrorCode_ooeNoCapability?u.ErrorCode=n.ErrorCodes.accessDenied:i==t.OfficeJsErrorCode_ooeActivityLimitReached?u.ErrorCode=n.ErrorCodes.activityLimitReached:i==t.OfficeJsErrorCode_ooeInvalidOrTimedOutSession&&(u.ErrorCode=n.ErrorCodes.invalidOrTimedOutSession,u.ErrorMessage=n.Utility._getResourceString(n.ResourceStrings.invalidOrTimedOutSessionMessage)),u},t.buildHttpResponseFromOfficeJsError=function(i,r){var f=500,u={};return u.error={},u.error.code=n.ErrorCodes.generalException,u.error.message=r,i===t.OfficeJsErrorCode_ooeNoCapability?(f=403,u.error.code=n.ErrorCodes.accessDenied):i===t.OfficeJsErrorCode_ooeActivityLimitReached&&(f=429,u.error.code=n.ErrorCodes.activityLimitReached),{statusCode:f,headers:{},body:JSON.stringify(u)}},t.buildRequestMessageSafeArray=function(n,t,i,r,u,f){var e=[],o;if(u)for(o in u)e.push(o),e.push(u[o]);var s=0,h="",c="",l="";return[n,i,r,e,f,s,t,h,c,l]},t.getResponseBody=function(n){return t.getResponseBodyFromSafeArray(n.value.data)},t.getResponseHeaders=function(n){return t.getResponseHeadersFromSafeArray(n.value.data)},t.getResponseBodyFromSafeArray=function(n){var t=n[2],i;return typeof t=="string"?t:(i=t,i.join(""))},t.getResponseHeadersFromSafeArray=function(n){var i=n[1],r,t;if(!i)return null;for(r={},t=0;t0&&f.push(i);return f},t.throwError=function(i,r,u){throw new n._Internal.RuntimeError({code:i,message:t._getResourceString(i,r),debugInfo:u?{errorLocation:u}:undefined});},t.createRuntimeError=function(t,i,r){return new n._Internal.RuntimeError({code:t,message:i,debugInfo:{errorLocation:r}})},t._getResourceString=function(i,r){var u,e,f,o;return typeof window!="undefined"&&window.Strings&&window.Strings.OfficeOM&&(e="L_"+i,f=window.Strings.OfficeOM[e],f&&(u=f)),u||(u=n.ResourceStringValues[i]),u||(u=i),t.isNullOrUndefined(r)||(Array.isArray(r)?(o=r,u=t._formatString(u,o)):u=u.replace("{0}",r)),u},t._formatString=function(t,i){return t.replace(/\{\d\}/g,function(t){var r=parseInt(t.substr(1,t.length-2));if(r0?".":"")+i;break;case 3:i=t.normalizeName(n.objectPathInfo.Name)+"()"+(i.length>0?".":"")+i;break;case 4:i=t.normalizeName(n.objectPathInfo.Name)+(i.length>0?".":"")+i;break;case 5:i="getItem()"+(i.length>0?".":"")+i;break;case 6:i="_reference()"+(i.length>0?".":"")+i;break}n=n.parentObjectPath}return i},t._createPromiseFromResult=function(t){return new n._Internal.OfficePromise(function(n,i){n(t)})},t._createTimeoutPromise=function(t){return new n._Internal.OfficePromise(function(n,i){setTimeout(function(){n(null)},t)})},t.promisify=function(t){return new n._Internal.OfficePromise(function(n,i){var r=function(t){t.status=="failed"?i(t.error):n(t.value)};t(r)})},t._addActionResultHandler=function(n,t,i){n.context._pendingRequest.addActionResultHandler(t,i)},t._handleNavigationPropertyResults=function(n,i,r){for(var u=0;u0},t._getLocalDocumentUrlPrefixLength=function(n){for(var i=["http://document.localhost","https://document.localhost","//document.localhost"],r=n.toLowerCase().trim(),t=0;t0))for(s=i.url.substr(f+1),e=s.split("&"),u=0;u0&&(f=i.substr(0,u),e=i.substr(u+1),f=t.trim(f),e=t.trim(e),s[f.toUpperCase()]=e));return s},t._parseErrorResponse=function(i){var r=null,f,e,u;if(!t.isNullOrEmptyString(i.body)){f=t.trim(i.body);try{r=JSON.parse(f)}catch(o){t.log("Error when parse "+f)}}return!t.isNullOrUndefined(r)&&typeof r=="object"&&r.error?(u=r.error.code,e=t._getResourceString(n.ResourceStrings.connectionFailureWithDetails,[i.statusCode.toString(),r.error.code,r.error.message])):e=t._getResourceString(n.ResourceStrings.connectionFailureWithStatus,i.statusCode.toString()),t.isNullOrEmptyString(u)&&(u=n.ErrorCodes.connectionFailure),{errorCode:u,errorMessage:e}},t._copyHeaders=function(n,t){if(n&&t)for(var i in n)t[i]=n[i]},t._logEnabled=!1,t._synchronousCleanup=!1,t.s_underscoreCharCode="_".charCodeAt(0),t}();n.Utility=t}(OfficeExtension||(OfficeExtension={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var e=OfficeExtension.ObjectPathFactory.createPropertyObjectPath,f=OfficeExtension.ObjectPathFactory.createMethodObjectPath,l=OfficeExtension.ObjectPathFactory.createIndexerObjectPath,gi=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath,nr=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer,tr=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt,a=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt,u=OfficeExtension.ActionFactory.createMethodAction,v=OfficeExtension.ActionFactory.createSetPropertyAction,r=OfficeExtension.Utility.isNullOrUndefined,t=OfficeExtension.Utility.isUndefined,i=OfficeExtension.Utility.throwIfNotLoaded,o=OfficeExtension.Utility.load,s=OfficeExtension.Utility.fixObjectPathIfNecessary,c=OfficeExtension.Utility._addActionResultHandler,h=OfficeExtension.Utility._handleNavigationPropertyResults,ir=OfficeExtension.Utility.adjustToDateTime,ui=function(l){function a(){l.apply(this,arguments)}return __extends(a,l),Object.defineProperty(a.prototype,"_className",{get:function(){return"Application"},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"notebooks",{get:function(){return this.m_notebooks||(this.m_notebooks=new n.NotebookCollection(this.context,e(this.context,this,"Notebooks",!0,!1))),this.m_notebooks},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"_platform",{get:function(){return i("_platform",this.m__platform,"Application",this._isNull),this.m__platform},enumerable:!0,configurable:!0}),a.prototype.getActiveNotebook=function(){return new n.Notebook(this.context,f(this.context,this,"GetActiveNotebook",1,[],!1,!1,null))},a.prototype.getActiveNotebookOrNull=function(){return new n.Notebook(this.context,f(this.context,this,"GetActiveNotebookOrNull",1,[],!1,!1,null))},a.prototype.getActiveOutline=function(){return new n.Outline(this.context,f(this.context,this,"GetActiveOutline",1,[],!1,!1,null))},a.prototype.getActiveOutlineOrNull=function(){return new n.Outline(this.context,f(this.context,this,"GetActiveOutlineOrNull",1,[],!1,!1,null))},a.prototype.getActivePage=function(){return new n.Page(this.context,f(this.context,this,"GetActivePage",1,[],!1,!1,null))},a.prototype.getActivePageOrNull=function(){return new n.Page(this.context,f(this.context,this,"GetActivePageOrNull",1,[],!1,!1,null))},a.prototype.getActiveParagraph=function(){return new n.Paragraph(this.context,f(this.context,this,"GetActiveParagraph",1,[],!1,!1,null))},a.prototype.getActiveParagraphOrNull=function(){return new n.Paragraph(this.context,f(this.context,this,"GetActiveParagraphOrNull",1,[],!1,!1,null))},a.prototype.getActiveSection=function(){return new n.Section(this.context,f(this.context,this,"GetActiveSection",1,[],!1,!1,null))},a.prototype.getActiveSectionOrNull=function(){return new n.Section(this.context,f(this.context,this,"GetActiveSectionOrNull",1,[],!1,!1,null))},a.prototype.navigateToPage=function(n){u(this.context,this,"NavigateToPage",1,[n])},a.prototype.navigateToPageWithClientUrl=function(t){return new n.Page(this.context,f(this.context,this,"NavigateToPageWithClientUrl",1,[t],!1,!1,null))},a.prototype._ClientLog=function(n,t,i,r){u(this.context,this,"_ClientLog",1,[n,t,i,r])},a.prototype._GetAccountInfo=function(){var t=u(this.context,this,"_GetAccountInfo",1,[]),n=new OfficeExtension.ClientResult;return c(this,t,n),n},a.prototype._GetControlVisibility=function(n){var i=u(this.context,this,"_GetControlVisibility",1,[n]),t=new OfficeExtension.ClientResult;return c(this,i,t),t},a.prototype._GetLoggingInfo=function(){var t=u(this.context,this,"_GetLoggingInfo",1,[]),n=new OfficeExtension.ClientResult;return c(this,t,n),n},a.prototype._GetObjectByReferenceId=function(n){var i=u(this.context,this,"_GetObjectByReferenceId",1,[n]),t=new OfficeExtension.ClientResult;return c(this,i,t),t},a.prototype._GetObjectTypeNameByReferenceId=function(n){var i=u(this.context,this,"_GetObjectTypeNameByReferenceId",1,[n]),t=new OfficeExtension.ClientResult;return c(this,i,t),t},a.prototype._GetServiceTokenByUrl=function(n){var i=u(this.context,this,"_GetServiceTokenByUrl",1,[n]),t=new OfficeExtension.ClientResult;return c(this,i,t),t},a.prototype._GetServiceTokens=function(n){var i=u(this.context,this,"_GetServiceTokens",1,[n]),t=new OfficeExtension.ClientResult;return c(this,i,t),t},a.prototype._GetServiceTokensExt=function(n,t){var r=u(this.context,this,"_GetServiceTokensExt",1,[n,t]),i=new OfficeExtension.ClientResult;return c(this,r,i),i},a.prototype._GetServiceUrl=function(n){var i=u(this.context,this,"_GetServiceUrl",1,[n]),t=new OfficeExtension.ClientResult;return c(this,i,t),t},a.prototype._RemoveAllReferences=function(){u(this.context,this,"_RemoveAllReferences",1,[])},a.prototype._RemoveReference=function(n){u(this.context,this,"_RemoveReference",1,[n])},a.prototype._SendDataToLearningTools=function(n,t){var r=u(this.context,this,"_SendDataToLearningTools",0,[n,t]),i=new OfficeExtension.ClientResult;return c(this,r,i),i},a.prototype._SetControlVisibility=function(n,t){u(this.context,this,"_SetControlVisibility",0,[n,t])},a.prototype._handleResult=function(n){if(l.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i._platform)||(this.m__platform=i._platform);h(this,i,["notebooks","Notebooks"])}},a.prototype.load=function(n){return o(this,n),this},a.prototype.toJSON=function(){return{}},a}(OfficeExtension.ClientObject),y,p,w,b,k,d,g,nt,tt,it,rt,ut,ft,et,ot,st,ht,ct,lt,at,vt,yt,pt,wt,bt,kt,dt,gt,ni,ti,ii,ri,fi,ei,oi,si,hi,ci,li,ai,vi,yi,pi,wi,bi,ki,di;n.Application=ui;y=function(f){function c(){f.apply(this,arguments)}return __extends(c,f),Object.defineProperty(c.prototype,"_className",{get:function(){return"InkAnalysis"},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"page",{get:function(){return this.m_page||(this.m_page=new n.Page(this.context,e(this.context,this,"Page",!1,!1))),this.m_page},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"paragraphs",{get:function(){return this.m_paragraphs||(this.m_paragraphs=new n.InkAnalysisParagraphCollection(this.context,e(this.context,this,"Paragraphs",!0,!1))),this.m_paragraphs},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"id",{get:function(){return i("id",this.m_id,"InkAnalysis",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"InkAnalysis",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),c.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",1,[])},c.prototype._handleResult=function(n){if(f.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i.Id)||(this.m_id=i.Id);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);h(this,i,["page","Page","paragraphs","Paragraphs"])}},c.prototype.load=function(n){return o(this,n),this},c.prototype._handleIdResult=function(n){(f.prototype._handleIdResult.call(this,n),r(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},c.prototype.track=function(){return this.context.trackedObjects.add(this),this},c.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},c.prototype.toJSON=function(){return{id:this.m_id}},c}(OfficeExtension.ClientObject);n.InkAnalysis=y;p=function(f){function c(){f.apply(this,arguments)}return __extends(c,f),Object.defineProperty(c.prototype,"_className",{get:function(){return"InkAnalysisParagraph"},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"inkAnalysis",{get:function(){return this.m_inkAnalysis||(this.m_inkAnalysis=new n.InkAnalysis(this.context,e(this.context,this,"InkAnalysis",!1,!1))),this.m_inkAnalysis},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"lines",{get:function(){return this.m_lines||(this.m_lines=new n.InkAnalysisLineCollection(this.context,e(this.context,this,"Lines",!0,!1))),this.m_lines},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"id",{get:function(){return i("id",this.m_id,"InkAnalysisParagraph",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"InkAnalysisParagraph",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),c.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",1,[])},c.prototype._handleResult=function(n){if(f.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i.Id)||(this.m_id=i.Id);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);h(this,i,["inkAnalysis","InkAnalysis","lines","Lines"])}},c.prototype.load=function(n){return o(this,n),this},c.prototype._handleIdResult=function(n){(f.prototype._handleIdResult.call(this,n),r(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},c.prototype.track=function(){return this.context.trackedObjects.add(this),this},c.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},c.prototype.toJSON=function(){return{id:this.m_id}},c}(OfficeExtension.ClientObject);n.InkAnalysisParagraph=p;w=function(e){function h(){e.apply(this,arguments)}return __extends(h,e),Object.defineProperty(h.prototype,"_className",{get:function(){return"InkAnalysisParagraphCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,"InkAnalysisParagraphCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"count",{get:function(){return i("count",this.m_count,"InkAnalysisParagraphCollection",this._isNull),this.m_count},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"InkAnalysisParagraphCollection",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),h.prototype.getItem=function(t){return new n.InkAnalysisParagraph(this.context,l(this.context,this,[t]))},h.prototype.getItemAt=function(t){return new n.InkAnalysisParagraph(this.context,f(this.context,this,"GetItemAt",1,[t],!1,!1,null))},h.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",1,[])},h.prototype._handleResult=function(i){var u,o,f,h;if((e.prototype._handleResult.call(this,i),!r(i))&&(u=i,s(this,u),t(u.Count)||(this.m_count=u.Count),t(u._ReferenceId)||(this.m__ReferenceId=u._ReferenceId),!r(u[OfficeExtension.Constants.items])))for(this.m__items=[],o=u[OfficeExtension.Constants.items],f=0;f0?i.push(t):t.tabIndex===0&&r.push(t):r.push(t);return i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;return r===0&&(r=i.indexOf(n)-i.indexOf(t)),r}),[].concat(i,r)}var o="focus",s="on",k="configurable",d="writable",h="enumerable",u="",c="undefined",t=!1,i=!0,l=2147483647,n=null,r=-1,a=r,g="&_xdm_Info=",nt="&_serializer_version=",tt="_xdm_",ft="_serializer_version=",v="#",it="&",f="class",y={},et=3e4,p=n,w=n,e=(new Date).getTime();return{set_entropy:function(n){var t,r,i;if(typeof n=="string")for(t=0;t6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(r)===OSF.DDA.SettingsManager.DataJSONSuffix&&(i=new Date(parseInt(t.slice(5,r))),i)?i:t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,i);f[u]=t}catch(e){}}return f},loadScript:function(r,u,f){var s,e,o,h,c;r&&u&&(s=window.document,e=y[r],e?e.loaded?u():e.pendingCallbacks.push(u):(o=s.createElement("script"),o.type="text/javascript",e={loaded:t,pendingCallbacks:[u],timer:n},y[r]=e,h=function(){var r,t,u;for(e.timer!=n&&(clearTimeout(e.timer),delete e.timer),e.loaded=i,r=e.pendingCallbacks.length,t=0;t1?l[l.length-1]:n,s,h,c,a;return u&&o!=n&&(o.indexOf(it)>=0&&(o=o.split(it)[0]),o=decodeURIComponent(o)),s=b(),!f&&s&&(h=window.name.indexOf(i),h>r&&(c=window.name.indexOf(";",h),c==r&&(c=window.name.length),a=window.name.substring(h,c),o?s.setItem(a,o):o=s.getItem(a))),o},getConversationId:function(){var i=window.location.search,t=n,r;return i&&(r=i.indexOf("&"),t=r>0?i.substring(1,r):i.substr(1),t&&t.charAt(t.length-1)==="="&&(t=t.substring(0,t.length-1),t&&(t=decodeURIComponent(t)))),t},getInfoItems:function(n){var t=n.split("$");return typeof t[1]==c&&(t=n.split("|")),typeof t[1]==c&&(t=n.split("%7C")),t},getXdmFieldValue:function(n,t){var r=u,f=OSF.OUtil.parseXdmInfo(t),i;if(f&&(i=OSF.OUtil.getInfoItems(f),i!=undefined&&i.length>=3))switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]),f;if(u)throw u;for(f in r)if(u=Function._validateParameter(n[f],r[f],f),u)throw u;},writeProfilerMark:function(n){window.msWriteProfilerMark&&(window.msWriteProfilerMark(n),OsfMsAjaxFactory.msAjaxDebug.trace(n))},outputDebug:function(n){typeof OsfMsAjaxFactory!==c&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){var e,f;r=r||{};for(e in u)f=u[e],r[f]==undefined&&(r[f]=i);return Object.defineProperty(n,t,r),n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[h])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[h])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[d,h,k])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[d,h,k])},finalizeProperties:function(n,r){var e,u;r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8,e=o&255,i[t++]=r>>2,i[t++]=(r&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63,isNaN(o)||(r=o>>8,f=h&255,e=h>>8,i[t++]=r>>2,i[t++]=(r&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63),isNaN(o)?i[t-1]=64:isNaN(h)&&(i[t-2]=64,i[t-1]=64),c=0;c0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){var u,i,f,r;if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(u=[],i=0;in)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=ut(u),e=f?u.length-1:0,u.length===0)return n;while(!h&&e>=0&&en)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=ut(u),l=y(u,f),s=v(u.length,l,e),s<0)return n;while(!c&&s>=0&&s0;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[r%16],r=Math.floor(r/16);for(;t<32;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[Math.floor(Math.random()*16)];return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3};OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",Reserved:"reserved",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidOpenBrowserWindow:102,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];return i?(i.name||(i.name=n[this.errorCodes.ooeInternalError].name),i.message||(i.message=n[this.errorCodes.ooeInternalError].message)):i=n[this.errorCodes.ooeInternalError],i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:t.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:t.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:t.L_SSOConnectionLostError,message:t.L_SSOConnectionLostErrorMessage}}}}(),function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}(),r,i,h,u,c,l,f,a,e,v,y,p,w,b,o,k,d,g,s,nt,tt,it,rt;n.RequirementVersion=ut;r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){var f,u,e,i,r;if(n==undefined)return!1;if(t==undefined&&(t=0),f=this._setMap,u=f._sets,u.hasOwnProperty(n.toLowerCase())){e=u[n.toLowerCase()];try{if((i=this._getVersion(e),t=t+"",r=this._getVersion(t),i.major>0&&i.major>r.major)||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),i=0,r=0;if(t.length<2&&isNaN(Number(n)))throw u;else if(i=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(i)||isNaN(r))throw u;return{minor:r,major:i}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;h=function(n){function i(){n.call(this,{dialogapi:t})}return __extends(i,n),i}(i);n.DefaultDialogSetRequirement=h;u=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelClientDefaultSetRequirement=u;c=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(u);n.ExcelClientV1DefaultSetRequirement=c;l=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookClientDefaultSetRequirement=l;f=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return __extends(i,n),i}(i);n.WordClientDefaultSetRequirement=f;a=function(n){function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return __extends(i,n),i}(f);n.WordClientV1DefaultSetRequirement=a;e=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointClientDefaultSetRequirement=e;v=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(e);n.PowerpointClientV1DefaultSetRequirement=v;y=function(n){function i(){n.call(this,{selection:t,textcoercion:t})}return __extends(i,n),i}(i);n.ProjectClientDefaultSetRequirement=y;p=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return __extends(i,n),i}(i);n.ExcelWebDefaultSetRequirement=p;w=function(n){function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordWebDefaultSetRequirement=w;b=function(n){function i(){n.call(this,{activeview:t,settings:t})}return __extends(i,n),i}(i);n.PowerpointWebDefaultSetRequirement=b;o=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookWebDefaultSetRequirement=o;k=function(n){function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.SwayWebDefaultSetRequirement=k;d=function(n){function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return __extends(i,n),i}(i);n.AccessWebDefaultSetRequirement=d;g=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelIOSDefaultSetRequirement=g;s=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordIOSDefaultSetRequirement=s;nt=function(n){function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return __extends(t,n),t}(s);n.WordIOSV1DefaultSetRequirement=nt;tt=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointIOSDefaultSetRequirement=tt;it=function(n){function i(){n.call(this,{mailbox:t})}return __extends(i,n),i}(i);n.OutlookIOSDefaultSetRequirement=it;rt=function(){function n(){}var t="undefined";return n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},n.getDefaultRequirementMatrix=function(u){var f,e,s,o;return this.initializeDefaultSetMatrix(),f=undefined,e=u.get_requirementMatrix(),e!=undefined&&e.length>0&&typeof JSON!==t?(s=JSON.parse(u.get_requirementMatrix().toLowerCase()),f=new r(new i(s))):(o=n.getClientFullVersionString(u),f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[o]!=undefined?new r(n.DefaultSetArrayMatrix[o]):new r(new i({}))),f},n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix(),e;return f!=undefined&&f.length>0&&typeof JSON!==t?(e=JSON.parse(n.get_requirementMatrix().toLowerCase()),u=new r(new i(e))):u=new r(new h),u},n.getClientFullVersionString=function(n){var i=n.get_appMinorVersion(),u="",r="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;return f&&n.get_appVersion()==1?r=t==4096&&i>=15?"16.00.01":"16.00":n.get_appName()==64?r=n.get_appVersion():(u=i<10?"0"+i:""+i,r=n.get_appVersion()+"."+u),n.get_appName()+"-"+r},n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new c;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new v;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new l;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new w;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new b;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new g;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new k;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new nt;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new tt;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new it},n.Excel_RCLIENT_1600="1-16.00",n.Excel_RCLIENT_1601="1-16.01",n.Word_RCLIENT_1600="2-16.00",n.Word_RCLIENT_1601="2-16.01",n.PowerPoint_RCLIENT_1600="4-16.00",n.PowerPoint_RCLIENT_1601="4-16.01",n.Outlook_RCLIENT_1600="8-16.00",n.Excel_WAC_1600="16-16.00",n.Word_WAC_1600="32-16.00",n.Outlook_WAC_1600="64-16.00",n.Outlook_WAC_1601="64-16.01",n.Project_RCLIENT_1600="128-16.00",n.Access_WAC_1600="256-16.00",n.PowerPoint_WAC_1600="512-16.00",n.Excel_IOS_1600="1024-16.00",n.SWAY_WAC_1600="2048-16.00",n.Word_IOS_1600="4096-16.00",n.Word_IOS_16001="4096-16.00.01",n.PowerPoint_IOS_1600="8192-16.00",n.Outlook_IOS_1600="65536-16.00",n.DefaultSetArrayMatrix={},n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))}(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}return n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n},n.getInstance=function(){return n.hostObj===undefined&&(n.hostObj=new n),n.hostObj},n.prototype.getPlatform=function(){var n=this,t;return n.hostInfo.hostPlatform&&(t=n.hostInfo.hostPlatform.toLowerCase(),n.platformRemappings[t])?n.platformRemappings[t]:null},n.prototype.getHost=function(){var n=this,t;if(n.hostInfo.hostType){if(t=n.hostInfo.hostType.toLowerCase(),n.camelCaseMappings[t])return n.camelCaseMappings[t];if(t=n.capitalizeFirstLetter(n.hostInfo.hostType),Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null},n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null},n}();n.Host=t})(t=n.HostName||(n.HostName={}))}(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){n||(window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,n=!0)},disableShortcut:function(){n&&(t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window),n=!1)}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i,r,o,u,f,e;if(n&&typeof n=="string"&&(r=n.indexOf("#"),r!=-1)){o=n.substring(0,r);u=n.substring(r+1);switch(o){case"binding":case"bindings":u&&(i=new OSF.DDA.BindingPromise(u))}}if(i)return i.onFail=t,i;else if(t)if(f=typeof t,f=="function")e={},e[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(e,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext));else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f);};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this,s,e;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.auth&&OSF.OUtil.defineEnumerableProperty(f,"auth",{value:n.auth});n.get_isDialog()?(e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e})):(t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t}),r&&(s=r.displayName||"appOM",delete r.displayName,OSF.OUtil.defineEnumerableProperty(f,s,{value:r})),u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}}),e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e}))};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this,u;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;return OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext()),n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,e=n.length,o=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){var u,i,r;for(u in n){if(i=n[u],r=t[u],i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw o();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw o();}};f.extractRequiredArguments=function(t,i,r){var f,u,h,s,c,l;if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(c=n.length-1;c>=s;c--){l=n[c];switch(typeof l){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=l;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}if(f=o.fillOptions(f,i,r,u),e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;return o.verifyArguments(t,f),f}var h="function",s=n.length,o=new OSF.DDA.ApiMethodCall(n,t,i,f,e);this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),u=c(n,r,t,i);return o.constructCallArgs(r,u,t,i)};this.processResponse=function(n,t,i,f){return n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n)};this.getCallArgs=function(n){for(var t,u,r,i=n.length-1;i>=s;i--){r=n[i];switch(typeof r){case"object":t=r;break;case h:u=r}}return t=t||{},u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u),t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],i=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],t,i,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback],u,r;f&&(u={},u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?u[OSF.DDA.AsyncResultEnum.Properties.Value]=i:(r={},i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i),f(new OSF.DDA.AsyncResult(u,r)))};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.SyncMethodNames[t]=i};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){function o(n,i,r,u){var o,c,s,h;if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(s=n.length-1;s>=e;s--){h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}return o=f.fillOptions(o,i,r,u),f.verifyArguments(t,o),o}var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),u=o(n,r,t,i);return f.constructCallArgs(r,u,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){function e(i,f){var a=i?{}:undefined,s,h,o,v,c,l;for(s in i){if(h=i[s],OSF.DDA.ListType.isListType(s)){o=[];for(v in h)o.push(e(h[v],f))}else OSF.OUtil.listContainsKey(r,s)?o=r[s][f](h):f==u&&n.preserveNesting(s)?o=e(h,f):(c=t[s],c?(l=c[f],l&&(o=l[h],o===undefined&&(o=h))):o=h);a[s]=o}return a}function l(i,r){var e,u,h,s;for(u in r)h=n.isComplexType(u)?l(i,t[u][o]):i[u],h!=undefined&&(e||(e={}),s=r[u],s==f&&(s=u),e[s]=n.pack(u,h));return e}function s(i,r,e){var o,a,h,l,p,v,y;e||(e={});for(o in r){if(a=r[o],a==f)h=i;else if(a==c){e[o]=i.toArray();continue}else h=i[a];if(h===null||h===undefined)e[o]=undefined;else if(h=n.unpack(o,h),n.isComplexType(o))l=t[o][u],n.preserveNesting(o)?e[o]=s(h,l):s(h,l,e);else if(OSF.DDA.ListType.isListType(o)){l={};p=OSF.DDA.ListType.getDescriptor(o);l[p]=f;v=new Array(h.length);for(y in h)v[y]=s(h[y],l);e[o]=v}else e[o]=h}return e}function a(n,i,r){var f=t[n][r],u,o,c;return r=="toHost"?(o=e(i,r),u=l(o,f)):r==h&&(c=s(i,f),u=e(c,r)),u}var h="fromHost",i=this,o="toHost",u=h,c="sourceData",f="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];t||(t={});i.addMapping=function(n,i){var e,h,c,l,r,s,a,v;if(i.map){e=i.map;h={};for(c in e)l=e[c],l==f&&(l=c),h[l]=c}else e=i.toHost,h=i.fromHost;if(r=t[n],r){s=r[o];for(a in s)e[a]=s[a];s=r[u];for(v in s)h[v]=s[v]}else r=t[n]={};r[o]=e;r[u]=h};i.toHost=function(n,t){return a(n,t,o)};i.fromHost=function(n,t){return a(n,t,u)};i.self=f;i.sourceData=c;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){return this.isDynamicType(n)?t[n].toHost(i):i};i.unpack=function(n,i){return this.isDynamicType(n)?t[n].fromHost(i):i}};OSF.DDA.getDecoratedParameterMap=function(n,t){function r(n){var i=null,r,t;if(n)for(i={},r=n.length,t=0;t0){for(r=[],i=0;i=s)break;if(f=Function._validateParameter(n[e],o,h),f)return f.popStackFrame(),f}return t}),Function._validateParameterCount||(Function._validateParameterCount=function(n,r,u){var f,s,e=r.length,h=n.length,c,l,a;if(he)for(s=i,f=0;f0&&t.push(u)}}catch(s){}return t}var i=[],t={};t[Microsoft.Office.WebExtension.Parameters.Data]=function(){var t=0,i=1;return{toHost:function(n){if(OSF.DDA.TableDataProperties&&typeof n!="string"&&n[OSF.DDA.TableDataProperties.TableRows]!==undefined){var r=[];r[t]=n[OSF.DDA.TableDataProperties.TableRows];r[i]=n[OSF.DDA.TableDataProperties.TableHeaders];n=r}return n},fromHost:function(r){var f,e,u;return r.toArray?(e=r.dimensions(),e===2?f=n(r):(u=r.toArray(),u.length===2&&(u[0]!=null&&u[0].toArray||u[1]!=null&&u[1].toArray)?(f={},f[OSF.DDA.TableDataProperties.TableRows]=n(u[t]),f[OSF.DDA.TableDataProperties.TableHeaders]=n(u[i])):f=u)):f=r,f}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,i,t);this.unpack=function(n,i){var r,u;return this.isComplexType(n)||OSF.DDA.ListType.isListType(n)?(u=(i||typeof i=="unknown")&&i.toArray,r=u?i.toArray():i||{}):r=this.isDynamicType(n)?t[n].fromHost(i):i,r}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(n){function t(n){var i=n,f,r,u;if(OSF.OUtil.isArray(n))for(f=i.length,r=0;r2)for(r=[],f=1;f=n.MESSAGE_TIME_DELTA?(h(),e.lastMessageTimestamp=o):(e.lastMessageTimestamp+=n.MESSAGE_TIME_DELTA,setTimeout(function(){h()},e.lastMessageTimestamp-o)),s},n.prototype.generateCorrelationId=function(){return++this.callingIndex,this.conversationId+this.callingIndex},n.getCurrentTimeMS=function(){return(new Date).getTime()},n.MESSAGE_TIME_DELTA=10,n}();n.WebkitScriptMessaging=i})(t=n.ScriptMessaging||(n.ScriptMessaging={}))}(OSFWebkit||(OSFWebkit={}));OSF.ScriptMessaging=OSFWebkit.ScriptMessaging,function(n){var i,r,t;n.MessageHandlerName="Agave";n.PopupMessageHandlerName="WefPopupHandler",function(n){var t="HostFullVersion",i="HostCustomMessage",r="RequirementMatrix",u="CommerceAllowed",f="TouchEnabled",e="InstanceId",o="CorrelationId",s="APISetVersion",h="SolutionToken",c="ControlIntegrationLevel",l="ActivationMode",a="DocumentUrl",v="BindingCount",y="AppDataLocale",p="APPUILocale",w="AppCapabilities",b="APIVersionSequence",k="RevisionVersion",d="MinorVersion",g="MajorVersion",nt="SolutionReferenceId",tt="Settings";n[n[tt]=0]=tt;n[n[nt]=1]=nt;n[n.AppType=2]="AppType";n[n[g]=3]=g;n[n[d]=4]=d;n[n[k]=5]=k;n[n[b]=6]=b;n[n[w]=7]=w;n[n[p]=8]=p;n[n[y]=9]=y;n[n[v]=10]=v;n[n[a]=11]=a;n[n[l]=12]=l;n[n[c]=13]=c;n[n[h]=14]=h;n[n[s]=15]=s;n[n[o]=16]=o;n[n[e]=17]=e;n[n[f]=18]=f;n[n[u]=19]=u;n[n[r]=20]=r;n[n[i]=21]=i;n[n[t]=22]=t}(n.AppContextProperties||(n.AppContextProperties={}));i=n.AppContextProperties,function(n){var t="SendMessage",i="GetContext",r="WriteSettings",u="UnregisterEvent",f="RegisterEvent";n[n.Execute=1]="Execute";n[n[f]=2]=f;n[n[u]=3]=u;n[n[r]=4]=r;n[n[i]=5]=i;n[n[t]=6]=t}(n.MethodId||(n.MethodId={}));r=n.MethodId;t=function(){function t(n){this.hostScriptProxy=n}var r="message",i=null;return t.prototype.execute=function(t,r,u){var f=r,e,o;f==i&&(f=[]);e={id:t,apiArgs:f};o=function(t){var e,f,r;if(u){if(e=[],OSF.OUtil.isArray(t))for(f=0;f=2&&(i=t[0],u=t[1]);r&&r(u,new n.WebkitSafeArray(i))},e=function(t){if(u)return u(new n.WebkitSafeArray(t))};this.hostScriptProxy.registerEvent(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.RegisterEvent,t,i,f,e)},t.prototype.unregisterEvent=function(t,i,r){var u=function(t){return r(new n.WebkitSafeArray(t))};this.hostScriptProxy.unregisterEvent(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.UnregisterEvent,t,i,u)},t.prototype.messageParent=function(n){var t=n[Microsoft.Office.WebExtension.Parameters.MessageToParent],i={dialogMessage:{messageType:OSF.DialogMessageType.DialogMessageReceived,messageContent:t}};window.opener.postMessage(JSON.stringify(i),window.location.origin)},t.prototype.openDialog=function(n,u,f,e){function c(t){if(t.origin==window.location.origin)try{var i=JSON.parse(t.data);i.dialogMessage&&f(n,[OSF.DialogMessageType.DialogMessageReceived,i.dialogMessage.messageContent])}catch(r){OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handlered. Message:"+t.data)}}function k(){try{(t.popup==i||t.popup.closed)&&(window.clearInterval(t.interval),window.removeEventListener(r,c),t.NotifyError=i,t.popup=i,f(n,[OSF.DialogMessageType.DialogClosed]))}catch(u){OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed.")}}var l,o,h,y;if(t.popup&&!t.popup.closed){e(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened);return}l="action=displayDialog";t.OpenDialogCallback=undefined;var a="#",s=JSON.parse(u),v=s.url;if(v){o=v.split(a);h="?";o[0].indexOf("?")>-1&&(h="&");var p=screen.width*s.width/100,w=screen.height*s.height/100,b="width="+p+", height="+w;o[0]=o[0].concat(h).concat(l);y=o.join(a);t.popup=window.open(y,"",b);t.OpenDialogCallback=function(i){if(i==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){window.addEventListener(r,c);this.messageEventListener=c;t.interval=window.setInterval(k,1e3);function u(t){f(n,[t])}t.NotifyError=u}e(i)}}},t.prototype.closeDialog=function(n,u,f){t.popup?(t.interval&&window.clearInterval(t.interval),t.popup.close(),t.popup=i,window.removeEventListener(r,this.messageEventListener),t.NotifyError=i,f(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)):f(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)},t.prototype.sendMessage=function(n){var t=n[Microsoft.Office.WebExtension.Parameters.MessageContent];!isNaN(parseFloat(t))&&isFinite(t)&&(t=t.toString());this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.SendMessage,t,i)},t}();n.WebkitHostController=t}(OSFWebkit||(OSFWebkit={}));OSF.Webkit=OSFWebkit;OSF.ClientHostController=new OSFWebkit.WebkitHostController(OSF.ScriptMessaging.GetScriptMessenger());OSF.DDA.ClientSettingsManager={getSettingsExecuteMethod:function(n){return function(t){var i,r,u=function(n,i){t.onReceiving&&t.onReceiving();t.onComplete&&t.onComplete(n,i)};try{n(t.hostCallArgs,t.onCalling,u)}catch(f){i=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;r={name:Strings.OfficeOM.L_InternalError,message:f};u(i,r)}}},read:function(n,t){var u=[],f=[],i,r;n&&n();i=OSF._OfficeAppFactory.getInitializationHelper();r=function(n){t&&t(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,n.get_settings())};i.getAppContext(null,r)},write:function(n,t,i,r){var u={},e=[],o=[],f,s;for(f in n)e.push(f),o.push(n[f]);u.keys=e;u.values=o;i&&i();s=function(n){r&&r(n[0],null)};OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.WriteSettings,u,s)}};OSF.InitializationHelper.prototype.initializeSettings=function(n,t){var i=n.get_settings();return this.deserializeSettings(i,t)};OSF.InitializationHelper.prototype.getAppContext=function(n,t){var r=function(n){for(var f,i=OSF.Webkit.AppContextProperties,h=n[i.AppType],e=n[i.Settings],o={},s=e[0],c=e[1],r=0;r40)&&(n=OSF.OUtil.Guid.generateNewGuid(),t.setValue(t.clientIDKey,n)),n},n.prototype.saveLog=function(n,t){var i=this,u=i.getValue(i.logIdSetKey);u=(u&&u.length>0?u+";":r)+n;i.setValue(i.logIdSetKey,u);i.setValue(n,t)},n.prototype.enumerateLog=function(n,t){var i=this,e=i.getValue(i.logIdSetKey),u,o,r,f;if(e){u=e.split(";");for(o in u)r=u[o],f=i.getValue(r),f&&(n&&n(r,f),t&&i.remove(r));t&&i.remove(i.logIdSetKey)}},n.prototype.getValue=function(n){var t=OSF.OUtil.getLocalStorage(),i=r;return t&&(i=t.getItem(n)),i},n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)},n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}},n}(),o=function(){function t(){}return t.prototype.LogData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(t)}catch(i){}},t.prototype.LogRawData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(t))}catch(i){}},t}();n.initialize=y;n.onAppActivated=p;n.onScriptDone=w;n.onCallDone=b;n.onMethodDone=k;n.onPropertyDone=d;n.onEventDone=g;n.onRegisterDone=nt;n.onAppClosed=tt;n.setOsfControlAppCorrelationId=it;n.doAppInitializationLogging=l;n.logAppCommonMessage=rt;n.logAppException=ut;OSF.AppTelemetry=n}(OSFAppTelemetry||(OSFAppTelemetry={}));OSF.DDA.AsyncMethodNames.addNames({CloseContainerAsync:"closeContainer"}),function(n){var t=function(){function n(){}return n}();n.Container=t}(OfficeExt||(OfficeExt={}));OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseContainerAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidCloseContainerMethod,fromHost:[],toHost:[]});Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(n){var i=this,r,t,u;i._eventHandlers={};i._objectEventHandlers={};i._queuedEventsArgs={};for(r in n)t=n[r],u=t=="objectDeleted"||t=="objectSelectionChanged"||t=="objectDataChanged"||t=="contentControlAdded",u?i._objectEventHandlers[t]={}:i._eventHandlers[t]=[],i._queuedEventsArgs[t]=[]};OSF.EventDispatch.prototype={getSupportedEvents:function(){var n=[];for(var t in this._eventHandlers)n.push(t);for(t in this._objectEventHandlers)n.push(t);return n},supportsEvent:function(n){for(var t in this._eventHandlers)if(n==t)return!0;for(t in this._objectEventHandlers)if(n==t)return!0;return!1},hasEventHandler:function(n,t){var i=this._eventHandlers[n],r;if(i&&i.length>0)for(r in i)if(i[r]===t)return!0;return!1},hasObjectEventHandler:function(n,t,i){var f=this._objectEventHandlers[n],r,u;if(f!=null)for(r=f[t],u=0;r!=null&&u0)for(r=0;r0?(this._eventHandlers[n]=[],!0):!1},clearObjectEventHandlers:function(n,t){return this._objectEventHandlers[n]!=null&&this._objectEventHandlers[n][t]!=null?(this._objectEventHandlers[n][t]=[],!0):!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},getObjectEventHandlerCount:function(n,t){return this._objectEventHandlers[n]==null||this._objectEventHandlers[n][t]==null?0:this._objectEventHandlers[n][t].length},fireEvent:function(n){var t,i,r;if(n.type==undefined)return!1;if(t=n.type,t&&this._eventHandlers[t]){i=this._eventHandlers[t];for(r in i)i[r](n);return!0}else return!1},fireObjectEvent:function(n,t){var i,f,r,u;if(t.type==undefined)return!1;if(i=t.type,i&&this._objectEventHandlers[i]&&(f=this._objectEventHandlers[i],r=f[n],r!=null)){for(u=0;u0)){for(r=t[0];i.length>0;)u=i.shift(),r(u);return!0}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var f="outlook",e="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(n,i[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:r=new OSF.DDA.RichApiMessageEventArgs(n,i);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i),t.initialize(r.initialData),OSF._OfficeAppFactory.getHostInfo().hostPlatform=="win32"&&t.setCurrentItemNumber(r.itemNumber.itemNumber);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkRecipientsChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var i=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),t=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];t(arguments,i,n)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(n){var i=OSF.DDA.SyncMethodNames.MessageParent.displayName,t=this,r;t[i]||OSF.OUtil.defineEnumerableProperty(t,i,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return n(arguments,t)}});r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;t[r]||typeof OSF.DialogParentMessageEventDispatch=="undefined"||OSF.DDA.DispIdHost.addEventSupport(t,OSF.DialogParentMessageEventDispatch,n);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(n){n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:n[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels,value:{types:["boolean"],defaultValue:!1}}],privateStateCallbacks:[],onSucceeded:function(n){var f=n[Microsoft.Office.WebExtension.Parameters.Id],i=n[Microsoft.Office.WebExtension.Parameters.Data],t=new OSF.DialogHandler,e=OSF.DDA.AsyncMethodNames.CloseAsync.displayName,r,u;return OSF.OUtil.defineEnumerableProperty(t,e,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];n(arguments,f,i,t)}}),r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName,OSF.OUtil.defineEnumerableProperty(t,r,{value:function(){var r=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],n=r.verifyAndExtractCall(arguments,t,i),u=n[Microsoft.Office.WebExtension.Parameters.EventType],f=n[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(u,f)}}),u=OSF.DDA.SyncMethodNames.SendMessage.displayName,OSF.OUtil.defineEnumerableProperty(t,u,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return n(arguments,i,t)}}),t},checkCallArgs:function(n){return n[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Width]=1),!n[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&n[Microsoft.Office.WebExtension.Parameters.Width]>100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99),n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1),!n[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99),n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(n){try{n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,n);OSF.ClientHostController.openDialog(n.dispId,n.targetId,function(t,i){n.onEvent&&n.onEvent(i);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(n){n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,n);try{OSF.ClientHostController.closeDialog(n.dispId,n.targetId,t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.messageParent=function(n){try{n.onCalling&&n.onCalling();var i=(new Date).getTime(),t=OSF.ClientHostController.messageParent(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs((new Date).getTime()-i),t),t}catch(r){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(r)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.sendMessage=function(n){try{n.onCalling&&n.onCalling();var r=(new Date).getTime(),t=OSF.ClientHostController.sendMessage(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),t}catch(i){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(i)}};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogParentMessageReceivedEvent:"DialogParentMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogParentMessageReceived:"dialogParentMessageReceived",DialogParentEventReceived:"dialogParentEventReceived"});OSF.DialogParentMessageEventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived,Microsoft.Office.WebExtension.EventType.DialogParentEventReceived]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});Microsoft.Office.WebExtension.FileType={Text:"text",Compressed:"compressed",Pdf:"pdf"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FileProperties:"FileProperties",FileSliceProperties:"FileSliceProperties"});OSF.DDA.FileProperties={Handle:"FileHandle",FileSize:"FileSize",SliceSize:Microsoft.Office.WebExtension.Parameters.SliceSize};OSF.DDA.File=function(n,t,i){var r,u;OSF.OUtil.defineEnumerableProperties(this,{size:{value:t},sliceCount:{value:Math.ceil(t/i)}});r={};r[OSF.DDA.FileProperties.Handle]=n;r[OSF.DDA.FileProperties.SliceSize]=i;u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.GetDocumentCopyChunkAsync,u.ReleaseDocumentCopyAsync],r)};OSF.DDA.FileSliceOffset="fileSliceoffset";OSF.DDA.AsyncMethodNames.addNames({GetDocumentCopyAsync:"getFileAsync",GetDocumentCopyChunkAsync:"getSliceAsync",ReleaseDocumentCopyAsync:"closeAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FileType,"enum":Microsoft.Office.WebExtension.FileType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:{types:["number"],defaultValue:65536}}],checkCallArgs:function(n){var t=n[Microsoft.Office.WebExtension.Parameters.SliceSize];if(t<=0||t>4194304)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return n},onSucceeded:function(n,t,i){return new OSF.DDA.File(n[OSF.DDA.FileProperties.Handle],n[OSF.DDA.FileProperties.FileSize],i[Microsoft.Office.WebExtension.Parameters.SliceSize])}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(n,t){return t[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(r<0||r>=t.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;return n[OSF.DDA.FileSliceOffset]=parseInt((r*i[OSF.DDA.FileProperties.SliceSize]).toString()),n},onSucceeded:function(n,t,i){var r={};return OSF.OUtil.defineEnumerableProperties(r,{data:{value:n[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:i[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:n[OSF.DDA.FileProperties.SliceSize]}}),r}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FileType,{Text:"text",Pdf:"pdf"});OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(n){OSF.OUtil.defineEnumerableProperties(this,{url:{value:n[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(n){return new Microsoft.Office.WebExtension.FileProperties(n)}});Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"};Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"};Microsoft.Office.WebExtension.Index={First:"first",Last:"last",Next:"next",Previous:"previous"};OSF.DDA.AsyncMethodNames.addNames({GoToByIdAsync:"goToByIdAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GoToByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string","number"]},{name:Microsoft.Office.WebExtension.Parameters.GoToType,"enum":Microsoft.Office.WebExtension.GoToType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:{"enum":Microsoft.Office.WebExtension.SelectionMode,defaultValue:Microsoft.Office.WebExtension.SelectionMode.Default}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:0},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:1},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:2},{name:Microsoft.Office.WebExtension.GoToType.Index,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:0},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:1},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:1},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileProperties.FileSize,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0},{name:OSF.DDA.FileProperties.SliceSize,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:0},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:5},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:6}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:0}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileSliceOffset,value:1},{name:OSF.DDA.FileProperties.SliceSize,value:2}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0}]});OSF.DDA.AsyncMethodNames.addNames({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync"}),function(){function r(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&r&&(r[OSF.DDA.TableDataProperties.TableRows]!=undefined||r[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(r=OSF.DDA.OMFactory.manufactureTableData(r)),r=OSF.DDA.DataCoercion.coerceData(r,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),r==undefined?null:r}var i=!1,n="boolean",t="number";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,"enum":Microsoft.Office.WebExtension.CoercionType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}}],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object",t,n]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[t,n],defaultValue:i}}],privateStateCallbacks:[]})}();OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:1},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:2},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:3},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:4},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:5}]});OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",RefreshingSettings:"refreshingSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(n){return OSF.OUtil.serializeSettings(n)},deserializeSettings:function(n){return OSF.OUtil.deserializeSettings(n)}};OSF.DDA.Settings=function(n){var t="name",i;n=n||{};i=function(n){var i=OSF.OUtil.getSessionStorage(),t,r;i&&(t=OSF.DDA.SettingsManager.serializeSettings(n),r=JSON?JSON.stringify(t):Sys.Serialization.JavaScriptSerializer.serialize(t),i.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),r))};OSF.OUtil.defineEnumerableProperties(this,{get:{value:function(i){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]),r;if(u)throw u;return r=n[i],typeof r=="undefined"?null:r}},set:{value:function(r,u){var f=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1},{name:"value",mayBeNull:!0}]);if(f)throw f;n[r]=u;i(n)}},remove:{value:function(r){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]);if(u)throw u;delete n[r];i(n)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],n)};OSF.DDA.RefreshableSettings=function(n){OSF.DDA.RefreshableSettings.uber.constructor.call(this,n);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],n);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:n}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(n,t){return t}}],onSucceeded:function(n,t,i){var f=n[OSF.DDA.SettingsManager.SerializedSettings],u=OSF.DDA.SettingsManager.deserializeSettings(f),e=i[OSF.DDA.SettingsManager.RefreshingSettings];for(var r in e)t.remove(r);for(r in u)t.set(r,u[r]);return t}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(n,t){return OSF.DDA.SettingsManager.serializeSettings(t)}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"});OSF.DDA.DocumentSelectionChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:n}})};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDeleted:"objectDeleted"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectSelectionChanged:"objectSelectionChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDataChanged:"objectDataChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ContentControlAdded:"contentControlAdded"});OSF.DDA.ObjectEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:n},object:{value:t}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDeletedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDataChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidContentControlAddedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});Microsoft.Office.WebExtension.TableData=function(n,t){function i(n){if(n==null||n==undefined)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(n,2);t<2;t++)n=[n];return n}catch(i){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(n){t=i(n)}},rows:{get:function(){return n},set:function(t){n=t==null||OSF.OUtil.isArray(t)&&t.length==0?[]:i(t)}}});this.headers=t;this.rows=n};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(n){return new Microsoft.Office.WebExtension.TableData(n[OSF.DDA.TableDataProperties.TableRows],n[OSF.DDA.TableDataProperties.TableHeaders])};Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var n=null;return{findArrayDimensionality:function(n){if(OSF.OUtil.isArray(n)){for(var t=0,i=0;i0},enumerable:!0,configurable:!0}),t.prototype._getLastAction=function(){return this.m_actions[this.m_actions.length-1]},t.prototype.addTrace=function(n,t){this.m_traceInfos[n]=t},t.prototype.ensureInstantiateObjectPath=function(t){if(t){if(this.m_instantiatedObjectPaths[t.objectPathInfo.Id])return;if(this.ensureInstantiateObjectPath(t.parentObjectPath),this.ensureInstantiateObjectPaths(t.argumentObjectPaths),!this.m_instantiatedObjectPaths[t.objectPathInfo.Id]){var r={Id:this.m_context._nextId(),ActionType:1,Name:"",ObjectPathId:t.objectPathInfo.Id},i=new n.Action(r,!1,!1);i.referencedObjectPath=t;this.addAction(i)}}},t.prototype.ensureInstantiateObjectPaths=function(n){if(n)for(var t=0;t=0;--r)if(i=n[r],u=i.actionInfo.Id,i.referencedObjectPath&&t._updateLastUsedActionIdOfObjectPathId(e,i.referencedObjectPath,u),o=i.referencedArgumentObjectPaths,o)for(v=o.length,s=0;s0?i.actionInfo.L=c:i.actionInfo.L&&delete i.actionInfo.L},t}();n.ClientRequest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;n._internalConfig={showDisposeInfoInDebugInfo:!1,enableEarlyDispose:!0,alwaysPolyfillClientObjectRetrieveMethod:!1};t=function(){function t(){}return t.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},t.prototype._createRequestExecutorOrNull=function(){return null},Object.defineProperty(t.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),t}();n.SessionBase=t;i=function(){function i(r){if(this.m_customRequestHeaders={},this._onRunFinishedNotifiers=[],this.m_nextId=0,i._overrideSession)this.m_requestUrlAndHeaderInfoResolver=i._overrideSession;else if((n.Utility.isNullOrUndefined(r)||typeof r=="string"&&r.length===0)&&(r=i.defaultRequestUrlAndHeaders,r||(r={url:n.Constants.localDocument,headers:{}})),typeof r=="string")this.m_requestUrlAndHeaderInfo={url:r,headers:{}};else if(i.isRequestUrlAndHeaderInfoResolver(r))this.m_requestUrlAndHeaderInfoResolver=r;else if(i.isRequestUrlAndHeaderInfo(r)){var u=r;this.m_requestUrlAndHeaderInfo={url:u.url,headers:{}};n.Utility._copyHeaders(u.headers,this.m_requestUrlAndHeaderInfo.headers)}else throw n._Internal.RuntimeError._createInvalidArgError("url");this.m_requestUrlAndHeaderInfoResolver instanceof t&&(this.m_session=this.m_requestUrlAndHeaderInfoResolver);this._processingResult=!1;this._customData=n.Constants.iterativeExecutor;this.sync=this.sync.bind(this)}return Object.defineProperty(i.prototype,"session",{get:function(){return this.m_session},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"eventRegistration",{get:function(){return this.m_session?this.m_session.eventRegistration:n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_url",{get:function(){return this.m_requestUrlAndHeaderInfo?this.m_requestUrlAndHeaderInfo.url:null},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_pendingRequest",{get:function(){return this.m_pendingRequest==null&&(this.m_pendingRequest=new n.ClientRequest(this)),this.m_pendingRequest},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"debugInfo",{get:function(){var t=new n.RequestPrettyPrinter(this._rootObjectPropertyName,this._pendingRequest._objectPaths,this._pendingRequest._actions,n._internalConfig.showDisposeInfoInDebugInfo),i=t.process();return{pendingStatements:i}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"trackedObjects",{get:function(){return this.m_trackedObjects||(this.m_trackedObjects=new n.TrackedObjects(this)),this.m_trackedObjects},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"requestHeaders",{get:function(){return this.m_customRequestHeaders},enumerable:!0,configurable:!0}),i.prototype.load=function(t,r){n.Utility.validateContext(this,t);var u=i._parseQueryOption(r),f=n.ActionFactory.createQueryAction(this,t,u);this._pendingRequest.addActionResultHandler(f,t)},i.isLoadOption=function(t){if(!n.Utility.isUndefined(t.select)&&(typeof t.select=="string"||Array.isArray(t.select))||!n.Utility.isUndefined(t.expand)&&(typeof t.expand=="string"||Array.isArray(t.expand))||!n.Utility.isUndefined(t.top)&&typeof t.top=="number"||!n.Utility.isUndefined(t.skip)&&typeof t.skip=="number")return!0;for(var i in t)return!1;return!0},i.parseStrictLoadOption=function(n){var t={Select:[]};return i.parseStrictLoadOptionHelper(t,"","option",n),t},i.combineQueryPath=function(n,t,i){return n.length===0?t:n+i+t},i.parseStrictLoadOptionHelper=function(t,r,u,f){var e,o;for(e in f)if(o=f[e],e==="$all"){if(typeof o!="boolean")throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));o&&t.Select.push(i.combineQueryPath(r,"*","/"))}else if(e==="$top"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));t.Top=o}else if(e==="$skip"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));t.Skip=o}else if(typeof o=="boolean")o&&t.Select.push(i.combineQueryPath(r,e,"/"));else if(typeof o=="object")i.parseStrictLoadOptionHelper(t,i.combineQueryPath(r,e,"/"),i.combineQueryPath(u,e,"."),o);else throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));},i._parseQueryOption=function(t){var u={},f,r;if(typeof t=="string")f=t,u.Select=n.Utility._parseSelectExpand(f);else if(Array.isArray(t))u.Select=t;else if(typeof t=="object")if(r=t,i.isLoadOption(r)){if(typeof r.select=="string")u.Select=n.Utility._parseSelectExpand(r.select);else if(Array.isArray(r.select))u.Select=r.select;else if(!n.Utility.isNullOrUndefined(r.select))throw n._Internal.RuntimeError._createInvalidArgError("option.select");if(typeof r.expand=="string")u.Expand=n.Utility._parseSelectExpand(r.expand);else if(Array.isArray(r.expand))u.Expand=r.expand;else if(!n.Utility.isNullOrUndefined(r.expand))throw n._Internal.RuntimeError._createInvalidArgError("option.expand");if(typeof r.top=="number")u.Top=r.top;else if(!n.Utility.isNullOrUndefined(r.top))throw n._Internal.RuntimeError._createInvalidArgError("option.top");if(typeof r.skip=="number")u.Skip=r.skip;else if(!n.Utility.isNullOrUndefined(r.skip))throw n._Internal.RuntimeError._createInvalidArgError("option.skip");}else u=i.parseStrictLoadOption(t);else if(!n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError("option");return u},i.prototype.loadRecursive=function(t,r,u){var f,e,o;if(!n.Utility.isPlainJsonObject(r))throw n._Internal.RuntimeError._createInvalidArgError("options");f={};for(e in r)f[e]=i._parseQueryOption(r[e]);o=n.ActionFactory.createRecursiveQueryAction(this,t,{Queries:f,MaxDepth:u});this._pendingRequest.addActionResultHandler(o,t)},i.prototype.trace=function(t){n.ActionFactory.createTraceAction(this,t,!0)},i.prototype._processOfficeJsErrorResponse=function(n,t){},i.prototype.syncPrivateMain=function(){var t=this;return n.Utility._createPromiseFromResult(null).then(function(){if(!t.m_requestUrlAndHeaderInfo)return t.m_requestUrlAndHeaderInfoResolver._resolveRequestUrlAndHeaderInfo().then(function(i){if(t.m_requestUrlAndHeaderInfo=i,t.m_requestUrlAndHeaderInfo||(t.m_requestUrlAndHeaderInfo={url:n.Constants.localDocument,headers:{}}),n.Utility.isNullOrEmptyString(t.m_requestUrlAndHeaderInfo.url)&&(t.m_requestUrlAndHeaderInfo.url=n.Constants.localDocument),t.m_requestUrlAndHeaderInfo.headers||(t.m_requestUrlAndHeaderInfo.headers={}),typeof t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull=="function"){var r=t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull();r&&(t._requestExecutor=r)}})}).then(function(){var n=t._pendingRequest;return t.m_pendingRequest=null,t.processPreSyncPromises(n).then(function(){return t.syncPrivate(n)})})},i.prototype.syncPrivate=function(t){var f=this,e,o,s,u,h,r,i;return t.hasActions?(e=t.buildRequestMessageBody(),o=t.flags,this._requestExecutor||(this._requestExecutor=n.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)?new n.OfficeJsRequestExecutor(this):new n.HttpRequestExecutor),s=this._requestExecutor,u={},n.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,u),n.Utility._copyHeaders(this.m_customRequestHeaders,u),h={Url:this.m_requestUrlAndHeaderInfo.url,Headers:u,Body:e},t.invalidatePendingInvalidObjectPaths(),r=null,i=null,this._lastSyncStart=performance.now(),s.executeAsync(this._customData,o,h).then(function(u){return f._lastSyncEnd=performance.now(),r=f.processRequestExecutorResponseMessage(t,u),f.processPendingEventHandlers(t).catch(function(t){n.Utility.log("Error in processPendingEventHandlers");n.Utility.log(JSON.stringify(t));i=t})}).then(function(){var u,f;if(r){n.Utility.log("Throw error from response: "+JSON.stringify(r));throw r;}if(i){n.Utility.log("Throw error from ProcessEventHandler: "+JSON.stringify(i));u=null;i instanceof n._Internal.RuntimeError?(u=i,u.traceMessages=t._responseTraceMessages):(f=null,f=typeof i=="string"?i:i.message,n.Utility.isNullOrEmptyString(f)&&(f=n.Utility._getResourceString(n.ResourceStrings.cannotRegisterEvent)),u=new n._Internal.RuntimeError({code:n.ErrorCodes.cannotRegisterEvent,message:f,traceMessages:t._responseTraceMessages}));throw u;}})):this.processPendingEventHandlers(t)},i.prototype.processRequestExecutorResponseMessage=function(t,i){var e,r,o,u,f;if(i.Body&&i.Body.TraceIds&&t._setResponseTraceIds(i.Body.TraceIds),e=t._responseTraceMessages,r=null,i.Body&&(i.Body.Error&&i.Body.Error.ActionIndex>=0&&(o=new n.RequestPrettyPrinter(this._rootObjectPropertyName,t._objectPaths,t._actions),r=o.processForDebugStatementInfo(i.Body.Error.ActionIndex)),u=null,i.Body.Results?u=i.Body.Results:i.Body.ProcessedResults&&i.Body.ProcessedResults.Results&&(u=i.Body.ProcessedResults.Results),u)){this._processingResult=!0;try{t.processResponse(u)}finally{this._processingResult=!1}}if(n.Utility.isNullOrEmptyString(i.ErrorCode)){if(i.Body&&i.Body.Error)return f={errorLocation:i.Body.Error.Location},r&&(f.statement=r.statement,f.surroundingStatements=r.surroundingStatements),new n._Internal.RuntimeError({code:i.Body.Error.Code,message:i.Body.Error.Message,traceMessages:e,debugInfo:f})}else return new n._Internal.RuntimeError({code:i.ErrorCode,message:i.ErrorMessage,traceMessages:e});return null},i.prototype.processPendingEventHandlers=function(t){for(var u,i=n.Utility._createPromiseFromResult(null),r=0;r0&&(typeof r[0]=="string"||i.isRequestUrlAndHeaderInfo(r[0])||i.isRequestUrlAndHeaderInfoResolver(r[0]))&&(y=r[0],h=1),r.length==h+1)l=u,v=r[h+0];else if(r.length==h+2){if(n.Utility.isNullOrUndefined(r[h+0]))l=u;else if(r[h+0]instanceof n.ClientObject)l=function(){return r[h+0].context};else if(r[h+0]instanceof i)l=function(){return r[h+0]};else if(Array.isArray(r[h+0])){if(c=r[h+0],c.length==0)return i.createErrorPromise(t);for(a=0;a0){var n=c._onRunFinishedNotifiers.shift();n()}if(a)return l;else throw l;})},i.prototype._nextId=function(){return++this.m_nextId},i}();n.ClientRequestContext=i}(OfficeExtension||(OfficeExtension={})),function(n){var i=function(){function t(n){this.m_type=n}return Object.defineProperty(t.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){(this.m_isLoaded=!0,typeof t=="object"&&t&&t._IsNull)||(this.m_value=this.m_type===1?n.Utility.adjustToDateTime(t):t)},t}(),t;n.ClientResult=i;t=function(){function t(n,t){this.m_proxy=n;this.m_shouldPolyfill=t}return Object.defineProperty(t.prototype,"proxy",{get:function(){return this.m_proxy},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"retrieveResult.data"}});return this.m_data},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(n){if(this.m_isLoaded=!0,typeof n=="object"&&n&&n._IsNull){this.m_data=null;return}this.m_data=this.m_shouldPolyfill?this.changePropertyNameToCamelLowerCase(n):n},t.prototype.changePropertyNameToCamelLowerCase=function(t){var o=95,u,i,r,f,e;if(Array.isArray(t)){for(i=[],u=0;u0&&(r=!0),t=document.createElement("a"),t.href=this.m_url,r?t.hash=t.hash.length===0||t.hash==="#"?"#"+i:t.hash+"&"+i:t.search=t.search.length===0||t.search==="?"?"?"+i:t.search+"&"+i,t.href},f.prototype.init=function(){var t=this,i;return window.addEventListener("message",this.m_onMessageHandler),i=this._getIFrameSrc(),new n._Internal.OfficePromise(function(r,u){var f=document.createElement("iframe");t.m_options.id&&(f.id=t.m_options.id);f.style.height=t.m_options.height;f.style.width=t.m_options.width;f.src=i;t.m_options.container.appendChild(f);t.m_timeoutId=setTimeout(function(){t.close();var i=n.Utility.createRuntimeError(n.ErrorCodes.timeout,n.Utility._getResourceString(n.ResourceStrings.timeout),"EmbeddedSession.init");u(i)},t.m_options.timeoutInMilliseconds);t.m_promiseResolver=r})},f.prototype._invoke=function(n,t,u){if(!this.m_enabled){t(i.InternalError,null);return}r.invokeRequestModifier&&(u=r.invokeRequestModifier(u));this._sendMessageWithCallback(this.m_id++,n,u,function(n){r.invokeResponseModifier&&(n=r.invokeResponseModifier(n));var u=n.Error;delete n.Error;t(u||i.Success,n)})},f.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler);window.clearTimeout(this.m_timeoutId);this.m_enabled=!1},Object.defineProperty(f.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),f.prototype._createRequestExecutorOrNull=function(){return new e(this)},f.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},f.prototype._registerEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.RegisterEventCommand,{EventId:i,TargetId:r},function(){n(null)})})},f.prototype._unregisterEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.UnregisterEventCommand,{EventId:i,TargetId:r},function(){n()})})},f.prototype._onMessage=function(n){var u=this,i,e,r,o,s;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===n.source&&this.m_chosenOrigin===n.origin)){if(i=n.data,i&&i[t.CommandKey]===t.ApiReadyCommand){!this.m_chosenWindow&&this._isValidDescendant(n.source)&&i[t.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=n.source,this.m_chosenOrigin=n.origin,this._sendMessageWithCallback(this.m_id++,t.GetAppContextCommand,null,function(n){u._setupContext(n);window.clearTimeout(u.m_timeoutId);u.m_promiseResolver()}));return}if(i&&i[t.CommandKey]===t.FireEventCommand){var f=i[t.ParamsKey],h=f.EventId,c=f.TargetId,l=f.Data;if(this.m_sessionEventManager)for(e=this.m_sessionEventManager.getHandlers(h,c),r=0;r=0;o--)if(r[o]===e[i].handler){r.splice(o,1);break}break;case 2:r=[];break}}return s&&(!this.m_registered&&r.length>0?u=u.then(function(){return f.m_eventInfo.registerFunc(f.m_callback)}).then(function(){return f.m_registered=!0}):this.m_registered&&r.length==0&&(u=u.then(function(){return f.m_eventInfo.unregisterFunc(f.m_callback)}).catch(function(t){n.Utility.log("Error when unregister event: "+JSON.stringify(t))}).then(function(){return f.m_registered=!1})),u=u.then(function(){return f.m_handlers=r})),u},t.prototype.fireEvent=function(t){for(var u,f,r=[],i=0;i=0;e--)if(f[e]===u){f.splice(e,1);break}return f.length===0?this.m_unregisterEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i}();n.EventRegistration=i}(OfficeExtension||(OfficeExtension={})),function(n){function r(n){t._testReadyImpl=n}function u(n){t.getGenericEventRegistration()._handleRichApiMessage(n)}var t=function(){function t(){this.m_eventRegistration=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this));this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this)}return t.prototype.ready=function(){var i=this;return this.m_ready||(this.m_ready=t._testReadyImpl?t._testReadyImpl().then(function(){i.m_isReady=!0}):n._Internal.officeJsEventRegistration.register(5,"",this.m_richApiMessageHandler).then(function(){i.m_isReady=!0})),this.m_ready},Object.defineProperty(t.prototype,"isReady",{get:function(){return this.m_isReady},enumerable:!0,configurable:!0}),t.prototype.register=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.register(n,t,i)})},t.prototype.unregister=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.unregister(n,t,i)})},t.prototype._registerEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._unregisterEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._handleRichApiMessage=function(t){var r,i,u,e,f;if(t&&t.entries)for(r=0;r0))for(e=JSON.parse(i.message),i.isRemoteOverride&&(e.source=n.Constants.eventSourceRemote),f=0;f=0;u--)if(n[u]===i){n.splice(u,1);break}n.length==0&&t.getGenericEventRegistration().unregister(r.m_genericEventInfo.eventType,r.m_genericEventInfo.getTargetIdFunc(),r._callback)})},r.prototype.removeAll=function(){},r}(n.EventHandlers);n.GenericEventHandlers=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var s=JSON.stringify(u.Body),f=u.Url,e,o;if(f.charAt(f.length-1)!="/"&&(f=f+"/"),f=f+n.Constants.processQuery,f=f+"?"+n.Constants.flags+"="+r.toString(),e={method:"POST",url:f,headers:{},body:s},e.headers[n.Constants.sourceLibHeader]=t.SourceLibHeaderValue,e.headers["CONTENT-TYPE"]="application/json",u.Headers)for(o in u.Headers)e.headers[o]=u.Headers[o];return n.HttpUtility.sendRequest(e).then(function(t){var i,r;return t.statusCode===200?i={ErrorCode:null,ErrorMessage:null,Headers:t.headers,Body:JSON.parse(t.body)}:(n.Utility.log("Error Response:"+t.body),r=n.Utility._parseErrorResponse(t),i={ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:t.headers,Body:null}),i})},t.SourceLibHeaderValue="officejs-rest",t}();n.HttpRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.setCustomSendRequestFunc=function(n){t.s_customSendRequestFunc=n},t.xhrSendRequestFunc=function(t){return new n._Internal.OfficePromise(function(i,r){var u=new XMLHttpRequest,f;if(u.open(t.method,t.url),u.onload=function(){var t={statusCode:u.status,headers:n.Utility._parseHttpResponseHeaders(u.getAllResponseHeaders()),body:u.responseText};i(t)},u.onerror=function(){r(new n._Internal.RuntimeError({code:n.ErrorCodes.connectionFailure,message:n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,u.statusText)}))},t.headers)for(f in t.headers)u.setRequestHeader(f,t.headers[f]);u.send(t.body)})},t.sendRequest=function(n){t.validateAndNormalizeRequest(n);var i=t.s_customSendRequestFunc;return i||(i=t.xhrSendRequestFunc),i(n)},t.setCustomSendLocalDocumentRequestFunc=function(n){t.s_customSendLocalDocumentRequestFunc=n},t.sendLocalDocumentRequest=function(n){t.validateAndNormalizeRequest(n);var i;return i=t.s_customSendLocalDocumentRequestFunc||t.officeJsSendLocalDocumentRequestFunc,i(n)},t.officeJsSendLocalDocumentRequestFunc=function(t){t=n.Utility._validateLocalDocumentRequest(t);var i=n.Utility._buildRequestMessageSafeArray(t);return new n._Internal.OfficePromise(function(t,r){OSF.DDA.RichApi.executeRichApiRequestAsync(i,function(i){var r;r=i.status=="succeeded"?{statusCode:n.RichApiMessageUtility.getResponseStatusCode(i),headers:n.RichApiMessageUtility.getResponseHeaders(i),body:n.RichApiMessageUtility.getResponseBody(i)}:n.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(i.error.code,i.error.message);n.Utility.log(JSON.stringify(r));t(r)})})},t.validateAndNormalizeRequest=function(t){if(n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"request"});n.Utility.isNullOrEmptyString(t.method)&&(t.method="GET");t.method=t.method.toUpperCase()},t.logRequest=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Request---"),n.Utility.log(i.method+" "+i.url),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t.logResponse=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Response---"),n.Utility.log(""+i.statusCode),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t._logBody=!1,t}();n.HttpUtility=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_clientObject=n}return n.prototype._handleResult=function(n){this.m_clientObject._handleIdResult(n)},n}();n.InstantiateActionResultHandler=t}(OfficeExtension||(OfficeExtension={})),function(n){}(OfficeExtension||(OfficeExtension={})),function(n){var u=function(){function t(n){this.m_session=n}return t.prototype.executeAsync=function(t,r,u){var e={url:n.Constants.processQuery,method:"POST",headers:u.Headers,body:u.Body},f={id:i.nextId(),type:1,flags:r,message:e};return n.Utility.log(JSON.stringify(f)),this.m_session.sendMessageToHost(f).then(function(t){var i,r,u;return n.Utility.log("Received response: "+JSON.stringify(t)),i=t.message,i.statusCode===200?r={ErrorCode:null,ErrorMessage:null,Headers:i.headers,Body:i.body}:(n.Utility.log("Error Response:"+i.body),u=n.Utility._parseErrorResponse(i),r={ErrorCode:u.errorCode,ErrorMessage:u.errorMessage,Headers:i.headers,Body:null}),r})},t}(),i=function(i){function r(n){var t=this;i.call(this);this.m_promiseResolver={};this.m_bridge=n;this.m_bridge.onMessageFromHost=function(n){t.onMessageFromHost(n)}}return __extends(r,i),r.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},r.prototype._createRequestExecutorOrNull=function(){return n.Utility.log("NativeBridgeSession::CreateRequestExecutor"),new u(this)},Object.defineProperty(r.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),r.init=function(t){if(t&&typeof t=="object"){var i=new r(t);n.ClientRequestContext._overrideSession=i;n.HttpUtility.setCustomSendLocalDocumentRequestFunc(function(n){var t={id:r.nextId(),type:1,flags:0,message:n};return i.sendMessageToHost(t).then(function(n){return n.message})})}},r.prototype.sendMessageToHost=function(t){var i=this;return this.m_bridge.sendMessageToHost(JSON.stringify(t)),new n._Internal.OfficePromise(function(n,r){i.m_promiseResolver[t.id]=n})},r.prototype.onMessageFromHost=function(n){var i,r;n==="test"?t._testFunc&&t._testFunc():(i=JSON.parse(n),typeof i.id=="number"&&(r=this.m_promiseResolver[i.id],r&&r(i),delete this.m_promiseResolver[i.id]))},r.nextId=function(){return r.s_nextId++},r.s_nextId=1,r}(n.SessionBase),r=function(){function n(){}return n.init=function(n){i.init(n)},n}(),t;n.HostBridge=r;typeof _richApiNativeBridge=="object"&&_richApiNativeBridge&&r.init(_richApiNativeBridge);t=function(){function n(){}return n.setTestFunc=function(t){n._testFunc=t},n}();n.HostBridgeTest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){this.m_objectPathInfo=n;this.m_parentObjectPath=t;this.m_isWriteOperation=!1;this.m_isCollection=i;this.m_isInvalidAfterRequest=r;this.m_isValid=!0}return Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},set:function(n){this.m_isWriteOperation=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRestrictedResourceAccess",{get:function(){return this.m_isRestrictedResourceAccess},set:function(n){this.m_isRestrictedResourceAccess=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(n){this.m_argumentObjectPaths=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(n){this.m_isValid=n;!n&&this.m_objectPathInfo.ObjectPathType===6&&this.m_savedObjectPathInfo&&(t.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(n){this.m_getByIdMethodName=n},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null},t.prototype.updateUsingObjectData=function(i){var e=i[n.Constants.referenceId],f,o,u,r;if(!n.Utility.isNullOrEmptyString(e)){this.m_savedObjectPathInfo||this.isInvalidAfterRequest||!t.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)||(f={},t.copyObjectPathInfo(this.m_objectPathInfo,f),this.m_savedObjectPathInfo={pathInfo:f,parent:this.m_parentObjectPath});this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=e;this.m_objectPathInfo.ArgumentInfo={};delete this.m_objectPathInfo.ParentObjectPathId;this.m_parentObjectPath=null;this.m_argumentObjectPaths=null;return}if(o=this.parentObjectPath&&this.parentObjectPath.isCollection,u=this.getByIdMethodName,(o||!n.Utility.isNullOrEmptyString(u))&&(r=i[n.Constants.id],n.Utility.isNullOrUndefined(r)&&(r=i[n.Constants.idPrivate]),!n.Utility.isNullOrUndefined(r))){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;n.Utility.isNullOrEmptyString(u)?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=u,this.m_getByIdMethodName=null);this.isWriteOperation=!1;this.m_objectPathInfo.ArgumentInfo={};this.m_objectPathInfo.ArgumentInfo.Arguments=[r];this.m_argumentObjectPaths=null;return}},t.isRestorableObjectPath=function(n){return n===1||n===5||n===3||n===4},t.copyObjectPathInfo=function(n,t){t.Id=n.Id;t.ArgumentInfo=n.ArgumentInfo;t.Name=n.Name;t.ObjectPathType=n.ObjectPathType;t.ParentObjectPathId=n.ParentObjectPathId},t}();n.ObjectPath=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createGlobalObjectObjectPath=function(t){var i={Id:t._nextId(),ObjectPathType:1,Name:""};return new n.ObjectPath(i,null,!1,!1)},t.createNewObjectObjectPath=function(t,i,r,u){var e={Id:t._nextId(),ObjectPathType:2,Name:i},f=new n.ObjectPath(e,null,r,!1);return f.isRestrictedResourceAccess=u,f},t.createPropertyObjectPath=function(t,i,r,u,f,e){var s={Id:t._nextId(),ObjectPathType:4,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id},o=new n.ObjectPath(s,i._objectPath,u,f);return o.isRestrictedResourceAccess=e,o},t.createIndexerObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i._objectPath,!1,!1)},t.createIndexerObjectPathUsingParentPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i,!1,!1)},t.createMethodObjectPath=function(t,i,r,u,f,e,o,s,h){var l={Id:t._nextId(),ObjectPathType:3,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},a=n.Utility.setMethodArguments(t,l.ArgumentInfo,f),c=new n.ObjectPath(l,i._objectPath,e,o);return c.argumentObjectPaths=a,c.isWriteOperation=u!=1,c.getByIdMethodName=s,c.isRestrictedResourceAccess=h,c},t.createReferenceIdObjectPath=function(t,i){var r={Id:t._nextId(),ObjectPathType:6,Name:i,ArgumentInfo:{}};return new n.ObjectPath(r,null,!1,!1)},t.createChildItemObjectPathUsingIndexerOrGetItemAt=function(i,r,u,f,e){var o=f[n.Constants.id];return n.Utility.isNullOrUndefined(o)&&(o=f[n.Constants.idPrivate]),i&&!n.Utility.isNullOrUndefined(o)?t.createChildItemObjectPathUsingIndexer(r,u,f):t.createChildItemObjectPathUsingGetItemAt(r,u,f,e)},t.createChildItemObjectPathUsingIndexer=function(t,i,r){var f=r[n.Constants.id],u;return n.Utility.isNullOrUndefined(f)&&(f=r[n.Constants.idPrivate]),u=u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u.ArgumentInfo.Arguments=[f],new n.ObjectPath(u,i._objectPath,!1,!1)},t.createChildItemObjectPathUsingGetItemAt=function(t,i,r,u){var e=r[n.Constants.index],f;return e&&(u=e),f={Id:t._nextId(),ObjectPathType:3,Name:n.Constants.getItemAt,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f.ArgumentInfo.Arguments=[u],new n.ObjectPath(f,i._objectPath,!1,!1)},t}();n.ObjectPathFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_context=n}return t.prototype.executeAsync=function(i,r,u){var f=this,e=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n._Internal.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(e,function(i){n.Utility.log("Response:");n.Utility.log(JSON.stringify(i));var r;i.status=="succeeded"?r=n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBody(i),n.RichApiMessageUtility.getResponseHeaders(i)):(r=n.RichApiMessageUtility.buildResponseOnError(i.error.code,i.error.message),f.m_context._processOfficeJsErrorResponse(i.error.code,r));t(r)})})},t.SourceLibHeaderValue="officejs",t}();n.OfficeJsRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){n.OfficeRequire=function(){return null}()})(t=n._Internal||(n._Internal={})),function(n){var t;(function(t){function i(){return function(){"use strict";function vt(n){return typeof n=="function"||typeof n=="object"&&n!==null}function b(n){return typeof n=="function"}function yt(n){return typeof n=="object"&&n!==null}function wt(n){k=n}function bt(n){f=n}function ni(){var t=process.nextTick,n=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&n[1]==="0"&&n[2]==="10"&&(t=setImmediate),function(){t(c)}}function tr(){return function(){pt(c)}}function ti(){var n=0,i=new it(c),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function ii(){var n=new MessageChannel;return n.port1.onmessage=c,function(){n.port2.postMessage(0)}}function ri(){return function(){setTimeout(c,1)}}function c(){for(var t,i,n=0;n=0?(n=n.substring(t+5,n.length),n<"14.14393"?!0:!1):!1}function i(){return typeof window=="undefined"&&typeof Promise=="function"?Promise:typeof window!="undefined"&&window.Promise?t()?n.PromiseImpl.Init():window.Promise:n.PromiseImpl.Init()}n.OfficePromise=i()}(t=n._Internal||(n._Internal={}));i=t.OfficePromise;n.Promise=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this._autoCleanupList={};this.m_context=n}return t.prototype.add=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._addCommon(n,!0)}):this._addCommon(n,!0)},t.prototype._autoAdd=function(n){this._addCommon(n,!1);this._autoCleanupList[n._objectPath.objectPathInfo.Id]=n},t.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(t,i){var r=this.m_context._autoCleanup&&!t[n.Constants.isTracked]&&t!==this.m_context._rootObject&&i&&!n.Utility.isNullOrEmptyString(i[n.Constants.referenceId]);r&&(this._autoCleanupList[t._objectPath.objectPathInfo.Id]=t,t[n.Constants.isTracked]=!0)},t.prototype._addCommon=function(t,i){if(t[n.Constants.isTracked]){i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id];return}var r=t[n.Constants.referenceId];n.Utility.isNullOrEmptyString(r)&&t._KeepReference&&(t._KeepReference(),n.ActionFactory.createInstantiateAction(this.m_context,t),i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id],t[n.Constants.isTracked]=!0)},t.prototype.remove=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._removeCommon(n)}):this._removeCommon(n)},t.prototype._removeCommon=function(t){var r=t[n.Constants.referenceId],i;n.Utility.isNullOrEmptyString(r)||(i=this.m_context._rootObject,i._RemoveReference&&i._RemoveReference(r),delete t[n.Constants.isTracked])},t.prototype._retrieveAndClearAutoCleanupList=function(){var n=this._autoCleanupList;return this._autoCleanupList={},n},t}();n.TrackedObjects=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){n||(n="root");this.m_globalObjName=n;this.m_referencedObjectPaths=t;this.m_actions=i;this.m_statements=[];this.m_variableNameForObjectPathMap={};this.m_variableNameToObjectPathMap={};this.m_declaredObjectPathMap={};this.m_showDispose=r}return t.prototype.process=function(){this.m_showDispose&&n.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions);for(var t=0;t=0&&this.m_statements.length>i+o+1)break;if(i<0)return null;for(f=i-o,f<0&&(f=0),e=i+1+o,e>this.m_statements.length&&(e=this.m_statements.length),r=[],f!=0&&r.push("..."),s=f;s>>>>"),r.push(this.m_statements[i]),r.push("// <<<<<"),h=i+1;h0)?(r=i.map(function(n){return u.getObjVarName(n)}).join(", "),n+" // And then dispose {"+r+"}"):n},t.prototype.buildQueryExpression=function(n){if(n.actionInfo.QueryInfo){var t={};return t.select=n.actionInfo.QueryInfo.Select,t.expand=n.actionInfo.QueryInfo.Expand,t.skip=n.actionInfo.QueryInfo.Skip,t.top=n.actionInfo.QueryInfo.Top,typeof t.top=="undefined"&&typeof t.skip=="undefined"&&typeof t.expand=="undefined"?typeof t.select=="undefined"?"":JSON.stringify(t.select):JSON.stringify(t)}return""},t.prototype.buildObjectPathExpressionWithParent=function(n){var t=n.objectPathInfo.ObjectPathType==5||n.objectPathInfo.ObjectPathType==3||n.objectPathInfo.ObjectPathType==4;return t&&n.objectPathInfo.ParentObjectPathId?this.getObjVarName(n.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(n):this.buildObjectPathExpression(n)},t.prototype.buildObjectPathExpression=function(t){switch(t.objectPathInfo.ObjectPathType){case 1:return"context."+this.m_globalObjName;case 5:return"getItem("+this.buildArgumentsExpression(t.objectPathInfo.ArgumentInfo)+")";case 3:return n.Utility._toCamelLowerCase(t.objectPathInfo.Name)+"("+this.buildArgumentsExpression(t.objectPathInfo.ArgumentInfo)+")";case 2:return t.objectPathInfo.Name+".newObject()";case 7:return"null";case 4:return n.Utility._toCamelLowerCase(t.objectPathInfo.Name);case 6:return"context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(t.objectPathInfo.Name)+")"}},t.prototype.buildArgumentsExpression=function(n){var t="",i;if(!n.Arguments)return t;for(i=0;i0&&(t=t+", "),t=t+this.buildArgumentLiteral(n.Arguments[i],n.ReferencedObjectPathIds?n.ReferencedObjectPathIds[i]:null);return t==="undefined"&&(t=""),t},t.prototype.buildArgumentLiteral=function(n,t){return typeof n=="number"&&n===t?this.getObjVarName(t):JSON.stringify(n)},t.prototype.getObjVarNameBase=function(t){var u="v",f=this.m_referencedObjectPaths[t],i,r;switch(f.objectPathInfo.ObjectPathType){case 1:u=this.m_globalObjName;break;case 4:u=n.Utility._toCamelLowerCase(f.objectPathInfo.Name);break;case 3:i=f.objectPathInfo.Name;i.length>3&&i.substr(0,3)==="Get"&&(i=i.substr(3));u=n.Utility._toCamelLowerCase(i);break;case 5:r=this.getObjVarNameBase(f.objectPathInfo.ParentObjectPathId);u=r.charAt(r.length-1)==="s"?r.substr(0,r.length-1):r+"Item";break}return u},t.prototype.getObjVarName=function(n){var t,i;if(this.m_variableNameForObjectPathMap[n])return this.m_variableNameForObjectPathMap[n];if(t=this.getObjVarNameBase(n),!this.m_variableNameToObjectPathMap[t])return this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t;for(i=1;this.m_variableNameToObjectPathMap[t+i.toString()];)i++;return t=t+i.toString(),this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t},t}();n.RequestPrettyPrinter=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.cannotRegisterEvent="CannotRegisterEvent",n.connectionFailureWithStatus="ConnectionFailureWithStatus",n.connectionFailureWithDetails="ConnectionFailureWithDetails",n.invalidObjectPath="InvalidObjectPath",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.invalidArgumentGeneric="InvalidArgumentGeneric",n.propertyNotLoaded="PropertyNotLoaded",n.runMustReturnPromise="RunMustReturnPromise",n.timeout="Timeout",n.propertyDoesNotExist="PropertyDoesNotExist",n.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",n.moreInfoInnerError="MoreInfoInnerError",n.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",n.valueNotLoaded="ValueNotLoaded",n.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage",n.invalidOperationInCellEditMode="InvalidOperationInCellEditMode",n.customFunctionDefintionMissing="CustomFunctionDefintionMissing",n.customFunctionImplementationMissing="CustomFunctionImplementationMissing",n.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars",n.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit",n.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch",n.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing",n.apiNotFoundDetails="ApiNotFoundDetails",n}();n.ResourceStrings=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.CannotRegisterEvent="The event handler cannot be registered.",n.ConnectionFailureWithStatus="The request failed with status code of {0}.",n.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}",n.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",n.InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',n.InvalidRequestContext="Cannot use the object across different request contexts.",n.PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",n.RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',n.Timeout="The operation has timed out.",n.ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.',n.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.",n.InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.",n.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions.",n.CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.",n.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods.",n.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name.",n.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.",n.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.",n.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.",n}();n.ResourceStringValues=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.buildMessageArrayForIRequestExecutor=function(i,r,u,f){var o=JSON.stringify(u.Body),e;return n.Utility.log("Request:"),n.Utility.log(o),e={},e[n.Constants.sourceLibHeader]=f,t.buildRequestMessageSafeArray(i,r,"POST","ProcessQuery",e,o)},t.buildResponseOnSuccess=function(n,t){var i={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return i.Body=JSON.parse(n),i.Headers=t,i},t.buildResponseOnError=function(i,r){var u={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return u.ErrorCode=n.ErrorCodes.generalException,u.ErrorMessage=r,i==t.OfficeJsErrorCode_ooeNoCapability?u.ErrorCode=n.ErrorCodes.accessDenied:i==t.OfficeJsErrorCode_ooeActivityLimitReached?u.ErrorCode=n.ErrorCodes.activityLimitReached:i==t.OfficeJsErrorCode_ooeInvalidOrTimedOutSession&&(u.ErrorCode=n.ErrorCodes.invalidOrTimedOutSession,u.ErrorMessage=n.Utility._getResourceString(n.ResourceStrings.invalidOrTimedOutSessionMessage)),u},t.buildHttpResponseFromOfficeJsError=function(i,r){var f=500,u={};return u.error={},u.error.code=n.ErrorCodes.generalException,u.error.message=r,i===t.OfficeJsErrorCode_ooeNoCapability?(f=403,u.error.code=n.ErrorCodes.accessDenied):i===t.OfficeJsErrorCode_ooeActivityLimitReached&&(f=429,u.error.code=n.ErrorCodes.activityLimitReached),{statusCode:f,headers:{},body:JSON.stringify(u)}},t.buildRequestMessageSafeArray=function(n,t,i,r,u,f){var e=[],o;if(u)for(o in u)e.push(o),e.push(u[o]);var s=0,h="",c="",l="";return[n,i,r,e,f,s,t,h,c,l]},t.getResponseBody=function(n){return t.getResponseBodyFromSafeArray(n.value.data)},t.getResponseHeaders=function(n){return t.getResponseHeadersFromSafeArray(n.value.data)},t.getResponseBodyFromSafeArray=function(n){var t=n[2],i;return typeof t=="string"?t:(i=t,i.join(""))},t.getResponseHeadersFromSafeArray=function(n){var i=n[1],r,t;if(!i)return null;for(r={},t=0;t0&&f.push(i);return f},t.toJson=function(n,t,i,r){var e={},u,f;for(u in t)f=t[u],typeof f!="undefined"&&(e[u]=f);for(u in i)f=i[u],typeof f!="undefined"&&(e[u]=f.toJSON());return r&&(e.items=r.map(function(n){return n.toJSON()})),e},t.throwError=function(i,r,u){throw new n._Internal.RuntimeError({code:i,message:t._getResourceString(i,r),debugInfo:u?{errorLocation:u}:undefined});},t.createRuntimeError=function(t,i,r){return new n._Internal.RuntimeError({code:t,message:i,debugInfo:{errorLocation:r}})},t._getResourceString=function(i,r){var u,e,f,o;return typeof window!="undefined"&&window.Strings&&window.Strings.OfficeOM&&(e="L_"+i,f=window.Strings.OfficeOM[e],f&&(u=f)),u||(u=n.ResourceStringValues[i]),u||(u=i),t.isNullOrUndefined(r)||(Array.isArray(r)?(o=r,u=t._formatString(u,o)):u=u.replace("{0}",r)),u},t._formatString=function(t,i){return t.replace(/\{\d\}/g,function(t){var r=parseInt(t.substr(1,t.length-2));if(r0?".":"")+i;break;case 3:i=t.normalizeName(n.objectPathInfo.Name)+"()"+(i.length>0?".":"")+i;break;case 4:i=t.normalizeName(n.objectPathInfo.Name)+(i.length>0?".":"")+i;break;case 5:i="getItem()"+(i.length>0?".":"")+i;break;case 6:i="_reference()"+(i.length>0?".":"")+i;break}n=n.parentObjectPath}return i},t._createPromiseFromResult=function(t){return new n._Internal.OfficePromise(function(n,i){n(t)})},t._createTimeoutPromise=function(t){return new n._Internal.OfficePromise(function(n,i){setTimeout(function(){n(null)},t)})},t.promisify=function(t){return new n._Internal.OfficePromise(function(n,i){var r=function(t){t.status=="failed"?i(t.error):n(t.value)};t(r)})},t._addActionResultHandler=function(n,t,i){n.context._pendingRequest.addActionResultHandler(t,i)},t._handleNavigationPropertyResults=function(n,i,r){for(var u=0;u0},t._getLocalDocumentUrlPrefixLength=function(n){for(var i=["http://document.localhost","https://document.localhost","//document.localhost"],r=n.toLowerCase().trim(),t=0;t0))for(s=i.url.substr(f+1),e=s.split("&"),u=0;u0&&(f=i.substr(0,u),e=i.substr(u+1),f=t.trim(f),e=t.trim(e),s[f.toUpperCase()]=e));return s},t._parseErrorResponse=function(i){var r=null,f,e,u;if(t.isPlainJsonObject(i.body))r=i.body;else if(!t.isNullOrEmptyString(i.body)){f=t.trim(i.body);try{r=JSON.parse(f)}catch(o){t.log("Error when parse "+f)}}return!t.isNullOrUndefined(r)&&typeof r=="object"&&r.error?(u=r.error.code,e=t._getResourceString(n.ResourceStrings.connectionFailureWithDetails,[i.statusCode.toString(),r.error.code,r.error.message])):e=t._getResourceString(n.ResourceStrings.connectionFailureWithStatus,i.statusCode.toString()),t.isNullOrEmptyString(u)&&(u=n.ErrorCodes.connectionFailure),{errorCode:u,errorMessage:e}},t._copyHeaders=function(n,t){if(n&&t)for(var i in n)t[i]=n[i]},t._toCamelLowerCase=function(n){if(t.isNullOrEmptyString(n))return n;for(var i=0;i=65&&n.charCodeAt(i)<=90;)i++;return i 6 && v.slice(0, 5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) { + d=new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + } + else { + value=Sys.Serialization.JavaScriptSerializer.deserialize(value, true); + } + ret[key]=value; + } + catch (ex) { + } + } + return ret; + }, loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) { if (url && callback) { var doc=window.document; @@ -835,6 +885,14 @@ OSF.OUtil=(function () { } } }, + removeClass: function OSF_OUtil$removeClass(elmt, val) { + if (OSF.OUtil.hasClass(elmt, val)) { + var className=elmt.getAttribute(_classN); + var reg=new RegExp('(\\s|^)'+val+'(\\s|$)'); + className=className.replace(reg, ''); + elmt.setAttribute(_classN, className); + } + }, hasClass: function OSF_OUtil$hasClass(elmt, clsName) { var className=elmt.getAttribute(_classN); return className && className.match(new RegExp('(\\s|^)'+clsName+'(\\s|$)')); @@ -971,6 +1029,12 @@ OSF.OUtil.Guid=(function () { })(); window.OSF=OSF; OSF.OUtil.setNamespace("OSF", window); +OSF.MessageIDs={ + "FetchBundleUrl": 0, + "LoadReactBundle": 1, + "LoadBundleSuccess": 2, + "LoadBundleError": 3 +}; OSF.AppName={ Unsupported: 0, Excel: 1, @@ -1029,7 +1093,9 @@ OSF.AgaveHostAction={ "EscExit": 15, "F2Exit": 16, "ExitNoFocusable": 17, - "ExitNoFocusableShift": 18 + "ExitNoFocusableShift": 18, + "MouseEnter": 19, + "MouseLeave": 20 }; OSF.SharedConstants={ "NotificationConversationIdSuffix": '_ntf' @@ -1165,6 +1231,8 @@ Microsoft.Office.WebExtension.Parameters={ HostType: "hostType", ForceConsent: "forceConsent", ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + Reserved: "reserved", Xml: "xml", Namespace: "namespace", Prefix: "prefix", @@ -1197,6 +1265,7 @@ Microsoft.Office.WebExtension.Parameters={ DisplayInIframe: "displayInIframe", MessageContent: "messageContent", HideTitle: "hideTitle", + UseDeviceIndependentPixels: "useDeviceIndependentPixels", AppCommandInvocationCompletedData: "appCommandInvocationCompletedData" }; OSF.OUtil.setNamespace("DDA", OSF); @@ -1254,6 +1323,7 @@ OSF.DDA.MethodDispId={ dispidAppCommandInvocationCompletedMethod: 94, dispidCloseContainerMethod: 97, dispidGetAccessTokenMethod: 98, + dispidOpenBrowserWindow: 102, dispidGetSelectedTaskMethod: 110, dispidGetSelectedResourceMethod: 111, dispidGetTaskMethod: 112, @@ -1312,6 +1382,8 @@ OSF.DDA.EventDispId={ dispidRichApiMessageEvent: 33, dispidAppCommandInvokedEvent: 39, dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, dispidTaskSelectionChangedEvent: 56, dispidResourceSelectionChangedEvent: 57, dispidViewSelectionChangedEvent: 58, @@ -1443,7 +1515,9 @@ OSF.DDA.ErrorCodeManager=(function () { ooeSSOInvalidGrant: 13005, ooeSSOClientError: 13006, ooeSSOServerError: 13007, - ooeAddinIsAlreadyRequestingToken: 13008 + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009, + ooeSSOConnectionLost: 13010 }, initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={ name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotSupported }; @@ -1541,6 +1615,8 @@ OSF.DDA.ErrorCodeManager=(function () { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={ name: stringNS.L_SSOClientError, message: stringNS.L_SSOClientErrorMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={ name: stringNS.L_SSOServerError, message: stringNS.L_SSOServerErrorMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={ name: stringNS.L_AddinIsAlreadyRequestingToken, message: stringNS.L_AddinIsAlreadyRequestingTokenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={ name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={ name: stringNS.L_SSOConnectionLostError, message: stringNS.L_SSOConnectionLostErrorMessage }; } }; })(); @@ -3020,6 +3096,7 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, "ExecuteRichApiRequestAsync": did.dispidExecuteRichApiRequestMethod, "AppCommandInvocationCompletedAsync": did.dispidAppCommandInvocationCompletedMethod, "CloseContainerAsync": did.dispidCloseContainerMethod, + "OpenBrowserWindow": did.dispidOpenBrowserWindow, "AddDataPartAsync": did.dispidAddDataPartMethod, "GetDataPartByIdAsync": did.dispidGetDataPartByIdMethod, "GetDataPartsByNameSpaceAsync": did.dispidGetDataPartsByNamespaceMethod, @@ -3059,13 +3136,13 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, } jsom=OSF.DDA.SyncMethodNames; did=OSF.DDA.MethodDispId; - var asyncMethodMap={ + var syncMethodMap={ "MessageParent": did.dispidMessageParentMethod, "SendMessage": did.dispidSendMessageMethod }; - for (var method in asyncMethodMap) { + for (var method in syncMethodMap) { if (jsom[method]) { - dispIdMap[jsom[method].id]=asyncMethodMap[method]; + dispIdMap[jsom[method].id]=syncMethodMap[method]; } } jsom=Microsoft.Office.WebExtension.EventType; @@ -3087,6 +3164,8 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, "ContentControlAdded": did.dispidContentControlAddedEvent, "RichApiMessage": did.dispidRichApiMessageEvent, "ItemChanged": did.dispidOlkItemSelectedChangedEvent, + "RecipientsChanged": did.dispidOlkRecipientsChangedEvent, + "AppointmentTimeChanged": did.dispidOlkAppointmentTimeChangedEvent, "TaskSelectionChanged": did.dispidTaskSelectionChangedEvent, "ResourceSelectionChanged": did.dispidResourceSelectionChangedEvent, "ViewSelectionChanged": did.dispidViewSelectionChangedEvent, @@ -3162,6 +3241,7 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, else { hostCallArgs=callArgs; } + var startTime=(new Date()).getTime(); delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ "dispId": dispId, "hostCallArgs": hostCallArgs, @@ -3182,6 +3262,9 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, } var payload=asyncMethodCall.processResponse(status, responseArgs, caller, callArgs); OSF.DDA.issueAsyncResult(callArgs, status, payload); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(dispId, hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); + } } }); } @@ -3475,12 +3558,44 @@ OSF.ShowWindowDialogParameterKeys={ Width: "width", Height: "height", DisplayInIframe: "displayInIframe", - HideTitle: "hideTitle" + HideTitle: "hideTitle", + UseDeviceIndependentPixels: "useDeviceIndependentPixels" }; OSF.HostThemeButtonStyleKeys={ ButtonBorderColor: "buttonBorderColor", ButtonBackgroundColor: "buttonBackgroundColor" }; +OSF.OmexPageParameterKeys={ + AppName: "client", + AppVersion: "cv", + AppUILocale: "ui", + AppDomain: "appDomain", + StoreLocator: "rs", + AssetId: "assetid", + NotificationType: "notificationType", + AppCorrelationId: "corr", + AuthType: "authType" +}; +OSF.AuthType={ + Anonymous: 0, + MSA: 1, + OrgId: 2, + ADAL: 3 +}; +OSF.OmexMessageKeys={ + MessageType: "messageType", + MessageValue: "messageValue" +}; +OSF.OmexRemoveAddinMessageKeys={ + RemoveAddinResultCode: "resultCode", + RemoveAddinResultValue: "resultValue" +}; +OSF.OmexRemoveAddinResultCode={ + Success: 0, + ClientError: 400, + ServerError: 500, + UnknownError: 600 +}; var OfficeExt; (function (OfficeExt) { var WACUtils; @@ -3542,6 +3657,38 @@ var OfficeExt; return url_parser.protocol+"//"+url_parser.host; } WACUtils.getDomainForUrl=getDomainForUrl; + function shouldUseLocalStorageToPassMessage() { + try { + var osList=[ + "Windows NT 6.1", + "Windows NT 6.2", + "Windows NT 6.3" + ]; + var userAgent=window.navigator.userAgent; + for (var i=0, len=osList.length; i < len; i++) { + if (userAgent.indexOf(osList[i]) > -1) { + return isInternetExplorer(); + } + } + return false; + } + catch (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("Error happens in shouldUseLocalStorageToPassMessage: "+e); + return false; + } + } + WACUtils.shouldUseLocalStorageToPassMessage=shouldUseLocalStorageToPassMessage; + function isInternetExplorer() { + try { + var userAgent=window.navigator.userAgent; + return userAgent.indexOf("MSIE ") > -1 || userAgent.indexOf("Trident/") > -1 || userAgent.indexOf("Edge/") > -1; + } + catch (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("Error happens in isInternetExplorer: "+e); + return false; + } + } + WACUtils.isInternetExplorer=isInternetExplorer; })(WACUtils=OfficeExt.WACUtils || (OfficeExt.WACUtils={})); })(OfficeExt || (OfficeExt={})); var OfficeExt; @@ -3924,6 +4071,14 @@ var OfficeExt; OSF.OUtil.setNamespace("Microsoft", window); OSF.OUtil.setNamespace("Office", Microsoft); OSF.OUtil.setNamespace("Common", Microsoft.Office); +Microsoft.Office.Common.InvokeType={ + "async": 0, + "sync": 1, + "asyncRegisterEvent": 2, + "asyncUnregisterEvent": 3, + "syncRegisterEvent": 4, + "syncUnregisterEvent": 5 +}; OSF.SerializerVersion={ MsAjax: 0, Browser: 1 @@ -4859,7 +5014,6 @@ OSF.DDA.WAC.Delegate.executeAsync=function OSF_DDA_WAC_Delegate$executeAsync(arg if (args.onCalling) { args.onCalling(); } - var startTime=(new Date()).getTime(); if (!OSF.getClientEndPoint()) { return; } @@ -4885,9 +5039,6 @@ OSF.DDA.WAC.Delegate.executeAsync=function OSF_DDA_WAC_Delegate$executeAsync(arg if (args.onComplete) { args.onComplete(error, payload); } - if (OSF.AppTelemetry) { - OSF.AppTelemetry.onMethodDone(args.dispId, args.hostCallArgs, Math.abs((new Date()).getTime() - startTime), error); - } }, args.hostCallArgs); }; OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent=function OSF_DDA_WAC_Delegate$GetOnAfterRegisterEvent(register, args) { @@ -5812,7 +5963,7 @@ var OSFAriaLogger; function AriaLogger() { } AriaLogger.prototype.getAriaCDNLocation=function () { - return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry-2.8.0.min.js"); + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry.js"); }; AriaLogger.getInstance=function () { if (AriaLogger.AriaLoggerObj===undefined) { @@ -5829,13 +5980,10 @@ var OSFAriaLogger; try { if (!this.ALogger) { var OfficeExtensibilityTenantID="db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; - var configuration=new microsoft.applications.telemetry.LogConfiguration(); - configuration.enableAutoUserSession=true; - microsoft.applications.telemetry.LogManager.initialize(OfficeExtensibilityTenantID, configuration); - this.ALogger=new microsoft.applications.telemetry.Logger(); + this.ALogger=AWTLogManager.initialize(OfficeExtensibilityTenantID); } - var eventProperties=new microsoft.applications.telemetry.EventProperties(); - eventProperties.name="Office.Extensibility.OfficeJS."+tableName; + var eventProperties=new AWTEventProperties(); + eventProperties.setName("Office.Extensibility.OfficeJS."+tableName); for (var key in telemetryData) { if (key.toLowerCase() !=="table") { eventProperties.setProperty(key, telemetryData[key]); @@ -5868,6 +6016,7 @@ var OSFAppTelemetry; var sessionId=OSF.OUtil.Guid.generateNewGuid(); var osfControlAppCorrelationId=""; var omexDomainRegex=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"); + OSFAppTelemetry.enableTelemetry=true; ; var AppInfo=(function () { function AppInfo() { @@ -5951,17 +6100,19 @@ var OSFAppTelemetry; function AppLogger() { } AppLogger.prototype.LogData=function (data) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, data.SerializeRow(), OSF.Logger.SendFlag.none); - OSFAriaLogger.AriaLogger.getInstance().logData(data); + try { + OSFAriaLogger.AriaLogger.getInstance().logData(data); + } + catch (e) { + } }; AppLogger.prototype.LogRawData=function (log) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, log, OSF.Logger.SendFlag.none); try { OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)); } @@ -6001,7 +6152,7 @@ var OSFAppTelemetry; } appInfo.message=context.get_hostCustomMessage(); appInfo.officeJSVersion=OSF.ConstantNames.FileVersion; - appInfo.hostJSVersion="16.0.8208.1000"; + appInfo.hostJSVersion="16.0.8828.1000"; if (context._wacHostEnvironment) { appInfo.wacHostEnvironment=context._wacHostEnvironment; } @@ -6685,10 +6836,28 @@ OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEve args=new OSF.DDA.DialogParentEventArgs(eventProperties); break; case Microsoft.Office.WebExtension.EventType.ItemChanged: - if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlookwebapp") { + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { args=new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); target.initialize(args["initialData"]); - target.setCurrentItemNumber(args["itemNumber"].itemNumber); + if (OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]=="win32") { + target.setCurrentItemNumber(args["itemNumber"].itemNumber); + } + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { + args=new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { + args=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); } else { throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); @@ -6785,7 +6954,10 @@ OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { DataNodeDeleted: "nodeDeleted", DataNodeInserted: "nodeInserted", - DataNodeReplaced: "nodeReplaced" + DataNodeReplaced: "nodeReplaced", + NodeDeleted: "nodeDeleted", + NodeInserted: "nodeInserted", + NodeReplaced: "nodeReplaced" }); OSF.DDA.CustomXmlParts=function OSF_DDA_CustomXmlParts() { this._eventDispatches=[]; @@ -7567,52 +7739,10 @@ OSF.DDA.SettingsManager={ DateJSONPrefix: "Date(", DataJSONSuffix: ")", serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) { - var ret={}; - for (var key in settingsCollection) { - var value=settingsCollection[key]; - try { - if (JSON) { - value=JSON.stringify(value, function dateReplacer(k, v) { - return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix+this[k].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix : v; - }); - } - else { - value=Sys.Serialization.JavaScriptSerializer.serialize(value); - } - ret[key]=value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.serializeSettings(settingsCollection); }, deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) { - var ret={}; - serializedSettings=serializedSettings || {}; - for (var key in serializedSettings) { - var value=serializedSettings[key]; - try { - if (JSON) { - value=JSON.parse(value, function dateReviver(k, v) { - var d; - if (typeof v==='string' && v && v.length > 6 && v.slice(0, 5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) { - d=new Date(parseInt(v.slice(5, -1))); - if (d) { - return d; - } - } - return v; - }); - } - else { - value=Sys.Serialization.JavaScriptSerializer.deserialize(value, true); - } - ret[key]=value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.deserializeSettings(serializedSettings); } }; OSF.DDA.Settings=function OSF_DDA_Settings(settings) { @@ -8462,6 +8592,13 @@ OSF.DDA.AsyncMethodCalls.define({ "types": ["boolean"], "defaultValue": false } + }, + { + name: Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels, + value: { + "types": ["boolean"], + "defaultValue": false + } } ], privateStateCallbacks: [], @@ -8499,13 +8636,13 @@ OSF.DDA.AsyncMethodCalls.define({ if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] <=0) { callArgs[Microsoft.Office.WebExtension.Parameters.Width]=1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Width]=99; } if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] <=0) { callArgs[Microsoft.Office.WebExtension.Parameters.Height]=1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Height]=99; } if (!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) { @@ -8689,6 +8826,7 @@ var OfficeExt; var showDialogCallback=null; var hasCrossZoneNotification=false; var checkWindowDialogCloseInterval=-1; + var messageParentKey="messageParentKey"; var hostThemeButtonStyle=null; var commonButtonBorderColor="#ababab"; var commonButtonBackgroundColor="#ffffff"; @@ -8697,6 +8835,7 @@ var OfficeExt; var crossZoneNotificationId="crossZoneNotification"; var configureBrowserLinkId="configureBrowserLink"; var dialogNotificationTextPanelId="dialogNotificationTextPanel"; + var shouldUseLocalStorageToPassMessage=OfficeExt.WACUtils.shouldUseLocalStorageToPassMessage(); var registerDialogNotificationShownArgs={ "dispId": OSF.DDA.EventDispId.dispidDialogNotificationShownInAddinEvent, "eventType": OSF.DDA.Marshaling.DialogNotificationShownEventType.DialogNotificationShown, @@ -8814,7 +8953,12 @@ var OfficeExt; if (windowInstance !=null && !windowInstance.closed) { windowInstance.close(); } - window.removeEventListener("message", receiveMessage); + if (shouldUseLocalStorageToPassMessage) { + window.removeEventListener("storage", storageChangedHandler); + } + else { + window.removeEventListener("message", receiveMessage); + } window.clearInterval(checkWindowDialogCloseInterval); windowInstance=null; callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); @@ -8833,10 +8977,23 @@ var OfficeExt; Dialog.closeDialog=closeDialog; function messageParent(params) { var message=params.hostCallArgs[Microsoft.Office.WebExtension.Parameters.MessageToParent]; - var appDomains=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains; - if (appDomains) { - for (var i=0; i < appDomains.length && appDomains[i].indexOf("://") !==-1; i++) { - window.opener.postMessage(message, appDomains[i]); + if (shouldUseLocalStorageToPassMessage) { + try { + var messageKey=OSF._OfficeAppFactory.getInitializationHelper()._webAppState.id+messageParentKey; + window.localStorage.setItem(messageKey, message); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Error happened during messageParent method:"+e); + } + } + } + else { + var appDomains=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains; + if (appDomains) { + for (var i=0; i < appDomains.length && appDomains[i].indexOf("://") !==-1; i++) { + window.opener.postMessage(message, appDomains[i]); + } } } } @@ -8957,6 +9114,22 @@ var OfficeExt; } } } + function storageChangedHandler(event) { + var messageKey=OSF._OfficeAppFactory.getInitializationHelper()._webAppState.id+messageParentKey; + if (event.key==messageKey) { + try { + var dialogMessageReceivedArgs={}; + dialogMessageReceivedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogMessageReceived; + dialogMessageReceivedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent]=event.newValue; + handler(dialogMessageReceivedArgs); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Error happened during storage changed handler."+e); + } + } + } + } function showDialog(dialogInfo) { var hostInfoObj=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo; var hostInfoVals=[ @@ -8987,12 +9160,22 @@ var OfficeExt; showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone); return; } - window.addEventListener("message", receiveMessage); + if (shouldUseLocalStorageToPassMessage) { + window.addEventListener("storage", storageChangedHandler); + } + else { + window.addEventListener("message", receiveMessage); + } function checkWindowClose() { try { if (windowInstance==null || windowInstance.closed) { window.clearInterval(checkWindowDialogCloseInterval); - window.removeEventListener("message", receiveMessage); + if (shouldUseLocalStorageToPassMessage) { + window.removeEventListener("storage", storageChangedHandler); + } + else { + window.removeEventListener("message", receiveMessage); + } var dialogClosedArgs={}; dialogClosedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogClosed; handler(dialogClosedArgs); @@ -9184,7 +9367,14 @@ OSF.DDA.WAC.Delegate.openDialog=function OSF_DDA_WAC_Delegate$OpenDialog(args) { var callback=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(true, args); function showDialogCallback(status) { var payload={ "Error": status }; - callback(Microsoft.Office.Common.InvokeResultCode.noError, payload); + try { + callback(Microsoft.Office.Common.InvokeResultCode.noError, payload); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Exception happens at showDialogCallback."+e); + } + } } if (OSF.DialogShownStatus.hasDialogShown) { showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened); @@ -9239,7 +9429,14 @@ OSF.DDA.WAC.Delegate.closeDialog=function OSF_DDA_WAC_Delegate$CloseDialog(args) var callback=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(false, args); function closeDialogCallback(status) { var payload={ "Error": status }; - callback(Microsoft.Office.Common.InvokeResultCode.noError, payload); + try { + callback(Microsoft.Office.Common.InvokeResultCode.noError, payload); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Exception happens at closeDialogCallback."+e); + } + } } if (!OSF.DialogShownStatus.hasDialogShown) { closeDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeWebDialogClosed); @@ -9339,9 +9536,10 @@ var __extends=(this && this.__extends) || function (d, b) { var OfficeExtension; (function (OfficeExtension) { var Action=(function () { - function Action(actionInfo, isWriteOperation) { + function Action(actionInfo, isWriteOperation, isRestrictedResourceAccess) { this.m_actionInfo=actionInfo; this.m_isWriteOperation=isWriteOperation; + this.m_isRestrictedResourceAccess=isRestrictedResourceAccess; } Object.defineProperty(Action.prototype, "actionInfo", { get: function () { @@ -9357,12 +9555,30 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(Action.prototype, "isRestrictedResourceAccess", { + get: function () { + return this.m_isRestrictedResourceAccess; + }, + enumerable: true, + configurable: true + }); return Action; }()); OfficeExtension.Action=Action; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + var TraceMarkerActionResultHandler=(function () { + function TraceMarkerActionResultHandler(callback) { + this.m_callback=callback; + } + TraceMarkerActionResultHandler.prototype._handleResult=function (value) { + if (this.m_callback) { + this.m_callback(); + } + }; + return TraceMarkerActionResultHandler; + }()); var ActionFactory=(function () { function ActionFactory() { } @@ -9378,13 +9594,17 @@ var OfficeExtension; var args=[value]; var referencedArgumentObjectPaths=OfficeExtension.Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); OfficeExtension.Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); - var ret=new OfficeExtension.Action(actionInfo, true); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + context._pendingRequest.ensureInstantiateObjectPaths(referencedArgumentObjectPaths); + var ret=new OfficeExtension.Action(actionInfo, true, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); context._pendingRequest.addReferencedObjectPaths(referencedArgumentObjectPaths); + ret.referencedObjectPath=parent._objectPath; + ret.referencedArgumentObjectPaths=referencedArgumentObjectPaths; return ret; }; - ActionFactory.createMethodAction=function (context, parent, methodName, operationType, args) { + ActionFactory.createMethodAction=function (context, parent, methodName, operationType, args, isRestrictedResourceAccess) { OfficeExtension.Utility.validateObjectPath(parent); var actionInfo={ Id: context._nextId(), @@ -9395,15 +9615,20 @@ var OfficeExtension; }; var referencedArgumentObjectPaths=OfficeExtension.Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); OfficeExtension.Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + context._pendingRequest.ensureInstantiateObjectPaths(referencedArgumentObjectPaths); var isWriteOperation=operationType !=1; - var ret=new OfficeExtension.Action(actionInfo, isWriteOperation); + var ret=new OfficeExtension.Action(actionInfo, isWriteOperation, isRestrictedResourceAccess); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); context._pendingRequest.addReferencedObjectPaths(referencedArgumentObjectPaths); + ret.referencedObjectPath=parent._objectPath; + ret.referencedArgumentObjectPaths=referencedArgumentObjectPaths; return ret; }; ActionFactory.createQueryAction=function (context, parent, queryOption) { OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); var actionInfo={ Id: context._nextId(), ActionType: 2, @@ -9411,13 +9636,15 @@ var OfficeExtension; ObjectPathId: parent._objectPath.objectPathInfo.Id, }; actionInfo.QueryInfo=queryOption; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; return ret; }; ActionFactory.createRecursiveQueryAction=function (context, parent, query) { OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); var actionInfo={ Id: context._nextId(), ActionType: 6, @@ -9425,23 +9652,59 @@ var OfficeExtension; ObjectPathId: parent._objectPath.objectPathInfo.Id, RecursiveQueryInfo: query }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; + return ret; + }; + ActionFactory.createQueryAsJsonAction=function (context, parent, queryOption) { + OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + var actionInfo={ + Id: context._nextId(), + ActionType: 7, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + }; + actionInfo.QueryInfo=queryOption; + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; + return ret; + }; + ActionFactory.createEnsureUnchangedAction=function (context, parent, objectState) { + OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + var actionInfo={ + Id: context._nextId(), + ActionType: 8, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }; + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; return ret; }; ActionFactory.createInstantiateAction=function (context, obj) { OfficeExtension.Utility.validateObjectPath(obj); + context._pendingRequest.ensureInstantiateObjectPath(obj._objectPath.parentObjectPath); + context._pendingRequest.ensureInstantiateObjectPaths(obj._objectPath.argumentObjectPaths); var actionInfo={ Id: context._nextId(), ActionType: 1, Name: "", ObjectPathId: obj._objectPath.objectPathInfo.Id }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(obj._objectPath); context._pendingRequest.addActionResultHandler(ret, new OfficeExtension.InstantiateActionResultHandler(obj)); + ret.referencedObjectPath=obj._objectPath; return ret; }; ActionFactory.createTraceAction=function (context, message, addTraceMessage) { @@ -9451,13 +9714,17 @@ var OfficeExtension; Name: "Trace", ObjectPathId: 0 }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); if (addTraceMessage) { context._pendingRequest.addTrace(actionInfo.Id, message); } return ret; }; + ActionFactory.createTraceMarkerForCallback=function (context, callback) { + var action=ActionFactory.createTraceAction(context, null, false); + context._pendingRequest.addActionResultHandler(action, new TraceMarkerActionResultHandler(callback)); + }; return ActionFactory; }()); OfficeExtension.ActionFactory=ActionFactory; @@ -9535,6 +9802,7 @@ var OfficeExtension; }; ClientObject.prototype._recursivelySet=function (input, options, scalarWriteablePropertyNames, objectPropertyNames, notAllowedToBeSetPropertyNames) { var isClientObject=(input instanceof ClientObject); + var originalInput=input; if (isClientObject) { if (Object.getPrototypeOf(this)===Object.getPrototypeOf(input)) { input=JSON.parse(JSON.stringify(input)); @@ -9551,31 +9819,38 @@ var OfficeExtension; for (var i=0; i < scalarWriteablePropertyNames.length; i++) { prop=scalarWriteablePropertyNames[i]; if (input.hasOwnProperty(prop)) { - this[prop]=input[prop]; + if (typeof input[prop] !=="undefined") { + this[prop]=input[prop]; + } } } for (var i=0; i < objectPropertyNames.length; i++) { prop=objectPropertyNames[i]; if (input.hasOwnProperty(prop)) { - this[prop].set(input[prop], options); + if (typeof input[prop] !=="undefined") { + var dataToPassToSet=isClientObject ? originalInput[prop] : input[prop]; + this[prop].set(dataToPassToSet, options); + } } } + var throwOnReadOnly=!isClientObject; + if (options && !OfficeExtension.Utility.isNullOrUndefined(throwOnReadOnly)) { + throwOnReadOnly=options.throwOnReadOnly; + } for (var i=0; i < notAllowedToBeSetPropertyNames.length; i++) { prop=notAllowedToBeSetPropertyNames[i]; if (input.hasOwnProperty(prop)) { - throw new OfficeExtension._Internal.RuntimeError({ - code: OfficeExtension.ErrorCodes.invalidArgument, - message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), - debugInfo: { - errorLocation: prop - } - }); + if (typeof input[prop] !=="undefined" && throwOnReadOnly) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.invalidArgument, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), + debugInfo: { + errorLocation: prop + } + }); + } } } - var throwOnReadOnly=!isClientObject; - if (options && !OfficeExtension.Utility.isNullOrUndefined(throwOnReadOnly)) { - throwOnReadOnly=options.throwOnReadOnly; - } for (prop in input) { if (scalarWriteablePropertyNames.indexOf(prop) < 0 && objectPropertyNames.indexOf(prop) < 0) { var propertyDescriptor=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this), prop); @@ -9623,12 +9898,14 @@ var OfficeExtension; this.m_actions=[]; this.m_actionResultHandler={}; this.m_referencedObjectPaths={}; + this.m_instantiatedObjectPaths={}; this.m_flags=0; this.m_traceInfos={}; this.m_pendingProcessEventHandlers=[]; this.m_pendingEventHandlerActions={}; this.m_responseTraceIds={}; this.m_responseTraceMessages=[]; + this.m_preSyncPromises=[]; } Object.defineProperty(ClientRequest.prototype, "flags", { get: function () { @@ -9674,7 +9951,13 @@ var OfficeExtension; if (action.isWriteOperation) { this.m_flags=this.m_flags | 1; } + if (action.isRestrictedResourceAccess) { + this.m_flags=this.m_flags | 2; + } this.m_actions.push(action); + if (action.actionInfo.ActionType==1) { + this.m_instantiatedObjectPaths[action.actionInfo.ObjectPathId]=action; + } }; Object.defineProperty(ClientRequest.prototype, "hasActions", { get: function () { @@ -9683,9 +9966,39 @@ var OfficeExtension; enumerable: true, configurable: true }); + ClientRequest.prototype._getLastAction=function () { + return this.m_actions[this.m_actions.length - 1]; + }; ClientRequest.prototype.addTrace=function (actionId, message) { this.m_traceInfos[actionId]=message; }; + ClientRequest.prototype.ensureInstantiateObjectPath=function (objectPath) { + if (objectPath) { + if (this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + this.ensureInstantiateObjectPath(objectPath.parentObjectPath); + this.ensureInstantiateObjectPaths(objectPath.argumentObjectPaths); + if (!this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + var actionInfo={ + Id: this.m_context._nextId(), + ActionType: 1, + Name: "", + ObjectPathId: objectPath.objectPathInfo.Id + }; + var instantiateAction=new OfficeExtension.Action(actionInfo, false, false); + instantiateAction.referencedObjectPath=objectPath; + this.addAction(instantiateAction); + } + } + }; + ClientRequest.prototype.ensureInstantiateObjectPaths=function (objectPaths) { + if (objectPaths) { + for (var i=0; i < objectPaths.length; i++) { + this.ensureInstantiateObjectPath(objectPaths[i]); + } + } + }; ClientRequest.prototype.addReferencedObjectPath=function (objectPath) { if (this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]) { return; @@ -9703,6 +10016,9 @@ var OfficeExtension; if (objectPath.isWriteOperation) { this.m_flags=this.m_flags | 1; } + if (objectPath.isRestrictedResourceAccess) { + this.m_flags=this.m_flags | 2; + } this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]=objectPath; if (objectPath.objectPathInfo.ObjectPathType==3) { this.addReferencedObjectPaths(objectPath.argumentObjectPaths); @@ -9721,6 +10037,9 @@ var OfficeExtension; this.m_actionResultHandler[action.actionInfo.Id]=resultHandler; }; ClientRequest.prototype.buildRequestMessageBody=function () { + if (OfficeExtension._internalConfig.enableEarlyDispose) { + ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } var objectPaths={}; for (var i in this.m_referencedObjectPaths) { objectPaths[i]=this.m_referencedObjectPaths[i].objectPathInfo; @@ -9771,45 +10090,128 @@ var OfficeExtension; ClientRequest.prototype._getPendingEventHandlerActions=function (eventHandlers) { return this.m_pendingEventHandlerActions[eventHandlers._id]; }; - return ClientRequest; - }()); - OfficeExtension.ClientRequest=ClientRequest; -})(OfficeExtension || (OfficeExtension={})); -var OfficeExtension; -(function (OfficeExtension) { - var SessionBase=(function () { - function SessionBase() { - } - SessionBase.prototype._resolveRequestUrlAndHeaderInfo=function () { - return OfficeExtension.Utility._createPromiseFromResult(null); - }; - SessionBase.prototype._createRequestExecutorOrNull=function () { - return null; + ClientRequest.prototype._addPreSyncPromise=function (value) { + this.m_preSyncPromises.push(value); }; - Object.defineProperty(SessionBase.prototype, "eventRegistration", { + Object.defineProperty(ClientRequest.prototype, "_preSyncPromises", { get: function () { - return OfficeExtension._Internal.officeJsEventRegistration; + return this.m_preSyncPromises; }, enumerable: true, configurable: true }); - return SessionBase; - }()); - OfficeExtension.SessionBase=SessionBase; - var ClientRequestContext=(function () { - function ClientRequestContext(url) { - this.m_customRequestHeaders={}; - this._onRunFinishedNotifiers=[]; - this.m_nextId=0; - if (ClientRequestContext._overrideSession) { - this.m_requestUrlAndHeaderInfoResolver=ClientRequestContext._overrideSession; - } - else { - if (OfficeExtension.Utility.isNullOrUndefined(url) || typeof (url)==="string" && url.length===0) { - url=ClientRequestContext.defaultRequestUrlAndHeaders; - if (!url) { - url={ url: OfficeExtension.Constants.localDocument, headers: {} }; - } + Object.defineProperty(ClientRequest.prototype, "_actions", { + get: function () { + return this.m_actions; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_objectPaths", { + get: function () { + return this.m_referencedObjectPaths; + }, + enumerable: true, + configurable: true + }); + ClientRequest._updateLastUsedActionIdOfObjectPathId=function (lastUsedActionIdOfObjectPathId, objectPath, actionId) { + while (objectPath) { + if (lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]) { + return; + } + lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]=actionId; + var argumentObjectPaths=objectPath.argumentObjectPaths; + if (argumentObjectPaths) { + var argumentObjectPathsLength=argumentObjectPaths.length; + for (var i=0; i < argumentObjectPathsLength; i++) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, argumentObjectPaths[i], actionId); + } + } + objectPath=objectPath.parentObjectPath; + } + }; + ClientRequest._calculateLastUsedObjectPathIds=function (actions) { + var lastUsedActionIdOfObjectPathId={}; + var actionsLength=actions.length; + for (var index=actionsLength - 1; index >=0; --index) { + var action=actions[index]; + var actionId=action.actionInfo.Id; + if (action.referencedObjectPath) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, action.referencedObjectPath, actionId); + } + var referencedObjectPaths=action.referencedArgumentObjectPaths; + if (referencedObjectPaths) { + var referencedObjectPathsLength=referencedObjectPaths.length; + for (var refIndex=0; refIndex < referencedObjectPathsLength; refIndex++) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, referencedObjectPaths[refIndex], actionId); + } + } + } + var lastUsedObjectPathIdsOfAction={}; + for (var key in lastUsedActionIdOfObjectPathId) { + var actionId=lastUsedActionIdOfObjectPathId[key]; + var objectPathIds=lastUsedObjectPathIdsOfAction[actionId]; + if (!objectPathIds) { + objectPathIds=[]; + lastUsedObjectPathIdsOfAction[actionId]=objectPathIds; + } + objectPathIds.push(parseInt(key)); + } + for (var index=0; index < actionsLength; index++) { + var action=actions[index]; + var lastUsedObjectPathIds=lastUsedObjectPathIdsOfAction[action.actionInfo.Id]; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + action.actionInfo.L=lastUsedObjectPathIds; + } + else if (action.actionInfo.L) { + delete action.actionInfo.L; + } + } + }; + return ClientRequest; + }()); + OfficeExtension.ClientRequest=ClientRequest; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + OfficeExtension._internalConfig={ + showDisposeInfoInDebugInfo: false, + enableEarlyDispose: true, + alwaysPolyfillClientObjectRetrieveMethod: false + }; + var SessionBase=(function () { + function SessionBase() { + } + SessionBase.prototype._resolveRequestUrlAndHeaderInfo=function () { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + SessionBase.prototype._createRequestExecutorOrNull=function () { + return null; + }; + Object.defineProperty(SessionBase.prototype, "eventRegistration", { + get: function () { + return OfficeExtension._Internal.officeJsEventRegistration; + }, + enumerable: true, + configurable: true + }); + return SessionBase; + }()); + OfficeExtension.SessionBase=SessionBase; + var ClientRequestContext=(function () { + function ClientRequestContext(url) { + this.m_customRequestHeaders={}; + this._onRunFinishedNotifiers=[]; + this.m_nextId=0; + if (ClientRequestContext._overrideSession) { + this.m_requestUrlAndHeaderInfoResolver=ClientRequestContext._overrideSession; + } + else { + if (OfficeExtension.Utility.isNullOrUndefined(url) || typeof (url)==="string" && url.length===0) { + url=ClientRequestContext.defaultRequestUrlAndHeaders; + if (!url) { + url={ url: OfficeExtension.Constants.localDocument, headers: {} }; + } } if (typeof (url)==="string") { this.m_requestUrlAndHeaderInfo={ url: url, headers: {} }; @@ -9870,6 +10272,15 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(ClientRequestContext.prototype, "debugInfo", { + get: function () { + var prettyPrinter=new OfficeExtension.RequestPrettyPrinter(this._rootObjectPropertyName, this._pendingRequest._objectPaths, this._pendingRequest._actions, OfficeExtension._internalConfig.showDisposeInfoInDebugInfo); + var statements=prettyPrinter.process(); + return { pendingStatements: statements }; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ClientRequestContext.prototype, "trackedObjects", { get: function () { if (!this.m_trackedObjects) { @@ -9889,11 +10300,76 @@ var OfficeExtension; }); ClientRequestContext.prototype.load=function (clientObj, option) { OfficeExtension.Utility.validateContext(this, clientObj); - var queryOption=ClientRequestContext.parseQueryOption(option); + var queryOption=ClientRequestContext._parseQueryOption(option); var action=OfficeExtension.ActionFactory.createQueryAction(this, clientObj, queryOption); this._pendingRequest.addActionResultHandler(action, clientObj); }; - ClientRequestContext.parseQueryOption=function (option) { + ClientRequestContext.isLoadOption=function (loadOption) { + if (!OfficeExtension.Utility.isUndefined(loadOption.select) && (typeof (loadOption.select)==="string" || Array.isArray(loadOption.select))) + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.expand) && (typeof (loadOption.expand)==="string" || Array.isArray(loadOption.expand))) + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.top) && typeof (loadOption.top)==="number") + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.skip) && typeof (loadOption.skip)==="number") + return true; + for (var i in loadOption) { + return false; + } + return true; + }; + ClientRequestContext.parseStrictLoadOption=function (option) { + var ret={ Select: [] }; + ClientRequestContext.parseStrictLoadOptionHelper(ret, "", "option", option); + return ret; + }; + ClientRequestContext.combineQueryPath=function (pathPrefix, key, separator) { + if (pathPrefix.length===0) { + return key; + } + else { + return pathPrefix+separator+key; + } + }; + ClientRequestContext.parseStrictLoadOptionHelper=function (queryInfo, pathPrefix, argPrefix, option) { + for (var key in option) { + var value=option[key]; + if (key==="$all") { + if (typeof (value) !=="boolean") { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + if (value) { + queryInfo.Select.push(ClientRequestContext.combineQueryPath(pathPrefix, "*", "/")); + } + } + else if (key==="$top") { + if (typeof (value) !=="number" || pathPrefix.length > 0) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + queryInfo.Top=value; + } + else if (key==="$skip") { + if (typeof (value) !=="number" || pathPrefix.length > 0) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + queryInfo.Skip=value; + } + else { + if (typeof (value)==="boolean") { + if (value) { + queryInfo.Select.push(ClientRequestContext.combineQueryPath(pathPrefix, key, "/")); + } + } + else if (typeof (value)==="object") { + ClientRequestContext.parseStrictLoadOptionHelper(queryInfo, ClientRequestContext.combineQueryPath(pathPrefix, key, "/"), ClientRequestContext.combineQueryPath(argPrefix, key, "."), value); + } + else { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + } + } + }; + ClientRequestContext._parseQueryOption=function (option) { var queryOption={}; if (typeof (option)=="string") { var select=option; @@ -9902,41 +10378,46 @@ var OfficeExtension; else if (Array.isArray(option)) { queryOption.Select=option; } - else if (typeof (option)=="object") { + else if (typeof (option)==="object") { var loadOption=option; - if (typeof (loadOption.select)=="string") { - queryOption.Select=OfficeExtension.Utility._parseSelectExpand(loadOption.select); - } - else if (Array.isArray(loadOption.select)) { - queryOption.Select=loadOption.select; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.select)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.select"); - } - if (typeof (loadOption.expand)=="string") { - queryOption.Expand=OfficeExtension.Utility._parseSelectExpand(loadOption.expand); - } - else if (Array.isArray(loadOption.expand)) { - queryOption.Expand=loadOption.expand; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.expand)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.expand"); - } - if (typeof (loadOption.top)=="number") { - queryOption.Top=loadOption.top; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.top)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.top"); - } - if (typeof (loadOption.skip)=="number") { - queryOption.Skip=loadOption.skip; + if (ClientRequestContext.isLoadOption(loadOption)) { + if (typeof (loadOption.select)=="string") { + queryOption.Select=OfficeExtension.Utility._parseSelectExpand(loadOption.select); + } + else if (Array.isArray(loadOption.select)) { + queryOption.Select=loadOption.select; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.select)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.select"); + } + if (typeof (loadOption.expand)=="string") { + queryOption.Expand=OfficeExtension.Utility._parseSelectExpand(loadOption.expand); + } + else if (Array.isArray(loadOption.expand)) { + queryOption.Expand=loadOption.expand; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.expand)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.expand"); + } + if (typeof (loadOption.top)==="number") { + queryOption.Top=loadOption.top; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.top)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.top"); + } + if (typeof (loadOption.skip)==="number") { + queryOption.Skip=loadOption.skip; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.skip)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.skip"); + } } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.skip)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.skip"); + else { + queryOption=ClientRequestContext.parseStrictLoadOption(option); } } else if (!OfficeExtension.Utility.isNullOrUndefined(option)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option"); + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option"); } return queryOption; }; @@ -9946,7 +10427,7 @@ var OfficeExtension; } var quries={}; for (var key in options) { - quries[key]=ClientRequestContext.parseQueryOption(options[key]); + quries[key]=ClientRequestContext._parseQueryOption(options[key]); } var action=OfficeExtension.ActionFactory.createRecursiveQueryAction(this, clientObj, { Queries: quries, MaxDepth: maxDepth }); this._pendingRequest.addActionResultHandler(action, clientObj); @@ -9954,6 +10435,8 @@ var OfficeExtension; ClientRequestContext.prototype.trace=function (message) { OfficeExtension.ActionFactory.createTraceAction(this, message, true); }; + ClientRequestContext.prototype._processOfficeJsErrorResponse=function (officeJsErrorCode, response) { + }; ClientRequestContext.prototype.syncPrivateMain=function () { var _this=this; return OfficeExtension.Utility._createPromiseFromResult(null) @@ -9981,13 +10464,14 @@ var OfficeExtension; } }) .then(function () { - return _this.syncPrivate(); + var req=_this._pendingRequest; + _this.m_pendingRequest=null; + return _this.processPreSyncPromises(req) + .then(function () { return _this.syncPrivate(req); }); }); }; - ClientRequestContext.prototype.syncPrivate=function () { + ClientRequestContext.prototype.syncPrivate=function (req) { var _this=this; - var req=this._pendingRequest; - this.m_pendingRequest=null; if (!req.hasActions) { return this.processPendingEventHandlers(req); } @@ -9995,7 +10479,7 @@ var OfficeExtension; var requestFlags=req.flags; if (!this._requestExecutor) { if (OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)) { - this._requestExecutor=new OfficeExtension.OfficeJsRequestExecutor(); + this._requestExecutor=new OfficeExtension.OfficeJsRequestExecutor(this); } else { this._requestExecutor=new OfficeExtension.HttpRequestExecutor(); @@ -10013,8 +10497,10 @@ var OfficeExtension; req.invalidatePendingInvalidObjectPaths(); var errorFromResponse=null; var errorFromProcessEventHandlers=null; + this._lastSyncStart=performance.now(); return requestExecutor.executeAsync(this._customData, requestFlags, requestExecutorRequestMessage) .then(function (response) { + _this._lastSyncEnd=performance.now(); errorFromResponse=_this.processRequestExecutorResponseMessage(req, response); return _this.processPendingEventHandlers(req) .catch(function (ex) { @@ -10061,7 +10547,13 @@ var OfficeExtension; req._setResponseTraceIds(response.Body.TraceIds); } var traceMessages=req._responseTraceMessages; + var errorStatementInfo=null; if (response.Body) { + if (response.Body.Error && + response.Body.Error.ActionIndex >=0) { + var prettyPrinter=new OfficeExtension.RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions); + errorStatementInfo=prettyPrinter.processForDebugStatementInfo(response.Body.Error.ActionIndex); + } var actionResults=null; if (response.Body.Results) { actionResults=response.Body.Results; @@ -10087,13 +10579,18 @@ var OfficeExtension; }); } else if (response.Body && response.Body.Error) { + var debugInfo={ + errorLocation: response.Body.Error.Location + }; + if (errorStatementInfo) { + debugInfo.statement=errorStatementInfo.statement; + debugInfo.surroundingStatements=errorStatementInfo.surroundingStatements; + } return new OfficeExtension._Internal.RuntimeError({ code: response.Body.Error.Code, message: response.Body.Error.Message, traceMessages: traceMessages, - debugInfo: { - errorLocation: response.Body.Error.Location - } + debugInfo: debugInfo }); } return null; @@ -10109,6 +10606,17 @@ var OfficeExtension; ClientRequestContext.prototype.createProcessOneEventHandlersFunc=function (eventHandlers, req) { return function () { return eventHandlers._processRegistration(req); }; }; + ClientRequestContext.prototype.processPreSyncPromises=function (req) { + var ret=OfficeExtension.Utility._createPromiseFromResult(null); + for (var i=0; i < req._preSyncPromises.length; i++) { + var p=req._preSyncPromises[i]; + ret=ret.then(this.createProcessOneProSyncFunc(p)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneProSyncFunc=function (p) { + return function () { return p; }; + }; ClientRequestContext.prototype.sync=function (passThroughValue) { return this.syncPrivateMain().then(function () { return passThroughValue; }); }; @@ -10147,9 +10655,15 @@ var OfficeExtension; batch=receivedRunArgs[argOffset+0]; } else if (receivedRunArgs.length==argOffset+2) { - if (receivedRunArgs[argOffset+0] instanceof OfficeExtension.ClientObject) { + if (OfficeExtension.Utility.isNullOrUndefined(receivedRunArgs[argOffset+0])) { + ctxRetriever=ctxInitializer; + } + else if (receivedRunArgs[argOffset+0] instanceof OfficeExtension.ClientObject) { ctxRetriever=function () { return receivedRunArgs[argOffset+0].context; }; } + else if (receivedRunArgs[argOffset+0] instanceof ClientRequestContext) { + ctxRetriever=function () { return receivedRunArgs[argOffset+0]; }; + } else if (Array.isArray(receivedRunArgs[argOffset+0])) { var array=receivedRunArgs[argOffset+0]; if (array.length==0) { @@ -10315,6 +10829,79 @@ var OfficeExtension; return ClientResult; }()); OfficeExtension.ClientResult=ClientResult; + var RetrieveResult=(function () { + function RetrieveResult(m_proxy, m_shouldPolyfill) { + this.m_proxy=m_proxy; + this.m_shouldPolyfill=m_shouldPolyfill; + } + Object.defineProperty(RetrieveResult.prototype, "proxy", { + get: function () { + return this.m_proxy; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RetrieveResult.prototype, "data", { + get: function () { + if (!this.m_isLoaded) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.valueNotLoaded, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: "retrieveResult.data" + } + }); + } + return this.m_data; + }, + enumerable: true, + configurable: true + }); + RetrieveResult.prototype._handleResult=function (value) { + this.m_isLoaded=true; + if (typeof (value)==="object" && value && value._IsNull) { + this.m_data=null; + return; + } + if (this.m_shouldPolyfill) { + this.m_data=this.changePropertyNameToCamelLowerCase(value); + } + else { + this.m_data=value; + } + }; + RetrieveResult.prototype.changePropertyNameToCamelLowerCase=function (value) { + var charCodeUnderscore=95; + if (Array.isArray(value)) { + var ret=[]; + for (var i=0; i < value.length; i++) { + ret.push(this.changePropertyNameToCamelLowerCase(value[i])); + } + return ret; + } + else if (typeof (value)==="object" && value !==null) { + var ret={}; + for (var key in value) { + var propValue=value[key]; + if (key==="_Items") { + ret={}; + ret["items"]=this.changePropertyNameToCamelLowerCase(propValue); + break; + } + else if (key.charCodeAt(0) !==charCodeUnderscore) { + var propName=OfficeExtension.Utility._toCamelLowerCase(key); + ret[propName]=this.changePropertyNameToCamelLowerCase(propValue); + } + } + return ret; + } + else { + return value; + } + }; + return RetrieveResult; + }()); + OfficeExtension.RetrieveResult=RetrieveResult; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { @@ -10336,6 +10923,9 @@ var OfficeExtension; Constants.sourceLibHeader="SdkVersion"; Constants.embeddingPageOrigin="EmbeddingPageOrigin"; Constants.embeddingPageSessionInfo="EmbeddingPageSessionInfo"; + Constants.eventMessageCategory=65536; + Constants.eventWorkbookId="Workbook"; + Constants.eventSourceRemote="Remote"; return Constants; }()); OfficeExtension.Constants=Constants; @@ -10666,7 +11256,7 @@ var OfficeExtension; debugInfo[key]=partialDebugInfo[key]; } if (this.innerError) { - if (this.innerError instanceof OfficeExtension.Error) { + if (this.innerError instanceof OfficeExtension._Internal.RuntimeError) { debugInfo.innerError=this.innerError.debugInfo; } else { @@ -10751,6 +11341,20 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(EventHandlers.prototype, "_context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_callback", { + get: function () { + return this.m_callback; + }, + enumerable: true, + configurable: true + }); EventHandlers.prototype.add=function (handler) { var action=OfficeExtension.ActionFactory.createTraceAction(this.m_context, null, false); this.m_context._pendingRequest._addPendingEventHandlerAction(this, { id: action.actionInfo.Id, handler: handler, operation: 0 }); @@ -10844,6 +11448,13 @@ var OfficeExtension; this.m_allHandlers=handlers; this.m_handler=handler; } + Object.defineProperty(EventHandlerResult.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); EventHandlerResult.prototype.remove=function () { if (this.m_allHandlers && this.m_handler) { this.m_allHandlers.remove(this.m_handler); @@ -10878,6 +11489,8 @@ var OfficeExtension; return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged, handler, callback); }); case 1: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.settings.addHandlerAsync(Office.EventType.SettingsChanged, handler, callback); }); + case 5: + return OfficeExtension.Utility.promisify(function (callback) { return OSF.DDA.RichApi.richApiMessageManager.addHandlerAsync("richApiMessage", handler, callback); }); case 13: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.ObjectDeleted, handler, { id: targetId }, callback); }); case 14: @@ -10906,6 +11519,8 @@ var OfficeExtension; return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.DocumentSelectionChanged, { handler: handler }, callback); }); case 1: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.settings.removeHandlerAsync(Office.EventType.SettingsChanged, { handler: handler }, callback); }); + case 5: + return OfficeExtension.Utility.promisify(function (callback) { return OSF.DDA.RichApi.richApiMessageManager.removeHandlerAsync("richApiMessage", { handler: handler }, callback); }); case 13: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDeleted, { id: targetId, handler: handler }, callback); }); case 14: @@ -10976,6 +11591,139 @@ var OfficeExtension; OfficeExtension.EventRegistration=EventRegistration; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var GenericEventRegistration=(function () { + function GenericEventRegistration() { + this.m_eventRegistration=new OfficeExtension.EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)); + this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this); + } + GenericEventRegistration.prototype.ready=function () { + var _this=this; + if (!this.m_ready) { + if (GenericEventRegistration._testReadyImpl) { + this.m_ready=GenericEventRegistration._testReadyImpl() + .then(function () { + _this.m_isReady=true; + }); + } + else { + this.m_ready=OfficeExtension._Internal.officeJsEventRegistration.register(5, "", this.m_richApiMessageHandler) + .then(function () { + _this.m_isReady=true; + }); + } + } + return this.m_ready; + }; + Object.defineProperty(GenericEventRegistration.prototype, "isReady", { + get: function () { + return this.m_isReady; + }, + enumerable: true, + configurable: true + }); + GenericEventRegistration.prototype.register=function (eventId, targetId, handler) { + var _this=this; + return this.ready() + .then(function () { return _this.m_eventRegistration.register(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype.unregister=function (eventId, targetId, handler) { + var _this=this; + return this.ready() + .then(function () { return _this.m_eventRegistration.unregister(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype._registerEventImpl=function (eventId, targetId) { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._unregisterEventImpl=function (eventId, targetId) { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._handleRichApiMessage=function (msg) { + if (msg && msg.entries) { + for (var entryIndex=0; entryIndex < msg.entries.length; entryIndex++) { + var entry=msg.entries[entryIndex]; + if (entry.messageCategory==OfficeExtension.Constants.eventMessageCategory) { + if (OfficeExtension.Utility._logEnabled) { + OfficeExtension.Utility.log(JSON.stringify(entry)); + } + var funcs=this.m_eventRegistration.getHandlers(entry.messageType, entry.targetId); + if (funcs.length > 0) { + var arg=JSON.parse(entry.message); + if (entry.isRemoteOverride) { + arg.source=OfficeExtension.Constants.eventSourceRemote; + } + for (var i=0; i < funcs.length; i++) { + funcs[i](arg); + } + } + } + } + } + }; + GenericEventRegistration.getGenericEventRegistration=function () { + if (!GenericEventRegistration.s_genericEventRegistration) { + GenericEventRegistration.s_genericEventRegistration=new GenericEventRegistration(); + } + return GenericEventRegistration.s_genericEventRegistration; + }; + GenericEventRegistration.richApiMessageEventCategory=65536; + return GenericEventRegistration; + }()); + function _testSetRichApiMessageReadyImpl(impl) { + GenericEventRegistration._testReadyImpl=impl; + } + OfficeExtension._testSetRichApiMessageReadyImpl=_testSetRichApiMessageReadyImpl; + function _testTriggerRichApiMessageEvent(msg) { + GenericEventRegistration.getGenericEventRegistration()._handleRichApiMessage(msg); + } + OfficeExtension._testTriggerRichApiMessageEvent=_testTriggerRichApiMessageEvent; + var GenericEventHandlers=(function (_super) { + __extends(GenericEventHandlers, _super); + function GenericEventHandlers(context, parentObject, name, eventInfo) { + _super.call(this, context, parentObject, name, eventInfo); + this.m_genericEventInfo=eventInfo; + } + GenericEventHandlers.prototype.add=function (handler) { + var _this=this; + if ((this._handlers.length==0) && this.m_genericEventInfo.registerFunc) { + this.m_genericEventInfo.registerFunc(); + } + if (!GenericEventRegistration.getGenericEventRegistration().isReady) { + this._context._pendingRequest._addPreSyncPromise(GenericEventRegistration.getGenericEventRegistration().ready()); + } + OfficeExtension.ActionFactory.createTraceMarkerForCallback(this._context, function () { + _this._handlers.push(handler); + if (_this._handlers.length==1) { + GenericEventRegistration.getGenericEventRegistration().register(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + return new OfficeExtension.EventHandlerResult(this._context, this, handler); + }; + GenericEventHandlers.prototype.remove=function (handler) { + var _this=this; + if ((this._handlers.length==1) && this.m_genericEventInfo.unregisterFunc) { + this.m_genericEventInfo.unregisterFunc(); + } + OfficeExtension.ActionFactory.createTraceMarkerForCallback(this._context, function () { + var handlers=_this._handlers; + for (var index=handlers.length - 1; index >=0; index--) { + if (handlers[index]===handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length==0) { + GenericEventRegistration.getGenericEventRegistration().unregister(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + }; + GenericEventHandlers.prototype.removeAll=function () { + }; + return GenericEventHandlers; + }(OfficeExtension.EventHandlers)); + OfficeExtension.GenericEventHandlers=GenericEventHandlers; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var HttpRequestExecutor=(function () { function HttpRequestExecutor() { @@ -11027,15 +11775,6 @@ var OfficeExtension; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { - var _Internal; - (function (_Internal) { - _Internal.OfficeRequire=function () { - if (typeof (require) !=="undefined") { - return require; - } - return null; - }(); - })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); var HttpUtility=(function () { function HttpUtility() { } @@ -11043,7 +11782,7 @@ var OfficeExtension; HttpUtility.s_customSendRequestFunc=func; }; HttpUtility.xhrSendRequestFunc=function (request) { - return new _Internal.OfficePromise(function (resolve, reject) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { var xhr=new XMLHttpRequest(); xhr.open(request.method, request.url); xhr.onload=function () { @@ -11055,7 +11794,7 @@ var OfficeExtension; resolve(resp); }; xhr.onerror=function () { - reject(new _Internal.RuntimeError({ + reject(new OfficeExtension._Internal.RuntimeError({ code: OfficeExtension.ErrorCodes.connectionFailure, message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.connectionFailureWithStatus, xhr.statusText) })); @@ -11068,34 +11807,11 @@ var OfficeExtension; xhr.send(request.body); }); }; - HttpUtility.nodejsRequestModuleSendRequestFunc=function (requestInfo) { - HttpUtility.logRequest(requestInfo); - var fetch=_Internal.OfficeRequire(HttpUtility.NodeJsRequestModuleName); - return fetch(requestInfo.url, { method: requestInfo.method, headers: requestInfo.headers, body: requestInfo.body }) - .then(function (resp) { - return resp.text() - .then(function (body) { - var statusCode=resp.status; - var headers={}; - resp.headers.forEach(function (value, name) { - headers[name]=value; - }); - var ret={ statusCode: statusCode, headers: headers, body: body }; - HttpUtility.logResponse(ret); - return ret; - }); - }); - }; HttpUtility.sendRequest=function (request) { HttpUtility.validateAndNormalizeRequest(request); var func=HttpUtility.s_customSendRequestFunc; if (!func) { - if (typeof (window)==="undefined" || typeof (XMLHttpRequest)==="undefined") { - func=HttpUtility.nodejsRequestModuleSendRequestFunc; - } - else { - func=HttpUtility.xhrSendRequestFunc; - } + func=HttpUtility.xhrSendRequestFunc; } return func(request); }; @@ -11111,7 +11827,7 @@ var OfficeExtension; HttpUtility.officeJsSendLocalDocumentRequestFunc=function (request) { request=OfficeExtension.Utility._validateLocalDocumentRequest(request); var requestSafeArray=OfficeExtension.Utility._buildRequestMessageSafeArray(request); - return new _Internal.OfficePromise(function (resolve, reject) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { OSF.DDA.RichApi.executeRichApiRequestAsync(requestSafeArray, function (asyncResult) { var response; if (asyncResult.status=="succeeded") { @@ -11131,7 +11847,7 @@ var OfficeExtension; }; HttpUtility.validateAndNormalizeRequest=function (request) { if (OfficeExtension.Utility.isNullOrUndefined(request)) { - throw _Internal.RuntimeError._createInvalidArgError({ + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError({ argumentName: "request" }); } @@ -11168,7 +11884,6 @@ var OfficeExtension; } } }; - HttpUtility.NodeJsRequestModuleName="node-fetch"; HttpUtility._logBody=false; return HttpUtility; }()); @@ -11192,6 +11907,146 @@ var OfficeExtension; ; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var HostBridgeRequestExecutor=(function () { + function HostBridgeRequestExecutor(session) { + this.m_session=session; + } + HostBridgeRequestExecutor.prototype.executeAsync=function (customData, requestFlags, requestMessage) { + var httpRequestInfo={ + url: OfficeExtension.Constants.processQuery, + method: "POST", + headers: requestMessage.Headers, + body: requestMessage.Body + }; + var message={ + id: HostBridgeSession.nextId(), + type: 1, + flags: requestFlags, + message: httpRequestInfo + }; + OfficeExtension.Utility.log(JSON.stringify(message)); + return this.m_session.sendMessageToHost(message) + .then(function (nativeBridgeResponse) { + OfficeExtension.Utility.log("Received response: "+JSON.stringify(nativeBridgeResponse)); + var responseInfo=nativeBridgeResponse.message; + var response; + if (responseInfo.statusCode===200) { + response={ ErrorCode: null, ErrorMessage: null, Headers: responseInfo.headers, Body: responseInfo.body }; + } + else { + OfficeExtension.Utility.log("Error Response:"+responseInfo.body); + var error=OfficeExtension.Utility._parseErrorResponse(responseInfo); + response={ + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null + }; + } + return response; + }); + }; + return HostBridgeRequestExecutor; + }()); + var HostBridgeSession=(function (_super) { + __extends(HostBridgeSession, _super); + function HostBridgeSession(bridge) { + var _this=this; + _super.call(this); + this.m_promiseResolver={}; + this.m_bridge=bridge; + this.m_bridge.onMessageFromHost=function (msg) { + _this.onMessageFromHost(msg); + }; + } + HostBridgeSession.prototype._resolveRequestUrlAndHeaderInfo=function () { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + HostBridgeSession.prototype._createRequestExecutorOrNull=function () { + OfficeExtension.Utility.log("NativeBridgeSession::CreateRequestExecutor"); + return new HostBridgeRequestExecutor(this); + }; + Object.defineProperty(HostBridgeSession.prototype, "eventRegistration", { + get: function () { + return OfficeExtension._Internal.officeJsEventRegistration; + }, + enumerable: true, + configurable: true + }); + HostBridgeSession.init=function (bridge) { + if (bridge && typeof (bridge)==="object") { + var session=new HostBridgeSession(bridge); + OfficeExtension.ClientRequestContext._overrideSession=session; + OfficeExtension.HttpUtility.setCustomSendLocalDocumentRequestFunc(function (request) { + var bridgeMessage={ + id: HostBridgeSession.nextId(), + type: 1, + flags: 0, + message: request + }; + return session.sendMessageToHost(bridgeMessage) + .then(function (bridgeResponse) { + var responseInfo=bridgeResponse.message; + return responseInfo; + }); + }); + } + }; + HostBridgeSession.prototype.sendMessageToHost=function (message) { + var _this=this; + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + var ret=new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { + _this.m_promiseResolver[message.id]=resolve; + }); + return ret; + }; + HostBridgeSession.prototype.onMessageFromHost=function (messageText) { + if (messageText==="test") { + if (HostBridgeTest._testFunc) { + HostBridgeTest._testFunc(); + } + } + else { + var message=JSON.parse(messageText); + if (typeof (message.id)==="number") { + var resolve=this.m_promiseResolver[message.id]; + if (resolve) { + resolve(message); + } + delete this.m_promiseResolver[message.id]; + } + } + }; + HostBridgeSession.nextId=function () { + return HostBridgeSession.s_nextId++; + }; + HostBridgeSession.s_nextId=1; + return HostBridgeSession; + }(OfficeExtension.SessionBase)); + var HostBridge=(function () { + function HostBridge() { + } + HostBridge.init=function (bridge) { + HostBridgeSession.init(bridge); + }; + return HostBridge; + }()); + OfficeExtension.HostBridge=HostBridge; + if (typeof (_richApiNativeBridge)==="object" && _richApiNativeBridge) { + HostBridge.init(_richApiNativeBridge); + } + var HostBridgeTest=(function () { + function HostBridgeTest() { + } + HostBridgeTest.setTestFunc=function (func) { + HostBridgeTest._testFunc=func; + }; + return HostBridgeTest; + }()); + OfficeExtension.HostBridgeTest=HostBridgeTest; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var ObjectPath=(function () { function ObjectPath(objectPathInfo, parentObjectPath, isCollection, isInvalidAfterRequest) { @@ -11219,6 +12074,16 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(ObjectPath.prototype, "isRestrictedResourceAccess", { + get: function () { + return this.m_isRestrictedResourceAccess; + }, + set: function (value) { + this.m_isRestrictedResourceAccess=value; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ObjectPath.prototype, "isCollection", { get: function () { return this.m_isCollection; @@ -11305,6 +12170,7 @@ var OfficeExtension; this.m_objectPathInfo.ObjectPathType=6; this.m_objectPathInfo.Name=referenceId; this.m_objectPathInfo.ArgumentInfo={}; + delete this.m_objectPathInfo.ParentObjectPathId; this.m_parentObjectPath=null; this.m_argumentObjectPaths=null; return; @@ -11319,15 +12185,15 @@ var OfficeExtension; if (!OfficeExtension.Utility.isNullOrUndefined(id)) { this.m_isInvalidAfterRequest=false; this.m_isValid=true; - if (parentIsCollection) { - this.m_objectPathInfo.ObjectPathType=5; - this.m_objectPathInfo.Name=""; - } - else { + if (!OfficeExtension.Utility.isNullOrEmptyString(getByIdMethodName)) { this.m_objectPathInfo.ObjectPathType=3; this.m_objectPathInfo.Name=getByIdMethodName; this.m_getByIdMethodName=null; } + else { + this.m_objectPathInfo.ObjectPathType=5; + this.m_objectPathInfo.Name=""; + } this.isWriteOperation=false; this.m_objectPathInfo.ArgumentInfo={}; this.m_objectPathInfo.ArgumentInfo.Arguments=[id]; @@ -11362,18 +12228,22 @@ var OfficeExtension; var objectPathInfo={ Id: context._nextId(), ObjectPathType: 1, Name: "" }; return new OfficeExtension.ObjectPath(objectPathInfo, null, false, false); }; - ObjectPathFactory.createNewObjectObjectPath=function (context, typeName, isCollection) { + ObjectPathFactory.createNewObjectObjectPath=function (context, typeName, isCollection, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 2, Name: typeName }; - return new OfficeExtension.ObjectPath(objectPathInfo, null, isCollection, false); + var ret=new OfficeExtension.ObjectPath(objectPathInfo, null, isCollection, false); + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; }; - ObjectPathFactory.createPropertyObjectPath=function (context, parent, propertyName, isCollection, isInvalidAfterRequest) { + ObjectPathFactory.createPropertyObjectPath=function (context, parent, propertyName, isCollection, isInvalidAfterRequest, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 4, Name: propertyName, ParentObjectPathId: parent._objectPath.objectPathInfo.Id, }; - return new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest); + var ret=new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest); + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; }; ObjectPathFactory.createIndexerObjectPath=function (context, parent, args) { var objectPathInfo={ @@ -11397,7 +12267,7 @@ var OfficeExtension; objectPathInfo.ArgumentInfo.Arguments=args; return new OfficeExtension.ObjectPath(objectPathInfo, parentObjectPath, false, false); }; - ObjectPathFactory.createMethodObjectPath=function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName) { + ObjectPathFactory.createMethodObjectPath=function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 3, @@ -11410,6 +12280,7 @@ var OfficeExtension; ret.argumentObjectPaths=argumentObjectPaths; ret.isWriteOperation=(operationType !=1); ret.getByIdMethodName=getByIdMethodName; + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; return ret; }; ObjectPathFactory.createReferenceIdObjectPath=function (context, referenceId) { @@ -11471,9 +12342,11 @@ var OfficeExtension; var OfficeExtension; (function (OfficeExtension) { var OfficeJsRequestExecutor=(function () { - function OfficeJsRequestExecutor() { + function OfficeJsRequestExecutor(context) { + this.m_context=context; } OfficeJsRequestExecutor.prototype.executeAsync=function (customData, requestFlags, requestMessage) { + var _this=this; var messageSafearray=OfficeExtension.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, OfficeJsRequestExecutor.SourceLibHeaderValue); return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { OSF.DDA.RichApi.executeRichApiRequestAsync(messageSafearray, function (result) { @@ -11485,6 +12358,7 @@ var OfficeExtension; } else { response=OfficeExtension.RichApiMessageUtility.buildResponseOnError(result.error.code, result.error.message); + _this.m_context._processOfficeJsErrorResponse(result.error.code, response); } resolve(response); }); @@ -11497,6 +12371,12 @@ var OfficeExtension; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + var _Internal; + (function (_Internal) { + _Internal.OfficeRequire=function () { + return null; + }(); + })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); var _Internal; (function (_Internal) { var PromiseImpl; @@ -11600,17 +12480,6 @@ var OfficeExtension; } lib$es6$promise$asap$$len=0; } - function lib$es6$promise$asap$$attemptVertex() { - try { - var r=require; - var vertx=r('vertx'); - lib$es6$promise$asap$$vertxNext=vertx.runOnLoop || vertx.runOnContext; - return lib$es6$promise$asap$$useVertxTimer(); - } - catch (e) { - return lib$es6$promise$asap$$useSetTimeout(); - } - } var lib$es6$promise$asap$$scheduleFlush; if (lib$es6$promise$asap$$isNode) { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useNextTick(); @@ -11621,9 +12490,6 @@ var OfficeExtension; else if (lib$es6$promise$asap$$isWorker) { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useMessageChannel(); } - else if (lib$es6$promise$asap$$browserWindow===undefined && typeof require==='function') { - lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$attemptVertex(); - } else { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useSetTimeout(); } @@ -12141,6 +13007,305 @@ var OfficeExtension; OfficeExtension.TrackedObjects=TrackedObjects; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var RequestPrettyPrinter=(function () { + function RequestPrettyPrinter(globalObjName, referencedObjectPaths, actions, showDispose) { + if (!globalObjName) { + globalObjName="root"; + } + this.m_globalObjName=globalObjName; + this.m_referencedObjectPaths=referencedObjectPaths; + this.m_actions=actions; + this.m_statements=[]; + this.m_variableNameForObjectPathMap={}; + this.m_variableNameToObjectPathMap={}; + this.m_declaredObjectPathMap={}; + this.m_showDispose=showDispose; + } + RequestPrettyPrinter.prototype.process=function () { + if (this.m_showDispose) { + OfficeExtension.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + for (var i=0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + } + return this.m_statements; + }; + RequestPrettyPrinter.prototype.processForDebugStatementInfo=function (actionIndex) { + if (this.m_showDispose) { + OfficeExtension.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + var surroundingCount=5; + this.m_statements=[]; + var oneStatement=""; + var statementIndex=-1; + for (var i=0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + if (actionIndex==i) { + statementIndex=this.m_statements.length - 1; + } + if (statementIndex >=0 && this.m_statements.length > statementIndex+surroundingCount+1) { + break; + } + } + if (statementIndex < 0) { + return null; + } + var startIndex=statementIndex - surroundingCount; + if (startIndex < 0) { + startIndex=0; + } + var endIndex=statementIndex+1+surroundingCount; + if (endIndex > this.m_statements.length) { + endIndex=this.m_statements.length; + } + var surroundingStatements=[]; + if (startIndex !=0) { + surroundingStatements.push("..."); + } + for (var i_1=startIndex; i_1 < statementIndex; i_1++) { + surroundingStatements.push(this.m_statements[i_1]); + } + surroundingStatements.push("// >>>>>"); + surroundingStatements.push(this.m_statements[statementIndex]); + surroundingStatements.push("// <<<<<"); + for (var i_2=statementIndex+1; i_2 < endIndex; i_2++) { + surroundingStatements.push(this.m_statements[i_2]); + } + if (endIndex < this.m_statements.length) { + surroundingStatements.push("..."); + } + return { + statement: this.m_statements[statementIndex], + surroundingStatements: surroundingStatements + }; + }; + RequestPrettyPrinter.prototype.processOneAction=function (action) { + var actionInfo=action.actionInfo; + switch (actionInfo.ActionType) { + case 1: + this.processInstantiateAction(action); + break; + case 3: + this.processMethodAction(action); + break; + case 2: + this.processQueryAction(action); + break; + case 7: + this.processQueryAsJsonAction(action); + break; + case 6: + this.processRecursiveQueryAction(action); + break; + case 4: + this.processSetPropertyAction(action); + break; + case 5: + this.processTraceAction(action); + break; + case 8: + this.processEnsureUnchangedAction(action); + break; + } + }; + RequestPrettyPrinter.prototype.processInstantiateAction=function (action) { + var objId=action.actionInfo.ObjectPathId; + var objPath=this.m_referencedObjectPaths[objId]; + var varName=this.getObjVarName(objId); + if (!this.m_declaredObjectPathMap[objId]) { + var statement="var "+varName+"="+this.buildObjectPathExpressionWithParent(objPath)+";"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + this.m_declaredObjectPathMap[objId]=varName; + } + else { + var statement="// Instantiate {"+varName+"}"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + } + }; + RequestPrettyPrinter.prototype.processMethodAction=function (action) { + var methodName=action.actionInfo.Name; + if (methodName==="_KeepReference") { + methodName="track"; + } + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+"."+OfficeExtension.Utility._toCamelLowerCase(methodName)+"("+this.buildArgumentsExpression(action.actionInfo.ArgumentInfo)+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAction=function (action) { + var queryExp=this.buildQueryExpression(action); + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".load("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAsJsonAction=function (action) { + var queryExp=this.buildQueryExpression(action); + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".loadJson("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processRecursiveQueryAction=function (action) { + var queryExp=""; + if (action.actionInfo.RecursiveQueryInfo) { + queryExp=JSON.stringify(action.actionInfo.RecursiveQueryInfo); + } + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".loadRecursive("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processSetPropertyAction=function (action) { + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+"."+OfficeExtension.Utility._toCamelLowerCase(action.actionInfo.Name)+"="+this.buildArgumentsExpression(action.actionInfo.ArgumentInfo)+";"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processTraceAction=function (action) { + var statement="context.trace();"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processEnsureUnchangedAction=function (action) { + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".ensureUnchanged("+JSON.stringify(action.actionInfo.ObjectState)+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.appendDisposeCommentIfRelevant=function (statement, action) { + var _this=this; + if (this.m_showDispose) { + var lastUsedObjectPathIds=action.actionInfo.L; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + var objectNamesToDispose=lastUsedObjectPathIds.map(function (item) { return _this.getObjVarName(item); }).join(", "); + return statement+" // And then dispose {"+objectNamesToDispose+"}"; + } + } + return statement; + }; + RequestPrettyPrinter.prototype.buildQueryExpression=function (action) { + if (action.actionInfo.QueryInfo) { + var option={}; + option.select=action.actionInfo.QueryInfo.Select; + option.expand=action.actionInfo.QueryInfo.Expand; + option.skip=action.actionInfo.QueryInfo.Skip; + option.top=action.actionInfo.QueryInfo.Top; + if (typeof (option.top)==="undefined" && typeof (option.skip)==="undefined" && typeof (option.expand)==="undefined") { + if (typeof (option.select)==="undefined") { + return ""; + } + else { + return JSON.stringify(option.select); + } + } + else { + return JSON.stringify(option); + } + } + return ""; + }; + RequestPrettyPrinter.prototype.buildObjectPathExpressionWithParent=function (objPath) { + var hasParent=objPath.objectPathInfo.ObjectPathType==5 || + objPath.objectPathInfo.ObjectPathType==3 || + objPath.objectPathInfo.ObjectPathType==4; + if (hasParent && objPath.objectPathInfo.ParentObjectPathId) { + return this.getObjVarName(objPath.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(objPath); + } + return this.buildObjectPathExpression(objPath); + }; + RequestPrettyPrinter.prototype.buildObjectPathExpression=function (objPath) { + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + return "context."+this.m_globalObjName; + case 5: + return "getItem("+this.buildArgumentsExpression(objPath.objectPathInfo.ArgumentInfo)+")"; + case 3: + return OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name)+"("+this.buildArgumentsExpression(objPath.objectPathInfo.ArgumentInfo)+")"; + case 2: + return objPath.objectPathInfo.Name+".newObject()"; + case 7: + return "null"; + case 4: + return OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + case 6: + return "context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(objPath.objectPathInfo.Name)+")"; + } + }; + RequestPrettyPrinter.prototype.buildArgumentsExpression=function (args) { + var ret=""; + if (!args.Arguments) { + return ret; + } + for (var i=0; i < args.Arguments.length; i++) { + if (i > 0) { + ret=ret+", "; + } + ret=ret+this.buildArgumentLiteral(args.Arguments[i], args.ReferencedObjectPathIds ? args.ReferencedObjectPathIds[i] : null); + } + if (ret==="undefined") { + ret=""; + } + return ret; + }; + RequestPrettyPrinter.prototype.buildArgumentLiteral=function (value, objectPathId) { + if (typeof value=="number" && value===objectPathId) { + return this.getObjVarName(objectPathId); + } + else { + return JSON.stringify(value); + } + }; + RequestPrettyPrinter.prototype.getObjVarNameBase=function (objectPathId) { + var ret="v"; + var objPath=this.m_referencedObjectPaths[objectPathId]; + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + ret=this.m_globalObjName; + break; + case 4: + ret=OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + break; + case 3: + var methodName=objPath.objectPathInfo.Name; + if (methodName.length > 3 && methodName.substr(0, 3)==="Get") { + methodName=methodName.substr(3); + } + ret=OfficeExtension.Utility._toCamelLowerCase(methodName); + break; + case 5: + var parentName=this.getObjVarNameBase(objPath.objectPathInfo.ParentObjectPathId); + if (parentName.charAt(parentName.length - 1)==="s") { + ret=parentName.substr(0, parentName.length - 1); + } + else { + ret=parentName+"Item"; + } + break; + } + return ret; + }; + RequestPrettyPrinter.prototype.getObjVarName=function (objectPathId) { + if (this.m_variableNameForObjectPathMap[objectPathId]) { + return this.m_variableNameForObjectPathMap[objectPathId]; + } + var ret=this.getObjVarNameBase(objectPathId); + if (!this.m_variableNameToObjectPathMap[ret]) { + this.m_variableNameForObjectPathMap[objectPathId]=ret; + this.m_variableNameToObjectPathMap[ret]=objectPathId; + return ret; + } + var i=1; + while (this.m_variableNameToObjectPathMap[ret+i.toString()]) { + i++; + } + ret=ret+i.toString(); + this.m_variableNameForObjectPathMap[objectPathId]=ret; + this.m_variableNameToObjectPathMap[ret]=objectPathId; + return ret; + }; + return RequestPrettyPrinter; + }()); + OfficeExtension.RequestPrettyPrinter=RequestPrettyPrinter; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var ResourceStrings=(function () { function ResourceStrings() { @@ -12161,6 +13326,14 @@ var OfficeExtension; ResourceStrings.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod"; ResourceStrings.valueNotLoaded="ValueNotLoaded"; ResourceStrings.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage"; + ResourceStrings.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"; + ResourceStrings.customFunctionDefintionMissing="CustomFunctionDefintionMissing"; + ResourceStrings.customFunctionImplementationMissing="CustomFunctionImplementationMissing"; + ResourceStrings.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars"; + ResourceStrings.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit"; + ResourceStrings.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch"; + ResourceStrings.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing"; + ResourceStrings.apiNotFoundDetails="ApiNotFoundDetails"; return ResourceStrings; }()); OfficeExtension.ResourceStrings=ResourceStrings; @@ -12180,7 +13353,15 @@ var OfficeExtension; ResourceStringValues.RunMustReturnPromise="The batch function passed to the \".run\" method didn't return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from \"context.sync()\"."; ResourceStringValues.Timeout="The operation has timed out."; ResourceStringValues.ValueNotLoaded="The value of the result object has not been loaded yet. Before reading the value property, call \"context.sync()\" on the associated request context."; - ResourceStringValues.invalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page."; + ResourceStringValues.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page."; + ResourceStringValues.InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again."; + ResourceStringValues.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions."; + ResourceStringValues.CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function."; + ResourceStringValues.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods."; + ResourceStringValues.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name."; + ResourceStringValues.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it."; + ResourceStringValues.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable."; + ResourceStringValues.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}."; return ResourceStringValues; }()); OfficeExtension.ResourceStringValues=ResourceStringValues; @@ -12474,6 +13655,34 @@ var OfficeExtension; }; Utility.load=function (clientObj, option) { clientObj.context.load(clientObj, option); + return clientObj; + }; + Utility.loadAndSync=function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj.context.sync().then(function () { return clientObj; }); + }; + Utility.retrieve=function (clientObj, option) { + var shouldPolyfill=OfficeExtension._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + if (typeof (window) !=="undefined" && window.Office && window.Office.context && window.Office.context.requirements) { + shouldPolyfill=!window.Office.context.requirements.isSetSupported("RichApiRuntime", "1.1"); + } + } + var result=new OfficeExtension.RetrieveResult(clientObj, shouldPolyfill); + var queryOption=OfficeExtension.ClientRequestContext._parseQueryOption(option); + var action; + if (shouldPolyfill) { + action=OfficeExtension.ActionFactory.createQueryAction(clientObj.context, clientObj, queryOption); + } + else { + action=OfficeExtension.ActionFactory.createQueryAsJsonAction(clientObj.context, clientObj, queryOption); + } + clientObj.context._pendingRequest.addActionResultHandler(action, result); + return result; + }; + Utility.retrieveAndSync=function (clientObj, option) { + var result=Utility.retrieve(clientObj, option); + return clientObj.context.sync().then(function () { return result; }); }; Utility._parseSelectExpand=function (select) { var args=[]; @@ -12494,11 +13703,32 @@ var OfficeExtension; return '*'; } var itemsSlashLength=6; - if (propertyNameLower.substr(0, itemsSlashLength)==="items/") { + var isItemsSlashOrItemsDot=propertyNameLower.substr(0, itemsSlashLength)==="items/" || + propertyNameLower.substr(0, itemsSlashLength)==="items."; + if (isItemsSlashOrItemsDot) { propertyName=propertyName.substr(itemsSlashLength); } - return propertyName.replace(new RegExp("\/items\/", "gi"), "/"); + return propertyName.replace(new RegExp("[\/\.]items[\/\.]", "gi"), "/"); + } + }; + Utility.toJson=function (clientObj, scalarProperties, navigationProperties, collectionItemsIfAny) { + var result={}; + for (var prop in scalarProperties) { + var value=scalarProperties[prop]; + if (typeof value !=="undefined") { + result[prop]=value; + } + } + for (var prop in navigationProperties) { + var value=navigationProperties[prop]; + if (typeof value !=="undefined") { + result[prop]=value.toJSON(); + } + } + if (collectionItemsIfAny) { + result["items"]=collectionItemsIfAny.map(function (item) { return item.toJSON(); }); } + return result; }; Utility.throwError=function (resourceId, arg, errorLocation) { throw new OfficeExtension._Internal.RuntimeError({ @@ -12560,6 +13790,21 @@ var OfficeExtension; }); } }; + Utility.throwIfApiNotSupported=function (apiFullName, apiSetName, apiSetVersion, hostName) { + if (!Utility._doApiNotSupportedCheck) { + return; + } + if (typeof (window) !=="undefined" && window.Office && window.Office.context) { + if (!window.Office.context.requirements.isSetSupported(apiSetName, apiSetVersion)) { + var message=Utility._getResourceString(OfficeExtension.ResourceStrings.apiNotFoundDetails, [apiFullName, apiSetName+" "+apiSetVersion, hostName]); + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.apiNotFound, + message: message, + debugInfo: { errorLocation: apiFullName } + }); + } + } + }; Utility.getObjectPathExpression=function (objectPath) { var ret=""; while (objectPath) { @@ -12709,7 +13954,10 @@ var OfficeExtension; }; Utility._parseErrorResponse=function (responseInfo) { var errorObj=null; - if (!Utility.isNullOrEmptyString(responseInfo.body)) { + if (Utility.isPlainJsonObject(responseInfo.body)) { + errorObj=responseInfo.body; + } + else if (!Utility.isNullOrEmptyString(responseInfo.body)) { var errorResponseBody=Utility.trim(responseInfo.body); try { errorObj=JSON.parse(errorResponseBody); @@ -12739,14 +13987,262 @@ var OfficeExtension; } } }; + Utility._toCamelLowerCase=function (name) { + if (Utility.isNullOrEmptyString(name)) { + return name; + } + var index=0; + while (index < name.length && name.charCodeAt(index) >=65 && name.charCodeAt(index) <=90) { + index++; + } + if (index < name.length) { + return name.substr(0, index).toLowerCase()+name.substr(index); + } + else { + return name.toLowerCase(); + } + }; Utility._logEnabled=false; Utility._synchronousCleanup=false; + Utility._doApiNotSupportedCheck=false; Utility.s_underscoreCharCode="_".charCodeAt(0); return Utility; }()); OfficeExtension.Utility=Utility; })(OfficeExtension || (OfficeExtension={})); +var __extends=(this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p]=b[p]; + function __() { this.constructor=d; } + d.prototype=b===null ? Object.create(b) : (__.prototype=b.prototype, new __()); +}; +var OfficeCore; +(function (OfficeCore) { + var _hostName="OfficeCore"; + var _defaultApiSetName="ExperimentApi"; + var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; + var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; + var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; + var _createNewObjectObjectPath=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath; + var _createChildItemObjectPathUsingIndexer=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer; + var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; + var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; + var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; + var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined=OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; + var _load=OfficeExtension.Utility.load; + var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; + var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; + var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var FlightingService=(function (_super) { + __extends(FlightingService, _super); + function FlightingService() { + _super.apply(this, arguments); + } + Object.defineProperty(FlightingService.prototype, "_className", { + get: function () { + return "FlightingService"; + }, + enumerable: true, + configurable: true + }); + FlightingService.prototype.getClientSessionId=function () { + var action=_createMethodAction(this.context, this, "GetClientSessionId", 1, []); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + FlightingService.prototype.getDeferredFlights=function () { + var action=_createMethodAction(this.context, this, "GetDeferredFlights", 1, []); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + FlightingService.prototype.getFeature=function (featureName, type, defaultValue, possibleValues) { + return new OfficeCore.ABType(this.context, _createMethodObjectPath(this.context, this, "GetFeature", 1, [featureName, type, defaultValue, possibleValues], false, false, null)); + }; + FlightingService.prototype.getFeatureGate=function (featureName, scope) { + return new OfficeCore.ABType(this.context, _createMethodObjectPath(this.context, this, "GetFeatureGate", 1, [featureName, scope], false, false, null)); + }; + FlightingService.prototype.resetOverride=function (featureName) { + _createMethodAction(this.context, this, "ResetOverride", 0, [featureName]); + }; + FlightingService.prototype.setOverride=function (featureName, type, value) { + _createMethodAction(this.context, this, "SetOverride", 0, [featureName, type, value]); + }; + FlightingService.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + FlightingService.newObject=function (context) { + var ret=new OfficeCore.FlightingService(context, _createNewObjectObjectPath(context, "Microsoft.Experiment.FlightingService", false)); + return ret; + }; + FlightingService.prototype.toJSON=function () { + return {}; + }; + return FlightingService; + }(OfficeExtension.ClientObject)); + OfficeCore.FlightingService=FlightingService; + var ABType=(function (_super) { + __extends(ABType, _super); + function ABType() { + _super.apply(this, arguments); + } + Object.defineProperty(ABType.prototype, "_className", { + get: function () { + return "ABType"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ABType.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this.m_value, "ABType", this._isNull); + return this.m_value; + }, + enumerable: true, + configurable: true + }); + ABType.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Value"])) { + this.m_value=obj["Value"]; + } + }; + ABType.prototype.load=function (option) { + _load(this, option); + return this; + }; + ABType.prototype.toJSON=function () { + return { + "value": this.m_value + }; + }; + return ABType; + }(OfficeExtension.ClientObject)); + OfficeCore.ABType=ABType; + var FeatureType; + (function (FeatureType) { + FeatureType.boolean="Boolean"; + FeatureType.integer="Integer"; + FeatureType.string="String"; + })(FeatureType=OfficeCore.FeatureType || (OfficeCore.FeatureType={})); + var ExperimentErrorCodes; + (function (ExperimentErrorCodes) { + ExperimentErrorCodes.generalException="GeneralException"; + })(ExperimentErrorCodes=OfficeCore.ExperimentErrorCodes || (OfficeCore.ExperimentErrorCodes={})); +})(OfficeCore || (OfficeCore={})); +var OfficeCore; +(function (OfficeCore) { + var RequestContext=(function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + _super.call(this, url); + } + Object.defineProperty(RequestContext.prototype, "flighting", { + get: function () { + return this.flightingService; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "telemetry", { + get: function () { + if (!this.m_telemetry) { + this.m_telemetry=OfficeCore.TelemetryService.newObject(this); + } + return this.m_telemetry; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "flightingService", { + get: function () { + if (!this.m_flightingService) { + this.m_flightingService=OfficeCore.FlightingService.newObject(this); + } + return this.m_flightingService; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeExtension.ClientRequestContext)); + OfficeCore.RequestContext=RequestContext; +})(OfficeCore || (OfficeCore={})); +var OfficeCore; +(function (OfficeCore) { + var _hostName="OfficeCore"; + var _defaultApiSetName="TelemetryApi"; + var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; + var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; + var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; + var _createNewObjectObjectPath=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath; + var _createChildItemObjectPathUsingIndexer=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer; + var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; + var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; + var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; + var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined=OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; + var _load=OfficeExtension.Utility.load; + var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; + var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; + var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var _typeTelemetryService="TelemetryService"; + var TelemetryService=(function (_super) { + __extends(TelemetryService, _super); + function TelemetryService() { + _super.apply(this, arguments); + } + Object.defineProperty(TelemetryService.prototype, "_className", { + get: function () { + return "TelemetryService"; + }, + enumerable: true, + configurable: true + }); + TelemetryService.prototype.sendTelemetryEvent=function (telemetryProperties, eventName, eventContract, eventFlags, value) { + _createMethodAction(this.context, this, "SendTelemetryEvent", 1, [telemetryProperties, eventName, eventContract, eventFlags, value], false); + }; + TelemetryService.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + TelemetryService.newObject=function (context) { + var ret=new OfficeCore.TelemetryService(context, _createNewObjectObjectPath(context, "Microsoft.Telemetry.TelemetryService", false, false)); + return ret; + }; + TelemetryService.prototype.toJSON=function () { + return {}; + }; + return TelemetryService; + }(OfficeExtension.ClientObject)); + OfficeCore.TelemetryService=TelemetryService; + var TelemetryErrorCodes; + (function (TelemetryErrorCodes) { + TelemetryErrorCodes.generalException="GeneralException"; + })(TelemetryErrorCodes=OfficeCore.TelemetryErrorCodes || (OfficeCore.TelemetryErrorCodes={})); +})(OfficeCore || (OfficeCore={})); + var __extends=(this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p]=b[p]; function __() { this.constructor=d; } @@ -12754,6 +14250,8 @@ var __extends=(this && this.__extends) || function (d, b) { }; var OneNote; (function (OneNote) { + var _hostName="OneNote"; + var _defaultApiSetName="OneNoteApi"; var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; @@ -12766,11 +14264,13 @@ var OneNote; var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; var _isUndefined=OfficeExtension.Utility.isUndefined; var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; var _load=OfficeExtension.Utility.load; var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var _typeApplication="Application"; var Application=(function (_super) { __extends(Application, _super); function Application() { @@ -12785,129 +14285,165 @@ var OneNote; }); Object.defineProperty(Application.prototype, "notebooks", { get: function () { - if (!this.m_notebooks) { - this.m_notebooks=new OneNote.NotebookCollection(this.context, _createPropertyObjectPath(this.context, this, "Notebooks", true, false)); + if (!this._N) { + this._N=new OneNote.NotebookCollection(this.context, _createPropertyObjectPath(this.context, this, "Notebooks", true, false, false)); } - return this.m_notebooks; + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(Application.prototype, "_platform", { get: function () { - _throwIfNotLoaded("_platform", this.m__platform, "Application", this._isNull); - return this.m__platform; + _throwIfNotLoaded("_platform", this.__p, _typeApplication, this._isNull); + return this.__p; }, enumerable: true, configurable: true }); Application.prototype.getActiveNotebook=function () { - return new OneNote.Notebook(this.context, _createMethodObjectPath(this.context, this, "GetActiveNotebook", 1, [], false, false, null)); + return new OneNote.Notebook(this.context, _createMethodObjectPath(this.context, this, "GetActiveNotebook", 1, [], false, false, null, false)); }; Application.prototype.getActiveNotebookOrNull=function () { - return new OneNote.Notebook(this.context, _createMethodObjectPath(this.context, this, "GetActiveNotebookOrNull", 1, [], false, false, null)); + return new OneNote.Notebook(this.context, _createMethodObjectPath(this.context, this, "GetActiveNotebookOrNull", 1, [], false, false, null, false)); }; Application.prototype.getActiveOutline=function () { - return new OneNote.Outline(this.context, _createMethodObjectPath(this.context, this, "GetActiveOutline", 1, [], false, false, null)); + return new OneNote.Outline(this.context, _createMethodObjectPath(this.context, this, "GetActiveOutline", 1, [], false, false, null, false)); }; Application.prototype.getActiveOutlineOrNull=function () { - return new OneNote.Outline(this.context, _createMethodObjectPath(this.context, this, "GetActiveOutlineOrNull", 1, [], false, false, null)); + return new OneNote.Outline(this.context, _createMethodObjectPath(this.context, this, "GetActiveOutlineOrNull", 1, [], false, false, null, false)); }; Application.prototype.getActivePage=function () { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "GetActivePage", 1, [], false, false, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "GetActivePage", 1, [], false, false, null, false)); }; Application.prototype.getActivePageOrNull=function () { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "GetActivePageOrNull", 1, [], false, false, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "GetActivePageOrNull", 1, [], false, false, null, false)); }; Application.prototype.getActiveParagraph=function () { - return new OneNote.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetActiveParagraph", 1, [], false, false, null)); + return new OneNote.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetActiveParagraph", 1, [], false, false, null, false)); }; Application.prototype.getActiveParagraphOrNull=function () { - return new OneNote.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetActiveParagraphOrNull", 1, [], false, false, null)); + return new OneNote.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetActiveParagraphOrNull", 1, [], false, false, null, false)); }; Application.prototype.getActiveSection=function () { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "GetActiveSection", 1, [], false, false, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "GetActiveSection", 1, [], false, false, null, false)); }; Application.prototype.getActiveSectionOrNull=function () { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "GetActiveSectionOrNull", 1, [], false, false, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "GetActiveSectionOrNull", 1, [], false, false, null, false)); + }; + Application.prototype.getSelectedPages=function () { + return new OneNote.PageCollection(this.context, _createMethodObjectPath(this.context, this, "GetSelectedPages", 1, [], true, false, null, false)); + }; + Application.prototype.getWindowSize=function () { + var action=_createMethodAction(this.context, this, "GetWindowSize", 0, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Application.prototype.insertHtmlAtCurrentPosition=function (html) { + _createMethodAction(this.context, this, "InsertHtmlAtCurrentPosition", 0, [html], false); }; Application.prototype.navigateToPage=function (page) { - _createMethodAction(this.context, this, "NavigateToPage", 1, [page]); + _createMethodAction(this.context, this, "NavigateToPage", 1, [page], false); }; Application.prototype.navigateToPageWithClientUrl=function (url) { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "NavigateToPageWithClientUrl", 1, [url], false, false, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "NavigateToPageWithClientUrl", 1, [url], false, false, null, false)); }; Application.prototype._ClientLog=function (level, eventName, flag, data) { - _createMethodAction(this.context, this, "_ClientLog", 1, [level, eventName, flag, data]); + _createMethodAction(this.context, this, "_ClientLog", 1, [level, eventName, flag, data], false); + }; + Application.prototype._EnableControl=function (controlId, enable) { + _createMethodAction(this.context, this, "_EnableControl", 0, [controlId, enable], false); + }; + Application.prototype._EnterFullScreen=function () { + _createMethodAction(this.context, this, "_EnterFullScreen", 0, [], false); + }; + Application.prototype._ExitFullScreen=function () { + _createMethodAction(this.context, this, "_ExitFullScreen", 0, [], false); + }; + Application.prototype._FocusCanvas=function () { + _createMethodAction(this.context, this, "_FocusCanvas", 0, [], false); }; Application.prototype._GetAccountInfo=function () { - var action=_createMethodAction(this.context, this, "_GetAccountInfo", 1, []); + var action=_createMethodAction(this.context, this, "_GetAccountInfo", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Application.prototype._GetAccountInfoByType=function (filter) { + var action=_createMethodAction(this.context, this, "_GetAccountInfoByType", 1, [filter], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; - Application.prototype._GetControlVisibility=function (visibilityType) { - var action=_createMethodAction(this.context, this, "_GetControlVisibility", 1, [visibilityType]); + Application.prototype._GetControlVisibility=function (controlId) { + var action=_createMethodAction(this.context, this, "_GetControlVisibility", 1, [controlId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Application.prototype._GetLoggingInfo=function () { - var action=_createMethodAction(this.context, this, "_GetLoggingInfo", 1, []); + var action=_createMethodAction(this.context, this, "_GetLoggingInfo", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Application.prototype._GetObjectByReferenceId=function (referenceId) { - var action=_createMethodAction(this.context, this, "_GetObjectByReferenceId", 1, [referenceId]); + var action=_createMethodAction(this.context, this, "_GetObjectByReferenceId", 1, [referenceId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Application.prototype._GetObjectTypeNameByReferenceId=function (referenceId) { - var action=_createMethodAction(this.context, this, "_GetObjectTypeNameByReferenceId", 1, [referenceId]); + var action=_createMethodAction(this.context, this, "_GetObjectTypeNameByReferenceId", 1, [referenceId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Application.prototype._GetServiceTokenByUrl=function (url) { - var action=_createMethodAction(this.context, this, "_GetServiceTokenByUrl", 1, [url]); + var action=_createMethodAction(this.context, this, "_GetServiceTokenByUrl", 1, [url], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Application.prototype._GetServiceTokens=function (id) { - var action=_createMethodAction(this.context, this, "_GetServiceTokens", 1, [id]); + var action=_createMethodAction(this.context, this, "_GetServiceTokens", 1, [id], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Application.prototype._GetServiceTokensExt=function (id, filter) { - var action=_createMethodAction(this.context, this, "_GetServiceTokensExt", 1, [id, filter]); + var action=_createMethodAction(this.context, this, "_GetServiceTokensExt", 1, [id, filter], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Application.prototype._GetServiceUrl=function (id) { - var action=_createMethodAction(this.context, this, "_GetServiceUrl", 1, [id]); + var action=_createMethodAction(this.context, this, "_GetServiceUrl", 1, [id], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Application.prototype._IsControlEnabled=function (controlId) { + var action=_createMethodAction(this.context, this, "_IsControlEnabled", 1, [controlId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Application.prototype._RemoveAllReferences=function () { - _createMethodAction(this.context, this, "_RemoveAllReferences", 1, []); + _createMethodAction(this.context, this, "_RemoveAllReferences", 1, [], false); }; Application.prototype._RemoveReference=function (referenceId) { - _createMethodAction(this.context, this, "_RemoveReference", 1, [referenceId]); + _createMethodAction(this.context, this, "_RemoveReference", 1, [referenceId], false); }; Application.prototype._SendDataToLearningTools=function (data, sessionId) { - var action=_createMethodAction(this.context, this, "_SendDataToLearningTools", 0, [data, sessionId]); + var action=_createMethodAction(this.context, this, "_SendDataToLearningTools", 0, [data, sessionId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; - Application.prototype._SetControlVisibility=function (visibilityType, visible) { - _createMethodAction(this.context, this, "_SetControlVisibility", 0, [visibilityType, visible]); + Application.prototype._SetControlVisibility=function (controlId, visible) { + _createMethodAction(this.context, this, "_SetControlVisibility", 0, [controlId, visible], false); }; Application.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12916,7 +14452,7 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_platform"])) { - this.m__platform=obj["_platform"]; + this.__p=obj["_platform"]; } _handleNavigationPropertyResults(this, obj, ["notebooks", "Notebooks"]); }; @@ -12930,6 +14466,7 @@ var OneNote; return Application; }(OfficeExtension.ClientObject)); OneNote.Application=Application; + var _typeInkAnalysis="InkAnalysis"; var InkAnalysis=(function (_super) { __extends(InkAnalysis, _super); function InkAnalysis() { @@ -12944,42 +14481,42 @@ var OneNote; }); Object.defineProperty(InkAnalysis.prototype, "page", { get: function () { - if (!this.m_page) { - this.m_page=new OneNote.Page(this.context, _createPropertyObjectPath(this.context, this, "Page", false, false)); + if (!this._P) { + this._P=new OneNote.Page(this.context, _createPropertyObjectPath(this.context, this, "Page", false, false, false)); } - return this.m_page; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysis.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new OneNote.InkAnalysisParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._Pa) { + this._Pa=new OneNote.InkAnalysisParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysis.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "InkAnalysis", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeInkAnalysis, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysis.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkAnalysis", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkAnalysis, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InkAnalysis.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkAnalysis.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12988,10 +14525,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["page", "Page", "paragraphs", "Paragraphs"]); }; @@ -13005,10 +14542,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; InkAnalysis.prototype.track=function () { @@ -13021,12 +14558,13 @@ var OneNote; }; InkAnalysis.prototype.toJSON=function () { return { - "id": this.m_id + "id": this._I }; }; return InkAnalysis; }(OfficeExtension.ClientObject)); OneNote.InkAnalysis=InkAnalysis; + var _typeInkAnalysisParagraph="InkAnalysisParagraph"; var InkAnalysisParagraph=(function (_super) { __extends(InkAnalysisParagraph, _super); function InkAnalysisParagraph() { @@ -13041,42 +14579,42 @@ var OneNote; }); Object.defineProperty(InkAnalysisParagraph.prototype, "inkAnalysis", { get: function () { - if (!this.m_inkAnalysis) { - this.m_inkAnalysis=new OneNote.InkAnalysis(this.context, _createPropertyObjectPath(this.context, this, "InkAnalysis", false, false)); + if (!this._In) { + this._In=new OneNote.InkAnalysis(this.context, _createPropertyObjectPath(this.context, this, "InkAnalysis", false, false, false)); } - return this.m_inkAnalysis; + return this._In; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisParagraph.prototype, "lines", { get: function () { - if (!this.m_lines) { - this.m_lines=new OneNote.InkAnalysisLineCollection(this.context, _createPropertyObjectPath(this.context, this, "Lines", true, false)); + if (!this._L) { + this._L=new OneNote.InkAnalysisLineCollection(this.context, _createPropertyObjectPath(this.context, this, "Lines", true, false, false)); } - return this.m_lines; + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisParagraph.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "InkAnalysisParagraph", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeInkAnalysisParagraph, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisParagraph.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkAnalysisParagraph", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkAnalysisParagraph, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InkAnalysisParagraph.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkAnalysisParagraph.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13085,10 +14623,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["inkAnalysis", "InkAnalysis", "lines", "Lines"]); }; @@ -13102,10 +14640,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; InkAnalysisParagraph.prototype.track=function () { @@ -13118,12 +14656,13 @@ var OneNote; }; InkAnalysisParagraph.prototype.toJSON=function () { return { - "id": this.m_id + "id": this._I }; }; return InkAnalysisParagraph; }(OfficeExtension.ClientObject)); OneNote.InkAnalysisParagraph=InkAnalysisParagraph; + var _typeInkAnalysisParagraphCollection="InkAnalysisParagraphCollection"; var InkAnalysisParagraphCollection=(function (_super) { __extends(InkAnalysisParagraphCollection, _super); function InkAnalysisParagraphCollection() { @@ -13138,7 +14677,7 @@ var OneNote; }); Object.defineProperty(InkAnalysisParagraphCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "InkAnalysisParagraphCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeInkAnalysisParagraphCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -13146,16 +14685,16 @@ var OneNote; }); Object.defineProperty(InkAnalysisParagraphCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "InkAnalysisParagraphCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeInkAnalysisParagraphCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisParagraphCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkAnalysisParagraphCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkAnalysisParagraphCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -13164,10 +14703,10 @@ var OneNote; return new OneNote.InkAnalysisParagraph(this.context, _createIndexerObjectPath(this.context, this, [index])); }; InkAnalysisParagraphCollection.prototype.getItemAt=function (index) { - return new OneNote.InkAnalysisParagraph(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.InkAnalysisParagraph(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; InkAnalysisParagraphCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkAnalysisParagraphCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13176,10 +14715,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -13201,7 +14740,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; InkAnalysisParagraphCollection.prototype.track=function () { @@ -13214,12 +14753,13 @@ var OneNote; }; InkAnalysisParagraphCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return InkAnalysisParagraphCollection; }(OfficeExtension.ClientObject)); OneNote.InkAnalysisParagraphCollection=InkAnalysisParagraphCollection; + var _typeInkAnalysisLine="InkAnalysisLine"; var InkAnalysisLine=(function (_super) { __extends(InkAnalysisLine, _super); function InkAnalysisLine() { @@ -13234,42 +14774,42 @@ var OneNote; }); Object.defineProperty(InkAnalysisLine.prototype, "paragraph", { get: function () { - if (!this.m_paragraph) { - this.m_paragraph=new OneNote.InkAnalysisParagraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false)); + if (!this._P) { + this._P=new OneNote.InkAnalysisParagraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false, false)); } - return this.m_paragraph; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisLine.prototype, "words", { get: function () { - if (!this.m_words) { - this.m_words=new OneNote.InkAnalysisWordCollection(this.context, _createPropertyObjectPath(this.context, this, "Words", true, false)); + if (!this._W) { + this._W=new OneNote.InkAnalysisWordCollection(this.context, _createPropertyObjectPath(this.context, this, "Words", true, false, false)); } - return this.m_words; + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisLine.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "InkAnalysisLine", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeInkAnalysisLine, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisLine.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkAnalysisLine", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkAnalysisLine, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InkAnalysisLine.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkAnalysisLine.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13278,10 +14818,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["paragraph", "Paragraph", "words", "Words"]); }; @@ -13295,10 +14835,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; InkAnalysisLine.prototype.track=function () { @@ -13311,12 +14851,13 @@ var OneNote; }; InkAnalysisLine.prototype.toJSON=function () { return { - "id": this.m_id + "id": this._I }; }; return InkAnalysisLine; }(OfficeExtension.ClientObject)); OneNote.InkAnalysisLine=InkAnalysisLine; + var _typeInkAnalysisLineCollection="InkAnalysisLineCollection"; var InkAnalysisLineCollection=(function (_super) { __extends(InkAnalysisLineCollection, _super); function InkAnalysisLineCollection() { @@ -13331,7 +14872,7 @@ var OneNote; }); Object.defineProperty(InkAnalysisLineCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "InkAnalysisLineCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeInkAnalysisLineCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -13339,16 +14880,16 @@ var OneNote; }); Object.defineProperty(InkAnalysisLineCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "InkAnalysisLineCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeInkAnalysisLineCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisLineCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkAnalysisLineCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkAnalysisLineCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -13357,10 +14898,10 @@ var OneNote; return new OneNote.InkAnalysisLine(this.context, _createIndexerObjectPath(this.context, this, [index])); }; InkAnalysisLineCollection.prototype.getItemAt=function (index) { - return new OneNote.InkAnalysisLine(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.InkAnalysisLine(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; InkAnalysisLineCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkAnalysisLineCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13369,10 +14910,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -13394,7 +14935,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; InkAnalysisLineCollection.prototype.track=function () { @@ -13407,12 +14948,13 @@ var OneNote; }; InkAnalysisLineCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return InkAnalysisLineCollection; }(OfficeExtension.ClientObject)); OneNote.InkAnalysisLineCollection=InkAnalysisLineCollection; + var _typeInkAnalysisWord="InkAnalysisWord"; var InkAnalysisWord=(function (_super) { __extends(InkAnalysisWord, _super); function InkAnalysisWord() { @@ -13427,56 +14969,56 @@ var OneNote; }); Object.defineProperty(InkAnalysisWord.prototype, "line", { get: function () { - if (!this.m_line) { - this.m_line=new OneNote.InkAnalysisLine(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false)); + if (!this._Li) { + this._Li=new OneNote.InkAnalysisLine(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false, false)); } - return this.m_line; + return this._Li; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisWord.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "InkAnalysisWord", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeInkAnalysisWord, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisWord.prototype, "languageId", { get: function () { - _throwIfNotLoaded("languageId", this.m_languageId, "InkAnalysisWord", this._isNull); - return this.m_languageId; + _throwIfNotLoaded("languageId", this._L, _typeInkAnalysisWord, this._isNull); + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisWord.prototype, "strokePointers", { get: function () { - _throwIfNotLoaded("strokePointers", this.m_strokePointers, "InkAnalysisWord", this._isNull); - return this.m_strokePointers; + _throwIfNotLoaded("strokePointers", this._S, _typeInkAnalysisWord, this._isNull); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisWord.prototype, "wordAlternates", { get: function () { - _throwIfNotLoaded("wordAlternates", this.m_wordAlternates, "InkAnalysisWord", this._isNull); - return this.m_wordAlternates; + _throwIfNotLoaded("wordAlternates", this._W, _typeInkAnalysisWord, this._isNull); + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisWord.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkAnalysisWord", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkAnalysisWord, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InkAnalysisWord.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkAnalysisWord.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13485,19 +15027,19 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["LanguageId"])) { - this.m_languageId=obj["LanguageId"]; + this._L=obj["LanguageId"]; } if (!_isUndefined(obj["StrokePointers"])) { - this.m_strokePointers=obj["StrokePointers"]; + this._S=obj["StrokePointers"]; } if (!_isUndefined(obj["WordAlternates"])) { - this.m_wordAlternates=obj["WordAlternates"]; + this._W=obj["WordAlternates"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["line", "Line"]); }; @@ -13511,10 +15053,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; InkAnalysisWord.prototype.track=function () { @@ -13527,15 +15069,16 @@ var OneNote; }; InkAnalysisWord.prototype.toJSON=function () { return { - "id": this.m_id, - "languageId": this.m_languageId, - "strokePointers": this.m_strokePointers, - "wordAlternates": this.m_wordAlternates + "id": this._I, + "languageId": this._L, + "strokePointers": this._S, + "wordAlternates": this._W }; }; return InkAnalysisWord; }(OfficeExtension.ClientObject)); OneNote.InkAnalysisWord=InkAnalysisWord; + var _typeInkAnalysisWordCollection="InkAnalysisWordCollection"; var InkAnalysisWordCollection=(function (_super) { __extends(InkAnalysisWordCollection, _super); function InkAnalysisWordCollection() { @@ -13550,7 +15093,7 @@ var OneNote; }); Object.defineProperty(InkAnalysisWordCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "InkAnalysisWordCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeInkAnalysisWordCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -13558,16 +15101,16 @@ var OneNote; }); Object.defineProperty(InkAnalysisWordCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "InkAnalysisWordCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeInkAnalysisWordCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisWordCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkAnalysisWordCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkAnalysisWordCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -13576,10 +15119,10 @@ var OneNote; return new OneNote.InkAnalysisWord(this.context, _createIndexerObjectPath(this.context, this, [index])); }; InkAnalysisWordCollection.prototype.getItemAt=function (index) { - return new OneNote.InkAnalysisWord(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.InkAnalysisWord(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; InkAnalysisWordCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkAnalysisWordCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13588,10 +15131,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -13613,7 +15156,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; InkAnalysisWordCollection.prototype.track=function () { @@ -13626,12 +15169,13 @@ var OneNote; }; InkAnalysisWordCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return InkAnalysisWordCollection; }(OfficeExtension.ClientObject)); OneNote.InkAnalysisWordCollection=InkAnalysisWordCollection; + var _typeFloatingInk="FloatingInk"; var FloatingInk=(function (_super) { __extends(FloatingInk, _super); function FloatingInk() { @@ -13646,42 +15190,42 @@ var OneNote; }); Object.defineProperty(FloatingInk.prototype, "inkStrokes", { get: function () { - if (!this.m_inkStrokes) { - this.m_inkStrokes=new OneNote.InkStrokeCollection(this.context, _createPropertyObjectPath(this.context, this, "InkStrokes", true, false)); + if (!this._In) { + this._In=new OneNote.InkStrokeCollection(this.context, _createPropertyObjectPath(this.context, this, "InkStrokes", true, false, false)); } - return this.m_inkStrokes; + return this._In; }, enumerable: true, configurable: true }); Object.defineProperty(FloatingInk.prototype, "pageContent", { get: function () { - if (!this.m_pageContent) { - this.m_pageContent=new OneNote.PageContent(this.context, _createPropertyObjectPath(this.context, this, "PageContent", false, false)); + if (!this._P) { + this._P=new OneNote.PageContent(this.context, _createPropertyObjectPath(this.context, this, "PageContent", false, false, false)); } - return this.m_pageContent; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(FloatingInk.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "FloatingInk", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeFloatingInk, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(FloatingInk.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "FloatingInk", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeFloatingInk, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); FloatingInk.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; FloatingInk.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13690,10 +15234,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["inkStrokes", "InkStrokes", "pageContent", "PageContent"]); }; @@ -13707,10 +15251,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; FloatingInk.prototype.track=function () { @@ -13723,12 +15267,13 @@ var OneNote; }; FloatingInk.prototype.toJSON=function () { return { - "id": this.m_id + "id": this._I }; }; return FloatingInk; }(OfficeExtension.ClientObject)); OneNote.FloatingInk=FloatingInk; + var _typeInkStroke="InkStroke"; var InkStroke=(function (_super) { __extends(InkStroke, _super); function InkStroke() { @@ -13743,32 +15288,32 @@ var OneNote; }); Object.defineProperty(InkStroke.prototype, "floatingInk", { get: function () { - if (!this.m_floatingInk) { - this.m_floatingInk=new OneNote.FloatingInk(this.context, _createPropertyObjectPath(this.context, this, "FloatingInk", false, false)); + if (!this._F) { + this._F=new OneNote.FloatingInk(this.context, _createPropertyObjectPath(this.context, this, "FloatingInk", false, false, false)); } - return this.m_floatingInk; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(InkStroke.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "InkStroke", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeInkStroke, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(InkStroke.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkStroke", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkStroke, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InkStroke.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkStroke.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13777,10 +15322,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["floatingInk", "FloatingInk"]); }; @@ -13794,10 +15339,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; InkStroke.prototype.track=function () { @@ -13810,12 +15355,13 @@ var OneNote; }; InkStroke.prototype.toJSON=function () { return { - "id": this.m_id + "id": this._I }; }; return InkStroke; }(OfficeExtension.ClientObject)); OneNote.InkStroke=InkStroke; + var _typeInkStrokeCollection="InkStrokeCollection"; var InkStrokeCollection=(function (_super) { __extends(InkStrokeCollection, _super); function InkStrokeCollection() { @@ -13830,7 +15376,7 @@ var OneNote; }); Object.defineProperty(InkStrokeCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "InkStrokeCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeInkStrokeCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -13838,16 +15384,16 @@ var OneNote; }); Object.defineProperty(InkStrokeCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "InkStrokeCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeInkStrokeCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(InkStrokeCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkStrokeCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkStrokeCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -13856,10 +15402,10 @@ var OneNote; return new OneNote.InkStroke(this.context, _createIndexerObjectPath(this.context, this, [index])); }; InkStrokeCollection.prototype.getItemAt=function (index) { - return new OneNote.InkStroke(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.InkStroke(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; InkStrokeCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkStrokeCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13868,10 +15414,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -13893,7 +15439,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; InkStrokeCollection.prototype.track=function () { @@ -13906,12 +15452,13 @@ var OneNote; }; InkStrokeCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return InkStrokeCollection; }(OfficeExtension.ClientObject)); OneNote.InkStrokeCollection=InkStrokeCollection; + var _typeInkWord="InkWord"; var InkWord=(function (_super) { __extends(InkWord, _super); function InkWord() { @@ -13926,48 +15473,48 @@ var OneNote; }); Object.defineProperty(InkWord.prototype, "paragraph", { get: function () { - if (!this.m_paragraph) { - this.m_paragraph=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false)); + if (!this._P) { + this._P=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false, false)); } - return this.m_paragraph; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(InkWord.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "InkWord", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeInkWord, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(InkWord.prototype, "languageId", { get: function () { - _throwIfNotLoaded("languageId", this.m_languageId, "InkWord", this._isNull); - return this.m_languageId; + _throwIfNotLoaded("languageId", this._L, _typeInkWord, this._isNull); + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(InkWord.prototype, "wordAlternates", { get: function () { - _throwIfNotLoaded("wordAlternates", this.m_wordAlternates, "InkWord", this._isNull); - return this.m_wordAlternates; + _throwIfNotLoaded("wordAlternates", this._W, _typeInkWord, this._isNull); + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(InkWord.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkWord", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkWord, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InkWord.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkWord.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13976,16 +15523,16 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["LanguageId"])) { - this.m_languageId=obj["LanguageId"]; + this._L=obj["LanguageId"]; } if (!_isUndefined(obj["WordAlternates"])) { - this.m_wordAlternates=obj["WordAlternates"]; + this._W=obj["WordAlternates"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["paragraph", "Paragraph"]); }; @@ -13999,10 +15546,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; InkWord.prototype.track=function () { @@ -14015,14 +15562,15 @@ var OneNote; }; InkWord.prototype.toJSON=function () { return { - "id": this.m_id, - "languageId": this.m_languageId, - "wordAlternates": this.m_wordAlternates + "id": this._I, + "languageId": this._L, + "wordAlternates": this._W }; }; return InkWord; }(OfficeExtension.ClientObject)); OneNote.InkWord=InkWord; + var _typeInkWordCollection="InkWordCollection"; var InkWordCollection=(function (_super) { __extends(InkWordCollection, _super); function InkWordCollection() { @@ -14037,7 +15585,7 @@ var OneNote; }); Object.defineProperty(InkWordCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "InkWordCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeInkWordCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14045,16 +15593,16 @@ var OneNote; }); Object.defineProperty(InkWordCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "InkWordCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeInkWordCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(InkWordCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkWordCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkWordCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -14063,10 +15611,10 @@ var OneNote; return new OneNote.InkWord(this.context, _createIndexerObjectPath(this.context, this, [index])); }; InkWordCollection.prototype.getItemAt=function (index) { - return new OneNote.InkWord(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.InkWord(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; InkWordCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkWordCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14075,10 +15623,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14100,7 +15648,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; InkWordCollection.prototype.track=function () { @@ -14113,12 +15661,13 @@ var OneNote; }; InkWordCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return InkWordCollection; }(OfficeExtension.ClientObject)); OneNote.InkWordCollection=InkWordCollection; + var _typeNotebook="Notebook"; var Notebook=(function (_super) { __extends(Notebook, _super); function Notebook() { @@ -14133,81 +15682,81 @@ var OneNote; }); Object.defineProperty(Notebook.prototype, "sectionGroups", { get: function () { - if (!this.m_sectionGroups) { - this.m_sectionGroups=new OneNote.SectionGroupCollection(this.context, _createPropertyObjectPath(this.context, this, "SectionGroups", true, false)); + if (!this._S) { + this._S=new OneNote.SectionGroupCollection(this.context, _createPropertyObjectPath(this.context, this, "SectionGroups", true, false, false)); } - return this.m_sectionGroups; + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(Notebook.prototype, "sections", { get: function () { - if (!this.m_sections) { - this.m_sections=new OneNote.SectionCollection(this.context, _createPropertyObjectPath(this.context, this, "Sections", true, false)); + if (!this._Se) { + this._Se=new OneNote.SectionCollection(this.context, _createPropertyObjectPath(this.context, this, "Sections", true, false, false)); } - return this.m_sections; + return this._Se; }, enumerable: true, configurable: true }); Object.defineProperty(Notebook.prototype, "baseUrl", { get: function () { - _throwIfNotLoaded("baseUrl", this.m_baseUrl, "Notebook", this._isNull); - return this.m_baseUrl; + _throwIfNotLoaded("baseUrl", this._B, _typeNotebook, this._isNull); + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(Notebook.prototype, "clientUrl", { get: function () { - _throwIfNotLoaded("clientUrl", this.m_clientUrl, "Notebook", this._isNull); - return this.m_clientUrl; + _throwIfNotLoaded("clientUrl", this._C, _typeNotebook, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Notebook.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Notebook", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeNotebook, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Notebook.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "Notebook", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeNotebook, this._isNull); + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(Notebook.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Notebook", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeNotebook, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Notebook.prototype.addSection=function (name) { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "AddSection", 0, [name], false, true, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "AddSection", 0, [name], false, true, null, false)); }; Notebook.prototype.addSectionGroup=function (name) { - return new OneNote.SectionGroup(this.context, _createMethodObjectPath(this.context, this, "AddSectionGroup", 0, [name], false, true, null)); + return new OneNote.SectionGroup(this.context, _createMethodObjectPath(this.context, this, "AddSectionGroup", 0, [name], false, true, null, false)); }; Notebook.prototype.getRestApiId=function () { - var action=_createMethodAction(this.context, this, "GetRestApiId", 1, []); + var action=_createMethodAction(this.context, this, "GetRestApiId", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Notebook.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Notebook.prototype._Sync=function () { - _createMethodAction(this.context, this, "_Sync", 0, []); + _createMethodAction(this.context, this, "_Sync", 0, [], false); }; Notebook.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14216,19 +15765,19 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["BaseUrl"])) { - this.m_baseUrl=obj["BaseUrl"]; + this._B=obj["BaseUrl"]; } if (!_isUndefined(obj["ClientUrl"])) { - this.m_clientUrl=obj["ClientUrl"]; + this._C=obj["ClientUrl"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["sectionGroups", "SectionGroups", "sections", "Sections"]); }; @@ -14242,10 +15791,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; Notebook.prototype.track=function () { @@ -14258,15 +15807,16 @@ var OneNote; }; Notebook.prototype.toJSON=function () { return { - "baseUrl": this.m_baseUrl, - "clientUrl": this.m_clientUrl, - "id": this.m_id, - "name": this.m_name + "baseUrl": this._B, + "clientUrl": this._C, + "id": this._I, + "name": this._N }; }; return Notebook; }(OfficeExtension.ClientObject)); OneNote.Notebook=Notebook; + var _typeNotebookCollection="NotebookCollection"; var NotebookCollection=(function (_super) { __extends(NotebookCollection, _super); function NotebookCollection() { @@ -14281,7 +15831,7 @@ var OneNote; }); Object.defineProperty(NotebookCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "NotebookCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeNotebookCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14289,31 +15839,31 @@ var OneNote; }); Object.defineProperty(NotebookCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "NotebookCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeNotebookCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(NotebookCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "NotebookCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeNotebookCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); NotebookCollection.prototype.getByName=function (name) { - return new OneNote.NotebookCollection(this.context, _createMethodObjectPath(this.context, this, "GetByName", 1, [name], true, false, null)); + return new OneNote.NotebookCollection(this.context, _createMethodObjectPath(this.context, this, "GetByName", 1, [name], true, false, null, false)); }; NotebookCollection.prototype.getItem=function (index) { return new OneNote.Notebook(this.context, _createIndexerObjectPath(this.context, this, [index])); }; NotebookCollection.prototype.getItemAt=function (index) { - return new OneNote.Notebook(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.Notebook(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; NotebookCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; NotebookCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14322,10 +15872,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14347,7 +15897,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; NotebookCollection.prototype.track=function () { @@ -14360,12 +15910,13 @@ var OneNote; }; NotebookCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return NotebookCollection; }(OfficeExtension.ClientObject)); OneNote.NotebookCollection=NotebookCollection; + var _typeSectionGroup="SectionGroup"; var SectionGroup=(function (_super) { __extends(SectionGroup, _super); function SectionGroup() { @@ -14380,100 +15931,100 @@ var OneNote; }); Object.defineProperty(SectionGroup.prototype, "notebook", { get: function () { - if (!this.m_notebook) { - this.m_notebook=new OneNote.Notebook(this.context, _createPropertyObjectPath(this.context, this, "Notebook", false, false)); + if (!this._No) { + this._No=new OneNote.Notebook(this.context, _createPropertyObjectPath(this.context, this, "Notebook", false, false, false)); } - return this.m_notebook; + return this._No; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "parentSectionGroup", { get: function () { - if (!this.m_parentSectionGroup) { - this.m_parentSectionGroup=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroup", false, false)); + if (!this._P) { + this._P=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroup", false, false, false)); } - return this.m_parentSectionGroup; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "parentSectionGroupOrNull", { get: function () { - if (!this.m_parentSectionGroupOrNull) { - this.m_parentSectionGroupOrNull=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroupOrNull", false, false)); + if (!this._Pa) { + this._Pa=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroupOrNull", false, false, false)); } - return this.m_parentSectionGroupOrNull; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "sectionGroups", { get: function () { - if (!this.m_sectionGroups) { - this.m_sectionGroups=new OneNote.SectionGroupCollection(this.context, _createPropertyObjectPath(this.context, this, "SectionGroups", true, false)); + if (!this._S) { + this._S=new OneNote.SectionGroupCollection(this.context, _createPropertyObjectPath(this.context, this, "SectionGroups", true, false, false)); } - return this.m_sectionGroups; + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "sections", { get: function () { - if (!this.m_sections) { - this.m_sections=new OneNote.SectionCollection(this.context, _createPropertyObjectPath(this.context, this, "Sections", true, false)); + if (!this._Se) { + this._Se=new OneNote.SectionCollection(this.context, _createPropertyObjectPath(this.context, this, "Sections", true, false, false)); } - return this.m_sections; + return this._Se; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "clientUrl", { get: function () { - _throwIfNotLoaded("clientUrl", this.m_clientUrl, "SectionGroup", this._isNull); - return this.m_clientUrl; + _throwIfNotLoaded("clientUrl", this._C, _typeSectionGroup, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "SectionGroup", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeSectionGroup, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "SectionGroup", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeSectionGroup, this._isNull); + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "SectionGroup", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeSectionGroup, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); SectionGroup.prototype.addSection=function (title) { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "AddSection", 0, [title], false, true, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "AddSection", 0, [title], false, true, null, false)); }; SectionGroup.prototype.addSectionGroup=function (name) { - return new OneNote.SectionGroup(this.context, _createMethodObjectPath(this.context, this, "AddSectionGroup", 0, [name], false, true, null)); + return new OneNote.SectionGroup(this.context, _createMethodObjectPath(this.context, this, "AddSectionGroup", 0, [name], false, true, null, false)); }; SectionGroup.prototype.getRestApiId=function () { - var action=_createMethodAction(this.context, this, "GetRestApiId", 1, []); + var action=_createMethodAction(this.context, this, "GetRestApiId", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; SectionGroup.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; SectionGroup.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14482,16 +16033,16 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["ClientUrl"])) { - this.m_clientUrl=obj["ClientUrl"]; + this._C=obj["ClientUrl"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["notebook", "Notebook", "parentSectionGroup", "ParentSectionGroup", "parentSectionGroupOrNull", "ParentSectionGroupOrNull", "sectionGroups", "SectionGroups", "sections", "Sections"]); }; @@ -14505,10 +16056,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; SectionGroup.prototype.track=function () { @@ -14521,14 +16072,15 @@ var OneNote; }; SectionGroup.prototype.toJSON=function () { return { - "clientUrl": this.m_clientUrl, - "id": this.m_id, - "name": this.m_name + "clientUrl": this._C, + "id": this._I, + "name": this._N }; }; return SectionGroup; }(OfficeExtension.ClientObject)); OneNote.SectionGroup=SectionGroup; + var _typeSectionGroupCollection="SectionGroupCollection"; var SectionGroupCollection=(function (_super) { __extends(SectionGroupCollection, _super); function SectionGroupCollection() { @@ -14543,7 +16095,7 @@ var OneNote; }); Object.defineProperty(SectionGroupCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "SectionGroupCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeSectionGroupCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14551,31 +16103,31 @@ var OneNote; }); Object.defineProperty(SectionGroupCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "SectionGroupCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeSectionGroupCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroupCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "SectionGroupCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeSectionGroupCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); SectionGroupCollection.prototype.getByName=function (name) { - return new OneNote.SectionGroupCollection(this.context, _createMethodObjectPath(this.context, this, "GetByName", 1, [name], true, false, null)); + return new OneNote.SectionGroupCollection(this.context, _createMethodObjectPath(this.context, this, "GetByName", 1, [name], true, false, null, false)); }; SectionGroupCollection.prototype.getItem=function (index) { return new OneNote.SectionGroup(this.context, _createIndexerObjectPath(this.context, this, [index])); }; SectionGroupCollection.prototype.getItemAt=function (index) { - return new OneNote.SectionGroup(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.SectionGroup(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; SectionGroupCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; SectionGroupCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14584,10 +16136,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14609,7 +16161,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; SectionGroupCollection.prototype.track=function () { @@ -14622,12 +16174,13 @@ var OneNote; }; SectionGroupCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return SectionGroupCollection; }(OfficeExtension.ClientObject)); OneNote.SectionGroupCollection=SectionGroupCollection; + var _typeSection="Section"; var Section=(function (_super) { __extends(Section, _super); function Section() { @@ -14642,96 +16195,116 @@ var OneNote; }); Object.defineProperty(Section.prototype, "notebook", { get: function () { - if (!this.m_notebook) { - this.m_notebook=new OneNote.Notebook(this.context, _createPropertyObjectPath(this.context, this, "Notebook", false, false)); + if (!this._No) { + this._No=new OneNote.Notebook(this.context, _createPropertyObjectPath(this.context, this, "Notebook", false, false, false)); } - return this.m_notebook; + return this._No; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "pages", { get: function () { - if (!this.m_pages) { - this.m_pages=new OneNote.PageCollection(this.context, _createPropertyObjectPath(this.context, this, "Pages", true, false)); + if (!this._P) { + this._P=new OneNote.PageCollection(this.context, _createPropertyObjectPath(this.context, this, "Pages", true, false, false)); } - return this.m_pages; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "parentSectionGroup", { get: function () { - if (!this.m_parentSectionGroup) { - this.m_parentSectionGroup=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroup", false, false)); + if (!this._Pa) { + this._Pa=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroup", false, false, false)); } - return this.m_parentSectionGroup; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "parentSectionGroupOrNull", { get: function () { - if (!this.m_parentSectionGroupOrNull) { - this.m_parentSectionGroupOrNull=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroupOrNull", false, false)); + if (!this._Par) { + this._Par=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroupOrNull", false, false, false)); } - return this.m_parentSectionGroupOrNull; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "clientUrl", { get: function () { - _throwIfNotLoaded("clientUrl", this.m_clientUrl, "Section", this._isNull); - return this.m_clientUrl; + _throwIfNotLoaded("clientUrl", this._C, _typeSection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Section", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeSection, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "Section", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeSection, this._isNull); + return this._N; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Section.prototype, "webUrl", { + get: function () { + _throwIfNotLoaded("webUrl", this._W, _typeSection, this._isNull); + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Section", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeSection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Section.prototype.addPage=function (title) { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "AddPage", 0, [title], false, true, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "AddPage", 0, [title], false, true, null, false)); }; Section.prototype.copyToNotebook=function (destinationNotebook) { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "CopyToNotebook", 0, [destinationNotebook], false, true, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "CopyToNotebook", 0, [destinationNotebook], false, true, null, false)); }; Section.prototype.copyToSectionGroup=function (destinationSectionGroup) { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "CopyToSectionGroup", 0, [destinationSectionGroup], false, true, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "CopyToSectionGroup", 0, [destinationSectionGroup], false, true, null, false)); }; Section.prototype.getRestApiId=function () { - var action=_createMethodAction(this.context, this, "GetRestApiId", 1, []); + var action=_createMethodAction(this.context, this, "GetRestApiId", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Section.prototype.insertSectionAsSibling=function (location, title) { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "InsertSectionAsSibling", 0, [location, title], false, true, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "InsertSectionAsSibling", 0, [location, title], false, true, null, false)); + }; + Section.prototype._GetGeoInfo=function () { + var action=_createMethodAction(this.context, this, "_GetGeoInfo", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Section.prototype._GetGeoInfoAsync=function () { + var action=_createMethodAction(this.context, this, "_GetGeoInfoAsync", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; }; Section.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Section.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14740,16 +16313,19 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["ClientUrl"])) { - this.m_clientUrl=obj["ClientUrl"]; + this._C=obj["ClientUrl"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; + } + if (!_isUndefined(obj["WebUrl"])) { + this._W=obj["WebUrl"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["notebook", "Notebook", "pages", "Pages", "parentSectionGroup", "ParentSectionGroup", "parentSectionGroupOrNull", "ParentSectionGroupOrNull"]); }; @@ -14763,10 +16339,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; Section.prototype.track=function () { @@ -14779,14 +16355,16 @@ var OneNote; }; Section.prototype.toJSON=function () { return { - "clientUrl": this.m_clientUrl, - "id": this.m_id, - "name": this.m_name + "clientUrl": this._C, + "id": this._I, + "name": this._N, + "webUrl": this._W }; }; return Section; }(OfficeExtension.ClientObject)); OneNote.Section=Section; + var _typeSectionCollection="SectionCollection"; var SectionCollection=(function (_super) { __extends(SectionCollection, _super); function SectionCollection() { @@ -14801,7 +16379,7 @@ var OneNote; }); Object.defineProperty(SectionCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "SectionCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeSectionCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14809,31 +16387,31 @@ var OneNote; }); Object.defineProperty(SectionCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "SectionCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeSectionCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(SectionCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "SectionCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeSectionCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); SectionCollection.prototype.getByName=function (name) { - return new OneNote.SectionCollection(this.context, _createMethodObjectPath(this.context, this, "GetByName", 1, [name], true, false, null)); + return new OneNote.SectionCollection(this.context, _createMethodObjectPath(this.context, this, "GetByName", 1, [name], true, false, null, false)); }; SectionCollection.prototype.getItem=function (index) { return new OneNote.Section(this.context, _createIndexerObjectPath(this.context, this, [index])); }; SectionCollection.prototype.getItemAt=function (index) { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; SectionCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; SectionCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14842,10 +16420,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14867,7 +16445,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; SectionCollection.prototype.track=function () { @@ -14880,12 +16458,13 @@ var OneNote; }; SectionCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return SectionCollection; }(OfficeExtension.ClientObject)); OneNote.SectionCollection=SectionCollection; + var _typePage="Page"; var Page=(function (_super) { __extends(Page, _super); function Page() { @@ -14900,65 +16479,65 @@ var OneNote; }); Object.defineProperty(Page.prototype, "contents", { get: function () { - if (!this.m_contents) { - this.m_contents=new OneNote.PageContentCollection(this.context, _createPropertyObjectPath(this.context, this, "Contents", true, false)); + if (!this._Co) { + this._Co=new OneNote.PageContentCollection(this.context, _createPropertyObjectPath(this.context, this, "Contents", true, false, false)); } - return this.m_contents; + return this._Co; }, enumerable: true, configurable: true }); Object.defineProperty(Page.prototype, "inkAnalysisOrNull", { get: function () { - if (!this.m_inkAnalysisOrNull) { - this.m_inkAnalysisOrNull=new OneNote.InkAnalysis(this.context, _createPropertyObjectPath(this.context, this, "InkAnalysisOrNull", false, false)); + if (!this._In) { + this._In=new OneNote.InkAnalysis(this.context, _createPropertyObjectPath(this.context, this, "InkAnalysisOrNull", false, false, false)); } - return this.m_inkAnalysisOrNull; + return this._In; }, enumerable: true, configurable: true }); Object.defineProperty(Page.prototype, "parentSection", { get: function () { - if (!this.m_parentSection) { - this.m_parentSection=new OneNote.Section(this.context, _createPropertyObjectPath(this.context, this, "ParentSection", false, false)); + if (!this._Pa) { + this._Pa=new OneNote.Section(this.context, _createPropertyObjectPath(this.context, this, "ParentSection", false, false, false)); } - return this.m_parentSection; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Page.prototype, "classNotebookPageSource", { get: function () { - _throwIfNotLoaded("classNotebookPageSource", this.m_classNotebookPageSource, "Page", this._isNull); - return this.m_classNotebookPageSource; + _throwIfNotLoaded("classNotebookPageSource", this._C, _typePage, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Page.prototype, "clientUrl", { get: function () { - _throwIfNotLoaded("clientUrl", this.m_clientUrl, "Page", this._isNull); - return this.m_clientUrl; + _throwIfNotLoaded("clientUrl", this._Cl, _typePage, this._isNull); + return this._Cl; }, enumerable: true, configurable: true }); Object.defineProperty(Page.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Page", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typePage, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Page.prototype, "pageLevel", { get: function () { - _throwIfNotLoaded("pageLevel", this.m_pageLevel, "Page", this._isNull); - return this.m_pageLevel; + _throwIfNotLoaded("pageLevel", this._P, _typePage, this._isNull); + return this._P; }, set: function (value) { - this.m_pageLevel=value; + this._P=value; _createSetPropertyAction(this.context, this, "PageLevel", value); }, enumerable: true, @@ -14966,11 +16545,11 @@ var OneNote; }); Object.defineProperty(Page.prototype, "title", { get: function () { - _throwIfNotLoaded("title", this.m_title, "Page", this._isNull); - return this.m_title; + _throwIfNotLoaded("title", this._T, _typePage, this._isNull); + return this._T; }, set: function (value) { - this.m_title=value; + this._T=value; _createSetPropertyAction(this.context, this, "Title", value); }, enumerable: true, @@ -14978,16 +16557,16 @@ var OneNote; }); Object.defineProperty(Page.prototype, "webUrl", { get: function () { - _throwIfNotLoaded("webUrl", this.m_webUrl, "Page", this._isNull); - return this.m_webUrl; + _throwIfNotLoaded("webUrl", this._W, _typePage, this._isNull); + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(Page.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Page", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typePage, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -15003,34 +16582,34 @@ var OneNote; ]); }; Page.prototype.addOutline=function (left, top, html) { - return new OneNote.Outline(this.context, _createMethodObjectPath(this.context, this, "AddOutline", 0, [left, top, html], false, true, null)); + return new OneNote.Outline(this.context, _createMethodObjectPath(this.context, this, "AddOutline", 0, [left, top, html], false, true, null, false)); }; Page.prototype.copyToSection=function (destinationSection) { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "CopyToSection", 0, [destinationSection], false, true, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "CopyToSection", 0, [destinationSection], false, true, null, false)); }; Page.prototype.copyToSectionAndSetClassNotebookPageSource=function (destinationSection) { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "CopyToSectionAndSetClassNotebookPageSource", 0, [destinationSection], false, true, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "CopyToSectionAndSetClassNotebookPageSource", 0, [destinationSection], false, true, null, false)); }; Page.prototype.getRestApiId=function () { - var action=_createMethodAction(this.context, this, "GetRestApiId", 1, []); + var action=_createMethodAction(this.context, this, "GetRestApiId", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Page.prototype.hasTitleContent=function () { - var action=_createMethodAction(this.context, this, "HasTitleContent", 1, []); + var action=_createMethodAction(this.context, this, "HasTitleContent", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Page.prototype.insertPageAsSibling=function (location, title) { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "InsertPageAsSibling", 0, [location, title], false, true, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "InsertPageAsSibling", 0, [location, title], false, true, null, false)); }; Page.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Page.prototype._Sync=function () { - _createMethodAction(this.context, this, "_Sync", 0, []); + _createMethodAction(this.context, this, "_Sync", 0, [], false); }; Page.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15039,25 +16618,25 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["ClassNotebookPageSource"])) { - this.m_classNotebookPageSource=obj["ClassNotebookPageSource"]; + this._C=obj["ClassNotebookPageSource"]; } if (!_isUndefined(obj["ClientUrl"])) { - this.m_clientUrl=obj["ClientUrl"]; + this._Cl=obj["ClientUrl"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["PageLevel"])) { - this.m_pageLevel=obj["PageLevel"]; + this._P=obj["PageLevel"]; } if (!_isUndefined(obj["Title"])) { - this.m_title=obj["Title"]; + this._T=obj["Title"]; } if (!_isUndefined(obj["WebUrl"])) { - this.m_webUrl=obj["WebUrl"]; + this._W=obj["WebUrl"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["contents", "Contents", "inkAnalysisOrNull", "InkAnalysisOrNull", "parentSection", "ParentSection"]); }; @@ -15071,10 +16650,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; Page.prototype.track=function () { @@ -15087,17 +16666,18 @@ var OneNote; }; Page.prototype.toJSON=function () { return { - "classNotebookPageSource": this.m_classNotebookPageSource, - "clientUrl": this.m_clientUrl, - "id": this.m_id, - "pageLevel": this.m_pageLevel, - "title": this.m_title, - "webUrl": this.m_webUrl + "classNotebookPageSource": this._C, + "clientUrl": this._Cl, + "id": this._I, + "pageLevel": this._P, + "title": this._T, + "webUrl": this._W }; }; return Page; }(OfficeExtension.ClientObject)); OneNote.Page=Page; + var _typePageCollection="PageCollection"; var PageCollection=(function (_super) { __extends(PageCollection, _super); function PageCollection() { @@ -15112,7 +16692,7 @@ var OneNote; }); Object.defineProperty(PageCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "PageCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typePageCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15120,31 +16700,31 @@ var OneNote; }); Object.defineProperty(PageCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "PageCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typePageCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(PageCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "PageCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typePageCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); PageCollection.prototype.getByTitle=function (title) { - return new OneNote.PageCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTitle", 1, [title], true, false, null)); + return new OneNote.PageCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTitle", 1, [title], true, false, null, false)); }; PageCollection.prototype.getItem=function (index) { return new OneNote.Page(this.context, _createIndexerObjectPath(this.context, this, [index])); }; PageCollection.prototype.getItemAt=function (index) { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; PageCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; PageCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15153,10 +16733,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15178,7 +16758,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; PageCollection.prototype.track=function () { @@ -15191,12 +16771,13 @@ var OneNote; }; PageCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return PageCollection; }(OfficeExtension.ClientObject)); OneNote.PageCollection=PageCollection; + var _typePageContent="PageContent"; var PageContent=(function (_super) { __extends(PageContent, _super); function PageContent() { @@ -15211,59 +16792,59 @@ var OneNote; }); Object.defineProperty(PageContent.prototype, "image", { get: function () { - if (!this.m_image) { - this.m_image=new OneNote.Image(this.context, _createPropertyObjectPath(this.context, this, "Image", false, false)); + if (!this._Im) { + this._Im=new OneNote.Image(this.context, _createPropertyObjectPath(this.context, this, "Image", false, false, false)); } - return this.m_image; + return this._Im; }, enumerable: true, configurable: true }); Object.defineProperty(PageContent.prototype, "ink", { get: function () { - if (!this.m_ink) { - this.m_ink=new OneNote.FloatingInk(this.context, _createPropertyObjectPath(this.context, this, "Ink", false, false)); + if (!this._In) { + this._In=new OneNote.FloatingInk(this.context, _createPropertyObjectPath(this.context, this, "Ink", false, false, false)); } - return this.m_ink; + return this._In; }, enumerable: true, configurable: true }); Object.defineProperty(PageContent.prototype, "outline", { get: function () { - if (!this.m_outline) { - this.m_outline=new OneNote.Outline(this.context, _createPropertyObjectPath(this.context, this, "Outline", false, false)); + if (!this._O) { + this._O=new OneNote.Outline(this.context, _createPropertyObjectPath(this.context, this, "Outline", false, false, false)); } - return this.m_outline; + return this._O; }, enumerable: true, configurable: true }); Object.defineProperty(PageContent.prototype, "parentPage", { get: function () { - if (!this.m_parentPage) { - this.m_parentPage=new OneNote.Page(this.context, _createPropertyObjectPath(this.context, this, "ParentPage", false, false)); + if (!this._P) { + this._P=new OneNote.Page(this.context, _createPropertyObjectPath(this.context, this, "ParentPage", false, false, false)); } - return this.m_parentPage; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(PageContent.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "PageContent", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typePageContent, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(PageContent.prototype, "left", { get: function () { - _throwIfNotLoaded("left", this.m_left, "PageContent", this._isNull); - return this.m_left; + _throwIfNotLoaded("left", this._L, _typePageContent, this._isNull); + return this._L; }, set: function (value) { - this.m_left=value; + this._L=value; _createSetPropertyAction(this.context, this, "Left", value); }, enumerable: true, @@ -15271,11 +16852,11 @@ var OneNote; }); Object.defineProperty(PageContent.prototype, "top", { get: function () { - _throwIfNotLoaded("top", this.m_top, "PageContent", this._isNull); - return this.m_top; + _throwIfNotLoaded("top", this._T, _typePageContent, this._isNull); + return this._T; }, set: function (value) { - this.m_top=value; + this._T=value; _createSetPropertyAction(this.context, this, "Top", value); }, enumerable: true, @@ -15283,16 +16864,16 @@ var OneNote; }); Object.defineProperty(PageContent.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "PageContent", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._Ty, _typePageContent, this._isNull); + return this._Ty; }, enumerable: true, configurable: true }); Object.defineProperty(PageContent.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "PageContent", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typePageContent, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -15310,10 +16891,10 @@ var OneNote; ]); }; PageContent.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; PageContent.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; PageContent.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15322,19 +16903,19 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Left"])) { - this.m_left=obj["Left"]; + this._L=obj["Left"]; } if (!_isUndefined(obj["Top"])) { - this.m_top=obj["Top"]; + this._T=obj["Top"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._Ty=obj["Type"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["image", "Image", "ink", "Ink", "outline", "Outline", "parentPage", "ParentPage"]); }; @@ -15348,10 +16929,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; PageContent.prototype.track=function () { @@ -15364,15 +16945,16 @@ var OneNote; }; PageContent.prototype.toJSON=function () { return { - "id": this.m_id, - "left": this.m_left, - "top": this.m_top, - "type": this.m_type + "id": this._I, + "left": this._L, + "top": this._T, + "type": this._Ty }; }; return PageContent; }(OfficeExtension.ClientObject)); OneNote.PageContent=PageContent; + var _typePageContentCollection="PageContentCollection"; var PageContentCollection=(function (_super) { __extends(PageContentCollection, _super); function PageContentCollection() { @@ -15387,7 +16969,7 @@ var OneNote; }); Object.defineProperty(PageContentCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "PageContentCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typePageContentCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15395,16 +16977,16 @@ var OneNote; }); Object.defineProperty(PageContentCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "PageContentCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typePageContentCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(PageContentCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "PageContentCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typePageContentCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -15413,10 +16995,10 @@ var OneNote; return new OneNote.PageContent(this.context, _createIndexerObjectPath(this.context, this, [index])); }; PageContentCollection.prototype.getItemAt=function (index) { - return new OneNote.PageContent(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.PageContent(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; PageContentCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; PageContentCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15425,10 +17007,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15450,7 +17032,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; PageContentCollection.prototype.track=function () { @@ -15463,12 +17045,13 @@ var OneNote; }; PageContentCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return PageContentCollection; }(OfficeExtension.ClientObject)); OneNote.PageContentCollection=PageContentCollection; + var _typeOutline="Outline"; var Outline=(function (_super) { __extends(Outline, _super); function Outline() { @@ -15483,54 +17066,60 @@ var OneNote; }); Object.defineProperty(Outline.prototype, "pageContent", { get: function () { - if (!this.m_pageContent) { - this.m_pageContent=new OneNote.PageContent(this.context, _createPropertyObjectPath(this.context, this, "PageContent", false, false)); + if (!this._P) { + this._P=new OneNote.PageContent(this.context, _createPropertyObjectPath(this.context, this, "PageContent", false, false, false)); } - return this.m_pageContent; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Outline.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new OneNote.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._Pa) { + this._Pa=new OneNote.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Outline.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Outline", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeOutline, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Outline.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Outline", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeOutline, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Outline.prototype.appendHtml=function (html) { - _createMethodAction(this.context, this, "AppendHtml", 0, [html]); + _createMethodAction(this.context, this, "AppendHtml", 0, [html], false); }; Outline.prototype.appendImage=function (base64EncodedImage, width, height) { - return new OneNote.Image(this.context, _createMethodObjectPath(this.context, this, "AppendImage", 0, [base64EncodedImage, width, height], false, true, null)); + return new OneNote.Image(this.context, _createMethodObjectPath(this.context, this, "AppendImage", 0, [base64EncodedImage, width, height], false, true, null, false)); }; Outline.prototype.appendRichText=function (paragraphText) { - return new OneNote.RichText(this.context, _createMethodObjectPath(this.context, this, "AppendRichText", 0, [paragraphText], false, true, null)); + return new OneNote.RichText(this.context, _createMethodObjectPath(this.context, this, "AppendRichText", 0, [paragraphText], false, true, null, false)); }; Outline.prototype.appendTable=function (rowCount, columnCount, values) { - return new OneNote.Table(this.context, _createMethodObjectPath(this.context, this, "AppendTable", 0, [rowCount, columnCount, values], false, true, null)); + return new OneNote.Table(this.context, _createMethodObjectPath(this.context, this, "AppendTable", 0, [rowCount, columnCount, values], false, true, null, false)); + }; + Outline.prototype.isTitle=function () { + var action=_createMethodAction(this.context, this, "IsTitle", 0, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; }; Outline.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Outline.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15539,10 +17128,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["pageContent", "PageContent", "paragraphs", "Paragraphs"]); }; @@ -15556,10 +17145,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; Outline.prototype.track=function () { @@ -15572,12 +17161,13 @@ var OneNote; }; Outline.prototype.toJSON=function () { return { - "id": this.m_id + "id": this._I }; }; return Outline; }(OfficeExtension.ClientObject)); OneNote.Outline=Outline; + var _typeParagraph="Paragraph"; var Paragraph=(function (_super) { __extends(Paragraph, _super); function Paragraph() { @@ -15592,151 +17182,154 @@ var OneNote; }); Object.defineProperty(Paragraph.prototype, "image", { get: function () { - if (!this.m_image) { - this.m_image=new OneNote.Image(this.context, _createPropertyObjectPath(this.context, this, "Image", false, false)); + if (!this._Im) { + this._Im=new OneNote.Image(this.context, _createPropertyObjectPath(this.context, this, "Image", false, false, false)); } - return this.m_image; + return this._Im; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "inkWords", { get: function () { - if (!this.m_inkWords) { - this.m_inkWords=new OneNote.InkWordCollection(this.context, _createPropertyObjectPath(this.context, this, "InkWords", true, false)); + if (!this._In) { + this._In=new OneNote.InkWordCollection(this.context, _createPropertyObjectPath(this.context, this, "InkWords", true, false, false)); } - return this.m_inkWords; + return this._In; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "outline", { get: function () { - if (!this.m_outline) { - this.m_outline=new OneNote.Outline(this.context, _createPropertyObjectPath(this.context, this, "Outline", false, false)); + if (!this._O) { + this._O=new OneNote.Outline(this.context, _createPropertyObjectPath(this.context, this, "Outline", false, false, false)); } - return this.m_outline; + return this._O; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new OneNote.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._P) { + this._P=new OneNote.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentParagraph", { get: function () { - if (!this.m_parentParagraph) { - this.m_parentParagraph=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "ParentParagraph", false, false)); + if (!this._Pa) { + this._Pa=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "ParentParagraph", false, false, false)); } - return this.m_parentParagraph; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentParagraphOrNull", { get: function () { - if (!this.m_parentParagraphOrNull) { - this.m_parentParagraphOrNull=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "ParentParagraphOrNull", false, false)); + if (!this._Par) { + this._Par=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "ParentParagraphOrNull", false, false, false)); } - return this.m_parentParagraphOrNull; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentTableCell", { get: function () { - if (!this.m_parentTableCell) { - this.m_parentTableCell=new OneNote.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false)); + if (!this._Pare) { + this._Pare=new OneNote.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false, false)); } - return this.m_parentTableCell; + return this._Pare; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentTableCellOrNull", { get: function () { - if (!this.m_parentTableCellOrNull) { - this.m_parentTableCellOrNull=new OneNote.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNull", false, false)); + if (!this._Paren) { + this._Paren=new OneNote.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNull", false, false, false)); } - return this.m_parentTableCellOrNull; + return this._Paren; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "richText", { get: function () { - if (!this.m_richText) { - this.m_richText=new OneNote.RichText(this.context, _createPropertyObjectPath(this.context, this, "RichText", false, false)); + if (!this._R) { + this._R=new OneNote.RichText(this.context, _createPropertyObjectPath(this.context, this, "RichText", false, false, false)); } - return this.m_richText; + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "table", { get: function () { - if (!this.m_table) { - this.m_table=new OneNote.Table(this.context, _createPropertyObjectPath(this.context, this, "Table", false, false)); + if (!this._T) { + this._T=new OneNote.Table(this.context, _createPropertyObjectPath(this.context, this, "Table", false, false, false)); } - return this.m_table; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Paragraph", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeParagraph, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "Paragraph", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._Ty, _typeParagraph, this._isNull); + return this._Ty; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Paragraph", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeParagraph, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); + Paragraph.prototype.addNoteTag=function (type, status) { + return new OneNote.NoteTag(this.context, _createMethodObjectPath(this.context, this, "AddNoteTag", 0, [type, status], false, true, null, false)); + }; Paragraph.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Paragraph.prototype.getParagraphInfo=function () { - var action=_createMethodAction(this.context, this, "GetParagraphInfo", 0, []); + var action=_createMethodAction(this.context, this, "GetParagraphInfo", 0, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Paragraph.prototype.insertHtmlAsSibling=function (insertLocation, html) { - _createMethodAction(this.context, this, "InsertHtmlAsSibling", 0, [insertLocation, html]); + _createMethodAction(this.context, this, "InsertHtmlAsSibling", 0, [insertLocation, html], false); }; Paragraph.prototype.insertImageAsSibling=function (insertLocation, base64EncodedImage, width, height) { - return new OneNote.Image(this.context, _createMethodObjectPath(this.context, this, "InsertImageAsSibling", 0, [insertLocation, base64EncodedImage, width, height], false, true, null)); + return new OneNote.Image(this.context, _createMethodObjectPath(this.context, this, "InsertImageAsSibling", 0, [insertLocation, base64EncodedImage, width, height], false, true, null, false)); }; Paragraph.prototype.insertRichTextAsSibling=function (insertLocation, paragraphText) { - return new OneNote.RichText(this.context, _createMethodObjectPath(this.context, this, "InsertRichTextAsSibling", 0, [insertLocation, paragraphText], false, true, null)); + return new OneNote.RichText(this.context, _createMethodObjectPath(this.context, this, "InsertRichTextAsSibling", 0, [insertLocation, paragraphText], false, true, null, false)); }; Paragraph.prototype.insertTableAsSibling=function (insertLocation, rowCount, columnCount, values) { - return new OneNote.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTableAsSibling", 0, [insertLocation, rowCount, columnCount, values], false, true, null)); + return new OneNote.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTableAsSibling", 0, [insertLocation, rowCount, columnCount, values], false, true, null, false)); }; Paragraph.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Paragraph.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15745,13 +17338,13 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._Ty=obj["Type"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["image", "Image", "inkWords", "InkWords", "outline", "Outline", "paragraphs", "Paragraphs", "parentParagraph", "ParentParagraph", "parentParagraphOrNull", "ParentParagraphOrNull", "parentTableCell", "ParentTableCell", "parentTableCellOrNull", "ParentTableCellOrNull", "richText", "RichText", "table", "Table"]); }; @@ -15765,10 +17358,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; Paragraph.prototype.track=function () { @@ -15781,13 +17374,14 @@ var OneNote; }; Paragraph.prototype.toJSON=function () { return { - "id": this.m_id, - "type": this.m_type + "id": this._I, + "type": this._Ty }; }; return Paragraph; }(OfficeExtension.ClientObject)); OneNote.Paragraph=Paragraph; + var _typeParagraphCollection="ParagraphCollection"; var ParagraphCollection=(function (_super) { __extends(ParagraphCollection, _super); function ParagraphCollection() { @@ -15802,7 +17396,7 @@ var OneNote; }); Object.defineProperty(ParagraphCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ParagraphCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeParagraphCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15810,16 +17404,16 @@ var OneNote; }); Object.defineProperty(ParagraphCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "ParagraphCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeParagraphCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(ParagraphCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "ParagraphCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeParagraphCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -15828,10 +17422,10 @@ var OneNote; return new OneNote.Paragraph(this.context, _createIndexerObjectPath(this.context, this, [index])); }; ParagraphCollection.prototype.getItemAt=function (index) { - return new OneNote.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; ParagraphCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; ParagraphCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15840,10 +17434,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15865,7 +17459,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; ParagraphCollection.prototype.track=function () { @@ -15878,12 +17472,100 @@ var OneNote; }; ParagraphCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return ParagraphCollection; }(OfficeExtension.ClientObject)); OneNote.ParagraphCollection=ParagraphCollection; + var _typeNoteTag="NoteTag"; + var NoteTag=(function (_super) { + __extends(NoteTag, _super); + function NoteTag() { + _super.apply(this, arguments); + } + Object.defineProperty(NoteTag.prototype, "_className", { + get: function () { + return "NoteTag"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NoteTag.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeNoteTag, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NoteTag.prototype, "status", { + get: function () { + _throwIfNotLoaded("status", this._S, _typeNoteTag, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NoteTag.prototype, "type", { + get: function () { + _throwIfNotLoaded("type", this._T, _typeNoteTag, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + NoteTag.prototype._KeepReference=function () { + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); + }; + NoteTag.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I=obj["Id"]; + } + if (!_isUndefined(obj["Status"])) { + this._S=obj["Status"]; + } + if (!_isUndefined(obj["Type"])) { + this._T=obj["Type"]; + } + }; + NoteTag.prototype.load=function (option) { + _load(this, option); + return this; + }; + NoteTag.prototype._handleIdResult=function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I=value["Id"]; + } + }; + NoteTag.prototype.track=function () { + this.context.trackedObjects.add(this); + return this; + }; + NoteTag.prototype.untrack=function () { + this.context.trackedObjects.remove(this); + return this; + }; + NoteTag.prototype.toJSON=function () { + return { + "id": this._I, + "status": this._S, + "type": this._T + }; + }; + return NoteTag; + }(OfficeExtension.ClientObject)); + OneNote.NoteTag=NoteTag; + var _typeRichText="RichText"; var RichText=(function (_super) { __extends(RichText, _super); function RichText() { @@ -15898,54 +17580,54 @@ var OneNote; }); Object.defineProperty(RichText.prototype, "paragraph", { get: function () { - if (!this.m_paragraph) { - this.m_paragraph=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false)); + if (!this._P) { + this._P=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false, false)); } - return this.m_paragraph; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(RichText.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "RichText", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeRichText, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(RichText.prototype, "languageId", { get: function () { - _throwIfNotLoaded("languageId", this.m_languageId, "RichText", this._isNull); - return this.m_languageId; + _throwIfNotLoaded("languageId", this._L, _typeRichText, this._isNull); + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(RichText.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "RichText", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._T, _typeRichText, this._isNull); + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(RichText.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "RichText", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeRichText, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); RichText.prototype.getHtml=function () { - var action=_createMethodAction(this.context, this, "GetHtml", 1, []); + var action=_createMethodAction(this.context, this, "GetHtml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; RichText.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; RichText.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15954,16 +17636,16 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["LanguageId"])) { - this.m_languageId=obj["LanguageId"]; + this._L=obj["LanguageId"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._T=obj["Text"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["paragraph", "Paragraph"]); }; @@ -15977,10 +17659,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; RichText.prototype.track=function () { @@ -15993,14 +17675,15 @@ var OneNote; }; RichText.prototype.toJSON=function () { return { - "id": this.m_id, - "languageId": this.m_languageId, - "text": this.m_text + "id": this._I, + "languageId": this._L, + "text": this._T }; }; return RichText; }(OfficeExtension.ClientObject)); OneNote.RichText=RichText; + var _typeImage="Image"; var Image=(function (_super) { __extends(Image, _super); function Image() { @@ -16015,31 +17698,31 @@ var OneNote; }); Object.defineProperty(Image.prototype, "pageContent", { get: function () { - if (!this.m_pageContent) { - this.m_pageContent=new OneNote.PageContent(this.context, _createPropertyObjectPath(this.context, this, "PageContent", false, false)); + if (!this._P) { + this._P=new OneNote.PageContent(this.context, _createPropertyObjectPath(this.context, this, "PageContent", false, false, false)); } - return this.m_pageContent; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Image.prototype, "paragraph", { get: function () { - if (!this.m_paragraph) { - this.m_paragraph=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false)); + if (!this._Pa) { + this._Pa=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false, false)); } - return this.m_paragraph; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Image.prototype, "description", { get: function () { - _throwIfNotLoaded("description", this.m_description, "Image", this._isNull); - return this.m_description; + _throwIfNotLoaded("description", this._D, _typeImage, this._isNull); + return this._D; }, set: function (value) { - this.m_description=value; + this._D=value; _createSetPropertyAction(this.context, this, "Description", value); }, enumerable: true, @@ -16047,11 +17730,11 @@ var OneNote; }); Object.defineProperty(Image.prototype, "height", { get: function () { - _throwIfNotLoaded("height", this.m_height, "Image", this._isNull); - return this.m_height; + _throwIfNotLoaded("height", this._H, _typeImage, this._isNull); + return this._H; }, set: function (value) { - this.m_height=value; + this._H=value; _createSetPropertyAction(this.context, this, "Height", value); }, enumerable: true, @@ -16059,11 +17742,11 @@ var OneNote; }); Object.defineProperty(Image.prototype, "hyperlink", { get: function () { - _throwIfNotLoaded("hyperlink", this.m_hyperlink, "Image", this._isNull); - return this.m_hyperlink; + _throwIfNotLoaded("hyperlink", this._Hy, _typeImage, this._isNull); + return this._Hy; }, set: function (value) { - this.m_hyperlink=value; + this._Hy=value; _createSetPropertyAction(this.context, this, "Hyperlink", value); }, enumerable: true, @@ -16071,27 +17754,27 @@ var OneNote; }); Object.defineProperty(Image.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Image", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeImage, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Image.prototype, "ocrData", { get: function () { - _throwIfNotLoaded("ocrData", this.m_ocrData, "Image", this._isNull); - return this.m_ocrData; + _throwIfNotLoaded("ocrData", this._O, _typeImage, this._isNull); + return this._O; }, enumerable: true, configurable: true }); Object.defineProperty(Image.prototype, "width", { get: function () { - _throwIfNotLoaded("width", this.m_width, "Image", this._isNull); - return this.m_width; + _throwIfNotLoaded("width", this._W, _typeImage, this._isNull); + return this._W; }, set: function (value) { - this.m_width=value; + this._W=value; _createSetPropertyAction(this.context, this, "Width", value); }, enumerable: true, @@ -16099,8 +17782,8 @@ var OneNote; }); Object.defineProperty(Image.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Image", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeImage, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -16114,13 +17797,13 @@ var OneNote; ]); }; Image.prototype.getBase64Image=function () { - var action=_createMethodAction(this.context, this, "GetBase64Image", 1, []); + var action=_createMethodAction(this.context, this, "GetBase64Image", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Image.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Image.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16129,25 +17812,25 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Description"])) { - this.m_description=obj["Description"]; + this._D=obj["Description"]; } if (!_isUndefined(obj["Height"])) { - this.m_height=obj["Height"]; + this._H=obj["Height"]; } if (!_isUndefined(obj["Hyperlink"])) { - this.m_hyperlink=obj["Hyperlink"]; + this._Hy=obj["Hyperlink"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["OcrData"])) { - this.m_ocrData=obj["OcrData"]; + this._O=obj["OcrData"]; } if (!_isUndefined(obj["Width"])) { - this.m_width=obj["Width"]; + this._W=obj["Width"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["pageContent", "PageContent", "paragraph", "Paragraph"]); }; @@ -16161,10 +17844,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; Image.prototype.track=function () { @@ -16177,17 +17860,18 @@ var OneNote; }; Image.prototype.toJSON=function () { return { - "description": this.m_description, - "height": this.m_height, - "hyperlink": this.m_hyperlink, - "id": this.m_id, - "ocrData": this.m_ocrData, - "width": this.m_width + "description": this._D, + "height": this._H, + "hyperlink": this._Hy, + "id": this._I, + "ocrData": this._O, + "width": this._W }; }; return Image; }(OfficeExtension.ClientObject)); OneNote.Image=Image; + var _typeTable="Table"; var Table=(function (_super) { __extends(Table, _super); function Table() { @@ -16202,31 +17886,31 @@ var OneNote; }); Object.defineProperty(Table.prototype, "paragraph", { get: function () { - if (!this.m_paragraph) { - this.m_paragraph=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false)); + if (!this._P) { + this._P=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false, false)); } - return this.m_paragraph; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "rows", { get: function () { - if (!this.m_rows) { - this.m_rows=new OneNote.TableRowCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false)); + if (!this._Ro) { + this._Ro=new OneNote.TableRowCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false, false)); } - return this.m_rows; + return this._Ro; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "borderVisible", { get: function () { - _throwIfNotLoaded("borderVisible", this.m_borderVisible, "Table", this._isNull); - return this.m_borderVisible; + _throwIfNotLoaded("borderVisible", this._B, _typeTable, this._isNull); + return this._B; }, set: function (value) { - this.m_borderVisible=value; + this._B=value; _createSetPropertyAction(this.context, this, "BorderVisible", value); }, enumerable: true, @@ -16234,32 +17918,32 @@ var OneNote; }); Object.defineProperty(Table.prototype, "columnCount", { get: function () { - _throwIfNotLoaded("columnCount", this.m_columnCount, "Table", this._isNull); - return this.m_columnCount; + _throwIfNotLoaded("columnCount", this._C, _typeTable, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Table", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeTable, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "rowCount", { get: function () { - _throwIfNotLoaded("rowCount", this.m_rowCount, "Table", this._isNull); - return this.m_rowCount; + _throwIfNotLoaded("rowCount", this._R, _typeTable, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Table", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTable, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -16273,28 +17957,28 @@ var OneNote; ]); }; Table.prototype.appendColumn=function (values) { - _createMethodAction(this.context, this, "AppendColumn", 0, [values]); + _createMethodAction(this.context, this, "AppendColumn", 0, [values], false); }; Table.prototype.appendRow=function (values) { - return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "AppendRow", 0, [values], false, true, null)); + return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "AppendRow", 0, [values], false, true, null, false)); }; Table.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; Table.prototype.getCell=function (rowIndex, cellIndex) { - return new OneNote.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [rowIndex, cellIndex], false, false, null)); + return new OneNote.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [rowIndex, cellIndex], false, false, null, false)); }; Table.prototype.insertColumn=function (index, values) { - _createMethodAction(this.context, this, "InsertColumn", 0, [index, values]); + _createMethodAction(this.context, this, "InsertColumn", 0, [index, values], false); }; Table.prototype.insertRow=function (index, values) { - return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "InsertRow", 0, [index, values], false, true, null)); + return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "InsertRow", 0, [index, values], false, true, null, false)); }; Table.prototype.setShadingColor=function (colorCode) { - _createMethodAction(this.context, this, "SetShadingColor", 0, [colorCode]); + _createMethodAction(this.context, this, "SetShadingColor", 0, [colorCode], false); }; Table.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Table.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16303,19 +17987,19 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["BorderVisible"])) { - this.m_borderVisible=obj["BorderVisible"]; + this._B=obj["BorderVisible"]; } if (!_isUndefined(obj["ColumnCount"])) { - this.m_columnCount=obj["ColumnCount"]; + this._C=obj["ColumnCount"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["RowCount"])) { - this.m_rowCount=obj["RowCount"]; + this._R=obj["RowCount"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["paragraph", "Paragraph", "rows", "Rows"]); }; @@ -16329,10 +18013,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; Table.prototype.track=function () { @@ -16345,15 +18029,16 @@ var OneNote; }; Table.prototype.toJSON=function () { return { - "borderVisible": this.m_borderVisible, - "columnCount": this.m_columnCount, - "id": this.m_id, - "rowCount": this.m_rowCount + "borderVisible": this._B, + "columnCount": this._C, + "id": this._I, + "rowCount": this._R }; }; return Table; }(OfficeExtension.ClientObject)); OneNote.Table=Table; + var _typeTableRow="TableRow"; var TableRow=(function (_super) { __extends(TableRow, _super); function TableRow() { @@ -16368,67 +18053,67 @@ var OneNote; }); Object.defineProperty(TableRow.prototype, "cells", { get: function () { - if (!this.m_cells) { - this.m_cells=new OneNote.TableCellCollection(this.context, _createPropertyObjectPath(this.context, this, "Cells", true, false)); + if (!this._Ce) { + this._Ce=new OneNote.TableCellCollection(this.context, _createPropertyObjectPath(this.context, this, "Cells", true, false, false)); } - return this.m_cells; + return this._Ce; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new OneNote.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + if (!this._P) { + this._P=new OneNote.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "cellCount", { get: function () { - _throwIfNotLoaded("cellCount", this.m_cellCount, "TableRow", this._isNull); - return this.m_cellCount; + _throwIfNotLoaded("cellCount", this._C, _typeTableRow, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "TableRow", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeTableRow, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "rowIndex", { get: function () { - _throwIfNotLoaded("rowIndex", this.m_rowIndex, "TableRow", this._isNull); - return this.m_rowIndex; + _throwIfNotLoaded("rowIndex", this._R, _typeTableRow, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableRow", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableRow, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); TableRow.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; TableRow.prototype.insertRowAsSibling=function (insertLocation, values) { - return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "InsertRowAsSibling", 0, [insertLocation, values], false, true, null)); + return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "InsertRowAsSibling", 0, [insertLocation, values], false, true, null, false)); }; TableRow.prototype.setShadingColor=function (colorCode) { - _createMethodAction(this.context, this, "SetShadingColor", 0, [colorCode]); + _createMethodAction(this.context, this, "SetShadingColor", 0, [colorCode], false); }; TableRow.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableRow.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16437,16 +18122,16 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["CellCount"])) { - this.m_cellCount=obj["CellCount"]; + this._C=obj["CellCount"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["RowIndex"])) { - this.m_rowIndex=obj["RowIndex"]; + this._R=obj["RowIndex"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["cells", "Cells", "parentTable", "ParentTable"]); }; @@ -16460,10 +18145,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; TableRow.prototype.track=function () { @@ -16476,14 +18161,15 @@ var OneNote; }; TableRow.prototype.toJSON=function () { return { - "cellCount": this.m_cellCount, - "id": this.m_id, - "rowIndex": this.m_rowIndex + "cellCount": this._C, + "id": this._I, + "rowIndex": this._R }; }; return TableRow; }(OfficeExtension.ClientObject)); OneNote.TableRow=TableRow; + var _typeTableRowCollection="TableRowCollection"; var TableRowCollection=(function (_super) { __extends(TableRowCollection, _super); function TableRowCollection() { @@ -16498,7 +18184,7 @@ var OneNote; }); Object.defineProperty(TableRowCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableRowCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableRowCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -16506,16 +18192,16 @@ var OneNote; }); Object.defineProperty(TableRowCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "TableRowCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeTableRowCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(TableRowCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableRowCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableRowCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -16524,10 +18210,10 @@ var OneNote; return new OneNote.TableRow(this.context, _createIndexerObjectPath(this.context, this, [index])); }; TableRowCollection.prototype.getItemAt=function (index) { - return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; TableRowCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableRowCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16536,10 +18222,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -16561,7 +18247,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; TableRowCollection.prototype.track=function () { @@ -16574,12 +18260,13 @@ var OneNote; }; TableRowCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return TableRowCollection; }(OfficeExtension.ClientObject)); OneNote.TableRowCollection=TableRowCollection; + var _typeTableCell="TableCell"; var TableCell=(function (_super) { __extends(TableCell, _super); function TableCell() { @@ -16594,55 +18281,55 @@ var OneNote; }); Object.defineProperty(TableCell.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new OneNote.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._P) { + this._P=new OneNote.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "parentRow", { get: function () { - if (!this.m_parentRow) { - this.m_parentRow=new OneNote.TableRow(this.context, _createPropertyObjectPath(this.context, this, "ParentRow", false, false)); + if (!this._Pa) { + this._Pa=new OneNote.TableRow(this.context, _createPropertyObjectPath(this.context, this, "ParentRow", false, false, false)); } - return this.m_parentRow; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "cellIndex", { get: function () { - _throwIfNotLoaded("cellIndex", this.m_cellIndex, "TableCell", this._isNull); - return this.m_cellIndex; + _throwIfNotLoaded("cellIndex", this._C, _typeTableCell, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "TableCell", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeTableCell, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "rowIndex", { get: function () { - _throwIfNotLoaded("rowIndex", this.m_rowIndex, "TableCell", this._isNull); - return this.m_rowIndex; + _throwIfNotLoaded("rowIndex", this._R, _typeTableCell, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "shadingColor", { get: function () { - _throwIfNotLoaded("shadingColor", this.m_shadingColor, "TableCell", this._isNull); - return this.m_shadingColor; + _throwIfNotLoaded("shadingColor", this._S, _typeTableCell, this._isNull); + return this._S; }, set: function (value) { - this.m_shadingColor=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShadingColor", value); }, enumerable: true, @@ -16650,8 +18337,8 @@ var OneNote; }); Object.defineProperty(TableCell.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableCell", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableCell, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -16665,22 +18352,22 @@ var OneNote; ]); }; TableCell.prototype.appendHtml=function (html) { - _createMethodAction(this.context, this, "AppendHtml", 0, [html]); + _createMethodAction(this.context, this, "AppendHtml", 0, [html], false); }; TableCell.prototype.appendImage=function (base64EncodedImage, width, height) { - return new OneNote.Image(this.context, _createMethodObjectPath(this.context, this, "AppendImage", 0, [base64EncodedImage, width, height], false, true, null)); + return new OneNote.Image(this.context, _createMethodObjectPath(this.context, this, "AppendImage", 0, [base64EncodedImage, width, height], false, true, null, false)); }; TableCell.prototype.appendRichText=function (paragraphText) { - return new OneNote.RichText(this.context, _createMethodObjectPath(this.context, this, "AppendRichText", 0, [paragraphText], false, true, null)); + return new OneNote.RichText(this.context, _createMethodObjectPath(this.context, this, "AppendRichText", 0, [paragraphText], false, true, null, false)); }; TableCell.prototype.appendTable=function (rowCount, columnCount, values) { - return new OneNote.Table(this.context, _createMethodObjectPath(this.context, this, "AppendTable", 0, [rowCount, columnCount, values], false, true, null)); + return new OneNote.Table(this.context, _createMethodObjectPath(this.context, this, "AppendTable", 0, [rowCount, columnCount, values], false, true, null, false)); }; TableCell.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; TableCell.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableCell.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16689,19 +18376,19 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["CellIndex"])) { - this.m_cellIndex=obj["CellIndex"]; + this._C=obj["CellIndex"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["RowIndex"])) { - this.m_rowIndex=obj["RowIndex"]; + this._R=obj["RowIndex"]; } if (!_isUndefined(obj["ShadingColor"])) { - this.m_shadingColor=obj["ShadingColor"]; + this._S=obj["ShadingColor"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["paragraphs", "Paragraphs", "parentRow", "ParentRow"]); }; @@ -16715,10 +18402,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; TableCell.prototype.track=function () { @@ -16731,15 +18418,16 @@ var OneNote; }; TableCell.prototype.toJSON=function () { return { - "cellIndex": this.m_cellIndex, - "id": this.m_id, - "rowIndex": this.m_rowIndex, - "shadingColor": this.m_shadingColor + "cellIndex": this._C, + "id": this._I, + "rowIndex": this._R, + "shadingColor": this._S }; }; return TableCell; }(OfficeExtension.ClientObject)); OneNote.TableCell=TableCell; + var _typeTableCellCollection="TableCellCollection"; var TableCellCollection=(function (_super) { __extends(TableCellCollection, _super); function TableCellCollection() { @@ -16754,7 +18442,7 @@ var OneNote; }); Object.defineProperty(TableCellCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableCellCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableCellCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -16762,16 +18450,16 @@ var OneNote; }); Object.defineProperty(TableCellCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "TableCellCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeTableCellCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(TableCellCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableCellCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableCellCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -16780,10 +18468,10 @@ var OneNote; return new OneNote.TableCell(this.context, _createIndexerObjectPath(this.context, this, [index])); }; TableCellCollection.prototype.getItemAt=function (index) { - return new OneNote.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; TableCellCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableCellCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16792,10 +18480,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -16817,7 +18505,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; TableCellCollection.prototype.track=function () { @@ -16830,7 +18518,7 @@ var OneNote; }; TableCellCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return TableCellCollection; @@ -16878,6 +18566,31 @@ var OneNote; ParagraphType.ink="Ink"; ParagraphType.other="Other"; })(ParagraphType=OneNote.ParagraphType || (OneNote.ParagraphType={})); + var NoteTagType; + (function (NoteTagType) { + NoteTagType.unknown="Unknown"; + NoteTagType.toDo="ToDo"; + NoteTagType.important="Important"; + NoteTagType.question="Question"; + NoteTagType.contact="Contact"; + NoteTagType.address="Address"; + NoteTagType.phoneNumber="PhoneNumber"; + NoteTagType.website="Website"; + NoteTagType.idea="Idea"; + NoteTagType.critical="Critical"; + NoteTagType.toDoPriority1="ToDoPriority1"; + NoteTagType.toDoPriority2="ToDoPriority2"; + })(NoteTagType=OneNote.NoteTagType || (OneNote.NoteTagType={})); + var NoteTagStatus; + (function (NoteTagStatus) { + NoteTagStatus.unknown="Unknown"; + NoteTagStatus.normal="Normal"; + NoteTagStatus.completed="Completed"; + NoteTagStatus.disabled="Disabled"; + NoteTagStatus.outlookTask="OutlookTask"; + NoteTagStatus.taskNotSyncedYet="TaskNotSyncedYet"; + NoteTagStatus.taskRemoved="TaskRemoved"; + })(NoteTagStatus=OneNote.NoteTagStatus || (OneNote.NoteTagStatus={})); var ServiceId; (function (ServiceId) { ServiceId.form="Form"; @@ -16892,6 +18605,7 @@ var OneNote; IdentityFilter.liveId="LiveId"; IdentityFilter.orgId="OrgId"; IdentityFilter.adal="ADAL"; + IdentityFilter.notebook="Notebook"; })(IdentityFilter=OneNote.IdentityFilter || (OneNote.IdentityFilter={})); var ListType; (function (ListType) { @@ -16911,6 +18625,7 @@ var OneNote; LogLevel.trace="Trace"; LogLevel.data="Data"; LogLevel.exception="Exception"; + LogLevel.warning="Warning"; })(LogLevel=OneNote.LogLevel || (OneNote.LogLevel={})); var EventFlag; (function (EventFlag) { @@ -16983,24 +18698,29 @@ var OneNote; NumberType.lim="Lim"; NumberType.custom="Custom"; })(NumberType=OneNote.NumberType || (OneNote.NumberType={})); - var VisibilityType; - (function (VisibilityType) { - VisibilityType.preinstallClassNotebook="PreinstallClassNotebook"; - VisibilityType.distributePageId="DistributePageId"; - VisibilityType.distributeSection="DistributeSection"; - VisibilityType.reviewStudentWork="ReviewStudentWork"; - VisibilityType.openTabForCreateClassNotebook="OpenTabForCreateClassNotebook"; - VisibilityType.openTabForManageStudent="OpenTabForManageStudent"; - VisibilityType.openTabForManageTeacher="OpenTabForManageTeacher"; - VisibilityType.openTabForGetNotebookLink="OpenTabForGetNotebookLink"; - VisibilityType.openTabForTeacherTraining="OpenTabForTeacherTraining"; - VisibilityType.openTabForAddinGuide="OpenTabForAddinGuide"; - VisibilityType.openTabForEducationBlog="OpenTabForEducationBlog"; - VisibilityType.openTabForEducatorCommunity="OpenTabForEducatorCommunity"; - VisibilityType.openTabToSendFeedback="OpenTabToSendFeedback"; - VisibilityType.openTabForViewKnowledgeBase="OpenTabForViewKnowledgeBase"; - VisibilityType.openTabForSuggestingFeature="OpenTabForSuggestingFeature"; - })(VisibilityType=OneNote.VisibilityType || (OneNote.VisibilityType={})); + var ControlId; + (function (ControlId) { + ControlId.preinstallClassNotebook="PreinstallClassNotebook"; + ControlId.distributePageId="DistributePageId"; + ControlId.distributeSection="DistributeSection"; + ControlId.reviewStudentWork="ReviewStudentWork"; + ControlId.openTabForCreateClassNotebook="OpenTabForCreateClassNotebook"; + ControlId.openTabForManageStudent="OpenTabForManageStudent"; + ControlId.openTabForManageTeacher="OpenTabForManageTeacher"; + ControlId.openTabForGetNotebookLink="OpenTabForGetNotebookLink"; + ControlId.openTabForTeacherTraining="OpenTabForTeacherTraining"; + ControlId.openTabForAddinGuide="OpenTabForAddinGuide"; + ControlId.openTabForEducationBlog="OpenTabForEducationBlog"; + ControlId.openTabForEducatorCommunity="OpenTabForEducatorCommunity"; + ControlId.openTabToSendFeedback="OpenTabToSendFeedback"; + ControlId.openTabForViewKnowledgeBase="OpenTabForViewKnowledgeBase"; + ControlId.openTabForSuggestingFeature="OpenTabForSuggestingFeature"; + ControlId.createAssignment="CreateAssignment"; + ControlId.connections="Connections"; + ControlId.mapClassNotebooks="MapClassNotebooks"; + ControlId.mapStudents="MapStudents"; + ControlId.manageClasses="ManageClasses"; + })(ControlId=OneNote.ControlId || (OneNote.ControlId={})); var ErrorCodes; (function (ErrorCodes) { ErrorCodes.generalException="GeneralException"; @@ -17031,4 +18751,6 @@ var OneNote; OneNote.run=run; })(OneNote || (OneNote={})); +OfficeExtension.Utility._doApiNotSupportedCheck=true; + diff --git a/node_modules/@microsoft/office-js/dist/onenote-web-16.00.js b/node_modules/@microsoft/office-js/dist/onenote-web-16.00.js index e1491ac..feed8fb 100644 --- a/node_modules/@microsoft/office-js/dist/onenote-web-16.00.js +++ b/node_modules/@microsoft/office-js/dist/onenote-web-16.00.js @@ -1,5 +1,7 @@ -/* OneNote specific JavaScript API library */ -/* Version: 16.0.8208.1000 */ +/* OneNote Web-specific API library */ +/* Version: 16.0.8827.3000 */ + +/* Office.js Version: 16.0.8828.1000 */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ @@ -16,4 +18,4 @@ * @version 2.3.0 */ -var __extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},OsfMsAjaxFactory,OSF,OSFLog,Logger,OSFAriaLogger,OSFAppTelemetry,OSF_DDA_Marshaling_FilePropertiesKeys,OSF_DDA_Marshaling_File_FilePropertiesKeys,OSF_DDA_Marshaling_File_SlicePropertiesKeys,OSF_DDA_Marshaling_File_FileType,OSF_DDA_Marshaling_File_ParameterKeys,OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys,OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys,OfficeExt,OSFOneNoteWAC,OfficeExtension,OneNote;(function(n){var t=function(){function t(){}var n=!0;return t.prototype.isMsAjaxLoaded=function(){var t="function",i="undefined";return typeof Sys!==i&&typeof Type!==i&&Sys.StringBuilder&&typeof Sys.StringBuilder===t&&Type.registerNamespace&&typeof Type.registerNamespace===t&&Type.registerClass&&typeof Type.registerClass===t&&typeof Function._validateParams===t&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===t?n:!1},t.prototype.loadMsAjaxFull=function(n){var t=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,n)},Object.defineProperty(t.prototype,"msAjaxError",{get:function(){var n=this;return n._msAjaxError==null&&n.isMsAjaxLoaded()&&(n._msAjaxError=Error),n._msAjaxError},set:function(n){this._msAjaxError=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxString",{get:function(){var n=this;return n._msAjaxString==null&&n.isMsAjaxLoaded()&&(n._msAjaxString=String),n._msAjaxString},set:function(n){this._msAjaxString=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxDebug",{get:function(){var n=this;return n._msAjaxDebug==null&&n.isMsAjaxLoaded()&&(n._msAjaxDebug=Sys.Debug),n._msAjaxDebug},set:function(n){this._msAjaxDebug=n},enumerable:n,configurable:n}),t}();n.MicrosoftAjaxFactory=t})(OfficeExt||(OfficeExt={}));OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory;OSF=OSF||{},function(n){var t=function(){function n(n){this._internalStorage=n}return n.prototype.getItem=function(n){try{return this._internalStorage&&this._internalStorage.getItem(n)}catch(t){return null}},n.prototype.setItem=function(n,t){try{this._internalStorage&&this._internalStorage.setItem(n,t)}catch(i){}},n.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(n){}},n.prototype.removeItem=function(n){try{this._internalStorage&&this._internalStorage.removeItem(n)}catch(t){}},n.prototype.getKeysWithPrefix=function(n){var r=[],u,t,i;try{for(u=this._internalStorage&&this._internalStorage.length||0,t=0;t0?i.push(t):t.tabIndex===0&&r.push(t):r.push(t);return i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;return r===0&&(r=i.indexOf(n)-i.indexOf(t)),r}),[].concat(i,r)}var f="focus",e="on",b="configurable",k="writable",o="enumerable",s="undefined",i=!0,t=!1,c=2147483647,n=null,r=-1,l=r,d="&_xdm_Info=",g="&_serializer_version=",nt="_xdm_",ut="_serializer_version=",a="#",tt="&",h="class",v={},ft=3e4,y=n,p=n,u=(new Date).getTime();return{set_entropy:function(n){var t,r,i;if(typeof n=="string")for(t=0;t1?l[l.length-1]:n,s,h,c,a;return u&&o!=n&&(o.indexOf(tt)>=0&&(o=o.split(tt)[0]),o=decodeURIComponent(o)),s=w(),!f&&s&&(h=window.name.indexOf(i),h>r&&(c=window.name.indexOf(";",h),c==r&&(c=window.name.length),a=window.name.substring(h,c),o?s.setItem(a,o):o=s.getItem(a))),o},getConversationId:function(){var i=window.location.search,t=n,r;return i&&(r=i.indexOf("&"),t=r>0?i.substring(1,r):i.substr(1),t&&t.charAt(t.length-1)==="="&&(t=t.substring(0,t.length-1),t&&(t=decodeURIComponent(t)))),t},getInfoItems:function(n){var t=n.split("$");return typeof t[1]==s&&(t=n.split("|")),typeof t[1]==s&&(t=n.split("%7C")),t},getXdmFieldValue:function(n,t){var r="",u=OSF.OUtil.parseXdmInfo(t),i;if(u&&(i=OSF.OUtil.getInfoItems(u),i!=undefined&&i.length>=3))switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]),f;if(u)throw u;for(f in r)if(u=Function._validateParameter(n[f],r[f],f),u)throw u;},writeProfilerMark:function(n){window.msWriteProfilerMark&&(window.msWriteProfilerMark(n),OsfMsAjaxFactory.msAjaxDebug.trace(n))},outputDebug:function(n){typeof OsfMsAjaxFactory!==s&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){var e,f;r=r||{};for(e in u)f=u[e],r[f]==undefined&&(r[f]=i);return Object.defineProperty(n,t,r),n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[o])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[o])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[k,o,b])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[k,o,b])},finalizeProperties:function(n,r){var e,u;r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8,f=e&255,i[t++]=r>>2,i[t++]=(r&3)<<4|u>>4,i[t++]=(u&15)<<2|f>>6,i[t++]=f&63,isNaN(e)||(r=e>>8,u=s&255,f=s>>8,i[t++]=r>>2,i[t++]=(r&3)<<4|u>>4,i[t++]=(u&15)<<2|f>>6,i[t++]=f&63),isNaN(e)?i[t-1]=64:isNaN(s)&&(i[t-2]=64,i[t-1]=64),h=0;h0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){var u,i,f,r;if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(u=[],i=0;in)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=rt(u),o=e?u.length-1:0,u.length===0)return n;while(!h&&o>=0&&on)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=rt(u),l=y(u,e),s=v(u.length,l,o),s<0)return n;while(!c&&s>=0&&s0;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[r%16],r=Math.floor(r/16);for(;t<32;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[Math.floor(Math.random()*16)];return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];return i?(i.name||(i.name=n[this.errorCodes.ooeInternalError].name),i.message||(i.message=n[this.errorCodes.ooeInternalError].message)):i=n[this.errorCodes.ooeInternalError],i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage}}}}(),function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}(),r,i,h,u,c,l,f,a,e,v,y,p,w,b,o,k,d,g,s,nt,tt,it,rt;n.RequirementVersion=ut;r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){var f,u,e,i,r;if(n==undefined)return!1;if(t==undefined&&(t=0),f=this._setMap,u=f._sets,u.hasOwnProperty(n.toLowerCase())){e=u[n.toLowerCase()];try{if((i=this._getVersion(e),t=t+"",r=this._getVersion(t),i.major>0&&i.major>r.major)||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),i=0,r=0;if(t.length<2&&isNaN(Number(n)))throw u;else if(i=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(i)||isNaN(r))throw u;return{minor:r,major:i}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;h=function(n){function i(){n.call(this,{dialogapi:t})}return __extends(i,n),i}(i);n.DefaultDialogSetRequirement=h;u=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelClientDefaultSetRequirement=u;c=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(u);n.ExcelClientV1DefaultSetRequirement=c;l=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookClientDefaultSetRequirement=l;f=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return __extends(i,n),i}(i);n.WordClientDefaultSetRequirement=f;a=function(n){function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return __extends(i,n),i}(f);n.WordClientV1DefaultSetRequirement=a;e=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointClientDefaultSetRequirement=e;v=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(e);n.PowerpointClientV1DefaultSetRequirement=v;y=function(n){function i(){n.call(this,{selection:t,textcoercion:t})}return __extends(i,n),i}(i);n.ProjectClientDefaultSetRequirement=y;p=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return __extends(i,n),i}(i);n.ExcelWebDefaultSetRequirement=p;w=function(n){function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordWebDefaultSetRequirement=w;b=function(n){function i(){n.call(this,{activeview:t,settings:t})}return __extends(i,n),i}(i);n.PowerpointWebDefaultSetRequirement=b;o=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookWebDefaultSetRequirement=o;k=function(n){function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.SwayWebDefaultSetRequirement=k;d=function(n){function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return __extends(i,n),i}(i);n.AccessWebDefaultSetRequirement=d;g=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelIOSDefaultSetRequirement=g;s=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordIOSDefaultSetRequirement=s;nt=function(n){function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return __extends(t,n),t}(s);n.WordIOSV1DefaultSetRequirement=nt;tt=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointIOSDefaultSetRequirement=tt;it=function(n){function i(){n.call(this,{mailbox:t})}return __extends(i,n),i}(i);n.OutlookIOSDefaultSetRequirement=it;rt=function(){function n(){}var t="undefined";return n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},n.getDefaultRequirementMatrix=function(u){var f,e,s,o;return this.initializeDefaultSetMatrix(),f=undefined,e=u.get_requirementMatrix(),e!=undefined&&e.length>0&&typeof JSON!==t?(s=JSON.parse(u.get_requirementMatrix().toLowerCase()),f=new r(new i(s))):(o=n.getClientFullVersionString(u),f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[o]!=undefined?new r(n.DefaultSetArrayMatrix[o]):new r(new i({}))),f},n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix(),e;return f!=undefined&&f.length>0&&typeof JSON!==t?(e=JSON.parse(n.get_requirementMatrix().toLowerCase()),u=new r(new i(e))):u=new r(new h),u},n.getClientFullVersionString=function(n){var i=n.get_appMinorVersion(),u="",r="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;return f&&n.get_appVersion()==1?r=t==4096&&i>=15?"16.00.01":"16.00":n.get_appName()==64?r=n.get_appVersion():(u=i<10?"0"+i:""+i,r=n.get_appVersion()+"."+u),n.get_appName()+"-"+r},n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new c;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new v;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new l;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new w;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new b;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new g;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new k;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new nt;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new tt;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new it},n.Excel_RCLIENT_1600="1-16.00",n.Excel_RCLIENT_1601="1-16.01",n.Word_RCLIENT_1600="2-16.00",n.Word_RCLIENT_1601="2-16.01",n.PowerPoint_RCLIENT_1600="4-16.00",n.PowerPoint_RCLIENT_1601="4-16.01",n.Outlook_RCLIENT_1600="8-16.00",n.Excel_WAC_1600="16-16.00",n.Word_WAC_1600="32-16.00",n.Outlook_WAC_1600="64-16.00",n.Outlook_WAC_1601="64-16.01",n.Project_RCLIENT_1600="128-16.00",n.Access_WAC_1600="256-16.00",n.PowerPoint_WAC_1600="512-16.00",n.Excel_IOS_1600="1024-16.00",n.SWAY_WAC_1600="2048-16.00",n.Word_IOS_1600="4096-16.00",n.Word_IOS_16001="4096-16.00.01",n.PowerPoint_IOS_1600="8192-16.00",n.Outlook_IOS_1600="65536-16.00",n.DefaultSetArrayMatrix={},n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))}(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}return n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n},n.getInstance=function(){return n.hostObj===undefined&&(n.hostObj=new n),n.hostObj},n.prototype.getPlatform=function(){var n=this,t;return n.hostInfo.hostPlatform&&(t=n.hostInfo.hostPlatform.toLowerCase(),n.platformRemappings[t])?n.platformRemappings[t]:null},n.prototype.getHost=function(){var n=this,t;if(n.hostInfo.hostType){if(t=n.hostInfo.hostType.toLowerCase(),n.camelCaseMappings[t])return n.camelCaseMappings[t];if(t=n.capitalizeFirstLetter(n.hostInfo.hostType),Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null},n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null},n}();n.Host=t})(t=n.HostName||(n.HostName={}))}(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){n||(window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,n=!0)},disableShortcut:function(){n&&(t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window),n=!1)}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i,r,o,u,f,e;if(n&&typeof n=="string"&&(r=n.indexOf("#"),r!=-1)){o=n.substring(0,r);u=n.substring(r+1);switch(o){case"binding":case"bindings":u&&(i=new OSF.DDA.BindingPromise(u))}}if(i)return i.onFail=t,i;else if(t)if(f=typeof t,f=="function")e={},e[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(e,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext));else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f);};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this,s,e;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.auth&&OSF.OUtil.defineEnumerableProperty(f,"auth",{value:n.auth});n.get_isDialog()?(e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e})):(t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t}),r&&(s=r.displayName||"appOM",delete r.displayName,OSF.OUtil.defineEnumerableProperty(f,s,{value:r})),u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}}),e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e}))};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this,u;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;return OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext()),n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,e=n.length,o=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){var u,i,r;for(u in n){if(i=n[u],r=t[u],i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw o();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw o();}};f.extractRequiredArguments=function(t,i,r){var f,u,h,s,c,l;if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(c=n.length-1;c>=s;c--){l=n[c];switch(typeof l){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=l;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}if(f=o.fillOptions(f,i,r,u),e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;return o.verifyArguments(t,f),f}var h="function",s=n.length,o=new OSF.DDA.ApiMethodCall(n,t,i,f,e);this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),u=c(n,r,t,i);return o.constructCallArgs(r,u,t,i)};this.processResponse=function(n,t,i,f){return n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n)};this.getCallArgs=function(n){for(var t,u,r,i=n.length-1;i>=s;i--){r=n[i];switch(typeof r){case"object":t=r;break;case h:u=r}}return t=t||{},u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u),t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],i=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],t,i,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback],u,r;f&&(u={},u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?u[OSF.DDA.AsyncResultEnum.Properties.Value]=i:(r={},i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i),f(new OSF.DDA.AsyncResult(u,r)))};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.SyncMethodNames[t]=i};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){function o(n,i,r,u){var o,c,s,h;if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(s=n.length-1;s>=e;s--){h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}return o=f.fillOptions(o,i,r,u),f.verifyArguments(t,o),o}var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),u=o(n,r,t,i);return f.constructCallArgs(r,u,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){function e(i,f){var a=i?{}:undefined,s,h,o,v,c,l;for(s in i){if(h=i[s],OSF.DDA.ListType.isListType(s)){o=[];for(v in h)o.push(e(h[v],f))}else OSF.OUtil.listContainsKey(r,s)?o=r[s][f](h):f==u&&n.preserveNesting(s)?o=e(h,f):(c=t[s],c?(l=c[f],l&&(o=l[h],o===undefined&&(o=h))):o=h);a[s]=o}return a}function l(i,r){var e,u,h,s;for(u in r)h=n.isComplexType(u)?l(i,t[u][o]):i[u],h!=undefined&&(e||(e={}),s=r[u],s==f&&(s=u),e[s]=n.pack(u,h));return e}function s(i,r,e){var o,a,h,l,p,v,y;e||(e={});for(o in r){if(a=r[o],a==f)h=i;else if(a==c){e[o]=i.toArray();continue}else h=i[a];if(h===null||h===undefined)e[o]=undefined;else if(h=n.unpack(o,h),n.isComplexType(o))l=t[o][u],n.preserveNesting(o)?e[o]=s(h,l):s(h,l,e);else if(OSF.DDA.ListType.isListType(o)){l={};p=OSF.DDA.ListType.getDescriptor(o);l[p]=f;v=new Array(h.length);for(y in h)v[y]=s(h[y],l);e[o]=v}else e[o]=h}return e}function a(n,i,r){var f=t[n][r],u,o,c;return r=="toHost"?(o=e(i,r),u=l(o,f)):r==h&&(c=s(i,f),u=e(c,r)),u}var h="fromHost",i=this,o="toHost",u=h,c="sourceData",f="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];t||(t={});i.addMapping=function(n,i){var e,h,c,l,r,s,a,v;if(i.map){e=i.map;h={};for(c in e)l=e[c],l==f&&(l=c),h[l]=c}else e=i.toHost,h=i.fromHost;if(r=t[n],r){s=r[o];for(a in s)e[a]=s[a];s=r[u];for(v in s)h[v]=s[v]}else r=t[n]={};r[o]=e;r[u]=h};i.toHost=function(n,t){return a(n,t,o)};i.fromHost=function(n,t){return a(n,t,u)};i.self=f;i.sourceData=c;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){return this.isDynamicType(n)?t[n].toHost(i):i};i.unpack=function(n,i){return this.isDynamicType(n)?t[n].fromHost(i):i}};OSF.DDA.getDecoratedParameterMap=function(n,t){function r(n){var i=null,r,t;if(n)for(i={},r=n.length,t=0;t1?i=u+c+t:s.length>0&&(i=u+f+h+t),o?[i,r,o].join(""):i}function e(n){if(!n)return null;var t=document.createElement("a");return t.href=n,t.protocol+"//"+t.host}var t="^https://[a-z0-9-]+.(officeapps.live|officeapps-df.live|partner.officewebapps).com/";n.parseAppContextFromWindowName=i;n.serializeObjectToString=r;n.isHostTrusted=u;n.addHostInfoAsQueryParam=f;n.getDomainForUrl=e})(t=n.WACUtils||(n.WACUtils={}))}(OfficeExt||(OfficeExt={})),function(n){var e="\n",i=!0,t=null,r="undefined",h=function(){function n(){}return n.isInstanceOfType=function(n,u){if(typeof u===r||u===t)return!1;if(u instanceof n)return i;var f=u.constructor;return f&&typeof f=="function"&&f.__typeName&&f.__typeName!=="Object"||(f=Object),!!(f===n)||f.__typeName&&n.__typeName&&f.__typeName===n.__typeName},n}(),o,u,s,f;n.MsAjaxTypeHelper=h;o=function(){function n(){}var i="Parameter name: {0}";return n.create=function(n,t){var i=new Error(n),r;if(i.message=n,t)for(r in t)i[r]=t[r];return i.popStackFrame(),i},n.parameterCount=function(t){var r="Sys.ParameterCountException: "+(t?t:"Parameter count mismatch."),i=n.create(r,{name:"Sys.ParameterCountException"});return i.popStackFrame(),i},n.argument=function(t,r){var o="Sys.ArgumentException: "+(r?r:"Value does not fall within the expected range."),f;return t&&(o+=e+u.format(i,t)),f=n.create(o,{name:"Sys.ArgumentException",paramName:t}),f.popStackFrame(),f},n.argumentNull=function(t,r){var o="Sys.ArgumentNullException: "+(r?r:"Value cannot be null."),f;return t&&(o+=e+u.format(i,t)),f=n.create(o,{name:"Sys.ArgumentNullException",paramName:t}),f.popStackFrame(),f},n.argumentOutOfRange=function(f,o,s){var h="Sys.ArgumentOutOfRangeException: "+(s?s:"Specified argument was out of the range of valid values."),c;return f&&(h+=e+u.format(i,f)),typeof o!==r&&o!==t&&(h+=e+u.format("Actual value was {0}.",o)),c=n.create(h,{name:"Sys.ArgumentOutOfRangeException",paramName:f,actualValue:o}),c.popStackFrame(),c},n.argumentType=function(t,r,f,o){var s="Sys.ArgumentTypeException: ",h;return s+=o?o:r&&f?u.format("Object of type '{0}' cannot be converted to type '{1}'.",r.getName?r.getName():r,f.getName?f.getName():f):"Object cannot be converted to the required type.",t&&(s+=e+u.format(i,t)),h=n.create(s,{name:"Sys.ArgumentTypeException",paramName:t,actualType:r,expectedType:f}),h.popStackFrame(),h},n.argumentUndefined=function(t,r){var o="Sys.ArgumentUndefinedException: "+(r?r:"Value cannot be undefined."),f;return t&&(o+=e+u.format(i,t)),f=n.create(o,{name:"Sys.ArgumentUndefinedException",paramName:t}),f.popStackFrame(),f},n.invalidOperation=function(t){var r="Sys.InvalidOperationException: "+(t?t:"Operation is not valid due to the current state of the object."),i=n.create(r,{name:"Sys.InvalidOperationException"});return i.popStackFrame(),i},n}();n.MsAjaxError=o;u=function(){function n(){}return n.format=function(n){for(var r,i=[],t=1;t0){for(r=[],i=0;i=s)break;if(f=Function._validateParameter(n[e],o,h),f)return f.popStackFrame(),f}return t}),Function._validateParameterCount||(Function._validateParameterCount=function(n,r,u){var f,s,e=r.length,h=n.length,c,l,a;if(he)for(s=i,f=0;f0){var t=h.shift();d(t)}else clearInterval(u),u=n}else OsfMsAjaxFactory.msAjaxDebug.trace(v)}function d(n){o=n.getInvokeBlockingFlag();n.invoke();c=(new Date).getTime()}function ot(){var r,u,s,e,h,o,t;if(f){u=0;s=new Date;for(h in i){r=i[h];for(o in r._callbackList)if(t=r._callbackList[o],e=t.timeout?t.timeout:b,e>=0&&Math.abs(s.getTime()-t.createdOn)>=e)try{t.callback&&t.callback(Microsoft.Office.Common.InvokeResultCode.errorHandlingMethodCallTimedout,n)}finally{delete r._callbackList[o]}else u++}u===0&&(clearInterval(f),f=n)}else OsfMsAjaxFactory.msAjaxDebug.trace(v)}function st(){o=t}function ht(n){if(window.addEventListener)window.addEventListener("message",n,t);else if(navigator.userAgent.indexOf("MSIE")>-1&&window.attachEvent)window.attachEvent("onmessage",n);else{OsfMsAjaxFactory.msAjaxDebug.trace("Browser doesn't support the required API.");throw OsfMsAjaxFactory.msAjaxError.argument("Browser");}}function ct(n,i){var f=t,r,u;return n===e?e:!n||!i||!n.length||!i.length?f:(r=document.createElement("a"),u=document.createElement("a"),r.href=n,u.href=i,f=g(r,u),delete r,u,f)}function l(n,i){var u=t,f,e,r;if(!i||!i.length||!n||!(n instanceof Array)||!n.length)return u;for(f=document.createElement("a"),e=document.createElement("a"),f.href=i,r=0;rp)&&!o?(d(ht),lt=t):u=setInterval(et,p));lt&&ft(ht)}catch(w){s&&s._onHandleRequestError&&s._onHandleRequestError(r,w);nt=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequest;w==tt&&(nt=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied);var pt=new Microsoft.Office.Common.Response(r._actionName,r._conversationId,r._correlationId,nt,Microsoft.Office.Common.ResponseType.forCalling,w),wt=Microsoft.Office.Common.MessagePackager.envelope(pt,f),at=t;try{at=!!(i.source&&i.source.postMessage)}catch(w){}at&&i.source.postMessage(wt,b)}}else if(r._messageType===Microsoft.Office.Common.MessageType.response){if(h=rt(r._conversationId),!h)return;if(h._serializerVersion=f,!ct(h._targetUrl,i.origin))throw"Failed orgin check";if(r._responseType===Microsoft.Office.Common.ResponseType.forCalling){if(v=h._callbackList[r._correlationId],v)try{v.callback&&v.callback(r._errorCode,r._data)}finally{delete h._callbackList[r._correlationId]}}else y=h._eventHandlerList[r._actionName],y!==undefined&&y!==n&&y(r._data)}else return}}function nt(){k||(ht(lt),k=e)}var a="serviceEndPointId",e=!0,v="channel is not ready.",s="conversationId",y="Unknown conversation Id.",t=!1,n=null,h=[],c=n,u=n,p=10,o=t,f=n,tt=2e3,w=65e3,b=w,r={},i={},k=t;return{connect:function(n,t,r,u){var f=i[n];return f||(nt(),f=new Microsoft.Office.Common.ClientEndPoint(n,t,r,u),i[n]=f),f},getClientEndPoint:function(n){var r=Function._validateParams(arguments,[{name:s,type:String,mayBeNull:t}]);if(r)throw r;return i[n]},createServiceEndPoint:function(n){nt();var t=new Microsoft.Office.Common.ServiceEndPoint(n);return r[n]=t,t},getServiceEndPoint:function(n){var i=Function._validateParams(arguments,[{name:a,type:String,mayBeNull:t}]);if(i)throw i;return r[n]},deleteClientEndPoint:function(n){var r=Function._validateParams(arguments,[{name:s,type:String,mayBeNull:t}]);if(r)throw r;delete i[n]},deleteServiceEndPoint:function(n){var i=Function._validateParams(arguments,[{name:a,type:String,mayBeNull:t}]);if(i)throw i;delete r[n]},checkUrlWithAppDomains:function(n,t){return l(n,t)},_setMethodTimeout:function(n){var i=Function._validateParams(arguments,[{name:"methodTimeout",type:Number,mayBeNull:t}]);if(i)throw i;b=n<=0?w:n},_startMethodTimeoutTimer:function(){f||(f=setInterval(ot,tt))}}}();Microsoft.Office.Common.Message=function(n,t,i,r,u){var e=!1,f=this,o=Function._validateParams(arguments,[{name:"messageType",type:Number,mayBeNull:e},{name:"actionName",type:String,mayBeNull:e},{name:"conversationId",type:String,mayBeNull:e},{name:"correlationId",mayBeNull:e},{name:"data",mayBeNull:!0,optional:!0}]);if(o)throw o;f._messageType=n;f._actionName=t;f._conversationId=i;f._correlationId=r;f._origin=window.location.href;f._data=typeof u=="undefined"?null:u};Microsoft.Office.Common.Message.prototype={getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getOrigin:function(){return this._origin},getData:function(){return this._data},getMessageType:function(){return this._messageType}};Microsoft.Office.Common.Request=function(n,t,i,r,u){Microsoft.Office.Common.Request.uber.constructor.call(this,Microsoft.Office.Common.MessageType.request,n,i,r,u);this._actionType=t};OSF.OUtil.extend(Microsoft.Office.Common.Request,Microsoft.Office.Common.Message);Microsoft.Office.Common.Request.prototype.getActionType=function(){return this._actionType};Microsoft.Office.Common.Response=function(n,t,i,r,u,f){Microsoft.Office.Common.Response.uber.constructor.call(this,Microsoft.Office.Common.MessageType.response,n,t,i,f);this._errorCode=r;this._responseType=u};OSF.OUtil.extend(Microsoft.Office.Common.Response,Microsoft.Office.Common.Message);Microsoft.Office.Common.Response.prototype.getErrorCode=function(){return this._errorCode};Microsoft.Office.Common.Response.prototype.getResponseType=function(){return this._responseType};Microsoft.Office.Common.MessagePackager={envelope:function(n){return typeof n=="object"&&(n._serializerVersion=OSF.SerializerVersion.Browser),JSON.stringify(n)},unenvelope:function(n){return JSON.parse(n)}};Microsoft.Office.Common.ResponseSender=function(n,t,i,r,u,f,e){var h=!1,o=this,c=Function._validateParams(arguments,[{name:"requesterWindow",mayBeNull:h},{name:"requesterUrl",type:String,mayBeNull:h},{name:"actionName",type:String,mayBeNull:h},{name:"conversationId",type:String,mayBeNull:h},{name:"correlationId",mayBeNull:h},{name:"responsetype",type:Number,maybeNull:h},{name:"serializerVersion",type:Number,maybeNull:!0,optional:!0}]),s;if(c)throw c;o._requesterWindow=n;o._requesterUrl=t;o._actionName=i;o._conversationId=r;o._correlationId=u;o._invokeResultCode=Microsoft.Office.Common.InvokeResultCode.noError;o._responseType=f;s=o;o._send=function(n){try{var t=new Microsoft.Office.Common.Response(s._actionName,s._conversationId,s._correlationId,s._invokeResultCode,s._responseType,n),i=Microsoft.Office.Common.MessagePackager.envelope(t,e);s._requesterWindow.postMessage(i,s._requesterUrl)}catch(r){OsfMsAjaxFactory.msAjaxDebug.trace("ResponseSender._send error:"+r.message)}}};Microsoft.Office.Common.ResponseSender.prototype={getRequesterWindow:function(){return this._requesterWindow},getRequesterUrl:function(){return this._requesterUrl},getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getSend:function(){return this._send},setResultCode:function(n){this._invokeResultCode=n}};Microsoft.Office.Common.InvokeCompleteCallback=function(n,t,i,r,u,f,e){var s=this,o;Microsoft.Office.Common.InvokeCompleteCallback.uber.constructor.call(s,n,t,i,r,u,Microsoft.Office.Common.ResponseType.forCalling,e);s._postCallbackHandler=f;o=s;s._send=function(n,t){t!=undefined&&(o._invokeResultCode=t);try{var i=new Microsoft.Office.Common.Response(o._actionName,o._conversationId,o._correlationId,o._invokeResultCode,o._responseType,n),r=Microsoft.Office.Common.MessagePackager.envelope(i,e);o._requesterWindow.postMessage(r,o._requesterUrl);o._postCallbackHandler()}catch(u){OsfMsAjaxFactory.msAjaxDebug.trace("InvokeCompleteCallback._send error:"+u.message)}}};OSF.OUtil.extend(Microsoft.Office.Common.InvokeCompleteCallback,Microsoft.Office.Common.ResponseSender);Microsoft.Office.Common.Invoker=function(n,t,i,r,u,f,e){var s=!0,h=!1,o=this,c=Function._validateParams(arguments,[{name:"methodObject",mayBeNull:h},{name:"paramValue",mayBeNull:s},{name:"invokeCompleteCallback",mayBeNull:h},{name:"eventHandlerProxyList",mayBeNull:s},{name:"conversationId",type:String,mayBeNull:h},{name:"eventName",type:String,mayBeNull:h},{name:"serializerVersion",type:Number,mayBeNull:s,optional:s}]);if(c)throw c;o._methodObject=n;o._param=t;o._invokeCompleteCallback=i;o._eventHandlerProxyList=r;o._conversationId=u;o._eventName=f;o._serializerVersion=e};Microsoft.Office.Common.Invoker.prototype={invoke:function(){var n=this,t,i,u,r,f;try{switch(n._methodObject.getInvokeType()){case Microsoft.Office.Common.InvokeType.async:n._methodObject.getMethod()(n._param,n._invokeCompleteCallback.getSend());break;case Microsoft.Office.Common.InvokeType.sync:t=n._methodObject.getMethod()(n._param);n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.syncRegisterEvent:i=n._createEventHandlerProxyObject(n._invokeCompleteCallback);t=n._methodObject.getMethod()(i.getSend(),n._param);n._eventHandlerProxyList[n._conversationId+n._eventName]=i.getSend();n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.syncUnregisterEvent:u=n._eventHandlerProxyList[n._conversationId+n._eventName];t=n._methodObject.getMethod()(u,n._param);delete n._eventHandlerProxyList[n._conversationId+n._eventName];n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.asyncRegisterEvent:r=n._createEventHandlerProxyObject(n._invokeCompleteCallback);n._methodObject.getMethod()(r.getSend(),n._invokeCompleteCallback.getSend(),n._param);n._eventHandlerProxyList[n._callerId+n._eventName]=r.getSend();break;case Microsoft.Office.Common.InvokeType.asyncUnregisterEvent:f=n._eventHandlerProxyList[n._callerId+n._eventName];n._methodObject.getMethod()(f,n._invokeCompleteCallback.getSend(),n._param);delete n._eventHandlerProxyList[n._callerId+n._eventName]}}catch(e){n._invokeCompleteCallback.setResultCode(Microsoft.Office.Common.InvokeResultCode.errorInResponse);n._invokeCompleteCallback.getSend()(e)}},getInvokeBlockingFlag:function(){return this._methodObject.getBlockingFlag()},_createEventHandlerProxyObject:function(n){return new Microsoft.Office.Common.ResponseSender(n.getRequesterWindow(),n.getRequesterUrl(),n.getActionName(),n.getConversationId(),n.getCorrelationId(),Microsoft.Office.Common.ResponseType.forEventing,this._serializerVersion)}};OSF.OUtil.setNamespace("WAC",OSF.DDA);OSF.DDA.WAC.UniqueArguments={Data:"Data",Properties:"Properties",BindingRequest:"DdaBindingsMethod",BindingResponse:"Bindings",SingleBindingResponse:"singleBindingResponse",GetData:"DdaGetBindingData",AddRowsColumns:"DdaAddRowsColumns",SetData:"DdaSetBindingData",ClearFormats:"DdaClearBindingFormats",SetFormats:"DdaSetBindingFormats",SettingsRequest:"DdaSettingsMethod",BindingEventSource:"ddaBinding",ArrayData:"ArrayData"};OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC);OSF.DDA.WAC.Delegate.SpecialProcessor=function(){var n=[OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,OSF.DDA.WAC.UniqueArguments.BindingRequest,OSF.DDA.WAC.UniqueArguments.BindingResponse,OSF.DDA.WAC.UniqueArguments.GetData,OSF.DDA.WAC.UniqueArguments.AddRowsColumns,OSF.DDA.WAC.UniqueArguments.SetData,OSF.DDA.WAC.UniqueArguments.ClearFormats,OSF.DDA.WAC.UniqueArguments.SetFormats,OSF.DDA.WAC.UniqueArguments.SettingsRequest,OSF.DDA.WAC.UniqueArguments.BindingEventSource],t={};OSF.DDA.WAC.Delegate.SpecialProcessor.uber.constructor.call(this,n,t)};OSF.OUtil.extend(OSF.DDA.WAC.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.WAC.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.WAC.Delegate.SpecialProcessor,[]);OSF.OUtil.setNamespace("WAC",OSF.DDA);OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC);OSF.DDA.WAC.getDelegateMethods=function(){var n={};return n[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.WAC.Delegate.executeAsync,n[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.WAC.Delegate.registerEventAsync,n[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.WAC.Delegate.unregisterEventAsync,n[OSF.DDA.DispIdHost.Delegates.OpenDialog]=OSF.DDA.WAC.Delegate.openDialog,n[OSF.DDA.DispIdHost.Delegates.MessageParent]=OSF.DDA.WAC.Delegate.messageParent,n[OSF.DDA.DispIdHost.Delegates.SendMessage]=OSF.DDA.WAC.Delegate.sendMessage,n[OSF.DDA.DispIdHost.Delegates.CloseDialog]=OSF.DDA.WAC.Delegate.closeDialog,n};OSF.DDA.WAC.Delegate.version=1;OSF.DDA.WAC.Delegate.executeAsync=function(n){n.hostCallArgs||(n.hostCallArgs={});n.hostCallArgs.DdaMethod={ControlId:OSF._OfficeAppFactory.getId(),Version:OSF.DDA.WAC.Delegate.version,DispatchId:n.dispId};n.hostCallArgs.__timeout__=-1;n.onCalling&&n.onCalling();var t=(new Date).getTime();OSF.getClientEndPoint()&&OSF.getClientEndPoint().invoke("executeMethod",function(i,r){n.onReceiving&&n.onReceiving();var u;if(i==Microsoft.Office.Common.InvokeResultCode.noError)OSF.DDA.WAC.Delegate.version=r.Version,u=r.Error;else switch(i){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:u=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:u=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}n.onComplete&&n.onComplete(u,r);OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs((new Date).getTime()-t),u)},n.hostCallArgs)};OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent=function(n,t){var i=(new Date).getTime();return function(r,u){t.onReceiving&&t.onReceiving();var f;if(r!=Microsoft.Office.Common.InvokeResultCode.noError)switch(r){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:f=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:f=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}else f=u?u.Error?u.Error:OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess:OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;t.onComplete&&t.onComplete(f);OSF.AppTelemetry&&OSF.AppTelemetry.onRegisterDone(n,t.dispId,Math.abs((new Date).getTime()-i),f)}};OSF.DDA.WAC.Delegate.registerEventAsync=function(n){(n.onCalling&&n.onCalling(),OSF.getClientEndPoint())&&OSF.getClientEndPoint().registerForEvent(OSF.DDA.getXdmEventName(n.targetId,n.eventType),function(t){n.onEvent&&n.onEvent(t);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!0,n),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:n.dispId,targetId:n.targetId})};OSF.DDA.WAC.Delegate.unregisterEventAsync=function(n){(n.onCalling&&n.onCalling(),OSF.getClientEndPoint())&&OSF.getClientEndPoint().unregisterForEvent(OSF.DDA.getXdmEventName(n.targetId,n.eventType),OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!1,n),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:n.dispId,targetId:n.targetId})};OSF.OUtil.setNamespace("WebApp",OSF);OSF.WebApp.AddHostInfoAndXdmInfo=function(n){return OSF._OfficeAppFactory.getWindowLocationSearch&&OSF._OfficeAppFactory.getWindowLocationHash?n+OSF._OfficeAppFactory.getWindowLocationSearch()+OSF._OfficeAppFactory.getWindowLocationHash():n};OSF.WebApp._UpdateLinksForHostAndXdmInfo=function(){for(var r,i,t=document.querySelectorAll("a[data-officejs-navigate]"),n=0;n0?n.substr(0,i):null,r=t!==null?t.toLowerCase()==="http"||t.toLowerCase()==="https":!0;return r&&n!="#"&&n!="/"&&n!=""&&n!=OSF._OfficeAppFactory.getWebAppState().webAppUrl};OSF.InitializationHelper=function(n,t,i,r,u){var f=this,e;f._hostInfo=n;f._webAppState=t;f._context=i;f._settings=r;f._hostFacade=u;f._appContext={};f._tabbableElements="a[href]:not([tabindex='-1']),area[href]:not([tabindex='-1']),button:not([disabled]):not([tabindex='-1']),input:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),textarea:not([disabled]):not([tabindex='-1']),*[tabindex]:not([tabindex='-1']),*[contenteditable]:not([disabled]):not([tabindex='-1'])";f._initializeSettings=function(n,t){var r=n.get_settings(),u=OSF.OUtil.getSessionStorage(),i,f;return u&&(i=u.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey()),i?r=JSON.parse(i):(i=JSON.stringify(r),u.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),i))),f=OSF.DDA.SettingsManager.deserializeSettings(r),t?new OSF.DDA.RefreshableSettings(f):new OSF.DDA.Settings(f)};e=function(n){var t=window.open;n.open=function(n,i,r){var u=null,f;try{u=t(n,i,r)}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppCommonMessage("Exception happens at windowOpen."+e)}return u||(f={strUrl:n,strWindowName:i,strWindowFeatures:r},OSF._OfficeAppFactory.getClientEndPoint()&&OSF._OfficeAppFactory.getClientEndPoint().invoke("ContextActivationManager_openWindowInHost",null,f)),u}};e(window)};OSF.InitializationHelper.prototype.saveAndSetDialogInfo=function(n){var u="IsDialog",t=!0,f=function(){var n=OSF.OUtil.parseXdmInfo(t),i;return n?(i=n.split("|"),i[1]):null},i=OSF.OUtil.getSessionStorage(),r;if(i){if(n||(n=OSF.OUtil.parseHostInfoFromWindowName(t,OSF._OfficeAppFactory.getWindowName())),n&&n.indexOf("isDialog")>-1){r=f();r!=null&&i.setItem(r+u,"true");this._hostInfo.isDialog=t;return}this._hostInfo.isDialog=i.getItem(OSF.OUtil.getXdmFieldValue(OSF.XdmFieldName.AppId,!1)+u)!=null?t:!1}};OSF.InitializationHelper.prototype.getAppContext=function(n,t){var i=this,e=i,r=function(n,i){var u,f,c,o,s,r,h;if(i._appName===OSF.AppName.ExcelWebApp){f=i._settings;u={};for(c in f)o=f[c],u[o[0]]=o[1]}else u=i._settings;if(n===0&&i._id!=undefined&&i._appName!=undefined&&i._appVersion!=undefined&&i._appUILocale!=undefined&&i._dataLocale!=undefined&&i._docUrl!=undefined&&i._clientMode!=undefined&&i._settings!=undefined&&i._reason!=undefined){e._appContext=i;var a=i._appInstanceId?i._appInstanceId:i._id,v=!1,y=!0,l=0;i._appMinorVersion!=undefined&&(l=i._appMinorVersion);s=undefined;i._requirementMatrix!=undefined&&(s=i._requirementMatrix);i.eToken=i.eToken?i.eToken:"";r=new OSF.OfficeAppContext(i._id,i._appName,i._appVersion,i._appUILocale,i._dataLocale,i._docUrl,i._clientMode,u,i._reason,i._osfControlType,i._eToken,i._correlationId,a,v,y,l,s,i._hostCustomMessage,i._hostFullVersion,i._clientWindowHeight,i._clientWindowWidth,i._addinName,i._appDomains,i._dialogRequirementMatrix);r._wacHostEnvironment=i._wacHostEnvironment||"0";r._isFromWacAutomation=!!i._isFromWacAutomation;OSF.AppTelemetry&&OSF.AppTelemetry.initialize(r);t(r)}else{h="Function ContextActivationManager_getAppContextAsync call failed. ErrorCode is "+n+", exception: "+i;OSF.AppTelemetry&&OSF.AppTelemetry.logAppException(h);throw h;}},u;try{i._hostInfo.isDialog&&window.opener!=null?(u=OfficeExt.WACUtils.parseAppContextFromWindowName(!1,OSF._OfficeAppFactory.getWindowName()),r(0,u)):i._webAppState.clientEndPoint.invoke("ContextActivationManager_getAppContextAsync",r,i._webAppState.id)}catch(f){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown when trying to invoke getAppContextAsync. Exception:["+f+"]");throw f;}};OSF.InitializationHelper.prototype.setAgaveHostCommunication=function(){var u=null,t=!1,n,r,i,f,e,o;try{if(n=this,r=OSF.OUtil.parseXdmInfoWithGivenFragment(t,OSF._OfficeAppFactory.getWindowLocationHash()),!r&&OSF._OfficeAppFactory.getWindowName&&(r=OSF.OUtil.parseXdmInfoFromWindowName(t,OSF._OfficeAppFactory.getWindowName())),r&&(i=OSF.OUtil.getInfoItems(r),i!=undefined&&i.length>=3&&(n._webAppState.conversationID=i[0],n._webAppState.id=i[1],n._webAppState.webAppUrl=i[2].indexOf(":")>=0?i[2]:decodeURIComponent(i[2]))),n._webAppState.wnd=window.opener!=u?window.opener:window.parent,f=OSF.OUtil.parseSerializerVersionWithGivenFragment(t,OSF._OfficeAppFactory.getWindowLocationHash()),isNaN(f)&&OSF._OfficeAppFactory.getWindowName&&(f=OSF.OUtil.parseSerializerVersionFromWindowName(t,OSF._OfficeAppFactory.getWindowName())),n._webAppState.serializerVersion=f,this._hostInfo.isDialog&&window.opener!=u)return;n._webAppState.clientEndPoint=Microsoft.Office.Common.XdmCommunicationManager.connect(n._webAppState.conversationID,n._webAppState.wnd,n._webAppState.webAppUrl,n._webAppState.serializerVersion);n._webAppState.serviceEndPoint=Microsoft.Office.Common.XdmCommunicationManager.createServiceEndPoint(n._webAppState.id);e=n._webAppState.conversationID+OSF.SharedConstants.NotificationConversationIdSuffix;n._webAppState.serviceEndPoint.registerConversation(e,n._webAppState.webAppUrl);o=function(i){var e="ContextActivationManager_notifyHost",r,f;switch(i){case OSF.AgaveHostAction.Select:n._webAppState.focused=!0;break;case OSF.AgaveHostAction.UnSelect:n._webAppState.focused=t;break;case OSF.AgaveHostAction.TabIn:case OSF.AgaveHostAction.CtrlF6In:window.focus();r=document.querySelectorAll(n._tabbableElements);f=OSF.OUtil.focusToFirstTabbable(r,t);f||(window.blur(),n._webAppState.focused=t,n._webAppState.clientEndPoint.invoke(e,u,[n._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable]));break;case OSF.AgaveHostAction.TabInShift:window.focus();r=document.querySelectorAll(n._tabbableElements);f=OSF.OUtil.focusToFirstTabbable(r,!0);f||(window.blur(),n._webAppState.focused=t,n._webAppState.clientEndPoint.invoke(e,u,[n._webAppState.id,OSF.AgaveHostAction.ExitNoFocusableShift]));break;default:OsfMsAjaxFactory.msAjaxDebug.trace("actionId "+i+" notifyAgave is wrong.")}};n._webAppState.serviceEndPoint.registerMethod("Office_notifyAgave",o,Microsoft.Office.Common.InvokeType.async,t);n.addOrRemoveEventListenersForWindow(!0)}catch(s){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown in setAgaveHostCommunication. Exception:["+s+"]");throw s;}};OSF.InitializationHelper.prototype.addOrRemoveEventListenersForWindow=function(n){var u="keypress",i=null,r="ContextActivationManager_notifyHost",t=this,f=function(){t._webAppState.focused||(t._webAppState.focused=!0);t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.Select])},e=function(){OSF&&(t._webAppState.focused&&(t._webAppState.focused=!1),t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.UnSelect]))},o=function(n){var u,f,e;n.preventDefault=n.preventDefault||function(){n.returnValue=!1};n.keyCode==117&&(n.ctrlKey||n.metaKey)?(u=OSF.AgaveHostAction.CtrlF6Exit,n.shiftKey&&(u=OSF.AgaveHostAction.CtrlF6ExitShift),t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,u])):n.keyCode==9?(n.preventDefault(),f=document.querySelectorAll(t._tabbableElements),e=OSF.OUtil.focusToNextTabbable(f,n.target||n.srcElement,n.shiftKey),e||(t._hostInfo.isDialog?OSF.OUtil.focusToFirstTabbable(f,n.shiftKey):n.shiftKey?t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.TabExitShift]):t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.TabExit]))):n.keyCode==27?(n.preventDefault(),t.dismissDialogNotification&&t.dismissDialogNotification(),t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.EscExit])):n.keyCode==113&&(n.preventDefault(),t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.F2Exit]))},s=function(n){n.keyCode==117&&n.ctrlKey&&(n.preventDefault?n.preventDefault():n.returnValue=!1)};n?(OSF.OUtil.addEventListener(window,"focus",f),OSF.OUtil.addEventListener(window,"blur",e),OSF.OUtil.addEventListener(window,"keydown",o),OSF.OUtil.addEventListener(window,u,s)):(OSF.OUtil.removeEventListener(window,"focus",f),OSF.OUtil.removeEventListener(window,"blur",e),OSF.OUtil.removeEventListener(window,"keydown",o),OSF.OUtil.removeEventListener(window,u,s))};OSF.InitializationHelper.prototype.initWebDialog=function(n){if(n.get_isDialog()){if(OSF.DDA.UI.ChildUI){var t=window.opener!=null;n.ui=new OSF.DDA.UI.ChildUI(t);t&&this.registerMessageReceivedEventForWindowDialog&&this.registerMessageReceivedEventForWindowDialog()}}else OSF.DDA.UI.ParentUI&&(n.ui=new OSF.DDA.UI.ParentUI,OfficeExt.Container&&OSF.DDA.DispIdHost.addAsyncMethods(n.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync]))};OSF.InitializationHelper.prototype.initWebAuth=function(n){OSF.DDA.Auth&&(n.auth=new OSF.DDA.Auth,OSF.DDA.DispIdHost.addAsyncMethods(n.auth,[OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]))};OSF.getClientEndPoint=function(){var n=OSF._OfficeAppFactory.getInitializationHelper();return n._webAppState.clientEndPoint};OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize=function(){var n=this,t,i;n._hostInfo.isDialog&&(window.focus(),t=document.querySelectorAll(n._tabbableElements),i=OSF.OUtil.focusToFirstTabbable(t,!1),i||(window.blur(),n._webAppState.focused=!1,n._webAppState.clientEndPoint&&n._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[n._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable])))},function(n){var u="ResponseTime",f="Message",i="SessionId",r="CorrelationId",t=!0,e=function(){function n(n){this._table=n;this._fields={}}return Object.defineProperty(n.prototype,"Fields",{get:function(){return this._fields},enumerable:t,configurable:t}),Object.defineProperty(n.prototype,"Table",{get:function(){return this._table},enumerable:t,configurable:t}),n.prototype.SerializeFields=function(){},n.prototype.SetSerializedField=function(n,t){typeof t!="undefined"&&t!==null&&(this._serializedFields[n]=t.toString())},n.prototype.SerializeRow=function(){var n=this;return n._serializedFields={},n.SetSerializedField("Table",n._table),n.SerializeFields(),JSON.stringify(n._serializedFields)},n}(),o,s,h,c,l;n.BaseUsageData=e;o=function(n){function u(){n.call(this,"AppActivated")}var e="IsFromWacAutomation",o="WacHostEnvironment",s="HostJSVersion",h="OfficeJSVersion",c="DocUrl",l="AppSizeHeight",a="AppSizeWidth",v="ClientId",y="HostVersion",p="Host",w="UserId",b="Browser",k="AssetId",d="AppURL",g="AppInstanceId",nt="AppId";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,nt,{get:function(){return this.Fields[nt]},set:function(n){this.Fields[nt]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,g,{get:function(){return this.Fields[g]},set:function(n){this.Fields[g]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,d,{get:function(){return this.Fields[d]},set:function(n){this.Fields[d]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,k,{get:function(){return this.Fields[k]},set:function(n){this.Fields[k]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,b,{get:function(){return this.Fields[b]},set:function(n){this.Fields[b]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,w,{get:function(){return this.Fields[w]},set:function(n){this.Fields[w]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,p,{get:function(){return this.Fields[p]},set:function(n){this.Fields[p]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,y,{get:function(){return this.Fields[y]},set:function(n){this.Fields[y]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,v,{get:function(){return this.Fields[v]},set:function(n){this.Fields[v]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,a,{get:function(){return this.Fields[a]},set:function(n){this.Fields[a]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,l,{get:function(){return this.Fields[l]},set:function(n){this.Fields[l]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,c,{get:function(){return this.Fields[c]},set:function(n){this.Fields[c]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(nt,n.AppId);n.SetSerializedField(g,n.AppInstanceId);n.SetSerializedField(d,n.AppURL);n.SetSerializedField(k,n.AssetId);n.SetSerializedField(b,n.Browser);n.SetSerializedField(w,n.UserId);n.SetSerializedField(p,n.Host);n.SetSerializedField(y,n.HostVersion);n.SetSerializedField(v,n.ClientId);n.SetSerializedField(a,n.AppSizeWidth);n.SetSerializedField(l,n.AppSizeHeight);n.SetSerializedField(f,n.Message);n.SetSerializedField(c,n.DocUrl);n.SetSerializedField(h,n.OfficeJSVersion);n.SetSerializedField(s,n.HostJSVersion);n.SetSerializedField(o,n.WacHostEnvironment);n.SetSerializedField(e,n.IsFromWacAutomation)},u}(e);n.AppActivatedUsageData=o;s=function(n){function f(){n.call(this,"ScriptLoad")}var e="StartTime",o="ScriptId";return __extends(f,n),Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t}),f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(o,n.ScriptId);n.SetSerializedField(e,n.StartTime);n.SetSerializedField(u,n.ResponseTime)},f}(e);n.ScriptLoadUsageData=s;h=function(n){function u(){n.call(this,"AppClosed")}var f="CloseMethod",e="OpenTime",o="AppSizeFinalHeight",s="AppSizeFinalWidth",h="FocusTime";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(h,n.FocusTime);n.SetSerializedField(s,n.AppSizeFinalWidth);n.SetSerializedField(o,n.AppSizeFinalHeight);n.SetSerializedField(e,n.OpenTime);n.SetSerializedField(f,n.CloseMethod)},u}(e);n.AppClosedUsageData=h;c=function(n){function f(){n.call(this,"APIUsage")}var e="ErrorType",o="Parameters",s="APIID",h="APIType";return __extends(f,n),Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(h,n.APIType);n.SetSerializedField(s,n.APIID);n.SetSerializedField(o,n.Parameters);n.SetSerializedField(u,n.ResponseTime);n.SetSerializedField(e,n.ErrorType)},f}(e);n.APIUsageUsageData=c;l=function(n){function u(){n.call(this,"AppInitialization")}var e="SuccessCode";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(e,n.SuccessCode);n.SetSerializedField(f,n.Message)},u}(e);n.AppInitializationUsageData=l}(OSFLog||(OSFLog={})),function(n){"use strict";function u(){OSF.Logger&&OSF.Logger.ulsEndpoint&&OSF.Logger.ulsEndpoint.loadProxyFrame()}function f(n,t,i){if(OSF.Logger&&OSF.Logger.ulsEndpoint){var r={traceLevel:n,message:t,flag:i,internalLog:!0},u=JSON.stringify(r);OSF.Logger.ulsEndpoint.writeLog(u)}}function e(){try{return new t}catch(n){return null}}var i,r,t;(function(n){n[n.info=0]="info";n[n.warning=1]="warning";n[n.error=2]="error"})(n.TraceLevel||(n.TraceLevel={}));i=n.TraceLevel,function(n){n[n.none=0]="none";n[n.flush=1]="flush"}(n.SendFlag||(n.SendFlag={}));r=n.SendFlag;n.allowUploadingData=u;n.sendLog=f;t=function(){function n(){var n=this,t=n;n.proxyFrame=null;n.telemetryEndPoint="https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html";n.buffer=[];n.proxyFrameReady=!1;OSF.OUtil.addEventListener(window,"message",function(n){return t.tellProxyFrameReady(n)});setTimeout(function(){t.loadProxyFrame()},3e3)}return n.prototype.writeLog=function(t){var i=this;i.proxyFrameReady===!0?i.proxyFrame.contentWindow.postMessage(t,n.telemetryOrigin):i.buffer.length<128&&i.buffer.push(t)},n.prototype.loadProxyFrame=function(){var n=this;n.proxyFrame==null&&(n.proxyFrame=document.createElement("iframe"),n.proxyFrame.setAttribute("style","display:none"),n.proxyFrame.setAttribute("src",n.telemetryEndPoint),document.head.appendChild(n.proxyFrame))},n.prototype.tellProxyFrameReady=function(t){var i=this,e=i,r,u,f;if(t.data==="ProxyFrameReadyToLog"){for(i.proxyFrameReady=!0,r=0;r40)&&(n=OSF.OUtil.Guid.generateNewGuid(),t.setValue(t.clientIDKey,n)),n},n.prototype.saveLog=function(n,t){var i=this,u=i.getValue(i.logIdSetKey);u=(u&&u.length>0?u+";":r)+n;i.setValue(i.logIdSetKey,u);i.setValue(n,t)},n.prototype.enumerateLog=function(n,t){var i=this,e=i.getValue(i.logIdSetKey),u,o,r,f;if(e){u=e.split(";");for(o in u)r=u[o],f=i.getValue(r),f&&(n&&n(r,f),t&&i.remove(r));t&&i.remove(i.logIdSetKey)}},n.prototype.getValue=function(n){var t=OSF.OUtil.getLocalStorage(),i=r;return t&&(i=t.getItem(n)),i},n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)},n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}},n}(),o=function(){function n(){}return n.prototype.LogData=function(n){OSF.Logger&&(OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n.SerializeRow(),OSF.Logger.SendFlag.none),OSFAriaLogger.AriaLogger.getInstance().logData(n))},n.prototype.LogRawData=function(n){if(OSF.Logger){OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n,OSF.Logger.SendFlag.none);try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(n))}catch(t){}}},n}();n.initialize=v;n.onAppActivated=y;n.onScriptDone=p;n.onCallDone=w;n.onMethodDone=b;n.onPropertyDone=k;n.onEventDone=d;n.onRegisterDone=g;n.onAppClosed=nt;n.setOsfControlAppCorrelationId=tt;n.doAppInitializationLogging=c;n.logAppCommonMessage=it;n.logAppException=rt;OSF.AppTelemetry=n}(OSFAppTelemetry||(OSFAppTelemetry={}));Microsoft.Office.WebExtension.TableData=function(n,t){function i(n){if(n==null||n==undefined)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(n,2);t<2;t++)n=[n];return n}catch(i){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(n){t=i(n)}},rows:{get:function(){return n},set:function(t){n=t==null||OSF.OUtil.isArray(t)&&t.length==0?[]:i(t)}}});this.headers=t;this.rows=n};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(n){return new Microsoft.Office.WebExtension.TableData(n[OSF.DDA.TableDataProperties.TableRows],n[OSF.DDA.TableDataProperties.TableHeaders])};Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var n=null;return{findArrayDimensionality:function(n){if(OSF.OUtil.isArray(n)){for(var t=0,i=0;i0)for(r in i)if(i[r]===t)return!0;return!1},hasObjectEventHandler:function(n,t,i){var f=this._objectEventHandlers[n],r,u;if(f!=null)for(r=f[t],u=0;r!=null&&u0)for(r=0;r0?(this._eventHandlers[n]=[],!0):!1},clearObjectEventHandlers:function(n,t){return this._objectEventHandlers[n]!=null&&this._objectEventHandlers[n][t]!=null?(this._objectEventHandlers[n][t]=[],!0):!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},getObjectEventHandlerCount:function(n,t){return this._objectEventHandlers[n]==null||this._objectEventHandlers[n][t]==null?0:this._objectEventHandlers[n][t].length},fireEvent:function(n){var t,i,r;if(n.type==undefined)return!1;if(t=n.type,t&&this._eventHandlers[t]){i=this._eventHandlers[t];for(r in i)i[r](n);return!0}else return!1},fireObjectEvent:function(n,t){var i,f,r,u;if(t.type==undefined)return!1;if(i=t.type,i&&this._objectEventHandlers[i]&&(f=this._objectEventHandlers[i],r=f[n],r!=null)){for(u=0;u0)){for(r=t[0];i.length>0;)u=i.shift(),r(u);return!0}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var f="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(n,i[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:r=new OSF.DDA.RichApiMessageEventArgs(n,i);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]=="outlook"||OSF._OfficeAppFactory.getHostInfo()[f]=="outlookwebapp")r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i),t.initialize(r.initialData),t.setCurrentItemNumber(r.itemNumber.itemNumber);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogParentMessageReceivedEvent:"DialogParentMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogParentMessageReceived:"dialogParentMessageReceived",DialogParentEventReceived:"dialogParentEventReceived"});OSF.DialogParentMessageEventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived,Microsoft.Office.WebExtension.EventType.DialogParentEventReceived]);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType,{Image:"image"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType,{Ooxml:"ooxml"});OSF.DDA.DataPartProperties={Id:Microsoft.Office.WebExtension.Parameters.Id,BuiltIn:"DataPartBuiltIn"};OSF.DDA.DataNodeProperties={Handle:"DataNodeHandle",BaseName:"DataNodeBaseName",NamespaceUri:"DataNodeNamespaceUri",NodeType:"DataNodeType"};OSF.DDA.DataNodeEventProperties={OldNode:"OldNode",NewNode:"NewNode",NextSiblingNode:"NextSiblingNode",InUndoRedo:"InUndoRedo"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{DataPartProperties:"DataPartProperties",DataNodeProperties:"DataNodeProperties"});OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{DataPartList:"DataPartList",DataNodeList:"DataNodeList"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.DataPartList,OSF.DDA.PropertyDescriptors.DataPartProperties);OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.DataNodeList,OSF.DDA.PropertyDescriptors.DataNodeProperties);OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DataNodeInsertedEvent:"DataNodeInsertedEvent",DataNodeReplacedEvent:"DataNodeReplacedEvent",DataNodeDeletedEvent:"DataNodeDeletedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DataNodeDeleted:"nodeDeleted",DataNodeInserted:"nodeInserted",DataNodeReplaced:"nodeReplaced"});OSF.DDA.CustomXmlParts=function(){this._eventDispatches=[];var n=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[n.AddDataPartAsync,n.GetDataPartByIdAsync,n.GetDataPartsByNameSpaceAsync])};OSF.DDA.CustomXmlPart=function(n,t,i){var u,e,r,f;OSF.OUtil.defineEnumerableProperties(this,{builtIn:{value:i},id:{value:t},namespaceManager:{value:new OSF.DDA.CustomXmlPrefixMappings(t)}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.DeleteDataPartAsync,u.GetPartNodesAsync,u.GetPartXmlAsync]);e=n._eventDispatches;r=e[t];r||(f=Microsoft.Office.WebExtension.EventType,r=new OSF.EventDispatch([f.DataNodeDeleted,f.DataNodeInserted,f.DataNodeReplaced]),e[t]=r);OSF.DDA.DispIdHost.addEventSupport(this,r)};OSF.DDA.CustomXmlPrefixMappings=function(n){var t=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[t.AddDataPartNamespaceAsync,t.GetDataPartNamespaceAsync,t.GetDataPartPrefixAsync],n)};OSF.DDA.CustomXmlNode=function(n,t,i,r){OSF.OUtil.defineEnumerableProperties(this,{baseName:{value:r},namespaceUri:{value:i},nodeType:{value:t}});var u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.GetRelativeNodesAsync,u.GetNodeValueAsync,u.GetNodeXmlAsync,u.SetNodeValueAsync,u.SetNodeXmlAsync,u.GetNodeTextAsync,u.SetNodeTextAsync],n)};OSF.DDA.NodeInsertedEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DataNodeInserted},newNode:{value:n},inUndoRedo:{value:t}})};OSF.DDA.NodeReplacedEventArgs=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DataNodeReplaced},oldNode:{value:n},newNode:{value:t},inUndoRedo:{value:i}})};OSF.DDA.NodeDeletedEventArgs=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DataNodeDeleted},oldNode:{value:n},oldNextSibling:{value:t},inUndoRedo:{value:i}})};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureDataNode=function(n){if(n)return new OSF.DDA.CustomXmlNode(n[OSF.DDA.DataNodeProperties.Handle],n[OSF.DDA.DataNodeProperties.NodeType],n[OSF.DDA.DataNodeProperties.NamespaceUri],n[OSF.DDA.DataNodeProperties.BaseName])};OSF.DDA.OMFactory.manufactureDataPart=function(n,t){return new OSF.DDA.CustomXmlPart(t,n[OSF.DDA.DataPartProperties.Id],n[OSF.DDA.DataPartProperties.BuiltIn])};OSF.DDA.AsyncMethodNames.addNames({AddDataPartAsync:"addAsync",GetDataPartByIdAsync:"getByIdAsync",GetDataPartsByNameSpaceAsync:"getByNamespaceAsync",DeleteDataPartAsync:"deleteAsync",GetPartNodesAsync:"getNodesAsync",GetPartXmlAsync:"getXmlAsync",AddDataPartNamespaceAsync:"addNamespaceAsync",GetDataPartNamespaceAsync:"getNamespaceAsync",GetDataPartPrefixAsync:"getPrefixAsync",GetRelativeNodesAsync:"getNodesAsync",GetNodeValueAsync:"getNodeValueAsync",GetNodeXmlAsync:"getXmlAsync",SetNodeValueAsync:"setNodeValueAsync",SetNodeXmlAsync:"setXmlAsync",GetNodeTextAsync:"getTextAsync",SetNodeTextAsync:"setTextAsync"}),function(){function r(n){return OSF.DDA.OMFactory.manufactureDataPart(n,Microsoft.Office.WebExtension.context.document.customXmlParts)}function e(n){return OSF.DDA.OMFactory.manufactureDataNode(n)}function i(n){var t=n[Microsoft.Office.WebExtension.Parameters.Data];return t==undefined?null:t}function u(n){return n.id}function f(n,t){return t}function t(n,t){return t}var n="string";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddDataPartAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Xml,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartsByNameSpaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.DataPartList],r)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteDataPartAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:u}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetPartNodesAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.XPath,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:u}],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.DataNodeList],e)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetPartXmlAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:u}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddDataPartNamespaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Prefix,types:[n]},{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:f}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartNamespaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Prefix,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:f}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartPrefixAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:f}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetRelativeNodesAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.XPath,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.DataNodeList],e)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetNodeValueAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetNodeXmlAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetNodeValueAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetNodeXmlAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Xml,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetNodeTextAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetNodeTextAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Text,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}]})}();OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.DDA.Marshaling.CustomXmlPartsKeys={Id:"id",Namespace:"namespace",Xml:"xml",XPath:"xpath",Prefix:"prefix"};OSF.DDA.Marshaling.DataPartProperties={Id:"id",BuiltIn:"DataPartBuiltIn"};OSF.DDA.Marshaling.PropertyDescriptors={DataPartProperties:"DataPartProperties",DataNodeProperties:"DataNodeProperties"};OSF.DDA.Marshaling.DataNodeProperties={Handle:"DataNodeHandle",BaseName:"DataNodeBaseName",NamespaceUri:"DataNodeNamespaceUri",NodeType:"DataNodeType"};OSF.DDA.Marshaling.ListDescriptors={DataPartList:"DataPartList",DataNodeList:"DataNodeList"};OSF.DDA.Marshaling.DataNodeEventProperties={OldNode:"OldNode",NewNode:"NewNode",NextSiblingNode:"NextSiblingNode",InUndoRedo:"InUndoRedo"};OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.DataPartProperties,fromHost:[{name:OSF.DDA.DataPartProperties.Id,value:OSF.DDA.Marshaling.DataPartProperties.Id},{name:OSF.DDA.DataPartProperties.BuiltIn,value:OSF.DDA.Marshaling.DataPartProperties.BuiltIn}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.DataNodeProperties,fromHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle},{name:OSF.DDA.DataNodeProperties.BaseName,value:OSF.DDA.Marshaling.DataNodeProperties.BaseName},{name:OSF.DDA.DataNodeProperties.NamespaceUri,value:OSF.DDA.Marshaling.DataNodeProperties.NamespaceUri},{name:OSF.DDA.DataNodeProperties.NodeType,value:OSF.DDA.Marshaling.DataNodeProperties.NodeType}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DataNodeInsertedEvent,fromHost:[{name:OSF.DDA.DataNodeEventProperties.InUndoRedo,value:OSF.DDA.Marshaling.DataNodeEventProperties.InUndoRedo},{name:OSF.DDA.DataNodeEventProperties.NewNode,value:OSF.DDA.Marshaling.DataNodeEventProperties.NewNode}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DataNodeReplacedEvent,fromHost:[{name:OSF.DDA.DataNodeEventProperties.InUndoRedo,value:OSF.DDA.Marshaling.DataNodeEventProperties.InUndoRedo},{name:OSF.DDA.DataNodeEventProperties.OldNode,value:OSF.DDA.Marshaling.DataNodeEventProperties.OldNode},{name:OSF.DDA.DataNodeEventProperties.NewNode,value:OSF.DDA.Marshaling.DataNodeEventProperties.NewNode}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DataNodeDeletedEvent,fromHost:[{name:OSF.DDA.DataNodeEventProperties.InUndoRedo,value:OSF.DDA.Marshaling.DataNodeEventProperties.InUndoRedo},{name:OSF.DDA.DataNodeEventProperties.OldNode,value:OSF.DDA.Marshaling.DataNodeEventProperties.OldNode},{name:OSF.DDA.DataNodeEventProperties.NextSiblingNode,value:OSF.DDA.Marshaling.DataNodeEventProperties.NextSiblingNode}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.DataNodeEventProperties.OldNode,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataNodeProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.DataNodeEventProperties.NewNode,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataNodeProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.DataNodeEventProperties.NextSiblingNode,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataNodeProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddDataPartMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataPartProperties,value:OSF.DDA.Marshaling.PropertyDescriptors.DataPartProperties}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Xml,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Xml}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartByIdMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataPartProperties,value:OSF.DDA.Marshaling.PropertyDescriptors.DataPartProperties}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Id}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartsByNamespaceMethod,fromHost:[{name:OSF.DDA.ListDescriptors.DataPartList,value:OSF.DDA.Marshaling.ListDescriptors.DataPartList}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Namespace}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartXmlMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Id}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartNodesMethod,fromHost:[{name:OSF.DDA.ListDescriptors.DataNodeList,value:OSF.DDA.Marshaling.ListDescriptors.DataNodeList}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Id},{name:Microsoft.Office.WebExtension.Parameters.XPath,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.XPath}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidDeleteDataPartMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Id}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodeValueMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodeXmlMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodeTextMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodesMethod,fromHost:[{name:OSF.DDA.ListDescriptors.DataNodeList,value:OSF.DDA.Marshaling.ListDescriptors.DataNodeList}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle},{name:Microsoft.Office.WebExtension.Parameters.XPath,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.XPath}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetDataNodeValueMethod,toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle},{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetDataNodeXmlMethod,toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle},{name:Microsoft.Office.WebExtension.Parameters.Xml,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Xml}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetDataNodeTextMethod,toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle},{name:Microsoft.Office.WebExtension.Parameters.Text,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Text}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddDataNamespaceMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.DataPartProperties.Id},{name:Microsoft.Office.WebExtension.Parameters.Prefix,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Prefix},{name:Microsoft.Office.WebExtension.Parameters.Namespace,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Namespace}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataUriByPrefixMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.DataPartProperties.Id},{name:Microsoft.Office.WebExtension.Parameters.Prefix,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Prefix}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPrefixByUriMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.DataPartProperties.Id},{name:Microsoft.Office.WebExtension.Parameters.Namespace,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Namespace}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDataNodeAddedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DataNodeInsertedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDataNodeReplacedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DataNodeReplacedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDataNodeDeletedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DataNodeDeletedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.AsyncMethodNames.addNames({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync"}),function(){function r(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&r&&(r[OSF.DDA.TableDataProperties.TableRows]!=undefined||r[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(r=OSF.DDA.OMFactory.manufactureTableData(r)),r=OSF.DDA.DataCoercion.coerceData(r,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),r==undefined?null:r}var i=!1,n="boolean",t="number";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,"enum":Microsoft.Office.WebExtension.CoercionType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}}],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object",t,n]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[t,n],defaultValue:i}}],privateStateCallbacks:[]})}();OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.GetData,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:"BindingId"},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:"CoerceType"},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:"ValueFormat"},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:"FilterType"},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:"Rows"},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:"Columns"},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:"StartRow"},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:"StartCol"},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:"RowCount"},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:"ColCount"}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.SetData,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:"BindingId"},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:"CoerceType"},{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:"Rows"},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:"Columns"},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:"StartRow"},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:"StartCol"},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:"ImageLeft"},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:"ImageTop"},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:"ImageWidth"},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:"ImageHeight"}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.GetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",RefreshingSettings:"refreshingSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(n){var r={},i,t;for(i in n){t=n[i];try{t=JSON?JSON.stringify(t,function(n,t){return OSF.OUtil.isDate(this[n])?OSF.DDA.SettingsManager.DateJSONPrefix+this[n].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix:t}):Sys.Serialization.JavaScriptSerializer.serialize(t);r[i]=t}catch(u){}}return r},deserializeSettings:function(n){var r={},i,t;n=n||{};for(i in n){t=n[i];try{t=JSON?JSON.parse(t,function(n,t){var i;return typeof t=="string"&&t&&t.length>6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix&&(i=new Date(parseInt(t.slice(5,-1))),i)?i:t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,!0);r[i]=t}catch(u){}}return r}};OSF.DDA.Settings=function(n){var t="name",i;n=n||{};i=function(n){var i=OSF.OUtil.getSessionStorage(),t,r;i&&(t=OSF.DDA.SettingsManager.serializeSettings(n),r=JSON?JSON.stringify(t):Sys.Serialization.JavaScriptSerializer.serialize(t),i.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),r))};OSF.OUtil.defineEnumerableProperties(this,{get:{value:function(i){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]),r;if(u)throw u;return r=n[i],typeof r=="undefined"?null:r}},set:{value:function(r,u){var f=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1},{name:"value",mayBeNull:!0}]);if(f)throw f;n[r]=u;i(n)}},remove:{value:function(r){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]);if(u)throw u;delete n[r];i(n)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],n)};OSF.DDA.RefreshableSettings=function(n){OSF.DDA.RefreshableSettings.uber.constructor.call(this,n);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],n);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:n}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(n,t){return t}}],onSucceeded:function(n,t,i){var f=n[OSF.DDA.SettingsManager.SerializedSettings],u=OSF.DDA.SettingsManager.deserializeSettings(f),e=i[OSF.DDA.SettingsManager.RefreshingSettings];for(var r in e)t.remove(r);for(r in u)t.set(r,u[r]);return t}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(n,t){return OSF.DDA.SettingsManager.serializeSettings(t)}}]});OSF.DDA.WAC.SettingsTranslator=function(){var n=0,t=1;return{read:function(i){var u={},f=i.Settings,e,r;for(e in f)r=f[e],u[r[n]]=r[t];return u},write:function(i){var f=[],u,r;for(u in i)r=[],r[n]=u,r[t]=i[u],f.push(r);return f}}}();OSF.DDA.WAC.Delegate.ParameterMap.setDynamicType(OSF.DDA.SettingsManager.SerializedSettings,{toHost:OSF.DDA.WAC.SettingsTranslator.write,fromHost:OSF.DDA.WAC.SettingsTranslator.read});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.SettingsRequest,toHost:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:"OverwriteIfStale"},{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.WAC.UniqueArguments.Properties}],invertible:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.WAC.UniqueArguments.Properties}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SettingsRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"});OSF.DDA.DocumentSelectionChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:n}})};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDeleted:"objectDeleted"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectSelectionChanged:"objectSelectionChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDataChanged:"objectDataChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ContentControlAdded:"contentControlAdded"});OSF.DDA.ObjectEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:n},object:{value:t}})};OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent});OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(n){OSF.OUtil.defineEnumerableProperties(this,{url:{value:n[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(n){return new Microsoft.Office.WebExtension.FileProperties(n)}});OSF.OUtil.setNamespace("Marshaling",OSF.DDA),function(n){var t="Properties";n[n[t]=0]=t;n[n.Url=1]="Url"}(OSF_DDA_Marshaling_FilePropertiesKeys||(OSF_DDA_Marshaling_FilePropertiesKeys={}));OSF.DDA.Marshaling.FilePropertiesKeys=OSF_DDA_Marshaling_FilePropertiesKeys;OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,fromHost:[{name:OSF.DDA.FilePropertiesDescriptor.Url,value:OSF.DDA.Marshaling.FilePropertiesKeys.Url}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:OSF.DDA.Marshaling.FilePropertiesKeys.Properties}]});Microsoft.Office.WebExtension.FileType={Text:"text",Compressed:"compressed",Pdf:"pdf"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FileProperties:"FileProperties",FileSliceProperties:"FileSliceProperties"});OSF.DDA.FileProperties={Handle:"FileHandle",FileSize:"FileSize",SliceSize:Microsoft.Office.WebExtension.Parameters.SliceSize};OSF.DDA.File=function(n,t,i){var r,u;OSF.OUtil.defineEnumerableProperties(this,{size:{value:t},sliceCount:{value:Math.ceil(t/i)}});r={};r[OSF.DDA.FileProperties.Handle]=n;r[OSF.DDA.FileProperties.SliceSize]=i;u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.GetDocumentCopyChunkAsync,u.ReleaseDocumentCopyAsync],r)};OSF.DDA.FileSliceOffset="fileSliceoffset";OSF.DDA.AsyncMethodNames.addNames({GetDocumentCopyAsync:"getFileAsync",GetDocumentCopyChunkAsync:"getSliceAsync",ReleaseDocumentCopyAsync:"closeAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FileType,"enum":Microsoft.Office.WebExtension.FileType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:{types:["number"],defaultValue:4194304}}],checkCallArgs:function(n){var t=n[Microsoft.Office.WebExtension.Parameters.SliceSize];if(t<=0||t>4194304)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return n},onSucceeded:function(n,t,i){return new OSF.DDA.File(n[OSF.DDA.FileProperties.Handle],n[OSF.DDA.FileProperties.FileSize],i[Microsoft.Office.WebExtension.Parameters.SliceSize])}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(n,t){return t[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(r<0||r>=t.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;return n[OSF.DDA.FileSliceOffset]=parseInt((r*i[OSF.DDA.FileProperties.SliceSize]).toString()),n},onSucceeded:function(n,t,i){var r={};return OSF.OUtil.defineEnumerableProperties(r,{data:{value:n[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:i[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:n[OSF.DDA.FileProperties.SliceSize]}}),r}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}}]});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("File",OSF.DDA.Marshaling),function(n){var t="FileSize";n[n.Handle=0]="Handle";n[n[t]=1]=t}(OSF_DDA_Marshaling_File_FilePropertiesKeys||(OSF_DDA_Marshaling_File_FilePropertiesKeys={}));OSF.DDA.Marshaling.File.FilePropertiesKeys=OSF_DDA_Marshaling_File_FilePropertiesKeys,function(n){var t="SliceSize";n[n.Data=0]="Data";n[n[t]=1]=t}(OSF_DDA_Marshaling_File_SlicePropertiesKeys||(OSF_DDA_Marshaling_File_SlicePropertiesKeys={}));OSF.DDA.Marshaling.File.SlicePropertiesKeys=OSF_DDA_Marshaling_File_SlicePropertiesKeys,function(n){var t="Compressed";n[n.Text=0]="Text";n[n[t]=1]=t;n[n.Pdf=2]="Pdf"}(OSF_DDA_Marshaling_File_FileType||(OSF_DDA_Marshaling_File_FileType={}));OSF.DDA.Marshaling.File.FileType=OSF_DDA_Marshaling_File_FileType,function(n){var t="SliceIndex",i="SliceSize",r="FileType";n[n[r]=0]=r;n[n[i]=1]=i;n[n.Handle=2]="Handle";n[n[t]=3]=t}(OSF_DDA_Marshaling_File_ParameterKeys||(OSF_DDA_Marshaling_File_ParameterKeys={}));OSF.DDA.Marshaling.File.ParameterKeys=OSF_DDA_Marshaling_File_ParameterKeys;OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FileProperties);OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FileSliceProperties);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.FilePropertiesKeys.Handle},{name:OSF.DDA.FileProperties.FileSize,value:OSF.DDA.Marshaling.File.FilePropertiesKeys.FileSize}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.Marshaling.File.SlicePropertiesKeys.Data},{name:OSF.DDA.FileProperties.SliceSize,value:OSF.DDA.Marshaling.File.SlicePropertiesKeys.SliceSize}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:OSF.DDA.Marshaling.File.FileType.Text},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:OSF.DDA.Marshaling.File.FileType.Compressed},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:OSF.DDA.Marshaling.File.FileType.Pdf}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:OSF.DDA.Marshaling.File.ParameterKeys.FileType},{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:OSF.DDA.Marshaling.File.ParameterKeys.SliceSize}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.ParameterKeys.Handle},{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,value:OSF.DDA.Marshaling.File.ParameterKeys.SliceIndex}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.ParameterKeys.Handle}]});OSF.DDA.AsyncMethodNames.addNames({ExecuteRichApiRequestAsync:"executeRichApiRequestAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[]});OSF.OUtil.setNamespace("RichApi",OSF.DDA);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidExecuteRichApiRequestMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.ArrayData}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}]}),function(n){var t;(function(t){var u=function(){function r(){var n=this,t=n;n._pseudoDocument=u;n._eventDispatch=u;n._processAppCommandInvocation=function(n){var i=t._verifyManifestCallback(n.callbackName),r;if(i.errorCode!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){t._invokeAppCommandCompletedMethod(n.appCommandId,i.errorCode,"");return}r=t._constructEventObjectForCallback(n);r?window.setTimeout(function(){i.callback(r)},0):t._invokeAppCommandCompletedMethod(n.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"")}}var f="object",e="string",u=null;return r.initializeOsfDda=function(){OSF.DDA.AsyncMethodNames.addNames({AppCommandInvocationCompletedAsync:"appCommandInvocationCompletedAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[e]},{name:Microsoft.Office.WebExtension.Parameters.Status,types:["number"]},{name:Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData,types:[e]}]});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{AppCommandInvokedEvent:"AppCommandInvokedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppCommandInvoked:"appCommandInvoked"});OSF.OUtil.setNamespace("AppCommand",OSF.DDA);OSF.DDA.AppCommand.AppCommandInvokedEventArgs=n.AppCommand.AppCommandInvokedEventArgs},r.prototype.initializeAndChangeOnce=function(n){var i=this,r;t.registerDdaFacade();i._pseudoDocument={};OSF.DDA.DispIdHost.addAsyncMethods(i._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync]);i._eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked]);r=function(t){n&&(t.status=="succeeded"?n(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):n(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError))};OSF.DDA.DispIdHost.addEventSupport(i._pseudoDocument,i._eventDispatch);i._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,i._processAppCommandInvocation,r)},r.prototype._verifyManifestCallback=function(n){var s="function",e={callback:u,errorCode:OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback},o;n=n.trim();try{for(var t=n.split("."),i=window,r=0;r100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99),n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1),n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99),n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("Dialog",OSF.DDA.Marshaling);OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys={MessageType:"messageType",MessageContent:"messageContent"};OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys={MessageType:"messageType",MessageContent:"messageContent"};OSF.DDA.Marshaling.MessageParentKeys={MessageToParent:"messageToParent"};OSF.DDA.Marshaling.DialogNotificationShownEventType={DialogNotificationShown:"dialogNotificationShown"};OSF.DDA.Marshaling.SendMessageKeys={MessageContent:"messageContent"},function(n){var t;(function(n){function r(n){switch(n){case t.Excel:case t.Word:case t.PowerPoint:case t.Outlook:return new i;default:return new i}return null}var t={Excel:"excel",Word:"word",PowerPoint:"powerpoint",Outlook:"outlook"},i;n.getDialogCssManager=r;i=function(){function n(){var r="height: 100px",t="font-size: 14px",i="font-family: Segoe UI,Arial,Verdana,sans-serif",u="margin: 20px 14px",f="width: 100%",e="position: absolute",n=this;n.overlayElementCSS=[e,"top: 0","left: 0",f,"height: 100%","background-color: rgba(198, 198, 198, 0.5)","z-index: 99998"];n.dialogNotificationPanelCSS=[f,"height: 190px",e,"z-index: 99999","background-color: rgba(255, 255, 255, 1)","left: 0px","top: 50%","margin-top: -95px"];n.newWindowNotificationTextPanelCSS=[u,i,t,r,"line-height: 100px"];n.newWindowNotificationTextSpanCSS=["display: inline-block","line-height: normal","vertical-align: middle"];n.crossZoneNotificationTextPanelCSS=[u,i,t,r];n.dialogNotificationButtonPanelCSS="margin:0px 9px";n.buttonStyleCSS=["text-align: center","width: 70px","height: 25px",t,i,"margin: 0px 5px","border-width: 1px","border-style: solid"]}var t=";";return n.prototype.getOverlayElementCSS=function(){return this.overlayElementCSS.join(t)},n.prototype.getDialogNotificationPanelCSS=function(){return this.dialogNotificationPanelCSS.join(t)},n.prototype.getNewWindowNotificationTextPanelCSS=function(){return this.newWindowNotificationTextPanelCSS.join(t)},n.prototype.getNewWindowNotificationTextSpanCSS=function(){return this.newWindowNotificationTextSpanCSS.join(t)},n.prototype.getCrossZoneNotificationTextPanelCSS=function(){return this.crossZoneNotificationTextPanelCSS.join(t)},n.prototype.getDialogNotificationButtonPanelCSS=function(){return this.dialogNotificationButtonPanelCSS},n.prototype.getDialogButtonCSS=function(){return this.buttonStyleCSS.join(t)},n}();n.DefaultDialogCSSManager=i})(t=n.WacCommonUICssManager||(n.WacCommonUICssManager={}))}(OfficeExt||(OfficeExt={})),function(n){var t;(function(t){var i;(function(t){function wt(n){var t=n.input;t!=i&&(v={HostButtonBorderColor:t[OSF.HostThemeButtonStyleKeys.ButtonBorderColor],HostButtonBackgroundColor:t[OSF.HostThemeButtonStyleKeys.ButtonBackgroundColor]});n.completed()}function bt(n){OSF._OfficeAppFactory.getInitializationHelper().addOrRemoveEventListenersForWindow(r);n.completed()}function kt(t){try{if(OSF._OfficeAppFactory.getInitializationHelper()._appContext._skipNewWindowNotification){ht(t);return}w=r;var c=r,p=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo,s=n.WacCommonUICssManager.getDialogCssManager(p.hostType),b=OSF.OUtil.formatString(Strings.OfficeOM.L_ShowWindowDialogNotification,OSF._OfficeAppFactory.getInitializationHelper()._appContext._addinName);o=ct(s);document.body.insertBefore(o,document.body.firstChild);f=ui(s,b);f.id=ot;var l=lt(s),i=nt(s,Strings.OfficeOM.L_ShowWindowDialogNotificationAllow),u=nt(s,Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore);l.appendChild(i);l.appendChild(u);f.appendChild(l);document.body.insertBefore(f,document.body.firstChild);i.onclick=function(){ht(t);w||y()};function v(){function n(n){rt();at(n);e(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore)}h.onComplete=n;OSF.DDA.WAC.Delegate.unregisterEventAsync(h)}u.onclick=v;i.addEventListener(a,function(n){n.shiftKey&&n.keyCode==9&&(it(i),tt(u),u.focus(),n.preventDefault(),n.stopPropagation())},r);u.addEventListener(a,function(n){n.shiftKey||n.keyCode!=9?n.keyCode==13&&(c=!0,n.preventDefault(),n.stopPropagation()):(it(u),tt(i),i.focus(),n.preventDefault(),n.stopPropagation())},r);u.addEventListener("keyup",function(n){n.keyCode==13&&c&&(c=r,v(),n.preventDefault(),n.stopPropagation())},r);window.focus();function k(){i.focus()}h.onComplete=k;OSF.DDA.WAC.Delegate.registerEventAsync(h)}catch(d){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at new window dialog."+d);e(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)}}function dt(n){var t,r;try{if(u!=i){if(t=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains,t)for(r=0;r-1?window.close():(t=n.data,r=typeof t,t&&(r=="object"||r==c)&&(r==c&&(t=JSON.parse(t)),u=OSF.DDA.OMFactory.manufactureEventArgs(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived,i,t),OSF.DialogParentMessageEventDispatch.fireEvent(u))))}window.addEventListener(l,n)}function ii(n,t){p=n;e=t}function ri(){try{f&&f.id==ot&&e&&e(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore)}catch(n){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during executing displayDialogAsync callback."+n)}y()}function st(t,i){var s=r,e=n.WacCommonUICssManager.getDialogCssManager(i),h,u;o=ct(e);document.body.insertBefore(o,document.body.firstChild);f=fi(e,t);f.id=pt;h=lt(e);u=nt(e,Strings.OfficeOM.L_DialogOK?Strings.OfficeOM.L_DialogOK:"OK");h.appendChild(u);f.appendChild(h);document.body.insertBefore(f,document.body.firstChild);w=!0;u.onclick=function(){y()};u.addEventListener(a,function(n){n.keyCode==9?(document.getElementById(k).focus(),n.preventDefault(),n.stopPropagation()):n.keyCode==13&&(s=!0,n.preventDefault(),n.stopPropagation())},r);u.addEventListener("keyup",function(n){n.keyCode==13&&s&&(s=r,y(),n.preventDefault(),n.stopPropagation())},r);document.getElementById(k).addEventListener(a,function(n){n.keyCode==9&&(u.focus(),n.preventDefault(),n.stopPropagation())},r);window.focus();u.focus()}function g(n){if(n.source==u)try{var t={};t[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogMessageReceived;t[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent]=n.data;p(t)}catch(i){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during receive message handler."+i)}}function ht(t){function d(){try{if(u==i||u.closed){window.clearInterval(b);window.removeEventListener(l,g);var n={};n[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogClosed;p(n)}}catch(t){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during check or handle window close."+t)}}var r=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo,v=[r.hostType,r.hostPlatform,r.hostSpecificFileVersion,r.hostLocale,r.osfControlAppCorrelationId,"isDialog"],h=v.join("|"),s=OSF._OfficeAppFactory.getInitializationHelper()._appContext,f=t[OSF.ShowWindowDialogParameterKeys.Url],o;f=n.WACUtils.addHostInfoAsQueryParam(f,h);o=JSON.parse(window.name);o[OSF.WindowNameItemKeys.HostInfo]=h;o[OSF.WindowNameItemKeys.AppContext]=s;var c=t[OSF.ShowWindowDialogParameterKeys.Width]*screen.width/100,a=t[OSF.ShowWindowDialogParameterKeys.Height]*screen.height/100,y=s._clientWindowWidth/2-c/2,w=s._clientWindowHeight/2-a/2,k="width="+c+", height="+a+", left="+y+", top="+w+",channelmode=no,directories=no,fullscreen=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=yes,toolbar=no";if(u=window.open(f,n.WACUtils.serializeObjectToString(o),k),u==i){OSF.AppTelemetry.logAppCommonMessage("Encountered cross zone issue in displayDialogAsync api.");rt();st(f,r.hostType);e(OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone);return}window.addEventListener(l,g);b=window.setInterval(d,1e3);e!=i?e(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("showDialogCallback can not be null.")}function nt(n,t){var i=document.createElement("input"),r,u;return i.setAttribute("type","button"),i.style.cssText=n.getDialogButtonCSS(),i.style.borderColor=ft,i.style.backgroundColor=et,i.setAttribute("value",t),r=function(){tt(i)},u=function(){it(i)},i.addEventListener("mouseover",r),i.addEventListener("focus",r),i.addEventListener("mouseout",u),i.addEventListener("focusout",u),i}function tt(n){v!=i?(n.style.borderColor=v.HostButtonBorderColor,n.style.backgroundColor=v.HostButtonBackgroundColor):OSF.CommonUI&&OSF.CommonUI.HostButtonBorderColor&&OSF.CommonUI.HostButtonBackgroundColor?(n.style.borderColor=OSF.CommonUI.HostButtonBorderColor,n.style.backgroundColor=OSF.CommonUI.HostButtonBackgroundColor):n.style.backgroundColor=yt}function it(n){n.style.borderColor=ft;n.style.backgroundColor=et}function y(){function n(n){rt();at(n)}h.onComplete=n;OSF.DDA.WAC.Delegate.unregisterEventAsync(h)}function rt(){f!=i&&(document.body.removeChild(f),f=i);o!=i&&(document.body.removeChild(o),o=i)}function ct(n){var t=document.createElement(s);return t.style.cssText=n.getOverlayElementCSS(),t}function ui(n,t){var r=document.createElement(s),i,u;return r.style.cssText=n.getDialogNotificationPanelCSS(),vt(r),i=document.createElement(s),i.style.cssText=n.getNewWindowNotificationTextPanelCSS(),i.id=d,document.documentElement.getAttribute("dir")=="rtl"?i.style.paddingRight="30px":i.style.paddingLeft="30px",u=document.createElement("span"),u.style.cssText=n.getNewWindowNotificationTextSpanCSS(),u.innerText=t,i.appendChild(u),r.appendChild(i),r}function lt(n){var t=document.createElement(s);return t.style.cssText=n.getDialogNotificationButtonPanelCSS(),t.style.cssFloat=document.documentElement.getAttribute("dir")=="rtl"?"left":"right",t}function at(n){if(n!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){var t=document.querySelectorAll(OSF._OfficeAppFactory.getInitializationHelper()._tabbableElements);OSF.OUtil.focusToFirstTabbable(t,r)}}function fi(t,i){var f=document.createElement(s),u,r,e;return f.style.cssText=t.getDialogNotificationPanelCSS(),vt(f),u=document.createElement(s),u.style.cssText=t.getCrossZoneNotificationTextPanelCSS(),u.id=d,r=document.createElement("a"),r.id=k,r.href="#",r.innerText=Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink,r.setAttribute("onclick","window.open('https://support.microsoft.com/en-us/help/17479/windows-internet-explorer-11-change-security-privacy-settings', '_blank', 'fullscreen=1')"),e=document.createElement("span"),Strings.OfficeOM.L_NewWindowCrossZone&&(e.innerHTML=OSF.OUtil.formatString(Strings.OfficeOM.L_NewWindowCrossZone,r.outerHTML,n.WACUtils.getDomainForUrl(i))),u.appendChild(e),f.appendChild(u),f}function vt(n){n.setAttribute("role","dialog");n.setAttribute("aria-describedby",d)}var s="div",c="string",l="message",a="keydown",r=!1,i=null,u=i,p=i,o=i,f=i,ut="osfDialogInternal:action=closeDialog",e=i,w=r,b=-1,v=i,ft="#ababab",et="#ffffff",yt="#ccc",ot="newWindowNotificaiton",pt="crossZoneNotification",k="configureBrowserLink",d="dialogNotificationTextPanel",h={dispId:OSF.DDA.EventDispId.dispidDialogNotificationShownInAddinEvent,eventType:OSF.DDA.Marshaling.DialogNotificationShownEventType.DialogNotificationShown,onComplete:i};t.setHostThemeButtonStyle=wt;t.removeEventListenersForDialog=bt;t.handleNewWindowDialog=kt;t.closeDialog=dt;t.messageParent=gt;t.sendMessage=ni;t.registerMessageReceivedEvent=ti;t.setHandlerAndShowDialogCallback=ii;t.escDismissDialogNotification=ri;t.showCrossZoneNotification=st})(i=t.Dialog||(t.Dialog={}))})(t=n.AddinNativeAction||(n.AddinNativeAction={}))}(OfficeExt||(OfficeExt={}));OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogMessageReceivedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageType},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageContent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidMessageParentMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,value:OSF.DDA.Marshaling.MessageParentKeys.MessageToParent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSendMessageMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,value:OSF.DDA.Marshaling.SendMessageKeys.MessageContent}]});OSF.DDA.WAC.Delegate.openDialog=function(n){function t(n){var t={Error:n};e(Microsoft.Office.Common.InvokeResultCode.noError,t)}var u="https://",f="http://",r=JSON.parse(n.targetId),e=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!0,n),i;if(OSF.DialogShownStatus.hasDialogShown){t(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened);return}if(i=r[OSF.ShowWindowDialogParameterKeys.Url].toLowerCase(),i==null||!(i.substr(0,u.length)===u)){i.substr(0,f.length)===f?t(OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS):t(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme);return}r[OSF.ShowWindowDialogParameterKeys.DisplayInIframe]?(OSF.DialogShownStatus.isWindowDialog=!1,OSF.DDA.WAC.Delegate.registerEventAsync(n)):(OSF.DialogShownStatus.isWindowDialog=!0,OfficeExt.AddinNativeAction.Dialog.setHandlerAndShowDialogCallback(function(t){n.onEvent&&n.onEvent(t);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t),OfficeExt.AddinNativeAction.Dialog.handleNewWindowDialog(r))};OSF.DDA.WAC.Delegate.messageParent=function(n){window.opener!=null?OfficeExt.AddinNativeAction.Dialog.messageParent(n):OSF.DDA.WAC.Delegate.executeAsync(n)};OSF.DDA.WAC.Delegate.sendMessage=function(n){OSF.DialogShownStatus.hasDialogShown&&(OSF.DialogShownStatus.isWindowDialog?OfficeExt.AddinNativeAction.Dialog.sendMessage(n):OSF.DDA.WAC.Delegate.executeAsync(n))};OSF.DDA.WAC.Delegate.closeDialog=function(n){function t(n){var t={Error:n};i(Microsoft.Office.Common.InvokeResultCode.noError,t)}var i=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!1,n);OSF.DialogShownStatus.hasDialogShown?OSF.DialogShownStatus.isWindowDialog?(n.onCalling&&n.onCalling(),OfficeExt.AddinNativeAction.Dialog.closeDialog(t)):OSF.DDA.WAC.Delegate.unregisterEventAsync(n):t(OSF.DDA.ErrorCodeManager.errorCodes.ooeWebDialogClosed)};OSF.InitializationHelper.prototype.dismissDialogNotification=function(){OfficeExt.AddinNativeAction.Dialog.escDismissDialogNotification()};OSF.InitializationHelper.prototype.registerMessageReceivedEventForWindowDialog=function(){OfficeExt.AddinNativeAction.Dialog.registerMessageReceivedEvent()};OSF.DDA.AsyncMethodNames.addNames({CloseContainerAsync:"closeContainer"}),function(n){var t=function(){function n(){}return n}();n.Container=t}(OfficeExt||(OfficeExt={}));OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseContainerAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidCloseContainerMethod,fromHost:[],toHost:[]}),function(n){var t=function(){function n(n,t){var i=this;OSF.DDA.OneNoteDocument.uber.constructor.call(i,n,t);OSF.DDA.DispIdHost.addAsyncMethods(i,[OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,OSF.DDA.SyncMethodNames.MessageParent]);OSF.DDA.DispIdHost.addEventSupport(i,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged,Microsoft.Office.WebExtension.EventType.DialogMessageReceived]));OSF.OUtil.finalizeProperties(i)}return n}();n.OneNoteDocument=t}(OSFOneNoteWAC||(OSFOneNoteWAC={}));OSF.DDA.OneNoteDocument=OSFOneNoteWAC.OneNoteDocument;OSF.OUtil.extend(OSF.DDA.OneNoteDocument,OSF.DDA.Document);OSF.OUtil.redefineList(Microsoft.Office.WebExtension.CoercionType,{Html:"html",Image:"image",Matrix:"matrix",Text:"text"});OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(n,t){OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM);n.doc=new OSF.DDA.OneNoteDocument(n,this._initializeSettings(n,!0));OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi,[OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]);t()};OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize=function(n){var t,i,r;OSF.WebApp._UpdateLinksForHostAndXdmInfo();t=new OSF.DDA.License(n.get_eToken());this.initWebDialog(n);OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(n,n.doc,t));OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.WAC.getDelegateMethods,OSF.DDA.WAC.Delegate.ParameterMap));i=n.get_reason();Microsoft.Office.WebExtension.initialize(i);r=OfficeExt.AppCommand.AppCommandManager.instance();r.initializeAndChangeOnce()};__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t=function(){function n(n,t){this.m_actionInfo=n;this.m_isWriteOperation=t}return Object.defineProperty(n.prototype,"actionInfo",{get:function(){return this.m_actionInfo},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},enumerable:!0,configurable:!0}),n}();n.Action=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createSetPropertyAction=function(t,i,r,u){var f;n.Utility.validateObjectPath(i);var e={Id:t._nextId(),ActionType:4,Name:r,ObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},s=[u],o=n.Utility.setMethodArguments(t,e.ArgumentInfo,s);return n.Utility.validateReferencedObjectPaths(o),f=new n.Action(e,!0),t._pendingRequest.addAction(f),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addReferencedObjectPaths(o),f},t.createMethodAction=function(t,i,r,u,f){var e,o,h,s;return n.Utility.validateObjectPath(i),e={Id:t._nextId(),ActionType:3,Name:r,ObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},o=n.Utility.setMethodArguments(t,e.ArgumentInfo,f),n.Utility.validateReferencedObjectPaths(o),h=u!=1,s=new n.Action(e,h),t._pendingRequest.addAction(s),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addReferencedObjectPaths(o),s},t.createQueryAction=function(t,i,r){var u,f;return n.Utility.validateObjectPath(i),u={Id:t._nextId(),ActionType:2,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},u.QueryInfo=r,f=new n.Action(u,!1),t._pendingRequest.addAction(f),t._pendingRequest.addReferencedObjectPath(i._objectPath),f},t.createRecursiveQueryAction=function(t,i,r){n.Utility.validateObjectPath(i);var f={Id:t._nextId(),ActionType:6,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id,RecursiveQueryInfo:r},u=new n.Action(f,!1);return t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u},t.createInstantiateAction=function(t,i){n.Utility.validateObjectPath(i);var u={Id:t._nextId(),ActionType:1,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},r=new n.Action(u,!1);return t._pendingRequest.addAction(r),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addActionResultHandler(r,new n.InstantiateActionResultHandler(i)),r},t.createTraceAction=function(t,i,r){var u={Id:t._nextId(),ActionType:5,Name:"Trace",ObjectPathId:0},f=new n.Action(u,!1);return t._pendingRequest.addAction(f),r&&t._pendingRequest.addTrace(u.Id,i),f},t}();n.ActionFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(t,i){n.Utility.checkArgumentNull(t,"context");this.m_context=t;this.m_objectPath=i;this.m_objectPath&&(t._processingResult||(n.ActionFactory.createInstantiateAction(t,this),t._autoCleanup&&this._KeepReference&&t.trackedObjects._autoAdd(this)))}return Object.defineProperty(t.prototype,"context",{get:function(){return this.m_context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_objectPath",{get:function(){return this.m_objectPath},set:function(n){this.m_objectPath=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNull",{get:function(){return n.Utility.throwIfNotLoaded("isNull",this._isNull,null,this._isNull),this._isNull},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNullObject",{get:function(){return n.Utility.throwIfNotLoaded("isNullObject",this._isNull,null,this._isNull),this._isNull},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_isNull",{get:function(){return this.m_isNull},set:function(n){this.m_isNull=n;n&&this.m_objectPath&&this.m_objectPath._updateAsNullObject()},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){this._isNull=n.Utility.isNullOrUndefined(t);this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this,t)},t.prototype._handleIdResult=function(t){this._isNull=n.Utility.isNullOrUndefined(t);n.Utility.fixObjectPathIfNecessary(this,t);this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this,t)},t.prototype._recursivelySet=function(i,r,u,f,e){var l=i instanceof t,o,s,h,c;if(l)if(Object.getPrototypeOf(this)===Object.getPrototypeOf(i))i=JSON.parse(JSON.stringify(i));else throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"properties",errorLocation:this._className+".set"});try{for(s=0;s0},enumerable:!0,configurable:!0}),t.prototype.addTrace=function(n,t){this.m_traceInfos[n]=t},t.prototype.addReferencedObjectPath=function(t){if(!this.m_referencedObjectPaths[t.objectPathInfo.Id]){if(!t.isValid)throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidObjectPath,message:n.Utility._getResourceString(n.ResourceStrings.invalidObjectPath,n.Utility.getObjectPathExpression(t)),debugInfo:{errorLocation:n.Utility.getObjectPathExpression(t)}});while(t)t.isWriteOperation&&(this.m_flags=this.m_flags|1),this.m_referencedObjectPaths[t.objectPathInfo.Id]=t,t.objectPathInfo.ObjectPathType==3&&this.addReferencedObjectPaths(t.argumentObjectPaths),t=t.parentObjectPath}},t.prototype.addReferencedObjectPaths=function(n){if(n)for(var t=0;t0&&(typeof r[0]=="string"||i.isRequestUrlAndHeaderInfo(r[0])||i.isRequestUrlAndHeaderInfoResolver(r[0]))&&(y=r[0],h=1),r.length==h+1)a=u,v=r[h+0];else if(r.length==h+2){if(r[h+0]instanceof n.ClientObject)a=function(){return r[h+0].context};else if(Array.isArray(r[h+0])){if(c=r[h+0],c.length==0)return i.createErrorPromise(t);for(l=0;l0){var n=c._onRunFinishedNotifiers.shift();n()}if(a)return l;else throw l;})},i.prototype._nextId=function(){return++this.m_nextId},i}();n.ClientRequestContext=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_type=n}return Object.defineProperty(t.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){(this.m_isLoaded=!0,typeof t=="object"&&t&&t._IsNull)||(this.m_value=this.m_type===1?n.Utility.adjustToDateTime(t):t)},t}();n.ClientResult=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.flags="flags",n.getItemAt="GetItemAt",n.id="Id",n.idPrivate="_Id",n.index="_Index",n.items="_Items",n.iterativeExecutor="IterativeExecutor",n.localDocument="http://document.localhost/",n.localDocumentApiPrefix="http://document.localhost/_api/",n.processQuery="ProcessQuery",n.referenceId="_ReferenceId",n.isTracked="_IsTracked",n.sourceLibHeader="SdkVersion",n.embeddingPageOrigin="EmbeddingPageOrigin",n.embeddingPageSessionInfo="EmbeddingPageSessionInfo",n}();n.Constants=t}(OfficeExtension||(OfficeExtension={})),function(n){var u=1,r={invokeRequestModifier:function(n){return n.DdaMethod.Version=u,n},invokeResponseModifier:function(n){return u=n.Version,n.Error&&(n.error={},n.error.Code=n.Error),n}},i,t,f,e;(function(n){n[n.Success=0]="Success";n[n.Timeout=1]="Timeout";n[n.InternalError=5001]="InternalError"})(i||(i={})),function(n){n.SendingId="sId";n.RespondingId="rId";n.CommandKey="command";n.SessionInfoKey="sessionInfo";n.ParamsKey="params";n.ApiReadyCommand="apiready";n.ExecuteMethodCommand="executeMethod";n.GetAppContextCommand="getAppContext";n.RegisterEventCommand="registerEvent";n.UnregisterEventCommand="unregisterEvent";n.FireEventCommand="fireEvent"}(t||(t={}));f=function(u){function f(n,t){u.call(this);this.m_chosenWindow=null;this.m_chosenOrigin=null;this.m_enabled=!0;this.m_onMessageHandler=this._onMessage.bind(this);this.m_callbackList={};this.m_id=0;this.m_timeoutId=-1;this.m_appContext=null;this.m_url=n;this.m_options=t;this.m_options||(this.m_options={sessionKey:Math.random().toString()});this.m_options.sessionKey||(this.m_options.sessionKey=Math.random().toString());this.m_options.container||(this.m_options.container=document.body);this.m_options.timeoutInMilliseconds||(this.m_options.timeoutInMilliseconds=6e4);this.m_options.height||(this.m_options.height="400px");this.m_options.width||(this.m_options.width="100%")}return __extends(f,u),f.prototype._getIFrameSrc=function(){var u=window.location.protocol+"//"+window.location.host,i=n.Constants.embeddingPageOrigin+"="+encodeURIComponent(u)+"&"+n.Constants.embeddingPageSessionInfo+"="+encodeURIComponent(this.m_options.sessionKey),r=!1,t;return this.m_url.toLowerCase().indexOf("/_layouts/preauth.aspx")>0&&(r=!0),t=document.createElement("a"),t.href=this.m_url,r?t.hash=t.hash.length===0||t.hash==="#"?"#"+i:t.hash+"&"+i:t.search=t.search.length===0||t.search==="?"?"?"+i:t.search+"&"+i,t.href},f.prototype.init=function(){var t=this,i;return window.addEventListener("message",this.m_onMessageHandler),i=this._getIFrameSrc(),new n._Internal.OfficePromise(function(r,u){var f=document.createElement("iframe");t.m_options.id&&(f.id=t.m_options.id);f.style.height=t.m_options.height;f.style.width=t.m_options.width;f.src=i;t.m_options.container.appendChild(f);t.m_timeoutId=setTimeout(function(){t.close();var i=n.Utility.createRuntimeError(n.ErrorCodes.timeout,n.Utility._getResourceString(n.ResourceStrings.timeout),"EmbeddedSession.init");u(i)},t.m_options.timeoutInMilliseconds);t.m_promiseResolver=r})},f.prototype._invoke=function(n,t,u){if(!this.m_enabled){t(i.InternalError,null);return}r.invokeRequestModifier&&(u=r.invokeRequestModifier(u));this._sendMessageWithCallback(this.m_id++,n,u,function(n){r.invokeResponseModifier&&(n=r.invokeResponseModifier(n));var u=n.Error;delete n.Error;t(u||i.Success,n)})},f.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler);window.clearTimeout(this.m_timeoutId);this.m_enabled=!1},Object.defineProperty(f.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),f.prototype._createRequestExecutorOrNull=function(){return new e(this)},f.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},f.prototype._registerEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.RegisterEventCommand,{EventId:i,TargetId:r},function(){n(null)})})},f.prototype._unregisterEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.UnregisterEventCommand,{EventId:i,TargetId:r},function(){n()})})},f.prototype._onMessage=function(n){var u=this,i,e,r,o,s;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===n.source&&this.m_chosenOrigin===n.origin)){if(i=n.data,i&&i[t.CommandKey]===t.ApiReadyCommand){!this.m_chosenWindow&&this._isValidDescendant(n.source)&&i[t.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=n.source,this.m_chosenOrigin=n.origin,this._sendMessageWithCallback(this.m_id++,t.GetAppContextCommand,null,function(n){u._setupContext(n);window.clearTimeout(u.m_timeoutId);u.m_promiseResolver()}));return}if(i&&i[t.CommandKey]===t.FireEventCommand){var f=i[t.ParamsKey],h=f.EventId,c=f.TargetId,l=f.Data;if(this.m_sessionEventManager)for(e=this.m_sessionEventManager.getHandlers(h,c),r=0;r=0;o--)if(r[o]===e[i].handler){r.splice(o,1);break}break;case 2:r=[];break}}return s&&(!this.m_registered&&r.length>0?u=u.then(function(){return f.m_eventInfo.registerFunc(f.m_callback)}).then(function(){return f.m_registered=!0}):this.m_registered&&r.length==0&&(u=u.then(function(){return f.m_eventInfo.unregisterFunc(f.m_callback)}).catch(function(t){n.Utility.log("Error when unregister event: "+JSON.stringify(t))}).then(function(){return f.m_registered=!1})),u=u.then(function(){return f.m_handlers=r})),u},t.prototype.fireEvent=function(t){for(var u,f,r=[],i=0;i=0;e--)if(f[e]===u){f.splice(e,1);break}return f.length===0?this.m_unregisterEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i}();n.EventRegistration=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var s=JSON.stringify(u.Body),f=u.Url,e,o;if(f.charAt(f.length-1)!="/"&&(f=f+"/"),f=f+n.Constants.processQuery,f=f+"?"+n.Constants.flags+"="+r.toString(),e={method:"POST",url:f,headers:{},body:s},e.headers[n.Constants.sourceLibHeader]=t.SourceLibHeaderValue,e.headers["CONTENT-TYPE"]="application/json",u.Headers)for(o in u.Headers)e.headers[o]=u.Headers[o];return n.HttpUtility.sendRequest(e).then(function(t){var i,r;return t.statusCode===200?i={ErrorCode:null,ErrorMessage:null,Headers:t.headers,Body:JSON.parse(t.body)}:(n.Utility.log("Error Response:"+t.body),r=n.Utility._parseErrorResponse(t),i={ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:t.headers,Body:null}),i})},t.SourceLibHeaderValue="officejs-rest",t}();n.HttpRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){n.OfficeRequire=function(){return typeof require!="undefined"?require:null}()})(t=n._Internal||(n._Internal={}));i=function(){function i(){}return i.setCustomSendRequestFunc=function(n){i.s_customSendRequestFunc=n},i.xhrSendRequestFunc=function(i){return new t.OfficePromise(function(r,u){var f=new XMLHttpRequest,e;if(f.open(i.method,i.url),f.onload=function(){var t={statusCode:f.status,headers:n.Utility._parseHttpResponseHeaders(f.getAllResponseHeaders()),body:f.responseText};r(t)},f.onerror=function(){u(new t.RuntimeError({code:n.ErrorCodes.connectionFailure,message:n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,f.statusText)}))},i.headers)for(e in i.headers)f.setRequestHeader(e,i.headers[e]);f.send(i.body)})},i.nodejsRequestModuleSendRequestFunc=function(n){i.logRequest(n);var r=t.OfficeRequire(i.NodeJsRequestModuleName);return r(n.url,{method:n.method,headers:n.headers,body:n.body}).then(function(n){return n.text().then(function(t){var f=n.status,u={},r;return n.headers.forEach(function(n,t){u[t]=n}),r={statusCode:f,headers:u,body:t},i.logResponse(r),r})})},i.sendRequest=function(n){i.validateAndNormalizeRequest(n);var t=i.s_customSendRequestFunc;return t||(t=typeof window=="undefined"||typeof XMLHttpRequest=="undefined"?i.nodejsRequestModuleSendRequestFunc:i.xhrSendRequestFunc),t(n)},i.setCustomSendLocalDocumentRequestFunc=function(n){i.s_customSendLocalDocumentRequestFunc=n},i.sendLocalDocumentRequest=function(n){i.validateAndNormalizeRequest(n);var t;return t=i.s_customSendLocalDocumentRequestFunc||i.officeJsSendLocalDocumentRequestFunc,t(n)},i.officeJsSendLocalDocumentRequestFunc=function(i){i=n.Utility._validateLocalDocumentRequest(i);var r=n.Utility._buildRequestMessageSafeArray(i);return new t.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(r,function(i){var r;r=i.status=="succeeded"?{statusCode:n.RichApiMessageUtility.getResponseStatusCode(i),headers:n.RichApiMessageUtility.getResponseHeaders(i),body:n.RichApiMessageUtility.getResponseBody(i)}:n.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(i.error.code,i.error.message);n.Utility.log(JSON.stringify(r));t(r)})})},i.validateAndNormalizeRequest=function(i){if(n.Utility.isNullOrUndefined(i))throw t.RuntimeError._createInvalidArgError({argumentName:"request"});n.Utility.isNullOrEmptyString(i.method)&&(i.method="GET");i.method=i.method.toUpperCase()},i.logRequest=function(t){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Request---"),n.Utility.log(t.method+" "+t.url),t.headers)for(var r in t.headers)n.Utility.log(r+": "+t.headers[r]);i._logBody&&n.Utility.log(t.body)}},i.logResponse=function(t){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Response---"),n.Utility.log(""+t.statusCode),t.headers)for(var r in t.headers)n.Utility.log(r+": "+t.headers[r]);i._logBody&&n.Utility.log(t.body)}},i.NodeJsRequestModuleName="node-fetch",i._logBody=!1,i}();n.HttpUtility=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_clientObject=n}return n.prototype._handleResult=function(n){this.m_clientObject._handleIdResult(n)},n}();n.InstantiateActionResultHandler=t}(OfficeExtension||(OfficeExtension={})),function(n){}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){this.m_objectPathInfo=n;this.m_parentObjectPath=t;this.m_isWriteOperation=!1;this.m_isCollection=i;this.m_isInvalidAfterRequest=r;this.m_isValid=!0}return Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},set:function(n){this.m_isWriteOperation=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(n){this.m_argumentObjectPaths=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(n){this.m_isValid=n;!n&&this.m_objectPathInfo.ObjectPathType===6&&this.m_savedObjectPathInfo&&(t.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(n){this.m_getByIdMethodName=n},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null},t.prototype.updateUsingObjectData=function(i){var o=i[n.Constants.referenceId],u,f,e,r;if(!n.Utility.isNullOrEmptyString(o)){this.m_savedObjectPathInfo||this.isInvalidAfterRequest||!t.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)||(u={},t.copyObjectPathInfo(this.m_objectPathInfo,u),this.m_savedObjectPathInfo={pathInfo:u,parent:this.m_parentObjectPath});this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=o;this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null;return}if(f=this.parentObjectPath&&this.parentObjectPath.isCollection,e=this.getByIdMethodName,(f||!n.Utility.isNullOrEmptyString(e))&&(r=i[n.Constants.id],n.Utility.isNullOrUndefined(r)&&(r=i[n.Constants.idPrivate]),!n.Utility.isNullOrUndefined(r))){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;f?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=e,this.m_getByIdMethodName=null);this.isWriteOperation=!1;this.m_objectPathInfo.ArgumentInfo={};this.m_objectPathInfo.ArgumentInfo.Arguments=[r];this.m_argumentObjectPaths=null;return}},t.isRestorableObjectPath=function(n){return n===1||n===5||n===3||n===4},t.copyObjectPathInfo=function(n,t){t.Id=n.Id;t.ArgumentInfo=n.ArgumentInfo;t.Name=n.Name;t.ObjectPathType=n.ObjectPathType;t.ParentObjectPathId=n.ParentObjectPathId},t}();n.ObjectPath=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createGlobalObjectObjectPath=function(t){var i={Id:t._nextId(),ObjectPathType:1,Name:""};return new n.ObjectPath(i,null,!1,!1)},t.createNewObjectObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:2,Name:i};return new n.ObjectPath(u,null,r,!1)},t.createPropertyObjectPath=function(t,i,r,u,f){var e={Id:t._nextId(),ObjectPathType:4,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id};return new n.ObjectPath(e,i._objectPath,u,f)},t.createIndexerObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i._objectPath,!1,!1)},t.createIndexerObjectPathUsingParentPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i,!1,!1)},t.createMethodObjectPath=function(t,i,r,u,f,e,o,s){var c={Id:t._nextId(),ObjectPathType:3,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},l=n.Utility.setMethodArguments(t,c.ArgumentInfo,f),h=new n.ObjectPath(c,i._objectPath,e,o);return h.argumentObjectPaths=l,h.isWriteOperation=u!=1,h.getByIdMethodName=s,h},t.createReferenceIdObjectPath=function(t,i){var r={Id:t._nextId(),ObjectPathType:6,Name:i,ArgumentInfo:{}};return new n.ObjectPath(r,null,!1,!1)},t.createChildItemObjectPathUsingIndexerOrGetItemAt=function(i,r,u,f,e){var o=f[n.Constants.id];return n.Utility.isNullOrUndefined(o)&&(o=f[n.Constants.idPrivate]),i&&!n.Utility.isNullOrUndefined(o)?t.createChildItemObjectPathUsingIndexer(r,u,f):t.createChildItemObjectPathUsingGetItemAt(r,u,f,e)},t.createChildItemObjectPathUsingIndexer=function(t,i,r){var f=r[n.Constants.id],u;return n.Utility.isNullOrUndefined(f)&&(f=r[n.Constants.idPrivate]),u=u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u.ArgumentInfo.Arguments=[f],new n.ObjectPath(u,i._objectPath,!1,!1)},t.createChildItemObjectPathUsingGetItemAt=function(t,i,r,u){var e=r[n.Constants.index],f;return e&&(u=e),f={Id:t._nextId(),ObjectPathType:3,Name:n.Constants.getItemAt,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f.ArgumentInfo.Arguments=[u],new n.ObjectPath(f,i._objectPath,!1,!1)},t}();n.ObjectPathFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var f=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n._Internal.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(f,function(i){n.Utility.log("Response:");n.Utility.log(JSON.stringify(i));var r;r=i.status=="succeeded"?n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBody(i),n.RichApiMessageUtility.getResponseHeaders(i)):n.RichApiMessageUtility.buildResponseOnError(i.error.code,i.error.message);t(r)})})},t.SourceLibHeaderValue="officejs",t}();n.OfficeJsRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){var t;(function(t){function i(){return function(){"use strict";function wt(n){return typeof n=="function"||typeof n=="object"&&n!==null}function b(n){return typeof n=="function"}function bt(n){return typeof n=="object"&&n!==null}function kt(n){k=n}function dt(n){f=n}function ti(){var t=process.nextTick,n=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&n[1]==="0"&&n[2]==="10"&&(t=setImmediate),function(){t(c)}}function ii(){return function(){tt(c)}}function ri(){var n=0,i=new ut(c),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function ui(){var n=new MessageChannel;return n.port1.onmessage=c,function(){n.port2.postMessage(0)}}function ft(){return function(){setTimeout(c,1)}}function c(){for(var t,i,n=0;n=0?(n=n.substring(t+5,n.length),n<"14.14393"?!0:!1):!1}function i(){return typeof window=="undefined"&&typeof Promise=="function"?Promise:typeof window!="undefined"&&window.Promise?t()?n.PromiseImpl.Init():window.Promise:n.PromiseImpl.Init()}n.OfficePromise=i()}(t=n._Internal||(n._Internal={}));i=t.OfficePromise;n.Promise=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this._autoCleanupList={};this.m_context=n}return t.prototype.add=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._addCommon(n,!0)}):this._addCommon(n,!0)},t.prototype._autoAdd=function(n){this._addCommon(n,!1);this._autoCleanupList[n._objectPath.objectPathInfo.Id]=n},t.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(t,i){var r=this.m_context._autoCleanup&&!t[n.Constants.isTracked]&&t!==this.m_context._rootObject&&i&&!n.Utility.isNullOrEmptyString(i[n.Constants.referenceId]);r&&(this._autoCleanupList[t._objectPath.objectPathInfo.Id]=t,t[n.Constants.isTracked]=!0)},t.prototype._addCommon=function(t,i){if(t[n.Constants.isTracked]){i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id];return}var r=t[n.Constants.referenceId];n.Utility.isNullOrEmptyString(r)&&t._KeepReference&&(t._KeepReference(),n.ActionFactory.createInstantiateAction(this.m_context,t),i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id],t[n.Constants.isTracked]=!0)},t.prototype.remove=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._removeCommon(n)}):this._removeCommon(n)},t.prototype._removeCommon=function(t){var r=t[n.Constants.referenceId],i;n.Utility.isNullOrEmptyString(r)||(i=this.m_context._rootObject,i._RemoveReference&&i._RemoveReference(r),delete t[n.Constants.isTracked])},t.prototype._retrieveAndClearAutoCleanupList=function(){var n=this._autoCleanupList;return this._autoCleanupList={},n},t}();n.TrackedObjects=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.cannotRegisterEvent="CannotRegisterEvent",n.connectionFailureWithStatus="ConnectionFailureWithStatus",n.connectionFailureWithDetails="ConnectionFailureWithDetails",n.invalidObjectPath="InvalidObjectPath",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.invalidArgumentGeneric="InvalidArgumentGeneric",n.propertyNotLoaded="PropertyNotLoaded",n.runMustReturnPromise="RunMustReturnPromise",n.timeout="Timeout",n.propertyDoesNotExist="PropertyDoesNotExist",n.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",n.moreInfoInnerError="MoreInfoInnerError",n.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",n.valueNotLoaded="ValueNotLoaded",n.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage",n}();n.ResourceStrings=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.CannotRegisterEvent="The event handler cannot be registered.",n.ConnectionFailureWithStatus="The request failed with status code of {0}.",n.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}",n.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",n.InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',n.InvalidRequestContext="Cannot use the object across different request contexts.",n.PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",n.RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',n.Timeout="The operation has timed out.",n.ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.',n.invalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.",n}();n.ResourceStringValues=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.buildMessageArrayForIRequestExecutor=function(i,r,u,f){var o=JSON.stringify(u.Body),e;return n.Utility.log("Request:"),n.Utility.log(o),e={},e[n.Constants.sourceLibHeader]=f,t.buildRequestMessageSafeArray(i,r,"POST","ProcessQuery",e,o)},t.buildResponseOnSuccess=function(n,t){var i={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return i.Body=JSON.parse(n),i.Headers=t,i},t.buildResponseOnError=function(i,r){var u={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return u.ErrorCode=n.ErrorCodes.generalException,u.ErrorMessage=r,i==t.OfficeJsErrorCode_ooeNoCapability?u.ErrorCode=n.ErrorCodes.accessDenied:i==t.OfficeJsErrorCode_ooeActivityLimitReached?u.ErrorCode=n.ErrorCodes.activityLimitReached:i==t.OfficeJsErrorCode_ooeInvalidOrTimedOutSession&&(u.ErrorCode=n.ErrorCodes.invalidOrTimedOutSession,u.ErrorMessage=n.Utility._getResourceString(n.ResourceStrings.invalidOrTimedOutSessionMessage)),u},t.buildHttpResponseFromOfficeJsError=function(i,r){var f=500,u={};return u.error={},u.error.code=n.ErrorCodes.generalException,u.error.message=r,i===t.OfficeJsErrorCode_ooeNoCapability?(f=403,u.error.code=n.ErrorCodes.accessDenied):i===t.OfficeJsErrorCode_ooeActivityLimitReached&&(f=429,u.error.code=n.ErrorCodes.activityLimitReached),{statusCode:f,headers:{},body:JSON.stringify(u)}},t.buildRequestMessageSafeArray=function(n,t,i,r,u,f){var e=[],o;if(u)for(o in u)e.push(o),e.push(u[o]);var s=0,h="",c="",l="";return[n,i,r,e,f,s,t,h,c,l]},t.getResponseBody=function(n){return t.getResponseBodyFromSafeArray(n.value.data)},t.getResponseHeaders=function(n){return t.getResponseHeadersFromSafeArray(n.value.data)},t.getResponseBodyFromSafeArray=function(n){var t=n[2],i;return typeof t=="string"?t:(i=t,i.join(""))},t.getResponseHeadersFromSafeArray=function(n){var i=n[1],r,t;if(!i)return null;for(r={},t=0;t0&&f.push(i);return f},t.throwError=function(i,r,u){throw new n._Internal.RuntimeError({code:i,message:t._getResourceString(i,r),debugInfo:u?{errorLocation:u}:undefined});},t.createRuntimeError=function(t,i,r){return new n._Internal.RuntimeError({code:t,message:i,debugInfo:{errorLocation:r}})},t._getResourceString=function(i,r){var u,e,f,o;return typeof window!="undefined"&&window.Strings&&window.Strings.OfficeOM&&(e="L_"+i,f=window.Strings.OfficeOM[e],f&&(u=f)),u||(u=n.ResourceStringValues[i]),u||(u=i),t.isNullOrUndefined(r)||(Array.isArray(r)?(o=r,u=t._formatString(u,o)):u=u.replace("{0}",r)),u},t._formatString=function(t,i){return t.replace(/\{\d\}/g,function(t){var r=parseInt(t.substr(1,t.length-2));if(r0?".":"")+i;break;case 3:i=t.normalizeName(n.objectPathInfo.Name)+"()"+(i.length>0?".":"")+i;break;case 4:i=t.normalizeName(n.objectPathInfo.Name)+(i.length>0?".":"")+i;break;case 5:i="getItem()"+(i.length>0?".":"")+i;break;case 6:i="_reference()"+(i.length>0?".":"")+i;break}n=n.parentObjectPath}return i},t._createPromiseFromResult=function(t){return new n._Internal.OfficePromise(function(n,i){n(t)})},t._createTimeoutPromise=function(t){return new n._Internal.OfficePromise(function(n,i){setTimeout(function(){n(null)},t)})},t.promisify=function(t){return new n._Internal.OfficePromise(function(n,i){var r=function(t){t.status=="failed"?i(t.error):n(t.value)};t(r)})},t._addActionResultHandler=function(n,t,i){n.context._pendingRequest.addActionResultHandler(t,i)},t._handleNavigationPropertyResults=function(n,i,r){for(var u=0;u0},t._getLocalDocumentUrlPrefixLength=function(n){for(var i=["http://document.localhost","https://document.localhost","//document.localhost"],r=n.toLowerCase().trim(),t=0;t0))for(s=i.url.substr(f+1),e=s.split("&"),u=0;u0&&(f=i.substr(0,u),e=i.substr(u+1),f=t.trim(f),e=t.trim(e),s[f.toUpperCase()]=e));return s},t._parseErrorResponse=function(i){var r=null,f,e,u;if(!t.isNullOrEmptyString(i.body)){f=t.trim(i.body);try{r=JSON.parse(f)}catch(o){t.log("Error when parse "+f)}}return!t.isNullOrUndefined(r)&&typeof r=="object"&&r.error?(u=r.error.code,e=t._getResourceString(n.ResourceStrings.connectionFailureWithDetails,[i.statusCode.toString(),r.error.code,r.error.message])):e=t._getResourceString(n.ResourceStrings.connectionFailureWithStatus,i.statusCode.toString()),t.isNullOrEmptyString(u)&&(u=n.ErrorCodes.connectionFailure),{errorCode:u,errorMessage:e}},t._copyHeaders=function(n,t){if(n&&t)for(var i in n)t[i]=n[i]},t._logEnabled=!1,t._synchronousCleanup=!1,t.s_underscoreCharCode="_".charCodeAt(0),t}();n.Utility=t}(OfficeExtension||(OfficeExtension={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var e=OfficeExtension.ObjectPathFactory.createPropertyObjectPath,f=OfficeExtension.ObjectPathFactory.createMethodObjectPath,l=OfficeExtension.ObjectPathFactory.createIndexerObjectPath,gi=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath,nr=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer,tr=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt,a=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt,u=OfficeExtension.ActionFactory.createMethodAction,v=OfficeExtension.ActionFactory.createSetPropertyAction,r=OfficeExtension.Utility.isNullOrUndefined,t=OfficeExtension.Utility.isUndefined,i=OfficeExtension.Utility.throwIfNotLoaded,o=OfficeExtension.Utility.load,s=OfficeExtension.Utility.fixObjectPathIfNecessary,c=OfficeExtension.Utility._addActionResultHandler,h=OfficeExtension.Utility._handleNavigationPropertyResults,ir=OfficeExtension.Utility.adjustToDateTime,ui=function(l){function a(){l.apply(this,arguments)}return __extends(a,l),Object.defineProperty(a.prototype,"_className",{get:function(){return"Application"},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"notebooks",{get:function(){return this.m_notebooks||(this.m_notebooks=new n.NotebookCollection(this.context,e(this.context,this,"Notebooks",!0,!1))),this.m_notebooks},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"_platform",{get:function(){return i("_platform",this.m__platform,"Application",this._isNull),this.m__platform},enumerable:!0,configurable:!0}),a.prototype.getActiveNotebook=function(){return new n.Notebook(this.context,f(this.context,this,"GetActiveNotebook",1,[],!1,!1,null))},a.prototype.getActiveNotebookOrNull=function(){return new n.Notebook(this.context,f(this.context,this,"GetActiveNotebookOrNull",1,[],!1,!1,null))},a.prototype.getActiveOutline=function(){return new n.Outline(this.context,f(this.context,this,"GetActiveOutline",1,[],!1,!1,null))},a.prototype.getActiveOutlineOrNull=function(){return new n.Outline(this.context,f(this.context,this,"GetActiveOutlineOrNull",1,[],!1,!1,null))},a.prototype.getActivePage=function(){return new n.Page(this.context,f(this.context,this,"GetActivePage",1,[],!1,!1,null))},a.prototype.getActivePageOrNull=function(){return new n.Page(this.context,f(this.context,this,"GetActivePageOrNull",1,[],!1,!1,null))},a.prototype.getActiveParagraph=function(){return new n.Paragraph(this.context,f(this.context,this,"GetActiveParagraph",1,[],!1,!1,null))},a.prototype.getActiveParagraphOrNull=function(){return new n.Paragraph(this.context,f(this.context,this,"GetActiveParagraphOrNull",1,[],!1,!1,null))},a.prototype.getActiveSection=function(){return new n.Section(this.context,f(this.context,this,"GetActiveSection",1,[],!1,!1,null))},a.prototype.getActiveSectionOrNull=function(){return new n.Section(this.context,f(this.context,this,"GetActiveSectionOrNull",1,[],!1,!1,null))},a.prototype.navigateToPage=function(n){u(this.context,this,"NavigateToPage",1,[n])},a.prototype.navigateToPageWithClientUrl=function(t){return new n.Page(this.context,f(this.context,this,"NavigateToPageWithClientUrl",1,[t],!1,!1,null))},a.prototype._ClientLog=function(n,t,i,r){u(this.context,this,"_ClientLog",1,[n,t,i,r])},a.prototype._GetAccountInfo=function(){var t=u(this.context,this,"_GetAccountInfo",1,[]),n=new OfficeExtension.ClientResult;return c(this,t,n),n},a.prototype._GetControlVisibility=function(n){var i=u(this.context,this,"_GetControlVisibility",1,[n]),t=new OfficeExtension.ClientResult;return c(this,i,t),t},a.prototype._GetLoggingInfo=function(){var t=u(this.context,this,"_GetLoggingInfo",1,[]),n=new OfficeExtension.ClientResult;return c(this,t,n),n},a.prototype._GetObjectByReferenceId=function(n){var i=u(this.context,this,"_GetObjectByReferenceId",1,[n]),t=new OfficeExtension.ClientResult;return c(this,i,t),t},a.prototype._GetObjectTypeNameByReferenceId=function(n){var i=u(this.context,this,"_GetObjectTypeNameByReferenceId",1,[n]),t=new OfficeExtension.ClientResult;return c(this,i,t),t},a.prototype._GetServiceTokenByUrl=function(n){var i=u(this.context,this,"_GetServiceTokenByUrl",1,[n]),t=new OfficeExtension.ClientResult;return c(this,i,t),t},a.prototype._GetServiceTokens=function(n){var i=u(this.context,this,"_GetServiceTokens",1,[n]),t=new OfficeExtension.ClientResult;return c(this,i,t),t},a.prototype._GetServiceTokensExt=function(n,t){var r=u(this.context,this,"_GetServiceTokensExt",1,[n,t]),i=new OfficeExtension.ClientResult;return c(this,r,i),i},a.prototype._GetServiceUrl=function(n){var i=u(this.context,this,"_GetServiceUrl",1,[n]),t=new OfficeExtension.ClientResult;return c(this,i,t),t},a.prototype._RemoveAllReferences=function(){u(this.context,this,"_RemoveAllReferences",1,[])},a.prototype._RemoveReference=function(n){u(this.context,this,"_RemoveReference",1,[n])},a.prototype._SendDataToLearningTools=function(n,t){var r=u(this.context,this,"_SendDataToLearningTools",0,[n,t]),i=new OfficeExtension.ClientResult;return c(this,r,i),i},a.prototype._SetControlVisibility=function(n,t){u(this.context,this,"_SetControlVisibility",0,[n,t])},a.prototype._handleResult=function(n){if(l.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i._platform)||(this.m__platform=i._platform);h(this,i,["notebooks","Notebooks"])}},a.prototype.load=function(n){return o(this,n),this},a.prototype.toJSON=function(){return{}},a}(OfficeExtension.ClientObject),y,p,w,b,k,d,g,nt,tt,it,rt,ut,ft,et,ot,st,ht,ct,lt,at,vt,yt,pt,wt,bt,kt,dt,gt,ni,ti,ii,ri,fi,ei,oi,si,hi,ci,li,ai,vi,yi,pi,wi,bi,ki,di;n.Application=ui;y=function(f){function c(){f.apply(this,arguments)}return __extends(c,f),Object.defineProperty(c.prototype,"_className",{get:function(){return"InkAnalysis"},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"page",{get:function(){return this.m_page||(this.m_page=new n.Page(this.context,e(this.context,this,"Page",!1,!1))),this.m_page},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"paragraphs",{get:function(){return this.m_paragraphs||(this.m_paragraphs=new n.InkAnalysisParagraphCollection(this.context,e(this.context,this,"Paragraphs",!0,!1))),this.m_paragraphs},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"id",{get:function(){return i("id",this.m_id,"InkAnalysis",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"InkAnalysis",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),c.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",1,[])},c.prototype._handleResult=function(n){if(f.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i.Id)||(this.m_id=i.Id);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);h(this,i,["page","Page","paragraphs","Paragraphs"])}},c.prototype.load=function(n){return o(this,n),this},c.prototype._handleIdResult=function(n){(f.prototype._handleIdResult.call(this,n),r(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},c.prototype.track=function(){return this.context.trackedObjects.add(this),this},c.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},c.prototype.toJSON=function(){return{id:this.m_id}},c}(OfficeExtension.ClientObject);n.InkAnalysis=y;p=function(f){function c(){f.apply(this,arguments)}return __extends(c,f),Object.defineProperty(c.prototype,"_className",{get:function(){return"InkAnalysisParagraph"},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"inkAnalysis",{get:function(){return this.m_inkAnalysis||(this.m_inkAnalysis=new n.InkAnalysis(this.context,e(this.context,this,"InkAnalysis",!1,!1))),this.m_inkAnalysis},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"lines",{get:function(){return this.m_lines||(this.m_lines=new n.InkAnalysisLineCollection(this.context,e(this.context,this,"Lines",!0,!1))),this.m_lines},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"id",{get:function(){return i("id",this.m_id,"InkAnalysisParagraph",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"InkAnalysisParagraph",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),c.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",1,[])},c.prototype._handleResult=function(n){if(f.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i.Id)||(this.m_id=i.Id);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);h(this,i,["inkAnalysis","InkAnalysis","lines","Lines"])}},c.prototype.load=function(n){return o(this,n),this},c.prototype._handleIdResult=function(n){(f.prototype._handleIdResult.call(this,n),r(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},c.prototype.track=function(){return this.context.trackedObjects.add(this),this},c.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},c.prototype.toJSON=function(){return{id:this.m_id}},c}(OfficeExtension.ClientObject);n.InkAnalysisParagraph=p;w=function(e){function h(){e.apply(this,arguments)}return __extends(h,e),Object.defineProperty(h.prototype,"_className",{get:function(){return"InkAnalysisParagraphCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,"InkAnalysisParagraphCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"count",{get:function(){return i("count",this.m_count,"InkAnalysisParagraphCollection",this._isNull),this.m_count},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"InkAnalysisParagraphCollection",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),h.prototype.getItem=function(t){return new n.InkAnalysisParagraph(this.context,l(this.context,this,[t]))},h.prototype.getItemAt=function(t){return new n.InkAnalysisParagraph(this.context,f(this.context,this,"GetItemAt",1,[t],!1,!1,null))},h.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",1,[])},h.prototype._handleResult=function(i){var u,o,f,h;if((e.prototype._handleResult.call(this,i),!r(i))&&(u=i,s(this,u),t(u.Count)||(this.m_count=u.Count),t(u._ReferenceId)||(this.m__ReferenceId=u._ReferenceId),!r(u[OfficeExtension.Constants.items])))for(this.m__items=[],o=u[OfficeExtension.Constants.items],f=0;f0?i.push(t):t.tabIndex===0&&r.push(t):r.push(t);return i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;return r===0&&(r=i.indexOf(n)-i.indexOf(t)),r}),[].concat(i,r)}var o="focus",s="on",k="configurable",d="writable",h="enumerable",u="",c="undefined",t=!1,i=!0,l=2147483647,n=null,r=-1,a=r,g="&_xdm_Info=",nt="&_serializer_version=",tt="_xdm_",ft="_serializer_version=",v="#",it="&",f="class",y={},et=3e4,p=n,w=n,e=(new Date).getTime();return{set_entropy:function(n){var t,r,i;if(typeof n=="string")for(t=0;t6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(r)===OSF.DDA.SettingsManager.DataJSONSuffix&&(i=new Date(parseInt(t.slice(5,r))),i)?i:t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,i);f[u]=t}catch(e){}}return f},loadScript:function(r,u,f){var s,e,o,h,c;r&&u&&(s=window.document,e=y[r],e?e.loaded?u():e.pendingCallbacks.push(u):(o=s.createElement("script"),o.type="text/javascript",e={loaded:t,pendingCallbacks:[u],timer:n},y[r]=e,h=function(){var r,t,u;for(e.timer!=n&&(clearTimeout(e.timer),delete e.timer),e.loaded=i,r=e.pendingCallbacks.length,t=0;t1?l[l.length-1]:n,s,h,c,a;return u&&o!=n&&(o.indexOf(it)>=0&&(o=o.split(it)[0]),o=decodeURIComponent(o)),s=b(),!f&&s&&(h=window.name.indexOf(i),h>r&&(c=window.name.indexOf(";",h),c==r&&(c=window.name.length),a=window.name.substring(h,c),o?s.setItem(a,o):o=s.getItem(a))),o},getConversationId:function(){var i=window.location.search,t=n,r;return i&&(r=i.indexOf("&"),t=r>0?i.substring(1,r):i.substr(1),t&&t.charAt(t.length-1)==="="&&(t=t.substring(0,t.length-1),t&&(t=decodeURIComponent(t)))),t},getInfoItems:function(n){var t=n.split("$");return typeof t[1]==c&&(t=n.split("|")),typeof t[1]==c&&(t=n.split("%7C")),t},getXdmFieldValue:function(n,t){var r=u,f=OSF.OUtil.parseXdmInfo(t),i;if(f&&(i=OSF.OUtil.getInfoItems(f),i!=undefined&&i.length>=3))switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]),f;if(u)throw u;for(f in r)if(u=Function._validateParameter(n[f],r[f],f),u)throw u;},writeProfilerMark:function(n){window.msWriteProfilerMark&&(window.msWriteProfilerMark(n),OsfMsAjaxFactory.msAjaxDebug.trace(n))},outputDebug:function(n){typeof OsfMsAjaxFactory!==c&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){var e,f;r=r||{};for(e in u)f=u[e],r[f]==undefined&&(r[f]=i);return Object.defineProperty(n,t,r),n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[h])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[h])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[d,h,k])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[d,h,k])},finalizeProperties:function(n,r){var e,u;r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8,e=o&255,i[t++]=r>>2,i[t++]=(r&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63,isNaN(o)||(r=o>>8,f=h&255,e=h>>8,i[t++]=r>>2,i[t++]=(r&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63),isNaN(o)?i[t-1]=64:isNaN(h)&&(i[t-2]=64,i[t-1]=64),c=0;c0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){var u,i,f,r;if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(u=[],i=0;in)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=ut(u),e=f?u.length-1:0,u.length===0)return n;while(!h&&e>=0&&en)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=ut(u),l=y(u,f),s=v(u.length,l,e),s<0)return n;while(!c&&s>=0&&s0;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[r%16],r=Math.floor(r/16);for(;t<32;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[Math.floor(Math.random()*16)];return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3};OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",Reserved:"reserved",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidOpenBrowserWindow:102,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];return i?(i.name||(i.name=n[this.errorCodes.ooeInternalError].name),i.message||(i.message=n[this.errorCodes.ooeInternalError].message)):i=n[this.errorCodes.ooeInternalError],i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:t.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:t.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:t.L_SSOConnectionLostError,message:t.L_SSOConnectionLostErrorMessage}}}}(),function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}(),r,i,h,u,c,l,f,a,e,v,y,p,w,b,o,k,d,g,s,nt,tt,it,rt;n.RequirementVersion=ut;r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){var f,u,e,i,r;if(n==undefined)return!1;if(t==undefined&&(t=0),f=this._setMap,u=f._sets,u.hasOwnProperty(n.toLowerCase())){e=u[n.toLowerCase()];try{if((i=this._getVersion(e),t=t+"",r=this._getVersion(t),i.major>0&&i.major>r.major)||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),i=0,r=0;if(t.length<2&&isNaN(Number(n)))throw u;else if(i=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(i)||isNaN(r))throw u;return{minor:r,major:i}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;h=function(n){function i(){n.call(this,{dialogapi:t})}return __extends(i,n),i}(i);n.DefaultDialogSetRequirement=h;u=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelClientDefaultSetRequirement=u;c=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(u);n.ExcelClientV1DefaultSetRequirement=c;l=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookClientDefaultSetRequirement=l;f=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return __extends(i,n),i}(i);n.WordClientDefaultSetRequirement=f;a=function(n){function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return __extends(i,n),i}(f);n.WordClientV1DefaultSetRequirement=a;e=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointClientDefaultSetRequirement=e;v=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(e);n.PowerpointClientV1DefaultSetRequirement=v;y=function(n){function i(){n.call(this,{selection:t,textcoercion:t})}return __extends(i,n),i}(i);n.ProjectClientDefaultSetRequirement=y;p=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return __extends(i,n),i}(i);n.ExcelWebDefaultSetRequirement=p;w=function(n){function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordWebDefaultSetRequirement=w;b=function(n){function i(){n.call(this,{activeview:t,settings:t})}return __extends(i,n),i}(i);n.PowerpointWebDefaultSetRequirement=b;o=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookWebDefaultSetRequirement=o;k=function(n){function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.SwayWebDefaultSetRequirement=k;d=function(n){function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return __extends(i,n),i}(i);n.AccessWebDefaultSetRequirement=d;g=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelIOSDefaultSetRequirement=g;s=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordIOSDefaultSetRequirement=s;nt=function(n){function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return __extends(t,n),t}(s);n.WordIOSV1DefaultSetRequirement=nt;tt=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointIOSDefaultSetRequirement=tt;it=function(n){function i(){n.call(this,{mailbox:t})}return __extends(i,n),i}(i);n.OutlookIOSDefaultSetRequirement=it;rt=function(){function n(){}var t="undefined";return n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},n.getDefaultRequirementMatrix=function(u){var f,e,s,o;return this.initializeDefaultSetMatrix(),f=undefined,e=u.get_requirementMatrix(),e!=undefined&&e.length>0&&typeof JSON!==t?(s=JSON.parse(u.get_requirementMatrix().toLowerCase()),f=new r(new i(s))):(o=n.getClientFullVersionString(u),f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[o]!=undefined?new r(n.DefaultSetArrayMatrix[o]):new r(new i({}))),f},n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix(),e;return f!=undefined&&f.length>0&&typeof JSON!==t?(e=JSON.parse(n.get_requirementMatrix().toLowerCase()),u=new r(new i(e))):u=new r(new h),u},n.getClientFullVersionString=function(n){var i=n.get_appMinorVersion(),u="",r="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;return f&&n.get_appVersion()==1?r=t==4096&&i>=15?"16.00.01":"16.00":n.get_appName()==64?r=n.get_appVersion():(u=i<10?"0"+i:""+i,r=n.get_appVersion()+"."+u),n.get_appName()+"-"+r},n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new c;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new v;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new l;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new w;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new b;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new g;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new k;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new nt;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new tt;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new it},n.Excel_RCLIENT_1600="1-16.00",n.Excel_RCLIENT_1601="1-16.01",n.Word_RCLIENT_1600="2-16.00",n.Word_RCLIENT_1601="2-16.01",n.PowerPoint_RCLIENT_1600="4-16.00",n.PowerPoint_RCLIENT_1601="4-16.01",n.Outlook_RCLIENT_1600="8-16.00",n.Excel_WAC_1600="16-16.00",n.Word_WAC_1600="32-16.00",n.Outlook_WAC_1600="64-16.00",n.Outlook_WAC_1601="64-16.01",n.Project_RCLIENT_1600="128-16.00",n.Access_WAC_1600="256-16.00",n.PowerPoint_WAC_1600="512-16.00",n.Excel_IOS_1600="1024-16.00",n.SWAY_WAC_1600="2048-16.00",n.Word_IOS_1600="4096-16.00",n.Word_IOS_16001="4096-16.00.01",n.PowerPoint_IOS_1600="8192-16.00",n.Outlook_IOS_1600="65536-16.00",n.DefaultSetArrayMatrix={},n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))}(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}return n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n},n.getInstance=function(){return n.hostObj===undefined&&(n.hostObj=new n),n.hostObj},n.prototype.getPlatform=function(){var n=this,t;return n.hostInfo.hostPlatform&&(t=n.hostInfo.hostPlatform.toLowerCase(),n.platformRemappings[t])?n.platformRemappings[t]:null},n.prototype.getHost=function(){var n=this,t;if(n.hostInfo.hostType){if(t=n.hostInfo.hostType.toLowerCase(),n.camelCaseMappings[t])return n.camelCaseMappings[t];if(t=n.capitalizeFirstLetter(n.hostInfo.hostType),Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null},n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null},n}();n.Host=t})(t=n.HostName||(n.HostName={}))}(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){n||(window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,n=!0)},disableShortcut:function(){n&&(t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window),n=!1)}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i,r,o,u,f,e;if(n&&typeof n=="string"&&(r=n.indexOf("#"),r!=-1)){o=n.substring(0,r);u=n.substring(r+1);switch(o){case"binding":case"bindings":u&&(i=new OSF.DDA.BindingPromise(u))}}if(i)return i.onFail=t,i;else if(t)if(f=typeof t,f=="function")e={},e[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(e,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext));else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f);};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this,s,e;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.auth&&OSF.OUtil.defineEnumerableProperty(f,"auth",{value:n.auth});n.get_isDialog()?(e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e})):(t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t}),r&&(s=r.displayName||"appOM",delete r.displayName,OSF.OUtil.defineEnumerableProperty(f,s,{value:r})),u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}}),e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e}))};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this,u;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;return OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext()),n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,e=n.length,o=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){var u,i,r;for(u in n){if(i=n[u],r=t[u],i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw o();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw o();}};f.extractRequiredArguments=function(t,i,r){var f,u,h,s,c,l;if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(c=n.length-1;c>=s;c--){l=n[c];switch(typeof l){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=l;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}if(f=o.fillOptions(f,i,r,u),e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;return o.verifyArguments(t,f),f}var h="function",s=n.length,o=new OSF.DDA.ApiMethodCall(n,t,i,f,e);this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),u=c(n,r,t,i);return o.constructCallArgs(r,u,t,i)};this.processResponse=function(n,t,i,f){return n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n)};this.getCallArgs=function(n){for(var t,u,r,i=n.length-1;i>=s;i--){r=n[i];switch(typeof r){case"object":t=r;break;case h:u=r}}return t=t||{},u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u),t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],i=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],t,i,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback],u,r;f&&(u={},u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?u[OSF.DDA.AsyncResultEnum.Properties.Value]=i:(r={},i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i),f(new OSF.DDA.AsyncResult(u,r)))};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.SyncMethodNames[t]=i};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){function o(n,i,r,u){var o,c,s,h;if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(s=n.length-1;s>=e;s--){h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}return o=f.fillOptions(o,i,r,u),f.verifyArguments(t,o),o}var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),u=o(n,r,t,i);return f.constructCallArgs(r,u,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){function e(i,f){var a=i?{}:undefined,s,h,o,v,c,l;for(s in i){if(h=i[s],OSF.DDA.ListType.isListType(s)){o=[];for(v in h)o.push(e(h[v],f))}else OSF.OUtil.listContainsKey(r,s)?o=r[s][f](h):f==u&&n.preserveNesting(s)?o=e(h,f):(c=t[s],c?(l=c[f],l&&(o=l[h],o===undefined&&(o=h))):o=h);a[s]=o}return a}function l(i,r){var e,u,h,s;for(u in r)h=n.isComplexType(u)?l(i,t[u][o]):i[u],h!=undefined&&(e||(e={}),s=r[u],s==f&&(s=u),e[s]=n.pack(u,h));return e}function s(i,r,e){var o,a,h,l,p,v,y;e||(e={});for(o in r){if(a=r[o],a==f)h=i;else if(a==c){e[o]=i.toArray();continue}else h=i[a];if(h===null||h===undefined)e[o]=undefined;else if(h=n.unpack(o,h),n.isComplexType(o))l=t[o][u],n.preserveNesting(o)?e[o]=s(h,l):s(h,l,e);else if(OSF.DDA.ListType.isListType(o)){l={};p=OSF.DDA.ListType.getDescriptor(o);l[p]=f;v=new Array(h.length);for(y in h)v[y]=s(h[y],l);e[o]=v}else e[o]=h}return e}function a(n,i,r){var f=t[n][r],u,o,c;return r=="toHost"?(o=e(i,r),u=l(o,f)):r==h&&(c=s(i,f),u=e(c,r)),u}var h="fromHost",i=this,o="toHost",u=h,c="sourceData",f="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];t||(t={});i.addMapping=function(n,i){var e,h,c,l,r,s,a,v;if(i.map){e=i.map;h={};for(c in e)l=e[c],l==f&&(l=c),h[l]=c}else e=i.toHost,h=i.fromHost;if(r=t[n],r){s=r[o];for(a in s)e[a]=s[a];s=r[u];for(v in s)h[v]=s[v]}else r=t[n]={};r[o]=e;r[u]=h};i.toHost=function(n,t){return a(n,t,o)};i.fromHost=function(n,t){return a(n,t,u)};i.self=f;i.sourceData=c;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){return this.isDynamicType(n)?t[n].toHost(i):i};i.unpack=function(n,i){return this.isDynamicType(n)?t[n].fromHost(i):i}};OSF.DDA.getDecoratedParameterMap=function(n,t){function r(n){var i=null,r,t;if(n)for(i={},r=n.length,t=0;t1?i=u+c+t:s.length>0&&(i=u+f+h+t),o?[i,r,o].join(""):i}function o(n){if(!n)return null;var t=document.createElement("a");return t.href=n,t.protocol+"//"+t.host}function s(){try{for(var i=["Windows NT 6.1","Windows NT 6.2","Windows NT 6.3"],r=window.navigator.userAgent,n=0,u=i.length;n-1)return t();return!1}catch(f){return OsfMsAjaxFactory.msAjaxDebug.trace("Error happens in shouldUseLocalStorageToPassMessage: "+f),!1}}function t(){try{var n=window.navigator.userAgent;return n.indexOf("MSIE ")>-1||n.indexOf("Trident/")>-1||n.indexOf("Edge/")>-1}catch(t){return OsfMsAjaxFactory.msAjaxDebug.trace("Error happens in isInternetExplorer: "+t),!1}}var i="^https://[a-z0-9-]+.(officeapps.live|officeapps-df.live|partner.officewebapps).com/";n.parseAppContextFromWindowName=r;n.serializeObjectToString=u;n.isHostTrusted=f;n.addHostInfoAsQueryParam=e;n.getDomainForUrl=o;n.shouldUseLocalStorageToPassMessage=s;n.isInternetExplorer=t})(t=n.WACUtils||(n.WACUtils={}))}(OfficeExt||(OfficeExt={})),function(n){var e="\n",i=!0,t=null,r="undefined",h=function(){function n(){}return n.isInstanceOfType=function(n,u){if(typeof u===r||u===t)return!1;if(u instanceof n)return i;var f=u.constructor;return f&&typeof f=="function"&&f.__typeName&&f.__typeName!=="Object"||(f=Object),!!(f===n)||f.__typeName&&n.__typeName&&f.__typeName===n.__typeName},n}(),o,u,s,f;n.MsAjaxTypeHelper=h;o=function(){function n(){}var i="Parameter name: {0}";return n.create=function(n,t){var i=new Error(n),r;if(i.message=n,t)for(r in t)i[r]=t[r];return i.popStackFrame(),i},n.parameterCount=function(t){var r="Sys.ParameterCountException: "+(t?t:"Parameter count mismatch."),i=n.create(r,{name:"Sys.ParameterCountException"});return i.popStackFrame(),i},n.argument=function(t,r){var o="Sys.ArgumentException: "+(r?r:"Value does not fall within the expected range."),f;return t&&(o+=e+u.format(i,t)),f=n.create(o,{name:"Sys.ArgumentException",paramName:t}),f.popStackFrame(),f},n.argumentNull=function(t,r){var o="Sys.ArgumentNullException: "+(r?r:"Value cannot be null."),f;return t&&(o+=e+u.format(i,t)),f=n.create(o,{name:"Sys.ArgumentNullException",paramName:t}),f.popStackFrame(),f},n.argumentOutOfRange=function(f,o,s){var h="Sys.ArgumentOutOfRangeException: "+(s?s:"Specified argument was out of the range of valid values."),c;return f&&(h+=e+u.format(i,f)),typeof o!==r&&o!==t&&(h+=e+u.format("Actual value was {0}.",o)),c=n.create(h,{name:"Sys.ArgumentOutOfRangeException",paramName:f,actualValue:o}),c.popStackFrame(),c},n.argumentType=function(t,r,f,o){var s="Sys.ArgumentTypeException: ",h;return s+=o?o:r&&f?u.format("Object of type '{0}' cannot be converted to type '{1}'.",r.getName?r.getName():r,f.getName?f.getName():f):"Object cannot be converted to the required type.",t&&(s+=e+u.format(i,t)),h=n.create(s,{name:"Sys.ArgumentTypeException",paramName:t,actualType:r,expectedType:f}),h.popStackFrame(),h},n.argumentUndefined=function(t,r){var o="Sys.ArgumentUndefinedException: "+(r?r:"Value cannot be undefined."),f;return t&&(o+=e+u.format(i,t)),f=n.create(o,{name:"Sys.ArgumentUndefinedException",paramName:t}),f.popStackFrame(),f},n.invalidOperation=function(t){var r="Sys.InvalidOperationException: "+(t?t:"Operation is not valid due to the current state of the object."),i=n.create(r,{name:"Sys.InvalidOperationException"});return i.popStackFrame(),i},n}();n.MsAjaxError=o;u=function(){function n(){}return n.format=function(n){for(var r,i=[],t=1;t0){for(r=[],i=0;i=s)break;if(f=Function._validateParameter(n[e],o,h),f)return f.popStackFrame(),f}return t}),Function._validateParameterCount||(Function._validateParameterCount=function(n,r,u){var f,s,e=r.length,h=n.length,c,l,a;if(he)for(s=i,f=0;f0){var t=h.shift();d(t)}else clearInterval(u),u=n}else OsfMsAjaxFactory.msAjaxDebug.trace(v)}function d(n){o=n.getInvokeBlockingFlag();n.invoke();c=(new Date).getTime()}function ot(){var r,u,s,e,h,o,t;if(f){u=0;s=new Date;for(h in i){r=i[h];for(o in r._callbackList)if(t=r._callbackList[o],e=t.timeout?t.timeout:b,e>=0&&Math.abs(s.getTime()-t.createdOn)>=e)try{t.callback&&t.callback(Microsoft.Office.Common.InvokeResultCode.errorHandlingMethodCallTimedout,n)}finally{delete r._callbackList[o]}else u++}u===0&&(clearInterval(f),f=n)}else OsfMsAjaxFactory.msAjaxDebug.trace(v)}function st(){o=t}function ht(n){if(window.addEventListener)window.addEventListener("message",n,t);else if(navigator.userAgent.indexOf("MSIE")>-1&&window.attachEvent)window.attachEvent("onmessage",n);else{OsfMsAjaxFactory.msAjaxDebug.trace("Browser doesn't support the required API.");throw OsfMsAjaxFactory.msAjaxError.argument("Browser");}}function ct(n,i){var f=t,r,u;return n===e?e:!n||!i||!n.length||!i.length?f:(r=document.createElement("a"),u=document.createElement("a"),r.href=n,u.href=i,f=g(r,u),delete r,u,f)}function l(n,i){var u=t,f,e,r;if(!i||!i.length||!n||!(n instanceof Array)||!n.length)return u;for(f=document.createElement("a"),e=document.createElement("a"),f.href=i,r=0;rp)&&!o?(d(ht),lt=t):u=setInterval(et,p));lt&&ft(ht)}catch(w){s&&s._onHandleRequestError&&s._onHandleRequestError(r,w);nt=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequest;w==tt&&(nt=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied);var pt=new Microsoft.Office.Common.Response(r._actionName,r._conversationId,r._correlationId,nt,Microsoft.Office.Common.ResponseType.forCalling,w),wt=Microsoft.Office.Common.MessagePackager.envelope(pt,f),at=t;try{at=!!(i.source&&i.source.postMessage)}catch(w){}at&&i.source.postMessage(wt,b)}}else if(r._messageType===Microsoft.Office.Common.MessageType.response){if(h=rt(r._conversationId),!h)return;if(h._serializerVersion=f,!ct(h._targetUrl,i.origin))throw"Failed orgin check";if(r._responseType===Microsoft.Office.Common.ResponseType.forCalling){if(v=h._callbackList[r._correlationId],v)try{v.callback&&v.callback(r._errorCode,r._data)}finally{delete h._callbackList[r._correlationId]}}else y=h._eventHandlerList[r._actionName],y!==undefined&&y!==n&&y(r._data)}else return}}function nt(){k||(ht(lt),k=e)}var a="serviceEndPointId",e=!0,v="channel is not ready.",s="conversationId",y="Unknown conversation Id.",t=!1,n=null,h=[],c=n,u=n,p=10,o=t,f=n,tt=2e3,w=65e3,b=w,r={},i={},k=t;return{connect:function(n,t,r,u){var f=i[n];return f||(nt(),f=new Microsoft.Office.Common.ClientEndPoint(n,t,r,u),i[n]=f),f},getClientEndPoint:function(n){var r=Function._validateParams(arguments,[{name:s,type:String,mayBeNull:t}]);if(r)throw r;return i[n]},createServiceEndPoint:function(n){nt();var t=new Microsoft.Office.Common.ServiceEndPoint(n);return r[n]=t,t},getServiceEndPoint:function(n){var i=Function._validateParams(arguments,[{name:a,type:String,mayBeNull:t}]);if(i)throw i;return r[n]},deleteClientEndPoint:function(n){var r=Function._validateParams(arguments,[{name:s,type:String,mayBeNull:t}]);if(r)throw r;delete i[n]},deleteServiceEndPoint:function(n){var i=Function._validateParams(arguments,[{name:a,type:String,mayBeNull:t}]);if(i)throw i;delete r[n]},checkUrlWithAppDomains:function(n,t){return l(n,t)},_setMethodTimeout:function(n){var i=Function._validateParams(arguments,[{name:"methodTimeout",type:Number,mayBeNull:t}]);if(i)throw i;b=n<=0?w:n},_startMethodTimeoutTimer:function(){f||(f=setInterval(ot,tt))}}}();Microsoft.Office.Common.Message=function(n,t,i,r,u){var e=!1,f=this,o=Function._validateParams(arguments,[{name:"messageType",type:Number,mayBeNull:e},{name:"actionName",type:String,mayBeNull:e},{name:"conversationId",type:String,mayBeNull:e},{name:"correlationId",mayBeNull:e},{name:"data",mayBeNull:!0,optional:!0}]);if(o)throw o;f._messageType=n;f._actionName=t;f._conversationId=i;f._correlationId=r;f._origin=window.location.href;f._data=typeof u=="undefined"?null:u};Microsoft.Office.Common.Message.prototype={getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getOrigin:function(){return this._origin},getData:function(){return this._data},getMessageType:function(){return this._messageType}};Microsoft.Office.Common.Request=function(n,t,i,r,u){Microsoft.Office.Common.Request.uber.constructor.call(this,Microsoft.Office.Common.MessageType.request,n,i,r,u);this._actionType=t};OSF.OUtil.extend(Microsoft.Office.Common.Request,Microsoft.Office.Common.Message);Microsoft.Office.Common.Request.prototype.getActionType=function(){return this._actionType};Microsoft.Office.Common.Response=function(n,t,i,r,u,f){Microsoft.Office.Common.Response.uber.constructor.call(this,Microsoft.Office.Common.MessageType.response,n,t,i,f);this._errorCode=r;this._responseType=u};OSF.OUtil.extend(Microsoft.Office.Common.Response,Microsoft.Office.Common.Message);Microsoft.Office.Common.Response.prototype.getErrorCode=function(){return this._errorCode};Microsoft.Office.Common.Response.prototype.getResponseType=function(){return this._responseType};Microsoft.Office.Common.MessagePackager={envelope:function(n){return typeof n=="object"&&(n._serializerVersion=OSF.SerializerVersion.Browser),JSON.stringify(n)},unenvelope:function(n){return JSON.parse(n)}};Microsoft.Office.Common.ResponseSender=function(n,t,i,r,u,f,e){var h=!1,o=this,c=Function._validateParams(arguments,[{name:"requesterWindow",mayBeNull:h},{name:"requesterUrl",type:String,mayBeNull:h},{name:"actionName",type:String,mayBeNull:h},{name:"conversationId",type:String,mayBeNull:h},{name:"correlationId",mayBeNull:h},{name:"responsetype",type:Number,maybeNull:h},{name:"serializerVersion",type:Number,maybeNull:!0,optional:!0}]),s;if(c)throw c;o._requesterWindow=n;o._requesterUrl=t;o._actionName=i;o._conversationId=r;o._correlationId=u;o._invokeResultCode=Microsoft.Office.Common.InvokeResultCode.noError;o._responseType=f;s=o;o._send=function(n){try{var t=new Microsoft.Office.Common.Response(s._actionName,s._conversationId,s._correlationId,s._invokeResultCode,s._responseType,n),i=Microsoft.Office.Common.MessagePackager.envelope(t,e);s._requesterWindow.postMessage(i,s._requesterUrl)}catch(r){OsfMsAjaxFactory.msAjaxDebug.trace("ResponseSender._send error:"+r.message)}}};Microsoft.Office.Common.ResponseSender.prototype={getRequesterWindow:function(){return this._requesterWindow},getRequesterUrl:function(){return this._requesterUrl},getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getSend:function(){return this._send},setResultCode:function(n){this._invokeResultCode=n}};Microsoft.Office.Common.InvokeCompleteCallback=function(n,t,i,r,u,f,e){var s=this,o;Microsoft.Office.Common.InvokeCompleteCallback.uber.constructor.call(s,n,t,i,r,u,Microsoft.Office.Common.ResponseType.forCalling,e);s._postCallbackHandler=f;o=s;s._send=function(n,t){t!=undefined&&(o._invokeResultCode=t);try{var i=new Microsoft.Office.Common.Response(o._actionName,o._conversationId,o._correlationId,o._invokeResultCode,o._responseType,n),r=Microsoft.Office.Common.MessagePackager.envelope(i,e);o._requesterWindow.postMessage(r,o._requesterUrl);o._postCallbackHandler()}catch(u){OsfMsAjaxFactory.msAjaxDebug.trace("InvokeCompleteCallback._send error:"+u.message)}}};OSF.OUtil.extend(Microsoft.Office.Common.InvokeCompleteCallback,Microsoft.Office.Common.ResponseSender);Microsoft.Office.Common.Invoker=function(n,t,i,r,u,f,e){var s=!0,h=!1,o=this,c=Function._validateParams(arguments,[{name:"methodObject",mayBeNull:h},{name:"paramValue",mayBeNull:s},{name:"invokeCompleteCallback",mayBeNull:h},{name:"eventHandlerProxyList",mayBeNull:s},{name:"conversationId",type:String,mayBeNull:h},{name:"eventName",type:String,mayBeNull:h},{name:"serializerVersion",type:Number,mayBeNull:s,optional:s}]);if(c)throw c;o._methodObject=n;o._param=t;o._invokeCompleteCallback=i;o._eventHandlerProxyList=r;o._conversationId=u;o._eventName=f;o._serializerVersion=e};Microsoft.Office.Common.Invoker.prototype={invoke:function(){var n=this,t,i,u,r,f;try{switch(n._methodObject.getInvokeType()){case Microsoft.Office.Common.InvokeType.async:n._methodObject.getMethod()(n._param,n._invokeCompleteCallback.getSend());break;case Microsoft.Office.Common.InvokeType.sync:t=n._methodObject.getMethod()(n._param);n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.syncRegisterEvent:i=n._createEventHandlerProxyObject(n._invokeCompleteCallback);t=n._methodObject.getMethod()(i.getSend(),n._param);n._eventHandlerProxyList[n._conversationId+n._eventName]=i.getSend();n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.syncUnregisterEvent:u=n._eventHandlerProxyList[n._conversationId+n._eventName];t=n._methodObject.getMethod()(u,n._param);delete n._eventHandlerProxyList[n._conversationId+n._eventName];n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.asyncRegisterEvent:r=n._createEventHandlerProxyObject(n._invokeCompleteCallback);n._methodObject.getMethod()(r.getSend(),n._invokeCompleteCallback.getSend(),n._param);n._eventHandlerProxyList[n._callerId+n._eventName]=r.getSend();break;case Microsoft.Office.Common.InvokeType.asyncUnregisterEvent:f=n._eventHandlerProxyList[n._callerId+n._eventName];n._methodObject.getMethod()(f,n._invokeCompleteCallback.getSend(),n._param);delete n._eventHandlerProxyList[n._callerId+n._eventName]}}catch(e){n._invokeCompleteCallback.setResultCode(Microsoft.Office.Common.InvokeResultCode.errorInResponse);n._invokeCompleteCallback.getSend()(e)}},getInvokeBlockingFlag:function(){return this._methodObject.getBlockingFlag()},_createEventHandlerProxyObject:function(n){return new Microsoft.Office.Common.ResponseSender(n.getRequesterWindow(),n.getRequesterUrl(),n.getActionName(),n.getConversationId(),n.getCorrelationId(),Microsoft.Office.Common.ResponseType.forEventing,this._serializerVersion)}};OSF.OUtil.setNamespace("WAC",OSF.DDA);OSF.DDA.WAC.UniqueArguments={Data:"Data",Properties:"Properties",BindingRequest:"DdaBindingsMethod",BindingResponse:"Bindings",SingleBindingResponse:"singleBindingResponse",GetData:"DdaGetBindingData",AddRowsColumns:"DdaAddRowsColumns",SetData:"DdaSetBindingData",ClearFormats:"DdaClearBindingFormats",SetFormats:"DdaSetBindingFormats",SettingsRequest:"DdaSettingsMethod",BindingEventSource:"ddaBinding",ArrayData:"ArrayData"};OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC);OSF.DDA.WAC.Delegate.SpecialProcessor=function(){var n=[OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,OSF.DDA.WAC.UniqueArguments.BindingRequest,OSF.DDA.WAC.UniqueArguments.BindingResponse,OSF.DDA.WAC.UniqueArguments.GetData,OSF.DDA.WAC.UniqueArguments.AddRowsColumns,OSF.DDA.WAC.UniqueArguments.SetData,OSF.DDA.WAC.UniqueArguments.ClearFormats,OSF.DDA.WAC.UniqueArguments.SetFormats,OSF.DDA.WAC.UniqueArguments.SettingsRequest,OSF.DDA.WAC.UniqueArguments.BindingEventSource],t={};OSF.DDA.WAC.Delegate.SpecialProcessor.uber.constructor.call(this,n,t)};OSF.OUtil.extend(OSF.DDA.WAC.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.WAC.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.WAC.Delegate.SpecialProcessor,[]);OSF.OUtil.setNamespace("WAC",OSF.DDA);OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC);OSF.DDA.WAC.getDelegateMethods=function(){var n={};return n[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.WAC.Delegate.executeAsync,n[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.WAC.Delegate.registerEventAsync,n[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.WAC.Delegate.unregisterEventAsync,n[OSF.DDA.DispIdHost.Delegates.OpenDialog]=OSF.DDA.WAC.Delegate.openDialog,n[OSF.DDA.DispIdHost.Delegates.MessageParent]=OSF.DDA.WAC.Delegate.messageParent,n[OSF.DDA.DispIdHost.Delegates.SendMessage]=OSF.DDA.WAC.Delegate.sendMessage,n[OSF.DDA.DispIdHost.Delegates.CloseDialog]=OSF.DDA.WAC.Delegate.closeDialog,n};OSF.DDA.WAC.Delegate.version=1;OSF.DDA.WAC.Delegate.executeAsync=function(n){(n.hostCallArgs||(n.hostCallArgs={}),n.hostCallArgs.DdaMethod={ControlId:OSF._OfficeAppFactory.getId(),Version:OSF.DDA.WAC.Delegate.version,DispatchId:n.dispId},n.hostCallArgs.__timeout__=-1,n.onCalling&&n.onCalling(),OSF.getClientEndPoint())&&OSF.getClientEndPoint().invoke("executeMethod",function(t,i){n.onReceiving&&n.onReceiving();var r;if(t==Microsoft.Office.Common.InvokeResultCode.noError)OSF.DDA.WAC.Delegate.version=i.Version,r=i.Error;else switch(t){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:r=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:r=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}n.onComplete&&n.onComplete(r,i)},n.hostCallArgs)};OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent=function(n,t){var i=(new Date).getTime();return function(r,u){t.onReceiving&&t.onReceiving();var f;if(r!=Microsoft.Office.Common.InvokeResultCode.noError)switch(r){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:f=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:f=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}else f=u?u.Error?u.Error:OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess:OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;t.onComplete&&t.onComplete(f);OSF.AppTelemetry&&OSF.AppTelemetry.onRegisterDone(n,t.dispId,Math.abs((new Date).getTime()-i),f)}};OSF.DDA.WAC.Delegate.registerEventAsync=function(n){(n.onCalling&&n.onCalling(),OSF.getClientEndPoint())&&OSF.getClientEndPoint().registerForEvent(OSF.DDA.getXdmEventName(n.targetId,n.eventType),function(t){n.onEvent&&n.onEvent(t);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!0,n),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:n.dispId,targetId:n.targetId})};OSF.DDA.WAC.Delegate.unregisterEventAsync=function(n){(n.onCalling&&n.onCalling(),OSF.getClientEndPoint())&&OSF.getClientEndPoint().unregisterForEvent(OSF.DDA.getXdmEventName(n.targetId,n.eventType),OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!1,n),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:n.dispId,targetId:n.targetId})};OSF.OUtil.setNamespace("WebApp",OSF);OSF.WebApp.AddHostInfoAndXdmInfo=function(n){return OSF._OfficeAppFactory.getWindowLocationSearch&&OSF._OfficeAppFactory.getWindowLocationHash?n+OSF._OfficeAppFactory.getWindowLocationSearch()+OSF._OfficeAppFactory.getWindowLocationHash():n};OSF.WebApp._UpdateLinksForHostAndXdmInfo=function(){for(var r,i,t=document.querySelectorAll("a[data-officejs-navigate]"),n=0;n0?n.substr(0,i):null,r=t!==null?t.toLowerCase()==="http"||t.toLowerCase()==="https":!0;return r&&n!="#"&&n!="/"&&n!=""&&n!=OSF._OfficeAppFactory.getWebAppState().webAppUrl};OSF.InitializationHelper=function(n,t,i,r,u){var f=this,e;f._hostInfo=n;f._webAppState=t;f._context=i;f._settings=r;f._hostFacade=u;f._appContext={};f._tabbableElements="a[href]:not([tabindex='-1']),area[href]:not([tabindex='-1']),button:not([disabled]):not([tabindex='-1']),input:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),textarea:not([disabled]):not([tabindex='-1']),*[tabindex]:not([tabindex='-1']),*[contenteditable]:not([disabled]):not([tabindex='-1'])";f._initializeSettings=function(n,t){var r=n.get_settings(),u=OSF.OUtil.getSessionStorage(),i,f;return u&&(i=u.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey()),i?r=JSON.parse(i):(i=JSON.stringify(r),u.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),i))),f=OSF.DDA.SettingsManager.deserializeSettings(r),t?new OSF.DDA.RefreshableSettings(f):new OSF.DDA.Settings(f)};e=function(n){var t=window.open;n.open=function(n,i,r){var u=null,f;try{u=t(n,i,r)}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppCommonMessage("Exception happens at windowOpen."+e)}return u||(f={strUrl:n,strWindowName:i,strWindowFeatures:r},OSF._OfficeAppFactory.getClientEndPoint()&&OSF._OfficeAppFactory.getClientEndPoint().invoke("ContextActivationManager_openWindowInHost",null,f)),u}};e(window)};OSF.InitializationHelper.prototype.saveAndSetDialogInfo=function(n){var u="IsDialog",t=!0,f=function(){var n=OSF.OUtil.parseXdmInfo(t),i;return n?(i=n.split("|"),i[1]):null},i=OSF.OUtil.getSessionStorage(),r;if(i){if(n||(n=OSF.OUtil.parseHostInfoFromWindowName(t,OSF._OfficeAppFactory.getWindowName())),n&&n.indexOf("isDialog")>-1){r=f();r!=null&&i.setItem(r+u,"true");this._hostInfo.isDialog=t;return}this._hostInfo.isDialog=i.getItem(OSF.OUtil.getXdmFieldValue(OSF.XdmFieldName.AppId,!1)+u)!=null?t:!1}};OSF.InitializationHelper.prototype.getAppContext=function(n,t){var i=this,e=i,r=function(n,i){var u,f,c,o,s,r,h;if(i._appName===OSF.AppName.ExcelWebApp){f=i._settings;u={};for(c in f)o=f[c],u[o[0]]=o[1]}else u=i._settings;if(n===0&&i._id!=undefined&&i._appName!=undefined&&i._appVersion!=undefined&&i._appUILocale!=undefined&&i._dataLocale!=undefined&&i._docUrl!=undefined&&i._clientMode!=undefined&&i._settings!=undefined&&i._reason!=undefined){e._appContext=i;var a=i._appInstanceId?i._appInstanceId:i._id,v=!1,y=!0,l=0;i._appMinorVersion!=undefined&&(l=i._appMinorVersion);s=undefined;i._requirementMatrix!=undefined&&(s=i._requirementMatrix);i.eToken=i.eToken?i.eToken:"";r=new OSF.OfficeAppContext(i._id,i._appName,i._appVersion,i._appUILocale,i._dataLocale,i._docUrl,i._clientMode,u,i._reason,i._osfControlType,i._eToken,i._correlationId,a,v,y,l,s,i._hostCustomMessage,i._hostFullVersion,i._clientWindowHeight,i._clientWindowWidth,i._addinName,i._appDomains,i._dialogRequirementMatrix);r._wacHostEnvironment=i._wacHostEnvironment||"0";r._isFromWacAutomation=!!i._isFromWacAutomation;OSF.AppTelemetry&&OSF.AppTelemetry.initialize(r);t(r)}else{h="Function ContextActivationManager_getAppContextAsync call failed. ErrorCode is "+n+", exception: "+i;OSF.AppTelemetry&&OSF.AppTelemetry.logAppException(h);throw h;}},u;try{i._hostInfo.isDialog&&window.opener!=null?(u=OfficeExt.WACUtils.parseAppContextFromWindowName(!1,OSF._OfficeAppFactory.getWindowName()),r(0,u)):i._webAppState.clientEndPoint.invoke("ContextActivationManager_getAppContextAsync",r,i._webAppState.id)}catch(f){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown when trying to invoke getAppContextAsync. Exception:["+f+"]");throw f;}};OSF.InitializationHelper.prototype.setAgaveHostCommunication=function(){var u=null,t=!1,n,r,i,f,e,o;try{if(n=this,r=OSF.OUtil.parseXdmInfoWithGivenFragment(t,OSF._OfficeAppFactory.getWindowLocationHash()),!r&&OSF._OfficeAppFactory.getWindowName&&(r=OSF.OUtil.parseXdmInfoFromWindowName(t,OSF._OfficeAppFactory.getWindowName())),r&&(i=OSF.OUtil.getInfoItems(r),i!=undefined&&i.length>=3&&(n._webAppState.conversationID=i[0],n._webAppState.id=i[1],n._webAppState.webAppUrl=i[2].indexOf(":")>=0?i[2]:decodeURIComponent(i[2]))),n._webAppState.wnd=window.opener!=u?window.opener:window.parent,f=OSF.OUtil.parseSerializerVersionWithGivenFragment(t,OSF._OfficeAppFactory.getWindowLocationHash()),isNaN(f)&&OSF._OfficeAppFactory.getWindowName&&(f=OSF.OUtil.parseSerializerVersionFromWindowName(t,OSF._OfficeAppFactory.getWindowName())),n._webAppState.serializerVersion=f,this._hostInfo.isDialog&&window.opener!=u)return;n._webAppState.clientEndPoint=Microsoft.Office.Common.XdmCommunicationManager.connect(n._webAppState.conversationID,n._webAppState.wnd,n._webAppState.webAppUrl,n._webAppState.serializerVersion);n._webAppState.serviceEndPoint=Microsoft.Office.Common.XdmCommunicationManager.createServiceEndPoint(n._webAppState.id);e=n._webAppState.conversationID+OSF.SharedConstants.NotificationConversationIdSuffix;n._webAppState.serviceEndPoint.registerConversation(e,n._webAppState.webAppUrl);o=function(i){var e="ContextActivationManager_notifyHost",r,f;switch(i){case OSF.AgaveHostAction.Select:n._webAppState.focused=!0;break;case OSF.AgaveHostAction.UnSelect:n._webAppState.focused=t;break;case OSF.AgaveHostAction.TabIn:case OSF.AgaveHostAction.CtrlF6In:window.focus();r=document.querySelectorAll(n._tabbableElements);f=OSF.OUtil.focusToFirstTabbable(r,t);f||(window.blur(),n._webAppState.focused=t,n._webAppState.clientEndPoint.invoke(e,u,[n._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable]));break;case OSF.AgaveHostAction.TabInShift:window.focus();r=document.querySelectorAll(n._tabbableElements);f=OSF.OUtil.focusToFirstTabbable(r,!0);f||(window.blur(),n._webAppState.focused=t,n._webAppState.clientEndPoint.invoke(e,u,[n._webAppState.id,OSF.AgaveHostAction.ExitNoFocusableShift]));break;default:OsfMsAjaxFactory.msAjaxDebug.trace("actionId "+i+" notifyAgave is wrong.")}};n._webAppState.serviceEndPoint.registerMethod("Office_notifyAgave",o,Microsoft.Office.Common.InvokeType.async,t);n.addOrRemoveEventListenersForWindow(!0)}catch(s){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown in setAgaveHostCommunication. Exception:["+s+"]");throw s;}};OSF.InitializationHelper.prototype.addOrRemoveEventListenersForWindow=function(n){var u="keypress",i=null,r="ContextActivationManager_notifyHost",t=this,f=function(){t._webAppState.focused||(t._webAppState.focused=!0);t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.Select])},e=function(){OSF&&(t._webAppState.focused&&(t._webAppState.focused=!1),t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.UnSelect]))},o=function(n){var u,f,e;n.preventDefault=n.preventDefault||function(){n.returnValue=!1};n.keyCode==117&&(n.ctrlKey||n.metaKey)?(u=OSF.AgaveHostAction.CtrlF6Exit,n.shiftKey&&(u=OSF.AgaveHostAction.CtrlF6ExitShift),t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,u])):n.keyCode==9?(n.preventDefault(),f=document.querySelectorAll(t._tabbableElements),e=OSF.OUtil.focusToNextTabbable(f,n.target||n.srcElement,n.shiftKey),e||(t._hostInfo.isDialog?OSF.OUtil.focusToFirstTabbable(f,n.shiftKey):n.shiftKey?t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.TabExitShift]):t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.TabExit]))):n.keyCode==27?(n.preventDefault(),t.dismissDialogNotification&&t.dismissDialogNotification(),t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.EscExit])):n.keyCode==113&&(n.preventDefault(),t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.F2Exit]))},s=function(n){n.keyCode==117&&n.ctrlKey&&(n.preventDefault?n.preventDefault():n.returnValue=!1)};n?(OSF.OUtil.addEventListener(window,"focus",f),OSF.OUtil.addEventListener(window,"blur",e),OSF.OUtil.addEventListener(window,"keydown",o),OSF.OUtil.addEventListener(window,u,s)):(OSF.OUtil.removeEventListener(window,"focus",f),OSF.OUtil.removeEventListener(window,"blur",e),OSF.OUtil.removeEventListener(window,"keydown",o),OSF.OUtil.removeEventListener(window,u,s))};OSF.InitializationHelper.prototype.initWebDialog=function(n){if(n.get_isDialog()){if(OSF.DDA.UI.ChildUI){var t=window.opener!=null;n.ui=new OSF.DDA.UI.ChildUI(t);t&&this.registerMessageReceivedEventForWindowDialog&&this.registerMessageReceivedEventForWindowDialog()}}else OSF.DDA.UI.ParentUI&&(n.ui=new OSF.DDA.UI.ParentUI,OfficeExt.Container&&OSF.DDA.DispIdHost.addAsyncMethods(n.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync]))};OSF.InitializationHelper.prototype.initWebAuth=function(n){OSF.DDA.Auth&&(n.auth=new OSF.DDA.Auth,OSF.DDA.DispIdHost.addAsyncMethods(n.auth,[OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]))};OSF.getClientEndPoint=function(){var n=OSF._OfficeAppFactory.getInitializationHelper();return n._webAppState.clientEndPoint};OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize=function(){var n=this,t,i;n._hostInfo.isDialog&&(window.focus(),t=document.querySelectorAll(n._tabbableElements),i=OSF.OUtil.focusToFirstTabbable(t,!1),i||(window.blur(),n._webAppState.focused=!1,n._webAppState.clientEndPoint&&n._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[n._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable])))},function(n){var u="ResponseTime",f="Message",i="SessionId",r="CorrelationId",t=!0,e=function(){function n(n){this._table=n;this._fields={}}return Object.defineProperty(n.prototype,"Fields",{get:function(){return this._fields},enumerable:t,configurable:t}),Object.defineProperty(n.prototype,"Table",{get:function(){return this._table},enumerable:t,configurable:t}),n.prototype.SerializeFields=function(){},n.prototype.SetSerializedField=function(n,t){typeof t!="undefined"&&t!==null&&(this._serializedFields[n]=t.toString())},n.prototype.SerializeRow=function(){var n=this;return n._serializedFields={},n.SetSerializedField("Table",n._table),n.SerializeFields(),JSON.stringify(n._serializedFields)},n}(),o,s,h,c,l;n.BaseUsageData=e;o=function(n){function u(){n.call(this,"AppActivated")}var e="IsFromWacAutomation",o="WacHostEnvironment",s="HostJSVersion",h="OfficeJSVersion",c="DocUrl",l="AppSizeHeight",a="AppSizeWidth",v="ClientId",y="HostVersion",p="Host",w="UserId",b="Browser",k="AssetId",d="AppURL",g="AppInstanceId",nt="AppId";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,nt,{get:function(){return this.Fields[nt]},set:function(n){this.Fields[nt]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,g,{get:function(){return this.Fields[g]},set:function(n){this.Fields[g]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,d,{get:function(){return this.Fields[d]},set:function(n){this.Fields[d]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,k,{get:function(){return this.Fields[k]},set:function(n){this.Fields[k]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,b,{get:function(){return this.Fields[b]},set:function(n){this.Fields[b]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,w,{get:function(){return this.Fields[w]},set:function(n){this.Fields[w]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,p,{get:function(){return this.Fields[p]},set:function(n){this.Fields[p]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,y,{get:function(){return this.Fields[y]},set:function(n){this.Fields[y]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,v,{get:function(){return this.Fields[v]},set:function(n){this.Fields[v]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,a,{get:function(){return this.Fields[a]},set:function(n){this.Fields[a]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,l,{get:function(){return this.Fields[l]},set:function(n){this.Fields[l]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,c,{get:function(){return this.Fields[c]},set:function(n){this.Fields[c]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(nt,n.AppId);n.SetSerializedField(g,n.AppInstanceId);n.SetSerializedField(d,n.AppURL);n.SetSerializedField(k,n.AssetId);n.SetSerializedField(b,n.Browser);n.SetSerializedField(w,n.UserId);n.SetSerializedField(p,n.Host);n.SetSerializedField(y,n.HostVersion);n.SetSerializedField(v,n.ClientId);n.SetSerializedField(a,n.AppSizeWidth);n.SetSerializedField(l,n.AppSizeHeight);n.SetSerializedField(f,n.Message);n.SetSerializedField(c,n.DocUrl);n.SetSerializedField(h,n.OfficeJSVersion);n.SetSerializedField(s,n.HostJSVersion);n.SetSerializedField(o,n.WacHostEnvironment);n.SetSerializedField(e,n.IsFromWacAutomation)},u}(e);n.AppActivatedUsageData=o;s=function(n){function f(){n.call(this,"ScriptLoad")}var e="StartTime",o="ScriptId";return __extends(f,n),Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t}),f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(o,n.ScriptId);n.SetSerializedField(e,n.StartTime);n.SetSerializedField(u,n.ResponseTime)},f}(e);n.ScriptLoadUsageData=s;h=function(n){function u(){n.call(this,"AppClosed")}var f="CloseMethod",e="OpenTime",o="AppSizeFinalHeight",s="AppSizeFinalWidth",h="FocusTime";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(h,n.FocusTime);n.SetSerializedField(s,n.AppSizeFinalWidth);n.SetSerializedField(o,n.AppSizeFinalHeight);n.SetSerializedField(e,n.OpenTime);n.SetSerializedField(f,n.CloseMethod)},u}(e);n.AppClosedUsageData=h;c=function(n){function f(){n.call(this,"APIUsage")}var e="ErrorType",o="Parameters",s="APIID",h="APIType";return __extends(f,n),Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(h,n.APIType);n.SetSerializedField(s,n.APIID);n.SetSerializedField(o,n.Parameters);n.SetSerializedField(u,n.ResponseTime);n.SetSerializedField(e,n.ErrorType)},f}(e);n.APIUsageUsageData=c;l=function(n){function u(){n.call(this,"AppInitialization")}var e="SuccessCode";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(e,n.SuccessCode);n.SetSerializedField(f,n.Message)},u}(e);n.AppInitializationUsageData=l}(OSFLog||(OSFLog={})),function(n){"use strict";function u(){OSF.Logger&&OSF.Logger.ulsEndpoint&&OSF.Logger.ulsEndpoint.loadProxyFrame()}function f(n,t,i){if(OSF.Logger&&OSF.Logger.ulsEndpoint){var r={traceLevel:n,message:t,flag:i,internalLog:!0},u=JSON.stringify(r);OSF.Logger.ulsEndpoint.writeLog(u)}}function e(){try{return new t}catch(n){return null}}var i,r,t;(function(n){n[n.info=0]="info";n[n.warning=1]="warning";n[n.error=2]="error"})(n.TraceLevel||(n.TraceLevel={}));i=n.TraceLevel,function(n){n[n.none=0]="none";n[n.flush=1]="flush"}(n.SendFlag||(n.SendFlag={}));r=n.SendFlag;n.allowUploadingData=u;n.sendLog=f;t=function(){function n(){var n=this,t=n;n.proxyFrame=null;n.telemetryEndPoint="https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html";n.buffer=[];n.proxyFrameReady=!1;OSF.OUtil.addEventListener(window,"message",function(n){return t.tellProxyFrameReady(n)});setTimeout(function(){t.loadProxyFrame()},3e3)}return n.prototype.writeLog=function(t){var i=this;i.proxyFrameReady===!0?i.proxyFrame.contentWindow.postMessage(t,n.telemetryOrigin):i.buffer.length<128&&i.buffer.push(t)},n.prototype.loadProxyFrame=function(){var n=this;n.proxyFrame==null&&(n.proxyFrame=document.createElement("iframe"),n.proxyFrame.setAttribute("style","display:none"),n.proxyFrame.setAttribute("src",n.telemetryEndPoint),document.head.appendChild(n.proxyFrame))},n.prototype.tellProxyFrameReady=function(t){var i=this,e=i,r,u,f;if(t.data==="ProxyFrameReadyToLog"){for(i.proxyFrameReady=!0,r=0;r40)&&(n=OSF.OUtil.Guid.generateNewGuid(),t.setValue(t.clientIDKey,n)),n},n.prototype.saveLog=function(n,t){var i=this,u=i.getValue(i.logIdSetKey);u=(u&&u.length>0?u+";":r)+n;i.setValue(i.logIdSetKey,u);i.setValue(n,t)},n.prototype.enumerateLog=function(n,t){var i=this,e=i.getValue(i.logIdSetKey),u,o,r,f;if(e){u=e.split(";");for(o in u)r=u[o],f=i.getValue(r),f&&(n&&n(r,f),t&&i.remove(r));t&&i.remove(i.logIdSetKey)}},n.prototype.getValue=function(n){var t=OSF.OUtil.getLocalStorage(),i=r;return t&&(i=t.getItem(n)),i},n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)},n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}},n}(),o=function(){function t(){}return t.prototype.LogData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(t)}catch(i){}},t.prototype.LogRawData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(t))}catch(i){}},t}();n.initialize=y;n.onAppActivated=p;n.onScriptDone=w;n.onCallDone=b;n.onMethodDone=k;n.onPropertyDone=d;n.onEventDone=g;n.onRegisterDone=nt;n.onAppClosed=tt;n.setOsfControlAppCorrelationId=it;n.doAppInitializationLogging=l;n.logAppCommonMessage=rt;n.logAppException=ut;OSF.AppTelemetry=n}(OSFAppTelemetry||(OSFAppTelemetry={}));Microsoft.Office.WebExtension.TableData=function(n,t){function i(n){if(n==null||n==undefined)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(n,2);t<2;t++)n=[n];return n}catch(i){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(n){t=i(n)}},rows:{get:function(){return n},set:function(t){n=t==null||OSF.OUtil.isArray(t)&&t.length==0?[]:i(t)}}});this.headers=t;this.rows=n};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(n){return new Microsoft.Office.WebExtension.TableData(n[OSF.DDA.TableDataProperties.TableRows],n[OSF.DDA.TableDataProperties.TableHeaders])};Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var n=null;return{findArrayDimensionality:function(n){if(OSF.OUtil.isArray(n)){for(var t=0,i=0;i0)for(r in i)if(i[r]===t)return!0;return!1},hasObjectEventHandler:function(n,t,i){var f=this._objectEventHandlers[n],r,u;if(f!=null)for(r=f[t],u=0;r!=null&&u0)for(r=0;r0?(this._eventHandlers[n]=[],!0):!1},clearObjectEventHandlers:function(n,t){return this._objectEventHandlers[n]!=null&&this._objectEventHandlers[n][t]!=null?(this._objectEventHandlers[n][t]=[],!0):!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},getObjectEventHandlerCount:function(n,t){return this._objectEventHandlers[n]==null||this._objectEventHandlers[n][t]==null?0:this._objectEventHandlers[n][t].length},fireEvent:function(n){var t,i,r;if(n.type==undefined)return!1;if(t=n.type,t&&this._eventHandlers[t]){i=this._eventHandlers[t];for(r in i)i[r](n);return!0}else return!1},fireObjectEvent:function(n,t){var i,f,r,u;if(t.type==undefined)return!1;if(i=t.type,i&&this._objectEventHandlers[i]&&(f=this._objectEventHandlers[i],r=f[n],r!=null)){for(u=0;u0)){for(r=t[0];i.length>0;)u=i.shift(),r(u);return!0}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var f="outlook",e="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(n,i[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:r=new OSF.DDA.RichApiMessageEventArgs(n,i);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i),t.initialize(r.initialData),OSF._OfficeAppFactory.getHostInfo().hostPlatform=="win32"&&t.setCurrentItemNumber(r.itemNumber.itemNumber);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkRecipientsChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogParentMessageReceivedEvent:"DialogParentMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogParentMessageReceived:"dialogParentMessageReceived",DialogParentEventReceived:"dialogParentEventReceived"});OSF.DialogParentMessageEventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived,Microsoft.Office.WebExtension.EventType.DialogParentEventReceived]);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType,{Image:"image"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType,{Ooxml:"ooxml"});OSF.DDA.DataPartProperties={Id:Microsoft.Office.WebExtension.Parameters.Id,BuiltIn:"DataPartBuiltIn"};OSF.DDA.DataNodeProperties={Handle:"DataNodeHandle",BaseName:"DataNodeBaseName",NamespaceUri:"DataNodeNamespaceUri",NodeType:"DataNodeType"};OSF.DDA.DataNodeEventProperties={OldNode:"OldNode",NewNode:"NewNode",NextSiblingNode:"NextSiblingNode",InUndoRedo:"InUndoRedo"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{DataPartProperties:"DataPartProperties",DataNodeProperties:"DataNodeProperties"});OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{DataPartList:"DataPartList",DataNodeList:"DataNodeList"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.DataPartList,OSF.DDA.PropertyDescriptors.DataPartProperties);OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.DataNodeList,OSF.DDA.PropertyDescriptors.DataNodeProperties);OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DataNodeInsertedEvent:"DataNodeInsertedEvent",DataNodeReplacedEvent:"DataNodeReplacedEvent",DataNodeDeletedEvent:"DataNodeDeletedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DataNodeDeleted:"nodeDeleted",DataNodeInserted:"nodeInserted",DataNodeReplaced:"nodeReplaced",NodeDeleted:"nodeDeleted",NodeInserted:"nodeInserted",NodeReplaced:"nodeReplaced"});OSF.DDA.CustomXmlParts=function(){this._eventDispatches=[];var n=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[n.AddDataPartAsync,n.GetDataPartByIdAsync,n.GetDataPartsByNameSpaceAsync])};OSF.DDA.CustomXmlPart=function(n,t,i){var u,e,r,f;OSF.OUtil.defineEnumerableProperties(this,{builtIn:{value:i},id:{value:t},namespaceManager:{value:new OSF.DDA.CustomXmlPrefixMappings(t)}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.DeleteDataPartAsync,u.GetPartNodesAsync,u.GetPartXmlAsync]);e=n._eventDispatches;r=e[t];r||(f=Microsoft.Office.WebExtension.EventType,r=new OSF.EventDispatch([f.DataNodeDeleted,f.DataNodeInserted,f.DataNodeReplaced]),e[t]=r);OSF.DDA.DispIdHost.addEventSupport(this,r)};OSF.DDA.CustomXmlPrefixMappings=function(n){var t=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[t.AddDataPartNamespaceAsync,t.GetDataPartNamespaceAsync,t.GetDataPartPrefixAsync],n)};OSF.DDA.CustomXmlNode=function(n,t,i,r){OSF.OUtil.defineEnumerableProperties(this,{baseName:{value:r},namespaceUri:{value:i},nodeType:{value:t}});var u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.GetRelativeNodesAsync,u.GetNodeValueAsync,u.GetNodeXmlAsync,u.SetNodeValueAsync,u.SetNodeXmlAsync,u.GetNodeTextAsync,u.SetNodeTextAsync],n)};OSF.DDA.NodeInsertedEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DataNodeInserted},newNode:{value:n},inUndoRedo:{value:t}})};OSF.DDA.NodeReplacedEventArgs=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DataNodeReplaced},oldNode:{value:n},newNode:{value:t},inUndoRedo:{value:i}})};OSF.DDA.NodeDeletedEventArgs=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DataNodeDeleted},oldNode:{value:n},oldNextSibling:{value:t},inUndoRedo:{value:i}})};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureDataNode=function(n){if(n)return new OSF.DDA.CustomXmlNode(n[OSF.DDA.DataNodeProperties.Handle],n[OSF.DDA.DataNodeProperties.NodeType],n[OSF.DDA.DataNodeProperties.NamespaceUri],n[OSF.DDA.DataNodeProperties.BaseName])};OSF.DDA.OMFactory.manufactureDataPart=function(n,t){return new OSF.DDA.CustomXmlPart(t,n[OSF.DDA.DataPartProperties.Id],n[OSF.DDA.DataPartProperties.BuiltIn])};OSF.DDA.AsyncMethodNames.addNames({AddDataPartAsync:"addAsync",GetDataPartByIdAsync:"getByIdAsync",GetDataPartsByNameSpaceAsync:"getByNamespaceAsync",DeleteDataPartAsync:"deleteAsync",GetPartNodesAsync:"getNodesAsync",GetPartXmlAsync:"getXmlAsync",AddDataPartNamespaceAsync:"addNamespaceAsync",GetDataPartNamespaceAsync:"getNamespaceAsync",GetDataPartPrefixAsync:"getPrefixAsync",GetRelativeNodesAsync:"getNodesAsync",GetNodeValueAsync:"getNodeValueAsync",GetNodeXmlAsync:"getXmlAsync",SetNodeValueAsync:"setNodeValueAsync",SetNodeXmlAsync:"setXmlAsync",GetNodeTextAsync:"getTextAsync",SetNodeTextAsync:"setTextAsync"}),function(){function r(n){return OSF.DDA.OMFactory.manufactureDataPart(n,Microsoft.Office.WebExtension.context.document.customXmlParts)}function e(n){return OSF.DDA.OMFactory.manufactureDataNode(n)}function i(n){var t=n[Microsoft.Office.WebExtension.Parameters.Data];return t==undefined?null:t}function u(n){return n.id}function f(n,t){return t}function t(n,t){return t}var n="string";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddDataPartAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Xml,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartsByNameSpaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.DataPartList],r)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteDataPartAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:u}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetPartNodesAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.XPath,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:u}],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.DataNodeList],e)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetPartXmlAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:u}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddDataPartNamespaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Prefix,types:[n]},{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:f}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartNamespaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Prefix,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:f}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartPrefixAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:f}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetRelativeNodesAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.XPath,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.DataNodeList],e)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetNodeValueAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetNodeXmlAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetNodeValueAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetNodeXmlAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Xml,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetNodeTextAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetNodeTextAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Text,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}]})}();OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.DDA.Marshaling.CustomXmlPartsKeys={Id:"id",Namespace:"namespace",Xml:"xml",XPath:"xpath",Prefix:"prefix"};OSF.DDA.Marshaling.DataPartProperties={Id:"id",BuiltIn:"DataPartBuiltIn"};OSF.DDA.Marshaling.PropertyDescriptors={DataPartProperties:"DataPartProperties",DataNodeProperties:"DataNodeProperties"};OSF.DDA.Marshaling.DataNodeProperties={Handle:"DataNodeHandle",BaseName:"DataNodeBaseName",NamespaceUri:"DataNodeNamespaceUri",NodeType:"DataNodeType"};OSF.DDA.Marshaling.ListDescriptors={DataPartList:"DataPartList",DataNodeList:"DataNodeList"};OSF.DDA.Marshaling.DataNodeEventProperties={OldNode:"OldNode",NewNode:"NewNode",NextSiblingNode:"NextSiblingNode",InUndoRedo:"InUndoRedo"};OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.DataPartProperties,fromHost:[{name:OSF.DDA.DataPartProperties.Id,value:OSF.DDA.Marshaling.DataPartProperties.Id},{name:OSF.DDA.DataPartProperties.BuiltIn,value:OSF.DDA.Marshaling.DataPartProperties.BuiltIn}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.DataNodeProperties,fromHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle},{name:OSF.DDA.DataNodeProperties.BaseName,value:OSF.DDA.Marshaling.DataNodeProperties.BaseName},{name:OSF.DDA.DataNodeProperties.NamespaceUri,value:OSF.DDA.Marshaling.DataNodeProperties.NamespaceUri},{name:OSF.DDA.DataNodeProperties.NodeType,value:OSF.DDA.Marshaling.DataNodeProperties.NodeType}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DataNodeInsertedEvent,fromHost:[{name:OSF.DDA.DataNodeEventProperties.InUndoRedo,value:OSF.DDA.Marshaling.DataNodeEventProperties.InUndoRedo},{name:OSF.DDA.DataNodeEventProperties.NewNode,value:OSF.DDA.Marshaling.DataNodeEventProperties.NewNode}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DataNodeReplacedEvent,fromHost:[{name:OSF.DDA.DataNodeEventProperties.InUndoRedo,value:OSF.DDA.Marshaling.DataNodeEventProperties.InUndoRedo},{name:OSF.DDA.DataNodeEventProperties.OldNode,value:OSF.DDA.Marshaling.DataNodeEventProperties.OldNode},{name:OSF.DDA.DataNodeEventProperties.NewNode,value:OSF.DDA.Marshaling.DataNodeEventProperties.NewNode}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DataNodeDeletedEvent,fromHost:[{name:OSF.DDA.DataNodeEventProperties.InUndoRedo,value:OSF.DDA.Marshaling.DataNodeEventProperties.InUndoRedo},{name:OSF.DDA.DataNodeEventProperties.OldNode,value:OSF.DDA.Marshaling.DataNodeEventProperties.OldNode},{name:OSF.DDA.DataNodeEventProperties.NextSiblingNode,value:OSF.DDA.Marshaling.DataNodeEventProperties.NextSiblingNode}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.DataNodeEventProperties.OldNode,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataNodeProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.DataNodeEventProperties.NewNode,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataNodeProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.DataNodeEventProperties.NextSiblingNode,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataNodeProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddDataPartMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataPartProperties,value:OSF.DDA.Marshaling.PropertyDescriptors.DataPartProperties}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Xml,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Xml}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartByIdMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataPartProperties,value:OSF.DDA.Marshaling.PropertyDescriptors.DataPartProperties}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Id}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartsByNamespaceMethod,fromHost:[{name:OSF.DDA.ListDescriptors.DataPartList,value:OSF.DDA.Marshaling.ListDescriptors.DataPartList}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Namespace}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartXmlMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Id}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartNodesMethod,fromHost:[{name:OSF.DDA.ListDescriptors.DataNodeList,value:OSF.DDA.Marshaling.ListDescriptors.DataNodeList}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Id},{name:Microsoft.Office.WebExtension.Parameters.XPath,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.XPath}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidDeleteDataPartMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Id}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodeValueMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodeXmlMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodeTextMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodesMethod,fromHost:[{name:OSF.DDA.ListDescriptors.DataNodeList,value:OSF.DDA.Marshaling.ListDescriptors.DataNodeList}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle},{name:Microsoft.Office.WebExtension.Parameters.XPath,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.XPath}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetDataNodeValueMethod,toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle},{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetDataNodeXmlMethod,toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle},{name:Microsoft.Office.WebExtension.Parameters.Xml,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Xml}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetDataNodeTextMethod,toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle},{name:Microsoft.Office.WebExtension.Parameters.Text,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Text}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddDataNamespaceMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.DataPartProperties.Id},{name:Microsoft.Office.WebExtension.Parameters.Prefix,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Prefix},{name:Microsoft.Office.WebExtension.Parameters.Namespace,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Namespace}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataUriByPrefixMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.DataPartProperties.Id},{name:Microsoft.Office.WebExtension.Parameters.Prefix,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Prefix}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPrefixByUriMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.DataPartProperties.Id},{name:Microsoft.Office.WebExtension.Parameters.Namespace,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Namespace}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDataNodeAddedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DataNodeInsertedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDataNodeReplacedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DataNodeReplacedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDataNodeDeletedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DataNodeDeletedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.AsyncMethodNames.addNames({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync"}),function(){function r(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&r&&(r[OSF.DDA.TableDataProperties.TableRows]!=undefined||r[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(r=OSF.DDA.OMFactory.manufactureTableData(r)),r=OSF.DDA.DataCoercion.coerceData(r,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),r==undefined?null:r}var i=!1,n="boolean",t="number";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,"enum":Microsoft.Office.WebExtension.CoercionType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}}],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object",t,n]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[t,n],defaultValue:i}}],privateStateCallbacks:[]})}();OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.GetData,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:"BindingId"},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:"CoerceType"},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:"ValueFormat"},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:"FilterType"},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:"Rows"},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:"Columns"},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:"StartRow"},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:"StartCol"},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:"RowCount"},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:"ColCount"}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.SetData,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:"BindingId"},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:"CoerceType"},{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:"Rows"},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:"Columns"},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:"StartRow"},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:"StartCol"},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:"ImageLeft"},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:"ImageTop"},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:"ImageWidth"},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:"ImageHeight"}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.GetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",RefreshingSettings:"refreshingSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(n){return OSF.OUtil.serializeSettings(n)},deserializeSettings:function(n){return OSF.OUtil.deserializeSettings(n)}};OSF.DDA.Settings=function(n){var t="name",i;n=n||{};i=function(n){var i=OSF.OUtil.getSessionStorage(),t,r;i&&(t=OSF.DDA.SettingsManager.serializeSettings(n),r=JSON?JSON.stringify(t):Sys.Serialization.JavaScriptSerializer.serialize(t),i.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),r))};OSF.OUtil.defineEnumerableProperties(this,{get:{value:function(i){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]),r;if(u)throw u;return r=n[i],typeof r=="undefined"?null:r}},set:{value:function(r,u){var f=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1},{name:"value",mayBeNull:!0}]);if(f)throw f;n[r]=u;i(n)}},remove:{value:function(r){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]);if(u)throw u;delete n[r];i(n)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],n)};OSF.DDA.RefreshableSettings=function(n){OSF.DDA.RefreshableSettings.uber.constructor.call(this,n);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],n);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:n}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(n,t){return t}}],onSucceeded:function(n,t,i){var f=n[OSF.DDA.SettingsManager.SerializedSettings],u=OSF.DDA.SettingsManager.deserializeSettings(f),e=i[OSF.DDA.SettingsManager.RefreshingSettings];for(var r in e)t.remove(r);for(r in u)t.set(r,u[r]);return t}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(n,t){return OSF.DDA.SettingsManager.serializeSettings(t)}}]});OSF.DDA.WAC.SettingsTranslator=function(){var n=0,t=1;return{read:function(i){var u={},f=i.Settings,e,r;for(e in f)r=f[e],u[r[n]]=r[t];return u},write:function(i){var f=[],u,r;for(u in i)r=[],r[n]=u,r[t]=i[u],f.push(r);return f}}}();OSF.DDA.WAC.Delegate.ParameterMap.setDynamicType(OSF.DDA.SettingsManager.SerializedSettings,{toHost:OSF.DDA.WAC.SettingsTranslator.write,fromHost:OSF.DDA.WAC.SettingsTranslator.read});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.SettingsRequest,toHost:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:"OverwriteIfStale"},{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.WAC.UniqueArguments.Properties}],invertible:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.WAC.UniqueArguments.Properties}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SettingsRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"});OSF.DDA.DocumentSelectionChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:n}})};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDeleted:"objectDeleted"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectSelectionChanged:"objectSelectionChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDataChanged:"objectDataChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ContentControlAdded:"contentControlAdded"});OSF.DDA.ObjectEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:n},object:{value:t}})};OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent});OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(n){OSF.OUtil.defineEnumerableProperties(this,{url:{value:n[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(n){return new Microsoft.Office.WebExtension.FileProperties(n)}});OSF.OUtil.setNamespace("Marshaling",OSF.DDA),function(n){var t="Properties";n[n[t]=0]=t;n[n.Url=1]="Url"}(OSF_DDA_Marshaling_FilePropertiesKeys||(OSF_DDA_Marshaling_FilePropertiesKeys={}));OSF.DDA.Marshaling.FilePropertiesKeys=OSF_DDA_Marshaling_FilePropertiesKeys;OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,fromHost:[{name:OSF.DDA.FilePropertiesDescriptor.Url,value:OSF.DDA.Marshaling.FilePropertiesKeys.Url}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:OSF.DDA.Marshaling.FilePropertiesKeys.Properties}]});Microsoft.Office.WebExtension.FileType={Text:"text",Compressed:"compressed",Pdf:"pdf"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FileProperties:"FileProperties",FileSliceProperties:"FileSliceProperties"});OSF.DDA.FileProperties={Handle:"FileHandle",FileSize:"FileSize",SliceSize:Microsoft.Office.WebExtension.Parameters.SliceSize};OSF.DDA.File=function(n,t,i){var r,u;OSF.OUtil.defineEnumerableProperties(this,{size:{value:t},sliceCount:{value:Math.ceil(t/i)}});r={};r[OSF.DDA.FileProperties.Handle]=n;r[OSF.DDA.FileProperties.SliceSize]=i;u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.GetDocumentCopyChunkAsync,u.ReleaseDocumentCopyAsync],r)};OSF.DDA.FileSliceOffset="fileSliceoffset";OSF.DDA.AsyncMethodNames.addNames({GetDocumentCopyAsync:"getFileAsync",GetDocumentCopyChunkAsync:"getSliceAsync",ReleaseDocumentCopyAsync:"closeAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FileType,"enum":Microsoft.Office.WebExtension.FileType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:{types:["number"],defaultValue:4194304}}],checkCallArgs:function(n){var t=n[Microsoft.Office.WebExtension.Parameters.SliceSize];if(t<=0||t>4194304)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return n},onSucceeded:function(n,t,i){return new OSF.DDA.File(n[OSF.DDA.FileProperties.Handle],n[OSF.DDA.FileProperties.FileSize],i[Microsoft.Office.WebExtension.Parameters.SliceSize])}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(n,t){return t[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(r<0||r>=t.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;return n[OSF.DDA.FileSliceOffset]=parseInt((r*i[OSF.DDA.FileProperties.SliceSize]).toString()),n},onSucceeded:function(n,t,i){var r={};return OSF.OUtil.defineEnumerableProperties(r,{data:{value:n[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:i[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:n[OSF.DDA.FileProperties.SliceSize]}}),r}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}}]});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("File",OSF.DDA.Marshaling),function(n){var t="FileSize";n[n.Handle=0]="Handle";n[n[t]=1]=t}(OSF_DDA_Marshaling_File_FilePropertiesKeys||(OSF_DDA_Marshaling_File_FilePropertiesKeys={}));OSF.DDA.Marshaling.File.FilePropertiesKeys=OSF_DDA_Marshaling_File_FilePropertiesKeys,function(n){var t="SliceSize";n[n.Data=0]="Data";n[n[t]=1]=t}(OSF_DDA_Marshaling_File_SlicePropertiesKeys||(OSF_DDA_Marshaling_File_SlicePropertiesKeys={}));OSF.DDA.Marshaling.File.SlicePropertiesKeys=OSF_DDA_Marshaling_File_SlicePropertiesKeys,function(n){var t="Compressed";n[n.Text=0]="Text";n[n[t]=1]=t;n[n.Pdf=2]="Pdf"}(OSF_DDA_Marshaling_File_FileType||(OSF_DDA_Marshaling_File_FileType={}));OSF.DDA.Marshaling.File.FileType=OSF_DDA_Marshaling_File_FileType,function(n){var t="SliceIndex",i="SliceSize",r="FileType";n[n[r]=0]=r;n[n[i]=1]=i;n[n.Handle=2]="Handle";n[n[t]=3]=t}(OSF_DDA_Marshaling_File_ParameterKeys||(OSF_DDA_Marshaling_File_ParameterKeys={}));OSF.DDA.Marshaling.File.ParameterKeys=OSF_DDA_Marshaling_File_ParameterKeys;OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FileProperties);OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FileSliceProperties);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.FilePropertiesKeys.Handle},{name:OSF.DDA.FileProperties.FileSize,value:OSF.DDA.Marshaling.File.FilePropertiesKeys.FileSize}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.Marshaling.File.SlicePropertiesKeys.Data},{name:OSF.DDA.FileProperties.SliceSize,value:OSF.DDA.Marshaling.File.SlicePropertiesKeys.SliceSize}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:OSF.DDA.Marshaling.File.FileType.Text},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:OSF.DDA.Marshaling.File.FileType.Compressed},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:OSF.DDA.Marshaling.File.FileType.Pdf}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:OSF.DDA.Marshaling.File.ParameterKeys.FileType},{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:OSF.DDA.Marshaling.File.ParameterKeys.SliceSize}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.ParameterKeys.Handle},{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,value:OSF.DDA.Marshaling.File.ParameterKeys.SliceIndex}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.ParameterKeys.Handle}]});OSF.DDA.AsyncMethodNames.addNames({ExecuteRichApiRequestAsync:"executeRichApiRequestAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[]});OSF.OUtil.setNamespace("RichApi",OSF.DDA);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidExecuteRichApiRequestMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.ArrayData}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}]}),function(n){var t;(function(t){var u=function(){function r(){var n=this,t=n;n._pseudoDocument=u;n._eventDispatch=u;n._processAppCommandInvocation=function(n){var i=t._verifyManifestCallback(n.callbackName),r;if(i.errorCode!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){t._invokeAppCommandCompletedMethod(n.appCommandId,i.errorCode,"");return}r=t._constructEventObjectForCallback(n);r?window.setTimeout(function(){i.callback(r)},0):t._invokeAppCommandCompletedMethod(n.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"")}}var f="object",e="string",u=null;return r.initializeOsfDda=function(){OSF.DDA.AsyncMethodNames.addNames({AppCommandInvocationCompletedAsync:"appCommandInvocationCompletedAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[e]},{name:Microsoft.Office.WebExtension.Parameters.Status,types:["number"]},{name:Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData,types:[e]}]});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{AppCommandInvokedEvent:"AppCommandInvokedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppCommandInvoked:"appCommandInvoked"});OSF.OUtil.setNamespace("AppCommand",OSF.DDA);OSF.DDA.AppCommand.AppCommandInvokedEventArgs=n.AppCommand.AppCommandInvokedEventArgs},r.prototype.initializeAndChangeOnce=function(n){var i=this,r;t.registerDdaFacade();i._pseudoDocument={};OSF.DDA.DispIdHost.addAsyncMethods(i._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync]);i._eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked]);r=function(t){n&&(t.status=="succeeded"?n(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):n(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError))};OSF.DDA.DispIdHost.addEventSupport(i._pseudoDocument,i._eventDispatch);i._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,i._processAppCommandInvocation,r)},r.prototype._verifyManifestCallback=function(n){var s="function",e={callback:u,errorCode:OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback},o;n=n.trim();try{for(var t=n.split("."),i=window,r=0;r100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99),n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1),!n[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99),n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("Dialog",OSF.DDA.Marshaling);OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys={MessageType:"messageType",MessageContent:"messageContent"};OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys={MessageType:"messageType",MessageContent:"messageContent"};OSF.DDA.Marshaling.MessageParentKeys={MessageToParent:"messageToParent"};OSF.DDA.Marshaling.DialogNotificationShownEventType={DialogNotificationShown:"dialogNotificationShown"};OSF.DDA.Marshaling.SendMessageKeys={MessageContent:"messageContent"},function(n){var t;(function(n){function r(n){switch(n){case t.Excel:case t.Word:case t.PowerPoint:case t.Outlook:return new i;default:return new i}return null}var t={Excel:"excel",Word:"word",PowerPoint:"powerpoint",Outlook:"outlook"},i;n.getDialogCssManager=r;i=function(){function n(){var r="height: 100px",t="font-size: 14px",i="font-family: Segoe UI,Arial,Verdana,sans-serif",u="margin: 20px 14px",f="width: 100%",e="position: absolute",n=this;n.overlayElementCSS=[e,"top: 0","left: 0",f,"height: 100%","background-color: rgba(198, 198, 198, 0.5)","z-index: 99998"];n.dialogNotificationPanelCSS=[f,"height: 190px",e,"z-index: 99999","background-color: rgba(255, 255, 255, 1)","left: 0px","top: 50%","margin-top: -95px"];n.newWindowNotificationTextPanelCSS=[u,i,t,r,"line-height: 100px"];n.newWindowNotificationTextSpanCSS=["display: inline-block","line-height: normal","vertical-align: middle"];n.crossZoneNotificationTextPanelCSS=[u,i,t,r];n.dialogNotificationButtonPanelCSS="margin:0px 9px";n.buttonStyleCSS=["text-align: center","width: 70px","height: 25px",t,i,"margin: 0px 5px","border-width: 1px","border-style: solid"]}var t=";";return n.prototype.getOverlayElementCSS=function(){return this.overlayElementCSS.join(t)},n.prototype.getDialogNotificationPanelCSS=function(){return this.dialogNotificationPanelCSS.join(t)},n.prototype.getNewWindowNotificationTextPanelCSS=function(){return this.newWindowNotificationTextPanelCSS.join(t)},n.prototype.getNewWindowNotificationTextSpanCSS=function(){return this.newWindowNotificationTextSpanCSS.join(t)},n.prototype.getCrossZoneNotificationTextPanelCSS=function(){return this.crossZoneNotificationTextPanelCSS.join(t)},n.prototype.getDialogNotificationButtonPanelCSS=function(){return this.dialogNotificationButtonPanelCSS},n.prototype.getDialogButtonCSS=function(){return this.buttonStyleCSS.join(t)},n}();n.DefaultDialogCSSManager=i})(t=n.WacCommonUICssManager||(n.WacCommonUICssManager={}))}(OfficeExt||(OfficeExt={})),function(n){var t;(function(t){var i;(function(t){function gt(n){var t=n.input;t!=i&&(y={HostButtonBorderColor:t[OSF.HostThemeButtonStyleKeys.ButtonBorderColor],HostButtonBackgroundColor:t[OSF.HostThemeButtonStyleKeys.ButtonBackgroundColor]});n.completed()}function ni(n){OSF._OfficeAppFactory.getInitializationHelper().addOrRemoveEventListenersForWindow(r);n.completed()}function ti(t){try{if(OSF._OfficeAppFactory.getInitializationHelper()._appContext._skipNewWindowNotification){vt(t);return}k=r;var c=r,y=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo,s=n.WacCommonUICssManager.getDialogCssManager(y.hostType),p=OSF.OUtil.formatString(Strings.OfficeOM.L_ShowWindowDialogNotification,OSF._OfficeAppFactory.getInitializationHelper()._appContext._addinName);o=yt(s);document.body.insertBefore(o,document.body.firstChild);f=si(s,p);f.id=lt;var l=pt(s),i=rt(s,Strings.OfficeOM.L_ShowWindowDialogNotificationAllow),u=rt(s,Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore);l.appendChild(i);l.appendChild(u);f.appendChild(l);document.body.insertBefore(f,document.body.firstChild);i.onclick=function(){vt(t);k||w()};function v(){function n(n){et();wt(n);e(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore)}h.onComplete=n;OSF.DDA.WAC.Delegate.unregisterEventAsync(h)}u.onclick=v;i.addEventListener(a,function(n){n.shiftKey&&n.keyCode==9&&(ft(i),ut(u),u.focus(),n.preventDefault(),n.stopPropagation())},r);u.addEventListener(a,function(n){n.shiftKey||n.keyCode!=9?n.keyCode==13&&(c=!0,n.preventDefault(),n.stopPropagation()):(ft(u),ut(i),i.focus(),n.preventDefault(),n.stopPropagation())},r);u.addEventListener("keyup",function(n){n.keyCode==13&&c&&(c=r,v(),n.preventDefault(),n.stopPropagation())},r);window.focus();function b(){i.focus()}h.onComplete=b;OSF.DDA.WAC.Delegate.registerEventAsync(h)}catch(d){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at new window dialog."+d);e(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)}}function ii(n){var t,r;try{if(u!=i){if(t=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains,t)for(r=0;r-1?window.close():(t=n.data,r=typeof t,t&&(r=="object"||r==c)&&(r==c&&(t=JSON.parse(t)),u=OSF.DDA.OMFactory.manufactureEventArgs(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived,i,t),OSF.DialogParentMessageEventDispatch.fireEvent(u))))}window.addEventListener(l,n)}function ei(n,t){v=n;e=t}function oi(){try{f&&f.id==lt&&e&&e(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore)}catch(n){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during executing displayDialogAsync callback."+n)}w()}function at(t,i){var s=r,e=n.WacCommonUICssManager.getDialogCssManager(i),h,u;o=yt(e);document.body.insertBefore(o,document.body.firstChild);f=hi(e,t);f.id=dt;h=pt(e);u=rt(e,Strings.OfficeOM.L_DialogOK?Strings.OfficeOM.L_DialogOK:"OK");h.appendChild(u);f.appendChild(h);document.body.insertBefore(f,document.body.firstChild);k=!0;u.onclick=function(){w()};u.addEventListener(a,function(n){n.keyCode==9?(document.getElementById(g).focus(),n.preventDefault(),n.stopPropagation()):n.keyCode==13&&(s=!0,n.preventDefault(),n.stopPropagation())},r);u.addEventListener("keyup",function(n){n.keyCode==13&&s&&(s=r,w(),n.preventDefault(),n.stopPropagation())},r);document.getElementById(g).addEventListener(a,function(n){n.keyCode==9&&(u.focus(),n.preventDefault(),n.stopPropagation())},r);window.focus();u.focus()}function tt(n){if(n.source==u)try{var t={};t[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogMessageReceived;t[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent]=n.data;v(t)}catch(i){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during receive message handler."+i)}}function it(n){var i=OSF._OfficeAppFactory.getInitializationHelper()._webAppState.id+st,t;if(n.key==i)try{t={};t[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogMessageReceived;t[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent]=n.newValue;v(t)}catch(r){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during storage changed handler."+r)}}function vt(t){function nt(){try{if(u==i||u.closed){window.clearInterval(d);p?window.removeEventListener(b,it):window.removeEventListener(l,tt);var n={};n[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogClosed;v(n)}}catch(t){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during check or handle window close."+t)}}var r=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo,y=[r.hostType,r.hostPlatform,r.hostSpecificFileVersion,r.hostLocale,r.osfControlAppCorrelationId,"isDialog"],h=y.join("|"),s=OSF._OfficeAppFactory.getInitializationHelper()._appContext,f=t[OSF.ShowWindowDialogParameterKeys.Url],o;f=n.WACUtils.addHostInfoAsQueryParam(f,h);o=JSON.parse(window.name);o[OSF.WindowNameItemKeys.HostInfo]=h;o[OSF.WindowNameItemKeys.AppContext]=s;var c=t[OSF.ShowWindowDialogParameterKeys.Width]*screen.width/100,a=t[OSF.ShowWindowDialogParameterKeys.Height]*screen.height/100,w=s._clientWindowWidth/2-c/2,k=s._clientWindowHeight/2-a/2,g="width="+c+", height="+a+", left="+w+", top="+k+",channelmode=no,directories=no,fullscreen=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=yes,toolbar=no";if(u=window.open(f,n.WACUtils.serializeObjectToString(o),g),u==i){OSF.AppTelemetry.logAppCommonMessage("Encountered cross zone issue in displayDialogAsync api.");et();at(f,r.hostType);e(OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone);return}p?window.addEventListener(b,it):window.addEventListener(l,tt);d=window.setInterval(nt,1e3);e!=i?e(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("showDialogCallback can not be null.")}function rt(n,t){var i=document.createElement("input"),r,u;return i.setAttribute("type","button"),i.style.cssText=n.getDialogButtonCSS(),i.style.borderColor=ht,i.style.backgroundColor=ct,i.setAttribute("value",t),r=function(){ut(i)},u=function(){ft(i)},i.addEventListener("mouseover",r),i.addEventListener("focus",r),i.addEventListener("mouseout",u),i.addEventListener("focusout",u),i}function ut(n){y!=i?(n.style.borderColor=y.HostButtonBorderColor,n.style.backgroundColor=y.HostButtonBackgroundColor):OSF.CommonUI&&OSF.CommonUI.HostButtonBorderColor&&OSF.CommonUI.HostButtonBackgroundColor?(n.style.borderColor=OSF.CommonUI.HostButtonBorderColor,n.style.backgroundColor=OSF.CommonUI.HostButtonBackgroundColor):n.style.backgroundColor=kt}function ft(n){n.style.borderColor=ht;n.style.backgroundColor=ct}function w(){function n(n){et();wt(n)}h.onComplete=n;OSF.DDA.WAC.Delegate.unregisterEventAsync(h)}function et(){f!=i&&(document.body.removeChild(f),f=i);o!=i&&(document.body.removeChild(o),o=i)}function yt(n){var t=document.createElement(s);return t.style.cssText=n.getOverlayElementCSS(),t}function si(n,t){var r=document.createElement(s),i,u;return r.style.cssText=n.getDialogNotificationPanelCSS(),bt(r),i=document.createElement(s),i.style.cssText=n.getNewWindowNotificationTextPanelCSS(),i.id=nt,document.documentElement.getAttribute("dir")=="rtl"?i.style.paddingRight="30px":i.style.paddingLeft="30px",u=document.createElement("span"),u.style.cssText=n.getNewWindowNotificationTextSpanCSS(),u.innerText=t,i.appendChild(u),r.appendChild(i),r}function pt(n){var t=document.createElement(s);return t.style.cssText=n.getDialogNotificationButtonPanelCSS(),t.style.cssFloat=document.documentElement.getAttribute("dir")=="rtl"?"left":"right",t}function wt(n){if(n!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){var t=document.querySelectorAll(OSF._OfficeAppFactory.getInitializationHelper()._tabbableElements);OSF.OUtil.focusToFirstTabbable(t,r)}}function hi(t,i){var f=document.createElement(s),u,r,e;return f.style.cssText=t.getDialogNotificationPanelCSS(),bt(f),u=document.createElement(s),u.style.cssText=t.getCrossZoneNotificationTextPanelCSS(),u.id=nt,r=document.createElement("a"),r.id=g,r.href="#",r.innerText=Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink,r.setAttribute("onclick","window.open('https://support.microsoft.com/en-us/help/17479/windows-internet-explorer-11-change-security-privacy-settings', '_blank', 'fullscreen=1')"),e=document.createElement("span"),Strings.OfficeOM.L_NewWindowCrossZone&&(e.innerHTML=OSF.OUtil.formatString(Strings.OfficeOM.L_NewWindowCrossZone,r.outerHTML,n.WACUtils.getDomainForUrl(i))),u.appendChild(e),f.appendChild(u),f}function bt(n){n.setAttribute("role","dialog");n.setAttribute("aria-describedby",nt)}var s="div",c="string",l="message",b="storage",a="keydown",r=!1,i=null,u=i,v=i,o=i,f=i,ot="osfDialogInternal:action=closeDialog",e=i,k=r,d=-1,st="messageParentKey",y=i,ht="#ababab",ct="#ffffff",kt="#ccc",lt="newWindowNotificaiton",dt="crossZoneNotification",g="configureBrowserLink",nt="dialogNotificationTextPanel",p=n.WACUtils.shouldUseLocalStorageToPassMessage(),h={dispId:OSF.DDA.EventDispId.dispidDialogNotificationShownInAddinEvent,eventType:OSF.DDA.Marshaling.DialogNotificationShownEventType.DialogNotificationShown,onComplete:i};t.setHostThemeButtonStyle=gt;t.removeEventListenersForDialog=ni;t.handleNewWindowDialog=ti;t.closeDialog=ii;t.messageParent=ri;t.sendMessage=ui;t.registerMessageReceivedEvent=fi;t.setHandlerAndShowDialogCallback=ei;t.escDismissDialogNotification=oi;t.showCrossZoneNotification=at})(i=t.Dialog||(t.Dialog={}))})(t=n.AddinNativeAction||(n.AddinNativeAction={}))}(OfficeExt||(OfficeExt={}));OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogMessageReceivedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageType},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageContent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidMessageParentMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,value:OSF.DDA.Marshaling.MessageParentKeys.MessageToParent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSendMessageMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,value:OSF.DDA.Marshaling.SendMessageKeys.MessageContent}]});OSF.DDA.WAC.Delegate.openDialog=function(n){function t(n){var t={Error:n};try{e(Microsoft.Office.Common.InvokeResultCode.noError,t)}catch(i){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at showDialogCallback."+i)}}var u="https://",f="http://",r=JSON.parse(n.targetId),e=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!0,n),i;if(OSF.DialogShownStatus.hasDialogShown){t(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened);return}if(i=r[OSF.ShowWindowDialogParameterKeys.Url].toLowerCase(),i==null||!(i.substr(0,u.length)===u)){i.substr(0,f.length)===f?t(OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS):t(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme);return}r[OSF.ShowWindowDialogParameterKeys.DisplayInIframe]?(OSF.DialogShownStatus.isWindowDialog=!1,OSF.DDA.WAC.Delegate.registerEventAsync(n)):(OSF.DialogShownStatus.isWindowDialog=!0,OfficeExt.AddinNativeAction.Dialog.setHandlerAndShowDialogCallback(function(t){n.onEvent&&n.onEvent(t);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t),OfficeExt.AddinNativeAction.Dialog.handleNewWindowDialog(r))};OSF.DDA.WAC.Delegate.messageParent=function(n){window.opener!=null?OfficeExt.AddinNativeAction.Dialog.messageParent(n):OSF.DDA.WAC.Delegate.executeAsync(n)};OSF.DDA.WAC.Delegate.sendMessage=function(n){OSF.DialogShownStatus.hasDialogShown&&(OSF.DialogShownStatus.isWindowDialog?OfficeExt.AddinNativeAction.Dialog.sendMessage(n):OSF.DDA.WAC.Delegate.executeAsync(n))};OSF.DDA.WAC.Delegate.closeDialog=function(n){function t(n){var t={Error:n};try{i(Microsoft.Office.Common.InvokeResultCode.noError,t)}catch(r){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at closeDialogCallback."+r)}}var i=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!1,n);OSF.DialogShownStatus.hasDialogShown?OSF.DialogShownStatus.isWindowDialog?(n.onCalling&&n.onCalling(),OfficeExt.AddinNativeAction.Dialog.closeDialog(t)):OSF.DDA.WAC.Delegate.unregisterEventAsync(n):t(OSF.DDA.ErrorCodeManager.errorCodes.ooeWebDialogClosed)};OSF.InitializationHelper.prototype.dismissDialogNotification=function(){OfficeExt.AddinNativeAction.Dialog.escDismissDialogNotification()};OSF.InitializationHelper.prototype.registerMessageReceivedEventForWindowDialog=function(){OfficeExt.AddinNativeAction.Dialog.registerMessageReceivedEvent()};OSF.DDA.AsyncMethodNames.addNames({CloseContainerAsync:"closeContainer"}),function(n){var t=function(){function n(){}return n}();n.Container=t}(OfficeExt||(OfficeExt={}));OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseContainerAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidCloseContainerMethod,fromHost:[],toHost:[]}),function(n){var t=function(){function n(n,t){var i=this;OSF.DDA.OneNoteDocument.uber.constructor.call(i,n,t);OSF.DDA.DispIdHost.addAsyncMethods(i,[OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,OSF.DDA.SyncMethodNames.MessageParent]);OSF.DDA.DispIdHost.addEventSupport(i,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged,Microsoft.Office.WebExtension.EventType.DialogMessageReceived]));OSF.OUtil.finalizeProperties(i)}return n}();n.OneNoteDocument=t}(OSFOneNoteWAC||(OSFOneNoteWAC={}));OSF.DDA.OneNoteDocument=OSFOneNoteWAC.OneNoteDocument;OSF.OUtil.extend(OSF.DDA.OneNoteDocument,OSF.DDA.Document);OSF.OUtil.redefineList(Microsoft.Office.WebExtension.CoercionType,{Html:"html",Image:"image",Matrix:"matrix",Text:"text"});OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(n,t){OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM);n.doc=new OSF.DDA.OneNoteDocument(n,this._initializeSettings(n,!0));OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi,[OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]);t()};OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize=function(n){var t,i,r;OSF.WebApp._UpdateLinksForHostAndXdmInfo();t=new OSF.DDA.License(n.get_eToken());this.initWebDialog(n);OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(n,n.doc,t));OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.WAC.getDelegateMethods,OSF.DDA.WAC.Delegate.ParameterMap));i=n.get_reason();Microsoft.Office.WebExtension.initialize(i);r=OfficeExt.AppCommand.AppCommandManager.instance();r.initializeAndChangeOnce()};__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t=function(){function n(n,t,i){this.m_actionInfo=n;this.m_isWriteOperation=t;this.m_isRestrictedResourceAccess=i}return Object.defineProperty(n.prototype,"actionInfo",{get:function(){return this.m_actionInfo},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isRestrictedResourceAccess",{get:function(){return this.m_isRestrictedResourceAccess},enumerable:!0,configurable:!0}),n}();n.Action=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_callback=n}return n.prototype._handleResult=function(n){this.m_callback&&this.m_callback()},n}(),i=function(){function i(){}return i.createSetPropertyAction=function(t,i,r,u){var f;n.Utility.validateObjectPath(i);var o={Id:t._nextId(),ActionType:4,Name:r,ObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},s=[u],e=n.Utility.setMethodArguments(t,o.ArgumentInfo,s);return n.Utility.validateReferencedObjectPaths(e),t._pendingRequest.ensureInstantiateObjectPath(i._objectPath),t._pendingRequest.ensureInstantiateObjectPaths(e),f=new n.Action(o,!0,!1),t._pendingRequest.addAction(f),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addReferencedObjectPaths(e),f.referencedObjectPath=i._objectPath,f.referencedArgumentObjectPaths=e,f},i.createMethodAction=function(t,i,r,u,f,e){var h,o,c,s;return n.Utility.validateObjectPath(i),h={Id:t._nextId(),ActionType:3,Name:r,ObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},o=n.Utility.setMethodArguments(t,h.ArgumentInfo,f),n.Utility.validateReferencedObjectPaths(o),t._pendingRequest.ensureInstantiateObjectPath(i._objectPath),t._pendingRequest.ensureInstantiateObjectPaths(o),c=u!=1,s=new n.Action(h,c,e),t._pendingRequest.addAction(s),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addReferencedObjectPaths(o),s.referencedObjectPath=i._objectPath,s.referencedArgumentObjectPaths=o,s},i.createQueryAction=function(t,i,r){var f,u;return n.Utility.validateObjectPath(i),t._pendingRequest.ensureInstantiateObjectPath(i._objectPath),f={Id:t._nextId(),ActionType:2,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},f.QueryInfo=r,u=new n.Action(f,!1,!1),t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u.referencedObjectPath=i._objectPath,u},i.createRecursiveQueryAction=function(t,i,r){n.Utility.validateObjectPath(i);t._pendingRequest.ensureInstantiateObjectPath(i._objectPath);var f={Id:t._nextId(),ActionType:6,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id,RecursiveQueryInfo:r},u=new n.Action(f,!1,!1);return t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u.referencedObjectPath=i._objectPath,u},i.createQueryAsJsonAction=function(t,i,r){var f,u;return n.Utility.validateObjectPath(i),t._pendingRequest.ensureInstantiateObjectPath(i._objectPath),f={Id:t._nextId(),ActionType:7,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},f.QueryInfo=r,u=new n.Action(f,!1,!1),t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u.referencedObjectPath=i._objectPath,u},i.createEnsureUnchangedAction=function(t,i,r){n.Utility.validateObjectPath(i);t._pendingRequest.ensureInstantiateObjectPath(i._objectPath);var f={Id:t._nextId(),ActionType:8,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id,ObjectState:r},u=new n.Action(f,!1,!1);return t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u.referencedObjectPath=i._objectPath,u},i.createInstantiateAction=function(t,i){n.Utility.validateObjectPath(i);t._pendingRequest.ensureInstantiateObjectPath(i._objectPath.parentObjectPath);t._pendingRequest.ensureInstantiateObjectPaths(i._objectPath.argumentObjectPaths);var u={Id:t._nextId(),ActionType:1,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},r=new n.Action(u,!1,!1);return t._pendingRequest.addAction(r),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addActionResultHandler(r,new n.InstantiateActionResultHandler(i)),r.referencedObjectPath=i._objectPath,r},i.createTraceAction=function(t,i,r){var u={Id:t._nextId(),ActionType:5,Name:"Trace",ObjectPathId:0},f=new n.Action(u,!1,!1);return t._pendingRequest.addAction(f),r&&t._pendingRequest.addTrace(u.Id,i),f},i.createTraceMarkerForCallback=function(n,r){var u=i.createTraceAction(n,null,!1);n._pendingRequest.addActionResultHandler(u,new t(r))},i}();n.ActionFactory=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(t,i){n.Utility.checkArgumentNull(t,"context");this.m_context=t;this.m_objectPath=i;this.m_objectPath&&(t._processingResult||(n.ActionFactory.createInstantiateAction(t,this),t._autoCleanup&&this._KeepReference&&t.trackedObjects._autoAdd(this)))}return Object.defineProperty(t.prototype,"context",{get:function(){return this.m_context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_objectPath",{get:function(){return this.m_objectPath},set:function(n){this.m_objectPath=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNull",{get:function(){return n.Utility.throwIfNotLoaded("isNull",this._isNull,null,this._isNull),this._isNull},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNullObject",{get:function(){return n.Utility.throwIfNotLoaded("isNullObject",this._isNull,null,this._isNull),this._isNull},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_isNull",{get:function(){return this.m_isNull},set:function(n){this.m_isNull=n;n&&this.m_objectPath&&this.m_objectPath._updateAsNullObject()},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){this._isNull=n.Utility.isNullOrUndefined(t);this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this,t)},t.prototype._handleIdResult=function(t){this._isNull=n.Utility.isNullOrUndefined(t);n.Utility.fixObjectPathIfNecessary(this,t);this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this,t)},t.prototype._recursivelySet=function(i,r,u,f,e){var c=i instanceof t,v=i,o,a,h,s,l;if(c)if(Object.getPrototypeOf(this)===Object.getPrototypeOf(i))i=JSON.parse(JSON.stringify(i));else throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"properties",errorLocation:this._className+".set"});try{for(s=0;s0},enumerable:!0,configurable:!0}),t.prototype._getLastAction=function(){return this.m_actions[this.m_actions.length-1]},t.prototype.addTrace=function(n,t){this.m_traceInfos[n]=t},t.prototype.ensureInstantiateObjectPath=function(t){if(t){if(this.m_instantiatedObjectPaths[t.objectPathInfo.Id])return;if(this.ensureInstantiateObjectPath(t.parentObjectPath),this.ensureInstantiateObjectPaths(t.argumentObjectPaths),!this.m_instantiatedObjectPaths[t.objectPathInfo.Id]){var r={Id:this.m_context._nextId(),ActionType:1,Name:"",ObjectPathId:t.objectPathInfo.Id},i=new n.Action(r,!1,!1);i.referencedObjectPath=t;this.addAction(i)}}},t.prototype.ensureInstantiateObjectPaths=function(n){if(n)for(var t=0;t=0;--r)if(i=n[r],u=i.actionInfo.Id,i.referencedObjectPath&&t._updateLastUsedActionIdOfObjectPathId(e,i.referencedObjectPath,u),o=i.referencedArgumentObjectPaths,o)for(v=o.length,s=0;s0?i.actionInfo.L=c:i.actionInfo.L&&delete i.actionInfo.L},t}();n.ClientRequest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;n._internalConfig={showDisposeInfoInDebugInfo:!1,enableEarlyDispose:!0,alwaysPolyfillClientObjectRetrieveMethod:!1};t=function(){function t(){}return t.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},t.prototype._createRequestExecutorOrNull=function(){return null},Object.defineProperty(t.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),t}();n.SessionBase=t;i=function(){function i(r){if(this.m_customRequestHeaders={},this._onRunFinishedNotifiers=[],this.m_nextId=0,i._overrideSession)this.m_requestUrlAndHeaderInfoResolver=i._overrideSession;else if((n.Utility.isNullOrUndefined(r)||typeof r=="string"&&r.length===0)&&(r=i.defaultRequestUrlAndHeaders,r||(r={url:n.Constants.localDocument,headers:{}})),typeof r=="string")this.m_requestUrlAndHeaderInfo={url:r,headers:{}};else if(i.isRequestUrlAndHeaderInfoResolver(r))this.m_requestUrlAndHeaderInfoResolver=r;else if(i.isRequestUrlAndHeaderInfo(r)){var u=r;this.m_requestUrlAndHeaderInfo={url:u.url,headers:{}};n.Utility._copyHeaders(u.headers,this.m_requestUrlAndHeaderInfo.headers)}else throw n._Internal.RuntimeError._createInvalidArgError("url");this.m_requestUrlAndHeaderInfoResolver instanceof t&&(this.m_session=this.m_requestUrlAndHeaderInfoResolver);this._processingResult=!1;this._customData=n.Constants.iterativeExecutor;this.sync=this.sync.bind(this)}return Object.defineProperty(i.prototype,"session",{get:function(){return this.m_session},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"eventRegistration",{get:function(){return this.m_session?this.m_session.eventRegistration:n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_url",{get:function(){return this.m_requestUrlAndHeaderInfo?this.m_requestUrlAndHeaderInfo.url:null},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_pendingRequest",{get:function(){return this.m_pendingRequest==null&&(this.m_pendingRequest=new n.ClientRequest(this)),this.m_pendingRequest},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"debugInfo",{get:function(){var t=new n.RequestPrettyPrinter(this._rootObjectPropertyName,this._pendingRequest._objectPaths,this._pendingRequest._actions,n._internalConfig.showDisposeInfoInDebugInfo),i=t.process();return{pendingStatements:i}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"trackedObjects",{get:function(){return this.m_trackedObjects||(this.m_trackedObjects=new n.TrackedObjects(this)),this.m_trackedObjects},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"requestHeaders",{get:function(){return this.m_customRequestHeaders},enumerable:!0,configurable:!0}),i.prototype.load=function(t,r){n.Utility.validateContext(this,t);var u=i._parseQueryOption(r),f=n.ActionFactory.createQueryAction(this,t,u);this._pendingRequest.addActionResultHandler(f,t)},i.isLoadOption=function(t){if(!n.Utility.isUndefined(t.select)&&(typeof t.select=="string"||Array.isArray(t.select))||!n.Utility.isUndefined(t.expand)&&(typeof t.expand=="string"||Array.isArray(t.expand))||!n.Utility.isUndefined(t.top)&&typeof t.top=="number"||!n.Utility.isUndefined(t.skip)&&typeof t.skip=="number")return!0;for(var i in t)return!1;return!0},i.parseStrictLoadOption=function(n){var t={Select:[]};return i.parseStrictLoadOptionHelper(t,"","option",n),t},i.combineQueryPath=function(n,t,i){return n.length===0?t:n+i+t},i.parseStrictLoadOptionHelper=function(t,r,u,f){var e,o;for(e in f)if(o=f[e],e==="$all"){if(typeof o!="boolean")throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));o&&t.Select.push(i.combineQueryPath(r,"*","/"))}else if(e==="$top"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));t.Top=o}else if(e==="$skip"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));t.Skip=o}else if(typeof o=="boolean")o&&t.Select.push(i.combineQueryPath(r,e,"/"));else if(typeof o=="object")i.parseStrictLoadOptionHelper(t,i.combineQueryPath(r,e,"/"),i.combineQueryPath(u,e,"."),o);else throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));},i._parseQueryOption=function(t){var u={},f,r;if(typeof t=="string")f=t,u.Select=n.Utility._parseSelectExpand(f);else if(Array.isArray(t))u.Select=t;else if(typeof t=="object")if(r=t,i.isLoadOption(r)){if(typeof r.select=="string")u.Select=n.Utility._parseSelectExpand(r.select);else if(Array.isArray(r.select))u.Select=r.select;else if(!n.Utility.isNullOrUndefined(r.select))throw n._Internal.RuntimeError._createInvalidArgError("option.select");if(typeof r.expand=="string")u.Expand=n.Utility._parseSelectExpand(r.expand);else if(Array.isArray(r.expand))u.Expand=r.expand;else if(!n.Utility.isNullOrUndefined(r.expand))throw n._Internal.RuntimeError._createInvalidArgError("option.expand");if(typeof r.top=="number")u.Top=r.top;else if(!n.Utility.isNullOrUndefined(r.top))throw n._Internal.RuntimeError._createInvalidArgError("option.top");if(typeof r.skip=="number")u.Skip=r.skip;else if(!n.Utility.isNullOrUndefined(r.skip))throw n._Internal.RuntimeError._createInvalidArgError("option.skip");}else u=i.parseStrictLoadOption(t);else if(!n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError("option");return u},i.prototype.loadRecursive=function(t,r,u){var f,e,o;if(!n.Utility.isPlainJsonObject(r))throw n._Internal.RuntimeError._createInvalidArgError("options");f={};for(e in r)f[e]=i._parseQueryOption(r[e]);o=n.ActionFactory.createRecursiveQueryAction(this,t,{Queries:f,MaxDepth:u});this._pendingRequest.addActionResultHandler(o,t)},i.prototype.trace=function(t){n.ActionFactory.createTraceAction(this,t,!0)},i.prototype._processOfficeJsErrorResponse=function(n,t){},i.prototype.syncPrivateMain=function(){var t=this;return n.Utility._createPromiseFromResult(null).then(function(){if(!t.m_requestUrlAndHeaderInfo)return t.m_requestUrlAndHeaderInfoResolver._resolveRequestUrlAndHeaderInfo().then(function(i){if(t.m_requestUrlAndHeaderInfo=i,t.m_requestUrlAndHeaderInfo||(t.m_requestUrlAndHeaderInfo={url:n.Constants.localDocument,headers:{}}),n.Utility.isNullOrEmptyString(t.m_requestUrlAndHeaderInfo.url)&&(t.m_requestUrlAndHeaderInfo.url=n.Constants.localDocument),t.m_requestUrlAndHeaderInfo.headers||(t.m_requestUrlAndHeaderInfo.headers={}),typeof t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull=="function"){var r=t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull();r&&(t._requestExecutor=r)}})}).then(function(){var n=t._pendingRequest;return t.m_pendingRequest=null,t.processPreSyncPromises(n).then(function(){return t.syncPrivate(n)})})},i.prototype.syncPrivate=function(t){var f=this,e,o,s,u,h,r,i;return t.hasActions?(e=t.buildRequestMessageBody(),o=t.flags,this._requestExecutor||(this._requestExecutor=n.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)?new n.OfficeJsRequestExecutor(this):new n.HttpRequestExecutor),s=this._requestExecutor,u={},n.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,u),n.Utility._copyHeaders(this.m_customRequestHeaders,u),h={Url:this.m_requestUrlAndHeaderInfo.url,Headers:u,Body:e},t.invalidatePendingInvalidObjectPaths(),r=null,i=null,this._lastSyncStart=performance.now(),s.executeAsync(this._customData,o,h).then(function(u){return f._lastSyncEnd=performance.now(),r=f.processRequestExecutorResponseMessage(t,u),f.processPendingEventHandlers(t).catch(function(t){n.Utility.log("Error in processPendingEventHandlers");n.Utility.log(JSON.stringify(t));i=t})}).then(function(){var u,f;if(r){n.Utility.log("Throw error from response: "+JSON.stringify(r));throw r;}if(i){n.Utility.log("Throw error from ProcessEventHandler: "+JSON.stringify(i));u=null;i instanceof n._Internal.RuntimeError?(u=i,u.traceMessages=t._responseTraceMessages):(f=null,f=typeof i=="string"?i:i.message,n.Utility.isNullOrEmptyString(f)&&(f=n.Utility._getResourceString(n.ResourceStrings.cannotRegisterEvent)),u=new n._Internal.RuntimeError({code:n.ErrorCodes.cannotRegisterEvent,message:f,traceMessages:t._responseTraceMessages}));throw u;}})):this.processPendingEventHandlers(t)},i.prototype.processRequestExecutorResponseMessage=function(t,i){var e,r,o,u,f;if(i.Body&&i.Body.TraceIds&&t._setResponseTraceIds(i.Body.TraceIds),e=t._responseTraceMessages,r=null,i.Body&&(i.Body.Error&&i.Body.Error.ActionIndex>=0&&(o=new n.RequestPrettyPrinter(this._rootObjectPropertyName,t._objectPaths,t._actions),r=o.processForDebugStatementInfo(i.Body.Error.ActionIndex)),u=null,i.Body.Results?u=i.Body.Results:i.Body.ProcessedResults&&i.Body.ProcessedResults.Results&&(u=i.Body.ProcessedResults.Results),u)){this._processingResult=!0;try{t.processResponse(u)}finally{this._processingResult=!1}}if(n.Utility.isNullOrEmptyString(i.ErrorCode)){if(i.Body&&i.Body.Error)return f={errorLocation:i.Body.Error.Location},r&&(f.statement=r.statement,f.surroundingStatements=r.surroundingStatements),new n._Internal.RuntimeError({code:i.Body.Error.Code,message:i.Body.Error.Message,traceMessages:e,debugInfo:f})}else return new n._Internal.RuntimeError({code:i.ErrorCode,message:i.ErrorMessage,traceMessages:e});return null},i.prototype.processPendingEventHandlers=function(t){for(var u,i=n.Utility._createPromiseFromResult(null),r=0;r0&&(typeof r[0]=="string"||i.isRequestUrlAndHeaderInfo(r[0])||i.isRequestUrlAndHeaderInfoResolver(r[0]))&&(y=r[0],h=1),r.length==h+1)l=u,v=r[h+0];else if(r.length==h+2){if(n.Utility.isNullOrUndefined(r[h+0]))l=u;else if(r[h+0]instanceof n.ClientObject)l=function(){return r[h+0].context};else if(r[h+0]instanceof i)l=function(){return r[h+0]};else if(Array.isArray(r[h+0])){if(c=r[h+0],c.length==0)return i.createErrorPromise(t);for(a=0;a0){var n=c._onRunFinishedNotifiers.shift();n()}if(a)return l;else throw l;})},i.prototype._nextId=function(){return++this.m_nextId},i}();n.ClientRequestContext=i}(OfficeExtension||(OfficeExtension={})),function(n){var i=function(){function t(n){this.m_type=n}return Object.defineProperty(t.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){(this.m_isLoaded=!0,typeof t=="object"&&t&&t._IsNull)||(this.m_value=this.m_type===1?n.Utility.adjustToDateTime(t):t)},t}(),t;n.ClientResult=i;t=function(){function t(n,t){this.m_proxy=n;this.m_shouldPolyfill=t}return Object.defineProperty(t.prototype,"proxy",{get:function(){return this.m_proxy},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"retrieveResult.data"}});return this.m_data},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(n){if(this.m_isLoaded=!0,typeof n=="object"&&n&&n._IsNull){this.m_data=null;return}this.m_data=this.m_shouldPolyfill?this.changePropertyNameToCamelLowerCase(n):n},t.prototype.changePropertyNameToCamelLowerCase=function(t){var o=95,u,i,r,f,e;if(Array.isArray(t)){for(i=[],u=0;u0&&(r=!0),t=document.createElement("a"),t.href=this.m_url,r?t.hash=t.hash.length===0||t.hash==="#"?"#"+i:t.hash+"&"+i:t.search=t.search.length===0||t.search==="?"?"?"+i:t.search+"&"+i,t.href},f.prototype.init=function(){var t=this,i;return window.addEventListener("message",this.m_onMessageHandler),i=this._getIFrameSrc(),new n._Internal.OfficePromise(function(r,u){var f=document.createElement("iframe");t.m_options.id&&(f.id=t.m_options.id);f.style.height=t.m_options.height;f.style.width=t.m_options.width;f.src=i;t.m_options.container.appendChild(f);t.m_timeoutId=setTimeout(function(){t.close();var i=n.Utility.createRuntimeError(n.ErrorCodes.timeout,n.Utility._getResourceString(n.ResourceStrings.timeout),"EmbeddedSession.init");u(i)},t.m_options.timeoutInMilliseconds);t.m_promiseResolver=r})},f.prototype._invoke=function(n,t,u){if(!this.m_enabled){t(i.InternalError,null);return}r.invokeRequestModifier&&(u=r.invokeRequestModifier(u));this._sendMessageWithCallback(this.m_id++,n,u,function(n){r.invokeResponseModifier&&(n=r.invokeResponseModifier(n));var u=n.Error;delete n.Error;t(u||i.Success,n)})},f.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler);window.clearTimeout(this.m_timeoutId);this.m_enabled=!1},Object.defineProperty(f.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),f.prototype._createRequestExecutorOrNull=function(){return new e(this)},f.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},f.prototype._registerEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.RegisterEventCommand,{EventId:i,TargetId:r},function(){n(null)})})},f.prototype._unregisterEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.UnregisterEventCommand,{EventId:i,TargetId:r},function(){n()})})},f.prototype._onMessage=function(n){var u=this,i,e,r,o,s;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===n.source&&this.m_chosenOrigin===n.origin)){if(i=n.data,i&&i[t.CommandKey]===t.ApiReadyCommand){!this.m_chosenWindow&&this._isValidDescendant(n.source)&&i[t.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=n.source,this.m_chosenOrigin=n.origin,this._sendMessageWithCallback(this.m_id++,t.GetAppContextCommand,null,function(n){u._setupContext(n);window.clearTimeout(u.m_timeoutId);u.m_promiseResolver()}));return}if(i&&i[t.CommandKey]===t.FireEventCommand){var f=i[t.ParamsKey],h=f.EventId,c=f.TargetId,l=f.Data;if(this.m_sessionEventManager)for(e=this.m_sessionEventManager.getHandlers(h,c),r=0;r=0;o--)if(r[o]===e[i].handler){r.splice(o,1);break}break;case 2:r=[];break}}return s&&(!this.m_registered&&r.length>0?u=u.then(function(){return f.m_eventInfo.registerFunc(f.m_callback)}).then(function(){return f.m_registered=!0}):this.m_registered&&r.length==0&&(u=u.then(function(){return f.m_eventInfo.unregisterFunc(f.m_callback)}).catch(function(t){n.Utility.log("Error when unregister event: "+JSON.stringify(t))}).then(function(){return f.m_registered=!1})),u=u.then(function(){return f.m_handlers=r})),u},t.prototype.fireEvent=function(t){for(var u,f,r=[],i=0;i=0;e--)if(f[e]===u){f.splice(e,1);break}return f.length===0?this.m_unregisterEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i}();n.EventRegistration=i}(OfficeExtension||(OfficeExtension={})),function(n){function r(n){t._testReadyImpl=n}function u(n){t.getGenericEventRegistration()._handleRichApiMessage(n)}var t=function(){function t(){this.m_eventRegistration=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this));this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this)}return t.prototype.ready=function(){var i=this;return this.m_ready||(this.m_ready=t._testReadyImpl?t._testReadyImpl().then(function(){i.m_isReady=!0}):n._Internal.officeJsEventRegistration.register(5,"",this.m_richApiMessageHandler).then(function(){i.m_isReady=!0})),this.m_ready},Object.defineProperty(t.prototype,"isReady",{get:function(){return this.m_isReady},enumerable:!0,configurable:!0}),t.prototype.register=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.register(n,t,i)})},t.prototype.unregister=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.unregister(n,t,i)})},t.prototype._registerEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._unregisterEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._handleRichApiMessage=function(t){var r,i,u,e,f;if(t&&t.entries)for(r=0;r0))for(e=JSON.parse(i.message),i.isRemoteOverride&&(e.source=n.Constants.eventSourceRemote),f=0;f=0;u--)if(n[u]===i){n.splice(u,1);break}n.length==0&&t.getGenericEventRegistration().unregister(r.m_genericEventInfo.eventType,r.m_genericEventInfo.getTargetIdFunc(),r._callback)})},r.prototype.removeAll=function(){},r}(n.EventHandlers);n.GenericEventHandlers=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var s=JSON.stringify(u.Body),f=u.Url,e,o;if(f.charAt(f.length-1)!="/"&&(f=f+"/"),f=f+n.Constants.processQuery,f=f+"?"+n.Constants.flags+"="+r.toString(),e={method:"POST",url:f,headers:{},body:s},e.headers[n.Constants.sourceLibHeader]=t.SourceLibHeaderValue,e.headers["CONTENT-TYPE"]="application/json",u.Headers)for(o in u.Headers)e.headers[o]=u.Headers[o];return n.HttpUtility.sendRequest(e).then(function(t){var i,r;return t.statusCode===200?i={ErrorCode:null,ErrorMessage:null,Headers:t.headers,Body:JSON.parse(t.body)}:(n.Utility.log("Error Response:"+t.body),r=n.Utility._parseErrorResponse(t),i={ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:t.headers,Body:null}),i})},t.SourceLibHeaderValue="officejs-rest",t}();n.HttpRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.setCustomSendRequestFunc=function(n){t.s_customSendRequestFunc=n},t.xhrSendRequestFunc=function(t){return new n._Internal.OfficePromise(function(i,r){var u=new XMLHttpRequest,f;if(u.open(t.method,t.url),u.onload=function(){var t={statusCode:u.status,headers:n.Utility._parseHttpResponseHeaders(u.getAllResponseHeaders()),body:u.responseText};i(t)},u.onerror=function(){r(new n._Internal.RuntimeError({code:n.ErrorCodes.connectionFailure,message:n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,u.statusText)}))},t.headers)for(f in t.headers)u.setRequestHeader(f,t.headers[f]);u.send(t.body)})},t.sendRequest=function(n){t.validateAndNormalizeRequest(n);var i=t.s_customSendRequestFunc;return i||(i=t.xhrSendRequestFunc),i(n)},t.setCustomSendLocalDocumentRequestFunc=function(n){t.s_customSendLocalDocumentRequestFunc=n},t.sendLocalDocumentRequest=function(n){t.validateAndNormalizeRequest(n);var i;return i=t.s_customSendLocalDocumentRequestFunc||t.officeJsSendLocalDocumentRequestFunc,i(n)},t.officeJsSendLocalDocumentRequestFunc=function(t){t=n.Utility._validateLocalDocumentRequest(t);var i=n.Utility._buildRequestMessageSafeArray(t);return new n._Internal.OfficePromise(function(t,r){OSF.DDA.RichApi.executeRichApiRequestAsync(i,function(i){var r;r=i.status=="succeeded"?{statusCode:n.RichApiMessageUtility.getResponseStatusCode(i),headers:n.RichApiMessageUtility.getResponseHeaders(i),body:n.RichApiMessageUtility.getResponseBody(i)}:n.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(i.error.code,i.error.message);n.Utility.log(JSON.stringify(r));t(r)})})},t.validateAndNormalizeRequest=function(t){if(n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"request"});n.Utility.isNullOrEmptyString(t.method)&&(t.method="GET");t.method=t.method.toUpperCase()},t.logRequest=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Request---"),n.Utility.log(i.method+" "+i.url),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t.logResponse=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Response---"),n.Utility.log(""+i.statusCode),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t._logBody=!1,t}();n.HttpUtility=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_clientObject=n}return n.prototype._handleResult=function(n){this.m_clientObject._handleIdResult(n)},n}();n.InstantiateActionResultHandler=t}(OfficeExtension||(OfficeExtension={})),function(n){}(OfficeExtension||(OfficeExtension={})),function(n){var u=function(){function t(n){this.m_session=n}return t.prototype.executeAsync=function(t,r,u){var e={url:n.Constants.processQuery,method:"POST",headers:u.Headers,body:u.Body},f={id:i.nextId(),type:1,flags:r,message:e};return n.Utility.log(JSON.stringify(f)),this.m_session.sendMessageToHost(f).then(function(t){var i,r,u;return n.Utility.log("Received response: "+JSON.stringify(t)),i=t.message,i.statusCode===200?r={ErrorCode:null,ErrorMessage:null,Headers:i.headers,Body:i.body}:(n.Utility.log("Error Response:"+i.body),u=n.Utility._parseErrorResponse(i),r={ErrorCode:u.errorCode,ErrorMessage:u.errorMessage,Headers:i.headers,Body:null}),r})},t}(),i=function(i){function r(n){var t=this;i.call(this);this.m_promiseResolver={};this.m_bridge=n;this.m_bridge.onMessageFromHost=function(n){t.onMessageFromHost(n)}}return __extends(r,i),r.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},r.prototype._createRequestExecutorOrNull=function(){return n.Utility.log("NativeBridgeSession::CreateRequestExecutor"),new u(this)},Object.defineProperty(r.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),r.init=function(t){if(t&&typeof t=="object"){var i=new r(t);n.ClientRequestContext._overrideSession=i;n.HttpUtility.setCustomSendLocalDocumentRequestFunc(function(n){var t={id:r.nextId(),type:1,flags:0,message:n};return i.sendMessageToHost(t).then(function(n){return n.message})})}},r.prototype.sendMessageToHost=function(t){var i=this;return this.m_bridge.sendMessageToHost(JSON.stringify(t)),new n._Internal.OfficePromise(function(n,r){i.m_promiseResolver[t.id]=n})},r.prototype.onMessageFromHost=function(n){var i,r;n==="test"?t._testFunc&&t._testFunc():(i=JSON.parse(n),typeof i.id=="number"&&(r=this.m_promiseResolver[i.id],r&&r(i),delete this.m_promiseResolver[i.id]))},r.nextId=function(){return r.s_nextId++},r.s_nextId=1,r}(n.SessionBase),r=function(){function n(){}return n.init=function(n){i.init(n)},n}(),t;n.HostBridge=r;typeof _richApiNativeBridge=="object"&&_richApiNativeBridge&&r.init(_richApiNativeBridge);t=function(){function n(){}return n.setTestFunc=function(t){n._testFunc=t},n}();n.HostBridgeTest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){this.m_objectPathInfo=n;this.m_parentObjectPath=t;this.m_isWriteOperation=!1;this.m_isCollection=i;this.m_isInvalidAfterRequest=r;this.m_isValid=!0}return Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},set:function(n){this.m_isWriteOperation=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRestrictedResourceAccess",{get:function(){return this.m_isRestrictedResourceAccess},set:function(n){this.m_isRestrictedResourceAccess=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(n){this.m_argumentObjectPaths=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(n){this.m_isValid=n;!n&&this.m_objectPathInfo.ObjectPathType===6&&this.m_savedObjectPathInfo&&(t.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(n){this.m_getByIdMethodName=n},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null},t.prototype.updateUsingObjectData=function(i){var e=i[n.Constants.referenceId],f,o,u,r;if(!n.Utility.isNullOrEmptyString(e)){this.m_savedObjectPathInfo||this.isInvalidAfterRequest||!t.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)||(f={},t.copyObjectPathInfo(this.m_objectPathInfo,f),this.m_savedObjectPathInfo={pathInfo:f,parent:this.m_parentObjectPath});this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=e;this.m_objectPathInfo.ArgumentInfo={};delete this.m_objectPathInfo.ParentObjectPathId;this.m_parentObjectPath=null;this.m_argumentObjectPaths=null;return}if(o=this.parentObjectPath&&this.parentObjectPath.isCollection,u=this.getByIdMethodName,(o||!n.Utility.isNullOrEmptyString(u))&&(r=i[n.Constants.id],n.Utility.isNullOrUndefined(r)&&(r=i[n.Constants.idPrivate]),!n.Utility.isNullOrUndefined(r))){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;n.Utility.isNullOrEmptyString(u)?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=u,this.m_getByIdMethodName=null);this.isWriteOperation=!1;this.m_objectPathInfo.ArgumentInfo={};this.m_objectPathInfo.ArgumentInfo.Arguments=[r];this.m_argumentObjectPaths=null;return}},t.isRestorableObjectPath=function(n){return n===1||n===5||n===3||n===4},t.copyObjectPathInfo=function(n,t){t.Id=n.Id;t.ArgumentInfo=n.ArgumentInfo;t.Name=n.Name;t.ObjectPathType=n.ObjectPathType;t.ParentObjectPathId=n.ParentObjectPathId},t}();n.ObjectPath=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createGlobalObjectObjectPath=function(t){var i={Id:t._nextId(),ObjectPathType:1,Name:""};return new n.ObjectPath(i,null,!1,!1)},t.createNewObjectObjectPath=function(t,i,r,u){var e={Id:t._nextId(),ObjectPathType:2,Name:i},f=new n.ObjectPath(e,null,r,!1);return f.isRestrictedResourceAccess=u,f},t.createPropertyObjectPath=function(t,i,r,u,f,e){var s={Id:t._nextId(),ObjectPathType:4,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id},o=new n.ObjectPath(s,i._objectPath,u,f);return o.isRestrictedResourceAccess=e,o},t.createIndexerObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i._objectPath,!1,!1)},t.createIndexerObjectPathUsingParentPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i,!1,!1)},t.createMethodObjectPath=function(t,i,r,u,f,e,o,s,h){var l={Id:t._nextId(),ObjectPathType:3,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},a=n.Utility.setMethodArguments(t,l.ArgumentInfo,f),c=new n.ObjectPath(l,i._objectPath,e,o);return c.argumentObjectPaths=a,c.isWriteOperation=u!=1,c.getByIdMethodName=s,c.isRestrictedResourceAccess=h,c},t.createReferenceIdObjectPath=function(t,i){var r={Id:t._nextId(),ObjectPathType:6,Name:i,ArgumentInfo:{}};return new n.ObjectPath(r,null,!1,!1)},t.createChildItemObjectPathUsingIndexerOrGetItemAt=function(i,r,u,f,e){var o=f[n.Constants.id];return n.Utility.isNullOrUndefined(o)&&(o=f[n.Constants.idPrivate]),i&&!n.Utility.isNullOrUndefined(o)?t.createChildItemObjectPathUsingIndexer(r,u,f):t.createChildItemObjectPathUsingGetItemAt(r,u,f,e)},t.createChildItemObjectPathUsingIndexer=function(t,i,r){var f=r[n.Constants.id],u;return n.Utility.isNullOrUndefined(f)&&(f=r[n.Constants.idPrivate]),u=u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u.ArgumentInfo.Arguments=[f],new n.ObjectPath(u,i._objectPath,!1,!1)},t.createChildItemObjectPathUsingGetItemAt=function(t,i,r,u){var e=r[n.Constants.index],f;return e&&(u=e),f={Id:t._nextId(),ObjectPathType:3,Name:n.Constants.getItemAt,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f.ArgumentInfo.Arguments=[u],new n.ObjectPath(f,i._objectPath,!1,!1)},t}();n.ObjectPathFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_context=n}return t.prototype.executeAsync=function(i,r,u){var f=this,e=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n._Internal.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(e,function(i){n.Utility.log("Response:");n.Utility.log(JSON.stringify(i));var r;i.status=="succeeded"?r=n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBody(i),n.RichApiMessageUtility.getResponseHeaders(i)):(r=n.RichApiMessageUtility.buildResponseOnError(i.error.code,i.error.message),f.m_context._processOfficeJsErrorResponse(i.error.code,r));t(r)})})},t.SourceLibHeaderValue="officejs",t}();n.OfficeJsRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){n.OfficeRequire=function(){return null}()})(t=n._Internal||(n._Internal={})),function(n){var t;(function(t){function i(){return function(){"use strict";function vt(n){return typeof n=="function"||typeof n=="object"&&n!==null}function b(n){return typeof n=="function"}function yt(n){return typeof n=="object"&&n!==null}function wt(n){k=n}function bt(n){f=n}function ni(){var t=process.nextTick,n=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&n[1]==="0"&&n[2]==="10"&&(t=setImmediate),function(){t(c)}}function tr(){return function(){pt(c)}}function ti(){var n=0,i=new it(c),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function ii(){var n=new MessageChannel;return n.port1.onmessage=c,function(){n.port2.postMessage(0)}}function ri(){return function(){setTimeout(c,1)}}function c(){for(var t,i,n=0;n=0?(n=n.substring(t+5,n.length),n<"14.14393"?!0:!1):!1}function i(){return typeof window=="undefined"&&typeof Promise=="function"?Promise:typeof window!="undefined"&&window.Promise?t()?n.PromiseImpl.Init():window.Promise:n.PromiseImpl.Init()}n.OfficePromise=i()}(t=n._Internal||(n._Internal={}));i=t.OfficePromise;n.Promise=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this._autoCleanupList={};this.m_context=n}return t.prototype.add=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._addCommon(n,!0)}):this._addCommon(n,!0)},t.prototype._autoAdd=function(n){this._addCommon(n,!1);this._autoCleanupList[n._objectPath.objectPathInfo.Id]=n},t.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(t,i){var r=this.m_context._autoCleanup&&!t[n.Constants.isTracked]&&t!==this.m_context._rootObject&&i&&!n.Utility.isNullOrEmptyString(i[n.Constants.referenceId]);r&&(this._autoCleanupList[t._objectPath.objectPathInfo.Id]=t,t[n.Constants.isTracked]=!0)},t.prototype._addCommon=function(t,i){if(t[n.Constants.isTracked]){i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id];return}var r=t[n.Constants.referenceId];n.Utility.isNullOrEmptyString(r)&&t._KeepReference&&(t._KeepReference(),n.ActionFactory.createInstantiateAction(this.m_context,t),i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id],t[n.Constants.isTracked]=!0)},t.prototype.remove=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._removeCommon(n)}):this._removeCommon(n)},t.prototype._removeCommon=function(t){var r=t[n.Constants.referenceId],i;n.Utility.isNullOrEmptyString(r)||(i=this.m_context._rootObject,i._RemoveReference&&i._RemoveReference(r),delete t[n.Constants.isTracked])},t.prototype._retrieveAndClearAutoCleanupList=function(){var n=this._autoCleanupList;return this._autoCleanupList={},n},t}();n.TrackedObjects=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){n||(n="root");this.m_globalObjName=n;this.m_referencedObjectPaths=t;this.m_actions=i;this.m_statements=[];this.m_variableNameForObjectPathMap={};this.m_variableNameToObjectPathMap={};this.m_declaredObjectPathMap={};this.m_showDispose=r}return t.prototype.process=function(){this.m_showDispose&&n.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions);for(var t=0;t=0&&this.m_statements.length>i+o+1)break;if(i<0)return null;for(f=i-o,f<0&&(f=0),e=i+1+o,e>this.m_statements.length&&(e=this.m_statements.length),r=[],f!=0&&r.push("..."),s=f;s>>>>"),r.push(this.m_statements[i]),r.push("// <<<<<"),h=i+1;h0)?(r=i.map(function(n){return u.getObjVarName(n)}).join(", "),n+" // And then dispose {"+r+"}"):n},t.prototype.buildQueryExpression=function(n){if(n.actionInfo.QueryInfo){var t={};return t.select=n.actionInfo.QueryInfo.Select,t.expand=n.actionInfo.QueryInfo.Expand,t.skip=n.actionInfo.QueryInfo.Skip,t.top=n.actionInfo.QueryInfo.Top,typeof t.top=="undefined"&&typeof t.skip=="undefined"&&typeof t.expand=="undefined"?typeof t.select=="undefined"?"":JSON.stringify(t.select):JSON.stringify(t)}return""},t.prototype.buildObjectPathExpressionWithParent=function(n){var t=n.objectPathInfo.ObjectPathType==5||n.objectPathInfo.ObjectPathType==3||n.objectPathInfo.ObjectPathType==4;return t&&n.objectPathInfo.ParentObjectPathId?this.getObjVarName(n.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(n):this.buildObjectPathExpression(n)},t.prototype.buildObjectPathExpression=function(t){switch(t.objectPathInfo.ObjectPathType){case 1:return"context."+this.m_globalObjName;case 5:return"getItem("+this.buildArgumentsExpression(t.objectPathInfo.ArgumentInfo)+")";case 3:return n.Utility._toCamelLowerCase(t.objectPathInfo.Name)+"("+this.buildArgumentsExpression(t.objectPathInfo.ArgumentInfo)+")";case 2:return t.objectPathInfo.Name+".newObject()";case 7:return"null";case 4:return n.Utility._toCamelLowerCase(t.objectPathInfo.Name);case 6:return"context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(t.objectPathInfo.Name)+")"}},t.prototype.buildArgumentsExpression=function(n){var t="",i;if(!n.Arguments)return t;for(i=0;i0&&(t=t+", "),t=t+this.buildArgumentLiteral(n.Arguments[i],n.ReferencedObjectPathIds?n.ReferencedObjectPathIds[i]:null);return t==="undefined"&&(t=""),t},t.prototype.buildArgumentLiteral=function(n,t){return typeof n=="number"&&n===t?this.getObjVarName(t):JSON.stringify(n)},t.prototype.getObjVarNameBase=function(t){var u="v",f=this.m_referencedObjectPaths[t],i,r;switch(f.objectPathInfo.ObjectPathType){case 1:u=this.m_globalObjName;break;case 4:u=n.Utility._toCamelLowerCase(f.objectPathInfo.Name);break;case 3:i=f.objectPathInfo.Name;i.length>3&&i.substr(0,3)==="Get"&&(i=i.substr(3));u=n.Utility._toCamelLowerCase(i);break;case 5:r=this.getObjVarNameBase(f.objectPathInfo.ParentObjectPathId);u=r.charAt(r.length-1)==="s"?r.substr(0,r.length-1):r+"Item";break}return u},t.prototype.getObjVarName=function(n){var t,i;if(this.m_variableNameForObjectPathMap[n])return this.m_variableNameForObjectPathMap[n];if(t=this.getObjVarNameBase(n),!this.m_variableNameToObjectPathMap[t])return this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t;for(i=1;this.m_variableNameToObjectPathMap[t+i.toString()];)i++;return t=t+i.toString(),this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t},t}();n.RequestPrettyPrinter=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.cannotRegisterEvent="CannotRegisterEvent",n.connectionFailureWithStatus="ConnectionFailureWithStatus",n.connectionFailureWithDetails="ConnectionFailureWithDetails",n.invalidObjectPath="InvalidObjectPath",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.invalidArgumentGeneric="InvalidArgumentGeneric",n.propertyNotLoaded="PropertyNotLoaded",n.runMustReturnPromise="RunMustReturnPromise",n.timeout="Timeout",n.propertyDoesNotExist="PropertyDoesNotExist",n.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",n.moreInfoInnerError="MoreInfoInnerError",n.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",n.valueNotLoaded="ValueNotLoaded",n.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage",n.invalidOperationInCellEditMode="InvalidOperationInCellEditMode",n.customFunctionDefintionMissing="CustomFunctionDefintionMissing",n.customFunctionImplementationMissing="CustomFunctionImplementationMissing",n.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars",n.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit",n.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch",n.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing",n.apiNotFoundDetails="ApiNotFoundDetails",n}();n.ResourceStrings=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.CannotRegisterEvent="The event handler cannot be registered.",n.ConnectionFailureWithStatus="The request failed with status code of {0}.",n.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}",n.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",n.InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',n.InvalidRequestContext="Cannot use the object across different request contexts.",n.PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",n.RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',n.Timeout="The operation has timed out.",n.ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.',n.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.",n.InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.",n.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions.",n.CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.",n.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods.",n.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name.",n.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.",n.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.",n.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.",n}();n.ResourceStringValues=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.buildMessageArrayForIRequestExecutor=function(i,r,u,f){var o=JSON.stringify(u.Body),e;return n.Utility.log("Request:"),n.Utility.log(o),e={},e[n.Constants.sourceLibHeader]=f,t.buildRequestMessageSafeArray(i,r,"POST","ProcessQuery",e,o)},t.buildResponseOnSuccess=function(n,t){var i={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return i.Body=JSON.parse(n),i.Headers=t,i},t.buildResponseOnError=function(i,r){var u={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return u.ErrorCode=n.ErrorCodes.generalException,u.ErrorMessage=r,i==t.OfficeJsErrorCode_ooeNoCapability?u.ErrorCode=n.ErrorCodes.accessDenied:i==t.OfficeJsErrorCode_ooeActivityLimitReached?u.ErrorCode=n.ErrorCodes.activityLimitReached:i==t.OfficeJsErrorCode_ooeInvalidOrTimedOutSession&&(u.ErrorCode=n.ErrorCodes.invalidOrTimedOutSession,u.ErrorMessage=n.Utility._getResourceString(n.ResourceStrings.invalidOrTimedOutSessionMessage)),u},t.buildHttpResponseFromOfficeJsError=function(i,r){var f=500,u={};return u.error={},u.error.code=n.ErrorCodes.generalException,u.error.message=r,i===t.OfficeJsErrorCode_ooeNoCapability?(f=403,u.error.code=n.ErrorCodes.accessDenied):i===t.OfficeJsErrorCode_ooeActivityLimitReached&&(f=429,u.error.code=n.ErrorCodes.activityLimitReached),{statusCode:f,headers:{},body:JSON.stringify(u)}},t.buildRequestMessageSafeArray=function(n,t,i,r,u,f){var e=[],o;if(u)for(o in u)e.push(o),e.push(u[o]);var s=0,h="",c="",l="";return[n,i,r,e,f,s,t,h,c,l]},t.getResponseBody=function(n){return t.getResponseBodyFromSafeArray(n.value.data)},t.getResponseHeaders=function(n){return t.getResponseHeadersFromSafeArray(n.value.data)},t.getResponseBodyFromSafeArray=function(n){var t=n[2],i;return typeof t=="string"?t:(i=t,i.join(""))},t.getResponseHeadersFromSafeArray=function(n){var i=n[1],r,t;if(!i)return null;for(r={},t=0;t0&&f.push(i);return f},t.toJson=function(n,t,i,r){var e={},u,f;for(u in t)f=t[u],typeof f!="undefined"&&(e[u]=f);for(u in i)f=i[u],typeof f!="undefined"&&(e[u]=f.toJSON());return r&&(e.items=r.map(function(n){return n.toJSON()})),e},t.throwError=function(i,r,u){throw new n._Internal.RuntimeError({code:i,message:t._getResourceString(i,r),debugInfo:u?{errorLocation:u}:undefined});},t.createRuntimeError=function(t,i,r){return new n._Internal.RuntimeError({code:t,message:i,debugInfo:{errorLocation:r}})},t._getResourceString=function(i,r){var u,e,f,o;return typeof window!="undefined"&&window.Strings&&window.Strings.OfficeOM&&(e="L_"+i,f=window.Strings.OfficeOM[e],f&&(u=f)),u||(u=n.ResourceStringValues[i]),u||(u=i),t.isNullOrUndefined(r)||(Array.isArray(r)?(o=r,u=t._formatString(u,o)):u=u.replace("{0}",r)),u},t._formatString=function(t,i){return t.replace(/\{\d\}/g,function(t){var r=parseInt(t.substr(1,t.length-2));if(r0?".":"")+i;break;case 3:i=t.normalizeName(n.objectPathInfo.Name)+"()"+(i.length>0?".":"")+i;break;case 4:i=t.normalizeName(n.objectPathInfo.Name)+(i.length>0?".":"")+i;break;case 5:i="getItem()"+(i.length>0?".":"")+i;break;case 6:i="_reference()"+(i.length>0?".":"")+i;break}n=n.parentObjectPath}return i},t._createPromiseFromResult=function(t){return new n._Internal.OfficePromise(function(n,i){n(t)})},t._createTimeoutPromise=function(t){return new n._Internal.OfficePromise(function(n,i){setTimeout(function(){n(null)},t)})},t.promisify=function(t){return new n._Internal.OfficePromise(function(n,i){var r=function(t){t.status=="failed"?i(t.error):n(t.value)};t(r)})},t._addActionResultHandler=function(n,t,i){n.context._pendingRequest.addActionResultHandler(t,i)},t._handleNavigationPropertyResults=function(n,i,r){for(var u=0;u0},t._getLocalDocumentUrlPrefixLength=function(n){for(var i=["http://document.localhost","https://document.localhost","//document.localhost"],r=n.toLowerCase().trim(),t=0;t0))for(s=i.url.substr(f+1),e=s.split("&"),u=0;u0&&(f=i.substr(0,u),e=i.substr(u+1),f=t.trim(f),e=t.trim(e),s[f.toUpperCase()]=e));return s},t._parseErrorResponse=function(i){var r=null,f,e,u;if(t.isPlainJsonObject(i.body))r=i.body;else if(!t.isNullOrEmptyString(i.body)){f=t.trim(i.body);try{r=JSON.parse(f)}catch(o){t.log("Error when parse "+f)}}return!t.isNullOrUndefined(r)&&typeof r=="object"&&r.error?(u=r.error.code,e=t._getResourceString(n.ResourceStrings.connectionFailureWithDetails,[i.statusCode.toString(),r.error.code,r.error.message])):e=t._getResourceString(n.ResourceStrings.connectionFailureWithStatus,i.statusCode.toString()),t.isNullOrEmptyString(u)&&(u=n.ErrorCodes.connectionFailure),{errorCode:u,errorMessage:e}},t._copyHeaders=function(n,t){if(n&&t)for(var i in n)t[i]=n[i]},t._toCamelLowerCase=function(n){if(t.isNullOrEmptyString(n))return n;for(var i=0;i=65&&n.charCodeAt(i)<=90;)i++;return i 6 && v.slice(0, 5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) { + d=new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + } + else { + value=Sys.Serialization.JavaScriptSerializer.deserialize(value, true); + } + ret[key]=value; + } + catch (ex) { + } + } + return ret; + }, loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) { if (url && callback) { var doc=window.document; @@ -835,6 +885,14 @@ OSF.OUtil=(function () { } } }, + removeClass: function OSF_OUtil$removeClass(elmt, val) { + if (OSF.OUtil.hasClass(elmt, val)) { + var className=elmt.getAttribute(_classN); + var reg=new RegExp('(\\s|^)'+val+'(\\s|$)'); + className=className.replace(reg, ''); + elmt.setAttribute(_classN, className); + } + }, hasClass: function OSF_OUtil$hasClass(elmt, clsName) { var className=elmt.getAttribute(_classN); return className && className.match(new RegExp('(\\s|^)'+clsName+'(\\s|$)')); @@ -971,6 +1029,12 @@ OSF.OUtil.Guid=(function () { })(); window.OSF=OSF; OSF.OUtil.setNamespace("OSF", window); +OSF.MessageIDs={ + "FetchBundleUrl": 0, + "LoadReactBundle": 1, + "LoadBundleSuccess": 2, + "LoadBundleError": 3 +}; OSF.AppName={ Unsupported: 0, Excel: 1, @@ -998,7 +1062,8 @@ OSF.AppName={ OutlookAndroid: 4194304, OneNoteWinRT: 8388608, ExcelAndroid: 8388609, - VisioWebApp: 8388610 + VisioWebApp: 8388610, + OneNoteIOS: 8388611 }; OSF.InternalPerfMarker={ DataCoercionBegin: "Agave.HostCall.CoerceDataStart", @@ -1028,7 +1093,9 @@ OSF.AgaveHostAction={ "EscExit": 15, "F2Exit": 16, "ExitNoFocusable": 17, - "ExitNoFocusableShift": 18 + "ExitNoFocusableShift": 18, + "MouseEnter": 19, + "MouseLeave": 20 }; OSF.SharedConstants={ "NotificationConversationIdSuffix": '_ntf' @@ -1162,6 +1229,10 @@ Microsoft.Office.WebExtension.Parameters={ Status: "status", PlatformType: "platformType", HostType: "hostType", + ForceConsent: "forceConsent", + ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + Reserved: "reserved", Xml: "xml", Namespace: "namespace", Prefix: "prefix", @@ -1194,6 +1265,7 @@ Microsoft.Office.WebExtension.Parameters={ DisplayInIframe: "displayInIframe", MessageContent: "messageContent", HideTitle: "hideTitle", + UseDeviceIndependentPixels: "useDeviceIndependentPixels", AppCommandInvocationCompletedData: "appCommandInvocationCompletedData" }; OSF.OUtil.setNamespace("DDA", OSF); @@ -1250,6 +1322,8 @@ OSF.DDA.MethodDispId={ dispidExecuteRichApiRequestMethod: 93, dispidAppCommandInvocationCompletedMethod: 94, dispidCloseContainerMethod: 97, + dispidGetAccessTokenMethod: 98, + dispidOpenBrowserWindow: 102, dispidGetSelectedTaskMethod: 110, dispidGetSelectedResourceMethod: 111, dispidGetTaskMethod: 112, @@ -1283,8 +1357,7 @@ OSF.DDA.MethodDispId={ dispidSetDataNodeTextMethod: 143, dispidMessageParentMethod: 144, dispidSendMessageMethod: 145, - dispidGetDelegateTokenMethod: 146, - dispidMethodMax: 146 + dispidMethodMax: 145 }; OSF.DDA.EventDispId={ dispidEventMin: 0, @@ -1301,9 +1374,16 @@ OSF.DDA.EventDispId={ dispidDialogMessageReceivedEvent: 10, dispidDialogNotificationShownInAddinEvent: 11, dispidDialogParentMessageReceivedEvent: 12, + dispidObjectDeletedEvent: 13, + dispidObjectSelectionChangedEvent: 14, + dispidObjectDataChangedEvent: 15, + dispidContentControlAddedEvent: 16, dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, dispidAppCommandInvokedEvent: 39, dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, dispidTaskSelectionChangedEvent: 56, dispidResourceSelectionChangedEvent: 57, dispidViewSelectionChangedEvent: 58, @@ -1390,6 +1470,7 @@ OSF.DDA.ErrorCodeManager=(function () { ooeInvalidParam: 5010, ooeRequestTimeout: 5011, ooeInvalidOrTimedOutSession: 5012, + ooeInvalidApiArguments: 5013, ooeTooManyIncompleteRequests: 5100, ooeRequestTokenUnavailable: 5101, ooeActivityLimitReached: 5102, @@ -1425,7 +1506,18 @@ OSF.DDA.ErrorCodeManager=(function () { ooeEndUserAllow: 12008, ooeEndUserIgnore: 12009, ooeNotUILessDialog: 12010, - ooeCrossZone: 12011 + ooeCrossZone: 12011, + ooeNotSSOAgave: 13000, + ooeSSOUserNotSignedIn: 13001, + ooeSSOUserAborted: 13002, + ooeSSOUnsupportedUserIdentity: 13003, + ooeSSOInvalidResourceUrl: 13004, + ooeSSOInvalidGrant: 13005, + ooeSSOClientError: 13006, + ooeSSOServerError: 13007, + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009, + ooeSSOConnectionLost: 13010 }, initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={ name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotSupported }; @@ -1483,6 +1575,7 @@ OSF.DDA.ErrorCodeManager=(function () { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={ name: stringNS.L_APICallFailed, message: stringNS.L_TooManyIncompleteRequests }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={ name: stringNS.L_APICallFailed, message: stringNS.L_RequestTokenUnavailable }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={ name: stringNS.L_APICallFailed, message: stringNS.L_ActivityLimitReached }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={ name: stringNS.L_APICallFailed, message: stringNS.L_InvalidApiArgumentsMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={ name: stringNS.L_InvalidNode, message: stringNS.L_CustomXmlNodeNotFound }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={ name: stringNS.L_CustomXmlError, message: stringNS.L_CustomXmlError }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={ name: stringNS.L_CustomXmlExceedQuotaName, message: stringNS.L_CustomXmlExceedQuotaMessage }; @@ -1513,6 +1606,17 @@ OSF.DDA.ErrorCodeManager=(function () { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={ name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogRequireHTTPS }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={ name: stringNS.L_DisplayDialogError, message: stringNS.L_UserClickIgnore }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={ name: stringNS.L_DisplayDialogError, message: stringNS.L_NewWindowCrossZoneErrorString }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={ name: stringNS.L_APINotSupported, message: stringNS.L_InvalidSSOAddinMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={ name: stringNS.L_UserNotSignedIn, message: stringNS.L_UserNotSignedIn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={ name: stringNS.L_UserAborted, message: stringNS.L_UserAbortedMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={ name: stringNS.L_UnsupportedUserIdentity, message: stringNS.L_UnsupportedUserIdentityMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={ name: stringNS.L_InvalidResourceUrl, message: stringNS.L_InvalidResourceUrlMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={ name: stringNS.L_InvalidGrant, message: stringNS.L_InvalidGrantMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={ name: stringNS.L_SSOClientError, message: stringNS.L_SSOClientErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={ name: stringNS.L_SSOServerError, message: stringNS.L_SSOServerErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={ name: stringNS.L_AddinIsAlreadyRequestingToken, message: stringNS.L_AddinIsAlreadyRequestingTokenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={ name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={ name: stringNS.L_SSOConnectionLostError, message: stringNS.L_SSOConnectionLostErrorMessage }; } }; })(); @@ -2035,6 +2139,7 @@ var OfficeExt; web: Microsoft.Office.WebExtension.PlatformType.OfficeOnline, winrt: Microsoft.Office.WebExtension.PlatformType.Universal, win32: Microsoft.Office.WebExtension.PlatformType.PC, + mac: Microsoft.Office.WebExtension.PlatformType.Mac, ios: Microsoft.Office.WebExtension.PlatformType.iOS, android: Microsoft.Office.WebExtension.PlatformType.Android }; @@ -2208,6 +2313,11 @@ OSF.DDA.Context=function OSF_DDA_Context(officeAppContext, document, license, ap value: officeAppContext.ui }); } + if (officeAppContext.auth) { + OSF.OUtil.defineEnumerableProperty(this, "auth", { + value: officeAppContext.auth + }); + } if (officeAppContext.get_isDialog()) { var requirements=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); OSF.OUtil.defineEnumerableProperty(this, "requirements", { @@ -2982,9 +3092,11 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, "ClearFormatsAsync": did.dispidClearFormatsMethod, "SetTableOptionsAsync": did.dispidSetTableOptionsMethod, "SetFormatsAsync": did.dispidSetFormatsMethod, + "GetAccessTokenAsync": did.dispidGetAccessTokenMethod, "ExecuteRichApiRequestAsync": did.dispidExecuteRichApiRequestMethod, "AppCommandInvocationCompletedAsync": did.dispidAppCommandInvocationCompletedMethod, "CloseContainerAsync": did.dispidCloseContainerMethod, + "OpenBrowserWindow": did.dispidOpenBrowserWindow, "AddDataPartAsync": did.dispidAddDataPartMethod, "GetDataPartByIdAsync": did.dispidGetDataPartByIdMethod, "GetDataPartsByNameSpaceAsync": did.dispidGetDataPartsByNamespaceMethod, @@ -3024,13 +3136,13 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, } jsom=OSF.DDA.SyncMethodNames; did=OSF.DDA.MethodDispId; - var asyncMethodMap={ + var syncMethodMap={ "MessageParent": did.dispidMessageParentMethod, "SendMessage": did.dispidSendMessageMethod }; - for (var method in asyncMethodMap) { + for (var method in syncMethodMap) { if (jsom[method]) { - dispIdMap[jsom[method].id]=asyncMethodMap[method]; + dispIdMap[jsom[method].id]=syncMethodMap[method]; } } jsom=Microsoft.Office.WebExtension.EventType; @@ -3046,7 +3158,14 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, "AppCommandInvoked": did.dispidAppCommandInvokedEvent, "DialogMessageReceived": did.dispidDialogMessageReceivedEvent, "DialogParentMessageReceived": did.dispidDialogParentMessageReceivedEvent, + "ObjectDeleted": did.dispidObjectDeletedEvent, + "ObjectSelectionChanged": did.dispidObjectSelectionChangedEvent, + "ObjectDataChanged": did.dispidObjectDataChangedEvent, + "ContentControlAdded": did.dispidContentControlAddedEvent, + "RichApiMessage": did.dispidRichApiMessageEvent, "ItemChanged": did.dispidOlkItemSelectedChangedEvent, + "RecipientsChanged": did.dispidOlkRecipientsChangedEvent, + "AppointmentTimeChanged": did.dispidOlkAppointmentTimeChangedEvent, "TaskSelectionChanged": did.dispidTaskSelectionChangedEvent, "ResourceSelectionChanged": did.dispidResourceSelectionChangedEvent, "ViewSelectionChanged": did.dispidViewSelectionChangedEvent, @@ -3059,6 +3178,12 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, dispIdMap[jsom[event]]=eventMap[event]; } } + function IsObjectEvent(dispId) { + return (dispId==OSF.DDA.EventDispId.dispidObjectDeletedEvent || + dispId==OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent || + dispId==OSF.DDA.EventDispId.dispidObjectDataChangedEvent || + dispId==OSF.DDA.EventDispId.dispidContentControlAddedEvent); + } function onException(ex, asyncMethodCall, suppliedArgs, callArgs) { if (typeof ex=="number") { if (!callArgs) { @@ -3084,11 +3209,13 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, window.Excel._RedirectV1APIs=true; } if (window.Excel && window.Excel._RedirectV1APIs && (richApiInExcelMethodSubstitution=window.Excel._V1APIMap[methodName])) { + var preprocessedCallArgs=OSF.OUtil.shallowCopy(callArgs); + delete preprocessedCallArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; if (richApiInExcelMethodSubstitution.preprocess) { - callArgs=richApiInExcelMethodSubstitution.preprocess(callArgs); + preprocessedCallArgs=richApiInExcelMethodSubstitution.preprocess(preprocessedCallArgs); } var ctx=new window.Excel.RequestContext(); - var result=richApiInExcelMethodSubstitution.call(ctx, callArgs); + var result=richApiInExcelMethodSubstitution.call(ctx, preprocessedCallArgs); ctx.sync() .then(function () { var response=result.value; @@ -3096,7 +3223,7 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, delete response["status"]; delete response["@odata.type"]; if (richApiInExcelMethodSubstitution.postprocess) { - response=richApiInExcelMethodSubstitution.postprocess(response, callArgs); + response=richApiInExcelMethodSubstitution.postprocess(response, preprocessedCallArgs); } if (status !=0) { response=OSF.DDA.ErrorCodeManager.getErrorArgs(status); @@ -3114,6 +3241,7 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, else { hostCallArgs=callArgs; } + var startTime=(new Date()).getTime(); delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ "dispId": dispId, "hostCallArgs": hostCallArgs, @@ -3134,6 +3262,9 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, } var payload=asyncMethodCall.processResponse(status, responseArgs, caller, callArgs); OSF.DDA.issueAsyncResult(callArgs, status, payload); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(dispId, hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); + } } }); } @@ -3145,9 +3276,11 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, this[OSF.DDA.DispIdHost.Methods.AddEventHandler]=function OSF_DDA_DispIdHost_Facade$AddEventHandler(suppliedArguments, eventDispatch, caller, isPopupWindow) { var callArgs; var eventType, handler; + var isObjectEvent=false; function onEnsureRegistration(status) { if (status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { - var added=eventDispatch.addEventHandler(eventType, handler); + var added=!isObjectEvent ? eventDispatch.addEventHandler(eventType, handler) : + eventDispatch.addObjectEventHandler(eventType, callArgs[Microsoft.Office.WebExtension.Parameters.Id], handler); if (!added) { status=OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed; } @@ -3167,19 +3300,25 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); return; } - if (eventDispatch.getEventHandlerCount(eventType)==0) { - var dispId=dispIdMap[eventType]; + var dispId=dispIdMap[eventType]; + isObjectEvent=IsObjectEvent(dispId); + var targetId=(isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); + var count=isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId) : eventDispatch.getEventHandlerCount(eventType); + if (count==0) { var invoker=getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; invoker({ "eventType": eventType, "dispId": dispId, - "targetId": caller.id || "", + "targetId": targetId, "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, "onComplete": onEnsureRegistration, "onEvent": function handleEvent(hostArgs) { var args=parameterMap.fromHost(dispId, hostArgs); - eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType, caller, args)); + if (!isObjectEvent) + eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType, caller, args)); + else + eventDispatch.fireObjectEvent(targetId, OSF.DDA.OMFactory.manufactureEventArgs(eventType, targetId, args)); } }); } @@ -3194,6 +3333,7 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, this[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]=function OSF_DDA_DispIdHost_Facade$RemoveEventHandler(suppliedArguments, eventDispatch, caller) { var callArgs; var eventType, handler; + var isObjectEvent=false; function onEnsureRegistration(status) { var error; if (status !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { @@ -3206,22 +3346,25 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); eventType=callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; handler=callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + var dispId=dispIdMap[eventType]; + isObjectEvent=IsObjectEvent(dispId); + var targetId=(isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); var status, removeSuccess; if (handler===null) { - removeSuccess=eventDispatch.clearEventHandlers(eventType); + removeSuccess=isObjectEvent ? eventDispatch.clearObjectEventHandlers(eventType, targetId) : eventDispatch.clearEventHandlers(eventType); status=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; } else { - removeSuccess=eventDispatch.removeEventHandler(eventType, handler); + removeSuccess=isObjectEvent ? eventDispatch.removeObjectEventHandler(eventType, targetId, handler) : eventDispatch.removeEventHandler(eventType, handler); status=removeSuccess ? OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess : OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist; } - if (removeSuccess && eventDispatch.getEventHandlerCount(eventType)==0) { - var dispId=dispIdMap[eventType]; + var count=isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId) : eventDispatch.getEventHandlerCount(eventType); + if (removeSuccess && count==0) { var invoker=getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; invoker({ "eventType": eventType, "dispId": dispId, - "targetId": caller.id || "", + "targetId": targetId, "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, "onComplete": onEnsureRegistration @@ -3989,7 +4132,6 @@ OSF.DDA.SafeArray.Delegate.executeAsync=function OSF_DDA_SafeArray_Delegate$Exec if (args.onCalling) { args.onCalling(); } - var startTime=(new Date()).getTime(); OSF.ClientHostController.execute(args.dispId, toArray(args.hostCallArgs), function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode) { var result=hostResponseArgs.toArray(); var status=result[OSF.DDA.SafeArray.Response.Status]; @@ -4036,9 +4178,6 @@ OSF.DDA.SafeArray.Delegate.executeAsync=function OSF_DDA_SafeArray_Delegate$Exec } args.onComplete(status, payload); } - if (OSF.AppTelemetry) { - OSF.AppTelemetry.onMethodDone(args.dispId, args.hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); - } return true; }); } @@ -4154,6 +4293,13 @@ OSF.InitializationHelper.prototype.prepareApiSurface=function OSF_Initialization } } } + if (OSF.DDA.OpenBrowser) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.OpenBrowserWindow]); + } + if (OSF.DDA.Auth) { + appContext.auth=new OSF.DDA.Auth(); + OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth, [OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]); + } OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(appContext, appContext.doc, license, null, getOfficeThemeHandler)); var getDelegateMethods, parameterMap; getDelegateMethods=OSF.DDA.DispIdHost.getClientDelegateMethods; @@ -4878,7 +5024,7 @@ var OSFAriaLogger; function AriaLogger() { } AriaLogger.prototype.getAriaCDNLocation=function () { - return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry-2.8.0.min.js"); + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry.js"); }; AriaLogger.getInstance=function () { if (AriaLogger.AriaLoggerObj===undefined) { @@ -4895,13 +5041,10 @@ var OSFAriaLogger; try { if (!this.ALogger) { var OfficeExtensibilityTenantID="db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; - var configuration=new microsoft.applications.telemetry.LogConfiguration(); - configuration.enableAutoUserSession=true; - microsoft.applications.telemetry.LogManager.initialize(OfficeExtensibilityTenantID, configuration); - this.ALogger=new microsoft.applications.telemetry.Logger(); + this.ALogger=AWTLogManager.initialize(OfficeExtensibilityTenantID); } - var eventProperties=new microsoft.applications.telemetry.EventProperties(); - eventProperties.name="Office.Extensibility.OfficeJS."+tableName; + var eventProperties=new AWTEventProperties(); + eventProperties.setName("Office.Extensibility.OfficeJS."+tableName); for (var key in telemetryData) { if (key.toLowerCase() !=="table") { eventProperties.setProperty(key, telemetryData[key]); @@ -4934,6 +5077,7 @@ var OSFAppTelemetry; var sessionId=OSF.OUtil.Guid.generateNewGuid(); var osfControlAppCorrelationId=""; var omexDomainRegex=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"); + OSFAppTelemetry.enableTelemetry=true; ; var AppInfo=(function () { function AppInfo() { @@ -5017,17 +5161,19 @@ var OSFAppTelemetry; function AppLogger() { } AppLogger.prototype.LogData=function (data) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, data.SerializeRow(), OSF.Logger.SendFlag.none); - OSFAriaLogger.AriaLogger.getInstance().logData(data); + try { + OSFAriaLogger.AriaLogger.getInstance().logData(data); + } + catch (e) { + } }; AppLogger.prototype.LogRawData=function (log) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, log, OSF.Logger.SendFlag.none); try { OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)); } @@ -5067,7 +5213,7 @@ var OSFAppTelemetry; } appInfo.message=context.get_hostCustomMessage(); appInfo.officeJSVersion=OSF.ConstantNames.FileVersion; - appInfo.hostJSVersion="16.0.7923.1000"; + appInfo.hostJSVersion="16.0.8828.1000"; if (context._wacHostEnvironment) { appInfo.wacHostEnvironment=context._wacHostEnvironment; } @@ -5296,10 +5442,15 @@ var OSFAppTelemetry; Microsoft.Office.WebExtension.EventType={}; OSF.EventDispatch=function OSF_EventDispatch(eventTypes) { this._eventHandlers={}; + this._objectEventHandlers={}; this._queuedEventsArgs={}; for (var entry in eventTypes) { var eventType=eventTypes[entry]; - this._eventHandlers[eventType]=[]; + var isObjectEvent=(eventType=="objectDeleted" || eventType=="objectSelectionChanged" || eventType=="objectDataChanged" || eventType=="contentControlAdded"); + if (!isObjectEvent) + this._eventHandlers[eventType]=[]; + else + this._objectEventHandlers[eventType]={}; this._queuedEventsArgs[eventType]=[]; } }; @@ -5308,17 +5459,20 @@ OSF.EventDispatch.prototype={ var events=[]; for (var eventName in this._eventHandlers) events.push(eventName); + for (var eventName in this._objectEventHandlers) + events.push(eventName); return events; }, supportsEvent: function OSF_EventDispatch$supportsEvent(event) { - var isSupported=false; for (var eventName in this._eventHandlers) { - if (event==eventName) { - isSupported=true; - break; - } + if (event==eventName) + return true; + } + for (var eventName in this._objectEventHandlers) { + if (event==eventName) + return true; } - return isSupported; + return false; }, hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) { var handlers=this._eventHandlers[eventType]; @@ -5330,6 +5484,17 @@ OSF.EventDispatch.prototype={ } return false; }, + hasObjectEventHandler: function OSF_EventDispatch$hasObjectEventHandler(eventType, objectId, handler) { + var handlers=this._objectEventHandlers[eventType]; + if (handlers !=null) { + var _handlers=handlers[objectId]; + for (var i=0; _handlers !=null && i < _handlers.length; i++) { + if (_handlers[i]===handler) + return true; + } + } + return false; + }, addEventHandler: function OSF_EventDispatch$addEventHandler(eventType, handler) { if (typeof handler !="function") { return false; @@ -5343,6 +5508,19 @@ OSF.EventDispatch.prototype={ return false; } }, + addObjectEventHandler: function OSF_EventDispatch$addObjectEventHandler(eventType, objectId, handler) { + if (typeof handler !="function") { + return false; + } + var handlers=this._objectEventHandlers[eventType]; + if (handlers && !this.hasObjectEventHandler(eventType, objectId, handler)) { + if (handlers[objectId]==null) + handlers[objectId]=[]; + handlers[objectId].push(handler); + return true; + } + return false; + }, addEventHandlerAndFireQueuedEvent: function OSF_EventDispatch$addEventHandlerAndFireQueuedEvent(eventType, handler) { var handlers=this._eventHandlers[eventType]; var isFirstHandler=handlers.length==0; @@ -5364,6 +5542,19 @@ OSF.EventDispatch.prototype={ } return false; }, + removeObjectEventHandler: function OSF_EventDispatch$removeObjectEventHandler(eventType, objectId, handler) { + var handlers=this._objectEventHandlers[eventType]; + if (handlers !=null) { + var _handlers=handlers[objectId]; + for (var i=0; _handlers !=null && i < _handlers.length; i++) { + if (_handlers[i]===handler) { + _handlers.splice(i, 1); + return true; + } + } + } + return false; + }, clearEventHandlers: function OSF_EventDispatch$clearEventHandlers(eventType) { if (typeof this._eventHandlers[eventType] !="undefined" && this._eventHandlers[eventType].length > 0) { this._eventHandlers[eventType]=[]; @@ -5371,9 +5562,21 @@ OSF.EventDispatch.prototype={ } return false; }, + clearObjectEventHandlers: function OSF_EventDispatch$clearObjectEventHandlers(eventType, objectId) { + if (this._objectEventHandlers[eventType] !=null && this._objectEventHandlers[eventType][objectId] !=null) { + this._objectEventHandlers[eventType][objectId]=[]; + return true; + } + return false; + }, getEventHandlerCount: function OSF_EventDispatch$getEventHandlerCount(eventType) { return this._eventHandlers[eventType] !=undefined ? this._eventHandlers[eventType].length : -1; }, + getObjectEventHandlerCount: function OSF_EventDispatch$getObjectEventHandlerCount(eventType, objectId) { + if (this._objectEventHandlers[eventType]==null || this._objectEventHandlers[eventType][objectId]==null) + return 0; + return this._objectEventHandlers[eventType][objectId].length; + }, fireEvent: function OSF_EventDispatch$fireEvent(eventArgs) { if (eventArgs.type==undefined) return false; @@ -5388,6 +5591,21 @@ OSF.EventDispatch.prototype={ return false; } }, + fireObjectEvent: function OSF_EventDispatch$fireObjectEvent(objectId, eventArgs) { + if (eventArgs.type==undefined) + return false; + var eventType=eventArgs.type; + if (eventType && this._objectEventHandlers[eventType]) { + var eventHandlers=this._objectEventHandlers[eventType]; + var _handlers=eventHandlers[objectId]; + if (_handlers !=null) { + for (var i=0; i < _handlers.length; i++) + _handlers[i](eventArgs); + return true; + } + } + return false; + }, fireOrQueueEvent: function OSF_EventDispatch$fireOrQueueEvent(eventArgs) { var eventType=eventArgs.type; if (eventType && this._eventHandlers[eventType]) { @@ -5457,6 +5675,15 @@ OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEve case Microsoft.Office.WebExtension.EventType.AppCommandInvoked: args=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(eventProperties); break; + case Microsoft.Office.WebExtension.EventType.ObjectDeleted: + case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged: + case Microsoft.Office.WebExtension.EventType.ObjectDataChanged: + case Microsoft.Office.WebExtension.EventType.ContentControlAdded: + args=new OSF.DDA.ObjectEventArgs(eventType, eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); + break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args=new OSF.DDA.RichApiMessageEventArgs(eventType, eventProperties); + break; case Microsoft.Office.WebExtension.EventType.DataNodeInserted: args=new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); break; @@ -5482,10 +5709,28 @@ OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEve args=new OSF.DDA.DialogParentEventArgs(eventProperties); break; case Microsoft.Office.WebExtension.EventType.ItemChanged: - if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlookwebapp") { + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { args=new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); target.initialize(args["initialData"]); - target.setCurrentItemNumber(args["itemNumber"].itemNumber); + if (OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]=="win32") { + target.setCurrentItemNumber(args["itemNumber"].itemNumber); + } + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { + args=new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { + args=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); } else { throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); @@ -5672,6 +5917,13 @@ OSF.DDA.AsyncMethodCalls.define({ "types": ["boolean"], "defaultValue": false } + }, + { + name: Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels, + value: { + "types": ["boolean"], + "defaultValue": false + } } ], privateStateCallbacks: [], @@ -5709,13 +5961,13 @@ OSF.DDA.AsyncMethodCalls.define({ if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] <=0) { callArgs[Microsoft.Office.WebExtension.Parameters.Width]=1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Width]=99; } if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] <=0) { callArgs[Microsoft.Office.WebExtension.Parameters.Height]=1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Height]=99; } if (!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) { @@ -6221,52 +6473,10 @@ OSF.DDA.SettingsManager={ DateJSONPrefix: "Date(", DataJSONSuffix: ")", serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) { - var ret={}; - for (var key in settingsCollection) { - var value=settingsCollection[key]; - try { - if (JSON) { - value=JSON.stringify(value, function dateReplacer(k, v) { - return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix+this[k].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix : v; - }); - } - else { - value=Sys.Serialization.JavaScriptSerializer.serialize(value); - } - ret[key]=value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.serializeSettings(settingsCollection); }, deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) { - var ret={}; - serializedSettings=serializedSettings || {}; - for (var key in serializedSettings) { - var value=serializedSettings[key]; - try { - if (JSON) { - value=JSON.parse(value, function dateReviver(k, v) { - var d; - if (typeof v==='string' && v && v.length > 6 && v.slice(0, 5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) { - d=new Date(parseInt(v.slice(5, -1))); - if (d) { - return d; - } - } - return v; - }); - } - else { - value=Sys.Serialization.JavaScriptSerializer.deserialize(value, true); - } - ret[key]=value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.deserializeSettings(serializedSettings); } }; OSF.DDA.Settings=function OSF_DDA_Settings(settings) { @@ -7134,7 +7344,53 @@ OSF.DDA.DocumentSelectionChangedEventArgs=function OSF_DDA_DocumentSelectionChan } }); }; +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectDeleted: "objectDeleted" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectSelectionChanged: "objectSelectionChanged" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectDataChanged: "objectDataChanged" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ContentControlAdded: "contentControlAdded" }); +OSF.DDA.ObjectEventArgs=function OSF_DDA_ObjectEventArgs(eventType, object) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { value: eventType }, + "object": { value: object } + }); +}; OSF.DDA.SafeArray.Delegate.ParameterMap.define({ type: OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent }); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectDeletedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectDataChangedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidContentControlAddedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { BindingSelectionChanged: "bindingSelectionChanged", BindingDataChanged: "bindingDataChanged" @@ -7478,7 +7734,10 @@ OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { DataNodeDeleted: "nodeDeleted", DataNodeInserted: "nodeInserted", - DataNodeReplaced: "nodeReplaced" + DataNodeReplaced: "nodeReplaced", + NodeDeleted: "nodeDeleted", + NodeInserted: "nodeInserted", + NodeReplaced: "nodeReplaced" }); OSF.DDA.CustomXmlParts=function OSF_DDA_CustomXmlParts() { this._eventDispatches=[]; @@ -8366,6 +8625,37 @@ var OfficeExt; AppCommand.registerDdaFacade=registerDdaFacade; })(AppCommand=OfficeExt.AppCommand || (OfficeExt.AppCommand={})); })(OfficeExt || (OfficeExt={})); +OSF.DDA.AsyncMethodNames.addNames({ + OpenBrowserWindow: "openBrowserWindow" +}); +OSF.DDA.OpenBrowser=function OSF_DDA_OpenBrowser() { +}; +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.OpenBrowserWindow, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Url, + "types": ["string"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.Reserved, + value: { + "types": ["number"], + "defaultValue": 0 + } + } + ], + privateStateCallbacks: [] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidOpenBrowserWindow, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Reserved, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Url, value: 1 } + ] +}); OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize=function OSF_InitializationHelper$prepareRightAfterWebExtensionInitialize() { var appCommandHandler=OfficeExt.AppCommand.AppCommandManager.instance(); appCommandHandler.initializeAndChangeOnce(); @@ -8390,9 +8680,10 @@ var __extends=(this && this.__extends) || function (d, b) { var OfficeExtension; (function (OfficeExtension) { var Action=(function () { - function Action(actionInfo, isWriteOperation) { + function Action(actionInfo, isWriteOperation, isRestrictedResourceAccess) { this.m_actionInfo=actionInfo; this.m_isWriteOperation=isWriteOperation; + this.m_isRestrictedResourceAccess=isRestrictedResourceAccess; } Object.defineProperty(Action.prototype, "actionInfo", { get: function () { @@ -8408,12 +8699,30 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(Action.prototype, "isRestrictedResourceAccess", { + get: function () { + return this.m_isRestrictedResourceAccess; + }, + enumerable: true, + configurable: true + }); return Action; }()); OfficeExtension.Action=Action; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + var TraceMarkerActionResultHandler=(function () { + function TraceMarkerActionResultHandler(callback) { + this.m_callback=callback; + } + TraceMarkerActionResultHandler.prototype._handleResult=function (value) { + if (this.m_callback) { + this.m_callback(); + } + }; + return TraceMarkerActionResultHandler; + }()); var ActionFactory=(function () { function ActionFactory() { } @@ -8429,13 +8738,17 @@ var OfficeExtension; var args=[value]; var referencedArgumentObjectPaths=OfficeExtension.Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); OfficeExtension.Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); - var ret=new OfficeExtension.Action(actionInfo, true); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + context._pendingRequest.ensureInstantiateObjectPaths(referencedArgumentObjectPaths); + var ret=new OfficeExtension.Action(actionInfo, true, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); context._pendingRequest.addReferencedObjectPaths(referencedArgumentObjectPaths); + ret.referencedObjectPath=parent._objectPath; + ret.referencedArgumentObjectPaths=referencedArgumentObjectPaths; return ret; }; - ActionFactory.createMethodAction=function (context, parent, methodName, operationType, args) { + ActionFactory.createMethodAction=function (context, parent, methodName, operationType, args, isRestrictedResourceAccess) { OfficeExtension.Utility.validateObjectPath(parent); var actionInfo={ Id: context._nextId(), @@ -8446,15 +8759,20 @@ var OfficeExtension; }; var referencedArgumentObjectPaths=OfficeExtension.Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); OfficeExtension.Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + context._pendingRequest.ensureInstantiateObjectPaths(referencedArgumentObjectPaths); var isWriteOperation=operationType !=1; - var ret=new OfficeExtension.Action(actionInfo, isWriteOperation); + var ret=new OfficeExtension.Action(actionInfo, isWriteOperation, isRestrictedResourceAccess); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); context._pendingRequest.addReferencedObjectPaths(referencedArgumentObjectPaths); + ret.referencedObjectPath=parent._objectPath; + ret.referencedArgumentObjectPaths=referencedArgumentObjectPaths; return ret; }; ActionFactory.createQueryAction=function (context, parent, queryOption) { OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); var actionInfo={ Id: context._nextId(), ActionType: 2, @@ -8462,13 +8780,15 @@ var OfficeExtension; ObjectPathId: parent._objectPath.objectPathInfo.Id, }; actionInfo.QueryInfo=queryOption; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; return ret; }; ActionFactory.createRecursiveQueryAction=function (context, parent, query) { OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); var actionInfo={ Id: context._nextId(), ActionType: 6, @@ -8476,23 +8796,59 @@ var OfficeExtension; ObjectPathId: parent._objectPath.objectPathInfo.Id, RecursiveQueryInfo: query }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; + return ret; + }; + ActionFactory.createQueryAsJsonAction=function (context, parent, queryOption) { + OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + var actionInfo={ + Id: context._nextId(), + ActionType: 7, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + }; + actionInfo.QueryInfo=queryOption; + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; + return ret; + }; + ActionFactory.createEnsureUnchangedAction=function (context, parent, objectState) { + OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + var actionInfo={ + Id: context._nextId(), + ActionType: 8, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }; + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; return ret; }; ActionFactory.createInstantiateAction=function (context, obj) { OfficeExtension.Utility.validateObjectPath(obj); + context._pendingRequest.ensureInstantiateObjectPath(obj._objectPath.parentObjectPath); + context._pendingRequest.ensureInstantiateObjectPaths(obj._objectPath.argumentObjectPaths); var actionInfo={ Id: context._nextId(), ActionType: 1, Name: "", ObjectPathId: obj._objectPath.objectPathInfo.Id }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(obj._objectPath); context._pendingRequest.addActionResultHandler(ret, new OfficeExtension.InstantiateActionResultHandler(obj)); + ret.referencedObjectPath=obj._objectPath; return ret; }; ActionFactory.createTraceAction=function (context, message, addTraceMessage) { @@ -8502,13 +8858,17 @@ var OfficeExtension; Name: "Trace", ObjectPathId: 0 }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); if (addTraceMessage) { context._pendingRequest.addTrace(actionInfo.Id, message); } return ret; }; + ActionFactory.createTraceMarkerForCallback=function (context, callback) { + var action=ActionFactory.createTraceAction(context, null, false); + context._pendingRequest.addActionResultHandler(action, new TraceMarkerActionResultHandler(callback)); + }; return ActionFactory; }()); OfficeExtension.ActionFactory=ActionFactory; @@ -8586,6 +8946,7 @@ var OfficeExtension; }; ClientObject.prototype._recursivelySet=function (input, options, scalarWriteablePropertyNames, objectPropertyNames, notAllowedToBeSetPropertyNames) { var isClientObject=(input instanceof ClientObject); + var originalInput=input; if (isClientObject) { if (Object.getPrototypeOf(this)===Object.getPrototypeOf(input)) { input=JSON.parse(JSON.stringify(input)); @@ -8602,31 +8963,38 @@ var OfficeExtension; for (var i=0; i < scalarWriteablePropertyNames.length; i++) { prop=scalarWriteablePropertyNames[i]; if (input.hasOwnProperty(prop)) { - this[prop]=input[prop]; + if (typeof input[prop] !=="undefined") { + this[prop]=input[prop]; + } } } for (var i=0; i < objectPropertyNames.length; i++) { prop=objectPropertyNames[i]; if (input.hasOwnProperty(prop)) { - this[prop].set(input[prop], options); + if (typeof input[prop] !=="undefined") { + var dataToPassToSet=isClientObject ? originalInput[prop] : input[prop]; + this[prop].set(dataToPassToSet, options); + } } } + var throwOnReadOnly=!isClientObject; + if (options && !OfficeExtension.Utility.isNullOrUndefined(throwOnReadOnly)) { + throwOnReadOnly=options.throwOnReadOnly; + } for (var i=0; i < notAllowedToBeSetPropertyNames.length; i++) { prop=notAllowedToBeSetPropertyNames[i]; if (input.hasOwnProperty(prop)) { - throw new OfficeExtension._Internal.RuntimeError({ - code: OfficeExtension.ErrorCodes.invalidArgument, - message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), - debugInfo: { - errorLocation: prop - } - }); + if (typeof input[prop] !=="undefined" && throwOnReadOnly) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.invalidArgument, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), + debugInfo: { + errorLocation: prop + } + }); + } } } - var throwOnReadOnly=!isClientObject; - if (options && !OfficeExtension.Utility.isNullOrUndefined(throwOnReadOnly)) { - throwOnReadOnly=options.throwOnReadOnly; - } for (prop in input) { if (scalarWriteablePropertyNames.indexOf(prop) < 0 && objectPropertyNames.indexOf(prop) < 0) { var propertyDescriptor=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this), prop); @@ -8674,12 +9042,14 @@ var OfficeExtension; this.m_actions=[]; this.m_actionResultHandler={}; this.m_referencedObjectPaths={}; + this.m_instantiatedObjectPaths={}; this.m_flags=0; this.m_traceInfos={}; this.m_pendingProcessEventHandlers=[]; this.m_pendingEventHandlerActions={}; this.m_responseTraceIds={}; this.m_responseTraceMessages=[]; + this.m_preSyncPromises=[]; } Object.defineProperty(ClientRequest.prototype, "flags", { get: function () { @@ -8725,7 +9095,13 @@ var OfficeExtension; if (action.isWriteOperation) { this.m_flags=this.m_flags | 1; } + if (action.isRestrictedResourceAccess) { + this.m_flags=this.m_flags | 2; + } this.m_actions.push(action); + if (action.actionInfo.ActionType==1) { + this.m_instantiatedObjectPaths[action.actionInfo.ObjectPathId]=action; + } }; Object.defineProperty(ClientRequest.prototype, "hasActions", { get: function () { @@ -8734,9 +9110,39 @@ var OfficeExtension; enumerable: true, configurable: true }); + ClientRequest.prototype._getLastAction=function () { + return this.m_actions[this.m_actions.length - 1]; + }; ClientRequest.prototype.addTrace=function (actionId, message) { this.m_traceInfos[actionId]=message; }; + ClientRequest.prototype.ensureInstantiateObjectPath=function (objectPath) { + if (objectPath) { + if (this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + this.ensureInstantiateObjectPath(objectPath.parentObjectPath); + this.ensureInstantiateObjectPaths(objectPath.argumentObjectPaths); + if (!this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + var actionInfo={ + Id: this.m_context._nextId(), + ActionType: 1, + Name: "", + ObjectPathId: objectPath.objectPathInfo.Id + }; + var instantiateAction=new OfficeExtension.Action(actionInfo, false, false); + instantiateAction.referencedObjectPath=objectPath; + this.addAction(instantiateAction); + } + } + }; + ClientRequest.prototype.ensureInstantiateObjectPaths=function (objectPaths) { + if (objectPaths) { + for (var i=0; i < objectPaths.length; i++) { + this.ensureInstantiateObjectPath(objectPaths[i]); + } + } + }; ClientRequest.prototype.addReferencedObjectPath=function (objectPath) { if (this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]) { return; @@ -8754,6 +9160,9 @@ var OfficeExtension; if (objectPath.isWriteOperation) { this.m_flags=this.m_flags | 1; } + if (objectPath.isRestrictedResourceAccess) { + this.m_flags=this.m_flags | 2; + } this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]=objectPath; if (objectPath.objectPathInfo.ObjectPathType==3) { this.addReferencedObjectPaths(objectPath.argumentObjectPaths); @@ -8772,6 +9181,9 @@ var OfficeExtension; this.m_actionResultHandler[action.actionInfo.Id]=resultHandler; }; ClientRequest.prototype.buildRequestMessageBody=function () { + if (OfficeExtension._internalConfig.enableEarlyDispose) { + ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } var objectPaths={}; for (var i in this.m_referencedObjectPaths) { objectPaths[i]=this.m_referencedObjectPaths[i].objectPathInfo; @@ -8822,13 +9234,96 @@ var OfficeExtension; ClientRequest.prototype._getPendingEventHandlerActions=function (eventHandlers) { return this.m_pendingEventHandlerActions[eventHandlers._id]; }; - return ClientRequest; - }()); - OfficeExtension.ClientRequest=ClientRequest; -})(OfficeExtension || (OfficeExtension={})); -var OfficeExtension; -(function (OfficeExtension) { - var SessionBase=(function () { + ClientRequest.prototype._addPreSyncPromise=function (value) { + this.m_preSyncPromises.push(value); + }; + Object.defineProperty(ClientRequest.prototype, "_preSyncPromises", { + get: function () { + return this.m_preSyncPromises; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_actions", { + get: function () { + return this.m_actions; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_objectPaths", { + get: function () { + return this.m_referencedObjectPaths; + }, + enumerable: true, + configurable: true + }); + ClientRequest._updateLastUsedActionIdOfObjectPathId=function (lastUsedActionIdOfObjectPathId, objectPath, actionId) { + while (objectPath) { + if (lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]) { + return; + } + lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]=actionId; + var argumentObjectPaths=objectPath.argumentObjectPaths; + if (argumentObjectPaths) { + var argumentObjectPathsLength=argumentObjectPaths.length; + for (var i=0; i < argumentObjectPathsLength; i++) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, argumentObjectPaths[i], actionId); + } + } + objectPath=objectPath.parentObjectPath; + } + }; + ClientRequest._calculateLastUsedObjectPathIds=function (actions) { + var lastUsedActionIdOfObjectPathId={}; + var actionsLength=actions.length; + for (var index=actionsLength - 1; index >=0; --index) { + var action=actions[index]; + var actionId=action.actionInfo.Id; + if (action.referencedObjectPath) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, action.referencedObjectPath, actionId); + } + var referencedObjectPaths=action.referencedArgumentObjectPaths; + if (referencedObjectPaths) { + var referencedObjectPathsLength=referencedObjectPaths.length; + for (var refIndex=0; refIndex < referencedObjectPathsLength; refIndex++) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, referencedObjectPaths[refIndex], actionId); + } + } + } + var lastUsedObjectPathIdsOfAction={}; + for (var key in lastUsedActionIdOfObjectPathId) { + var actionId=lastUsedActionIdOfObjectPathId[key]; + var objectPathIds=lastUsedObjectPathIdsOfAction[actionId]; + if (!objectPathIds) { + objectPathIds=[]; + lastUsedObjectPathIdsOfAction[actionId]=objectPathIds; + } + objectPathIds.push(parseInt(key)); + } + for (var index=0; index < actionsLength; index++) { + var action=actions[index]; + var lastUsedObjectPathIds=lastUsedObjectPathIdsOfAction[action.actionInfo.Id]; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + action.actionInfo.L=lastUsedObjectPathIds; + } + else if (action.actionInfo.L) { + delete action.actionInfo.L; + } + } + }; + return ClientRequest; + }()); + OfficeExtension.ClientRequest=ClientRequest; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + OfficeExtension._internalConfig={ + showDisposeInfoInDebugInfo: false, + enableEarlyDispose: true, + alwaysPolyfillClientObjectRetrieveMethod: false + }; + var SessionBase=(function () { function SessionBase() { } SessionBase.prototype._resolveRequestUrlAndHeaderInfo=function () { @@ -8921,6 +9416,15 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(ClientRequestContext.prototype, "debugInfo", { + get: function () { + var prettyPrinter=new OfficeExtension.RequestPrettyPrinter(this._rootObjectPropertyName, this._pendingRequest._objectPaths, this._pendingRequest._actions, OfficeExtension._internalConfig.showDisposeInfoInDebugInfo); + var statements=prettyPrinter.process(); + return { pendingStatements: statements }; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ClientRequestContext.prototype, "trackedObjects", { get: function () { if (!this.m_trackedObjects) { @@ -8940,11 +9444,76 @@ var OfficeExtension; }); ClientRequestContext.prototype.load=function (clientObj, option) { OfficeExtension.Utility.validateContext(this, clientObj); - var queryOption=ClientRequestContext.parseQueryOption(option); + var queryOption=ClientRequestContext._parseQueryOption(option); var action=OfficeExtension.ActionFactory.createQueryAction(this, clientObj, queryOption); this._pendingRequest.addActionResultHandler(action, clientObj); }; - ClientRequestContext.parseQueryOption=function (option) { + ClientRequestContext.isLoadOption=function (loadOption) { + if (!OfficeExtension.Utility.isUndefined(loadOption.select) && (typeof (loadOption.select)==="string" || Array.isArray(loadOption.select))) + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.expand) && (typeof (loadOption.expand)==="string" || Array.isArray(loadOption.expand))) + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.top) && typeof (loadOption.top)==="number") + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.skip) && typeof (loadOption.skip)==="number") + return true; + for (var i in loadOption) { + return false; + } + return true; + }; + ClientRequestContext.parseStrictLoadOption=function (option) { + var ret={ Select: [] }; + ClientRequestContext.parseStrictLoadOptionHelper(ret, "", "option", option); + return ret; + }; + ClientRequestContext.combineQueryPath=function (pathPrefix, key, separator) { + if (pathPrefix.length===0) { + return key; + } + else { + return pathPrefix+separator+key; + } + }; + ClientRequestContext.parseStrictLoadOptionHelper=function (queryInfo, pathPrefix, argPrefix, option) { + for (var key in option) { + var value=option[key]; + if (key==="$all") { + if (typeof (value) !=="boolean") { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + if (value) { + queryInfo.Select.push(ClientRequestContext.combineQueryPath(pathPrefix, "*", "/")); + } + } + else if (key==="$top") { + if (typeof (value) !=="number" || pathPrefix.length > 0) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + queryInfo.Top=value; + } + else if (key==="$skip") { + if (typeof (value) !=="number" || pathPrefix.length > 0) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + queryInfo.Skip=value; + } + else { + if (typeof (value)==="boolean") { + if (value) { + queryInfo.Select.push(ClientRequestContext.combineQueryPath(pathPrefix, key, "/")); + } + } + else if (typeof (value)==="object") { + ClientRequestContext.parseStrictLoadOptionHelper(queryInfo, ClientRequestContext.combineQueryPath(pathPrefix, key, "/"), ClientRequestContext.combineQueryPath(argPrefix, key, "."), value); + } + else { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + } + } + }; + ClientRequestContext._parseQueryOption=function (option) { var queryOption={}; if (typeof (option)=="string") { var select=option; @@ -8953,41 +9522,46 @@ var OfficeExtension; else if (Array.isArray(option)) { queryOption.Select=option; } - else if (typeof (option)=="object") { + else if (typeof (option)==="object") { var loadOption=option; - if (typeof (loadOption.select)=="string") { - queryOption.Select=OfficeExtension.Utility._parseSelectExpand(loadOption.select); - } - else if (Array.isArray(loadOption.select)) { - queryOption.Select=loadOption.select; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.select)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.select"); - } - if (typeof (loadOption.expand)=="string") { - queryOption.Expand=OfficeExtension.Utility._parseSelectExpand(loadOption.expand); - } - else if (Array.isArray(loadOption.expand)) { - queryOption.Expand=loadOption.expand; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.expand)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.expand"); - } - if (typeof (loadOption.top)=="number") { - queryOption.Top=loadOption.top; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.top)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.top"); - } - if (typeof (loadOption.skip)=="number") { - queryOption.Skip=loadOption.skip; + if (ClientRequestContext.isLoadOption(loadOption)) { + if (typeof (loadOption.select)=="string") { + queryOption.Select=OfficeExtension.Utility._parseSelectExpand(loadOption.select); + } + else if (Array.isArray(loadOption.select)) { + queryOption.Select=loadOption.select; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.select)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.select"); + } + if (typeof (loadOption.expand)=="string") { + queryOption.Expand=OfficeExtension.Utility._parseSelectExpand(loadOption.expand); + } + else if (Array.isArray(loadOption.expand)) { + queryOption.Expand=loadOption.expand; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.expand)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.expand"); + } + if (typeof (loadOption.top)==="number") { + queryOption.Top=loadOption.top; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.top)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.top"); + } + if (typeof (loadOption.skip)==="number") { + queryOption.Skip=loadOption.skip; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.skip)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.skip"); + } } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.skip)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.skip"); + else { + queryOption=ClientRequestContext.parseStrictLoadOption(option); } } else if (!OfficeExtension.Utility.isNullOrUndefined(option)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option"); + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option"); } return queryOption; }; @@ -8997,7 +9571,7 @@ var OfficeExtension; } var quries={}; for (var key in options) { - quries[key]=ClientRequestContext.parseQueryOption(options[key]); + quries[key]=ClientRequestContext._parseQueryOption(options[key]); } var action=OfficeExtension.ActionFactory.createRecursiveQueryAction(this, clientObj, { Queries: quries, MaxDepth: maxDepth }); this._pendingRequest.addActionResultHandler(action, clientObj); @@ -9005,6 +9579,8 @@ var OfficeExtension; ClientRequestContext.prototype.trace=function (message) { OfficeExtension.ActionFactory.createTraceAction(this, message, true); }; + ClientRequestContext.prototype._processOfficeJsErrorResponse=function (officeJsErrorCode, response) { + }; ClientRequestContext.prototype.syncPrivateMain=function () { var _this=this; return OfficeExtension.Utility._createPromiseFromResult(null) @@ -9032,13 +9608,14 @@ var OfficeExtension; } }) .then(function () { - return _this.syncPrivate(); + var req=_this._pendingRequest; + _this.m_pendingRequest=null; + return _this.processPreSyncPromises(req) + .then(function () { return _this.syncPrivate(req); }); }); }; - ClientRequestContext.prototype.syncPrivate=function () { + ClientRequestContext.prototype.syncPrivate=function (req) { var _this=this; - var req=this._pendingRequest; - this.m_pendingRequest=null; if (!req.hasActions) { return this.processPendingEventHandlers(req); } @@ -9046,7 +9623,7 @@ var OfficeExtension; var requestFlags=req.flags; if (!this._requestExecutor) { if (OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)) { - this._requestExecutor=new OfficeExtension.OfficeJsRequestExecutor(); + this._requestExecutor=new OfficeExtension.OfficeJsRequestExecutor(this); } else { this._requestExecutor=new OfficeExtension.HttpRequestExecutor(); @@ -9064,8 +9641,10 @@ var OfficeExtension; req.invalidatePendingInvalidObjectPaths(); var errorFromResponse=null; var errorFromProcessEventHandlers=null; + this._lastSyncStart=performance.now(); return requestExecutor.executeAsync(this._customData, requestFlags, requestExecutorRequestMessage) .then(function (response) { + _this._lastSyncEnd=performance.now(); errorFromResponse=_this.processRequestExecutorResponseMessage(req, response); return _this.processPendingEventHandlers(req) .catch(function (ex) { @@ -9112,7 +9691,13 @@ var OfficeExtension; req._setResponseTraceIds(response.Body.TraceIds); } var traceMessages=req._responseTraceMessages; + var errorStatementInfo=null; if (response.Body) { + if (response.Body.Error && + response.Body.Error.ActionIndex >=0) { + var prettyPrinter=new OfficeExtension.RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions); + errorStatementInfo=prettyPrinter.processForDebugStatementInfo(response.Body.Error.ActionIndex); + } var actionResults=null; if (response.Body.Results) { actionResults=response.Body.Results; @@ -9138,13 +9723,18 @@ var OfficeExtension; }); } else if (response.Body && response.Body.Error) { + var debugInfo={ + errorLocation: response.Body.Error.Location + }; + if (errorStatementInfo) { + debugInfo.statement=errorStatementInfo.statement; + debugInfo.surroundingStatements=errorStatementInfo.surroundingStatements; + } return new OfficeExtension._Internal.RuntimeError({ code: response.Body.Error.Code, message: response.Body.Error.Message, traceMessages: traceMessages, - debugInfo: { - errorLocation: response.Body.Error.Location - } + debugInfo: debugInfo }); } return null; @@ -9160,6 +9750,17 @@ var OfficeExtension; ClientRequestContext.prototype.createProcessOneEventHandlersFunc=function (eventHandlers, req) { return function () { return eventHandlers._processRegistration(req); }; }; + ClientRequestContext.prototype.processPreSyncPromises=function (req) { + var ret=OfficeExtension.Utility._createPromiseFromResult(null); + for (var i=0; i < req._preSyncPromises.length; i++) { + var p=req._preSyncPromises[i]; + ret=ret.then(this.createProcessOneProSyncFunc(p)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneProSyncFunc=function (p) { + return function () { return p; }; + }; ClientRequestContext.prototype.sync=function (passThroughValue) { return this.syncPrivateMain().then(function () { return passThroughValue; }); }; @@ -9198,9 +9799,15 @@ var OfficeExtension; batch=receivedRunArgs[argOffset+0]; } else if (receivedRunArgs.length==argOffset+2) { - if (receivedRunArgs[argOffset+0] instanceof OfficeExtension.ClientObject) { + if (OfficeExtension.Utility.isNullOrUndefined(receivedRunArgs[argOffset+0])) { + ctxRetriever=ctxInitializer; + } + else if (receivedRunArgs[argOffset+0] instanceof OfficeExtension.ClientObject) { ctxRetriever=function () { return receivedRunArgs[argOffset+0].context; }; } + else if (receivedRunArgs[argOffset+0] instanceof ClientRequestContext) { + ctxRetriever=function () { return receivedRunArgs[argOffset+0]; }; + } else if (Array.isArray(receivedRunArgs[argOffset+0])) { var array=receivedRunArgs[argOffset+0]; if (array.length==0) { @@ -9366,6 +9973,79 @@ var OfficeExtension; return ClientResult; }()); OfficeExtension.ClientResult=ClientResult; + var RetrieveResult=(function () { + function RetrieveResult(m_proxy, m_shouldPolyfill) { + this.m_proxy=m_proxy; + this.m_shouldPolyfill=m_shouldPolyfill; + } + Object.defineProperty(RetrieveResult.prototype, "proxy", { + get: function () { + return this.m_proxy; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RetrieveResult.prototype, "data", { + get: function () { + if (!this.m_isLoaded) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.valueNotLoaded, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: "retrieveResult.data" + } + }); + } + return this.m_data; + }, + enumerable: true, + configurable: true + }); + RetrieveResult.prototype._handleResult=function (value) { + this.m_isLoaded=true; + if (typeof (value)==="object" && value && value._IsNull) { + this.m_data=null; + return; + } + if (this.m_shouldPolyfill) { + this.m_data=this.changePropertyNameToCamelLowerCase(value); + } + else { + this.m_data=value; + } + }; + RetrieveResult.prototype.changePropertyNameToCamelLowerCase=function (value) { + var charCodeUnderscore=95; + if (Array.isArray(value)) { + var ret=[]; + for (var i=0; i < value.length; i++) { + ret.push(this.changePropertyNameToCamelLowerCase(value[i])); + } + return ret; + } + else if (typeof (value)==="object" && value !==null) { + var ret={}; + for (var key in value) { + var propValue=value[key]; + if (key==="_Items") { + ret={}; + ret["items"]=this.changePropertyNameToCamelLowerCase(propValue); + break; + } + else if (key.charCodeAt(0) !==charCodeUnderscore) { + var propName=OfficeExtension.Utility._toCamelLowerCase(key); + ret[propName]=this.changePropertyNameToCamelLowerCase(propValue); + } + } + return ret; + } + else { + return value; + } + }; + return RetrieveResult; + }()); + OfficeExtension.RetrieveResult=RetrieveResult; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { @@ -9387,6 +10067,9 @@ var OfficeExtension; Constants.sourceLibHeader="SdkVersion"; Constants.embeddingPageOrigin="EmbeddingPageOrigin"; Constants.embeddingPageSessionInfo="EmbeddingPageSessionInfo"; + Constants.eventMessageCategory=65536; + Constants.eventWorkbookId="Workbook"; + Constants.eventSourceRemote="Remote"; return Constants; }()); OfficeExtension.Constants=Constants; @@ -9717,7 +10400,7 @@ var OfficeExtension; debugInfo[key]=partialDebugInfo[key]; } if (this.innerError) { - if (this.innerError instanceof OfficeExtension.Error) { + if (this.innerError instanceof OfficeExtension._Internal.RuntimeError) { debugInfo.innerError=this.innerError.debugInfo; } else { @@ -9802,6 +10485,20 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(EventHandlers.prototype, "_context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_callback", { + get: function () { + return this.m_callback; + }, + enumerable: true, + configurable: true + }); EventHandlers.prototype.add=function (handler) { var action=OfficeExtension.ActionFactory.createTraceAction(this.m_context, null, false); this.m_context._pendingRequest._addPendingEventHandlerAction(this, { id: action.actionInfo.Id, handler: handler, operation: 0 }); @@ -9895,6 +10592,13 @@ var OfficeExtension; this.m_allHandlers=handlers; this.m_handler=handler; } + Object.defineProperty(EventHandlerResult.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); EventHandlerResult.prototype.remove=function () { if (this.m_allHandlers && this.m_handler) { this.m_allHandlers.remove(this.m_handler); @@ -9929,6 +10633,16 @@ var OfficeExtension; return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged, handler, callback); }); case 1: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.settings.addHandlerAsync(Office.EventType.SettingsChanged, handler, callback); }); + case 5: + return OfficeExtension.Utility.promisify(function (callback) { return OSF.DDA.RichApi.richApiMessageManager.addHandlerAsync("richApiMessage", handler, callback); }); + case 13: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.ObjectDeleted, handler, { id: targetId }, callback); }); + case 14: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.ObjectSelectionChanged, handler, { id: targetId }, callback); }); + case 15: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.ObjectDataChanged, handler, { id: targetId }, callback); }); + case 16: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.ContentControlAdded, handler, { id: targetId }, callback); }); default: throw _Internal.RuntimeError._createInvalidArgError("eventId"); } @@ -9949,6 +10663,16 @@ var OfficeExtension; return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.DocumentSelectionChanged, { handler: handler }, callback); }); case 1: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.settings.removeHandlerAsync(Office.EventType.SettingsChanged, { handler: handler }, callback); }); + case 5: + return OfficeExtension.Utility.promisify(function (callback) { return OSF.DDA.RichApi.richApiMessageManager.removeHandlerAsync("richApiMessage", { handler: handler }, callback); }); + case 13: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDeleted, { id: targetId, handler: handler }, callback); }); + case 14: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.ObjectSelectionChanged, { id: targetId, handler: handler }, callback); }); + case 15: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDataChanged, { id: targetId, handler: handler }, callback); }); + case 16: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.ContentControlAdded, { id: targetId, handler: handler }, callback); }); default: throw _Internal.RuntimeError._createInvalidArgError("eventId"); } @@ -10011,6 +10735,139 @@ var OfficeExtension; OfficeExtension.EventRegistration=EventRegistration; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var GenericEventRegistration=(function () { + function GenericEventRegistration() { + this.m_eventRegistration=new OfficeExtension.EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)); + this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this); + } + GenericEventRegistration.prototype.ready=function () { + var _this=this; + if (!this.m_ready) { + if (GenericEventRegistration._testReadyImpl) { + this.m_ready=GenericEventRegistration._testReadyImpl() + .then(function () { + _this.m_isReady=true; + }); + } + else { + this.m_ready=OfficeExtension._Internal.officeJsEventRegistration.register(5, "", this.m_richApiMessageHandler) + .then(function () { + _this.m_isReady=true; + }); + } + } + return this.m_ready; + }; + Object.defineProperty(GenericEventRegistration.prototype, "isReady", { + get: function () { + return this.m_isReady; + }, + enumerable: true, + configurable: true + }); + GenericEventRegistration.prototype.register=function (eventId, targetId, handler) { + var _this=this; + return this.ready() + .then(function () { return _this.m_eventRegistration.register(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype.unregister=function (eventId, targetId, handler) { + var _this=this; + return this.ready() + .then(function () { return _this.m_eventRegistration.unregister(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype._registerEventImpl=function (eventId, targetId) { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._unregisterEventImpl=function (eventId, targetId) { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._handleRichApiMessage=function (msg) { + if (msg && msg.entries) { + for (var entryIndex=0; entryIndex < msg.entries.length; entryIndex++) { + var entry=msg.entries[entryIndex]; + if (entry.messageCategory==OfficeExtension.Constants.eventMessageCategory) { + if (OfficeExtension.Utility._logEnabled) { + OfficeExtension.Utility.log(JSON.stringify(entry)); + } + var funcs=this.m_eventRegistration.getHandlers(entry.messageType, entry.targetId); + if (funcs.length > 0) { + var arg=JSON.parse(entry.message); + if (entry.isRemoteOverride) { + arg.source=OfficeExtension.Constants.eventSourceRemote; + } + for (var i=0; i < funcs.length; i++) { + funcs[i](arg); + } + } + } + } + } + }; + GenericEventRegistration.getGenericEventRegistration=function () { + if (!GenericEventRegistration.s_genericEventRegistration) { + GenericEventRegistration.s_genericEventRegistration=new GenericEventRegistration(); + } + return GenericEventRegistration.s_genericEventRegistration; + }; + GenericEventRegistration.richApiMessageEventCategory=65536; + return GenericEventRegistration; + }()); + function _testSetRichApiMessageReadyImpl(impl) { + GenericEventRegistration._testReadyImpl=impl; + } + OfficeExtension._testSetRichApiMessageReadyImpl=_testSetRichApiMessageReadyImpl; + function _testTriggerRichApiMessageEvent(msg) { + GenericEventRegistration.getGenericEventRegistration()._handleRichApiMessage(msg); + } + OfficeExtension._testTriggerRichApiMessageEvent=_testTriggerRichApiMessageEvent; + var GenericEventHandlers=(function (_super) { + __extends(GenericEventHandlers, _super); + function GenericEventHandlers(context, parentObject, name, eventInfo) { + _super.call(this, context, parentObject, name, eventInfo); + this.m_genericEventInfo=eventInfo; + } + GenericEventHandlers.prototype.add=function (handler) { + var _this=this; + if ((this._handlers.length==0) && this.m_genericEventInfo.registerFunc) { + this.m_genericEventInfo.registerFunc(); + } + if (!GenericEventRegistration.getGenericEventRegistration().isReady) { + this._context._pendingRequest._addPreSyncPromise(GenericEventRegistration.getGenericEventRegistration().ready()); + } + OfficeExtension.ActionFactory.createTraceMarkerForCallback(this._context, function () { + _this._handlers.push(handler); + if (_this._handlers.length==1) { + GenericEventRegistration.getGenericEventRegistration().register(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + return new OfficeExtension.EventHandlerResult(this._context, this, handler); + }; + GenericEventHandlers.prototype.remove=function (handler) { + var _this=this; + if ((this._handlers.length==1) && this.m_genericEventInfo.unregisterFunc) { + this.m_genericEventInfo.unregisterFunc(); + } + OfficeExtension.ActionFactory.createTraceMarkerForCallback(this._context, function () { + var handlers=_this._handlers; + for (var index=handlers.length - 1; index >=0; index--) { + if (handlers[index]===handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length==0) { + GenericEventRegistration.getGenericEventRegistration().unregister(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + }; + GenericEventHandlers.prototype.removeAll=function () { + }; + return GenericEventHandlers; + }(OfficeExtension.EventHandlers)); + OfficeExtension.GenericEventHandlers=GenericEventHandlers; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var HttpRequestExecutor=(function () { function HttpRequestExecutor() { @@ -10062,15 +10919,6 @@ var OfficeExtension; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { - var _Internal; - (function (_Internal) { - _Internal.OfficeRequire=function () { - if (typeof (require) !=="undefined") { - return require; - } - return null; - }(); - })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); var HttpUtility=(function () { function HttpUtility() { } @@ -10078,7 +10926,7 @@ var OfficeExtension; HttpUtility.s_customSendRequestFunc=func; }; HttpUtility.xhrSendRequestFunc=function (request) { - return new _Internal.OfficePromise(function (resolve, reject) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { var xhr=new XMLHttpRequest(); xhr.open(request.method, request.url); xhr.onload=function () { @@ -10090,7 +10938,7 @@ var OfficeExtension; resolve(resp); }; xhr.onerror=function () { - reject(new _Internal.RuntimeError({ + reject(new OfficeExtension._Internal.RuntimeError({ code: OfficeExtension.ErrorCodes.connectionFailure, message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.connectionFailureWithStatus, xhr.statusText) })); @@ -10103,34 +10951,11 @@ var OfficeExtension; xhr.send(request.body); }); }; - HttpUtility.nodejsRequestModuleSendRequestFunc=function (requestInfo) { - HttpUtility.logRequest(requestInfo); - var fetch=_Internal.OfficeRequire(HttpUtility.NodeJsRequestModuleName); - return fetch(requestInfo.url, { method: requestInfo.method, headers: requestInfo.headers, body: requestInfo.body }) - .then(function (resp) { - return resp.text() - .then(function (body) { - var statusCode=resp.status; - var headers={}; - resp.headers.forEach(function (value, name) { - headers[name]=value; - }); - var ret={ statusCode: statusCode, headers: headers, body: body }; - HttpUtility.logResponse(ret); - return ret; - }); - }); - }; HttpUtility.sendRequest=function (request) { HttpUtility.validateAndNormalizeRequest(request); var func=HttpUtility.s_customSendRequestFunc; if (!func) { - if (typeof (window)==="undefined" || typeof (XMLHttpRequest)==="undefined") { - func=HttpUtility.nodejsRequestModuleSendRequestFunc; - } - else { - func=HttpUtility.xhrSendRequestFunc; - } + func=HttpUtility.xhrSendRequestFunc; } return func(request); }; @@ -10146,7 +10971,7 @@ var OfficeExtension; HttpUtility.officeJsSendLocalDocumentRequestFunc=function (request) { request=OfficeExtension.Utility._validateLocalDocumentRequest(request); var requestSafeArray=OfficeExtension.Utility._buildRequestMessageSafeArray(request); - return new _Internal.OfficePromise(function (resolve, reject) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { OSF.DDA.RichApi.executeRichApiRequestAsync(requestSafeArray, function (asyncResult) { var response; if (asyncResult.status=="succeeded") { @@ -10166,7 +10991,7 @@ var OfficeExtension; }; HttpUtility.validateAndNormalizeRequest=function (request) { if (OfficeExtension.Utility.isNullOrUndefined(request)) { - throw _Internal.RuntimeError._createInvalidArgError({ + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError({ argumentName: "request" }); } @@ -10203,7 +11028,6 @@ var OfficeExtension; } } }; - HttpUtility.NodeJsRequestModuleName="node-fetch"; HttpUtility._logBody=false; return HttpUtility; }()); @@ -10227,6 +11051,146 @@ var OfficeExtension; ; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var HostBridgeRequestExecutor=(function () { + function HostBridgeRequestExecutor(session) { + this.m_session=session; + } + HostBridgeRequestExecutor.prototype.executeAsync=function (customData, requestFlags, requestMessage) { + var httpRequestInfo={ + url: OfficeExtension.Constants.processQuery, + method: "POST", + headers: requestMessage.Headers, + body: requestMessage.Body + }; + var message={ + id: HostBridgeSession.nextId(), + type: 1, + flags: requestFlags, + message: httpRequestInfo + }; + OfficeExtension.Utility.log(JSON.stringify(message)); + return this.m_session.sendMessageToHost(message) + .then(function (nativeBridgeResponse) { + OfficeExtension.Utility.log("Received response: "+JSON.stringify(nativeBridgeResponse)); + var responseInfo=nativeBridgeResponse.message; + var response; + if (responseInfo.statusCode===200) { + response={ ErrorCode: null, ErrorMessage: null, Headers: responseInfo.headers, Body: responseInfo.body }; + } + else { + OfficeExtension.Utility.log("Error Response:"+responseInfo.body); + var error=OfficeExtension.Utility._parseErrorResponse(responseInfo); + response={ + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null + }; + } + return response; + }); + }; + return HostBridgeRequestExecutor; + }()); + var HostBridgeSession=(function (_super) { + __extends(HostBridgeSession, _super); + function HostBridgeSession(bridge) { + var _this=this; + _super.call(this); + this.m_promiseResolver={}; + this.m_bridge=bridge; + this.m_bridge.onMessageFromHost=function (msg) { + _this.onMessageFromHost(msg); + }; + } + HostBridgeSession.prototype._resolveRequestUrlAndHeaderInfo=function () { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + HostBridgeSession.prototype._createRequestExecutorOrNull=function () { + OfficeExtension.Utility.log("NativeBridgeSession::CreateRequestExecutor"); + return new HostBridgeRequestExecutor(this); + }; + Object.defineProperty(HostBridgeSession.prototype, "eventRegistration", { + get: function () { + return OfficeExtension._Internal.officeJsEventRegistration; + }, + enumerable: true, + configurable: true + }); + HostBridgeSession.init=function (bridge) { + if (bridge && typeof (bridge)==="object") { + var session=new HostBridgeSession(bridge); + OfficeExtension.ClientRequestContext._overrideSession=session; + OfficeExtension.HttpUtility.setCustomSendLocalDocumentRequestFunc(function (request) { + var bridgeMessage={ + id: HostBridgeSession.nextId(), + type: 1, + flags: 0, + message: request + }; + return session.sendMessageToHost(bridgeMessage) + .then(function (bridgeResponse) { + var responseInfo=bridgeResponse.message; + return responseInfo; + }); + }); + } + }; + HostBridgeSession.prototype.sendMessageToHost=function (message) { + var _this=this; + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + var ret=new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { + _this.m_promiseResolver[message.id]=resolve; + }); + return ret; + }; + HostBridgeSession.prototype.onMessageFromHost=function (messageText) { + if (messageText==="test") { + if (HostBridgeTest._testFunc) { + HostBridgeTest._testFunc(); + } + } + else { + var message=JSON.parse(messageText); + if (typeof (message.id)==="number") { + var resolve=this.m_promiseResolver[message.id]; + if (resolve) { + resolve(message); + } + delete this.m_promiseResolver[message.id]; + } + } + }; + HostBridgeSession.nextId=function () { + return HostBridgeSession.s_nextId++; + }; + HostBridgeSession.s_nextId=1; + return HostBridgeSession; + }(OfficeExtension.SessionBase)); + var HostBridge=(function () { + function HostBridge() { + } + HostBridge.init=function (bridge) { + HostBridgeSession.init(bridge); + }; + return HostBridge; + }()); + OfficeExtension.HostBridge=HostBridge; + if (typeof (_richApiNativeBridge)==="object" && _richApiNativeBridge) { + HostBridge.init(_richApiNativeBridge); + } + var HostBridgeTest=(function () { + function HostBridgeTest() { + } + HostBridgeTest.setTestFunc=function (func) { + HostBridgeTest._testFunc=func; + }; + return HostBridgeTest; + }()); + OfficeExtension.HostBridgeTest=HostBridgeTest; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var ObjectPath=(function () { function ObjectPath(objectPathInfo, parentObjectPath, isCollection, isInvalidAfterRequest) { @@ -10244,12 +11208,22 @@ var OfficeExtension; enumerable: true, configurable: true }); - Object.defineProperty(ObjectPath.prototype, "isWriteOperation", { + Object.defineProperty(ObjectPath.prototype, "isWriteOperation", { + get: function () { + return this.m_isWriteOperation; + }, + set: function (value) { + this.m_isWriteOperation=value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isRestrictedResourceAccess", { get: function () { - return this.m_isWriteOperation; + return this.m_isRestrictedResourceAccess; }, set: function (value) { - this.m_isWriteOperation=value; + this.m_isRestrictedResourceAccess=value; }, enumerable: true, configurable: true @@ -10340,6 +11314,7 @@ var OfficeExtension; this.m_objectPathInfo.ObjectPathType=6; this.m_objectPathInfo.Name=referenceId; this.m_objectPathInfo.ArgumentInfo={}; + delete this.m_objectPathInfo.ParentObjectPathId; this.m_parentObjectPath=null; this.m_argumentObjectPaths=null; return; @@ -10354,15 +11329,15 @@ var OfficeExtension; if (!OfficeExtension.Utility.isNullOrUndefined(id)) { this.m_isInvalidAfterRequest=false; this.m_isValid=true; - if (parentIsCollection) { - this.m_objectPathInfo.ObjectPathType=5; - this.m_objectPathInfo.Name=""; - } - else { + if (!OfficeExtension.Utility.isNullOrEmptyString(getByIdMethodName)) { this.m_objectPathInfo.ObjectPathType=3; this.m_objectPathInfo.Name=getByIdMethodName; this.m_getByIdMethodName=null; } + else { + this.m_objectPathInfo.ObjectPathType=5; + this.m_objectPathInfo.Name=""; + } this.isWriteOperation=false; this.m_objectPathInfo.ArgumentInfo={}; this.m_objectPathInfo.ArgumentInfo.Arguments=[id]; @@ -10397,18 +11372,22 @@ var OfficeExtension; var objectPathInfo={ Id: context._nextId(), ObjectPathType: 1, Name: "" }; return new OfficeExtension.ObjectPath(objectPathInfo, null, false, false); }; - ObjectPathFactory.createNewObjectObjectPath=function (context, typeName, isCollection) { + ObjectPathFactory.createNewObjectObjectPath=function (context, typeName, isCollection, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 2, Name: typeName }; - return new OfficeExtension.ObjectPath(objectPathInfo, null, isCollection, false); + var ret=new OfficeExtension.ObjectPath(objectPathInfo, null, isCollection, false); + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; }; - ObjectPathFactory.createPropertyObjectPath=function (context, parent, propertyName, isCollection, isInvalidAfterRequest) { + ObjectPathFactory.createPropertyObjectPath=function (context, parent, propertyName, isCollection, isInvalidAfterRequest, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 4, Name: propertyName, ParentObjectPathId: parent._objectPath.objectPathInfo.Id, }; - return new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest); + var ret=new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest); + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; }; ObjectPathFactory.createIndexerObjectPath=function (context, parent, args) { var objectPathInfo={ @@ -10432,7 +11411,7 @@ var OfficeExtension; objectPathInfo.ArgumentInfo.Arguments=args; return new OfficeExtension.ObjectPath(objectPathInfo, parentObjectPath, false, false); }; - ObjectPathFactory.createMethodObjectPath=function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName) { + ObjectPathFactory.createMethodObjectPath=function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 3, @@ -10445,6 +11424,17 @@ var OfficeExtension; ret.argumentObjectPaths=argumentObjectPaths; ret.isWriteOperation=(operationType !=1); ret.getByIdMethodName=getByIdMethodName; + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; + }; + ObjectPathFactory.createReferenceIdObjectPath=function (context, referenceId) { + var objectPathInfo={ + Id: context._nextId(), + ObjectPathType: 6, + Name: referenceId, + ArgumentInfo: {} + }; + var ret=new OfficeExtension.ObjectPath(objectPathInfo, null, false, false); return ret; }; ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt=function (hasIndexerMethod, context, parent, childItem, index) { @@ -10496,9 +11486,11 @@ var OfficeExtension; var OfficeExtension; (function (OfficeExtension) { var OfficeJsRequestExecutor=(function () { - function OfficeJsRequestExecutor() { + function OfficeJsRequestExecutor(context) { + this.m_context=context; } OfficeJsRequestExecutor.prototype.executeAsync=function (customData, requestFlags, requestMessage) { + var _this=this; var messageSafearray=OfficeExtension.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, OfficeJsRequestExecutor.SourceLibHeaderValue); return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { OSF.DDA.RichApi.executeRichApiRequestAsync(messageSafearray, function (result) { @@ -10510,6 +11502,7 @@ var OfficeExtension; } else { response=OfficeExtension.RichApiMessageUtility.buildResponseOnError(result.error.code, result.error.message); + _this.m_context._processOfficeJsErrorResponse(result.error.code, response); } resolve(response); }); @@ -10522,6 +11515,12 @@ var OfficeExtension; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + var _Internal; + (function (_Internal) { + _Internal.OfficeRequire=function () { + return null; + }(); + })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); var _Internal; (function (_Internal) { var PromiseImpl; @@ -10625,17 +11624,6 @@ var OfficeExtension; } lib$es6$promise$asap$$len=0; } - function lib$es6$promise$asap$$attemptVertex() { - try { - var r=require; - var vertx=r('vertx'); - lib$es6$promise$asap$$vertxNext=vertx.runOnLoop || vertx.runOnContext; - return lib$es6$promise$asap$$useVertxTimer(); - } - catch (e) { - return lib$es6$promise$asap$$useSetTimeout(); - } - } var lib$es6$promise$asap$$scheduleFlush; if (lib$es6$promise$asap$$isNode) { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useNextTick(); @@ -10646,9 +11634,6 @@ var OfficeExtension; else if (lib$es6$promise$asap$$isWorker) { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useMessageChannel(); } - else if (lib$es6$promise$asap$$browserWindow===undefined && typeof require==='function') { - lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$attemptVertex(); - } else { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useSetTimeout(); } @@ -11166,6 +12151,305 @@ var OfficeExtension; OfficeExtension.TrackedObjects=TrackedObjects; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var RequestPrettyPrinter=(function () { + function RequestPrettyPrinter(globalObjName, referencedObjectPaths, actions, showDispose) { + if (!globalObjName) { + globalObjName="root"; + } + this.m_globalObjName=globalObjName; + this.m_referencedObjectPaths=referencedObjectPaths; + this.m_actions=actions; + this.m_statements=[]; + this.m_variableNameForObjectPathMap={}; + this.m_variableNameToObjectPathMap={}; + this.m_declaredObjectPathMap={}; + this.m_showDispose=showDispose; + } + RequestPrettyPrinter.prototype.process=function () { + if (this.m_showDispose) { + OfficeExtension.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + for (var i=0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + } + return this.m_statements; + }; + RequestPrettyPrinter.prototype.processForDebugStatementInfo=function (actionIndex) { + if (this.m_showDispose) { + OfficeExtension.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + var surroundingCount=5; + this.m_statements=[]; + var oneStatement=""; + var statementIndex=-1; + for (var i=0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + if (actionIndex==i) { + statementIndex=this.m_statements.length - 1; + } + if (statementIndex >=0 && this.m_statements.length > statementIndex+surroundingCount+1) { + break; + } + } + if (statementIndex < 0) { + return null; + } + var startIndex=statementIndex - surroundingCount; + if (startIndex < 0) { + startIndex=0; + } + var endIndex=statementIndex+1+surroundingCount; + if (endIndex > this.m_statements.length) { + endIndex=this.m_statements.length; + } + var surroundingStatements=[]; + if (startIndex !=0) { + surroundingStatements.push("..."); + } + for (var i_1=startIndex; i_1 < statementIndex; i_1++) { + surroundingStatements.push(this.m_statements[i_1]); + } + surroundingStatements.push("// >>>>>"); + surroundingStatements.push(this.m_statements[statementIndex]); + surroundingStatements.push("// <<<<<"); + for (var i_2=statementIndex+1; i_2 < endIndex; i_2++) { + surroundingStatements.push(this.m_statements[i_2]); + } + if (endIndex < this.m_statements.length) { + surroundingStatements.push("..."); + } + return { + statement: this.m_statements[statementIndex], + surroundingStatements: surroundingStatements + }; + }; + RequestPrettyPrinter.prototype.processOneAction=function (action) { + var actionInfo=action.actionInfo; + switch (actionInfo.ActionType) { + case 1: + this.processInstantiateAction(action); + break; + case 3: + this.processMethodAction(action); + break; + case 2: + this.processQueryAction(action); + break; + case 7: + this.processQueryAsJsonAction(action); + break; + case 6: + this.processRecursiveQueryAction(action); + break; + case 4: + this.processSetPropertyAction(action); + break; + case 5: + this.processTraceAction(action); + break; + case 8: + this.processEnsureUnchangedAction(action); + break; + } + }; + RequestPrettyPrinter.prototype.processInstantiateAction=function (action) { + var objId=action.actionInfo.ObjectPathId; + var objPath=this.m_referencedObjectPaths[objId]; + var varName=this.getObjVarName(objId); + if (!this.m_declaredObjectPathMap[objId]) { + var statement="var "+varName+"="+this.buildObjectPathExpressionWithParent(objPath)+";"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + this.m_declaredObjectPathMap[objId]=varName; + } + else { + var statement="// Instantiate {"+varName+"}"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + } + }; + RequestPrettyPrinter.prototype.processMethodAction=function (action) { + var methodName=action.actionInfo.Name; + if (methodName==="_KeepReference") { + methodName="track"; + } + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+"."+OfficeExtension.Utility._toCamelLowerCase(methodName)+"("+this.buildArgumentsExpression(action.actionInfo.ArgumentInfo)+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAction=function (action) { + var queryExp=this.buildQueryExpression(action); + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".load("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAsJsonAction=function (action) { + var queryExp=this.buildQueryExpression(action); + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".loadJson("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processRecursiveQueryAction=function (action) { + var queryExp=""; + if (action.actionInfo.RecursiveQueryInfo) { + queryExp=JSON.stringify(action.actionInfo.RecursiveQueryInfo); + } + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".loadRecursive("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processSetPropertyAction=function (action) { + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+"."+OfficeExtension.Utility._toCamelLowerCase(action.actionInfo.Name)+"="+this.buildArgumentsExpression(action.actionInfo.ArgumentInfo)+";"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processTraceAction=function (action) { + var statement="context.trace();"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processEnsureUnchangedAction=function (action) { + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".ensureUnchanged("+JSON.stringify(action.actionInfo.ObjectState)+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.appendDisposeCommentIfRelevant=function (statement, action) { + var _this=this; + if (this.m_showDispose) { + var lastUsedObjectPathIds=action.actionInfo.L; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + var objectNamesToDispose=lastUsedObjectPathIds.map(function (item) { return _this.getObjVarName(item); }).join(", "); + return statement+" // And then dispose {"+objectNamesToDispose+"}"; + } + } + return statement; + }; + RequestPrettyPrinter.prototype.buildQueryExpression=function (action) { + if (action.actionInfo.QueryInfo) { + var option={}; + option.select=action.actionInfo.QueryInfo.Select; + option.expand=action.actionInfo.QueryInfo.Expand; + option.skip=action.actionInfo.QueryInfo.Skip; + option.top=action.actionInfo.QueryInfo.Top; + if (typeof (option.top)==="undefined" && typeof (option.skip)==="undefined" && typeof (option.expand)==="undefined") { + if (typeof (option.select)==="undefined") { + return ""; + } + else { + return JSON.stringify(option.select); + } + } + else { + return JSON.stringify(option); + } + } + return ""; + }; + RequestPrettyPrinter.prototype.buildObjectPathExpressionWithParent=function (objPath) { + var hasParent=objPath.objectPathInfo.ObjectPathType==5 || + objPath.objectPathInfo.ObjectPathType==3 || + objPath.objectPathInfo.ObjectPathType==4; + if (hasParent && objPath.objectPathInfo.ParentObjectPathId) { + return this.getObjVarName(objPath.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(objPath); + } + return this.buildObjectPathExpression(objPath); + }; + RequestPrettyPrinter.prototype.buildObjectPathExpression=function (objPath) { + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + return "context."+this.m_globalObjName; + case 5: + return "getItem("+this.buildArgumentsExpression(objPath.objectPathInfo.ArgumentInfo)+")"; + case 3: + return OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name)+"("+this.buildArgumentsExpression(objPath.objectPathInfo.ArgumentInfo)+")"; + case 2: + return objPath.objectPathInfo.Name+".newObject()"; + case 7: + return "null"; + case 4: + return OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + case 6: + return "context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(objPath.objectPathInfo.Name)+")"; + } + }; + RequestPrettyPrinter.prototype.buildArgumentsExpression=function (args) { + var ret=""; + if (!args.Arguments) { + return ret; + } + for (var i=0; i < args.Arguments.length; i++) { + if (i > 0) { + ret=ret+", "; + } + ret=ret+this.buildArgumentLiteral(args.Arguments[i], args.ReferencedObjectPathIds ? args.ReferencedObjectPathIds[i] : null); + } + if (ret==="undefined") { + ret=""; + } + return ret; + }; + RequestPrettyPrinter.prototype.buildArgumentLiteral=function (value, objectPathId) { + if (typeof value=="number" && value===objectPathId) { + return this.getObjVarName(objectPathId); + } + else { + return JSON.stringify(value); + } + }; + RequestPrettyPrinter.prototype.getObjVarNameBase=function (objectPathId) { + var ret="v"; + var objPath=this.m_referencedObjectPaths[objectPathId]; + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + ret=this.m_globalObjName; + break; + case 4: + ret=OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + break; + case 3: + var methodName=objPath.objectPathInfo.Name; + if (methodName.length > 3 && methodName.substr(0, 3)==="Get") { + methodName=methodName.substr(3); + } + ret=OfficeExtension.Utility._toCamelLowerCase(methodName); + break; + case 5: + var parentName=this.getObjVarNameBase(objPath.objectPathInfo.ParentObjectPathId); + if (parentName.charAt(parentName.length - 1)==="s") { + ret=parentName.substr(0, parentName.length - 1); + } + else { + ret=parentName+"Item"; + } + break; + } + return ret; + }; + RequestPrettyPrinter.prototype.getObjVarName=function (objectPathId) { + if (this.m_variableNameForObjectPathMap[objectPathId]) { + return this.m_variableNameForObjectPathMap[objectPathId]; + } + var ret=this.getObjVarNameBase(objectPathId); + if (!this.m_variableNameToObjectPathMap[ret]) { + this.m_variableNameForObjectPathMap[objectPathId]=ret; + this.m_variableNameToObjectPathMap[ret]=objectPathId; + return ret; + } + var i=1; + while (this.m_variableNameToObjectPathMap[ret+i.toString()]) { + i++; + } + ret=ret+i.toString(); + this.m_variableNameForObjectPathMap[objectPathId]=ret; + this.m_variableNameToObjectPathMap[ret]=objectPathId; + return ret; + }; + return RequestPrettyPrinter; + }()); + OfficeExtension.RequestPrettyPrinter=RequestPrettyPrinter; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var ResourceStrings=(function () { function ResourceStrings() { @@ -11186,6 +12470,14 @@ var OfficeExtension; ResourceStrings.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod"; ResourceStrings.valueNotLoaded="ValueNotLoaded"; ResourceStrings.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage"; + ResourceStrings.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"; + ResourceStrings.customFunctionDefintionMissing="CustomFunctionDefintionMissing"; + ResourceStrings.customFunctionImplementationMissing="CustomFunctionImplementationMissing"; + ResourceStrings.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars"; + ResourceStrings.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit"; + ResourceStrings.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch"; + ResourceStrings.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing"; + ResourceStrings.apiNotFoundDetails="ApiNotFoundDetails"; return ResourceStrings; }()); OfficeExtension.ResourceStrings=ResourceStrings; @@ -11205,7 +12497,15 @@ var OfficeExtension; ResourceStringValues.RunMustReturnPromise="The batch function passed to the \".run\" method didn't return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from \"context.sync()\"."; ResourceStringValues.Timeout="The operation has timed out."; ResourceStringValues.ValueNotLoaded="The value of the result object has not been loaded yet. Before reading the value property, call \"context.sync()\" on the associated request context."; - ResourceStringValues.invalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page."; + ResourceStringValues.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page."; + ResourceStringValues.InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again."; + ResourceStringValues.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions."; + ResourceStringValues.CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function."; + ResourceStringValues.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods."; + ResourceStringValues.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name."; + ResourceStringValues.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it."; + ResourceStringValues.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable."; + ResourceStringValues.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}."; return ResourceStringValues; }()); OfficeExtension.ResourceStringValues=ResourceStringValues; @@ -11499,6 +12799,34 @@ var OfficeExtension; }; Utility.load=function (clientObj, option) { clientObj.context.load(clientObj, option); + return clientObj; + }; + Utility.loadAndSync=function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj.context.sync().then(function () { return clientObj; }); + }; + Utility.retrieve=function (clientObj, option) { + var shouldPolyfill=OfficeExtension._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + if (typeof (window) !=="undefined" && window.Office && window.Office.context && window.Office.context.requirements) { + shouldPolyfill=!window.Office.context.requirements.isSetSupported("RichApiRuntime", "1.1"); + } + } + var result=new OfficeExtension.RetrieveResult(clientObj, shouldPolyfill); + var queryOption=OfficeExtension.ClientRequestContext._parseQueryOption(option); + var action; + if (shouldPolyfill) { + action=OfficeExtension.ActionFactory.createQueryAction(clientObj.context, clientObj, queryOption); + } + else { + action=OfficeExtension.ActionFactory.createQueryAsJsonAction(clientObj.context, clientObj, queryOption); + } + clientObj.context._pendingRequest.addActionResultHandler(action, result); + return result; + }; + Utility.retrieveAndSync=function (clientObj, option) { + var result=Utility.retrieve(clientObj, option); + return clientObj.context.sync().then(function () { return result; }); }; Utility._parseSelectExpand=function (select) { var args=[]; @@ -11519,11 +12847,32 @@ var OfficeExtension; return '*'; } var itemsSlashLength=6; - if (propertyNameLower.substr(0, itemsSlashLength)==="items/") { + var isItemsSlashOrItemsDot=propertyNameLower.substr(0, itemsSlashLength)==="items/" || + propertyNameLower.substr(0, itemsSlashLength)==="items."; + if (isItemsSlashOrItemsDot) { propertyName=propertyName.substr(itemsSlashLength); } - return propertyName.replace(new RegExp("\/items\/", "gi"), "/"); + return propertyName.replace(new RegExp("[\/\.]items[\/\.]", "gi"), "/"); + } + }; + Utility.toJson=function (clientObj, scalarProperties, navigationProperties, collectionItemsIfAny) { + var result={}; + for (var prop in scalarProperties) { + var value=scalarProperties[prop]; + if (typeof value !=="undefined") { + result[prop]=value; + } + } + for (var prop in navigationProperties) { + var value=navigationProperties[prop]; + if (typeof value !=="undefined") { + result[prop]=value.toJSON(); + } + } + if (collectionItemsIfAny) { + result["items"]=collectionItemsIfAny.map(function (item) { return item.toJSON(); }); } + return result; }; Utility.throwError=function (resourceId, arg, errorLocation) { throw new OfficeExtension._Internal.RuntimeError({ @@ -11585,6 +12934,21 @@ var OfficeExtension; }); } }; + Utility.throwIfApiNotSupported=function (apiFullName, apiSetName, apiSetVersion, hostName) { + if (!Utility._doApiNotSupportedCheck) { + return; + } + if (typeof (window) !=="undefined" && window.Office && window.Office.context) { + if (!window.Office.context.requirements.isSetSupported(apiSetName, apiSetVersion)) { + var message=Utility._getResourceString(OfficeExtension.ResourceStrings.apiNotFoundDetails, [apiFullName, apiSetName+" "+apiSetVersion, hostName]); + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.apiNotFound, + message: message, + debugInfo: { errorLocation: apiFullName } + }); + } + } + }; Utility.getObjectPathExpression=function (objectPath) { var ret=""; while (objectPath) { @@ -11709,68 +13073,319 @@ var OfficeExtension; } } } - return OfficeExtension.RichApiMessageUtility.buildRequestMessageSafeArray("", requestFlags, request.method, request.url, request.headers, request.body); + return OfficeExtension.RichApiMessageUtility.buildRequestMessageSafeArray("", requestFlags, request.method, request.url, request.headers, request.body); + }; + Utility._parseHttpResponseHeaders=function (allResponseHeaders) { + var responseHeaders={}; + if (!Utility.isNullOrEmptyString(allResponseHeaders)) { + var regex=new RegExp("\r?\n"); + var entries=allResponseHeaders.split(regex); + for (var i=0; i < entries.length; i++) { + var entry=entries[i]; + if (entry !=null) { + var index=entry.indexOf(':'); + if (index > 0) { + var key=entry.substr(0, index); + var value=entry.substr(index+1); + key=Utility.trim(key); + value=Utility.trim(value); + responseHeaders[key.toUpperCase()]=value; + } + } + } + } + return responseHeaders; + }; + Utility._parseErrorResponse=function (responseInfo) { + var errorObj=null; + if (Utility.isPlainJsonObject(responseInfo.body)) { + errorObj=responseInfo.body; + } + else if (!Utility.isNullOrEmptyString(responseInfo.body)) { + var errorResponseBody=Utility.trim(responseInfo.body); + try { + errorObj=JSON.parse(errorResponseBody); + } + catch (e) { + Utility.log("Error when parse "+errorResponseBody); + } + } + var errorMessage; + var errorCode; + if (!Utility.isNullOrUndefined(errorObj) && typeof (errorObj)==="object" && errorObj.error) { + errorCode=errorObj.error.code; + errorMessage=Utility._getResourceString(OfficeExtension.ResourceStrings.connectionFailureWithDetails, [responseInfo.statusCode.toString(), errorObj.error.code, errorObj.error.message]); + } + else { + errorMessage=Utility._getResourceString(OfficeExtension.ResourceStrings.connectionFailureWithStatus, responseInfo.statusCode.toString()); + } + if (Utility.isNullOrEmptyString(errorCode)) { + errorCode=OfficeExtension.ErrorCodes.connectionFailure; + } + return { errorCode: errorCode, errorMessage: errorMessage }; + }; + Utility._copyHeaders=function (src, dest) { + if (src && dest) { + for (var key in src) { + dest[key]=src[key]; + } + } + }; + Utility._toCamelLowerCase=function (name) { + if (Utility.isNullOrEmptyString(name)) { + return name; + } + var index=0; + while (index < name.length && name.charCodeAt(index) >=65 && name.charCodeAt(index) <=90) { + index++; + } + if (index < name.length) { + return name.substr(0, index).toLowerCase()+name.substr(index); + } + else { + return name.toLowerCase(); + } + }; + Utility._logEnabled=false; + Utility._synchronousCleanup=false; + Utility._doApiNotSupportedCheck=false; + Utility.s_underscoreCharCode="_".charCodeAt(0); + return Utility; + }()); + OfficeExtension.Utility=Utility; +})(OfficeExtension || (OfficeExtension={})); + +var __extends=(this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p]=b[p]; + function __() { this.constructor=d; } + d.prototype=b===null ? Object.create(b) : (__.prototype=b.prototype, new __()); +}; +var OfficeCore; +(function (OfficeCore) { + var _hostName="OfficeCore"; + var _defaultApiSetName="ExperimentApi"; + var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; + var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; + var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; + var _createNewObjectObjectPath=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath; + var _createChildItemObjectPathUsingIndexer=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer; + var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; + var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; + var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; + var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined=OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; + var _load=OfficeExtension.Utility.load; + var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; + var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; + var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var FlightingService=(function (_super) { + __extends(FlightingService, _super); + function FlightingService() { + _super.apply(this, arguments); + } + Object.defineProperty(FlightingService.prototype, "_className", { + get: function () { + return "FlightingService"; + }, + enumerable: true, + configurable: true + }); + FlightingService.prototype.getClientSessionId=function () { + var action=_createMethodAction(this.context, this, "GetClientSessionId", 1, []); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + FlightingService.prototype.getDeferredFlights=function () { + var action=_createMethodAction(this.context, this, "GetDeferredFlights", 1, []); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + FlightingService.prototype.getFeature=function (featureName, type, defaultValue, possibleValues) { + return new OfficeCore.ABType(this.context, _createMethodObjectPath(this.context, this, "GetFeature", 1, [featureName, type, defaultValue, possibleValues], false, false, null)); + }; + FlightingService.prototype.getFeatureGate=function (featureName, scope) { + return new OfficeCore.ABType(this.context, _createMethodObjectPath(this.context, this, "GetFeatureGate", 1, [featureName, scope], false, false, null)); + }; + FlightingService.prototype.resetOverride=function (featureName) { + _createMethodAction(this.context, this, "ResetOverride", 0, [featureName]); + }; + FlightingService.prototype.setOverride=function (featureName, type, value) { + _createMethodAction(this.context, this, "SetOverride", 0, [featureName, type, value]); + }; + FlightingService.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + FlightingService.newObject=function (context) { + var ret=new OfficeCore.FlightingService(context, _createNewObjectObjectPath(context, "Microsoft.Experiment.FlightingService", false)); + return ret; + }; + FlightingService.prototype.toJSON=function () { + return {}; + }; + return FlightingService; + }(OfficeExtension.ClientObject)); + OfficeCore.FlightingService=FlightingService; + var ABType=(function (_super) { + __extends(ABType, _super); + function ABType() { + _super.apply(this, arguments); + } + Object.defineProperty(ABType.prototype, "_className", { + get: function () { + return "ABType"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ABType.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this.m_value, "ABType", this._isNull); + return this.m_value; + }, + enumerable: true, + configurable: true + }); + ABType.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Value"])) { + this.m_value=obj["Value"]; + } }; - Utility._parseHttpResponseHeaders=function (allResponseHeaders) { - var responseHeaders={}; - if (!Utility.isNullOrEmptyString(allResponseHeaders)) { - var regex=new RegExp("\r?\n"); - var entries=allResponseHeaders.split(regex); - for (var i=0; i < entries.length; i++) { - var entry=entries[i]; - if (entry !=null) { - var index=entry.indexOf(':'); - if (index > 0) { - var key=entry.substr(0, index); - var value=entry.substr(index+1); - key=Utility.trim(key); - value=Utility.trim(value); - responseHeaders[key.toUpperCase()]=value; - } - } - } - } - return responseHeaders; + ABType.prototype.load=function (option) { + _load(this, option); + return this; }; - Utility._parseErrorResponse=function (responseInfo) { - var errorObj=null; - if (!Utility.isNullOrEmptyString(responseInfo.body)) { - var errorResponseBody=Utility.trim(responseInfo.body); - try { - errorObj=JSON.parse(errorResponseBody); + ABType.prototype.toJSON=function () { + return { + "value": this.m_value + }; + }; + return ABType; + }(OfficeExtension.ClientObject)); + OfficeCore.ABType=ABType; + var FeatureType; + (function (FeatureType) { + FeatureType.boolean="Boolean"; + FeatureType.integer="Integer"; + FeatureType.string="String"; + })(FeatureType=OfficeCore.FeatureType || (OfficeCore.FeatureType={})); + var ExperimentErrorCodes; + (function (ExperimentErrorCodes) { + ExperimentErrorCodes.generalException="GeneralException"; + })(ExperimentErrorCodes=OfficeCore.ExperimentErrorCodes || (OfficeCore.ExperimentErrorCodes={})); +})(OfficeCore || (OfficeCore={})); +var OfficeCore; +(function (OfficeCore) { + var RequestContext=(function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + _super.call(this, url); + } + Object.defineProperty(RequestContext.prototype, "flighting", { + get: function () { + return this.flightingService; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "telemetry", { + get: function () { + if (!this.m_telemetry) { + this.m_telemetry=OfficeCore.TelemetryService.newObject(this); } - catch (e) { - Utility.log("Error when parse "+errorResponseBody); + return this.m_telemetry; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "flightingService", { + get: function () { + if (!this.m_flightingService) { + this.m_flightingService=OfficeCore.FlightingService.newObject(this); } - } - var errorMessage; - var errorCode; - if (!Utility.isNullOrUndefined(errorObj) && typeof (errorObj)==="object" && errorObj.error) { - errorCode=errorObj.error.code; - errorMessage=Utility._getResourceString(OfficeExtension.ResourceStrings.connectionFailureWithDetails, [responseInfo.statusCode.toString(), errorObj.error.code, errorObj.error.message]); - } - else { - errorMessage=Utility._getResourceString(OfficeExtension.ResourceStrings.connectionFailureWithStatus, responseInfo.statusCode.toString()); - } - if (Utility.isNullOrEmptyString(errorCode)) { - errorCode=OfficeExtension.ErrorCodes.connectionFailure; - } - return { errorCode: errorCode, errorMessage: errorMessage }; + return this.m_flightingService; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeExtension.ClientRequestContext)); + OfficeCore.RequestContext=RequestContext; +})(OfficeCore || (OfficeCore={})); +var OfficeCore; +(function (OfficeCore) { + var _hostName="OfficeCore"; + var _defaultApiSetName="TelemetryApi"; + var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; + var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; + var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; + var _createNewObjectObjectPath=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath; + var _createChildItemObjectPathUsingIndexer=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer; + var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; + var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; + var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; + var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined=OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; + var _load=OfficeExtension.Utility.load; + var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; + var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; + var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var _typeTelemetryService="TelemetryService"; + var TelemetryService=(function (_super) { + __extends(TelemetryService, _super); + function TelemetryService() { + _super.apply(this, arguments); + } + Object.defineProperty(TelemetryService.prototype, "_className", { + get: function () { + return "TelemetryService"; + }, + enumerable: true, + configurable: true + }); + TelemetryService.prototype.sendTelemetryEvent=function (telemetryProperties, eventName, eventContract, eventFlags, value) { + _createMethodAction(this.context, this, "SendTelemetryEvent", 1, [telemetryProperties, eventName, eventContract, eventFlags, value], false); }; - Utility._copyHeaders=function (src, dest) { - if (src && dest) { - for (var key in src) { - dest[key]=src[key]; - } - } + TelemetryService.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); }; - Utility._logEnabled=false; - Utility._synchronousCleanup=false; - Utility.s_underscoreCharCode="_".charCodeAt(0); - return Utility; - }()); - OfficeExtension.Utility=Utility; -})(OfficeExtension || (OfficeExtension={})); + TelemetryService.newObject=function (context) { + var ret=new OfficeCore.TelemetryService(context, _createNewObjectObjectPath(context, "Microsoft.Telemetry.TelemetryService", false, false)); + return ret; + }; + TelemetryService.prototype.toJSON=function () { + return {}; + }; + return TelemetryService; + }(OfficeExtension.ClientObject)); + OfficeCore.TelemetryService=TelemetryService; + var TelemetryErrorCodes; + (function (TelemetryErrorCodes) { + TelemetryErrorCodes.generalException="GeneralException"; + })(TelemetryErrorCodes=OfficeCore.TelemetryErrorCodes || (OfficeCore.TelemetryErrorCodes={})); +})(OfficeCore || (OfficeCore={})); var __extends=(this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p]=b[p]; @@ -11779,6 +13394,8 @@ var __extends=(this && this.__extends) || function (d, b) { }; var OneNote; (function (OneNote) { + var _hostName="OneNote"; + var _defaultApiSetName="OneNoteApi"; var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; @@ -11791,11 +13408,13 @@ var OneNote; var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; var _isUndefined=OfficeExtension.Utility.isUndefined; var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; var _load=OfficeExtension.Utility.load; var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var _typeApplication="Application"; var Application=(function (_super) { __extends(Application, _super); function Application() { @@ -11810,112 +13429,166 @@ var OneNote; }); Object.defineProperty(Application.prototype, "notebooks", { get: function () { - if (!this.m_notebooks) { - this.m_notebooks=new OneNote.NotebookCollection(this.context, _createPropertyObjectPath(this.context, this, "Notebooks", true, false)); + if (!this._N) { + this._N=new OneNote.NotebookCollection(this.context, _createPropertyObjectPath(this.context, this, "Notebooks", true, false, false)); } - return this.m_notebooks; + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(Application.prototype, "_platform", { get: function () { - _throwIfNotLoaded("_platform", this.m__platform, "Application", this._isNull); - return this.m__platform; + _throwIfNotLoaded("_platform", this.__p, _typeApplication, this._isNull); + return this.__p; }, enumerable: true, configurable: true }); Application.prototype.getActiveNotebook=function () { - return new OneNote.Notebook(this.context, _createMethodObjectPath(this.context, this, "GetActiveNotebook", 1, [], false, false, null)); + return new OneNote.Notebook(this.context, _createMethodObjectPath(this.context, this, "GetActiveNotebook", 1, [], false, false, null, false)); }; Application.prototype.getActiveNotebookOrNull=function () { - return new OneNote.Notebook(this.context, _createMethodObjectPath(this.context, this, "GetActiveNotebookOrNull", 1, [], false, false, null)); + return new OneNote.Notebook(this.context, _createMethodObjectPath(this.context, this, "GetActiveNotebookOrNull", 1, [], false, false, null, false)); }; Application.prototype.getActiveOutline=function () { - return new OneNote.Outline(this.context, _createMethodObjectPath(this.context, this, "GetActiveOutline", 1, [], false, false, null)); + return new OneNote.Outline(this.context, _createMethodObjectPath(this.context, this, "GetActiveOutline", 1, [], false, false, null, false)); }; Application.prototype.getActiveOutlineOrNull=function () { - return new OneNote.Outline(this.context, _createMethodObjectPath(this.context, this, "GetActiveOutlineOrNull", 1, [], false, false, null)); + return new OneNote.Outline(this.context, _createMethodObjectPath(this.context, this, "GetActiveOutlineOrNull", 1, [], false, false, null, false)); }; Application.prototype.getActivePage=function () { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "GetActivePage", 1, [], false, false, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "GetActivePage", 1, [], false, false, null, false)); }; Application.prototype.getActivePageOrNull=function () { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "GetActivePageOrNull", 1, [], false, false, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "GetActivePageOrNull", 1, [], false, false, null, false)); }; Application.prototype.getActiveParagraph=function () { - return new OneNote.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetActiveParagraph", 1, [], false, false, null)); + return new OneNote.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetActiveParagraph", 1, [], false, false, null, false)); }; Application.prototype.getActiveParagraphOrNull=function () { - return new OneNote.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetActiveParagraphOrNull", 1, [], false, false, null)); + return new OneNote.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetActiveParagraphOrNull", 1, [], false, false, null, false)); }; Application.prototype.getActiveSection=function () { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "GetActiveSection", 1, [], false, false, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "GetActiveSection", 1, [], false, false, null, false)); }; Application.prototype.getActiveSectionOrNull=function () { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "GetActiveSectionOrNull", 1, [], false, false, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "GetActiveSectionOrNull", 1, [], false, false, null, false)); + }; + Application.prototype.getSelectedPages=function () { + return new OneNote.PageCollection(this.context, _createMethodObjectPath(this.context, this, "GetSelectedPages", 1, [], true, false, null, false)); + }; + Application.prototype.getWindowSize=function () { + var action=_createMethodAction(this.context, this, "GetWindowSize", 0, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Application.prototype.insertHtmlAtCurrentPosition=function (html) { + _createMethodAction(this.context, this, "InsertHtmlAtCurrentPosition", 0, [html], false); }; Application.prototype.navigateToPage=function (page) { - _createMethodAction(this.context, this, "NavigateToPage", 1, [page]); + _createMethodAction(this.context, this, "NavigateToPage", 1, [page], false); }; Application.prototype.navigateToPageWithClientUrl=function (url) { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "NavigateToPageWithClientUrl", 1, [url], false, false, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "NavigateToPageWithClientUrl", 1, [url], false, false, null, false)); + }; + Application.prototype._ClientLog=function (level, eventName, flag, data) { + _createMethodAction(this.context, this, "_ClientLog", 1, [level, eventName, flag, data], false); + }; + Application.prototype._EnableControl=function (controlId, enable) { + _createMethodAction(this.context, this, "_EnableControl", 0, [controlId, enable], false); + }; + Application.prototype._EnterFullScreen=function () { + _createMethodAction(this.context, this, "_EnterFullScreen", 0, [], false); + }; + Application.prototype._ExitFullScreen=function () { + _createMethodAction(this.context, this, "_ExitFullScreen", 0, [], false); + }; + Application.prototype._FocusCanvas=function () { + _createMethodAction(this.context, this, "_FocusCanvas", 0, [], false); }; Application.prototype._GetAccountInfo=function () { - var action=_createMethodAction(this.context, this, "_GetAccountInfo", 1, []); + var action=_createMethodAction(this.context, this, "_GetAccountInfo", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Application.prototype._GetAccountInfoByType=function (filter) { + var action=_createMethodAction(this.context, this, "_GetAccountInfoByType", 1, [filter], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Application.prototype._GetControlVisibility=function (controlId) { + var action=_createMethodAction(this.context, this, "_GetControlVisibility", 1, [controlId], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Application.prototype._GetLoggingInfo=function () { + var action=_createMethodAction(this.context, this, "_GetLoggingInfo", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Application.prototype._GetObjectByReferenceId=function (referenceId) { - var action=_createMethodAction(this.context, this, "_GetObjectByReferenceId", 1, [referenceId]); + var action=_createMethodAction(this.context, this, "_GetObjectByReferenceId", 1, [referenceId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Application.prototype._GetObjectTypeNameByReferenceId=function (referenceId) { - var action=_createMethodAction(this.context, this, "_GetObjectTypeNameByReferenceId", 1, [referenceId]); + var action=_createMethodAction(this.context, this, "_GetObjectTypeNameByReferenceId", 1, [referenceId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Application.prototype._GetServiceTokenByUrl=function (url) { - var action=_createMethodAction(this.context, this, "_GetServiceTokenByUrl", 1, [url]); + var action=_createMethodAction(this.context, this, "_GetServiceTokenByUrl", 1, [url], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Application.prototype._GetServiceTokens=function (id) { - var action=_createMethodAction(this.context, this, "_GetServiceTokens", 1, [id]); + var action=_createMethodAction(this.context, this, "_GetServiceTokens", 1, [id], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Application.prototype._GetServiceTokensExt=function (id, filter) { - var action=_createMethodAction(this.context, this, "_GetServiceTokensExt", 1, [id, filter]); + var action=_createMethodAction(this.context, this, "_GetServiceTokensExt", 1, [id, filter], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Application.prototype._GetServiceUrl=function (id) { - var action=_createMethodAction(this.context, this, "_GetServiceUrl", 1, [id]); + var action=_createMethodAction(this.context, this, "_GetServiceUrl", 1, [id], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Application.prototype._IsControlEnabled=function (controlId) { + var action=_createMethodAction(this.context, this, "_IsControlEnabled", 1, [controlId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Application.prototype._RemoveAllReferences=function () { - _createMethodAction(this.context, this, "_RemoveAllReferences", 1, []); + _createMethodAction(this.context, this, "_RemoveAllReferences", 1, [], false); }; Application.prototype._RemoveReference=function (referenceId) { - _createMethodAction(this.context, this, "_RemoveReference", 1, [referenceId]); + _createMethodAction(this.context, this, "_RemoveReference", 1, [referenceId], false); }; - Application.prototype._SendDataToLearningTools=function (data) { - var action=_createMethodAction(this.context, this, "_SendDataToLearningTools", 0, [data]); + Application.prototype._SendDataToLearningTools=function (data, sessionId) { + var action=_createMethodAction(this.context, this, "_SendDataToLearningTools", 0, [data, sessionId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; + Application.prototype._SetControlVisibility=function (controlId, visible) { + _createMethodAction(this.context, this, "_SetControlVisibility", 0, [controlId, visible], false); + }; Application.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -11923,7 +13596,7 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_platform"])) { - this.m__platform=obj["_platform"]; + this.__p=obj["_platform"]; } _handleNavigationPropertyResults(this, obj, ["notebooks", "Notebooks"]); }; @@ -11937,6 +13610,7 @@ var OneNote; return Application; }(OfficeExtension.ClientObject)); OneNote.Application=Application; + var _typeInkAnalysis="InkAnalysis"; var InkAnalysis=(function (_super) { __extends(InkAnalysis, _super); function InkAnalysis() { @@ -11951,42 +13625,42 @@ var OneNote; }); Object.defineProperty(InkAnalysis.prototype, "page", { get: function () { - if (!this.m_page) { - this.m_page=new OneNote.Page(this.context, _createPropertyObjectPath(this.context, this, "Page", false, false)); + if (!this._P) { + this._P=new OneNote.Page(this.context, _createPropertyObjectPath(this.context, this, "Page", false, false, false)); } - return this.m_page; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysis.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new OneNote.InkAnalysisParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._Pa) { + this._Pa=new OneNote.InkAnalysisParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysis.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "InkAnalysis", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeInkAnalysis, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysis.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkAnalysis", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkAnalysis, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InkAnalysis.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkAnalysis.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -11995,10 +13669,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["page", "Page", "paragraphs", "Paragraphs"]); }; @@ -12012,10 +13686,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; InkAnalysis.prototype.track=function () { @@ -12028,12 +13702,13 @@ var OneNote; }; InkAnalysis.prototype.toJSON=function () { return { - "id": this.m_id + "id": this._I }; }; return InkAnalysis; }(OfficeExtension.ClientObject)); OneNote.InkAnalysis=InkAnalysis; + var _typeInkAnalysisParagraph="InkAnalysisParagraph"; var InkAnalysisParagraph=(function (_super) { __extends(InkAnalysisParagraph, _super); function InkAnalysisParagraph() { @@ -12048,42 +13723,42 @@ var OneNote; }); Object.defineProperty(InkAnalysisParagraph.prototype, "inkAnalysis", { get: function () { - if (!this.m_inkAnalysis) { - this.m_inkAnalysis=new OneNote.InkAnalysis(this.context, _createPropertyObjectPath(this.context, this, "InkAnalysis", false, false)); + if (!this._In) { + this._In=new OneNote.InkAnalysis(this.context, _createPropertyObjectPath(this.context, this, "InkAnalysis", false, false, false)); } - return this.m_inkAnalysis; + return this._In; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisParagraph.prototype, "lines", { get: function () { - if (!this.m_lines) { - this.m_lines=new OneNote.InkAnalysisLineCollection(this.context, _createPropertyObjectPath(this.context, this, "Lines", true, false)); + if (!this._L) { + this._L=new OneNote.InkAnalysisLineCollection(this.context, _createPropertyObjectPath(this.context, this, "Lines", true, false, false)); } - return this.m_lines; + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisParagraph.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "InkAnalysisParagraph", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeInkAnalysisParagraph, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisParagraph.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkAnalysisParagraph", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkAnalysisParagraph, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InkAnalysisParagraph.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkAnalysisParagraph.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12092,10 +13767,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["inkAnalysis", "InkAnalysis", "lines", "Lines"]); }; @@ -12109,10 +13784,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; InkAnalysisParagraph.prototype.track=function () { @@ -12125,12 +13800,13 @@ var OneNote; }; InkAnalysisParagraph.prototype.toJSON=function () { return { - "id": this.m_id + "id": this._I }; }; return InkAnalysisParagraph; }(OfficeExtension.ClientObject)); OneNote.InkAnalysisParagraph=InkAnalysisParagraph; + var _typeInkAnalysisParagraphCollection="InkAnalysisParagraphCollection"; var InkAnalysisParagraphCollection=(function (_super) { __extends(InkAnalysisParagraphCollection, _super); function InkAnalysisParagraphCollection() { @@ -12145,7 +13821,7 @@ var OneNote; }); Object.defineProperty(InkAnalysisParagraphCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "InkAnalysisParagraphCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeInkAnalysisParagraphCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -12153,16 +13829,16 @@ var OneNote; }); Object.defineProperty(InkAnalysisParagraphCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "InkAnalysisParagraphCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeInkAnalysisParagraphCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisParagraphCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkAnalysisParagraphCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkAnalysisParagraphCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -12171,10 +13847,10 @@ var OneNote; return new OneNote.InkAnalysisParagraph(this.context, _createIndexerObjectPath(this.context, this, [index])); }; InkAnalysisParagraphCollection.prototype.getItemAt=function (index) { - return new OneNote.InkAnalysisParagraph(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.InkAnalysisParagraph(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; InkAnalysisParagraphCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkAnalysisParagraphCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12183,10 +13859,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -12208,7 +13884,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; InkAnalysisParagraphCollection.prototype.track=function () { @@ -12221,12 +13897,13 @@ var OneNote; }; InkAnalysisParagraphCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return InkAnalysisParagraphCollection; }(OfficeExtension.ClientObject)); OneNote.InkAnalysisParagraphCollection=InkAnalysisParagraphCollection; + var _typeInkAnalysisLine="InkAnalysisLine"; var InkAnalysisLine=(function (_super) { __extends(InkAnalysisLine, _super); function InkAnalysisLine() { @@ -12241,42 +13918,42 @@ var OneNote; }); Object.defineProperty(InkAnalysisLine.prototype, "paragraph", { get: function () { - if (!this.m_paragraph) { - this.m_paragraph=new OneNote.InkAnalysisParagraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false)); + if (!this._P) { + this._P=new OneNote.InkAnalysisParagraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false, false)); } - return this.m_paragraph; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisLine.prototype, "words", { get: function () { - if (!this.m_words) { - this.m_words=new OneNote.InkAnalysisWordCollection(this.context, _createPropertyObjectPath(this.context, this, "Words", true, false)); + if (!this._W) { + this._W=new OneNote.InkAnalysisWordCollection(this.context, _createPropertyObjectPath(this.context, this, "Words", true, false, false)); } - return this.m_words; + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisLine.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "InkAnalysisLine", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeInkAnalysisLine, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisLine.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkAnalysisLine", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkAnalysisLine, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InkAnalysisLine.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkAnalysisLine.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12285,10 +13962,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["paragraph", "Paragraph", "words", "Words"]); }; @@ -12302,10 +13979,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; InkAnalysisLine.prototype.track=function () { @@ -12318,12 +13995,13 @@ var OneNote; }; InkAnalysisLine.prototype.toJSON=function () { return { - "id": this.m_id + "id": this._I }; }; return InkAnalysisLine; }(OfficeExtension.ClientObject)); OneNote.InkAnalysisLine=InkAnalysisLine; + var _typeInkAnalysisLineCollection="InkAnalysisLineCollection"; var InkAnalysisLineCollection=(function (_super) { __extends(InkAnalysisLineCollection, _super); function InkAnalysisLineCollection() { @@ -12338,7 +14016,7 @@ var OneNote; }); Object.defineProperty(InkAnalysisLineCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "InkAnalysisLineCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeInkAnalysisLineCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -12346,16 +14024,16 @@ var OneNote; }); Object.defineProperty(InkAnalysisLineCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "InkAnalysisLineCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeInkAnalysisLineCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisLineCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkAnalysisLineCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkAnalysisLineCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -12364,10 +14042,10 @@ var OneNote; return new OneNote.InkAnalysisLine(this.context, _createIndexerObjectPath(this.context, this, [index])); }; InkAnalysisLineCollection.prototype.getItemAt=function (index) { - return new OneNote.InkAnalysisLine(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.InkAnalysisLine(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; InkAnalysisLineCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkAnalysisLineCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12376,10 +14054,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -12401,7 +14079,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; InkAnalysisLineCollection.prototype.track=function () { @@ -12414,12 +14092,13 @@ var OneNote; }; InkAnalysisLineCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return InkAnalysisLineCollection; }(OfficeExtension.ClientObject)); OneNote.InkAnalysisLineCollection=InkAnalysisLineCollection; + var _typeInkAnalysisWord="InkAnalysisWord"; var InkAnalysisWord=(function (_super) { __extends(InkAnalysisWord, _super); function InkAnalysisWord() { @@ -12434,56 +14113,56 @@ var OneNote; }); Object.defineProperty(InkAnalysisWord.prototype, "line", { get: function () { - if (!this.m_line) { - this.m_line=new OneNote.InkAnalysisLine(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false)); + if (!this._Li) { + this._Li=new OneNote.InkAnalysisLine(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false, false)); } - return this.m_line; + return this._Li; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisWord.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "InkAnalysisWord", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeInkAnalysisWord, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisWord.prototype, "languageId", { get: function () { - _throwIfNotLoaded("languageId", this.m_languageId, "InkAnalysisWord", this._isNull); - return this.m_languageId; + _throwIfNotLoaded("languageId", this._L, _typeInkAnalysisWord, this._isNull); + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisWord.prototype, "strokePointers", { get: function () { - _throwIfNotLoaded("strokePointers", this.m_strokePointers, "InkAnalysisWord", this._isNull); - return this.m_strokePointers; + _throwIfNotLoaded("strokePointers", this._S, _typeInkAnalysisWord, this._isNull); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisWord.prototype, "wordAlternates", { get: function () { - _throwIfNotLoaded("wordAlternates", this.m_wordAlternates, "InkAnalysisWord", this._isNull); - return this.m_wordAlternates; + _throwIfNotLoaded("wordAlternates", this._W, _typeInkAnalysisWord, this._isNull); + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisWord.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkAnalysisWord", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkAnalysisWord, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InkAnalysisWord.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkAnalysisWord.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12492,19 +14171,19 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["LanguageId"])) { - this.m_languageId=obj["LanguageId"]; + this._L=obj["LanguageId"]; } if (!_isUndefined(obj["StrokePointers"])) { - this.m_strokePointers=obj["StrokePointers"]; + this._S=obj["StrokePointers"]; } if (!_isUndefined(obj["WordAlternates"])) { - this.m_wordAlternates=obj["WordAlternates"]; + this._W=obj["WordAlternates"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["line", "Line"]); }; @@ -12518,10 +14197,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; InkAnalysisWord.prototype.track=function () { @@ -12534,15 +14213,16 @@ var OneNote; }; InkAnalysisWord.prototype.toJSON=function () { return { - "id": this.m_id, - "languageId": this.m_languageId, - "strokePointers": this.m_strokePointers, - "wordAlternates": this.m_wordAlternates + "id": this._I, + "languageId": this._L, + "strokePointers": this._S, + "wordAlternates": this._W }; }; return InkAnalysisWord; }(OfficeExtension.ClientObject)); OneNote.InkAnalysisWord=InkAnalysisWord; + var _typeInkAnalysisWordCollection="InkAnalysisWordCollection"; var InkAnalysisWordCollection=(function (_super) { __extends(InkAnalysisWordCollection, _super); function InkAnalysisWordCollection() { @@ -12557,7 +14237,7 @@ var OneNote; }); Object.defineProperty(InkAnalysisWordCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "InkAnalysisWordCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeInkAnalysisWordCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -12565,16 +14245,16 @@ var OneNote; }); Object.defineProperty(InkAnalysisWordCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "InkAnalysisWordCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeInkAnalysisWordCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisWordCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkAnalysisWordCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkAnalysisWordCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -12583,10 +14263,10 @@ var OneNote; return new OneNote.InkAnalysisWord(this.context, _createIndexerObjectPath(this.context, this, [index])); }; InkAnalysisWordCollection.prototype.getItemAt=function (index) { - return new OneNote.InkAnalysisWord(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.InkAnalysisWord(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; InkAnalysisWordCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkAnalysisWordCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12595,10 +14275,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -12620,7 +14300,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; InkAnalysisWordCollection.prototype.track=function () { @@ -12633,12 +14313,13 @@ var OneNote; }; InkAnalysisWordCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return InkAnalysisWordCollection; }(OfficeExtension.ClientObject)); OneNote.InkAnalysisWordCollection=InkAnalysisWordCollection; + var _typeFloatingInk="FloatingInk"; var FloatingInk=(function (_super) { __extends(FloatingInk, _super); function FloatingInk() { @@ -12653,42 +14334,42 @@ var OneNote; }); Object.defineProperty(FloatingInk.prototype, "inkStrokes", { get: function () { - if (!this.m_inkStrokes) { - this.m_inkStrokes=new OneNote.InkStrokeCollection(this.context, _createPropertyObjectPath(this.context, this, "InkStrokes", true, false)); + if (!this._In) { + this._In=new OneNote.InkStrokeCollection(this.context, _createPropertyObjectPath(this.context, this, "InkStrokes", true, false, false)); } - return this.m_inkStrokes; + return this._In; }, enumerable: true, configurable: true }); Object.defineProperty(FloatingInk.prototype, "pageContent", { get: function () { - if (!this.m_pageContent) { - this.m_pageContent=new OneNote.PageContent(this.context, _createPropertyObjectPath(this.context, this, "PageContent", false, false)); + if (!this._P) { + this._P=new OneNote.PageContent(this.context, _createPropertyObjectPath(this.context, this, "PageContent", false, false, false)); } - return this.m_pageContent; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(FloatingInk.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "FloatingInk", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeFloatingInk, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(FloatingInk.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "FloatingInk", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeFloatingInk, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); FloatingInk.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; FloatingInk.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12697,10 +14378,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["inkStrokes", "InkStrokes", "pageContent", "PageContent"]); }; @@ -12714,10 +14395,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; FloatingInk.prototype.track=function () { @@ -12730,12 +14411,13 @@ var OneNote; }; FloatingInk.prototype.toJSON=function () { return { - "id": this.m_id + "id": this._I }; }; return FloatingInk; }(OfficeExtension.ClientObject)); OneNote.FloatingInk=FloatingInk; + var _typeInkStroke="InkStroke"; var InkStroke=(function (_super) { __extends(InkStroke, _super); function InkStroke() { @@ -12750,32 +14432,32 @@ var OneNote; }); Object.defineProperty(InkStroke.prototype, "floatingInk", { get: function () { - if (!this.m_floatingInk) { - this.m_floatingInk=new OneNote.FloatingInk(this.context, _createPropertyObjectPath(this.context, this, "FloatingInk", false, false)); + if (!this._F) { + this._F=new OneNote.FloatingInk(this.context, _createPropertyObjectPath(this.context, this, "FloatingInk", false, false, false)); } - return this.m_floatingInk; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(InkStroke.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "InkStroke", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeInkStroke, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(InkStroke.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkStroke", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkStroke, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InkStroke.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkStroke.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12784,10 +14466,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["floatingInk", "FloatingInk"]); }; @@ -12801,10 +14483,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; InkStroke.prototype.track=function () { @@ -12817,12 +14499,13 @@ var OneNote; }; InkStroke.prototype.toJSON=function () { return { - "id": this.m_id + "id": this._I }; }; return InkStroke; }(OfficeExtension.ClientObject)); OneNote.InkStroke=InkStroke; + var _typeInkStrokeCollection="InkStrokeCollection"; var InkStrokeCollection=(function (_super) { __extends(InkStrokeCollection, _super); function InkStrokeCollection() { @@ -12837,7 +14520,7 @@ var OneNote; }); Object.defineProperty(InkStrokeCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "InkStrokeCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeInkStrokeCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -12845,16 +14528,16 @@ var OneNote; }); Object.defineProperty(InkStrokeCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "InkStrokeCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeInkStrokeCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(InkStrokeCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkStrokeCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkStrokeCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -12863,10 +14546,10 @@ var OneNote; return new OneNote.InkStroke(this.context, _createIndexerObjectPath(this.context, this, [index])); }; InkStrokeCollection.prototype.getItemAt=function (index) { - return new OneNote.InkStroke(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.InkStroke(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; InkStrokeCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkStrokeCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12875,10 +14558,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -12900,7 +14583,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; InkStrokeCollection.prototype.track=function () { @@ -12913,12 +14596,13 @@ var OneNote; }; InkStrokeCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return InkStrokeCollection; }(OfficeExtension.ClientObject)); OneNote.InkStrokeCollection=InkStrokeCollection; + var _typeInkWord="InkWord"; var InkWord=(function (_super) { __extends(InkWord, _super); function InkWord() { @@ -12933,48 +14617,48 @@ var OneNote; }); Object.defineProperty(InkWord.prototype, "paragraph", { get: function () { - if (!this.m_paragraph) { - this.m_paragraph=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false)); + if (!this._P) { + this._P=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false, false)); } - return this.m_paragraph; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(InkWord.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "InkWord", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeInkWord, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(InkWord.prototype, "languageId", { get: function () { - _throwIfNotLoaded("languageId", this.m_languageId, "InkWord", this._isNull); - return this.m_languageId; + _throwIfNotLoaded("languageId", this._L, _typeInkWord, this._isNull); + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(InkWord.prototype, "wordAlternates", { get: function () { - _throwIfNotLoaded("wordAlternates", this.m_wordAlternates, "InkWord", this._isNull); - return this.m_wordAlternates; + _throwIfNotLoaded("wordAlternates", this._W, _typeInkWord, this._isNull); + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(InkWord.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkWord", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkWord, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InkWord.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkWord.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12983,16 +14667,16 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["LanguageId"])) { - this.m_languageId=obj["LanguageId"]; + this._L=obj["LanguageId"]; } if (!_isUndefined(obj["WordAlternates"])) { - this.m_wordAlternates=obj["WordAlternates"]; + this._W=obj["WordAlternates"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["paragraph", "Paragraph"]); }; @@ -13006,10 +14690,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; InkWord.prototype.track=function () { @@ -13022,14 +14706,15 @@ var OneNote; }; InkWord.prototype.toJSON=function () { return { - "id": this.m_id, - "languageId": this.m_languageId, - "wordAlternates": this.m_wordAlternates + "id": this._I, + "languageId": this._L, + "wordAlternates": this._W }; }; return InkWord; }(OfficeExtension.ClientObject)); OneNote.InkWord=InkWord; + var _typeInkWordCollection="InkWordCollection"; var InkWordCollection=(function (_super) { __extends(InkWordCollection, _super); function InkWordCollection() { @@ -13044,7 +14729,7 @@ var OneNote; }); Object.defineProperty(InkWordCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "InkWordCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeInkWordCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -13052,16 +14737,16 @@ var OneNote; }); Object.defineProperty(InkWordCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "InkWordCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeInkWordCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(InkWordCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkWordCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkWordCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -13070,10 +14755,10 @@ var OneNote; return new OneNote.InkWord(this.context, _createIndexerObjectPath(this.context, this, [index])); }; InkWordCollection.prototype.getItemAt=function (index) { - return new OneNote.InkWord(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.InkWord(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; InkWordCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkWordCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13082,10 +14767,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -13107,7 +14792,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; InkWordCollection.prototype.track=function () { @@ -13120,12 +14805,13 @@ var OneNote; }; InkWordCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return InkWordCollection; }(OfficeExtension.ClientObject)); OneNote.InkWordCollection=InkWordCollection; + var _typeNotebook="Notebook"; var Notebook=(function (_super) { __extends(Notebook, _super); function Notebook() { @@ -13140,81 +14826,81 @@ var OneNote; }); Object.defineProperty(Notebook.prototype, "sectionGroups", { get: function () { - if (!this.m_sectionGroups) { - this.m_sectionGroups=new OneNote.SectionGroupCollection(this.context, _createPropertyObjectPath(this.context, this, "SectionGroups", true, false)); + if (!this._S) { + this._S=new OneNote.SectionGroupCollection(this.context, _createPropertyObjectPath(this.context, this, "SectionGroups", true, false, false)); } - return this.m_sectionGroups; + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(Notebook.prototype, "sections", { get: function () { - if (!this.m_sections) { - this.m_sections=new OneNote.SectionCollection(this.context, _createPropertyObjectPath(this.context, this, "Sections", true, false)); + if (!this._Se) { + this._Se=new OneNote.SectionCollection(this.context, _createPropertyObjectPath(this.context, this, "Sections", true, false, false)); } - return this.m_sections; + return this._Se; }, enumerable: true, configurable: true }); Object.defineProperty(Notebook.prototype, "baseUrl", { get: function () { - _throwIfNotLoaded("baseUrl", this.m_baseUrl, "Notebook", this._isNull); - return this.m_baseUrl; + _throwIfNotLoaded("baseUrl", this._B, _typeNotebook, this._isNull); + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(Notebook.prototype, "clientUrl", { get: function () { - _throwIfNotLoaded("clientUrl", this.m_clientUrl, "Notebook", this._isNull); - return this.m_clientUrl; + _throwIfNotLoaded("clientUrl", this._C, _typeNotebook, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Notebook.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Notebook", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeNotebook, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Notebook.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "Notebook", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeNotebook, this._isNull); + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(Notebook.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Notebook", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeNotebook, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Notebook.prototype.addSection=function (name) { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "AddSection", 0, [name], false, true, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "AddSection", 0, [name], false, true, null, false)); }; Notebook.prototype.addSectionGroup=function (name) { - return new OneNote.SectionGroup(this.context, _createMethodObjectPath(this.context, this, "AddSectionGroup", 0, [name], false, true, null)); + return new OneNote.SectionGroup(this.context, _createMethodObjectPath(this.context, this, "AddSectionGroup", 0, [name], false, true, null, false)); }; Notebook.prototype.getRestApiId=function () { - var action=_createMethodAction(this.context, this, "GetRestApiId", 1, []); + var action=_createMethodAction(this.context, this, "GetRestApiId", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Notebook.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Notebook.prototype._Sync=function () { - _createMethodAction(this.context, this, "_Sync", 0, []); + _createMethodAction(this.context, this, "_Sync", 0, [], false); }; Notebook.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13223,19 +14909,19 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["BaseUrl"])) { - this.m_baseUrl=obj["BaseUrl"]; + this._B=obj["BaseUrl"]; } if (!_isUndefined(obj["ClientUrl"])) { - this.m_clientUrl=obj["ClientUrl"]; + this._C=obj["ClientUrl"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["sectionGroups", "SectionGroups", "sections", "Sections"]); }; @@ -13249,10 +14935,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; Notebook.prototype.track=function () { @@ -13265,15 +14951,16 @@ var OneNote; }; Notebook.prototype.toJSON=function () { return { - "baseUrl": this.m_baseUrl, - "clientUrl": this.m_clientUrl, - "id": this.m_id, - "name": this.m_name + "baseUrl": this._B, + "clientUrl": this._C, + "id": this._I, + "name": this._N }; }; return Notebook; }(OfficeExtension.ClientObject)); OneNote.Notebook=Notebook; + var _typeNotebookCollection="NotebookCollection"; var NotebookCollection=(function (_super) { __extends(NotebookCollection, _super); function NotebookCollection() { @@ -13288,7 +14975,7 @@ var OneNote; }); Object.defineProperty(NotebookCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "NotebookCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeNotebookCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -13296,31 +14983,31 @@ var OneNote; }); Object.defineProperty(NotebookCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "NotebookCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeNotebookCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(NotebookCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "NotebookCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeNotebookCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); NotebookCollection.prototype.getByName=function (name) { - return new OneNote.NotebookCollection(this.context, _createMethodObjectPath(this.context, this, "GetByName", 1, [name], true, false, null)); + return new OneNote.NotebookCollection(this.context, _createMethodObjectPath(this.context, this, "GetByName", 1, [name], true, false, null, false)); }; NotebookCollection.prototype.getItem=function (index) { return new OneNote.Notebook(this.context, _createIndexerObjectPath(this.context, this, [index])); }; NotebookCollection.prototype.getItemAt=function (index) { - return new OneNote.Notebook(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.Notebook(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; NotebookCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; NotebookCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13329,10 +15016,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -13354,7 +15041,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; NotebookCollection.prototype.track=function () { @@ -13367,12 +15054,13 @@ var OneNote; }; NotebookCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return NotebookCollection; }(OfficeExtension.ClientObject)); OneNote.NotebookCollection=NotebookCollection; + var _typeSectionGroup="SectionGroup"; var SectionGroup=(function (_super) { __extends(SectionGroup, _super); function SectionGroup() { @@ -13387,100 +15075,100 @@ var OneNote; }); Object.defineProperty(SectionGroup.prototype, "notebook", { get: function () { - if (!this.m_notebook) { - this.m_notebook=new OneNote.Notebook(this.context, _createPropertyObjectPath(this.context, this, "Notebook", false, false)); + if (!this._No) { + this._No=new OneNote.Notebook(this.context, _createPropertyObjectPath(this.context, this, "Notebook", false, false, false)); } - return this.m_notebook; + return this._No; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "parentSectionGroup", { get: function () { - if (!this.m_parentSectionGroup) { - this.m_parentSectionGroup=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroup", false, false)); + if (!this._P) { + this._P=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroup", false, false, false)); } - return this.m_parentSectionGroup; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "parentSectionGroupOrNull", { get: function () { - if (!this.m_parentSectionGroupOrNull) { - this.m_parentSectionGroupOrNull=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroupOrNull", false, false)); + if (!this._Pa) { + this._Pa=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroupOrNull", false, false, false)); } - return this.m_parentSectionGroupOrNull; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "sectionGroups", { get: function () { - if (!this.m_sectionGroups) { - this.m_sectionGroups=new OneNote.SectionGroupCollection(this.context, _createPropertyObjectPath(this.context, this, "SectionGroups", true, false)); + if (!this._S) { + this._S=new OneNote.SectionGroupCollection(this.context, _createPropertyObjectPath(this.context, this, "SectionGroups", true, false, false)); } - return this.m_sectionGroups; + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "sections", { get: function () { - if (!this.m_sections) { - this.m_sections=new OneNote.SectionCollection(this.context, _createPropertyObjectPath(this.context, this, "Sections", true, false)); + if (!this._Se) { + this._Se=new OneNote.SectionCollection(this.context, _createPropertyObjectPath(this.context, this, "Sections", true, false, false)); } - return this.m_sections; + return this._Se; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "clientUrl", { get: function () { - _throwIfNotLoaded("clientUrl", this.m_clientUrl, "SectionGroup", this._isNull); - return this.m_clientUrl; + _throwIfNotLoaded("clientUrl", this._C, _typeSectionGroup, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "SectionGroup", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeSectionGroup, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "SectionGroup", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeSectionGroup, this._isNull); + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "SectionGroup", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeSectionGroup, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); SectionGroup.prototype.addSection=function (title) { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "AddSection", 0, [title], false, true, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "AddSection", 0, [title], false, true, null, false)); }; SectionGroup.prototype.addSectionGroup=function (name) { - return new OneNote.SectionGroup(this.context, _createMethodObjectPath(this.context, this, "AddSectionGroup", 0, [name], false, true, null)); + return new OneNote.SectionGroup(this.context, _createMethodObjectPath(this.context, this, "AddSectionGroup", 0, [name], false, true, null, false)); }; SectionGroup.prototype.getRestApiId=function () { - var action=_createMethodAction(this.context, this, "GetRestApiId", 1, []); + var action=_createMethodAction(this.context, this, "GetRestApiId", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; SectionGroup.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; SectionGroup.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13489,16 +15177,16 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["ClientUrl"])) { - this.m_clientUrl=obj["ClientUrl"]; + this._C=obj["ClientUrl"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["notebook", "Notebook", "parentSectionGroup", "ParentSectionGroup", "parentSectionGroupOrNull", "ParentSectionGroupOrNull", "sectionGroups", "SectionGroups", "sections", "Sections"]); }; @@ -13512,10 +15200,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; SectionGroup.prototype.track=function () { @@ -13528,14 +15216,15 @@ var OneNote; }; SectionGroup.prototype.toJSON=function () { return { - "clientUrl": this.m_clientUrl, - "id": this.m_id, - "name": this.m_name + "clientUrl": this._C, + "id": this._I, + "name": this._N }; }; return SectionGroup; }(OfficeExtension.ClientObject)); OneNote.SectionGroup=SectionGroup; + var _typeSectionGroupCollection="SectionGroupCollection"; var SectionGroupCollection=(function (_super) { __extends(SectionGroupCollection, _super); function SectionGroupCollection() { @@ -13550,7 +15239,7 @@ var OneNote; }); Object.defineProperty(SectionGroupCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "SectionGroupCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeSectionGroupCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -13558,31 +15247,31 @@ var OneNote; }); Object.defineProperty(SectionGroupCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "SectionGroupCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeSectionGroupCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroupCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "SectionGroupCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeSectionGroupCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); SectionGroupCollection.prototype.getByName=function (name) { - return new OneNote.SectionGroupCollection(this.context, _createMethodObjectPath(this.context, this, "GetByName", 1, [name], true, false, null)); + return new OneNote.SectionGroupCollection(this.context, _createMethodObjectPath(this.context, this, "GetByName", 1, [name], true, false, null, false)); }; SectionGroupCollection.prototype.getItem=function (index) { return new OneNote.SectionGroup(this.context, _createIndexerObjectPath(this.context, this, [index])); }; SectionGroupCollection.prototype.getItemAt=function (index) { - return new OneNote.SectionGroup(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.SectionGroup(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; SectionGroupCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; SectionGroupCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13591,10 +15280,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -13616,7 +15305,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; SectionGroupCollection.prototype.track=function () { @@ -13629,12 +15318,13 @@ var OneNote; }; SectionGroupCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return SectionGroupCollection; }(OfficeExtension.ClientObject)); OneNote.SectionGroupCollection=SectionGroupCollection; + var _typeSection="Section"; var Section=(function (_super) { __extends(Section, _super); function Section() { @@ -13649,96 +15339,116 @@ var OneNote; }); Object.defineProperty(Section.prototype, "notebook", { get: function () { - if (!this.m_notebook) { - this.m_notebook=new OneNote.Notebook(this.context, _createPropertyObjectPath(this.context, this, "Notebook", false, false)); + if (!this._No) { + this._No=new OneNote.Notebook(this.context, _createPropertyObjectPath(this.context, this, "Notebook", false, false, false)); } - return this.m_notebook; + return this._No; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "pages", { get: function () { - if (!this.m_pages) { - this.m_pages=new OneNote.PageCollection(this.context, _createPropertyObjectPath(this.context, this, "Pages", true, false)); + if (!this._P) { + this._P=new OneNote.PageCollection(this.context, _createPropertyObjectPath(this.context, this, "Pages", true, false, false)); } - return this.m_pages; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "parentSectionGroup", { get: function () { - if (!this.m_parentSectionGroup) { - this.m_parentSectionGroup=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroup", false, false)); + if (!this._Pa) { + this._Pa=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroup", false, false, false)); } - return this.m_parentSectionGroup; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "parentSectionGroupOrNull", { get: function () { - if (!this.m_parentSectionGroupOrNull) { - this.m_parentSectionGroupOrNull=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroupOrNull", false, false)); + if (!this._Par) { + this._Par=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroupOrNull", false, false, false)); } - return this.m_parentSectionGroupOrNull; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "clientUrl", { get: function () { - _throwIfNotLoaded("clientUrl", this.m_clientUrl, "Section", this._isNull); - return this.m_clientUrl; + _throwIfNotLoaded("clientUrl", this._C, _typeSection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Section", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeSection, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "Section", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeSection, this._isNull); + return this._N; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Section.prototype, "webUrl", { + get: function () { + _throwIfNotLoaded("webUrl", this._W, _typeSection, this._isNull); + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Section", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeSection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Section.prototype.addPage=function (title) { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "AddPage", 0, [title], false, true, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "AddPage", 0, [title], false, true, null, false)); }; Section.prototype.copyToNotebook=function (destinationNotebook) { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "CopyToNotebook", 0, [destinationNotebook], false, true, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "CopyToNotebook", 0, [destinationNotebook], false, true, null, false)); }; Section.prototype.copyToSectionGroup=function (destinationSectionGroup) { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "CopyToSectionGroup", 0, [destinationSectionGroup], false, true, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "CopyToSectionGroup", 0, [destinationSectionGroup], false, true, null, false)); }; Section.prototype.getRestApiId=function () { - var action=_createMethodAction(this.context, this, "GetRestApiId", 1, []); + var action=_createMethodAction(this.context, this, "GetRestApiId", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Section.prototype.insertSectionAsSibling=function (location, title) { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "InsertSectionAsSibling", 0, [location, title], false, true, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "InsertSectionAsSibling", 0, [location, title], false, true, null, false)); + }; + Section.prototype._GetGeoInfo=function () { + var action=_createMethodAction(this.context, this, "_GetGeoInfo", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Section.prototype._GetGeoInfoAsync=function () { + var action=_createMethodAction(this.context, this, "_GetGeoInfoAsync", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; }; Section.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Section.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13747,16 +15457,19 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["ClientUrl"])) { - this.m_clientUrl=obj["ClientUrl"]; + this._C=obj["ClientUrl"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; + } + if (!_isUndefined(obj["WebUrl"])) { + this._W=obj["WebUrl"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["notebook", "Notebook", "pages", "Pages", "parentSectionGroup", "ParentSectionGroup", "parentSectionGroupOrNull", "ParentSectionGroupOrNull"]); }; @@ -13770,10 +15483,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; Section.prototype.track=function () { @@ -13786,14 +15499,16 @@ var OneNote; }; Section.prototype.toJSON=function () { return { - "clientUrl": this.m_clientUrl, - "id": this.m_id, - "name": this.m_name + "clientUrl": this._C, + "id": this._I, + "name": this._N, + "webUrl": this._W }; }; return Section; }(OfficeExtension.ClientObject)); OneNote.Section=Section; + var _typeSectionCollection="SectionCollection"; var SectionCollection=(function (_super) { __extends(SectionCollection, _super); function SectionCollection() { @@ -13808,7 +15523,7 @@ var OneNote; }); Object.defineProperty(SectionCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "SectionCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeSectionCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -13816,31 +15531,31 @@ var OneNote; }); Object.defineProperty(SectionCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "SectionCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeSectionCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(SectionCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "SectionCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeSectionCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); SectionCollection.prototype.getByName=function (name) { - return new OneNote.SectionCollection(this.context, _createMethodObjectPath(this.context, this, "GetByName", 1, [name], true, false, null)); + return new OneNote.SectionCollection(this.context, _createMethodObjectPath(this.context, this, "GetByName", 1, [name], true, false, null, false)); }; SectionCollection.prototype.getItem=function (index) { return new OneNote.Section(this.context, _createIndexerObjectPath(this.context, this, [index])); }; SectionCollection.prototype.getItemAt=function (index) { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; SectionCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; SectionCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13849,10 +15564,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -13874,7 +15589,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; SectionCollection.prototype.track=function () { @@ -13887,12 +15602,13 @@ var OneNote; }; SectionCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return SectionCollection; }(OfficeExtension.ClientObject)); OneNote.SectionCollection=SectionCollection; + var _typePage="Page"; var Page=(function (_super) { __extends(Page, _super); function Page() { @@ -13907,65 +15623,65 @@ var OneNote; }); Object.defineProperty(Page.prototype, "contents", { get: function () { - if (!this.m_contents) { - this.m_contents=new OneNote.PageContentCollection(this.context, _createPropertyObjectPath(this.context, this, "Contents", true, false)); + if (!this._Co) { + this._Co=new OneNote.PageContentCollection(this.context, _createPropertyObjectPath(this.context, this, "Contents", true, false, false)); } - return this.m_contents; + return this._Co; }, enumerable: true, configurable: true }); Object.defineProperty(Page.prototype, "inkAnalysisOrNull", { get: function () { - if (!this.m_inkAnalysisOrNull) { - this.m_inkAnalysisOrNull=new OneNote.InkAnalysis(this.context, _createPropertyObjectPath(this.context, this, "InkAnalysisOrNull", false, false)); + if (!this._In) { + this._In=new OneNote.InkAnalysis(this.context, _createPropertyObjectPath(this.context, this, "InkAnalysisOrNull", false, false, false)); } - return this.m_inkAnalysisOrNull; + return this._In; }, enumerable: true, configurable: true }); Object.defineProperty(Page.prototype, "parentSection", { get: function () { - if (!this.m_parentSection) { - this.m_parentSection=new OneNote.Section(this.context, _createPropertyObjectPath(this.context, this, "ParentSection", false, false)); + if (!this._Pa) { + this._Pa=new OneNote.Section(this.context, _createPropertyObjectPath(this.context, this, "ParentSection", false, false, false)); } - return this.m_parentSection; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Page.prototype, "classNotebookPageSource", { get: function () { - _throwIfNotLoaded("classNotebookPageSource", this.m_classNotebookPageSource, "Page", this._isNull); - return this.m_classNotebookPageSource; + _throwIfNotLoaded("classNotebookPageSource", this._C, _typePage, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Page.prototype, "clientUrl", { get: function () { - _throwIfNotLoaded("clientUrl", this.m_clientUrl, "Page", this._isNull); - return this.m_clientUrl; + _throwIfNotLoaded("clientUrl", this._Cl, _typePage, this._isNull); + return this._Cl; }, enumerable: true, configurable: true }); Object.defineProperty(Page.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Page", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typePage, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Page.prototype, "pageLevel", { get: function () { - _throwIfNotLoaded("pageLevel", this.m_pageLevel, "Page", this._isNull); - return this.m_pageLevel; + _throwIfNotLoaded("pageLevel", this._P, _typePage, this._isNull); + return this._P; }, set: function (value) { - this.m_pageLevel=value; + this._P=value; _createSetPropertyAction(this.context, this, "PageLevel", value); }, enumerable: true, @@ -13973,11 +15689,11 @@ var OneNote; }); Object.defineProperty(Page.prototype, "title", { get: function () { - _throwIfNotLoaded("title", this.m_title, "Page", this._isNull); - return this.m_title; + _throwIfNotLoaded("title", this._T, _typePage, this._isNull); + return this._T; }, set: function (value) { - this.m_title=value; + this._T=value; _createSetPropertyAction(this.context, this, "Title", value); }, enumerable: true, @@ -13985,16 +15701,16 @@ var OneNote; }); Object.defineProperty(Page.prototype, "webUrl", { get: function () { - _throwIfNotLoaded("webUrl", this.m_webUrl, "Page", this._isNull); - return this.m_webUrl; + _throwIfNotLoaded("webUrl", this._W, _typePage, this._isNull); + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(Page.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Page", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typePage, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -14010,28 +15726,34 @@ var OneNote; ]); }; Page.prototype.addOutline=function (left, top, html) { - return new OneNote.Outline(this.context, _createMethodObjectPath(this.context, this, "AddOutline", 0, [left, top, html], false, true, null)); + return new OneNote.Outline(this.context, _createMethodObjectPath(this.context, this, "AddOutline", 0, [left, top, html], false, true, null, false)); }; Page.prototype.copyToSection=function (destinationSection) { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "CopyToSection", 0, [destinationSection], false, true, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "CopyToSection", 0, [destinationSection], false, true, null, false)); }; Page.prototype.copyToSectionAndSetClassNotebookPageSource=function (destinationSection) { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "CopyToSectionAndSetClassNotebookPageSource", 0, [destinationSection], false, true, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "CopyToSectionAndSetClassNotebookPageSource", 0, [destinationSection], false, true, null, false)); }; Page.prototype.getRestApiId=function () { - var action=_createMethodAction(this.context, this, "GetRestApiId", 1, []); + var action=_createMethodAction(this.context, this, "GetRestApiId", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Page.prototype.hasTitleContent=function () { + var action=_createMethodAction(this.context, this, "HasTitleContent", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Page.prototype.insertPageAsSibling=function (location, title) { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "InsertPageAsSibling", 0, [location, title], false, true, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "InsertPageAsSibling", 0, [location, title], false, true, null, false)); }; Page.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Page.prototype._Sync=function () { - _createMethodAction(this.context, this, "_Sync", 0, []); + _createMethodAction(this.context, this, "_Sync", 0, [], false); }; Page.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14040,25 +15762,25 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["ClassNotebookPageSource"])) { - this.m_classNotebookPageSource=obj["ClassNotebookPageSource"]; + this._C=obj["ClassNotebookPageSource"]; } if (!_isUndefined(obj["ClientUrl"])) { - this.m_clientUrl=obj["ClientUrl"]; + this._Cl=obj["ClientUrl"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["PageLevel"])) { - this.m_pageLevel=obj["PageLevel"]; + this._P=obj["PageLevel"]; } if (!_isUndefined(obj["Title"])) { - this.m_title=obj["Title"]; + this._T=obj["Title"]; } if (!_isUndefined(obj["WebUrl"])) { - this.m_webUrl=obj["WebUrl"]; + this._W=obj["WebUrl"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["contents", "Contents", "inkAnalysisOrNull", "InkAnalysisOrNull", "parentSection", "ParentSection"]); }; @@ -14072,10 +15794,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; Page.prototype.track=function () { @@ -14088,17 +15810,18 @@ var OneNote; }; Page.prototype.toJSON=function () { return { - "classNotebookPageSource": this.m_classNotebookPageSource, - "clientUrl": this.m_clientUrl, - "id": this.m_id, - "pageLevel": this.m_pageLevel, - "title": this.m_title, - "webUrl": this.m_webUrl + "classNotebookPageSource": this._C, + "clientUrl": this._Cl, + "id": this._I, + "pageLevel": this._P, + "title": this._T, + "webUrl": this._W }; }; return Page; }(OfficeExtension.ClientObject)); OneNote.Page=Page; + var _typePageCollection="PageCollection"; var PageCollection=(function (_super) { __extends(PageCollection, _super); function PageCollection() { @@ -14113,7 +15836,7 @@ var OneNote; }); Object.defineProperty(PageCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "PageCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typePageCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14121,31 +15844,31 @@ var OneNote; }); Object.defineProperty(PageCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "PageCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typePageCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(PageCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "PageCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typePageCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); PageCollection.prototype.getByTitle=function (title) { - return new OneNote.PageCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTitle", 1, [title], true, false, null)); + return new OneNote.PageCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTitle", 1, [title], true, false, null, false)); }; PageCollection.prototype.getItem=function (index) { return new OneNote.Page(this.context, _createIndexerObjectPath(this.context, this, [index])); }; PageCollection.prototype.getItemAt=function (index) { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; PageCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; PageCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14154,10 +15877,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14179,7 +15902,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; PageCollection.prototype.track=function () { @@ -14192,12 +15915,13 @@ var OneNote; }; PageCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return PageCollection; }(OfficeExtension.ClientObject)); OneNote.PageCollection=PageCollection; + var _typePageContent="PageContent"; var PageContent=(function (_super) { __extends(PageContent, _super); function PageContent() { @@ -14212,59 +15936,59 @@ var OneNote; }); Object.defineProperty(PageContent.prototype, "image", { get: function () { - if (!this.m_image) { - this.m_image=new OneNote.Image(this.context, _createPropertyObjectPath(this.context, this, "Image", false, false)); + if (!this._Im) { + this._Im=new OneNote.Image(this.context, _createPropertyObjectPath(this.context, this, "Image", false, false, false)); } - return this.m_image; + return this._Im; }, enumerable: true, configurable: true }); Object.defineProperty(PageContent.prototype, "ink", { get: function () { - if (!this.m_ink) { - this.m_ink=new OneNote.FloatingInk(this.context, _createPropertyObjectPath(this.context, this, "Ink", false, false)); + if (!this._In) { + this._In=new OneNote.FloatingInk(this.context, _createPropertyObjectPath(this.context, this, "Ink", false, false, false)); } - return this.m_ink; + return this._In; }, enumerable: true, configurable: true }); Object.defineProperty(PageContent.prototype, "outline", { get: function () { - if (!this.m_outline) { - this.m_outline=new OneNote.Outline(this.context, _createPropertyObjectPath(this.context, this, "Outline", false, false)); + if (!this._O) { + this._O=new OneNote.Outline(this.context, _createPropertyObjectPath(this.context, this, "Outline", false, false, false)); } - return this.m_outline; + return this._O; }, enumerable: true, configurable: true }); Object.defineProperty(PageContent.prototype, "parentPage", { get: function () { - if (!this.m_parentPage) { - this.m_parentPage=new OneNote.Page(this.context, _createPropertyObjectPath(this.context, this, "ParentPage", false, false)); + if (!this._P) { + this._P=new OneNote.Page(this.context, _createPropertyObjectPath(this.context, this, "ParentPage", false, false, false)); } - return this.m_parentPage; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(PageContent.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "PageContent", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typePageContent, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(PageContent.prototype, "left", { get: function () { - _throwIfNotLoaded("left", this.m_left, "PageContent", this._isNull); - return this.m_left; + _throwIfNotLoaded("left", this._L, _typePageContent, this._isNull); + return this._L; }, set: function (value) { - this.m_left=value; + this._L=value; _createSetPropertyAction(this.context, this, "Left", value); }, enumerable: true, @@ -14272,11 +15996,11 @@ var OneNote; }); Object.defineProperty(PageContent.prototype, "top", { get: function () { - _throwIfNotLoaded("top", this.m_top, "PageContent", this._isNull); - return this.m_top; + _throwIfNotLoaded("top", this._T, _typePageContent, this._isNull); + return this._T; }, set: function (value) { - this.m_top=value; + this._T=value; _createSetPropertyAction(this.context, this, "Top", value); }, enumerable: true, @@ -14284,16 +16008,16 @@ var OneNote; }); Object.defineProperty(PageContent.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "PageContent", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._Ty, _typePageContent, this._isNull); + return this._Ty; }, enumerable: true, configurable: true }); Object.defineProperty(PageContent.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "PageContent", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typePageContent, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -14311,10 +16035,10 @@ var OneNote; ]); }; PageContent.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; PageContent.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; PageContent.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14323,19 +16047,19 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Left"])) { - this.m_left=obj["Left"]; + this._L=obj["Left"]; } if (!_isUndefined(obj["Top"])) { - this.m_top=obj["Top"]; + this._T=obj["Top"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._Ty=obj["Type"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["image", "Image", "ink", "Ink", "outline", "Outline", "parentPage", "ParentPage"]); }; @@ -14349,10 +16073,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; PageContent.prototype.track=function () { @@ -14365,15 +16089,16 @@ var OneNote; }; PageContent.prototype.toJSON=function () { return { - "id": this.m_id, - "left": this.m_left, - "top": this.m_top, - "type": this.m_type + "id": this._I, + "left": this._L, + "top": this._T, + "type": this._Ty }; }; return PageContent; }(OfficeExtension.ClientObject)); OneNote.PageContent=PageContent; + var _typePageContentCollection="PageContentCollection"; var PageContentCollection=(function (_super) { __extends(PageContentCollection, _super); function PageContentCollection() { @@ -14388,7 +16113,7 @@ var OneNote; }); Object.defineProperty(PageContentCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "PageContentCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typePageContentCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14396,16 +16121,16 @@ var OneNote; }); Object.defineProperty(PageContentCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "PageContentCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typePageContentCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(PageContentCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "PageContentCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typePageContentCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -14414,10 +16139,10 @@ var OneNote; return new OneNote.PageContent(this.context, _createIndexerObjectPath(this.context, this, [index])); }; PageContentCollection.prototype.getItemAt=function (index) { - return new OneNote.PageContent(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.PageContent(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; PageContentCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; PageContentCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14426,10 +16151,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14451,7 +16176,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; PageContentCollection.prototype.track=function () { @@ -14464,12 +16189,13 @@ var OneNote; }; PageContentCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return PageContentCollection; }(OfficeExtension.ClientObject)); OneNote.PageContentCollection=PageContentCollection; + var _typeOutline="Outline"; var Outline=(function (_super) { __extends(Outline, _super); function Outline() { @@ -14484,54 +16210,60 @@ var OneNote; }); Object.defineProperty(Outline.prototype, "pageContent", { get: function () { - if (!this.m_pageContent) { - this.m_pageContent=new OneNote.PageContent(this.context, _createPropertyObjectPath(this.context, this, "PageContent", false, false)); + if (!this._P) { + this._P=new OneNote.PageContent(this.context, _createPropertyObjectPath(this.context, this, "PageContent", false, false, false)); } - return this.m_pageContent; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Outline.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new OneNote.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._Pa) { + this._Pa=new OneNote.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Outline.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Outline", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeOutline, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Outline.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Outline", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeOutline, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Outline.prototype.appendHtml=function (html) { - _createMethodAction(this.context, this, "AppendHtml", 0, [html]); + _createMethodAction(this.context, this, "AppendHtml", 0, [html], false); }; Outline.prototype.appendImage=function (base64EncodedImage, width, height) { - return new OneNote.Image(this.context, _createMethodObjectPath(this.context, this, "AppendImage", 0, [base64EncodedImage, width, height], false, true, null)); + return new OneNote.Image(this.context, _createMethodObjectPath(this.context, this, "AppendImage", 0, [base64EncodedImage, width, height], false, true, null, false)); }; Outline.prototype.appendRichText=function (paragraphText) { - return new OneNote.RichText(this.context, _createMethodObjectPath(this.context, this, "AppendRichText", 0, [paragraphText], false, true, null)); + return new OneNote.RichText(this.context, _createMethodObjectPath(this.context, this, "AppendRichText", 0, [paragraphText], false, true, null, false)); }; Outline.prototype.appendTable=function (rowCount, columnCount, values) { - return new OneNote.Table(this.context, _createMethodObjectPath(this.context, this, "AppendTable", 0, [rowCount, columnCount, values], false, true, null)); + return new OneNote.Table(this.context, _createMethodObjectPath(this.context, this, "AppendTable", 0, [rowCount, columnCount, values], false, true, null, false)); + }; + Outline.prototype.isTitle=function () { + var action=_createMethodAction(this.context, this, "IsTitle", 0, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; }; Outline.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Outline.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14540,10 +16272,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["pageContent", "PageContent", "paragraphs", "Paragraphs"]); }; @@ -14557,10 +16289,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; Outline.prototype.track=function () { @@ -14573,12 +16305,13 @@ var OneNote; }; Outline.prototype.toJSON=function () { return { - "id": this.m_id + "id": this._I }; }; return Outline; }(OfficeExtension.ClientObject)); OneNote.Outline=Outline; + var _typeParagraph="Paragraph"; var Paragraph=(function (_super) { __extends(Paragraph, _super); function Paragraph() { @@ -14593,145 +16326,154 @@ var OneNote; }); Object.defineProperty(Paragraph.prototype, "image", { get: function () { - if (!this.m_image) { - this.m_image=new OneNote.Image(this.context, _createPropertyObjectPath(this.context, this, "Image", false, false)); + if (!this._Im) { + this._Im=new OneNote.Image(this.context, _createPropertyObjectPath(this.context, this, "Image", false, false, false)); } - return this.m_image; + return this._Im; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "inkWords", { get: function () { - if (!this.m_inkWords) { - this.m_inkWords=new OneNote.InkWordCollection(this.context, _createPropertyObjectPath(this.context, this, "InkWords", true, false)); + if (!this._In) { + this._In=new OneNote.InkWordCollection(this.context, _createPropertyObjectPath(this.context, this, "InkWords", true, false, false)); } - return this.m_inkWords; + return this._In; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "outline", { get: function () { - if (!this.m_outline) { - this.m_outline=new OneNote.Outline(this.context, _createPropertyObjectPath(this.context, this, "Outline", false, false)); + if (!this._O) { + this._O=new OneNote.Outline(this.context, _createPropertyObjectPath(this.context, this, "Outline", false, false, false)); } - return this.m_outline; + return this._O; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new OneNote.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._P) { + this._P=new OneNote.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentParagraph", { get: function () { - if (!this.m_parentParagraph) { - this.m_parentParagraph=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "ParentParagraph", false, false)); + if (!this._Pa) { + this._Pa=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "ParentParagraph", false, false, false)); } - return this.m_parentParagraph; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentParagraphOrNull", { get: function () { - if (!this.m_parentParagraphOrNull) { - this.m_parentParagraphOrNull=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "ParentParagraphOrNull", false, false)); + if (!this._Par) { + this._Par=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "ParentParagraphOrNull", false, false, false)); } - return this.m_parentParagraphOrNull; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentTableCell", { get: function () { - if (!this.m_parentTableCell) { - this.m_parentTableCell=new OneNote.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false)); + if (!this._Pare) { + this._Pare=new OneNote.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false, false)); } - return this.m_parentTableCell; + return this._Pare; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentTableCellOrNull", { get: function () { - if (!this.m_parentTableCellOrNull) { - this.m_parentTableCellOrNull=new OneNote.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNull", false, false)); + if (!this._Paren) { + this._Paren=new OneNote.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNull", false, false, false)); } - return this.m_parentTableCellOrNull; + return this._Paren; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "richText", { get: function () { - if (!this.m_richText) { - this.m_richText=new OneNote.RichText(this.context, _createPropertyObjectPath(this.context, this, "RichText", false, false)); + if (!this._R) { + this._R=new OneNote.RichText(this.context, _createPropertyObjectPath(this.context, this, "RichText", false, false, false)); } - return this.m_richText; + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "table", { get: function () { - if (!this.m_table) { - this.m_table=new OneNote.Table(this.context, _createPropertyObjectPath(this.context, this, "Table", false, false)); + if (!this._T) { + this._T=new OneNote.Table(this.context, _createPropertyObjectPath(this.context, this, "Table", false, false, false)); } - return this.m_table; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Paragraph", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeParagraph, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "Paragraph", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._Ty, _typeParagraph, this._isNull); + return this._Ty; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Paragraph", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeParagraph, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); + Paragraph.prototype.addNoteTag=function (type, status) { + return new OneNote.NoteTag(this.context, _createMethodObjectPath(this.context, this, "AddNoteTag", 0, [type, status], false, true, null, false)); + }; Paragraph.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); + }; + Paragraph.prototype.getParagraphInfo=function () { + var action=_createMethodAction(this.context, this, "GetParagraphInfo", 0, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; }; Paragraph.prototype.insertHtmlAsSibling=function (insertLocation, html) { - _createMethodAction(this.context, this, "InsertHtmlAsSibling", 0, [insertLocation, html]); + _createMethodAction(this.context, this, "InsertHtmlAsSibling", 0, [insertLocation, html], false); }; Paragraph.prototype.insertImageAsSibling=function (insertLocation, base64EncodedImage, width, height) { - return new OneNote.Image(this.context, _createMethodObjectPath(this.context, this, "InsertImageAsSibling", 0, [insertLocation, base64EncodedImage, width, height], false, true, null)); + return new OneNote.Image(this.context, _createMethodObjectPath(this.context, this, "InsertImageAsSibling", 0, [insertLocation, base64EncodedImage, width, height], false, true, null, false)); }; Paragraph.prototype.insertRichTextAsSibling=function (insertLocation, paragraphText) { - return new OneNote.RichText(this.context, _createMethodObjectPath(this.context, this, "InsertRichTextAsSibling", 0, [insertLocation, paragraphText], false, true, null)); + return new OneNote.RichText(this.context, _createMethodObjectPath(this.context, this, "InsertRichTextAsSibling", 0, [insertLocation, paragraphText], false, true, null, false)); }; Paragraph.prototype.insertTableAsSibling=function (insertLocation, rowCount, columnCount, values) { - return new OneNote.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTableAsSibling", 0, [insertLocation, rowCount, columnCount, values], false, true, null)); + return new OneNote.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTableAsSibling", 0, [insertLocation, rowCount, columnCount, values], false, true, null, false)); }; Paragraph.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Paragraph.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14740,13 +16482,13 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._Ty=obj["Type"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["image", "Image", "inkWords", "InkWords", "outline", "Outline", "paragraphs", "Paragraphs", "parentParagraph", "ParentParagraph", "parentParagraphOrNull", "ParentParagraphOrNull", "parentTableCell", "ParentTableCell", "parentTableCellOrNull", "ParentTableCellOrNull", "richText", "RichText", "table", "Table"]); }; @@ -14760,10 +16502,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; Paragraph.prototype.track=function () { @@ -14776,13 +16518,14 @@ var OneNote; }; Paragraph.prototype.toJSON=function () { return { - "id": this.m_id, - "type": this.m_type + "id": this._I, + "type": this._Ty }; }; return Paragraph; }(OfficeExtension.ClientObject)); OneNote.Paragraph=Paragraph; + var _typeParagraphCollection="ParagraphCollection"; var ParagraphCollection=(function (_super) { __extends(ParagraphCollection, _super); function ParagraphCollection() { @@ -14797,7 +16540,7 @@ var OneNote; }); Object.defineProperty(ParagraphCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ParagraphCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeParagraphCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14805,16 +16548,16 @@ var OneNote; }); Object.defineProperty(ParagraphCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "ParagraphCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeParagraphCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(ParagraphCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "ParagraphCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeParagraphCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -14823,10 +16566,10 @@ var OneNote; return new OneNote.Paragraph(this.context, _createIndexerObjectPath(this.context, this, [index])); }; ParagraphCollection.prototype.getItemAt=function (index) { - return new OneNote.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; ParagraphCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; ParagraphCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14835,10 +16578,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14860,7 +16603,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; ParagraphCollection.prototype.track=function () { @@ -14873,12 +16616,100 @@ var OneNote; }; ParagraphCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return ParagraphCollection; }(OfficeExtension.ClientObject)); OneNote.ParagraphCollection=ParagraphCollection; + var _typeNoteTag="NoteTag"; + var NoteTag=(function (_super) { + __extends(NoteTag, _super); + function NoteTag() { + _super.apply(this, arguments); + } + Object.defineProperty(NoteTag.prototype, "_className", { + get: function () { + return "NoteTag"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NoteTag.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeNoteTag, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NoteTag.prototype, "status", { + get: function () { + _throwIfNotLoaded("status", this._S, _typeNoteTag, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NoteTag.prototype, "type", { + get: function () { + _throwIfNotLoaded("type", this._T, _typeNoteTag, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + NoteTag.prototype._KeepReference=function () { + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); + }; + NoteTag.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I=obj["Id"]; + } + if (!_isUndefined(obj["Status"])) { + this._S=obj["Status"]; + } + if (!_isUndefined(obj["Type"])) { + this._T=obj["Type"]; + } + }; + NoteTag.prototype.load=function (option) { + _load(this, option); + return this; + }; + NoteTag.prototype._handleIdResult=function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I=value["Id"]; + } + }; + NoteTag.prototype.track=function () { + this.context.trackedObjects.add(this); + return this; + }; + NoteTag.prototype.untrack=function () { + this.context.trackedObjects.remove(this); + return this; + }; + NoteTag.prototype.toJSON=function () { + return { + "id": this._I, + "status": this._S, + "type": this._T + }; + }; + return NoteTag; + }(OfficeExtension.ClientObject)); + OneNote.NoteTag=NoteTag; + var _typeRichText="RichText"; var RichText=(function (_super) { __extends(RichText, _super); function RichText() { @@ -14893,54 +16724,54 @@ var OneNote; }); Object.defineProperty(RichText.prototype, "paragraph", { get: function () { - if (!this.m_paragraph) { - this.m_paragraph=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false)); + if (!this._P) { + this._P=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false, false)); } - return this.m_paragraph; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(RichText.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "RichText", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeRichText, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(RichText.prototype, "languageId", { get: function () { - _throwIfNotLoaded("languageId", this.m_languageId, "RichText", this._isNull); - return this.m_languageId; + _throwIfNotLoaded("languageId", this._L, _typeRichText, this._isNull); + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(RichText.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "RichText", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._T, _typeRichText, this._isNull); + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(RichText.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "RichText", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeRichText, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); RichText.prototype.getHtml=function () { - var action=_createMethodAction(this.context, this, "GetHtml", 1, []); + var action=_createMethodAction(this.context, this, "GetHtml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; RichText.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; RichText.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14949,16 +16780,16 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["LanguageId"])) { - this.m_languageId=obj["LanguageId"]; + this._L=obj["LanguageId"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._T=obj["Text"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["paragraph", "Paragraph"]); }; @@ -14972,10 +16803,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; RichText.prototype.track=function () { @@ -14988,14 +16819,15 @@ var OneNote; }; RichText.prototype.toJSON=function () { return { - "id": this.m_id, - "languageId": this.m_languageId, - "text": this.m_text + "id": this._I, + "languageId": this._L, + "text": this._T }; }; return RichText; }(OfficeExtension.ClientObject)); OneNote.RichText=RichText; + var _typeImage="Image"; var Image=(function (_super) { __extends(Image, _super); function Image() { @@ -15010,31 +16842,31 @@ var OneNote; }); Object.defineProperty(Image.prototype, "pageContent", { get: function () { - if (!this.m_pageContent) { - this.m_pageContent=new OneNote.PageContent(this.context, _createPropertyObjectPath(this.context, this, "PageContent", false, false)); + if (!this._P) { + this._P=new OneNote.PageContent(this.context, _createPropertyObjectPath(this.context, this, "PageContent", false, false, false)); } - return this.m_pageContent; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Image.prototype, "paragraph", { get: function () { - if (!this.m_paragraph) { - this.m_paragraph=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false)); + if (!this._Pa) { + this._Pa=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false, false)); } - return this.m_paragraph; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Image.prototype, "description", { get: function () { - _throwIfNotLoaded("description", this.m_description, "Image", this._isNull); - return this.m_description; + _throwIfNotLoaded("description", this._D, _typeImage, this._isNull); + return this._D; }, set: function (value) { - this.m_description=value; + this._D=value; _createSetPropertyAction(this.context, this, "Description", value); }, enumerable: true, @@ -15042,11 +16874,11 @@ var OneNote; }); Object.defineProperty(Image.prototype, "height", { get: function () { - _throwIfNotLoaded("height", this.m_height, "Image", this._isNull); - return this.m_height; + _throwIfNotLoaded("height", this._H, _typeImage, this._isNull); + return this._H; }, set: function (value) { - this.m_height=value; + this._H=value; _createSetPropertyAction(this.context, this, "Height", value); }, enumerable: true, @@ -15054,11 +16886,11 @@ var OneNote; }); Object.defineProperty(Image.prototype, "hyperlink", { get: function () { - _throwIfNotLoaded("hyperlink", this.m_hyperlink, "Image", this._isNull); - return this.m_hyperlink; + _throwIfNotLoaded("hyperlink", this._Hy, _typeImage, this._isNull); + return this._Hy; }, set: function (value) { - this.m_hyperlink=value; + this._Hy=value; _createSetPropertyAction(this.context, this, "Hyperlink", value); }, enumerable: true, @@ -15066,27 +16898,27 @@ var OneNote; }); Object.defineProperty(Image.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Image", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeImage, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Image.prototype, "ocrData", { get: function () { - _throwIfNotLoaded("ocrData", this.m_ocrData, "Image", this._isNull); - return this.m_ocrData; + _throwIfNotLoaded("ocrData", this._O, _typeImage, this._isNull); + return this._O; }, enumerable: true, configurable: true }); Object.defineProperty(Image.prototype, "width", { get: function () { - _throwIfNotLoaded("width", this.m_width, "Image", this._isNull); - return this.m_width; + _throwIfNotLoaded("width", this._W, _typeImage, this._isNull); + return this._W; }, set: function (value) { - this.m_width=value; + this._W=value; _createSetPropertyAction(this.context, this, "Width", value); }, enumerable: true, @@ -15094,8 +16926,8 @@ var OneNote; }); Object.defineProperty(Image.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Image", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeImage, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -15109,13 +16941,13 @@ var OneNote; ]); }; Image.prototype.getBase64Image=function () { - var action=_createMethodAction(this.context, this, "GetBase64Image", 1, []); + var action=_createMethodAction(this.context, this, "GetBase64Image", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Image.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Image.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15124,25 +16956,25 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Description"])) { - this.m_description=obj["Description"]; + this._D=obj["Description"]; } if (!_isUndefined(obj["Height"])) { - this.m_height=obj["Height"]; + this._H=obj["Height"]; } if (!_isUndefined(obj["Hyperlink"])) { - this.m_hyperlink=obj["Hyperlink"]; + this._Hy=obj["Hyperlink"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["OcrData"])) { - this.m_ocrData=obj["OcrData"]; + this._O=obj["OcrData"]; } if (!_isUndefined(obj["Width"])) { - this.m_width=obj["Width"]; + this._W=obj["Width"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["pageContent", "PageContent", "paragraph", "Paragraph"]); }; @@ -15156,10 +16988,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; Image.prototype.track=function () { @@ -15172,17 +17004,18 @@ var OneNote; }; Image.prototype.toJSON=function () { return { - "description": this.m_description, - "height": this.m_height, - "hyperlink": this.m_hyperlink, - "id": this.m_id, - "ocrData": this.m_ocrData, - "width": this.m_width + "description": this._D, + "height": this._H, + "hyperlink": this._Hy, + "id": this._I, + "ocrData": this._O, + "width": this._W }; }; return Image; }(OfficeExtension.ClientObject)); OneNote.Image=Image; + var _typeTable="Table"; var Table=(function (_super) { __extends(Table, _super); function Table() { @@ -15197,31 +17030,31 @@ var OneNote; }); Object.defineProperty(Table.prototype, "paragraph", { get: function () { - if (!this.m_paragraph) { - this.m_paragraph=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false)); + if (!this._P) { + this._P=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false, false)); } - return this.m_paragraph; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "rows", { get: function () { - if (!this.m_rows) { - this.m_rows=new OneNote.TableRowCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false)); + if (!this._Ro) { + this._Ro=new OneNote.TableRowCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false, false)); } - return this.m_rows; + return this._Ro; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "borderVisible", { get: function () { - _throwIfNotLoaded("borderVisible", this.m_borderVisible, "Table", this._isNull); - return this.m_borderVisible; + _throwIfNotLoaded("borderVisible", this._B, _typeTable, this._isNull); + return this._B; }, set: function (value) { - this.m_borderVisible=value; + this._B=value; _createSetPropertyAction(this.context, this, "BorderVisible", value); }, enumerable: true, @@ -15229,32 +17062,32 @@ var OneNote; }); Object.defineProperty(Table.prototype, "columnCount", { get: function () { - _throwIfNotLoaded("columnCount", this.m_columnCount, "Table", this._isNull); - return this.m_columnCount; + _throwIfNotLoaded("columnCount", this._C, _typeTable, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Table", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeTable, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "rowCount", { get: function () { - _throwIfNotLoaded("rowCount", this.m_rowCount, "Table", this._isNull); - return this.m_rowCount; + _throwIfNotLoaded("rowCount", this._R, _typeTable, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Table", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTable, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -15268,28 +17101,28 @@ var OneNote; ]); }; Table.prototype.appendColumn=function (values) { - _createMethodAction(this.context, this, "AppendColumn", 0, [values]); + _createMethodAction(this.context, this, "AppendColumn", 0, [values], false); }; Table.prototype.appendRow=function (values) { - return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "AppendRow", 0, [values], false, true, null)); + return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "AppendRow", 0, [values], false, true, null, false)); }; Table.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; Table.prototype.getCell=function (rowIndex, cellIndex) { - return new OneNote.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [rowIndex, cellIndex], false, false, null)); + return new OneNote.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [rowIndex, cellIndex], false, false, null, false)); }; Table.prototype.insertColumn=function (index, values) { - _createMethodAction(this.context, this, "InsertColumn", 0, [index, values]); + _createMethodAction(this.context, this, "InsertColumn", 0, [index, values], false); }; Table.prototype.insertRow=function (index, values) { - return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "InsertRow", 0, [index, values], false, true, null)); + return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "InsertRow", 0, [index, values], false, true, null, false)); }; Table.prototype.setShadingColor=function (colorCode) { - _createMethodAction(this.context, this, "SetShadingColor", 0, [colorCode]); + _createMethodAction(this.context, this, "SetShadingColor", 0, [colorCode], false); }; Table.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Table.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15298,19 +17131,19 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["BorderVisible"])) { - this.m_borderVisible=obj["BorderVisible"]; + this._B=obj["BorderVisible"]; } if (!_isUndefined(obj["ColumnCount"])) { - this.m_columnCount=obj["ColumnCount"]; + this._C=obj["ColumnCount"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["RowCount"])) { - this.m_rowCount=obj["RowCount"]; + this._R=obj["RowCount"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["paragraph", "Paragraph", "rows", "Rows"]); }; @@ -15324,10 +17157,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; Table.prototype.track=function () { @@ -15340,15 +17173,16 @@ var OneNote; }; Table.prototype.toJSON=function () { return { - "borderVisible": this.m_borderVisible, - "columnCount": this.m_columnCount, - "id": this.m_id, - "rowCount": this.m_rowCount + "borderVisible": this._B, + "columnCount": this._C, + "id": this._I, + "rowCount": this._R }; }; return Table; }(OfficeExtension.ClientObject)); OneNote.Table=Table; + var _typeTableRow="TableRow"; var TableRow=(function (_super) { __extends(TableRow, _super); function TableRow() { @@ -15363,67 +17197,67 @@ var OneNote; }); Object.defineProperty(TableRow.prototype, "cells", { get: function () { - if (!this.m_cells) { - this.m_cells=new OneNote.TableCellCollection(this.context, _createPropertyObjectPath(this.context, this, "Cells", true, false)); + if (!this._Ce) { + this._Ce=new OneNote.TableCellCollection(this.context, _createPropertyObjectPath(this.context, this, "Cells", true, false, false)); } - return this.m_cells; + return this._Ce; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new OneNote.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + if (!this._P) { + this._P=new OneNote.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "cellCount", { get: function () { - _throwIfNotLoaded("cellCount", this.m_cellCount, "TableRow", this._isNull); - return this.m_cellCount; + _throwIfNotLoaded("cellCount", this._C, _typeTableRow, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "TableRow", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeTableRow, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "rowIndex", { get: function () { - _throwIfNotLoaded("rowIndex", this.m_rowIndex, "TableRow", this._isNull); - return this.m_rowIndex; + _throwIfNotLoaded("rowIndex", this._R, _typeTableRow, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableRow", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableRow, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); TableRow.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; TableRow.prototype.insertRowAsSibling=function (insertLocation, values) { - return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "InsertRowAsSibling", 0, [insertLocation, values], false, true, null)); + return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "InsertRowAsSibling", 0, [insertLocation, values], false, true, null, false)); }; TableRow.prototype.setShadingColor=function (colorCode) { - _createMethodAction(this.context, this, "SetShadingColor", 0, [colorCode]); + _createMethodAction(this.context, this, "SetShadingColor", 0, [colorCode], false); }; TableRow.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableRow.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15432,16 +17266,16 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["CellCount"])) { - this.m_cellCount=obj["CellCount"]; + this._C=obj["CellCount"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["RowIndex"])) { - this.m_rowIndex=obj["RowIndex"]; + this._R=obj["RowIndex"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["cells", "Cells", "parentTable", "ParentTable"]); }; @@ -15455,10 +17289,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; TableRow.prototype.track=function () { @@ -15471,14 +17305,15 @@ var OneNote; }; TableRow.prototype.toJSON=function () { return { - "cellCount": this.m_cellCount, - "id": this.m_id, - "rowIndex": this.m_rowIndex + "cellCount": this._C, + "id": this._I, + "rowIndex": this._R }; }; return TableRow; }(OfficeExtension.ClientObject)); OneNote.TableRow=TableRow; + var _typeTableRowCollection="TableRowCollection"; var TableRowCollection=(function (_super) { __extends(TableRowCollection, _super); function TableRowCollection() { @@ -15493,7 +17328,7 @@ var OneNote; }); Object.defineProperty(TableRowCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableRowCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableRowCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15501,16 +17336,16 @@ var OneNote; }); Object.defineProperty(TableRowCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "TableRowCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeTableRowCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(TableRowCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableRowCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableRowCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -15519,10 +17354,10 @@ var OneNote; return new OneNote.TableRow(this.context, _createIndexerObjectPath(this.context, this, [index])); }; TableRowCollection.prototype.getItemAt=function (index) { - return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; TableRowCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableRowCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15531,10 +17366,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15556,7 +17391,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; TableRowCollection.prototype.track=function () { @@ -15569,12 +17404,13 @@ var OneNote; }; TableRowCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return TableRowCollection; }(OfficeExtension.ClientObject)); OneNote.TableRowCollection=TableRowCollection; + var _typeTableCell="TableCell"; var TableCell=(function (_super) { __extends(TableCell, _super); function TableCell() { @@ -15589,55 +17425,55 @@ var OneNote; }); Object.defineProperty(TableCell.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new OneNote.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._P) { + this._P=new OneNote.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "parentRow", { get: function () { - if (!this.m_parentRow) { - this.m_parentRow=new OneNote.TableRow(this.context, _createPropertyObjectPath(this.context, this, "ParentRow", false, false)); + if (!this._Pa) { + this._Pa=new OneNote.TableRow(this.context, _createPropertyObjectPath(this.context, this, "ParentRow", false, false, false)); } - return this.m_parentRow; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "cellIndex", { get: function () { - _throwIfNotLoaded("cellIndex", this.m_cellIndex, "TableCell", this._isNull); - return this.m_cellIndex; + _throwIfNotLoaded("cellIndex", this._C, _typeTableCell, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "TableCell", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeTableCell, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "rowIndex", { get: function () { - _throwIfNotLoaded("rowIndex", this.m_rowIndex, "TableCell", this._isNull); - return this.m_rowIndex; + _throwIfNotLoaded("rowIndex", this._R, _typeTableCell, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "shadingColor", { get: function () { - _throwIfNotLoaded("shadingColor", this.m_shadingColor, "TableCell", this._isNull); - return this.m_shadingColor; + _throwIfNotLoaded("shadingColor", this._S, _typeTableCell, this._isNull); + return this._S; }, set: function (value) { - this.m_shadingColor=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShadingColor", value); }, enumerable: true, @@ -15645,8 +17481,8 @@ var OneNote; }); Object.defineProperty(TableCell.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableCell", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableCell, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -15660,22 +17496,22 @@ var OneNote; ]); }; TableCell.prototype.appendHtml=function (html) { - _createMethodAction(this.context, this, "AppendHtml", 0, [html]); + _createMethodAction(this.context, this, "AppendHtml", 0, [html], false); }; TableCell.prototype.appendImage=function (base64EncodedImage, width, height) { - return new OneNote.Image(this.context, _createMethodObjectPath(this.context, this, "AppendImage", 0, [base64EncodedImage, width, height], false, true, null)); + return new OneNote.Image(this.context, _createMethodObjectPath(this.context, this, "AppendImage", 0, [base64EncodedImage, width, height], false, true, null, false)); }; TableCell.prototype.appendRichText=function (paragraphText) { - return new OneNote.RichText(this.context, _createMethodObjectPath(this.context, this, "AppendRichText", 0, [paragraphText], false, true, null)); + return new OneNote.RichText(this.context, _createMethodObjectPath(this.context, this, "AppendRichText", 0, [paragraphText], false, true, null, false)); }; TableCell.prototype.appendTable=function (rowCount, columnCount, values) { - return new OneNote.Table(this.context, _createMethodObjectPath(this.context, this, "AppendTable", 0, [rowCount, columnCount, values], false, true, null)); + return new OneNote.Table(this.context, _createMethodObjectPath(this.context, this, "AppendTable", 0, [rowCount, columnCount, values], false, true, null, false)); }; TableCell.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; TableCell.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableCell.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15684,19 +17520,19 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["CellIndex"])) { - this.m_cellIndex=obj["CellIndex"]; + this._C=obj["CellIndex"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["RowIndex"])) { - this.m_rowIndex=obj["RowIndex"]; + this._R=obj["RowIndex"]; } if (!_isUndefined(obj["ShadingColor"])) { - this.m_shadingColor=obj["ShadingColor"]; + this._S=obj["ShadingColor"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["paragraphs", "Paragraphs", "parentRow", "ParentRow"]); }; @@ -15710,10 +17546,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; TableCell.prototype.track=function () { @@ -15726,15 +17562,16 @@ var OneNote; }; TableCell.prototype.toJSON=function () { return { - "cellIndex": this.m_cellIndex, - "id": this.m_id, - "rowIndex": this.m_rowIndex, - "shadingColor": this.m_shadingColor + "cellIndex": this._C, + "id": this._I, + "rowIndex": this._R, + "shadingColor": this._S }; }; return TableCell; }(OfficeExtension.ClientObject)); OneNote.TableCell=TableCell; + var _typeTableCellCollection="TableCellCollection"; var TableCellCollection=(function (_super) { __extends(TableCellCollection, _super); function TableCellCollection() { @@ -15749,7 +17586,7 @@ var OneNote; }); Object.defineProperty(TableCellCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableCellCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableCellCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15757,16 +17594,16 @@ var OneNote; }); Object.defineProperty(TableCellCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "TableCellCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeTableCellCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(TableCellCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableCellCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableCellCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -15775,10 +17612,10 @@ var OneNote; return new OneNote.TableCell(this.context, _createIndexerObjectPath(this.context, this, [index])); }; TableCellCollection.prototype.getItemAt=function (index) { - return new OneNote.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; TableCellCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableCellCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15787,10 +17624,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15812,7 +17649,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; TableCellCollection.prototype.track=function () { @@ -15825,7 +17662,7 @@ var OneNote; }; TableCellCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return TableCellCollection; @@ -15873,6 +17710,31 @@ var OneNote; ParagraphType.ink="Ink"; ParagraphType.other="Other"; })(ParagraphType=OneNote.ParagraphType || (OneNote.ParagraphType={})); + var NoteTagType; + (function (NoteTagType) { + NoteTagType.unknown="Unknown"; + NoteTagType.toDo="ToDo"; + NoteTagType.important="Important"; + NoteTagType.question="Question"; + NoteTagType.contact="Contact"; + NoteTagType.address="Address"; + NoteTagType.phoneNumber="PhoneNumber"; + NoteTagType.website="Website"; + NoteTagType.idea="Idea"; + NoteTagType.critical="Critical"; + NoteTagType.toDoPriority1="ToDoPriority1"; + NoteTagType.toDoPriority2="ToDoPriority2"; + })(NoteTagType=OneNote.NoteTagType || (OneNote.NoteTagType={})); + var NoteTagStatus; + (function (NoteTagStatus) { + NoteTagStatus.unknown="Unknown"; + NoteTagStatus.normal="Normal"; + NoteTagStatus.completed="Completed"; + NoteTagStatus.disabled="Disabled"; + NoteTagStatus.outlookTask="OutlookTask"; + NoteTagStatus.taskNotSyncedYet="TaskNotSyncedYet"; + NoteTagStatus.taskRemoved="TaskRemoved"; + })(NoteTagStatus=OneNote.NoteTagStatus || (OneNote.NoteTagStatus={})); var ServiceId; (function (ServiceId) { ServiceId.form="Form"; @@ -15887,7 +17749,122 @@ var OneNote; IdentityFilter.liveId="LiveId"; IdentityFilter.orgId="OrgId"; IdentityFilter.adal="ADAL"; + IdentityFilter.notebook="Notebook"; })(IdentityFilter=OneNote.IdentityFilter || (OneNote.IdentityFilter={})); + var ListType; + (function (ListType) { + ListType.none="None"; + ListType.number="Number"; + ListType.bullet="Bullet"; + })(ListType=OneNote.ListType || (OneNote.ListType={})); + var AccountType; + (function (AccountType) { + AccountType.other="Other"; + AccountType.liveId="LiveId"; + AccountType.orgId="OrgId"; + AccountType.adal="ADAL"; + })(AccountType=OneNote.AccountType || (OneNote.AccountType={})); + var LogLevel; + (function (LogLevel) { + LogLevel.trace="Trace"; + LogLevel.data="Data"; + LogLevel.exception="Exception"; + LogLevel.warning="Warning"; + })(LogLevel=OneNote.LogLevel || (OneNote.LogLevel={})); + var EventFlag; + (function (EventFlag) { + EventFlag.defaultFlag="DefaultFlag"; + EventFlag.criticalFlag="CriticalFlag"; + EventFlag.measureFlag="MeasureFlag"; + })(EventFlag=OneNote.EventFlag || (OneNote.EventFlag={})); + var NumberType; + (function (NumberType) { + NumberType.none="None"; + NumberType.arabic="Arabic"; + NumberType.ucroman="UCRoman"; + NumberType.lcroman="LCRoman"; + NumberType.ucletter="UCLetter"; + NumberType.lcletter="LCLetter"; + NumberType.ordinal="Ordinal"; + NumberType.cardtext="Cardtext"; + NumberType.ordtext="Ordtext"; + NumberType.hex="Hex"; + NumberType.chiManSty="ChiManSty"; + NumberType.dbNum1="DbNum1"; + NumberType.dbNum2="DbNum2"; + NumberType.aiueo="Aiueo"; + NumberType.iroha="Iroha"; + NumberType.dbChar="DbChar"; + NumberType.sbChar="SbChar"; + NumberType.dbNum3="DbNum3"; + NumberType.dbNum4="DbNum4"; + NumberType.circlenum="Circlenum"; + NumberType.darabic="DArabic"; + NumberType.daiueo="DAiueo"; + NumberType.diroha="DIroha"; + NumberType.arabicLZ="ArabicLZ"; + NumberType.bullet="Bullet"; + NumberType.ganada="Ganada"; + NumberType.chosung="Chosung"; + NumberType.gb1="GB1"; + NumberType.gb2="GB2"; + NumberType.gb3="GB3"; + NumberType.gb4="GB4"; + NumberType.zodiac1="Zodiac1"; + NumberType.zodiac2="Zodiac2"; + NumberType.zodiac3="Zodiac3"; + NumberType.tpeDbNum1="TpeDbNum1"; + NumberType.tpeDbNum2="TpeDbNum2"; + NumberType.tpeDbNum3="TpeDbNum3"; + NumberType.tpeDbNum4="TpeDbNum4"; + NumberType.chnDbNum1="ChnDbNum1"; + NumberType.chnDbNum2="ChnDbNum2"; + NumberType.chnDbNum3="ChnDbNum3"; + NumberType.chnDbNum4="ChnDbNum4"; + NumberType.korDbNum1="KorDbNum1"; + NumberType.korDbNum2="KorDbNum2"; + NumberType.korDbNum3="KorDbNum3"; + NumberType.korDbNum4="KorDbNum4"; + NumberType.hebrew1="Hebrew1"; + NumberType.arabic1="Arabic1"; + NumberType.hebrew2="Hebrew2"; + NumberType.arabic2="Arabic2"; + NumberType.hindi1="Hindi1"; + NumberType.hindi2="Hindi2"; + NumberType.hindi3="Hindi3"; + NumberType.thai1="Thai1"; + NumberType.thai2="Thai2"; + NumberType.numInDash="NumInDash"; + NumberType.lcrus="LCRus"; + NumberType.ucrus="UCRus"; + NumberType.lcgreek="LCGreek"; + NumberType.ucgreek="UCGreek"; + NumberType.lim="Lim"; + NumberType.custom="Custom"; + })(NumberType=OneNote.NumberType || (OneNote.NumberType={})); + var ControlId; + (function (ControlId) { + ControlId.preinstallClassNotebook="PreinstallClassNotebook"; + ControlId.distributePageId="DistributePageId"; + ControlId.distributeSection="DistributeSection"; + ControlId.reviewStudentWork="ReviewStudentWork"; + ControlId.openTabForCreateClassNotebook="OpenTabForCreateClassNotebook"; + ControlId.openTabForManageStudent="OpenTabForManageStudent"; + ControlId.openTabForManageTeacher="OpenTabForManageTeacher"; + ControlId.openTabForGetNotebookLink="OpenTabForGetNotebookLink"; + ControlId.openTabForTeacherTraining="OpenTabForTeacherTraining"; + ControlId.openTabForAddinGuide="OpenTabForAddinGuide"; + ControlId.openTabForEducationBlog="OpenTabForEducationBlog"; + ControlId.openTabForEducatorCommunity="OpenTabForEducatorCommunity"; + ControlId.openTabToSendFeedback="OpenTabToSendFeedback"; + ControlId.openTabForViewKnowledgeBase="OpenTabForViewKnowledgeBase"; + ControlId.openTabForSuggestingFeature="OpenTabForSuggestingFeature"; + ControlId.createAssignment="CreateAssignment"; + ControlId.connections="Connections"; + ControlId.mapClassNotebooks="MapClassNotebooks"; + ControlId.mapStudents="MapStudents"; + ControlId.manageClasses="ManageClasses"; + })(ControlId=OneNote.ControlId || (OneNote.ControlId={})); var ErrorCodes; (function (ErrorCodes) { ErrorCodes.generalException="GeneralException"; @@ -15918,4 +17895,6 @@ var OneNote; OneNote.run=run; })(OneNote || (OneNote={})); +OfficeExtension.Utility._doApiNotSupportedCheck=true; + diff --git a/node_modules/@microsoft/office-js/dist/onenote-win32-16.00.js b/node_modules/@microsoft/office-js/dist/onenote-win32-16.00.js index 68bda49..cb2d406 100644 --- a/node_modules/@microsoft/office-js/dist/onenote-win32-16.00.js +++ b/node_modules/@microsoft/office-js/dist/onenote-win32-16.00.js @@ -1,5 +1,7 @@ -/* OneNote specific JavaScript API library */ -/* Version: 16.0.7923.1000 */ +/* OneNote Win32-specific API library */ +/* Version: 16.0.8827.3000 */ + +/* Office.js Version: 16.0.8828.1000 */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ @@ -16,4 +18,4 @@ * @version 2.3.0 */ -var __extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},OsfMsAjaxFactory,OSF,OSFLog,Logger,OSFAriaLogger,OSFAppTelemetry,OfficeExt,OfficeExtension,OneNote;(function(n){var t=function(){function t(){}var n=!0;return t.prototype.isMsAjaxLoaded=function(){var t="function",i="undefined";return typeof Sys!==i&&typeof Type!==i&&Sys.StringBuilder&&typeof Sys.StringBuilder===t&&Type.registerNamespace&&typeof Type.registerNamespace===t&&Type.registerClass&&typeof Type.registerClass===t&&typeof Function._validateParams===t&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===t?n:!1},t.prototype.loadMsAjaxFull=function(n){var t=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,n)},Object.defineProperty(t.prototype,"msAjaxError",{get:function(){var n=this;return n._msAjaxError==null&&n.isMsAjaxLoaded()&&(n._msAjaxError=Error),n._msAjaxError},set:function(n){this._msAjaxError=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxString",{get:function(){var n=this;return n._msAjaxString==null&&n.isMsAjaxLoaded()&&(n._msAjaxString=String),n._msAjaxString},set:function(n){this._msAjaxString=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxDebug",{get:function(){var n=this;return n._msAjaxDebug==null&&n.isMsAjaxLoaded()&&(n._msAjaxDebug=Sys.Debug),n._msAjaxDebug},set:function(n){this._msAjaxDebug=n},enumerable:n,configurable:n}),t}();n.MicrosoftAjaxFactory=t})(OfficeExt||(OfficeExt={}));OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory;OSF=OSF||{},function(n){var t=function(){function n(n){this._internalStorage=n}return n.prototype.getItem=function(n){try{return this._internalStorage&&this._internalStorage.getItem(n)}catch(t){return null}},n.prototype.setItem=function(n,t){try{this._internalStorage&&this._internalStorage.setItem(n,t)}catch(i){}},n.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(n){}},n.prototype.removeItem=function(n){try{this._internalStorage&&this._internalStorage.removeItem(n)}catch(t){}},n.prototype.getKeysWithPrefix=function(n){var r=[],u,t,i;try{for(u=this._internalStorage&&this._internalStorage.length||0,t=0;t0?i.push(t):t.tabIndex===0&&r.push(t):r.push(t);return i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;return r===0&&(r=i.indexOf(n)-i.indexOf(t)),r}),[].concat(i,r)}var f="focus",e="on",b="configurable",k="writable",o="enumerable",s="undefined",i=!0,t=!1,c=2147483647,n=null,r=-1,l=r,d="&_xdm_Info=",g="&_serializer_version=",nt="_xdm_",ut="_serializer_version=",a="#",tt="&",h="class",v={},ft=3e4,y=n,p=n,u=(new Date).getTime();return{set_entropy:function(n){var t,r,i;if(typeof n=="string")for(t=0;t1?l[l.length-1]:n,s,h,c,a;return u&&o!=n&&(o.indexOf(tt)>=0&&(o=o.split(tt)[0]),o=decodeURIComponent(o)),s=w(),!f&&s&&(h=window.name.indexOf(i),h>r&&(c=window.name.indexOf(";",h),c==r&&(c=window.name.length),a=window.name.substring(h,c),o?s.setItem(a,o):o=s.getItem(a))),o},getConversationId:function(){var i=window.location.search,t=n,r;return i&&(r=i.indexOf("&"),t=r>0?i.substring(1,r):i.substr(1),t&&t.charAt(t.length-1)==="="&&(t=t.substring(0,t.length-1),t&&(t=decodeURIComponent(t)))),t},getInfoItems:function(n){var t=n.split("$");return typeof t[1]==s&&(t=n.split("|")),typeof t[1]==s&&(t=n.split("%7C")),t},getXdmFieldValue:function(n,t){var r="",u=OSF.OUtil.parseXdmInfo(t),i;if(u&&(i=OSF.OUtil.getInfoItems(u),i!=undefined&&i.length>=3))switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]),f;if(u)throw u;for(f in r)if(u=Function._validateParameter(n[f],r[f],f),u)throw u;},writeProfilerMark:function(n){window.msWriteProfilerMark&&(window.msWriteProfilerMark(n),OsfMsAjaxFactory.msAjaxDebug.trace(n))},outputDebug:function(n){typeof OsfMsAjaxFactory!==s&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){var e,f;r=r||{};for(e in u)f=u[e],r[f]==undefined&&(r[f]=i);return Object.defineProperty(n,t,r),n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[o])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[o])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[k,o,b])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[k,o,b])},finalizeProperties:function(n,r){var e,u;r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8,f=e&255,i[t++]=r>>2,i[t++]=(r&3)<<4|u>>4,i[t++]=(u&15)<<2|f>>6,i[t++]=f&63,isNaN(e)||(r=e>>8,u=s&255,f=s>>8,i[t++]=r>>2,i[t++]=(r&3)<<4|u>>4,i[t++]=(u&15)<<2|f>>6,i[t++]=f&63),isNaN(e)?i[t-1]=64:isNaN(s)&&(i[t-2]=64,i[t-1]=64),h=0;h0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){var u,i,f,r;if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(u=[],i=0;in)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=rt(u),o=e?u.length-1:0,u.length===0)return n;while(!h&&o>=0&&on)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=rt(u),l=y(u,e),s=v(u.length,l,o),s<0)return n;while(!c&&s>=0&&s0;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[r%16],r=Math.floor(r/16);for(;t<32;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[Math.floor(Math.random()*16)];return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidGetDelegateTokenMethod:146,dispidMethodMax:146};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidActivationStatusChangedEvent:32,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];return i?(i.name||(i.name=n[this.errorCodes.ooeInternalError].name),i.message||(i.message=n[this.errorCodes.ooeInternalError].message)):i=n[this.errorCodes.ooeInternalError],i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString}}}}(),function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}(),r,i,h,u,c,l,f,a,e,v,y,p,w,b,o,k,d,g,s,nt,tt,it,rt;n.RequirementVersion=ut;r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){var f,u,e,i,r;if(n==undefined)return!1;if(t==undefined&&(t=0),f=this._setMap,u=f._sets,u.hasOwnProperty(n.toLowerCase())){e=u[n.toLowerCase()];try{if((i=this._getVersion(e),t=t+"",r=this._getVersion(t),i.major>0&&i.major>r.major)||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),i=0,r=0;if(t.length<2&&isNaN(Number(n)))throw u;else if(i=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(i)||isNaN(r))throw u;return{minor:r,major:i}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;h=function(n){function i(){n.call(this,{dialogapi:t})}return __extends(i,n),i}(i);n.DefaultDialogSetRequirement=h;u=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelClientDefaultSetRequirement=u;c=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(u);n.ExcelClientV1DefaultSetRequirement=c;l=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookClientDefaultSetRequirement=l;f=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return __extends(i,n),i}(i);n.WordClientDefaultSetRequirement=f;a=function(n){function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return __extends(i,n),i}(f);n.WordClientV1DefaultSetRequirement=a;e=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointClientDefaultSetRequirement=e;v=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(e);n.PowerpointClientV1DefaultSetRequirement=v;y=function(n){function i(){n.call(this,{selection:t,textcoercion:t})}return __extends(i,n),i}(i);n.ProjectClientDefaultSetRequirement=y;p=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return __extends(i,n),i}(i);n.ExcelWebDefaultSetRequirement=p;w=function(n){function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordWebDefaultSetRequirement=w;b=function(n){function i(){n.call(this,{activeview:t,settings:t})}return __extends(i,n),i}(i);n.PowerpointWebDefaultSetRequirement=b;o=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookWebDefaultSetRequirement=o;k=function(n){function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.SwayWebDefaultSetRequirement=k;d=function(n){function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return __extends(i,n),i}(i);n.AccessWebDefaultSetRequirement=d;g=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelIOSDefaultSetRequirement=g;s=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordIOSDefaultSetRequirement=s;nt=function(n){function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return __extends(t,n),t}(s);n.WordIOSV1DefaultSetRequirement=nt;tt=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointIOSDefaultSetRequirement=tt;it=function(n){function i(){n.call(this,{mailbox:t})}return __extends(i,n),i}(i);n.OutlookIOSDefaultSetRequirement=it;rt=function(){function n(){}var t="undefined";return n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},n.getDefaultRequirementMatrix=function(u){var f,e,s,o;return this.initializeDefaultSetMatrix(),f=undefined,e=u.get_requirementMatrix(),e!=undefined&&e.length>0&&typeof JSON!==t?(s=JSON.parse(u.get_requirementMatrix().toLowerCase()),f=new r(new i(s))):(o=n.getClientFullVersionString(u),f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[o]!=undefined?new r(n.DefaultSetArrayMatrix[o]):new r(new i({}))),f},n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix(),e;return f!=undefined&&f.length>0&&typeof JSON!==t?(e=JSON.parse(n.get_requirementMatrix().toLowerCase()),u=new r(new i(e))):u=new r(new h),u},n.getClientFullVersionString=function(n){var i=n.get_appMinorVersion(),u="",r="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;return f&&n.get_appVersion()==1?r=t==4096&&i>=15?"16.00.01":"16.00":n.get_appName()==64?r=n.get_appVersion():(u=i<10?"0"+i:""+i,r=n.get_appVersion()+"."+u),n.get_appName()+"-"+r},n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new c;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new v;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new l;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new w;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new b;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new g;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new k;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new nt;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new tt;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new it},n.Excel_RCLIENT_1600="1-16.00",n.Excel_RCLIENT_1601="1-16.01",n.Word_RCLIENT_1600="2-16.00",n.Word_RCLIENT_1601="2-16.01",n.PowerPoint_RCLIENT_1600="4-16.00",n.PowerPoint_RCLIENT_1601="4-16.01",n.Outlook_RCLIENT_1600="8-16.00",n.Excel_WAC_1600="16-16.00",n.Word_WAC_1600="32-16.00",n.Outlook_WAC_1600="64-16.00",n.Outlook_WAC_1601="64-16.01",n.Project_RCLIENT_1600="128-16.00",n.Access_WAC_1600="256-16.00",n.PowerPoint_WAC_1600="512-16.00",n.Excel_IOS_1600="1024-16.00",n.SWAY_WAC_1600="2048-16.00",n.Word_IOS_1600="4096-16.00",n.Word_IOS_16001="4096-16.00.01",n.PowerPoint_IOS_1600="8192-16.00",n.Outlook_IOS_1600="65536-16.00",n.DefaultSetArrayMatrix={},n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))}(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}return n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n},n.getInstance=function(){return n.hostObj===undefined&&(n.hostObj=new n),n.hostObj},n.prototype.getPlatform=function(){var n=this,t;return n.hostInfo.hostPlatform&&(t=n.hostInfo.hostPlatform.toLowerCase(),n.platformRemappings[t])?n.platformRemappings[t]:null},n.prototype.getHost=function(){var n=this,t;if(n.hostInfo.hostType){if(t=n.hostInfo.hostType.toLowerCase(),n.camelCaseMappings[t])return n.camelCaseMappings[t];if(t=n.capitalizeFirstLetter(n.hostInfo.hostType),Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null},n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null},n}();n.Host=t})(t=n.HostName||(n.HostName={}))}(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){n||(window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,n=!0)},disableShortcut:function(){n&&(t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window),n=!1)}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i,r,o,u,f,e;if(n&&typeof n=="string"&&(r=n.indexOf("#"),r!=-1)){o=n.substring(0,r);u=n.substring(r+1);switch(o){case"binding":case"bindings":u&&(i=new OSF.DDA.BindingPromise(u))}}if(i)return i.onFail=t,i;else if(t)if(f=typeof t,f=="function")e={},e[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(e,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext));else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f);};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this,s,e;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.get_isDialog()?(e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e})):(t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t}),r&&(s=r.displayName||"appOM",delete r.displayName,OSF.OUtil.defineEnumerableProperty(f,s,{value:r})),u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}}),e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e}))};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this,u;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;return OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext()),n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,e=n.length,o=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){var u,i,r;for(u in n){if(i=n[u],r=t[u],i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw o();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw o();}};f.extractRequiredArguments=function(t,i,r){var f,u,h,s,c,l;if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(c=n.length-1;c>=s;c--){l=n[c];switch(typeof l){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=l;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}if(f=o.fillOptions(f,i,r,u),e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;return o.verifyArguments(t,f),f}var h="function",s=n.length,o=new OSF.DDA.ApiMethodCall(n,t,i,f,e);this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),u=c(n,r,t,i);return o.constructCallArgs(r,u,t,i)};this.processResponse=function(n,t,i,f){return n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n)};this.getCallArgs=function(n){for(var t,u,r,i=n.length-1;i>=s;i--){r=n[i];switch(typeof r){case"object":t=r;break;case h:u=r}}return t=t||{},u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u),t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],i=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],t,i,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback],u,r;f&&(u={},u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?u[OSF.DDA.AsyncResultEnum.Properties.Value]=i:(r={},i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i),f(new OSF.DDA.AsyncResult(u,r)))};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.SyncMethodNames[t]=i};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){function o(n,i,r,u){var o,c,s,h;if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(s=n.length-1;s>=e;s--){h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}return o=f.fillOptions(o,i,r,u),f.verifyArguments(t,o),o}var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),u=o(n,r,t,i);return f.constructCallArgs(r,u,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){function e(i,f){var a=i?{}:undefined,s,h,o,v,c,l;for(s in i){if(h=i[s],OSF.DDA.ListType.isListType(s)){o=[];for(v in h)o.push(e(h[v],f))}else OSF.OUtil.listContainsKey(r,s)?o=r[s][f](h):f==u&&n.preserveNesting(s)?o=e(h,f):(c=t[s],c?(l=c[f],l&&(o=l[h],o===undefined&&(o=h))):o=h);a[s]=o}return a}function l(i,r){var e,u,h,s;for(u in r)h=n.isComplexType(u)?l(i,t[u][o]):i[u],h!=undefined&&(e||(e={}),s=r[u],s==f&&(s=u),e[s]=n.pack(u,h));return e}function s(i,r,e){var o,a,h,l,p,v,y;e||(e={});for(o in r){if(a=r[o],a==f)h=i;else if(a==c){e[o]=i.toArray();continue}else h=i[a];if(h===null||h===undefined)e[o]=undefined;else if(h=n.unpack(o,h),n.isComplexType(o))l=t[o][u],n.preserveNesting(o)?e[o]=s(h,l):s(h,l,e);else if(OSF.DDA.ListType.isListType(o)){l={};p=OSF.DDA.ListType.getDescriptor(o);l[p]=f;v=new Array(h.length);for(y in h)v[y]=s(h[y],l);e[o]=v}else e[o]=h}return e}function a(n,i,r){var f=t[n][r],u,o,c;return r=="toHost"?(o=e(i,r),u=l(o,f)):r==h&&(c=s(i,f),u=e(c,r)),u}var h="fromHost",i=this,o="toHost",u=h,c="sourceData",f="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];t||(t={});i.addMapping=function(n,i){var e,h,c,l,r,s,a,v;if(i.map){e=i.map;h={};for(c in e)l=e[c],l==f&&(l=c),h[l]=c}else e=i.toHost,h=i.fromHost;if(r=t[n],r){s=r[o];for(a in s)e[a]=s[a];s=r[u];for(v in s)h[v]=s[v]}else r=t[n]={};r[o]=e;r[u]=h};i.toHost=function(n,t){return a(n,t,o)};i.fromHost=function(n,t){return a(n,t,u)};i.self=f;i.sourceData=c;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){return this.isDynamicType(n)?t[n].toHost(i):i};i.unpack=function(n,i){return this.isDynamicType(n)?t[n].fromHost(i):i}};OSF.DDA.getDecoratedParameterMap=function(n,t){function r(n){var i=null,r,t;if(n)for(i={},r=n.length,t=0;t0){for(r=[],i=0;i=s)break;if(f=Function._validateParameter(n[e],o,h),f)return f.popStackFrame(),f}return t}),Function._validateParameterCount||(Function._validateParameterCount=function(n,r,u){var f,s,e=r.length,h=n.length,c,l,a;if(he)for(s=i,f=0;f0&&t.push(u)}}catch(s){}return t}var i=[],t={};t[Microsoft.Office.WebExtension.Parameters.Data]=function(){var t=0,i=1;return{toHost:function(n){if(OSF.DDA.TableDataProperties&&typeof n!="string"&&n[OSF.DDA.TableDataProperties.TableRows]!==undefined){var r=[];r[t]=n[OSF.DDA.TableDataProperties.TableRows];r[i]=n[OSF.DDA.TableDataProperties.TableHeaders];n=r}return n},fromHost:function(r){var f,e,u;return r.toArray?(e=r.dimensions(),e===2?f=n(r):(u=r.toArray(),u.length===2&&(u[0]!=null&&u[0].toArray||u[1]!=null&&u[1].toArray)?(f={},f[OSF.DDA.TableDataProperties.TableRows]=n(u[t]),f[OSF.DDA.TableDataProperties.TableHeaders]=n(u[i])):f=u)):f=r,f}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,i,t);this.unpack=function(n,i){var r,u;return this.isComplexType(n)||OSF.DDA.ListType.isListType(n)?(u=(i||typeof i=="unknown")&&i.toArray,r=u?i.toArray():i||{}):r=this.isDynamicType(n)?t[n].fromHost(i):i,r}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(n){function t(n){var i=n,f,r,u;if(OSF.OUtil.isArray(n))for(f=i.length,r=0;r2)for(u=[],o=1;o40)&&(n=OSF.OUtil.Guid.generateNewGuid(),t.setValue(t.clientIDKey,n)),n},n.prototype.saveLog=function(n,t){var i=this,u=i.getValue(i.logIdSetKey);u=(u&&u.length>0?u+";":r)+n;i.setValue(i.logIdSetKey,u);i.setValue(n,t)},n.prototype.enumerateLog=function(n,t){var i=this,e=i.getValue(i.logIdSetKey),u,o,r,f;if(e){u=e.split(";");for(o in u)r=u[o],f=i.getValue(r),f&&(n&&n(r,f),t&&i.remove(r));t&&i.remove(i.logIdSetKey)}},n.prototype.getValue=function(n){var t=OSF.OUtil.getLocalStorage(),i=r;return t&&(i=t.getItem(n)),i},n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)},n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}},n}(),o=function(){function n(){}return n.prototype.LogData=function(n){OSF.Logger&&(OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n.SerializeRow(),OSF.Logger.SendFlag.none),OSFAriaLogger.AriaLogger.getInstance().logData(n))},n.prototype.LogRawData=function(n){if(OSF.Logger){OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n,OSF.Logger.SendFlag.none);try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(n))}catch(t){}}},n}();n.initialize=v;n.onAppActivated=y;n.onScriptDone=p;n.onCallDone=w;n.onMethodDone=b;n.onPropertyDone=k;n.onEventDone=d;n.onRegisterDone=g;n.onAppClosed=nt;n.setOsfControlAppCorrelationId=tt;n.doAppInitializationLogging=c;n.logAppCommonMessage=it;n.logAppException=rt;OSF.AppTelemetry=n}(OSFAppTelemetry||(OSFAppTelemetry={}));Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(n){var t=this,r,i;t._eventHandlers={};t._queuedEventsArgs={};for(r in n)i=n[r],t._eventHandlers[i]=[],t._queuedEventsArgs[i]=[]};OSF.EventDispatch.prototype={getSupportedEvents:function(){var n=[];for(var t in this._eventHandlers)n.push(t);return n},supportsEvent:function(n){var t=!1;for(var i in this._eventHandlers)if(n==i){t=!0;break}return t},hasEventHandler:function(n,t){var i=this._eventHandlers[n],r;if(i&&i.length>0)for(r in i)if(i[r]===t)return!0;return!1},addEventHandler:function(n,t){if(typeof t!="function")return!1;var i=this._eventHandlers[n];return i&&!this.hasEventHandler(n,t)?(i.push(t),!0):!1},addEventHandlerAndFireQueuedEvent:function(n,t){var r=this._eventHandlers[n],u=r.length==0,i=this.addEventHandler(n,t);return u&&i&&this.fireQueuedEvent(n),i},removeEventHandler:function(n,t){var i=this._eventHandlers[n],r;if(i&&i.length>0)for(r=0;r0?(this._eventHandlers[n]=[],!0):!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},fireEvent:function(n){var t,i,r;if(n.type==undefined)return!1;if(t=n.type,t&&this._eventHandlers[t]){i=this._eventHandlers[t];for(r in i)i[r](n);return!0}else return!1},fireOrQueueEvent:function(n){var t=this,i=n.type,r,u;return i&&t._eventHandlers[i]?(r=t._eventHandlers[i],u=t._queuedEventsArgs[i],r.length==0?u.push(n):t.fireEvent(n),!0):!1},fireQueuedEvent:function(n){var t,i,r,u;if(n&&this._eventHandlers[n]&&(t=this._eventHandlers[n],i=this._queuedEventsArgs[n],t.length>0)){for(r=t[0];i.length>0;)u=i.shift(),r(u);return!0}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var f="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]=="outlook"||OSF._OfficeAppFactory.getHostInfo()[f]=="outlookwebapp")r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i),t.initialize(r.initialData),t.setCurrentItemNumber(r.itemNumber.itemNumber);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var i=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),t=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];t(arguments,i,n)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(n){var i=OSF.DDA.SyncMethodNames.MessageParent.displayName,t=this,r;t[i]||OSF.OUtil.defineEnumerableProperty(t,i,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return n(arguments,t)}});r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;t[r]||typeof OSF.DialogParentMessageEventDispatch=="undefined"||OSF.DDA.DispIdHost.addEventSupport(t,OSF.DialogParentMessageEventDispatch,n);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(n){n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:n[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}}],privateStateCallbacks:[],onSucceeded:function(n){var f=n[Microsoft.Office.WebExtension.Parameters.Id],i=n[Microsoft.Office.WebExtension.Parameters.Data],t=new OSF.DialogHandler,e=OSF.DDA.AsyncMethodNames.CloseAsync.displayName,r,u;return OSF.OUtil.defineEnumerableProperty(t,e,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];n(arguments,f,i,t)}}),r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName,OSF.OUtil.defineEnumerableProperty(t,r,{value:function(){var r=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],n=r.verifyAndExtractCall(arguments,t,i),u=n[Microsoft.Office.WebExtension.Parameters.EventType],f=n[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(u,f)}}),u=OSF.DDA.SyncMethodNames.SendMessage.displayName,OSF.OUtil.defineEnumerableProperty(t,u,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return n(arguments,i,t)}}),t},checkCallArgs:function(n){return n[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Width]=1),n[Microsoft.Office.WebExtension.Parameters.Width]>100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99),n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1),n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99),n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(n){try{n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,n);OSF.ClientHostController.openDialog(n.dispId,n.targetId,function(t,i){n.onEvent&&n.onEvent(i);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(n){n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,n);try{OSF.ClientHostController.closeDialog(n.dispId,n.targetId,t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.messageParent=function(n){try{n.onCalling&&n.onCalling();var i=(new Date).getTime(),t=OSF.ClientHostController.messageParent(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs((new Date).getTime()-i),t),t}catch(r){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(r)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.sendMessage=function(n){try{n.onCalling&&n.onCalling();var r=(new Date).getTime(),t=OSF.ClientHostController.sendMessage(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),t}catch(i){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(i)}};Microsoft.Office.WebExtension.FileType={Text:"text",Compressed:"compressed",Pdf:"pdf"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FileProperties:"FileProperties",FileSliceProperties:"FileSliceProperties"});OSF.DDA.FileProperties={Handle:"FileHandle",FileSize:"FileSize",SliceSize:Microsoft.Office.WebExtension.Parameters.SliceSize};OSF.DDA.File=function(n,t,i){var r,u;OSF.OUtil.defineEnumerableProperties(this,{size:{value:t},sliceCount:{value:Math.ceil(t/i)}});r={};r[OSF.DDA.FileProperties.Handle]=n;r[OSF.DDA.FileProperties.SliceSize]=i;u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.GetDocumentCopyChunkAsync,u.ReleaseDocumentCopyAsync],r)};OSF.DDA.FileSliceOffset="fileSliceoffset";OSF.DDA.AsyncMethodNames.addNames({GetDocumentCopyAsync:"getFileAsync",GetDocumentCopyChunkAsync:"getSliceAsync",ReleaseDocumentCopyAsync:"closeAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FileType,"enum":Microsoft.Office.WebExtension.FileType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:{types:["number"],defaultValue:4194304}}],checkCallArgs:function(n){var t=n[Microsoft.Office.WebExtension.Parameters.SliceSize];if(t<=0||t>4194304)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return n},onSucceeded:function(n,t,i){return new OSF.DDA.File(n[OSF.DDA.FileProperties.Handle],n[OSF.DDA.FileProperties.FileSize],i[Microsoft.Office.WebExtension.Parameters.SliceSize])}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(n,t){return t[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(r<0||r>=t.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;return n[OSF.DDA.FileSliceOffset]=parseInt((r*i[OSF.DDA.FileProperties.SliceSize]).toString()),n},onSucceeded:function(n,t,i){var r={};return OSF.OUtil.defineEnumerableProperties(r,{data:{value:n[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:i[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:n[OSF.DDA.FileProperties.SliceSize]}}),r}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FileType,{Text:"text",Pdf:"pdf"});OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(n){OSF.OUtil.defineEnumerableProperties(this,{url:{value:n[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(n){return new Microsoft.Office.WebExtension.FileProperties(n)}});Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"};Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"};Microsoft.Office.WebExtension.Index={First:"first",Last:"last",Next:"next",Previous:"previous"};OSF.DDA.AsyncMethodNames.addNames({GoToByIdAsync:"goToByIdAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GoToByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string","number"]},{name:Microsoft.Office.WebExtension.Parameters.GoToType,"enum":Microsoft.Office.WebExtension.GoToType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:{"enum":Microsoft.Office.WebExtension.SelectionMode,defaultValue:Microsoft.Office.WebExtension.SelectionMode.Default}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:0},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:1},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:2},{name:Microsoft.Office.WebExtension.GoToType.Index,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:0},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:1},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:1},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileProperties.FileSize,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0},{name:OSF.DDA.FileProperties.SliceSize,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:0},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:5},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:6}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:0}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileSliceOffset,value:1},{name:OSF.DDA.FileProperties.SliceSize,value:2}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0}]});OSF.DDA.AsyncMethodNames.addNames({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync"}),function(){function r(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&r&&(r[OSF.DDA.TableDataProperties.TableRows]!=undefined||r[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(r=OSF.DDA.OMFactory.manufactureTableData(r)),r=OSF.DDA.DataCoercion.coerceData(r,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),r==undefined?null:r}var i=!1,n="boolean",t="number";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,"enum":Microsoft.Office.WebExtension.CoercionType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}}],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object",t,n]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[t,n],defaultValue:i}}],privateStateCallbacks:[]})}();OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:1},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:2},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:3},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:4},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:5}]});OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",RefreshingSettings:"refreshingSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(n){var r={},i,t;for(i in n){t=n[i];try{t=JSON?JSON.stringify(t,function(n,t){return OSF.OUtil.isDate(this[n])?OSF.DDA.SettingsManager.DateJSONPrefix+this[n].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix:t}):Sys.Serialization.JavaScriptSerializer.serialize(t);r[i]=t}catch(u){}}return r},deserializeSettings:function(n){var r={},i,t;n=n||{};for(i in n){t=n[i];try{t=JSON?JSON.parse(t,function(n,t){var i;return typeof t=="string"&&t&&t.length>6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix&&(i=new Date(parseInt(t.slice(5,-1))),i)?i:t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,!0);r[i]=t}catch(u){}}return r}};OSF.DDA.Settings=function(n){var t="name",i;n=n||{};i=function(n){var i=OSF.OUtil.getSessionStorage(),t,r;i&&(t=OSF.DDA.SettingsManager.serializeSettings(n),r=JSON?JSON.stringify(t):Sys.Serialization.JavaScriptSerializer.serialize(t),i.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),r))};OSF.OUtil.defineEnumerableProperties(this,{get:{value:function(i){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]),r;if(u)throw u;return r=n[i],typeof r=="undefined"?null:r}},set:{value:function(r,u){var f=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1},{name:"value",mayBeNull:!0}]);if(f)throw f;n[r]=u;i(n)}},remove:{value:function(r){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]);if(u)throw u;delete n[r];i(n)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],n)};OSF.DDA.RefreshableSettings=function(n){OSF.DDA.RefreshableSettings.uber.constructor.call(this,n);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],n);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:n}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(n,t){return t}}],onSucceeded:function(n,t,i){var f=n[OSF.DDA.SettingsManager.SerializedSettings],u=OSF.DDA.SettingsManager.deserializeSettings(f),e=i[OSF.DDA.SettingsManager.RefreshingSettings];for(var r in e)t.remove(r);for(r in u)t.set(r,u[r]);return t}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(n,t){return OSF.DDA.SettingsManager.serializeSettings(t)}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});Microsoft.Office.WebExtension.BindingType={Table:"table",Text:"text",Matrix:"matrix"};OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType};OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{BindingList:"BindingList"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{Subset:"subset",BindingProperties:"BindingProperties"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList,OSF.DDA.PropertyDescriptors.BindingProperties);OSF.DDA.BindingPromise=function(n,t){this._id=n;OSF.OUtil.defineEnumerableProperty(this,"onFail",{get:function(){return t},set:function(n){var i=typeof n;if(i!="undefined"&&i!="function")throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,i);t=n}})};OSF.DDA.BindingPromise.prototype={_fetch:function(n){var t=this,i;return t.binding?n&&n(t.binding):t._binding||(i=t,Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(t._id,function(t){t.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded?(OSF.OUtil.defineEnumerableProperty(i,"binding",{value:t.value}),n&&n(i.binding)):i.onFail&&i.onFail(t)})),t},getDataAsync:function(){var n=arguments;return this._fetch(function(t){t.getDataAsync.apply(t,n)}),this},setDataAsync:function(){var n=arguments;return this._fetch(function(t){t.setDataAsync.apply(t,n)}),this},addHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.addHandlerAsync.apply(t,n)}),this},removeHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.removeHandlerAsync.apply(t,n)}),this}};OSF.DDA.BindingFacade=function(n){this._eventDispatches=[];OSF.OUtil.defineEnumerableProperty(this,"document",{value:n});var t=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[t.AddFromSelectionAsync,t.AddFromNamedItemAsync,t.GetAllAsync,t.GetByIdAsync,t.ReleaseByIdAsync])};OSF.DDA.UnknownBinding=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}})};OSF.DDA.Binding=function(n,t){var r,u,i,f;OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}});r=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[r.GetDataAsync,r.SetDataAsync]);u=Microsoft.Office.WebExtension.EventType;i=t.bindings._eventDispatches;i[n]||(i[n]=new OSF.EventDispatch([u.BindingSelectionChanged,u.BindingDataChanged]));f=i[n];OSF.DDA.DispIdHost.addEventSupport(this,f)};OSF.DDA.generateBindingId=function(){return"UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+(new Date).getTime()};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureBinding=function(n,t){var r=n[OSF.DDA.BindingProperties.Id],u=n[OSF.DDA.BindingProperties.RowCount],f=n[OSF.DDA.BindingProperties.ColumnCount],s=n[OSF.DDA.BindingProperties.HasHeaders],i,e,o;switch(n[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:i=new OSF.DDA.TextBinding(r,t);break;case Microsoft.Office.WebExtension.BindingType.Matrix:i=new OSF.DDA.MatrixBinding(r,t,u,f);break;case Microsoft.Office.WebExtension.BindingType.Table:e=function(){return OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument};o=e()&&OSF.DDA.ExcelTableBinding?OSF.DDA.ExcelTableBinding:OSF.DDA.TableBinding;i=new o(r,t,u,f,s);break;default:i=new OSF.DDA.UnknownBinding(r,t)}return i};OSF.DDA.AsyncMethodNames.addNames({AddFromSelectionAsync:"addFromSelectionAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:"getByIdAsync",ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync"}),function(){function u(n){return OSF.DDA.OMFactory.manufactureBinding(n,Microsoft.Office.WebExtension.context.document)}function f(n){return n.id}function e(n,t,i){var u=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&u&&(u[OSF.DDA.TableDataProperties.TableRows]!=undefined||u[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(u=OSF.DDA.OMFactory.manufactureTableData(u)),u=OSF.DDA.DataCoercion.coerceData(u,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),u==undefined?r:u}var t="number",i="object",n="string",r=null;OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:[n]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return!0}}],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.BindingList],u)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n,t,i){var r=i[Microsoft.Office.WebExtension.Parameters.Id];delete t._eventDispatches[r]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n,t){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&n[Microsoft.Office.WebExtension.Parameters.RowCount]==0&&n[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn],delete n[Microsoft.Office.WebExtension.Parameters.RowCount],delete n[Microsoft.Office.WebExtension.Parameters.ColumnCount]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]||n[Microsoft.Office.WebExtension.Parameters.RowCount]||n[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[n,i,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}]})}();OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.MatrixBinding=function(n,t,i,r){OSF.DDA.MatrixBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Matrix},rowCount:{value:i?i:0},columnCount:{value:r?r:0}})};OSF.OUtil.extend(OSF.DDA.MatrixBinding,OSF.DDA.Binding);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.BindingProperties,fromHost:[{name:OSF.DDA.BindingProperties.Id,value:0},{name:OSF.DDA.BindingProperties.Type,value:1},{name:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,value:2}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.BindingType,toHost:[{name:Microsoft.Office.WebExtension.BindingType.Text,value:0},{name:Microsoft.Office.WebExtension.BindingType.Matrix,value:1},{name:Microsoft.Office.WebExtension.BindingType.Table,value:2}],invertible:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,value:0},{name:Microsoft.Office.WebExtension.Parameters.Id,value:1},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:2},{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseBindingMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAllBindingsMethod,fromHost:[{name:OSF.DDA.ListDescriptors.BindingList,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:2},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:3},{name:OSF.DDA.PropertyDescriptors.Subset,value:4}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.Data,value:2},{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,fromHost:[{name:OSF.DDA.BindingProperties.RowCount,value:0},{name:OSF.DDA.BindingProperties.ColumnCount,value:1},{name:OSF.DDA.BindingProperties.HasHeaders,value:2}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.Subset,toHost:[{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:0},{name:OSF.DDA.SafeArray.UniqueArguments.Run,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Offset,toHost:[{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:0},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Run,toHost:[{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:0},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddColumnsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearAllRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});Microsoft.Office.WebExtension.TableData=function(n,t){function i(n){if(n==null||n==undefined)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(n,2);t<2;t++)n=[n];return n}catch(i){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(n){t=i(n)}},rows:{get:function(){return n},set:function(t){n=t==null||OSF.OUtil.isArray(t)&&t.length==0?[]:i(t)}}});this.headers=t;this.rows=n};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(n){return new Microsoft.Office.WebExtension.TableData(n[OSF.DDA.TableDataProperties.TableRows],n[OSF.DDA.TableDataProperties.TableHeaders])};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{TableDataProperties:"TableDataProperties"});OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};OSF.DDA.TableBinding=function(n,t,i,r,u){OSF.DDA.TableBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:i?i:0},columnCount:{value:r?r:0},hasHeaders:{value:u?u:!1}});var f=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[f.AddRowsAsync,f.AddColumnsAsync,f.DeleteAllDataValuesAsync])};OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync"}),function(){function n(n){return n.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]})}();OSF.DDA.TextBinding=function(n,t){OSF.DDA.TextBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperty(this,"type",{value:Microsoft.Office.WebExtension.BindingType.Text})};OSF.OUtil.extend(OSF.DDA.TextBinding,OSF.DDA.Binding);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"});OSF.DDA.DocumentSelectionChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:n}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{BindingSelectionChanged:"bindingSelectionChanged",BindingDataChanged:"bindingDataChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{BindingSelectionChangedEvent:"BindingSelectionChangedEvent"});OSF.DDA.BindingSelectionChangedEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingSelectionChanged},binding:{value:n}});for(var i in t)OSF.OUtil.defineEnumerableProperty(this,i,{value:t[i]})};OSF.DDA.BindingDataChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingDataChanged},binding:{value:n}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:0},{name:OSF.DDA.PropertyDescriptors.Subset,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingDataChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var n=null;return{findArrayDimensionality:function(n){if(OSF.OUtil.isArray(n)){for(var t=0,i=0;i0},enumerable:!0,configurable:!0}),t.prototype.addTrace=function(n,t){this.m_traceInfos[n]=t},t.prototype.addReferencedObjectPath=function(t){if(!this.m_referencedObjectPaths[t.objectPathInfo.Id]){if(!t.isValid)throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidObjectPath,message:n.Utility._getResourceString(n.ResourceStrings.invalidObjectPath,n.Utility.getObjectPathExpression(t)),debugInfo:{errorLocation:n.Utility.getObjectPathExpression(t)}});while(t)t.isWriteOperation&&(this.m_flags=this.m_flags|1),this.m_referencedObjectPaths[t.objectPathInfo.Id]=t,t.objectPathInfo.ObjectPathType==3&&this.addReferencedObjectPaths(t.argumentObjectPaths),t=t.parentObjectPath}},t.prototype.addReferencedObjectPaths=function(n){if(n)for(var t=0;t0&&(typeof r[0]=="string"||i.isRequestUrlAndHeaderInfo(r[0])||i.isRequestUrlAndHeaderInfoResolver(r[0]))&&(y=r[0],h=1),r.length==h+1)a=u,v=r[h+0];else if(r.length==h+2){if(r[h+0]instanceof n.ClientObject)a=function(){return r[h+0].context};else if(Array.isArray(r[h+0])){if(c=r[h+0],c.length==0)return i.createErrorPromise(t);for(l=0;l0){var n=c._onRunFinishedNotifiers.shift();n()}if(a)return l;else throw l;})},i.prototype._nextId=function(){return++this.m_nextId},i}();n.ClientRequestContext=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_type=n}return Object.defineProperty(t.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){(this.m_isLoaded=!0,typeof t=="object"&&t&&t._IsNull)||(this.m_value=this.m_type===1?n.Utility.adjustToDateTime(t):t)},t}();n.ClientResult=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.flags="flags",n.getItemAt="GetItemAt",n.id="Id",n.idPrivate="_Id",n.index="_Index",n.items="_Items",n.iterativeExecutor="IterativeExecutor",n.localDocument="http://document.localhost/",n.localDocumentApiPrefix="http://document.localhost/_api/",n.processQuery="ProcessQuery",n.referenceId="_ReferenceId",n.isTracked="_IsTracked",n.sourceLibHeader="SdkVersion",n.embeddingPageOrigin="EmbeddingPageOrigin",n.embeddingPageSessionInfo="EmbeddingPageSessionInfo",n}();n.Constants=t}(OfficeExtension||(OfficeExtension={})),function(n){var u=1,r={invokeRequestModifier:function(n){return n.DdaMethod.Version=u,n},invokeResponseModifier:function(n){return u=n.Version,n.Error&&(n.error={},n.error.Code=n.Error),n}},i,t,f,e;(function(n){n[n.Success=0]="Success";n[n.Timeout=1]="Timeout";n[n.InternalError=5001]="InternalError"})(i||(i={})),function(n){n.SendingId="sId";n.RespondingId="rId";n.CommandKey="command";n.SessionInfoKey="sessionInfo";n.ParamsKey="params";n.ApiReadyCommand="apiready";n.ExecuteMethodCommand="executeMethod";n.GetAppContextCommand="getAppContext";n.RegisterEventCommand="registerEvent";n.UnregisterEventCommand="unregisterEvent";n.FireEventCommand="fireEvent"}(t||(t={}));f=function(u){function f(n,t){u.call(this);this.m_chosenWindow=null;this.m_chosenOrigin=null;this.m_enabled=!0;this.m_onMessageHandler=this._onMessage.bind(this);this.m_callbackList={};this.m_id=0;this.m_timeoutId=-1;this.m_appContext=null;this.m_url=n;this.m_options=t;this.m_options||(this.m_options={sessionKey:Math.random().toString()});this.m_options.sessionKey||(this.m_options.sessionKey=Math.random().toString());this.m_options.container||(this.m_options.container=document.body);this.m_options.timeoutInMilliseconds||(this.m_options.timeoutInMilliseconds=6e4);this.m_options.height||(this.m_options.height="400px");this.m_options.width||(this.m_options.width="100%")}return __extends(f,u),f.prototype._getIFrameSrc=function(){var u=window.location.protocol+"//"+window.location.host,i=n.Constants.embeddingPageOrigin+"="+encodeURIComponent(u)+"&"+n.Constants.embeddingPageSessionInfo+"="+encodeURIComponent(this.m_options.sessionKey),r=!1,t;return this.m_url.toLowerCase().indexOf("/_layouts/preauth.aspx")>0&&(r=!0),t=document.createElement("a"),t.href=this.m_url,r?t.hash=t.hash.length===0||t.hash==="#"?"#"+i:t.hash+"&"+i:t.search=t.search.length===0||t.search==="?"?"?"+i:t.search+"&"+i,t.href},f.prototype.init=function(){var t=this,i;return window.addEventListener("message",this.m_onMessageHandler),i=this._getIFrameSrc(),new n._Internal.OfficePromise(function(r,u){var f=document.createElement("iframe");t.m_options.id&&(f.id=t.m_options.id);f.style.height=t.m_options.height;f.style.width=t.m_options.width;f.src=i;t.m_options.container.appendChild(f);t.m_timeoutId=setTimeout(function(){t.close();var i=n.Utility.createRuntimeError(n.ErrorCodes.timeout,n.Utility._getResourceString(n.ResourceStrings.timeout),"EmbeddedSession.init");u(i)},t.m_options.timeoutInMilliseconds);t.m_promiseResolver=r})},f.prototype._invoke=function(n,t,u){if(!this.m_enabled){t(i.InternalError,null);return}r.invokeRequestModifier&&(u=r.invokeRequestModifier(u));this._sendMessageWithCallback(this.m_id++,n,u,function(n){r.invokeResponseModifier&&(n=r.invokeResponseModifier(n));var u=n.Error;delete n.Error;t(u||i.Success,n)})},f.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler);window.clearTimeout(this.m_timeoutId);this.m_enabled=!1},Object.defineProperty(f.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),f.prototype._createRequestExecutorOrNull=function(){return new e(this)},f.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},f.prototype._registerEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.RegisterEventCommand,{EventId:i,TargetId:r},function(){n(null)})})},f.prototype._unregisterEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.UnregisterEventCommand,{EventId:i,TargetId:r},function(){n()})})},f.prototype._onMessage=function(n){var u=this,i,e,r,o,s;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===n.source&&this.m_chosenOrigin===n.origin)){if(i=n.data,i&&i[t.CommandKey]===t.ApiReadyCommand){!this.m_chosenWindow&&this._isValidDescendant(n.source)&&i[t.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=n.source,this.m_chosenOrigin=n.origin,this._sendMessageWithCallback(this.m_id++,t.GetAppContextCommand,null,function(n){u._setupContext(n);window.clearTimeout(u.m_timeoutId);u.m_promiseResolver()}));return}if(i&&i[t.CommandKey]===t.FireEventCommand){var f=i[t.ParamsKey],h=f.EventId,c=f.TargetId,l=f.Data;if(this.m_sessionEventManager)for(e=this.m_sessionEventManager.getHandlers(h,c),r=0;r=0;o--)if(r[o]===e[i].handler){r.splice(o,1);break}break;case 2:r=[];break}}return s&&(!this.m_registered&&r.length>0?u=u.then(function(){return f.m_eventInfo.registerFunc(f.m_callback)}).then(function(){return f.m_registered=!0}):this.m_registered&&r.length==0&&(u=u.then(function(){return f.m_eventInfo.unregisterFunc(f.m_callback)}).catch(function(t){n.Utility.log("Error when unregister event: "+JSON.stringify(t))}).then(function(){return f.m_registered=!1})),u=u.then(function(){return f.m_handlers=r})),u},t.prototype.fireEvent=function(t){for(var u,f,r=[],i=0;i=0;e--)if(f[e]===u){f.splice(e,1);break}return f.length===0?this.m_unregisterEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i}();n.EventRegistration=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var s=JSON.stringify(u.Body),f=u.Url,e,o;if(f.charAt(f.length-1)!="/"&&(f=f+"/"),f=f+n.Constants.processQuery,f=f+"?"+n.Constants.flags+"="+r.toString(),e={method:"POST",url:f,headers:{},body:s},e.headers[n.Constants.sourceLibHeader]=t.SourceLibHeaderValue,e.headers["CONTENT-TYPE"]="application/json",u.Headers)for(o in u.Headers)e.headers[o]=u.Headers[o];return n.HttpUtility.sendRequest(e).then(function(t){var i,r;return t.statusCode===200?i={ErrorCode:null,ErrorMessage:null,Headers:t.headers,Body:JSON.parse(t.body)}:(n.Utility.log("Error Response:"+t.body),r=n.Utility._parseErrorResponse(t),i={ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:t.headers,Body:null}),i})},t.SourceLibHeaderValue="officejs-rest",t}();n.HttpRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){n.OfficeRequire=function(){return typeof require!="undefined"?require:null}()})(t=n._Internal||(n._Internal={}));i=function(){function i(){}return i.setCustomSendRequestFunc=function(n){i.s_customSendRequestFunc=n},i.xhrSendRequestFunc=function(i){return new t.OfficePromise(function(r,u){var f=new XMLHttpRequest,e;if(f.open(i.method,i.url),f.onload=function(){var t={statusCode:f.status,headers:n.Utility._parseHttpResponseHeaders(f.getAllResponseHeaders()),body:f.responseText};r(t)},f.onerror=function(){u(new t.RuntimeError({code:n.ErrorCodes.connectionFailure,message:n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,f.statusText)}))},i.headers)for(e in i.headers)f.setRequestHeader(e,i.headers[e]);f.send(i.body)})},i.nodejsRequestModuleSendRequestFunc=function(n){i.logRequest(n);var r=t.OfficeRequire(i.NodeJsRequestModuleName);return r(n.url,{method:n.method,headers:n.headers,body:n.body}).then(function(n){return n.text().then(function(t){var f=n.status,u={},r;return n.headers.forEach(function(n,t){u[t]=n}),r={statusCode:f,headers:u,body:t},i.logResponse(r),r})})},i.sendRequest=function(n){i.validateAndNormalizeRequest(n);var t=i.s_customSendRequestFunc;return t||(t=typeof window=="undefined"||typeof XMLHttpRequest=="undefined"?i.nodejsRequestModuleSendRequestFunc:i.xhrSendRequestFunc),t(n)},i.setCustomSendLocalDocumentRequestFunc=function(n){i.s_customSendLocalDocumentRequestFunc=n},i.sendLocalDocumentRequest=function(n){i.validateAndNormalizeRequest(n);var t;return t=i.s_customSendLocalDocumentRequestFunc||i.officeJsSendLocalDocumentRequestFunc,t(n)},i.officeJsSendLocalDocumentRequestFunc=function(i){i=n.Utility._validateLocalDocumentRequest(i);var r=n.Utility._buildRequestMessageSafeArray(i);return new t.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(r,function(i){var r;r=i.status=="succeeded"?{statusCode:n.RichApiMessageUtility.getResponseStatusCode(i),headers:n.RichApiMessageUtility.getResponseHeaders(i),body:n.RichApiMessageUtility.getResponseBody(i)}:n.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(i.error.code,i.error.message);n.Utility.log(JSON.stringify(r));t(r)})})},i.validateAndNormalizeRequest=function(i){if(n.Utility.isNullOrUndefined(i))throw t.RuntimeError._createInvalidArgError({argumentName:"request"});n.Utility.isNullOrEmptyString(i.method)&&(i.method="GET");i.method=i.method.toUpperCase()},i.logRequest=function(t){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Request---"),n.Utility.log(t.method+" "+t.url),t.headers)for(var r in t.headers)n.Utility.log(r+": "+t.headers[r]);i._logBody&&n.Utility.log(t.body)}},i.logResponse=function(t){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Response---"),n.Utility.log(""+t.statusCode),t.headers)for(var r in t.headers)n.Utility.log(r+": "+t.headers[r]);i._logBody&&n.Utility.log(t.body)}},i.NodeJsRequestModuleName="node-fetch",i._logBody=!1,i}();n.HttpUtility=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_clientObject=n}return n.prototype._handleResult=function(n){this.m_clientObject._handleIdResult(n)},n}();n.InstantiateActionResultHandler=t}(OfficeExtension||(OfficeExtension={})),function(n){}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){this.m_objectPathInfo=n;this.m_parentObjectPath=t;this.m_isWriteOperation=!1;this.m_isCollection=i;this.m_isInvalidAfterRequest=r;this.m_isValid=!0}return Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},set:function(n){this.m_isWriteOperation=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(n){this.m_argumentObjectPaths=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(n){this.m_isValid=n;!n&&this.m_objectPathInfo.ObjectPathType===6&&this.m_savedObjectPathInfo&&(t.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(n){this.m_getByIdMethodName=n},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null},t.prototype.updateUsingObjectData=function(i){var o=i[n.Constants.referenceId],u,f,e,r;if(!n.Utility.isNullOrEmptyString(o)){this.m_savedObjectPathInfo||this.isInvalidAfterRequest||!t.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)||(u={},t.copyObjectPathInfo(this.m_objectPathInfo,u),this.m_savedObjectPathInfo={pathInfo:u,parent:this.m_parentObjectPath});this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=o;this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null;return}if(f=this.parentObjectPath&&this.parentObjectPath.isCollection,e=this.getByIdMethodName,(f||!n.Utility.isNullOrEmptyString(e))&&(r=i[n.Constants.id],n.Utility.isNullOrUndefined(r)&&(r=i[n.Constants.idPrivate]),!n.Utility.isNullOrUndefined(r))){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;f?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=e,this.m_getByIdMethodName=null);this.isWriteOperation=!1;this.m_objectPathInfo.ArgumentInfo={};this.m_objectPathInfo.ArgumentInfo.Arguments=[r];this.m_argumentObjectPaths=null;return}},t.isRestorableObjectPath=function(n){return n===1||n===5||n===3||n===4},t.copyObjectPathInfo=function(n,t){t.Id=n.Id;t.ArgumentInfo=n.ArgumentInfo;t.Name=n.Name;t.ObjectPathType=n.ObjectPathType;t.ParentObjectPathId=n.ParentObjectPathId},t}();n.ObjectPath=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createGlobalObjectObjectPath=function(t){var i={Id:t._nextId(),ObjectPathType:1,Name:""};return new n.ObjectPath(i,null,!1,!1)},t.createNewObjectObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:2,Name:i};return new n.ObjectPath(u,null,r,!1)},t.createPropertyObjectPath=function(t,i,r,u,f){var e={Id:t._nextId(),ObjectPathType:4,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id};return new n.ObjectPath(e,i._objectPath,u,f)},t.createIndexerObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i._objectPath,!1,!1)},t.createIndexerObjectPathUsingParentPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i,!1,!1)},t.createMethodObjectPath=function(t,i,r,u,f,e,o,s){var c={Id:t._nextId(),ObjectPathType:3,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},l=n.Utility.setMethodArguments(t,c.ArgumentInfo,f),h=new n.ObjectPath(c,i._objectPath,e,o);return h.argumentObjectPaths=l,h.isWriteOperation=u!=1,h.getByIdMethodName=s,h},t.createChildItemObjectPathUsingIndexerOrGetItemAt=function(i,r,u,f,e){var o=f[n.Constants.id];return n.Utility.isNullOrUndefined(o)&&(o=f[n.Constants.idPrivate]),i&&!n.Utility.isNullOrUndefined(o)?t.createChildItemObjectPathUsingIndexer(r,u,f):t.createChildItemObjectPathUsingGetItemAt(r,u,f,e)},t.createChildItemObjectPathUsingIndexer=function(t,i,r){var f=r[n.Constants.id],u;return n.Utility.isNullOrUndefined(f)&&(f=r[n.Constants.idPrivate]),u=u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u.ArgumentInfo.Arguments=[f],new n.ObjectPath(u,i._objectPath,!1,!1)},t.createChildItemObjectPathUsingGetItemAt=function(t,i,r,u){var e=r[n.Constants.index],f;return e&&(u=e),f={Id:t._nextId(),ObjectPathType:3,Name:n.Constants.getItemAt,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f.ArgumentInfo.Arguments=[u],new n.ObjectPath(f,i._objectPath,!1,!1)},t}();n.ObjectPathFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var f=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n._Internal.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(f,function(i){n.Utility.log("Response:");n.Utility.log(JSON.stringify(i));var r;r=i.status=="succeeded"?n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBody(i),n.RichApiMessageUtility.getResponseHeaders(i)):n.RichApiMessageUtility.buildResponseOnError(i.error.code,i.error.message);t(r)})})},t.SourceLibHeaderValue="officejs",t}();n.OfficeJsRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){var t;(function(t){function i(){return function(){"use strict";function wt(n){return typeof n=="function"||typeof n=="object"&&n!==null}function b(n){return typeof n=="function"}function bt(n){return typeof n=="object"&&n!==null}function kt(n){k=n}function dt(n){f=n}function ti(){var t=process.nextTick,n=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&n[1]==="0"&&n[2]==="10"&&(t=setImmediate),function(){t(c)}}function ii(){return function(){tt(c)}}function ri(){var n=0,i=new ut(c),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function ui(){var n=new MessageChannel;return n.port1.onmessage=c,function(){n.port2.postMessage(0)}}function ft(){return function(){setTimeout(c,1)}}function c(){for(var t,i,n=0;n=0?(n=n.substring(t+5,n.length),n<"14.14393"?!0:!1):!1}function i(){return typeof window=="undefined"&&typeof Promise=="function"?Promise:typeof window!="undefined"&&window.Promise?t()?n.PromiseImpl.Init():window.Promise:n.PromiseImpl.Init()}n.OfficePromise=i()}(t=n._Internal||(n._Internal={}));i=t.OfficePromise;n.Promise=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this._autoCleanupList={};this.m_context=n}return t.prototype.add=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._addCommon(n,!0)}):this._addCommon(n,!0)},t.prototype._autoAdd=function(n){this._addCommon(n,!1);this._autoCleanupList[n._objectPath.objectPathInfo.Id]=n},t.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(t,i){var r=this.m_context._autoCleanup&&!t[n.Constants.isTracked]&&t!==this.m_context._rootObject&&i&&!n.Utility.isNullOrEmptyString(i[n.Constants.referenceId]);r&&(this._autoCleanupList[t._objectPath.objectPathInfo.Id]=t,t[n.Constants.isTracked]=!0)},t.prototype._addCommon=function(t,i){if(t[n.Constants.isTracked]){i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id];return}var r=t[n.Constants.referenceId];n.Utility.isNullOrEmptyString(r)&&t._KeepReference&&(t._KeepReference(),n.ActionFactory.createInstantiateAction(this.m_context,t),i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id],t[n.Constants.isTracked]=!0)},t.prototype.remove=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._removeCommon(n)}):this._removeCommon(n)},t.prototype._removeCommon=function(t){var r=t[n.Constants.referenceId],i;n.Utility.isNullOrEmptyString(r)||(i=this.m_context._rootObject,i._RemoveReference&&i._RemoveReference(r),delete t[n.Constants.isTracked])},t.prototype._retrieveAndClearAutoCleanupList=function(){var n=this._autoCleanupList;return this._autoCleanupList={},n},t}();n.TrackedObjects=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.cannotRegisterEvent="CannotRegisterEvent",n.connectionFailureWithStatus="ConnectionFailureWithStatus",n.connectionFailureWithDetails="ConnectionFailureWithDetails",n.invalidObjectPath="InvalidObjectPath",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.invalidArgumentGeneric="InvalidArgumentGeneric",n.propertyNotLoaded="PropertyNotLoaded",n.runMustReturnPromise="RunMustReturnPromise",n.timeout="Timeout",n.propertyDoesNotExist="PropertyDoesNotExist",n.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",n.moreInfoInnerError="MoreInfoInnerError",n.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",n.valueNotLoaded="ValueNotLoaded",n.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage",n}();n.ResourceStrings=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.CannotRegisterEvent="The event handler cannot be registered.",n.ConnectionFailureWithStatus="The request failed with status code of {0}.",n.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}",n.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",n.InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',n.InvalidRequestContext="Cannot use the object across different request contexts.",n.PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",n.RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',n.Timeout="The operation has timed out.",n.ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.',n.invalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.",n}();n.ResourceStringValues=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.buildMessageArrayForIRequestExecutor=function(i,r,u,f){var o=JSON.stringify(u.Body),e;return n.Utility.log("Request:"),n.Utility.log(o),e={},e[n.Constants.sourceLibHeader]=f,t.buildRequestMessageSafeArray(i,r,"POST","ProcessQuery",e,o)},t.buildResponseOnSuccess=function(n,t){var i={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return i.Body=JSON.parse(n),i.Headers=t,i},t.buildResponseOnError=function(i,r){var u={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return u.ErrorCode=n.ErrorCodes.generalException,u.ErrorMessage=r,i==t.OfficeJsErrorCode_ooeNoCapability?u.ErrorCode=n.ErrorCodes.accessDenied:i==t.OfficeJsErrorCode_ooeActivityLimitReached?u.ErrorCode=n.ErrorCodes.activityLimitReached:i==t.OfficeJsErrorCode_ooeInvalidOrTimedOutSession&&(u.ErrorCode=n.ErrorCodes.invalidOrTimedOutSession,u.ErrorMessage=n.Utility._getResourceString(n.ResourceStrings.invalidOrTimedOutSessionMessage)),u},t.buildHttpResponseFromOfficeJsError=function(i,r){var f=500,u={};return u.error={},u.error.code=n.ErrorCodes.generalException,u.error.message=r,i===t.OfficeJsErrorCode_ooeNoCapability?(f=403,u.error.code=n.ErrorCodes.accessDenied):i===t.OfficeJsErrorCode_ooeActivityLimitReached&&(f=429,u.error.code=n.ErrorCodes.activityLimitReached),{statusCode:f,headers:{},body:JSON.stringify(u)}},t.buildRequestMessageSafeArray=function(n,t,i,r,u,f){var e=[],o;if(u)for(o in u)e.push(o),e.push(u[o]);var s=0,h="",c="",l="";return[n,i,r,e,f,s,t,h,c,l]},t.getResponseBody=function(n){return t.getResponseBodyFromSafeArray(n.value.data)},t.getResponseHeaders=function(n){return t.getResponseHeadersFromSafeArray(n.value.data)},t.getResponseBodyFromSafeArray=function(n){var t=n[2],i;return typeof t=="string"?t:(i=t,i.join(""))},t.getResponseHeadersFromSafeArray=function(n){var i=n[1],r,t;if(!i)return null;for(r={},t=0;t0&&f.push(i);return f},t.throwError=function(i,r,u){throw new n._Internal.RuntimeError({code:i,message:t._getResourceString(i,r),debugInfo:u?{errorLocation:u}:undefined});},t.createRuntimeError=function(t,i,r){return new n._Internal.RuntimeError({code:t,message:i,debugInfo:{errorLocation:r}})},t._getResourceString=function(i,r){var u,e,f,o;return typeof window!="undefined"&&window.Strings&&window.Strings.OfficeOM&&(e="L_"+i,f=window.Strings.OfficeOM[e],f&&(u=f)),u||(u=n.ResourceStringValues[i]),u||(u=i),t.isNullOrUndefined(r)||(Array.isArray(r)?(o=r,u=t._formatString(u,o)):u=u.replace("{0}",r)),u},t._formatString=function(t,i){return t.replace(/\{\d\}/g,function(t){var r=parseInt(t.substr(1,t.length-2));if(r0?".":"")+i;break;case 3:i=t.normalizeName(n.objectPathInfo.Name)+"()"+(i.length>0?".":"")+i;break;case 4:i=t.normalizeName(n.objectPathInfo.Name)+(i.length>0?".":"")+i;break;case 5:i="getItem()"+(i.length>0?".":"")+i;break;case 6:i="_reference()"+(i.length>0?".":"")+i;break}n=n.parentObjectPath}return i},t._createPromiseFromResult=function(t){return new n._Internal.OfficePromise(function(n,i){n(t)})},t._createTimeoutPromise=function(t){return new n._Internal.OfficePromise(function(n,i){setTimeout(function(){n(null)},t)})},t.promisify=function(t){return new n._Internal.OfficePromise(function(n,i){var r=function(t){t.status=="failed"?i(t.error):n(t.value)};t(r)})},t._addActionResultHandler=function(n,t,i){n.context._pendingRequest.addActionResultHandler(t,i)},t._handleNavigationPropertyResults=function(n,i,r){for(var u=0;u0},t._getLocalDocumentUrlPrefixLength=function(n){for(var i=["http://document.localhost","https://document.localhost","//document.localhost"],r=n.toLowerCase().trim(),t=0;t0))for(s=i.url.substr(f+1),e=s.split("&"),u=0;u0&&(f=i.substr(0,u),e=i.substr(u+1),f=t.trim(f),e=t.trim(e),s[f.toUpperCase()]=e));return s},t._parseErrorResponse=function(i){var r=null,f,e,u;if(!t.isNullOrEmptyString(i.body)){f=t.trim(i.body);try{r=JSON.parse(f)}catch(o){t.log("Error when parse "+f)}}return!t.isNullOrUndefined(r)&&typeof r=="object"&&r.error?(u=r.error.code,e=t._getResourceString(n.ResourceStrings.connectionFailureWithDetails,[i.statusCode.toString(),r.error.code,r.error.message])):e=t._getResourceString(n.ResourceStrings.connectionFailureWithStatus,i.statusCode.toString()),t.isNullOrEmptyString(u)&&(u=n.ErrorCodes.connectionFailure),{errorCode:u,errorMessage:e}},t._copyHeaders=function(n,t){if(n&&t)for(var i in n)t[i]=n[i]},t._logEnabled=!1,t._synchronousCleanup=!1,t.s_underscoreCharCode="_".charCodeAt(0),t}();n.Utility=t}(OfficeExtension||(OfficeExtension={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var e=OfficeExtension.ObjectPathFactory.createPropertyObjectPath,f=OfficeExtension.ObjectPathFactory.createMethodObjectPath,l=OfficeExtension.ObjectPathFactory.createIndexerObjectPath,yi=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath,pi=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer,wi=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt,a=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt,u=OfficeExtension.ActionFactory.createMethodAction,v=OfficeExtension.ActionFactory.createSetPropertyAction,r=OfficeExtension.Utility.isNullOrUndefined,t=OfficeExtension.Utility.isUndefined,i=OfficeExtension.Utility.throwIfNotLoaded,o=OfficeExtension.Utility.load,s=OfficeExtension.Utility.fixObjectPathIfNecessary,c=OfficeExtension.Utility._addActionResultHandler,h=OfficeExtension.Utility._handleNavigationPropertyResults,bi=OfficeExtension.Utility.adjustToDateTime,ui=function(l){function a(){l.apply(this,arguments)}return __extends(a,l),Object.defineProperty(a.prototype,"_className",{get:function(){return"Application"},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"notebooks",{get:function(){return this.m_notebooks||(this.m_notebooks=new n.NotebookCollection(this.context,e(this.context,this,"Notebooks",!0,!1))),this.m_notebooks},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"_platform",{get:function(){return i("_platform",this.m__platform,"Application",this._isNull),this.m__platform},enumerable:!0,configurable:!0}),a.prototype.getActiveNotebook=function(){return new n.Notebook(this.context,f(this.context,this,"GetActiveNotebook",1,[],!1,!1,null))},a.prototype.getActiveNotebookOrNull=function(){return new n.Notebook(this.context,f(this.context,this,"GetActiveNotebookOrNull",1,[],!1,!1,null))},a.prototype.getActiveOutline=function(){return new n.Outline(this.context,f(this.context,this,"GetActiveOutline",1,[],!1,!1,null))},a.prototype.getActiveOutlineOrNull=function(){return new n.Outline(this.context,f(this.context,this,"GetActiveOutlineOrNull",1,[],!1,!1,null))},a.prototype.getActivePage=function(){return new n.Page(this.context,f(this.context,this,"GetActivePage",1,[],!1,!1,null))},a.prototype.getActivePageOrNull=function(){return new n.Page(this.context,f(this.context,this,"GetActivePageOrNull",1,[],!1,!1,null))},a.prototype.getActiveParagraph=function(){return new n.Paragraph(this.context,f(this.context,this,"GetActiveParagraph",1,[],!1,!1,null))},a.prototype.getActiveParagraphOrNull=function(){return new n.Paragraph(this.context,f(this.context,this,"GetActiveParagraphOrNull",1,[],!1,!1,null))},a.prototype.getActiveSection=function(){return new n.Section(this.context,f(this.context,this,"GetActiveSection",1,[],!1,!1,null))},a.prototype.getActiveSectionOrNull=function(){return new n.Section(this.context,f(this.context,this,"GetActiveSectionOrNull",1,[],!1,!1,null))},a.prototype.navigateToPage=function(n){u(this.context,this,"NavigateToPage",1,[n])},a.prototype.navigateToPageWithClientUrl=function(t){return new n.Page(this.context,f(this.context,this,"NavigateToPageWithClientUrl",1,[t],!1,!1,null))},a.prototype._GetAccountInfo=function(){var t=u(this.context,this,"_GetAccountInfo",1,[]),n=new OfficeExtension.ClientResult;return c(this,t,n),n},a.prototype._GetObjectByReferenceId=function(n){var i=u(this.context,this,"_GetObjectByReferenceId",1,[n]),t=new OfficeExtension.ClientResult;return c(this,i,t),t},a.prototype._GetObjectTypeNameByReferenceId=function(n){var i=u(this.context,this,"_GetObjectTypeNameByReferenceId",1,[n]),t=new OfficeExtension.ClientResult;return c(this,i,t),t},a.prototype._GetServiceTokenByUrl=function(n){var i=u(this.context,this,"_GetServiceTokenByUrl",1,[n]),t=new OfficeExtension.ClientResult;return c(this,i,t),t},a.prototype._GetServiceTokens=function(n){var i=u(this.context,this,"_GetServiceTokens",1,[n]),t=new OfficeExtension.ClientResult;return c(this,i,t),t},a.prototype._GetServiceTokensExt=function(n,t){var r=u(this.context,this,"_GetServiceTokensExt",1,[n,t]),i=new OfficeExtension.ClientResult;return c(this,r,i),i},a.prototype._GetServiceUrl=function(n){var i=u(this.context,this,"_GetServiceUrl",1,[n]),t=new OfficeExtension.ClientResult;return c(this,i,t),t},a.prototype._RemoveAllReferences=function(){u(this.context,this,"_RemoveAllReferences",1,[])},a.prototype._RemoveReference=function(n){u(this.context,this,"_RemoveReference",1,[n])},a.prototype._SendDataToLearningTools=function(n){var i=u(this.context,this,"_SendDataToLearningTools",0,[n]),t=new OfficeExtension.ClientResult;return c(this,i,t),t},a.prototype._handleResult=function(n){if(l.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i._platform)||(this.m__platform=i._platform);h(this,i,["notebooks","Notebooks"])}},a.prototype.load=function(n){return o(this,n),this},a.prototype.toJSON=function(){return{}},a}(OfficeExtension.ClientObject),y,p,w,b,k,d,g,nt,tt,it,rt,ut,ft,et,ot,st,ht,ct,lt,at,vt,yt,pt,wt,bt,kt,dt,gt,ni,ti,ii,ri,fi,ei,oi,si,hi,ci,li,ai,vi;n.Application=ui;y=function(f){function c(){f.apply(this,arguments)}return __extends(c,f),Object.defineProperty(c.prototype,"_className",{get:function(){return"InkAnalysis"},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"page",{get:function(){return this.m_page||(this.m_page=new n.Page(this.context,e(this.context,this,"Page",!1,!1))),this.m_page},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"paragraphs",{get:function(){return this.m_paragraphs||(this.m_paragraphs=new n.InkAnalysisParagraphCollection(this.context,e(this.context,this,"Paragraphs",!0,!1))),this.m_paragraphs},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"id",{get:function(){return i("id",this.m_id,"InkAnalysis",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"InkAnalysis",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),c.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",1,[])},c.prototype._handleResult=function(n){if(f.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i.Id)||(this.m_id=i.Id);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);h(this,i,["page","Page","paragraphs","Paragraphs"])}},c.prototype.load=function(n){return o(this,n),this},c.prototype._handleIdResult=function(n){(f.prototype._handleIdResult.call(this,n),r(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},c.prototype.track=function(){return this.context.trackedObjects.add(this),this},c.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},c.prototype.toJSON=function(){return{id:this.m_id}},c}(OfficeExtension.ClientObject);n.InkAnalysis=y;p=function(f){function c(){f.apply(this,arguments)}return __extends(c,f),Object.defineProperty(c.prototype,"_className",{get:function(){return"InkAnalysisParagraph"},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"inkAnalysis",{get:function(){return this.m_inkAnalysis||(this.m_inkAnalysis=new n.InkAnalysis(this.context,e(this.context,this,"InkAnalysis",!1,!1))),this.m_inkAnalysis},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"lines",{get:function(){return this.m_lines||(this.m_lines=new n.InkAnalysisLineCollection(this.context,e(this.context,this,"Lines",!0,!1))),this.m_lines},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"id",{get:function(){return i("id",this.m_id,"InkAnalysisParagraph",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"InkAnalysisParagraph",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),c.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",1,[])},c.prototype._handleResult=function(n){if(f.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i.Id)||(this.m_id=i.Id);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);h(this,i,["inkAnalysis","InkAnalysis","lines","Lines"])}},c.prototype.load=function(n){return o(this,n),this},c.prototype._handleIdResult=function(n){(f.prototype._handleIdResult.call(this,n),r(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},c.prototype.track=function(){return this.context.trackedObjects.add(this),this},c.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},c.prototype.toJSON=function(){return{id:this.m_id}},c}(OfficeExtension.ClientObject);n.InkAnalysisParagraph=p;w=function(e){function h(){e.apply(this,arguments)}return __extends(h,e),Object.defineProperty(h.prototype,"_className",{get:function(){return"InkAnalysisParagraphCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,"InkAnalysisParagraphCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"count",{get:function(){return i("count",this.m_count,"InkAnalysisParagraphCollection",this._isNull),this.m_count},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"InkAnalysisParagraphCollection",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),h.prototype.getItem=function(t){return new n.InkAnalysisParagraph(this.context,l(this.context,this,[t]))},h.prototype.getItemAt=function(t){return new n.InkAnalysisParagraph(this.context,f(this.context,this,"GetItemAt",1,[t],!1,!1,null))},h.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",1,[])},h.prototype._handleResult=function(i){var u,o,f,h;if((e.prototype._handleResult.call(this,i),!r(i))&&(u=i,s(this,u),t(u.Count)||(this.m_count=u.Count),t(u._ReferenceId)||(this.m__ReferenceId=u._ReferenceId),!r(u[OfficeExtension.Constants.items])))for(this.m__items=[],o=u[OfficeExtension.Constants.items],f=0;f0?i.push(t):t.tabIndex===0&&r.push(t):r.push(t);return i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;return r===0&&(r=i.indexOf(n)-i.indexOf(t)),r}),[].concat(i,r)}var o="focus",s="on",k="configurable",d="writable",h="enumerable",u="",c="undefined",t=!1,i=!0,l=2147483647,n=null,r=-1,a=r,g="&_xdm_Info=",nt="&_serializer_version=",tt="_xdm_",ft="_serializer_version=",v="#",it="&",f="class",y={},et=3e4,p=n,w=n,e=(new Date).getTime();return{set_entropy:function(n){var t,r,i;if(typeof n=="string")for(t=0;t6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(r)===OSF.DDA.SettingsManager.DataJSONSuffix&&(i=new Date(parseInt(t.slice(5,r))),i)?i:t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,i);f[u]=t}catch(e){}}return f},loadScript:function(r,u,f){var s,e,o,h,c;r&&u&&(s=window.document,e=y[r],e?e.loaded?u():e.pendingCallbacks.push(u):(o=s.createElement("script"),o.type="text/javascript",e={loaded:t,pendingCallbacks:[u],timer:n},y[r]=e,h=function(){var r,t,u;for(e.timer!=n&&(clearTimeout(e.timer),delete e.timer),e.loaded=i,r=e.pendingCallbacks.length,t=0;t1?l[l.length-1]:n,s,h,c,a;return u&&o!=n&&(o.indexOf(it)>=0&&(o=o.split(it)[0]),o=decodeURIComponent(o)),s=b(),!f&&s&&(h=window.name.indexOf(i),h>r&&(c=window.name.indexOf(";",h),c==r&&(c=window.name.length),a=window.name.substring(h,c),o?s.setItem(a,o):o=s.getItem(a))),o},getConversationId:function(){var i=window.location.search,t=n,r;return i&&(r=i.indexOf("&"),t=r>0?i.substring(1,r):i.substr(1),t&&t.charAt(t.length-1)==="="&&(t=t.substring(0,t.length-1),t&&(t=decodeURIComponent(t)))),t},getInfoItems:function(n){var t=n.split("$");return typeof t[1]==c&&(t=n.split("|")),typeof t[1]==c&&(t=n.split("%7C")),t},getXdmFieldValue:function(n,t){var r=u,f=OSF.OUtil.parseXdmInfo(t),i;if(f&&(i=OSF.OUtil.getInfoItems(f),i!=undefined&&i.length>=3))switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]),f;if(u)throw u;for(f in r)if(u=Function._validateParameter(n[f],r[f],f),u)throw u;},writeProfilerMark:function(n){window.msWriteProfilerMark&&(window.msWriteProfilerMark(n),OsfMsAjaxFactory.msAjaxDebug.trace(n))},outputDebug:function(n){typeof OsfMsAjaxFactory!==c&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){var e,f;r=r||{};for(e in u)f=u[e],r[f]==undefined&&(r[f]=i);return Object.defineProperty(n,t,r),n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[h])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[h])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[d,h,k])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[d,h,k])},finalizeProperties:function(n,r){var e,u;r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8,e=o&255,i[t++]=r>>2,i[t++]=(r&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63,isNaN(o)||(r=o>>8,f=h&255,e=h>>8,i[t++]=r>>2,i[t++]=(r&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63),isNaN(o)?i[t-1]=64:isNaN(h)&&(i[t-2]=64,i[t-1]=64),c=0;c0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){var u,i,f,r;if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(u=[],i=0;in)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=ut(u),e=f?u.length-1:0,u.length===0)return n;while(!h&&e>=0&&en)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=ut(u),l=y(u,f),s=v(u.length,l,e),s<0)return n;while(!c&&s>=0&&s0;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[r%16],r=Math.floor(r/16);for(;t<32;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[Math.floor(Math.random()*16)];return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3};OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",Reserved:"reserved",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidOpenBrowserWindow:102,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];return i?(i.name||(i.name=n[this.errorCodes.ooeInternalError].name),i.message||(i.message=n[this.errorCodes.ooeInternalError].message)):i=n[this.errorCodes.ooeInternalError],i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:t.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:t.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:t.L_SSOConnectionLostError,message:t.L_SSOConnectionLostErrorMessage}}}}(),function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}(),r,i,h,u,c,l,f,a,e,v,y,p,w,b,o,k,d,g,s,nt,tt,it,rt;n.RequirementVersion=ut;r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){var f,u,e,i,r;if(n==undefined)return!1;if(t==undefined&&(t=0),f=this._setMap,u=f._sets,u.hasOwnProperty(n.toLowerCase())){e=u[n.toLowerCase()];try{if((i=this._getVersion(e),t=t+"",r=this._getVersion(t),i.major>0&&i.major>r.major)||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),i=0,r=0;if(t.length<2&&isNaN(Number(n)))throw u;else if(i=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(i)||isNaN(r))throw u;return{minor:r,major:i}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;h=function(n){function i(){n.call(this,{dialogapi:t})}return __extends(i,n),i}(i);n.DefaultDialogSetRequirement=h;u=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelClientDefaultSetRequirement=u;c=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(u);n.ExcelClientV1DefaultSetRequirement=c;l=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookClientDefaultSetRequirement=l;f=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return __extends(i,n),i}(i);n.WordClientDefaultSetRequirement=f;a=function(n){function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return __extends(i,n),i}(f);n.WordClientV1DefaultSetRequirement=a;e=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointClientDefaultSetRequirement=e;v=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(e);n.PowerpointClientV1DefaultSetRequirement=v;y=function(n){function i(){n.call(this,{selection:t,textcoercion:t})}return __extends(i,n),i}(i);n.ProjectClientDefaultSetRequirement=y;p=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return __extends(i,n),i}(i);n.ExcelWebDefaultSetRequirement=p;w=function(n){function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordWebDefaultSetRequirement=w;b=function(n){function i(){n.call(this,{activeview:t,settings:t})}return __extends(i,n),i}(i);n.PowerpointWebDefaultSetRequirement=b;o=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookWebDefaultSetRequirement=o;k=function(n){function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.SwayWebDefaultSetRequirement=k;d=function(n){function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return __extends(i,n),i}(i);n.AccessWebDefaultSetRequirement=d;g=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelIOSDefaultSetRequirement=g;s=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordIOSDefaultSetRequirement=s;nt=function(n){function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return __extends(t,n),t}(s);n.WordIOSV1DefaultSetRequirement=nt;tt=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointIOSDefaultSetRequirement=tt;it=function(n){function i(){n.call(this,{mailbox:t})}return __extends(i,n),i}(i);n.OutlookIOSDefaultSetRequirement=it;rt=function(){function n(){}var t="undefined";return n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},n.getDefaultRequirementMatrix=function(u){var f,e,s,o;return this.initializeDefaultSetMatrix(),f=undefined,e=u.get_requirementMatrix(),e!=undefined&&e.length>0&&typeof JSON!==t?(s=JSON.parse(u.get_requirementMatrix().toLowerCase()),f=new r(new i(s))):(o=n.getClientFullVersionString(u),f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[o]!=undefined?new r(n.DefaultSetArrayMatrix[o]):new r(new i({}))),f},n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix(),e;return f!=undefined&&f.length>0&&typeof JSON!==t?(e=JSON.parse(n.get_requirementMatrix().toLowerCase()),u=new r(new i(e))):u=new r(new h),u},n.getClientFullVersionString=function(n){var i=n.get_appMinorVersion(),u="",r="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;return f&&n.get_appVersion()==1?r=t==4096&&i>=15?"16.00.01":"16.00":n.get_appName()==64?r=n.get_appVersion():(u=i<10?"0"+i:""+i,r=n.get_appVersion()+"."+u),n.get_appName()+"-"+r},n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new c;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new v;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new l;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new w;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new b;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new g;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new k;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new nt;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new tt;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new it},n.Excel_RCLIENT_1600="1-16.00",n.Excel_RCLIENT_1601="1-16.01",n.Word_RCLIENT_1600="2-16.00",n.Word_RCLIENT_1601="2-16.01",n.PowerPoint_RCLIENT_1600="4-16.00",n.PowerPoint_RCLIENT_1601="4-16.01",n.Outlook_RCLIENT_1600="8-16.00",n.Excel_WAC_1600="16-16.00",n.Word_WAC_1600="32-16.00",n.Outlook_WAC_1600="64-16.00",n.Outlook_WAC_1601="64-16.01",n.Project_RCLIENT_1600="128-16.00",n.Access_WAC_1600="256-16.00",n.PowerPoint_WAC_1600="512-16.00",n.Excel_IOS_1600="1024-16.00",n.SWAY_WAC_1600="2048-16.00",n.Word_IOS_1600="4096-16.00",n.Word_IOS_16001="4096-16.00.01",n.PowerPoint_IOS_1600="8192-16.00",n.Outlook_IOS_1600="65536-16.00",n.DefaultSetArrayMatrix={},n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))}(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}return n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n},n.getInstance=function(){return n.hostObj===undefined&&(n.hostObj=new n),n.hostObj},n.prototype.getPlatform=function(){var n=this,t;return n.hostInfo.hostPlatform&&(t=n.hostInfo.hostPlatform.toLowerCase(),n.platformRemappings[t])?n.platformRemappings[t]:null},n.prototype.getHost=function(){var n=this,t;if(n.hostInfo.hostType){if(t=n.hostInfo.hostType.toLowerCase(),n.camelCaseMappings[t])return n.camelCaseMappings[t];if(t=n.capitalizeFirstLetter(n.hostInfo.hostType),Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null},n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null},n}();n.Host=t})(t=n.HostName||(n.HostName={}))}(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){n||(window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,n=!0)},disableShortcut:function(){n&&(t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window),n=!1)}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i,r,o,u,f,e;if(n&&typeof n=="string"&&(r=n.indexOf("#"),r!=-1)){o=n.substring(0,r);u=n.substring(r+1);switch(o){case"binding":case"bindings":u&&(i=new OSF.DDA.BindingPromise(u))}}if(i)return i.onFail=t,i;else if(t)if(f=typeof t,f=="function")e={},e[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(e,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext));else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f);};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this,s,e;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.auth&&OSF.OUtil.defineEnumerableProperty(f,"auth",{value:n.auth});n.get_isDialog()?(e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e})):(t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t}),r&&(s=r.displayName||"appOM",delete r.displayName,OSF.OUtil.defineEnumerableProperty(f,s,{value:r})),u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}}),e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e}))};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this,u;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;return OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext()),n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,e=n.length,o=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){var u,i,r;for(u in n){if(i=n[u],r=t[u],i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw o();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw o();}};f.extractRequiredArguments=function(t,i,r){var f,u,h,s,c,l;if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(c=n.length-1;c>=s;c--){l=n[c];switch(typeof l){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=l;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}if(f=o.fillOptions(f,i,r,u),e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;return o.verifyArguments(t,f),f}var h="function",s=n.length,o=new OSF.DDA.ApiMethodCall(n,t,i,f,e);this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),u=c(n,r,t,i);return o.constructCallArgs(r,u,t,i)};this.processResponse=function(n,t,i,f){return n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n)};this.getCallArgs=function(n){for(var t,u,r,i=n.length-1;i>=s;i--){r=n[i];switch(typeof r){case"object":t=r;break;case h:u=r}}return t=t||{},u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u),t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],i=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],t,i,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback],u,r;f&&(u={},u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?u[OSF.DDA.AsyncResultEnum.Properties.Value]=i:(r={},i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i),f(new OSF.DDA.AsyncResult(u,r)))};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.SyncMethodNames[t]=i};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){function o(n,i,r,u){var o,c,s,h;if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(s=n.length-1;s>=e;s--){h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}return o=f.fillOptions(o,i,r,u),f.verifyArguments(t,o),o}var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),u=o(n,r,t,i);return f.constructCallArgs(r,u,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){function e(i,f){var a=i?{}:undefined,s,h,o,v,c,l;for(s in i){if(h=i[s],OSF.DDA.ListType.isListType(s)){o=[];for(v in h)o.push(e(h[v],f))}else OSF.OUtil.listContainsKey(r,s)?o=r[s][f](h):f==u&&n.preserveNesting(s)?o=e(h,f):(c=t[s],c?(l=c[f],l&&(o=l[h],o===undefined&&(o=h))):o=h);a[s]=o}return a}function l(i,r){var e,u,h,s;for(u in r)h=n.isComplexType(u)?l(i,t[u][o]):i[u],h!=undefined&&(e||(e={}),s=r[u],s==f&&(s=u),e[s]=n.pack(u,h));return e}function s(i,r,e){var o,a,h,l,p,v,y;e||(e={});for(o in r){if(a=r[o],a==f)h=i;else if(a==c){e[o]=i.toArray();continue}else h=i[a];if(h===null||h===undefined)e[o]=undefined;else if(h=n.unpack(o,h),n.isComplexType(o))l=t[o][u],n.preserveNesting(o)?e[o]=s(h,l):s(h,l,e);else if(OSF.DDA.ListType.isListType(o)){l={};p=OSF.DDA.ListType.getDescriptor(o);l[p]=f;v=new Array(h.length);for(y in h)v[y]=s(h[y],l);e[o]=v}else e[o]=h}return e}function a(n,i,r){var f=t[n][r],u,o,c;return r=="toHost"?(o=e(i,r),u=l(o,f)):r==h&&(c=s(i,f),u=e(c,r)),u}var h="fromHost",i=this,o="toHost",u=h,c="sourceData",f="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];t||(t={});i.addMapping=function(n,i){var e,h,c,l,r,s,a,v;if(i.map){e=i.map;h={};for(c in e)l=e[c],l==f&&(l=c),h[l]=c}else e=i.toHost,h=i.fromHost;if(r=t[n],r){s=r[o];for(a in s)e[a]=s[a];s=r[u];for(v in s)h[v]=s[v]}else r=t[n]={};r[o]=e;r[u]=h};i.toHost=function(n,t){return a(n,t,o)};i.fromHost=function(n,t){return a(n,t,u)};i.self=f;i.sourceData=c;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){return this.isDynamicType(n)?t[n].toHost(i):i};i.unpack=function(n,i){return this.isDynamicType(n)?t[n].fromHost(i):i}};OSF.DDA.getDecoratedParameterMap=function(n,t){function r(n){var i=null,r,t;if(n)for(i={},r=n.length,t=0;t0){for(r=[],i=0;i=s)break;if(f=Function._validateParameter(n[e],o,h),f)return f.popStackFrame(),f}return t}),Function._validateParameterCount||(Function._validateParameterCount=function(n,r,u){var f,s,e=r.length,h=n.length,c,l,a;if(he)for(s=i,f=0;f0&&t.push(u)}}catch(s){}return t}var i=[],t={};t[Microsoft.Office.WebExtension.Parameters.Data]=function(){var t=0,i=1;return{toHost:function(n){if(OSF.DDA.TableDataProperties&&typeof n!="string"&&n[OSF.DDA.TableDataProperties.TableRows]!==undefined){var r=[];r[t]=n[OSF.DDA.TableDataProperties.TableRows];r[i]=n[OSF.DDA.TableDataProperties.TableHeaders];n=r}return n},fromHost:function(r){var f,e,u;return r.toArray?(e=r.dimensions(),e===2?f=n(r):(u=r.toArray(),u.length===2&&(u[0]!=null&&u[0].toArray||u[1]!=null&&u[1].toArray)?(f={},f[OSF.DDA.TableDataProperties.TableRows]=n(u[t]),f[OSF.DDA.TableDataProperties.TableHeaders]=n(u[i])):f=u)):f=r,f}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,i,t);this.unpack=function(n,i){var r,u;return this.isComplexType(n)||OSF.DDA.ListType.isListType(n)?(u=(i||typeof i=="unknown")&&i.toArray,r=u?i.toArray():i||{}):r=this.isDynamicType(n)?t[n].fromHost(i):i,r}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(n){function t(n){var i=n,f,r,u;if(OSF.OUtil.isArray(n))for(f=i.length,r=0;r2)for(r=[],f=1;f40)&&(n=OSF.OUtil.Guid.generateNewGuid(),t.setValue(t.clientIDKey,n)),n},n.prototype.saveLog=function(n,t){var i=this,u=i.getValue(i.logIdSetKey);u=(u&&u.length>0?u+";":r)+n;i.setValue(i.logIdSetKey,u);i.setValue(n,t)},n.prototype.enumerateLog=function(n,t){var i=this,e=i.getValue(i.logIdSetKey),u,o,r,f;if(e){u=e.split(";");for(o in u)r=u[o],f=i.getValue(r),f&&(n&&n(r,f),t&&i.remove(r));t&&i.remove(i.logIdSetKey)}},n.prototype.getValue=function(n){var t=OSF.OUtil.getLocalStorage(),i=r;return t&&(i=t.getItem(n)),i},n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)},n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}},n}(),o=function(){function t(){}return t.prototype.LogData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(t)}catch(i){}},t.prototype.LogRawData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(t))}catch(i){}},t}();n.initialize=y;n.onAppActivated=p;n.onScriptDone=w;n.onCallDone=b;n.onMethodDone=k;n.onPropertyDone=d;n.onEventDone=g;n.onRegisterDone=nt;n.onAppClosed=tt;n.setOsfControlAppCorrelationId=it;n.doAppInitializationLogging=l;n.logAppCommonMessage=rt;n.logAppException=ut;OSF.AppTelemetry=n}(OSFAppTelemetry||(OSFAppTelemetry={}));Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(n){var i=this,r,t,u;i._eventHandlers={};i._objectEventHandlers={};i._queuedEventsArgs={};for(r in n)t=n[r],u=t=="objectDeleted"||t=="objectSelectionChanged"||t=="objectDataChanged"||t=="contentControlAdded",u?i._objectEventHandlers[t]={}:i._eventHandlers[t]=[],i._queuedEventsArgs[t]=[]};OSF.EventDispatch.prototype={getSupportedEvents:function(){var n=[];for(var t in this._eventHandlers)n.push(t);for(t in this._objectEventHandlers)n.push(t);return n},supportsEvent:function(n){for(var t in this._eventHandlers)if(n==t)return!0;for(t in this._objectEventHandlers)if(n==t)return!0;return!1},hasEventHandler:function(n,t){var i=this._eventHandlers[n],r;if(i&&i.length>0)for(r in i)if(i[r]===t)return!0;return!1},hasObjectEventHandler:function(n,t,i){var f=this._objectEventHandlers[n],r,u;if(f!=null)for(r=f[t],u=0;r!=null&&u0)for(r=0;r0?(this._eventHandlers[n]=[],!0):!1},clearObjectEventHandlers:function(n,t){return this._objectEventHandlers[n]!=null&&this._objectEventHandlers[n][t]!=null?(this._objectEventHandlers[n][t]=[],!0):!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},getObjectEventHandlerCount:function(n,t){return this._objectEventHandlers[n]==null||this._objectEventHandlers[n][t]==null?0:this._objectEventHandlers[n][t].length},fireEvent:function(n){var t,i,r;if(n.type==undefined)return!1;if(t=n.type,t&&this._eventHandlers[t]){i=this._eventHandlers[t];for(r in i)i[r](n);return!0}else return!1},fireObjectEvent:function(n,t){var i,f,r,u;if(t.type==undefined)return!1;if(i=t.type,i&&this._objectEventHandlers[i]&&(f=this._objectEventHandlers[i],r=f[n],r!=null)){for(u=0;u0)){for(r=t[0];i.length>0;)u=i.shift(),r(u);return!0}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var f="outlook",e="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(n,i[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:r=new OSF.DDA.RichApiMessageEventArgs(n,i);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i),t.initialize(r.initialData),OSF._OfficeAppFactory.getHostInfo().hostPlatform=="win32"&&t.setCurrentItemNumber(r.itemNumber.itemNumber);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkRecipientsChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var i=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),t=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];t(arguments,i,n)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(n){var i=OSF.DDA.SyncMethodNames.MessageParent.displayName,t=this,r;t[i]||OSF.OUtil.defineEnumerableProperty(t,i,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return n(arguments,t)}});r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;t[r]||typeof OSF.DialogParentMessageEventDispatch=="undefined"||OSF.DDA.DispIdHost.addEventSupport(t,OSF.DialogParentMessageEventDispatch,n);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(n){n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:n[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels,value:{types:["boolean"],defaultValue:!1}}],privateStateCallbacks:[],onSucceeded:function(n){var f=n[Microsoft.Office.WebExtension.Parameters.Id],i=n[Microsoft.Office.WebExtension.Parameters.Data],t=new OSF.DialogHandler,e=OSF.DDA.AsyncMethodNames.CloseAsync.displayName,r,u;return OSF.OUtil.defineEnumerableProperty(t,e,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];n(arguments,f,i,t)}}),r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName,OSF.OUtil.defineEnumerableProperty(t,r,{value:function(){var r=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],n=r.verifyAndExtractCall(arguments,t,i),u=n[Microsoft.Office.WebExtension.Parameters.EventType],f=n[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(u,f)}}),u=OSF.DDA.SyncMethodNames.SendMessage.displayName,OSF.OUtil.defineEnumerableProperty(t,u,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return n(arguments,i,t)}}),t},checkCallArgs:function(n){return n[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Width]=1),!n[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&n[Microsoft.Office.WebExtension.Parameters.Width]>100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99),n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1),!n[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99),n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(n){try{n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,n);OSF.ClientHostController.openDialog(n.dispId,n.targetId,function(t,i){n.onEvent&&n.onEvent(i);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(n){n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,n);try{OSF.ClientHostController.closeDialog(n.dispId,n.targetId,t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.messageParent=function(n){try{n.onCalling&&n.onCalling();var i=(new Date).getTime(),t=OSF.ClientHostController.messageParent(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs((new Date).getTime()-i),t),t}catch(r){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(r)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.sendMessage=function(n){try{n.onCalling&&n.onCalling();var r=(new Date).getTime(),t=OSF.ClientHostController.sendMessage(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),t}catch(i){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(i)}};Microsoft.Office.WebExtension.FileType={Text:"text",Compressed:"compressed",Pdf:"pdf"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FileProperties:"FileProperties",FileSliceProperties:"FileSliceProperties"});OSF.DDA.FileProperties={Handle:"FileHandle",FileSize:"FileSize",SliceSize:Microsoft.Office.WebExtension.Parameters.SliceSize};OSF.DDA.File=function(n,t,i){var r,u;OSF.OUtil.defineEnumerableProperties(this,{size:{value:t},sliceCount:{value:Math.ceil(t/i)}});r={};r[OSF.DDA.FileProperties.Handle]=n;r[OSF.DDA.FileProperties.SliceSize]=i;u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.GetDocumentCopyChunkAsync,u.ReleaseDocumentCopyAsync],r)};OSF.DDA.FileSliceOffset="fileSliceoffset";OSF.DDA.AsyncMethodNames.addNames({GetDocumentCopyAsync:"getFileAsync",GetDocumentCopyChunkAsync:"getSliceAsync",ReleaseDocumentCopyAsync:"closeAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FileType,"enum":Microsoft.Office.WebExtension.FileType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:{types:["number"],defaultValue:4194304}}],checkCallArgs:function(n){var t=n[Microsoft.Office.WebExtension.Parameters.SliceSize];if(t<=0||t>4194304)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return n},onSucceeded:function(n,t,i){return new OSF.DDA.File(n[OSF.DDA.FileProperties.Handle],n[OSF.DDA.FileProperties.FileSize],i[Microsoft.Office.WebExtension.Parameters.SliceSize])}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(n,t){return t[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(r<0||r>=t.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;return n[OSF.DDA.FileSliceOffset]=parseInt((r*i[OSF.DDA.FileProperties.SliceSize]).toString()),n},onSucceeded:function(n,t,i){var r={};return OSF.OUtil.defineEnumerableProperties(r,{data:{value:n[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:i[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:n[OSF.DDA.FileProperties.SliceSize]}}),r}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FileType,{Text:"text",Pdf:"pdf"});OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(n){OSF.OUtil.defineEnumerableProperties(this,{url:{value:n[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(n){return new Microsoft.Office.WebExtension.FileProperties(n)}});Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"};Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"};Microsoft.Office.WebExtension.Index={First:"first",Last:"last",Next:"next",Previous:"previous"};OSF.DDA.AsyncMethodNames.addNames({GoToByIdAsync:"goToByIdAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GoToByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string","number"]},{name:Microsoft.Office.WebExtension.Parameters.GoToType,"enum":Microsoft.Office.WebExtension.GoToType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:{"enum":Microsoft.Office.WebExtension.SelectionMode,defaultValue:Microsoft.Office.WebExtension.SelectionMode.Default}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:0},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:1},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:2},{name:Microsoft.Office.WebExtension.GoToType.Index,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:0},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:1},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:1},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileProperties.FileSize,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0},{name:OSF.DDA.FileProperties.SliceSize,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:0},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:5},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:6}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:0}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileSliceOffset,value:1},{name:OSF.DDA.FileProperties.SliceSize,value:2}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0}]});OSF.DDA.AsyncMethodNames.addNames({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync"}),function(){function r(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&r&&(r[OSF.DDA.TableDataProperties.TableRows]!=undefined||r[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(r=OSF.DDA.OMFactory.manufactureTableData(r)),r=OSF.DDA.DataCoercion.coerceData(r,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),r==undefined?null:r}var i=!1,n="boolean",t="number";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,"enum":Microsoft.Office.WebExtension.CoercionType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}}],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object",t,n]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[t,n],defaultValue:i}}],privateStateCallbacks:[]})}();OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:1},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:2},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:3},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:4},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:5}]});OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",RefreshingSettings:"refreshingSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(n){return OSF.OUtil.serializeSettings(n)},deserializeSettings:function(n){return OSF.OUtil.deserializeSettings(n)}};OSF.DDA.Settings=function(n){var t="name",i;n=n||{};i=function(n){var i=OSF.OUtil.getSessionStorage(),t,r;i&&(t=OSF.DDA.SettingsManager.serializeSettings(n),r=JSON?JSON.stringify(t):Sys.Serialization.JavaScriptSerializer.serialize(t),i.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),r))};OSF.OUtil.defineEnumerableProperties(this,{get:{value:function(i){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]),r;if(u)throw u;return r=n[i],typeof r=="undefined"?null:r}},set:{value:function(r,u){var f=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1},{name:"value",mayBeNull:!0}]);if(f)throw f;n[r]=u;i(n)}},remove:{value:function(r){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]);if(u)throw u;delete n[r];i(n)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],n)};OSF.DDA.RefreshableSettings=function(n){OSF.DDA.RefreshableSettings.uber.constructor.call(this,n);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],n);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:n}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(n,t){return t}}],onSucceeded:function(n,t,i){var f=n[OSF.DDA.SettingsManager.SerializedSettings],u=OSF.DDA.SettingsManager.deserializeSettings(f),e=i[OSF.DDA.SettingsManager.RefreshingSettings];for(var r in e)t.remove(r);for(r in u)t.set(r,u[r]);return t}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(n,t){return OSF.DDA.SettingsManager.serializeSettings(t)}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});Microsoft.Office.WebExtension.BindingType={Table:"table",Text:"text",Matrix:"matrix"};OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType};OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{BindingList:"BindingList"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{Subset:"subset",BindingProperties:"BindingProperties"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList,OSF.DDA.PropertyDescriptors.BindingProperties);OSF.DDA.BindingPromise=function(n,t){this._id=n;OSF.OUtil.defineEnumerableProperty(this,"onFail",{get:function(){return t},set:function(n){var i=typeof n;if(i!="undefined"&&i!="function")throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,i);t=n}})};OSF.DDA.BindingPromise.prototype={_fetch:function(n){var t=this,i;return t.binding?n&&n(t.binding):t._binding||(i=t,Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(t._id,function(t){t.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded?(OSF.OUtil.defineEnumerableProperty(i,"binding",{value:t.value}),n&&n(i.binding)):i.onFail&&i.onFail(t)})),t},getDataAsync:function(){var n=arguments;return this._fetch(function(t){t.getDataAsync.apply(t,n)}),this},setDataAsync:function(){var n=arguments;return this._fetch(function(t){t.setDataAsync.apply(t,n)}),this},addHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.addHandlerAsync.apply(t,n)}),this},removeHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.removeHandlerAsync.apply(t,n)}),this}};OSF.DDA.BindingFacade=function(n){this._eventDispatches=[];OSF.OUtil.defineEnumerableProperty(this,"document",{value:n});var t=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[t.AddFromSelectionAsync,t.AddFromNamedItemAsync,t.GetAllAsync,t.GetByIdAsync,t.ReleaseByIdAsync])};OSF.DDA.UnknownBinding=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}})};OSF.DDA.Binding=function(n,t){var r,u,i,f;OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}});r=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[r.GetDataAsync,r.SetDataAsync]);u=Microsoft.Office.WebExtension.EventType;i=t.bindings._eventDispatches;i[n]||(i[n]=new OSF.EventDispatch([u.BindingSelectionChanged,u.BindingDataChanged]));f=i[n];OSF.DDA.DispIdHost.addEventSupport(this,f)};OSF.DDA.generateBindingId=function(){return"UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+(new Date).getTime()};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureBinding=function(n,t){var r=n[OSF.DDA.BindingProperties.Id],u=n[OSF.DDA.BindingProperties.RowCount],f=n[OSF.DDA.BindingProperties.ColumnCount],s=n[OSF.DDA.BindingProperties.HasHeaders],i,e,o;switch(n[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:i=new OSF.DDA.TextBinding(r,t);break;case Microsoft.Office.WebExtension.BindingType.Matrix:i=new OSF.DDA.MatrixBinding(r,t,u,f);break;case Microsoft.Office.WebExtension.BindingType.Table:e=function(){return OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument};o=e()&&OSF.DDA.ExcelTableBinding?OSF.DDA.ExcelTableBinding:OSF.DDA.TableBinding;i=new o(r,t,u,f,s);break;default:i=new OSF.DDA.UnknownBinding(r,t)}return i};OSF.DDA.AsyncMethodNames.addNames({AddFromSelectionAsync:"addFromSelectionAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:"getByIdAsync",ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync"}),function(){function u(n){return OSF.DDA.OMFactory.manufactureBinding(n,Microsoft.Office.WebExtension.context.document)}function f(n){return n.id}function e(n,t,i){var u=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&u&&(u[OSF.DDA.TableDataProperties.TableRows]!=undefined||u[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(u=OSF.DDA.OMFactory.manufactureTableData(u)),u=OSF.DDA.DataCoercion.coerceData(u,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),u==undefined?r:u}var t="number",i="object",n="string",r=null;OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:[n]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return!0}}],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.BindingList],u)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n,t,i){var r=i[Microsoft.Office.WebExtension.Parameters.Id];delete t._eventDispatches[r]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n,t){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&n[Microsoft.Office.WebExtension.Parameters.RowCount]==0&&n[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn],delete n[Microsoft.Office.WebExtension.Parameters.RowCount],delete n[Microsoft.Office.WebExtension.Parameters.ColumnCount]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]||n[Microsoft.Office.WebExtension.Parameters.RowCount]||n[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[n,i,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}]})}();OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.MatrixBinding=function(n,t,i,r){OSF.DDA.MatrixBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Matrix},rowCount:{value:i?i:0},columnCount:{value:r?r:0}})};OSF.OUtil.extend(OSF.DDA.MatrixBinding,OSF.DDA.Binding);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.BindingProperties,fromHost:[{name:OSF.DDA.BindingProperties.Id,value:0},{name:OSF.DDA.BindingProperties.Type,value:1},{name:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,value:2}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.BindingType,toHost:[{name:Microsoft.Office.WebExtension.BindingType.Text,value:0},{name:Microsoft.Office.WebExtension.BindingType.Matrix,value:1},{name:Microsoft.Office.WebExtension.BindingType.Table,value:2}],invertible:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,value:0},{name:Microsoft.Office.WebExtension.Parameters.Id,value:1},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:2},{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseBindingMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAllBindingsMethod,fromHost:[{name:OSF.DDA.ListDescriptors.BindingList,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:2},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:3},{name:OSF.DDA.PropertyDescriptors.Subset,value:4}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.Data,value:2},{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,fromHost:[{name:OSF.DDA.BindingProperties.RowCount,value:0},{name:OSF.DDA.BindingProperties.ColumnCount,value:1},{name:OSF.DDA.BindingProperties.HasHeaders,value:2}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.Subset,toHost:[{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:0},{name:OSF.DDA.SafeArray.UniqueArguments.Run,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Offset,toHost:[{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:0},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Run,toHost:[{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:0},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddColumnsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearAllRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});Microsoft.Office.WebExtension.TableData=function(n,t){function i(n){if(n==null||n==undefined)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(n,2);t<2;t++)n=[n];return n}catch(i){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(n){t=i(n)}},rows:{get:function(){return n},set:function(t){n=t==null||OSF.OUtil.isArray(t)&&t.length==0?[]:i(t)}}});this.headers=t;this.rows=n};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(n){return new Microsoft.Office.WebExtension.TableData(n[OSF.DDA.TableDataProperties.TableRows],n[OSF.DDA.TableDataProperties.TableHeaders])};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{TableDataProperties:"TableDataProperties"});OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};OSF.DDA.TableBinding=function(n,t,i,r,u){OSF.DDA.TableBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:i?i:0},columnCount:{value:r?r:0},hasHeaders:{value:u?u:!1}});var f=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[f.AddRowsAsync,f.AddColumnsAsync,f.DeleteAllDataValuesAsync])};OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync"}),function(){function n(n){return n.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]})}();OSF.DDA.TextBinding=function(n,t){OSF.DDA.TextBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperty(this,"type",{value:Microsoft.Office.WebExtension.BindingType.Text})};OSF.OUtil.extend(OSF.DDA.TextBinding,OSF.DDA.Binding);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"});OSF.DDA.DocumentSelectionChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:n}})};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDeleted:"objectDeleted"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectSelectionChanged:"objectSelectionChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDataChanged:"objectDataChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ContentControlAdded:"contentControlAdded"});OSF.DDA.ObjectEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:n},object:{value:t}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDeletedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDataChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidContentControlAddedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{BindingSelectionChanged:"bindingSelectionChanged",BindingDataChanged:"bindingDataChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{BindingSelectionChangedEvent:"BindingSelectionChangedEvent"});OSF.DDA.BindingSelectionChangedEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingSelectionChanged},binding:{value:n}});for(var i in t)OSF.OUtil.defineEnumerableProperty(this,i,{value:t[i]})};OSF.DDA.BindingDataChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingDataChanged},binding:{value:n}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:0},{name:OSF.DDA.PropertyDescriptors.Subset,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingDataChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var n=null;return{findArrayDimensionality:function(n){if(OSF.OUtil.isArray(n)){for(var t=0,i=0;i0},enumerable:!0,configurable:!0}),t.prototype._getLastAction=function(){return this.m_actions[this.m_actions.length-1]},t.prototype.addTrace=function(n,t){this.m_traceInfos[n]=t},t.prototype.ensureInstantiateObjectPath=function(t){if(t){if(this.m_instantiatedObjectPaths[t.objectPathInfo.Id])return;if(this.ensureInstantiateObjectPath(t.parentObjectPath),this.ensureInstantiateObjectPaths(t.argumentObjectPaths),!this.m_instantiatedObjectPaths[t.objectPathInfo.Id]){var r={Id:this.m_context._nextId(),ActionType:1,Name:"",ObjectPathId:t.objectPathInfo.Id},i=new n.Action(r,!1,!1);i.referencedObjectPath=t;this.addAction(i)}}},t.prototype.ensureInstantiateObjectPaths=function(n){if(n)for(var t=0;t=0;--r)if(i=n[r],u=i.actionInfo.Id,i.referencedObjectPath&&t._updateLastUsedActionIdOfObjectPathId(e,i.referencedObjectPath,u),o=i.referencedArgumentObjectPaths,o)for(v=o.length,s=0;s0?i.actionInfo.L=c:i.actionInfo.L&&delete i.actionInfo.L},t}();n.ClientRequest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;n._internalConfig={showDisposeInfoInDebugInfo:!1,enableEarlyDispose:!0,alwaysPolyfillClientObjectRetrieveMethod:!1};t=function(){function t(){}return t.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},t.prototype._createRequestExecutorOrNull=function(){return null},Object.defineProperty(t.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),t}();n.SessionBase=t;i=function(){function i(r){if(this.m_customRequestHeaders={},this._onRunFinishedNotifiers=[],this.m_nextId=0,i._overrideSession)this.m_requestUrlAndHeaderInfoResolver=i._overrideSession;else if((n.Utility.isNullOrUndefined(r)||typeof r=="string"&&r.length===0)&&(r=i.defaultRequestUrlAndHeaders,r||(r={url:n.Constants.localDocument,headers:{}})),typeof r=="string")this.m_requestUrlAndHeaderInfo={url:r,headers:{}};else if(i.isRequestUrlAndHeaderInfoResolver(r))this.m_requestUrlAndHeaderInfoResolver=r;else if(i.isRequestUrlAndHeaderInfo(r)){var u=r;this.m_requestUrlAndHeaderInfo={url:u.url,headers:{}};n.Utility._copyHeaders(u.headers,this.m_requestUrlAndHeaderInfo.headers)}else throw n._Internal.RuntimeError._createInvalidArgError("url");this.m_requestUrlAndHeaderInfoResolver instanceof t&&(this.m_session=this.m_requestUrlAndHeaderInfoResolver);this._processingResult=!1;this._customData=n.Constants.iterativeExecutor;this.sync=this.sync.bind(this)}return Object.defineProperty(i.prototype,"session",{get:function(){return this.m_session},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"eventRegistration",{get:function(){return this.m_session?this.m_session.eventRegistration:n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_url",{get:function(){return this.m_requestUrlAndHeaderInfo?this.m_requestUrlAndHeaderInfo.url:null},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_pendingRequest",{get:function(){return this.m_pendingRequest==null&&(this.m_pendingRequest=new n.ClientRequest(this)),this.m_pendingRequest},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"debugInfo",{get:function(){var t=new n.RequestPrettyPrinter(this._rootObjectPropertyName,this._pendingRequest._objectPaths,this._pendingRequest._actions,n._internalConfig.showDisposeInfoInDebugInfo),i=t.process();return{pendingStatements:i}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"trackedObjects",{get:function(){return this.m_trackedObjects||(this.m_trackedObjects=new n.TrackedObjects(this)),this.m_trackedObjects},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"requestHeaders",{get:function(){return this.m_customRequestHeaders},enumerable:!0,configurable:!0}),i.prototype.load=function(t,r){n.Utility.validateContext(this,t);var u=i._parseQueryOption(r),f=n.ActionFactory.createQueryAction(this,t,u);this._pendingRequest.addActionResultHandler(f,t)},i.isLoadOption=function(t){if(!n.Utility.isUndefined(t.select)&&(typeof t.select=="string"||Array.isArray(t.select))||!n.Utility.isUndefined(t.expand)&&(typeof t.expand=="string"||Array.isArray(t.expand))||!n.Utility.isUndefined(t.top)&&typeof t.top=="number"||!n.Utility.isUndefined(t.skip)&&typeof t.skip=="number")return!0;for(var i in t)return!1;return!0},i.parseStrictLoadOption=function(n){var t={Select:[]};return i.parseStrictLoadOptionHelper(t,"","option",n),t},i.combineQueryPath=function(n,t,i){return n.length===0?t:n+i+t},i.parseStrictLoadOptionHelper=function(t,r,u,f){var e,o;for(e in f)if(o=f[e],e==="$all"){if(typeof o!="boolean")throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));o&&t.Select.push(i.combineQueryPath(r,"*","/"))}else if(e==="$top"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));t.Top=o}else if(e==="$skip"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));t.Skip=o}else if(typeof o=="boolean")o&&t.Select.push(i.combineQueryPath(r,e,"/"));else if(typeof o=="object")i.parseStrictLoadOptionHelper(t,i.combineQueryPath(r,e,"/"),i.combineQueryPath(u,e,"."),o);else throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));},i._parseQueryOption=function(t){var u={},f,r;if(typeof t=="string")f=t,u.Select=n.Utility._parseSelectExpand(f);else if(Array.isArray(t))u.Select=t;else if(typeof t=="object")if(r=t,i.isLoadOption(r)){if(typeof r.select=="string")u.Select=n.Utility._parseSelectExpand(r.select);else if(Array.isArray(r.select))u.Select=r.select;else if(!n.Utility.isNullOrUndefined(r.select))throw n._Internal.RuntimeError._createInvalidArgError("option.select");if(typeof r.expand=="string")u.Expand=n.Utility._parseSelectExpand(r.expand);else if(Array.isArray(r.expand))u.Expand=r.expand;else if(!n.Utility.isNullOrUndefined(r.expand))throw n._Internal.RuntimeError._createInvalidArgError("option.expand");if(typeof r.top=="number")u.Top=r.top;else if(!n.Utility.isNullOrUndefined(r.top))throw n._Internal.RuntimeError._createInvalidArgError("option.top");if(typeof r.skip=="number")u.Skip=r.skip;else if(!n.Utility.isNullOrUndefined(r.skip))throw n._Internal.RuntimeError._createInvalidArgError("option.skip");}else u=i.parseStrictLoadOption(t);else if(!n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError("option");return u},i.prototype.loadRecursive=function(t,r,u){var f,e,o;if(!n.Utility.isPlainJsonObject(r))throw n._Internal.RuntimeError._createInvalidArgError("options");f={};for(e in r)f[e]=i._parseQueryOption(r[e]);o=n.ActionFactory.createRecursiveQueryAction(this,t,{Queries:f,MaxDepth:u});this._pendingRequest.addActionResultHandler(o,t)},i.prototype.trace=function(t){n.ActionFactory.createTraceAction(this,t,!0)},i.prototype._processOfficeJsErrorResponse=function(n,t){},i.prototype.syncPrivateMain=function(){var t=this;return n.Utility._createPromiseFromResult(null).then(function(){if(!t.m_requestUrlAndHeaderInfo)return t.m_requestUrlAndHeaderInfoResolver._resolveRequestUrlAndHeaderInfo().then(function(i){if(t.m_requestUrlAndHeaderInfo=i,t.m_requestUrlAndHeaderInfo||(t.m_requestUrlAndHeaderInfo={url:n.Constants.localDocument,headers:{}}),n.Utility.isNullOrEmptyString(t.m_requestUrlAndHeaderInfo.url)&&(t.m_requestUrlAndHeaderInfo.url=n.Constants.localDocument),t.m_requestUrlAndHeaderInfo.headers||(t.m_requestUrlAndHeaderInfo.headers={}),typeof t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull=="function"){var r=t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull();r&&(t._requestExecutor=r)}})}).then(function(){var n=t._pendingRequest;return t.m_pendingRequest=null,t.processPreSyncPromises(n).then(function(){return t.syncPrivate(n)})})},i.prototype.syncPrivate=function(t){var f=this,e,o,s,u,h,r,i;return t.hasActions?(e=t.buildRequestMessageBody(),o=t.flags,this._requestExecutor||(this._requestExecutor=n.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)?new n.OfficeJsRequestExecutor(this):new n.HttpRequestExecutor),s=this._requestExecutor,u={},n.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,u),n.Utility._copyHeaders(this.m_customRequestHeaders,u),h={Url:this.m_requestUrlAndHeaderInfo.url,Headers:u,Body:e},t.invalidatePendingInvalidObjectPaths(),r=null,i=null,this._lastSyncStart=performance.now(),s.executeAsync(this._customData,o,h).then(function(u){return f._lastSyncEnd=performance.now(),r=f.processRequestExecutorResponseMessage(t,u),f.processPendingEventHandlers(t).catch(function(t){n.Utility.log("Error in processPendingEventHandlers");n.Utility.log(JSON.stringify(t));i=t})}).then(function(){var u,f;if(r){n.Utility.log("Throw error from response: "+JSON.stringify(r));throw r;}if(i){n.Utility.log("Throw error from ProcessEventHandler: "+JSON.stringify(i));u=null;i instanceof n._Internal.RuntimeError?(u=i,u.traceMessages=t._responseTraceMessages):(f=null,f=typeof i=="string"?i:i.message,n.Utility.isNullOrEmptyString(f)&&(f=n.Utility._getResourceString(n.ResourceStrings.cannotRegisterEvent)),u=new n._Internal.RuntimeError({code:n.ErrorCodes.cannotRegisterEvent,message:f,traceMessages:t._responseTraceMessages}));throw u;}})):this.processPendingEventHandlers(t)},i.prototype.processRequestExecutorResponseMessage=function(t,i){var e,r,o,u,f;if(i.Body&&i.Body.TraceIds&&t._setResponseTraceIds(i.Body.TraceIds),e=t._responseTraceMessages,r=null,i.Body&&(i.Body.Error&&i.Body.Error.ActionIndex>=0&&(o=new n.RequestPrettyPrinter(this._rootObjectPropertyName,t._objectPaths,t._actions),r=o.processForDebugStatementInfo(i.Body.Error.ActionIndex)),u=null,i.Body.Results?u=i.Body.Results:i.Body.ProcessedResults&&i.Body.ProcessedResults.Results&&(u=i.Body.ProcessedResults.Results),u)){this._processingResult=!0;try{t.processResponse(u)}finally{this._processingResult=!1}}if(n.Utility.isNullOrEmptyString(i.ErrorCode)){if(i.Body&&i.Body.Error)return f={errorLocation:i.Body.Error.Location},r&&(f.statement=r.statement,f.surroundingStatements=r.surroundingStatements),new n._Internal.RuntimeError({code:i.Body.Error.Code,message:i.Body.Error.Message,traceMessages:e,debugInfo:f})}else return new n._Internal.RuntimeError({code:i.ErrorCode,message:i.ErrorMessage,traceMessages:e});return null},i.prototype.processPendingEventHandlers=function(t){for(var u,i=n.Utility._createPromiseFromResult(null),r=0;r0&&(typeof r[0]=="string"||i.isRequestUrlAndHeaderInfo(r[0])||i.isRequestUrlAndHeaderInfoResolver(r[0]))&&(y=r[0],h=1),r.length==h+1)l=u,v=r[h+0];else if(r.length==h+2){if(n.Utility.isNullOrUndefined(r[h+0]))l=u;else if(r[h+0]instanceof n.ClientObject)l=function(){return r[h+0].context};else if(r[h+0]instanceof i)l=function(){return r[h+0]};else if(Array.isArray(r[h+0])){if(c=r[h+0],c.length==0)return i.createErrorPromise(t);for(a=0;a0){var n=c._onRunFinishedNotifiers.shift();n()}if(a)return l;else throw l;})},i.prototype._nextId=function(){return++this.m_nextId},i}();n.ClientRequestContext=i}(OfficeExtension||(OfficeExtension={})),function(n){var i=function(){function t(n){this.m_type=n}return Object.defineProperty(t.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){(this.m_isLoaded=!0,typeof t=="object"&&t&&t._IsNull)||(this.m_value=this.m_type===1?n.Utility.adjustToDateTime(t):t)},t}(),t;n.ClientResult=i;t=function(){function t(n,t){this.m_proxy=n;this.m_shouldPolyfill=t}return Object.defineProperty(t.prototype,"proxy",{get:function(){return this.m_proxy},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"retrieveResult.data"}});return this.m_data},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(n){if(this.m_isLoaded=!0,typeof n=="object"&&n&&n._IsNull){this.m_data=null;return}this.m_data=this.m_shouldPolyfill?this.changePropertyNameToCamelLowerCase(n):n},t.prototype.changePropertyNameToCamelLowerCase=function(t){var o=95,u,i,r,f,e;if(Array.isArray(t)){for(i=[],u=0;u0&&(r=!0),t=document.createElement("a"),t.href=this.m_url,r?t.hash=t.hash.length===0||t.hash==="#"?"#"+i:t.hash+"&"+i:t.search=t.search.length===0||t.search==="?"?"?"+i:t.search+"&"+i,t.href},f.prototype.init=function(){var t=this,i;return window.addEventListener("message",this.m_onMessageHandler),i=this._getIFrameSrc(),new n._Internal.OfficePromise(function(r,u){var f=document.createElement("iframe");t.m_options.id&&(f.id=t.m_options.id);f.style.height=t.m_options.height;f.style.width=t.m_options.width;f.src=i;t.m_options.container.appendChild(f);t.m_timeoutId=setTimeout(function(){t.close();var i=n.Utility.createRuntimeError(n.ErrorCodes.timeout,n.Utility._getResourceString(n.ResourceStrings.timeout),"EmbeddedSession.init");u(i)},t.m_options.timeoutInMilliseconds);t.m_promiseResolver=r})},f.prototype._invoke=function(n,t,u){if(!this.m_enabled){t(i.InternalError,null);return}r.invokeRequestModifier&&(u=r.invokeRequestModifier(u));this._sendMessageWithCallback(this.m_id++,n,u,function(n){r.invokeResponseModifier&&(n=r.invokeResponseModifier(n));var u=n.Error;delete n.Error;t(u||i.Success,n)})},f.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler);window.clearTimeout(this.m_timeoutId);this.m_enabled=!1},Object.defineProperty(f.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),f.prototype._createRequestExecutorOrNull=function(){return new e(this)},f.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},f.prototype._registerEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.RegisterEventCommand,{EventId:i,TargetId:r},function(){n(null)})})},f.prototype._unregisterEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.UnregisterEventCommand,{EventId:i,TargetId:r},function(){n()})})},f.prototype._onMessage=function(n){var u=this,i,e,r,o,s;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===n.source&&this.m_chosenOrigin===n.origin)){if(i=n.data,i&&i[t.CommandKey]===t.ApiReadyCommand){!this.m_chosenWindow&&this._isValidDescendant(n.source)&&i[t.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=n.source,this.m_chosenOrigin=n.origin,this._sendMessageWithCallback(this.m_id++,t.GetAppContextCommand,null,function(n){u._setupContext(n);window.clearTimeout(u.m_timeoutId);u.m_promiseResolver()}));return}if(i&&i[t.CommandKey]===t.FireEventCommand){var f=i[t.ParamsKey],h=f.EventId,c=f.TargetId,l=f.Data;if(this.m_sessionEventManager)for(e=this.m_sessionEventManager.getHandlers(h,c),r=0;r=0;o--)if(r[o]===e[i].handler){r.splice(o,1);break}break;case 2:r=[];break}}return s&&(!this.m_registered&&r.length>0?u=u.then(function(){return f.m_eventInfo.registerFunc(f.m_callback)}).then(function(){return f.m_registered=!0}):this.m_registered&&r.length==0&&(u=u.then(function(){return f.m_eventInfo.unregisterFunc(f.m_callback)}).catch(function(t){n.Utility.log("Error when unregister event: "+JSON.stringify(t))}).then(function(){return f.m_registered=!1})),u=u.then(function(){return f.m_handlers=r})),u},t.prototype.fireEvent=function(t){for(var u,f,r=[],i=0;i=0;e--)if(f[e]===u){f.splice(e,1);break}return f.length===0?this.m_unregisterEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i}();n.EventRegistration=i}(OfficeExtension||(OfficeExtension={})),function(n){function r(n){t._testReadyImpl=n}function u(n){t.getGenericEventRegistration()._handleRichApiMessage(n)}var t=function(){function t(){this.m_eventRegistration=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this));this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this)}return t.prototype.ready=function(){var i=this;return this.m_ready||(this.m_ready=t._testReadyImpl?t._testReadyImpl().then(function(){i.m_isReady=!0}):n._Internal.officeJsEventRegistration.register(5,"",this.m_richApiMessageHandler).then(function(){i.m_isReady=!0})),this.m_ready},Object.defineProperty(t.prototype,"isReady",{get:function(){return this.m_isReady},enumerable:!0,configurable:!0}),t.prototype.register=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.register(n,t,i)})},t.prototype.unregister=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.unregister(n,t,i)})},t.prototype._registerEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._unregisterEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._handleRichApiMessage=function(t){var r,i,u,e,f;if(t&&t.entries)for(r=0;r0))for(e=JSON.parse(i.message),i.isRemoteOverride&&(e.source=n.Constants.eventSourceRemote),f=0;f=0;u--)if(n[u]===i){n.splice(u,1);break}n.length==0&&t.getGenericEventRegistration().unregister(r.m_genericEventInfo.eventType,r.m_genericEventInfo.getTargetIdFunc(),r._callback)})},r.prototype.removeAll=function(){},r}(n.EventHandlers);n.GenericEventHandlers=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var s=JSON.stringify(u.Body),f=u.Url,e,o;if(f.charAt(f.length-1)!="/"&&(f=f+"/"),f=f+n.Constants.processQuery,f=f+"?"+n.Constants.flags+"="+r.toString(),e={method:"POST",url:f,headers:{},body:s},e.headers[n.Constants.sourceLibHeader]=t.SourceLibHeaderValue,e.headers["CONTENT-TYPE"]="application/json",u.Headers)for(o in u.Headers)e.headers[o]=u.Headers[o];return n.HttpUtility.sendRequest(e).then(function(t){var i,r;return t.statusCode===200?i={ErrorCode:null,ErrorMessage:null,Headers:t.headers,Body:JSON.parse(t.body)}:(n.Utility.log("Error Response:"+t.body),r=n.Utility._parseErrorResponse(t),i={ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:t.headers,Body:null}),i})},t.SourceLibHeaderValue="officejs-rest",t}();n.HttpRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.setCustomSendRequestFunc=function(n){t.s_customSendRequestFunc=n},t.xhrSendRequestFunc=function(t){return new n._Internal.OfficePromise(function(i,r){var u=new XMLHttpRequest,f;if(u.open(t.method,t.url),u.onload=function(){var t={statusCode:u.status,headers:n.Utility._parseHttpResponseHeaders(u.getAllResponseHeaders()),body:u.responseText};i(t)},u.onerror=function(){r(new n._Internal.RuntimeError({code:n.ErrorCodes.connectionFailure,message:n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,u.statusText)}))},t.headers)for(f in t.headers)u.setRequestHeader(f,t.headers[f]);u.send(t.body)})},t.sendRequest=function(n){t.validateAndNormalizeRequest(n);var i=t.s_customSendRequestFunc;return i||(i=t.xhrSendRequestFunc),i(n)},t.setCustomSendLocalDocumentRequestFunc=function(n){t.s_customSendLocalDocumentRequestFunc=n},t.sendLocalDocumentRequest=function(n){t.validateAndNormalizeRequest(n);var i;return i=t.s_customSendLocalDocumentRequestFunc||t.officeJsSendLocalDocumentRequestFunc,i(n)},t.officeJsSendLocalDocumentRequestFunc=function(t){t=n.Utility._validateLocalDocumentRequest(t);var i=n.Utility._buildRequestMessageSafeArray(t);return new n._Internal.OfficePromise(function(t,r){OSF.DDA.RichApi.executeRichApiRequestAsync(i,function(i){var r;r=i.status=="succeeded"?{statusCode:n.RichApiMessageUtility.getResponseStatusCode(i),headers:n.RichApiMessageUtility.getResponseHeaders(i),body:n.RichApiMessageUtility.getResponseBody(i)}:n.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(i.error.code,i.error.message);n.Utility.log(JSON.stringify(r));t(r)})})},t.validateAndNormalizeRequest=function(t){if(n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"request"});n.Utility.isNullOrEmptyString(t.method)&&(t.method="GET");t.method=t.method.toUpperCase()},t.logRequest=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Request---"),n.Utility.log(i.method+" "+i.url),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t.logResponse=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Response---"),n.Utility.log(""+i.statusCode),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t._logBody=!1,t}();n.HttpUtility=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_clientObject=n}return n.prototype._handleResult=function(n){this.m_clientObject._handleIdResult(n)},n}();n.InstantiateActionResultHandler=t}(OfficeExtension||(OfficeExtension={})),function(n){}(OfficeExtension||(OfficeExtension={})),function(n){var u=function(){function t(n){this.m_session=n}return t.prototype.executeAsync=function(t,r,u){var e={url:n.Constants.processQuery,method:"POST",headers:u.Headers,body:u.Body},f={id:i.nextId(),type:1,flags:r,message:e};return n.Utility.log(JSON.stringify(f)),this.m_session.sendMessageToHost(f).then(function(t){var i,r,u;return n.Utility.log("Received response: "+JSON.stringify(t)),i=t.message,i.statusCode===200?r={ErrorCode:null,ErrorMessage:null,Headers:i.headers,Body:i.body}:(n.Utility.log("Error Response:"+i.body),u=n.Utility._parseErrorResponse(i),r={ErrorCode:u.errorCode,ErrorMessage:u.errorMessage,Headers:i.headers,Body:null}),r})},t}(),i=function(i){function r(n){var t=this;i.call(this);this.m_promiseResolver={};this.m_bridge=n;this.m_bridge.onMessageFromHost=function(n){t.onMessageFromHost(n)}}return __extends(r,i),r.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},r.prototype._createRequestExecutorOrNull=function(){return n.Utility.log("NativeBridgeSession::CreateRequestExecutor"),new u(this)},Object.defineProperty(r.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),r.init=function(t){if(t&&typeof t=="object"){var i=new r(t);n.ClientRequestContext._overrideSession=i;n.HttpUtility.setCustomSendLocalDocumentRequestFunc(function(n){var t={id:r.nextId(),type:1,flags:0,message:n};return i.sendMessageToHost(t).then(function(n){return n.message})})}},r.prototype.sendMessageToHost=function(t){var i=this;return this.m_bridge.sendMessageToHost(JSON.stringify(t)),new n._Internal.OfficePromise(function(n,r){i.m_promiseResolver[t.id]=n})},r.prototype.onMessageFromHost=function(n){var i,r;n==="test"?t._testFunc&&t._testFunc():(i=JSON.parse(n),typeof i.id=="number"&&(r=this.m_promiseResolver[i.id],r&&r(i),delete this.m_promiseResolver[i.id]))},r.nextId=function(){return r.s_nextId++},r.s_nextId=1,r}(n.SessionBase),r=function(){function n(){}return n.init=function(n){i.init(n)},n}(),t;n.HostBridge=r;typeof _richApiNativeBridge=="object"&&_richApiNativeBridge&&r.init(_richApiNativeBridge);t=function(){function n(){}return n.setTestFunc=function(t){n._testFunc=t},n}();n.HostBridgeTest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){this.m_objectPathInfo=n;this.m_parentObjectPath=t;this.m_isWriteOperation=!1;this.m_isCollection=i;this.m_isInvalidAfterRequest=r;this.m_isValid=!0}return Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},set:function(n){this.m_isWriteOperation=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRestrictedResourceAccess",{get:function(){return this.m_isRestrictedResourceAccess},set:function(n){this.m_isRestrictedResourceAccess=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(n){this.m_argumentObjectPaths=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(n){this.m_isValid=n;!n&&this.m_objectPathInfo.ObjectPathType===6&&this.m_savedObjectPathInfo&&(t.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(n){this.m_getByIdMethodName=n},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null},t.prototype.updateUsingObjectData=function(i){var e=i[n.Constants.referenceId],f,o,u,r;if(!n.Utility.isNullOrEmptyString(e)){this.m_savedObjectPathInfo||this.isInvalidAfterRequest||!t.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)||(f={},t.copyObjectPathInfo(this.m_objectPathInfo,f),this.m_savedObjectPathInfo={pathInfo:f,parent:this.m_parentObjectPath});this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=e;this.m_objectPathInfo.ArgumentInfo={};delete this.m_objectPathInfo.ParentObjectPathId;this.m_parentObjectPath=null;this.m_argumentObjectPaths=null;return}if(o=this.parentObjectPath&&this.parentObjectPath.isCollection,u=this.getByIdMethodName,(o||!n.Utility.isNullOrEmptyString(u))&&(r=i[n.Constants.id],n.Utility.isNullOrUndefined(r)&&(r=i[n.Constants.idPrivate]),!n.Utility.isNullOrUndefined(r))){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;n.Utility.isNullOrEmptyString(u)?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=u,this.m_getByIdMethodName=null);this.isWriteOperation=!1;this.m_objectPathInfo.ArgumentInfo={};this.m_objectPathInfo.ArgumentInfo.Arguments=[r];this.m_argumentObjectPaths=null;return}},t.isRestorableObjectPath=function(n){return n===1||n===5||n===3||n===4},t.copyObjectPathInfo=function(n,t){t.Id=n.Id;t.ArgumentInfo=n.ArgumentInfo;t.Name=n.Name;t.ObjectPathType=n.ObjectPathType;t.ParentObjectPathId=n.ParentObjectPathId},t}();n.ObjectPath=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createGlobalObjectObjectPath=function(t){var i={Id:t._nextId(),ObjectPathType:1,Name:""};return new n.ObjectPath(i,null,!1,!1)},t.createNewObjectObjectPath=function(t,i,r,u){var e={Id:t._nextId(),ObjectPathType:2,Name:i},f=new n.ObjectPath(e,null,r,!1);return f.isRestrictedResourceAccess=u,f},t.createPropertyObjectPath=function(t,i,r,u,f,e){var s={Id:t._nextId(),ObjectPathType:4,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id},o=new n.ObjectPath(s,i._objectPath,u,f);return o.isRestrictedResourceAccess=e,o},t.createIndexerObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i._objectPath,!1,!1)},t.createIndexerObjectPathUsingParentPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i,!1,!1)},t.createMethodObjectPath=function(t,i,r,u,f,e,o,s,h){var l={Id:t._nextId(),ObjectPathType:3,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},a=n.Utility.setMethodArguments(t,l.ArgumentInfo,f),c=new n.ObjectPath(l,i._objectPath,e,o);return c.argumentObjectPaths=a,c.isWriteOperation=u!=1,c.getByIdMethodName=s,c.isRestrictedResourceAccess=h,c},t.createReferenceIdObjectPath=function(t,i){var r={Id:t._nextId(),ObjectPathType:6,Name:i,ArgumentInfo:{}};return new n.ObjectPath(r,null,!1,!1)},t.createChildItemObjectPathUsingIndexerOrGetItemAt=function(i,r,u,f,e){var o=f[n.Constants.id];return n.Utility.isNullOrUndefined(o)&&(o=f[n.Constants.idPrivate]),i&&!n.Utility.isNullOrUndefined(o)?t.createChildItemObjectPathUsingIndexer(r,u,f):t.createChildItemObjectPathUsingGetItemAt(r,u,f,e)},t.createChildItemObjectPathUsingIndexer=function(t,i,r){var f=r[n.Constants.id],u;return n.Utility.isNullOrUndefined(f)&&(f=r[n.Constants.idPrivate]),u=u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u.ArgumentInfo.Arguments=[f],new n.ObjectPath(u,i._objectPath,!1,!1)},t.createChildItemObjectPathUsingGetItemAt=function(t,i,r,u){var e=r[n.Constants.index],f;return e&&(u=e),f={Id:t._nextId(),ObjectPathType:3,Name:n.Constants.getItemAt,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f.ArgumentInfo.Arguments=[u],new n.ObjectPath(f,i._objectPath,!1,!1)},t}();n.ObjectPathFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_context=n}return t.prototype.executeAsync=function(i,r,u){var f=this,e=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n._Internal.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(e,function(i){n.Utility.log("Response:");n.Utility.log(JSON.stringify(i));var r;i.status=="succeeded"?r=n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBody(i),n.RichApiMessageUtility.getResponseHeaders(i)):(r=n.RichApiMessageUtility.buildResponseOnError(i.error.code,i.error.message),f.m_context._processOfficeJsErrorResponse(i.error.code,r));t(r)})})},t.SourceLibHeaderValue="officejs",t}();n.OfficeJsRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){n.OfficeRequire=function(){return null}()})(t=n._Internal||(n._Internal={})),function(n){var t;(function(t){function i(){return function(){"use strict";function vt(n){return typeof n=="function"||typeof n=="object"&&n!==null}function b(n){return typeof n=="function"}function yt(n){return typeof n=="object"&&n!==null}function wt(n){k=n}function bt(n){f=n}function ni(){var t=process.nextTick,n=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&n[1]==="0"&&n[2]==="10"&&(t=setImmediate),function(){t(c)}}function tr(){return function(){pt(c)}}function ti(){var n=0,i=new it(c),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function ii(){var n=new MessageChannel;return n.port1.onmessage=c,function(){n.port2.postMessage(0)}}function ri(){return function(){setTimeout(c,1)}}function c(){for(var t,i,n=0;n=0?(n=n.substring(t+5,n.length),n<"14.14393"?!0:!1):!1}function i(){return typeof window=="undefined"&&typeof Promise=="function"?Promise:typeof window!="undefined"&&window.Promise?t()?n.PromiseImpl.Init():window.Promise:n.PromiseImpl.Init()}n.OfficePromise=i()}(t=n._Internal||(n._Internal={}));i=t.OfficePromise;n.Promise=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this._autoCleanupList={};this.m_context=n}return t.prototype.add=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._addCommon(n,!0)}):this._addCommon(n,!0)},t.prototype._autoAdd=function(n){this._addCommon(n,!1);this._autoCleanupList[n._objectPath.objectPathInfo.Id]=n},t.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(t,i){var r=this.m_context._autoCleanup&&!t[n.Constants.isTracked]&&t!==this.m_context._rootObject&&i&&!n.Utility.isNullOrEmptyString(i[n.Constants.referenceId]);r&&(this._autoCleanupList[t._objectPath.objectPathInfo.Id]=t,t[n.Constants.isTracked]=!0)},t.prototype._addCommon=function(t,i){if(t[n.Constants.isTracked]){i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id];return}var r=t[n.Constants.referenceId];n.Utility.isNullOrEmptyString(r)&&t._KeepReference&&(t._KeepReference(),n.ActionFactory.createInstantiateAction(this.m_context,t),i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id],t[n.Constants.isTracked]=!0)},t.prototype.remove=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._removeCommon(n)}):this._removeCommon(n)},t.prototype._removeCommon=function(t){var r=t[n.Constants.referenceId],i;n.Utility.isNullOrEmptyString(r)||(i=this.m_context._rootObject,i._RemoveReference&&i._RemoveReference(r),delete t[n.Constants.isTracked])},t.prototype._retrieveAndClearAutoCleanupList=function(){var n=this._autoCleanupList;return this._autoCleanupList={},n},t}();n.TrackedObjects=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){n||(n="root");this.m_globalObjName=n;this.m_referencedObjectPaths=t;this.m_actions=i;this.m_statements=[];this.m_variableNameForObjectPathMap={};this.m_variableNameToObjectPathMap={};this.m_declaredObjectPathMap={};this.m_showDispose=r}return t.prototype.process=function(){this.m_showDispose&&n.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions);for(var t=0;t=0&&this.m_statements.length>i+o+1)break;if(i<0)return null;for(f=i-o,f<0&&(f=0),e=i+1+o,e>this.m_statements.length&&(e=this.m_statements.length),r=[],f!=0&&r.push("..."),s=f;s>>>>"),r.push(this.m_statements[i]),r.push("// <<<<<"),h=i+1;h0)?(r=i.map(function(n){return u.getObjVarName(n)}).join(", "),n+" // And then dispose {"+r+"}"):n},t.prototype.buildQueryExpression=function(n){if(n.actionInfo.QueryInfo){var t={};return t.select=n.actionInfo.QueryInfo.Select,t.expand=n.actionInfo.QueryInfo.Expand,t.skip=n.actionInfo.QueryInfo.Skip,t.top=n.actionInfo.QueryInfo.Top,typeof t.top=="undefined"&&typeof t.skip=="undefined"&&typeof t.expand=="undefined"?typeof t.select=="undefined"?"":JSON.stringify(t.select):JSON.stringify(t)}return""},t.prototype.buildObjectPathExpressionWithParent=function(n){var t=n.objectPathInfo.ObjectPathType==5||n.objectPathInfo.ObjectPathType==3||n.objectPathInfo.ObjectPathType==4;return t&&n.objectPathInfo.ParentObjectPathId?this.getObjVarName(n.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(n):this.buildObjectPathExpression(n)},t.prototype.buildObjectPathExpression=function(t){switch(t.objectPathInfo.ObjectPathType){case 1:return"context."+this.m_globalObjName;case 5:return"getItem("+this.buildArgumentsExpression(t.objectPathInfo.ArgumentInfo)+")";case 3:return n.Utility._toCamelLowerCase(t.objectPathInfo.Name)+"("+this.buildArgumentsExpression(t.objectPathInfo.ArgumentInfo)+")";case 2:return t.objectPathInfo.Name+".newObject()";case 7:return"null";case 4:return n.Utility._toCamelLowerCase(t.objectPathInfo.Name);case 6:return"context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(t.objectPathInfo.Name)+")"}},t.prototype.buildArgumentsExpression=function(n){var t="",i;if(!n.Arguments)return t;for(i=0;i0&&(t=t+", "),t=t+this.buildArgumentLiteral(n.Arguments[i],n.ReferencedObjectPathIds?n.ReferencedObjectPathIds[i]:null);return t==="undefined"&&(t=""),t},t.prototype.buildArgumentLiteral=function(n,t){return typeof n=="number"&&n===t?this.getObjVarName(t):JSON.stringify(n)},t.prototype.getObjVarNameBase=function(t){var u="v",f=this.m_referencedObjectPaths[t],i,r;switch(f.objectPathInfo.ObjectPathType){case 1:u=this.m_globalObjName;break;case 4:u=n.Utility._toCamelLowerCase(f.objectPathInfo.Name);break;case 3:i=f.objectPathInfo.Name;i.length>3&&i.substr(0,3)==="Get"&&(i=i.substr(3));u=n.Utility._toCamelLowerCase(i);break;case 5:r=this.getObjVarNameBase(f.objectPathInfo.ParentObjectPathId);u=r.charAt(r.length-1)==="s"?r.substr(0,r.length-1):r+"Item";break}return u},t.prototype.getObjVarName=function(n){var t,i;if(this.m_variableNameForObjectPathMap[n])return this.m_variableNameForObjectPathMap[n];if(t=this.getObjVarNameBase(n),!this.m_variableNameToObjectPathMap[t])return this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t;for(i=1;this.m_variableNameToObjectPathMap[t+i.toString()];)i++;return t=t+i.toString(),this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t},t}();n.RequestPrettyPrinter=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.cannotRegisterEvent="CannotRegisterEvent",n.connectionFailureWithStatus="ConnectionFailureWithStatus",n.connectionFailureWithDetails="ConnectionFailureWithDetails",n.invalidObjectPath="InvalidObjectPath",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.invalidArgumentGeneric="InvalidArgumentGeneric",n.propertyNotLoaded="PropertyNotLoaded",n.runMustReturnPromise="RunMustReturnPromise",n.timeout="Timeout",n.propertyDoesNotExist="PropertyDoesNotExist",n.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",n.moreInfoInnerError="MoreInfoInnerError",n.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",n.valueNotLoaded="ValueNotLoaded",n.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage",n.invalidOperationInCellEditMode="InvalidOperationInCellEditMode",n.customFunctionDefintionMissing="CustomFunctionDefintionMissing",n.customFunctionImplementationMissing="CustomFunctionImplementationMissing",n.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars",n.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit",n.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch",n.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing",n.apiNotFoundDetails="ApiNotFoundDetails",n}();n.ResourceStrings=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.CannotRegisterEvent="The event handler cannot be registered.",n.ConnectionFailureWithStatus="The request failed with status code of {0}.",n.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}",n.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",n.InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',n.InvalidRequestContext="Cannot use the object across different request contexts.",n.PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",n.RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',n.Timeout="The operation has timed out.",n.ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.',n.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.",n.InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.",n.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions.",n.CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.",n.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods.",n.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name.",n.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.",n.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.",n.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.",n}();n.ResourceStringValues=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.buildMessageArrayForIRequestExecutor=function(i,r,u,f){var o=JSON.stringify(u.Body),e;return n.Utility.log("Request:"),n.Utility.log(o),e={},e[n.Constants.sourceLibHeader]=f,t.buildRequestMessageSafeArray(i,r,"POST","ProcessQuery",e,o)},t.buildResponseOnSuccess=function(n,t){var i={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return i.Body=JSON.parse(n),i.Headers=t,i},t.buildResponseOnError=function(i,r){var u={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return u.ErrorCode=n.ErrorCodes.generalException,u.ErrorMessage=r,i==t.OfficeJsErrorCode_ooeNoCapability?u.ErrorCode=n.ErrorCodes.accessDenied:i==t.OfficeJsErrorCode_ooeActivityLimitReached?u.ErrorCode=n.ErrorCodes.activityLimitReached:i==t.OfficeJsErrorCode_ooeInvalidOrTimedOutSession&&(u.ErrorCode=n.ErrorCodes.invalidOrTimedOutSession,u.ErrorMessage=n.Utility._getResourceString(n.ResourceStrings.invalidOrTimedOutSessionMessage)),u},t.buildHttpResponseFromOfficeJsError=function(i,r){var f=500,u={};return u.error={},u.error.code=n.ErrorCodes.generalException,u.error.message=r,i===t.OfficeJsErrorCode_ooeNoCapability?(f=403,u.error.code=n.ErrorCodes.accessDenied):i===t.OfficeJsErrorCode_ooeActivityLimitReached&&(f=429,u.error.code=n.ErrorCodes.activityLimitReached),{statusCode:f,headers:{},body:JSON.stringify(u)}},t.buildRequestMessageSafeArray=function(n,t,i,r,u,f){var e=[],o;if(u)for(o in u)e.push(o),e.push(u[o]);var s=0,h="",c="",l="";return[n,i,r,e,f,s,t,h,c,l]},t.getResponseBody=function(n){return t.getResponseBodyFromSafeArray(n.value.data)},t.getResponseHeaders=function(n){return t.getResponseHeadersFromSafeArray(n.value.data)},t.getResponseBodyFromSafeArray=function(n){var t=n[2],i;return typeof t=="string"?t:(i=t,i.join(""))},t.getResponseHeadersFromSafeArray=function(n){var i=n[1],r,t;if(!i)return null;for(r={},t=0;t0&&f.push(i);return f},t.toJson=function(n,t,i,r){var e={},u,f;for(u in t)f=t[u],typeof f!="undefined"&&(e[u]=f);for(u in i)f=i[u],typeof f!="undefined"&&(e[u]=f.toJSON());return r&&(e.items=r.map(function(n){return n.toJSON()})),e},t.throwError=function(i,r,u){throw new n._Internal.RuntimeError({code:i,message:t._getResourceString(i,r),debugInfo:u?{errorLocation:u}:undefined});},t.createRuntimeError=function(t,i,r){return new n._Internal.RuntimeError({code:t,message:i,debugInfo:{errorLocation:r}})},t._getResourceString=function(i,r){var u,e,f,o;return typeof window!="undefined"&&window.Strings&&window.Strings.OfficeOM&&(e="L_"+i,f=window.Strings.OfficeOM[e],f&&(u=f)),u||(u=n.ResourceStringValues[i]),u||(u=i),t.isNullOrUndefined(r)||(Array.isArray(r)?(o=r,u=t._formatString(u,o)):u=u.replace("{0}",r)),u},t._formatString=function(t,i){return t.replace(/\{\d\}/g,function(t){var r=parseInt(t.substr(1,t.length-2));if(r0?".":"")+i;break;case 3:i=t.normalizeName(n.objectPathInfo.Name)+"()"+(i.length>0?".":"")+i;break;case 4:i=t.normalizeName(n.objectPathInfo.Name)+(i.length>0?".":"")+i;break;case 5:i="getItem()"+(i.length>0?".":"")+i;break;case 6:i="_reference()"+(i.length>0?".":"")+i;break}n=n.parentObjectPath}return i},t._createPromiseFromResult=function(t){return new n._Internal.OfficePromise(function(n,i){n(t)})},t._createTimeoutPromise=function(t){return new n._Internal.OfficePromise(function(n,i){setTimeout(function(){n(null)},t)})},t.promisify=function(t){return new n._Internal.OfficePromise(function(n,i){var r=function(t){t.status=="failed"?i(t.error):n(t.value)};t(r)})},t._addActionResultHandler=function(n,t,i){n.context._pendingRequest.addActionResultHandler(t,i)},t._handleNavigationPropertyResults=function(n,i,r){for(var u=0;u0},t._getLocalDocumentUrlPrefixLength=function(n){for(var i=["http://document.localhost","https://document.localhost","//document.localhost"],r=n.toLowerCase().trim(),t=0;t0))for(s=i.url.substr(f+1),e=s.split("&"),u=0;u0&&(f=i.substr(0,u),e=i.substr(u+1),f=t.trim(f),e=t.trim(e),s[f.toUpperCase()]=e));return s},t._parseErrorResponse=function(i){var r=null,f,e,u;if(t.isPlainJsonObject(i.body))r=i.body;else if(!t.isNullOrEmptyString(i.body)){f=t.trim(i.body);try{r=JSON.parse(f)}catch(o){t.log("Error when parse "+f)}}return!t.isNullOrUndefined(r)&&typeof r=="object"&&r.error?(u=r.error.code,e=t._getResourceString(n.ResourceStrings.connectionFailureWithDetails,[i.statusCode.toString(),r.error.code,r.error.message])):e=t._getResourceString(n.ResourceStrings.connectionFailureWithStatus,i.statusCode.toString()),t.isNullOrEmptyString(u)&&(u=n.ErrorCodes.connectionFailure),{errorCode:u,errorMessage:e}},t._copyHeaders=function(n,t){if(n&&t)for(var i in n)t[i]=n[i]},t._toCamelLowerCase=function(n){if(t.isNullOrEmptyString(n))return n;for(var i=0;i=65&&n.charCodeAt(i)<=90;)i++;return i 6 && v.slice(0, 5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) { + d=new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + } + else { + value=Sys.Serialization.JavaScriptSerializer.deserialize(value, true); + } + ret[key]=value; + } + catch (ex) { + } + } + return ret; + }, loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) { if (url && callback) { var doc=window.document; @@ -835,6 +885,14 @@ OSF.OUtil=(function () { } } }, + removeClass: function OSF_OUtil$removeClass(elmt, val) { + if (OSF.OUtil.hasClass(elmt, val)) { + var className=elmt.getAttribute(_classN); + var reg=new RegExp('(\\s|^)'+val+'(\\s|$)'); + className=className.replace(reg, ''); + elmt.setAttribute(_classN, className); + } + }, hasClass: function OSF_OUtil$hasClass(elmt, clsName) { var className=elmt.getAttribute(_classN); return className && className.match(new RegExp('(\\s|^)'+clsName+'(\\s|$)')); @@ -971,6 +1029,12 @@ OSF.OUtil.Guid=(function () { })(); window.OSF=OSF; OSF.OUtil.setNamespace("OSF", window); +OSF.MessageIDs={ + "FetchBundleUrl": 0, + "LoadReactBundle": 1, + "LoadBundleSuccess": 2, + "LoadBundleError": 3 +}; OSF.AppName={ Unsupported: 0, Excel: 1, @@ -998,7 +1062,8 @@ OSF.AppName={ OutlookAndroid: 4194304, OneNoteWinRT: 8388608, ExcelAndroid: 8388609, - VisioWebApp: 8388610 + VisioWebApp: 8388610, + OneNoteIOS: 8388611 }; OSF.InternalPerfMarker={ DataCoercionBegin: "Agave.HostCall.CoerceDataStart", @@ -1028,7 +1093,9 @@ OSF.AgaveHostAction={ "EscExit": 15, "F2Exit": 16, "ExitNoFocusable": 17, - "ExitNoFocusableShift": 18 + "ExitNoFocusableShift": 18, + "MouseEnter": 19, + "MouseLeave": 20 }; OSF.SharedConstants={ "NotificationConversationIdSuffix": '_ntf' @@ -1162,6 +1229,10 @@ Microsoft.Office.WebExtension.Parameters={ Status: "status", PlatformType: "platformType", HostType: "hostType", + ForceConsent: "forceConsent", + ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + Reserved: "reserved", Xml: "xml", Namespace: "namespace", Prefix: "prefix", @@ -1194,6 +1265,7 @@ Microsoft.Office.WebExtension.Parameters={ DisplayInIframe: "displayInIframe", MessageContent: "messageContent", HideTitle: "hideTitle", + UseDeviceIndependentPixels: "useDeviceIndependentPixels", AppCommandInvocationCompletedData: "appCommandInvocationCompletedData" }; OSF.OUtil.setNamespace("DDA", OSF); @@ -1250,6 +1322,8 @@ OSF.DDA.MethodDispId={ dispidExecuteRichApiRequestMethod: 93, dispidAppCommandInvocationCompletedMethod: 94, dispidCloseContainerMethod: 97, + dispidGetAccessTokenMethod: 98, + dispidOpenBrowserWindow: 102, dispidGetSelectedTaskMethod: 110, dispidGetSelectedResourceMethod: 111, dispidGetTaskMethod: 112, @@ -1283,8 +1357,7 @@ OSF.DDA.MethodDispId={ dispidSetDataNodeTextMethod: 143, dispidMessageParentMethod: 144, dispidSendMessageMethod: 145, - dispidGetDelegateTokenMethod: 146, - dispidMethodMax: 146 + dispidMethodMax: 145 }; OSF.DDA.EventDispId={ dispidEventMin: 0, @@ -1301,9 +1374,16 @@ OSF.DDA.EventDispId={ dispidDialogMessageReceivedEvent: 10, dispidDialogNotificationShownInAddinEvent: 11, dispidDialogParentMessageReceivedEvent: 12, + dispidObjectDeletedEvent: 13, + dispidObjectSelectionChangedEvent: 14, + dispidObjectDataChangedEvent: 15, + dispidContentControlAddedEvent: 16, dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, dispidAppCommandInvokedEvent: 39, dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, dispidTaskSelectionChangedEvent: 56, dispidResourceSelectionChangedEvent: 57, dispidViewSelectionChangedEvent: 58, @@ -1390,6 +1470,7 @@ OSF.DDA.ErrorCodeManager=(function () { ooeInvalidParam: 5010, ooeRequestTimeout: 5011, ooeInvalidOrTimedOutSession: 5012, + ooeInvalidApiArguments: 5013, ooeTooManyIncompleteRequests: 5100, ooeRequestTokenUnavailable: 5101, ooeActivityLimitReached: 5102, @@ -1425,7 +1506,18 @@ OSF.DDA.ErrorCodeManager=(function () { ooeEndUserAllow: 12008, ooeEndUserIgnore: 12009, ooeNotUILessDialog: 12010, - ooeCrossZone: 12011 + ooeCrossZone: 12011, + ooeNotSSOAgave: 13000, + ooeSSOUserNotSignedIn: 13001, + ooeSSOUserAborted: 13002, + ooeSSOUnsupportedUserIdentity: 13003, + ooeSSOInvalidResourceUrl: 13004, + ooeSSOInvalidGrant: 13005, + ooeSSOClientError: 13006, + ooeSSOServerError: 13007, + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009, + ooeSSOConnectionLost: 13010 }, initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={ name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotSupported }; @@ -1483,6 +1575,7 @@ OSF.DDA.ErrorCodeManager=(function () { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={ name: stringNS.L_APICallFailed, message: stringNS.L_TooManyIncompleteRequests }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={ name: stringNS.L_APICallFailed, message: stringNS.L_RequestTokenUnavailable }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={ name: stringNS.L_APICallFailed, message: stringNS.L_ActivityLimitReached }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={ name: stringNS.L_APICallFailed, message: stringNS.L_InvalidApiArgumentsMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={ name: stringNS.L_InvalidNode, message: stringNS.L_CustomXmlNodeNotFound }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={ name: stringNS.L_CustomXmlError, message: stringNS.L_CustomXmlError }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={ name: stringNS.L_CustomXmlExceedQuotaName, message: stringNS.L_CustomXmlExceedQuotaMessage }; @@ -1513,6 +1606,17 @@ OSF.DDA.ErrorCodeManager=(function () { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={ name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogRequireHTTPS }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={ name: stringNS.L_DisplayDialogError, message: stringNS.L_UserClickIgnore }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={ name: stringNS.L_DisplayDialogError, message: stringNS.L_NewWindowCrossZoneErrorString }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={ name: stringNS.L_APINotSupported, message: stringNS.L_InvalidSSOAddinMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={ name: stringNS.L_UserNotSignedIn, message: stringNS.L_UserNotSignedIn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={ name: stringNS.L_UserAborted, message: stringNS.L_UserAbortedMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={ name: stringNS.L_UnsupportedUserIdentity, message: stringNS.L_UnsupportedUserIdentityMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={ name: stringNS.L_InvalidResourceUrl, message: stringNS.L_InvalidResourceUrlMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={ name: stringNS.L_InvalidGrant, message: stringNS.L_InvalidGrantMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={ name: stringNS.L_SSOClientError, message: stringNS.L_SSOClientErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={ name: stringNS.L_SSOServerError, message: stringNS.L_SSOServerErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={ name: stringNS.L_AddinIsAlreadyRequestingToken, message: stringNS.L_AddinIsAlreadyRequestingTokenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={ name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={ name: stringNS.L_SSOConnectionLostError, message: stringNS.L_SSOConnectionLostErrorMessage }; } }; })(); @@ -2035,6 +2139,7 @@ var OfficeExt; web: Microsoft.Office.WebExtension.PlatformType.OfficeOnline, winrt: Microsoft.Office.WebExtension.PlatformType.Universal, win32: Microsoft.Office.WebExtension.PlatformType.PC, + mac: Microsoft.Office.WebExtension.PlatformType.Mac, ios: Microsoft.Office.WebExtension.PlatformType.iOS, android: Microsoft.Office.WebExtension.PlatformType.Android }; @@ -2208,6 +2313,11 @@ OSF.DDA.Context=function OSF_DDA_Context(officeAppContext, document, license, ap value: officeAppContext.ui }); } + if (officeAppContext.auth) { + OSF.OUtil.defineEnumerableProperty(this, "auth", { + value: officeAppContext.auth + }); + } if (officeAppContext.get_isDialog()) { var requirements=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); OSF.OUtil.defineEnumerableProperty(this, "requirements", { @@ -2982,9 +3092,11 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, "ClearFormatsAsync": did.dispidClearFormatsMethod, "SetTableOptionsAsync": did.dispidSetTableOptionsMethod, "SetFormatsAsync": did.dispidSetFormatsMethod, + "GetAccessTokenAsync": did.dispidGetAccessTokenMethod, "ExecuteRichApiRequestAsync": did.dispidExecuteRichApiRequestMethod, "AppCommandInvocationCompletedAsync": did.dispidAppCommandInvocationCompletedMethod, "CloseContainerAsync": did.dispidCloseContainerMethod, + "OpenBrowserWindow": did.dispidOpenBrowserWindow, "AddDataPartAsync": did.dispidAddDataPartMethod, "GetDataPartByIdAsync": did.dispidGetDataPartByIdMethod, "GetDataPartsByNameSpaceAsync": did.dispidGetDataPartsByNamespaceMethod, @@ -3024,13 +3136,13 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, } jsom=OSF.DDA.SyncMethodNames; did=OSF.DDA.MethodDispId; - var asyncMethodMap={ + var syncMethodMap={ "MessageParent": did.dispidMessageParentMethod, "SendMessage": did.dispidSendMessageMethod }; - for (var method in asyncMethodMap) { + for (var method in syncMethodMap) { if (jsom[method]) { - dispIdMap[jsom[method].id]=asyncMethodMap[method]; + dispIdMap[jsom[method].id]=syncMethodMap[method]; } } jsom=Microsoft.Office.WebExtension.EventType; @@ -3046,7 +3158,14 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, "AppCommandInvoked": did.dispidAppCommandInvokedEvent, "DialogMessageReceived": did.dispidDialogMessageReceivedEvent, "DialogParentMessageReceived": did.dispidDialogParentMessageReceivedEvent, + "ObjectDeleted": did.dispidObjectDeletedEvent, + "ObjectSelectionChanged": did.dispidObjectSelectionChangedEvent, + "ObjectDataChanged": did.dispidObjectDataChangedEvent, + "ContentControlAdded": did.dispidContentControlAddedEvent, + "RichApiMessage": did.dispidRichApiMessageEvent, "ItemChanged": did.dispidOlkItemSelectedChangedEvent, + "RecipientsChanged": did.dispidOlkRecipientsChangedEvent, + "AppointmentTimeChanged": did.dispidOlkAppointmentTimeChangedEvent, "TaskSelectionChanged": did.dispidTaskSelectionChangedEvent, "ResourceSelectionChanged": did.dispidResourceSelectionChangedEvent, "ViewSelectionChanged": did.dispidViewSelectionChangedEvent, @@ -3059,6 +3178,12 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, dispIdMap[jsom[event]]=eventMap[event]; } } + function IsObjectEvent(dispId) { + return (dispId==OSF.DDA.EventDispId.dispidObjectDeletedEvent || + dispId==OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent || + dispId==OSF.DDA.EventDispId.dispidObjectDataChangedEvent || + dispId==OSF.DDA.EventDispId.dispidContentControlAddedEvent); + } function onException(ex, asyncMethodCall, suppliedArgs, callArgs) { if (typeof ex=="number") { if (!callArgs) { @@ -3084,11 +3209,13 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, window.Excel._RedirectV1APIs=true; } if (window.Excel && window.Excel._RedirectV1APIs && (richApiInExcelMethodSubstitution=window.Excel._V1APIMap[methodName])) { + var preprocessedCallArgs=OSF.OUtil.shallowCopy(callArgs); + delete preprocessedCallArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; if (richApiInExcelMethodSubstitution.preprocess) { - callArgs=richApiInExcelMethodSubstitution.preprocess(callArgs); + preprocessedCallArgs=richApiInExcelMethodSubstitution.preprocess(preprocessedCallArgs); } var ctx=new window.Excel.RequestContext(); - var result=richApiInExcelMethodSubstitution.call(ctx, callArgs); + var result=richApiInExcelMethodSubstitution.call(ctx, preprocessedCallArgs); ctx.sync() .then(function () { var response=result.value; @@ -3096,7 +3223,7 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, delete response["status"]; delete response["@odata.type"]; if (richApiInExcelMethodSubstitution.postprocess) { - response=richApiInExcelMethodSubstitution.postprocess(response, callArgs); + response=richApiInExcelMethodSubstitution.postprocess(response, preprocessedCallArgs); } if (status !=0) { response=OSF.DDA.ErrorCodeManager.getErrorArgs(status); @@ -3114,6 +3241,7 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, else { hostCallArgs=callArgs; } + var startTime=(new Date()).getTime(); delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ "dispId": dispId, "hostCallArgs": hostCallArgs, @@ -3134,6 +3262,9 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, } var payload=asyncMethodCall.processResponse(status, responseArgs, caller, callArgs); OSF.DDA.issueAsyncResult(callArgs, status, payload); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(dispId, hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); + } } }); } @@ -3145,9 +3276,11 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, this[OSF.DDA.DispIdHost.Methods.AddEventHandler]=function OSF_DDA_DispIdHost_Facade$AddEventHandler(suppliedArguments, eventDispatch, caller, isPopupWindow) { var callArgs; var eventType, handler; + var isObjectEvent=false; function onEnsureRegistration(status) { if (status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { - var added=eventDispatch.addEventHandler(eventType, handler); + var added=!isObjectEvent ? eventDispatch.addEventHandler(eventType, handler) : + eventDispatch.addObjectEventHandler(eventType, callArgs[Microsoft.Office.WebExtension.Parameters.Id], handler); if (!added) { status=OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed; } @@ -3167,19 +3300,25 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); return; } - if (eventDispatch.getEventHandlerCount(eventType)==0) { - var dispId=dispIdMap[eventType]; + var dispId=dispIdMap[eventType]; + isObjectEvent=IsObjectEvent(dispId); + var targetId=(isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); + var count=isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId) : eventDispatch.getEventHandlerCount(eventType); + if (count==0) { var invoker=getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; invoker({ "eventType": eventType, "dispId": dispId, - "targetId": caller.id || "", + "targetId": targetId, "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, "onComplete": onEnsureRegistration, "onEvent": function handleEvent(hostArgs) { var args=parameterMap.fromHost(dispId, hostArgs); - eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType, caller, args)); + if (!isObjectEvent) + eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType, caller, args)); + else + eventDispatch.fireObjectEvent(targetId, OSF.DDA.OMFactory.manufactureEventArgs(eventType, targetId, args)); } }); } @@ -3194,6 +3333,7 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, this[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]=function OSF_DDA_DispIdHost_Facade$RemoveEventHandler(suppliedArguments, eventDispatch, caller) { var callArgs; var eventType, handler; + var isObjectEvent=false; function onEnsureRegistration(status) { var error; if (status !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { @@ -3206,22 +3346,25 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); eventType=callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; handler=callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + var dispId=dispIdMap[eventType]; + isObjectEvent=IsObjectEvent(dispId); + var targetId=(isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); var status, removeSuccess; if (handler===null) { - removeSuccess=eventDispatch.clearEventHandlers(eventType); + removeSuccess=isObjectEvent ? eventDispatch.clearObjectEventHandlers(eventType, targetId) : eventDispatch.clearEventHandlers(eventType); status=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; } else { - removeSuccess=eventDispatch.removeEventHandler(eventType, handler); + removeSuccess=isObjectEvent ? eventDispatch.removeObjectEventHandler(eventType, targetId, handler) : eventDispatch.removeEventHandler(eventType, handler); status=removeSuccess ? OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess : OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist; } - if (removeSuccess && eventDispatch.getEventHandlerCount(eventType)==0) { - var dispId=dispIdMap[eventType]; + var count=isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId) : eventDispatch.getEventHandlerCount(eventType); + if (removeSuccess && count==0) { var invoker=getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; invoker({ "eventType": eventType, "dispId": dispId, - "targetId": caller.id || "", + "targetId": targetId, "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, "onComplete": onEnsureRegistration @@ -3989,7 +4132,6 @@ OSF.DDA.SafeArray.Delegate.executeAsync=function OSF_DDA_SafeArray_Delegate$Exec if (args.onCalling) { args.onCalling(); } - var startTime=(new Date()).getTime(); OSF.ClientHostController.execute(args.dispId, toArray(args.hostCallArgs), function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode) { var result=hostResponseArgs.toArray(); var status=result[OSF.DDA.SafeArray.Response.Status]; @@ -4036,9 +4178,6 @@ OSF.DDA.SafeArray.Delegate.executeAsync=function OSF_DDA_SafeArray_Delegate$Exec } args.onComplete(status, payload); } - if (OSF.AppTelemetry) { - OSF.AppTelemetry.onMethodDone(args.dispId, args.hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); - } return true; }); } @@ -4154,6 +4293,13 @@ OSF.InitializationHelper.prototype.prepareApiSurface=function OSF_Initialization } } } + if (OSF.DDA.OpenBrowser) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.OpenBrowserWindow]); + } + if (OSF.DDA.Auth) { + appContext.auth=new OSF.DDA.Auth(); + OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth, [OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]); + } OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(appContext, appContext.doc, license, null, getOfficeThemeHandler)); var getDelegateMethods, parameterMap; getDelegateMethods=OSF.DDA.DispIdHost.getClientDelegateMethods; @@ -4395,6 +4541,7 @@ OSF.ScriptMessaging=OSFWebView.ScriptMessaging; var OSFWebView; (function (OSFWebView) { OSFWebView.MessageHandlerName="Agave"; + OSFWebView.PopupMessageHandlerName="WefPopupHandler"; (function (AppContextProperties) { AppContextProperties[AppContextProperties["Settings"]=0]="Settings"; AppContextProperties[AppContextProperties["SolutionReferenceId"]=1]="SolutionReferenceId"; @@ -4491,10 +4638,10 @@ var OSFWebView; }; WebViewHostController.prototype.openDialog=function (id, targetId, handler, callback) { var callArgs=JSON.parse(targetId); - if (isNaN(callArgs.width) || callArgs.width <=0 || callArgs.width > 100) { + if (isNaN(callArgs.width) || callArgs.width <=0 || (!callArgs.useDeviceIndependentPixels && callArgs.width > 100)) { callArgs.width=99; } - if (isNaN(callArgs.height) || callArgs.height <=0 || callArgs.height > 100) { + if (isNaN(callArgs.height) || callArgs.height <=0 || (!callArgs.useDeviceIndependentPixels && callArgs.height > 100)) { callArgs.height=99; } targetId=JSON.stringify(callArgs); @@ -4672,9 +4819,27 @@ OSF.InitializationHelper.prototype.getAppContext=function OSF_InitializationHelp } gotAppContext(returnedContext); }; - OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.WebView.MessageHandlerName, OSF.WebView.MethodId.GetContext, [], getInvocationCallback); + var handler; + if (this._hostInfo.isDialog) { + handler=OSF.WebView.PopupMessageHandlerName; + } + else { + handler=OSF.WebView.MessageHandlerName; + } + OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(handler, OSF.WebView.MethodId.GetContext, [], getInvocationCallback); }; OSF.InitializationHelper.prototype.setAgaveHostCommunication=function OSF_InitializationHelper$setAgaveHostCommunicationOverride() { + var getAllTabElements=function () { + var tabbableElementsSelector="a[href]:not([tabindex='-1'])," ++"area[href]:not([tabindex='-1'])," ++"button:not([disabled]):not([tabindex='-1'])," ++"input:not([disabled]):not([tabindex='-1'])," ++"select:not([disabled]):not([tabindex='-1'])," ++"textarea:not([disabled]):not([tabindex='-1'])," ++"*[tabindex]:not([tabindex='-1'])," ++"*[contenteditable]:not([disabled]):not([tabindex='-1'])"; + return document.querySelectorAll(tabbableElementsSelector); + }; OSF.OUtil.addEventListener(window, "keydown", function (e) { e.preventDefault=e.preventDefault || function () { e.returnValue=false; @@ -4696,15 +4861,7 @@ OSF.InitializationHelper.prototype.setAgaveHostCommunication=function OSF_Initia else if (e.keyCode==9) { e.preventDefault(); e.stopPropagation(); - var tabbableElementsSelector="a[href]:not([tabindex='-1'])," -+"area[href]:not([tabindex='-1'])," -+"button:not([disabled]):not([tabindex='-1'])," -+"input:not([disabled]):not([tabindex='-1'])," -+"select:not([disabled]):not([tabindex='-1'])," -+"textarea:not([disabled]):not([tabindex='-1'])," -+"*[tabindex]:not([tabindex='-1'])," -+"*[contenteditable]:not([disabled]):not([tabindex='-1'])"; - var allTabbableElements=document.querySelectorAll(tabbableElementsSelector); + var allTabbableElements=getAllTabElements(); if (allTabbableElements.length==0) { return; } @@ -4720,6 +4877,35 @@ OSF.InitializationHelper.prototype.setAgaveHostCommunication=function OSF_Initia }; }; windowOpen(window); + var setDefaultFocus=function OSF_InitializationHelper$setDefaultFocus() { + try { + if (document.activeElement==null || document.activeElement==document.body) { + var allTabbableElements=getAllTabElements(); + if (allTabbableElements && allTabbableElements.length > 0) { + OSF.OUtil.focusToFirstTabbable(allTabbableElements, false); + } + } + } + catch (err) { + OsfMsAjaxFactory.msAjaxDebug.trace("Setting Agave default focus failed. Exception:"+err); + } + }; + if (document.body) { + setDefaultFocus(); + } + else { + document.addEventListener('DOMContentLoaded', setDefaultFocus); + } + window.addEventListener("blur", function () { + try { + if (document.activeElement) { + document.activeElement.blur(); + } + } + catch (err) { + OsfMsAjaxFactory.msAjaxDebug.trace("Clearing Agave focus failed. Exception:"+err); + } + }); }; OSF.WebView=OSFWebView; OSF.ClientHostController=new OSFWebView.WebViewHostController(OSF.ScriptMessaging.GetScriptMessenger("agaveHostCallback", "agaveHostEventCallback", new WinRT.Poster())); @@ -5201,7 +5387,7 @@ var OSFAriaLogger; function AriaLogger() { } AriaLogger.prototype.getAriaCDNLocation=function () { - return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry-2.8.0.min.js"); + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry.js"); }; AriaLogger.getInstance=function () { if (AriaLogger.AriaLoggerObj===undefined) { @@ -5218,13 +5404,10 @@ var OSFAriaLogger; try { if (!this.ALogger) { var OfficeExtensibilityTenantID="db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; - var configuration=new microsoft.applications.telemetry.LogConfiguration(); - configuration.enableAutoUserSession=true; - microsoft.applications.telemetry.LogManager.initialize(OfficeExtensibilityTenantID, configuration); - this.ALogger=new microsoft.applications.telemetry.Logger(); + this.ALogger=AWTLogManager.initialize(OfficeExtensibilityTenantID); } - var eventProperties=new microsoft.applications.telemetry.EventProperties(); - eventProperties.name="Office.Extensibility.OfficeJS."+tableName; + var eventProperties=new AWTEventProperties(); + eventProperties.setName("Office.Extensibility.OfficeJS."+tableName); for (var key in telemetryData) { if (key.toLowerCase() !=="table") { eventProperties.setProperty(key, telemetryData[key]); @@ -5257,6 +5440,7 @@ var OSFAppTelemetry; var sessionId=OSF.OUtil.Guid.generateNewGuid(); var osfControlAppCorrelationId=""; var omexDomainRegex=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"); + OSFAppTelemetry.enableTelemetry=true; ; var AppInfo=(function () { function AppInfo() { @@ -5340,17 +5524,19 @@ var OSFAppTelemetry; function AppLogger() { } AppLogger.prototype.LogData=function (data) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, data.SerializeRow(), OSF.Logger.SendFlag.none); - OSFAriaLogger.AriaLogger.getInstance().logData(data); + try { + OSFAriaLogger.AriaLogger.getInstance().logData(data); + } + catch (e) { + } }; AppLogger.prototype.LogRawData=function (log) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, log, OSF.Logger.SendFlag.none); try { OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)); } @@ -5390,7 +5576,7 @@ var OSFAppTelemetry; } appInfo.message=context.get_hostCustomMessage(); appInfo.officeJSVersion=OSF.ConstantNames.FileVersion; - appInfo.hostJSVersion="16.0.7923.1000"; + appInfo.hostJSVersion="16.0.8828.1000"; if (context._wacHostEnvironment) { appInfo.wacHostEnvironment=context._wacHostEnvironment; } @@ -5642,10 +5828,15 @@ OSF.DDA.SafeArray.Delegate.ParameterMap.define({ Microsoft.Office.WebExtension.EventType={}; OSF.EventDispatch=function OSF_EventDispatch(eventTypes) { this._eventHandlers={}; + this._objectEventHandlers={}; this._queuedEventsArgs={}; for (var entry in eventTypes) { var eventType=eventTypes[entry]; - this._eventHandlers[eventType]=[]; + var isObjectEvent=(eventType=="objectDeleted" || eventType=="objectSelectionChanged" || eventType=="objectDataChanged" || eventType=="contentControlAdded"); + if (!isObjectEvent) + this._eventHandlers[eventType]=[]; + else + this._objectEventHandlers[eventType]={}; this._queuedEventsArgs[eventType]=[]; } }; @@ -5654,17 +5845,20 @@ OSF.EventDispatch.prototype={ var events=[]; for (var eventName in this._eventHandlers) events.push(eventName); + for (var eventName in this._objectEventHandlers) + events.push(eventName); return events; }, supportsEvent: function OSF_EventDispatch$supportsEvent(event) { - var isSupported=false; for (var eventName in this._eventHandlers) { - if (event==eventName) { - isSupported=true; - break; - } + if (event==eventName) + return true; + } + for (var eventName in this._objectEventHandlers) { + if (event==eventName) + return true; } - return isSupported; + return false; }, hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) { var handlers=this._eventHandlers[eventType]; @@ -5676,6 +5870,17 @@ OSF.EventDispatch.prototype={ } return false; }, + hasObjectEventHandler: function OSF_EventDispatch$hasObjectEventHandler(eventType, objectId, handler) { + var handlers=this._objectEventHandlers[eventType]; + if (handlers !=null) { + var _handlers=handlers[objectId]; + for (var i=0; _handlers !=null && i < _handlers.length; i++) { + if (_handlers[i]===handler) + return true; + } + } + return false; + }, addEventHandler: function OSF_EventDispatch$addEventHandler(eventType, handler) { if (typeof handler !="function") { return false; @@ -5689,6 +5894,19 @@ OSF.EventDispatch.prototype={ return false; } }, + addObjectEventHandler: function OSF_EventDispatch$addObjectEventHandler(eventType, objectId, handler) { + if (typeof handler !="function") { + return false; + } + var handlers=this._objectEventHandlers[eventType]; + if (handlers && !this.hasObjectEventHandler(eventType, objectId, handler)) { + if (handlers[objectId]==null) + handlers[objectId]=[]; + handlers[objectId].push(handler); + return true; + } + return false; + }, addEventHandlerAndFireQueuedEvent: function OSF_EventDispatch$addEventHandlerAndFireQueuedEvent(eventType, handler) { var handlers=this._eventHandlers[eventType]; var isFirstHandler=handlers.length==0; @@ -5710,6 +5928,19 @@ OSF.EventDispatch.prototype={ } return false; }, + removeObjectEventHandler: function OSF_EventDispatch$removeObjectEventHandler(eventType, objectId, handler) { + var handlers=this._objectEventHandlers[eventType]; + if (handlers !=null) { + var _handlers=handlers[objectId]; + for (var i=0; _handlers !=null && i < _handlers.length; i++) { + if (_handlers[i]===handler) { + _handlers.splice(i, 1); + return true; + } + } + } + return false; + }, clearEventHandlers: function OSF_EventDispatch$clearEventHandlers(eventType) { if (typeof this._eventHandlers[eventType] !="undefined" && this._eventHandlers[eventType].length > 0) { this._eventHandlers[eventType]=[]; @@ -5717,9 +5948,21 @@ OSF.EventDispatch.prototype={ } return false; }, + clearObjectEventHandlers: function OSF_EventDispatch$clearObjectEventHandlers(eventType, objectId) { + if (this._objectEventHandlers[eventType] !=null && this._objectEventHandlers[eventType][objectId] !=null) { + this._objectEventHandlers[eventType][objectId]=[]; + return true; + } + return false; + }, getEventHandlerCount: function OSF_EventDispatch$getEventHandlerCount(eventType) { return this._eventHandlers[eventType] !=undefined ? this._eventHandlers[eventType].length : -1; }, + getObjectEventHandlerCount: function OSF_EventDispatch$getObjectEventHandlerCount(eventType, objectId) { + if (this._objectEventHandlers[eventType]==null || this._objectEventHandlers[eventType][objectId]==null) + return 0; + return this._objectEventHandlers[eventType][objectId].length; + }, fireEvent: function OSF_EventDispatch$fireEvent(eventArgs) { if (eventArgs.type==undefined) return false; @@ -5734,6 +5977,21 @@ OSF.EventDispatch.prototype={ return false; } }, + fireObjectEvent: function OSF_EventDispatch$fireObjectEvent(objectId, eventArgs) { + if (eventArgs.type==undefined) + return false; + var eventType=eventArgs.type; + if (eventType && this._objectEventHandlers[eventType]) { + var eventHandlers=this._objectEventHandlers[eventType]; + var _handlers=eventHandlers[objectId]; + if (_handlers !=null) { + for (var i=0; i < _handlers.length; i++) + _handlers[i](eventArgs); + return true; + } + } + return false; + }, fireOrQueueEvent: function OSF_EventDispatch$fireOrQueueEvent(eventArgs) { var eventType=eventArgs.type; if (eventType && this._eventHandlers[eventType]) { @@ -5803,6 +6061,15 @@ OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEve case Microsoft.Office.WebExtension.EventType.AppCommandInvoked: args=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(eventProperties); break; + case Microsoft.Office.WebExtension.EventType.ObjectDeleted: + case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged: + case Microsoft.Office.WebExtension.EventType.ObjectDataChanged: + case Microsoft.Office.WebExtension.EventType.ContentControlAdded: + args=new OSF.DDA.ObjectEventArgs(eventType, eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); + break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args=new OSF.DDA.RichApiMessageEventArgs(eventType, eventProperties); + break; case Microsoft.Office.WebExtension.EventType.DataNodeInserted: args=new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); break; @@ -5828,10 +6095,28 @@ OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEve args=new OSF.DDA.DialogParentEventArgs(eventProperties); break; case Microsoft.Office.WebExtension.EventType.ItemChanged: - if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlookwebapp") { + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { args=new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); target.initialize(args["initialData"]); - target.setCurrentItemNumber(args["itemNumber"].itemNumber); + if (OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]=="win32") { + target.setCurrentItemNumber(args["itemNumber"].itemNumber); + } + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { + args=new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { + args=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); } else { throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); @@ -6018,6 +6303,13 @@ OSF.DDA.AsyncMethodCalls.define({ "types": ["boolean"], "defaultValue": false } + }, + { + name: Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels, + value: { + "types": ["boolean"], + "defaultValue": false + } } ], privateStateCallbacks: [], @@ -6055,13 +6347,13 @@ OSF.DDA.AsyncMethodCalls.define({ if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] <=0) { callArgs[Microsoft.Office.WebExtension.Parameters.Width]=1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Width]=99; } if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] <=0) { callArgs[Microsoft.Office.WebExtension.Parameters.Height]=1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Height]=99; } if (!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) { @@ -6593,52 +6885,10 @@ OSF.DDA.SettingsManager={ DateJSONPrefix: "Date(", DataJSONSuffix: ")", serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) { - var ret={}; - for (var key in settingsCollection) { - var value=settingsCollection[key]; - try { - if (JSON) { - value=JSON.stringify(value, function dateReplacer(k, v) { - return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix+this[k].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix : v; - }); - } - else { - value=Sys.Serialization.JavaScriptSerializer.serialize(value); - } - ret[key]=value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.serializeSettings(settingsCollection); }, deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) { - var ret={}; - serializedSettings=serializedSettings || {}; - for (var key in serializedSettings) { - var value=serializedSettings[key]; - try { - if (JSON) { - value=JSON.parse(value, function dateReviver(k, v) { - var d; - if (typeof v==='string' && v && v.length > 6 && v.slice(0, 5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) { - d=new Date(parseInt(v.slice(5, -1))); - if (d) { - return d; - } - } - return v; - }); - } - else { - value=Sys.Serialization.JavaScriptSerializer.deserialize(value, true); - } - ret[key]=value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.deserializeSettings(serializedSettings); } }; OSF.DDA.Settings=function OSF_DDA_Settings(settings) { @@ -6783,7 +7033,53 @@ OSF.DDA.DocumentSelectionChangedEventArgs=function OSF_DDA_DocumentSelectionChan } }); }; +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectDeleted: "objectDeleted" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectSelectionChanged: "objectSelectionChanged" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectDataChanged: "objectDataChanged" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ContentControlAdded: "contentControlAdded" }); +OSF.DDA.ObjectEventArgs=function OSF_DDA_ObjectEventArgs(eventType, object) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { value: eventType }, + "object": { value: object } + }); +}; OSF.DDA.SafeArray.Delegate.ParameterMap.define({ type: OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent }); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectDeletedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectDataChangedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidContentControlAddedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); Microsoft.Office.WebExtension.TableData=function Microsoft_Office_WebExtension_TableData(rows, headers) { function fixData(data) { if (data==null || data==undefined) { @@ -7026,7 +7322,10 @@ OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { DataNodeDeleted: "nodeDeleted", DataNodeInserted: "nodeInserted", - DataNodeReplaced: "nodeReplaced" + DataNodeReplaced: "nodeReplaced", + NodeDeleted: "nodeDeleted", + NodeInserted: "nodeInserted", + NodeReplaced: "nodeReplaced" }); OSF.DDA.CustomXmlParts=function OSF_DDA_CustomXmlParts() { this._eventDispatches=[]; @@ -7939,9 +8238,10 @@ var __extends=(this && this.__extends) || function (d, b) { var OfficeExtension; (function (OfficeExtension) { var Action=(function () { - function Action(actionInfo, isWriteOperation) { + function Action(actionInfo, isWriteOperation, isRestrictedResourceAccess) { this.m_actionInfo=actionInfo; this.m_isWriteOperation=isWriteOperation; + this.m_isRestrictedResourceAccess=isRestrictedResourceAccess; } Object.defineProperty(Action.prototype, "actionInfo", { get: function () { @@ -7957,12 +8257,30 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(Action.prototype, "isRestrictedResourceAccess", { + get: function () { + return this.m_isRestrictedResourceAccess; + }, + enumerable: true, + configurable: true + }); return Action; }()); OfficeExtension.Action=Action; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + var TraceMarkerActionResultHandler=(function () { + function TraceMarkerActionResultHandler(callback) { + this.m_callback=callback; + } + TraceMarkerActionResultHandler.prototype._handleResult=function (value) { + if (this.m_callback) { + this.m_callback(); + } + }; + return TraceMarkerActionResultHandler; + }()); var ActionFactory=(function () { function ActionFactory() { } @@ -7978,13 +8296,17 @@ var OfficeExtension; var args=[value]; var referencedArgumentObjectPaths=OfficeExtension.Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); OfficeExtension.Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); - var ret=new OfficeExtension.Action(actionInfo, true); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + context._pendingRequest.ensureInstantiateObjectPaths(referencedArgumentObjectPaths); + var ret=new OfficeExtension.Action(actionInfo, true, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); context._pendingRequest.addReferencedObjectPaths(referencedArgumentObjectPaths); + ret.referencedObjectPath=parent._objectPath; + ret.referencedArgumentObjectPaths=referencedArgumentObjectPaths; return ret; }; - ActionFactory.createMethodAction=function (context, parent, methodName, operationType, args) { + ActionFactory.createMethodAction=function (context, parent, methodName, operationType, args, isRestrictedResourceAccess) { OfficeExtension.Utility.validateObjectPath(parent); var actionInfo={ Id: context._nextId(), @@ -7995,15 +8317,20 @@ var OfficeExtension; }; var referencedArgumentObjectPaths=OfficeExtension.Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); OfficeExtension.Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + context._pendingRequest.ensureInstantiateObjectPaths(referencedArgumentObjectPaths); var isWriteOperation=operationType !=1; - var ret=new OfficeExtension.Action(actionInfo, isWriteOperation); + var ret=new OfficeExtension.Action(actionInfo, isWriteOperation, isRestrictedResourceAccess); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); context._pendingRequest.addReferencedObjectPaths(referencedArgumentObjectPaths); + ret.referencedObjectPath=parent._objectPath; + ret.referencedArgumentObjectPaths=referencedArgumentObjectPaths; return ret; }; ActionFactory.createQueryAction=function (context, parent, queryOption) { OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); var actionInfo={ Id: context._nextId(), ActionType: 2, @@ -8011,13 +8338,15 @@ var OfficeExtension; ObjectPathId: parent._objectPath.objectPathInfo.Id, }; actionInfo.QueryInfo=queryOption; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; return ret; }; ActionFactory.createRecursiveQueryAction=function (context, parent, query) { OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); var actionInfo={ Id: context._nextId(), ActionType: 6, @@ -8025,23 +8354,59 @@ var OfficeExtension; ObjectPathId: parent._objectPath.objectPathInfo.Id, RecursiveQueryInfo: query }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; + return ret; + }; + ActionFactory.createQueryAsJsonAction=function (context, parent, queryOption) { + OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + var actionInfo={ + Id: context._nextId(), + ActionType: 7, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + }; + actionInfo.QueryInfo=queryOption; + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; + return ret; + }; + ActionFactory.createEnsureUnchangedAction=function (context, parent, objectState) { + OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + var actionInfo={ + Id: context._nextId(), + ActionType: 8, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }; + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; return ret; }; ActionFactory.createInstantiateAction=function (context, obj) { OfficeExtension.Utility.validateObjectPath(obj); + context._pendingRequest.ensureInstantiateObjectPath(obj._objectPath.parentObjectPath); + context._pendingRequest.ensureInstantiateObjectPaths(obj._objectPath.argumentObjectPaths); var actionInfo={ Id: context._nextId(), ActionType: 1, Name: "", ObjectPathId: obj._objectPath.objectPathInfo.Id }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(obj._objectPath); context._pendingRequest.addActionResultHandler(ret, new OfficeExtension.InstantiateActionResultHandler(obj)); + ret.referencedObjectPath=obj._objectPath; return ret; }; ActionFactory.createTraceAction=function (context, message, addTraceMessage) { @@ -8051,13 +8416,17 @@ var OfficeExtension; Name: "Trace", ObjectPathId: 0 }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); if (addTraceMessage) { context._pendingRequest.addTrace(actionInfo.Id, message); } return ret; }; + ActionFactory.createTraceMarkerForCallback=function (context, callback) { + var action=ActionFactory.createTraceAction(context, null, false); + context._pendingRequest.addActionResultHandler(action, new TraceMarkerActionResultHandler(callback)); + }; return ActionFactory; }()); OfficeExtension.ActionFactory=ActionFactory; @@ -8135,6 +8504,7 @@ var OfficeExtension; }; ClientObject.prototype._recursivelySet=function (input, options, scalarWriteablePropertyNames, objectPropertyNames, notAllowedToBeSetPropertyNames) { var isClientObject=(input instanceof ClientObject); + var originalInput=input; if (isClientObject) { if (Object.getPrototypeOf(this)===Object.getPrototypeOf(input)) { input=JSON.parse(JSON.stringify(input)); @@ -8151,31 +8521,38 @@ var OfficeExtension; for (var i=0; i < scalarWriteablePropertyNames.length; i++) { prop=scalarWriteablePropertyNames[i]; if (input.hasOwnProperty(prop)) { - this[prop]=input[prop]; + if (typeof input[prop] !=="undefined") { + this[prop]=input[prop]; + } } } for (var i=0; i < objectPropertyNames.length; i++) { prop=objectPropertyNames[i]; if (input.hasOwnProperty(prop)) { - this[prop].set(input[prop], options); + if (typeof input[prop] !=="undefined") { + var dataToPassToSet=isClientObject ? originalInput[prop] : input[prop]; + this[prop].set(dataToPassToSet, options); + } } } + var throwOnReadOnly=!isClientObject; + if (options && !OfficeExtension.Utility.isNullOrUndefined(throwOnReadOnly)) { + throwOnReadOnly=options.throwOnReadOnly; + } for (var i=0; i < notAllowedToBeSetPropertyNames.length; i++) { prop=notAllowedToBeSetPropertyNames[i]; if (input.hasOwnProperty(prop)) { - throw new OfficeExtension._Internal.RuntimeError({ - code: OfficeExtension.ErrorCodes.invalidArgument, - message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), - debugInfo: { - errorLocation: prop - } - }); + if (typeof input[prop] !=="undefined" && throwOnReadOnly) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.invalidArgument, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), + debugInfo: { + errorLocation: prop + } + }); + } } } - var throwOnReadOnly=!isClientObject; - if (options && !OfficeExtension.Utility.isNullOrUndefined(throwOnReadOnly)) { - throwOnReadOnly=options.throwOnReadOnly; - } for (prop in input) { if (scalarWriteablePropertyNames.indexOf(prop) < 0 && objectPropertyNames.indexOf(prop) < 0) { var propertyDescriptor=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this), prop); @@ -8223,12 +8600,14 @@ var OfficeExtension; this.m_actions=[]; this.m_actionResultHandler={}; this.m_referencedObjectPaths={}; + this.m_instantiatedObjectPaths={}; this.m_flags=0; this.m_traceInfos={}; this.m_pendingProcessEventHandlers=[]; this.m_pendingEventHandlerActions={}; this.m_responseTraceIds={}; this.m_responseTraceMessages=[]; + this.m_preSyncPromises=[]; } Object.defineProperty(ClientRequest.prototype, "flags", { get: function () { @@ -8274,7 +8653,13 @@ var OfficeExtension; if (action.isWriteOperation) { this.m_flags=this.m_flags | 1; } + if (action.isRestrictedResourceAccess) { + this.m_flags=this.m_flags | 2; + } this.m_actions.push(action); + if (action.actionInfo.ActionType==1) { + this.m_instantiatedObjectPaths[action.actionInfo.ObjectPathId]=action; + } }; Object.defineProperty(ClientRequest.prototype, "hasActions", { get: function () { @@ -8283,9 +8668,39 @@ var OfficeExtension; enumerable: true, configurable: true }); + ClientRequest.prototype._getLastAction=function () { + return this.m_actions[this.m_actions.length - 1]; + }; ClientRequest.prototype.addTrace=function (actionId, message) { this.m_traceInfos[actionId]=message; }; + ClientRequest.prototype.ensureInstantiateObjectPath=function (objectPath) { + if (objectPath) { + if (this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + this.ensureInstantiateObjectPath(objectPath.parentObjectPath); + this.ensureInstantiateObjectPaths(objectPath.argumentObjectPaths); + if (!this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + var actionInfo={ + Id: this.m_context._nextId(), + ActionType: 1, + Name: "", + ObjectPathId: objectPath.objectPathInfo.Id + }; + var instantiateAction=new OfficeExtension.Action(actionInfo, false, false); + instantiateAction.referencedObjectPath=objectPath; + this.addAction(instantiateAction); + } + } + }; + ClientRequest.prototype.ensureInstantiateObjectPaths=function (objectPaths) { + if (objectPaths) { + for (var i=0; i < objectPaths.length; i++) { + this.ensureInstantiateObjectPath(objectPaths[i]); + } + } + }; ClientRequest.prototype.addReferencedObjectPath=function (objectPath) { if (this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]) { return; @@ -8303,6 +8718,9 @@ var OfficeExtension; if (objectPath.isWriteOperation) { this.m_flags=this.m_flags | 1; } + if (objectPath.isRestrictedResourceAccess) { + this.m_flags=this.m_flags | 2; + } this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]=objectPath; if (objectPath.objectPathInfo.ObjectPathType==3) { this.addReferencedObjectPaths(objectPath.argumentObjectPaths); @@ -8321,6 +8739,9 @@ var OfficeExtension; this.m_actionResultHandler[action.actionInfo.Id]=resultHandler; }; ClientRequest.prototype.buildRequestMessageBody=function () { + if (OfficeExtension._internalConfig.enableEarlyDispose) { + ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } var objectPaths={}; for (var i in this.m_referencedObjectPaths) { objectPaths[i]=this.m_referencedObjectPaths[i].objectPathInfo; @@ -8371,12 +8792,95 @@ var OfficeExtension; ClientRequest.prototype._getPendingEventHandlerActions=function (eventHandlers) { return this.m_pendingEventHandlerActions[eventHandlers._id]; }; + ClientRequest.prototype._addPreSyncPromise=function (value) { + this.m_preSyncPromises.push(value); + }; + Object.defineProperty(ClientRequest.prototype, "_preSyncPromises", { + get: function () { + return this.m_preSyncPromises; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_actions", { + get: function () { + return this.m_actions; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_objectPaths", { + get: function () { + return this.m_referencedObjectPaths; + }, + enumerable: true, + configurable: true + }); + ClientRequest._updateLastUsedActionIdOfObjectPathId=function (lastUsedActionIdOfObjectPathId, objectPath, actionId) { + while (objectPath) { + if (lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]) { + return; + } + lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]=actionId; + var argumentObjectPaths=objectPath.argumentObjectPaths; + if (argumentObjectPaths) { + var argumentObjectPathsLength=argumentObjectPaths.length; + for (var i=0; i < argumentObjectPathsLength; i++) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, argumentObjectPaths[i], actionId); + } + } + objectPath=objectPath.parentObjectPath; + } + }; + ClientRequest._calculateLastUsedObjectPathIds=function (actions) { + var lastUsedActionIdOfObjectPathId={}; + var actionsLength=actions.length; + for (var index=actionsLength - 1; index >=0; --index) { + var action=actions[index]; + var actionId=action.actionInfo.Id; + if (action.referencedObjectPath) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, action.referencedObjectPath, actionId); + } + var referencedObjectPaths=action.referencedArgumentObjectPaths; + if (referencedObjectPaths) { + var referencedObjectPathsLength=referencedObjectPaths.length; + for (var refIndex=0; refIndex < referencedObjectPathsLength; refIndex++) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, referencedObjectPaths[refIndex], actionId); + } + } + } + var lastUsedObjectPathIdsOfAction={}; + for (var key in lastUsedActionIdOfObjectPathId) { + var actionId=lastUsedActionIdOfObjectPathId[key]; + var objectPathIds=lastUsedObjectPathIdsOfAction[actionId]; + if (!objectPathIds) { + objectPathIds=[]; + lastUsedObjectPathIdsOfAction[actionId]=objectPathIds; + } + objectPathIds.push(parseInt(key)); + } + for (var index=0; index < actionsLength; index++) { + var action=actions[index]; + var lastUsedObjectPathIds=lastUsedObjectPathIdsOfAction[action.actionInfo.Id]; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + action.actionInfo.L=lastUsedObjectPathIds; + } + else if (action.actionInfo.L) { + delete action.actionInfo.L; + } + } + }; return ClientRequest; }()); OfficeExtension.ClientRequest=ClientRequest; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + OfficeExtension._internalConfig={ + showDisposeInfoInDebugInfo: false, + enableEarlyDispose: true, + alwaysPolyfillClientObjectRetrieveMethod: false + }; var SessionBase=(function () { function SessionBase() { } @@ -8470,6 +8974,15 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(ClientRequestContext.prototype, "debugInfo", { + get: function () { + var prettyPrinter=new OfficeExtension.RequestPrettyPrinter(this._rootObjectPropertyName, this._pendingRequest._objectPaths, this._pendingRequest._actions, OfficeExtension._internalConfig.showDisposeInfoInDebugInfo); + var statements=prettyPrinter.process(); + return { pendingStatements: statements }; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ClientRequestContext.prototype, "trackedObjects", { get: function () { if (!this.m_trackedObjects) { @@ -8489,11 +9002,76 @@ var OfficeExtension; }); ClientRequestContext.prototype.load=function (clientObj, option) { OfficeExtension.Utility.validateContext(this, clientObj); - var queryOption=ClientRequestContext.parseQueryOption(option); + var queryOption=ClientRequestContext._parseQueryOption(option); var action=OfficeExtension.ActionFactory.createQueryAction(this, clientObj, queryOption); this._pendingRequest.addActionResultHandler(action, clientObj); }; - ClientRequestContext.parseQueryOption=function (option) { + ClientRequestContext.isLoadOption=function (loadOption) { + if (!OfficeExtension.Utility.isUndefined(loadOption.select) && (typeof (loadOption.select)==="string" || Array.isArray(loadOption.select))) + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.expand) && (typeof (loadOption.expand)==="string" || Array.isArray(loadOption.expand))) + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.top) && typeof (loadOption.top)==="number") + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.skip) && typeof (loadOption.skip)==="number") + return true; + for (var i in loadOption) { + return false; + } + return true; + }; + ClientRequestContext.parseStrictLoadOption=function (option) { + var ret={ Select: [] }; + ClientRequestContext.parseStrictLoadOptionHelper(ret, "", "option", option); + return ret; + }; + ClientRequestContext.combineQueryPath=function (pathPrefix, key, separator) { + if (pathPrefix.length===0) { + return key; + } + else { + return pathPrefix+separator+key; + } + }; + ClientRequestContext.parseStrictLoadOptionHelper=function (queryInfo, pathPrefix, argPrefix, option) { + for (var key in option) { + var value=option[key]; + if (key==="$all") { + if (typeof (value) !=="boolean") { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + if (value) { + queryInfo.Select.push(ClientRequestContext.combineQueryPath(pathPrefix, "*", "/")); + } + } + else if (key==="$top") { + if (typeof (value) !=="number" || pathPrefix.length > 0) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + queryInfo.Top=value; + } + else if (key==="$skip") { + if (typeof (value) !=="number" || pathPrefix.length > 0) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + queryInfo.Skip=value; + } + else { + if (typeof (value)==="boolean") { + if (value) { + queryInfo.Select.push(ClientRequestContext.combineQueryPath(pathPrefix, key, "/")); + } + } + else if (typeof (value)==="object") { + ClientRequestContext.parseStrictLoadOptionHelper(queryInfo, ClientRequestContext.combineQueryPath(pathPrefix, key, "/"), ClientRequestContext.combineQueryPath(argPrefix, key, "."), value); + } + else { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + } + } + }; + ClientRequestContext._parseQueryOption=function (option) { var queryOption={}; if (typeof (option)=="string") { var select=option; @@ -8502,41 +9080,46 @@ var OfficeExtension; else if (Array.isArray(option)) { queryOption.Select=option; } - else if (typeof (option)=="object") { + else if (typeof (option)==="object") { var loadOption=option; - if (typeof (loadOption.select)=="string") { - queryOption.Select=OfficeExtension.Utility._parseSelectExpand(loadOption.select); - } - else if (Array.isArray(loadOption.select)) { - queryOption.Select=loadOption.select; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.select)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.select"); - } - if (typeof (loadOption.expand)=="string") { - queryOption.Expand=OfficeExtension.Utility._parseSelectExpand(loadOption.expand); - } - else if (Array.isArray(loadOption.expand)) { - queryOption.Expand=loadOption.expand; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.expand)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.expand"); - } - if (typeof (loadOption.top)=="number") { - queryOption.Top=loadOption.top; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.top)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.top"); - } - if (typeof (loadOption.skip)=="number") { - queryOption.Skip=loadOption.skip; + if (ClientRequestContext.isLoadOption(loadOption)) { + if (typeof (loadOption.select)=="string") { + queryOption.Select=OfficeExtension.Utility._parseSelectExpand(loadOption.select); + } + else if (Array.isArray(loadOption.select)) { + queryOption.Select=loadOption.select; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.select)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.select"); + } + if (typeof (loadOption.expand)=="string") { + queryOption.Expand=OfficeExtension.Utility._parseSelectExpand(loadOption.expand); + } + else if (Array.isArray(loadOption.expand)) { + queryOption.Expand=loadOption.expand; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.expand)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.expand"); + } + if (typeof (loadOption.top)==="number") { + queryOption.Top=loadOption.top; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.top)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.top"); + } + if (typeof (loadOption.skip)==="number") { + queryOption.Skip=loadOption.skip; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.skip)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.skip"); + } } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.skip)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.skip"); + else { + queryOption=ClientRequestContext.parseStrictLoadOption(option); } } else if (!OfficeExtension.Utility.isNullOrUndefined(option)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option"); + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option"); } return queryOption; }; @@ -8546,7 +9129,7 @@ var OfficeExtension; } var quries={}; for (var key in options) { - quries[key]=ClientRequestContext.parseQueryOption(options[key]); + quries[key]=ClientRequestContext._parseQueryOption(options[key]); } var action=OfficeExtension.ActionFactory.createRecursiveQueryAction(this, clientObj, { Queries: quries, MaxDepth: maxDepth }); this._pendingRequest.addActionResultHandler(action, clientObj); @@ -8554,6 +9137,8 @@ var OfficeExtension; ClientRequestContext.prototype.trace=function (message) { OfficeExtension.ActionFactory.createTraceAction(this, message, true); }; + ClientRequestContext.prototype._processOfficeJsErrorResponse=function (officeJsErrorCode, response) { + }; ClientRequestContext.prototype.syncPrivateMain=function () { var _this=this; return OfficeExtension.Utility._createPromiseFromResult(null) @@ -8581,13 +9166,14 @@ var OfficeExtension; } }) .then(function () { - return _this.syncPrivate(); + var req=_this._pendingRequest; + _this.m_pendingRequest=null; + return _this.processPreSyncPromises(req) + .then(function () { return _this.syncPrivate(req); }); }); }; - ClientRequestContext.prototype.syncPrivate=function () { + ClientRequestContext.prototype.syncPrivate=function (req) { var _this=this; - var req=this._pendingRequest; - this.m_pendingRequest=null; if (!req.hasActions) { return this.processPendingEventHandlers(req); } @@ -8595,7 +9181,7 @@ var OfficeExtension; var requestFlags=req.flags; if (!this._requestExecutor) { if (OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)) { - this._requestExecutor=new OfficeExtension.OfficeJsRequestExecutor(); + this._requestExecutor=new OfficeExtension.OfficeJsRequestExecutor(this); } else { this._requestExecutor=new OfficeExtension.HttpRequestExecutor(); @@ -8613,8 +9199,10 @@ var OfficeExtension; req.invalidatePendingInvalidObjectPaths(); var errorFromResponse=null; var errorFromProcessEventHandlers=null; + this._lastSyncStart=performance.now(); return requestExecutor.executeAsync(this._customData, requestFlags, requestExecutorRequestMessage) .then(function (response) { + _this._lastSyncEnd=performance.now(); errorFromResponse=_this.processRequestExecutorResponseMessage(req, response); return _this.processPendingEventHandlers(req) .catch(function (ex) { @@ -8661,7 +9249,13 @@ var OfficeExtension; req._setResponseTraceIds(response.Body.TraceIds); } var traceMessages=req._responseTraceMessages; + var errorStatementInfo=null; if (response.Body) { + if (response.Body.Error && + response.Body.Error.ActionIndex >=0) { + var prettyPrinter=new OfficeExtension.RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions); + errorStatementInfo=prettyPrinter.processForDebugStatementInfo(response.Body.Error.ActionIndex); + } var actionResults=null; if (response.Body.Results) { actionResults=response.Body.Results; @@ -8687,13 +9281,18 @@ var OfficeExtension; }); } else if (response.Body && response.Body.Error) { + var debugInfo={ + errorLocation: response.Body.Error.Location + }; + if (errorStatementInfo) { + debugInfo.statement=errorStatementInfo.statement; + debugInfo.surroundingStatements=errorStatementInfo.surroundingStatements; + } return new OfficeExtension._Internal.RuntimeError({ code: response.Body.Error.Code, message: response.Body.Error.Message, traceMessages: traceMessages, - debugInfo: { - errorLocation: response.Body.Error.Location - } + debugInfo: debugInfo }); } return null; @@ -8709,6 +9308,17 @@ var OfficeExtension; ClientRequestContext.prototype.createProcessOneEventHandlersFunc=function (eventHandlers, req) { return function () { return eventHandlers._processRegistration(req); }; }; + ClientRequestContext.prototype.processPreSyncPromises=function (req) { + var ret=OfficeExtension.Utility._createPromiseFromResult(null); + for (var i=0; i < req._preSyncPromises.length; i++) { + var p=req._preSyncPromises[i]; + ret=ret.then(this.createProcessOneProSyncFunc(p)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneProSyncFunc=function (p) { + return function () { return p; }; + }; ClientRequestContext.prototype.sync=function (passThroughValue) { return this.syncPrivateMain().then(function () { return passThroughValue; }); }; @@ -8747,9 +9357,15 @@ var OfficeExtension; batch=receivedRunArgs[argOffset+0]; } else if (receivedRunArgs.length==argOffset+2) { - if (receivedRunArgs[argOffset+0] instanceof OfficeExtension.ClientObject) { + if (OfficeExtension.Utility.isNullOrUndefined(receivedRunArgs[argOffset+0])) { + ctxRetriever=ctxInitializer; + } + else if (receivedRunArgs[argOffset+0] instanceof OfficeExtension.ClientObject) { ctxRetriever=function () { return receivedRunArgs[argOffset+0].context; }; } + else if (receivedRunArgs[argOffset+0] instanceof ClientRequestContext) { + ctxRetriever=function () { return receivedRunArgs[argOffset+0]; }; + } else if (Array.isArray(receivedRunArgs[argOffset+0])) { var array=receivedRunArgs[argOffset+0]; if (array.length==0) { @@ -8915,6 +9531,79 @@ var OfficeExtension; return ClientResult; }()); OfficeExtension.ClientResult=ClientResult; + var RetrieveResult=(function () { + function RetrieveResult(m_proxy, m_shouldPolyfill) { + this.m_proxy=m_proxy; + this.m_shouldPolyfill=m_shouldPolyfill; + } + Object.defineProperty(RetrieveResult.prototype, "proxy", { + get: function () { + return this.m_proxy; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RetrieveResult.prototype, "data", { + get: function () { + if (!this.m_isLoaded) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.valueNotLoaded, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: "retrieveResult.data" + } + }); + } + return this.m_data; + }, + enumerable: true, + configurable: true + }); + RetrieveResult.prototype._handleResult=function (value) { + this.m_isLoaded=true; + if (typeof (value)==="object" && value && value._IsNull) { + this.m_data=null; + return; + } + if (this.m_shouldPolyfill) { + this.m_data=this.changePropertyNameToCamelLowerCase(value); + } + else { + this.m_data=value; + } + }; + RetrieveResult.prototype.changePropertyNameToCamelLowerCase=function (value) { + var charCodeUnderscore=95; + if (Array.isArray(value)) { + var ret=[]; + for (var i=0; i < value.length; i++) { + ret.push(this.changePropertyNameToCamelLowerCase(value[i])); + } + return ret; + } + else if (typeof (value)==="object" && value !==null) { + var ret={}; + for (var key in value) { + var propValue=value[key]; + if (key==="_Items") { + ret={}; + ret["items"]=this.changePropertyNameToCamelLowerCase(propValue); + break; + } + else if (key.charCodeAt(0) !==charCodeUnderscore) { + var propName=OfficeExtension.Utility._toCamelLowerCase(key); + ret[propName]=this.changePropertyNameToCamelLowerCase(propValue); + } + } + return ret; + } + else { + return value; + } + }; + return RetrieveResult; + }()); + OfficeExtension.RetrieveResult=RetrieveResult; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { @@ -8936,6 +9625,9 @@ var OfficeExtension; Constants.sourceLibHeader="SdkVersion"; Constants.embeddingPageOrigin="EmbeddingPageOrigin"; Constants.embeddingPageSessionInfo="EmbeddingPageSessionInfo"; + Constants.eventMessageCategory=65536; + Constants.eventWorkbookId="Workbook"; + Constants.eventSourceRemote="Remote"; return Constants; }()); OfficeExtension.Constants=Constants; @@ -9266,7 +9958,7 @@ var OfficeExtension; debugInfo[key]=partialDebugInfo[key]; } if (this.innerError) { - if (this.innerError instanceof OfficeExtension.Error) { + if (this.innerError instanceof OfficeExtension._Internal.RuntimeError) { debugInfo.innerError=this.innerError.debugInfo; } else { @@ -9351,6 +10043,20 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(EventHandlers.prototype, "_context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_callback", { + get: function () { + return this.m_callback; + }, + enumerable: true, + configurable: true + }); EventHandlers.prototype.add=function (handler) { var action=OfficeExtension.ActionFactory.createTraceAction(this.m_context, null, false); this.m_context._pendingRequest._addPendingEventHandlerAction(this, { id: action.actionInfo.Id, handler: handler, operation: 0 }); @@ -9444,6 +10150,13 @@ var OfficeExtension; this.m_allHandlers=handlers; this.m_handler=handler; } + Object.defineProperty(EventHandlerResult.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); EventHandlerResult.prototype.remove=function () { if (this.m_allHandlers && this.m_handler) { this.m_allHandlers.remove(this.m_handler); @@ -9478,6 +10191,16 @@ var OfficeExtension; return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged, handler, callback); }); case 1: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.settings.addHandlerAsync(Office.EventType.SettingsChanged, handler, callback); }); + case 5: + return OfficeExtension.Utility.promisify(function (callback) { return OSF.DDA.RichApi.richApiMessageManager.addHandlerAsync("richApiMessage", handler, callback); }); + case 13: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.ObjectDeleted, handler, { id: targetId }, callback); }); + case 14: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.ObjectSelectionChanged, handler, { id: targetId }, callback); }); + case 15: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.ObjectDataChanged, handler, { id: targetId }, callback); }); + case 16: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.ContentControlAdded, handler, { id: targetId }, callback); }); default: throw _Internal.RuntimeError._createInvalidArgError("eventId"); } @@ -9498,6 +10221,16 @@ var OfficeExtension; return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.DocumentSelectionChanged, { handler: handler }, callback); }); case 1: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.settings.removeHandlerAsync(Office.EventType.SettingsChanged, { handler: handler }, callback); }); + case 5: + return OfficeExtension.Utility.promisify(function (callback) { return OSF.DDA.RichApi.richApiMessageManager.removeHandlerAsync("richApiMessage", { handler: handler }, callback); }); + case 13: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDeleted, { id: targetId, handler: handler }, callback); }); + case 14: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.ObjectSelectionChanged, { id: targetId, handler: handler }, callback); }); + case 15: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDataChanged, { id: targetId, handler: handler }, callback); }); + case 16: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.ContentControlAdded, { id: targetId, handler: handler }, callback); }); default: throw _Internal.RuntimeError._createInvalidArgError("eventId"); } @@ -9560,6 +10293,139 @@ var OfficeExtension; OfficeExtension.EventRegistration=EventRegistration; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var GenericEventRegistration=(function () { + function GenericEventRegistration() { + this.m_eventRegistration=new OfficeExtension.EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)); + this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this); + } + GenericEventRegistration.prototype.ready=function () { + var _this=this; + if (!this.m_ready) { + if (GenericEventRegistration._testReadyImpl) { + this.m_ready=GenericEventRegistration._testReadyImpl() + .then(function () { + _this.m_isReady=true; + }); + } + else { + this.m_ready=OfficeExtension._Internal.officeJsEventRegistration.register(5, "", this.m_richApiMessageHandler) + .then(function () { + _this.m_isReady=true; + }); + } + } + return this.m_ready; + }; + Object.defineProperty(GenericEventRegistration.prototype, "isReady", { + get: function () { + return this.m_isReady; + }, + enumerable: true, + configurable: true + }); + GenericEventRegistration.prototype.register=function (eventId, targetId, handler) { + var _this=this; + return this.ready() + .then(function () { return _this.m_eventRegistration.register(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype.unregister=function (eventId, targetId, handler) { + var _this=this; + return this.ready() + .then(function () { return _this.m_eventRegistration.unregister(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype._registerEventImpl=function (eventId, targetId) { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._unregisterEventImpl=function (eventId, targetId) { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._handleRichApiMessage=function (msg) { + if (msg && msg.entries) { + for (var entryIndex=0; entryIndex < msg.entries.length; entryIndex++) { + var entry=msg.entries[entryIndex]; + if (entry.messageCategory==OfficeExtension.Constants.eventMessageCategory) { + if (OfficeExtension.Utility._logEnabled) { + OfficeExtension.Utility.log(JSON.stringify(entry)); + } + var funcs=this.m_eventRegistration.getHandlers(entry.messageType, entry.targetId); + if (funcs.length > 0) { + var arg=JSON.parse(entry.message); + if (entry.isRemoteOverride) { + arg.source=OfficeExtension.Constants.eventSourceRemote; + } + for (var i=0; i < funcs.length; i++) { + funcs[i](arg); + } + } + } + } + } + }; + GenericEventRegistration.getGenericEventRegistration=function () { + if (!GenericEventRegistration.s_genericEventRegistration) { + GenericEventRegistration.s_genericEventRegistration=new GenericEventRegistration(); + } + return GenericEventRegistration.s_genericEventRegistration; + }; + GenericEventRegistration.richApiMessageEventCategory=65536; + return GenericEventRegistration; + }()); + function _testSetRichApiMessageReadyImpl(impl) { + GenericEventRegistration._testReadyImpl=impl; + } + OfficeExtension._testSetRichApiMessageReadyImpl=_testSetRichApiMessageReadyImpl; + function _testTriggerRichApiMessageEvent(msg) { + GenericEventRegistration.getGenericEventRegistration()._handleRichApiMessage(msg); + } + OfficeExtension._testTriggerRichApiMessageEvent=_testTriggerRichApiMessageEvent; + var GenericEventHandlers=(function (_super) { + __extends(GenericEventHandlers, _super); + function GenericEventHandlers(context, parentObject, name, eventInfo) { + _super.call(this, context, parentObject, name, eventInfo); + this.m_genericEventInfo=eventInfo; + } + GenericEventHandlers.prototype.add=function (handler) { + var _this=this; + if ((this._handlers.length==0) && this.m_genericEventInfo.registerFunc) { + this.m_genericEventInfo.registerFunc(); + } + if (!GenericEventRegistration.getGenericEventRegistration().isReady) { + this._context._pendingRequest._addPreSyncPromise(GenericEventRegistration.getGenericEventRegistration().ready()); + } + OfficeExtension.ActionFactory.createTraceMarkerForCallback(this._context, function () { + _this._handlers.push(handler); + if (_this._handlers.length==1) { + GenericEventRegistration.getGenericEventRegistration().register(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + return new OfficeExtension.EventHandlerResult(this._context, this, handler); + }; + GenericEventHandlers.prototype.remove=function (handler) { + var _this=this; + if ((this._handlers.length==1) && this.m_genericEventInfo.unregisterFunc) { + this.m_genericEventInfo.unregisterFunc(); + } + OfficeExtension.ActionFactory.createTraceMarkerForCallback(this._context, function () { + var handlers=_this._handlers; + for (var index=handlers.length - 1; index >=0; index--) { + if (handlers[index]===handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length==0) { + GenericEventRegistration.getGenericEventRegistration().unregister(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + }; + GenericEventHandlers.prototype.removeAll=function () { + }; + return GenericEventHandlers; + }(OfficeExtension.EventHandlers)); + OfficeExtension.GenericEventHandlers=GenericEventHandlers; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var HttpRequestExecutor=(function () { function HttpRequestExecutor() { @@ -9611,15 +10477,6 @@ var OfficeExtension; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { - var _Internal; - (function (_Internal) { - _Internal.OfficeRequire=function () { - if (typeof (require) !=="undefined") { - return require; - } - return null; - }(); - })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); var HttpUtility=(function () { function HttpUtility() { } @@ -9627,7 +10484,7 @@ var OfficeExtension; HttpUtility.s_customSendRequestFunc=func; }; HttpUtility.xhrSendRequestFunc=function (request) { - return new _Internal.OfficePromise(function (resolve, reject) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { var xhr=new XMLHttpRequest(); xhr.open(request.method, request.url); xhr.onload=function () { @@ -9639,7 +10496,7 @@ var OfficeExtension; resolve(resp); }; xhr.onerror=function () { - reject(new _Internal.RuntimeError({ + reject(new OfficeExtension._Internal.RuntimeError({ code: OfficeExtension.ErrorCodes.connectionFailure, message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.connectionFailureWithStatus, xhr.statusText) })); @@ -9652,34 +10509,11 @@ var OfficeExtension; xhr.send(request.body); }); }; - HttpUtility.nodejsRequestModuleSendRequestFunc=function (requestInfo) { - HttpUtility.logRequest(requestInfo); - var fetch=_Internal.OfficeRequire(HttpUtility.NodeJsRequestModuleName); - return fetch(requestInfo.url, { method: requestInfo.method, headers: requestInfo.headers, body: requestInfo.body }) - .then(function (resp) { - return resp.text() - .then(function (body) { - var statusCode=resp.status; - var headers={}; - resp.headers.forEach(function (value, name) { - headers[name]=value; - }); - var ret={ statusCode: statusCode, headers: headers, body: body }; - HttpUtility.logResponse(ret); - return ret; - }); - }); - }; HttpUtility.sendRequest=function (request) { HttpUtility.validateAndNormalizeRequest(request); var func=HttpUtility.s_customSendRequestFunc; if (!func) { - if (typeof (window)==="undefined" || typeof (XMLHttpRequest)==="undefined") { - func=HttpUtility.nodejsRequestModuleSendRequestFunc; - } - else { - func=HttpUtility.xhrSendRequestFunc; - } + func=HttpUtility.xhrSendRequestFunc; } return func(request); }; @@ -9695,7 +10529,7 @@ var OfficeExtension; HttpUtility.officeJsSendLocalDocumentRequestFunc=function (request) { request=OfficeExtension.Utility._validateLocalDocumentRequest(request); var requestSafeArray=OfficeExtension.Utility._buildRequestMessageSafeArray(request); - return new _Internal.OfficePromise(function (resolve, reject) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { OSF.DDA.RichApi.executeRichApiRequestAsync(requestSafeArray, function (asyncResult) { var response; if (asyncResult.status=="succeeded") { @@ -9715,7 +10549,7 @@ var OfficeExtension; }; HttpUtility.validateAndNormalizeRequest=function (request) { if (OfficeExtension.Utility.isNullOrUndefined(request)) { - throw _Internal.RuntimeError._createInvalidArgError({ + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError({ argumentName: "request" }); } @@ -9752,7 +10586,6 @@ var OfficeExtension; } } }; - HttpUtility.NodeJsRequestModuleName="node-fetch"; HttpUtility._logBody=false; return HttpUtility; }()); @@ -9776,6 +10609,146 @@ var OfficeExtension; ; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var HostBridgeRequestExecutor=(function () { + function HostBridgeRequestExecutor(session) { + this.m_session=session; + } + HostBridgeRequestExecutor.prototype.executeAsync=function (customData, requestFlags, requestMessage) { + var httpRequestInfo={ + url: OfficeExtension.Constants.processQuery, + method: "POST", + headers: requestMessage.Headers, + body: requestMessage.Body + }; + var message={ + id: HostBridgeSession.nextId(), + type: 1, + flags: requestFlags, + message: httpRequestInfo + }; + OfficeExtension.Utility.log(JSON.stringify(message)); + return this.m_session.sendMessageToHost(message) + .then(function (nativeBridgeResponse) { + OfficeExtension.Utility.log("Received response: "+JSON.stringify(nativeBridgeResponse)); + var responseInfo=nativeBridgeResponse.message; + var response; + if (responseInfo.statusCode===200) { + response={ ErrorCode: null, ErrorMessage: null, Headers: responseInfo.headers, Body: responseInfo.body }; + } + else { + OfficeExtension.Utility.log("Error Response:"+responseInfo.body); + var error=OfficeExtension.Utility._parseErrorResponse(responseInfo); + response={ + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null + }; + } + return response; + }); + }; + return HostBridgeRequestExecutor; + }()); + var HostBridgeSession=(function (_super) { + __extends(HostBridgeSession, _super); + function HostBridgeSession(bridge) { + var _this=this; + _super.call(this); + this.m_promiseResolver={}; + this.m_bridge=bridge; + this.m_bridge.onMessageFromHost=function (msg) { + _this.onMessageFromHost(msg); + }; + } + HostBridgeSession.prototype._resolveRequestUrlAndHeaderInfo=function () { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + HostBridgeSession.prototype._createRequestExecutorOrNull=function () { + OfficeExtension.Utility.log("NativeBridgeSession::CreateRequestExecutor"); + return new HostBridgeRequestExecutor(this); + }; + Object.defineProperty(HostBridgeSession.prototype, "eventRegistration", { + get: function () { + return OfficeExtension._Internal.officeJsEventRegistration; + }, + enumerable: true, + configurable: true + }); + HostBridgeSession.init=function (bridge) { + if (bridge && typeof (bridge)==="object") { + var session=new HostBridgeSession(bridge); + OfficeExtension.ClientRequestContext._overrideSession=session; + OfficeExtension.HttpUtility.setCustomSendLocalDocumentRequestFunc(function (request) { + var bridgeMessage={ + id: HostBridgeSession.nextId(), + type: 1, + flags: 0, + message: request + }; + return session.sendMessageToHost(bridgeMessage) + .then(function (bridgeResponse) { + var responseInfo=bridgeResponse.message; + return responseInfo; + }); + }); + } + }; + HostBridgeSession.prototype.sendMessageToHost=function (message) { + var _this=this; + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + var ret=new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { + _this.m_promiseResolver[message.id]=resolve; + }); + return ret; + }; + HostBridgeSession.prototype.onMessageFromHost=function (messageText) { + if (messageText==="test") { + if (HostBridgeTest._testFunc) { + HostBridgeTest._testFunc(); + } + } + else { + var message=JSON.parse(messageText); + if (typeof (message.id)==="number") { + var resolve=this.m_promiseResolver[message.id]; + if (resolve) { + resolve(message); + } + delete this.m_promiseResolver[message.id]; + } + } + }; + HostBridgeSession.nextId=function () { + return HostBridgeSession.s_nextId++; + }; + HostBridgeSession.s_nextId=1; + return HostBridgeSession; + }(OfficeExtension.SessionBase)); + var HostBridge=(function () { + function HostBridge() { + } + HostBridge.init=function (bridge) { + HostBridgeSession.init(bridge); + }; + return HostBridge; + }()); + OfficeExtension.HostBridge=HostBridge; + if (typeof (_richApiNativeBridge)==="object" && _richApiNativeBridge) { + HostBridge.init(_richApiNativeBridge); + } + var HostBridgeTest=(function () { + function HostBridgeTest() { + } + HostBridgeTest.setTestFunc=function (func) { + HostBridgeTest._testFunc=func; + }; + return HostBridgeTest; + }()); + OfficeExtension.HostBridgeTest=HostBridgeTest; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var ObjectPath=(function () { function ObjectPath(objectPathInfo, parentObjectPath, isCollection, isInvalidAfterRequest) { @@ -9793,12 +10766,22 @@ var OfficeExtension; enumerable: true, configurable: true }); - Object.defineProperty(ObjectPath.prototype, "isWriteOperation", { + Object.defineProperty(ObjectPath.prototype, "isWriteOperation", { + get: function () { + return this.m_isWriteOperation; + }, + set: function (value) { + this.m_isWriteOperation=value; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ObjectPath.prototype, "isRestrictedResourceAccess", { get: function () { - return this.m_isWriteOperation; + return this.m_isRestrictedResourceAccess; }, set: function (value) { - this.m_isWriteOperation=value; + this.m_isRestrictedResourceAccess=value; }, enumerable: true, configurable: true @@ -9889,6 +10872,7 @@ var OfficeExtension; this.m_objectPathInfo.ObjectPathType=6; this.m_objectPathInfo.Name=referenceId; this.m_objectPathInfo.ArgumentInfo={}; + delete this.m_objectPathInfo.ParentObjectPathId; this.m_parentObjectPath=null; this.m_argumentObjectPaths=null; return; @@ -9903,15 +10887,15 @@ var OfficeExtension; if (!OfficeExtension.Utility.isNullOrUndefined(id)) { this.m_isInvalidAfterRequest=false; this.m_isValid=true; - if (parentIsCollection) { - this.m_objectPathInfo.ObjectPathType=5; - this.m_objectPathInfo.Name=""; - } - else { + if (!OfficeExtension.Utility.isNullOrEmptyString(getByIdMethodName)) { this.m_objectPathInfo.ObjectPathType=3; this.m_objectPathInfo.Name=getByIdMethodName; this.m_getByIdMethodName=null; } + else { + this.m_objectPathInfo.ObjectPathType=5; + this.m_objectPathInfo.Name=""; + } this.isWriteOperation=false; this.m_objectPathInfo.ArgumentInfo={}; this.m_objectPathInfo.ArgumentInfo.Arguments=[id]; @@ -9946,18 +10930,22 @@ var OfficeExtension; var objectPathInfo={ Id: context._nextId(), ObjectPathType: 1, Name: "" }; return new OfficeExtension.ObjectPath(objectPathInfo, null, false, false); }; - ObjectPathFactory.createNewObjectObjectPath=function (context, typeName, isCollection) { + ObjectPathFactory.createNewObjectObjectPath=function (context, typeName, isCollection, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 2, Name: typeName }; - return new OfficeExtension.ObjectPath(objectPathInfo, null, isCollection, false); + var ret=new OfficeExtension.ObjectPath(objectPathInfo, null, isCollection, false); + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; }; - ObjectPathFactory.createPropertyObjectPath=function (context, parent, propertyName, isCollection, isInvalidAfterRequest) { + ObjectPathFactory.createPropertyObjectPath=function (context, parent, propertyName, isCollection, isInvalidAfterRequest, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 4, Name: propertyName, ParentObjectPathId: parent._objectPath.objectPathInfo.Id, }; - return new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest); + var ret=new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest); + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; }; ObjectPathFactory.createIndexerObjectPath=function (context, parent, args) { var objectPathInfo={ @@ -9981,7 +10969,7 @@ var OfficeExtension; objectPathInfo.ArgumentInfo.Arguments=args; return new OfficeExtension.ObjectPath(objectPathInfo, parentObjectPath, false, false); }; - ObjectPathFactory.createMethodObjectPath=function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName) { + ObjectPathFactory.createMethodObjectPath=function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 3, @@ -9994,6 +10982,17 @@ var OfficeExtension; ret.argumentObjectPaths=argumentObjectPaths; ret.isWriteOperation=(operationType !=1); ret.getByIdMethodName=getByIdMethodName; + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; + }; + ObjectPathFactory.createReferenceIdObjectPath=function (context, referenceId) { + var objectPathInfo={ + Id: context._nextId(), + ObjectPathType: 6, + Name: referenceId, + ArgumentInfo: {} + }; + var ret=new OfficeExtension.ObjectPath(objectPathInfo, null, false, false); return ret; }; ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt=function (hasIndexerMethod, context, parent, childItem, index) { @@ -10045,9 +11044,11 @@ var OfficeExtension; var OfficeExtension; (function (OfficeExtension) { var OfficeJsRequestExecutor=(function () { - function OfficeJsRequestExecutor() { + function OfficeJsRequestExecutor(context) { + this.m_context=context; } OfficeJsRequestExecutor.prototype.executeAsync=function (customData, requestFlags, requestMessage) { + var _this=this; var messageSafearray=OfficeExtension.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, OfficeJsRequestExecutor.SourceLibHeaderValue); return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { OSF.DDA.RichApi.executeRichApiRequestAsync(messageSafearray, function (result) { @@ -10059,6 +11060,7 @@ var OfficeExtension; } else { response=OfficeExtension.RichApiMessageUtility.buildResponseOnError(result.error.code, result.error.message); + _this.m_context._processOfficeJsErrorResponse(result.error.code, response); } resolve(response); }); @@ -10071,6 +11073,12 @@ var OfficeExtension; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + var _Internal; + (function (_Internal) { + _Internal.OfficeRequire=function () { + return null; + }(); + })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); var _Internal; (function (_Internal) { var PromiseImpl; @@ -10174,17 +11182,6 @@ var OfficeExtension; } lib$es6$promise$asap$$len=0; } - function lib$es6$promise$asap$$attemptVertex() { - try { - var r=require; - var vertx=r('vertx'); - lib$es6$promise$asap$$vertxNext=vertx.runOnLoop || vertx.runOnContext; - return lib$es6$promise$asap$$useVertxTimer(); - } - catch (e) { - return lib$es6$promise$asap$$useSetTimeout(); - } - } var lib$es6$promise$asap$$scheduleFlush; if (lib$es6$promise$asap$$isNode) { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useNextTick(); @@ -10195,9 +11192,6 @@ var OfficeExtension; else if (lib$es6$promise$asap$$isWorker) { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useMessageChannel(); } - else if (lib$es6$promise$asap$$browserWindow===undefined && typeof require==='function') { - lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$attemptVertex(); - } else { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useSetTimeout(); } @@ -10715,6 +11709,305 @@ var OfficeExtension; OfficeExtension.TrackedObjects=TrackedObjects; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var RequestPrettyPrinter=(function () { + function RequestPrettyPrinter(globalObjName, referencedObjectPaths, actions, showDispose) { + if (!globalObjName) { + globalObjName="root"; + } + this.m_globalObjName=globalObjName; + this.m_referencedObjectPaths=referencedObjectPaths; + this.m_actions=actions; + this.m_statements=[]; + this.m_variableNameForObjectPathMap={}; + this.m_variableNameToObjectPathMap={}; + this.m_declaredObjectPathMap={}; + this.m_showDispose=showDispose; + } + RequestPrettyPrinter.prototype.process=function () { + if (this.m_showDispose) { + OfficeExtension.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + for (var i=0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + } + return this.m_statements; + }; + RequestPrettyPrinter.prototype.processForDebugStatementInfo=function (actionIndex) { + if (this.m_showDispose) { + OfficeExtension.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + var surroundingCount=5; + this.m_statements=[]; + var oneStatement=""; + var statementIndex=-1; + for (var i=0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + if (actionIndex==i) { + statementIndex=this.m_statements.length - 1; + } + if (statementIndex >=0 && this.m_statements.length > statementIndex+surroundingCount+1) { + break; + } + } + if (statementIndex < 0) { + return null; + } + var startIndex=statementIndex - surroundingCount; + if (startIndex < 0) { + startIndex=0; + } + var endIndex=statementIndex+1+surroundingCount; + if (endIndex > this.m_statements.length) { + endIndex=this.m_statements.length; + } + var surroundingStatements=[]; + if (startIndex !=0) { + surroundingStatements.push("..."); + } + for (var i_1=startIndex; i_1 < statementIndex; i_1++) { + surroundingStatements.push(this.m_statements[i_1]); + } + surroundingStatements.push("// >>>>>"); + surroundingStatements.push(this.m_statements[statementIndex]); + surroundingStatements.push("// <<<<<"); + for (var i_2=statementIndex+1; i_2 < endIndex; i_2++) { + surroundingStatements.push(this.m_statements[i_2]); + } + if (endIndex < this.m_statements.length) { + surroundingStatements.push("..."); + } + return { + statement: this.m_statements[statementIndex], + surroundingStatements: surroundingStatements + }; + }; + RequestPrettyPrinter.prototype.processOneAction=function (action) { + var actionInfo=action.actionInfo; + switch (actionInfo.ActionType) { + case 1: + this.processInstantiateAction(action); + break; + case 3: + this.processMethodAction(action); + break; + case 2: + this.processQueryAction(action); + break; + case 7: + this.processQueryAsJsonAction(action); + break; + case 6: + this.processRecursiveQueryAction(action); + break; + case 4: + this.processSetPropertyAction(action); + break; + case 5: + this.processTraceAction(action); + break; + case 8: + this.processEnsureUnchangedAction(action); + break; + } + }; + RequestPrettyPrinter.prototype.processInstantiateAction=function (action) { + var objId=action.actionInfo.ObjectPathId; + var objPath=this.m_referencedObjectPaths[objId]; + var varName=this.getObjVarName(objId); + if (!this.m_declaredObjectPathMap[objId]) { + var statement="var "+varName+"="+this.buildObjectPathExpressionWithParent(objPath)+";"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + this.m_declaredObjectPathMap[objId]=varName; + } + else { + var statement="// Instantiate {"+varName+"}"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + } + }; + RequestPrettyPrinter.prototype.processMethodAction=function (action) { + var methodName=action.actionInfo.Name; + if (methodName==="_KeepReference") { + methodName="track"; + } + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+"."+OfficeExtension.Utility._toCamelLowerCase(methodName)+"("+this.buildArgumentsExpression(action.actionInfo.ArgumentInfo)+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAction=function (action) { + var queryExp=this.buildQueryExpression(action); + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".load("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAsJsonAction=function (action) { + var queryExp=this.buildQueryExpression(action); + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".loadJson("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processRecursiveQueryAction=function (action) { + var queryExp=""; + if (action.actionInfo.RecursiveQueryInfo) { + queryExp=JSON.stringify(action.actionInfo.RecursiveQueryInfo); + } + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".loadRecursive("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processSetPropertyAction=function (action) { + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+"."+OfficeExtension.Utility._toCamelLowerCase(action.actionInfo.Name)+"="+this.buildArgumentsExpression(action.actionInfo.ArgumentInfo)+";"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processTraceAction=function (action) { + var statement="context.trace();"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processEnsureUnchangedAction=function (action) { + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".ensureUnchanged("+JSON.stringify(action.actionInfo.ObjectState)+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.appendDisposeCommentIfRelevant=function (statement, action) { + var _this=this; + if (this.m_showDispose) { + var lastUsedObjectPathIds=action.actionInfo.L; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + var objectNamesToDispose=lastUsedObjectPathIds.map(function (item) { return _this.getObjVarName(item); }).join(", "); + return statement+" // And then dispose {"+objectNamesToDispose+"}"; + } + } + return statement; + }; + RequestPrettyPrinter.prototype.buildQueryExpression=function (action) { + if (action.actionInfo.QueryInfo) { + var option={}; + option.select=action.actionInfo.QueryInfo.Select; + option.expand=action.actionInfo.QueryInfo.Expand; + option.skip=action.actionInfo.QueryInfo.Skip; + option.top=action.actionInfo.QueryInfo.Top; + if (typeof (option.top)==="undefined" && typeof (option.skip)==="undefined" && typeof (option.expand)==="undefined") { + if (typeof (option.select)==="undefined") { + return ""; + } + else { + return JSON.stringify(option.select); + } + } + else { + return JSON.stringify(option); + } + } + return ""; + }; + RequestPrettyPrinter.prototype.buildObjectPathExpressionWithParent=function (objPath) { + var hasParent=objPath.objectPathInfo.ObjectPathType==5 || + objPath.objectPathInfo.ObjectPathType==3 || + objPath.objectPathInfo.ObjectPathType==4; + if (hasParent && objPath.objectPathInfo.ParentObjectPathId) { + return this.getObjVarName(objPath.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(objPath); + } + return this.buildObjectPathExpression(objPath); + }; + RequestPrettyPrinter.prototype.buildObjectPathExpression=function (objPath) { + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + return "context."+this.m_globalObjName; + case 5: + return "getItem("+this.buildArgumentsExpression(objPath.objectPathInfo.ArgumentInfo)+")"; + case 3: + return OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name)+"("+this.buildArgumentsExpression(objPath.objectPathInfo.ArgumentInfo)+")"; + case 2: + return objPath.objectPathInfo.Name+".newObject()"; + case 7: + return "null"; + case 4: + return OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + case 6: + return "context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(objPath.objectPathInfo.Name)+")"; + } + }; + RequestPrettyPrinter.prototype.buildArgumentsExpression=function (args) { + var ret=""; + if (!args.Arguments) { + return ret; + } + for (var i=0; i < args.Arguments.length; i++) { + if (i > 0) { + ret=ret+", "; + } + ret=ret+this.buildArgumentLiteral(args.Arguments[i], args.ReferencedObjectPathIds ? args.ReferencedObjectPathIds[i] : null); + } + if (ret==="undefined") { + ret=""; + } + return ret; + }; + RequestPrettyPrinter.prototype.buildArgumentLiteral=function (value, objectPathId) { + if (typeof value=="number" && value===objectPathId) { + return this.getObjVarName(objectPathId); + } + else { + return JSON.stringify(value); + } + }; + RequestPrettyPrinter.prototype.getObjVarNameBase=function (objectPathId) { + var ret="v"; + var objPath=this.m_referencedObjectPaths[objectPathId]; + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + ret=this.m_globalObjName; + break; + case 4: + ret=OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + break; + case 3: + var methodName=objPath.objectPathInfo.Name; + if (methodName.length > 3 && methodName.substr(0, 3)==="Get") { + methodName=methodName.substr(3); + } + ret=OfficeExtension.Utility._toCamelLowerCase(methodName); + break; + case 5: + var parentName=this.getObjVarNameBase(objPath.objectPathInfo.ParentObjectPathId); + if (parentName.charAt(parentName.length - 1)==="s") { + ret=parentName.substr(0, parentName.length - 1); + } + else { + ret=parentName+"Item"; + } + break; + } + return ret; + }; + RequestPrettyPrinter.prototype.getObjVarName=function (objectPathId) { + if (this.m_variableNameForObjectPathMap[objectPathId]) { + return this.m_variableNameForObjectPathMap[objectPathId]; + } + var ret=this.getObjVarNameBase(objectPathId); + if (!this.m_variableNameToObjectPathMap[ret]) { + this.m_variableNameForObjectPathMap[objectPathId]=ret; + this.m_variableNameToObjectPathMap[ret]=objectPathId; + return ret; + } + var i=1; + while (this.m_variableNameToObjectPathMap[ret+i.toString()]) { + i++; + } + ret=ret+i.toString(); + this.m_variableNameForObjectPathMap[objectPathId]=ret; + this.m_variableNameToObjectPathMap[ret]=objectPathId; + return ret; + }; + return RequestPrettyPrinter; + }()); + OfficeExtension.RequestPrettyPrinter=RequestPrettyPrinter; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var ResourceStrings=(function () { function ResourceStrings() { @@ -10735,6 +12028,14 @@ var OfficeExtension; ResourceStrings.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod"; ResourceStrings.valueNotLoaded="ValueNotLoaded"; ResourceStrings.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage"; + ResourceStrings.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"; + ResourceStrings.customFunctionDefintionMissing="CustomFunctionDefintionMissing"; + ResourceStrings.customFunctionImplementationMissing="CustomFunctionImplementationMissing"; + ResourceStrings.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars"; + ResourceStrings.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit"; + ResourceStrings.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch"; + ResourceStrings.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing"; + ResourceStrings.apiNotFoundDetails="ApiNotFoundDetails"; return ResourceStrings; }()); OfficeExtension.ResourceStrings=ResourceStrings; @@ -10754,7 +12055,15 @@ var OfficeExtension; ResourceStringValues.RunMustReturnPromise="The batch function passed to the \".run\" method didn't return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from \"context.sync()\"."; ResourceStringValues.Timeout="The operation has timed out."; ResourceStringValues.ValueNotLoaded="The value of the result object has not been loaded yet. Before reading the value property, call \"context.sync()\" on the associated request context."; - ResourceStringValues.invalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page."; + ResourceStringValues.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page."; + ResourceStringValues.InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again."; + ResourceStringValues.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions."; + ResourceStringValues.CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function."; + ResourceStringValues.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods."; + ResourceStringValues.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name."; + ResourceStringValues.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it."; + ResourceStringValues.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable."; + ResourceStringValues.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}."; return ResourceStringValues; }()); OfficeExtension.ResourceStringValues=ResourceStringValues; @@ -11048,6 +12357,34 @@ var OfficeExtension; }; Utility.load=function (clientObj, option) { clientObj.context.load(clientObj, option); + return clientObj; + }; + Utility.loadAndSync=function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj.context.sync().then(function () { return clientObj; }); + }; + Utility.retrieve=function (clientObj, option) { + var shouldPolyfill=OfficeExtension._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + if (typeof (window) !=="undefined" && window.Office && window.Office.context && window.Office.context.requirements) { + shouldPolyfill=!window.Office.context.requirements.isSetSupported("RichApiRuntime", "1.1"); + } + } + var result=new OfficeExtension.RetrieveResult(clientObj, shouldPolyfill); + var queryOption=OfficeExtension.ClientRequestContext._parseQueryOption(option); + var action; + if (shouldPolyfill) { + action=OfficeExtension.ActionFactory.createQueryAction(clientObj.context, clientObj, queryOption); + } + else { + action=OfficeExtension.ActionFactory.createQueryAsJsonAction(clientObj.context, clientObj, queryOption); + } + clientObj.context._pendingRequest.addActionResultHandler(action, result); + return result; + }; + Utility.retrieveAndSync=function (clientObj, option) { + var result=Utility.retrieve(clientObj, option); + return clientObj.context.sync().then(function () { return result; }); }; Utility._parseSelectExpand=function (select) { var args=[]; @@ -11068,11 +12405,32 @@ var OfficeExtension; return '*'; } var itemsSlashLength=6; - if (propertyNameLower.substr(0, itemsSlashLength)==="items/") { + var isItemsSlashOrItemsDot=propertyNameLower.substr(0, itemsSlashLength)==="items/" || + propertyNameLower.substr(0, itemsSlashLength)==="items."; + if (isItemsSlashOrItemsDot) { propertyName=propertyName.substr(itemsSlashLength); } - return propertyName.replace(new RegExp("\/items\/", "gi"), "/"); + return propertyName.replace(new RegExp("[\/\.]items[\/\.]", "gi"), "/"); + } + }; + Utility.toJson=function (clientObj, scalarProperties, navigationProperties, collectionItemsIfAny) { + var result={}; + for (var prop in scalarProperties) { + var value=scalarProperties[prop]; + if (typeof value !=="undefined") { + result[prop]=value; + } + } + for (var prop in navigationProperties) { + var value=navigationProperties[prop]; + if (typeof value !=="undefined") { + result[prop]=value.toJSON(); + } + } + if (collectionItemsIfAny) { + result["items"]=collectionItemsIfAny.map(function (item) { return item.toJSON(); }); } + return result; }; Utility.throwError=function (resourceId, arg, errorLocation) { throw new OfficeExtension._Internal.RuntimeError({ @@ -11134,6 +12492,21 @@ var OfficeExtension; }); } }; + Utility.throwIfApiNotSupported=function (apiFullName, apiSetName, apiSetVersion, hostName) { + if (!Utility._doApiNotSupportedCheck) { + return; + } + if (typeof (window) !=="undefined" && window.Office && window.Office.context) { + if (!window.Office.context.requirements.isSetSupported(apiSetName, apiSetVersion)) { + var message=Utility._getResourceString(OfficeExtension.ResourceStrings.apiNotFoundDetails, [apiFullName, apiSetName+" "+apiSetVersion, hostName]); + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.apiNotFound, + message: message, + debugInfo: { errorLocation: apiFullName } + }); + } + } + }; Utility.getObjectPathExpression=function (objectPath) { var ret=""; while (objectPath) { @@ -11258,68 +12631,319 @@ var OfficeExtension; } } } - return OfficeExtension.RichApiMessageUtility.buildRequestMessageSafeArray("", requestFlags, request.method, request.url, request.headers, request.body); + return OfficeExtension.RichApiMessageUtility.buildRequestMessageSafeArray("", requestFlags, request.method, request.url, request.headers, request.body); + }; + Utility._parseHttpResponseHeaders=function (allResponseHeaders) { + var responseHeaders={}; + if (!Utility.isNullOrEmptyString(allResponseHeaders)) { + var regex=new RegExp("\r?\n"); + var entries=allResponseHeaders.split(regex); + for (var i=0; i < entries.length; i++) { + var entry=entries[i]; + if (entry !=null) { + var index=entry.indexOf(':'); + if (index > 0) { + var key=entry.substr(0, index); + var value=entry.substr(index+1); + key=Utility.trim(key); + value=Utility.trim(value); + responseHeaders[key.toUpperCase()]=value; + } + } + } + } + return responseHeaders; + }; + Utility._parseErrorResponse=function (responseInfo) { + var errorObj=null; + if (Utility.isPlainJsonObject(responseInfo.body)) { + errorObj=responseInfo.body; + } + else if (!Utility.isNullOrEmptyString(responseInfo.body)) { + var errorResponseBody=Utility.trim(responseInfo.body); + try { + errorObj=JSON.parse(errorResponseBody); + } + catch (e) { + Utility.log("Error when parse "+errorResponseBody); + } + } + var errorMessage; + var errorCode; + if (!Utility.isNullOrUndefined(errorObj) && typeof (errorObj)==="object" && errorObj.error) { + errorCode=errorObj.error.code; + errorMessage=Utility._getResourceString(OfficeExtension.ResourceStrings.connectionFailureWithDetails, [responseInfo.statusCode.toString(), errorObj.error.code, errorObj.error.message]); + } + else { + errorMessage=Utility._getResourceString(OfficeExtension.ResourceStrings.connectionFailureWithStatus, responseInfo.statusCode.toString()); + } + if (Utility.isNullOrEmptyString(errorCode)) { + errorCode=OfficeExtension.ErrorCodes.connectionFailure; + } + return { errorCode: errorCode, errorMessage: errorMessage }; + }; + Utility._copyHeaders=function (src, dest) { + if (src && dest) { + for (var key in src) { + dest[key]=src[key]; + } + } + }; + Utility._toCamelLowerCase=function (name) { + if (Utility.isNullOrEmptyString(name)) { + return name; + } + var index=0; + while (index < name.length && name.charCodeAt(index) >=65 && name.charCodeAt(index) <=90) { + index++; + } + if (index < name.length) { + return name.substr(0, index).toLowerCase()+name.substr(index); + } + else { + return name.toLowerCase(); + } + }; + Utility._logEnabled=false; + Utility._synchronousCleanup=false; + Utility._doApiNotSupportedCheck=false; + Utility.s_underscoreCharCode="_".charCodeAt(0); + return Utility; + }()); + OfficeExtension.Utility=Utility; +})(OfficeExtension || (OfficeExtension={})); + +var __extends=(this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p]=b[p]; + function __() { this.constructor=d; } + d.prototype=b===null ? Object.create(b) : (__.prototype=b.prototype, new __()); +}; +var OfficeCore; +(function (OfficeCore) { + var _hostName="OfficeCore"; + var _defaultApiSetName="ExperimentApi"; + var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; + var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; + var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; + var _createNewObjectObjectPath=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath; + var _createChildItemObjectPathUsingIndexer=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer; + var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; + var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; + var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; + var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined=OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; + var _load=OfficeExtension.Utility.load; + var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; + var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; + var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var FlightingService=(function (_super) { + __extends(FlightingService, _super); + function FlightingService() { + _super.apply(this, arguments); + } + Object.defineProperty(FlightingService.prototype, "_className", { + get: function () { + return "FlightingService"; + }, + enumerable: true, + configurable: true + }); + FlightingService.prototype.getClientSessionId=function () { + var action=_createMethodAction(this.context, this, "GetClientSessionId", 1, []); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + FlightingService.prototype.getDeferredFlights=function () { + var action=_createMethodAction(this.context, this, "GetDeferredFlights", 1, []); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + FlightingService.prototype.getFeature=function (featureName, type, defaultValue, possibleValues) { + return new OfficeCore.ABType(this.context, _createMethodObjectPath(this.context, this, "GetFeature", 1, [featureName, type, defaultValue, possibleValues], false, false, null)); + }; + FlightingService.prototype.getFeatureGate=function (featureName, scope) { + return new OfficeCore.ABType(this.context, _createMethodObjectPath(this.context, this, "GetFeatureGate", 1, [featureName, scope], false, false, null)); + }; + FlightingService.prototype.resetOverride=function (featureName) { + _createMethodAction(this.context, this, "ResetOverride", 0, [featureName]); + }; + FlightingService.prototype.setOverride=function (featureName, type, value) { + _createMethodAction(this.context, this, "SetOverride", 0, [featureName, type, value]); + }; + FlightingService.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + FlightingService.newObject=function (context) { + var ret=new OfficeCore.FlightingService(context, _createNewObjectObjectPath(context, "Microsoft.Experiment.FlightingService", false)); + return ret; + }; + FlightingService.prototype.toJSON=function () { + return {}; + }; + return FlightingService; + }(OfficeExtension.ClientObject)); + OfficeCore.FlightingService=FlightingService; + var ABType=(function (_super) { + __extends(ABType, _super); + function ABType() { + _super.apply(this, arguments); + } + Object.defineProperty(ABType.prototype, "_className", { + get: function () { + return "ABType"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ABType.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this.m_value, "ABType", this._isNull); + return this.m_value; + }, + enumerable: true, + configurable: true + }); + ABType.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Value"])) { + this.m_value=obj["Value"]; + } }; - Utility._parseHttpResponseHeaders=function (allResponseHeaders) { - var responseHeaders={}; - if (!Utility.isNullOrEmptyString(allResponseHeaders)) { - var regex=new RegExp("\r?\n"); - var entries=allResponseHeaders.split(regex); - for (var i=0; i < entries.length; i++) { - var entry=entries[i]; - if (entry !=null) { - var index=entry.indexOf(':'); - if (index > 0) { - var key=entry.substr(0, index); - var value=entry.substr(index+1); - key=Utility.trim(key); - value=Utility.trim(value); - responseHeaders[key.toUpperCase()]=value; - } - } - } - } - return responseHeaders; + ABType.prototype.load=function (option) { + _load(this, option); + return this; }; - Utility._parseErrorResponse=function (responseInfo) { - var errorObj=null; - if (!Utility.isNullOrEmptyString(responseInfo.body)) { - var errorResponseBody=Utility.trim(responseInfo.body); - try { - errorObj=JSON.parse(errorResponseBody); + ABType.prototype.toJSON=function () { + return { + "value": this.m_value + }; + }; + return ABType; + }(OfficeExtension.ClientObject)); + OfficeCore.ABType=ABType; + var FeatureType; + (function (FeatureType) { + FeatureType.boolean="Boolean"; + FeatureType.integer="Integer"; + FeatureType.string="String"; + })(FeatureType=OfficeCore.FeatureType || (OfficeCore.FeatureType={})); + var ExperimentErrorCodes; + (function (ExperimentErrorCodes) { + ExperimentErrorCodes.generalException="GeneralException"; + })(ExperimentErrorCodes=OfficeCore.ExperimentErrorCodes || (OfficeCore.ExperimentErrorCodes={})); +})(OfficeCore || (OfficeCore={})); +var OfficeCore; +(function (OfficeCore) { + var RequestContext=(function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + _super.call(this, url); + } + Object.defineProperty(RequestContext.prototype, "flighting", { + get: function () { + return this.flightingService; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "telemetry", { + get: function () { + if (!this.m_telemetry) { + this.m_telemetry=OfficeCore.TelemetryService.newObject(this); } - catch (e) { - Utility.log("Error when parse "+errorResponseBody); + return this.m_telemetry; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "flightingService", { + get: function () { + if (!this.m_flightingService) { + this.m_flightingService=OfficeCore.FlightingService.newObject(this); } - } - var errorMessage; - var errorCode; - if (!Utility.isNullOrUndefined(errorObj) && typeof (errorObj)==="object" && errorObj.error) { - errorCode=errorObj.error.code; - errorMessage=Utility._getResourceString(OfficeExtension.ResourceStrings.connectionFailureWithDetails, [responseInfo.statusCode.toString(), errorObj.error.code, errorObj.error.message]); - } - else { - errorMessage=Utility._getResourceString(OfficeExtension.ResourceStrings.connectionFailureWithStatus, responseInfo.statusCode.toString()); - } - if (Utility.isNullOrEmptyString(errorCode)) { - errorCode=OfficeExtension.ErrorCodes.connectionFailure; - } - return { errorCode: errorCode, errorMessage: errorMessage }; + return this.m_flightingService; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeExtension.ClientRequestContext)); + OfficeCore.RequestContext=RequestContext; +})(OfficeCore || (OfficeCore={})); +var OfficeCore; +(function (OfficeCore) { + var _hostName="OfficeCore"; + var _defaultApiSetName="TelemetryApi"; + var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; + var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; + var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; + var _createNewObjectObjectPath=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath; + var _createChildItemObjectPathUsingIndexer=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer; + var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; + var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; + var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; + var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined=OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; + var _load=OfficeExtension.Utility.load; + var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; + var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; + var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var _typeTelemetryService="TelemetryService"; + var TelemetryService=(function (_super) { + __extends(TelemetryService, _super); + function TelemetryService() { + _super.apply(this, arguments); + } + Object.defineProperty(TelemetryService.prototype, "_className", { + get: function () { + return "TelemetryService"; + }, + enumerable: true, + configurable: true + }); + TelemetryService.prototype.sendTelemetryEvent=function (telemetryProperties, eventName, eventContract, eventFlags, value) { + _createMethodAction(this.context, this, "SendTelemetryEvent", 1, [telemetryProperties, eventName, eventContract, eventFlags, value], false); }; - Utility._copyHeaders=function (src, dest) { - if (src && dest) { - for (var key in src) { - dest[key]=src[key]; - } - } + TelemetryService.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); }; - Utility._logEnabled=false; - Utility._synchronousCleanup=false; - Utility.s_underscoreCharCode="_".charCodeAt(0); - return Utility; - }()); - OfficeExtension.Utility=Utility; -})(OfficeExtension || (OfficeExtension={})); + TelemetryService.newObject=function (context) { + var ret=new OfficeCore.TelemetryService(context, _createNewObjectObjectPath(context, "Microsoft.Telemetry.TelemetryService", false, false)); + return ret; + }; + TelemetryService.prototype.toJSON=function () { + return {}; + }; + return TelemetryService; + }(OfficeExtension.ClientObject)); + OfficeCore.TelemetryService=TelemetryService; + var TelemetryErrorCodes; + (function (TelemetryErrorCodes) { + TelemetryErrorCodes.generalException="GeneralException"; + })(TelemetryErrorCodes=OfficeCore.TelemetryErrorCodes || (OfficeCore.TelemetryErrorCodes={})); +})(OfficeCore || (OfficeCore={})); var __extends=(this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p]=b[p]; @@ -11328,6 +12952,8 @@ var __extends=(this && this.__extends) || function (d, b) { }; var OneNote; (function (OneNote) { + var _hostName="OneNote"; + var _defaultApiSetName="OneNoteApi"; var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; @@ -11340,11 +12966,13 @@ var OneNote; var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; var _isUndefined=OfficeExtension.Utility.isUndefined; var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; var _load=OfficeExtension.Utility.load; var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var _typeApplication="Application"; var Application=(function (_super) { __extends(Application, _super); function Application() { @@ -11359,112 +12987,166 @@ var OneNote; }); Object.defineProperty(Application.prototype, "notebooks", { get: function () { - if (!this.m_notebooks) { - this.m_notebooks=new OneNote.NotebookCollection(this.context, _createPropertyObjectPath(this.context, this, "Notebooks", true, false)); + if (!this._N) { + this._N=new OneNote.NotebookCollection(this.context, _createPropertyObjectPath(this.context, this, "Notebooks", true, false, false)); } - return this.m_notebooks; + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(Application.prototype, "_platform", { get: function () { - _throwIfNotLoaded("_platform", this.m__platform, "Application", this._isNull); - return this.m__platform; + _throwIfNotLoaded("_platform", this.__p, _typeApplication, this._isNull); + return this.__p; }, enumerable: true, configurable: true }); Application.prototype.getActiveNotebook=function () { - return new OneNote.Notebook(this.context, _createMethodObjectPath(this.context, this, "GetActiveNotebook", 1, [], false, false, null)); + return new OneNote.Notebook(this.context, _createMethodObjectPath(this.context, this, "GetActiveNotebook", 1, [], false, false, null, false)); }; Application.prototype.getActiveNotebookOrNull=function () { - return new OneNote.Notebook(this.context, _createMethodObjectPath(this.context, this, "GetActiveNotebookOrNull", 1, [], false, false, null)); + return new OneNote.Notebook(this.context, _createMethodObjectPath(this.context, this, "GetActiveNotebookOrNull", 1, [], false, false, null, false)); }; Application.prototype.getActiveOutline=function () { - return new OneNote.Outline(this.context, _createMethodObjectPath(this.context, this, "GetActiveOutline", 1, [], false, false, null)); + return new OneNote.Outline(this.context, _createMethodObjectPath(this.context, this, "GetActiveOutline", 1, [], false, false, null, false)); }; Application.prototype.getActiveOutlineOrNull=function () { - return new OneNote.Outline(this.context, _createMethodObjectPath(this.context, this, "GetActiveOutlineOrNull", 1, [], false, false, null)); + return new OneNote.Outline(this.context, _createMethodObjectPath(this.context, this, "GetActiveOutlineOrNull", 1, [], false, false, null, false)); }; Application.prototype.getActivePage=function () { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "GetActivePage", 1, [], false, false, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "GetActivePage", 1, [], false, false, null, false)); }; Application.prototype.getActivePageOrNull=function () { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "GetActivePageOrNull", 1, [], false, false, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "GetActivePageOrNull", 1, [], false, false, null, false)); }; Application.prototype.getActiveParagraph=function () { - return new OneNote.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetActiveParagraph", 1, [], false, false, null)); + return new OneNote.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetActiveParagraph", 1, [], false, false, null, false)); }; Application.prototype.getActiveParagraphOrNull=function () { - return new OneNote.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetActiveParagraphOrNull", 1, [], false, false, null)); + return new OneNote.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetActiveParagraphOrNull", 1, [], false, false, null, false)); }; Application.prototype.getActiveSection=function () { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "GetActiveSection", 1, [], false, false, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "GetActiveSection", 1, [], false, false, null, false)); }; Application.prototype.getActiveSectionOrNull=function () { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "GetActiveSectionOrNull", 1, [], false, false, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "GetActiveSectionOrNull", 1, [], false, false, null, false)); + }; + Application.prototype.getSelectedPages=function () { + return new OneNote.PageCollection(this.context, _createMethodObjectPath(this.context, this, "GetSelectedPages", 1, [], true, false, null, false)); + }; + Application.prototype.getWindowSize=function () { + var action=_createMethodAction(this.context, this, "GetWindowSize", 0, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Application.prototype.insertHtmlAtCurrentPosition=function (html) { + _createMethodAction(this.context, this, "InsertHtmlAtCurrentPosition", 0, [html], false); }; Application.prototype.navigateToPage=function (page) { - _createMethodAction(this.context, this, "NavigateToPage", 1, [page]); + _createMethodAction(this.context, this, "NavigateToPage", 1, [page], false); }; Application.prototype.navigateToPageWithClientUrl=function (url) { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "NavigateToPageWithClientUrl", 1, [url], false, false, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "NavigateToPageWithClientUrl", 1, [url], false, false, null, false)); + }; + Application.prototype._ClientLog=function (level, eventName, flag, data) { + _createMethodAction(this.context, this, "_ClientLog", 1, [level, eventName, flag, data], false); + }; + Application.prototype._EnableControl=function (controlId, enable) { + _createMethodAction(this.context, this, "_EnableControl", 0, [controlId, enable], false); + }; + Application.prototype._EnterFullScreen=function () { + _createMethodAction(this.context, this, "_EnterFullScreen", 0, [], false); + }; + Application.prototype._ExitFullScreen=function () { + _createMethodAction(this.context, this, "_ExitFullScreen", 0, [], false); + }; + Application.prototype._FocusCanvas=function () { + _createMethodAction(this.context, this, "_FocusCanvas", 0, [], false); }; Application.prototype._GetAccountInfo=function () { - var action=_createMethodAction(this.context, this, "_GetAccountInfo", 1, []); + var action=_createMethodAction(this.context, this, "_GetAccountInfo", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Application.prototype._GetAccountInfoByType=function (filter) { + var action=_createMethodAction(this.context, this, "_GetAccountInfoByType", 1, [filter], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Application.prototype._GetControlVisibility=function (controlId) { + var action=_createMethodAction(this.context, this, "_GetControlVisibility", 1, [controlId], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Application.prototype._GetLoggingInfo=function () { + var action=_createMethodAction(this.context, this, "_GetLoggingInfo", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Application.prototype._GetObjectByReferenceId=function (referenceId) { - var action=_createMethodAction(this.context, this, "_GetObjectByReferenceId", 1, [referenceId]); + var action=_createMethodAction(this.context, this, "_GetObjectByReferenceId", 1, [referenceId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Application.prototype._GetObjectTypeNameByReferenceId=function (referenceId) { - var action=_createMethodAction(this.context, this, "_GetObjectTypeNameByReferenceId", 1, [referenceId]); + var action=_createMethodAction(this.context, this, "_GetObjectTypeNameByReferenceId", 1, [referenceId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Application.prototype._GetServiceTokenByUrl=function (url) { - var action=_createMethodAction(this.context, this, "_GetServiceTokenByUrl", 1, [url]); + var action=_createMethodAction(this.context, this, "_GetServiceTokenByUrl", 1, [url], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Application.prototype._GetServiceTokens=function (id) { - var action=_createMethodAction(this.context, this, "_GetServiceTokens", 1, [id]); + var action=_createMethodAction(this.context, this, "_GetServiceTokens", 1, [id], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Application.prototype._GetServiceTokensExt=function (id, filter) { - var action=_createMethodAction(this.context, this, "_GetServiceTokensExt", 1, [id, filter]); + var action=_createMethodAction(this.context, this, "_GetServiceTokensExt", 1, [id, filter], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Application.prototype._GetServiceUrl=function (id) { - var action=_createMethodAction(this.context, this, "_GetServiceUrl", 1, [id]); + var action=_createMethodAction(this.context, this, "_GetServiceUrl", 1, [id], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Application.prototype._IsControlEnabled=function (controlId) { + var action=_createMethodAction(this.context, this, "_IsControlEnabled", 1, [controlId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Application.prototype._RemoveAllReferences=function () { - _createMethodAction(this.context, this, "_RemoveAllReferences", 1, []); + _createMethodAction(this.context, this, "_RemoveAllReferences", 1, [], false); }; Application.prototype._RemoveReference=function (referenceId) { - _createMethodAction(this.context, this, "_RemoveReference", 1, [referenceId]); + _createMethodAction(this.context, this, "_RemoveReference", 1, [referenceId], false); }; - Application.prototype._SendDataToLearningTools=function (data) { - var action=_createMethodAction(this.context, this, "_SendDataToLearningTools", 0, [data]); + Application.prototype._SendDataToLearningTools=function (data, sessionId) { + var action=_createMethodAction(this.context, this, "_SendDataToLearningTools", 0, [data, sessionId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; + Application.prototype._SetControlVisibility=function (controlId, visible) { + _createMethodAction(this.context, this, "_SetControlVisibility", 0, [controlId, visible], false); + }; Application.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); if (_isNullOrUndefined(value)) @@ -11472,7 +13154,7 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_platform"])) { - this.m__platform=obj["_platform"]; + this.__p=obj["_platform"]; } _handleNavigationPropertyResults(this, obj, ["notebooks", "Notebooks"]); }; @@ -11486,6 +13168,7 @@ var OneNote; return Application; }(OfficeExtension.ClientObject)); OneNote.Application=Application; + var _typeInkAnalysis="InkAnalysis"; var InkAnalysis=(function (_super) { __extends(InkAnalysis, _super); function InkAnalysis() { @@ -11500,42 +13183,42 @@ var OneNote; }); Object.defineProperty(InkAnalysis.prototype, "page", { get: function () { - if (!this.m_page) { - this.m_page=new OneNote.Page(this.context, _createPropertyObjectPath(this.context, this, "Page", false, false)); + if (!this._P) { + this._P=new OneNote.Page(this.context, _createPropertyObjectPath(this.context, this, "Page", false, false, false)); } - return this.m_page; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysis.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new OneNote.InkAnalysisParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._Pa) { + this._Pa=new OneNote.InkAnalysisParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysis.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "InkAnalysis", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeInkAnalysis, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysis.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkAnalysis", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkAnalysis, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InkAnalysis.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkAnalysis.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -11544,10 +13227,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["page", "Page", "paragraphs", "Paragraphs"]); }; @@ -11561,10 +13244,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; InkAnalysis.prototype.track=function () { @@ -11577,12 +13260,13 @@ var OneNote; }; InkAnalysis.prototype.toJSON=function () { return { - "id": this.m_id + "id": this._I }; }; return InkAnalysis; }(OfficeExtension.ClientObject)); OneNote.InkAnalysis=InkAnalysis; + var _typeInkAnalysisParagraph="InkAnalysisParagraph"; var InkAnalysisParagraph=(function (_super) { __extends(InkAnalysisParagraph, _super); function InkAnalysisParagraph() { @@ -11597,42 +13281,42 @@ var OneNote; }); Object.defineProperty(InkAnalysisParagraph.prototype, "inkAnalysis", { get: function () { - if (!this.m_inkAnalysis) { - this.m_inkAnalysis=new OneNote.InkAnalysis(this.context, _createPropertyObjectPath(this.context, this, "InkAnalysis", false, false)); + if (!this._In) { + this._In=new OneNote.InkAnalysis(this.context, _createPropertyObjectPath(this.context, this, "InkAnalysis", false, false, false)); } - return this.m_inkAnalysis; + return this._In; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisParagraph.prototype, "lines", { get: function () { - if (!this.m_lines) { - this.m_lines=new OneNote.InkAnalysisLineCollection(this.context, _createPropertyObjectPath(this.context, this, "Lines", true, false)); + if (!this._L) { + this._L=new OneNote.InkAnalysisLineCollection(this.context, _createPropertyObjectPath(this.context, this, "Lines", true, false, false)); } - return this.m_lines; + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisParagraph.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "InkAnalysisParagraph", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeInkAnalysisParagraph, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisParagraph.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkAnalysisParagraph", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkAnalysisParagraph, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InkAnalysisParagraph.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkAnalysisParagraph.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -11641,10 +13325,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["inkAnalysis", "InkAnalysis", "lines", "Lines"]); }; @@ -11658,10 +13342,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; InkAnalysisParagraph.prototype.track=function () { @@ -11674,12 +13358,13 @@ var OneNote; }; InkAnalysisParagraph.prototype.toJSON=function () { return { - "id": this.m_id + "id": this._I }; }; return InkAnalysisParagraph; }(OfficeExtension.ClientObject)); OneNote.InkAnalysisParagraph=InkAnalysisParagraph; + var _typeInkAnalysisParagraphCollection="InkAnalysisParagraphCollection"; var InkAnalysisParagraphCollection=(function (_super) { __extends(InkAnalysisParagraphCollection, _super); function InkAnalysisParagraphCollection() { @@ -11694,7 +13379,7 @@ var OneNote; }); Object.defineProperty(InkAnalysisParagraphCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "InkAnalysisParagraphCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeInkAnalysisParagraphCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -11702,16 +13387,16 @@ var OneNote; }); Object.defineProperty(InkAnalysisParagraphCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "InkAnalysisParagraphCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeInkAnalysisParagraphCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisParagraphCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkAnalysisParagraphCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkAnalysisParagraphCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -11720,10 +13405,10 @@ var OneNote; return new OneNote.InkAnalysisParagraph(this.context, _createIndexerObjectPath(this.context, this, [index])); }; InkAnalysisParagraphCollection.prototype.getItemAt=function (index) { - return new OneNote.InkAnalysisParagraph(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.InkAnalysisParagraph(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; InkAnalysisParagraphCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkAnalysisParagraphCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -11732,10 +13417,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -11757,7 +13442,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; InkAnalysisParagraphCollection.prototype.track=function () { @@ -11770,12 +13455,13 @@ var OneNote; }; InkAnalysisParagraphCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return InkAnalysisParagraphCollection; }(OfficeExtension.ClientObject)); OneNote.InkAnalysisParagraphCollection=InkAnalysisParagraphCollection; + var _typeInkAnalysisLine="InkAnalysisLine"; var InkAnalysisLine=(function (_super) { __extends(InkAnalysisLine, _super); function InkAnalysisLine() { @@ -11790,42 +13476,42 @@ var OneNote; }); Object.defineProperty(InkAnalysisLine.prototype, "paragraph", { get: function () { - if (!this.m_paragraph) { - this.m_paragraph=new OneNote.InkAnalysisParagraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false)); + if (!this._P) { + this._P=new OneNote.InkAnalysisParagraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false, false)); } - return this.m_paragraph; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisLine.prototype, "words", { get: function () { - if (!this.m_words) { - this.m_words=new OneNote.InkAnalysisWordCollection(this.context, _createPropertyObjectPath(this.context, this, "Words", true, false)); + if (!this._W) { + this._W=new OneNote.InkAnalysisWordCollection(this.context, _createPropertyObjectPath(this.context, this, "Words", true, false, false)); } - return this.m_words; + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisLine.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "InkAnalysisLine", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeInkAnalysisLine, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisLine.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkAnalysisLine", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkAnalysisLine, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InkAnalysisLine.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkAnalysisLine.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -11834,10 +13520,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["paragraph", "Paragraph", "words", "Words"]); }; @@ -11851,10 +13537,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; InkAnalysisLine.prototype.track=function () { @@ -11867,12 +13553,13 @@ var OneNote; }; InkAnalysisLine.prototype.toJSON=function () { return { - "id": this.m_id + "id": this._I }; }; return InkAnalysisLine; }(OfficeExtension.ClientObject)); OneNote.InkAnalysisLine=InkAnalysisLine; + var _typeInkAnalysisLineCollection="InkAnalysisLineCollection"; var InkAnalysisLineCollection=(function (_super) { __extends(InkAnalysisLineCollection, _super); function InkAnalysisLineCollection() { @@ -11887,7 +13574,7 @@ var OneNote; }); Object.defineProperty(InkAnalysisLineCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "InkAnalysisLineCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeInkAnalysisLineCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -11895,16 +13582,16 @@ var OneNote; }); Object.defineProperty(InkAnalysisLineCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "InkAnalysisLineCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeInkAnalysisLineCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisLineCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkAnalysisLineCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkAnalysisLineCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -11913,10 +13600,10 @@ var OneNote; return new OneNote.InkAnalysisLine(this.context, _createIndexerObjectPath(this.context, this, [index])); }; InkAnalysisLineCollection.prototype.getItemAt=function (index) { - return new OneNote.InkAnalysisLine(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.InkAnalysisLine(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; InkAnalysisLineCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkAnalysisLineCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -11925,10 +13612,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -11950,7 +13637,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; InkAnalysisLineCollection.prototype.track=function () { @@ -11963,12 +13650,13 @@ var OneNote; }; InkAnalysisLineCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return InkAnalysisLineCollection; }(OfficeExtension.ClientObject)); OneNote.InkAnalysisLineCollection=InkAnalysisLineCollection; + var _typeInkAnalysisWord="InkAnalysisWord"; var InkAnalysisWord=(function (_super) { __extends(InkAnalysisWord, _super); function InkAnalysisWord() { @@ -11983,56 +13671,56 @@ var OneNote; }); Object.defineProperty(InkAnalysisWord.prototype, "line", { get: function () { - if (!this.m_line) { - this.m_line=new OneNote.InkAnalysisLine(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false)); + if (!this._Li) { + this._Li=new OneNote.InkAnalysisLine(this.context, _createPropertyObjectPath(this.context, this, "Line", false, false, false)); } - return this.m_line; + return this._Li; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisWord.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "InkAnalysisWord", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeInkAnalysisWord, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisWord.prototype, "languageId", { get: function () { - _throwIfNotLoaded("languageId", this.m_languageId, "InkAnalysisWord", this._isNull); - return this.m_languageId; + _throwIfNotLoaded("languageId", this._L, _typeInkAnalysisWord, this._isNull); + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisWord.prototype, "strokePointers", { get: function () { - _throwIfNotLoaded("strokePointers", this.m_strokePointers, "InkAnalysisWord", this._isNull); - return this.m_strokePointers; + _throwIfNotLoaded("strokePointers", this._S, _typeInkAnalysisWord, this._isNull); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisWord.prototype, "wordAlternates", { get: function () { - _throwIfNotLoaded("wordAlternates", this.m_wordAlternates, "InkAnalysisWord", this._isNull); - return this.m_wordAlternates; + _throwIfNotLoaded("wordAlternates", this._W, _typeInkAnalysisWord, this._isNull); + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisWord.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkAnalysisWord", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkAnalysisWord, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InkAnalysisWord.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkAnalysisWord.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12041,19 +13729,19 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["LanguageId"])) { - this.m_languageId=obj["LanguageId"]; + this._L=obj["LanguageId"]; } if (!_isUndefined(obj["StrokePointers"])) { - this.m_strokePointers=obj["StrokePointers"]; + this._S=obj["StrokePointers"]; } if (!_isUndefined(obj["WordAlternates"])) { - this.m_wordAlternates=obj["WordAlternates"]; + this._W=obj["WordAlternates"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["line", "Line"]); }; @@ -12067,10 +13755,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; InkAnalysisWord.prototype.track=function () { @@ -12083,15 +13771,16 @@ var OneNote; }; InkAnalysisWord.prototype.toJSON=function () { return { - "id": this.m_id, - "languageId": this.m_languageId, - "strokePointers": this.m_strokePointers, - "wordAlternates": this.m_wordAlternates + "id": this._I, + "languageId": this._L, + "strokePointers": this._S, + "wordAlternates": this._W }; }; return InkAnalysisWord; }(OfficeExtension.ClientObject)); OneNote.InkAnalysisWord=InkAnalysisWord; + var _typeInkAnalysisWordCollection="InkAnalysisWordCollection"; var InkAnalysisWordCollection=(function (_super) { __extends(InkAnalysisWordCollection, _super); function InkAnalysisWordCollection() { @@ -12106,7 +13795,7 @@ var OneNote; }); Object.defineProperty(InkAnalysisWordCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "InkAnalysisWordCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeInkAnalysisWordCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -12114,16 +13803,16 @@ var OneNote; }); Object.defineProperty(InkAnalysisWordCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "InkAnalysisWordCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeInkAnalysisWordCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(InkAnalysisWordCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkAnalysisWordCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkAnalysisWordCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -12132,10 +13821,10 @@ var OneNote; return new OneNote.InkAnalysisWord(this.context, _createIndexerObjectPath(this.context, this, [index])); }; InkAnalysisWordCollection.prototype.getItemAt=function (index) { - return new OneNote.InkAnalysisWord(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.InkAnalysisWord(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; InkAnalysisWordCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkAnalysisWordCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12144,10 +13833,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -12169,7 +13858,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; InkAnalysisWordCollection.prototype.track=function () { @@ -12182,12 +13871,13 @@ var OneNote; }; InkAnalysisWordCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return InkAnalysisWordCollection; }(OfficeExtension.ClientObject)); OneNote.InkAnalysisWordCollection=InkAnalysisWordCollection; + var _typeFloatingInk="FloatingInk"; var FloatingInk=(function (_super) { __extends(FloatingInk, _super); function FloatingInk() { @@ -12202,42 +13892,42 @@ var OneNote; }); Object.defineProperty(FloatingInk.prototype, "inkStrokes", { get: function () { - if (!this.m_inkStrokes) { - this.m_inkStrokes=new OneNote.InkStrokeCollection(this.context, _createPropertyObjectPath(this.context, this, "InkStrokes", true, false)); + if (!this._In) { + this._In=new OneNote.InkStrokeCollection(this.context, _createPropertyObjectPath(this.context, this, "InkStrokes", true, false, false)); } - return this.m_inkStrokes; + return this._In; }, enumerable: true, configurable: true }); Object.defineProperty(FloatingInk.prototype, "pageContent", { get: function () { - if (!this.m_pageContent) { - this.m_pageContent=new OneNote.PageContent(this.context, _createPropertyObjectPath(this.context, this, "PageContent", false, false)); + if (!this._P) { + this._P=new OneNote.PageContent(this.context, _createPropertyObjectPath(this.context, this, "PageContent", false, false, false)); } - return this.m_pageContent; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(FloatingInk.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "FloatingInk", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeFloatingInk, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(FloatingInk.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "FloatingInk", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeFloatingInk, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); FloatingInk.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; FloatingInk.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12246,10 +13936,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["inkStrokes", "InkStrokes", "pageContent", "PageContent"]); }; @@ -12263,10 +13953,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; FloatingInk.prototype.track=function () { @@ -12279,12 +13969,13 @@ var OneNote; }; FloatingInk.prototype.toJSON=function () { return { - "id": this.m_id + "id": this._I }; }; return FloatingInk; }(OfficeExtension.ClientObject)); OneNote.FloatingInk=FloatingInk; + var _typeInkStroke="InkStroke"; var InkStroke=(function (_super) { __extends(InkStroke, _super); function InkStroke() { @@ -12299,32 +13990,32 @@ var OneNote; }); Object.defineProperty(InkStroke.prototype, "floatingInk", { get: function () { - if (!this.m_floatingInk) { - this.m_floatingInk=new OneNote.FloatingInk(this.context, _createPropertyObjectPath(this.context, this, "FloatingInk", false, false)); + if (!this._F) { + this._F=new OneNote.FloatingInk(this.context, _createPropertyObjectPath(this.context, this, "FloatingInk", false, false, false)); } - return this.m_floatingInk; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(InkStroke.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "InkStroke", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeInkStroke, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(InkStroke.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkStroke", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkStroke, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InkStroke.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkStroke.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12333,10 +14024,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["floatingInk", "FloatingInk"]); }; @@ -12350,10 +14041,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; InkStroke.prototype.track=function () { @@ -12366,12 +14057,13 @@ var OneNote; }; InkStroke.prototype.toJSON=function () { return { - "id": this.m_id + "id": this._I }; }; return InkStroke; }(OfficeExtension.ClientObject)); OneNote.InkStroke=InkStroke; + var _typeInkStrokeCollection="InkStrokeCollection"; var InkStrokeCollection=(function (_super) { __extends(InkStrokeCollection, _super); function InkStrokeCollection() { @@ -12386,7 +14078,7 @@ var OneNote; }); Object.defineProperty(InkStrokeCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "InkStrokeCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeInkStrokeCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -12394,16 +14086,16 @@ var OneNote; }); Object.defineProperty(InkStrokeCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "InkStrokeCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeInkStrokeCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(InkStrokeCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkStrokeCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkStrokeCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -12412,10 +14104,10 @@ var OneNote; return new OneNote.InkStroke(this.context, _createIndexerObjectPath(this.context, this, [index])); }; InkStrokeCollection.prototype.getItemAt=function (index) { - return new OneNote.InkStroke(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.InkStroke(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; InkStrokeCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkStrokeCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12424,10 +14116,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -12449,7 +14141,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; InkStrokeCollection.prototype.track=function () { @@ -12462,12 +14154,13 @@ var OneNote; }; InkStrokeCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return InkStrokeCollection; }(OfficeExtension.ClientObject)); OneNote.InkStrokeCollection=InkStrokeCollection; + var _typeInkWord="InkWord"; var InkWord=(function (_super) { __extends(InkWord, _super); function InkWord() { @@ -12482,48 +14175,48 @@ var OneNote; }); Object.defineProperty(InkWord.prototype, "paragraph", { get: function () { - if (!this.m_paragraph) { - this.m_paragraph=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false)); + if (!this._P) { + this._P=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false, false)); } - return this.m_paragraph; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(InkWord.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "InkWord", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeInkWord, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(InkWord.prototype, "languageId", { get: function () { - _throwIfNotLoaded("languageId", this.m_languageId, "InkWord", this._isNull); - return this.m_languageId; + _throwIfNotLoaded("languageId", this._L, _typeInkWord, this._isNull); + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(InkWord.prototype, "wordAlternates", { get: function () { - _throwIfNotLoaded("wordAlternates", this.m_wordAlternates, "InkWord", this._isNull); - return this.m_wordAlternates; + _throwIfNotLoaded("wordAlternates", this._W, _typeInkWord, this._isNull); + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(InkWord.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkWord", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkWord, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InkWord.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkWord.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12532,16 +14225,16 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["LanguageId"])) { - this.m_languageId=obj["LanguageId"]; + this._L=obj["LanguageId"]; } if (!_isUndefined(obj["WordAlternates"])) { - this.m_wordAlternates=obj["WordAlternates"]; + this._W=obj["WordAlternates"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["paragraph", "Paragraph"]); }; @@ -12555,10 +14248,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; InkWord.prototype.track=function () { @@ -12571,14 +14264,15 @@ var OneNote; }; InkWord.prototype.toJSON=function () { return { - "id": this.m_id, - "languageId": this.m_languageId, - "wordAlternates": this.m_wordAlternates + "id": this._I, + "languageId": this._L, + "wordAlternates": this._W }; }; return InkWord; }(OfficeExtension.ClientObject)); OneNote.InkWord=InkWord; + var _typeInkWordCollection="InkWordCollection"; var InkWordCollection=(function (_super) { __extends(InkWordCollection, _super); function InkWordCollection() { @@ -12593,7 +14287,7 @@ var OneNote; }); Object.defineProperty(InkWordCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "InkWordCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeInkWordCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -12601,16 +14295,16 @@ var OneNote; }); Object.defineProperty(InkWordCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "InkWordCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeInkWordCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(InkWordCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InkWordCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInkWordCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -12619,10 +14313,10 @@ var OneNote; return new OneNote.InkWord(this.context, _createIndexerObjectPath(this.context, this, [index])); }; InkWordCollection.prototype.getItemAt=function (index) { - return new OneNote.InkWord(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.InkWord(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; InkWordCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InkWordCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12631,10 +14325,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -12656,7 +14350,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; InkWordCollection.prototype.track=function () { @@ -12669,12 +14363,13 @@ var OneNote; }; InkWordCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return InkWordCollection; }(OfficeExtension.ClientObject)); OneNote.InkWordCollection=InkWordCollection; + var _typeNotebook="Notebook"; var Notebook=(function (_super) { __extends(Notebook, _super); function Notebook() { @@ -12689,81 +14384,81 @@ var OneNote; }); Object.defineProperty(Notebook.prototype, "sectionGroups", { get: function () { - if (!this.m_sectionGroups) { - this.m_sectionGroups=new OneNote.SectionGroupCollection(this.context, _createPropertyObjectPath(this.context, this, "SectionGroups", true, false)); + if (!this._S) { + this._S=new OneNote.SectionGroupCollection(this.context, _createPropertyObjectPath(this.context, this, "SectionGroups", true, false, false)); } - return this.m_sectionGroups; + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(Notebook.prototype, "sections", { get: function () { - if (!this.m_sections) { - this.m_sections=new OneNote.SectionCollection(this.context, _createPropertyObjectPath(this.context, this, "Sections", true, false)); + if (!this._Se) { + this._Se=new OneNote.SectionCollection(this.context, _createPropertyObjectPath(this.context, this, "Sections", true, false, false)); } - return this.m_sections; + return this._Se; }, enumerable: true, configurable: true }); Object.defineProperty(Notebook.prototype, "baseUrl", { get: function () { - _throwIfNotLoaded("baseUrl", this.m_baseUrl, "Notebook", this._isNull); - return this.m_baseUrl; + _throwIfNotLoaded("baseUrl", this._B, _typeNotebook, this._isNull); + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(Notebook.prototype, "clientUrl", { get: function () { - _throwIfNotLoaded("clientUrl", this.m_clientUrl, "Notebook", this._isNull); - return this.m_clientUrl; + _throwIfNotLoaded("clientUrl", this._C, _typeNotebook, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Notebook.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Notebook", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeNotebook, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Notebook.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "Notebook", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeNotebook, this._isNull); + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(Notebook.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Notebook", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeNotebook, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Notebook.prototype.addSection=function (name) { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "AddSection", 0, [name], false, true, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "AddSection", 0, [name], false, true, null, false)); }; Notebook.prototype.addSectionGroup=function (name) { - return new OneNote.SectionGroup(this.context, _createMethodObjectPath(this.context, this, "AddSectionGroup", 0, [name], false, true, null)); + return new OneNote.SectionGroup(this.context, _createMethodObjectPath(this.context, this, "AddSectionGroup", 0, [name], false, true, null, false)); }; Notebook.prototype.getRestApiId=function () { - var action=_createMethodAction(this.context, this, "GetRestApiId", 1, []); + var action=_createMethodAction(this.context, this, "GetRestApiId", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Notebook.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Notebook.prototype._Sync=function () { - _createMethodAction(this.context, this, "_Sync", 0, []); + _createMethodAction(this.context, this, "_Sync", 0, [], false); }; Notebook.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12772,19 +14467,19 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["BaseUrl"])) { - this.m_baseUrl=obj["BaseUrl"]; + this._B=obj["BaseUrl"]; } if (!_isUndefined(obj["ClientUrl"])) { - this.m_clientUrl=obj["ClientUrl"]; + this._C=obj["ClientUrl"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["sectionGroups", "SectionGroups", "sections", "Sections"]); }; @@ -12798,10 +14493,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; Notebook.prototype.track=function () { @@ -12814,15 +14509,16 @@ var OneNote; }; Notebook.prototype.toJSON=function () { return { - "baseUrl": this.m_baseUrl, - "clientUrl": this.m_clientUrl, - "id": this.m_id, - "name": this.m_name + "baseUrl": this._B, + "clientUrl": this._C, + "id": this._I, + "name": this._N }; }; return Notebook; }(OfficeExtension.ClientObject)); OneNote.Notebook=Notebook; + var _typeNotebookCollection="NotebookCollection"; var NotebookCollection=(function (_super) { __extends(NotebookCollection, _super); function NotebookCollection() { @@ -12837,7 +14533,7 @@ var OneNote; }); Object.defineProperty(NotebookCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "NotebookCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeNotebookCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -12845,31 +14541,31 @@ var OneNote; }); Object.defineProperty(NotebookCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "NotebookCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeNotebookCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(NotebookCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "NotebookCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeNotebookCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); NotebookCollection.prototype.getByName=function (name) { - return new OneNote.NotebookCollection(this.context, _createMethodObjectPath(this.context, this, "GetByName", 1, [name], true, false, null)); + return new OneNote.NotebookCollection(this.context, _createMethodObjectPath(this.context, this, "GetByName", 1, [name], true, false, null, false)); }; NotebookCollection.prototype.getItem=function (index) { return new OneNote.Notebook(this.context, _createIndexerObjectPath(this.context, this, [index])); }; NotebookCollection.prototype.getItemAt=function (index) { - return new OneNote.Notebook(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.Notebook(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; NotebookCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; NotebookCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12878,10 +14574,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -12903,7 +14599,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; NotebookCollection.prototype.track=function () { @@ -12916,12 +14612,13 @@ var OneNote; }; NotebookCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return NotebookCollection; }(OfficeExtension.ClientObject)); OneNote.NotebookCollection=NotebookCollection; + var _typeSectionGroup="SectionGroup"; var SectionGroup=(function (_super) { __extends(SectionGroup, _super); function SectionGroup() { @@ -12936,100 +14633,100 @@ var OneNote; }); Object.defineProperty(SectionGroup.prototype, "notebook", { get: function () { - if (!this.m_notebook) { - this.m_notebook=new OneNote.Notebook(this.context, _createPropertyObjectPath(this.context, this, "Notebook", false, false)); + if (!this._No) { + this._No=new OneNote.Notebook(this.context, _createPropertyObjectPath(this.context, this, "Notebook", false, false, false)); } - return this.m_notebook; + return this._No; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "parentSectionGroup", { get: function () { - if (!this.m_parentSectionGroup) { - this.m_parentSectionGroup=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroup", false, false)); + if (!this._P) { + this._P=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroup", false, false, false)); } - return this.m_parentSectionGroup; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "parentSectionGroupOrNull", { get: function () { - if (!this.m_parentSectionGroupOrNull) { - this.m_parentSectionGroupOrNull=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroupOrNull", false, false)); + if (!this._Pa) { + this._Pa=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroupOrNull", false, false, false)); } - return this.m_parentSectionGroupOrNull; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "sectionGroups", { get: function () { - if (!this.m_sectionGroups) { - this.m_sectionGroups=new OneNote.SectionGroupCollection(this.context, _createPropertyObjectPath(this.context, this, "SectionGroups", true, false)); + if (!this._S) { + this._S=new OneNote.SectionGroupCollection(this.context, _createPropertyObjectPath(this.context, this, "SectionGroups", true, false, false)); } - return this.m_sectionGroups; + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "sections", { get: function () { - if (!this.m_sections) { - this.m_sections=new OneNote.SectionCollection(this.context, _createPropertyObjectPath(this.context, this, "Sections", true, false)); + if (!this._Se) { + this._Se=new OneNote.SectionCollection(this.context, _createPropertyObjectPath(this.context, this, "Sections", true, false, false)); } - return this.m_sections; + return this._Se; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "clientUrl", { get: function () { - _throwIfNotLoaded("clientUrl", this.m_clientUrl, "SectionGroup", this._isNull); - return this.m_clientUrl; + _throwIfNotLoaded("clientUrl", this._C, _typeSectionGroup, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "SectionGroup", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeSectionGroup, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "SectionGroup", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeSectionGroup, this._isNull); + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroup.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "SectionGroup", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeSectionGroup, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); SectionGroup.prototype.addSection=function (title) { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "AddSection", 0, [title], false, true, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "AddSection", 0, [title], false, true, null, false)); }; SectionGroup.prototype.addSectionGroup=function (name) { - return new OneNote.SectionGroup(this.context, _createMethodObjectPath(this.context, this, "AddSectionGroup", 0, [name], false, true, null)); + return new OneNote.SectionGroup(this.context, _createMethodObjectPath(this.context, this, "AddSectionGroup", 0, [name], false, true, null, false)); }; SectionGroup.prototype.getRestApiId=function () { - var action=_createMethodAction(this.context, this, "GetRestApiId", 1, []); + var action=_createMethodAction(this.context, this, "GetRestApiId", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; SectionGroup.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; SectionGroup.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13038,16 +14735,16 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["ClientUrl"])) { - this.m_clientUrl=obj["ClientUrl"]; + this._C=obj["ClientUrl"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["notebook", "Notebook", "parentSectionGroup", "ParentSectionGroup", "parentSectionGroupOrNull", "ParentSectionGroupOrNull", "sectionGroups", "SectionGroups", "sections", "Sections"]); }; @@ -13061,10 +14758,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; SectionGroup.prototype.track=function () { @@ -13077,14 +14774,15 @@ var OneNote; }; SectionGroup.prototype.toJSON=function () { return { - "clientUrl": this.m_clientUrl, - "id": this.m_id, - "name": this.m_name + "clientUrl": this._C, + "id": this._I, + "name": this._N }; }; return SectionGroup; }(OfficeExtension.ClientObject)); OneNote.SectionGroup=SectionGroup; + var _typeSectionGroupCollection="SectionGroupCollection"; var SectionGroupCollection=(function (_super) { __extends(SectionGroupCollection, _super); function SectionGroupCollection() { @@ -13099,7 +14797,7 @@ var OneNote; }); Object.defineProperty(SectionGroupCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "SectionGroupCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeSectionGroupCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -13107,31 +14805,31 @@ var OneNote; }); Object.defineProperty(SectionGroupCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "SectionGroupCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeSectionGroupCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(SectionGroupCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "SectionGroupCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeSectionGroupCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); SectionGroupCollection.prototype.getByName=function (name) { - return new OneNote.SectionGroupCollection(this.context, _createMethodObjectPath(this.context, this, "GetByName", 1, [name], true, false, null)); + return new OneNote.SectionGroupCollection(this.context, _createMethodObjectPath(this.context, this, "GetByName", 1, [name], true, false, null, false)); }; SectionGroupCollection.prototype.getItem=function (index) { return new OneNote.SectionGroup(this.context, _createIndexerObjectPath(this.context, this, [index])); }; SectionGroupCollection.prototype.getItemAt=function (index) { - return new OneNote.SectionGroup(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.SectionGroup(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; SectionGroupCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; SectionGroupCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13140,10 +14838,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -13165,7 +14863,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; SectionGroupCollection.prototype.track=function () { @@ -13178,12 +14876,13 @@ var OneNote; }; SectionGroupCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return SectionGroupCollection; }(OfficeExtension.ClientObject)); OneNote.SectionGroupCollection=SectionGroupCollection; + var _typeSection="Section"; var Section=(function (_super) { __extends(Section, _super); function Section() { @@ -13198,96 +14897,116 @@ var OneNote; }); Object.defineProperty(Section.prototype, "notebook", { get: function () { - if (!this.m_notebook) { - this.m_notebook=new OneNote.Notebook(this.context, _createPropertyObjectPath(this.context, this, "Notebook", false, false)); + if (!this._No) { + this._No=new OneNote.Notebook(this.context, _createPropertyObjectPath(this.context, this, "Notebook", false, false, false)); } - return this.m_notebook; + return this._No; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "pages", { get: function () { - if (!this.m_pages) { - this.m_pages=new OneNote.PageCollection(this.context, _createPropertyObjectPath(this.context, this, "Pages", true, false)); + if (!this._P) { + this._P=new OneNote.PageCollection(this.context, _createPropertyObjectPath(this.context, this, "Pages", true, false, false)); } - return this.m_pages; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "parentSectionGroup", { get: function () { - if (!this.m_parentSectionGroup) { - this.m_parentSectionGroup=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroup", false, false)); + if (!this._Pa) { + this._Pa=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroup", false, false, false)); } - return this.m_parentSectionGroup; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "parentSectionGroupOrNull", { get: function () { - if (!this.m_parentSectionGroupOrNull) { - this.m_parentSectionGroupOrNull=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroupOrNull", false, false)); + if (!this._Par) { + this._Par=new OneNote.SectionGroup(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionGroupOrNull", false, false, false)); } - return this.m_parentSectionGroupOrNull; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "clientUrl", { get: function () { - _throwIfNotLoaded("clientUrl", this.m_clientUrl, "Section", this._isNull); - return this.m_clientUrl; + _throwIfNotLoaded("clientUrl", this._C, _typeSection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Section", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeSection, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "Section", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeSection, this._isNull); + return this._N; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Section.prototype, "webUrl", { + get: function () { + _throwIfNotLoaded("webUrl", this._W, _typeSection, this._isNull); + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Section", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeSection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Section.prototype.addPage=function (title) { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "AddPage", 0, [title], false, true, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "AddPage", 0, [title], false, true, null, false)); }; Section.prototype.copyToNotebook=function (destinationNotebook) { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "CopyToNotebook", 0, [destinationNotebook], false, true, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "CopyToNotebook", 0, [destinationNotebook], false, true, null, false)); }; Section.prototype.copyToSectionGroup=function (destinationSectionGroup) { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "CopyToSectionGroup", 0, [destinationSectionGroup], false, true, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "CopyToSectionGroup", 0, [destinationSectionGroup], false, true, null, false)); }; Section.prototype.getRestApiId=function () { - var action=_createMethodAction(this.context, this, "GetRestApiId", 1, []); + var action=_createMethodAction(this.context, this, "GetRestApiId", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Section.prototype.insertSectionAsSibling=function (location, title) { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "InsertSectionAsSibling", 0, [location, title], false, true, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "InsertSectionAsSibling", 0, [location, title], false, true, null, false)); + }; + Section.prototype._GetGeoInfo=function () { + var action=_createMethodAction(this.context, this, "_GetGeoInfo", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Section.prototype._GetGeoInfoAsync=function () { + var action=_createMethodAction(this.context, this, "_GetGeoInfoAsync", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; }; Section.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Section.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13296,16 +15015,19 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["ClientUrl"])) { - this.m_clientUrl=obj["ClientUrl"]; + this._C=obj["ClientUrl"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; + } + if (!_isUndefined(obj["WebUrl"])) { + this._W=obj["WebUrl"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["notebook", "Notebook", "pages", "Pages", "parentSectionGroup", "ParentSectionGroup", "parentSectionGroupOrNull", "ParentSectionGroupOrNull"]); }; @@ -13319,10 +15041,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; Section.prototype.track=function () { @@ -13335,14 +15057,16 @@ var OneNote; }; Section.prototype.toJSON=function () { return { - "clientUrl": this.m_clientUrl, - "id": this.m_id, - "name": this.m_name + "clientUrl": this._C, + "id": this._I, + "name": this._N, + "webUrl": this._W }; }; return Section; }(OfficeExtension.ClientObject)); OneNote.Section=Section; + var _typeSectionCollection="SectionCollection"; var SectionCollection=(function (_super) { __extends(SectionCollection, _super); function SectionCollection() { @@ -13357,7 +15081,7 @@ var OneNote; }); Object.defineProperty(SectionCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "SectionCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeSectionCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -13365,31 +15089,31 @@ var OneNote; }); Object.defineProperty(SectionCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "SectionCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeSectionCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(SectionCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "SectionCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeSectionCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); SectionCollection.prototype.getByName=function (name) { - return new OneNote.SectionCollection(this.context, _createMethodObjectPath(this.context, this, "GetByName", 1, [name], true, false, null)); + return new OneNote.SectionCollection(this.context, _createMethodObjectPath(this.context, this, "GetByName", 1, [name], true, false, null, false)); }; SectionCollection.prototype.getItem=function (index) { return new OneNote.Section(this.context, _createIndexerObjectPath(this.context, this, [index])); }; SectionCollection.prototype.getItemAt=function (index) { - return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.Section(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; SectionCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; SectionCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13398,10 +15122,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -13423,7 +15147,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; SectionCollection.prototype.track=function () { @@ -13436,12 +15160,13 @@ var OneNote; }; SectionCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return SectionCollection; }(OfficeExtension.ClientObject)); OneNote.SectionCollection=SectionCollection; + var _typePage="Page"; var Page=(function (_super) { __extends(Page, _super); function Page() { @@ -13456,65 +15181,65 @@ var OneNote; }); Object.defineProperty(Page.prototype, "contents", { get: function () { - if (!this.m_contents) { - this.m_contents=new OneNote.PageContentCollection(this.context, _createPropertyObjectPath(this.context, this, "Contents", true, false)); + if (!this._Co) { + this._Co=new OneNote.PageContentCollection(this.context, _createPropertyObjectPath(this.context, this, "Contents", true, false, false)); } - return this.m_contents; + return this._Co; }, enumerable: true, configurable: true }); Object.defineProperty(Page.prototype, "inkAnalysisOrNull", { get: function () { - if (!this.m_inkAnalysisOrNull) { - this.m_inkAnalysisOrNull=new OneNote.InkAnalysis(this.context, _createPropertyObjectPath(this.context, this, "InkAnalysisOrNull", false, false)); + if (!this._In) { + this._In=new OneNote.InkAnalysis(this.context, _createPropertyObjectPath(this.context, this, "InkAnalysisOrNull", false, false, false)); } - return this.m_inkAnalysisOrNull; + return this._In; }, enumerable: true, configurable: true }); Object.defineProperty(Page.prototype, "parentSection", { get: function () { - if (!this.m_parentSection) { - this.m_parentSection=new OneNote.Section(this.context, _createPropertyObjectPath(this.context, this, "ParentSection", false, false)); + if (!this._Pa) { + this._Pa=new OneNote.Section(this.context, _createPropertyObjectPath(this.context, this, "ParentSection", false, false, false)); } - return this.m_parentSection; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Page.prototype, "classNotebookPageSource", { get: function () { - _throwIfNotLoaded("classNotebookPageSource", this.m_classNotebookPageSource, "Page", this._isNull); - return this.m_classNotebookPageSource; + _throwIfNotLoaded("classNotebookPageSource", this._C, _typePage, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Page.prototype, "clientUrl", { get: function () { - _throwIfNotLoaded("clientUrl", this.m_clientUrl, "Page", this._isNull); - return this.m_clientUrl; + _throwIfNotLoaded("clientUrl", this._Cl, _typePage, this._isNull); + return this._Cl; }, enumerable: true, configurable: true }); Object.defineProperty(Page.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Page", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typePage, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Page.prototype, "pageLevel", { get: function () { - _throwIfNotLoaded("pageLevel", this.m_pageLevel, "Page", this._isNull); - return this.m_pageLevel; + _throwIfNotLoaded("pageLevel", this._P, _typePage, this._isNull); + return this._P; }, set: function (value) { - this.m_pageLevel=value; + this._P=value; _createSetPropertyAction(this.context, this, "PageLevel", value); }, enumerable: true, @@ -13522,11 +15247,11 @@ var OneNote; }); Object.defineProperty(Page.prototype, "title", { get: function () { - _throwIfNotLoaded("title", this.m_title, "Page", this._isNull); - return this.m_title; + _throwIfNotLoaded("title", this._T, _typePage, this._isNull); + return this._T; }, set: function (value) { - this.m_title=value; + this._T=value; _createSetPropertyAction(this.context, this, "Title", value); }, enumerable: true, @@ -13534,16 +15259,16 @@ var OneNote; }); Object.defineProperty(Page.prototype, "webUrl", { get: function () { - _throwIfNotLoaded("webUrl", this.m_webUrl, "Page", this._isNull); - return this.m_webUrl; + _throwIfNotLoaded("webUrl", this._W, _typePage, this._isNull); + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(Page.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Page", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typePage, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -13559,28 +15284,34 @@ var OneNote; ]); }; Page.prototype.addOutline=function (left, top, html) { - return new OneNote.Outline(this.context, _createMethodObjectPath(this.context, this, "AddOutline", 0, [left, top, html], false, true, null)); + return new OneNote.Outline(this.context, _createMethodObjectPath(this.context, this, "AddOutline", 0, [left, top, html], false, true, null, false)); }; Page.prototype.copyToSection=function (destinationSection) { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "CopyToSection", 0, [destinationSection], false, true, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "CopyToSection", 0, [destinationSection], false, true, null, false)); }; Page.prototype.copyToSectionAndSetClassNotebookPageSource=function (destinationSection) { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "CopyToSectionAndSetClassNotebookPageSource", 0, [destinationSection], false, true, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "CopyToSectionAndSetClassNotebookPageSource", 0, [destinationSection], false, true, null, false)); }; Page.prototype.getRestApiId=function () { - var action=_createMethodAction(this.context, this, "GetRestApiId", 1, []); + var action=_createMethodAction(this.context, this, "GetRestApiId", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Page.prototype.hasTitleContent=function () { + var action=_createMethodAction(this.context, this, "HasTitleContent", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Page.prototype.insertPageAsSibling=function (location, title) { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "InsertPageAsSibling", 0, [location, title], false, true, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "InsertPageAsSibling", 0, [location, title], false, true, null, false)); }; Page.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Page.prototype._Sync=function () { - _createMethodAction(this.context, this, "_Sync", 0, []); + _createMethodAction(this.context, this, "_Sync", 0, [], false); }; Page.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13589,25 +15320,25 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["ClassNotebookPageSource"])) { - this.m_classNotebookPageSource=obj["ClassNotebookPageSource"]; + this._C=obj["ClassNotebookPageSource"]; } if (!_isUndefined(obj["ClientUrl"])) { - this.m_clientUrl=obj["ClientUrl"]; + this._Cl=obj["ClientUrl"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["PageLevel"])) { - this.m_pageLevel=obj["PageLevel"]; + this._P=obj["PageLevel"]; } if (!_isUndefined(obj["Title"])) { - this.m_title=obj["Title"]; + this._T=obj["Title"]; } if (!_isUndefined(obj["WebUrl"])) { - this.m_webUrl=obj["WebUrl"]; + this._W=obj["WebUrl"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["contents", "Contents", "inkAnalysisOrNull", "InkAnalysisOrNull", "parentSection", "ParentSection"]); }; @@ -13621,10 +15352,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; Page.prototype.track=function () { @@ -13637,17 +15368,18 @@ var OneNote; }; Page.prototype.toJSON=function () { return { - "classNotebookPageSource": this.m_classNotebookPageSource, - "clientUrl": this.m_clientUrl, - "id": this.m_id, - "pageLevel": this.m_pageLevel, - "title": this.m_title, - "webUrl": this.m_webUrl + "classNotebookPageSource": this._C, + "clientUrl": this._Cl, + "id": this._I, + "pageLevel": this._P, + "title": this._T, + "webUrl": this._W }; }; return Page; }(OfficeExtension.ClientObject)); OneNote.Page=Page; + var _typePageCollection="PageCollection"; var PageCollection=(function (_super) { __extends(PageCollection, _super); function PageCollection() { @@ -13662,7 +15394,7 @@ var OneNote; }); Object.defineProperty(PageCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "PageCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typePageCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -13670,31 +15402,31 @@ var OneNote; }); Object.defineProperty(PageCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "PageCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typePageCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(PageCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "PageCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typePageCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); PageCollection.prototype.getByTitle=function (title) { - return new OneNote.PageCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTitle", 1, [title], true, false, null)); + return new OneNote.PageCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTitle", 1, [title], true, false, null, false)); }; PageCollection.prototype.getItem=function (index) { return new OneNote.Page(this.context, _createIndexerObjectPath(this.context, this, [index])); }; PageCollection.prototype.getItemAt=function (index) { - return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.Page(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; PageCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; PageCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13703,10 +15435,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -13728,7 +15460,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; PageCollection.prototype.track=function () { @@ -13741,12 +15473,13 @@ var OneNote; }; PageCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return PageCollection; }(OfficeExtension.ClientObject)); OneNote.PageCollection=PageCollection; + var _typePageContent="PageContent"; var PageContent=(function (_super) { __extends(PageContent, _super); function PageContent() { @@ -13761,59 +15494,59 @@ var OneNote; }); Object.defineProperty(PageContent.prototype, "image", { get: function () { - if (!this.m_image) { - this.m_image=new OneNote.Image(this.context, _createPropertyObjectPath(this.context, this, "Image", false, false)); + if (!this._Im) { + this._Im=new OneNote.Image(this.context, _createPropertyObjectPath(this.context, this, "Image", false, false, false)); } - return this.m_image; + return this._Im; }, enumerable: true, configurable: true }); Object.defineProperty(PageContent.prototype, "ink", { get: function () { - if (!this.m_ink) { - this.m_ink=new OneNote.FloatingInk(this.context, _createPropertyObjectPath(this.context, this, "Ink", false, false)); + if (!this._In) { + this._In=new OneNote.FloatingInk(this.context, _createPropertyObjectPath(this.context, this, "Ink", false, false, false)); } - return this.m_ink; + return this._In; }, enumerable: true, configurable: true }); Object.defineProperty(PageContent.prototype, "outline", { get: function () { - if (!this.m_outline) { - this.m_outline=new OneNote.Outline(this.context, _createPropertyObjectPath(this.context, this, "Outline", false, false)); + if (!this._O) { + this._O=new OneNote.Outline(this.context, _createPropertyObjectPath(this.context, this, "Outline", false, false, false)); } - return this.m_outline; + return this._O; }, enumerable: true, configurable: true }); Object.defineProperty(PageContent.prototype, "parentPage", { get: function () { - if (!this.m_parentPage) { - this.m_parentPage=new OneNote.Page(this.context, _createPropertyObjectPath(this.context, this, "ParentPage", false, false)); + if (!this._P) { + this._P=new OneNote.Page(this.context, _createPropertyObjectPath(this.context, this, "ParentPage", false, false, false)); } - return this.m_parentPage; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(PageContent.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "PageContent", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typePageContent, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(PageContent.prototype, "left", { get: function () { - _throwIfNotLoaded("left", this.m_left, "PageContent", this._isNull); - return this.m_left; + _throwIfNotLoaded("left", this._L, _typePageContent, this._isNull); + return this._L; }, set: function (value) { - this.m_left=value; + this._L=value; _createSetPropertyAction(this.context, this, "Left", value); }, enumerable: true, @@ -13821,11 +15554,11 @@ var OneNote; }); Object.defineProperty(PageContent.prototype, "top", { get: function () { - _throwIfNotLoaded("top", this.m_top, "PageContent", this._isNull); - return this.m_top; + _throwIfNotLoaded("top", this._T, _typePageContent, this._isNull); + return this._T; }, set: function (value) { - this.m_top=value; + this._T=value; _createSetPropertyAction(this.context, this, "Top", value); }, enumerable: true, @@ -13833,16 +15566,16 @@ var OneNote; }); Object.defineProperty(PageContent.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "PageContent", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._Ty, _typePageContent, this._isNull); + return this._Ty; }, enumerable: true, configurable: true }); Object.defineProperty(PageContent.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "PageContent", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typePageContent, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -13860,10 +15593,10 @@ var OneNote; ]); }; PageContent.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; PageContent.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; PageContent.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13872,19 +15605,19 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Left"])) { - this.m_left=obj["Left"]; + this._L=obj["Left"]; } if (!_isUndefined(obj["Top"])) { - this.m_top=obj["Top"]; + this._T=obj["Top"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._Ty=obj["Type"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["image", "Image", "ink", "Ink", "outline", "Outline", "parentPage", "ParentPage"]); }; @@ -13898,10 +15631,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; PageContent.prototype.track=function () { @@ -13914,15 +15647,16 @@ var OneNote; }; PageContent.prototype.toJSON=function () { return { - "id": this.m_id, - "left": this.m_left, - "top": this.m_top, - "type": this.m_type + "id": this._I, + "left": this._L, + "top": this._T, + "type": this._Ty }; }; return PageContent; }(OfficeExtension.ClientObject)); OneNote.PageContent=PageContent; + var _typePageContentCollection="PageContentCollection"; var PageContentCollection=(function (_super) { __extends(PageContentCollection, _super); function PageContentCollection() { @@ -13937,7 +15671,7 @@ var OneNote; }); Object.defineProperty(PageContentCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "PageContentCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typePageContentCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -13945,16 +15679,16 @@ var OneNote; }); Object.defineProperty(PageContentCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "PageContentCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typePageContentCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(PageContentCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "PageContentCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typePageContentCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -13963,10 +15697,10 @@ var OneNote; return new OneNote.PageContent(this.context, _createIndexerObjectPath(this.context, this, [index])); }; PageContentCollection.prototype.getItemAt=function (index) { - return new OneNote.PageContent(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.PageContent(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; PageContentCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; PageContentCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13975,10 +15709,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14000,7 +15734,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; PageContentCollection.prototype.track=function () { @@ -14013,12 +15747,13 @@ var OneNote; }; PageContentCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return PageContentCollection; }(OfficeExtension.ClientObject)); OneNote.PageContentCollection=PageContentCollection; + var _typeOutline="Outline"; var Outline=(function (_super) { __extends(Outline, _super); function Outline() { @@ -14033,54 +15768,60 @@ var OneNote; }); Object.defineProperty(Outline.prototype, "pageContent", { get: function () { - if (!this.m_pageContent) { - this.m_pageContent=new OneNote.PageContent(this.context, _createPropertyObjectPath(this.context, this, "PageContent", false, false)); + if (!this._P) { + this._P=new OneNote.PageContent(this.context, _createPropertyObjectPath(this.context, this, "PageContent", false, false, false)); } - return this.m_pageContent; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Outline.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new OneNote.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._Pa) { + this._Pa=new OneNote.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Outline.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Outline", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeOutline, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Outline.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Outline", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeOutline, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Outline.prototype.appendHtml=function (html) { - _createMethodAction(this.context, this, "AppendHtml", 0, [html]); + _createMethodAction(this.context, this, "AppendHtml", 0, [html], false); }; Outline.prototype.appendImage=function (base64EncodedImage, width, height) { - return new OneNote.Image(this.context, _createMethodObjectPath(this.context, this, "AppendImage", 0, [base64EncodedImage, width, height], false, true, null)); + return new OneNote.Image(this.context, _createMethodObjectPath(this.context, this, "AppendImage", 0, [base64EncodedImage, width, height], false, true, null, false)); }; Outline.prototype.appendRichText=function (paragraphText) { - return new OneNote.RichText(this.context, _createMethodObjectPath(this.context, this, "AppendRichText", 0, [paragraphText], false, true, null)); + return new OneNote.RichText(this.context, _createMethodObjectPath(this.context, this, "AppendRichText", 0, [paragraphText], false, true, null, false)); }; Outline.prototype.appendTable=function (rowCount, columnCount, values) { - return new OneNote.Table(this.context, _createMethodObjectPath(this.context, this, "AppendTable", 0, [rowCount, columnCount, values], false, true, null)); + return new OneNote.Table(this.context, _createMethodObjectPath(this.context, this, "AppendTable", 0, [rowCount, columnCount, values], false, true, null, false)); + }; + Outline.prototype.isTitle=function () { + var action=_createMethodAction(this.context, this, "IsTitle", 0, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; }; Outline.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Outline.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14089,10 +15830,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["pageContent", "PageContent", "paragraphs", "Paragraphs"]); }; @@ -14106,10 +15847,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; Outline.prototype.track=function () { @@ -14122,12 +15863,13 @@ var OneNote; }; Outline.prototype.toJSON=function () { return { - "id": this.m_id + "id": this._I }; }; return Outline; }(OfficeExtension.ClientObject)); OneNote.Outline=Outline; + var _typeParagraph="Paragraph"; var Paragraph=(function (_super) { __extends(Paragraph, _super); function Paragraph() { @@ -14142,145 +15884,154 @@ var OneNote; }); Object.defineProperty(Paragraph.prototype, "image", { get: function () { - if (!this.m_image) { - this.m_image=new OneNote.Image(this.context, _createPropertyObjectPath(this.context, this, "Image", false, false)); + if (!this._Im) { + this._Im=new OneNote.Image(this.context, _createPropertyObjectPath(this.context, this, "Image", false, false, false)); } - return this.m_image; + return this._Im; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "inkWords", { get: function () { - if (!this.m_inkWords) { - this.m_inkWords=new OneNote.InkWordCollection(this.context, _createPropertyObjectPath(this.context, this, "InkWords", true, false)); + if (!this._In) { + this._In=new OneNote.InkWordCollection(this.context, _createPropertyObjectPath(this.context, this, "InkWords", true, false, false)); } - return this.m_inkWords; + return this._In; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "outline", { get: function () { - if (!this.m_outline) { - this.m_outline=new OneNote.Outline(this.context, _createPropertyObjectPath(this.context, this, "Outline", false, false)); + if (!this._O) { + this._O=new OneNote.Outline(this.context, _createPropertyObjectPath(this.context, this, "Outline", false, false, false)); } - return this.m_outline; + return this._O; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new OneNote.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._P) { + this._P=new OneNote.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentParagraph", { get: function () { - if (!this.m_parentParagraph) { - this.m_parentParagraph=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "ParentParagraph", false, false)); + if (!this._Pa) { + this._Pa=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "ParentParagraph", false, false, false)); } - return this.m_parentParagraph; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentParagraphOrNull", { get: function () { - if (!this.m_parentParagraphOrNull) { - this.m_parentParagraphOrNull=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "ParentParagraphOrNull", false, false)); + if (!this._Par) { + this._Par=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "ParentParagraphOrNull", false, false, false)); } - return this.m_parentParagraphOrNull; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentTableCell", { get: function () { - if (!this.m_parentTableCell) { - this.m_parentTableCell=new OneNote.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false)); + if (!this._Pare) { + this._Pare=new OneNote.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false, false)); } - return this.m_parentTableCell; + return this._Pare; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentTableCellOrNull", { get: function () { - if (!this.m_parentTableCellOrNull) { - this.m_parentTableCellOrNull=new OneNote.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNull", false, false)); + if (!this._Paren) { + this._Paren=new OneNote.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNull", false, false, false)); } - return this.m_parentTableCellOrNull; + return this._Paren; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "richText", { get: function () { - if (!this.m_richText) { - this.m_richText=new OneNote.RichText(this.context, _createPropertyObjectPath(this.context, this, "RichText", false, false)); + if (!this._R) { + this._R=new OneNote.RichText(this.context, _createPropertyObjectPath(this.context, this, "RichText", false, false, false)); } - return this.m_richText; + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "table", { get: function () { - if (!this.m_table) { - this.m_table=new OneNote.Table(this.context, _createPropertyObjectPath(this.context, this, "Table", false, false)); + if (!this._T) { + this._T=new OneNote.Table(this.context, _createPropertyObjectPath(this.context, this, "Table", false, false, false)); } - return this.m_table; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Paragraph", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeParagraph, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "Paragraph", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._Ty, _typeParagraph, this._isNull); + return this._Ty; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Paragraph", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeParagraph, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); + Paragraph.prototype.addNoteTag=function (type, status) { + return new OneNote.NoteTag(this.context, _createMethodObjectPath(this.context, this, "AddNoteTag", 0, [type, status], false, true, null, false)); + }; Paragraph.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); + }; + Paragraph.prototype.getParagraphInfo=function () { + var action=_createMethodAction(this.context, this, "GetParagraphInfo", 0, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; }; Paragraph.prototype.insertHtmlAsSibling=function (insertLocation, html) { - _createMethodAction(this.context, this, "InsertHtmlAsSibling", 0, [insertLocation, html]); + _createMethodAction(this.context, this, "InsertHtmlAsSibling", 0, [insertLocation, html], false); }; Paragraph.prototype.insertImageAsSibling=function (insertLocation, base64EncodedImage, width, height) { - return new OneNote.Image(this.context, _createMethodObjectPath(this.context, this, "InsertImageAsSibling", 0, [insertLocation, base64EncodedImage, width, height], false, true, null)); + return new OneNote.Image(this.context, _createMethodObjectPath(this.context, this, "InsertImageAsSibling", 0, [insertLocation, base64EncodedImage, width, height], false, true, null, false)); }; Paragraph.prototype.insertRichTextAsSibling=function (insertLocation, paragraphText) { - return new OneNote.RichText(this.context, _createMethodObjectPath(this.context, this, "InsertRichTextAsSibling", 0, [insertLocation, paragraphText], false, true, null)); + return new OneNote.RichText(this.context, _createMethodObjectPath(this.context, this, "InsertRichTextAsSibling", 0, [insertLocation, paragraphText], false, true, null, false)); }; Paragraph.prototype.insertTableAsSibling=function (insertLocation, rowCount, columnCount, values) { - return new OneNote.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTableAsSibling", 0, [insertLocation, rowCount, columnCount, values], false, true, null)); + return new OneNote.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTableAsSibling", 0, [insertLocation, rowCount, columnCount, values], false, true, null, false)); }; Paragraph.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Paragraph.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14289,13 +16040,13 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._Ty=obj["Type"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["image", "Image", "inkWords", "InkWords", "outline", "Outline", "paragraphs", "Paragraphs", "parentParagraph", "ParentParagraph", "parentParagraphOrNull", "ParentParagraphOrNull", "parentTableCell", "ParentTableCell", "parentTableCellOrNull", "ParentTableCellOrNull", "richText", "RichText", "table", "Table"]); }; @@ -14309,10 +16060,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; Paragraph.prototype.track=function () { @@ -14325,13 +16076,14 @@ var OneNote; }; Paragraph.prototype.toJSON=function () { return { - "id": this.m_id, - "type": this.m_type + "id": this._I, + "type": this._Ty }; }; return Paragraph; }(OfficeExtension.ClientObject)); OneNote.Paragraph=Paragraph; + var _typeParagraphCollection="ParagraphCollection"; var ParagraphCollection=(function (_super) { __extends(ParagraphCollection, _super); function ParagraphCollection() { @@ -14346,7 +16098,7 @@ var OneNote; }); Object.defineProperty(ParagraphCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ParagraphCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeParagraphCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14354,16 +16106,16 @@ var OneNote; }); Object.defineProperty(ParagraphCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "ParagraphCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeParagraphCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(ParagraphCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "ParagraphCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeParagraphCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -14372,10 +16124,10 @@ var OneNote; return new OneNote.Paragraph(this.context, _createIndexerObjectPath(this.context, this, [index])); }; ParagraphCollection.prototype.getItemAt=function (index) { - return new OneNote.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; ParagraphCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; ParagraphCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14384,10 +16136,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14409,7 +16161,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; ParagraphCollection.prototype.track=function () { @@ -14422,12 +16174,100 @@ var OneNote; }; ParagraphCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return ParagraphCollection; }(OfficeExtension.ClientObject)); OneNote.ParagraphCollection=ParagraphCollection; + var _typeNoteTag="NoteTag"; + var NoteTag=(function (_super) { + __extends(NoteTag, _super); + function NoteTag() { + _super.apply(this, arguments); + } + Object.defineProperty(NoteTag.prototype, "_className", { + get: function () { + return "NoteTag"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NoteTag.prototype, "id", { + get: function () { + _throwIfNotLoaded("id", this._I, _typeNoteTag, this._isNull); + return this._I; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NoteTag.prototype, "status", { + get: function () { + _throwIfNotLoaded("status", this._S, _typeNoteTag, this._isNull); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(NoteTag.prototype, "type", { + get: function () { + _throwIfNotLoaded("type", this._T, _typeNoteTag, this._isNull); + return this._T; + }, + enumerable: true, + configurable: true + }); + NoteTag.prototype._KeepReference=function () { + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); + }; + NoteTag.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Id"])) { + this._I=obj["Id"]; + } + if (!_isUndefined(obj["Status"])) { + this._S=obj["Status"]; + } + if (!_isUndefined(obj["Type"])) { + this._T=obj["Type"]; + } + }; + NoteTag.prototype.load=function (option) { + _load(this, option); + return this; + }; + NoteTag.prototype._handleIdResult=function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["Id"])) { + this._I=value["Id"]; + } + }; + NoteTag.prototype.track=function () { + this.context.trackedObjects.add(this); + return this; + }; + NoteTag.prototype.untrack=function () { + this.context.trackedObjects.remove(this); + return this; + }; + NoteTag.prototype.toJSON=function () { + return { + "id": this._I, + "status": this._S, + "type": this._T + }; + }; + return NoteTag; + }(OfficeExtension.ClientObject)); + OneNote.NoteTag=NoteTag; + var _typeRichText="RichText"; var RichText=(function (_super) { __extends(RichText, _super); function RichText() { @@ -14442,54 +16282,54 @@ var OneNote; }); Object.defineProperty(RichText.prototype, "paragraph", { get: function () { - if (!this.m_paragraph) { - this.m_paragraph=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false)); + if (!this._P) { + this._P=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false, false)); } - return this.m_paragraph; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(RichText.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "RichText", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeRichText, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(RichText.prototype, "languageId", { get: function () { - _throwIfNotLoaded("languageId", this.m_languageId, "RichText", this._isNull); - return this.m_languageId; + _throwIfNotLoaded("languageId", this._L, _typeRichText, this._isNull); + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(RichText.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "RichText", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._T, _typeRichText, this._isNull); + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(RichText.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "RichText", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeRichText, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); RichText.prototype.getHtml=function () { - var action=_createMethodAction(this.context, this, "GetHtml", 1, []); + var action=_createMethodAction(this.context, this, "GetHtml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; RichText.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; RichText.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14498,16 +16338,16 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["LanguageId"])) { - this.m_languageId=obj["LanguageId"]; + this._L=obj["LanguageId"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._T=obj["Text"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["paragraph", "Paragraph"]); }; @@ -14521,10 +16361,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; RichText.prototype.track=function () { @@ -14537,14 +16377,15 @@ var OneNote; }; RichText.prototype.toJSON=function () { return { - "id": this.m_id, - "languageId": this.m_languageId, - "text": this.m_text + "id": this._I, + "languageId": this._L, + "text": this._T }; }; return RichText; }(OfficeExtension.ClientObject)); OneNote.RichText=RichText; + var _typeImage="Image"; var Image=(function (_super) { __extends(Image, _super); function Image() { @@ -14559,31 +16400,31 @@ var OneNote; }); Object.defineProperty(Image.prototype, "pageContent", { get: function () { - if (!this.m_pageContent) { - this.m_pageContent=new OneNote.PageContent(this.context, _createPropertyObjectPath(this.context, this, "PageContent", false, false)); + if (!this._P) { + this._P=new OneNote.PageContent(this.context, _createPropertyObjectPath(this.context, this, "PageContent", false, false, false)); } - return this.m_pageContent; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Image.prototype, "paragraph", { get: function () { - if (!this.m_paragraph) { - this.m_paragraph=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false)); + if (!this._Pa) { + this._Pa=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false, false)); } - return this.m_paragraph; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Image.prototype, "description", { get: function () { - _throwIfNotLoaded("description", this.m_description, "Image", this._isNull); - return this.m_description; + _throwIfNotLoaded("description", this._D, _typeImage, this._isNull); + return this._D; }, set: function (value) { - this.m_description=value; + this._D=value; _createSetPropertyAction(this.context, this, "Description", value); }, enumerable: true, @@ -14591,11 +16432,11 @@ var OneNote; }); Object.defineProperty(Image.prototype, "height", { get: function () { - _throwIfNotLoaded("height", this.m_height, "Image", this._isNull); - return this.m_height; + _throwIfNotLoaded("height", this._H, _typeImage, this._isNull); + return this._H; }, set: function (value) { - this.m_height=value; + this._H=value; _createSetPropertyAction(this.context, this, "Height", value); }, enumerable: true, @@ -14603,11 +16444,11 @@ var OneNote; }); Object.defineProperty(Image.prototype, "hyperlink", { get: function () { - _throwIfNotLoaded("hyperlink", this.m_hyperlink, "Image", this._isNull); - return this.m_hyperlink; + _throwIfNotLoaded("hyperlink", this._Hy, _typeImage, this._isNull); + return this._Hy; }, set: function (value) { - this.m_hyperlink=value; + this._Hy=value; _createSetPropertyAction(this.context, this, "Hyperlink", value); }, enumerable: true, @@ -14615,27 +16456,27 @@ var OneNote; }); Object.defineProperty(Image.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Image", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeImage, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Image.prototype, "ocrData", { get: function () { - _throwIfNotLoaded("ocrData", this.m_ocrData, "Image", this._isNull); - return this.m_ocrData; + _throwIfNotLoaded("ocrData", this._O, _typeImage, this._isNull); + return this._O; }, enumerable: true, configurable: true }); Object.defineProperty(Image.prototype, "width", { get: function () { - _throwIfNotLoaded("width", this.m_width, "Image", this._isNull); - return this.m_width; + _throwIfNotLoaded("width", this._W, _typeImage, this._isNull); + return this._W; }, set: function (value) { - this.m_width=value; + this._W=value; _createSetPropertyAction(this.context, this, "Width", value); }, enumerable: true, @@ -14643,8 +16484,8 @@ var OneNote; }); Object.defineProperty(Image.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Image", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeImage, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -14658,13 +16499,13 @@ var OneNote; ]); }; Image.prototype.getBase64Image=function () { - var action=_createMethodAction(this.context, this, "GetBase64Image", 1, []); + var action=_createMethodAction(this.context, this, "GetBase64Image", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Image.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Image.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14673,25 +16514,25 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Description"])) { - this.m_description=obj["Description"]; + this._D=obj["Description"]; } if (!_isUndefined(obj["Height"])) { - this.m_height=obj["Height"]; + this._H=obj["Height"]; } if (!_isUndefined(obj["Hyperlink"])) { - this.m_hyperlink=obj["Hyperlink"]; + this._Hy=obj["Hyperlink"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["OcrData"])) { - this.m_ocrData=obj["OcrData"]; + this._O=obj["OcrData"]; } if (!_isUndefined(obj["Width"])) { - this.m_width=obj["Width"]; + this._W=obj["Width"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["pageContent", "PageContent", "paragraph", "Paragraph"]); }; @@ -14705,10 +16546,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; Image.prototype.track=function () { @@ -14721,17 +16562,18 @@ var OneNote; }; Image.prototype.toJSON=function () { return { - "description": this.m_description, - "height": this.m_height, - "hyperlink": this.m_hyperlink, - "id": this.m_id, - "ocrData": this.m_ocrData, - "width": this.m_width + "description": this._D, + "height": this._H, + "hyperlink": this._Hy, + "id": this._I, + "ocrData": this._O, + "width": this._W }; }; return Image; }(OfficeExtension.ClientObject)); OneNote.Image=Image; + var _typeTable="Table"; var Table=(function (_super) { __extends(Table, _super); function Table() { @@ -14746,31 +16588,31 @@ var OneNote; }); Object.defineProperty(Table.prototype, "paragraph", { get: function () { - if (!this.m_paragraph) { - this.m_paragraph=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false)); + if (!this._P) { + this._P=new OneNote.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false, false)); } - return this.m_paragraph; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "rows", { get: function () { - if (!this.m_rows) { - this.m_rows=new OneNote.TableRowCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false)); + if (!this._Ro) { + this._Ro=new OneNote.TableRowCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false, false)); } - return this.m_rows; + return this._Ro; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "borderVisible", { get: function () { - _throwIfNotLoaded("borderVisible", this.m_borderVisible, "Table", this._isNull); - return this.m_borderVisible; + _throwIfNotLoaded("borderVisible", this._B, _typeTable, this._isNull); + return this._B; }, set: function (value) { - this.m_borderVisible=value; + this._B=value; _createSetPropertyAction(this.context, this, "BorderVisible", value); }, enumerable: true, @@ -14778,32 +16620,32 @@ var OneNote; }); Object.defineProperty(Table.prototype, "columnCount", { get: function () { - _throwIfNotLoaded("columnCount", this.m_columnCount, "Table", this._isNull); - return this.m_columnCount; + _throwIfNotLoaded("columnCount", this._C, _typeTable, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "Table", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeTable, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "rowCount", { get: function () { - _throwIfNotLoaded("rowCount", this.m_rowCount, "Table", this._isNull); - return this.m_rowCount; + _throwIfNotLoaded("rowCount", this._R, _typeTable, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Table", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTable, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -14817,28 +16659,28 @@ var OneNote; ]); }; Table.prototype.appendColumn=function (values) { - _createMethodAction(this.context, this, "AppendColumn", 0, [values]); + _createMethodAction(this.context, this, "AppendColumn", 0, [values], false); }; Table.prototype.appendRow=function (values) { - return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "AppendRow", 0, [values], false, true, null)); + return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "AppendRow", 0, [values], false, true, null, false)); }; Table.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; Table.prototype.getCell=function (rowIndex, cellIndex) { - return new OneNote.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [rowIndex, cellIndex], false, false, null)); + return new OneNote.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [rowIndex, cellIndex], false, false, null, false)); }; Table.prototype.insertColumn=function (index, values) { - _createMethodAction(this.context, this, "InsertColumn", 0, [index, values]); + _createMethodAction(this.context, this, "InsertColumn", 0, [index, values], false); }; Table.prototype.insertRow=function (index, values) { - return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "InsertRow", 0, [index, values], false, true, null)); + return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "InsertRow", 0, [index, values], false, true, null, false)); }; Table.prototype.setShadingColor=function (colorCode) { - _createMethodAction(this.context, this, "SetShadingColor", 0, [colorCode]); + _createMethodAction(this.context, this, "SetShadingColor", 0, [colorCode], false); }; Table.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Table.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14847,19 +16689,19 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["BorderVisible"])) { - this.m_borderVisible=obj["BorderVisible"]; + this._B=obj["BorderVisible"]; } if (!_isUndefined(obj["ColumnCount"])) { - this.m_columnCount=obj["ColumnCount"]; + this._C=obj["ColumnCount"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["RowCount"])) { - this.m_rowCount=obj["RowCount"]; + this._R=obj["RowCount"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["paragraph", "Paragraph", "rows", "Rows"]); }; @@ -14873,10 +16715,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; Table.prototype.track=function () { @@ -14889,15 +16731,16 @@ var OneNote; }; Table.prototype.toJSON=function () { return { - "borderVisible": this.m_borderVisible, - "columnCount": this.m_columnCount, - "id": this.m_id, - "rowCount": this.m_rowCount + "borderVisible": this._B, + "columnCount": this._C, + "id": this._I, + "rowCount": this._R }; }; return Table; }(OfficeExtension.ClientObject)); OneNote.Table=Table; + var _typeTableRow="TableRow"; var TableRow=(function (_super) { __extends(TableRow, _super); function TableRow() { @@ -14912,67 +16755,67 @@ var OneNote; }); Object.defineProperty(TableRow.prototype, "cells", { get: function () { - if (!this.m_cells) { - this.m_cells=new OneNote.TableCellCollection(this.context, _createPropertyObjectPath(this.context, this, "Cells", true, false)); + if (!this._Ce) { + this._Ce=new OneNote.TableCellCollection(this.context, _createPropertyObjectPath(this.context, this, "Cells", true, false, false)); } - return this.m_cells; + return this._Ce; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new OneNote.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + if (!this._P) { + this._P=new OneNote.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "cellCount", { get: function () { - _throwIfNotLoaded("cellCount", this.m_cellCount, "TableRow", this._isNull); - return this.m_cellCount; + _throwIfNotLoaded("cellCount", this._C, _typeTableRow, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "TableRow", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeTableRow, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "rowIndex", { get: function () { - _throwIfNotLoaded("rowIndex", this.m_rowIndex, "TableRow", this._isNull); - return this.m_rowIndex; + _throwIfNotLoaded("rowIndex", this._R, _typeTableRow, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableRow", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableRow, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); TableRow.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; TableRow.prototype.insertRowAsSibling=function (insertLocation, values) { - return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "InsertRowAsSibling", 0, [insertLocation, values], false, true, null)); + return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "InsertRowAsSibling", 0, [insertLocation, values], false, true, null, false)); }; TableRow.prototype.setShadingColor=function (colorCode) { - _createMethodAction(this.context, this, "SetShadingColor", 0, [colorCode]); + _createMethodAction(this.context, this, "SetShadingColor", 0, [colorCode], false); }; TableRow.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableRow.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14981,16 +16824,16 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["CellCount"])) { - this.m_cellCount=obj["CellCount"]; + this._C=obj["CellCount"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["RowIndex"])) { - this.m_rowIndex=obj["RowIndex"]; + this._R=obj["RowIndex"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["cells", "Cells", "parentTable", "ParentTable"]); }; @@ -15004,10 +16847,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; TableRow.prototype.track=function () { @@ -15020,14 +16863,15 @@ var OneNote; }; TableRow.prototype.toJSON=function () { return { - "cellCount": this.m_cellCount, - "id": this.m_id, - "rowIndex": this.m_rowIndex + "cellCount": this._C, + "id": this._I, + "rowIndex": this._R }; }; return TableRow; }(OfficeExtension.ClientObject)); OneNote.TableRow=TableRow; + var _typeTableRowCollection="TableRowCollection"; var TableRowCollection=(function (_super) { __extends(TableRowCollection, _super); function TableRowCollection() { @@ -15042,7 +16886,7 @@ var OneNote; }); Object.defineProperty(TableRowCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableRowCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableRowCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15050,16 +16894,16 @@ var OneNote; }); Object.defineProperty(TableRowCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "TableRowCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeTableRowCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(TableRowCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableRowCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableRowCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -15068,10 +16912,10 @@ var OneNote; return new OneNote.TableRow(this.context, _createIndexerObjectPath(this.context, this, [index])); }; TableRowCollection.prototype.getItemAt=function (index) { - return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; TableRowCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableRowCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15080,10 +16924,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15105,7 +16949,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; TableRowCollection.prototype.track=function () { @@ -15118,12 +16962,13 @@ var OneNote; }; TableRowCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return TableRowCollection; }(OfficeExtension.ClientObject)); OneNote.TableRowCollection=TableRowCollection; + var _typeTableCell="TableCell"; var TableCell=(function (_super) { __extends(TableCell, _super); function TableCell() { @@ -15138,55 +16983,55 @@ var OneNote; }); Object.defineProperty(TableCell.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new OneNote.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._P) { + this._P=new OneNote.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "parentRow", { get: function () { - if (!this.m_parentRow) { - this.m_parentRow=new OneNote.TableRow(this.context, _createPropertyObjectPath(this.context, this, "ParentRow", false, false)); + if (!this._Pa) { + this._Pa=new OneNote.TableRow(this.context, _createPropertyObjectPath(this.context, this, "ParentRow", false, false, false)); } - return this.m_parentRow; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "cellIndex", { get: function () { - _throwIfNotLoaded("cellIndex", this.m_cellIndex, "TableCell", this._isNull); - return this.m_cellIndex; + _throwIfNotLoaded("cellIndex", this._C, _typeTableCell, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "TableCell", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeTableCell, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "rowIndex", { get: function () { - _throwIfNotLoaded("rowIndex", this.m_rowIndex, "TableCell", this._isNull); - return this.m_rowIndex; + _throwIfNotLoaded("rowIndex", this._R, _typeTableCell, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "shadingColor", { get: function () { - _throwIfNotLoaded("shadingColor", this.m_shadingColor, "TableCell", this._isNull); - return this.m_shadingColor; + _throwIfNotLoaded("shadingColor", this._S, _typeTableCell, this._isNull); + return this._S; }, set: function (value) { - this.m_shadingColor=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShadingColor", value); }, enumerable: true, @@ -15194,8 +17039,8 @@ var OneNote; }); Object.defineProperty(TableCell.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableCell", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableCell, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -15209,22 +17054,22 @@ var OneNote; ]); }; TableCell.prototype.appendHtml=function (html) { - _createMethodAction(this.context, this, "AppendHtml", 0, [html]); + _createMethodAction(this.context, this, "AppendHtml", 0, [html], false); }; TableCell.prototype.appendImage=function (base64EncodedImage, width, height) { - return new OneNote.Image(this.context, _createMethodObjectPath(this.context, this, "AppendImage", 0, [base64EncodedImage, width, height], false, true, null)); + return new OneNote.Image(this.context, _createMethodObjectPath(this.context, this, "AppendImage", 0, [base64EncodedImage, width, height], false, true, null, false)); }; TableCell.prototype.appendRichText=function (paragraphText) { - return new OneNote.RichText(this.context, _createMethodObjectPath(this.context, this, "AppendRichText", 0, [paragraphText], false, true, null)); + return new OneNote.RichText(this.context, _createMethodObjectPath(this.context, this, "AppendRichText", 0, [paragraphText], false, true, null, false)); }; TableCell.prototype.appendTable=function (rowCount, columnCount, values) { - return new OneNote.Table(this.context, _createMethodObjectPath(this.context, this, "AppendTable", 0, [rowCount, columnCount, values], false, true, null)); + return new OneNote.Table(this.context, _createMethodObjectPath(this.context, this, "AppendTable", 0, [rowCount, columnCount, values], false, true, null, false)); }; TableCell.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; TableCell.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableCell.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15233,19 +17078,19 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["CellIndex"])) { - this.m_cellIndex=obj["CellIndex"]; + this._C=obj["CellIndex"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["RowIndex"])) { - this.m_rowIndex=obj["RowIndex"]; + this._R=obj["RowIndex"]; } if (!_isUndefined(obj["ShadingColor"])) { - this.m_shadingColor=obj["ShadingColor"]; + this._S=obj["ShadingColor"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["paragraphs", "Paragraphs", "parentRow", "ParentRow"]); }; @@ -15259,10 +17104,10 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; TableCell.prototype.track=function () { @@ -15275,15 +17120,16 @@ var OneNote; }; TableCell.prototype.toJSON=function () { return { - "cellIndex": this.m_cellIndex, - "id": this.m_id, - "rowIndex": this.m_rowIndex, - "shadingColor": this.m_shadingColor + "cellIndex": this._C, + "id": this._I, + "rowIndex": this._R, + "shadingColor": this._S }; }; return TableCell; }(OfficeExtension.ClientObject)); OneNote.TableCell=TableCell; + var _typeTableCellCollection="TableCellCollection"; var TableCellCollection=(function (_super) { __extends(TableCellCollection, _super); function TableCellCollection() { @@ -15298,7 +17144,7 @@ var OneNote; }); Object.defineProperty(TableCellCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableCellCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableCellCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15306,16 +17152,16 @@ var OneNote; }); Object.defineProperty(TableCellCollection.prototype, "count", { get: function () { - _throwIfNotLoaded("count", this.m_count, "TableCellCollection", this._isNull); - return this.m_count; + _throwIfNotLoaded("count", this._C, _typeTableCellCollection, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(TableCellCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableCellCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableCellCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -15324,10 +17170,10 @@ var OneNote; return new OneNote.TableCell(this.context, _createIndexerObjectPath(this.context, this, [index])); }; TableCellCollection.prototype.getItemAt=function (index) { - return new OneNote.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null)); + return new OneNote.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetItemAt", 1, [index], false, false, null, false)); }; TableCellCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableCellCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15336,10 +17182,10 @@ var OneNote; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Count"])) { - this.m_count=obj["Count"]; + this._C=obj["Count"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15361,7 +17207,7 @@ var OneNote; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; TableCellCollection.prototype.track=function () { @@ -15374,7 +17220,7 @@ var OneNote; }; TableCellCollection.prototype.toJSON=function () { return { - "count": this.m_count + "count": this._C }; }; return TableCellCollection; @@ -15422,6 +17268,31 @@ var OneNote; ParagraphType.ink="Ink"; ParagraphType.other="Other"; })(ParagraphType=OneNote.ParagraphType || (OneNote.ParagraphType={})); + var NoteTagType; + (function (NoteTagType) { + NoteTagType.unknown="Unknown"; + NoteTagType.toDo="ToDo"; + NoteTagType.important="Important"; + NoteTagType.question="Question"; + NoteTagType.contact="Contact"; + NoteTagType.address="Address"; + NoteTagType.phoneNumber="PhoneNumber"; + NoteTagType.website="Website"; + NoteTagType.idea="Idea"; + NoteTagType.critical="Critical"; + NoteTagType.toDoPriority1="ToDoPriority1"; + NoteTagType.toDoPriority2="ToDoPriority2"; + })(NoteTagType=OneNote.NoteTagType || (OneNote.NoteTagType={})); + var NoteTagStatus; + (function (NoteTagStatus) { + NoteTagStatus.unknown="Unknown"; + NoteTagStatus.normal="Normal"; + NoteTagStatus.completed="Completed"; + NoteTagStatus.disabled="Disabled"; + NoteTagStatus.outlookTask="OutlookTask"; + NoteTagStatus.taskNotSyncedYet="TaskNotSyncedYet"; + NoteTagStatus.taskRemoved="TaskRemoved"; + })(NoteTagStatus=OneNote.NoteTagStatus || (OneNote.NoteTagStatus={})); var ServiceId; (function (ServiceId) { ServiceId.form="Form"; @@ -15436,7 +17307,122 @@ var OneNote; IdentityFilter.liveId="LiveId"; IdentityFilter.orgId="OrgId"; IdentityFilter.adal="ADAL"; + IdentityFilter.notebook="Notebook"; })(IdentityFilter=OneNote.IdentityFilter || (OneNote.IdentityFilter={})); + var ListType; + (function (ListType) { + ListType.none="None"; + ListType.number="Number"; + ListType.bullet="Bullet"; + })(ListType=OneNote.ListType || (OneNote.ListType={})); + var AccountType; + (function (AccountType) { + AccountType.other="Other"; + AccountType.liveId="LiveId"; + AccountType.orgId="OrgId"; + AccountType.adal="ADAL"; + })(AccountType=OneNote.AccountType || (OneNote.AccountType={})); + var LogLevel; + (function (LogLevel) { + LogLevel.trace="Trace"; + LogLevel.data="Data"; + LogLevel.exception="Exception"; + LogLevel.warning="Warning"; + })(LogLevel=OneNote.LogLevel || (OneNote.LogLevel={})); + var EventFlag; + (function (EventFlag) { + EventFlag.defaultFlag="DefaultFlag"; + EventFlag.criticalFlag="CriticalFlag"; + EventFlag.measureFlag="MeasureFlag"; + })(EventFlag=OneNote.EventFlag || (OneNote.EventFlag={})); + var NumberType; + (function (NumberType) { + NumberType.none="None"; + NumberType.arabic="Arabic"; + NumberType.ucroman="UCRoman"; + NumberType.lcroman="LCRoman"; + NumberType.ucletter="UCLetter"; + NumberType.lcletter="LCLetter"; + NumberType.ordinal="Ordinal"; + NumberType.cardtext="Cardtext"; + NumberType.ordtext="Ordtext"; + NumberType.hex="Hex"; + NumberType.chiManSty="ChiManSty"; + NumberType.dbNum1="DbNum1"; + NumberType.dbNum2="DbNum2"; + NumberType.aiueo="Aiueo"; + NumberType.iroha="Iroha"; + NumberType.dbChar="DbChar"; + NumberType.sbChar="SbChar"; + NumberType.dbNum3="DbNum3"; + NumberType.dbNum4="DbNum4"; + NumberType.circlenum="Circlenum"; + NumberType.darabic="DArabic"; + NumberType.daiueo="DAiueo"; + NumberType.diroha="DIroha"; + NumberType.arabicLZ="ArabicLZ"; + NumberType.bullet="Bullet"; + NumberType.ganada="Ganada"; + NumberType.chosung="Chosung"; + NumberType.gb1="GB1"; + NumberType.gb2="GB2"; + NumberType.gb3="GB3"; + NumberType.gb4="GB4"; + NumberType.zodiac1="Zodiac1"; + NumberType.zodiac2="Zodiac2"; + NumberType.zodiac3="Zodiac3"; + NumberType.tpeDbNum1="TpeDbNum1"; + NumberType.tpeDbNum2="TpeDbNum2"; + NumberType.tpeDbNum3="TpeDbNum3"; + NumberType.tpeDbNum4="TpeDbNum4"; + NumberType.chnDbNum1="ChnDbNum1"; + NumberType.chnDbNum2="ChnDbNum2"; + NumberType.chnDbNum3="ChnDbNum3"; + NumberType.chnDbNum4="ChnDbNum4"; + NumberType.korDbNum1="KorDbNum1"; + NumberType.korDbNum2="KorDbNum2"; + NumberType.korDbNum3="KorDbNum3"; + NumberType.korDbNum4="KorDbNum4"; + NumberType.hebrew1="Hebrew1"; + NumberType.arabic1="Arabic1"; + NumberType.hebrew2="Hebrew2"; + NumberType.arabic2="Arabic2"; + NumberType.hindi1="Hindi1"; + NumberType.hindi2="Hindi2"; + NumberType.hindi3="Hindi3"; + NumberType.thai1="Thai1"; + NumberType.thai2="Thai2"; + NumberType.numInDash="NumInDash"; + NumberType.lcrus="LCRus"; + NumberType.ucrus="UCRus"; + NumberType.lcgreek="LCGreek"; + NumberType.ucgreek="UCGreek"; + NumberType.lim="Lim"; + NumberType.custom="Custom"; + })(NumberType=OneNote.NumberType || (OneNote.NumberType={})); + var ControlId; + (function (ControlId) { + ControlId.preinstallClassNotebook="PreinstallClassNotebook"; + ControlId.distributePageId="DistributePageId"; + ControlId.distributeSection="DistributeSection"; + ControlId.reviewStudentWork="ReviewStudentWork"; + ControlId.openTabForCreateClassNotebook="OpenTabForCreateClassNotebook"; + ControlId.openTabForManageStudent="OpenTabForManageStudent"; + ControlId.openTabForManageTeacher="OpenTabForManageTeacher"; + ControlId.openTabForGetNotebookLink="OpenTabForGetNotebookLink"; + ControlId.openTabForTeacherTraining="OpenTabForTeacherTraining"; + ControlId.openTabForAddinGuide="OpenTabForAddinGuide"; + ControlId.openTabForEducationBlog="OpenTabForEducationBlog"; + ControlId.openTabForEducatorCommunity="OpenTabForEducatorCommunity"; + ControlId.openTabToSendFeedback="OpenTabToSendFeedback"; + ControlId.openTabForViewKnowledgeBase="OpenTabForViewKnowledgeBase"; + ControlId.openTabForSuggestingFeature="OpenTabForSuggestingFeature"; + ControlId.createAssignment="CreateAssignment"; + ControlId.connections="Connections"; + ControlId.mapClassNotebooks="MapClassNotebooks"; + ControlId.mapStudents="MapStudents"; + ControlId.manageClasses="ManageClasses"; + })(ControlId=OneNote.ControlId || (OneNote.ControlId={})); var ErrorCodes; (function (ErrorCodes) { ErrorCodes.generalException="GeneralException"; @@ -15467,4 +17453,6 @@ var OneNote; OneNote.run=run; })(OneNote || (OneNote={})); +OfficeExtension.Utility._doApiNotSupportedCheck=true; + diff --git a/node_modules/@microsoft/office-js/dist/onenote-winrt-16.00.js b/node_modules/@microsoft/office-js/dist/onenote-winrt-16.00.js index 0632819..df6108c 100644 --- a/node_modules/@microsoft/office-js/dist/onenote-winrt-16.00.js +++ b/node_modules/@microsoft/office-js/dist/onenote-winrt-16.00.js @@ -1,5 +1,7 @@ -/* OneNote specific JavaScript API library */ -/* Version: 16.0.7923.1000 */ +/* OneNote WinRT-specific API library */ +/* Version: 16.0.8827.3000 */ + +/* Office.js Version: 16.0.8828.1000 */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ @@ -16,4 +18,4 @@ * @version 2.3.0 */ -var __extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},OsfMsAjaxFactory,OSF,OSFWebView,CrossIFrameCommon,WinRT,OSFLog,Logger,OSFAriaLogger,OSFAppTelemetry,OfficeExt,OfficeExtension,OneNote;(function(n){var t=function(){function t(){}var n=!0;return t.prototype.isMsAjaxLoaded=function(){var t="function",i="undefined";return typeof Sys!==i&&typeof Type!==i&&Sys.StringBuilder&&typeof Sys.StringBuilder===t&&Type.registerNamespace&&typeof Type.registerNamespace===t&&Type.registerClass&&typeof Type.registerClass===t&&typeof Function._validateParams===t&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===t?n:!1},t.prototype.loadMsAjaxFull=function(n){var t=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,n)},Object.defineProperty(t.prototype,"msAjaxError",{get:function(){var n=this;return n._msAjaxError==null&&n.isMsAjaxLoaded()&&(n._msAjaxError=Error),n._msAjaxError},set:function(n){this._msAjaxError=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxString",{get:function(){var n=this;return n._msAjaxString==null&&n.isMsAjaxLoaded()&&(n._msAjaxString=String),n._msAjaxString},set:function(n){this._msAjaxString=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxDebug",{get:function(){var n=this;return n._msAjaxDebug==null&&n.isMsAjaxLoaded()&&(n._msAjaxDebug=Sys.Debug),n._msAjaxDebug},set:function(n){this._msAjaxDebug=n},enumerable:n,configurable:n}),t}();n.MicrosoftAjaxFactory=t})(OfficeExt||(OfficeExt={}));OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory;OSF=OSF||{},function(n){var t=function(){function n(n){this._internalStorage=n}return n.prototype.getItem=function(n){try{return this._internalStorage&&this._internalStorage.getItem(n)}catch(t){return null}},n.prototype.setItem=function(n,t){try{this._internalStorage&&this._internalStorage.setItem(n,t)}catch(i){}},n.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(n){}},n.prototype.removeItem=function(n){try{this._internalStorage&&this._internalStorage.removeItem(n)}catch(t){}},n.prototype.getKeysWithPrefix=function(n){var r=[],u,t,i;try{for(u=this._internalStorage&&this._internalStorage.length||0,t=0;t0?i.push(t):t.tabIndex===0&&r.push(t):r.push(t);return i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;return r===0&&(r=i.indexOf(n)-i.indexOf(t)),r}),[].concat(i,r)}var f="focus",e="on",b="configurable",k="writable",o="enumerable",s="undefined",i=!0,t=!1,c=2147483647,n=null,r=-1,l=r,d="&_xdm_Info=",g="&_serializer_version=",nt="_xdm_",ut="_serializer_version=",a="#",tt="&",h="class",v={},ft=3e4,y=n,p=n,u=(new Date).getTime();return{set_entropy:function(n){var t,r,i;if(typeof n=="string")for(t=0;t1?l[l.length-1]:n,s,h,c,a;return u&&o!=n&&(o.indexOf(tt)>=0&&(o=o.split(tt)[0]),o=decodeURIComponent(o)),s=w(),!f&&s&&(h=window.name.indexOf(i),h>r&&(c=window.name.indexOf(";",h),c==r&&(c=window.name.length),a=window.name.substring(h,c),o?s.setItem(a,o):o=s.getItem(a))),o},getConversationId:function(){var i=window.location.search,t=n,r;return i&&(r=i.indexOf("&"),t=r>0?i.substring(1,r):i.substr(1),t&&t.charAt(t.length-1)==="="&&(t=t.substring(0,t.length-1),t&&(t=decodeURIComponent(t)))),t},getInfoItems:function(n){var t=n.split("$");return typeof t[1]==s&&(t=n.split("|")),typeof t[1]==s&&(t=n.split("%7C")),t},getXdmFieldValue:function(n,t){var r="",u=OSF.OUtil.parseXdmInfo(t),i;if(u&&(i=OSF.OUtil.getInfoItems(u),i!=undefined&&i.length>=3))switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]),f;if(u)throw u;for(f in r)if(u=Function._validateParameter(n[f],r[f],f),u)throw u;},writeProfilerMark:function(n){window.msWriteProfilerMark&&(window.msWriteProfilerMark(n),OsfMsAjaxFactory.msAjaxDebug.trace(n))},outputDebug:function(n){typeof OsfMsAjaxFactory!==s&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){var e,f;r=r||{};for(e in u)f=u[e],r[f]==undefined&&(r[f]=i);return Object.defineProperty(n,t,r),n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[o])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[o])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[k,o,b])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[k,o,b])},finalizeProperties:function(n,r){var e,u;r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8,f=e&255,i[t++]=r>>2,i[t++]=(r&3)<<4|u>>4,i[t++]=(u&15)<<2|f>>6,i[t++]=f&63,isNaN(e)||(r=e>>8,u=s&255,f=s>>8,i[t++]=r>>2,i[t++]=(r&3)<<4|u>>4,i[t++]=(u&15)<<2|f>>6,i[t++]=f&63),isNaN(e)?i[t-1]=64:isNaN(s)&&(i[t-2]=64,i[t-1]=64),h=0;h0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){var u,i,f,r;if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(u=[],i=0;in)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=rt(u),o=e?u.length-1:0,u.length===0)return n;while(!h&&o>=0&&on)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=rt(u),l=y(u,e),s=v(u.length,l,o),s<0)return n;while(!c&&s>=0&&s0;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[r%16],r=Math.floor(r/16);for(;t<32;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[Math.floor(Math.random()*16)];return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidGetDelegateTokenMethod:146,dispidMethodMax:146};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidActivationStatusChangedEvent:32,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];return i?(i.name||(i.name=n[this.errorCodes.ooeInternalError].name),i.message||(i.message=n[this.errorCodes.ooeInternalError].message)):i=n[this.errorCodes.ooeInternalError],i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString}}}}(),function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}(),r,i,h,u,c,l,f,a,e,v,y,p,w,b,o,k,d,g,s,nt,tt,it,rt;n.RequirementVersion=ut;r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){var f,u,e,i,r;if(n==undefined)return!1;if(t==undefined&&(t=0),f=this._setMap,u=f._sets,u.hasOwnProperty(n.toLowerCase())){e=u[n.toLowerCase()];try{if((i=this._getVersion(e),t=t+"",r=this._getVersion(t),i.major>0&&i.major>r.major)||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),i=0,r=0;if(t.length<2&&isNaN(Number(n)))throw u;else if(i=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(i)||isNaN(r))throw u;return{minor:r,major:i}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;h=function(n){function i(){n.call(this,{dialogapi:t})}return __extends(i,n),i}(i);n.DefaultDialogSetRequirement=h;u=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelClientDefaultSetRequirement=u;c=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(u);n.ExcelClientV1DefaultSetRequirement=c;l=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookClientDefaultSetRequirement=l;f=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return __extends(i,n),i}(i);n.WordClientDefaultSetRequirement=f;a=function(n){function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return __extends(i,n),i}(f);n.WordClientV1DefaultSetRequirement=a;e=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointClientDefaultSetRequirement=e;v=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(e);n.PowerpointClientV1DefaultSetRequirement=v;y=function(n){function i(){n.call(this,{selection:t,textcoercion:t})}return __extends(i,n),i}(i);n.ProjectClientDefaultSetRequirement=y;p=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return __extends(i,n),i}(i);n.ExcelWebDefaultSetRequirement=p;w=function(n){function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordWebDefaultSetRequirement=w;b=function(n){function i(){n.call(this,{activeview:t,settings:t})}return __extends(i,n),i}(i);n.PowerpointWebDefaultSetRequirement=b;o=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookWebDefaultSetRequirement=o;k=function(n){function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.SwayWebDefaultSetRequirement=k;d=function(n){function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return __extends(i,n),i}(i);n.AccessWebDefaultSetRequirement=d;g=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelIOSDefaultSetRequirement=g;s=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordIOSDefaultSetRequirement=s;nt=function(n){function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return __extends(t,n),t}(s);n.WordIOSV1DefaultSetRequirement=nt;tt=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointIOSDefaultSetRequirement=tt;it=function(n){function i(){n.call(this,{mailbox:t})}return __extends(i,n),i}(i);n.OutlookIOSDefaultSetRequirement=it;rt=function(){function n(){}var t="undefined";return n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},n.getDefaultRequirementMatrix=function(u){var f,e,s,o;return this.initializeDefaultSetMatrix(),f=undefined,e=u.get_requirementMatrix(),e!=undefined&&e.length>0&&typeof JSON!==t?(s=JSON.parse(u.get_requirementMatrix().toLowerCase()),f=new r(new i(s))):(o=n.getClientFullVersionString(u),f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[o]!=undefined?new r(n.DefaultSetArrayMatrix[o]):new r(new i({}))),f},n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix(),e;return f!=undefined&&f.length>0&&typeof JSON!==t?(e=JSON.parse(n.get_requirementMatrix().toLowerCase()),u=new r(new i(e))):u=new r(new h),u},n.getClientFullVersionString=function(n){var i=n.get_appMinorVersion(),u="",r="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;return f&&n.get_appVersion()==1?r=t==4096&&i>=15?"16.00.01":"16.00":n.get_appName()==64?r=n.get_appVersion():(u=i<10?"0"+i:""+i,r=n.get_appVersion()+"."+u),n.get_appName()+"-"+r},n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new c;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new v;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new l;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new w;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new b;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new g;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new k;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new nt;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new tt;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new it},n.Excel_RCLIENT_1600="1-16.00",n.Excel_RCLIENT_1601="1-16.01",n.Word_RCLIENT_1600="2-16.00",n.Word_RCLIENT_1601="2-16.01",n.PowerPoint_RCLIENT_1600="4-16.00",n.PowerPoint_RCLIENT_1601="4-16.01",n.Outlook_RCLIENT_1600="8-16.00",n.Excel_WAC_1600="16-16.00",n.Word_WAC_1600="32-16.00",n.Outlook_WAC_1600="64-16.00",n.Outlook_WAC_1601="64-16.01",n.Project_RCLIENT_1600="128-16.00",n.Access_WAC_1600="256-16.00",n.PowerPoint_WAC_1600="512-16.00",n.Excel_IOS_1600="1024-16.00",n.SWAY_WAC_1600="2048-16.00",n.Word_IOS_1600="4096-16.00",n.Word_IOS_16001="4096-16.00.01",n.PowerPoint_IOS_1600="8192-16.00",n.Outlook_IOS_1600="65536-16.00",n.DefaultSetArrayMatrix={},n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))}(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}return n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n},n.getInstance=function(){return n.hostObj===undefined&&(n.hostObj=new n),n.hostObj},n.prototype.getPlatform=function(){var n=this,t;return n.hostInfo.hostPlatform&&(t=n.hostInfo.hostPlatform.toLowerCase(),n.platformRemappings[t])?n.platformRemappings[t]:null},n.prototype.getHost=function(){var n=this,t;if(n.hostInfo.hostType){if(t=n.hostInfo.hostType.toLowerCase(),n.camelCaseMappings[t])return n.camelCaseMappings[t];if(t=n.capitalizeFirstLetter(n.hostInfo.hostType),Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null},n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null},n}();n.Host=t})(t=n.HostName||(n.HostName={}))}(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){n||(window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,n=!0)},disableShortcut:function(){n&&(t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window),n=!1)}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i,r,o,u,f,e;if(n&&typeof n=="string"&&(r=n.indexOf("#"),r!=-1)){o=n.substring(0,r);u=n.substring(r+1);switch(o){case"binding":case"bindings":u&&(i=new OSF.DDA.BindingPromise(u))}}if(i)return i.onFail=t,i;else if(t)if(f=typeof t,f=="function")e={},e[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(e,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext));else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f);};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this,s,e;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.get_isDialog()?(e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e})):(t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t}),r&&(s=r.displayName||"appOM",delete r.displayName,OSF.OUtil.defineEnumerableProperty(f,s,{value:r})),u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}}),e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e}))};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this,u;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;return OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext()),n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,e=n.length,o=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){var u,i,r;for(u in n){if(i=n[u],r=t[u],i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw o();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw o();}};f.extractRequiredArguments=function(t,i,r){var f,u,h,s,c,l;if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(c=n.length-1;c>=s;c--){l=n[c];switch(typeof l){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=l;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}if(f=o.fillOptions(f,i,r,u),e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;return o.verifyArguments(t,f),f}var h="function",s=n.length,o=new OSF.DDA.ApiMethodCall(n,t,i,f,e);this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),u=c(n,r,t,i);return o.constructCallArgs(r,u,t,i)};this.processResponse=function(n,t,i,f){return n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n)};this.getCallArgs=function(n){for(var t,u,r,i=n.length-1;i>=s;i--){r=n[i];switch(typeof r){case"object":t=r;break;case h:u=r}}return t=t||{},u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u),t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],i=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],t,i,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback],u,r;f&&(u={},u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?u[OSF.DDA.AsyncResultEnum.Properties.Value]=i:(r={},i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i),f(new OSF.DDA.AsyncResult(u,r)))};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.SyncMethodNames[t]=i};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){function o(n,i,r,u){var o,c,s,h;if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(s=n.length-1;s>=e;s--){h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}return o=f.fillOptions(o,i,r,u),f.verifyArguments(t,o),o}var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),u=o(n,r,t,i);return f.constructCallArgs(r,u,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){function e(i,f){var a=i?{}:undefined,s,h,o,v,c,l;for(s in i){if(h=i[s],OSF.DDA.ListType.isListType(s)){o=[];for(v in h)o.push(e(h[v],f))}else OSF.OUtil.listContainsKey(r,s)?o=r[s][f](h):f==u&&n.preserveNesting(s)?o=e(h,f):(c=t[s],c?(l=c[f],l&&(o=l[h],o===undefined&&(o=h))):o=h);a[s]=o}return a}function l(i,r){var e,u,h,s;for(u in r)h=n.isComplexType(u)?l(i,t[u][o]):i[u],h!=undefined&&(e||(e={}),s=r[u],s==f&&(s=u),e[s]=n.pack(u,h));return e}function s(i,r,e){var o,a,h,l,p,v,y;e||(e={});for(o in r){if(a=r[o],a==f)h=i;else if(a==c){e[o]=i.toArray();continue}else h=i[a];if(h===null||h===undefined)e[o]=undefined;else if(h=n.unpack(o,h),n.isComplexType(o))l=t[o][u],n.preserveNesting(o)?e[o]=s(h,l):s(h,l,e);else if(OSF.DDA.ListType.isListType(o)){l={};p=OSF.DDA.ListType.getDescriptor(o);l[p]=f;v=new Array(h.length);for(y in h)v[y]=s(h[y],l);e[o]=v}else e[o]=h}return e}function a(n,i,r){var f=t[n][r],u,o,c;return r=="toHost"?(o=e(i,r),u=l(o,f)):r==h&&(c=s(i,f),u=e(c,r)),u}var h="fromHost",i=this,o="toHost",u=h,c="sourceData",f="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];t||(t={});i.addMapping=function(n,i){var e,h,c,l,r,s,a,v;if(i.map){e=i.map;h={};for(c in e)l=e[c],l==f&&(l=c),h[l]=c}else e=i.toHost,h=i.fromHost;if(r=t[n],r){s=r[o];for(a in s)e[a]=s[a];s=r[u];for(v in s)h[v]=s[v]}else r=t[n]={};r[o]=e;r[u]=h};i.toHost=function(n,t){return a(n,t,o)};i.fromHost=function(n,t){return a(n,t,u)};i.self=f;i.sourceData=c;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){return this.isDynamicType(n)?t[n].toHost(i):i};i.unpack=function(n,i){return this.isDynamicType(n)?t[n].fromHost(i):i}};OSF.DDA.getDecoratedParameterMap=function(n,t){function r(n){var i=null,r,t;if(n)for(i={},r=n.length,t=0;t0){for(r=[],i=0;i=s)break;if(f=Function._validateParameter(n[e],o,h),f)return f.popStackFrame(),f}return t}),Function._validateParameterCount||(Function._validateParameterCount=function(n,r,u){var f,s,e=r.length,h=n.length,c,l,a;if(he)for(s=i,f=0;f0&&t.push(u)}}catch(s){}return t}var i=[],t={};t[Microsoft.Office.WebExtension.Parameters.Data]=function(){var t=0,i=1;return{toHost:function(n){if(OSF.DDA.TableDataProperties&&typeof n!="string"&&n[OSF.DDA.TableDataProperties.TableRows]!==undefined){var r=[];r[t]=n[OSF.DDA.TableDataProperties.TableRows];r[i]=n[OSF.DDA.TableDataProperties.TableHeaders];n=r}return n},fromHost:function(r){var f,e,u;return r.toArray?(e=r.dimensions(),e===2?f=n(r):(u=r.toArray(),u.length===2&&(u[0]!=null&&u[0].toArray||u[1]!=null&&u[1].toArray)?(f={},f[OSF.DDA.TableDataProperties.TableRows]=n(u[t]),f[OSF.DDA.TableDataProperties.TableHeaders]=n(u[i])):f=u)):f=r,f}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,i,t);this.unpack=function(n,i){var r,u;return this.isComplexType(n)||OSF.DDA.ListType.isListType(n)?(u=(i||typeof i=="unknown")&&i.toArray,r=u?i.toArray():i||{}):r=this.isDynamicType(n)?t[n].fromHost(i):i,r}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(n){function t(n){var i=n,f,r,u;if(OSF.OUtil.isArray(n))for(f=i.length,r=0;r2)for(u=[],o=1;o=2&&(u=t[0],i=t[1]),r?r(new n.WebViewSafeArray(i)):void 0};this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.Execute,f,e)},t.prototype.registerEvent=function(t,i,r,u){var f=function(t){var i=t,u=0;OSF.OUtil.isArray(t)&&t.length>=2&&(u=t[0],i=t[1]);r&&r(u,new n.WebViewSafeArray(i))},e=function(t){if(u)return u(new n.WebViewSafeArray(t))};this.hostScriptProxy.registerEvent(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.RegisterEvent,t,i,f,e)},t.prototype.unregisterEvent=function(t,i,r){var u=function(t){return r(new n.WebViewSafeArray(t))};this.hostScriptProxy.unregisterEvent(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.UnregisterEvent,t,i,u)},t.prototype.messageParent=function(n){var t=n[Microsoft.Office.WebExtension.Parameters.MessageToParent];!isNaN(parseFloat(t))&&isFinite(t)&&(t=t.toString());this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.MessageParent,t,null)},t.prototype.openDialog=function(n,t,i,r){var u=JSON.parse(t);(isNaN(u.width)||u.width<=0||u.width>100)&&(u.width=99);(isNaN(u.height)||u.height<=0||u.height>100)&&(u.height=99);t=JSON.stringify(u);this.registerEvent(n,t,i,r)},t.prototype.closeDialog=function(n,t,i){this.unregisterEvent(n,t,i)},t.prototype.sendMessage=function(n){var t=n[Microsoft.Office.WebExtension.Parameters.MessageContent];!isNaN(parseFloat(t))&&isFinite(t)&&(t=t.toString());this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.SendMessage,t,null)},t}();n.WebViewHostController=t}(OSFWebView||(OSFWebView={})),function(n){(function(n){var t="EventCallback",i="MethodCallback";n[n[i]=0]=i;n[n[t]=1]=t})(n.CallbackType||(n.CallbackType={}));var i=n.CallbackType,t=function(){function n(n,t,i){this.callbackType=n;this.callbackId=t;this.params=i}return n}();n.CallbackData=t}(CrossIFrameCommon||(CrossIFrameCommon={})),function(n){var t=function(){function n(){window.addEventListener("message",this.OnReceiveMessage)}return n.prototype.postMessage=function(n,t){window.parent.postMessage(t,"*")},n.prototype.OnReceiveMessage=function(n){if(n.source==window.parent&&window.parent==window.top&&n.origin.startsWith("ms-appx-web://")){var t;try{t=JSON.parse(n.data)}catch(i){return}switch(t.callbackType){case CrossIFrameCommon.CallbackType.MethodCallback:OSFWebView.ScriptMessaging.agaveHostCallback(t.callbackId,JSON.parse(t.params));break;case CrossIFrameCommon.CallbackType.EventCallback:OSFWebView.ScriptMessaging.agaveHostEventCallback(t.callbackId,JSON.parse(t.params))}}},n}();n.Poster=t}(WinRT||(WinRT={}));OSF.DDA.ClientSettingsManager={getSettingsExecuteMethod:function(n){return function(t){var i,r,u=function(n,i){t.onReceiving&&t.onReceiving();t.onComplete&&t.onComplete(n,i)};try{n(t.hostCallArgs,t.onCalling,u)}catch(f){i=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;r={name:Strings.OfficeOM.L_InternalError,message:f};u(i,r)}}},read:function(n,t){var u=[],f=[],i,r;n&&n();i=OSF._OfficeAppFactory.getInitializationHelper();r=function(n){t&&t(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,n.get_settings())};i.getAppContext(null,r)},write:function(n,t,i,r){var u={},e=[],o=[],f,s;for(f in n)e.push(f),o.push(n[f]);u.keys=e;u.values=o;i&&i();s=function(n){r&&r(n[0],null)};OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.WriteSettings,u,s)}};OSF.InitializationHelper.prototype.initializeSettings=function(n,t){var i=n.get_settings();return this.deserializeSettings(i,t)};OSF.InitializationHelper.prototype.getAppContext=function(n,t){var i=function(n){var f,i=OSF.WebView.AppContextProperties,e=n[i.AppType],o=!1;for(var l in OSF.AppName)if(OSF.AppName[l]==e){o=!0;break}if(!o)throw"Unsupported client type "+e;for(var s=n[i.Settings],h={},c=s[0],a=s[1],r=0;r40)&&(n=OSF.OUtil.Guid.generateNewGuid(),t.setValue(t.clientIDKey,n)),n},n.prototype.saveLog=function(n,t){var i=this,u=i.getValue(i.logIdSetKey);u=(u&&u.length>0?u+";":r)+n;i.setValue(i.logIdSetKey,u);i.setValue(n,t)},n.prototype.enumerateLog=function(n,t){var i=this,e=i.getValue(i.logIdSetKey),u,o,r,f;if(e){u=e.split(";");for(o in u)r=u[o],f=i.getValue(r),f&&(n&&n(r,f),t&&i.remove(r));t&&i.remove(i.logIdSetKey)}},n.prototype.getValue=function(n){var t=OSF.OUtil.getLocalStorage(),i=r;return t&&(i=t.getItem(n)),i},n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)},n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}},n}(),o=function(){function n(){}return n.prototype.LogData=function(n){OSF.Logger&&(OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n.SerializeRow(),OSF.Logger.SendFlag.none),OSFAriaLogger.AriaLogger.getInstance().logData(n))},n.prototype.LogRawData=function(n){if(OSF.Logger){OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n,OSF.Logger.SendFlag.none);try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(n))}catch(t){}}},n}();n.initialize=v;n.onAppActivated=y;n.onScriptDone=p;n.onCallDone=w;n.onMethodDone=b;n.onPropertyDone=k;n.onEventDone=d;n.onRegisterDone=g;n.onAppClosed=nt;n.setOsfControlAppCorrelationId=tt;n.doAppInitializationLogging=c;n.logAppCommonMessage=it;n.logAppException=rt;OSF.AppTelemetry=n}(OSFAppTelemetry||(OSFAppTelemetry={}));OSF.DDA.AsyncMethodNames.addNames({CloseContainerAsync:"closeContainer"}),function(n){var t=function(){function n(){}return n}();n.Container=t}(OfficeExt||(OfficeExt={}));OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseContainerAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidCloseContainerMethod,fromHost:[],toHost:[]});Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(n){var t=this,r,i;t._eventHandlers={};t._queuedEventsArgs={};for(r in n)i=n[r],t._eventHandlers[i]=[],t._queuedEventsArgs[i]=[]};OSF.EventDispatch.prototype={getSupportedEvents:function(){var n=[];for(var t in this._eventHandlers)n.push(t);return n},supportsEvent:function(n){var t=!1;for(var i in this._eventHandlers)if(n==i){t=!0;break}return t},hasEventHandler:function(n,t){var i=this._eventHandlers[n],r;if(i&&i.length>0)for(r in i)if(i[r]===t)return!0;return!1},addEventHandler:function(n,t){if(typeof t!="function")return!1;var i=this._eventHandlers[n];return i&&!this.hasEventHandler(n,t)?(i.push(t),!0):!1},addEventHandlerAndFireQueuedEvent:function(n,t){var r=this._eventHandlers[n],u=r.length==0,i=this.addEventHandler(n,t);return u&&i&&this.fireQueuedEvent(n),i},removeEventHandler:function(n,t){var i=this._eventHandlers[n],r;if(i&&i.length>0)for(r=0;r0?(this._eventHandlers[n]=[],!0):!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},fireEvent:function(n){var t,i,r;if(n.type==undefined)return!1;if(t=n.type,t&&this._eventHandlers[t]){i=this._eventHandlers[t];for(r in i)i[r](n);return!0}else return!1},fireOrQueueEvent:function(n){var t=this,i=n.type,r,u;return i&&t._eventHandlers[i]?(r=t._eventHandlers[i],u=t._queuedEventsArgs[i],r.length==0?u.push(n):t.fireEvent(n),!0):!1},fireQueuedEvent:function(n){var t,i,r,u;if(n&&this._eventHandlers[n]&&(t=this._eventHandlers[n],i=this._queuedEventsArgs[n],t.length>0)){for(r=t[0];i.length>0;)u=i.shift(),r(u);return!0}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var f="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]=="outlook"||OSF._OfficeAppFactory.getHostInfo()[f]=="outlookwebapp")r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i),t.initialize(r.initialData),t.setCurrentItemNumber(r.itemNumber.itemNumber);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var i=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),t=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];t(arguments,i,n)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(n){var i=OSF.DDA.SyncMethodNames.MessageParent.displayName,t=this,r;t[i]||OSF.OUtil.defineEnumerableProperty(t,i,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return n(arguments,t)}});r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;t[r]||typeof OSF.DialogParentMessageEventDispatch=="undefined"||OSF.DDA.DispIdHost.addEventSupport(t,OSF.DialogParentMessageEventDispatch,n);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(n){n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:n[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}}],privateStateCallbacks:[],onSucceeded:function(n){var f=n[Microsoft.Office.WebExtension.Parameters.Id],i=n[Microsoft.Office.WebExtension.Parameters.Data],t=new OSF.DialogHandler,e=OSF.DDA.AsyncMethodNames.CloseAsync.displayName,r,u;return OSF.OUtil.defineEnumerableProperty(t,e,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];n(arguments,f,i,t)}}),r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName,OSF.OUtil.defineEnumerableProperty(t,r,{value:function(){var r=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],n=r.verifyAndExtractCall(arguments,t,i),u=n[Microsoft.Office.WebExtension.Parameters.EventType],f=n[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(u,f)}}),u=OSF.DDA.SyncMethodNames.SendMessage.displayName,OSF.OUtil.defineEnumerableProperty(t,u,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return n(arguments,i,t)}}),t},checkCallArgs:function(n){return n[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Width]=1),n[Microsoft.Office.WebExtension.Parameters.Width]>100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99),n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1),n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99),n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(n){try{n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,n);OSF.ClientHostController.openDialog(n.dispId,n.targetId,function(t,i){n.onEvent&&n.onEvent(i);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(n){n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,n);try{OSF.ClientHostController.closeDialog(n.dispId,n.targetId,t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.messageParent=function(n){try{n.onCalling&&n.onCalling();var i=(new Date).getTime(),t=OSF.ClientHostController.messageParent(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs((new Date).getTime()-i),t),t}catch(r){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(r)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.sendMessage=function(n){try{n.onCalling&&n.onCalling();var r=(new Date).getTime(),t=OSF.ClientHostController.sendMessage(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),t}catch(i){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(i)}};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogParentMessageReceivedEvent:"DialogParentMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogParentMessageReceived:"dialogParentMessageReceived",DialogParentEventReceived:"dialogParentEventReceived"});OSF.DialogParentMessageEventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived,Microsoft.Office.WebExtension.EventType.DialogParentEventReceived]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});Microsoft.Office.WebExtension.FileType={Text:"text",Compressed:"compressed",Pdf:"pdf"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FileProperties:"FileProperties",FileSliceProperties:"FileSliceProperties"});OSF.DDA.FileProperties={Handle:"FileHandle",FileSize:"FileSize",SliceSize:Microsoft.Office.WebExtension.Parameters.SliceSize};OSF.DDA.File=function(n,t,i){var r,u;OSF.OUtil.defineEnumerableProperties(this,{size:{value:t},sliceCount:{value:Math.ceil(t/i)}});r={};r[OSF.DDA.FileProperties.Handle]=n;r[OSF.DDA.FileProperties.SliceSize]=i;u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.GetDocumentCopyChunkAsync,u.ReleaseDocumentCopyAsync],r)};OSF.DDA.FileSliceOffset="fileSliceoffset";OSF.DDA.AsyncMethodNames.addNames({GetDocumentCopyAsync:"getFileAsync",GetDocumentCopyChunkAsync:"getSliceAsync",ReleaseDocumentCopyAsync:"closeAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FileType,"enum":Microsoft.Office.WebExtension.FileType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:{types:["number"],defaultValue:4194304}}],checkCallArgs:function(n){var t=n[Microsoft.Office.WebExtension.Parameters.SliceSize];if(t<=0||t>4194304)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return n},onSucceeded:function(n,t,i){return new OSF.DDA.File(n[OSF.DDA.FileProperties.Handle],n[OSF.DDA.FileProperties.FileSize],i[Microsoft.Office.WebExtension.Parameters.SliceSize])}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(n,t){return t[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(r<0||r>=t.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;return n[OSF.DDA.FileSliceOffset]=parseInt((r*i[OSF.DDA.FileProperties.SliceSize]).toString()),n},onSucceeded:function(n,t,i){var r={};return OSF.OUtil.defineEnumerableProperties(r,{data:{value:n[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:i[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:n[OSF.DDA.FileProperties.SliceSize]}}),r}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FileType,{Text:"text",Pdf:"pdf"});OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(n){OSF.OUtil.defineEnumerableProperties(this,{url:{value:n[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(n){return new Microsoft.Office.WebExtension.FileProperties(n)}});Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"};Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"};Microsoft.Office.WebExtension.Index={First:"first",Last:"last",Next:"next",Previous:"previous"};OSF.DDA.AsyncMethodNames.addNames({GoToByIdAsync:"goToByIdAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GoToByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string","number"]},{name:Microsoft.Office.WebExtension.Parameters.GoToType,"enum":Microsoft.Office.WebExtension.GoToType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:{"enum":Microsoft.Office.WebExtension.SelectionMode,defaultValue:Microsoft.Office.WebExtension.SelectionMode.Default}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:0},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:1},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:2},{name:Microsoft.Office.WebExtension.GoToType.Index,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:0},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:1},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:1},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileProperties.FileSize,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0},{name:OSF.DDA.FileProperties.SliceSize,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:0},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:5},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:6}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:0}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileSliceOffset,value:1},{name:OSF.DDA.FileProperties.SliceSize,value:2}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0}]});OSF.DDA.AsyncMethodNames.addNames({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync"}),function(){function r(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&r&&(r[OSF.DDA.TableDataProperties.TableRows]!=undefined||r[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(r=OSF.DDA.OMFactory.manufactureTableData(r)),r=OSF.DDA.DataCoercion.coerceData(r,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),r==undefined?null:r}var i=!1,n="boolean",t="number";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,"enum":Microsoft.Office.WebExtension.CoercionType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}}],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object",t,n]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[t,n],defaultValue:i}}],privateStateCallbacks:[]})}();OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:1},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:2},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:3},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:4},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:5}]});OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",RefreshingSettings:"refreshingSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(n){var r={},i,t;for(i in n){t=n[i];try{t=JSON?JSON.stringify(t,function(n,t){return OSF.OUtil.isDate(this[n])?OSF.DDA.SettingsManager.DateJSONPrefix+this[n].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix:t}):Sys.Serialization.JavaScriptSerializer.serialize(t);r[i]=t}catch(u){}}return r},deserializeSettings:function(n){var r={},i,t;n=n||{};for(i in n){t=n[i];try{t=JSON?JSON.parse(t,function(n,t){var i;return typeof t=="string"&&t&&t.length>6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix&&(i=new Date(parseInt(t.slice(5,-1))),i)?i:t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,!0);r[i]=t}catch(u){}}return r}};OSF.DDA.Settings=function(n){var t="name",i;n=n||{};i=function(n){var i=OSF.OUtil.getSessionStorage(),t,r;i&&(t=OSF.DDA.SettingsManager.serializeSettings(n),r=JSON?JSON.stringify(t):Sys.Serialization.JavaScriptSerializer.serialize(t),i.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),r))};OSF.OUtil.defineEnumerableProperties(this,{get:{value:function(i){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]),r;if(u)throw u;return r=n[i],typeof r=="undefined"?null:r}},set:{value:function(r,u){var f=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1},{name:"value",mayBeNull:!0}]);if(f)throw f;n[r]=u;i(n)}},remove:{value:function(r){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]);if(u)throw u;delete n[r];i(n)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],n)};OSF.DDA.RefreshableSettings=function(n){OSF.DDA.RefreshableSettings.uber.constructor.call(this,n);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],n);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:n}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(n,t){return t}}],onSucceeded:function(n,t,i){var f=n[OSF.DDA.SettingsManager.SerializedSettings],u=OSF.DDA.SettingsManager.deserializeSettings(f),e=i[OSF.DDA.SettingsManager.RefreshingSettings];for(var r in e)t.remove(r);for(r in u)t.set(r,u[r]);return t}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(n,t){return OSF.DDA.SettingsManager.serializeSettings(t)}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"});OSF.DDA.DocumentSelectionChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:n}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent});Microsoft.Office.WebExtension.TableData=function(n,t){function i(n){if(n==null||n==undefined)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(n,2);t<2;t++)n=[n];return n}catch(i){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(n){t=i(n)}},rows:{get:function(){return n},set:function(t){n=t==null||OSF.OUtil.isArray(t)&&t.length==0?[]:i(t)}}});this.headers=t;this.rows=n};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(n){return new Microsoft.Office.WebExtension.TableData(n[OSF.DDA.TableDataProperties.TableRows],n[OSF.DDA.TableDataProperties.TableHeaders])};Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var n=null;return{findArrayDimensionality:function(n){if(OSF.OUtil.isArray(n)){for(var t=0,i=0;i0},enumerable:!0,configurable:!0}),t.prototype.addTrace=function(n,t){this.m_traceInfos[n]=t},t.prototype.addReferencedObjectPath=function(t){if(!this.m_referencedObjectPaths[t.objectPathInfo.Id]){if(!t.isValid)throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidObjectPath,message:n.Utility._getResourceString(n.ResourceStrings.invalidObjectPath,n.Utility.getObjectPathExpression(t)),debugInfo:{errorLocation:n.Utility.getObjectPathExpression(t)}});while(t)t.isWriteOperation&&(this.m_flags=this.m_flags|1),this.m_referencedObjectPaths[t.objectPathInfo.Id]=t,t.objectPathInfo.ObjectPathType==3&&this.addReferencedObjectPaths(t.argumentObjectPaths),t=t.parentObjectPath}},t.prototype.addReferencedObjectPaths=function(n){if(n)for(var t=0;t0&&(typeof r[0]=="string"||i.isRequestUrlAndHeaderInfo(r[0])||i.isRequestUrlAndHeaderInfoResolver(r[0]))&&(y=r[0],h=1),r.length==h+1)a=u,v=r[h+0];else if(r.length==h+2){if(r[h+0]instanceof n.ClientObject)a=function(){return r[h+0].context};else if(Array.isArray(r[h+0])){if(c=r[h+0],c.length==0)return i.createErrorPromise(t);for(l=0;l0){var n=c._onRunFinishedNotifiers.shift();n()}if(a)return l;else throw l;})},i.prototype._nextId=function(){return++this.m_nextId},i}();n.ClientRequestContext=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_type=n}return Object.defineProperty(t.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){(this.m_isLoaded=!0,typeof t=="object"&&t&&t._IsNull)||(this.m_value=this.m_type===1?n.Utility.adjustToDateTime(t):t)},t}();n.ClientResult=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.flags="flags",n.getItemAt="GetItemAt",n.id="Id",n.idPrivate="_Id",n.index="_Index",n.items="_Items",n.iterativeExecutor="IterativeExecutor",n.localDocument="http://document.localhost/",n.localDocumentApiPrefix="http://document.localhost/_api/",n.processQuery="ProcessQuery",n.referenceId="_ReferenceId",n.isTracked="_IsTracked",n.sourceLibHeader="SdkVersion",n.embeddingPageOrigin="EmbeddingPageOrigin",n.embeddingPageSessionInfo="EmbeddingPageSessionInfo",n}();n.Constants=t}(OfficeExtension||(OfficeExtension={})),function(n){var u=1,r={invokeRequestModifier:function(n){return n.DdaMethod.Version=u,n},invokeResponseModifier:function(n){return u=n.Version,n.Error&&(n.error={},n.error.Code=n.Error),n}},i,t,f,e;(function(n){n[n.Success=0]="Success";n[n.Timeout=1]="Timeout";n[n.InternalError=5001]="InternalError"})(i||(i={})),function(n){n.SendingId="sId";n.RespondingId="rId";n.CommandKey="command";n.SessionInfoKey="sessionInfo";n.ParamsKey="params";n.ApiReadyCommand="apiready";n.ExecuteMethodCommand="executeMethod";n.GetAppContextCommand="getAppContext";n.RegisterEventCommand="registerEvent";n.UnregisterEventCommand="unregisterEvent";n.FireEventCommand="fireEvent"}(t||(t={}));f=function(u){function f(n,t){u.call(this);this.m_chosenWindow=null;this.m_chosenOrigin=null;this.m_enabled=!0;this.m_onMessageHandler=this._onMessage.bind(this);this.m_callbackList={};this.m_id=0;this.m_timeoutId=-1;this.m_appContext=null;this.m_url=n;this.m_options=t;this.m_options||(this.m_options={sessionKey:Math.random().toString()});this.m_options.sessionKey||(this.m_options.sessionKey=Math.random().toString());this.m_options.container||(this.m_options.container=document.body);this.m_options.timeoutInMilliseconds||(this.m_options.timeoutInMilliseconds=6e4);this.m_options.height||(this.m_options.height="400px");this.m_options.width||(this.m_options.width="100%")}return __extends(f,u),f.prototype._getIFrameSrc=function(){var u=window.location.protocol+"//"+window.location.host,i=n.Constants.embeddingPageOrigin+"="+encodeURIComponent(u)+"&"+n.Constants.embeddingPageSessionInfo+"="+encodeURIComponent(this.m_options.sessionKey),r=!1,t;return this.m_url.toLowerCase().indexOf("/_layouts/preauth.aspx")>0&&(r=!0),t=document.createElement("a"),t.href=this.m_url,r?t.hash=t.hash.length===0||t.hash==="#"?"#"+i:t.hash+"&"+i:t.search=t.search.length===0||t.search==="?"?"?"+i:t.search+"&"+i,t.href},f.prototype.init=function(){var t=this,i;return window.addEventListener("message",this.m_onMessageHandler),i=this._getIFrameSrc(),new n._Internal.OfficePromise(function(r,u){var f=document.createElement("iframe");t.m_options.id&&(f.id=t.m_options.id);f.style.height=t.m_options.height;f.style.width=t.m_options.width;f.src=i;t.m_options.container.appendChild(f);t.m_timeoutId=setTimeout(function(){t.close();var i=n.Utility.createRuntimeError(n.ErrorCodes.timeout,n.Utility._getResourceString(n.ResourceStrings.timeout),"EmbeddedSession.init");u(i)},t.m_options.timeoutInMilliseconds);t.m_promiseResolver=r})},f.prototype._invoke=function(n,t,u){if(!this.m_enabled){t(i.InternalError,null);return}r.invokeRequestModifier&&(u=r.invokeRequestModifier(u));this._sendMessageWithCallback(this.m_id++,n,u,function(n){r.invokeResponseModifier&&(n=r.invokeResponseModifier(n));var u=n.Error;delete n.Error;t(u||i.Success,n)})},f.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler);window.clearTimeout(this.m_timeoutId);this.m_enabled=!1},Object.defineProperty(f.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),f.prototype._createRequestExecutorOrNull=function(){return new e(this)},f.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},f.prototype._registerEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.RegisterEventCommand,{EventId:i,TargetId:r},function(){n(null)})})},f.prototype._unregisterEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.UnregisterEventCommand,{EventId:i,TargetId:r},function(){n()})})},f.prototype._onMessage=function(n){var u=this,i,e,r,o,s;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===n.source&&this.m_chosenOrigin===n.origin)){if(i=n.data,i&&i[t.CommandKey]===t.ApiReadyCommand){!this.m_chosenWindow&&this._isValidDescendant(n.source)&&i[t.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=n.source,this.m_chosenOrigin=n.origin,this._sendMessageWithCallback(this.m_id++,t.GetAppContextCommand,null,function(n){u._setupContext(n);window.clearTimeout(u.m_timeoutId);u.m_promiseResolver()}));return}if(i&&i[t.CommandKey]===t.FireEventCommand){var f=i[t.ParamsKey],h=f.EventId,c=f.TargetId,l=f.Data;if(this.m_sessionEventManager)for(e=this.m_sessionEventManager.getHandlers(h,c),r=0;r=0;o--)if(r[o]===e[i].handler){r.splice(o,1);break}break;case 2:r=[];break}}return s&&(!this.m_registered&&r.length>0?u=u.then(function(){return f.m_eventInfo.registerFunc(f.m_callback)}).then(function(){return f.m_registered=!0}):this.m_registered&&r.length==0&&(u=u.then(function(){return f.m_eventInfo.unregisterFunc(f.m_callback)}).catch(function(t){n.Utility.log("Error when unregister event: "+JSON.stringify(t))}).then(function(){return f.m_registered=!1})),u=u.then(function(){return f.m_handlers=r})),u},t.prototype.fireEvent=function(t){for(var u,f,r=[],i=0;i=0;e--)if(f[e]===u){f.splice(e,1);break}return f.length===0?this.m_unregisterEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i}();n.EventRegistration=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var s=JSON.stringify(u.Body),f=u.Url,e,o;if(f.charAt(f.length-1)!="/"&&(f=f+"/"),f=f+n.Constants.processQuery,f=f+"?"+n.Constants.flags+"="+r.toString(),e={method:"POST",url:f,headers:{},body:s},e.headers[n.Constants.sourceLibHeader]=t.SourceLibHeaderValue,e.headers["CONTENT-TYPE"]="application/json",u.Headers)for(o in u.Headers)e.headers[o]=u.Headers[o];return n.HttpUtility.sendRequest(e).then(function(t){var i,r;return t.statusCode===200?i={ErrorCode:null,ErrorMessage:null,Headers:t.headers,Body:JSON.parse(t.body)}:(n.Utility.log("Error Response:"+t.body),r=n.Utility._parseErrorResponse(t),i={ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:t.headers,Body:null}),i})},t.SourceLibHeaderValue="officejs-rest",t}();n.HttpRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){n.OfficeRequire=function(){return typeof require!="undefined"?require:null}()})(t=n._Internal||(n._Internal={}));i=function(){function i(){}return i.setCustomSendRequestFunc=function(n){i.s_customSendRequestFunc=n},i.xhrSendRequestFunc=function(i){return new t.OfficePromise(function(r,u){var f=new XMLHttpRequest,e;if(f.open(i.method,i.url),f.onload=function(){var t={statusCode:f.status,headers:n.Utility._parseHttpResponseHeaders(f.getAllResponseHeaders()),body:f.responseText};r(t)},f.onerror=function(){u(new t.RuntimeError({code:n.ErrorCodes.connectionFailure,message:n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,f.statusText)}))},i.headers)for(e in i.headers)f.setRequestHeader(e,i.headers[e]);f.send(i.body)})},i.nodejsRequestModuleSendRequestFunc=function(n){i.logRequest(n);var r=t.OfficeRequire(i.NodeJsRequestModuleName);return r(n.url,{method:n.method,headers:n.headers,body:n.body}).then(function(n){return n.text().then(function(t){var f=n.status,u={},r;return n.headers.forEach(function(n,t){u[t]=n}),r={statusCode:f,headers:u,body:t},i.logResponse(r),r})})},i.sendRequest=function(n){i.validateAndNormalizeRequest(n);var t=i.s_customSendRequestFunc;return t||(t=typeof window=="undefined"||typeof XMLHttpRequest=="undefined"?i.nodejsRequestModuleSendRequestFunc:i.xhrSendRequestFunc),t(n)},i.setCustomSendLocalDocumentRequestFunc=function(n){i.s_customSendLocalDocumentRequestFunc=n},i.sendLocalDocumentRequest=function(n){i.validateAndNormalizeRequest(n);var t;return t=i.s_customSendLocalDocumentRequestFunc||i.officeJsSendLocalDocumentRequestFunc,t(n)},i.officeJsSendLocalDocumentRequestFunc=function(i){i=n.Utility._validateLocalDocumentRequest(i);var r=n.Utility._buildRequestMessageSafeArray(i);return new t.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(r,function(i){var r;r=i.status=="succeeded"?{statusCode:n.RichApiMessageUtility.getResponseStatusCode(i),headers:n.RichApiMessageUtility.getResponseHeaders(i),body:n.RichApiMessageUtility.getResponseBody(i)}:n.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(i.error.code,i.error.message);n.Utility.log(JSON.stringify(r));t(r)})})},i.validateAndNormalizeRequest=function(i){if(n.Utility.isNullOrUndefined(i))throw t.RuntimeError._createInvalidArgError({argumentName:"request"});n.Utility.isNullOrEmptyString(i.method)&&(i.method="GET");i.method=i.method.toUpperCase()},i.logRequest=function(t){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Request---"),n.Utility.log(t.method+" "+t.url),t.headers)for(var r in t.headers)n.Utility.log(r+": "+t.headers[r]);i._logBody&&n.Utility.log(t.body)}},i.logResponse=function(t){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Response---"),n.Utility.log(""+t.statusCode),t.headers)for(var r in t.headers)n.Utility.log(r+": "+t.headers[r]);i._logBody&&n.Utility.log(t.body)}},i.NodeJsRequestModuleName="node-fetch",i._logBody=!1,i}();n.HttpUtility=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_clientObject=n}return n.prototype._handleResult=function(n){this.m_clientObject._handleIdResult(n)},n}();n.InstantiateActionResultHandler=t}(OfficeExtension||(OfficeExtension={})),function(n){}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){this.m_objectPathInfo=n;this.m_parentObjectPath=t;this.m_isWriteOperation=!1;this.m_isCollection=i;this.m_isInvalidAfterRequest=r;this.m_isValid=!0}return Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},set:function(n){this.m_isWriteOperation=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(n){this.m_argumentObjectPaths=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(n){this.m_isValid=n;!n&&this.m_objectPathInfo.ObjectPathType===6&&this.m_savedObjectPathInfo&&(t.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(n){this.m_getByIdMethodName=n},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null},t.prototype.updateUsingObjectData=function(i){var o=i[n.Constants.referenceId],u,f,e,r;if(!n.Utility.isNullOrEmptyString(o)){this.m_savedObjectPathInfo||this.isInvalidAfterRequest||!t.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)||(u={},t.copyObjectPathInfo(this.m_objectPathInfo,u),this.m_savedObjectPathInfo={pathInfo:u,parent:this.m_parentObjectPath});this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=o;this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null;return}if(f=this.parentObjectPath&&this.parentObjectPath.isCollection,e=this.getByIdMethodName,(f||!n.Utility.isNullOrEmptyString(e))&&(r=i[n.Constants.id],n.Utility.isNullOrUndefined(r)&&(r=i[n.Constants.idPrivate]),!n.Utility.isNullOrUndefined(r))){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;f?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=e,this.m_getByIdMethodName=null);this.isWriteOperation=!1;this.m_objectPathInfo.ArgumentInfo={};this.m_objectPathInfo.ArgumentInfo.Arguments=[r];this.m_argumentObjectPaths=null;return}},t.isRestorableObjectPath=function(n){return n===1||n===5||n===3||n===4},t.copyObjectPathInfo=function(n,t){t.Id=n.Id;t.ArgumentInfo=n.ArgumentInfo;t.Name=n.Name;t.ObjectPathType=n.ObjectPathType;t.ParentObjectPathId=n.ParentObjectPathId},t}();n.ObjectPath=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createGlobalObjectObjectPath=function(t){var i={Id:t._nextId(),ObjectPathType:1,Name:""};return new n.ObjectPath(i,null,!1,!1)},t.createNewObjectObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:2,Name:i};return new n.ObjectPath(u,null,r,!1)},t.createPropertyObjectPath=function(t,i,r,u,f){var e={Id:t._nextId(),ObjectPathType:4,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id};return new n.ObjectPath(e,i._objectPath,u,f)},t.createIndexerObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i._objectPath,!1,!1)},t.createIndexerObjectPathUsingParentPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i,!1,!1)},t.createMethodObjectPath=function(t,i,r,u,f,e,o,s){var c={Id:t._nextId(),ObjectPathType:3,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},l=n.Utility.setMethodArguments(t,c.ArgumentInfo,f),h=new n.ObjectPath(c,i._objectPath,e,o);return h.argumentObjectPaths=l,h.isWriteOperation=u!=1,h.getByIdMethodName=s,h},t.createChildItemObjectPathUsingIndexerOrGetItemAt=function(i,r,u,f,e){var o=f[n.Constants.id];return n.Utility.isNullOrUndefined(o)&&(o=f[n.Constants.idPrivate]),i&&!n.Utility.isNullOrUndefined(o)?t.createChildItemObjectPathUsingIndexer(r,u,f):t.createChildItemObjectPathUsingGetItemAt(r,u,f,e)},t.createChildItemObjectPathUsingIndexer=function(t,i,r){var f=r[n.Constants.id],u;return n.Utility.isNullOrUndefined(f)&&(f=r[n.Constants.idPrivate]),u=u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u.ArgumentInfo.Arguments=[f],new n.ObjectPath(u,i._objectPath,!1,!1)},t.createChildItemObjectPathUsingGetItemAt=function(t,i,r,u){var e=r[n.Constants.index],f;return e&&(u=e),f={Id:t._nextId(),ObjectPathType:3,Name:n.Constants.getItemAt,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f.ArgumentInfo.Arguments=[u],new n.ObjectPath(f,i._objectPath,!1,!1)},t}();n.ObjectPathFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var f=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n._Internal.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(f,function(i){n.Utility.log("Response:");n.Utility.log(JSON.stringify(i));var r;r=i.status=="succeeded"?n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBody(i),n.RichApiMessageUtility.getResponseHeaders(i)):n.RichApiMessageUtility.buildResponseOnError(i.error.code,i.error.message);t(r)})})},t.SourceLibHeaderValue="officejs",t}();n.OfficeJsRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){var t;(function(t){function i(){return function(){"use strict";function wt(n){return typeof n=="function"||typeof n=="object"&&n!==null}function b(n){return typeof n=="function"}function bt(n){return typeof n=="object"&&n!==null}function kt(n){k=n}function dt(n){f=n}function ti(){var t=process.nextTick,n=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&n[1]==="0"&&n[2]==="10"&&(t=setImmediate),function(){t(c)}}function ii(){return function(){tt(c)}}function ri(){var n=0,i=new ut(c),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function ui(){var n=new MessageChannel;return n.port1.onmessage=c,function(){n.port2.postMessage(0)}}function ft(){return function(){setTimeout(c,1)}}function c(){for(var t,i,n=0;n=0?(n=n.substring(t+5,n.length),n<"14.14393"?!0:!1):!1}function i(){return typeof window=="undefined"&&typeof Promise=="function"?Promise:typeof window!="undefined"&&window.Promise?t()?n.PromiseImpl.Init():window.Promise:n.PromiseImpl.Init()}n.OfficePromise=i()}(t=n._Internal||(n._Internal={}));i=t.OfficePromise;n.Promise=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this._autoCleanupList={};this.m_context=n}return t.prototype.add=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._addCommon(n,!0)}):this._addCommon(n,!0)},t.prototype._autoAdd=function(n){this._addCommon(n,!1);this._autoCleanupList[n._objectPath.objectPathInfo.Id]=n},t.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(t,i){var r=this.m_context._autoCleanup&&!t[n.Constants.isTracked]&&t!==this.m_context._rootObject&&i&&!n.Utility.isNullOrEmptyString(i[n.Constants.referenceId]);r&&(this._autoCleanupList[t._objectPath.objectPathInfo.Id]=t,t[n.Constants.isTracked]=!0)},t.prototype._addCommon=function(t,i){if(t[n.Constants.isTracked]){i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id];return}var r=t[n.Constants.referenceId];n.Utility.isNullOrEmptyString(r)&&t._KeepReference&&(t._KeepReference(),n.ActionFactory.createInstantiateAction(this.m_context,t),i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id],t[n.Constants.isTracked]=!0)},t.prototype.remove=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._removeCommon(n)}):this._removeCommon(n)},t.prototype._removeCommon=function(t){var r=t[n.Constants.referenceId],i;n.Utility.isNullOrEmptyString(r)||(i=this.m_context._rootObject,i._RemoveReference&&i._RemoveReference(r),delete t[n.Constants.isTracked])},t.prototype._retrieveAndClearAutoCleanupList=function(){var n=this._autoCleanupList;return this._autoCleanupList={},n},t}();n.TrackedObjects=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.cannotRegisterEvent="CannotRegisterEvent",n.connectionFailureWithStatus="ConnectionFailureWithStatus",n.connectionFailureWithDetails="ConnectionFailureWithDetails",n.invalidObjectPath="InvalidObjectPath",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.invalidArgumentGeneric="InvalidArgumentGeneric",n.propertyNotLoaded="PropertyNotLoaded",n.runMustReturnPromise="RunMustReturnPromise",n.timeout="Timeout",n.propertyDoesNotExist="PropertyDoesNotExist",n.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",n.moreInfoInnerError="MoreInfoInnerError",n.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",n.valueNotLoaded="ValueNotLoaded",n.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage",n}();n.ResourceStrings=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.CannotRegisterEvent="The event handler cannot be registered.",n.ConnectionFailureWithStatus="The request failed with status code of {0}.",n.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}",n.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",n.InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',n.InvalidRequestContext="Cannot use the object across different request contexts.",n.PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",n.RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',n.Timeout="The operation has timed out.",n.ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.',n.invalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.",n}();n.ResourceStringValues=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.buildMessageArrayForIRequestExecutor=function(i,r,u,f){var o=JSON.stringify(u.Body),e;return n.Utility.log("Request:"),n.Utility.log(o),e={},e[n.Constants.sourceLibHeader]=f,t.buildRequestMessageSafeArray(i,r,"POST","ProcessQuery",e,o)},t.buildResponseOnSuccess=function(n,t){var i={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return i.Body=JSON.parse(n),i.Headers=t,i},t.buildResponseOnError=function(i,r){var u={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return u.ErrorCode=n.ErrorCodes.generalException,u.ErrorMessage=r,i==t.OfficeJsErrorCode_ooeNoCapability?u.ErrorCode=n.ErrorCodes.accessDenied:i==t.OfficeJsErrorCode_ooeActivityLimitReached?u.ErrorCode=n.ErrorCodes.activityLimitReached:i==t.OfficeJsErrorCode_ooeInvalidOrTimedOutSession&&(u.ErrorCode=n.ErrorCodes.invalidOrTimedOutSession,u.ErrorMessage=n.Utility._getResourceString(n.ResourceStrings.invalidOrTimedOutSessionMessage)),u},t.buildHttpResponseFromOfficeJsError=function(i,r){var f=500,u={};return u.error={},u.error.code=n.ErrorCodes.generalException,u.error.message=r,i===t.OfficeJsErrorCode_ooeNoCapability?(f=403,u.error.code=n.ErrorCodes.accessDenied):i===t.OfficeJsErrorCode_ooeActivityLimitReached&&(f=429,u.error.code=n.ErrorCodes.activityLimitReached),{statusCode:f,headers:{},body:JSON.stringify(u)}},t.buildRequestMessageSafeArray=function(n,t,i,r,u,f){var e=[],o;if(u)for(o in u)e.push(o),e.push(u[o]);var s=0,h="",c="",l="";return[n,i,r,e,f,s,t,h,c,l]},t.getResponseBody=function(n){return t.getResponseBodyFromSafeArray(n.value.data)},t.getResponseHeaders=function(n){return t.getResponseHeadersFromSafeArray(n.value.data)},t.getResponseBodyFromSafeArray=function(n){var t=n[2],i;return typeof t=="string"?t:(i=t,i.join(""))},t.getResponseHeadersFromSafeArray=function(n){var i=n[1],r,t;if(!i)return null;for(r={},t=0;t0&&f.push(i);return f},t.throwError=function(i,r,u){throw new n._Internal.RuntimeError({code:i,message:t._getResourceString(i,r),debugInfo:u?{errorLocation:u}:undefined});},t.createRuntimeError=function(t,i,r){return new n._Internal.RuntimeError({code:t,message:i,debugInfo:{errorLocation:r}})},t._getResourceString=function(i,r){var u,e,f,o;return typeof window!="undefined"&&window.Strings&&window.Strings.OfficeOM&&(e="L_"+i,f=window.Strings.OfficeOM[e],f&&(u=f)),u||(u=n.ResourceStringValues[i]),u||(u=i),t.isNullOrUndefined(r)||(Array.isArray(r)?(o=r,u=t._formatString(u,o)):u=u.replace("{0}",r)),u},t._formatString=function(t,i){return t.replace(/\{\d\}/g,function(t){var r=parseInt(t.substr(1,t.length-2));if(r0?".":"")+i;break;case 3:i=t.normalizeName(n.objectPathInfo.Name)+"()"+(i.length>0?".":"")+i;break;case 4:i=t.normalizeName(n.objectPathInfo.Name)+(i.length>0?".":"")+i;break;case 5:i="getItem()"+(i.length>0?".":"")+i;break;case 6:i="_reference()"+(i.length>0?".":"")+i;break}n=n.parentObjectPath}return i},t._createPromiseFromResult=function(t){return new n._Internal.OfficePromise(function(n,i){n(t)})},t._createTimeoutPromise=function(t){return new n._Internal.OfficePromise(function(n,i){setTimeout(function(){n(null)},t)})},t.promisify=function(t){return new n._Internal.OfficePromise(function(n,i){var r=function(t){t.status=="failed"?i(t.error):n(t.value)};t(r)})},t._addActionResultHandler=function(n,t,i){n.context._pendingRequest.addActionResultHandler(t,i)},t._handleNavigationPropertyResults=function(n,i,r){for(var u=0;u0},t._getLocalDocumentUrlPrefixLength=function(n){for(var i=["http://document.localhost","https://document.localhost","//document.localhost"],r=n.toLowerCase().trim(),t=0;t0))for(s=i.url.substr(f+1),e=s.split("&"),u=0;u0&&(f=i.substr(0,u),e=i.substr(u+1),f=t.trim(f),e=t.trim(e),s[f.toUpperCase()]=e));return s},t._parseErrorResponse=function(i){var r=null,f,e,u;if(!t.isNullOrEmptyString(i.body)){f=t.trim(i.body);try{r=JSON.parse(f)}catch(o){t.log("Error when parse "+f)}}return!t.isNullOrUndefined(r)&&typeof r=="object"&&r.error?(u=r.error.code,e=t._getResourceString(n.ResourceStrings.connectionFailureWithDetails,[i.statusCode.toString(),r.error.code,r.error.message])):e=t._getResourceString(n.ResourceStrings.connectionFailureWithStatus,i.statusCode.toString()),t.isNullOrEmptyString(u)&&(u=n.ErrorCodes.connectionFailure),{errorCode:u,errorMessage:e}},t._copyHeaders=function(n,t){if(n&&t)for(var i in n)t[i]=n[i]},t._logEnabled=!1,t._synchronousCleanup=!1,t.s_underscoreCharCode="_".charCodeAt(0),t}();n.Utility=t}(OfficeExtension||(OfficeExtension={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var e=OfficeExtension.ObjectPathFactory.createPropertyObjectPath,f=OfficeExtension.ObjectPathFactory.createMethodObjectPath,l=OfficeExtension.ObjectPathFactory.createIndexerObjectPath,yi=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath,pi=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer,wi=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt,a=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt,u=OfficeExtension.ActionFactory.createMethodAction,v=OfficeExtension.ActionFactory.createSetPropertyAction,r=OfficeExtension.Utility.isNullOrUndefined,t=OfficeExtension.Utility.isUndefined,i=OfficeExtension.Utility.throwIfNotLoaded,o=OfficeExtension.Utility.load,s=OfficeExtension.Utility.fixObjectPathIfNecessary,c=OfficeExtension.Utility._addActionResultHandler,h=OfficeExtension.Utility._handleNavigationPropertyResults,bi=OfficeExtension.Utility.adjustToDateTime,ui=function(l){function a(){l.apply(this,arguments)}return __extends(a,l),Object.defineProperty(a.prototype,"_className",{get:function(){return"Application"},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"notebooks",{get:function(){return this.m_notebooks||(this.m_notebooks=new n.NotebookCollection(this.context,e(this.context,this,"Notebooks",!0,!1))),this.m_notebooks},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"_platform",{get:function(){return i("_platform",this.m__platform,"Application",this._isNull),this.m__platform},enumerable:!0,configurable:!0}),a.prototype.getActiveNotebook=function(){return new n.Notebook(this.context,f(this.context,this,"GetActiveNotebook",1,[],!1,!1,null))},a.prototype.getActiveNotebookOrNull=function(){return new n.Notebook(this.context,f(this.context,this,"GetActiveNotebookOrNull",1,[],!1,!1,null))},a.prototype.getActiveOutline=function(){return new n.Outline(this.context,f(this.context,this,"GetActiveOutline",1,[],!1,!1,null))},a.prototype.getActiveOutlineOrNull=function(){return new n.Outline(this.context,f(this.context,this,"GetActiveOutlineOrNull",1,[],!1,!1,null))},a.prototype.getActivePage=function(){return new n.Page(this.context,f(this.context,this,"GetActivePage",1,[],!1,!1,null))},a.prototype.getActivePageOrNull=function(){return new n.Page(this.context,f(this.context,this,"GetActivePageOrNull",1,[],!1,!1,null))},a.prototype.getActiveParagraph=function(){return new n.Paragraph(this.context,f(this.context,this,"GetActiveParagraph",1,[],!1,!1,null))},a.prototype.getActiveParagraphOrNull=function(){return new n.Paragraph(this.context,f(this.context,this,"GetActiveParagraphOrNull",1,[],!1,!1,null))},a.prototype.getActiveSection=function(){return new n.Section(this.context,f(this.context,this,"GetActiveSection",1,[],!1,!1,null))},a.prototype.getActiveSectionOrNull=function(){return new n.Section(this.context,f(this.context,this,"GetActiveSectionOrNull",1,[],!1,!1,null))},a.prototype.navigateToPage=function(n){u(this.context,this,"NavigateToPage",1,[n])},a.prototype.navigateToPageWithClientUrl=function(t){return new n.Page(this.context,f(this.context,this,"NavigateToPageWithClientUrl",1,[t],!1,!1,null))},a.prototype._GetAccountInfo=function(){var t=u(this.context,this,"_GetAccountInfo",1,[]),n=new OfficeExtension.ClientResult;return c(this,t,n),n},a.prototype._GetObjectByReferenceId=function(n){var i=u(this.context,this,"_GetObjectByReferenceId",1,[n]),t=new OfficeExtension.ClientResult;return c(this,i,t),t},a.prototype._GetObjectTypeNameByReferenceId=function(n){var i=u(this.context,this,"_GetObjectTypeNameByReferenceId",1,[n]),t=new OfficeExtension.ClientResult;return c(this,i,t),t},a.prototype._GetServiceTokenByUrl=function(n){var i=u(this.context,this,"_GetServiceTokenByUrl",1,[n]),t=new OfficeExtension.ClientResult;return c(this,i,t),t},a.prototype._GetServiceTokens=function(n){var i=u(this.context,this,"_GetServiceTokens",1,[n]),t=new OfficeExtension.ClientResult;return c(this,i,t),t},a.prototype._GetServiceTokensExt=function(n,t){var r=u(this.context,this,"_GetServiceTokensExt",1,[n,t]),i=new OfficeExtension.ClientResult;return c(this,r,i),i},a.prototype._GetServiceUrl=function(n){var i=u(this.context,this,"_GetServiceUrl",1,[n]),t=new OfficeExtension.ClientResult;return c(this,i,t),t},a.prototype._RemoveAllReferences=function(){u(this.context,this,"_RemoveAllReferences",1,[])},a.prototype._RemoveReference=function(n){u(this.context,this,"_RemoveReference",1,[n])},a.prototype._SendDataToLearningTools=function(n){var i=u(this.context,this,"_SendDataToLearningTools",0,[n]),t=new OfficeExtension.ClientResult;return c(this,i,t),t},a.prototype._handleResult=function(n){if(l.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i._platform)||(this.m__platform=i._platform);h(this,i,["notebooks","Notebooks"])}},a.prototype.load=function(n){return o(this,n),this},a.prototype.toJSON=function(){return{}},a}(OfficeExtension.ClientObject),y,p,w,b,k,d,g,nt,tt,it,rt,ut,ft,et,ot,st,ht,ct,lt,at,vt,yt,pt,wt,bt,kt,dt,gt,ni,ti,ii,ri,fi,ei,oi,si,hi,ci,li,ai,vi;n.Application=ui;y=function(f){function c(){f.apply(this,arguments)}return __extends(c,f),Object.defineProperty(c.prototype,"_className",{get:function(){return"InkAnalysis"},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"page",{get:function(){return this.m_page||(this.m_page=new n.Page(this.context,e(this.context,this,"Page",!1,!1))),this.m_page},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"paragraphs",{get:function(){return this.m_paragraphs||(this.m_paragraphs=new n.InkAnalysisParagraphCollection(this.context,e(this.context,this,"Paragraphs",!0,!1))),this.m_paragraphs},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"id",{get:function(){return i("id",this.m_id,"InkAnalysis",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"InkAnalysis",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),c.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",1,[])},c.prototype._handleResult=function(n){if(f.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i.Id)||(this.m_id=i.Id);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);h(this,i,["page","Page","paragraphs","Paragraphs"])}},c.prototype.load=function(n){return o(this,n),this},c.prototype._handleIdResult=function(n){(f.prototype._handleIdResult.call(this,n),r(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},c.prototype.track=function(){return this.context.trackedObjects.add(this),this},c.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},c.prototype.toJSON=function(){return{id:this.m_id}},c}(OfficeExtension.ClientObject);n.InkAnalysis=y;p=function(f){function c(){f.apply(this,arguments)}return __extends(c,f),Object.defineProperty(c.prototype,"_className",{get:function(){return"InkAnalysisParagraph"},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"inkAnalysis",{get:function(){return this.m_inkAnalysis||(this.m_inkAnalysis=new n.InkAnalysis(this.context,e(this.context,this,"InkAnalysis",!1,!1))),this.m_inkAnalysis},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"lines",{get:function(){return this.m_lines||(this.m_lines=new n.InkAnalysisLineCollection(this.context,e(this.context,this,"Lines",!0,!1))),this.m_lines},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"id",{get:function(){return i("id",this.m_id,"InkAnalysisParagraph",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"InkAnalysisParagraph",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),c.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",1,[])},c.prototype._handleResult=function(n){if(f.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i.Id)||(this.m_id=i.Id);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);h(this,i,["inkAnalysis","InkAnalysis","lines","Lines"])}},c.prototype.load=function(n){return o(this,n),this},c.prototype._handleIdResult=function(n){(f.prototype._handleIdResult.call(this,n),r(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},c.prototype.track=function(){return this.context.trackedObjects.add(this),this},c.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},c.prototype.toJSON=function(){return{id:this.m_id}},c}(OfficeExtension.ClientObject);n.InkAnalysisParagraph=p;w=function(e){function h(){e.apply(this,arguments)}return __extends(h,e),Object.defineProperty(h.prototype,"_className",{get:function(){return"InkAnalysisParagraphCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,"InkAnalysisParagraphCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"count",{get:function(){return i("count",this.m_count,"InkAnalysisParagraphCollection",this._isNull),this.m_count},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"InkAnalysisParagraphCollection",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),h.prototype.getItem=function(t){return new n.InkAnalysisParagraph(this.context,l(this.context,this,[t]))},h.prototype.getItemAt=function(t){return new n.InkAnalysisParagraph(this.context,f(this.context,this,"GetItemAt",1,[t],!1,!1,null))},h.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",1,[])},h.prototype._handleResult=function(i){var u,o,f,h;if((e.prototype._handleResult.call(this,i),!r(i))&&(u=i,s(this,u),t(u.Count)||(this.m_count=u.Count),t(u._ReferenceId)||(this.m__ReferenceId=u._ReferenceId),!r(u[OfficeExtension.Constants.items])))for(this.m__items=[],o=u[OfficeExtension.Constants.items],f=0;f0?i.push(t):t.tabIndex===0&&r.push(t):r.push(t);return i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;return r===0&&(r=i.indexOf(n)-i.indexOf(t)),r}),[].concat(i,r)}var o="focus",s="on",k="configurable",d="writable",h="enumerable",u="",c="undefined",t=!1,i=!0,l=2147483647,n=null,r=-1,a=r,g="&_xdm_Info=",nt="&_serializer_version=",tt="_xdm_",ft="_serializer_version=",v="#",it="&",f="class",y={},et=3e4,p=n,w=n,e=(new Date).getTime();return{set_entropy:function(n){var t,r,i;if(typeof n=="string")for(t=0;t6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(r)===OSF.DDA.SettingsManager.DataJSONSuffix&&(i=new Date(parseInt(t.slice(5,r))),i)?i:t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,i);f[u]=t}catch(e){}}return f},loadScript:function(r,u,f){var s,e,o,h,c;r&&u&&(s=window.document,e=y[r],e?e.loaded?u():e.pendingCallbacks.push(u):(o=s.createElement("script"),o.type="text/javascript",e={loaded:t,pendingCallbacks:[u],timer:n},y[r]=e,h=function(){var r,t,u;for(e.timer!=n&&(clearTimeout(e.timer),delete e.timer),e.loaded=i,r=e.pendingCallbacks.length,t=0;t1?l[l.length-1]:n,s,h,c,a;return u&&o!=n&&(o.indexOf(it)>=0&&(o=o.split(it)[0]),o=decodeURIComponent(o)),s=b(),!f&&s&&(h=window.name.indexOf(i),h>r&&(c=window.name.indexOf(";",h),c==r&&(c=window.name.length),a=window.name.substring(h,c),o?s.setItem(a,o):o=s.getItem(a))),o},getConversationId:function(){var i=window.location.search,t=n,r;return i&&(r=i.indexOf("&"),t=r>0?i.substring(1,r):i.substr(1),t&&t.charAt(t.length-1)==="="&&(t=t.substring(0,t.length-1),t&&(t=decodeURIComponent(t)))),t},getInfoItems:function(n){var t=n.split("$");return typeof t[1]==c&&(t=n.split("|")),typeof t[1]==c&&(t=n.split("%7C")),t},getXdmFieldValue:function(n,t){var r=u,f=OSF.OUtil.parseXdmInfo(t),i;if(f&&(i=OSF.OUtil.getInfoItems(f),i!=undefined&&i.length>=3))switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]),f;if(u)throw u;for(f in r)if(u=Function._validateParameter(n[f],r[f],f),u)throw u;},writeProfilerMark:function(n){window.msWriteProfilerMark&&(window.msWriteProfilerMark(n),OsfMsAjaxFactory.msAjaxDebug.trace(n))},outputDebug:function(n){typeof OsfMsAjaxFactory!==c&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){var e,f;r=r||{};for(e in u)f=u[e],r[f]==undefined&&(r[f]=i);return Object.defineProperty(n,t,r),n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[h])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[h])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[d,h,k])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[d,h,k])},finalizeProperties:function(n,r){var e,u;r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8,e=o&255,i[t++]=r>>2,i[t++]=(r&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63,isNaN(o)||(r=o>>8,f=h&255,e=h>>8,i[t++]=r>>2,i[t++]=(r&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63),isNaN(o)?i[t-1]=64:isNaN(h)&&(i[t-2]=64,i[t-1]=64),c=0;c0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){var u,i,f,r;if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(u=[],i=0;in)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=ut(u),e=f?u.length-1:0,u.length===0)return n;while(!h&&e>=0&&en)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=ut(u),l=y(u,f),s=v(u.length,l,e),s<0)return n;while(!c&&s>=0&&s0;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[r%16],r=Math.floor(r/16);for(;t<32;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[Math.floor(Math.random()*16)];return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3};OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",Reserved:"reserved",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidOpenBrowserWindow:102,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];return i?(i.name||(i.name=n[this.errorCodes.ooeInternalError].name),i.message||(i.message=n[this.errorCodes.ooeInternalError].message)):i=n[this.errorCodes.ooeInternalError],i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:t.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:t.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:t.L_SSOConnectionLostError,message:t.L_SSOConnectionLostErrorMessage}}}}(),function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}(),r,i,h,u,c,l,f,a,e,v,y,p,w,b,o,k,d,g,s,nt,tt,it,rt;n.RequirementVersion=ut;r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){var f,u,e,i,r;if(n==undefined)return!1;if(t==undefined&&(t=0),f=this._setMap,u=f._sets,u.hasOwnProperty(n.toLowerCase())){e=u[n.toLowerCase()];try{if((i=this._getVersion(e),t=t+"",r=this._getVersion(t),i.major>0&&i.major>r.major)||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),i=0,r=0;if(t.length<2&&isNaN(Number(n)))throw u;else if(i=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(i)||isNaN(r))throw u;return{minor:r,major:i}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;h=function(n){function i(){n.call(this,{dialogapi:t})}return __extends(i,n),i}(i);n.DefaultDialogSetRequirement=h;u=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelClientDefaultSetRequirement=u;c=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(u);n.ExcelClientV1DefaultSetRequirement=c;l=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookClientDefaultSetRequirement=l;f=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return __extends(i,n),i}(i);n.WordClientDefaultSetRequirement=f;a=function(n){function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return __extends(i,n),i}(f);n.WordClientV1DefaultSetRequirement=a;e=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointClientDefaultSetRequirement=e;v=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(e);n.PowerpointClientV1DefaultSetRequirement=v;y=function(n){function i(){n.call(this,{selection:t,textcoercion:t})}return __extends(i,n),i}(i);n.ProjectClientDefaultSetRequirement=y;p=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return __extends(i,n),i}(i);n.ExcelWebDefaultSetRequirement=p;w=function(n){function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordWebDefaultSetRequirement=w;b=function(n){function i(){n.call(this,{activeview:t,settings:t})}return __extends(i,n),i}(i);n.PowerpointWebDefaultSetRequirement=b;o=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookWebDefaultSetRequirement=o;k=function(n){function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.SwayWebDefaultSetRequirement=k;d=function(n){function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return __extends(i,n),i}(i);n.AccessWebDefaultSetRequirement=d;g=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelIOSDefaultSetRequirement=g;s=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordIOSDefaultSetRequirement=s;nt=function(n){function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return __extends(t,n),t}(s);n.WordIOSV1DefaultSetRequirement=nt;tt=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointIOSDefaultSetRequirement=tt;it=function(n){function i(){n.call(this,{mailbox:t})}return __extends(i,n),i}(i);n.OutlookIOSDefaultSetRequirement=it;rt=function(){function n(){}var t="undefined";return n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},n.getDefaultRequirementMatrix=function(u){var f,e,s,o;return this.initializeDefaultSetMatrix(),f=undefined,e=u.get_requirementMatrix(),e!=undefined&&e.length>0&&typeof JSON!==t?(s=JSON.parse(u.get_requirementMatrix().toLowerCase()),f=new r(new i(s))):(o=n.getClientFullVersionString(u),f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[o]!=undefined?new r(n.DefaultSetArrayMatrix[o]):new r(new i({}))),f},n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix(),e;return f!=undefined&&f.length>0&&typeof JSON!==t?(e=JSON.parse(n.get_requirementMatrix().toLowerCase()),u=new r(new i(e))):u=new r(new h),u},n.getClientFullVersionString=function(n){var i=n.get_appMinorVersion(),u="",r="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;return f&&n.get_appVersion()==1?r=t==4096&&i>=15?"16.00.01":"16.00":n.get_appName()==64?r=n.get_appVersion():(u=i<10?"0"+i:""+i,r=n.get_appVersion()+"."+u),n.get_appName()+"-"+r},n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new c;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new v;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new l;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new w;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new b;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new g;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new k;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new nt;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new tt;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new it},n.Excel_RCLIENT_1600="1-16.00",n.Excel_RCLIENT_1601="1-16.01",n.Word_RCLIENT_1600="2-16.00",n.Word_RCLIENT_1601="2-16.01",n.PowerPoint_RCLIENT_1600="4-16.00",n.PowerPoint_RCLIENT_1601="4-16.01",n.Outlook_RCLIENT_1600="8-16.00",n.Excel_WAC_1600="16-16.00",n.Word_WAC_1600="32-16.00",n.Outlook_WAC_1600="64-16.00",n.Outlook_WAC_1601="64-16.01",n.Project_RCLIENT_1600="128-16.00",n.Access_WAC_1600="256-16.00",n.PowerPoint_WAC_1600="512-16.00",n.Excel_IOS_1600="1024-16.00",n.SWAY_WAC_1600="2048-16.00",n.Word_IOS_1600="4096-16.00",n.Word_IOS_16001="4096-16.00.01",n.PowerPoint_IOS_1600="8192-16.00",n.Outlook_IOS_1600="65536-16.00",n.DefaultSetArrayMatrix={},n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))}(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}return n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n},n.getInstance=function(){return n.hostObj===undefined&&(n.hostObj=new n),n.hostObj},n.prototype.getPlatform=function(){var n=this,t;return n.hostInfo.hostPlatform&&(t=n.hostInfo.hostPlatform.toLowerCase(),n.platformRemappings[t])?n.platformRemappings[t]:null},n.prototype.getHost=function(){var n=this,t;if(n.hostInfo.hostType){if(t=n.hostInfo.hostType.toLowerCase(),n.camelCaseMappings[t])return n.camelCaseMappings[t];if(t=n.capitalizeFirstLetter(n.hostInfo.hostType),Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null},n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null},n}();n.Host=t})(t=n.HostName||(n.HostName={}))}(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){n||(window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,n=!0)},disableShortcut:function(){n&&(t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window),n=!1)}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i,r,o,u,f,e;if(n&&typeof n=="string"&&(r=n.indexOf("#"),r!=-1)){o=n.substring(0,r);u=n.substring(r+1);switch(o){case"binding":case"bindings":u&&(i=new OSF.DDA.BindingPromise(u))}}if(i)return i.onFail=t,i;else if(t)if(f=typeof t,f=="function")e={},e[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(e,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext));else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f);};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this,s,e;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.auth&&OSF.OUtil.defineEnumerableProperty(f,"auth",{value:n.auth});n.get_isDialog()?(e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e})):(t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t}),r&&(s=r.displayName||"appOM",delete r.displayName,OSF.OUtil.defineEnumerableProperty(f,s,{value:r})),u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}}),e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e}))};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this,u;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;return OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext()),n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,e=n.length,o=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){var u,i,r;for(u in n){if(i=n[u],r=t[u],i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw o();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw o();}};f.extractRequiredArguments=function(t,i,r){var f,u,h,s,c,l;if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(c=n.length-1;c>=s;c--){l=n[c];switch(typeof l){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=l;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}if(f=o.fillOptions(f,i,r,u),e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;return o.verifyArguments(t,f),f}var h="function",s=n.length,o=new OSF.DDA.ApiMethodCall(n,t,i,f,e);this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),u=c(n,r,t,i);return o.constructCallArgs(r,u,t,i)};this.processResponse=function(n,t,i,f){return n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n)};this.getCallArgs=function(n){for(var t,u,r,i=n.length-1;i>=s;i--){r=n[i];switch(typeof r){case"object":t=r;break;case h:u=r}}return t=t||{},u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u),t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],i=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],t,i,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback],u,r;f&&(u={},u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?u[OSF.DDA.AsyncResultEnum.Properties.Value]=i:(r={},i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i),f(new OSF.DDA.AsyncResult(u,r)))};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.SyncMethodNames[t]=i};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){function o(n,i,r,u){var o,c,s,h;if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(s=n.length-1;s>=e;s--){h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}return o=f.fillOptions(o,i,r,u),f.verifyArguments(t,o),o}var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),u=o(n,r,t,i);return f.constructCallArgs(r,u,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){function e(i,f){var a=i?{}:undefined,s,h,o,v,c,l;for(s in i){if(h=i[s],OSF.DDA.ListType.isListType(s)){o=[];for(v in h)o.push(e(h[v],f))}else OSF.OUtil.listContainsKey(r,s)?o=r[s][f](h):f==u&&n.preserveNesting(s)?o=e(h,f):(c=t[s],c?(l=c[f],l&&(o=l[h],o===undefined&&(o=h))):o=h);a[s]=o}return a}function l(i,r){var e,u,h,s;for(u in r)h=n.isComplexType(u)?l(i,t[u][o]):i[u],h!=undefined&&(e||(e={}),s=r[u],s==f&&(s=u),e[s]=n.pack(u,h));return e}function s(i,r,e){var o,a,h,l,p,v,y;e||(e={});for(o in r){if(a=r[o],a==f)h=i;else if(a==c){e[o]=i.toArray();continue}else h=i[a];if(h===null||h===undefined)e[o]=undefined;else if(h=n.unpack(o,h),n.isComplexType(o))l=t[o][u],n.preserveNesting(o)?e[o]=s(h,l):s(h,l,e);else if(OSF.DDA.ListType.isListType(o)){l={};p=OSF.DDA.ListType.getDescriptor(o);l[p]=f;v=new Array(h.length);for(y in h)v[y]=s(h[y],l);e[o]=v}else e[o]=h}return e}function a(n,i,r){var f=t[n][r],u,o,c;return r=="toHost"?(o=e(i,r),u=l(o,f)):r==h&&(c=s(i,f),u=e(c,r)),u}var h="fromHost",i=this,o="toHost",u=h,c="sourceData",f="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];t||(t={});i.addMapping=function(n,i){var e,h,c,l,r,s,a,v;if(i.map){e=i.map;h={};for(c in e)l=e[c],l==f&&(l=c),h[l]=c}else e=i.toHost,h=i.fromHost;if(r=t[n],r){s=r[o];for(a in s)e[a]=s[a];s=r[u];for(v in s)h[v]=s[v]}else r=t[n]={};r[o]=e;r[u]=h};i.toHost=function(n,t){return a(n,t,o)};i.fromHost=function(n,t){return a(n,t,u)};i.self=f;i.sourceData=c;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){return this.isDynamicType(n)?t[n].toHost(i):i};i.unpack=function(n,i){return this.isDynamicType(n)?t[n].fromHost(i):i}};OSF.DDA.getDecoratedParameterMap=function(n,t){function r(n){var i=null,r,t;if(n)for(i={},r=n.length,t=0;t0){for(r=[],i=0;i=s)break;if(f=Function._validateParameter(n[e],o,h),f)return f.popStackFrame(),f}return t}),Function._validateParameterCount||(Function._validateParameterCount=function(n,r,u){var f,s,e=r.length,h=n.length,c,l,a;if(he)for(s=i,f=0;f0&&t.push(u)}}catch(s){}return t}var i=[],t={};t[Microsoft.Office.WebExtension.Parameters.Data]=function(){var t=0,i=1;return{toHost:function(n){if(OSF.DDA.TableDataProperties&&typeof n!="string"&&n[OSF.DDA.TableDataProperties.TableRows]!==undefined){var r=[];r[t]=n[OSF.DDA.TableDataProperties.TableRows];r[i]=n[OSF.DDA.TableDataProperties.TableHeaders];n=r}return n},fromHost:function(r){var f,e,u;return r.toArray?(e=r.dimensions(),e===2?f=n(r):(u=r.toArray(),u.length===2&&(u[0]!=null&&u[0].toArray||u[1]!=null&&u[1].toArray)?(f={},f[OSF.DDA.TableDataProperties.TableRows]=n(u[t]),f[OSF.DDA.TableDataProperties.TableHeaders]=n(u[i])):f=u)):f=r,f}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,i,t);this.unpack=function(n,i){var r,u;return this.isComplexType(n)||OSF.DDA.ListType.isListType(n)?(u=(i||typeof i=="unknown")&&i.toArray,r=u?i.toArray():i||{}):r=this.isDynamicType(n)?t[n].fromHost(i):i,r}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(n){function t(n){var i=n,f,r,u;if(OSF.OUtil.isArray(n))for(f=i.length,r=0;r2)for(r=[],f=1;f=2&&(u=t[0],i=t[1]),r?r(new n.WebViewSafeArray(i)):void 0};this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.Execute,f,e)},t.prototype.registerEvent=function(t,i,r,u){var f=function(t){var i=t,u=0;OSF.OUtil.isArray(t)&&t.length>=2&&(u=t[0],i=t[1]);r&&r(u,new n.WebViewSafeArray(i))},e=function(t){if(u)return u(new n.WebViewSafeArray(t))};this.hostScriptProxy.registerEvent(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.RegisterEvent,t,i,f,e)},t.prototype.unregisterEvent=function(t,i,r){var u=function(t){return r(new n.WebViewSafeArray(t))};this.hostScriptProxy.unregisterEvent(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.UnregisterEvent,t,i,u)},t.prototype.messageParent=function(n){var t=n[Microsoft.Office.WebExtension.Parameters.MessageToParent];!isNaN(parseFloat(t))&&isFinite(t)&&(t=t.toString());this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.MessageParent,t,null)},t.prototype.openDialog=function(n,t,i,r){var u=JSON.parse(t);(isNaN(u.width)||u.width<=0||!u.useDeviceIndependentPixels&&u.width>100)&&(u.width=99);(isNaN(u.height)||u.height<=0||!u.useDeviceIndependentPixels&&u.height>100)&&(u.height=99);t=JSON.stringify(u);this.registerEvent(n,t,i,r)},t.prototype.closeDialog=function(n,t,i){this.unregisterEvent(n,t,i)},t.prototype.sendMessage=function(n){var t=n[Microsoft.Office.WebExtension.Parameters.MessageContent];!isNaN(parseFloat(t))&&isFinite(t)&&(t=t.toString());this.hostScriptProxy.invokeMethod(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.SendMessage,t,null)},t}();n.WebViewHostController=t}(OSFWebView||(OSFWebView={})),function(n){(function(n){var t="EventCallback",i="MethodCallback";n[n[i]=0]=i;n[n[t]=1]=t})(n.CallbackType||(n.CallbackType={}));var i=n.CallbackType,t=function(){function n(n,t,i){this.callbackType=n;this.callbackId=t;this.params=i}return n}();n.CallbackData=t}(CrossIFrameCommon||(CrossIFrameCommon={})),function(n){var t=function(){function n(){window.addEventListener("message",this.OnReceiveMessage)}return n.prototype.postMessage=function(n,t){window.parent.postMessage(t,"*")},n.prototype.OnReceiveMessage=function(n){if(n.source==window.parent&&window.parent==window.top&&n.origin.startsWith("ms-appx-web://")){var t;try{t=JSON.parse(n.data)}catch(i){return}switch(t.callbackType){case CrossIFrameCommon.CallbackType.MethodCallback:OSFWebView.ScriptMessaging.agaveHostCallback(t.callbackId,JSON.parse(t.params));break;case CrossIFrameCommon.CallbackType.EventCallback:OSFWebView.ScriptMessaging.agaveHostEventCallback(t.callbackId,JSON.parse(t.params))}}},n}();n.Poster=t}(WinRT||(WinRT={}));OSF.DDA.ClientSettingsManager={getSettingsExecuteMethod:function(n){return function(t){var i,r,u=function(n,i){t.onReceiving&&t.onReceiving();t.onComplete&&t.onComplete(n,i)};try{n(t.hostCallArgs,t.onCalling,u)}catch(f){i=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;r={name:Strings.OfficeOM.L_InternalError,message:f};u(i,r)}}},read:function(n,t){var u=[],f=[],i,r;n&&n();i=OSF._OfficeAppFactory.getInitializationHelper();r=function(n){t&&t(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,n.get_settings())};i.getAppContext(null,r)},write:function(n,t,i,r){var u={},e=[],o=[],f,s;for(f in n)e.push(f),o.push(n[f]);u.keys=e;u.values=o;i&&i();s=function(n){r&&r(n[0],null)};OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.WebView.MessageHandlerName,OSF.WebView.MethodId.WriteSettings,u,s)}};OSF.InitializationHelper.prototype.initializeSettings=function(n,t){var i=n.get_settings();return this.deserializeSettings(i,t)};OSF.InitializationHelper.prototype.getAppContext=function(n,t){var r=function(n){var f,i=OSF.WebView.AppContextProperties,e=n[i.AppType],o=!1;for(var l in OSF.AppName)if(OSF.AppName[l]==e){o=!0;break}if(!o)throw"Unsupported client type "+e;for(var s=n[i.Settings],h={},c=s[0],a=s[1],r=0;r0&&OSF.OUtil.focusToFirstTabbable(n,!1)}}catch(i){OsfMsAjaxFactory.msAjaxDebug.trace("Setting Agave default focus failed. Exception:"+i)}};document.body?n():document.addEventListener("DOMContentLoaded",n);window.addEventListener("blur",function(){try{document.activeElement&&document.activeElement.blur()}catch(n){OsfMsAjaxFactory.msAjaxDebug.trace("Clearing Agave focus failed. Exception:"+n)}})};OSF.WebView=OSFWebView;OSF.ClientHostController=new OSFWebView.WebViewHostController(OSF.ScriptMessaging.GetScriptMessenger("agaveHostCallback","agaveHostEventCallback",new WinRT.Poster)),function(n){var u="ResponseTime",f="Message",i="SessionId",r="CorrelationId",t=!0,e=function(){function n(n){this._table=n;this._fields={}}return Object.defineProperty(n.prototype,"Fields",{get:function(){return this._fields},enumerable:t,configurable:t}),Object.defineProperty(n.prototype,"Table",{get:function(){return this._table},enumerable:t,configurable:t}),n.prototype.SerializeFields=function(){},n.prototype.SetSerializedField=function(n,t){typeof t!="undefined"&&t!==null&&(this._serializedFields[n]=t.toString())},n.prototype.SerializeRow=function(){var n=this;return n._serializedFields={},n.SetSerializedField("Table",n._table),n.SerializeFields(),JSON.stringify(n._serializedFields)},n}(),o,s,h,c,l;n.BaseUsageData=e;o=function(n){function u(){n.call(this,"AppActivated")}var e="IsFromWacAutomation",o="WacHostEnvironment",s="HostJSVersion",h="OfficeJSVersion",c="DocUrl",l="AppSizeHeight",a="AppSizeWidth",v="ClientId",y="HostVersion",p="Host",w="UserId",b="Browser",k="AssetId",d="AppURL",g="AppInstanceId",nt="AppId";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,nt,{get:function(){return this.Fields[nt]},set:function(n){this.Fields[nt]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,g,{get:function(){return this.Fields[g]},set:function(n){this.Fields[g]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,d,{get:function(){return this.Fields[d]},set:function(n){this.Fields[d]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,k,{get:function(){return this.Fields[k]},set:function(n){this.Fields[k]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,b,{get:function(){return this.Fields[b]},set:function(n){this.Fields[b]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,w,{get:function(){return this.Fields[w]},set:function(n){this.Fields[w]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,p,{get:function(){return this.Fields[p]},set:function(n){this.Fields[p]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,y,{get:function(){return this.Fields[y]},set:function(n){this.Fields[y]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,v,{get:function(){return this.Fields[v]},set:function(n){this.Fields[v]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,a,{get:function(){return this.Fields[a]},set:function(n){this.Fields[a]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,l,{get:function(){return this.Fields[l]},set:function(n){this.Fields[l]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,c,{get:function(){return this.Fields[c]},set:function(n){this.Fields[c]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(nt,n.AppId);n.SetSerializedField(g,n.AppInstanceId);n.SetSerializedField(d,n.AppURL);n.SetSerializedField(k,n.AssetId);n.SetSerializedField(b,n.Browser);n.SetSerializedField(w,n.UserId);n.SetSerializedField(p,n.Host);n.SetSerializedField(y,n.HostVersion);n.SetSerializedField(v,n.ClientId);n.SetSerializedField(a,n.AppSizeWidth);n.SetSerializedField(l,n.AppSizeHeight);n.SetSerializedField(f,n.Message);n.SetSerializedField(c,n.DocUrl);n.SetSerializedField(h,n.OfficeJSVersion);n.SetSerializedField(s,n.HostJSVersion);n.SetSerializedField(o,n.WacHostEnvironment);n.SetSerializedField(e,n.IsFromWacAutomation)},u}(e);n.AppActivatedUsageData=o;s=function(n){function f(){n.call(this,"ScriptLoad")}var e="StartTime",o="ScriptId";return __extends(f,n),Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t}),f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(o,n.ScriptId);n.SetSerializedField(e,n.StartTime);n.SetSerializedField(u,n.ResponseTime)},f}(e);n.ScriptLoadUsageData=s;h=function(n){function u(){n.call(this,"AppClosed")}var f="CloseMethod",e="OpenTime",o="AppSizeFinalHeight",s="AppSizeFinalWidth",h="FocusTime";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(h,n.FocusTime);n.SetSerializedField(s,n.AppSizeFinalWidth);n.SetSerializedField(o,n.AppSizeFinalHeight);n.SetSerializedField(e,n.OpenTime);n.SetSerializedField(f,n.CloseMethod)},u}(e);n.AppClosedUsageData=h;c=function(n){function f(){n.call(this,"APIUsage")}var e="ErrorType",o="Parameters",s="APIID",h="APIType";return __extends(f,n),Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(h,n.APIType);n.SetSerializedField(s,n.APIID);n.SetSerializedField(o,n.Parameters);n.SetSerializedField(u,n.ResponseTime);n.SetSerializedField(e,n.ErrorType)},f}(e);n.APIUsageUsageData=c;l=function(n){function u(){n.call(this,"AppInitialization")}var e="SuccessCode";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(e,n.SuccessCode);n.SetSerializedField(f,n.Message)},u}(e);n.AppInitializationUsageData=l}(OSFLog||(OSFLog={})),function(n){"use strict";function u(){OSF.Logger&&OSF.Logger.ulsEndpoint&&OSF.Logger.ulsEndpoint.loadProxyFrame()}function f(n,t,i){if(OSF.Logger&&OSF.Logger.ulsEndpoint){var r={traceLevel:n,message:t,flag:i,internalLog:!0},u=JSON.stringify(r);OSF.Logger.ulsEndpoint.writeLog(u)}}function e(){try{return new t}catch(n){return null}}var i,r,t;(function(n){n[n.info=0]="info";n[n.warning=1]="warning";n[n.error=2]="error"})(n.TraceLevel||(n.TraceLevel={}));i=n.TraceLevel,function(n){n[n.none=0]="none";n[n.flush=1]="flush"}(n.SendFlag||(n.SendFlag={}));r=n.SendFlag;n.allowUploadingData=u;n.sendLog=f;t=function(){function n(){var n=this,t=n;n.proxyFrame=null;n.telemetryEndPoint="https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html";n.buffer=[];n.proxyFrameReady=!1;OSF.OUtil.addEventListener(window,"message",function(n){return t.tellProxyFrameReady(n)});setTimeout(function(){t.loadProxyFrame()},3e3)}return n.prototype.writeLog=function(t){var i=this;i.proxyFrameReady===!0?i.proxyFrame.contentWindow.postMessage(t,n.telemetryOrigin):i.buffer.length<128&&i.buffer.push(t)},n.prototype.loadProxyFrame=function(){var n=this;n.proxyFrame==null&&(n.proxyFrame=document.createElement("iframe"),n.proxyFrame.setAttribute("style","display:none"),n.proxyFrame.setAttribute("src",n.telemetryEndPoint),document.head.appendChild(n.proxyFrame))},n.prototype.tellProxyFrameReady=function(t){var i=this,e=i,r,u,f;if(t.data==="ProxyFrameReadyToLog"){for(i.proxyFrameReady=!0,r=0;r40)&&(n=OSF.OUtil.Guid.generateNewGuid(),t.setValue(t.clientIDKey,n)),n},n.prototype.saveLog=function(n,t){var i=this,u=i.getValue(i.logIdSetKey);u=(u&&u.length>0?u+";":r)+n;i.setValue(i.logIdSetKey,u);i.setValue(n,t)},n.prototype.enumerateLog=function(n,t){var i=this,e=i.getValue(i.logIdSetKey),u,o,r,f;if(e){u=e.split(";");for(o in u)r=u[o],f=i.getValue(r),f&&(n&&n(r,f),t&&i.remove(r));t&&i.remove(i.logIdSetKey)}},n.prototype.getValue=function(n){var t=OSF.OUtil.getLocalStorage(),i=r;return t&&(i=t.getItem(n)),i},n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)},n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}},n}(),o=function(){function t(){}return t.prototype.LogData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(t)}catch(i){}},t.prototype.LogRawData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(t))}catch(i){}},t}();n.initialize=y;n.onAppActivated=p;n.onScriptDone=w;n.onCallDone=b;n.onMethodDone=k;n.onPropertyDone=d;n.onEventDone=g;n.onRegisterDone=nt;n.onAppClosed=tt;n.setOsfControlAppCorrelationId=it;n.doAppInitializationLogging=l;n.logAppCommonMessage=rt;n.logAppException=ut;OSF.AppTelemetry=n}(OSFAppTelemetry||(OSFAppTelemetry={}));OSF.DDA.AsyncMethodNames.addNames({CloseContainerAsync:"closeContainer"}),function(n){var t=function(){function n(){}return n}();n.Container=t}(OfficeExt||(OfficeExt={}));OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseContainerAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidCloseContainerMethod,fromHost:[],toHost:[]});Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(n){var i=this,r,t,u;i._eventHandlers={};i._objectEventHandlers={};i._queuedEventsArgs={};for(r in n)t=n[r],u=t=="objectDeleted"||t=="objectSelectionChanged"||t=="objectDataChanged"||t=="contentControlAdded",u?i._objectEventHandlers[t]={}:i._eventHandlers[t]=[],i._queuedEventsArgs[t]=[]};OSF.EventDispatch.prototype={getSupportedEvents:function(){var n=[];for(var t in this._eventHandlers)n.push(t);for(t in this._objectEventHandlers)n.push(t);return n},supportsEvent:function(n){for(var t in this._eventHandlers)if(n==t)return!0;for(t in this._objectEventHandlers)if(n==t)return!0;return!1},hasEventHandler:function(n,t){var i=this._eventHandlers[n],r;if(i&&i.length>0)for(r in i)if(i[r]===t)return!0;return!1},hasObjectEventHandler:function(n,t,i){var f=this._objectEventHandlers[n],r,u;if(f!=null)for(r=f[t],u=0;r!=null&&u0)for(r=0;r0?(this._eventHandlers[n]=[],!0):!1},clearObjectEventHandlers:function(n,t){return this._objectEventHandlers[n]!=null&&this._objectEventHandlers[n][t]!=null?(this._objectEventHandlers[n][t]=[],!0):!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},getObjectEventHandlerCount:function(n,t){return this._objectEventHandlers[n]==null||this._objectEventHandlers[n][t]==null?0:this._objectEventHandlers[n][t].length},fireEvent:function(n){var t,i,r;if(n.type==undefined)return!1;if(t=n.type,t&&this._eventHandlers[t]){i=this._eventHandlers[t];for(r in i)i[r](n);return!0}else return!1},fireObjectEvent:function(n,t){var i,f,r,u;if(t.type==undefined)return!1;if(i=t.type,i&&this._objectEventHandlers[i]&&(f=this._objectEventHandlers[i],r=f[n],r!=null)){for(u=0;u0)){for(r=t[0];i.length>0;)u=i.shift(),r(u);return!0}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var f="outlook",e="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(n,i[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:r=new OSF.DDA.RichApiMessageEventArgs(n,i);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i),t.initialize(r.initialData),OSF._OfficeAppFactory.getHostInfo().hostPlatform=="win32"&&t.setCurrentItemNumber(r.itemNumber.itemNumber);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkRecipientsChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var i=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),t=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];t(arguments,i,n)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(n){var i=OSF.DDA.SyncMethodNames.MessageParent.displayName,t=this,r;t[i]||OSF.OUtil.defineEnumerableProperty(t,i,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return n(arguments,t)}});r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;t[r]||typeof OSF.DialogParentMessageEventDispatch=="undefined"||OSF.DDA.DispIdHost.addEventSupport(t,OSF.DialogParentMessageEventDispatch,n);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(n){n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:n[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels,value:{types:["boolean"],defaultValue:!1}}],privateStateCallbacks:[],onSucceeded:function(n){var f=n[Microsoft.Office.WebExtension.Parameters.Id],i=n[Microsoft.Office.WebExtension.Parameters.Data],t=new OSF.DialogHandler,e=OSF.DDA.AsyncMethodNames.CloseAsync.displayName,r,u;return OSF.OUtil.defineEnumerableProperty(t,e,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];n(arguments,f,i,t)}}),r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName,OSF.OUtil.defineEnumerableProperty(t,r,{value:function(){var r=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],n=r.verifyAndExtractCall(arguments,t,i),u=n[Microsoft.Office.WebExtension.Parameters.EventType],f=n[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(u,f)}}),u=OSF.DDA.SyncMethodNames.SendMessage.displayName,OSF.OUtil.defineEnumerableProperty(t,u,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return n(arguments,i,t)}}),t},checkCallArgs:function(n){return n[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Width]=1),!n[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&n[Microsoft.Office.WebExtension.Parameters.Width]>100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99),n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1),!n[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99),n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(n){try{n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,n);OSF.ClientHostController.openDialog(n.dispId,n.targetId,function(t,i){n.onEvent&&n.onEvent(i);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(n){n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,n);try{OSF.ClientHostController.closeDialog(n.dispId,n.targetId,t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.messageParent=function(n){try{n.onCalling&&n.onCalling();var i=(new Date).getTime(),t=OSF.ClientHostController.messageParent(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs((new Date).getTime()-i),t),t}catch(r){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(r)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.sendMessage=function(n){try{n.onCalling&&n.onCalling();var r=(new Date).getTime(),t=OSF.ClientHostController.sendMessage(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),t}catch(i){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(i)}};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogParentMessageReceivedEvent:"DialogParentMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogParentMessageReceived:"dialogParentMessageReceived",DialogParentEventReceived:"dialogParentEventReceived"});OSF.DialogParentMessageEventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived,Microsoft.Office.WebExtension.EventType.DialogParentEventReceived]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});Microsoft.Office.WebExtension.FileType={Text:"text",Compressed:"compressed",Pdf:"pdf"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FileProperties:"FileProperties",FileSliceProperties:"FileSliceProperties"});OSF.DDA.FileProperties={Handle:"FileHandle",FileSize:"FileSize",SliceSize:Microsoft.Office.WebExtension.Parameters.SliceSize};OSF.DDA.File=function(n,t,i){var r,u;OSF.OUtil.defineEnumerableProperties(this,{size:{value:t},sliceCount:{value:Math.ceil(t/i)}});r={};r[OSF.DDA.FileProperties.Handle]=n;r[OSF.DDA.FileProperties.SliceSize]=i;u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.GetDocumentCopyChunkAsync,u.ReleaseDocumentCopyAsync],r)};OSF.DDA.FileSliceOffset="fileSliceoffset";OSF.DDA.AsyncMethodNames.addNames({GetDocumentCopyAsync:"getFileAsync",GetDocumentCopyChunkAsync:"getSliceAsync",ReleaseDocumentCopyAsync:"closeAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FileType,"enum":Microsoft.Office.WebExtension.FileType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:{types:["number"],defaultValue:4194304}}],checkCallArgs:function(n){var t=n[Microsoft.Office.WebExtension.Parameters.SliceSize];if(t<=0||t>4194304)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return n},onSucceeded:function(n,t,i){return new OSF.DDA.File(n[OSF.DDA.FileProperties.Handle],n[OSF.DDA.FileProperties.FileSize],i[Microsoft.Office.WebExtension.Parameters.SliceSize])}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(n,t){return t[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(r<0||r>=t.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;return n[OSF.DDA.FileSliceOffset]=parseInt((r*i[OSF.DDA.FileProperties.SliceSize]).toString()),n},onSucceeded:function(n,t,i){var r={};return OSF.OUtil.defineEnumerableProperties(r,{data:{value:n[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:i[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:n[OSF.DDA.FileProperties.SliceSize]}}),r}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FileType,{Text:"text",Pdf:"pdf"});OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(n){OSF.OUtil.defineEnumerableProperties(this,{url:{value:n[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(n){return new Microsoft.Office.WebExtension.FileProperties(n)}});Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"};Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"};Microsoft.Office.WebExtension.Index={First:"first",Last:"last",Next:"next",Previous:"previous"};OSF.DDA.AsyncMethodNames.addNames({GoToByIdAsync:"goToByIdAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GoToByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string","number"]},{name:Microsoft.Office.WebExtension.Parameters.GoToType,"enum":Microsoft.Office.WebExtension.GoToType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:{"enum":Microsoft.Office.WebExtension.SelectionMode,defaultValue:Microsoft.Office.WebExtension.SelectionMode.Default}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:0},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:1},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:2},{name:Microsoft.Office.WebExtension.GoToType.Index,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:0},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:1},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:1},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileProperties.FileSize,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0},{name:OSF.DDA.FileProperties.SliceSize,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:0},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:5},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:6}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:0}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileSliceOffset,value:1},{name:OSF.DDA.FileProperties.SliceSize,value:2}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0}]});OSF.DDA.AsyncMethodNames.addNames({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync"}),function(){function r(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&r&&(r[OSF.DDA.TableDataProperties.TableRows]!=undefined||r[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(r=OSF.DDA.OMFactory.manufactureTableData(r)),r=OSF.DDA.DataCoercion.coerceData(r,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),r==undefined?null:r}var i=!1,n="boolean",t="number";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,"enum":Microsoft.Office.WebExtension.CoercionType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}}],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object",t,n]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[t,n],defaultValue:i}}],privateStateCallbacks:[]})}();OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:1},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:2},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:3},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:4},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:5}]});OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",RefreshingSettings:"refreshingSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(n){return OSF.OUtil.serializeSettings(n)},deserializeSettings:function(n){return OSF.OUtil.deserializeSettings(n)}};OSF.DDA.Settings=function(n){var t="name",i;n=n||{};i=function(n){var i=OSF.OUtil.getSessionStorage(),t,r;i&&(t=OSF.DDA.SettingsManager.serializeSettings(n),r=JSON?JSON.stringify(t):Sys.Serialization.JavaScriptSerializer.serialize(t),i.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),r))};OSF.OUtil.defineEnumerableProperties(this,{get:{value:function(i){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]),r;if(u)throw u;return r=n[i],typeof r=="undefined"?null:r}},set:{value:function(r,u){var f=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1},{name:"value",mayBeNull:!0}]);if(f)throw f;n[r]=u;i(n)}},remove:{value:function(r){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]);if(u)throw u;delete n[r];i(n)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],n)};OSF.DDA.RefreshableSettings=function(n){OSF.DDA.RefreshableSettings.uber.constructor.call(this,n);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],n);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:n}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(n,t){return t}}],onSucceeded:function(n,t,i){var f=n[OSF.DDA.SettingsManager.SerializedSettings],u=OSF.DDA.SettingsManager.deserializeSettings(f),e=i[OSF.DDA.SettingsManager.RefreshingSettings];for(var r in e)t.remove(r);for(r in u)t.set(r,u[r]);return t}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(n,t){return OSF.DDA.SettingsManager.serializeSettings(t)}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"});OSF.DDA.DocumentSelectionChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:n}})};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDeleted:"objectDeleted"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectSelectionChanged:"objectSelectionChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDataChanged:"objectDataChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ContentControlAdded:"contentControlAdded"});OSF.DDA.ObjectEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:n},object:{value:t}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDeletedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDataChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidContentControlAddedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});Microsoft.Office.WebExtension.TableData=function(n,t){function i(n){if(n==null||n==undefined)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(n,2);t<2;t++)n=[n];return n}catch(i){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(n){t=i(n)}},rows:{get:function(){return n},set:function(t){n=t==null||OSF.OUtil.isArray(t)&&t.length==0?[]:i(t)}}});this.headers=t;this.rows=n};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(n){return new Microsoft.Office.WebExtension.TableData(n[OSF.DDA.TableDataProperties.TableRows],n[OSF.DDA.TableDataProperties.TableHeaders])};Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var n=null;return{findArrayDimensionality:function(n){if(OSF.OUtil.isArray(n)){for(var t=0,i=0;i0},enumerable:!0,configurable:!0}),t.prototype._getLastAction=function(){return this.m_actions[this.m_actions.length-1]},t.prototype.addTrace=function(n,t){this.m_traceInfos[n]=t},t.prototype.ensureInstantiateObjectPath=function(t){if(t){if(this.m_instantiatedObjectPaths[t.objectPathInfo.Id])return;if(this.ensureInstantiateObjectPath(t.parentObjectPath),this.ensureInstantiateObjectPaths(t.argumentObjectPaths),!this.m_instantiatedObjectPaths[t.objectPathInfo.Id]){var r={Id:this.m_context._nextId(),ActionType:1,Name:"",ObjectPathId:t.objectPathInfo.Id},i=new n.Action(r,!1,!1);i.referencedObjectPath=t;this.addAction(i)}}},t.prototype.ensureInstantiateObjectPaths=function(n){if(n)for(var t=0;t=0;--r)if(i=n[r],u=i.actionInfo.Id,i.referencedObjectPath&&t._updateLastUsedActionIdOfObjectPathId(e,i.referencedObjectPath,u),o=i.referencedArgumentObjectPaths,o)for(v=o.length,s=0;s0?i.actionInfo.L=c:i.actionInfo.L&&delete i.actionInfo.L},t}();n.ClientRequest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;n._internalConfig={showDisposeInfoInDebugInfo:!1,enableEarlyDispose:!0,alwaysPolyfillClientObjectRetrieveMethod:!1};t=function(){function t(){}return t.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},t.prototype._createRequestExecutorOrNull=function(){return null},Object.defineProperty(t.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),t}();n.SessionBase=t;i=function(){function i(r){if(this.m_customRequestHeaders={},this._onRunFinishedNotifiers=[],this.m_nextId=0,i._overrideSession)this.m_requestUrlAndHeaderInfoResolver=i._overrideSession;else if((n.Utility.isNullOrUndefined(r)||typeof r=="string"&&r.length===0)&&(r=i.defaultRequestUrlAndHeaders,r||(r={url:n.Constants.localDocument,headers:{}})),typeof r=="string")this.m_requestUrlAndHeaderInfo={url:r,headers:{}};else if(i.isRequestUrlAndHeaderInfoResolver(r))this.m_requestUrlAndHeaderInfoResolver=r;else if(i.isRequestUrlAndHeaderInfo(r)){var u=r;this.m_requestUrlAndHeaderInfo={url:u.url,headers:{}};n.Utility._copyHeaders(u.headers,this.m_requestUrlAndHeaderInfo.headers)}else throw n._Internal.RuntimeError._createInvalidArgError("url");this.m_requestUrlAndHeaderInfoResolver instanceof t&&(this.m_session=this.m_requestUrlAndHeaderInfoResolver);this._processingResult=!1;this._customData=n.Constants.iterativeExecutor;this.sync=this.sync.bind(this)}return Object.defineProperty(i.prototype,"session",{get:function(){return this.m_session},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"eventRegistration",{get:function(){return this.m_session?this.m_session.eventRegistration:n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_url",{get:function(){return this.m_requestUrlAndHeaderInfo?this.m_requestUrlAndHeaderInfo.url:null},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_pendingRequest",{get:function(){return this.m_pendingRequest==null&&(this.m_pendingRequest=new n.ClientRequest(this)),this.m_pendingRequest},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"debugInfo",{get:function(){var t=new n.RequestPrettyPrinter(this._rootObjectPropertyName,this._pendingRequest._objectPaths,this._pendingRequest._actions,n._internalConfig.showDisposeInfoInDebugInfo),i=t.process();return{pendingStatements:i}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"trackedObjects",{get:function(){return this.m_trackedObjects||(this.m_trackedObjects=new n.TrackedObjects(this)),this.m_trackedObjects},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"requestHeaders",{get:function(){return this.m_customRequestHeaders},enumerable:!0,configurable:!0}),i.prototype.load=function(t,r){n.Utility.validateContext(this,t);var u=i._parseQueryOption(r),f=n.ActionFactory.createQueryAction(this,t,u);this._pendingRequest.addActionResultHandler(f,t)},i.isLoadOption=function(t){if(!n.Utility.isUndefined(t.select)&&(typeof t.select=="string"||Array.isArray(t.select))||!n.Utility.isUndefined(t.expand)&&(typeof t.expand=="string"||Array.isArray(t.expand))||!n.Utility.isUndefined(t.top)&&typeof t.top=="number"||!n.Utility.isUndefined(t.skip)&&typeof t.skip=="number")return!0;for(var i in t)return!1;return!0},i.parseStrictLoadOption=function(n){var t={Select:[]};return i.parseStrictLoadOptionHelper(t,"","option",n),t},i.combineQueryPath=function(n,t,i){return n.length===0?t:n+i+t},i.parseStrictLoadOptionHelper=function(t,r,u,f){var e,o;for(e in f)if(o=f[e],e==="$all"){if(typeof o!="boolean")throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));o&&t.Select.push(i.combineQueryPath(r,"*","/"))}else if(e==="$top"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));t.Top=o}else if(e==="$skip"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));t.Skip=o}else if(typeof o=="boolean")o&&t.Select.push(i.combineQueryPath(r,e,"/"));else if(typeof o=="object")i.parseStrictLoadOptionHelper(t,i.combineQueryPath(r,e,"/"),i.combineQueryPath(u,e,"."),o);else throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));},i._parseQueryOption=function(t){var u={},f,r;if(typeof t=="string")f=t,u.Select=n.Utility._parseSelectExpand(f);else if(Array.isArray(t))u.Select=t;else if(typeof t=="object")if(r=t,i.isLoadOption(r)){if(typeof r.select=="string")u.Select=n.Utility._parseSelectExpand(r.select);else if(Array.isArray(r.select))u.Select=r.select;else if(!n.Utility.isNullOrUndefined(r.select))throw n._Internal.RuntimeError._createInvalidArgError("option.select");if(typeof r.expand=="string")u.Expand=n.Utility._parseSelectExpand(r.expand);else if(Array.isArray(r.expand))u.Expand=r.expand;else if(!n.Utility.isNullOrUndefined(r.expand))throw n._Internal.RuntimeError._createInvalidArgError("option.expand");if(typeof r.top=="number")u.Top=r.top;else if(!n.Utility.isNullOrUndefined(r.top))throw n._Internal.RuntimeError._createInvalidArgError("option.top");if(typeof r.skip=="number")u.Skip=r.skip;else if(!n.Utility.isNullOrUndefined(r.skip))throw n._Internal.RuntimeError._createInvalidArgError("option.skip");}else u=i.parseStrictLoadOption(t);else if(!n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError("option");return u},i.prototype.loadRecursive=function(t,r,u){var f,e,o;if(!n.Utility.isPlainJsonObject(r))throw n._Internal.RuntimeError._createInvalidArgError("options");f={};for(e in r)f[e]=i._parseQueryOption(r[e]);o=n.ActionFactory.createRecursiveQueryAction(this,t,{Queries:f,MaxDepth:u});this._pendingRequest.addActionResultHandler(o,t)},i.prototype.trace=function(t){n.ActionFactory.createTraceAction(this,t,!0)},i.prototype._processOfficeJsErrorResponse=function(n,t){},i.prototype.syncPrivateMain=function(){var t=this;return n.Utility._createPromiseFromResult(null).then(function(){if(!t.m_requestUrlAndHeaderInfo)return t.m_requestUrlAndHeaderInfoResolver._resolveRequestUrlAndHeaderInfo().then(function(i){if(t.m_requestUrlAndHeaderInfo=i,t.m_requestUrlAndHeaderInfo||(t.m_requestUrlAndHeaderInfo={url:n.Constants.localDocument,headers:{}}),n.Utility.isNullOrEmptyString(t.m_requestUrlAndHeaderInfo.url)&&(t.m_requestUrlAndHeaderInfo.url=n.Constants.localDocument),t.m_requestUrlAndHeaderInfo.headers||(t.m_requestUrlAndHeaderInfo.headers={}),typeof t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull=="function"){var r=t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull();r&&(t._requestExecutor=r)}})}).then(function(){var n=t._pendingRequest;return t.m_pendingRequest=null,t.processPreSyncPromises(n).then(function(){return t.syncPrivate(n)})})},i.prototype.syncPrivate=function(t){var f=this,e,o,s,u,h,r,i;return t.hasActions?(e=t.buildRequestMessageBody(),o=t.flags,this._requestExecutor||(this._requestExecutor=n.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)?new n.OfficeJsRequestExecutor(this):new n.HttpRequestExecutor),s=this._requestExecutor,u={},n.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,u),n.Utility._copyHeaders(this.m_customRequestHeaders,u),h={Url:this.m_requestUrlAndHeaderInfo.url,Headers:u,Body:e},t.invalidatePendingInvalidObjectPaths(),r=null,i=null,this._lastSyncStart=performance.now(),s.executeAsync(this._customData,o,h).then(function(u){return f._lastSyncEnd=performance.now(),r=f.processRequestExecutorResponseMessage(t,u),f.processPendingEventHandlers(t).catch(function(t){n.Utility.log("Error in processPendingEventHandlers");n.Utility.log(JSON.stringify(t));i=t})}).then(function(){var u,f;if(r){n.Utility.log("Throw error from response: "+JSON.stringify(r));throw r;}if(i){n.Utility.log("Throw error from ProcessEventHandler: "+JSON.stringify(i));u=null;i instanceof n._Internal.RuntimeError?(u=i,u.traceMessages=t._responseTraceMessages):(f=null,f=typeof i=="string"?i:i.message,n.Utility.isNullOrEmptyString(f)&&(f=n.Utility._getResourceString(n.ResourceStrings.cannotRegisterEvent)),u=new n._Internal.RuntimeError({code:n.ErrorCodes.cannotRegisterEvent,message:f,traceMessages:t._responseTraceMessages}));throw u;}})):this.processPendingEventHandlers(t)},i.prototype.processRequestExecutorResponseMessage=function(t,i){var e,r,o,u,f;if(i.Body&&i.Body.TraceIds&&t._setResponseTraceIds(i.Body.TraceIds),e=t._responseTraceMessages,r=null,i.Body&&(i.Body.Error&&i.Body.Error.ActionIndex>=0&&(o=new n.RequestPrettyPrinter(this._rootObjectPropertyName,t._objectPaths,t._actions),r=o.processForDebugStatementInfo(i.Body.Error.ActionIndex)),u=null,i.Body.Results?u=i.Body.Results:i.Body.ProcessedResults&&i.Body.ProcessedResults.Results&&(u=i.Body.ProcessedResults.Results),u)){this._processingResult=!0;try{t.processResponse(u)}finally{this._processingResult=!1}}if(n.Utility.isNullOrEmptyString(i.ErrorCode)){if(i.Body&&i.Body.Error)return f={errorLocation:i.Body.Error.Location},r&&(f.statement=r.statement,f.surroundingStatements=r.surroundingStatements),new n._Internal.RuntimeError({code:i.Body.Error.Code,message:i.Body.Error.Message,traceMessages:e,debugInfo:f})}else return new n._Internal.RuntimeError({code:i.ErrorCode,message:i.ErrorMessage,traceMessages:e});return null},i.prototype.processPendingEventHandlers=function(t){for(var u,i=n.Utility._createPromiseFromResult(null),r=0;r0&&(typeof r[0]=="string"||i.isRequestUrlAndHeaderInfo(r[0])||i.isRequestUrlAndHeaderInfoResolver(r[0]))&&(y=r[0],h=1),r.length==h+1)l=u,v=r[h+0];else if(r.length==h+2){if(n.Utility.isNullOrUndefined(r[h+0]))l=u;else if(r[h+0]instanceof n.ClientObject)l=function(){return r[h+0].context};else if(r[h+0]instanceof i)l=function(){return r[h+0]};else if(Array.isArray(r[h+0])){if(c=r[h+0],c.length==0)return i.createErrorPromise(t);for(a=0;a0){var n=c._onRunFinishedNotifiers.shift();n()}if(a)return l;else throw l;})},i.prototype._nextId=function(){return++this.m_nextId},i}();n.ClientRequestContext=i}(OfficeExtension||(OfficeExtension={})),function(n){var i=function(){function t(n){this.m_type=n}return Object.defineProperty(t.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){(this.m_isLoaded=!0,typeof t=="object"&&t&&t._IsNull)||(this.m_value=this.m_type===1?n.Utility.adjustToDateTime(t):t)},t}(),t;n.ClientResult=i;t=function(){function t(n,t){this.m_proxy=n;this.m_shouldPolyfill=t}return Object.defineProperty(t.prototype,"proxy",{get:function(){return this.m_proxy},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"retrieveResult.data"}});return this.m_data},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(n){if(this.m_isLoaded=!0,typeof n=="object"&&n&&n._IsNull){this.m_data=null;return}this.m_data=this.m_shouldPolyfill?this.changePropertyNameToCamelLowerCase(n):n},t.prototype.changePropertyNameToCamelLowerCase=function(t){var o=95,u,i,r,f,e;if(Array.isArray(t)){for(i=[],u=0;u0&&(r=!0),t=document.createElement("a"),t.href=this.m_url,r?t.hash=t.hash.length===0||t.hash==="#"?"#"+i:t.hash+"&"+i:t.search=t.search.length===0||t.search==="?"?"?"+i:t.search+"&"+i,t.href},f.prototype.init=function(){var t=this,i;return window.addEventListener("message",this.m_onMessageHandler),i=this._getIFrameSrc(),new n._Internal.OfficePromise(function(r,u){var f=document.createElement("iframe");t.m_options.id&&(f.id=t.m_options.id);f.style.height=t.m_options.height;f.style.width=t.m_options.width;f.src=i;t.m_options.container.appendChild(f);t.m_timeoutId=setTimeout(function(){t.close();var i=n.Utility.createRuntimeError(n.ErrorCodes.timeout,n.Utility._getResourceString(n.ResourceStrings.timeout),"EmbeddedSession.init");u(i)},t.m_options.timeoutInMilliseconds);t.m_promiseResolver=r})},f.prototype._invoke=function(n,t,u){if(!this.m_enabled){t(i.InternalError,null);return}r.invokeRequestModifier&&(u=r.invokeRequestModifier(u));this._sendMessageWithCallback(this.m_id++,n,u,function(n){r.invokeResponseModifier&&(n=r.invokeResponseModifier(n));var u=n.Error;delete n.Error;t(u||i.Success,n)})},f.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler);window.clearTimeout(this.m_timeoutId);this.m_enabled=!1},Object.defineProperty(f.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),f.prototype._createRequestExecutorOrNull=function(){return new e(this)},f.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},f.prototype._registerEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.RegisterEventCommand,{EventId:i,TargetId:r},function(){n(null)})})},f.prototype._unregisterEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.UnregisterEventCommand,{EventId:i,TargetId:r},function(){n()})})},f.prototype._onMessage=function(n){var u=this,i,e,r,o,s;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===n.source&&this.m_chosenOrigin===n.origin)){if(i=n.data,i&&i[t.CommandKey]===t.ApiReadyCommand){!this.m_chosenWindow&&this._isValidDescendant(n.source)&&i[t.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=n.source,this.m_chosenOrigin=n.origin,this._sendMessageWithCallback(this.m_id++,t.GetAppContextCommand,null,function(n){u._setupContext(n);window.clearTimeout(u.m_timeoutId);u.m_promiseResolver()}));return}if(i&&i[t.CommandKey]===t.FireEventCommand){var f=i[t.ParamsKey],h=f.EventId,c=f.TargetId,l=f.Data;if(this.m_sessionEventManager)for(e=this.m_sessionEventManager.getHandlers(h,c),r=0;r=0;o--)if(r[o]===e[i].handler){r.splice(o,1);break}break;case 2:r=[];break}}return s&&(!this.m_registered&&r.length>0?u=u.then(function(){return f.m_eventInfo.registerFunc(f.m_callback)}).then(function(){return f.m_registered=!0}):this.m_registered&&r.length==0&&(u=u.then(function(){return f.m_eventInfo.unregisterFunc(f.m_callback)}).catch(function(t){n.Utility.log("Error when unregister event: "+JSON.stringify(t))}).then(function(){return f.m_registered=!1})),u=u.then(function(){return f.m_handlers=r})),u},t.prototype.fireEvent=function(t){for(var u,f,r=[],i=0;i=0;e--)if(f[e]===u){f.splice(e,1);break}return f.length===0?this.m_unregisterEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i}();n.EventRegistration=i}(OfficeExtension||(OfficeExtension={})),function(n){function r(n){t._testReadyImpl=n}function u(n){t.getGenericEventRegistration()._handleRichApiMessage(n)}var t=function(){function t(){this.m_eventRegistration=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this));this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this)}return t.prototype.ready=function(){var i=this;return this.m_ready||(this.m_ready=t._testReadyImpl?t._testReadyImpl().then(function(){i.m_isReady=!0}):n._Internal.officeJsEventRegistration.register(5,"",this.m_richApiMessageHandler).then(function(){i.m_isReady=!0})),this.m_ready},Object.defineProperty(t.prototype,"isReady",{get:function(){return this.m_isReady},enumerable:!0,configurable:!0}),t.prototype.register=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.register(n,t,i)})},t.prototype.unregister=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.unregister(n,t,i)})},t.prototype._registerEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._unregisterEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._handleRichApiMessage=function(t){var r,i,u,e,f;if(t&&t.entries)for(r=0;r0))for(e=JSON.parse(i.message),i.isRemoteOverride&&(e.source=n.Constants.eventSourceRemote),f=0;f=0;u--)if(n[u]===i){n.splice(u,1);break}n.length==0&&t.getGenericEventRegistration().unregister(r.m_genericEventInfo.eventType,r.m_genericEventInfo.getTargetIdFunc(),r._callback)})},r.prototype.removeAll=function(){},r}(n.EventHandlers);n.GenericEventHandlers=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var s=JSON.stringify(u.Body),f=u.Url,e,o;if(f.charAt(f.length-1)!="/"&&(f=f+"/"),f=f+n.Constants.processQuery,f=f+"?"+n.Constants.flags+"="+r.toString(),e={method:"POST",url:f,headers:{},body:s},e.headers[n.Constants.sourceLibHeader]=t.SourceLibHeaderValue,e.headers["CONTENT-TYPE"]="application/json",u.Headers)for(o in u.Headers)e.headers[o]=u.Headers[o];return n.HttpUtility.sendRequest(e).then(function(t){var i,r;return t.statusCode===200?i={ErrorCode:null,ErrorMessage:null,Headers:t.headers,Body:JSON.parse(t.body)}:(n.Utility.log("Error Response:"+t.body),r=n.Utility._parseErrorResponse(t),i={ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:t.headers,Body:null}),i})},t.SourceLibHeaderValue="officejs-rest",t}();n.HttpRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.setCustomSendRequestFunc=function(n){t.s_customSendRequestFunc=n},t.xhrSendRequestFunc=function(t){return new n._Internal.OfficePromise(function(i,r){var u=new XMLHttpRequest,f;if(u.open(t.method,t.url),u.onload=function(){var t={statusCode:u.status,headers:n.Utility._parseHttpResponseHeaders(u.getAllResponseHeaders()),body:u.responseText};i(t)},u.onerror=function(){r(new n._Internal.RuntimeError({code:n.ErrorCodes.connectionFailure,message:n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,u.statusText)}))},t.headers)for(f in t.headers)u.setRequestHeader(f,t.headers[f]);u.send(t.body)})},t.sendRequest=function(n){t.validateAndNormalizeRequest(n);var i=t.s_customSendRequestFunc;return i||(i=t.xhrSendRequestFunc),i(n)},t.setCustomSendLocalDocumentRequestFunc=function(n){t.s_customSendLocalDocumentRequestFunc=n},t.sendLocalDocumentRequest=function(n){t.validateAndNormalizeRequest(n);var i;return i=t.s_customSendLocalDocumentRequestFunc||t.officeJsSendLocalDocumentRequestFunc,i(n)},t.officeJsSendLocalDocumentRequestFunc=function(t){t=n.Utility._validateLocalDocumentRequest(t);var i=n.Utility._buildRequestMessageSafeArray(t);return new n._Internal.OfficePromise(function(t,r){OSF.DDA.RichApi.executeRichApiRequestAsync(i,function(i){var r;r=i.status=="succeeded"?{statusCode:n.RichApiMessageUtility.getResponseStatusCode(i),headers:n.RichApiMessageUtility.getResponseHeaders(i),body:n.RichApiMessageUtility.getResponseBody(i)}:n.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(i.error.code,i.error.message);n.Utility.log(JSON.stringify(r));t(r)})})},t.validateAndNormalizeRequest=function(t){if(n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"request"});n.Utility.isNullOrEmptyString(t.method)&&(t.method="GET");t.method=t.method.toUpperCase()},t.logRequest=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Request---"),n.Utility.log(i.method+" "+i.url),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t.logResponse=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Response---"),n.Utility.log(""+i.statusCode),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t._logBody=!1,t}();n.HttpUtility=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_clientObject=n}return n.prototype._handleResult=function(n){this.m_clientObject._handleIdResult(n)},n}();n.InstantiateActionResultHandler=t}(OfficeExtension||(OfficeExtension={})),function(n){}(OfficeExtension||(OfficeExtension={})),function(n){var u=function(){function t(n){this.m_session=n}return t.prototype.executeAsync=function(t,r,u){var e={url:n.Constants.processQuery,method:"POST",headers:u.Headers,body:u.Body},f={id:i.nextId(),type:1,flags:r,message:e};return n.Utility.log(JSON.stringify(f)),this.m_session.sendMessageToHost(f).then(function(t){var i,r,u;return n.Utility.log("Received response: "+JSON.stringify(t)),i=t.message,i.statusCode===200?r={ErrorCode:null,ErrorMessage:null,Headers:i.headers,Body:i.body}:(n.Utility.log("Error Response:"+i.body),u=n.Utility._parseErrorResponse(i),r={ErrorCode:u.errorCode,ErrorMessage:u.errorMessage,Headers:i.headers,Body:null}),r})},t}(),i=function(i){function r(n){var t=this;i.call(this);this.m_promiseResolver={};this.m_bridge=n;this.m_bridge.onMessageFromHost=function(n){t.onMessageFromHost(n)}}return __extends(r,i),r.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},r.prototype._createRequestExecutorOrNull=function(){return n.Utility.log("NativeBridgeSession::CreateRequestExecutor"),new u(this)},Object.defineProperty(r.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),r.init=function(t){if(t&&typeof t=="object"){var i=new r(t);n.ClientRequestContext._overrideSession=i;n.HttpUtility.setCustomSendLocalDocumentRequestFunc(function(n){var t={id:r.nextId(),type:1,flags:0,message:n};return i.sendMessageToHost(t).then(function(n){return n.message})})}},r.prototype.sendMessageToHost=function(t){var i=this;return this.m_bridge.sendMessageToHost(JSON.stringify(t)),new n._Internal.OfficePromise(function(n,r){i.m_promiseResolver[t.id]=n})},r.prototype.onMessageFromHost=function(n){var i,r;n==="test"?t._testFunc&&t._testFunc():(i=JSON.parse(n),typeof i.id=="number"&&(r=this.m_promiseResolver[i.id],r&&r(i),delete this.m_promiseResolver[i.id]))},r.nextId=function(){return r.s_nextId++},r.s_nextId=1,r}(n.SessionBase),r=function(){function n(){}return n.init=function(n){i.init(n)},n}(),t;n.HostBridge=r;typeof _richApiNativeBridge=="object"&&_richApiNativeBridge&&r.init(_richApiNativeBridge);t=function(){function n(){}return n.setTestFunc=function(t){n._testFunc=t},n}();n.HostBridgeTest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){this.m_objectPathInfo=n;this.m_parentObjectPath=t;this.m_isWriteOperation=!1;this.m_isCollection=i;this.m_isInvalidAfterRequest=r;this.m_isValid=!0}return Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},set:function(n){this.m_isWriteOperation=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRestrictedResourceAccess",{get:function(){return this.m_isRestrictedResourceAccess},set:function(n){this.m_isRestrictedResourceAccess=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(n){this.m_argumentObjectPaths=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(n){this.m_isValid=n;!n&&this.m_objectPathInfo.ObjectPathType===6&&this.m_savedObjectPathInfo&&(t.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(n){this.m_getByIdMethodName=n},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null},t.prototype.updateUsingObjectData=function(i){var e=i[n.Constants.referenceId],f,o,u,r;if(!n.Utility.isNullOrEmptyString(e)){this.m_savedObjectPathInfo||this.isInvalidAfterRequest||!t.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)||(f={},t.copyObjectPathInfo(this.m_objectPathInfo,f),this.m_savedObjectPathInfo={pathInfo:f,parent:this.m_parentObjectPath});this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=e;this.m_objectPathInfo.ArgumentInfo={};delete this.m_objectPathInfo.ParentObjectPathId;this.m_parentObjectPath=null;this.m_argumentObjectPaths=null;return}if(o=this.parentObjectPath&&this.parentObjectPath.isCollection,u=this.getByIdMethodName,(o||!n.Utility.isNullOrEmptyString(u))&&(r=i[n.Constants.id],n.Utility.isNullOrUndefined(r)&&(r=i[n.Constants.idPrivate]),!n.Utility.isNullOrUndefined(r))){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;n.Utility.isNullOrEmptyString(u)?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=u,this.m_getByIdMethodName=null);this.isWriteOperation=!1;this.m_objectPathInfo.ArgumentInfo={};this.m_objectPathInfo.ArgumentInfo.Arguments=[r];this.m_argumentObjectPaths=null;return}},t.isRestorableObjectPath=function(n){return n===1||n===5||n===3||n===4},t.copyObjectPathInfo=function(n,t){t.Id=n.Id;t.ArgumentInfo=n.ArgumentInfo;t.Name=n.Name;t.ObjectPathType=n.ObjectPathType;t.ParentObjectPathId=n.ParentObjectPathId},t}();n.ObjectPath=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createGlobalObjectObjectPath=function(t){var i={Id:t._nextId(),ObjectPathType:1,Name:""};return new n.ObjectPath(i,null,!1,!1)},t.createNewObjectObjectPath=function(t,i,r,u){var e={Id:t._nextId(),ObjectPathType:2,Name:i},f=new n.ObjectPath(e,null,r,!1);return f.isRestrictedResourceAccess=u,f},t.createPropertyObjectPath=function(t,i,r,u,f,e){var s={Id:t._nextId(),ObjectPathType:4,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id},o=new n.ObjectPath(s,i._objectPath,u,f);return o.isRestrictedResourceAccess=e,o},t.createIndexerObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i._objectPath,!1,!1)},t.createIndexerObjectPathUsingParentPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i,!1,!1)},t.createMethodObjectPath=function(t,i,r,u,f,e,o,s,h){var l={Id:t._nextId(),ObjectPathType:3,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},a=n.Utility.setMethodArguments(t,l.ArgumentInfo,f),c=new n.ObjectPath(l,i._objectPath,e,o);return c.argumentObjectPaths=a,c.isWriteOperation=u!=1,c.getByIdMethodName=s,c.isRestrictedResourceAccess=h,c},t.createReferenceIdObjectPath=function(t,i){var r={Id:t._nextId(),ObjectPathType:6,Name:i,ArgumentInfo:{}};return new n.ObjectPath(r,null,!1,!1)},t.createChildItemObjectPathUsingIndexerOrGetItemAt=function(i,r,u,f,e){var o=f[n.Constants.id];return n.Utility.isNullOrUndefined(o)&&(o=f[n.Constants.idPrivate]),i&&!n.Utility.isNullOrUndefined(o)?t.createChildItemObjectPathUsingIndexer(r,u,f):t.createChildItemObjectPathUsingGetItemAt(r,u,f,e)},t.createChildItemObjectPathUsingIndexer=function(t,i,r){var f=r[n.Constants.id],u;return n.Utility.isNullOrUndefined(f)&&(f=r[n.Constants.idPrivate]),u=u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u.ArgumentInfo.Arguments=[f],new n.ObjectPath(u,i._objectPath,!1,!1)},t.createChildItemObjectPathUsingGetItemAt=function(t,i,r,u){var e=r[n.Constants.index],f;return e&&(u=e),f={Id:t._nextId(),ObjectPathType:3,Name:n.Constants.getItemAt,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f.ArgumentInfo.Arguments=[u],new n.ObjectPath(f,i._objectPath,!1,!1)},t}();n.ObjectPathFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_context=n}return t.prototype.executeAsync=function(i,r,u){var f=this,e=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n._Internal.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(e,function(i){n.Utility.log("Response:");n.Utility.log(JSON.stringify(i));var r;i.status=="succeeded"?r=n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBody(i),n.RichApiMessageUtility.getResponseHeaders(i)):(r=n.RichApiMessageUtility.buildResponseOnError(i.error.code,i.error.message),f.m_context._processOfficeJsErrorResponse(i.error.code,r));t(r)})})},t.SourceLibHeaderValue="officejs",t}();n.OfficeJsRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){n.OfficeRequire=function(){return null}()})(t=n._Internal||(n._Internal={})),function(n){var t;(function(t){function i(){return function(){"use strict";function vt(n){return typeof n=="function"||typeof n=="object"&&n!==null}function b(n){return typeof n=="function"}function yt(n){return typeof n=="object"&&n!==null}function wt(n){k=n}function bt(n){f=n}function ni(){var t=process.nextTick,n=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&n[1]==="0"&&n[2]==="10"&&(t=setImmediate),function(){t(c)}}function tr(){return function(){pt(c)}}function ti(){var n=0,i=new it(c),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function ii(){var n=new MessageChannel;return n.port1.onmessage=c,function(){n.port2.postMessage(0)}}function ri(){return function(){setTimeout(c,1)}}function c(){for(var t,i,n=0;n=0?(n=n.substring(t+5,n.length),n<"14.14393"?!0:!1):!1}function i(){return typeof window=="undefined"&&typeof Promise=="function"?Promise:typeof window!="undefined"&&window.Promise?t()?n.PromiseImpl.Init():window.Promise:n.PromiseImpl.Init()}n.OfficePromise=i()}(t=n._Internal||(n._Internal={}));i=t.OfficePromise;n.Promise=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this._autoCleanupList={};this.m_context=n}return t.prototype.add=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._addCommon(n,!0)}):this._addCommon(n,!0)},t.prototype._autoAdd=function(n){this._addCommon(n,!1);this._autoCleanupList[n._objectPath.objectPathInfo.Id]=n},t.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(t,i){var r=this.m_context._autoCleanup&&!t[n.Constants.isTracked]&&t!==this.m_context._rootObject&&i&&!n.Utility.isNullOrEmptyString(i[n.Constants.referenceId]);r&&(this._autoCleanupList[t._objectPath.objectPathInfo.Id]=t,t[n.Constants.isTracked]=!0)},t.prototype._addCommon=function(t,i){if(t[n.Constants.isTracked]){i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id];return}var r=t[n.Constants.referenceId];n.Utility.isNullOrEmptyString(r)&&t._KeepReference&&(t._KeepReference(),n.ActionFactory.createInstantiateAction(this.m_context,t),i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id],t[n.Constants.isTracked]=!0)},t.prototype.remove=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._removeCommon(n)}):this._removeCommon(n)},t.prototype._removeCommon=function(t){var r=t[n.Constants.referenceId],i;n.Utility.isNullOrEmptyString(r)||(i=this.m_context._rootObject,i._RemoveReference&&i._RemoveReference(r),delete t[n.Constants.isTracked])},t.prototype._retrieveAndClearAutoCleanupList=function(){var n=this._autoCleanupList;return this._autoCleanupList={},n},t}();n.TrackedObjects=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){n||(n="root");this.m_globalObjName=n;this.m_referencedObjectPaths=t;this.m_actions=i;this.m_statements=[];this.m_variableNameForObjectPathMap={};this.m_variableNameToObjectPathMap={};this.m_declaredObjectPathMap={};this.m_showDispose=r}return t.prototype.process=function(){this.m_showDispose&&n.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions);for(var t=0;t=0&&this.m_statements.length>i+o+1)break;if(i<0)return null;for(f=i-o,f<0&&(f=0),e=i+1+o,e>this.m_statements.length&&(e=this.m_statements.length),r=[],f!=0&&r.push("..."),s=f;s>>>>"),r.push(this.m_statements[i]),r.push("// <<<<<"),h=i+1;h0)?(r=i.map(function(n){return u.getObjVarName(n)}).join(", "),n+" // And then dispose {"+r+"}"):n},t.prototype.buildQueryExpression=function(n){if(n.actionInfo.QueryInfo){var t={};return t.select=n.actionInfo.QueryInfo.Select,t.expand=n.actionInfo.QueryInfo.Expand,t.skip=n.actionInfo.QueryInfo.Skip,t.top=n.actionInfo.QueryInfo.Top,typeof t.top=="undefined"&&typeof t.skip=="undefined"&&typeof t.expand=="undefined"?typeof t.select=="undefined"?"":JSON.stringify(t.select):JSON.stringify(t)}return""},t.prototype.buildObjectPathExpressionWithParent=function(n){var t=n.objectPathInfo.ObjectPathType==5||n.objectPathInfo.ObjectPathType==3||n.objectPathInfo.ObjectPathType==4;return t&&n.objectPathInfo.ParentObjectPathId?this.getObjVarName(n.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(n):this.buildObjectPathExpression(n)},t.prototype.buildObjectPathExpression=function(t){switch(t.objectPathInfo.ObjectPathType){case 1:return"context."+this.m_globalObjName;case 5:return"getItem("+this.buildArgumentsExpression(t.objectPathInfo.ArgumentInfo)+")";case 3:return n.Utility._toCamelLowerCase(t.objectPathInfo.Name)+"("+this.buildArgumentsExpression(t.objectPathInfo.ArgumentInfo)+")";case 2:return t.objectPathInfo.Name+".newObject()";case 7:return"null";case 4:return n.Utility._toCamelLowerCase(t.objectPathInfo.Name);case 6:return"context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(t.objectPathInfo.Name)+")"}},t.prototype.buildArgumentsExpression=function(n){var t="",i;if(!n.Arguments)return t;for(i=0;i0&&(t=t+", "),t=t+this.buildArgumentLiteral(n.Arguments[i],n.ReferencedObjectPathIds?n.ReferencedObjectPathIds[i]:null);return t==="undefined"&&(t=""),t},t.prototype.buildArgumentLiteral=function(n,t){return typeof n=="number"&&n===t?this.getObjVarName(t):JSON.stringify(n)},t.prototype.getObjVarNameBase=function(t){var u="v",f=this.m_referencedObjectPaths[t],i,r;switch(f.objectPathInfo.ObjectPathType){case 1:u=this.m_globalObjName;break;case 4:u=n.Utility._toCamelLowerCase(f.objectPathInfo.Name);break;case 3:i=f.objectPathInfo.Name;i.length>3&&i.substr(0,3)==="Get"&&(i=i.substr(3));u=n.Utility._toCamelLowerCase(i);break;case 5:r=this.getObjVarNameBase(f.objectPathInfo.ParentObjectPathId);u=r.charAt(r.length-1)==="s"?r.substr(0,r.length-1):r+"Item";break}return u},t.prototype.getObjVarName=function(n){var t,i;if(this.m_variableNameForObjectPathMap[n])return this.m_variableNameForObjectPathMap[n];if(t=this.getObjVarNameBase(n),!this.m_variableNameToObjectPathMap[t])return this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t;for(i=1;this.m_variableNameToObjectPathMap[t+i.toString()];)i++;return t=t+i.toString(),this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t},t}();n.RequestPrettyPrinter=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.cannotRegisterEvent="CannotRegisterEvent",n.connectionFailureWithStatus="ConnectionFailureWithStatus",n.connectionFailureWithDetails="ConnectionFailureWithDetails",n.invalidObjectPath="InvalidObjectPath",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.invalidArgumentGeneric="InvalidArgumentGeneric",n.propertyNotLoaded="PropertyNotLoaded",n.runMustReturnPromise="RunMustReturnPromise",n.timeout="Timeout",n.propertyDoesNotExist="PropertyDoesNotExist",n.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",n.moreInfoInnerError="MoreInfoInnerError",n.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",n.valueNotLoaded="ValueNotLoaded",n.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage",n.invalidOperationInCellEditMode="InvalidOperationInCellEditMode",n.customFunctionDefintionMissing="CustomFunctionDefintionMissing",n.customFunctionImplementationMissing="CustomFunctionImplementationMissing",n.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars",n.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit",n.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch",n.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing",n.apiNotFoundDetails="ApiNotFoundDetails",n}();n.ResourceStrings=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.CannotRegisterEvent="The event handler cannot be registered.",n.ConnectionFailureWithStatus="The request failed with status code of {0}.",n.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}",n.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",n.InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',n.InvalidRequestContext="Cannot use the object across different request contexts.",n.PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",n.RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',n.Timeout="The operation has timed out.",n.ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.',n.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.",n.InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.",n.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions.",n.CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.",n.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods.",n.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name.",n.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.",n.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.",n.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.",n}();n.ResourceStringValues=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.buildMessageArrayForIRequestExecutor=function(i,r,u,f){var o=JSON.stringify(u.Body),e;return n.Utility.log("Request:"),n.Utility.log(o),e={},e[n.Constants.sourceLibHeader]=f,t.buildRequestMessageSafeArray(i,r,"POST","ProcessQuery",e,o)},t.buildResponseOnSuccess=function(n,t){var i={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return i.Body=JSON.parse(n),i.Headers=t,i},t.buildResponseOnError=function(i,r){var u={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return u.ErrorCode=n.ErrorCodes.generalException,u.ErrorMessage=r,i==t.OfficeJsErrorCode_ooeNoCapability?u.ErrorCode=n.ErrorCodes.accessDenied:i==t.OfficeJsErrorCode_ooeActivityLimitReached?u.ErrorCode=n.ErrorCodes.activityLimitReached:i==t.OfficeJsErrorCode_ooeInvalidOrTimedOutSession&&(u.ErrorCode=n.ErrorCodes.invalidOrTimedOutSession,u.ErrorMessage=n.Utility._getResourceString(n.ResourceStrings.invalidOrTimedOutSessionMessage)),u},t.buildHttpResponseFromOfficeJsError=function(i,r){var f=500,u={};return u.error={},u.error.code=n.ErrorCodes.generalException,u.error.message=r,i===t.OfficeJsErrorCode_ooeNoCapability?(f=403,u.error.code=n.ErrorCodes.accessDenied):i===t.OfficeJsErrorCode_ooeActivityLimitReached&&(f=429,u.error.code=n.ErrorCodes.activityLimitReached),{statusCode:f,headers:{},body:JSON.stringify(u)}},t.buildRequestMessageSafeArray=function(n,t,i,r,u,f){var e=[],o;if(u)for(o in u)e.push(o),e.push(u[o]);var s=0,h="",c="",l="";return[n,i,r,e,f,s,t,h,c,l]},t.getResponseBody=function(n){return t.getResponseBodyFromSafeArray(n.value.data)},t.getResponseHeaders=function(n){return t.getResponseHeadersFromSafeArray(n.value.data)},t.getResponseBodyFromSafeArray=function(n){var t=n[2],i;return typeof t=="string"?t:(i=t,i.join(""))},t.getResponseHeadersFromSafeArray=function(n){var i=n[1],r,t;if(!i)return null;for(r={},t=0;t0&&f.push(i);return f},t.toJson=function(n,t,i,r){var e={},u,f;for(u in t)f=t[u],typeof f!="undefined"&&(e[u]=f);for(u in i)f=i[u],typeof f!="undefined"&&(e[u]=f.toJSON());return r&&(e.items=r.map(function(n){return n.toJSON()})),e},t.throwError=function(i,r,u){throw new n._Internal.RuntimeError({code:i,message:t._getResourceString(i,r),debugInfo:u?{errorLocation:u}:undefined});},t.createRuntimeError=function(t,i,r){return new n._Internal.RuntimeError({code:t,message:i,debugInfo:{errorLocation:r}})},t._getResourceString=function(i,r){var u,e,f,o;return typeof window!="undefined"&&window.Strings&&window.Strings.OfficeOM&&(e="L_"+i,f=window.Strings.OfficeOM[e],f&&(u=f)),u||(u=n.ResourceStringValues[i]),u||(u=i),t.isNullOrUndefined(r)||(Array.isArray(r)?(o=r,u=t._formatString(u,o)):u=u.replace("{0}",r)),u},t._formatString=function(t,i){return t.replace(/\{\d\}/g,function(t){var r=parseInt(t.substr(1,t.length-2));if(r0?".":"")+i;break;case 3:i=t.normalizeName(n.objectPathInfo.Name)+"()"+(i.length>0?".":"")+i;break;case 4:i=t.normalizeName(n.objectPathInfo.Name)+(i.length>0?".":"")+i;break;case 5:i="getItem()"+(i.length>0?".":"")+i;break;case 6:i="_reference()"+(i.length>0?".":"")+i;break}n=n.parentObjectPath}return i},t._createPromiseFromResult=function(t){return new n._Internal.OfficePromise(function(n,i){n(t)})},t._createTimeoutPromise=function(t){return new n._Internal.OfficePromise(function(n,i){setTimeout(function(){n(null)},t)})},t.promisify=function(t){return new n._Internal.OfficePromise(function(n,i){var r=function(t){t.status=="failed"?i(t.error):n(t.value)};t(r)})},t._addActionResultHandler=function(n,t,i){n.context._pendingRequest.addActionResultHandler(t,i)},t._handleNavigationPropertyResults=function(n,i,r){for(var u=0;u0},t._getLocalDocumentUrlPrefixLength=function(n){for(var i=["http://document.localhost","https://document.localhost","//document.localhost"],r=n.toLowerCase().trim(),t=0;t0))for(s=i.url.substr(f+1),e=s.split("&"),u=0;u0&&(f=i.substr(0,u),e=i.substr(u+1),f=t.trim(f),e=t.trim(e),s[f.toUpperCase()]=e));return s},t._parseErrorResponse=function(i){var r=null,f,e,u;if(t.isPlainJsonObject(i.body))r=i.body;else if(!t.isNullOrEmptyString(i.body)){f=t.trim(i.body);try{r=JSON.parse(f)}catch(o){t.log("Error when parse "+f)}}return!t.isNullOrUndefined(r)&&typeof r=="object"&&r.error?(u=r.error.code,e=t._getResourceString(n.ResourceStrings.connectionFailureWithDetails,[i.statusCode.toString(),r.error.code,r.error.message])):e=t._getResourceString(n.ResourceStrings.connectionFailureWithStatus,i.statusCode.toString()),t.isNullOrEmptyString(u)&&(u=n.ErrorCodes.connectionFailure),{errorCode:u,errorMessage:e}},t._copyHeaders=function(n,t){if(n&&t)for(var i in n)t[i]=n[i]},t._toCamelLowerCase=function(n){if(t.isNullOrEmptyString(n))return n;for(var i=0;i=65&&n.charCodeAt(i)<=90;)i++;return i 0) - bucketPositive.push(ele); - else if(ele.tabIndex===0) - bucket0.push(ele) - } - else - bucket0.push(ele) - } - bucketPositive=bucketPositive.sort(function(left, right) - { - var diff=left.tabIndex - right.tabIndex; - if(diff===0) - diff=bucketPositive.indexOf(left) - bucketPositive.indexOf(right); - return diff - }); - return[].concat(bucketPositive,bucket0) - } - return{ - set_entropy: function OSF_OUtil$set_entropy(entropy) - { - if(typeof entropy=="string") - for(var i=0; i < entropy.length; i+=4) - { - var temp=0; - for(var j=0; j < 4 && i+j < entropy.length; j++) - temp=(temp << 8)+entropy.charCodeAt(i+j); - _rndentropy ^=temp - } - else if(typeof entropy=="number") - _rndentropy ^=entropy; - else - _rndentropy ^=2147483647 * Math.random(); - _rndentropy &=2147483647 - }, - extend: function OSF_OUtil$extend(child, parent) - { - var F=function(){}; - F.prototype=parent.prototype; - child.prototype=new F; - child.prototype.constructor=child; - child.uber=parent.prototype; - if(parent.prototype.constructor===Object.prototype.constructor) - parent.prototype.constructor=parent - }, - setNamespace: function OSF_OUtil$setNamespace(name, parent) - { - if(parent && name && !parent[name]) - parent[name]={} - }, - unsetNamespace: function OSF_OUtil$unsetNamespace(name, parent) - { - if(parent && name && parent[name]) - delete parent[name] - }, - loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) - { - if(url && callback) - { - var doc=window.document; - var _loadedScriptEntry=_loadedScripts[url]; - if(!_loadedScriptEntry) - { - var script=doc.createElement("script"); - script.type="text/javascript"; - _loadedScriptEntry={ - loaded: false, - pendingCallbacks: [callback], - timer: null - }; - _loadedScripts[url]=_loadedScriptEntry; - var onLoadCallback=function OSF_OUtil_loadScript$onLoadCallback() - { - if(_loadedScriptEntry.timer !=null) - { - clearTimeout(_loadedScriptEntry.timer); - delete _loadedScriptEntry.timer - } - _loadedScriptEntry.loaded=true; - var pendingCallbackCount=_loadedScriptEntry.pendingCallbacks.length; - for(var i=0; i < pendingCallbackCount; i++) - { - var currentCallback=_loadedScriptEntry.pendingCallbacks.shift(); - currentCallback() - } - }; - var onLoadError=function OSF_OUtil_loadScript$onLoadError() - { - delete _loadedScripts[url]; - if(_loadedScriptEntry.timer !=null) - { - clearTimeout(_loadedScriptEntry.timer); - delete _loadedScriptEntry.timer - } - var pendingCallbackCount=_loadedScriptEntry.pendingCallbacks.length; - for(var i=0; i < pendingCallbackCount; i++) - { - var currentCallback=_loadedScriptEntry.pendingCallbacks.shift(); - currentCallback() - } - }; - if(script.readyState) - script.onreadystatechange=function() - { - if(script.readyState=="loaded" || script.readyState=="complete") - { - script.onreadystatechange=null; - onLoadCallback() - } - }; - else - script.onload=onLoadCallback; - script.onerror=onLoadError; - timeoutInMs=timeoutInMs || _defaultScriptLoadingTimeout; - _loadedScriptEntry.timer=setTimeout(onLoadError,timeoutInMs); - script.src=url; - doc.getElementsByTagName("head")[0].appendChild(script) - } - else if(_loadedScriptEntry.loaded) - callback(); - else - _loadedScriptEntry.pendingCallbacks.push(callback) - } - }, - loadCSS: function OSF_OUtil$loadCSS(url) - { - if(url) - { - var doc=window.document; - var link=doc.createElement("link"); - link.type="text/css"; - link.rel="stylesheet"; - link.href=url; - doc.getElementsByTagName("head")[0].appendChild(link) - } - }, - parseEnum: function OSF_OUtil$parseEnum(str, enumObject) - { - var parsed=enumObject[str.trim()]; - if(typeof parsed=="undefined") - { - OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:"+str); - throw OsfMsAjaxFactory.msAjaxError.argument("str"); - } - return parsed - }, - delayExecutionAndCache: function OSF_OUtil$delayExecutionAndCache() - { - var obj={calc: arguments[0]}; - return function() - { - if(obj.calc) - { - obj.val=obj.calc.apply(this,arguments); - delete obj.calc - } - return obj.val - } - }, - getUniqueId: function OSF_OUtil$getUniqueId() - { - _uniqueId=_uniqueId+1; - return _uniqueId.toString() - }, - formatString: function OSF_OUtil$formatString() - { - var args=arguments; - var source=args[0]; - return source.replace(/{(\d+)}/gm,function(match, number) - { - var index=parseInt(number,10)+1; - return args[index]===undefined ? "{"+number+"}" : args[index] - }) - }, - generateConversationId: function OSF_OUtil$generateConversationId() - { - return[_random(),_random(),(new Date).getTime().toString()].join("_") - }, - getFrameName: function OSF_OUtil$getFrameName(cacheKey) - { - return _xdmSessionKeyPrefix+cacheKey+this.generateConversationId() - }, - addXdmInfoAsHash: function OSF_OUtil$addXdmInfoAsHash(url, xdmInfoValue) - { - return OSF.OUtil.addInfoAsHash(url,_xdmInfoKey,xdmInfoValue,false) - }, - addSerializerVersionAsHash: function OSF_OUtil$addSerializerVersionAsHash(url, serializerVersion) - { - return OSF.OUtil.addInfoAsHash(url,_serializerVersionKey,serializerVersion,true) - }, - addInfoAsHash: function OSF_OUtil$addInfoAsHash(url, keyName, infoValue, encodeInfo) - { - url=url.trim() || ""; - var urlParts=url.split(_fragmentSeparator); - var urlWithoutFragment=urlParts.shift(); - var fragment=urlParts.join(_fragmentSeparator); - var newFragment; - if(encodeInfo) - newFragment=[keyName,encodeURIComponent(infoValue),fragment].join(""); - else - newFragment=[fragment,keyName,infoValue].join(""); - return[urlWithoutFragment,_fragmentSeparator,newFragment].join("") - }, - parseHostInfoFromWindowName: function OSF_OUtil$parseHostInfoFromWindowName(skipSessionStorage, windowName) - { - return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage,windowName,OSF.WindowNameItemKeys.HostInfo) - }, - parseXdmInfo: function OSF_OUtil$parseXdmInfo(skipSessionStorage) - { - var xdmInfoValue=OSF.OUtil.parseXdmInfoWithGivenFragment(skipSessionStorage,window.location.hash); - if(!xdmInfoValue) - xdmInfoValue=OSF.OUtil.parseXdmInfoFromWindowName(skipSessionStorage,window.name); - return xdmInfoValue - }, - parseXdmInfoFromWindowName: function OSF_OUtil$parseXdmInfoFromWindowName(skipSessionStorage, windowName) - { - return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage,windowName,OSF.WindowNameItemKeys.XdmInfo) - }, - parseXdmInfoWithGivenFragment: function OSF_OUtil$parseXdmInfoWithGivenFragment(skipSessionStorage, fragment) - { - return OSF.OUtil.parseInfoWithGivenFragment(_xdmInfoKey,_xdmSessionKeyPrefix,false,skipSessionStorage,fragment) - }, - parseSerializerVersion: function OSF_OUtil$parseSerializerVersion(skipSessionStorage) - { - var serializerVersion=OSF.OUtil.parseSerializerVersionWithGivenFragment(skipSessionStorage,window.location.hash); - if(isNaN(serializerVersion)) - serializerVersion=OSF.OUtil.parseSerializerVersionFromWindowName(skipSessionStorage,window.name); - return serializerVersion - }, - parseSerializerVersionFromWindowName: function OSF_OUtil$parseSerializerVersionFromWindowName(skipSessionStorage, windowName) - { - return parseInt(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage,windowName,OSF.WindowNameItemKeys.SerializerVersion)) - }, - parseSerializerVersionWithGivenFragment: function OSF_OUtil$parseSerializerVersionWithGivenFragment(skipSessionStorage, fragment) - { - return parseInt(OSF.OUtil.parseInfoWithGivenFragment(_serializerVersionKey,_serializerVersionKeyPrefix,true,skipSessionStorage,fragment)) - }, - parseInfoFromWindowName: function OSF_OUtil$parseInfoFromWindowName(skipSessionStorage, windowName, infoKey) - { - try - { - var windowNameObj=JSON.parse(windowName); - var infoValue=windowNameObj !=null ? windowNameObj[infoKey] : null; - var osfSessionStorage=_getSessionStorage(); - if(!skipSessionStorage && osfSessionStorage && windowNameObj !=null) - { - var sessionKey=windowNameObj[OSF.WindowNameItemKeys.BaseFrameName]+infoKey; - if(infoValue) - osfSessionStorage.setItem(sessionKey,infoValue); - else - infoValue=osfSessionStorage.getItem(sessionKey) - } - return infoValue - } - catch(Exception) - { - return null - } - }, - parseInfoWithGivenFragment: function OSF_OUtil$parseInfoWithGivenFragment(infoKey, infoKeyPrefix, decodeInfo, skipSessionStorage, fragment) - { - var fragmentParts=fragment.split(infoKey); - var infoValue=fragmentParts.length > 1 ? fragmentParts[fragmentParts.length - 1] : null; - if(decodeInfo && infoValue !=null) - { - if(infoValue.indexOf(_fragmentInfoDelimiter) >=0) - infoValue=infoValue.split(_fragmentInfoDelimiter)[0]; - infoValue=decodeURIComponent(infoValue) - } - var osfSessionStorage=_getSessionStorage(); - if(!skipSessionStorage && osfSessionStorage) - { - var sessionKeyStart=window.name.indexOf(infoKeyPrefix); - if(sessionKeyStart > -1) - { - var sessionKeyEnd=window.name.indexOf(";",sessionKeyStart); - if(sessionKeyEnd==-1) - sessionKeyEnd=window.name.length; - var sessionKey=window.name.substring(sessionKeyStart,sessionKeyEnd); - if(infoValue) - osfSessionStorage.setItem(sessionKey,infoValue); - else - infoValue=osfSessionStorage.getItem(sessionKey) - } - } - return infoValue - }, - getConversationId: function OSF_OUtil$getConversationId() - { - var searchString=window.location.search; - var conversationId=null; - if(searchString) - { - var index=searchString.indexOf("&"); - conversationId=index > 0 ? searchString.substring(1,index) : searchString.substr(1); - if(conversationId && conversationId.charAt(conversationId.length - 1)==="=") - { - conversationId=conversationId.substring(0,conversationId.length - 1); - if(conversationId) - conversationId=decodeURIComponent(conversationId) - } - } - return conversationId - }, - getInfoItems: function OSF_OUtil$getInfoItems(strInfo) - { - var items=strInfo.split("$"); - if(typeof items[1]=="undefined") - items=strInfo.split("|"); - if(typeof items[1]=="undefined") - items=strInfo.split("%7C"); - return items - }, - getXdmFieldValue: function OSF_OUtil$getXdmFieldValue(xdmFieldName, skipSessionStorage) - { - var fieldValue=""; - var xdmInfoValue=OSF.OUtil.parseXdmInfo(skipSessionStorage); - if(xdmInfoValue) - { - var items=OSF.OUtil.getInfoItems(xdmInfoValue); - if(items !=undefined && items.length >=3) - switch(xdmFieldName) - { - case OSF.XdmFieldName.ConversationUrl: - fieldValue=items[2]; - case OSF.XdmFieldName.AppId: - fieldValue=items[1] - } - } - return fieldValue - }, - validateParamObject: function OSF_OUtil$validateParamObject(params, expectedProperties, callback) - { - var e=Function._validateParams(arguments,[{ - name: "params", - type: Object, - mayBeNull: false - },{ - name: "expectedProperties", - type: Object, - mayBeNull: false - },{ - name: "callback", - type: Function, - mayBeNull: true - }]); - if(e) - throw e; - for(var p in expectedProperties) - { - e=Function._validateParameter(params[p],expectedProperties[p],p); - if(e) - throw e; - } - }, - writeProfilerMark: function OSF_OUtil$writeProfilerMark(text) - { - if(window.msWriteProfilerMark) - { - window.msWriteProfilerMark(text); - OsfMsAjaxFactory.msAjaxDebug.trace(text) - } - }, - outputDebug: function OSF_OUtil$outputDebug(text) - { - if(typeof OsfMsAjaxFactory !=="undefined" && OsfMsAjaxFactory.msAjaxDebug && OsfMsAjaxFactory.msAjaxDebug.trace) - OsfMsAjaxFactory.msAjaxDebug.trace(text) - }, - defineNondefaultProperty: function OSF_OUtil$defineNondefaultProperty(obj, prop, descriptor, attributes) - { - descriptor=descriptor || {}; - for(var nd in attributes) - { - var attribute=attributes[nd]; - if(descriptor[attribute]==undefined) - descriptor[attribute]=true - } - Object.defineProperty(obj,prop,descriptor); - return obj - }, - defineNondefaultProperties: function OSF_OUtil$defineNondefaultProperties(obj, descriptors, attributes) - { - descriptors=descriptors || {}; - for(var prop in descriptors) - OSF.OUtil.defineNondefaultProperty(obj,prop,descriptors[prop],attributes); - return obj - }, - defineEnumerableProperty: function OSF_OUtil$defineEnumerableProperty(obj, prop, descriptor) - { - return OSF.OUtil.defineNondefaultProperty(obj,prop,descriptor,["enumerable"]) - }, - defineEnumerableProperties: function OSF_OUtil$defineEnumerableProperties(obj, descriptors) - { - return OSF.OUtil.defineNondefaultProperties(obj,descriptors,["enumerable"]) - }, - defineMutableProperty: function OSF_OUtil$defineMutableProperty(obj, prop, descriptor) - { - return OSF.OUtil.defineNondefaultProperty(obj,prop,descriptor,["writable","enumerable","configurable"]) - }, - defineMutableProperties: function OSF_OUtil$defineMutableProperties(obj, descriptors) - { - return OSF.OUtil.defineNondefaultProperties(obj,descriptors,["writable","enumerable","configurable"]) - }, - finalizeProperties: function OSF_OUtil$finalizeProperties(obj, descriptor) - { - descriptor=descriptor || {}; - var props=Object.getOwnPropertyNames(obj); - var propsLength=props.length; - for(var i=0; i < propsLength; i++) - { - var prop=props[i]; - var desc=Object.getOwnPropertyDescriptor(obj,prop); - if(!desc.get && !desc.set) - desc.writable=descriptor.writable || false; - desc.configurable=descriptor.configurable || false; - desc.enumerable=descriptor.enumerable || true; - Object.defineProperty(obj,prop,desc) - } - return obj - }, - mapList: function OSF_OUtil$MapList(list, mapFunction) - { - var ret=[]; - if(list) - for(var item in list) - ret.push(mapFunction(list[item])); - return ret - }, - listContainsKey: function OSF_OUtil$listContainsKey(list, key) - { - for(var item in list) - if(key==item) - return true; - return false - }, - listContainsValue: function OSF_OUtil$listContainsElement(list, value) - { - for(var item in list) - if(value==list[item]) - return true; - return false - }, - augmentList: function OSF_OUtil$augmentList(list, addenda) - { - var add=list.push ? function(key, value) - { - list.push(value) - } : function(key, value) - { - list[key]=value - }; - for(var key in addenda) - add(key,addenda[key]) - }, - redefineList: function OSF_Outil$redefineList(oldList, newList) - { - for(var key1 in oldList) - delete oldList[key1]; - for(var key2 in newList) - oldList[key2]=newList[key2] - }, - isArray: function OSF_OUtil$isArray(obj) - { - return Object.prototype.toString.apply(obj)==="[object Array]" - }, - isFunction: function OSF_OUtil$isFunction(obj) - { - return Object.prototype.toString.apply(obj)==="[object Function]" - }, - isDate: function OSF_OUtil$isDate(obj) - { - return Object.prototype.toString.apply(obj)==="[object Date]" - }, - addEventListener: function OSF_OUtil$addEventListener(element, eventName, listener) - { - if(element.addEventListener) - element.addEventListener(eventName,listener,false); - else if(Sys.Browser.agent===Sys.Browser.InternetExplorer && element.attachEvent) - element.attachEvent("on"+eventName,listener); - else - element["on"+eventName]=listener - }, - removeEventListener: function OSF_OUtil$removeEventListener(element, eventName, listener) - { - if(element.removeEventListener) - element.removeEventListener(eventName,listener,false); - else if(Sys.Browser.agent===Sys.Browser.InternetExplorer && element.detachEvent) - element.detachEvent("on"+eventName,listener); - else - element["on"+eventName]=null - }, - getCookieValue: function OSF_OUtil$getCookieValue(cookieName) - { - var tmpCookieString=RegExp(cookieName+"[^;]+").exec(document.cookie); - return tmpCookieString.toString().replace(/^[^=]+./,"") - }, - xhrGet: function OSF_OUtil$xhrGet(url, onSuccess, onError) - { - var xmlhttp; - try - { - xmlhttp=new XMLHttpRequest; - xmlhttp.onreadystatechange=function() - { - if(xmlhttp.readyState==4) - if(xmlhttp.status==200) - onSuccess(xmlhttp.responseText); - else - onError(xmlhttp.status) - }; - xmlhttp.open("GET",url,true); - xmlhttp.send() - } - catch(ex) - { - onError(ex) - } - }, - xhrGetFull: function OSF_OUtil$xhrGetFull(url, oneDriveFileName, onSuccess, onError) - { - var xmlhttp; - var requestedFileName=oneDriveFileName; - try - { - xmlhttp=new XMLHttpRequest; - xmlhttp.onreadystatechange=function() - { - if(xmlhttp.readyState==4) - if(xmlhttp.status==200) - onSuccess(xmlhttp,requestedFileName); - else - onError(xmlhttp.status) - }; - xmlhttp.open("GET",url,true); - xmlhttp.send() - } - catch(ex) - { - onError(ex) - } - }, - encodeBase64: function OSF_Outil$encodeBase64(input) - { - if(!input) - return input; - var codex="ABCDEFGHIJKLMNOP"+"QRSTUVWXYZabcdef"+"ghijklmnopqrstuv"+"wxyz0123456789+/="; - var output=[]; - var temp=[]; - var index=0; - var c1, - c2, - c3, - a, - b, - c; - var i; - var length=input.length; - do - { - c1=input.charCodeAt(index++); - c2=input.charCodeAt(index++); - c3=input.charCodeAt(index++); - i=0; - a=c1 & 255; - b=c1 >> 8; - c=c2 & 255; - temp[i++]=a >> 2; - temp[i++]=(a & 3) << 4 | b >> 4; - temp[i++]=(b & 15) << 2 | c >> 6; - temp[i++]=c & 63; - if(!isNaN(c2)) - { - a=c2 >> 8; - b=c3 & 255; - c=c3 >> 8; - temp[i++]=a >> 2; - temp[i++]=(a & 3) << 4 | b >> 4; - temp[i++]=(b & 15) << 2 | c >> 6; - temp[i++]=c & 63 - } - if(isNaN(c2)) - temp[i - 1]=64; - else if(isNaN(c3)) - { - temp[i - 2]=64; - temp[i - 1]=64 - } - for(var t=0; t < i; t++) - output.push(codex.charAt(temp[t])) - } while(index < length); - return output.join("") - }, - getSessionStorage: function OSF_Outil$getSessionStorage() - { - return _getSessionStorage() - }, - getLocalStorage: function OSF_Outil$getLocalStorage() - { - if(!_safeLocalStorage) - { - try - { - var localStorage=window.localStorage - } - catch(ex) - { - localStorage=null - } - _safeLocalStorage=new OfficeExt.SafeStorage(localStorage) - } - return _safeLocalStorage - }, - convertIntToCssHexColor: function OSF_Outil$convertIntToCssHexColor(val) - { - var hex="#"+(Number(val)+16777216).toString(16).slice(-6); - return hex - }, - attachClickHandler: function OSF_Outil$attachClickHandler(element, handler) - { - element.onclick=function(e) - { - handler() - }; - element.ontouchend=function(e) - { - handler(); - e.preventDefault() - } - }, - getQueryStringParamValue: function OSF_Outil$getQueryStringParamValue(queryString, paramName) - { - var e=Function._validateParams(arguments,[{ - name: "queryString", - type: String, - mayBeNull: false - },{ - name: "paramName", - type: String, - mayBeNull: false - }]); - if(e) - { - OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null."); - return"" - } - var queryExp=new RegExp("[\\?&]"+paramName+"=([^&#]*)","i"); - if(!queryExp.test(queryString)) - { - OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found."); - return"" - } - return queryExp.exec(queryString)[1] - }, - isiOS: function OSF_Outil$isiOS() - { - return window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false - }, - isChrome: function OSF_Outil$isChrome() - { - return window.navigator.userAgent.indexOf("Chrome") > 0 && !OSF.OUtil.isEdge() - }, - isEdge: function OSF_Outil$isEdge() - { - return window.navigator.userAgent.indexOf("Edge") > 0 - }, - isIE: function OSF_Outil$isIE() - { - return window.navigator.userAgent.indexOf("Trident") > 0 - }, - isFirefox: function OSF_Outil$isFirefox() - { - return window.navigator.userAgent.indexOf("Firefox") > 0 - }, - shallowCopy: function OSF_Outil$shallowCopy(sourceObj) - { - var copyObj=sourceObj.constructor(); - for(var property in sourceObj) - if(sourceObj.hasOwnProperty(property)) - copyObj[property]=sourceObj[property]; - return copyObj - }, - createObject: function OSF_Outil$createObject(properties) - { - var obj=null; - if(properties) - { - obj={}; - var len=properties.length; - for(var i=0; i < len; i++) - obj[properties[i].name]=properties[i].value - } - return obj - }, - addClass: function OSF_OUtil$addClass(elmt, val) - { - if(!OSF.OUtil.hasClass(elmt,val)) - { - var className=elmt.getAttribute(_classN); - if(className) - elmt.setAttribute(_classN,className+" "+val); - else - elmt.setAttribute(_classN,val) - } - }, - hasClass: function OSF_OUtil$hasClass(elmt, clsName) - { - var className=elmt.getAttribute(_classN); - return className && className.match(new RegExp("(\\s|^)"+clsName+"(\\s|$)")) - }, - focusToFirstTabbable: function OSF_OUtil$focusToFirstTabbable(all, backward) - { - var next; - var focused=false; - var candidate; - var setFlag=function(e) - { - focused=true - }; - var findNextPos=function(allLen, currPos, backward) - { - if(currPos < 0 || currPos > allLen) - return-1; - else if(currPos===0 && backward) - return-1; - else if(currPos===allLen - 1 && !backward) - return-1; - if(backward) - return currPos - 1; - else - return currPos+1 - }; - all=_reOrderTabbableElements(all); - next=backward ? all.length - 1 : 0; - if(all.length===0) - return null; - while(!focused && next >=0 && next < all.length) - { - candidate=all[next]; - window.focus(); - candidate.addEventListener("focus",setFlag); - candidate.focus(); - candidate.removeEventListener("focus",setFlag); - next=findNextPos(all.length,next,backward); - if(!focused && candidate===document.activeElement) - focused=true - } - if(focused) - return candidate; - else - return null - }, - focusToNextTabbable: function OSF_OUtil$focusToNextTabbable(all, curr, shift) - { - var currPos; - var next; - var focused=false; - var candidate; - var setFlag=function(e) - { - focused=true - }; - var findCurrPos=function(all, curr) - { - var i=0; - for(; i < all.length; i++) - if(all[i]===curr) - return i; - return-1 - }; - var findNextPos=function(allLen, currPos, shift) - { - if(currPos < 0 || currPos > allLen) - return-1; - else if(currPos===0 && shift) - return-1; - else if(currPos===allLen - 1 && !shift) - return-1; - if(shift) - return currPos - 1; - else - return currPos+1 - }; - all=_reOrderTabbableElements(all); - currPos=findCurrPos(all,curr); - next=findNextPos(all.length,currPos,shift); - if(next < 0) - return null; - while(!focused && next >=0 && next < all.length) - { - candidate=all[next]; - candidate.addEventListener("focus",setFlag); - candidate.focus(); - candidate.removeEventListener("focus",setFlag); - next=findNextPos(all.length,next,shift); - if(!focused && candidate===document.activeElement) - focused=true - } - if(focused) - return candidate; - else - return null - } - } + var _uniqueId = -1; + var _xdmInfoKey = "&_xdm_Info="; + var _serializerVersionKey = "&_serializer_version="; + var _xdmSessionKeyPrefix = "_xdm_"; + var _serializerVersionKeyPrefix = "_serializer_version="; + var _fragmentSeparator = "#"; + var _fragmentInfoDelimiter = "&"; + var _classN = "class"; + var _loadedScripts = {}; + var _defaultScriptLoadingTimeout = 3e4; + var _safeSessionStorage = null; + var _safeLocalStorage = null; + var _rndentropy = (new Date).getTime(); + function _random() + { + var nextrand = 2147483647 * Math.random(); + nextrand ^= _rndentropy ^ (new Date).getMilliseconds() << Math.floor(Math.random() * (31 - 10)); + return nextrand.toString(16) + } + function _getSessionStorage() + { + if(!_safeSessionStorage) + { + try + { + var sessionStorage = window.sessionStorage + } + catch(ex) + { + sessionStorage = null + } + _safeSessionStorage = new OfficeExt.SafeStorage(sessionStorage) + } + return _safeSessionStorage + } + function _reOrderTabbableElements(elements) + { + var bucket0 = []; + var bucketPositive = []; + var i; + var len = elements.length; + var ele; + for(i = 0; i < len; i++) + { + ele = elements[i]; + if(ele.tabIndex) + { + if(ele.tabIndex > 0) + bucketPositive.push(ele); + else if(ele.tabIndex === 0) + bucket0.push(ele) + } + else + bucket0.push(ele) + } + bucketPositive = bucketPositive.sort(function(left, right) + { + var diff = left.tabIndex - right.tabIndex; + if(diff === 0) + diff = bucketPositive.indexOf(left) - bucketPositive.indexOf(right); + return diff + }); + return[].concat(bucketPositive,bucket0) + } + return{ + set_entropy: function OSF_OUtil$set_entropy(entropy) + { + if(typeof entropy == "string") + for(var i = 0; i < entropy.length; i += 4) + { + var temp = 0; + for(var j = 0; j < 4 && i + j < entropy.length; j++) + temp = (temp << 8) + entropy.charCodeAt(i + j); + _rndentropy ^= temp + } + else if(typeof entropy == "number") + _rndentropy ^= entropy; + else + _rndentropy ^= 2147483647 * Math.random(); + _rndentropy &= 2147483647 + }, + extend: function OSF_OUtil$extend(child, parent) + { + var F = function(){}; + F.prototype = parent.prototype; + child.prototype = new F; + child.prototype.constructor = child; + child.uber = parent.prototype; + if(parent.prototype.constructor === Object.prototype.constructor) + parent.prototype.constructor = parent + }, + setNamespace: function OSF_OUtil$setNamespace(name, parent) + { + if(parent && name && !parent[name]) + parent[name] = {} + }, + unsetNamespace: function OSF_OUtil$unsetNamespace(name, parent) + { + if(parent && name && parent[name]) + delete parent[name] + }, + serializeSettings: function OSF_OUtil$serializeSettings(settingsCollection) + { + var ret = {}; + for(var key in settingsCollection) + { + var value = settingsCollection[key]; + try + { + if(JSON) + value = JSON.stringify(value,function dateReplacer(k, v) + { + return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix + this[k].getTime() + OSF.DDA.SettingsManager.DataJSONSuffix : v + }); + else + value = Sys.Serialization.JavaScriptSerializer.serialize(value); + ret[key] = value + } + catch(ex){} + } + return ret + }, + deserializeSettings: function OSF_OUtil$deserializeSettings(serializedSettings) + { + var ret = {}; + serializedSettings = serializedSettings || {}; + for(var key in serializedSettings) + { + var value = serializedSettings[key]; + try + { + if(JSON) + value = JSON.parse(value,function dateReviver(k, v) + { + var d; + if(typeof v === "string" && v && v.length > 6 && v.slice(0,5) === OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1) === OSF.DDA.SettingsManager.DataJSONSuffix) + { + d = new Date(parseInt(v.slice(5,-1))); + if(d) + return d + } + return v + }); + else + value = Sys.Serialization.JavaScriptSerializer.deserialize(value,true); + ret[key] = value + } + catch(ex){} + } + return ret + }, + loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) + { + if(url && callback) + { + var doc = window.document; + var _loadedScriptEntry = _loadedScripts[url]; + if(!_loadedScriptEntry) + { + var script = doc.createElement("script"); + script.type = "text/javascript"; + _loadedScriptEntry = { + loaded: false, + pendingCallbacks: [callback], + timer: null + }; + _loadedScripts[url] = _loadedScriptEntry; + var onLoadCallback = function OSF_OUtil_loadScript$onLoadCallback() + { + if(_loadedScriptEntry.timer != null) + { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer + } + _loadedScriptEntry.loaded = true; + var pendingCallbackCount = _loadedScriptEntry.pendingCallbacks.length; + for(var i = 0; i < pendingCallbackCount; i++) + { + var currentCallback = _loadedScriptEntry.pendingCallbacks.shift(); + currentCallback() + } + }; + var onLoadError = function OSF_OUtil_loadScript$onLoadError() + { + delete _loadedScripts[url]; + if(_loadedScriptEntry.timer != null) + { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer + } + var pendingCallbackCount = _loadedScriptEntry.pendingCallbacks.length; + for(var i = 0; i < pendingCallbackCount; i++) + { + var currentCallback = _loadedScriptEntry.pendingCallbacks.shift(); + currentCallback() + } + }; + if(script.readyState) + script.onreadystatechange = function() + { + if(script.readyState == "loaded" || script.readyState == "complete") + { + script.onreadystatechange = null; + onLoadCallback() + } + }; + else + script.onload = onLoadCallback; + script.onerror = onLoadError; + timeoutInMs = timeoutInMs || _defaultScriptLoadingTimeout; + _loadedScriptEntry.timer = setTimeout(onLoadError,timeoutInMs); + script.setAttribute("crossOrigin","anonymous"); + script.src = url; + doc.getElementsByTagName("head")[0].appendChild(script) + } + else if(_loadedScriptEntry.loaded) + callback(); + else + _loadedScriptEntry.pendingCallbacks.push(callback) + } + }, + loadCSS: function OSF_OUtil$loadCSS(url) + { + if(url) + { + var doc = window.document; + var link = doc.createElement("link"); + link.type = "text/css"; + link.rel = "stylesheet"; + link.href = url; + doc.getElementsByTagName("head")[0].appendChild(link) + } + }, + parseEnum: function OSF_OUtil$parseEnum(str, enumObject) + { + var parsed = enumObject[str.trim()]; + if(typeof parsed == "undefined") + { + OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:" + str); + throw OsfMsAjaxFactory.msAjaxError.argument("str"); + } + return parsed + }, + delayExecutionAndCache: function OSF_OUtil$delayExecutionAndCache() + { + var obj = {calc: arguments[0]}; + return function() + { + if(obj.calc) + { + obj.val = obj.calc.apply(this,arguments); + delete obj.calc + } + return obj.val + } + }, + getUniqueId: function OSF_OUtil$getUniqueId() + { + _uniqueId = _uniqueId + 1; + return _uniqueId.toString() + }, + formatString: function OSF_OUtil$formatString() + { + var args = arguments; + var source = args[0]; + return source.replace(/{(\d+)}/gm,function(match, number) + { + var index = parseInt(number,10) + 1; + return args[index] === undefined ? "{" + number + "}" : args[index] + }) + }, + generateConversationId: function OSF_OUtil$generateConversationId() + { + return[_random(),_random(),(new Date).getTime().toString()].join("_") + }, + getFrameName: function OSF_OUtil$getFrameName(cacheKey) + { + return _xdmSessionKeyPrefix + cacheKey + this.generateConversationId() + }, + addXdmInfoAsHash: function OSF_OUtil$addXdmInfoAsHash(url, xdmInfoValue) + { + return OSF.OUtil.addInfoAsHash(url,_xdmInfoKey,xdmInfoValue,false) + }, + addSerializerVersionAsHash: function OSF_OUtil$addSerializerVersionAsHash(url, serializerVersion) + { + return OSF.OUtil.addInfoAsHash(url,_serializerVersionKey,serializerVersion,true) + }, + addInfoAsHash: function OSF_OUtil$addInfoAsHash(url, keyName, infoValue, encodeInfo) + { + url = url.trim() || ""; + var urlParts = url.split(_fragmentSeparator); + var urlWithoutFragment = urlParts.shift(); + var fragment = urlParts.join(_fragmentSeparator); + var newFragment; + if(encodeInfo) + newFragment = [keyName,encodeURIComponent(infoValue),fragment].join(""); + else + newFragment = [fragment,keyName,infoValue].join(""); + return[urlWithoutFragment,_fragmentSeparator,newFragment].join("") + }, + parseHostInfoFromWindowName: function OSF_OUtil$parseHostInfoFromWindowName(skipSessionStorage, windowName) + { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage,windowName,OSF.WindowNameItemKeys.HostInfo) + }, + parseXdmInfo: function OSF_OUtil$parseXdmInfo(skipSessionStorage) + { + var xdmInfoValue = OSF.OUtil.parseXdmInfoWithGivenFragment(skipSessionStorage,window.location.hash); + if(!xdmInfoValue) + xdmInfoValue = OSF.OUtil.parseXdmInfoFromWindowName(skipSessionStorage,window.name); + return xdmInfoValue + }, + parseXdmInfoFromWindowName: function OSF_OUtil$parseXdmInfoFromWindowName(skipSessionStorage, windowName) + { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage,windowName,OSF.WindowNameItemKeys.XdmInfo) + }, + parseXdmInfoWithGivenFragment: function OSF_OUtil$parseXdmInfoWithGivenFragment(skipSessionStorage, fragment) + { + return OSF.OUtil.parseInfoWithGivenFragment(_xdmInfoKey,_xdmSessionKeyPrefix,false,skipSessionStorage,fragment) + }, + parseSerializerVersion: function OSF_OUtil$parseSerializerVersion(skipSessionStorage) + { + var serializerVersion = OSF.OUtil.parseSerializerVersionWithGivenFragment(skipSessionStorage,window.location.hash); + if(isNaN(serializerVersion)) + serializerVersion = OSF.OUtil.parseSerializerVersionFromWindowName(skipSessionStorage,window.name); + return serializerVersion + }, + parseSerializerVersionFromWindowName: function OSF_OUtil$parseSerializerVersionFromWindowName(skipSessionStorage, windowName) + { + return parseInt(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage,windowName,OSF.WindowNameItemKeys.SerializerVersion)) + }, + parseSerializerVersionWithGivenFragment: function OSF_OUtil$parseSerializerVersionWithGivenFragment(skipSessionStorage, fragment) + { + return parseInt(OSF.OUtil.parseInfoWithGivenFragment(_serializerVersionKey,_serializerVersionKeyPrefix,true,skipSessionStorage,fragment)) + }, + parseInfoFromWindowName: function OSF_OUtil$parseInfoFromWindowName(skipSessionStorage, windowName, infoKey) + { + try + { + var windowNameObj = JSON.parse(windowName); + var infoValue = windowNameObj != null ? windowNameObj[infoKey] : null; + var osfSessionStorage = _getSessionStorage(); + if(!skipSessionStorage && osfSessionStorage && windowNameObj != null) + { + var sessionKey = windowNameObj[OSF.WindowNameItemKeys.BaseFrameName] + infoKey; + if(infoValue) + osfSessionStorage.setItem(sessionKey,infoValue); + else + infoValue = osfSessionStorage.getItem(sessionKey) + } + return infoValue + } + catch(Exception) + { + return null + } + }, + parseInfoWithGivenFragment: function OSF_OUtil$parseInfoWithGivenFragment(infoKey, infoKeyPrefix, decodeInfo, skipSessionStorage, fragment) + { + var fragmentParts = fragment.split(infoKey); + var infoValue = fragmentParts.length > 1 ? fragmentParts[fragmentParts.length - 1] : null; + if(decodeInfo && infoValue != null) + { + if(infoValue.indexOf(_fragmentInfoDelimiter) >= 0) + infoValue = infoValue.split(_fragmentInfoDelimiter)[0]; + infoValue = decodeURIComponent(infoValue) + } + var osfSessionStorage = _getSessionStorage(); + if(!skipSessionStorage && osfSessionStorage) + { + var sessionKeyStart = window.name.indexOf(infoKeyPrefix); + if(sessionKeyStart > -1) + { + var sessionKeyEnd = window.name.indexOf(";",sessionKeyStart); + if(sessionKeyEnd == -1) + sessionKeyEnd = window.name.length; + var sessionKey = window.name.substring(sessionKeyStart,sessionKeyEnd); + if(infoValue) + osfSessionStorage.setItem(sessionKey,infoValue); + else + infoValue = osfSessionStorage.getItem(sessionKey) + } + } + return infoValue + }, + getConversationId: function OSF_OUtil$getConversationId() + { + var searchString = window.location.search; + var conversationId = null; + if(searchString) + { + var index = searchString.indexOf("&"); + conversationId = index > 0 ? searchString.substring(1,index) : searchString.substr(1); + if(conversationId && conversationId.charAt(conversationId.length - 1) === "=") + { + conversationId = conversationId.substring(0,conversationId.length - 1); + if(conversationId) + conversationId = decodeURIComponent(conversationId) + } + } + return conversationId + }, + getInfoItems: function OSF_OUtil$getInfoItems(strInfo) + { + var items = strInfo.split("$"); + if(typeof items[1] == "undefined") + items = strInfo.split("|"); + if(typeof items[1] == "undefined") + items = strInfo.split("%7C"); + return items + }, + getXdmFieldValue: function OSF_OUtil$getXdmFieldValue(xdmFieldName, skipSessionStorage) + { + var fieldValue = ""; + var xdmInfoValue = OSF.OUtil.parseXdmInfo(skipSessionStorage); + if(xdmInfoValue) + { + var items = OSF.OUtil.getInfoItems(xdmInfoValue); + if(items != undefined && items.length >= 3) + switch(xdmFieldName) + { + case OSF.XdmFieldName.ConversationUrl: + fieldValue = items[2]; + break; + case OSF.XdmFieldName.AppId: + fieldValue = items[1]; + break + } + } + return fieldValue + }, + validateParamObject: function OSF_OUtil$validateParamObject(params, expectedProperties, callback) + { + var e = Function._validateParams(arguments,[{ + name: "params", + type: Object, + mayBeNull: false + },{ + name: "expectedProperties", + type: Object, + mayBeNull: false + },{ + name: "callback", + type: Function, + mayBeNull: true + }]); + if(e) + throw e; + for(var p in expectedProperties) + { + e = Function._validateParameter(params[p],expectedProperties[p],p); + if(e) + throw e; + } + }, + writeProfilerMark: function OSF_OUtil$writeProfilerMark(text) + { + if(window.msWriteProfilerMark) + { + window.msWriteProfilerMark(text); + OsfMsAjaxFactory.msAjaxDebug.trace(text) + } + }, + outputDebug: function OSF_OUtil$outputDebug(text) + { + if(typeof OsfMsAjaxFactory !== "undefined" && OsfMsAjaxFactory.msAjaxDebug && OsfMsAjaxFactory.msAjaxDebug.trace) + OsfMsAjaxFactory.msAjaxDebug.trace(text) + }, + defineNondefaultProperty: function OSF_OUtil$defineNondefaultProperty(obj, prop, descriptor, attributes) + { + descriptor = descriptor || {}; + for(var nd in attributes) + { + var attribute = attributes[nd]; + if(descriptor[attribute] == undefined) + descriptor[attribute] = true + } + Object.defineProperty(obj,prop,descriptor); + return obj + }, + defineNondefaultProperties: function OSF_OUtil$defineNondefaultProperties(obj, descriptors, attributes) + { + descriptors = descriptors || {}; + for(var prop in descriptors) + OSF.OUtil.defineNondefaultProperty(obj,prop,descriptors[prop],attributes); + return obj + }, + defineEnumerableProperty: function OSF_OUtil$defineEnumerableProperty(obj, prop, descriptor) + { + return OSF.OUtil.defineNondefaultProperty(obj,prop,descriptor,["enumerable"]) + }, + defineEnumerableProperties: function OSF_OUtil$defineEnumerableProperties(obj, descriptors) + { + return OSF.OUtil.defineNondefaultProperties(obj,descriptors,["enumerable"]) + }, + defineMutableProperty: function OSF_OUtil$defineMutableProperty(obj, prop, descriptor) + { + return OSF.OUtil.defineNondefaultProperty(obj,prop,descriptor,["writable","enumerable","configurable"]) + }, + defineMutableProperties: function OSF_OUtil$defineMutableProperties(obj, descriptors) + { + return OSF.OUtil.defineNondefaultProperties(obj,descriptors,["writable","enumerable","configurable"]) + }, + finalizeProperties: function OSF_OUtil$finalizeProperties(obj, descriptor) + { + descriptor = descriptor || {}; + var props = Object.getOwnPropertyNames(obj); + var propsLength = props.length; + for(var i = 0; i < propsLength; i++) + { + var prop = props[i]; + var desc = Object.getOwnPropertyDescriptor(obj,prop); + if(!desc.get && !desc.set) + desc.writable = descriptor.writable || false; + desc.configurable = descriptor.configurable || false; + desc.enumerable = descriptor.enumerable || true; + Object.defineProperty(obj,prop,desc) + } + return obj + }, + mapList: function OSF_OUtil$MapList(list, mapFunction) + { + var ret = []; + if(list) + for(var item in list) + ret.push(mapFunction(list[item])); + return ret + }, + listContainsKey: function OSF_OUtil$listContainsKey(list, key) + { + for(var item in list) + if(key == item) + return true; + return false + }, + listContainsValue: function OSF_OUtil$listContainsElement(list, value) + { + for(var item in list) + if(value == list[item]) + return true; + return false + }, + augmentList: function OSF_OUtil$augmentList(list, addenda) + { + var add = list.push ? function(key, value) + { + list.push(value) + } : function(key, value) + { + list[key] = value + }; + for(var key in addenda) + add(key,addenda[key]) + }, + redefineList: function OSF_Outil$redefineList(oldList, newList) + { + for(var key1 in oldList) + delete oldList[key1]; + for(var key2 in newList) + oldList[key2] = newList[key2] + }, + isArray: function OSF_OUtil$isArray(obj) + { + return Object.prototype.toString.apply(obj) === "[object Array]" + }, + isFunction: function OSF_OUtil$isFunction(obj) + { + return Object.prototype.toString.apply(obj) === "[object Function]" + }, + isDate: function OSF_OUtil$isDate(obj) + { + return Object.prototype.toString.apply(obj) === "[object Date]" + }, + addEventListener: function OSF_OUtil$addEventListener(element, eventName, listener) + { + if(element.addEventListener) + element.addEventListener(eventName,listener,false); + else if(Sys.Browser.agent === Sys.Browser.InternetExplorer && element.attachEvent) + element.attachEvent("on" + eventName,listener); + else + element["on" + eventName] = listener + }, + removeEventListener: function OSF_OUtil$removeEventListener(element, eventName, listener) + { + if(element.removeEventListener) + element.removeEventListener(eventName,listener,false); + else if(Sys.Browser.agent === Sys.Browser.InternetExplorer && element.detachEvent) + element.detachEvent("on" + eventName,listener); + else + element["on" + eventName] = null + }, + getCookieValue: function OSF_OUtil$getCookieValue(cookieName) + { + var tmpCookieString = RegExp(cookieName + "[^;]+").exec(document.cookie); + return tmpCookieString.toString().replace(/^[^=]+./,"") + }, + xhrGet: function OSF_OUtil$xhrGet(url, onSuccess, onError) + { + var xmlhttp; + try + { + xmlhttp = new XMLHttpRequest; + xmlhttp.onreadystatechange = function() + { + if(xmlhttp.readyState == 4) + if(xmlhttp.status == 200) + onSuccess(xmlhttp.responseText); + else + onError(xmlhttp.status) + }; + xmlhttp.open("GET",url,true); + xmlhttp.send() + } + catch(ex) + { + onError(ex) + } + }, + xhrGetFull: function OSF_OUtil$xhrGetFull(url, oneDriveFileName, onSuccess, onError) + { + var xmlhttp; + var requestedFileName = oneDriveFileName; + try + { + xmlhttp = new XMLHttpRequest; + xmlhttp.onreadystatechange = function() + { + if(xmlhttp.readyState == 4) + if(xmlhttp.status == 200) + onSuccess(xmlhttp,requestedFileName); + else + onError(xmlhttp.status) + }; + xmlhttp.open("GET",url,true); + xmlhttp.send() + } + catch(ex) + { + onError(ex) + } + }, + encodeBase64: function OSF_Outil$encodeBase64(input) + { + if(!input) + return input; + var codex = "ABCDEFGHIJKLMNOP" + "QRSTUVWXYZabcdef" + "ghijklmnopqrstuv" + "wxyz0123456789+/="; + var output = []; + var temp = []; + var index = 0; + var c1, + c2, + c3, + a, + b, + c; + var i; + var length = input.length; + do + { + c1 = input.charCodeAt(index++); + c2 = input.charCodeAt(index++); + c3 = input.charCodeAt(index++); + i = 0; + a = c1 & 255; + b = c1 >> 8; + c = c2 & 255; + temp[i++] = a >> 2; + temp[i++] = (a & 3) << 4 | b >> 4; + temp[i++] = (b & 15) << 2 | c >> 6; + temp[i++] = c & 63; + if(!isNaN(c2)) + { + a = c2 >> 8; + b = c3 & 255; + c = c3 >> 8; + temp[i++] = a >> 2; + temp[i++] = (a & 3) << 4 | b >> 4; + temp[i++] = (b & 15) << 2 | c >> 6; + temp[i++] = c & 63 + } + if(isNaN(c2)) + temp[i - 1] = 64; + else if(isNaN(c3)) + { + temp[i - 2] = 64; + temp[i - 1] = 64 + } + for(var t = 0; t < i; t++) + output.push(codex.charAt(temp[t])) + } while(index < length); + return output.join("") + }, + getSessionStorage: function OSF_Outil$getSessionStorage() + { + return _getSessionStorage() + }, + getLocalStorage: function OSF_Outil$getLocalStorage() + { + if(!_safeLocalStorage) + { + try + { + var localStorage = window.localStorage + } + catch(ex) + { + localStorage = null + } + _safeLocalStorage = new OfficeExt.SafeStorage(localStorage) + } + return _safeLocalStorage + }, + convertIntToCssHexColor: function OSF_Outil$convertIntToCssHexColor(val) + { + var hex = "#" + (Number(val) + 16777216).toString(16).slice(-6); + return hex + }, + attachClickHandler: function OSF_Outil$attachClickHandler(element, handler) + { + element.onclick = function(e) + { + handler() + }; + element.ontouchend = function(e) + { + handler(); + e.preventDefault() + } + }, + getQueryStringParamValue: function OSF_Outil$getQueryStringParamValue(queryString, paramName) + { + var e = Function._validateParams(arguments,[{ + name: "queryString", + type: String, + mayBeNull: false + },{ + name: "paramName", + type: String, + mayBeNull: false + }]); + if(e) + { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null."); + return"" + } + var queryExp = new RegExp("[\\?&]" + paramName + "=([^&#]*)","i"); + if(!queryExp.test(queryString)) + { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found."); + return"" + } + return queryExp.exec(queryString)[1] + }, + isiOS: function OSF_Outil$isiOS() + { + return window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false + }, + isChrome: function OSF_Outil$isChrome() + { + return window.navigator.userAgent.indexOf("Chrome") > 0 && !OSF.OUtil.isEdge() + }, + isEdge: function OSF_Outil$isEdge() + { + return window.navigator.userAgent.indexOf("Edge") > 0 + }, + isIE: function OSF_Outil$isIE() + { + return window.navigator.userAgent.indexOf("Trident") > 0 + }, + isFirefox: function OSF_Outil$isFirefox() + { + return window.navigator.userAgent.indexOf("Firefox") > 0 + }, + shallowCopy: function OSF_Outil$shallowCopy(sourceObj) + { + if(sourceObj == null) + return null; + else if(!(sourceObj instanceof Object)) + return sourceObj; + else if(Array.isArray(sourceObj)) + { + var copyArr = []; + for(var i = 0; i < sourceObj.length; i++) + copyArr.push(sourceObj[i]); + return copyArr + } + else + { + var copyObj = sourceObj.constructor(); + for(var property in sourceObj) + if(sourceObj.hasOwnProperty(property)) + copyObj[property] = sourceObj[property]; + return copyObj + } + }, + createObject: function OSF_Outil$createObject(properties) + { + var obj = null; + if(properties) + { + obj = {}; + var len = properties.length; + for(var i = 0; i < len; i++) + obj[properties[i].name] = properties[i].value + } + return obj + }, + addClass: function OSF_OUtil$addClass(elmt, val) + { + if(!OSF.OUtil.hasClass(elmt,val)) + { + var className = elmt.getAttribute(_classN); + if(className) + elmt.setAttribute(_classN,className + " " + val); + else + elmt.setAttribute(_classN,val) + } + }, + removeClass: function OSF_OUtil$removeClass(elmt, val) + { + if(OSF.OUtil.hasClass(elmt,val)) + { + var className = elmt.getAttribute(_classN); + var reg = new RegExp("(\\s|^)" + val + "(\\s|$)"); + className = className.replace(reg,""); + elmt.setAttribute(_classN,className) + } + }, + hasClass: function OSF_OUtil$hasClass(elmt, clsName) + { + var className = elmt.getAttribute(_classN); + return className && className.match(new RegExp("(\\s|^)" + clsName + "(\\s|$)")) + }, + focusToFirstTabbable: function OSF_OUtil$focusToFirstTabbable(all, backward) + { + var next; + var focused = false; + var candidate; + var setFlag = function(e) + { + focused = true + }; + var findNextPos = function(allLen, currPos, backward) + { + if(currPos < 0 || currPos > allLen) + return-1; + else if(currPos === 0 && backward) + return-1; + else if(currPos === allLen - 1 && !backward) + return-1; + if(backward) + return currPos - 1; + else + return currPos + 1 + }; + all = _reOrderTabbableElements(all); + next = backward ? all.length - 1 : 0; + if(all.length === 0) + return null; + while(!focused && next >= 0 && next < all.length) + { + candidate = all[next]; + window.focus(); + candidate.addEventListener("focus",setFlag); + candidate.focus(); + candidate.removeEventListener("focus",setFlag); + next = findNextPos(all.length,next,backward); + if(!focused && candidate === document.activeElement) + focused = true + } + if(focused) + return candidate; + else + return null + }, + focusToNextTabbable: function OSF_OUtil$focusToNextTabbable(all, curr, shift) + { + var currPos; + var next; + var focused = false; + var candidate; + var setFlag = function(e) + { + focused = true + }; + var findCurrPos = function(all, curr) + { + var i = 0; + for(; i < all.length; i++) + if(all[i] === curr) + return i; + return-1 + }; + var findNextPos = function(allLen, currPos, shift) + { + if(currPos < 0 || currPos > allLen) + return-1; + else if(currPos === 0 && shift) + return-1; + else if(currPos === allLen - 1 && !shift) + return-1; + if(shift) + return currPos - 1; + else + return currPos + 1 + }; + all = _reOrderTabbableElements(all); + currPos = findCurrPos(all,curr); + next = findNextPos(all.length,currPos,shift); + if(next < 0) + return null; + while(!focused && next >= 0 && next < all.length) + { + candidate = all[next]; + candidate.addEventListener("focus",setFlag); + candidate.focus(); + candidate.removeEventListener("focus",setFlag); + next = findNextPos(all.length,next,shift); + if(!focused && candidate === document.activeElement) + focused = true + } + if(focused) + return candidate; + else + return null + } + } }(); -OSF.OUtil.Guid=function() +OSF.OUtil.Guid = function() { - var hexCode=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"]; - return{generateNewGuid: function OSF_Outil_Guid$generateNewGuid() - { - var result=""; - var tick=(new Date).getTime(); - var index=0; - for(; index < 32 && tick > 0; index++) - { - if(index==8 || index==12 || index==16 || index==20) - result+="-"; - result+=hexCode[tick % 16]; - tick=Math.floor(tick / 16) - } - for(; index < 32; index++) - { - if(index==8 || index==12 || index==16 || index==20) - result+="-"; - result+=hexCode[Math.floor(Math.random() * 16)] - } - return result - }} + var hexCode = ["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"]; + return{generateNewGuid: function OSF_Outil_Guid$generateNewGuid() + { + var result = ""; + var tick = (new Date).getTime(); + var index = 0; + for(; index < 32 && tick > 0; index++) + { + if(index == 8 || index == 12 || index == 16 || index == 20) + result += "-"; + result += hexCode[tick % 16]; + tick = Math.floor(tick / 16) + } + for(; index < 32; index++) + { + if(index == 8 || index == 12 || index == 16 || index == 20) + result += "-"; + result += hexCode[Math.floor(Math.random() * 16)] + } + return result + }} }(); -window.OSF=OSF; +window.OSF = OSF; OSF.OUtil.setNamespace("OSF",window); -OSF.AppName={ - Unsupported: 0, - Excel: 1, - Word: 2, - PowerPoint: 4, - Outlook: 8, - ExcelWebApp: 16, - WordWebApp: 32, - OutlookWebApp: 64, - Project: 128, - AccessWebApp: 256, - PowerpointWebApp: 512, - ExcelIOS: 1024, - Sway: 2048, - WordIOS: 4096, - PowerPointIOS: 8192, - Access: 16384, - Lync: 32768, - OutlookIOS: 65536, - OneNoteWebApp: 131072, - OneNote: 262144, - ExcelWinRT: 524288, - WordWinRT: 1048576, - PowerpointWinRT: 2097152, - OutlookAndroid: 4194304, - OneNoteWinRT: 8388608 +OSF.MessageIDs = { + FetchBundleUrl: 0, + LoadReactBundle: 1, + LoadBundleSuccess: 2, + LoadBundleError: 3 }; -OSF.InternalPerfMarker={ - DataCoercionBegin: "Agave.HostCall.CoerceDataStart", - DataCoercionEnd: "Agave.HostCall.CoerceDataEnd" +OSF.AppName = { + Unsupported: 0, + Excel: 1, + Word: 2, + PowerPoint: 4, + Outlook: 8, + ExcelWebApp: 16, + WordWebApp: 32, + OutlookWebApp: 64, + Project: 128, + AccessWebApp: 256, + PowerpointWebApp: 512, + ExcelIOS: 1024, + Sway: 2048, + WordIOS: 4096, + PowerPointIOS: 8192, + Access: 16384, + Lync: 32768, + OutlookIOS: 65536, + OneNoteWebApp: 131072, + OneNote: 262144, + ExcelWinRT: 524288, + WordWinRT: 1048576, + PowerpointWinRT: 2097152, + OutlookAndroid: 4194304, + OneNoteWinRT: 8388608, + ExcelAndroid: 8388609, + VisioWebApp: 8388610, + OneNoteIOS: 8388611 }; -OSF.HostCallPerfMarker={ - IssueCall: "Agave.HostCall.IssueCall", - ReceiveResponse: "Agave.HostCall.ReceiveResponse", - RuntimeExceptionRaised: "Agave.HostCall.RuntimeExecptionRaised" +OSF.InternalPerfMarker = { + DataCoercionBegin: "Agave.HostCall.CoerceDataStart", + DataCoercionEnd: "Agave.HostCall.CoerceDataEnd" }; -OSF.AgaveHostAction={ - Select: 0, - UnSelect: 1, - CancelDialog: 2, - InsertAgave: 3, - CtrlF6In: 4, - CtrlF6Exit: 5, - CtrlF6ExitShift: 6, - SelectWithError: 7, - NotifyHostError: 8, - RefreshAddinCommands: 9, - PageIsReady: 10, - TabIn: 11, - TabInShift: 12, - TabExit: 13, - TabExitShift: 14, - EscExit: 15, - F2Exit: 16, - ExitNoFocusable: 17, - ExitNoFocusableShift: 18 +OSF.HostCallPerfMarker = { + IssueCall: "Agave.HostCall.IssueCall", + ReceiveResponse: "Agave.HostCall.ReceiveResponse", + RuntimeExceptionRaised: "Agave.HostCall.RuntimeExecptionRaised" }; -OSF.SharedConstants={NotificationConversationIdSuffix: "_ntf"}; -OSF.DialogMessageType={ - DialogMessageReceived: 0, - DialogClosed: 12006 +OSF.AgaveHostAction = { + Select: 0, + UnSelect: 1, + CancelDialog: 2, + InsertAgave: 3, + CtrlF6In: 4, + CtrlF6Exit: 5, + CtrlF6ExitShift: 6, + SelectWithError: 7, + NotifyHostError: 8, + RefreshAddinCommands: 9, + PageIsReady: 10, + TabIn: 11, + TabInShift: 12, + TabExit: 13, + TabExitShift: 14, + EscExit: 15, + F2Exit: 16, + ExitNoFocusable: 17, + ExitNoFocusableShift: 18, + MouseEnter: 19, + MouseLeave: 20 }; -OSF.OfficeAppContext=function OSF_OfficeAppContext(id, appName, appVersion, appUILocale, dataLocale, docUrl, clientMode, settings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, appMinorVersion, requirementMatrix, hostCustomMessage, clientWindowHeight, clientWindowWidth, addinName) +OSF.SharedConstants = {NotificationConversationIdSuffix: "_ntf"}; +OSF.DialogMessageType = { + DialogMessageReceived: 0, + DialogParentMessageReceived: 1, + DialogClosed: 12006 +}; +OSF.OfficeAppContext = function OSF_OfficeAppContext(id, appName, appVersion, appUILocale, dataLocale, docUrl, clientMode, settings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, appMinorVersion, requirementMatrix, hostCustomMessage, hostFullVersion, clientWindowHeight, clientWindowWidth, addinName, appDomains, dialogRequirementMatrix) { - this._id=id; - this._appName=appName; - this._appVersion=appVersion; - this._appUILocale=appUILocale; - this._dataLocale=dataLocale; - this._docUrl=docUrl; - this._clientMode=clientMode; - this._settings=settings; - this._reason=reason; - this._osfControlType=osfControlType; - this._eToken=eToken; - this._correlationId=correlationId; - this._appInstanceId=appInstanceId; - this._touchEnabled=touchEnabled; - this._commerceAllowed=commerceAllowed; - this._appMinorVersion=appMinorVersion; - this._requirementMatrix=requirementMatrix; - this._hostCustomMessage=hostCustomMessage; - this._isDialog=false; - this._clientWindowHeight=clientWindowHeight; - this._clientWindowWidth=clientWindowWidth; - this._addinName=addinName; - this.get_id=function get_id() - { - return this._id - }; - this.get_appName=function get_appName() - { - return this._appName - }; - this.get_appVersion=function get_appVersion() - { - return this._appVersion - }; - this.get_appUILocale=function get_appUILocale() - { - return this._appUILocale - }; - this.get_dataLocale=function get_dataLocale() - { - return this._dataLocale - }; - this.get_docUrl=function get_docUrl() - { - return this._docUrl - }; - this.get_clientMode=function get_clientMode() - { - return this._clientMode - }; - this.get_bindings=function get_bindings() - { - return this._bindings - }; - this.get_settings=function get_settings() - { - return this._settings - }; - this.get_reason=function get_reason() - { - return this._reason - }; - this.get_osfControlType=function get_osfControlType() - { - return this._osfControlType - }; - this.get_eToken=function get_eToken() - { - return this._eToken - }; - this.get_correlationId=function get_correlationId() - { - return this._correlationId - }; - this.get_appInstanceId=function get_appInstanceId() - { - return this._appInstanceId - }; - this.get_touchEnabled=function get_touchEnabled() - { - return this._touchEnabled - }; - this.get_commerceAllowed=function get_commerceAllowed() - { - return this._commerceAllowed - }; - this.get_appMinorVersion=function get_appMinorVersion() - { - return this._appMinorVersion - }; - this.get_requirementMatrix=function get_requirementMatrix() - { - return this._requirementMatrix - }; - this.get_hostCustomMessage=function get_hostCustomMessage() - { - return this._hostCustomMessage - }; - this.get_isDialog=function get_isDialog() - { - return this._isDialog - }; - this.get_clientWindowHeight=function get_clientWindowHeight() - { - return this._clientWindowHeight - }; - this.get_clientWindowWidth=function get_clientWindowWidth() - { - return this._clientWindowWidth - }; - this.get_addinName=function get_addinName() - { - return this._addinName - } + this._id = id; + this._appName = appName; + this._appVersion = appVersion; + this._appUILocale = appUILocale; + this._dataLocale = dataLocale; + this._docUrl = docUrl; + this._clientMode = clientMode; + this._settings = settings; + this._reason = reason; + this._osfControlType = osfControlType; + this._eToken = eToken; + this._correlationId = correlationId; + this._appInstanceId = appInstanceId; + this._touchEnabled = touchEnabled; + this._commerceAllowed = commerceAllowed; + this._appMinorVersion = appMinorVersion; + this._requirementMatrix = requirementMatrix; + this._hostCustomMessage = hostCustomMessage; + this._hostFullVersion = hostFullVersion; + this._isDialog = false; + this._clientWindowHeight = clientWindowHeight; + this._clientWindowWidth = clientWindowWidth; + this._addinName = addinName; + this._appDomains = appDomains; + this._dialogRequirementMatrix = dialogRequirementMatrix; + this.get_id = function get_id() + { + return this._id + }; + this.get_appName = function get_appName() + { + return this._appName + }; + this.get_appVersion = function get_appVersion() + { + return this._appVersion + }; + this.get_appUILocale = function get_appUILocale() + { + return this._appUILocale + }; + this.get_dataLocale = function get_dataLocale() + { + return this._dataLocale + }; + this.get_docUrl = function get_docUrl() + { + return this._docUrl + }; + this.get_clientMode = function get_clientMode() + { + return this._clientMode + }; + this.get_bindings = function get_bindings() + { + return this._bindings + }; + this.get_settings = function get_settings() + { + return this._settings + }; + this.get_reason = function get_reason() + { + return this._reason + }; + this.get_osfControlType = function get_osfControlType() + { + return this._osfControlType + }; + this.get_eToken = function get_eToken() + { + return this._eToken + }; + this.get_correlationId = function get_correlationId() + { + return this._correlationId + }; + this.get_appInstanceId = function get_appInstanceId() + { + return this._appInstanceId + }; + this.get_touchEnabled = function get_touchEnabled() + { + return this._touchEnabled + }; + this.get_commerceAllowed = function get_commerceAllowed() + { + return this._commerceAllowed + }; + this.get_appMinorVersion = function get_appMinorVersion() + { + return this._appMinorVersion + }; + this.get_requirementMatrix = function get_requirementMatrix() + { + return this._requirementMatrix + }; + this.get_dialogRequirementMatrix = function get_dialogRequirementMatrix() + { + return this._dialogRequirementMatrix + }; + this.get_hostCustomMessage = function get_hostCustomMessage() + { + return this._hostCustomMessage + }; + this.get_hostFullVersion = function get_hostFullVersion() + { + return this._hostFullVersion + }; + this.get_isDialog = function get_isDialog() + { + return this._isDialog + }; + this.get_clientWindowHeight = function get_clientWindowHeight() + { + return this._clientWindowHeight + }; + this.get_clientWindowWidth = function get_clientWindowWidth() + { + return this._clientWindowWidth + }; + this.get_addinName = function get_addinName() + { + return this._addinName + }; + this.get_appDomains = function get_appDomains() + { + return this._appDomains + } }; -OSF.OsfControlType={ - DocumentLevel: 0, - ContainerLevel: 1 +OSF.OsfControlType = { + DocumentLevel: 0, + ContainerLevel: 1 }; -OSF.ClientMode={ - ReadOnly: 0, - ReadWrite: 1 +OSF.ClientMode = { + ReadOnly: 0, + ReadWrite: 1 }; OSF.OUtil.setNamespace("Microsoft",window); OSF.OUtil.setNamespace("Office",Microsoft); OSF.OUtil.setNamespace("Client",Microsoft.Office); OSF.OUtil.setNamespace("WebExtension",Microsoft.Office); -Microsoft.Office.WebExtension.InitializationReason={ - Inserted: "inserted", - DocumentOpened: "documentOpened" +Microsoft.Office.WebExtension.InitializationReason = { + Inserted: "inserted", + DocumentOpened: "documentOpened" +}; +Microsoft.Office.WebExtension.ValueFormat = { + Unformatted: "unformatted", + Formatted: "formatted" +}; +Microsoft.Office.WebExtension.FilterType = {All: "all"}; +Microsoft.Office.WebExtension.PlatformType = { + PC: "PC", + OfficeOnline: "OfficeOnline", + Mac: "Mac", + iOS: "iOS", + Android: "Android", + Universal: "Universal" }; -Microsoft.Office.WebExtension.ValueFormat={ - Unformatted: "unformatted", - Formatted: "formatted" +Microsoft.Office.WebExtension.HostType = { + Word: "Word", + Excel: "Excel", + PowerPoint: "PowerPoint", + Outlook: "Outlook", + OneNote: "OneNote", + Project: "Project", + Access: "Access" }; -Microsoft.Office.WebExtension.FilterType={All: "all"}; -Microsoft.Office.WebExtension.Parameters={ - BindingType: "bindingType", - CoercionType: "coercionType", - ValueFormat: "valueFormat", - FilterType: "filterType", - Columns: "columns", - SampleData: "sampleData", - GoToType: "goToType", - SelectionMode: "selectionMode", - Id: "id", - PromptText: "promptText", - ItemName: "itemName", - FailOnCollision: "failOnCollision", - StartRow: "startRow", - StartColumn: "startColumn", - RowCount: "rowCount", - ColumnCount: "columnCount", - Callback: "callback", - AsyncContext: "asyncContext", - Data: "data", - Rows: "rows", - OverwriteIfStale: "overwriteIfStale", - FileType: "fileType", - EventType: "eventType", - Handler: "handler", - SliceSize: "sliceSize", - SliceIndex: "sliceIndex", - ActiveView: "activeView", - Status: "status", - Xml: "xml", - Namespace: "namespace", - Prefix: "prefix", - XPath: "xPath", - Text: "text", - ImageLeft: "imageLeft", - ImageTop: "imageTop", - ImageWidth: "imageWidth", - ImageHeight: "imageHeight", - TaskId: "taskId", - FieldId: "fieldId", - FieldValue: "fieldValue", - ServerUrl: "serverUrl", - ListName: "listName", - ResourceId: "resourceId", - ViewType: "viewType", - ViewName: "viewName", - GetRawValue: "getRawValue", - CellFormat: "cellFormat", - TableOptions: "tableOptions", - TaskIndex: "taskIndex", - ResourceIndex: "resourceIndex", - CustomFieldId: "customFieldId", - Url: "url", - MessageHandler: "messageHandler", - Width: "width", - Height: "height", - RequireHTTPs: "requireHTTPS", - MessageToParent: "messageToParent", - DisplayInIframe: "displayInIframe" +Microsoft.Office.WebExtension.Parameters = { + BindingType: "bindingType", + CoercionType: "coercionType", + ValueFormat: "valueFormat", + FilterType: "filterType", + Columns: "columns", + SampleData: "sampleData", + GoToType: "goToType", + SelectionMode: "selectionMode", + Id: "id", + PromptText: "promptText", + ItemName: "itemName", + FailOnCollision: "failOnCollision", + StartRow: "startRow", + StartColumn: "startColumn", + RowCount: "rowCount", + ColumnCount: "columnCount", + Callback: "callback", + AsyncContext: "asyncContext", + Data: "data", + Rows: "rows", + OverwriteIfStale: "overwriteIfStale", + FileType: "fileType", + EventType: "eventType", + Handler: "handler", + SliceSize: "sliceSize", + SliceIndex: "sliceIndex", + ActiveView: "activeView", + Status: "status", + PlatformType: "platformType", + HostType: "hostType", + ForceConsent: "forceConsent", + ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + Reserved: "reserved", + Xml: "xml", + Namespace: "namespace", + Prefix: "prefix", + XPath: "xPath", + Text: "text", + ImageLeft: "imageLeft", + ImageTop: "imageTop", + ImageWidth: "imageWidth", + ImageHeight: "imageHeight", + TaskId: "taskId", + FieldId: "fieldId", + FieldValue: "fieldValue", + ServerUrl: "serverUrl", + ListName: "listName", + ResourceId: "resourceId", + ViewType: "viewType", + ViewName: "viewName", + GetRawValue: "getRawValue", + CellFormat: "cellFormat", + TableOptions: "tableOptions", + TaskIndex: "taskIndex", + ResourceIndex: "resourceIndex", + CustomFieldId: "customFieldId", + Url: "url", + MessageHandler: "messageHandler", + Width: "width", + Height: "height", + RequireHTTPs: "requireHTTPS", + MessageToParent: "messageToParent", + DisplayInIframe: "displayInIframe", + MessageContent: "messageContent", + HideTitle: "hideTitle", + UseDeviceIndependentPixels: "useDeviceIndependentPixels", + AppCommandInvocationCompletedData: "appCommandInvocationCompletedData" }; OSF.OUtil.setNamespace("DDA",OSF); -OSF.DDA.DocumentMode={ - ReadOnly: 1, - ReadWrite: 0 +OSF.DDA.DocumentMode = { + ReadOnly: 1, + ReadWrite: 0 }; -OSF.DDA.PropertyDescriptors={AsyncResultStatus: "AsyncResultStatus"}; -OSF.DDA.EventDescriptors={}; -OSF.DDA.ListDescriptors={}; -OSF.DDA.UI={}; -OSF.DDA.getXdmEventName=function OSF_DDA$GetXdmEventName(id, eventType) +OSF.DDA.PropertyDescriptors = {AsyncResultStatus: "AsyncResultStatus"}; +OSF.DDA.EventDescriptors = {}; +OSF.DDA.ListDescriptors = {}; +OSF.DDA.UI = {}; +OSF.DDA.getXdmEventName = function OSF_DDA$GetXdmEventName(id, eventType) { - if(eventType==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged || eventType==Microsoft.Office.WebExtension.EventType.BindingDataChanged || eventType==Microsoft.Office.WebExtension.EventType.DataNodeDeleted || eventType==Microsoft.Office.WebExtension.EventType.DataNodeInserted || eventType==Microsoft.Office.WebExtension.EventType.DataNodeReplaced) - return id+"_"+eventType; - else - return eventType + if(eventType == Microsoft.Office.WebExtension.EventType.BindingSelectionChanged || eventType == Microsoft.Office.WebExtension.EventType.BindingDataChanged || eventType == Microsoft.Office.WebExtension.EventType.DataNodeDeleted || eventType == Microsoft.Office.WebExtension.EventType.DataNodeInserted || eventType == Microsoft.Office.WebExtension.EventType.DataNodeReplaced) + return id + "_" + eventType; + else + return eventType }; -OSF.DDA.MethodDispId={ - dispidMethodMin: 64, - dispidGetSelectedDataMethod: 64, - dispidSetSelectedDataMethod: 65, - dispidAddBindingFromSelectionMethod: 66, - dispidAddBindingFromPromptMethod: 67, - dispidGetBindingMethod: 68, - dispidReleaseBindingMethod: 69, - dispidGetBindingDataMethod: 70, - dispidSetBindingDataMethod: 71, - dispidAddRowsMethod: 72, - dispidClearAllRowsMethod: 73, - dispidGetAllBindingsMethod: 74, - dispidLoadSettingsMethod: 75, - dispidSaveSettingsMethod: 76, - dispidGetDocumentCopyMethod: 77, - dispidAddBindingFromNamedItemMethod: 78, - dispidAddColumnsMethod: 79, - dispidGetDocumentCopyChunkMethod: 80, - dispidReleaseDocumentCopyMethod: 81, - dispidNavigateToMethod: 82, - dispidGetActiveViewMethod: 83, - dispidGetDocumentThemeMethod: 84, - dispidGetOfficeThemeMethod: 85, - dispidGetFilePropertiesMethod: 86, - dispidClearFormatsMethod: 87, - dispidSetTableOptionsMethod: 88, - dispidSetFormatsMethod: 89, - dispidExecuteRichApiRequestMethod: 93, - dispidAppCommandInvocationCompletedMethod: 94, - dispidCloseContainerMethod: 97, - dispidAddDataPartMethod: 128, - dispidGetDataPartByIdMethod: 129, - dispidGetDataPartsByNamespaceMethod: 130, - dispidGetDataPartXmlMethod: 131, - dispidGetDataPartNodesMethod: 132, - dispidDeleteDataPartMethod: 133, - dispidGetDataNodeValueMethod: 134, - dispidGetDataNodeXmlMethod: 135, - dispidGetDataNodesMethod: 136, - dispidSetDataNodeValueMethod: 137, - dispidSetDataNodeXmlMethod: 138, - dispidAddDataNamespaceMethod: 139, - dispidGetDataUriByPrefixMethod: 140, - dispidGetDataPrefixByUriMethod: 141, - dispidGetDataNodeTextMethod: 142, - dispidSetDataNodeTextMethod: 143, - dispidMessageParentMethod: 144, - dispidMethodMax: 144, - dispidGetSelectedTaskMethod: 110, - dispidGetSelectedResourceMethod: 111, - dispidGetTaskMethod: 112, - dispidGetResourceFieldMethod: 113, - dispidGetWSSUrlMethod: 114, - dispidGetTaskFieldMethod: 115, - dispidGetProjectFieldMethod: 116, - dispidGetSelectedViewMethod: 117, - dispidGetTaskByIndexMethod: 118, - dispidGetResourceByIndexMethod: 119, - dispidSetTaskFieldMethod: 120, - dispidSetResourceFieldMethod: 121, - dispidGetMaxTaskIndexMethod: 122, - dispidGetMaxResourceIndexMethod: 123, - dispidCreateTaskMethod: 124 +OSF.DDA.MethodDispId = { + dispidMethodMin: 64, + dispidGetSelectedDataMethod: 64, + dispidSetSelectedDataMethod: 65, + dispidAddBindingFromSelectionMethod: 66, + dispidAddBindingFromPromptMethod: 67, + dispidGetBindingMethod: 68, + dispidReleaseBindingMethod: 69, + dispidGetBindingDataMethod: 70, + dispidSetBindingDataMethod: 71, + dispidAddRowsMethod: 72, + dispidClearAllRowsMethod: 73, + dispidGetAllBindingsMethod: 74, + dispidLoadSettingsMethod: 75, + dispidSaveSettingsMethod: 76, + dispidGetDocumentCopyMethod: 77, + dispidAddBindingFromNamedItemMethod: 78, + dispidAddColumnsMethod: 79, + dispidGetDocumentCopyChunkMethod: 80, + dispidReleaseDocumentCopyMethod: 81, + dispidNavigateToMethod: 82, + dispidGetActiveViewMethod: 83, + dispidGetDocumentThemeMethod: 84, + dispidGetOfficeThemeMethod: 85, + dispidGetFilePropertiesMethod: 86, + dispidClearFormatsMethod: 87, + dispidSetTableOptionsMethod: 88, + dispidSetFormatsMethod: 89, + dispidExecuteRichApiRequestMethod: 93, + dispidAppCommandInvocationCompletedMethod: 94, + dispidCloseContainerMethod: 97, + dispidGetAccessTokenMethod: 98, + dispidOpenBrowserWindow: 102, + dispidGetSelectedTaskMethod: 110, + dispidGetSelectedResourceMethod: 111, + dispidGetTaskMethod: 112, + dispidGetResourceFieldMethod: 113, + dispidGetWSSUrlMethod: 114, + dispidGetTaskFieldMethod: 115, + dispidGetProjectFieldMethod: 116, + dispidGetSelectedViewMethod: 117, + dispidGetTaskByIndexMethod: 118, + dispidGetResourceByIndexMethod: 119, + dispidSetTaskFieldMethod: 120, + dispidSetResourceFieldMethod: 121, + dispidGetMaxTaskIndexMethod: 122, + dispidGetMaxResourceIndexMethod: 123, + dispidCreateTaskMethod: 124, + dispidAddDataPartMethod: 128, + dispidGetDataPartByIdMethod: 129, + dispidGetDataPartsByNamespaceMethod: 130, + dispidGetDataPartXmlMethod: 131, + dispidGetDataPartNodesMethod: 132, + dispidDeleteDataPartMethod: 133, + dispidGetDataNodeValueMethod: 134, + dispidGetDataNodeXmlMethod: 135, + dispidGetDataNodesMethod: 136, + dispidSetDataNodeValueMethod: 137, + dispidSetDataNodeXmlMethod: 138, + dispidAddDataNamespaceMethod: 139, + dispidGetDataUriByPrefixMethod: 140, + dispidGetDataPrefixByUriMethod: 141, + dispidGetDataNodeTextMethod: 142, + dispidSetDataNodeTextMethod: 143, + dispidMessageParentMethod: 144, + dispidSendMessageMethod: 145, + dispidMethodMax: 145 }; -OSF.DDA.EventDispId={ - dispidEventMin: 0, - dispidInitializeEvent: 0, - dispidSettingsChangedEvent: 1, - dispidDocumentSelectionChangedEvent: 2, - dispidBindingSelectionChangedEvent: 3, - dispidBindingDataChangedEvent: 4, - dispidDocumentOpenEvent: 5, - dispidDocumentCloseEvent: 6, - dispidActiveViewChangedEvent: 7, - dispidDocumentThemeChangedEvent: 8, - dispidOfficeThemeChangedEvent: 9, - dispidDialogMessageReceivedEvent: 10, - dispidDialogNotificationShownInAddinEvent: 11, - dispidActivationStatusChangedEvent: 32, - dispidAppCommandInvokedEvent: 39, - dispidOlkItemSelectedChangedEvent: 46, - dispidTaskSelectionChangedEvent: 56, - dispidResourceSelectionChangedEvent: 57, - dispidViewSelectionChangedEvent: 58, - dispidDataNodeAddedEvent: 60, - dispidDataNodeReplacedEvent: 61, - dispidDataNodeDeletedEvent: 62, - dispidEventMax: 63 +OSF.DDA.EventDispId = { + dispidEventMin: 0, + dispidInitializeEvent: 0, + dispidSettingsChangedEvent: 1, + dispidDocumentSelectionChangedEvent: 2, + dispidBindingSelectionChangedEvent: 3, + dispidBindingDataChangedEvent: 4, + dispidDocumentOpenEvent: 5, + dispidDocumentCloseEvent: 6, + dispidActiveViewChangedEvent: 7, + dispidDocumentThemeChangedEvent: 8, + dispidOfficeThemeChangedEvent: 9, + dispidDialogMessageReceivedEvent: 10, + dispidDialogNotificationShownInAddinEvent: 11, + dispidDialogParentMessageReceivedEvent: 12, + dispidObjectDeletedEvent: 13, + dispidObjectSelectionChangedEvent: 14, + dispidObjectDataChangedEvent: 15, + dispidContentControlAddedEvent: 16, + dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, + dispidAppCommandInvokedEvent: 39, + dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, + dispidTaskSelectionChangedEvent: 56, + dispidResourceSelectionChangedEvent: 57, + dispidViewSelectionChangedEvent: 58, + dispidDataNodeAddedEvent: 60, + dispidDataNodeReplacedEvent: 61, + dispidDataNodeDeletedEvent: 62, + dispidEventMax: 63 }; -OSF.DDA.ErrorCodeManager=function() +OSF.DDA.ErrorCodeManager = function() { - var _errorMappings={}; - return{ - getErrorArgs: function OSF_DDA_ErrorCodeManager$getErrorArgs(errorCode) - { - var errorArgs=_errorMappings[errorCode]; - if(!errorArgs) - errorArgs=_errorMappings[this.errorCodes.ooeInternalError]; - else - { - if(!errorArgs.name) - errorArgs.name=_errorMappings[this.errorCodes.ooeInternalError].name; - if(!errorArgs.message) - errorArgs.message=_errorMappings[this.errorCodes.ooeInternalError].message - } - return errorArgs - }, - addErrorMessage: function OSF_DDA_ErrorCodeManager$addErrorMessage(errorCode, errorNameMessage) - { - _errorMappings[errorCode]=errorNameMessage - }, - errorCodes: { - ooeSuccess: 0, - ooeChunkResult: 1, - ooeCoercionTypeNotSupported: 1e3, - ooeGetSelectionNotMatchDataType: 1001, - ooeCoercionTypeNotMatchBinding: 1002, - ooeInvalidGetRowColumnCounts: 1003, - ooeSelectionNotSupportCoercionType: 1004, - ooeInvalidGetStartRowColumn: 1005, - ooeNonUniformPartialGetNotSupported: 1006, - ooeGetDataIsTooLarge: 1008, - ooeFileTypeNotSupported: 1009, - ooeGetDataParametersConflict: 1010, - ooeInvalidGetColumns: 1011, - ooeInvalidGetRows: 1012, - ooeInvalidReadForBlankRow: 1013, - ooeUnsupportedDataObject: 2e3, - ooeCannotWriteToSelection: 2001, - ooeDataNotMatchSelection: 2002, - ooeOverwriteWorksheetData: 2003, - ooeDataNotMatchBindingSize: 2004, - ooeInvalidSetStartRowColumn: 2005, - ooeInvalidDataFormat: 2006, - ooeDataNotMatchCoercionType: 2007, - ooeDataNotMatchBindingType: 2008, - ooeSetDataIsTooLarge: 2009, - ooeNonUniformPartialSetNotSupported: 2010, - ooeInvalidSetColumns: 2011, - ooeInvalidSetRows: 2012, - ooeSetDataParametersConflict: 2013, - ooeCellDataAmountBeyondLimits: 2014, - ooeSelectionCannotBound: 3e3, - ooeBindingNotExist: 3002, - ooeBindingToMultipleSelection: 3003, - ooeInvalidSelectionForBindingType: 3004, - ooeOperationNotSupportedOnThisBindingType: 3005, - ooeNamedItemNotFound: 3006, - ooeMultipleNamedItemFound: 3007, - ooeInvalidNamedItemForBindingType: 3008, - ooeUnknownBindingType: 3009, - ooeOperationNotSupportedOnMatrixData: 3010, - ooeInvalidColumnsForBinding: 3011, - ooeSettingNameNotExist: 4e3, - ooeSettingsCannotSave: 4001, - ooeSettingsAreStale: 4002, - ooeOperationNotSupported: 5e3, - ooeInternalError: 5001, - ooeDocumentReadOnly: 5002, - ooeEventHandlerNotExist: 5003, - ooeInvalidApiCallInContext: 5004, - ooeShuttingDown: 5005, - ooeUnsupportedEnumeration: 5007, - ooeIndexOutOfRange: 5008, - ooeBrowserAPINotSupported: 5009, - ooeInvalidParam: 5010, - ooeRequestTimeout: 5011, - ooeTooManyIncompleteRequests: 5100, - ooeRequestTokenUnavailable: 5101, - ooeActivityLimitReached: 5102, - ooeCustomXmlNodeNotFound: 6e3, - ooeCustomXmlError: 6100, - ooeCustomXmlExceedQuota: 6101, - ooeCustomXmlOutOfDate: 6102, - ooeNoCapability: 7e3, - ooeCannotNavTo: 7001, - ooeSpecifiedIdNotExist: 7002, - ooeNavOutOfBound: 7004, - ooeElementMissing: 8e3, - ooeProtectedError: 8001, - ooeInvalidCellsValue: 8010, - ooeInvalidTableOptionValue: 8011, - ooeInvalidFormatValue: 8012, - ooeRowIndexOutOfRange: 8020, - ooeColIndexOutOfRange: 8021, - ooeFormatValueOutOfRange: 8022, - ooeCellFormatAmountBeyondLimits: 8023, - ooeMemoryFileLimit: 11e3, - ooeNetworkProblemRetrieveFile: 11001, - ooeInvalidSliceSize: 11002, - ooeInvalidCallback: 11101, - ooeInvalidWidth: 12e3, - ooeInvalidHeight: 12001, - ooeNavigationError: 12002, - ooeInvalidScheme: 12003, - ooeAppDomains: 12004, - ooeRequireHTTPS: 12005, - ooeWebDialogClosed: 12006, - ooeDialogAlreadyOpened: 12007, - ooeEndUserAllow: 12008, - ooeEndUserIgnore: 12009 - }, - initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) - { - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={ - name: stringNS.L_InvalidCoercion, - message: stringNS.L_CoercionTypeNotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={ - name: stringNS.L_DataReadError, - message: stringNS.L_GetSelectionNotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={ - name: stringNS.L_InvalidCoercion, - message: stringNS.L_CoercionTypeNotMatchBinding - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={ - name: stringNS.L_DataReadError, - message: stringNS.L_InvalidGetRowColumnCounts - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={ - name: stringNS.L_DataReadError, - message: stringNS.L_SelectionNotSupportCoercionType - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={ - name: stringNS.L_DataReadError, - message: stringNS.L_InvalidGetStartRowColumn - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={ - name: stringNS.L_DataReadError, - message: stringNS.L_NonUniformPartialGetNotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={ - name: stringNS.L_DataReadError, - message: stringNS.L_GetDataIsTooLarge - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={ - name: stringNS.L_DataReadError, - message: stringNS.L_FileTypeNotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={ - name: stringNS.L_DataReadError, - message: stringNS.L_GetDataParametersConflict - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={ - name: stringNS.L_DataReadError, - message: stringNS.L_InvalidGetColumns - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={ - name: stringNS.L_DataReadError, - message: stringNS.L_InvalidGetRows - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={ - name: stringNS.L_DataReadError, - message: stringNS.L_InvalidReadForBlankRow - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_UnsupportedDataObject - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_CannotWriteToSelection - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_DataNotMatchSelection - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_OverwriteWorksheetData - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_DataNotMatchBindingSize - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_InvalidSetStartRowColumn - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={ - name: stringNS.L_InvalidFormat, - message: stringNS.L_InvalidDataFormat - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={ - name: stringNS.L_InvalidDataObject, - message: stringNS.L_DataNotMatchCoercionType - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={ - name: stringNS.L_InvalidDataObject, - message: stringNS.L_DataNotMatchBindingType - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_SetDataIsTooLarge - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_NonUniformPartialSetNotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_InvalidSetColumns - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_InvalidSetRows - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_SetDataParametersConflict - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={ - name: stringNS.L_BindingCreationError, - message: stringNS.L_SelectionCannotBound - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={ - name: stringNS.L_InvalidBindingError, - message: stringNS.L_BindingNotExist - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={ - name: stringNS.L_BindingCreationError, - message: stringNS.L_BindingToMultipleSelection - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={ - name: stringNS.L_BindingCreationError, - message: stringNS.L_InvalidSelectionForBindingType - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={ - name: stringNS.L_InvalidBindingOperation, - message: stringNS.L_OperationNotSupportedOnThisBindingType - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={ - name: stringNS.L_BindingCreationError, - message: stringNS.L_NamedItemNotFound - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={ - name: stringNS.L_BindingCreationError, - message: stringNS.L_MultipleNamedItemFound - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={ - name: stringNS.L_BindingCreationError, - message: stringNS.L_InvalidNamedItemForBindingType - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={ - name: stringNS.L_InvalidBinding, - message: stringNS.L_UnknownBindingType - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={ - name: stringNS.L_InvalidBindingOperation, - message: stringNS.L_OperationNotSupportedOnMatrixData - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={ - name: stringNS.L_InvalidBinding, - message: stringNS.L_InvalidColumnsForBinding - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={ - name: stringNS.L_ReadSettingsError, - message: stringNS.L_SettingNameNotExist - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={ - name: stringNS.L_SaveSettingsError, - message: stringNS.L_SettingsCannotSave - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={ - name: stringNS.L_SettingsStaleError, - message: stringNS.L_SettingsAreStale - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={ - name: stringNS.L_HostError, - message: stringNS.L_OperationNotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={ - name: stringNS.L_InternalError, - message: stringNS.L_InternalErrorDescription - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={ - name: stringNS.L_PermissionDenied, - message: stringNS.L_DocumentReadOnly - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={ - name: stringNS.L_EventRegistrationError, - message: stringNS.L_EventHandlerNotExist - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={ - name: stringNS.L_InvalidAPICall, - message: stringNS.L_InvalidApiCallInContext - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={ - name: stringNS.L_ShuttingDown, - message: stringNS.L_ShuttingDown - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={ - name: stringNS.L_UnsupportedEnumeration, - message: stringNS.L_UnsupportedEnumerationMessage - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={ - name: stringNS.L_IndexOutOfRange, - message: stringNS.L_IndexOutOfRange - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={ - name: stringNS.L_APINotSupported, - message: stringNS.L_BrowserAPINotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={ - name: stringNS.L_APICallFailed, - message: stringNS.L_RequestTimeout - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={ - name: stringNS.L_APICallFailed, - message: stringNS.L_TooManyIncompleteRequests - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={ - name: stringNS.L_APICallFailed, - message: stringNS.L_RequestTokenUnavailable - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={ - name: stringNS.L_APICallFailed, - message: stringNS.L_ActivityLimitReached - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={ - name: stringNS.L_InvalidNode, - message: stringNS.L_CustomXmlNodeNotFound - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={ - name: stringNS.L_CustomXmlError, - message: stringNS.L_CustomXmlError - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={ - name: stringNS.L_CustomXmlError, - message: stringNS.L_CustomXmlError - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={ - name: stringNS.L_CustomXmlError, - message: stringNS.L_CustomXmlError - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={ - name: stringNS.L_PermissionDenied, - message: stringNS.L_NoCapability - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={ - name: stringNS.L_CannotNavigateTo, - message: stringNS.L_CannotNavigateTo - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={ - name: stringNS.L_SpecifiedIdNotExist, - message: stringNS.L_SpecifiedIdNotExist - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={ - name: stringNS.L_NavOutOfBound, - message: stringNS.L_NavOutOfBound - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={ - name: stringNS.L_DataWriteReminder, - message: stringNS.L_CellDataAmountBeyondLimits - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={ - name: stringNS.L_MissingParameter, - message: stringNS.L_ElementMissing - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={ - name: stringNS.L_PermissionDenied, - message: stringNS.L_NoCapability - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={ - name: stringNS.L_InvalidValue, - message: stringNS.L_InvalidCellsValue - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={ - name: stringNS.L_InvalidValue, - message: stringNS.L_InvalidTableOptionValue - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={ - name: stringNS.L_InvalidValue, - message: stringNS.L_InvalidFormatValue - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={ - name: stringNS.L_OutOfRange, - message: stringNS.L_RowIndexOutOfRange - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={ - name: stringNS.L_OutOfRange, - message: stringNS.L_ColIndexOutOfRange - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={ - name: stringNS.L_OutOfRange, - message: stringNS.L_FormatValueOutOfRange - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={ - name: stringNS.L_FormattingReminder, - message: stringNS.L_CellFormatAmountBeyondLimits - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={ - name: stringNS.L_MemoryLimit, - message: stringNS.L_CloseFileBeforeRetrieve - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={ - name: stringNS.L_NetworkProblem, - message: stringNS.L_NetworkProblemRetrieveFile - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={ - name: stringNS.L_InvalidValue, - message: stringNS.L_SliceSizeNotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={ - name: stringNS.L_DisplayDialogError, - message: stringNS.L_DialogAlreadyOpened - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={ - name: stringNS.L_IndexOutOfRange, - message: stringNS.L_IndexOutOfRange - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={ - name: stringNS.L_IndexOutOfRange, - message: stringNS.L_IndexOutOfRange - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={ - name: stringNS.L_DisplayDialogError, - message: stringNS.L_NetworkProblem - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={ - name: stringNS.L_DialogNavigateError, - message: stringNS.L_DialogAddressNotTrusted - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={ - name: stringNS.L_DisplayDialogError, - message: stringNS.L_DialogAddressNotTrusted - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={ - name: stringNS.L_DisplayDialogError, - message: stringNS.L_DialogAddressNotTrusted - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={ - name: stringNS.L_DisplayDialogError, - message: stringNS.L_UserClickIgnore - } - } - } + var _errorMappings = {}; + return{ + getErrorArgs: function OSF_DDA_ErrorCodeManager$getErrorArgs(errorCode) + { + var errorArgs = _errorMappings[errorCode]; + if(!errorArgs) + errorArgs = _errorMappings[this.errorCodes.ooeInternalError]; + else + { + if(!errorArgs.name) + errorArgs.name = _errorMappings[this.errorCodes.ooeInternalError].name; + if(!errorArgs.message) + errorArgs.message = _errorMappings[this.errorCodes.ooeInternalError].message + } + return errorArgs + }, + addErrorMessage: function OSF_DDA_ErrorCodeManager$addErrorMessage(errorCode, errorNameMessage) + { + _errorMappings[errorCode] = errorNameMessage + }, + errorCodes: { + ooeSuccess: 0, + ooeChunkResult: 1, + ooeCoercionTypeNotSupported: 1e3, + ooeGetSelectionNotMatchDataType: 1001, + ooeCoercionTypeNotMatchBinding: 1002, + ooeInvalidGetRowColumnCounts: 1003, + ooeSelectionNotSupportCoercionType: 1004, + ooeInvalidGetStartRowColumn: 1005, + ooeNonUniformPartialGetNotSupported: 1006, + ooeGetDataIsTooLarge: 1008, + ooeFileTypeNotSupported: 1009, + ooeGetDataParametersConflict: 1010, + ooeInvalidGetColumns: 1011, + ooeInvalidGetRows: 1012, + ooeInvalidReadForBlankRow: 1013, + ooeUnsupportedDataObject: 2e3, + ooeCannotWriteToSelection: 2001, + ooeDataNotMatchSelection: 2002, + ooeOverwriteWorksheetData: 2003, + ooeDataNotMatchBindingSize: 2004, + ooeInvalidSetStartRowColumn: 2005, + ooeInvalidDataFormat: 2006, + ooeDataNotMatchCoercionType: 2007, + ooeDataNotMatchBindingType: 2008, + ooeSetDataIsTooLarge: 2009, + ooeNonUniformPartialSetNotSupported: 2010, + ooeInvalidSetColumns: 2011, + ooeInvalidSetRows: 2012, + ooeSetDataParametersConflict: 2013, + ooeCellDataAmountBeyondLimits: 2014, + ooeSelectionCannotBound: 3e3, + ooeBindingNotExist: 3002, + ooeBindingToMultipleSelection: 3003, + ooeInvalidSelectionForBindingType: 3004, + ooeOperationNotSupportedOnThisBindingType: 3005, + ooeNamedItemNotFound: 3006, + ooeMultipleNamedItemFound: 3007, + ooeInvalidNamedItemForBindingType: 3008, + ooeUnknownBindingType: 3009, + ooeOperationNotSupportedOnMatrixData: 3010, + ooeInvalidColumnsForBinding: 3011, + ooeSettingNameNotExist: 4e3, + ooeSettingsCannotSave: 4001, + ooeSettingsAreStale: 4002, + ooeOperationNotSupported: 5e3, + ooeInternalError: 5001, + ooeDocumentReadOnly: 5002, + ooeEventHandlerNotExist: 5003, + ooeInvalidApiCallInContext: 5004, + ooeShuttingDown: 5005, + ooeUnsupportedEnumeration: 5007, + ooeIndexOutOfRange: 5008, + ooeBrowserAPINotSupported: 5009, + ooeInvalidParam: 5010, + ooeRequestTimeout: 5011, + ooeInvalidOrTimedOutSession: 5012, + ooeInvalidApiArguments: 5013, + ooeTooManyIncompleteRequests: 5100, + ooeRequestTokenUnavailable: 5101, + ooeActivityLimitReached: 5102, + ooeCustomXmlNodeNotFound: 6e3, + ooeCustomXmlError: 6100, + ooeCustomXmlExceedQuota: 6101, + ooeCustomXmlOutOfDate: 6102, + ooeNoCapability: 7e3, + ooeCannotNavTo: 7001, + ooeSpecifiedIdNotExist: 7002, + ooeNavOutOfBound: 7004, + ooeElementMissing: 8e3, + ooeProtectedError: 8001, + ooeInvalidCellsValue: 8010, + ooeInvalidTableOptionValue: 8011, + ooeInvalidFormatValue: 8012, + ooeRowIndexOutOfRange: 8020, + ooeColIndexOutOfRange: 8021, + ooeFormatValueOutOfRange: 8022, + ooeCellFormatAmountBeyondLimits: 8023, + ooeMemoryFileLimit: 11e3, + ooeNetworkProblemRetrieveFile: 11001, + ooeInvalidSliceSize: 11002, + ooeInvalidCallback: 11101, + ooeInvalidWidth: 12e3, + ooeInvalidHeight: 12001, + ooeNavigationError: 12002, + ooeInvalidScheme: 12003, + ooeAppDomains: 12004, + ooeRequireHTTPS: 12005, + ooeWebDialogClosed: 12006, + ooeDialogAlreadyOpened: 12007, + ooeEndUserAllow: 12008, + ooeEndUserIgnore: 12009, + ooeNotUILessDialog: 12010, + ooeCrossZone: 12011, + ooeNotSSOAgave: 13e3, + ooeSSOUserNotSignedIn: 13001, + ooeSSOUserAborted: 13002, + ooeSSOUnsupportedUserIdentity: 13003, + ooeSSOInvalidResourceUrl: 13004, + ooeSSOInvalidGrant: 13005, + ooeSSOClientError: 13006, + ooeSSOServerError: 13007, + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009 + }, + initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) + { + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported] = { + name: stringNS.L_InvalidCoercion, + message: stringNS.L_CoercionTypeNotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType] = { + name: stringNS.L_DataReadError, + message: stringNS.L_GetSelectionNotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding] = { + name: stringNS.L_InvalidCoercion, + message: stringNS.L_CoercionTypeNotMatchBinding + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts] = { + name: stringNS.L_DataReadError, + message: stringNS.L_InvalidGetRowColumnCounts + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType] = { + name: stringNS.L_DataReadError, + message: stringNS.L_SelectionNotSupportCoercionType + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn] = { + name: stringNS.L_DataReadError, + message: stringNS.L_InvalidGetStartRowColumn + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported] = { + name: stringNS.L_DataReadError, + message: stringNS.L_NonUniformPartialGetNotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge] = { + name: stringNS.L_DataReadError, + message: stringNS.L_GetDataIsTooLarge + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported] = { + name: stringNS.L_DataReadError, + message: stringNS.L_FileTypeNotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict] = { + name: stringNS.L_DataReadError, + message: stringNS.L_GetDataParametersConflict + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns] = { + name: stringNS.L_DataReadError, + message: stringNS.L_InvalidGetColumns + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows] = { + name: stringNS.L_DataReadError, + message: stringNS.L_InvalidGetRows + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow] = { + name: stringNS.L_DataReadError, + message: stringNS.L_InvalidReadForBlankRow + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_UnsupportedDataObject + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_CannotWriteToSelection + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_DataNotMatchSelection + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_OverwriteWorksheetData + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_DataNotMatchBindingSize + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_InvalidSetStartRowColumn + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat] = { + name: stringNS.L_InvalidFormat, + message: stringNS.L_InvalidDataFormat + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType] = { + name: stringNS.L_InvalidDataObject, + message: stringNS.L_DataNotMatchCoercionType + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType] = { + name: stringNS.L_InvalidDataObject, + message: stringNS.L_DataNotMatchBindingType + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_SetDataIsTooLarge + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_NonUniformPartialSetNotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_InvalidSetColumns + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_InvalidSetRows + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_SetDataParametersConflict + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound] = { + name: stringNS.L_BindingCreationError, + message: stringNS.L_SelectionCannotBound + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist] = { + name: stringNS.L_InvalidBindingError, + message: stringNS.L_BindingNotExist + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection] = { + name: stringNS.L_BindingCreationError, + message: stringNS.L_BindingToMultipleSelection + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType] = { + name: stringNS.L_BindingCreationError, + message: stringNS.L_InvalidSelectionForBindingType + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType] = { + name: stringNS.L_InvalidBindingOperation, + message: stringNS.L_OperationNotSupportedOnThisBindingType + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound] = { + name: stringNS.L_BindingCreationError, + message: stringNS.L_NamedItemNotFound + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound] = { + name: stringNS.L_BindingCreationError, + message: stringNS.L_MultipleNamedItemFound + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType] = { + name: stringNS.L_BindingCreationError, + message: stringNS.L_InvalidNamedItemForBindingType + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType] = { + name: stringNS.L_InvalidBinding, + message: stringNS.L_UnknownBindingType + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData] = { + name: stringNS.L_InvalidBindingOperation, + message: stringNS.L_OperationNotSupportedOnMatrixData + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding] = { + name: stringNS.L_InvalidBinding, + message: stringNS.L_InvalidColumnsForBinding + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist] = { + name: stringNS.L_ReadSettingsError, + message: stringNS.L_SettingNameNotExist + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave] = { + name: stringNS.L_SaveSettingsError, + message: stringNS.L_SettingsCannotSave + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale] = { + name: stringNS.L_SettingsStaleError, + message: stringNS.L_SettingsAreStale + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported] = { + name: stringNS.L_HostError, + message: stringNS.L_OperationNotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError] = { + name: stringNS.L_InternalError, + message: stringNS.L_InternalErrorDescription + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly] = { + name: stringNS.L_PermissionDenied, + message: stringNS.L_DocumentReadOnly + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist] = { + name: stringNS.L_EventRegistrationError, + message: stringNS.L_EventHandlerNotExist + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext] = { + name: stringNS.L_InvalidAPICall, + message: stringNS.L_InvalidApiCallInContext + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown] = { + name: stringNS.L_ShuttingDown, + message: stringNS.L_ShuttingDown + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration] = { + name: stringNS.L_UnsupportedEnumeration, + message: stringNS.L_UnsupportedEnumerationMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange] = { + name: stringNS.L_IndexOutOfRange, + message: stringNS.L_IndexOutOfRange + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported] = { + name: stringNS.L_APINotSupported, + message: stringNS.L_BrowserAPINotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout] = { + name: stringNS.L_APICallFailed, + message: stringNS.L_RequestTimeout + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession] = { + name: stringNS.L_InvalidOrTimedOutSession, + message: stringNS.L_InvalidOrTimedOutSessionMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests] = { + name: stringNS.L_APICallFailed, + message: stringNS.L_TooManyIncompleteRequests + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable] = { + name: stringNS.L_APICallFailed, + message: stringNS.L_RequestTokenUnavailable + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached] = { + name: stringNS.L_APICallFailed, + message: stringNS.L_ActivityLimitReached + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments] = { + name: stringNS.L_APICallFailed, + message: stringNS.L_InvalidApiArgumentsMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound] = { + name: stringNS.L_InvalidNode, + message: stringNS.L_CustomXmlNodeNotFound + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError] = { + name: stringNS.L_CustomXmlError, + message: stringNS.L_CustomXmlError + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota] = { + name: stringNS.L_CustomXmlExceedQuotaName, + message: stringNS.L_CustomXmlExceedQuotaMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate] = { + name: stringNS.L_CustomXmlOutOfDateName, + message: stringNS.L_CustomXmlOutOfDateMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability] = { + name: stringNS.L_PermissionDenied, + message: stringNS.L_NoCapability + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo] = { + name: stringNS.L_CannotNavigateTo, + message: stringNS.L_CannotNavigateTo + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist] = { + name: stringNS.L_SpecifiedIdNotExist, + message: stringNS.L_SpecifiedIdNotExist + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound] = { + name: stringNS.L_NavOutOfBound, + message: stringNS.L_NavOutOfBound + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits] = { + name: stringNS.L_DataWriteReminder, + message: stringNS.L_CellDataAmountBeyondLimits + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing] = { + name: stringNS.L_MissingParameter, + message: stringNS.L_ElementMissing + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError] = { + name: stringNS.L_PermissionDenied, + message: stringNS.L_NoCapability + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue] = { + name: stringNS.L_InvalidValue, + message: stringNS.L_InvalidCellsValue + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue] = { + name: stringNS.L_InvalidValue, + message: stringNS.L_InvalidTableOptionValue + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue] = { + name: stringNS.L_InvalidValue, + message: stringNS.L_InvalidFormatValue + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange] = { + name: stringNS.L_OutOfRange, + message: stringNS.L_RowIndexOutOfRange + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange] = { + name: stringNS.L_OutOfRange, + message: stringNS.L_ColIndexOutOfRange + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange] = { + name: stringNS.L_OutOfRange, + message: stringNS.L_FormatValueOutOfRange + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits] = { + name: stringNS.L_FormattingReminder, + message: stringNS.L_CellFormatAmountBeyondLimits + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit] = { + name: stringNS.L_MemoryLimit, + message: stringNS.L_CloseFileBeforeRetrieve + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile] = { + name: stringNS.L_NetworkProblem, + message: stringNS.L_NetworkProblemRetrieveFile + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize] = { + name: stringNS.L_InvalidValue, + message: stringNS.L_SliceSizeNotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened] = { + name: stringNS.L_DisplayDialogError, + message: stringNS.L_DialogAlreadyOpened + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth] = { + name: stringNS.L_IndexOutOfRange, + message: stringNS.L_IndexOutOfRange + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight] = { + name: stringNS.L_IndexOutOfRange, + message: stringNS.L_IndexOutOfRange + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError] = { + name: stringNS.L_DisplayDialogError, + message: stringNS.L_NetworkProblem + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme] = { + name: stringNS.L_DialogNavigateError, + message: stringNS.L_DialogInvalidScheme + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains] = { + name: stringNS.L_DisplayDialogError, + message: stringNS.L_DialogAddressNotTrusted + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS] = { + name: stringNS.L_DisplayDialogError, + message: stringNS.L_DialogRequireHTTPS + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore] = { + name: stringNS.L_DisplayDialogError, + message: stringNS.L_UserClickIgnore + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone] = { + name: stringNS.L_DisplayDialogError, + message: stringNS.L_NewWindowCrossZoneErrorString + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave] = { + name: stringNS.L_APINotSupported, + message: stringNS.L_InvalidSSOAddinMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn] = { + name: stringNS.L_UserNotSignedIn, + message: stringNS.L_UserNotSignedIn + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted] = { + name: stringNS.L_UserAborted, + message: stringNS.L_UserAbortedMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity] = { + name: stringNS.L_UnsupportedUserIdentity, + message: stringNS.L_UnsupportedUserIdentityMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl] = { + name: stringNS.L_InvalidResourceUrl, + message: stringNS.L_InvalidResourceUrlMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant] = { + name: stringNS.L_InvalidGrant, + message: stringNS.L_InvalidGrantMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError] = { + name: stringNS.L_SSOClientError, + message: stringNS.L_SSOClientErrorMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError] = { + name: stringNS.L_SSOServerError, + message: stringNS.L_SSOServerErrorMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken] = { + name: stringNS.L_AddinIsAlreadyRequestingToken, + message: stringNS.L_AddinIsAlreadyRequestingTokenMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory] = { + name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, + message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage + } + } + } }(); var OfficeExt; (function(OfficeExt) { - var Requirement; - (function(Requirement) - { - var RequirementMatrix=function() - { - function RequirementMatrix(_setMap) - { - this.isSetSupported=function _isSetSupported(name, minVersion) - { - if(name==undefined) - return false; - if(minVersion==undefined) - minVersion=0; - var setSupportArray=this._setMap; - var sets=setSupportArray._sets; - if(sets.hasOwnProperty(name.toLowerCase())) - { - var setMaxVersion=sets[name.toLowerCase()]; - return setMaxVersion > 0 && setMaxVersion >=minVersion - } - else - return false - }; - this._setMap=_setMap - } - return RequirementMatrix - }(); - Requirement.RequirementMatrix=RequirementMatrix; - var DefaultSetRequirement=function() - { - function DefaultSetRequirement(setMap) - { - this._addSetMap=function DefaultSetRequirement_addSetMap(addedSet) - { - for(var name in addedSet) - this._sets[name]=addedSet[name] - }; - this._sets=setMap - } - return DefaultSetRequirement - }(); - Requirement.DefaultSetRequirement=DefaultSetRequirement; - var ExcelClientDefaultSetRequirement=function(_super) - { - __extends(ExcelClientDefaultSetRequirement,_super); - function ExcelClientDefaultSetRequirement() - { - _super.call(this,{ - bindingevents: 1.1, - documentevents: 1.1, - excelapi: 1.1, - matrixbindings: 1.1, - matrixcoercion: 1.1, - selection: 1.1, - settings: 1.1, - tablebindings: 1.1, - tablecoercion: 1.1, - textbindings: 1.1, - textcoercion: 1.1 - }) - } - return ExcelClientDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.ExcelClientDefaultSetRequirement=ExcelClientDefaultSetRequirement; - var ExcelClientV1DefaultSetRequirement=function(_super) - { - __extends(ExcelClientV1DefaultSetRequirement,_super); - function ExcelClientV1DefaultSetRequirement() - { - _super.call(this); - this._addSetMap({imagecoercion: 1.1}) - } - return ExcelClientV1DefaultSetRequirement - }(ExcelClientDefaultSetRequirement); - Requirement.ExcelClientV1DefaultSetRequirement=ExcelClientV1DefaultSetRequirement; - var OutlookClientDefaultSetRequirement=function(_super) - { - __extends(OutlookClientDefaultSetRequirement,_super); - function OutlookClientDefaultSetRequirement() - { - _super.call(this,{mailbox: 1.3}) - } - return OutlookClientDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.OutlookClientDefaultSetRequirement=OutlookClientDefaultSetRequirement; - var WordClientDefaultSetRequirement=function(_super) - { - __extends(WordClientDefaultSetRequirement,_super); - function WordClientDefaultSetRequirement() - { - _super.call(this,{ - bindingevents: 1.1, - compressedfile: 1.1, - customxmlparts: 1.1, - documentevents: 1.1, - file: 1.1, - htmlcoercion: 1.1, - matrixbindings: 1.1, - matrixcoercion: 1.1, - ooxmlcoercion: 1.1, - pdffile: 1.1, - selection: 1.1, - settings: 1.1, - tablebindings: 1.1, - tablecoercion: 1.1, - textbindings: 1.1, - textcoercion: 1.1, - textfile: 1.1, - wordapi: 1.1 - }) - } - return WordClientDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.WordClientDefaultSetRequirement=WordClientDefaultSetRequirement; - var WordClientV1DefaultSetRequirement=function(_super) - { - __extends(WordClientV1DefaultSetRequirement,_super); - function WordClientV1DefaultSetRequirement() - { - _super.call(this); - this._addSetMap({ - customxmlparts: 1.2, - wordapi: 1.2, - imagecoercion: 1.1 - }) - } - return WordClientV1DefaultSetRequirement - }(WordClientDefaultSetRequirement); - Requirement.WordClientV1DefaultSetRequirement=WordClientV1DefaultSetRequirement; - var PowerpointClientDefaultSetRequirement=function(_super) - { - __extends(PowerpointClientDefaultSetRequirement,_super); - function PowerpointClientDefaultSetRequirement() - { - _super.call(this,{ - activeview: 1.1, - compressedfile: 1.1, - documentevents: 1.1, - file: 1.1, - pdffile: 1.1, - selection: 1.1, - settings: 1.1, - textcoercion: 1.1 - }) - } - return PowerpointClientDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.PowerpointClientDefaultSetRequirement=PowerpointClientDefaultSetRequirement; - var PowerpointClientV1DefaultSetRequirement=function(_super) - { - __extends(PowerpointClientV1DefaultSetRequirement,_super); - function PowerpointClientV1DefaultSetRequirement() - { - _super.call(this); - this._addSetMap({imagecoercion: 1.1}) - } - return PowerpointClientV1DefaultSetRequirement - }(PowerpointClientDefaultSetRequirement); - Requirement.PowerpointClientV1DefaultSetRequirement=PowerpointClientV1DefaultSetRequirement; - var ProjectClientDefaultSetRequirement=function(_super) - { - __extends(ProjectClientDefaultSetRequirement,_super); - function ProjectClientDefaultSetRequirement() - { - _super.call(this,{ - selection: 1.1, - textcoercion: 1.1 - }) - } - return ProjectClientDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.ProjectClientDefaultSetRequirement=ProjectClientDefaultSetRequirement; - var ExcelWebDefaultSetRequirement=function(_super) - { - __extends(ExcelWebDefaultSetRequirement,_super); - function ExcelWebDefaultSetRequirement() - { - _super.call(this,{ - bindingevents: 1.1, - documentevents: 1.1, - matrixbindings: 1.1, - matrixcoercion: 1.1, - selection: 1.1, - settings: 1.1, - tablebindings: 1.1, - tablecoercion: 1.1, - textbindings: 1.1, - textcoercion: 1.1, - file: 1.1 - }) - } - return ExcelWebDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.ExcelWebDefaultSetRequirement=ExcelWebDefaultSetRequirement; - var WordWebDefaultSetRequirement=function(_super) - { - __extends(WordWebDefaultSetRequirement,_super); - function WordWebDefaultSetRequirement() - { - _super.call(this,{ - customxmlparts: 1.1, - documentevents: 1.1, - file: 1.1, - ooxmlcoercion: 1.1, - selection: 1.1, - settings: 1.1, - textcoercion: 1.1 - }) - } - return WordWebDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.WordWebDefaultSetRequirement=WordWebDefaultSetRequirement; - var PowerpointWebDefaultSetRequirement=function(_super) - { - __extends(PowerpointWebDefaultSetRequirement,_super); - function PowerpointWebDefaultSetRequirement() - { - _super.call(this,{ - activeview: 1.1, - settings: 1.1 - }) - } - return PowerpointWebDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.PowerpointWebDefaultSetRequirement=PowerpointWebDefaultSetRequirement; - var OutlookWebDefaultSetRequirement=function(_super) - { - __extends(OutlookWebDefaultSetRequirement,_super); - function OutlookWebDefaultSetRequirement() - { - _super.call(this,{mailbox: 1.3}) - } - return OutlookWebDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.OutlookWebDefaultSetRequirement=OutlookWebDefaultSetRequirement; - var SwayWebDefaultSetRequirement=function(_super) - { - __extends(SwayWebDefaultSetRequirement,_super); - function SwayWebDefaultSetRequirement() - { - _super.call(this,{ - activeview: 1.1, - documentevents: 1.1, - selection: 1.1, - settings: 1.1, - textcoercion: 1.1 - }) - } - return SwayWebDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.SwayWebDefaultSetRequirement=SwayWebDefaultSetRequirement; - var AccessWebDefaultSetRequirement=function(_super) - { - __extends(AccessWebDefaultSetRequirement,_super); - function AccessWebDefaultSetRequirement() - { - _super.call(this,{ - bindingevents: 1.1, - partialtablebindings: 1.1, - settings: 1.1, - tablebindings: 1.1, - tablecoercion: 1.1 - }) - } - return AccessWebDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.AccessWebDefaultSetRequirement=AccessWebDefaultSetRequirement; - var ExcelIOSDefaultSetRequirement=function(_super) - { - __extends(ExcelIOSDefaultSetRequirement,_super); - function ExcelIOSDefaultSetRequirement() - { - _super.call(this,{ - bindingevents: 1.1, - documentevents: 1.1, - matrixbindings: 1.1, - matrixcoercion: 1.1, - selection: 1.1, - settings: 1.1, - tablebindings: 1.1, - tablecoercion: 1.1, - textbindings: 1.1, - textcoercion: 1.1 - }) - } - return ExcelIOSDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.ExcelIOSDefaultSetRequirement=ExcelIOSDefaultSetRequirement; - var WordIOSDefaultSetRequirement=function(_super) - { - __extends(WordIOSDefaultSetRequirement,_super); - function WordIOSDefaultSetRequirement() - { - _super.call(this,{ - bindingevents: 1.1, - compressedfile: 1.1, - customxmlparts: 1.1, - documentevents: 1.1, - file: 1.1, - htmlcoercion: 1.1, - matrixbindings: 1.1, - matrixcoercion: 1.1, - ooxmlcoercion: 1.1, - pdffile: 1.1, - selection: 1.1, - settings: 1.1, - tablebindings: 1.1, - tablecoercion: 1.1, - textbindings: 1.1, - textcoercion: 1.1, - textfile: 1.1 - }) - } - return WordIOSDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.WordIOSDefaultSetRequirement=WordIOSDefaultSetRequirement; - var WordIOSV1DefaultSetRequirement=function(_super) - { - __extends(WordIOSV1DefaultSetRequirement,_super); - function WordIOSV1DefaultSetRequirement() - { - _super.call(this); - this._addSetMap({ - customxmlparts: 1.2, - wordapi: 1.2 - }) - } - return WordIOSV1DefaultSetRequirement - }(WordIOSDefaultSetRequirement); - Requirement.WordIOSV1DefaultSetRequirement=WordIOSV1DefaultSetRequirement; - var PowerpointIOSDefaultSetRequirement=function(_super) - { - __extends(PowerpointIOSDefaultSetRequirement,_super); - function PowerpointIOSDefaultSetRequirement() - { - _super.call(this,{ - activeview: 1.1, - compressedfile: 1.1, - documentevents: 1.1, - file: 1.1, - pdffile: 1.1, - selection: 1.1, - settings: 1.1, - textcoercion: 1.1 - }) - } - return PowerpointIOSDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.PowerpointIOSDefaultSetRequirement=PowerpointIOSDefaultSetRequirement; - var OutlookIOSDefaultSetRequirement=function(_super) - { - __extends(OutlookIOSDefaultSetRequirement,_super); - function OutlookIOSDefaultSetRequirement() - { - _super.call(this,{mailbox: 1.1}) - } - return OutlookIOSDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.OutlookIOSDefaultSetRequirement=OutlookIOSDefaultSetRequirement; - var RequirementsMatrixFactory=function() - { - function RequirementsMatrixFactory(){} - RequirementsMatrixFactory.initializeOsfDda=function() - { - OSF.OUtil.setNamespace("Requirement",OSF.DDA) - }; - RequirementsMatrixFactory.getDefaultRequirementMatrix=function(appContext) - { - this.initializeDefaultSetMatrix(); - var defaultRequirementMatrix=undefined; - var clientRequirement=appContext.get_requirementMatrix(); - if(clientRequirement !=undefined && clientRequirement.length > 0 && typeof JSON !=="undefined") - { - var matrixItem=JSON.parse(appContext.get_requirementMatrix().toLowerCase()); - defaultRequirementMatrix=new RequirementMatrix(new DefaultSetRequirement(matrixItem)) - } - else - { - var appLocator=RequirementsMatrixFactory.getClientFullVersionString(appContext); - if(RequirementsMatrixFactory.DefaultSetArrayMatrix !=undefined && RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator] !=undefined) - defaultRequirementMatrix=new RequirementMatrix(RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator]); - else - defaultRequirementMatrix=new RequirementMatrix(new DefaultSetRequirement({})) - } - return defaultRequirementMatrix - }; - RequirementsMatrixFactory.getClientFullVersionString=function(appContext) - { - var appMinorVersion=appContext.get_appMinorVersion(); - var appMinorVersionString=""; - var appFullVersion=""; - var appName=appContext.get_appName(); - var isIOSClient=appName==1024 || appName==4096 || appName==8192 || appName==65536; - if(isIOSClient && appContext.get_appVersion()==1) - if(appName==4096 && appMinorVersion >=15) - appFullVersion="16.00.01"; - else - appFullVersion="16.00"; - else if(appContext.get_appName()==64) - appFullVersion=appContext.get_appVersion(); - else - { - if(appMinorVersion < 10) - appMinorVersionString="0"+appMinorVersion; - else - appMinorVersionString=""+appMinorVersion; - appFullVersion=appContext.get_appVersion()+"."+appMinorVersionString - } - return appContext.get_appName()+"-"+appFullVersion - }; - RequirementsMatrixFactory.initializeDefaultSetMatrix=function() - { - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1600]=new ExcelClientDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1600]=new WordClientDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1600]=new PowerpointClientDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1601]=new ExcelClientV1DefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1601]=new WordClientV1DefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1601]=new PowerpointClientV1DefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_RCLIENT_1600]=new OutlookClientDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_WAC_1600]=new ExcelWebDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_WAC_1600]=new WordWebDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1600]=new OutlookWebDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1601]=new OutlookWebDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Project_RCLIENT_1600]=new ProjectClientDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Access_WAC_1600]=new AccessWebDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_WAC_1600]=new PowerpointWebDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_IOS_1600]=new ExcelIOSDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.SWAY_WAC_1600]=new SwayWebDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_1600]=new WordIOSDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_16001]=new WordIOSV1DefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_IOS_1600]=new PowerpointIOSDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_IOS_1600]=new OutlookIOSDefaultSetRequirement - }; - RequirementsMatrixFactory.Excel_RCLIENT_1600="1-16.00"; - RequirementsMatrixFactory.Excel_RCLIENT_1601="1-16.01"; - RequirementsMatrixFactory.Word_RCLIENT_1600="2-16.00"; - RequirementsMatrixFactory.Word_RCLIENT_1601="2-16.01"; - RequirementsMatrixFactory.PowerPoint_RCLIENT_1600="4-16.00"; - RequirementsMatrixFactory.PowerPoint_RCLIENT_1601="4-16.01"; - RequirementsMatrixFactory.Outlook_RCLIENT_1600="8-16.00"; - RequirementsMatrixFactory.Excel_WAC_1600="16-16.00"; - RequirementsMatrixFactory.Word_WAC_1600="32-16.00"; - RequirementsMatrixFactory.Outlook_WAC_1600="64-16.00"; - RequirementsMatrixFactory.Outlook_WAC_1601="64-16.01"; - RequirementsMatrixFactory.Project_RCLIENT_1600="128-16.00"; - RequirementsMatrixFactory.Access_WAC_1600="256-16.00"; - RequirementsMatrixFactory.PowerPoint_WAC_1600="512-16.00"; - RequirementsMatrixFactory.Excel_IOS_1600="1024-16.00"; - RequirementsMatrixFactory.SWAY_WAC_1600="2048-16.00"; - RequirementsMatrixFactory.Word_IOS_1600="4096-16.00"; - RequirementsMatrixFactory.Word_IOS_16001="4096-16.00.01"; - RequirementsMatrixFactory.PowerPoint_IOS_1600="8192-16.00"; - RequirementsMatrixFactory.Outlook_IOS_1600="65536-16.00"; - RequirementsMatrixFactory.DefaultSetArrayMatrix={}; - return RequirementsMatrixFactory - }(); - Requirement.RequirementsMatrixFactory=RequirementsMatrixFactory - })(Requirement=OfficeExt.Requirement || (OfficeExt.Requirement={})) -})(OfficeExt || (OfficeExt={})); + var Requirement; + (function(Requirement) + { + var RequirementVersion = function() + { + function RequirementVersion(){} + return RequirementVersion + }(); + Requirement.RequirementVersion = RequirementVersion; + var RequirementMatrix = function() + { + function RequirementMatrix(_setMap) + { + this.isSetSupported = function _isSetSupported(name, minVersion) + { + if(name == undefined) + return false; + if(minVersion == undefined) + minVersion = 0; + var setSupportArray = this._setMap; + var sets = setSupportArray._sets; + if(sets.hasOwnProperty(name.toLowerCase())) + { + var setMaxVersion = sets[name.toLowerCase()]; + try + { + var setMaxVersionNum = this._getVersion(setMaxVersion); + minVersion = minVersion + ""; + var minVersionNum = this._getVersion(minVersion); + if(setMaxVersionNum.major > 0 && setMaxVersionNum.major > minVersionNum.major) + return true; + if(setMaxVersionNum.minor > 0 && setMaxVersionNum.minor > 0 && setMaxVersionNum.major == minVersionNum.major && setMaxVersionNum.minor >= minVersionNum.minor) + return true + } + catch(e) + { + return false + } + } + return false + }; + this._getVersion = function(version) + { + var temp = version.split("."); + var major = 0; + var minor = 0; + if(temp.length < 2 && isNaN(Number(version))) + throw"version format incorrect"; + else + { + major = Number(temp[0]); + if(temp.length >= 2) + minor = Number(temp[1]); + if(isNaN(major) || isNaN(minor)) + throw"version format incorrect"; + } + var result = { + minor: minor, + major: major + }; + return result + }; + this._setMap = _setMap; + this.isSetSupported = this.isSetSupported.bind(this) + } + return RequirementMatrix + }(); + Requirement.RequirementMatrix = RequirementMatrix; + var DefaultSetRequirement = function() + { + function DefaultSetRequirement(setMap) + { + this._addSetMap = function DefaultSetRequirement_addSetMap(addedSet) + { + for(var name in addedSet) + this._sets[name] = addedSet[name] + }; + this._sets = setMap + } + return DefaultSetRequirement + }(); + Requirement.DefaultSetRequirement = DefaultSetRequirement; + var DefaultDialogSetRequirement = function(_super) + { + __extends(DefaultDialogSetRequirement,_super); + function DefaultDialogSetRequirement() + { + _super.call(this,{dialogapi: 1.1}) + } + return DefaultDialogSetRequirement + }(DefaultSetRequirement); + Requirement.DefaultDialogSetRequirement = DefaultDialogSetRequirement; + var ExcelClientDefaultSetRequirement = function(_super) + { + __extends(ExcelClientDefaultSetRequirement,_super); + function ExcelClientDefaultSetRequirement() + { + _super.call(this,{ + bindingevents: 1.1, + documentevents: 1.1, + excelapi: 1.1, + matrixbindings: 1.1, + matrixcoercion: 1.1, + selection: 1.1, + settings: 1.1, + tablebindings: 1.1, + tablecoercion: 1.1, + textbindings: 1.1, + textcoercion: 1.1 + }) + } + return ExcelClientDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.ExcelClientDefaultSetRequirement = ExcelClientDefaultSetRequirement; + var ExcelClientV1DefaultSetRequirement = function(_super) + { + __extends(ExcelClientV1DefaultSetRequirement,_super); + function ExcelClientV1DefaultSetRequirement() + { + _super.call(this); + this._addSetMap({imagecoercion: 1.1}) + } + return ExcelClientV1DefaultSetRequirement + }(ExcelClientDefaultSetRequirement); + Requirement.ExcelClientV1DefaultSetRequirement = ExcelClientV1DefaultSetRequirement; + var OutlookClientDefaultSetRequirement = function(_super) + { + __extends(OutlookClientDefaultSetRequirement,_super); + function OutlookClientDefaultSetRequirement() + { + _super.call(this,{mailbox: 1.3}) + } + return OutlookClientDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.OutlookClientDefaultSetRequirement = OutlookClientDefaultSetRequirement; + var WordClientDefaultSetRequirement = function(_super) + { + __extends(WordClientDefaultSetRequirement,_super); + function WordClientDefaultSetRequirement() + { + _super.call(this,{ + bindingevents: 1.1, + compressedfile: 1.1, + customxmlparts: 1.1, + documentevents: 1.1, + file: 1.1, + htmlcoercion: 1.1, + matrixbindings: 1.1, + matrixcoercion: 1.1, + ooxmlcoercion: 1.1, + pdffile: 1.1, + selection: 1.1, + settings: 1.1, + tablebindings: 1.1, + tablecoercion: 1.1, + textbindings: 1.1, + textcoercion: 1.1, + textfile: 1.1, + wordapi: 1.1 + }) + } + return WordClientDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.WordClientDefaultSetRequirement = WordClientDefaultSetRequirement; + var WordClientV1DefaultSetRequirement = function(_super) + { + __extends(WordClientV1DefaultSetRequirement,_super); + function WordClientV1DefaultSetRequirement() + { + _super.call(this); + this._addSetMap({ + customxmlparts: 1.2, + wordapi: 1.2, + imagecoercion: 1.1 + }) + } + return WordClientV1DefaultSetRequirement + }(WordClientDefaultSetRequirement); + Requirement.WordClientV1DefaultSetRequirement = WordClientV1DefaultSetRequirement; + var PowerpointClientDefaultSetRequirement = function(_super) + { + __extends(PowerpointClientDefaultSetRequirement,_super); + function PowerpointClientDefaultSetRequirement() + { + _super.call(this,{ + activeview: 1.1, + compressedfile: 1.1, + documentevents: 1.1, + file: 1.1, + pdffile: 1.1, + selection: 1.1, + settings: 1.1, + textcoercion: 1.1 + }) + } + return PowerpointClientDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.PowerpointClientDefaultSetRequirement = PowerpointClientDefaultSetRequirement; + var PowerpointClientV1DefaultSetRequirement = function(_super) + { + __extends(PowerpointClientV1DefaultSetRequirement,_super); + function PowerpointClientV1DefaultSetRequirement() + { + _super.call(this); + this._addSetMap({imagecoercion: 1.1}) + } + return PowerpointClientV1DefaultSetRequirement + }(PowerpointClientDefaultSetRequirement); + Requirement.PowerpointClientV1DefaultSetRequirement = PowerpointClientV1DefaultSetRequirement; + var ProjectClientDefaultSetRequirement = function(_super) + { + __extends(ProjectClientDefaultSetRequirement,_super); + function ProjectClientDefaultSetRequirement() + { + _super.call(this,{ + selection: 1.1, + textcoercion: 1.1 + }) + } + return ProjectClientDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.ProjectClientDefaultSetRequirement = ProjectClientDefaultSetRequirement; + var ExcelWebDefaultSetRequirement = function(_super) + { + __extends(ExcelWebDefaultSetRequirement,_super); + function ExcelWebDefaultSetRequirement() + { + _super.call(this,{ + bindingevents: 1.1, + documentevents: 1.1, + matrixbindings: 1.1, + matrixcoercion: 1.1, + selection: 1.1, + settings: 1.1, + tablebindings: 1.1, + tablecoercion: 1.1, + textbindings: 1.1, + textcoercion: 1.1, + file: 1.1 + }) + } + return ExcelWebDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.ExcelWebDefaultSetRequirement = ExcelWebDefaultSetRequirement; + var WordWebDefaultSetRequirement = function(_super) + { + __extends(WordWebDefaultSetRequirement,_super); + function WordWebDefaultSetRequirement() + { + _super.call(this,{ + compressedfile: 1.1, + documentevents: 1.1, + file: 1.1, + imagecoercion: 1.1, + matrixcoercion: 1.1, + ooxmlcoercion: 1.1, + pdffile: 1.1, + selection: 1.1, + settings: 1.1, + tablecoercion: 1.1, + textcoercion: 1.1, + textfile: 1.1 + }) + } + return WordWebDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.WordWebDefaultSetRequirement = WordWebDefaultSetRequirement; + var PowerpointWebDefaultSetRequirement = function(_super) + { + __extends(PowerpointWebDefaultSetRequirement,_super); + function PowerpointWebDefaultSetRequirement() + { + _super.call(this,{ + activeview: 1.1, + settings: 1.1 + }) + } + return PowerpointWebDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.PowerpointWebDefaultSetRequirement = PowerpointWebDefaultSetRequirement; + var OutlookWebDefaultSetRequirement = function(_super) + { + __extends(OutlookWebDefaultSetRequirement,_super); + function OutlookWebDefaultSetRequirement() + { + _super.call(this,{mailbox: 1.3}) + } + return OutlookWebDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.OutlookWebDefaultSetRequirement = OutlookWebDefaultSetRequirement; + var SwayWebDefaultSetRequirement = function(_super) + { + __extends(SwayWebDefaultSetRequirement,_super); + function SwayWebDefaultSetRequirement() + { + _super.call(this,{ + activeview: 1.1, + documentevents: 1.1, + selection: 1.1, + settings: 1.1, + textcoercion: 1.1 + }) + } + return SwayWebDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.SwayWebDefaultSetRequirement = SwayWebDefaultSetRequirement; + var AccessWebDefaultSetRequirement = function(_super) + { + __extends(AccessWebDefaultSetRequirement,_super); + function AccessWebDefaultSetRequirement() + { + _super.call(this,{ + bindingevents: 1.1, + partialtablebindings: 1.1, + settings: 1.1, + tablebindings: 1.1, + tablecoercion: 1.1 + }) + } + return AccessWebDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.AccessWebDefaultSetRequirement = AccessWebDefaultSetRequirement; + var ExcelIOSDefaultSetRequirement = function(_super) + { + __extends(ExcelIOSDefaultSetRequirement,_super); + function ExcelIOSDefaultSetRequirement() + { + _super.call(this,{ + bindingevents: 1.1, + documentevents: 1.1, + matrixbindings: 1.1, + matrixcoercion: 1.1, + selection: 1.1, + settings: 1.1, + tablebindings: 1.1, + tablecoercion: 1.1, + textbindings: 1.1, + textcoercion: 1.1 + }) + } + return ExcelIOSDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.ExcelIOSDefaultSetRequirement = ExcelIOSDefaultSetRequirement; + var WordIOSDefaultSetRequirement = function(_super) + { + __extends(WordIOSDefaultSetRequirement,_super); + function WordIOSDefaultSetRequirement() + { + _super.call(this,{ + bindingevents: 1.1, + compressedfile: 1.1, + customxmlparts: 1.1, + documentevents: 1.1, + file: 1.1, + htmlcoercion: 1.1, + matrixbindings: 1.1, + matrixcoercion: 1.1, + ooxmlcoercion: 1.1, + pdffile: 1.1, + selection: 1.1, + settings: 1.1, + tablebindings: 1.1, + tablecoercion: 1.1, + textbindings: 1.1, + textcoercion: 1.1, + textfile: 1.1 + }) + } + return WordIOSDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.WordIOSDefaultSetRequirement = WordIOSDefaultSetRequirement; + var WordIOSV1DefaultSetRequirement = function(_super) + { + __extends(WordIOSV1DefaultSetRequirement,_super); + function WordIOSV1DefaultSetRequirement() + { + _super.call(this); + this._addSetMap({ + customxmlparts: 1.2, + wordapi: 1.2 + }) + } + return WordIOSV1DefaultSetRequirement + }(WordIOSDefaultSetRequirement); + Requirement.WordIOSV1DefaultSetRequirement = WordIOSV1DefaultSetRequirement; + var PowerpointIOSDefaultSetRequirement = function(_super) + { + __extends(PowerpointIOSDefaultSetRequirement,_super); + function PowerpointIOSDefaultSetRequirement() + { + _super.call(this,{ + activeview: 1.1, + compressedfile: 1.1, + documentevents: 1.1, + file: 1.1, + pdffile: 1.1, + selection: 1.1, + settings: 1.1, + textcoercion: 1.1 + }) + } + return PowerpointIOSDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.PowerpointIOSDefaultSetRequirement = PowerpointIOSDefaultSetRequirement; + var OutlookIOSDefaultSetRequirement = function(_super) + { + __extends(OutlookIOSDefaultSetRequirement,_super); + function OutlookIOSDefaultSetRequirement() + { + _super.call(this,{mailbox: 1.1}) + } + return OutlookIOSDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.OutlookIOSDefaultSetRequirement = OutlookIOSDefaultSetRequirement; + var RequirementsMatrixFactory = function() + { + function RequirementsMatrixFactory(){} + RequirementsMatrixFactory.initializeOsfDda = function() + { + OSF.OUtil.setNamespace("Requirement",OSF.DDA) + }; + RequirementsMatrixFactory.getDefaultRequirementMatrix = function(appContext) + { + this.initializeDefaultSetMatrix(); + var defaultRequirementMatrix = undefined; + var clientRequirement = appContext.get_requirementMatrix(); + if(clientRequirement != undefined && clientRequirement.length > 0 && typeof JSON !== "undefined") + { + var matrixItem = JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement(matrixItem)) + } + else + { + var appLocator = RequirementsMatrixFactory.getClientFullVersionString(appContext); + if(RequirementsMatrixFactory.DefaultSetArrayMatrix != undefined && RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator] != undefined) + defaultRequirementMatrix = new RequirementMatrix(RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator]); + else + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement({})) + } + return defaultRequirementMatrix + }; + RequirementsMatrixFactory.getDefaultDialogRequirementMatrix = function(appContext) + { + var defaultRequirementMatrix = undefined; + var clientRequirement = appContext.get_dialogRequirementMatrix(); + if(clientRequirement != undefined && clientRequirement.length > 0 && typeof JSON !== "undefined") + { + var matrixItem = JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement(matrixItem)) + } + else + defaultRequirementMatrix = new RequirementMatrix(new DefaultDialogSetRequirement); + return defaultRequirementMatrix + }; + RequirementsMatrixFactory.getClientFullVersionString = function(appContext) + { + var appMinorVersion = appContext.get_appMinorVersion(); + var appMinorVersionString = ""; + var appFullVersion = ""; + var appName = appContext.get_appName(); + var isIOSClient = appName == 1024 || appName == 4096 || appName == 8192 || appName == 65536; + if(isIOSClient && appContext.get_appVersion() == 1) + if(appName == 4096 && appMinorVersion >= 15) + appFullVersion = "16.00.01"; + else + appFullVersion = "16.00"; + else if(appContext.get_appName() == 64) + appFullVersion = appContext.get_appVersion(); + else + { + if(appMinorVersion < 10) + appMinorVersionString = "0" + appMinorVersion; + else + appMinorVersionString = "" + appMinorVersion; + appFullVersion = appContext.get_appVersion() + "." + appMinorVersionString + } + return appContext.get_appName() + "-" + appFullVersion + }; + RequirementsMatrixFactory.initializeDefaultSetMatrix = function() + { + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1600] = new ExcelClientDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1600] = new WordClientDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1600] = new PowerpointClientDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1601] = new ExcelClientV1DefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1601] = new WordClientV1DefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1601] = new PowerpointClientV1DefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_RCLIENT_1600] = new OutlookClientDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_WAC_1600] = new ExcelWebDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_WAC_1600] = new WordWebDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1600] = new OutlookWebDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1601] = new OutlookWebDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Project_RCLIENT_1600] = new ProjectClientDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Access_WAC_1600] = new AccessWebDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_WAC_1600] = new PowerpointWebDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_IOS_1600] = new ExcelIOSDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.SWAY_WAC_1600] = new SwayWebDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_1600] = new WordIOSDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_16001] = new WordIOSV1DefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_IOS_1600] = new PowerpointIOSDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_IOS_1600] = new OutlookIOSDefaultSetRequirement + }; + RequirementsMatrixFactory.Excel_RCLIENT_1600 = "1-16.00"; + RequirementsMatrixFactory.Excel_RCLIENT_1601 = "1-16.01"; + RequirementsMatrixFactory.Word_RCLIENT_1600 = "2-16.00"; + RequirementsMatrixFactory.Word_RCLIENT_1601 = "2-16.01"; + RequirementsMatrixFactory.PowerPoint_RCLIENT_1600 = "4-16.00"; + RequirementsMatrixFactory.PowerPoint_RCLIENT_1601 = "4-16.01"; + RequirementsMatrixFactory.Outlook_RCLIENT_1600 = "8-16.00"; + RequirementsMatrixFactory.Excel_WAC_1600 = "16-16.00"; + RequirementsMatrixFactory.Word_WAC_1600 = "32-16.00"; + RequirementsMatrixFactory.Outlook_WAC_1600 = "64-16.00"; + RequirementsMatrixFactory.Outlook_WAC_1601 = "64-16.01"; + RequirementsMatrixFactory.Project_RCLIENT_1600 = "128-16.00"; + RequirementsMatrixFactory.Access_WAC_1600 = "256-16.00"; + RequirementsMatrixFactory.PowerPoint_WAC_1600 = "512-16.00"; + RequirementsMatrixFactory.Excel_IOS_1600 = "1024-16.00"; + RequirementsMatrixFactory.SWAY_WAC_1600 = "2048-16.00"; + RequirementsMatrixFactory.Word_IOS_1600 = "4096-16.00"; + RequirementsMatrixFactory.Word_IOS_16001 = "4096-16.00.01"; + RequirementsMatrixFactory.PowerPoint_IOS_1600 = "8192-16.00"; + RequirementsMatrixFactory.Outlook_IOS_1600 = "65536-16.00"; + RequirementsMatrixFactory.DefaultSetArrayMatrix = {}; + return RequirementsMatrixFactory + }(); + Requirement.RequirementsMatrixFactory = RequirementsMatrixFactory + })(Requirement = OfficeExt.Requirement || (OfficeExt.Requirement = {})) +})(OfficeExt || (OfficeExt = {})); OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(); -Microsoft.Office.WebExtension.ApplicationMode={ - WebEditor: "webEditor", - WebViewer: "webViewer", - Client: "client" +var OfficeExt; +(function(OfficeExt) +{ + var HostName; + (function(HostName) + { + var Host = function() + { + function Host() + { + this.getDiagnostics = function _getDiagnostics(version) + { + var diagnostics = { + host: this.getHost(), + version: version || this.getDefaultVersion(), + platform: this.getPlatform() + }; + return diagnostics + }; + this.platformRemappings = { + web: Microsoft.Office.WebExtension.PlatformType.OfficeOnline, + winrt: Microsoft.Office.WebExtension.PlatformType.Universal, + win32: Microsoft.Office.WebExtension.PlatformType.PC, + mac: Microsoft.Office.WebExtension.PlatformType.Mac, + ios: Microsoft.Office.WebExtension.PlatformType.iOS, + android: Microsoft.Office.WebExtension.PlatformType.Android + }; + this.camelCaseMappings = { + powerpoint: Microsoft.Office.WebExtension.HostType.PowerPoint, + onenote: Microsoft.Office.WebExtension.HostType.OneNote + }; + this.hostInfo = OSF._OfficeAppFactory.getHostInfo(); + this.getHost = this.getHost.bind(this); + this.getPlatform = this.getPlatform.bind(this); + this.getDiagnostics = this.getDiagnostics.bind(this) + } + Host.prototype.capitalizeFirstLetter = function(input) + { + if(input) + return input[0].toUpperCase() + input.slice(1).toLowerCase(); + return input + }; + Host.getInstance = function() + { + if(Host.hostObj === undefined) + Host.hostObj = new Host; + return Host.hostObj + }; + Host.prototype.getPlatform = function() + { + if(this.hostInfo.hostPlatform) + { + var hostPlatform = this.hostInfo.hostPlatform.toLowerCase(); + if(this.platformRemappings[hostPlatform]) + return this.platformRemappings[hostPlatform] + } + return null + }; + Host.prototype.getHost = function() + { + if(this.hostInfo.hostType) + { + var hostType = this.hostInfo.hostType.toLowerCase(); + if(this.camelCaseMappings[hostType]) + return this.camelCaseMappings[hostType]; + hostType = this.capitalizeFirstLetter(this.hostInfo.hostType); + if(Microsoft.Office.WebExtension.HostType[hostType]) + return Microsoft.Office.WebExtension.HostType[hostType] + } + return null + }; + Host.prototype.getDefaultVersion = function() + { + if(this.getHost()) + return"16.0.0000.0000"; + return null + }; + return Host + }(); + HostName.Host = Host + })(HostName = OfficeExt.HostName || (OfficeExt.HostName = {})) +})(OfficeExt || (OfficeExt = {})); +Microsoft.Office.WebExtension.ApplicationMode = { + WebEditor: "webEditor", + WebViewer: "webViewer", + Client: "client" }; -Microsoft.Office.WebExtension.DocumentMode={ - ReadOnly: "readOnly", - ReadWrite: "readWrite" +Microsoft.Office.WebExtension.DocumentMode = { + ReadOnly: "readOnly", + ReadWrite: "readWrite" }; -OSF.NamespaceManager=function OSF_NamespaceManager() +OSF.NamespaceManager = function OSF_NamespaceManager() { - var _userOffice; - var _useShortcut=false; - return{ - enableShortcut: function OSF_NamespaceManager$enableShortcut() - { - if(!_useShortcut) - { - if(window.Office) - _userOffice=window.Office; - else - OSF.OUtil.setNamespace("Office",window); - window.Office=Microsoft.Office.WebExtension; - _useShortcut=true - } - }, - disableShortcut: function OSF_NamespaceManager$disableShortcut() - { - if(_useShortcut) - { - if(_userOffice) - window.Office=_userOffice; - else - OSF.OUtil.unsetNamespace("Office",window); - _useShortcut=false - } - } - } + var _userOffice; + var _useShortcut = false; + return{ + enableShortcut: function OSF_NamespaceManager$enableShortcut() + { + if(!_useShortcut) + { + if(window.Office) + _userOffice = window.Office; + else + OSF.OUtil.setNamespace("Office",window); + window.Office = Microsoft.Office.WebExtension; + _useShortcut = true + } + }, + disableShortcut: function OSF_NamespaceManager$disableShortcut() + { + if(_useShortcut) + { + if(_userOffice) + window.Office = _userOffice; + else + OSF.OUtil.unsetNamespace("Office",window); + _useShortcut = false + } + } + } }(); OSF.NamespaceManager.enableShortcut(); -Microsoft.Office.WebExtension.useShortNamespace=function Microsoft_Office_WebExtension_useShortNamespace(useShortcut) +Microsoft.Office.WebExtension.useShortNamespace = function Microsoft_Office_WebExtension_useShortNamespace(useShortcut) { - if(useShortcut) - OSF.NamespaceManager.enableShortcut(); - else - OSF.NamespaceManager.disableShortcut() + if(useShortcut) + OSF.NamespaceManager.enableShortcut(); + else + OSF.NamespaceManager.disableShortcut() }; -Microsoft.Office.WebExtension.select=function Microsoft_Office_WebExtension_select(str, errorCallback) +Microsoft.Office.WebExtension.select = function Microsoft_Office_WebExtension_select(str, errorCallback) { - var promise; - if(str && typeof str=="string") - { - var index=str.indexOf("#"); - if(index !=-1) - { - var op=str.substring(0,index); - var target=str.substring(index+1); - switch(op) - { - case"binding": - case"bindings": - if(target) - promise=new OSF.DDA.BindingPromise(target); - break - } - } - } - if(!promise) - { - if(errorCallback) - { - var callbackType=typeof errorCallback; - if(callbackType=="function") - { - var callArgs={}; - callArgs[Microsoft.Office.WebExtension.Parameters.Callback]=errorCallback; - OSF.DDA.issueAsyncResult(callArgs,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext)) - } - else - throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,callbackType); - } - } - else - { - promise.onFail=errorCallback; - return promise - } + var promise; + if(str && typeof str == "string") + { + var index = str.indexOf("#"); + if(index != -1) + { + var op = str.substring(0,index); + var target = str.substring(index + 1); + switch(op) + { + case"binding": + case"bindings": + if(target) + promise = new OSF.DDA.BindingPromise(target); + break + } + } + } + if(!promise) + { + if(errorCallback) + { + var callbackType = typeof errorCallback; + if(callbackType == "function") + { + var callArgs = {}; + callArgs[Microsoft.Office.WebExtension.Parameters.Callback] = errorCallback; + OSF.DDA.issueAsyncResult(callArgs,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext)) + } + else + throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,callbackType); + } + } + else + { + promise.onFail = errorCallback; + return promise + } }; -OSF.DDA.Context=function OSF_DDA_Context(officeAppContext, document, license, appOM, getOfficeTheme) +OSF.DDA.Context = function OSF_DDA_Context(officeAppContext, document, license, appOM, getOfficeTheme) { - OSF.OUtil.defineEnumerableProperties(this,{ - contentLanguage: {value: officeAppContext.get_dataLocale()}, - displayLanguage: {value: officeAppContext.get_appUILocale()}, - touchEnabled: {value: officeAppContext.get_touchEnabled()}, - commerceAllowed: {value: officeAppContext.get_commerceAllowed()} - }); - if(license) - OSF.OUtil.defineEnumerableProperty(this,"license",{value: license}); - if(officeAppContext.ui) - OSF.OUtil.defineEnumerableProperty(this,"ui",{value: officeAppContext.ui}); - if(!officeAppContext.get_isDialog()) - { - if(document) - OSF.OUtil.defineEnumerableProperty(this,"document",{value: document}); - if(appOM) - { - var displayName=appOM.displayName || "appOM"; - delete appOM.displayName; - OSF.OUtil.defineEnumerableProperty(this,displayName,{value: appOM}) - } - if(getOfficeTheme) - OSF.OUtil.defineEnumerableProperty(this,"officeTheme",{get: function() - { - return getOfficeTheme() - }}); - var requirements=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(officeAppContext); - OSF.OUtil.defineEnumerableProperty(this,"requirements",{value: requirements}) - } + OSF.OUtil.defineEnumerableProperties(this,{ + contentLanguage: {value: officeAppContext.get_dataLocale()}, + displayLanguage: {value: officeAppContext.get_appUILocale()}, + touchEnabled: {value: officeAppContext.get_touchEnabled()}, + commerceAllowed: {value: officeAppContext.get_commerceAllowed()}, + host: {value: OfficeExt.HostName.Host.getInstance().getHost()}, + platform: {value: OfficeExt.HostName.Host.getInstance().getPlatform()}, + diagnostics: {value: OfficeExt.HostName.Host.getInstance().getDiagnostics(officeAppContext.get_hostFullVersion())} + }); + if(license) + OSF.OUtil.defineEnumerableProperty(this,"license",{value: license}); + if(officeAppContext.ui) + OSF.OUtil.defineEnumerableProperty(this,"ui",{value: officeAppContext.ui}); + if(officeAppContext.auth) + OSF.OUtil.defineEnumerableProperty(this,"auth",{value: officeAppContext.auth}); + if(officeAppContext.get_isDialog()) + { + var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); + OSF.OUtil.defineEnumerableProperty(this,"requirements",{value: requirements}) + } + else + { + if(document) + OSF.OUtil.defineEnumerableProperty(this,"document",{value: document}); + if(appOM) + { + var displayName = appOM.displayName || "appOM"; + delete appOM.displayName; + OSF.OUtil.defineEnumerableProperty(this,displayName,{value: appOM}) + } + if(getOfficeTheme) + OSF.OUtil.defineEnumerableProperty(this,"officeTheme",{get: function() + { + return getOfficeTheme() + }}); + var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(officeAppContext); + OSF.OUtil.defineEnumerableProperty(this,"requirements",{value: requirements}) + } }; -OSF.DDA.OutlookContext=function OSF_DDA_OutlookContext(appContext, settings, license, appOM, getOfficeTheme) +OSF.DDA.OutlookContext = function OSF_DDA_OutlookContext(appContext, settings, license, appOM, getOfficeTheme) { - OSF.DDA.OutlookContext.uber.constructor.call(this,appContext,null,license,appOM,getOfficeTheme); - if(settings) - OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value: settings}) + OSF.DDA.OutlookContext.uber.constructor.call(this,appContext,null,license,appOM,getOfficeTheme); + if(settings) + OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value: settings}) }; OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context); -OSF.DDA.OutlookAppOm=function OSF_DDA_OutlookAppOm(appContext, window, appReady){}; -OSF.DDA.Document=function OSF_DDA_Document(officeAppContext, settings) +OSF.DDA.OutlookAppOm = function OSF_DDA_OutlookAppOm(appContext, window, appReady){}; +OSF.DDA.Document = function OSF_DDA_Document(officeAppContext, settings) { - var mode; - switch(officeAppContext.get_clientMode()) - { - case OSF.ClientMode.ReadOnly: - mode=Microsoft.Office.WebExtension.DocumentMode.ReadOnly; - break; - case OSF.ClientMode.ReadWrite: - mode=Microsoft.Office.WebExtension.DocumentMode.ReadWrite; - break - } - if(settings) - OSF.OUtil.defineEnumerableProperty(this,"settings",{value: settings}); - OSF.OUtil.defineMutableProperties(this,{ - mode: {value: mode}, - url: {value: officeAppContext.get_docUrl()} - }) + var mode; + switch(officeAppContext.get_clientMode()) + { + case OSF.ClientMode.ReadOnly: + mode = Microsoft.Office.WebExtension.DocumentMode.ReadOnly; + break; + case OSF.ClientMode.ReadWrite: + mode = Microsoft.Office.WebExtension.DocumentMode.ReadWrite; + break + } + if(settings) + OSF.OUtil.defineEnumerableProperty(this,"settings",{value: settings}); + OSF.OUtil.defineMutableProperties(this,{ + mode: {value: mode}, + url: {value: officeAppContext.get_docUrl()} + }) }; -OSF.DDA.JsomDocument=function OSF_DDA_JsomDocument(officeAppContext, bindingFacade, settings) +OSF.DDA.JsomDocument = function OSF_DDA_JsomDocument(officeAppContext, bindingFacade, settings) { - OSF.DDA.JsomDocument.uber.constructor.call(this,officeAppContext,settings); - if(bindingFacade) - OSF.OUtil.defineEnumerableProperty(this,"bindings",{get: function OSF_DDA_Document$GetBindings() - { - return bindingFacade - }}); - var am=OSF.DDA.AsyncMethodNames; - OSF.DDA.DispIdHost.addAsyncMethods(this,[am.GetSelectedDataAsync,am.SetSelectedDataAsync]); - OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged])) + OSF.DDA.JsomDocument.uber.constructor.call(this,officeAppContext,settings); + if(bindingFacade) + OSF.OUtil.defineEnumerableProperty(this,"bindings",{get: function OSF_DDA_Document$GetBindings() + { + return bindingFacade + }}); + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this,[am.GetSelectedDataAsync,am.SetSelectedDataAsync]); + OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged])) }; OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document); OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get: function Microsoft_Office_WebExtension$GetContext() - { - var context; - if(OSF && OSF._OfficeAppFactory) - context=OSF._OfficeAppFactory.getContext(); - return context - }}); -OSF.DDA.License=function OSF_DDA_License(eToken) + { + var context; + if(OSF && OSF._OfficeAppFactory) + context = OSF._OfficeAppFactory.getContext(); + return context + }}); +OSF.DDA.License = function OSF_DDA_License(eToken) { - OSF.OUtil.defineEnumerableProperty(this,"value",{value: eToken}) + OSF.OUtil.defineEnumerableProperty(this,"value",{value: eToken}) }; -OSF.DDA.ApiMethodCall=function OSF_DDA_ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) +OSF.DDA.ApiMethodCall = function OSF_DDA_ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { - var requiredCount=requiredParameters.length; - var getInvalidParameterString=OSF.OUtil.delayExecutionAndCache(function() - { - return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,displayName) - }); - this.verifyArguments=function OSF_DDA_ApiMethodCall$VerifyArguments(params, args) - { - for(var name in params) - { - var param=params[name]; - var arg=args[name]; - if(param["enum"]) - switch(typeof arg) - { - case"string": - if(OSF.OUtil.listContainsValue(param["enum"],arg)) - break; - case"undefined": - throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration; - default: - throw getInvalidParameterString(); - } - if(param["types"]) - if(!OSF.OUtil.listContainsValue(param["types"],typeof arg)) - throw getInvalidParameterString(); - } - }; - this.extractRequiredArguments=function OSF_DDA_ApiMethodCall$ExtractRequiredArguments(userArgs, caller, stateInfo) - { - if(userArgs.length < requiredCount) - throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments); - var requiredArgs=[]; - var index; - for(index=0; index < requiredCount; index++) - requiredArgs.push(userArgs[index]); - this.verifyArguments(requiredParameters,requiredArgs); - var ret={}; - for(index=0; index < requiredCount; index++) - { - var param=requiredParameters[index]; - var arg=requiredArgs[index]; - if(param.verify) - { - var isValid=param.verify(arg,caller,stateInfo); - if(!isValid) - throw getInvalidParameterString(); - } - ret[param.name]=arg - } - return ret - },this.fillOptions=function OSF_DDA_ApiMethodCall$FillOptions(options, requiredArgs, caller, stateInfo) - { - options=options || {}; - for(var optionName in supportedOptions) - if(!OSF.OUtil.listContainsKey(options,optionName)) - { - var value=undefined; - var option=supportedOptions[optionName]; - if(option.calculate && requiredArgs) - value=option.calculate(requiredArgs,caller,stateInfo); - if(!value && option.defaultValue !==undefined) - value=option.defaultValue; - options[optionName]=value - } - return options - }; - this.constructCallArgs=function OSF_DAA_ApiMethodCall$ConstructCallArgs(required, options, caller, stateInfo) - { - var callArgs={}; - for(var r in required) - callArgs[r]=required[r]; - for(var o in options) - callArgs[o]=options[o]; - for(var s in privateStateCallbacks) - callArgs[s]=privateStateCallbacks[s](caller,stateInfo); - if(checkCallArgs) - callArgs=checkCallArgs(callArgs,caller,stateInfo); - return callArgs - } + var requiredCount = requiredParameters.length; + var getInvalidParameterString = OSF.OUtil.delayExecutionAndCache(function() + { + return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,displayName) + }); + this.verifyArguments = function OSF_DDA_ApiMethodCall$VerifyArguments(params, args) + { + for(var name in params) + { + var param = params[name]; + var arg = args[name]; + if(param["enum"]) + switch(typeof arg) + { + case"string": + if(OSF.OUtil.listContainsValue(param["enum"],arg)) + break; + case"undefined": + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration; + default: + throw getInvalidParameterString(); + } + if(param["types"]) + if(!OSF.OUtil.listContainsValue(param["types"],typeof arg)) + throw getInvalidParameterString(); + } + }; + this.extractRequiredArguments = function OSF_DDA_ApiMethodCall$ExtractRequiredArguments(userArgs, caller, stateInfo) + { + if(userArgs.length < requiredCount) + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments); + var requiredArgs = []; + var index; + for(index = 0; index < requiredCount; index++) + requiredArgs.push(userArgs[index]); + this.verifyArguments(requiredParameters,requiredArgs); + var ret = {}; + for(index = 0; index < requiredCount; index++) + { + var param = requiredParameters[index]; + var arg = requiredArgs[index]; + if(param.verify) + { + var isValid = param.verify(arg,caller,stateInfo); + if(!isValid) + throw getInvalidParameterString(); + } + ret[param.name] = arg + } + return ret + },this.fillOptions = function OSF_DDA_ApiMethodCall$FillOptions(options, requiredArgs, caller, stateInfo) + { + options = options || {}; + for(var optionName in supportedOptions) + if(!OSF.OUtil.listContainsKey(options,optionName)) + { + var value = undefined; + var option = supportedOptions[optionName]; + if(option.calculate && requiredArgs) + value = option.calculate(requiredArgs,caller,stateInfo); + if(!value && option.defaultValue !== undefined) + value = option.defaultValue; + options[optionName] = value + } + return options + }; + this.constructCallArgs = function OSF_DAA_ApiMethodCall$ConstructCallArgs(required, options, caller, stateInfo) + { + var callArgs = {}; + for(var r in required) + callArgs[r] = required[r]; + for(var o in options) + callArgs[o] = options[o]; + for(var s in privateStateCallbacks) + callArgs[s] = privateStateCallbacks[s](caller,stateInfo); + if(checkCallArgs) + callArgs = checkCallArgs(callArgs,caller,stateInfo); + return callArgs + } }; OSF.OUtil.setNamespace("AsyncResultEnum",OSF.DDA); -OSF.DDA.AsyncResultEnum.Properties={ - Context: "Context", - Value: "Value", - Status: "Status", - Error: "Error" +OSF.DDA.AsyncResultEnum.Properties = { + Context: "Context", + Value: "Value", + Status: "Status", + Error: "Error" }; -Microsoft.Office.WebExtension.AsyncResultStatus={ - Succeeded: "succeeded", - Failed: "failed" +Microsoft.Office.WebExtension.AsyncResultStatus = { + Succeeded: "succeeded", + Failed: "failed" }; -OSF.DDA.AsyncResultEnum.ErrorCode={ - Success: 0, - Failed: 1 +OSF.DDA.AsyncResultEnum.ErrorCode = { + Success: 0, + Failed: 1 }; -OSF.DDA.AsyncResultEnum.ErrorProperties={ - Name: "Name", - Message: "Message", - Code: "Code" +OSF.DDA.AsyncResultEnum.ErrorProperties = { + Name: "Name", + Message: "Message", + Code: "Code" }; -OSF.DDA.AsyncMethodNames={}; -OSF.DDA.AsyncMethodNames.addNames=function(methodNames) +OSF.DDA.AsyncMethodNames = {}; +OSF.DDA.AsyncMethodNames.addNames = function(methodNames) { - for(var entry in methodNames) - { - var am={}; - OSF.OUtil.defineEnumerableProperties(am,{ - id: {value: entry}, - displayName: {value: methodNames[entry]} - }); - OSF.DDA.AsyncMethodNames[entry]=am - } + for(var entry in methodNames) + { + var am = {}; + OSF.OUtil.defineEnumerableProperties(am,{ + id: {value: entry}, + displayName: {value: methodNames[entry]} + }); + OSF.DDA.AsyncMethodNames[entry] = am + } }; -OSF.DDA.AsyncMethodCall=function OSF_DDA_AsyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, onSucceeded, onFailed, checkCallArgs, displayName) +OSF.DDA.AsyncMethodCall = function OSF_DDA_AsyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, onSucceeded, onFailed, checkCallArgs, displayName) { - var requiredCount=requiredParameters.length; - var apiMethods=new OSF.DDA.ApiMethodCall(requiredParameters,supportedOptions,privateStateCallbacks,checkCallArgs,displayName); - function OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) - { - if(userArgs.length > requiredCount+2) - throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); - var options, - parameterCallback; - for(var i=userArgs.length - 1; i >=requiredCount; i--) - { - var argument=userArgs[i]; - switch(typeof argument) - { - case"object": - if(options) - throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); - else - options=argument; - break; - case"function": - if(parameterCallback) - throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction); - else - parameterCallback=argument; - break; - default: - throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); - break - } - } - options=apiMethods.fillOptions(options,requiredArgs,caller,stateInfo); - if(parameterCallback) - if(options[Microsoft.Office.WebExtension.Parameters.Callback]) - throw Strings.OfficeOM.L_RedundantCallbackSpecification; - else - options[Microsoft.Office.WebExtension.Parameters.Callback]=parameterCallback; - apiMethods.verifyArguments(supportedOptions,options); - return options - } - this.verifyAndExtractCall=function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) - { - var required=apiMethods.extractRequiredArguments(userArgs,caller,stateInfo); - var options=OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs,required,caller,stateInfo); - var callArgs=apiMethods.constructCallArgs(required,options,caller,stateInfo); - return callArgs - }; - this.processResponse=function OSF_DAA_AsyncMethodCall$ProcessResponse(status, response, caller, callArgs) - { - var payload; - if(status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - if(onSucceeded) - payload=onSucceeded(response,caller,callArgs); - else - payload=response; - else if(onFailed) - payload=onFailed(status,response); - else - payload=OSF.DDA.ErrorCodeManager.getErrorArgs(status); - return payload - }; - this.getCallArgs=function(suppliedArgs) - { - var options, - parameterCallback; - for(var i=suppliedArgs.length - 1; i >=requiredCount; i--) - { - var argument=suppliedArgs[i]; - switch(typeof argument) - { - case"object": - options=argument; - break; - case"function": - parameterCallback=argument; - break - } - } - options=options || {}; - if(parameterCallback) - options[Microsoft.Office.WebExtension.Parameters.Callback]=parameterCallback; - return options - } + var requiredCount = requiredParameters.length; + var apiMethods = new OSF.DDA.ApiMethodCall(requiredParameters,supportedOptions,privateStateCallbacks,checkCallArgs,displayName); + function OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) + { + if(userArgs.length > requiredCount + 2) + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); + var options, + parameterCallback; + for(var i = userArgs.length - 1; i >= requiredCount; i--) + { + var argument = userArgs[i]; + switch(typeof argument) + { + case"object": + if(options) + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); + else + options = argument; + break; + case"function": + if(parameterCallback) + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction); + else + parameterCallback = argument; + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); + break + } + } + options = apiMethods.fillOptions(options,requiredArgs,caller,stateInfo); + if(parameterCallback) + if(options[Microsoft.Office.WebExtension.Parameters.Callback]) + throw Strings.OfficeOM.L_RedundantCallbackSpecification; + else + options[Microsoft.Office.WebExtension.Parameters.Callback] = parameterCallback; + apiMethods.verifyArguments(supportedOptions,options); + return options + } + this.verifyAndExtractCall = function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) + { + var required = apiMethods.extractRequiredArguments(userArgs,caller,stateInfo); + var options = OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs,required,caller,stateInfo); + var callArgs = apiMethods.constructCallArgs(required,options,caller,stateInfo); + return callArgs + }; + this.processResponse = function OSF_DAA_AsyncMethodCall$ProcessResponse(status, response, caller, callArgs) + { + var payload; + if(status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + if(onSucceeded) + payload = onSucceeded(response,caller,callArgs); + else + payload = response; + else if(onFailed) + payload = onFailed(status,response); + else + payload = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + return payload + }; + this.getCallArgs = function(suppliedArgs) + { + var options, + parameterCallback; + for(var i = suppliedArgs.length - 1; i >= requiredCount; i--) + { + var argument = suppliedArgs[i]; + switch(typeof argument) + { + case"object": + options = argument; + break; + case"function": + parameterCallback = argument; + break + } + } + options = options || {}; + if(parameterCallback) + options[Microsoft.Office.WebExtension.Parameters.Callback] = parameterCallback; + return options + } }; -OSF.DDA.AsyncMethodCallFactory=function() +OSF.DDA.AsyncMethodCallFactory = function() { - return{manufacture: function(params) - { - var supportedOptions=params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; - var privateStateCallbacks=params.privateStateCallbacks ? OSF.OUtil.createObject(params.privateStateCallbacks) : []; - return new OSF.DDA.AsyncMethodCall(params.requiredArguments || [],supportedOptions,privateStateCallbacks,params.onSucceeded,params.onFailed,params.checkCallArgs,params.method.displayName) - }} + return{manufacture: function(params) + { + var supportedOptions = params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + var privateStateCallbacks = params.privateStateCallbacks ? OSF.OUtil.createObject(params.privateStateCallbacks) : []; + return new OSF.DDA.AsyncMethodCall(params.requiredArguments || [],supportedOptions,privateStateCallbacks,params.onSucceeded,params.onFailed,params.checkCallArgs,params.method.displayName) + }} }(); -OSF.DDA.AsyncMethodCalls={}; -OSF.DDA.AsyncMethodCalls.define=function(callDefinition) +OSF.DDA.AsyncMethodCalls = {}; +OSF.DDA.AsyncMethodCalls.define = function(callDefinition) { - OSF.DDA.AsyncMethodCalls[callDefinition.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(callDefinition) + OSF.DDA.AsyncMethodCalls[callDefinition.method.id] = OSF.DDA.AsyncMethodCallFactory.manufacture(callDefinition) }; -OSF.DDA.Error=function OSF_DDA_Error(name, message, code) +OSF.DDA.Error = function OSF_DDA_Error(name, message, code) { - OSF.OUtil.defineEnumerableProperties(this,{ - name: {value: name}, - message: {value: message}, - code: {value: code} - }) + OSF.OUtil.defineEnumerableProperties(this,{ + name: {value: name}, + message: {value: message}, + code: {value: code} + }) }; -OSF.DDA.AsyncResult=function OSF_DDA_AsyncResult(initArgs, errorArgs) +OSF.DDA.AsyncResult = function OSF_DDA_AsyncResult(initArgs, errorArgs) { - OSF.OUtil.defineEnumerableProperties(this,{ - value: {value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Value]}, - status: {value: errorArgs ? Microsoft.Office.WebExtension.AsyncResultStatus.Failed : Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded} - }); - if(initArgs[OSF.DDA.AsyncResultEnum.Properties.Context]) - OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Context]}); - if(errorArgs) - OSF.OUtil.defineEnumerableProperty(this,"error",{value: new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])}) + OSF.OUtil.defineEnumerableProperties(this,{ + value: {value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Value]}, + status: {value: errorArgs ? Microsoft.Office.WebExtension.AsyncResultStatus.Failed : Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded} + }); + if(initArgs[OSF.DDA.AsyncResultEnum.Properties.Context]) + OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Context]}); + if(errorArgs) + OSF.OUtil.defineEnumerableProperty(this,"error",{value: new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])}) }; -OSF.DDA.issueAsyncResult=function OSF_DDA$IssueAsyncResult(callArgs, status, payload) +OSF.DDA.issueAsyncResult = function OSF_DDA$IssueAsyncResult(callArgs, status, payload) { - var callback=callArgs[Microsoft.Office.WebExtension.Parameters.Callback]; - if(callback) - { - var asyncInitArgs={}; - asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Context]=callArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; - var errorArgs; - if(status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Value]=payload; - else - { - errorArgs={}; - payload=payload || OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=payload.name || payload; - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=payload.message || payload - } - callback(new OSF.DDA.AsyncResult(asyncInitArgs,errorArgs)) - } + var callback = callArgs[Microsoft.Office.WebExtension.Parameters.Callback]; + if(callback) + { + var asyncInitArgs = {}; + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Context] = callArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; + var errorArgs; + if(status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Value] = payload; + else + { + errorArgs = {}; + payload = payload || OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code] = status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name] = payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message] = payload.message || payload + } + callback(new OSF.DDA.AsyncResult(asyncInitArgs,errorArgs)) + } }; -OSF.DDA.SyncMethodNames={}; -OSF.DDA.SyncMethodNames.addNames=function(methodNames) +OSF.DDA.SyncMethodNames = {}; +OSF.DDA.SyncMethodNames.addNames = function(methodNames) { - for(var entry in methodNames) - { - var am={}; - OSF.OUtil.defineEnumerableProperties(am,{ - id: {value: entry}, - displayName: {value: methodNames[entry]} - }); - OSF.DDA.SyncMethodNames[entry]=am - } + for(var entry in methodNames) + { + var am = {}; + OSF.OUtil.defineEnumerableProperties(am,{ + id: {value: entry}, + displayName: {value: methodNames[entry]} + }); + OSF.DDA.SyncMethodNames[entry] = am + } }; -OSF.DDA.SyncMethodCall=function OSF_DDA_SyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) +OSF.DDA.SyncMethodCall = function OSF_DDA_SyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { - var requiredCount=requiredParameters.length; - var apiMethods=new OSF.DDA.ApiMethodCall(requiredParameters,supportedOptions,privateStateCallbacks,checkCallArgs,displayName); - function OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) - { - if(userArgs.length > requiredCount+1) - throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); - var options, - parameterCallback; - for(var i=userArgs.length - 1; i >=requiredCount; i--) - { - var argument=userArgs[i]; - switch(typeof argument) - { - case"object": - if(options) - throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); - else - options=argument; - break; - default: - throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); - break - } - } - options=apiMethods.fillOptions(options,requiredArgs,caller,stateInfo); - apiMethods.verifyArguments(supportedOptions,options); - return options - } - this.verifyAndExtractCall=function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) - { - var required=apiMethods.extractRequiredArguments(userArgs,caller,stateInfo); - var options=OSF_DAA_SyncMethodCall$ExtractOptions(userArgs,required,caller,stateInfo); - var callArgs=apiMethods.constructCallArgs(required,options,caller,stateInfo); - return callArgs - } + var requiredCount = requiredParameters.length; + var apiMethods = new OSF.DDA.ApiMethodCall(requiredParameters,supportedOptions,privateStateCallbacks,checkCallArgs,displayName); + function OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) + { + if(userArgs.length > requiredCount + 1) + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); + var options, + parameterCallback; + for(var i = userArgs.length - 1; i >= requiredCount; i--) + { + var argument = userArgs[i]; + switch(typeof argument) + { + case"object": + if(options) + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); + else + options = argument; + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); + break + } + } + options = apiMethods.fillOptions(options,requiredArgs,caller,stateInfo); + apiMethods.verifyArguments(supportedOptions,options); + return options + } + this.verifyAndExtractCall = function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) + { + var required = apiMethods.extractRequiredArguments(userArgs,caller,stateInfo); + var options = OSF_DAA_SyncMethodCall$ExtractOptions(userArgs,required,caller,stateInfo); + var callArgs = apiMethods.constructCallArgs(required,options,caller,stateInfo); + return callArgs + } }; -OSF.DDA.SyncMethodCallFactory=function() +OSF.DDA.SyncMethodCallFactory = function() { - return{manufacture: function(params) - { - var supportedOptions=params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; - return new OSF.DDA.SyncMethodCall(params.requiredArguments || [],supportedOptions,params.privateStateCallbacks,params.checkCallArgs,params.method.displayName) - }} + return{manufacture: function(params) + { + var supportedOptions = params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + return new OSF.DDA.SyncMethodCall(params.requiredArguments || [],supportedOptions,params.privateStateCallbacks,params.checkCallArgs,params.method.displayName) + }} }(); -OSF.DDA.SyncMethodCalls={}; -OSF.DDA.SyncMethodCalls.define=function(callDefinition) +OSF.DDA.SyncMethodCalls = {}; +OSF.DDA.SyncMethodCalls.define = function(callDefinition) { - OSF.DDA.SyncMethodCalls[callDefinition.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(callDefinition) + OSF.DDA.SyncMethodCalls[callDefinition.method.id] = OSF.DDA.SyncMethodCallFactory.manufacture(callDefinition) }; -OSF.DDA.ListType=function() +OSF.DDA.ListType = function() { - var listTypes={}; - return{ - setListType: function OSF_DDA_ListType$AddListType(t, prop) - { - listTypes[t]=prop - }, - isListType: function OSF_DDA_ListType$IsListType(t) - { - return OSF.OUtil.listContainsKey(listTypes,t) - }, - getDescriptor: function OSF_DDA_ListType$getDescriptor(t) - { - return listTypes[t] - } - } + var listTypes = {}; + return{ + setListType: function OSF_DDA_ListType$AddListType(t, prop) + { + listTypes[t] = prop + }, + isListType: function OSF_DDA_ListType$IsListType(t) + { + return OSF.OUtil.listContainsKey(listTypes,t) + }, + getDescriptor: function OSF_DDA_ListType$getDescriptor(t) + { + return listTypes[t] + } + } }(); -OSF.DDA.HostParameterMap=function(specialProcessor, mappings) +OSF.DDA.HostParameterMap = function(specialProcessor, mappings) { - var toHostMap="toHost"; - var fromHostMap="fromHost"; - var self="self"; - var dynamicTypes={}; - dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]={ - toHost: function(data) - { - if(data !=null && data.rows !==undefined) - { - var tableData={}; - tableData[OSF.DDA.TableDataProperties.TableRows]=data.rows; - tableData[OSF.DDA.TableDataProperties.TableHeaders]=data.headers; - data=tableData - } - return data - }, - fromHost: function(args) - { - return args - } - }; - dynamicTypes[Microsoft.Office.WebExtension.Parameters.SampleData]=dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]; - function mapValues(preimageSet, mapping) - { - var ret=preimageSet ? {} : undefined; - for(var entry in preimageSet) - { - var preimage=preimageSet[entry]; - var image; - if(OSF.DDA.ListType.isListType(entry)) - { - image=[]; - for(var subEntry in preimage) - image.push(mapValues(preimage[subEntry],mapping)) - } - else if(OSF.OUtil.listContainsKey(dynamicTypes,entry)) - image=dynamicTypes[entry][mapping](preimage); - else if(mapping==fromHostMap && specialProcessor.preserveNesting(entry)) - image=mapValues(preimage,mapping); - else - { - var maps=mappings[entry]; - if(maps) - { - var map=maps[mapping]; - if(map) - { - image=map[preimage]; - if(image===undefined) - image=preimage - } - } - else - image=preimage - } - ret[entry]=image - } - return ret - } - function generateArguments(imageSet, parameters) - { - var ret; - for(var param in parameters) - { - var arg; - if(specialProcessor.isComplexType(param)) - arg=generateArguments(imageSet,mappings[param][toHostMap]); - else - arg=imageSet[param]; - if(arg !=undefined) - { - if(!ret) - ret={}; - var index=parameters[param]; - if(index==self) - index=param; - ret[index]=specialProcessor.pack(param,arg) - } - } - return ret - } - function extractArguments(source, parameters, extracted) - { - if(!extracted) - extracted={}; - for(var param in parameters) - { - var index=parameters[param]; - var value; - if(index==self) - value=source; - else - value=source[index]; - if(value===null || value===undefined) - extracted[param]=undefined; - else - { - value=specialProcessor.unpack(param,value); - var map; - if(specialProcessor.isComplexType(param)) - { - map=mappings[param][fromHostMap]; - if(specialProcessor.preserveNesting(param)) - extracted[param]=extractArguments(value,map); - else - extractArguments(value,map,extracted) - } - else if(OSF.DDA.ListType.isListType(param)) - { - map={}; - var entryDescriptor=OSF.DDA.ListType.getDescriptor(param); - map[entryDescriptor]=self; - var extractedValues=new Array(value.length); - for(var item in value) - extractedValues[item]=extractArguments(value[item],map); - extracted[param]=extractedValues - } - else - extracted[param]=value - } - } - return extracted - } - function applyMap(mapName, preimage, mapping) - { - var parameters=mappings[mapName][mapping]; - var image; - if(mapping=="toHost") - { - var imageSet=mapValues(preimage,mapping); - image=generateArguments(imageSet,parameters) - } - else if(mapping=="fromHost") - { - var argumentSet=extractArguments(preimage,parameters); - image=mapValues(argumentSet,mapping) - } - return image - } - if(!mappings) - mappings={}; - this.addMapping=function(mapName, description) - { - var toHost, - fromHost; - if(description.map) - { - toHost=description.map; - fromHost={}; - for(var preimage in toHost) - { - var image=toHost[preimage]; - if(image==self) - image=preimage; - fromHost[image]=preimage - } - } - else - { - toHost=description.toHost; - fromHost=description.fromHost - } - var pair=mappings[mapName]; - if(pair) - { - var currMap=pair[toHostMap]; - for(var th in currMap) - toHost[th]=currMap[th]; - currMap=pair[fromHostMap]; - for(var fh in currMap) - fromHost[fh]=currMap[fh] - } - else - pair=mappings[mapName]={}; - pair[toHostMap]=toHost; - pair[fromHostMap]=fromHost - }; - this.toHost=function(mapName, preimage) - { - return applyMap(mapName,preimage,toHostMap) - }; - this.fromHost=function(mapName, image) - { - return applyMap(mapName,image,fromHostMap) - }; - this.self=self; - this.addComplexType=function(ct) - { - specialProcessor.addComplexType(ct) - }; - this.getDynamicType=function(dt) - { - return specialProcessor.getDynamicType(dt) - }; - this.setDynamicType=function(dt, handler) - { - specialProcessor.setDynamicType(dt,handler) - }; - this.dynamicTypes=dynamicTypes; - this.doMapValues=function(preimageSet, mapping) - { - return mapValues(preimageSet,mapping) - } + var toHostMap = "toHost"; + var fromHostMap = "fromHost"; + var sourceData = "sourceData"; + var self = "self"; + var dynamicTypes = {}; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data] = { + toHost: function(data) + { + if(data != null && data.rows !== undefined) + { + var tableData = {}; + tableData[OSF.DDA.TableDataProperties.TableRows] = data.rows; + tableData[OSF.DDA.TableDataProperties.TableHeaders] = data.headers; + data = tableData + } + return data + }, + fromHost: function(args) + { + return args + } + }; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.SampleData] = dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]; + function mapValues(preimageSet, mapping) + { + var ret = preimageSet ? {} : undefined; + for(var entry in preimageSet) + { + var preimage = preimageSet[entry]; + var image; + if(OSF.DDA.ListType.isListType(entry)) + { + image = []; + for(var subEntry in preimage) + image.push(mapValues(preimage[subEntry],mapping)) + } + else if(OSF.OUtil.listContainsKey(dynamicTypes,entry)) + image = dynamicTypes[entry][mapping](preimage); + else if(mapping == fromHostMap && specialProcessor.preserveNesting(entry)) + image = mapValues(preimage,mapping); + else + { + var maps = mappings[entry]; + if(maps) + { + var map = maps[mapping]; + if(map) + { + image = map[preimage]; + if(image === undefined) + image = preimage + } + } + else + image = preimage + } + ret[entry] = image + } + return ret + } + function generateArguments(imageSet, parameters) + { + var ret; + for(var param in parameters) + { + var arg; + if(specialProcessor.isComplexType(param)) + arg = generateArguments(imageSet,mappings[param][toHostMap]); + else + arg = imageSet[param]; + if(arg != undefined) + { + if(!ret) + ret = {}; + var index = parameters[param]; + if(index == self) + index = param; + ret[index] = specialProcessor.pack(param,arg) + } + } + return ret + } + function extractArguments(source, parameters, extracted) + { + if(!extracted) + extracted = {}; + for(var param in parameters) + { + var index = parameters[param]; + var value; + if(index == self) + value = source; + else if(index == sourceData) + { + extracted[param] = source.toArray(); + continue + } + else + value = source[index]; + if(value === null || value === undefined) + extracted[param] = undefined; + else + { + value = specialProcessor.unpack(param,value); + var map; + if(specialProcessor.isComplexType(param)) + { + map = mappings[param][fromHostMap]; + if(specialProcessor.preserveNesting(param)) + extracted[param] = extractArguments(value,map); + else + extractArguments(value,map,extracted) + } + else if(OSF.DDA.ListType.isListType(param)) + { + map = {}; + var entryDescriptor = OSF.DDA.ListType.getDescriptor(param); + map[entryDescriptor] = self; + var extractedValues = new Array(value.length); + for(var item in value) + extractedValues[item] = extractArguments(value[item],map); + extracted[param] = extractedValues + } + else + extracted[param] = value + } + } + return extracted + } + function applyMap(mapName, preimage, mapping) + { + var parameters = mappings[mapName][mapping]; + var image; + if(mapping == "toHost") + { + var imageSet = mapValues(preimage,mapping); + image = generateArguments(imageSet,parameters) + } + else if(mapping == "fromHost") + { + var argumentSet = extractArguments(preimage,parameters); + image = mapValues(argumentSet,mapping) + } + return image + } + if(!mappings) + mappings = {}; + this.addMapping = function(mapName, description) + { + var toHost, + fromHost; + if(description.map) + { + toHost = description.map; + fromHost = {}; + for(var preimage in toHost) + { + var image = toHost[preimage]; + if(image == self) + image = preimage; + fromHost[image] = preimage + } + } + else + { + toHost = description.toHost; + fromHost = description.fromHost + } + var pair = mappings[mapName]; + if(pair) + { + var currMap = pair[toHostMap]; + for(var th in currMap) + toHost[th] = currMap[th]; + currMap = pair[fromHostMap]; + for(var fh in currMap) + fromHost[fh] = currMap[fh] + } + else + pair = mappings[mapName] = {}; + pair[toHostMap] = toHost; + pair[fromHostMap] = fromHost + }; + this.toHost = function(mapName, preimage) + { + return applyMap(mapName,preimage,toHostMap) + }; + this.fromHost = function(mapName, image) + { + return applyMap(mapName,image,fromHostMap) + }; + this.self = self; + this.sourceData = sourceData; + this.addComplexType = function(ct) + { + specialProcessor.addComplexType(ct) + }; + this.getDynamicType = function(dt) + { + return specialProcessor.getDynamicType(dt) + }; + this.setDynamicType = function(dt, handler) + { + specialProcessor.setDynamicType(dt,handler) + }; + this.dynamicTypes = dynamicTypes; + this.doMapValues = function(preimageSet, mapping) + { + return mapValues(preimageSet,mapping) + } }; -OSF.DDA.SpecialProcessor=function(complexTypes, dynamicTypes) +OSF.DDA.SpecialProcessor = function(complexTypes, dynamicTypes) { - this.addComplexType=function OSF_DDA_SpecialProcessor$addComplexType(ct) - { - complexTypes.push(ct) - }; - this.getDynamicType=function OSF_DDA_SpecialProcessor$getDynamicType(dt) - { - return dynamicTypes[dt] - }; - this.setDynamicType=function OSF_DDA_SpecialProcessor$setDynamicType(dt, handler) - { - dynamicTypes[dt]=handler - }; - this.isComplexType=function OSF_DDA_SpecialProcessor$isComplexType(t) - { - return OSF.OUtil.listContainsValue(complexTypes,t) - }; - this.isDynamicType=function OSF_DDA_SpecialProcessor$isDynamicType(p) - { - return OSF.OUtil.listContainsKey(dynamicTypes,p) - }; - this.preserveNesting=function OSF_DDA_SpecialProcessor$preserveNesting(p) - { - var pn=[]; - if(OSF.DDA.PropertyDescriptors) - pn.push(OSF.DDA.PropertyDescriptors.Subset); - if(OSF.DDA.DataNodeEventProperties) - pn=pn.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]); - return OSF.OUtil.listContainsValue(pn,p) - }; - this.pack=function OSF_DDA_SpecialProcessor$pack(param, arg) - { - var value; - if(this.isDynamicType(param)) - value=dynamicTypes[param].toHost(arg); - else - value=arg; - return value - }; - this.unpack=function OSF_DDA_SpecialProcessor$unpack(param, arg) - { - var value; - if(this.isDynamicType(param)) - value=dynamicTypes[param].fromHost(arg); - else - value=arg; - return value - } + this.addComplexType = function OSF_DDA_SpecialProcessor$addComplexType(ct) + { + complexTypes.push(ct) + }; + this.getDynamicType = function OSF_DDA_SpecialProcessor$getDynamicType(dt) + { + return dynamicTypes[dt] + }; + this.setDynamicType = function OSF_DDA_SpecialProcessor$setDynamicType(dt, handler) + { + dynamicTypes[dt] = handler + }; + this.isComplexType = function OSF_DDA_SpecialProcessor$isComplexType(t) + { + return OSF.OUtil.listContainsValue(complexTypes,t) + }; + this.isDynamicType = function OSF_DDA_SpecialProcessor$isDynamicType(p) + { + return OSF.OUtil.listContainsKey(dynamicTypes,p) + }; + this.preserveNesting = function OSF_DDA_SpecialProcessor$preserveNesting(p) + { + var pn = []; + if(OSF.DDA.PropertyDescriptors) + pn.push(OSF.DDA.PropertyDescriptors.Subset); + if(OSF.DDA.DataNodeEventProperties) + pn = pn.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]); + return OSF.OUtil.listContainsValue(pn,p) + }; + this.pack = function OSF_DDA_SpecialProcessor$pack(param, arg) + { + var value; + if(this.isDynamicType(param)) + value = dynamicTypes[param].toHost(arg); + else + value = arg; + return value + }; + this.unpack = function OSF_DDA_SpecialProcessor$unpack(param, arg) + { + var value; + if(this.isDynamicType(param)) + value = dynamicTypes[param].fromHost(arg); + else + value = arg; + return value + } }; -OSF.DDA.getDecoratedParameterMap=function(specialProcessor, initialDefs) +OSF.DDA.getDecoratedParameterMap = function(specialProcessor, initialDefs) { - var parameterMap=new OSF.DDA.HostParameterMap(specialProcessor); - var self=parameterMap.self; - function createObject(properties) - { - var obj=null; - if(properties) - { - obj={}; - var len=properties.length; - for(var i=0; i < len; i++) - obj[properties[i].name]=properties[i].value - } - return obj - } - parameterMap.define=function define(definition) - { - var args={}; - var toHost=createObject(definition.toHost); - if(definition.invertible) - args.map=toHost; - else if(definition.canonical) - args.toHost=args.fromHost=toHost; - else - { - args.toHost=toHost; - args.fromHost=createObject(definition.fromHost) - } - parameterMap.addMapping(definition.type,args); - if(definition.isComplexType) - parameterMap.addComplexType(definition.type) - }; - for(var id in initialDefs) - parameterMap.define(initialDefs[id]); - return parameterMap + var parameterMap = new OSF.DDA.HostParameterMap(specialProcessor); + var self = parameterMap.self; + function createObject(properties) + { + var obj = null; + if(properties) + { + obj = {}; + var len = properties.length; + for(var i = 0; i < len; i++) + obj[properties[i].name] = properties[i].value + } + return obj + } + parameterMap.define = function define(definition) + { + var args = {}; + var toHost = createObject(definition.toHost); + if(definition.invertible) + args.map = toHost; + else if(definition.canonical) + args.toHost = args.fromHost = toHost; + else + { + args.toHost = toHost; + args.fromHost = createObject(definition.fromHost) + } + parameterMap.addMapping(definition.type,args); + if(definition.isComplexType) + parameterMap.addComplexType(definition.type) + }; + for(var id in initialDefs) + parameterMap.define(initialDefs[id]); + return parameterMap }; OSF.OUtil.setNamespace("DispIdHost",OSF.DDA); -OSF.DDA.DispIdHost.Methods={ - InvokeMethod: "invokeMethod", - AddEventHandler: "addEventHandler", - RemoveEventHandler: "removeEventHandler", - OpenDialog: "openDialog", - CloseDialog: "closeDialog", - MessageParent: "messageParent" +OSF.DDA.DispIdHost.Methods = { + InvokeMethod: "invokeMethod", + AddEventHandler: "addEventHandler", + RemoveEventHandler: "removeEventHandler", + OpenDialog: "openDialog", + CloseDialog: "closeDialog", + MessageParent: "messageParent", + SendMessage: "sendMessage" }; -OSF.DDA.DispIdHost.Delegates={ - ExecuteAsync: "executeAsync", - RegisterEventAsync: "registerEventAsync", - UnregisterEventAsync: "unregisterEventAsync", - ParameterMap: "parameterMap", - OpenDialog: "openDialog", - CloseDialog: "closeDialog", - MessageParent: "messageParent" +OSF.DDA.DispIdHost.Delegates = { + ExecuteAsync: "executeAsync", + RegisterEventAsync: "registerEventAsync", + UnregisterEventAsync: "unregisterEventAsync", + ParameterMap: "parameterMap", + OpenDialog: "openDialog", + CloseDialog: "closeDialog", + MessageParent: "messageParent", + SendMessage: "sendMessage" }; -OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, parameterMap) +OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethods, parameterMap) { - var dispIdMap={}; - var jsom=OSF.DDA.AsyncMethodNames; - var did=OSF.DDA.MethodDispId; - var methodMap={ - GoToByIdAsync: did.dispidNavigateToMethod, - GetSelectedDataAsync: did.dispidGetSelectedDataMethod, - SetSelectedDataAsync: did.dispidSetSelectedDataMethod, - GetDocumentCopyChunkAsync: did.dispidGetDocumentCopyChunkMethod, - ReleaseDocumentCopyAsync: did.dispidReleaseDocumentCopyMethod, - GetDocumentCopyAsync: did.dispidGetDocumentCopyMethod, - AddFromSelectionAsync: did.dispidAddBindingFromSelectionMethod, - AddFromPromptAsync: did.dispidAddBindingFromPromptMethod, - AddFromNamedItemAsync: did.dispidAddBindingFromNamedItemMethod, - GetAllAsync: did.dispidGetAllBindingsMethod, - GetByIdAsync: did.dispidGetBindingMethod, - ReleaseByIdAsync: did.dispidReleaseBindingMethod, - GetDataAsync: did.dispidGetBindingDataMethod, - SetDataAsync: did.dispidSetBindingDataMethod, - AddRowsAsync: did.dispidAddRowsMethod, - AddColumnsAsync: did.dispidAddColumnsMethod, - DeleteAllDataValuesAsync: did.dispidClearAllRowsMethod, - RefreshAsync: did.dispidLoadSettingsMethod, - SaveAsync: did.dispidSaveSettingsMethod, - GetActiveViewAsync: did.dispidGetActiveViewMethod, - GetFilePropertiesAsync: did.dispidGetFilePropertiesMethod, - GetOfficeThemeAsync: did.dispidGetOfficeThemeMethod, - GetDocumentThemeAsync: did.dispidGetDocumentThemeMethod, - ClearFormatsAsync: did.dispidClearFormatsMethod, - SetTableOptionsAsync: did.dispidSetTableOptionsMethod, - SetFormatsAsync: did.dispidSetFormatsMethod, - ExecuteRichApiRequestAsync: did.dispidExecuteRichApiRequestMethod, - AppCommandInvocationCompletedAsync: did.dispidAppCommandInvocationCompletedMethod, - CloseContainerAsync: did.dispidCloseContainerMethod, - AddDataPartAsync: did.dispidAddDataPartMethod, - GetDataPartByIdAsync: did.dispidGetDataPartByIdMethod, - GetDataPartsByNameSpaceAsync: did.dispidGetDataPartsByNamespaceMethod, - GetPartXmlAsync: did.dispidGetDataPartXmlMethod, - GetPartNodesAsync: did.dispidGetDataPartNodesMethod, - DeleteDataPartAsync: did.dispidDeleteDataPartMethod, - GetNodeValueAsync: did.dispidGetDataNodeValueMethod, - GetNodeXmlAsync: did.dispidGetDataNodeXmlMethod, - GetRelativeNodesAsync: did.dispidGetDataNodesMethod, - SetNodeValueAsync: did.dispidSetDataNodeValueMethod, - SetNodeXmlAsync: did.dispidSetDataNodeXmlMethod, - AddDataPartNamespaceAsync: did.dispidAddDataNamespaceMethod, - GetDataPartNamespaceAsync: did.dispidGetDataUriByPrefixMethod, - GetDataPartPrefixAsync: did.dispidGetDataPrefixByUriMethod, - GetNodeTextAsync: did.dispidGetDataNodeTextMethod, - SetNodeTextAsync: did.dispidSetDataNodeTextMethod, - GetSelectedTask: did.dispidGetSelectedTaskMethod, - GetTask: did.dispidGetTaskMethod, - GetWSSUrl: did.dispidGetWSSUrlMethod, - GetTaskField: did.dispidGetTaskFieldMethod, - GetSelectedResource: did.dispidGetSelectedResourceMethod, - GetResourceField: did.dispidGetResourceFieldMethod, - GetProjectField: did.dispidGetProjectFieldMethod, - GetSelectedView: did.dispidGetSelectedViewMethod, - GetTaskByIndex: did.dispidGetTaskByIndexMethod, - GetResourceByIndex: did.dispidGetResourceByIndexMethod, - SetTaskField: did.dispidSetTaskFieldMethod, - SetResourceField: did.dispidSetResourceFieldMethod, - GetMaxTaskIndex: did.dispidGetMaxTaskIndexMethod, - GetMaxResourceIndex: did.dispidGetMaxResourceIndexMethod, - CreateTask: did.dispidCreateTaskMethod - }; - for(var method in methodMap) - if(jsom[method]) - dispIdMap[jsom[method].id]=methodMap[method]; - jsom=OSF.DDA.SyncMethodNames; - did=OSF.DDA.MethodDispId; - var asyncMethodMap={MessageParent: did.dispidMessageParentMethod}; - for(var method in asyncMethodMap) - if(jsom[method]) - dispIdMap[jsom[method].id]=asyncMethodMap[method]; - jsom=Microsoft.Office.WebExtension.EventType; - did=OSF.DDA.EventDispId; - var eventMap={ - SettingsChanged: did.dispidSettingsChangedEvent, - DocumentSelectionChanged: did.dispidDocumentSelectionChangedEvent, - BindingSelectionChanged: did.dispidBindingSelectionChangedEvent, - BindingDataChanged: did.dispidBindingDataChangedEvent, - ActiveViewChanged: did.dispidActiveViewChangedEvent, - OfficeThemeChanged: did.dispidOfficeThemeChangedEvent, - DocumentThemeChanged: did.dispidDocumentThemeChangedEvent, - AppCommandInvoked: did.dispidAppCommandInvokedEvent, - DialogMessageReceived: did.dispidDialogMessageReceivedEvent, - OlkItemSelectedChanged: did.dispidOlkItemSelectedChangedEvent, - TaskSelectionChanged: did.dispidTaskSelectionChangedEvent, - ResourceSelectionChanged: did.dispidResourceSelectionChangedEvent, - ViewSelectionChanged: did.dispidViewSelectionChangedEvent, - DataNodeInserted: did.dispidDataNodeAddedEvent, - DataNodeReplaced: did.dispidDataNodeReplacedEvent, - DataNodeDeleted: did.dispidDataNodeDeletedEvent - }; - for(var event in eventMap) - if(jsom[event]) - dispIdMap[jsom[event]]=eventMap[event]; - function onException(ex, asyncMethodCall, suppliedArgs, callArgs) - { - if(typeof ex=="number") - { - if(!callArgs) - callArgs=asyncMethodCall.getCallArgs(suppliedArgs); - OSF.DDA.issueAsyncResult(callArgs,ex,OSF.DDA.ErrorCodeManager.getErrorArgs(ex)) - } - else - throw ex; - } - this[OSF.DDA.DispIdHost.Methods.InvokeMethod]=function OSF_DDA_DispIdHost_Facade$InvokeMethod(method, suppliedArguments, caller, privateState) - { - var callArgs; - try - { - var methodName=method.id; - var asyncMethodCall=OSF.DDA.AsyncMethodCalls[methodName]; - callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,privateState); - var dispId=dispIdMap[methodName]; - var delegate=getDelegateMethods(methodName); - var richApiInExcelMethodSubstitution=null; - if(window.Excel && window.Office.context.requirements.isSetSupported("RedirectV1Api")) - window.Excel._RedirectV1APIs=true; - if(window.Excel && window.Excel._RedirectV1APIs && (richApiInExcelMethodSubstitution=window.Excel._V1APIMap[methodName])) - { - if(richApiInExcelMethodSubstitution.preprocess) - callArgs=richApiInExcelMethodSubstitution.preprocess(callArgs); - var ctx=new window.Excel.RequestContext; - var result=richApiInExcelMethodSubstitution.call(ctx,callArgs); - ctx.sync().then(function() - { - var response=result.value; - var status=response.status; - delete response["status"]; - delete response["@odata.type"]; - if(richApiInExcelMethodSubstitution.postprocess) - response=richApiInExcelMethodSubstitution.postprocess(response,callArgs); - if(status !=0) - response=OSF.DDA.ErrorCodeManager.getErrorArgs(status); - OSF.DDA.issueAsyncResult(callArgs,status,response) - })["catch"](function(error) - { - OSF.DDA.issueAsyncResult(callArgs,OSF.DDA.ErrorCodeManager.errorCodes.ooeFailure,null) - }) - } - else - { - var hostCallArgs; - if(parameterMap.toHost) - hostCallArgs=parameterMap.toHost(dispId,callArgs); - else - hostCallArgs=callArgs; - delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ - dispId: dispId, - hostCallArgs: hostCallArgs, - onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling(){}, - onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving(){}, - onComplete: function(status, hostResponseArgs) - { - var responseArgs; - if(status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - if(parameterMap.fromHost) - responseArgs=parameterMap.fromHost(dispId,hostResponseArgs); - else - responseArgs=hostResponseArgs; - else - responseArgs=hostResponseArgs; - var payload=asyncMethodCall.processResponse(status,responseArgs,caller,callArgs); - OSF.DDA.issueAsyncResult(callArgs,status,payload) - } - }) - } - } - catch(ex) - { - onException(ex,asyncMethodCall,suppliedArguments,callArgs) - } - }; - this[OSF.DDA.DispIdHost.Methods.AddEventHandler]=function OSF_DDA_DispIdHost_Facade$AddEventHandler(suppliedArguments, eventDispatch, caller) - { - var callArgs; - var eventType, - handler; - function onEnsureRegistration(status) - { - if(status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - { - var added=eventDispatch.addEventHandler(eventType,handler); - if(!added) - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed - } - var error; - if(status !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - error=OSF.DDA.ErrorCodeManager.getErrorArgs(status); - OSF.DDA.issueAsyncResult(callArgs,status,error) - } - try - { - var asyncMethodCall=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id]; - callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); - eventType=callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; - handler=callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; - if(eventDispatch.getEventHandlerCount(eventType)==0) - { - var dispId=dispIdMap[eventType]; - var invoker=getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; - invoker({ - eventType: eventType, - dispId: dispId, - targetId: caller.id || "", - onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) - }, - onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) - }, - onComplete: onEnsureRegistration, - onEvent: function handleEvent(hostArgs) - { - var args=parameterMap.fromHost(dispId,hostArgs); - eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType,caller,args)) - } - }) - } - else - onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - } - catch(ex) - { - onException(ex,asyncMethodCall,suppliedArguments,callArgs) - } - }; - this[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]=function OSF_DDA_DispIdHost_Facade$RemoveEventHandler(suppliedArguments, eventDispatch, caller) - { - var callArgs; - var eventType, - handler; - function onEnsureRegistration(status) - { - var error; - if(status !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - error=OSF.DDA.ErrorCodeManager.getErrorArgs(status); - OSF.DDA.issueAsyncResult(callArgs,status,error) - } - try - { - var asyncMethodCall=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id]; - callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); - eventType=callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; - handler=callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; - var status, - removeSuccess; - if(handler===null) - { - removeSuccess=eventDispatch.clearEventHandlers(eventType); - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess - } - else - { - removeSuccess=eventDispatch.removeEventHandler(eventType,handler); - status=removeSuccess ? OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess : OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist - } - if(removeSuccess && eventDispatch.getEventHandlerCount(eventType)==0) - { - var dispId=dispIdMap[eventType]; - var invoker=getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; - invoker({ - eventType: eventType, - dispId: dispId, - targetId: caller.id || "", - onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) - }, - onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) - }, - onComplete: onEnsureRegistration - }) - } - else - onEnsureRegistration(status) - } - catch(ex) - { - onException(ex,asyncMethodCall,suppliedArguments,callArgs) - } - }; - this[OSF.DDA.DispIdHost.Methods.OpenDialog]=function OSF_DDA_DispIdHost_Facade$OpenDialog(suppliedArguments, eventDispatch, caller) - { - var callArgs; - var targetId; - var dialogMessageEvent=Microsoft.Office.WebExtension.EventType.DialogMessageReceived; - var dialogOtherEvent=Microsoft.Office.WebExtension.EventType.DialogEventReceived; - function onEnsureRegistration(status) - { - var payload; - if(status !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - payload=OSF.DDA.ErrorCodeManager.getErrorArgs(status); - else - { - var onSucceedArgs={}; - onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Id]=targetId; - onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Data]=eventDispatch; - var payload=asyncMethodCall.processResponse(status,onSucceedArgs,caller,callArgs); - OSF.DialogShownStatus.hasDialogShown=true; - eventDispatch.clearEventHandlers(dialogMessageEvent); - eventDispatch.clearEventHandlers(dialogOtherEvent) - } - OSF.DDA.issueAsyncResult(callArgs,status,payload) - } - try - { - if(dialogMessageEvent==undefined || dialogOtherEvent==undefined) - onEnsureRegistration(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported); - if(OSF.DDA.AsyncMethodNames.DisplayDialogAsync==null) - { - onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); - return - } - var asyncMethodCall=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id]; - callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); - var dispId=dispIdMap[dialogMessageEvent]; - var delegateMethods=getDelegateMethods(dialogMessageEvent); - var invoker=delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] !=undefined ? delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] : delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; - targetId=JSON.stringify(callArgs); - invoker({ - eventType: dialogMessageEvent, - dispId: dispId, - targetId: targetId, - onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) - }, - onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) - }, - onComplete: onEnsureRegistration, - onEvent: function handleEvent(hostArgs) - { - var args=parameterMap.fromHost(dispId,hostArgs); - var event=OSF.DDA.OMFactory.manufactureEventArgs(dialogMessageEvent,caller,args); - if(event.type==dialogOtherEvent) - { - var payload=OSF.DDA.ErrorCodeManager.getErrorArgs(event.error); - var errorArgs={}; - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=payload.name || payload; - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=payload.message || payload; - event.error=new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]) - } - eventDispatch.fireOrQueueEvent(event); - if(args[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogClosed) - { - eventDispatch.clearEventHandlers(dialogMessageEvent); - eventDispatch.clearEventHandlers(dialogOtherEvent); - OSF.DialogShownStatus.hasDialogShown=false - } - } - }) - } - catch(ex) - { - onException(ex,asyncMethodCall,suppliedArguments,callArgs) - } - }; - this[OSF.DDA.DispIdHost.Methods.CloseDialog]=function OSF_DDA_DispIdHost_Facade$CloseDialog(suppliedArguments, targetId, eventDispatch, caller) - { - var callArgs; - var dialogMessageEvent, - dialogOtherEvent; - var closeStatus=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; - function closeCallback(status) - { - closeStatus=status; - OSF.DialogShownStatus.hasDialogShown=false - } - try - { - var asyncMethodCall=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id]; - callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); - dialogMessageEvent=Microsoft.Office.WebExtension.EventType.DialogMessageReceived; - dialogOtherEvent=Microsoft.Office.WebExtension.EventType.DialogEventReceived; - eventDispatch.clearEventHandlers(dialogMessageEvent); - eventDispatch.clearEventHandlers(dialogOtherEvent); - var dispId=dispIdMap[dialogMessageEvent]; - var delegateMethods=getDelegateMethods(dialogMessageEvent); - var invoker=delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] !=undefined ? delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] : delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; - invoker({ - eventType: dialogMessageEvent, - dispId: dispId, - targetId: targetId, - onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) - }, - onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) - }, - onComplete: closeCallback - }) - } - catch(ex) - { - onException(ex,asyncMethodCall,suppliedArguments,callArgs) - } - if(closeStatus !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed,OSF.DDA.AsyncMethodNames.CloseAsync.displayName,closeStatus); - }; - this[OSF.DDA.DispIdHost.Methods.MessageParent]=function OSF_DDA_DispIdHost_Facade$MessageParent(suppliedArguments, caller) - { - var stateInfo={}; - var syncMethodCall=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id]; - var callArgs=syncMethodCall.verifyAndExtractCall(suppliedArguments,caller,stateInfo); - var delegate=getDelegateMethods(OSF.DDA.SyncMethodNames.MessageParent.id); - var invoker=delegate[OSF.DDA.DispIdHost.Delegates.MessageParent]; - var dispId=dispIdMap[OSF.DDA.SyncMethodNames.MessageParent.id]; - return invoker({ - dispId: dispId, - hostCallArgs: callArgs, - onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) - }, - onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) - } - }) - } + var dispIdMap = {}; + var jsom = OSF.DDA.AsyncMethodNames; + var did = OSF.DDA.MethodDispId; + var methodMap = { + GoToByIdAsync: did.dispidNavigateToMethod, + GetSelectedDataAsync: did.dispidGetSelectedDataMethod, + SetSelectedDataAsync: did.dispidSetSelectedDataMethod, + GetDocumentCopyChunkAsync: did.dispidGetDocumentCopyChunkMethod, + ReleaseDocumentCopyAsync: did.dispidReleaseDocumentCopyMethod, + GetDocumentCopyAsync: did.dispidGetDocumentCopyMethod, + AddFromSelectionAsync: did.dispidAddBindingFromSelectionMethod, + AddFromPromptAsync: did.dispidAddBindingFromPromptMethod, + AddFromNamedItemAsync: did.dispidAddBindingFromNamedItemMethod, + GetAllAsync: did.dispidGetAllBindingsMethod, + GetByIdAsync: did.dispidGetBindingMethod, + ReleaseByIdAsync: did.dispidReleaseBindingMethod, + GetDataAsync: did.dispidGetBindingDataMethod, + SetDataAsync: did.dispidSetBindingDataMethod, + AddRowsAsync: did.dispidAddRowsMethod, + AddColumnsAsync: did.dispidAddColumnsMethod, + DeleteAllDataValuesAsync: did.dispidClearAllRowsMethod, + RefreshAsync: did.dispidLoadSettingsMethod, + SaveAsync: did.dispidSaveSettingsMethod, + GetActiveViewAsync: did.dispidGetActiveViewMethod, + GetFilePropertiesAsync: did.dispidGetFilePropertiesMethod, + GetOfficeThemeAsync: did.dispidGetOfficeThemeMethod, + GetDocumentThemeAsync: did.dispidGetDocumentThemeMethod, + ClearFormatsAsync: did.dispidClearFormatsMethod, + SetTableOptionsAsync: did.dispidSetTableOptionsMethod, + SetFormatsAsync: did.dispidSetFormatsMethod, + GetAccessTokenAsync: did.dispidGetAccessTokenMethod, + ExecuteRichApiRequestAsync: did.dispidExecuteRichApiRequestMethod, + AppCommandInvocationCompletedAsync: did.dispidAppCommandInvocationCompletedMethod, + CloseContainerAsync: did.dispidCloseContainerMethod, + OpenBrowserWindow: did.dispidOpenBrowserWindow, + AddDataPartAsync: did.dispidAddDataPartMethod, + GetDataPartByIdAsync: did.dispidGetDataPartByIdMethod, + GetDataPartsByNameSpaceAsync: did.dispidGetDataPartsByNamespaceMethod, + GetPartXmlAsync: did.dispidGetDataPartXmlMethod, + GetPartNodesAsync: did.dispidGetDataPartNodesMethod, + DeleteDataPartAsync: did.dispidDeleteDataPartMethod, + GetNodeValueAsync: did.dispidGetDataNodeValueMethod, + GetNodeXmlAsync: did.dispidGetDataNodeXmlMethod, + GetRelativeNodesAsync: did.dispidGetDataNodesMethod, + SetNodeValueAsync: did.dispidSetDataNodeValueMethod, + SetNodeXmlAsync: did.dispidSetDataNodeXmlMethod, + AddDataPartNamespaceAsync: did.dispidAddDataNamespaceMethod, + GetDataPartNamespaceAsync: did.dispidGetDataUriByPrefixMethod, + GetDataPartPrefixAsync: did.dispidGetDataPrefixByUriMethod, + GetNodeTextAsync: did.dispidGetDataNodeTextMethod, + SetNodeTextAsync: did.dispidSetDataNodeTextMethod, + GetSelectedTask: did.dispidGetSelectedTaskMethod, + GetTask: did.dispidGetTaskMethod, + GetWSSUrl: did.dispidGetWSSUrlMethod, + GetTaskField: did.dispidGetTaskFieldMethod, + GetSelectedResource: did.dispidGetSelectedResourceMethod, + GetResourceField: did.dispidGetResourceFieldMethod, + GetProjectField: did.dispidGetProjectFieldMethod, + GetSelectedView: did.dispidGetSelectedViewMethod, + GetTaskByIndex: did.dispidGetTaskByIndexMethod, + GetResourceByIndex: did.dispidGetResourceByIndexMethod, + SetTaskField: did.dispidSetTaskFieldMethod, + SetResourceField: did.dispidSetResourceFieldMethod, + GetMaxTaskIndex: did.dispidGetMaxTaskIndexMethod, + GetMaxResourceIndex: did.dispidGetMaxResourceIndexMethod, + CreateTask: did.dispidCreateTaskMethod + }; + for(var method in methodMap) + if(jsom[method]) + dispIdMap[jsom[method].id] = methodMap[method]; + jsom = OSF.DDA.SyncMethodNames; + did = OSF.DDA.MethodDispId; + var syncMethodMap = { + MessageParent: did.dispidMessageParentMethod, + SendMessage: did.dispidSendMessageMethod + }; + for(var method in syncMethodMap) + if(jsom[method]) + dispIdMap[jsom[method].id] = syncMethodMap[method]; + jsom = Microsoft.Office.WebExtension.EventType; + did = OSF.DDA.EventDispId; + var eventMap = { + SettingsChanged: did.dispidSettingsChangedEvent, + DocumentSelectionChanged: did.dispidDocumentSelectionChangedEvent, + BindingSelectionChanged: did.dispidBindingSelectionChangedEvent, + BindingDataChanged: did.dispidBindingDataChangedEvent, + ActiveViewChanged: did.dispidActiveViewChangedEvent, + OfficeThemeChanged: did.dispidOfficeThemeChangedEvent, + DocumentThemeChanged: did.dispidDocumentThemeChangedEvent, + AppCommandInvoked: did.dispidAppCommandInvokedEvent, + DialogMessageReceived: did.dispidDialogMessageReceivedEvent, + DialogParentMessageReceived: did.dispidDialogParentMessageReceivedEvent, + ObjectDeleted: did.dispidObjectDeletedEvent, + ObjectSelectionChanged: did.dispidObjectSelectionChangedEvent, + ObjectDataChanged: did.dispidObjectDataChangedEvent, + ContentControlAdded: did.dispidContentControlAddedEvent, + RichApiMessage: did.dispidRichApiMessageEvent, + ItemChanged: did.dispidOlkItemSelectedChangedEvent, + RecipientsChanged: did.dispidOlkRecipientsChangedEvent, + AppointmentTimeChanged: did.dispidOlkAppointmentTimeChangedEvent, + TaskSelectionChanged: did.dispidTaskSelectionChangedEvent, + ResourceSelectionChanged: did.dispidResourceSelectionChangedEvent, + ViewSelectionChanged: did.dispidViewSelectionChangedEvent, + DataNodeInserted: did.dispidDataNodeAddedEvent, + DataNodeReplaced: did.dispidDataNodeReplacedEvent, + DataNodeDeleted: did.dispidDataNodeDeletedEvent + }; + for(var event in eventMap) + if(jsom[event]) + dispIdMap[jsom[event]] = eventMap[event]; + function IsObjectEvent(dispId) + { + return dispId == OSF.DDA.EventDispId.dispidObjectDeletedEvent || dispId == OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent || dispId == OSF.DDA.EventDispId.dispidObjectDataChangedEvent || dispId == OSF.DDA.EventDispId.dispidContentControlAddedEvent + } + function onException(ex, asyncMethodCall, suppliedArgs, callArgs) + { + if(typeof ex == "number") + { + if(!callArgs) + callArgs = asyncMethodCall.getCallArgs(suppliedArgs); + OSF.DDA.issueAsyncResult(callArgs,ex,OSF.DDA.ErrorCodeManager.getErrorArgs(ex)) + } + else + throw ex; + } + this[OSF.DDA.DispIdHost.Methods.InvokeMethod] = function OSF_DDA_DispIdHost_Facade$InvokeMethod(method, suppliedArguments, caller, privateState) + { + var callArgs; + try + { + var methodName = method.id; + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[methodName]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,privateState); + var dispId = dispIdMap[methodName]; + var delegate = getDelegateMethods(methodName); + var richApiInExcelMethodSubstitution = null; + if(window.Excel && window.Office.context.requirements.isSetSupported("RedirectV1Api")) + window.Excel._RedirectV1APIs = true; + if(window.Excel && window.Excel._RedirectV1APIs && (richApiInExcelMethodSubstitution = window.Excel._V1APIMap[methodName])) + { + var preprocessedCallArgs = OSF.OUtil.shallowCopy(callArgs); + delete preprocessedCallArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; + if(richApiInExcelMethodSubstitution.preprocess) + preprocessedCallArgs = richApiInExcelMethodSubstitution.preprocess(preprocessedCallArgs); + var ctx = new window.Excel.RequestContext; + var result = richApiInExcelMethodSubstitution.call(ctx,preprocessedCallArgs); + ctx.sync().then(function() + { + var response = result.value; + var status = response.status; + delete response["status"]; + delete response["@odata.type"]; + if(richApiInExcelMethodSubstitution.postprocess) + response = richApiInExcelMethodSubstitution.postprocess(response,preprocessedCallArgs); + if(status != 0) + response = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + OSF.DDA.issueAsyncResult(callArgs,status,response) + })["catch"](function(error) + { + OSF.DDA.issueAsyncResult(callArgs,OSF.DDA.ErrorCodeManager.errorCodes.ooeFailure,null) + }) + } + else + { + var hostCallArgs; + if(parameterMap.toHost) + hostCallArgs = parameterMap.toHost(dispId,callArgs); + else + hostCallArgs = callArgs; + var startTime = (new Date).getTime(); + delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ + dispId: dispId, + hostCallArgs: hostCallArgs, + onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling(){}, + onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving(){}, + onComplete: function(status, hostResponseArgs) + { + var responseArgs; + if(status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + if(parameterMap.fromHost) + responseArgs = parameterMap.fromHost(dispId,hostResponseArgs); + else + responseArgs = hostResponseArgs; + else + responseArgs = hostResponseArgs; + var payload = asyncMethodCall.processResponse(status,responseArgs,caller,callArgs); + OSF.DDA.issueAsyncResult(callArgs,status,payload); + if(OSF.AppTelemetry) + OSF.AppTelemetry.onMethodDone(dispId,hostCallArgs,Math.abs((new Date).getTime() - startTime),status) + } + }) + } + } + catch(ex) + { + onException(ex,asyncMethodCall,suppliedArguments,callArgs) + } + }; + this[OSF.DDA.DispIdHost.Methods.AddEventHandler] = function OSF_DDA_DispIdHost_Facade$AddEventHandler(suppliedArguments, eventDispatch, caller, isPopupWindow) + { + var callArgs; + var eventType, + handler; + var isObjectEvent = false; + function onEnsureRegistration(status) + { + if(status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + { + var added = !isObjectEvent ? eventDispatch.addEventHandler(eventType,handler) : eventDispatch.addObjectEventHandler(eventType,callArgs[Microsoft.Office.WebExtension.Parameters.Id],handler); + if(!added) + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed + } + var error; + if(status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + error = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + OSF.DDA.issueAsyncResult(callArgs,status,error) + } + try + { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); + eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + if(isPopupWindow) + { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + return + } + var dispId = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId); + var targetId = isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : caller.id || ""; + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType,targetId) : eventDispatch.getEventHandlerCount(eventType); + if(count == 0) + { + var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; + invoker({ + eventType: eventType, + dispId: dispId, + targetId: targetId, + onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) + }, + onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) + }, + onComplete: onEnsureRegistration, + onEvent: function handleEvent(hostArgs) + { + var args = parameterMap.fromHost(dispId,hostArgs); + if(!isObjectEvent) + eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType,caller,args)); + else + eventDispatch.fireObjectEvent(targetId,OSF.DDA.OMFactory.manufactureEventArgs(eventType,targetId,args)) + } + }) + } + else + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + } + catch(ex) + { + onException(ex,asyncMethodCall,suppliedArguments,callArgs) + } + }; + this[OSF.DDA.DispIdHost.Methods.RemoveEventHandler] = function OSF_DDA_DispIdHost_Facade$RemoveEventHandler(suppliedArguments, eventDispatch, caller) + { + var callArgs; + var eventType, + handler; + var isObjectEvent = false; + function onEnsureRegistration(status) + { + var error; + if(status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + error = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + OSF.DDA.issueAsyncResult(callArgs,status,error) + } + try + { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); + eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + var dispId = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId); + var targetId = isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : caller.id || ""; + var status, + removeSuccess; + if(handler === null) + { + removeSuccess = isObjectEvent ? eventDispatch.clearObjectEventHandlers(eventType,targetId) : eventDispatch.clearEventHandlers(eventType); + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess + } + else + { + removeSuccess = isObjectEvent ? eventDispatch.removeObjectEventHandler(eventType,targetId,handler) : eventDispatch.removeEventHandler(eventType,handler); + status = removeSuccess ? OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess : OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist + } + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType,targetId) : eventDispatch.getEventHandlerCount(eventType); + if(removeSuccess && count == 0) + { + var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; + invoker({ + eventType: eventType, + dispId: dispId, + targetId: targetId, + onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) + }, + onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) + }, + onComplete: onEnsureRegistration + }) + } + else + onEnsureRegistration(status) + } + catch(ex) + { + onException(ex,asyncMethodCall,suppliedArguments,callArgs) + } + }; + this[OSF.DDA.DispIdHost.Methods.OpenDialog] = function OSF_DDA_DispIdHost_Facade$OpenDialog(suppliedArguments, eventDispatch, caller) + { + var callArgs; + var targetId; + var dialogMessageEvent = Microsoft.Office.WebExtension.EventType.DialogMessageReceived; + var dialogOtherEvent = Microsoft.Office.WebExtension.EventType.DialogEventReceived; + function onEnsureRegistration(status) + { + var payload; + if(status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + payload = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + else + { + var onSucceedArgs = {}; + onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Id] = targetId; + onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Data] = eventDispatch; + var payload = asyncMethodCall.processResponse(status,onSucceedArgs,caller,callArgs); + OSF.DialogShownStatus.hasDialogShown = true; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent) + } + OSF.DDA.issueAsyncResult(callArgs,status,payload) + } + try + { + if(dialogMessageEvent == undefined || dialogOtherEvent == undefined) + onEnsureRegistration(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported); + if(OSF.DDA.AsyncMethodNames.DisplayDialogAsync == null) + { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + return + } + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); + var dispId = dispIdMap[dialogMessageEvent]; + var delegateMethods = getDelegateMethods(dialogMessageEvent); + var invoker = delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] != undefined ? delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] : delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; + targetId = JSON.stringify(callArgs); + if(!OSF.DialogShownStatus.hasDialogShown) + { + eventDispatch.clearQueuedEvent(dialogMessageEvent); + eventDispatch.clearQueuedEvent(dialogOtherEvent); + eventDispatch.clearQueuedEvent(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived) + } + invoker({ + eventType: dialogMessageEvent, + dispId: dispId, + targetId: targetId, + onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) + }, + onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) + }, + onComplete: onEnsureRegistration, + onEvent: function handleEvent(hostArgs) + { + var args = parameterMap.fromHost(dispId,hostArgs); + var event = OSF.DDA.OMFactory.manufactureEventArgs(dialogMessageEvent,caller,args); + if(event.type == dialogOtherEvent) + { + var payload = OSF.DDA.ErrorCodeManager.getErrorArgs(event.error); + var errorArgs = {}; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code] = status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name] = payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message] = payload.message || payload; + event.error = new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]) + } + eventDispatch.fireOrQueueEvent(event); + if(args[OSF.DDA.PropertyDescriptors.MessageType] == OSF.DialogMessageType.DialogClosed) + { + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + eventDispatch.clearEventHandlers(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived); + OSF.DialogShownStatus.hasDialogShown = false + } + } + }) + } + catch(ex) + { + onException(ex,asyncMethodCall,suppliedArguments,callArgs) + } + }; + this[OSF.DDA.DispIdHost.Methods.CloseDialog] = function OSF_DDA_DispIdHost_Facade$CloseDialog(suppliedArguments, targetId, eventDispatch, caller) + { + var callArgs; + var dialogMessageEvent, + dialogOtherEvent; + var closeStatus = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; + function closeCallback(status) + { + closeStatus = status; + OSF.DialogShownStatus.hasDialogShown = false + } + try + { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); + dialogMessageEvent = Microsoft.Office.WebExtension.EventType.DialogMessageReceived; + dialogOtherEvent = Microsoft.Office.WebExtension.EventType.DialogEventReceived; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + var dispId = dispIdMap[dialogMessageEvent]; + var delegateMethods = getDelegateMethods(dialogMessageEvent); + var invoker = delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] != undefined ? delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] : delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; + invoker({ + eventType: dialogMessageEvent, + dispId: dispId, + targetId: targetId, + onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) + }, + onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) + }, + onComplete: closeCallback + }) + } + catch(ex) + { + onException(ex,asyncMethodCall,suppliedArguments,callArgs) + } + if(closeStatus != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed,OSF.DDA.AsyncMethodNames.CloseAsync.displayName,closeStatus); + }; + this[OSF.DDA.DispIdHost.Methods.MessageParent] = function OSF_DDA_DispIdHost_Facade$MessageParent(suppliedArguments, caller) + { + var stateInfo = {}; + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(suppliedArguments,caller,stateInfo); + var delegate = getDelegateMethods(OSF.DDA.SyncMethodNames.MessageParent.id); + var invoker = delegate[OSF.DDA.DispIdHost.Delegates.MessageParent]; + var dispId = dispIdMap[OSF.DDA.SyncMethodNames.MessageParent.id]; + return invoker({ + dispId: dispId, + hostCallArgs: callArgs, + onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) + }, + onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) + } + }) + }; + this[OSF.DDA.DispIdHost.Methods.SendMessage] = function OSF_DDA_DispIdHost_Facade$SendMessage(suppliedArguments, eventDispatch, caller) + { + var stateInfo = {}; + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.SendMessage.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(suppliedArguments,caller,stateInfo); + var delegate = getDelegateMethods(OSF.DDA.SyncMethodNames.SendMessage.id); + var invoker = delegate[OSF.DDA.DispIdHost.Delegates.SendMessage]; + var dispId = dispIdMap[OSF.DDA.SyncMethodNames.SendMessage.id]; + return invoker({ + dispId: dispId, + hostCallArgs: callArgs, + onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) + }, + onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) + } + }) + } }; -OSF.DDA.DispIdHost.addAsyncMethods=function OSF_DDA_DispIdHost$AddAsyncMethods(target, asyncMethodNames, privateState) +OSF.DDA.DispIdHost.addAsyncMethods = function OSF_DDA_DispIdHost$AddAsyncMethods(target, asyncMethodNames, privateState) { - for(var entry in asyncMethodNames) - { - var method=asyncMethodNames[entry]; - var name=method.displayName; - if(!target[name]) - OSF.OUtil.defineEnumerableProperty(target,name,{value: function(asyncMethod) - { - return function() - { - var invokeMethod=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod]; - invokeMethod(asyncMethod,arguments,target,privateState) - } - }(method)}) - } + for(var entry in asyncMethodNames) + { + var method = asyncMethodNames[entry]; + var name = method.displayName; + if(!target[name]) + OSF.OUtil.defineEnumerableProperty(target,name,{value: function(asyncMethod) + { + return function() + { + var invokeMethod = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod]; + invokeMethod(asyncMethod,arguments,target,privateState) + } + }(method)}) + } }; -OSF.DDA.DispIdHost.addEventSupport=function OSF_DDA_DispIdHost$AddEventSupport(target, eventDispatch) +OSF.DDA.DispIdHost.addEventSupport = function OSF_DDA_DispIdHost$AddEventSupport(target, eventDispatch, isPopupWindow) { - var add=OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName; - var remove=OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName; - if(!target[add]) - OSF.OUtil.defineEnumerableProperty(target,add,{value: function() - { - var addEventHandler=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler]; - addEventHandler(arguments,eventDispatch,target) - }}); - if(!target[remove]) - OSF.OUtil.defineEnumerableProperty(target,remove,{value: function() - { - var removeEventHandler=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]; - removeEventHandler(arguments,eventDispatch,target) - }}) + var add = OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName; + var remove = OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName; + if(!target[add]) + OSF.OUtil.defineEnumerableProperty(target,add,{value: function() + { + var addEventHandler = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler]; + addEventHandler(arguments,eventDispatch,target,isPopupWindow) + }}); + if(!target[remove]) + OSF.OUtil.defineEnumerableProperty(target,remove,{value: function() + { + var removeEventHandler = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]; + removeEventHandler(arguments,eventDispatch,target) + }}) }; OSF.OUtil.setNamespace("SafeArray",OSF.DDA); -OSF.DDA.SafeArray.Response={ - Status: 0, - Payload: 1 +OSF.DDA.SafeArray.Response = { + Status: 0, + Payload: 1 }; -OSF.DDA.SafeArray.UniqueArguments={ - Offset: "offset", - Run: "run", - BindingSpecificData: "bindingSpecificData", - MergedCellGuid: "{66e7831f-81b2-42e2-823c-89e872d541b3}" +OSF.DDA.SafeArray.UniqueArguments = { + Offset: "offset", + Run: "run", + BindingSpecificData: "bindingSpecificData", + MergedCellGuid: "{66e7831f-81b2-42e2-823c-89e872d541b3}" }; OSF.OUtil.setNamespace("Delegate",OSF.DDA.SafeArray); -OSF.DDA.SafeArray.Delegate._onException=function OSF_DDA_SafeArray_Delegate$OnException(ex, args) +OSF.DDA.SafeArray.Delegate._onException = function OSF_DDA_SafeArray_Delegate$OnException(ex, args) { - var status; - var statusNumber=ex.number; - if(statusNumber) - switch(statusNumber) - { - case-2146828218: - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; - break; - case-2147467259: - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened; - break; - case-2146828283: - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam; - break; - case-2146827850: - default: - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; - break - } - if(args.onComplete) - args.onComplete(status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError) + var status; + var statusNumber = ex.number; + if(statusNumber) + switch(statusNumber) + { + case-2146828218: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; + break; + case-2147467259: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened; + break; + case-2146828283: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam; + break; + case-2147209089: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam; + break; + case-2146827850: + default: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + break + } + if(args.onComplete) + args.onComplete(status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError) }; -OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod=function OSF_DDA_SafeArray_Delegate$OnExceptionSyncMethod(ex, args) +OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod = function OSF_DDA_SafeArray_Delegate$OnExceptionSyncMethod(ex, args) { - var status; - var number=ex.number; - if(number) - switch(number) - { - case-2146828218: - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; - break; - case-2146827850: - default: - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; - break - } - return status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError + var status; + var number = ex.number; + if(number) + switch(number) + { + case-2146828218: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; + break; + case-2146827850: + default: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + break + } + return status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError }; -OSF.DDA.SafeArray.Delegate.SpecialProcessor=function OSF_DDA_SafeArray_Delegate_SpecialProcessor() +OSF.DDA.SafeArray.Delegate.SpecialProcessor = function OSF_DDA_SafeArray_Delegate_SpecialProcessor() { - function _2DVBArrayToJaggedArray(vbArr) - { - var ret; - try - { - var rows=vbArr.ubound(1); - var cols=vbArr.ubound(2); - vbArr=vbArr.toArray(); - if(rows==1 && cols==1) - ret=[vbArr]; - else - { - ret=[]; - for(var row=0; row < rows; row++) - { - var rowArr=[]; - for(var col=0; col < cols; col++) - { - var datum=vbArr[row * cols+col]; - if(datum !=OSF.DDA.SafeArray.UniqueArguments.MergedCellGuid) - rowArr.push(datum) - } - if(rowArr.length > 0) - ret.push(rowArr) - } - } - } - catch(ex){} - return ret - } - var complexTypes=[]; - var dynamicTypes={}; - dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]=function() - { - var tableRows=0; - var tableHeaders=1; - return{ - toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$toHost(data) - { - if(OSF.DDA.TableDataProperties && typeof data !="string" && data[OSF.DDA.TableDataProperties.TableRows] !==undefined) - { - var tableData=[]; - tableData[tableRows]=data[OSF.DDA.TableDataProperties.TableRows]; - tableData[tableHeaders]=data[OSF.DDA.TableDataProperties.TableHeaders]; - data=tableData - } - return data - }, - fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$fromHost(hostArgs) - { - var ret; - if(hostArgs.toArray) - { - var dimensions=hostArgs.dimensions(); - if(dimensions===2) - ret=_2DVBArrayToJaggedArray(hostArgs); - else - { - var array=hostArgs.toArray(); - if(array.length===2 && (array[0] !=null && array[0].toArray || array[1] !=null && array[1].toArray)) - { - ret={}; - ret[OSF.DDA.TableDataProperties.TableRows]=_2DVBArrayToJaggedArray(array[tableRows]); - ret[OSF.DDA.TableDataProperties.TableHeaders]=_2DVBArrayToJaggedArray(array[tableHeaders]) - } - else - ret=array - } - } - else - ret=hostArgs; - return ret - } - } - }(); - OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,complexTypes,dynamicTypes); - this.unpack=function OSF_DDA_SafeArray_Delegate_SpecialProcessor$unpack(param, arg) - { - var value; - if(this.isComplexType(param) || OSF.DDA.ListType.isListType(param)) - { - var toArraySupported=(arg || typeof arg==="unknown") && arg.toArray; - value=toArraySupported ? arg.toArray() : arg || {} - } - else if(this.isDynamicType(param)) - value=dynamicTypes[param].fromHost(arg); - else - value=arg; - return value - } + function _2DVBArrayToJaggedArray(vbArr) + { + var ret; + try + { + var rows = vbArr.ubound(1); + var cols = vbArr.ubound(2); + vbArr = vbArr.toArray(); + if(rows == 1 && cols == 1) + ret = [vbArr]; + else + { + ret = []; + for(var row = 0; row < rows; row++) + { + var rowArr = []; + for(var col = 0; col < cols; col++) + { + var datum = vbArr[row * cols + col]; + if(datum != OSF.DDA.SafeArray.UniqueArguments.MergedCellGuid) + rowArr.push(datum) + } + if(rowArr.length > 0) + ret.push(rowArr) + } + } + } + catch(ex){} + return ret + } + var complexTypes = []; + var dynamicTypes = {}; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data] = function() + { + var tableRows = 0; + var tableHeaders = 1; + return{ + toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$toHost(data) + { + if(OSF.DDA.TableDataProperties && typeof data != "string" && data[OSF.DDA.TableDataProperties.TableRows] !== undefined) + { + var tableData = []; + tableData[tableRows] = data[OSF.DDA.TableDataProperties.TableRows]; + tableData[tableHeaders] = data[OSF.DDA.TableDataProperties.TableHeaders]; + data = tableData + } + return data + }, + fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$fromHost(hostArgs) + { + var ret; + if(hostArgs.toArray) + { + var dimensions = hostArgs.dimensions(); + if(dimensions === 2) + ret = _2DVBArrayToJaggedArray(hostArgs); + else + { + var array = hostArgs.toArray(); + if(array.length === 2 && (array[0] != null && array[0].toArray || array[1] != null && array[1].toArray)) + { + ret = {}; + ret[OSF.DDA.TableDataProperties.TableRows] = _2DVBArrayToJaggedArray(array[tableRows]); + ret[OSF.DDA.TableDataProperties.TableHeaders] = _2DVBArrayToJaggedArray(array[tableHeaders]) + } + else + ret = array + } + } + else + ret = hostArgs; + return ret + } + } + }(); + OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,complexTypes,dynamicTypes); + this.unpack = function OSF_DDA_SafeArray_Delegate_SpecialProcessor$unpack(param, arg) + { + var value; + if(this.isComplexType(param) || OSF.DDA.ListType.isListType(param)) + { + var toArraySupported = (arg || typeof arg === "unknown") && arg.toArray; + value = toArraySupported ? arg.toArray() : arg || {} + } + else if(this.isDynamicType(param)) + value = dynamicTypes[param].fromHost(arg); + else + value = arg; + return value + } }; OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor); -OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{ - type: Microsoft.Office.WebExtension.Parameters.ValueFormat, - toHost: [{ - name: Microsoft.Office.WebExtension.ValueFormat.Unformatted, - value: 0 - },{ - name: Microsoft.Office.WebExtension.ValueFormat.Formatted, - value: 1 - }] - },{ - type: Microsoft.Office.WebExtension.Parameters.FilterType, - toHost: [{ - name: Microsoft.Office.WebExtension.FilterType.All, - value: 0 - }] - }]); +OSF.DDA.SafeArray.Delegate.ParameterMap = OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{ + type: Microsoft.Office.WebExtension.Parameters.ValueFormat, + toHost: [{ + name: Microsoft.Office.WebExtension.ValueFormat.Unformatted, + value: 0 + },{ + name: Microsoft.Office.WebExtension.ValueFormat.Formatted, + value: 1 + }] + },{ + type: Microsoft.Office.WebExtension.Parameters.FilterType, + toHost: [{ + name: Microsoft.Office.WebExtension.FilterType.All, + value: 0 + }] + }]); OSF.DDA.SafeArray.Delegate.ParameterMap.define({ - type: OSF.DDA.PropertyDescriptors.AsyncResultStatus, - fromHost: [{ - name: Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded, - value: 0 - },{ - name: Microsoft.Office.WebExtension.AsyncResultStatus.Failed, - value: 1 - }] + type: OSF.DDA.PropertyDescriptors.AsyncResultStatus, + fromHost: [{ + name: Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded, + value: 0 + },{ + name: Microsoft.Office.WebExtension.AsyncResultStatus.Failed, + value: 1 + }] }); -OSF.DDA.SafeArray.Delegate.executeAsync=function OSF_DDA_SafeArray_Delegate$ExecuteAsync(args) +OSF.DDA.SafeArray.Delegate.executeAsync = function OSF_DDA_SafeArray_Delegate$ExecuteAsync(args) { - function toArray(args) - { - var arrArgs=args; - if(OSF.OUtil.isArray(args)) - { - var len=arrArgs.length; - for(var i=0; i < len; i++) - arrArgs[i]=toArray(arrArgs[i]) - } - else if(OSF.OUtil.isDate(args)) - arrArgs=args.getVarDate(); - else if(typeof args==="object" && !OSF.OUtil.isArray(args)) - { - arrArgs=[]; - for(var index in args) - if(!OSF.OUtil.isFunction(args[index])) - arrArgs[index]=toArray(args[index]) - } - return arrArgs - } - function fromSafeArray(value) - { - var ret=value; - if(value !=null && value.toArray) - { - var arrayResult=value.toArray(); - ret=new Array(arrayResult.length); - for(var i=0; i < arrayResult.length; i++) - ret[i]=fromSafeArray(arrayResult[i]) - } - return ret - } - try - { - if(args.onCalling) - args.onCalling(); - var startTime=(new Date).getTime(); - OSF.ClientHostController.execute(args.dispId,toArray(args.hostCallArgs),function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode) - { - var result=hostResponseArgs.toArray(); - var status=result[OSF.DDA.SafeArray.Response.Status]; - if(status==OSF.DDA.ErrorCodeManager.errorCodes.ooeChunkResult) - { - var payload=result[OSF.DDA.SafeArray.Response.Payload]; - payload=fromSafeArray(payload); - if(payload !=null) - { - if(!args._chunkResultData) - args._chunkResultData=new Array; - args._chunkResultData[payload[0]]=payload[1] - } - return false - } - if(args.onReceiving) - args.onReceiving(); - if(args.onComplete) - { - var payload; - if(status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - { - if(result.length > 2) - { - payload=[]; - for(var i=1; i < result.length; i++) - payload[i - 1]=result[i] - } - else - payload=result[OSF.DDA.SafeArray.Response.Payload]; - if(args._chunkResultData) - { - payload=fromSafeArray(payload); - if(payload !=null) - { - var expectedChunkCount=payload[payload.length - 1]; - if(args._chunkResultData.length==expectedChunkCount) - payload[payload.length - 1]=args._chunkResultData; - else - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError - } - } - } - else - payload=result[OSF.DDA.SafeArray.Response.Payload]; - args.onComplete(status,payload) - } - if(OSF.AppTelemetry) - OSF.AppTelemetry.onMethodDone(args.dispId,args.hostCallArgs,Math.abs((new Date).getTime() - startTime),status); - return true - }) - } - catch(ex) - { - OSF.DDA.SafeArray.Delegate._onException(ex,args) - } + function toArray(args) + { + var arrArgs = args; + if(OSF.OUtil.isArray(args)) + { + var len = arrArgs.length; + for(var i = 0; i < len; i++) + arrArgs[i] = toArray(arrArgs[i]) + } + else if(OSF.OUtil.isDate(args)) + arrArgs = args.getVarDate(); + else if(typeof args === "object" && !OSF.OUtil.isArray(args)) + { + arrArgs = []; + for(var index in args) + if(!OSF.OUtil.isFunction(args[index])) + arrArgs[index] = toArray(args[index]) + } + return arrArgs + } + function fromSafeArray(value) + { + var ret = value; + if(value != null && value.toArray) + { + var arrayResult = value.toArray(); + ret = new Array(arrayResult.length); + for(var i = 0; i < arrayResult.length; i++) + ret[i] = fromSafeArray(arrayResult[i]) + } + return ret + } + try + { + if(args.onCalling) + args.onCalling(); + OSF.ClientHostController.execute(args.dispId,toArray(args.hostCallArgs),function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode) + { + var result = hostResponseArgs.toArray(); + var status = result[OSF.DDA.SafeArray.Response.Status]; + if(status == OSF.DDA.ErrorCodeManager.errorCodes.ooeChunkResult) + { + var payload = result[OSF.DDA.SafeArray.Response.Payload]; + payload = fromSafeArray(payload); + if(payload != null) + { + if(!args._chunkResultData) + args._chunkResultData = new Array; + args._chunkResultData[payload[0]] = payload[1] + } + return false + } + if(args.onReceiving) + args.onReceiving(); + if(args.onComplete) + { + var payload; + if(status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + { + if(result.length > 2) + { + payload = []; + for(var i = 1; i < result.length; i++) + payload[i - 1] = result[i] + } + else + payload = result[OSF.DDA.SafeArray.Response.Payload]; + if(args._chunkResultData) + { + payload = fromSafeArray(payload); + if(payload != null) + { + var expectedChunkCount = payload[payload.length - 1]; + if(args._chunkResultData.length == expectedChunkCount) + payload[payload.length - 1] = args._chunkResultData; + else + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError + } + } + } + else + payload = result[OSF.DDA.SafeArray.Response.Payload]; + args.onComplete(status,payload) + } + return true + }) + } + catch(ex) + { + OSF.DDA.SafeArray.Delegate._onException(ex,args) + } }; -OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent=function OSF_DDA_SafeArrayDelegate$GetOnAfterRegisterEvent(register, args) +OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent = function OSF_DDA_SafeArrayDelegate$GetOnAfterRegisterEvent(register, args) { - var startTime=(new Date).getTime(); - return function OSF_DDA_SafeArrayDelegate$OnAfterRegisterEvent(hostResponseArgs) - { - if(args.onReceiving) - args.onReceiving(); - var status=hostResponseArgs.toArray ? hostResponseArgs.toArray()[OSF.DDA.SafeArray.Response.Status] : hostResponseArgs; - if(args.onComplete) - args.onComplete(status); - if(OSF.AppTelemetry) - OSF.AppTelemetry.onRegisterDone(register,args.dispId,Math.abs((new Date).getTime() - startTime),status) - } + var startTime = (new Date).getTime(); + return function OSF_DDA_SafeArrayDelegate$OnAfterRegisterEvent(hostResponseArgs) + { + if(args.onReceiving) + args.onReceiving(); + var status = hostResponseArgs.toArray ? hostResponseArgs.toArray()[OSF.DDA.SafeArray.Response.Status] : hostResponseArgs; + if(args.onComplete) + args.onComplete(status); + if(OSF.AppTelemetry) + OSF.AppTelemetry.onRegisterDone(register,args.dispId,Math.abs((new Date).getTime() - startTime),status) + } }; -OSF.DDA.SafeArray.Delegate.registerEventAsync=function OSF_DDA_SafeArray_Delegate$RegisterEventAsync(args) +OSF.DDA.SafeArray.Delegate.registerEventAsync = function OSF_DDA_SafeArray_Delegate$RegisterEventAsync(args) { - if(args.onCalling) - args.onCalling(); - var callback=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true,args); - try - { - OSF.ClientHostController.registerEvent(args.dispId,args.targetId,function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) - { - if(args.onEvent) - args.onEvent(payload); - if(OSF.AppTelemetry) - OSF.AppTelemetry.onEventDone(args.dispId) - },callback) - } - catch(ex) - { - OSF.DDA.SafeArray.Delegate._onException(ex,args) - } + if(args.onCalling) + args.onCalling(); + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true,args); + try + { + OSF.ClientHostController.registerEvent(args.dispId,args.targetId,function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) + { + if(args.onEvent) + args.onEvent(payload); + if(OSF.AppTelemetry) + OSF.AppTelemetry.onEventDone(args.dispId) + },callback) + } + catch(ex) + { + OSF.DDA.SafeArray.Delegate._onException(ex,args) + } }; -OSF.DDA.SafeArray.Delegate.unregisterEventAsync=function OSF_DDA_SafeArray_Delegate$UnregisterEventAsync(args) +OSF.DDA.SafeArray.Delegate.unregisterEventAsync = function OSF_DDA_SafeArray_Delegate$UnregisterEventAsync(args) { - if(args.onCalling) - args.onCalling(); - var callback=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false,args); - try - { - OSF.ClientHostController.unregisterEvent(args.dispId,args.targetId,callback) - } - catch(ex) - { - OSF.DDA.SafeArray.Delegate._onException(ex,args) - } + if(args.onCalling) + args.onCalling(); + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false,args); + try + { + OSF.ClientHostController.unregisterEvent(args.dispId,args.targetId,callback) + } + catch(ex) + { + OSF.DDA.SafeArray.Delegate._onException(ex,args) + } }; -OSF.ClientMode={ - ReadWrite: 0, - ReadOnly: 1 +OSF.ClientMode = { + ReadWrite: 0, + ReadOnly: 1 }; -OSF.DDA.RichInitializationReason={ - 1: Microsoft.Office.WebExtension.InitializationReason.Inserted, - 2: Microsoft.Office.WebExtension.InitializationReason.DocumentOpened +OSF.DDA.RichInitializationReason = { + 1: Microsoft.Office.WebExtension.InitializationReason.Inserted, + 2: Microsoft.Office.WebExtension.InitializationReason.DocumentOpened }; -OSF.InitializationHelper=function OSF_InitializationHelper(hostInfo, webAppState, context, settings, hostFacade) +OSF.InitializationHelper = function OSF_InitializationHelper(hostInfo, webAppState, context, settings, hostFacade) { - this._hostInfo=hostInfo; - this._webAppState=webAppState; - this._context=context; - this._settings=settings; - this._hostFacade=hostFacade; - this._initializeSettings=this.initializeSettings + this._hostInfo = hostInfo; + this._webAppState = webAppState; + this._context = context; + this._settings = settings; + this._hostFacade = hostFacade; + this._initializeSettings = this.initializeSettings }; -OSF.InitializationHelper.prototype.deserializeSettings=function OSF_InitializationHelper$deserializeSettings(serializedSettings, refreshSupported) +OSF.InitializationHelper.prototype.deserializeSettings = function OSF_InitializationHelper$deserializeSettings(serializedSettings, refreshSupported) { - var settings; - var osfSessionStorage=OSF.OUtil.getSessionStorage(); - if(osfSessionStorage) - { - var storageSettings=osfSessionStorage.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey()); - if(storageSettings) - serializedSettings=typeof JSON !=="undefined" ? JSON.parse(storageSettings) : OsfMsAjaxFactory.msAjaxSerializer.deserialize(storageSettings,true); - else - { - storageSettings=typeof JSON !=="undefined" ? JSON.stringify(serializedSettings) : OsfMsAjaxFactory.msAjaxSerializer.serialize(serializedSettings); - osfSessionStorage.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),storageSettings) - } - } - var deserializedSettings=OSF.DDA.SettingsManager.deserializeSettings(serializedSettings); - if(refreshSupported) - settings=new OSF.DDA.RefreshableSettings(deserializedSettings); - else - settings=new OSF.DDA.Settings(deserializedSettings); - return settings + var settings; + var osfSessionStorage = OSF.OUtil.getSessionStorage(); + if(osfSessionStorage) + { + var storageSettings = osfSessionStorage.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey()); + if(storageSettings) + serializedSettings = JSON.parse(storageSettings); + else + { + storageSettings = JSON.stringify(serializedSettings); + osfSessionStorage.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),storageSettings) + } + } + var deserializedSettings = OSF.DDA.SettingsManager.deserializeSettings(serializedSettings); + if(refreshSupported) + settings = new OSF.DDA.RefreshableSettings(deserializedSettings); + else + settings = new OSF.DDA.Settings(deserializedSettings); + return settings }; -OSF.InitializationHelper.prototype.saveAndSetDialogInfo=function OSF_InitializationHelper$saveAndSetDialogInfo(hostInfoValue){}; -OSF.InitializationHelper.prototype.setAgaveHostCommunication=function OSF_InitializationHelper$setAgaveHostCommunication(){}; -OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize=function OSF_InitializationHelper$prepareRightBeforeWebExtensionInitialize(appContext) +OSF.InitializationHelper.prototype.saveAndSetDialogInfo = function OSF_InitializationHelper$saveAndSetDialogInfo(hostInfoValue){}; +OSF.InitializationHelper.prototype.setAgaveHostCommunication = function OSF_InitializationHelper$setAgaveHostCommunication(){}; +OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize = function OSF_InitializationHelper$prepareRightBeforeWebExtensionInitialize(appContext) { - this.prepareApiSurface(appContext); - Microsoft.Office.WebExtension.initialize(this.getInitializationReason(appContext)) + this.prepareApiSurface(appContext); + Microsoft.Office.WebExtension.initialize(this.getInitializationReason(appContext)) }; -OSF.InitializationHelper.prototype.prepareApiSurface=function OSF_InitializationHelper$prepareApiSurfaceAndInitialize(appContext) +OSF.InitializationHelper.prototype.prepareApiSurface = function OSF_InitializationHelper$prepareApiSurfaceAndInitialize(appContext) { - var license=new OSF.DDA.License(appContext.get_eToken()); - var getOfficeThemeHandler=OSF.DDA.OfficeTheme && OSF.DDA.OfficeTheme.getOfficeTheme ? OSF.DDA.OfficeTheme.getOfficeTheme : null; - if(appContext.get_isDialog()) - { - if(OSF.DDA.UI.ChildUI) - appContext.ui=new OSF.DDA.UI.ChildUI - } - else if(OSF.DDA.UI.ParentUI) - { - appContext.ui=new OSF.DDA.UI.ParentUI; - if(OfficeExt.Container) - OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync]) - } - OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(appContext,appContext.doc,license,null,getOfficeThemeHandler)); - var getDelegateMethods, - parameterMap; - getDelegateMethods=OSF.DDA.DispIdHost.getClientDelegateMethods; - parameterMap=OSF.DDA.SafeArray.Delegate.ParameterMap; - OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(getDelegateMethods,parameterMap)) + var license = new OSF.DDA.License(appContext.get_eToken()); + var getOfficeThemeHandler = OSF.DDA.OfficeTheme && OSF.DDA.OfficeTheme.getOfficeTheme ? OSF.DDA.OfficeTheme.getOfficeTheme : null; + if(appContext.get_isDialog()) + { + if(OSF.DDA.UI.ChildUI) + appContext.ui = new OSF.DDA.UI.ChildUI + } + else if(OSF.DDA.UI.ParentUI) + { + appContext.ui = new OSF.DDA.UI.ParentUI; + if(OfficeExt.Container) + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync]) + } + if(OSF.DDA.OpenBrowser) + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui,[OSF.DDA.AsyncMethodNames.OpenBrowserWindow]); + if(OSF.DDA.Auth) + { + appContext.auth = new OSF.DDA.Auth; + OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth,[OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]) + } + OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(appContext,appContext.doc,license,null,getOfficeThemeHandler)); + var getDelegateMethods, + parameterMap; + getDelegateMethods = OSF.DDA.DispIdHost.getClientDelegateMethods; + parameterMap = OSF.DDA.SafeArray.Delegate.ParameterMap; + OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(getDelegateMethods,parameterMap)) }; -OSF.InitializationHelper.prototype.getInitializationReason=function(appContext) +OSF.InitializationHelper.prototype.getInitializationReason = function(appContext) { - return OSF.DDA.RichInitializationReason[appContext.get_reason()] + return OSF.DDA.RichInitializationReason[appContext.get_reason()] }; -OSF.DDA.DispIdHost.getClientDelegateMethods=function(actionId) +OSF.DDA.DispIdHost.getClientDelegateMethods = function(actionId) { - var delegateMethods={}; - delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.SafeArray.Delegate.executeAsync; - delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.SafeArray.Delegate.registerEventAsync; - delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.SafeArray.Delegate.unregisterEventAsync; - delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog]=OSF.DDA.SafeArray.Delegate.openDialog; - delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog]=OSF.DDA.SafeArray.Delegate.closeDialog; - delegateMethods[OSF.DDA.DispIdHost.Delegates.MessageParent]=OSF.DDA.SafeArray.Delegate.messageParent; - if(OSF.DDA.AsyncMethodNames.RefreshAsync && actionId==OSF.DDA.AsyncMethodNames.RefreshAsync.id) - { - var readSerializedSettings=function(hostCallArgs, onCalling, onReceiving) - { - return OSF.DDA.ClientSettingsManager.read(onCalling,onReceiving) - }; - delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(readSerializedSettings) - } - if(OSF.DDA.AsyncMethodNames.SaveAsync && actionId==OSF.DDA.AsyncMethodNames.SaveAsync.id) - { - var writeSerializedSettings=function(hostCallArgs, onCalling, onReceiving) - { - return OSF.DDA.ClientSettingsManager.write(hostCallArgs[OSF.DDA.SettingsManager.SerializedSettings],hostCallArgs[Microsoft.Office.WebExtension.Parameters.OverwriteIfStale],onCalling,onReceiving) - }; - delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(writeSerializedSettings) - } - return delegateMethods + var delegateMethods = {}; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.SafeArray.Delegate.executeAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync] = OSF.DDA.SafeArray.Delegate.registerEventAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync] = OSF.DDA.SafeArray.Delegate.unregisterEventAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] = OSF.DDA.SafeArray.Delegate.openDialog; + delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] = OSF.DDA.SafeArray.Delegate.closeDialog; + delegateMethods[OSF.DDA.DispIdHost.Delegates.MessageParent] = OSF.DDA.SafeArray.Delegate.messageParent; + delegateMethods[OSF.DDA.DispIdHost.Delegates.SendMessage] = OSF.DDA.SafeArray.Delegate.sendMessage; + if(OSF.DDA.AsyncMethodNames.RefreshAsync && actionId == OSF.DDA.AsyncMethodNames.RefreshAsync.id) + { + var readSerializedSettings = function(hostCallArgs, onCalling, onReceiving) + { + return OSF.DDA.ClientSettingsManager.read(onCalling,onReceiving) + }; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(readSerializedSettings) + } + if(OSF.DDA.AsyncMethodNames.SaveAsync && actionId == OSF.DDA.AsyncMethodNames.SaveAsync.id) + { + var writeSerializedSettings = function(hostCallArgs, onCalling, onReceiving) + { + return OSF.DDA.ClientSettingsManager.write(hostCallArgs[OSF.DDA.SettingsManager.SerializedSettings],hostCallArgs[Microsoft.Office.WebExtension.Parameters.OverwriteIfStale],onCalling,onReceiving) + }; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(writeSerializedSettings) + } + return delegateMethods }; -var OSF=OSF || {}; +var OSF = OSF || {}; var OSFWebkit; (function(OSFWebkit) { - var WebkitSafeArray=function() - { - function WebkitSafeArray(data) - { - this.data=data; - this.safeArrayFlag=this.isSafeArray(data) - } - WebkitSafeArray.prototype.dimensions=function() - { - var dimensions=0; - if(this.safeArrayFlag) - dimensions=this.data[0][0]; - else if(this.isArray()) - dimensions=2; - return dimensions - }; - WebkitSafeArray.prototype.getItem=function() - { - var array=[]; - var element=null; - if(this.safeArrayFlag) - array=this.toArray(); - else - array=this.data; - element=array; - for(var i=0; i < arguments.length; i++) - element=element[arguments[i]]; - return element - }; - WebkitSafeArray.prototype.lbound=function(dimension) - { - return 0 - }; - WebkitSafeArray.prototype.ubound=function(dimension) - { - var ubound=0; - if(this.safeArrayFlag) - ubound=this.data[0][dimension]; - else if(this.isArray()) - if(dimension==1) - return this.data.length; - else if(dimension==2) - if(OSF.OUtil.isArray(this.data[0])) - return this.data[0].length; - else if(this.data[0] !=null) - return 1; - return ubound - }; - WebkitSafeArray.prototype.toArray=function() - { - if(this.isArray()==false) - return this.data; - var arr=[]; - var startingIndex=this.safeArrayFlag ? 1 : 0; - for(var i=startingIndex; i < this.data.length; i++) - { - var element=this.data[i]; - if(this.isSafeArray(element)) - arr.push(new WebkitSafeArray(element)); - else - arr.push(element) - } - return arr - }; - WebkitSafeArray.prototype.isArray=function() - { - return OSF.OUtil.isArray(this.data) - }; - WebkitSafeArray.prototype.isSafeArray=function(obj) - { - var isSafeArray=false; - if(OSF.OUtil.isArray(obj) && OSF.OUtil.isArray(obj[0])) - { - var bounds=obj[0]; - var dimensions=bounds[0]; - if(bounds.length !=dimensions+1) - return false; - var expectedArraySize=1; - for(var i=1; i < bounds.length; i++) - { - var dimension=bounds[i]; - if(isFinite(dimension)==false) - return false; - expectedArraySize=expectedArraySize * dimension - } - expectedArraySize++; - isSafeArray=expectedArraySize==obj.length - } - return isSafeArray - }; - return WebkitSafeArray - }(); - OSFWebkit.WebkitSafeArray=WebkitSafeArray -})(OSFWebkit || (OSFWebkit={})); + var WebkitSafeArray = function() + { + function WebkitSafeArray(data) + { + this.data = data; + this.safeArrayFlag = this.isSafeArray(data) + } + WebkitSafeArray.prototype.dimensions = function() + { + var dimensions = 0; + if(this.safeArrayFlag) + dimensions = this.data[0][0]; + else if(this.isArray()) + dimensions = 2; + return dimensions + }; + WebkitSafeArray.prototype.getItem = function() + { + var array = []; + var element = null; + if(this.safeArrayFlag) + array = this.toArray(); + else + array = this.data; + element = array; + for(var i = 0; i < arguments.length; i++) + element = element[arguments[i]]; + return element + }; + WebkitSafeArray.prototype.lbound = function(dimension) + { + return 0 + }; + WebkitSafeArray.prototype.ubound = function(dimension) + { + var ubound = 0; + if(this.safeArrayFlag) + ubound = this.data[0][dimension]; + else if(this.isArray()) + if(dimension == 1) + return this.data.length; + else if(dimension == 2) + if(OSF.OUtil.isArray(this.data[0])) + return this.data[0].length; + else if(this.data[0] != null) + return 1; + return ubound + }; + WebkitSafeArray.prototype.toArray = function() + { + if(this.isArray() == false) + return this.data; + var arr = []; + var startingIndex = this.safeArrayFlag ? 1 : 0; + for(var i = startingIndex; i < this.data.length; i++) + { + var element = this.data[i]; + if(this.isSafeArray(element)) + arr.push(new WebkitSafeArray(element)); + else + arr.push(element) + } + return arr + }; + WebkitSafeArray.prototype.isArray = function() + { + return OSF.OUtil.isArray(this.data) + }; + WebkitSafeArray.prototype.isSafeArray = function(obj) + { + var isSafeArray = false; + if(OSF.OUtil.isArray(obj) && OSF.OUtil.isArray(obj[0])) + { + var bounds = obj[0]; + var dimensions = bounds[0]; + if(bounds.length != dimensions + 1) + return false; + var expectedArraySize = 1; + for(var i = 1; i < bounds.length; i++) + { + var dimension = bounds[i]; + if(isFinite(dimension) == false) + return false; + expectedArraySize = expectedArraySize * dimension + } + expectedArraySize++; + isSafeArray = expectedArraySize == obj.length + } + return isSafeArray + }; + return WebkitSafeArray + }(); + OSFWebkit.WebkitSafeArray = WebkitSafeArray +})(OSFWebkit || (OSFWebkit = {})); var OSFWebkit; (function(OSFWebkit) { - var ScriptMessaging; - (function(ScriptMessaging) - { - var scriptMessenger=null; - function agaveHostCallback(callbackId, params) - { - scriptMessenger.agaveHostCallback(callbackId,params) - } - ScriptMessaging.agaveHostCallback=agaveHostCallback; - function agaveHostEventCallback(callbackId, params) - { - scriptMessenger.agaveHostEventCallback(callbackId,params) - } - ScriptMessaging.agaveHostEventCallback=agaveHostEventCallback; - function GetScriptMessenger() - { - if(scriptMessenger==null) - scriptMessenger=new WebkitScriptMessaging("OSF.ScriptMessaging.agaveHostCallback","OSF.ScriptMessaging.agaveHostEventCallback"); - return scriptMessenger - } - ScriptMessaging.GetScriptMessenger=GetScriptMessenger; - var EventHandlerCallback=function() - { - function EventHandlerCallback(id, targetId, handler) - { - this.id=id; - this.targetId=targetId; - this.handler=handler - } - return EventHandlerCallback - }(); - var WebkitScriptMessaging=function() - { - function WebkitScriptMessaging(methodCallbackName, eventCallbackName) - { - this.callingIndex=0; - this.callbackList={}; - this.eventHandlerList={}; - this.asyncMethodCallbackFunctionName=methodCallbackName; - this.eventCallbackFunctionName=eventCallbackName; - this.conversationId=WebkitScriptMessaging.getCurrentTimeMS().toString() - } - WebkitScriptMessaging.prototype.invokeMethod=function(handlerName, methodId, params, callback) - { - var messagingArgs={}; - this.postWebkitMessage(messagingArgs,handlerName,methodId,params,callback) - }; - WebkitScriptMessaging.prototype.registerEvent=function(handlerName, methodId, dispId, targetId, handler, callback) - { - var messagingArgs={eventCallbackFunction: this.eventCallbackFunctionName}; - var hostArgs={ - id: dispId, - targetId: targetId - }; - var correlationId=this.postWebkitMessage(messagingArgs,handlerName,methodId,hostArgs,callback); - this.eventHandlerList[correlationId]=new EventHandlerCallback(dispId,targetId,handler) - }; - WebkitScriptMessaging.prototype.unregisterEvent=function(handlerName, methodId, dispId, targetId, callback) - { - var hostArgs={ - id: dispId, - targetId: targetId - }; - for(var key in this.eventHandlerList) - if(this.eventHandlerList.hasOwnProperty(key)) - { - var eventCallback=this.eventHandlerList[key]; - if(eventCallback.id==dispId && eventCallback.targetId==targetId) - delete this.eventHandlerList[key] - } - this.invokeMethod(handlerName,methodId,hostArgs,callback) - }; - WebkitScriptMessaging.prototype.agaveHostCallback=function(callbackId, params) - { - var callbackFunction=this.callbackList[callbackId]; - if(callbackFunction) - { - var callbacksDone=callbackFunction(params); - if(callbacksDone===undefined || callbacksDone===true) - delete this.callbackList[callbackId] - } - }; - WebkitScriptMessaging.prototype.agaveHostEventCallback=function(callbackId, params) - { - var eventCallback=this.eventHandlerList[callbackId]; - if(eventCallback) - eventCallback.handler(params) - }; - WebkitScriptMessaging.prototype.postWebkitMessage=function(messagingArgs, handlerName, methodId, params, callback) - { - var correlationId=this.generateCorrelationId(); - this.callbackList[correlationId]=callback; - messagingArgs.methodId=methodId; - messagingArgs.params=params; - messagingArgs.callbackId=correlationId; - messagingArgs.callbackFunction=this.asyncMethodCallbackFunctionName; - var invokePostMessage=function() - { - window.webkit.messageHandlers[handlerName].postMessage(JSON.stringify(messagingArgs)) - }; - var currentTimestamp=WebkitScriptMessaging.getCurrentTimeMS(); - if(this.lastMessageTimestamp==null || currentTimestamp - this.lastMessageTimestamp >=WebkitScriptMessaging.MESSAGE_TIME_DELTA) - { - invokePostMessage(); - this.lastMessageTimestamp=currentTimestamp - } - else - { - this.lastMessageTimestamp+=WebkitScriptMessaging.MESSAGE_TIME_DELTA; - setTimeout(function() - { - invokePostMessage() - },this.lastMessageTimestamp - currentTimestamp) - } - return correlationId - }; - WebkitScriptMessaging.prototype.generateCorrelationId=function() - { -++this.callingIndex; - return this.conversationId+this.callingIndex - }; - WebkitScriptMessaging.getCurrentTimeMS=function() - { - return(new Date).getTime() - }; - WebkitScriptMessaging.MESSAGE_TIME_DELTA=10; - return WebkitScriptMessaging - }(); - ScriptMessaging.WebkitScriptMessaging=WebkitScriptMessaging - })(ScriptMessaging=OSFWebkit.ScriptMessaging || (OSFWebkit.ScriptMessaging={})) -})(OSFWebkit || (OSFWebkit={})); -OSF.ScriptMessaging=OSFWebkit.ScriptMessaging; + var ScriptMessaging; + (function(ScriptMessaging) + { + var scriptMessenger = null; + function agaveHostCallback(callbackId, params) + { + scriptMessenger.agaveHostCallback(callbackId,params) + } + ScriptMessaging.agaveHostCallback = agaveHostCallback; + function agaveHostEventCallback(callbackId, params) + { + scriptMessenger.agaveHostEventCallback(callbackId,params) + } + ScriptMessaging.agaveHostEventCallback = agaveHostEventCallback; + function GetScriptMessenger() + { + if(scriptMessenger == null) + scriptMessenger = new WebkitScriptMessaging("OSF.ScriptMessaging.agaveHostCallback","OSF.ScriptMessaging.agaveHostEventCallback"); + return scriptMessenger + } + ScriptMessaging.GetScriptMessenger = GetScriptMessenger; + var EventHandlerCallback = function() + { + function EventHandlerCallback(id, targetId, handler) + { + this.id = id; + this.targetId = targetId; + this.handler = handler + } + return EventHandlerCallback + }(); + var WebkitScriptMessaging = function() + { + function WebkitScriptMessaging(methodCallbackName, eventCallbackName) + { + this.callingIndex = 0; + this.callbackList = {}; + this.eventHandlerList = {}; + this.asyncMethodCallbackFunctionName = methodCallbackName; + this.eventCallbackFunctionName = eventCallbackName; + this.conversationId = WebkitScriptMessaging.getCurrentTimeMS().toString() + } + WebkitScriptMessaging.prototype.invokeMethod = function(handlerName, methodId, params, callback) + { + var messagingArgs = {}; + this.postWebkitMessage(messagingArgs,handlerName,methodId,params,callback) + }; + WebkitScriptMessaging.prototype.registerEvent = function(handlerName, methodId, dispId, targetId, handler, callback) + { + var messagingArgs = {eventCallbackFunction: this.eventCallbackFunctionName}; + var hostArgs = { + id: dispId, + targetId: targetId + }; + var correlationId = this.postWebkitMessage(messagingArgs,handlerName,methodId,hostArgs,callback); + this.eventHandlerList[correlationId] = new EventHandlerCallback(dispId,targetId,handler) + }; + WebkitScriptMessaging.prototype.unregisterEvent = function(handlerName, methodId, dispId, targetId, callback) + { + var hostArgs = { + id: dispId, + targetId: targetId + }; + for(var key in this.eventHandlerList) + if(this.eventHandlerList.hasOwnProperty(key)) + { + var eventCallback = this.eventHandlerList[key]; + if(eventCallback.id == dispId && eventCallback.targetId == targetId) + delete this.eventHandlerList[key] + } + this.invokeMethod(handlerName,methodId,hostArgs,callback) + }; + WebkitScriptMessaging.prototype.agaveHostCallback = function(callbackId, params) + { + var callbackFunction = this.callbackList[callbackId]; + if(callbackFunction) + { + var callbacksDone = callbackFunction(params); + if(callbacksDone === undefined || callbacksDone === true) + delete this.callbackList[callbackId] + } + }; + WebkitScriptMessaging.prototype.agaveHostEventCallback = function(callbackId, params) + { + var eventCallback = this.eventHandlerList[callbackId]; + if(eventCallback) + eventCallback.handler(params) + }; + WebkitScriptMessaging.prototype.postWebkitMessage = function(messagingArgs, handlerName, methodId, params, callback) + { + var correlationId = this.generateCorrelationId(); + this.callbackList[correlationId] = callback; + messagingArgs.methodId = methodId; + messagingArgs.params = params; + messagingArgs.callbackId = correlationId; + messagingArgs.callbackFunction = this.asyncMethodCallbackFunctionName; + var invokePostMessage = function() + { + window.webkit.messageHandlers[handlerName].postMessage(JSON.stringify(messagingArgs)) + }; + var currentTimestamp = WebkitScriptMessaging.getCurrentTimeMS(); + if(this.lastMessageTimestamp == null || currentTimestamp - this.lastMessageTimestamp >= WebkitScriptMessaging.MESSAGE_TIME_DELTA) + { + invokePostMessage(); + this.lastMessageTimestamp = currentTimestamp + } + else + { + this.lastMessageTimestamp += WebkitScriptMessaging.MESSAGE_TIME_DELTA; + setTimeout(function() + { + invokePostMessage() + },this.lastMessageTimestamp - currentTimestamp) + } + return correlationId + }; + WebkitScriptMessaging.prototype.generateCorrelationId = function() + { + ++this.callingIndex; + return this.conversationId + this.callingIndex + }; + WebkitScriptMessaging.getCurrentTimeMS = function() + { + return(new Date).getTime() + }; + WebkitScriptMessaging.MESSAGE_TIME_DELTA = 10; + return WebkitScriptMessaging + }(); + ScriptMessaging.WebkitScriptMessaging = WebkitScriptMessaging + })(ScriptMessaging = OSFWebkit.ScriptMessaging || (OSFWebkit.ScriptMessaging = {})) +})(OSFWebkit || (OSFWebkit = {})); +OSF.ScriptMessaging = OSFWebkit.ScriptMessaging; var OSFWebkit; (function(OSFWebkit) { - OSFWebkit.MessageHandlerName="Agave"; - OSFWebkit.PopupMessageHandlerName="WefPopupHandler"; - (function(AppContextProperties) - { - AppContextProperties[AppContextProperties["Settings"]=0]="Settings"; - AppContextProperties[AppContextProperties["SolutionReferenceId"]=1]="SolutionReferenceId"; - AppContextProperties[AppContextProperties["AppType"]=2]="AppType"; - AppContextProperties[AppContextProperties["MajorVersion"]=3]="MajorVersion"; - AppContextProperties[AppContextProperties["MinorVersion"]=4]="MinorVersion"; - AppContextProperties[AppContextProperties["RevisionVersion"]=5]="RevisionVersion"; - AppContextProperties[AppContextProperties["APIVersionSequence"]=6]="APIVersionSequence"; - AppContextProperties[AppContextProperties["AppCapabilities"]=7]="AppCapabilities"; - AppContextProperties[AppContextProperties["APPUILocale"]=8]="APPUILocale"; - AppContextProperties[AppContextProperties["AppDataLocale"]=9]="AppDataLocale"; - AppContextProperties[AppContextProperties["BindingCount"]=10]="BindingCount"; - AppContextProperties[AppContextProperties["DocumentUrl"]=11]="DocumentUrl"; - AppContextProperties[AppContextProperties["ActivationMode"]=12]="ActivationMode"; - AppContextProperties[AppContextProperties["ControlIntegrationLevel"]=13]="ControlIntegrationLevel"; - AppContextProperties[AppContextProperties["SolutionToken"]=14]="SolutionToken"; - AppContextProperties[AppContextProperties["APISetVersion"]=15]="APISetVersion"; - AppContextProperties[AppContextProperties["CorrelationId"]=16]="CorrelationId"; - AppContextProperties[AppContextProperties["InstanceId"]=17]="InstanceId"; - AppContextProperties[AppContextProperties["TouchEnabled"]=18]="TouchEnabled"; - AppContextProperties[AppContextProperties["CommerceAllowed"]=19]="CommerceAllowed"; - AppContextProperties[AppContextProperties["RequirementMatrix"]=20]="RequirementMatrix" - })(OSFWebkit.AppContextProperties || (OSFWebkit.AppContextProperties={})); - var AppContextProperties=OSFWebkit.AppContextProperties; - (function(MethodId) - { - MethodId[MethodId["Execute"]=1]="Execute"; - MethodId[MethodId["RegisterEvent"]=2]="RegisterEvent"; - MethodId[MethodId["UnregisterEvent"]=3]="UnregisterEvent"; - MethodId[MethodId["WriteSettings"]=4]="WriteSettings"; - MethodId[MethodId["GetContext"]=5]="GetContext" - })(OSFWebkit.MethodId || (OSFWebkit.MethodId={})); - var MethodId=OSFWebkit.MethodId; - var WebkitHostController=function() - { - function WebkitHostController(hostScriptProxy) - { - this.hostScriptProxy=hostScriptProxy - } - WebkitHostController.prototype.execute=function(id, params, callback) - { - var args=params; - if(args==null) - args=[]; - var hostParams={ - id: id, - apiArgs: args - }; - var agaveResponseCallback=function(payload) - { - if(callback) - { - var invokeArguments=[]; - if(OSF.OUtil.isArray(payload)) - for(var i=0; i < payload.length; i++) - { - var element=payload[i]; - if(OSF.OUtil.isArray(element)) - element=new OSFWebkit.WebkitSafeArray(element); - invokeArguments.unshift(element) - } - return callback.apply(null,invokeArguments) - } - }; - this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.Execute,hostParams,agaveResponseCallback) - }; - WebkitHostController.prototype.registerEvent=function(id, targetId, handler, callback) - { - var agaveEventHandlerCallback=function(payload) - { - var safeArraySource=payload; - var eventId=0; - if(OSF.OUtil.isArray(payload) && payload.length >=2) - { - safeArraySource=payload[0]; - eventId=payload[1] - } - if(handler) - handler(eventId,new OSFWebkit.WebkitSafeArray(safeArraySource)) - }; - var agaveResponseCallback=function(payload) - { - if(callback) - return callback(new OSFWebkit.WebkitSafeArray(payload)) - }; - this.hostScriptProxy.registerEvent(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.RegisterEvent,id,targetId,agaveEventHandlerCallback,agaveResponseCallback) - }; - WebkitHostController.prototype.unregisterEvent=function(id, targetId, callback) - { - var agaveResponseCallback=function(response) - { - return callback(new OSFWebkit.WebkitSafeArray(response)) - }; - this.hostScriptProxy.unregisterEvent(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.UnregisterEvent,id,targetId,agaveResponseCallback) - }; - WebkitHostController.prototype.messageParent=function(params) - { - var message=params[Microsoft.Office.WebExtension.Parameters.MessageToParent]; - var messageObj={dialogMessage: { - messageType: OSF.DialogMessageType.DialogMessageReceived, - messageContent: message - }}; - window.opener.postMessage(JSON.stringify(messageObj),window.location.origin) - }; - WebkitHostController.prototype.openDialog=function(id, targetId, handler, callback) - { - var magicWord="action=displayDialog"; - var fragmentSeparator="#"; - var callArgs=JSON.parse(targetId); - var callUrl=callArgs.url; - if(!callUrl) - return; - var urlParts=callUrl.split(fragmentSeparator); - var seperator="?"; - if(urlParts[0].indexOf("?") > -1) - seperator="&"; - var width=screen.width * callArgs.width / 100; - var height=screen.height * callArgs.height / 100; - var params="width="+width+", height="+height; - urlParts[0]=urlParts[0].concat(seperator).concat(magicWord); - var openUrl=urlParts.join(fragmentSeparator); - WebkitHostController.popup=window.open(openUrl,"",params); - function receiveMessage(event) - { - if(event.origin==window.location.origin) - try - { - var messageObj=JSON.parse(event.data); - if(messageObj.dialogMessage) - handler(id,[OSF.DialogMessageType.DialogMessageReceived,messageObj.dialogMessage.messageContent]) - } - catch(e) - { - OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handlered. Message:"+event.data) - } - } - window.addEventListener("message",receiveMessage); - var interval; - function checkWindowClose() - { - try - { - if(WebkitHostController.popup==null || WebkitHostController.popup.closed) - { - window.clearInterval(interval); - window.removeEventListener("message",receiveMessage); - handler(id,[OSF.DialogMessageType.DialogClosed]) - } - } - catch(e) - { - OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed.") - } - } - interval=window.setInterval(checkWindowClose,1e3); - callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - }; - WebkitHostController.prototype.closeDialog=function(id, targetId, callback) - { - if(WebkitHostController.popup) - { - WebkitHostController.popup.close(); - WebkitHostController.popup=null; - callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - } - else - callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError) - }; - return WebkitHostController - }(); - OSFWebkit.WebkitHostController=WebkitHostController -})(OSFWebkit || (OSFWebkit={})); -OSF.Webkit=OSFWebkit; -OSF.ClientHostController=new OSFWebkit.WebkitHostController(OSF.ScriptMessaging.GetScriptMessenger()); -OSF.DDA.ClientSettingsManager={ - getSettingsExecuteMethod: function OSF_DDA_ClientSettingsManager$getSettingsExecuteMethod(hostDelegateMethod) - { - return function(args) - { - var status, - response; - var onComplete=function onComplete(status, response) - { - if(args.onReceiving) - args.onReceiving(); - if(args.onComplete) - args.onComplete(status,response) - }; - try - { - hostDelegateMethod(args.hostCallArgs,args.onCalling,onComplete) - } - catch(ex) - { - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; - response={ - name: Strings.OfficeOM.L_InternalError, - message: ex - }; - onComplete(status,response) - } - } - }, - read: function OSF_DDA_ClientSettingsManager$read(onCalling, onComplete) - { - var keys=[]; - var values=[]; - if(onCalling) - onCalling(); - var initializationHelper=OSF._OfficeAppFactory.getInitializationHelper(); - var onReceivedContext=function onReceivedContext(appContext) - { - if(onComplete) - onComplete(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,appContext.get_settings()) - }; - initializationHelper.getAppContext(null,onReceivedContext) - }, - write: function OSF_DDA_ClientSettingsManager$write(serializedSettings, overwriteIfStale, onCalling, onComplete) - { - var hostParams={}; - var keys=[]; - var values=[]; - for(var key in serializedSettings) - { - keys.push(key); - values.push(serializedSettings[key]) - } - hostParams["keys"]=keys; - hostParams["values"]=values; - if(onCalling) - onCalling(); - var onWriteCompleted=function onWriteCompleted(status) - { - if(onComplete) - onComplete(status[0],null) - }; - OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.WriteSettings,hostParams,onWriteCompleted) - } + OSFWebkit.MessageHandlerName = "Agave"; + OSFWebkit.PopupMessageHandlerName = "WefPopupHandler"; + (function(AppContextProperties) + { + AppContextProperties[AppContextProperties["Settings"] = 0] = "Settings"; + AppContextProperties[AppContextProperties["SolutionReferenceId"] = 1] = "SolutionReferenceId"; + AppContextProperties[AppContextProperties["AppType"] = 2] = "AppType"; + AppContextProperties[AppContextProperties["MajorVersion"] = 3] = "MajorVersion"; + AppContextProperties[AppContextProperties["MinorVersion"] = 4] = "MinorVersion"; + AppContextProperties[AppContextProperties["RevisionVersion"] = 5] = "RevisionVersion"; + AppContextProperties[AppContextProperties["APIVersionSequence"] = 6] = "APIVersionSequence"; + AppContextProperties[AppContextProperties["AppCapabilities"] = 7] = "AppCapabilities"; + AppContextProperties[AppContextProperties["APPUILocale"] = 8] = "APPUILocale"; + AppContextProperties[AppContextProperties["AppDataLocale"] = 9] = "AppDataLocale"; + AppContextProperties[AppContextProperties["BindingCount"] = 10] = "BindingCount"; + AppContextProperties[AppContextProperties["DocumentUrl"] = 11] = "DocumentUrl"; + AppContextProperties[AppContextProperties["ActivationMode"] = 12] = "ActivationMode"; + AppContextProperties[AppContextProperties["ControlIntegrationLevel"] = 13] = "ControlIntegrationLevel"; + AppContextProperties[AppContextProperties["SolutionToken"] = 14] = "SolutionToken"; + AppContextProperties[AppContextProperties["APISetVersion"] = 15] = "APISetVersion"; + AppContextProperties[AppContextProperties["CorrelationId"] = 16] = "CorrelationId"; + AppContextProperties[AppContextProperties["InstanceId"] = 17] = "InstanceId"; + AppContextProperties[AppContextProperties["TouchEnabled"] = 18] = "TouchEnabled"; + AppContextProperties[AppContextProperties["CommerceAllowed"] = 19] = "CommerceAllowed"; + AppContextProperties[AppContextProperties["RequirementMatrix"] = 20] = "RequirementMatrix"; + AppContextProperties[AppContextProperties["HostCustomMessage"] = 21] = "HostCustomMessage"; + AppContextProperties[AppContextProperties["HostFullVersion"] = 22] = "HostFullVersion" + })(OSFWebkit.AppContextProperties || (OSFWebkit.AppContextProperties = {})); + var AppContextProperties = OSFWebkit.AppContextProperties; + (function(MethodId) + { + MethodId[MethodId["Execute"] = 1] = "Execute"; + MethodId[MethodId["RegisterEvent"] = 2] = "RegisterEvent"; + MethodId[MethodId["UnregisterEvent"] = 3] = "UnregisterEvent"; + MethodId[MethodId["WriteSettings"] = 4] = "WriteSettings"; + MethodId[MethodId["GetContext"] = 5] = "GetContext" + })(OSFWebkit.MethodId || (OSFWebkit.MethodId = {})); + var MethodId = OSFWebkit.MethodId; + var WebkitHostController = function() + { + function WebkitHostController(hostScriptProxy) + { + this.hostScriptProxy = hostScriptProxy + } + WebkitHostController.prototype.execute = function(id, params, callback) + { + var args = params; + if(args == null) + args = []; + var hostParams = { + id: id, + apiArgs: args + }; + var agaveResponseCallback = function(payload) + { + if(callback) + { + var invokeArguments = []; + if(OSF.OUtil.isArray(payload)) + for(var i = 0; i < payload.length; i++) + { + var element = payload[i]; + if(OSF.OUtil.isArray(element)) + element = new OSFWebkit.WebkitSafeArray(element); + invokeArguments.unshift(element) + } + return callback.apply(null,invokeArguments) + } + }; + this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.Execute,hostParams,agaveResponseCallback) + }; + WebkitHostController.prototype.registerEvent = function(id, targetId, handler, callback) + { + var agaveEventHandlerCallback = function(payload) + { + var safeArraySource = payload; + var eventId = 0; + if(OSF.OUtil.isArray(payload) && payload.length >= 2) + { + safeArraySource = payload[0]; + eventId = payload[1] + } + if(handler) + handler(eventId,new OSFWebkit.WebkitSafeArray(safeArraySource)) + }; + var agaveResponseCallback = function(payload) + { + if(callback) + return callback(new OSFWebkit.WebkitSafeArray(payload)) + }; + this.hostScriptProxy.registerEvent(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.RegisterEvent,id,targetId,agaveEventHandlerCallback,agaveResponseCallback) + }; + WebkitHostController.prototype.unregisterEvent = function(id, targetId, callback) + { + var agaveResponseCallback = function(response) + { + return callback(new OSFWebkit.WebkitSafeArray(response)) + }; + this.hostScriptProxy.unregisterEvent(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.UnregisterEvent,id,targetId,agaveResponseCallback) + }; + WebkitHostController.prototype.messageParent = function(params) + { + var message = params[Microsoft.Office.WebExtension.Parameters.MessageToParent]; + var messageObj = {dialogMessage: { + messageType: OSF.DialogMessageType.DialogMessageReceived, + messageContent: message + }}; + window.opener.postMessage(JSON.stringify(messageObj),window.location.origin) + }; + WebkitHostController.prototype.openDialog = function(id, targetId, handler, callback) + { + if(WebkitHostController.popup && !WebkitHostController.popup.closed) + { + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened); + return + } + var magicWord = "action=displayDialog"; + WebkitHostController.OpenDialogCallback = undefined; + var fragmentSeparator = "#"; + var callArgs = JSON.parse(targetId); + var callUrl = callArgs.url; + if(!callUrl) + return; + var urlParts = callUrl.split(fragmentSeparator); + var seperator = "?"; + if(urlParts[0].indexOf("?") > -1) + seperator = "&"; + var width = screen.width * callArgs.width / 100; + var height = screen.height * callArgs.height / 100; + var params = "width=" + width + ", height=" + height; + urlParts[0] = urlParts[0].concat(seperator).concat(magicWord); + var openUrl = urlParts.join(fragmentSeparator); + WebkitHostController.popup = window.open(openUrl,"",params); + function receiveMessage(event) + { + if(event.origin == window.location.origin) + try + { + var messageObj = JSON.parse(event.data); + if(messageObj.dialogMessage) + handler(id,[OSF.DialogMessageType.DialogMessageReceived,messageObj.dialogMessage.messageContent]) + } + catch(e) + { + OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handlered. Message:" + event.data) + } + } + function checkWindowClose() + { + try + { + if(WebkitHostController.popup == null || WebkitHostController.popup.closed) + { + window.clearInterval(WebkitHostController.interval); + window.removeEventListener("message",receiveMessage); + WebkitHostController.NotifyError = null; + WebkitHostController.popup = null; + handler(id,[OSF.DialogMessageType.DialogClosed]) + } + } + catch(e) + { + OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed.") + } + } + WebkitHostController.OpenDialogCallback = function(code) + { + if(code == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + { + window.addEventListener("message",receiveMessage); + this.messageEventListener = receiveMessage; + WebkitHostController.interval = window.setInterval(checkWindowClose,1e3); + function notifyError(errorCode) + { + handler(id,[errorCode]) + } + WebkitHostController.NotifyError = notifyError + } + callback(code) + } + }; + WebkitHostController.prototype.closeDialog = function(id, targetId, callback) + { + if(WebkitHostController.popup) + { + if(WebkitHostController.interval) + window.clearInterval(WebkitHostController.interval); + WebkitHostController.popup.close(); + WebkitHostController.popup = null; + window.removeEventListener("message",this.messageEventListener); + WebkitHostController.NotifyError = null; + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + } + else + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError) + }; + WebkitHostController.prototype.sendMessage = function(params){}; + return WebkitHostController + }(); + OSFWebkit.WebkitHostController = WebkitHostController +})(OSFWebkit || (OSFWebkit = {})); +OSF.Webkit = OSFWebkit; +OSF.ClientHostController = new OSFWebkit.WebkitHostController(OSF.ScriptMessaging.GetScriptMessenger()); +OSF.DDA.ClientSettingsManager = { + getSettingsExecuteMethod: function OSF_DDA_ClientSettingsManager$getSettingsExecuteMethod(hostDelegateMethod) + { + return function(args) + { + var status, + response; + var onComplete = function onComplete(status, response) + { + if(args.onReceiving) + args.onReceiving(); + if(args.onComplete) + args.onComplete(status,response) + }; + try + { + hostDelegateMethod(args.hostCallArgs,args.onCalling,onComplete) + } + catch(ex) + { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + response = { + name: Strings.OfficeOM.L_InternalError, + message: ex + }; + onComplete(status,response) + } + } + }, + read: function OSF_DDA_ClientSettingsManager$read(onCalling, onComplete) + { + var keys = []; + var values = []; + if(onCalling) + onCalling(); + var initializationHelper = OSF._OfficeAppFactory.getInitializationHelper(); + var onReceivedContext = function onReceivedContext(appContext) + { + if(onComplete) + onComplete(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,appContext.get_settings()) + }; + initializationHelper.getAppContext(null,onReceivedContext) + }, + write: function OSF_DDA_ClientSettingsManager$write(serializedSettings, overwriteIfStale, onCalling, onComplete) + { + var hostParams = {}; + var keys = []; + var values = []; + for(var key in serializedSettings) + { + keys.push(key); + values.push(serializedSettings[key]) + } + hostParams["keys"] = keys; + hostParams["values"] = values; + if(onCalling) + onCalling(); + var onWriteCompleted = function onWriteCompleted(status) + { + if(onComplete) + onComplete(status[0],null) + }; + OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.WriteSettings,hostParams,onWriteCompleted) + } }; -OSF.InitializationHelper.prototype.initializeSettings=function OSF_InitializationHelper$initializeSettings(appContext, refreshSupported) +OSF.InitializationHelper.prototype.initializeSettings = function OSF_InitializationHelper$initializeSettings(appContext, refreshSupported) { - var serializedSettings=appContext.get_settings(); - var settings=this.deserializeSettings(serializedSettings,refreshSupported); - return settings + var serializedSettings = appContext.get_settings(); + var settings = this.deserializeSettings(serializedSettings,refreshSupported); + return settings }; -OSF.InitializationHelper.prototype.getAppContext=function OSF_InitializationHelper$getAppContext(wnd, gotAppContext) +OSF.InitializationHelper.prototype.getAppContext = function OSF_InitializationHelper$getAppContext(wnd, gotAppContext) { - var getInvocationCallback=function OSF_InitializationHelper_getAppContextAsync$getInvocationCallbackWebApp(appContext) - { - var returnedContext; - var appContextProperties=OSF.Webkit.AppContextProperties; - var appType=appContext[appContextProperties.AppType]; - var hostSettings=appContext[appContextProperties.Settings]; - var serializedSettings={}; - var keys=hostSettings[0]; - var values=hostSettings[1]; - for(var index=0; index < keys.length; index++) - serializedSettings[keys[index]]=values[index]; - var id=appContext[appContextProperties.SolutionReferenceId]; - var version=appContext[appContextProperties.MajorVersion]; - var clientMode=appContext[appContextProperties.AppCapabilities]; - var UILocale=appContext[appContextProperties.APPUILocale]; - var dataLocale=appContext[appContextProperties.AppDataLocale]; - var docUrl=appContext[appContextProperties.DocumentUrl]; - var reason=appContext[appContextProperties.ActivationMode]; - var osfControlType=appContext[appContextProperties.ControlIntegrationLevel]; - var eToken=appContext[appContextProperties.SolutionToken]; - eToken=eToken ? eToken.toString() : ""; - var correlationId=appContext[appContextProperties.CorrelationId]; - var appInstanceId=appContext[appContextProperties.InstanceId]; - var touchEnabled=appContext[appContextProperties.TouchEnabled]; - var commerceAllowed=appContext[appContextProperties.CommerceAllowed]; - var minorVersion=appContext[appContextProperties.MinorVersion]; - var requirementMatrix=appContext[appContextProperties.RequirementMatrix]; - returnedContext=new OSF.OfficeAppContext(id,appType,version,UILocale,dataLocale,docUrl,clientMode,serializedSettings,reason,osfControlType,eToken,correlationId,appInstanceId,touchEnabled,commerceAllowed,minorVersion,requirementMatrix); - if(OSF.AppTelemetry) - OSF.AppTelemetry.initialize(returnedContext); - gotAppContext(returnedContext) - }; - var handler; - if(this._hostInfo.isDialog) - handler=OSF.Webkit.PopupMessageHandlerName; - else - handler=OSF.Webkit.MessageHandlerName; - OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(handler,OSF.Webkit.MethodId.GetContext,[],getInvocationCallback) + var getInvocationCallback = function OSF_InitializationHelper_getAppContextAsync$getInvocationCallbackWebApp(appContext) + { + var returnedContext; + var appContextProperties = OSF.Webkit.AppContextProperties; + var appType = appContext[appContextProperties.AppType]; + var hostSettings = appContext[appContextProperties.Settings]; + var serializedSettings = {}; + var keys = hostSettings[0]; + var values = hostSettings[1]; + for(var index = 0; index < keys.length; index++) + serializedSettings[keys[index]] = values[index]; + var id = appContext[appContextProperties.SolutionReferenceId]; + var version = appContext[appContextProperties.MajorVersion]; + var minorVersion = appContext[appContextProperties.MinorVersion]; + var clientMode = appContext[appContextProperties.AppCapabilities]; + var UILocale = appContext[appContextProperties.APPUILocale]; + var dataLocale = appContext[appContextProperties.AppDataLocale]; + var docUrl = appContext[appContextProperties.DocumentUrl]; + var reason = appContext[appContextProperties.ActivationMode]; + var osfControlType = appContext[appContextProperties.ControlIntegrationLevel]; + var eToken = appContext[appContextProperties.SolutionToken]; + eToken = eToken ? eToken.toString() : ""; + var correlationId = appContext[appContextProperties.CorrelationId]; + var appInstanceId = appContext[appContextProperties.InstanceId]; + var touchEnabled = appContext[appContextProperties.TouchEnabled]; + var commerceAllowed = appContext[appContextProperties.CommerceAllowed]; + var requirementMatrix = appContext[appContextProperties.RequirementMatrix]; + var hostCustomMessage = appContext[appContextProperties.HostCustomMessage]; + var hostFullVersion = appContext[appContextProperties.HostFullVersion]; + returnedContext = new OSF.OfficeAppContext(id,appType,version,UILocale,dataLocale,docUrl,clientMode,serializedSettings,reason,osfControlType,eToken,correlationId,appInstanceId,touchEnabled,commerceAllowed,minorVersion,requirementMatrix,hostCustomMessage,hostFullVersion); + if(OSF.AppTelemetry) + OSF.AppTelemetry.initialize(returnedContext); + gotAppContext(returnedContext) + }; + var handler; + if(this._hostInfo.isDialog) + handler = OSF.Webkit.PopupMessageHandlerName; + else + handler = OSF.Webkit.MessageHandlerName; + OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(handler,OSF.Webkit.MethodId.GetContext,[],getInvocationCallback) }; (function() { - var checkScriptOverride=function OSF$checkScriptOverride() - { - var postScriptOverrideCheckAction=function OSF$postScriptOverrideCheckAction(customizedScriptPath) - { - if(customizedScriptPath) - OSF.OUtil.loadScript(customizedScriptPath,function() - { - OsfMsAjaxFactory.msAjaxDebug.trace("loaded customized script:"+customizedScriptPath) - }) - }; - var conversationID, - webAppUrl, - items; - var clientEndPoint=null; - var xdmInfoValue=OSF.OUtil.parseXdmInfo(); - if(xdmInfoValue) - { - items=OSF.OUtil.getInfoItems(xdmInfoValue); - if(items && items.length >=3) - { - conversationID=items[0]; - webAppUrl=items[2]; - var serializerVersion=OSF.OUtil.parseSerializerVersionWithGivenFragment(false,OSF._OfficeAppFactory.getWindowLocationHash()); - if(isNaN(serializerVersion) && OSF._OfficeAppFactory.getWindowName) - serializerVersion=OSF.OUtil.parseSerializerVersionFromWindowName(false,OSF._OfficeAppFactory.getWindowName()); - clientEndPoint=Microsoft.Office.Common.XdmCommunicationManager.connect(conversationID,window.parent,webAppUrl,serializerVersion) - } - } - var customizedScriptPath=null; - if(!clientEndPoint) - { - try - { - if(window.external && typeof window.external.getCustomizedScriptPath !=="undefined") - customizedScriptPath=window.external.getCustomizedScriptPath() - } - catch(ex) - { - OsfMsAjaxFactory.msAjaxDebug.trace("no script override through window.external.") - } - postScriptOverrideCheckAction(customizedScriptPath) - } - else - try - { - clientEndPoint.invoke("getCustomizedScriptPathAsync",function OSF$getCustomizedScriptPathAsyncCallback(errorCode, scriptPath) - { - postScriptOverrideCheckAction(errorCode===0 ? scriptPath : null) - },{__timeout__: 1e3}) - } - catch(ex) - { - OsfMsAjaxFactory.msAjaxDebug.trace("no script override through cross frame communication.") - } - }; - var requiresMsAjax=true; - if(requiresMsAjax && !OsfMsAjaxFactory.isMsAjaxLoaded()) - if(!(OSF._OfficeAppFactory && OSF._OfficeAppFactory && OSF._OfficeAppFactory.getLoadScriptHelper && OSF._OfficeAppFactory.getLoadScriptHelper().isScriptLoading(OSF.ConstantNames.MicrosoftAjaxId))) - OsfMsAjaxFactory.loadMsAjaxFull(function OSF$loadMSAjaxCallback() - { - if(OsfMsAjaxFactory.isMsAjaxLoaded()) - checkScriptOverride(); - else - throw"Not able to load MicrosoftAjax.js."; - }); - else - OSF._OfficeAppFactory.getLoadScriptHelper().waitForScripts([OSF.ConstantNames.MicrosoftAjaxId],checkScriptOverride); - else - checkScriptOverride() + var checkScriptOverride = function OSF$checkScriptOverride() + { + var postScriptOverrideCheckAction = function OSF$postScriptOverrideCheckAction(customizedScriptPath) + { + if(customizedScriptPath) + OSF.OUtil.loadScript(customizedScriptPath,function() + { + OsfMsAjaxFactory.msAjaxDebug.trace("loaded customized script:" + customizedScriptPath) + }) + }; + var conversationID, + webAppUrl, + items; + var clientEndPoint = null; + var xdmInfoValue = OSF.OUtil.parseXdmInfo(); + if(xdmInfoValue) + { + items = OSF.OUtil.getInfoItems(xdmInfoValue); + if(items && items.length >= 3) + { + conversationID = items[0]; + webAppUrl = items[2]; + var serializerVersion = OSF.OUtil.parseSerializerVersionWithGivenFragment(false,OSF._OfficeAppFactory.getWindowLocationHash()); + if(isNaN(serializerVersion) && OSF._OfficeAppFactory.getWindowName) + serializerVersion = OSF.OUtil.parseSerializerVersionFromWindowName(false,OSF._OfficeAppFactory.getWindowName()); + clientEndPoint = Microsoft.Office.Common.XdmCommunicationManager.connect(conversationID,window.parent,webAppUrl,serializerVersion) + } + } + var customizedScriptPath = null; + if(!clientEndPoint) + { + try + { + if(window.external && typeof window.external.getCustomizedScriptPath !== "undefined") + customizedScriptPath = window.external.getCustomizedScriptPath() + } + catch(ex) + { + OsfMsAjaxFactory.msAjaxDebug.trace("no script override through window.external.") + } + postScriptOverrideCheckAction(customizedScriptPath) + } + else + try + { + clientEndPoint.invoke("getCustomizedScriptPathAsync",function OSF$getCustomizedScriptPathAsyncCallback(errorCode, scriptPath) + { + postScriptOverrideCheckAction(errorCode === 0 ? scriptPath : null) + },{__timeout__: 1e3}) + } + catch(ex) + { + OsfMsAjaxFactory.msAjaxDebug.trace("no script override through cross frame communication.") + } + }; + var requiresMsAjax = true; + if(requiresMsAjax && !OsfMsAjaxFactory.isMsAjaxLoaded()) + if(!(OSF._OfficeAppFactory && OSF._OfficeAppFactory && OSF._OfficeAppFactory.getLoadScriptHelper && OSF._OfficeAppFactory.getLoadScriptHelper().isScriptLoading(OSF.ConstantNames.MicrosoftAjaxId))) + OsfMsAjaxFactory.loadMsAjaxFull(function OSF$loadMSAjaxCallback() + { + if(OsfMsAjaxFactory.isMsAjaxLoaded()) + checkScriptOverride(); + else + throw"Not able to load MicrosoftAjax.js."; + }); + else + OSF._OfficeAppFactory.getLoadScriptHelper().waitForScripts([OSF.ConstantNames.MicrosoftAjaxId],checkScriptOverride); + else + checkScriptOverride() })(); -Microsoft.Office.WebExtension.EventType={}; -OSF.EventDispatch=function OSF_EventDispatch(eventTypes) +Microsoft.Office.WebExtension.EventType = {}; +OSF.EventDispatch = function OSF_EventDispatch(eventTypes) { - this._eventHandlers={}; - this._queuedEventsArgs={}; - for(var entry in eventTypes) - { - var eventType=eventTypes[entry]; - this._eventHandlers[eventType]=[]; - this._queuedEventsArgs[eventType]=[] - } + this._eventHandlers = {}; + this._objectEventHandlers = {}; + this._queuedEventsArgs = {}; + for(var entry in eventTypes) + { + var eventType = eventTypes[entry]; + var isObjectEvent = eventType == "objectDeleted" || eventType == "objectSelectionChanged" || eventType == "objectDataChanged" || eventType == "contentControlAdded"; + if(!isObjectEvent) + this._eventHandlers[eventType] = []; + else + this._objectEventHandlers[eventType] = {}; + this._queuedEventsArgs[eventType] = [] + } }; -OSF.EventDispatch.prototype={ - getSupportedEvents: function OSF_EventDispatch$getSupportedEvents() - { - var events=[]; - for(var eventName in this._eventHandlers) - events.push(eventName); - return events - }, - supportsEvent: function OSF_EventDispatch$supportsEvent(event) - { - var isSupported=false; - for(var eventName in this._eventHandlers) - if(event==eventName) - { - isSupported=true; - break - } - return isSupported - }, - hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) - { - var handlers=this._eventHandlers[eventType]; - if(handlers && handlers.length > 0) - for(var h in handlers) - if(handlers[h]===handler) - return true; - return false - }, - addEventHandler: function OSF_EventDispatch$addEventHandler(eventType, handler) - { - if(typeof handler !="function") - return false; - var handlers=this._eventHandlers[eventType]; - if(handlers && !this.hasEventHandler(eventType,handler)) - { - handlers.push(handler); - return true - } - else - return false - }, - addEventHandlerAndFireQueuedEvent: function OSF_EventDispatch$addEventHandlerAndFireQueuedEvent(eventType, handler) - { - var handlers=this._eventHandlers[eventType]; - var isFirstHandler=handlers.length==0; - var succeed=this.addEventHandler(eventType,handler); - if(isFirstHandler && succeed) - this.fireQueuedEvent(eventType); - return succeed - }, - removeEventHandler: function OSF_EventDispatch$removeEventHandler(eventType, handler) - { - var handlers=this._eventHandlers[eventType]; - if(handlers && handlers.length > 0) - for(var index=0; index < handlers.length; index++) - if(handlers[index]===handler) - { - handlers.splice(index,1); - return true - } - return false - }, - clearEventHandlers: function OSF_EventDispatch$clearEventHandlers(eventType) - { - if(typeof this._eventHandlers[eventType] !="undefined" && this._eventHandlers[eventType].length > 0) - { - this._eventHandlers[eventType]=[]; - return true - } - return false - }, - getEventHandlerCount: function OSF_EventDispatch$getEventHandlerCount(eventType) - { - return this._eventHandlers[eventType] !=undefined ? this._eventHandlers[eventType].length : -1 - }, - fireEvent: function OSF_EventDispatch$fireEvent(eventArgs) - { - if(eventArgs.type==undefined) - return false; - var eventType=eventArgs.type; - if(eventType && this._eventHandlers[eventType]) - { - var eventHandlers=this._eventHandlers[eventType]; - for(var handler in eventHandlers) - eventHandlers[handler](eventArgs); - return true - } - else - return false - }, - fireOrQueueEvent: function OSF_EventDispatch$fireOrQueueEvent(eventArgs) - { - var eventType=eventArgs.type; - if(eventType && this._eventHandlers[eventType]) - { - var eventHandlers=this._eventHandlers[eventType]; - var queuedEvents=this._queuedEventsArgs[eventType]; - if(eventHandlers.length==0) - queuedEvents.push(eventArgs); - else - this.fireEvent(eventArgs); - return true - } - else - return false - }, - fireQueuedEvent: function OSF_EventDispatch$queueEvent(eventType) - { - if(eventType && this._eventHandlers[eventType]) - { - var eventHandlers=this._eventHandlers[eventType]; - var queuedEvents=this._queuedEventsArgs[eventType]; - if(eventHandlers.length > 0) - { - var eventHandler=eventHandlers[0]; - while(queuedEvents.length > 0) - { - var eventArgs=queuedEvents.shift(); - eventHandler(eventArgs) - } - return true - } - } - return false - } +OSF.EventDispatch.prototype = { + getSupportedEvents: function OSF_EventDispatch$getSupportedEvents() + { + var events = []; + for(var eventName in this._eventHandlers) + events.push(eventName); + for(var eventName in this._objectEventHandlers) + events.push(eventName); + return events + }, + supportsEvent: function OSF_EventDispatch$supportsEvent(event) + { + for(var eventName in this._eventHandlers) + if(event == eventName) + return true; + for(var eventName in this._objectEventHandlers) + if(event == eventName) + return true; + return false + }, + hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) + { + var handlers = this._eventHandlers[eventType]; + if(handlers && handlers.length > 0) + for(var h in handlers) + if(handlers[h] === handler) + return true; + return false + }, + hasObjectEventHandler: function OSF_EventDispatch$hasObjectEventHandler(eventType, objectId, handler) + { + var handlers = this._objectEventHandlers[eventType]; + if(handlers != null) + { + var _handlers = handlers[objectId]; + for(var i = 0; _handlers != null && i < _handlers.length; i++) + if(_handlers[i] === handler) + return true + } + return false + }, + addEventHandler: function OSF_EventDispatch$addEventHandler(eventType, handler) + { + if(typeof handler != "function") + return false; + var handlers = this._eventHandlers[eventType]; + if(handlers && !this.hasEventHandler(eventType,handler)) + { + handlers.push(handler); + return true + } + else + return false + }, + addObjectEventHandler: function OSF_EventDispatch$addObjectEventHandler(eventType, objectId, handler) + { + if(typeof handler != "function") + return false; + var handlers = this._objectEventHandlers[eventType]; + if(handlers && !this.hasObjectEventHandler(eventType,objectId,handler)) + { + if(handlers[objectId] == null) + handlers[objectId] = []; + handlers[objectId].push(handler); + return true + } + return false + }, + addEventHandlerAndFireQueuedEvent: function OSF_EventDispatch$addEventHandlerAndFireQueuedEvent(eventType, handler) + { + var handlers = this._eventHandlers[eventType]; + var isFirstHandler = handlers.length == 0; + var succeed = this.addEventHandler(eventType,handler); + if(isFirstHandler && succeed) + this.fireQueuedEvent(eventType); + return succeed + }, + removeEventHandler: function OSF_EventDispatch$removeEventHandler(eventType, handler) + { + var handlers = this._eventHandlers[eventType]; + if(handlers && handlers.length > 0) + for(var index = 0; index < handlers.length; index++) + if(handlers[index] === handler) + { + handlers.splice(index,1); + return true + } + return false + }, + removeObjectEventHandler: function OSF_EventDispatch$removeObjectEventHandler(eventType, objectId, handler) + { + var handlers = this._objectEventHandlers[eventType]; + if(handlers != null) + { + var _handlers = handlers[objectId]; + for(var i = 0; _handlers != null && i < _handlers.length; i++) + if(_handlers[i] === handler) + { + _handlers.splice(i,1); + return true + } + } + return false + }, + clearEventHandlers: function OSF_EventDispatch$clearEventHandlers(eventType) + { + if(typeof this._eventHandlers[eventType] != "undefined" && this._eventHandlers[eventType].length > 0) + { + this._eventHandlers[eventType] = []; + return true + } + return false + }, + clearObjectEventHandlers: function OSF_EventDispatch$clearObjectEventHandlers(eventType, objectId) + { + if(this._objectEventHandlers[eventType] != null && this._objectEventHandlers[eventType][objectId] != null) + { + this._objectEventHandlers[eventType][objectId] = []; + return true + } + return false + }, + getEventHandlerCount: function OSF_EventDispatch$getEventHandlerCount(eventType) + { + return this._eventHandlers[eventType] != undefined ? this._eventHandlers[eventType].length : -1 + }, + getObjectEventHandlerCount: function OSF_EventDispatch$getObjectEventHandlerCount(eventType, objectId) + { + if(this._objectEventHandlers[eventType] == null || this._objectEventHandlers[eventType][objectId] == null) + return 0; + return this._objectEventHandlers[eventType][objectId].length + }, + fireEvent: function OSF_EventDispatch$fireEvent(eventArgs) + { + if(eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if(eventType && this._eventHandlers[eventType]) + { + var eventHandlers = this._eventHandlers[eventType]; + for(var handler in eventHandlers) + eventHandlers[handler](eventArgs); + return true + } + else + return false + }, + fireObjectEvent: function OSF_EventDispatch$fireObjectEvent(objectId, eventArgs) + { + if(eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if(eventType && this._objectEventHandlers[eventType]) + { + var eventHandlers = this._objectEventHandlers[eventType]; + var _handlers = eventHandlers[objectId]; + if(_handlers != null) + { + for(var i = 0; i < _handlers.length; i++) + _handlers[i](eventArgs); + return true + } + } + return false + }, + fireOrQueueEvent: function OSF_EventDispatch$fireOrQueueEvent(eventArgs) + { + var eventType = eventArgs.type; + if(eventType && this._eventHandlers[eventType]) + { + var eventHandlers = this._eventHandlers[eventType]; + var queuedEvents = this._queuedEventsArgs[eventType]; + if(eventHandlers.length == 0) + queuedEvents.push(eventArgs); + else + this.fireEvent(eventArgs); + return true + } + else + return false + }, + fireQueuedEvent: function OSF_EventDispatch$queueEvent(eventType) + { + if(eventType && this._eventHandlers[eventType]) + { + var eventHandlers = this._eventHandlers[eventType]; + var queuedEvents = this._queuedEventsArgs[eventType]; + if(eventHandlers.length > 0) + { + var eventHandler = eventHandlers[0]; + while(queuedEvents.length > 0) + { + var eventArgs = queuedEvents.shift(); + eventHandler(eventArgs) + } + return true + } + } + return false + }, + clearQueuedEvent: function OSF_EventDispatch$clearQueuedEvent(eventType) + { + if(eventType && this._eventHandlers[eventType]) + { + var queuedEvents = this._queuedEventsArgs[eventType]; + if(queuedEvents) + this._queuedEventsArgs[eventType] = [] + } + } }; -OSF.DDA.OMFactory=OSF.DDA.OMFactory || {}; -OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEventArgs(eventType, target, eventProperties) +OSF.DDA.OMFactory = OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureEventArgs = function OSF_DDA_OMFactory$manufactureEventArgs(eventType, target, eventProperties) { - var args; - switch(eventType) - { - case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged: - args=new OSF.DDA.DocumentSelectionChangedEventArgs(target); - break; - case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged: - args=new OSF.DDA.BindingSelectionChangedEventArgs(this.manufactureBinding(eventProperties,target.document),eventProperties[OSF.DDA.PropertyDescriptors.Subset]); - break; - case Microsoft.Office.WebExtension.EventType.BindingDataChanged: - args=new OSF.DDA.BindingDataChangedEventArgs(this.manufactureBinding(eventProperties,target.document)); - break; - case Microsoft.Office.WebExtension.EventType.SettingsChanged: - args=new OSF.DDA.SettingsChangedEventArgs(target); - break; - case Microsoft.Office.WebExtension.EventType.ActiveViewChanged: - args=new OSF.DDA.ActiveViewChangedEventArgs(eventProperties); - break; - case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged: - args=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(eventProperties); - break; - case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged: - args=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(eventProperties); - break; - case Microsoft.Office.WebExtension.EventType.AppCommandInvoked: - args=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(eventProperties); - break; - case Microsoft.Office.WebExtension.EventType.DataNodeInserted: - args=new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]),eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); - break; - case Microsoft.Office.WebExtension.EventType.DataNodeReplaced: - args=new OSF.DDA.NodeReplacedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]),eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); - break; - case Microsoft.Office.WebExtension.EventType.DataNodeDeleted: - args=new OSF.DDA.NodeDeletedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); - break; - case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged: - args=new OSF.DDA.TaskSelectionChangedEventArgs(target); - break; - case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged: - args=new OSF.DDA.ResourceSelectionChangedEventArgs(target); - break; - case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged: - args=new OSF.DDA.ViewSelectionChangedEventArgs(target); - break; - case Microsoft.Office.WebExtension.EventType.DialogMessageReceived: - args=new OSF.DDA.DialogEventArgs(eventProperties); - break; - case Microsoft.Office.WebExtension.EventType.OlkItemSelectedChanged: - args=new OSF.DDA.OlkItemSelectedChangedEventArgs(target); - break; - default: - throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,eventType)); - } - return args + var args; + switch(eventType) + { + case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged: + args = new OSF.DDA.DocumentSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged: + args = new OSF.DDA.BindingSelectionChangedEventArgs(this.manufactureBinding(eventProperties,target.document),eventProperties[OSF.DDA.PropertyDescriptors.Subset]); + break; + case Microsoft.Office.WebExtension.EventType.BindingDataChanged: + args = new OSF.DDA.BindingDataChangedEventArgs(this.manufactureBinding(eventProperties,target.document)); + break; + case Microsoft.Office.WebExtension.EventType.SettingsChanged: + args = new OSF.DDA.SettingsChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ActiveViewChanged: + args = new OSF.DDA.ActiveViewChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged: + args = new OSF.DDA.Theming.OfficeThemeChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged: + args = new OSF.DDA.Theming.DocumentThemeChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.AppCommandInvoked: + args = OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.ObjectDeleted: + case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged: + case Microsoft.Office.WebExtension.EventType.ObjectDataChanged: + case Microsoft.Office.WebExtension.EventType.ContentControlAdded: + args = new OSF.DDA.ObjectEventArgs(eventType,eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); + break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args = new OSF.DDA.RichApiMessageEventArgs(eventType,eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeInserted: + args = new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]),eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeReplaced: + args = new OSF.DDA.NodeReplacedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]),eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeDeleted: + args = new OSF.DDA.NodeDeletedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged: + args = new OSF.DDA.TaskSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged: + args = new OSF.DDA.ResourceSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged: + args = new OSF.DDA.ViewSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.DialogMessageReceived: + args = new OSF.DDA.DialogEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived: + args = new OSF.DDA.DialogParentEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.ItemChanged: + if(OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") + { + args = new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); + target.initialize(args["initialData"]); + if(OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "win32") + target.setCurrentItemNumber(args["itemNumber"].itemNumber) + } + else + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,eventType)); + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if(OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") + args = new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + else + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,eventType)); + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if(OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") + args = new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); + else + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,eventType)); + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,eventType)); + } + return args }; OSF.DDA.AsyncMethodNames.addNames({ - AddHandlerAsync: "addHandlerAsync", - RemoveHandlerAsync: "removeHandlerAsync" + AddHandlerAsync: "addHandlerAsync", + RemoveHandlerAsync: "removeHandlerAsync" }); OSF.DDA.AsyncMethodCalls.define({ - method: OSF.DDA.AsyncMethodNames.AddHandlerAsync, - requiredArguments: [{ - name: Microsoft.Office.WebExtension.Parameters.EventType, - "enum": Microsoft.Office.WebExtension.EventType, - verify: function(eventType, caller, eventDispatch) - { - return eventDispatch.supportsEvent(eventType) - } - },{ - name: Microsoft.Office.WebExtension.Parameters.Handler, - types: ["function"] - }], - supportedOptions: [], - privateStateCallbacks: [] + method: OSF.DDA.AsyncMethodNames.AddHandlerAsync, + requiredArguments: [{ + name: Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + verify: function(eventType, caller, eventDispatch) + { + return eventDispatch.supportsEvent(eventType) + } + },{ + name: Microsoft.Office.WebExtension.Parameters.Handler, + types: ["function"] + }], + supportedOptions: [], + privateStateCallbacks: [] }); OSF.DDA.AsyncMethodCalls.define({ - method: OSF.DDA.AsyncMethodNames.RemoveHandlerAsync, - requiredArguments: [{ - name: Microsoft.Office.WebExtension.Parameters.EventType, - "enum": Microsoft.Office.WebExtension.EventType, - verify: function(eventType, caller, eventDispatch) - { - return eventDispatch.supportsEvent(eventType) - } - }], - supportedOptions: [{ - name: Microsoft.Office.WebExtension.Parameters.Handler, - value: { - types: ["function","object"], - defaultValue: null - } - }], - privateStateCallbacks: [] + method: OSF.DDA.AsyncMethodNames.RemoveHandlerAsync, + requiredArguments: [{ + name: Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + verify: function(eventType, caller, eventDispatch) + { + return eventDispatch.supportsEvent(eventType) + } + }], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Handler, + value: { + types: ["function","object"], + defaultValue: null + } + }], + privateStateCallbacks: [] }); -OSF.DialogShownStatus={ - hasDialogShown: false, - isWindowDialog: false +OSF.DialogShownStatus = { + hasDialogShown: false, + isWindowDialog: false }; OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent: "DialogMessageReceivedEvent"}); OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ - DialogMessageReceived: "dialogMessageReceived", - DialogEventReceived: "dialogEventReceived" + DialogMessageReceived: "dialogMessageReceived", + DialogEventReceived: "dialogEventReceived" }); OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{ - MessageType: "messageType", - MessageContent: "messageContent" + MessageType: "messageType", + MessageContent: "messageContent" }); -OSF.DDA.DialogEventType={}; +OSF.DDA.DialogEventType = {}; OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{ - DialogClosed: "dialogClosed", - NavigationFailed: "naviationFailed" + DialogClosed: "dialogClosed", + NavigationFailed: "naviationFailed" }); OSF.DDA.AsyncMethodNames.addNames({ - DisplayDialogAsync: "displayDialogAsync", - CloseAsync: "close" + DisplayDialogAsync: "displayDialogAsync", + CloseAsync: "close" }); OSF.DDA.SyncMethodNames.addNames({ - MessageParent: "messageParent", - AddMessageHandler: "addEventHandler" + MessageParent: "messageParent", + AddMessageHandler: "addEventHandler", + SendMessage: "sendMessage" }); -OSF.DDA.UI.ParentUI=function OSF_DDA_ParentUI() +OSF.DDA.UI.ParentUI = function OSF_DDA_ParentUI() { - var eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived]); - var openDialogName=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName; - var target=this; - if(!target[openDialogName]) - OSF.OUtil.defineEnumerableProperty(target,openDialogName,{value: function() - { - var openDialog=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog]; - openDialog(arguments,eventDispatch,target) - }}); - OSF.OUtil.finalizeProperties(this) + var eventDispatch = new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]); + var openDialogName = OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName; + var target = this; + if(!target[openDialogName]) + OSF.OUtil.defineEnumerableProperty(target,openDialogName,{value: function() + { + var openDialog = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog]; + openDialog(arguments,eventDispatch,target) + }}); + OSF.OUtil.finalizeProperties(this) }; -OSF.DDA.UI.ChildUI=function OSF_DDA_ChildUI() +OSF.DDA.UI.ChildUI = function OSF_DDA_ChildUI(isPopupWindow) { - var messageParentName=OSF.DDA.SyncMethodNames.MessageParent.displayName; - var target=this; - if(!target[messageParentName]) - OSF.OUtil.defineEnumerableProperty(target,messageParentName,{value: function() - { - var messageParent=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent]; - return messageParent(arguments,target) - }}); - OSF.OUtil.finalizeProperties(this) + var messageParentName = OSF.DDA.SyncMethodNames.MessageParent.displayName; + var target = this; + if(!target[messageParentName]) + OSF.OUtil.defineEnumerableProperty(target,messageParentName,{value: function() + { + var messageParent = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent]; + return messageParent(arguments,target) + }}); + var addEventHandler = OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; + if(!target[addEventHandler] && typeof OSF.DialogParentMessageEventDispatch != "undefined") + OSF.DDA.DispIdHost.addEventSupport(target,OSF.DialogParentMessageEventDispatch,isPopupWindow); + OSF.OUtil.finalizeProperties(this) }; -OSF.DialogHandler=function OSF_DialogHandler(){}; -OSF.DDA.DialogEventArgs=function OSF_DDA_DialogEventArgs(message) +OSF.DialogHandler = function OSF_DialogHandler(){}; +OSF.DDA.DialogEventArgs = function OSF_DDA_DialogEventArgs(message) { - if(message[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived) - OSF.OUtil.defineEnumerableProperties(this,{ - type: {value: Microsoft.Office.WebExtension.EventType.DialogMessageReceived}, - message: {value: message[OSF.DDA.PropertyDescriptors.MessageContent]} - }); - else - OSF.OUtil.defineEnumerableProperties(this,{ - type: {value: Microsoft.Office.WebExtension.EventType.DialogEventReceived}, - error: {value: message[OSF.DDA.PropertyDescriptors.MessageType]} - }) + if(message[OSF.DDA.PropertyDescriptors.MessageType] == OSF.DialogMessageType.DialogMessageReceived) + OSF.OUtil.defineEnumerableProperties(this,{ + type: {value: Microsoft.Office.WebExtension.EventType.DialogMessageReceived}, + message: {value: message[OSF.DDA.PropertyDescriptors.MessageContent]} + }); + else + OSF.OUtil.defineEnumerableProperties(this,{ + type: {value: Microsoft.Office.WebExtension.EventType.DialogEventReceived}, + error: {value: message[OSF.DDA.PropertyDescriptors.MessageType]} + }) +}; +OSF.DDA.DialogParentEventArgs = function OSF_DDA_DialogParentEventArgs(message) +{ + OSF.OUtil.defineEnumerableProperties(this,{ + type: {value: Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived}, + message: {value: message[OSF.DDA.PropertyDescriptors.MessageContent]} + }) }; OSF.DDA.AsyncMethodCalls.define({ - method: OSF.DDA.AsyncMethodNames.DisplayDialogAsync, - requiredArguments: [{ - name: Microsoft.Office.WebExtension.Parameters.Url, - types: ["string"] - }], - supportedOptions: [{ - name: Microsoft.Office.WebExtension.Parameters.Width, - value: { - types: ["number"], - defaultValue: 99 - } - },{ - name: Microsoft.Office.WebExtension.Parameters.Height, - value: { - types: ["number"], - defaultValue: 99 - } - },{ - name: Microsoft.Office.WebExtension.Parameters.RequireHTTPs, - value: { - types: ["boolean"], - defaultValue: true - } - },{ - name: Microsoft.Office.WebExtension.Parameters.DisplayInIframe, - value: { - types: ["boolean"], - defaultValue: true - } - }], - privateStateCallbacks: [], - onSucceeded: function(args, caller, callArgs) - { - var targetId=args[Microsoft.Office.WebExtension.Parameters.Id]; - var eventDispatch=args[Microsoft.Office.WebExtension.Parameters.Data]; - var dialog=new OSF.DialogHandler; - var closeDialog=OSF.DDA.AsyncMethodNames.CloseAsync.displayName; - OSF.OUtil.defineEnumerableProperty(dialog,closeDialog,{value: function() - { - var closeDialogfunction=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog]; - closeDialogfunction(arguments,targetId,eventDispatch,dialog) - }}); - var addHandler=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; - OSF.OUtil.defineEnumerableProperty(dialog,addHandler,{value: function() - { - var syncMethodCall=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id]; - var callArgs=syncMethodCall.verifyAndExtractCall(arguments,dialog,eventDispatch); - var eventType=callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; - var handler=callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; - return eventDispatch.addEventHandlerAndFireQueuedEvent(eventType,handler) - }}); - return dialog - }, - checkCallArgs: function(callArgs, caller, stateInfo) - { - if(callArgs[Microsoft.Office.WebExtension.Parameters.Width] <=0) - callArgs[Microsoft.Office.WebExtension.Parameters.Width]=1; - if(callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) - callArgs[Microsoft.Office.WebExtension.Parameters.Width]=99; - if(callArgs[Microsoft.Office.WebExtension.Parameters.Height] <=0) - callArgs[Microsoft.Office.WebExtension.Parameters.Height]=1; - if(callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) - callArgs[Microsoft.Office.WebExtension.Parameters.Height]=99; - return callArgs - } + method: OSF.DDA.AsyncMethodNames.DisplayDialogAsync, + requiredArguments: [{ + name: Microsoft.Office.WebExtension.Parameters.Url, + types: ["string"] + }], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Width, + value: { + types: ["number"], + defaultValue: 99 + } + },{ + name: Microsoft.Office.WebExtension.Parameters.Height, + value: { + types: ["number"], + defaultValue: 99 + } + },{ + name: Microsoft.Office.WebExtension.Parameters.RequireHTTPs, + value: { + types: ["boolean"], + defaultValue: true + } + },{ + name: Microsoft.Office.WebExtension.Parameters.DisplayInIframe, + value: { + types: ["boolean"], + defaultValue: false + } + },{ + name: Microsoft.Office.WebExtension.Parameters.HideTitle, + value: { + types: ["boolean"], + defaultValue: false + } + },{ + name: Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels, + value: { + types: ["boolean"], + defaultValue: false + } + }], + privateStateCallbacks: [], + onSucceeded: function(args, caller, callArgs) + { + var targetId = args[Microsoft.Office.WebExtension.Parameters.Id]; + var eventDispatch = args[Microsoft.Office.WebExtension.Parameters.Data]; + var dialog = new OSF.DialogHandler; + var closeDialog = OSF.DDA.AsyncMethodNames.CloseAsync.displayName; + OSF.OUtil.defineEnumerableProperty(dialog,closeDialog,{value: function() + { + var closeDialogfunction = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog]; + closeDialogfunction(arguments,targetId,eventDispatch,dialog) + }}); + var addHandler = OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; + OSF.OUtil.defineEnumerableProperty(dialog,addHandler,{value: function() + { + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(arguments,dialog,eventDispatch); + var eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + var handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + return eventDispatch.addEventHandlerAndFireQueuedEvent(eventType,handler) + }}); + var sendMessage = OSF.DDA.SyncMethodNames.SendMessage.displayName; + OSF.OUtil.defineEnumerableProperty(dialog,sendMessage,{value: function() + { + var execute = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; + return execute(arguments,eventDispatch,dialog) + }}); + return dialog + }, + checkCallArgs: function(callArgs, caller, stateInfo) + { + if(callArgs[Microsoft.Office.WebExtension.Parameters.Width] <= 0) + callArgs[Microsoft.Office.WebExtension.Parameters.Width] = 1; + if(!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) + callArgs[Microsoft.Office.WebExtension.Parameters.Width] = 99; + if(callArgs[Microsoft.Office.WebExtension.Parameters.Height] <= 0) + callArgs[Microsoft.Office.WebExtension.Parameters.Height] = 1; + if(!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) + callArgs[Microsoft.Office.WebExtension.Parameters.Height] = 99; + if(!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) + callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs] = true; + return callArgs + } }); OSF.DDA.AsyncMethodCalls.define({ - method: OSF.DDA.AsyncMethodNames.CloseAsync, - requiredArguments: [], - supportedOptions: [], - privateStateCallbacks: [] + method: OSF.DDA.AsyncMethodNames.CloseAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [] +}); +OSF.DDA.SyncMethodCalls.define({ + method: OSF.DDA.SyncMethodNames.MessageParent, + requiredArguments: [{ + name: Microsoft.Office.WebExtension.Parameters.MessageToParent, + types: ["string","number","boolean"] + }], + supportedOptions: [] }); OSF.DDA.SyncMethodCalls.define({ - method: OSF.DDA.SyncMethodNames.MessageParent, - requiredArguments: [{ - name: Microsoft.Office.WebExtension.Parameters.MessageToParent, - types: ["string","number","boolean"] - }], - supportedOptions: [] + method: OSF.DDA.SyncMethodNames.AddMessageHandler, + requiredArguments: [{ + name: Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + verify: function(eventType, caller, eventDispatch) + { + return eventDispatch.supportsEvent(eventType) + } + },{ + name: Microsoft.Office.WebExtension.Parameters.Handler, + types: ["function"] + }], + supportedOptions: [] }); OSF.DDA.SyncMethodCalls.define({ - method: OSF.DDA.SyncMethodNames.AddMessageHandler, - requiredArguments: [{ - name: Microsoft.Office.WebExtension.Parameters.EventType, - "enum": Microsoft.Office.WebExtension.EventType, - verify: function(eventType, caller, eventDispatch) - { - return eventDispatch.supportsEvent(eventType) - } - },{ - name: Microsoft.Office.WebExtension.Parameters.Handler, - types: ["function"] - }], - supportedOptions: [] + method: OSF.DDA.SyncMethodNames.SendMessage, + requiredArguments: [{ + name: Microsoft.Office.WebExtension.Parameters.MessageContent, + types: ["string"] + }], + supportedOptions: [], + privateStateCallbacks: [] }); -OSF.DDA.SafeArray.Delegate.openDialog=function OSF_DDA_SafeArray_Delegate$OpenDialog(args) +OSF.DDA.SafeArray.Delegate.openDialog = function OSF_DDA_SafeArray_Delegate$OpenDialog(args) { - try - { - if(args.onCalling) - args.onCalling(); - var callback=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true,args); - OSF.ClientHostController.openDialog(args.dispId,args.targetId,function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) - { - if(args.onEvent) - args.onEvent(payload); - if(OSF.AppTelemetry) - OSF.AppTelemetry.onEventDone(args.dispId) - },callback) - } - catch(ex) - { - OSF.DDA.SafeArray.Delegate._onException(ex,args) - } + try + { + if(args.onCalling) + args.onCalling(); + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true,args); + OSF.ClientHostController.openDialog(args.dispId,args.targetId,function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) + { + if(args.onEvent) + args.onEvent(payload); + if(OSF.AppTelemetry) + OSF.AppTelemetry.onEventDone(args.dispId) + },callback) + } + catch(ex) + { + OSF.DDA.SafeArray.Delegate._onException(ex,args) + } }; -OSF.DDA.SafeArray.Delegate.closeDialog=function OSF_DDA_SafeArray_Delegate$CloseDialog(args) +OSF.DDA.SafeArray.Delegate.closeDialog = function OSF_DDA_SafeArray_Delegate$CloseDialog(args) { - if(args.onCalling) - args.onCalling(); - var callback=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false,args); - try - { - OSF.ClientHostController.closeDialog(args.dispId,args.targetId,callback) - } - catch(ex) - { - OSF.DDA.SafeArray.Delegate._onException(ex,args) - } + if(args.onCalling) + args.onCalling(); + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false,args); + try + { + OSF.ClientHostController.closeDialog(args.dispId,args.targetId,callback) + } + catch(ex) + { + OSF.DDA.SafeArray.Delegate._onException(ex,args) + } }; -OSF.DDA.SafeArray.Delegate.messageParent=function OSF_DDA_SafeArray_Delegate$MessageParent(args) +OSF.DDA.SafeArray.Delegate.messageParent = function OSF_DDA_SafeArray_Delegate$MessageParent(args) { - try - { - if(args.onCalling) - args.onCalling(); - var startTime=(new Date).getTime(); - var result=OSF.ClientHostController.messageParent(args.hostCallArgs); - if(args.onReceiving) - args.onReceiving(); - if(OSF.AppTelemetry) - OSF.AppTelemetry.onMethodDone(args.dispId,args.hostCallArgs,Math.abs((new Date).getTime() - startTime),result); - return result - } - catch(ex) - { - return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(ex) - } + try + { + if(args.onCalling) + args.onCalling(); + var startTime = (new Date).getTime(); + var result = OSF.ClientHostController.messageParent(args.hostCallArgs); + if(args.onReceiving) + args.onReceiving(); + if(OSF.AppTelemetry) + OSF.AppTelemetry.onMethodDone(args.dispId,args.hostCallArgs,Math.abs((new Date).getTime() - startTime),result); + return result + } + catch(ex) + { + return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(ex) + } }; OSF.DDA.SafeArray.Delegate.ParameterMap.define({ - type: OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent, - fromHost: [{ - name: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, - value: OSF.DDA.SafeArray.Delegate.ParameterMap.self - }], - isComplexType: true + type: OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent, + fromHost: [{ + name: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, + value: OSF.DDA.SafeArray.Delegate.ParameterMap.self + }], + isComplexType: true }); OSF.DDA.SafeArray.Delegate.ParameterMap.define({ - type: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, - fromHost: [{ - name: OSF.DDA.PropertyDescriptors.MessageType, - value: 0 - },{ - name: OSF.DDA.PropertyDescriptors.MessageContent, - value: 1 - }], - isComplexType: true + type: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, + fromHost: [{ + name: OSF.DDA.PropertyDescriptors.MessageType, + value: 0 + },{ + name: OSF.DDA.PropertyDescriptors.MessageContent, + value: 1 + }], + isComplexType: true }); -OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{OlkItemSelectedChanged: "olkItemSelectedChanged"}); -OSF.DDA.OlkItemSelectedChangedEventArgs=function OSF_DDA_OlkItemSelectedChangedEventArgs(mailboxInstance) +OSF.DDA.SafeArray.Delegate.sendMessage = function OSF_DDA_SafeArray_Delegate$SendMessage(args) +{ + try + { + if(args.onCalling) + args.onCalling(); + var startTime = (new Date).getTime(); + var result = OSF.ClientHostController.sendMessage(args.hostCallArgs); + if(args.onReceiving) + args.onReceiving(); + return result + } + catch(ex) + { + return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(ex) + } +}; +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ItemChanged: "olkItemSelectedChanged"}); +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{OlkItemSelectedData: "OlkItemSelectedData"}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{RecipientsChanged: "olkRecipientsChanged"}); +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{OlkRecipientsData: "OlkRecipientsData"}); +OSF.DDA.OlkRecipientsChangedEventArgs = function OSF_DDA_OlkRecipientsChangedEventArgs(eventData) { - OSF.OUtil.defineEnumerableProperties(this,{ - type: {value: Microsoft.Office.WebExtension.EventType.OlkItemSelectedChanged}, - mailbox: {value: mailboxInstance} - }) + var changedRecipientFields = eventData[OSF.DDA.EventDescriptors.OlkRecipientsData][0]; + if(changedRecipientFields === "") + changedRecipientFields = null; + OSF.OUtil.defineEnumerableProperties(this,{ + type: {value: Microsoft.Office.WebExtension.EventType.RecipientsChanged}, + changedRecipientFields: {value: JSON.parse(changedRecipientFields)} + }) }; -OSF.DDA.SafeArray.Delegate.ParameterMap.define({type: OSF.DDA.EventDispId.dispidOlkItemSelectedChangedEvent}); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppointmentTimeChanged: "olkAppointmentTimeChanged"}); +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{OlkAppointmentTimeChangedData: "OlkAppointmentTimeChangedData"}); +OSF.DDA.OlkAppointmentTimeChangedEventArgs = function OSF_DDA_OlkAppointmentTimeChangedEventArgs(eventData) +{ + var appointmentTimeString = eventData[OSF.DDA.EventDescriptors.OlkAppointmentTimeChangedData][0]; + var start; + var end; + try + { + var appointmentTime = JSON.parse(appointmentTimeString); + start = new Date(appointmentTime.start).toISOString(); + end = new Date(appointmentTime.end).toISOString() + } + catch(e) + { + start = null; + end = null + } + OSF.OUtil.defineEnumerableProperties(this,{ + type: {value: Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged}, + start: {value: start}, + end: {value: end} + }) +}; +OSF.DDA.OlkItemSelectedChangedEventArgs = function OSF_DDA_OlkItemSelectedChangedEventArgs(eventData) +{ + var initialDataSource = eventData[OSF.DDA.EventDescriptors.OlkItemSelectedData][0]; + if(initialDataSource === "") + initialDataSource = null; + OSF.OUtil.defineEnumerableProperties(this,{ + type: {value: Microsoft.Office.WebExtension.EventType.ItemChanged}, + initialData: {value: JSON.parse(initialDataSource)}, + itemNumber: {value: JSON.parse(eventData[OSF.DDA.EventDescriptors.OlkItemSelectedData][1])} + }) +}; +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidOlkItemSelectedChangedEvent, + fromHost: [{ + name: OSF.DDA.EventDescriptors.OlkItemSelectedData, + value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData + }], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidOlkRecipientsChangedEvent, + fromHost: [{ + name: OSF.DDA.EventDescriptors.OlkRecipientsData, + value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData + }], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidOlkAppointmentTimeChangedEvent, + fromHost: [{ + name: OSF.DDA.EventDescriptors.OlkAppointmentTimeChangedData, + value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData + }], + isComplexType: true +}); var OSFLog; (function(OSFLog) { - var BaseUsageData=function() - { - function BaseUsageData(table) - { - this._table=table; - this._fields={} - } - Object.defineProperty(BaseUsageData.prototype,"Fields",{ - get: function() - { - return this._fields - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(BaseUsageData.prototype,"Table",{ - get: function() - { - return this._table - }, - enumerable: true, - configurable: true - }); - BaseUsageData.prototype.SerializeFields=function(){}; - BaseUsageData.prototype.SetSerializedField=function(key, value) - { - if(typeof value !=="undefined" && value !==null) - this._serializedFields[key]=value.toString() - }; - BaseUsageData.prototype.SerializeRow=function() - { - this._serializedFields={}; - this.SetSerializedField("Table",this._table); - this.SerializeFields(); - return JSON.stringify(this._serializedFields) - }; - return BaseUsageData - }(); - OSFLog.BaseUsageData=BaseUsageData; - var AppActivatedUsageData=function(_super) - { - __extends(AppActivatedUsageData,_super); - function AppActivatedUsageData() - { - _super.call(this,"AppActivated") - } - Object.defineProperty(AppActivatedUsageData.prototype,"CorrelationId",{ - get: function() - { - return this.Fields["CorrelationId"] - }, - set: function(value) - { - this.Fields["CorrelationId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"SessionId",{ - get: function() - { - return this.Fields["SessionId"] - }, - set: function(value) - { - this.Fields["SessionId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"AppId",{ - get: function() - { - return this.Fields["AppId"] - }, - set: function(value) - { - this.Fields["AppId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"AppInstanceId",{ - get: function() - { - return this.Fields["AppInstanceId"] - }, - set: function(value) - { - this.Fields["AppInstanceId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"AppURL",{ - get: function() - { - return this.Fields["AppURL"] - }, - set: function(value) - { - this.Fields["AppURL"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"AssetId",{ - get: function() - { - return this.Fields["AssetId"] - }, - set: function(value) - { - this.Fields["AssetId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"Browser",{ - get: function() - { - return this.Fields["Browser"] - }, - set: function(value) - { - this.Fields["Browser"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"UserId",{ - get: function() - { - return this.Fields["UserId"] - }, - set: function(value) - { - this.Fields["UserId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"Host",{ - get: function() - { - return this.Fields["Host"] - }, - set: function(value) - { - this.Fields["Host"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"HostVersion",{ - get: function() - { - return this.Fields["HostVersion"] - }, - set: function(value) - { - this.Fields["HostVersion"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"ClientId",{ - get: function() - { - return this.Fields["ClientId"] - }, - set: function(value) - { - this.Fields["ClientId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"AppSizeWidth",{ - get: function() - { - return this.Fields["AppSizeWidth"] - }, - set: function(value) - { - this.Fields["AppSizeWidth"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"AppSizeHeight",{ - get: function() - { - return this.Fields["AppSizeHeight"] - }, - set: function(value) - { - this.Fields["AppSizeHeight"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"Message",{ - get: function() - { - return this.Fields["Message"] - }, - set: function(value) - { - this.Fields["Message"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"DocUrl",{ - get: function() - { - return this.Fields["DocUrl"] - }, - set: function(value) - { - this.Fields["DocUrl"]=value - }, - enumerable: true, - configurable: true - }); - AppActivatedUsageData.prototype.SerializeFields=function() - { - this.SetSerializedField("CorrelationId",this.CorrelationId); - this.SetSerializedField("SessionId",this.SessionId); - this.SetSerializedField("AppId",this.AppId); - this.SetSerializedField("AppInstanceId",this.AppInstanceId); - this.SetSerializedField("AppURL",this.AppURL); - this.SetSerializedField("AssetId",this.AssetId); - this.SetSerializedField("Browser",this.Browser); - this.SetSerializedField("UserId",this.UserId); - this.SetSerializedField("Host",this.Host); - this.SetSerializedField("HostVersion",this.HostVersion); - this.SetSerializedField("ClientId",this.ClientId); - this.SetSerializedField("AppSizeWidth",this.AppSizeWidth); - this.SetSerializedField("AppSizeHeight",this.AppSizeHeight); - this.SetSerializedField("Message",this.Message); - this.SetSerializedField("DocUrl",this.DocUrl) - }; - return AppActivatedUsageData - }(BaseUsageData); - OSFLog.AppActivatedUsageData=AppActivatedUsageData; - var ScriptLoadUsageData=function(_super) - { - __extends(ScriptLoadUsageData,_super); - function ScriptLoadUsageData() - { - _super.call(this,"ScriptLoad") - } - Object.defineProperty(ScriptLoadUsageData.prototype,"CorrelationId",{ - get: function() - { - return this.Fields["CorrelationId"] - }, - set: function(value) - { - this.Fields["CorrelationId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ScriptLoadUsageData.prototype,"SessionId",{ - get: function() - { - return this.Fields["SessionId"] - }, - set: function(value) - { - this.Fields["SessionId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ScriptLoadUsageData.prototype,"ScriptId",{ - get: function() - { - return this.Fields["ScriptId"] - }, - set: function(value) - { - this.Fields["ScriptId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ScriptLoadUsageData.prototype,"StartTime",{ - get: function() - { - return this.Fields["StartTime"] - }, - set: function(value) - { - this.Fields["StartTime"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ScriptLoadUsageData.prototype,"ResponseTime",{ - get: function() - { - return this.Fields["ResponseTime"] - }, - set: function(value) - { - this.Fields["ResponseTime"]=value - }, - enumerable: true, - configurable: true - }); - ScriptLoadUsageData.prototype.SerializeFields=function() - { - this.SetSerializedField("CorrelationId",this.CorrelationId); - this.SetSerializedField("SessionId",this.SessionId); - this.SetSerializedField("ScriptId",this.ScriptId); - this.SetSerializedField("StartTime",this.StartTime); - this.SetSerializedField("ResponseTime",this.ResponseTime) - }; - return ScriptLoadUsageData - }(BaseUsageData); - OSFLog.ScriptLoadUsageData=ScriptLoadUsageData; - var AppClosedUsageData=function(_super) - { - __extends(AppClosedUsageData,_super); - function AppClosedUsageData() - { - _super.call(this,"AppClosed") - } - Object.defineProperty(AppClosedUsageData.prototype,"CorrelationId",{ - get: function() - { - return this.Fields["CorrelationId"] - }, - set: function(value) - { - this.Fields["CorrelationId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppClosedUsageData.prototype,"SessionId",{ - get: function() - { - return this.Fields["SessionId"] - }, - set: function(value) - { - this.Fields["SessionId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppClosedUsageData.prototype,"FocusTime",{ - get: function() - { - return this.Fields["FocusTime"] - }, - set: function(value) - { - this.Fields["FocusTime"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppClosedUsageData.prototype,"AppSizeFinalWidth",{ - get: function() - { - return this.Fields["AppSizeFinalWidth"] - }, - set: function(value) - { - this.Fields["AppSizeFinalWidth"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppClosedUsageData.prototype,"AppSizeFinalHeight",{ - get: function() - { - return this.Fields["AppSizeFinalHeight"] - }, - set: function(value) - { - this.Fields["AppSizeFinalHeight"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppClosedUsageData.prototype,"OpenTime",{ - get: function() - { - return this.Fields["OpenTime"] - }, - set: function(value) - { - this.Fields["OpenTime"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppClosedUsageData.prototype,"CloseMethod",{ - get: function() - { - return this.Fields["CloseMethod"] - }, - set: function(value) - { - this.Fields["CloseMethod"]=value - }, - enumerable: true, - configurable: true - }); - AppClosedUsageData.prototype.SerializeFields=function() - { - this.SetSerializedField("CorrelationId",this.CorrelationId); - this.SetSerializedField("SessionId",this.SessionId); - this.SetSerializedField("FocusTime",this.FocusTime); - this.SetSerializedField("AppSizeFinalWidth",this.AppSizeFinalWidth); - this.SetSerializedField("AppSizeFinalHeight",this.AppSizeFinalHeight); - this.SetSerializedField("OpenTime",this.OpenTime); - this.SetSerializedField("CloseMethod",this.CloseMethod) - }; - return AppClosedUsageData - }(BaseUsageData); - OSFLog.AppClosedUsageData=AppClosedUsageData; - var APIUsageUsageData=function(_super) - { - __extends(APIUsageUsageData,_super); - function APIUsageUsageData() - { - _super.call(this,"APIUsage") - } - Object.defineProperty(APIUsageUsageData.prototype,"CorrelationId",{ - get: function() - { - return this.Fields["CorrelationId"] - }, - set: function(value) - { - this.Fields["CorrelationId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(APIUsageUsageData.prototype,"SessionId",{ - get: function() - { - return this.Fields["SessionId"] - }, - set: function(value) - { - this.Fields["SessionId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(APIUsageUsageData.prototype,"APIType",{ - get: function() - { - return this.Fields["APIType"] - }, - set: function(value) - { - this.Fields["APIType"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(APIUsageUsageData.prototype,"APIID",{ - get: function() - { - return this.Fields["APIID"] - }, - set: function(value) - { - this.Fields["APIID"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(APIUsageUsageData.prototype,"Parameters",{ - get: function() - { - return this.Fields["Parameters"] - }, - set: function(value) - { - this.Fields["Parameters"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(APIUsageUsageData.prototype,"ResponseTime",{ - get: function() - { - return this.Fields["ResponseTime"] - }, - set: function(value) - { - this.Fields["ResponseTime"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(APIUsageUsageData.prototype,"ErrorType",{ - get: function() - { - return this.Fields["ErrorType"] - }, - set: function(value) - { - this.Fields["ErrorType"]=value - }, - enumerable: true, - configurable: true - }); - APIUsageUsageData.prototype.SerializeFields=function() - { - this.SetSerializedField("CorrelationId",this.CorrelationId); - this.SetSerializedField("SessionId",this.SessionId); - this.SetSerializedField("APIType",this.APIType); - this.SetSerializedField("APIID",this.APIID); - this.SetSerializedField("Parameters",this.Parameters); - this.SetSerializedField("ResponseTime",this.ResponseTime); - this.SetSerializedField("ErrorType",this.ErrorType) - }; - return APIUsageUsageData - }(BaseUsageData); - OSFLog.APIUsageUsageData=APIUsageUsageData; - var AppInitializationUsageData=function(_super) - { - __extends(AppInitializationUsageData,_super); - function AppInitializationUsageData() - { - _super.call(this,"AppInitialization") - } - Object.defineProperty(AppInitializationUsageData.prototype,"CorrelationId",{ - get: function() - { - return this.Fields["CorrelationId"] - }, - set: function(value) - { - this.Fields["CorrelationId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppInitializationUsageData.prototype,"SessionId",{ - get: function() - { - return this.Fields["SessionId"] - }, - set: function(value) - { - this.Fields["SessionId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppInitializationUsageData.prototype,"SuccessCode",{ - get: function() - { - return this.Fields["SuccessCode"] - }, - set: function(value) - { - this.Fields["SuccessCode"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppInitializationUsageData.prototype,"Message",{ - get: function() - { - return this.Fields["Message"] - }, - set: function(value) - { - this.Fields["Message"]=value - }, - enumerable: true, - configurable: true - }); - AppInitializationUsageData.prototype.SerializeFields=function() - { - this.SetSerializedField("CorrelationId",this.CorrelationId); - this.SetSerializedField("SessionId",this.SessionId); - this.SetSerializedField("SuccessCode",this.SuccessCode); - this.SetSerializedField("Message",this.Message) - }; - return AppInitializationUsageData - }(BaseUsageData); - OSFLog.AppInitializationUsageData=AppInitializationUsageData -})(OSFLog || (OSFLog={})); + var BaseUsageData = function() + { + function BaseUsageData(table) + { + this._table = table; + this._fields = {} + } + Object.defineProperty(BaseUsageData.prototype,"Fields",{ + get: function() + { + return this._fields + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(BaseUsageData.prototype,"Table",{ + get: function() + { + return this._table + }, + enumerable: true, + configurable: true + }); + BaseUsageData.prototype.SerializeFields = function(){}; + BaseUsageData.prototype.SetSerializedField = function(key, value) + { + if(typeof value !== "undefined" && value !== null) + this._serializedFields[key] = value.toString() + }; + BaseUsageData.prototype.SerializeRow = function() + { + this._serializedFields = {}; + this.SetSerializedField("Table",this._table); + this.SerializeFields(); + return JSON.stringify(this._serializedFields) + }; + return BaseUsageData + }(); + OSFLog.BaseUsageData = BaseUsageData; + var AppActivatedUsageData = function(_super) + { + __extends(AppActivatedUsageData,_super); + function AppActivatedUsageData() + { + _super.call(this,"AppActivated") + } + Object.defineProperty(AppActivatedUsageData.prototype,"CorrelationId",{ + get: function() + { + return this.Fields["CorrelationId"] + }, + set: function(value) + { + this.Fields["CorrelationId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"SessionId",{ + get: function() + { + return this.Fields["SessionId"] + }, + set: function(value) + { + this.Fields["SessionId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"AppId",{ + get: function() + { + return this.Fields["AppId"] + }, + set: function(value) + { + this.Fields["AppId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"AppInstanceId",{ + get: function() + { + return this.Fields["AppInstanceId"] + }, + set: function(value) + { + this.Fields["AppInstanceId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"AppURL",{ + get: function() + { + return this.Fields["AppURL"] + }, + set: function(value) + { + this.Fields["AppURL"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"AssetId",{ + get: function() + { + return this.Fields["AssetId"] + }, + set: function(value) + { + this.Fields["AssetId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"Browser",{ + get: function() + { + return this.Fields["Browser"] + }, + set: function(value) + { + this.Fields["Browser"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"UserId",{ + get: function() + { + return this.Fields["UserId"] + }, + set: function(value) + { + this.Fields["UserId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"Host",{ + get: function() + { + return this.Fields["Host"] + }, + set: function(value) + { + this.Fields["Host"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"HostVersion",{ + get: function() + { + return this.Fields["HostVersion"] + }, + set: function(value) + { + this.Fields["HostVersion"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"ClientId",{ + get: function() + { + return this.Fields["ClientId"] + }, + set: function(value) + { + this.Fields["ClientId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"AppSizeWidth",{ + get: function() + { + return this.Fields["AppSizeWidth"] + }, + set: function(value) + { + this.Fields["AppSizeWidth"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"AppSizeHeight",{ + get: function() + { + return this.Fields["AppSizeHeight"] + }, + set: function(value) + { + this.Fields["AppSizeHeight"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"Message",{ + get: function() + { + return this.Fields["Message"] + }, + set: function(value) + { + this.Fields["Message"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"DocUrl",{ + get: function() + { + return this.Fields["DocUrl"] + }, + set: function(value) + { + this.Fields["DocUrl"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"OfficeJSVersion",{ + get: function() + { + return this.Fields["OfficeJSVersion"] + }, + set: function(value) + { + this.Fields["OfficeJSVersion"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"HostJSVersion",{ + get: function() + { + return this.Fields["HostJSVersion"] + }, + set: function(value) + { + this.Fields["HostJSVersion"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"WacHostEnvironment",{ + get: function() + { + return this.Fields["WacHostEnvironment"] + }, + set: function(value) + { + this.Fields["WacHostEnvironment"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"IsFromWacAutomation",{ + get: function() + { + return this.Fields["IsFromWacAutomation"] + }, + set: function(value) + { + this.Fields["IsFromWacAutomation"] = value + }, + enumerable: true, + configurable: true + }); + AppActivatedUsageData.prototype.SerializeFields = function() + { + this.SetSerializedField("CorrelationId",this.CorrelationId); + this.SetSerializedField("SessionId",this.SessionId); + this.SetSerializedField("AppId",this.AppId); + this.SetSerializedField("AppInstanceId",this.AppInstanceId); + this.SetSerializedField("AppURL",this.AppURL); + this.SetSerializedField("AssetId",this.AssetId); + this.SetSerializedField("Browser",this.Browser); + this.SetSerializedField("UserId",this.UserId); + this.SetSerializedField("Host",this.Host); + this.SetSerializedField("HostVersion",this.HostVersion); + this.SetSerializedField("ClientId",this.ClientId); + this.SetSerializedField("AppSizeWidth",this.AppSizeWidth); + this.SetSerializedField("AppSizeHeight",this.AppSizeHeight); + this.SetSerializedField("Message",this.Message); + this.SetSerializedField("DocUrl",this.DocUrl); + this.SetSerializedField("OfficeJSVersion",this.OfficeJSVersion); + this.SetSerializedField("HostJSVersion",this.HostJSVersion); + this.SetSerializedField("WacHostEnvironment",this.WacHostEnvironment); + this.SetSerializedField("IsFromWacAutomation",this.IsFromWacAutomation) + }; + return AppActivatedUsageData + }(BaseUsageData); + OSFLog.AppActivatedUsageData = AppActivatedUsageData; + var ScriptLoadUsageData = function(_super) + { + __extends(ScriptLoadUsageData,_super); + function ScriptLoadUsageData() + { + _super.call(this,"ScriptLoad") + } + Object.defineProperty(ScriptLoadUsageData.prototype,"CorrelationId",{ + get: function() + { + return this.Fields["CorrelationId"] + }, + set: function(value) + { + this.Fields["CorrelationId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype,"SessionId",{ + get: function() + { + return this.Fields["SessionId"] + }, + set: function(value) + { + this.Fields["SessionId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype,"ScriptId",{ + get: function() + { + return this.Fields["ScriptId"] + }, + set: function(value) + { + this.Fields["ScriptId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype,"StartTime",{ + get: function() + { + return this.Fields["StartTime"] + }, + set: function(value) + { + this.Fields["StartTime"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype,"ResponseTime",{ + get: function() + { + return this.Fields["ResponseTime"] + }, + set: function(value) + { + this.Fields["ResponseTime"] = value + }, + enumerable: true, + configurable: true + }); + ScriptLoadUsageData.prototype.SerializeFields = function() + { + this.SetSerializedField("CorrelationId",this.CorrelationId); + this.SetSerializedField("SessionId",this.SessionId); + this.SetSerializedField("ScriptId",this.ScriptId); + this.SetSerializedField("StartTime",this.StartTime); + this.SetSerializedField("ResponseTime",this.ResponseTime) + }; + return ScriptLoadUsageData + }(BaseUsageData); + OSFLog.ScriptLoadUsageData = ScriptLoadUsageData; + var AppClosedUsageData = function(_super) + { + __extends(AppClosedUsageData,_super); + function AppClosedUsageData() + { + _super.call(this,"AppClosed") + } + Object.defineProperty(AppClosedUsageData.prototype,"CorrelationId",{ + get: function() + { + return this.Fields["CorrelationId"] + }, + set: function(value) + { + this.Fields["CorrelationId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype,"SessionId",{ + get: function() + { + return this.Fields["SessionId"] + }, + set: function(value) + { + this.Fields["SessionId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype,"FocusTime",{ + get: function() + { + return this.Fields["FocusTime"] + }, + set: function(value) + { + this.Fields["FocusTime"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype,"AppSizeFinalWidth",{ + get: function() + { + return this.Fields["AppSizeFinalWidth"] + }, + set: function(value) + { + this.Fields["AppSizeFinalWidth"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype,"AppSizeFinalHeight",{ + get: function() + { + return this.Fields["AppSizeFinalHeight"] + }, + set: function(value) + { + this.Fields["AppSizeFinalHeight"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype,"OpenTime",{ + get: function() + { + return this.Fields["OpenTime"] + }, + set: function(value) + { + this.Fields["OpenTime"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype,"CloseMethod",{ + get: function() + { + return this.Fields["CloseMethod"] + }, + set: function(value) + { + this.Fields["CloseMethod"] = value + }, + enumerable: true, + configurable: true + }); + AppClosedUsageData.prototype.SerializeFields = function() + { + this.SetSerializedField("CorrelationId",this.CorrelationId); + this.SetSerializedField("SessionId",this.SessionId); + this.SetSerializedField("FocusTime",this.FocusTime); + this.SetSerializedField("AppSizeFinalWidth",this.AppSizeFinalWidth); + this.SetSerializedField("AppSizeFinalHeight",this.AppSizeFinalHeight); + this.SetSerializedField("OpenTime",this.OpenTime); + this.SetSerializedField("CloseMethod",this.CloseMethod) + }; + return AppClosedUsageData + }(BaseUsageData); + OSFLog.AppClosedUsageData = AppClosedUsageData; + var APIUsageUsageData = function(_super) + { + __extends(APIUsageUsageData,_super); + function APIUsageUsageData() + { + _super.call(this,"APIUsage") + } + Object.defineProperty(APIUsageUsageData.prototype,"CorrelationId",{ + get: function() + { + return this.Fields["CorrelationId"] + }, + set: function(value) + { + this.Fields["CorrelationId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype,"SessionId",{ + get: function() + { + return this.Fields["SessionId"] + }, + set: function(value) + { + this.Fields["SessionId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype,"APIType",{ + get: function() + { + return this.Fields["APIType"] + }, + set: function(value) + { + this.Fields["APIType"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype,"APIID",{ + get: function() + { + return this.Fields["APIID"] + }, + set: function(value) + { + this.Fields["APIID"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype,"Parameters",{ + get: function() + { + return this.Fields["Parameters"] + }, + set: function(value) + { + this.Fields["Parameters"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype,"ResponseTime",{ + get: function() + { + return this.Fields["ResponseTime"] + }, + set: function(value) + { + this.Fields["ResponseTime"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype,"ErrorType",{ + get: function() + { + return this.Fields["ErrorType"] + }, + set: function(value) + { + this.Fields["ErrorType"] = value + }, + enumerable: true, + configurable: true + }); + APIUsageUsageData.prototype.SerializeFields = function() + { + this.SetSerializedField("CorrelationId",this.CorrelationId); + this.SetSerializedField("SessionId",this.SessionId); + this.SetSerializedField("APIType",this.APIType); + this.SetSerializedField("APIID",this.APIID); + this.SetSerializedField("Parameters",this.Parameters); + this.SetSerializedField("ResponseTime",this.ResponseTime); + this.SetSerializedField("ErrorType",this.ErrorType) + }; + return APIUsageUsageData + }(BaseUsageData); + OSFLog.APIUsageUsageData = APIUsageUsageData; + var AppInitializationUsageData = function(_super) + { + __extends(AppInitializationUsageData,_super); + function AppInitializationUsageData() + { + _super.call(this,"AppInitialization") + } + Object.defineProperty(AppInitializationUsageData.prototype,"CorrelationId",{ + get: function() + { + return this.Fields["CorrelationId"] + }, + set: function(value) + { + this.Fields["CorrelationId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype,"SessionId",{ + get: function() + { + return this.Fields["SessionId"] + }, + set: function(value) + { + this.Fields["SessionId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype,"SuccessCode",{ + get: function() + { + return this.Fields["SuccessCode"] + }, + set: function(value) + { + this.Fields["SuccessCode"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype,"Message",{ + get: function() + { + return this.Fields["Message"] + }, + set: function(value) + { + this.Fields["Message"] = value + }, + enumerable: true, + configurable: true + }); + AppInitializationUsageData.prototype.SerializeFields = function() + { + this.SetSerializedField("CorrelationId",this.CorrelationId); + this.SetSerializedField("SessionId",this.SessionId); + this.SetSerializedField("SuccessCode",this.SuccessCode); + this.SetSerializedField("Message",this.Message) + }; + return AppInitializationUsageData + }(BaseUsageData); + OSFLog.AppInitializationUsageData = AppInitializationUsageData +})(OSFLog || (OSFLog = {})); var Logger; (function(Logger) { - "use strict"; - (function(TraceLevel) - { - TraceLevel[TraceLevel["info"]=0]="info"; - TraceLevel[TraceLevel["warning"]=1]="warning"; - TraceLevel[TraceLevel["error"]=2]="error" - })(Logger.TraceLevel || (Logger.TraceLevel={})); - var TraceLevel=Logger.TraceLevel; - (function(SendFlag) - { - SendFlag[SendFlag["none"]=0]="none"; - SendFlag[SendFlag["flush"]=1]="flush" - })(Logger.SendFlag || (Logger.SendFlag={})); - var SendFlag=Logger.SendFlag; - function allowUploadingData() - { - if(OSF.Logger && OSF.Logger.ulsEndpoint) - OSF.Logger.ulsEndpoint.loadProxyFrame() - } - Logger.allowUploadingData=allowUploadingData; - function sendLog(traceLevel, message, flag) - { - if(OSF.Logger && OSF.Logger.ulsEndpoint) - { - var jsonObj={ - traceLevel: traceLevel, - message: message, - flag: flag, - internalLog: true - }; - var logs=JSON.stringify(jsonObj); - OSF.Logger.ulsEndpoint.writeLog(logs) - } - } - Logger.sendLog=sendLog; - function creatULSEndpoint() - { - try - { - return new ULSEndpointProxy - } - catch(e) - { - return null - } - } - var ULSEndpointProxy=function() - { - function ULSEndpointProxy() - { - var _this=this; - this.proxyFrame=null; - this.telemetryEndPoint="https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html"; - this.buffer=[]; - this.proxyFrameReady=false; - OSF.OUtil.addEventListener(window,"message",function(e) - { - return _this.tellProxyFrameReady(e) - }); - setTimeout(function() - { - _this.loadProxyFrame() - },3e3) - } - ULSEndpointProxy.prototype.writeLog=function(log) - { - if(this.proxyFrameReady===true) - this.proxyFrame.contentWindow.postMessage(log,ULSEndpointProxy.telemetryOrigin); - else if(this.buffer.length < 128) - this.buffer.push(log) - }; - ULSEndpointProxy.prototype.loadProxyFrame=function() - { - if(this.proxyFrame==null) - { - this.proxyFrame=document.createElement("iframe"); - this.proxyFrame.setAttribute("style","display:none"); - this.proxyFrame.setAttribute("src",this.telemetryEndPoint); - document.head.appendChild(this.proxyFrame) - } - }; - ULSEndpointProxy.prototype.tellProxyFrameReady=function(e) - { - var _this=this; - if(e.data==="ProxyFrameReadyToLog") - { - this.proxyFrameReady=true; - for(var i=0; i < this.buffer.length; i++) - this.writeLog(this.buffer[i]); - this.buffer.length=0; - OSF.OUtil.removeEventListener(window,"message",function(e) - { - return _this.tellProxyFrameReady(e) - }) - } - else if(e.data==="ProxyFrameReadyToInit") - { - var initJson={ - appName: "Office APPs", - sessionId: OSF.OUtil.Guid.generateNewGuid() - }; - var initStr=JSON.stringify(initJson); - this.proxyFrame.contentWindow.postMessage(initStr,ULSEndpointProxy.telemetryOrigin) - } - }; - ULSEndpointProxy.telemetryOrigin="https://telemetryservice.firstpartyapps.oaspapps.com"; - return ULSEndpointProxy - }(); - if(!OSF.Logger) - OSF.Logger=Logger; - Logger.ulsEndpoint=creatULSEndpoint() -})(Logger || (Logger={})); + "use strict"; + (function(TraceLevel) + { + TraceLevel[TraceLevel["info"] = 0] = "info"; + TraceLevel[TraceLevel["warning"] = 1] = "warning"; + TraceLevel[TraceLevel["error"] = 2] = "error" + })(Logger.TraceLevel || (Logger.TraceLevel = {})); + var TraceLevel = Logger.TraceLevel; + (function(SendFlag) + { + SendFlag[SendFlag["none"] = 0] = "none"; + SendFlag[SendFlag["flush"] = 1] = "flush" + })(Logger.SendFlag || (Logger.SendFlag = {})); + var SendFlag = Logger.SendFlag; + function allowUploadingData() + { + if(OSF.Logger && OSF.Logger.ulsEndpoint) + OSF.Logger.ulsEndpoint.loadProxyFrame() + } + Logger.allowUploadingData = allowUploadingData; + function sendLog(traceLevel, message, flag) + { + if(OSF.Logger && OSF.Logger.ulsEndpoint) + { + var jsonObj = { + traceLevel: traceLevel, + message: message, + flag: flag, + internalLog: true + }; + var logs = JSON.stringify(jsonObj); + OSF.Logger.ulsEndpoint.writeLog(logs) + } + } + Logger.sendLog = sendLog; + function creatULSEndpoint() + { + try + { + return new ULSEndpointProxy + } + catch(e) + { + return null + } + } + var ULSEndpointProxy = function() + { + function ULSEndpointProxy() + { + var _this = this; + this.proxyFrame = null; + this.telemetryEndPoint = "https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html"; + this.buffer = []; + this.proxyFrameReady = false; + OSF.OUtil.addEventListener(window,"message",function(e) + { + return _this.tellProxyFrameReady(e) + }); + setTimeout(function() + { + _this.loadProxyFrame() + },3e3) + } + ULSEndpointProxy.prototype.writeLog = function(log) + { + if(this.proxyFrameReady === true) + this.proxyFrame.contentWindow.postMessage(log,ULSEndpointProxy.telemetryOrigin); + else if(this.buffer.length < 128) + this.buffer.push(log) + }; + ULSEndpointProxy.prototype.loadProxyFrame = function() + { + if(this.proxyFrame == null) + { + this.proxyFrame = document.createElement("iframe"); + this.proxyFrame.setAttribute("style","display:none"); + this.proxyFrame.setAttribute("src",this.telemetryEndPoint); + document.head.appendChild(this.proxyFrame) + } + }; + ULSEndpointProxy.prototype.tellProxyFrameReady = function(e) + { + var _this = this; + if(e.data === "ProxyFrameReadyToLog") + { + this.proxyFrameReady = true; + for(var i = 0; i < this.buffer.length; i++) + this.writeLog(this.buffer[i]); + this.buffer.length = 0; + OSF.OUtil.removeEventListener(window,"message",function(e) + { + return _this.tellProxyFrameReady(e) + }) + } + else if(e.data === "ProxyFrameReadyToInit") + { + var initJson = { + appName: "Office APPs", + sessionId: OSF.OUtil.Guid.generateNewGuid() + }; + var initStr = JSON.stringify(initJson); + this.proxyFrame.contentWindow.postMessage(initStr,ULSEndpointProxy.telemetryOrigin) + } + }; + ULSEndpointProxy.telemetryOrigin = "https://telemetryservice.firstpartyapps.oaspapps.com"; + return ULSEndpointProxy + }(); + if(!OSF.Logger) + OSF.Logger = Logger; + Logger.ulsEndpoint = creatULSEndpoint() +})(Logger || (Logger = {})); +var OSFAriaLogger; +(function(OSFAriaLogger) +{ + var AriaLogger = function() + { + function AriaLogger(){} + AriaLogger.prototype.getAriaCDNLocation = function() + { + return OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath() + "/ariatelemetry/aria-web-telemetry.js" + }; + AriaLogger.getInstance = function() + { + if(AriaLogger.AriaLoggerObj === undefined) + AriaLogger.AriaLoggerObj = new AriaLogger; + return AriaLogger.AriaLoggerObj + }; + AriaLogger.prototype.isIUsageData = function(arg) + { + return arg["Fields"] !== undefined + }; + AriaLogger.prototype.loadAriaScriptAndLog = function(tableName, telemetryData) + { + var startAfterMs = 1e3; + OSF.OUtil.loadScript(this.getAriaCDNLocation(),function() + { + try + { + if(!this.ALogger) + { + var OfficeExtensibilityTenantID = "db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; + this.ALogger = AWTLogManager.initialize(OfficeExtensibilityTenantID) + } + var eventProperties = new AWTEventProperties; + eventProperties.setName("Office.Extensibility.OfficeJS." + tableName); + for(var key in telemetryData) + if(key.toLowerCase() !== "table") + eventProperties.setProperty(key,telemetryData[key]); + var today = new Date; + eventProperties.setProperty("Date",today.toISOString()); + this.ALogger.logEvent(eventProperties) + } + catch(e){} + },startAfterMs) + }; + AriaLogger.prototype.logData = function(data) + { + if(this.isIUsageData(data)) + this.loadAriaScriptAndLog(data["Table"],data["Fields"]); + else + this.loadAriaScriptAndLog(data["Table"],data) + }; + return AriaLogger + }(); + OSFAriaLogger.AriaLogger = AriaLogger +})(OSFAriaLogger || (OSFAriaLogger = {})); var OSFAppTelemetry; (function(OSFAppTelemetry) { - "use strict"; - var appInfo; - var sessionId=OSF.OUtil.Guid.generateNewGuid(); - var osfControlAppCorrelationId=""; - var omexDomainRegex=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/","i"); - var AppInfo=function() - { - function AppInfo(){} - return AppInfo - }(); - var Event=function() - { - function Event(name, handler) - { - this.name=name; - this.handler=handler - } - return Event - }(); - var AppStorage=function() - { - function AppStorage() - { - this.clientIDKey="Office API client"; - this.logIdSetKey="Office App Log Id Set" - } - AppStorage.prototype.getClientId=function() - { - var clientId=this.getValue(this.clientIDKey); - if(!clientId || clientId.length <=0 || clientId.length > 40) - { - clientId=OSF.OUtil.Guid.generateNewGuid(); - this.setValue(this.clientIDKey,clientId) - } - return clientId - }; - AppStorage.prototype.saveLog=function(logId, log) - { - var logIdSet=this.getValue(this.logIdSetKey); - logIdSet=(logIdSet && logIdSet.length > 0 ? logIdSet+";" : "")+logId; - this.setValue(this.logIdSetKey,logIdSet); - this.setValue(logId,log) - }; - AppStorage.prototype.enumerateLog=function(callback, clean) - { - var logIdSet=this.getValue(this.logIdSetKey); - if(logIdSet) - { - var ids=logIdSet.split(";"); - for(var id in ids) - { - var logId=ids[id]; - var log=this.getValue(logId); - if(log) - { - if(callback) - callback(logId,log); - if(clean) - this.remove(logId) - } - } - if(clean) - this.remove(this.logIdSetKey) - } - }; - AppStorage.prototype.getValue=function(key) - { - var osfLocalStorage=OSF.OUtil.getLocalStorage(); - var value=""; - if(osfLocalStorage) - value=osfLocalStorage.getItem(key); - return value - }; - AppStorage.prototype.setValue=function(key, value) - { - var osfLocalStorage=OSF.OUtil.getLocalStorage(); - if(osfLocalStorage) - osfLocalStorage.setItem(key,value) - }; - AppStorage.prototype.remove=function(key) - { - var osfLocalStorage=OSF.OUtil.getLocalStorage(); - if(osfLocalStorage) - try - { - osfLocalStorage.removeItem(key) - } - catch(ex){} - }; - return AppStorage - }(); - var AppLogger=function() - { - function AppLogger(){} - AppLogger.prototype.LogData=function(data) - { - if(!OSF.Logger) - return; - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,data.SerializeRow(),OSF.Logger.SendFlag.none) - }; - AppLogger.prototype.LogRawData=function(log) - { - if(!OSF.Logger) - return; - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,log,OSF.Logger.SendFlag.none) - }; - return AppLogger - }(); - function initialize(context) - { - if(!OSF.Logger) - return; - if(appInfo) - return; - appInfo=new AppInfo; - appInfo.hostVersion=context.get_appVersion(); - appInfo.appId=context.get_id(); - appInfo.host=context.get_appName(); - appInfo.browser=window.navigator.userAgent; - appInfo.correlationId=context.get_correlationId(); - appInfo.clientId=(new AppStorage).getClientId(); - appInfo.appInstanceId=context.get_appInstanceId(); - if(appInfo.appInstanceId) - appInfo.appInstanceId=appInfo.appInstanceId.replace(/[{}]/g,"").toLowerCase(); - appInfo.message=context.get_hostCustomMessage(); - var docUrl=context.get_docUrl(); - appInfo.docUrl=omexDomainRegex.test(docUrl) ? docUrl : ""; - var index=location.href.indexOf("?"); - appInfo.appURL=index==-1 ? location.href : location.href.substring(0,index); - (function getUserIdAndAssetIdFromToken(token, appInfo) - { - var xmlContent; - var parser; - var xmlDoc; - appInfo.assetId=""; - appInfo.userId=""; - try - { - xmlContent=decodeURIComponent(token); - parser=new DOMParser; - xmlDoc=parser.parseFromString(xmlContent,"text/xml"); - appInfo.userId=xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("cid").nodeValue; - appInfo.assetId=xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue - } - catch(e){} - finally - { - xmlContent=null; - xmlDoc=null; - parser=null - } - })(context.get_eToken(),appInfo); - (function handleLifecycle() - { - var startTime=new Date; - var lastFocus=null; - var focusTime=0; - var finished=false; - var adjustFocusTime=function() - { - if(document.hasFocus()) - { - if(lastFocus==null) - lastFocus=new Date - } - else if(lastFocus) - { - focusTime+=Math.abs((new Date).getTime() - lastFocus.getTime()); - lastFocus=null - } - }; - var eventList=[]; - eventList.push(new Event("focus",adjustFocusTime)); - eventList.push(new Event("blur",adjustFocusTime)); - eventList.push(new Event("focusout",adjustFocusTime)); - eventList.push(new Event("focusin",adjustFocusTime)); - var exitFunction=function() - { - for(var i=0; i < eventList.length; i++) - OSF.OUtil.removeEventListener(window,eventList[i].name,eventList[i].handler); - eventList.length=0; - if(!finished) - { - if(document.hasFocus() && lastFocus) - { - focusTime+=Math.abs((new Date).getTime() - lastFocus.getTime()); - lastFocus=null - } - OSFAppTelemetry.onAppClosed(Math.abs((new Date).getTime() - startTime.getTime()),focusTime); - finished=true - } - }; - eventList.push(new Event("beforeunload",exitFunction)); - eventList.push(new Event("unload",exitFunction)); - for(var i=0; i < eventList.length; i++) - OSF.OUtil.addEventListener(window,eventList[i].name,eventList[i].handler); - adjustFocusTime() - })(); - OSFAppTelemetry.onAppActivated() - } - OSFAppTelemetry.initialize=initialize; - function onAppActivated() - { - if(!appInfo) - return; - (new AppStorage).enumerateLog(function(id, log) - { - return(new AppLogger).LogRawData(log) - },true); - var data=new OSFLog.AppActivatedUsageData; - data.SessionId=sessionId; - data.AppId=appInfo.appId; - data.AssetId=appInfo.assetId; - data.AppURL=appInfo.appURL; - data.UserId=appInfo.userId; - data.ClientId=appInfo.clientId; - data.Browser=appInfo.browser; - data.Host=appInfo.host; - data.HostVersion=appInfo.hostVersion; - data.CorrelationId=appInfo.correlationId; - data.AppSizeWidth=window.innerWidth; - data.AppSizeHeight=window.innerHeight; - data.AppInstanceId=appInfo.appInstanceId; - data.Message=appInfo.message; - data.DocUrl=appInfo.docUrl; - (new AppLogger).LogData(data); - setTimeout(function() - { - if(!OSF.Logger) - return; - OSF.Logger.allowUploadingData() - },100) - } - OSFAppTelemetry.onAppActivated=onAppActivated; - function onScriptDone(scriptId, msStartTime, msResponseTime, appCorrelationId) - { - var data=new OSFLog.ScriptLoadUsageData; - data.CorrelationId=appCorrelationId; - data.SessionId=sessionId; - data.ScriptId=scriptId; - data.StartTime=msStartTime; - data.ResponseTime=msResponseTime; - (new AppLogger).LogData(data) - } - OSFAppTelemetry.onScriptDone=onScriptDone; - function onCallDone(apiType, id, parameters, msResponseTime, errorType) - { - if(!appInfo) - return; - var data=new OSFLog.APIUsageUsageData; - data.CorrelationId=osfControlAppCorrelationId; - data.SessionId=sessionId; - data.APIType=apiType; - data.APIID=id; - data.Parameters=parameters; - data.ResponseTime=msResponseTime; - data.ErrorType=errorType; - (new AppLogger).LogData(data) - } - OSFAppTelemetry.onCallDone=onCallDone; - function onMethodDone(id, args, msResponseTime, errorType) - { - var parameters=null; - if(args) - if(typeof args=="number") - parameters=String(args); - else if(typeof args==="object") - for(var index in args) - { - if(parameters !==null) - parameters+=","; - else - parameters=""; - if(typeof args[index]=="number") - parameters+=String(args[index]) - } - else - parameters=""; - OSF.AppTelemetry.onCallDone("method",id,parameters,msResponseTime,errorType) - } - OSFAppTelemetry.onMethodDone=onMethodDone; - function onPropertyDone(propertyName, msResponseTime) - { - OSF.AppTelemetry.onCallDone("property",-1,propertyName,msResponseTime) - } - OSFAppTelemetry.onPropertyDone=onPropertyDone; - function onEventDone(id, errorType) - { - OSF.AppTelemetry.onCallDone("event",id,null,0,errorType) - } - OSFAppTelemetry.onEventDone=onEventDone; - function onRegisterDone(register, id, msResponseTime, errorType) - { - OSF.AppTelemetry.onCallDone(register ? "registerevent" : "unregisterevent",id,null,msResponseTime,errorType) - } - OSFAppTelemetry.onRegisterDone=onRegisterDone; - function onAppClosed(openTime, focusTime) - { - if(!appInfo) - return; - var data=new OSFLog.AppClosedUsageData; - data.CorrelationId=osfControlAppCorrelationId; - data.SessionId=sessionId; - data.FocusTime=focusTime; - data.OpenTime=openTime; - data.AppSizeFinalWidth=window.innerWidth; - data.AppSizeFinalHeight=window.innerHeight; - (new AppStorage).saveLog(sessionId,data.SerializeRow()) - } - OSFAppTelemetry.onAppClosed=onAppClosed; - function setOsfControlAppCorrelationId(correlationId) - { - osfControlAppCorrelationId=correlationId - } - OSFAppTelemetry.setOsfControlAppCorrelationId=setOsfControlAppCorrelationId; - function doAppInitializationLogging(isException, message) - { - var data=new OSFLog.AppInitializationUsageData; - data.CorrelationId=osfControlAppCorrelationId; - data.SessionId=sessionId; - data.SuccessCode=isException ? 1 : 0; - data.Message=message; - (new AppLogger).LogData(data) - } - OSFAppTelemetry.doAppInitializationLogging=doAppInitializationLogging; - function logAppCommonMessage(message) - { - doAppInitializationLogging(false,message) - } - OSFAppTelemetry.logAppCommonMessage=logAppCommonMessage; - function logAppException(errorMessage) - { - doAppInitializationLogging(true,errorMessage) - } - OSFAppTelemetry.logAppException=logAppException; - OSF.AppTelemetry=OSFAppTelemetry -})(OSFAppTelemetry || (OSFAppTelemetry={})); + "use strict"; + var appInfo; + var sessionId = OSF.OUtil.Guid.generateNewGuid(); + var osfControlAppCorrelationId = ""; + var omexDomainRegex = new RegExp("^https?://store\\.office(ppe|-int)?\\.com/","i"); + OSFAppTelemetry.enableTelemetry = true; + var AppInfo = function() + { + function AppInfo(){} + return AppInfo + }(); + var Event = function() + { + function Event(name, handler) + { + this.name = name; + this.handler = handler + } + return Event + }(); + var AppStorage = function() + { + function AppStorage() + { + this.clientIDKey = "Office API client"; + this.logIdSetKey = "Office App Log Id Set" + } + AppStorage.prototype.getClientId = function() + { + var clientId = this.getValue(this.clientIDKey); + if(!clientId || clientId.length <= 0 || clientId.length > 40) + { + clientId = OSF.OUtil.Guid.generateNewGuid(); + this.setValue(this.clientIDKey,clientId) + } + return clientId + }; + AppStorage.prototype.saveLog = function(logId, log) + { + var logIdSet = this.getValue(this.logIdSetKey); + logIdSet = (logIdSet && logIdSet.length > 0 ? logIdSet + ";" : "") + logId; + this.setValue(this.logIdSetKey,logIdSet); + this.setValue(logId,log) + }; + AppStorage.prototype.enumerateLog = function(callback, clean) + { + var logIdSet = this.getValue(this.logIdSetKey); + if(logIdSet) + { + var ids = logIdSet.split(";"); + for(var id in ids) + { + var logId = ids[id]; + var log = this.getValue(logId); + if(log) + { + if(callback) + callback(logId,log); + if(clean) + this.remove(logId) + } + } + if(clean) + this.remove(this.logIdSetKey) + } + }; + AppStorage.prototype.getValue = function(key) + { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + var value = ""; + if(osfLocalStorage) + value = osfLocalStorage.getItem(key); + return value + }; + AppStorage.prototype.setValue = function(key, value) + { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + if(osfLocalStorage) + osfLocalStorage.setItem(key,value) + }; + AppStorage.prototype.remove = function(key) + { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + if(osfLocalStorage) + try + { + osfLocalStorage.removeItem(key) + } + catch(ex){} + }; + return AppStorage + }(); + var AppLogger = function() + { + function AppLogger(){} + AppLogger.prototype.LogData = function(data) + { + if(!OSF.Logger || !OSFAppTelemetry.enableTelemetry) + return; + try + { + OSFAriaLogger.AriaLogger.getInstance().logData(data) + } + catch(e){} + }; + AppLogger.prototype.LogRawData = function(log) + { + if(!OSF.Logger || !OSFAppTelemetry.enableTelemetry) + return; + try + { + OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)) + } + catch(e){} + }; + return AppLogger + }(); + function trimStringToLowerCase(input) + { + if(input) + input = input.replace(/[{}]/g,"").toLowerCase(); + return input || "" + } + function initialize(context) + { + if(!OSF.Logger) + return; + if(appInfo) + return; + appInfo = new AppInfo; + if(context.get_hostFullVersion()) + appInfo.hostVersion = context.get_hostFullVersion(); + else + appInfo.hostVersion = context.get_appVersion(); + appInfo.appId = context.get_id(); + appInfo.host = context.get_appName(); + appInfo.browser = window.navigator.userAgent; + appInfo.correlationId = trimStringToLowerCase(context.get_correlationId()); + appInfo.clientId = (new AppStorage).getClientId(); + appInfo.appInstanceId = context.get_appInstanceId(); + if(appInfo.appInstanceId) + appInfo.appInstanceId = appInfo.appInstanceId.replace(/[{}]/g,"").toLowerCase(); + appInfo.message = context.get_hostCustomMessage(); + appInfo.officeJSVersion = OSF.ConstantNames.FileVersion; + appInfo.hostJSVersion = "16.0.8818.1000"; + if(context._wacHostEnvironment) + appInfo.wacHostEnvironment = context._wacHostEnvironment; + if(context._isFromWacAutomation !== undefined && context._isFromWacAutomation !== null) + appInfo.isFromWacAutomation = context._isFromWacAutomation.toString().toLowerCase(); + var docUrl = context.get_docUrl(); + appInfo.docUrl = omexDomainRegex.test(docUrl) ? docUrl : ""; + var url = location.href; + if(url) + url = url.split("?")[0].split("#")[0]; + appInfo.appURL = url; + (function getUserIdAndAssetIdFromToken(token, appInfo) + { + var xmlContent; + var parser; + var xmlDoc; + appInfo.assetId = ""; + appInfo.userId = ""; + try + { + xmlContent = decodeURIComponent(token); + parser = new DOMParser; + xmlDoc = parser.parseFromString(xmlContent,"text/xml"); + var cidNode = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("cid"); + var oidNode = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("oid"); + if(cidNode && cidNode.nodeValue) + appInfo.userId = cidNode.nodeValue; + else if(oidNode && oidNode.nodeValue) + appInfo.userId = oidNode.nodeValue; + appInfo.assetId = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue + } + catch(e){} + finally + { + xmlContent = null; + xmlDoc = null; + parser = null + } + })(context.get_eToken(),appInfo); + (function handleLifecycle() + { + var startTime = new Date; + var lastFocus = null; + var focusTime = 0; + var finished = false; + var adjustFocusTime = function() + { + if(document.hasFocus()) + { + if(lastFocus == null) + lastFocus = new Date + } + else if(lastFocus) + { + focusTime += Math.abs((new Date).getTime() - lastFocus.getTime()); + lastFocus = null + } + }; + var eventList = []; + eventList.push(new Event("focus",adjustFocusTime)); + eventList.push(new Event("blur",adjustFocusTime)); + eventList.push(new Event("focusout",adjustFocusTime)); + eventList.push(new Event("focusin",adjustFocusTime)); + var exitFunction = function() + { + for(var i = 0; i < eventList.length; i++) + OSF.OUtil.removeEventListener(window,eventList[i].name,eventList[i].handler); + eventList.length = 0; + if(!finished) + { + if(document.hasFocus() && lastFocus) + { + focusTime += Math.abs((new Date).getTime() - lastFocus.getTime()); + lastFocus = null + } + OSFAppTelemetry.onAppClosed(Math.abs((new Date).getTime() - startTime.getTime()),focusTime); + finished = true + } + }; + eventList.push(new Event("beforeunload",exitFunction)); + eventList.push(new Event("unload",exitFunction)); + for(var i = 0; i < eventList.length; i++) + OSF.OUtil.addEventListener(window,eventList[i].name,eventList[i].handler); + adjustFocusTime() + })(); + OSFAppTelemetry.onAppActivated() + } + OSFAppTelemetry.initialize = initialize; + function onAppActivated() + { + if(!appInfo) + return; + (new AppStorage).enumerateLog(function(id, log) + { + return(new AppLogger).LogRawData(log) + },true); + var data = new OSFLog.AppActivatedUsageData; + data.SessionId = sessionId; + data.AppId = appInfo.appId; + data.AssetId = appInfo.assetId; + data.AppURL = appInfo.appURL; + data.UserId = appInfo.userId; + data.ClientId = appInfo.clientId; + data.Browser = appInfo.browser; + data.Host = appInfo.host; + data.HostVersion = appInfo.hostVersion; + data.CorrelationId = trimStringToLowerCase(appInfo.correlationId); + data.AppSizeWidth = window.innerWidth; + data.AppSizeHeight = window.innerHeight; + data.AppInstanceId = appInfo.appInstanceId; + data.Message = appInfo.message; + data.DocUrl = appInfo.docUrl; + data.OfficeJSVersion = appInfo.officeJSVersion; + data.HostJSVersion = appInfo.hostJSVersion; + if(appInfo.wacHostEnvironment) + data.WacHostEnvironment = appInfo.wacHostEnvironment; + if(appInfo.isFromWacAutomation !== undefined && appInfo.isFromWacAutomation !== null) + data.IsFromWacAutomation = appInfo.isFromWacAutomation; + (new AppLogger).LogData(data); + setTimeout(function() + { + if(!OSF.Logger) + return; + OSF.Logger.allowUploadingData() + },100) + } + OSFAppTelemetry.onAppActivated = onAppActivated; + function onScriptDone(scriptId, msStartTime, msResponseTime, appCorrelationId) + { + var data = new OSFLog.ScriptLoadUsageData; + data.CorrelationId = trimStringToLowerCase(appCorrelationId); + data.SessionId = sessionId; + data.ScriptId = scriptId; + data.StartTime = msStartTime; + data.ResponseTime = msResponseTime; + (new AppLogger).LogData(data) + } + OSFAppTelemetry.onScriptDone = onScriptDone; + function onCallDone(apiType, id, parameters, msResponseTime, errorType) + { + if(!appInfo) + return; + var data = new OSFLog.APIUsageUsageData; + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.APIType = apiType; + data.APIID = id; + data.Parameters = parameters; + data.ResponseTime = msResponseTime; + data.ErrorType = errorType; + (new AppLogger).LogData(data) + } + OSFAppTelemetry.onCallDone = onCallDone; + function onMethodDone(id, args, msResponseTime, errorType) + { + var parameters = null; + if(args) + if(typeof args == "number") + parameters = String(args); + else if(typeof args === "object") + for(var index in args) + { + if(parameters !== null) + parameters += ","; + else + parameters = ""; + if(typeof args[index] == "number") + parameters += String(args[index]) + } + else + parameters = ""; + OSF.AppTelemetry.onCallDone("method",id,parameters,msResponseTime,errorType) + } + OSFAppTelemetry.onMethodDone = onMethodDone; + function onPropertyDone(propertyName, msResponseTime) + { + OSF.AppTelemetry.onCallDone("property",-1,propertyName,msResponseTime) + } + OSFAppTelemetry.onPropertyDone = onPropertyDone; + function onEventDone(id, errorType) + { + OSF.AppTelemetry.onCallDone("event",id,null,0,errorType) + } + OSFAppTelemetry.onEventDone = onEventDone; + function onRegisterDone(register, id, msResponseTime, errorType) + { + OSF.AppTelemetry.onCallDone(register ? "registerevent" : "unregisterevent",id,null,msResponseTime,errorType) + } + OSFAppTelemetry.onRegisterDone = onRegisterDone; + function onAppClosed(openTime, focusTime) + { + if(!appInfo) + return; + var data = new OSFLog.AppClosedUsageData; + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.FocusTime = focusTime; + data.OpenTime = openTime; + data.AppSizeFinalWidth = window.innerWidth; + data.AppSizeFinalHeight = window.innerHeight; + (new AppStorage).saveLog(sessionId,data.SerializeRow()) + } + OSFAppTelemetry.onAppClosed = onAppClosed; + function setOsfControlAppCorrelationId(correlationId) + { + osfControlAppCorrelationId = trimStringToLowerCase(correlationId) + } + OSFAppTelemetry.setOsfControlAppCorrelationId = setOsfControlAppCorrelationId; + function doAppInitializationLogging(isException, message) + { + var data = new OSFLog.AppInitializationUsageData; + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.SuccessCode = isException ? 1 : 0; + data.Message = message; + (new AppLogger).LogData(data) + } + OSFAppTelemetry.doAppInitializationLogging = doAppInitializationLogging; + function logAppCommonMessage(message) + { + doAppInitializationLogging(false,message) + } + OSFAppTelemetry.logAppCommonMessage = logAppCommonMessage; + function logAppException(errorMessage) + { + doAppInitializationLogging(true,errorMessage) + } + OSFAppTelemetry.logAppException = logAppException; + OSF.AppTelemetry = OSFAppTelemetry +})(OSFAppTelemetry || (OSFAppTelemetry = {})); var OfficeExt; (function(OfficeExt) { - var AppCommand; - (function(AppCommand) - { - var AppCommandManager=function() - { - function AppCommandManager() - { - var _this=this; - this._pseudoDocument=null; - this._eventDispatch=null; - this._processAppCommandInvocation=function(args) - { - var verifyResult=_this._verifyManifestCallback(args.callbackName); - if(verifyResult.errorCode !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - { - _this._invokeAppCommandCompletedMethod(args.appCommandId,verifyResult.errorCode,""); - return - } - var eventObj=_this._constructEventObjectForCallback(args); - if(eventObj) - window.setTimeout(function() - { - verifyResult.callback(eventObj) - },0); - else - _this._invokeAppCommandCompletedMethod(args.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"") - } - } - AppCommandManager.initializeOsfDda=function() - { - OSF.DDA.AsyncMethodNames.addNames({AppCommandInvocationCompletedAsync: "appCommandInvocationCompletedAsync"}); - OSF.DDA.AsyncMethodCalls.define({ - method: OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync, - requiredArguments: [{ - name: Microsoft.Office.WebExtension.Parameters.Id, - types: ["string"] - },{ - name: Microsoft.Office.WebExtension.Parameters.Status, - types: ["number"] - },{ - name: Microsoft.Office.WebExtension.Parameters.Data, - types: ["string"] - }] - }); - OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{AppCommandInvokedEvent: "AppCommandInvokedEvent"}); - OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppCommandInvoked: "appCommandInvoked"}); - OSF.OUtil.setNamespace("AppCommand",OSF.DDA); - OSF.DDA.AppCommand.AppCommandInvokedEventArgs=OfficeExt.AppCommand.AppCommandInvokedEventArgs - }; - AppCommandManager.prototype.initializeAndChangeOnce=function(callback) - { - AppCommand.registerDdaFacade(); - this._pseudoDocument={}; - OSF.DDA.DispIdHost.addAsyncMethods(this._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync,]); - this._eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked,]); - var onRegisterCompleted=function(result) - { - if(callback) - if(result.status=="succeeded") - callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); - else - callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError) - }; - OSF.DDA.DispIdHost.addEventSupport(this._pseudoDocument,this._eventDispatch); - this._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,this._processAppCommandInvocation,onRegisterCompleted) - }; - AppCommandManager.prototype._verifyManifestCallback=function(callbackName) - { - var defaultResult={ - callback: null, - errorCode: OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback - }; - callbackName=callbackName.trim(); - try - { - var callList=callbackName.split("."); - var parentObject=window; - for(var i=0; i < callList.length - 1; i++) - if(parentObject[callList[i]] && (typeof parentObject[callList[i]]=="object" || typeof parentObject[callList[i]]=="function")) - parentObject=parentObject[callList[i]]; - else - return defaultResult; - var callbackFunc=parentObject[callList[callList.length - 1]]; - if(typeof callbackFunc !="function") - return defaultResult - } - catch(e) - { - return defaultResult - } - return{ - callback: callbackFunc, - errorCode: OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess - } - }; - AppCommandManager.prototype._invokeAppCommandCompletedMethod=function(appCommandId, resultCode, data) - { - this._pseudoDocument.appCommandInvocationCompletedAsync(appCommandId,resultCode,data) - }; - AppCommandManager.prototype._constructEventObjectForCallback=function(args) - { - var _this=this; - var eventObj=new AppCommandCallbackEventArgs; - try - { - var jsonData=JSON.parse(args.eventObjStr); - this._translateEventObjectInternal(jsonData,eventObj); - Object.defineProperty(eventObj,"completed",{ - value: function() - { - var jsonString=JSON.stringify(eventObj); - _this._invokeAppCommandCompletedMethod(args.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,jsonString) - }, - enumerable: true - }) - } - catch(e) - { - eventObj=null - } - return eventObj - }; - AppCommandManager.prototype._translateEventObjectInternal=function(input, output) - { - for(var key in input) - { - if(!input.hasOwnProperty(key)) - continue; - var inputChild=input[key]; - if(typeof inputChild=="object" && inputChild !=null) - { - OSF.OUtil.defineEnumerableProperty(output,key,{value: {}}); - this._translateEventObjectInternal(inputChild,output[key]) - } - else - Object.defineProperty(output,key,{ - value: inputChild, - enumerable: true, - writable: true - }) - } - }; - AppCommandManager.prototype._constructObjectByTemplate=function(template, input) - { - var output={}; - if(!template || !input) - return output; - for(var key in template) - if(template.hasOwnProperty(key)) - { - output[key]=null; - if(input[key] !=null) - { - var templateChild=template[key]; - var inputChild=input[key]; - var inputChildType=typeof inputChild; - if(typeof templateChild=="object" && templateChild !=null) - output[key]=this._constructObjectByTemplate(templateChild,inputChild); - else if(inputChildType=="number" || inputChildType=="string" || inputChildType=="boolean") - output[key]=inputChild - } - } - return output - }; - AppCommandManager.instance=function() - { - if(AppCommandManager._instance==null) - AppCommandManager._instance=new AppCommandManager; - return AppCommandManager._instance - }; - AppCommandManager._instance=null; - return AppCommandManager - }(); - AppCommand.AppCommandManager=AppCommandManager; - var AppCommandInvokedEventArgs=function() - { - function AppCommandInvokedEventArgs(appCommandId, callbackName, eventObjStr) - { - this.type=Microsoft.Office.WebExtension.EventType.AppCommandInvoked; - this.appCommandId=appCommandId; - this.callbackName=callbackName; - this.eventObjStr=eventObjStr - } - AppCommandInvokedEventArgs.create=function(eventProperties) - { - return new AppCommandInvokedEventArgs(eventProperties[AppCommand.AppCommandInvokedEventEnums.AppCommandId],eventProperties[AppCommand.AppCommandInvokedEventEnums.CallbackName],eventProperties[AppCommand.AppCommandInvokedEventEnums.EventObjStr]) - }; - return AppCommandInvokedEventArgs - }(); - AppCommand.AppCommandInvokedEventArgs=AppCommandInvokedEventArgs; - var AppCommandCallbackEventArgs=function() - { - function AppCommandCallbackEventArgs(){} - return AppCommandCallbackEventArgs - }(); - AppCommand.AppCommandCallbackEventArgs=AppCommandCallbackEventArgs; - AppCommand.AppCommandInvokedEventEnums={ - AppCommandId: "appCommandId", - CallbackName: "callbackName", - EventObjStr: "eventObjStr" - } - })(AppCommand=OfficeExt.AppCommand || (OfficeExt.AppCommand={})) -})(OfficeExt || (OfficeExt={})); + var AppCommand; + (function(AppCommand) + { + var AppCommandManager = function() + { + function AppCommandManager() + { + var _this = this; + this._pseudoDocument = null; + this._eventDispatch = null; + this._processAppCommandInvocation = function(args) + { + var verifyResult = _this._verifyManifestCallback(args.callbackName); + if(verifyResult.errorCode != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + { + _this._invokeAppCommandCompletedMethod(args.appCommandId,verifyResult.errorCode,""); + return + } + var eventObj = _this._constructEventObjectForCallback(args); + if(eventObj) + window.setTimeout(function() + { + verifyResult.callback(eventObj) + },0); + else + _this._invokeAppCommandCompletedMethod(args.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"") + } + } + AppCommandManager.initializeOsfDda = function() + { + OSF.DDA.AsyncMethodNames.addNames({AppCommandInvocationCompletedAsync: "appCommandInvocationCompletedAsync"}); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync, + requiredArguments: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + types: ["string"] + },{ + name: Microsoft.Office.WebExtension.Parameters.Status, + types: ["number"] + },{ + name: Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData, + types: ["string"] + }] + }); + OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{AppCommandInvokedEvent: "AppCommandInvokedEvent"}); + OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppCommandInvoked: "appCommandInvoked"}); + OSF.OUtil.setNamespace("AppCommand",OSF.DDA); + OSF.DDA.AppCommand.AppCommandInvokedEventArgs = OfficeExt.AppCommand.AppCommandInvokedEventArgs + }; + AppCommandManager.prototype.initializeAndChangeOnce = function(callback) + { + AppCommand.registerDdaFacade(); + this._pseudoDocument = {}; + OSF.DDA.DispIdHost.addAsyncMethods(this._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync,]); + this._eventDispatch = new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked,]); + var onRegisterCompleted = function(result) + { + if(callback) + if(result.status == "succeeded") + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + else + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError) + }; + OSF.DDA.DispIdHost.addEventSupport(this._pseudoDocument,this._eventDispatch); + this._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,this._processAppCommandInvocation,onRegisterCompleted) + }; + AppCommandManager.prototype._verifyManifestCallback = function(callbackName) + { + var defaultResult = { + callback: null, + errorCode: OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback + }; + callbackName = callbackName.trim(); + try + { + var callList = callbackName.split("."); + var parentObject = window; + for(var i = 0; i < callList.length - 1; i++) + if(parentObject[callList[i]] && (typeof parentObject[callList[i]] == "object" || typeof parentObject[callList[i]] == "function")) + parentObject = parentObject[callList[i]]; + else + return defaultResult; + var callbackFunc = parentObject[callList[callList.length - 1]]; + if(typeof callbackFunc != "function") + return defaultResult + } + catch(e) + { + return defaultResult + } + return{ + callback: callbackFunc, + errorCode: OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess + } + }; + AppCommandManager.prototype._invokeAppCommandCompletedMethod = function(appCommandId, resultCode, data) + { + this._pseudoDocument.appCommandInvocationCompletedAsync(appCommandId,resultCode,data) + }; + AppCommandManager.prototype._constructEventObjectForCallback = function(args) + { + var _this = this; + var eventObj = new AppCommandCallbackEventArgs; + try + { + var jsonData = JSON.parse(args.eventObjStr); + this._translateEventObjectInternal(jsonData,eventObj); + Object.defineProperty(eventObj,"completed",{ + value: function(completedContext) + { + eventObj.completedContext = completedContext; + var jsonString = JSON.stringify(eventObj); + _this._invokeAppCommandCompletedMethod(args.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,jsonString) + }, + enumerable: true + }) + } + catch(e) + { + eventObj = null + } + return eventObj + }; + AppCommandManager.prototype._translateEventObjectInternal = function(input, output) + { + for(var key in input) + { + if(!input.hasOwnProperty(key)) + continue; + var inputChild = input[key]; + if(typeof inputChild == "object" && inputChild != null) + { + OSF.OUtil.defineEnumerableProperty(output,key,{value: {}}); + this._translateEventObjectInternal(inputChild,output[key]) + } + else + Object.defineProperty(output,key,{ + value: inputChild, + enumerable: true, + writable: true + }) + } + }; + AppCommandManager.prototype._constructObjectByTemplate = function(template, input) + { + var output = {}; + if(!template || !input) + return output; + for(var key in template) + if(template.hasOwnProperty(key)) + { + output[key] = null; + if(input[key] != null) + { + var templateChild = template[key]; + var inputChild = input[key]; + var inputChildType = typeof inputChild; + if(typeof templateChild == "object" && templateChild != null) + output[key] = this._constructObjectByTemplate(templateChild,inputChild); + else if(inputChildType == "number" || inputChildType == "string" || inputChildType == "boolean") + output[key] = inputChild + } + } + return output + }; + AppCommandManager.instance = function() + { + if(AppCommandManager._instance == null) + AppCommandManager._instance = new AppCommandManager; + return AppCommandManager._instance + }; + AppCommandManager._instance = null; + return AppCommandManager + }(); + AppCommand.AppCommandManager = AppCommandManager; + var AppCommandInvokedEventArgs = function() + { + function AppCommandInvokedEventArgs(appCommandId, callbackName, eventObjStr) + { + this.type = Microsoft.Office.WebExtension.EventType.AppCommandInvoked; + this.appCommandId = appCommandId; + this.callbackName = callbackName; + this.eventObjStr = eventObjStr + } + AppCommandInvokedEventArgs.create = function(eventProperties) + { + return new AppCommandInvokedEventArgs(eventProperties[AppCommand.AppCommandInvokedEventEnums.AppCommandId],eventProperties[AppCommand.AppCommandInvokedEventEnums.CallbackName],eventProperties[AppCommand.AppCommandInvokedEventEnums.EventObjStr]) + }; + return AppCommandInvokedEventArgs + }(); + AppCommand.AppCommandInvokedEventArgs = AppCommandInvokedEventArgs; + var AppCommandCallbackEventArgs = function() + { + function AppCommandCallbackEventArgs(){} + return AppCommandCallbackEventArgs + }(); + AppCommand.AppCommandCallbackEventArgs = AppCommandCallbackEventArgs; + AppCommand.AppCommandInvokedEventEnums = { + AppCommandId: "appCommandId", + CallbackName: "callbackName", + EventObjStr: "eventObjStr" + } + })(AppCommand = OfficeExt.AppCommand || (OfficeExt.AppCommand = {})) +})(OfficeExt || (OfficeExt = {})); OfficeExt.AppCommand.AppCommandManager.initializeOsfDda(); var OfficeExt; (function(OfficeExt) { - var AppCommand; - (function(AppCommand) - { - function registerDdaFacade() - { - if(OSF.DDA.SafeArray) - { - var parameterMap=OSF.DDA.SafeArray.Delegate.ParameterMap; - parameterMap.define({ - type: OSF.DDA.MethodDispId.dispidAppCommandInvocationCompletedMethod, - toHost: [{ - name: Microsoft.Office.WebExtension.Parameters.Id, - value: 0 - },{ - name: Microsoft.Office.WebExtension.Parameters.Status, - value: 1 - },{ - name: Microsoft.Office.WebExtension.Parameters.Data, - value: 2 - }] - }); - parameterMap.define({ - type: OSF.DDA.EventDispId.dispidAppCommandInvokedEvent, - fromHost: [{ - name: OSF.DDA.EventDescriptors.AppCommandInvokedEvent, - value: parameterMap.self - }], - isComplexType: true - }); - parameterMap.define({ - type: OSF.DDA.EventDescriptors.AppCommandInvokedEvent, - fromHost: [{ - name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.AppCommandId, - value: 0 - },{ - name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.CallbackName, - value: 1 - },{ - name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.EventObjStr, - value: 2 - },], - isComplexType: true - }) - } - } - AppCommand.registerDdaFacade=registerDdaFacade - })(AppCommand=OfficeExt.AppCommand || (OfficeExt.AppCommand={})) -})(OfficeExt || (OfficeExt={})); + var AppCommand; + (function(AppCommand) + { + function registerDdaFacade() + { + if(OSF.DDA.SafeArray) + { + var parameterMap = OSF.DDA.SafeArray.Delegate.ParameterMap; + parameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAppCommandInvocationCompletedMethod, + toHost: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + value: 0 + },{ + name: Microsoft.Office.WebExtension.Parameters.Status, + value: 1 + },{ + name: Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData, + value: 2 + }] + }); + parameterMap.define({ + type: OSF.DDA.EventDispId.dispidAppCommandInvokedEvent, + fromHost: [{ + name: OSF.DDA.EventDescriptors.AppCommandInvokedEvent, + value: parameterMap.self + }], + isComplexType: true + }); + parameterMap.define({ + type: OSF.DDA.EventDescriptors.AppCommandInvokedEvent, + fromHost: [{ + name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.AppCommandId, + value: 0 + },{ + name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.CallbackName, + value: 1 + },{ + name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.EventObjStr, + value: 2 + },], + isComplexType: true + }) + } + } + AppCommand.registerDdaFacade = registerDdaFacade + })(AppCommand = OfficeExt.AppCommand || (OfficeExt.AppCommand = {})) +})(OfficeExt || (OfficeExt = {})); OSF.DDA.AsyncMethodNames.addNames({CloseContainerAsync: "closeContainer"}); var OfficeExt; (function(OfficeExt) { - var Container=function() - { - function Container(parameters){} - return Container - }(); - OfficeExt.Container=Container -})(OfficeExt || (OfficeExt={})); + var Container = function() + { + function Container(parameters){} + return Container + }(); + OfficeExt.Container = Container +})(OfficeExt || (OfficeExt = {})); OSF.DDA.AsyncMethodCalls.define({ - method: OSF.DDA.AsyncMethodNames.CloseContainerAsync, - requiredArguments: [], - supportedOptions: [], - privateStateCallbacks: [] + method: OSF.DDA.AsyncMethodNames.CloseContainerAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [] }); OSF.DDA.SafeArray.Delegate.ParameterMap.define({ - type: OSF.DDA.MethodDispId.dispidCloseContainerMethod, - fromHost: [], - toHost: [] + type: OSF.DDA.MethodDispId.dispidCloseContainerMethod, + fromHost: [], + toHost: [] }); var OfficeJsClient_OutlookWin32; (function(OfficeJsClient_OutlookWin32) { - function prepareApiSurface(appContext) - { - if(appContext.get_isDialog()) - appContext.ui=new OSF.DDA.UI.ChildUI; - else - { - appContext.ui=new OSF.DDA.UI.ParentUI; - OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync]) - } - } - OfficeJsClient_OutlookWin32.prepareApiSurface=prepareApiSurface; - function prepareRightAfterWebExtensionInitialize() - { - var appCommandHandler=OfficeExt.AppCommand.AppCommandManager.instance(); - appCommandHandler.initializeAndChangeOnce() - } - OfficeJsClient_OutlookWin32.prepareRightAfterWebExtensionInitialize=prepareRightAfterWebExtensionInitialize -})(OfficeJsClient_OutlookWin32 || (OfficeJsClient_OutlookWin32={})); -OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize=function OSF_InitializationHelper$prepareRightAfterWebExtensionInitialize() + function prepareApiSurface(appContext) + { + if(appContext.get_isDialog()) + appContext.ui = new OSF.DDA.UI.ChildUI; + else + { + appContext.ui = new OSF.DDA.UI.ParentUI; + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync]) + } + } + OfficeJsClient_OutlookWin32.prepareApiSurface = prepareApiSurface; + function prepareRightAfterWebExtensionInitialize() + { + var appCommandHandler = OfficeExt.AppCommand.AppCommandManager.instance(); + appCommandHandler.initializeAndChangeOnce() + } + OfficeJsClient_OutlookWin32.prepareRightAfterWebExtensionInitialize = prepareRightAfterWebExtensionInitialize +})(OfficeJsClient_OutlookWin32 || (OfficeJsClient_OutlookWin32 = {})); +OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize = function OSF_InitializationHelper$prepareRightAfterWebExtensionInitialize() { - OfficeJsClient_OutlookWin32.prepareRightAfterWebExtensionInitialize() + OfficeJsClient_OutlookWin32.prepareRightAfterWebExtensionInitialize() }; -OSF.InitializationHelper.prototype.prepareApiSurface=function OSF_InitializationHelper$prepareApiSurface(appContext) +OSF.InitializationHelper.prototype.prepareApiSurface = function OSF_InitializationHelper$prepareApiSurface(appContext) { - var license=new OSF.DDA.License(appContext.get_eToken()); - if(appContext.get_appName()==OSF.AppName.OutlookWebApp) - { - OSF.WebApp._UpdateLinksForHostAndXdmInfo(); - this.initWebDialog(appContext); - OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(appContext,this._settings,license,appContext.appOM)); - OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.WAC.getDelegateMethods,OSF.DDA.WAC.Delegate.ParameterMap)) - } - else - { - OfficeJsClient_OutlookWin32.prepareApiSurface(appContext); - OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(appContext,this._settings,license,appContext.appOM,OSF.DDA.Theming ? OSF.DDA.Theming.getOfficeTheme : null,appContext.ui)); - OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.DispIdHost.getClientDelegateMethods,OSF.DDA.SafeArray.Delegate.ParameterMap)) - } + var license = new OSF.DDA.License(appContext.get_eToken()); + if(appContext.get_appName() == OSF.AppName.OutlookWebApp) + { + OSF.WebApp._UpdateLinksForHostAndXdmInfo(); + this.initWebDialog(appContext); + this.initWebAuth(appContext); + OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(appContext,this._settings,license,appContext.appOM)); + OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.WAC.getDelegateMethods,OSF.DDA.WAC.Delegate.ParameterMap)) + } + else + { + OfficeJsClient_OutlookWin32.prepareApiSurface(appContext); + OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(appContext,this._settings,license,appContext.appOM,OSF.DDA.Theming ? OSF.DDA.Theming.getOfficeTheme : null,appContext.ui)); + OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.DispIdHost.getClientDelegateMethods,OSF.DDA.SafeArray.Delegate.ParameterMap)) + } }; -OSF.DDA.SettingsManager={ - SerializedSettings: "serializedSettings", - DateJSONPrefix: "Date(", - DataJSONSuffix: ")", - serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) - { - var ret={}; - for(var key in settingsCollection) - { - var value=settingsCollection[key]; - try - { - if(JSON) - value=JSON.stringify(value,function dateReplacer(k, v) - { - return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix+this[k].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix : v - }); - else - value=Sys.Serialization.JavaScriptSerializer.serialize(value); - ret[key]=value - } - catch(ex){} - } - return ret - }, - deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) - { - var ret={}; - serializedSettings=serializedSettings || {}; - for(var key in serializedSettings) - { - var value=serializedSettings[key]; - try - { - if(JSON) - value=JSON.parse(value,function dateReviver(k, v) - { - var d; - if(typeof v==="string" && v && v.length > 6 && v.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) - { - d=new Date(parseInt(v.slice(5,-1))); - if(d) - return d - } - return v - }); - else - value=Sys.Serialization.JavaScriptSerializer.deserialize(value,true); - ret[key]=value - } - catch(ex){} - } - return ret - } +OSF.DDA.SettingsManager = { + SerializedSettings: "serializedSettings", + DateJSONPrefix: "Date(", + DataJSONSuffix: ")", + serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) + { + var ret = {}; + for(var key in settingsCollection) + { + var value = settingsCollection[key]; + try + { + if(JSON) + value = JSON.stringify(value,function dateReplacer(k, v) + { + return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix + this[k].getTime() + OSF.DDA.SettingsManager.DataJSONSuffix : v + }); + else + value = Sys.Serialization.JavaScriptSerializer.serialize(value); + ret[key] = value + } + catch(ex){} + } + return ret + }, + deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) + { + var ret = {}; + serializedSettings = serializedSettings || {}; + for(var key in serializedSettings) + { + var value = serializedSettings[key]; + try + { + if(JSON) + value = JSON.parse(value,function dateReviver(k, v) + { + var d; + if(typeof v === "string" && v && v.length > 6 && v.slice(0,5) === OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1) === OSF.DDA.SettingsManager.DataJSONSuffix) + { + d = new Date(parseInt(v.slice(5,-1))); + if(d) + return d + } + return v + }); + else + value = Sys.Serialization.JavaScriptSerializer.deserialize(value,true); + ret[key] = value + } + catch(ex){} + } + return ret + } }; -OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function OSF_InitializationHelper$loadAppSpecificScriptAndCreateOM(appContext, appReady, basePath) +OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM = function OSF_InitializationHelper$loadAppSpecificScriptAndCreateOM(appContext, appReady, basePath) { - Type.registerNamespace("Microsoft.Office.WebExtension.MailboxEnums"); - Microsoft.Office.WebExtension.MailboxEnums.EntityType={ - MeetingSuggestion: "meetingSuggestion", - TaskSuggestion: "taskSuggestion", - Address: "address", - EmailAddress: "emailAddress", - Url: "url", - PhoneNumber: "phoneNumber", - Contact: "contact", - FlightReservations: "flightReservations", - ParcelDeliveries: "parcelDeliveries" - }; - Microsoft.Office.WebExtension.MailboxEnums.ItemType={ - Message: "message", - Appointment: "appointment" - }; - Microsoft.Office.WebExtension.MailboxEnums.ResponseType={ - None: "none", - Organizer: "organizer", - Tentative: "tentative", - Accepted: "accepted", - Declined: "declined" - }; - Microsoft.Office.WebExtension.MailboxEnums.RecipientType={ - Other: "other", - DistributionList: "distributionList", - User: "user", - ExternalUser: "externalUser" - }; - Microsoft.Office.WebExtension.MailboxEnums.AttachmentType={ - File: "file", - Item: "item", - Cloud: "cloud" - }; - Microsoft.Office.WebExtension.MailboxEnums.BodyType={ - Text: "text", - Html: "html" - }; - Microsoft.Office.WebExtension.MailboxEnums.ItemNotificationMessageType={ - ProgressIndicator: "progressIndicator", - InformationalMessage: "informationalMessage", - ErrorMessage: "errorMessage" - }; - Microsoft.Office.WebExtension.CoercionType={ - Text: "text", - Html: "html" - }; - Microsoft.Office.WebExtension.MailboxEnums.UserProfileType={ - Office365: "office365", - OutlookCom: "outlookCom", - Enterprise: "enterprise" - }; - Microsoft.Office.WebExtension.MailboxEnums.RestVersion={ - v1_0: "v1.0", - v2_0: "v2.0", - Beta: "beta" - }; - Microsoft.Office.WebExtension.MailboxEnums.ModuleType={Addins: "addins"}; - Type.registerNamespace("OSF.DDA"); - var OSF=window["OSF"] || {}; - OSF.DDA=OSF.DDA || {}; - window["OSF"]["DDA"]["OutlookAppOm"]=OSF.DDA.OutlookAppOm=function(officeAppContext, targetWindow, appReadyCallback) - { - this.$$d_navigateToModuleAsync=Function.createDelegate(this,this.navigateToModuleAsync); - this.$$d_displayPersonaCardAsync=Function.createDelegate(this,this.displayPersonaCardAsync); - this.$$d_displayNewMessageFormApi=Function.createDelegate(this,this.displayNewMessageFormApi); - this.$$d__displayNewAppointmentFormApi$p$0=Function.createDelegate(this,this._displayNewAppointmentFormApi$p$0); - this.$$d_windowOpenOverrideHandler=Function.createDelegate(this,this.windowOpenOverrideHandler); - this.$$d__getRestUrl$p$0=Function.createDelegate(this,this._getRestUrl$p$0); - this.$$d__getEwsUrl$p$0=Function.createDelegate(this,this._getEwsUrl$p$0); - this.$$d__getDiagnostics$p$0=Function.createDelegate(this,this._getDiagnostics$p$0); - this.$$d__getUserProfile$p$0=Function.createDelegate(this,this._getUserProfile$p$0); - this.$$d__getItem$p$0=Function.createDelegate(this,this._getItem$p$0); - this.$$d__callAppReadyCallback$p$0=Function.createDelegate(this,this._callAppReadyCallback$p$0); - this.$$d__getInitialDataResponseHandler$p$0=Function.createDelegate(this,this._getInitialDataResponseHandler$p$0); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p=this; - this._officeAppContext$p$0=officeAppContext; - this._appReadyCallback$p$0=appReadyCallback; - var $$t_4=this; - var stringLoadedCallback=function() - { - if(appReadyCallback) - if(!officeAppContext["get_isDialog"]()) - $$t_4.invokeHostMethod(1,null,$$t_4.$$d__getInitialDataResponseHandler$p$0); - else - window.setTimeout($$t_4.$$d__callAppReadyCallback$p$0,0) - }; - if(this._areStringsLoaded$p$0()) - stringLoadedCallback(); - else - this._loadLocalizedScript$p$0(stringLoadedCallback) - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i=function(currentPermissionLevel) - { - if(!currentPermissionLevel) - throw Error.create(window["_u"]["ExtensibilityStrings"]["l_ElevatedPermissionNeeded_Text"]); - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i=function(value, minValue, maxValue, argumentName) - { - if(value < minValue || value > maxValue) - throw Error.argumentOutOfRange(argumentName); - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidModule$p=function(module) - { - if($h.ScriptHelpers.isNullOrUndefined(module)) - throw Error.argumentNull("module"); - else if(module==="") - throw Error.argument("module","module cannot be empty."); - if(module !==window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ModuleType"]["Addins"]) - throw Error.notImplemented(String.format("API not supported for module '{0}'",module)); - }; - window["OSF"]["DDA"]["OutlookAppOm"]._getHtmlBody$p=function(data) - { - var htmlBody=""; - if("htmlBody" in data) - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidHtmlBody$p(data["htmlBody"]); - htmlBody=data["htmlBody"] - } - return htmlBody - }; - window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p=function(data) - { - var attachments=[]; - if("attachments" in data) - { - attachments=data["attachments"]; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentsArray$p(attachments) - } - return attachments - }; - window["OSF"]["DDA"]["OutlookAppOm"]._getOptionsAndCallback$p=function(data) - { - var args=[]; - if("options" in data) - args[0]=data["options"]; - if("callback" in data) - args[args["length"]]=data["callback"]; - return args - }; - window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p=function(attachments) - { - var attachmentsData=new Array(0); - if(Array["isInstanceOfType"](attachments)) - for(var i=0; i < attachments["length"]; i++) - if(Object["isInstanceOfType"](attachments[i])) - { - var attachment=attachments[i]; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachment$p(attachment); - attachmentsData[i]=window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentData$p(attachment) - } - else - throw Error.argument("attachments"); - return attachmentsData - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidHtmlBody$p=function(htmlBody) - { - if(!String["isInstanceOfType"](htmlBody)) - throw Error.argument("htmlBody"); - if($h.ScriptHelpers.isNullOrUndefined(htmlBody)) - throw Error.argument("htmlBody"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(htmlBody.length,0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody") - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentsArray$p=function(attachments) - { - if(!Array["isInstanceOfType"](attachments)) - throw Error.argument("attachments"); - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachment$p=function(attachment) - { - if(!Object["isInstanceOfType"](attachment)) - throw Error.argument("attachments"); - if(!("type" in attachment) || !("name" in attachment)) - throw Error.argument("attachments"); - if(!("url" in attachment || "itemId" in attachment)) - throw Error.argument("attachments"); - }; - window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentData$p=function(attachment) - { - var attachmentData=null; - if(attachment["type"]==="file") - { - var url=attachment["url"]; - var name=attachment["name"]; - var isInline=$h.ScriptHelpers.isValueTrue(attachment["isInline"]); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentUrlOrName$p(url,name); - attachmentData=window["OSF"]["DDA"]["OutlookAppOm"]._createFileAttachmentData$p(url,name,isInline) - } - else if(attachment["type"]==="item") - { - var itemId=window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(attachment["itemId"]); - var name=attachment["name"]; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentItemIdOrName$p(itemId,name); - attachmentData=window["OSF"]["DDA"]["OutlookAppOm"]._createItemAttachmentData$p(itemId,name) - } - else - throw Error.argument("attachments"); - return attachmentData - }; - window["OSF"]["DDA"]["OutlookAppOm"]._createFileAttachmentData$p=function(url, name, isInline) - { - return["file",name,url,isInline] - }; - window["OSF"]["DDA"]["OutlookAppOm"]._createItemAttachmentData$p=function(itemId, name) - { - return["item",name,itemId] - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentUrlOrName$p=function(url, name) - { - if(!String["isInstanceOfType"](url) || !String["isInstanceOfType"](name)) - throw Error.argument("attachments"); - if(url.length > 2048) - throw Error.argumentOutOfRange("attachments",url.length,window["_u"]["ExtensibilityStrings"]["l_AttachmentUrlTooLong_Text"]); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p(name) - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentItemIdOrName$p=function(itemId, name) - { - if(!String["isInstanceOfType"](itemId) || !String["isInstanceOfType"](name)) - throw Error.argument("attachments"); - if(itemId.length > 200) - throw Error.argumentOutOfRange("attachments",itemId.length,window["_u"]["ExtensibilityStrings"]["l_AttachmentItemIdTooLong_Text"]); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p(name) - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p=function(name) - { - if(name.length > 255) - throw Error.argumentOutOfRange("attachments",name.length,window["_u"]["ExtensibilityStrings"]["l_AttachmentNameTooLong_Text"]); - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p=function(restVersion) - { - if(!restVersion) - throw Error.argumentNull("restVersion"); - if(restVersion !==window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"] && restVersion !==window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v2_0"] && restVersion !==window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["Beta"]) - throw Error.argument("restVersion"); - }; - window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost=function(itemId) - { - if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._initialData$p$0 && window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._initialData$p$0.get__isRestIdSupported$i$0()) - return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToRestId"](itemId,window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"]); - return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToEwsId"](itemId,window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"]) - }; - window["OSF"]["DDA"]["OutlookAppOm"]["addAdditionalArgs"]=function(dispid, data) - { - return data - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p=function(value, expectedType, argumentName) - { - if(Object["getType"](value) !==expectedType) - throw Error.argumentType(argumentName); - }; - window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p=function(value, minLength, maxLength, name) - { - if($h.ScriptHelpers.isNullOrUndefined(value)) - return; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(value,String,name); - var stringValue=value; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(stringValue.length,minLength,maxLength,name) - }; - window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p=function(array) - { - return array ? array["join"](";") : null - }; - window["OSF"]["DDA"]["OutlookAppOm"]._convertComposeEmailDictionaryParameterForSetApi$p=function(recipients) - { - if(!recipients) - return null; - var results=new Array(recipients["length"]); - for(var i=0; i < recipients["length"]; i++) - results[i]=[recipients[i]["address"],recipients[i]["name"]]; - return results - }; - window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p=function(emailset, name) - { - if($h.ScriptHelpers.isNullOrUndefined(emailset)) - return null; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(emailset,Array,name); - var originalAttendees=emailset; - var updatedAttendees=null; - var normalizationNeeded=false; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(originalAttendees["length"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxRecipients$p,String.format("{0}.length",name)); - for(var i=0; i < originalAttendees["length"]; i++) - if($h.EmailAddressDetails["isInstanceOfType"](originalAttendees[i])) - { - normalizationNeeded=true; - break - } - if(normalizationNeeded) - updatedAttendees=[]; - for(var i=0; i < originalAttendees["length"]; i++) - if(normalizationNeeded) - { - updatedAttendees[i]=$h.EmailAddressDetails["isInstanceOfType"](originalAttendees[i]) ? originalAttendees[i]["emailAddress"] : originalAttendees[i]; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(updatedAttendees[i],String,String.format("{0}[{1}]",name,i)) - } - else - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(originalAttendees[i],String,String.format("{0}[{1}]",name,i)); - return updatedAttendees - }; - OSF.DDA.OutlookAppOm.prototype={ - _initialData$p$0: null, - _item$p$0: null, - _userProfile$p$0: null, - _diagnostics$p$0: null, - _officeAppContext$p$0: null, - _appReadyCallback$p$0: null, - _clientEndPoint$p$0: null, - _hostItemType$p$0: 0, - _additionalOutlookParams$p$0: null, - get_clientEndPoint: function() - { - if(!this._clientEndPoint$p$0) - this._clientEndPoint$p$0=OSF._OfficeAppFactory["getClientEndPoint"](); - return this._clientEndPoint$p$0 - }, - set_clientEndPoint: function(value) - { - this._clientEndPoint$p$0=value; - return value - }, - get_initialData: function() - { - return this._initialData$p$0 - }, - get__appName$i$0: function() - { - return this._officeAppContext$p$0["get_appName"]() - }, - get_additionalOutlookParams: function() - { - return this._additionalOutlookParams$p$0 - }, - windowOpenOverrideHandler: function(url, targetName, features, replace) - { - this.invokeHostMethod(403,{launchUrl: url},null) - }, - createAsyncResult: function(value, errorCode, detailedErrorCode, userContext, errorMessage) - { - var initArgs={}; - var errorArgs=null; - initArgs[OSF.DDA.AsyncResultEnum.Properties["Value"]]=value; - initArgs[OSF.DDA.AsyncResultEnum.Properties["Context"]]=userContext; - if(0 !==errorCode) - { - errorArgs={}; - var errorProperties=$h.OutlookErrorManager.getErrorArgs(detailedErrorCode); - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties["Name"]]=errorProperties["name"]; - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties["Message"]]=!errorMessage ? errorProperties["message"] : errorMessage; - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties["Code"]]=detailedErrorCode - } - return new OSF.DDA.AsyncResult(initArgs,errorArgs) - }, - _throwOnMethodCallForInsufficientPermission$i$0: function(requiredPermissionLevel, methodName) - { - if(this._initialData$p$0._permissionLevel$p$0 < requiredPermissionLevel) - throw Error.create(String.format(window["_u"]["ExtensibilityStrings"]["l_ElevatedPermissionNeededForMethod_Text"],methodName)); - }, - _displayReplyForm$i$0: function(obj) - { - this._displayReplyFormHelper$p$0(obj,false) - }, - _displayReplyAllForm$i$0: function(obj) - { - this._displayReplyFormHelper$p$0(obj,true) - }, - _displayReplyFormHelper$p$0: function(obj, isReplyAll) - { - if(String["isInstanceOfType"](obj)) - this._doDisplayReplyForm$p$0(obj,isReplyAll); - else if(Object["isInstanceOfType"](obj) && Object.getTypeName(obj)==="Object") - this._doDisplayReplyFormWithAttachments$p$0(obj,isReplyAll); - else - throw Error.argumentType(); - }, - _doDisplayReplyForm$p$0: function(htmlBody, isReplyAll) - { - if(!$h.ScriptHelpers.isNullOrUndefined(htmlBody)) - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(htmlBody.length,0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody"); - this.invokeHostMethod(isReplyAll ? 11 : 10,{htmlBody: htmlBody},null) - }, - _doDisplayReplyFormWithAttachments$p$0: function(data, isReplyAll) - { - var htmlBody=window["OSF"]["DDA"]["OutlookAppOm"]._getHtmlBody$p(data); - var attachments=window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p(data); - var parameters=$h.CommonParameters.parse(window["OSF"]["DDA"]["OutlookAppOm"]._getOptionsAndCallback$p(data),false); - var $$t_6=this; - this._standardInvokeHostMethod$i$0(isReplyAll ? 31 : 30,{ - htmlBody: htmlBody, - attachments: window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p(attachments) - },function(rawInput) - { - return rawInput - },parameters._asyncContext$p$0,parameters._callback$p$0) - }, - _standardInvokeHostMethod$i$0: function(dispid, data, format, userContext, callback) - { - var $$t_B=this; - this.invokeHostMethod(dispid,data,function(resultCode, response) - { - if(callback) - { - var asyncResult=null; - if(Object["isInstanceOfType"](response)) - { - var responseDictionary=response; - if("error" in responseDictionary || "data" in responseDictionary || "errorCode" in responseDictionary) - if(!responseDictionary["error"]) - { - var formattedData=format ? format(responseDictionary["data"]) : responseDictionary["data"]; - asyncResult=$$t_B.createAsyncResult(formattedData,0,0,userContext,null) - } - else - { - var errorCode=responseDictionary["errorCode"]; - asyncResult=$$t_B.createAsyncResult(null,1,errorCode,userContext,null) - } - } - if(!asyncResult && resultCode) - asyncResult=$$t_B.createAsyncResult(null,1,9002,userContext,null); - callback(asyncResult) - } - }) - }, - invokeHostMethod: function(dispid, data, responseCallback) - { - if(64===this._officeAppContext$p$0["get_appName"]()) - { - var args={ApiParams: data}; - args["MethodData"]={ - ControlId: OSF._OfficeAppFactory["getId"](), - DispatchId: dispid - }; - args=window["OSF"]["DDA"]["OutlookAppOm"]["addAdditionalArgs"](dispid,args); - if(dispid===1) - this.get_clientEndPoint()["invoke"]("GetInitialData",responseCallback,args); - else - this.get_clientEndPoint()["invoke"]("ExecuteMethod",responseCallback,args) - } - else if(!this._isOwaOnlyMethod$p$0(dispid)) - { - var executeParameters=this.convertToOutlookParameters(dispid,data); - var $$t_B=this; - OSF.ClientHostController["execute"](dispid,executeParameters,function(nativeData, resultCode) - { - if(responseCallback) - { - var responseData=nativeData.toArray(); - var rawData=window["JSON"]["parse"](responseData[0]); - if(Object["isInstanceOfType"](rawData)) - { - var deserializedData=rawData; - if(responseData["length"] > 1 && responseData[1]) - { - deserializedData["error"]=true; - deserializedData["errorCode"]=responseData[1] - } - else - deserializedData["error"]=false; - responseCallback(resultCode,deserializedData) - } - else if(Number["isInstanceOfType"](rawData)) - { - var returnDict={}; - returnDict["error"]=true; - returnDict["errorCode"]=rawData; - responseCallback(resultCode,returnDict) - } - else - throw Error.notImplemented("Return data type from host must be Dictionary or int"); - } - }) - } - else if(responseCallback) - responseCallback(-2,null) - }, - _dictionaryToDate$i$0: function(input) - { - var retValue=new Date(input["year"],input["month"],input["date"],input["hours"],input["minutes"],input["seconds"],!input["milliseconds"] ? 0 : input["milliseconds"]); - if(window["isNaN"](retValue["getTime"]())) - throw Error.format(window["_u"]["ExtensibilityStrings"]["l_InvalidDate_Text"]); - return retValue - }, - _dateToDictionary$i$0: function(input) - { - var retValue={}; - retValue["month"]=input["getMonth"](); - retValue["date"]=input["getDate"](); - retValue["year"]=input["getFullYear"](); - retValue["hours"]=input["getHours"](); - retValue["minutes"]=input["getMinutes"](); - retValue["seconds"]=input["getSeconds"](); - retValue["milliseconds"]=input["getMilliseconds"](); - return retValue - }, - _isOwaOnlyMethod$p$0: function(dispId) - { - switch(dispId) - { - case 402: - case 401: - case 400: - case 403: - return true; - default: - return false - } - }, - isOutlook16OrGreater: function() - { - var hostVersion=this._initialData$p$0.get__hostVersion$i$0(); - var endIndex=0; - var majorVersionNumber=0; - if(hostVersion) - { - endIndex=hostVersion.indexOf("."); - majorVersionNumber=window["parseInt"](hostVersion.substring(0,endIndex)) - } - return majorVersionNumber >=16 - }, - convertToOutlookParameters: function(dispid, data) - { - var executeParameters=null; - var optionalParameters={}; - switch(dispid) - { - case 1: - case 2: - case 3: - case 14: - case 18: - case 26: - case 32: - case 41: - case 34: - break; - case 12: - optionalParameters["isRest"]=data["isRest"]; - break; - case 4: - var jsonProperty=window["JSON"]["stringify"](data["customProperties"]); - executeParameters=[jsonProperty]; - break; - case 5: - executeParameters=[data["body"]]; - break; - case 8: - case 9: - executeParameters=[data["itemId"]]; - break; - case 7: - executeParameters=[window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["requiredAttendees"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["optionalAttendees"]),data["start"],data["end"],data["location"],window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["resources"]),data["subject"],data["body"]]; - break; - case 44: - executeParameters=[window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["toRecipients"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["ccRecipients"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["bccRecipients"]),data["subject"],data["htmlBody"],data["attachments"]]; - break; - case 43: - executeParameters=[data["ewsIdOrEmail"]]; - break; - case 45: - executeParameters=[data["module"],data["queryString"]]; - break; - case 40: - executeParameters=[data["extensionId"],data["consentState"]]; - break; - case 11: - case 10: - executeParameters=[data["htmlBody"]]; - break; - case 31: - case 30: - executeParameters=[data["htmlBody"],data["attachments"]]; - break; - case 23: - case 13: - case 38: - case 29: - executeParameters=[data["data"],data["coercionType"]]; - break; - case 37: - case 28: - executeParameters=[data["coercionType"]]; - break; - case 17: - executeParameters=[data["subject"]]; - break; - case 15: - executeParameters=[data["recipientField"]]; - break; - case 22: - case 21: - executeParameters=[data["recipientField"],window["OSF"]["DDA"]["OutlookAppOm"]._convertComposeEmailDictionaryParameterForSetApi$p(data["recipientArray"])]; - break; - case 19: - executeParameters=[data["itemId"],data["name"]]; - break; - case 16: - executeParameters=[data["uri"],data["name"],data["isInline"]]; - break; - case 20: - executeParameters=[data["attachmentIndex"]]; - break; - case 25: - executeParameters=[data["TimeProperty"],data["time"]]; - break; - case 24: - executeParameters=[data["TimeProperty"]]; - break; - case 27: - executeParameters=[data["location"]]; - break; - case 33: - case 35: - executeParameters=[data["key"],data["type"],data["persistent"],data["message"],data["icon"]]; - break; - case 36: - executeParameters=[data["key"]]; - break; - default: - Sys.Debug.fail("Unexpected method dispid"); - break - } - if(dispid !==1) - { - var $$t_5; - this._additionalOutlookParams$p$0.updateOutlookExecuteParameters($$t_5={val: executeParameters},optionalParameters),executeParameters=$$t_5["val"] - } - return executeParameters - }, - _displayNewAppointmentFormApi$p$0: function(parameters) - { - var normalizedRequiredAttendees=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["requiredAttendees"],"requiredAttendees"); - var normalizedOptionalAttendees=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["optionalAttendees"],"optionalAttendees"); - window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["location"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxLocationLength$p,"location"); - window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["body"],0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"body"); - window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["subject"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p,"subject"); - if(!$h.ScriptHelpers.isNullOrUndefined(parameters["start"])) - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(parameters["start"],Date,"start"); - var startDateTime=parameters["start"]; - parameters["start"]=startDateTime["getTime"](); - if(!$h.ScriptHelpers.isNullOrUndefined(parameters["end"])) - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(parameters["end"],Date,"end"); - var endDateTime=parameters["end"]; - if(endDateTime < startDateTime) - throw Error.argumentOutOfRange("end",endDateTime,window["_u"]["ExtensibilityStrings"]["l_InvalidEventDates_Text"]); - parameters["end"]=endDateTime["getTime"]() - } - } - var updatedParameters=null; - if(normalizedRequiredAttendees || normalizedOptionalAttendees) - { - updatedParameters={}; - var $$dict_7=parameters; - for(var $$key_8 in $$dict_7) - { - var entry={ - key: $$key_8, - value: $$dict_7[$$key_8] - }; - updatedParameters[entry["key"]]=entry["value"] - } - if(normalizedRequiredAttendees) - updatedParameters["requiredAttendees"]=normalizedRequiredAttendees; - if(normalizedOptionalAttendees) - updatedParameters["optionalAttendees"]=normalizedOptionalAttendees - } - this.invokeHostMethod(7,updatedParameters || parameters,null) - }, - displayNewMessageFormApi: function(parameters) - { - var updatedParameters={}; - if(parameters) - { - var normalizedToRecipients=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["toRecipients"],"toRecipients"); - var normalizedCcRecipients=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["ccRecipients"],"ccRecipients"); - var normalizedBccRecipients=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["bccRecipients"],"bccRecipients"); - window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["htmlBody"],0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody"); - window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["subject"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p,"subject"); - var attachments=window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p(parameters); - var $$dict_7=parameters; - for(var $$key_8 in $$dict_7) - { - var entry={ - key: $$key_8, - value: $$dict_7[$$key_8] - }; - updatedParameters[entry["key"]]=entry["value"] - } - if(normalizedToRecipients) - updatedParameters["toRecipients"]=normalizedToRecipients; - if(normalizedCcRecipients) - updatedParameters["ccRecipients"]=normalizedCcRecipients; - if(normalizedBccRecipients) - updatedParameters["bccRecipients"]=normalizedBccRecipients; - if(attachments) - updatedParameters["attachments"]=window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p(attachments) - } - this.invokeHostMethod(44,updatedParameters || parameters,null) - }, - displayPersonaCardAsync: function(ewsIdOrEmail) - { - var args=[]; - for(var $$pai_3=1; $$pai_3 < arguments["length"];++$$pai_3) - args[$$pai_3 - 1]=arguments[$$pai_3]; - if($h.ScriptHelpers.isNullOrUndefined(ewsIdOrEmail)) - throw Error.argumentNull("ewsIdOrEmail"); - else if(ewsIdOrEmail==="") - throw Error.argument("ewsIdOrEmail","ewsIdOrEmail cannot be empty."); - var parameters=$h.CommonParameters.parse(args,false); - this._standardInvokeHostMethod$i$0(43,{ewsIdOrEmail: ewsIdOrEmail.trim()},null,parameters._asyncContext$p$0,parameters._callback$p$0) - }, - navigateToModuleAsync: function(module) - { - var args=[]; - for(var $$pai_5=1; $$pai_5 < arguments["length"];++$$pai_5) - args[$$pai_5 - 1]=arguments[$$pai_5]; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidModule$p(module); - var parameters=$h.CommonParameters.parse(args,false); - var updatedParameters={}; - if(module===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ModuleType"]["Addins"]) - { - var queryString=""; - if(parameters._options$p$0 && parameters._options$p$0["queryString"]) - queryString=parameters._options$p$0["queryString"]; - updatedParameters["queryString"]=queryString - } - updatedParameters["module"]=module; - this._standardInvokeHostMethod$i$0(45,updatedParameters,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }, - _initializeMethods$p$0: function() - { - var currentInstance=this; - if($h.Item["isInstanceOfType"](this._item$p$0) || this._hostItemType$p$0===6) - { - currentInstance["displayNewAppointmentForm"]=this.$$d__displayNewAppointmentFormApi$p$0; - currentInstance["displayNewMessageForm"]=this.$$d_displayNewMessageFormApi; - currentInstance["displayPersonaCardAsync"]=this.$$d_displayPersonaCardAsync; - currentInstance["navigateToModuleAsync"]=this.$$d_navigateToModuleAsync - } - }, - _getInitialDataResponseHandler$p$0: function(resultCode, data) - { - if(resultCode) - return; - this["initialize"](data); - this["displayName"]="mailbox"; - window.setTimeout(this.$$d__callAppReadyCallback$p$0,0) - }, - _callAppReadyCallback$p$0: function() - { - this._appReadyCallback$p$0() - }, - _invokeGetTokenMethodAsync$p$0: function(outlookDispid, data, methodName, callback, userContext) - { - if($h.ScriptHelpers.isNullOrUndefined(callback)) - throw Error.argumentNull("callback"); - var $$t_9=this; - this.invokeHostMethod(outlookDispid,data,function(resultCode, response) - { - var asyncResult; - if(resultCode) - asyncResult=$$t_9.createAsyncResult(null,1,9017,userContext,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode)); - else - { - var responseDictionary=response; - if(responseDictionary["wasSuccessful"]) - asyncResult=$$t_9.createAsyncResult(responseDictionary["token"],0,0,userContext,null); - else - asyncResult=$$t_9.createAsyncResult(null,1,responseDictionary["errorCode"],userContext,responseDictionary["errorMessage"]) - } - callback(asyncResult) - }) - }, - _getItem$p$0: function() - { - return this._item$p$0 - }, - _getUserProfile$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0); - return this._userProfile$p$0 - }, - _getDiagnostics$p$0: function() - { - return this._diagnostics$p$0 - }, - _getEwsUrl$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0); - return this._initialData$p$0.get__ewsUrl$i$0() - }, - _getRestUrl$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0); - if(!this._initialData$p$0.get__restUrl$i$0()) - return null; - return this._initialData$p$0.get__restUrl$i$0() - }, - _findOffset$p$0: function(value) - { - var ranges=this._initialData$p$0.get__timeZoneOffsets$i$0(); - for(var r=0; r < ranges["length"]; r++) - { - var range=ranges[r]; - var start=window["parseInt"](range["start"]); - var end=window["parseInt"](range["end"]); - if(value["getTime"]() - start >=0 && value["getTime"]() - end < 0) - return window["parseInt"](range["offset"]) - } - throw Error.format(window["_u"]["ExtensibilityStrings"]["l_InvalidDate_Text"]); - }, - _areStringsLoaded$p$0: function() - { - var stringsLoaded=false; - try - { - stringsLoaded=!$h.ScriptHelpers.isNullOrUndefined(window["_u"]["ExtensibilityStrings"]["l_EwsRequestOversized_Text"]) - } - catch($$e_1){} - return stringsLoaded - }, - _loadLocalizedScript$p$0: function(stringLoadedCallback) - { - var url=null; - var baseUrl=""; - var scripts=document.getElementsByTagName("script"); - for(var i=scripts.length - 1; i >=0; i--) - { - var filename=null; - var attributes=scripts[i].attributes; - if(attributes) - { - var attribute=attributes.getNamedItem("src"); - if(attribute) - filename=attribute.value; - if(filename) - { - var debug=false; - filename=filename.toLowerCase(); - var officeIndex=filename.indexOf("office_strings.js"); - if(officeIndex < 0) - { - officeIndex=filename.indexOf("office_strings.debug.js"); - debug=true - } - if(officeIndex > 0 && officeIndex < filename.length) - { - url=filename.replace(debug ? "office_strings.debug.js" : "office_strings.js","outlook_strings.js"); - var languageUrl=filename.substring(0,officeIndex); - var lastIndexOfSlash=languageUrl.lastIndexOf("/",languageUrl.length - 2); - if(lastIndexOfSlash===-1) - lastIndexOfSlash=languageUrl.lastIndexOf("\\",languageUrl.length - 2); - if(lastIndexOfSlash !==-1 && languageUrl.length > lastIndexOfSlash+1) - baseUrl=languageUrl.substring(0,lastIndexOfSlash+1); - break - } - } - } - } - if(url) - { - var head=document.getElementsByTagName("head")[0]; - var scriptElement=null; - var $$t_H=this; - var scriptElementCallback=function() - { - if(stringLoadedCallback && (!scriptElement.readyState || scriptElement.readyState && (scriptElement.readyState==="loaded" || scriptElement.readyState==="complete"))) - { - scriptElement.onload=null; - scriptElement.onreadystatechange=null; - stringLoadedCallback() - } - }; - var $$t_I=this; - var failureCallback=function() - { - if(!$$t_I._areStringsLoaded$p$0()) - { - var fallbackUrl=baseUrl+"en-us/"+"outlook_strings.js"; - scriptElement.onload=null; - scriptElement.onreadystatechange=null; - scriptElement=$$t_I._createScriptElement$p$0(fallbackUrl); - scriptElement.onload=scriptElementCallback; - scriptElement.onreadystatechange=scriptElementCallback; - head.appendChild(scriptElement) - } - }; - scriptElement=this._createScriptElement$p$0(url); - scriptElement.onload=scriptElementCallback; - scriptElement.onreadystatechange=scriptElementCallback; - window.setTimeout(failureCallback,2e3); - head.appendChild(scriptElement) - } - }, - _createScriptElement$p$0: function(url) - { - var scriptElement=document.createElement("script"); - scriptElement.type="text/javascript"; - scriptElement.src=url; - return scriptElement - } - }; - OSF.DDA.OutlookAppOm.prototype.initialize=function(initialData) - { - var ItemTypeKey="itemType"; - this._initialData$p$0=new $h.InitialData(initialData); - this._hostItemType$p$0=initialData[ItemTypeKey]; - if(1===initialData[ItemTypeKey]) - this._item$p$0=new $h.Message(this._initialData$p$0); - else if(3===initialData[ItemTypeKey]) - this._item$p$0=new $h.MeetingRequest(this._initialData$p$0); - else if(2===initialData[ItemTypeKey]) - this._item$p$0=new $h.Appointment(this._initialData$p$0); - else if(4===initialData[ItemTypeKey]) - this._item$p$0=new $h.MessageCompose(this._initialData$p$0); - else if(5===initialData[ItemTypeKey]) - this._item$p$0=new $h.AppointmentCompose(this._initialData$p$0); - else if(6===initialData[ItemTypeKey]); - else - Sys.Debug.trace("Unexpected item type was received from the host."); - this._userProfile$p$0=new $h.UserProfile(this._initialData$p$0); - this._diagnostics$p$0=new $h.Diagnostics(this._initialData$p$0,this._officeAppContext$p$0["get_appName"]()); - var supportsAdditionalParameters=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() !==8 || this.isOutlook16OrGreater(); - this._additionalOutlookParams$p$0=new $h.AdditionalGlobalParameters(supportsAdditionalParameters); - this._initializeMethods$p$0(); - $h.InitialData._defineReadOnlyProperty$i(this,"item",this.$$d__getItem$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"userProfile",this.$$d__getUserProfile$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"diagnostics",this.$$d__getDiagnostics$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"ewsUrl",this.$$d__getEwsUrl$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"restUrl",this.$$d__getRestUrl$p$0); - if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===64) - if(this._initialData$p$0.get__overrideWindowOpen$i$0()) - window.open=this.$$d_windowOpenOverrideHandler - }; - OSF.DDA.OutlookAppOm.prototype.makeEwsRequestAsync=function(data) - { - var args=[]; - for(var $$pai_5=1; $$pai_5 < arguments["length"];++$$pai_5) - args[$$pai_5 - 1]=arguments[$$pai_5]; - if($h.ScriptHelpers.isNullOrUndefined(data)) - throw Error.argumentNull("data"); - if(data.length > window["OSF"]["DDA"]["OutlookAppOm"]._maxEwsRequestSize$p) - throw Error.argument("data",window["_u"]["ExtensibilityStrings"]["l_EwsRequestOversized_Text"]); - this._throwOnMethodCallForInsufficientPermission$i$0(3,"makeEwsRequestAsync"); - var parameters=$h.CommonParameters.parse(args,true,true); - var ewsRequest=new $h.EwsRequest(parameters._asyncContext$p$0); - var $$t_4=this; - ewsRequest.onreadystatechange=function() - { - if(4===ewsRequest.get__requestState$i$1()) - parameters._callback$p$0(ewsRequest._asyncResult$p$0) - }; - ewsRequest.send(data) - }; - OSF.DDA.OutlookAppOm.prototype.recordDataPoint=function(data) - { - if($h.ScriptHelpers.isNullOrUndefined(data)) - throw Error.argumentNull("data"); - this.invokeHostMethod(402,data,null) - }; - OSF.DDA.OutlookAppOm.prototype.recordTrace=function(data) - { - if($h.ScriptHelpers.isNullOrUndefined(data)) - throw Error.argumentNull("data"); - this.invokeHostMethod(401,data,null) - }; - OSF.DDA.OutlookAppOm.prototype.trackCtq=function(data) - { - if($h.ScriptHelpers.isNullOrUndefined(data)) - throw Error.argumentNull("data"); - this.invokeHostMethod(400,data,null) - }; - OSF.DDA.OutlookAppOm.prototype.convertToLocalClientTime=function(timeValue) - { - var date=new Date(timeValue["getTime"]()); - var offset=date["getTimezoneOffset"]() * -1; - if(this._initialData$p$0 && this._initialData$p$0.get__timeZoneOffsets$i$0()) - { - date["setUTCMinutes"](date["getUTCMinutes"]() - offset); - offset=this._findOffset$p$0(date); - date["setUTCMinutes"](date["getUTCMinutes"]()+offset) - } - var retValue=this._dateToDictionary$i$0(date); - retValue["timezoneOffset"]=offset; - return retValue - }; - OSF.DDA.OutlookAppOm.prototype.convertToUtcClientTime=function(input) - { - var retValue=this._dictionaryToDate$i$0(input); - if(this._initialData$p$0 && this._initialData$p$0.get__timeZoneOffsets$i$0()) - { - var offset=this._findOffset$p$0(retValue); - retValue["setUTCMinutes"](retValue["getUTCMinutes"]() - offset); - offset=!input["timezoneOffset"] ? retValue["getTimezoneOffset"]() * -1 : input["timezoneOffset"]; - retValue["setUTCMinutes"](retValue["getUTCMinutes"]()+offset) - } - return retValue - }; - OSF.DDA.OutlookAppOm.prototype.convertToRestId=function(itemId, restVersion) - { - if(!itemId) - throw Error.argumentNull("itemId"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p(restVersion); - return itemId.replace(new RegExp("[/]","g"),"-").replace(new RegExp("[+]","g"),"_") - }; - OSF.DDA.OutlookAppOm.prototype.convertToEwsId=function(itemId, restVersion) - { - if(!itemId) - throw Error.argumentNull("itemId"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p(restVersion); - return itemId.replace(new RegExp("[-]","g"),"/").replace(new RegExp("[_]","g"),"+") - }; - OSF.DDA.OutlookAppOm.prototype.getUserIdentityTokenAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - this._throwOnMethodCallForInsufficientPermission$i$0(1,"getUserIdentityTokenAsync"); - var parameters=$h.CommonParameters.parse(args,true,true); - this._invokeGetTokenMethodAsync$p$0(2,null,"GetUserIdentityToken",parameters._callback$p$0,parameters._asyncContext$p$0) - }; - OSF.DDA.OutlookAppOm.prototype.getCallbackTokenAsync=function() - { - var args=[]; - for(var $$pai_7=0; $$pai_7 < arguments["length"];++$$pai_7) - args[$$pai_7]=arguments[$$pai_7]; - this._throwOnMethodCallForInsufficientPermission$i$0(1,"getCallbackTokenAsync"); - var parameters=$h.CommonParameters.parse(args,true,true); - var options={}; - if(parameters._options$p$0) - for(var $$arr_3=Object["keys"](parameters._options$p$0), $$len_4=$$arr_3.length, $$idx_5=0; $$idx_5 < $$len_4;++$$idx_5) - { - var key=$$arr_3[$$idx_5]; - options[key]=parameters._options$p$0[key] - } - if(!("isRest" in options)) - options["isRest"]=false; - this._invokeGetTokenMethodAsync$p$0(12,options,"GetCallbackToken",parameters._callback$p$0,parameters._asyncContext$p$0) - }; - OSF.DDA.OutlookAppOm.prototype.displayMessageForm=function(itemId) - { - if($h.ScriptHelpers.isNullOrUndefined(itemId)) - throw Error.argumentNull("itemId"); - this.invokeHostMethod(8,{itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId)},null) - }; - OSF.DDA.OutlookAppOm.prototype.displayAppointmentForm=function(itemId) - { - if($h.ScriptHelpers.isNullOrUndefined(itemId)) - throw Error.argumentNull("itemId"); - this.invokeHostMethod(9,{itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId)},null) - }; - OSF.DDA.OutlookAppOm.prototype.RegisterConsentAsync=function(consentState) - { - if(consentState !==2 && consentState !==1 && consentState) - throw Error.argumentOutOfRange("consentState"); - var parameters={}; - parameters["consentState"]=consentState["toString"](); - parameters["extensionId"]=this["GetExtensionId"](); - this.invokeHostMethod(40,parameters,null) - }; - OSF.DDA.OutlookAppOm.prototype.CloseApp=function() - { - this.invokeHostMethod(42,null,null) - }; - OSF.DDA.OutlookAppOm.prototype.GetIsRead=function() - { - return this._initialData$p$0.get__isRead$i$0() - }; - OSF.DDA.OutlookAppOm.prototype.GetEndNodeUrl=function() - { - return this._initialData$p$0.get__endNodeUrl$i$0() - }; - OSF.DDA.OutlookAppOm.prototype.GetConsentMetadata=function() - { - return this._initialData$p$0.get__consentMetadata$i$0() - }; - OSF.DDA.OutlookAppOm.prototype.GetEntryPointUrl=function() - { - return this._initialData$p$0.get__entryPointUrl$i$0() - }; - OSF.DDA.OutlookAppOm.prototype.GetMarketplaceContentMarket=function() - { - return this._initialData$p$0.get__marketplaceContentMarket$i$0() - }; - OSF.DDA.OutlookAppOm.prototype.GetMarketplaceAssetId=function() - { - return this._initialData$p$0.get__marketplaceAssetId$i$0() - }; - OSF.DDA.OutlookAppOm.prototype.GetExtensionId=function() - { - return this._initialData$p$0.get__extensionId$i$0() - }; - OSF.DDA.OutlookAppOm.prototype.setCurrentItemNumber=function(itemNumber) - { - this._additionalOutlookParams$p$0.setCurrentItemNumber(itemNumber) - }; - window["OSF"]["DDA"]["Settings"]=OSF.DDA.Settings=function(data) - { - this._rawData$p$0=data - }; - window["OSF"]["DDA"]["Settings"]._convertFromRawSettings$p=function(rawSettings) - { - if(!rawSettings) - return{}; - if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===8 || window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===65536 || window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===4194304) - { - var outlookSettings=rawSettings["SettingsKey"]; - if(outlookSettings) - return OSF.DDA.SettingsManager["deserializeSettings"](outlookSettings) - } - return rawSettings - }; - OSF.DDA.Settings.prototype={ - _rawData$p$0: null, - _settingsData$p$0: null, - get__data$p$0: function() - { - if(!this._settingsData$p$0) - { - this._settingsData$p$0=window["OSF"]["DDA"]["Settings"]._convertFromRawSettings$p(this._rawData$p$0); - this._rawData$p$0=null - } - return this._settingsData$p$0 - }, - _saveSettingsForOutlook$p$0: function(callback, userContext) - { - var storedException=null; - try - { - var serializedSettings=OSF.DDA.SettingsManager["serializeSettings"](this.get__data$p$0()); - var jsonSettings=window["JSON"]["stringify"](serializedSettings); - var settingsObjectToSave={SettingsKey: jsonSettings}; - OSF.DDA.ClientSettingsManager["write"](settingsObjectToSave) - } - catch(ex) - { - storedException=ex - } - if(callback) - { - var asyncResult; - if(storedException) - asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9019,userContext,storedException["message"]); - else - asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,0,0,userContext,null); - callback(asyncResult) - } - }, - _saveSettingsForOwa$p$0: function(callback, userContext) - { - var serializedSettings=OSF.DDA.SettingsManager["serializeSettings"](this.get__data$p$0()); - var $$t_7=this; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.invokeHostMethod(404,[serializedSettings],function(resultCode, response) - { - if(callback) - { - var asyncResult; - if(resultCode) - asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9017,userContext,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode)); - else - { - var responseDictionary=response; - if(!responseDictionary["error"]) - asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,0,0,userContext,null); - else - asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9019,userContext,responseDictionary["errorMessage"]) - } - callback(asyncResult) - } - }) - } - }; - OSF.DDA.Settings.prototype.get=function(name) - { - return this.get__data$p$0()[name] - }; - OSF.DDA.Settings.prototype.set=function(name, value) - { - this.get__data$p$0()[name]=value - }; - OSF.DDA.Settings.prototype.remove=function(name) - { - delete this.get__data$p$0()[name] - }; - OSF.DDA.Settings.prototype.saveAsync=function() - { - var args=[]; - for(var $$pai_4=0; $$pai_4 < arguments["length"];++$$pai_4) - args[$$pai_4]=arguments[$$pai_4]; - var commonParameters=$h.CommonParameters.parse(args,false); - if(window["JSON"]["stringify"](OSF.DDA.SettingsManager["serializeSettings"](this.get__data$p$0())).length > 32768) - { - var asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9019,commonParameters._asyncContext$p$0,""); - var $$t_3=this; - window.setTimeout(function() - { - commonParameters._callback$p$0(asyncResult) - },0); - return - } - if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===64) - this._saveSettingsForOwa$p$0(commonParameters._callback$p$0,commonParameters._asyncContext$p$0); - else - this._saveSettingsForOutlook$p$0(commonParameters._callback$p$0,commonParameters._asyncContext$p$0) - }; - Type.registerNamespace("$h"); - var $h=window["$h"] || {}; - Type.registerNamespace("Office.cast"); - var Office=window["Office"] || {}; - Office.cast=Office.cast || {}; - $h.AdditionalGlobalParameters=function(supported) - { - this._parameterBlobSupported$p$0=supported; - this._itemNumber$p$0=0 - }; - $h.AdditionalGlobalParameters.prototype={ - _parameterBlobSupported$p$0: false, - _itemNumber$p$0: 0, - setCurrentItemNumber: function(itemNumber) - { - if(itemNumber > 0) - this._itemNumber$p$0=itemNumber - }, - updateOutlookExecuteParameters: function(executeParameters, additionalApiParameters) - { - if(this._parameterBlobSupported$p$0) - { - if(this._itemNumber$p$0 > 0) - additionalApiParameters["itemNumber"]=this._itemNumber$p$0["toString"](); - if(!Object["keys"](additionalApiParameters)["length"]) - return; - if(!executeParameters["val"]) - executeParameters["val"]=[]; - executeParameters["val"]["push"](window["JSON"]["stringify"](additionalApiParameters)) - } - } - }; - $h.Appointment=function(dataDictionary) - { - this.$$d__getOrganizer$p$2=Function.createDelegate(this,this._getOrganizer$p$2); - this.$$d__getNormalizedSubject$p$2=Function.createDelegate(this,this._getNormalizedSubject$p$2); - this.$$d__getSubject$p$2=Function.createDelegate(this,this._getSubject$p$2); - this.$$d__getResources$p$2=Function.createDelegate(this,this._getResources$p$2); - this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2); - this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2); - this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2); - this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2); - this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2); - $h.Appointment["initializeBase"](this,[dataDictionary]); - $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"resources",this.$$d__getResources$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"organizer",this.$$d__getOrganizer$p$2) - }; - $h.Appointment.prototype={ - getItemType: function() - { - return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Appointment"] - }, - _getStart$p$2: function() - { - return this._data$p$0.get__start$i$0() - }, - _getEnd$p$2: function() - { - return this._data$p$0.get__end$i$0() - }, - _getLocation$p$2: function() - { - return this._data$p$0.get__location$i$0() - }, - _getOptionalAttendees$p$2: function() - { - return this._data$p$0.get__cc$i$0() - }, - _getRequiredAttendees$p$2: function() - { - return this._data$p$0.get__to$i$0() - }, - _getResources$p$2: function() - { - return this._data$p$0.get__resources$i$0() - }, - _getSubject$p$2: function() - { - return this._data$p$0.get__subject$i$0() - }, - _getNormalizedSubject$p$2: function() - { - return this._data$p$0.get__normalizedSubject$i$0() - }, - _getOrganizer$p$2: function() - { - return this._data$p$0.get__organizer$i$0() - } - }; - $h.Appointment.prototype.getEntities=function() - { - return this._data$p$0._getEntities$i$0() - }; - $h.Appointment.prototype.getEntitiesByType=function(entityType) - { - return this._data$p$0._getEntitiesByType$i$0(entityType) - }; - $h.Appointment.prototype.getSelectedEntities=function() - { - return this._data$p$0._getSelectedEntities$i$0() - }; - $h.Appointment.prototype.getRegExMatches=function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches"); - return this._data$p$0._getRegExMatches$i$0() - }; - $h.Appointment.prototype.getFilteredEntitiesByName=function(name) - { - return this._data$p$0._getFilteredEntitiesByName$i$0(name) - }; - $h.Appointment.prototype.getRegExMatchesByName=function(name) - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName"); - return this._data$p$0._getRegExMatchesByName$i$0(name) - }; - $h.Appointment.prototype.getSelectedRegExMatches=function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedRegExMatches"); - return this._data$p$0._getSelectedRegExMatches$i$0() - }; - $h.Appointment.prototype.displayReplyForm=function(obj) - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyForm$i$0(obj) - }; - $h.Appointment.prototype.displayReplyAllForm=function(obj) - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyAllForm$i$0(obj) - }; - $h.AppointmentCompose=function(data) - { - this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2); - this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2); - this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2); - this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2); - this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2); - $h.AppointmentCompose["initializeBase"](this,[data]); - $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2) - }; - $h.AppointmentCompose.prototype={ - _requiredAttendees$p$2: null, - _optionalAttendees$p$2: null, - _start$p$2: null, - _end$p$2: null, - _location$p$2: null, - getItemType: function() - { - return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Appointment"] - }, - _getRequiredAttendees$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._requiredAttendees$p$2) - this._requiredAttendees$p$2=new $h.ComposeRecipient(0,"requiredAttendees"); - return this._requiredAttendees$p$2 - }, - _getOptionalAttendees$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._optionalAttendees$p$2) - this._optionalAttendees$p$2=new $h.ComposeRecipient(1,"optionalAttendees"); - return this._optionalAttendees$p$2 - }, - _getStart$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._start$p$2) - this._start$p$2=new $h.ComposeTime(1); - return this._start$p$2 - }, - _getEnd$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._end$p$2) - this._end$p$2=new $h.ComposeTime(2); - return this._end$p$2 - }, - _getLocation$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._location$p$2) - this._location$p$2=new $h.ComposeLocation; - return this._location$p$2 - } - }; - $h.AttachmentConstants=function(){}; - $h.AttachmentDetails=function(data) - { - this.$$d__getIsInline$p$0=Function.createDelegate(this,this._getIsInline$p$0); - this.$$d__getAttachmentType$p$0=Function.createDelegate(this,this._getAttachmentType$p$0); - this.$$d__getSize$p$0=Function.createDelegate(this,this._getSize$p$0); - this.$$d__getContentType$p$0=Function.createDelegate(this,this._getContentType$p$0); - this.$$d__getName$p$0=Function.createDelegate(this,this._getName$p$0); - this.$$d__getId$p$0=Function.createDelegate(this,this._getId$p$0); - this._data$p$0=data; - $h.InitialData._defineReadOnlyProperty$i(this,"id",this.$$d__getId$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"name",this.$$d__getName$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"contentType",this.$$d__getContentType$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"size",this.$$d__getSize$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"attachmentType",this.$$d__getAttachmentType$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"isInline",this.$$d__getIsInline$p$0) - }; - $h.AttachmentDetails.prototype={ - _data$p$0: null, - _getId$p$0: function() - { - return this._data$p$0["id"] - }, - _getName$p$0: function() - { - return this._data$p$0["name"] - }, - _getContentType$p$0: function() - { - return this._data$p$0["contentType"] - }, - _getSize$p$0: function() - { - return this._data$p$0["size"] - }, - _getAttachmentType$p$0: function() - { - var response=this._data$p$0["attachmentType"]; - return response < $h.AttachmentDetails._attachmentTypeMap$p["length"] ? $h.AttachmentDetails._attachmentTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["File"] - }, - _getIsInline$p$0: function() - { - return this._data$p$0["isInline"] - } - }; - $h.Body=function(){}; - $h.Body._tryMapToHostCoercionType$i=function(coercionType, hostCoercionType) - { - hostCoercionType["val"]=undefined; - if(coercionType===window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Html"]) - hostCoercionType["val"]=3; - else if(coercionType===window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Text"]) - hostCoercionType["val"]=0; - else - return false; - return true - }; - $h.Body.prototype.getAsync=function(coercionType) - { - var args=[]; - for(var $$pai_7=1; $$pai_7 < arguments["length"];++$$pai_7) - args[$$pai_7 - 1]=arguments[$$pai_7]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"body.getAsync"); - var commonParameters=$h.CommonParameters.parse(args,true); - var hostCoercionType; - var $$t_5, - $$t_6; - if(!($$t_6=$h.Body._tryMapToHostCoercionType$i(coercionType,$$t_5={val: hostCoercionType}),hostCoercionType=$$t_5["val"],$$t_6)) - throw Error.argument("coercionType"); - var dataToHost={coercionType: hostCoercionType}; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(37,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.ComposeBody=function() - { - $h.ComposeBody["initializeBase"](this) - }; - $h.ComposeBody._createParameterDictionaryToHost$i=function(data, parameters) - { - var dataToHost={data: data}; - if(parameters._options$p$0 && parameters._options$p$0["hasOwnProperty"]("coercionType") && !$h.ScriptHelpers.isNull(parameters._options$p$0["coercionType"])) - { - var hostCoercionType; - var $$t_4, - $$t_5; - if(!($$t_5=$h.Body._tryMapToHostCoercionType$i(parameters._options$p$0["coercionType"],$$t_4={val: hostCoercionType}),hostCoercionType=$$t_4["val"],$$t_5)) - { - if(parameters._callback$p$0) - parameters._callback$p$0(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,1e3,parameters._asyncContext$p$0,null)); - return null - } - dataToHost["coercionType"]=hostCoercionType - } - else - dataToHost["coercionType"]=0; - return dataToHost - }; - $h.ComposeBody.prototype.getTypeAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"body.getTypeAsync"); - var parameters=$h.CommonParameters.parse(args,true); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(14,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeBody.prototype.setSelectedDataAsync=function(data) - { - var args=[]; - for(var $$pai_4=1; $$pai_4 < arguments["length"];++$$pai_4) - args[$$pai_4 - 1]=arguments[$$pai_4]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.setSelectedDataAsync"); - var parameters=$h.CommonParameters.parse(args,false); - if(!String["isInstanceOfType"](data)) - throw Error.argumentType("data",Object["getType"](data),String); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); - var dataToHost=$h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); - if(!dataToHost) - return; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(13,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeBody.prototype.prependAsync=function(data) - { - var args=[]; - for(var $$pai_4=1; $$pai_4 < arguments["length"];++$$pai_4) - args[$$pai_4 - 1]=arguments[$$pai_4]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.prependAsync"); - var parameters=$h.CommonParameters.parse(args,false); - if(!String["isInstanceOfType"](data)) - throw Error.argumentType("data",Object["getType"](data),String); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); - var dataToHost=$h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); - if(!dataToHost) - return; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(23,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeBody.prototype.setAsync=function(data) - { - var args=[]; - for(var $$pai_4=1; $$pai_4 < arguments["length"];++$$pai_4) - args[$$pai_4 - 1]=arguments[$$pai_4]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.setAsync"); - var parameters=$h.CommonParameters.parse(args,false); - if(!String["isInstanceOfType"](data)) - throw Error.argumentType("data",Object["getType"](data),String); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); - var dataToHost=$h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); - if(!dataToHost) - return; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(38,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeItem=function(data) - { - this.$$d__getBody$p$1=Function.createDelegate(this,this._getBody$p$1); - this.$$d__getSubject$p$1=Function.createDelegate(this,this._getSubject$p$1); - $h.ComposeItem["initializeBase"](this,[data]); - $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$1); - $h.InitialData._defineReadOnlyProperty$i(this,"body",this.$$d__getBody$p$1) - }; - $h.ComposeItem.prototype={ - _subject$p$1: null, - _body$p$1: null, - _getBody$p$1: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._body$p$1) - this._body$p$1=new $h.ComposeBody; - return this._body$p$1 - }, - _getSubject$p$1: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._subject$p$1) - this._subject$p$1=new $h.ComposeSubject; - return this._subject$p$1 - } - }; - $h.ComposeItem.prototype.addFileAttachmentAsync=function(uri, attachmentName) - { - var args=[]; - for(var $$pai_6=2; $$pai_6 < arguments["length"];++$$pai_6) - args[$$pai_6 - 2]=arguments[$$pai_6]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"addFileAttachmentAsync"); - if(!$h.ScriptHelpers.isNonEmptyString(uri)) - throw Error.argument("uri"); - if(!$h.ScriptHelpers.isNonEmptyString(attachmentName)) - throw Error.argument("attachmentName"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(uri.length,0,2048,"uri"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentName.length,0,255,"attachmentName"); - var commonParameters=$h.CommonParameters.parse(args,false); - var isInline=false; - if(!$h.ScriptHelpers.isNull(commonParameters._options$p$0)) - isInline=$h.ScriptHelpers.isValueTrue(commonParameters._options$p$0["isInline"]); - var parameters={ - uri: uri, - name: attachmentName, - isInline: isInline, - __timeout__: 6e5 - }; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(16,parameters,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.ComposeItem.prototype.addItemAttachmentAsync=function(itemId, attachmentName) - { - var args=[]; - for(var $$pai_5=2; $$pai_5 < arguments["length"];++$$pai_5) - args[$$pai_5 - 2]=arguments[$$pai_5]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"addItemAttachmentAsync"); - if(!$h.ScriptHelpers.isNonEmptyString(itemId)) - throw Error.argument("itemId"); - if(!$h.ScriptHelpers.isNonEmptyString(attachmentName)) - throw Error.argument("attachmentName"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(itemId.length,0,200,"itemId"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentName.length,0,255,"attachmentName"); - var commonParameters=$h.CommonParameters.parse(args,false); - var parameters={ - itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId), - name: attachmentName, - __timeout__: 6e5 - }; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(19,parameters,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.ComposeItem.prototype.removeAttachmentAsync=function(attachmentId) - { - var args=[]; - for(var $$pai_3=1; $$pai_3 < arguments["length"];++$$pai_3) - args[$$pai_3 - 1]=arguments[$$pai_3]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"removeAttachmentAsync"); - if(!$h.ScriptHelpers.isNonEmptyString(attachmentId)) - throw Error.argument("attachmentId"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentId.length,0,200,"attachmentId"); - var commonParameters=$h.CommonParameters.parse(args,false); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(20,{attachmentIndex: attachmentId},null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.ComposeItem.prototype.getSelectedDataAsync=function(coercionType) - { - var args=[]; - for(var $$pai_7=1; $$pai_7 < arguments["length"];++$$pai_7) - args[$$pai_7 - 1]=arguments[$$pai_7]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedDataAsync"); - var commonParameters=$h.CommonParameters.parse(args,true); - var hostCoercionType; - var $$t_5, - $$t_6; - if(coercionType !==window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Html"] && coercionType !==window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Text"] || !($$t_6=$h.Body._tryMapToHostCoercionType$i(coercionType,$$t_5={val: hostCoercionType}),hostCoercionType=$$t_5["val"],$$t_6)) - throw Error.argument("coercionType"); - var dataToHost={coercionType: hostCoercionType}; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(28,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.ComposeItem.prototype.setSelectedDataAsync=function(data) - { - var args=[]; - for(var $$pai_4=1; $$pai_4 < arguments["length"];++$$pai_4) - args[$$pai_4 - 1]=arguments[$$pai_4]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"setSelectedDataAsync"); - var parameters=$h.CommonParameters.parse(args,false); - if(!String["isInstanceOfType"](data)) - throw Error.argumentType("data",Object["getType"](data),String); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); - var dataToHost=$h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); - if(!dataToHost) - return; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(29,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeItem.prototype.close=function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(41,null,null,null,null) - }; - $h.ComposeItem.prototype.saveAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"saveAsync"); - var parameters=$h.CommonParameters.parse(args,false); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(32,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeRecipient=function(type, propertyName) - { - this._type$p$0=type; - this._propertyName$p$0=propertyName - }; - $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p=function(displayName, emailAddress) - { - if(!displayName && !emailAddress) - throw Error.argument("recipients"); - if(displayName && displayName.length > 255) - throw Error.argumentOutOfRange("recipients",displayName.length,window["_u"]["ExtensibilityStrings"]["l_DisplayNameTooLong_Text"]); - if(emailAddress && emailAddress.length > 571) - throw Error.argumentOutOfRange("recipients",emailAddress.length,window["_u"]["ExtensibilityStrings"]["l_EmailAddressTooLong_Text"]); - }; - $h.ComposeRecipient._getAsyncFormatter$p=function(rawInput) - { - var input=rawInput; - var output=[]; - for(var i=0; i < input["length"]; i++) - { - var email=new $h.EmailAddressDetails(input[i]); - output[i]=email - } - return output - }; - $h.ComposeRecipient._createEmailDictionaryForHost$p=function(address, name) - { - return{ - address: address, - name: name - } - }; - $h.ComposeRecipient.prototype={ - _propertyName$p$0: null, - _type$p$0: 0, - setAddHelper: function(recipients, args, isSet) - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(recipients["length"],0,100,"recipients"); - var parameters=$h.CommonParameters.parse(args,false); - var recipientData=[]; - if(Array["isInstanceOfType"](recipients)) - for(var i=0; i < recipients["length"]; i++) - if(String["isInstanceOfType"](recipients[i])) - { - $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(recipients[i],recipients[i]); - recipientData[i]=$h.ComposeRecipient._createEmailDictionaryForHost$p(recipients[i],recipients[i]) - } - else if($h.EmailAddressDetails["isInstanceOfType"](recipients[i])) - { - var address=recipients[i]; - $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(address["displayName"],address["emailAddress"]); - recipientData[i]=$h.ComposeRecipient._createEmailDictionaryForHost$p(address["emailAddress"],address["displayName"]) - } - else if(Object["isInstanceOfType"](recipients[i])) - { - var input=recipients[i]; - var emailAddress=input["emailAddress"]; - var displayName=input["displayName"]; - $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(displayName,emailAddress); - recipientData[i]=$h.ComposeRecipient._createEmailDictionaryForHost$p(emailAddress,displayName) - } - else - throw Error.argument("recipients"); - else - throw Error.argument("recipients"); - var $$t_B=this; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(isSet ? 21 : 22,{ - recipientField: this._type$p$0, - recipientArray: recipientData - },function(rawInput) - { - return rawInput - },parameters._asyncContext$p$0,parameters._callback$p$0) - } - }; - $h.ComposeRecipient.prototype.getAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - var parameters=$h.CommonParameters.parse(args,true); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,this._propertyName$p$0+".getAsync"); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(15,{recipientField: this._type$p$0},$h.ComposeRecipient._getAsyncFormatter$p,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeRecipient.prototype.setAsync=function(recipients) - { - var args=[]; - for(var $$pai_2=1; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2 - 1]=arguments[$$pai_2]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._propertyName$p$0+".setAsync"); - this.setAddHelper(recipients,args,true) - }; - $h.ComposeRecipient.prototype.addAsync=function(recipients) - { - var args=[]; - for(var $$pai_2=1; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2 - 1]=arguments[$$pai_2]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._propertyName$p$0+".addAsync"); - this.setAddHelper(recipients,args,false) - }; - $h.ComposeRecipient.RecipientField=function(){}; - $h.ComposeRecipient.RecipientField.prototype={ - to: 0, - cc: 1, - bcc: 2, - requiredAttendees: 0, - optionalAttendees: 1 - }; - $h.ComposeRecipient.RecipientField["registerEnum"]("$h.0",false); - $h.ComposeLocation=function(){}; - $h.ComposeLocation.prototype.getAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"location.getAsync"); - var parameters=$h.CommonParameters.parse(args,true); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(26,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeLocation.prototype.setAsync=function(location) - { - var args=[]; - for(var $$pai_3=1; $$pai_3 < arguments["length"];++$$pai_3) - args[$$pai_3 - 1]=arguments[$$pai_3]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"location.setAsync"); - var parameters=$h.CommonParameters.parse(args,false); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(location.length,0,255,"location"); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(27,{location: location},null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeSubject=function(){}; - $h.ComposeSubject.prototype.getAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - var parameters=$h.CommonParameters.parse(args,true); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"subject.getAsync"); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(18,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeSubject.prototype.setAsync=function(data) - { - var args=[]; - for(var $$pai_3=1; $$pai_3 < arguments["length"];++$$pai_3) - args[$$pai_3 - 1]=arguments[$$pai_3]; - var parameters=$h.CommonParameters.parse(args,false); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"subject.setAsync"); - if(!String["isInstanceOfType"](data)) - throw Error.argument("data"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,255,"data"); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(17,{subject: data},null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeTime=function(type) - { - this.$$d__ticksToDateFormatter$p$0=Function.createDelegate(this,this._ticksToDateFormatter$p$0); - this._timeType$p$0=type - }; - $h.ComposeTime.prototype={ - _timeType$p$0: 0, - _ticksToDateFormatter$p$0: function(rawInput) - { - var ticks=rawInput; - return new Date(ticks) - }, - _getPropertyName$p$0: function() - { - return this._timeType$p$0===1 ? "start" : "end" - } - }; - $h.ComposeTime.prototype.getAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,this._getPropertyName$p$0()+".getAsync"); - var parameters=$h.CommonParameters.parse(args,true); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(24,{TimeProperty: this._timeType$p$0},this.$$d__ticksToDateFormatter$p$0,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeTime.prototype.setAsync=function(dateTime) - { - var args=[]; - for(var $$pai_3=1; $$pai_3 < arguments["length"];++$$pai_3) - args[$$pai_3 - 1]=arguments[$$pai_3]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._getPropertyName$p$0()+".setAsync"); - if(!Date["isInstanceOfType"](dateTime)) - throw Error.argumentType("dateTime",Object["getType"](dateTime),Date); - if(window["isNaN"](dateTime["getTime"]())) - throw Error.argument("dateTime"); - if(dateTime["getTime"]() < -864e13 || dateTime["getTime"]() > 864e13) - throw Error.argumentOutOfRange("dateTime"); - var parameters=$h.CommonParameters.parse(args,false); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(25,{ - TimeProperty: this._timeType$p$0, - time: dateTime["getTime"]() - },null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeTime.TimeType=function(){}; - $h.ComposeTime.TimeType.prototype={ - start: 1, - end: 2 - }; - $h.ComposeTime.TimeType["registerEnum"]("$h.1",false); - $h.Contact=function(data) - { - this.$$d__getContactString$p$0=Function.createDelegate(this,this._getContactString$p$0); - this.$$d__getAddresses$p$0=Function.createDelegate(this,this._getAddresses$p$0); - this.$$d__getUrls$p$0=Function.createDelegate(this,this._getUrls$p$0); - this.$$d__getEmailAddresses$p$0=Function.createDelegate(this,this._getEmailAddresses$p$0); - this.$$d__getPhoneNumbers$p$0=Function.createDelegate(this,this._getPhoneNumbers$p$0); - this.$$d__getBusinessName$p$0=Function.createDelegate(this,this._getBusinessName$p$0); - this.$$d__getPersonName$p$0=Function.createDelegate(this,this._getPersonName$p$0); - this._data$p$0=data; - $h.InitialData._defineReadOnlyProperty$i(this,"personName",this.$$d__getPersonName$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"businessName",this.$$d__getBusinessName$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"contactString",this.$$d__getContactString$p$0) - }; - $h.Contact.prototype={ - _data$p$0: null, - _phoneNumbers$p$0: null, - _getPersonName$p$0: function() - { - return this._data$p$0["PersonName"] - }, - _getBusinessName$p$0: function() - { - return this._data$p$0["BusinessName"] - }, - _getAddresses$p$0: function() - { - return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses") - }, - _getEmailAddresses$p$0: function() - { - return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses") - }, - _getUrls$p$0: function() - { - return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls") - }, - _getPhoneNumbers$p$0: function() - { - if(!this._phoneNumbers$p$0) - { - var $$t_1=this; - this._phoneNumbers$p$0=$h.Entities._getExtractedObjects$i($h.PhoneNumber,this._data$p$0,"PhoneNumbers",function(data) - { - return new $h.PhoneNumber(data) - }) - } - return this._phoneNumbers$p$0 - }, - _getContactString$p$0: function() - { - return this._data$p$0["ContactString"] - } - }; - $h.CustomProperties=function(data) - { - if($h.ScriptHelpers.isNullOrUndefined(data)) - throw Error.argumentNull("data"); - if(Array["isInstanceOfType"](data)) - { - var customPropertiesArray=data; - if(customPropertiesArray["length"] > 0) - this._data$p$0=customPropertiesArray[0]; - else - throw Error.argument("data"); - } - else - this._data$p$0=data - }; - $h.CustomProperties.prototype={_data$p$0: null}; - $h.CustomProperties.prototype.get=function(name) - { - var value=this._data$p$0[name]; - if(typeof value==="string") - { - var valueString=value; - if(valueString.length > 6 && valueString.startsWith("Date(") && valueString.endsWith(")")) - { - var ticksString=valueString.substring(5,valueString.length - 1); - var ticks=window["parseInt"](ticksString); - if(!window["isNaN"](ticks)) - { - var dateTimeValue=new Date(ticks); - if(dateTimeValue) - value=dateTimeValue - } - } - } - return value - }; - $h.CustomProperties.prototype.set=function(name, value) - { - if(window["OSF"]["OUtil"]["isDate"](value)) - value="Date("+value["getTime"]()+")"; - this._data$p$0[name]=value - }; - $h.CustomProperties.prototype.remove=function(name) - { - delete this._data$p$0[name] - }; - $h.CustomProperties.prototype.saveAsync=function() - { - var args=[]; - for(var $$pai_4=0; $$pai_4 < arguments["length"];++$$pai_4) - args[$$pai_4]=arguments[$$pai_4]; - var MaxCustomPropertiesLength=2500; - if(window["JSON"]["stringify"](this._data$p$0).length > MaxCustomPropertiesLength) - throw Error.argument(); - var parameters=$h.CommonParameters.parse(args,false,true); - var saveCustomProperties=new $h.SaveDictionaryRequest(parameters._callback$p$0,parameters._asyncContext$p$0); - saveCustomProperties._sendRequest$i$0(4,"SaveCustomProperties",{customProperties: this._data$p$0}) - }; - $h.Diagnostics=function(data, appName) - { - this.$$d__getOwaView$p$0=Function.createDelegate(this,this._getOwaView$p$0); - this.$$d__getHostVersion$p$0=Function.createDelegate(this,this._getHostVersion$p$0); - this.$$d__getHostName$p$0=Function.createDelegate(this,this._getHostName$p$0); - this._data$p$0=data; - this._appName$p$0=appName; - $h.InitialData._defineReadOnlyProperty$i(this,"hostName",this.$$d__getHostName$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"hostVersion",this.$$d__getHostVersion$p$0); - if(64===this._appName$p$0) - $h.InitialData._defineReadOnlyProperty$i(this,"OWAView",this.$$d__getOwaView$p$0) - }; - $h.Diagnostics.prototype={ - _data$p$0: null, - _appName$p$0: 0, - _getHostName$p$0: function() - { - switch(this._appName$p$0) - { - case 8: - return"Outlook"; - case 64: - return"OutlookWebApp"; - case 65536: - return"OutlookIOS"; - case 4194304: - return"OutlookAndroid"; - default: - return null - } - }, - _getHostVersion$p$0: function() - { - return this._data$p$0.get__hostVersion$i$0() - }, - _getOwaView$p$0: function() - { - return this._data$p$0.get__owaView$i$0() - } - }; - $h.EmailAddressDetails=function(data) - { - this.$$d__getRecipientType$p$0=Function.createDelegate(this,this._getRecipientType$p$0); - this.$$d__getAppointmentResponse$p$0=Function.createDelegate(this,this._getAppointmentResponse$p$0); - this.$$d__getDisplayName$p$0=Function.createDelegate(this,this._getDisplayName$p$0); - this.$$d__getEmailAddress$p$0=Function.createDelegate(this,this._getEmailAddress$p$0); - this._data$p$0=data; - $h.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0); - if($h.ScriptHelpers.dictionaryContainsKey(data,"appointmentResponse")) - $h.InitialData._defineReadOnlyProperty$i(this,"appointmentResponse",this.$$d__getAppointmentResponse$p$0); - if($h.ScriptHelpers.dictionaryContainsKey(data,"recipientType")) - $h.InitialData._defineReadOnlyProperty$i(this,"recipientType",this.$$d__getRecipientType$p$0) - }; - $h.EmailAddressDetails._createFromEmailUserDictionary$i=function(data) - { - var emailAddressDetailsDictionary={}; - var displayName=data["Name"]; - var emailAddress=data["UserId"]; - emailAddressDetailsDictionary["name"]=displayName || $h.EmailAddressDetails._emptyString$p; - emailAddressDetailsDictionary["address"]=emailAddress || $h.EmailAddressDetails._emptyString$p; - return new $h.EmailAddressDetails(emailAddressDetailsDictionary) - }; - $h.EmailAddressDetails.prototype={ - _data$p$0: null, - _getEmailAddress$p$0: function() - { - return this._data$p$0["address"] - }, - _getDisplayName$p$0: function() - { - return this._data$p$0["name"] - }, - _getAppointmentResponse$p$0: function() - { - var response=this._data$p$0["appointmentResponse"]; - return response < $h.EmailAddressDetails._responseTypeMap$p["length"] ? $h.EmailAddressDetails._responseTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["None"] - }, - _getRecipientType$p$0: function() - { - var response=this._data$p$0["recipientType"]; - return response < $h.EmailAddressDetails._recipientTypeMap$p["length"] ? $h.EmailAddressDetails._recipientTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["Other"] - } - }; - $h.EmailAddressDetails.prototype.toJSON=function() - { - var result={}; - result["emailAddress"]=this._getEmailAddress$p$0(); - result["displayName"]=this._getDisplayName$p$0(); - if($h.ScriptHelpers.dictionaryContainsKey(this._data$p$0,"appointmentResponse")) - result["appointmentResponse"]=this._getAppointmentResponse$p$0(); - if($h.ScriptHelpers.dictionaryContainsKey(this._data$p$0,"recipientType")) - result["recipientType"]=this._getRecipientType$p$0(); - return result - }; - $h.Entities=function(data, filteredEntitiesData, timeSent, permissionLevel) - { - this.$$d__createMeetingSuggestion$p$0=Function.createDelegate(this,this._createMeetingSuggestion$p$0); - this.$$d__getParcelDeliveries$p$0=Function.createDelegate(this,this._getParcelDeliveries$p$0); - this.$$d__getFlightReservations$p$0=Function.createDelegate(this,this._getFlightReservations$p$0); - this.$$d__getContacts$p$0=Function.createDelegate(this,this._getContacts$p$0); - this.$$d__getPhoneNumbers$p$0=Function.createDelegate(this,this._getPhoneNumbers$p$0); - this.$$d__getUrls$p$0=Function.createDelegate(this,this._getUrls$p$0); - this.$$d__getEmailAddresses$p$0=Function.createDelegate(this,this._getEmailAddresses$p$0); - this.$$d__getMeetingSuggestions$p$0=Function.createDelegate(this,this._getMeetingSuggestions$p$0); - this.$$d__getTaskSuggestions$p$0=Function.createDelegate(this,this._getTaskSuggestions$p$0); - this.$$d__getAddresses$p$0=Function.createDelegate(this,this._getAddresses$p$0); - this._data$p$0=data || {}; - this._filteredData$p$0=filteredEntitiesData || {}; - this._dateTimeSent$p$0=timeSent; - $h.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"taskSuggestions",this.$$d__getTaskSuggestions$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"meetingSuggestions",this.$$d__getMeetingSuggestions$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"contacts",this.$$d__getContacts$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"flightReservations",this.$$d__getFlightReservations$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"parcelDeliveries",this.$$d__getParcelDeliveries$p$0); - this._permissionLevel$p$0=permissionLevel - }; - $h.Entities._getExtractedObjects$i=function(T, data, name, creator, removeDuplicates, stringPropertyName) - { - var results=null; - var extractedObjects=data[name]; - if(!extractedObjects) - return new Array(0); - if(removeDuplicates) - extractedObjects=$h.Entities._removeDuplicate$p(Object,extractedObjects,$h.Entities._entityDictionaryEquals$p,stringPropertyName); - results=new Array(extractedObjects["length"]); - var count=0; - for(var $$arr_9=extractedObjects, $$len_A=$$arr_9.length, $$idx_B=0; $$idx_B < $$len_A;++$$idx_B) - { - var extractedObject=$$arr_9[$$idx_B]; - if(creator) - results[count++]=creator(extractedObject); - else - results[count++]=extractedObject - } - return results - }; - $h.Entities._getExtractedStringProperty$i=function(data, name, removeDuplicate) - { - var extractedProperties=data[name]; - if(!extractedProperties) - return new Array(0); - if(removeDuplicate) - extractedProperties=$h.Entities._removeDuplicate$p(String,extractedProperties,$h.Entities._stringEquals$p,null); - return extractedProperties - }; - $h.Entities._createContact$p=function(data) - { - return new $h.Contact(data) - }; - $h.Entities._createTaskSuggestion$p=function(data) - { - return new $h.TaskSuggestion(data) - }; - $h.Entities._createPhoneNumber$p=function(data) - { - return new $h.PhoneNumber(data) - }; - $h.Entities._entityDictionaryEquals$p=function(dictionary1, dictionary2, entityPropertyIdentifier) - { - if(dictionary1===dictionary2) - return true; - if(!dictionary1 || !dictionary2) - return false; - if(dictionary1[entityPropertyIdentifier]===dictionary2[entityPropertyIdentifier]) - return true; - return false - }; - $h.Entities._stringEquals$p=function(string1, string2, entityProperty) - { - return string1===string2 - }; - $h.Entities._removeDuplicate$p=function(T, array, entityEquals, entityPropertyIdentifier) - { - for(var matchIndex1=array["length"] - 1; matchIndex1 >=0; matchIndex1--) - { - var removeMatch=false; - for(var matchIndex2=matchIndex1 - 1; matchIndex2 >=0; matchIndex2--) - if(entityEquals(array[matchIndex1],array[matchIndex2],entityPropertyIdentifier)) - { - removeMatch=true; - break - } - if(removeMatch) - Array.removeAt(array,matchIndex1) - } - return array - }; - $h.Entities.prototype={ - _dateTimeSent$p$0: null, - _data$p$0: null, - _filteredData$p$0: null, - _filteredEntitiesCache$p$0: null, - _permissionLevel$p$0: 0, - _taskSuggestions$p$0: null, - _meetingSuggestions$p$0: null, - _phoneNumbers$p$0: null, - _contacts$p$0: null, - _addresses$p$0: null, - _emailAddresses$p$0: null, - _urls$p$0: null, - _flightReservations$p$0: null, - _parcelDeliveries$p$0: null, - _getByType$i$0: function(entityType) - { - if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["MeetingSuggestion"]) - return this._getMeetingSuggestions$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["TaskSuggestion"]) - return this._getTaskSuggestions$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Address"]) - return this._getAddresses$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["PhoneNumber"]) - return this._getPhoneNumbers$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["EmailAddress"]) - return this._getEmailAddresses$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Url"]) - return this._getUrls$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Contact"]) - return this._getContacts$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["FlightReservations"]) - return this._getFlightReservations$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["ParcelDeliveries"]) - return this._getParcelDeliveries$p$0(); - return null - }, - _getFilteredEntitiesByName$i$0: function(name) - { - if(!this._filteredEntitiesCache$p$0) - this._filteredEntitiesCache$p$0={}; - if(!$h.ScriptHelpers.dictionaryContainsKey(this._filteredEntitiesCache$p$0,name)) - { - var found=false; - for(var i=0; i < $h.Entities._allEntityKeys$p["length"]; i++) - { - var entityTypeKey=$h.Entities._allEntityKeys$p[i]; - var perEntityTypeDictionary=this._filteredData$p$0[entityTypeKey]; - if(!perEntityTypeDictionary) - continue; - if($h.ScriptHelpers.dictionaryContainsKey(perEntityTypeDictionary,name)) - { - switch(entityTypeKey) - { - case"EmailAddresses": - case"Urls": - this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedStringProperty$i(perEntityTypeDictionary,name); - break; - case"Addresses": - this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedStringProperty$i(perEntityTypeDictionary,name,true); - break; - case"PhoneNumbers": - this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedObjects$i($h.PhoneNumber,perEntityTypeDictionary,name,$h.Entities._createPhoneNumber$p,false,null); - break; - case"TaskSuggestions": - this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedObjects$i($h.TaskSuggestion,perEntityTypeDictionary,name,$h.Entities._createTaskSuggestion$p,true,"TaskString"); - break; - case"MeetingSuggestions": - this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedObjects$i($h.MeetingSuggestion,perEntityTypeDictionary,name,this.$$d__createMeetingSuggestion$p$0,true,"MeetingString"); - break; - case"Contacts": - this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedObjects$i($h.Contact,perEntityTypeDictionary,name,$h.Entities._createContact$p,true,"ContactString"); - break - } - found=true; - break - } - } - if(!found) - this._filteredEntitiesCache$p$0[name]=null - } - return this._filteredEntitiesCache$p$0[name] - }, - _createMeetingSuggestion$p$0: function(data) - { - return new $h.MeetingSuggestion(data,this._dateTimeSent$p$0) - }, - _getAddresses$p$0: function() - { - if(!this._addresses$p$0) - this._addresses$p$0=$h.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses",true); - return this._addresses$p$0 - }, - _getEmailAddresses$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); - if(!this._emailAddresses$p$0) - this._emailAddresses$p$0=$h.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses",false); - return this._emailAddresses$p$0 - }, - _getUrls$p$0: function() - { - if(!this._urls$p$0) - this._urls$p$0=$h.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls",false); - return this._urls$p$0 - }, - _getPhoneNumbers$p$0: function() - { - if(!this._phoneNumbers$p$0) - this._phoneNumbers$p$0=$h.Entities._getExtractedObjects$i($h.PhoneNumber,this._data$p$0,"PhoneNumbers",$h.Entities._createPhoneNumber$p); - return this._phoneNumbers$p$0 - }, - _getTaskSuggestions$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); - if(!this._taskSuggestions$p$0) - this._taskSuggestions$p$0=$h.Entities._getExtractedObjects$i($h.TaskSuggestion,this._data$p$0,"TaskSuggestions",$h.Entities._createTaskSuggestion$p,true,"TaskString"); - return this._taskSuggestions$p$0 - }, - _getMeetingSuggestions$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); - if(!this._meetingSuggestions$p$0) - this._meetingSuggestions$p$0=$h.Entities._getExtractedObjects$i($h.MeetingSuggestion,this._data$p$0,"MeetingSuggestions",this.$$d__createMeetingSuggestion$p$0,true,"MeetingString"); - return this._meetingSuggestions$p$0 - }, - _getContacts$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); - if(!this._contacts$p$0) - this._contacts$p$0=$h.Entities._getExtractedObjects$i($h.Contact,this._data$p$0,"Contacts",$h.Entities._createContact$p,true,"ContactString"); - return this._contacts$p$0 - }, - _getParcelDeliveries$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); - if(!this._parcelDeliveries$p$0) - this._parcelDeliveries$p$0=$h.Entities._getExtractedObjects$i(Object,this._data$p$0,"ParcelDeliveries",null); - return this._parcelDeliveries$p$0 - }, - _getFlightReservations$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); - if(!this._flightReservations$p$0) - this._flightReservations$p$0=$h.Entities._getExtractedObjects$i(Object,this._data$p$0,"FlightReservations",null); - return this._flightReservations$p$0 - } - }; - $h.ReplyConstants=function(){}; - $h.AsyncConstants=function(){}; - window["Office"]["cast"]["item"]=Office.cast.item=function(){}; - window["Office"]["cast"]["item"]["toItemRead"]=function(item) - { - if($h.Item["isInstanceOfType"](item)) - return item; - throw Error.argumentType(); - }; - window["Office"]["cast"]["item"]["toItemCompose"]=function(item) - { - if($h.ComposeItem["isInstanceOfType"](item)) - return item; - throw Error.argumentType(); - }; - window["Office"]["cast"]["item"]["toMessage"]=function(item) - { - return window["Office"]["cast"]["item"]["toMessageRead"](item) - }; - window["Office"]["cast"]["item"]["toMessageRead"]=function(item) - { - if($h.Message["isInstanceOfType"](item)) - return item; - throw Error.argumentType(); - }; - window["Office"]["cast"]["item"]["toMessageCompose"]=function(item) - { - if($h.MessageCompose["isInstanceOfType"](item)) - return item; - throw Error.argumentType(); - }; - window["Office"]["cast"]["item"]["toMeetingRequest"]=function(item) - { - if($h.MeetingRequest["isInstanceOfType"](item)) - return item; - throw Error.argumentType(); - }; - window["Office"]["cast"]["item"]["toAppointment"]=function(item) - { - return window["Office"]["cast"]["item"]["toAppointmentRead"](item) - }; - window["Office"]["cast"]["item"]["toAppointmentRead"]=function(item) - { - if($h.Appointment["isInstanceOfType"](item)) - return item; - throw Error.argumentType(); - }; - window["Office"]["cast"]["item"]["toAppointmentCompose"]=function(item) - { - if($h.AppointmentCompose["isInstanceOfType"](item)) - return item; - throw Error.argumentType(); - }; - $h.Item=function(data) - { - this.$$d__getBody$p$1=Function.createDelegate(this,this._getBody$p$1); - this.$$d__getAttachments$p$1=Function.createDelegate(this,this._getAttachments$p$1); - this.$$d__getItemClass$p$1=Function.createDelegate(this,this._getItemClass$p$1); - this.$$d__getItemId$p$1=Function.createDelegate(this,this._getItemId$p$1); - this.$$d__getDateTimeModified$p$1=Function.createDelegate(this,this._getDateTimeModified$p$1); - this.$$d__getDateTimeCreated$p$1=Function.createDelegate(this,this._getDateTimeCreated$p$1); - $h.Item["initializeBase"](this,[data]); - $h.InitialData._defineReadOnlyProperty$i(this,"dateTimeCreated",this.$$d__getDateTimeCreated$p$1); - $h.InitialData._defineReadOnlyProperty$i(this,"dateTimeModified",this.$$d__getDateTimeModified$p$1); - $h.InitialData._defineReadOnlyProperty$i(this,"itemId",this.$$d__getItemId$p$1); - $h.InitialData._defineReadOnlyProperty$i(this,"itemClass",this.$$d__getItemClass$p$1); - $h.InitialData._defineReadOnlyProperty$i(this,"attachments",this.$$d__getAttachments$p$1); - $h.InitialData._defineReadOnlyProperty$i(this,"body",this.$$d__getBody$p$1) - }; - $h.Item.prototype={ - _body$p$1: null, - _getItemId$p$1: function() - { - return this._data$p$0.get__itemId$i$0() - }, - _getItemClass$p$1: function() - { - return this._data$p$0.get__itemClass$i$0() - }, - _getDateTimeCreated$p$1: function() - { - return this._data$p$0.get__dateTimeCreated$i$0() - }, - _getDateTimeModified$p$1: function() - { - return this._data$p$0.get__dateTimeModified$i$0() - }, - _getAttachments$p$1: function() - { - return this._data$p$0.get__attachments$i$0() - }, - _getBody$p$1: function() - { - if(!this._body$p$1) - this._body$p$1=new $h.Body; - return this._body$p$1 - } - }; - $h.ItemBase=function(data) - { - this.$$d__createCustomProperties$i$0=Function.createDelegate(this,this._createCustomProperties$i$0); - this.$$d__getNotificationMessages$p$0=Function.createDelegate(this,this._getNotificationMessages$p$0); - this.$$d_getItemType=Function.createDelegate(this,this.getItemType); - this._data$p$0=data; - $h.InitialData._defineReadOnlyProperty$i(this,"itemType",this.$$d_getItemType); - $h.InitialData._defineReadOnlyProperty$i(this,"notificationMessages",this.$$d__getNotificationMessages$p$0) - }; - $h.ItemBase.prototype={ - _data$p$0: null, - _notificationMessages$p$0: null, - get_data: function() - { - return this._data$p$0 - }, - _createCustomProperties$i$0: function(data) - { - return new $h.CustomProperties(data) - }, - _getNotificationMessages$p$0: function() - { - if(!this._notificationMessages$p$0) - this._notificationMessages$p$0=new $h.NotificationMessages; - return this._notificationMessages$p$0 - } - }; - $h.ItemBase.prototype.loadCustomPropertiesAsync=function() - { - var args=[]; - for(var $$pai_3=0; $$pai_3 < arguments["length"];++$$pai_3) - args[$$pai_3]=arguments[$$pai_3]; - var parameters=$h.CommonParameters.parse(args,true,true); - var loadCustomProperties=new $h._loadDictionaryRequest(this.$$d__createCustomProperties$i$0,"customProperties",parameters._callback$p$0,parameters._asyncContext$p$0); - loadCustomProperties._sendRequest$i$0(3,"LoadCustomProperties",{}) - }; - $h.MeetingRequest=function(data) - { - this.$$d__getRequiredAttendees$p$3=Function.createDelegate(this,this._getRequiredAttendees$p$3); - this.$$d__getOptionalAttendees$p$3=Function.createDelegate(this,this._getOptionalAttendees$p$3); - this.$$d__getLocation$p$3=Function.createDelegate(this,this._getLocation$p$3); - this.$$d__getEnd$p$3=Function.createDelegate(this,this._getEnd$p$3); - this.$$d__getStart$p$3=Function.createDelegate(this,this._getStart$p$3); - $h.MeetingRequest["initializeBase"](this,[data]); - $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$3); - $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$3); - $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$3); - $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$3); - $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$3) - }; - $h.MeetingRequest.prototype={ - _getStart$p$3: function() - { - return this._data$p$0.get__start$i$0() - }, - _getEnd$p$3: function() - { - return this._data$p$0.get__end$i$0() - }, - _getLocation$p$3: function() - { - return this._data$p$0.get__location$i$0() - }, - _getOptionalAttendees$p$3: function() - { - return this._data$p$0.get__cc$i$0() - }, - _getRequiredAttendees$p$3: function() - { - return this._data$p$0.get__to$i$0() - } - }; - $h.MeetingSuggestion=function(data, dateTimeSent) - { - this.$$d__getEndTime$p$0=Function.createDelegate(this,this._getEndTime$p$0); - this.$$d__getStartTime$p$0=Function.createDelegate(this,this._getStartTime$p$0); - this.$$d__getSubject$p$0=Function.createDelegate(this,this._getSubject$p$0); - this.$$d__getLocation$p$0=Function.createDelegate(this,this._getLocation$p$0); - this.$$d__getAttendees$p$0=Function.createDelegate(this,this._getAttendees$p$0); - this.$$d__getMeetingString$p$0=Function.createDelegate(this,this._getMeetingString$p$0); - this._data$p$0=data; - this._dateTimeSent$p$0=dateTimeSent; - $h.InitialData._defineReadOnlyProperty$i(this,"meetingString",this.$$d__getMeetingString$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"attendees",this.$$d__getAttendees$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStartTime$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEndTime$p$0) - }; - $h.MeetingSuggestion.prototype={ - _dateTimeSent$p$0: null, - _data$p$0: null, - _attendees$p$0: null, - _getMeetingString$p$0: function() - { - return this._data$p$0["MeetingString"] - }, - _getLocation$p$0: function() - { - return this._data$p$0["Location"] - }, - _getSubject$p$0: function() - { - return this._data$p$0["Subject"] - }, - _getStartTime$p$0: function() - { - var time=this._createDateTimeFromParameter$p$0("StartTime"); - var resolvedTime=$h.MeetingSuggestionTimeDecoder.resolve(time,this._dateTimeSent$p$0); - if(resolvedTime["getTime"]() !==time["getTime"]()) - return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToUtcClientTime"](window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._dateToDictionary$i$0(resolvedTime)); - return time - }, - _getEndTime$p$0: function() - { - var time=this._createDateTimeFromParameter$p$0("EndTime"); - var resolvedTime=$h.MeetingSuggestionTimeDecoder.resolve(time,this._dateTimeSent$p$0); - if(resolvedTime["getTime"]() !==time["getTime"]()) - return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToUtcClientTime"](window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._dateToDictionary$i$0(resolvedTime)); - return time - }, - _createDateTimeFromParameter$p$0: function(keyName) - { - var dateTimeString=this._data$p$0[keyName]; - if(!dateTimeString) - return null; - return new Date(dateTimeString) - }, - _getAttendees$p$0: function() - { - if(!this._attendees$p$0) - { - var $$t_1=this; - this._attendees$p$0=$h.Entities._getExtractedObjects$i($h.EmailAddressDetails,this._data$p$0,"Attendees",function(data) - { - return $h.EmailAddressDetails._createFromEmailUserDictionary$i(data) - }) - } - return this._attendees$p$0 - } - }; - $h.MeetingSuggestionTimeDecoder=function(){}; - $h.MeetingSuggestionTimeDecoder.resolve=function(inTime, sentTime) - { - if(!sentTime) - return inTime; - try - { - var tod; - var outDate; - var extractedDate; - var sentDate=new Date(sentTime["getFullYear"](),sentTime["getMonth"](),sentTime["getDate"](),0,0,0,0); - var $$t_7, - $$t_8, - $$t_9; - if(!($$t_9=$h.MeetingSuggestionTimeDecoder._decode$p(inTime,$$t_7={val: extractedDate},$$t_8={val: tod}),extractedDate=$$t_7["val"],tod=$$t_8["val"],$$t_9)) - return inTime; - else - { - if($h._preciseDate["isInstanceOfType"](extractedDate)) - outDate=$h.MeetingSuggestionTimeDecoder._resolvePreciseDate$p(sentDate,extractedDate); - else if($h._relativeDate["isInstanceOfType"](extractedDate)) - outDate=$h.MeetingSuggestionTimeDecoder._resolveRelativeDate$p(sentDate,extractedDate); - else - outDate=sentDate; - if(window["isNaN"](outDate["getTime"]())) - return sentTime; - outDate["setMilliseconds"](outDate["getMilliseconds"]()+tod); - return outDate - } - } - catch($$e_6) - { - return sentTime - } - }; - $h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i=function(value) - { - return null===value || value===undefined - }; - $h.MeetingSuggestionTimeDecoder._resolvePreciseDate$p=function(sentDate, precise) - { - var year=precise._year$i$1; - var month=!precise._month$i$1 ? sentDate["getMonth"]() : precise._month$i$1 - 1; - var day=precise._day$i$1; - if(!day) - return sentDate; - var candidate; - if($h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i(year)) - { - candidate=new Date(sentDate["getFullYear"](),month,day); - if(candidate["getTime"]() < sentDate["getTime"]()) - candidate=new Date(sentDate["getFullYear"]()+1,month,day) - } - else - candidate=new Date(year < 50 ? 2e3+year : 1900+year,month,day); - if(candidate["getMonth"]() !==month) - return sentDate; - return candidate - }; - $h.MeetingSuggestionTimeDecoder._resolveRelativeDate$p=function(sentDate, relative) - { - var date; - switch(relative._unit$i$1) - { - case 0: - date=new Date(sentDate["getFullYear"](),sentDate["getMonth"](),sentDate["getDate"]()); - date["setDate"](date["getDate"]()+relative._offset$i$1); - return date; - case 5: - return $h.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p(sentDate,relative._offset$i$1,relative._tag$i$1); - case 2: - var days=1; - switch(relative._modifier$i$1) - { - case 1: - break; - case 2: - days=16; - break; - default: - if(!relative._offset$i$1) - days=sentDate["getDate"](); - break - } - date=new Date(sentDate["getFullYear"](),sentDate["getMonth"](),days); - date["setMonth"](date["getMonth"]()+relative._offset$i$1); - if(date["getTime"]() < sentDate["getTime"]()) - date["setDate"](date["getDate"]()+sentDate["getDate"]() - 1); - return date; - case 1: - date=new Date(sentDate["getFullYear"](),sentDate["getMonth"](),sentDate["getDate"]()); - date["setDate"](sentDate["getDate"]()+7 * relative._offset$i$1); - if(relative._modifier$i$1===1 || !relative._modifier$i$1) - { - date["setDate"](date["getDate"]()+1 - date["getDay"]()); - if(date["getTime"]() < sentDate["getTime"]()) - return sentDate; - return date - } - else if(relative._modifier$i$1===2) - { - date["setDate"](date["getDate"]()+5 - date["getDay"]()); - return date - } - break; - case 4: - return $h.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p(sentDate,relative); - case 3: - if(relative._offset$i$1 > 0) - return new Date(sentDate["getFullYear"]()+relative._offset$i$1,0,1); - break; - default: - break - } - return sentDate - }; - $h.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p=function(sentDate, offset, tag) - { - if(offset > -5 && offset < 5) - { - var dayOfWeek=(tag+6) % 7+1; - var days=7 * offset+(dayOfWeek - sentDate["getDay"]()); - sentDate["setDate"](sentDate["getDate"]()+days); - return sentDate - } - else - { - var days=(tag - sentDate["getDay"]()) % 7; - if(days < 0) - days+=7; - sentDate["setDate"](sentDate["getDate"]()+days); - return sentDate - } - }; - $h.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p=function(sentDate, relative) - { - var date; - var firstDay; - var newDate; - date=sentDate; - if(relative._tag$i$1 <=0 || relative._tag$i$1 > 12 || relative._offset$i$1 <=0 || relative._offset$i$1 > 5) - return sentDate; - var monthOffset=(12+relative._tag$i$1 - date["getMonth"]() - 1) % 12; - firstDay=new Date(date["getFullYear"](),date["getMonth"]()+monthOffset,1); - if(relative._modifier$i$1===1) - if(relative._offset$i$1===1 && firstDay["getDay"]() !==6 && firstDay["getDay"]()) - return firstDay; - else - { - newDate=new Date(firstDay["getFullYear"](),firstDay["getMonth"](),firstDay["getDate"]()); - newDate["setDate"](newDate["getDate"]()+(7+(1 - firstDay["getDay"]())) % 7); - if(firstDay["getDay"]() !==6 && firstDay["getDay"]() && firstDay["getDay"]() !==1) - newDate["setDate"](newDate["getDate"]() - 7); - newDate["setDate"](newDate["getDate"]()+7 * (relative._offset$i$1 - 1)); - if(newDate["getMonth"]()+1 !==relative._tag$i$1) - return sentDate; - return newDate - } - else - { - newDate=new Date(firstDay["getFullYear"](),firstDay["getMonth"](),$h.MeetingSuggestionTimeDecoder._daysInMonth$p(firstDay["getMonth"](),firstDay["getFullYear"]())); - var offset=1 - newDate["getDay"](); - if(offset > 0) - offset=offset - 7; - newDate["setDate"](newDate["getDate"]()+offset); - newDate["setDate"](newDate["getDate"]()+7 * (1 - relative._offset$i$1)); - if(newDate["getMonth"]()+1 !==relative._tag$i$1) - if(firstDay["getDay"]() !==6 && firstDay["getDay"]()) - return firstDay; - else - return sentDate; - else - return newDate - } - }; - $h.MeetingSuggestionTimeDecoder._decode$p=function(inDate, date, time) - { - var DateValueMask=32767; - date["val"]=null; - time["val"]=0; - if(!inDate) - return false; - time["val"]=$h.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p(inDate); - var inDateAtMidnight=inDate["getTime"]() - time["val"]; - var value=(inDateAtMidnight - $h.MeetingSuggestionTimeDecoder._baseDate$p["getTime"]()) / 864e5; - if(value < 0) - return false; - else if(value >=262144) - return false; - else - { - var type=value >> 15; - value=value & DateValueMask; - switch(type) - { - case 0: - return $h.MeetingSuggestionTimeDecoder._decodePreciseDate$p(value,date); - case 1: - return $h.MeetingSuggestionTimeDecoder._decodeRelativeDate$p(value,date); - default: - return false - } - } - }; - $h.MeetingSuggestionTimeDecoder._decodePreciseDate$p=function(value, date) - { - var c_SubTypeMask=7; - var c_MonthMask=15; - var c_DayMask=31; - var c_YearMask=127; - var year=null; - var month=0; - var day=0; - date["val"]=null; - var subType=value >> 12 & c_SubTypeMask; - if((subType & 4)===4) - { - year=value >> 5 & c_YearMask; - if((subType & 2)===2) - { - if((subType & 1)===1) - return false; - month=value >> 1 & c_MonthMask - } - } - else - { - if((subType & 2)===2) - month=value >> 8 & c_MonthMask; - if((subType & 1)===1) - day=value >> 3 & c_DayMask - } - date["val"]=new $h._preciseDate(day,month,year); - return true - }; - $h.MeetingSuggestionTimeDecoder._decodeRelativeDate$p=function(value, date) - { - var TagMask=15; - var OffsetMask=63; - var UnitMask=7; - var ModifierMask=3; - var tag=value & TagMask; - value >>=4; - var offset=$h.MeetingSuggestionTimeDecoder._fromComplement$p(value & OffsetMask,6); - value >>=6; - var unit=value & UnitMask; - value >>=3; - var modifier=value & ModifierMask; - try - { - date["val"]=new $h._relativeDate(modifier,offset,unit,tag); - return true - } - catch($$e_A) - { - date["val"]=null; - return false - } - }; - $h.MeetingSuggestionTimeDecoder._fromComplement$p=function(value, n) - { - var signed=1 << n - 1; - var mask=(1 << n) - 1; - if((value & signed)===signed) - return-((value ^ mask)+1); - else - return value - }; - $h.MeetingSuggestionTimeDecoder._daysInMonth$p=function(month, year) - { - return 32 - new Date(year,month,32)["getDate"]() - }; - $h.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p=function(inputTime) - { - var timeOfDay=0; - timeOfDay+=inputTime["getUTCHours"]() * 3600; - timeOfDay+=inputTime["getUTCMinutes"]() * 60; - timeOfDay+=inputTime["getUTCSeconds"](); - timeOfDay *=1e3; - timeOfDay+=inputTime["getUTCMilliseconds"](); - return timeOfDay - }; - $h._extractedDate=function(){}; - $h._preciseDate=function(day, month, year) - { - $h._preciseDate["initializeBase"](this); - if(day < 0 || day > 31) - throw Error.argumentOutOfRange("day"); - if(month < 0 || month > 12) - throw Error.argumentOutOfRange("month"); - this._day$i$1=day; - this._month$i$1=month; - if(!$h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i(year)) - { - if(!month && day) - throw Error.argument("Invalid arguments"); - if(year < 0 || year > 2099) - throw Error.argumentOutOfRange("year"); - this._year$i$1=year % 100 - } - else if(!this._month$i$1 && !this._day$i$1) - throw Error.argument("Invalid datetime"); - }; - $h._preciseDate.prototype={ - _day$i$1: 0, - _month$i$1: 0, - _year$i$1: null - }; - $h._relativeDate=function(modifier, offset, unit, tag) - { - $h._relativeDate["initializeBase"](this); - if(offset < -32 || offset > 31) - throw Error.argumentOutOfRange("offset"); - if(tag < 0 || tag > 15) - throw Error.argumentOutOfRange("tag"); - if(!unit && offset < 0) - throw Error.argument("unit & offset do not form a valid date"); - this._modifier$i$1=modifier; - this._offset$i$1=offset; - this._unit$i$1=unit; - this._tag$i$1=tag - }; - $h._relativeDate.prototype={ - _modifier$i$1: 0, - _offset$i$1: 0, - _unit$i$1: 0, - _tag$i$1: 0 - }; - $h.Message=function(dataDictionary) - { - this.$$d__getConversationId$p$2=Function.createDelegate(this,this._getConversationId$p$2); - this.$$d__getInternetMessageId$p$2=Function.createDelegate(this,this._getInternetMessageId$p$2); - this.$$d__getCc$p$2=Function.createDelegate(this,this._getCc$p$2); - this.$$d__getTo$p$2=Function.createDelegate(this,this._getTo$p$2); - this.$$d__getFrom$p$2=Function.createDelegate(this,this._getFrom$p$2); - this.$$d__getSender$p$2=Function.createDelegate(this,this._getSender$p$2); - this.$$d__getNormalizedSubject$p$2=Function.createDelegate(this,this._getNormalizedSubject$p$2); - this.$$d__getSubject$p$2=Function.createDelegate(this,this._getSubject$p$2); - $h.Message["initializeBase"](this,[dataDictionary]); - $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"sender",this.$$d__getSender$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"from",this.$$d__getFrom$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"to",this.$$d__getTo$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"cc",this.$$d__getCc$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"internetMessageId",this.$$d__getInternetMessageId$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"conversationId",this.$$d__getConversationId$p$2) - }; - $h.Message.prototype={ - getItemType: function() - { - return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Message"] - }, - _getSubject$p$2: function() - { - return this._data$p$0.get__subject$i$0() - }, - _getNormalizedSubject$p$2: function() - { - return this._data$p$0.get__normalizedSubject$i$0() - }, - _getSender$p$2: function() - { - return this._data$p$0.get__sender$i$0() - }, - _getFrom$p$2: function() - { - return this._data$p$0.get__from$i$0() - }, - _getTo$p$2: function() - { - return this._data$p$0.get__to$i$0() - }, - _getCc$p$2: function() - { - return this._data$p$0.get__cc$i$0() - }, - _getInternetMessageId$p$2: function() - { - return this._data$p$0.get__internetMessageId$i$0() - }, - _getConversationId$p$2: function() - { - return this._data$p$0.get__conversationId$i$0() - } - }; - $h.Message.prototype.getEntities=function() - { - return this._data$p$0._getEntities$i$0() - }; - $h.Message.prototype.getEntitiesByType=function(entityType) - { - return this._data$p$0._getEntitiesByType$i$0(entityType) - }; - $h.Message.prototype.getFilteredEntitiesByName=function(name) - { - return this._data$p$0._getFilteredEntitiesByName$i$0(name) - }; - $h.Message.prototype.getSelectedEntities=function() - { - return this._data$p$0._getSelectedEntities$i$0() - }; - $h.Message.prototype.getRegExMatches=function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches"); - return this._data$p$0._getRegExMatches$i$0() - }; - $h.Message.prototype.getRegExMatchesByName=function(name) - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName"); - return this._data$p$0._getRegExMatchesByName$i$0(name) - }; - $h.Message.prototype.getSelectedRegExMatches=function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedRegExMatches"); - return this._data$p$0._getSelectedRegExMatches$i$0() - }; - $h.Message.prototype.displayReplyForm=function(obj) - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyForm$i$0(obj) - }; - $h.Message.prototype.displayReplyAllForm=function(obj) - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyAllForm$i$0(obj) - }; - $h.MessageCompose=function(data) - { - this.$$d__getConversationId$p$2=Function.createDelegate(this,this._getConversationId$p$2); - this.$$d__getBcc$p$2=Function.createDelegate(this,this._getBcc$p$2); - this.$$d__getCc$p$2=Function.createDelegate(this,this._getCc$p$2); - this.$$d__getTo$p$2=Function.createDelegate(this,this._getTo$p$2); - $h.MessageCompose["initializeBase"](this,[data]); - $h.InitialData._defineReadOnlyProperty$i(this,"to",this.$$d__getTo$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"cc",this.$$d__getCc$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"bcc",this.$$d__getBcc$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"conversationId",this.$$d__getConversationId$p$2) - }; - $h.MessageCompose.prototype={ - _to$p$2: null, - _cc$p$2: null, - _bcc$p$2: null, - getItemType: function() - { - return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Message"] - }, - _getTo$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._to$p$2) - this._to$p$2=new $h.ComposeRecipient(0,"to"); - return this._to$p$2 - }, - _getCc$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._cc$p$2) - this._cc$p$2=new $h.ComposeRecipient(1,"cc"); - return this._cc$p$2 - }, - _getBcc$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._bcc$p$2) - this._bcc$p$2=new $h.ComposeRecipient(2,"bcc"); - return this._bcc$p$2 - }, - _getConversationId$p$2: function() - { - return this._data$p$0.get__conversationId$i$0() - } - }; - $h.NotificationMessages=function(){}; - $h.NotificationMessages._mapToHostItemNotificationMessageType$p=function(dataToHost) - { - var notificationType; - var hostItemNotificationMessageType; - notificationType=dataToHost["type"]; - if(notificationType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["ProgressIndicator"]) - hostItemNotificationMessageType=1; - else if(notificationType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["InformationalMessage"]) - hostItemNotificationMessageType=0; - else if(notificationType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["ErrorMessage"]) - hostItemNotificationMessageType=2; - else - throw Error.argument("type"); - dataToHost["type"]=hostItemNotificationMessageType - }; - $h.NotificationMessages._validateKey$p=function(key) - { - if(!$h.ScriptHelpers.isNonEmptyString(key)) - throw Error.argument("key"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(key.length,0,32,"key") - }; - $h.NotificationMessages._validateDictionary$p=function(dictionary) - { - if(!$h.ScriptHelpers.isNonEmptyString(dictionary["type"])) - throw Error.argument("type"); - if(dictionary["type"]===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["InformationalMessage"]) - { - if(!$h.ScriptHelpers.isNonEmptyString(dictionary["icon"])) - throw Error.argument("icon"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(dictionary["icon"].length,0,32,"icon"); - if($h.ScriptHelpers.isUndefined(dictionary["persistent"])) - throw Error.argument("persistent"); - if(!Boolean["isInstanceOfType"](dictionary["persistent"])) - throw Error.argumentType("persistent",Object["getType"](dictionary["persistent"]),Boolean); - } - else - { - if(!$h.ScriptHelpers.isUndefined(dictionary["icon"])) - throw Error.argument("icon"); - if(!$h.ScriptHelpers.isUndefined(dictionary["persistent"])) - throw Error.argument("persistent"); - } - if(!$h.ScriptHelpers.isNonEmptyString(dictionary["message"])) - throw Error.argument("message"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(dictionary["message"].length,0,150,"message") - }; - $h.NotificationMessages.prototype.addAsync=function(key, dictionary) - { - var args=[]; - for(var $$pai_5=2; $$pai_5 < arguments["length"];++$$pai_5) - args[$$pai_5 - 2]=arguments[$$pai_5]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.addAsync"); - var commonParameters=$h.CommonParameters.parse(args,false); - $h.NotificationMessages._validateKey$p(key); - $h.NotificationMessages._validateDictionary$p(dictionary); - var dataToHost={}; - dataToHost=$h.ScriptHelpers.deepClone(dictionary); - dataToHost["key"]=key; - $h.NotificationMessages._mapToHostItemNotificationMessageType$p(dataToHost); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(33,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.NotificationMessages.prototype.getAllAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.getAllAsync"); - var commonParameters=$h.CommonParameters.parse(args,true); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(34,null,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.NotificationMessages.prototype.replaceAsync=function(key, dictionary) - { - var args=[]; - for(var $$pai_5=2; $$pai_5 < arguments["length"];++$$pai_5) - args[$$pai_5 - 2]=arguments[$$pai_5]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.replaceAsync"); - var commonParameters=$h.CommonParameters.parse(args,false); - $h.NotificationMessages._validateKey$p(key); - $h.NotificationMessages._validateDictionary$p(dictionary); - var dataToHost={}; - dataToHost=$h.ScriptHelpers.deepClone(dictionary); - dataToHost["key"]=key; - $h.NotificationMessages._mapToHostItemNotificationMessageType$p(dataToHost); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(35,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.NotificationMessages.prototype.removeAsync=function(key) - { - var args=[]; - for(var $$pai_4=1; $$pai_4 < arguments["length"];++$$pai_4) - args[$$pai_4 - 1]=arguments[$$pai_4]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.removeAsync"); - var commonParameters=$h.CommonParameters.parse(args,false); - $h.NotificationMessages._validateKey$p(key); - var dataToHost={key: key}; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(36,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.OutlookErrorManager=function(){}; - $h.OutlookErrorManager.getErrorArgs=function(errorCode) - { - if(!$h.OutlookErrorManager._isInitialized$p) - $h.OutlookErrorManager._initialize$p(); - return OSF.DDA.ErrorCodeManager["getErrorArgs"](errorCode) - }; - $h.OutlookErrorManager._initialize$p=function() - { - $h.OutlookErrorManager._addErrorMessage$p(9e3,"AttachmentSizeExceeded",window["_u"]["ExtensibilityStrings"]["l_AttachmentExceededSize_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9001,"NumberOfAttachmentsExceeded",window["_u"]["ExtensibilityStrings"]["l_ExceededMaxNumberOfAttachments_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9002,"InternalFormatError",window["_u"]["ExtensibilityStrings"]["l_InternalFormatError_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9003,"InvalidAttachmentId",window["_u"]["ExtensibilityStrings"]["l_InvalidAttachmentId_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9004,"InvalidAttachmentPath",window["_u"]["ExtensibilityStrings"]["l_InvalidAttachmentPath_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9005,"CannotAddAttachmentBeforeUpgrade",window["_u"]["ExtensibilityStrings"]["l_CannotAddAttachmentBeforeUpgrade_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9006,"AttachmentDeletedBeforeUploadCompletes",window["_u"]["ExtensibilityStrings"]["l_AttachmentDeletedBeforeUploadCompletes_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9007,"AttachmentUploadGeneralFailure",window["_u"]["ExtensibilityStrings"]["l_AttachmentUploadGeneralFailure_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9008,"AttachmentToDeleteDoesNotExist",window["_u"]["ExtensibilityStrings"]["l_DeleteAttachmentDoesNotExist_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9009,"AttachmentDeleteGeneralFailure",window["_u"]["ExtensibilityStrings"]["l_AttachmentDeleteGeneralFailure_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9010,"InvalidEndTime",window["_u"]["ExtensibilityStrings"]["l_InvalidEndTime_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9011,"HtmlSanitizationFailure",window["_u"]["ExtensibilityStrings"]["l_HtmlSanitizationFailure_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9012,"NumberOfRecipientsExceeded",String.format(window["_u"]["ExtensibilityStrings"]["l_NumberOfRecipientsExceeded_Text"],500)); - $h.OutlookErrorManager._addErrorMessage$p(9013,"NoValidRecipientsProvided",window["_u"]["ExtensibilityStrings"]["l_NoValidRecipientsProvided_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9014,"CursorPositionChanged",window["_u"]["ExtensibilityStrings"]["l_CursorPositionChanged_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9016,"InvalidSelection",window["_u"]["ExtensibilityStrings"]["l_InvalidSelection_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9017,"AccessRestricted",""); - $h.OutlookErrorManager._addErrorMessage$p(9018,"GenericTokenError",""); - $h.OutlookErrorManager._addErrorMessage$p(9019,"GenericSettingsError",""); - $h.OutlookErrorManager._addErrorMessage$p(9020,"GenericResponseError",""); - $h.OutlookErrorManager._addErrorMessage$p(9021,"SaveError",window["_u"]["ExtensibilityStrings"]["l_SaveError_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9022,"MessageInDifferentStoreError",window["_u"]["ExtensibilityStrings"]["l_MessageInDifferentStoreError_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9023,"DuplicateNotificationKey",window["_u"]["ExtensibilityStrings"]["l_DuplicateNotificationKey_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9024,"NotificationKeyNotFound",window["_u"]["ExtensibilityStrings"]["l_NotificationKeyNotFound_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9025,"NumberOfNotificationsExceeded",window["_u"]["ExtensibilityStrings"]["l_NumberOfNotificationsExceeded_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9026,"PersistedNotificationArrayReadError",window["_u"]["ExtensibilityStrings"]["l_PersistedNotificationArrayReadError_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9027,"PersistedNotificationArraySaveError",window["_u"]["ExtensibilityStrings"]["l_PersistedNotificationArraySaveError_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9028,"CannotPersistPropertyInUnsavedDraftError",window["_u"]["ExtensibilityStrings"]["l_CannotPersistPropertyInUnsavedDraftError_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9029,"CanOnlyGetTokenForSavedItem",window["_u"]["ExtensibilityStrings"]["l_CallSaveAsyncBeforeToken_Text"]); - $h.OutlookErrorManager._isInitialized$p=true - }; - $h.OutlookErrorManager._addErrorMessage$p=function(errorCode, errorName, errorMessage) - { - OSF.DDA.ErrorCodeManager["addErrorMessage"](errorCode,{ - name: errorName, - message: errorMessage - }) - }; - $h.OutlookErrorManager.OutlookErrorCodes=function(){}; - $h.OutlookErrorManager.OsfDdaErrorCodes=function(){}; - $h.PhoneNumber=function(data) - { - this.$$d__getPhoneType$p$0=Function.createDelegate(this,this._getPhoneType$p$0); - this.$$d__getOriginalPhoneString$p$0=Function.createDelegate(this,this._getOriginalPhoneString$p$0); - this.$$d__getPhoneString$p$0=Function.createDelegate(this,this._getPhoneString$p$0); - this._data$p$0=data; - $h.InitialData._defineReadOnlyProperty$i(this,"phoneString",this.$$d__getPhoneString$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"originalPhoneString",this.$$d__getOriginalPhoneString$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"type",this.$$d__getPhoneType$p$0) - }; - $h.PhoneNumber.prototype={ - _data$p$0: null, - _getPhoneString$p$0: function() - { - return this._data$p$0["PhoneString"] - }, - _getOriginalPhoneString$p$0: function() - { - return this._data$p$0["OriginalPhoneString"] - }, - _getPhoneType$p$0: function() - { - return this._data$p$0["Type"] - } - }; - $h.TaskSuggestion=function(data) - { - this.$$d__getAssignees$p$0=Function.createDelegate(this,this._getAssignees$p$0); - this.$$d__getTaskString$p$0=Function.createDelegate(this,this._getTaskString$p$0); - this._data$p$0=data; - $h.InitialData._defineReadOnlyProperty$i(this,"taskString",this.$$d__getTaskString$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"assignees",this.$$d__getAssignees$p$0) - }; - $h.TaskSuggestion.prototype={ - _data$p$0: null, - _assignees$p$0: null, - _getTaskString$p$0: function() - { - return this._data$p$0["TaskString"] - }, - _getAssignees$p$0: function() - { - if(!this._assignees$p$0) - { - var $$t_1=this; - this._assignees$p$0=$h.Entities._getExtractedObjects$i($h.EmailAddressDetails,this._data$p$0,"Assignees",function(data) - { - return $h.EmailAddressDetails._createFromEmailUserDictionary$i(data) - }) - } - return this._assignees$p$0 - } - }; - $h.UserProfile=function(data) - { - this.$$d__getUserProfileType$p$0=Function.createDelegate(this,this._getUserProfileType$p$0); - this.$$d__getTimeZone$p$0=Function.createDelegate(this,this._getTimeZone$p$0); - this.$$d__getEmailAddress$p$0=Function.createDelegate(this,this._getEmailAddress$p$0); - this.$$d__getDisplayName$p$0=Function.createDelegate(this,this._getDisplayName$p$0); - this._data$p$0=data; - $h.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"timeZone",this.$$d__getTimeZone$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"type",this.$$d__getUserProfileType$p$0) - }; - $h.UserProfile.prototype={ - _data$p$0: null, - _getUserProfileType$p$0: function() - { - return this._data$p$0.get__userProfileType$i$0() - }, - _getDisplayName$p$0: function() - { - return this._data$p$0.get__userDisplayName$i$0() - }, - _getEmailAddress$p$0: function() - { - return this._data$p$0.get__userEmailAddress$i$0() - }, - _getTimeZone$p$0: function() - { - return this._data$p$0.get__userTimeZone$i$0() - } - }; - $h.OutlookDispid=function(){}; - $h.OutlookDispid.prototype={ - owaOnlyMethod: 0, - getInitialData: 1, - getUserIdentityToken: 2, - loadCustomProperties: 3, - saveCustomProperties: 4, - ewsRequest: 5, - displayNewAppointmentForm: 7, - displayMessageForm: 8, - displayAppointmentForm: 9, - displayReplyForm: 10, - displayReplyAllForm: 11, - getCallbackToken: 12, - bodySetSelectedDataAsync: 13, - getBodyTypeAsync: 14, - getRecipientsAsync: 15, - addFileAttachmentAsync: 16, - setSubjectAsync: 17, - getSubjectAsync: 18, - addItemAttachmentAsync: 19, - removeAttachmentAsync: 20, - setRecipientsAsync: 21, - addRecipientsAsync: 22, - bodyPrependAsync: 23, - getTimeAsync: 24, - setTimeAsync: 25, - getLocationAsync: 26, - setLocationAsync: 27, - getSelectedDataAsync: 28, - setSelectedDataAsync: 29, - displayReplyFormWithAttachments: 30, - displayReplyAllFormWithAttachments: 31, - saveAsync: 32, - addNotficationMessageAsync: 33, - getAllNotficationMessagesAsync: 34, - replaceNotficationMessageAsync: 35, - removeNotficationMessageAsync: 36, - getBodyAsync: 37, - setBodyAsync: 38, - appCommands1: 39, - registerConsentAsync: 40, - close: 41, - closeApp: 42, - displayPersonaCardAsync: 43, - displayNewMessageForm: 44, - navigateToModuleAsync: 45, - eventCompleted: 94, - closeContainer: 97, - messageParent: 144, - trackCtq: 400, - recordTrace: 401, - recordDataPoint: 402, - windowOpenOverrideHandler: 403, - saveSettingsRequest: 404 - }; - $h.OutlookDispid["registerEnum"]("$h.2",false); - $h.RequestState=function(){}; - $h.RequestState.prototype={ - unsent: 0, - opened: 1, - headersReceived: 2, - loading: 3, - done: 4 - }; - $h.RequestState["registerEnum"]("$h.3",false); - $h.CommonParameters=function(options, callback, asyncContext) - { - this._options$p$0=options; - this._callback$p$0=callback; - this._asyncContext$p$0=asyncContext - }; - $h.CommonParameters.parse=function(args, isCallbackRequired, tryLegacy) - { - var legacyParameters; - var $$t_8, - $$t_9; - if(tryLegacy && ($$t_9=$h.CommonParameters._tryParseLegacy$p(args,$$t_8={val: legacyParameters}),legacyParameters=$$t_8["val"],$$t_9)) - return legacyParameters; - var argsLength=args["length"]; - var options=null; - var callback=null; - var asyncContext=null; - if(argsLength===1) - if(Function["isInstanceOfType"](args[0])) - callback=args[0]; - else if(Object["isInstanceOfType"](args[0])) - options=args[0]; - else - throw Error.argumentType(); - else if(argsLength===2) - { - if(!Object["isInstanceOfType"](args[0])) - throw Error.argument("options"); - if(!Function["isInstanceOfType"](args[1])) - throw Error.argument("callback"); - options=args[0]; - callback=args[1] - } - else if(argsLength) - throw Error.parameterCount(window["_u"]["ExtensibilityStrings"]["l_ParametersNotAsExpected_Text"]); - if(isCallbackRequired && !callback) - throw Error.argumentNull("callback"); - if(options && !$h.ScriptHelpers.isNullOrUndefined(options["asyncContext"])) - asyncContext=options["asyncContext"]; - return new $h.CommonParameters(options,callback,asyncContext) - }; - $h.CommonParameters._tryParseLegacy$p=function(args, commonParameters) - { - commonParameters["val"]=null; - var argsLength=args["length"]; - var callback=null; - var userContext=null; - if(!argsLength || argsLength > 2) - return false; - if(!Function["isInstanceOfType"](args[0])) - return false; - callback=args[0]; - if(argsLength > 1) - userContext=args[1]; - commonParameters["val"]=new $h.CommonParameters(null,callback,userContext); - return true - }; - $h.CommonParameters.prototype={ - _options$p$0: null, - _callback$p$0: null, - _asyncContext$p$0: null, - get_options: function() - { - return this._options$p$0 - }, - get_callback: function() - { - return this._callback$p$0 - }, - get_asyncContext: function() - { - return this._asyncContext$p$0 - } - }; - $h.EwsRequest=function(userContext) - { - $h.EwsRequest["initializeBase"](this,[userContext]) - }; - $h.EwsRequest.prototype={ - readyState: 1, - status: 0, - statusText: null, - onreadystatechange: null, - responseText: null, - get__statusCode$i$1: function() - { - return this.status - }, - set__statusCode$i$1: function(value) - { - this.status=value; - return value - }, - get__statusDescription$i$1: function() - { - return this.statusText - }, - set__statusDescription$i$1: function(value) - { - this.statusText=value; - return value - }, - get__requestState$i$1: function() - { - return this.readyState - }, - set__requestState$i$1: function(value) - { - this.readyState=value; - return value - }, - get_hasOnReadyStateChangeCallback: function() - { - return!$h.ScriptHelpers.isNullOrUndefined(this.onreadystatechange) - }, - get__response$i$1: function() - { - return this.responseText - }, - set__response$i$1: function(value) - { - this.responseText=value; - return value - }, - send: function(data) - { - this._checkSendConditions$i$1(); - if($h.ScriptHelpers.isNullOrUndefined(data)) - this._throwInvalidStateException$i$1(); - this._sendRequest$i$0(5,"EwsRequest",{body: data}) - }, - _callOnReadyStateChangeCallback$i$1: function() - { - if(!$h.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)) - this.onreadystatechange() - }, - _parseExtraResponseData$i$1: function(response){}, - executeExtraFailedResponseSteps: function(){} - }; - $h.InitialData=function(data) - { - this._data$p$0=data; - this._permissionLevel$p$0=this._calculatePermissionLevel$p$0() - }; - $h.InitialData._defineReadOnlyProperty$i=function(o, methodName, getter) - { - var propertyDescriptor={ - get: getter, - configurable: false - }; - window["Object"]["defineProperty"](o,methodName,propertyDescriptor) - }; - $h.InitialData.prototype={ - _toRecipients$p$0: null, - _ccRecipients$p$0: null, - _attachments$p$0: null, - _resources$p$0: null, - _entities$p$0: null, - _selectedEntities$p$0: null, - _data$p$0: null, - _permissionLevel$p$0: 0, - get__isRestIdSupported$i$0: function() - { - return this._data$p$0["isRestIdSupported"] - }, - get__itemId$i$0: function() - { - return this._data$p$0["id"] - }, - get__itemClass$i$0: function() - { - return this._data$p$0["itemClass"] - }, - get__dateTimeCreated$i$0: function() - { - return new Date(this._data$p$0["dateTimeCreated"]) - }, - get__dateTimeModified$i$0: function() - { - return new Date(this._data$p$0["dateTimeModified"]) - }, - get__dateTimeSent$i$0: function() - { - return new Date(this._data$p$0["dateTimeSent"]) - }, - get__subject$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - return this._data$p$0["subject"] - }, - get__normalizedSubject$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - return this._data$p$0["normalizedSubject"] - }, - get__internetMessageId$i$0: function() - { - return this._data$p$0["internetMessageId"] - }, - get__conversationId$i$0: function() - { - return this._data$p$0["conversationId"] - }, - get__sender$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - var sender=this._data$p$0["sender"]; - return $h.ScriptHelpers.isNullOrUndefined(sender) ? null : new $h.EmailAddressDetails(sender) - }, - get__from$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - var from=this._data$p$0["from"]; - return $h.ScriptHelpers.isNullOrUndefined(from) ? null : new $h.EmailAddressDetails(from) - }, - get__to$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - if(null===this._toRecipients$p$0) - this._toRecipients$p$0=this._createEmailAddressDetails$p$0("to"); - return this._toRecipients$p$0 - }, - get__cc$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - if(null===this._ccRecipients$p$0) - this._ccRecipients$p$0=this._createEmailAddressDetails$p$0("cc"); - return this._ccRecipients$p$0 - }, - get__attachments$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - if(null===this._attachments$p$0) - this._attachments$p$0=this._createAttachmentDetails$p$0(); - return this._attachments$p$0 - }, - get__ewsUrl$i$0: function() - { - return this._data$p$0["ewsUrl"] - }, - get__restUrl$i$0: function() - { - return this._data$p$0["restUrl"] - }, - get__marketplaceAssetId$i$0: function() - { - return this._data$p$0["marketplaceAssetId"] - }, - get__extensionId$i$0: function() - { - return this._data$p$0["extensionId"] - }, - get__marketplaceContentMarket$i$0: function() - { - return this._data$p$0["marketplaceContentMarket"] - }, - get__consentMetadata$i$0: function() - { - return this._data$p$0["consentMetadata"] - }, - get__isRead$i$0: function() - { - return this._data$p$0["isRead"] - }, - get__endNodeUrl$i$0: function() - { - return this._data$p$0["endNodeUrl"] - }, - get__entryPointUrl$i$0: function() - { - return this._data$p$0["entryPointUrl"] - }, - get__start$i$0: function() - { - return new Date(this._data$p$0["start"]) - }, - get__end$i$0: function() - { - return new Date(this._data$p$0["end"]) - }, - get__location$i$0: function() - { - return this._data$p$0["location"] - }, - get__userProfileType$i$0: function() - { - return this._data$p$0["userProfileType"] - }, - get__resources$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - if(null===this._resources$p$0) - this._resources$p$0=this._createEmailAddressDetails$p$0("resources"); - return this._resources$p$0 - }, - get__organizer$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - var organizer=this._data$p$0["organizer"]; - return $h.ScriptHelpers.isNullOrUndefined(organizer) ? null : new $h.EmailAddressDetails(organizer) - }, - get__userDisplayName$i$0: function() - { - return this._data$p$0["userDisplayName"] - }, - get__userEmailAddress$i$0: function() - { - return this._data$p$0["userEmailAddress"] - }, - get__userTimeZone$i$0: function() - { - return this._data$p$0["userTimeZone"] - }, - get__timeZoneOffsets$i$0: function() - { - return this._data$p$0["timeZoneOffsets"] - }, - get__hostVersion$i$0: function() - { - return this._data$p$0["hostVersion"] - }, - get__owaView$i$0: function() - { - return this._data$p$0["owaView"] - }, - get__overrideWindowOpen$i$0: function() - { - return this._data$p$0["overrideWindowOpen"] - }, - _getEntities$i$0: function() - { - if(!this._entities$p$0) - this._entities$p$0=new $h.Entities(this._data$p$0["entities"],this._data$p$0["filteredEntities"],this.get__dateTimeSent$i$0(),this._permissionLevel$p$0); - return this._entities$p$0 - }, - _getSelectedEntities$i$0: function() - { - if(!this._selectedEntities$p$0) - this._selectedEntities$p$0=new $h.Entities(this._data$p$0["selectedEntities"],null,this.get__dateTimeSent$i$0(),this._permissionLevel$p$0); - return this._selectedEntities$p$0 - }, - _getEntitiesByType$i$0: function(entityType) - { - var entites=this._getEntities$i$0(); - return entites._getByType$i$0(entityType) - }, - _getFilteredEntitiesByName$i$0: function(name) - { - var entities=this._getEntities$i$0(); - return entities._getFilteredEntitiesByName$i$0(name) - }, - _getRegExMatches$i$0: function() - { - if(!this._data$p$0["regExMatches"]) - return null; - return this._data$p$0["regExMatches"] - }, - _getSelectedRegExMatches$i$0: function() - { - if(!this._data$p$0["selectedRegExMatches"]) - return null; - return this._data$p$0["selectedRegExMatches"] - }, - _getRegExMatchesByName$i$0: function(regexName) - { - var regexMatches=this._getRegExMatches$i$0(); - if(!regexMatches || !regexMatches[regexName]) - return null; - return regexMatches[regexName] - }, - _throwOnRestrictedPermissionLevel$i$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0) - }, - _createEmailAddressDetails$p$0: function(key) - { - var to=this._data$p$0[key]; - if($h.ScriptHelpers.isNullOrUndefined(to)) - return[]; - var recipients=[]; - for(var i=0; i < to["length"]; i++) - if(!$h.ScriptHelpers.isNullOrUndefined(to[i])) - recipients[i]=new $h.EmailAddressDetails(to[i]); - return recipients - }, - _createAttachmentDetails$p$0: function() - { - var attachments=this._data$p$0["attachments"]; - if($h.ScriptHelpers.isNullOrUndefined(attachments)) - return[]; - var attachmentDetails=[]; - for(var i=0; i < attachments["length"]; i++) - if(!$h.ScriptHelpers.isNullOrUndefined(attachments[i])) - attachmentDetails[i]=new $h.AttachmentDetails(attachments[i]); - return attachmentDetails - }, - _calculatePermissionLevel$p$0: function() - { - var HostReadItem=1; - var HostReadWriteMailbox=2; - var HostReadWriteItem=3; - var permissionLevelFromHost=this._data$p$0["permissionLevel"]; - if($h.ScriptHelpers.isUndefined(this._permissionLevel$p$0)) - return 0; - switch(permissionLevelFromHost) - { - case HostReadItem: - return 1; - case HostReadWriteItem: - return 2; - case HostReadWriteMailbox: - return 3; - default: - return 0 - } - } - }; - $h._loadDictionaryRequest=function(createResultObject, dictionaryName, callback, userContext) - { - $h._loadDictionaryRequest["initializeBase"](this,[userContext]); - this._createResultObject$p$1=createResultObject; - this._dictionaryName$p$1=dictionaryName; - this._callback$p$1=callback - }; - $h._loadDictionaryRequest.prototype={ - _dictionaryName$p$1: null, - _createResultObject$p$1: null, - _callback$p$1: null, - handleResponse: function(response) - { - if(response["wasSuccessful"]) - { - var value=response[this._dictionaryName$p$1]; - var responseData=window["JSON"]["parse"](value); - this.createAsyncResult(this._createResultObject$p$1(responseData),0,0,null) - } - else - this.createAsyncResult(null,1,9020,response["errorMessage"]); - this._callback$p$1(this._asyncResult$p$0) - } - }; - $h.ProxyRequestBase=function(userContext) - { - $h.ProxyRequestBase["initializeBase"](this,[userContext]) - }; - $h.ProxyRequestBase.prototype={ - handleResponse: function(response) - { - if(!response["wasProxySuccessful"]) - { - this.set__statusCode$i$1(500); - this.set__statusDescription$i$1("Error"); - var errorMessage=response["errorMessage"]; - this.set__response$i$1(errorMessage); - this.createAsyncResult(null,1,9020,errorMessage) - } - else - { - this.set__statusCode$i$1(response["statusCode"]); - this.set__statusDescription$i$1(response["statusDescription"]); - this.set__response$i$1(response["body"]); - this.createAsyncResult(this.get__response$i$1(),0,0,null) - } - this._parseExtraResponseData$i$1(response); - this._cycleReadyStateFromHeadersReceivedToLoadingToDone$i$1() - }, - _throwInvalidStateException$i$1: function() - { - throw Error.create("DOMException",{ - code: 11, - message: "INVALID_STATE_ERR" - }); - }, - _cycleReadyStateFromHeadersReceivedToLoadingToDone$i$1: function() - { - var $$t_0=this; - this._changeReadyState$i$1(2,function() - { - $$t_0._changeReadyState$i$1(3,function() - { - $$t_0._changeReadyState$i$1(4,null) - }) - }) - }, - _changeReadyState$i$1: function(state, nextStep) - { - this.set__requestState$i$1(state); - var $$t_2=this; - window.setTimeout(function() - { - try - { - $$t_2._callOnReadyStateChangeCallback$i$1() - } - finally - { - if(!$h.ScriptHelpers.isNullOrUndefined(nextStep)) - nextStep() - } - },0) - }, - _checkSendConditions$i$1: function() - { - if(this.get__requestState$i$1() !==1) - this._throwInvalidStateException$i$1(); - if(this._isSent$p$0) - this._throwInvalidStateException$i$1() - } - }; - $h.RequestBase=function(userContext) - { - this._userContext$p$0=userContext - }; - $h.RequestBase.prototype={ - _isSent$p$0: false, - _asyncResult$p$0: null, - _userContext$p$0: null, - get_asyncResult: function() - { - return this._asyncResult$p$0 - }, - _sendRequest$i$0: function(dispid, methodName, dataToSend) - { - this._isSent$p$0=true; - var $$t_5=this; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.invokeHostMethod(dispid,dataToSend,function(resultCode, response) - { - if(resultCode) - $$t_5.createAsyncResult(null,1,9017,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode)); - else - $$t_5.handleResponse(response) - }) - }, - createAsyncResult: function(value, errorCode, detailedErrorCode, errorDescription) - { - this._asyncResult$p$0=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(value,errorCode,detailedErrorCode,this._userContext$p$0,errorDescription) - } - }; - $h.SaveDictionaryRequest=function(callback, userContext) - { - $h.SaveDictionaryRequest["initializeBase"](this,[userContext]); - if(!$h.ScriptHelpers.isNullOrUndefined(callback)) - this._callback$p$1=callback - }; - $h.SaveDictionaryRequest.prototype={ - _callback$p$1: null, - handleResponse: function(response) - { - if(response["wasSuccessful"]) - this.createAsyncResult(null,0,0,null); - else - this.createAsyncResult(null,1,9020,response["errorMessage"]); - if(!$h.ScriptHelpers.isNullOrUndefined(this._callback$p$1)) - this._callback$p$1(this._asyncResult$p$0) - } - }; - $h.ScriptHelpers=function(){}; - $h.ScriptHelpers.isNull=function(value) - { - return null===value - }; - $h.ScriptHelpers.isNullOrUndefined=function(value) - { - return $h.ScriptHelpers.isNull(value) || $h.ScriptHelpers.isUndefined(value) - }; - $h.ScriptHelpers.isUndefined=function(value) - { - return value===undefined - }; - $h.ScriptHelpers.dictionaryContainsKey=function(obj, keyName) - { - return Object["isInstanceOfType"](obj) ? keyName in obj : false - }; - $h.ScriptHelpers.isNonEmptyString=function(value) - { - if(!value) - return false; - return String["isInstanceOfType"](value) - }; - $h.ScriptHelpers.deepClone=function(obj) - { - return window["JSON"]["parse"](window["JSON"]["stringify"](obj)) - }; - $h.ScriptHelpers.isValueTrue=function(value) - { - if(!$h.ScriptHelpers.isNullOrUndefined(value)) - return value["toString"]().toLowerCase()==="true"; - return false - }; - window["OSF"]["DDA"]["OutlookAppOm"]["registerClass"]("OSF.DDA.OutlookAppOm"); - window["OSF"]["DDA"]["Settings"]["registerClass"]("OSF.DDA.Settings"); - $h.AdditionalGlobalParameters["registerClass"]("$h.4"); - $h.ItemBase["registerClass"]("$h.5"); - $h.Item["registerClass"]("$h.6",$h.ItemBase); - $h.Appointment["registerClass"]("$h.7",$h.Item); - $h.ComposeItem["registerClass"]("$h.8",$h.ItemBase); - $h.AppointmentCompose["registerClass"]("$h.9",$h.ComposeItem); - $h.AttachmentDetails["registerClass"]("$h.A"); - $h.Body["registerClass"]("$h.B"); - $h.ComposeBody["registerClass"]("$h.C",$h.Body); - $h.ComposeRecipient["registerClass"]("$h.D"); - $h.ComposeLocation["registerClass"]("$h.E"); - $h.ComposeSubject["registerClass"]("$h.F"); - $h.ComposeTime["registerClass"]("$h.G"); - $h.Contact["registerClass"]("$h.H"); - $h.CustomProperties["registerClass"]("$h.I"); - $h.Diagnostics["registerClass"]("$h.J"); - $h.EmailAddressDetails["registerClass"]("$h.K"); - $h.Entities["registerClass"]("$h.L"); - $h.Message["registerClass"]("$h.M",$h.Item); - $h.MeetingRequest["registerClass"]("$h.N",$h.Message); - $h.MeetingSuggestion["registerClass"]("$h.O"); - $h._extractedDate["registerClass"]("$h.P"); - $h._preciseDate["registerClass"]("$h.Q",$h._extractedDate); - $h._relativeDate["registerClass"]("$h.R",$h._extractedDate); - $h.MessageCompose["registerClass"]("$h.S",$h.ComposeItem); - $h.NotificationMessages["registerClass"]("$h.T"); - $h.PhoneNumber["registerClass"]("$h.U"); - $h.TaskSuggestion["registerClass"]("$h.V"); - $h.UserProfile["registerClass"]("$h.W"); - $h.CommonParameters["registerClass"]("$h.X"); - $h.RequestBase["registerClass"]("$h.Y"); - $h.ProxyRequestBase["registerClass"]("$h.Z",$h.RequestBase); - $h.EwsRequest["registerClass"]("$h.a",$h.ProxyRequestBase); - $h.InitialData["registerClass"]("$h.b"); - $h._loadDictionaryRequest["registerClass"]("$h.c",$h.RequestBase); - $h.SaveDictionaryRequest["registerClass"]("$h.d",$h.RequestBase); - window["OSF"]["DDA"]["OutlookAppOm"].asyncMethodTimeoutKeyName="__timeout__"; - window["OSF"]["DDA"]["OutlookAppOm"].ewsIdOrEmailParamName="ewsIdOrEmail"; - window["OSF"]["DDA"]["OutlookAppOm"].moduleParamName="module"; - window["OSF"]["DDA"]["OutlookAppOm"].queryStringParamName="queryString"; - window["OSF"]["DDA"]["OutlookAppOm"]._maxRecipients$p=100; - window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p=255; - window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength=32768; - window["OSF"]["DDA"]["OutlookAppOm"]._maxLocationLength$p=255; - window["OSF"]["DDA"]["OutlookAppOm"]._maxEwsRequestSize$p=1e6; - window["OSF"]["DDA"]["OutlookAppOm"].executeMethodName="ExecuteMethod"; - window["OSF"]["DDA"]["OutlookAppOm"].getInitialDataMethodName="GetInitialData"; - window["OSF"]["DDA"]["OutlookAppOm"].itemIdParameterName="itemId"; - window["OSF"]["DDA"]["OutlookAppOm"].restVersionParameterName="restVersion"; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p=null; - $h.AdditionalGlobalParameters.itemNumberKey="itemNumber"; - $h.AttachmentConstants.maxAttachmentNameLength=255; - $h.AttachmentConstants.maxUrlLength=2048; - $h.AttachmentConstants.maxItemIdLength=200; - $h.AttachmentConstants.maxRemoveIdLength=200; - $h.AttachmentConstants.attachmentParameterName="attachments"; - $h.AttachmentConstants.attachmentTypeParameterName="type"; - $h.AttachmentConstants.attachmentUrlParameterName="url"; - $h.AttachmentConstants.attachmentItemIdParameterName="itemId"; - $h.AttachmentConstants.attachmentNameParameterName="name"; - $h.AttachmentConstants.attachmentIsInlineParameterName="isInline"; - $h.AttachmentConstants.attachmentTypeFileName="file"; - $h.AttachmentConstants.attachmentTypeItemName="item"; - $h.AttachmentDetails._attachmentTypeMap$p=[window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["File"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["Item"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["Cloud"]]; - $h.Body.coercionTypeParameterName="coercionType"; - $h.ComposeRecipient.displayNameLengthLimit=255; - $h.ComposeRecipient.maxSmtpLength=571; - $h.ComposeRecipient.recipientsLimit=100; - $h.ComposeRecipient.totalRecipientsLimit=500; - $h.ComposeRecipient.addressParameterName="address"; - $h.ComposeRecipient.nameParameterName="name"; - $h.ComposeLocation.locationKey="location"; - $h.ComposeLocation.maximumLocationLength=255; - $h.ComposeSubject.maximumSubjectLength=255; - $h.ComposeTime.timeTypeName="TimeProperty"; - $h.ComposeTime.timeDataName="time"; - $h.Diagnostics.outlookAppName="Outlook"; - $h.Diagnostics.outlookWebAppName="OutlookWebApp"; - $h.Diagnostics.outlookIOSAppName="OutlookIOS"; - $h.Diagnostics.outlookAndroidAppName="OutlookAndroid"; - $h.EmailAddressDetails._emptyString$p=""; - $h.EmailAddressDetails._responseTypeMap$p=[window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["None"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Organizer"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Tentative"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Accepted"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Declined"]]; - $h.EmailAddressDetails._recipientTypeMap$p=[window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["Other"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["DistributionList"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["User"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["ExternalUser"]]; - $h.Entities._allEntityKeys$p=["Addresses","EmailAddresses","Urls","PhoneNumbers","TaskSuggestions","MeetingSuggestions","Contacts","FlightReservations","ParcelDeliveries"]; - $h.ReplyConstants.htmlBodyKeyName="htmlBody"; - $h.AsyncConstants.optionsKeyName="options"; - $h.AsyncConstants.callbackKeyName="callback"; - $h.AsyncConstants.asyncResultKeyName="asyncResult"; - $h.MeetingSuggestionTimeDecoder._baseDate$p=new Date("0001-01-01T00:00:00Z"); - $h.NotificationMessages.maximumKeyLength=32; - $h.NotificationMessages.maximumIconLength=32; - $h.NotificationMessages.maximumMessageLength=150; - $h.NotificationMessages.notificationsKeyParameterName="key"; - $h.NotificationMessages.notificationsTypeParameterName="type"; - $h.NotificationMessages.notificationsIconParameterName="icon"; - $h.NotificationMessages.notificationsMessageParameterName="message"; - $h.NotificationMessages.notificationsPersistentParameterName="persistent"; - $h.OutlookErrorManager.errorNameKey="name"; - $h.OutlookErrorManager.errorMessageKey="message"; - $h.OutlookErrorManager._isInitialized$p=false; - $h.OutlookErrorManager.OutlookErrorCodes.attachmentSizeExceeded=9e3; - $h.OutlookErrorManager.OutlookErrorCodes.numberOfAttachmentsExceeded=9001; - $h.OutlookErrorManager.OutlookErrorCodes.internalFormatError=9002; - $h.OutlookErrorManager.OutlookErrorCodes.invalidAttachmentId=9003; - $h.OutlookErrorManager.OutlookErrorCodes.invalidAttachmentPath=9004; - $h.OutlookErrorManager.OutlookErrorCodes.cannotAddAttachmentBeforeUpgrade=9005; - $h.OutlookErrorManager.OutlookErrorCodes.attachmentDeletedBeforeUploadCompletes=9006; - $h.OutlookErrorManager.OutlookErrorCodes.attachmentUploadGeneralFailure=9007; - $h.OutlookErrorManager.OutlookErrorCodes.attachmentToDeleteDoesNotExist=9008; - $h.OutlookErrorManager.OutlookErrorCodes.attachmentDeleteGeneralFailure=9009; - $h.OutlookErrorManager.OutlookErrorCodes.invalidEndTime=9010; - $h.OutlookErrorManager.OutlookErrorCodes.htmlSanitizationFailure=9011; - $h.OutlookErrorManager.OutlookErrorCodes.numberOfRecipientsExceeded=9012; - $h.OutlookErrorManager.OutlookErrorCodes.noValidRecipientsProvided=9013; - $h.OutlookErrorManager.OutlookErrorCodes.cursorPositionChanged=9014; - $h.OutlookErrorManager.OutlookErrorCodes.invalidSelection=9016; - $h.OutlookErrorManager.OutlookErrorCodes.accessRestricted=9017; - $h.OutlookErrorManager.OutlookErrorCodes.genericTokenError=9018; - $h.OutlookErrorManager.OutlookErrorCodes.genericSettingsError=9019; - $h.OutlookErrorManager.OutlookErrorCodes.genericResponseError=9020; - $h.OutlookErrorManager.OutlookErrorCodes.saveError=9021; - $h.OutlookErrorManager.OutlookErrorCodes.messageInDifferentStoreError=9022; - $h.OutlookErrorManager.OutlookErrorCodes.duplicateNotificationKey=9023; - $h.OutlookErrorManager.OutlookErrorCodes.notificationKeyNotFound=9024; - $h.OutlookErrorManager.OutlookErrorCodes.numberOfNotificationsExceeded=9025; - $h.OutlookErrorManager.OutlookErrorCodes.persistedNotificationArrayReadError=9026; - $h.OutlookErrorManager.OutlookErrorCodes.persistedNotificationArraySaveError=9027; - $h.OutlookErrorManager.OutlookErrorCodes.cannotPersistPropertyInUnsavedDraftError=9028; - $h.OutlookErrorManager.OutlookErrorCodes.callSaveAsyncBeforeToken=9029; - $h.OutlookErrorManager.OutlookErrorCodes.ooeInvalidDataFormat=2006; - $h.OutlookErrorManager.OsfDdaErrorCodes.ooeCoercionTypeNotSupported=1e3; - $h.CommonParameters.asyncContextKeyName="asyncContext"; - $h.InitialData.userProfileTypeKey="userProfileType"; - $h.ScriptHelpers.emptyString=""; - OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM); - if(appContext.get_appName()==OSF.AppName.OutlookWebApp || appContext.get_appName()==OSF.AppName.OutlookIOS || appContext.get_appName()==OSF.AppName.OutlookAndroid) - this._settings=this._initializeSettings(appContext,false); - else - this._settings=this._initializeSettings(false); - appContext.appOM=new OSF.DDA.OutlookAppOm(appContext,this._webAppState.wnd,appReady); - if(appContext.get_appName()==OSF.AppName.Outlook || appContext.get_appName()==OSF.AppName.OutlookWebApp) - OSF.DDA.DispIdHost.addEventSupport(appContext.appOM,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.OlkItemSelectedChanged])) + Type.registerNamespace("Microsoft.Office.WebExtension.MailboxEnums"); + Microsoft.Office.WebExtension.MailboxEnums.EntityType = { + MeetingSuggestion: "meetingSuggestion", + TaskSuggestion: "taskSuggestion", + Address: "address", + EmailAddress: "emailAddress", + Url: "url", + PhoneNumber: "phoneNumber", + Contact: "contact", + FlightReservations: "flightReservations", + ParcelDeliveries: "parcelDeliveries" + }; + Microsoft.Office.WebExtension.MailboxEnums.ItemType = { + Message: "message", + Appointment: "appointment" + }; + Microsoft.Office.WebExtension.MailboxEnums.ResponseType = { + None: "none", + Organizer: "organizer", + Tentative: "tentative", + Accepted: "accepted", + Declined: "declined" + }; + Microsoft.Office.WebExtension.MailboxEnums.RecipientType = { + Other: "other", + DistributionList: "distributionList", + User: "user", + ExternalUser: "externalUser" + }; + Microsoft.Office.WebExtension.MailboxEnums.AttachmentType = { + File: "file", + Item: "item", + Cloud: "cloud" + }; + Microsoft.Office.WebExtension.MailboxEnums.BodyType = { + Text: "text", + Html: "html" + }; + Microsoft.Office.WebExtension.MailboxEnums.ItemNotificationMessageType = { + ProgressIndicator: "progressIndicator", + InformationalMessage: "informationalMessage", + ErrorMessage: "errorMessage", + InsightMessage: "insightMessage" + }; + Microsoft.Office.WebExtension.MailboxEnums.Folder = { + Inbox: "inbox", + Junk: "junk", + DeletedItems: "deletedItems" + }; + Microsoft.Office.WebExtension.CoercionType = { + Text: "text", + Html: "html" + }; + Microsoft.Office.WebExtension.MailboxEnums.UserProfileType = { + Office365: "office365", + OutlookCom: "outlookCom", + Enterprise: "enterprise" + }; + Microsoft.Office.WebExtension.MailboxEnums.RestVersion = { + v1_0: "v1.0", + v2_0: "v2.0", + Beta: "beta" + }; + Microsoft.Office.WebExtension.MailboxEnums.ModuleType = {Addins: "addins"}; + Microsoft.Office.WebExtension.MailboxEnums.ActionType = {ShowTaskPane: "showTaskPane"}; + Type.registerNamespace("OSF.DDA"); + var OSF = window["OSF"] || {}; + OSF.DDA = OSF.DDA || {}; + window["OSF"]["DDA"]["OutlookAppOm"] = OSF.DDA.OutlookAppOm = function(officeAppContext, targetWindow, appReadyCallback) + { + this.$$d_navigateToModuleAsync = Function.createDelegate(this,this.navigateToModuleAsync); + this.$$d_displayPersonaCardAsync = Function.createDelegate(this,this.displayPersonaCardAsync); + this.$$d_displayNewMessageFormApi = Function.createDelegate(this,this.displayNewMessageFormApi); + this.$$d__displayNewAppointmentFormApi$p$0 = Function.createDelegate(this,this._displayNewAppointmentFormApi$p$0); + this.$$d_windowOpenOverrideHandler = Function.createDelegate(this,this.windowOpenOverrideHandler); + this.$$d__getRestUrl$p$0 = Function.createDelegate(this,this._getRestUrl$p$0); + this.$$d__getEwsUrl$p$0 = Function.createDelegate(this,this._getEwsUrl$p$0); + this.$$d__getDiagnostics$p$0 = Function.createDelegate(this,this._getDiagnostics$p$0); + this.$$d__getUserProfile$p$0 = Function.createDelegate(this,this._getUserProfile$p$0); + this.$$d_getItem = Function.createDelegate(this,this.getItem); + this.$$d__callAppReadyCallback$p$0 = Function.createDelegate(this,this._callAppReadyCallback$p$0); + this.$$d__getInitialDataResponseHandler$p$0 = Function.createDelegate(this,this._getInitialDataResponseHandler$p$0); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p = this; + this._officeAppContext$p$0 = officeAppContext; + this._appReadyCallback$p$0 = appReadyCallback; + var $$t_4 = this; + var stringLoadedCallback = function() + { + if(appReadyCallback) + if(!$$t_4._officeAppContext$p$0["get_isDialog"]()) + $$t_4.invokeHostMethod(1,null,$$t_4.$$d__getInitialDataResponseHandler$p$0); + else + window.setTimeout($$t_4.$$d__callAppReadyCallback$p$0,0) + }; + if(this._areStringsLoaded$p$0()) + stringLoadedCallback(); + else + this._loadLocalizedScript$p$0(stringLoadedCallback) + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i = function(currentPermissionLevel) + { + if(!currentPermissionLevel) + throw Error.create(window["_u"]["ExtensibilityStrings"]["l_ElevatedPermissionNeeded_Text"]); + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i = function(value, minValue, maxValue, argumentName) + { + if(value < minValue || value > maxValue) + throw Error.argumentOutOfRange(argumentName); + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidModule$p = function(module) + { + if($h.ScriptHelpers.isNullOrUndefined(module)) + throw Error.argumentNull("module"); + else if(module === "") + throw Error.argument("module","module cannot be empty."); + if(module !== window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ModuleType"]["Addins"]) + throw Error.notImplemented(String.format("API not supported for module '{0}'",module)); + }; + window["OSF"]["DDA"]["OutlookAppOm"]._getHtmlBody$p = function(data) + { + var htmlBody = ""; + if("htmlBody" in data) + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidHtmlBody$p(data["htmlBody"]); + htmlBody = data["htmlBody"] + } + return htmlBody + }; + window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p = function(data) + { + var attachments = []; + if("attachments" in data) + { + attachments = data["attachments"]; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentsArray$p(attachments) + } + return attachments + }; + window["OSF"]["DDA"]["OutlookAppOm"]._getOptionsAndCallback$p = function(data) + { + var args = []; + if("options" in data) + args[0] = data["options"]; + if("callback" in data) + args[args["length"]] = data["callback"]; + return args + }; + window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p = function(attachments) + { + var attachmentsData = new Array(0); + if(Array["isInstanceOfType"](attachments)) + for(var i = 0; i < attachments["length"]; i++) + if(Object["isInstanceOfType"](attachments[i])) + { + var attachment = attachments[i]; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachment$p(attachment); + attachmentsData[i] = window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentData$p(attachment) + } + else + throw Error.argument("attachments"); + return attachmentsData + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidHtmlBody$p = function(htmlBody) + { + if(!String["isInstanceOfType"](htmlBody)) + throw Error.argument("htmlBody"); + if($h.ScriptHelpers.isNullOrUndefined(htmlBody)) + throw Error.argument("htmlBody"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(htmlBody.length,0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody") + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentsArray$p = function(attachments) + { + if(!Array["isInstanceOfType"](attachments)) + throw Error.argument("attachments"); + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachment$p = function(attachment) + { + if(!Object["isInstanceOfType"](attachment)) + throw Error.argument("attachments"); + if(!("type" in attachment) || !("name" in attachment)) + throw Error.argument("attachments"); + if(!("url" in attachment || "itemId" in attachment)) + throw Error.argument("attachments"); + }; + window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentData$p = function(attachment) + { + var attachmentData = null; + if(attachment["type"] === "file") + { + var url = attachment["url"]; + var name = attachment["name"]; + var isInline = $h.ScriptHelpers.isValueTrue(attachment["isInline"]); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentUrlOrName$p(url,name); + attachmentData = window["OSF"]["DDA"]["OutlookAppOm"]._createFileAttachmentData$p(url,name,isInline) + } + else if(attachment["type"] === "item") + { + var itemId = window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(attachment["itemId"]); + var name = attachment["name"]; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentItemIdOrName$p(itemId,name); + attachmentData = window["OSF"]["DDA"]["OutlookAppOm"]._createItemAttachmentData$p(itemId,name) + } + else + throw Error.argument("attachments"); + return attachmentData + }; + window["OSF"]["DDA"]["OutlookAppOm"]._createFileAttachmentData$p = function(url, name, isInline) + { + return["file",name,url,isInline] + }; + window["OSF"]["DDA"]["OutlookAppOm"]._createItemAttachmentData$p = function(itemId, name) + { + return["item",name,itemId] + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentUrlOrName$p = function(url, name) + { + if(!String["isInstanceOfType"](url) || !String["isInstanceOfType"](name)) + throw Error.argument("attachments"); + if(url.length > 2048) + throw Error.argumentOutOfRange("attachments",url.length,window["_u"]["ExtensibilityStrings"]["l_AttachmentUrlTooLong_Text"]); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p(name) + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentItemIdOrName$p = function(itemId, name) + { + if(!String["isInstanceOfType"](itemId) || !String["isInstanceOfType"](name)) + throw Error.argument("attachments"); + if(itemId.length > 200) + throw Error.argumentOutOfRange("attachments",itemId.length,window["_u"]["ExtensibilityStrings"]["l_AttachmentItemIdTooLong_Text"]); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p(name) + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p = function(name) + { + if(name.length > 255) + throw Error.argumentOutOfRange("attachments",name.length,window["_u"]["ExtensibilityStrings"]["l_AttachmentNameTooLong_Text"]); + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p = function(restVersion) + { + if(!restVersion) + throw Error.argumentNull("restVersion"); + if(restVersion !== window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"] && restVersion !== window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v2_0"] && restVersion !== window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["Beta"]) + throw Error.argument("restVersion"); + }; + window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost = function(itemId) + { + if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._initialData$p$0 && window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._initialData$p$0.get__isRestIdSupported$i$0()) + return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToRestId"](itemId,window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"]); + return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToEwsId"](itemId,window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"]) + }; + window["OSF"]["DDA"]["OutlookAppOm"]["addAdditionalArgs"] = function(dispid, data) + { + return data + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p = function(value, expectedType, argumentName) + { + if(Object["getType"](value) !== expectedType) + throw Error.argumentType(argumentName); + }; + window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p = function(value, minLength, maxLength, name) + { + if($h.ScriptHelpers.isNullOrUndefined(value)) + return; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(value,String,name); + var stringValue = value; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(stringValue.length,minLength,maxLength,name) + }; + window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p = function(array) + { + return array ? array["join"](";") : null + }; + window["OSF"]["DDA"]["OutlookAppOm"]._convertComposeEmailDictionaryParameterForSetApi$p = function(recipients) + { + if(!recipients) + return null; + var results = new Array(recipients["length"]); + for(var i = 0; i < recipients["length"]; i++) + results[i] = [recipients[i]["address"],recipients[i]["name"]]; + return results + }; + window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p = function(emailset, name) + { + if($h.ScriptHelpers.isNullOrUndefined(emailset)) + return null; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(emailset,Array,name); + var originalAttendees = emailset; + var updatedAttendees = null; + var normalizationNeeded = false; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(originalAttendees["length"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxRecipients$p,String.format("{0}.length",name)); + for(var i = 0; i < originalAttendees["length"]; i++) + if($h.EmailAddressDetails["isInstanceOfType"](originalAttendees[i])) + { + normalizationNeeded = true; + break + } + if(normalizationNeeded) + updatedAttendees = []; + for(var i = 0; i < originalAttendees["length"]; i++) + if(normalizationNeeded) + { + updatedAttendees[i] = $h.EmailAddressDetails["isInstanceOfType"](originalAttendees[i]) ? originalAttendees[i]["emailAddress"] : originalAttendees[i]; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(updatedAttendees[i],String,String.format("{0}[{1}]",name,i)) + } + else + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(originalAttendees[i],String,String.format("{0}[{1}]",name,i)); + return updatedAttendees + }; + OSF.DDA.OutlookAppOm.prototype = { + _initialData$p$0: null, + _item$p$0: null, + _userProfile$p$0: null, + _diagnostics$p$0: null, + _officeAppContext$p$0: null, + _appReadyCallback$p$0: null, + _clientEndPoint$p$0: null, + _hostItemType$p$0: 0, + _additionalOutlookParams$p$0: null, + get_clientEndPoint: function() + { + if(!this._clientEndPoint$p$0) + this._clientEndPoint$p$0 = OSF._OfficeAppFactory["getClientEndPoint"](); + return this._clientEndPoint$p$0 + }, + set_clientEndPoint: function(value) + { + this._clientEndPoint$p$0 = value; + return value + }, + get_initialData: function() + { + return this._initialData$p$0 + }, + get__appName$i$0: function() + { + return this._officeAppContext$p$0["get_appName"]() + }, + get_additionalOutlookParams: function() + { + return this._additionalOutlookParams$p$0 + }, + addEventSupport: function() + { + if(this._item$p$0) + OSF.DDA.DispIdHost["addEventSupport"](this._item$p$0,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType["RecipientsChanged"],Microsoft.Office.WebExtension.EventType["AppointmentTimeChanged"]])) + }, + windowOpenOverrideHandler: function(url, targetName, features, replace) + { + this.invokeHostMethod(403,{launchUrl: url},null) + }, + createAsyncResult: function(value, errorCode, detailedErrorCode, userContext, errorMessage) + { + var initArgs = {}; + var errorArgs = null; + initArgs[OSF.DDA.AsyncResultEnum.Properties["Value"]] = value; + initArgs[OSF.DDA.AsyncResultEnum.Properties["Context"]] = userContext; + if(0 !== errorCode) + { + errorArgs = {}; + var errorProperties = $h.OutlookErrorManager.getErrorArgs(detailedErrorCode); + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties["Name"]] = errorProperties["name"]; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties["Message"]] = !errorMessage ? errorProperties["message"] : errorMessage; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties["Code"]] = detailedErrorCode + } + return new OSF.DDA.AsyncResult(initArgs,errorArgs) + }, + _throwOnMethodCallForInsufficientPermission$i$0: function(requiredPermissionLevel, methodName) + { + if(this._initialData$p$0._permissionLevel$p$0 < requiredPermissionLevel) + throw Error.create(String.format(window["_u"]["ExtensibilityStrings"]["l_ElevatedPermissionNeededForMethod_Text"],methodName)); + }, + _displayReplyForm$i$0: function(obj) + { + this._displayReplyFormHelper$p$0(obj,false) + }, + _displayReplyAllForm$i$0: function(obj) + { + this._displayReplyFormHelper$p$0(obj,true) + }, + setActionsDefinition: function(actionsDefinition) + { + this._additionalOutlookParams$p$0.setActionsDefinition(actionsDefinition) + }, + get_itemNumber: function() + { + return this._additionalOutlookParams$p$0._itemNumber$p$0 + }, + get_actionsDefinition: function() + { + return this._additionalOutlookParams$p$0._actionsDefinition$p$0 + }, + _displayReplyFormHelper$p$0: function(obj, isReplyAll) + { + if(String["isInstanceOfType"](obj)) + this._doDisplayReplyForm$p$0(obj,isReplyAll); + else if(Object["isInstanceOfType"](obj) && Object.getTypeName(obj) === "Object") + this._doDisplayReplyFormWithAttachments$p$0(obj,isReplyAll); + else + throw Error.argumentType(); + }, + _doDisplayReplyForm$p$0: function(htmlBody, isReplyAll) + { + if(!$h.ScriptHelpers.isNullOrUndefined(htmlBody)) + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(htmlBody.length,0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody"); + this.invokeHostMethod(isReplyAll ? 11 : 10,{htmlBody: htmlBody},null) + }, + _doDisplayReplyFormWithAttachments$p$0: function(data, isReplyAll) + { + var htmlBody = window["OSF"]["DDA"]["OutlookAppOm"]._getHtmlBody$p(data); + var attachments = window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p(data); + var parameters = $h.CommonParameters.parse(window["OSF"]["DDA"]["OutlookAppOm"]._getOptionsAndCallback$p(data),false); + var $$t_6 = this; + this._standardInvokeHostMethod$i$0(isReplyAll ? 31 : 30,{ + htmlBody: htmlBody, + attachments: window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p(attachments) + },function(rawInput) + { + return rawInput + },parameters._asyncContext$p$0,parameters._callback$p$0) + }, + _standardInvokeHostMethod$i$0: function(dispid, data, format, userContext, callback) + { + var $$t_B = this; + this.invokeHostMethod(dispid,data,function(resultCode, response) + { + if(callback) + { + var asyncResult = null; + if(Object["isInstanceOfType"](response)) + { + var responseDictionary = response; + if("error" in responseDictionary || "data" in responseDictionary || "errorCode" in responseDictionary) + if(!responseDictionary["error"]) + { + var formattedData = format ? format(responseDictionary["data"]) : responseDictionary["data"]; + asyncResult = $$t_B.createAsyncResult(formattedData,0,0,userContext,null) + } + else + { + var errorCode = responseDictionary["errorCode"]; + asyncResult = $$t_B.createAsyncResult(null,1,errorCode,userContext,null) + } + } + if(!asyncResult && resultCode) + asyncResult = $$t_B.createAsyncResult(null,1,9002,userContext,null); + callback(asyncResult) + } + }) + }, + getItemNumberFromOutlookResponse: function(responseData) + { + var itemNumber = 0; + if(responseData["length"] > 2) + { + var extraParameters = window["JSON"]["parse"](responseData[2]); + if(Object["isInstanceOfType"](extraParameters)) + { + var extraParametersDictionary = extraParameters; + itemNumber = extraParametersDictionary["itemNumber"] + } + } + return itemNumber + }, + createDeserializedData: function(responseData, itemChanged) + { + var deserializedData = null; + var returnValues = window["JSON"]["parse"](responseData[0]); + if(Object["isInstanceOfType"](returnValues)) + deserializedData = this._createDeserializedDataWithDictionary$p$0(responseData,itemChanged); + else if(Number["isInstanceOfType"](returnValues)) + deserializedData = this._createDeserializedDataWithInt$p$0(responseData,itemChanged); + else + throw Error.notImplemented("Return data type from host must be Dictionary or int"); + return deserializedData + }, + _createDeserializedDataWithDictionary$p$0: function(responseData, itemChanged) + { + var deserializedData = window["JSON"]["parse"](responseData[0]); + if(itemChanged) + { + deserializedData["error"] = true; + deserializedData["errorCode"] = 9030 + } + else if(responseData["length"] > 1 && responseData[1]) + { + deserializedData["error"] = true; + deserializedData["errorCode"] = responseData[1] + } + else + deserializedData["error"] = false; + return deserializedData + }, + _createDeserializedDataWithInt$p$0: function(responseData, itemChanged) + { + var deserializedData = {}; + deserializedData["error"] = true; + deserializedData["errorCode"] = responseData[0]; + return deserializedData + }, + invokeHostMethod: function(dispid, data, responseCallback) + { + var startTime = (new Date)["getTime"](); + var $$t_A = this; + var invokeResponseCallback = function(resultCode, resultData) + { + if(window["OSF"]["AppTelemetry"]) + { + var deserializedData = resultData; + var detailedErrorCode = -1; + if(deserializedData && deserializedData["errorCode"]) + detailedErrorCode = deserializedData["errorCode"]; + window["OSF"]["AppTelemetry"]["onMethodDone"](dispid,null,Math["abs"]((new Date)["getTime"]() - startTime),detailedErrorCode) + } + if(responseCallback) + responseCallback(resultCode,resultData) + }; + if(64 === this._officeAppContext$p$0["get_appName"]()) + { + var args = {ApiParams: data}; + args["MethodData"] = { + ControlId: OSF._OfficeAppFactory["getId"](), + DispatchId: dispid + }; + args = window["OSF"]["DDA"]["OutlookAppOm"]["addAdditionalArgs"](dispid,args); + if(dispid === 1) + this.get_clientEndPoint()["invoke"]("GetInitialData",invokeResponseCallback,args); + else + this.get_clientEndPoint()["invoke"]("ExecuteMethod",invokeResponseCallback,args) + } + else if(!this._isOwaOnlyMethod$p$0(dispid)) + this.callOutlookDispatcher(dispid,data,responseCallback,startTime); + else if(responseCallback) + responseCallback(-2,null) + }, + callOutlookDispatcher: function(dispid, data, responseCallback, startTime) + { + var executeParameters = this.convertToOutlookParameters(dispid,data); + var $$t_D = this; + OSF.ClientHostController["execute"](dispid,executeParameters,function(nativeData, resultCode) + { + var detailedErrorCode = -1; + var deserializedData = null; + var responseData = nativeData.toArray(); + if(responseData["length"] > 0) + { + var itemNumberFromOutlookResponse = $$t_D.getItemNumberFromOutlookResponse(responseData); + var isValidItemNumber = itemNumberFromOutlookResponse > 0; + var itemChanged = isValidItemNumber && itemNumberFromOutlookResponse > $$t_D._additionalOutlookParams$p$0._itemNumber$p$0; + deserializedData = $$t_D.createDeserializedData(responseData,itemChanged); + if(deserializedData && deserializedData["errorCode"]) + detailedErrorCode = deserializedData["errorCode"] + } + else if(responseCallback) + throw Error.argumentNull("responseData","Unexpected null/empty data from host."); + if(window["OSF"]["AppTelemetry"]) + window["OSF"]["AppTelemetry"]["onMethodDone"](dispid,null,Math["abs"]((new Date)["getTime"]() - startTime),detailedErrorCode); + if(responseCallback) + responseCallback(resultCode,deserializedData) + }) + }, + _dictionaryToDate$i$0: function(input) + { + var retValue = new Date(input["year"],input["month"],input["date"],input["hours"],input["minutes"],input["seconds"],!input["milliseconds"] ? 0 : input["milliseconds"]); + if(window["isNaN"](retValue["getTime"]())) + throw Error.format(window["_u"]["ExtensibilityStrings"]["l_InvalidDate_Text"]); + return retValue + }, + _dateToDictionary$i$0: function(input) + { + var retValue = {}; + retValue["month"] = input["getMonth"](); + retValue["date"] = input["getDate"](); + retValue["year"] = input["getFullYear"](); + retValue["hours"] = input["getHours"](); + retValue["minutes"] = input["getMinutes"](); + retValue["seconds"] = input["getSeconds"](); + retValue["milliseconds"] = input["getMilliseconds"](); + return retValue + }, + _isOwaOnlyMethod$p$0: function(dispId) + { + switch(dispId) + { + case 402: + case 401: + case 400: + case 403: + return true; + default: + return false + } + }, + isOutlook16OrGreater: function() + { + var hostVersion = this._initialData$p$0.get__hostVersion$i$0(); + var endIndex = 0; + var majorVersionNumber = 0; + if(hostVersion) + { + endIndex = hostVersion.indexOf("."); + majorVersionNumber = window["parseInt"](hostVersion.substring(0,endIndex)) + } + return majorVersionNumber >= 16 + }, + isApiVersionSupported: function(requirementSet) + { + var apiSupported = false; + try + { + var requirementDict = window["JSON"]["parse"](this._officeAppContext$p$0["get_requirementMatrix"]()); + var hostApiVersion = requirementDict["Mailbox"]; + var hostApiVersionParts = hostApiVersion.split("."); + var requirementSetParts = requirementSet.split("."); + if(window["parseInt"](hostApiVersionParts[0]) > window["parseInt"](requirementSetParts[0]) || window["parseInt"](hostApiVersionParts[0]) === window["parseInt"](requirementSetParts[0]) && window["parseInt"](hostApiVersionParts[1]) >= window["parseInt"](requirementSetParts[1])) + apiSupported = true + } + catch($$e_6){} + return apiSupported + }, + convertToOutlookParameters: function(dispid, data) + { + var executeParameters = null; + var optionalParameters = {}; + switch(dispid) + { + case 1: + case 2: + case 3: + case 14: + case 18: + case 26: + case 32: + case 41: + case 34: + case 99: + break; + case 12: + optionalParameters["isRest"] = data["isRest"]; + break; + case 4: + var jsonProperty = window["JSON"]["stringify"](data["customProperties"]); + executeParameters = [jsonProperty]; + break; + case 5: + executeParameters = [data["body"]]; + break; + case 8: + case 9: + executeParameters = [data["itemId"]]; + break; + case 7: + executeParameters = [window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["requiredAttendees"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["optionalAttendees"]),data["start"],data["end"],data["location"],window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["resources"]),data["subject"],data["body"]]; + break; + case 44: + executeParameters = [window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["toRecipients"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["ccRecipients"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["bccRecipients"]),data["subject"],data["htmlBody"],data["attachments"]]; + break; + case 43: + executeParameters = [data["ewsIdOrEmail"]]; + break; + case 45: + executeParameters = [data["module"],data["queryString"]]; + break; + case 40: + executeParameters = [data["extensionId"],data["consentState"]]; + break; + case 11: + case 10: + executeParameters = [data["htmlBody"]]; + break; + case 31: + case 30: + executeParameters = [data["htmlBody"],data["attachments"]]; + break; + case 100: + optionalParameters = data; + break; + case 23: + case 13: + case 38: + case 29: + executeParameters = [data["data"],data["coercionType"]]; + break; + case 37: + case 28: + executeParameters = [data["coercionType"]]; + break; + case 17: + executeParameters = [data["subject"]]; + break; + case 15: + executeParameters = [data["recipientField"]]; + break; + case 22: + case 21: + executeParameters = [data["recipientField"],window["OSF"]["DDA"]["OutlookAppOm"]._convertComposeEmailDictionaryParameterForSetApi$p(data["recipientArray"])]; + break; + case 19: + executeParameters = [data["itemId"],data["name"]]; + break; + case 16: + executeParameters = [data["uri"],data["name"],data["isInline"]]; + break; + case 20: + executeParameters = [data["attachmentIndex"]]; + break; + case 25: + executeParameters = [data["TimeProperty"],data["time"]]; + break; + case 24: + executeParameters = [data["TimeProperty"]]; + break; + case 27: + executeParameters = [data["location"]]; + break; + case 33: + case 35: + executeParameters = [data["key"],data["type"],data["persistent"],data["message"],data["icon"]]; + this._additionalOutlookParams$p$0.setActionsDefinition(data["actions"]); + break; + case 36: + executeParameters = [data["key"]]; + break; + case 101: + optionalParameters = data; + break; + default: + Sys.Debug.fail("Unexpected method dispid"); + break + } + if(dispid !== 1) + { + var $$t_5; + this._additionalOutlookParams$p$0.updateOutlookExecuteParameters($$t_5 = {val: executeParameters},optionalParameters),executeParameters = $$t_5["val"] + } + return executeParameters + }, + _displayNewAppointmentFormApi$p$0: function(parameters) + { + var normalizedRequiredAttendees = window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["requiredAttendees"],"requiredAttendees"); + var normalizedOptionalAttendees = window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["optionalAttendees"],"optionalAttendees"); + window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["location"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxLocationLength$p,"location"); + window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["body"],0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"body"); + window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["subject"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p,"subject"); + if(!$h.ScriptHelpers.isNullOrUndefined(parameters["start"])) + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(parameters["start"],Date,"start"); + var startDateTime = parameters["start"]; + parameters["start"] = startDateTime["getTime"](); + if(!$h.ScriptHelpers.isNullOrUndefined(parameters["end"])) + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(parameters["end"],Date,"end"); + var endDateTime = parameters["end"]; + if(endDateTime < startDateTime) + throw Error.argumentOutOfRange("end",endDateTime,window["_u"]["ExtensibilityStrings"]["l_InvalidEventDates_Text"]); + parameters["end"] = endDateTime["getTime"]() + } + } + var updatedParameters = null; + if(normalizedRequiredAttendees || normalizedOptionalAttendees) + { + updatedParameters = {}; + var $$dict_7 = parameters; + for(var $$key_8 in $$dict_7) + { + var entry = { + key: $$key_8, + value: $$dict_7[$$key_8] + }; + updatedParameters[entry["key"]] = entry["value"] + } + if(normalizedRequiredAttendees) + updatedParameters["requiredAttendees"] = normalizedRequiredAttendees; + if(normalizedOptionalAttendees) + updatedParameters["optionalAttendees"] = normalizedOptionalAttendees + } + this.invokeHostMethod(7,updatedParameters || parameters,null) + }, + displayNewMessageFormApi: function(parameters) + { + var updatedParameters = {}; + if(parameters) + { + var normalizedToRecipients = window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["toRecipients"],"toRecipients"); + var normalizedCcRecipients = window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["ccRecipients"],"ccRecipients"); + var normalizedBccRecipients = window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["bccRecipients"],"bccRecipients"); + window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["htmlBody"],0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody"); + window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["subject"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p,"subject"); + var attachments = window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p(parameters); + var $$dict_7 = parameters; + for(var $$key_8 in $$dict_7) + { + var entry = { + key: $$key_8, + value: $$dict_7[$$key_8] + }; + updatedParameters[entry["key"]] = entry["value"] + } + if(normalizedToRecipients) + updatedParameters["toRecipients"] = normalizedToRecipients; + if(normalizedCcRecipients) + updatedParameters["ccRecipients"] = normalizedCcRecipients; + if(normalizedBccRecipients) + updatedParameters["bccRecipients"] = normalizedBccRecipients; + if(attachments) + updatedParameters["attachments"] = window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p(attachments) + } + this.invokeHostMethod(44,updatedParameters || parameters,null) + }, + displayPersonaCardAsync: function(ewsIdOrEmail) + { + var args = []; + for(var $$pai_3 = 1; $$pai_3 < arguments["length"]; ++$$pai_3) + args[$$pai_3 - 1] = arguments[$$pai_3]; + if($h.ScriptHelpers.isNullOrUndefined(ewsIdOrEmail)) + throw Error.argumentNull("ewsIdOrEmail"); + else if(ewsIdOrEmail === "") + throw Error.argument("ewsIdOrEmail","ewsIdOrEmail cannot be empty."); + var parameters = $h.CommonParameters.parse(args,false); + this._standardInvokeHostMethod$i$0(43,{ewsIdOrEmail: ewsIdOrEmail.trim()},null,parameters._asyncContext$p$0,parameters._callback$p$0) + }, + navigateToModuleAsync: function(module) + { + var args = []; + for(var $$pai_5 = 1; $$pai_5 < arguments["length"]; ++$$pai_5) + args[$$pai_5 - 1] = arguments[$$pai_5]; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidModule$p(module); + var parameters = $h.CommonParameters.parse(args,false); + var updatedParameters = {}; + if(module === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ModuleType"]["Addins"]) + { + var queryString = ""; + if(parameters._options$p$0 && parameters._options$p$0["queryString"]) + queryString = parameters._options$p$0["queryString"]; + updatedParameters["queryString"] = queryString + } + updatedParameters["module"] = module; + this._standardInvokeHostMethod$i$0(45,updatedParameters,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }, + _initializeMethods$p$0: function() + { + var currentInstance = this; + if($h.Item["isInstanceOfType"](this._item$p$0) || this._hostItemType$p$0 === 6) + { + currentInstance["displayNewAppointmentForm"] = this.$$d__displayNewAppointmentFormApi$p$0; + currentInstance["displayNewMessageForm"] = this.$$d_displayNewMessageFormApi; + currentInstance["displayPersonaCardAsync"] = this.$$d_displayPersonaCardAsync; + currentInstance["navigateToModuleAsync"] = this.$$d_navigateToModuleAsync + } + }, + _getInitialDataResponseHandler$p$0: function(resultCode, data) + { + if(resultCode) + return; + this["initialize"](data); + this["displayName"] = "mailbox"; + window.setTimeout(this.$$d__callAppReadyCallback$p$0,0) + }, + _callAppReadyCallback$p$0: function() + { + this._appReadyCallback$p$0() + }, + _invokeGetTokenMethodAsync$p$0: function(outlookDispid, data, methodName, callback, userContext) + { + if($h.ScriptHelpers.isNullOrUndefined(callback)) + throw Error.argumentNull("callback"); + var $$t_9 = this; + this.invokeHostMethod(outlookDispid,data,function(resultCode, response) + { + var asyncResult; + if(resultCode) + asyncResult = $$t_9.createAsyncResult(null,1,9017,userContext,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode)); + else + { + var responseDictionary = response; + if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() === 8 && "error" in responseDictionary && "errorCode" in responseDictionary && responseDictionary["error"] && responseDictionary["errorCode"] === 9030) + asyncResult = $$t_9.createAsyncResult(null,1,responseDictionary["errorCode"],userContext,responseDictionary["errorMessage"]); + else if(responseDictionary["wasSuccessful"]) + asyncResult = $$t_9.createAsyncResult(responseDictionary["token"],0,0,userContext,null); + else + asyncResult = $$t_9.createAsyncResult(null,1,responseDictionary["errorCode"],userContext,responseDictionary["errorMessage"]) + } + callback(asyncResult) + }) + }, + getItem: function() + { + return this._item$p$0 + }, + _getUserProfile$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0); + return this._userProfile$p$0 + }, + _getDiagnostics$p$0: function() + { + return this._diagnostics$p$0 + }, + _getEwsUrl$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0); + return this._initialData$p$0.get__ewsUrl$i$0() + }, + _getRestUrl$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0); + if(this._shouldInferRestUrl$p$0()) + return this._inferRestUrlFromEwsUrl$p$0(); + return this._initialData$p$0.get__restUrl$i$0() + }, + _shouldInferRestUrl$p$0: function() + { + return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() === 8 && !this._initialData$p$0.get__restUrl$i$0() && this.isApiVersionSupported("1.5") && this._isHostBuildNumberLessThan$p$0("16.0.8414.1000") + }, + _isHostBuildNumberLessThan$p$0: function(buildNumber) + { + var hostVersion = this._initialData$p$0.get__hostVersion$i$0(); + if(hostVersion) + { + var hostVersionParts = hostVersion.split("."); + var buildNumberParts = buildNumber.split("."); + return window["parseInt"](hostVersionParts[0]) < window["parseInt"](buildNumberParts[0]) || window["parseInt"](hostVersionParts[0]) === window["parseInt"](buildNumberParts[0]) && window["parseInt"](hostVersionParts[2]) < window["parseInt"](buildNumberParts[2]) + } + return false + }, + _inferRestUrlFromEwsUrl$p$0: function() + { + var inferredRestUrl = ""; + var stringToFind = "/ews/"; + var index = this._initialData$p$0.get__ewsUrl$i$0().toLowerCase().indexOf(stringToFind); + if(index !== -1) + inferredRestUrl = String.format("{0}/{1}",this._initialData$p$0.get__ewsUrl$i$0().slice(0,index),"api"); + return $h.ScriptHelpers.isNonEmptyString(inferredRestUrl) ? inferredRestUrl : null + }, + _findOffset$p$0: function(value) + { + var ranges = this._initialData$p$0.get__timeZoneOffsets$i$0(); + for(var r = 0; r < ranges["length"]; r++) + { + var range = ranges[r]; + var start = window["parseInt"](range["start"]); + var end = window["parseInt"](range["end"]); + if(value["getTime"]() - start >= 0 && value["getTime"]() - end < 0) + return window["parseInt"](range["offset"]) + } + throw Error.format(window["_u"]["ExtensibilityStrings"]["l_InvalidDate_Text"]); + }, + _areStringsLoaded$p$0: function() + { + var stringsLoaded = false; + try + { + stringsLoaded = !$h.ScriptHelpers.isNullOrUndefined(window["_u"]["ExtensibilityStrings"]["l_EwsRequestOversized_Text"]) + } + catch($$e_1){} + return stringsLoaded + }, + _loadLocalizedScript$p$0: function(stringLoadedCallback) + { + var url = null; + var baseUrl = ""; + var scripts = document.getElementsByTagName("script"); + for(var i = scripts.length - 1; i >= 0; i--) + { + var filename = null; + var attributes = scripts[i].attributes; + if(attributes) + { + var attribute = attributes.getNamedItem("src"); + if(attribute) + filename = attribute.value; + if(filename) + { + var debug = false; + filename = filename.toLowerCase(); + var officeIndex = filename.indexOf("office_strings.js"); + if(officeIndex < 0) + { + officeIndex = filename.indexOf("office_strings.debug.js"); + debug = true + } + if(officeIndex > 0 && officeIndex < filename.length) + { + url = filename.replace(debug ? "office_strings.debug.js" : "office_strings.js","outlook_strings.js"); + var languageUrl = filename.substring(0,officeIndex); + var lastIndexOfSlash = languageUrl.lastIndexOf("/",languageUrl.length - 2); + if(lastIndexOfSlash === -1) + lastIndexOfSlash = languageUrl.lastIndexOf("\\",languageUrl.length - 2); + if(lastIndexOfSlash !== -1 && languageUrl.length > lastIndexOfSlash + 1) + baseUrl = languageUrl.substring(0,lastIndexOfSlash + 1); + break + } + } + } + } + if(url) + { + var head = document.getElementsByTagName("head")[0]; + var scriptElement = null; + var $$t_H = this; + var scriptElementCallback = function() + { + if(stringLoadedCallback && (!scriptElement.readyState || scriptElement.readyState && (scriptElement.readyState === "loaded" || scriptElement.readyState === "complete"))) + { + scriptElement.onload = null; + scriptElement.onreadystatechange = null; + stringLoadedCallback() + } + }; + var $$t_I = this; + var failureCallback = function() + { + if(!$$t_I._areStringsLoaded$p$0()) + { + var fallbackUrl = baseUrl + "en-us/" + "outlook_strings.js"; + scriptElement.onload = null; + scriptElement.onreadystatechange = null; + scriptElement = $$t_I._createScriptElement$p$0(fallbackUrl); + scriptElement.onload = scriptElementCallback; + scriptElement.onreadystatechange = scriptElementCallback; + head.appendChild(scriptElement) + } + }; + scriptElement = this._createScriptElement$p$0(url); + scriptElement.onload = scriptElementCallback; + scriptElement.onreadystatechange = scriptElementCallback; + window.setTimeout(failureCallback,2e3); + head.appendChild(scriptElement) + } + }, + _createScriptElement$p$0: function(url) + { + var scriptElement = document.createElement("script"); + scriptElement.type = "text/javascript"; + scriptElement.src = url; + return scriptElement + } + }; + OSF.DDA.OutlookAppOm.prototype.initialize = function(initialData) + { + if(!initialData) + { + this._additionalOutlookParams$p$0 = new $h.AdditionalGlobalParameters(true); + this._initialData$p$0 = null; + this._item$p$0 = null; + return + } + var ItemTypeKey = "itemType"; + this._initialData$p$0 = new $h.InitialData(initialData); + this._hostItemType$p$0 = initialData[ItemTypeKey]; + if(1 === initialData[ItemTypeKey]) + this._item$p$0 = new $h.Message(this._initialData$p$0); + else if(3 === initialData[ItemTypeKey]) + this._item$p$0 = new $h.MeetingRequest(this._initialData$p$0); + else if(2 === initialData[ItemTypeKey]) + this._item$p$0 = new $h.Appointment(this._initialData$p$0); + else if(4 === initialData[ItemTypeKey]) + this._item$p$0 = new $h.MessageCompose(this._initialData$p$0); + else if(5 === initialData[ItemTypeKey]) + this._item$p$0 = new $h.AppointmentCompose(this._initialData$p$0); + else if(6 === initialData[ItemTypeKey]); + else + Sys.Debug.trace("Unexpected item type was received from the host."); + this._userProfile$p$0 = new $h.UserProfile(this._initialData$p$0); + this._diagnostics$p$0 = new $h.Diagnostics(this._initialData$p$0,this._officeAppContext$p$0["get_appName"]()); + var supportsAdditionalParameters = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() !== 8 || this.isOutlook16OrGreater() || this.isApiVersionSupported("1.5"); + this._additionalOutlookParams$p$0 = new $h.AdditionalGlobalParameters(supportsAdditionalParameters); + if("itemNumber" in initialData) + this["setCurrentItemNumber"](initialData["itemNumber"]); + this._initializeMethods$p$0(); + $h.InitialData._defineReadOnlyProperty$i(this,"item",this.$$d_getItem); + $h.InitialData._defineReadOnlyProperty$i(this,"userProfile",this.$$d__getUserProfile$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"diagnostics",this.$$d__getDiagnostics$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"ewsUrl",this.$$d__getEwsUrl$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"restUrl",this.$$d__getRestUrl$p$0); + if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() === 64) + if(this._initialData$p$0.get__overrideWindowOpen$i$0()) + window.open = this.$$d_windowOpenOverrideHandler; + this.addEventSupport() + }; + OSF.DDA.OutlookAppOm.prototype.makeEwsRequestAsync = function(data) + { + var args = []; + for(var $$pai_5 = 1; $$pai_5 < arguments["length"]; ++$$pai_5) + args[$$pai_5 - 1] = arguments[$$pai_5]; + if($h.ScriptHelpers.isNullOrUndefined(data)) + throw Error.argumentNull("data"); + if(data.length > window["OSF"]["DDA"]["OutlookAppOm"]._maxEwsRequestSize$p) + throw Error.argument("data",window["_u"]["ExtensibilityStrings"]["l_EwsRequestOversized_Text"]); + this._throwOnMethodCallForInsufficientPermission$i$0(3,"makeEwsRequestAsync"); + var parameters = $h.CommonParameters.parse(args,true,true); + var ewsRequest = new $h.EwsRequest(parameters._asyncContext$p$0); + var $$t_4 = this; + ewsRequest.onreadystatechange = function() + { + if(4 === ewsRequest.get__requestState$i$1()) + parameters._callback$p$0(ewsRequest._asyncResult$p$0) + }; + ewsRequest.send(data) + }; + OSF.DDA.OutlookAppOm.prototype.recordDataPoint = function(data) + { + if($h.ScriptHelpers.isNullOrUndefined(data)) + throw Error.argumentNull("data"); + this.invokeHostMethod(402,data,null) + }; + OSF.DDA.OutlookAppOm.prototype.recordTrace = function(data) + { + if($h.ScriptHelpers.isNullOrUndefined(data)) + throw Error.argumentNull("data"); + this.invokeHostMethod(401,data,null) + }; + OSF.DDA.OutlookAppOm.prototype.trackCtq = function(data) + { + if($h.ScriptHelpers.isNullOrUndefined(data)) + throw Error.argumentNull("data"); + this.invokeHostMethod(400,data,null) + }; + OSF.DDA.OutlookAppOm.prototype.convertToLocalClientTime = function(timeValue) + { + var date = new Date(timeValue["getTime"]()); + var offset = date["getTimezoneOffset"]() * -1; + if(this._initialData$p$0 && this._initialData$p$0.get__timeZoneOffsets$i$0()) + { + date["setUTCMinutes"](date["getUTCMinutes"]() - offset); + offset = this._findOffset$p$0(date); + date["setUTCMinutes"](date["getUTCMinutes"]() + offset) + } + var retValue = this._dateToDictionary$i$0(date); + retValue["timezoneOffset"] = offset; + return retValue + }; + OSF.DDA.OutlookAppOm.prototype.convertToUtcClientTime = function(input) + { + var retValue = this._dictionaryToDate$i$0(input); + if(this._initialData$p$0 && this._initialData$p$0.get__timeZoneOffsets$i$0()) + { + var offset = this._findOffset$p$0(retValue); + retValue["setUTCMinutes"](retValue["getUTCMinutes"]() - offset); + offset = !input["timezoneOffset"] ? retValue["getTimezoneOffset"]() * -1 : input["timezoneOffset"]; + retValue["setUTCMinutes"](retValue["getUTCMinutes"]() + offset) + } + return retValue + }; + OSF.DDA.OutlookAppOm.prototype.convertToRestId = function(itemId, restVersion) + { + if(!itemId) + throw Error.argumentNull("itemId"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p(restVersion); + return itemId.replace(new RegExp("[/]","g"),"-").replace(new RegExp("[+]","g"),"_") + }; + OSF.DDA.OutlookAppOm.prototype.convertToEwsId = function(itemId, restVersion) + { + if(!itemId) + throw Error.argumentNull("itemId"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p(restVersion); + return itemId.replace(new RegExp("[-]","g"),"/").replace(new RegExp("[_]","g"),"+") + }; + OSF.DDA.OutlookAppOm.prototype.getUserIdentityTokenAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + this._throwOnMethodCallForInsufficientPermission$i$0(1,"getUserIdentityTokenAsync"); + var parameters = $h.CommonParameters.parse(args,true,true); + this._invokeGetTokenMethodAsync$p$0(2,null,"GetUserIdentityToken",parameters._callback$p$0,parameters._asyncContext$p$0) + }; + OSF.DDA.OutlookAppOm.prototype.getCallbackTokenAsync = function() + { + var args = []; + for(var $$pai_7 = 0; $$pai_7 < arguments["length"]; ++$$pai_7) + args[$$pai_7] = arguments[$$pai_7]; + this._throwOnMethodCallForInsufficientPermission$i$0(1,"getCallbackTokenAsync"); + var parameters = $h.CommonParameters.parse(args,true,true); + var options = {}; + if(parameters._options$p$0) + for(var $$arr_3 = Object["keys"](parameters._options$p$0), $$len_4 = $$arr_3.length, $$idx_5 = 0; $$idx_5 < $$len_4; ++$$idx_5) + { + var key = $$arr_3[$$idx_5]; + options[key] = parameters._options$p$0[key] + } + if(!("isRest" in options)) + options["isRest"] = false; + this._invokeGetTokenMethodAsync$p$0(12,options,"GetCallbackToken",parameters._callback$p$0,parameters._asyncContext$p$0) + }; + OSF.DDA.OutlookAppOm.prototype.displayMessageForm = function(itemId) + { + if($h.ScriptHelpers.isNullOrUndefined(itemId)) + throw Error.argumentNull("itemId"); + this.invokeHostMethod(8,{itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId)},null) + }; + OSF.DDA.OutlookAppOm.prototype.displayAppointmentForm = function(itemId) + { + if($h.ScriptHelpers.isNullOrUndefined(itemId)) + throw Error.argumentNull("itemId"); + this.invokeHostMethod(9,{itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId)},null) + }; + OSF.DDA.OutlookAppOm.prototype.RegisterConsentAsync = function(consentState) + { + if(consentState !== 2 && consentState !== 1 && consentState) + throw Error.argumentOutOfRange("consentState"); + var parameters = {}; + parameters["consentState"] = consentState["toString"](); + parameters["extensionId"] = this["GetExtensionId"](); + this.invokeHostMethod(40,parameters,null) + }; + OSF.DDA.OutlookAppOm.prototype.CloseApp = function() + { + this.invokeHostMethod(42,null,null) + }; + OSF.DDA.OutlookAppOm.prototype.GetIsRead = function() + { + return this._initialData$p$0.get__isRead$i$0() + }; + OSF.DDA.OutlookAppOm.prototype.GetEndNodeUrl = function() + { + return this._initialData$p$0.get__endNodeUrl$i$0() + }; + OSF.DDA.OutlookAppOm.prototype.GetConsentMetadata = function() + { + return this._initialData$p$0.get__consentMetadata$i$0() + }; + OSF.DDA.OutlookAppOm.prototype.GetEntryPointUrl = function() + { + return this._initialData$p$0.get__entryPointUrl$i$0() + }; + OSF.DDA.OutlookAppOm.prototype.GetMarketplaceContentMarket = function() + { + return this._initialData$p$0.get__marketplaceContentMarket$i$0() + }; + OSF.DDA.OutlookAppOm.prototype.GetMarketplaceAssetId = function() + { + return this._initialData$p$0.get__marketplaceAssetId$i$0() + }; + OSF.DDA.OutlookAppOm.prototype.GetExtensionId = function() + { + return this._initialData$p$0.get__extensionId$i$0() + }; + OSF.DDA.OutlookAppOm.prototype.setCurrentItemNumber = function(itemNumber) + { + this._additionalOutlookParams$p$0.setCurrentItemNumber(itemNumber) + }; + window["OSF"]["DDA"]["Settings"] = OSF.DDA.Settings = function(data) + { + this._rawData$p$0 = data + }; + window["OSF"]["DDA"]["Settings"]._convertFromRawSettings$p = function(rawSettings) + { + if(!rawSettings) + return{}; + if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() === 8 || window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() === 65536 || window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() === 4194304) + { + var outlookSettings = rawSettings["SettingsKey"]; + if(outlookSettings) + return OSF.DDA.SettingsManager["deserializeSettings"](outlookSettings) + } + return rawSettings + }; + OSF.DDA.Settings.prototype = { + _rawData$p$0: null, + _settingsData$p$0: null, + get__data$p$0: function() + { + if(!this._settingsData$p$0) + { + this._settingsData$p$0 = window["OSF"]["DDA"]["Settings"]._convertFromRawSettings$p(this._rawData$p$0); + this._rawData$p$0 = null + } + return this._settingsData$p$0 + }, + _saveSettingsForOutlook$p$0: function(callback, userContext) + { + var storedException = null; + var startTime = (new Date)["getTime"](); + var detailedErrorCode = -1; + try + { + var serializedSettings = OSF.DDA.SettingsManager["serializeSettings"](this.get__data$p$0()); + var jsonSettings = window["JSON"]["stringify"](serializedSettings); + var settingsObjectToSave = {SettingsKey: jsonSettings}; + OSF.DDA.ClientSettingsManager["write"](settingsObjectToSave) + } + catch(ex) + { + storedException = ex + } + var asyncResult; + if(storedException) + { + detailedErrorCode = 9019; + asyncResult = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,detailedErrorCode,userContext,storedException["message"]) + } + else + { + detailedErrorCode = 0; + asyncResult = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,0,detailedErrorCode,userContext,null) + } + window["OSF"]["AppTelemetry"]["onMethodDone"](404,null,Math["abs"]((new Date)["getTime"]() - startTime),detailedErrorCode); + if(callback) + callback(asyncResult) + }, + _saveSettingsForOwa$p$0: function(callback, userContext) + { + var serializedSettings = OSF.DDA.SettingsManager["serializeSettings"](this.get__data$p$0()); + var $$t_7 = this; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.invokeHostMethod(404,[serializedSettings],function(resultCode, response) + { + if(callback) + { + var asyncResult; + if(resultCode) + asyncResult = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9017,userContext,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode)); + else + { + var responseDictionary = response; + if(!responseDictionary["error"]) + asyncResult = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,0,0,userContext,null); + else + asyncResult = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9019,userContext,responseDictionary["errorMessage"]) + } + callback(asyncResult) + } + }) + } + }; + OSF.DDA.Settings.prototype.get = function(name) + { + return this.get__data$p$0()[name] + }; + OSF.DDA.Settings.prototype.set = function(name, value) + { + this.get__data$p$0()[name] = value + }; + OSF.DDA.Settings.prototype.remove = function(name) + { + delete this.get__data$p$0()[name] + }; + OSF.DDA.Settings.prototype.saveAsync = function() + { + var args = []; + for(var $$pai_4 = 0; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4] = arguments[$$pai_4]; + var commonParameters = $h.CommonParameters.parse(args,false); + if(window["JSON"]["stringify"](OSF.DDA.SettingsManager["serializeSettings"](this.get__data$p$0())).length > 32768) + { + var asyncResult = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9019,commonParameters._asyncContext$p$0,""); + var $$t_3 = this; + window.setTimeout(function() + { + commonParameters._callback$p$0(asyncResult) + },0); + return + } + if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() === 64) + this._saveSettingsForOwa$p$0(commonParameters._callback$p$0,commonParameters._asyncContext$p$0); + else + this._saveSettingsForOutlook$p$0(commonParameters._callback$p$0,commonParameters._asyncContext$p$0) + }; + Type.registerNamespace("$h"); + var $h = window["$h"] || {}; + Type.registerNamespace("Office.cast"); + var Office = window["Office"] || {}; + Office.cast = Office.cast || {}; + $h.AdditionalGlobalParameters = function(supported) + { + this._parameterBlobSupported$p$0 = supported; + this._itemNumber$p$0 = 0 + }; + $h.AdditionalGlobalParameters.prototype = { + _parameterBlobSupported$p$0: false, + _itemNumber$p$0: 0, + _actionsDefinition$p$0: null, + setActionsDefinition: function(actionsDefinition) + { + this._actionsDefinition$p$0 = actionsDefinition + }, + setCurrentItemNumber: function(itemNumber) + { + if(itemNumber > 0) + this._itemNumber$p$0 = itemNumber + }, + get_itemNumber: function() + { + return this._itemNumber$p$0 + }, + get_actionsDefinition: function() + { + return this._actionsDefinition$p$0 + }, + updateOutlookExecuteParameters: function(executeParameters, additionalApiParameters) + { + if(this._parameterBlobSupported$p$0) + { + if(this._itemNumber$p$0 > 0) + additionalApiParameters["itemNumber"] = this._itemNumber$p$0["toString"](); + if(this._actionsDefinition$p$0) + additionalApiParameters["actions"] = this._actionsDefinition$p$0; + if(!Object["keys"](additionalApiParameters)["length"]) + return; + if(!executeParameters["val"]) + executeParameters["val"] = []; + executeParameters["val"]["push"](window["JSON"]["stringify"](additionalApiParameters)) + } + } + }; + $h.Appointment = function(dataDictionary) + { + this.$$d__getOrganizer$p$2 = Function.createDelegate(this,this._getOrganizer$p$2); + this.$$d__getNormalizedSubject$p$2 = Function.createDelegate(this,this._getNormalizedSubject$p$2); + this.$$d__getSubject$p$2 = Function.createDelegate(this,this._getSubject$p$2); + this.$$d__getResources$p$2 = Function.createDelegate(this,this._getResources$p$2); + this.$$d__getRequiredAttendees$p$2 = Function.createDelegate(this,this._getRequiredAttendees$p$2); + this.$$d__getOptionalAttendees$p$2 = Function.createDelegate(this,this._getOptionalAttendees$p$2); + this.$$d__getLocation$p$2 = Function.createDelegate(this,this._getLocation$p$2); + this.$$d__getEnd$p$2 = Function.createDelegate(this,this._getEnd$p$2); + this.$$d__getStart$p$2 = Function.createDelegate(this,this._getStart$p$2); + $h.Appointment["initializeBase"](this,[dataDictionary]); + $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"resources",this.$$d__getResources$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"organizer",this.$$d__getOrganizer$p$2) + }; + $h.Appointment.prototype = { + getItemType: function() + { + return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Appointment"] + }, + _getStart$p$2: function() + { + return this._data$p$0.get__start$i$0() + }, + _getEnd$p$2: function() + { + return this._data$p$0.get__end$i$0() + }, + _getLocation$p$2: function() + { + return this._data$p$0.get__location$i$0() + }, + _getOptionalAttendees$p$2: function() + { + return this._data$p$0.get__cc$i$0() + }, + _getRequiredAttendees$p$2: function() + { + return this._data$p$0.get__to$i$0() + }, + _getResources$p$2: function() + { + return this._data$p$0.get__resources$i$0() + }, + _getSubject$p$2: function() + { + return this._data$p$0.get__subject$i$0() + }, + _getNormalizedSubject$p$2: function() + { + return this._data$p$0.get__normalizedSubject$i$0() + }, + _getOrganizer$p$2: function() + { + return this._data$p$0.get__organizer$i$0() + } + }; + $h.Appointment.prototype.getEntities = function() + { + return this._data$p$0._getEntities$i$0() + }; + $h.Appointment.prototype.getEntitiesByType = function(entityType) + { + return this._data$p$0._getEntitiesByType$i$0(entityType) + }; + $h.Appointment.prototype.getSelectedEntities = function() + { + return this._data$p$0._getSelectedEntities$i$0() + }; + $h.Appointment.prototype.getRegExMatches = function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches"); + return this._data$p$0._getRegExMatches$i$0() + }; + $h.Appointment.prototype.getFilteredEntitiesByName = function(name) + { + return this._data$p$0._getFilteredEntitiesByName$i$0(name) + }; + $h.Appointment.prototype.getRegExMatchesByName = function(name) + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName"); + return this._data$p$0._getRegExMatchesByName$i$0(name) + }; + $h.Appointment.prototype.getSelectedRegExMatches = function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedRegExMatches"); + return this._data$p$0._getSelectedRegExMatches$i$0() + }; + $h.Appointment.prototype.displayReplyForm = function(obj) + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyForm$i$0(obj) + }; + $h.Appointment.prototype.displayReplyAllForm = function(obj) + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyAllForm$i$0(obj) + }; + $h.AppointmentCompose = function(data) + { + this.$$d__getLocation$p$2 = Function.createDelegate(this,this._getLocation$p$2); + this.$$d__getEnd$p$2 = Function.createDelegate(this,this._getEnd$p$2); + this.$$d__getStart$p$2 = Function.createDelegate(this,this._getStart$p$2); + this.$$d__getOptionalAttendees$p$2 = Function.createDelegate(this,this._getOptionalAttendees$p$2); + this.$$d__getRequiredAttendees$p$2 = Function.createDelegate(this,this._getRequiredAttendees$p$2); + $h.AppointmentCompose["initializeBase"](this,[data]); + $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2) + }; + $h.AppointmentCompose.prototype = { + _requiredAttendees$p$2: null, + _optionalAttendees$p$2: null, + _start$p$2: null, + _end$p$2: null, + _location$p$2: null, + getItemType: function() + { + return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Appointment"] + }, + _getRequiredAttendees$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._requiredAttendees$p$2) + this._requiredAttendees$p$2 = new $h.ComposeRecipient(0,"requiredAttendees"); + return this._requiredAttendees$p$2 + }, + _getOptionalAttendees$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._optionalAttendees$p$2) + this._optionalAttendees$p$2 = new $h.ComposeRecipient(1,"optionalAttendees"); + return this._optionalAttendees$p$2 + }, + _getStart$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._start$p$2) + this._start$p$2 = new $h.ComposeTime(1); + return this._start$p$2 + }, + _getEnd$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._end$p$2) + this._end$p$2 = new $h.ComposeTime(2); + return this._end$p$2 + }, + _getLocation$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._location$p$2) + this._location$p$2 = new $h.ComposeLocation; + return this._location$p$2 + } + }; + $h.AttachmentConstants = function(){}; + $h.AttachmentDetails = function(data) + { + this.$$d__getIsInline$p$0 = Function.createDelegate(this,this._getIsInline$p$0); + this.$$d__getAttachmentType$p$0 = Function.createDelegate(this,this._getAttachmentType$p$0); + this.$$d__getSize$p$0 = Function.createDelegate(this,this._getSize$p$0); + this.$$d__getContentType$p$0 = Function.createDelegate(this,this._getContentType$p$0); + this.$$d__getName$p$0 = Function.createDelegate(this,this._getName$p$0); + this.$$d__getId$p$0 = Function.createDelegate(this,this._getId$p$0); + this._data$p$0 = data; + $h.InitialData._defineReadOnlyProperty$i(this,"id",this.$$d__getId$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"name",this.$$d__getName$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"contentType",this.$$d__getContentType$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"size",this.$$d__getSize$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"attachmentType",this.$$d__getAttachmentType$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"isInline",this.$$d__getIsInline$p$0) + }; + $h.AttachmentDetails.prototype = { + _data$p$0: null, + _getId$p$0: function() + { + return this._data$p$0["id"] + }, + _getName$p$0: function() + { + return this._data$p$0["name"] + }, + _getContentType$p$0: function() + { + return this._data$p$0["contentType"] + }, + _getSize$p$0: function() + { + return this._data$p$0["size"] + }, + _getAttachmentType$p$0: function() + { + var response = this._data$p$0["attachmentType"]; + return response < $h.AttachmentDetails._attachmentTypeMap$p["length"] ? $h.AttachmentDetails._attachmentTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["File"] + }, + _getIsInline$p$0: function() + { + return this._data$p$0["isInline"] + } + }; + $h.Body = function(){}; + $h.Body._tryMapToHostCoercionType$i = function(coercionType, hostCoercionType) + { + hostCoercionType["val"] = undefined; + if(coercionType === window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Html"]) + hostCoercionType["val"] = 3; + else if(coercionType === window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Text"]) + hostCoercionType["val"] = 0; + else + return false; + return true + }; + $h.Body.prototype.getAsync = function(coercionType) + { + var args = []; + for(var $$pai_7 = 1; $$pai_7 < arguments["length"]; ++$$pai_7) + args[$$pai_7 - 1] = arguments[$$pai_7]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"body.getAsync"); + var commonParameters = $h.CommonParameters.parse(args,true); + var hostCoercionType; + var $$t_5, + $$t_6; + if(!($$t_6 = $h.Body._tryMapToHostCoercionType$i(coercionType,$$t_5 = {val: hostCoercionType}),hostCoercionType = $$t_5["val"],$$t_6)) + throw Error.argument("coercionType"); + var dataToHost = {coercionType: hostCoercionType}; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(37,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.ComposeBody = function() + { + $h.ComposeBody["initializeBase"](this) + }; + $h.ComposeBody._createParameterDictionaryToHost$i = function(data, parameters) + { + var dataToHost = {data: data}; + return $h.ComposeBody._addCoercionTypeToDictionary$i(dataToHost,parameters) + }; + $h.ComposeBody._createAppendParameterDictionaryToHost$i = function(data, parameters) + { + var dataToHost = {appendTxt: data}; + return $h.ComposeBody._addCoercionTypeToDictionary$i(dataToHost,parameters) + }; + $h.ComposeBody._addCoercionTypeToDictionary$i = function(dataToHost, parameters) + { + if(parameters._options$p$0 && parameters._options$p$0["hasOwnProperty"]("coercionType") && !$h.ScriptHelpers.isNull(parameters._options$p$0["coercionType"])) + { + var hostCoercionType; + var $$t_3, + $$t_4; + if(!($$t_4 = $h.Body._tryMapToHostCoercionType$i(parameters._options$p$0["coercionType"],$$t_3 = {val: hostCoercionType}),hostCoercionType = $$t_3["val"],$$t_4)) + { + if(parameters._callback$p$0) + parameters._callback$p$0(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,1e3,parameters._asyncContext$p$0,null)); + return null + } + dataToHost["coercionType"] = hostCoercionType + } + else + dataToHost["coercionType"] = 0; + return dataToHost + }; + $h.ComposeBody.prototype.getTypeAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"body.getTypeAsync"); + var parameters = $h.CommonParameters.parse(args,true); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(14,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeBody.prototype.setSelectedDataAsync = function(data) + { + var args = []; + for(var $$pai_4 = 1; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4 - 1] = arguments[$$pai_4]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.setSelectedDataAsync"); + var parameters = $h.CommonParameters.parse(args,false); + if(!String["isInstanceOfType"](data)) + throw Error.argumentType("data",Object["getType"](data),String); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); + var dataToHost = $h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); + if(!dataToHost) + return; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(13,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeBody.prototype.prependAsync = function(data) + { + var args = []; + for(var $$pai_4 = 1; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4 - 1] = arguments[$$pai_4]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.prependAsync"); + var parameters = $h.CommonParameters.parse(args,false); + if(!String["isInstanceOfType"](data)) + throw Error.argumentType("data",Object["getType"](data),String); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); + var dataToHost = $h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); + if(!dataToHost) + return; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(23,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeBody.prototype.appendOnSendAsync = function(data) + { + var args = []; + for(var $$pai_4 = 1; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4 - 1] = arguments[$$pai_4]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.appendOnSendAsync"); + var parameters = $h.CommonParameters.parse(args,false); + if(!data) + data = ""; + if(!String["isInstanceOfType"](data)) + throw Error.argumentType("data",Object["getType"](data),String); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,5e3,"data"); + var dataToHost = $h.ComposeBody._createAppendParameterDictionaryToHost$i(data,parameters); + if(!dataToHost) + return; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(100,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeBody.prototype.setAsync = function(data) + { + var args = []; + for(var $$pai_4 = 1; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4 - 1] = arguments[$$pai_4]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.setAsync"); + var parameters = $h.CommonParameters.parse(args,false); + if(!String["isInstanceOfType"](data)) + throw Error.argumentType("data",Object["getType"](data),String); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); + var dataToHost = $h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); + if(!dataToHost) + return; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(38,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeItem = function(data) + { + this.$$d__getBody$p$1 = Function.createDelegate(this,this._getBody$p$1); + this.$$d__getSubject$p$1 = Function.createDelegate(this,this._getSubject$p$1); + $h.ComposeItem["initializeBase"](this,[data]); + $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$1); + $h.InitialData._defineReadOnlyProperty$i(this,"body",this.$$d__getBody$p$1) + }; + $h.ComposeItem.prototype = { + _subject$p$1: null, + _body$p$1: null, + _getBody$p$1: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._body$p$1) + this._body$p$1 = new $h.ComposeBody; + return this._body$p$1 + }, + _getSubject$p$1: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._subject$p$1) + this._subject$p$1 = new $h.ComposeSubject; + return this._subject$p$1 + } + }; + $h.ComposeItem.prototype.addFileAttachmentAsync = function(uri, attachmentName) + { + var args = []; + for(var $$pai_6 = 2; $$pai_6 < arguments["length"]; ++$$pai_6) + args[$$pai_6 - 2] = arguments[$$pai_6]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"addFileAttachmentAsync"); + if(!$h.ScriptHelpers.isNonEmptyString(uri)) + throw Error.argument("uri"); + if(!$h.ScriptHelpers.isNonEmptyString(attachmentName)) + throw Error.argument("attachmentName"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(uri.length,0,2048,"uri"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentName.length,0,255,"attachmentName"); + var commonParameters = $h.CommonParameters.parse(args,false); + var isInline = false; + if(!$h.ScriptHelpers.isNull(commonParameters._options$p$0)) + isInline = $h.ScriptHelpers.isValueTrue(commonParameters._options$p$0["isInline"]); + var parameters = { + uri: uri, + name: attachmentName, + isInline: isInline, + __timeout__: 6e5 + }; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(16,parameters,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.ComposeItem.prototype.addItemAttachmentAsync = function(itemId, attachmentName) + { + var args = []; + for(var $$pai_5 = 2; $$pai_5 < arguments["length"]; ++$$pai_5) + args[$$pai_5 - 2] = arguments[$$pai_5]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"addItemAttachmentAsync"); + if(!$h.ScriptHelpers.isNonEmptyString(itemId)) + throw Error.argument("itemId"); + if(!$h.ScriptHelpers.isNonEmptyString(attachmentName)) + throw Error.argument("attachmentName"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(itemId.length,0,200,"itemId"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentName.length,0,255,"attachmentName"); + var commonParameters = $h.CommonParameters.parse(args,false); + var parameters = { + itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId), + name: attachmentName, + __timeout__: 6e5 + }; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(19,parameters,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.ComposeItem.prototype.removeAttachmentAsync = function(attachmentId) + { + var args = []; + for(var $$pai_3 = 1; $$pai_3 < arguments["length"]; ++$$pai_3) + args[$$pai_3 - 1] = arguments[$$pai_3]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"removeAttachmentAsync"); + if(!$h.ScriptHelpers.isNonEmptyString(attachmentId)) + throw Error.argument("attachmentId"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentId.length,0,200,"attachmentId"); + var commonParameters = $h.CommonParameters.parse(args,false); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(20,{attachmentIndex: attachmentId},null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.ComposeItem.prototype.getSelectedDataAsync = function(coercionType) + { + var args = []; + for(var $$pai_7 = 1; $$pai_7 < arguments["length"]; ++$$pai_7) + args[$$pai_7 - 1] = arguments[$$pai_7]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedDataAsync"); + var commonParameters = $h.CommonParameters.parse(args,true); + var hostCoercionType; + var $$t_5, + $$t_6; + if(coercionType !== window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Html"] && coercionType !== window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Text"] || !($$t_6 = $h.Body._tryMapToHostCoercionType$i(coercionType,$$t_5 = {val: hostCoercionType}),hostCoercionType = $$t_5["val"],$$t_6)) + throw Error.argument("coercionType"); + var dataToHost = {coercionType: hostCoercionType}; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(28,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.ComposeItem.prototype.setSelectedDataAsync = function(data) + { + var args = []; + for(var $$pai_4 = 1; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4 - 1] = arguments[$$pai_4]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"setSelectedDataAsync"); + var parameters = $h.CommonParameters.parse(args,false); + if(!String["isInstanceOfType"](data)) + throw Error.argumentType("data",Object["getType"](data),String); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); + var dataToHost = $h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); + if(!dataToHost) + return; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(29,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeItem.prototype.close = function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(41,null,null,null,null) + }; + $h.ComposeItem.prototype.saveAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"saveAsync"); + var parameters = $h.CommonParameters.parse(args,false); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(32,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeRecipient = function(type, propertyName) + { + this._type$p$0 = type; + this._propertyName$p$0 = propertyName + }; + $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p = function(displayName, emailAddress) + { + if(!displayName && !emailAddress) + throw Error.argument("recipients"); + if(displayName && displayName.length > 255) + throw Error.argumentOutOfRange("recipients",displayName.length,window["_u"]["ExtensibilityStrings"]["l_DisplayNameTooLong_Text"]); + if(emailAddress && emailAddress.length > 571) + throw Error.argumentOutOfRange("recipients",emailAddress.length,window["_u"]["ExtensibilityStrings"]["l_EmailAddressTooLong_Text"]); + }; + $h.ComposeRecipient._getAsyncFormatter$p = function(rawInput) + { + var input = rawInput; + var output = []; + for(var i = 0; i < input["length"]; i++) + { + var email = new $h.EmailAddressDetails(input[i]); + output[i] = email + } + return output + }; + $h.ComposeRecipient._createEmailDictionaryForHost$p = function(address, name) + { + return{ + address: address, + name: name + } + }; + $h.ComposeRecipient.prototype = { + _propertyName$p$0: null, + _type$p$0: 0, + setAddHelper: function(recipients, args, isSet) + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(recipients["length"],0,100,"recipients"); + var parameters = $h.CommonParameters.parse(args,false); + var recipientData = []; + if(Array["isInstanceOfType"](recipients)) + for(var i = 0; i < recipients["length"]; i++) + if(String["isInstanceOfType"](recipients[i])) + { + $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(recipients[i],recipients[i]); + recipientData[i] = $h.ComposeRecipient._createEmailDictionaryForHost$p(recipients[i],recipients[i]) + } + else if($h.EmailAddressDetails["isInstanceOfType"](recipients[i])) + { + var address = recipients[i]; + $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(address["displayName"],address["emailAddress"]); + recipientData[i] = $h.ComposeRecipient._createEmailDictionaryForHost$p(address["emailAddress"],address["displayName"]) + } + else if(Object["isInstanceOfType"](recipients[i])) + { + var input = recipients[i]; + var emailAddress = input["emailAddress"]; + var displayName = input["displayName"]; + $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(displayName,emailAddress); + recipientData[i] = $h.ComposeRecipient._createEmailDictionaryForHost$p(emailAddress,displayName) + } + else + throw Error.argument("recipients"); + else + throw Error.argument("recipients"); + var $$t_B = this; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(isSet ? 21 : 22,{ + recipientField: this._type$p$0, + recipientArray: recipientData + },function(rawInput) + { + return rawInput + },parameters._asyncContext$p$0,parameters._callback$p$0) + } + }; + $h.ComposeRecipient.prototype.getAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + var parameters = $h.CommonParameters.parse(args,true); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,this._propertyName$p$0 + ".getAsync"); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(15,{recipientField: this._type$p$0},$h.ComposeRecipient._getAsyncFormatter$p,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeRecipient.prototype.setAsync = function(recipients) + { + var args = []; + for(var $$pai_2 = 1; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2 - 1] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._propertyName$p$0 + ".setAsync"); + this.setAddHelper(recipients,args,true) + }; + $h.ComposeRecipient.prototype.addAsync = function(recipients) + { + var args = []; + for(var $$pai_2 = 1; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2 - 1] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._propertyName$p$0 + ".addAsync"); + this.setAddHelper(recipients,args,false) + }; + $h.ComposeRecipient.RecipientField = function(){}; + $h.ComposeRecipient.RecipientField.prototype = { + to: 0, + cc: 1, + bcc: 2, + requiredAttendees: 0, + optionalAttendees: 1 + }; + $h.ComposeRecipient.RecipientField["registerEnum"]("$h.ComposeRecipient.RecipientField",false); + $h.ComposeLocation = function(){}; + $h.ComposeLocation.prototype.getAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"location.getAsync"); + var parameters = $h.CommonParameters.parse(args,true); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(26,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeLocation.prototype.setAsync = function(location) + { + var args = []; + for(var $$pai_3 = 1; $$pai_3 < arguments["length"]; ++$$pai_3) + args[$$pai_3 - 1] = arguments[$$pai_3]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"location.setAsync"); + var parameters = $h.CommonParameters.parse(args,false); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(location.length,0,255,"location"); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(27,{location: location},null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeSubject = function(){}; + $h.ComposeSubject.prototype.getAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + var parameters = $h.CommonParameters.parse(args,true); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"subject.getAsync"); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(18,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeSubject.prototype.setAsync = function(data) + { + var args = []; + for(var $$pai_3 = 1; $$pai_3 < arguments["length"]; ++$$pai_3) + args[$$pai_3 - 1] = arguments[$$pai_3]; + var parameters = $h.CommonParameters.parse(args,false); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"subject.setAsync"); + if(!String["isInstanceOfType"](data)) + throw Error.argument("data"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,255,"data"); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(17,{subject: data},null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeTime = function(type) + { + this.$$d__ticksToDateFormatter$p$0 = Function.createDelegate(this,this._ticksToDateFormatter$p$0); + this._timeType$p$0 = type + }; + $h.ComposeTime.prototype = { + _timeType$p$0: 0, + _ticksToDateFormatter$p$0: function(rawInput) + { + var ticks = rawInput; + return new Date(ticks) + }, + _getPropertyName$p$0: function() + { + return this._timeType$p$0 === 1 ? "start" : "end" + } + }; + $h.ComposeTime.prototype.getAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,this._getPropertyName$p$0() + ".getAsync"); + var parameters = $h.CommonParameters.parse(args,true); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(24,{TimeProperty: this._timeType$p$0},this.$$d__ticksToDateFormatter$p$0,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeTime.prototype.setAsync = function(dateTime) + { + var args = []; + for(var $$pai_3 = 1; $$pai_3 < arguments["length"]; ++$$pai_3) + args[$$pai_3 - 1] = arguments[$$pai_3]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._getPropertyName$p$0() + ".setAsync"); + if(!Date["isInstanceOfType"](dateTime)) + throw Error.argumentType("dateTime",Object["getType"](dateTime),Date); + if(window["isNaN"](dateTime["getTime"]())) + throw Error.argument("dateTime"); + if(dateTime["getTime"]() < -864e13 || dateTime["getTime"]() > 864e13) + throw Error.argumentOutOfRange("dateTime"); + var parameters = $h.CommonParameters.parse(args,false); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(25,{ + TimeProperty: this._timeType$p$0, + time: dateTime["getTime"]() + },null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeTime.TimeType = function(){}; + $h.ComposeTime.TimeType.prototype = { + start: 1, + end: 2 + }; + $h.ComposeTime.TimeType["registerEnum"]("$h.ComposeTime.TimeType",false); + $h.Contact = function(data) + { + this.$$d__getContactString$p$0 = Function.createDelegate(this,this._getContactString$p$0); + this.$$d__getAddresses$p$0 = Function.createDelegate(this,this._getAddresses$p$0); + this.$$d__getUrls$p$0 = Function.createDelegate(this,this._getUrls$p$0); + this.$$d__getEmailAddresses$p$0 = Function.createDelegate(this,this._getEmailAddresses$p$0); + this.$$d__getPhoneNumbers$p$0 = Function.createDelegate(this,this._getPhoneNumbers$p$0); + this.$$d__getBusinessName$p$0 = Function.createDelegate(this,this._getBusinessName$p$0); + this.$$d__getPersonName$p$0 = Function.createDelegate(this,this._getPersonName$p$0); + this._data$p$0 = data; + $h.InitialData._defineReadOnlyProperty$i(this,"personName",this.$$d__getPersonName$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"businessName",this.$$d__getBusinessName$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"contactString",this.$$d__getContactString$p$0) + }; + $h.Contact.prototype = { + _data$p$0: null, + _phoneNumbers$p$0: null, + _getPersonName$p$0: function() + { + return this._data$p$0["PersonName"] + }, + _getBusinessName$p$0: function() + { + return this._data$p$0["BusinessName"] + }, + _getAddresses$p$0: function() + { + return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses") + }, + _getEmailAddresses$p$0: function() + { + return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses") + }, + _getUrls$p$0: function() + { + return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls") + }, + _getPhoneNumbers$p$0: function() + { + if(!this._phoneNumbers$p$0) + { + var $$t_1 = this; + this._phoneNumbers$p$0 = $h.Entities._getExtractedObjects$i($h.PhoneNumber,this._data$p$0,"PhoneNumbers",function(data) + { + return new $h.PhoneNumber(data) + }) + } + return this._phoneNumbers$p$0 + }, + _getContactString$p$0: function() + { + return this._data$p$0["ContactString"] + } + }; + $h.CustomProperties = function(data) + { + if($h.ScriptHelpers.isNullOrUndefined(data)) + throw Error.argumentNull("data"); + if(Array["isInstanceOfType"](data)) + { + var customPropertiesArray = data; + if(customPropertiesArray["length"] > 0) + this._data$p$0 = customPropertiesArray[0]; + else + throw Error.argument("data"); + } + else + this._data$p$0 = data + }; + $h.CustomProperties.prototype = {_data$p$0: null}; + $h.CustomProperties.prototype.get = function(name) + { + var value = this._data$p$0[name]; + if(typeof value === "string") + { + var valueString = value; + if(valueString.length > 6 && valueString.startsWith("Date(") && valueString.endsWith(")")) + { + var ticksString = valueString.substring(5,valueString.length - 1); + var ticks = window["parseInt"](ticksString); + if(!window["isNaN"](ticks)) + { + var dateTimeValue = new Date(ticks); + if(dateTimeValue) + value = dateTimeValue + } + } + } + return value + }; + $h.CustomProperties.prototype.set = function(name, value) + { + if(window["OSF"]["OUtil"]["isDate"](value)) + value = "Date(" + value["getTime"]() + ")"; + this._data$p$0[name] = value + }; + $h.CustomProperties.prototype.remove = function(name) + { + delete this._data$p$0[name] + }; + $h.CustomProperties.prototype.saveAsync = function() + { + var args = []; + for(var $$pai_4 = 0; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4] = arguments[$$pai_4]; + var MaxCustomPropertiesLength = 2500; + if(window["JSON"]["stringify"](this._data$p$0).length > MaxCustomPropertiesLength) + throw Error.argument(); + var parameters = $h.CommonParameters.parse(args,false,true); + var saveCustomProperties = new $h.SaveDictionaryRequest(parameters._callback$p$0,parameters._asyncContext$p$0); + saveCustomProperties._sendRequest$i$0(4,"SaveCustomProperties",{customProperties: this._data$p$0}) + }; + $h.Diagnostics = function(data, appName) + { + this.$$d__getOwaView$p$0 = Function.createDelegate(this,this._getOwaView$p$0); + this.$$d__getHostVersion$p$0 = Function.createDelegate(this,this._getHostVersion$p$0); + this.$$d__getHostName$p$0 = Function.createDelegate(this,this._getHostName$p$0); + this._data$p$0 = data; + this._appName$p$0 = appName; + $h.InitialData._defineReadOnlyProperty$i(this,"hostName",this.$$d__getHostName$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"hostVersion",this.$$d__getHostVersion$p$0); + if(64 === this._appName$p$0) + $h.InitialData._defineReadOnlyProperty$i(this,"OWAView",this.$$d__getOwaView$p$0) + }; + $h.Diagnostics.prototype = { + _data$p$0: null, + _appName$p$0: 0, + _getHostName$p$0: function() + { + switch(this._appName$p$0) + { + case 8: + return"Outlook"; + case 64: + return"OutlookWebApp"; + case 65536: + return"OutlookIOS"; + case 4194304: + return"OutlookAndroid"; + default: + return null + } + }, + _getHostVersion$p$0: function() + { + return this._data$p$0.get__hostVersion$i$0() + }, + _getOwaView$p$0: function() + { + return this._data$p$0.get__owaView$i$0() + } + }; + $h.EmailAddressDetails = function(data) + { + this.$$d__getRecipientType$p$0 = Function.createDelegate(this,this._getRecipientType$p$0); + this.$$d__getAppointmentResponse$p$0 = Function.createDelegate(this,this._getAppointmentResponse$p$0); + this.$$d__getDisplayName$p$0 = Function.createDelegate(this,this._getDisplayName$p$0); + this.$$d__getEmailAddress$p$0 = Function.createDelegate(this,this._getEmailAddress$p$0); + this._data$p$0 = data; + $h.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0); + if($h.ScriptHelpers.dictionaryContainsKey(data,"appointmentResponse")) + $h.InitialData._defineReadOnlyProperty$i(this,"appointmentResponse",this.$$d__getAppointmentResponse$p$0); + if($h.ScriptHelpers.dictionaryContainsKey(data,"recipientType")) + $h.InitialData._defineReadOnlyProperty$i(this,"recipientType",this.$$d__getRecipientType$p$0) + }; + $h.EmailAddressDetails._createFromEmailUserDictionary$i = function(data) + { + var emailAddressDetailsDictionary = {}; + var displayName = data["Name"]; + var emailAddress = data["UserId"]; + emailAddressDetailsDictionary["name"] = displayName || $h.EmailAddressDetails._emptyString$p; + emailAddressDetailsDictionary["address"] = emailAddress || $h.EmailAddressDetails._emptyString$p; + return new $h.EmailAddressDetails(emailAddressDetailsDictionary) + }; + $h.EmailAddressDetails.prototype = { + _data$p$0: null, + _getEmailAddress$p$0: function() + { + return this._data$p$0["address"] + }, + _getDisplayName$p$0: function() + { + return this._data$p$0["name"] + }, + _getAppointmentResponse$p$0: function() + { + var response = this._data$p$0["appointmentResponse"]; + return response < $h.EmailAddressDetails._responseTypeMap$p["length"] ? $h.EmailAddressDetails._responseTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["None"] + }, + _getRecipientType$p$0: function() + { + var response = this._data$p$0["recipientType"]; + return response < $h.EmailAddressDetails._recipientTypeMap$p["length"] ? $h.EmailAddressDetails._recipientTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["Other"] + } + }; + $h.EmailAddressDetails.prototype.toJSON = function() + { + var result = {}; + result["emailAddress"] = this._getEmailAddress$p$0(); + result["displayName"] = this._getDisplayName$p$0(); + if($h.ScriptHelpers.dictionaryContainsKey(this._data$p$0,"appointmentResponse")) + result["appointmentResponse"] = this._getAppointmentResponse$p$0(); + if($h.ScriptHelpers.dictionaryContainsKey(this._data$p$0,"recipientType")) + result["recipientType"] = this._getRecipientType$p$0(); + return result + }; + $h.Entities = function(data, filteredEntitiesData, timeSent, permissionLevel) + { + this.$$d__createMeetingSuggestion$p$0 = Function.createDelegate(this,this._createMeetingSuggestion$p$0); + this.$$d__getParcelDeliveries$p$0 = Function.createDelegate(this,this._getParcelDeliveries$p$0); + this.$$d__getFlightReservations$p$0 = Function.createDelegate(this,this._getFlightReservations$p$0); + this.$$d__getContacts$p$0 = Function.createDelegate(this,this._getContacts$p$0); + this.$$d__getPhoneNumbers$p$0 = Function.createDelegate(this,this._getPhoneNumbers$p$0); + this.$$d__getUrls$p$0 = Function.createDelegate(this,this._getUrls$p$0); + this.$$d__getEmailAddresses$p$0 = Function.createDelegate(this,this._getEmailAddresses$p$0); + this.$$d__getMeetingSuggestions$p$0 = Function.createDelegate(this,this._getMeetingSuggestions$p$0); + this.$$d__getTaskSuggestions$p$0 = Function.createDelegate(this,this._getTaskSuggestions$p$0); + this.$$d__getAddresses$p$0 = Function.createDelegate(this,this._getAddresses$p$0); + this._data$p$0 = data || {}; + this._filteredData$p$0 = filteredEntitiesData || {}; + this._dateTimeSent$p$0 = timeSent; + $h.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"taskSuggestions",this.$$d__getTaskSuggestions$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"meetingSuggestions",this.$$d__getMeetingSuggestions$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"contacts",this.$$d__getContacts$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"flightReservations",this.$$d__getFlightReservations$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"parcelDeliveries",this.$$d__getParcelDeliveries$p$0); + this._permissionLevel$p$0 = permissionLevel + }; + $h.Entities._getExtractedObjects$i = function(T, data, name, creator, removeDuplicates, stringPropertyName) + { + var results = null; + var extractedObjects = data[name]; + if(!extractedObjects) + return new Array(0); + if(removeDuplicates) + extractedObjects = $h.Entities._removeDuplicate$p(Object,extractedObjects,$h.Entities._entityDictionaryEquals$p,stringPropertyName); + results = new Array(extractedObjects["length"]); + var count = 0; + for(var $$arr_9 = extractedObjects, $$len_A = $$arr_9.length, $$idx_B = 0; $$idx_B < $$len_A; ++$$idx_B) + { + var extractedObject = $$arr_9[$$idx_B]; + if(name === "MeetingSuggestions") + extractedObject["IsLegacyEntityExtraction"] = "IsLegacyEntityExtraction" in data ? data["IsLegacyEntityExtraction"] : true; + if(creator) + results[count++] = creator(extractedObject); + else + results[count++] = extractedObject + } + return results + }; + $h.Entities._getExtractedStringProperty$i = function(data, name, removeDuplicate) + { + var extractedProperties = data[name]; + if(!extractedProperties) + return new Array(0); + if(removeDuplicate) + extractedProperties = $h.Entities._removeDuplicate$p(String,extractedProperties,$h.Entities._stringEquals$p,null); + return extractedProperties + }; + $h.Entities._createContact$p = function(data) + { + return new $h.Contact(data) + }; + $h.Entities._createTaskSuggestion$p = function(data) + { + return new $h.TaskSuggestion(data) + }; + $h.Entities._createPhoneNumber$p = function(data) + { + return new $h.PhoneNumber(data) + }; + $h.Entities._entityDictionaryEquals$p = function(dictionary1, dictionary2, entityPropertyIdentifier) + { + if(dictionary1 === dictionary2) + return true; + if(!dictionary1 || !dictionary2) + return false; + if(dictionary1[entityPropertyIdentifier] === dictionary2[entityPropertyIdentifier]) + return true; + return false + }; + $h.Entities._stringEquals$p = function(string1, string2, entityProperty) + { + return string1 === string2 + }; + $h.Entities._removeDuplicate$p = function(T, array, entityEquals, entityPropertyIdentifier) + { + for(var matchIndex1 = array["length"] - 1; matchIndex1 >= 0; matchIndex1--) + { + var removeMatch = false; + for(var matchIndex2 = matchIndex1 - 1; matchIndex2 >= 0; matchIndex2--) + if(entityEquals(array[matchIndex1],array[matchIndex2],entityPropertyIdentifier)) + { + removeMatch = true; + break + } + if(removeMatch) + Array.removeAt(array,matchIndex1) + } + return array + }; + $h.Entities.prototype = { + _dateTimeSent$p$0: null, + _data$p$0: null, + _filteredData$p$0: null, + _filteredEntitiesCache$p$0: null, + _permissionLevel$p$0: 0, + _taskSuggestions$p$0: null, + _meetingSuggestions$p$0: null, + _phoneNumbers$p$0: null, + _contacts$p$0: null, + _addresses$p$0: null, + _emailAddresses$p$0: null, + _urls$p$0: null, + _flightReservations$p$0: null, + _parcelDeliveries$p$0: null, + _getByType$i$0: function(entityType) + { + if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["MeetingSuggestion"]) + return this._getMeetingSuggestions$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["TaskSuggestion"]) + return this._getTaskSuggestions$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Address"]) + return this._getAddresses$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["PhoneNumber"]) + return this._getPhoneNumbers$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["EmailAddress"]) + return this._getEmailAddresses$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Url"]) + return this._getUrls$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Contact"]) + return this._getContacts$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["FlightReservations"]) + return this._getFlightReservations$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["ParcelDeliveries"]) + return this._getParcelDeliveries$p$0(); + return null + }, + _getFilteredEntitiesByName$i$0: function(name) + { + if(!this._filteredEntitiesCache$p$0) + this._filteredEntitiesCache$p$0 = {}; + if(!$h.ScriptHelpers.dictionaryContainsKey(this._filteredEntitiesCache$p$0,name)) + { + var found = false; + for(var i = 0; i < $h.Entities._allEntityKeys$p["length"]; i++) + { + var entityTypeKey = $h.Entities._allEntityKeys$p[i]; + var perEntityTypeDictionary = this._filteredData$p$0[entityTypeKey]; + if(!perEntityTypeDictionary) + continue; + if($h.ScriptHelpers.dictionaryContainsKey(perEntityTypeDictionary,name)) + { + switch(entityTypeKey) + { + case"EmailAddresses": + case"Urls": + this._filteredEntitiesCache$p$0[name] = $h.Entities._getExtractedStringProperty$i(perEntityTypeDictionary,name); + break; + case"Addresses": + this._filteredEntitiesCache$p$0[name] = $h.Entities._getExtractedStringProperty$i(perEntityTypeDictionary,name,true); + break; + case"PhoneNumbers": + this._filteredEntitiesCache$p$0[name] = $h.Entities._getExtractedObjects$i($h.PhoneNumber,perEntityTypeDictionary,name,$h.Entities._createPhoneNumber$p,false,null); + break; + case"TaskSuggestions": + this._filteredEntitiesCache$p$0[name] = $h.Entities._getExtractedObjects$i($h.TaskSuggestion,perEntityTypeDictionary,name,$h.Entities._createTaskSuggestion$p,true,"TaskString"); + break; + case"MeetingSuggestions": + this._filteredEntitiesCache$p$0[name] = $h.Entities._getExtractedObjects$i($h.MeetingSuggestion,perEntityTypeDictionary,name,this.$$d__createMeetingSuggestion$p$0,true,"MeetingString"); + break; + case"Contacts": + this._filteredEntitiesCache$p$0[name] = $h.Entities._getExtractedObjects$i($h.Contact,perEntityTypeDictionary,name,$h.Entities._createContact$p,true,"ContactString"); + break + } + found = true; + break + } + } + if(!found) + this._filteredEntitiesCache$p$0[name] = null + } + return this._filteredEntitiesCache$p$0[name] + }, + _createMeetingSuggestion$p$0: function(data) + { + return new $h.MeetingSuggestion(data,this._dateTimeSent$p$0) + }, + _getAddresses$p$0: function() + { + if(!this._addresses$p$0) + this._addresses$p$0 = $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses",true); + return this._addresses$p$0 + }, + _getEmailAddresses$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); + if(!this._emailAddresses$p$0) + this._emailAddresses$p$0 = $h.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses",false); + return this._emailAddresses$p$0 + }, + _getUrls$p$0: function() + { + if(!this._urls$p$0) + this._urls$p$0 = $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls",false); + return this._urls$p$0 + }, + _getPhoneNumbers$p$0: function() + { + if(!this._phoneNumbers$p$0) + this._phoneNumbers$p$0 = $h.Entities._getExtractedObjects$i($h.PhoneNumber,this._data$p$0,"PhoneNumbers",$h.Entities._createPhoneNumber$p); + return this._phoneNumbers$p$0 + }, + _getTaskSuggestions$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); + if(!this._taskSuggestions$p$0) + this._taskSuggestions$p$0 = $h.Entities._getExtractedObjects$i($h.TaskSuggestion,this._data$p$0,"TaskSuggestions",$h.Entities._createTaskSuggestion$p,true,"TaskString"); + return this._taskSuggestions$p$0 + }, + _getMeetingSuggestions$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); + if(!this._meetingSuggestions$p$0) + this._meetingSuggestions$p$0 = $h.Entities._getExtractedObjects$i($h.MeetingSuggestion,this._data$p$0,"MeetingSuggestions",this.$$d__createMeetingSuggestion$p$0,true,"MeetingString"); + return this._meetingSuggestions$p$0 + }, + _getContacts$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); + if(!this._contacts$p$0) + this._contacts$p$0 = $h.Entities._getExtractedObjects$i($h.Contact,this._data$p$0,"Contacts",$h.Entities._createContact$p,true,"ContactString"); + return this._contacts$p$0 + }, + _getParcelDeliveries$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); + if(!this._parcelDeliveries$p$0) + this._parcelDeliveries$p$0 = $h.Entities._getExtractedObjects$i(Object,this._data$p$0,"ParcelDeliveries",null); + return this._parcelDeliveries$p$0 + }, + _getFlightReservations$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); + if(!this._flightReservations$p$0) + this._flightReservations$p$0 = $h.Entities._getExtractedObjects$i(Object,this._data$p$0,"FlightReservations",null); + return this._flightReservations$p$0 + } + }; + $h.ReplyConstants = function(){}; + $h.AsyncConstants = function(){}; + window["Office"]["cast"]["item"] = Office.cast.item = function(){}; + window["Office"]["cast"]["item"]["toItemRead"] = function(item) + { + if($h.Item["isInstanceOfType"](item)) + return item; + throw Error.argumentType(); + }; + window["Office"]["cast"]["item"]["toItemCompose"] = function(item) + { + if($h.ComposeItem["isInstanceOfType"](item)) + return item; + throw Error.argumentType(); + }; + window["Office"]["cast"]["item"]["toMessage"] = function(item) + { + return window["Office"]["cast"]["item"]["toMessageRead"](item) + }; + window["Office"]["cast"]["item"]["toMessageRead"] = function(item) + { + if($h.Message["isInstanceOfType"](item)) + return item; + throw Error.argumentType(); + }; + window["Office"]["cast"]["item"]["toMessageCompose"] = function(item) + { + if($h.MessageCompose["isInstanceOfType"](item)) + return item; + throw Error.argumentType(); + }; + window["Office"]["cast"]["item"]["toMeetingRequest"] = function(item) + { + if($h.MeetingRequest["isInstanceOfType"](item)) + return item; + throw Error.argumentType(); + }; + window["Office"]["cast"]["item"]["toAppointment"] = function(item) + { + return window["Office"]["cast"]["item"]["toAppointmentRead"](item) + }; + window["Office"]["cast"]["item"]["toAppointmentRead"] = function(item) + { + if($h.Appointment["isInstanceOfType"](item)) + return item; + throw Error.argumentType(); + }; + window["Office"]["cast"]["item"]["toAppointmentCompose"] = function(item) + { + if($h.AppointmentCompose["isInstanceOfType"](item)) + return item; + throw Error.argumentType(); + }; + $h.Item = function(data) + { + this.$$d__getBody$p$1 = Function.createDelegate(this,this._getBody$p$1); + this.$$d__getAttachments$p$1 = Function.createDelegate(this,this._getAttachments$p$1); + this.$$d__getItemClass$p$1 = Function.createDelegate(this,this._getItemClass$p$1); + this.$$d__getItemId$p$1 = Function.createDelegate(this,this._getItemId$p$1); + this.$$d__getDateTimeModified$p$1 = Function.createDelegate(this,this._getDateTimeModified$p$1); + this.$$d__getDateTimeCreated$p$1 = Function.createDelegate(this,this._getDateTimeCreated$p$1); + $h.Item["initializeBase"](this,[data]); + $h.InitialData._defineReadOnlyProperty$i(this,"dateTimeCreated",this.$$d__getDateTimeCreated$p$1); + $h.InitialData._defineReadOnlyProperty$i(this,"dateTimeModified",this.$$d__getDateTimeModified$p$1); + $h.InitialData._defineReadOnlyProperty$i(this,"itemId",this.$$d__getItemId$p$1); + $h.InitialData._defineReadOnlyProperty$i(this,"itemClass",this.$$d__getItemClass$p$1); + $h.InitialData._defineReadOnlyProperty$i(this,"attachments",this.$$d__getAttachments$p$1); + $h.InitialData._defineReadOnlyProperty$i(this,"body",this.$$d__getBody$p$1) + }; + $h.Item.prototype = { + _body$p$1: null, + _getItemId$p$1: function() + { + return this._data$p$0.get__itemId$i$0() + }, + _getItemClass$p$1: function() + { + return this._data$p$0.get__itemClass$i$0() + }, + _getDateTimeCreated$p$1: function() + { + return this._data$p$0.get__dateTimeCreated$i$0() + }, + _getDateTimeModified$p$1: function() + { + return this._data$p$0.get__dateTimeModified$i$0() + }, + _getAttachments$p$1: function() + { + return this._data$p$0.get__attachments$i$0() + }, + _getBody$p$1: function() + { + if(!this._body$p$1) + this._body$p$1 = new $h.Body; + return this._body$p$1 + }, + _validateDestinationFolder$p$1: function(destinationFolder) + { + if(destinationFolder !== window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["Folder"]["Inbox"] && destinationFolder !== window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["Folder"]["Junk"] && destinationFolder !== window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["Folder"]["DeletedItems"]) + throw Error.argument("destinationFolder"); + } + }; + $h.Item.prototype.move = function(destinationFolder) + { + var args = []; + for(var $$pai_4 = 1; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4 - 1] = arguments[$$pai_4]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(3,"item.move"); + this._validateDestinationFolder$p$1(destinationFolder); + var commonParameters = $h.CommonParameters.parse(args,false); + var dataToHost = {destinationFolder: destinationFolder}; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(101,dataToHost,null,null,commonParameters._callback$p$0) + }; + $h.ItemBase = function(data) + { + this.$$d__createCustomProperties$i$0 = Function.createDelegate(this,this._createCustomProperties$i$0); + this.$$d__getNotificationMessages$p$0 = Function.createDelegate(this,this._getNotificationMessages$p$0); + this.$$d_getItemType = Function.createDelegate(this,this.getItemType); + this._data$p$0 = data; + $h.InitialData._defineReadOnlyProperty$i(this,"itemType",this.$$d_getItemType); + $h.InitialData._defineReadOnlyProperty$i(this,"notificationMessages",this.$$d__getNotificationMessages$p$0) + }; + $h.ItemBase.prototype = { + _data$p$0: null, + _notificationMessages$p$0: null, + get_data: function() + { + return this._data$p$0 + }, + _createCustomProperties$i$0: function(data) + { + return new $h.CustomProperties(data) + }, + _getNotificationMessages$p$0: function() + { + if(!this._notificationMessages$p$0) + this._notificationMessages$p$0 = new $h.NotificationMessages; + return this._notificationMessages$p$0 + } + }; + $h.ItemBase.prototype.loadCustomPropertiesAsync = function() + { + var args = []; + for(var $$pai_3 = 0; $$pai_3 < arguments["length"]; ++$$pai_3) + args[$$pai_3] = arguments[$$pai_3]; + var parameters = $h.CommonParameters.parse(args,true,true); + var loadCustomProperties = new $h._loadDictionaryRequest(this.$$d__createCustomProperties$i$0,"customProperties",parameters._callback$p$0,parameters._asyncContext$p$0); + loadCustomProperties._sendRequest$i$0(3,"LoadCustomProperties",{}) + }; + $h.ItemBase.prototype.getInitializationContextAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"item.getInitializationContextAsync"); + var parameters = $h.CommonParameters.parse(args,true); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(99,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.MeetingRequest = function(data) + { + this.$$d__getRequiredAttendees$p$3 = Function.createDelegate(this,this._getRequiredAttendees$p$3); + this.$$d__getOptionalAttendees$p$3 = Function.createDelegate(this,this._getOptionalAttendees$p$3); + this.$$d__getLocation$p$3 = Function.createDelegate(this,this._getLocation$p$3); + this.$$d__getEnd$p$3 = Function.createDelegate(this,this._getEnd$p$3); + this.$$d__getStart$p$3 = Function.createDelegate(this,this._getStart$p$3); + $h.MeetingRequest["initializeBase"](this,[data]); + $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$3); + $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$3); + $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$3); + $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$3); + $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$3) + }; + $h.MeetingRequest.prototype = { + _getStart$p$3: function() + { + return this._data$p$0.get__start$i$0() + }, + _getEnd$p$3: function() + { + return this._data$p$0.get__end$i$0() + }, + _getLocation$p$3: function() + { + return this._data$p$0.get__location$i$0() + }, + _getOptionalAttendees$p$3: function() + { + return this._data$p$0.get__cc$i$0() + }, + _getRequiredAttendees$p$3: function() + { + return this._data$p$0.get__to$i$0() + } + }; + $h.MeetingSuggestion = function(data, dateTimeSent) + { + this.$$d__getEndTime$p$0 = Function.createDelegate(this,this._getEndTime$p$0); + this.$$d__getStartTime$p$0 = Function.createDelegate(this,this._getStartTime$p$0); + this.$$d__getSubject$p$0 = Function.createDelegate(this,this._getSubject$p$0); + this.$$d__getLocation$p$0 = Function.createDelegate(this,this._getLocation$p$0); + this.$$d__getAttendees$p$0 = Function.createDelegate(this,this._getAttendees$p$0); + this.$$d__getMeetingString$p$0 = Function.createDelegate(this,this._getMeetingString$p$0); + this._data$p$0 = data; + this._dateTimeSent$p$0 = dateTimeSent; + $h.InitialData._defineReadOnlyProperty$i(this,"meetingString",this.$$d__getMeetingString$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"attendees",this.$$d__getAttendees$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStartTime$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEndTime$p$0) + }; + $h.MeetingSuggestion.prototype = { + _dateTimeSent$p$0: null, + _data$p$0: null, + _attendees$p$0: null, + _getMeetingString$p$0: function() + { + return this._data$p$0["MeetingString"] + }, + _getLocation$p$0: function() + { + return this._data$p$0["Location"] + }, + _getSubject$p$0: function() + { + return this._data$p$0["Subject"] + }, + _isUTC$p$0: function() + { + if(!("IsLegacyEntityExtraction" in this._data$p$0)) + return true; + return this._data$p$0["IsLegacyEntityExtraction"] + }, + _getStartTime$p$0: function() + { + var time = this._createDateTimeFromParameter$p$0("StartTime"); + var resolvedTime = $h.MeetingSuggestionTimeDecoder.resolve(time,this._dateTimeSent$p$0,this._isUTC$p$0()); + if(resolvedTime["getTime"]() !== time["getTime"]()) + return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToUtcClientTime"](window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._dateToDictionary$i$0(resolvedTime)); + return time + }, + _getEndTime$p$0: function() + { + var time = this._createDateTimeFromParameter$p$0("EndTime"); + var resolvedTime = $h.MeetingSuggestionTimeDecoder.resolve(time,this._dateTimeSent$p$0,this._isUTC$p$0()); + if(resolvedTime["getTime"]() !== time["getTime"]()) + return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToUtcClientTime"](window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._dateToDictionary$i$0(resolvedTime)); + return time + }, + _createDateTimeFromParameter$p$0: function(keyName) + { + var dateTimeString = this._data$p$0[keyName]; + if(!dateTimeString) + return null; + return new Date(dateTimeString) + }, + _getAttendees$p$0: function() + { + if(!this._attendees$p$0) + { + var $$t_1 = this; + this._attendees$p$0 = $h.Entities._getExtractedObjects$i($h.EmailAddressDetails,this._data$p$0,"Attendees",function(data) + { + return $h.EmailAddressDetails._createFromEmailUserDictionary$i(data) + }) + } + return this._attendees$p$0 + } + }; + $h.MeetingSuggestionTimeDecoder = function(){}; + $h.MeetingSuggestionTimeDecoder.resolve = function(inTime, sentTime, isUTC) + { + if(!sentTime) + return inTime; + try + { + var tod; + var outDate; + var extractedDate; + var sentDate = new Date(sentTime["getFullYear"](),sentTime["getMonth"](),sentTime["getDate"](),0,0,0,0); + var $$t_8, + $$t_9, + $$t_A; + if(!($$t_A = $h.MeetingSuggestionTimeDecoder._decode$p(inTime,isUTC,$$t_8 = {val: extractedDate},$$t_9 = {val: tod}),extractedDate = $$t_8["val"],tod = $$t_9["val"],$$t_A)) + return inTime; + else + { + if($h._preciseDate["isInstanceOfType"](extractedDate)) + outDate = $h.MeetingSuggestionTimeDecoder._resolvePreciseDate$p(sentDate,extractedDate); + else if($h._relativeDate["isInstanceOfType"](extractedDate)) + outDate = $h.MeetingSuggestionTimeDecoder._resolveRelativeDate$p(sentDate,extractedDate); + else + outDate = sentDate; + if(window["isNaN"](outDate["getTime"]())) + return sentTime; + outDate["setMilliseconds"](outDate["getMilliseconds"]() + tod); + return outDate + } + } + catch($$e_7) + { + return sentTime + } + }; + $h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i = function(value) + { + return null === value || value === undefined + }; + $h.MeetingSuggestionTimeDecoder._resolvePreciseDate$p = function(sentDate, precise) + { + var year = precise._year$i$1; + var month = !precise._month$i$1 ? sentDate["getMonth"]() : precise._month$i$1 - 1; + var day = precise._day$i$1; + if(!day) + return sentDate; + var candidate; + if($h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i(year)) + { + candidate = new Date(sentDate["getFullYear"](),month,day); + if(candidate["getTime"]() < sentDate["getTime"]()) + candidate = new Date(sentDate["getFullYear"]() + 1,month,day) + } + else + candidate = new Date(year < 50 ? 2e3 + year : 1900 + year,month,day); + if(candidate["getMonth"]() !== month) + return sentDate; + return candidate + }; + $h.MeetingSuggestionTimeDecoder._resolveRelativeDate$p = function(sentDate, relative) + { + var date; + switch(relative._unit$i$1) + { + case 0: + date = new Date(sentDate["getFullYear"](),sentDate["getMonth"](),sentDate["getDate"]()); + date["setDate"](date["getDate"]() + relative._offset$i$1); + return date; + case 5: + return $h.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p(sentDate,relative._offset$i$1,relative._tag$i$1); + case 2: + var days = 1; + switch(relative._modifier$i$1) + { + case 1: + break; + case 2: + days = 16; + break; + default: + if(!relative._offset$i$1) + days = sentDate["getDate"](); + break + } + date = new Date(sentDate["getFullYear"](),sentDate["getMonth"](),days); + date["setMonth"](date["getMonth"]() + relative._offset$i$1); + if(date["getTime"]() < sentDate["getTime"]()) + date["setDate"](date["getDate"]() + sentDate["getDate"]() - 1); + return date; + case 1: + date = new Date(sentDate["getFullYear"](),sentDate["getMonth"](),sentDate["getDate"]()); + date["setDate"](sentDate["getDate"]() + 7 * relative._offset$i$1); + if(relative._modifier$i$1 === 1 || !relative._modifier$i$1) + { + date["setDate"](date["getDate"]() + 1 - date["getDay"]()); + if(date["getTime"]() < sentDate["getTime"]()) + return sentDate; + return date + } + else if(relative._modifier$i$1 === 2) + { + date["setDate"](date["getDate"]() + 5 - date["getDay"]()); + return date + } + break; + case 4: + return $h.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p(sentDate,relative); + case 3: + if(relative._offset$i$1 > 0) + return new Date(sentDate["getFullYear"]() + relative._offset$i$1,0,1); + break; + default: + break + } + return sentDate + }; + $h.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p = function(sentDate, offset, tag) + { + if(offset > -5 && offset < 5) + { + var dayOfWeek = (tag + 6) % 7 + 1; + var days = 7 * offset + (dayOfWeek - sentDate["getDay"]()); + sentDate["setDate"](sentDate["getDate"]() + days); + return sentDate + } + else + { + var days = (tag - sentDate["getDay"]()) % 7; + if(days < 0) + days += 7; + sentDate["setDate"](sentDate["getDate"]() + days); + return sentDate + } + }; + $h.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p = function(sentDate, relative) + { + var date; + var firstDay; + var newDate; + date = sentDate; + if(relative._tag$i$1 <= 0 || relative._tag$i$1 > 12 || relative._offset$i$1 <= 0 || relative._offset$i$1 > 5) + return sentDate; + var monthOffset = (12 + relative._tag$i$1 - date["getMonth"]() - 1) % 12; + firstDay = new Date(date["getFullYear"](),date["getMonth"]() + monthOffset,1); + if(relative._modifier$i$1 === 1) + if(relative._offset$i$1 === 1 && firstDay["getDay"]() !== 6 && firstDay["getDay"]()) + return firstDay; + else + { + newDate = new Date(firstDay["getFullYear"](),firstDay["getMonth"](),firstDay["getDate"]()); + newDate["setDate"](newDate["getDate"]() + (7 + (1 - firstDay["getDay"]())) % 7); + if(firstDay["getDay"]() !== 6 && firstDay["getDay"]() && firstDay["getDay"]() !== 1) + newDate["setDate"](newDate["getDate"]() - 7); + newDate["setDate"](newDate["getDate"]() + 7 * (relative._offset$i$1 - 1)); + if(newDate["getMonth"]() + 1 !== relative._tag$i$1) + return sentDate; + return newDate + } + else + { + newDate = new Date(firstDay["getFullYear"](),firstDay["getMonth"](),$h.MeetingSuggestionTimeDecoder._daysInMonth$p(firstDay["getMonth"](),firstDay["getFullYear"]())); + var offset = 1 - newDate["getDay"](); + if(offset > 0) + offset = offset - 7; + newDate["setDate"](newDate["getDate"]() + offset); + newDate["setDate"](newDate["getDate"]() + 7 * (1 - relative._offset$i$1)); + if(newDate["getMonth"]() + 1 !== relative._tag$i$1) + if(firstDay["getDay"]() !== 6 && firstDay["getDay"]()) + return firstDay; + else + return sentDate; + else + return newDate + } + }; + $h.MeetingSuggestionTimeDecoder._decode$p = function(inDate, isUTC, date, time) + { + var DateValueMask = 32767; + date["val"] = null; + time["val"] = 0; + if(!inDate) + return false; + if(isUTC) + time["val"] = $h.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p(inDate); + else + time["val"] = $h.MeetingSuggestionTimeDecoder._getTimeOfDayInMilliseconds$p(inDate); + var inDateAtMidnight = inDate["getTime"]() - time["val"]; + var value = (inDateAtMidnight - $h.MeetingSuggestionTimeDecoder._baseDate$p["getTime"]()) / 864e5; + if(value < 0) + return false; + else if(value >= 262144) + return false; + else + { + var type = value >> 15; + value = value & DateValueMask; + switch(type) + { + case 0: + return $h.MeetingSuggestionTimeDecoder._decodePreciseDate$p(value,date); + case 1: + return $h.MeetingSuggestionTimeDecoder._decodeRelativeDate$p(value,date); + default: + return false + } + } + }; + $h.MeetingSuggestionTimeDecoder._decodePreciseDate$p = function(value, date) + { + var c_SubTypeMask = 7; + var c_MonthMask = 15; + var c_DayMask = 31; + var c_YearMask = 127; + var year = null; + var month = 0; + var day = 0; + date["val"] = null; + var subType = value >> 12 & c_SubTypeMask; + if((subType & 4) === 4) + { + year = value >> 5 & c_YearMask; + if((subType & 2) === 2) + { + if((subType & 1) === 1) + return false; + month = value >> 1 & c_MonthMask + } + } + else + { + if((subType & 2) === 2) + month = value >> 8 & c_MonthMask; + if((subType & 1) === 1) + day = value >> 3 & c_DayMask + } + date["val"] = new $h._preciseDate(day,month,year); + return true + }; + $h.MeetingSuggestionTimeDecoder._decodeRelativeDate$p = function(value, date) + { + var TagMask = 15; + var OffsetMask = 63; + var UnitMask = 7; + var ModifierMask = 3; + var tag = value & TagMask; + value >>= 4; + var offset = $h.MeetingSuggestionTimeDecoder._fromComplement$p(value & OffsetMask,6); + value >>= 6; + var unit = value & UnitMask; + value >>= 3; + var modifier = value & ModifierMask; + try + { + date["val"] = new $h._relativeDate(modifier,offset,unit,tag); + return true + } + catch($$e_A) + { + date["val"] = null; + return false + } + }; + $h.MeetingSuggestionTimeDecoder._fromComplement$p = function(value, n) + { + var signed = 1 << n - 1; + var mask = (1 << n) - 1; + if((value & signed) === signed) + return-((value ^ mask) + 1); + else + return value + }; + $h.MeetingSuggestionTimeDecoder._daysInMonth$p = function(month, year) + { + return 32 - new Date(year,month,32)["getDate"]() + }; + $h.MeetingSuggestionTimeDecoder._getTimeOfDayInMilliseconds$p = function(inputTime) + { + var timeOfDay = 0; + timeOfDay += inputTime["getHours"]() * 3600; + timeOfDay += inputTime["getMinutes"]() * 60; + timeOfDay += inputTime["getSeconds"](); + timeOfDay *= 1e3; + timeOfDay += inputTime["getMilliseconds"](); + return timeOfDay + }; + $h.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p = function(inputTime) + { + var timeOfDay = 0; + timeOfDay += inputTime["getUTCHours"]() * 3600; + timeOfDay += inputTime["getUTCMinutes"]() * 60; + timeOfDay += inputTime["getUTCSeconds"](); + timeOfDay *= 1e3; + timeOfDay += inputTime["getUTCMilliseconds"](); + return timeOfDay + }; + $h._extractedDate = function(){}; + $h._preciseDate = function(day, month, year) + { + $h._preciseDate["initializeBase"](this); + if(day < 0 || day > 31) + throw Error.argumentOutOfRange("day"); + if(month < 0 || month > 12) + throw Error.argumentOutOfRange("month"); + this._day$i$1 = day; + this._month$i$1 = month; + if(!$h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i(year)) + { + if(!month && day) + throw Error.argument("Invalid arguments"); + if(year < 0 || year > 2099) + throw Error.argumentOutOfRange("year"); + this._year$i$1 = year % 100 + } + else if(!this._month$i$1 && !this._day$i$1) + throw Error.argument("Invalid datetime"); + }; + $h._preciseDate.prototype = { + _day$i$1: 0, + _month$i$1: 0, + _year$i$1: null + }; + $h._relativeDate = function(modifier, offset, unit, tag) + { + $h._relativeDate["initializeBase"](this); + if(offset < -32 || offset > 31) + throw Error.argumentOutOfRange("offset"); + if(tag < 0 || tag > 15) + throw Error.argumentOutOfRange("tag"); + if(!unit && offset < 0) + throw Error.argument("unit & offset do not form a valid date"); + this._modifier$i$1 = modifier; + this._offset$i$1 = offset; + this._unit$i$1 = unit; + this._tag$i$1 = tag + }; + $h._relativeDate.prototype = { + _modifier$i$1: 0, + _offset$i$1: 0, + _unit$i$1: 0, + _tag$i$1: 0 + }; + $h.Message = function(dataDictionary) + { + this.$$d__getConversationId$p$2 = Function.createDelegate(this,this._getConversationId$p$2); + this.$$d__getInternetMessageId$p$2 = Function.createDelegate(this,this._getInternetMessageId$p$2); + this.$$d__getCc$p$2 = Function.createDelegate(this,this._getCc$p$2); + this.$$d__getTo$p$2 = Function.createDelegate(this,this._getTo$p$2); + this.$$d__getFrom$p$2 = Function.createDelegate(this,this._getFrom$p$2); + this.$$d__getSender$p$2 = Function.createDelegate(this,this._getSender$p$2); + this.$$d__getNormalizedSubject$p$2 = Function.createDelegate(this,this._getNormalizedSubject$p$2); + this.$$d__getSubject$p$2 = Function.createDelegate(this,this._getSubject$p$2); + $h.Message["initializeBase"](this,[dataDictionary]); + $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"sender",this.$$d__getSender$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"from",this.$$d__getFrom$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"to",this.$$d__getTo$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"cc",this.$$d__getCc$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"internetMessageId",this.$$d__getInternetMessageId$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"conversationId",this.$$d__getConversationId$p$2) + }; + $h.Message.prototype = { + getItemType: function() + { + return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Message"] + }, + _getSubject$p$2: function() + { + return this._data$p$0.get__subject$i$0() + }, + _getNormalizedSubject$p$2: function() + { + return this._data$p$0.get__normalizedSubject$i$0() + }, + _getSender$p$2: function() + { + return this._data$p$0.get__sender$i$0() + }, + _getFrom$p$2: function() + { + return this._data$p$0.get__from$i$0() + }, + _getTo$p$2: function() + { + return this._data$p$0.get__to$i$0() + }, + _getCc$p$2: function() + { + return this._data$p$0.get__cc$i$0() + }, + _getInternetMessageId$p$2: function() + { + return this._data$p$0.get__internetMessageId$i$0() + }, + _getConversationId$p$2: function() + { + return this._data$p$0.get__conversationId$i$0() + } + }; + $h.Message.prototype.getEntities = function() + { + return this._data$p$0._getEntities$i$0() + }; + $h.Message.prototype.getEntitiesByType = function(entityType) + { + return this._data$p$0._getEntitiesByType$i$0(entityType) + }; + $h.Message.prototype.getFilteredEntitiesByName = function(name) + { + return this._data$p$0._getFilteredEntitiesByName$i$0(name) + }; + $h.Message.prototype.getSelectedEntities = function() + { + return this._data$p$0._getSelectedEntities$i$0() + }; + $h.Message.prototype.getRegExMatches = function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches"); + return this._data$p$0._getRegExMatches$i$0() + }; + $h.Message.prototype.getRegExMatchesByName = function(name) + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName"); + return this._data$p$0._getRegExMatchesByName$i$0(name) + }; + $h.Message.prototype.getSelectedRegExMatches = function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedRegExMatches"); + return this._data$p$0._getSelectedRegExMatches$i$0() + }; + $h.Message.prototype.displayReplyForm = function(obj) + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyForm$i$0(obj) + }; + $h.Message.prototype.displayReplyAllForm = function(obj) + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyAllForm$i$0(obj) + }; + $h.MessageCompose = function(data) + { + this.$$d__getConversationId$p$2 = Function.createDelegate(this,this._getConversationId$p$2); + this.$$d__getBcc$p$2 = Function.createDelegate(this,this._getBcc$p$2); + this.$$d__getCc$p$2 = Function.createDelegate(this,this._getCc$p$2); + this.$$d__getTo$p$2 = Function.createDelegate(this,this._getTo$p$2); + $h.MessageCompose["initializeBase"](this,[data]); + $h.InitialData._defineReadOnlyProperty$i(this,"to",this.$$d__getTo$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"cc",this.$$d__getCc$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"bcc",this.$$d__getBcc$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"conversationId",this.$$d__getConversationId$p$2) + }; + $h.MessageCompose.prototype = { + _to$p$2: null, + _cc$p$2: null, + _bcc$p$2: null, + getItemType: function() + { + return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Message"] + }, + _getTo$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._to$p$2) + this._to$p$2 = new $h.ComposeRecipient(0,"to"); + return this._to$p$2 + }, + _getCc$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._cc$p$2) + this._cc$p$2 = new $h.ComposeRecipient(1,"cc"); + return this._cc$p$2 + }, + _getBcc$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._bcc$p$2) + this._bcc$p$2 = new $h.ComposeRecipient(2,"bcc"); + return this._bcc$p$2 + }, + _getConversationId$p$2: function() + { + return this._data$p$0.get__conversationId$i$0() + } + }; + $h.NotificationMessages = function(){}; + $h.NotificationMessages._mapToHostItemNotificationMessageType$p = function(dataToHost) + { + var notificationType; + var hostItemNotificationMessageType; + notificationType = dataToHost["type"]; + if(notificationType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["ProgressIndicator"]) + hostItemNotificationMessageType = 1; + else if(notificationType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["InformationalMessage"]) + hostItemNotificationMessageType = 0; + else if(notificationType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["ErrorMessage"]) + hostItemNotificationMessageType = 2; + else if(notificationType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["InsightMessage"]) + hostItemNotificationMessageType = 3; + else + throw Error.argument("type"); + dataToHost["type"] = hostItemNotificationMessageType + }; + $h.NotificationMessages._validateKey$p = function(key) + { + if(!$h.ScriptHelpers.isNonEmptyString(key)) + throw Error.argument("key"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(key.length,0,32,"key") + }; + $h.NotificationMessages._validateDictionary$p = function(dictionary) + { + if(!$h.ScriptHelpers.isNonEmptyString(dictionary["type"])) + throw Error.argument("type"); + if(dictionary["type"] === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["InformationalMessage"]) + { + if(!$h.ScriptHelpers.isNonEmptyString(dictionary["icon"])) + throw Error.argument("icon"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(dictionary["icon"].length,0,32,"icon"); + if($h.ScriptHelpers.isUndefined(dictionary["persistent"])) + throw Error.argument("persistent"); + if(!Boolean["isInstanceOfType"](dictionary["persistent"])) + throw Error.argumentType("persistent",Object["getType"](dictionary["persistent"]),Boolean); + $h.NotificationMessages._verifyActionDefinitionIsNotDefined$p(dictionary) + } + else if(dictionary["type"] === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["InsightMessage"]) + { + if(!$h.ScriptHelpers.isNonEmptyString(dictionary["icon"])) + throw Error.argument("icon"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(dictionary["icon"].length,0,32,"icon"); + if(!$h.ScriptHelpers.isUndefined(dictionary["persistent"])) + throw Error.argument("persistent"); + if(dictionary["actions"]) + $h.NotificationMessages._validateActionsDefinitionBlob$p(dictionary["actions"],dictionary) + } + else + { + if(!$h.ScriptHelpers.isUndefined(dictionary["icon"])) + throw Error.argument("icon"); + if(!$h.ScriptHelpers.isUndefined(dictionary["persistent"])) + throw Error.argument("persistent"); + $h.NotificationMessages._verifyActionDefinitionIsNotDefined$p(dictionary) + } + if(!$h.ScriptHelpers.isNonEmptyString(dictionary["message"])) + throw Error.argument("message"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(dictionary["message"].length,0,150,"message") + }; + $h.NotificationMessages._validateActionsDefinitionBlob$p = function(actionsDefinitionBlob, notificationParametersDictionary) + { + var actionsDefinition = $h.NotificationMessages._extractActionDefinitionDictionary$p(actionsDefinitionBlob); + if(!actionsDefinition) + return; + $h.NotificationMessages._validateActionsDefinitionActionType$p(actionsDefinition,notificationParametersDictionary); + $h.NotificationMessages._validateActionsDefinitionActionText$p(actionsDefinition) + }; + $h.NotificationMessages._verifyActionDefinitionIsNotDefined$p = function(notificationParametersDictionary) + { + if(!$h.ScriptHelpers.isUndefined(notificationParametersDictionary["actions"])) + throw Error.argument("actions",window["_u"]["ExtensibilityStrings"]["l_ActionsDefinitionWrongNotificationMessageError_Text"]); + }; + $h.NotificationMessages._extractActionDefinitionDictionary$p = function(actionsDefinitionBlob) + { + var actionsDefinition = null; + if(Array["isInstanceOfType"](actionsDefinitionBlob)) + { + var dicArray = actionsDefinitionBlob; + if(dicArray["length"] === 1) + actionsDefinition = dicArray[0]; + else if(dicArray["length"] > 1) + throw Error.argument("actions",window["_u"]["ExtensibilityStrings"]["l_ActionsDefinitionMultipleActionsError_Text"]); + } + else + throw Error.argument("actions",String.format(window["_u"]["ExtensibilityStrings"]["l_InvalidParameterValueError_Text"],"actions")); + return actionsDefinition + }; + $h.NotificationMessages._validateActionsDefinitionActionType$p = function(actionsDefinition, notificationParametersDictionary) + { + if(!actionsDefinition["actionType"]) + throw Error.argument("actionType",String.format(window["_u"]["ExtensibilityStrings"]["l_NullOrEmptyParameterError_Text"],"actionType")); + if("showTaskPane" !== actionsDefinition["actionType"]) + throw Error.argument("actionType",window["_u"]["ExtensibilityStrings"]["l_InvalidActionType_Text"]); + else if(!$h.ScriptHelpers.isNonEmptyString(actionsDefinition["commandId"])) + throw Error.argument("commandId",String.format(window["_u"]["ExtensibilityStrings"]["l_InvalidCommandIdError_Text"],"commandId")); + }; + $h.NotificationMessages._validateActionsDefinitionActionText$p = function(actionsDefinition) + { + if(!$h.ScriptHelpers.isNonEmptyString(actionsDefinition["actionText"])) + throw Error.argument("actionText",String.format(window["_u"]["ExtensibilityStrings"]["l_NullOrEmptyParameterError_Text"],"actionText")); + if(actionsDefinition["actionText"].length > 30) + throw Error.argument(window["_u"]["ExtensibilityStrings"]["l_ParameterValueTooLongError_Text"],String.format(window["_u"]["ExtensibilityStrings"]["l_ParameterValueTooLongError_Text"],"actionText",30)); + }; + $h.NotificationMessages.prototype.addAsync = function(key, dictionary) + { + var args = []; + for(var $$pai_5 = 2; $$pai_5 < arguments["length"]; ++$$pai_5) + args[$$pai_5 - 2] = arguments[$$pai_5]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.addAsync"); + var commonParameters = $h.CommonParameters.parse(args,false); + $h.NotificationMessages._validateKey$p(key); + $h.NotificationMessages._validateDictionary$p(dictionary); + var dataToHost = {}; + dataToHost = $h.ScriptHelpers.deepClone(dictionary); + dataToHost["key"] = key; + $h.NotificationMessages._mapToHostItemNotificationMessageType$p(dataToHost); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(33,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.NotificationMessages.prototype.getAllAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.getAllAsync"); + var commonParameters = $h.CommonParameters.parse(args,true); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(34,null,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.NotificationMessages.prototype.replaceAsync = function(key, dictionary) + { + var args = []; + for(var $$pai_5 = 2; $$pai_5 < arguments["length"]; ++$$pai_5) + args[$$pai_5 - 2] = arguments[$$pai_5]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.replaceAsync"); + var commonParameters = $h.CommonParameters.parse(args,false); + $h.NotificationMessages._validateKey$p(key); + $h.NotificationMessages._validateDictionary$p(dictionary); + var dataToHost = {}; + dataToHost = $h.ScriptHelpers.deepClone(dictionary); + dataToHost["key"] = key; + $h.NotificationMessages._mapToHostItemNotificationMessageType$p(dataToHost); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(35,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.NotificationMessages.prototype.removeAsync = function(key) + { + var args = []; + for(var $$pai_4 = 1; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4 - 1] = arguments[$$pai_4]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.removeAsync"); + var commonParameters = $h.CommonParameters.parse(args,false); + $h.NotificationMessages._validateKey$p(key); + var dataToHost = {key: key}; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(36,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.OutlookErrorManager = function(){}; + $h.OutlookErrorManager.getErrorArgs = function(errorCode) + { + if(!$h.OutlookErrorManager._isInitialized$p) + $h.OutlookErrorManager._initialize$p(); + return OSF.DDA.ErrorCodeManager["getErrorArgs"](errorCode) + }; + $h.OutlookErrorManager._initialize$p = function() + { + $h.OutlookErrorManager._addErrorMessage$p(9e3,"AttachmentSizeExceeded",window["_u"]["ExtensibilityStrings"]["l_AttachmentExceededSize_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9001,"NumberOfAttachmentsExceeded",window["_u"]["ExtensibilityStrings"]["l_ExceededMaxNumberOfAttachments_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9002,"InternalFormatError",window["_u"]["ExtensibilityStrings"]["l_InternalFormatError_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9003,"InvalidAttachmentId",window["_u"]["ExtensibilityStrings"]["l_InvalidAttachmentId_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9004,"InvalidAttachmentPath",window["_u"]["ExtensibilityStrings"]["l_InvalidAttachmentPath_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9005,"CannotAddAttachmentBeforeUpgrade",window["_u"]["ExtensibilityStrings"]["l_CannotAddAttachmentBeforeUpgrade_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9006,"AttachmentDeletedBeforeUploadCompletes",window["_u"]["ExtensibilityStrings"]["l_AttachmentDeletedBeforeUploadCompletes_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9007,"AttachmentUploadGeneralFailure",window["_u"]["ExtensibilityStrings"]["l_AttachmentUploadGeneralFailure_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9008,"AttachmentToDeleteDoesNotExist",window["_u"]["ExtensibilityStrings"]["l_DeleteAttachmentDoesNotExist_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9009,"AttachmentDeleteGeneralFailure",window["_u"]["ExtensibilityStrings"]["l_AttachmentDeleteGeneralFailure_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9010,"InvalidEndTime",window["_u"]["ExtensibilityStrings"]["l_InvalidEndTime_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9011,"HtmlSanitizationFailure",window["_u"]["ExtensibilityStrings"]["l_HtmlSanitizationFailure_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9012,"NumberOfRecipientsExceeded",String.format(window["_u"]["ExtensibilityStrings"]["l_NumberOfRecipientsExceeded_Text"],500)); + $h.OutlookErrorManager._addErrorMessage$p(9013,"NoValidRecipientsProvided",window["_u"]["ExtensibilityStrings"]["l_NoValidRecipientsProvided_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9014,"CursorPositionChanged",window["_u"]["ExtensibilityStrings"]["l_CursorPositionChanged_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9016,"InvalidSelection",window["_u"]["ExtensibilityStrings"]["l_InvalidSelection_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9017,"AccessRestricted",""); + $h.OutlookErrorManager._addErrorMessage$p(9018,"GenericTokenError",""); + $h.OutlookErrorManager._addErrorMessage$p(9019,"GenericSettingsError",""); + $h.OutlookErrorManager._addErrorMessage$p(9020,"GenericResponseError",""); + $h.OutlookErrorManager._addErrorMessage$p(9021,"SaveError",window["_u"]["ExtensibilityStrings"]["l_SaveError_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9022,"MessageInDifferentStoreError",window["_u"]["ExtensibilityStrings"]["l_MessageInDifferentStoreError_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9023,"DuplicateNotificationKey",window["_u"]["ExtensibilityStrings"]["l_DuplicateNotificationKey_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9024,"NotificationKeyNotFound",window["_u"]["ExtensibilityStrings"]["l_NotificationKeyNotFound_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9025,"NumberOfNotificationsExceeded",window["_u"]["ExtensibilityStrings"]["l_NumberOfNotificationsExceeded_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9026,"PersistedNotificationArrayReadError",window["_u"]["ExtensibilityStrings"]["l_PersistedNotificationArrayReadError_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9027,"PersistedNotificationArraySaveError",window["_u"]["ExtensibilityStrings"]["l_PersistedNotificationArraySaveError_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9028,"CannotPersistPropertyInUnsavedDraftError",window["_u"]["ExtensibilityStrings"]["l_CannotPersistPropertyInUnsavedDraftError_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9029,"CanOnlyGetTokenForSavedItem",window["_u"]["ExtensibilityStrings"]["l_CallSaveAsyncBeforeToken_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9030,"APICallFailedDueToItemChange",window["_u"]["ExtensibilityStrings"]["l_APICallFailedDueToItemChange_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9031,"InvalidParameterValueError",window["_u"]["ExtensibilityStrings"]["l_InvalidParameterValueError_Text"]); + $h.OutlookErrorManager._isInitialized$p = true + }; + $h.OutlookErrorManager._addErrorMessage$p = function(errorCode, errorName, errorMessage) + { + OSF.DDA.ErrorCodeManager["addErrorMessage"](errorCode,{ + name: errorName, + message: errorMessage + }) + }; + $h.OutlookErrorManager.OutlookErrorCodes = function(){}; + $h.OutlookErrorManager.OsfDdaErrorCodes = function(){}; + $h.PhoneNumber = function(data) + { + this.$$d__getPhoneType$p$0 = Function.createDelegate(this,this._getPhoneType$p$0); + this.$$d__getOriginalPhoneString$p$0 = Function.createDelegate(this,this._getOriginalPhoneString$p$0); + this.$$d__getPhoneString$p$0 = Function.createDelegate(this,this._getPhoneString$p$0); + this._data$p$0 = data; + $h.InitialData._defineReadOnlyProperty$i(this,"phoneString",this.$$d__getPhoneString$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"originalPhoneString",this.$$d__getOriginalPhoneString$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"type",this.$$d__getPhoneType$p$0) + }; + $h.PhoneNumber.prototype = { + _data$p$0: null, + _getPhoneString$p$0: function() + { + return this._data$p$0["PhoneString"] + }, + _getOriginalPhoneString$p$0: function() + { + return this._data$p$0["OriginalPhoneString"] + }, + _getPhoneType$p$0: function() + { + return this._data$p$0["Type"] + } + }; + $h.TaskSuggestion = function(data) + { + this.$$d__getAssignees$p$0 = Function.createDelegate(this,this._getAssignees$p$0); + this.$$d__getTaskString$p$0 = Function.createDelegate(this,this._getTaskString$p$0); + this._data$p$0 = data; + $h.InitialData._defineReadOnlyProperty$i(this,"taskString",this.$$d__getTaskString$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"assignees",this.$$d__getAssignees$p$0) + }; + $h.TaskSuggestion.prototype = { + _data$p$0: null, + _assignees$p$0: null, + _getTaskString$p$0: function() + { + return this._data$p$0["TaskString"] + }, + _getAssignees$p$0: function() + { + if(!this._assignees$p$0) + { + var $$t_1 = this; + this._assignees$p$0 = $h.Entities._getExtractedObjects$i($h.EmailAddressDetails,this._data$p$0,"Assignees",function(data) + { + return $h.EmailAddressDetails._createFromEmailUserDictionary$i(data) + }) + } + return this._assignees$p$0 + } + }; + $h.UserProfile = function(data) + { + this.$$d__getCapabilities$p$0 = Function.createDelegate(this,this._getCapabilities$p$0); + this.$$d__getUserProfileType$p$0 = Function.createDelegate(this,this._getUserProfileType$p$0); + this.$$d__getTimeZone$p$0 = Function.createDelegate(this,this._getTimeZone$p$0); + this.$$d__getEmailAddress$p$0 = Function.createDelegate(this,this._getEmailAddress$p$0); + this.$$d__getDisplayName$p$0 = Function.createDelegate(this,this._getDisplayName$p$0); + this._data$p$0 = data; + $h.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"timeZone",this.$$d__getTimeZone$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"accountType",this.$$d__getUserProfileType$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"capabilities",this.$$d__getCapabilities$p$0) + }; + $h.UserProfile.prototype = { + _data$p$0: null, + _getCapabilities$p$0: function() + { + return this._data$p$0.get__userProfileCapabilities$i$0() || {} + }, + _getUserProfileType$p$0: function() + { + return this._data$p$0.get__userProfileType$i$0() + }, + _getDisplayName$p$0: function() + { + return this._data$p$0.get__userDisplayName$i$0() + }, + _getEmailAddress$p$0: function() + { + return this._data$p$0.get__userEmailAddress$i$0() + }, + _getTimeZone$p$0: function() + { + return this._data$p$0.get__userTimeZone$i$0() + } + }; + $h.OutlookDispid = function(){}; + $h.OutlookDispid.prototype = { + owaOnlyMethod: 0, + getInitialData: 1, + getUserIdentityToken: 2, + loadCustomProperties: 3, + saveCustomProperties: 4, + ewsRequest: 5, + displayNewAppointmentForm: 7, + displayMessageForm: 8, + displayAppointmentForm: 9, + displayReplyForm: 10, + displayReplyAllForm: 11, + getCallbackToken: 12, + bodySetSelectedDataAsync: 13, + getBodyTypeAsync: 14, + getRecipientsAsync: 15, + addFileAttachmentAsync: 16, + setSubjectAsync: 17, + getSubjectAsync: 18, + addItemAttachmentAsync: 19, + removeAttachmentAsync: 20, + setRecipientsAsync: 21, + addRecipientsAsync: 22, + bodyPrependAsync: 23, + getTimeAsync: 24, + setTimeAsync: 25, + getLocationAsync: 26, + setLocationAsync: 27, + getSelectedDataAsync: 28, + setSelectedDataAsync: 29, + displayReplyFormWithAttachments: 30, + displayReplyAllFormWithAttachments: 31, + saveAsync: 32, + addNotficationMessageAsync: 33, + getAllNotficationMessagesAsync: 34, + replaceNotficationMessageAsync: 35, + removeNotficationMessageAsync: 36, + getBodyAsync: 37, + setBodyAsync: 38, + appCommands1: 39, + registerConsentAsync: 40, + close: 41, + closeApp: 42, + displayPersonaCardAsync: 43, + displayNewMessageForm: 44, + navigateToModuleAsync: 45, + eventCompleted: 94, + closeContainer: 97, + getInitializationContextAsync: 99, + moveToFolder: 101, + appendOnSendAsync: 100, + messageParent: 144, + trackCtq: 400, + recordTrace: 401, + recordDataPoint: 402, + windowOpenOverrideHandler: 403, + saveSettingsRequest: 404 + }; + $h.OutlookDispid["registerEnum"]("$h.OutlookDispid",false); + $h.RequestState = function(){}; + $h.RequestState.prototype = { + unsent: 0, + opened: 1, + headersReceived: 2, + loading: 3, + done: 4 + }; + $h.RequestState["registerEnum"]("$h.RequestState",false); + $h.CommonParameters = function(options, callback, asyncContext) + { + this._options$p$0 = options; + this._callback$p$0 = callback; + this._asyncContext$p$0 = asyncContext + }; + $h.CommonParameters.parse = function(args, isCallbackRequired, tryLegacy) + { + var legacyParameters; + var $$t_8, + $$t_9; + if(tryLegacy && ($$t_9 = $h.CommonParameters._tryParseLegacy$p(args,$$t_8 = {val: legacyParameters}),legacyParameters = $$t_8["val"],$$t_9)) + return legacyParameters; + var argsLength = args["length"]; + var options = null; + var callback = null; + var asyncContext = null; + if(argsLength === 1) + if($h.CommonParameters._argIsFunction$p(args[0])) + callback = args[0]; + else if(Object["isInstanceOfType"](args[0])) + options = args[0]; + else + throw Error.argumentType(); + else if(argsLength === 2) + { + if(!Object["isInstanceOfType"](args[0])) + throw Error.argument("options"); + if(!$h.CommonParameters._argIsFunction$p(args[1])) + throw Error.argument("callback"); + options = args[0]; + callback = args[1] + } + else if(argsLength) + throw Error.parameterCount(window["_u"]["ExtensibilityStrings"]["l_ParametersNotAsExpected_Text"]); + if(isCallbackRequired && !callback) + throw Error.argumentNull("callback"); + if(options && !$h.ScriptHelpers.isNullOrUndefined(options["asyncContext"])) + asyncContext = options["asyncContext"]; + return new $h.CommonParameters(options,callback,asyncContext) + }; + $h.CommonParameters._tryParseLegacy$p = function(args, commonParameters) + { + commonParameters["val"] = null; + var argsLength = args["length"]; + var callback = null; + var userContext = null; + if(!argsLength || argsLength > 2) + return false; + if(!$h.CommonParameters._argIsFunction$p(args[0])) + return false; + callback = args[0]; + if(argsLength > 1) + userContext = args[1]; + commonParameters["val"] = new $h.CommonParameters(null,callback,userContext); + return true + }; + $h.CommonParameters._argIsFunction$p = function(arg) + { + return typeof arg === "function" + }; + $h.CommonParameters.prototype = { + _options$p$0: null, + _callback$p$0: null, + _asyncContext$p$0: null, + get_options: function() + { + return this._options$p$0 + }, + get_callback: function() + { + return this._callback$p$0 + }, + get_asyncContext: function() + { + return this._asyncContext$p$0 + } + }; + $h.EwsRequest = function(userContext) + { + $h.EwsRequest["initializeBase"](this,[userContext]) + }; + $h.EwsRequest.prototype = { + readyState: 1, + status: 0, + statusText: null, + onreadystatechange: null, + responseText: null, + get__statusCode$i$1: function() + { + return this.status + }, + set__statusCode$i$1: function(value) + { + this.status = value; + return value + }, + get__statusDescription$i$1: function() + { + return this.statusText + }, + set__statusDescription$i$1: function(value) + { + this.statusText = value; + return value + }, + get__requestState$i$1: function() + { + return this.readyState + }, + set__requestState$i$1: function(value) + { + this.readyState = value; + return value + }, + get_hasOnReadyStateChangeCallback: function() + { + return!$h.ScriptHelpers.isNullOrUndefined(this.onreadystatechange) + }, + get__response$i$1: function() + { + return this.responseText + }, + set__response$i$1: function(value) + { + this.responseText = value; + return value + }, + send: function(data) + { + this._checkSendConditions$i$1(); + if($h.ScriptHelpers.isNullOrUndefined(data)) + this._throwInvalidStateException$i$1(); + this._sendRequest$i$0(5,"EwsRequest",{body: data}) + }, + _callOnReadyStateChangeCallback$i$1: function() + { + if(!$h.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)) + this.onreadystatechange() + }, + _parseExtraResponseData$i$1: function(response){}, + executeExtraFailedResponseSteps: function(){} + }; + $h.InitialData = function(data) + { + this._data$p$0 = data; + this._permissionLevel$p$0 = this._calculatePermissionLevel$p$0() + }; + $h.InitialData._defineReadOnlyProperty$i = function(o, methodName, getter) + { + var propertyDescriptor = { + get: getter, + configurable: false + }; + window["Object"]["defineProperty"](o,methodName,propertyDescriptor) + }; + $h.InitialData.prototype = { + _toRecipients$p$0: null, + _ccRecipients$p$0: null, + _attachments$p$0: null, + _resources$p$0: null, + _entities$p$0: null, + _selectedEntities$p$0: null, + _data$p$0: null, + _permissionLevel$p$0: 0, + get__isRestIdSupported$i$0: function() + { + return this._data$p$0["isRestIdSupported"] + }, + get__itemId$i$0: function() + { + return this._data$p$0["id"] + }, + get__itemClass$i$0: function() + { + return this._data$p$0["itemClass"] + }, + get__dateTimeCreated$i$0: function() + { + return new Date(this._data$p$0["dateTimeCreated"]) + }, + get__dateTimeModified$i$0: function() + { + return new Date(this._data$p$0["dateTimeModified"]) + }, + get__dateTimeSent$i$0: function() + { + return new Date(this._data$p$0["dateTimeSent"]) + }, + get__subject$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + return this._data$p$0["subject"] + }, + get__normalizedSubject$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + return this._data$p$0["normalizedSubject"] + }, + get__internetMessageId$i$0: function() + { + return this._data$p$0["internetMessageId"] + }, + get__conversationId$i$0: function() + { + return this._data$p$0["conversationId"] + }, + get__sender$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + var sender = this._data$p$0["sender"]; + return $h.ScriptHelpers.isNullOrUndefined(sender) ? null : new $h.EmailAddressDetails(sender) + }, + get__from$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + var from = this._data$p$0["from"]; + return $h.ScriptHelpers.isNullOrUndefined(from) ? null : new $h.EmailAddressDetails(from) + }, + get__to$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + if(null === this._toRecipients$p$0) + this._toRecipients$p$0 = this._createEmailAddressDetails$p$0("to"); + return this._toRecipients$p$0 + }, + get__cc$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + if(null === this._ccRecipients$p$0) + this._ccRecipients$p$0 = this._createEmailAddressDetails$p$0("cc"); + return this._ccRecipients$p$0 + }, + get__attachments$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + if(null === this._attachments$p$0) + this._attachments$p$0 = this._createAttachmentDetails$p$0(); + return this._attachments$p$0 + }, + get__ewsUrl$i$0: function() + { + return this._data$p$0["ewsUrl"] + }, + get__restUrl$i$0: function() + { + return this._data$p$0["restUrl"] + }, + get__marketplaceAssetId$i$0: function() + { + return this._data$p$0["marketplaceAssetId"] + }, + get__extensionId$i$0: function() + { + return this._data$p$0["extensionId"] + }, + get__marketplaceContentMarket$i$0: function() + { + return this._data$p$0["marketplaceContentMarket"] + }, + get__consentMetadata$i$0: function() + { + return this._data$p$0["consentMetadata"] + }, + get__isRead$i$0: function() + { + return this._data$p$0["isRead"] + }, + get__endNodeUrl$i$0: function() + { + return this._data$p$0["endNodeUrl"] + }, + get__entryPointUrl$i$0: function() + { + return this._data$p$0["entryPointUrl"] + }, + get__start$i$0: function() + { + return new Date(this._data$p$0["start"]) + }, + get__end$i$0: function() + { + return new Date(this._data$p$0["end"]) + }, + get__location$i$0: function() + { + return this._data$p$0["location"] + }, + get__userProfileType$i$0: function() + { + return this._data$p$0["userProfileType"] + }, + get__resources$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + if(null === this._resources$p$0) + this._resources$p$0 = this._createEmailAddressDetails$p$0("resources"); + return this._resources$p$0 + }, + get__organizer$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + var organizer = this._data$p$0["organizer"]; + return $h.ScriptHelpers.isNullOrUndefined(organizer) ? null : new $h.EmailAddressDetails(organizer) + }, + get__userProfileCapabilities$i$0: function() + { + return this._data$p$0["userProfileCapabilities"] + }, + get__userDisplayName$i$0: function() + { + return this._data$p$0["userDisplayName"] + }, + get__userEmailAddress$i$0: function() + { + return this._data$p$0["userEmailAddress"] + }, + get__userTimeZone$i$0: function() + { + return this._data$p$0["userTimeZone"] + }, + get__timeZoneOffsets$i$0: function() + { + return this._data$p$0["timeZoneOffsets"] + }, + get__hostVersion$i$0: function() + { + return this._data$p$0["hostVersion"] + }, + get__owaView$i$0: function() + { + return this._data$p$0["owaView"] + }, + get__overrideWindowOpen$i$0: function() + { + return this._data$p$0["overrideWindowOpen"] + }, + _getEntities$i$0: function() + { + if(!this._entities$p$0) + this._entities$p$0 = new $h.Entities(this._data$p$0["entities"],this._data$p$0["filteredEntities"],this.get__dateTimeSent$i$0(),this._permissionLevel$p$0); + return this._entities$p$0 + }, + _getSelectedEntities$i$0: function() + { + if(!this._selectedEntities$p$0) + this._selectedEntities$p$0 = new $h.Entities(this._data$p$0["selectedEntities"],null,this.get__dateTimeSent$i$0(),this._permissionLevel$p$0); + return this._selectedEntities$p$0 + }, + _getEntitiesByType$i$0: function(entityType) + { + var entites = this._getEntities$i$0(); + return entites._getByType$i$0(entityType) + }, + _getFilteredEntitiesByName$i$0: function(name) + { + var entities = this._getEntities$i$0(); + return entities._getFilteredEntitiesByName$i$0(name) + }, + _getRegExMatches$i$0: function() + { + if(!this._data$p$0["regExMatches"]) + return null; + return this._data$p$0["regExMatches"] + }, + _getSelectedRegExMatches$i$0: function() + { + if(!this._data$p$0["selectedRegExMatches"]) + return null; + return this._data$p$0["selectedRegExMatches"] + }, + _getRegExMatchesByName$i$0: function(regexName) + { + var regexMatches = this._getRegExMatches$i$0(); + if(!regexMatches || !regexMatches[regexName]) + return null; + return regexMatches[regexName] + }, + _throwOnRestrictedPermissionLevel$i$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0) + }, + _createEmailAddressDetails$p$0: function(key) + { + var to = this._data$p$0[key]; + if($h.ScriptHelpers.isNullOrUndefined(to)) + return[]; + var recipients = []; + for(var i = 0; i < to["length"]; i++) + if(!$h.ScriptHelpers.isNullOrUndefined(to[i])) + recipients[i] = new $h.EmailAddressDetails(to[i]); + return recipients + }, + _createAttachmentDetails$p$0: function() + { + var attachments = this._data$p$0["attachments"]; + if($h.ScriptHelpers.isNullOrUndefined(attachments)) + return[]; + var attachmentDetails = []; + for(var i = 0; i < attachments["length"]; i++) + if(!$h.ScriptHelpers.isNullOrUndefined(attachments[i])) + attachmentDetails[i] = new $h.AttachmentDetails(attachments[i]); + return attachmentDetails + }, + _calculatePermissionLevel$p$0: function() + { + var HostReadItem = 1; + var HostReadWriteMailbox = 2; + var HostReadWriteItem = 3; + var permissionLevelFromHost = this._data$p$0["permissionLevel"]; + if($h.ScriptHelpers.isUndefined(this._permissionLevel$p$0)) + return 0; + switch(permissionLevelFromHost) + { + case HostReadItem: + return 1; + case HostReadWriteItem: + return 2; + case HostReadWriteMailbox: + return 3; + default: + return 0 + } + } + }; + $h._loadDictionaryRequest = function(createResultObject, dictionaryName, callback, userContext) + { + $h._loadDictionaryRequest["initializeBase"](this,[userContext]); + this._createResultObject$p$1 = createResultObject; + this._dictionaryName$p$1 = dictionaryName; + this._callback$p$1 = callback + }; + $h._loadDictionaryRequest.prototype = { + _dictionaryName$p$1: null, + _createResultObject$p$1: null, + _callback$p$1: null, + handleResponse: function(response) + { + if(response["wasSuccessful"]) + { + var value = response[this._dictionaryName$p$1]; + var responseData = window["JSON"]["parse"](value); + this.createAsyncResult(this._createResultObject$p$1(responseData),0,0,null) + } + else + this.createAsyncResult(null,1,9020,response["errorMessage"]); + this._callback$p$1(this._asyncResult$p$0) + } + }; + $h.ProxyRequestBase = function(userContext) + { + $h.ProxyRequestBase["initializeBase"](this,[userContext]) + }; + $h.ProxyRequestBase.prototype = { + handleResponse: function(response) + { + if(!response["wasProxySuccessful"]) + { + this.set__statusCode$i$1(500); + this.set__statusDescription$i$1("Error"); + var errorMessage = response["errorMessage"]; + this.set__response$i$1(errorMessage); + this.createAsyncResult(null,1,9020,errorMessage) + } + else + { + this.set__statusCode$i$1(response["statusCode"]); + this.set__statusDescription$i$1(response["statusDescription"]); + this.set__response$i$1(response["body"]); + this.createAsyncResult(this.get__response$i$1(),0,0,null) + } + this._parseExtraResponseData$i$1(response); + this._cycleReadyStateFromHeadersReceivedToLoadingToDone$i$1() + }, + _throwInvalidStateException$i$1: function() + { + throw Error.create("DOMException",{ + code: 11, + message: "INVALID_STATE_ERR" + }); + }, + _cycleReadyStateFromHeadersReceivedToLoadingToDone$i$1: function() + { + var $$t_0 = this; + this._changeReadyState$i$1(2,function() + { + $$t_0._changeReadyState$i$1(3,function() + { + $$t_0._changeReadyState$i$1(4,null) + }) + }) + }, + _changeReadyState$i$1: function(state, nextStep) + { + this.set__requestState$i$1(state); + var $$t_2 = this; + window.setTimeout(function() + { + try + { + $$t_2._callOnReadyStateChangeCallback$i$1() + } + finally + { + if(!$h.ScriptHelpers.isNullOrUndefined(nextStep)) + nextStep() + } + },0) + }, + _checkSendConditions$i$1: function() + { + if(this.get__requestState$i$1() !== 1) + this._throwInvalidStateException$i$1(); + if(this._isSent$p$0) + this._throwInvalidStateException$i$1() + } + }; + $h.RequestBase = function(userContext) + { + this._userContext$p$0 = userContext + }; + $h.RequestBase.prototype = { + _isSent$p$0: false, + _asyncResult$p$0: null, + _userContext$p$0: null, + get_asyncResult: function() + { + return this._asyncResult$p$0 + }, + _sendRequest$i$0: function(dispid, methodName, dataToSend) + { + this._isSent$p$0 = true; + var $$t_5 = this; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.invokeHostMethod(dispid,dataToSend,function(resultCode, response) + { + if(resultCode) + $$t_5.createAsyncResult(null,1,9017,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode)); + else + $$t_5.handleResponse(response) + }) + }, + createAsyncResult: function(value, errorCode, detailedErrorCode, errorDescription) + { + this._asyncResult$p$0 = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(value,errorCode,detailedErrorCode,this._userContext$p$0,errorDescription) + } + }; + $h.SaveDictionaryRequest = function(callback, userContext) + { + $h.SaveDictionaryRequest["initializeBase"](this,[userContext]); + if(!$h.ScriptHelpers.isNullOrUndefined(callback)) + this._callback$p$1 = callback + }; + $h.SaveDictionaryRequest.prototype = { + _callback$p$1: null, + handleResponse: function(response) + { + if(response["wasSuccessful"]) + this.createAsyncResult(null,0,0,null); + else + this.createAsyncResult(null,1,9020,response["errorMessage"]); + if(!$h.ScriptHelpers.isNullOrUndefined(this._callback$p$1)) + this._callback$p$1(this._asyncResult$p$0) + } + }; + $h.ScriptHelpers = function(){}; + $h.ScriptHelpers.isNull = function(value) + { + return null === value + }; + $h.ScriptHelpers.isNullOrUndefined = function(value) + { + return $h.ScriptHelpers.isNull(value) || $h.ScriptHelpers.isUndefined(value) + }; + $h.ScriptHelpers.isUndefined = function(value) + { + return value === undefined + }; + $h.ScriptHelpers.dictionaryContainsKey = function(obj, keyName) + { + return Object["isInstanceOfType"](obj) ? keyName in obj : false + }; + $h.ScriptHelpers.isNonEmptyString = function(value) + { + if(!value) + return false; + return String["isInstanceOfType"](value) + }; + $h.ScriptHelpers.deepClone = function(obj) + { + return window["JSON"]["parse"](window["JSON"]["stringify"](obj)) + }; + $h.ScriptHelpers.isValueTrue = function(value) + { + if(!$h.ScriptHelpers.isNullOrUndefined(value)) + return value["toString"]().toLowerCase() === "true"; + return false + }; + window["OSF"]["DDA"]["OutlookAppOm"]["registerClass"]("OSF.DDA.OutlookAppOm"); + window["OSF"]["DDA"]["Settings"]["registerClass"]("OSF.DDA.Settings"); + $h.AdditionalGlobalParameters["registerClass"]("$h.AdditionalGlobalParameters"); + $h.ItemBase["registerClass"]("$h.ItemBase"); + $h.Item["registerClass"]("$h.Item",$h.ItemBase); + $h.Appointment["registerClass"]("$h.Appointment",$h.Item); + $h.ComposeItem["registerClass"]("$h.ComposeItem",$h.ItemBase); + $h.AppointmentCompose["registerClass"]("$h.AppointmentCompose",$h.ComposeItem); + $h.AttachmentDetails["registerClass"]("$h.AttachmentDetails"); + $h.Body["registerClass"]("$h.Body"); + $h.ComposeBody["registerClass"]("$h.ComposeBody",$h.Body); + $h.ComposeRecipient["registerClass"]("$h.ComposeRecipient"); + $h.ComposeLocation["registerClass"]("$h.ComposeLocation"); + $h.ComposeSubject["registerClass"]("$h.ComposeSubject"); + $h.ComposeTime["registerClass"]("$h.ComposeTime"); + $h.Contact["registerClass"]("$h.Contact"); + $h.CustomProperties["registerClass"]("$h.CustomProperties"); + $h.Diagnostics["registerClass"]("$h.Diagnostics"); + $h.EmailAddressDetails["registerClass"]("$h.EmailAddressDetails"); + $h.Entities["registerClass"]("$h.Entities"); + $h.Message["registerClass"]("$h.Message",$h.Item); + $h.MeetingRequest["registerClass"]("$h.MeetingRequest",$h.Message); + $h.MeetingSuggestion["registerClass"]("$h.MeetingSuggestion"); + $h._extractedDate["registerClass"]("$h._extractedDate"); + $h._preciseDate["registerClass"]("$h._preciseDate",$h._extractedDate); + $h._relativeDate["registerClass"]("$h._relativeDate",$h._extractedDate); + $h.MessageCompose["registerClass"]("$h.MessageCompose",$h.ComposeItem); + $h.NotificationMessages["registerClass"]("$h.NotificationMessages"); + $h.PhoneNumber["registerClass"]("$h.PhoneNumber"); + $h.TaskSuggestion["registerClass"]("$h.TaskSuggestion"); + $h.UserProfile["registerClass"]("$h.UserProfile"); + $h.CommonParameters["registerClass"]("$h.CommonParameters"); + $h.RequestBase["registerClass"]("$h.RequestBase"); + $h.ProxyRequestBase["registerClass"]("$h.ProxyRequestBase",$h.RequestBase); + $h.EwsRequest["registerClass"]("$h.EwsRequest",$h.ProxyRequestBase); + $h.InitialData["registerClass"]("$h.InitialData"); + $h._loadDictionaryRequest["registerClass"]("$h._loadDictionaryRequest",$h.RequestBase); + $h.SaveDictionaryRequest["registerClass"]("$h.SaveDictionaryRequest",$h.RequestBase); + window["OSF"]["DDA"]["OutlookAppOm"].asyncMethodTimeoutKeyName = "__timeout__"; + window["OSF"]["DDA"]["OutlookAppOm"].ewsIdOrEmailParamName = "ewsIdOrEmail"; + window["OSF"]["DDA"]["OutlookAppOm"].moduleParamName = "module"; + window["OSF"]["DDA"]["OutlookAppOm"].queryStringParamName = "queryString"; + window["OSF"]["DDA"]["OutlookAppOm"]._maxRecipients$p = 100; + window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p = 255; + window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength = 32768; + window["OSF"]["DDA"]["OutlookAppOm"]._maxLocationLength$p = 255; + window["OSF"]["DDA"]["OutlookAppOm"]._maxEwsRequestSize$p = 1e6; + window["OSF"]["DDA"]["OutlookAppOm"].executeMethodName = "ExecuteMethod"; + window["OSF"]["DDA"]["OutlookAppOm"].getInitialDataMethodName = "GetInitialData"; + window["OSF"]["DDA"]["OutlookAppOm"].standardInvokeHostMethodErrorCodeKey = "errorCode"; + window["OSF"]["DDA"]["OutlookAppOm"].standardInvokeHostMethodErrorKey = "error"; + window["OSF"]["DDA"]["OutlookAppOm"].outlookAsyncResponseWasSuccessfulKey = "wasSuccessful"; + window["OSF"]["DDA"]["OutlookAppOm"].outlookAsyncResponseErrorMessageKey = "errorMessage"; + window["OSF"]["DDA"]["OutlookAppOm"].itemIdParameterName = "itemId"; + window["OSF"]["DDA"]["OutlookAppOm"].restVersionParameterName = "restVersion"; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p = null; + $h.AdditionalGlobalParameters.itemNumberKey = "itemNumber"; + $h.AdditionalGlobalParameters.actionsDefinitionKey = "actions"; + $h.AttachmentConstants.maxAttachmentNameLength = 255; + $h.AttachmentConstants.maxUrlLength = 2048; + $h.AttachmentConstants.maxItemIdLength = 200; + $h.AttachmentConstants.maxRemoveIdLength = 200; + $h.AttachmentConstants.attachmentParameterName = "attachments"; + $h.AttachmentConstants.attachmentTypeParameterName = "type"; + $h.AttachmentConstants.attachmentUrlParameterName = "url"; + $h.AttachmentConstants.attachmentItemIdParameterName = "itemId"; + $h.AttachmentConstants.attachmentNameParameterName = "name"; + $h.AttachmentConstants.attachmentIsInlineParameterName = "isInline"; + $h.AttachmentConstants.attachmentTypeFileName = "file"; + $h.AttachmentConstants.attachmentTypeItemName = "item"; + $h.AttachmentDetails._attachmentTypeMap$p = [window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["File"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["Item"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["Cloud"]]; + $h.Body.coercionTypeParameterName = "coercionType"; + $h.ComposeRecipient.displayNameLengthLimit = 255; + $h.ComposeRecipient.maxSmtpLength = 571; + $h.ComposeRecipient.recipientsLimit = 100; + $h.ComposeRecipient.totalRecipientsLimit = 500; + $h.ComposeRecipient.addressParameterName = "address"; + $h.ComposeRecipient.nameParameterName = "name"; + $h.ComposeLocation.locationKey = "location"; + $h.ComposeLocation.maximumLocationLength = 255; + $h.ComposeSubject.maximumSubjectLength = 255; + $h.ComposeTime.timeTypeName = "TimeProperty"; + $h.ComposeTime.timeDataName = "time"; + $h.Diagnostics.outlookAppName = "Outlook"; + $h.Diagnostics.outlookWebAppName = "OutlookWebApp"; + $h.Diagnostics.outlookIOSAppName = "OutlookIOS"; + $h.Diagnostics.outlookAndroidAppName = "OutlookAndroid"; + $h.EmailAddressDetails._emptyString$p = ""; + $h.EmailAddressDetails._responseTypeMap$p = [window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["None"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Organizer"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Tentative"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Accepted"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Declined"]]; + $h.EmailAddressDetails._recipientTypeMap$p = [window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["Other"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["DistributionList"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["User"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["ExternalUser"]]; + $h.Entities._allEntityKeys$p = ["Addresses","EmailAddresses","Urls","PhoneNumbers","TaskSuggestions","MeetingSuggestions","Contacts","FlightReservations","ParcelDeliveries"]; + $h.ReplyConstants.htmlBodyKeyName = "htmlBody"; + $h.AsyncConstants.optionsKeyName = "options"; + $h.AsyncConstants.callbackKeyName = "callback"; + $h.AsyncConstants.asyncResultKeyName = "asyncResult"; + $h.Item.destFolderParameterName = "destinationFolder"; + $h.MeetingSuggestionTimeDecoder._baseDate$p = new Date("0001-01-01T00:00:00Z"); + $h.NotificationMessages.maximumKeyLength = 32; + $h.NotificationMessages.maximumIconLength = 32; + $h.NotificationMessages.maximumMessageLength = 150; + $h.NotificationMessages.maximumActionTextLength = 30; + $h.NotificationMessages.notificationsKeyParameterName = "key"; + $h.NotificationMessages.notificationsTypeParameterName = "type"; + $h.NotificationMessages.notificationsIconParameterName = "icon"; + $h.NotificationMessages.notificationsMessageParameterName = "message"; + $h.NotificationMessages.notificationsPersistentParameterName = "persistent"; + $h.NotificationMessages.notificationsActionsDefinitionParameterName = "actions"; + $h.NotificationMessages.notificationsActionTypeParameterName = "actionType"; + $h.NotificationMessages.notificationsActionTextParameterName = "actionText"; + $h.NotificationMessages.notificationsActionCommandIdParameterName = "commandId"; + $h.NotificationMessages.notificationsActionContextDataParameterName = "contextData"; + $h.NotificationMessages.notificationsActionShowTaskPaneActionId = "showTaskPane"; + $h.OutlookErrorManager.errorNameKey = "name"; + $h.OutlookErrorManager.errorMessageKey = "message"; + $h.OutlookErrorManager._isInitialized$p = false; + $h.OutlookErrorManager.OutlookErrorCodes.attachmentSizeExceeded = 9e3; + $h.OutlookErrorManager.OutlookErrorCodes.numberOfAttachmentsExceeded = 9001; + $h.OutlookErrorManager.OutlookErrorCodes.internalFormatError = 9002; + $h.OutlookErrorManager.OutlookErrorCodes.invalidAttachmentId = 9003; + $h.OutlookErrorManager.OutlookErrorCodes.invalidAttachmentPath = 9004; + $h.OutlookErrorManager.OutlookErrorCodes.cannotAddAttachmentBeforeUpgrade = 9005; + $h.OutlookErrorManager.OutlookErrorCodes.attachmentDeletedBeforeUploadCompletes = 9006; + $h.OutlookErrorManager.OutlookErrorCodes.attachmentUploadGeneralFailure = 9007; + $h.OutlookErrorManager.OutlookErrorCodes.attachmentToDeleteDoesNotExist = 9008; + $h.OutlookErrorManager.OutlookErrorCodes.attachmentDeleteGeneralFailure = 9009; + $h.OutlookErrorManager.OutlookErrorCodes.invalidEndTime = 9010; + $h.OutlookErrorManager.OutlookErrorCodes.htmlSanitizationFailure = 9011; + $h.OutlookErrorManager.OutlookErrorCodes.numberOfRecipientsExceeded = 9012; + $h.OutlookErrorManager.OutlookErrorCodes.noValidRecipientsProvided = 9013; + $h.OutlookErrorManager.OutlookErrorCodes.cursorPositionChanged = 9014; + $h.OutlookErrorManager.OutlookErrorCodes.invalidSelection = 9016; + $h.OutlookErrorManager.OutlookErrorCodes.accessRestricted = 9017; + $h.OutlookErrorManager.OutlookErrorCodes.genericTokenError = 9018; + $h.OutlookErrorManager.OutlookErrorCodes.genericSettingsError = 9019; + $h.OutlookErrorManager.OutlookErrorCodes.genericResponseError = 9020; + $h.OutlookErrorManager.OutlookErrorCodes.saveError = 9021; + $h.OutlookErrorManager.OutlookErrorCodes.messageInDifferentStoreError = 9022; + $h.OutlookErrorManager.OutlookErrorCodes.duplicateNotificationKey = 9023; + $h.OutlookErrorManager.OutlookErrorCodes.notificationKeyNotFound = 9024; + $h.OutlookErrorManager.OutlookErrorCodes.numberOfNotificationsExceeded = 9025; + $h.OutlookErrorManager.OutlookErrorCodes.persistedNotificationArrayReadError = 9026; + $h.OutlookErrorManager.OutlookErrorCodes.persistedNotificationArraySaveError = 9027; + $h.OutlookErrorManager.OutlookErrorCodes.cannotPersistPropertyInUnsavedDraftError = 9028; + $h.OutlookErrorManager.OutlookErrorCodes.callSaveAsyncBeforeToken = 9029; + $h.OutlookErrorManager.OutlookErrorCodes.apiCallFailedDueToItemChange = 9030; + $h.OutlookErrorManager.OutlookErrorCodes.invalidParameterValueError = 9031; + $h.OutlookErrorManager.OutlookErrorCodes.ooeInvalidDataFormat = 2006; + $h.OutlookErrorManager.OsfDdaErrorCodes.ooeCoercionTypeNotSupported = 1e3; + $h.CommonParameters.asyncContextKeyName = "asyncContext"; + $h.InitialData.userProfileTypeKey = "userProfileType"; + $h.ScriptHelpers.emptyString = ""; + OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM); + if(appContext.get_appName() == OSF.AppName.OutlookWebApp || appContext.get_appName() == OSF.AppName.OutlookIOS || appContext.get_appName() == OSF.AppName.OutlookAndroid) + this._settings = this._initializeSettings(appContext,false); + else + this._settings = this._initializeSettings(false); + appContext.appOM = new OSF.DDA.OutlookAppOm(appContext,this._webAppState.wnd,appReady); + if(appContext.get_appName() == OSF.AppName.Outlook || appContext.get_appName() == OSF.AppName.OutlookWebApp || appContext.get_appName() == OSF.AppName.OutlookIOS) + OSF.DDA.DispIdHost.addEventSupport(appContext.appOM,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.ItemChanged])) } - - diff --git a/node_modules/@microsoft/office-js/dist/outlook-ios-16.00.js b/node_modules/@microsoft/office-js/dist/outlook-ios-16.00.js index 6697f4b..4a5c3a1 100644 --- a/node_modules/@microsoft/office-js/dist/outlook-ios-16.00.js +++ b/node_modules/@microsoft/office-js/dist/outlook-ios-16.00.js @@ -1,18 +1,9 @@ -/* Outlook iOS specific API library */ -/* Version: 16.0.7526.1000 */ -/* - Copyright (c) Microsoft Corporation. All rights reserved. -*/ - - -/* - Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419. -*/ - +/* Outlook iOS client specific API library */ +/* Version: 16.0.8818.1000 */ /*! Copyright (c) Microsoft Corporation. All rights reserved. */ /*! Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419. */ -var __extends=this&&this.__extends||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);function r(){this.constructor=n}n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},OfficeExt;(function(n){var t=function(){var i=null,n=!0;function t(){}t.prototype.isMsAjaxLoaded=function(){var t="function",i="undefined";return typeof Sys!==i&&typeof Type!==i&&Sys.StringBuilder&&typeof Sys.StringBuilder===t&&Type.registerNamespace&&typeof Type.registerNamespace===t&&Type.registerClass&&typeof Type.registerClass===t&&typeof Function._validateParams===t&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===t?n:!1};t.prototype.loadMsAjaxFull=function(n){var t=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,n)};Object.defineProperty(t.prototype,"msAjaxError",{get:function(){var n=this;n._msAjaxError==i&&n.isMsAjaxLoaded()&&(n._msAjaxError=Error);return n._msAjaxError},set:function(n){this._msAjaxError=n},enumerable:n,configurable:n});Object.defineProperty(t.prototype,"msAjaxSerializer",{get:function(){var n=this;n._msAjaxSerializer==i&&n.isMsAjaxLoaded()&&(n._msAjaxSerializer=Sys.Serialization.JavaScriptSerializer);return n._msAjaxSerializer},set:function(n){this._msAjaxSerializer=n},enumerable:n,configurable:n});Object.defineProperty(t.prototype,"msAjaxString",{get:function(){var n=this;n._msAjaxString==i&&n.isMsAjaxLoaded()&&(n._msAjaxSerializer=String);return n._msAjaxString},set:function(n){this._msAjaxString=n},enumerable:n,configurable:n});Object.defineProperty(t.prototype,"msAjaxDebug",{get:function(){var n=this;n._msAjaxDebug==i&&n.isMsAjaxLoaded()&&(n._msAjaxDebug=Sys.Debug);return n._msAjaxDebug},set:function(n){this._msAjaxDebug=n},enumerable:n,configurable:n});return t}();n.MicrosoftAjaxFactory=t})(OfficeExt||(OfficeExt={}));var OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory,OSF=OSF||{},OfficeExt;(function(n){var t=function(){function n(n){this._internalStorage=n}n.prototype.getItem=function(n){try{return this._internalStorage&&this._internalStorage.getItem(n)}catch(t){return null}};n.prototype.setItem=function(n,t){try{this._internalStorage&&this._internalStorage.setItem(n,t)}catch(i){}};n.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(n){}};n.prototype.removeItem=function(n){try{this._internalStorage&&this._internalStorage.removeItem(n)}catch(t){}};n.prototype.getKeysWithPrefix=function(n){var i=[];try{for(var u=this._internalStorage&&this._internalStorage.length||0,t=0;t0?i.push(t):t.tabIndex===0&&u.push(t):u.push(t)}i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;r===0&&(r=i.indexOf(n)-i.indexOf(t));return r});return[].concat(i,u)}return{set_entropy:function(n){if(typeof n=="string")for(var i=0;i1?c[c.length-1]:n;if(u&&o!=n){o.indexOf(it)>=0&&(o=o.split(it)[0]);o=decodeURIComponent(o)}var l=p();if(!f&&l){var s=window.name.indexOf(i);if(s>r){var h=window.name.indexOf(";",s);h==r&&(h=window.name.length);var a=window.name.substring(s,h);o?l.setItem(a,o):o=l.getItem(a)}}return o},getConversationId:function(){var i=window.location.search,t=n;if(i){var r=i.indexOf("&");t=r>0?i.substring(1,r):i.substr(1);if(t&&t.charAt(t.length-1)==="="){t=t.substring(0,t.length-1);t&&(t=decodeURIComponent(t))}}return t},getInfoItems:function(n){var t=n.split("$");typeof t[1]==h&&(t=n.split("|"));typeof t[1]==h&&(t=n.split("%7C"));return t},getXdmFieldValue:function(n,t){var r="",u=OSF.OUtil.parseXdmInfo(t);if(u){var i=OSF.OUtil.getInfoItems(u);if(i!=undefined&&i.length>=3)switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];case OSF.XdmFieldName.AppId:r=i[1]}}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]);if(u)throw u;for(var f in r){u=Function._validateParameter(n[f],r[f],f);if(u)throw u;}},writeProfilerMark:function(n){if(window.msWriteProfilerMark){window.msWriteProfilerMark(n);OsfMsAjaxFactory.msAjaxDebug.trace(n)}},outputDebug:function(n){typeof OsfMsAjaxFactory!==h&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){r=r||{};for(var e in u){var f=u[e];r[f]==undefined&&(r[f]=i)}Object.defineProperty(n,t,r);return n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[o])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[o])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[tt,o,nt])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[tt,o,nt])},finalizeProperties:function(n,r){r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8;f=e&255;i[t++]=r>>2;i[t++]=(r&3)<<4|u>>4;i[t++]=(u&15)<<2|f>>6;i[t++]=f&63;if(!isNaN(e)){r=e>>8;u=s&255;f=s>>8;i[t++]=r>>2;i[t++]=(r&3)<<4|u>>4;i[t++]=(u&15)<<2|f>>6;i[t++]=f&63}if(isNaN(e))i[t-1]=64;else if(isNaN(s)){i[t-2]=64;i[t-1]=64}for(var h=0;h0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(n){var i=n.constructor();for(var t in n)n.hasOwnProperty(t)&&(i[t]=n[t]);return i},createObject:function(t){var r=n;if(t){r={};for(var u=t.length,i=0;in)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};u=k(u);s=e?u.length-1:0;if(u.length===0)return n;while(!h&&s>=0&&sn)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};u=k(u);v=y(u,e);s=l(u.length,v,o);if(s<0)return n;while(!c&&s>=0&&s0;t++){(t==8||t==12||t==16||t==20)&&(i+="-");i+=n[r%16];r=Math.floor(r/16)}for(;t<32;t++){(t==8||t==12||t==16||t==20)&&(i+="-");i+=n[Math.floor(Math.random()*16)]}return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g){var nt=this;nt._id=n;nt._appName=t;nt._appVersion=i;nt._appUILocale=r;nt._dataLocale=u;nt._docUrl=f;nt._clientMode=e;nt._settings=o;nt._reason=s;nt._osfControlType=h;nt._eToken=c;nt._correlationId=l;nt._appInstanceId=a;nt._touchEnabled=v;nt._commerceAllowed=y;nt._appMinorVersion=p;nt._requirementMatrix=w;nt._hostCustomMessage=b;nt._isDialog=!1;nt._clientWindowHeight=k;nt._clientWindowWidth=d;nt._addinName=g;nt.get_id=function(){return this._id};nt.get_appName=function(){return this._appName};nt.get_appVersion=function(){return this._appVersion};nt.get_appUILocale=function(){return this._appUILocale};nt.get_dataLocale=function(){return this._dataLocale};nt.get_docUrl=function(){return this._docUrl};nt.get_clientMode=function(){return this._clientMode};nt.get_bindings=function(){return this._bindings};nt.get_settings=function(){return this._settings};nt.get_reason=function(){return this._reason};nt.get_osfControlType=function(){return this._osfControlType};nt.get_eToken=function(){return this._eToken};nt.get_correlationId=function(){return this._correlationId};nt.get_appInstanceId=function(){return this._appInstanceId};nt.get_touchEnabled=function(){return this._touchEnabled};nt.get_commerceAllowed=function(){return this._commerceAllowed};nt.get_appMinorVersion=function(){return this._appMinorVersion};nt.get_requirementMatrix=function(){return this._requirementMatrix};nt.get_hostCustomMessage=function(){return this._hostCustomMessage};nt.get_isDialog=function(){return this._isDialog};nt.get_clientWindowHeight=function(){return this._clientWindowHeight};nt.get_clientWindowWidth=function(){return this._clientWindowWidth};nt.get_addinName=function(){return this._addinName}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidMethodMax:144,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidActivationStatusChangedEvent:32,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];if(i){i.name||(i.name=n[this.errorCodes.ooeInternalError].name);i.message||(i.message=n[this.errorCodes.ooeInternalError].message)}else i=n[this.errorCodes.ooeInternalError];return i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore}}}}();var OfficeExt;(function(n){var t;(function(n){var t=1.1,r=function(){function n(n){this.isSetSupported=function(n,t){if(n==undefined)return!1;t==undefined&&(t=0);var u=this._setMap,i=u._sets;if(i.hasOwnProperty(n.toLowerCase())){var r=i[n.toLowerCase()];return r>0&&r>=t}else return!1};this._setMap=n}return n}();n.RequirementMatrix=r;var i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;var s=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return i}(i);n.ExcelClientDefaultSetRequirement=s;var b=function(n){__extends(i,n);function i(){n.call(this);this._addSetMap({imagecoercion:t})}return i}(s);n.ExcelClientV1DefaultSetRequirement=b;var k=function(n){__extends(t,n);function t(){n.call(this,{mailbox:1.3})}return t}(i);n.OutlookClientDefaultSetRequirement=k;var o=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return i}(i);n.WordClientDefaultSetRequirement=o;var p=function(n){__extends(i,n);function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return i}(o);n.WordClientV1DefaultSetRequirement=p;var u=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return i}(i);n.PowerpointClientDefaultSetRequirement=u;var w=function(n){__extends(i,n);function i(){n.call(this);this._addSetMap({imagecoercion:t})}return i}(u);n.PowerpointClientV1DefaultSetRequirement=w;var nt=function(n){__extends(i,n);function i(){n.call(this,{selection:t,textcoercion:t})}return i}(i);n.ProjectClientDefaultSetRequirement=nt;var tt=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return i}(i);n.ExcelWebDefaultSetRequirement=tt;var d=function(n){__extends(i,n);function i(){n.call(this,{customxmlparts:t,documentevents:t,file:t,ooxmlcoercion:t,selection:t,settings:t,textcoercion:t})}return i}(i);n.WordWebDefaultSetRequirement=d;var g=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,settings:t})}return i}(i);n.PowerpointWebDefaultSetRequirement=g;var e=function(n){__extends(t,n);function t(){n.call(this,{mailbox:1.3})}return t}(i);n.OutlookWebDefaultSetRequirement=e;var c=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return i}(i);n.SwayWebDefaultSetRequirement=c;var h=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return i}(i);n.AccessWebDefaultSetRequirement=h;var y=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return i}(i);n.ExcelIOSDefaultSetRequirement=y;var f=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return i}(i);n.WordIOSDefaultSetRequirement=f;var l=function(n){__extends(t,n);function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return t}(f);n.WordIOSV1DefaultSetRequirement=l;var a=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return i}(i);n.PowerpointIOSDefaultSetRequirement=a;var v=function(n){__extends(i,n);function i(){n.call(this,{mailbox:t})}return i}(i);n.OutlookIOSDefaultSetRequirement=v;var it=function(){function n(){}n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)};n.getDefaultRequirementMatrix=function(t){this.initializeDefaultSetMatrix();var u=undefined,e=t.get_requirementMatrix();if(e!=undefined&&e.length>0&&typeof JSON!="undefined"){var o=JSON.parse(t.get_requirementMatrix().toLowerCase());u=new r(new i(o))}else{var f=n.getClientFullVersionString(t);u=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[f]!=undefined?new r(n.DefaultSetArrayMatrix[f]):new r(new i({}))}return u};n.getClientFullVersionString=function(n){var r=n.get_appMinorVersion(),u="",i="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;if(f&&n.get_appVersion()==1)i=t==4096&&r>=15?"16.00.01":"16.00";else if(n.get_appName()==64)i=n.get_appVersion();else{u=r<10?"0"+r:""+r;i=n.get_appVersion()+"."+u}return n.get_appName()+"-"+i};n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new s;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new o;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new b;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new p;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new w;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new k;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new tt;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new e;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new e;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new nt;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new h;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new g;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new y;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new c;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new f;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new l;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new a;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new v};n.Excel_RCLIENT_1600="1-16.00";n.Excel_RCLIENT_1601="1-16.01";n.Word_RCLIENT_1600="2-16.00";n.Word_RCLIENT_1601="2-16.01";n.PowerPoint_RCLIENT_1600="4-16.00";n.PowerPoint_RCLIENT_1601="4-16.01";n.Outlook_RCLIENT_1600="8-16.00";n.Excel_WAC_1600="16-16.00";n.Word_WAC_1600="32-16.00";n.Outlook_WAC_1600="64-16.00";n.Outlook_WAC_1601="64-16.01";n.Project_RCLIENT_1600="128-16.00";n.Access_WAC_1600="256-16.00";n.PowerPoint_WAC_1600="512-16.00";n.Excel_IOS_1600="1024-16.00";n.SWAY_WAC_1600="2048-16.00";n.Word_IOS_1600="4096-16.00";n.Word_IOS_16001="4096-16.00.01";n.PowerPoint_IOS_1600="8192-16.00";n.Outlook_IOS_1600="65536-16.00";n.DefaultSetArrayMatrix={};return n}();n.RequirementsMatrixFactory=it})(t=n.Requirement||(n.Requirement={}))})(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda();Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){if(!n){window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window);window.Office=Microsoft.Office.WebExtension;n=!0}},disableShortcut:function(){if(n){t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window);n=!1}}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i;if(n&&typeof n=="string"){var r=n.indexOf("#");if(r!=-1){var o=n.substring(0,r),e=n.substring(r+1);switch(o){case"binding":case"bindings":e&&(i=new OSF.DDA.BindingPromise(e))}}}if(i){i.onFail=t;return i}else if(t){var u=typeof t;if(u=="function"){var f={};f[Microsoft.Office.WebExtension.Parameters.Callback]=t;OSF.DDA.issueAsyncResult(f,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,u);}};OSF.DDA.Context=function(n,t,i,r,u){var f=this;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});if(!n.get_isDialog()){t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t});if(r){var o=r.displayName||"appOM";delete r.displayName;OSF.OUtil.defineEnumerableProperty(f,o,{value:r})}u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}});var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n);OSF.OUtil.defineEnumerableProperty(f,"requirements",{value:e})}};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});var u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext());return n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,o=n.length,e=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){for(var u in n){var i=n[u],r=t[u];if(i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw e();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw e();}};f.extractRequiredArguments=function(t,i,r){if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var f,e,l=n.length-1;l>=s;l--){var c=n[l];switch(typeof c){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=c;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=c;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}f=o.fillOptions(f,i,r,u);if(e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;o.verifyArguments(t,f);return f}this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),f=c(n,r,t,i);return o.constructCallArgs(r,f,t,i)};this.processResponse=function(n,t,i,f){var e;e=n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n);return e};this.getCallArgs=function(n){for(var t,u,r=n.length-1;r>=s;r--){var i=n[r];switch(typeof i){case"object":t=i;break;case h:u=i}}t=t||{};u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u);return t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var i=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],t=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],i,t,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback];if(f){var u={};u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext];var r;if(t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)u[OSF.DDA.AsyncResultEnum.Properties.Value]=i;else{r={};i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i;r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i}f(new OSF.DDA.AsyncResult(u,r))}};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){for(var t in n){var i={};OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}});OSF.DDA.SyncMethodNames[t]=i}};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);function o(n,i,r,u){if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var o,c,s=n.length-1;s>=e;s--){var h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}o=f.fillOptions(o,i,r,u);f.verifyArguments(t,o);return o}this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),e=o(n,r,t,i);return f.constructCallArgs(r,e,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){var c="fromHost",i=this,s="toHost",e=c,u="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];function f(i,u){var a=i?{}:undefined;for(var h in i){var s=i[h],o;if(OSF.DDA.ListType.isListType(h)){o=[];for(var v in s)o.push(f(s[v],u))}else if(OSF.OUtil.listContainsKey(r,h))o=r[h][u](s);else if(u==e&&n.preserveNesting(h))o=f(s,u);else{var c=t[h];if(c){var l=c[u];if(l){o=l[s];o===undefined&&(o=s)}}else o=s}a[h]=o}return a}function l(i,r){var o;for(var f in r){var e;e=n.isComplexType(f)?l(i,t[f][s]):i[f];if(e!=undefined){o||(o={});var h=r[f];h==u&&(h=f);o[h]=n.pack(f,e)}}return o}function o(i,r,f){f||(f={});for(var h in r){var v=r[h],s;s=v==u?i:i[v];if(s===null||s===undefined)f[h]=undefined;else{s=n.unpack(h,s);var c;if(n.isComplexType(h)){c=t[h][e];n.preserveNesting(h)?f[h]=o(s,c):o(s,c,f)}else if(OSF.DDA.ListType.isListType(h)){c={};var y=OSF.DDA.ListType.getDescriptor(h);c[y]=u;var l=new Array(s.length);for(var a in s)l[a]=o(s[a],c);f[h]=l}else f[h]=s}}return f}function h(n,i,r){var e=t[n][r],u;if(r=="toHost"){var h=f(i,r);u=l(h,e)}else if(r==c){var s=o(i,e);u=f(s,r)}return u}t||(t={});i.addMapping=function(n,i){var f,o;if(i.map){f=i.map;o={};for(var c in f){var l=f[c];l==u&&(l=c);o[l]=c}}else{f=i.toHost;o=i.fromHost}var r=t[n];if(r){var h=r[s];for(var v in h)f[v]=h[v];h=r[e];for(var a in h)o[a]=h[a]}else r=t[n]={};r[s]=f;r[e]=o};i.toHost=function(n,t){return h(n,t,s)};i.fromHost=function(n,t){return h(n,t,e)};i.self=u;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return f(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset);OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]));return OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){var r;r=this.isDynamicType(n)?t[n].toHost(i):i;return r};i.unpack=function(n,i){var r;r=this.isDynamicType(n)?t[n].fromHost(i):i;return r}};OSF.DDA.getDecoratedParameterMap=function(n,t){var i=new OSF.DDA.HostParameterMap(n),f=i.self;function r(n){var i=null;if(n){i={};for(var r=n.length,t=0;t0&&t.push(i)}}}catch(s){}return t}var i=[],n={};n[Microsoft.Office.WebExtension.Parameters.Data]=function(){var i=0,n=1;return{toHost:function(t){if(OSF.DDA.TableDataProperties&&typeof t!="string"&&t[OSF.DDA.TableDataProperties.TableRows]!==undefined){var r=[];r[i]=t[OSF.DDA.TableDataProperties.TableRows];r[n]=t[OSF.DDA.TableDataProperties.TableHeaders];t=r}return t},fromHost:function(r){var f;if(r.toArray){var e=r.dimensions();if(e===2)f=t(r);else{var u=r.toArray();if(u.length===2&&(u[0]!=null&&u[0].toArray||u[1]!=null&&u[1].toArray)){f={};f[OSF.DDA.TableDataProperties.TableRows]=t(u[i]);f[OSF.DDA.TableDataProperties.TableHeaders]=t(u[n])}else f=u}}else f=r;return f}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,i,n);this.unpack=function(t,i){var r;if(this.isComplexType(t)||OSF.DDA.ListType.isListType(t)){var u=(i||typeof i=="unknown")&&i.toArray;r=u?i.toArray():i||{}}else r=this.isDynamicType(t)?n[t].fromHost(i):i;return r}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(n){function i(n){var t=n;if(OSF.OUtil.isArray(n))for(var f=t.length,r=0;r2){u=[];for(var o=1;o=n.MESSAGE_TIME_DELTA){h();e.lastMessageTimestamp=o}else{e.lastMessageTimestamp+=n.MESSAGE_TIME_DELTA;setTimeout(function(){h()},e.lastMessageTimestamp-o)}return s};n.prototype.generateCorrelationId=function(){++this.callingIndex;return this.conversationId+this.callingIndex};n.getCurrentTimeMS=function(){return+new Date};n.MESSAGE_TIME_DELTA=10;return n}();n.WebkitScriptMessaging=i})(t=n.ScriptMessaging||(n.ScriptMessaging={}))})(OSFWebkit||(OSFWebkit={}));OSF.ScriptMessaging=OSFWebkit.ScriptMessaging;var OSFWebkit;(function(n){n.MessageHandlerName="Agave";n.PopupMessageHandlerName="WefPopupHandler";(function(n){var y="RequirementMatrix",p="CommerceAllowed",v="TouchEnabled",l="InstanceId",a="CorrelationId",d="APISetVersion",g="SolutionToken",k="ControlIntegrationLevel",w="ActivationMode",b="DocumentUrl",u="BindingCount",f="AppDataLocale",r="APPUILocale",t="AppCapabilities",i="APIVersionSequence",h="RevisionVersion",c="MinorVersion",s="MajorVersion",e="SolutionReferenceId",o="Settings";n[n[o]=0]=o;n[n[e]=1]=e;n[n.AppType=2]="AppType";n[n[s]=3]=s;n[n[c]=4]=c;n[n[h]=5]=h;n[n[i]=6]=i;n[n[t]=7]=t;n[n[r]=8]=r;n[n[f]=9]=f;n[n[u]=10]=u;n[n[b]=11]=b;n[n[w]=12]=w;n[n[k]=13]=k;n[n[g]=14]=g;n[n[d]=15]=d;n[n[a]=16]=a;n[n[l]=17]=l;n[n[v]=18]=v;n[n[p]=19]=p;n[n[y]=20]=y})(n.AppContextProperties||(n.AppContextProperties={}));var i=n.AppContextProperties;(function(n){var r="GetContext",u="WriteSettings",t="UnregisterEvent",i="RegisterEvent";n[n.Execute=1]="Execute";n[n[i]=2]=i;n[n[t]=3]=t;n[n[u]=4]=u;n[n[r]=5]=r})(n.MethodId||(n.MethodId={}));var r=n.MethodId,t=function(){var i=null;function t(n){this.hostScriptProxy=n}t.prototype.execute=function(t,r,u){var f=r;f==i&&(f=[]);var o={id:t,apiArgs:f},e=function(t){if(u){var e=[];if(OSF.OUtil.isArray(t))for(var f=0;f=2){u=t[0];i=t[1]}r&&r(i,new n.WebkitSafeArray(u))},f=function(t){if(u)return u(new n.WebkitSafeArray(t))};this.hostScriptProxy.registerEvent(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.RegisterEvent,t,i,e,f)};t.prototype.unregisterEvent=function(t,i,r){var u=function(t){return r(new n.WebkitSafeArray(t))};this.hostScriptProxy.unregisterEvent(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.UnregisterEvent,t,i,u)};t.prototype.messageParent=function(n){var i=n[Microsoft.Office.WebExtension.Parameters.MessageToParent],t={dialogMessage:{messageType:OSF.DialogMessageType.DialogMessageReceived,messageContent:i}};window.opener.postMessage(JSON.stringify(t),window.location.origin)};t.prototype.openDialog=function(n,r,u,f){var w="action=displayDialog",l="#",o=JSON.parse(r),a=o.url;if(a){var e=a.split(l),s="?";e[0].indexOf("?")>-1&&(s="&");var p=screen.width*o.width/100,k=screen.height*o.height/100,b="width="+p+", height="+k;e[0]=e[0].concat(s).concat(w);var v=e.join(l);t.popup=window.open(v,"",b);function c(t){if(t.origin==window.location.origin)try{var i=JSON.parse(t.data);i.dialogMessage&&u(n,[OSF.DialogMessageType.DialogMessageReceived,i.dialogMessage.messageContent])}catch(r){OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handlered. Message:"+t.data)}}window.addEventListener("message",c);var h;function y(){try{if(t.popup==i||t.popup.closed){window.clearInterval(h);window.removeEventListener("message",c);u(n,[OSF.DialogMessageType.DialogClosed])}}catch(r){OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed.")}}h=window.setInterval(y,1e3);f(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}};t.prototype.closeDialog=function(n,r,u){if(t.popup){t.popup.close();t.popup=i;u(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}else u(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)};return t}();n.WebkitHostController=t})(OSFWebkit||(OSFWebkit={}));OSF.Webkit=OSFWebkit;OSF.ClientHostController=new OSFWebkit.WebkitHostController(OSF.ScriptMessaging.GetScriptMessenger());OSF.DDA.ClientSettingsManager={getSettingsExecuteMethod:function(n){return function(t){var u,r,i=function(n,i){t.onReceiving&&t.onReceiving();t.onComplete&&t.onComplete(n,i)};try{n(t.hostCallArgs,t.onCalling,i)}catch(f){u=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;r={name:Strings.OfficeOM.L_InternalError,message:f};i(u,r)}}},read:function(n,t){var u=[],f=[];n&&n();var i=OSF._OfficeAppFactory.getInitializationHelper(),r=function(n){t&&t(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,n.get_settings())};i.getAppContext(null,r)},write:function(n,t,i,r){var u={},o=[],e=[];for(var f in n){o.push(f);e.push(n[f])}u.keys=o;u.values=e;i&&i();var s=function(n){r&&r(n[0],null)};OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.WriteSettings,u,s)}};OSF.InitializationHelper.prototype.initializeSettings=function(n,t){var r=n.get_settings();return this.deserializeSettings(r,t)};OSF.InitializationHelper.prototype.getAppContext=function(n,t){var r=function(n){for(var f,i=OSF.Webkit.AppContextProperties,d=n[i.AppType],o=n[i.Settings],s={},e=o[0],g=o[1],u=0;u=3){f=n[0];e=n[2];var t=OSF.OUtil.parseSerializerVersionWithGivenFragment(!1,OSF._OfficeAppFactory.getWindowLocationHash());isNaN(t)&&OSF._OfficeAppFactory.getWindowName&&(t=OSF.OUtil.parseSerializerVersionFromWindowName(!1,OSF._OfficeAppFactory.getWindowName()));i=Microsoft.Office.Common.XdmCommunicationManager.connect(f,window.parent,e,t)}}var u=null;if(i)try{i.invoke("getCustomizedScriptPathAsync",function(n,t){o(n===0?t:null)},{__timeout__:1e3})}catch(s){OsfMsAjaxFactory.msAjaxDebug.trace("no script override through cross frame communication.")}else{try{window.external&&typeof window.external.getCustomizedScriptPath!="undefined"&&(u=window.external.getCustomizedScriptPath())}catch(s){OsfMsAjaxFactory.msAjaxDebug.trace("no script override through window.external.")}o(u)}},t=!0;t&&!OsfMsAjaxFactory.isMsAjaxLoaded()?OSF._OfficeAppFactory&&OSF._OfficeAppFactory&&OSF._OfficeAppFactory.getLoadScriptHelper&&OSF._OfficeAppFactory.getLoadScriptHelper().isScriptLoading(OSF.ConstantNames.MicrosoftAjaxId)?OSF._OfficeAppFactory.getLoadScriptHelper().waitForScripts([OSF.ConstantNames.MicrosoftAjaxId],n):OsfMsAjaxFactory.loadMsAjaxFull(function(){if(OsfMsAjaxFactory.isMsAjaxLoaded())n();else throw"Not able to load MicrosoftAjax.js.";}):n()})();Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(n){var t=this;t._eventHandlers={};t._queuedEventsArgs={};for(var r in n){var i=n[r];t._eventHandlers[i]=[];t._queuedEventsArgs[i]=[]}};OSF.EventDispatch.prototype={getSupportedEvents:function(){var n=[];for(var t in this._eventHandlers)n.push(t);return n},supportsEvent:function(n){var t=!1;for(var i in this._eventHandlers)if(n==i){t=!0;break}return t},hasEventHandler:function(n,t){var i=this._eventHandlers[n];if(i&&i.length>0)for(var r in i)if(i[r]===t)return!0;return!1},addEventHandler:function(n,t){if(typeof t!="function")return!1;var i=this._eventHandlers[n];if(i&&!this.hasEventHandler(n,t)){i.push(t);return!0}else return!1},addEventHandlerAndFireQueuedEvent:function(n,t){var r=this._eventHandlers[n],u=r.length==0,i=this.addEventHandler(n,t);u&&i&&this.fireQueuedEvent(n);return i},removeEventHandler:function(n,t){var i=this._eventHandlers[n];if(i&&i.length>0)for(var r=0;r0){this._eventHandlers[n]=[];return!0}return!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},fireEvent:function(n){if(n.type==undefined)return!1;var t=n.type;if(t&&this._eventHandlers[t]){var i=this._eventHandlers[t];for(var r in i)i[r](n);return!0}else return!1},fireOrQueueEvent:function(n){var i=this,t=n.type;if(t&&i._eventHandlers[t]){var u=i._eventHandlers[t],r=i._queuedEventsArgs[t];u.length==0?r.push(n):i.fireEvent(n);return!0}else return!1},fireQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var i=this._eventHandlers[n],t=this._queuedEventsArgs[n];if(i.length>0){for(var u=i[0];t.length>0;){var r=t.shift();u(r)}return!0}}return!1}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OlkItemSelectedChanged:r=new OSF.DDA.OlkItemSelectedChangedEventArgs(t);break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler"});OSF.DDA.UI.ParentUI=function(){var i=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived]),t=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];t(arguments,i,n)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(){var t=OSF.DDA.SyncMethodNames.MessageParent.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return t(arguments,n)}});OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(n){n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:n[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[],onSucceeded:function(n){var f=n[Microsoft.Office.WebExtension.Parameters.Id],i=n[Microsoft.Office.WebExtension.Parameters.Data],t=new OSF.DialogHandler,u=OSF.DDA.AsyncMethodNames.CloseAsync.displayName;OSF.OUtil.defineEnumerableProperty(t,u,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];n(arguments,f,i,t)}});var r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;OSF.OUtil.defineEnumerableProperty(t,r,{value:function(){var f=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],n=f.verifyAndExtractCall(arguments,t,i),u=n[Microsoft.Office.WebExtension.Parameters.EventType],r=n[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(u,r)}});return t},checkCallArgs:function(n){n[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Width]=1);n[Microsoft.Office.WebExtension.Parameters.Width]>100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99);n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1);n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99);return n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(n){try{n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,n);OSF.ClientHostController.openDialog(n.dispId,n.targetId,function(t,i){n.onEvent&&n.onEvent(i);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(n){n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,n);try{OSF.ClientHostController.closeDialog(n.dispId,n.targetId,t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.messageParent=function(n){try{n.onCalling&&n.onCalling();var i=+new Date,t=OSF.ClientHostController.messageParent(n.hostCallArgs);n.onReceiving&&n.onReceiving();OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs(+new Date-i),t);return t}catch(r){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(r)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{OlkItemSelectedChanged:"olkItemSelectedChanged"});OSF.DDA.OlkItemSelectedChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.OlkItemSelectedChanged},mailbox:{value:n}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidOlkItemSelectedChangedEvent});var OSFLog;(function(n){var u="ResponseTime",f="Message",r="SessionId",i="CorrelationId",t=!0,e=function(){function n(n){this._table=n;this._fields={}}Object.defineProperty(n.prototype,"Fields",{get:function(){return this._fields},enumerable:t,configurable:t});Object.defineProperty(n.prototype,"Table",{get:function(){return this._table},enumerable:t,configurable:t});n.prototype.SerializeFields=function(){};n.prototype.SetSerializedField=function(n,t){typeof t!="undefined"&&t!==null&&(this._serializedFields[n]=t.toString())};n.prototype.SerializeRow=function(){var n=this;n._serializedFields={};n.SetSerializedField("Table",n._table);n.SerializeFields();return JSON.stringify(n._serializedFields)};return n}();n.BaseUsageData=e;var c=function(n){var w="DocUrl",y="AppSizeHeight",v="AppSizeWidth",a="ClientId",b="HostVersion",h="Host",p="UserId",s="Browser",o="AssetId",e="AppURL",l="AppInstanceId",c="AppId";__extends(u,n);function u(){n.call(this,"AppActivated")}Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,c,{get:function(){return this.Fields[c]},set:function(n){this.Fields[c]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,l,{get:function(){return this.Fields[l]},set:function(n){this.Fields[l]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,p,{get:function(){return this.Fields[p]},set:function(n){this.Fields[p]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,b,{get:function(){return this.Fields[b]},set:function(n){this.Fields[b]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,a,{get:function(){return this.Fields[a]},set:function(n){this.Fields[a]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,v,{get:function(){return this.Fields[v]},set:function(n){this.Fields[v]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,y,{get:function(){return this.Fields[y]},set:function(n){this.Fields[y]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,w,{get:function(){return this.Fields[w]},set:function(n){this.Fields[w]=n},enumerable:t,configurable:t});u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(c,n.AppId);n.SetSerializedField(l,n.AppInstanceId);n.SetSerializedField(e,n.AppURL);n.SetSerializedField(o,n.AssetId);n.SetSerializedField(s,n.Browser);n.SetSerializedField(p,n.UserId);n.SetSerializedField(h,n.Host);n.SetSerializedField(b,n.HostVersion);n.SetSerializedField(a,n.ClientId);n.SetSerializedField(v,n.AppSizeWidth);n.SetSerializedField(y,n.AppSizeHeight);n.SetSerializedField(f,n.Message);n.SetSerializedField(w,n.DocUrl)};return u}(e);n.AppActivatedUsageData=c;var l=function(n){var e="StartTime",o="ScriptId";__extends(f,n);function f(){n.call(this,"ScriptLoad")}Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t});f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(o,n.ScriptId);n.SetSerializedField(e,n.StartTime);n.SetSerializedField(u,n.ResponseTime)};return f}(e);n.ScriptLoadUsageData=l;var h=function(n){var h="CloseMethod",s="OpenTime",e="AppSizeFinalHeight",o="AppSizeFinalWidth",f="FocusTime";__extends(u,n);function u(){n.call(this,"AppClosed")}Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t});u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(f,n.FocusTime);n.SetSerializedField(o,n.AppSizeFinalWidth);n.SetSerializedField(e,n.AppSizeFinalHeight);n.SetSerializedField(s,n.OpenTime);n.SetSerializedField(h,n.CloseMethod)};return u}(e);n.AppClosedUsageData=h;var o=function(n){var s="ErrorType",o="Parameters",h="APIID",e="APIType";__extends(f,n);function f(){n.call(this,"APIUsage")}Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t});f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(e,n.APIType);n.SetSerializedField(h,n.APIID);n.SetSerializedField(o,n.Parameters);n.SetSerializedField(u,n.ResponseTime);n.SetSerializedField(s,n.ErrorType)};return f}(e);n.APIUsageUsageData=o;var s=function(n){var e="SuccessCode";__extends(u,n);function u(){n.call(this,"AppInitialization")}Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t});u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(e,n.SuccessCode);n.SetSerializedField(f,n.Message)};return u}(e);n.AppInitializationUsageData=s})(OSFLog||(OSFLog={}));var Logger;(function(n){"use strict";(function(n){n[n.info=0]="info";n[n.warning=1]="warning";n[n.error=2]="error"})(n.TraceLevel||(n.TraceLevel={}));var f=n.TraceLevel;(function(n){n[n.none=0]="none";n[n.flush=1]="flush"})(n.SendFlag||(n.SendFlag={}));var e=n.SendFlag;function u(){OSF.Logger&&OSF.Logger.ulsEndpoint&&OSF.Logger.ulsEndpoint.loadProxyFrame()}n.allowUploadingData=u;function t(n,t,i){if(OSF.Logger&&OSF.Logger.ulsEndpoint){var u={traceLevel:n,message:t,flag:i,internalLog:!0},r=JSON.stringify(u);OSF.Logger.ulsEndpoint.writeLog(r)}}n.sendLog=t;function i(){try{return new r}catch(n){return null}}var r=function(){function n(){var n=this,t=n;n.proxyFrame=null;n.telemetryEndPoint="https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html";n.buffer=[];n.proxyFrameReady=!1;OSF.OUtil.addEventListener(window,"message",function(n){return t.tellProxyFrameReady(n)});setTimeout(function(){t.loadProxyFrame()},3e3)}n.prototype.writeLog=function(t){var i=this;i.proxyFrameReady===!0?i.proxyFrame.contentWindow.postMessage(t,n.telemetryOrigin):i.buffer.length<128&&i.buffer.push(t)};n.prototype.loadProxyFrame=function(){var n=this;if(n.proxyFrame==null){n.proxyFrame=document.createElement("iframe");n.proxyFrame.setAttribute("style","display:none");n.proxyFrame.setAttribute("src",n.telemetryEndPoint);document.head.appendChild(n.proxyFrame)}};n.prototype.tellProxyFrameReady=function(t){var i=this,e=i;if(t.data==="ProxyFrameReadyToLog"){i.proxyFrameReady=!0;for(var r=0;r40){n=OSF.OUtil.Guid.generateNewGuid();t.setValue(t.clientIDKey,n)}return n};n.prototype.saveLog=function(n,t){var r=this,i=r.getValue(r.logIdSetKey);i=(i&&i.length>0?i+";":"")+n;r.setValue(r.logIdSetKey,i);r.setValue(n,t)};n.prototype.enumerateLog=function(n,t){var i=this,f=i.getValue(i.logIdSetKey);if(f){var e=f.split(";");for(var o in e){var r=e[o],u=i.getValue(r);if(u){n&&n(r,u);t&&i.remove(r)}}t&&i.remove(i.logIdSetKey)}};n.prototype.getValue=function(n){var i=OSF.OUtil.getLocalStorage(),t="";i&&(t=i.getItem(n));return t};n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)};n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}};return n}(),f=function(){function n(){}n.prototype.LogData=function(n){OSF.Logger&&OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n.SerializeRow(),OSF.Logger.SendFlag.none)};n.prototype.LogRawData=function(n){OSF.Logger&&OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n,OSF.Logger.SendFlag.none)};return n}();function w(u){if(OSF.Logger&&!t){t=new b;t.hostVersion=u.get_appVersion();t.appId=u.get_id();t.host=u.get_appName();t.browser=window.navigator.userAgent;t.correlationId=u.get_correlationId();t.clientId=(new o).getClientId();t.appInstanceId=u.get_appInstanceId();t.appInstanceId&&(t.appInstanceId=t.appInstanceId.replace(/[{}]/g,"").toLowerCase());t.message=u.get_hostCustomMessage();var e=u.get_docUrl();t.docUrl=k.test(e)?e:"";var f=location.href.indexOf("?");t.appURL=f==-1?location.href:location.href.substring(0,f);(function(n,t){var f,u,r;t.assetId="";t.userId="";try{f=decodeURIComponent(n);u=new DOMParser;r=u.parseFromString(f,"text/xml");t.userId=r.getElementsByTagName("t")[0].attributes.getNamedItem("cid").nodeValue;t.assetId=r.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(e){}finally{f=i;r=i;u=i}})(u.get_eToken(),t);(function(){var c=new Date,u=i,o=0,h=!1,f=function(){if(document.hasFocus())u==i&&(u=new Date);else if(u){o+=Math.abs(+new Date-u.getTime());u=i}},t=[];t.push(new r("focus",f));t.push(new r("blur",f));t.push(new r("focusout",f));t.push(new r("focusin",f));var s=function(){for(var r=0;r6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix){i=new Date(parseInt(t.slice(5,-1)));if(i)return i}return t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,!0);r[i]=t}catch(u){}}return r}};OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(n,t,i){Type.registerNamespace("Microsoft.Office.WebExtension.MailboxEnums");Microsoft.Office.WebExtension.MailboxEnums.EntityType={MeetingSuggestion:"meetingSuggestion",TaskSuggestion:"taskSuggestion",Address:"address",EmailAddress:"emailAddress",Url:"url",PhoneNumber:"phoneNumber",Contact:"contact",FlightReservations:"flightReservations",ParcelDeliveries:"parcelDeliveries"};Microsoft.Office.WebExtension.MailboxEnums.ItemType={Message:"message",Appointment:"appointment"};Microsoft.Office.WebExtension.MailboxEnums.ResponseType={None:"none",Organizer:"organizer",Tentative:"tentative",Accepted:"accepted",Declined:"declined"};Microsoft.Office.WebExtension.MailboxEnums.RecipientType={Other:"other",DistributionList:"distributionList",User:"user",ExternalUser:"externalUser"};Microsoft.Office.WebExtension.MailboxEnums.AttachmentType={File:"file",Item:"item",Cloud:"cloud"};Microsoft.Office.WebExtension.MailboxEnums.BodyType={Text:"text",Html:"html"};Microsoft.Office.WebExtension.MailboxEnums.ItemNotificationMessageType={ProgressIndicator:"progressIndicator",InformationalMessage:"informationalMessage",ErrorMessage:"errorMessage"};Microsoft.Office.WebExtension.CoercionType={Text:"text",Html:"html"};Microsoft.Office.WebExtension.MailboxEnums.UserProfileType={Office365:"office365",OutlookCom:"outlookCom",Enterprise:"enterprise"};Microsoft.Office.WebExtension.MailboxEnums.RestVersion={v1_0:"v1.0",v2_0:"v2.0",Beta:"beta"};Microsoft.Office.WebExtension.MailboxEnums.ModuleType={Addins:"addins"};Type.registerNamespace("OSF.DDA");var u=window.OSF||{};u.DDA=u.DDA||{};window.OSF.DDA.OutlookAppOm=u.DDA.OutlookAppOm=function(n,t,i){this.$$d_navigateToModuleAsync=Function.createDelegate(this,this.navigateToModuleAsync);this.$$d_displayPersonaCardAsync=Function.createDelegate(this,this.displayPersonaCardAsync);this.$$d_displayNewMessageFormApi=Function.createDelegate(this,this.displayNewMessageFormApi);this.$$d__displayNewAppointmentFormApi$p$0=Function.createDelegate(this,this._displayNewAppointmentFormApi$p$0);this.$$d_windowOpenOverrideHandler=Function.createDelegate(this,this.windowOpenOverrideHandler);this.$$d__getRestUrl$p$0=Function.createDelegate(this,this._getRestUrl$p$0);this.$$d__getEwsUrl$p$0=Function.createDelegate(this,this._getEwsUrl$p$0);this.$$d__getDiagnostics$p$0=Function.createDelegate(this,this._getDiagnostics$p$0);this.$$d__getUserProfile$p$0=Function.createDelegate(this,this._getUserProfile$p$0);this.$$d__getItem$p$0=Function.createDelegate(this,this._getItem$p$0);this.$$d__callAppReadyCallback$p$0=Function.createDelegate(this,this._callAppReadyCallback$p$0);this.$$d__getInitialDataResponseHandler$p$0=Function.createDelegate(this,this._getInitialDataResponseHandler$p$0);window.OSF.DDA.OutlookAppOm._instance$p=this;this._officeAppContext$p$0=n;this._appReadyCallback$p$0=i;var r=this;var u=function(){i&&(n.get_isDialog()?window.setTimeout(r.$$d__callAppReadyCallback$p$0,0):r.invokeHostMethod(1,null,r.$$d__getInitialDataResponseHandler$p$0))};this._areStringsLoaded$p$0()?u():this._loadLocalizedScript$p$0(u)};window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i=function(n){if(!n)throw Error.create(window._u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text);};window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i=function(n,t,i,r){if(ni)throw Error.argumentOutOfRange(r);};window.OSF.DDA.OutlookAppOm._throwOnInvalidModule$p=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("module");else if(n==="")throw Error.argument("module","module cannot be empty.");if(n!==window.Microsoft.Office.WebExtension.MailboxEnums.ModuleType.Addins)throw Error.notImplemented(String.format("API not supported for module '{0}'",n));};window.OSF.DDA.OutlookAppOm._getHtmlBody$p=function(n){var t="";if("htmlBody"in n){window.OSF.DDA.OutlookAppOm._throwOnInvalidHtmlBody$p(n.htmlBody);t=n.htmlBody}return t};window.OSF.DDA.OutlookAppOm._getAttachments$p=function(n){var t=[];if("attachments"in n){t=n.attachments;window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentsArray$p(t)}return t};window.OSF.DDA.OutlookAppOm._getOptionsAndCallback$p=function(n){var t=[];"options"in n&&(t[0]=n.options);"callback"in n&&(t[t.length]=n.callback);return t};window.OSF.DDA.OutlookAppOm._createAttachmentsDataForHost$p=function(n){var r=new Array(0);if(Array.isInstanceOfType(n))for(var t=0;t2048)throw Error.argumentOutOfRange("attachments",n.length,window._u.ExtensibilityStrings.l_AttachmentUrlTooLong_Text);window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentName$p(t)};window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentItemIdOrName$p=function(n,t){if(!String.isInstanceOfType(n)||!String.isInstanceOfType(t))throw Error.argument("attachments");if(n.length>200)throw Error.argumentOutOfRange("attachments",n.length,window._u.ExtensibilityStrings.l_AttachmentItemIdTooLong_Text);window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentName$p(t)};window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentName$p=function(n){if(n.length>255)throw Error.argumentOutOfRange("attachments",n.length,window._u.ExtensibilityStrings.l_AttachmentNameTooLong_Text);};window.OSF.DDA.OutlookAppOm._throwOnInvalidRestVersion$p=function(n){if(!n)throw Error.argumentNull("restVersion");if(n!==window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v1_0&&n!==window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v2_0&&n!==window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.Beta)throw Error.argument("restVersion");};window.OSF.DDA.OutlookAppOm.getItemIdBasedOnHost=function(n){return window.OSF.DDA.OutlookAppOm._instance$p._initialData$p$0&&window.OSF.DDA.OutlookAppOm._instance$p._initialData$p$0.get__isRestIdSupported$i$0()?window.OSF.DDA.OutlookAppOm._instance$p.convertToRestId(n,window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v1_0):window.OSF.DDA.OutlookAppOm._instance$p.convertToEwsId(n,window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v1_0)};window.OSF.DDA.OutlookAppOm.addAdditionalArgs=function(n,t){return t};window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p=function(n,t,i){if(Object.getType(n)!==t)throw Error.argumentType(i);};window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p=function(n,t,i,u){if(!r.ScriptHelpers.isNullOrUndefined(n)){window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(n,String,u);var f=n;window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(f.length,t,i,u)}};window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p=function(n){return n?n.join(";"):null};window.OSF.DDA.OutlookAppOm._convertComposeEmailDictionaryParameterForSetApi$p=function(n){if(!n)return null;for(var i=new Array(n.length),t=0;t1&&f[1]){r.error=!0;r.errorCode=f[1]}else r.error=!1;i(t,r)}else if(Number.isInstanceOfType(u)){var e={};e.error=!0;e.errorCode=u;i(t,e)}else throw Error.notImplemented("Return data type from host must be Dictionary or int");}})}},_dictionaryToDate$i$0:function(n){var t=new Date(n.year,n.month,n.date,n.hours,n.minutes,n.seconds,n.milliseconds?n.milliseconds:0);if(window.isNaN(t.getTime()))throw Error.format(window._u.ExtensibilityStrings.l_InvalidDate_Text);return t},_dateToDictionary$i$0:function(n){var t={};t.month=n.getMonth();t.date=n.getDate();t.year=n.getFullYear();t.hours=n.getHours();t.minutes=n.getMinutes();t.seconds=n.getSeconds();t.milliseconds=n.getMilliseconds();return t},_isOwaOnlyMethod$p$0:function(n){switch(n){case 402:case 401:case 400:case 403:return!0;default:return!1}},isOutlook16OrGreater:function(){var n=this._initialData$p$0.get__hostVersion$i$0();var i=0;var t=0;if(n){i=n.indexOf(".");t=window.parseInt(n.substring(0,i))}return t>=16},convertToOutlookParameters:function(n,t){var i=null;var u={};switch(n){case 1:case 2:case 3:case 14:case 18:case 26:case 32:case 41:case 34:break;case 12:u.isRest=t.isRest;break;case 4:var f=window.JSON.stringify(t.customProperties);i=[f];break;case 5:i=[t.body];break;case 8:case 9:i=[t.itemId];break;case 7:i=[window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.requiredAttendees),window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.optionalAttendees),t.start,t.end,t.location,window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.resources),t.subject,t.body];break;case 44:i=[window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.toRecipients),window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.ccRecipients),window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.bccRecipients),t.subject,t.htmlBody,t.attachments];break;case 43:i=[t.ewsIdOrEmail];break;case 45:i=[t.module,t.queryString];break;case 40:i=[t.extensionId,t.consentState];break;case 11:case 10:i=[t.htmlBody];break;case 31:case 30:i=[t.htmlBody,t.attachments];break;case 23:case 13:case 38:case 29:i=[t.data,t.coercionType];break;case 37:case 28:i=[t.coercionType];break;case 17:i=[t.subject];break;case 15:i=[t.recipientField];break;case 22:case 21:i=[t.recipientField,window.OSF.DDA.OutlookAppOm._convertComposeEmailDictionaryParameterForSetApi$p(t.recipientArray)];break;case 19:i=[t.itemId,t.name];break;case 16:i=[t.uri,t.name,t.isInline];break;case 20:i=[t.attachmentIndex];break;case 25:i=[t.TimeProperty,t.time];break;case 24:i=[t.TimeProperty];break;case 27:i=[t.location];break;case 33:case 35:i=[t.key,t.type,t.persistent,t.message,t.icon];break;case 36:i=[t.key];break;default:break}if(n!==1){var r;this._additionalOutlookParams$p$0.updateOutlookExecuteParameters(r={val:i},u),i=r.val}return i},_displayNewAppointmentFormApi$p$0:function(n){var f=window.OSF.DDA.OutlookAppOm._validateAndNormalizeRecipientEmails$p(n.requiredAttendees,"requiredAttendees");var u=window.OSF.DDA.OutlookAppOm._validateAndNormalizeRecipientEmails$p(n.optionalAttendees,"optionalAttendees");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(n.location,0,window.OSF.DDA.OutlookAppOm._maxLocationLength$p,"location");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(n.body,0,window.OSF.DDA.OutlookAppOm.maxBodyLength,"body");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(n.subject,0,window.OSF.DDA.OutlookAppOm._maxSubjectLength$p,"subject");if(!r.ScriptHelpers.isNullOrUndefined(n.start)){window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(n.start,Date,"start");var s=n.start;n.start=s.getTime();if(!r.ScriptHelpers.isNullOrUndefined(n.end)){window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(n.end,Date,"end");var i=n.end;if(i=0&&n.getTime()-u<0)return window.parseInt(t.offset)}throw Error.format(window._u.ExtensibilityStrings.l_InvalidDate_Text);},_areStringsLoaded$p$0:function(){var n=!1;try{n=!r.ScriptHelpers.isNullOrUndefined(window._u.ExtensibilityStrings.l_EwsRequestOversized_Text)}catch(t){}return n},_loadLocalizedScript$p$0:function(n){for(var s=null,l="",a=document.getElementsByTagName("script"),o=a.length-1;o>=0;o--){var i=null;var v=a[o].attributes;if(v){var p=v.getNamedItem("src");p&&(i=p.value);if(i){var y=!1;i=i.toLowerCase();var f=i.indexOf("office_strings.js");if(f<0){f=i.indexOf("office_strings.debug.js");y=!0}if(f>0&&fu+1&&(l=r.substring(0,u+1));break}}}}if(s){var h=document.getElementsByTagName("head")[0];var t=null;var b=this;var e=function(){if(n&&(!t.readyState||t.readyState&&(t.readyState==="loaded"||t.readyState==="complete"))){t.onload=null;t.onreadystatechange=null;n()}};var c=this;var w=function(){if(!c._areStringsLoaded$p$0()){var n=l+"en-us/"+"outlook_strings.js";t.onload=null;t.onreadystatechange=null;t=c._createScriptElement$p$0(n);t.onload=e;t.onreadystatechange=e;h.appendChild(t)}};t=this._createScriptElement$p$0(s);t.onload=e;t.onreadystatechange=e;window.setTimeout(w,2e3);h.appendChild(t)}},_createScriptElement$p$0:function(n){var t=document.createElement("script");t.type="text/javascript";t.src=n;return t}};u.DDA.OutlookAppOm.prototype.initialize=function(n){var t="itemType";this._initialData$p$0=new r.InitialData(n);this._hostItemType$p$0=n[t];1===n[t]?this._item$p$0=new r.Message(this._initialData$p$0):3===n[t]?this._item$p$0=new r.MeetingRequest(this._initialData$p$0):2===n[t]?this._item$p$0=new r.Appointment(this._initialData$p$0):4===n[t]?this._item$p$0=new r.MessageCompose(this._initialData$p$0):5===n[t]?this._item$p$0=new r.AppointmentCompose(this._initialData$p$0):6===n[t];this._userProfile$p$0=new r.UserProfile(this._initialData$p$0);this._diagnostics$p$0=new r.Diagnostics(this._initialData$p$0,this._officeAppContext$p$0.get_appName());var i=window.OSF.DDA.OutlookAppOm._instance$p.get__appName$i$0()!==8||this.isOutlook16OrGreater();this._additionalOutlookParams$p$0=new r.AdditionalGlobalParameters(i);this._initializeMethods$p$0();r.InitialData._defineReadOnlyProperty$i(this,"item",this.$$d__getItem$p$0);r.InitialData._defineReadOnlyProperty$i(this,"userProfile",this.$$d__getUserProfile$p$0);r.InitialData._defineReadOnlyProperty$i(this,"diagnostics",this.$$d__getDiagnostics$p$0);r.InitialData._defineReadOnlyProperty$i(this,"ewsUrl",this.$$d__getEwsUrl$p$0);r.InitialData._defineReadOnlyProperty$i(this,"restUrl",this.$$d__getRestUrl$p$0);window.OSF.DDA.OutlookAppOm._instance$p.get__appName$i$0()===64&&this._initialData$p$0.get__overrideWindowOpen$i$0()&&(window.open=this.$$d_windowOpenOverrideHandler)};u.DDA.OutlookAppOm.prototype.makeEwsRequestAsync=function(n){for(var u=[],i=1;iwindow.OSF.DDA.OutlookAppOm._maxEwsRequestSize$p)throw Error.argument("data",window._u.ExtensibilityStrings.l_EwsRequestOversized_Text);this._throwOnMethodCallForInsufficientPermission$i$0(3,"makeEwsRequestAsync");var f=r.CommonParameters.parse(u,!0,!0);var t=new r.EwsRequest(f._asyncContext$p$0);var e=this;t.onreadystatechange=function(){4===t.get__requestState$i$1()&&f._callback$p$0(t._asyncResult$p$0)};t.send(n)};u.DDA.OutlookAppOm.prototype.recordDataPoint=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");this.invokeHostMethod(402,n,null)};u.DDA.OutlookAppOm.prototype.recordTrace=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");this.invokeHostMethod(401,n,null)};u.DDA.OutlookAppOm.prototype.trackCtq=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");this.invokeHostMethod(400,n,null)};u.DDA.OutlookAppOm.prototype.convertToLocalClientTime=function(n){var t=new Date(n.getTime());var i=t.getTimezoneOffset()*-1;if(this._initialData$p$0&&this._initialData$p$0.get__timeZoneOffsets$i$0()){t.setUTCMinutes(t.getUTCMinutes()-i);i=this._findOffset$p$0(t);t.setUTCMinutes(t.getUTCMinutes()+i)}var r=this._dateToDictionary$i$0(t);r.timezoneOffset=i;return r};u.DDA.OutlookAppOm.prototype.convertToUtcClientTime=function(n){var t=this._dictionaryToDate$i$0(n);if(this._initialData$p$0&&this._initialData$p$0.get__timeZoneOffsets$i$0()){var i=this._findOffset$p$0(t);t.setUTCMinutes(t.getUTCMinutes()-i);i=n.timezoneOffset?n.timezoneOffset:t.getTimezoneOffset()*-1;t.setUTCMinutes(t.getUTCMinutes()+i)}return t};u.DDA.OutlookAppOm.prototype.convertToRestId=function(n,t){if(!n)throw Error.argumentNull("itemId");window.OSF.DDA.OutlookAppOm._throwOnInvalidRestVersion$p(t);return n.replace(new RegExp("[/]","g"),"-").replace(new RegExp("[+]","g"),"_")};u.DDA.OutlookAppOm.prototype.convertToEwsId=function(n,t){if(!n)throw Error.argumentNull("itemId");window.OSF.DDA.OutlookAppOm._throwOnInvalidRestVersion$p(t);return n.replace(new RegExp("[-]","g"),"/").replace(new RegExp("[_]","g"),"+")};u.DDA.OutlookAppOm.prototype.getUserIdentityTokenAsync=function(){for(var i=[],n=0;n32768){var f=window.OSF.DDA.OutlookAppOm._instance$p.createAsyncResult(null,1,9019,n._asyncContext$p$0,"");var e=this;window.setTimeout(function(){n._callback$p$0(f)},0);return}window.OSF.DDA.OutlookAppOm._instance$p.get__appName$i$0()===64?this._saveSettingsForOwa$p$0(n._callback$p$0,n._asyncContext$p$0):this._saveSettingsForOutlook$p$0(n._callback$p$0,n._asyncContext$p$0)};Type.registerNamespace("$h");var r=window.$h||{};Type.registerNamespace("Office.cast");var f=window.Office||{};f.cast=f.cast||{};r.AdditionalGlobalParameters=function(n){this._parameterBlobSupported$p$0=n;this._itemNumber$p$0=0};r.AdditionalGlobalParameters.prototype={_parameterBlobSupported$p$0:!1,_itemNumber$p$0:0,setCurrentItemNumber:function(n){n>0&&(this._itemNumber$p$0=n)},updateOutlookExecuteParameters:function(n,t){if(this._parameterBlobSupported$p$0){this._itemNumber$p$0>0&&(t.itemNumber=this._itemNumber$p$0.toString());if(!Object.keys(t).length)return;n.val||(n.val=[]);n.val.push(window.JSON.stringify(t))}}};r.Appointment=function(n){this.$$d__getOrganizer$p$2=Function.createDelegate(this,this._getOrganizer$p$2);this.$$d__getNormalizedSubject$p$2=Function.createDelegate(this,this._getNormalizedSubject$p$2);this.$$d__getSubject$p$2=Function.createDelegate(this,this._getSubject$p$2);this.$$d__getResources$p$2=Function.createDelegate(this,this._getResources$p$2);this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2);this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2);this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2);this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2);this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2);r.Appointment.initializeBase(this,[n]);r.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2);r.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2);r.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2);r.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"resources",this.$$d__getResources$p$2);r.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2);r.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2);r.InitialData._defineReadOnlyProperty$i(this,"organizer",this.$$d__getOrganizer$p$2)};r.Appointment.prototype={getItemType:function(){return window.Microsoft.Office.WebExtension.MailboxEnums.ItemType.Appointment},_getStart$p$2:function(){return this._data$p$0.get__start$i$0()},_getEnd$p$2:function(){return this._data$p$0.get__end$i$0()},_getLocation$p$2:function(){return this._data$p$0.get__location$i$0()},_getOptionalAttendees$p$2:function(){return this._data$p$0.get__cc$i$0()},_getRequiredAttendees$p$2:function(){return this._data$p$0.get__to$i$0()},_getResources$p$2:function(){return this._data$p$0.get__resources$i$0()},_getSubject$p$2:function(){return this._data$p$0.get__subject$i$0()},_getNormalizedSubject$p$2:function(){return this._data$p$0.get__normalizedSubject$i$0()},_getOrganizer$p$2:function(){return this._data$p$0.get__organizer$i$0()}};r.Appointment.prototype.getEntities=function(){return this._data$p$0._getEntities$i$0()};r.Appointment.prototype.getEntitiesByType=function(n){return this._data$p$0._getEntitiesByType$i$0(n)};r.Appointment.prototype.getSelectedEntities=function(){return this._data$p$0._getSelectedEntities$i$0()};r.Appointment.prototype.getRegExMatches=function(){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches");return this._data$p$0._getRegExMatches$i$0()};r.Appointment.prototype.getFilteredEntitiesByName=function(n){return this._data$p$0._getFilteredEntitiesByName$i$0(n)};r.Appointment.prototype.getRegExMatchesByName=function(n){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName");return this._data$p$0._getRegExMatchesByName$i$0(n)};r.Appointment.prototype.getSelectedRegExMatches=function(){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedRegExMatches");return this._data$p$0._getSelectedRegExMatches$i$0()};r.Appointment.prototype.displayReplyForm=function(n){window.OSF.DDA.OutlookAppOm._instance$p._displayReplyForm$i$0(n)};r.Appointment.prototype.displayReplyAllForm=function(n){window.OSF.DDA.OutlookAppOm._instance$p._displayReplyAllForm$i$0(n)};r.AppointmentCompose=function(n){this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2);this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2);this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2);this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2);this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2);r.AppointmentCompose.initializeBase(this,[n]);r.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2);r.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2);r.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2)};r.AppointmentCompose.prototype={_requiredAttendees$p$2:null,_optionalAttendees$p$2:null,_start$p$2:null,_end$p$2:null,_location$p$2:null,getItemType:function(){return window.Microsoft.Office.WebExtension.MailboxEnums.ItemType.Appointment},_getRequiredAttendees$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._requiredAttendees$p$2||(this._requiredAttendees$p$2=new r.ComposeRecipient(0,"requiredAttendees"));return this._requiredAttendees$p$2},_getOptionalAttendees$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._optionalAttendees$p$2||(this._optionalAttendees$p$2=new r.ComposeRecipient(1,"optionalAttendees"));return this._optionalAttendees$p$2},_getStart$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._start$p$2||(this._start$p$2=new r.ComposeTime(1));return this._start$p$2},_getEnd$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._end$p$2||(this._end$p$2=new r.ComposeTime(2));return this._end$p$2},_getLocation$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._location$p$2||(this._location$p$2=new r.ComposeLocation);return this._location$p$2}};r.AttachmentConstants=function(){};r.AttachmentDetails=function(n){this.$$d__getIsInline$p$0=Function.createDelegate(this,this._getIsInline$p$0);this.$$d__getAttachmentType$p$0=Function.createDelegate(this,this._getAttachmentType$p$0);this.$$d__getSize$p$0=Function.createDelegate(this,this._getSize$p$0);this.$$d__getContentType$p$0=Function.createDelegate(this,this._getContentType$p$0);this.$$d__getName$p$0=Function.createDelegate(this,this._getName$p$0);this.$$d__getId$p$0=Function.createDelegate(this,this._getId$p$0);this._data$p$0=n;r.InitialData._defineReadOnlyProperty$i(this,"id",this.$$d__getId$p$0);r.InitialData._defineReadOnlyProperty$i(this,"name",this.$$d__getName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"contentType",this.$$d__getContentType$p$0);r.InitialData._defineReadOnlyProperty$i(this,"size",this.$$d__getSize$p$0);r.InitialData._defineReadOnlyProperty$i(this,"attachmentType",this.$$d__getAttachmentType$p$0);r.InitialData._defineReadOnlyProperty$i(this,"isInline",this.$$d__getIsInline$p$0)};r.AttachmentDetails.prototype={_data$p$0:null,_getId$p$0:function(){return this._data$p$0.id},_getName$p$0:function(){return this._data$p$0.name},_getContentType$p$0:function(){return this._data$p$0.contentType},_getSize$p$0:function(){return this._data$p$0.size},_getAttachmentType$p$0:function(){var n=this._data$p$0.attachmentType;return n255)throw Error.argumentOutOfRange("recipients",n.length,window._u.ExtensibilityStrings.l_DisplayNameTooLong_Text);if(t&&t.length>571)throw Error.argumentOutOfRange("recipients",t.length,window._u.ExtensibilityStrings.l_EmailAddressTooLong_Text);};r.ComposeRecipient._getAsyncFormatter$p=function(n){for(var u=n,i=[],t=0;t864e13)throw Error.argumentOutOfRange("dateTime");var i=r.CommonParameters.parse(u,!1);window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(25,{TimeProperty:this._timeType$p$0,time:n.getTime()},null,i._asyncContext$p$0,i._callback$p$0)};r.ComposeTime.TimeType=function(){};r.ComposeTime.TimeType.prototype={start:1,end:2};r.ComposeTime.TimeType.registerEnum("$h.1",!1);r.Contact=function(n){this.$$d__getContactString$p$0=Function.createDelegate(this,this._getContactString$p$0);this.$$d__getAddresses$p$0=Function.createDelegate(this,this._getAddresses$p$0);this.$$d__getUrls$p$0=Function.createDelegate(this,this._getUrls$p$0);this.$$d__getEmailAddresses$p$0=Function.createDelegate(this,this._getEmailAddresses$p$0);this.$$d__getPhoneNumbers$p$0=Function.createDelegate(this,this._getPhoneNumbers$p$0);this.$$d__getBusinessName$p$0=Function.createDelegate(this,this._getBusinessName$p$0);this.$$d__getPersonName$p$0=Function.createDelegate(this,this._getPersonName$p$0);this._data$p$0=n;r.InitialData._defineReadOnlyProperty$i(this,"personName",this.$$d__getPersonName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"businessName",this.$$d__getBusinessName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0);r.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0);r.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0);r.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0);r.InitialData._defineReadOnlyProperty$i(this,"contactString",this.$$d__getContactString$p$0)};r.Contact.prototype={_data$p$0:null,_phoneNumbers$p$0:null,_getPersonName$p$0:function(){return this._data$p$0.PersonName},_getBusinessName$p$0:function(){return this._data$p$0.BusinessName},_getAddresses$p$0:function(){return r.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses")},_getEmailAddresses$p$0:function(){return r.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses")},_getUrls$p$0:function(){return r.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls")},_getPhoneNumbers$p$0:function(){if(!this._phoneNumbers$p$0){var n=this;this._phoneNumbers$p$0=r.Entities._getExtractedObjects$i(r.PhoneNumber,this._data$p$0,"PhoneNumbers",function(n){return new r.PhoneNumber(n)})}return this._phoneNumbers$p$0},_getContactString$p$0:function(){return this._data$p$0.ContactString}};r.CustomProperties=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");if(Array.isInstanceOfType(n)){var t=n;if(t.length>0)this._data$p$0=t[0];else throw Error.argument("data");}else this._data$p$0=n};r.CustomProperties.prototype={_data$p$0:null};r.CustomProperties.prototype.get=function(n){var i=this._data$p$0[n];if(typeof i=="string"){var t=i;if(t.length>6&&t.startsWith("Date(")&&t.endsWith(")")){var f=t.substring(5,t.length-1);var r=window.parseInt(f);if(!window.isNaN(r)){var u=new Date(r);u&&(i=u)}}}return i};r.CustomProperties.prototype.set=function(n,t){window.OSF.OUtil.isDate(t)&&(t="Date("+t.getTime()+")");this._data$p$0[n]=t};r.CustomProperties.prototype.remove=function(n){delete this._data$p$0[n]};r.CustomProperties.prototype.saveAsync=function(){for(var i=[],n=0;nf)throw Error.argument();var t=r.CommonParameters.parse(i,!1,!0);var u=new r.SaveDictionaryRequest(t._callback$p$0,t._asyncContext$p$0);u._sendRequest$i$0(4,"SaveCustomProperties",{customProperties:this._data$p$0})};r.Diagnostics=function(n,t){this.$$d__getOwaView$p$0=Function.createDelegate(this,this._getOwaView$p$0);this.$$d__getHostVersion$p$0=Function.createDelegate(this,this._getHostVersion$p$0);this.$$d__getHostName$p$0=Function.createDelegate(this,this._getHostName$p$0);this._data$p$0=n;this._appName$p$0=t;r.InitialData._defineReadOnlyProperty$i(this,"hostName",this.$$d__getHostName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"hostVersion",this.$$d__getHostVersion$p$0);64===this._appName$p$0&&r.InitialData._defineReadOnlyProperty$i(this,"OWAView",this.$$d__getOwaView$p$0)};r.Diagnostics.prototype={_data$p$0:null,_appName$p$0:0,_getHostName$p$0:function(){switch(this._appName$p$0){case 8:return"Outlook";case 64:return"OutlookWebApp";case 65536:return"OutlookIOS";case 4194304:return"OutlookAndroid";default:return null}},_getHostVersion$p$0:function(){return this._data$p$0.get__hostVersion$i$0()},_getOwaView$p$0:function(){return this._data$p$0.get__owaView$i$0()}};r.EmailAddressDetails=function(n){this.$$d__getRecipientType$p$0=Function.createDelegate(this,this._getRecipientType$p$0);this.$$d__getAppointmentResponse$p$0=Function.createDelegate(this,this._getAppointmentResponse$p$0);this.$$d__getDisplayName$p$0=Function.createDelegate(this,this._getDisplayName$p$0);this.$$d__getEmailAddress$p$0=Function.createDelegate(this,this._getEmailAddress$p$0);this._data$p$0=n;r.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0);r.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0);r.ScriptHelpers.dictionaryContainsKey(n,"appointmentResponse")&&r.InitialData._defineReadOnlyProperty$i(this,"appointmentResponse",this.$$d__getAppointmentResponse$p$0);r.ScriptHelpers.dictionaryContainsKey(n,"recipientType")&&r.InitialData._defineReadOnlyProperty$i(this,"recipientType",this.$$d__getRecipientType$p$0)};r.EmailAddressDetails._createFromEmailUserDictionary$i=function(n){var t={};var u=n.Name;var i=n.UserId;t.name=u||r.EmailAddressDetails._emptyString$p;t.address=i||r.EmailAddressDetails._emptyString$p;return new r.EmailAddressDetails(t)};r.EmailAddressDetails.prototype={_data$p$0:null,_getEmailAddress$p$0:function(){return this._data$p$0.address},_getDisplayName$p$0:function(){return this._data$p$0.name},_getAppointmentResponse$p$0:function(){var n=this._data$p$0.appointmentResponse;return n=0;u--){for(var e=!1,f=u-1;f>=0;f--)if(i(t[u],t[f],r)){e=!0;break}e&&Array.removeAt(t,u)}return t};r.Entities.prototype={_dateTimeSent$p$0:null,_data$p$0:null,_filteredData$p$0:null,_filteredEntitiesCache$p$0:null,_permissionLevel$p$0:0,_taskSuggestions$p$0:null,_meetingSuggestions$p$0:null,_phoneNumbers$p$0:null,_contacts$p$0:null,_addresses$p$0:null,_emailAddresses$p$0:null,_urls$p$0:null,_flightReservations$p$0:null,_parcelDeliveries$p$0:null,_getByType$i$0:function(n){if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.MeetingSuggestion)return this._getMeetingSuggestions$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.TaskSuggestion)return this._getTaskSuggestions$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.Address)return this._getAddresses$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.PhoneNumber)return this._getPhoneNumbers$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.EmailAddress)return this._getEmailAddresses$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.Url)return this._getUrls$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.Contact)return this._getContacts$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.FlightReservations)return this._getFlightReservations$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.ParcelDeliveries)return this._getParcelDeliveries$p$0();return null},_getFilteredEntitiesByName$i$0:function(n){this._filteredEntitiesCache$p$0||(this._filteredEntitiesCache$p$0={});if(!r.ScriptHelpers.dictionaryContainsKey(this._filteredEntitiesCache$p$0,n)){for(var u=!1,i=0;i0)return new Date(n.getFullYear()+t._offset$i$1,0,1);break;default:break}return n};r.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p=function(n,t,i){if(t>-5&&t<5){var u=(i+6)%7+1;var r=7*t+(u-n.getDay());n.setDate(n.getDate()+r);return n}else{var r=(i-n.getDay())%7;r<0&&(r+=7);n.setDate(n.getDate()+r);return n}};r.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p=function(n,t){var e;var i;var u;e=n;if(t._tag$i$1<=0||t._tag$i$1>12||t._offset$i$1<=0||t._offset$i$1>5)return n;var o=(12+t._tag$i$1-e.getMonth()-1)%12;i=new Date(e.getFullYear(),e.getMonth()+o,1);if(t._modifier$i$1===1)if(t._offset$i$1===1&&i.getDay()!==6&&i.getDay())return i;else{u=new Date(i.getFullYear(),i.getMonth(),i.getDate());u.setDate(u.getDate()+(8-i.getDay())%7);i.getDay()!==6&&i.getDay()&&i.getDay()!==1&&u.setDate(u.getDate()-7);u.setDate(u.getDate()+7*(t._offset$i$1-1));return u.getMonth()+1!==t._tag$i$1?n:u}else{u=new Date(i.getFullYear(),i.getMonth(),r.MeetingSuggestionTimeDecoder._daysInMonth$p(i.getMonth(),i.getFullYear()));var f=1-u.getDay();f>0&&(f=f-7);u.setDate(u.getDate()+f);u.setDate(u.getDate()+7*(1-t._offset$i$1));return u.getMonth()+1!==t._tag$i$1?i.getDay()!==6&&i.getDay()?i:n:u}};r.MeetingSuggestionTimeDecoder._decode$p=function(n,t,i){var e=32767;t.val=null;i.val=0;if(!n)return!1;i.val=r.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p(n);var o=n.getTime()-i.val;var u=(o-r.MeetingSuggestionTimeDecoder._baseDate$p.getTime())/864e5;if(u<0)return!1;else if(u>=262144)return!1;else{var f=u>>15;u=u&e;switch(f){case 0:return r.MeetingSuggestionTimeDecoder._decodePreciseDate$p(u,t);case 1:return r.MeetingSuggestionTimeDecoder._decodeRelativeDate$p(u,t);default:return!1}}};r.MeetingSuggestionTimeDecoder._decodePreciseDate$p=function(n,t){var c=7;var o=15;var s=31;var h=127;var f=null;var u=0;var e=0;t.val=null;var i=n>>12&c;if((i&4)==4){f=n>>5&h;if((i&2)==2){if((i&1)==1)return!1;u=n>>1&o}}else{(i&2)==2&&(u=n>>8&o);(i&1)==1&&(e=n>>3&s)}t.val=new r._preciseDate(e,u,f);return!0};r.MeetingSuggestionTimeDecoder._decodeRelativeDate$p=function(n,t){var s=15;var o=63;var c=7;var h=3;var u=n&s;n>>=4;var i=r.MeetingSuggestionTimeDecoder._fromComplement$p(n&o,6);n>>=6;var e=n&c;n>>=3;var f=n&h;try{t.val=new r._relativeDate(f,i,e,u);return!0}catch(l){t.val=null;return!1}};r.MeetingSuggestionTimeDecoder._fromComplement$p=function(n,t){var i=1<2||!Function.isInstanceOfType(n[0]))return!1;f=n[0];i>1&&(u=n[1]);t.val=new r.CommonParameters(null,f,u);return!0};r.CommonParameters.prototype={_options$p$0:null,_callback$p$0:null,_asyncContext$p$0:null,get_options:function(){return this._options$p$0},get_callback:function(){return this._callback$p$0},get_asyncContext:function(){return this._asyncContext$p$0}};r.EwsRequest=function(n){r.EwsRequest.initializeBase(this,[n])};r.EwsRequest.prototype={readyState:1,status:0,statusText:null,onreadystatechange:null,responseText:null,get__statusCode$i$1:function(){return this.status},set__statusCode$i$1:function(n){this.status=n;return n},get__statusDescription$i$1:function(){return this.statusText},set__statusDescription$i$1:function(n){this.statusText=n;return n},get__requestState$i$1:function(){return this.readyState},set__requestState$i$1:function(n){this.readyState=n;return n},get_hasOnReadyStateChangeCallback:function(){return!r.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)},get__response$i$1:function(){return this.responseText},set__response$i$1:function(n){this.responseText=n;return n},send:function(n){this._checkSendConditions$i$1();r.ScriptHelpers.isNullOrUndefined(n)&&this._throwInvalidStateException$i$1();this._sendRequest$i$0(5,"EwsRequest",{body:n})},_callOnReadyStateChangeCallback$i$1:function(){r.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)||this.onreadystatechange()},_parseExtraResponseData$i$1:function(n){},executeExtraFailedResponseSteps:function(){}};r.InitialData=function(n){this._data$p$0=n;this._permissionLevel$p$0=this._calculatePermissionLevel$p$0()};r.InitialData._defineReadOnlyProperty$i=function(n,t,i){var r={get:i,configurable:!1};window.Object.defineProperty(n,t,r)};r.InitialData.prototype={_toRecipients$p$0:null,_ccRecipients$p$0:null,_attachments$p$0:null,_resources$p$0:null,_entities$p$0:null,_selectedEntities$p$0:null,_data$p$0:null,_permissionLevel$p$0:0,get__isRestIdSupported$i$0:function(){return this._data$p$0.isRestIdSupported},get__itemId$i$0:function(){return this._data$p$0.id},get__itemClass$i$0:function(){return this._data$p$0.itemClass},get__dateTimeCreated$i$0:function(){return new Date(this._data$p$0.dateTimeCreated)},get__dateTimeModified$i$0:function(){return new Date(this._data$p$0.dateTimeModified)},get__dateTimeSent$i$0:function(){return new Date(this._data$p$0.dateTimeSent)},get__subject$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();return this._data$p$0.subject},get__normalizedSubject$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();return this._data$p$0.normalizedSubject},get__internetMessageId$i$0:function(){return this._data$p$0.internetMessageId},get__conversationId$i$0:function(){return this._data$p$0.conversationId},get__sender$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();var n=this._data$p$0.sender;return r.ScriptHelpers.isNullOrUndefined(n)?null:new r.EmailAddressDetails(n)},get__from$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();var n=this._data$p$0.from;return r.ScriptHelpers.isNullOrUndefined(n)?null:new r.EmailAddressDetails(n)},get__to$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._toRecipients$p$0&&(this._toRecipients$p$0=this._createEmailAddressDetails$p$0("to"));return this._toRecipients$p$0},get__cc$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._ccRecipients$p$0&&(this._ccRecipients$p$0=this._createEmailAddressDetails$p$0("cc"));return this._ccRecipients$p$0},get__attachments$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._attachments$p$0&&(this._attachments$p$0=this._createAttachmentDetails$p$0());return this._attachments$p$0},get__ewsUrl$i$0:function(){return this._data$p$0.ewsUrl},get__restUrl$i$0:function(){return this._data$p$0.restUrl},get__marketplaceAssetId$i$0:function(){return this._data$p$0.marketplaceAssetId},get__extensionId$i$0:function(){return this._data$p$0.extensionId},get__marketplaceContentMarket$i$0:function(){return this._data$p$0.marketplaceContentMarket},get__consentMetadata$i$0:function(){return this._data$p$0.consentMetadata},get__isRead$i$0:function(){return this._data$p$0.isRead},get__endNodeUrl$i$0:function(){return this._data$p$0.endNodeUrl},get__entryPointUrl$i$0:function(){return this._data$p$0.entryPointUrl},get__start$i$0:function(){return new Date(this._data$p$0.start)},get__end$i$0:function(){return new Date(this._data$p$0.end)},get__location$i$0:function(){return this._data$p$0.location},get__userProfileType$i$0:function(){return this._data$p$0.userProfileType},get__resources$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._resources$p$0&&(this._resources$p$0=this._createEmailAddressDetails$p$0("resources"));return this._resources$p$0},get__organizer$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();var n=this._data$p$0.organizer;return r.ScriptHelpers.isNullOrUndefined(n)?null:new r.EmailAddressDetails(n)},get__userDisplayName$i$0:function(){return this._data$p$0.userDisplayName},get__userEmailAddress$i$0:function(){return this._data$p$0.userEmailAddress},get__userTimeZone$i$0:function(){return this._data$p$0.userTimeZone},get__timeZoneOffsets$i$0:function(){return this._data$p$0.timeZoneOffsets},get__hostVersion$i$0:function(){return this._data$p$0.hostVersion},get__owaView$i$0:function(){return this._data$p$0.owaView},get__overrideWindowOpen$i$0:function(){return this._data$p$0.overrideWindowOpen},_getEntities$i$0:function(){this._entities$p$0||(this._entities$p$0=new r.Entities(this._data$p$0.entities,this._data$p$0.filteredEntities,this.get__dateTimeSent$i$0(),this._permissionLevel$p$0));return this._entities$p$0},_getSelectedEntities$i$0:function(){this._selectedEntities$p$0||(this._selectedEntities$p$0=new r.Entities(this._data$p$0.selectedEntities,null,this.get__dateTimeSent$i$0(),this._permissionLevel$p$0));return this._selectedEntities$p$0},_getEntitiesByType$i$0:function(n){var t=this._getEntities$i$0();return t._getByType$i$0(n)},_getFilteredEntitiesByName$i$0:function(n){var t=this._getEntities$i$0();return t._getFilteredEntitiesByName$i$0(n)},_getRegExMatches$i$0:function(){return this._data$p$0.regExMatches?this._data$p$0.regExMatches:null},_getSelectedRegExMatches$i$0:function(){return this._data$p$0.selectedRegExMatches?this._data$p$0.selectedRegExMatches:null},_getRegExMatchesByName$i$0:function(n){var t=this._getRegExMatches$i$0();return!t||!t[n]?null:t[n]},_throwOnRestrictedPermissionLevel$i$0:function(){window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0)},_createEmailAddressDetails$p$0:function(n){var i=this._data$p$0[n];if(r.ScriptHelpers.isNullOrUndefined(i))return[];for(var u=[],t=0;t0?i.push(t):t.tabIndex===0&&u.push(t):u.push(t)}i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;r===0&&(r=i.indexOf(n)-i.indexOf(t));return r});return[].concat(i,u)}return{set_entropy:function(n){if(typeof n=="string")for(var i=0;i6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(r)===OSF.DDA.SettingsManager.DataJSONSuffix){i=new Date(parseInt(t.slice(5,r)));if(i)return i}return t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,i);f[u]=t}catch(e){}}return f},loadScript:function(r,u,f){if(r&&u){var c=window.document,e=v[r];if(e)e.loaded?u():e.pendingCallbacks.push(u);else{var o=c.createElement("script");o.type="text/javascript";e={loaded:t,pendingCallbacks:[u],timer:n};v[r]=e;var h=function(){if(e.timer!=n){clearTimeout(e.timer);delete e.timer}e.loaded=i;for(var u=e.pendingCallbacks.length,t=0;t1?c[c.length-1]:n;if(u&&o!=n){o.indexOf(rt)>=0&&(o=o.split(rt)[0]);o=decodeURIComponent(o)}var l=p();if(!f&&l){var s=window.name.indexOf(i);if(s>r){var h=window.name.indexOf(";",s);h==r&&(h=window.name.length);var a=window.name.substring(s,h);o?l.setItem(a,o):o=l.getItem(a)}}return o},getConversationId:function(){var i=window.location.search,t=n;if(i){var r=i.indexOf("&");t=r>0?i.substring(1,r):i.substr(1);if(t&&t.charAt(t.length-1)==="="){t=t.substring(0,t.length-1);t&&(t=decodeURIComponent(t))}}return t},getInfoItems:function(n){var t=n.split("$");typeof t[1]==c&&(t=n.split("|"));typeof t[1]==c&&(t=n.split("%7C"));return t},getXdmFieldValue:function(n,t){var r=u,f=OSF.OUtil.parseXdmInfo(t);if(f){var i=OSF.OUtil.getInfoItems(f);if(i!=undefined&&i.length>=3)switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]);if(u)throw u;for(var f in r){u=Function._validateParameter(n[f],r[f],f);if(u)throw u;}},writeProfilerMark:function(n){if(window.msWriteProfilerMark){window.msWriteProfilerMark(n);OsfMsAjaxFactory.msAjaxDebug.trace(n)}},outputDebug:function(n){typeof OsfMsAjaxFactory!==c&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){r=r||{};for(var e in u){var f=u[e];r[f]==undefined&&(r[f]=i)}Object.defineProperty(n,t,r);return n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[h])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[h])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[it,h,tt])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[it,h,tt])},finalizeProperties:function(n,r){r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8;e=o&255;i[t++]=r>>2;i[t++]=(r&3)<<4|f>>4;i[t++]=(f&15)<<2|e>>6;i[t++]=e&63;if(!isNaN(o)){r=o>>8;f=h&255;e=h>>8;i[t++]=r>>2;i[t++]=(r&3)<<4|f>>4;i[t++]=(f&15)<<2|e>>6;i[t++]=e&63}if(isNaN(o))i[t-1]=64;else if(isNaN(h)){i[t-2]=64;i[t-1]=64}for(var c=0;c0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(var u=[],r=0;rn)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};u=d(u);s=f?u.length-1:0;if(u.length===0)return n;while(!h&&s>=0&&sn)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};u=d(u);v=y(u,f);s=l(u.length,v,e);if(s<0)return n;while(!c&&s>=0&&s0;t++){(t==8||t==12||t==16||t==20)&&(i+="-");i+=n[r%16];r=Math.floor(r/16)}for(;t<32;t++){(t==8||t==12||t==16||t==20)&&(i+="-");i+=n[Math.floor(Math.random()*16)]}return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3};OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",Reserved:"reserved",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidOpenBrowserWindow:102,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];if(i){i.name||(i.name=n[this.errorCodes.ooeInternalError].name);i.message||(i.message=n[this.errorCodes.ooeInternalError].message)}else i=n[this.errorCodes.ooeInternalError];return i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:t.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:t.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage}}}}();var OfficeExt;(function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}();n.RequirementVersion=ut;var r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){if(n==undefined)return!1;t==undefined&&(t=0);var f=this._setMap,u=f._sets;if(u.hasOwnProperty(n.toLowerCase())){var e=u[n.toLowerCase()];try{var i=this._getVersion(e);t=t+"";var r=this._getVersion(t);if(i.major>0&&i.major>r.major||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),r=0,i=0;if(t.length<2&&isNaN(Number(n)))throw u;else{r=Number(t[0]);t.length>=2&&(i=Number(t[1]));if(isNaN(r)||isNaN(i))throw u;}return{minor:i,major:r}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;var i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;var k=function(n){__extends(i,n);function i(){n.call(this,{dialogapi:t})}return i}(i);n.DefaultDialogSetRequirement=k;var o=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return i}(i);n.ExcelClientDefaultSetRequirement=o;var d=function(n){__extends(i,n);function i(){n.call(this);this._addSetMap({imagecoercion:t})}return i}(o);n.ExcelClientV1DefaultSetRequirement=d;var w=function(n){__extends(t,n);function t(){n.call(this,{mailbox:1.3})}return t}(i);n.OutlookClientDefaultSetRequirement=w;var f=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return i}(i);n.WordClientDefaultSetRequirement=f;var b=function(n){__extends(i,n);function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return i}(f);n.WordClientV1DefaultSetRequirement=b;var e=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return i}(i);n.PowerpointClientDefaultSetRequirement=e;var tt=function(n){__extends(i,n);function i(){n.call(this);this._addSetMap({imagecoercion:t})}return i}(e);n.PowerpointClientV1DefaultSetRequirement=tt;var it=function(n){__extends(i,n);function i(){n.call(this,{selection:t,textcoercion:t})}return i}(i);n.ProjectClientDefaultSetRequirement=it;var g=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return i}(i);n.ExcelWebDefaultSetRequirement=g;var nt=function(n){__extends(i,n);function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return i}(i);n.WordWebDefaultSetRequirement=nt;var h=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,settings:t})}return i}(i);n.PowerpointWebDefaultSetRequirement=h;var s=function(n){__extends(t,n);function t(){n.call(this,{mailbox:1.3})}return t}(i);n.OutlookWebDefaultSetRequirement=s;var l=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return i}(i);n.SwayWebDefaultSetRequirement=l;var c=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return i}(i);n.AccessWebDefaultSetRequirement=c;var y=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return i}(i);n.ExcelIOSDefaultSetRequirement=y;var u=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return i}(i);n.WordIOSDefaultSetRequirement=u;var p=function(n){__extends(t,n);function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return t}(u);n.WordIOSV1DefaultSetRequirement=p;var a=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return i}(i);n.PowerpointIOSDefaultSetRequirement=a;var v=function(n){__extends(i,n);function i(){n.call(this,{mailbox:t})}return i}(i);n.OutlookIOSDefaultSetRequirement=v;var rt=function(){var t="undefined";function n(){}n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)};n.getDefaultRequirementMatrix=function(u){this.initializeDefaultSetMatrix();var f=undefined,o=u.get_requirementMatrix();if(o!=undefined&&o.length>0&&typeof JSON!==t){var s=JSON.parse(u.get_requirementMatrix().toLowerCase());f=new r(new i(s))}else{var e=n.getClientFullVersionString(u);f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[e]!=undefined?new r(n.DefaultSetArrayMatrix[e]):new r(new i({}))}return f};n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix();if(f!=undefined&&f.length>0&&typeof JSON!==t){var e=JSON.parse(n.get_requirementMatrix().toLowerCase());u=new r(new i(e))}else u=new r(new k);return u};n.getClientFullVersionString=function(n){var r=n.get_appMinorVersion(),u="",i="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;if(f&&n.get_appVersion()==1)i=t==4096&&r>=15?"16.00.01":"16.00";else if(n.get_appName()==64)i=n.get_appVersion();else{u=r<10?"0"+r:""+r;i=n.get_appVersion()+"."+u}return n.get_appName()+"-"+i};n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new o;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new d;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new b;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new tt;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new w;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new g;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new nt;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new s;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new s;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new it;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new c;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new h;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new y;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new l;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new u;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new p;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new a;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new v};n.Excel_RCLIENT_1600="1-16.00";n.Excel_RCLIENT_1601="1-16.01";n.Word_RCLIENT_1600="2-16.00";n.Word_RCLIENT_1601="2-16.01";n.PowerPoint_RCLIENT_1600="4-16.00";n.PowerPoint_RCLIENT_1601="4-16.01";n.Outlook_RCLIENT_1600="8-16.00";n.Excel_WAC_1600="16-16.00";n.Word_WAC_1600="32-16.00";n.Outlook_WAC_1600="64-16.00";n.Outlook_WAC_1601="64-16.01";n.Project_RCLIENT_1600="128-16.00";n.Access_WAC_1600="256-16.00";n.PowerPoint_WAC_1600="512-16.00";n.Excel_IOS_1600="1024-16.00";n.SWAY_WAC_1600="2048-16.00";n.Word_IOS_1600="4096-16.00";n.Word_IOS_16001="4096-16.00.01";n.PowerPoint_IOS_1600="8192-16.00";n.Outlook_IOS_1600="65536-16.00";n.DefaultSetArrayMatrix={};return n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))})(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda();var OfficeExt;(function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n};n.getInstance=function(){n.hostObj===undefined&&(n.hostObj=new n);return n.hostObj};n.prototype.getPlatform=function(){var n=this;if(n.hostInfo.hostPlatform){var t=n.hostInfo.hostPlatform.toLowerCase();if(n.platformRemappings[t])return n.platformRemappings[t]}return null};n.prototype.getHost=function(){var n=this;if(n.hostInfo.hostType){var t=n.hostInfo.hostType.toLowerCase();if(n.camelCaseMappings[t])return n.camelCaseMappings[t];t=n.capitalizeFirstLetter(n.hostInfo.hostType);if(Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null};n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null};return n}();n.Host=t})(t=n.HostName||(n.HostName={}))})(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){if(!n){window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window);window.Office=Microsoft.Office.WebExtension;n=!0}},disableShortcut:function(){if(n){t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window);n=!1}}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i;if(n&&typeof n=="string"){var r=n.indexOf("#");if(r!=-1){var o=n.substring(0,r),e=n.substring(r+1);switch(o){case"binding":case"bindings":e&&(i=new OSF.DDA.BindingPromise(e))}}}if(i){i.onFail=t;return i}else if(t){var u=typeof t;if(u=="function"){var f={};f[Microsoft.Office.WebExtension.Parameters.Callback]=t;OSF.DDA.issueAsyncResult(f,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,u);}};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.auth&&OSF.OUtil.defineEnumerableProperty(f,"auth",{value:n.auth});if(n.get_isDialog()){var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n);OSF.OUtil.defineEnumerableProperty(f,o,{value:e})}else{t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t});if(r){var s=r.displayName||"appOM";delete r.displayName;OSF.OUtil.defineEnumerableProperty(f,s,{value:r})}u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}});var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n);OSF.OUtil.defineEnumerableProperty(f,o,{value:e})}};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});var u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext());return n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,o=n.length,e=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){for(var u in n){var i=n[u],r=t[u];if(i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw e();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw e();}};f.extractRequiredArguments=function(t,i,r){if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var f,e,l=n.length-1;l>=s;l--){var c=n[l];switch(typeof c){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=c;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=c;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}f=o.fillOptions(f,i,r,u);if(e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;o.verifyArguments(t,f);return f}this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),f=c(n,r,t,i);return o.constructCallArgs(r,f,t,i)};this.processResponse=function(n,t,i,f){var e;e=n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n);return e};this.getCallArgs=function(n){for(var t,u,r=n.length-1;r>=s;r--){var i=n[r];switch(typeof i){case"object":t=i;break;case h:u=i}}t=t||{};u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u);return t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var i=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],t=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],i,t,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback];if(f){var u={};u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext];var r;if(t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)u[OSF.DDA.AsyncResultEnum.Properties.Value]=i;else{r={};i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i;r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i}f(new OSF.DDA.AsyncResult(u,r))}};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){for(var t in n){var i={};OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}});OSF.DDA.SyncMethodNames[t]=i}};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);function o(n,i,r,u){if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var o,c,s=n.length-1;s>=e;s--){var h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}o=f.fillOptions(o,i,r,u);f.verifyArguments(t,o);return o}this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),e=o(n,r,t,i);return f.constructCallArgs(r,e,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){var l="fromHost",i=this,o="toHost",f=l,a="sourceData",u="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];function e(i,u){var a=i?{}:undefined;for(var h in i){var s=i[h],o;if(OSF.DDA.ListType.isListType(h)){o=[];for(var v in s)o.push(e(s[v],u))}else if(OSF.OUtil.listContainsKey(r,h))o=r[h][u](s);else if(u==f&&n.preserveNesting(h))o=e(s,u);else{var c=t[h];if(c){var l=c[u];if(l){o=l[s];o===undefined&&(o=s)}}else o=s}a[h]=o}return a}function c(i,r){var s;for(var f in r){var e;e=n.isComplexType(f)?c(i,t[f][o]):i[f];if(e!=undefined){s||(s={});var h=r[f];h==u&&(h=f);s[h]=n.pack(f,e)}}return s}function s(i,r,e){e||(e={});for(var h in r){var l=r[h],o;if(l==u)o=i;else if(l==a){e[h]=i.toArray();continue}else o=i[l];if(o===null||o===undefined)e[h]=undefined;else{o=n.unpack(h,o);var c;if(n.isComplexType(h)){c=t[h][f];n.preserveNesting(h)?e[h]=s(o,c):s(o,c,e)}else if(OSF.DDA.ListType.isListType(h)){c={};var p=OSF.DDA.ListType.getDescriptor(h);c[p]=u;var v=new Array(o.length);for(var y in o)v[y]=s(o[y],c);e[h]=v}else e[h]=o}}return e}function h(n,i,r){var f=t[n][r],u;if(r=="toHost"){var h=e(i,r);u=c(h,f)}else if(r==l){var o=s(i,f);u=e(o,r)}return u}t||(t={});i.addMapping=function(n,i){var e,s;if(i.map){e=i.map;s={};for(var c in e){var l=e[c];l==u&&(l=c);s[l]=c}}else{e=i.toHost;s=i.fromHost}var r=t[n];if(r){var h=r[o];for(var v in h)e[v]=h[v];h=r[f];for(var a in h)s[a]=h[a]}else r=t[n]={};r[o]=e;r[f]=s};i.toHost=function(n,t){return h(n,t,o)};i.fromHost=function(n,t){return h(n,t,f)};i.self=u;i.sourceData=a;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset);OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]));return OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){var r;r=this.isDynamicType(n)?t[n].toHost(i):i;return r};i.unpack=function(n,i){var r;r=this.isDynamicType(n)?t[n].fromHost(i):i;return r}};OSF.DDA.getDecoratedParameterMap=function(n,t){var i=new OSF.DDA.HostParameterMap(n),f=i.self;function r(n){var i=null;if(n){i={};for(var r=n.length,t=0;t0&&t.push(i)}}}catch(s){}return t}var i=[],n={};n[Microsoft.Office.WebExtension.Parameters.Data]=function(){var i=0,n=1;return{toHost:function(t){if(OSF.DDA.TableDataProperties&&typeof t!="string"&&t[OSF.DDA.TableDataProperties.TableRows]!==undefined){var r=[];r[i]=t[OSF.DDA.TableDataProperties.TableRows];r[n]=t[OSF.DDA.TableDataProperties.TableHeaders];t=r}return t},fromHost:function(r){var f;if(r.toArray){var e=r.dimensions();if(e===2)f=t(r);else{var u=r.toArray();if(u.length===2&&(u[0]!=null&&u[0].toArray||u[1]!=null&&u[1].toArray)){f={};f[OSF.DDA.TableDataProperties.TableRows]=t(u[i]);f[OSF.DDA.TableDataProperties.TableHeaders]=t(u[n])}else f=u}}else f=r;return f}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,i,n);this.unpack=function(t,i){var r;if(this.isComplexType(t)||OSF.DDA.ListType.isListType(t)){var u=(i||typeof i=="unknown")&&i.toArray;r=u?i.toArray():i||{}}else r=this.isDynamicType(t)?n[t].fromHost(i):i;return r}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(n){function i(n){var t=n;if(OSF.OUtil.isArray(n))for(var f=t.length,r=0;r2){r=[];for(var f=1;f=n.MESSAGE_TIME_DELTA){h();e.lastMessageTimestamp=o}else{e.lastMessageTimestamp+=n.MESSAGE_TIME_DELTA;setTimeout(function(){h()},e.lastMessageTimestamp-o)}return s};n.prototype.generateCorrelationId=function(){++this.callingIndex;return this.conversationId+this.callingIndex};n.getCurrentTimeMS=function(){return+new Date};n.MESSAGE_TIME_DELTA=10;return n}();n.WebkitScriptMessaging=i})(t=n.ScriptMessaging||(n.ScriptMessaging={}))})(OSFWebkit||(OSFWebkit={}));OSF.ScriptMessaging=OSFWebkit.ScriptMessaging;var OSFWebkit;(function(n){n.MessageHandlerName="Agave";n.PopupMessageHandlerName="WefPopupHandler";(function(n){var p="HostFullVersion",w="HostCustomMessage",y="RequirementMatrix",a="CommerceAllowed",v="TouchEnabled",b="InstanceId",nt="CorrelationId",tt="APISetVersion",g="SolutionToken",k="ControlIntegrationLevel",d="ActivationMode",u="DocumentUrl",f="BindingCount",r="AppDataLocale",t="APPUILocale",i="AppCapabilities",e="APIVersionSequence",c="RevisionVersion",l="MinorVersion",h="MajorVersion",o="SolutionReferenceId",s="Settings";n[n[s]=0]=s;n[n[o]=1]=o;n[n.AppType=2]="AppType";n[n[h]=3]=h;n[n[l]=4]=l;n[n[c]=5]=c;n[n[e]=6]=e;n[n[i]=7]=i;n[n[t]=8]=t;n[n[r]=9]=r;n[n[f]=10]=f;n[n[u]=11]=u;n[n[d]=12]=d;n[n[k]=13]=k;n[n[g]=14]=g;n[n[tt]=15]=tt;n[n[nt]=16]=nt;n[n[b]=17]=b;n[n[v]=18]=v;n[n[a]=19]=a;n[n[y]=20]=y;n[n[w]=21]=w;n[n[p]=22]=p})(n.AppContextProperties||(n.AppContextProperties={}));var i=n.AppContextProperties;(function(n){var r="GetContext",u="WriteSettings",t="UnregisterEvent",i="RegisterEvent";n[n.Execute=1]="Execute";n[n[i]=2]=i;n[n[t]=3]=t;n[n[u]=4]=u;n[n[r]=5]=r})(n.MethodId||(n.MethodId={}));var r=n.MethodId,t=function(){var r="message",i=null;function t(n){this.hostScriptProxy=n}t.prototype.execute=function(t,r,u){var f=r;f==i&&(f=[]);var o={id:t,apiArgs:f},e=function(t){if(u){var e=[];if(OSF.OUtil.isArray(t))for(var f=0;f=2){u=t[0];i=t[1]}r&&r(i,new n.WebkitSafeArray(u))},f=function(t){if(u)return u(new n.WebkitSafeArray(t))};this.hostScriptProxy.registerEvent(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.RegisterEvent,t,i,e,f)};t.prototype.unregisterEvent=function(t,i,r){var u=function(t){return r(new n.WebkitSafeArray(t))};this.hostScriptProxy.unregisterEvent(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.UnregisterEvent,t,i,u)};t.prototype.messageParent=function(n){var i=n[Microsoft.Office.WebExtension.Parameters.MessageToParent],t={dialogMessage:{messageType:OSF.DialogMessageType.DialogMessageReceived,messageContent:i}};window.opener.postMessage(JSON.stringify(t),window.location.origin)};t.prototype.openDialog=function(n,u,f,e){if(t.popup&&!t.popup.closed){e(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened);return}var y="action=displayDialog";t.OpenDialogCallback=undefined;var l="#",s=JSON.parse(u),a=s.url;if(a){var o=a.split(l),c="?";o[0].indexOf("?")>-1&&(c="&");var w=screen.width*s.width/100,b=screen.height*s.height/100,k="width="+w+", height="+b;o[0]=o[0].concat(c).concat(y);var v=o.join(l);t.popup=window.open(v,"",k);function h(t){if(t.origin==window.location.origin)try{var i=JSON.parse(t.data);i.dialogMessage&&f(n,[OSF.DialogMessageType.DialogMessageReceived,i.dialogMessage.messageContent])}catch(r){OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handlered. Message:"+t.data)}}function p(){try{if(t.popup==i||t.popup.closed){window.clearInterval(t.interval);window.removeEventListener(r,h);t.NotifyError=i;t.popup=i;f(n,[OSF.DialogMessageType.DialogClosed])}}catch(u){OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed.")}}t.OpenDialogCallback=function(i){if(i==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){window.addEventListener(r,h);this.messageEventListener=h;t.interval=window.setInterval(p,1e3);function u(t){f(n,[t])}t.NotifyError=u}e(i)}}};t.prototype.closeDialog=function(n,u,f){if(t.popup){t.interval&&window.clearInterval(t.interval);t.popup.close();t.popup=i;window.removeEventListener(r,this.messageEventListener);t.NotifyError=i;f(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}else f(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)};t.prototype.sendMessage=function(){};return t}();n.WebkitHostController=t})(OSFWebkit||(OSFWebkit={}));OSF.Webkit=OSFWebkit;OSF.ClientHostController=new OSFWebkit.WebkitHostController(OSF.ScriptMessaging.GetScriptMessenger());OSF.DDA.ClientSettingsManager={getSettingsExecuteMethod:function(n){return function(t){var u,r,i=function(n,i){t.onReceiving&&t.onReceiving();t.onComplete&&t.onComplete(n,i)};try{n(t.hostCallArgs,t.onCalling,i)}catch(f){u=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;r={name:Strings.OfficeOM.L_InternalError,message:f};i(u,r)}}},read:function(n,t){var u=[],f=[];n&&n();var i=OSF._OfficeAppFactory.getInitializationHelper(),r=function(n){t&&t(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,n.get_settings())};i.getAppContext(null,r)},write:function(n,t,i,r){var u={},o=[],e=[];for(var f in n){o.push(f);e.push(n[f])}u.keys=o;u.values=e;i&&i();var s=function(n){r&&r(n[0],null)};OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.WriteSettings,u,s)}};OSF.InitializationHelper.prototype.initializeSettings=function(n,t){var r=n.get_settings();return this.deserializeSettings(r,t)};OSF.InitializationHelper.prototype.getAppContext=function(n,t){var r=function(n){for(var f,i=OSF.Webkit.AppContextProperties,g=n[i.AppType],o=n[i.Settings],s={},e=o[0],nt=o[1],u=0;u=3){f=n[0];e=n[2];var t=OSF.OUtil.parseSerializerVersionWithGivenFragment(!1,OSF._OfficeAppFactory.getWindowLocationHash());isNaN(t)&&OSF._OfficeAppFactory.getWindowName&&(t=OSF.OUtil.parseSerializerVersionFromWindowName(!1,OSF._OfficeAppFactory.getWindowName()));i=Microsoft.Office.Common.XdmCommunicationManager.connect(f,window.parent,e,t)}}var u=null;if(i)try{i.invoke("getCustomizedScriptPathAsync",function(n,t){o(n===0?t:null)},{__timeout__:1e3})}catch(s){OsfMsAjaxFactory.msAjaxDebug.trace("no script override through cross frame communication.")}else{try{window.external&&typeof window.external.getCustomizedScriptPath!="undefined"&&(u=window.external.getCustomizedScriptPath())}catch(s){OsfMsAjaxFactory.msAjaxDebug.trace("no script override through window.external.")}o(u)}},t=!0;t&&!OsfMsAjaxFactory.isMsAjaxLoaded()?OSF._OfficeAppFactory&&OSF._OfficeAppFactory&&OSF._OfficeAppFactory.getLoadScriptHelper&&OSF._OfficeAppFactory.getLoadScriptHelper().isScriptLoading(OSF.ConstantNames.MicrosoftAjaxId)?OSF._OfficeAppFactory.getLoadScriptHelper().waitForScripts([OSF.ConstantNames.MicrosoftAjaxId],n):OsfMsAjaxFactory.loadMsAjaxFull(function(){if(OsfMsAjaxFactory.isMsAjaxLoaded())n();else throw"Not able to load MicrosoftAjax.js.";}):n()})();Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(n){var i=this;i._eventHandlers={};i._objectEventHandlers={};i._queuedEventsArgs={};for(var u in n){var t=n[u],r=t=="objectDeleted"||t=="objectSelectionChanged"||t=="objectDataChanged"||t=="contentControlAdded";r?i._objectEventHandlers[t]={}:i._eventHandlers[t]=[];i._queuedEventsArgs[t]=[]}};OSF.EventDispatch.prototype={getSupportedEvents:function(){var n=[];for(var t in this._eventHandlers)n.push(t);for(var t in this._objectEventHandlers)n.push(t);return n},supportsEvent:function(n){for(var t in this._eventHandlers)if(n==t)return!0;for(var t in this._objectEventHandlers)if(n==t)return!0;return!1},hasEventHandler:function(n,t){var i=this._eventHandlers[n];if(i&&i.length>0)for(var r in i)if(i[r]===t)return!0;return!1},hasObjectEventHandler:function(n,t,i){var f=this._objectEventHandlers[n];if(f!=null)for(var u=f[t],r=0;u!=null&&r0)for(var r=0;r0){this._eventHandlers[n]=[];return!0}return!1},clearObjectEventHandlers:function(n,t){if(this._objectEventHandlers[n]!=null&&this._objectEventHandlers[n][t]!=null){this._objectEventHandlers[n][t]=[];return!0}return!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},getObjectEventHandlerCount:function(n,t){return this._objectEventHandlers[n]==null||this._objectEventHandlers[n][t]==null?0:this._objectEventHandlers[n][t].length},fireEvent:function(n){if(n.type==undefined)return!1;var t=n.type;if(t&&this._eventHandlers[t]){var i=this._eventHandlers[t];for(var r in i)i[r](n);return!0}else return!1},fireObjectEvent:function(n,t){if(t.type==undefined)return!1;var u=t.type;if(u&&this._objectEventHandlers[u]){var f=this._objectEventHandlers[u],i=f[n];if(i!=null){for(var r=0;r0){for(var u=i[0];t.length>0;){var r=t.shift();u(r)}return!0}}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var f="outlook",e="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(n,i[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:r=new OSF.DDA.RichApiMessageEventArgs(n,i);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f){r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i);t.initialize(r.initialData);OSF._OfficeAppFactory.getHostInfo().hostPlatform=="win32"&&t.setCurrentItemNumber(r.itemNumber.itemNumber)}else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkRecipientsChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var i=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),t=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];t(arguments,i,n)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(n){var i=OSF.DDA.SyncMethodNames.MessageParent.displayName,t=this;t[i]||OSF.OUtil.defineEnumerableProperty(t,i,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return n(arguments,t)}});var r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;t[r]||typeof OSF.DialogParentMessageEventDispatch=="undefined"||OSF.DDA.DispIdHost.addEventSupport(t,OSF.DialogParentMessageEventDispatch,n);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(n){n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:n[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels,value:{types:["boolean"],defaultValue:!1}}],privateStateCallbacks:[],onSucceeded:function(n){var f=n[Microsoft.Office.WebExtension.Parameters.Id],i=n[Microsoft.Office.WebExtension.Parameters.Data],t=new OSF.DialogHandler,e=OSF.DDA.AsyncMethodNames.CloseAsync.displayName;OSF.OUtil.defineEnumerableProperty(t,e,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];n(arguments,f,i,t)}});var r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;OSF.OUtil.defineEnumerableProperty(t,r,{value:function(){var f=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],n=f.verifyAndExtractCall(arguments,t,i),u=n[Microsoft.Office.WebExtension.Parameters.EventType],r=n[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(u,r)}});var u=OSF.DDA.SyncMethodNames.SendMessage.displayName;OSF.OUtil.defineEnumerableProperty(t,u,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return n(arguments,i,t)}});return t},checkCallArgs:function(n){n[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Width]=1);!n[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&n[Microsoft.Office.WebExtension.Parameters.Width]>100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99);n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1);!n[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99);n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0);return n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(n){try{n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,n);OSF.ClientHostController.openDialog(n.dispId,n.targetId,function(t,i){n.onEvent&&n.onEvent(i);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(n){n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,n);try{OSF.ClientHostController.closeDialog(n.dispId,n.targetId,t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.messageParent=function(n){try{n.onCalling&&n.onCalling();var i=+new Date,t=OSF.ClientHostController.messageParent(n.hostCallArgs);n.onReceiving&&n.onReceiving();OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs(+new Date-i),t);return t}catch(r){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(r)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.sendMessage=function(n){try{n.onCalling&&n.onCalling();var r=+new Date,t=OSF.ClientHostController.sendMessage(n.hostCallArgs);n.onReceiving&&n.onReceiving();return t}catch(i){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(i)}};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ItemChanged:"olkItemSelectedChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{OlkItemSelectedData:"OlkItemSelectedData"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{RecipientsChanged:"olkRecipientsChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{OlkRecipientsData:"OlkRecipientsData"});OSF.DDA.OlkRecipientsChangedEventArgs=function(n){var t=n[OSF.DDA.EventDescriptors.OlkRecipientsData][0];t===""&&(t=null);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.RecipientsChanged},changedRecipientFields:{value:JSON.parse(t)}})};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppointmentTimeChanged:"olkAppointmentTimeChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{OlkAppointmentTimeChangedData:"OlkAppointmentTimeChangedData"});OSF.DDA.OlkAppointmentTimeChangedEventArgs=function(n){var u=n[OSF.DDA.EventDescriptors.OlkAppointmentTimeChangedData][0],i,t;try{var r=JSON.parse(u);i=new Date(r.start).toISOString();t=new Date(r.end).toISOString()}catch(f){i=null;t=null}OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged},start:{value:i},end:{value:t}})};OSF.DDA.OlkItemSelectedChangedEventArgs=function(n){var t=n[OSF.DDA.EventDescriptors.OlkItemSelectedData][0];t===""&&(t=null);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.ItemChanged},initialData:{value:JSON.parse(t)},itemNumber:{value:JSON.parse(n[OSF.DDA.EventDescriptors.OlkItemSelectedData][1])}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidOlkItemSelectedChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.OlkItemSelectedData,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidOlkRecipientsChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.OlkRecipientsData,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidOlkAppointmentTimeChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.OlkAppointmentTimeChangedData,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}],isComplexType:!0});var OSFLog;(function(n){var u="ResponseTime",f="Message",r="SessionId",i="CorrelationId",t=!0,e=function(){function n(n){this._table=n;this._fields={}}Object.defineProperty(n.prototype,"Fields",{get:function(){return this._fields},enumerable:t,configurable:t});Object.defineProperty(n.prototype,"Table",{get:function(){return this._table},enumerable:t,configurable:t});n.prototype.SerializeFields=function(){};n.prototype.SetSerializedField=function(n,t){typeof t!="undefined"&&t!==null&&(this._serializedFields[n]=t.toString())};n.prototype.SerializeRow=function(){var n=this;n._serializedFields={};n.SetSerializedField("Table",n._table);n.SerializeFields();return JSON.stringify(n._serializedFields)};return n}();n.BaseUsageData=e;var c=function(n){var k="IsFromWacAutomation",w="WacHostEnvironment",b="HostJSVersion",y="OfficeJSVersion",p="DocUrl",g="AppSizeHeight",nt="AppSizeWidth",l="ClientId",d="HostVersion",s="Host",h="UserId",e="Browser",o="AssetId",a="AppURL",v="AppInstanceId",c="AppId";__extends(u,n);function u(){n.call(this,"AppActivated")}Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,c,{get:function(){return this.Fields[c]},set:function(n){this.Fields[c]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,v,{get:function(){return this.Fields[v]},set:function(n){this.Fields[v]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,a,{get:function(){return this.Fields[a]},set:function(n){this.Fields[a]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,d,{get:function(){return this.Fields[d]},set:function(n){this.Fields[d]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,l,{get:function(){return this.Fields[l]},set:function(n){this.Fields[l]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,nt,{get:function(){return this.Fields[nt]},set:function(n){this.Fields[nt]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,g,{get:function(){return this.Fields[g]},set:function(n){this.Fields[g]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,p,{get:function(){return this.Fields[p]},set:function(n){this.Fields[p]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,y,{get:function(){return this.Fields[y]},set:function(n){this.Fields[y]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,b,{get:function(){return this.Fields[b]},set:function(n){this.Fields[b]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,w,{get:function(){return this.Fields[w]},set:function(n){this.Fields[w]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,k,{get:function(){return this.Fields[k]},set:function(n){this.Fields[k]=n},enumerable:t,configurable:t});u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(c,n.AppId);n.SetSerializedField(v,n.AppInstanceId);n.SetSerializedField(a,n.AppURL);n.SetSerializedField(o,n.AssetId);n.SetSerializedField(e,n.Browser);n.SetSerializedField(h,n.UserId);n.SetSerializedField(s,n.Host);n.SetSerializedField(d,n.HostVersion);n.SetSerializedField(l,n.ClientId);n.SetSerializedField(nt,n.AppSizeWidth);n.SetSerializedField(g,n.AppSizeHeight);n.SetSerializedField(f,n.Message);n.SetSerializedField(p,n.DocUrl);n.SetSerializedField(y,n.OfficeJSVersion);n.SetSerializedField(b,n.HostJSVersion);n.SetSerializedField(w,n.WacHostEnvironment);n.SetSerializedField(k,n.IsFromWacAutomation)};return u}(e);n.AppActivatedUsageData=c;var l=function(n){var e="StartTime",o="ScriptId";__extends(f,n);function f(){n.call(this,"ScriptLoad")}Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t});f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(o,n.ScriptId);n.SetSerializedField(e,n.StartTime);n.SetSerializedField(u,n.ResponseTime)};return f}(e);n.ScriptLoadUsageData=l;var h=function(n){var h="CloseMethod",s="OpenTime",e="AppSizeFinalHeight",o="AppSizeFinalWidth",f="FocusTime";__extends(u,n);function u(){n.call(this,"AppClosed")}Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t});u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(f,n.FocusTime);n.SetSerializedField(o,n.AppSizeFinalWidth);n.SetSerializedField(e,n.AppSizeFinalHeight);n.SetSerializedField(s,n.OpenTime);n.SetSerializedField(h,n.CloseMethod)};return u}(e);n.AppClosedUsageData=h;var o=function(n){var s="ErrorType",o="Parameters",h="APIID",e="APIType";__extends(f,n);function f(){n.call(this,"APIUsage")}Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t});f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(e,n.APIType);n.SetSerializedField(h,n.APIID);n.SetSerializedField(o,n.Parameters);n.SetSerializedField(u,n.ResponseTime);n.SetSerializedField(s,n.ErrorType)};return f}(e);n.APIUsageUsageData=o;var s=function(n){var e="SuccessCode";__extends(u,n);function u(){n.call(this,"AppInitialization")}Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t});u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(e,n.SuccessCode);n.SetSerializedField(f,n.Message)};return u}(e);n.AppInitializationUsageData=s})(OSFLog||(OSFLog={}));var Logger;(function(n){"use strict";(function(n){n[n.info=0]="info";n[n.warning=1]="warning";n[n.error=2]="error"})(n.TraceLevel||(n.TraceLevel={}));var f=n.TraceLevel;(function(n){n[n.none=0]="none";n[n.flush=1]="flush"})(n.SendFlag||(n.SendFlag={}));var e=n.SendFlag;function u(){OSF.Logger&&OSF.Logger.ulsEndpoint&&OSF.Logger.ulsEndpoint.loadProxyFrame()}n.allowUploadingData=u;function t(n,t,i){if(OSF.Logger&&OSF.Logger.ulsEndpoint){var u={traceLevel:n,message:t,flag:i,internalLog:!0},r=JSON.stringify(u);OSF.Logger.ulsEndpoint.writeLog(r)}}n.sendLog=t;function i(){try{return new r}catch(n){return null}}var r=function(){function n(){var n=this,t=n;n.proxyFrame=null;n.telemetryEndPoint="https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html";n.buffer=[];n.proxyFrameReady=!1;OSF.OUtil.addEventListener(window,"message",function(n){return t.tellProxyFrameReady(n)});setTimeout(function(){t.loadProxyFrame()},3e3)}n.prototype.writeLog=function(t){var i=this;i.proxyFrameReady===!0?i.proxyFrame.contentWindow.postMessage(t,n.telemetryOrigin):i.buffer.length<128&&i.buffer.push(t)};n.prototype.loadProxyFrame=function(){var n=this;if(n.proxyFrame==null){n.proxyFrame=document.createElement("iframe");n.proxyFrame.setAttribute("style","display:none");n.proxyFrame.setAttribute("src",n.telemetryEndPoint);document.head.appendChild(n.proxyFrame)}};n.prototype.tellProxyFrameReady=function(t){var i=this,e=i;if(t.data==="ProxyFrameReadyToLog"){i.proxyFrameReady=!0;for(var r=0;r40){n=OSF.OUtil.Guid.generateNewGuid();t.setValue(t.clientIDKey,n)}return n};n.prototype.saveLog=function(n,t){var u=this,i=u.getValue(u.logIdSetKey);i=(i&&i.length>0?i+";":r)+n;u.setValue(u.logIdSetKey,i);u.setValue(n,t)};n.prototype.enumerateLog=function(n,t){var i=this,f=i.getValue(i.logIdSetKey);if(f){var e=f.split(";");for(var o in e){var r=e[o],u=i.getValue(r);if(u){n&&n(r,u);t&&i.remove(r)}}t&&i.remove(i.logIdSetKey)}};n.prototype.getValue=function(n){var i=OSF.OUtil.getLocalStorage(),t=r;i&&(t=i.getItem(n));return t};n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)};n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}};return n}(),o=function(){function t(){}t.prototype.LogData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(t)}catch(i){}};t.prototype.LogRawData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(t))}catch(i){}};return t}();function u(n){n&&(n=n.replace(/[{}]/g,r).toLowerCase());return n||r}function d(e){if(OSF.Logger&&!t){t=new g;t.hostVersion=e.get_hostFullVersion()?e.get_hostFullVersion():e.get_appVersion();t.appId=e.get_id();t.host=e.get_appName();t.browser=window.navigator.userAgent;t.correlationId=u(e.get_correlationId());t.clientId=(new l).getClientId();t.appInstanceId=e.get_appInstanceId();t.appInstanceId&&(t.appInstanceId=t.appInstanceId.replace(/[{}]/g,r).toLowerCase());t.message=e.get_hostCustomMessage();t.officeJSVersion=OSF.ConstantNames.FileVersion;t.hostJSVersion="16.0.8818.1000";e._wacHostEnvironment&&(t.wacHostEnvironment=e._wacHostEnvironment);e._isFromWacAutomation!==undefined&&e._isFromWacAutomation!==i&&(t.isFromWacAutomation=e._isFromWacAutomation.toString().toLowerCase());var s=e.get_docUrl();t.docUrl=nt.test(s)?s:r;var o=location.href;o&&(o=o.split("?")[0].split("#")[0]);t.appURL=o;(function(n,t){var o,s,u;t.assetId=r;t.userId=r;try{o=decodeURIComponent(n);s=new DOMParser;u=s.parseFromString(o,"text/xml");var e=u.getElementsByTagName("t")[0].attributes.getNamedItem("cid"),f=u.getElementsByTagName("t")[0].attributes.getNamedItem("oid");e&&e.nodeValue?t.userId=e.nodeValue:f&&f.nodeValue&&(t.userId=f.nodeValue);t.assetId=u.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(h){}finally{o=i;u=i;s=i}})(e.get_eToken(),t);(function(){var l=new Date,r=i,o=0,c=!1,u=function(){if(document.hasFocus())r==i&&(r=new Date);else if(r){o+=Math.abs(+new Date-r.getTime());r=i}},t=[];t.push(new f("focus",u));t.push(new f("blur",u));t.push(new f("focusout",u));t.push(new f("focusin",u));var s=function(){for(var u=0;u6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix){i=new Date(parseInt(t.slice(5,-1)));if(i)return i}return t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,!0);r[i]=t}catch(u){}}return r}};OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(n,t,i){Type.registerNamespace("Microsoft.Office.WebExtension.MailboxEnums");Microsoft.Office.WebExtension.MailboxEnums.EntityType={MeetingSuggestion:"meetingSuggestion",TaskSuggestion:"taskSuggestion",Address:"address",EmailAddress:"emailAddress",Url:"url",PhoneNumber:"phoneNumber",Contact:"contact",FlightReservations:"flightReservations",ParcelDeliveries:"parcelDeliveries"};Microsoft.Office.WebExtension.MailboxEnums.ItemType={Message:"message",Appointment:"appointment"};Microsoft.Office.WebExtension.MailboxEnums.ResponseType={None:"none",Organizer:"organizer",Tentative:"tentative",Accepted:"accepted",Declined:"declined"};Microsoft.Office.WebExtension.MailboxEnums.RecipientType={Other:"other",DistributionList:"distributionList",User:"user",ExternalUser:"externalUser"};Microsoft.Office.WebExtension.MailboxEnums.AttachmentType={File:"file",Item:"item",Cloud:"cloud"};Microsoft.Office.WebExtension.MailboxEnums.BodyType={Text:"text",Html:"html"};Microsoft.Office.WebExtension.MailboxEnums.ItemNotificationMessageType={ProgressIndicator:"progressIndicator",InformationalMessage:"informationalMessage",ErrorMessage:"errorMessage",InsightMessage:"insightMessage"};Microsoft.Office.WebExtension.MailboxEnums.Folder={Inbox:"inbox",Junk:"junk",DeletedItems:"deletedItems"};Microsoft.Office.WebExtension.CoercionType={Text:"text",Html:"html"};Microsoft.Office.WebExtension.MailboxEnums.UserProfileType={Office365:"office365",OutlookCom:"outlookCom",Enterprise:"enterprise"};Microsoft.Office.WebExtension.MailboxEnums.RestVersion={v1_0:"v1.0",v2_0:"v2.0",Beta:"beta"};Microsoft.Office.WebExtension.MailboxEnums.ModuleType={Addins:"addins"};Microsoft.Office.WebExtension.MailboxEnums.ActionType={ShowTaskPane:"showTaskPane"};Type.registerNamespace("OSF.DDA");var u=window.OSF||{};u.DDA=u.DDA||{};window.OSF.DDA.OutlookAppOm=u.DDA.OutlookAppOm=function(n,t,i){this.$$d_navigateToModuleAsync=Function.createDelegate(this,this.navigateToModuleAsync);this.$$d_displayPersonaCardAsync=Function.createDelegate(this,this.displayPersonaCardAsync);this.$$d_displayNewMessageFormApi=Function.createDelegate(this,this.displayNewMessageFormApi);this.$$d__displayNewAppointmentFormApi$p$0=Function.createDelegate(this,this._displayNewAppointmentFormApi$p$0);this.$$d_windowOpenOverrideHandler=Function.createDelegate(this,this.windowOpenOverrideHandler);this.$$d__getRestUrl$p$0=Function.createDelegate(this,this._getRestUrl$p$0);this.$$d__getEwsUrl$p$0=Function.createDelegate(this,this._getEwsUrl$p$0);this.$$d__getDiagnostics$p$0=Function.createDelegate(this,this._getDiagnostics$p$0);this.$$d__getUserProfile$p$0=Function.createDelegate(this,this._getUserProfile$p$0);this.$$d_getItem=Function.createDelegate(this,this.getItem);this.$$d__callAppReadyCallback$p$0=Function.createDelegate(this,this._callAppReadyCallback$p$0);this.$$d__getInitialDataResponseHandler$p$0=Function.createDelegate(this,this._getInitialDataResponseHandler$p$0);window.OSF.DDA.OutlookAppOm._instance$p=this;this._officeAppContext$p$0=n;this._appReadyCallback$p$0=i;var r=this;var u=function(){i&&(r._officeAppContext$p$0.get_isDialog()?window.setTimeout(r.$$d__callAppReadyCallback$p$0,0):r.invokeHostMethod(1,null,r.$$d__getInitialDataResponseHandler$p$0))};this._areStringsLoaded$p$0()?u():this._loadLocalizedScript$p$0(u)};window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i=function(n){if(!n)throw Error.create(window._u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text);};window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i=function(n,t,i,r){if(ni)throw Error.argumentOutOfRange(r);};window.OSF.DDA.OutlookAppOm._throwOnInvalidModule$p=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("module");else if(n==="")throw Error.argument("module","module cannot be empty.");if(n!==window.Microsoft.Office.WebExtension.MailboxEnums.ModuleType.Addins)throw Error.notImplemented(String.format("API not supported for module '{0}'",n));};window.OSF.DDA.OutlookAppOm._getHtmlBody$p=function(n){var t="";if("htmlBody"in n){window.OSF.DDA.OutlookAppOm._throwOnInvalidHtmlBody$p(n.htmlBody);t=n.htmlBody}return t};window.OSF.DDA.OutlookAppOm._getAttachments$p=function(n){var t=[];if("attachments"in n){t=n.attachments;window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentsArray$p(t)}return t};window.OSF.DDA.OutlookAppOm._getOptionsAndCallback$p=function(n){var t=[];"options"in n&&(t[0]=n.options);"callback"in n&&(t[t.length]=n.callback);return t};window.OSF.DDA.OutlookAppOm._createAttachmentsDataForHost$p=function(n){var r=new Array(0);if(Array.isInstanceOfType(n))for(var t=0;t2048)throw Error.argumentOutOfRange("attachments",n.length,window._u.ExtensibilityStrings.l_AttachmentUrlTooLong_Text);window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentName$p(t)};window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentItemIdOrName$p=function(n,t){if(!String.isInstanceOfType(n)||!String.isInstanceOfType(t))throw Error.argument("attachments");if(n.length>200)throw Error.argumentOutOfRange("attachments",n.length,window._u.ExtensibilityStrings.l_AttachmentItemIdTooLong_Text);window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentName$p(t)};window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentName$p=function(n){if(n.length>255)throw Error.argumentOutOfRange("attachments",n.length,window._u.ExtensibilityStrings.l_AttachmentNameTooLong_Text);};window.OSF.DDA.OutlookAppOm._throwOnInvalidRestVersion$p=function(n){if(!n)throw Error.argumentNull("restVersion");if(n!==window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v1_0&&n!==window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v2_0&&n!==window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.Beta)throw Error.argument("restVersion");};window.OSF.DDA.OutlookAppOm.getItemIdBasedOnHost=function(n){return window.OSF.DDA.OutlookAppOm._instance$p._initialData$p$0&&window.OSF.DDA.OutlookAppOm._instance$p._initialData$p$0.get__isRestIdSupported$i$0()?window.OSF.DDA.OutlookAppOm._instance$p.convertToRestId(n,window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v1_0):window.OSF.DDA.OutlookAppOm._instance$p.convertToEwsId(n,window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v1_0)};window.OSF.DDA.OutlookAppOm.addAdditionalArgs=function(n,t){return t};window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p=function(n,t,i){if(Object.getType(n)!==t)throw Error.argumentType(i);};window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p=function(n,t,i,u){if(!r.ScriptHelpers.isNullOrUndefined(n)){window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(n,String,u);var f=n;window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(f.length,t,i,u)}};window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p=function(n){return n?n.join(";"):null};window.OSF.DDA.OutlookAppOm._convertComposeEmailDictionaryParameterForSetApi$p=function(n){if(!n)return null;for(var i=new Array(n.length),t=0;t2){var t=window.JSON.parse(n[2]);if(Object.isInstanceOfType(t)){var r=t;i=r.itemNumber}}return i},createDeserializedData:function(n,t){var i=null;var r=window.JSON.parse(n[0]);if(Object.isInstanceOfType(r))i=this._createDeserializedDataWithDictionary$p$0(n,t);else if(Number.isInstanceOfType(r))i=this._createDeserializedDataWithInt$p$0(n,t);else throw Error.notImplemented("Return data type from host must be Dictionary or int");return i},_createDeserializedDataWithDictionary$p$0:function(n,t){var i=window.JSON.parse(n[0]);if(t){i.error=!0;i.errorCode=9030}else if(n.length>1&&n[1]){i.error=!0;i.errorCode=n[1]}else i.error=!1;return i},_createDeserializedDataWithInt$p$0:function(n,t){var i={};i.error=!0;i.errorCode=n[0];return i},invokeHostMethod:function(n,t,i){var f=+new Date;var o=this;var e=function(t,r){if(window.OSF.AppTelemetry){var u=r;var e=-1;u&&u.errorCode&&(e=u.errorCode);window.OSF.AppTelemetry.onMethodDone(n,null,Math.abs(+new Date-f),e)}i&&i(t,r)};if(64===this._officeAppContext$p$0.get_appName()){var r={ApiParams:t};r.MethodData={ControlId:u._OfficeAppFactory.getId(),DispatchId:n};r=window.OSF.DDA.OutlookAppOm.addAdditionalArgs(n,r);n===1?this.get_clientEndPoint().invoke("GetInitialData",e,r):this.get_clientEndPoint().invoke("ExecuteMethod",e,r)}else this._isOwaOnlyMethod$p$0(n)?i&&i(-2,null):this.callOutlookDispatcher(n,t,i,f)},callOutlookDispatcher:function(n,t,i,r){var e=this.convertToOutlookParameters(n,t);var f=this;u.ClientHostController.execute(n,e,function(t,u){var h=-1;var e=null;var o=t.toArray();if(o.length>0){var s=f.getItemNumberFromOutlookResponse(o);var l=s>0;var c=l&&s>f._additionalOutlookParams$p$0._itemNumber$p$0;e=f.createDeserializedData(o,c);e&&e.errorCode&&(h=e.errorCode)}else if(i)throw Error.argumentNull("responseData","Unexpected null/empty data from host.");if(window.OSF.AppTelemetry)window.OSF.AppTelemetry.onMethodDone(n,null,Math.abs(+new Date-r),h);i&&i(u,e)})},_dictionaryToDate$i$0:function(n){var t=new Date(n.year,n.month,n.date,n.hours,n.minutes,n.seconds,n.milliseconds?n.milliseconds:0);if(window.isNaN(t.getTime()))throw Error.format(window._u.ExtensibilityStrings.l_InvalidDate_Text);return t},_dateToDictionary$i$0:function(n){var t={};t.month=n.getMonth();t.date=n.getDate();t.year=n.getFullYear();t.hours=n.getHours();t.minutes=n.getMinutes();t.seconds=n.getSeconds();t.milliseconds=n.getMilliseconds();return t},_isOwaOnlyMethod$p$0:function(n){switch(n){case 402:case 401:case 400:case 403:return!0;default:return!1}},isOutlook16OrGreater:function(){var n=this._initialData$p$0.get__hostVersion$i$0();var i=0;var t=0;if(n){i=n.indexOf(".");t=window.parseInt(n.substring(0,i))}return t>=16},isApiVersionSupported:function(n){var r=!1;try{var u=window.JSON.parse(this._officeAppContext$p$0.get_requirementMatrix());var f=u.Mailbox;var i=f.split(".");var t=n.split(".");(window.parseInt(i[0])>window.parseInt(t[0])||window.parseInt(i[0])===window.parseInt(t[0])&&window.parseInt(i[1])>=window.parseInt(t[1]))&&(r=!0)}catch(e){}return r},convertToOutlookParameters:function(n,t){var i=null;var r={};switch(n){case 1:case 2:case 3:case 14:case 18:case 26:case 32:case 41:case 34:case 99:break;case 12:r.isRest=t.isRest;break;case 4:var f=window.JSON.stringify(t.customProperties);i=[f];break;case 5:i=[t.body];break;case 8:case 9:i=[t.itemId];break;case 7:i=[window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.requiredAttendees),window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.optionalAttendees),t.start,t.end,t.location,window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.resources),t.subject,t.body];break;case 44:i=[window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.toRecipients),window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.ccRecipients),window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.bccRecipients),t.subject,t.htmlBody,t.attachments];break;case 43:i=[t.ewsIdOrEmail];break;case 45:i=[t.module,t.queryString];break;case 40:i=[t.extensionId,t.consentState];break;case 11:case 10:i=[t.htmlBody];break;case 31:case 30:i=[t.htmlBody,t.attachments];break;case 100:r=t;break;case 23:case 13:case 38:case 29:i=[t.data,t.coercionType];break;case 37:case 28:i=[t.coercionType];break;case 17:i=[t.subject];break;case 15:i=[t.recipientField];break;case 22:case 21:i=[t.recipientField,window.OSF.DDA.OutlookAppOm._convertComposeEmailDictionaryParameterForSetApi$p(t.recipientArray)];break;case 19:i=[t.itemId,t.name];break;case 16:i=[t.uri,t.name,t.isInline];break;case 20:i=[t.attachmentIndex];break;case 25:i=[t.TimeProperty,t.time];break;case 24:i=[t.TimeProperty];break;case 27:i=[t.location];break;case 33:case 35:i=[t.key,t.type,t.persistent,t.message,t.icon];this._additionalOutlookParams$p$0.setActionsDefinition(t.actions);break;case 36:i=[t.key];break;case 101:r=t;break;default:break}if(n!==1){var u;this._additionalOutlookParams$p$0.updateOutlookExecuteParameters(u={val:i},r),i=u.val}return i},_displayNewAppointmentFormApi$p$0:function(n){var f=window.OSF.DDA.OutlookAppOm._validateAndNormalizeRecipientEmails$p(n.requiredAttendees,"requiredAttendees");var u=window.OSF.DDA.OutlookAppOm._validateAndNormalizeRecipientEmails$p(n.optionalAttendees,"optionalAttendees");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(n.location,0,window.OSF.DDA.OutlookAppOm._maxLocationLength$p,"location");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(n.body,0,window.OSF.DDA.OutlookAppOm.maxBodyLength,"body");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(n.subject,0,window.OSF.DDA.OutlookAppOm._maxSubjectLength$p,"subject");if(!r.ScriptHelpers.isNullOrUndefined(n.start)){window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(n.start,Date,"start");var s=n.start;n.start=s.getTime();if(!r.ScriptHelpers.isNullOrUndefined(n.end)){window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(n.end,Date,"end");var i=n.end;if(i=0&&n.getTime()-u<0)return window.parseInt(t.offset)}throw Error.format(window._u.ExtensibilityStrings.l_InvalidDate_Text);},_areStringsLoaded$p$0:function(){var n=!1;try{n=!r.ScriptHelpers.isNullOrUndefined(window._u.ExtensibilityStrings.l_EwsRequestOversized_Text)}catch(t){}return n},_loadLocalizedScript$p$0:function(n){for(var s=null,l="",a=document.getElementsByTagName("script"),o=a.length-1;o>=0;o--){var i=null;var v=a[o].attributes;if(v){var p=v.getNamedItem("src");p&&(i=p.value);if(i){var y=!1;i=i.toLowerCase();var f=i.indexOf("office_strings.js");if(f<0){f=i.indexOf("office_strings.debug.js");y=!0}if(f>0&&fu+1&&(l=r.substring(0,u+1));break}}}}if(s){var h=document.getElementsByTagName("head")[0];var t=null;var b=this;var e=function(){if(n&&(!t.readyState||t.readyState&&(t.readyState==="loaded"||t.readyState==="complete"))){t.onload=null;t.onreadystatechange=null;n()}};var c=this;var w=function(){if(!c._areStringsLoaded$p$0()){var n=l+"en-us/"+"outlook_strings.js";t.onload=null;t.onreadystatechange=null;t=c._createScriptElement$p$0(n);t.onload=e;t.onreadystatechange=e;h.appendChild(t)}};t=this._createScriptElement$p$0(s);t.onload=e;t.onreadystatechange=e;window.setTimeout(w,2e3);h.appendChild(t)}},_createScriptElement$p$0:function(n){var t=document.createElement("script");t.type="text/javascript";t.src=n;return t}};u.DDA.OutlookAppOm.prototype.initialize=function(n){if(!n){this._additionalOutlookParams$p$0=new r.AdditionalGlobalParameters(!0);this._initialData$p$0=null;this._item$p$0=null;return}var t="itemType";this._initialData$p$0=new r.InitialData(n);this._hostItemType$p$0=n[t];1===n[t]?this._item$p$0=new r.Message(this._initialData$p$0):3===n[t]?this._item$p$0=new r.MeetingRequest(this._initialData$p$0):2===n[t]?this._item$p$0=new r.Appointment(this._initialData$p$0):4===n[t]?this._item$p$0=new r.MessageCompose(this._initialData$p$0):5===n[t]?this._item$p$0=new r.AppointmentCompose(this._initialData$p$0):6===n[t];this._userProfile$p$0=new r.UserProfile(this._initialData$p$0);this._diagnostics$p$0=new r.Diagnostics(this._initialData$p$0,this._officeAppContext$p$0.get_appName());var i=window.OSF.DDA.OutlookAppOm._instance$p.get__appName$i$0()!==8||this.isOutlook16OrGreater()||this.isApiVersionSupported("1.5");this._additionalOutlookParams$p$0=new r.AdditionalGlobalParameters(i);"itemNumber"in n&&this.setCurrentItemNumber(n.itemNumber);this._initializeMethods$p$0();r.InitialData._defineReadOnlyProperty$i(this,"item",this.$$d_getItem);r.InitialData._defineReadOnlyProperty$i(this,"userProfile",this.$$d__getUserProfile$p$0);r.InitialData._defineReadOnlyProperty$i(this,"diagnostics",this.$$d__getDiagnostics$p$0);r.InitialData._defineReadOnlyProperty$i(this,"ewsUrl",this.$$d__getEwsUrl$p$0);r.InitialData._defineReadOnlyProperty$i(this,"restUrl",this.$$d__getRestUrl$p$0);window.OSF.DDA.OutlookAppOm._instance$p.get__appName$i$0()===64&&this._initialData$p$0.get__overrideWindowOpen$i$0()&&(window.open=this.$$d_windowOpenOverrideHandler);this.addEventSupport()};u.DDA.OutlookAppOm.prototype.makeEwsRequestAsync=function(n){for(var u=[],i=1;iwindow.OSF.DDA.OutlookAppOm._maxEwsRequestSize$p)throw Error.argument("data",window._u.ExtensibilityStrings.l_EwsRequestOversized_Text);this._throwOnMethodCallForInsufficientPermission$i$0(3,"makeEwsRequestAsync");var f=r.CommonParameters.parse(u,!0,!0);var t=new r.EwsRequest(f._asyncContext$p$0);var e=this;t.onreadystatechange=function(){4===t.get__requestState$i$1()&&f._callback$p$0(t._asyncResult$p$0)};t.send(n)};u.DDA.OutlookAppOm.prototype.recordDataPoint=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");this.invokeHostMethod(402,n,null)};u.DDA.OutlookAppOm.prototype.recordTrace=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");this.invokeHostMethod(401,n,null)};u.DDA.OutlookAppOm.prototype.trackCtq=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");this.invokeHostMethod(400,n,null)};u.DDA.OutlookAppOm.prototype.convertToLocalClientTime=function(n){var t=new Date(n.getTime());var i=t.getTimezoneOffset()*-1;if(this._initialData$p$0&&this._initialData$p$0.get__timeZoneOffsets$i$0()){t.setUTCMinutes(t.getUTCMinutes()-i);i=this._findOffset$p$0(t);t.setUTCMinutes(t.getUTCMinutes()+i)}var r=this._dateToDictionary$i$0(t);r.timezoneOffset=i;return r};u.DDA.OutlookAppOm.prototype.convertToUtcClientTime=function(n){var t=this._dictionaryToDate$i$0(n);if(this._initialData$p$0&&this._initialData$p$0.get__timeZoneOffsets$i$0()){var i=this._findOffset$p$0(t);t.setUTCMinutes(t.getUTCMinutes()-i);i=n.timezoneOffset?n.timezoneOffset:t.getTimezoneOffset()*-1;t.setUTCMinutes(t.getUTCMinutes()+i)}return t};u.DDA.OutlookAppOm.prototype.convertToRestId=function(n,t){if(!n)throw Error.argumentNull("itemId");window.OSF.DDA.OutlookAppOm._throwOnInvalidRestVersion$p(t);return n.replace(new RegExp("[/]","g"),"-").replace(new RegExp("[+]","g"),"_")};u.DDA.OutlookAppOm.prototype.convertToEwsId=function(n,t){if(!n)throw Error.argumentNull("itemId");window.OSF.DDA.OutlookAppOm._throwOnInvalidRestVersion$p(t);return n.replace(new RegExp("[-]","g"),"/").replace(new RegExp("[_]","g"),"+")};u.DDA.OutlookAppOm.prototype.getUserIdentityTokenAsync=function(){for(var i=[],n=0;n32768){var f=window.OSF.DDA.OutlookAppOm._instance$p.createAsyncResult(null,1,9019,n._asyncContext$p$0,"");var e=this;window.setTimeout(function(){n._callback$p$0(f)},0);return}window.OSF.DDA.OutlookAppOm._instance$p.get__appName$i$0()===64?this._saveSettingsForOwa$p$0(n._callback$p$0,n._asyncContext$p$0):this._saveSettingsForOutlook$p$0(n._callback$p$0,n._asyncContext$p$0)};Type.registerNamespace("$h");var r=window.$h||{};Type.registerNamespace("Office.cast");var f=window.Office||{};f.cast=f.cast||{};r.AdditionalGlobalParameters=function(n){this._parameterBlobSupported$p$0=n;this._itemNumber$p$0=0};r.AdditionalGlobalParameters.prototype={_parameterBlobSupported$p$0:!1,_itemNumber$p$0:0,_actionsDefinition$p$0:null,setActionsDefinition:function(n){this._actionsDefinition$p$0=n},setCurrentItemNumber:function(n){n>0&&(this._itemNumber$p$0=n)},get_itemNumber:function(){return this._itemNumber$p$0},get_actionsDefinition:function(){return this._actionsDefinition$p$0},updateOutlookExecuteParameters:function(n,t){if(this._parameterBlobSupported$p$0){this._itemNumber$p$0>0&&(t.itemNumber=this._itemNumber$p$0.toString());this._actionsDefinition$p$0&&(t.actions=this._actionsDefinition$p$0);if(!Object.keys(t).length)return;n.val||(n.val=[]);n.val.push(window.JSON.stringify(t))}}};r.Appointment=function(n){this.$$d__getOrganizer$p$2=Function.createDelegate(this,this._getOrganizer$p$2);this.$$d__getNormalizedSubject$p$2=Function.createDelegate(this,this._getNormalizedSubject$p$2);this.$$d__getSubject$p$2=Function.createDelegate(this,this._getSubject$p$2);this.$$d__getResources$p$2=Function.createDelegate(this,this._getResources$p$2);this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2);this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2);this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2);this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2);this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2);r.Appointment.initializeBase(this,[n]);r.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2);r.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2);r.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2);r.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"resources",this.$$d__getResources$p$2);r.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2);r.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2);r.InitialData._defineReadOnlyProperty$i(this,"organizer",this.$$d__getOrganizer$p$2)};r.Appointment.prototype={getItemType:function(){return window.Microsoft.Office.WebExtension.MailboxEnums.ItemType.Appointment},_getStart$p$2:function(){return this._data$p$0.get__start$i$0()},_getEnd$p$2:function(){return this._data$p$0.get__end$i$0()},_getLocation$p$2:function(){return this._data$p$0.get__location$i$0()},_getOptionalAttendees$p$2:function(){return this._data$p$0.get__cc$i$0()},_getRequiredAttendees$p$2:function(){return this._data$p$0.get__to$i$0()},_getResources$p$2:function(){return this._data$p$0.get__resources$i$0()},_getSubject$p$2:function(){return this._data$p$0.get__subject$i$0()},_getNormalizedSubject$p$2:function(){return this._data$p$0.get__normalizedSubject$i$0()},_getOrganizer$p$2:function(){return this._data$p$0.get__organizer$i$0()}};r.Appointment.prototype.getEntities=function(){return this._data$p$0._getEntities$i$0()};r.Appointment.prototype.getEntitiesByType=function(n){return this._data$p$0._getEntitiesByType$i$0(n)};r.Appointment.prototype.getSelectedEntities=function(){return this._data$p$0._getSelectedEntities$i$0()};r.Appointment.prototype.getRegExMatches=function(){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches");return this._data$p$0._getRegExMatches$i$0()};r.Appointment.prototype.getFilteredEntitiesByName=function(n){return this._data$p$0._getFilteredEntitiesByName$i$0(n)};r.Appointment.prototype.getRegExMatchesByName=function(n){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName");return this._data$p$0._getRegExMatchesByName$i$0(n)};r.Appointment.prototype.getSelectedRegExMatches=function(){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedRegExMatches");return this._data$p$0._getSelectedRegExMatches$i$0()};r.Appointment.prototype.displayReplyForm=function(n){window.OSF.DDA.OutlookAppOm._instance$p._displayReplyForm$i$0(n)};r.Appointment.prototype.displayReplyAllForm=function(n){window.OSF.DDA.OutlookAppOm._instance$p._displayReplyAllForm$i$0(n)};r.AppointmentCompose=function(n){this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2);this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2);this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2);this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2);this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2);r.AppointmentCompose.initializeBase(this,[n]);r.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2);r.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2);r.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2)};r.AppointmentCompose.prototype={_requiredAttendees$p$2:null,_optionalAttendees$p$2:null,_start$p$2:null,_end$p$2:null,_location$p$2:null,getItemType:function(){return window.Microsoft.Office.WebExtension.MailboxEnums.ItemType.Appointment},_getRequiredAttendees$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._requiredAttendees$p$2||(this._requiredAttendees$p$2=new r.ComposeRecipient(0,"requiredAttendees"));return this._requiredAttendees$p$2},_getOptionalAttendees$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._optionalAttendees$p$2||(this._optionalAttendees$p$2=new r.ComposeRecipient(1,"optionalAttendees"));return this._optionalAttendees$p$2},_getStart$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._start$p$2||(this._start$p$2=new r.ComposeTime(1));return this._start$p$2},_getEnd$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._end$p$2||(this._end$p$2=new r.ComposeTime(2));return this._end$p$2},_getLocation$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._location$p$2||(this._location$p$2=new r.ComposeLocation);return this._location$p$2}};r.AttachmentConstants=function(){};r.AttachmentDetails=function(n){this.$$d__getIsInline$p$0=Function.createDelegate(this,this._getIsInline$p$0);this.$$d__getAttachmentType$p$0=Function.createDelegate(this,this._getAttachmentType$p$0);this.$$d__getSize$p$0=Function.createDelegate(this,this._getSize$p$0);this.$$d__getContentType$p$0=Function.createDelegate(this,this._getContentType$p$0);this.$$d__getName$p$0=Function.createDelegate(this,this._getName$p$0);this.$$d__getId$p$0=Function.createDelegate(this,this._getId$p$0);this._data$p$0=n;r.InitialData._defineReadOnlyProperty$i(this,"id",this.$$d__getId$p$0);r.InitialData._defineReadOnlyProperty$i(this,"name",this.$$d__getName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"contentType",this.$$d__getContentType$p$0);r.InitialData._defineReadOnlyProperty$i(this,"size",this.$$d__getSize$p$0);r.InitialData._defineReadOnlyProperty$i(this,"attachmentType",this.$$d__getAttachmentType$p$0);r.InitialData._defineReadOnlyProperty$i(this,"isInline",this.$$d__getIsInline$p$0)};r.AttachmentDetails.prototype={_data$p$0:null,_getId$p$0:function(){return this._data$p$0.id},_getName$p$0:function(){return this._data$p$0.name},_getContentType$p$0:function(){return this._data$p$0.contentType},_getSize$p$0:function(){return this._data$p$0.size},_getAttachmentType$p$0:function(){var n=this._data$p$0.attachmentType;return n255)throw Error.argumentOutOfRange("recipients",n.length,window._u.ExtensibilityStrings.l_DisplayNameTooLong_Text);if(t&&t.length>571)throw Error.argumentOutOfRange("recipients",t.length,window._u.ExtensibilityStrings.l_EmailAddressTooLong_Text);};r.ComposeRecipient._getAsyncFormatter$p=function(n){for(var u=n,i=[],t=0;t864e13)throw Error.argumentOutOfRange("dateTime");var i=r.CommonParameters.parse(u,!1);window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(25,{TimeProperty:this._timeType$p$0,time:n.getTime()},null,i._asyncContext$p$0,i._callback$p$0)};r.ComposeTime.TimeType=function(){};r.ComposeTime.TimeType.prototype={start:1,end:2};r.ComposeTime.TimeType.registerEnum("$h.ComposeTime.TimeType",!1);r.Contact=function(n){this.$$d__getContactString$p$0=Function.createDelegate(this,this._getContactString$p$0);this.$$d__getAddresses$p$0=Function.createDelegate(this,this._getAddresses$p$0);this.$$d__getUrls$p$0=Function.createDelegate(this,this._getUrls$p$0);this.$$d__getEmailAddresses$p$0=Function.createDelegate(this,this._getEmailAddresses$p$0);this.$$d__getPhoneNumbers$p$0=Function.createDelegate(this,this._getPhoneNumbers$p$0);this.$$d__getBusinessName$p$0=Function.createDelegate(this,this._getBusinessName$p$0);this.$$d__getPersonName$p$0=Function.createDelegate(this,this._getPersonName$p$0);this._data$p$0=n;r.InitialData._defineReadOnlyProperty$i(this,"personName",this.$$d__getPersonName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"businessName",this.$$d__getBusinessName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0);r.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0);r.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0);r.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0);r.InitialData._defineReadOnlyProperty$i(this,"contactString",this.$$d__getContactString$p$0)};r.Contact.prototype={_data$p$0:null,_phoneNumbers$p$0:null,_getPersonName$p$0:function(){return this._data$p$0.PersonName},_getBusinessName$p$0:function(){return this._data$p$0.BusinessName},_getAddresses$p$0:function(){return r.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses")},_getEmailAddresses$p$0:function(){return r.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses")},_getUrls$p$0:function(){return r.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls")},_getPhoneNumbers$p$0:function(){if(!this._phoneNumbers$p$0){var n=this;this._phoneNumbers$p$0=r.Entities._getExtractedObjects$i(r.PhoneNumber,this._data$p$0,"PhoneNumbers",function(n){return new r.PhoneNumber(n)})}return this._phoneNumbers$p$0},_getContactString$p$0:function(){return this._data$p$0.ContactString}};r.CustomProperties=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");if(Array.isInstanceOfType(n)){var t=n;if(t.length>0)this._data$p$0=t[0];else throw Error.argument("data");}else this._data$p$0=n};r.CustomProperties.prototype={_data$p$0:null};r.CustomProperties.prototype.get=function(n){var i=this._data$p$0[n];if(typeof i=="string"){var t=i;if(t.length>6&&t.startsWith("Date(")&&t.endsWith(")")){var f=t.substring(5,t.length-1);var r=window.parseInt(f);if(!window.isNaN(r)){var u=new Date(r);u&&(i=u)}}}return i};r.CustomProperties.prototype.set=function(n,t){window.OSF.OUtil.isDate(t)&&(t="Date("+t.getTime()+")");this._data$p$0[n]=t};r.CustomProperties.prototype.remove=function(n){delete this._data$p$0[n]};r.CustomProperties.prototype.saveAsync=function(){for(var i=[],n=0;nf)throw Error.argument();var t=r.CommonParameters.parse(i,!1,!0);var u=new r.SaveDictionaryRequest(t._callback$p$0,t._asyncContext$p$0);u._sendRequest$i$0(4,"SaveCustomProperties",{customProperties:this._data$p$0})};r.Diagnostics=function(n,t){this.$$d__getOwaView$p$0=Function.createDelegate(this,this._getOwaView$p$0);this.$$d__getHostVersion$p$0=Function.createDelegate(this,this._getHostVersion$p$0);this.$$d__getHostName$p$0=Function.createDelegate(this,this._getHostName$p$0);this._data$p$0=n;this._appName$p$0=t;r.InitialData._defineReadOnlyProperty$i(this,"hostName",this.$$d__getHostName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"hostVersion",this.$$d__getHostVersion$p$0);64===this._appName$p$0&&r.InitialData._defineReadOnlyProperty$i(this,"OWAView",this.$$d__getOwaView$p$0)};r.Diagnostics.prototype={_data$p$0:null,_appName$p$0:0,_getHostName$p$0:function(){switch(this._appName$p$0){case 8:return"Outlook";case 64:return"OutlookWebApp";case 65536:return"OutlookIOS";case 4194304:return"OutlookAndroid";default:return null}},_getHostVersion$p$0:function(){return this._data$p$0.get__hostVersion$i$0()},_getOwaView$p$0:function(){return this._data$p$0.get__owaView$i$0()}};r.EmailAddressDetails=function(n){this.$$d__getRecipientType$p$0=Function.createDelegate(this,this._getRecipientType$p$0);this.$$d__getAppointmentResponse$p$0=Function.createDelegate(this,this._getAppointmentResponse$p$0);this.$$d__getDisplayName$p$0=Function.createDelegate(this,this._getDisplayName$p$0);this.$$d__getEmailAddress$p$0=Function.createDelegate(this,this._getEmailAddress$p$0);this._data$p$0=n;r.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0);r.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0);r.ScriptHelpers.dictionaryContainsKey(n,"appointmentResponse")&&r.InitialData._defineReadOnlyProperty$i(this,"appointmentResponse",this.$$d__getAppointmentResponse$p$0);r.ScriptHelpers.dictionaryContainsKey(n,"recipientType")&&r.InitialData._defineReadOnlyProperty$i(this,"recipientType",this.$$d__getRecipientType$p$0)};r.EmailAddressDetails._createFromEmailUserDictionary$i=function(n){var t={};var u=n.Name;var i=n.UserId;t.name=u||r.EmailAddressDetails._emptyString$p;t.address=i||r.EmailAddressDetails._emptyString$p;return new r.EmailAddressDetails(t)};r.EmailAddressDetails.prototype={_data$p$0:null,_getEmailAddress$p$0:function(){return this._data$p$0.address},_getDisplayName$p$0:function(){return this._data$p$0.name},_getAppointmentResponse$p$0:function(){var n=this._data$p$0.appointmentResponse;return n=0;u--){for(var e=!1,f=u-1;f>=0;f--)if(i(t[u],t[f],r)){e=!0;break}e&&Array.removeAt(t,u)}return t};r.Entities.prototype={_dateTimeSent$p$0:null,_data$p$0:null,_filteredData$p$0:null,_filteredEntitiesCache$p$0:null,_permissionLevel$p$0:0,_taskSuggestions$p$0:null,_meetingSuggestions$p$0:null,_phoneNumbers$p$0:null,_contacts$p$0:null,_addresses$p$0:null,_emailAddresses$p$0:null,_urls$p$0:null,_flightReservations$p$0:null,_parcelDeliveries$p$0:null,_getByType$i$0:function(n){if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.MeetingSuggestion)return this._getMeetingSuggestions$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.TaskSuggestion)return this._getTaskSuggestions$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.Address)return this._getAddresses$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.PhoneNumber)return this._getPhoneNumbers$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.EmailAddress)return this._getEmailAddresses$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.Url)return this._getUrls$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.Contact)return this._getContacts$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.FlightReservations)return this._getFlightReservations$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.ParcelDeliveries)return this._getParcelDeliveries$p$0();return null},_getFilteredEntitiesByName$i$0:function(n){this._filteredEntitiesCache$p$0||(this._filteredEntitiesCache$p$0={});if(!r.ScriptHelpers.dictionaryContainsKey(this._filteredEntitiesCache$p$0,n)){for(var u=!1,i=0;i0)return new Date(n.getFullYear()+t._offset$i$1,0,1);break;default:break}return n};r.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p=function(n,t,i){if(t>-5&&t<5){var u=(i+6)%7+1;var r=7*t+(u-n.getDay());n.setDate(n.getDate()+r);return n}else{var r=(i-n.getDay())%7;r<0&&(r+=7);n.setDate(n.getDate()+r);return n}};r.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p=function(n,t){var e;var i;var u;e=n;if(t._tag$i$1<=0||t._tag$i$1>12||t._offset$i$1<=0||t._offset$i$1>5)return n;var o=(12+t._tag$i$1-e.getMonth()-1)%12;i=new Date(e.getFullYear(),e.getMonth()+o,1);if(t._modifier$i$1===1)if(t._offset$i$1===1&&i.getDay()!==6&&i.getDay())return i;else{u=new Date(i.getFullYear(),i.getMonth(),i.getDate());u.setDate(u.getDate()+(8-i.getDay())%7);i.getDay()!==6&&i.getDay()&&i.getDay()!==1&&u.setDate(u.getDate()-7);u.setDate(u.getDate()+7*(t._offset$i$1-1));return u.getMonth()+1!==t._tag$i$1?n:u}else{u=new Date(i.getFullYear(),i.getMonth(),r.MeetingSuggestionTimeDecoder._daysInMonth$p(i.getMonth(),i.getFullYear()));var f=1-u.getDay();f>0&&(f=f-7);u.setDate(u.getDate()+f);u.setDate(u.getDate()+7*(1-t._offset$i$1));return u.getMonth()+1!==t._tag$i$1?i.getDay()!==6&&i.getDay()?i:n:u}};r.MeetingSuggestionTimeDecoder._decode$p=function(n,t,i,u){var o=32767;i.val=null;u.val=0;if(!n)return!1;u.val=t?r.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p(n):r.MeetingSuggestionTimeDecoder._getTimeOfDayInMilliseconds$p(n);var s=n.getTime()-u.val;var f=(s-r.MeetingSuggestionTimeDecoder._baseDate$p.getTime())/864e5;if(f<0)return!1;else if(f>=262144)return!1;else{var e=f>>15;f=f&o;switch(e){case 0:return r.MeetingSuggestionTimeDecoder._decodePreciseDate$p(f,i);case 1:return r.MeetingSuggestionTimeDecoder._decodeRelativeDate$p(f,i);default:return!1}}};r.MeetingSuggestionTimeDecoder._decodePreciseDate$p=function(n,t){var c=7;var o=15;var s=31;var h=127;var f=null;var u=0;var e=0;t.val=null;var i=n>>12&c;if((i&4)==4){f=n>>5&h;if((i&2)==2){if((i&1)==1)return!1;u=n>>1&o}}else{(i&2)==2&&(u=n>>8&o);(i&1)==1&&(e=n>>3&s)}t.val=new r._preciseDate(e,u,f);return!0};r.MeetingSuggestionTimeDecoder._decodeRelativeDate$p=function(n,t){var s=15;var o=63;var c=7;var h=3;var u=n&s;n>>=4;var i=r.MeetingSuggestionTimeDecoder._fromComplement$p(n&o,6);n>>=6;var e=n&c;n>>=3;var f=n&h;try{t.val=new r._relativeDate(f,i,e,u);return!0}catch(l){t.val=null;return!1}};r.MeetingSuggestionTimeDecoder._fromComplement$p=function(n,t){var i=1<1)throw Error.argument("actions",window._u.ExtensibilityStrings.l_ActionsDefinitionMultipleActionsError_Text);}else throw Error.argument("actions",String.format(window._u.ExtensibilityStrings.l_InvalidParameterValueError_Text,"actions"));return i};r.NotificationMessages._validateActionsDefinitionActionType$p=function(n,t){if(!n.actionType)throw Error.argument("actionType",String.format(window._u.ExtensibilityStrings.l_NullOrEmptyParameterError_Text,"actionType"));if("showTaskPane"!==n.actionType)throw Error.argument("actionType",window._u.ExtensibilityStrings.l_InvalidActionType_Text);else if(!r.ScriptHelpers.isNonEmptyString(n.commandId))throw Error.argument("commandId",String.format(window._u.ExtensibilityStrings.l_InvalidCommandIdError_Text,"commandId"));};r.NotificationMessages._validateActionsDefinitionActionText$p=function(n){if(!r.ScriptHelpers.isNonEmptyString(n.actionText))throw Error.argument("actionText",String.format(window._u.ExtensibilityStrings.l_NullOrEmptyParameterError_Text,"actionText"));if(n.actionText.length>30)throw Error.argument(window._u.ExtensibilityStrings.l_ParameterValueTooLongError_Text,String.format(window._u.ExtensibilityStrings.l_ParameterValueTooLongError_Text,"actionText",30));};r.NotificationMessages.prototype.addAsync=function(n,t){for(var f=[],i=2;i2||!r.CommonParameters._argIsFunction$p(n[0]))return!1;f=n[0];i>1&&(u=n[1]);t.val=new r.CommonParameters(null,f,u);return!0};r.CommonParameters._argIsFunction$p=function(n){return typeof n=="function"};r.CommonParameters.prototype={_options$p$0:null,_callback$p$0:null,_asyncContext$p$0:null,get_options:function(){return this._options$p$0},get_callback:function(){return this._callback$p$0},get_asyncContext:function(){return this._asyncContext$p$0}};r.EwsRequest=function(n){r.EwsRequest.initializeBase(this,[n])};r.EwsRequest.prototype={readyState:1,status:0,statusText:null,onreadystatechange:null,responseText:null,get__statusCode$i$1:function(){return this.status},set__statusCode$i$1:function(n){this.status=n;return n},get__statusDescription$i$1:function(){return this.statusText},set__statusDescription$i$1:function(n){this.statusText=n;return n},get__requestState$i$1:function(){return this.readyState},set__requestState$i$1:function(n){this.readyState=n;return n},get_hasOnReadyStateChangeCallback:function(){return!r.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)},get__response$i$1:function(){return this.responseText},set__response$i$1:function(n){this.responseText=n;return n},send:function(n){this._checkSendConditions$i$1();r.ScriptHelpers.isNullOrUndefined(n)&&this._throwInvalidStateException$i$1();this._sendRequest$i$0(5,"EwsRequest",{body:n})},_callOnReadyStateChangeCallback$i$1:function(){r.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)||this.onreadystatechange()},_parseExtraResponseData$i$1:function(n){},executeExtraFailedResponseSteps:function(){}};r.InitialData=function(n){this._data$p$0=n;this._permissionLevel$p$0=this._calculatePermissionLevel$p$0()};r.InitialData._defineReadOnlyProperty$i=function(n,t,i){var r={get:i,configurable:!1};window.Object.defineProperty(n,t,r)};r.InitialData.prototype={_toRecipients$p$0:null,_ccRecipients$p$0:null,_attachments$p$0:null,_resources$p$0:null,_entities$p$0:null,_selectedEntities$p$0:null,_data$p$0:null,_permissionLevel$p$0:0,get__isRestIdSupported$i$0:function(){return this._data$p$0.isRestIdSupported},get__itemId$i$0:function(){return this._data$p$0.id},get__itemClass$i$0:function(){return this._data$p$0.itemClass},get__dateTimeCreated$i$0:function(){return new Date(this._data$p$0.dateTimeCreated)},get__dateTimeModified$i$0:function(){return new Date(this._data$p$0.dateTimeModified)},get__dateTimeSent$i$0:function(){return new Date(this._data$p$0.dateTimeSent)},get__subject$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();return this._data$p$0.subject},get__normalizedSubject$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();return this._data$p$0.normalizedSubject},get__internetMessageId$i$0:function(){return this._data$p$0.internetMessageId},get__conversationId$i$0:function(){return this._data$p$0.conversationId},get__sender$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();var n=this._data$p$0.sender;return r.ScriptHelpers.isNullOrUndefined(n)?null:new r.EmailAddressDetails(n)},get__from$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();var n=this._data$p$0.from;return r.ScriptHelpers.isNullOrUndefined(n)?null:new r.EmailAddressDetails(n)},get__to$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._toRecipients$p$0&&(this._toRecipients$p$0=this._createEmailAddressDetails$p$0("to"));return this._toRecipients$p$0},get__cc$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._ccRecipients$p$0&&(this._ccRecipients$p$0=this._createEmailAddressDetails$p$0("cc"));return this._ccRecipients$p$0},get__attachments$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._attachments$p$0&&(this._attachments$p$0=this._createAttachmentDetails$p$0());return this._attachments$p$0},get__ewsUrl$i$0:function(){return this._data$p$0.ewsUrl},get__restUrl$i$0:function(){return this._data$p$0.restUrl},get__marketplaceAssetId$i$0:function(){return this._data$p$0.marketplaceAssetId},get__extensionId$i$0:function(){return this._data$p$0.extensionId},get__marketplaceContentMarket$i$0:function(){return this._data$p$0.marketplaceContentMarket},get__consentMetadata$i$0:function(){return this._data$p$0.consentMetadata},get__isRead$i$0:function(){return this._data$p$0.isRead},get__endNodeUrl$i$0:function(){return this._data$p$0.endNodeUrl},get__entryPointUrl$i$0:function(){return this._data$p$0.entryPointUrl},get__start$i$0:function(){return new Date(this._data$p$0.start)},get__end$i$0:function(){return new Date(this._data$p$0.end)},get__location$i$0:function(){return this._data$p$0.location},get__userProfileType$i$0:function(){return this._data$p$0.userProfileType},get__resources$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._resources$p$0&&(this._resources$p$0=this._createEmailAddressDetails$p$0("resources"));return this._resources$p$0},get__organizer$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();var n=this._data$p$0.organizer;return r.ScriptHelpers.isNullOrUndefined(n)?null:new r.EmailAddressDetails(n)},get__userProfileCapabilities$i$0:function(){return this._data$p$0.userProfileCapabilities},get__userDisplayName$i$0:function(){return this._data$p$0.userDisplayName},get__userEmailAddress$i$0:function(){return this._data$p$0.userEmailAddress},get__userTimeZone$i$0:function(){return this._data$p$0.userTimeZone},get__timeZoneOffsets$i$0:function(){return this._data$p$0.timeZoneOffsets},get__hostVersion$i$0:function(){return this._data$p$0.hostVersion},get__owaView$i$0:function(){return this._data$p$0.owaView},get__overrideWindowOpen$i$0:function(){return this._data$p$0.overrideWindowOpen},_getEntities$i$0:function(){this._entities$p$0||(this._entities$p$0=new r.Entities(this._data$p$0.entities,this._data$p$0.filteredEntities,this.get__dateTimeSent$i$0(),this._permissionLevel$p$0));return this._entities$p$0},_getSelectedEntities$i$0:function(){this._selectedEntities$p$0||(this._selectedEntities$p$0=new r.Entities(this._data$p$0.selectedEntities,null,this.get__dateTimeSent$i$0(),this._permissionLevel$p$0));return this._selectedEntities$p$0},_getEntitiesByType$i$0:function(n){var t=this._getEntities$i$0();return t._getByType$i$0(n)},_getFilteredEntitiesByName$i$0:function(n){var t=this._getEntities$i$0();return t._getFilteredEntitiesByName$i$0(n)},_getRegExMatches$i$0:function(){return this._data$p$0.regExMatches?this._data$p$0.regExMatches:null},_getSelectedRegExMatches$i$0:function(){return this._data$p$0.selectedRegExMatches?this._data$p$0.selectedRegExMatches:null},_getRegExMatchesByName$i$0:function(n){var t=this._getRegExMatches$i$0();return!t||!t[n]?null:t[n]},_throwOnRestrictedPermissionLevel$i$0:function(){window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0)},_createEmailAddressDetails$p$0:function(n){var i=this._data$p$0[n];if(r.ScriptHelpers.isNullOrUndefined(i))return[];for(var u=[],t=0;t 0) - bucketPositive.push(ele); - else if(ele.tabIndex===0) - bucket0.push(ele) - } - else - bucket0.push(ele) - } - bucketPositive=bucketPositive.sort(function(left, right) - { - var diff=left.tabIndex - right.tabIndex; - if(diff===0) - diff=bucketPositive.indexOf(left) - bucketPositive.indexOf(right); - return diff - }); - return[].concat(bucketPositive,bucket0) - } - return{ - set_entropy: function OSF_OUtil$set_entropy(entropy) - { - if(typeof entropy=="string") - for(var i=0; i < entropy.length; i+=4) - { - var temp=0; - for(var j=0; j < 4 && i+j < entropy.length; j++) - temp=(temp << 8)+entropy.charCodeAt(i+j); - _rndentropy ^=temp - } - else if(typeof entropy=="number") - _rndentropy ^=entropy; - else - _rndentropy ^=2147483647 * Math.random(); - _rndentropy &=2147483647 - }, - extend: function OSF_OUtil$extend(child, parent) - { - var F=function(){}; - F.prototype=parent.prototype; - child.prototype=new F; - child.prototype.constructor=child; - child.uber=parent.prototype; - if(parent.prototype.constructor===Object.prototype.constructor) - parent.prototype.constructor=parent - }, - setNamespace: function OSF_OUtil$setNamespace(name, parent) - { - if(parent && name && !parent[name]) - parent[name]={} - }, - unsetNamespace: function OSF_OUtil$unsetNamespace(name, parent) - { - if(parent && name && parent[name]) - delete parent[name] - }, - loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) - { - if(url && callback) - { - var doc=window.document; - var _loadedScriptEntry=_loadedScripts[url]; - if(!_loadedScriptEntry) - { - var script=doc.createElement("script"); - script.type="text/javascript"; - _loadedScriptEntry={ - loaded: false, - pendingCallbacks: [callback], - timer: null - }; - _loadedScripts[url]=_loadedScriptEntry; - var onLoadCallback=function OSF_OUtil_loadScript$onLoadCallback() - { - if(_loadedScriptEntry.timer !=null) - { - clearTimeout(_loadedScriptEntry.timer); - delete _loadedScriptEntry.timer - } - _loadedScriptEntry.loaded=true; - var pendingCallbackCount=_loadedScriptEntry.pendingCallbacks.length; - for(var i=0; i < pendingCallbackCount; i++) - { - var currentCallback=_loadedScriptEntry.pendingCallbacks.shift(); - currentCallback() - } - }; - var onLoadError=function OSF_OUtil_loadScript$onLoadError() - { - delete _loadedScripts[url]; - if(_loadedScriptEntry.timer !=null) - { - clearTimeout(_loadedScriptEntry.timer); - delete _loadedScriptEntry.timer - } - var pendingCallbackCount=_loadedScriptEntry.pendingCallbacks.length; - for(var i=0; i < pendingCallbackCount; i++) - { - var currentCallback=_loadedScriptEntry.pendingCallbacks.shift(); - currentCallback() - } - }; - if(script.readyState) - script.onreadystatechange=function() - { - if(script.readyState=="loaded" || script.readyState=="complete") - { - script.onreadystatechange=null; - onLoadCallback() - } - }; - else - script.onload=onLoadCallback; - script.onerror=onLoadError; - timeoutInMs=timeoutInMs || _defaultScriptLoadingTimeout; - _loadedScriptEntry.timer=setTimeout(onLoadError,timeoutInMs); - script.setAttribute("crossOrigin","anonymous"); - script.src=url; - doc.getElementsByTagName("head")[0].appendChild(script) - } - else if(_loadedScriptEntry.loaded) - callback(); - else - _loadedScriptEntry.pendingCallbacks.push(callback) - } - }, - loadCSS: function OSF_OUtil$loadCSS(url) - { - if(url) - { - var doc=window.document; - var link=doc.createElement("link"); - link.type="text/css"; - link.rel="stylesheet"; - link.href=url; - doc.getElementsByTagName("head")[0].appendChild(link) - } - }, - parseEnum: function OSF_OUtil$parseEnum(str, enumObject) - { - var parsed=enumObject[str.trim()]; - if(typeof parsed=="undefined") - { - OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:"+str); - throw OsfMsAjaxFactory.msAjaxError.argument("str"); - } - return parsed - }, - delayExecutionAndCache: function OSF_OUtil$delayExecutionAndCache() - { - var obj={calc: arguments[0]}; - return function() - { - if(obj.calc) - { - obj.val=obj.calc.apply(this,arguments); - delete obj.calc - } - return obj.val - } - }, - getUniqueId: function OSF_OUtil$getUniqueId() - { - _uniqueId=_uniqueId+1; - return _uniqueId.toString() - }, - formatString: function OSF_OUtil$formatString() - { - var args=arguments; - var source=args[0]; - return source.replace(/{(\d+)}/gm,function(match, number) - { - var index=parseInt(number,10)+1; - return args[index]===undefined ? "{"+number+"}" : args[index] - }) - }, - generateConversationId: function OSF_OUtil$generateConversationId() - { - return[_random(),_random(),(new Date).getTime().toString()].join("_") - }, - getFrameName: function OSF_OUtil$getFrameName(cacheKey) - { - return _xdmSessionKeyPrefix+cacheKey+this.generateConversationId() - }, - addXdmInfoAsHash: function OSF_OUtil$addXdmInfoAsHash(url, xdmInfoValue) - { - return OSF.OUtil.addInfoAsHash(url,_xdmInfoKey,xdmInfoValue,false) - }, - addSerializerVersionAsHash: function OSF_OUtil$addSerializerVersionAsHash(url, serializerVersion) - { - return OSF.OUtil.addInfoAsHash(url,_serializerVersionKey,serializerVersion,true) - }, - addInfoAsHash: function OSF_OUtil$addInfoAsHash(url, keyName, infoValue, encodeInfo) - { - url=url.trim() || ""; - var urlParts=url.split(_fragmentSeparator); - var urlWithoutFragment=urlParts.shift(); - var fragment=urlParts.join(_fragmentSeparator); - var newFragment; - if(encodeInfo) - newFragment=[keyName,encodeURIComponent(infoValue),fragment].join(""); - else - newFragment=[fragment,keyName,infoValue].join(""); - return[urlWithoutFragment,_fragmentSeparator,newFragment].join("") - }, - parseHostInfoFromWindowName: function OSF_OUtil$parseHostInfoFromWindowName(skipSessionStorage, windowName) - { - return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage,windowName,OSF.WindowNameItemKeys.HostInfo) - }, - parseXdmInfo: function OSF_OUtil$parseXdmInfo(skipSessionStorage) - { - var xdmInfoValue=OSF.OUtil.parseXdmInfoWithGivenFragment(skipSessionStorage,window.location.hash); - if(!xdmInfoValue) - xdmInfoValue=OSF.OUtil.parseXdmInfoFromWindowName(skipSessionStorage,window.name); - return xdmInfoValue - }, - parseXdmInfoFromWindowName: function OSF_OUtil$parseXdmInfoFromWindowName(skipSessionStorage, windowName) - { - return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage,windowName,OSF.WindowNameItemKeys.XdmInfo) - }, - parseXdmInfoWithGivenFragment: function OSF_OUtil$parseXdmInfoWithGivenFragment(skipSessionStorage, fragment) - { - return OSF.OUtil.parseInfoWithGivenFragment(_xdmInfoKey,_xdmSessionKeyPrefix,false,skipSessionStorage,fragment) - }, - parseSerializerVersion: function OSF_OUtil$parseSerializerVersion(skipSessionStorage) - { - var serializerVersion=OSF.OUtil.parseSerializerVersionWithGivenFragment(skipSessionStorage,window.location.hash); - if(isNaN(serializerVersion)) - serializerVersion=OSF.OUtil.parseSerializerVersionFromWindowName(skipSessionStorage,window.name); - return serializerVersion - }, - parseSerializerVersionFromWindowName: function OSF_OUtil$parseSerializerVersionFromWindowName(skipSessionStorage, windowName) - { - return parseInt(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage,windowName,OSF.WindowNameItemKeys.SerializerVersion)) - }, - parseSerializerVersionWithGivenFragment: function OSF_OUtil$parseSerializerVersionWithGivenFragment(skipSessionStorage, fragment) - { - return parseInt(OSF.OUtil.parseInfoWithGivenFragment(_serializerVersionKey,_serializerVersionKeyPrefix,true,skipSessionStorage,fragment)) - }, - parseInfoFromWindowName: function OSF_OUtil$parseInfoFromWindowName(skipSessionStorage, windowName, infoKey) - { - try - { - var windowNameObj=JSON.parse(windowName); - var infoValue=windowNameObj !=null ? windowNameObj[infoKey] : null; - var osfSessionStorage=_getSessionStorage(); - if(!skipSessionStorage && osfSessionStorage && windowNameObj !=null) - { - var sessionKey=windowNameObj[OSF.WindowNameItemKeys.BaseFrameName]+infoKey; - if(infoValue) - osfSessionStorage.setItem(sessionKey,infoValue); - else - infoValue=osfSessionStorage.getItem(sessionKey) - } - return infoValue - } - catch(Exception) - { - return null - } - }, - parseInfoWithGivenFragment: function OSF_OUtil$parseInfoWithGivenFragment(infoKey, infoKeyPrefix, decodeInfo, skipSessionStorage, fragment) - { - var fragmentParts=fragment.split(infoKey); - var infoValue=fragmentParts.length > 1 ? fragmentParts[fragmentParts.length - 1] : null; - if(decodeInfo && infoValue !=null) - { - if(infoValue.indexOf(_fragmentInfoDelimiter) >=0) - infoValue=infoValue.split(_fragmentInfoDelimiter)[0]; - infoValue=decodeURIComponent(infoValue) - } - var osfSessionStorage=_getSessionStorage(); - if(!skipSessionStorage && osfSessionStorage) - { - var sessionKeyStart=window.name.indexOf(infoKeyPrefix); - if(sessionKeyStart > -1) - { - var sessionKeyEnd=window.name.indexOf(";",sessionKeyStart); - if(sessionKeyEnd==-1) - sessionKeyEnd=window.name.length; - var sessionKey=window.name.substring(sessionKeyStart,sessionKeyEnd); - if(infoValue) - osfSessionStorage.setItem(sessionKey,infoValue); - else - infoValue=osfSessionStorage.getItem(sessionKey) - } - } - return infoValue - }, - getConversationId: function OSF_OUtil$getConversationId() - { - var searchString=window.location.search; - var conversationId=null; - if(searchString) - { - var index=searchString.indexOf("&"); - conversationId=index > 0 ? searchString.substring(1,index) : searchString.substr(1); - if(conversationId && conversationId.charAt(conversationId.length - 1)==="=") - { - conversationId=conversationId.substring(0,conversationId.length - 1); - if(conversationId) - conversationId=decodeURIComponent(conversationId) - } - } - return conversationId - }, - getInfoItems: function OSF_OUtil$getInfoItems(strInfo) - { - var items=strInfo.split("$"); - if(typeof items[1]=="undefined") - items=strInfo.split("|"); - if(typeof items[1]=="undefined") - items=strInfo.split("%7C"); - return items - }, - getXdmFieldValue: function OSF_OUtil$getXdmFieldValue(xdmFieldName, skipSessionStorage) - { - var fieldValue=""; - var xdmInfoValue=OSF.OUtil.parseXdmInfo(skipSessionStorage); - if(xdmInfoValue) - { - var items=OSF.OUtil.getInfoItems(xdmInfoValue); - if(items !=undefined && items.length >=3) - switch(xdmFieldName) - { - case OSF.XdmFieldName.ConversationUrl: - fieldValue=items[2]; - break; - case OSF.XdmFieldName.AppId: - fieldValue=items[1]; - break - } - } - return fieldValue - }, - validateParamObject: function OSF_OUtil$validateParamObject(params, expectedProperties, callback) - { - var e=Function._validateParams(arguments,[{ - name: "params", - type: Object, - mayBeNull: false - },{ - name: "expectedProperties", - type: Object, - mayBeNull: false - },{ - name: "callback", - type: Function, - mayBeNull: true - }]); - if(e) - throw e; - for(var p in expectedProperties) - { - e=Function._validateParameter(params[p],expectedProperties[p],p); - if(e) - throw e; - } - }, - writeProfilerMark: function OSF_OUtil$writeProfilerMark(text) - { - if(window.msWriteProfilerMark) - { - window.msWriteProfilerMark(text); - OsfMsAjaxFactory.msAjaxDebug.trace(text) - } - }, - outputDebug: function OSF_OUtil$outputDebug(text) - { - if(typeof OsfMsAjaxFactory !=="undefined" && OsfMsAjaxFactory.msAjaxDebug && OsfMsAjaxFactory.msAjaxDebug.trace) - OsfMsAjaxFactory.msAjaxDebug.trace(text) - }, - defineNondefaultProperty: function OSF_OUtil$defineNondefaultProperty(obj, prop, descriptor, attributes) - { - descriptor=descriptor || {}; - for(var nd in attributes) - { - var attribute=attributes[nd]; - if(descriptor[attribute]==undefined) - descriptor[attribute]=true - } - Object.defineProperty(obj,prop,descriptor); - return obj - }, - defineNondefaultProperties: function OSF_OUtil$defineNondefaultProperties(obj, descriptors, attributes) - { - descriptors=descriptors || {}; - for(var prop in descriptors) - OSF.OUtil.defineNondefaultProperty(obj,prop,descriptors[prop],attributes); - return obj - }, - defineEnumerableProperty: function OSF_OUtil$defineEnumerableProperty(obj, prop, descriptor) - { - return OSF.OUtil.defineNondefaultProperty(obj,prop,descriptor,["enumerable"]) - }, - defineEnumerableProperties: function OSF_OUtil$defineEnumerableProperties(obj, descriptors) - { - return OSF.OUtil.defineNondefaultProperties(obj,descriptors,["enumerable"]) - }, - defineMutableProperty: function OSF_OUtil$defineMutableProperty(obj, prop, descriptor) - { - return OSF.OUtil.defineNondefaultProperty(obj,prop,descriptor,["writable","enumerable","configurable"]) - }, - defineMutableProperties: function OSF_OUtil$defineMutableProperties(obj, descriptors) - { - return OSF.OUtil.defineNondefaultProperties(obj,descriptors,["writable","enumerable","configurable"]) - }, - finalizeProperties: function OSF_OUtil$finalizeProperties(obj, descriptor) - { - descriptor=descriptor || {}; - var props=Object.getOwnPropertyNames(obj); - var propsLength=props.length; - for(var i=0; i < propsLength; i++) - { - var prop=props[i]; - var desc=Object.getOwnPropertyDescriptor(obj,prop); - if(!desc.get && !desc.set) - desc.writable=descriptor.writable || false; - desc.configurable=descriptor.configurable || false; - desc.enumerable=descriptor.enumerable || true; - Object.defineProperty(obj,prop,desc) - } - return obj - }, - mapList: function OSF_OUtil$MapList(list, mapFunction) - { - var ret=[]; - if(list) - for(var item in list) - ret.push(mapFunction(list[item])); - return ret - }, - listContainsKey: function OSF_OUtil$listContainsKey(list, key) - { - for(var item in list) - if(key==item) - return true; - return false - }, - listContainsValue: function OSF_OUtil$listContainsElement(list, value) - { - for(var item in list) - if(value==list[item]) - return true; - return false - }, - augmentList: function OSF_OUtil$augmentList(list, addenda) - { - var add=list.push ? function(key, value) - { - list.push(value) - } : function(key, value) - { - list[key]=value - }; - for(var key in addenda) - add(key,addenda[key]) - }, - redefineList: function OSF_Outil$redefineList(oldList, newList) - { - for(var key1 in oldList) - delete oldList[key1]; - for(var key2 in newList) - oldList[key2]=newList[key2] - }, - isArray: function OSF_OUtil$isArray(obj) - { - return Object.prototype.toString.apply(obj)==="[object Array]" - }, - isFunction: function OSF_OUtil$isFunction(obj) - { - return Object.prototype.toString.apply(obj)==="[object Function]" - }, - isDate: function OSF_OUtil$isDate(obj) - { - return Object.prototype.toString.apply(obj)==="[object Date]" - }, - addEventListener: function OSF_OUtil$addEventListener(element, eventName, listener) - { - if(element.addEventListener) - element.addEventListener(eventName,listener,false); - else if(Sys.Browser.agent===Sys.Browser.InternetExplorer && element.attachEvent) - element.attachEvent("on"+eventName,listener); - else - element["on"+eventName]=listener - }, - removeEventListener: function OSF_OUtil$removeEventListener(element, eventName, listener) - { - if(element.removeEventListener) - element.removeEventListener(eventName,listener,false); - else if(Sys.Browser.agent===Sys.Browser.InternetExplorer && element.detachEvent) - element.detachEvent("on"+eventName,listener); - else - element["on"+eventName]=null - }, - getCookieValue: function OSF_OUtil$getCookieValue(cookieName) - { - var tmpCookieString=RegExp(cookieName+"[^;]+").exec(document.cookie); - return tmpCookieString.toString().replace(/^[^=]+./,"") - }, - xhrGet: function OSF_OUtil$xhrGet(url, onSuccess, onError) - { - var xmlhttp; - try - { - xmlhttp=new XMLHttpRequest; - xmlhttp.onreadystatechange=function() - { - if(xmlhttp.readyState==4) - if(xmlhttp.status==200) - onSuccess(xmlhttp.responseText); - else - onError(xmlhttp.status) - }; - xmlhttp.open("GET",url,true); - xmlhttp.send() - } - catch(ex) - { - onError(ex) - } - }, - xhrGetFull: function OSF_OUtil$xhrGetFull(url, oneDriveFileName, onSuccess, onError) - { - var xmlhttp; - var requestedFileName=oneDriveFileName; - try - { - xmlhttp=new XMLHttpRequest; - xmlhttp.onreadystatechange=function() - { - if(xmlhttp.readyState==4) - if(xmlhttp.status==200) - onSuccess(xmlhttp,requestedFileName); - else - onError(xmlhttp.status) - }; - xmlhttp.open("GET",url,true); - xmlhttp.send() - } - catch(ex) - { - onError(ex) - } - }, - encodeBase64: function OSF_Outil$encodeBase64(input) - { - if(!input) - return input; - var codex="ABCDEFGHIJKLMNOP"+"QRSTUVWXYZabcdef"+"ghijklmnopqrstuv"+"wxyz0123456789+/="; - var output=[]; - var temp=[]; - var index=0; - var c1, - c2, - c3, - a, - b, - c; - var i; - var length=input.length; - do - { - c1=input.charCodeAt(index++); - c2=input.charCodeAt(index++); - c3=input.charCodeAt(index++); - i=0; - a=c1 & 255; - b=c1 >> 8; - c=c2 & 255; - temp[i++]=a >> 2; - temp[i++]=(a & 3) << 4 | b >> 4; - temp[i++]=(b & 15) << 2 | c >> 6; - temp[i++]=c & 63; - if(!isNaN(c2)) - { - a=c2 >> 8; - b=c3 & 255; - c=c3 >> 8; - temp[i++]=a >> 2; - temp[i++]=(a & 3) << 4 | b >> 4; - temp[i++]=(b & 15) << 2 | c >> 6; - temp[i++]=c & 63 - } - if(isNaN(c2)) - temp[i - 1]=64; - else if(isNaN(c3)) - { - temp[i - 2]=64; - temp[i - 1]=64 - } - for(var t=0; t < i; t++) - output.push(codex.charAt(temp[t])) - } while(index < length); - return output.join("") - }, - getSessionStorage: function OSF_Outil$getSessionStorage() - { - return _getSessionStorage() - }, - getLocalStorage: function OSF_Outil$getLocalStorage() - { - if(!_safeLocalStorage) - { - try - { - var localStorage=window.localStorage - } - catch(ex) - { - localStorage=null - } - _safeLocalStorage=new OfficeExt.SafeStorage(localStorage) - } - return _safeLocalStorage - }, - convertIntToCssHexColor: function OSF_Outil$convertIntToCssHexColor(val) - { - var hex="#"+(Number(val)+16777216).toString(16).slice(-6); - return hex - }, - attachClickHandler: function OSF_Outil$attachClickHandler(element, handler) - { - element.onclick=function(e) - { - handler() - }; - element.ontouchend=function(e) - { - handler(); - e.preventDefault() - } - }, - getQueryStringParamValue: function OSF_Outil$getQueryStringParamValue(queryString, paramName) - { - var e=Function._validateParams(arguments,[{ - name: "queryString", - type: String, - mayBeNull: false - },{ - name: "paramName", - type: String, - mayBeNull: false - }]); - if(e) - { - OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null."); - return"" - } - var queryExp=new RegExp("[\\?&]"+paramName+"=([^&#]*)","i"); - if(!queryExp.test(queryString)) - { - OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found."); - return"" - } - return queryExp.exec(queryString)[1] - }, - isiOS: function OSF_Outil$isiOS() - { - return window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false - }, - isChrome: function OSF_Outil$isChrome() - { - return window.navigator.userAgent.indexOf("Chrome") > 0 && !OSF.OUtil.isEdge() - }, - isEdge: function OSF_Outil$isEdge() - { - return window.navigator.userAgent.indexOf("Edge") > 0 - }, - isIE: function OSF_Outil$isIE() - { - return window.navigator.userAgent.indexOf("Trident") > 0 - }, - isFirefox: function OSF_Outil$isFirefox() - { - return window.navigator.userAgent.indexOf("Firefox") > 0 - }, - shallowCopy: function OSF_Outil$shallowCopy(sourceObj) - { - if(sourceObj==null) - return null; - else if(!(sourceObj instanceof Object)) - return sourceObj; - else if(Array.isArray(sourceObj)) - { - var copyArr=[]; - for(var i=0; i < sourceObj.length; i++) - copyArr.push(sourceObj[i]); - return copyArr - } - else - { - var copyObj=sourceObj.constructor(); - for(var property in sourceObj) - if(sourceObj.hasOwnProperty(property)) - copyObj[property]=sourceObj[property]; - return copyObj - } - }, - createObject: function OSF_Outil$createObject(properties) - { - var obj=null; - if(properties) - { - obj={}; - var len=properties.length; - for(var i=0; i < len; i++) - obj[properties[i].name]=properties[i].value - } - return obj - }, - addClass: function OSF_OUtil$addClass(elmt, val) - { - if(!OSF.OUtil.hasClass(elmt,val)) - { - var className=elmt.getAttribute(_classN); - if(className) - elmt.setAttribute(_classN,className+" "+val); - else - elmt.setAttribute(_classN,val) - } - }, - hasClass: function OSF_OUtil$hasClass(elmt, clsName) - { - var className=elmt.getAttribute(_classN); - return className && className.match(new RegExp("(\\s|^)"+clsName+"(\\s|$)")) - }, - focusToFirstTabbable: function OSF_OUtil$focusToFirstTabbable(all, backward) - { - var next; - var focused=false; - var candidate; - var setFlag=function(e) - { - focused=true - }; - var findNextPos=function(allLen, currPos, backward) - { - if(currPos < 0 || currPos > allLen) - return-1; - else if(currPos===0 && backward) - return-1; - else if(currPos===allLen - 1 && !backward) - return-1; - if(backward) - return currPos - 1; - else - return currPos+1 - }; - all=_reOrderTabbableElements(all); - next=backward ? all.length - 1 : 0; - if(all.length===0) - return null; - while(!focused && next >=0 && next < all.length) - { - candidate=all[next]; - window.focus(); - candidate.addEventListener("focus",setFlag); - candidate.focus(); - candidate.removeEventListener("focus",setFlag); - next=findNextPos(all.length,next,backward); - if(!focused && candidate===document.activeElement) - focused=true - } - if(focused) - return candidate; - else - return null - }, - focusToNextTabbable: function OSF_OUtil$focusToNextTabbable(all, curr, shift) - { - var currPos; - var next; - var focused=false; - var candidate; - var setFlag=function(e) - { - focused=true - }; - var findCurrPos=function(all, curr) - { - var i=0; - for(; i < all.length; i++) - if(all[i]===curr) - return i; - return-1 - }; - var findNextPos=function(allLen, currPos, shift) - { - if(currPos < 0 || currPos > allLen) - return-1; - else if(currPos===0 && shift) - return-1; - else if(currPos===allLen - 1 && !shift) - return-1; - if(shift) - return currPos - 1; - else - return currPos+1 - }; - all=_reOrderTabbableElements(all); - currPos=findCurrPos(all,curr); - next=findNextPos(all.length,currPos,shift); - if(next < 0) - return null; - while(!focused && next >=0 && next < all.length) - { - candidate=all[next]; - candidate.addEventListener("focus",setFlag); - candidate.focus(); - candidate.removeEventListener("focus",setFlag); - next=findNextPos(all.length,next,shift); - if(!focused && candidate===document.activeElement) - focused=true - } - if(focused) - return candidate; - else - return null - } - } + var _uniqueId = -1; + var _xdmInfoKey = "&_xdm_Info="; + var _serializerVersionKey = "&_serializer_version="; + var _xdmSessionKeyPrefix = "_xdm_"; + var _serializerVersionKeyPrefix = "_serializer_version="; + var _fragmentSeparator = "#"; + var _fragmentInfoDelimiter = "&"; + var _classN = "class"; + var _loadedScripts = {}; + var _defaultScriptLoadingTimeout = 3e4; + var _safeSessionStorage = null; + var _safeLocalStorage = null; + var _rndentropy = (new Date).getTime(); + function _random() + { + var nextrand = 2147483647 * Math.random(); + nextrand ^= _rndentropy ^ (new Date).getMilliseconds() << Math.floor(Math.random() * (31 - 10)); + return nextrand.toString(16) + } + function _getSessionStorage() + { + if(!_safeSessionStorage) + { + try + { + var sessionStorage = window.sessionStorage + } + catch(ex) + { + sessionStorage = null + } + _safeSessionStorage = new OfficeExt.SafeStorage(sessionStorage) + } + return _safeSessionStorage + } + function _reOrderTabbableElements(elements) + { + var bucket0 = []; + var bucketPositive = []; + var i; + var len = elements.length; + var ele; + for(i = 0; i < len; i++) + { + ele = elements[i]; + if(ele.tabIndex) + { + if(ele.tabIndex > 0) + bucketPositive.push(ele); + else if(ele.tabIndex === 0) + bucket0.push(ele) + } + else + bucket0.push(ele) + } + bucketPositive = bucketPositive.sort(function(left, right) + { + var diff = left.tabIndex - right.tabIndex; + if(diff === 0) + diff = bucketPositive.indexOf(left) - bucketPositive.indexOf(right); + return diff + }); + return[].concat(bucketPositive,bucket0) + } + return{ + set_entropy: function OSF_OUtil$set_entropy(entropy) + { + if(typeof entropy == "string") + for(var i = 0; i < entropy.length; i += 4) + { + var temp = 0; + for(var j = 0; j < 4 && i + j < entropy.length; j++) + temp = (temp << 8) + entropy.charCodeAt(i + j); + _rndentropy ^= temp + } + else if(typeof entropy == "number") + _rndentropy ^= entropy; + else + _rndentropy ^= 2147483647 * Math.random(); + _rndentropy &= 2147483647 + }, + extend: function OSF_OUtil$extend(child, parent) + { + var F = function(){}; + F.prototype = parent.prototype; + child.prototype = new F; + child.prototype.constructor = child; + child.uber = parent.prototype; + if(parent.prototype.constructor === Object.prototype.constructor) + parent.prototype.constructor = parent + }, + setNamespace: function OSF_OUtil$setNamespace(name, parent) + { + if(parent && name && !parent[name]) + parent[name] = {} + }, + unsetNamespace: function OSF_OUtil$unsetNamespace(name, parent) + { + if(parent && name && parent[name]) + delete parent[name] + }, + loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) + { + if(url && callback) + { + var doc = window.document; + var _loadedScriptEntry = _loadedScripts[url]; + if(!_loadedScriptEntry) + { + var script = doc.createElement("script"); + script.type = "text/javascript"; + _loadedScriptEntry = { + loaded: false, + pendingCallbacks: [callback], + timer: null + }; + _loadedScripts[url] = _loadedScriptEntry; + var onLoadCallback = function OSF_OUtil_loadScript$onLoadCallback() + { + if(_loadedScriptEntry.timer != null) + { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer + } + _loadedScriptEntry.loaded = true; + var pendingCallbackCount = _loadedScriptEntry.pendingCallbacks.length; + for(var i = 0; i < pendingCallbackCount; i++) + { + var currentCallback = _loadedScriptEntry.pendingCallbacks.shift(); + currentCallback() + } + }; + var onLoadError = function OSF_OUtil_loadScript$onLoadError() + { + delete _loadedScripts[url]; + if(_loadedScriptEntry.timer != null) + { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer + } + var pendingCallbackCount = _loadedScriptEntry.pendingCallbacks.length; + for(var i = 0; i < pendingCallbackCount; i++) + { + var currentCallback = _loadedScriptEntry.pendingCallbacks.shift(); + currentCallback() + } + }; + if(script.readyState) + script.onreadystatechange = function() + { + if(script.readyState == "loaded" || script.readyState == "complete") + { + script.onreadystatechange = null; + onLoadCallback() + } + }; + else + script.onload = onLoadCallback; + script.onerror = onLoadError; + timeoutInMs = timeoutInMs || _defaultScriptLoadingTimeout; + _loadedScriptEntry.timer = setTimeout(onLoadError,timeoutInMs); + script.setAttribute("crossOrigin","anonymous"); + script.src = url; + doc.getElementsByTagName("head")[0].appendChild(script) + } + else if(_loadedScriptEntry.loaded) + callback(); + else + _loadedScriptEntry.pendingCallbacks.push(callback) + } + }, + loadCSS: function OSF_OUtil$loadCSS(url) + { + if(url) + { + var doc = window.document; + var link = doc.createElement("link"); + link.type = "text/css"; + link.rel = "stylesheet"; + link.href = url; + doc.getElementsByTagName("head")[0].appendChild(link) + } + }, + parseEnum: function OSF_OUtil$parseEnum(str, enumObject) + { + var parsed = enumObject[str.trim()]; + if(typeof parsed == "undefined") + { + OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:" + str); + throw OsfMsAjaxFactory.msAjaxError.argument("str"); + } + return parsed + }, + delayExecutionAndCache: function OSF_OUtil$delayExecutionAndCache() + { + var obj = {calc: arguments[0]}; + return function() + { + if(obj.calc) + { + obj.val = obj.calc.apply(this,arguments); + delete obj.calc + } + return obj.val + } + }, + getUniqueId: function OSF_OUtil$getUniqueId() + { + _uniqueId = _uniqueId + 1; + return _uniqueId.toString() + }, + formatString: function OSF_OUtil$formatString() + { + var args = arguments; + var source = args[0]; + return source.replace(/{(\d+)}/gm,function(match, number) + { + var index = parseInt(number,10) + 1; + return args[index] === undefined ? "{" + number + "}" : args[index] + }) + }, + generateConversationId: function OSF_OUtil$generateConversationId() + { + return[_random(),_random(),(new Date).getTime().toString()].join("_") + }, + getFrameName: function OSF_OUtil$getFrameName(cacheKey) + { + return _xdmSessionKeyPrefix + cacheKey + this.generateConversationId() + }, + addXdmInfoAsHash: function OSF_OUtil$addXdmInfoAsHash(url, xdmInfoValue) + { + return OSF.OUtil.addInfoAsHash(url,_xdmInfoKey,xdmInfoValue,false) + }, + addSerializerVersionAsHash: function OSF_OUtil$addSerializerVersionAsHash(url, serializerVersion) + { + return OSF.OUtil.addInfoAsHash(url,_serializerVersionKey,serializerVersion,true) + }, + addInfoAsHash: function OSF_OUtil$addInfoAsHash(url, keyName, infoValue, encodeInfo) + { + url = url.trim() || ""; + var urlParts = url.split(_fragmentSeparator); + var urlWithoutFragment = urlParts.shift(); + var fragment = urlParts.join(_fragmentSeparator); + var newFragment; + if(encodeInfo) + newFragment = [keyName,encodeURIComponent(infoValue),fragment].join(""); + else + newFragment = [fragment,keyName,infoValue].join(""); + return[urlWithoutFragment,_fragmentSeparator,newFragment].join("") + }, + parseHostInfoFromWindowName: function OSF_OUtil$parseHostInfoFromWindowName(skipSessionStorage, windowName) + { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage,windowName,OSF.WindowNameItemKeys.HostInfo) + }, + parseXdmInfo: function OSF_OUtil$parseXdmInfo(skipSessionStorage) + { + var xdmInfoValue = OSF.OUtil.parseXdmInfoWithGivenFragment(skipSessionStorage,window.location.hash); + if(!xdmInfoValue) + xdmInfoValue = OSF.OUtil.parseXdmInfoFromWindowName(skipSessionStorage,window.name); + return xdmInfoValue + }, + parseXdmInfoFromWindowName: function OSF_OUtil$parseXdmInfoFromWindowName(skipSessionStorage, windowName) + { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage,windowName,OSF.WindowNameItemKeys.XdmInfo) + }, + parseXdmInfoWithGivenFragment: function OSF_OUtil$parseXdmInfoWithGivenFragment(skipSessionStorage, fragment) + { + return OSF.OUtil.parseInfoWithGivenFragment(_xdmInfoKey,_xdmSessionKeyPrefix,false,skipSessionStorage,fragment) + }, + parseSerializerVersion: function OSF_OUtil$parseSerializerVersion(skipSessionStorage) + { + var serializerVersion = OSF.OUtil.parseSerializerVersionWithGivenFragment(skipSessionStorage,window.location.hash); + if(isNaN(serializerVersion)) + serializerVersion = OSF.OUtil.parseSerializerVersionFromWindowName(skipSessionStorage,window.name); + return serializerVersion + }, + parseSerializerVersionFromWindowName: function OSF_OUtil$parseSerializerVersionFromWindowName(skipSessionStorage, windowName) + { + return parseInt(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage,windowName,OSF.WindowNameItemKeys.SerializerVersion)) + }, + parseSerializerVersionWithGivenFragment: function OSF_OUtil$parseSerializerVersionWithGivenFragment(skipSessionStorage, fragment) + { + return parseInt(OSF.OUtil.parseInfoWithGivenFragment(_serializerVersionKey,_serializerVersionKeyPrefix,true,skipSessionStorage,fragment)) + }, + parseInfoFromWindowName: function OSF_OUtil$parseInfoFromWindowName(skipSessionStorage, windowName, infoKey) + { + try + { + var windowNameObj = JSON.parse(windowName); + var infoValue = windowNameObj != null ? windowNameObj[infoKey] : null; + var osfSessionStorage = _getSessionStorage(); + if(!skipSessionStorage && osfSessionStorage && windowNameObj != null) + { + var sessionKey = windowNameObj[OSF.WindowNameItemKeys.BaseFrameName] + infoKey; + if(infoValue) + osfSessionStorage.setItem(sessionKey,infoValue); + else + infoValue = osfSessionStorage.getItem(sessionKey) + } + return infoValue + } + catch(Exception) + { + return null + } + }, + parseInfoWithGivenFragment: function OSF_OUtil$parseInfoWithGivenFragment(infoKey, infoKeyPrefix, decodeInfo, skipSessionStorage, fragment) + { + var fragmentParts = fragment.split(infoKey); + var infoValue = fragmentParts.length > 1 ? fragmentParts[fragmentParts.length - 1] : null; + if(decodeInfo && infoValue != null) + { + if(infoValue.indexOf(_fragmentInfoDelimiter) >= 0) + infoValue = infoValue.split(_fragmentInfoDelimiter)[0]; + infoValue = decodeURIComponent(infoValue) + } + var osfSessionStorage = _getSessionStorage(); + if(!skipSessionStorage && osfSessionStorage) + { + var sessionKeyStart = window.name.indexOf(infoKeyPrefix); + if(sessionKeyStart > -1) + { + var sessionKeyEnd = window.name.indexOf(";",sessionKeyStart); + if(sessionKeyEnd == -1) + sessionKeyEnd = window.name.length; + var sessionKey = window.name.substring(sessionKeyStart,sessionKeyEnd); + if(infoValue) + osfSessionStorage.setItem(sessionKey,infoValue); + else + infoValue = osfSessionStorage.getItem(sessionKey) + } + } + return infoValue + }, + getConversationId: function OSF_OUtil$getConversationId() + { + var searchString = window.location.search; + var conversationId = null; + if(searchString) + { + var index = searchString.indexOf("&"); + conversationId = index > 0 ? searchString.substring(1,index) : searchString.substr(1); + if(conversationId && conversationId.charAt(conversationId.length - 1) === "=") + { + conversationId = conversationId.substring(0,conversationId.length - 1); + if(conversationId) + conversationId = decodeURIComponent(conversationId) + } + } + return conversationId + }, + getInfoItems: function OSF_OUtil$getInfoItems(strInfo) + { + var items = strInfo.split("$"); + if(typeof items[1] == "undefined") + items = strInfo.split("|"); + if(typeof items[1] == "undefined") + items = strInfo.split("%7C"); + return items + }, + getXdmFieldValue: function OSF_OUtil$getXdmFieldValue(xdmFieldName, skipSessionStorage) + { + var fieldValue = ""; + var xdmInfoValue = OSF.OUtil.parseXdmInfo(skipSessionStorage); + if(xdmInfoValue) + { + var items = OSF.OUtil.getInfoItems(xdmInfoValue); + if(items != undefined && items.length >= 3) + switch(xdmFieldName) + { + case OSF.XdmFieldName.ConversationUrl: + fieldValue = items[2]; + break; + case OSF.XdmFieldName.AppId: + fieldValue = items[1]; + break + } + } + return fieldValue + }, + validateParamObject: function OSF_OUtil$validateParamObject(params, expectedProperties, callback) + { + var e = Function._validateParams(arguments,[{ + name: "params", + type: Object, + mayBeNull: false + },{ + name: "expectedProperties", + type: Object, + mayBeNull: false + },{ + name: "callback", + type: Function, + mayBeNull: true + }]); + if(e) + throw e; + for(var p in expectedProperties) + { + e = Function._validateParameter(params[p],expectedProperties[p],p); + if(e) + throw e; + } + }, + writeProfilerMark: function OSF_OUtil$writeProfilerMark(text) + { + if(window.msWriteProfilerMark) + { + window.msWriteProfilerMark(text); + OsfMsAjaxFactory.msAjaxDebug.trace(text) + } + }, + outputDebug: function OSF_OUtil$outputDebug(text) + { + if(typeof OsfMsAjaxFactory !== "undefined" && OsfMsAjaxFactory.msAjaxDebug && OsfMsAjaxFactory.msAjaxDebug.trace) + OsfMsAjaxFactory.msAjaxDebug.trace(text) + }, + defineNondefaultProperty: function OSF_OUtil$defineNondefaultProperty(obj, prop, descriptor, attributes) + { + descriptor = descriptor || {}; + for(var nd in attributes) + { + var attribute = attributes[nd]; + if(descriptor[attribute] == undefined) + descriptor[attribute] = true + } + Object.defineProperty(obj,prop,descriptor); + return obj + }, + defineNondefaultProperties: function OSF_OUtil$defineNondefaultProperties(obj, descriptors, attributes) + { + descriptors = descriptors || {}; + for(var prop in descriptors) + OSF.OUtil.defineNondefaultProperty(obj,prop,descriptors[prop],attributes); + return obj + }, + defineEnumerableProperty: function OSF_OUtil$defineEnumerableProperty(obj, prop, descriptor) + { + return OSF.OUtil.defineNondefaultProperty(obj,prop,descriptor,["enumerable"]) + }, + defineEnumerableProperties: function OSF_OUtil$defineEnumerableProperties(obj, descriptors) + { + return OSF.OUtil.defineNondefaultProperties(obj,descriptors,["enumerable"]) + }, + defineMutableProperty: function OSF_OUtil$defineMutableProperty(obj, prop, descriptor) + { + return OSF.OUtil.defineNondefaultProperty(obj,prop,descriptor,["writable","enumerable","configurable"]) + }, + defineMutableProperties: function OSF_OUtil$defineMutableProperties(obj, descriptors) + { + return OSF.OUtil.defineNondefaultProperties(obj,descriptors,["writable","enumerable","configurable"]) + }, + finalizeProperties: function OSF_OUtil$finalizeProperties(obj, descriptor) + { + descriptor = descriptor || {}; + var props = Object.getOwnPropertyNames(obj); + var propsLength = props.length; + for(var i = 0; i < propsLength; i++) + { + var prop = props[i]; + var desc = Object.getOwnPropertyDescriptor(obj,prop); + if(!desc.get && !desc.set) + desc.writable = descriptor.writable || false; + desc.configurable = descriptor.configurable || false; + desc.enumerable = descriptor.enumerable || true; + Object.defineProperty(obj,prop,desc) + } + return obj + }, + mapList: function OSF_OUtil$MapList(list, mapFunction) + { + var ret = []; + if(list) + for(var item in list) + ret.push(mapFunction(list[item])); + return ret + }, + listContainsKey: function OSF_OUtil$listContainsKey(list, key) + { + for(var item in list) + if(key == item) + return true; + return false + }, + listContainsValue: function OSF_OUtil$listContainsElement(list, value) + { + for(var item in list) + if(value == list[item]) + return true; + return false + }, + augmentList: function OSF_OUtil$augmentList(list, addenda) + { + var add = list.push ? function(key, value) + { + list.push(value) + } : function(key, value) + { + list[key] = value + }; + for(var key in addenda) + add(key,addenda[key]) + }, + redefineList: function OSF_Outil$redefineList(oldList, newList) + { + for(var key1 in oldList) + delete oldList[key1]; + for(var key2 in newList) + oldList[key2] = newList[key2] + }, + isArray: function OSF_OUtil$isArray(obj) + { + return Object.prototype.toString.apply(obj) === "[object Array]" + }, + isFunction: function OSF_OUtil$isFunction(obj) + { + return Object.prototype.toString.apply(obj) === "[object Function]" + }, + isDate: function OSF_OUtil$isDate(obj) + { + return Object.prototype.toString.apply(obj) === "[object Date]" + }, + addEventListener: function OSF_OUtil$addEventListener(element, eventName, listener) + { + if(element.addEventListener) + element.addEventListener(eventName,listener,false); + else if(Sys.Browser.agent === Sys.Browser.InternetExplorer && element.attachEvent) + element.attachEvent("on" + eventName,listener); + else + element["on" + eventName] = listener + }, + removeEventListener: function OSF_OUtil$removeEventListener(element, eventName, listener) + { + if(element.removeEventListener) + element.removeEventListener(eventName,listener,false); + else if(Sys.Browser.agent === Sys.Browser.InternetExplorer && element.detachEvent) + element.detachEvent("on" + eventName,listener); + else + element["on" + eventName] = null + }, + getCookieValue: function OSF_OUtil$getCookieValue(cookieName) + { + var tmpCookieString = RegExp(cookieName + "[^;]+").exec(document.cookie); + return tmpCookieString.toString().replace(/^[^=]+./,"") + }, + xhrGet: function OSF_OUtil$xhrGet(url, onSuccess, onError) + { + var xmlhttp; + try + { + xmlhttp = new XMLHttpRequest; + xmlhttp.onreadystatechange = function() + { + if(xmlhttp.readyState == 4) + if(xmlhttp.status == 200) + onSuccess(xmlhttp.responseText); + else + onError(xmlhttp.status) + }; + xmlhttp.open("GET",url,true); + xmlhttp.send() + } + catch(ex) + { + onError(ex) + } + }, + xhrGetFull: function OSF_OUtil$xhrGetFull(url, oneDriveFileName, onSuccess, onError) + { + var xmlhttp; + var requestedFileName = oneDriveFileName; + try + { + xmlhttp = new XMLHttpRequest; + xmlhttp.onreadystatechange = function() + { + if(xmlhttp.readyState == 4) + if(xmlhttp.status == 200) + onSuccess(xmlhttp,requestedFileName); + else + onError(xmlhttp.status) + }; + xmlhttp.open("GET",url,true); + xmlhttp.send() + } + catch(ex) + { + onError(ex) + } + }, + encodeBase64: function OSF_Outil$encodeBase64(input) + { + if(!input) + return input; + var codex = "ABCDEFGHIJKLMNOP" + "QRSTUVWXYZabcdef" + "ghijklmnopqrstuv" + "wxyz0123456789+/="; + var output = []; + var temp = []; + var index = 0; + var c1, + c2, + c3, + a, + b, + c; + var i; + var length = input.length; + do + { + c1 = input.charCodeAt(index++); + c2 = input.charCodeAt(index++); + c3 = input.charCodeAt(index++); + i = 0; + a = c1 & 255; + b = c1 >> 8; + c = c2 & 255; + temp[i++] = a >> 2; + temp[i++] = (a & 3) << 4 | b >> 4; + temp[i++] = (b & 15) << 2 | c >> 6; + temp[i++] = c & 63; + if(!isNaN(c2)) + { + a = c2 >> 8; + b = c3 & 255; + c = c3 >> 8; + temp[i++] = a >> 2; + temp[i++] = (a & 3) << 4 | b >> 4; + temp[i++] = (b & 15) << 2 | c >> 6; + temp[i++] = c & 63 + } + if(isNaN(c2)) + temp[i - 1] = 64; + else if(isNaN(c3)) + { + temp[i - 2] = 64; + temp[i - 1] = 64 + } + for(var t = 0; t < i; t++) + output.push(codex.charAt(temp[t])) + } while(index < length); + return output.join("") + }, + getSessionStorage: function OSF_Outil$getSessionStorage() + { + return _getSessionStorage() + }, + getLocalStorage: function OSF_Outil$getLocalStorage() + { + if(!_safeLocalStorage) + { + try + { + var localStorage = window.localStorage + } + catch(ex) + { + localStorage = null + } + _safeLocalStorage = new OfficeExt.SafeStorage(localStorage) + } + return _safeLocalStorage + }, + convertIntToCssHexColor: function OSF_Outil$convertIntToCssHexColor(val) + { + var hex = "#" + (Number(val) + 16777216).toString(16).slice(-6); + return hex + }, + attachClickHandler: function OSF_Outil$attachClickHandler(element, handler) + { + element.onclick = function(e) + { + handler() + }; + element.ontouchend = function(e) + { + handler(); + e.preventDefault() + } + }, + getQueryStringParamValue: function OSF_Outil$getQueryStringParamValue(queryString, paramName) + { + var e = Function._validateParams(arguments,[{ + name: "queryString", + type: String, + mayBeNull: false + },{ + name: "paramName", + type: String, + mayBeNull: false + }]); + if(e) + { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null."); + return"" + } + var queryExp = new RegExp("[\\?&]" + paramName + "=([^&#]*)","i"); + if(!queryExp.test(queryString)) + { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found."); + return"" + } + return queryExp.exec(queryString)[1] + }, + isiOS: function OSF_Outil$isiOS() + { + return window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false + }, + isChrome: function OSF_Outil$isChrome() + { + return window.navigator.userAgent.indexOf("Chrome") > 0 && !OSF.OUtil.isEdge() + }, + isEdge: function OSF_Outil$isEdge() + { + return window.navigator.userAgent.indexOf("Edge") > 0 + }, + isIE: function OSF_Outil$isIE() + { + return window.navigator.userAgent.indexOf("Trident") > 0 + }, + isFirefox: function OSF_Outil$isFirefox() + { + return window.navigator.userAgent.indexOf("Firefox") > 0 + }, + shallowCopy: function OSF_Outil$shallowCopy(sourceObj) + { + if(sourceObj == null) + return null; + else if(!(sourceObj instanceof Object)) + return sourceObj; + else if(Array.isArray(sourceObj)) + { + var copyArr = []; + for(var i = 0; i < sourceObj.length; i++) + copyArr.push(sourceObj[i]); + return copyArr + } + else + { + var copyObj = sourceObj.constructor(); + for(var property in sourceObj) + if(sourceObj.hasOwnProperty(property)) + copyObj[property] = sourceObj[property]; + return copyObj + } + }, + createObject: function OSF_Outil$createObject(properties) + { + var obj = null; + if(properties) + { + obj = {}; + var len = properties.length; + for(var i = 0; i < len; i++) + obj[properties[i].name] = properties[i].value + } + return obj + }, + addClass: function OSF_OUtil$addClass(elmt, val) + { + if(!OSF.OUtil.hasClass(elmt,val)) + { + var className = elmt.getAttribute(_classN); + if(className) + elmt.setAttribute(_classN,className + " " + val); + else + elmt.setAttribute(_classN,val) + } + }, + removeClass: function OSF_OUtil$removeClass(elmt, val) + { + if(OSF.OUtil.hasClass(elmt,val)) + { + var className = elmt.getAttribute(_classN); + var reg = new RegExp("(\\s|^)" + val + "(\\s|$)"); + className = className.replace(reg,""); + elmt.setAttribute(_classN,className) + } + }, + hasClass: function OSF_OUtil$hasClass(elmt, clsName) + { + var className = elmt.getAttribute(_classN); + return className && className.match(new RegExp("(\\s|^)" + clsName + "(\\s|$)")) + }, + focusToFirstTabbable: function OSF_OUtil$focusToFirstTabbable(all, backward) + { + var next; + var focused = false; + var candidate; + var setFlag = function(e) + { + focused = true + }; + var findNextPos = function(allLen, currPos, backward) + { + if(currPos < 0 || currPos > allLen) + return-1; + else if(currPos === 0 && backward) + return-1; + else if(currPos === allLen - 1 && !backward) + return-1; + if(backward) + return currPos - 1; + else + return currPos + 1 + }; + all = _reOrderTabbableElements(all); + next = backward ? all.length - 1 : 0; + if(all.length === 0) + return null; + while(!focused && next >= 0 && next < all.length) + { + candidate = all[next]; + window.focus(); + candidate.addEventListener("focus",setFlag); + candidate.focus(); + candidate.removeEventListener("focus",setFlag); + next = findNextPos(all.length,next,backward); + if(!focused && candidate === document.activeElement) + focused = true + } + if(focused) + return candidate; + else + return null + }, + focusToNextTabbable: function OSF_OUtil$focusToNextTabbable(all, curr, shift) + { + var currPos; + var next; + var focused = false; + var candidate; + var setFlag = function(e) + { + focused = true + }; + var findCurrPos = function(all, curr) + { + var i = 0; + for(; i < all.length; i++) + if(all[i] === curr) + return i; + return-1 + }; + var findNextPos = function(allLen, currPos, shift) + { + if(currPos < 0 || currPos > allLen) + return-1; + else if(currPos === 0 && shift) + return-1; + else if(currPos === allLen - 1 && !shift) + return-1; + if(shift) + return currPos - 1; + else + return currPos + 1 + }; + all = _reOrderTabbableElements(all); + currPos = findCurrPos(all,curr); + next = findNextPos(all.length,currPos,shift); + if(next < 0) + return null; + while(!focused && next >= 0 && next < all.length) + { + candidate = all[next]; + candidate.addEventListener("focus",setFlag); + candidate.focus(); + candidate.removeEventListener("focus",setFlag); + next = findNextPos(all.length,next,shift); + if(!focused && candidate === document.activeElement) + focused = true + } + if(focused) + return candidate; + else + return null + } + } }(); -OSF.OUtil.Guid=function() +OSF.OUtil.Guid = function() { - var hexCode=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"]; - return{generateNewGuid: function OSF_Outil_Guid$generateNewGuid() - { - var result=""; - var tick=(new Date).getTime(); - var index=0; - for(; index < 32 && tick > 0; index++) - { - if(index==8 || index==12 || index==16 || index==20) - result+="-"; - result+=hexCode[tick % 16]; - tick=Math.floor(tick / 16) - } - for(; index < 32; index++) - { - if(index==8 || index==12 || index==16 || index==20) - result+="-"; - result+=hexCode[Math.floor(Math.random() * 16)] - } - return result - }} + var hexCode = ["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"]; + return{generateNewGuid: function OSF_Outil_Guid$generateNewGuid() + { + var result = ""; + var tick = (new Date).getTime(); + var index = 0; + for(; index < 32 && tick > 0; index++) + { + if(index == 8 || index == 12 || index == 16 || index == 20) + result += "-"; + result += hexCode[tick % 16]; + tick = Math.floor(tick / 16) + } + for(; index < 32; index++) + { + if(index == 8 || index == 12 || index == 16 || index == 20) + result += "-"; + result += hexCode[Math.floor(Math.random() * 16)] + } + return result + }} }(); -window.OSF=OSF; +window.OSF = OSF; OSF.OUtil.setNamespace("OSF",window); -OSF.AppName={ - Unsupported: 0, - Excel: 1, - Word: 2, - PowerPoint: 4, - Outlook: 8, - ExcelWebApp: 16, - WordWebApp: 32, - OutlookWebApp: 64, - Project: 128, - AccessWebApp: 256, - PowerpointWebApp: 512, - ExcelIOS: 1024, - Sway: 2048, - WordIOS: 4096, - PowerPointIOS: 8192, - Access: 16384, - Lync: 32768, - OutlookIOS: 65536, - OneNoteWebApp: 131072, - OneNote: 262144, - ExcelWinRT: 524288, - WordWinRT: 1048576, - PowerpointWinRT: 2097152, - OutlookAndroid: 4194304, - OneNoteWinRT: 8388608, - ExcelAndroid: 8388609, - VisioWebApp: 8388610 +OSF.MessageIDs = { + FetchBundleUrl: 0, + LoadReactBundle: 1, + LoadBundleSuccess: 2, + LoadBundleError: 3 }; -OSF.InternalPerfMarker={ - DataCoercionBegin: "Agave.HostCall.CoerceDataStart", - DataCoercionEnd: "Agave.HostCall.CoerceDataEnd" +OSF.AppName = { + Unsupported: 0, + Excel: 1, + Word: 2, + PowerPoint: 4, + Outlook: 8, + ExcelWebApp: 16, + WordWebApp: 32, + OutlookWebApp: 64, + Project: 128, + AccessWebApp: 256, + PowerpointWebApp: 512, + ExcelIOS: 1024, + Sway: 2048, + WordIOS: 4096, + PowerPointIOS: 8192, + Access: 16384, + Lync: 32768, + OutlookIOS: 65536, + OneNoteWebApp: 131072, + OneNote: 262144, + ExcelWinRT: 524288, + WordWinRT: 1048576, + PowerpointWinRT: 2097152, + OutlookAndroid: 4194304, + OneNoteWinRT: 8388608, + ExcelAndroid: 8388609, + VisioWebApp: 8388610, + OneNoteIOS: 8388611 }; -OSF.HostCallPerfMarker={ - IssueCall: "Agave.HostCall.IssueCall", - ReceiveResponse: "Agave.HostCall.ReceiveResponse", - RuntimeExceptionRaised: "Agave.HostCall.RuntimeExecptionRaised" +OSF.InternalPerfMarker = { + DataCoercionBegin: "Agave.HostCall.CoerceDataStart", + DataCoercionEnd: "Agave.HostCall.CoerceDataEnd" }; -OSF.AgaveHostAction={ - Select: 0, - UnSelect: 1, - CancelDialog: 2, - InsertAgave: 3, - CtrlF6In: 4, - CtrlF6Exit: 5, - CtrlF6ExitShift: 6, - SelectWithError: 7, - NotifyHostError: 8, - RefreshAddinCommands: 9, - PageIsReady: 10, - TabIn: 11, - TabInShift: 12, - TabExit: 13, - TabExitShift: 14, - EscExit: 15, - F2Exit: 16, - ExitNoFocusable: 17, - ExitNoFocusableShift: 18 +OSF.HostCallPerfMarker = { + IssueCall: "Agave.HostCall.IssueCall", + ReceiveResponse: "Agave.HostCall.ReceiveResponse", + RuntimeExceptionRaised: "Agave.HostCall.RuntimeExecptionRaised" }; -OSF.SharedConstants={NotificationConversationIdSuffix: "_ntf"}; -OSF.DialogMessageType={ - DialogMessageReceived: 0, - DialogParentMessageReceived: 1, - DialogClosed: 12006 +OSF.AgaveHostAction = { + Select: 0, + UnSelect: 1, + CancelDialog: 2, + InsertAgave: 3, + CtrlF6In: 4, + CtrlF6Exit: 5, + CtrlF6ExitShift: 6, + SelectWithError: 7, + NotifyHostError: 8, + RefreshAddinCommands: 9, + PageIsReady: 10, + TabIn: 11, + TabInShift: 12, + TabExit: 13, + TabExitShift: 14, + EscExit: 15, + F2Exit: 16, + ExitNoFocusable: 17, + ExitNoFocusableShift: 18, + MouseEnter: 19, + MouseLeave: 20 }; -OSF.OfficeAppContext=function OSF_OfficeAppContext(id, appName, appVersion, appUILocale, dataLocale, docUrl, clientMode, settings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, appMinorVersion, requirementMatrix, hostCustomMessage, hostFullVersion, clientWindowHeight, clientWindowWidth, addinName, appDomains, dialogRequirementMatrix) +OSF.SharedConstants = {NotificationConversationIdSuffix: "_ntf"}; +OSF.DialogMessageType = { + DialogMessageReceived: 0, + DialogParentMessageReceived: 1, + DialogClosed: 12006 +}; +OSF.OfficeAppContext = function OSF_OfficeAppContext(id, appName, appVersion, appUILocale, dataLocale, docUrl, clientMode, settings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, appMinorVersion, requirementMatrix, hostCustomMessage, hostFullVersion, clientWindowHeight, clientWindowWidth, addinName, appDomains, dialogRequirementMatrix) { - this._id=id; - this._appName=appName; - this._appVersion=appVersion; - this._appUILocale=appUILocale; - this._dataLocale=dataLocale; - this._docUrl=docUrl; - this._clientMode=clientMode; - this._settings=settings; - this._reason=reason; - this._osfControlType=osfControlType; - this._eToken=eToken; - this._correlationId=correlationId; - this._appInstanceId=appInstanceId; - this._touchEnabled=touchEnabled; - this._commerceAllowed=commerceAllowed; - this._appMinorVersion=appMinorVersion; - this._requirementMatrix=requirementMatrix; - this._hostCustomMessage=hostCustomMessage; - this._hostFullVersion=hostFullVersion; - this._isDialog=false; - this._clientWindowHeight=clientWindowHeight; - this._clientWindowWidth=clientWindowWidth; - this._addinName=addinName; - this._appDomains=appDomains; - this._dialogRequirementMatrix=dialogRequirementMatrix; - this.get_id=function get_id() - { - return this._id - }; - this.get_appName=function get_appName() - { - return this._appName - }; - this.get_appVersion=function get_appVersion() - { - return this._appVersion - }; - this.get_appUILocale=function get_appUILocale() - { - return this._appUILocale - }; - this.get_dataLocale=function get_dataLocale() - { - return this._dataLocale - }; - this.get_docUrl=function get_docUrl() - { - return this._docUrl - }; - this.get_clientMode=function get_clientMode() - { - return this._clientMode - }; - this.get_bindings=function get_bindings() - { - return this._bindings - }; - this.get_settings=function get_settings() - { - return this._settings - }; - this.get_reason=function get_reason() - { - return this._reason - }; - this.get_osfControlType=function get_osfControlType() - { - return this._osfControlType - }; - this.get_eToken=function get_eToken() - { - return this._eToken - }; - this.get_correlationId=function get_correlationId() - { - return this._correlationId - }; - this.get_appInstanceId=function get_appInstanceId() - { - return this._appInstanceId - }; - this.get_touchEnabled=function get_touchEnabled() - { - return this._touchEnabled - }; - this.get_commerceAllowed=function get_commerceAllowed() - { - return this._commerceAllowed - }; - this.get_appMinorVersion=function get_appMinorVersion() - { - return this._appMinorVersion - }; - this.get_requirementMatrix=function get_requirementMatrix() - { - return this._requirementMatrix - }; - this.get_dialogRequirementMatrix=function get_dialogRequirementMatrix() - { - return this._dialogRequirementMatrix - }; - this.get_hostCustomMessage=function get_hostCustomMessage() - { - return this._hostCustomMessage - }; - this.get_hostFullVersion=function get_hostFullVersion() - { - return this._hostFullVersion - }; - this.get_isDialog=function get_isDialog() - { - return this._isDialog - }; - this.get_clientWindowHeight=function get_clientWindowHeight() - { - return this._clientWindowHeight - }; - this.get_clientWindowWidth=function get_clientWindowWidth() - { - return this._clientWindowWidth - }; - this.get_addinName=function get_addinName() - { - return this._addinName - }; - this.get_appDomains=function get_appDomains() - { - return this._appDomains - } + this._id = id; + this._appName = appName; + this._appVersion = appVersion; + this._appUILocale = appUILocale; + this._dataLocale = dataLocale; + this._docUrl = docUrl; + this._clientMode = clientMode; + this._settings = settings; + this._reason = reason; + this._osfControlType = osfControlType; + this._eToken = eToken; + this._correlationId = correlationId; + this._appInstanceId = appInstanceId; + this._touchEnabled = touchEnabled; + this._commerceAllowed = commerceAllowed; + this._appMinorVersion = appMinorVersion; + this._requirementMatrix = requirementMatrix; + this._hostCustomMessage = hostCustomMessage; + this._hostFullVersion = hostFullVersion; + this._isDialog = false; + this._clientWindowHeight = clientWindowHeight; + this._clientWindowWidth = clientWindowWidth; + this._addinName = addinName; + this._appDomains = appDomains; + this._dialogRequirementMatrix = dialogRequirementMatrix; + this.get_id = function get_id() + { + return this._id + }; + this.get_appName = function get_appName() + { + return this._appName + }; + this.get_appVersion = function get_appVersion() + { + return this._appVersion + }; + this.get_appUILocale = function get_appUILocale() + { + return this._appUILocale + }; + this.get_dataLocale = function get_dataLocale() + { + return this._dataLocale + }; + this.get_docUrl = function get_docUrl() + { + return this._docUrl + }; + this.get_clientMode = function get_clientMode() + { + return this._clientMode + }; + this.get_bindings = function get_bindings() + { + return this._bindings + }; + this.get_settings = function get_settings() + { + return this._settings + }; + this.get_reason = function get_reason() + { + return this._reason + }; + this.get_osfControlType = function get_osfControlType() + { + return this._osfControlType + }; + this.get_eToken = function get_eToken() + { + return this._eToken + }; + this.get_correlationId = function get_correlationId() + { + return this._correlationId + }; + this.get_appInstanceId = function get_appInstanceId() + { + return this._appInstanceId + }; + this.get_touchEnabled = function get_touchEnabled() + { + return this._touchEnabled + }; + this.get_commerceAllowed = function get_commerceAllowed() + { + return this._commerceAllowed + }; + this.get_appMinorVersion = function get_appMinorVersion() + { + return this._appMinorVersion + }; + this.get_requirementMatrix = function get_requirementMatrix() + { + return this._requirementMatrix + }; + this.get_dialogRequirementMatrix = function get_dialogRequirementMatrix() + { + return this._dialogRequirementMatrix + }; + this.get_hostCustomMessage = function get_hostCustomMessage() + { + return this._hostCustomMessage + }; + this.get_hostFullVersion = function get_hostFullVersion() + { + return this._hostFullVersion + }; + this.get_isDialog = function get_isDialog() + { + return this._isDialog + }; + this.get_clientWindowHeight = function get_clientWindowHeight() + { + return this._clientWindowHeight + }; + this.get_clientWindowWidth = function get_clientWindowWidth() + { + return this._clientWindowWidth + }; + this.get_addinName = function get_addinName() + { + return this._addinName + }; + this.get_appDomains = function get_appDomains() + { + return this._appDomains + } }; -OSF.OsfControlType={ - DocumentLevel: 0, - ContainerLevel: 1 +OSF.OsfControlType = { + DocumentLevel: 0, + ContainerLevel: 1 }; -OSF.ClientMode={ - ReadOnly: 0, - ReadWrite: 1 +OSF.ClientMode = { + ReadOnly: 0, + ReadWrite: 1 }; OSF.OUtil.setNamespace("Microsoft",window); OSF.OUtil.setNamespace("Office",Microsoft); OSF.OUtil.setNamespace("Client",Microsoft.Office); OSF.OUtil.setNamespace("WebExtension",Microsoft.Office); -Microsoft.Office.WebExtension.InitializationReason={ - Inserted: "inserted", - DocumentOpened: "documentOpened" +Microsoft.Office.WebExtension.InitializationReason = { + Inserted: "inserted", + DocumentOpened: "documentOpened" }; -Microsoft.Office.WebExtension.ValueFormat={ - Unformatted: "unformatted", - Formatted: "formatted" +Microsoft.Office.WebExtension.ValueFormat = { + Unformatted: "unformatted", + Formatted: "formatted" }; -Microsoft.Office.WebExtension.FilterType={All: "all"}; -Microsoft.Office.WebExtension.PlatformType={ - PC: "PC", - OfficeOnline: "OfficeOnline", - Mac: "Mac", - iOS: "iOS", - Android: "Android", - Universal: "Universal" +Microsoft.Office.WebExtension.FilterType = {All: "all"}; +Microsoft.Office.WebExtension.PlatformType = { + PC: "PC", + OfficeOnline: "OfficeOnline", + Mac: "Mac", + iOS: "iOS", + Android: "Android", + Universal: "Universal" }; -Microsoft.Office.WebExtension.HostType={ - Word: "Word", - Excel: "Excel", - PowerPoint: "PowerPoint", - Outlook: "Outlook", - OneNote: "OneNote", - Project: "Project", - Access: "Access" +Microsoft.Office.WebExtension.HostType = { + Word: "Word", + Excel: "Excel", + PowerPoint: "PowerPoint", + Outlook: "Outlook", + OneNote: "OneNote", + Project: "Project", + Access: "Access" }; -Microsoft.Office.WebExtension.Parameters={ - BindingType: "bindingType", - CoercionType: "coercionType", - ValueFormat: "valueFormat", - FilterType: "filterType", - Columns: "columns", - SampleData: "sampleData", - GoToType: "goToType", - SelectionMode: "selectionMode", - Id: "id", - PromptText: "promptText", - ItemName: "itemName", - FailOnCollision: "failOnCollision", - StartRow: "startRow", - StartColumn: "startColumn", - RowCount: "rowCount", - ColumnCount: "columnCount", - Callback: "callback", - AsyncContext: "asyncContext", - Data: "data", - Rows: "rows", - OverwriteIfStale: "overwriteIfStale", - FileType: "fileType", - EventType: "eventType", - Handler: "handler", - SliceSize: "sliceSize", - SliceIndex: "sliceIndex", - ActiveView: "activeView", - Status: "status", - PlatformType: "platformType", - HostType: "hostType", - Xml: "xml", - Namespace: "namespace", - Prefix: "prefix", - XPath: "xPath", - Text: "text", - ImageLeft: "imageLeft", - ImageTop: "imageTop", - ImageWidth: "imageWidth", - ImageHeight: "imageHeight", - TaskId: "taskId", - FieldId: "fieldId", - FieldValue: "fieldValue", - ServerUrl: "serverUrl", - ListName: "listName", - ResourceId: "resourceId", - ViewType: "viewType", - ViewName: "viewName", - GetRawValue: "getRawValue", - CellFormat: "cellFormat", - TableOptions: "tableOptions", - TaskIndex: "taskIndex", - ResourceIndex: "resourceIndex", - CustomFieldId: "customFieldId", - Url: "url", - MessageHandler: "messageHandler", - Width: "width", - Height: "height", - RequireHTTPs: "requireHTTPS", - MessageToParent: "messageToParent", - DisplayInIframe: "displayInIframe", - MessageContent: "messageContent", - HideTitle: "hideTitle", - AppCommandInvocationCompletedData: "appCommandInvocationCompletedData" +Microsoft.Office.WebExtension.Parameters = { + BindingType: "bindingType", + CoercionType: "coercionType", + ValueFormat: "valueFormat", + FilterType: "filterType", + Columns: "columns", + SampleData: "sampleData", + GoToType: "goToType", + SelectionMode: "selectionMode", + Id: "id", + PromptText: "promptText", + ItemName: "itemName", + FailOnCollision: "failOnCollision", + StartRow: "startRow", + StartColumn: "startColumn", + RowCount: "rowCount", + ColumnCount: "columnCount", + Callback: "callback", + AsyncContext: "asyncContext", + Data: "data", + Rows: "rows", + OverwriteIfStale: "overwriteIfStale", + FileType: "fileType", + EventType: "eventType", + Handler: "handler", + SliceSize: "sliceSize", + SliceIndex: "sliceIndex", + ActiveView: "activeView", + Status: "status", + PlatformType: "platformType", + HostType: "hostType", + ForceConsent: "forceConsent", + ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + Reserved: "reserved", + Xml: "xml", + Namespace: "namespace", + Prefix: "prefix", + XPath: "xPath", + Text: "text", + ImageLeft: "imageLeft", + ImageTop: "imageTop", + ImageWidth: "imageWidth", + ImageHeight: "imageHeight", + TaskId: "taskId", + FieldId: "fieldId", + FieldValue: "fieldValue", + ServerUrl: "serverUrl", + ListName: "listName", + ResourceId: "resourceId", + ViewType: "viewType", + ViewName: "viewName", + GetRawValue: "getRawValue", + CellFormat: "cellFormat", + TableOptions: "tableOptions", + TaskIndex: "taskIndex", + ResourceIndex: "resourceIndex", + CustomFieldId: "customFieldId", + Url: "url", + MessageHandler: "messageHandler", + Width: "width", + Height: "height", + RequireHTTPs: "requireHTTPS", + MessageToParent: "messageToParent", + DisplayInIframe: "displayInIframe", + MessageContent: "messageContent", + HideTitle: "hideTitle", + UseDeviceIndependentPixels: "useDeviceIndependentPixels", + AppCommandInvocationCompletedData: "appCommandInvocationCompletedData" }; OSF.OUtil.setNamespace("DDA",OSF); -OSF.DDA.DocumentMode={ - ReadOnly: 1, - ReadWrite: 0 +OSF.DDA.DocumentMode = { + ReadOnly: 1, + ReadWrite: 0 }; -OSF.DDA.PropertyDescriptors={AsyncResultStatus: "AsyncResultStatus"}; -OSF.DDA.EventDescriptors={}; -OSF.DDA.ListDescriptors={}; -OSF.DDA.UI={}; -OSF.DDA.getXdmEventName=function OSF_DDA$GetXdmEventName(id, eventType) +OSF.DDA.PropertyDescriptors = {AsyncResultStatus: "AsyncResultStatus"}; +OSF.DDA.EventDescriptors = {}; +OSF.DDA.ListDescriptors = {}; +OSF.DDA.UI = {}; +OSF.DDA.getXdmEventName = function OSF_DDA$GetXdmEventName(id, eventType) { - if(eventType==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged || eventType==Microsoft.Office.WebExtension.EventType.BindingDataChanged || eventType==Microsoft.Office.WebExtension.EventType.DataNodeDeleted || eventType==Microsoft.Office.WebExtension.EventType.DataNodeInserted || eventType==Microsoft.Office.WebExtension.EventType.DataNodeReplaced) - return id+"_"+eventType; - else - return eventType + if(eventType == Microsoft.Office.WebExtension.EventType.BindingSelectionChanged || eventType == Microsoft.Office.WebExtension.EventType.BindingDataChanged || eventType == Microsoft.Office.WebExtension.EventType.DataNodeDeleted || eventType == Microsoft.Office.WebExtension.EventType.DataNodeInserted || eventType == Microsoft.Office.WebExtension.EventType.DataNodeReplaced) + return id + "_" + eventType; + else + return eventType }; -OSF.DDA.MethodDispId={ - dispidMethodMin: 64, - dispidGetSelectedDataMethod: 64, - dispidSetSelectedDataMethod: 65, - dispidAddBindingFromSelectionMethod: 66, - dispidAddBindingFromPromptMethod: 67, - dispidGetBindingMethod: 68, - dispidReleaseBindingMethod: 69, - dispidGetBindingDataMethod: 70, - dispidSetBindingDataMethod: 71, - dispidAddRowsMethod: 72, - dispidClearAllRowsMethod: 73, - dispidGetAllBindingsMethod: 74, - dispidLoadSettingsMethod: 75, - dispidSaveSettingsMethod: 76, - dispidGetDocumentCopyMethod: 77, - dispidAddBindingFromNamedItemMethod: 78, - dispidAddColumnsMethod: 79, - dispidGetDocumentCopyChunkMethod: 80, - dispidReleaseDocumentCopyMethod: 81, - dispidNavigateToMethod: 82, - dispidGetActiveViewMethod: 83, - dispidGetDocumentThemeMethod: 84, - dispidGetOfficeThemeMethod: 85, - dispidGetFilePropertiesMethod: 86, - dispidClearFormatsMethod: 87, - dispidSetTableOptionsMethod: 88, - dispidSetFormatsMethod: 89, - dispidExecuteRichApiRequestMethod: 93, - dispidAppCommandInvocationCompletedMethod: 94, - dispidCloseContainerMethod: 97, - dispidGetSelectedTaskMethod: 110, - dispidGetSelectedResourceMethod: 111, - dispidGetTaskMethod: 112, - dispidGetResourceFieldMethod: 113, - dispidGetWSSUrlMethod: 114, - dispidGetTaskFieldMethod: 115, - dispidGetProjectFieldMethod: 116, - dispidGetSelectedViewMethod: 117, - dispidGetTaskByIndexMethod: 118, - dispidGetResourceByIndexMethod: 119, - dispidSetTaskFieldMethod: 120, - dispidSetResourceFieldMethod: 121, - dispidGetMaxTaskIndexMethod: 122, - dispidGetMaxResourceIndexMethod: 123, - dispidCreateTaskMethod: 124, - dispidAddDataPartMethod: 128, - dispidGetDataPartByIdMethod: 129, - dispidGetDataPartsByNamespaceMethod: 130, - dispidGetDataPartXmlMethod: 131, - dispidGetDataPartNodesMethod: 132, - dispidDeleteDataPartMethod: 133, - dispidGetDataNodeValueMethod: 134, - dispidGetDataNodeXmlMethod: 135, - dispidGetDataNodesMethod: 136, - dispidSetDataNodeValueMethod: 137, - dispidSetDataNodeXmlMethod: 138, - dispidAddDataNamespaceMethod: 139, - dispidGetDataUriByPrefixMethod: 140, - dispidGetDataPrefixByUriMethod: 141, - dispidGetDataNodeTextMethod: 142, - dispidSetDataNodeTextMethod: 143, - dispidMessageParentMethod: 144, - dispidSendMessageMethod: 145, - dispidGetDelegateTokenMethod: 146, - dispidMethodMax: 146 +OSF.DDA.MethodDispId = { + dispidMethodMin: 64, + dispidGetSelectedDataMethod: 64, + dispidSetSelectedDataMethod: 65, + dispidAddBindingFromSelectionMethod: 66, + dispidAddBindingFromPromptMethod: 67, + dispidGetBindingMethod: 68, + dispidReleaseBindingMethod: 69, + dispidGetBindingDataMethod: 70, + dispidSetBindingDataMethod: 71, + dispidAddRowsMethod: 72, + dispidClearAllRowsMethod: 73, + dispidGetAllBindingsMethod: 74, + dispidLoadSettingsMethod: 75, + dispidSaveSettingsMethod: 76, + dispidGetDocumentCopyMethod: 77, + dispidAddBindingFromNamedItemMethod: 78, + dispidAddColumnsMethod: 79, + dispidGetDocumentCopyChunkMethod: 80, + dispidReleaseDocumentCopyMethod: 81, + dispidNavigateToMethod: 82, + dispidGetActiveViewMethod: 83, + dispidGetDocumentThemeMethod: 84, + dispidGetOfficeThemeMethod: 85, + dispidGetFilePropertiesMethod: 86, + dispidClearFormatsMethod: 87, + dispidSetTableOptionsMethod: 88, + dispidSetFormatsMethod: 89, + dispidExecuteRichApiRequestMethod: 93, + dispidAppCommandInvocationCompletedMethod: 94, + dispidCloseContainerMethod: 97, + dispidGetAccessTokenMethod: 98, + dispidOpenBrowserWindow: 102, + dispidGetSelectedTaskMethod: 110, + dispidGetSelectedResourceMethod: 111, + dispidGetTaskMethod: 112, + dispidGetResourceFieldMethod: 113, + dispidGetWSSUrlMethod: 114, + dispidGetTaskFieldMethod: 115, + dispidGetProjectFieldMethod: 116, + dispidGetSelectedViewMethod: 117, + dispidGetTaskByIndexMethod: 118, + dispidGetResourceByIndexMethod: 119, + dispidSetTaskFieldMethod: 120, + dispidSetResourceFieldMethod: 121, + dispidGetMaxTaskIndexMethod: 122, + dispidGetMaxResourceIndexMethod: 123, + dispidCreateTaskMethod: 124, + dispidAddDataPartMethod: 128, + dispidGetDataPartByIdMethod: 129, + dispidGetDataPartsByNamespaceMethod: 130, + dispidGetDataPartXmlMethod: 131, + dispidGetDataPartNodesMethod: 132, + dispidDeleteDataPartMethod: 133, + dispidGetDataNodeValueMethod: 134, + dispidGetDataNodeXmlMethod: 135, + dispidGetDataNodesMethod: 136, + dispidSetDataNodeValueMethod: 137, + dispidSetDataNodeXmlMethod: 138, + dispidAddDataNamespaceMethod: 139, + dispidGetDataUriByPrefixMethod: 140, + dispidGetDataPrefixByUriMethod: 141, + dispidGetDataNodeTextMethod: 142, + dispidSetDataNodeTextMethod: 143, + dispidMessageParentMethod: 144, + dispidSendMessageMethod: 145, + dispidMethodMax: 145 }; -OSF.DDA.EventDispId={ - dispidEventMin: 0, - dispidInitializeEvent: 0, - dispidSettingsChangedEvent: 1, - dispidDocumentSelectionChangedEvent: 2, - dispidBindingSelectionChangedEvent: 3, - dispidBindingDataChangedEvent: 4, - dispidDocumentOpenEvent: 5, - dispidDocumentCloseEvent: 6, - dispidActiveViewChangedEvent: 7, - dispidDocumentThemeChangedEvent: 8, - dispidOfficeThemeChangedEvent: 9, - dispidDialogMessageReceivedEvent: 10, - dispidDialogNotificationShownInAddinEvent: 11, - dispidDialogParentMessageReceivedEvent: 12, - dispidActivationStatusChangedEvent: 32, - dispidAppCommandInvokedEvent: 39, - dispidOlkItemSelectedChangedEvent: 46, - dispidTaskSelectionChangedEvent: 56, - dispidResourceSelectionChangedEvent: 57, - dispidViewSelectionChangedEvent: 58, - dispidDataNodeAddedEvent: 60, - dispidDataNodeReplacedEvent: 61, - dispidDataNodeDeletedEvent: 62, - dispidEventMax: 63 +OSF.DDA.EventDispId = { + dispidEventMin: 0, + dispidInitializeEvent: 0, + dispidSettingsChangedEvent: 1, + dispidDocumentSelectionChangedEvent: 2, + dispidBindingSelectionChangedEvent: 3, + dispidBindingDataChangedEvent: 4, + dispidDocumentOpenEvent: 5, + dispidDocumentCloseEvent: 6, + dispidActiveViewChangedEvent: 7, + dispidDocumentThemeChangedEvent: 8, + dispidOfficeThemeChangedEvent: 9, + dispidDialogMessageReceivedEvent: 10, + dispidDialogNotificationShownInAddinEvent: 11, + dispidDialogParentMessageReceivedEvent: 12, + dispidObjectDeletedEvent: 13, + dispidObjectSelectionChangedEvent: 14, + dispidObjectDataChangedEvent: 15, + dispidContentControlAddedEvent: 16, + dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, + dispidAppCommandInvokedEvent: 39, + dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, + dispidTaskSelectionChangedEvent: 56, + dispidResourceSelectionChangedEvent: 57, + dispidViewSelectionChangedEvent: 58, + dispidDataNodeAddedEvent: 60, + dispidDataNodeReplacedEvent: 61, + dispidDataNodeDeletedEvent: 62, + dispidEventMax: 63 }; -OSF.DDA.ErrorCodeManager=function() +OSF.DDA.ErrorCodeManager = function() { - var _errorMappings={}; - return{ - getErrorArgs: function OSF_DDA_ErrorCodeManager$getErrorArgs(errorCode) - { - var errorArgs=_errorMappings[errorCode]; - if(!errorArgs) - errorArgs=_errorMappings[this.errorCodes.ooeInternalError]; - else - { - if(!errorArgs.name) - errorArgs.name=_errorMappings[this.errorCodes.ooeInternalError].name; - if(!errorArgs.message) - errorArgs.message=_errorMappings[this.errorCodes.ooeInternalError].message - } - return errorArgs - }, - addErrorMessage: function OSF_DDA_ErrorCodeManager$addErrorMessage(errorCode, errorNameMessage) - { - _errorMappings[errorCode]=errorNameMessage - }, - errorCodes: { - ooeSuccess: 0, - ooeChunkResult: 1, - ooeCoercionTypeNotSupported: 1e3, - ooeGetSelectionNotMatchDataType: 1001, - ooeCoercionTypeNotMatchBinding: 1002, - ooeInvalidGetRowColumnCounts: 1003, - ooeSelectionNotSupportCoercionType: 1004, - ooeInvalidGetStartRowColumn: 1005, - ooeNonUniformPartialGetNotSupported: 1006, - ooeGetDataIsTooLarge: 1008, - ooeFileTypeNotSupported: 1009, - ooeGetDataParametersConflict: 1010, - ooeInvalidGetColumns: 1011, - ooeInvalidGetRows: 1012, - ooeInvalidReadForBlankRow: 1013, - ooeUnsupportedDataObject: 2e3, - ooeCannotWriteToSelection: 2001, - ooeDataNotMatchSelection: 2002, - ooeOverwriteWorksheetData: 2003, - ooeDataNotMatchBindingSize: 2004, - ooeInvalidSetStartRowColumn: 2005, - ooeInvalidDataFormat: 2006, - ooeDataNotMatchCoercionType: 2007, - ooeDataNotMatchBindingType: 2008, - ooeSetDataIsTooLarge: 2009, - ooeNonUniformPartialSetNotSupported: 2010, - ooeInvalidSetColumns: 2011, - ooeInvalidSetRows: 2012, - ooeSetDataParametersConflict: 2013, - ooeCellDataAmountBeyondLimits: 2014, - ooeSelectionCannotBound: 3e3, - ooeBindingNotExist: 3002, - ooeBindingToMultipleSelection: 3003, - ooeInvalidSelectionForBindingType: 3004, - ooeOperationNotSupportedOnThisBindingType: 3005, - ooeNamedItemNotFound: 3006, - ooeMultipleNamedItemFound: 3007, - ooeInvalidNamedItemForBindingType: 3008, - ooeUnknownBindingType: 3009, - ooeOperationNotSupportedOnMatrixData: 3010, - ooeInvalidColumnsForBinding: 3011, - ooeSettingNameNotExist: 4e3, - ooeSettingsCannotSave: 4001, - ooeSettingsAreStale: 4002, - ooeOperationNotSupported: 5e3, - ooeInternalError: 5001, - ooeDocumentReadOnly: 5002, - ooeEventHandlerNotExist: 5003, - ooeInvalidApiCallInContext: 5004, - ooeShuttingDown: 5005, - ooeUnsupportedEnumeration: 5007, - ooeIndexOutOfRange: 5008, - ooeBrowserAPINotSupported: 5009, - ooeInvalidParam: 5010, - ooeRequestTimeout: 5011, - ooeInvalidOrTimedOutSession: 5012, - ooeTooManyIncompleteRequests: 5100, - ooeRequestTokenUnavailable: 5101, - ooeActivityLimitReached: 5102, - ooeCustomXmlNodeNotFound: 6e3, - ooeCustomXmlError: 6100, - ooeCustomXmlExceedQuota: 6101, - ooeCustomXmlOutOfDate: 6102, - ooeNoCapability: 7e3, - ooeCannotNavTo: 7001, - ooeSpecifiedIdNotExist: 7002, - ooeNavOutOfBound: 7004, - ooeElementMissing: 8e3, - ooeProtectedError: 8001, - ooeInvalidCellsValue: 8010, - ooeInvalidTableOptionValue: 8011, - ooeInvalidFormatValue: 8012, - ooeRowIndexOutOfRange: 8020, - ooeColIndexOutOfRange: 8021, - ooeFormatValueOutOfRange: 8022, - ooeCellFormatAmountBeyondLimits: 8023, - ooeMemoryFileLimit: 11e3, - ooeNetworkProblemRetrieveFile: 11001, - ooeInvalidSliceSize: 11002, - ooeInvalidCallback: 11101, - ooeInvalidWidth: 12e3, - ooeInvalidHeight: 12001, - ooeNavigationError: 12002, - ooeInvalidScheme: 12003, - ooeAppDomains: 12004, - ooeRequireHTTPS: 12005, - ooeWebDialogClosed: 12006, - ooeDialogAlreadyOpened: 12007, - ooeEndUserAllow: 12008, - ooeEndUserIgnore: 12009, - ooeNotUILessDialog: 12010, - ooeCrossZone: 12011 - }, - initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) - { - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={ - name: stringNS.L_InvalidCoercion, - message: stringNS.L_CoercionTypeNotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={ - name: stringNS.L_DataReadError, - message: stringNS.L_GetSelectionNotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={ - name: stringNS.L_InvalidCoercion, - message: stringNS.L_CoercionTypeNotMatchBinding - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={ - name: stringNS.L_DataReadError, - message: stringNS.L_InvalidGetRowColumnCounts - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={ - name: stringNS.L_DataReadError, - message: stringNS.L_SelectionNotSupportCoercionType - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={ - name: stringNS.L_DataReadError, - message: stringNS.L_InvalidGetStartRowColumn - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={ - name: stringNS.L_DataReadError, - message: stringNS.L_NonUniformPartialGetNotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={ - name: stringNS.L_DataReadError, - message: stringNS.L_GetDataIsTooLarge - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={ - name: stringNS.L_DataReadError, - message: stringNS.L_FileTypeNotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={ - name: stringNS.L_DataReadError, - message: stringNS.L_GetDataParametersConflict - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={ - name: stringNS.L_DataReadError, - message: stringNS.L_InvalidGetColumns - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={ - name: stringNS.L_DataReadError, - message: stringNS.L_InvalidGetRows - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={ - name: stringNS.L_DataReadError, - message: stringNS.L_InvalidReadForBlankRow - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_UnsupportedDataObject - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_CannotWriteToSelection - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_DataNotMatchSelection - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_OverwriteWorksheetData - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_DataNotMatchBindingSize - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_InvalidSetStartRowColumn - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={ - name: stringNS.L_InvalidFormat, - message: stringNS.L_InvalidDataFormat - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={ - name: stringNS.L_InvalidDataObject, - message: stringNS.L_DataNotMatchCoercionType - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={ - name: stringNS.L_InvalidDataObject, - message: stringNS.L_DataNotMatchBindingType - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_SetDataIsTooLarge - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_NonUniformPartialSetNotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_InvalidSetColumns - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_InvalidSetRows - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_SetDataParametersConflict - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={ - name: stringNS.L_BindingCreationError, - message: stringNS.L_SelectionCannotBound - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={ - name: stringNS.L_InvalidBindingError, - message: stringNS.L_BindingNotExist - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={ - name: stringNS.L_BindingCreationError, - message: stringNS.L_BindingToMultipleSelection - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={ - name: stringNS.L_BindingCreationError, - message: stringNS.L_InvalidSelectionForBindingType - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={ - name: stringNS.L_InvalidBindingOperation, - message: stringNS.L_OperationNotSupportedOnThisBindingType - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={ - name: stringNS.L_BindingCreationError, - message: stringNS.L_NamedItemNotFound - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={ - name: stringNS.L_BindingCreationError, - message: stringNS.L_MultipleNamedItemFound - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={ - name: stringNS.L_BindingCreationError, - message: stringNS.L_InvalidNamedItemForBindingType - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={ - name: stringNS.L_InvalidBinding, - message: stringNS.L_UnknownBindingType - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={ - name: stringNS.L_InvalidBindingOperation, - message: stringNS.L_OperationNotSupportedOnMatrixData - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={ - name: stringNS.L_InvalidBinding, - message: stringNS.L_InvalidColumnsForBinding - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={ - name: stringNS.L_ReadSettingsError, - message: stringNS.L_SettingNameNotExist - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={ - name: stringNS.L_SaveSettingsError, - message: stringNS.L_SettingsCannotSave - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={ - name: stringNS.L_SettingsStaleError, - message: stringNS.L_SettingsAreStale - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={ - name: stringNS.L_HostError, - message: stringNS.L_OperationNotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={ - name: stringNS.L_InternalError, - message: stringNS.L_InternalErrorDescription - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={ - name: stringNS.L_PermissionDenied, - message: stringNS.L_DocumentReadOnly - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={ - name: stringNS.L_EventRegistrationError, - message: stringNS.L_EventHandlerNotExist - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={ - name: stringNS.L_InvalidAPICall, - message: stringNS.L_InvalidApiCallInContext - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={ - name: stringNS.L_ShuttingDown, - message: stringNS.L_ShuttingDown - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={ - name: stringNS.L_UnsupportedEnumeration, - message: stringNS.L_UnsupportedEnumerationMessage - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={ - name: stringNS.L_IndexOutOfRange, - message: stringNS.L_IndexOutOfRange - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={ - name: stringNS.L_APINotSupported, - message: stringNS.L_BrowserAPINotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={ - name: stringNS.L_APICallFailed, - message: stringNS.L_RequestTimeout - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={ - name: stringNS.L_InvalidOrTimedOutSession, - message: stringNS.L_InvalidOrTimedOutSessionMessage - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={ - name: stringNS.L_APICallFailed, - message: stringNS.L_TooManyIncompleteRequests - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={ - name: stringNS.L_APICallFailed, - message: stringNS.L_RequestTokenUnavailable - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={ - name: stringNS.L_APICallFailed, - message: stringNS.L_ActivityLimitReached - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={ - name: stringNS.L_InvalidNode, - message: stringNS.L_CustomXmlNodeNotFound - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={ - name: stringNS.L_CustomXmlError, - message: stringNS.L_CustomXmlError - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={ - name: stringNS.L_CustomXmlExceedQuotaName, - message: stringNS.L_CustomXmlExceedQuotaMessage - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={ - name: stringNS.L_CustomXmlOutOfDateName, - message: stringNS.L_CustomXmlOutOfDateMessage - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={ - name: stringNS.L_PermissionDenied, - message: stringNS.L_NoCapability - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={ - name: stringNS.L_CannotNavigateTo, - message: stringNS.L_CannotNavigateTo - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={ - name: stringNS.L_SpecifiedIdNotExist, - message: stringNS.L_SpecifiedIdNotExist - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={ - name: stringNS.L_NavOutOfBound, - message: stringNS.L_NavOutOfBound - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={ - name: stringNS.L_DataWriteReminder, - message: stringNS.L_CellDataAmountBeyondLimits - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={ - name: stringNS.L_MissingParameter, - message: stringNS.L_ElementMissing - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={ - name: stringNS.L_PermissionDenied, - message: stringNS.L_NoCapability - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={ - name: stringNS.L_InvalidValue, - message: stringNS.L_InvalidCellsValue - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={ - name: stringNS.L_InvalidValue, - message: stringNS.L_InvalidTableOptionValue - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={ - name: stringNS.L_InvalidValue, - message: stringNS.L_InvalidFormatValue - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={ - name: stringNS.L_OutOfRange, - message: stringNS.L_RowIndexOutOfRange - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={ - name: stringNS.L_OutOfRange, - message: stringNS.L_ColIndexOutOfRange - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={ - name: stringNS.L_OutOfRange, - message: stringNS.L_FormatValueOutOfRange - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={ - name: stringNS.L_FormattingReminder, - message: stringNS.L_CellFormatAmountBeyondLimits - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={ - name: stringNS.L_MemoryLimit, - message: stringNS.L_CloseFileBeforeRetrieve - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={ - name: stringNS.L_NetworkProblem, - message: stringNS.L_NetworkProblemRetrieveFile - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={ - name: stringNS.L_InvalidValue, - message: stringNS.L_SliceSizeNotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={ - name: stringNS.L_DisplayDialogError, - message: stringNS.L_DialogAlreadyOpened - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={ - name: stringNS.L_IndexOutOfRange, - message: stringNS.L_IndexOutOfRange - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={ - name: stringNS.L_IndexOutOfRange, - message: stringNS.L_IndexOutOfRange - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={ - name: stringNS.L_DisplayDialogError, - message: stringNS.L_NetworkProblem - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={ - name: stringNS.L_DialogNavigateError, - message: stringNS.L_DialogInvalidScheme - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={ - name: stringNS.L_DisplayDialogError, - message: stringNS.L_DialogAddressNotTrusted - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={ - name: stringNS.L_DisplayDialogError, - message: stringNS.L_DialogRequireHTTPS - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={ - name: stringNS.L_DisplayDialogError, - message: stringNS.L_UserClickIgnore - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={ - name: stringNS.L_DisplayDialogError, - message: stringNS.L_NewWindowCrossZoneErrorString - } - } - } + var _errorMappings = {}; + return{ + getErrorArgs: function OSF_DDA_ErrorCodeManager$getErrorArgs(errorCode) + { + var errorArgs = _errorMappings[errorCode]; + if(!errorArgs) + errorArgs = _errorMappings[this.errorCodes.ooeInternalError]; + else + { + if(!errorArgs.name) + errorArgs.name = _errorMappings[this.errorCodes.ooeInternalError].name; + if(!errorArgs.message) + errorArgs.message = _errorMappings[this.errorCodes.ooeInternalError].message + } + return errorArgs + }, + addErrorMessage: function OSF_DDA_ErrorCodeManager$addErrorMessage(errorCode, errorNameMessage) + { + _errorMappings[errorCode] = errorNameMessage + }, + errorCodes: { + ooeSuccess: 0, + ooeChunkResult: 1, + ooeCoercionTypeNotSupported: 1e3, + ooeGetSelectionNotMatchDataType: 1001, + ooeCoercionTypeNotMatchBinding: 1002, + ooeInvalidGetRowColumnCounts: 1003, + ooeSelectionNotSupportCoercionType: 1004, + ooeInvalidGetStartRowColumn: 1005, + ooeNonUniformPartialGetNotSupported: 1006, + ooeGetDataIsTooLarge: 1008, + ooeFileTypeNotSupported: 1009, + ooeGetDataParametersConflict: 1010, + ooeInvalidGetColumns: 1011, + ooeInvalidGetRows: 1012, + ooeInvalidReadForBlankRow: 1013, + ooeUnsupportedDataObject: 2e3, + ooeCannotWriteToSelection: 2001, + ooeDataNotMatchSelection: 2002, + ooeOverwriteWorksheetData: 2003, + ooeDataNotMatchBindingSize: 2004, + ooeInvalidSetStartRowColumn: 2005, + ooeInvalidDataFormat: 2006, + ooeDataNotMatchCoercionType: 2007, + ooeDataNotMatchBindingType: 2008, + ooeSetDataIsTooLarge: 2009, + ooeNonUniformPartialSetNotSupported: 2010, + ooeInvalidSetColumns: 2011, + ooeInvalidSetRows: 2012, + ooeSetDataParametersConflict: 2013, + ooeCellDataAmountBeyondLimits: 2014, + ooeSelectionCannotBound: 3e3, + ooeBindingNotExist: 3002, + ooeBindingToMultipleSelection: 3003, + ooeInvalidSelectionForBindingType: 3004, + ooeOperationNotSupportedOnThisBindingType: 3005, + ooeNamedItemNotFound: 3006, + ooeMultipleNamedItemFound: 3007, + ooeInvalidNamedItemForBindingType: 3008, + ooeUnknownBindingType: 3009, + ooeOperationNotSupportedOnMatrixData: 3010, + ooeInvalidColumnsForBinding: 3011, + ooeSettingNameNotExist: 4e3, + ooeSettingsCannotSave: 4001, + ooeSettingsAreStale: 4002, + ooeOperationNotSupported: 5e3, + ooeInternalError: 5001, + ooeDocumentReadOnly: 5002, + ooeEventHandlerNotExist: 5003, + ooeInvalidApiCallInContext: 5004, + ooeShuttingDown: 5005, + ooeUnsupportedEnumeration: 5007, + ooeIndexOutOfRange: 5008, + ooeBrowserAPINotSupported: 5009, + ooeInvalidParam: 5010, + ooeRequestTimeout: 5011, + ooeInvalidOrTimedOutSession: 5012, + ooeInvalidApiArguments: 5013, + ooeTooManyIncompleteRequests: 5100, + ooeRequestTokenUnavailable: 5101, + ooeActivityLimitReached: 5102, + ooeCustomXmlNodeNotFound: 6e3, + ooeCustomXmlError: 6100, + ooeCustomXmlExceedQuota: 6101, + ooeCustomXmlOutOfDate: 6102, + ooeNoCapability: 7e3, + ooeCannotNavTo: 7001, + ooeSpecifiedIdNotExist: 7002, + ooeNavOutOfBound: 7004, + ooeElementMissing: 8e3, + ooeProtectedError: 8001, + ooeInvalidCellsValue: 8010, + ooeInvalidTableOptionValue: 8011, + ooeInvalidFormatValue: 8012, + ooeRowIndexOutOfRange: 8020, + ooeColIndexOutOfRange: 8021, + ooeFormatValueOutOfRange: 8022, + ooeCellFormatAmountBeyondLimits: 8023, + ooeMemoryFileLimit: 11e3, + ooeNetworkProblemRetrieveFile: 11001, + ooeInvalidSliceSize: 11002, + ooeInvalidCallback: 11101, + ooeInvalidWidth: 12e3, + ooeInvalidHeight: 12001, + ooeNavigationError: 12002, + ooeInvalidScheme: 12003, + ooeAppDomains: 12004, + ooeRequireHTTPS: 12005, + ooeWebDialogClosed: 12006, + ooeDialogAlreadyOpened: 12007, + ooeEndUserAllow: 12008, + ooeEndUserIgnore: 12009, + ooeNotUILessDialog: 12010, + ooeCrossZone: 12011, + ooeNotSSOAgave: 13e3, + ooeSSOUserNotSignedIn: 13001, + ooeSSOUserAborted: 13002, + ooeSSOUnsupportedUserIdentity: 13003, + ooeSSOInvalidResourceUrl: 13004, + ooeSSOInvalidGrant: 13005, + ooeSSOClientError: 13006, + ooeSSOServerError: 13007, + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009 + }, + initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) + { + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported] = { + name: stringNS.L_InvalidCoercion, + message: stringNS.L_CoercionTypeNotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType] = { + name: stringNS.L_DataReadError, + message: stringNS.L_GetSelectionNotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding] = { + name: stringNS.L_InvalidCoercion, + message: stringNS.L_CoercionTypeNotMatchBinding + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts] = { + name: stringNS.L_DataReadError, + message: stringNS.L_InvalidGetRowColumnCounts + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType] = { + name: stringNS.L_DataReadError, + message: stringNS.L_SelectionNotSupportCoercionType + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn] = { + name: stringNS.L_DataReadError, + message: stringNS.L_InvalidGetStartRowColumn + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported] = { + name: stringNS.L_DataReadError, + message: stringNS.L_NonUniformPartialGetNotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge] = { + name: stringNS.L_DataReadError, + message: stringNS.L_GetDataIsTooLarge + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported] = { + name: stringNS.L_DataReadError, + message: stringNS.L_FileTypeNotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict] = { + name: stringNS.L_DataReadError, + message: stringNS.L_GetDataParametersConflict + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns] = { + name: stringNS.L_DataReadError, + message: stringNS.L_InvalidGetColumns + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows] = { + name: stringNS.L_DataReadError, + message: stringNS.L_InvalidGetRows + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow] = { + name: stringNS.L_DataReadError, + message: stringNS.L_InvalidReadForBlankRow + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_UnsupportedDataObject + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_CannotWriteToSelection + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_DataNotMatchSelection + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_OverwriteWorksheetData + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_DataNotMatchBindingSize + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_InvalidSetStartRowColumn + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat] = { + name: stringNS.L_InvalidFormat, + message: stringNS.L_InvalidDataFormat + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType] = { + name: stringNS.L_InvalidDataObject, + message: stringNS.L_DataNotMatchCoercionType + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType] = { + name: stringNS.L_InvalidDataObject, + message: stringNS.L_DataNotMatchBindingType + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_SetDataIsTooLarge + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_NonUniformPartialSetNotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_InvalidSetColumns + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_InvalidSetRows + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_SetDataParametersConflict + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound] = { + name: stringNS.L_BindingCreationError, + message: stringNS.L_SelectionCannotBound + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist] = { + name: stringNS.L_InvalidBindingError, + message: stringNS.L_BindingNotExist + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection] = { + name: stringNS.L_BindingCreationError, + message: stringNS.L_BindingToMultipleSelection + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType] = { + name: stringNS.L_BindingCreationError, + message: stringNS.L_InvalidSelectionForBindingType + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType] = { + name: stringNS.L_InvalidBindingOperation, + message: stringNS.L_OperationNotSupportedOnThisBindingType + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound] = { + name: stringNS.L_BindingCreationError, + message: stringNS.L_NamedItemNotFound + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound] = { + name: stringNS.L_BindingCreationError, + message: stringNS.L_MultipleNamedItemFound + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType] = { + name: stringNS.L_BindingCreationError, + message: stringNS.L_InvalidNamedItemForBindingType + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType] = { + name: stringNS.L_InvalidBinding, + message: stringNS.L_UnknownBindingType + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData] = { + name: stringNS.L_InvalidBindingOperation, + message: stringNS.L_OperationNotSupportedOnMatrixData + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding] = { + name: stringNS.L_InvalidBinding, + message: stringNS.L_InvalidColumnsForBinding + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist] = { + name: stringNS.L_ReadSettingsError, + message: stringNS.L_SettingNameNotExist + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave] = { + name: stringNS.L_SaveSettingsError, + message: stringNS.L_SettingsCannotSave + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale] = { + name: stringNS.L_SettingsStaleError, + message: stringNS.L_SettingsAreStale + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported] = { + name: stringNS.L_HostError, + message: stringNS.L_OperationNotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError] = { + name: stringNS.L_InternalError, + message: stringNS.L_InternalErrorDescription + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly] = { + name: stringNS.L_PermissionDenied, + message: stringNS.L_DocumentReadOnly + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist] = { + name: stringNS.L_EventRegistrationError, + message: stringNS.L_EventHandlerNotExist + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext] = { + name: stringNS.L_InvalidAPICall, + message: stringNS.L_InvalidApiCallInContext + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown] = { + name: stringNS.L_ShuttingDown, + message: stringNS.L_ShuttingDown + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration] = { + name: stringNS.L_UnsupportedEnumeration, + message: stringNS.L_UnsupportedEnumerationMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange] = { + name: stringNS.L_IndexOutOfRange, + message: stringNS.L_IndexOutOfRange + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported] = { + name: stringNS.L_APINotSupported, + message: stringNS.L_BrowserAPINotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout] = { + name: stringNS.L_APICallFailed, + message: stringNS.L_RequestTimeout + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession] = { + name: stringNS.L_InvalidOrTimedOutSession, + message: stringNS.L_InvalidOrTimedOutSessionMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests] = { + name: stringNS.L_APICallFailed, + message: stringNS.L_TooManyIncompleteRequests + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable] = { + name: stringNS.L_APICallFailed, + message: stringNS.L_RequestTokenUnavailable + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached] = { + name: stringNS.L_APICallFailed, + message: stringNS.L_ActivityLimitReached + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments] = { + name: stringNS.L_APICallFailed, + message: stringNS.L_InvalidApiArgumentsMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound] = { + name: stringNS.L_InvalidNode, + message: stringNS.L_CustomXmlNodeNotFound + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError] = { + name: stringNS.L_CustomXmlError, + message: stringNS.L_CustomXmlError + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota] = { + name: stringNS.L_CustomXmlExceedQuotaName, + message: stringNS.L_CustomXmlExceedQuotaMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate] = { + name: stringNS.L_CustomXmlOutOfDateName, + message: stringNS.L_CustomXmlOutOfDateMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability] = { + name: stringNS.L_PermissionDenied, + message: stringNS.L_NoCapability + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo] = { + name: stringNS.L_CannotNavigateTo, + message: stringNS.L_CannotNavigateTo + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist] = { + name: stringNS.L_SpecifiedIdNotExist, + message: stringNS.L_SpecifiedIdNotExist + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound] = { + name: stringNS.L_NavOutOfBound, + message: stringNS.L_NavOutOfBound + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits] = { + name: stringNS.L_DataWriteReminder, + message: stringNS.L_CellDataAmountBeyondLimits + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing] = { + name: stringNS.L_MissingParameter, + message: stringNS.L_ElementMissing + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError] = { + name: stringNS.L_PermissionDenied, + message: stringNS.L_NoCapability + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue] = { + name: stringNS.L_InvalidValue, + message: stringNS.L_InvalidCellsValue + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue] = { + name: stringNS.L_InvalidValue, + message: stringNS.L_InvalidTableOptionValue + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue] = { + name: stringNS.L_InvalidValue, + message: stringNS.L_InvalidFormatValue + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange] = { + name: stringNS.L_OutOfRange, + message: stringNS.L_RowIndexOutOfRange + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange] = { + name: stringNS.L_OutOfRange, + message: stringNS.L_ColIndexOutOfRange + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange] = { + name: stringNS.L_OutOfRange, + message: stringNS.L_FormatValueOutOfRange + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits] = { + name: stringNS.L_FormattingReminder, + message: stringNS.L_CellFormatAmountBeyondLimits + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit] = { + name: stringNS.L_MemoryLimit, + message: stringNS.L_CloseFileBeforeRetrieve + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile] = { + name: stringNS.L_NetworkProblem, + message: stringNS.L_NetworkProblemRetrieveFile + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize] = { + name: stringNS.L_InvalidValue, + message: stringNS.L_SliceSizeNotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened] = { + name: stringNS.L_DisplayDialogError, + message: stringNS.L_DialogAlreadyOpened + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth] = { + name: stringNS.L_IndexOutOfRange, + message: stringNS.L_IndexOutOfRange + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight] = { + name: stringNS.L_IndexOutOfRange, + message: stringNS.L_IndexOutOfRange + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError] = { + name: stringNS.L_DisplayDialogError, + message: stringNS.L_NetworkProblem + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme] = { + name: stringNS.L_DialogNavigateError, + message: stringNS.L_DialogInvalidScheme + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains] = { + name: stringNS.L_DisplayDialogError, + message: stringNS.L_DialogAddressNotTrusted + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS] = { + name: stringNS.L_DisplayDialogError, + message: stringNS.L_DialogRequireHTTPS + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore] = { + name: stringNS.L_DisplayDialogError, + message: stringNS.L_UserClickIgnore + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone] = { + name: stringNS.L_DisplayDialogError, + message: stringNS.L_NewWindowCrossZoneErrorString + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave] = { + name: stringNS.L_APINotSupported, + message: stringNS.L_InvalidSSOAddinMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn] = { + name: stringNS.L_UserNotSignedIn, + message: stringNS.L_UserNotSignedIn + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted] = { + name: stringNS.L_UserAborted, + message: stringNS.L_UserAbortedMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity] = { + name: stringNS.L_UnsupportedUserIdentity, + message: stringNS.L_UnsupportedUserIdentityMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl] = { + name: stringNS.L_InvalidResourceUrl, + message: stringNS.L_InvalidResourceUrlMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant] = { + name: stringNS.L_InvalidGrant, + message: stringNS.L_InvalidGrantMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError] = { + name: stringNS.L_SSOClientError, + message: stringNS.L_SSOClientErrorMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError] = { + name: stringNS.L_SSOServerError, + message: stringNS.L_SSOServerErrorMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken] = { + name: stringNS.L_AddinIsAlreadyRequestingToken, + message: stringNS.L_AddinIsAlreadyRequestingTokenMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory] = { + name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, + message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage + } + } + } }(); var OfficeExt; (function(OfficeExt) { - var Requirement; - (function(Requirement) - { - var RequirementVersion=function() - { - function RequirementVersion(){} - return RequirementVersion - }(); - Requirement.RequirementVersion=RequirementVersion; - var RequirementMatrix=function() - { - function RequirementMatrix(_setMap) - { - this.isSetSupported=function _isSetSupported(name, minVersion) - { - if(name==undefined) - return false; - if(minVersion==undefined) - minVersion=0; - var setSupportArray=this._setMap; - var sets=setSupportArray._sets; - if(sets.hasOwnProperty(name.toLowerCase())) - { - var setMaxVersion=sets[name.toLowerCase()]; - try - { - var setMaxVersionNum=this._getVersion(setMaxVersion); - minVersion=minVersion+""; - var minVersionNum=this._getVersion(minVersion); - if(setMaxVersionNum.major > 0 && setMaxVersionNum.major > minVersionNum.major) - return true; - if(setMaxVersionNum.minor > 0 && setMaxVersionNum.minor > 0 && setMaxVersionNum.major==minVersionNum.major && setMaxVersionNum.minor >=minVersionNum.minor) - return true - } - catch(e) - { - return false - } - } - return false - }; - this._getVersion=function(version) - { - var temp=version.split("."); - var major=0; - var minor=0; - if(temp.length < 2 && isNaN(Number(version))) - throw"version format incorrect"; - else - { - major=Number(temp[0]); - if(temp.length >=2) - minor=Number(temp[1]); - if(isNaN(major) || isNaN(minor)) - throw"version format incorrect"; - } - var result={ - minor: minor, - major: major - }; - return result - }; - this._setMap=_setMap; - this.isSetSupported=this.isSetSupported.bind(this) - } - return RequirementMatrix - }(); - Requirement.RequirementMatrix=RequirementMatrix; - var DefaultSetRequirement=function() - { - function DefaultSetRequirement(setMap) - { - this._addSetMap=function DefaultSetRequirement_addSetMap(addedSet) - { - for(var name in addedSet) - this._sets[name]=addedSet[name] - }; - this._sets=setMap - } - return DefaultSetRequirement - }(); - Requirement.DefaultSetRequirement=DefaultSetRequirement; - var DefaultDialogSetRequirement=function(_super) - { - __extends(DefaultDialogSetRequirement,_super); - function DefaultDialogSetRequirement() - { - _super.call(this,{dialogapi: 1.1}) - } - return DefaultDialogSetRequirement - }(DefaultSetRequirement); - Requirement.DefaultDialogSetRequirement=DefaultDialogSetRequirement; - var ExcelClientDefaultSetRequirement=function(_super) - { - __extends(ExcelClientDefaultSetRequirement,_super); - function ExcelClientDefaultSetRequirement() - { - _super.call(this,{ - bindingevents: 1.1, - documentevents: 1.1, - excelapi: 1.1, - matrixbindings: 1.1, - matrixcoercion: 1.1, - selection: 1.1, - settings: 1.1, - tablebindings: 1.1, - tablecoercion: 1.1, - textbindings: 1.1, - textcoercion: 1.1 - }) - } - return ExcelClientDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.ExcelClientDefaultSetRequirement=ExcelClientDefaultSetRequirement; - var ExcelClientV1DefaultSetRequirement=function(_super) - { - __extends(ExcelClientV1DefaultSetRequirement,_super); - function ExcelClientV1DefaultSetRequirement() - { - _super.call(this); - this._addSetMap({imagecoercion: 1.1}) - } - return ExcelClientV1DefaultSetRequirement - }(ExcelClientDefaultSetRequirement); - Requirement.ExcelClientV1DefaultSetRequirement=ExcelClientV1DefaultSetRequirement; - var OutlookClientDefaultSetRequirement=function(_super) - { - __extends(OutlookClientDefaultSetRequirement,_super); - function OutlookClientDefaultSetRequirement() - { - _super.call(this,{mailbox: 1.3}) - } - return OutlookClientDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.OutlookClientDefaultSetRequirement=OutlookClientDefaultSetRequirement; - var WordClientDefaultSetRequirement=function(_super) - { - __extends(WordClientDefaultSetRequirement,_super); - function WordClientDefaultSetRequirement() - { - _super.call(this,{ - bindingevents: 1.1, - compressedfile: 1.1, - customxmlparts: 1.1, - documentevents: 1.1, - file: 1.1, - htmlcoercion: 1.1, - matrixbindings: 1.1, - matrixcoercion: 1.1, - ooxmlcoercion: 1.1, - pdffile: 1.1, - selection: 1.1, - settings: 1.1, - tablebindings: 1.1, - tablecoercion: 1.1, - textbindings: 1.1, - textcoercion: 1.1, - textfile: 1.1, - wordapi: 1.1 - }) - } - return WordClientDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.WordClientDefaultSetRequirement=WordClientDefaultSetRequirement; - var WordClientV1DefaultSetRequirement=function(_super) - { - __extends(WordClientV1DefaultSetRequirement,_super); - function WordClientV1DefaultSetRequirement() - { - _super.call(this); - this._addSetMap({ - customxmlparts: 1.2, - wordapi: 1.2, - imagecoercion: 1.1 - }) - } - return WordClientV1DefaultSetRequirement - }(WordClientDefaultSetRequirement); - Requirement.WordClientV1DefaultSetRequirement=WordClientV1DefaultSetRequirement; - var PowerpointClientDefaultSetRequirement=function(_super) - { - __extends(PowerpointClientDefaultSetRequirement,_super); - function PowerpointClientDefaultSetRequirement() - { - _super.call(this,{ - activeview: 1.1, - compressedfile: 1.1, - documentevents: 1.1, - file: 1.1, - pdffile: 1.1, - selection: 1.1, - settings: 1.1, - textcoercion: 1.1 - }) - } - return PowerpointClientDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.PowerpointClientDefaultSetRequirement=PowerpointClientDefaultSetRequirement; - var PowerpointClientV1DefaultSetRequirement=function(_super) - { - __extends(PowerpointClientV1DefaultSetRequirement,_super); - function PowerpointClientV1DefaultSetRequirement() - { - _super.call(this); - this._addSetMap({imagecoercion: 1.1}) - } - return PowerpointClientV1DefaultSetRequirement - }(PowerpointClientDefaultSetRequirement); - Requirement.PowerpointClientV1DefaultSetRequirement=PowerpointClientV1DefaultSetRequirement; - var ProjectClientDefaultSetRequirement=function(_super) - { - __extends(ProjectClientDefaultSetRequirement,_super); - function ProjectClientDefaultSetRequirement() - { - _super.call(this,{ - selection: 1.1, - textcoercion: 1.1 - }) - } - return ProjectClientDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.ProjectClientDefaultSetRequirement=ProjectClientDefaultSetRequirement; - var ExcelWebDefaultSetRequirement=function(_super) - { - __extends(ExcelWebDefaultSetRequirement,_super); - function ExcelWebDefaultSetRequirement() - { - _super.call(this,{ - bindingevents: 1.1, - documentevents: 1.1, - matrixbindings: 1.1, - matrixcoercion: 1.1, - selection: 1.1, - settings: 1.1, - tablebindings: 1.1, - tablecoercion: 1.1, - textbindings: 1.1, - textcoercion: 1.1, - file: 1.1 - }) - } - return ExcelWebDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.ExcelWebDefaultSetRequirement=ExcelWebDefaultSetRequirement; - var WordWebDefaultSetRequirement=function(_super) - { - __extends(WordWebDefaultSetRequirement,_super); - function WordWebDefaultSetRequirement() - { - _super.call(this,{ - compressedfile: 1.1, - documentevents: 1.1, - file: 1.1, - imagecoercion: 1.1, - matrixcoercion: 1.1, - ooxmlcoercion: 1.1, - pdffile: 1.1, - selection: 1.1, - settings: 1.1, - tablecoercion: 1.1, - textcoercion: 1.1, - textfile: 1.1 - }) - } - return WordWebDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.WordWebDefaultSetRequirement=WordWebDefaultSetRequirement; - var PowerpointWebDefaultSetRequirement=function(_super) - { - __extends(PowerpointWebDefaultSetRequirement,_super); - function PowerpointWebDefaultSetRequirement() - { - _super.call(this,{ - activeview: 1.1, - settings: 1.1 - }) - } - return PowerpointWebDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.PowerpointWebDefaultSetRequirement=PowerpointWebDefaultSetRequirement; - var OutlookWebDefaultSetRequirement=function(_super) - { - __extends(OutlookWebDefaultSetRequirement,_super); - function OutlookWebDefaultSetRequirement() - { - _super.call(this,{mailbox: 1.3}) - } - return OutlookWebDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.OutlookWebDefaultSetRequirement=OutlookWebDefaultSetRequirement; - var SwayWebDefaultSetRequirement=function(_super) - { - __extends(SwayWebDefaultSetRequirement,_super); - function SwayWebDefaultSetRequirement() - { - _super.call(this,{ - activeview: 1.1, - documentevents: 1.1, - selection: 1.1, - settings: 1.1, - textcoercion: 1.1 - }) - } - return SwayWebDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.SwayWebDefaultSetRequirement=SwayWebDefaultSetRequirement; - var AccessWebDefaultSetRequirement=function(_super) - { - __extends(AccessWebDefaultSetRequirement,_super); - function AccessWebDefaultSetRequirement() - { - _super.call(this,{ - bindingevents: 1.1, - partialtablebindings: 1.1, - settings: 1.1, - tablebindings: 1.1, - tablecoercion: 1.1 - }) - } - return AccessWebDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.AccessWebDefaultSetRequirement=AccessWebDefaultSetRequirement; - var ExcelIOSDefaultSetRequirement=function(_super) - { - __extends(ExcelIOSDefaultSetRequirement,_super); - function ExcelIOSDefaultSetRequirement() - { - _super.call(this,{ - bindingevents: 1.1, - documentevents: 1.1, - matrixbindings: 1.1, - matrixcoercion: 1.1, - selection: 1.1, - settings: 1.1, - tablebindings: 1.1, - tablecoercion: 1.1, - textbindings: 1.1, - textcoercion: 1.1 - }) - } - return ExcelIOSDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.ExcelIOSDefaultSetRequirement=ExcelIOSDefaultSetRequirement; - var WordIOSDefaultSetRequirement=function(_super) - { - __extends(WordIOSDefaultSetRequirement,_super); - function WordIOSDefaultSetRequirement() - { - _super.call(this,{ - bindingevents: 1.1, - compressedfile: 1.1, - customxmlparts: 1.1, - documentevents: 1.1, - file: 1.1, - htmlcoercion: 1.1, - matrixbindings: 1.1, - matrixcoercion: 1.1, - ooxmlcoercion: 1.1, - pdffile: 1.1, - selection: 1.1, - settings: 1.1, - tablebindings: 1.1, - tablecoercion: 1.1, - textbindings: 1.1, - textcoercion: 1.1, - textfile: 1.1 - }) - } - return WordIOSDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.WordIOSDefaultSetRequirement=WordIOSDefaultSetRequirement; - var WordIOSV1DefaultSetRequirement=function(_super) - { - __extends(WordIOSV1DefaultSetRequirement,_super); - function WordIOSV1DefaultSetRequirement() - { - _super.call(this); - this._addSetMap({ - customxmlparts: 1.2, - wordapi: 1.2 - }) - } - return WordIOSV1DefaultSetRequirement - }(WordIOSDefaultSetRequirement); - Requirement.WordIOSV1DefaultSetRequirement=WordIOSV1DefaultSetRequirement; - var PowerpointIOSDefaultSetRequirement=function(_super) - { - __extends(PowerpointIOSDefaultSetRequirement,_super); - function PowerpointIOSDefaultSetRequirement() - { - _super.call(this,{ - activeview: 1.1, - compressedfile: 1.1, - documentevents: 1.1, - file: 1.1, - pdffile: 1.1, - selection: 1.1, - settings: 1.1, - textcoercion: 1.1 - }) - } - return PowerpointIOSDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.PowerpointIOSDefaultSetRequirement=PowerpointIOSDefaultSetRequirement; - var OutlookIOSDefaultSetRequirement=function(_super) - { - __extends(OutlookIOSDefaultSetRequirement,_super); - function OutlookIOSDefaultSetRequirement() - { - _super.call(this,{mailbox: 1.1}) - } - return OutlookIOSDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.OutlookIOSDefaultSetRequirement=OutlookIOSDefaultSetRequirement; - var RequirementsMatrixFactory=function() - { - function RequirementsMatrixFactory(){} - RequirementsMatrixFactory.initializeOsfDda=function() - { - OSF.OUtil.setNamespace("Requirement",OSF.DDA) - }; - RequirementsMatrixFactory.getDefaultRequirementMatrix=function(appContext) - { - this.initializeDefaultSetMatrix(); - var defaultRequirementMatrix=undefined; - var clientRequirement=appContext.get_requirementMatrix(); - if(clientRequirement !=undefined && clientRequirement.length > 0 && typeof JSON !=="undefined") - { - var matrixItem=JSON.parse(appContext.get_requirementMatrix().toLowerCase()); - defaultRequirementMatrix=new RequirementMatrix(new DefaultSetRequirement(matrixItem)) - } - else - { - var appLocator=RequirementsMatrixFactory.getClientFullVersionString(appContext); - if(RequirementsMatrixFactory.DefaultSetArrayMatrix !=undefined && RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator] !=undefined) - defaultRequirementMatrix=new RequirementMatrix(RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator]); - else - defaultRequirementMatrix=new RequirementMatrix(new DefaultSetRequirement({})) - } - return defaultRequirementMatrix - }; - RequirementsMatrixFactory.getDefaultDialogRequirementMatrix=function(appContext) - { - var defaultRequirementMatrix=undefined; - var clientRequirement=appContext.get_dialogRequirementMatrix(); - if(clientRequirement !=undefined && clientRequirement.length > 0 && typeof JSON !=="undefined") - { - var matrixItem=JSON.parse(appContext.get_requirementMatrix().toLowerCase()); - defaultRequirementMatrix=new RequirementMatrix(new DefaultSetRequirement(matrixItem)) - } - else - defaultRequirementMatrix=new RequirementMatrix(new DefaultDialogSetRequirement); - return defaultRequirementMatrix - }; - RequirementsMatrixFactory.getClientFullVersionString=function(appContext) - { - var appMinorVersion=appContext.get_appMinorVersion(); - var appMinorVersionString=""; - var appFullVersion=""; - var appName=appContext.get_appName(); - var isIOSClient=appName==1024 || appName==4096 || appName==8192 || appName==65536; - if(isIOSClient && appContext.get_appVersion()==1) - if(appName==4096 && appMinorVersion >=15) - appFullVersion="16.00.01"; - else - appFullVersion="16.00"; - else if(appContext.get_appName()==64) - appFullVersion=appContext.get_appVersion(); - else - { - if(appMinorVersion < 10) - appMinorVersionString="0"+appMinorVersion; - else - appMinorVersionString=""+appMinorVersion; - appFullVersion=appContext.get_appVersion()+"."+appMinorVersionString - } - return appContext.get_appName()+"-"+appFullVersion - }; - RequirementsMatrixFactory.initializeDefaultSetMatrix=function() - { - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1600]=new ExcelClientDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1600]=new WordClientDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1600]=new PowerpointClientDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1601]=new ExcelClientV1DefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1601]=new WordClientV1DefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1601]=new PowerpointClientV1DefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_RCLIENT_1600]=new OutlookClientDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_WAC_1600]=new ExcelWebDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_WAC_1600]=new WordWebDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1600]=new OutlookWebDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1601]=new OutlookWebDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Project_RCLIENT_1600]=new ProjectClientDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Access_WAC_1600]=new AccessWebDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_WAC_1600]=new PowerpointWebDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_IOS_1600]=new ExcelIOSDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.SWAY_WAC_1600]=new SwayWebDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_1600]=new WordIOSDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_16001]=new WordIOSV1DefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_IOS_1600]=new PowerpointIOSDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_IOS_1600]=new OutlookIOSDefaultSetRequirement - }; - RequirementsMatrixFactory.Excel_RCLIENT_1600="1-16.00"; - RequirementsMatrixFactory.Excel_RCLIENT_1601="1-16.01"; - RequirementsMatrixFactory.Word_RCLIENT_1600="2-16.00"; - RequirementsMatrixFactory.Word_RCLIENT_1601="2-16.01"; - RequirementsMatrixFactory.PowerPoint_RCLIENT_1600="4-16.00"; - RequirementsMatrixFactory.PowerPoint_RCLIENT_1601="4-16.01"; - RequirementsMatrixFactory.Outlook_RCLIENT_1600="8-16.00"; - RequirementsMatrixFactory.Excel_WAC_1600="16-16.00"; - RequirementsMatrixFactory.Word_WAC_1600="32-16.00"; - RequirementsMatrixFactory.Outlook_WAC_1600="64-16.00"; - RequirementsMatrixFactory.Outlook_WAC_1601="64-16.01"; - RequirementsMatrixFactory.Project_RCLIENT_1600="128-16.00"; - RequirementsMatrixFactory.Access_WAC_1600="256-16.00"; - RequirementsMatrixFactory.PowerPoint_WAC_1600="512-16.00"; - RequirementsMatrixFactory.Excel_IOS_1600="1024-16.00"; - RequirementsMatrixFactory.SWAY_WAC_1600="2048-16.00"; - RequirementsMatrixFactory.Word_IOS_1600="4096-16.00"; - RequirementsMatrixFactory.Word_IOS_16001="4096-16.00.01"; - RequirementsMatrixFactory.PowerPoint_IOS_1600="8192-16.00"; - RequirementsMatrixFactory.Outlook_IOS_1600="65536-16.00"; - RequirementsMatrixFactory.DefaultSetArrayMatrix={}; - return RequirementsMatrixFactory - }(); - Requirement.RequirementsMatrixFactory=RequirementsMatrixFactory - })(Requirement=OfficeExt.Requirement || (OfficeExt.Requirement={})) -})(OfficeExt || (OfficeExt={})); + var Requirement; + (function(Requirement) + { + var RequirementVersion = function() + { + function RequirementVersion(){} + return RequirementVersion + }(); + Requirement.RequirementVersion = RequirementVersion; + var RequirementMatrix = function() + { + function RequirementMatrix(_setMap) + { + this.isSetSupported = function _isSetSupported(name, minVersion) + { + if(name == undefined) + return false; + if(minVersion == undefined) + minVersion = 0; + var setSupportArray = this._setMap; + var sets = setSupportArray._sets; + if(sets.hasOwnProperty(name.toLowerCase())) + { + var setMaxVersion = sets[name.toLowerCase()]; + try + { + var setMaxVersionNum = this._getVersion(setMaxVersion); + minVersion = minVersion + ""; + var minVersionNum = this._getVersion(minVersion); + if(setMaxVersionNum.major > 0 && setMaxVersionNum.major > minVersionNum.major) + return true; + if(setMaxVersionNum.minor > 0 && setMaxVersionNum.minor > 0 && setMaxVersionNum.major == minVersionNum.major && setMaxVersionNum.minor >= minVersionNum.minor) + return true + } + catch(e) + { + return false + } + } + return false + }; + this._getVersion = function(version) + { + var temp = version.split("."); + var major = 0; + var minor = 0; + if(temp.length < 2 && isNaN(Number(version))) + throw"version format incorrect"; + else + { + major = Number(temp[0]); + if(temp.length >= 2) + minor = Number(temp[1]); + if(isNaN(major) || isNaN(minor)) + throw"version format incorrect"; + } + var result = { + minor: minor, + major: major + }; + return result + }; + this._setMap = _setMap; + this.isSetSupported = this.isSetSupported.bind(this) + } + return RequirementMatrix + }(); + Requirement.RequirementMatrix = RequirementMatrix; + var DefaultSetRequirement = function() + { + function DefaultSetRequirement(setMap) + { + this._addSetMap = function DefaultSetRequirement_addSetMap(addedSet) + { + for(var name in addedSet) + this._sets[name] = addedSet[name] + }; + this._sets = setMap + } + return DefaultSetRequirement + }(); + Requirement.DefaultSetRequirement = DefaultSetRequirement; + var DefaultDialogSetRequirement = function(_super) + { + __extends(DefaultDialogSetRequirement,_super); + function DefaultDialogSetRequirement() + { + _super.call(this,{dialogapi: 1.1}) + } + return DefaultDialogSetRequirement + }(DefaultSetRequirement); + Requirement.DefaultDialogSetRequirement = DefaultDialogSetRequirement; + var ExcelClientDefaultSetRequirement = function(_super) + { + __extends(ExcelClientDefaultSetRequirement,_super); + function ExcelClientDefaultSetRequirement() + { + _super.call(this,{ + bindingevents: 1.1, + documentevents: 1.1, + excelapi: 1.1, + matrixbindings: 1.1, + matrixcoercion: 1.1, + selection: 1.1, + settings: 1.1, + tablebindings: 1.1, + tablecoercion: 1.1, + textbindings: 1.1, + textcoercion: 1.1 + }) + } + return ExcelClientDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.ExcelClientDefaultSetRequirement = ExcelClientDefaultSetRequirement; + var ExcelClientV1DefaultSetRequirement = function(_super) + { + __extends(ExcelClientV1DefaultSetRequirement,_super); + function ExcelClientV1DefaultSetRequirement() + { + _super.call(this); + this._addSetMap({imagecoercion: 1.1}) + } + return ExcelClientV1DefaultSetRequirement + }(ExcelClientDefaultSetRequirement); + Requirement.ExcelClientV1DefaultSetRequirement = ExcelClientV1DefaultSetRequirement; + var OutlookClientDefaultSetRequirement = function(_super) + { + __extends(OutlookClientDefaultSetRequirement,_super); + function OutlookClientDefaultSetRequirement() + { + _super.call(this,{mailbox: 1.3}) + } + return OutlookClientDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.OutlookClientDefaultSetRequirement = OutlookClientDefaultSetRequirement; + var WordClientDefaultSetRequirement = function(_super) + { + __extends(WordClientDefaultSetRequirement,_super); + function WordClientDefaultSetRequirement() + { + _super.call(this,{ + bindingevents: 1.1, + compressedfile: 1.1, + customxmlparts: 1.1, + documentevents: 1.1, + file: 1.1, + htmlcoercion: 1.1, + matrixbindings: 1.1, + matrixcoercion: 1.1, + ooxmlcoercion: 1.1, + pdffile: 1.1, + selection: 1.1, + settings: 1.1, + tablebindings: 1.1, + tablecoercion: 1.1, + textbindings: 1.1, + textcoercion: 1.1, + textfile: 1.1, + wordapi: 1.1 + }) + } + return WordClientDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.WordClientDefaultSetRequirement = WordClientDefaultSetRequirement; + var WordClientV1DefaultSetRequirement = function(_super) + { + __extends(WordClientV1DefaultSetRequirement,_super); + function WordClientV1DefaultSetRequirement() + { + _super.call(this); + this._addSetMap({ + customxmlparts: 1.2, + wordapi: 1.2, + imagecoercion: 1.1 + }) + } + return WordClientV1DefaultSetRequirement + }(WordClientDefaultSetRequirement); + Requirement.WordClientV1DefaultSetRequirement = WordClientV1DefaultSetRequirement; + var PowerpointClientDefaultSetRequirement = function(_super) + { + __extends(PowerpointClientDefaultSetRequirement,_super); + function PowerpointClientDefaultSetRequirement() + { + _super.call(this,{ + activeview: 1.1, + compressedfile: 1.1, + documentevents: 1.1, + file: 1.1, + pdffile: 1.1, + selection: 1.1, + settings: 1.1, + textcoercion: 1.1 + }) + } + return PowerpointClientDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.PowerpointClientDefaultSetRequirement = PowerpointClientDefaultSetRequirement; + var PowerpointClientV1DefaultSetRequirement = function(_super) + { + __extends(PowerpointClientV1DefaultSetRequirement,_super); + function PowerpointClientV1DefaultSetRequirement() + { + _super.call(this); + this._addSetMap({imagecoercion: 1.1}) + } + return PowerpointClientV1DefaultSetRequirement + }(PowerpointClientDefaultSetRequirement); + Requirement.PowerpointClientV1DefaultSetRequirement = PowerpointClientV1DefaultSetRequirement; + var ProjectClientDefaultSetRequirement = function(_super) + { + __extends(ProjectClientDefaultSetRequirement,_super); + function ProjectClientDefaultSetRequirement() + { + _super.call(this,{ + selection: 1.1, + textcoercion: 1.1 + }) + } + return ProjectClientDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.ProjectClientDefaultSetRequirement = ProjectClientDefaultSetRequirement; + var ExcelWebDefaultSetRequirement = function(_super) + { + __extends(ExcelWebDefaultSetRequirement,_super); + function ExcelWebDefaultSetRequirement() + { + _super.call(this,{ + bindingevents: 1.1, + documentevents: 1.1, + matrixbindings: 1.1, + matrixcoercion: 1.1, + selection: 1.1, + settings: 1.1, + tablebindings: 1.1, + tablecoercion: 1.1, + textbindings: 1.1, + textcoercion: 1.1, + file: 1.1 + }) + } + return ExcelWebDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.ExcelWebDefaultSetRequirement = ExcelWebDefaultSetRequirement; + var WordWebDefaultSetRequirement = function(_super) + { + __extends(WordWebDefaultSetRequirement,_super); + function WordWebDefaultSetRequirement() + { + _super.call(this,{ + compressedfile: 1.1, + documentevents: 1.1, + file: 1.1, + imagecoercion: 1.1, + matrixcoercion: 1.1, + ooxmlcoercion: 1.1, + pdffile: 1.1, + selection: 1.1, + settings: 1.1, + tablecoercion: 1.1, + textcoercion: 1.1, + textfile: 1.1 + }) + } + return WordWebDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.WordWebDefaultSetRequirement = WordWebDefaultSetRequirement; + var PowerpointWebDefaultSetRequirement = function(_super) + { + __extends(PowerpointWebDefaultSetRequirement,_super); + function PowerpointWebDefaultSetRequirement() + { + _super.call(this,{ + activeview: 1.1, + settings: 1.1 + }) + } + return PowerpointWebDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.PowerpointWebDefaultSetRequirement = PowerpointWebDefaultSetRequirement; + var OutlookWebDefaultSetRequirement = function(_super) + { + __extends(OutlookWebDefaultSetRequirement,_super); + function OutlookWebDefaultSetRequirement() + { + _super.call(this,{mailbox: 1.3}) + } + return OutlookWebDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.OutlookWebDefaultSetRequirement = OutlookWebDefaultSetRequirement; + var SwayWebDefaultSetRequirement = function(_super) + { + __extends(SwayWebDefaultSetRequirement,_super); + function SwayWebDefaultSetRequirement() + { + _super.call(this,{ + activeview: 1.1, + documentevents: 1.1, + selection: 1.1, + settings: 1.1, + textcoercion: 1.1 + }) + } + return SwayWebDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.SwayWebDefaultSetRequirement = SwayWebDefaultSetRequirement; + var AccessWebDefaultSetRequirement = function(_super) + { + __extends(AccessWebDefaultSetRequirement,_super); + function AccessWebDefaultSetRequirement() + { + _super.call(this,{ + bindingevents: 1.1, + partialtablebindings: 1.1, + settings: 1.1, + tablebindings: 1.1, + tablecoercion: 1.1 + }) + } + return AccessWebDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.AccessWebDefaultSetRequirement = AccessWebDefaultSetRequirement; + var ExcelIOSDefaultSetRequirement = function(_super) + { + __extends(ExcelIOSDefaultSetRequirement,_super); + function ExcelIOSDefaultSetRequirement() + { + _super.call(this,{ + bindingevents: 1.1, + documentevents: 1.1, + matrixbindings: 1.1, + matrixcoercion: 1.1, + selection: 1.1, + settings: 1.1, + tablebindings: 1.1, + tablecoercion: 1.1, + textbindings: 1.1, + textcoercion: 1.1 + }) + } + return ExcelIOSDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.ExcelIOSDefaultSetRequirement = ExcelIOSDefaultSetRequirement; + var WordIOSDefaultSetRequirement = function(_super) + { + __extends(WordIOSDefaultSetRequirement,_super); + function WordIOSDefaultSetRequirement() + { + _super.call(this,{ + bindingevents: 1.1, + compressedfile: 1.1, + customxmlparts: 1.1, + documentevents: 1.1, + file: 1.1, + htmlcoercion: 1.1, + matrixbindings: 1.1, + matrixcoercion: 1.1, + ooxmlcoercion: 1.1, + pdffile: 1.1, + selection: 1.1, + settings: 1.1, + tablebindings: 1.1, + tablecoercion: 1.1, + textbindings: 1.1, + textcoercion: 1.1, + textfile: 1.1 + }) + } + return WordIOSDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.WordIOSDefaultSetRequirement = WordIOSDefaultSetRequirement; + var WordIOSV1DefaultSetRequirement = function(_super) + { + __extends(WordIOSV1DefaultSetRequirement,_super); + function WordIOSV1DefaultSetRequirement() + { + _super.call(this); + this._addSetMap({ + customxmlparts: 1.2, + wordapi: 1.2 + }) + } + return WordIOSV1DefaultSetRequirement + }(WordIOSDefaultSetRequirement); + Requirement.WordIOSV1DefaultSetRequirement = WordIOSV1DefaultSetRequirement; + var PowerpointIOSDefaultSetRequirement = function(_super) + { + __extends(PowerpointIOSDefaultSetRequirement,_super); + function PowerpointIOSDefaultSetRequirement() + { + _super.call(this,{ + activeview: 1.1, + compressedfile: 1.1, + documentevents: 1.1, + file: 1.1, + pdffile: 1.1, + selection: 1.1, + settings: 1.1, + textcoercion: 1.1 + }) + } + return PowerpointIOSDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.PowerpointIOSDefaultSetRequirement = PowerpointIOSDefaultSetRequirement; + var OutlookIOSDefaultSetRequirement = function(_super) + { + __extends(OutlookIOSDefaultSetRequirement,_super); + function OutlookIOSDefaultSetRequirement() + { + _super.call(this,{mailbox: 1.1}) + } + return OutlookIOSDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.OutlookIOSDefaultSetRequirement = OutlookIOSDefaultSetRequirement; + var RequirementsMatrixFactory = function() + { + function RequirementsMatrixFactory(){} + RequirementsMatrixFactory.initializeOsfDda = function() + { + OSF.OUtil.setNamespace("Requirement",OSF.DDA) + }; + RequirementsMatrixFactory.getDefaultRequirementMatrix = function(appContext) + { + this.initializeDefaultSetMatrix(); + var defaultRequirementMatrix = undefined; + var clientRequirement = appContext.get_requirementMatrix(); + if(clientRequirement != undefined && clientRequirement.length > 0 && typeof JSON !== "undefined") + { + var matrixItem = JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement(matrixItem)) + } + else + { + var appLocator = RequirementsMatrixFactory.getClientFullVersionString(appContext); + if(RequirementsMatrixFactory.DefaultSetArrayMatrix != undefined && RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator] != undefined) + defaultRequirementMatrix = new RequirementMatrix(RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator]); + else + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement({})) + } + return defaultRequirementMatrix + }; + RequirementsMatrixFactory.getDefaultDialogRequirementMatrix = function(appContext) + { + var defaultRequirementMatrix = undefined; + var clientRequirement = appContext.get_dialogRequirementMatrix(); + if(clientRequirement != undefined && clientRequirement.length > 0 && typeof JSON !== "undefined") + { + var matrixItem = JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement(matrixItem)) + } + else + defaultRequirementMatrix = new RequirementMatrix(new DefaultDialogSetRequirement); + return defaultRequirementMatrix + }; + RequirementsMatrixFactory.getClientFullVersionString = function(appContext) + { + var appMinorVersion = appContext.get_appMinorVersion(); + var appMinorVersionString = ""; + var appFullVersion = ""; + var appName = appContext.get_appName(); + var isIOSClient = appName == 1024 || appName == 4096 || appName == 8192 || appName == 65536; + if(isIOSClient && appContext.get_appVersion() == 1) + if(appName == 4096 && appMinorVersion >= 15) + appFullVersion = "16.00.01"; + else + appFullVersion = "16.00"; + else if(appContext.get_appName() == 64) + appFullVersion = appContext.get_appVersion(); + else + { + if(appMinorVersion < 10) + appMinorVersionString = "0" + appMinorVersion; + else + appMinorVersionString = "" + appMinorVersion; + appFullVersion = appContext.get_appVersion() + "." + appMinorVersionString + } + return appContext.get_appName() + "-" + appFullVersion + }; + RequirementsMatrixFactory.initializeDefaultSetMatrix = function() + { + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1600] = new ExcelClientDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1600] = new WordClientDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1600] = new PowerpointClientDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1601] = new ExcelClientV1DefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1601] = new WordClientV1DefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1601] = new PowerpointClientV1DefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_RCLIENT_1600] = new OutlookClientDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_WAC_1600] = new ExcelWebDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_WAC_1600] = new WordWebDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1600] = new OutlookWebDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1601] = new OutlookWebDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Project_RCLIENT_1600] = new ProjectClientDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Access_WAC_1600] = new AccessWebDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_WAC_1600] = new PowerpointWebDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_IOS_1600] = new ExcelIOSDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.SWAY_WAC_1600] = new SwayWebDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_1600] = new WordIOSDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_16001] = new WordIOSV1DefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_IOS_1600] = new PowerpointIOSDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_IOS_1600] = new OutlookIOSDefaultSetRequirement + }; + RequirementsMatrixFactory.Excel_RCLIENT_1600 = "1-16.00"; + RequirementsMatrixFactory.Excel_RCLIENT_1601 = "1-16.01"; + RequirementsMatrixFactory.Word_RCLIENT_1600 = "2-16.00"; + RequirementsMatrixFactory.Word_RCLIENT_1601 = "2-16.01"; + RequirementsMatrixFactory.PowerPoint_RCLIENT_1600 = "4-16.00"; + RequirementsMatrixFactory.PowerPoint_RCLIENT_1601 = "4-16.01"; + RequirementsMatrixFactory.Outlook_RCLIENT_1600 = "8-16.00"; + RequirementsMatrixFactory.Excel_WAC_1600 = "16-16.00"; + RequirementsMatrixFactory.Word_WAC_1600 = "32-16.00"; + RequirementsMatrixFactory.Outlook_WAC_1600 = "64-16.00"; + RequirementsMatrixFactory.Outlook_WAC_1601 = "64-16.01"; + RequirementsMatrixFactory.Project_RCLIENT_1600 = "128-16.00"; + RequirementsMatrixFactory.Access_WAC_1600 = "256-16.00"; + RequirementsMatrixFactory.PowerPoint_WAC_1600 = "512-16.00"; + RequirementsMatrixFactory.Excel_IOS_1600 = "1024-16.00"; + RequirementsMatrixFactory.SWAY_WAC_1600 = "2048-16.00"; + RequirementsMatrixFactory.Word_IOS_1600 = "4096-16.00"; + RequirementsMatrixFactory.Word_IOS_16001 = "4096-16.00.01"; + RequirementsMatrixFactory.PowerPoint_IOS_1600 = "8192-16.00"; + RequirementsMatrixFactory.Outlook_IOS_1600 = "65536-16.00"; + RequirementsMatrixFactory.DefaultSetArrayMatrix = {}; + return RequirementsMatrixFactory + }(); + Requirement.RequirementsMatrixFactory = RequirementsMatrixFactory + })(Requirement = OfficeExt.Requirement || (OfficeExt.Requirement = {})) +})(OfficeExt || (OfficeExt = {})); OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(); var OfficeExt; (function(OfficeExt) { - var HostName; - (function(HostName) - { - var Host=function() - { - function Host() - { - this.getDiagnostics=function _getDiagnostics(version) - { - var diagnostics={ - host: this.getHost(), - version: version || this.getDefaultVersion(), - platform: this.getPlatform() - }; - return diagnostics - }; - this.platformRemappings={ - web: Microsoft.Office.WebExtension.PlatformType.OfficeOnline, - winrt: Microsoft.Office.WebExtension.PlatformType.Universal, - win32: Microsoft.Office.WebExtension.PlatformType.PC, - mac: Microsoft.Office.WebExtension.PlatformType.Mac, - ios: Microsoft.Office.WebExtension.PlatformType.iOS, - android: Microsoft.Office.WebExtension.PlatformType.Android - }; - this.camelCaseMappings={ - powerpoint: Microsoft.Office.WebExtension.HostType.PowerPoint, - onenote: Microsoft.Office.WebExtension.HostType.OneNote - }; - this.hostInfo=OSF._OfficeAppFactory.getHostInfo(); - this.getHost=this.getHost.bind(this); - this.getPlatform=this.getPlatform.bind(this); - this.getDiagnostics=this.getDiagnostics.bind(this) - } - Host.prototype.capitalizeFirstLetter=function(input) - { - if(input) - return input[0].toUpperCase()+input.slice(1).toLowerCase(); - return input - }; - Host.getInstance=function() - { - if(Host.hostObj===undefined) - Host.hostObj=new Host; - return Host.hostObj - }; - Host.prototype.getPlatform=function() - { - if(this.hostInfo.hostPlatform) - { - var hostPlatform=this.hostInfo.hostPlatform.toLowerCase(); - if(this.platformRemappings[hostPlatform]) - return this.platformRemappings[hostPlatform] - } - return null - }; - Host.prototype.getHost=function() - { - if(this.hostInfo.hostType) - { - var hostType=this.hostInfo.hostType.toLowerCase(); - if(this.camelCaseMappings[hostType]) - return this.camelCaseMappings[hostType]; - hostType=this.capitalizeFirstLetter(this.hostInfo.hostType); - if(Microsoft.Office.WebExtension.HostType[hostType]) - return Microsoft.Office.WebExtension.HostType[hostType] - } - return null - }; - Host.prototype.getDefaultVersion=function() - { - if(this.getHost()) - return"16.0.0000.0000"; - return null - }; - return Host - }(); - HostName.Host=Host - })(HostName=OfficeExt.HostName || (OfficeExt.HostName={})) -})(OfficeExt || (OfficeExt={})); -Microsoft.Office.WebExtension.ApplicationMode={ - WebEditor: "webEditor", - WebViewer: "webViewer", - Client: "client" + var HostName; + (function(HostName) + { + var Host = function() + { + function Host() + { + this.getDiagnostics = function _getDiagnostics(version) + { + var diagnostics = { + host: this.getHost(), + version: version || this.getDefaultVersion(), + platform: this.getPlatform() + }; + return diagnostics + }; + this.platformRemappings = { + web: Microsoft.Office.WebExtension.PlatformType.OfficeOnline, + winrt: Microsoft.Office.WebExtension.PlatformType.Universal, + win32: Microsoft.Office.WebExtension.PlatformType.PC, + mac: Microsoft.Office.WebExtension.PlatformType.Mac, + ios: Microsoft.Office.WebExtension.PlatformType.iOS, + android: Microsoft.Office.WebExtension.PlatformType.Android + }; + this.camelCaseMappings = { + powerpoint: Microsoft.Office.WebExtension.HostType.PowerPoint, + onenote: Microsoft.Office.WebExtension.HostType.OneNote + }; + this.hostInfo = OSF._OfficeAppFactory.getHostInfo(); + this.getHost = this.getHost.bind(this); + this.getPlatform = this.getPlatform.bind(this); + this.getDiagnostics = this.getDiagnostics.bind(this) + } + Host.prototype.capitalizeFirstLetter = function(input) + { + if(input) + return input[0].toUpperCase() + input.slice(1).toLowerCase(); + return input + }; + Host.getInstance = function() + { + if(Host.hostObj === undefined) + Host.hostObj = new Host; + return Host.hostObj + }; + Host.prototype.getPlatform = function() + { + if(this.hostInfo.hostPlatform) + { + var hostPlatform = this.hostInfo.hostPlatform.toLowerCase(); + if(this.platformRemappings[hostPlatform]) + return this.platformRemappings[hostPlatform] + } + return null + }; + Host.prototype.getHost = function() + { + if(this.hostInfo.hostType) + { + var hostType = this.hostInfo.hostType.toLowerCase(); + if(this.camelCaseMappings[hostType]) + return this.camelCaseMappings[hostType]; + hostType = this.capitalizeFirstLetter(this.hostInfo.hostType); + if(Microsoft.Office.WebExtension.HostType[hostType]) + return Microsoft.Office.WebExtension.HostType[hostType] + } + return null + }; + Host.prototype.getDefaultVersion = function() + { + if(this.getHost()) + return"16.0.0000.0000"; + return null + }; + return Host + }(); + HostName.Host = Host + })(HostName = OfficeExt.HostName || (OfficeExt.HostName = {})) +})(OfficeExt || (OfficeExt = {})); +Microsoft.Office.WebExtension.ApplicationMode = { + WebEditor: "webEditor", + WebViewer: "webViewer", + Client: "client" }; -Microsoft.Office.WebExtension.DocumentMode={ - ReadOnly: "readOnly", - ReadWrite: "readWrite" +Microsoft.Office.WebExtension.DocumentMode = { + ReadOnly: "readOnly", + ReadWrite: "readWrite" }; -OSF.NamespaceManager=function OSF_NamespaceManager() +OSF.NamespaceManager = function OSF_NamespaceManager() { - var _userOffice; - var _useShortcut=false; - return{ - enableShortcut: function OSF_NamespaceManager$enableShortcut() - { - if(!_useShortcut) - { - if(window.Office) - _userOffice=window.Office; - else - OSF.OUtil.setNamespace("Office",window); - window.Office=Microsoft.Office.WebExtension; - _useShortcut=true - } - }, - disableShortcut: function OSF_NamespaceManager$disableShortcut() - { - if(_useShortcut) - { - if(_userOffice) - window.Office=_userOffice; - else - OSF.OUtil.unsetNamespace("Office",window); - _useShortcut=false - } - } - } + var _userOffice; + var _useShortcut = false; + return{ + enableShortcut: function OSF_NamespaceManager$enableShortcut() + { + if(!_useShortcut) + { + if(window.Office) + _userOffice = window.Office; + else + OSF.OUtil.setNamespace("Office",window); + window.Office = Microsoft.Office.WebExtension; + _useShortcut = true + } + }, + disableShortcut: function OSF_NamespaceManager$disableShortcut() + { + if(_useShortcut) + { + if(_userOffice) + window.Office = _userOffice; + else + OSF.OUtil.unsetNamespace("Office",window); + _useShortcut = false + } + } + } }(); OSF.NamespaceManager.enableShortcut(); -Microsoft.Office.WebExtension.useShortNamespace=function Microsoft_Office_WebExtension_useShortNamespace(useShortcut) +Microsoft.Office.WebExtension.useShortNamespace = function Microsoft_Office_WebExtension_useShortNamespace(useShortcut) { - if(useShortcut) - OSF.NamespaceManager.enableShortcut(); - else - OSF.NamespaceManager.disableShortcut() + if(useShortcut) + OSF.NamespaceManager.enableShortcut(); + else + OSF.NamespaceManager.disableShortcut() }; -Microsoft.Office.WebExtension.select=function Microsoft_Office_WebExtension_select(str, errorCallback) +Microsoft.Office.WebExtension.select = function Microsoft_Office_WebExtension_select(str, errorCallback) { - var promise; - if(str && typeof str=="string") - { - var index=str.indexOf("#"); - if(index !=-1) - { - var op=str.substring(0,index); - var target=str.substring(index+1); - switch(op) - { - case"binding": - case"bindings": - if(target) - promise=new OSF.DDA.BindingPromise(target); - break - } - } - } - if(!promise) - { - if(errorCallback) - { - var callbackType=typeof errorCallback; - if(callbackType=="function") - { - var callArgs={}; - callArgs[Microsoft.Office.WebExtension.Parameters.Callback]=errorCallback; - OSF.DDA.issueAsyncResult(callArgs,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext)) - } - else - throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,callbackType); - } - } - else - { - promise.onFail=errorCallback; - return promise - } + var promise; + if(str && typeof str == "string") + { + var index = str.indexOf("#"); + if(index != -1) + { + var op = str.substring(0,index); + var target = str.substring(index + 1); + switch(op) + { + case"binding": + case"bindings": + if(target) + promise = new OSF.DDA.BindingPromise(target); + break + } + } + } + if(!promise) + { + if(errorCallback) + { + var callbackType = typeof errorCallback; + if(callbackType == "function") + { + var callArgs = {}; + callArgs[Microsoft.Office.WebExtension.Parameters.Callback] = errorCallback; + OSF.DDA.issueAsyncResult(callArgs,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext)) + } + else + throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,callbackType); + } + } + else + { + promise.onFail = errorCallback; + return promise + } }; -OSF.DDA.Context=function OSF_DDA_Context(officeAppContext, document, license, appOM, getOfficeTheme) +OSF.DDA.Context = function OSF_DDA_Context(officeAppContext, document, license, appOM, getOfficeTheme) { - OSF.OUtil.defineEnumerableProperties(this,{ - contentLanguage: {value: officeAppContext.get_dataLocale()}, - displayLanguage: {value: officeAppContext.get_appUILocale()}, - touchEnabled: {value: officeAppContext.get_touchEnabled()}, - commerceAllowed: {value: officeAppContext.get_commerceAllowed()}, - host: {value: OfficeExt.HostName.Host.getInstance().getHost()}, - platform: {value: OfficeExt.HostName.Host.getInstance().getPlatform()}, - diagnostics: {value: OfficeExt.HostName.Host.getInstance().getDiagnostics(officeAppContext.get_hostFullVersion())} - }); - if(license) - OSF.OUtil.defineEnumerableProperty(this,"license",{value: license}); - if(officeAppContext.ui) - OSF.OUtil.defineEnumerableProperty(this,"ui",{value: officeAppContext.ui}); - if(officeAppContext.get_isDialog()) - { - var requirements=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); - OSF.OUtil.defineEnumerableProperty(this,"requirements",{value: requirements}) - } - else - { - if(document) - OSF.OUtil.defineEnumerableProperty(this,"document",{value: document}); - if(appOM) - { - var displayName=appOM.displayName || "appOM"; - delete appOM.displayName; - OSF.OUtil.defineEnumerableProperty(this,displayName,{value: appOM}) - } - if(getOfficeTheme) - OSF.OUtil.defineEnumerableProperty(this,"officeTheme",{get: function() - { - return getOfficeTheme() - }}); - var requirements=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(officeAppContext); - OSF.OUtil.defineEnumerableProperty(this,"requirements",{value: requirements}) - } + OSF.OUtil.defineEnumerableProperties(this,{ + contentLanguage: {value: officeAppContext.get_dataLocale()}, + displayLanguage: {value: officeAppContext.get_appUILocale()}, + touchEnabled: {value: officeAppContext.get_touchEnabled()}, + commerceAllowed: {value: officeAppContext.get_commerceAllowed()}, + host: {value: OfficeExt.HostName.Host.getInstance().getHost()}, + platform: {value: OfficeExt.HostName.Host.getInstance().getPlatform()}, + diagnostics: {value: OfficeExt.HostName.Host.getInstance().getDiagnostics(officeAppContext.get_hostFullVersion())} + }); + if(license) + OSF.OUtil.defineEnumerableProperty(this,"license",{value: license}); + if(officeAppContext.ui) + OSF.OUtil.defineEnumerableProperty(this,"ui",{value: officeAppContext.ui}); + if(officeAppContext.auth) + OSF.OUtil.defineEnumerableProperty(this,"auth",{value: officeAppContext.auth}); + if(officeAppContext.get_isDialog()) + { + var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); + OSF.OUtil.defineEnumerableProperty(this,"requirements",{value: requirements}) + } + else + { + if(document) + OSF.OUtil.defineEnumerableProperty(this,"document",{value: document}); + if(appOM) + { + var displayName = appOM.displayName || "appOM"; + delete appOM.displayName; + OSF.OUtil.defineEnumerableProperty(this,displayName,{value: appOM}) + } + if(getOfficeTheme) + OSF.OUtil.defineEnumerableProperty(this,"officeTheme",{get: function() + { + return getOfficeTheme() + }}); + var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(officeAppContext); + OSF.OUtil.defineEnumerableProperty(this,"requirements",{value: requirements}) + } }; -OSF.DDA.OutlookContext=function OSF_DDA_OutlookContext(appContext, settings, license, appOM, getOfficeTheme) +OSF.DDA.OutlookContext = function OSF_DDA_OutlookContext(appContext, settings, license, appOM, getOfficeTheme) { - OSF.DDA.OutlookContext.uber.constructor.call(this,appContext,null,license,appOM,getOfficeTheme); - if(settings) - OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value: settings}) + OSF.DDA.OutlookContext.uber.constructor.call(this,appContext,null,license,appOM,getOfficeTheme); + if(settings) + OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value: settings}) }; OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context); -OSF.DDA.OutlookAppOm=function OSF_DDA_OutlookAppOm(appContext, window, appReady){}; -OSF.DDA.Document=function OSF_DDA_Document(officeAppContext, settings) +OSF.DDA.OutlookAppOm = function OSF_DDA_OutlookAppOm(appContext, window, appReady){}; +OSF.DDA.Document = function OSF_DDA_Document(officeAppContext, settings) { - var mode; - switch(officeAppContext.get_clientMode()) - { - case OSF.ClientMode.ReadOnly: - mode=Microsoft.Office.WebExtension.DocumentMode.ReadOnly; - break; - case OSF.ClientMode.ReadWrite: - mode=Microsoft.Office.WebExtension.DocumentMode.ReadWrite; - break - } - if(settings) - OSF.OUtil.defineEnumerableProperty(this,"settings",{value: settings}); - OSF.OUtil.defineMutableProperties(this,{ - mode: {value: mode}, - url: {value: officeAppContext.get_docUrl()} - }) + var mode; + switch(officeAppContext.get_clientMode()) + { + case OSF.ClientMode.ReadOnly: + mode = Microsoft.Office.WebExtension.DocumentMode.ReadOnly; + break; + case OSF.ClientMode.ReadWrite: + mode = Microsoft.Office.WebExtension.DocumentMode.ReadWrite; + break + } + if(settings) + OSF.OUtil.defineEnumerableProperty(this,"settings",{value: settings}); + OSF.OUtil.defineMutableProperties(this,{ + mode: {value: mode}, + url: {value: officeAppContext.get_docUrl()} + }) }; -OSF.DDA.JsomDocument=function OSF_DDA_JsomDocument(officeAppContext, bindingFacade, settings) +OSF.DDA.JsomDocument = function OSF_DDA_JsomDocument(officeAppContext, bindingFacade, settings) { - OSF.DDA.JsomDocument.uber.constructor.call(this,officeAppContext,settings); - if(bindingFacade) - OSF.OUtil.defineEnumerableProperty(this,"bindings",{get: function OSF_DDA_Document$GetBindings() - { - return bindingFacade - }}); - var am=OSF.DDA.AsyncMethodNames; - OSF.DDA.DispIdHost.addAsyncMethods(this,[am.GetSelectedDataAsync,am.SetSelectedDataAsync]); - OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged])) + OSF.DDA.JsomDocument.uber.constructor.call(this,officeAppContext,settings); + if(bindingFacade) + OSF.OUtil.defineEnumerableProperty(this,"bindings",{get: function OSF_DDA_Document$GetBindings() + { + return bindingFacade + }}); + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this,[am.GetSelectedDataAsync,am.SetSelectedDataAsync]); + OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged])) }; OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document); OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get: function Microsoft_Office_WebExtension$GetContext() - { - var context; - if(OSF && OSF._OfficeAppFactory) - context=OSF._OfficeAppFactory.getContext(); - return context - }}); -OSF.DDA.License=function OSF_DDA_License(eToken) + { + var context; + if(OSF && OSF._OfficeAppFactory) + context = OSF._OfficeAppFactory.getContext(); + return context + }}); +OSF.DDA.License = function OSF_DDA_License(eToken) { - OSF.OUtil.defineEnumerableProperty(this,"value",{value: eToken}) + OSF.OUtil.defineEnumerableProperty(this,"value",{value: eToken}) }; -OSF.DDA.ApiMethodCall=function OSF_DDA_ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) +OSF.DDA.ApiMethodCall = function OSF_DDA_ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { - var requiredCount=requiredParameters.length; - var getInvalidParameterString=OSF.OUtil.delayExecutionAndCache(function() - { - return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,displayName) - }); - this.verifyArguments=function OSF_DDA_ApiMethodCall$VerifyArguments(params, args) - { - for(var name in params) - { - var param=params[name]; - var arg=args[name]; - if(param["enum"]) - switch(typeof arg) - { - case"string": - if(OSF.OUtil.listContainsValue(param["enum"],arg)) - break; - case"undefined": - throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration; - default: - throw getInvalidParameterString(); - } - if(param["types"]) - if(!OSF.OUtil.listContainsValue(param["types"],typeof arg)) - throw getInvalidParameterString(); - } - }; - this.extractRequiredArguments=function OSF_DDA_ApiMethodCall$ExtractRequiredArguments(userArgs, caller, stateInfo) - { - if(userArgs.length < requiredCount) - throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments); - var requiredArgs=[]; - var index; - for(index=0; index < requiredCount; index++) - requiredArgs.push(userArgs[index]); - this.verifyArguments(requiredParameters,requiredArgs); - var ret={}; - for(index=0; index < requiredCount; index++) - { - var param=requiredParameters[index]; - var arg=requiredArgs[index]; - if(param.verify) - { - var isValid=param.verify(arg,caller,stateInfo); - if(!isValid) - throw getInvalidParameterString(); - } - ret[param.name]=arg - } - return ret - },this.fillOptions=function OSF_DDA_ApiMethodCall$FillOptions(options, requiredArgs, caller, stateInfo) - { - options=options || {}; - for(var optionName in supportedOptions) - if(!OSF.OUtil.listContainsKey(options,optionName)) - { - var value=undefined; - var option=supportedOptions[optionName]; - if(option.calculate && requiredArgs) - value=option.calculate(requiredArgs,caller,stateInfo); - if(!value && option.defaultValue !==undefined) - value=option.defaultValue; - options[optionName]=value - } - return options - }; - this.constructCallArgs=function OSF_DAA_ApiMethodCall$ConstructCallArgs(required, options, caller, stateInfo) - { - var callArgs={}; - for(var r in required) - callArgs[r]=required[r]; - for(var o in options) - callArgs[o]=options[o]; - for(var s in privateStateCallbacks) - callArgs[s]=privateStateCallbacks[s](caller,stateInfo); - if(checkCallArgs) - callArgs=checkCallArgs(callArgs,caller,stateInfo); - return callArgs - } + var requiredCount = requiredParameters.length; + var getInvalidParameterString = OSF.OUtil.delayExecutionAndCache(function() + { + return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,displayName) + }); + this.verifyArguments = function OSF_DDA_ApiMethodCall$VerifyArguments(params, args) + { + for(var name in params) + { + var param = params[name]; + var arg = args[name]; + if(param["enum"]) + switch(typeof arg) + { + case"string": + if(OSF.OUtil.listContainsValue(param["enum"],arg)) + break; + case"undefined": + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration; + default: + throw getInvalidParameterString(); + } + if(param["types"]) + if(!OSF.OUtil.listContainsValue(param["types"],typeof arg)) + throw getInvalidParameterString(); + } + }; + this.extractRequiredArguments = function OSF_DDA_ApiMethodCall$ExtractRequiredArguments(userArgs, caller, stateInfo) + { + if(userArgs.length < requiredCount) + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments); + var requiredArgs = []; + var index; + for(index = 0; index < requiredCount; index++) + requiredArgs.push(userArgs[index]); + this.verifyArguments(requiredParameters,requiredArgs); + var ret = {}; + for(index = 0; index < requiredCount; index++) + { + var param = requiredParameters[index]; + var arg = requiredArgs[index]; + if(param.verify) + { + var isValid = param.verify(arg,caller,stateInfo); + if(!isValid) + throw getInvalidParameterString(); + } + ret[param.name] = arg + } + return ret + },this.fillOptions = function OSF_DDA_ApiMethodCall$FillOptions(options, requiredArgs, caller, stateInfo) + { + options = options || {}; + for(var optionName in supportedOptions) + if(!OSF.OUtil.listContainsKey(options,optionName)) + { + var value = undefined; + var option = supportedOptions[optionName]; + if(option.calculate && requiredArgs) + value = option.calculate(requiredArgs,caller,stateInfo); + if(!value && option.defaultValue !== undefined) + value = option.defaultValue; + options[optionName] = value + } + return options + }; + this.constructCallArgs = function OSF_DAA_ApiMethodCall$ConstructCallArgs(required, options, caller, stateInfo) + { + var callArgs = {}; + for(var r in required) + callArgs[r] = required[r]; + for(var o in options) + callArgs[o] = options[o]; + for(var s in privateStateCallbacks) + callArgs[s] = privateStateCallbacks[s](caller,stateInfo); + if(checkCallArgs) + callArgs = checkCallArgs(callArgs,caller,stateInfo); + return callArgs + } }; OSF.OUtil.setNamespace("AsyncResultEnum",OSF.DDA); -OSF.DDA.AsyncResultEnum.Properties={ - Context: "Context", - Value: "Value", - Status: "Status", - Error: "Error" +OSF.DDA.AsyncResultEnum.Properties = { + Context: "Context", + Value: "Value", + Status: "Status", + Error: "Error" }; -Microsoft.Office.WebExtension.AsyncResultStatus={ - Succeeded: "succeeded", - Failed: "failed" +Microsoft.Office.WebExtension.AsyncResultStatus = { + Succeeded: "succeeded", + Failed: "failed" }; -OSF.DDA.AsyncResultEnum.ErrorCode={ - Success: 0, - Failed: 1 +OSF.DDA.AsyncResultEnum.ErrorCode = { + Success: 0, + Failed: 1 }; -OSF.DDA.AsyncResultEnum.ErrorProperties={ - Name: "Name", - Message: "Message", - Code: "Code" +OSF.DDA.AsyncResultEnum.ErrorProperties = { + Name: "Name", + Message: "Message", + Code: "Code" }; -OSF.DDA.AsyncMethodNames={}; -OSF.DDA.AsyncMethodNames.addNames=function(methodNames) +OSF.DDA.AsyncMethodNames = {}; +OSF.DDA.AsyncMethodNames.addNames = function(methodNames) { - for(var entry in methodNames) - { - var am={}; - OSF.OUtil.defineEnumerableProperties(am,{ - id: {value: entry}, - displayName: {value: methodNames[entry]} - }); - OSF.DDA.AsyncMethodNames[entry]=am - } + for(var entry in methodNames) + { + var am = {}; + OSF.OUtil.defineEnumerableProperties(am,{ + id: {value: entry}, + displayName: {value: methodNames[entry]} + }); + OSF.DDA.AsyncMethodNames[entry] = am + } }; -OSF.DDA.AsyncMethodCall=function OSF_DDA_AsyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, onSucceeded, onFailed, checkCallArgs, displayName) +OSF.DDA.AsyncMethodCall = function OSF_DDA_AsyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, onSucceeded, onFailed, checkCallArgs, displayName) { - var requiredCount=requiredParameters.length; - var apiMethods=new OSF.DDA.ApiMethodCall(requiredParameters,supportedOptions,privateStateCallbacks,checkCallArgs,displayName); - function OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) - { - if(userArgs.length > requiredCount+2) - throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); - var options, - parameterCallback; - for(var i=userArgs.length - 1; i >=requiredCount; i--) - { - var argument=userArgs[i]; - switch(typeof argument) - { - case"object": - if(options) - throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); - else - options=argument; - break; - case"function": - if(parameterCallback) - throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction); - else - parameterCallback=argument; - break; - default: - throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); - break - } - } - options=apiMethods.fillOptions(options,requiredArgs,caller,stateInfo); - if(parameterCallback) - if(options[Microsoft.Office.WebExtension.Parameters.Callback]) - throw Strings.OfficeOM.L_RedundantCallbackSpecification; - else - options[Microsoft.Office.WebExtension.Parameters.Callback]=parameterCallback; - apiMethods.verifyArguments(supportedOptions,options); - return options - } - this.verifyAndExtractCall=function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) - { - var required=apiMethods.extractRequiredArguments(userArgs,caller,stateInfo); - var options=OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs,required,caller,stateInfo); - var callArgs=apiMethods.constructCallArgs(required,options,caller,stateInfo); - return callArgs - }; - this.processResponse=function OSF_DAA_AsyncMethodCall$ProcessResponse(status, response, caller, callArgs) - { - var payload; - if(status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - if(onSucceeded) - payload=onSucceeded(response,caller,callArgs); - else - payload=response; - else if(onFailed) - payload=onFailed(status,response); - else - payload=OSF.DDA.ErrorCodeManager.getErrorArgs(status); - return payload - }; - this.getCallArgs=function(suppliedArgs) - { - var options, - parameterCallback; - for(var i=suppliedArgs.length - 1; i >=requiredCount; i--) - { - var argument=suppliedArgs[i]; - switch(typeof argument) - { - case"object": - options=argument; - break; - case"function": - parameterCallback=argument; - break - } - } - options=options || {}; - if(parameterCallback) - options[Microsoft.Office.WebExtension.Parameters.Callback]=parameterCallback; - return options - } + var requiredCount = requiredParameters.length; + var apiMethods = new OSF.DDA.ApiMethodCall(requiredParameters,supportedOptions,privateStateCallbacks,checkCallArgs,displayName); + function OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) + { + if(userArgs.length > requiredCount + 2) + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); + var options, + parameterCallback; + for(var i = userArgs.length - 1; i >= requiredCount; i--) + { + var argument = userArgs[i]; + switch(typeof argument) + { + case"object": + if(options) + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); + else + options = argument; + break; + case"function": + if(parameterCallback) + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction); + else + parameterCallback = argument; + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); + break + } + } + options = apiMethods.fillOptions(options,requiredArgs,caller,stateInfo); + if(parameterCallback) + if(options[Microsoft.Office.WebExtension.Parameters.Callback]) + throw Strings.OfficeOM.L_RedundantCallbackSpecification; + else + options[Microsoft.Office.WebExtension.Parameters.Callback] = parameterCallback; + apiMethods.verifyArguments(supportedOptions,options); + return options + } + this.verifyAndExtractCall = function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) + { + var required = apiMethods.extractRequiredArguments(userArgs,caller,stateInfo); + var options = OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs,required,caller,stateInfo); + var callArgs = apiMethods.constructCallArgs(required,options,caller,stateInfo); + return callArgs + }; + this.processResponse = function OSF_DAA_AsyncMethodCall$ProcessResponse(status, response, caller, callArgs) + { + var payload; + if(status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + if(onSucceeded) + payload = onSucceeded(response,caller,callArgs); + else + payload = response; + else if(onFailed) + payload = onFailed(status,response); + else + payload = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + return payload + }; + this.getCallArgs = function(suppliedArgs) + { + var options, + parameterCallback; + for(var i = suppliedArgs.length - 1; i >= requiredCount; i--) + { + var argument = suppliedArgs[i]; + switch(typeof argument) + { + case"object": + options = argument; + break; + case"function": + parameterCallback = argument; + break + } + } + options = options || {}; + if(parameterCallback) + options[Microsoft.Office.WebExtension.Parameters.Callback] = parameterCallback; + return options + } }; -OSF.DDA.AsyncMethodCallFactory=function() +OSF.DDA.AsyncMethodCallFactory = function() { - return{manufacture: function(params) - { - var supportedOptions=params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; - var privateStateCallbacks=params.privateStateCallbacks ? OSF.OUtil.createObject(params.privateStateCallbacks) : []; - return new OSF.DDA.AsyncMethodCall(params.requiredArguments || [],supportedOptions,privateStateCallbacks,params.onSucceeded,params.onFailed,params.checkCallArgs,params.method.displayName) - }} + return{manufacture: function(params) + { + var supportedOptions = params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + var privateStateCallbacks = params.privateStateCallbacks ? OSF.OUtil.createObject(params.privateStateCallbacks) : []; + return new OSF.DDA.AsyncMethodCall(params.requiredArguments || [],supportedOptions,privateStateCallbacks,params.onSucceeded,params.onFailed,params.checkCallArgs,params.method.displayName) + }} }(); -OSF.DDA.AsyncMethodCalls={}; -OSF.DDA.AsyncMethodCalls.define=function(callDefinition) +OSF.DDA.AsyncMethodCalls = {}; +OSF.DDA.AsyncMethodCalls.define = function(callDefinition) { - OSF.DDA.AsyncMethodCalls[callDefinition.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(callDefinition) + OSF.DDA.AsyncMethodCalls[callDefinition.method.id] = OSF.DDA.AsyncMethodCallFactory.manufacture(callDefinition) }; -OSF.DDA.Error=function OSF_DDA_Error(name, message, code) +OSF.DDA.Error = function OSF_DDA_Error(name, message, code) { - OSF.OUtil.defineEnumerableProperties(this,{ - name: {value: name}, - message: {value: message}, - code: {value: code} - }) + OSF.OUtil.defineEnumerableProperties(this,{ + name: {value: name}, + message: {value: message}, + code: {value: code} + }) }; -OSF.DDA.AsyncResult=function OSF_DDA_AsyncResult(initArgs, errorArgs) +OSF.DDA.AsyncResult = function OSF_DDA_AsyncResult(initArgs, errorArgs) { - OSF.OUtil.defineEnumerableProperties(this,{ - value: {value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Value]}, - status: {value: errorArgs ? Microsoft.Office.WebExtension.AsyncResultStatus.Failed : Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded} - }); - if(initArgs[OSF.DDA.AsyncResultEnum.Properties.Context]) - OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Context]}); - if(errorArgs) - OSF.OUtil.defineEnumerableProperty(this,"error",{value: new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])}) + OSF.OUtil.defineEnumerableProperties(this,{ + value: {value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Value]}, + status: {value: errorArgs ? Microsoft.Office.WebExtension.AsyncResultStatus.Failed : Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded} + }); + if(initArgs[OSF.DDA.AsyncResultEnum.Properties.Context]) + OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Context]}); + if(errorArgs) + OSF.OUtil.defineEnumerableProperty(this,"error",{value: new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])}) }; -OSF.DDA.issueAsyncResult=function OSF_DDA$IssueAsyncResult(callArgs, status, payload) +OSF.DDA.issueAsyncResult = function OSF_DDA$IssueAsyncResult(callArgs, status, payload) { - var callback=callArgs[Microsoft.Office.WebExtension.Parameters.Callback]; - if(callback) - { - var asyncInitArgs={}; - asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Context]=callArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; - var errorArgs; - if(status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Value]=payload; - else - { - errorArgs={}; - payload=payload || OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=payload.name || payload; - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=payload.message || payload - } - callback(new OSF.DDA.AsyncResult(asyncInitArgs,errorArgs)) - } + var callback = callArgs[Microsoft.Office.WebExtension.Parameters.Callback]; + if(callback) + { + var asyncInitArgs = {}; + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Context] = callArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; + var errorArgs; + if(status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Value] = payload; + else + { + errorArgs = {}; + payload = payload || OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code] = status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name] = payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message] = payload.message || payload + } + callback(new OSF.DDA.AsyncResult(asyncInitArgs,errorArgs)) + } }; -OSF.DDA.SyncMethodNames={}; -OSF.DDA.SyncMethodNames.addNames=function(methodNames) +OSF.DDA.SyncMethodNames = {}; +OSF.DDA.SyncMethodNames.addNames = function(methodNames) { - for(var entry in methodNames) - { - var am={}; - OSF.OUtil.defineEnumerableProperties(am,{ - id: {value: entry}, - displayName: {value: methodNames[entry]} - }); - OSF.DDA.SyncMethodNames[entry]=am - } + for(var entry in methodNames) + { + var am = {}; + OSF.OUtil.defineEnumerableProperties(am,{ + id: {value: entry}, + displayName: {value: methodNames[entry]} + }); + OSF.DDA.SyncMethodNames[entry] = am + } }; -OSF.DDA.SyncMethodCall=function OSF_DDA_SyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) +OSF.DDA.SyncMethodCall = function OSF_DDA_SyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { - var requiredCount=requiredParameters.length; - var apiMethods=new OSF.DDA.ApiMethodCall(requiredParameters,supportedOptions,privateStateCallbacks,checkCallArgs,displayName); - function OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) - { - if(userArgs.length > requiredCount+1) - throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); - var options, - parameterCallback; - for(var i=userArgs.length - 1; i >=requiredCount; i--) - { - var argument=userArgs[i]; - switch(typeof argument) - { - case"object": - if(options) - throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); - else - options=argument; - break; - default: - throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); - break - } - } - options=apiMethods.fillOptions(options,requiredArgs,caller,stateInfo); - apiMethods.verifyArguments(supportedOptions,options); - return options - } - this.verifyAndExtractCall=function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) - { - var required=apiMethods.extractRequiredArguments(userArgs,caller,stateInfo); - var options=OSF_DAA_SyncMethodCall$ExtractOptions(userArgs,required,caller,stateInfo); - var callArgs=apiMethods.constructCallArgs(required,options,caller,stateInfo); - return callArgs - } + var requiredCount = requiredParameters.length; + var apiMethods = new OSF.DDA.ApiMethodCall(requiredParameters,supportedOptions,privateStateCallbacks,checkCallArgs,displayName); + function OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) + { + if(userArgs.length > requiredCount + 1) + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); + var options, + parameterCallback; + for(var i = userArgs.length - 1; i >= requiredCount; i--) + { + var argument = userArgs[i]; + switch(typeof argument) + { + case"object": + if(options) + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); + else + options = argument; + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); + break + } + } + options = apiMethods.fillOptions(options,requiredArgs,caller,stateInfo); + apiMethods.verifyArguments(supportedOptions,options); + return options + } + this.verifyAndExtractCall = function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) + { + var required = apiMethods.extractRequiredArguments(userArgs,caller,stateInfo); + var options = OSF_DAA_SyncMethodCall$ExtractOptions(userArgs,required,caller,stateInfo); + var callArgs = apiMethods.constructCallArgs(required,options,caller,stateInfo); + return callArgs + } }; -OSF.DDA.SyncMethodCallFactory=function() +OSF.DDA.SyncMethodCallFactory = function() { - return{manufacture: function(params) - { - var supportedOptions=params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; - return new OSF.DDA.SyncMethodCall(params.requiredArguments || [],supportedOptions,params.privateStateCallbacks,params.checkCallArgs,params.method.displayName) - }} + return{manufacture: function(params) + { + var supportedOptions = params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + return new OSF.DDA.SyncMethodCall(params.requiredArguments || [],supportedOptions,params.privateStateCallbacks,params.checkCallArgs,params.method.displayName) + }} }(); -OSF.DDA.SyncMethodCalls={}; -OSF.DDA.SyncMethodCalls.define=function(callDefinition) +OSF.DDA.SyncMethodCalls = {}; +OSF.DDA.SyncMethodCalls.define = function(callDefinition) { - OSF.DDA.SyncMethodCalls[callDefinition.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(callDefinition) + OSF.DDA.SyncMethodCalls[callDefinition.method.id] = OSF.DDA.SyncMethodCallFactory.manufacture(callDefinition) }; -OSF.DDA.ListType=function() +OSF.DDA.ListType = function() { - var listTypes={}; - return{ - setListType: function OSF_DDA_ListType$AddListType(t, prop) - { - listTypes[t]=prop - }, - isListType: function OSF_DDA_ListType$IsListType(t) - { - return OSF.OUtil.listContainsKey(listTypes,t) - }, - getDescriptor: function OSF_DDA_ListType$getDescriptor(t) - { - return listTypes[t] - } - } + var listTypes = {}; + return{ + setListType: function OSF_DDA_ListType$AddListType(t, prop) + { + listTypes[t] = prop + }, + isListType: function OSF_DDA_ListType$IsListType(t) + { + return OSF.OUtil.listContainsKey(listTypes,t) + }, + getDescriptor: function OSF_DDA_ListType$getDescriptor(t) + { + return listTypes[t] + } + } }(); -OSF.DDA.HostParameterMap=function(specialProcessor, mappings) +OSF.DDA.HostParameterMap = function(specialProcessor, mappings) { - var toHostMap="toHost"; - var fromHostMap="fromHost"; - var sourceData="sourceData"; - var self="self"; - var dynamicTypes={}; - dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]={ - toHost: function(data) - { - if(data !=null && data.rows !==undefined) - { - var tableData={}; - tableData[OSF.DDA.TableDataProperties.TableRows]=data.rows; - tableData[OSF.DDA.TableDataProperties.TableHeaders]=data.headers; - data=tableData - } - return data - }, - fromHost: function(args) - { - return args - } - }; - dynamicTypes[Microsoft.Office.WebExtension.Parameters.SampleData]=dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]; - function mapValues(preimageSet, mapping) - { - var ret=preimageSet ? {} : undefined; - for(var entry in preimageSet) - { - var preimage=preimageSet[entry]; - var image; - if(OSF.DDA.ListType.isListType(entry)) - { - image=[]; - for(var subEntry in preimage) - image.push(mapValues(preimage[subEntry],mapping)) - } - else if(OSF.OUtil.listContainsKey(dynamicTypes,entry)) - image=dynamicTypes[entry][mapping](preimage); - else if(mapping==fromHostMap && specialProcessor.preserveNesting(entry)) - image=mapValues(preimage,mapping); - else - { - var maps=mappings[entry]; - if(maps) - { - var map=maps[mapping]; - if(map) - { - image=map[preimage]; - if(image===undefined) - image=preimage - } - } - else - image=preimage - } - ret[entry]=image - } - return ret - } - function generateArguments(imageSet, parameters) - { - var ret; - for(var param in parameters) - { - var arg; - if(specialProcessor.isComplexType(param)) - arg=generateArguments(imageSet,mappings[param][toHostMap]); - else - arg=imageSet[param]; - if(arg !=undefined) - { - if(!ret) - ret={}; - var index=parameters[param]; - if(index==self) - index=param; - ret[index]=specialProcessor.pack(param,arg) - } - } - return ret - } - function extractArguments(source, parameters, extracted) - { - if(!extracted) - extracted={}; - for(var param in parameters) - { - var index=parameters[param]; - var value; - if(index==self) - value=source; - else if(index==sourceData) - { - extracted[param]=source.toArray(); - continue - } - else - value=source[index]; - if(value===null || value===undefined) - extracted[param]=undefined; - else - { - value=specialProcessor.unpack(param,value); - var map; - if(specialProcessor.isComplexType(param)) - { - map=mappings[param][fromHostMap]; - if(specialProcessor.preserveNesting(param)) - extracted[param]=extractArguments(value,map); - else - extractArguments(value,map,extracted) - } - else if(OSF.DDA.ListType.isListType(param)) - { - map={}; - var entryDescriptor=OSF.DDA.ListType.getDescriptor(param); - map[entryDescriptor]=self; - var extractedValues=new Array(value.length); - for(var item in value) - extractedValues[item]=extractArguments(value[item],map); - extracted[param]=extractedValues - } - else - extracted[param]=value - } - } - return extracted - } - function applyMap(mapName, preimage, mapping) - { - var parameters=mappings[mapName][mapping]; - var image; - if(mapping=="toHost") - { - var imageSet=mapValues(preimage,mapping); - image=generateArguments(imageSet,parameters) - } - else if(mapping=="fromHost") - { - var argumentSet=extractArguments(preimage,parameters); - image=mapValues(argumentSet,mapping) - } - return image - } - if(!mappings) - mappings={}; - this.addMapping=function(mapName, description) - { - var toHost, - fromHost; - if(description.map) - { - toHost=description.map; - fromHost={}; - for(var preimage in toHost) - { - var image=toHost[preimage]; - if(image==self) - image=preimage; - fromHost[image]=preimage - } - } - else - { - toHost=description.toHost; - fromHost=description.fromHost - } - var pair=mappings[mapName]; - if(pair) - { - var currMap=pair[toHostMap]; - for(var th in currMap) - toHost[th]=currMap[th]; - currMap=pair[fromHostMap]; - for(var fh in currMap) - fromHost[fh]=currMap[fh] - } - else - pair=mappings[mapName]={}; - pair[toHostMap]=toHost; - pair[fromHostMap]=fromHost - }; - this.toHost=function(mapName, preimage) - { - return applyMap(mapName,preimage,toHostMap) - }; - this.fromHost=function(mapName, image) - { - return applyMap(mapName,image,fromHostMap) - }; - this.self=self; - this.sourceData=sourceData; - this.addComplexType=function(ct) - { - specialProcessor.addComplexType(ct) - }; - this.getDynamicType=function(dt) - { - return specialProcessor.getDynamicType(dt) - }; - this.setDynamicType=function(dt, handler) - { - specialProcessor.setDynamicType(dt,handler) - }; - this.dynamicTypes=dynamicTypes; - this.doMapValues=function(preimageSet, mapping) - { - return mapValues(preimageSet,mapping) - } + var toHostMap = "toHost"; + var fromHostMap = "fromHost"; + var sourceData = "sourceData"; + var self = "self"; + var dynamicTypes = {}; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data] = { + toHost: function(data) + { + if(data != null && data.rows !== undefined) + { + var tableData = {}; + tableData[OSF.DDA.TableDataProperties.TableRows] = data.rows; + tableData[OSF.DDA.TableDataProperties.TableHeaders] = data.headers; + data = tableData + } + return data + }, + fromHost: function(args) + { + return args + } + }; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.SampleData] = dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]; + function mapValues(preimageSet, mapping) + { + var ret = preimageSet ? {} : undefined; + for(var entry in preimageSet) + { + var preimage = preimageSet[entry]; + var image; + if(OSF.DDA.ListType.isListType(entry)) + { + image = []; + for(var subEntry in preimage) + image.push(mapValues(preimage[subEntry],mapping)) + } + else if(OSF.OUtil.listContainsKey(dynamicTypes,entry)) + image = dynamicTypes[entry][mapping](preimage); + else if(mapping == fromHostMap && specialProcessor.preserveNesting(entry)) + image = mapValues(preimage,mapping); + else + { + var maps = mappings[entry]; + if(maps) + { + var map = maps[mapping]; + if(map) + { + image = map[preimage]; + if(image === undefined) + image = preimage + } + } + else + image = preimage + } + ret[entry] = image + } + return ret + } + function generateArguments(imageSet, parameters) + { + var ret; + for(var param in parameters) + { + var arg; + if(specialProcessor.isComplexType(param)) + arg = generateArguments(imageSet,mappings[param][toHostMap]); + else + arg = imageSet[param]; + if(arg != undefined) + { + if(!ret) + ret = {}; + var index = parameters[param]; + if(index == self) + index = param; + ret[index] = specialProcessor.pack(param,arg) + } + } + return ret + } + function extractArguments(source, parameters, extracted) + { + if(!extracted) + extracted = {}; + for(var param in parameters) + { + var index = parameters[param]; + var value; + if(index == self) + value = source; + else if(index == sourceData) + { + extracted[param] = source.toArray(); + continue + } + else + value = source[index]; + if(value === null || value === undefined) + extracted[param] = undefined; + else + { + value = specialProcessor.unpack(param,value); + var map; + if(specialProcessor.isComplexType(param)) + { + map = mappings[param][fromHostMap]; + if(specialProcessor.preserveNesting(param)) + extracted[param] = extractArguments(value,map); + else + extractArguments(value,map,extracted) + } + else if(OSF.DDA.ListType.isListType(param)) + { + map = {}; + var entryDescriptor = OSF.DDA.ListType.getDescriptor(param); + map[entryDescriptor] = self; + var extractedValues = new Array(value.length); + for(var item in value) + extractedValues[item] = extractArguments(value[item],map); + extracted[param] = extractedValues + } + else + extracted[param] = value + } + } + return extracted + } + function applyMap(mapName, preimage, mapping) + { + var parameters = mappings[mapName][mapping]; + var image; + if(mapping == "toHost") + { + var imageSet = mapValues(preimage,mapping); + image = generateArguments(imageSet,parameters) + } + else if(mapping == "fromHost") + { + var argumentSet = extractArguments(preimage,parameters); + image = mapValues(argumentSet,mapping) + } + return image + } + if(!mappings) + mappings = {}; + this.addMapping = function(mapName, description) + { + var toHost, + fromHost; + if(description.map) + { + toHost = description.map; + fromHost = {}; + for(var preimage in toHost) + { + var image = toHost[preimage]; + if(image == self) + image = preimage; + fromHost[image] = preimage + } + } + else + { + toHost = description.toHost; + fromHost = description.fromHost + } + var pair = mappings[mapName]; + if(pair) + { + var currMap = pair[toHostMap]; + for(var th in currMap) + toHost[th] = currMap[th]; + currMap = pair[fromHostMap]; + for(var fh in currMap) + fromHost[fh] = currMap[fh] + } + else + pair = mappings[mapName] = {}; + pair[toHostMap] = toHost; + pair[fromHostMap] = fromHost + }; + this.toHost = function(mapName, preimage) + { + return applyMap(mapName,preimage,toHostMap) + }; + this.fromHost = function(mapName, image) + { + return applyMap(mapName,image,fromHostMap) + }; + this.self = self; + this.sourceData = sourceData; + this.addComplexType = function(ct) + { + specialProcessor.addComplexType(ct) + }; + this.getDynamicType = function(dt) + { + return specialProcessor.getDynamicType(dt) + }; + this.setDynamicType = function(dt, handler) + { + specialProcessor.setDynamicType(dt,handler) + }; + this.dynamicTypes = dynamicTypes; + this.doMapValues = function(preimageSet, mapping) + { + return mapValues(preimageSet,mapping) + } }; -OSF.DDA.SpecialProcessor=function(complexTypes, dynamicTypes) +OSF.DDA.SpecialProcessor = function(complexTypes, dynamicTypes) { - this.addComplexType=function OSF_DDA_SpecialProcessor$addComplexType(ct) - { - complexTypes.push(ct) - }; - this.getDynamicType=function OSF_DDA_SpecialProcessor$getDynamicType(dt) - { - return dynamicTypes[dt] - }; - this.setDynamicType=function OSF_DDA_SpecialProcessor$setDynamicType(dt, handler) - { - dynamicTypes[dt]=handler - }; - this.isComplexType=function OSF_DDA_SpecialProcessor$isComplexType(t) - { - return OSF.OUtil.listContainsValue(complexTypes,t) - }; - this.isDynamicType=function OSF_DDA_SpecialProcessor$isDynamicType(p) - { - return OSF.OUtil.listContainsKey(dynamicTypes,p) - }; - this.preserveNesting=function OSF_DDA_SpecialProcessor$preserveNesting(p) - { - var pn=[]; - if(OSF.DDA.PropertyDescriptors) - pn.push(OSF.DDA.PropertyDescriptors.Subset); - if(OSF.DDA.DataNodeEventProperties) - pn=pn.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]); - return OSF.OUtil.listContainsValue(pn,p) - }; - this.pack=function OSF_DDA_SpecialProcessor$pack(param, arg) - { - var value; - if(this.isDynamicType(param)) - value=dynamicTypes[param].toHost(arg); - else - value=arg; - return value - }; - this.unpack=function OSF_DDA_SpecialProcessor$unpack(param, arg) - { - var value; - if(this.isDynamicType(param)) - value=dynamicTypes[param].fromHost(arg); - else - value=arg; - return value - } + this.addComplexType = function OSF_DDA_SpecialProcessor$addComplexType(ct) + { + complexTypes.push(ct) + }; + this.getDynamicType = function OSF_DDA_SpecialProcessor$getDynamicType(dt) + { + return dynamicTypes[dt] + }; + this.setDynamicType = function OSF_DDA_SpecialProcessor$setDynamicType(dt, handler) + { + dynamicTypes[dt] = handler + }; + this.isComplexType = function OSF_DDA_SpecialProcessor$isComplexType(t) + { + return OSF.OUtil.listContainsValue(complexTypes,t) + }; + this.isDynamicType = function OSF_DDA_SpecialProcessor$isDynamicType(p) + { + return OSF.OUtil.listContainsKey(dynamicTypes,p) + }; + this.preserveNesting = function OSF_DDA_SpecialProcessor$preserveNesting(p) + { + var pn = []; + if(OSF.DDA.PropertyDescriptors) + pn.push(OSF.DDA.PropertyDescriptors.Subset); + if(OSF.DDA.DataNodeEventProperties) + pn = pn.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]); + return OSF.OUtil.listContainsValue(pn,p) + }; + this.pack = function OSF_DDA_SpecialProcessor$pack(param, arg) + { + var value; + if(this.isDynamicType(param)) + value = dynamicTypes[param].toHost(arg); + else + value = arg; + return value + }; + this.unpack = function OSF_DDA_SpecialProcessor$unpack(param, arg) + { + var value; + if(this.isDynamicType(param)) + value = dynamicTypes[param].fromHost(arg); + else + value = arg; + return value + } }; -OSF.DDA.getDecoratedParameterMap=function(specialProcessor, initialDefs) +OSF.DDA.getDecoratedParameterMap = function(specialProcessor, initialDefs) { - var parameterMap=new OSF.DDA.HostParameterMap(specialProcessor); - var self=parameterMap.self; - function createObject(properties) - { - var obj=null; - if(properties) - { - obj={}; - var len=properties.length; - for(var i=0; i < len; i++) - obj[properties[i].name]=properties[i].value - } - return obj - } - parameterMap.define=function define(definition) - { - var args={}; - var toHost=createObject(definition.toHost); - if(definition.invertible) - args.map=toHost; - else if(definition.canonical) - args.toHost=args.fromHost=toHost; - else - { - args.toHost=toHost; - args.fromHost=createObject(definition.fromHost) - } - parameterMap.addMapping(definition.type,args); - if(definition.isComplexType) - parameterMap.addComplexType(definition.type) - }; - for(var id in initialDefs) - parameterMap.define(initialDefs[id]); - return parameterMap + var parameterMap = new OSF.DDA.HostParameterMap(specialProcessor); + var self = parameterMap.self; + function createObject(properties) + { + var obj = null; + if(properties) + { + obj = {}; + var len = properties.length; + for(var i = 0; i < len; i++) + obj[properties[i].name] = properties[i].value + } + return obj + } + parameterMap.define = function define(definition) + { + var args = {}; + var toHost = createObject(definition.toHost); + if(definition.invertible) + args.map = toHost; + else if(definition.canonical) + args.toHost = args.fromHost = toHost; + else + { + args.toHost = toHost; + args.fromHost = createObject(definition.fromHost) + } + parameterMap.addMapping(definition.type,args); + if(definition.isComplexType) + parameterMap.addComplexType(definition.type) + }; + for(var id in initialDefs) + parameterMap.define(initialDefs[id]); + return parameterMap }; OSF.OUtil.setNamespace("DispIdHost",OSF.DDA); -OSF.DDA.DispIdHost.Methods={ - InvokeMethod: "invokeMethod", - AddEventHandler: "addEventHandler", - RemoveEventHandler: "removeEventHandler", - OpenDialog: "openDialog", - CloseDialog: "closeDialog", - MessageParent: "messageParent", - SendMessage: "sendMessage" +OSF.DDA.DispIdHost.Methods = { + InvokeMethod: "invokeMethod", + AddEventHandler: "addEventHandler", + RemoveEventHandler: "removeEventHandler", + OpenDialog: "openDialog", + CloseDialog: "closeDialog", + MessageParent: "messageParent", + SendMessage: "sendMessage" }; -OSF.DDA.DispIdHost.Delegates={ - ExecuteAsync: "executeAsync", - RegisterEventAsync: "registerEventAsync", - UnregisterEventAsync: "unregisterEventAsync", - ParameterMap: "parameterMap", - OpenDialog: "openDialog", - CloseDialog: "closeDialog", - MessageParent: "messageParent", - SendMessage: "sendMessage" +OSF.DDA.DispIdHost.Delegates = { + ExecuteAsync: "executeAsync", + RegisterEventAsync: "registerEventAsync", + UnregisterEventAsync: "unregisterEventAsync", + ParameterMap: "parameterMap", + OpenDialog: "openDialog", + CloseDialog: "closeDialog", + MessageParent: "messageParent", + SendMessage: "sendMessage" }; -OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, parameterMap) +OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethods, parameterMap) { - var dispIdMap={}; - var jsom=OSF.DDA.AsyncMethodNames; - var did=OSF.DDA.MethodDispId; - var methodMap={ - GoToByIdAsync: did.dispidNavigateToMethod, - GetSelectedDataAsync: did.dispidGetSelectedDataMethod, - SetSelectedDataAsync: did.dispidSetSelectedDataMethod, - GetDocumentCopyChunkAsync: did.dispidGetDocumentCopyChunkMethod, - ReleaseDocumentCopyAsync: did.dispidReleaseDocumentCopyMethod, - GetDocumentCopyAsync: did.dispidGetDocumentCopyMethod, - AddFromSelectionAsync: did.dispidAddBindingFromSelectionMethod, - AddFromPromptAsync: did.dispidAddBindingFromPromptMethod, - AddFromNamedItemAsync: did.dispidAddBindingFromNamedItemMethod, - GetAllAsync: did.dispidGetAllBindingsMethod, - GetByIdAsync: did.dispidGetBindingMethod, - ReleaseByIdAsync: did.dispidReleaseBindingMethod, - GetDataAsync: did.dispidGetBindingDataMethod, - SetDataAsync: did.dispidSetBindingDataMethod, - AddRowsAsync: did.dispidAddRowsMethod, - AddColumnsAsync: did.dispidAddColumnsMethod, - DeleteAllDataValuesAsync: did.dispidClearAllRowsMethod, - RefreshAsync: did.dispidLoadSettingsMethod, - SaveAsync: did.dispidSaveSettingsMethod, - GetActiveViewAsync: did.dispidGetActiveViewMethod, - GetFilePropertiesAsync: did.dispidGetFilePropertiesMethod, - GetOfficeThemeAsync: did.dispidGetOfficeThemeMethod, - GetDocumentThemeAsync: did.dispidGetDocumentThemeMethod, - ClearFormatsAsync: did.dispidClearFormatsMethod, - SetTableOptionsAsync: did.dispidSetTableOptionsMethod, - SetFormatsAsync: did.dispidSetFormatsMethod, - ExecuteRichApiRequestAsync: did.dispidExecuteRichApiRequestMethod, - AppCommandInvocationCompletedAsync: did.dispidAppCommandInvocationCompletedMethod, - CloseContainerAsync: did.dispidCloseContainerMethod, - AddDataPartAsync: did.dispidAddDataPartMethod, - GetDataPartByIdAsync: did.dispidGetDataPartByIdMethod, - GetDataPartsByNameSpaceAsync: did.dispidGetDataPartsByNamespaceMethod, - GetPartXmlAsync: did.dispidGetDataPartXmlMethod, - GetPartNodesAsync: did.dispidGetDataPartNodesMethod, - DeleteDataPartAsync: did.dispidDeleteDataPartMethod, - GetNodeValueAsync: did.dispidGetDataNodeValueMethod, - GetNodeXmlAsync: did.dispidGetDataNodeXmlMethod, - GetRelativeNodesAsync: did.dispidGetDataNodesMethod, - SetNodeValueAsync: did.dispidSetDataNodeValueMethod, - SetNodeXmlAsync: did.dispidSetDataNodeXmlMethod, - AddDataPartNamespaceAsync: did.dispidAddDataNamespaceMethod, - GetDataPartNamespaceAsync: did.dispidGetDataUriByPrefixMethod, - GetDataPartPrefixAsync: did.dispidGetDataPrefixByUriMethod, - GetNodeTextAsync: did.dispidGetDataNodeTextMethod, - SetNodeTextAsync: did.dispidSetDataNodeTextMethod, - GetSelectedTask: did.dispidGetSelectedTaskMethod, - GetTask: did.dispidGetTaskMethod, - GetWSSUrl: did.dispidGetWSSUrlMethod, - GetTaskField: did.dispidGetTaskFieldMethod, - GetSelectedResource: did.dispidGetSelectedResourceMethod, - GetResourceField: did.dispidGetResourceFieldMethod, - GetProjectField: did.dispidGetProjectFieldMethod, - GetSelectedView: did.dispidGetSelectedViewMethod, - GetTaskByIndex: did.dispidGetTaskByIndexMethod, - GetResourceByIndex: did.dispidGetResourceByIndexMethod, - SetTaskField: did.dispidSetTaskFieldMethod, - SetResourceField: did.dispidSetResourceFieldMethod, - GetMaxTaskIndex: did.dispidGetMaxTaskIndexMethod, - GetMaxResourceIndex: did.dispidGetMaxResourceIndexMethod, - CreateTask: did.dispidCreateTaskMethod - }; - for(var method in methodMap) - if(jsom[method]) - dispIdMap[jsom[method].id]=methodMap[method]; - jsom=OSF.DDA.SyncMethodNames; - did=OSF.DDA.MethodDispId; - var asyncMethodMap={ - MessageParent: did.dispidMessageParentMethod, - SendMessage: did.dispidSendMessageMethod - }; - for(var method in asyncMethodMap) - if(jsom[method]) - dispIdMap[jsom[method].id]=asyncMethodMap[method]; - jsom=Microsoft.Office.WebExtension.EventType; - did=OSF.DDA.EventDispId; - var eventMap={ - SettingsChanged: did.dispidSettingsChangedEvent, - DocumentSelectionChanged: did.dispidDocumentSelectionChangedEvent, - BindingSelectionChanged: did.dispidBindingSelectionChangedEvent, - BindingDataChanged: did.dispidBindingDataChangedEvent, - ActiveViewChanged: did.dispidActiveViewChangedEvent, - OfficeThemeChanged: did.dispidOfficeThemeChangedEvent, - DocumentThemeChanged: did.dispidDocumentThemeChangedEvent, - AppCommandInvoked: did.dispidAppCommandInvokedEvent, - DialogMessageReceived: did.dispidDialogMessageReceivedEvent, - DialogParentMessageReceived: did.dispidDialogParentMessageReceivedEvent, - ItemChanged: did.dispidOlkItemSelectedChangedEvent, - TaskSelectionChanged: did.dispidTaskSelectionChangedEvent, - ResourceSelectionChanged: did.dispidResourceSelectionChangedEvent, - ViewSelectionChanged: did.dispidViewSelectionChangedEvent, - DataNodeInserted: did.dispidDataNodeAddedEvent, - DataNodeReplaced: did.dispidDataNodeReplacedEvent, - DataNodeDeleted: did.dispidDataNodeDeletedEvent - }; - for(var event in eventMap) - if(jsom[event]) - dispIdMap[jsom[event]]=eventMap[event]; - function onException(ex, asyncMethodCall, suppliedArgs, callArgs) - { - if(typeof ex=="number") - { - if(!callArgs) - callArgs=asyncMethodCall.getCallArgs(suppliedArgs); - OSF.DDA.issueAsyncResult(callArgs,ex,OSF.DDA.ErrorCodeManager.getErrorArgs(ex)) - } - else - throw ex; - } - this[OSF.DDA.DispIdHost.Methods.InvokeMethod]=function OSF_DDA_DispIdHost_Facade$InvokeMethod(method, suppliedArguments, caller, privateState) - { - var callArgs; - try - { - var methodName=method.id; - var asyncMethodCall=OSF.DDA.AsyncMethodCalls[methodName]; - callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,privateState); - var dispId=dispIdMap[methodName]; - var delegate=getDelegateMethods(methodName); - var richApiInExcelMethodSubstitution=null; - if(window.Excel && window.Office.context.requirements.isSetSupported("RedirectV1Api")) - window.Excel._RedirectV1APIs=true; - if(window.Excel && window.Excel._RedirectV1APIs && (richApiInExcelMethodSubstitution=window.Excel._V1APIMap[methodName])) - { - if(richApiInExcelMethodSubstitution.preprocess) - callArgs=richApiInExcelMethodSubstitution.preprocess(callArgs); - var ctx=new window.Excel.RequestContext; - var result=richApiInExcelMethodSubstitution.call(ctx,callArgs); - ctx.sync().then(function() - { - var response=result.value; - var status=response.status; - delete response["status"]; - delete response["@odata.type"]; - if(richApiInExcelMethodSubstitution.postprocess) - response=richApiInExcelMethodSubstitution.postprocess(response,callArgs); - if(status !=0) - response=OSF.DDA.ErrorCodeManager.getErrorArgs(status); - OSF.DDA.issueAsyncResult(callArgs,status,response) - })["catch"](function(error) - { - OSF.DDA.issueAsyncResult(callArgs,OSF.DDA.ErrorCodeManager.errorCodes.ooeFailure,null) - }) - } - else - { - var hostCallArgs; - if(parameterMap.toHost) - hostCallArgs=parameterMap.toHost(dispId,callArgs); - else - hostCallArgs=callArgs; - delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ - dispId: dispId, - hostCallArgs: hostCallArgs, - onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling(){}, - onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving(){}, - onComplete: function(status, hostResponseArgs) - { - var responseArgs; - if(status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - if(parameterMap.fromHost) - responseArgs=parameterMap.fromHost(dispId,hostResponseArgs); - else - responseArgs=hostResponseArgs; - else - responseArgs=hostResponseArgs; - var payload=asyncMethodCall.processResponse(status,responseArgs,caller,callArgs); - OSF.DDA.issueAsyncResult(callArgs,status,payload) - } - }) - } - } - catch(ex) - { - onException(ex,asyncMethodCall,suppliedArguments,callArgs) - } - }; - this[OSF.DDA.DispIdHost.Methods.AddEventHandler]=function OSF_DDA_DispIdHost_Facade$AddEventHandler(suppliedArguments, eventDispatch, caller, isPopupWindow) - { - var callArgs; - var eventType, - handler; - function onEnsureRegistration(status) - { - if(status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - { - var added=eventDispatch.addEventHandler(eventType,handler); - if(!added) - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed - } - var error; - if(status !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - error=OSF.DDA.ErrorCodeManager.getErrorArgs(status); - OSF.DDA.issueAsyncResult(callArgs,status,error) - } - try - { - var asyncMethodCall=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id]; - callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); - eventType=callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; - handler=callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; - if(isPopupWindow) - { - onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); - return - } - if(eventDispatch.getEventHandlerCount(eventType)==0) - { - var dispId=dispIdMap[eventType]; - var invoker=getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; - invoker({ - eventType: eventType, - dispId: dispId, - targetId: caller.id || "", - onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) - }, - onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) - }, - onComplete: onEnsureRegistration, - onEvent: function handleEvent(hostArgs) - { - var args=parameterMap.fromHost(dispId,hostArgs); - eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType,caller,args)) - } - }) - } - else - onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - } - catch(ex) - { - onException(ex,asyncMethodCall,suppliedArguments,callArgs) - } - }; - this[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]=function OSF_DDA_DispIdHost_Facade$RemoveEventHandler(suppliedArguments, eventDispatch, caller) - { - var callArgs; - var eventType, - handler; - function onEnsureRegistration(status) - { - var error; - if(status !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - error=OSF.DDA.ErrorCodeManager.getErrorArgs(status); - OSF.DDA.issueAsyncResult(callArgs,status,error) - } - try - { - var asyncMethodCall=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id]; - callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); - eventType=callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; - handler=callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; - var status, - removeSuccess; - if(handler===null) - { - removeSuccess=eventDispatch.clearEventHandlers(eventType); - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess - } - else - { - removeSuccess=eventDispatch.removeEventHandler(eventType,handler); - status=removeSuccess ? OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess : OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist - } - if(removeSuccess && eventDispatch.getEventHandlerCount(eventType)==0) - { - var dispId=dispIdMap[eventType]; - var invoker=getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; - invoker({ - eventType: eventType, - dispId: dispId, - targetId: caller.id || "", - onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) - }, - onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) - }, - onComplete: onEnsureRegistration - }) - } - else - onEnsureRegistration(status) - } - catch(ex) - { - onException(ex,asyncMethodCall,suppliedArguments,callArgs) - } - }; - this[OSF.DDA.DispIdHost.Methods.OpenDialog]=function OSF_DDA_DispIdHost_Facade$OpenDialog(suppliedArguments, eventDispatch, caller) - { - var callArgs; - var targetId; - var dialogMessageEvent=Microsoft.Office.WebExtension.EventType.DialogMessageReceived; - var dialogOtherEvent=Microsoft.Office.WebExtension.EventType.DialogEventReceived; - function onEnsureRegistration(status) - { - var payload; - if(status !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - payload=OSF.DDA.ErrorCodeManager.getErrorArgs(status); - else - { - var onSucceedArgs={}; - onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Id]=targetId; - onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Data]=eventDispatch; - var payload=asyncMethodCall.processResponse(status,onSucceedArgs,caller,callArgs); - OSF.DialogShownStatus.hasDialogShown=true; - eventDispatch.clearEventHandlers(dialogMessageEvent); - eventDispatch.clearEventHandlers(dialogOtherEvent) - } - OSF.DDA.issueAsyncResult(callArgs,status,payload) - } - try - { - if(dialogMessageEvent==undefined || dialogOtherEvent==undefined) - onEnsureRegistration(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported); - if(OSF.DDA.AsyncMethodNames.DisplayDialogAsync==null) - { - onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); - return - } - var asyncMethodCall=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id]; - callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); - var dispId=dispIdMap[dialogMessageEvent]; - var delegateMethods=getDelegateMethods(dialogMessageEvent); - var invoker=delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] !=undefined ? delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] : delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; - targetId=JSON.stringify(callArgs); - if(!OSF.DialogShownStatus.hasDialogShown) - { - eventDispatch.clearQueuedEvent(dialogMessageEvent); - eventDispatch.clearQueuedEvent(dialogOtherEvent); - eventDispatch.clearQueuedEvent(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived) - } - invoker({ - eventType: dialogMessageEvent, - dispId: dispId, - targetId: targetId, - onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) - }, - onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) - }, - onComplete: onEnsureRegistration, - onEvent: function handleEvent(hostArgs) - { - var args=parameterMap.fromHost(dispId,hostArgs); - var event=OSF.DDA.OMFactory.manufactureEventArgs(dialogMessageEvent,caller,args); - if(event.type==dialogOtherEvent) - { - var payload=OSF.DDA.ErrorCodeManager.getErrorArgs(event.error); - var errorArgs={}; - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=payload.name || payload; - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=payload.message || payload; - event.error=new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]) - } - eventDispatch.fireOrQueueEvent(event); - if(args[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogClosed) - { - eventDispatch.clearEventHandlers(dialogMessageEvent); - eventDispatch.clearEventHandlers(dialogOtherEvent); - eventDispatch.clearEventHandlers(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived); - OSF.DialogShownStatus.hasDialogShown=false - } - } - }) - } - catch(ex) - { - onException(ex,asyncMethodCall,suppliedArguments,callArgs) - } - }; - this[OSF.DDA.DispIdHost.Methods.CloseDialog]=function OSF_DDA_DispIdHost_Facade$CloseDialog(suppliedArguments, targetId, eventDispatch, caller) - { - var callArgs; - var dialogMessageEvent, - dialogOtherEvent; - var closeStatus=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; - function closeCallback(status) - { - closeStatus=status; - OSF.DialogShownStatus.hasDialogShown=false - } - try - { - var asyncMethodCall=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id]; - callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); - dialogMessageEvent=Microsoft.Office.WebExtension.EventType.DialogMessageReceived; - dialogOtherEvent=Microsoft.Office.WebExtension.EventType.DialogEventReceived; - eventDispatch.clearEventHandlers(dialogMessageEvent); - eventDispatch.clearEventHandlers(dialogOtherEvent); - var dispId=dispIdMap[dialogMessageEvent]; - var delegateMethods=getDelegateMethods(dialogMessageEvent); - var invoker=delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] !=undefined ? delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] : delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; - invoker({ - eventType: dialogMessageEvent, - dispId: dispId, - targetId: targetId, - onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) - }, - onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) - }, - onComplete: closeCallback - }) - } - catch(ex) - { - onException(ex,asyncMethodCall,suppliedArguments,callArgs) - } - if(closeStatus !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed,OSF.DDA.AsyncMethodNames.CloseAsync.displayName,closeStatus); - }; - this[OSF.DDA.DispIdHost.Methods.MessageParent]=function OSF_DDA_DispIdHost_Facade$MessageParent(suppliedArguments, caller) - { - var stateInfo={}; - var syncMethodCall=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id]; - var callArgs=syncMethodCall.verifyAndExtractCall(suppliedArguments,caller,stateInfo); - var delegate=getDelegateMethods(OSF.DDA.SyncMethodNames.MessageParent.id); - var invoker=delegate[OSF.DDA.DispIdHost.Delegates.MessageParent]; - var dispId=dispIdMap[OSF.DDA.SyncMethodNames.MessageParent.id]; - return invoker({ - dispId: dispId, - hostCallArgs: callArgs, - onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) - }, - onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) - } - }) - }; - this[OSF.DDA.DispIdHost.Methods.SendMessage]=function OSF_DDA_DispIdHost_Facade$SendMessage(suppliedArguments, eventDispatch, caller) - { - var stateInfo={}; - var syncMethodCall=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.SendMessage.id]; - var callArgs=syncMethodCall.verifyAndExtractCall(suppliedArguments,caller,stateInfo); - var delegate=getDelegateMethods(OSF.DDA.SyncMethodNames.SendMessage.id); - var invoker=delegate[OSF.DDA.DispIdHost.Delegates.SendMessage]; - var dispId=dispIdMap[OSF.DDA.SyncMethodNames.SendMessage.id]; - return invoker({ - dispId: dispId, - hostCallArgs: callArgs, - onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) - }, - onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) - } - }) - } + var dispIdMap = {}; + var jsom = OSF.DDA.AsyncMethodNames; + var did = OSF.DDA.MethodDispId; + var methodMap = { + GoToByIdAsync: did.dispidNavigateToMethod, + GetSelectedDataAsync: did.dispidGetSelectedDataMethod, + SetSelectedDataAsync: did.dispidSetSelectedDataMethod, + GetDocumentCopyChunkAsync: did.dispidGetDocumentCopyChunkMethod, + ReleaseDocumentCopyAsync: did.dispidReleaseDocumentCopyMethod, + GetDocumentCopyAsync: did.dispidGetDocumentCopyMethod, + AddFromSelectionAsync: did.dispidAddBindingFromSelectionMethod, + AddFromPromptAsync: did.dispidAddBindingFromPromptMethod, + AddFromNamedItemAsync: did.dispidAddBindingFromNamedItemMethod, + GetAllAsync: did.dispidGetAllBindingsMethod, + GetByIdAsync: did.dispidGetBindingMethod, + ReleaseByIdAsync: did.dispidReleaseBindingMethod, + GetDataAsync: did.dispidGetBindingDataMethod, + SetDataAsync: did.dispidSetBindingDataMethod, + AddRowsAsync: did.dispidAddRowsMethod, + AddColumnsAsync: did.dispidAddColumnsMethod, + DeleteAllDataValuesAsync: did.dispidClearAllRowsMethod, + RefreshAsync: did.dispidLoadSettingsMethod, + SaveAsync: did.dispidSaveSettingsMethod, + GetActiveViewAsync: did.dispidGetActiveViewMethod, + GetFilePropertiesAsync: did.dispidGetFilePropertiesMethod, + GetOfficeThemeAsync: did.dispidGetOfficeThemeMethod, + GetDocumentThemeAsync: did.dispidGetDocumentThemeMethod, + ClearFormatsAsync: did.dispidClearFormatsMethod, + SetTableOptionsAsync: did.dispidSetTableOptionsMethod, + SetFormatsAsync: did.dispidSetFormatsMethod, + GetAccessTokenAsync: did.dispidGetAccessTokenMethod, + ExecuteRichApiRequestAsync: did.dispidExecuteRichApiRequestMethod, + AppCommandInvocationCompletedAsync: did.dispidAppCommandInvocationCompletedMethod, + CloseContainerAsync: did.dispidCloseContainerMethod, + OpenBrowserWindow: did.dispidOpenBrowserWindow, + AddDataPartAsync: did.dispidAddDataPartMethod, + GetDataPartByIdAsync: did.dispidGetDataPartByIdMethod, + GetDataPartsByNameSpaceAsync: did.dispidGetDataPartsByNamespaceMethod, + GetPartXmlAsync: did.dispidGetDataPartXmlMethod, + GetPartNodesAsync: did.dispidGetDataPartNodesMethod, + DeleteDataPartAsync: did.dispidDeleteDataPartMethod, + GetNodeValueAsync: did.dispidGetDataNodeValueMethod, + GetNodeXmlAsync: did.dispidGetDataNodeXmlMethod, + GetRelativeNodesAsync: did.dispidGetDataNodesMethod, + SetNodeValueAsync: did.dispidSetDataNodeValueMethod, + SetNodeXmlAsync: did.dispidSetDataNodeXmlMethod, + AddDataPartNamespaceAsync: did.dispidAddDataNamespaceMethod, + GetDataPartNamespaceAsync: did.dispidGetDataUriByPrefixMethod, + GetDataPartPrefixAsync: did.dispidGetDataPrefixByUriMethod, + GetNodeTextAsync: did.dispidGetDataNodeTextMethod, + SetNodeTextAsync: did.dispidSetDataNodeTextMethod, + GetSelectedTask: did.dispidGetSelectedTaskMethod, + GetTask: did.dispidGetTaskMethod, + GetWSSUrl: did.dispidGetWSSUrlMethod, + GetTaskField: did.dispidGetTaskFieldMethod, + GetSelectedResource: did.dispidGetSelectedResourceMethod, + GetResourceField: did.dispidGetResourceFieldMethod, + GetProjectField: did.dispidGetProjectFieldMethod, + GetSelectedView: did.dispidGetSelectedViewMethod, + GetTaskByIndex: did.dispidGetTaskByIndexMethod, + GetResourceByIndex: did.dispidGetResourceByIndexMethod, + SetTaskField: did.dispidSetTaskFieldMethod, + SetResourceField: did.dispidSetResourceFieldMethod, + GetMaxTaskIndex: did.dispidGetMaxTaskIndexMethod, + GetMaxResourceIndex: did.dispidGetMaxResourceIndexMethod, + CreateTask: did.dispidCreateTaskMethod + }; + for(var method in methodMap) + if(jsom[method]) + dispIdMap[jsom[method].id] = methodMap[method]; + jsom = OSF.DDA.SyncMethodNames; + did = OSF.DDA.MethodDispId; + var syncMethodMap = { + MessageParent: did.dispidMessageParentMethod, + SendMessage: did.dispidSendMessageMethod + }; + for(var method in syncMethodMap) + if(jsom[method]) + dispIdMap[jsom[method].id] = syncMethodMap[method]; + jsom = Microsoft.Office.WebExtension.EventType; + did = OSF.DDA.EventDispId; + var eventMap = { + SettingsChanged: did.dispidSettingsChangedEvent, + DocumentSelectionChanged: did.dispidDocumentSelectionChangedEvent, + BindingSelectionChanged: did.dispidBindingSelectionChangedEvent, + BindingDataChanged: did.dispidBindingDataChangedEvent, + ActiveViewChanged: did.dispidActiveViewChangedEvent, + OfficeThemeChanged: did.dispidOfficeThemeChangedEvent, + DocumentThemeChanged: did.dispidDocumentThemeChangedEvent, + AppCommandInvoked: did.dispidAppCommandInvokedEvent, + DialogMessageReceived: did.dispidDialogMessageReceivedEvent, + DialogParentMessageReceived: did.dispidDialogParentMessageReceivedEvent, + ObjectDeleted: did.dispidObjectDeletedEvent, + ObjectSelectionChanged: did.dispidObjectSelectionChangedEvent, + ObjectDataChanged: did.dispidObjectDataChangedEvent, + ContentControlAdded: did.dispidContentControlAddedEvent, + RichApiMessage: did.dispidRichApiMessageEvent, + ItemChanged: did.dispidOlkItemSelectedChangedEvent, + RecipientsChanged: did.dispidOlkRecipientsChangedEvent, + AppointmentTimeChanged: did.dispidOlkAppointmentTimeChangedEvent, + TaskSelectionChanged: did.dispidTaskSelectionChangedEvent, + ResourceSelectionChanged: did.dispidResourceSelectionChangedEvent, + ViewSelectionChanged: did.dispidViewSelectionChangedEvent, + DataNodeInserted: did.dispidDataNodeAddedEvent, + DataNodeReplaced: did.dispidDataNodeReplacedEvent, + DataNodeDeleted: did.dispidDataNodeDeletedEvent + }; + for(var event in eventMap) + if(jsom[event]) + dispIdMap[jsom[event]] = eventMap[event]; + function IsObjectEvent(dispId) + { + return dispId == OSF.DDA.EventDispId.dispidObjectDeletedEvent || dispId == OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent || dispId == OSF.DDA.EventDispId.dispidObjectDataChangedEvent || dispId == OSF.DDA.EventDispId.dispidContentControlAddedEvent + } + function onException(ex, asyncMethodCall, suppliedArgs, callArgs) + { + if(typeof ex == "number") + { + if(!callArgs) + callArgs = asyncMethodCall.getCallArgs(suppliedArgs); + OSF.DDA.issueAsyncResult(callArgs,ex,OSF.DDA.ErrorCodeManager.getErrorArgs(ex)) + } + else + throw ex; + } + this[OSF.DDA.DispIdHost.Methods.InvokeMethod] = function OSF_DDA_DispIdHost_Facade$InvokeMethod(method, suppliedArguments, caller, privateState) + { + var callArgs; + try + { + var methodName = method.id; + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[methodName]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,privateState); + var dispId = dispIdMap[methodName]; + var delegate = getDelegateMethods(methodName); + var richApiInExcelMethodSubstitution = null; + if(window.Excel && window.Office.context.requirements.isSetSupported("RedirectV1Api")) + window.Excel._RedirectV1APIs = true; + if(window.Excel && window.Excel._RedirectV1APIs && (richApiInExcelMethodSubstitution = window.Excel._V1APIMap[methodName])) + { + var preprocessedCallArgs = OSF.OUtil.shallowCopy(callArgs); + delete preprocessedCallArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; + if(richApiInExcelMethodSubstitution.preprocess) + preprocessedCallArgs = richApiInExcelMethodSubstitution.preprocess(preprocessedCallArgs); + var ctx = new window.Excel.RequestContext; + var result = richApiInExcelMethodSubstitution.call(ctx,preprocessedCallArgs); + ctx.sync().then(function() + { + var response = result.value; + var status = response.status; + delete response["status"]; + delete response["@odata.type"]; + if(richApiInExcelMethodSubstitution.postprocess) + response = richApiInExcelMethodSubstitution.postprocess(response,preprocessedCallArgs); + if(status != 0) + response = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + OSF.DDA.issueAsyncResult(callArgs,status,response) + })["catch"](function(error) + { + OSF.DDA.issueAsyncResult(callArgs,OSF.DDA.ErrorCodeManager.errorCodes.ooeFailure,null) + }) + } + else + { + var hostCallArgs; + if(parameterMap.toHost) + hostCallArgs = parameterMap.toHost(dispId,callArgs); + else + hostCallArgs = callArgs; + var startTime = (new Date).getTime(); + delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ + dispId: dispId, + hostCallArgs: hostCallArgs, + onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling(){}, + onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving(){}, + onComplete: function(status, hostResponseArgs) + { + var responseArgs; + if(status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + if(parameterMap.fromHost) + responseArgs = parameterMap.fromHost(dispId,hostResponseArgs); + else + responseArgs = hostResponseArgs; + else + responseArgs = hostResponseArgs; + var payload = asyncMethodCall.processResponse(status,responseArgs,caller,callArgs); + OSF.DDA.issueAsyncResult(callArgs,status,payload); + if(OSF.AppTelemetry) + OSF.AppTelemetry.onMethodDone(dispId,hostCallArgs,Math.abs((new Date).getTime() - startTime),status) + } + }) + } + } + catch(ex) + { + onException(ex,asyncMethodCall,suppliedArguments,callArgs) + } + }; + this[OSF.DDA.DispIdHost.Methods.AddEventHandler] = function OSF_DDA_DispIdHost_Facade$AddEventHandler(suppliedArguments, eventDispatch, caller, isPopupWindow) + { + var callArgs; + var eventType, + handler; + var isObjectEvent = false; + function onEnsureRegistration(status) + { + if(status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + { + var added = !isObjectEvent ? eventDispatch.addEventHandler(eventType,handler) : eventDispatch.addObjectEventHandler(eventType,callArgs[Microsoft.Office.WebExtension.Parameters.Id],handler); + if(!added) + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed + } + var error; + if(status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + error = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + OSF.DDA.issueAsyncResult(callArgs,status,error) + } + try + { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); + eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + if(isPopupWindow) + { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + return + } + var dispId = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId); + var targetId = isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : caller.id || ""; + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType,targetId) : eventDispatch.getEventHandlerCount(eventType); + if(count == 0) + { + var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; + invoker({ + eventType: eventType, + dispId: dispId, + targetId: targetId, + onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) + }, + onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) + }, + onComplete: onEnsureRegistration, + onEvent: function handleEvent(hostArgs) + { + var args = parameterMap.fromHost(dispId,hostArgs); + if(!isObjectEvent) + eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType,caller,args)); + else + eventDispatch.fireObjectEvent(targetId,OSF.DDA.OMFactory.manufactureEventArgs(eventType,targetId,args)) + } + }) + } + else + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + } + catch(ex) + { + onException(ex,asyncMethodCall,suppliedArguments,callArgs) + } + }; + this[OSF.DDA.DispIdHost.Methods.RemoveEventHandler] = function OSF_DDA_DispIdHost_Facade$RemoveEventHandler(suppliedArguments, eventDispatch, caller) + { + var callArgs; + var eventType, + handler; + var isObjectEvent = false; + function onEnsureRegistration(status) + { + var error; + if(status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + error = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + OSF.DDA.issueAsyncResult(callArgs,status,error) + } + try + { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); + eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + var dispId = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId); + var targetId = isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : caller.id || ""; + var status, + removeSuccess; + if(handler === null) + { + removeSuccess = isObjectEvent ? eventDispatch.clearObjectEventHandlers(eventType,targetId) : eventDispatch.clearEventHandlers(eventType); + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess + } + else + { + removeSuccess = isObjectEvent ? eventDispatch.removeObjectEventHandler(eventType,targetId,handler) : eventDispatch.removeEventHandler(eventType,handler); + status = removeSuccess ? OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess : OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist + } + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType,targetId) : eventDispatch.getEventHandlerCount(eventType); + if(removeSuccess && count == 0) + { + var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; + invoker({ + eventType: eventType, + dispId: dispId, + targetId: targetId, + onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) + }, + onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) + }, + onComplete: onEnsureRegistration + }) + } + else + onEnsureRegistration(status) + } + catch(ex) + { + onException(ex,asyncMethodCall,suppliedArguments,callArgs) + } + }; + this[OSF.DDA.DispIdHost.Methods.OpenDialog] = function OSF_DDA_DispIdHost_Facade$OpenDialog(suppliedArguments, eventDispatch, caller) + { + var callArgs; + var targetId; + var dialogMessageEvent = Microsoft.Office.WebExtension.EventType.DialogMessageReceived; + var dialogOtherEvent = Microsoft.Office.WebExtension.EventType.DialogEventReceived; + function onEnsureRegistration(status) + { + var payload; + if(status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + payload = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + else + { + var onSucceedArgs = {}; + onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Id] = targetId; + onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Data] = eventDispatch; + var payload = asyncMethodCall.processResponse(status,onSucceedArgs,caller,callArgs); + OSF.DialogShownStatus.hasDialogShown = true; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent) + } + OSF.DDA.issueAsyncResult(callArgs,status,payload) + } + try + { + if(dialogMessageEvent == undefined || dialogOtherEvent == undefined) + onEnsureRegistration(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported); + if(OSF.DDA.AsyncMethodNames.DisplayDialogAsync == null) + { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + return + } + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); + var dispId = dispIdMap[dialogMessageEvent]; + var delegateMethods = getDelegateMethods(dialogMessageEvent); + var invoker = delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] != undefined ? delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] : delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; + targetId = JSON.stringify(callArgs); + if(!OSF.DialogShownStatus.hasDialogShown) + { + eventDispatch.clearQueuedEvent(dialogMessageEvent); + eventDispatch.clearQueuedEvent(dialogOtherEvent); + eventDispatch.clearQueuedEvent(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived) + } + invoker({ + eventType: dialogMessageEvent, + dispId: dispId, + targetId: targetId, + onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) + }, + onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) + }, + onComplete: onEnsureRegistration, + onEvent: function handleEvent(hostArgs) + { + var args = parameterMap.fromHost(dispId,hostArgs); + var event = OSF.DDA.OMFactory.manufactureEventArgs(dialogMessageEvent,caller,args); + if(event.type == dialogOtherEvent) + { + var payload = OSF.DDA.ErrorCodeManager.getErrorArgs(event.error); + var errorArgs = {}; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code] = status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name] = payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message] = payload.message || payload; + event.error = new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]) + } + eventDispatch.fireOrQueueEvent(event); + if(args[OSF.DDA.PropertyDescriptors.MessageType] == OSF.DialogMessageType.DialogClosed) + { + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + eventDispatch.clearEventHandlers(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived); + OSF.DialogShownStatus.hasDialogShown = false + } + } + }) + } + catch(ex) + { + onException(ex,asyncMethodCall,suppliedArguments,callArgs) + } + }; + this[OSF.DDA.DispIdHost.Methods.CloseDialog] = function OSF_DDA_DispIdHost_Facade$CloseDialog(suppliedArguments, targetId, eventDispatch, caller) + { + var callArgs; + var dialogMessageEvent, + dialogOtherEvent; + var closeStatus = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; + function closeCallback(status) + { + closeStatus = status; + OSF.DialogShownStatus.hasDialogShown = false + } + try + { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); + dialogMessageEvent = Microsoft.Office.WebExtension.EventType.DialogMessageReceived; + dialogOtherEvent = Microsoft.Office.WebExtension.EventType.DialogEventReceived; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + var dispId = dispIdMap[dialogMessageEvent]; + var delegateMethods = getDelegateMethods(dialogMessageEvent); + var invoker = delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] != undefined ? delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] : delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; + invoker({ + eventType: dialogMessageEvent, + dispId: dispId, + targetId: targetId, + onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) + }, + onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) + }, + onComplete: closeCallback + }) + } + catch(ex) + { + onException(ex,asyncMethodCall,suppliedArguments,callArgs) + } + if(closeStatus != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed,OSF.DDA.AsyncMethodNames.CloseAsync.displayName,closeStatus); + }; + this[OSF.DDA.DispIdHost.Methods.MessageParent] = function OSF_DDA_DispIdHost_Facade$MessageParent(suppliedArguments, caller) + { + var stateInfo = {}; + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(suppliedArguments,caller,stateInfo); + var delegate = getDelegateMethods(OSF.DDA.SyncMethodNames.MessageParent.id); + var invoker = delegate[OSF.DDA.DispIdHost.Delegates.MessageParent]; + var dispId = dispIdMap[OSF.DDA.SyncMethodNames.MessageParent.id]; + return invoker({ + dispId: dispId, + hostCallArgs: callArgs, + onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) + }, + onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) + } + }) + }; + this[OSF.DDA.DispIdHost.Methods.SendMessage] = function OSF_DDA_DispIdHost_Facade$SendMessage(suppliedArguments, eventDispatch, caller) + { + var stateInfo = {}; + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.SendMessage.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(suppliedArguments,caller,stateInfo); + var delegate = getDelegateMethods(OSF.DDA.SyncMethodNames.SendMessage.id); + var invoker = delegate[OSF.DDA.DispIdHost.Delegates.SendMessage]; + var dispId = dispIdMap[OSF.DDA.SyncMethodNames.SendMessage.id]; + return invoker({ + dispId: dispId, + hostCallArgs: callArgs, + onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) + }, + onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) + } + }) + } }; -OSF.DDA.DispIdHost.addAsyncMethods=function OSF_DDA_DispIdHost$AddAsyncMethods(target, asyncMethodNames, privateState) +OSF.DDA.DispIdHost.addAsyncMethods = function OSF_DDA_DispIdHost$AddAsyncMethods(target, asyncMethodNames, privateState) { - for(var entry in asyncMethodNames) - { - var method=asyncMethodNames[entry]; - var name=method.displayName; - if(!target[name]) - OSF.OUtil.defineEnumerableProperty(target,name,{value: function(asyncMethod) - { - return function() - { - var invokeMethod=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod]; - invokeMethod(asyncMethod,arguments,target,privateState) - } - }(method)}) - } + for(var entry in asyncMethodNames) + { + var method = asyncMethodNames[entry]; + var name = method.displayName; + if(!target[name]) + OSF.OUtil.defineEnumerableProperty(target,name,{value: function(asyncMethod) + { + return function() + { + var invokeMethod = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod]; + invokeMethod(asyncMethod,arguments,target,privateState) + } + }(method)}) + } }; -OSF.DDA.DispIdHost.addEventSupport=function OSF_DDA_DispIdHost$AddEventSupport(target, eventDispatch, isPopupWindow) +OSF.DDA.DispIdHost.addEventSupport = function OSF_DDA_DispIdHost$AddEventSupport(target, eventDispatch, isPopupWindow) { - var add=OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName; - var remove=OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName; - if(!target[add]) - OSF.OUtil.defineEnumerableProperty(target,add,{value: function() - { - var addEventHandler=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler]; - addEventHandler(arguments,eventDispatch,target,isPopupWindow) - }}); - if(!target[remove]) - OSF.OUtil.defineEnumerableProperty(target,remove,{value: function() - { - var removeEventHandler=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]; - removeEventHandler(arguments,eventDispatch,target) - }}) + var add = OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName; + var remove = OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName; + if(!target[add]) + OSF.OUtil.defineEnumerableProperty(target,add,{value: function() + { + var addEventHandler = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler]; + addEventHandler(arguments,eventDispatch,target,isPopupWindow) + }}); + if(!target[remove]) + OSF.OUtil.defineEnumerableProperty(target,remove,{value: function() + { + var removeEventHandler = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]; + removeEventHandler(arguments,eventDispatch,target) + }}) }; OSF.OUtil.setNamespace("SafeArray",OSF.DDA); -OSF.DDA.SafeArray.Response={ - Status: 0, - Payload: 1 +OSF.DDA.SafeArray.Response = { + Status: 0, + Payload: 1 }; -OSF.DDA.SafeArray.UniqueArguments={ - Offset: "offset", - Run: "run", - BindingSpecificData: "bindingSpecificData", - MergedCellGuid: "{66e7831f-81b2-42e2-823c-89e872d541b3}" +OSF.DDA.SafeArray.UniqueArguments = { + Offset: "offset", + Run: "run", + BindingSpecificData: "bindingSpecificData", + MergedCellGuid: "{66e7831f-81b2-42e2-823c-89e872d541b3}" }; OSF.OUtil.setNamespace("Delegate",OSF.DDA.SafeArray); -OSF.DDA.SafeArray.Delegate._onException=function OSF_DDA_SafeArray_Delegate$OnException(ex, args) +OSF.DDA.SafeArray.Delegate._onException = function OSF_DDA_SafeArray_Delegate$OnException(ex, args) { - var status; - var statusNumber=ex.number; - if(statusNumber) - switch(statusNumber) - { - case-2146828218: - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; - break; - case-2147467259: - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened; - break; - case-2146828283: - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam; - break; - case-2147209089: - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam; - break; - case-2146827850: - default: - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; - break - } - if(args.onComplete) - args.onComplete(status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError) + var status; + var statusNumber = ex.number; + if(statusNumber) + switch(statusNumber) + { + case-2146828218: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; + break; + case-2147467259: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened; + break; + case-2146828283: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam; + break; + case-2147209089: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam; + break; + case-2146827850: + default: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + break + } + if(args.onComplete) + args.onComplete(status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError) }; -OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod=function OSF_DDA_SafeArray_Delegate$OnExceptionSyncMethod(ex, args) +OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod = function OSF_DDA_SafeArray_Delegate$OnExceptionSyncMethod(ex, args) { - var status; - var number=ex.number; - if(number) - switch(number) - { - case-2146828218: - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; - break; - case-2146827850: - default: - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; - break - } - return status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError + var status; + var number = ex.number; + if(number) + switch(number) + { + case-2146828218: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; + break; + case-2146827850: + default: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + break + } + return status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError }; -OSF.DDA.SafeArray.Delegate.SpecialProcessor=function OSF_DDA_SafeArray_Delegate_SpecialProcessor() +OSF.DDA.SafeArray.Delegate.SpecialProcessor = function OSF_DDA_SafeArray_Delegate_SpecialProcessor() { - function _2DVBArrayToJaggedArray(vbArr) - { - var ret; - try - { - var rows=vbArr.ubound(1); - var cols=vbArr.ubound(2); - vbArr=vbArr.toArray(); - if(rows==1 && cols==1) - ret=[vbArr]; - else - { - ret=[]; - for(var row=0; row < rows; row++) - { - var rowArr=[]; - for(var col=0; col < cols; col++) - { - var datum=vbArr[row * cols+col]; - if(datum !=OSF.DDA.SafeArray.UniqueArguments.MergedCellGuid) - rowArr.push(datum) - } - if(rowArr.length > 0) - ret.push(rowArr) - } - } - } - catch(ex){} - return ret - } - var complexTypes=[]; - var dynamicTypes={}; - dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]=function() - { - var tableRows=0; - var tableHeaders=1; - return{ - toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$toHost(data) - { - if(OSF.DDA.TableDataProperties && typeof data !="string" && data[OSF.DDA.TableDataProperties.TableRows] !==undefined) - { - var tableData=[]; - tableData[tableRows]=data[OSF.DDA.TableDataProperties.TableRows]; - tableData[tableHeaders]=data[OSF.DDA.TableDataProperties.TableHeaders]; - data=tableData - } - return data - }, - fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$fromHost(hostArgs) - { - var ret; - if(hostArgs.toArray) - { - var dimensions=hostArgs.dimensions(); - if(dimensions===2) - ret=_2DVBArrayToJaggedArray(hostArgs); - else - { - var array=hostArgs.toArray(); - if(array.length===2 && (array[0] !=null && array[0].toArray || array[1] !=null && array[1].toArray)) - { - ret={}; - ret[OSF.DDA.TableDataProperties.TableRows]=_2DVBArrayToJaggedArray(array[tableRows]); - ret[OSF.DDA.TableDataProperties.TableHeaders]=_2DVBArrayToJaggedArray(array[tableHeaders]) - } - else - ret=array - } - } - else - ret=hostArgs; - return ret - } - } - }(); - OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,complexTypes,dynamicTypes); - this.unpack=function OSF_DDA_SafeArray_Delegate_SpecialProcessor$unpack(param, arg) - { - var value; - if(this.isComplexType(param) || OSF.DDA.ListType.isListType(param)) - { - var toArraySupported=(arg || typeof arg==="unknown") && arg.toArray; - value=toArraySupported ? arg.toArray() : arg || {} - } - else if(this.isDynamicType(param)) - value=dynamicTypes[param].fromHost(arg); - else - value=arg; - return value - } + function _2DVBArrayToJaggedArray(vbArr) + { + var ret; + try + { + var rows = vbArr.ubound(1); + var cols = vbArr.ubound(2); + vbArr = vbArr.toArray(); + if(rows == 1 && cols == 1) + ret = [vbArr]; + else + { + ret = []; + for(var row = 0; row < rows; row++) + { + var rowArr = []; + for(var col = 0; col < cols; col++) + { + var datum = vbArr[row * cols + col]; + if(datum != OSF.DDA.SafeArray.UniqueArguments.MergedCellGuid) + rowArr.push(datum) + } + if(rowArr.length > 0) + ret.push(rowArr) + } + } + } + catch(ex){} + return ret + } + var complexTypes = []; + var dynamicTypes = {}; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data] = function() + { + var tableRows = 0; + var tableHeaders = 1; + return{ + toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$toHost(data) + { + if(OSF.DDA.TableDataProperties && typeof data != "string" && data[OSF.DDA.TableDataProperties.TableRows] !== undefined) + { + var tableData = []; + tableData[tableRows] = data[OSF.DDA.TableDataProperties.TableRows]; + tableData[tableHeaders] = data[OSF.DDA.TableDataProperties.TableHeaders]; + data = tableData + } + return data + }, + fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$fromHost(hostArgs) + { + var ret; + if(hostArgs.toArray) + { + var dimensions = hostArgs.dimensions(); + if(dimensions === 2) + ret = _2DVBArrayToJaggedArray(hostArgs); + else + { + var array = hostArgs.toArray(); + if(array.length === 2 && (array[0] != null && array[0].toArray || array[1] != null && array[1].toArray)) + { + ret = {}; + ret[OSF.DDA.TableDataProperties.TableRows] = _2DVBArrayToJaggedArray(array[tableRows]); + ret[OSF.DDA.TableDataProperties.TableHeaders] = _2DVBArrayToJaggedArray(array[tableHeaders]) + } + else + ret = array + } + } + else + ret = hostArgs; + return ret + } + } + }(); + OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,complexTypes,dynamicTypes); + this.unpack = function OSF_DDA_SafeArray_Delegate_SpecialProcessor$unpack(param, arg) + { + var value; + if(this.isComplexType(param) || OSF.DDA.ListType.isListType(param)) + { + var toArraySupported = (arg || typeof arg === "unknown") && arg.toArray; + value = toArraySupported ? arg.toArray() : arg || {} + } + else if(this.isDynamicType(param)) + value = dynamicTypes[param].fromHost(arg); + else + value = arg; + return value + } }; OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor); -OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{ - type: Microsoft.Office.WebExtension.Parameters.ValueFormat, - toHost: [{ - name: Microsoft.Office.WebExtension.ValueFormat.Unformatted, - value: 0 - },{ - name: Microsoft.Office.WebExtension.ValueFormat.Formatted, - value: 1 - }] - },{ - type: Microsoft.Office.WebExtension.Parameters.FilterType, - toHost: [{ - name: Microsoft.Office.WebExtension.FilterType.All, - value: 0 - }] - }]); +OSF.DDA.SafeArray.Delegate.ParameterMap = OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{ + type: Microsoft.Office.WebExtension.Parameters.ValueFormat, + toHost: [{ + name: Microsoft.Office.WebExtension.ValueFormat.Unformatted, + value: 0 + },{ + name: Microsoft.Office.WebExtension.ValueFormat.Formatted, + value: 1 + }] + },{ + type: Microsoft.Office.WebExtension.Parameters.FilterType, + toHost: [{ + name: Microsoft.Office.WebExtension.FilterType.All, + value: 0 + }] + }]); OSF.DDA.SafeArray.Delegate.ParameterMap.define({ - type: OSF.DDA.PropertyDescriptors.AsyncResultStatus, - fromHost: [{ - name: Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded, - value: 0 - },{ - name: Microsoft.Office.WebExtension.AsyncResultStatus.Failed, - value: 1 - }] + type: OSF.DDA.PropertyDescriptors.AsyncResultStatus, + fromHost: [{ + name: Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded, + value: 0 + },{ + name: Microsoft.Office.WebExtension.AsyncResultStatus.Failed, + value: 1 + }] }); -OSF.DDA.SafeArray.Delegate.executeAsync=function OSF_DDA_SafeArray_Delegate$ExecuteAsync(args) +OSF.DDA.SafeArray.Delegate.executeAsync = function OSF_DDA_SafeArray_Delegate$ExecuteAsync(args) { - function toArray(args) - { - var arrArgs=args; - if(OSF.OUtil.isArray(args)) - { - var len=arrArgs.length; - for(var i=0; i < len; i++) - arrArgs[i]=toArray(arrArgs[i]) - } - else if(OSF.OUtil.isDate(args)) - arrArgs=args.getVarDate(); - else if(typeof args==="object" && !OSF.OUtil.isArray(args)) - { - arrArgs=[]; - for(var index in args) - if(!OSF.OUtil.isFunction(args[index])) - arrArgs[index]=toArray(args[index]) - } - return arrArgs - } - function fromSafeArray(value) - { - var ret=value; - if(value !=null && value.toArray) - { - var arrayResult=value.toArray(); - ret=new Array(arrayResult.length); - for(var i=0; i < arrayResult.length; i++) - ret[i]=fromSafeArray(arrayResult[i]) - } - return ret - } - try - { - if(args.onCalling) - args.onCalling(); - var startTime=(new Date).getTime(); - OSF.ClientHostController.execute(args.dispId,toArray(args.hostCallArgs),function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode) - { - var result=hostResponseArgs.toArray(); - var status=result[OSF.DDA.SafeArray.Response.Status]; - if(status==OSF.DDA.ErrorCodeManager.errorCodes.ooeChunkResult) - { - var payload=result[OSF.DDA.SafeArray.Response.Payload]; - payload=fromSafeArray(payload); - if(payload !=null) - { - if(!args._chunkResultData) - args._chunkResultData=new Array; - args._chunkResultData[payload[0]]=payload[1] - } - return false - } - if(args.onReceiving) - args.onReceiving(); - if(args.onComplete) - { - var payload; - if(status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - { - if(result.length > 2) - { - payload=[]; - for(var i=1; i < result.length; i++) - payload[i - 1]=result[i] - } - else - payload=result[OSF.DDA.SafeArray.Response.Payload]; - if(args._chunkResultData) - { - payload=fromSafeArray(payload); - if(payload !=null) - { - var expectedChunkCount=payload[payload.length - 1]; - if(args._chunkResultData.length==expectedChunkCount) - payload[payload.length - 1]=args._chunkResultData; - else - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError - } - } - } - else - payload=result[OSF.DDA.SafeArray.Response.Payload]; - args.onComplete(status,payload) - } - if(OSF.AppTelemetry) - OSF.AppTelemetry.onMethodDone(args.dispId,args.hostCallArgs,Math.abs((new Date).getTime() - startTime),status); - return true - }) - } - catch(ex) - { - OSF.DDA.SafeArray.Delegate._onException(ex,args) - } + function toArray(args) + { + var arrArgs = args; + if(OSF.OUtil.isArray(args)) + { + var len = arrArgs.length; + for(var i = 0; i < len; i++) + arrArgs[i] = toArray(arrArgs[i]) + } + else if(OSF.OUtil.isDate(args)) + arrArgs = args.getVarDate(); + else if(typeof args === "object" && !OSF.OUtil.isArray(args)) + { + arrArgs = []; + for(var index in args) + if(!OSF.OUtil.isFunction(args[index])) + arrArgs[index] = toArray(args[index]) + } + return arrArgs + } + function fromSafeArray(value) + { + var ret = value; + if(value != null && value.toArray) + { + var arrayResult = value.toArray(); + ret = new Array(arrayResult.length); + for(var i = 0; i < arrayResult.length; i++) + ret[i] = fromSafeArray(arrayResult[i]) + } + return ret + } + try + { + if(args.onCalling) + args.onCalling(); + OSF.ClientHostController.execute(args.dispId,toArray(args.hostCallArgs),function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode) + { + var result = hostResponseArgs.toArray(); + var status = result[OSF.DDA.SafeArray.Response.Status]; + if(status == OSF.DDA.ErrorCodeManager.errorCodes.ooeChunkResult) + { + var payload = result[OSF.DDA.SafeArray.Response.Payload]; + payload = fromSafeArray(payload); + if(payload != null) + { + if(!args._chunkResultData) + args._chunkResultData = new Array; + args._chunkResultData[payload[0]] = payload[1] + } + return false + } + if(args.onReceiving) + args.onReceiving(); + if(args.onComplete) + { + var payload; + if(status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + { + if(result.length > 2) + { + payload = []; + for(var i = 1; i < result.length; i++) + payload[i - 1] = result[i] + } + else + payload = result[OSF.DDA.SafeArray.Response.Payload]; + if(args._chunkResultData) + { + payload = fromSafeArray(payload); + if(payload != null) + { + var expectedChunkCount = payload[payload.length - 1]; + if(args._chunkResultData.length == expectedChunkCount) + payload[payload.length - 1] = args._chunkResultData; + else + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError + } + } + } + else + payload = result[OSF.DDA.SafeArray.Response.Payload]; + args.onComplete(status,payload) + } + return true + }) + } + catch(ex) + { + OSF.DDA.SafeArray.Delegate._onException(ex,args) + } }; -OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent=function OSF_DDA_SafeArrayDelegate$GetOnAfterRegisterEvent(register, args) +OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent = function OSF_DDA_SafeArrayDelegate$GetOnAfterRegisterEvent(register, args) { - var startTime=(new Date).getTime(); - return function OSF_DDA_SafeArrayDelegate$OnAfterRegisterEvent(hostResponseArgs) - { - if(args.onReceiving) - args.onReceiving(); - var status=hostResponseArgs.toArray ? hostResponseArgs.toArray()[OSF.DDA.SafeArray.Response.Status] : hostResponseArgs; - if(args.onComplete) - args.onComplete(status); - if(OSF.AppTelemetry) - OSF.AppTelemetry.onRegisterDone(register,args.dispId,Math.abs((new Date).getTime() - startTime),status) - } + var startTime = (new Date).getTime(); + return function OSF_DDA_SafeArrayDelegate$OnAfterRegisterEvent(hostResponseArgs) + { + if(args.onReceiving) + args.onReceiving(); + var status = hostResponseArgs.toArray ? hostResponseArgs.toArray()[OSF.DDA.SafeArray.Response.Status] : hostResponseArgs; + if(args.onComplete) + args.onComplete(status); + if(OSF.AppTelemetry) + OSF.AppTelemetry.onRegisterDone(register,args.dispId,Math.abs((new Date).getTime() - startTime),status) + } }; -OSF.DDA.SafeArray.Delegate.registerEventAsync=function OSF_DDA_SafeArray_Delegate$RegisterEventAsync(args) +OSF.DDA.SafeArray.Delegate.registerEventAsync = function OSF_DDA_SafeArray_Delegate$RegisterEventAsync(args) { - if(args.onCalling) - args.onCalling(); - var callback=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true,args); - try - { - OSF.ClientHostController.registerEvent(args.dispId,args.targetId,function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) - { - if(args.onEvent) - args.onEvent(payload); - if(OSF.AppTelemetry) - OSF.AppTelemetry.onEventDone(args.dispId) - },callback) - } - catch(ex) - { - OSF.DDA.SafeArray.Delegate._onException(ex,args) - } + if(args.onCalling) + args.onCalling(); + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true,args); + try + { + OSF.ClientHostController.registerEvent(args.dispId,args.targetId,function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) + { + if(args.onEvent) + args.onEvent(payload); + if(OSF.AppTelemetry) + OSF.AppTelemetry.onEventDone(args.dispId) + },callback) + } + catch(ex) + { + OSF.DDA.SafeArray.Delegate._onException(ex,args) + } }; -OSF.DDA.SafeArray.Delegate.unregisterEventAsync=function OSF_DDA_SafeArray_Delegate$UnregisterEventAsync(args) +OSF.DDA.SafeArray.Delegate.unregisterEventAsync = function OSF_DDA_SafeArray_Delegate$UnregisterEventAsync(args) { - if(args.onCalling) - args.onCalling(); - var callback=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false,args); - try - { - OSF.ClientHostController.unregisterEvent(args.dispId,args.targetId,callback) - } - catch(ex) - { - OSF.DDA.SafeArray.Delegate._onException(ex,args) - } + if(args.onCalling) + args.onCalling(); + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false,args); + try + { + OSF.ClientHostController.unregisterEvent(args.dispId,args.targetId,callback) + } + catch(ex) + { + OSF.DDA.SafeArray.Delegate._onException(ex,args) + } }; -OSF.ClientMode={ - ReadWrite: 0, - ReadOnly: 1 +OSF.ClientMode = { + ReadWrite: 0, + ReadOnly: 1 }; -OSF.DDA.RichInitializationReason={ - 1: Microsoft.Office.WebExtension.InitializationReason.Inserted, - 2: Microsoft.Office.WebExtension.InitializationReason.DocumentOpened +OSF.DDA.RichInitializationReason = { + 1: Microsoft.Office.WebExtension.InitializationReason.Inserted, + 2: Microsoft.Office.WebExtension.InitializationReason.DocumentOpened }; -OSF.InitializationHelper=function OSF_InitializationHelper(hostInfo, webAppState, context, settings, hostFacade) +OSF.InitializationHelper = function OSF_InitializationHelper(hostInfo, webAppState, context, settings, hostFacade) { - this._hostInfo=hostInfo; - this._webAppState=webAppState; - this._context=context; - this._settings=settings; - this._hostFacade=hostFacade; - this._initializeSettings=this.initializeSettings + this._hostInfo = hostInfo; + this._webAppState = webAppState; + this._context = context; + this._settings = settings; + this._hostFacade = hostFacade; + this._initializeSettings = this.initializeSettings }; -OSF.InitializationHelper.prototype.deserializeSettings=function OSF_InitializationHelper$deserializeSettings(serializedSettings, refreshSupported) +OSF.InitializationHelper.prototype.deserializeSettings = function OSF_InitializationHelper$deserializeSettings(serializedSettings, refreshSupported) { - var settings; - var osfSessionStorage=OSF.OUtil.getSessionStorage(); - if(osfSessionStorage) - { - var storageSettings=osfSessionStorage.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey()); - if(storageSettings) - serializedSettings=JSON.parse(storageSettings); - else - { - storageSettings=JSON.stringify(serializedSettings); - osfSessionStorage.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),storageSettings) - } - } - var deserializedSettings=OSF.DDA.SettingsManager.deserializeSettings(serializedSettings); - if(refreshSupported) - settings=new OSF.DDA.RefreshableSettings(deserializedSettings); - else - settings=new OSF.DDA.Settings(deserializedSettings); - return settings + var settings; + var osfSessionStorage = OSF.OUtil.getSessionStorage(); + if(osfSessionStorage) + { + var storageSettings = osfSessionStorage.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey()); + if(storageSettings) + serializedSettings = JSON.parse(storageSettings); + else + { + storageSettings = JSON.stringify(serializedSettings); + osfSessionStorage.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),storageSettings) + } + } + var deserializedSettings = OSF.DDA.SettingsManager.deserializeSettings(serializedSettings); + if(refreshSupported) + settings = new OSF.DDA.RefreshableSettings(deserializedSettings); + else + settings = new OSF.DDA.Settings(deserializedSettings); + return settings }; -OSF.InitializationHelper.prototype.saveAndSetDialogInfo=function OSF_InitializationHelper$saveAndSetDialogInfo(hostInfoValue){}; -OSF.InitializationHelper.prototype.setAgaveHostCommunication=function OSF_InitializationHelper$setAgaveHostCommunication(){}; -OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize=function OSF_InitializationHelper$prepareRightBeforeWebExtensionInitialize(appContext) +OSF.InitializationHelper.prototype.saveAndSetDialogInfo = function OSF_InitializationHelper$saveAndSetDialogInfo(hostInfoValue){}; +OSF.InitializationHelper.prototype.setAgaveHostCommunication = function OSF_InitializationHelper$setAgaveHostCommunication(){}; +OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize = function OSF_InitializationHelper$prepareRightBeforeWebExtensionInitialize(appContext) { - this.prepareApiSurface(appContext); - Microsoft.Office.WebExtension.initialize(this.getInitializationReason(appContext)) + this.prepareApiSurface(appContext); + Microsoft.Office.WebExtension.initialize(this.getInitializationReason(appContext)) }; -OSF.InitializationHelper.prototype.prepareApiSurface=function OSF_InitializationHelper$prepareApiSurfaceAndInitialize(appContext) +OSF.InitializationHelper.prototype.prepareApiSurface = function OSF_InitializationHelper$prepareApiSurfaceAndInitialize(appContext) { - var license=new OSF.DDA.License(appContext.get_eToken()); - var getOfficeThemeHandler=OSF.DDA.OfficeTheme && OSF.DDA.OfficeTheme.getOfficeTheme ? OSF.DDA.OfficeTheme.getOfficeTheme : null; - if(appContext.get_isDialog()) - { - if(OSF.DDA.UI.ChildUI) - appContext.ui=new OSF.DDA.UI.ChildUI - } - else if(OSF.DDA.UI.ParentUI) - { - appContext.ui=new OSF.DDA.UI.ParentUI; - if(OfficeExt.Container) - OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync]) - } - OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(appContext,appContext.doc,license,null,getOfficeThemeHandler)); - var getDelegateMethods, - parameterMap; - getDelegateMethods=OSF.DDA.DispIdHost.getClientDelegateMethods; - parameterMap=OSF.DDA.SafeArray.Delegate.ParameterMap; - OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(getDelegateMethods,parameterMap)) + var license = new OSF.DDA.License(appContext.get_eToken()); + var getOfficeThemeHandler = OSF.DDA.OfficeTheme && OSF.DDA.OfficeTheme.getOfficeTheme ? OSF.DDA.OfficeTheme.getOfficeTheme : null; + if(appContext.get_isDialog()) + { + if(OSF.DDA.UI.ChildUI) + appContext.ui = new OSF.DDA.UI.ChildUI + } + else if(OSF.DDA.UI.ParentUI) + { + appContext.ui = new OSF.DDA.UI.ParentUI; + if(OfficeExt.Container) + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync]) + } + if(OSF.DDA.OpenBrowser) + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui,[OSF.DDA.AsyncMethodNames.OpenBrowserWindow]); + if(OSF.DDA.Auth) + { + appContext.auth = new OSF.DDA.Auth; + OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth,[OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]) + } + OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(appContext,appContext.doc,license,null,getOfficeThemeHandler)); + var getDelegateMethods, + parameterMap; + getDelegateMethods = OSF.DDA.DispIdHost.getClientDelegateMethods; + parameterMap = OSF.DDA.SafeArray.Delegate.ParameterMap; + OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(getDelegateMethods,parameterMap)) }; -OSF.InitializationHelper.prototype.getInitializationReason=function(appContext) +OSF.InitializationHelper.prototype.getInitializationReason = function(appContext) { - return OSF.DDA.RichInitializationReason[appContext.get_reason()] + return OSF.DDA.RichInitializationReason[appContext.get_reason()] }; -OSF.DDA.DispIdHost.getClientDelegateMethods=function(actionId) +OSF.DDA.DispIdHost.getClientDelegateMethods = function(actionId) { - var delegateMethods={}; - delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.SafeArray.Delegate.executeAsync; - delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.SafeArray.Delegate.registerEventAsync; - delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.SafeArray.Delegate.unregisterEventAsync; - delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog]=OSF.DDA.SafeArray.Delegate.openDialog; - delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog]=OSF.DDA.SafeArray.Delegate.closeDialog; - delegateMethods[OSF.DDA.DispIdHost.Delegates.MessageParent]=OSF.DDA.SafeArray.Delegate.messageParent; - delegateMethods[OSF.DDA.DispIdHost.Delegates.SendMessage]=OSF.DDA.SafeArray.Delegate.sendMessage; - if(OSF.DDA.AsyncMethodNames.RefreshAsync && actionId==OSF.DDA.AsyncMethodNames.RefreshAsync.id) - { - var readSerializedSettings=function(hostCallArgs, onCalling, onReceiving) - { - return OSF.DDA.ClientSettingsManager.read(onCalling,onReceiving) - }; - delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(readSerializedSettings) - } - if(OSF.DDA.AsyncMethodNames.SaveAsync && actionId==OSF.DDA.AsyncMethodNames.SaveAsync.id) - { - var writeSerializedSettings=function(hostCallArgs, onCalling, onReceiving) - { - return OSF.DDA.ClientSettingsManager.write(hostCallArgs[OSF.DDA.SettingsManager.SerializedSettings],hostCallArgs[Microsoft.Office.WebExtension.Parameters.OverwriteIfStale],onCalling,onReceiving) - }; - delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(writeSerializedSettings) - } - return delegateMethods + var delegateMethods = {}; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.SafeArray.Delegate.executeAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync] = OSF.DDA.SafeArray.Delegate.registerEventAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync] = OSF.DDA.SafeArray.Delegate.unregisterEventAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] = OSF.DDA.SafeArray.Delegate.openDialog; + delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] = OSF.DDA.SafeArray.Delegate.closeDialog; + delegateMethods[OSF.DDA.DispIdHost.Delegates.MessageParent] = OSF.DDA.SafeArray.Delegate.messageParent; + delegateMethods[OSF.DDA.DispIdHost.Delegates.SendMessage] = OSF.DDA.SafeArray.Delegate.sendMessage; + if(OSF.DDA.AsyncMethodNames.RefreshAsync && actionId == OSF.DDA.AsyncMethodNames.RefreshAsync.id) + { + var readSerializedSettings = function(hostCallArgs, onCalling, onReceiving) + { + return OSF.DDA.ClientSettingsManager.read(onCalling,onReceiving) + }; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(readSerializedSettings) + } + if(OSF.DDA.AsyncMethodNames.SaveAsync && actionId == OSF.DDA.AsyncMethodNames.SaveAsync.id) + { + var writeSerializedSettings = function(hostCallArgs, onCalling, onReceiving) + { + return OSF.DDA.ClientSettingsManager.write(hostCallArgs[OSF.DDA.SettingsManager.SerializedSettings],hostCallArgs[Microsoft.Office.WebExtension.Parameters.OverwriteIfStale],onCalling,onReceiving) + }; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(writeSerializedSettings) + } + return delegateMethods }; var OfficeExt; (function(OfficeExt) { - var MacRichClientHostController=function() - { - function MacRichClientHostController(){} - MacRichClientHostController.prototype.execute=function(id, params, callback) - { - setTimeout(function() - { - window.external.Execute(id,params,callback) - },0) - }; - MacRichClientHostController.prototype.registerEvent=function(id, targetId, handler, callback) - { - setTimeout(function() - { - window.external.RegisterEvent(id,targetId,handler,callback) - },0) - }; - MacRichClientHostController.prototype.unregisterEvent=function(id, targetId, callback) - { - setTimeout(function() - { - window.external.UnregisterEvent(id,targetId,callback) - },0) - }; - MacRichClientHostController.prototype.openDialog=function(id, targetId, handler, callback) - { - if(MacRichClientHostController.popup && !MacRichClientHostController.popup.closed) - { - callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened); - return - } - var magicWord="action=displayDialog"; - var fragmentSeparator="#"; - var callArgs=JSON.parse(targetId); - var callUrl=callArgs.url; - if(!callUrl) - return; - var urlParts=callUrl.split(fragmentSeparator); - var seperator="?"; - if(urlParts[0].indexOf("?") > -1) - seperator="&"; - var width=screen.width * callArgs.width / 100; - var height=screen.height * callArgs.height / 100; - var params="width="+width+", height="+height; - urlParts[0]=urlParts[0].concat(seperator).concat(magicWord); - var openUrl=urlParts.join(fragmentSeparator); - MacRichClientHostController.popup=window.open(openUrl,"",params); - function receiveMessage(event) - { - if(event.source==MacRichClientHostController.popup) - try - { - var messageObj=JSON.parse(event.data); - if(messageObj.dialogMessage) - handler(id,[OSF.DialogMessageType.DialogMessageReceived,messageObj.dialogMessage.messageContent]) - } - catch(e) - { - OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handlered. Message:"+event.data) - } - } - window.addEventListener("message",receiveMessage); - function checkWindowClose() - { - try - { - if(MacRichClientHostController.popup==null || MacRichClientHostController.popup.closed) - { - window.clearInterval(MacRichClientHostController.interval); - window.removeEventListener("message",receiveMessage); - handler(id,[OSF.DialogMessageType.DialogClosed]) - } - } - catch(e) - { - OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed.") - } - } - MacRichClientHostController.interval=window.setInterval(checkWindowClose,500); - callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - }; - MacRichClientHostController.prototype.messageParent=function(params) - { - var message=params[Microsoft.Office.WebExtension.Parameters.MessageToParent]; - var messageObj={dialogMessage: { - messageType: OSF.DialogMessageType.DialogMessageReceived, - messageContent: message - }}; - window.opener.postMessage(JSON.stringify(messageObj),window.location.origin) - }; - MacRichClientHostController.prototype.closeDialog=function(id, targetId, callback) - { - if(MacRichClientHostController.popup) - { - if(MacRichClientHostController.interval) - window.clearInterval(MacRichClientHostController.interval); - MacRichClientHostController.popup.close(); - callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - } - else - callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError) - }; - MacRichClientHostController.prototype.sendMessage=function(params){}; - return MacRichClientHostController - }(); - OfficeExt.MacRichClientHostController=MacRichClientHostController -})(OfficeExt || (OfficeExt={})); -OSF.ClientHostController=new OfficeExt.MacRichClientHostController; + var MacRichClientHostController = function() + { + function MacRichClientHostController(){} + MacRichClientHostController.prototype.execute = function(id, params, callback) + { + setTimeout(function() + { + window.external.Execute(id,params,callback) + },0) + }; + MacRichClientHostController.prototype.registerEvent = function(id, targetId, handler, callback) + { + setTimeout(function() + { + window.external.RegisterEvent(id,targetId,handler,callback) + },0) + }; + MacRichClientHostController.prototype.unregisterEvent = function(id, targetId, callback) + { + setTimeout(function() + { + window.external.UnregisterEvent(id,targetId,callback) + },0) + }; + MacRichClientHostController.prototype.openDialog = function(id, targetId, handler, callback) + { + if(MacRichClientHostController.popup && !MacRichClientHostController.popup.closed) + { + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened); + return + } + var magicWord = "action=displayDialog"; + window.dialogAPIErrorCode = undefined; + var fragmentSeparator = "#"; + var callArgs = JSON.parse(targetId); + var callUrl = callArgs.url; + if(!callUrl) + return; + var urlParts = callUrl.split(fragmentSeparator); + var seperator = "?"; + if(urlParts[0].indexOf("?") > -1) + seperator = "&"; + var width = screen.width * callArgs.width / 100; + var height = screen.height * callArgs.height / 100; + var params = "width=" + width + ", height=" + height; + urlParts[0] = urlParts[0].concat(seperator).concat(magicWord); + var openUrl = urlParts.join(fragmentSeparator); + MacRichClientHostController.popup = window.open(openUrl,"",params); + function receiveMessage(event) + { + if(event.source == MacRichClientHostController.popup) + try + { + var messageObj = JSON.parse(event.data); + if(messageObj.dialogMessage) + handler(id,[OSF.DialogMessageType.DialogMessageReceived,messageObj.dialogMessage.messageContent]) + } + catch(e) + { + OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handlered. Message:" + event.data) + } + } + function checkWindowClose() + { + try + { + if(MacRichClientHostController.popup == null || MacRichClientHostController.popup.closed) + { + window.clearInterval(MacRichClientHostController.interval); + window.removeEventListener("message",receiveMessage); + MacRichClientHostController.NotifyError = null; + handler(id,[OSF.DialogMessageType.DialogClosed]) + } + } + catch(e) + { + OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed.") + } + } + if(MacRichClientHostController.popup != undefined && window.dialogAPIErrorCode == undefined) + { + window.addEventListener("message",receiveMessage); + MacRichClientHostController.interval = window.setInterval(checkWindowClose,500); + function notifyError(errorCode) + { + handler(id,[errorCode]) + } + MacRichClientHostController.NotifyError = notifyError; + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + } + else + { + var error = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + if(window.dialogAPIErrorCode) + error = window.dialogAPIErrorCode; + callback(error) + } + }; + MacRichClientHostController.prototype.messageParent = function(params) + { + var message = params[Microsoft.Office.WebExtension.Parameters.MessageToParent]; + var messageObj = {dialogMessage: { + messageType: OSF.DialogMessageType.DialogMessageReceived, + messageContent: message + }}; + window.opener.postMessage(JSON.stringify(messageObj),window.location.origin) + }; + MacRichClientHostController.prototype.closeDialog = function(id, targetId, callback) + { + if(MacRichClientHostController.popup) + { + if(MacRichClientHostController.interval) + window.clearInterval(MacRichClientHostController.interval); + MacRichClientHostController.popup.close(); + MacRichClientHostController.NotifyError = null; + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + } + else + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError) + }; + MacRichClientHostController.prototype.sendMessage = function(params){}; + return MacRichClientHostController + }(); + OfficeExt.MacRichClientHostController = MacRichClientHostController +})(OfficeExt || (OfficeExt = {})); +OSF.ClientHostController = new OfficeExt.MacRichClientHostController; var OfficeExt; (function(OfficeExt) { - var OfficeTheme; - (function(OfficeTheme) - { - var OfficeThemeManager=function() - { - function OfficeThemeManager() - { - this._osfOfficeTheme=null; - this._osfOfficeThemeTimeStamp=null - } - OfficeThemeManager.prototype.getOfficeTheme=function() - { - if(OSF.DDA._OsfControlContext) - { - if(this._osfOfficeTheme && this._osfOfficeThemeTimeStamp && (new Date).getTime() - this._osfOfficeThemeTimeStamp < OfficeThemeManager._osfOfficeThemeCacheValidPeriod) - { - if(OSF.AppTelemetry) - OSF.AppTelemetry.onPropertyDone("GetOfficeThemeInfo",0) - } - else - { - var startTime=(new Date).getTime(); - var osfOfficeTheme=OSF.DDA._OsfControlContext.GetOfficeThemeInfo(); - var endTime=(new Date).getTime(); - if(OSF.AppTelemetry) - OSF.AppTelemetry.onPropertyDone("GetOfficeThemeInfo",Math.abs(endTime - startTime)); - this._osfOfficeTheme=JSON.parse(osfOfficeTheme); - for(var color in this._osfOfficeTheme) - this._osfOfficeTheme[color]=OSF.OUtil.convertIntToCssHexColor(this._osfOfficeTheme[color]); - this._osfOfficeThemeTimeStamp=endTime - } - return this._osfOfficeTheme - } - }; - OfficeThemeManager.instance=function() - { - if(OfficeThemeManager._instance==null) - OfficeThemeManager._instance=new OfficeThemeManager; - return OfficeThemeManager._instance - }; - OfficeThemeManager._osfOfficeThemeCacheValidPeriod=5e3; - OfficeThemeManager._instance=null; - return OfficeThemeManager - }(); - OfficeTheme.OfficeThemeManager=OfficeThemeManager; - OSF.OUtil.setNamespace("OfficeTheme",OSF.DDA); - OSF.DDA.OfficeTheme.getOfficeTheme=OfficeExt.OfficeTheme.OfficeThemeManager.instance().getOfficeTheme - })(OfficeTheme=OfficeExt.OfficeTheme || (OfficeExt.OfficeTheme={})) -})(OfficeExt || (OfficeExt={})); -OSF.DDA.ClientSettingsManager={ - getSettingsExecuteMethod: function OSF_DDA_ClientSettingsManager$getSettingsExecuteMethod(hostDelegateMethod) - { - return function(args) - { - var status, - response; - try - { - response=hostDelegateMethod(args.hostCallArgs,args.onCalling,args.onReceiving); - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess - } - catch(ex) - { - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; - response={ - name: Strings.OfficeOM.L_InternalError, - message: ex - } - } - if(args.onComplete) - args.onComplete(status,response) - } - }, - read: function OSF_DDA_ClientSettingsManager$read(onCalling, onReceiving) - { - var keys=[]; - var values=[]; - if(onCalling) - onCalling(); - OSF.DDA._OsfControlContext.GetSettings().Read(keys,values); - if(onReceiving) - onReceiving(); - var serializedSettings={}; - for(var index=0; index < keys.length; index++) - serializedSettings[keys[index]]=values[index]; - return serializedSettings - }, - write: function OSF_DDA_ClientSettingsManager$write(serializedSettings, overwriteIfStale, onCalling, onReceiving) - { - var keys=[]; - var values=[]; - for(var key in serializedSettings) - { - keys.push(key); - values.push(serializedSettings[key]) - } - if(onCalling) - onCalling(); - OSF.DDA._OsfControlContext.GetSettings().Write(keys,values); - if(onReceiving) - onReceiving() - } + var OfficeTheme; + (function(OfficeTheme) + { + var OfficeThemeManager = function() + { + function OfficeThemeManager() + { + this._osfOfficeTheme = null; + this._osfOfficeThemeTimeStamp = null + } + OfficeThemeManager.prototype.getOfficeTheme = function() + { + if(OSF.DDA._OsfControlContext) + { + if(this._osfOfficeTheme && this._osfOfficeThemeTimeStamp && (new Date).getTime() - this._osfOfficeThemeTimeStamp < OfficeThemeManager._osfOfficeThemeCacheValidPeriod) + { + if(OSF.AppTelemetry) + OSF.AppTelemetry.onPropertyDone("GetOfficeThemeInfo",0) + } + else + { + var startTime = (new Date).getTime(); + var osfOfficeTheme = OSF.DDA._OsfControlContext.GetOfficeThemeInfo(); + var endTime = (new Date).getTime(); + if(OSF.AppTelemetry) + OSF.AppTelemetry.onPropertyDone("GetOfficeThemeInfo",Math.abs(endTime - startTime)); + this._osfOfficeTheme = JSON.parse(osfOfficeTheme); + for(var color in this._osfOfficeTheme) + this._osfOfficeTheme[color] = OSF.OUtil.convertIntToCssHexColor(this._osfOfficeTheme[color]); + this._osfOfficeThemeTimeStamp = endTime + } + return this._osfOfficeTheme + } + }; + OfficeThemeManager.instance = function() + { + if(OfficeThemeManager._instance == null) + OfficeThemeManager._instance = new OfficeThemeManager; + return OfficeThemeManager._instance + }; + OfficeThemeManager._osfOfficeThemeCacheValidPeriod = 5e3; + OfficeThemeManager._instance = null; + return OfficeThemeManager + }(); + OfficeTheme.OfficeThemeManager = OfficeThemeManager; + OSF.OUtil.setNamespace("OfficeTheme",OSF.DDA); + OSF.DDA.OfficeTheme.getOfficeTheme = OfficeExt.OfficeTheme.OfficeThemeManager.instance().getOfficeTheme + })(OfficeTheme = OfficeExt.OfficeTheme || (OfficeExt.OfficeTheme = {})) +})(OfficeExt || (OfficeExt = {})); +OSF.DDA.ClientSettingsManager = { + getSettingsExecuteMethod: function OSF_DDA_ClientSettingsManager$getSettingsExecuteMethod(hostDelegateMethod) + { + return function(args) + { + var status, + response; + try + { + response = hostDelegateMethod(args.hostCallArgs,args.onCalling,args.onReceiving); + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess + } + catch(ex) + { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + response = { + name: Strings.OfficeOM.L_InternalError, + message: ex + } + } + if(args.onComplete) + args.onComplete(status,response) + } + }, + read: function OSF_DDA_ClientSettingsManager$read(onCalling, onReceiving) + { + var keys = []; + var values = []; + if(onCalling) + onCalling(); + OSF.DDA._OsfControlContext.GetSettings().Read(keys,values); + if(onReceiving) + onReceiving(); + var serializedSettings = {}; + for(var index = 0; index < keys.length; index++) + serializedSettings[keys[index]] = values[index]; + return serializedSettings + }, + write: function OSF_DDA_ClientSettingsManager$write(serializedSettings, overwriteIfStale, onCalling, onReceiving) + { + var keys = []; + var values = []; + for(var key in serializedSettings) + { + keys.push(key); + values.push(serializedSettings[key]) + } + if(onCalling) + onCalling(); + OSF.DDA._OsfControlContext.GetSettings().Write(keys,values); + if(onReceiving) + onReceiving() + } }; -OSF.InitializationHelper.prototype.initializeSettings=function OSF_InitializationHelper$initializeSettings(refreshSupported) +OSF.InitializationHelper.prototype.initializeSettings = function OSF_InitializationHelper$initializeSettings(refreshSupported) { - var serializedSettings=OSF.DDA.ClientSettingsManager.read(); - var settings=this.deserializeSettings(serializedSettings,refreshSupported); - return settings + var serializedSettings = OSF.DDA.ClientSettingsManager.read(); + var settings = this.deserializeSettings(serializedSettings,refreshSupported); + return settings }; -OSF.InitializationHelper.prototype.getAppContext=function OSF_InitializationHelper$getAppContext(wnd, gotAppContext) +OSF.InitializationHelper.prototype.getAppContext = function OSF_InitializationHelper$getAppContext(wnd, gotAppContext) { - var returnedContext; - var context; - var warningText="Warning: Office.js is loaded outside of Office client"; - try - { - if(window.external && typeof window.external.GetContext !=="undefined") - context=OSF.DDA._OsfControlContext=window.external.GetContext(); - else - { - OsfMsAjaxFactory.msAjaxDebug.trace(warningText); - return - } - } - catch(e) - { - OsfMsAjaxFactory.msAjaxDebug.trace(warningText); - return - } - var appType=context.GetAppType(); - var id=context.GetSolutionRef(); - var version=context.GetAppVersionMajor(); - var minorVersion=context.GetAppVersionMinor(); - var UILocale=context.GetAppUILocale(); - var dataLocale=context.GetAppDataLocale(); - var docUrl=context.GetDocUrl(); - var clientMode=context.GetAppCapabilities(); - var reason=context.GetActivationMode(); - var osfControlType=context.GetControlIntegrationLevel(); - var settings=[]; - var eToken; - try - { - eToken=context.GetSolutionToken() - } - catch(ex){} - var correlationId; - if(typeof context.GetCorrelationId !=="undefined") - correlationId=context.GetCorrelationId(); - var appInstanceId; - if(typeof context.GetInstanceId !=="undefined") - appInstanceId=context.GetInstanceId(); - var touchEnabled; - if(typeof context.GetTouchEnabled !=="undefined") - touchEnabled=context.GetTouchEnabled(); - var commerceAllowed; - if(typeof context.GetCommerceAllowed !=="undefined") - commerceAllowed=context.GetCommerceAllowed(); - var requirementMatrix; - if(typeof context.GetSupportedMatrix !=="undefined") - requirementMatrix=context.GetSupportedMatrix(); - var hostCustomMessage; - if(typeof context.GetHostCustomMessage !=="undefined") - hostCustomMessage=context.GetHostCustomMessage(); - var hostFullVersion; - if(typeof context.GetHostFullVersion !=="undefined") - hostFullVersion=context.GetHostFullVersion(); - var dialogRequirementMatrix; - if(typeof context.GetDialogRequirementMatrix !="undefined") - dialogRequirementMatrix=context.GetDialogRequirementMatrix(); - eToken=eToken ? eToken.toString() : ""; - returnedContext=new OSF.OfficeAppContext(id,appType,version,UILocale,dataLocale,docUrl,clientMode,settings,reason,osfControlType,eToken,correlationId,appInstanceId,touchEnabled,commerceAllowed,minorVersion,requirementMatrix,hostCustomMessage,hostFullVersion,undefined,undefined,undefined,dialogRequirementMatrix); - if(OSF.AppTelemetry) - OSF.AppTelemetry.initialize(returnedContext); - gotAppContext(returnedContext) + var returnedContext; + var context; + var warningText = "Warning: Office.js is loaded outside of Office client"; + try + { + if(window.external && typeof window.external.GetContext !== "undefined") + context = OSF.DDA._OsfControlContext = window.external.GetContext(); + else + { + OsfMsAjaxFactory.msAjaxDebug.trace(warningText); + return + } + } + catch(e) + { + OsfMsAjaxFactory.msAjaxDebug.trace(warningText); + return + } + var appType = context.GetAppType(); + var id = context.GetSolutionRef(); + var version = context.GetAppVersionMajor(); + var minorVersion = context.GetAppVersionMinor(); + var UILocale = context.GetAppUILocale(); + var dataLocale = context.GetAppDataLocale(); + var docUrl = context.GetDocUrl(); + var clientMode = context.GetAppCapabilities(); + var reason = context.GetActivationMode(); + var osfControlType = context.GetControlIntegrationLevel(); + var settings = []; + var eToken; + try + { + eToken = context.GetSolutionToken() + } + catch(ex){} + var correlationId; + if(typeof context.GetCorrelationId !== "undefined") + correlationId = context.GetCorrelationId(); + var appInstanceId; + if(typeof context.GetInstanceId !== "undefined") + appInstanceId = context.GetInstanceId(); + var touchEnabled; + if(typeof context.GetTouchEnabled !== "undefined") + touchEnabled = context.GetTouchEnabled(); + var commerceAllowed; + if(typeof context.GetCommerceAllowed !== "undefined") + commerceAllowed = context.GetCommerceAllowed(); + var requirementMatrix; + if(typeof context.GetSupportedMatrix !== "undefined") + requirementMatrix = context.GetSupportedMatrix(); + var hostCustomMessage; + if(typeof context.GetHostCustomMessage !== "undefined") + hostCustomMessage = context.GetHostCustomMessage(); + var hostFullVersion; + if(typeof context.GetHostFullVersion !== "undefined") + hostFullVersion = context.GetHostFullVersion(); + var dialogRequirementMatrix; + if(typeof context.GetDialogRequirementMatrix != "undefined") + dialogRequirementMatrix = context.GetDialogRequirementMatrix(); + eToken = eToken ? eToken.toString() : ""; + returnedContext = new OSF.OfficeAppContext(id,appType,version,UILocale,dataLocale,docUrl,clientMode,settings,reason,osfControlType,eToken,correlationId,appInstanceId,touchEnabled,commerceAllowed,minorVersion,requirementMatrix,hostCustomMessage,hostFullVersion,undefined,undefined,undefined,dialogRequirementMatrix); + if(OSF.AppTelemetry) + OSF.AppTelemetry.initialize(returnedContext); + gotAppContext(returnedContext) }; (function() { - var checkScriptOverride=function OSF$checkScriptOverride() - { - var postScriptOverrideCheckAction=function OSF$postScriptOverrideCheckAction(customizedScriptPath) - { - if(customizedScriptPath) - OSF.OUtil.loadScript(customizedScriptPath,function() - { - OsfMsAjaxFactory.msAjaxDebug.trace("loaded customized script:"+customizedScriptPath) - }) - }; - var conversationID, - webAppUrl, - items; - var clientEndPoint=null; - var xdmInfoValue=OSF.OUtil.parseXdmInfo(); - if(xdmInfoValue) - { - items=OSF.OUtil.getInfoItems(xdmInfoValue); - if(items && items.length >=3) - { - conversationID=items[0]; - webAppUrl=items[2]; - var serializerVersion=OSF.OUtil.parseSerializerVersionWithGivenFragment(false,OSF._OfficeAppFactory.getWindowLocationHash()); - if(isNaN(serializerVersion) && OSF._OfficeAppFactory.getWindowName) - serializerVersion=OSF.OUtil.parseSerializerVersionFromWindowName(false,OSF._OfficeAppFactory.getWindowName()); - clientEndPoint=Microsoft.Office.Common.XdmCommunicationManager.connect(conversationID,window.parent,webAppUrl,serializerVersion) - } - } - var customizedScriptPath=null; - if(!clientEndPoint) - { - try - { - if(window.external && typeof window.external.getCustomizedScriptPath !=="undefined") - customizedScriptPath=window.external.getCustomizedScriptPath() - } - catch(ex) - { - OsfMsAjaxFactory.msAjaxDebug.trace("no script override through window.external.") - } - postScriptOverrideCheckAction(customizedScriptPath) - } - else - try - { - clientEndPoint.invoke("getCustomizedScriptPathAsync",function OSF$getCustomizedScriptPathAsyncCallback(errorCode, scriptPath) - { - postScriptOverrideCheckAction(errorCode===0 ? scriptPath : null) - },{__timeout__: 1e3}) - } - catch(ex) - { - OsfMsAjaxFactory.msAjaxDebug.trace("no script override through cross frame communication.") - } - }; - var requiresMsAjax=true; - if(requiresMsAjax && !OsfMsAjaxFactory.isMsAjaxLoaded()) - if(!(OSF._OfficeAppFactory && OSF._OfficeAppFactory && OSF._OfficeAppFactory.getLoadScriptHelper && OSF._OfficeAppFactory.getLoadScriptHelper().isScriptLoading(OSF.ConstantNames.MicrosoftAjaxId))) - OsfMsAjaxFactory.loadMsAjaxFull(function OSF$loadMSAjaxCallback() - { - if(OsfMsAjaxFactory.isMsAjaxLoaded()) - checkScriptOverride(); - else - throw"Not able to load MicrosoftAjax.js."; - }); - else - OSF._OfficeAppFactory.getLoadScriptHelper().waitForScripts([OSF.ConstantNames.MicrosoftAjaxId],checkScriptOverride); - else - checkScriptOverride() + var checkScriptOverride = function OSF$checkScriptOverride() + { + var postScriptOverrideCheckAction = function OSF$postScriptOverrideCheckAction(customizedScriptPath) + { + if(customizedScriptPath) + OSF.OUtil.loadScript(customizedScriptPath,function() + { + OsfMsAjaxFactory.msAjaxDebug.trace("loaded customized script:" + customizedScriptPath) + }) + }; + var conversationID, + webAppUrl, + items; + var clientEndPoint = null; + var xdmInfoValue = OSF.OUtil.parseXdmInfo(); + if(xdmInfoValue) + { + items = OSF.OUtil.getInfoItems(xdmInfoValue); + if(items && items.length >= 3) + { + conversationID = items[0]; + webAppUrl = items[2]; + var serializerVersion = OSF.OUtil.parseSerializerVersionWithGivenFragment(false,OSF._OfficeAppFactory.getWindowLocationHash()); + if(isNaN(serializerVersion) && OSF._OfficeAppFactory.getWindowName) + serializerVersion = OSF.OUtil.parseSerializerVersionFromWindowName(false,OSF._OfficeAppFactory.getWindowName()); + clientEndPoint = Microsoft.Office.Common.XdmCommunicationManager.connect(conversationID,window.parent,webAppUrl,serializerVersion) + } + } + var customizedScriptPath = null; + if(!clientEndPoint) + { + try + { + if(window.external && typeof window.external.getCustomizedScriptPath !== "undefined") + customizedScriptPath = window.external.getCustomizedScriptPath() + } + catch(ex) + { + OsfMsAjaxFactory.msAjaxDebug.trace("no script override through window.external.") + } + postScriptOverrideCheckAction(customizedScriptPath) + } + else + try + { + clientEndPoint.invoke("getCustomizedScriptPathAsync",function OSF$getCustomizedScriptPathAsyncCallback(errorCode, scriptPath) + { + postScriptOverrideCheckAction(errorCode === 0 ? scriptPath : null) + },{__timeout__: 1e3}) + } + catch(ex) + { + OsfMsAjaxFactory.msAjaxDebug.trace("no script override through cross frame communication.") + } + }; + var requiresMsAjax = true; + if(requiresMsAjax && !OsfMsAjaxFactory.isMsAjaxLoaded()) + if(!(OSF._OfficeAppFactory && OSF._OfficeAppFactory && OSF._OfficeAppFactory.getLoadScriptHelper && OSF._OfficeAppFactory.getLoadScriptHelper().isScriptLoading(OSF.ConstantNames.MicrosoftAjaxId))) + OsfMsAjaxFactory.loadMsAjaxFull(function OSF$loadMSAjaxCallback() + { + if(OsfMsAjaxFactory.isMsAjaxLoaded()) + checkScriptOverride(); + else + throw"Not able to load MicrosoftAjax.js."; + }); + else + OSF._OfficeAppFactory.getLoadScriptHelper().waitForScripts([OSF.ConstantNames.MicrosoftAjaxId],checkScriptOverride); + else + checkScriptOverride() })(); -Microsoft.Office.WebExtension.EventType={}; -OSF.EventDispatch=function OSF_EventDispatch(eventTypes) +Microsoft.Office.WebExtension.EventType = {}; +OSF.EventDispatch = function OSF_EventDispatch(eventTypes) { - this._eventHandlers={}; - this._queuedEventsArgs={}; - for(var entry in eventTypes) - { - var eventType=eventTypes[entry]; - this._eventHandlers[eventType]=[]; - this._queuedEventsArgs[eventType]=[] - } + this._eventHandlers = {}; + this._objectEventHandlers = {}; + this._queuedEventsArgs = {}; + for(var entry in eventTypes) + { + var eventType = eventTypes[entry]; + var isObjectEvent = eventType == "objectDeleted" || eventType == "objectSelectionChanged" || eventType == "objectDataChanged" || eventType == "contentControlAdded"; + if(!isObjectEvent) + this._eventHandlers[eventType] = []; + else + this._objectEventHandlers[eventType] = {}; + this._queuedEventsArgs[eventType] = [] + } }; -OSF.EventDispatch.prototype={ - getSupportedEvents: function OSF_EventDispatch$getSupportedEvents() - { - var events=[]; - for(var eventName in this._eventHandlers) - events.push(eventName); - return events - }, - supportsEvent: function OSF_EventDispatch$supportsEvent(event) - { - var isSupported=false; - for(var eventName in this._eventHandlers) - if(event==eventName) - { - isSupported=true; - break - } - return isSupported - }, - hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) - { - var handlers=this._eventHandlers[eventType]; - if(handlers && handlers.length > 0) - for(var h in handlers) - if(handlers[h]===handler) - return true; - return false - }, - addEventHandler: function OSF_EventDispatch$addEventHandler(eventType, handler) - { - if(typeof handler !="function") - return false; - var handlers=this._eventHandlers[eventType]; - if(handlers && !this.hasEventHandler(eventType,handler)) - { - handlers.push(handler); - return true - } - else - return false - }, - addEventHandlerAndFireQueuedEvent: function OSF_EventDispatch$addEventHandlerAndFireQueuedEvent(eventType, handler) - { - var handlers=this._eventHandlers[eventType]; - var isFirstHandler=handlers.length==0; - var succeed=this.addEventHandler(eventType,handler); - if(isFirstHandler && succeed) - this.fireQueuedEvent(eventType); - return succeed - }, - removeEventHandler: function OSF_EventDispatch$removeEventHandler(eventType, handler) - { - var handlers=this._eventHandlers[eventType]; - if(handlers && handlers.length > 0) - for(var index=0; index < handlers.length; index++) - if(handlers[index]===handler) - { - handlers.splice(index,1); - return true - } - return false - }, - clearEventHandlers: function OSF_EventDispatch$clearEventHandlers(eventType) - { - if(typeof this._eventHandlers[eventType] !="undefined" && this._eventHandlers[eventType].length > 0) - { - this._eventHandlers[eventType]=[]; - return true - } - return false - }, - getEventHandlerCount: function OSF_EventDispatch$getEventHandlerCount(eventType) - { - return this._eventHandlers[eventType] !=undefined ? this._eventHandlers[eventType].length : -1 - }, - fireEvent: function OSF_EventDispatch$fireEvent(eventArgs) - { - if(eventArgs.type==undefined) - return false; - var eventType=eventArgs.type; - if(eventType && this._eventHandlers[eventType]) - { - var eventHandlers=this._eventHandlers[eventType]; - for(var handler in eventHandlers) - eventHandlers[handler](eventArgs); - return true - } - else - return false - }, - fireOrQueueEvent: function OSF_EventDispatch$fireOrQueueEvent(eventArgs) - { - var eventType=eventArgs.type; - if(eventType && this._eventHandlers[eventType]) - { - var eventHandlers=this._eventHandlers[eventType]; - var queuedEvents=this._queuedEventsArgs[eventType]; - if(eventHandlers.length==0) - queuedEvents.push(eventArgs); - else - this.fireEvent(eventArgs); - return true - } - else - return false - }, - fireQueuedEvent: function OSF_EventDispatch$queueEvent(eventType) - { - if(eventType && this._eventHandlers[eventType]) - { - var eventHandlers=this._eventHandlers[eventType]; - var queuedEvents=this._queuedEventsArgs[eventType]; - if(eventHandlers.length > 0) - { - var eventHandler=eventHandlers[0]; - while(queuedEvents.length > 0) - { - var eventArgs=queuedEvents.shift(); - eventHandler(eventArgs) - } - return true - } - } - return false - }, - clearQueuedEvent: function OSF_EventDispatch$clearQueuedEvent(eventType) - { - if(eventType && this._eventHandlers[eventType]) - { - var queuedEvents=this._queuedEventsArgs[eventType]; - if(queuedEvents) - this._queuedEventsArgs[eventType]=[] - } - } +OSF.EventDispatch.prototype = { + getSupportedEvents: function OSF_EventDispatch$getSupportedEvents() + { + var events = []; + for(var eventName in this._eventHandlers) + events.push(eventName); + for(var eventName in this._objectEventHandlers) + events.push(eventName); + return events + }, + supportsEvent: function OSF_EventDispatch$supportsEvent(event) + { + for(var eventName in this._eventHandlers) + if(event == eventName) + return true; + for(var eventName in this._objectEventHandlers) + if(event == eventName) + return true; + return false + }, + hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) + { + var handlers = this._eventHandlers[eventType]; + if(handlers && handlers.length > 0) + for(var h in handlers) + if(handlers[h] === handler) + return true; + return false + }, + hasObjectEventHandler: function OSF_EventDispatch$hasObjectEventHandler(eventType, objectId, handler) + { + var handlers = this._objectEventHandlers[eventType]; + if(handlers != null) + { + var _handlers = handlers[objectId]; + for(var i = 0; _handlers != null && i < _handlers.length; i++) + if(_handlers[i] === handler) + return true + } + return false + }, + addEventHandler: function OSF_EventDispatch$addEventHandler(eventType, handler) + { + if(typeof handler != "function") + return false; + var handlers = this._eventHandlers[eventType]; + if(handlers && !this.hasEventHandler(eventType,handler)) + { + handlers.push(handler); + return true + } + else + return false + }, + addObjectEventHandler: function OSF_EventDispatch$addObjectEventHandler(eventType, objectId, handler) + { + if(typeof handler != "function") + return false; + var handlers = this._objectEventHandlers[eventType]; + if(handlers && !this.hasObjectEventHandler(eventType,objectId,handler)) + { + if(handlers[objectId] == null) + handlers[objectId] = []; + handlers[objectId].push(handler); + return true + } + return false + }, + addEventHandlerAndFireQueuedEvent: function OSF_EventDispatch$addEventHandlerAndFireQueuedEvent(eventType, handler) + { + var handlers = this._eventHandlers[eventType]; + var isFirstHandler = handlers.length == 0; + var succeed = this.addEventHandler(eventType,handler); + if(isFirstHandler && succeed) + this.fireQueuedEvent(eventType); + return succeed + }, + removeEventHandler: function OSF_EventDispatch$removeEventHandler(eventType, handler) + { + var handlers = this._eventHandlers[eventType]; + if(handlers && handlers.length > 0) + for(var index = 0; index < handlers.length; index++) + if(handlers[index] === handler) + { + handlers.splice(index,1); + return true + } + return false + }, + removeObjectEventHandler: function OSF_EventDispatch$removeObjectEventHandler(eventType, objectId, handler) + { + var handlers = this._objectEventHandlers[eventType]; + if(handlers != null) + { + var _handlers = handlers[objectId]; + for(var i = 0; _handlers != null && i < _handlers.length; i++) + if(_handlers[i] === handler) + { + _handlers.splice(i,1); + return true + } + } + return false + }, + clearEventHandlers: function OSF_EventDispatch$clearEventHandlers(eventType) + { + if(typeof this._eventHandlers[eventType] != "undefined" && this._eventHandlers[eventType].length > 0) + { + this._eventHandlers[eventType] = []; + return true + } + return false + }, + clearObjectEventHandlers: function OSF_EventDispatch$clearObjectEventHandlers(eventType, objectId) + { + if(this._objectEventHandlers[eventType] != null && this._objectEventHandlers[eventType][objectId] != null) + { + this._objectEventHandlers[eventType][objectId] = []; + return true + } + return false + }, + getEventHandlerCount: function OSF_EventDispatch$getEventHandlerCount(eventType) + { + return this._eventHandlers[eventType] != undefined ? this._eventHandlers[eventType].length : -1 + }, + getObjectEventHandlerCount: function OSF_EventDispatch$getObjectEventHandlerCount(eventType, objectId) + { + if(this._objectEventHandlers[eventType] == null || this._objectEventHandlers[eventType][objectId] == null) + return 0; + return this._objectEventHandlers[eventType][objectId].length + }, + fireEvent: function OSF_EventDispatch$fireEvent(eventArgs) + { + if(eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if(eventType && this._eventHandlers[eventType]) + { + var eventHandlers = this._eventHandlers[eventType]; + for(var handler in eventHandlers) + eventHandlers[handler](eventArgs); + return true + } + else + return false + }, + fireObjectEvent: function OSF_EventDispatch$fireObjectEvent(objectId, eventArgs) + { + if(eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if(eventType && this._objectEventHandlers[eventType]) + { + var eventHandlers = this._objectEventHandlers[eventType]; + var _handlers = eventHandlers[objectId]; + if(_handlers != null) + { + for(var i = 0; i < _handlers.length; i++) + _handlers[i](eventArgs); + return true + } + } + return false + }, + fireOrQueueEvent: function OSF_EventDispatch$fireOrQueueEvent(eventArgs) + { + var eventType = eventArgs.type; + if(eventType && this._eventHandlers[eventType]) + { + var eventHandlers = this._eventHandlers[eventType]; + var queuedEvents = this._queuedEventsArgs[eventType]; + if(eventHandlers.length == 0) + queuedEvents.push(eventArgs); + else + this.fireEvent(eventArgs); + return true + } + else + return false + }, + fireQueuedEvent: function OSF_EventDispatch$queueEvent(eventType) + { + if(eventType && this._eventHandlers[eventType]) + { + var eventHandlers = this._eventHandlers[eventType]; + var queuedEvents = this._queuedEventsArgs[eventType]; + if(eventHandlers.length > 0) + { + var eventHandler = eventHandlers[0]; + while(queuedEvents.length > 0) + { + var eventArgs = queuedEvents.shift(); + eventHandler(eventArgs) + } + return true + } + } + return false + }, + clearQueuedEvent: function OSF_EventDispatch$clearQueuedEvent(eventType) + { + if(eventType && this._eventHandlers[eventType]) + { + var queuedEvents = this._queuedEventsArgs[eventType]; + if(queuedEvents) + this._queuedEventsArgs[eventType] = [] + } + } }; -OSF.DDA.OMFactory=OSF.DDA.OMFactory || {}; -OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEventArgs(eventType, target, eventProperties) +OSF.DDA.OMFactory = OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureEventArgs = function OSF_DDA_OMFactory$manufactureEventArgs(eventType, target, eventProperties) { - var args; - switch(eventType) - { - case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged: - args=new OSF.DDA.DocumentSelectionChangedEventArgs(target); - break; - case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged: - args=new OSF.DDA.BindingSelectionChangedEventArgs(this.manufactureBinding(eventProperties,target.document),eventProperties[OSF.DDA.PropertyDescriptors.Subset]); - break; - case Microsoft.Office.WebExtension.EventType.BindingDataChanged: - args=new OSF.DDA.BindingDataChangedEventArgs(this.manufactureBinding(eventProperties,target.document)); - break; - case Microsoft.Office.WebExtension.EventType.SettingsChanged: - args=new OSF.DDA.SettingsChangedEventArgs(target); - break; - case Microsoft.Office.WebExtension.EventType.ActiveViewChanged: - args=new OSF.DDA.ActiveViewChangedEventArgs(eventProperties); - break; - case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged: - args=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(eventProperties); - break; - case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged: - args=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(eventProperties); - break; - case Microsoft.Office.WebExtension.EventType.AppCommandInvoked: - args=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(eventProperties); - break; - case Microsoft.Office.WebExtension.EventType.DataNodeInserted: - args=new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]),eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); - break; - case Microsoft.Office.WebExtension.EventType.DataNodeReplaced: - args=new OSF.DDA.NodeReplacedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]),eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); - break; - case Microsoft.Office.WebExtension.EventType.DataNodeDeleted: - args=new OSF.DDA.NodeDeletedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); - break; - case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged: - args=new OSF.DDA.TaskSelectionChangedEventArgs(target); - break; - case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged: - args=new OSF.DDA.ResourceSelectionChangedEventArgs(target); - break; - case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged: - args=new OSF.DDA.ViewSelectionChangedEventArgs(target); - break; - case Microsoft.Office.WebExtension.EventType.DialogMessageReceived: - args=new OSF.DDA.DialogEventArgs(eventProperties); - break; - case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived: - args=new OSF.DDA.DialogParentEventArgs(eventProperties); - break; - case Microsoft.Office.WebExtension.EventType.ItemChanged: - if(OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlookwebapp") - { - args=new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); - target.initialize(args["initialData"]); - target.setCurrentItemNumber(args["itemNumber"].itemNumber) - } - else - throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,eventType)); - break; - default: - throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,eventType)); - } - return args + var args; + switch(eventType) + { + case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged: + args = new OSF.DDA.DocumentSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged: + args = new OSF.DDA.BindingSelectionChangedEventArgs(this.manufactureBinding(eventProperties,target.document),eventProperties[OSF.DDA.PropertyDescriptors.Subset]); + break; + case Microsoft.Office.WebExtension.EventType.BindingDataChanged: + args = new OSF.DDA.BindingDataChangedEventArgs(this.manufactureBinding(eventProperties,target.document)); + break; + case Microsoft.Office.WebExtension.EventType.SettingsChanged: + args = new OSF.DDA.SettingsChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ActiveViewChanged: + args = new OSF.DDA.ActiveViewChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged: + args = new OSF.DDA.Theming.OfficeThemeChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged: + args = new OSF.DDA.Theming.DocumentThemeChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.AppCommandInvoked: + args = OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.ObjectDeleted: + case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged: + case Microsoft.Office.WebExtension.EventType.ObjectDataChanged: + case Microsoft.Office.WebExtension.EventType.ContentControlAdded: + args = new OSF.DDA.ObjectEventArgs(eventType,eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); + break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args = new OSF.DDA.RichApiMessageEventArgs(eventType,eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeInserted: + args = new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]),eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeReplaced: + args = new OSF.DDA.NodeReplacedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]),eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeDeleted: + args = new OSF.DDA.NodeDeletedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged: + args = new OSF.DDA.TaskSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged: + args = new OSF.DDA.ResourceSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged: + args = new OSF.DDA.ViewSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.DialogMessageReceived: + args = new OSF.DDA.DialogEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived: + args = new OSF.DDA.DialogParentEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.ItemChanged: + if(OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") + { + args = new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); + target.initialize(args["initialData"]); + if(OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "win32") + target.setCurrentItemNumber(args["itemNumber"].itemNumber) + } + else + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,eventType)); + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if(OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") + args = new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + else + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,eventType)); + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if(OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") + args = new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); + else + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,eventType)); + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,eventType)); + } + return args }; OSF.DDA.AsyncMethodNames.addNames({ - AddHandlerAsync: "addHandlerAsync", - RemoveHandlerAsync: "removeHandlerAsync" + AddHandlerAsync: "addHandlerAsync", + RemoveHandlerAsync: "removeHandlerAsync" }); OSF.DDA.AsyncMethodCalls.define({ - method: OSF.DDA.AsyncMethodNames.AddHandlerAsync, - requiredArguments: [{ - name: Microsoft.Office.WebExtension.Parameters.EventType, - "enum": Microsoft.Office.WebExtension.EventType, - verify: function(eventType, caller, eventDispatch) - { - return eventDispatch.supportsEvent(eventType) - } - },{ - name: Microsoft.Office.WebExtension.Parameters.Handler, - types: ["function"] - }], - supportedOptions: [], - privateStateCallbacks: [] + method: OSF.DDA.AsyncMethodNames.AddHandlerAsync, + requiredArguments: [{ + name: Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + verify: function(eventType, caller, eventDispatch) + { + return eventDispatch.supportsEvent(eventType) + } + },{ + name: Microsoft.Office.WebExtension.Parameters.Handler, + types: ["function"] + }], + supportedOptions: [], + privateStateCallbacks: [] }); OSF.DDA.AsyncMethodCalls.define({ - method: OSF.DDA.AsyncMethodNames.RemoveHandlerAsync, - requiredArguments: [{ - name: Microsoft.Office.WebExtension.Parameters.EventType, - "enum": Microsoft.Office.WebExtension.EventType, - verify: function(eventType, caller, eventDispatch) - { - return eventDispatch.supportsEvent(eventType) - } - }], - supportedOptions: [{ - name: Microsoft.Office.WebExtension.Parameters.Handler, - value: { - types: ["function","object"], - defaultValue: null - } - }], - privateStateCallbacks: [] + method: OSF.DDA.AsyncMethodNames.RemoveHandlerAsync, + requiredArguments: [{ + name: Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + verify: function(eventType, caller, eventDispatch) + { + return eventDispatch.supportsEvent(eventType) + } + }], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Handler, + value: { + types: ["function","object"], + defaultValue: null + } + }], + privateStateCallbacks: [] }); -OSF.DialogShownStatus={ - hasDialogShown: false, - isWindowDialog: false +OSF.DialogShownStatus = { + hasDialogShown: false, + isWindowDialog: false }; OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent: "DialogMessageReceivedEvent"}); OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ - DialogMessageReceived: "dialogMessageReceived", - DialogEventReceived: "dialogEventReceived" + DialogMessageReceived: "dialogMessageReceived", + DialogEventReceived: "dialogEventReceived" }); OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{ - MessageType: "messageType", - MessageContent: "messageContent" + MessageType: "messageType", + MessageContent: "messageContent" }); -OSF.DDA.DialogEventType={}; +OSF.DDA.DialogEventType = {}; OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{ - DialogClosed: "dialogClosed", - NavigationFailed: "naviationFailed" + DialogClosed: "dialogClosed", + NavigationFailed: "naviationFailed" }); OSF.DDA.AsyncMethodNames.addNames({ - DisplayDialogAsync: "displayDialogAsync", - CloseAsync: "close" + DisplayDialogAsync: "displayDialogAsync", + CloseAsync: "close" }); OSF.DDA.SyncMethodNames.addNames({ - MessageParent: "messageParent", - AddMessageHandler: "addEventHandler", - SendMessage: "sendMessage" + MessageParent: "messageParent", + AddMessageHandler: "addEventHandler", + SendMessage: "sendMessage" }); -OSF.DDA.UI.ParentUI=function OSF_DDA_ParentUI() +OSF.DDA.UI.ParentUI = function OSF_DDA_ParentUI() { - var eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]); - var openDialogName=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName; - var target=this; - if(!target[openDialogName]) - OSF.OUtil.defineEnumerableProperty(target,openDialogName,{value: function() - { - var openDialog=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog]; - openDialog(arguments,eventDispatch,target) - }}); - OSF.OUtil.finalizeProperties(this) + var eventDispatch = new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]); + var openDialogName = OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName; + var target = this; + if(!target[openDialogName]) + OSF.OUtil.defineEnumerableProperty(target,openDialogName,{value: function() + { + var openDialog = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog]; + openDialog(arguments,eventDispatch,target) + }}); + OSF.OUtil.finalizeProperties(this) }; -OSF.DDA.UI.ChildUI=function OSF_DDA_ChildUI(isPopupWindow) +OSF.DDA.UI.ChildUI = function OSF_DDA_ChildUI(isPopupWindow) { - var messageParentName=OSF.DDA.SyncMethodNames.MessageParent.displayName; - var target=this; - if(!target[messageParentName]) - OSF.OUtil.defineEnumerableProperty(target,messageParentName,{value: function() - { - var messageParent=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent]; - return messageParent(arguments,target) - }}); - var addEventHandler=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; - if(!target[addEventHandler] && typeof OSF.DialogParentMessageEventDispatch !="undefined") - OSF.DDA.DispIdHost.addEventSupport(target,OSF.DialogParentMessageEventDispatch,isPopupWindow); - OSF.OUtil.finalizeProperties(this) + var messageParentName = OSF.DDA.SyncMethodNames.MessageParent.displayName; + var target = this; + if(!target[messageParentName]) + OSF.OUtil.defineEnumerableProperty(target,messageParentName,{value: function() + { + var messageParent = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent]; + return messageParent(arguments,target) + }}); + var addEventHandler = OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; + if(!target[addEventHandler] && typeof OSF.DialogParentMessageEventDispatch != "undefined") + OSF.DDA.DispIdHost.addEventSupport(target,OSF.DialogParentMessageEventDispatch,isPopupWindow); + OSF.OUtil.finalizeProperties(this) }; -OSF.DialogHandler=function OSF_DialogHandler(){}; -OSF.DDA.DialogEventArgs=function OSF_DDA_DialogEventArgs(message) +OSF.DialogHandler = function OSF_DialogHandler(){}; +OSF.DDA.DialogEventArgs = function OSF_DDA_DialogEventArgs(message) { - if(message[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived) - OSF.OUtil.defineEnumerableProperties(this,{ - type: {value: Microsoft.Office.WebExtension.EventType.DialogMessageReceived}, - message: {value: message[OSF.DDA.PropertyDescriptors.MessageContent]} - }); - else - OSF.OUtil.defineEnumerableProperties(this,{ - type: {value: Microsoft.Office.WebExtension.EventType.DialogEventReceived}, - error: {value: message[OSF.DDA.PropertyDescriptors.MessageType]} - }) + if(message[OSF.DDA.PropertyDescriptors.MessageType] == OSF.DialogMessageType.DialogMessageReceived) + OSF.OUtil.defineEnumerableProperties(this,{ + type: {value: Microsoft.Office.WebExtension.EventType.DialogMessageReceived}, + message: {value: message[OSF.DDA.PropertyDescriptors.MessageContent]} + }); + else + OSF.OUtil.defineEnumerableProperties(this,{ + type: {value: Microsoft.Office.WebExtension.EventType.DialogEventReceived}, + error: {value: message[OSF.DDA.PropertyDescriptors.MessageType]} + }) }; -OSF.DDA.DialogParentEventArgs=function OSF_DDA_DialogParentEventArgs(message) +OSF.DDA.DialogParentEventArgs = function OSF_DDA_DialogParentEventArgs(message) { - OSF.OUtil.defineEnumerableProperties(this,{ - type: {value: Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived}, - message: {value: message[OSF.DDA.PropertyDescriptors.MessageContent]} - }) + OSF.OUtil.defineEnumerableProperties(this,{ + type: {value: Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived}, + message: {value: message[OSF.DDA.PropertyDescriptors.MessageContent]} + }) }; OSF.DDA.AsyncMethodCalls.define({ - method: OSF.DDA.AsyncMethodNames.DisplayDialogAsync, - requiredArguments: [{ - name: Microsoft.Office.WebExtension.Parameters.Url, - types: ["string"] - }], - supportedOptions: [{ - name: Microsoft.Office.WebExtension.Parameters.Width, - value: { - types: ["number"], - defaultValue: 99 - } - },{ - name: Microsoft.Office.WebExtension.Parameters.Height, - value: { - types: ["number"], - defaultValue: 99 - } - },{ - name: Microsoft.Office.WebExtension.Parameters.RequireHTTPs, - value: { - types: ["boolean"], - defaultValue: true - } - },{ - name: Microsoft.Office.WebExtension.Parameters.DisplayInIframe, - value: { - types: ["boolean"], - defaultValue: false - } - },{ - name: Microsoft.Office.WebExtension.Parameters.HideTitle, - value: { - types: ["boolean"], - defaultValue: false - } - }], - privateStateCallbacks: [], - onSucceeded: function(args, caller, callArgs) - { - var targetId=args[Microsoft.Office.WebExtension.Parameters.Id]; - var eventDispatch=args[Microsoft.Office.WebExtension.Parameters.Data]; - var dialog=new OSF.DialogHandler; - var closeDialog=OSF.DDA.AsyncMethodNames.CloseAsync.displayName; - OSF.OUtil.defineEnumerableProperty(dialog,closeDialog,{value: function() - { - var closeDialogfunction=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog]; - closeDialogfunction(arguments,targetId,eventDispatch,dialog) - }}); - var addHandler=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; - OSF.OUtil.defineEnumerableProperty(dialog,addHandler,{value: function() - { - var syncMethodCall=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id]; - var callArgs=syncMethodCall.verifyAndExtractCall(arguments,dialog,eventDispatch); - var eventType=callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; - var handler=callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; - return eventDispatch.addEventHandlerAndFireQueuedEvent(eventType,handler) - }}); - var sendMessage=OSF.DDA.SyncMethodNames.SendMessage.displayName; - OSF.OUtil.defineEnumerableProperty(dialog,sendMessage,{value: function() - { - var execute=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; - return execute(arguments,eventDispatch,dialog) - }}); - return dialog - }, - checkCallArgs: function(callArgs, caller, stateInfo) - { - if(callArgs[Microsoft.Office.WebExtension.Parameters.Width] <=0) - callArgs[Microsoft.Office.WebExtension.Parameters.Width]=1; - if(callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) - callArgs[Microsoft.Office.WebExtension.Parameters.Width]=99; - if(callArgs[Microsoft.Office.WebExtension.Parameters.Height] <=0) - callArgs[Microsoft.Office.WebExtension.Parameters.Height]=1; - if(callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) - callArgs[Microsoft.Office.WebExtension.Parameters.Height]=99; - if(!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) - callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=true; - return callArgs - } + method: OSF.DDA.AsyncMethodNames.DisplayDialogAsync, + requiredArguments: [{ + name: Microsoft.Office.WebExtension.Parameters.Url, + types: ["string"] + }], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Width, + value: { + types: ["number"], + defaultValue: 99 + } + },{ + name: Microsoft.Office.WebExtension.Parameters.Height, + value: { + types: ["number"], + defaultValue: 99 + } + },{ + name: Microsoft.Office.WebExtension.Parameters.RequireHTTPs, + value: { + types: ["boolean"], + defaultValue: true + } + },{ + name: Microsoft.Office.WebExtension.Parameters.DisplayInIframe, + value: { + types: ["boolean"], + defaultValue: false + } + },{ + name: Microsoft.Office.WebExtension.Parameters.HideTitle, + value: { + types: ["boolean"], + defaultValue: false + } + },{ + name: Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels, + value: { + types: ["boolean"], + defaultValue: false + } + }], + privateStateCallbacks: [], + onSucceeded: function(args, caller, callArgs) + { + var targetId = args[Microsoft.Office.WebExtension.Parameters.Id]; + var eventDispatch = args[Microsoft.Office.WebExtension.Parameters.Data]; + var dialog = new OSF.DialogHandler; + var closeDialog = OSF.DDA.AsyncMethodNames.CloseAsync.displayName; + OSF.OUtil.defineEnumerableProperty(dialog,closeDialog,{value: function() + { + var closeDialogfunction = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog]; + closeDialogfunction(arguments,targetId,eventDispatch,dialog) + }}); + var addHandler = OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; + OSF.OUtil.defineEnumerableProperty(dialog,addHandler,{value: function() + { + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(arguments,dialog,eventDispatch); + var eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + var handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + return eventDispatch.addEventHandlerAndFireQueuedEvent(eventType,handler) + }}); + var sendMessage = OSF.DDA.SyncMethodNames.SendMessage.displayName; + OSF.OUtil.defineEnumerableProperty(dialog,sendMessage,{value: function() + { + var execute = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; + return execute(arguments,eventDispatch,dialog) + }}); + return dialog + }, + checkCallArgs: function(callArgs, caller, stateInfo) + { + if(callArgs[Microsoft.Office.WebExtension.Parameters.Width] <= 0) + callArgs[Microsoft.Office.WebExtension.Parameters.Width] = 1; + if(!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) + callArgs[Microsoft.Office.WebExtension.Parameters.Width] = 99; + if(callArgs[Microsoft.Office.WebExtension.Parameters.Height] <= 0) + callArgs[Microsoft.Office.WebExtension.Parameters.Height] = 1; + if(!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) + callArgs[Microsoft.Office.WebExtension.Parameters.Height] = 99; + if(!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) + callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs] = true; + return callArgs + } }); OSF.DDA.AsyncMethodCalls.define({ - method: OSF.DDA.AsyncMethodNames.CloseAsync, - requiredArguments: [], - supportedOptions: [], - privateStateCallbacks: [] + method: OSF.DDA.AsyncMethodNames.CloseAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [] }); OSF.DDA.SyncMethodCalls.define({ - method: OSF.DDA.SyncMethodNames.MessageParent, - requiredArguments: [{ - name: Microsoft.Office.WebExtension.Parameters.MessageToParent, - types: ["string","number","boolean"] - }], - supportedOptions: [] + method: OSF.DDA.SyncMethodNames.MessageParent, + requiredArguments: [{ + name: Microsoft.Office.WebExtension.Parameters.MessageToParent, + types: ["string","number","boolean"] + }], + supportedOptions: [] }); OSF.DDA.SyncMethodCalls.define({ - method: OSF.DDA.SyncMethodNames.AddMessageHandler, - requiredArguments: [{ - name: Microsoft.Office.WebExtension.Parameters.EventType, - "enum": Microsoft.Office.WebExtension.EventType, - verify: function(eventType, caller, eventDispatch) - { - return eventDispatch.supportsEvent(eventType) - } - },{ - name: Microsoft.Office.WebExtension.Parameters.Handler, - types: ["function"] - }], - supportedOptions: [] + method: OSF.DDA.SyncMethodNames.AddMessageHandler, + requiredArguments: [{ + name: Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + verify: function(eventType, caller, eventDispatch) + { + return eventDispatch.supportsEvent(eventType) + } + },{ + name: Microsoft.Office.WebExtension.Parameters.Handler, + types: ["function"] + }], + supportedOptions: [] }); OSF.DDA.SyncMethodCalls.define({ - method: OSF.DDA.SyncMethodNames.SendMessage, - requiredArguments: [{ - name: Microsoft.Office.WebExtension.Parameters.MessageContent, - types: ["string"] - }], - supportedOptions: [], - privateStateCallbacks: [] + method: OSF.DDA.SyncMethodNames.SendMessage, + requiredArguments: [{ + name: Microsoft.Office.WebExtension.Parameters.MessageContent, + types: ["string"] + }], + supportedOptions: [], + privateStateCallbacks: [] }); -OSF.DDA.SafeArray.Delegate.openDialog=function OSF_DDA_SafeArray_Delegate$OpenDialog(args) +OSF.DDA.SafeArray.Delegate.openDialog = function OSF_DDA_SafeArray_Delegate$OpenDialog(args) { - try - { - if(args.onCalling) - args.onCalling(); - var callback=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true,args); - OSF.ClientHostController.openDialog(args.dispId,args.targetId,function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) - { - if(args.onEvent) - args.onEvent(payload); - if(OSF.AppTelemetry) - OSF.AppTelemetry.onEventDone(args.dispId) - },callback) - } - catch(ex) - { - OSF.DDA.SafeArray.Delegate._onException(ex,args) - } + try + { + if(args.onCalling) + args.onCalling(); + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true,args); + OSF.ClientHostController.openDialog(args.dispId,args.targetId,function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) + { + if(args.onEvent) + args.onEvent(payload); + if(OSF.AppTelemetry) + OSF.AppTelemetry.onEventDone(args.dispId) + },callback) + } + catch(ex) + { + OSF.DDA.SafeArray.Delegate._onException(ex,args) + } }; -OSF.DDA.SafeArray.Delegate.closeDialog=function OSF_DDA_SafeArray_Delegate$CloseDialog(args) +OSF.DDA.SafeArray.Delegate.closeDialog = function OSF_DDA_SafeArray_Delegate$CloseDialog(args) { - if(args.onCalling) - args.onCalling(); - var callback=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false,args); - try - { - OSF.ClientHostController.closeDialog(args.dispId,args.targetId,callback) - } - catch(ex) - { - OSF.DDA.SafeArray.Delegate._onException(ex,args) - } + if(args.onCalling) + args.onCalling(); + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false,args); + try + { + OSF.ClientHostController.closeDialog(args.dispId,args.targetId,callback) + } + catch(ex) + { + OSF.DDA.SafeArray.Delegate._onException(ex,args) + } }; -OSF.DDA.SafeArray.Delegate.messageParent=function OSF_DDA_SafeArray_Delegate$MessageParent(args) +OSF.DDA.SafeArray.Delegate.messageParent = function OSF_DDA_SafeArray_Delegate$MessageParent(args) { - try - { - if(args.onCalling) - args.onCalling(); - var startTime=(new Date).getTime(); - var result=OSF.ClientHostController.messageParent(args.hostCallArgs); - if(args.onReceiving) - args.onReceiving(); - if(OSF.AppTelemetry) - OSF.AppTelemetry.onMethodDone(args.dispId,args.hostCallArgs,Math.abs((new Date).getTime() - startTime),result); - return result - } - catch(ex) - { - return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(ex) - } + try + { + if(args.onCalling) + args.onCalling(); + var startTime = (new Date).getTime(); + var result = OSF.ClientHostController.messageParent(args.hostCallArgs); + if(args.onReceiving) + args.onReceiving(); + if(OSF.AppTelemetry) + OSF.AppTelemetry.onMethodDone(args.dispId,args.hostCallArgs,Math.abs((new Date).getTime() - startTime),result); + return result + } + catch(ex) + { + return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(ex) + } }; OSF.DDA.SafeArray.Delegate.ParameterMap.define({ - type: OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent, - fromHost: [{ - name: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, - value: OSF.DDA.SafeArray.Delegate.ParameterMap.self - }], - isComplexType: true + type: OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent, + fromHost: [{ + name: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, + value: OSF.DDA.SafeArray.Delegate.ParameterMap.self + }], + isComplexType: true }); OSF.DDA.SafeArray.Delegate.ParameterMap.define({ - type: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, - fromHost: [{ - name: OSF.DDA.PropertyDescriptors.MessageType, - value: 0 - },{ - name: OSF.DDA.PropertyDescriptors.MessageContent, - value: 1 - }], - isComplexType: true + type: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, + fromHost: [{ + name: OSF.DDA.PropertyDescriptors.MessageType, + value: 0 + },{ + name: OSF.DDA.PropertyDescriptors.MessageContent, + value: 1 + }], + isComplexType: true }); -OSF.DDA.SafeArray.Delegate.sendMessage=function OSF_DDA_SafeArray_Delegate$SendMessage(args) +OSF.DDA.SafeArray.Delegate.sendMessage = function OSF_DDA_SafeArray_Delegate$SendMessage(args) { - try - { - if(args.onCalling) - args.onCalling(); - var startTime=(new Date).getTime(); - var result=OSF.ClientHostController.sendMessage(args.hostCallArgs); - if(args.onReceiving) - args.onReceiving(); - return result - } - catch(ex) - { - return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(ex) - } + try + { + if(args.onCalling) + args.onCalling(); + var startTime = (new Date).getTime(); + var result = OSF.ClientHostController.sendMessage(args.hostCallArgs); + if(args.onReceiving) + args.onReceiving(); + return result + } + catch(ex) + { + return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(ex) + } }; OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ItemChanged: "olkItemSelectedChanged"}); OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{OlkItemSelectedData: "OlkItemSelectedData"}); -OSF.DDA.OlkItemSelectedChangedEventArgs=function OSF_DDA_OlkItemSelectedChangedEventArgs(eventData) +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{RecipientsChanged: "olkRecipientsChanged"}); +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{OlkRecipientsData: "OlkRecipientsData"}); +OSF.DDA.OlkRecipientsChangedEventArgs = function OSF_DDA_OlkRecipientsChangedEventArgs(eventData) +{ + var changedRecipientFields = eventData[OSF.DDA.EventDescriptors.OlkRecipientsData][0]; + if(changedRecipientFields === "") + changedRecipientFields = null; + OSF.OUtil.defineEnumerableProperties(this,{ + type: {value: Microsoft.Office.WebExtension.EventType.RecipientsChanged}, + changedRecipientFields: {value: JSON.parse(changedRecipientFields)} + }) +}; +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppointmentTimeChanged: "olkAppointmentTimeChanged"}); +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{OlkAppointmentTimeChangedData: "OlkAppointmentTimeChangedData"}); +OSF.DDA.OlkAppointmentTimeChangedEventArgs = function OSF_DDA_OlkAppointmentTimeChangedEventArgs(eventData) { - var initialDataSource=eventData[OSF.DDA.EventDescriptors.OlkItemSelectedData][0]; - if(initialDataSource==="") - initialDataSource=null; - OSF.OUtil.defineEnumerableProperties(this,{ - type: {value: Microsoft.Office.WebExtension.EventType.ItemChanged}, - initialData: {value: JSON.parse(initialDataSource)}, - itemNumber: {value: JSON.parse(eventData[OSF.DDA.EventDescriptors.OlkItemSelectedData][1])} - }) + var appointmentTimeString = eventData[OSF.DDA.EventDescriptors.OlkAppointmentTimeChangedData][0]; + var start; + var end; + try + { + var appointmentTime = JSON.parse(appointmentTimeString); + start = new Date(appointmentTime.start).toISOString(); + end = new Date(appointmentTime.end).toISOString() + } + catch(e) + { + start = null; + end = null + } + OSF.OUtil.defineEnumerableProperties(this,{ + type: {value: Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged}, + start: {value: start}, + end: {value: end} + }) }; +OSF.DDA.OlkItemSelectedChangedEventArgs = function OSF_DDA_OlkItemSelectedChangedEventArgs(eventData) +{ + var initialDataSource = eventData[OSF.DDA.EventDescriptors.OlkItemSelectedData][0]; + if(initialDataSource === "") + initialDataSource = null; + OSF.OUtil.defineEnumerableProperties(this,{ + type: {value: Microsoft.Office.WebExtension.EventType.ItemChanged}, + initialData: {value: JSON.parse(initialDataSource)}, + itemNumber: {value: JSON.parse(eventData[OSF.DDA.EventDescriptors.OlkItemSelectedData][1])} + }) +}; +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidOlkItemSelectedChangedEvent, + fromHost: [{ + name: OSF.DDA.EventDescriptors.OlkItemSelectedData, + value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData + }], + isComplexType: true +}); OSF.DDA.SafeArray.Delegate.ParameterMap.define({ - type: OSF.DDA.EventDispId.dispidOlkItemSelectedChangedEvent, - fromHost: [{ - name: OSF.DDA.EventDescriptors.OlkItemSelectedData, - value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData - }], - isComplexType: true + type: OSF.DDA.EventDispId.dispidOlkRecipientsChangedEvent, + fromHost: [{ + name: OSF.DDA.EventDescriptors.OlkRecipientsData, + value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData + }], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidOlkAppointmentTimeChangedEvent, + fromHost: [{ + name: OSF.DDA.EventDescriptors.OlkAppointmentTimeChangedData, + value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData + }], + isComplexType: true }); var OSFLog; (function(OSFLog) { - var BaseUsageData=function() - { - function BaseUsageData(table) - { - this._table=table; - this._fields={} - } - Object.defineProperty(BaseUsageData.prototype,"Fields",{ - get: function() - { - return this._fields - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(BaseUsageData.prototype,"Table",{ - get: function() - { - return this._table - }, - enumerable: true, - configurable: true - }); - BaseUsageData.prototype.SerializeFields=function(){}; - BaseUsageData.prototype.SetSerializedField=function(key, value) - { - if(typeof value !=="undefined" && value !==null) - this._serializedFields[key]=value.toString() - }; - BaseUsageData.prototype.SerializeRow=function() - { - this._serializedFields={}; - this.SetSerializedField("Table",this._table); - this.SerializeFields(); - return JSON.stringify(this._serializedFields) - }; - return BaseUsageData - }(); - OSFLog.BaseUsageData=BaseUsageData; - var AppActivatedUsageData=function(_super) - { - __extends(AppActivatedUsageData,_super); - function AppActivatedUsageData() - { - _super.call(this,"AppActivated") - } - Object.defineProperty(AppActivatedUsageData.prototype,"CorrelationId",{ - get: function() - { - return this.Fields["CorrelationId"] - }, - set: function(value) - { - this.Fields["CorrelationId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"SessionId",{ - get: function() - { - return this.Fields["SessionId"] - }, - set: function(value) - { - this.Fields["SessionId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"AppId",{ - get: function() - { - return this.Fields["AppId"] - }, - set: function(value) - { - this.Fields["AppId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"AppInstanceId",{ - get: function() - { - return this.Fields["AppInstanceId"] - }, - set: function(value) - { - this.Fields["AppInstanceId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"AppURL",{ - get: function() - { - return this.Fields["AppURL"] - }, - set: function(value) - { - this.Fields["AppURL"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"AssetId",{ - get: function() - { - return this.Fields["AssetId"] - }, - set: function(value) - { - this.Fields["AssetId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"Browser",{ - get: function() - { - return this.Fields["Browser"] - }, - set: function(value) - { - this.Fields["Browser"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"UserId",{ - get: function() - { - return this.Fields["UserId"] - }, - set: function(value) - { - this.Fields["UserId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"Host",{ - get: function() - { - return this.Fields["Host"] - }, - set: function(value) - { - this.Fields["Host"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"HostVersion",{ - get: function() - { - return this.Fields["HostVersion"] - }, - set: function(value) - { - this.Fields["HostVersion"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"ClientId",{ - get: function() - { - return this.Fields["ClientId"] - }, - set: function(value) - { - this.Fields["ClientId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"AppSizeWidth",{ - get: function() - { - return this.Fields["AppSizeWidth"] - }, - set: function(value) - { - this.Fields["AppSizeWidth"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"AppSizeHeight",{ - get: function() - { - return this.Fields["AppSizeHeight"] - }, - set: function(value) - { - this.Fields["AppSizeHeight"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"Message",{ - get: function() - { - return this.Fields["Message"] - }, - set: function(value) - { - this.Fields["Message"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"DocUrl",{ - get: function() - { - return this.Fields["DocUrl"] - }, - set: function(value) - { - this.Fields["DocUrl"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"OfficeJSVersion",{ - get: function() - { - return this.Fields["OfficeJSVersion"] - }, - set: function(value) - { - this.Fields["OfficeJSVersion"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"HostJSVersion",{ - get: function() - { - return this.Fields["HostJSVersion"] - }, - set: function(value) - { - this.Fields["HostJSVersion"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"WacHostEnvironment",{ - get: function() - { - return this.Fields["WacHostEnvironment"] - }, - set: function(value) - { - this.Fields["WacHostEnvironment"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"IsFromWacAutomation",{ - get: function() - { - return this.Fields["IsFromWacAutomation"] - }, - set: function(value) - { - this.Fields["IsFromWacAutomation"]=value - }, - enumerable: true, - configurable: true - }); - AppActivatedUsageData.prototype.SerializeFields=function() - { - this.SetSerializedField("CorrelationId",this.CorrelationId); - this.SetSerializedField("SessionId",this.SessionId); - this.SetSerializedField("AppId",this.AppId); - this.SetSerializedField("AppInstanceId",this.AppInstanceId); - this.SetSerializedField("AppURL",this.AppURL); - this.SetSerializedField("AssetId",this.AssetId); - this.SetSerializedField("Browser",this.Browser); - this.SetSerializedField("UserId",this.UserId); - this.SetSerializedField("Host",this.Host); - this.SetSerializedField("HostVersion",this.HostVersion); - this.SetSerializedField("ClientId",this.ClientId); - this.SetSerializedField("AppSizeWidth",this.AppSizeWidth); - this.SetSerializedField("AppSizeHeight",this.AppSizeHeight); - this.SetSerializedField("Message",this.Message); - this.SetSerializedField("DocUrl",this.DocUrl); - this.SetSerializedField("OfficeJSVersion",this.OfficeJSVersion); - this.SetSerializedField("HostJSVersion",this.HostJSVersion); - this.SetSerializedField("WacHostEnvironment",this.WacHostEnvironment); - this.SetSerializedField("IsFromWacAutomation",this.IsFromWacAutomation) - }; - return AppActivatedUsageData - }(BaseUsageData); - OSFLog.AppActivatedUsageData=AppActivatedUsageData; - var ScriptLoadUsageData=function(_super) - { - __extends(ScriptLoadUsageData,_super); - function ScriptLoadUsageData() - { - _super.call(this,"ScriptLoad") - } - Object.defineProperty(ScriptLoadUsageData.prototype,"CorrelationId",{ - get: function() - { - return this.Fields["CorrelationId"] - }, - set: function(value) - { - this.Fields["CorrelationId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ScriptLoadUsageData.prototype,"SessionId",{ - get: function() - { - return this.Fields["SessionId"] - }, - set: function(value) - { - this.Fields["SessionId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ScriptLoadUsageData.prototype,"ScriptId",{ - get: function() - { - return this.Fields["ScriptId"] - }, - set: function(value) - { - this.Fields["ScriptId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ScriptLoadUsageData.prototype,"StartTime",{ - get: function() - { - return this.Fields["StartTime"] - }, - set: function(value) - { - this.Fields["StartTime"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ScriptLoadUsageData.prototype,"ResponseTime",{ - get: function() - { - return this.Fields["ResponseTime"] - }, - set: function(value) - { - this.Fields["ResponseTime"]=value - }, - enumerable: true, - configurable: true - }); - ScriptLoadUsageData.prototype.SerializeFields=function() - { - this.SetSerializedField("CorrelationId",this.CorrelationId); - this.SetSerializedField("SessionId",this.SessionId); - this.SetSerializedField("ScriptId",this.ScriptId); - this.SetSerializedField("StartTime",this.StartTime); - this.SetSerializedField("ResponseTime",this.ResponseTime) - }; - return ScriptLoadUsageData - }(BaseUsageData); - OSFLog.ScriptLoadUsageData=ScriptLoadUsageData; - var AppClosedUsageData=function(_super) - { - __extends(AppClosedUsageData,_super); - function AppClosedUsageData() - { - _super.call(this,"AppClosed") - } - Object.defineProperty(AppClosedUsageData.prototype,"CorrelationId",{ - get: function() - { - return this.Fields["CorrelationId"] - }, - set: function(value) - { - this.Fields["CorrelationId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppClosedUsageData.prototype,"SessionId",{ - get: function() - { - return this.Fields["SessionId"] - }, - set: function(value) - { - this.Fields["SessionId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppClosedUsageData.prototype,"FocusTime",{ - get: function() - { - return this.Fields["FocusTime"] - }, - set: function(value) - { - this.Fields["FocusTime"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppClosedUsageData.prototype,"AppSizeFinalWidth",{ - get: function() - { - return this.Fields["AppSizeFinalWidth"] - }, - set: function(value) - { - this.Fields["AppSizeFinalWidth"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppClosedUsageData.prototype,"AppSizeFinalHeight",{ - get: function() - { - return this.Fields["AppSizeFinalHeight"] - }, - set: function(value) - { - this.Fields["AppSizeFinalHeight"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppClosedUsageData.prototype,"OpenTime",{ - get: function() - { - return this.Fields["OpenTime"] - }, - set: function(value) - { - this.Fields["OpenTime"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppClosedUsageData.prototype,"CloseMethod",{ - get: function() - { - return this.Fields["CloseMethod"] - }, - set: function(value) - { - this.Fields["CloseMethod"]=value - }, - enumerable: true, - configurable: true - }); - AppClosedUsageData.prototype.SerializeFields=function() - { - this.SetSerializedField("CorrelationId",this.CorrelationId); - this.SetSerializedField("SessionId",this.SessionId); - this.SetSerializedField("FocusTime",this.FocusTime); - this.SetSerializedField("AppSizeFinalWidth",this.AppSizeFinalWidth); - this.SetSerializedField("AppSizeFinalHeight",this.AppSizeFinalHeight); - this.SetSerializedField("OpenTime",this.OpenTime); - this.SetSerializedField("CloseMethod",this.CloseMethod) - }; - return AppClosedUsageData - }(BaseUsageData); - OSFLog.AppClosedUsageData=AppClosedUsageData; - var APIUsageUsageData=function(_super) - { - __extends(APIUsageUsageData,_super); - function APIUsageUsageData() - { - _super.call(this,"APIUsage") - } - Object.defineProperty(APIUsageUsageData.prototype,"CorrelationId",{ - get: function() - { - return this.Fields["CorrelationId"] - }, - set: function(value) - { - this.Fields["CorrelationId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(APIUsageUsageData.prototype,"SessionId",{ - get: function() - { - return this.Fields["SessionId"] - }, - set: function(value) - { - this.Fields["SessionId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(APIUsageUsageData.prototype,"APIType",{ - get: function() - { - return this.Fields["APIType"] - }, - set: function(value) - { - this.Fields["APIType"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(APIUsageUsageData.prototype,"APIID",{ - get: function() - { - return this.Fields["APIID"] - }, - set: function(value) - { - this.Fields["APIID"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(APIUsageUsageData.prototype,"Parameters",{ - get: function() - { - return this.Fields["Parameters"] - }, - set: function(value) - { - this.Fields["Parameters"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(APIUsageUsageData.prototype,"ResponseTime",{ - get: function() - { - return this.Fields["ResponseTime"] - }, - set: function(value) - { - this.Fields["ResponseTime"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(APIUsageUsageData.prototype,"ErrorType",{ - get: function() - { - return this.Fields["ErrorType"] - }, - set: function(value) - { - this.Fields["ErrorType"]=value - }, - enumerable: true, - configurable: true - }); - APIUsageUsageData.prototype.SerializeFields=function() - { - this.SetSerializedField("CorrelationId",this.CorrelationId); - this.SetSerializedField("SessionId",this.SessionId); - this.SetSerializedField("APIType",this.APIType); - this.SetSerializedField("APIID",this.APIID); - this.SetSerializedField("Parameters",this.Parameters); - this.SetSerializedField("ResponseTime",this.ResponseTime); - this.SetSerializedField("ErrorType",this.ErrorType) - }; - return APIUsageUsageData - }(BaseUsageData); - OSFLog.APIUsageUsageData=APIUsageUsageData; - var AppInitializationUsageData=function(_super) - { - __extends(AppInitializationUsageData,_super); - function AppInitializationUsageData() - { - _super.call(this,"AppInitialization") - } - Object.defineProperty(AppInitializationUsageData.prototype,"CorrelationId",{ - get: function() - { - return this.Fields["CorrelationId"] - }, - set: function(value) - { - this.Fields["CorrelationId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppInitializationUsageData.prototype,"SessionId",{ - get: function() - { - return this.Fields["SessionId"] - }, - set: function(value) - { - this.Fields["SessionId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppInitializationUsageData.prototype,"SuccessCode",{ - get: function() - { - return this.Fields["SuccessCode"] - }, - set: function(value) - { - this.Fields["SuccessCode"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppInitializationUsageData.prototype,"Message",{ - get: function() - { - return this.Fields["Message"] - }, - set: function(value) - { - this.Fields["Message"]=value - }, - enumerable: true, - configurable: true - }); - AppInitializationUsageData.prototype.SerializeFields=function() - { - this.SetSerializedField("CorrelationId",this.CorrelationId); - this.SetSerializedField("SessionId",this.SessionId); - this.SetSerializedField("SuccessCode",this.SuccessCode); - this.SetSerializedField("Message",this.Message) - }; - return AppInitializationUsageData - }(BaseUsageData); - OSFLog.AppInitializationUsageData=AppInitializationUsageData -})(OSFLog || (OSFLog={})); + var BaseUsageData = function() + { + function BaseUsageData(table) + { + this._table = table; + this._fields = {} + } + Object.defineProperty(BaseUsageData.prototype,"Fields",{ + get: function() + { + return this._fields + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(BaseUsageData.prototype,"Table",{ + get: function() + { + return this._table + }, + enumerable: true, + configurable: true + }); + BaseUsageData.prototype.SerializeFields = function(){}; + BaseUsageData.prototype.SetSerializedField = function(key, value) + { + if(typeof value !== "undefined" && value !== null) + this._serializedFields[key] = value.toString() + }; + BaseUsageData.prototype.SerializeRow = function() + { + this._serializedFields = {}; + this.SetSerializedField("Table",this._table); + this.SerializeFields(); + return JSON.stringify(this._serializedFields) + }; + return BaseUsageData + }(); + OSFLog.BaseUsageData = BaseUsageData; + var AppActivatedUsageData = function(_super) + { + __extends(AppActivatedUsageData,_super); + function AppActivatedUsageData() + { + _super.call(this,"AppActivated") + } + Object.defineProperty(AppActivatedUsageData.prototype,"CorrelationId",{ + get: function() + { + return this.Fields["CorrelationId"] + }, + set: function(value) + { + this.Fields["CorrelationId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"SessionId",{ + get: function() + { + return this.Fields["SessionId"] + }, + set: function(value) + { + this.Fields["SessionId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"AppId",{ + get: function() + { + return this.Fields["AppId"] + }, + set: function(value) + { + this.Fields["AppId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"AppInstanceId",{ + get: function() + { + return this.Fields["AppInstanceId"] + }, + set: function(value) + { + this.Fields["AppInstanceId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"AppURL",{ + get: function() + { + return this.Fields["AppURL"] + }, + set: function(value) + { + this.Fields["AppURL"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"AssetId",{ + get: function() + { + return this.Fields["AssetId"] + }, + set: function(value) + { + this.Fields["AssetId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"Browser",{ + get: function() + { + return this.Fields["Browser"] + }, + set: function(value) + { + this.Fields["Browser"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"UserId",{ + get: function() + { + return this.Fields["UserId"] + }, + set: function(value) + { + this.Fields["UserId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"Host",{ + get: function() + { + return this.Fields["Host"] + }, + set: function(value) + { + this.Fields["Host"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"HostVersion",{ + get: function() + { + return this.Fields["HostVersion"] + }, + set: function(value) + { + this.Fields["HostVersion"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"ClientId",{ + get: function() + { + return this.Fields["ClientId"] + }, + set: function(value) + { + this.Fields["ClientId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"AppSizeWidth",{ + get: function() + { + return this.Fields["AppSizeWidth"] + }, + set: function(value) + { + this.Fields["AppSizeWidth"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"AppSizeHeight",{ + get: function() + { + return this.Fields["AppSizeHeight"] + }, + set: function(value) + { + this.Fields["AppSizeHeight"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"Message",{ + get: function() + { + return this.Fields["Message"] + }, + set: function(value) + { + this.Fields["Message"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"DocUrl",{ + get: function() + { + return this.Fields["DocUrl"] + }, + set: function(value) + { + this.Fields["DocUrl"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"OfficeJSVersion",{ + get: function() + { + return this.Fields["OfficeJSVersion"] + }, + set: function(value) + { + this.Fields["OfficeJSVersion"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"HostJSVersion",{ + get: function() + { + return this.Fields["HostJSVersion"] + }, + set: function(value) + { + this.Fields["HostJSVersion"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"WacHostEnvironment",{ + get: function() + { + return this.Fields["WacHostEnvironment"] + }, + set: function(value) + { + this.Fields["WacHostEnvironment"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"IsFromWacAutomation",{ + get: function() + { + return this.Fields["IsFromWacAutomation"] + }, + set: function(value) + { + this.Fields["IsFromWacAutomation"] = value + }, + enumerable: true, + configurable: true + }); + AppActivatedUsageData.prototype.SerializeFields = function() + { + this.SetSerializedField("CorrelationId",this.CorrelationId); + this.SetSerializedField("SessionId",this.SessionId); + this.SetSerializedField("AppId",this.AppId); + this.SetSerializedField("AppInstanceId",this.AppInstanceId); + this.SetSerializedField("AppURL",this.AppURL); + this.SetSerializedField("AssetId",this.AssetId); + this.SetSerializedField("Browser",this.Browser); + this.SetSerializedField("UserId",this.UserId); + this.SetSerializedField("Host",this.Host); + this.SetSerializedField("HostVersion",this.HostVersion); + this.SetSerializedField("ClientId",this.ClientId); + this.SetSerializedField("AppSizeWidth",this.AppSizeWidth); + this.SetSerializedField("AppSizeHeight",this.AppSizeHeight); + this.SetSerializedField("Message",this.Message); + this.SetSerializedField("DocUrl",this.DocUrl); + this.SetSerializedField("OfficeJSVersion",this.OfficeJSVersion); + this.SetSerializedField("HostJSVersion",this.HostJSVersion); + this.SetSerializedField("WacHostEnvironment",this.WacHostEnvironment); + this.SetSerializedField("IsFromWacAutomation",this.IsFromWacAutomation) + }; + return AppActivatedUsageData + }(BaseUsageData); + OSFLog.AppActivatedUsageData = AppActivatedUsageData; + var ScriptLoadUsageData = function(_super) + { + __extends(ScriptLoadUsageData,_super); + function ScriptLoadUsageData() + { + _super.call(this,"ScriptLoad") + } + Object.defineProperty(ScriptLoadUsageData.prototype,"CorrelationId",{ + get: function() + { + return this.Fields["CorrelationId"] + }, + set: function(value) + { + this.Fields["CorrelationId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype,"SessionId",{ + get: function() + { + return this.Fields["SessionId"] + }, + set: function(value) + { + this.Fields["SessionId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype,"ScriptId",{ + get: function() + { + return this.Fields["ScriptId"] + }, + set: function(value) + { + this.Fields["ScriptId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype,"StartTime",{ + get: function() + { + return this.Fields["StartTime"] + }, + set: function(value) + { + this.Fields["StartTime"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype,"ResponseTime",{ + get: function() + { + return this.Fields["ResponseTime"] + }, + set: function(value) + { + this.Fields["ResponseTime"] = value + }, + enumerable: true, + configurable: true + }); + ScriptLoadUsageData.prototype.SerializeFields = function() + { + this.SetSerializedField("CorrelationId",this.CorrelationId); + this.SetSerializedField("SessionId",this.SessionId); + this.SetSerializedField("ScriptId",this.ScriptId); + this.SetSerializedField("StartTime",this.StartTime); + this.SetSerializedField("ResponseTime",this.ResponseTime) + }; + return ScriptLoadUsageData + }(BaseUsageData); + OSFLog.ScriptLoadUsageData = ScriptLoadUsageData; + var AppClosedUsageData = function(_super) + { + __extends(AppClosedUsageData,_super); + function AppClosedUsageData() + { + _super.call(this,"AppClosed") + } + Object.defineProperty(AppClosedUsageData.prototype,"CorrelationId",{ + get: function() + { + return this.Fields["CorrelationId"] + }, + set: function(value) + { + this.Fields["CorrelationId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype,"SessionId",{ + get: function() + { + return this.Fields["SessionId"] + }, + set: function(value) + { + this.Fields["SessionId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype,"FocusTime",{ + get: function() + { + return this.Fields["FocusTime"] + }, + set: function(value) + { + this.Fields["FocusTime"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype,"AppSizeFinalWidth",{ + get: function() + { + return this.Fields["AppSizeFinalWidth"] + }, + set: function(value) + { + this.Fields["AppSizeFinalWidth"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype,"AppSizeFinalHeight",{ + get: function() + { + return this.Fields["AppSizeFinalHeight"] + }, + set: function(value) + { + this.Fields["AppSizeFinalHeight"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype,"OpenTime",{ + get: function() + { + return this.Fields["OpenTime"] + }, + set: function(value) + { + this.Fields["OpenTime"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype,"CloseMethod",{ + get: function() + { + return this.Fields["CloseMethod"] + }, + set: function(value) + { + this.Fields["CloseMethod"] = value + }, + enumerable: true, + configurable: true + }); + AppClosedUsageData.prototype.SerializeFields = function() + { + this.SetSerializedField("CorrelationId",this.CorrelationId); + this.SetSerializedField("SessionId",this.SessionId); + this.SetSerializedField("FocusTime",this.FocusTime); + this.SetSerializedField("AppSizeFinalWidth",this.AppSizeFinalWidth); + this.SetSerializedField("AppSizeFinalHeight",this.AppSizeFinalHeight); + this.SetSerializedField("OpenTime",this.OpenTime); + this.SetSerializedField("CloseMethod",this.CloseMethod) + }; + return AppClosedUsageData + }(BaseUsageData); + OSFLog.AppClosedUsageData = AppClosedUsageData; + var APIUsageUsageData = function(_super) + { + __extends(APIUsageUsageData,_super); + function APIUsageUsageData() + { + _super.call(this,"APIUsage") + } + Object.defineProperty(APIUsageUsageData.prototype,"CorrelationId",{ + get: function() + { + return this.Fields["CorrelationId"] + }, + set: function(value) + { + this.Fields["CorrelationId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype,"SessionId",{ + get: function() + { + return this.Fields["SessionId"] + }, + set: function(value) + { + this.Fields["SessionId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype,"APIType",{ + get: function() + { + return this.Fields["APIType"] + }, + set: function(value) + { + this.Fields["APIType"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype,"APIID",{ + get: function() + { + return this.Fields["APIID"] + }, + set: function(value) + { + this.Fields["APIID"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype,"Parameters",{ + get: function() + { + return this.Fields["Parameters"] + }, + set: function(value) + { + this.Fields["Parameters"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype,"ResponseTime",{ + get: function() + { + return this.Fields["ResponseTime"] + }, + set: function(value) + { + this.Fields["ResponseTime"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype,"ErrorType",{ + get: function() + { + return this.Fields["ErrorType"] + }, + set: function(value) + { + this.Fields["ErrorType"] = value + }, + enumerable: true, + configurable: true + }); + APIUsageUsageData.prototype.SerializeFields = function() + { + this.SetSerializedField("CorrelationId",this.CorrelationId); + this.SetSerializedField("SessionId",this.SessionId); + this.SetSerializedField("APIType",this.APIType); + this.SetSerializedField("APIID",this.APIID); + this.SetSerializedField("Parameters",this.Parameters); + this.SetSerializedField("ResponseTime",this.ResponseTime); + this.SetSerializedField("ErrorType",this.ErrorType) + }; + return APIUsageUsageData + }(BaseUsageData); + OSFLog.APIUsageUsageData = APIUsageUsageData; + var AppInitializationUsageData = function(_super) + { + __extends(AppInitializationUsageData,_super); + function AppInitializationUsageData() + { + _super.call(this,"AppInitialization") + } + Object.defineProperty(AppInitializationUsageData.prototype,"CorrelationId",{ + get: function() + { + return this.Fields["CorrelationId"] + }, + set: function(value) + { + this.Fields["CorrelationId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype,"SessionId",{ + get: function() + { + return this.Fields["SessionId"] + }, + set: function(value) + { + this.Fields["SessionId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype,"SuccessCode",{ + get: function() + { + return this.Fields["SuccessCode"] + }, + set: function(value) + { + this.Fields["SuccessCode"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype,"Message",{ + get: function() + { + return this.Fields["Message"] + }, + set: function(value) + { + this.Fields["Message"] = value + }, + enumerable: true, + configurable: true + }); + AppInitializationUsageData.prototype.SerializeFields = function() + { + this.SetSerializedField("CorrelationId",this.CorrelationId); + this.SetSerializedField("SessionId",this.SessionId); + this.SetSerializedField("SuccessCode",this.SuccessCode); + this.SetSerializedField("Message",this.Message) + }; + return AppInitializationUsageData + }(BaseUsageData); + OSFLog.AppInitializationUsageData = AppInitializationUsageData +})(OSFLog || (OSFLog = {})); var Logger; (function(Logger) { - "use strict"; - (function(TraceLevel) - { - TraceLevel[TraceLevel["info"]=0]="info"; - TraceLevel[TraceLevel["warning"]=1]="warning"; - TraceLevel[TraceLevel["error"]=2]="error" - })(Logger.TraceLevel || (Logger.TraceLevel={})); - var TraceLevel=Logger.TraceLevel; - (function(SendFlag) - { - SendFlag[SendFlag["none"]=0]="none"; - SendFlag[SendFlag["flush"]=1]="flush" - })(Logger.SendFlag || (Logger.SendFlag={})); - var SendFlag=Logger.SendFlag; - function allowUploadingData() - { - if(OSF.Logger && OSF.Logger.ulsEndpoint) - OSF.Logger.ulsEndpoint.loadProxyFrame() - } - Logger.allowUploadingData=allowUploadingData; - function sendLog(traceLevel, message, flag) - { - if(OSF.Logger && OSF.Logger.ulsEndpoint) - { - var jsonObj={ - traceLevel: traceLevel, - message: message, - flag: flag, - internalLog: true - }; - var logs=JSON.stringify(jsonObj); - OSF.Logger.ulsEndpoint.writeLog(logs) - } - } - Logger.sendLog=sendLog; - function creatULSEndpoint() - { - try - { - return new ULSEndpointProxy - } - catch(e) - { - return null - } - } - var ULSEndpointProxy=function() - { - function ULSEndpointProxy() - { - var _this=this; - this.proxyFrame=null; - this.telemetryEndPoint="https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html"; - this.buffer=[]; - this.proxyFrameReady=false; - OSF.OUtil.addEventListener(window,"message",function(e) - { - return _this.tellProxyFrameReady(e) - }); - setTimeout(function() - { - _this.loadProxyFrame() - },3e3) - } - ULSEndpointProxy.prototype.writeLog=function(log) - { - if(this.proxyFrameReady===true) - this.proxyFrame.contentWindow.postMessage(log,ULSEndpointProxy.telemetryOrigin); - else if(this.buffer.length < 128) - this.buffer.push(log) - }; - ULSEndpointProxy.prototype.loadProxyFrame=function() - { - if(this.proxyFrame==null) - { - this.proxyFrame=document.createElement("iframe"); - this.proxyFrame.setAttribute("style","display:none"); - this.proxyFrame.setAttribute("src",this.telemetryEndPoint); - document.head.appendChild(this.proxyFrame) - } - }; - ULSEndpointProxy.prototype.tellProxyFrameReady=function(e) - { - var _this=this; - if(e.data==="ProxyFrameReadyToLog") - { - this.proxyFrameReady=true; - for(var i=0; i < this.buffer.length; i++) - this.writeLog(this.buffer[i]); - this.buffer.length=0; - OSF.OUtil.removeEventListener(window,"message",function(e) - { - return _this.tellProxyFrameReady(e) - }) - } - else if(e.data==="ProxyFrameReadyToInit") - { - var initJson={ - appName: "Office APPs", - sessionId: OSF.OUtil.Guid.generateNewGuid() - }; - var initStr=JSON.stringify(initJson); - this.proxyFrame.contentWindow.postMessage(initStr,ULSEndpointProxy.telemetryOrigin) - } - }; - ULSEndpointProxy.telemetryOrigin="https://telemetryservice.firstpartyapps.oaspapps.com"; - return ULSEndpointProxy - }(); - if(!OSF.Logger) - OSF.Logger=Logger; - Logger.ulsEndpoint=creatULSEndpoint() -})(Logger || (Logger={})); + "use strict"; + (function(TraceLevel) + { + TraceLevel[TraceLevel["info"] = 0] = "info"; + TraceLevel[TraceLevel["warning"] = 1] = "warning"; + TraceLevel[TraceLevel["error"] = 2] = "error" + })(Logger.TraceLevel || (Logger.TraceLevel = {})); + var TraceLevel = Logger.TraceLevel; + (function(SendFlag) + { + SendFlag[SendFlag["none"] = 0] = "none"; + SendFlag[SendFlag["flush"] = 1] = "flush" + })(Logger.SendFlag || (Logger.SendFlag = {})); + var SendFlag = Logger.SendFlag; + function allowUploadingData() + { + if(OSF.Logger && OSF.Logger.ulsEndpoint) + OSF.Logger.ulsEndpoint.loadProxyFrame() + } + Logger.allowUploadingData = allowUploadingData; + function sendLog(traceLevel, message, flag) + { + if(OSF.Logger && OSF.Logger.ulsEndpoint) + { + var jsonObj = { + traceLevel: traceLevel, + message: message, + flag: flag, + internalLog: true + }; + var logs = JSON.stringify(jsonObj); + OSF.Logger.ulsEndpoint.writeLog(logs) + } + } + Logger.sendLog = sendLog; + function creatULSEndpoint() + { + try + { + return new ULSEndpointProxy + } + catch(e) + { + return null + } + } + var ULSEndpointProxy = function() + { + function ULSEndpointProxy() + { + var _this = this; + this.proxyFrame = null; + this.telemetryEndPoint = "https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html"; + this.buffer = []; + this.proxyFrameReady = false; + OSF.OUtil.addEventListener(window,"message",function(e) + { + return _this.tellProxyFrameReady(e) + }); + setTimeout(function() + { + _this.loadProxyFrame() + },3e3) + } + ULSEndpointProxy.prototype.writeLog = function(log) + { + if(this.proxyFrameReady === true) + this.proxyFrame.contentWindow.postMessage(log,ULSEndpointProxy.telemetryOrigin); + else if(this.buffer.length < 128) + this.buffer.push(log) + }; + ULSEndpointProxy.prototype.loadProxyFrame = function() + { + if(this.proxyFrame == null) + { + this.proxyFrame = document.createElement("iframe"); + this.proxyFrame.setAttribute("style","display:none"); + this.proxyFrame.setAttribute("src",this.telemetryEndPoint); + document.head.appendChild(this.proxyFrame) + } + }; + ULSEndpointProxy.prototype.tellProxyFrameReady = function(e) + { + var _this = this; + if(e.data === "ProxyFrameReadyToLog") + { + this.proxyFrameReady = true; + for(var i = 0; i < this.buffer.length; i++) + this.writeLog(this.buffer[i]); + this.buffer.length = 0; + OSF.OUtil.removeEventListener(window,"message",function(e) + { + return _this.tellProxyFrameReady(e) + }) + } + else if(e.data === "ProxyFrameReadyToInit") + { + var initJson = { + appName: "Office APPs", + sessionId: OSF.OUtil.Guid.generateNewGuid() + }; + var initStr = JSON.stringify(initJson); + this.proxyFrame.contentWindow.postMessage(initStr,ULSEndpointProxy.telemetryOrigin) + } + }; + ULSEndpointProxy.telemetryOrigin = "https://telemetryservice.firstpartyapps.oaspapps.com"; + return ULSEndpointProxy + }(); + if(!OSF.Logger) + OSF.Logger = Logger; + Logger.ulsEndpoint = creatULSEndpoint() +})(Logger || (Logger = {})); var OSFAriaLogger; (function(OSFAriaLogger) { - var AriaLogger=function() - { - function AriaLogger(){} - AriaLogger.prototype.getAriaCDNLocation=function() - { - return OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry-2.8.0.min.js" - }; - AriaLogger.getInstance=function() - { - if(AriaLogger.AriaLoggerObj===undefined) - AriaLogger.AriaLoggerObj=new AriaLogger; - return AriaLogger.AriaLoggerObj - }; - AriaLogger.prototype.isIUsageData=function(arg) - { - return arg["Fields"] !==undefined - }; - AriaLogger.prototype.loadAriaScriptAndLog=function(tableName, telemetryData) - { - var startAfterMs=1e3; - OSF.OUtil.loadScript(this.getAriaCDNLocation(),function() - { - try - { - if(!this.ALogger) - { - var OfficeExtensibilityTenantID="db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; - var configuration=new microsoft.applications.telemetry.LogConfiguration; - configuration.enableAutoUserSession=true; - microsoft.applications.telemetry.LogManager.initialize(OfficeExtensibilityTenantID,configuration); - this.ALogger=new microsoft.applications.telemetry.Logger - } - var eventProperties=new microsoft.applications.telemetry.EventProperties; - eventProperties.name="Office.Extensibility.OfficeJS."+tableName; - for(var key in telemetryData) - if(key.toLowerCase() !=="table") - eventProperties.setProperty(key,telemetryData[key]); - var today=new Date; - eventProperties.setProperty("Date",today.toISOString()); - this.ALogger.logEvent(eventProperties) - } - catch(e){} - },startAfterMs) - }; - AriaLogger.prototype.logData=function(data) - { - if(this.isIUsageData(data)) - this.loadAriaScriptAndLog(data["Table"],data["Fields"]); - else - this.loadAriaScriptAndLog(data["Table"],data) - }; - return AriaLogger - }(); - OSFAriaLogger.AriaLogger=AriaLogger -})(OSFAriaLogger || (OSFAriaLogger={})); + var AriaLogger = function() + { + function AriaLogger(){} + AriaLogger.prototype.getAriaCDNLocation = function() + { + return OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath() + "/ariatelemetry/aria-web-telemetry.js" + }; + AriaLogger.getInstance = function() + { + if(AriaLogger.AriaLoggerObj === undefined) + AriaLogger.AriaLoggerObj = new AriaLogger; + return AriaLogger.AriaLoggerObj + }; + AriaLogger.prototype.isIUsageData = function(arg) + { + return arg["Fields"] !== undefined + }; + AriaLogger.prototype.loadAriaScriptAndLog = function(tableName, telemetryData) + { + var startAfterMs = 1e3; + OSF.OUtil.loadScript(this.getAriaCDNLocation(),function() + { + try + { + if(!this.ALogger) + { + var OfficeExtensibilityTenantID = "db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; + this.ALogger = AWTLogManager.initialize(OfficeExtensibilityTenantID) + } + var eventProperties = new AWTEventProperties; + eventProperties.setName("Office.Extensibility.OfficeJS." + tableName); + for(var key in telemetryData) + if(key.toLowerCase() !== "table") + eventProperties.setProperty(key,telemetryData[key]); + var today = new Date; + eventProperties.setProperty("Date",today.toISOString()); + this.ALogger.logEvent(eventProperties) + } + catch(e){} + },startAfterMs) + }; + AriaLogger.prototype.logData = function(data) + { + if(this.isIUsageData(data)) + this.loadAriaScriptAndLog(data["Table"],data["Fields"]); + else + this.loadAriaScriptAndLog(data["Table"],data) + }; + return AriaLogger + }(); + OSFAriaLogger.AriaLogger = AriaLogger +})(OSFAriaLogger || (OSFAriaLogger = {})); var OSFAppTelemetry; (function(OSFAppTelemetry) { - "use strict"; - var appInfo; - var sessionId=OSF.OUtil.Guid.generateNewGuid(); - var osfControlAppCorrelationId=""; - var omexDomainRegex=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/","i"); - var AppInfo=function() - { - function AppInfo(){} - return AppInfo - }(); - var Event=function() - { - function Event(name, handler) - { - this.name=name; - this.handler=handler - } - return Event - }(); - var AppStorage=function() - { - function AppStorage() - { - this.clientIDKey="Office API client"; - this.logIdSetKey="Office App Log Id Set" - } - AppStorage.prototype.getClientId=function() - { - var clientId=this.getValue(this.clientIDKey); - if(!clientId || clientId.length <=0 || clientId.length > 40) - { - clientId=OSF.OUtil.Guid.generateNewGuid(); - this.setValue(this.clientIDKey,clientId) - } - return clientId - }; - AppStorage.prototype.saveLog=function(logId, log) - { - var logIdSet=this.getValue(this.logIdSetKey); - logIdSet=(logIdSet && logIdSet.length > 0 ? logIdSet+";" : "")+logId; - this.setValue(this.logIdSetKey,logIdSet); - this.setValue(logId,log) - }; - AppStorage.prototype.enumerateLog=function(callback, clean) - { - var logIdSet=this.getValue(this.logIdSetKey); - if(logIdSet) - { - var ids=logIdSet.split(";"); - for(var id in ids) - { - var logId=ids[id]; - var log=this.getValue(logId); - if(log) - { - if(callback) - callback(logId,log); - if(clean) - this.remove(logId) - } - } - if(clean) - this.remove(this.logIdSetKey) - } - }; - AppStorage.prototype.getValue=function(key) - { - var osfLocalStorage=OSF.OUtil.getLocalStorage(); - var value=""; - if(osfLocalStorage) - value=osfLocalStorage.getItem(key); - return value - }; - AppStorage.prototype.setValue=function(key, value) - { - var osfLocalStorage=OSF.OUtil.getLocalStorage(); - if(osfLocalStorage) - osfLocalStorage.setItem(key,value) - }; - AppStorage.prototype.remove=function(key) - { - var osfLocalStorage=OSF.OUtil.getLocalStorage(); - if(osfLocalStorage) - try - { - osfLocalStorage.removeItem(key) - } - catch(ex){} - }; - return AppStorage - }(); - var AppLogger=function() - { - function AppLogger(){} - AppLogger.prototype.LogData=function(data) - { - if(!OSF.Logger) - return; - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,data.SerializeRow(),OSF.Logger.SendFlag.none); - OSFAriaLogger.AriaLogger.getInstance().logData(data) - }; - AppLogger.prototype.LogRawData=function(log) - { - if(!OSF.Logger) - return; - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,log,OSF.Logger.SendFlag.none); - try - { - OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)) - } - catch(e){} - }; - return AppLogger - }(); - function trimStringToLowerCase(input) - { - if(input) - input=input.replace(/[{}]/g,"").toLowerCase(); - return input || "" - } - function initialize(context) - { - if(!OSF.Logger) - return; - if(appInfo) - return; - appInfo=new AppInfo; - if(context.get_hostFullVersion()) - appInfo.hostVersion=context.get_hostFullVersion(); - else - appInfo.hostVersion=context.get_appVersion(); - appInfo.appId=context.get_id(); - appInfo.host=context.get_appName(); - appInfo.browser=window.navigator.userAgent; - appInfo.correlationId=trimStringToLowerCase(context.get_correlationId()); - appInfo.clientId=(new AppStorage).getClientId(); - appInfo.appInstanceId=context.get_appInstanceId(); - if(appInfo.appInstanceId) - appInfo.appInstanceId=appInfo.appInstanceId.replace(/[{}]/g,"").toLowerCase(); - appInfo.message=context.get_hostCustomMessage(); - appInfo.officeJSVersion=OSF.ConstantNames.FileVersion; - appInfo.hostJSVersion="16.0.8010.1000"; - if(context._wacHostEnvironment) - appInfo.wacHostEnvironment=context._wacHostEnvironment; - if(context._isFromWacAutomation !==undefined && context._isFromWacAutomation !==null) - appInfo.isFromWacAutomation=context._isFromWacAutomation.toString().toLowerCase(); - var docUrl=context.get_docUrl(); - appInfo.docUrl=omexDomainRegex.test(docUrl) ? docUrl : ""; - var url=location.href; - if(url) - url=url.split("?")[0].split("#")[0]; - appInfo.appURL=url; - (function getUserIdAndAssetIdFromToken(token, appInfo) - { - var xmlContent; - var parser; - var xmlDoc; - appInfo.assetId=""; - appInfo.userId=""; - try - { - xmlContent=decodeURIComponent(token); - parser=new DOMParser; - xmlDoc=parser.parseFromString(xmlContent,"text/xml"); - var cidNode=xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("cid"); - var oidNode=xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("oid"); - if(cidNode && cidNode.nodeValue) - appInfo.userId=cidNode.nodeValue; - else if(oidNode && oidNode.nodeValue) - appInfo.userId=oidNode.nodeValue; - appInfo.assetId=xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue - } - catch(e){} - finally - { - xmlContent=null; - xmlDoc=null; - parser=null - } - })(context.get_eToken(),appInfo); - (function handleLifecycle() - { - var startTime=new Date; - var lastFocus=null; - var focusTime=0; - var finished=false; - var adjustFocusTime=function() - { - if(document.hasFocus()) - { - if(lastFocus==null) - lastFocus=new Date - } - else if(lastFocus) - { - focusTime+=Math.abs((new Date).getTime() - lastFocus.getTime()); - lastFocus=null - } - }; - var eventList=[]; - eventList.push(new Event("focus",adjustFocusTime)); - eventList.push(new Event("blur",adjustFocusTime)); - eventList.push(new Event("focusout",adjustFocusTime)); - eventList.push(new Event("focusin",adjustFocusTime)); - var exitFunction=function() - { - for(var i=0; i < eventList.length; i++) - OSF.OUtil.removeEventListener(window,eventList[i].name,eventList[i].handler); - eventList.length=0; - if(!finished) - { - if(document.hasFocus() && lastFocus) - { - focusTime+=Math.abs((new Date).getTime() - lastFocus.getTime()); - lastFocus=null - } - OSFAppTelemetry.onAppClosed(Math.abs((new Date).getTime() - startTime.getTime()),focusTime); - finished=true - } - }; - eventList.push(new Event("beforeunload",exitFunction)); - eventList.push(new Event("unload",exitFunction)); - for(var i=0; i < eventList.length; i++) - OSF.OUtil.addEventListener(window,eventList[i].name,eventList[i].handler); - adjustFocusTime() - })(); - OSFAppTelemetry.onAppActivated() - } - OSFAppTelemetry.initialize=initialize; - function onAppActivated() - { - if(!appInfo) - return; - (new AppStorage).enumerateLog(function(id, log) - { - return(new AppLogger).LogRawData(log) - },true); - var data=new OSFLog.AppActivatedUsageData; - data.SessionId=sessionId; - data.AppId=appInfo.appId; - data.AssetId=appInfo.assetId; - data.AppURL=appInfo.appURL; - data.UserId=appInfo.userId; - data.ClientId=appInfo.clientId; - data.Browser=appInfo.browser; - data.Host=appInfo.host; - data.HostVersion=appInfo.hostVersion; - data.CorrelationId=trimStringToLowerCase(appInfo.correlationId); - data.AppSizeWidth=window.innerWidth; - data.AppSizeHeight=window.innerHeight; - data.AppInstanceId=appInfo.appInstanceId; - data.Message=appInfo.message; - data.DocUrl=appInfo.docUrl; - data.OfficeJSVersion=appInfo.officeJSVersion; - data.HostJSVersion=appInfo.hostJSVersion; - if(appInfo.wacHostEnvironment) - data.WacHostEnvironment=appInfo.wacHostEnvironment; - if(appInfo.isFromWacAutomation !==undefined && appInfo.isFromWacAutomation !==null) - data.IsFromWacAutomation=appInfo.isFromWacAutomation; - (new AppLogger).LogData(data); - setTimeout(function() - { - if(!OSF.Logger) - return; - OSF.Logger.allowUploadingData() - },100) - } - OSFAppTelemetry.onAppActivated=onAppActivated; - function onScriptDone(scriptId, msStartTime, msResponseTime, appCorrelationId) - { - var data=new OSFLog.ScriptLoadUsageData; - data.CorrelationId=trimStringToLowerCase(appCorrelationId); - data.SessionId=sessionId; - data.ScriptId=scriptId; - data.StartTime=msStartTime; - data.ResponseTime=msResponseTime; - (new AppLogger).LogData(data) - } - OSFAppTelemetry.onScriptDone=onScriptDone; - function onCallDone(apiType, id, parameters, msResponseTime, errorType) - { - if(!appInfo) - return; - var data=new OSFLog.APIUsageUsageData; - data.CorrelationId=trimStringToLowerCase(osfControlAppCorrelationId); - data.SessionId=sessionId; - data.APIType=apiType; - data.APIID=id; - data.Parameters=parameters; - data.ResponseTime=msResponseTime; - data.ErrorType=errorType; - (new AppLogger).LogData(data) - } - OSFAppTelemetry.onCallDone=onCallDone; - function onMethodDone(id, args, msResponseTime, errorType) - { - var parameters=null; - if(args) - if(typeof args=="number") - parameters=String(args); - else if(typeof args==="object") - for(var index in args) - { - if(parameters !==null) - parameters+=","; - else - parameters=""; - if(typeof args[index]=="number") - parameters+=String(args[index]) - } - else - parameters=""; - OSF.AppTelemetry.onCallDone("method",id,parameters,msResponseTime,errorType) - } - OSFAppTelemetry.onMethodDone=onMethodDone; - function onPropertyDone(propertyName, msResponseTime) - { - OSF.AppTelemetry.onCallDone("property",-1,propertyName,msResponseTime) - } - OSFAppTelemetry.onPropertyDone=onPropertyDone; - function onEventDone(id, errorType) - { - OSF.AppTelemetry.onCallDone("event",id,null,0,errorType) - } - OSFAppTelemetry.onEventDone=onEventDone; - function onRegisterDone(register, id, msResponseTime, errorType) - { - OSF.AppTelemetry.onCallDone(register ? "registerevent" : "unregisterevent",id,null,msResponseTime,errorType) - } - OSFAppTelemetry.onRegisterDone=onRegisterDone; - function onAppClosed(openTime, focusTime) - { - if(!appInfo) - return; - var data=new OSFLog.AppClosedUsageData; - data.CorrelationId=trimStringToLowerCase(osfControlAppCorrelationId); - data.SessionId=sessionId; - data.FocusTime=focusTime; - data.OpenTime=openTime; - data.AppSizeFinalWidth=window.innerWidth; - data.AppSizeFinalHeight=window.innerHeight; - (new AppStorage).saveLog(sessionId,data.SerializeRow()) - } - OSFAppTelemetry.onAppClosed=onAppClosed; - function setOsfControlAppCorrelationId(correlationId) - { - osfControlAppCorrelationId=trimStringToLowerCase(correlationId) - } - OSFAppTelemetry.setOsfControlAppCorrelationId=setOsfControlAppCorrelationId; - function doAppInitializationLogging(isException, message) - { - var data=new OSFLog.AppInitializationUsageData; - data.CorrelationId=trimStringToLowerCase(osfControlAppCorrelationId); - data.SessionId=sessionId; - data.SuccessCode=isException ? 1 : 0; - data.Message=message; - (new AppLogger).LogData(data) - } - OSFAppTelemetry.doAppInitializationLogging=doAppInitializationLogging; - function logAppCommonMessage(message) - { - doAppInitializationLogging(false,message) - } - OSFAppTelemetry.logAppCommonMessage=logAppCommonMessage; - function logAppException(errorMessage) - { - doAppInitializationLogging(true,errorMessage) - } - OSFAppTelemetry.logAppException=logAppException; - OSF.AppTelemetry=OSFAppTelemetry -})(OSFAppTelemetry || (OSFAppTelemetry={})); + "use strict"; + var appInfo; + var sessionId = OSF.OUtil.Guid.generateNewGuid(); + var osfControlAppCorrelationId = ""; + var omexDomainRegex = new RegExp("^https?://store\\.office(ppe|-int)?\\.com/","i"); + OSFAppTelemetry.enableTelemetry = true; + var AppInfo = function() + { + function AppInfo(){} + return AppInfo + }(); + var Event = function() + { + function Event(name, handler) + { + this.name = name; + this.handler = handler + } + return Event + }(); + var AppStorage = function() + { + function AppStorage() + { + this.clientIDKey = "Office API client"; + this.logIdSetKey = "Office App Log Id Set" + } + AppStorage.prototype.getClientId = function() + { + var clientId = this.getValue(this.clientIDKey); + if(!clientId || clientId.length <= 0 || clientId.length > 40) + { + clientId = OSF.OUtil.Guid.generateNewGuid(); + this.setValue(this.clientIDKey,clientId) + } + return clientId + }; + AppStorage.prototype.saveLog = function(logId, log) + { + var logIdSet = this.getValue(this.logIdSetKey); + logIdSet = (logIdSet && logIdSet.length > 0 ? logIdSet + ";" : "") + logId; + this.setValue(this.logIdSetKey,logIdSet); + this.setValue(logId,log) + }; + AppStorage.prototype.enumerateLog = function(callback, clean) + { + var logIdSet = this.getValue(this.logIdSetKey); + if(logIdSet) + { + var ids = logIdSet.split(";"); + for(var id in ids) + { + var logId = ids[id]; + var log = this.getValue(logId); + if(log) + { + if(callback) + callback(logId,log); + if(clean) + this.remove(logId) + } + } + if(clean) + this.remove(this.logIdSetKey) + } + }; + AppStorage.prototype.getValue = function(key) + { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + var value = ""; + if(osfLocalStorage) + value = osfLocalStorage.getItem(key); + return value + }; + AppStorage.prototype.setValue = function(key, value) + { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + if(osfLocalStorage) + osfLocalStorage.setItem(key,value) + }; + AppStorage.prototype.remove = function(key) + { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + if(osfLocalStorage) + try + { + osfLocalStorage.removeItem(key) + } + catch(ex){} + }; + return AppStorage + }(); + var AppLogger = function() + { + function AppLogger(){} + AppLogger.prototype.LogData = function(data) + { + if(!OSF.Logger || !OSFAppTelemetry.enableTelemetry) + return; + try + { + OSFAriaLogger.AriaLogger.getInstance().logData(data) + } + catch(e){} + }; + AppLogger.prototype.LogRawData = function(log) + { + if(!OSF.Logger || !OSFAppTelemetry.enableTelemetry) + return; + try + { + OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)) + } + catch(e){} + }; + return AppLogger + }(); + function trimStringToLowerCase(input) + { + if(input) + input = input.replace(/[{}]/g,"").toLowerCase(); + return input || "" + } + function initialize(context) + { + if(!OSF.Logger) + return; + if(appInfo) + return; + appInfo = new AppInfo; + if(context.get_hostFullVersion()) + appInfo.hostVersion = context.get_hostFullVersion(); + else + appInfo.hostVersion = context.get_appVersion(); + appInfo.appId = context.get_id(); + appInfo.host = context.get_appName(); + appInfo.browser = window.navigator.userAgent; + appInfo.correlationId = trimStringToLowerCase(context.get_correlationId()); + appInfo.clientId = (new AppStorage).getClientId(); + appInfo.appInstanceId = context.get_appInstanceId(); + if(appInfo.appInstanceId) + appInfo.appInstanceId = appInfo.appInstanceId.replace(/[{}]/g,"").toLowerCase(); + appInfo.message = context.get_hostCustomMessage(); + appInfo.officeJSVersion = OSF.ConstantNames.FileVersion; + appInfo.hostJSVersion = "16.0.8809.1000"; + if(context._wacHostEnvironment) + appInfo.wacHostEnvironment = context._wacHostEnvironment; + if(context._isFromWacAutomation !== undefined && context._isFromWacAutomation !== null) + appInfo.isFromWacAutomation = context._isFromWacAutomation.toString().toLowerCase(); + var docUrl = context.get_docUrl(); + appInfo.docUrl = omexDomainRegex.test(docUrl) ? docUrl : ""; + var url = location.href; + if(url) + url = url.split("?")[0].split("#")[0]; + appInfo.appURL = url; + (function getUserIdAndAssetIdFromToken(token, appInfo) + { + var xmlContent; + var parser; + var xmlDoc; + appInfo.assetId = ""; + appInfo.userId = ""; + try + { + xmlContent = decodeURIComponent(token); + parser = new DOMParser; + xmlDoc = parser.parseFromString(xmlContent,"text/xml"); + var cidNode = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("cid"); + var oidNode = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("oid"); + if(cidNode && cidNode.nodeValue) + appInfo.userId = cidNode.nodeValue; + else if(oidNode && oidNode.nodeValue) + appInfo.userId = oidNode.nodeValue; + appInfo.assetId = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue + } + catch(e){} + finally + { + xmlContent = null; + xmlDoc = null; + parser = null + } + })(context.get_eToken(),appInfo); + (function handleLifecycle() + { + var startTime = new Date; + var lastFocus = null; + var focusTime = 0; + var finished = false; + var adjustFocusTime = function() + { + if(document.hasFocus()) + { + if(lastFocus == null) + lastFocus = new Date + } + else if(lastFocus) + { + focusTime += Math.abs((new Date).getTime() - lastFocus.getTime()); + lastFocus = null + } + }; + var eventList = []; + eventList.push(new Event("focus",adjustFocusTime)); + eventList.push(new Event("blur",adjustFocusTime)); + eventList.push(new Event("focusout",adjustFocusTime)); + eventList.push(new Event("focusin",adjustFocusTime)); + var exitFunction = function() + { + for(var i = 0; i < eventList.length; i++) + OSF.OUtil.removeEventListener(window,eventList[i].name,eventList[i].handler); + eventList.length = 0; + if(!finished) + { + if(document.hasFocus() && lastFocus) + { + focusTime += Math.abs((new Date).getTime() - lastFocus.getTime()); + lastFocus = null + } + OSFAppTelemetry.onAppClosed(Math.abs((new Date).getTime() - startTime.getTime()),focusTime); + finished = true + } + }; + eventList.push(new Event("beforeunload",exitFunction)); + eventList.push(new Event("unload",exitFunction)); + for(var i = 0; i < eventList.length; i++) + OSF.OUtil.addEventListener(window,eventList[i].name,eventList[i].handler); + adjustFocusTime() + })(); + OSFAppTelemetry.onAppActivated() + } + OSFAppTelemetry.initialize = initialize; + function onAppActivated() + { + if(!appInfo) + return; + (new AppStorage).enumerateLog(function(id, log) + { + return(new AppLogger).LogRawData(log) + },true); + var data = new OSFLog.AppActivatedUsageData; + data.SessionId = sessionId; + data.AppId = appInfo.appId; + data.AssetId = appInfo.assetId; + data.AppURL = appInfo.appURL; + data.UserId = appInfo.userId; + data.ClientId = appInfo.clientId; + data.Browser = appInfo.browser; + data.Host = appInfo.host; + data.HostVersion = appInfo.hostVersion; + data.CorrelationId = trimStringToLowerCase(appInfo.correlationId); + data.AppSizeWidth = window.innerWidth; + data.AppSizeHeight = window.innerHeight; + data.AppInstanceId = appInfo.appInstanceId; + data.Message = appInfo.message; + data.DocUrl = appInfo.docUrl; + data.OfficeJSVersion = appInfo.officeJSVersion; + data.HostJSVersion = appInfo.hostJSVersion; + if(appInfo.wacHostEnvironment) + data.WacHostEnvironment = appInfo.wacHostEnvironment; + if(appInfo.isFromWacAutomation !== undefined && appInfo.isFromWacAutomation !== null) + data.IsFromWacAutomation = appInfo.isFromWacAutomation; + (new AppLogger).LogData(data); + setTimeout(function() + { + if(!OSF.Logger) + return; + OSF.Logger.allowUploadingData() + },100) + } + OSFAppTelemetry.onAppActivated = onAppActivated; + function onScriptDone(scriptId, msStartTime, msResponseTime, appCorrelationId) + { + var data = new OSFLog.ScriptLoadUsageData; + data.CorrelationId = trimStringToLowerCase(appCorrelationId); + data.SessionId = sessionId; + data.ScriptId = scriptId; + data.StartTime = msStartTime; + data.ResponseTime = msResponseTime; + (new AppLogger).LogData(data) + } + OSFAppTelemetry.onScriptDone = onScriptDone; + function onCallDone(apiType, id, parameters, msResponseTime, errorType) + { + if(!appInfo) + return; + var data = new OSFLog.APIUsageUsageData; + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.APIType = apiType; + data.APIID = id; + data.Parameters = parameters; + data.ResponseTime = msResponseTime; + data.ErrorType = errorType; + (new AppLogger).LogData(data) + } + OSFAppTelemetry.onCallDone = onCallDone; + function onMethodDone(id, args, msResponseTime, errorType) + { + var parameters = null; + if(args) + if(typeof args == "number") + parameters = String(args); + else if(typeof args === "object") + for(var index in args) + { + if(parameters !== null) + parameters += ","; + else + parameters = ""; + if(typeof args[index] == "number") + parameters += String(args[index]) + } + else + parameters = ""; + OSF.AppTelemetry.onCallDone("method",id,parameters,msResponseTime,errorType) + } + OSFAppTelemetry.onMethodDone = onMethodDone; + function onPropertyDone(propertyName, msResponseTime) + { + OSF.AppTelemetry.onCallDone("property",-1,propertyName,msResponseTime) + } + OSFAppTelemetry.onPropertyDone = onPropertyDone; + function onEventDone(id, errorType) + { + OSF.AppTelemetry.onCallDone("event",id,null,0,errorType) + } + OSFAppTelemetry.onEventDone = onEventDone; + function onRegisterDone(register, id, msResponseTime, errorType) + { + OSF.AppTelemetry.onCallDone(register ? "registerevent" : "unregisterevent",id,null,msResponseTime,errorType) + } + OSFAppTelemetry.onRegisterDone = onRegisterDone; + function onAppClosed(openTime, focusTime) + { + if(!appInfo) + return; + var data = new OSFLog.AppClosedUsageData; + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.FocusTime = focusTime; + data.OpenTime = openTime; + data.AppSizeFinalWidth = window.innerWidth; + data.AppSizeFinalHeight = window.innerHeight; + (new AppStorage).saveLog(sessionId,data.SerializeRow()) + } + OSFAppTelemetry.onAppClosed = onAppClosed; + function setOsfControlAppCorrelationId(correlationId) + { + osfControlAppCorrelationId = trimStringToLowerCase(correlationId) + } + OSFAppTelemetry.setOsfControlAppCorrelationId = setOsfControlAppCorrelationId; + function doAppInitializationLogging(isException, message) + { + var data = new OSFLog.AppInitializationUsageData; + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.SuccessCode = isException ? 1 : 0; + data.Message = message; + (new AppLogger).LogData(data) + } + OSFAppTelemetry.doAppInitializationLogging = doAppInitializationLogging; + function logAppCommonMessage(message) + { + doAppInitializationLogging(false,message) + } + OSFAppTelemetry.logAppCommonMessage = logAppCommonMessage; + function logAppException(errorMessage) + { + doAppInitializationLogging(true,errorMessage) + } + OSFAppTelemetry.logAppException = logAppException; + OSF.AppTelemetry = OSFAppTelemetry +})(OSFAppTelemetry || (OSFAppTelemetry = {})); var OfficeExt; (function(OfficeExt) { - var AppCommand; - (function(AppCommand) - { - var AppCommandManager=function() - { - function AppCommandManager() - { - var _this=this; - this._pseudoDocument=null; - this._eventDispatch=null; - this._processAppCommandInvocation=function(args) - { - var verifyResult=_this._verifyManifestCallback(args.callbackName); - if(verifyResult.errorCode !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - { - _this._invokeAppCommandCompletedMethod(args.appCommandId,verifyResult.errorCode,""); - return - } - var eventObj=_this._constructEventObjectForCallback(args); - if(eventObj) - window.setTimeout(function() - { - verifyResult.callback(eventObj) - },0); - else - _this._invokeAppCommandCompletedMethod(args.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"") - } - } - AppCommandManager.initializeOsfDda=function() - { - OSF.DDA.AsyncMethodNames.addNames({AppCommandInvocationCompletedAsync: "appCommandInvocationCompletedAsync"}); - OSF.DDA.AsyncMethodCalls.define({ - method: OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync, - requiredArguments: [{ - name: Microsoft.Office.WebExtension.Parameters.Id, - types: ["string"] - },{ - name: Microsoft.Office.WebExtension.Parameters.Status, - types: ["number"] - },{ - name: Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData, - types: ["string"] - }] - }); - OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{AppCommandInvokedEvent: "AppCommandInvokedEvent"}); - OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppCommandInvoked: "appCommandInvoked"}); - OSF.OUtil.setNamespace("AppCommand",OSF.DDA); - OSF.DDA.AppCommand.AppCommandInvokedEventArgs=OfficeExt.AppCommand.AppCommandInvokedEventArgs - }; - AppCommandManager.prototype.initializeAndChangeOnce=function(callback) - { - AppCommand.registerDdaFacade(); - this._pseudoDocument={}; - OSF.DDA.DispIdHost.addAsyncMethods(this._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync,]); - this._eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked,]); - var onRegisterCompleted=function(result) - { - if(callback) - if(result.status=="succeeded") - callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); - else - callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError) - }; - OSF.DDA.DispIdHost.addEventSupport(this._pseudoDocument,this._eventDispatch); - this._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,this._processAppCommandInvocation,onRegisterCompleted) - }; - AppCommandManager.prototype._verifyManifestCallback=function(callbackName) - { - var defaultResult={ - callback: null, - errorCode: OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback - }; - callbackName=callbackName.trim(); - try - { - var callList=callbackName.split("."); - var parentObject=window; - for(var i=0; i < callList.length - 1; i++) - if(parentObject[callList[i]] && (typeof parentObject[callList[i]]=="object" || typeof parentObject[callList[i]]=="function")) - parentObject=parentObject[callList[i]]; - else - return defaultResult; - var callbackFunc=parentObject[callList[callList.length - 1]]; - if(typeof callbackFunc !="function") - return defaultResult - } - catch(e) - { - return defaultResult - } - return{ - callback: callbackFunc, - errorCode: OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess - } - }; - AppCommandManager.prototype._invokeAppCommandCompletedMethod=function(appCommandId, resultCode, data) - { - this._pseudoDocument.appCommandInvocationCompletedAsync(appCommandId,resultCode,data) - }; - AppCommandManager.prototype._constructEventObjectForCallback=function(args) - { - var _this=this; - var eventObj=new AppCommandCallbackEventArgs; - try - { - var jsonData=JSON.parse(args.eventObjStr); - this._translateEventObjectInternal(jsonData,eventObj); - Object.defineProperty(eventObj,"completed",{ - value: function(completedContext) - { - eventObj.completedContext=completedContext; - var jsonString=JSON.stringify(eventObj); - _this._invokeAppCommandCompletedMethod(args.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,jsonString) - }, - enumerable: true - }) - } - catch(e) - { - eventObj=null - } - return eventObj - }; - AppCommandManager.prototype._translateEventObjectInternal=function(input, output) - { - for(var key in input) - { - if(!input.hasOwnProperty(key)) - continue; - var inputChild=input[key]; - if(typeof inputChild=="object" && inputChild !=null) - { - OSF.OUtil.defineEnumerableProperty(output,key,{value: {}}); - this._translateEventObjectInternal(inputChild,output[key]) - } - else - Object.defineProperty(output,key,{ - value: inputChild, - enumerable: true, - writable: true - }) - } - }; - AppCommandManager.prototype._constructObjectByTemplate=function(template, input) - { - var output={}; - if(!template || !input) - return output; - for(var key in template) - if(template.hasOwnProperty(key)) - { - output[key]=null; - if(input[key] !=null) - { - var templateChild=template[key]; - var inputChild=input[key]; - var inputChildType=typeof inputChild; - if(typeof templateChild=="object" && templateChild !=null) - output[key]=this._constructObjectByTemplate(templateChild,inputChild); - else if(inputChildType=="number" || inputChildType=="string" || inputChildType=="boolean") - output[key]=inputChild - } - } - return output - }; - AppCommandManager.instance=function() - { - if(AppCommandManager._instance==null) - AppCommandManager._instance=new AppCommandManager; - return AppCommandManager._instance - }; - AppCommandManager._instance=null; - return AppCommandManager - }(); - AppCommand.AppCommandManager=AppCommandManager; - var AppCommandInvokedEventArgs=function() - { - function AppCommandInvokedEventArgs(appCommandId, callbackName, eventObjStr) - { - this.type=Microsoft.Office.WebExtension.EventType.AppCommandInvoked; - this.appCommandId=appCommandId; - this.callbackName=callbackName; - this.eventObjStr=eventObjStr - } - AppCommandInvokedEventArgs.create=function(eventProperties) - { - return new AppCommandInvokedEventArgs(eventProperties[AppCommand.AppCommandInvokedEventEnums.AppCommandId],eventProperties[AppCommand.AppCommandInvokedEventEnums.CallbackName],eventProperties[AppCommand.AppCommandInvokedEventEnums.EventObjStr]) - }; - return AppCommandInvokedEventArgs - }(); - AppCommand.AppCommandInvokedEventArgs=AppCommandInvokedEventArgs; - var AppCommandCallbackEventArgs=function() - { - function AppCommandCallbackEventArgs(){} - return AppCommandCallbackEventArgs - }(); - AppCommand.AppCommandCallbackEventArgs=AppCommandCallbackEventArgs; - AppCommand.AppCommandInvokedEventEnums={ - AppCommandId: "appCommandId", - CallbackName: "callbackName", - EventObjStr: "eventObjStr" - } - })(AppCommand=OfficeExt.AppCommand || (OfficeExt.AppCommand={})) -})(OfficeExt || (OfficeExt={})); + var AppCommand; + (function(AppCommand) + { + var AppCommandManager = function() + { + function AppCommandManager() + { + var _this = this; + this._pseudoDocument = null; + this._eventDispatch = null; + this._processAppCommandInvocation = function(args) + { + var verifyResult = _this._verifyManifestCallback(args.callbackName); + if(verifyResult.errorCode != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + { + _this._invokeAppCommandCompletedMethod(args.appCommandId,verifyResult.errorCode,""); + return + } + var eventObj = _this._constructEventObjectForCallback(args); + if(eventObj) + window.setTimeout(function() + { + verifyResult.callback(eventObj) + },0); + else + _this._invokeAppCommandCompletedMethod(args.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"") + } + } + AppCommandManager.initializeOsfDda = function() + { + OSF.DDA.AsyncMethodNames.addNames({AppCommandInvocationCompletedAsync: "appCommandInvocationCompletedAsync"}); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync, + requiredArguments: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + types: ["string"] + },{ + name: Microsoft.Office.WebExtension.Parameters.Status, + types: ["number"] + },{ + name: Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData, + types: ["string"] + }] + }); + OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{AppCommandInvokedEvent: "AppCommandInvokedEvent"}); + OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppCommandInvoked: "appCommandInvoked"}); + OSF.OUtil.setNamespace("AppCommand",OSF.DDA); + OSF.DDA.AppCommand.AppCommandInvokedEventArgs = OfficeExt.AppCommand.AppCommandInvokedEventArgs + }; + AppCommandManager.prototype.initializeAndChangeOnce = function(callback) + { + AppCommand.registerDdaFacade(); + this._pseudoDocument = {}; + OSF.DDA.DispIdHost.addAsyncMethods(this._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync,]); + this._eventDispatch = new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked,]); + var onRegisterCompleted = function(result) + { + if(callback) + if(result.status == "succeeded") + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + else + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError) + }; + OSF.DDA.DispIdHost.addEventSupport(this._pseudoDocument,this._eventDispatch); + this._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,this._processAppCommandInvocation,onRegisterCompleted) + }; + AppCommandManager.prototype._verifyManifestCallback = function(callbackName) + { + var defaultResult = { + callback: null, + errorCode: OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback + }; + callbackName = callbackName.trim(); + try + { + var callList = callbackName.split("."); + var parentObject = window; + for(var i = 0; i < callList.length - 1; i++) + if(parentObject[callList[i]] && (typeof parentObject[callList[i]] == "object" || typeof parentObject[callList[i]] == "function")) + parentObject = parentObject[callList[i]]; + else + return defaultResult; + var callbackFunc = parentObject[callList[callList.length - 1]]; + if(typeof callbackFunc != "function") + return defaultResult + } + catch(e) + { + return defaultResult + } + return{ + callback: callbackFunc, + errorCode: OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess + } + }; + AppCommandManager.prototype._invokeAppCommandCompletedMethod = function(appCommandId, resultCode, data) + { + this._pseudoDocument.appCommandInvocationCompletedAsync(appCommandId,resultCode,data) + }; + AppCommandManager.prototype._constructEventObjectForCallback = function(args) + { + var _this = this; + var eventObj = new AppCommandCallbackEventArgs; + try + { + var jsonData = JSON.parse(args.eventObjStr); + this._translateEventObjectInternal(jsonData,eventObj); + Object.defineProperty(eventObj,"completed",{ + value: function(completedContext) + { + eventObj.completedContext = completedContext; + var jsonString = JSON.stringify(eventObj); + _this._invokeAppCommandCompletedMethod(args.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,jsonString) + }, + enumerable: true + }) + } + catch(e) + { + eventObj = null + } + return eventObj + }; + AppCommandManager.prototype._translateEventObjectInternal = function(input, output) + { + for(var key in input) + { + if(!input.hasOwnProperty(key)) + continue; + var inputChild = input[key]; + if(typeof inputChild == "object" && inputChild != null) + { + OSF.OUtil.defineEnumerableProperty(output,key,{value: {}}); + this._translateEventObjectInternal(inputChild,output[key]) + } + else + Object.defineProperty(output,key,{ + value: inputChild, + enumerable: true, + writable: true + }) + } + }; + AppCommandManager.prototype._constructObjectByTemplate = function(template, input) + { + var output = {}; + if(!template || !input) + return output; + for(var key in template) + if(template.hasOwnProperty(key)) + { + output[key] = null; + if(input[key] != null) + { + var templateChild = template[key]; + var inputChild = input[key]; + var inputChildType = typeof inputChild; + if(typeof templateChild == "object" && templateChild != null) + output[key] = this._constructObjectByTemplate(templateChild,inputChild); + else if(inputChildType == "number" || inputChildType == "string" || inputChildType == "boolean") + output[key] = inputChild + } + } + return output + }; + AppCommandManager.instance = function() + { + if(AppCommandManager._instance == null) + AppCommandManager._instance = new AppCommandManager; + return AppCommandManager._instance + }; + AppCommandManager._instance = null; + return AppCommandManager + }(); + AppCommand.AppCommandManager = AppCommandManager; + var AppCommandInvokedEventArgs = function() + { + function AppCommandInvokedEventArgs(appCommandId, callbackName, eventObjStr) + { + this.type = Microsoft.Office.WebExtension.EventType.AppCommandInvoked; + this.appCommandId = appCommandId; + this.callbackName = callbackName; + this.eventObjStr = eventObjStr + } + AppCommandInvokedEventArgs.create = function(eventProperties) + { + return new AppCommandInvokedEventArgs(eventProperties[AppCommand.AppCommandInvokedEventEnums.AppCommandId],eventProperties[AppCommand.AppCommandInvokedEventEnums.CallbackName],eventProperties[AppCommand.AppCommandInvokedEventEnums.EventObjStr]) + }; + return AppCommandInvokedEventArgs + }(); + AppCommand.AppCommandInvokedEventArgs = AppCommandInvokedEventArgs; + var AppCommandCallbackEventArgs = function() + { + function AppCommandCallbackEventArgs(){} + return AppCommandCallbackEventArgs + }(); + AppCommand.AppCommandCallbackEventArgs = AppCommandCallbackEventArgs; + AppCommand.AppCommandInvokedEventEnums = { + AppCommandId: "appCommandId", + CallbackName: "callbackName", + EventObjStr: "eventObjStr" + } + })(AppCommand = OfficeExt.AppCommand || (OfficeExt.AppCommand = {})) +})(OfficeExt || (OfficeExt = {})); OfficeExt.AppCommand.AppCommandManager.initializeOsfDda(); var OfficeExt; (function(OfficeExt) { - var AppCommand; - (function(AppCommand) - { - function registerDdaFacade() - { - if(OSF.DDA.SafeArray) - { - var parameterMap=OSF.DDA.SafeArray.Delegate.ParameterMap; - parameterMap.define({ - type: OSF.DDA.MethodDispId.dispidAppCommandInvocationCompletedMethod, - toHost: [{ - name: Microsoft.Office.WebExtension.Parameters.Id, - value: 0 - },{ - name: Microsoft.Office.WebExtension.Parameters.Status, - value: 1 - },{ - name: Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData, - value: 2 - }] - }); - parameterMap.define({ - type: OSF.DDA.EventDispId.dispidAppCommandInvokedEvent, - fromHost: [{ - name: OSF.DDA.EventDescriptors.AppCommandInvokedEvent, - value: parameterMap.self - }], - isComplexType: true - }); - parameterMap.define({ - type: OSF.DDA.EventDescriptors.AppCommandInvokedEvent, - fromHost: [{ - name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.AppCommandId, - value: 0 - },{ - name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.CallbackName, - value: 1 - },{ - name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.EventObjStr, - value: 2 - },], - isComplexType: true - }) - } - } - AppCommand.registerDdaFacade=registerDdaFacade - })(AppCommand=OfficeExt.AppCommand || (OfficeExt.AppCommand={})) -})(OfficeExt || (OfficeExt={})); + var AppCommand; + (function(AppCommand) + { + function registerDdaFacade() + { + if(OSF.DDA.SafeArray) + { + var parameterMap = OSF.DDA.SafeArray.Delegate.ParameterMap; + parameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAppCommandInvocationCompletedMethod, + toHost: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + value: 0 + },{ + name: Microsoft.Office.WebExtension.Parameters.Status, + value: 1 + },{ + name: Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData, + value: 2 + }] + }); + parameterMap.define({ + type: OSF.DDA.EventDispId.dispidAppCommandInvokedEvent, + fromHost: [{ + name: OSF.DDA.EventDescriptors.AppCommandInvokedEvent, + value: parameterMap.self + }], + isComplexType: true + }); + parameterMap.define({ + type: OSF.DDA.EventDescriptors.AppCommandInvokedEvent, + fromHost: [{ + name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.AppCommandId, + value: 0 + },{ + name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.CallbackName, + value: 1 + },{ + name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.EventObjStr, + value: 2 + },], + isComplexType: true + }) + } + } + AppCommand.registerDdaFacade = registerDdaFacade + })(AppCommand = OfficeExt.AppCommand || (OfficeExt.AppCommand = {})) +})(OfficeExt || (OfficeExt = {})); OSF.DDA.AsyncMethodNames.addNames({CloseContainerAsync: "closeContainer"}); var OfficeExt; (function(OfficeExt) { - var Container=function() - { - function Container(parameters){} - return Container - }(); - OfficeExt.Container=Container -})(OfficeExt || (OfficeExt={})); + var Container = function() + { + function Container(parameters){} + return Container + }(); + OfficeExt.Container = Container +})(OfficeExt || (OfficeExt = {})); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.CloseContainerAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidCloseContainerMethod, + fromHost: [], + toHost: [] +}); +OSF.DDA.AsyncMethodNames.addNames({GetAccessTokenAsync: "getAccessTokenAsync"}); +OSF.DDA.Auth = function OSF_DDA_Auth(){}; OSF.DDA.AsyncMethodCalls.define({ - method: OSF.DDA.AsyncMethodNames.CloseContainerAsync, - requiredArguments: [], - supportedOptions: [], - privateStateCallbacks: [] + method: OSF.DDA.AsyncMethodNames.GetAccessTokenAsync, + requiredArguments: [], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.ForceConsent, + value: { + types: ["boolean"], + defaultValue: false + } + },{ + name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, + value: { + types: ["boolean"], + defaultValue: false + } + },{ + name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, + value: { + types: ["string"], + defaultValue: "" + } + }], + onSucceeded: function(dataDescriptor, caller, callArgs) + { + var data = dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + return data + } }); OSF.DDA.SafeArray.Delegate.ParameterMap.define({ - type: OSF.DDA.MethodDispId.dispidCloseContainerMethod, - fromHost: [], - toHost: [] + type: OSF.DDA.MethodDispId.dispidGetAccessTokenMethod, + toHost: [{ + name: Microsoft.Office.WebExtension.Parameters.ForceConsent, + value: 0 + },{ + name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, + value: 1 + },{ + name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, + value: 2 + }], + fromHost: [{ + name: Microsoft.Office.WebExtension.Parameters.Data, + value: OSF.DDA.SafeArray.Delegate.ParameterMap.self + }] }); var OfficeJsClient_OutlookWin32; (function(OfficeJsClient_OutlookWin32) { - function prepareApiSurface(appContext) - { - if(appContext.get_isDialog()) - appContext.ui=new OSF.DDA.UI.ChildUI; - else - { - appContext.ui=new OSF.DDA.UI.ParentUI; - OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync]) - } - } - OfficeJsClient_OutlookWin32.prepareApiSurface=prepareApiSurface; - function prepareRightAfterWebExtensionInitialize() - { - var appCommandHandler=OfficeExt.AppCommand.AppCommandManager.instance(); - appCommandHandler.initializeAndChangeOnce() - } - OfficeJsClient_OutlookWin32.prepareRightAfterWebExtensionInitialize=prepareRightAfterWebExtensionInitialize -})(OfficeJsClient_OutlookWin32 || (OfficeJsClient_OutlookWin32={})); -OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize=function OSF_InitializationHelper$prepareRightAfterWebExtensionInitialize() + function prepareApiSurface(appContext) + { + if(appContext.get_isDialog()) + appContext.ui = new OSF.DDA.UI.ChildUI; + else + { + appContext.ui = new OSF.DDA.UI.ParentUI; + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync]) + } + appContext.auth = new OSF.DDA.Auth; + OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth,[OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]) + } + OfficeJsClient_OutlookWin32.prepareApiSurface = prepareApiSurface; + function prepareRightAfterWebExtensionInitialize() + { + var appCommandHandler = OfficeExt.AppCommand.AppCommandManager.instance(); + appCommandHandler.initializeAndChangeOnce() + } + OfficeJsClient_OutlookWin32.prepareRightAfterWebExtensionInitialize = prepareRightAfterWebExtensionInitialize +})(OfficeJsClient_OutlookWin32 || (OfficeJsClient_OutlookWin32 = {})); +OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize = function OSF_InitializationHelper$prepareRightAfterWebExtensionInitialize() { - OfficeJsClient_OutlookWin32.prepareRightAfterWebExtensionInitialize() + OfficeJsClient_OutlookWin32.prepareRightAfterWebExtensionInitialize() }; -OSF.InitializationHelper.prototype.prepareApiSurface=function OSF_InitializationHelper$prepareApiSurface(appContext) +OSF.InitializationHelper.prototype.prepareApiSurface = function OSF_InitializationHelper$prepareApiSurface(appContext) { - var license=new OSF.DDA.License(appContext.get_eToken()); - if(appContext.get_appName()==OSF.AppName.OutlookWebApp) - { - OSF.WebApp._UpdateLinksForHostAndXdmInfo(); - this.initWebDialog(appContext); - OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(appContext,this._settings,license,appContext.appOM)); - OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.WAC.getDelegateMethods,OSF.DDA.WAC.Delegate.ParameterMap)) - } - else - { - OfficeJsClient_OutlookWin32.prepareApiSurface(appContext); - OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(appContext,this._settings,license,appContext.appOM,OSF.DDA.Theming ? OSF.DDA.Theming.getOfficeTheme : null,appContext.ui)); - OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.DispIdHost.getClientDelegateMethods,OSF.DDA.SafeArray.Delegate.ParameterMap)) - } + var license = new OSF.DDA.License(appContext.get_eToken()); + if(appContext.get_appName() == OSF.AppName.OutlookWebApp) + { + OSF.WebApp._UpdateLinksForHostAndXdmInfo(); + this.initWebDialog(appContext); + this.initWebAuth(appContext); + OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(appContext,this._settings,license,appContext.appOM)); + OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.WAC.getDelegateMethods,OSF.DDA.WAC.Delegate.ParameterMap)) + } + else + { + OfficeJsClient_OutlookWin32.prepareApiSurface(appContext); + OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(appContext,this._settings,license,appContext.appOM,OSF.DDA.Theming ? OSF.DDA.Theming.getOfficeTheme : null,appContext.ui)); + OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.DispIdHost.getClientDelegateMethods,OSF.DDA.SafeArray.Delegate.ParameterMap)) + } }; -OSF.DDA.SettingsManager={ - SerializedSettings: "serializedSettings", - DateJSONPrefix: "Date(", - DataJSONSuffix: ")", - serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) - { - var ret={}; - for(var key in settingsCollection) - { - var value=settingsCollection[key]; - try - { - if(JSON) - value=JSON.stringify(value,function dateReplacer(k, v) - { - return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix+this[k].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix : v - }); - else - value=Sys.Serialization.JavaScriptSerializer.serialize(value); - ret[key]=value - } - catch(ex){} - } - return ret - }, - deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) - { - var ret={}; - serializedSettings=serializedSettings || {}; - for(var key in serializedSettings) - { - var value=serializedSettings[key]; - try - { - if(JSON) - value=JSON.parse(value,function dateReviver(k, v) - { - var d; - if(typeof v==="string" && v && v.length > 6 && v.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) - { - d=new Date(parseInt(v.slice(5,-1))); - if(d) - return d - } - return v - }); - else - value=Sys.Serialization.JavaScriptSerializer.deserialize(value,true); - ret[key]=value - } - catch(ex){} - } - return ret - } +OSF.DDA.SettingsManager = { + SerializedSettings: "serializedSettings", + DateJSONPrefix: "Date(", + DataJSONSuffix: ")", + serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) + { + var ret = {}; + for(var key in settingsCollection) + { + var value = settingsCollection[key]; + try + { + if(JSON) + value = JSON.stringify(value,function dateReplacer(k, v) + { + return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix + this[k].getTime() + OSF.DDA.SettingsManager.DataJSONSuffix : v + }); + else + value = Sys.Serialization.JavaScriptSerializer.serialize(value); + ret[key] = value + } + catch(ex){} + } + return ret + }, + deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) + { + var ret = {}; + serializedSettings = serializedSettings || {}; + for(var key in serializedSettings) + { + var value = serializedSettings[key]; + try + { + if(JSON) + value = JSON.parse(value,function dateReviver(k, v) + { + var d; + if(typeof v === "string" && v && v.length > 6 && v.slice(0,5) === OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1) === OSF.DDA.SettingsManager.DataJSONSuffix) + { + d = new Date(parseInt(v.slice(5,-1))); + if(d) + return d + } + return v + }); + else + value = Sys.Serialization.JavaScriptSerializer.deserialize(value,true); + ret[key] = value + } + catch(ex){} + } + return ret + } }; -OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function OSF_InitializationHelper$loadAppSpecificScriptAndCreateOM(appContext, appReady, basePath) +OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM = function OSF_InitializationHelper$loadAppSpecificScriptAndCreateOM(appContext, appReady, basePath) { - Type.registerNamespace("Microsoft.Office.WebExtension.MailboxEnums"); - Microsoft.Office.WebExtension.MailboxEnums.EntityType={ - MeetingSuggestion: "meetingSuggestion", - TaskSuggestion: "taskSuggestion", - Address: "address", - EmailAddress: "emailAddress", - Url: "url", - PhoneNumber: "phoneNumber", - Contact: "contact", - FlightReservations: "flightReservations", - ParcelDeliveries: "parcelDeliveries" - }; - Microsoft.Office.WebExtension.MailboxEnums.ItemType={ - Message: "message", - Appointment: "appointment" - }; - Microsoft.Office.WebExtension.MailboxEnums.ResponseType={ - None: "none", - Organizer: "organizer", - Tentative: "tentative", - Accepted: "accepted", - Declined: "declined" - }; - Microsoft.Office.WebExtension.MailboxEnums.RecipientType={ - Other: "other", - DistributionList: "distributionList", - User: "user", - ExternalUser: "externalUser" - }; - Microsoft.Office.WebExtension.MailboxEnums.AttachmentType={ - File: "file", - Item: "item", - Cloud: "cloud" - }; - Microsoft.Office.WebExtension.MailboxEnums.BodyType={ - Text: "text", - Html: "html" - }; - Microsoft.Office.WebExtension.MailboxEnums.ItemNotificationMessageType={ - ProgressIndicator: "progressIndicator", - InformationalMessage: "informationalMessage", - ErrorMessage: "errorMessage" - }; - Microsoft.Office.WebExtension.CoercionType={ - Text: "text", - Html: "html" - }; - Microsoft.Office.WebExtension.MailboxEnums.UserProfileType={ - Office365: "office365", - OutlookCom: "outlookCom", - Enterprise: "enterprise" - }; - Microsoft.Office.WebExtension.MailboxEnums.RestVersion={ - v1_0: "v1.0", - v2_0: "v2.0", - Beta: "beta" - }; - Microsoft.Office.WebExtension.MailboxEnums.ModuleType={Addins: "addins"}; - Type.registerNamespace("OSF.DDA"); - var OSF=window["OSF"] || {}; - OSF.DDA=OSF.DDA || {}; - window["OSF"]["DDA"]["OutlookAppOm"]=OSF.DDA.OutlookAppOm=function(officeAppContext, targetWindow, appReadyCallback) - { - this.$$d_navigateToModuleAsync=Function.createDelegate(this,this.navigateToModuleAsync); - this.$$d_displayPersonaCardAsync=Function.createDelegate(this,this.displayPersonaCardAsync); - this.$$d_displayNewMessageFormApi=Function.createDelegate(this,this.displayNewMessageFormApi); - this.$$d__displayNewAppointmentFormApi$p$0=Function.createDelegate(this,this._displayNewAppointmentFormApi$p$0); - this.$$d_windowOpenOverrideHandler=Function.createDelegate(this,this.windowOpenOverrideHandler); - this.$$d__getRestUrl$p$0=Function.createDelegate(this,this._getRestUrl$p$0); - this.$$d__getEwsUrl$p$0=Function.createDelegate(this,this._getEwsUrl$p$0); - this.$$d__getDiagnostics$p$0=Function.createDelegate(this,this._getDiagnostics$p$0); - this.$$d__getUserProfile$p$0=Function.createDelegate(this,this._getUserProfile$p$0); - this.$$d_getItem=Function.createDelegate(this,this.getItem); - this.$$d__callAppReadyCallback$p$0=Function.createDelegate(this,this._callAppReadyCallback$p$0); - this.$$d__getInitialDataResponseHandler$p$0=Function.createDelegate(this,this._getInitialDataResponseHandler$p$0); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p=this; - this._officeAppContext$p$0=officeAppContext; - this._appReadyCallback$p$0=appReadyCallback; - var $$t_4=this; - var stringLoadedCallback=function() - { - if(appReadyCallback) - if(!$$t_4._officeAppContext$p$0["get_isDialog"]()) - $$t_4.invokeHostMethod(1,null,$$t_4.$$d__getInitialDataResponseHandler$p$0); - else - window.setTimeout($$t_4.$$d__callAppReadyCallback$p$0,0) - }; - if(this._areStringsLoaded$p$0()) - stringLoadedCallback(); - else - this._loadLocalizedScript$p$0(stringLoadedCallback) - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i=function(currentPermissionLevel) - { - if(!currentPermissionLevel) - throw Error.create(window["_u"]["ExtensibilityStrings"]["l_ElevatedPermissionNeeded_Text"]); - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i=function(value, minValue, maxValue, argumentName) - { - if(value < minValue || value > maxValue) - throw Error.argumentOutOfRange(argumentName); - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidModule$p=function(module) - { - if($h.ScriptHelpers.isNullOrUndefined(module)) - throw Error.argumentNull("module"); - else if(module==="") - throw Error.argument("module","module cannot be empty."); - if(module !==window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ModuleType"]["Addins"]) - throw Error.notImplemented(String.format("API not supported for module '{0}'",module)); - }; - window["OSF"]["DDA"]["OutlookAppOm"]._getHtmlBody$p=function(data) - { - var htmlBody=""; - if("htmlBody" in data) - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidHtmlBody$p(data["htmlBody"]); - htmlBody=data["htmlBody"] - } - return htmlBody - }; - window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p=function(data) - { - var attachments=[]; - if("attachments" in data) - { - attachments=data["attachments"]; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentsArray$p(attachments) - } - return attachments - }; - window["OSF"]["DDA"]["OutlookAppOm"]._getOptionsAndCallback$p=function(data) - { - var args=[]; - if("options" in data) - args[0]=data["options"]; - if("callback" in data) - args[args["length"]]=data["callback"]; - return args - }; - window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p=function(attachments) - { - var attachmentsData=new Array(0); - if(Array["isInstanceOfType"](attachments)) - for(var i=0; i < attachments["length"]; i++) - if(Object["isInstanceOfType"](attachments[i])) - { - var attachment=attachments[i]; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachment$p(attachment); - attachmentsData[i]=window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentData$p(attachment) - } - else - throw Error.argument("attachments"); - return attachmentsData - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidHtmlBody$p=function(htmlBody) - { - if(!String["isInstanceOfType"](htmlBody)) - throw Error.argument("htmlBody"); - if($h.ScriptHelpers.isNullOrUndefined(htmlBody)) - throw Error.argument("htmlBody"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(htmlBody.length,0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody") - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentsArray$p=function(attachments) - { - if(!Array["isInstanceOfType"](attachments)) - throw Error.argument("attachments"); - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachment$p=function(attachment) - { - if(!Object["isInstanceOfType"](attachment)) - throw Error.argument("attachments"); - if(!("type" in attachment) || !("name" in attachment)) - throw Error.argument("attachments"); - if(!("url" in attachment || "itemId" in attachment)) - throw Error.argument("attachments"); - }; - window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentData$p=function(attachment) - { - var attachmentData=null; - if(attachment["type"]==="file") - { - var url=attachment["url"]; - var name=attachment["name"]; - var isInline=$h.ScriptHelpers.isValueTrue(attachment["isInline"]); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentUrlOrName$p(url,name); - attachmentData=window["OSF"]["DDA"]["OutlookAppOm"]._createFileAttachmentData$p(url,name,isInline) - } - else if(attachment["type"]==="item") - { - var itemId=window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(attachment["itemId"]); - var name=attachment["name"]; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentItemIdOrName$p(itemId,name); - attachmentData=window["OSF"]["DDA"]["OutlookAppOm"]._createItemAttachmentData$p(itemId,name) - } - else - throw Error.argument("attachments"); - return attachmentData - }; - window["OSF"]["DDA"]["OutlookAppOm"]._createFileAttachmentData$p=function(url, name, isInline) - { - return["file",name,url,isInline] - }; - window["OSF"]["DDA"]["OutlookAppOm"]._createItemAttachmentData$p=function(itemId, name) - { - return["item",name,itemId] - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentUrlOrName$p=function(url, name) - { - if(!String["isInstanceOfType"](url) || !String["isInstanceOfType"](name)) - throw Error.argument("attachments"); - if(url.length > 2048) - throw Error.argumentOutOfRange("attachments",url.length,window["_u"]["ExtensibilityStrings"]["l_AttachmentUrlTooLong_Text"]); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p(name) - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentItemIdOrName$p=function(itemId, name) - { - if(!String["isInstanceOfType"](itemId) || !String["isInstanceOfType"](name)) - throw Error.argument("attachments"); - if(itemId.length > 200) - throw Error.argumentOutOfRange("attachments",itemId.length,window["_u"]["ExtensibilityStrings"]["l_AttachmentItemIdTooLong_Text"]); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p(name) - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p=function(name) - { - if(name.length > 255) - throw Error.argumentOutOfRange("attachments",name.length,window["_u"]["ExtensibilityStrings"]["l_AttachmentNameTooLong_Text"]); - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p=function(restVersion) - { - if(!restVersion) - throw Error.argumentNull("restVersion"); - if(restVersion !==window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"] && restVersion !==window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v2_0"] && restVersion !==window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["Beta"]) - throw Error.argument("restVersion"); - }; - window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost=function(itemId) - { - if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._initialData$p$0 && window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._initialData$p$0.get__isRestIdSupported$i$0()) - return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToRestId"](itemId,window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"]); - return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToEwsId"](itemId,window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"]) - }; - window["OSF"]["DDA"]["OutlookAppOm"]["addAdditionalArgs"]=function(dispid, data) - { - return data - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p=function(value, expectedType, argumentName) - { - if(Object["getType"](value) !==expectedType) - throw Error.argumentType(argumentName); - }; - window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p=function(value, minLength, maxLength, name) - { - if($h.ScriptHelpers.isNullOrUndefined(value)) - return; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(value,String,name); - var stringValue=value; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(stringValue.length,minLength,maxLength,name) - }; - window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p=function(array) - { - return array ? array["join"](";") : null - }; - window["OSF"]["DDA"]["OutlookAppOm"]._convertComposeEmailDictionaryParameterForSetApi$p=function(recipients) - { - if(!recipients) - return null; - var results=new Array(recipients["length"]); - for(var i=0; i < recipients["length"]; i++) - results[i]=[recipients[i]["address"],recipients[i]["name"]]; - return results - }; - window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p=function(emailset, name) - { - if($h.ScriptHelpers.isNullOrUndefined(emailset)) - return null; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(emailset,Array,name); - var originalAttendees=emailset; - var updatedAttendees=null; - var normalizationNeeded=false; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(originalAttendees["length"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxRecipients$p,String.format("{0}.length",name)); - for(var i=0; i < originalAttendees["length"]; i++) - if($h.EmailAddressDetails["isInstanceOfType"](originalAttendees[i])) - { - normalizationNeeded=true; - break - } - if(normalizationNeeded) - updatedAttendees=[]; - for(var i=0; i < originalAttendees["length"]; i++) - if(normalizationNeeded) - { - updatedAttendees[i]=$h.EmailAddressDetails["isInstanceOfType"](originalAttendees[i]) ? originalAttendees[i]["emailAddress"] : originalAttendees[i]; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(updatedAttendees[i],String,String.format("{0}[{1}]",name,i)) - } - else - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(originalAttendees[i],String,String.format("{0}[{1}]",name,i)); - return updatedAttendees - }; - OSF.DDA.OutlookAppOm.prototype={ - _initialData$p$0: null, - _item$p$0: null, - _userProfile$p$0: null, - _diagnostics$p$0: null, - _officeAppContext$p$0: null, - _appReadyCallback$p$0: null, - _clientEndPoint$p$0: null, - _hostItemType$p$0: 0, - _additionalOutlookParams$p$0: null, - get_clientEndPoint: function() - { - if(!this._clientEndPoint$p$0) - this._clientEndPoint$p$0=OSF._OfficeAppFactory["getClientEndPoint"](); - return this._clientEndPoint$p$0 - }, - set_clientEndPoint: function(value) - { - this._clientEndPoint$p$0=value; - return value - }, - get_initialData: function() - { - return this._initialData$p$0 - }, - get__appName$i$0: function() - { - return this._officeAppContext$p$0["get_appName"]() - }, - get_additionalOutlookParams: function() - { - return this._additionalOutlookParams$p$0 - }, - windowOpenOverrideHandler: function(url, targetName, features, replace) - { - this.invokeHostMethod(403,{launchUrl: url},null) - }, - createAsyncResult: function(value, errorCode, detailedErrorCode, userContext, errorMessage) - { - var initArgs={}; - var errorArgs=null; - initArgs[OSF.DDA.AsyncResultEnum.Properties["Value"]]=value; - initArgs[OSF.DDA.AsyncResultEnum.Properties["Context"]]=userContext; - if(0 !==errorCode) - { - errorArgs={}; - var errorProperties=$h.OutlookErrorManager.getErrorArgs(detailedErrorCode); - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties["Name"]]=errorProperties["name"]; - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties["Message"]]=!errorMessage ? errorProperties["message"] : errorMessage; - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties["Code"]]=detailedErrorCode - } - return new OSF.DDA.AsyncResult(initArgs,errorArgs) - }, - _throwOnMethodCallForInsufficientPermission$i$0: function(requiredPermissionLevel, methodName) - { - if(this._initialData$p$0._permissionLevel$p$0 < requiredPermissionLevel) - throw Error.create(String.format(window["_u"]["ExtensibilityStrings"]["l_ElevatedPermissionNeededForMethod_Text"],methodName)); - }, - _displayReplyForm$i$0: function(obj) - { - this._displayReplyFormHelper$p$0(obj,false) - }, - _displayReplyAllForm$i$0: function(obj) - { - this._displayReplyFormHelper$p$0(obj,true) - }, - get_itemNumber: function() - { - return this._additionalOutlookParams$p$0._itemNumber$p$0 - }, - _displayReplyFormHelper$p$0: function(obj, isReplyAll) - { - if(String["isInstanceOfType"](obj)) - this._doDisplayReplyForm$p$0(obj,isReplyAll); - else if(Object["isInstanceOfType"](obj) && Object.getTypeName(obj)==="Object") - this._doDisplayReplyFormWithAttachments$p$0(obj,isReplyAll); - else - throw Error.argumentType(); - }, - _doDisplayReplyForm$p$0: function(htmlBody, isReplyAll) - { - if(!$h.ScriptHelpers.isNullOrUndefined(htmlBody)) - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(htmlBody.length,0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody"); - this.invokeHostMethod(isReplyAll ? 11 : 10,{htmlBody: htmlBody},null) - }, - _doDisplayReplyFormWithAttachments$p$0: function(data, isReplyAll) - { - var htmlBody=window["OSF"]["DDA"]["OutlookAppOm"]._getHtmlBody$p(data); - var attachments=window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p(data); - var parameters=$h.CommonParameters.parse(window["OSF"]["DDA"]["OutlookAppOm"]._getOptionsAndCallback$p(data),false); - var $$t_6=this; - this._standardInvokeHostMethod$i$0(isReplyAll ? 31 : 30,{ - htmlBody: htmlBody, - attachments: window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p(attachments) - },function(rawInput) - { - return rawInput - },parameters._asyncContext$p$0,parameters._callback$p$0) - }, - _standardInvokeHostMethod$i$0: function(dispid, data, format, userContext, callback) - { - var $$t_B=this; - this.invokeHostMethod(dispid,data,function(resultCode, response) - { - if(callback) - { - var asyncResult=null; - if(Object["isInstanceOfType"](response)) - { - var responseDictionary=response; - if("error" in responseDictionary || "data" in responseDictionary || "errorCode" in responseDictionary) - if(!responseDictionary["error"]) - { - var formattedData=format ? format(responseDictionary["data"]) : responseDictionary["data"]; - asyncResult=$$t_B.createAsyncResult(formattedData,0,0,userContext,null) - } - else - { - var errorCode=responseDictionary["errorCode"]; - asyncResult=$$t_B.createAsyncResult(null,1,errorCode,userContext,null) - } - } - if(!asyncResult && resultCode) - asyncResult=$$t_B.createAsyncResult(null,1,9002,userContext,null); - callback(asyncResult) - } - }) - }, - invokeHostMethod: function(dispid, data, responseCallback) - { - if(64===this._officeAppContext$p$0["get_appName"]()) - { - var args={ApiParams: data}; - args["MethodData"]={ - ControlId: OSF._OfficeAppFactory["getId"](), - DispatchId: dispid - }; - args=window["OSF"]["DDA"]["OutlookAppOm"]["addAdditionalArgs"](dispid,args); - if(dispid===1) - this.get_clientEndPoint()["invoke"]("GetInitialData",responseCallback,args); - else - this.get_clientEndPoint()["invoke"]("ExecuteMethod",responseCallback,args) - } - else if(!this._isOwaOnlyMethod$p$0(dispid)) - { - var executeParameters=this.convertToOutlookParameters(dispid,data); - var $$t_D=this; - OSF.ClientHostController["execute"](dispid,executeParameters,function(nativeData, resultCode) - { - if(responseCallback) - { - var responseData=nativeData.toArray(); - var rawData=window["JSON"]["parse"](responseData[0]); - var itemChanged=false; - if(responseData["length"] > 2 && responseData[2] > 0 && $$t_D._additionalOutlookParams$p$0._itemNumber$p$0 > 0) - { - var itemNumber=responseData[2]; - itemChanged=itemNumber !==$$t_D._additionalOutlookParams$p$0._itemNumber$p$0 - } - if(Object["isInstanceOfType"](rawData)) - { - var deserializedData=rawData; - if(itemChanged) - { - deserializedData["error"]=true; - deserializedData["errorCode"]=9030 - } - else if(responseData["length"] > 1 && responseData[1]) - { - deserializedData["error"]=true; - deserializedData["errorCode"]=responseData[1] - } - else - deserializedData["error"]=false; - responseCallback(resultCode,deserializedData) - } - else if(Number["isInstanceOfType"](rawData)) - { - var returnDict={}; - returnDict["error"]=true; - if(itemChanged) - returnDict["errorCode"]=9030; - else - returnDict["errorCode"]=rawData; - responseCallback(resultCode,returnDict) - } - else - throw Error.notImplemented("Return data type from host must be Dictionary or int"); - } - }) - } - else if(responseCallback) - responseCallback(-2,null) - }, - _dictionaryToDate$i$0: function(input) - { - var retValue=new Date(input["year"],input["month"],input["date"],input["hours"],input["minutes"],input["seconds"],!input["milliseconds"] ? 0 : input["milliseconds"]); - if(window["isNaN"](retValue["getTime"]())) - throw Error.format(window["_u"]["ExtensibilityStrings"]["l_InvalidDate_Text"]); - return retValue - }, - _dateToDictionary$i$0: function(input) - { - var retValue={}; - retValue["month"]=input["getMonth"](); - retValue["date"]=input["getDate"](); - retValue["year"]=input["getFullYear"](); - retValue["hours"]=input["getHours"](); - retValue["minutes"]=input["getMinutes"](); - retValue["seconds"]=input["getSeconds"](); - retValue["milliseconds"]=input["getMilliseconds"](); - return retValue - }, - _isOwaOnlyMethod$p$0: function(dispId) - { - switch(dispId) - { - case 402: - case 401: - case 400: - case 403: - return true; - default: - return false - } - }, - isOutlook16OrGreater: function() - { - var hostVersion=this._initialData$p$0.get__hostVersion$i$0(); - var endIndex=0; - var majorVersionNumber=0; - if(hostVersion) - { - endIndex=hostVersion.indexOf("."); - majorVersionNumber=window["parseInt"](hostVersion.substring(0,endIndex)) - } - return majorVersionNumber >=16 - }, - isApiVersionSupported: function(requirementSet) - { - var apiSupported=false; - try - { - var requirementDict=window["JSON"]["parse"](this._officeAppContext$p$0["get_requirementMatrix"]()); - var hostApiVersion=requirementDict["Mailbox"]; - var hostApiVersionParts=hostApiVersion.split("."); - var requirementSetParts=requirementSet.split("."); - if(window["parseInt"](hostApiVersionParts[0]) > window["parseInt"](requirementSetParts[0]) || window["parseInt"](hostApiVersionParts[0])===window["parseInt"](requirementSetParts[0]) && window["parseInt"](hostApiVersionParts[1]) >=window["parseInt"](requirementSetParts[1])) - apiSupported=true - } - catch($$e_6){} - return apiSupported - }, - convertToOutlookParameters: function(dispid, data) - { - var executeParameters=null; - var optionalParameters={}; - switch(dispid) - { - case 1: - case 2: - case 3: - case 14: - case 18: - case 26: - case 32: - case 41: - case 34: - break; - case 12: - optionalParameters["isRest"]=data["isRest"]; - break; - case 4: - var jsonProperty=window["JSON"]["stringify"](data["customProperties"]); - executeParameters=[jsonProperty]; - break; - case 5: - executeParameters=[data["body"]]; - break; - case 8: - case 9: - executeParameters=[data["itemId"]]; - break; - case 7: - executeParameters=[window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["requiredAttendees"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["optionalAttendees"]),data["start"],data["end"],data["location"],window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["resources"]),data["subject"],data["body"]]; - break; - case 44: - executeParameters=[window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["toRecipients"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["ccRecipients"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["bccRecipients"]),data["subject"],data["htmlBody"],data["attachments"]]; - break; - case 43: - executeParameters=[data["ewsIdOrEmail"]]; - break; - case 45: - executeParameters=[data["module"],data["queryString"]]; - break; - case 40: - executeParameters=[data["extensionId"],data["consentState"]]; - break; - case 11: - case 10: - executeParameters=[data["htmlBody"]]; - break; - case 31: - case 30: - executeParameters=[data["htmlBody"],data["attachments"]]; - break; - case 23: - case 13: - case 38: - case 29: - executeParameters=[data["data"],data["coercionType"]]; - break; - case 37: - case 28: - executeParameters=[data["coercionType"]]; - break; - case 17: - executeParameters=[data["subject"]]; - break; - case 15: - executeParameters=[data["recipientField"]]; - break; - case 22: - case 21: - executeParameters=[data["recipientField"],window["OSF"]["DDA"]["OutlookAppOm"]._convertComposeEmailDictionaryParameterForSetApi$p(data["recipientArray"])]; - break; - case 19: - executeParameters=[data["itemId"],data["name"]]; - break; - case 16: - executeParameters=[data["uri"],data["name"],data["isInline"]]; - break; - case 20: - executeParameters=[data["attachmentIndex"]]; - break; - case 25: - executeParameters=[data["TimeProperty"],data["time"]]; - break; - case 24: - executeParameters=[data["TimeProperty"]]; - break; - case 27: - executeParameters=[data["location"]]; - break; - case 33: - case 35: - executeParameters=[data["key"],data["type"],data["persistent"],data["message"],data["icon"]]; - break; - case 36: - executeParameters=[data["key"]]; - break; - default: - Sys.Debug.fail("Unexpected method dispid"); - break - } - if(dispid !==1) - { - var $$t_5; - this._additionalOutlookParams$p$0.updateOutlookExecuteParameters($$t_5={val: executeParameters},optionalParameters),executeParameters=$$t_5["val"] - } - return executeParameters - }, - _displayNewAppointmentFormApi$p$0: function(parameters) - { - var normalizedRequiredAttendees=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["requiredAttendees"],"requiredAttendees"); - var normalizedOptionalAttendees=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["optionalAttendees"],"optionalAttendees"); - window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["location"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxLocationLength$p,"location"); - window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["body"],0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"body"); - window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["subject"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p,"subject"); - if(!$h.ScriptHelpers.isNullOrUndefined(parameters["start"])) - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(parameters["start"],Date,"start"); - var startDateTime=parameters["start"]; - parameters["start"]=startDateTime["getTime"](); - if(!$h.ScriptHelpers.isNullOrUndefined(parameters["end"])) - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(parameters["end"],Date,"end"); - var endDateTime=parameters["end"]; - if(endDateTime < startDateTime) - throw Error.argumentOutOfRange("end",endDateTime,window["_u"]["ExtensibilityStrings"]["l_InvalidEventDates_Text"]); - parameters["end"]=endDateTime["getTime"]() - } - } - var updatedParameters=null; - if(normalizedRequiredAttendees || normalizedOptionalAttendees) - { - updatedParameters={}; - var $$dict_7=parameters; - for(var $$key_8 in $$dict_7) - { - var entry={ - key: $$key_8, - value: $$dict_7[$$key_8] - }; - updatedParameters[entry["key"]]=entry["value"] - } - if(normalizedRequiredAttendees) - updatedParameters["requiredAttendees"]=normalizedRequiredAttendees; - if(normalizedOptionalAttendees) - updatedParameters["optionalAttendees"]=normalizedOptionalAttendees - } - this.invokeHostMethod(7,updatedParameters || parameters,null) - }, - displayNewMessageFormApi: function(parameters) - { - var updatedParameters={}; - if(parameters) - { - var normalizedToRecipients=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["toRecipients"],"toRecipients"); - var normalizedCcRecipients=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["ccRecipients"],"ccRecipients"); - var normalizedBccRecipients=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["bccRecipients"],"bccRecipients"); - window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["htmlBody"],0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody"); - window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["subject"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p,"subject"); - var attachments=window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p(parameters); - var $$dict_7=parameters; - for(var $$key_8 in $$dict_7) - { - var entry={ - key: $$key_8, - value: $$dict_7[$$key_8] - }; - updatedParameters[entry["key"]]=entry["value"] - } - if(normalizedToRecipients) - updatedParameters["toRecipients"]=normalizedToRecipients; - if(normalizedCcRecipients) - updatedParameters["ccRecipients"]=normalizedCcRecipients; - if(normalizedBccRecipients) - updatedParameters["bccRecipients"]=normalizedBccRecipients; - if(attachments) - updatedParameters["attachments"]=window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p(attachments) - } - this.invokeHostMethod(44,updatedParameters || parameters,null) - }, - displayPersonaCardAsync: function(ewsIdOrEmail) - { - var args=[]; - for(var $$pai_3=1; $$pai_3 < arguments["length"];++$$pai_3) - args[$$pai_3 - 1]=arguments[$$pai_3]; - if($h.ScriptHelpers.isNullOrUndefined(ewsIdOrEmail)) - throw Error.argumentNull("ewsIdOrEmail"); - else if(ewsIdOrEmail==="") - throw Error.argument("ewsIdOrEmail","ewsIdOrEmail cannot be empty."); - var parameters=$h.CommonParameters.parse(args,false); - this._standardInvokeHostMethod$i$0(43,{ewsIdOrEmail: ewsIdOrEmail.trim()},null,parameters._asyncContext$p$0,parameters._callback$p$0) - }, - navigateToModuleAsync: function(module) - { - var args=[]; - for(var $$pai_5=1; $$pai_5 < arguments["length"];++$$pai_5) - args[$$pai_5 - 1]=arguments[$$pai_5]; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidModule$p(module); - var parameters=$h.CommonParameters.parse(args,false); - var updatedParameters={}; - if(module===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ModuleType"]["Addins"]) - { - var queryString=""; - if(parameters._options$p$0 && parameters._options$p$0["queryString"]) - queryString=parameters._options$p$0["queryString"]; - updatedParameters["queryString"]=queryString - } - updatedParameters["module"]=module; - this._standardInvokeHostMethod$i$0(45,updatedParameters,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }, - _initializeMethods$p$0: function() - { - var currentInstance=this; - if($h.Item["isInstanceOfType"](this._item$p$0) || this._hostItemType$p$0===6) - { - currentInstance["displayNewAppointmentForm"]=this.$$d__displayNewAppointmentFormApi$p$0; - currentInstance["displayNewMessageForm"]=this.$$d_displayNewMessageFormApi; - currentInstance["displayPersonaCardAsync"]=this.$$d_displayPersonaCardAsync; - currentInstance["navigateToModuleAsync"]=this.$$d_navigateToModuleAsync - } - }, - _getInitialDataResponseHandler$p$0: function(resultCode, data) - { - if(resultCode) - return; - this["initialize"](data); - this["displayName"]="mailbox"; - window.setTimeout(this.$$d__callAppReadyCallback$p$0,0) - }, - _callAppReadyCallback$p$0: function() - { - this._appReadyCallback$p$0() - }, - _invokeGetTokenMethodAsync$p$0: function(outlookDispid, data, methodName, callback, userContext) - { - if($h.ScriptHelpers.isNullOrUndefined(callback)) - throw Error.argumentNull("callback"); - var $$t_9=this; - this.invokeHostMethod(outlookDispid,data,function(resultCode, response) - { - var asyncResult; - if(resultCode) - asyncResult=$$t_9.createAsyncResult(null,1,9017,userContext,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode)); - else - { - var responseDictionary=response; - if(responseDictionary["wasSuccessful"]) - asyncResult=$$t_9.createAsyncResult(responseDictionary["token"],0,0,userContext,null); - else - asyncResult=$$t_9.createAsyncResult(null,1,responseDictionary["errorCode"],userContext,responseDictionary["errorMessage"]) - } - callback(asyncResult) - }) - }, - getItem: function() - { - return this._item$p$0 - }, - _getUserProfile$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0); - return this._userProfile$p$0 - }, - _getDiagnostics$p$0: function() - { - return this._diagnostics$p$0 - }, - _getEwsUrl$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0); - return this._initialData$p$0.get__ewsUrl$i$0() - }, - _getRestUrl$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0); - if(!this._initialData$p$0.get__restUrl$i$0()) - return null; - return this._initialData$p$0.get__restUrl$i$0() - }, - _findOffset$p$0: function(value) - { - var ranges=this._initialData$p$0.get__timeZoneOffsets$i$0(); - for(var r=0; r < ranges["length"]; r++) - { - var range=ranges[r]; - var start=window["parseInt"](range["start"]); - var end=window["parseInt"](range["end"]); - if(value["getTime"]() - start >=0 && value["getTime"]() - end < 0) - return window["parseInt"](range["offset"]) - } - throw Error.format(window["_u"]["ExtensibilityStrings"]["l_InvalidDate_Text"]); - }, - _areStringsLoaded$p$0: function() - { - var stringsLoaded=false; - try - { - stringsLoaded=!$h.ScriptHelpers.isNullOrUndefined(window["_u"]["ExtensibilityStrings"]["l_EwsRequestOversized_Text"]) - } - catch($$e_1){} - return stringsLoaded - }, - _loadLocalizedScript$p$0: function(stringLoadedCallback) - { - var url=null; - var baseUrl=""; - var scripts=document.getElementsByTagName("script"); - for(var i=scripts.length - 1; i >=0; i--) - { - var filename=null; - var attributes=scripts[i].attributes; - if(attributes) - { - var attribute=attributes.getNamedItem("src"); - if(attribute) - filename=attribute.value; - if(filename) - { - var debug=false; - filename=filename.toLowerCase(); - var officeIndex=filename.indexOf("office_strings.js"); - if(officeIndex < 0) - { - officeIndex=filename.indexOf("office_strings.debug.js"); - debug=true - } - if(officeIndex > 0 && officeIndex < filename.length) - { - url=filename.replace(debug ? "office_strings.debug.js" : "office_strings.js","outlook_strings.js"); - var languageUrl=filename.substring(0,officeIndex); - var lastIndexOfSlash=languageUrl.lastIndexOf("/",languageUrl.length - 2); - if(lastIndexOfSlash===-1) - lastIndexOfSlash=languageUrl.lastIndexOf("\\",languageUrl.length - 2); - if(lastIndexOfSlash !==-1 && languageUrl.length > lastIndexOfSlash+1) - baseUrl=languageUrl.substring(0,lastIndexOfSlash+1); - break - } - } - } - } - if(url) - { - var head=document.getElementsByTagName("head")[0]; - var scriptElement=null; - var $$t_H=this; - var scriptElementCallback=function() - { - if(stringLoadedCallback && (!scriptElement.readyState || scriptElement.readyState && (scriptElement.readyState==="loaded" || scriptElement.readyState==="complete"))) - { - scriptElement.onload=null; - scriptElement.onreadystatechange=null; - stringLoadedCallback() - } - }; - var $$t_I=this; - var failureCallback=function() - { - if(!$$t_I._areStringsLoaded$p$0()) - { - var fallbackUrl=baseUrl+"en-us/"+"outlook_strings.js"; - scriptElement.onload=null; - scriptElement.onreadystatechange=null; - scriptElement=$$t_I._createScriptElement$p$0(fallbackUrl); - scriptElement.onload=scriptElementCallback; - scriptElement.onreadystatechange=scriptElementCallback; - head.appendChild(scriptElement) - } - }; - scriptElement=this._createScriptElement$p$0(url); - scriptElement.onload=scriptElementCallback; - scriptElement.onreadystatechange=scriptElementCallback; - window.setTimeout(failureCallback,2e3); - head.appendChild(scriptElement) - } - }, - _createScriptElement$p$0: function(url) - { - var scriptElement=document.createElement("script"); - scriptElement.type="text/javascript"; - scriptElement.src=url; - return scriptElement - } - }; - OSF.DDA.OutlookAppOm.prototype.initialize=function(initialData) - { - if(!initialData) - { - this._additionalOutlookParams$p$0=new $h.AdditionalGlobalParameters(true); - this._initialData$p$0=null; - this._item$p$0=null; - return - } - var ItemTypeKey="itemType"; - this._initialData$p$0=new $h.InitialData(initialData); - this._hostItemType$p$0=initialData[ItemTypeKey]; - if(1===initialData[ItemTypeKey]) - this._item$p$0=new $h.Message(this._initialData$p$0); - else if(3===initialData[ItemTypeKey]) - this._item$p$0=new $h.MeetingRequest(this._initialData$p$0); - else if(2===initialData[ItemTypeKey]) - this._item$p$0=new $h.Appointment(this._initialData$p$0); - else if(4===initialData[ItemTypeKey]) - this._item$p$0=new $h.MessageCompose(this._initialData$p$0); - else if(5===initialData[ItemTypeKey]) - this._item$p$0=new $h.AppointmentCompose(this._initialData$p$0); - else if(6===initialData[ItemTypeKey]); - else - Sys.Debug.trace("Unexpected item type was received from the host."); - this._userProfile$p$0=new $h.UserProfile(this._initialData$p$0); - this._diagnostics$p$0=new $h.Diagnostics(this._initialData$p$0,this._officeAppContext$p$0["get_appName"]()); - var supportsAdditionalParameters=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() !==8 || this.isOutlook16OrGreater() || this.isApiVersionSupported("1.5"); - this._additionalOutlookParams$p$0=new $h.AdditionalGlobalParameters(supportsAdditionalParameters); - if("itemNumber" in initialData) - this["setCurrentItemNumber"](initialData["itemNumber"]); - this._initializeMethods$p$0(); - $h.InitialData._defineReadOnlyProperty$i(this,"item",this.$$d_getItem); - $h.InitialData._defineReadOnlyProperty$i(this,"userProfile",this.$$d__getUserProfile$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"diagnostics",this.$$d__getDiagnostics$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"ewsUrl",this.$$d__getEwsUrl$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"restUrl",this.$$d__getRestUrl$p$0); - if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===64) - if(this._initialData$p$0.get__overrideWindowOpen$i$0()) - window.open=this.$$d_windowOpenOverrideHandler - }; - OSF.DDA.OutlookAppOm.prototype.makeEwsRequestAsync=function(data) - { - var args=[]; - for(var $$pai_5=1; $$pai_5 < arguments["length"];++$$pai_5) - args[$$pai_5 - 1]=arguments[$$pai_5]; - if($h.ScriptHelpers.isNullOrUndefined(data)) - throw Error.argumentNull("data"); - if(data.length > window["OSF"]["DDA"]["OutlookAppOm"]._maxEwsRequestSize$p) - throw Error.argument("data",window["_u"]["ExtensibilityStrings"]["l_EwsRequestOversized_Text"]); - this._throwOnMethodCallForInsufficientPermission$i$0(3,"makeEwsRequestAsync"); - var parameters=$h.CommonParameters.parse(args,true,true); - var ewsRequest=new $h.EwsRequest(parameters._asyncContext$p$0); - var $$t_4=this; - ewsRequest.onreadystatechange=function() - { - if(4===ewsRequest.get__requestState$i$1()) - parameters._callback$p$0(ewsRequest._asyncResult$p$0) - }; - ewsRequest.send(data) - }; - OSF.DDA.OutlookAppOm.prototype.recordDataPoint=function(data) - { - if($h.ScriptHelpers.isNullOrUndefined(data)) - throw Error.argumentNull("data"); - this.invokeHostMethod(402,data,null) - }; - OSF.DDA.OutlookAppOm.prototype.recordTrace=function(data) - { - if($h.ScriptHelpers.isNullOrUndefined(data)) - throw Error.argumentNull("data"); - this.invokeHostMethod(401,data,null) - }; - OSF.DDA.OutlookAppOm.prototype.trackCtq=function(data) - { - if($h.ScriptHelpers.isNullOrUndefined(data)) - throw Error.argumentNull("data"); - this.invokeHostMethod(400,data,null) - }; - OSF.DDA.OutlookAppOm.prototype.convertToLocalClientTime=function(timeValue) - { - var date=new Date(timeValue["getTime"]()); - var offset=date["getTimezoneOffset"]() * -1; - if(this._initialData$p$0 && this._initialData$p$0.get__timeZoneOffsets$i$0()) - { - date["setUTCMinutes"](date["getUTCMinutes"]() - offset); - offset=this._findOffset$p$0(date); - date["setUTCMinutes"](date["getUTCMinutes"]()+offset) - } - var retValue=this._dateToDictionary$i$0(date); - retValue["timezoneOffset"]=offset; - return retValue - }; - OSF.DDA.OutlookAppOm.prototype.convertToUtcClientTime=function(input) - { - var retValue=this._dictionaryToDate$i$0(input); - if(this._initialData$p$0 && this._initialData$p$0.get__timeZoneOffsets$i$0()) - { - var offset=this._findOffset$p$0(retValue); - retValue["setUTCMinutes"](retValue["getUTCMinutes"]() - offset); - offset=!input["timezoneOffset"] ? retValue["getTimezoneOffset"]() * -1 : input["timezoneOffset"]; - retValue["setUTCMinutes"](retValue["getUTCMinutes"]()+offset) - } - return retValue - }; - OSF.DDA.OutlookAppOm.prototype.convertToRestId=function(itemId, restVersion) - { - if(!itemId) - throw Error.argumentNull("itemId"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p(restVersion); - return itemId.replace(new RegExp("[/]","g"),"-").replace(new RegExp("[+]","g"),"_") - }; - OSF.DDA.OutlookAppOm.prototype.convertToEwsId=function(itemId, restVersion) - { - if(!itemId) - throw Error.argumentNull("itemId"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p(restVersion); - return itemId.replace(new RegExp("[-]","g"),"/").replace(new RegExp("[_]","g"),"+") - }; - OSF.DDA.OutlookAppOm.prototype.getUserIdentityTokenAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - this._throwOnMethodCallForInsufficientPermission$i$0(1,"getUserIdentityTokenAsync"); - var parameters=$h.CommonParameters.parse(args,true,true); - this._invokeGetTokenMethodAsync$p$0(2,null,"GetUserIdentityToken",parameters._callback$p$0,parameters._asyncContext$p$0) - }; - OSF.DDA.OutlookAppOm.prototype.getCallbackTokenAsync=function() - { - var args=[]; - for(var $$pai_7=0; $$pai_7 < arguments["length"];++$$pai_7) - args[$$pai_7]=arguments[$$pai_7]; - this._throwOnMethodCallForInsufficientPermission$i$0(1,"getCallbackTokenAsync"); - var parameters=$h.CommonParameters.parse(args,true,true); - var options={}; - if(parameters._options$p$0) - for(var $$arr_3=Object["keys"](parameters._options$p$0), $$len_4=$$arr_3.length, $$idx_5=0; $$idx_5 < $$len_4;++$$idx_5) - { - var key=$$arr_3[$$idx_5]; - options[key]=parameters._options$p$0[key] - } - if(!("isRest" in options)) - options["isRest"]=false; - this._invokeGetTokenMethodAsync$p$0(12,options,"GetCallbackToken",parameters._callback$p$0,parameters._asyncContext$p$0) - }; - OSF.DDA.OutlookAppOm.prototype.displayMessageForm=function(itemId) - { - if($h.ScriptHelpers.isNullOrUndefined(itemId)) - throw Error.argumentNull("itemId"); - this.invokeHostMethod(8,{itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId)},null) - }; - OSF.DDA.OutlookAppOm.prototype.displayAppointmentForm=function(itemId) - { - if($h.ScriptHelpers.isNullOrUndefined(itemId)) - throw Error.argumentNull("itemId"); - this.invokeHostMethod(9,{itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId)},null) - }; - OSF.DDA.OutlookAppOm.prototype.RegisterConsentAsync=function(consentState) - { - if(consentState !==2 && consentState !==1 && consentState) - throw Error.argumentOutOfRange("consentState"); - var parameters={}; - parameters["consentState"]=consentState["toString"](); - parameters["extensionId"]=this["GetExtensionId"](); - this.invokeHostMethod(40,parameters,null) - }; - OSF.DDA.OutlookAppOm.prototype.CloseApp=function() - { - this.invokeHostMethod(42,null,null) - }; - OSF.DDA.OutlookAppOm.prototype.GetIsRead=function() - { - return this._initialData$p$0.get__isRead$i$0() - }; - OSF.DDA.OutlookAppOm.prototype.GetEndNodeUrl=function() - { - return this._initialData$p$0.get__endNodeUrl$i$0() - }; - OSF.DDA.OutlookAppOm.prototype.GetConsentMetadata=function() - { - return this._initialData$p$0.get__consentMetadata$i$0() - }; - OSF.DDA.OutlookAppOm.prototype.GetEntryPointUrl=function() - { - return this._initialData$p$0.get__entryPointUrl$i$0() - }; - OSF.DDA.OutlookAppOm.prototype.GetMarketplaceContentMarket=function() - { - return this._initialData$p$0.get__marketplaceContentMarket$i$0() - }; - OSF.DDA.OutlookAppOm.prototype.GetMarketplaceAssetId=function() - { - return this._initialData$p$0.get__marketplaceAssetId$i$0() - }; - OSF.DDA.OutlookAppOm.prototype.GetExtensionId=function() - { - return this._initialData$p$0.get__extensionId$i$0() - }; - OSF.DDA.OutlookAppOm.prototype.setCurrentItemNumber=function(itemNumber) - { - this._additionalOutlookParams$p$0.setCurrentItemNumber(itemNumber) - }; - window["OSF"]["DDA"]["Settings"]=OSF.DDA.Settings=function(data) - { - this._rawData$p$0=data - }; - window["OSF"]["DDA"]["Settings"]._convertFromRawSettings$p=function(rawSettings) - { - if(!rawSettings) - return{}; - if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===8 || window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===65536 || window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===4194304) - { - var outlookSettings=rawSettings["SettingsKey"]; - if(outlookSettings) - return OSF.DDA.SettingsManager["deserializeSettings"](outlookSettings) - } - return rawSettings - }; - OSF.DDA.Settings.prototype={ - _rawData$p$0: null, - _settingsData$p$0: null, - get__data$p$0: function() - { - if(!this._settingsData$p$0) - { - this._settingsData$p$0=window["OSF"]["DDA"]["Settings"]._convertFromRawSettings$p(this._rawData$p$0); - this._rawData$p$0=null - } - return this._settingsData$p$0 - }, - _saveSettingsForOutlook$p$0: function(callback, userContext) - { - var storedException=null; - try - { - var serializedSettings=OSF.DDA.SettingsManager["serializeSettings"](this.get__data$p$0()); - var jsonSettings=window["JSON"]["stringify"](serializedSettings); - var settingsObjectToSave={SettingsKey: jsonSettings}; - OSF.DDA.ClientSettingsManager["write"](settingsObjectToSave) - } - catch(ex) - { - storedException=ex - } - if(callback) - { - var asyncResult; - if(storedException) - asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9019,userContext,storedException["message"]); - else - asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,0,0,userContext,null); - callback(asyncResult) - } - }, - _saveSettingsForOwa$p$0: function(callback, userContext) - { - var serializedSettings=OSF.DDA.SettingsManager["serializeSettings"](this.get__data$p$0()); - var $$t_7=this; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.invokeHostMethod(404,[serializedSettings],function(resultCode, response) - { - if(callback) - { - var asyncResult; - if(resultCode) - asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9017,userContext,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode)); - else - { - var responseDictionary=response; - if(!responseDictionary["error"]) - asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,0,0,userContext,null); - else - asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9019,userContext,responseDictionary["errorMessage"]) - } - callback(asyncResult) - } - }) - } - }; - OSF.DDA.Settings.prototype.get=function(name) - { - return this.get__data$p$0()[name] - }; - OSF.DDA.Settings.prototype.set=function(name, value) - { - this.get__data$p$0()[name]=value - }; - OSF.DDA.Settings.prototype.remove=function(name) - { - delete this.get__data$p$0()[name] - }; - OSF.DDA.Settings.prototype.saveAsync=function() - { - var args=[]; - for(var $$pai_4=0; $$pai_4 < arguments["length"];++$$pai_4) - args[$$pai_4]=arguments[$$pai_4]; - var commonParameters=$h.CommonParameters.parse(args,false); - if(window["JSON"]["stringify"](OSF.DDA.SettingsManager["serializeSettings"](this.get__data$p$0())).length > 32768) - { - var asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9019,commonParameters._asyncContext$p$0,""); - var $$t_3=this; - window.setTimeout(function() - { - commonParameters._callback$p$0(asyncResult) - },0); - return - } - if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===64) - this._saveSettingsForOwa$p$0(commonParameters._callback$p$0,commonParameters._asyncContext$p$0); - else - this._saveSettingsForOutlook$p$0(commonParameters._callback$p$0,commonParameters._asyncContext$p$0) - }; - Type.registerNamespace("$h"); - var $h=window["$h"] || {}; - Type.registerNamespace("Office.cast"); - var Office=window["Office"] || {}; - Office.cast=Office.cast || {}; - $h.AdditionalGlobalParameters=function(supported) - { - this._parameterBlobSupported$p$0=supported; - this._itemNumber$p$0=0 - }; - $h.AdditionalGlobalParameters.prototype={ - _parameterBlobSupported$p$0: false, - _itemNumber$p$0: 0, - setCurrentItemNumber: function(itemNumber) - { - if(itemNumber > 0) - this._itemNumber$p$0=itemNumber - }, - get_itemNumber: function() - { - return this._itemNumber$p$0 - }, - updateOutlookExecuteParameters: function(executeParameters, additionalApiParameters) - { - if(this._parameterBlobSupported$p$0) - { - if(this._itemNumber$p$0 > 0) - additionalApiParameters["itemNumber"]=this._itemNumber$p$0["toString"](); - if(!Object["keys"](additionalApiParameters)["length"]) - return; - if(!executeParameters["val"]) - executeParameters["val"]=[]; - executeParameters["val"]["push"](window["JSON"]["stringify"](additionalApiParameters)) - } - } - }; - $h.Appointment=function(dataDictionary) - { - this.$$d__getOrganizer$p$2=Function.createDelegate(this,this._getOrganizer$p$2); - this.$$d__getNormalizedSubject$p$2=Function.createDelegate(this,this._getNormalizedSubject$p$2); - this.$$d__getSubject$p$2=Function.createDelegate(this,this._getSubject$p$2); - this.$$d__getResources$p$2=Function.createDelegate(this,this._getResources$p$2); - this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2); - this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2); - this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2); - this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2); - this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2); - $h.Appointment["initializeBase"](this,[dataDictionary]); - $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"resources",this.$$d__getResources$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"organizer",this.$$d__getOrganizer$p$2) - }; - $h.Appointment.prototype={ - getItemType: function() - { - return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Appointment"] - }, - _getStart$p$2: function() - { - return this._data$p$0.get__start$i$0() - }, - _getEnd$p$2: function() - { - return this._data$p$0.get__end$i$0() - }, - _getLocation$p$2: function() - { - return this._data$p$0.get__location$i$0() - }, - _getOptionalAttendees$p$2: function() - { - return this._data$p$0.get__cc$i$0() - }, - _getRequiredAttendees$p$2: function() - { - return this._data$p$0.get__to$i$0() - }, - _getResources$p$2: function() - { - return this._data$p$0.get__resources$i$0() - }, - _getSubject$p$2: function() - { - return this._data$p$0.get__subject$i$0() - }, - _getNormalizedSubject$p$2: function() - { - return this._data$p$0.get__normalizedSubject$i$0() - }, - _getOrganizer$p$2: function() - { - return this._data$p$0.get__organizer$i$0() - } - }; - $h.Appointment.prototype.getEntities=function() - { - return this._data$p$0._getEntities$i$0() - }; - $h.Appointment.prototype.getEntitiesByType=function(entityType) - { - return this._data$p$0._getEntitiesByType$i$0(entityType) - }; - $h.Appointment.prototype.getSelectedEntities=function() - { - return this._data$p$0._getSelectedEntities$i$0() - }; - $h.Appointment.prototype.getRegExMatches=function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches"); - return this._data$p$0._getRegExMatches$i$0() - }; - $h.Appointment.prototype.getFilteredEntitiesByName=function(name) - { - return this._data$p$0._getFilteredEntitiesByName$i$0(name) - }; - $h.Appointment.prototype.getRegExMatchesByName=function(name) - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName"); - return this._data$p$0._getRegExMatchesByName$i$0(name) - }; - $h.Appointment.prototype.getSelectedRegExMatches=function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedRegExMatches"); - return this._data$p$0._getSelectedRegExMatches$i$0() - }; - $h.Appointment.prototype.displayReplyForm=function(obj) - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyForm$i$0(obj) - }; - $h.Appointment.prototype.displayReplyAllForm=function(obj) - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyAllForm$i$0(obj) - }; - $h.AppointmentCompose=function(data) - { - this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2); - this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2); - this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2); - this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2); - this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2); - $h.AppointmentCompose["initializeBase"](this,[data]); - $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2) - }; - $h.AppointmentCompose.prototype={ - _requiredAttendees$p$2: null, - _optionalAttendees$p$2: null, - _start$p$2: null, - _end$p$2: null, - _location$p$2: null, - getItemType: function() - { - return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Appointment"] - }, - _getRequiredAttendees$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._requiredAttendees$p$2) - this._requiredAttendees$p$2=new $h.ComposeRecipient(0,"requiredAttendees"); - return this._requiredAttendees$p$2 - }, - _getOptionalAttendees$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._optionalAttendees$p$2) - this._optionalAttendees$p$2=new $h.ComposeRecipient(1,"optionalAttendees"); - return this._optionalAttendees$p$2 - }, - _getStart$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._start$p$2) - this._start$p$2=new $h.ComposeTime(1); - return this._start$p$2 - }, - _getEnd$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._end$p$2) - this._end$p$2=new $h.ComposeTime(2); - return this._end$p$2 - }, - _getLocation$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._location$p$2) - this._location$p$2=new $h.ComposeLocation; - return this._location$p$2 - } - }; - $h.AttachmentConstants=function(){}; - $h.AttachmentDetails=function(data) - { - this.$$d__getIsInline$p$0=Function.createDelegate(this,this._getIsInline$p$0); - this.$$d__getAttachmentType$p$0=Function.createDelegate(this,this._getAttachmentType$p$0); - this.$$d__getSize$p$0=Function.createDelegate(this,this._getSize$p$0); - this.$$d__getContentType$p$0=Function.createDelegate(this,this._getContentType$p$0); - this.$$d__getName$p$0=Function.createDelegate(this,this._getName$p$0); - this.$$d__getId$p$0=Function.createDelegate(this,this._getId$p$0); - this._data$p$0=data; - $h.InitialData._defineReadOnlyProperty$i(this,"id",this.$$d__getId$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"name",this.$$d__getName$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"contentType",this.$$d__getContentType$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"size",this.$$d__getSize$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"attachmentType",this.$$d__getAttachmentType$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"isInline",this.$$d__getIsInline$p$0) - }; - $h.AttachmentDetails.prototype={ - _data$p$0: null, - _getId$p$0: function() - { - return this._data$p$0["id"] - }, - _getName$p$0: function() - { - return this._data$p$0["name"] - }, - _getContentType$p$0: function() - { - return this._data$p$0["contentType"] - }, - _getSize$p$0: function() - { - return this._data$p$0["size"] - }, - _getAttachmentType$p$0: function() - { - var response=this._data$p$0["attachmentType"]; - return response < $h.AttachmentDetails._attachmentTypeMap$p["length"] ? $h.AttachmentDetails._attachmentTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["File"] - }, - _getIsInline$p$0: function() - { - return this._data$p$0["isInline"] - } - }; - $h.Body=function(){}; - $h.Body._tryMapToHostCoercionType$i=function(coercionType, hostCoercionType) - { - hostCoercionType["val"]=undefined; - if(coercionType===window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Html"]) - hostCoercionType["val"]=3; - else if(coercionType===window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Text"]) - hostCoercionType["val"]=0; - else - return false; - return true - }; - $h.Body.prototype.getAsync=function(coercionType) - { - var args=[]; - for(var $$pai_7=1; $$pai_7 < arguments["length"];++$$pai_7) - args[$$pai_7 - 1]=arguments[$$pai_7]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"body.getAsync"); - var commonParameters=$h.CommonParameters.parse(args,true); - var hostCoercionType; - var $$t_5, - $$t_6; - if(!($$t_6=$h.Body._tryMapToHostCoercionType$i(coercionType,$$t_5={val: hostCoercionType}),hostCoercionType=$$t_5["val"],$$t_6)) - throw Error.argument("coercionType"); - var dataToHost={coercionType: hostCoercionType}; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(37,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.ComposeBody=function() - { - $h.ComposeBody["initializeBase"](this) - }; - $h.ComposeBody._createParameterDictionaryToHost$i=function(data, parameters) - { - var dataToHost={data: data}; - if(parameters._options$p$0 && parameters._options$p$0["hasOwnProperty"]("coercionType") && !$h.ScriptHelpers.isNull(parameters._options$p$0["coercionType"])) - { - var hostCoercionType; - var $$t_4, - $$t_5; - if(!($$t_5=$h.Body._tryMapToHostCoercionType$i(parameters._options$p$0["coercionType"],$$t_4={val: hostCoercionType}),hostCoercionType=$$t_4["val"],$$t_5)) - { - if(parameters._callback$p$0) - parameters._callback$p$0(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,1e3,parameters._asyncContext$p$0,null)); - return null - } - dataToHost["coercionType"]=hostCoercionType - } - else - dataToHost["coercionType"]=0; - return dataToHost - }; - $h.ComposeBody.prototype.getTypeAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"body.getTypeAsync"); - var parameters=$h.CommonParameters.parse(args,true); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(14,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeBody.prototype.setSelectedDataAsync=function(data) - { - var args=[]; - for(var $$pai_4=1; $$pai_4 < arguments["length"];++$$pai_4) - args[$$pai_4 - 1]=arguments[$$pai_4]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.setSelectedDataAsync"); - var parameters=$h.CommonParameters.parse(args,false); - if(!String["isInstanceOfType"](data)) - throw Error.argumentType("data",Object["getType"](data),String); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); - var dataToHost=$h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); - if(!dataToHost) - return; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(13,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeBody.prototype.prependAsync=function(data) - { - var args=[]; - for(var $$pai_4=1; $$pai_4 < arguments["length"];++$$pai_4) - args[$$pai_4 - 1]=arguments[$$pai_4]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.prependAsync"); - var parameters=$h.CommonParameters.parse(args,false); - if(!String["isInstanceOfType"](data)) - throw Error.argumentType("data",Object["getType"](data),String); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); - var dataToHost=$h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); - if(!dataToHost) - return; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(23,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeBody.prototype.setAsync=function(data) - { - var args=[]; - for(var $$pai_4=1; $$pai_4 < arguments["length"];++$$pai_4) - args[$$pai_4 - 1]=arguments[$$pai_4]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.setAsync"); - var parameters=$h.CommonParameters.parse(args,false); - if(!String["isInstanceOfType"](data)) - throw Error.argumentType("data",Object["getType"](data),String); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); - var dataToHost=$h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); - if(!dataToHost) - return; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(38,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeItem=function(data) - { - this.$$d__getBody$p$1=Function.createDelegate(this,this._getBody$p$1); - this.$$d__getSubject$p$1=Function.createDelegate(this,this._getSubject$p$1); - $h.ComposeItem["initializeBase"](this,[data]); - $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$1); - $h.InitialData._defineReadOnlyProperty$i(this,"body",this.$$d__getBody$p$1) - }; - $h.ComposeItem.prototype={ - _subject$p$1: null, - _body$p$1: null, - _getBody$p$1: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._body$p$1) - this._body$p$1=new $h.ComposeBody; - return this._body$p$1 - }, - _getSubject$p$1: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._subject$p$1) - this._subject$p$1=new $h.ComposeSubject; - return this._subject$p$1 - } - }; - $h.ComposeItem.prototype.addFileAttachmentAsync=function(uri, attachmentName) - { - var args=[]; - for(var $$pai_6=2; $$pai_6 < arguments["length"];++$$pai_6) - args[$$pai_6 - 2]=arguments[$$pai_6]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"addFileAttachmentAsync"); - if(!$h.ScriptHelpers.isNonEmptyString(uri)) - throw Error.argument("uri"); - if(!$h.ScriptHelpers.isNonEmptyString(attachmentName)) - throw Error.argument("attachmentName"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(uri.length,0,2048,"uri"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentName.length,0,255,"attachmentName"); - var commonParameters=$h.CommonParameters.parse(args,false); - var isInline=false; - if(!$h.ScriptHelpers.isNull(commonParameters._options$p$0)) - isInline=$h.ScriptHelpers.isValueTrue(commonParameters._options$p$0["isInline"]); - var parameters={ - uri: uri, - name: attachmentName, - isInline: isInline, - __timeout__: 6e5 - }; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(16,parameters,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.ComposeItem.prototype.addItemAttachmentAsync=function(itemId, attachmentName) - { - var args=[]; - for(var $$pai_5=2; $$pai_5 < arguments["length"];++$$pai_5) - args[$$pai_5 - 2]=arguments[$$pai_5]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"addItemAttachmentAsync"); - if(!$h.ScriptHelpers.isNonEmptyString(itemId)) - throw Error.argument("itemId"); - if(!$h.ScriptHelpers.isNonEmptyString(attachmentName)) - throw Error.argument("attachmentName"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(itemId.length,0,200,"itemId"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentName.length,0,255,"attachmentName"); - var commonParameters=$h.CommonParameters.parse(args,false); - var parameters={ - itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId), - name: attachmentName, - __timeout__: 6e5 - }; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(19,parameters,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.ComposeItem.prototype.removeAttachmentAsync=function(attachmentId) - { - var args=[]; - for(var $$pai_3=1; $$pai_3 < arguments["length"];++$$pai_3) - args[$$pai_3 - 1]=arguments[$$pai_3]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"removeAttachmentAsync"); - if(!$h.ScriptHelpers.isNonEmptyString(attachmentId)) - throw Error.argument("attachmentId"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentId.length,0,200,"attachmentId"); - var commonParameters=$h.CommonParameters.parse(args,false); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(20,{attachmentIndex: attachmentId},null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.ComposeItem.prototype.getSelectedDataAsync=function(coercionType) - { - var args=[]; - for(var $$pai_7=1; $$pai_7 < arguments["length"];++$$pai_7) - args[$$pai_7 - 1]=arguments[$$pai_7]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedDataAsync"); - var commonParameters=$h.CommonParameters.parse(args,true); - var hostCoercionType; - var $$t_5, - $$t_6; - if(coercionType !==window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Html"] && coercionType !==window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Text"] || !($$t_6=$h.Body._tryMapToHostCoercionType$i(coercionType,$$t_5={val: hostCoercionType}),hostCoercionType=$$t_5["val"],$$t_6)) - throw Error.argument("coercionType"); - var dataToHost={coercionType: hostCoercionType}; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(28,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.ComposeItem.prototype.setSelectedDataAsync=function(data) - { - var args=[]; - for(var $$pai_4=1; $$pai_4 < arguments["length"];++$$pai_4) - args[$$pai_4 - 1]=arguments[$$pai_4]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"setSelectedDataAsync"); - var parameters=$h.CommonParameters.parse(args,false); - if(!String["isInstanceOfType"](data)) - throw Error.argumentType("data",Object["getType"](data),String); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); - var dataToHost=$h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); - if(!dataToHost) - return; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(29,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeItem.prototype.close=function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(41,null,null,null,null) - }; - $h.ComposeItem.prototype.saveAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"saveAsync"); - var parameters=$h.CommonParameters.parse(args,false); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(32,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeRecipient=function(type, propertyName) - { - this._type$p$0=type; - this._propertyName$p$0=propertyName - }; - $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p=function(displayName, emailAddress) - { - if(!displayName && !emailAddress) - throw Error.argument("recipients"); - if(displayName && displayName.length > 255) - throw Error.argumentOutOfRange("recipients",displayName.length,window["_u"]["ExtensibilityStrings"]["l_DisplayNameTooLong_Text"]); - if(emailAddress && emailAddress.length > 571) - throw Error.argumentOutOfRange("recipients",emailAddress.length,window["_u"]["ExtensibilityStrings"]["l_EmailAddressTooLong_Text"]); - }; - $h.ComposeRecipient._getAsyncFormatter$p=function(rawInput) - { - var input=rawInput; - var output=[]; - for(var i=0; i < input["length"]; i++) - { - var email=new $h.EmailAddressDetails(input[i]); - output[i]=email - } - return output - }; - $h.ComposeRecipient._createEmailDictionaryForHost$p=function(address, name) - { - return{ - address: address, - name: name - } - }; - $h.ComposeRecipient.prototype={ - _propertyName$p$0: null, - _type$p$0: 0, - setAddHelper: function(recipients, args, isSet) - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(recipients["length"],0,100,"recipients"); - var parameters=$h.CommonParameters.parse(args,false); - var recipientData=[]; - if(Array["isInstanceOfType"](recipients)) - for(var i=0; i < recipients["length"]; i++) - if(String["isInstanceOfType"](recipients[i])) - { - $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(recipients[i],recipients[i]); - recipientData[i]=$h.ComposeRecipient._createEmailDictionaryForHost$p(recipients[i],recipients[i]) - } - else if($h.EmailAddressDetails["isInstanceOfType"](recipients[i])) - { - var address=recipients[i]; - $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(address["displayName"],address["emailAddress"]); - recipientData[i]=$h.ComposeRecipient._createEmailDictionaryForHost$p(address["emailAddress"],address["displayName"]) - } - else if(Object["isInstanceOfType"](recipients[i])) - { - var input=recipients[i]; - var emailAddress=input["emailAddress"]; - var displayName=input["displayName"]; - $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(displayName,emailAddress); - recipientData[i]=$h.ComposeRecipient._createEmailDictionaryForHost$p(emailAddress,displayName) - } - else - throw Error.argument("recipients"); - else - throw Error.argument("recipients"); - var $$t_B=this; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(isSet ? 21 : 22,{ - recipientField: this._type$p$0, - recipientArray: recipientData - },function(rawInput) - { - return rawInput - },parameters._asyncContext$p$0,parameters._callback$p$0) - } - }; - $h.ComposeRecipient.prototype.getAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - var parameters=$h.CommonParameters.parse(args,true); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,this._propertyName$p$0+".getAsync"); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(15,{recipientField: this._type$p$0},$h.ComposeRecipient._getAsyncFormatter$p,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeRecipient.prototype.setAsync=function(recipients) - { - var args=[]; - for(var $$pai_2=1; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2 - 1]=arguments[$$pai_2]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._propertyName$p$0+".setAsync"); - this.setAddHelper(recipients,args,true) - }; - $h.ComposeRecipient.prototype.addAsync=function(recipients) - { - var args=[]; - for(var $$pai_2=1; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2 - 1]=arguments[$$pai_2]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._propertyName$p$0+".addAsync"); - this.setAddHelper(recipients,args,false) - }; - $h.ComposeRecipient.RecipientField=function(){}; - $h.ComposeRecipient.RecipientField.prototype={ - to: 0, - cc: 1, - bcc: 2, - requiredAttendees: 0, - optionalAttendees: 1 - }; - $h.ComposeRecipient.RecipientField["registerEnum"]("$h.ComposeRecipient.RecipientField",false); - $h.ComposeLocation=function(){}; - $h.ComposeLocation.prototype.getAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"location.getAsync"); - var parameters=$h.CommonParameters.parse(args,true); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(26,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeLocation.prototype.setAsync=function(location) - { - var args=[]; - for(var $$pai_3=1; $$pai_3 < arguments["length"];++$$pai_3) - args[$$pai_3 - 1]=arguments[$$pai_3]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"location.setAsync"); - var parameters=$h.CommonParameters.parse(args,false); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(location.length,0,255,"location"); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(27,{location: location},null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeSubject=function(){}; - $h.ComposeSubject.prototype.getAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - var parameters=$h.CommonParameters.parse(args,true); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"subject.getAsync"); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(18,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeSubject.prototype.setAsync=function(data) - { - var args=[]; - for(var $$pai_3=1; $$pai_3 < arguments["length"];++$$pai_3) - args[$$pai_3 - 1]=arguments[$$pai_3]; - var parameters=$h.CommonParameters.parse(args,false); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"subject.setAsync"); - if(!String["isInstanceOfType"](data)) - throw Error.argument("data"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,255,"data"); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(17,{subject: data},null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeTime=function(type) - { - this.$$d__ticksToDateFormatter$p$0=Function.createDelegate(this,this._ticksToDateFormatter$p$0); - this._timeType$p$0=type - }; - $h.ComposeTime.prototype={ - _timeType$p$0: 0, - _ticksToDateFormatter$p$0: function(rawInput) - { - var ticks=rawInput; - return new Date(ticks) - }, - _getPropertyName$p$0: function() - { - return this._timeType$p$0===1 ? "start" : "end" - } - }; - $h.ComposeTime.prototype.getAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,this._getPropertyName$p$0()+".getAsync"); - var parameters=$h.CommonParameters.parse(args,true); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(24,{TimeProperty: this._timeType$p$0},this.$$d__ticksToDateFormatter$p$0,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeTime.prototype.setAsync=function(dateTime) - { - var args=[]; - for(var $$pai_3=1; $$pai_3 < arguments["length"];++$$pai_3) - args[$$pai_3 - 1]=arguments[$$pai_3]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._getPropertyName$p$0()+".setAsync"); - if(!Date["isInstanceOfType"](dateTime)) - throw Error.argumentType("dateTime",Object["getType"](dateTime),Date); - if(window["isNaN"](dateTime["getTime"]())) - throw Error.argument("dateTime"); - if(dateTime["getTime"]() < -864e13 || dateTime["getTime"]() > 864e13) - throw Error.argumentOutOfRange("dateTime"); - var parameters=$h.CommonParameters.parse(args,false); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(25,{ - TimeProperty: this._timeType$p$0, - time: dateTime["getTime"]() - },null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeTime.TimeType=function(){}; - $h.ComposeTime.TimeType.prototype={ - start: 1, - end: 2 - }; - $h.ComposeTime.TimeType["registerEnum"]("$h.ComposeTime.TimeType",false); - $h.Contact=function(data) - { - this.$$d__getContactString$p$0=Function.createDelegate(this,this._getContactString$p$0); - this.$$d__getAddresses$p$0=Function.createDelegate(this,this._getAddresses$p$0); - this.$$d__getUrls$p$0=Function.createDelegate(this,this._getUrls$p$0); - this.$$d__getEmailAddresses$p$0=Function.createDelegate(this,this._getEmailAddresses$p$0); - this.$$d__getPhoneNumbers$p$0=Function.createDelegate(this,this._getPhoneNumbers$p$0); - this.$$d__getBusinessName$p$0=Function.createDelegate(this,this._getBusinessName$p$0); - this.$$d__getPersonName$p$0=Function.createDelegate(this,this._getPersonName$p$0); - this._data$p$0=data; - $h.InitialData._defineReadOnlyProperty$i(this,"personName",this.$$d__getPersonName$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"businessName",this.$$d__getBusinessName$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"contactString",this.$$d__getContactString$p$0) - }; - $h.Contact.prototype={ - _data$p$0: null, - _phoneNumbers$p$0: null, - _getPersonName$p$0: function() - { - return this._data$p$0["PersonName"] - }, - _getBusinessName$p$0: function() - { - return this._data$p$0["BusinessName"] - }, - _getAddresses$p$0: function() - { - return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses") - }, - _getEmailAddresses$p$0: function() - { - return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses") - }, - _getUrls$p$0: function() - { - return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls") - }, - _getPhoneNumbers$p$0: function() - { - if(!this._phoneNumbers$p$0) - { - var $$t_1=this; - this._phoneNumbers$p$0=$h.Entities._getExtractedObjects$i($h.PhoneNumber,this._data$p$0,"PhoneNumbers",function(data) - { - return new $h.PhoneNumber(data) - }) - } - return this._phoneNumbers$p$0 - }, - _getContactString$p$0: function() - { - return this._data$p$0["ContactString"] - } - }; - $h.CustomProperties=function(data) - { - if($h.ScriptHelpers.isNullOrUndefined(data)) - throw Error.argumentNull("data"); - if(Array["isInstanceOfType"](data)) - { - var customPropertiesArray=data; - if(customPropertiesArray["length"] > 0) - this._data$p$0=customPropertiesArray[0]; - else - throw Error.argument("data"); - } - else - this._data$p$0=data - }; - $h.CustomProperties.prototype={_data$p$0: null}; - $h.CustomProperties.prototype.get=function(name) - { - var value=this._data$p$0[name]; - if(typeof value==="string") - { - var valueString=value; - if(valueString.length > 6 && valueString.startsWith("Date(") && valueString.endsWith(")")) - { - var ticksString=valueString.substring(5,valueString.length - 1); - var ticks=window["parseInt"](ticksString); - if(!window["isNaN"](ticks)) - { - var dateTimeValue=new Date(ticks); - if(dateTimeValue) - value=dateTimeValue - } - } - } - return value - }; - $h.CustomProperties.prototype.set=function(name, value) - { - if(window["OSF"]["OUtil"]["isDate"](value)) - value="Date("+value["getTime"]()+")"; - this._data$p$0[name]=value - }; - $h.CustomProperties.prototype.remove=function(name) - { - delete this._data$p$0[name] - }; - $h.CustomProperties.prototype.saveAsync=function() - { - var args=[]; - for(var $$pai_4=0; $$pai_4 < arguments["length"];++$$pai_4) - args[$$pai_4]=arguments[$$pai_4]; - var MaxCustomPropertiesLength=2500; - if(window["JSON"]["stringify"](this._data$p$0).length > MaxCustomPropertiesLength) - throw Error.argument(); - var parameters=$h.CommonParameters.parse(args,false,true); - var saveCustomProperties=new $h.SaveDictionaryRequest(parameters._callback$p$0,parameters._asyncContext$p$0); - saveCustomProperties._sendRequest$i$0(4,"SaveCustomProperties",{customProperties: this._data$p$0}) - }; - $h.Diagnostics=function(data, appName) - { - this.$$d__getOwaView$p$0=Function.createDelegate(this,this._getOwaView$p$0); - this.$$d__getHostVersion$p$0=Function.createDelegate(this,this._getHostVersion$p$0); - this.$$d__getHostName$p$0=Function.createDelegate(this,this._getHostName$p$0); - this._data$p$0=data; - this._appName$p$0=appName; - $h.InitialData._defineReadOnlyProperty$i(this,"hostName",this.$$d__getHostName$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"hostVersion",this.$$d__getHostVersion$p$0); - if(64===this._appName$p$0) - $h.InitialData._defineReadOnlyProperty$i(this,"OWAView",this.$$d__getOwaView$p$0) - }; - $h.Diagnostics.prototype={ - _data$p$0: null, - _appName$p$0: 0, - _getHostName$p$0: function() - { - switch(this._appName$p$0) - { - case 8: - return"Outlook"; - case 64: - return"OutlookWebApp"; - case 65536: - return"OutlookIOS"; - case 4194304: - return"OutlookAndroid"; - default: - return null - } - }, - _getHostVersion$p$0: function() - { - return this._data$p$0.get__hostVersion$i$0() - }, - _getOwaView$p$0: function() - { - return this._data$p$0.get__owaView$i$0() - } - }; - $h.EmailAddressDetails=function(data) - { - this.$$d__getRecipientType$p$0=Function.createDelegate(this,this._getRecipientType$p$0); - this.$$d__getAppointmentResponse$p$0=Function.createDelegate(this,this._getAppointmentResponse$p$0); - this.$$d__getDisplayName$p$0=Function.createDelegate(this,this._getDisplayName$p$0); - this.$$d__getEmailAddress$p$0=Function.createDelegate(this,this._getEmailAddress$p$0); - this._data$p$0=data; - $h.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0); - if($h.ScriptHelpers.dictionaryContainsKey(data,"appointmentResponse")) - $h.InitialData._defineReadOnlyProperty$i(this,"appointmentResponse",this.$$d__getAppointmentResponse$p$0); - if($h.ScriptHelpers.dictionaryContainsKey(data,"recipientType")) - $h.InitialData._defineReadOnlyProperty$i(this,"recipientType",this.$$d__getRecipientType$p$0) - }; - $h.EmailAddressDetails._createFromEmailUserDictionary$i=function(data) - { - var emailAddressDetailsDictionary={}; - var displayName=data["Name"]; - var emailAddress=data["UserId"]; - emailAddressDetailsDictionary["name"]=displayName || $h.EmailAddressDetails._emptyString$p; - emailAddressDetailsDictionary["address"]=emailAddress || $h.EmailAddressDetails._emptyString$p; - return new $h.EmailAddressDetails(emailAddressDetailsDictionary) - }; - $h.EmailAddressDetails.prototype={ - _data$p$0: null, - _getEmailAddress$p$0: function() - { - return this._data$p$0["address"] - }, - _getDisplayName$p$0: function() - { - return this._data$p$0["name"] - }, - _getAppointmentResponse$p$0: function() - { - var response=this._data$p$0["appointmentResponse"]; - return response < $h.EmailAddressDetails._responseTypeMap$p["length"] ? $h.EmailAddressDetails._responseTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["None"] - }, - _getRecipientType$p$0: function() - { - var response=this._data$p$0["recipientType"]; - return response < $h.EmailAddressDetails._recipientTypeMap$p["length"] ? $h.EmailAddressDetails._recipientTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["Other"] - } - }; - $h.EmailAddressDetails.prototype.toJSON=function() - { - var result={}; - result["emailAddress"]=this._getEmailAddress$p$0(); - result["displayName"]=this._getDisplayName$p$0(); - if($h.ScriptHelpers.dictionaryContainsKey(this._data$p$0,"appointmentResponse")) - result["appointmentResponse"]=this._getAppointmentResponse$p$0(); - if($h.ScriptHelpers.dictionaryContainsKey(this._data$p$0,"recipientType")) - result["recipientType"]=this._getRecipientType$p$0(); - return result - }; - $h.Entities=function(data, filteredEntitiesData, timeSent, permissionLevel) - { - this.$$d__createMeetingSuggestion$p$0=Function.createDelegate(this,this._createMeetingSuggestion$p$0); - this.$$d__getParcelDeliveries$p$0=Function.createDelegate(this,this._getParcelDeliveries$p$0); - this.$$d__getFlightReservations$p$0=Function.createDelegate(this,this._getFlightReservations$p$0); - this.$$d__getContacts$p$0=Function.createDelegate(this,this._getContacts$p$0); - this.$$d__getPhoneNumbers$p$0=Function.createDelegate(this,this._getPhoneNumbers$p$0); - this.$$d__getUrls$p$0=Function.createDelegate(this,this._getUrls$p$0); - this.$$d__getEmailAddresses$p$0=Function.createDelegate(this,this._getEmailAddresses$p$0); - this.$$d__getMeetingSuggestions$p$0=Function.createDelegate(this,this._getMeetingSuggestions$p$0); - this.$$d__getTaskSuggestions$p$0=Function.createDelegate(this,this._getTaskSuggestions$p$0); - this.$$d__getAddresses$p$0=Function.createDelegate(this,this._getAddresses$p$0); - this._data$p$0=data || {}; - this._filteredData$p$0=filteredEntitiesData || {}; - this._dateTimeSent$p$0=timeSent; - $h.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"taskSuggestions",this.$$d__getTaskSuggestions$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"meetingSuggestions",this.$$d__getMeetingSuggestions$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"contacts",this.$$d__getContacts$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"flightReservations",this.$$d__getFlightReservations$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"parcelDeliveries",this.$$d__getParcelDeliveries$p$0); - this._permissionLevel$p$0=permissionLevel - }; - $h.Entities._getExtractedObjects$i=function(T, data, name, creator, removeDuplicates, stringPropertyName) - { - var results=null; - var extractedObjects=data[name]; - if(!extractedObjects) - return new Array(0); - if(removeDuplicates) - extractedObjects=$h.Entities._removeDuplicate$p(Object,extractedObjects,$h.Entities._entityDictionaryEquals$p,stringPropertyName); - results=new Array(extractedObjects["length"]); - var count=0; - for(var $$arr_9=extractedObjects, $$len_A=$$arr_9.length, $$idx_B=0; $$idx_B < $$len_A;++$$idx_B) - { - var extractedObject=$$arr_9[$$idx_B]; - if(name==="MeetingSuggestions") - extractedObject["IsLegacyEntityExtraction"]="IsLegacyEntityExtraction" in data ? data["IsLegacyEntityExtraction"] : true; - if(creator) - results[count++]=creator(extractedObject); - else - results[count++]=extractedObject - } - return results - }; - $h.Entities._getExtractedStringProperty$i=function(data, name, removeDuplicate) - { - var extractedProperties=data[name]; - if(!extractedProperties) - return new Array(0); - if(removeDuplicate) - extractedProperties=$h.Entities._removeDuplicate$p(String,extractedProperties,$h.Entities._stringEquals$p,null); - return extractedProperties - }; - $h.Entities._createContact$p=function(data) - { - return new $h.Contact(data) - }; - $h.Entities._createTaskSuggestion$p=function(data) - { - return new $h.TaskSuggestion(data) - }; - $h.Entities._createPhoneNumber$p=function(data) - { - return new $h.PhoneNumber(data) - }; - $h.Entities._entityDictionaryEquals$p=function(dictionary1, dictionary2, entityPropertyIdentifier) - { - if(dictionary1===dictionary2) - return true; - if(!dictionary1 || !dictionary2) - return false; - if(dictionary1[entityPropertyIdentifier]===dictionary2[entityPropertyIdentifier]) - return true; - return false - }; - $h.Entities._stringEquals$p=function(string1, string2, entityProperty) - { - return string1===string2 - }; - $h.Entities._removeDuplicate$p=function(T, array, entityEquals, entityPropertyIdentifier) - { - for(var matchIndex1=array["length"] - 1; matchIndex1 >=0; matchIndex1--) - { - var removeMatch=false; - for(var matchIndex2=matchIndex1 - 1; matchIndex2 >=0; matchIndex2--) - if(entityEquals(array[matchIndex1],array[matchIndex2],entityPropertyIdentifier)) - { - removeMatch=true; - break - } - if(removeMatch) - Array.removeAt(array,matchIndex1) - } - return array - }; - $h.Entities.prototype={ - _dateTimeSent$p$0: null, - _data$p$0: null, - _filteredData$p$0: null, - _filteredEntitiesCache$p$0: null, - _permissionLevel$p$0: 0, - _taskSuggestions$p$0: null, - _meetingSuggestions$p$0: null, - _phoneNumbers$p$0: null, - _contacts$p$0: null, - _addresses$p$0: null, - _emailAddresses$p$0: null, - _urls$p$0: null, - _flightReservations$p$0: null, - _parcelDeliveries$p$0: null, - _getByType$i$0: function(entityType) - { - if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["MeetingSuggestion"]) - return this._getMeetingSuggestions$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["TaskSuggestion"]) - return this._getTaskSuggestions$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Address"]) - return this._getAddresses$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["PhoneNumber"]) - return this._getPhoneNumbers$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["EmailAddress"]) - return this._getEmailAddresses$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Url"]) - return this._getUrls$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Contact"]) - return this._getContacts$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["FlightReservations"]) - return this._getFlightReservations$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["ParcelDeliveries"]) - return this._getParcelDeliveries$p$0(); - return null - }, - _getFilteredEntitiesByName$i$0: function(name) - { - if(!this._filteredEntitiesCache$p$0) - this._filteredEntitiesCache$p$0={}; - if(!$h.ScriptHelpers.dictionaryContainsKey(this._filteredEntitiesCache$p$0,name)) - { - var found=false; - for(var i=0; i < $h.Entities._allEntityKeys$p["length"]; i++) - { - var entityTypeKey=$h.Entities._allEntityKeys$p[i]; - var perEntityTypeDictionary=this._filteredData$p$0[entityTypeKey]; - if(!perEntityTypeDictionary) - continue; - if($h.ScriptHelpers.dictionaryContainsKey(perEntityTypeDictionary,name)) - { - switch(entityTypeKey) - { - case"EmailAddresses": - case"Urls": - this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedStringProperty$i(perEntityTypeDictionary,name); - break; - case"Addresses": - this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedStringProperty$i(perEntityTypeDictionary,name,true); - break; - case"PhoneNumbers": - this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedObjects$i($h.PhoneNumber,perEntityTypeDictionary,name,$h.Entities._createPhoneNumber$p,false,null); - break; - case"TaskSuggestions": - this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedObjects$i($h.TaskSuggestion,perEntityTypeDictionary,name,$h.Entities._createTaskSuggestion$p,true,"TaskString"); - break; - case"MeetingSuggestions": - this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedObjects$i($h.MeetingSuggestion,perEntityTypeDictionary,name,this.$$d__createMeetingSuggestion$p$0,true,"MeetingString"); - break; - case"Contacts": - this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedObjects$i($h.Contact,perEntityTypeDictionary,name,$h.Entities._createContact$p,true,"ContactString"); - break - } - found=true; - break - } - } - if(!found) - this._filteredEntitiesCache$p$0[name]=null - } - return this._filteredEntitiesCache$p$0[name] - }, - _createMeetingSuggestion$p$0: function(data) - { - return new $h.MeetingSuggestion(data,this._dateTimeSent$p$0) - }, - _getAddresses$p$0: function() - { - if(!this._addresses$p$0) - this._addresses$p$0=$h.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses",true); - return this._addresses$p$0 - }, - _getEmailAddresses$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); - if(!this._emailAddresses$p$0) - this._emailAddresses$p$0=$h.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses",false); - return this._emailAddresses$p$0 - }, - _getUrls$p$0: function() - { - if(!this._urls$p$0) - this._urls$p$0=$h.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls",false); - return this._urls$p$0 - }, - _getPhoneNumbers$p$0: function() - { - if(!this._phoneNumbers$p$0) - this._phoneNumbers$p$0=$h.Entities._getExtractedObjects$i($h.PhoneNumber,this._data$p$0,"PhoneNumbers",$h.Entities._createPhoneNumber$p); - return this._phoneNumbers$p$0 - }, - _getTaskSuggestions$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); - if(!this._taskSuggestions$p$0) - this._taskSuggestions$p$0=$h.Entities._getExtractedObjects$i($h.TaskSuggestion,this._data$p$0,"TaskSuggestions",$h.Entities._createTaskSuggestion$p,true,"TaskString"); - return this._taskSuggestions$p$0 - }, - _getMeetingSuggestions$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); - if(!this._meetingSuggestions$p$0) - this._meetingSuggestions$p$0=$h.Entities._getExtractedObjects$i($h.MeetingSuggestion,this._data$p$0,"MeetingSuggestions",this.$$d__createMeetingSuggestion$p$0,true,"MeetingString"); - return this._meetingSuggestions$p$0 - }, - _getContacts$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); - if(!this._contacts$p$0) - this._contacts$p$0=$h.Entities._getExtractedObjects$i($h.Contact,this._data$p$0,"Contacts",$h.Entities._createContact$p,true,"ContactString"); - return this._contacts$p$0 - }, - _getParcelDeliveries$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); - if(!this._parcelDeliveries$p$0) - this._parcelDeliveries$p$0=$h.Entities._getExtractedObjects$i(Object,this._data$p$0,"ParcelDeliveries",null); - return this._parcelDeliveries$p$0 - }, - _getFlightReservations$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); - if(!this._flightReservations$p$0) - this._flightReservations$p$0=$h.Entities._getExtractedObjects$i(Object,this._data$p$0,"FlightReservations",null); - return this._flightReservations$p$0 - } - }; - $h.ReplyConstants=function(){}; - $h.AsyncConstants=function(){}; - window["Office"]["cast"]["item"]=Office.cast.item=function(){}; - window["Office"]["cast"]["item"]["toItemRead"]=function(item) - { - if($h.Item["isInstanceOfType"](item)) - return item; - throw Error.argumentType(); - }; - window["Office"]["cast"]["item"]["toItemCompose"]=function(item) - { - if($h.ComposeItem["isInstanceOfType"](item)) - return item; - throw Error.argumentType(); - }; - window["Office"]["cast"]["item"]["toMessage"]=function(item) - { - return window["Office"]["cast"]["item"]["toMessageRead"](item) - }; - window["Office"]["cast"]["item"]["toMessageRead"]=function(item) - { - if($h.Message["isInstanceOfType"](item)) - return item; - throw Error.argumentType(); - }; - window["Office"]["cast"]["item"]["toMessageCompose"]=function(item) - { - if($h.MessageCompose["isInstanceOfType"](item)) - return item; - throw Error.argumentType(); - }; - window["Office"]["cast"]["item"]["toMeetingRequest"]=function(item) - { - if($h.MeetingRequest["isInstanceOfType"](item)) - return item; - throw Error.argumentType(); - }; - window["Office"]["cast"]["item"]["toAppointment"]=function(item) - { - return window["Office"]["cast"]["item"]["toAppointmentRead"](item) - }; - window["Office"]["cast"]["item"]["toAppointmentRead"]=function(item) - { - if($h.Appointment["isInstanceOfType"](item)) - return item; - throw Error.argumentType(); - }; - window["Office"]["cast"]["item"]["toAppointmentCompose"]=function(item) - { - if($h.AppointmentCompose["isInstanceOfType"](item)) - return item; - throw Error.argumentType(); - }; - $h.Item=function(data) - { - this.$$d__getBody$p$1=Function.createDelegate(this,this._getBody$p$1); - this.$$d__getAttachments$p$1=Function.createDelegate(this,this._getAttachments$p$1); - this.$$d__getItemClass$p$1=Function.createDelegate(this,this._getItemClass$p$1); - this.$$d__getItemId$p$1=Function.createDelegate(this,this._getItemId$p$1); - this.$$d__getDateTimeModified$p$1=Function.createDelegate(this,this._getDateTimeModified$p$1); - this.$$d__getDateTimeCreated$p$1=Function.createDelegate(this,this._getDateTimeCreated$p$1); - $h.Item["initializeBase"](this,[data]); - $h.InitialData._defineReadOnlyProperty$i(this,"dateTimeCreated",this.$$d__getDateTimeCreated$p$1); - $h.InitialData._defineReadOnlyProperty$i(this,"dateTimeModified",this.$$d__getDateTimeModified$p$1); - $h.InitialData._defineReadOnlyProperty$i(this,"itemId",this.$$d__getItemId$p$1); - $h.InitialData._defineReadOnlyProperty$i(this,"itemClass",this.$$d__getItemClass$p$1); - $h.InitialData._defineReadOnlyProperty$i(this,"attachments",this.$$d__getAttachments$p$1); - $h.InitialData._defineReadOnlyProperty$i(this,"body",this.$$d__getBody$p$1) - }; - $h.Item.prototype={ - _body$p$1: null, - _getItemId$p$1: function() - { - return this._data$p$0.get__itemId$i$0() - }, - _getItemClass$p$1: function() - { - return this._data$p$0.get__itemClass$i$0() - }, - _getDateTimeCreated$p$1: function() - { - return this._data$p$0.get__dateTimeCreated$i$0() - }, - _getDateTimeModified$p$1: function() - { - return this._data$p$0.get__dateTimeModified$i$0() - }, - _getAttachments$p$1: function() - { - return this._data$p$0.get__attachments$i$0() - }, - _getBody$p$1: function() - { - if(!this._body$p$1) - this._body$p$1=new $h.Body; - return this._body$p$1 - } - }; - $h.ItemBase=function(data) - { - this.$$d__createCustomProperties$i$0=Function.createDelegate(this,this._createCustomProperties$i$0); - this.$$d__getNotificationMessages$p$0=Function.createDelegate(this,this._getNotificationMessages$p$0); - this.$$d_getItemType=Function.createDelegate(this,this.getItemType); - this._data$p$0=data; - $h.InitialData._defineReadOnlyProperty$i(this,"itemType",this.$$d_getItemType); - $h.InitialData._defineReadOnlyProperty$i(this,"notificationMessages",this.$$d__getNotificationMessages$p$0) - }; - $h.ItemBase.prototype={ - _data$p$0: null, - _notificationMessages$p$0: null, - get_data: function() - { - return this._data$p$0 - }, - _createCustomProperties$i$0: function(data) - { - return new $h.CustomProperties(data) - }, - _getNotificationMessages$p$0: function() - { - if(!this._notificationMessages$p$0) - this._notificationMessages$p$0=new $h.NotificationMessages; - return this._notificationMessages$p$0 - } - }; - $h.ItemBase.prototype.loadCustomPropertiesAsync=function() - { - var args=[]; - for(var $$pai_3=0; $$pai_3 < arguments["length"];++$$pai_3) - args[$$pai_3]=arguments[$$pai_3]; - var parameters=$h.CommonParameters.parse(args,true,true); - var loadCustomProperties=new $h._loadDictionaryRequest(this.$$d__createCustomProperties$i$0,"customProperties",parameters._callback$p$0,parameters._asyncContext$p$0); - loadCustomProperties._sendRequest$i$0(3,"LoadCustomProperties",{}) - }; - $h.MeetingRequest=function(data) - { - this.$$d__getRequiredAttendees$p$3=Function.createDelegate(this,this._getRequiredAttendees$p$3); - this.$$d__getOptionalAttendees$p$3=Function.createDelegate(this,this._getOptionalAttendees$p$3); - this.$$d__getLocation$p$3=Function.createDelegate(this,this._getLocation$p$3); - this.$$d__getEnd$p$3=Function.createDelegate(this,this._getEnd$p$3); - this.$$d__getStart$p$3=Function.createDelegate(this,this._getStart$p$3); - $h.MeetingRequest["initializeBase"](this,[data]); - $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$3); - $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$3); - $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$3); - $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$3); - $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$3) - }; - $h.MeetingRequest.prototype={ - _getStart$p$3: function() - { - return this._data$p$0.get__start$i$0() - }, - _getEnd$p$3: function() - { - return this._data$p$0.get__end$i$0() - }, - _getLocation$p$3: function() - { - return this._data$p$0.get__location$i$0() - }, - _getOptionalAttendees$p$3: function() - { - return this._data$p$0.get__cc$i$0() - }, - _getRequiredAttendees$p$3: function() - { - return this._data$p$0.get__to$i$0() - } - }; - $h.MeetingSuggestion=function(data, dateTimeSent) - { - this.$$d__getEndTime$p$0=Function.createDelegate(this,this._getEndTime$p$0); - this.$$d__getStartTime$p$0=Function.createDelegate(this,this._getStartTime$p$0); - this.$$d__getSubject$p$0=Function.createDelegate(this,this._getSubject$p$0); - this.$$d__getLocation$p$0=Function.createDelegate(this,this._getLocation$p$0); - this.$$d__getAttendees$p$0=Function.createDelegate(this,this._getAttendees$p$0); - this.$$d__getMeetingString$p$0=Function.createDelegate(this,this._getMeetingString$p$0); - this._data$p$0=data; - this._dateTimeSent$p$0=dateTimeSent; - $h.InitialData._defineReadOnlyProperty$i(this,"meetingString",this.$$d__getMeetingString$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"attendees",this.$$d__getAttendees$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStartTime$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEndTime$p$0) - }; - $h.MeetingSuggestion.prototype={ - _dateTimeSent$p$0: null, - _data$p$0: null, - _attendees$p$0: null, - _getMeetingString$p$0: function() - { - return this._data$p$0["MeetingString"] - }, - _getLocation$p$0: function() - { - return this._data$p$0["Location"] - }, - _getSubject$p$0: function() - { - return this._data$p$0["Subject"] - }, - _isUTC$p$0: function() - { - if(!("IsLegacyEntityExtraction" in this._data$p$0)) - return true; - return this._data$p$0["IsLegacyEntityExtraction"] - }, - _getStartTime$p$0: function() - { - var time=this._createDateTimeFromParameter$p$0("StartTime"); - var resolvedTime=$h.MeetingSuggestionTimeDecoder.resolve(time,this._dateTimeSent$p$0,this._isUTC$p$0()); - if(resolvedTime["getTime"]() !==time["getTime"]()) - return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToUtcClientTime"](window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._dateToDictionary$i$0(resolvedTime)); - return time - }, - _getEndTime$p$0: function() - { - var time=this._createDateTimeFromParameter$p$0("EndTime"); - var resolvedTime=$h.MeetingSuggestionTimeDecoder.resolve(time,this._dateTimeSent$p$0,this._isUTC$p$0()); - if(resolvedTime["getTime"]() !==time["getTime"]()) - return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToUtcClientTime"](window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._dateToDictionary$i$0(resolvedTime)); - return time - }, - _createDateTimeFromParameter$p$0: function(keyName) - { - var dateTimeString=this._data$p$0[keyName]; - if(!dateTimeString) - return null; - return new Date(dateTimeString) - }, - _getAttendees$p$0: function() - { - if(!this._attendees$p$0) - { - var $$t_1=this; - this._attendees$p$0=$h.Entities._getExtractedObjects$i($h.EmailAddressDetails,this._data$p$0,"Attendees",function(data) - { - return $h.EmailAddressDetails._createFromEmailUserDictionary$i(data) - }) - } - return this._attendees$p$0 - } - }; - $h.MeetingSuggestionTimeDecoder=function(){}; - $h.MeetingSuggestionTimeDecoder.resolve=function(inTime, sentTime, isUTC) - { - if(!sentTime) - return inTime; - try - { - var tod; - var outDate; - var extractedDate; - var sentDate=new Date(sentTime["getFullYear"](),sentTime["getMonth"](),sentTime["getDate"](),0,0,0,0); - var $$t_8, - $$t_9, - $$t_A; - if(!($$t_A=$h.MeetingSuggestionTimeDecoder._decode$p(inTime,isUTC,$$t_8={val: extractedDate},$$t_9={val: tod}),extractedDate=$$t_8["val"],tod=$$t_9["val"],$$t_A)) - return inTime; - else - { - if($h._preciseDate["isInstanceOfType"](extractedDate)) - outDate=$h.MeetingSuggestionTimeDecoder._resolvePreciseDate$p(sentDate,extractedDate); - else if($h._relativeDate["isInstanceOfType"](extractedDate)) - outDate=$h.MeetingSuggestionTimeDecoder._resolveRelativeDate$p(sentDate,extractedDate); - else - outDate=sentDate; - if(window["isNaN"](outDate["getTime"]())) - return sentTime; - outDate["setMilliseconds"](outDate["getMilliseconds"]()+tod); - return outDate - } - } - catch($$e_7) - { - return sentTime - } - }; - $h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i=function(value) - { - return null===value || value===undefined - }; - $h.MeetingSuggestionTimeDecoder._resolvePreciseDate$p=function(sentDate, precise) - { - var year=precise._year$i$1; - var month=!precise._month$i$1 ? sentDate["getMonth"]() : precise._month$i$1 - 1; - var day=precise._day$i$1; - if(!day) - return sentDate; - var candidate; - if($h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i(year)) - { - candidate=new Date(sentDate["getFullYear"](),month,day); - if(candidate["getTime"]() < sentDate["getTime"]()) - candidate=new Date(sentDate["getFullYear"]()+1,month,day) - } - else - candidate=new Date(year < 50 ? 2e3+year : 1900+year,month,day); - if(candidate["getMonth"]() !==month) - return sentDate; - return candidate - }; - $h.MeetingSuggestionTimeDecoder._resolveRelativeDate$p=function(sentDate, relative) - { - var date; - switch(relative._unit$i$1) - { - case 0: - date=new Date(sentDate["getFullYear"](),sentDate["getMonth"](),sentDate["getDate"]()); - date["setDate"](date["getDate"]()+relative._offset$i$1); - return date; - case 5: - return $h.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p(sentDate,relative._offset$i$1,relative._tag$i$1); - case 2: - var days=1; - switch(relative._modifier$i$1) - { - case 1: - break; - case 2: - days=16; - break; - default: - if(!relative._offset$i$1) - days=sentDate["getDate"](); - break - } - date=new Date(sentDate["getFullYear"](),sentDate["getMonth"](),days); - date["setMonth"](date["getMonth"]()+relative._offset$i$1); - if(date["getTime"]() < sentDate["getTime"]()) - date["setDate"](date["getDate"]()+sentDate["getDate"]() - 1); - return date; - case 1: - date=new Date(sentDate["getFullYear"](),sentDate["getMonth"](),sentDate["getDate"]()); - date["setDate"](sentDate["getDate"]()+7 * relative._offset$i$1); - if(relative._modifier$i$1===1 || !relative._modifier$i$1) - { - date["setDate"](date["getDate"]()+1 - date["getDay"]()); - if(date["getTime"]() < sentDate["getTime"]()) - return sentDate; - return date - } - else if(relative._modifier$i$1===2) - { - date["setDate"](date["getDate"]()+5 - date["getDay"]()); - return date - } - break; - case 4: - return $h.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p(sentDate,relative); - case 3: - if(relative._offset$i$1 > 0) - return new Date(sentDate["getFullYear"]()+relative._offset$i$1,0,1); - break; - default: - break - } - return sentDate - }; - $h.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p=function(sentDate, offset, tag) - { - if(offset > -5 && offset < 5) - { - var dayOfWeek=(tag+6) % 7+1; - var days=7 * offset+(dayOfWeek - sentDate["getDay"]()); - sentDate["setDate"](sentDate["getDate"]()+days); - return sentDate - } - else - { - var days=(tag - sentDate["getDay"]()) % 7; - if(days < 0) - days+=7; - sentDate["setDate"](sentDate["getDate"]()+days); - return sentDate - } - }; - $h.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p=function(sentDate, relative) - { - var date; - var firstDay; - var newDate; - date=sentDate; - if(relative._tag$i$1 <=0 || relative._tag$i$1 > 12 || relative._offset$i$1 <=0 || relative._offset$i$1 > 5) - return sentDate; - var monthOffset=(12+relative._tag$i$1 - date["getMonth"]() - 1) % 12; - firstDay=new Date(date["getFullYear"](),date["getMonth"]()+monthOffset,1); - if(relative._modifier$i$1===1) - if(relative._offset$i$1===1 && firstDay["getDay"]() !==6 && firstDay["getDay"]()) - return firstDay; - else - { - newDate=new Date(firstDay["getFullYear"](),firstDay["getMonth"](),firstDay["getDate"]()); - newDate["setDate"](newDate["getDate"]()+(7+(1 - firstDay["getDay"]())) % 7); - if(firstDay["getDay"]() !==6 && firstDay["getDay"]() && firstDay["getDay"]() !==1) - newDate["setDate"](newDate["getDate"]() - 7); - newDate["setDate"](newDate["getDate"]()+7 * (relative._offset$i$1 - 1)); - if(newDate["getMonth"]()+1 !==relative._tag$i$1) - return sentDate; - return newDate - } - else - { - newDate=new Date(firstDay["getFullYear"](),firstDay["getMonth"](),$h.MeetingSuggestionTimeDecoder._daysInMonth$p(firstDay["getMonth"](),firstDay["getFullYear"]())); - var offset=1 - newDate["getDay"](); - if(offset > 0) - offset=offset - 7; - newDate["setDate"](newDate["getDate"]()+offset); - newDate["setDate"](newDate["getDate"]()+7 * (1 - relative._offset$i$1)); - if(newDate["getMonth"]()+1 !==relative._tag$i$1) - if(firstDay["getDay"]() !==6 && firstDay["getDay"]()) - return firstDay; - else - return sentDate; - else - return newDate - } - }; - $h.MeetingSuggestionTimeDecoder._decode$p=function(inDate, isUTC, date, time) - { - var DateValueMask=32767; - date["val"]=null; - time["val"]=0; - if(!inDate) - return false; - if(isUTC) - time["val"]=$h.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p(inDate); - else - time["val"]=$h.MeetingSuggestionTimeDecoder._getTimeOfDayInMilliseconds$p(inDate); - var inDateAtMidnight=inDate["getTime"]() - time["val"]; - var value=(inDateAtMidnight - $h.MeetingSuggestionTimeDecoder._baseDate$p["getTime"]()) / 864e5; - if(value < 0) - return false; - else if(value >=262144) - return false; - else - { - var type=value >> 15; - value=value & DateValueMask; - switch(type) - { - case 0: - return $h.MeetingSuggestionTimeDecoder._decodePreciseDate$p(value,date); - case 1: - return $h.MeetingSuggestionTimeDecoder._decodeRelativeDate$p(value,date); - default: - return false - } - } - }; - $h.MeetingSuggestionTimeDecoder._decodePreciseDate$p=function(value, date) - { - var c_SubTypeMask=7; - var c_MonthMask=15; - var c_DayMask=31; - var c_YearMask=127; - var year=null; - var month=0; - var day=0; - date["val"]=null; - var subType=value >> 12 & c_SubTypeMask; - if((subType & 4)===4) - { - year=value >> 5 & c_YearMask; - if((subType & 2)===2) - { - if((subType & 1)===1) - return false; - month=value >> 1 & c_MonthMask - } - } - else - { - if((subType & 2)===2) - month=value >> 8 & c_MonthMask; - if((subType & 1)===1) - day=value >> 3 & c_DayMask - } - date["val"]=new $h._preciseDate(day,month,year); - return true - }; - $h.MeetingSuggestionTimeDecoder._decodeRelativeDate$p=function(value, date) - { - var TagMask=15; - var OffsetMask=63; - var UnitMask=7; - var ModifierMask=3; - var tag=value & TagMask; - value >>=4; - var offset=$h.MeetingSuggestionTimeDecoder._fromComplement$p(value & OffsetMask,6); - value >>=6; - var unit=value & UnitMask; - value >>=3; - var modifier=value & ModifierMask; - try - { - date["val"]=new $h._relativeDate(modifier,offset,unit,tag); - return true - } - catch($$e_A) - { - date["val"]=null; - return false - } - }; - $h.MeetingSuggestionTimeDecoder._fromComplement$p=function(value, n) - { - var signed=1 << n - 1; - var mask=(1 << n) - 1; - if((value & signed)===signed) - return-((value ^ mask)+1); - else - return value - }; - $h.MeetingSuggestionTimeDecoder._daysInMonth$p=function(month, year) - { - return 32 - new Date(year,month,32)["getDate"]() - }; - $h.MeetingSuggestionTimeDecoder._getTimeOfDayInMilliseconds$p=function(inputTime) - { - var timeOfDay=0; - timeOfDay+=inputTime["getHours"]() * 3600; - timeOfDay+=inputTime["getMinutes"]() * 60; - timeOfDay+=inputTime["getSeconds"](); - timeOfDay *=1e3; - timeOfDay+=inputTime["getMilliseconds"](); - return timeOfDay - }; - $h.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p=function(inputTime) - { - var timeOfDay=0; - timeOfDay+=inputTime["getUTCHours"]() * 3600; - timeOfDay+=inputTime["getUTCMinutes"]() * 60; - timeOfDay+=inputTime["getUTCSeconds"](); - timeOfDay *=1e3; - timeOfDay+=inputTime["getUTCMilliseconds"](); - return timeOfDay - }; - $h._extractedDate=function(){}; - $h._preciseDate=function(day, month, year) - { - $h._preciseDate["initializeBase"](this); - if(day < 0 || day > 31) - throw Error.argumentOutOfRange("day"); - if(month < 0 || month > 12) - throw Error.argumentOutOfRange("month"); - this._day$i$1=day; - this._month$i$1=month; - if(!$h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i(year)) - { - if(!month && day) - throw Error.argument("Invalid arguments"); - if(year < 0 || year > 2099) - throw Error.argumentOutOfRange("year"); - this._year$i$1=year % 100 - } - else if(!this._month$i$1 && !this._day$i$1) - throw Error.argument("Invalid datetime"); - }; - $h._preciseDate.prototype={ - _day$i$1: 0, - _month$i$1: 0, - _year$i$1: null - }; - $h._relativeDate=function(modifier, offset, unit, tag) - { - $h._relativeDate["initializeBase"](this); - if(offset < -32 || offset > 31) - throw Error.argumentOutOfRange("offset"); - if(tag < 0 || tag > 15) - throw Error.argumentOutOfRange("tag"); - if(!unit && offset < 0) - throw Error.argument("unit & offset do not form a valid date"); - this._modifier$i$1=modifier; - this._offset$i$1=offset; - this._unit$i$1=unit; - this._tag$i$1=tag - }; - $h._relativeDate.prototype={ - _modifier$i$1: 0, - _offset$i$1: 0, - _unit$i$1: 0, - _tag$i$1: 0 - }; - $h.Message=function(dataDictionary) - { - this.$$d__getConversationId$p$2=Function.createDelegate(this,this._getConversationId$p$2); - this.$$d__getInternetMessageId$p$2=Function.createDelegate(this,this._getInternetMessageId$p$2); - this.$$d__getCc$p$2=Function.createDelegate(this,this._getCc$p$2); - this.$$d__getTo$p$2=Function.createDelegate(this,this._getTo$p$2); - this.$$d__getFrom$p$2=Function.createDelegate(this,this._getFrom$p$2); - this.$$d__getSender$p$2=Function.createDelegate(this,this._getSender$p$2); - this.$$d__getNormalizedSubject$p$2=Function.createDelegate(this,this._getNormalizedSubject$p$2); - this.$$d__getSubject$p$2=Function.createDelegate(this,this._getSubject$p$2); - $h.Message["initializeBase"](this,[dataDictionary]); - $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"sender",this.$$d__getSender$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"from",this.$$d__getFrom$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"to",this.$$d__getTo$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"cc",this.$$d__getCc$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"internetMessageId",this.$$d__getInternetMessageId$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"conversationId",this.$$d__getConversationId$p$2) - }; - $h.Message.prototype={ - getItemType: function() - { - return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Message"] - }, - _getSubject$p$2: function() - { - return this._data$p$0.get__subject$i$0() - }, - _getNormalizedSubject$p$2: function() - { - return this._data$p$0.get__normalizedSubject$i$0() - }, - _getSender$p$2: function() - { - return this._data$p$0.get__sender$i$0() - }, - _getFrom$p$2: function() - { - return this._data$p$0.get__from$i$0() - }, - _getTo$p$2: function() - { - return this._data$p$0.get__to$i$0() - }, - _getCc$p$2: function() - { - return this._data$p$0.get__cc$i$0() - }, - _getInternetMessageId$p$2: function() - { - return this._data$p$0.get__internetMessageId$i$0() - }, - _getConversationId$p$2: function() - { - return this._data$p$0.get__conversationId$i$0() - } - }; - $h.Message.prototype.getEntities=function() - { - return this._data$p$0._getEntities$i$0() - }; - $h.Message.prototype.getEntitiesByType=function(entityType) - { - return this._data$p$0._getEntitiesByType$i$0(entityType) - }; - $h.Message.prototype.getFilteredEntitiesByName=function(name) - { - return this._data$p$0._getFilteredEntitiesByName$i$0(name) - }; - $h.Message.prototype.getSelectedEntities=function() - { - return this._data$p$0._getSelectedEntities$i$0() - }; - $h.Message.prototype.getRegExMatches=function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches"); - return this._data$p$0._getRegExMatches$i$0() - }; - $h.Message.prototype.getRegExMatchesByName=function(name) - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName"); - return this._data$p$0._getRegExMatchesByName$i$0(name) - }; - $h.Message.prototype.getSelectedRegExMatches=function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedRegExMatches"); - return this._data$p$0._getSelectedRegExMatches$i$0() - }; - $h.Message.prototype.displayReplyForm=function(obj) - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyForm$i$0(obj) - }; - $h.Message.prototype.displayReplyAllForm=function(obj) - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyAllForm$i$0(obj) - }; - $h.MessageCompose=function(data) - { - this.$$d__getConversationId$p$2=Function.createDelegate(this,this._getConversationId$p$2); - this.$$d__getBcc$p$2=Function.createDelegate(this,this._getBcc$p$2); - this.$$d__getCc$p$2=Function.createDelegate(this,this._getCc$p$2); - this.$$d__getTo$p$2=Function.createDelegate(this,this._getTo$p$2); - $h.MessageCompose["initializeBase"](this,[data]); - $h.InitialData._defineReadOnlyProperty$i(this,"to",this.$$d__getTo$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"cc",this.$$d__getCc$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"bcc",this.$$d__getBcc$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"conversationId",this.$$d__getConversationId$p$2) - }; - $h.MessageCompose.prototype={ - _to$p$2: null, - _cc$p$2: null, - _bcc$p$2: null, - getItemType: function() - { - return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Message"] - }, - _getTo$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._to$p$2) - this._to$p$2=new $h.ComposeRecipient(0,"to"); - return this._to$p$2 - }, - _getCc$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._cc$p$2) - this._cc$p$2=new $h.ComposeRecipient(1,"cc"); - return this._cc$p$2 - }, - _getBcc$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._bcc$p$2) - this._bcc$p$2=new $h.ComposeRecipient(2,"bcc"); - return this._bcc$p$2 - }, - _getConversationId$p$2: function() - { - return this._data$p$0.get__conversationId$i$0() - } - }; - $h.NotificationMessages=function(){}; - $h.NotificationMessages._mapToHostItemNotificationMessageType$p=function(dataToHost) - { - var notificationType; - var hostItemNotificationMessageType; - notificationType=dataToHost["type"]; - if(notificationType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["ProgressIndicator"]) - hostItemNotificationMessageType=1; - else if(notificationType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["InformationalMessage"]) - hostItemNotificationMessageType=0; - else if(notificationType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["ErrorMessage"]) - hostItemNotificationMessageType=2; - else - throw Error.argument("type"); - dataToHost["type"]=hostItemNotificationMessageType - }; - $h.NotificationMessages._validateKey$p=function(key) - { - if(!$h.ScriptHelpers.isNonEmptyString(key)) - throw Error.argument("key"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(key.length,0,32,"key") - }; - $h.NotificationMessages._validateDictionary$p=function(dictionary) - { - if(!$h.ScriptHelpers.isNonEmptyString(dictionary["type"])) - throw Error.argument("type"); - if(dictionary["type"]===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["InformationalMessage"]) - { - if(!$h.ScriptHelpers.isNonEmptyString(dictionary["icon"])) - throw Error.argument("icon"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(dictionary["icon"].length,0,32,"icon"); - if($h.ScriptHelpers.isUndefined(dictionary["persistent"])) - throw Error.argument("persistent"); - if(!Boolean["isInstanceOfType"](dictionary["persistent"])) - throw Error.argumentType("persistent",Object["getType"](dictionary["persistent"]),Boolean); - } - else - { - if(!$h.ScriptHelpers.isUndefined(dictionary["icon"])) - throw Error.argument("icon"); - if(!$h.ScriptHelpers.isUndefined(dictionary["persistent"])) - throw Error.argument("persistent"); - } - if(!$h.ScriptHelpers.isNonEmptyString(dictionary["message"])) - throw Error.argument("message"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(dictionary["message"].length,0,150,"message") - }; - $h.NotificationMessages.prototype.addAsync=function(key, dictionary) - { - var args=[]; - for(var $$pai_5=2; $$pai_5 < arguments["length"];++$$pai_5) - args[$$pai_5 - 2]=arguments[$$pai_5]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.addAsync"); - var commonParameters=$h.CommonParameters.parse(args,false); - $h.NotificationMessages._validateKey$p(key); - $h.NotificationMessages._validateDictionary$p(dictionary); - var dataToHost={}; - dataToHost=$h.ScriptHelpers.deepClone(dictionary); - dataToHost["key"]=key; - $h.NotificationMessages._mapToHostItemNotificationMessageType$p(dataToHost); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(33,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.NotificationMessages.prototype.getAllAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.getAllAsync"); - var commonParameters=$h.CommonParameters.parse(args,true); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(34,null,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.NotificationMessages.prototype.replaceAsync=function(key, dictionary) - { - var args=[]; - for(var $$pai_5=2; $$pai_5 < arguments["length"];++$$pai_5) - args[$$pai_5 - 2]=arguments[$$pai_5]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.replaceAsync"); - var commonParameters=$h.CommonParameters.parse(args,false); - $h.NotificationMessages._validateKey$p(key); - $h.NotificationMessages._validateDictionary$p(dictionary); - var dataToHost={}; - dataToHost=$h.ScriptHelpers.deepClone(dictionary); - dataToHost["key"]=key; - $h.NotificationMessages._mapToHostItemNotificationMessageType$p(dataToHost); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(35,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.NotificationMessages.prototype.removeAsync=function(key) - { - var args=[]; - for(var $$pai_4=1; $$pai_4 < arguments["length"];++$$pai_4) - args[$$pai_4 - 1]=arguments[$$pai_4]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.removeAsync"); - var commonParameters=$h.CommonParameters.parse(args,false); - $h.NotificationMessages._validateKey$p(key); - var dataToHost={key: key}; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(36,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.OutlookErrorManager=function(){}; - $h.OutlookErrorManager.getErrorArgs=function(errorCode) - { - if(!$h.OutlookErrorManager._isInitialized$p) - $h.OutlookErrorManager._initialize$p(); - return OSF.DDA.ErrorCodeManager["getErrorArgs"](errorCode) - }; - $h.OutlookErrorManager._initialize$p=function() - { - $h.OutlookErrorManager._addErrorMessage$p(9e3,"AttachmentSizeExceeded",window["_u"]["ExtensibilityStrings"]["l_AttachmentExceededSize_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9001,"NumberOfAttachmentsExceeded",window["_u"]["ExtensibilityStrings"]["l_ExceededMaxNumberOfAttachments_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9002,"InternalFormatError",window["_u"]["ExtensibilityStrings"]["l_InternalFormatError_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9003,"InvalidAttachmentId",window["_u"]["ExtensibilityStrings"]["l_InvalidAttachmentId_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9004,"InvalidAttachmentPath",window["_u"]["ExtensibilityStrings"]["l_InvalidAttachmentPath_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9005,"CannotAddAttachmentBeforeUpgrade",window["_u"]["ExtensibilityStrings"]["l_CannotAddAttachmentBeforeUpgrade_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9006,"AttachmentDeletedBeforeUploadCompletes",window["_u"]["ExtensibilityStrings"]["l_AttachmentDeletedBeforeUploadCompletes_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9007,"AttachmentUploadGeneralFailure",window["_u"]["ExtensibilityStrings"]["l_AttachmentUploadGeneralFailure_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9008,"AttachmentToDeleteDoesNotExist",window["_u"]["ExtensibilityStrings"]["l_DeleteAttachmentDoesNotExist_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9009,"AttachmentDeleteGeneralFailure",window["_u"]["ExtensibilityStrings"]["l_AttachmentDeleteGeneralFailure_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9010,"InvalidEndTime",window["_u"]["ExtensibilityStrings"]["l_InvalidEndTime_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9011,"HtmlSanitizationFailure",window["_u"]["ExtensibilityStrings"]["l_HtmlSanitizationFailure_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9012,"NumberOfRecipientsExceeded",String.format(window["_u"]["ExtensibilityStrings"]["l_NumberOfRecipientsExceeded_Text"],500)); - $h.OutlookErrorManager._addErrorMessage$p(9013,"NoValidRecipientsProvided",window["_u"]["ExtensibilityStrings"]["l_NoValidRecipientsProvided_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9014,"CursorPositionChanged",window["_u"]["ExtensibilityStrings"]["l_CursorPositionChanged_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9016,"InvalidSelection",window["_u"]["ExtensibilityStrings"]["l_InvalidSelection_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9017,"AccessRestricted",""); - $h.OutlookErrorManager._addErrorMessage$p(9018,"GenericTokenError",""); - $h.OutlookErrorManager._addErrorMessage$p(9019,"GenericSettingsError",""); - $h.OutlookErrorManager._addErrorMessage$p(9020,"GenericResponseError",""); - $h.OutlookErrorManager._addErrorMessage$p(9021,"SaveError",window["_u"]["ExtensibilityStrings"]["l_SaveError_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9022,"MessageInDifferentStoreError",window["_u"]["ExtensibilityStrings"]["l_MessageInDifferentStoreError_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9023,"DuplicateNotificationKey",window["_u"]["ExtensibilityStrings"]["l_DuplicateNotificationKey_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9024,"NotificationKeyNotFound",window["_u"]["ExtensibilityStrings"]["l_NotificationKeyNotFound_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9025,"NumberOfNotificationsExceeded",window["_u"]["ExtensibilityStrings"]["l_NumberOfNotificationsExceeded_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9026,"PersistedNotificationArrayReadError",window["_u"]["ExtensibilityStrings"]["l_PersistedNotificationArrayReadError_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9027,"PersistedNotificationArraySaveError",window["_u"]["ExtensibilityStrings"]["l_PersistedNotificationArraySaveError_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9028,"CannotPersistPropertyInUnsavedDraftError",window["_u"]["ExtensibilityStrings"]["l_CannotPersistPropertyInUnsavedDraftError_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9029,"CanOnlyGetTokenForSavedItem",window["_u"]["ExtensibilityStrings"]["l_CallSaveAsyncBeforeToken_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9030,"APICallFailedDueToItemChange",window["_u"]["ExtensibilityStrings"]["l_APICallFailedDueToItemChange_Text"]); - $h.OutlookErrorManager._isInitialized$p=true - }; - $h.OutlookErrorManager._addErrorMessage$p=function(errorCode, errorName, errorMessage) - { - OSF.DDA.ErrorCodeManager["addErrorMessage"](errorCode,{ - name: errorName, - message: errorMessage - }) - }; - $h.OutlookErrorManager.OutlookErrorCodes=function(){}; - $h.OutlookErrorManager.OsfDdaErrorCodes=function(){}; - $h.PhoneNumber=function(data) - { - this.$$d__getPhoneType$p$0=Function.createDelegate(this,this._getPhoneType$p$0); - this.$$d__getOriginalPhoneString$p$0=Function.createDelegate(this,this._getOriginalPhoneString$p$0); - this.$$d__getPhoneString$p$0=Function.createDelegate(this,this._getPhoneString$p$0); - this._data$p$0=data; - $h.InitialData._defineReadOnlyProperty$i(this,"phoneString",this.$$d__getPhoneString$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"originalPhoneString",this.$$d__getOriginalPhoneString$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"type",this.$$d__getPhoneType$p$0) - }; - $h.PhoneNumber.prototype={ - _data$p$0: null, - _getPhoneString$p$0: function() - { - return this._data$p$0["PhoneString"] - }, - _getOriginalPhoneString$p$0: function() - { - return this._data$p$0["OriginalPhoneString"] - }, - _getPhoneType$p$0: function() - { - return this._data$p$0["Type"] - } - }; - $h.TaskSuggestion=function(data) - { - this.$$d__getAssignees$p$0=Function.createDelegate(this,this._getAssignees$p$0); - this.$$d__getTaskString$p$0=Function.createDelegate(this,this._getTaskString$p$0); - this._data$p$0=data; - $h.InitialData._defineReadOnlyProperty$i(this,"taskString",this.$$d__getTaskString$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"assignees",this.$$d__getAssignees$p$0) - }; - $h.TaskSuggestion.prototype={ - _data$p$0: null, - _assignees$p$0: null, - _getTaskString$p$0: function() - { - return this._data$p$0["TaskString"] - }, - _getAssignees$p$0: function() - { - if(!this._assignees$p$0) - { - var $$t_1=this; - this._assignees$p$0=$h.Entities._getExtractedObjects$i($h.EmailAddressDetails,this._data$p$0,"Assignees",function(data) - { - return $h.EmailAddressDetails._createFromEmailUserDictionary$i(data) - }) - } - return this._assignees$p$0 - } - }; - $h.UserProfile=function(data) - { - this.$$d__getUserProfileType$p$0=Function.createDelegate(this,this._getUserProfileType$p$0); - this.$$d__getTimeZone$p$0=Function.createDelegate(this,this._getTimeZone$p$0); - this.$$d__getEmailAddress$p$0=Function.createDelegate(this,this._getEmailAddress$p$0); - this.$$d__getDisplayName$p$0=Function.createDelegate(this,this._getDisplayName$p$0); - this._data$p$0=data; - $h.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"timeZone",this.$$d__getTimeZone$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"type",this.$$d__getUserProfileType$p$0) - }; - $h.UserProfile.prototype={ - _data$p$0: null, - _getUserProfileType$p$0: function() - { - return this._data$p$0.get__userProfileType$i$0() - }, - _getDisplayName$p$0: function() - { - return this._data$p$0.get__userDisplayName$i$0() - }, - _getEmailAddress$p$0: function() - { - return this._data$p$0.get__userEmailAddress$i$0() - }, - _getTimeZone$p$0: function() - { - return this._data$p$0.get__userTimeZone$i$0() - } - }; - $h.OutlookDispid=function(){}; - $h.OutlookDispid.prototype={ - owaOnlyMethod: 0, - getInitialData: 1, - getUserIdentityToken: 2, - loadCustomProperties: 3, - saveCustomProperties: 4, - ewsRequest: 5, - displayNewAppointmentForm: 7, - displayMessageForm: 8, - displayAppointmentForm: 9, - displayReplyForm: 10, - displayReplyAllForm: 11, - getCallbackToken: 12, - bodySetSelectedDataAsync: 13, - getBodyTypeAsync: 14, - getRecipientsAsync: 15, - addFileAttachmentAsync: 16, - setSubjectAsync: 17, - getSubjectAsync: 18, - addItemAttachmentAsync: 19, - removeAttachmentAsync: 20, - setRecipientsAsync: 21, - addRecipientsAsync: 22, - bodyPrependAsync: 23, - getTimeAsync: 24, - setTimeAsync: 25, - getLocationAsync: 26, - setLocationAsync: 27, - getSelectedDataAsync: 28, - setSelectedDataAsync: 29, - displayReplyFormWithAttachments: 30, - displayReplyAllFormWithAttachments: 31, - saveAsync: 32, - addNotficationMessageAsync: 33, - getAllNotficationMessagesAsync: 34, - replaceNotficationMessageAsync: 35, - removeNotficationMessageAsync: 36, - getBodyAsync: 37, - setBodyAsync: 38, - appCommands1: 39, - registerConsentAsync: 40, - close: 41, - closeApp: 42, - displayPersonaCardAsync: 43, - displayNewMessageForm: 44, - navigateToModuleAsync: 45, - eventCompleted: 94, - closeContainer: 97, - messageParent: 144, - trackCtq: 400, - recordTrace: 401, - recordDataPoint: 402, - windowOpenOverrideHandler: 403, - saveSettingsRequest: 404 - }; - $h.OutlookDispid["registerEnum"]("$h.OutlookDispid",false); - $h.RequestState=function(){}; - $h.RequestState.prototype={ - unsent: 0, - opened: 1, - headersReceived: 2, - loading: 3, - done: 4 - }; - $h.RequestState["registerEnum"]("$h.RequestState",false); - $h.CommonParameters=function(options, callback, asyncContext) - { - this._options$p$0=options; - this._callback$p$0=callback; - this._asyncContext$p$0=asyncContext - }; - $h.CommonParameters.parse=function(args, isCallbackRequired, tryLegacy) - { - var legacyParameters; - var $$t_8, - $$t_9; - if(tryLegacy && ($$t_9=$h.CommonParameters._tryParseLegacy$p(args,$$t_8={val: legacyParameters}),legacyParameters=$$t_8["val"],$$t_9)) - return legacyParameters; - var argsLength=args["length"]; - var options=null; - var callback=null; - var asyncContext=null; - if(argsLength===1) - if(Function["isInstanceOfType"](args[0])) - callback=args[0]; - else if(Object["isInstanceOfType"](args[0])) - options=args[0]; - else - throw Error.argumentType(); - else if(argsLength===2) - { - if(!Object["isInstanceOfType"](args[0])) - throw Error.argument("options"); - if(!Function["isInstanceOfType"](args[1])) - throw Error.argument("callback"); - options=args[0]; - callback=args[1] - } - else if(argsLength) - throw Error.parameterCount(window["_u"]["ExtensibilityStrings"]["l_ParametersNotAsExpected_Text"]); - if(isCallbackRequired && !callback) - throw Error.argumentNull("callback"); - if(options && !$h.ScriptHelpers.isNullOrUndefined(options["asyncContext"])) - asyncContext=options["asyncContext"]; - return new $h.CommonParameters(options,callback,asyncContext) - }; - $h.CommonParameters._tryParseLegacy$p=function(args, commonParameters) - { - commonParameters["val"]=null; - var argsLength=args["length"]; - var callback=null; - var userContext=null; - if(!argsLength || argsLength > 2) - return false; - if(!Function["isInstanceOfType"](args[0])) - return false; - callback=args[0]; - if(argsLength > 1) - userContext=args[1]; - commonParameters["val"]=new $h.CommonParameters(null,callback,userContext); - return true - }; - $h.CommonParameters.prototype={ - _options$p$0: null, - _callback$p$0: null, - _asyncContext$p$0: null, - get_options: function() - { - return this._options$p$0 - }, - get_callback: function() - { - return this._callback$p$0 - }, - get_asyncContext: function() - { - return this._asyncContext$p$0 - } - }; - $h.EwsRequest=function(userContext) - { - $h.EwsRequest["initializeBase"](this,[userContext]) - }; - $h.EwsRequest.prototype={ - readyState: 1, - status: 0, - statusText: null, - onreadystatechange: null, - responseText: null, - get__statusCode$i$1: function() - { - return this.status - }, - set__statusCode$i$1: function(value) - { - this.status=value; - return value - }, - get__statusDescription$i$1: function() - { - return this.statusText - }, - set__statusDescription$i$1: function(value) - { - this.statusText=value; - return value - }, - get__requestState$i$1: function() - { - return this.readyState - }, - set__requestState$i$1: function(value) - { - this.readyState=value; - return value - }, - get_hasOnReadyStateChangeCallback: function() - { - return!$h.ScriptHelpers.isNullOrUndefined(this.onreadystatechange) - }, - get__response$i$1: function() - { - return this.responseText - }, - set__response$i$1: function(value) - { - this.responseText=value; - return value - }, - send: function(data) - { - this._checkSendConditions$i$1(); - if($h.ScriptHelpers.isNullOrUndefined(data)) - this._throwInvalidStateException$i$1(); - this._sendRequest$i$0(5,"EwsRequest",{body: data}) - }, - _callOnReadyStateChangeCallback$i$1: function() - { - if(!$h.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)) - this.onreadystatechange() - }, - _parseExtraResponseData$i$1: function(response){}, - executeExtraFailedResponseSteps: function(){} - }; - $h.InitialData=function(data) - { - this._data$p$0=data; - this._permissionLevel$p$0=this._calculatePermissionLevel$p$0() - }; - $h.InitialData._defineReadOnlyProperty$i=function(o, methodName, getter) - { - var propertyDescriptor={ - get: getter, - configurable: false - }; - window["Object"]["defineProperty"](o,methodName,propertyDescriptor) - }; - $h.InitialData.prototype={ - _toRecipients$p$0: null, - _ccRecipients$p$0: null, - _attachments$p$0: null, - _resources$p$0: null, - _entities$p$0: null, - _selectedEntities$p$0: null, - _data$p$0: null, - _permissionLevel$p$0: 0, - get__isRestIdSupported$i$0: function() - { - return this._data$p$0["isRestIdSupported"] - }, - get__itemId$i$0: function() - { - return this._data$p$0["id"] - }, - get__itemClass$i$0: function() - { - return this._data$p$0["itemClass"] - }, - get__dateTimeCreated$i$0: function() - { - return new Date(this._data$p$0["dateTimeCreated"]) - }, - get__dateTimeModified$i$0: function() - { - return new Date(this._data$p$0["dateTimeModified"]) - }, - get__dateTimeSent$i$0: function() - { - return new Date(this._data$p$0["dateTimeSent"]) - }, - get__subject$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - return this._data$p$0["subject"] - }, - get__normalizedSubject$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - return this._data$p$0["normalizedSubject"] - }, - get__internetMessageId$i$0: function() - { - return this._data$p$0["internetMessageId"] - }, - get__conversationId$i$0: function() - { - return this._data$p$0["conversationId"] - }, - get__sender$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - var sender=this._data$p$0["sender"]; - return $h.ScriptHelpers.isNullOrUndefined(sender) ? null : new $h.EmailAddressDetails(sender) - }, - get__from$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - var from=this._data$p$0["from"]; - return $h.ScriptHelpers.isNullOrUndefined(from) ? null : new $h.EmailAddressDetails(from) - }, - get__to$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - if(null===this._toRecipients$p$0) - this._toRecipients$p$0=this._createEmailAddressDetails$p$0("to"); - return this._toRecipients$p$0 - }, - get__cc$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - if(null===this._ccRecipients$p$0) - this._ccRecipients$p$0=this._createEmailAddressDetails$p$0("cc"); - return this._ccRecipients$p$0 - }, - get__attachments$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - if(null===this._attachments$p$0) - this._attachments$p$0=this._createAttachmentDetails$p$0(); - return this._attachments$p$0 - }, - get__ewsUrl$i$0: function() - { - return this._data$p$0["ewsUrl"] - }, - get__restUrl$i$0: function() - { - return this._data$p$0["restUrl"] - }, - get__marketplaceAssetId$i$0: function() - { - return this._data$p$0["marketplaceAssetId"] - }, - get__extensionId$i$0: function() - { - return this._data$p$0["extensionId"] - }, - get__marketplaceContentMarket$i$0: function() - { - return this._data$p$0["marketplaceContentMarket"] - }, - get__consentMetadata$i$0: function() - { - return this._data$p$0["consentMetadata"] - }, - get__isRead$i$0: function() - { - return this._data$p$0["isRead"] - }, - get__endNodeUrl$i$0: function() - { - return this._data$p$0["endNodeUrl"] - }, - get__entryPointUrl$i$0: function() - { - return this._data$p$0["entryPointUrl"] - }, - get__start$i$0: function() - { - return new Date(this._data$p$0["start"]) - }, - get__end$i$0: function() - { - return new Date(this._data$p$0["end"]) - }, - get__location$i$0: function() - { - return this._data$p$0["location"] - }, - get__userProfileType$i$0: function() - { - return this._data$p$0["userProfileType"] - }, - get__resources$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - if(null===this._resources$p$0) - this._resources$p$0=this._createEmailAddressDetails$p$0("resources"); - return this._resources$p$0 - }, - get__organizer$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - var organizer=this._data$p$0["organizer"]; - return $h.ScriptHelpers.isNullOrUndefined(organizer) ? null : new $h.EmailAddressDetails(organizer) - }, - get__userDisplayName$i$0: function() - { - return this._data$p$0["userDisplayName"] - }, - get__userEmailAddress$i$0: function() - { - return this._data$p$0["userEmailAddress"] - }, - get__userTimeZone$i$0: function() - { - return this._data$p$0["userTimeZone"] - }, - get__timeZoneOffsets$i$0: function() - { - return this._data$p$0["timeZoneOffsets"] - }, - get__hostVersion$i$0: function() - { - return this._data$p$0["hostVersion"] - }, - get__owaView$i$0: function() - { - return this._data$p$0["owaView"] - }, - get__overrideWindowOpen$i$0: function() - { - return this._data$p$0["overrideWindowOpen"] - }, - _getEntities$i$0: function() - { - if(!this._entities$p$0) - this._entities$p$0=new $h.Entities(this._data$p$0["entities"],this._data$p$0["filteredEntities"],this.get__dateTimeSent$i$0(),this._permissionLevel$p$0); - return this._entities$p$0 - }, - _getSelectedEntities$i$0: function() - { - if(!this._selectedEntities$p$0) - this._selectedEntities$p$0=new $h.Entities(this._data$p$0["selectedEntities"],null,this.get__dateTimeSent$i$0(),this._permissionLevel$p$0); - return this._selectedEntities$p$0 - }, - _getEntitiesByType$i$0: function(entityType) - { - var entites=this._getEntities$i$0(); - return entites._getByType$i$0(entityType) - }, - _getFilteredEntitiesByName$i$0: function(name) - { - var entities=this._getEntities$i$0(); - return entities._getFilteredEntitiesByName$i$0(name) - }, - _getRegExMatches$i$0: function() - { - if(!this._data$p$0["regExMatches"]) - return null; - return this._data$p$0["regExMatches"] - }, - _getSelectedRegExMatches$i$0: function() - { - if(!this._data$p$0["selectedRegExMatches"]) - return null; - return this._data$p$0["selectedRegExMatches"] - }, - _getRegExMatchesByName$i$0: function(regexName) - { - var regexMatches=this._getRegExMatches$i$0(); - if(!regexMatches || !regexMatches[regexName]) - return null; - return regexMatches[regexName] - }, - _throwOnRestrictedPermissionLevel$i$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0) - }, - _createEmailAddressDetails$p$0: function(key) - { - var to=this._data$p$0[key]; - if($h.ScriptHelpers.isNullOrUndefined(to)) - return[]; - var recipients=[]; - for(var i=0; i < to["length"]; i++) - if(!$h.ScriptHelpers.isNullOrUndefined(to[i])) - recipients[i]=new $h.EmailAddressDetails(to[i]); - return recipients - }, - _createAttachmentDetails$p$0: function() - { - var attachments=this._data$p$0["attachments"]; - if($h.ScriptHelpers.isNullOrUndefined(attachments)) - return[]; - var attachmentDetails=[]; - for(var i=0; i < attachments["length"]; i++) - if(!$h.ScriptHelpers.isNullOrUndefined(attachments[i])) - attachmentDetails[i]=new $h.AttachmentDetails(attachments[i]); - return attachmentDetails - }, - _calculatePermissionLevel$p$0: function() - { - var HostReadItem=1; - var HostReadWriteMailbox=2; - var HostReadWriteItem=3; - var permissionLevelFromHost=this._data$p$0["permissionLevel"]; - if($h.ScriptHelpers.isUndefined(this._permissionLevel$p$0)) - return 0; - switch(permissionLevelFromHost) - { - case HostReadItem: - return 1; - case HostReadWriteItem: - return 2; - case HostReadWriteMailbox: - return 3; - default: - return 0 - } - } - }; - $h._loadDictionaryRequest=function(createResultObject, dictionaryName, callback, userContext) - { - $h._loadDictionaryRequest["initializeBase"](this,[userContext]); - this._createResultObject$p$1=createResultObject; - this._dictionaryName$p$1=dictionaryName; - this._callback$p$1=callback - }; - $h._loadDictionaryRequest.prototype={ - _dictionaryName$p$1: null, - _createResultObject$p$1: null, - _callback$p$1: null, - handleResponse: function(response) - { - if(response["wasSuccessful"]) - { - var value=response[this._dictionaryName$p$1]; - var responseData=window["JSON"]["parse"](value); - this.createAsyncResult(this._createResultObject$p$1(responseData),0,0,null) - } - else - this.createAsyncResult(null,1,9020,response["errorMessage"]); - this._callback$p$1(this._asyncResult$p$0) - } - }; - $h.ProxyRequestBase=function(userContext) - { - $h.ProxyRequestBase["initializeBase"](this,[userContext]) - }; - $h.ProxyRequestBase.prototype={ - handleResponse: function(response) - { - if(!response["wasProxySuccessful"]) - { - this.set__statusCode$i$1(500); - this.set__statusDescription$i$1("Error"); - var errorMessage=response["errorMessage"]; - this.set__response$i$1(errorMessage); - this.createAsyncResult(null,1,9020,errorMessage) - } - else - { - this.set__statusCode$i$1(response["statusCode"]); - this.set__statusDescription$i$1(response["statusDescription"]); - this.set__response$i$1(response["body"]); - this.createAsyncResult(this.get__response$i$1(),0,0,null) - } - this._parseExtraResponseData$i$1(response); - this._cycleReadyStateFromHeadersReceivedToLoadingToDone$i$1() - }, - _throwInvalidStateException$i$1: function() - { - throw Error.create("DOMException",{ - code: 11, - message: "INVALID_STATE_ERR" - }); - }, - _cycleReadyStateFromHeadersReceivedToLoadingToDone$i$1: function() - { - var $$t_0=this; - this._changeReadyState$i$1(2,function() - { - $$t_0._changeReadyState$i$1(3,function() - { - $$t_0._changeReadyState$i$1(4,null) - }) - }) - }, - _changeReadyState$i$1: function(state, nextStep) - { - this.set__requestState$i$1(state); - var $$t_2=this; - window.setTimeout(function() - { - try - { - $$t_2._callOnReadyStateChangeCallback$i$1() - } - finally - { - if(!$h.ScriptHelpers.isNullOrUndefined(nextStep)) - nextStep() - } - },0) - }, - _checkSendConditions$i$1: function() - { - if(this.get__requestState$i$1() !==1) - this._throwInvalidStateException$i$1(); - if(this._isSent$p$0) - this._throwInvalidStateException$i$1() - } - }; - $h.RequestBase=function(userContext) - { - this._userContext$p$0=userContext - }; - $h.RequestBase.prototype={ - _isSent$p$0: false, - _asyncResult$p$0: null, - _userContext$p$0: null, - get_asyncResult: function() - { - return this._asyncResult$p$0 - }, - _sendRequest$i$0: function(dispid, methodName, dataToSend) - { - this._isSent$p$0=true; - var $$t_5=this; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.invokeHostMethod(dispid,dataToSend,function(resultCode, response) - { - if(resultCode) - $$t_5.createAsyncResult(null,1,9017,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode)); - else - $$t_5.handleResponse(response) - }) - }, - createAsyncResult: function(value, errorCode, detailedErrorCode, errorDescription) - { - this._asyncResult$p$0=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(value,errorCode,detailedErrorCode,this._userContext$p$0,errorDescription) - } - }; - $h.SaveDictionaryRequest=function(callback, userContext) - { - $h.SaveDictionaryRequest["initializeBase"](this,[userContext]); - if(!$h.ScriptHelpers.isNullOrUndefined(callback)) - this._callback$p$1=callback - }; - $h.SaveDictionaryRequest.prototype={ - _callback$p$1: null, - handleResponse: function(response) - { - if(response["wasSuccessful"]) - this.createAsyncResult(null,0,0,null); - else - this.createAsyncResult(null,1,9020,response["errorMessage"]); - if(!$h.ScriptHelpers.isNullOrUndefined(this._callback$p$1)) - this._callback$p$1(this._asyncResult$p$0) - } - }; - $h.ScriptHelpers=function(){}; - $h.ScriptHelpers.isNull=function(value) - { - return null===value - }; - $h.ScriptHelpers.isNullOrUndefined=function(value) - { - return $h.ScriptHelpers.isNull(value) || $h.ScriptHelpers.isUndefined(value) - }; - $h.ScriptHelpers.isUndefined=function(value) - { - return value===undefined - }; - $h.ScriptHelpers.dictionaryContainsKey=function(obj, keyName) - { - return Object["isInstanceOfType"](obj) ? keyName in obj : false - }; - $h.ScriptHelpers.isNonEmptyString=function(value) - { - if(!value) - return false; - return String["isInstanceOfType"](value) - }; - $h.ScriptHelpers.deepClone=function(obj) - { - return window["JSON"]["parse"](window["JSON"]["stringify"](obj)) - }; - $h.ScriptHelpers.isValueTrue=function(value) - { - if(!$h.ScriptHelpers.isNullOrUndefined(value)) - return value["toString"]().toLowerCase()==="true"; - return false - }; - window["OSF"]["DDA"]["OutlookAppOm"]["registerClass"]("OSF.DDA.OutlookAppOm"); - window["OSF"]["DDA"]["Settings"]["registerClass"]("OSF.DDA.Settings"); - $h.AdditionalGlobalParameters["registerClass"]("$h.AdditionalGlobalParameters"); - $h.ItemBase["registerClass"]("$h.ItemBase"); - $h.Item["registerClass"]("$h.Item",$h.ItemBase); - $h.Appointment["registerClass"]("$h.Appointment",$h.Item); - $h.ComposeItem["registerClass"]("$h.ComposeItem",$h.ItemBase); - $h.AppointmentCompose["registerClass"]("$h.AppointmentCompose",$h.ComposeItem); - $h.AttachmentDetails["registerClass"]("$h.AttachmentDetails"); - $h.Body["registerClass"]("$h.Body"); - $h.ComposeBody["registerClass"]("$h.ComposeBody",$h.Body); - $h.ComposeRecipient["registerClass"]("$h.ComposeRecipient"); - $h.ComposeLocation["registerClass"]("$h.ComposeLocation"); - $h.ComposeSubject["registerClass"]("$h.ComposeSubject"); - $h.ComposeTime["registerClass"]("$h.ComposeTime"); - $h.Contact["registerClass"]("$h.Contact"); - $h.CustomProperties["registerClass"]("$h.CustomProperties"); - $h.Diagnostics["registerClass"]("$h.Diagnostics"); - $h.EmailAddressDetails["registerClass"]("$h.EmailAddressDetails"); - $h.Entities["registerClass"]("$h.Entities"); - $h.Message["registerClass"]("$h.Message",$h.Item); - $h.MeetingRequest["registerClass"]("$h.MeetingRequest",$h.Message); - $h.MeetingSuggestion["registerClass"]("$h.MeetingSuggestion"); - $h._extractedDate["registerClass"]("$h._extractedDate"); - $h._preciseDate["registerClass"]("$h._preciseDate",$h._extractedDate); - $h._relativeDate["registerClass"]("$h._relativeDate",$h._extractedDate); - $h.MessageCompose["registerClass"]("$h.MessageCompose",$h.ComposeItem); - $h.NotificationMessages["registerClass"]("$h.NotificationMessages"); - $h.PhoneNumber["registerClass"]("$h.PhoneNumber"); - $h.TaskSuggestion["registerClass"]("$h.TaskSuggestion"); - $h.UserProfile["registerClass"]("$h.UserProfile"); - $h.CommonParameters["registerClass"]("$h.CommonParameters"); - $h.RequestBase["registerClass"]("$h.RequestBase"); - $h.ProxyRequestBase["registerClass"]("$h.ProxyRequestBase",$h.RequestBase); - $h.EwsRequest["registerClass"]("$h.EwsRequest",$h.ProxyRequestBase); - $h.InitialData["registerClass"]("$h.InitialData"); - $h._loadDictionaryRequest["registerClass"]("$h._loadDictionaryRequest",$h.RequestBase); - $h.SaveDictionaryRequest["registerClass"]("$h.SaveDictionaryRequest",$h.RequestBase); - window["OSF"]["DDA"]["OutlookAppOm"].asyncMethodTimeoutKeyName="__timeout__"; - window["OSF"]["DDA"]["OutlookAppOm"].ewsIdOrEmailParamName="ewsIdOrEmail"; - window["OSF"]["DDA"]["OutlookAppOm"].moduleParamName="module"; - window["OSF"]["DDA"]["OutlookAppOm"].queryStringParamName="queryString"; - window["OSF"]["DDA"]["OutlookAppOm"]._maxRecipients$p=100; - window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p=255; - window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength=32768; - window["OSF"]["DDA"]["OutlookAppOm"]._maxLocationLength$p=255; - window["OSF"]["DDA"]["OutlookAppOm"]._maxEwsRequestSize$p=1e6; - window["OSF"]["DDA"]["OutlookAppOm"].executeMethodName="ExecuteMethod"; - window["OSF"]["DDA"]["OutlookAppOm"].getInitialDataMethodName="GetInitialData"; - window["OSF"]["DDA"]["OutlookAppOm"].itemIdParameterName="itemId"; - window["OSF"]["DDA"]["OutlookAppOm"].restVersionParameterName="restVersion"; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p=null; - $h.AdditionalGlobalParameters.itemNumberKey="itemNumber"; - $h.AttachmentConstants.maxAttachmentNameLength=255; - $h.AttachmentConstants.maxUrlLength=2048; - $h.AttachmentConstants.maxItemIdLength=200; - $h.AttachmentConstants.maxRemoveIdLength=200; - $h.AttachmentConstants.attachmentParameterName="attachments"; - $h.AttachmentConstants.attachmentTypeParameterName="type"; - $h.AttachmentConstants.attachmentUrlParameterName="url"; - $h.AttachmentConstants.attachmentItemIdParameterName="itemId"; - $h.AttachmentConstants.attachmentNameParameterName="name"; - $h.AttachmentConstants.attachmentIsInlineParameterName="isInline"; - $h.AttachmentConstants.attachmentTypeFileName="file"; - $h.AttachmentConstants.attachmentTypeItemName="item"; - $h.AttachmentDetails._attachmentTypeMap$p=[window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["File"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["Item"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["Cloud"]]; - $h.Body.coercionTypeParameterName="coercionType"; - $h.ComposeRecipient.displayNameLengthLimit=255; - $h.ComposeRecipient.maxSmtpLength=571; - $h.ComposeRecipient.recipientsLimit=100; - $h.ComposeRecipient.totalRecipientsLimit=500; - $h.ComposeRecipient.addressParameterName="address"; - $h.ComposeRecipient.nameParameterName="name"; - $h.ComposeLocation.locationKey="location"; - $h.ComposeLocation.maximumLocationLength=255; - $h.ComposeSubject.maximumSubjectLength=255; - $h.ComposeTime.timeTypeName="TimeProperty"; - $h.ComposeTime.timeDataName="time"; - $h.Diagnostics.outlookAppName="Outlook"; - $h.Diagnostics.outlookWebAppName="OutlookWebApp"; - $h.Diagnostics.outlookIOSAppName="OutlookIOS"; - $h.Diagnostics.outlookAndroidAppName="OutlookAndroid"; - $h.EmailAddressDetails._emptyString$p=""; - $h.EmailAddressDetails._responseTypeMap$p=[window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["None"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Organizer"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Tentative"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Accepted"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Declined"]]; - $h.EmailAddressDetails._recipientTypeMap$p=[window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["Other"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["DistributionList"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["User"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["ExternalUser"]]; - $h.Entities._allEntityKeys$p=["Addresses","EmailAddresses","Urls","PhoneNumbers","TaskSuggestions","MeetingSuggestions","Contacts","FlightReservations","ParcelDeliveries"]; - $h.ReplyConstants.htmlBodyKeyName="htmlBody"; - $h.AsyncConstants.optionsKeyName="options"; - $h.AsyncConstants.callbackKeyName="callback"; - $h.AsyncConstants.asyncResultKeyName="asyncResult"; - $h.MeetingSuggestionTimeDecoder._baseDate$p=new Date("0001-01-01T00:00:00Z"); - $h.NotificationMessages.maximumKeyLength=32; - $h.NotificationMessages.maximumIconLength=32; - $h.NotificationMessages.maximumMessageLength=150; - $h.NotificationMessages.notificationsKeyParameterName="key"; - $h.NotificationMessages.notificationsTypeParameterName="type"; - $h.NotificationMessages.notificationsIconParameterName="icon"; - $h.NotificationMessages.notificationsMessageParameterName="message"; - $h.NotificationMessages.notificationsPersistentParameterName="persistent"; - $h.OutlookErrorManager.errorNameKey="name"; - $h.OutlookErrorManager.errorMessageKey="message"; - $h.OutlookErrorManager._isInitialized$p=false; - $h.OutlookErrorManager.OutlookErrorCodes.attachmentSizeExceeded=9e3; - $h.OutlookErrorManager.OutlookErrorCodes.numberOfAttachmentsExceeded=9001; - $h.OutlookErrorManager.OutlookErrorCodes.internalFormatError=9002; - $h.OutlookErrorManager.OutlookErrorCodes.invalidAttachmentId=9003; - $h.OutlookErrorManager.OutlookErrorCodes.invalidAttachmentPath=9004; - $h.OutlookErrorManager.OutlookErrorCodes.cannotAddAttachmentBeforeUpgrade=9005; - $h.OutlookErrorManager.OutlookErrorCodes.attachmentDeletedBeforeUploadCompletes=9006; - $h.OutlookErrorManager.OutlookErrorCodes.attachmentUploadGeneralFailure=9007; - $h.OutlookErrorManager.OutlookErrorCodes.attachmentToDeleteDoesNotExist=9008; - $h.OutlookErrorManager.OutlookErrorCodes.attachmentDeleteGeneralFailure=9009; - $h.OutlookErrorManager.OutlookErrorCodes.invalidEndTime=9010; - $h.OutlookErrorManager.OutlookErrorCodes.htmlSanitizationFailure=9011; - $h.OutlookErrorManager.OutlookErrorCodes.numberOfRecipientsExceeded=9012; - $h.OutlookErrorManager.OutlookErrorCodes.noValidRecipientsProvided=9013; - $h.OutlookErrorManager.OutlookErrorCodes.cursorPositionChanged=9014; - $h.OutlookErrorManager.OutlookErrorCodes.invalidSelection=9016; - $h.OutlookErrorManager.OutlookErrorCodes.accessRestricted=9017; - $h.OutlookErrorManager.OutlookErrorCodes.genericTokenError=9018; - $h.OutlookErrorManager.OutlookErrorCodes.genericSettingsError=9019; - $h.OutlookErrorManager.OutlookErrorCodes.genericResponseError=9020; - $h.OutlookErrorManager.OutlookErrorCodes.saveError=9021; - $h.OutlookErrorManager.OutlookErrorCodes.messageInDifferentStoreError=9022; - $h.OutlookErrorManager.OutlookErrorCodes.duplicateNotificationKey=9023; - $h.OutlookErrorManager.OutlookErrorCodes.notificationKeyNotFound=9024; - $h.OutlookErrorManager.OutlookErrorCodes.numberOfNotificationsExceeded=9025; - $h.OutlookErrorManager.OutlookErrorCodes.persistedNotificationArrayReadError=9026; - $h.OutlookErrorManager.OutlookErrorCodes.persistedNotificationArraySaveError=9027; - $h.OutlookErrorManager.OutlookErrorCodes.cannotPersistPropertyInUnsavedDraftError=9028; - $h.OutlookErrorManager.OutlookErrorCodes.callSaveAsyncBeforeToken=9029; - $h.OutlookErrorManager.OutlookErrorCodes.apiCallFailedDueToItemChange=9030; - $h.OutlookErrorManager.OutlookErrorCodes.ooeInvalidDataFormat=2006; - $h.OutlookErrorManager.OsfDdaErrorCodes.ooeCoercionTypeNotSupported=1e3; - $h.CommonParameters.asyncContextKeyName="asyncContext"; - $h.InitialData.userProfileTypeKey="userProfileType"; - $h.ScriptHelpers.emptyString=""; - OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM); - if(appContext.get_appName()==OSF.AppName.OutlookWebApp || appContext.get_appName()==OSF.AppName.OutlookIOS || appContext.get_appName()==OSF.AppName.OutlookAndroid) - this._settings=this._initializeSettings(appContext,false); - else - this._settings=this._initializeSettings(false); - appContext.appOM=new OSF.DDA.OutlookAppOm(appContext,this._webAppState.wnd,appReady); - if(appContext.get_appName()==OSF.AppName.Outlook || appContext.get_appName()==OSF.AppName.OutlookWebApp) - OSF.DDA.DispIdHost.addEventSupport(appContext.appOM,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.ItemChanged])) + Type.registerNamespace("Microsoft.Office.WebExtension.MailboxEnums"); + Microsoft.Office.WebExtension.MailboxEnums.EntityType = { + MeetingSuggestion: "meetingSuggestion", + TaskSuggestion: "taskSuggestion", + Address: "address", + EmailAddress: "emailAddress", + Url: "url", + PhoneNumber: "phoneNumber", + Contact: "contact", + FlightReservations: "flightReservations", + ParcelDeliveries: "parcelDeliveries" + }; + Microsoft.Office.WebExtension.MailboxEnums.ItemType = { + Message: "message", + Appointment: "appointment" + }; + Microsoft.Office.WebExtension.MailboxEnums.ResponseType = { + None: "none", + Organizer: "organizer", + Tentative: "tentative", + Accepted: "accepted", + Declined: "declined" + }; + Microsoft.Office.WebExtension.MailboxEnums.RecipientType = { + Other: "other", + DistributionList: "distributionList", + User: "user", + ExternalUser: "externalUser" + }; + Microsoft.Office.WebExtension.MailboxEnums.AttachmentType = { + File: "file", + Item: "item", + Cloud: "cloud" + }; + Microsoft.Office.WebExtension.MailboxEnums.BodyType = { + Text: "text", + Html: "html" + }; + Microsoft.Office.WebExtension.MailboxEnums.ItemNotificationMessageType = { + ProgressIndicator: "progressIndicator", + InformationalMessage: "informationalMessage", + ErrorMessage: "errorMessage", + InsightMessage: "insightMessage" + }; + Microsoft.Office.WebExtension.MailboxEnums.Folder = { + Inbox: "inbox", + Junk: "junk", + DeletedItems: "deletedItems" + }; + Microsoft.Office.WebExtension.CoercionType = { + Text: "text", + Html: "html" + }; + Microsoft.Office.WebExtension.MailboxEnums.UserProfileType = { + Office365: "office365", + OutlookCom: "outlookCom", + Enterprise: "enterprise" + }; + Microsoft.Office.WebExtension.MailboxEnums.RestVersion = { + v1_0: "v1.0", + v2_0: "v2.0", + Beta: "beta" + }; + Microsoft.Office.WebExtension.MailboxEnums.ModuleType = {Addins: "addins"}; + Microsoft.Office.WebExtension.MailboxEnums.ActionType = {ShowTaskPane: "showTaskPane"}; + Type.registerNamespace("OSF.DDA"); + var OSF = window["OSF"] || {}; + OSF.DDA = OSF.DDA || {}; + window["OSF"]["DDA"]["OutlookAppOm"] = OSF.DDA.OutlookAppOm = function(officeAppContext, targetWindow, appReadyCallback) + { + this.$$d_navigateToModuleAsync = Function.createDelegate(this,this.navigateToModuleAsync); + this.$$d_displayPersonaCardAsync = Function.createDelegate(this,this.displayPersonaCardAsync); + this.$$d_displayNewMessageFormApi = Function.createDelegate(this,this.displayNewMessageFormApi); + this.$$d__displayNewAppointmentFormApi$p$0 = Function.createDelegate(this,this._displayNewAppointmentFormApi$p$0); + this.$$d_windowOpenOverrideHandler = Function.createDelegate(this,this.windowOpenOverrideHandler); + this.$$d__getRestUrl$p$0 = Function.createDelegate(this,this._getRestUrl$p$0); + this.$$d__getEwsUrl$p$0 = Function.createDelegate(this,this._getEwsUrl$p$0); + this.$$d__getDiagnostics$p$0 = Function.createDelegate(this,this._getDiagnostics$p$0); + this.$$d__getUserProfile$p$0 = Function.createDelegate(this,this._getUserProfile$p$0); + this.$$d_getItem = Function.createDelegate(this,this.getItem); + this.$$d__callAppReadyCallback$p$0 = Function.createDelegate(this,this._callAppReadyCallback$p$0); + this.$$d__getInitialDataResponseHandler$p$0 = Function.createDelegate(this,this._getInitialDataResponseHandler$p$0); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p = this; + this._officeAppContext$p$0 = officeAppContext; + this._appReadyCallback$p$0 = appReadyCallback; + var $$t_4 = this; + var stringLoadedCallback = function() + { + if(appReadyCallback) + if(!$$t_4._officeAppContext$p$0["get_isDialog"]()) + $$t_4.invokeHostMethod(1,null,$$t_4.$$d__getInitialDataResponseHandler$p$0); + else + window.setTimeout($$t_4.$$d__callAppReadyCallback$p$0,0) + }; + if(this._areStringsLoaded$p$0()) + stringLoadedCallback(); + else + this._loadLocalizedScript$p$0(stringLoadedCallback) + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i = function(currentPermissionLevel) + { + if(!currentPermissionLevel) + throw Error.create(window["_u"]["ExtensibilityStrings"]["l_ElevatedPermissionNeeded_Text"]); + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i = function(value, minValue, maxValue, argumentName) + { + if(value < minValue || value > maxValue) + throw Error.argumentOutOfRange(argumentName); + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidModule$p = function(module) + { + if($h.ScriptHelpers.isNullOrUndefined(module)) + throw Error.argumentNull("module"); + else if(module === "") + throw Error.argument("module","module cannot be empty."); + if(module !== window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ModuleType"]["Addins"]) + throw Error.notImplemented(String.format("API not supported for module '{0}'",module)); + }; + window["OSF"]["DDA"]["OutlookAppOm"]._getHtmlBody$p = function(data) + { + var htmlBody = ""; + if("htmlBody" in data) + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidHtmlBody$p(data["htmlBody"]); + htmlBody = data["htmlBody"] + } + return htmlBody + }; + window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p = function(data) + { + var attachments = []; + if("attachments" in data) + { + attachments = data["attachments"]; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentsArray$p(attachments) + } + return attachments + }; + window["OSF"]["DDA"]["OutlookAppOm"]._getOptionsAndCallback$p = function(data) + { + var args = []; + if("options" in data) + args[0] = data["options"]; + if("callback" in data) + args[args["length"]] = data["callback"]; + return args + }; + window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p = function(attachments) + { + var attachmentsData = new Array(0); + if(Array["isInstanceOfType"](attachments)) + for(var i = 0; i < attachments["length"]; i++) + if(Object["isInstanceOfType"](attachments[i])) + { + var attachment = attachments[i]; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachment$p(attachment); + attachmentsData[i] = window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentData$p(attachment) + } + else + throw Error.argument("attachments"); + return attachmentsData + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidHtmlBody$p = function(htmlBody) + { + if(!String["isInstanceOfType"](htmlBody)) + throw Error.argument("htmlBody"); + if($h.ScriptHelpers.isNullOrUndefined(htmlBody)) + throw Error.argument("htmlBody"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(htmlBody.length,0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody") + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentsArray$p = function(attachments) + { + if(!Array["isInstanceOfType"](attachments)) + throw Error.argument("attachments"); + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachment$p = function(attachment) + { + if(!Object["isInstanceOfType"](attachment)) + throw Error.argument("attachments"); + if(!("type" in attachment) || !("name" in attachment)) + throw Error.argument("attachments"); + if(!("url" in attachment || "itemId" in attachment)) + throw Error.argument("attachments"); + }; + window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentData$p = function(attachment) + { + var attachmentData = null; + if(attachment["type"] === "file") + { + var url = attachment["url"]; + var name = attachment["name"]; + var isInline = $h.ScriptHelpers.isValueTrue(attachment["isInline"]); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentUrlOrName$p(url,name); + attachmentData = window["OSF"]["DDA"]["OutlookAppOm"]._createFileAttachmentData$p(url,name,isInline) + } + else if(attachment["type"] === "item") + { + var itemId = window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(attachment["itemId"]); + var name = attachment["name"]; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentItemIdOrName$p(itemId,name); + attachmentData = window["OSF"]["DDA"]["OutlookAppOm"]._createItemAttachmentData$p(itemId,name) + } + else + throw Error.argument("attachments"); + return attachmentData + }; + window["OSF"]["DDA"]["OutlookAppOm"]._createFileAttachmentData$p = function(url, name, isInline) + { + return["file",name,url,isInline] + }; + window["OSF"]["DDA"]["OutlookAppOm"]._createItemAttachmentData$p = function(itemId, name) + { + return["item",name,itemId] + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentUrlOrName$p = function(url, name) + { + if(!String["isInstanceOfType"](url) || !String["isInstanceOfType"](name)) + throw Error.argument("attachments"); + if(url.length > 2048) + throw Error.argumentOutOfRange("attachments",url.length,window["_u"]["ExtensibilityStrings"]["l_AttachmentUrlTooLong_Text"]); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p(name) + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentItemIdOrName$p = function(itemId, name) + { + if(!String["isInstanceOfType"](itemId) || !String["isInstanceOfType"](name)) + throw Error.argument("attachments"); + if(itemId.length > 200) + throw Error.argumentOutOfRange("attachments",itemId.length,window["_u"]["ExtensibilityStrings"]["l_AttachmentItemIdTooLong_Text"]); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p(name) + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p = function(name) + { + if(name.length > 255) + throw Error.argumentOutOfRange("attachments",name.length,window["_u"]["ExtensibilityStrings"]["l_AttachmentNameTooLong_Text"]); + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p = function(restVersion) + { + if(!restVersion) + throw Error.argumentNull("restVersion"); + if(restVersion !== window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"] && restVersion !== window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v2_0"] && restVersion !== window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["Beta"]) + throw Error.argument("restVersion"); + }; + window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost = function(itemId) + { + if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._initialData$p$0 && window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._initialData$p$0.get__isRestIdSupported$i$0()) + return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToRestId"](itemId,window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"]); + return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToEwsId"](itemId,window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"]) + }; + window["OSF"]["DDA"]["OutlookAppOm"]["addAdditionalArgs"] = function(dispid, data) + { + return data + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p = function(value, expectedType, argumentName) + { + if(Object["getType"](value) !== expectedType) + throw Error.argumentType(argumentName); + }; + window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p = function(value, minLength, maxLength, name) + { + if($h.ScriptHelpers.isNullOrUndefined(value)) + return; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(value,String,name); + var stringValue = value; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(stringValue.length,minLength,maxLength,name) + }; + window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p = function(array) + { + return array ? array["join"](";") : null + }; + window["OSF"]["DDA"]["OutlookAppOm"]._convertComposeEmailDictionaryParameterForSetApi$p = function(recipients) + { + if(!recipients) + return null; + var results = new Array(recipients["length"]); + for(var i = 0; i < recipients["length"]; i++) + results[i] = [recipients[i]["address"],recipients[i]["name"]]; + return results + }; + window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p = function(emailset, name) + { + if($h.ScriptHelpers.isNullOrUndefined(emailset)) + return null; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(emailset,Array,name); + var originalAttendees = emailset; + var updatedAttendees = null; + var normalizationNeeded = false; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(originalAttendees["length"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxRecipients$p,String.format("{0}.length",name)); + for(var i = 0; i < originalAttendees["length"]; i++) + if($h.EmailAddressDetails["isInstanceOfType"](originalAttendees[i])) + { + normalizationNeeded = true; + break + } + if(normalizationNeeded) + updatedAttendees = []; + for(var i = 0; i < originalAttendees["length"]; i++) + if(normalizationNeeded) + { + updatedAttendees[i] = $h.EmailAddressDetails["isInstanceOfType"](originalAttendees[i]) ? originalAttendees[i]["emailAddress"] : originalAttendees[i]; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(updatedAttendees[i],String,String.format("{0}[{1}]",name,i)) + } + else + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(originalAttendees[i],String,String.format("{0}[{1}]",name,i)); + return updatedAttendees + }; + OSF.DDA.OutlookAppOm.prototype = { + _initialData$p$0: null, + _item$p$0: null, + _userProfile$p$0: null, + _diagnostics$p$0: null, + _officeAppContext$p$0: null, + _appReadyCallback$p$0: null, + _clientEndPoint$p$0: null, + _hostItemType$p$0: 0, + _additionalOutlookParams$p$0: null, + get_clientEndPoint: function() + { + if(!this._clientEndPoint$p$0) + this._clientEndPoint$p$0 = OSF._OfficeAppFactory["getClientEndPoint"](); + return this._clientEndPoint$p$0 + }, + set_clientEndPoint: function(value) + { + this._clientEndPoint$p$0 = value; + return value + }, + get_initialData: function() + { + return this._initialData$p$0 + }, + get__appName$i$0: function() + { + return this._officeAppContext$p$0["get_appName"]() + }, + get_additionalOutlookParams: function() + { + return this._additionalOutlookParams$p$0 + }, + addEventSupport: function() + { + if(this._item$p$0) + OSF.DDA.DispIdHost["addEventSupport"](this._item$p$0,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType["RecipientsChanged"],Microsoft.Office.WebExtension.EventType["AppointmentTimeChanged"]])) + }, + windowOpenOverrideHandler: function(url, targetName, features, replace) + { + this.invokeHostMethod(403,{launchUrl: url},null) + }, + createAsyncResult: function(value, errorCode, detailedErrorCode, userContext, errorMessage) + { + var initArgs = {}; + var errorArgs = null; + initArgs[OSF.DDA.AsyncResultEnum.Properties["Value"]] = value; + initArgs[OSF.DDA.AsyncResultEnum.Properties["Context"]] = userContext; + if(0 !== errorCode) + { + errorArgs = {}; + var errorProperties = $h.OutlookErrorManager.getErrorArgs(detailedErrorCode); + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties["Name"]] = errorProperties["name"]; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties["Message"]] = !errorMessage ? errorProperties["message"] : errorMessage; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties["Code"]] = detailedErrorCode + } + return new OSF.DDA.AsyncResult(initArgs,errorArgs) + }, + _throwOnMethodCallForInsufficientPermission$i$0: function(requiredPermissionLevel, methodName) + { + if(this._initialData$p$0._permissionLevel$p$0 < requiredPermissionLevel) + throw Error.create(String.format(window["_u"]["ExtensibilityStrings"]["l_ElevatedPermissionNeededForMethod_Text"],methodName)); + }, + _displayReplyForm$i$0: function(obj) + { + this._displayReplyFormHelper$p$0(obj,false) + }, + _displayReplyAllForm$i$0: function(obj) + { + this._displayReplyFormHelper$p$0(obj,true) + }, + setActionsDefinition: function(actionsDefinition) + { + this._additionalOutlookParams$p$0.setActionsDefinition(actionsDefinition) + }, + get_itemNumber: function() + { + return this._additionalOutlookParams$p$0._itemNumber$p$0 + }, + get_actionsDefinition: function() + { + return this._additionalOutlookParams$p$0._actionsDefinition$p$0 + }, + _displayReplyFormHelper$p$0: function(obj, isReplyAll) + { + if(String["isInstanceOfType"](obj)) + this._doDisplayReplyForm$p$0(obj,isReplyAll); + else if(Object["isInstanceOfType"](obj) && Object.getTypeName(obj) === "Object") + this._doDisplayReplyFormWithAttachments$p$0(obj,isReplyAll); + else + throw Error.argumentType(); + }, + _doDisplayReplyForm$p$0: function(htmlBody, isReplyAll) + { + if(!$h.ScriptHelpers.isNullOrUndefined(htmlBody)) + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(htmlBody.length,0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody"); + this.invokeHostMethod(isReplyAll ? 11 : 10,{htmlBody: htmlBody},null) + }, + _doDisplayReplyFormWithAttachments$p$0: function(data, isReplyAll) + { + var htmlBody = window["OSF"]["DDA"]["OutlookAppOm"]._getHtmlBody$p(data); + var attachments = window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p(data); + var parameters = $h.CommonParameters.parse(window["OSF"]["DDA"]["OutlookAppOm"]._getOptionsAndCallback$p(data),false); + var $$t_6 = this; + this._standardInvokeHostMethod$i$0(isReplyAll ? 31 : 30,{ + htmlBody: htmlBody, + attachments: window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p(attachments) + },function(rawInput) + { + return rawInput + },parameters._asyncContext$p$0,parameters._callback$p$0) + }, + _standardInvokeHostMethod$i$0: function(dispid, data, format, userContext, callback) + { + var $$t_B = this; + this.invokeHostMethod(dispid,data,function(resultCode, response) + { + if(callback) + { + var asyncResult = null; + if(Object["isInstanceOfType"](response)) + { + var responseDictionary = response; + if("error" in responseDictionary || "data" in responseDictionary || "errorCode" in responseDictionary) + if(!responseDictionary["error"]) + { + var formattedData = format ? format(responseDictionary["data"]) : responseDictionary["data"]; + asyncResult = $$t_B.createAsyncResult(formattedData,0,0,userContext,null) + } + else + { + var errorCode = responseDictionary["errorCode"]; + asyncResult = $$t_B.createAsyncResult(null,1,errorCode,userContext,null) + } + } + if(!asyncResult && resultCode) + asyncResult = $$t_B.createAsyncResult(null,1,9002,userContext,null); + callback(asyncResult) + } + }) + }, + getItemNumberFromOutlookResponse: function(responseData) + { + var itemNumber = 0; + if(responseData["length"] > 2) + { + var extraParameters = window["JSON"]["parse"](responseData[2]); + if(Object["isInstanceOfType"](extraParameters)) + { + var extraParametersDictionary = extraParameters; + itemNumber = extraParametersDictionary["itemNumber"] + } + } + return itemNumber + }, + createDeserializedData: function(responseData, itemChanged) + { + var deserializedData = null; + var returnValues = window["JSON"]["parse"](responseData[0]); + if(Object["isInstanceOfType"](returnValues)) + deserializedData = this._createDeserializedDataWithDictionary$p$0(responseData,itemChanged); + else if(Number["isInstanceOfType"](returnValues)) + deserializedData = this._createDeserializedDataWithInt$p$0(responseData,itemChanged); + else + throw Error.notImplemented("Return data type from host must be Dictionary or int"); + return deserializedData + }, + _createDeserializedDataWithDictionary$p$0: function(responseData, itemChanged) + { + var deserializedData = window["JSON"]["parse"](responseData[0]); + if(itemChanged) + { + deserializedData["error"] = true; + deserializedData["errorCode"] = 9030 + } + else if(responseData["length"] > 1 && responseData[1]) + { + deserializedData["error"] = true; + deserializedData["errorCode"] = responseData[1] + } + else + deserializedData["error"] = false; + return deserializedData + }, + _createDeserializedDataWithInt$p$0: function(responseData, itemChanged) + { + var deserializedData = {}; + deserializedData["error"] = true; + deserializedData["errorCode"] = responseData[0]; + return deserializedData + }, + invokeHostMethod: function(dispid, data, responseCallback) + { + var startTime = (new Date)["getTime"](); + var $$t_A = this; + var invokeResponseCallback = function(resultCode, resultData) + { + if(window["OSF"]["AppTelemetry"]) + { + var deserializedData = resultData; + var detailedErrorCode = -1; + if(deserializedData && deserializedData["errorCode"]) + detailedErrorCode = deserializedData["errorCode"]; + window["OSF"]["AppTelemetry"]["onMethodDone"](dispid,null,Math["abs"]((new Date)["getTime"]() - startTime),detailedErrorCode) + } + if(responseCallback) + responseCallback(resultCode,resultData) + }; + if(64 === this._officeAppContext$p$0["get_appName"]()) + { + var args = {ApiParams: data}; + args["MethodData"] = { + ControlId: OSF._OfficeAppFactory["getId"](), + DispatchId: dispid + }; + args = window["OSF"]["DDA"]["OutlookAppOm"]["addAdditionalArgs"](dispid,args); + if(dispid === 1) + this.get_clientEndPoint()["invoke"]("GetInitialData",invokeResponseCallback,args); + else + this.get_clientEndPoint()["invoke"]("ExecuteMethod",invokeResponseCallback,args) + } + else if(!this._isOwaOnlyMethod$p$0(dispid)) + this.callOutlookDispatcher(dispid,data,responseCallback,startTime); + else if(responseCallback) + responseCallback(-2,null) + }, + callOutlookDispatcher: function(dispid, data, responseCallback, startTime) + { + var executeParameters = this.convertToOutlookParameters(dispid,data); + var $$t_D = this; + OSF.ClientHostController["execute"](dispid,executeParameters,function(nativeData, resultCode) + { + var detailedErrorCode = -1; + var deserializedData = null; + var responseData = nativeData.toArray(); + if(responseData["length"] > 0) + { + var itemNumberFromOutlookResponse = $$t_D.getItemNumberFromOutlookResponse(responseData); + var isValidItemNumber = itemNumberFromOutlookResponse > 0; + var itemChanged = isValidItemNumber && itemNumberFromOutlookResponse > $$t_D._additionalOutlookParams$p$0._itemNumber$p$0; + deserializedData = $$t_D.createDeserializedData(responseData,itemChanged); + if(deserializedData && deserializedData["errorCode"]) + detailedErrorCode = deserializedData["errorCode"] + } + else if(responseCallback) + throw Error.argumentNull("responseData","Unexpected null/empty data from host."); + if(window["OSF"]["AppTelemetry"]) + window["OSF"]["AppTelemetry"]["onMethodDone"](dispid,null,Math["abs"]((new Date)["getTime"]() - startTime),detailedErrorCode); + if(responseCallback) + responseCallback(resultCode,deserializedData) + }) + }, + _dictionaryToDate$i$0: function(input) + { + var retValue = new Date(input["year"],input["month"],input["date"],input["hours"],input["minutes"],input["seconds"],!input["milliseconds"] ? 0 : input["milliseconds"]); + if(window["isNaN"](retValue["getTime"]())) + throw Error.format(window["_u"]["ExtensibilityStrings"]["l_InvalidDate_Text"]); + return retValue + }, + _dateToDictionary$i$0: function(input) + { + var retValue = {}; + retValue["month"] = input["getMonth"](); + retValue["date"] = input["getDate"](); + retValue["year"] = input["getFullYear"](); + retValue["hours"] = input["getHours"](); + retValue["minutes"] = input["getMinutes"](); + retValue["seconds"] = input["getSeconds"](); + retValue["milliseconds"] = input["getMilliseconds"](); + return retValue + }, + _isOwaOnlyMethod$p$0: function(dispId) + { + switch(dispId) + { + case 402: + case 401: + case 400: + case 403: + return true; + default: + return false + } + }, + isOutlook16OrGreater: function() + { + var hostVersion = this._initialData$p$0.get__hostVersion$i$0(); + var endIndex = 0; + var majorVersionNumber = 0; + if(hostVersion) + { + endIndex = hostVersion.indexOf("."); + majorVersionNumber = window["parseInt"](hostVersion.substring(0,endIndex)) + } + return majorVersionNumber >= 16 + }, + isApiVersionSupported: function(requirementSet) + { + var apiSupported = false; + try + { + var requirementDict = window["JSON"]["parse"](this._officeAppContext$p$0["get_requirementMatrix"]()); + var hostApiVersion = requirementDict["Mailbox"]; + var hostApiVersionParts = hostApiVersion.split("."); + var requirementSetParts = requirementSet.split("."); + if(window["parseInt"](hostApiVersionParts[0]) > window["parseInt"](requirementSetParts[0]) || window["parseInt"](hostApiVersionParts[0]) === window["parseInt"](requirementSetParts[0]) && window["parseInt"](hostApiVersionParts[1]) >= window["parseInt"](requirementSetParts[1])) + apiSupported = true + } + catch($$e_6){} + return apiSupported + }, + convertToOutlookParameters: function(dispid, data) + { + var executeParameters = null; + var optionalParameters = {}; + switch(dispid) + { + case 1: + case 2: + case 3: + case 14: + case 18: + case 26: + case 32: + case 41: + case 34: + case 99: + break; + case 12: + optionalParameters["isRest"] = data["isRest"]; + break; + case 4: + var jsonProperty = window["JSON"]["stringify"](data["customProperties"]); + executeParameters = [jsonProperty]; + break; + case 5: + executeParameters = [data["body"]]; + break; + case 8: + case 9: + executeParameters = [data["itemId"]]; + break; + case 7: + executeParameters = [window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["requiredAttendees"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["optionalAttendees"]),data["start"],data["end"],data["location"],window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["resources"]),data["subject"],data["body"]]; + break; + case 44: + executeParameters = [window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["toRecipients"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["ccRecipients"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["bccRecipients"]),data["subject"],data["htmlBody"],data["attachments"]]; + break; + case 43: + executeParameters = [data["ewsIdOrEmail"]]; + break; + case 45: + executeParameters = [data["module"],data["queryString"]]; + break; + case 40: + executeParameters = [data["extensionId"],data["consentState"]]; + break; + case 11: + case 10: + executeParameters = [data["htmlBody"]]; + break; + case 31: + case 30: + executeParameters = [data["htmlBody"],data["attachments"]]; + break; + case 100: + optionalParameters = data; + break; + case 23: + case 13: + case 38: + case 29: + executeParameters = [data["data"],data["coercionType"]]; + break; + case 37: + case 28: + executeParameters = [data["coercionType"]]; + break; + case 17: + executeParameters = [data["subject"]]; + break; + case 15: + executeParameters = [data["recipientField"]]; + break; + case 22: + case 21: + executeParameters = [data["recipientField"],window["OSF"]["DDA"]["OutlookAppOm"]._convertComposeEmailDictionaryParameterForSetApi$p(data["recipientArray"])]; + break; + case 19: + executeParameters = [data["itemId"],data["name"]]; + break; + case 16: + executeParameters = [data["uri"],data["name"],data["isInline"]]; + break; + case 20: + executeParameters = [data["attachmentIndex"]]; + break; + case 25: + executeParameters = [data["TimeProperty"],data["time"]]; + break; + case 24: + executeParameters = [data["TimeProperty"]]; + break; + case 27: + executeParameters = [data["location"]]; + break; + case 33: + case 35: + executeParameters = [data["key"],data["type"],data["persistent"],data["message"],data["icon"]]; + this._additionalOutlookParams$p$0.setActionsDefinition(data["actions"]); + break; + case 36: + executeParameters = [data["key"]]; + break; + case 101: + optionalParameters = data; + break; + default: + Sys.Debug.fail("Unexpected method dispid"); + break + } + if(dispid !== 1) + { + var $$t_5; + this._additionalOutlookParams$p$0.updateOutlookExecuteParameters($$t_5 = {val: executeParameters},optionalParameters),executeParameters = $$t_5["val"] + } + return executeParameters + }, + _displayNewAppointmentFormApi$p$0: function(parameters) + { + var normalizedRequiredAttendees = window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["requiredAttendees"],"requiredAttendees"); + var normalizedOptionalAttendees = window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["optionalAttendees"],"optionalAttendees"); + window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["location"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxLocationLength$p,"location"); + window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["body"],0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"body"); + window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["subject"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p,"subject"); + if(!$h.ScriptHelpers.isNullOrUndefined(parameters["start"])) + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(parameters["start"],Date,"start"); + var startDateTime = parameters["start"]; + parameters["start"] = startDateTime["getTime"](); + if(!$h.ScriptHelpers.isNullOrUndefined(parameters["end"])) + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(parameters["end"],Date,"end"); + var endDateTime = parameters["end"]; + if(endDateTime < startDateTime) + throw Error.argumentOutOfRange("end",endDateTime,window["_u"]["ExtensibilityStrings"]["l_InvalidEventDates_Text"]); + parameters["end"] = endDateTime["getTime"]() + } + } + var updatedParameters = null; + if(normalizedRequiredAttendees || normalizedOptionalAttendees) + { + updatedParameters = {}; + var $$dict_7 = parameters; + for(var $$key_8 in $$dict_7) + { + var entry = { + key: $$key_8, + value: $$dict_7[$$key_8] + }; + updatedParameters[entry["key"]] = entry["value"] + } + if(normalizedRequiredAttendees) + updatedParameters["requiredAttendees"] = normalizedRequiredAttendees; + if(normalizedOptionalAttendees) + updatedParameters["optionalAttendees"] = normalizedOptionalAttendees + } + this.invokeHostMethod(7,updatedParameters || parameters,null) + }, + displayNewMessageFormApi: function(parameters) + { + var updatedParameters = {}; + if(parameters) + { + var normalizedToRecipients = window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["toRecipients"],"toRecipients"); + var normalizedCcRecipients = window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["ccRecipients"],"ccRecipients"); + var normalizedBccRecipients = window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["bccRecipients"],"bccRecipients"); + window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["htmlBody"],0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody"); + window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["subject"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p,"subject"); + var attachments = window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p(parameters); + var $$dict_7 = parameters; + for(var $$key_8 in $$dict_7) + { + var entry = { + key: $$key_8, + value: $$dict_7[$$key_8] + }; + updatedParameters[entry["key"]] = entry["value"] + } + if(normalizedToRecipients) + updatedParameters["toRecipients"] = normalizedToRecipients; + if(normalizedCcRecipients) + updatedParameters["ccRecipients"] = normalizedCcRecipients; + if(normalizedBccRecipients) + updatedParameters["bccRecipients"] = normalizedBccRecipients; + if(attachments) + updatedParameters["attachments"] = window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p(attachments) + } + this.invokeHostMethod(44,updatedParameters || parameters,null) + }, + displayPersonaCardAsync: function(ewsIdOrEmail) + { + var args = []; + for(var $$pai_3 = 1; $$pai_3 < arguments["length"]; ++$$pai_3) + args[$$pai_3 - 1] = arguments[$$pai_3]; + if($h.ScriptHelpers.isNullOrUndefined(ewsIdOrEmail)) + throw Error.argumentNull("ewsIdOrEmail"); + else if(ewsIdOrEmail === "") + throw Error.argument("ewsIdOrEmail","ewsIdOrEmail cannot be empty."); + var parameters = $h.CommonParameters.parse(args,false); + this._standardInvokeHostMethod$i$0(43,{ewsIdOrEmail: ewsIdOrEmail.trim()},null,parameters._asyncContext$p$0,parameters._callback$p$0) + }, + navigateToModuleAsync: function(module) + { + var args = []; + for(var $$pai_5 = 1; $$pai_5 < arguments["length"]; ++$$pai_5) + args[$$pai_5 - 1] = arguments[$$pai_5]; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidModule$p(module); + var parameters = $h.CommonParameters.parse(args,false); + var updatedParameters = {}; + if(module === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ModuleType"]["Addins"]) + { + var queryString = ""; + if(parameters._options$p$0 && parameters._options$p$0["queryString"]) + queryString = parameters._options$p$0["queryString"]; + updatedParameters["queryString"] = queryString + } + updatedParameters["module"] = module; + this._standardInvokeHostMethod$i$0(45,updatedParameters,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }, + _initializeMethods$p$0: function() + { + var currentInstance = this; + if($h.Item["isInstanceOfType"](this._item$p$0) || this._hostItemType$p$0 === 6) + { + currentInstance["displayNewAppointmentForm"] = this.$$d__displayNewAppointmentFormApi$p$0; + currentInstance["displayNewMessageForm"] = this.$$d_displayNewMessageFormApi; + currentInstance["displayPersonaCardAsync"] = this.$$d_displayPersonaCardAsync; + currentInstance["navigateToModuleAsync"] = this.$$d_navigateToModuleAsync + } + }, + _getInitialDataResponseHandler$p$0: function(resultCode, data) + { + if(resultCode) + return; + this["initialize"](data); + this["displayName"] = "mailbox"; + window.setTimeout(this.$$d__callAppReadyCallback$p$0,0) + }, + _callAppReadyCallback$p$0: function() + { + this._appReadyCallback$p$0() + }, + _invokeGetTokenMethodAsync$p$0: function(outlookDispid, data, methodName, callback, userContext) + { + if($h.ScriptHelpers.isNullOrUndefined(callback)) + throw Error.argumentNull("callback"); + var $$t_9 = this; + this.invokeHostMethod(outlookDispid,data,function(resultCode, response) + { + var asyncResult; + if(resultCode) + asyncResult = $$t_9.createAsyncResult(null,1,9017,userContext,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode)); + else + { + var responseDictionary = response; + if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() === 8 && "error" in responseDictionary && "errorCode" in responseDictionary && responseDictionary["error"] && responseDictionary["errorCode"] === 9030) + asyncResult = $$t_9.createAsyncResult(null,1,responseDictionary["errorCode"],userContext,responseDictionary["errorMessage"]); + else if(responseDictionary["wasSuccessful"]) + asyncResult = $$t_9.createAsyncResult(responseDictionary["token"],0,0,userContext,null); + else + asyncResult = $$t_9.createAsyncResult(null,1,responseDictionary["errorCode"],userContext,responseDictionary["errorMessage"]) + } + callback(asyncResult) + }) + }, + getItem: function() + { + return this._item$p$0 + }, + _getUserProfile$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0); + return this._userProfile$p$0 + }, + _getDiagnostics$p$0: function() + { + return this._diagnostics$p$0 + }, + _getEwsUrl$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0); + return this._initialData$p$0.get__ewsUrl$i$0() + }, + _getRestUrl$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0); + if(this._shouldInferRestUrl$p$0()) + return this._inferRestUrlFromEwsUrl$p$0(); + return this._initialData$p$0.get__restUrl$i$0() + }, + _shouldInferRestUrl$p$0: function() + { + return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() === 8 && !this._initialData$p$0.get__restUrl$i$0() && this.isApiVersionSupported("1.5") && this._isHostBuildNumberLessThan$p$0("16.0.8414.1000") + }, + _isHostBuildNumberLessThan$p$0: function(buildNumber) + { + var hostVersion = this._initialData$p$0.get__hostVersion$i$0(); + if(hostVersion) + { + var hostVersionParts = hostVersion.split("."); + var buildNumberParts = buildNumber.split("."); + return window["parseInt"](hostVersionParts[0]) < window["parseInt"](buildNumberParts[0]) || window["parseInt"](hostVersionParts[0]) === window["parseInt"](buildNumberParts[0]) && window["parseInt"](hostVersionParts[2]) < window["parseInt"](buildNumberParts[2]) + } + return false + }, + _inferRestUrlFromEwsUrl$p$0: function() + { + var inferredRestUrl = ""; + var stringToFind = "/ews/"; + var index = this._initialData$p$0.get__ewsUrl$i$0().toLowerCase().indexOf(stringToFind); + if(index !== -1) + inferredRestUrl = String.format("{0}/{1}",this._initialData$p$0.get__ewsUrl$i$0().slice(0,index),"api"); + return $h.ScriptHelpers.isNonEmptyString(inferredRestUrl) ? inferredRestUrl : null + }, + _findOffset$p$0: function(value) + { + var ranges = this._initialData$p$0.get__timeZoneOffsets$i$0(); + for(var r = 0; r < ranges["length"]; r++) + { + var range = ranges[r]; + var start = window["parseInt"](range["start"]); + var end = window["parseInt"](range["end"]); + if(value["getTime"]() - start >= 0 && value["getTime"]() - end < 0) + return window["parseInt"](range["offset"]) + } + throw Error.format(window["_u"]["ExtensibilityStrings"]["l_InvalidDate_Text"]); + }, + _areStringsLoaded$p$0: function() + { + var stringsLoaded = false; + try + { + stringsLoaded = !$h.ScriptHelpers.isNullOrUndefined(window["_u"]["ExtensibilityStrings"]["l_EwsRequestOversized_Text"]) + } + catch($$e_1){} + return stringsLoaded + }, + _loadLocalizedScript$p$0: function(stringLoadedCallback) + { + var url = null; + var baseUrl = ""; + var scripts = document.getElementsByTagName("script"); + for(var i = scripts.length - 1; i >= 0; i--) + { + var filename = null; + var attributes = scripts[i].attributes; + if(attributes) + { + var attribute = attributes.getNamedItem("src"); + if(attribute) + filename = attribute.value; + if(filename) + { + var debug = false; + filename = filename.toLowerCase(); + var officeIndex = filename.indexOf("office_strings.js"); + if(officeIndex < 0) + { + officeIndex = filename.indexOf("office_strings.debug.js"); + debug = true + } + if(officeIndex > 0 && officeIndex < filename.length) + { + url = filename.replace(debug ? "office_strings.debug.js" : "office_strings.js","outlook_strings.js"); + var languageUrl = filename.substring(0,officeIndex); + var lastIndexOfSlash = languageUrl.lastIndexOf("/",languageUrl.length - 2); + if(lastIndexOfSlash === -1) + lastIndexOfSlash = languageUrl.lastIndexOf("\\",languageUrl.length - 2); + if(lastIndexOfSlash !== -1 && languageUrl.length > lastIndexOfSlash + 1) + baseUrl = languageUrl.substring(0,lastIndexOfSlash + 1); + break + } + } + } + } + if(url) + { + var head = document.getElementsByTagName("head")[0]; + var scriptElement = null; + var $$t_H = this; + var scriptElementCallback = function() + { + if(stringLoadedCallback && (!scriptElement.readyState || scriptElement.readyState && (scriptElement.readyState === "loaded" || scriptElement.readyState === "complete"))) + { + scriptElement.onload = null; + scriptElement.onreadystatechange = null; + stringLoadedCallback() + } + }; + var $$t_I = this; + var failureCallback = function() + { + if(!$$t_I._areStringsLoaded$p$0()) + { + var fallbackUrl = baseUrl + "en-us/" + "outlook_strings.js"; + scriptElement.onload = null; + scriptElement.onreadystatechange = null; + scriptElement = $$t_I._createScriptElement$p$0(fallbackUrl); + scriptElement.onload = scriptElementCallback; + scriptElement.onreadystatechange = scriptElementCallback; + head.appendChild(scriptElement) + } + }; + scriptElement = this._createScriptElement$p$0(url); + scriptElement.onload = scriptElementCallback; + scriptElement.onreadystatechange = scriptElementCallback; + window.setTimeout(failureCallback,2e3); + head.appendChild(scriptElement) + } + }, + _createScriptElement$p$0: function(url) + { + var scriptElement = document.createElement("script"); + scriptElement.type = "text/javascript"; + scriptElement.src = url; + return scriptElement + } + }; + OSF.DDA.OutlookAppOm.prototype.initialize = function(initialData) + { + if(!initialData) + { + this._additionalOutlookParams$p$0 = new $h.AdditionalGlobalParameters(true); + this._initialData$p$0 = null; + this._item$p$0 = null; + return + } + var ItemTypeKey = "itemType"; + this._initialData$p$0 = new $h.InitialData(initialData); + this._hostItemType$p$0 = initialData[ItemTypeKey]; + if(1 === initialData[ItemTypeKey]) + this._item$p$0 = new $h.Message(this._initialData$p$0); + else if(3 === initialData[ItemTypeKey]) + this._item$p$0 = new $h.MeetingRequest(this._initialData$p$0); + else if(2 === initialData[ItemTypeKey]) + this._item$p$0 = new $h.Appointment(this._initialData$p$0); + else if(4 === initialData[ItemTypeKey]) + this._item$p$0 = new $h.MessageCompose(this._initialData$p$0); + else if(5 === initialData[ItemTypeKey]) + this._item$p$0 = new $h.AppointmentCompose(this._initialData$p$0); + else if(6 === initialData[ItemTypeKey]); + else + Sys.Debug.trace("Unexpected item type was received from the host."); + this._userProfile$p$0 = new $h.UserProfile(this._initialData$p$0); + this._diagnostics$p$0 = new $h.Diagnostics(this._initialData$p$0,this._officeAppContext$p$0["get_appName"]()); + var supportsAdditionalParameters = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() !== 8 || this.isOutlook16OrGreater() || this.isApiVersionSupported("1.5"); + this._additionalOutlookParams$p$0 = new $h.AdditionalGlobalParameters(supportsAdditionalParameters); + if("itemNumber" in initialData) + this["setCurrentItemNumber"](initialData["itemNumber"]); + this._initializeMethods$p$0(); + $h.InitialData._defineReadOnlyProperty$i(this,"item",this.$$d_getItem); + $h.InitialData._defineReadOnlyProperty$i(this,"userProfile",this.$$d__getUserProfile$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"diagnostics",this.$$d__getDiagnostics$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"ewsUrl",this.$$d__getEwsUrl$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"restUrl",this.$$d__getRestUrl$p$0); + if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() === 64) + if(this._initialData$p$0.get__overrideWindowOpen$i$0()) + window.open = this.$$d_windowOpenOverrideHandler; + this.addEventSupport() + }; + OSF.DDA.OutlookAppOm.prototype.makeEwsRequestAsync = function(data) + { + var args = []; + for(var $$pai_5 = 1; $$pai_5 < arguments["length"]; ++$$pai_5) + args[$$pai_5 - 1] = arguments[$$pai_5]; + if($h.ScriptHelpers.isNullOrUndefined(data)) + throw Error.argumentNull("data"); + if(data.length > window["OSF"]["DDA"]["OutlookAppOm"]._maxEwsRequestSize$p) + throw Error.argument("data",window["_u"]["ExtensibilityStrings"]["l_EwsRequestOversized_Text"]); + this._throwOnMethodCallForInsufficientPermission$i$0(3,"makeEwsRequestAsync"); + var parameters = $h.CommonParameters.parse(args,true,true); + var ewsRequest = new $h.EwsRequest(parameters._asyncContext$p$0); + var $$t_4 = this; + ewsRequest.onreadystatechange = function() + { + if(4 === ewsRequest.get__requestState$i$1()) + parameters._callback$p$0(ewsRequest._asyncResult$p$0) + }; + ewsRequest.send(data) + }; + OSF.DDA.OutlookAppOm.prototype.recordDataPoint = function(data) + { + if($h.ScriptHelpers.isNullOrUndefined(data)) + throw Error.argumentNull("data"); + this.invokeHostMethod(402,data,null) + }; + OSF.DDA.OutlookAppOm.prototype.recordTrace = function(data) + { + if($h.ScriptHelpers.isNullOrUndefined(data)) + throw Error.argumentNull("data"); + this.invokeHostMethod(401,data,null) + }; + OSF.DDA.OutlookAppOm.prototype.trackCtq = function(data) + { + if($h.ScriptHelpers.isNullOrUndefined(data)) + throw Error.argumentNull("data"); + this.invokeHostMethod(400,data,null) + }; + OSF.DDA.OutlookAppOm.prototype.convertToLocalClientTime = function(timeValue) + { + var date = new Date(timeValue["getTime"]()); + var offset = date["getTimezoneOffset"]() * -1; + if(this._initialData$p$0 && this._initialData$p$0.get__timeZoneOffsets$i$0()) + { + date["setUTCMinutes"](date["getUTCMinutes"]() - offset); + offset = this._findOffset$p$0(date); + date["setUTCMinutes"](date["getUTCMinutes"]() + offset) + } + var retValue = this._dateToDictionary$i$0(date); + retValue["timezoneOffset"] = offset; + return retValue + }; + OSF.DDA.OutlookAppOm.prototype.convertToUtcClientTime = function(input) + { + var retValue = this._dictionaryToDate$i$0(input); + if(this._initialData$p$0 && this._initialData$p$0.get__timeZoneOffsets$i$0()) + { + var offset = this._findOffset$p$0(retValue); + retValue["setUTCMinutes"](retValue["getUTCMinutes"]() - offset); + offset = !input["timezoneOffset"] ? retValue["getTimezoneOffset"]() * -1 : input["timezoneOffset"]; + retValue["setUTCMinutes"](retValue["getUTCMinutes"]() + offset) + } + return retValue + }; + OSF.DDA.OutlookAppOm.prototype.convertToRestId = function(itemId, restVersion) + { + if(!itemId) + throw Error.argumentNull("itemId"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p(restVersion); + return itemId.replace(new RegExp("[/]","g"),"-").replace(new RegExp("[+]","g"),"_") + }; + OSF.DDA.OutlookAppOm.prototype.convertToEwsId = function(itemId, restVersion) + { + if(!itemId) + throw Error.argumentNull("itemId"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p(restVersion); + return itemId.replace(new RegExp("[-]","g"),"/").replace(new RegExp("[_]","g"),"+") + }; + OSF.DDA.OutlookAppOm.prototype.getUserIdentityTokenAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + this._throwOnMethodCallForInsufficientPermission$i$0(1,"getUserIdentityTokenAsync"); + var parameters = $h.CommonParameters.parse(args,true,true); + this._invokeGetTokenMethodAsync$p$0(2,null,"GetUserIdentityToken",parameters._callback$p$0,parameters._asyncContext$p$0) + }; + OSF.DDA.OutlookAppOm.prototype.getCallbackTokenAsync = function() + { + var args = []; + for(var $$pai_7 = 0; $$pai_7 < arguments["length"]; ++$$pai_7) + args[$$pai_7] = arguments[$$pai_7]; + this._throwOnMethodCallForInsufficientPermission$i$0(1,"getCallbackTokenAsync"); + var parameters = $h.CommonParameters.parse(args,true,true); + var options = {}; + if(parameters._options$p$0) + for(var $$arr_3 = Object["keys"](parameters._options$p$0), $$len_4 = $$arr_3.length, $$idx_5 = 0; $$idx_5 < $$len_4; ++$$idx_5) + { + var key = $$arr_3[$$idx_5]; + options[key] = parameters._options$p$0[key] + } + if(!("isRest" in options)) + options["isRest"] = false; + this._invokeGetTokenMethodAsync$p$0(12,options,"GetCallbackToken",parameters._callback$p$0,parameters._asyncContext$p$0) + }; + OSF.DDA.OutlookAppOm.prototype.displayMessageForm = function(itemId) + { + if($h.ScriptHelpers.isNullOrUndefined(itemId)) + throw Error.argumentNull("itemId"); + this.invokeHostMethod(8,{itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId)},null) + }; + OSF.DDA.OutlookAppOm.prototype.displayAppointmentForm = function(itemId) + { + if($h.ScriptHelpers.isNullOrUndefined(itemId)) + throw Error.argumentNull("itemId"); + this.invokeHostMethod(9,{itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId)},null) + }; + OSF.DDA.OutlookAppOm.prototype.RegisterConsentAsync = function(consentState) + { + if(consentState !== 2 && consentState !== 1 && consentState) + throw Error.argumentOutOfRange("consentState"); + var parameters = {}; + parameters["consentState"] = consentState["toString"](); + parameters["extensionId"] = this["GetExtensionId"](); + this.invokeHostMethod(40,parameters,null) + }; + OSF.DDA.OutlookAppOm.prototype.CloseApp = function() + { + this.invokeHostMethod(42,null,null) + }; + OSF.DDA.OutlookAppOm.prototype.GetIsRead = function() + { + return this._initialData$p$0.get__isRead$i$0() + }; + OSF.DDA.OutlookAppOm.prototype.GetEndNodeUrl = function() + { + return this._initialData$p$0.get__endNodeUrl$i$0() + }; + OSF.DDA.OutlookAppOm.prototype.GetConsentMetadata = function() + { + return this._initialData$p$0.get__consentMetadata$i$0() + }; + OSF.DDA.OutlookAppOm.prototype.GetEntryPointUrl = function() + { + return this._initialData$p$0.get__entryPointUrl$i$0() + }; + OSF.DDA.OutlookAppOm.prototype.GetMarketplaceContentMarket = function() + { + return this._initialData$p$0.get__marketplaceContentMarket$i$0() + }; + OSF.DDA.OutlookAppOm.prototype.GetMarketplaceAssetId = function() + { + return this._initialData$p$0.get__marketplaceAssetId$i$0() + }; + OSF.DDA.OutlookAppOm.prototype.GetExtensionId = function() + { + return this._initialData$p$0.get__extensionId$i$0() + }; + OSF.DDA.OutlookAppOm.prototype.setCurrentItemNumber = function(itemNumber) + { + this._additionalOutlookParams$p$0.setCurrentItemNumber(itemNumber) + }; + window["OSF"]["DDA"]["Settings"] = OSF.DDA.Settings = function(data) + { + this._rawData$p$0 = data + }; + window["OSF"]["DDA"]["Settings"]._convertFromRawSettings$p = function(rawSettings) + { + if(!rawSettings) + return{}; + if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() === 8 || window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() === 65536 || window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() === 4194304) + { + var outlookSettings = rawSettings["SettingsKey"]; + if(outlookSettings) + return OSF.DDA.SettingsManager["deserializeSettings"](outlookSettings) + } + return rawSettings + }; + OSF.DDA.Settings.prototype = { + _rawData$p$0: null, + _settingsData$p$0: null, + get__data$p$0: function() + { + if(!this._settingsData$p$0) + { + this._settingsData$p$0 = window["OSF"]["DDA"]["Settings"]._convertFromRawSettings$p(this._rawData$p$0); + this._rawData$p$0 = null + } + return this._settingsData$p$0 + }, + _saveSettingsForOutlook$p$0: function(callback, userContext) + { + var storedException = null; + var startTime = (new Date)["getTime"](); + var detailedErrorCode = -1; + try + { + var serializedSettings = OSF.DDA.SettingsManager["serializeSettings"](this.get__data$p$0()); + var jsonSettings = window["JSON"]["stringify"](serializedSettings); + var settingsObjectToSave = {SettingsKey: jsonSettings}; + OSF.DDA.ClientSettingsManager["write"](settingsObjectToSave) + } + catch(ex) + { + storedException = ex + } + var asyncResult; + if(storedException) + { + detailedErrorCode = 9019; + asyncResult = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,detailedErrorCode,userContext,storedException["message"]) + } + else + { + detailedErrorCode = 0; + asyncResult = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,0,detailedErrorCode,userContext,null) + } + window["OSF"]["AppTelemetry"]["onMethodDone"](404,null,Math["abs"]((new Date)["getTime"]() - startTime),detailedErrorCode); + if(callback) + callback(asyncResult) + }, + _saveSettingsForOwa$p$0: function(callback, userContext) + { + var serializedSettings = OSF.DDA.SettingsManager["serializeSettings"](this.get__data$p$0()); + var $$t_7 = this; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.invokeHostMethod(404,[serializedSettings],function(resultCode, response) + { + if(callback) + { + var asyncResult; + if(resultCode) + asyncResult = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9017,userContext,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode)); + else + { + var responseDictionary = response; + if(!responseDictionary["error"]) + asyncResult = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,0,0,userContext,null); + else + asyncResult = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9019,userContext,responseDictionary["errorMessage"]) + } + callback(asyncResult) + } + }) + } + }; + OSF.DDA.Settings.prototype.get = function(name) + { + return this.get__data$p$0()[name] + }; + OSF.DDA.Settings.prototype.set = function(name, value) + { + this.get__data$p$0()[name] = value + }; + OSF.DDA.Settings.prototype.remove = function(name) + { + delete this.get__data$p$0()[name] + }; + OSF.DDA.Settings.prototype.saveAsync = function() + { + var args = []; + for(var $$pai_4 = 0; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4] = arguments[$$pai_4]; + var commonParameters = $h.CommonParameters.parse(args,false); + if(window["JSON"]["stringify"](OSF.DDA.SettingsManager["serializeSettings"](this.get__data$p$0())).length > 32768) + { + var asyncResult = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9019,commonParameters._asyncContext$p$0,""); + var $$t_3 = this; + window.setTimeout(function() + { + commonParameters._callback$p$0(asyncResult) + },0); + return + } + if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() === 64) + this._saveSettingsForOwa$p$0(commonParameters._callback$p$0,commonParameters._asyncContext$p$0); + else + this._saveSettingsForOutlook$p$0(commonParameters._callback$p$0,commonParameters._asyncContext$p$0) + }; + Type.registerNamespace("$h"); + var $h = window["$h"] || {}; + Type.registerNamespace("Office.cast"); + var Office = window["Office"] || {}; + Office.cast = Office.cast || {}; + $h.AdditionalGlobalParameters = function(supported) + { + this._parameterBlobSupported$p$0 = supported; + this._itemNumber$p$0 = 0 + }; + $h.AdditionalGlobalParameters.prototype = { + _parameterBlobSupported$p$0: false, + _itemNumber$p$0: 0, + _actionsDefinition$p$0: null, + setActionsDefinition: function(actionsDefinition) + { + this._actionsDefinition$p$0 = actionsDefinition + }, + setCurrentItemNumber: function(itemNumber) + { + if(itemNumber > 0) + this._itemNumber$p$0 = itemNumber + }, + get_itemNumber: function() + { + return this._itemNumber$p$0 + }, + get_actionsDefinition: function() + { + return this._actionsDefinition$p$0 + }, + updateOutlookExecuteParameters: function(executeParameters, additionalApiParameters) + { + if(this._parameterBlobSupported$p$0) + { + if(this._itemNumber$p$0 > 0) + additionalApiParameters["itemNumber"] = this._itemNumber$p$0["toString"](); + if(this._actionsDefinition$p$0) + additionalApiParameters["actions"] = this._actionsDefinition$p$0; + if(!Object["keys"](additionalApiParameters)["length"]) + return; + if(!executeParameters["val"]) + executeParameters["val"] = []; + executeParameters["val"]["push"](window["JSON"]["stringify"](additionalApiParameters)) + } + } + }; + $h.Appointment = function(dataDictionary) + { + this.$$d__getOrganizer$p$2 = Function.createDelegate(this,this._getOrganizer$p$2); + this.$$d__getNormalizedSubject$p$2 = Function.createDelegate(this,this._getNormalizedSubject$p$2); + this.$$d__getSubject$p$2 = Function.createDelegate(this,this._getSubject$p$2); + this.$$d__getResources$p$2 = Function.createDelegate(this,this._getResources$p$2); + this.$$d__getRequiredAttendees$p$2 = Function.createDelegate(this,this._getRequiredAttendees$p$2); + this.$$d__getOptionalAttendees$p$2 = Function.createDelegate(this,this._getOptionalAttendees$p$2); + this.$$d__getLocation$p$2 = Function.createDelegate(this,this._getLocation$p$2); + this.$$d__getEnd$p$2 = Function.createDelegate(this,this._getEnd$p$2); + this.$$d__getStart$p$2 = Function.createDelegate(this,this._getStart$p$2); + $h.Appointment["initializeBase"](this,[dataDictionary]); + $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"resources",this.$$d__getResources$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"organizer",this.$$d__getOrganizer$p$2) + }; + $h.Appointment.prototype = { + getItemType: function() + { + return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Appointment"] + }, + _getStart$p$2: function() + { + return this._data$p$0.get__start$i$0() + }, + _getEnd$p$2: function() + { + return this._data$p$0.get__end$i$0() + }, + _getLocation$p$2: function() + { + return this._data$p$0.get__location$i$0() + }, + _getOptionalAttendees$p$2: function() + { + return this._data$p$0.get__cc$i$0() + }, + _getRequiredAttendees$p$2: function() + { + return this._data$p$0.get__to$i$0() + }, + _getResources$p$2: function() + { + return this._data$p$0.get__resources$i$0() + }, + _getSubject$p$2: function() + { + return this._data$p$0.get__subject$i$0() + }, + _getNormalizedSubject$p$2: function() + { + return this._data$p$0.get__normalizedSubject$i$0() + }, + _getOrganizer$p$2: function() + { + return this._data$p$0.get__organizer$i$0() + } + }; + $h.Appointment.prototype.getEntities = function() + { + return this._data$p$0._getEntities$i$0() + }; + $h.Appointment.prototype.getEntitiesByType = function(entityType) + { + return this._data$p$0._getEntitiesByType$i$0(entityType) + }; + $h.Appointment.prototype.getSelectedEntities = function() + { + return this._data$p$0._getSelectedEntities$i$0() + }; + $h.Appointment.prototype.getRegExMatches = function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches"); + return this._data$p$0._getRegExMatches$i$0() + }; + $h.Appointment.prototype.getFilteredEntitiesByName = function(name) + { + return this._data$p$0._getFilteredEntitiesByName$i$0(name) + }; + $h.Appointment.prototype.getRegExMatchesByName = function(name) + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName"); + return this._data$p$0._getRegExMatchesByName$i$0(name) + }; + $h.Appointment.prototype.getSelectedRegExMatches = function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedRegExMatches"); + return this._data$p$0._getSelectedRegExMatches$i$0() + }; + $h.Appointment.prototype.displayReplyForm = function(obj) + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyForm$i$0(obj) + }; + $h.Appointment.prototype.displayReplyAllForm = function(obj) + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyAllForm$i$0(obj) + }; + $h.AppointmentCompose = function(data) + { + this.$$d__getLocation$p$2 = Function.createDelegate(this,this._getLocation$p$2); + this.$$d__getEnd$p$2 = Function.createDelegate(this,this._getEnd$p$2); + this.$$d__getStart$p$2 = Function.createDelegate(this,this._getStart$p$2); + this.$$d__getOptionalAttendees$p$2 = Function.createDelegate(this,this._getOptionalAttendees$p$2); + this.$$d__getRequiredAttendees$p$2 = Function.createDelegate(this,this._getRequiredAttendees$p$2); + $h.AppointmentCompose["initializeBase"](this,[data]); + $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2) + }; + $h.AppointmentCompose.prototype = { + _requiredAttendees$p$2: null, + _optionalAttendees$p$2: null, + _start$p$2: null, + _end$p$2: null, + _location$p$2: null, + getItemType: function() + { + return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Appointment"] + }, + _getRequiredAttendees$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._requiredAttendees$p$2) + this._requiredAttendees$p$2 = new $h.ComposeRecipient(0,"requiredAttendees"); + return this._requiredAttendees$p$2 + }, + _getOptionalAttendees$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._optionalAttendees$p$2) + this._optionalAttendees$p$2 = new $h.ComposeRecipient(1,"optionalAttendees"); + return this._optionalAttendees$p$2 + }, + _getStart$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._start$p$2) + this._start$p$2 = new $h.ComposeTime(1); + return this._start$p$2 + }, + _getEnd$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._end$p$2) + this._end$p$2 = new $h.ComposeTime(2); + return this._end$p$2 + }, + _getLocation$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._location$p$2) + this._location$p$2 = new $h.ComposeLocation; + return this._location$p$2 + } + }; + $h.AttachmentConstants = function(){}; + $h.AttachmentDetails = function(data) + { + this.$$d__getIsInline$p$0 = Function.createDelegate(this,this._getIsInline$p$0); + this.$$d__getAttachmentType$p$0 = Function.createDelegate(this,this._getAttachmentType$p$0); + this.$$d__getSize$p$0 = Function.createDelegate(this,this._getSize$p$0); + this.$$d__getContentType$p$0 = Function.createDelegate(this,this._getContentType$p$0); + this.$$d__getName$p$0 = Function.createDelegate(this,this._getName$p$0); + this.$$d__getId$p$0 = Function.createDelegate(this,this._getId$p$0); + this._data$p$0 = data; + $h.InitialData._defineReadOnlyProperty$i(this,"id",this.$$d__getId$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"name",this.$$d__getName$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"contentType",this.$$d__getContentType$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"size",this.$$d__getSize$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"attachmentType",this.$$d__getAttachmentType$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"isInline",this.$$d__getIsInline$p$0) + }; + $h.AttachmentDetails.prototype = { + _data$p$0: null, + _getId$p$0: function() + { + return this._data$p$0["id"] + }, + _getName$p$0: function() + { + return this._data$p$0["name"] + }, + _getContentType$p$0: function() + { + return this._data$p$0["contentType"] + }, + _getSize$p$0: function() + { + return this._data$p$0["size"] + }, + _getAttachmentType$p$0: function() + { + var response = this._data$p$0["attachmentType"]; + return response < $h.AttachmentDetails._attachmentTypeMap$p["length"] ? $h.AttachmentDetails._attachmentTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["File"] + }, + _getIsInline$p$0: function() + { + return this._data$p$0["isInline"] + } + }; + $h.Body = function(){}; + $h.Body._tryMapToHostCoercionType$i = function(coercionType, hostCoercionType) + { + hostCoercionType["val"] = undefined; + if(coercionType === window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Html"]) + hostCoercionType["val"] = 3; + else if(coercionType === window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Text"]) + hostCoercionType["val"] = 0; + else + return false; + return true + }; + $h.Body.prototype.getAsync = function(coercionType) + { + var args = []; + for(var $$pai_7 = 1; $$pai_7 < arguments["length"]; ++$$pai_7) + args[$$pai_7 - 1] = arguments[$$pai_7]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"body.getAsync"); + var commonParameters = $h.CommonParameters.parse(args,true); + var hostCoercionType; + var $$t_5, + $$t_6; + if(!($$t_6 = $h.Body._tryMapToHostCoercionType$i(coercionType,$$t_5 = {val: hostCoercionType}),hostCoercionType = $$t_5["val"],$$t_6)) + throw Error.argument("coercionType"); + var dataToHost = {coercionType: hostCoercionType}; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(37,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.ComposeBody = function() + { + $h.ComposeBody["initializeBase"](this) + }; + $h.ComposeBody._createParameterDictionaryToHost$i = function(data, parameters) + { + var dataToHost = {data: data}; + return $h.ComposeBody._addCoercionTypeToDictionary$i(dataToHost,parameters) + }; + $h.ComposeBody._createAppendParameterDictionaryToHost$i = function(data, parameters) + { + var dataToHost = {appendTxt: data}; + return $h.ComposeBody._addCoercionTypeToDictionary$i(dataToHost,parameters) + }; + $h.ComposeBody._addCoercionTypeToDictionary$i = function(dataToHost, parameters) + { + if(parameters._options$p$0 && parameters._options$p$0["hasOwnProperty"]("coercionType") && !$h.ScriptHelpers.isNull(parameters._options$p$0["coercionType"])) + { + var hostCoercionType; + var $$t_3, + $$t_4; + if(!($$t_4 = $h.Body._tryMapToHostCoercionType$i(parameters._options$p$0["coercionType"],$$t_3 = {val: hostCoercionType}),hostCoercionType = $$t_3["val"],$$t_4)) + { + if(parameters._callback$p$0) + parameters._callback$p$0(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,1e3,parameters._asyncContext$p$0,null)); + return null + } + dataToHost["coercionType"] = hostCoercionType + } + else + dataToHost["coercionType"] = 0; + return dataToHost + }; + $h.ComposeBody.prototype.getTypeAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"body.getTypeAsync"); + var parameters = $h.CommonParameters.parse(args,true); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(14,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeBody.prototype.setSelectedDataAsync = function(data) + { + var args = []; + for(var $$pai_4 = 1; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4 - 1] = arguments[$$pai_4]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.setSelectedDataAsync"); + var parameters = $h.CommonParameters.parse(args,false); + if(!String["isInstanceOfType"](data)) + throw Error.argumentType("data",Object["getType"](data),String); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); + var dataToHost = $h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); + if(!dataToHost) + return; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(13,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeBody.prototype.prependAsync = function(data) + { + var args = []; + for(var $$pai_4 = 1; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4 - 1] = arguments[$$pai_4]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.prependAsync"); + var parameters = $h.CommonParameters.parse(args,false); + if(!String["isInstanceOfType"](data)) + throw Error.argumentType("data",Object["getType"](data),String); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); + var dataToHost = $h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); + if(!dataToHost) + return; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(23,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeBody.prototype.appendOnSendAsync = function(data) + { + var args = []; + for(var $$pai_4 = 1; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4 - 1] = arguments[$$pai_4]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.appendOnSendAsync"); + var parameters = $h.CommonParameters.parse(args,false); + if(!data) + data = ""; + if(!String["isInstanceOfType"](data)) + throw Error.argumentType("data",Object["getType"](data),String); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,5e3,"data"); + var dataToHost = $h.ComposeBody._createAppendParameterDictionaryToHost$i(data,parameters); + if(!dataToHost) + return; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(100,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeBody.prototype.setAsync = function(data) + { + var args = []; + for(var $$pai_4 = 1; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4 - 1] = arguments[$$pai_4]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.setAsync"); + var parameters = $h.CommonParameters.parse(args,false); + if(!String["isInstanceOfType"](data)) + throw Error.argumentType("data",Object["getType"](data),String); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); + var dataToHost = $h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); + if(!dataToHost) + return; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(38,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeItem = function(data) + { + this.$$d__getBody$p$1 = Function.createDelegate(this,this._getBody$p$1); + this.$$d__getSubject$p$1 = Function.createDelegate(this,this._getSubject$p$1); + $h.ComposeItem["initializeBase"](this,[data]); + $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$1); + $h.InitialData._defineReadOnlyProperty$i(this,"body",this.$$d__getBody$p$1) + }; + $h.ComposeItem.prototype = { + _subject$p$1: null, + _body$p$1: null, + _getBody$p$1: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._body$p$1) + this._body$p$1 = new $h.ComposeBody; + return this._body$p$1 + }, + _getSubject$p$1: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._subject$p$1) + this._subject$p$1 = new $h.ComposeSubject; + return this._subject$p$1 + } + }; + $h.ComposeItem.prototype.addFileAttachmentAsync = function(uri, attachmentName) + { + var args = []; + for(var $$pai_6 = 2; $$pai_6 < arguments["length"]; ++$$pai_6) + args[$$pai_6 - 2] = arguments[$$pai_6]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"addFileAttachmentAsync"); + if(!$h.ScriptHelpers.isNonEmptyString(uri)) + throw Error.argument("uri"); + if(!$h.ScriptHelpers.isNonEmptyString(attachmentName)) + throw Error.argument("attachmentName"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(uri.length,0,2048,"uri"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentName.length,0,255,"attachmentName"); + var commonParameters = $h.CommonParameters.parse(args,false); + var isInline = false; + if(!$h.ScriptHelpers.isNull(commonParameters._options$p$0)) + isInline = $h.ScriptHelpers.isValueTrue(commonParameters._options$p$0["isInline"]); + var parameters = { + uri: uri, + name: attachmentName, + isInline: isInline, + __timeout__: 6e5 + }; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(16,parameters,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.ComposeItem.prototype.addItemAttachmentAsync = function(itemId, attachmentName) + { + var args = []; + for(var $$pai_5 = 2; $$pai_5 < arguments["length"]; ++$$pai_5) + args[$$pai_5 - 2] = arguments[$$pai_5]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"addItemAttachmentAsync"); + if(!$h.ScriptHelpers.isNonEmptyString(itemId)) + throw Error.argument("itemId"); + if(!$h.ScriptHelpers.isNonEmptyString(attachmentName)) + throw Error.argument("attachmentName"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(itemId.length,0,200,"itemId"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentName.length,0,255,"attachmentName"); + var commonParameters = $h.CommonParameters.parse(args,false); + var parameters = { + itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId), + name: attachmentName, + __timeout__: 6e5 + }; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(19,parameters,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.ComposeItem.prototype.removeAttachmentAsync = function(attachmentId) + { + var args = []; + for(var $$pai_3 = 1; $$pai_3 < arguments["length"]; ++$$pai_3) + args[$$pai_3 - 1] = arguments[$$pai_3]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"removeAttachmentAsync"); + if(!$h.ScriptHelpers.isNonEmptyString(attachmentId)) + throw Error.argument("attachmentId"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentId.length,0,200,"attachmentId"); + var commonParameters = $h.CommonParameters.parse(args,false); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(20,{attachmentIndex: attachmentId},null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.ComposeItem.prototype.getSelectedDataAsync = function(coercionType) + { + var args = []; + for(var $$pai_7 = 1; $$pai_7 < arguments["length"]; ++$$pai_7) + args[$$pai_7 - 1] = arguments[$$pai_7]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedDataAsync"); + var commonParameters = $h.CommonParameters.parse(args,true); + var hostCoercionType; + var $$t_5, + $$t_6; + if(coercionType !== window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Html"] && coercionType !== window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Text"] || !($$t_6 = $h.Body._tryMapToHostCoercionType$i(coercionType,$$t_5 = {val: hostCoercionType}),hostCoercionType = $$t_5["val"],$$t_6)) + throw Error.argument("coercionType"); + var dataToHost = {coercionType: hostCoercionType}; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(28,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.ComposeItem.prototype.setSelectedDataAsync = function(data) + { + var args = []; + for(var $$pai_4 = 1; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4 - 1] = arguments[$$pai_4]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"setSelectedDataAsync"); + var parameters = $h.CommonParameters.parse(args,false); + if(!String["isInstanceOfType"](data)) + throw Error.argumentType("data",Object["getType"](data),String); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); + var dataToHost = $h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); + if(!dataToHost) + return; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(29,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeItem.prototype.close = function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(41,null,null,null,null) + }; + $h.ComposeItem.prototype.saveAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"saveAsync"); + var parameters = $h.CommonParameters.parse(args,false); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(32,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeRecipient = function(type, propertyName) + { + this._type$p$0 = type; + this._propertyName$p$0 = propertyName + }; + $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p = function(displayName, emailAddress) + { + if(!displayName && !emailAddress) + throw Error.argument("recipients"); + if(displayName && displayName.length > 255) + throw Error.argumentOutOfRange("recipients",displayName.length,window["_u"]["ExtensibilityStrings"]["l_DisplayNameTooLong_Text"]); + if(emailAddress && emailAddress.length > 571) + throw Error.argumentOutOfRange("recipients",emailAddress.length,window["_u"]["ExtensibilityStrings"]["l_EmailAddressTooLong_Text"]); + }; + $h.ComposeRecipient._getAsyncFormatter$p = function(rawInput) + { + var input = rawInput; + var output = []; + for(var i = 0; i < input["length"]; i++) + { + var email = new $h.EmailAddressDetails(input[i]); + output[i] = email + } + return output + }; + $h.ComposeRecipient._createEmailDictionaryForHost$p = function(address, name) + { + return{ + address: address, + name: name + } + }; + $h.ComposeRecipient.prototype = { + _propertyName$p$0: null, + _type$p$0: 0, + setAddHelper: function(recipients, args, isSet) + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(recipients["length"],0,100,"recipients"); + var parameters = $h.CommonParameters.parse(args,false); + var recipientData = []; + if(Array["isInstanceOfType"](recipients)) + for(var i = 0; i < recipients["length"]; i++) + if(String["isInstanceOfType"](recipients[i])) + { + $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(recipients[i],recipients[i]); + recipientData[i] = $h.ComposeRecipient._createEmailDictionaryForHost$p(recipients[i],recipients[i]) + } + else if($h.EmailAddressDetails["isInstanceOfType"](recipients[i])) + { + var address = recipients[i]; + $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(address["displayName"],address["emailAddress"]); + recipientData[i] = $h.ComposeRecipient._createEmailDictionaryForHost$p(address["emailAddress"],address["displayName"]) + } + else if(Object["isInstanceOfType"](recipients[i])) + { + var input = recipients[i]; + var emailAddress = input["emailAddress"]; + var displayName = input["displayName"]; + $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(displayName,emailAddress); + recipientData[i] = $h.ComposeRecipient._createEmailDictionaryForHost$p(emailAddress,displayName) + } + else + throw Error.argument("recipients"); + else + throw Error.argument("recipients"); + var $$t_B = this; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(isSet ? 21 : 22,{ + recipientField: this._type$p$0, + recipientArray: recipientData + },function(rawInput) + { + return rawInput + },parameters._asyncContext$p$0,parameters._callback$p$0) + } + }; + $h.ComposeRecipient.prototype.getAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + var parameters = $h.CommonParameters.parse(args,true); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,this._propertyName$p$0 + ".getAsync"); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(15,{recipientField: this._type$p$0},$h.ComposeRecipient._getAsyncFormatter$p,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeRecipient.prototype.setAsync = function(recipients) + { + var args = []; + for(var $$pai_2 = 1; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2 - 1] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._propertyName$p$0 + ".setAsync"); + this.setAddHelper(recipients,args,true) + }; + $h.ComposeRecipient.prototype.addAsync = function(recipients) + { + var args = []; + for(var $$pai_2 = 1; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2 - 1] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._propertyName$p$0 + ".addAsync"); + this.setAddHelper(recipients,args,false) + }; + $h.ComposeRecipient.RecipientField = function(){}; + $h.ComposeRecipient.RecipientField.prototype = { + to: 0, + cc: 1, + bcc: 2, + requiredAttendees: 0, + optionalAttendees: 1 + }; + $h.ComposeRecipient.RecipientField["registerEnum"]("$h.ComposeRecipient.RecipientField",false); + $h.ComposeLocation = function(){}; + $h.ComposeLocation.prototype.getAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"location.getAsync"); + var parameters = $h.CommonParameters.parse(args,true); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(26,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeLocation.prototype.setAsync = function(location) + { + var args = []; + for(var $$pai_3 = 1; $$pai_3 < arguments["length"]; ++$$pai_3) + args[$$pai_3 - 1] = arguments[$$pai_3]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"location.setAsync"); + var parameters = $h.CommonParameters.parse(args,false); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(location.length,0,255,"location"); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(27,{location: location},null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeSubject = function(){}; + $h.ComposeSubject.prototype.getAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + var parameters = $h.CommonParameters.parse(args,true); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"subject.getAsync"); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(18,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeSubject.prototype.setAsync = function(data) + { + var args = []; + for(var $$pai_3 = 1; $$pai_3 < arguments["length"]; ++$$pai_3) + args[$$pai_3 - 1] = arguments[$$pai_3]; + var parameters = $h.CommonParameters.parse(args,false); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"subject.setAsync"); + if(!String["isInstanceOfType"](data)) + throw Error.argument("data"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,255,"data"); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(17,{subject: data},null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeTime = function(type) + { + this.$$d__ticksToDateFormatter$p$0 = Function.createDelegate(this,this._ticksToDateFormatter$p$0); + this._timeType$p$0 = type + }; + $h.ComposeTime.prototype = { + _timeType$p$0: 0, + _ticksToDateFormatter$p$0: function(rawInput) + { + var ticks = rawInput; + return new Date(ticks) + }, + _getPropertyName$p$0: function() + { + return this._timeType$p$0 === 1 ? "start" : "end" + } + }; + $h.ComposeTime.prototype.getAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,this._getPropertyName$p$0() + ".getAsync"); + var parameters = $h.CommonParameters.parse(args,true); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(24,{TimeProperty: this._timeType$p$0},this.$$d__ticksToDateFormatter$p$0,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeTime.prototype.setAsync = function(dateTime) + { + var args = []; + for(var $$pai_3 = 1; $$pai_3 < arguments["length"]; ++$$pai_3) + args[$$pai_3 - 1] = arguments[$$pai_3]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._getPropertyName$p$0() + ".setAsync"); + if(!Date["isInstanceOfType"](dateTime)) + throw Error.argumentType("dateTime",Object["getType"](dateTime),Date); + if(window["isNaN"](dateTime["getTime"]())) + throw Error.argument("dateTime"); + if(dateTime["getTime"]() < -864e13 || dateTime["getTime"]() > 864e13) + throw Error.argumentOutOfRange("dateTime"); + var parameters = $h.CommonParameters.parse(args,false); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(25,{ + TimeProperty: this._timeType$p$0, + time: dateTime["getTime"]() + },null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeTime.TimeType = function(){}; + $h.ComposeTime.TimeType.prototype = { + start: 1, + end: 2 + }; + $h.ComposeTime.TimeType["registerEnum"]("$h.ComposeTime.TimeType",false); + $h.Contact = function(data) + { + this.$$d__getContactString$p$0 = Function.createDelegate(this,this._getContactString$p$0); + this.$$d__getAddresses$p$0 = Function.createDelegate(this,this._getAddresses$p$0); + this.$$d__getUrls$p$0 = Function.createDelegate(this,this._getUrls$p$0); + this.$$d__getEmailAddresses$p$0 = Function.createDelegate(this,this._getEmailAddresses$p$0); + this.$$d__getPhoneNumbers$p$0 = Function.createDelegate(this,this._getPhoneNumbers$p$0); + this.$$d__getBusinessName$p$0 = Function.createDelegate(this,this._getBusinessName$p$0); + this.$$d__getPersonName$p$0 = Function.createDelegate(this,this._getPersonName$p$0); + this._data$p$0 = data; + $h.InitialData._defineReadOnlyProperty$i(this,"personName",this.$$d__getPersonName$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"businessName",this.$$d__getBusinessName$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"contactString",this.$$d__getContactString$p$0) + }; + $h.Contact.prototype = { + _data$p$0: null, + _phoneNumbers$p$0: null, + _getPersonName$p$0: function() + { + return this._data$p$0["PersonName"] + }, + _getBusinessName$p$0: function() + { + return this._data$p$0["BusinessName"] + }, + _getAddresses$p$0: function() + { + return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses") + }, + _getEmailAddresses$p$0: function() + { + return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses") + }, + _getUrls$p$0: function() + { + return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls") + }, + _getPhoneNumbers$p$0: function() + { + if(!this._phoneNumbers$p$0) + { + var $$t_1 = this; + this._phoneNumbers$p$0 = $h.Entities._getExtractedObjects$i($h.PhoneNumber,this._data$p$0,"PhoneNumbers",function(data) + { + return new $h.PhoneNumber(data) + }) + } + return this._phoneNumbers$p$0 + }, + _getContactString$p$0: function() + { + return this._data$p$0["ContactString"] + } + }; + $h.CustomProperties = function(data) + { + if($h.ScriptHelpers.isNullOrUndefined(data)) + throw Error.argumentNull("data"); + if(Array["isInstanceOfType"](data)) + { + var customPropertiesArray = data; + if(customPropertiesArray["length"] > 0) + this._data$p$0 = customPropertiesArray[0]; + else + throw Error.argument("data"); + } + else + this._data$p$0 = data + }; + $h.CustomProperties.prototype = {_data$p$0: null}; + $h.CustomProperties.prototype.get = function(name) + { + var value = this._data$p$0[name]; + if(typeof value === "string") + { + var valueString = value; + if(valueString.length > 6 && valueString.startsWith("Date(") && valueString.endsWith(")")) + { + var ticksString = valueString.substring(5,valueString.length - 1); + var ticks = window["parseInt"](ticksString); + if(!window["isNaN"](ticks)) + { + var dateTimeValue = new Date(ticks); + if(dateTimeValue) + value = dateTimeValue + } + } + } + return value + }; + $h.CustomProperties.prototype.set = function(name, value) + { + if(window["OSF"]["OUtil"]["isDate"](value)) + value = "Date(" + value["getTime"]() + ")"; + this._data$p$0[name] = value + }; + $h.CustomProperties.prototype.remove = function(name) + { + delete this._data$p$0[name] + }; + $h.CustomProperties.prototype.saveAsync = function() + { + var args = []; + for(var $$pai_4 = 0; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4] = arguments[$$pai_4]; + var MaxCustomPropertiesLength = 2500; + if(window["JSON"]["stringify"](this._data$p$0).length > MaxCustomPropertiesLength) + throw Error.argument(); + var parameters = $h.CommonParameters.parse(args,false,true); + var saveCustomProperties = new $h.SaveDictionaryRequest(parameters._callback$p$0,parameters._asyncContext$p$0); + saveCustomProperties._sendRequest$i$0(4,"SaveCustomProperties",{customProperties: this._data$p$0}) + }; + $h.Diagnostics = function(data, appName) + { + this.$$d__getOwaView$p$0 = Function.createDelegate(this,this._getOwaView$p$0); + this.$$d__getHostVersion$p$0 = Function.createDelegate(this,this._getHostVersion$p$0); + this.$$d__getHostName$p$0 = Function.createDelegate(this,this._getHostName$p$0); + this._data$p$0 = data; + this._appName$p$0 = appName; + $h.InitialData._defineReadOnlyProperty$i(this,"hostName",this.$$d__getHostName$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"hostVersion",this.$$d__getHostVersion$p$0); + if(64 === this._appName$p$0) + $h.InitialData._defineReadOnlyProperty$i(this,"OWAView",this.$$d__getOwaView$p$0) + }; + $h.Diagnostics.prototype = { + _data$p$0: null, + _appName$p$0: 0, + _getHostName$p$0: function() + { + switch(this._appName$p$0) + { + case 8: + return"Outlook"; + case 64: + return"OutlookWebApp"; + case 65536: + return"OutlookIOS"; + case 4194304: + return"OutlookAndroid"; + default: + return null + } + }, + _getHostVersion$p$0: function() + { + return this._data$p$0.get__hostVersion$i$0() + }, + _getOwaView$p$0: function() + { + return this._data$p$0.get__owaView$i$0() + } + }; + $h.EmailAddressDetails = function(data) + { + this.$$d__getRecipientType$p$0 = Function.createDelegate(this,this._getRecipientType$p$0); + this.$$d__getAppointmentResponse$p$0 = Function.createDelegate(this,this._getAppointmentResponse$p$0); + this.$$d__getDisplayName$p$0 = Function.createDelegate(this,this._getDisplayName$p$0); + this.$$d__getEmailAddress$p$0 = Function.createDelegate(this,this._getEmailAddress$p$0); + this._data$p$0 = data; + $h.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0); + if($h.ScriptHelpers.dictionaryContainsKey(data,"appointmentResponse")) + $h.InitialData._defineReadOnlyProperty$i(this,"appointmentResponse",this.$$d__getAppointmentResponse$p$0); + if($h.ScriptHelpers.dictionaryContainsKey(data,"recipientType")) + $h.InitialData._defineReadOnlyProperty$i(this,"recipientType",this.$$d__getRecipientType$p$0) + }; + $h.EmailAddressDetails._createFromEmailUserDictionary$i = function(data) + { + var emailAddressDetailsDictionary = {}; + var displayName = data["Name"]; + var emailAddress = data["UserId"]; + emailAddressDetailsDictionary["name"] = displayName || $h.EmailAddressDetails._emptyString$p; + emailAddressDetailsDictionary["address"] = emailAddress || $h.EmailAddressDetails._emptyString$p; + return new $h.EmailAddressDetails(emailAddressDetailsDictionary) + }; + $h.EmailAddressDetails.prototype = { + _data$p$0: null, + _getEmailAddress$p$0: function() + { + return this._data$p$0["address"] + }, + _getDisplayName$p$0: function() + { + return this._data$p$0["name"] + }, + _getAppointmentResponse$p$0: function() + { + var response = this._data$p$0["appointmentResponse"]; + return response < $h.EmailAddressDetails._responseTypeMap$p["length"] ? $h.EmailAddressDetails._responseTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["None"] + }, + _getRecipientType$p$0: function() + { + var response = this._data$p$0["recipientType"]; + return response < $h.EmailAddressDetails._recipientTypeMap$p["length"] ? $h.EmailAddressDetails._recipientTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["Other"] + } + }; + $h.EmailAddressDetails.prototype.toJSON = function() + { + var result = {}; + result["emailAddress"] = this._getEmailAddress$p$0(); + result["displayName"] = this._getDisplayName$p$0(); + if($h.ScriptHelpers.dictionaryContainsKey(this._data$p$0,"appointmentResponse")) + result["appointmentResponse"] = this._getAppointmentResponse$p$0(); + if($h.ScriptHelpers.dictionaryContainsKey(this._data$p$0,"recipientType")) + result["recipientType"] = this._getRecipientType$p$0(); + return result + }; + $h.Entities = function(data, filteredEntitiesData, timeSent, permissionLevel) + { + this.$$d__createMeetingSuggestion$p$0 = Function.createDelegate(this,this._createMeetingSuggestion$p$0); + this.$$d__getParcelDeliveries$p$0 = Function.createDelegate(this,this._getParcelDeliveries$p$0); + this.$$d__getFlightReservations$p$0 = Function.createDelegate(this,this._getFlightReservations$p$0); + this.$$d__getContacts$p$0 = Function.createDelegate(this,this._getContacts$p$0); + this.$$d__getPhoneNumbers$p$0 = Function.createDelegate(this,this._getPhoneNumbers$p$0); + this.$$d__getUrls$p$0 = Function.createDelegate(this,this._getUrls$p$0); + this.$$d__getEmailAddresses$p$0 = Function.createDelegate(this,this._getEmailAddresses$p$0); + this.$$d__getMeetingSuggestions$p$0 = Function.createDelegate(this,this._getMeetingSuggestions$p$0); + this.$$d__getTaskSuggestions$p$0 = Function.createDelegate(this,this._getTaskSuggestions$p$0); + this.$$d__getAddresses$p$0 = Function.createDelegate(this,this._getAddresses$p$0); + this._data$p$0 = data || {}; + this._filteredData$p$0 = filteredEntitiesData || {}; + this._dateTimeSent$p$0 = timeSent; + $h.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"taskSuggestions",this.$$d__getTaskSuggestions$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"meetingSuggestions",this.$$d__getMeetingSuggestions$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"contacts",this.$$d__getContacts$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"flightReservations",this.$$d__getFlightReservations$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"parcelDeliveries",this.$$d__getParcelDeliveries$p$0); + this._permissionLevel$p$0 = permissionLevel + }; + $h.Entities._getExtractedObjects$i = function(T, data, name, creator, removeDuplicates, stringPropertyName) + { + var results = null; + var extractedObjects = data[name]; + if(!extractedObjects) + return new Array(0); + if(removeDuplicates) + extractedObjects = $h.Entities._removeDuplicate$p(Object,extractedObjects,$h.Entities._entityDictionaryEquals$p,stringPropertyName); + results = new Array(extractedObjects["length"]); + var count = 0; + for(var $$arr_9 = extractedObjects, $$len_A = $$arr_9.length, $$idx_B = 0; $$idx_B < $$len_A; ++$$idx_B) + { + var extractedObject = $$arr_9[$$idx_B]; + if(name === "MeetingSuggestions") + extractedObject["IsLegacyEntityExtraction"] = "IsLegacyEntityExtraction" in data ? data["IsLegacyEntityExtraction"] : true; + if(creator) + results[count++] = creator(extractedObject); + else + results[count++] = extractedObject + } + return results + }; + $h.Entities._getExtractedStringProperty$i = function(data, name, removeDuplicate) + { + var extractedProperties = data[name]; + if(!extractedProperties) + return new Array(0); + if(removeDuplicate) + extractedProperties = $h.Entities._removeDuplicate$p(String,extractedProperties,$h.Entities._stringEquals$p,null); + return extractedProperties + }; + $h.Entities._createContact$p = function(data) + { + return new $h.Contact(data) + }; + $h.Entities._createTaskSuggestion$p = function(data) + { + return new $h.TaskSuggestion(data) + }; + $h.Entities._createPhoneNumber$p = function(data) + { + return new $h.PhoneNumber(data) + }; + $h.Entities._entityDictionaryEquals$p = function(dictionary1, dictionary2, entityPropertyIdentifier) + { + if(dictionary1 === dictionary2) + return true; + if(!dictionary1 || !dictionary2) + return false; + if(dictionary1[entityPropertyIdentifier] === dictionary2[entityPropertyIdentifier]) + return true; + return false + }; + $h.Entities._stringEquals$p = function(string1, string2, entityProperty) + { + return string1 === string2 + }; + $h.Entities._removeDuplicate$p = function(T, array, entityEquals, entityPropertyIdentifier) + { + for(var matchIndex1 = array["length"] - 1; matchIndex1 >= 0; matchIndex1--) + { + var removeMatch = false; + for(var matchIndex2 = matchIndex1 - 1; matchIndex2 >= 0; matchIndex2--) + if(entityEquals(array[matchIndex1],array[matchIndex2],entityPropertyIdentifier)) + { + removeMatch = true; + break + } + if(removeMatch) + Array.removeAt(array,matchIndex1) + } + return array + }; + $h.Entities.prototype = { + _dateTimeSent$p$0: null, + _data$p$0: null, + _filteredData$p$0: null, + _filteredEntitiesCache$p$0: null, + _permissionLevel$p$0: 0, + _taskSuggestions$p$0: null, + _meetingSuggestions$p$0: null, + _phoneNumbers$p$0: null, + _contacts$p$0: null, + _addresses$p$0: null, + _emailAddresses$p$0: null, + _urls$p$0: null, + _flightReservations$p$0: null, + _parcelDeliveries$p$0: null, + _getByType$i$0: function(entityType) + { + if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["MeetingSuggestion"]) + return this._getMeetingSuggestions$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["TaskSuggestion"]) + return this._getTaskSuggestions$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Address"]) + return this._getAddresses$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["PhoneNumber"]) + return this._getPhoneNumbers$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["EmailAddress"]) + return this._getEmailAddresses$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Url"]) + return this._getUrls$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Contact"]) + return this._getContacts$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["FlightReservations"]) + return this._getFlightReservations$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["ParcelDeliveries"]) + return this._getParcelDeliveries$p$0(); + return null + }, + _getFilteredEntitiesByName$i$0: function(name) + { + if(!this._filteredEntitiesCache$p$0) + this._filteredEntitiesCache$p$0 = {}; + if(!$h.ScriptHelpers.dictionaryContainsKey(this._filteredEntitiesCache$p$0,name)) + { + var found = false; + for(var i = 0; i < $h.Entities._allEntityKeys$p["length"]; i++) + { + var entityTypeKey = $h.Entities._allEntityKeys$p[i]; + var perEntityTypeDictionary = this._filteredData$p$0[entityTypeKey]; + if(!perEntityTypeDictionary) + continue; + if($h.ScriptHelpers.dictionaryContainsKey(perEntityTypeDictionary,name)) + { + switch(entityTypeKey) + { + case"EmailAddresses": + case"Urls": + this._filteredEntitiesCache$p$0[name] = $h.Entities._getExtractedStringProperty$i(perEntityTypeDictionary,name); + break; + case"Addresses": + this._filteredEntitiesCache$p$0[name] = $h.Entities._getExtractedStringProperty$i(perEntityTypeDictionary,name,true); + break; + case"PhoneNumbers": + this._filteredEntitiesCache$p$0[name] = $h.Entities._getExtractedObjects$i($h.PhoneNumber,perEntityTypeDictionary,name,$h.Entities._createPhoneNumber$p,false,null); + break; + case"TaskSuggestions": + this._filteredEntitiesCache$p$0[name] = $h.Entities._getExtractedObjects$i($h.TaskSuggestion,perEntityTypeDictionary,name,$h.Entities._createTaskSuggestion$p,true,"TaskString"); + break; + case"MeetingSuggestions": + this._filteredEntitiesCache$p$0[name] = $h.Entities._getExtractedObjects$i($h.MeetingSuggestion,perEntityTypeDictionary,name,this.$$d__createMeetingSuggestion$p$0,true,"MeetingString"); + break; + case"Contacts": + this._filteredEntitiesCache$p$0[name] = $h.Entities._getExtractedObjects$i($h.Contact,perEntityTypeDictionary,name,$h.Entities._createContact$p,true,"ContactString"); + break + } + found = true; + break + } + } + if(!found) + this._filteredEntitiesCache$p$0[name] = null + } + return this._filteredEntitiesCache$p$0[name] + }, + _createMeetingSuggestion$p$0: function(data) + { + return new $h.MeetingSuggestion(data,this._dateTimeSent$p$0) + }, + _getAddresses$p$0: function() + { + if(!this._addresses$p$0) + this._addresses$p$0 = $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses",true); + return this._addresses$p$0 + }, + _getEmailAddresses$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); + if(!this._emailAddresses$p$0) + this._emailAddresses$p$0 = $h.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses",false); + return this._emailAddresses$p$0 + }, + _getUrls$p$0: function() + { + if(!this._urls$p$0) + this._urls$p$0 = $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls",false); + return this._urls$p$0 + }, + _getPhoneNumbers$p$0: function() + { + if(!this._phoneNumbers$p$0) + this._phoneNumbers$p$0 = $h.Entities._getExtractedObjects$i($h.PhoneNumber,this._data$p$0,"PhoneNumbers",$h.Entities._createPhoneNumber$p); + return this._phoneNumbers$p$0 + }, + _getTaskSuggestions$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); + if(!this._taskSuggestions$p$0) + this._taskSuggestions$p$0 = $h.Entities._getExtractedObjects$i($h.TaskSuggestion,this._data$p$0,"TaskSuggestions",$h.Entities._createTaskSuggestion$p,true,"TaskString"); + return this._taskSuggestions$p$0 + }, + _getMeetingSuggestions$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); + if(!this._meetingSuggestions$p$0) + this._meetingSuggestions$p$0 = $h.Entities._getExtractedObjects$i($h.MeetingSuggestion,this._data$p$0,"MeetingSuggestions",this.$$d__createMeetingSuggestion$p$0,true,"MeetingString"); + return this._meetingSuggestions$p$0 + }, + _getContacts$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); + if(!this._contacts$p$0) + this._contacts$p$0 = $h.Entities._getExtractedObjects$i($h.Contact,this._data$p$0,"Contacts",$h.Entities._createContact$p,true,"ContactString"); + return this._contacts$p$0 + }, + _getParcelDeliveries$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); + if(!this._parcelDeliveries$p$0) + this._parcelDeliveries$p$0 = $h.Entities._getExtractedObjects$i(Object,this._data$p$0,"ParcelDeliveries",null); + return this._parcelDeliveries$p$0 + }, + _getFlightReservations$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); + if(!this._flightReservations$p$0) + this._flightReservations$p$0 = $h.Entities._getExtractedObjects$i(Object,this._data$p$0,"FlightReservations",null); + return this._flightReservations$p$0 + } + }; + $h.ReplyConstants = function(){}; + $h.AsyncConstants = function(){}; + window["Office"]["cast"]["item"] = Office.cast.item = function(){}; + window["Office"]["cast"]["item"]["toItemRead"] = function(item) + { + if($h.Item["isInstanceOfType"](item)) + return item; + throw Error.argumentType(); + }; + window["Office"]["cast"]["item"]["toItemCompose"] = function(item) + { + if($h.ComposeItem["isInstanceOfType"](item)) + return item; + throw Error.argumentType(); + }; + window["Office"]["cast"]["item"]["toMessage"] = function(item) + { + return window["Office"]["cast"]["item"]["toMessageRead"](item) + }; + window["Office"]["cast"]["item"]["toMessageRead"] = function(item) + { + if($h.Message["isInstanceOfType"](item)) + return item; + throw Error.argumentType(); + }; + window["Office"]["cast"]["item"]["toMessageCompose"] = function(item) + { + if($h.MessageCompose["isInstanceOfType"](item)) + return item; + throw Error.argumentType(); + }; + window["Office"]["cast"]["item"]["toMeetingRequest"] = function(item) + { + if($h.MeetingRequest["isInstanceOfType"](item)) + return item; + throw Error.argumentType(); + }; + window["Office"]["cast"]["item"]["toAppointment"] = function(item) + { + return window["Office"]["cast"]["item"]["toAppointmentRead"](item) + }; + window["Office"]["cast"]["item"]["toAppointmentRead"] = function(item) + { + if($h.Appointment["isInstanceOfType"](item)) + return item; + throw Error.argumentType(); + }; + window["Office"]["cast"]["item"]["toAppointmentCompose"] = function(item) + { + if($h.AppointmentCompose["isInstanceOfType"](item)) + return item; + throw Error.argumentType(); + }; + $h.Item = function(data) + { + this.$$d__getBody$p$1 = Function.createDelegate(this,this._getBody$p$1); + this.$$d__getAttachments$p$1 = Function.createDelegate(this,this._getAttachments$p$1); + this.$$d__getItemClass$p$1 = Function.createDelegate(this,this._getItemClass$p$1); + this.$$d__getItemId$p$1 = Function.createDelegate(this,this._getItemId$p$1); + this.$$d__getDateTimeModified$p$1 = Function.createDelegate(this,this._getDateTimeModified$p$1); + this.$$d__getDateTimeCreated$p$1 = Function.createDelegate(this,this._getDateTimeCreated$p$1); + $h.Item["initializeBase"](this,[data]); + $h.InitialData._defineReadOnlyProperty$i(this,"dateTimeCreated",this.$$d__getDateTimeCreated$p$1); + $h.InitialData._defineReadOnlyProperty$i(this,"dateTimeModified",this.$$d__getDateTimeModified$p$1); + $h.InitialData._defineReadOnlyProperty$i(this,"itemId",this.$$d__getItemId$p$1); + $h.InitialData._defineReadOnlyProperty$i(this,"itemClass",this.$$d__getItemClass$p$1); + $h.InitialData._defineReadOnlyProperty$i(this,"attachments",this.$$d__getAttachments$p$1); + $h.InitialData._defineReadOnlyProperty$i(this,"body",this.$$d__getBody$p$1) + }; + $h.Item.prototype = { + _body$p$1: null, + _getItemId$p$1: function() + { + return this._data$p$0.get__itemId$i$0() + }, + _getItemClass$p$1: function() + { + return this._data$p$0.get__itemClass$i$0() + }, + _getDateTimeCreated$p$1: function() + { + return this._data$p$0.get__dateTimeCreated$i$0() + }, + _getDateTimeModified$p$1: function() + { + return this._data$p$0.get__dateTimeModified$i$0() + }, + _getAttachments$p$1: function() + { + return this._data$p$0.get__attachments$i$0() + }, + _getBody$p$1: function() + { + if(!this._body$p$1) + this._body$p$1 = new $h.Body; + return this._body$p$1 + }, + _validateDestinationFolder$p$1: function(destinationFolder) + { + if(destinationFolder !== window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["Folder"]["Inbox"] && destinationFolder !== window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["Folder"]["Junk"] && destinationFolder !== window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["Folder"]["DeletedItems"]) + throw Error.argument("destinationFolder"); + } + }; + $h.Item.prototype.move = function(destinationFolder) + { + var args = []; + for(var $$pai_4 = 1; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4 - 1] = arguments[$$pai_4]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(3,"item.move"); + this._validateDestinationFolder$p$1(destinationFolder); + var commonParameters = $h.CommonParameters.parse(args,false); + var dataToHost = {destinationFolder: destinationFolder}; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(101,dataToHost,null,null,commonParameters._callback$p$0) + }; + $h.ItemBase = function(data) + { + this.$$d__createCustomProperties$i$0 = Function.createDelegate(this,this._createCustomProperties$i$0); + this.$$d__getNotificationMessages$p$0 = Function.createDelegate(this,this._getNotificationMessages$p$0); + this.$$d_getItemType = Function.createDelegate(this,this.getItemType); + this._data$p$0 = data; + $h.InitialData._defineReadOnlyProperty$i(this,"itemType",this.$$d_getItemType); + $h.InitialData._defineReadOnlyProperty$i(this,"notificationMessages",this.$$d__getNotificationMessages$p$0) + }; + $h.ItemBase.prototype = { + _data$p$0: null, + _notificationMessages$p$0: null, + get_data: function() + { + return this._data$p$0 + }, + _createCustomProperties$i$0: function(data) + { + return new $h.CustomProperties(data) + }, + _getNotificationMessages$p$0: function() + { + if(!this._notificationMessages$p$0) + this._notificationMessages$p$0 = new $h.NotificationMessages; + return this._notificationMessages$p$0 + } + }; + $h.ItemBase.prototype.loadCustomPropertiesAsync = function() + { + var args = []; + for(var $$pai_3 = 0; $$pai_3 < arguments["length"]; ++$$pai_3) + args[$$pai_3] = arguments[$$pai_3]; + var parameters = $h.CommonParameters.parse(args,true,true); + var loadCustomProperties = new $h._loadDictionaryRequest(this.$$d__createCustomProperties$i$0,"customProperties",parameters._callback$p$0,parameters._asyncContext$p$0); + loadCustomProperties._sendRequest$i$0(3,"LoadCustomProperties",{}) + }; + $h.ItemBase.prototype.getInitializationContextAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"item.getInitializationContextAsync"); + var parameters = $h.CommonParameters.parse(args,true); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(99,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.MeetingRequest = function(data) + { + this.$$d__getRequiredAttendees$p$3 = Function.createDelegate(this,this._getRequiredAttendees$p$3); + this.$$d__getOptionalAttendees$p$3 = Function.createDelegate(this,this._getOptionalAttendees$p$3); + this.$$d__getLocation$p$3 = Function.createDelegate(this,this._getLocation$p$3); + this.$$d__getEnd$p$3 = Function.createDelegate(this,this._getEnd$p$3); + this.$$d__getStart$p$3 = Function.createDelegate(this,this._getStart$p$3); + $h.MeetingRequest["initializeBase"](this,[data]); + $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$3); + $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$3); + $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$3); + $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$3); + $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$3) + }; + $h.MeetingRequest.prototype = { + _getStart$p$3: function() + { + return this._data$p$0.get__start$i$0() + }, + _getEnd$p$3: function() + { + return this._data$p$0.get__end$i$0() + }, + _getLocation$p$3: function() + { + return this._data$p$0.get__location$i$0() + }, + _getOptionalAttendees$p$3: function() + { + return this._data$p$0.get__cc$i$0() + }, + _getRequiredAttendees$p$3: function() + { + return this._data$p$0.get__to$i$0() + } + }; + $h.MeetingSuggestion = function(data, dateTimeSent) + { + this.$$d__getEndTime$p$0 = Function.createDelegate(this,this._getEndTime$p$0); + this.$$d__getStartTime$p$0 = Function.createDelegate(this,this._getStartTime$p$0); + this.$$d__getSubject$p$0 = Function.createDelegate(this,this._getSubject$p$0); + this.$$d__getLocation$p$0 = Function.createDelegate(this,this._getLocation$p$0); + this.$$d__getAttendees$p$0 = Function.createDelegate(this,this._getAttendees$p$0); + this.$$d__getMeetingString$p$0 = Function.createDelegate(this,this._getMeetingString$p$0); + this._data$p$0 = data; + this._dateTimeSent$p$0 = dateTimeSent; + $h.InitialData._defineReadOnlyProperty$i(this,"meetingString",this.$$d__getMeetingString$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"attendees",this.$$d__getAttendees$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStartTime$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEndTime$p$0) + }; + $h.MeetingSuggestion.prototype = { + _dateTimeSent$p$0: null, + _data$p$0: null, + _attendees$p$0: null, + _getMeetingString$p$0: function() + { + return this._data$p$0["MeetingString"] + }, + _getLocation$p$0: function() + { + return this._data$p$0["Location"] + }, + _getSubject$p$0: function() + { + return this._data$p$0["Subject"] + }, + _isUTC$p$0: function() + { + if(!("IsLegacyEntityExtraction" in this._data$p$0)) + return true; + return this._data$p$0["IsLegacyEntityExtraction"] + }, + _getStartTime$p$0: function() + { + var time = this._createDateTimeFromParameter$p$0("StartTime"); + var resolvedTime = $h.MeetingSuggestionTimeDecoder.resolve(time,this._dateTimeSent$p$0,this._isUTC$p$0()); + if(resolvedTime["getTime"]() !== time["getTime"]()) + return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToUtcClientTime"](window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._dateToDictionary$i$0(resolvedTime)); + return time + }, + _getEndTime$p$0: function() + { + var time = this._createDateTimeFromParameter$p$0("EndTime"); + var resolvedTime = $h.MeetingSuggestionTimeDecoder.resolve(time,this._dateTimeSent$p$0,this._isUTC$p$0()); + if(resolvedTime["getTime"]() !== time["getTime"]()) + return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToUtcClientTime"](window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._dateToDictionary$i$0(resolvedTime)); + return time + }, + _createDateTimeFromParameter$p$0: function(keyName) + { + var dateTimeString = this._data$p$0[keyName]; + if(!dateTimeString) + return null; + return new Date(dateTimeString) + }, + _getAttendees$p$0: function() + { + if(!this._attendees$p$0) + { + var $$t_1 = this; + this._attendees$p$0 = $h.Entities._getExtractedObjects$i($h.EmailAddressDetails,this._data$p$0,"Attendees",function(data) + { + return $h.EmailAddressDetails._createFromEmailUserDictionary$i(data) + }) + } + return this._attendees$p$0 + } + }; + $h.MeetingSuggestionTimeDecoder = function(){}; + $h.MeetingSuggestionTimeDecoder.resolve = function(inTime, sentTime, isUTC) + { + if(!sentTime) + return inTime; + try + { + var tod; + var outDate; + var extractedDate; + var sentDate = new Date(sentTime["getFullYear"](),sentTime["getMonth"](),sentTime["getDate"](),0,0,0,0); + var $$t_8, + $$t_9, + $$t_A; + if(!($$t_A = $h.MeetingSuggestionTimeDecoder._decode$p(inTime,isUTC,$$t_8 = {val: extractedDate},$$t_9 = {val: tod}),extractedDate = $$t_8["val"],tod = $$t_9["val"],$$t_A)) + return inTime; + else + { + if($h._preciseDate["isInstanceOfType"](extractedDate)) + outDate = $h.MeetingSuggestionTimeDecoder._resolvePreciseDate$p(sentDate,extractedDate); + else if($h._relativeDate["isInstanceOfType"](extractedDate)) + outDate = $h.MeetingSuggestionTimeDecoder._resolveRelativeDate$p(sentDate,extractedDate); + else + outDate = sentDate; + if(window["isNaN"](outDate["getTime"]())) + return sentTime; + outDate["setMilliseconds"](outDate["getMilliseconds"]() + tod); + return outDate + } + } + catch($$e_7) + { + return sentTime + } + }; + $h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i = function(value) + { + return null === value || value === undefined + }; + $h.MeetingSuggestionTimeDecoder._resolvePreciseDate$p = function(sentDate, precise) + { + var year = precise._year$i$1; + var month = !precise._month$i$1 ? sentDate["getMonth"]() : precise._month$i$1 - 1; + var day = precise._day$i$1; + if(!day) + return sentDate; + var candidate; + if($h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i(year)) + { + candidate = new Date(sentDate["getFullYear"](),month,day); + if(candidate["getTime"]() < sentDate["getTime"]()) + candidate = new Date(sentDate["getFullYear"]() + 1,month,day) + } + else + candidate = new Date(year < 50 ? 2e3 + year : 1900 + year,month,day); + if(candidate["getMonth"]() !== month) + return sentDate; + return candidate + }; + $h.MeetingSuggestionTimeDecoder._resolveRelativeDate$p = function(sentDate, relative) + { + var date; + switch(relative._unit$i$1) + { + case 0: + date = new Date(sentDate["getFullYear"](),sentDate["getMonth"](),sentDate["getDate"]()); + date["setDate"](date["getDate"]() + relative._offset$i$1); + return date; + case 5: + return $h.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p(sentDate,relative._offset$i$1,relative._tag$i$1); + case 2: + var days = 1; + switch(relative._modifier$i$1) + { + case 1: + break; + case 2: + days = 16; + break; + default: + if(!relative._offset$i$1) + days = sentDate["getDate"](); + break + } + date = new Date(sentDate["getFullYear"](),sentDate["getMonth"](),days); + date["setMonth"](date["getMonth"]() + relative._offset$i$1); + if(date["getTime"]() < sentDate["getTime"]()) + date["setDate"](date["getDate"]() + sentDate["getDate"]() - 1); + return date; + case 1: + date = new Date(sentDate["getFullYear"](),sentDate["getMonth"](),sentDate["getDate"]()); + date["setDate"](sentDate["getDate"]() + 7 * relative._offset$i$1); + if(relative._modifier$i$1 === 1 || !relative._modifier$i$1) + { + date["setDate"](date["getDate"]() + 1 - date["getDay"]()); + if(date["getTime"]() < sentDate["getTime"]()) + return sentDate; + return date + } + else if(relative._modifier$i$1 === 2) + { + date["setDate"](date["getDate"]() + 5 - date["getDay"]()); + return date + } + break; + case 4: + return $h.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p(sentDate,relative); + case 3: + if(relative._offset$i$1 > 0) + return new Date(sentDate["getFullYear"]() + relative._offset$i$1,0,1); + break; + default: + break + } + return sentDate + }; + $h.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p = function(sentDate, offset, tag) + { + if(offset > -5 && offset < 5) + { + var dayOfWeek = (tag + 6) % 7 + 1; + var days = 7 * offset + (dayOfWeek - sentDate["getDay"]()); + sentDate["setDate"](sentDate["getDate"]() + days); + return sentDate + } + else + { + var days = (tag - sentDate["getDay"]()) % 7; + if(days < 0) + days += 7; + sentDate["setDate"](sentDate["getDate"]() + days); + return sentDate + } + }; + $h.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p = function(sentDate, relative) + { + var date; + var firstDay; + var newDate; + date = sentDate; + if(relative._tag$i$1 <= 0 || relative._tag$i$1 > 12 || relative._offset$i$1 <= 0 || relative._offset$i$1 > 5) + return sentDate; + var monthOffset = (12 + relative._tag$i$1 - date["getMonth"]() - 1) % 12; + firstDay = new Date(date["getFullYear"](),date["getMonth"]() + monthOffset,1); + if(relative._modifier$i$1 === 1) + if(relative._offset$i$1 === 1 && firstDay["getDay"]() !== 6 && firstDay["getDay"]()) + return firstDay; + else + { + newDate = new Date(firstDay["getFullYear"](),firstDay["getMonth"](),firstDay["getDate"]()); + newDate["setDate"](newDate["getDate"]() + (7 + (1 - firstDay["getDay"]())) % 7); + if(firstDay["getDay"]() !== 6 && firstDay["getDay"]() && firstDay["getDay"]() !== 1) + newDate["setDate"](newDate["getDate"]() - 7); + newDate["setDate"](newDate["getDate"]() + 7 * (relative._offset$i$1 - 1)); + if(newDate["getMonth"]() + 1 !== relative._tag$i$1) + return sentDate; + return newDate + } + else + { + newDate = new Date(firstDay["getFullYear"](),firstDay["getMonth"](),$h.MeetingSuggestionTimeDecoder._daysInMonth$p(firstDay["getMonth"](),firstDay["getFullYear"]())); + var offset = 1 - newDate["getDay"](); + if(offset > 0) + offset = offset - 7; + newDate["setDate"](newDate["getDate"]() + offset); + newDate["setDate"](newDate["getDate"]() + 7 * (1 - relative._offset$i$1)); + if(newDate["getMonth"]() + 1 !== relative._tag$i$1) + if(firstDay["getDay"]() !== 6 && firstDay["getDay"]()) + return firstDay; + else + return sentDate; + else + return newDate + } + }; + $h.MeetingSuggestionTimeDecoder._decode$p = function(inDate, isUTC, date, time) + { + var DateValueMask = 32767; + date["val"] = null; + time["val"] = 0; + if(!inDate) + return false; + if(isUTC) + time["val"] = $h.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p(inDate); + else + time["val"] = $h.MeetingSuggestionTimeDecoder._getTimeOfDayInMilliseconds$p(inDate); + var inDateAtMidnight = inDate["getTime"]() - time["val"]; + var value = (inDateAtMidnight - $h.MeetingSuggestionTimeDecoder._baseDate$p["getTime"]()) / 864e5; + if(value < 0) + return false; + else if(value >= 262144) + return false; + else + { + var type = value >> 15; + value = value & DateValueMask; + switch(type) + { + case 0: + return $h.MeetingSuggestionTimeDecoder._decodePreciseDate$p(value,date); + case 1: + return $h.MeetingSuggestionTimeDecoder._decodeRelativeDate$p(value,date); + default: + return false + } + } + }; + $h.MeetingSuggestionTimeDecoder._decodePreciseDate$p = function(value, date) + { + var c_SubTypeMask = 7; + var c_MonthMask = 15; + var c_DayMask = 31; + var c_YearMask = 127; + var year = null; + var month = 0; + var day = 0; + date["val"] = null; + var subType = value >> 12 & c_SubTypeMask; + if((subType & 4) === 4) + { + year = value >> 5 & c_YearMask; + if((subType & 2) === 2) + { + if((subType & 1) === 1) + return false; + month = value >> 1 & c_MonthMask + } + } + else + { + if((subType & 2) === 2) + month = value >> 8 & c_MonthMask; + if((subType & 1) === 1) + day = value >> 3 & c_DayMask + } + date["val"] = new $h._preciseDate(day,month,year); + return true + }; + $h.MeetingSuggestionTimeDecoder._decodeRelativeDate$p = function(value, date) + { + var TagMask = 15; + var OffsetMask = 63; + var UnitMask = 7; + var ModifierMask = 3; + var tag = value & TagMask; + value >>= 4; + var offset = $h.MeetingSuggestionTimeDecoder._fromComplement$p(value & OffsetMask,6); + value >>= 6; + var unit = value & UnitMask; + value >>= 3; + var modifier = value & ModifierMask; + try + { + date["val"] = new $h._relativeDate(modifier,offset,unit,tag); + return true + } + catch($$e_A) + { + date["val"] = null; + return false + } + }; + $h.MeetingSuggestionTimeDecoder._fromComplement$p = function(value, n) + { + var signed = 1 << n - 1; + var mask = (1 << n) - 1; + if((value & signed) === signed) + return-((value ^ mask) + 1); + else + return value + }; + $h.MeetingSuggestionTimeDecoder._daysInMonth$p = function(month, year) + { + return 32 - new Date(year,month,32)["getDate"]() + }; + $h.MeetingSuggestionTimeDecoder._getTimeOfDayInMilliseconds$p = function(inputTime) + { + var timeOfDay = 0; + timeOfDay += inputTime["getHours"]() * 3600; + timeOfDay += inputTime["getMinutes"]() * 60; + timeOfDay += inputTime["getSeconds"](); + timeOfDay *= 1e3; + timeOfDay += inputTime["getMilliseconds"](); + return timeOfDay + }; + $h.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p = function(inputTime) + { + var timeOfDay = 0; + timeOfDay += inputTime["getUTCHours"]() * 3600; + timeOfDay += inputTime["getUTCMinutes"]() * 60; + timeOfDay += inputTime["getUTCSeconds"](); + timeOfDay *= 1e3; + timeOfDay += inputTime["getUTCMilliseconds"](); + return timeOfDay + }; + $h._extractedDate = function(){}; + $h._preciseDate = function(day, month, year) + { + $h._preciseDate["initializeBase"](this); + if(day < 0 || day > 31) + throw Error.argumentOutOfRange("day"); + if(month < 0 || month > 12) + throw Error.argumentOutOfRange("month"); + this._day$i$1 = day; + this._month$i$1 = month; + if(!$h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i(year)) + { + if(!month && day) + throw Error.argument("Invalid arguments"); + if(year < 0 || year > 2099) + throw Error.argumentOutOfRange("year"); + this._year$i$1 = year % 100 + } + else if(!this._month$i$1 && !this._day$i$1) + throw Error.argument("Invalid datetime"); + }; + $h._preciseDate.prototype = { + _day$i$1: 0, + _month$i$1: 0, + _year$i$1: null + }; + $h._relativeDate = function(modifier, offset, unit, tag) + { + $h._relativeDate["initializeBase"](this); + if(offset < -32 || offset > 31) + throw Error.argumentOutOfRange("offset"); + if(tag < 0 || tag > 15) + throw Error.argumentOutOfRange("tag"); + if(!unit && offset < 0) + throw Error.argument("unit & offset do not form a valid date"); + this._modifier$i$1 = modifier; + this._offset$i$1 = offset; + this._unit$i$1 = unit; + this._tag$i$1 = tag + }; + $h._relativeDate.prototype = { + _modifier$i$1: 0, + _offset$i$1: 0, + _unit$i$1: 0, + _tag$i$1: 0 + }; + $h.Message = function(dataDictionary) + { + this.$$d__getConversationId$p$2 = Function.createDelegate(this,this._getConversationId$p$2); + this.$$d__getInternetMessageId$p$2 = Function.createDelegate(this,this._getInternetMessageId$p$2); + this.$$d__getCc$p$2 = Function.createDelegate(this,this._getCc$p$2); + this.$$d__getTo$p$2 = Function.createDelegate(this,this._getTo$p$2); + this.$$d__getFrom$p$2 = Function.createDelegate(this,this._getFrom$p$2); + this.$$d__getSender$p$2 = Function.createDelegate(this,this._getSender$p$2); + this.$$d__getNormalizedSubject$p$2 = Function.createDelegate(this,this._getNormalizedSubject$p$2); + this.$$d__getSubject$p$2 = Function.createDelegate(this,this._getSubject$p$2); + $h.Message["initializeBase"](this,[dataDictionary]); + $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"sender",this.$$d__getSender$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"from",this.$$d__getFrom$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"to",this.$$d__getTo$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"cc",this.$$d__getCc$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"internetMessageId",this.$$d__getInternetMessageId$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"conversationId",this.$$d__getConversationId$p$2) + }; + $h.Message.prototype = { + getItemType: function() + { + return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Message"] + }, + _getSubject$p$2: function() + { + return this._data$p$0.get__subject$i$0() + }, + _getNormalizedSubject$p$2: function() + { + return this._data$p$0.get__normalizedSubject$i$0() + }, + _getSender$p$2: function() + { + return this._data$p$0.get__sender$i$0() + }, + _getFrom$p$2: function() + { + return this._data$p$0.get__from$i$0() + }, + _getTo$p$2: function() + { + return this._data$p$0.get__to$i$0() + }, + _getCc$p$2: function() + { + return this._data$p$0.get__cc$i$0() + }, + _getInternetMessageId$p$2: function() + { + return this._data$p$0.get__internetMessageId$i$0() + }, + _getConversationId$p$2: function() + { + return this._data$p$0.get__conversationId$i$0() + } + }; + $h.Message.prototype.getEntities = function() + { + return this._data$p$0._getEntities$i$0() + }; + $h.Message.prototype.getEntitiesByType = function(entityType) + { + return this._data$p$0._getEntitiesByType$i$0(entityType) + }; + $h.Message.prototype.getFilteredEntitiesByName = function(name) + { + return this._data$p$0._getFilteredEntitiesByName$i$0(name) + }; + $h.Message.prototype.getSelectedEntities = function() + { + return this._data$p$0._getSelectedEntities$i$0() + }; + $h.Message.prototype.getRegExMatches = function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches"); + return this._data$p$0._getRegExMatches$i$0() + }; + $h.Message.prototype.getRegExMatchesByName = function(name) + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName"); + return this._data$p$0._getRegExMatchesByName$i$0(name) + }; + $h.Message.prototype.getSelectedRegExMatches = function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedRegExMatches"); + return this._data$p$0._getSelectedRegExMatches$i$0() + }; + $h.Message.prototype.displayReplyForm = function(obj) + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyForm$i$0(obj) + }; + $h.Message.prototype.displayReplyAllForm = function(obj) + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyAllForm$i$0(obj) + }; + $h.MessageCompose = function(data) + { + this.$$d__getConversationId$p$2 = Function.createDelegate(this,this._getConversationId$p$2); + this.$$d__getBcc$p$2 = Function.createDelegate(this,this._getBcc$p$2); + this.$$d__getCc$p$2 = Function.createDelegate(this,this._getCc$p$2); + this.$$d__getTo$p$2 = Function.createDelegate(this,this._getTo$p$2); + $h.MessageCompose["initializeBase"](this,[data]); + $h.InitialData._defineReadOnlyProperty$i(this,"to",this.$$d__getTo$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"cc",this.$$d__getCc$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"bcc",this.$$d__getBcc$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"conversationId",this.$$d__getConversationId$p$2) + }; + $h.MessageCompose.prototype = { + _to$p$2: null, + _cc$p$2: null, + _bcc$p$2: null, + getItemType: function() + { + return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Message"] + }, + _getTo$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._to$p$2) + this._to$p$2 = new $h.ComposeRecipient(0,"to"); + return this._to$p$2 + }, + _getCc$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._cc$p$2) + this._cc$p$2 = new $h.ComposeRecipient(1,"cc"); + return this._cc$p$2 + }, + _getBcc$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._bcc$p$2) + this._bcc$p$2 = new $h.ComposeRecipient(2,"bcc"); + return this._bcc$p$2 + }, + _getConversationId$p$2: function() + { + return this._data$p$0.get__conversationId$i$0() + } + }; + $h.NotificationMessages = function(){}; + $h.NotificationMessages._mapToHostItemNotificationMessageType$p = function(dataToHost) + { + var notificationType; + var hostItemNotificationMessageType; + notificationType = dataToHost["type"]; + if(notificationType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["ProgressIndicator"]) + hostItemNotificationMessageType = 1; + else if(notificationType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["InformationalMessage"]) + hostItemNotificationMessageType = 0; + else if(notificationType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["ErrorMessage"]) + hostItemNotificationMessageType = 2; + else if(notificationType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["InsightMessage"]) + hostItemNotificationMessageType = 3; + else + throw Error.argument("type"); + dataToHost["type"] = hostItemNotificationMessageType + }; + $h.NotificationMessages._validateKey$p = function(key) + { + if(!$h.ScriptHelpers.isNonEmptyString(key)) + throw Error.argument("key"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(key.length,0,32,"key") + }; + $h.NotificationMessages._validateDictionary$p = function(dictionary) + { + if(!$h.ScriptHelpers.isNonEmptyString(dictionary["type"])) + throw Error.argument("type"); + if(dictionary["type"] === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["InformationalMessage"]) + { + if(!$h.ScriptHelpers.isNonEmptyString(dictionary["icon"])) + throw Error.argument("icon"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(dictionary["icon"].length,0,32,"icon"); + if($h.ScriptHelpers.isUndefined(dictionary["persistent"])) + throw Error.argument("persistent"); + if(!Boolean["isInstanceOfType"](dictionary["persistent"])) + throw Error.argumentType("persistent",Object["getType"](dictionary["persistent"]),Boolean); + $h.NotificationMessages._verifyActionDefinitionIsNotDefined$p(dictionary) + } + else if(dictionary["type"] === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["InsightMessage"]) + { + if(!$h.ScriptHelpers.isNonEmptyString(dictionary["icon"])) + throw Error.argument("icon"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(dictionary["icon"].length,0,32,"icon"); + if(!$h.ScriptHelpers.isUndefined(dictionary["persistent"])) + throw Error.argument("persistent"); + if(dictionary["actions"]) + $h.NotificationMessages._validateActionsDefinitionBlob$p(dictionary["actions"],dictionary) + } + else + { + if(!$h.ScriptHelpers.isUndefined(dictionary["icon"])) + throw Error.argument("icon"); + if(!$h.ScriptHelpers.isUndefined(dictionary["persistent"])) + throw Error.argument("persistent"); + $h.NotificationMessages._verifyActionDefinitionIsNotDefined$p(dictionary) + } + if(!$h.ScriptHelpers.isNonEmptyString(dictionary["message"])) + throw Error.argument("message"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(dictionary["message"].length,0,150,"message") + }; + $h.NotificationMessages._validateActionsDefinitionBlob$p = function(actionsDefinitionBlob, notificationParametersDictionary) + { + var actionsDefinition = $h.NotificationMessages._extractActionDefinitionDictionary$p(actionsDefinitionBlob); + if(!actionsDefinition) + return; + $h.NotificationMessages._validateActionsDefinitionActionType$p(actionsDefinition,notificationParametersDictionary); + $h.NotificationMessages._validateActionsDefinitionActionText$p(actionsDefinition) + }; + $h.NotificationMessages._verifyActionDefinitionIsNotDefined$p = function(notificationParametersDictionary) + { + if(!$h.ScriptHelpers.isUndefined(notificationParametersDictionary["actions"])) + throw Error.argument("actions",window["_u"]["ExtensibilityStrings"]["l_ActionsDefinitionWrongNotificationMessageError_Text"]); + }; + $h.NotificationMessages._extractActionDefinitionDictionary$p = function(actionsDefinitionBlob) + { + var actionsDefinition = null; + if(Array["isInstanceOfType"](actionsDefinitionBlob)) + { + var dicArray = actionsDefinitionBlob; + if(dicArray["length"] === 1) + actionsDefinition = dicArray[0]; + else if(dicArray["length"] > 1) + throw Error.argument("actions",window["_u"]["ExtensibilityStrings"]["l_ActionsDefinitionMultipleActionsError_Text"]); + } + else + throw Error.argument("actions",String.format(window["_u"]["ExtensibilityStrings"]["l_InvalidParameterValueError_Text"],"actions")); + return actionsDefinition + }; + $h.NotificationMessages._validateActionsDefinitionActionType$p = function(actionsDefinition, notificationParametersDictionary) + { + if(!actionsDefinition["actionType"]) + throw Error.argument("actionType",String.format(window["_u"]["ExtensibilityStrings"]["l_NullOrEmptyParameterError_Text"],"actionType")); + if("showTaskPane" !== actionsDefinition["actionType"]) + throw Error.argument("actionType",window["_u"]["ExtensibilityStrings"]["l_InvalidActionType_Text"]); + else if(!$h.ScriptHelpers.isNonEmptyString(actionsDefinition["commandId"])) + throw Error.argument("commandId",String.format(window["_u"]["ExtensibilityStrings"]["l_InvalidCommandIdError_Text"],"commandId")); + }; + $h.NotificationMessages._validateActionsDefinitionActionText$p = function(actionsDefinition) + { + if(!$h.ScriptHelpers.isNonEmptyString(actionsDefinition["actionText"])) + throw Error.argument("actionText",String.format(window["_u"]["ExtensibilityStrings"]["l_NullOrEmptyParameterError_Text"],"actionText")); + if(actionsDefinition["actionText"].length > 30) + throw Error.argument(window["_u"]["ExtensibilityStrings"]["l_ParameterValueTooLongError_Text"],String.format(window["_u"]["ExtensibilityStrings"]["l_ParameterValueTooLongError_Text"],"actionText",30)); + }; + $h.NotificationMessages.prototype.addAsync = function(key, dictionary) + { + var args = []; + for(var $$pai_5 = 2; $$pai_5 < arguments["length"]; ++$$pai_5) + args[$$pai_5 - 2] = arguments[$$pai_5]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.addAsync"); + var commonParameters = $h.CommonParameters.parse(args,false); + $h.NotificationMessages._validateKey$p(key); + $h.NotificationMessages._validateDictionary$p(dictionary); + var dataToHost = {}; + dataToHost = $h.ScriptHelpers.deepClone(dictionary); + dataToHost["key"] = key; + $h.NotificationMessages._mapToHostItemNotificationMessageType$p(dataToHost); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(33,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.NotificationMessages.prototype.getAllAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.getAllAsync"); + var commonParameters = $h.CommonParameters.parse(args,true); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(34,null,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.NotificationMessages.prototype.replaceAsync = function(key, dictionary) + { + var args = []; + for(var $$pai_5 = 2; $$pai_5 < arguments["length"]; ++$$pai_5) + args[$$pai_5 - 2] = arguments[$$pai_5]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.replaceAsync"); + var commonParameters = $h.CommonParameters.parse(args,false); + $h.NotificationMessages._validateKey$p(key); + $h.NotificationMessages._validateDictionary$p(dictionary); + var dataToHost = {}; + dataToHost = $h.ScriptHelpers.deepClone(dictionary); + dataToHost["key"] = key; + $h.NotificationMessages._mapToHostItemNotificationMessageType$p(dataToHost); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(35,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.NotificationMessages.prototype.removeAsync = function(key) + { + var args = []; + for(var $$pai_4 = 1; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4 - 1] = arguments[$$pai_4]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.removeAsync"); + var commonParameters = $h.CommonParameters.parse(args,false); + $h.NotificationMessages._validateKey$p(key); + var dataToHost = {key: key}; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(36,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.OutlookErrorManager = function(){}; + $h.OutlookErrorManager.getErrorArgs = function(errorCode) + { + if(!$h.OutlookErrorManager._isInitialized$p) + $h.OutlookErrorManager._initialize$p(); + return OSF.DDA.ErrorCodeManager["getErrorArgs"](errorCode) + }; + $h.OutlookErrorManager._initialize$p = function() + { + $h.OutlookErrorManager._addErrorMessage$p(9e3,"AttachmentSizeExceeded",window["_u"]["ExtensibilityStrings"]["l_AttachmentExceededSize_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9001,"NumberOfAttachmentsExceeded",window["_u"]["ExtensibilityStrings"]["l_ExceededMaxNumberOfAttachments_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9002,"InternalFormatError",window["_u"]["ExtensibilityStrings"]["l_InternalFormatError_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9003,"InvalidAttachmentId",window["_u"]["ExtensibilityStrings"]["l_InvalidAttachmentId_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9004,"InvalidAttachmentPath",window["_u"]["ExtensibilityStrings"]["l_InvalidAttachmentPath_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9005,"CannotAddAttachmentBeforeUpgrade",window["_u"]["ExtensibilityStrings"]["l_CannotAddAttachmentBeforeUpgrade_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9006,"AttachmentDeletedBeforeUploadCompletes",window["_u"]["ExtensibilityStrings"]["l_AttachmentDeletedBeforeUploadCompletes_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9007,"AttachmentUploadGeneralFailure",window["_u"]["ExtensibilityStrings"]["l_AttachmentUploadGeneralFailure_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9008,"AttachmentToDeleteDoesNotExist",window["_u"]["ExtensibilityStrings"]["l_DeleteAttachmentDoesNotExist_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9009,"AttachmentDeleteGeneralFailure",window["_u"]["ExtensibilityStrings"]["l_AttachmentDeleteGeneralFailure_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9010,"InvalidEndTime",window["_u"]["ExtensibilityStrings"]["l_InvalidEndTime_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9011,"HtmlSanitizationFailure",window["_u"]["ExtensibilityStrings"]["l_HtmlSanitizationFailure_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9012,"NumberOfRecipientsExceeded",String.format(window["_u"]["ExtensibilityStrings"]["l_NumberOfRecipientsExceeded_Text"],500)); + $h.OutlookErrorManager._addErrorMessage$p(9013,"NoValidRecipientsProvided",window["_u"]["ExtensibilityStrings"]["l_NoValidRecipientsProvided_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9014,"CursorPositionChanged",window["_u"]["ExtensibilityStrings"]["l_CursorPositionChanged_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9016,"InvalidSelection",window["_u"]["ExtensibilityStrings"]["l_InvalidSelection_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9017,"AccessRestricted",""); + $h.OutlookErrorManager._addErrorMessage$p(9018,"GenericTokenError",""); + $h.OutlookErrorManager._addErrorMessage$p(9019,"GenericSettingsError",""); + $h.OutlookErrorManager._addErrorMessage$p(9020,"GenericResponseError",""); + $h.OutlookErrorManager._addErrorMessage$p(9021,"SaveError",window["_u"]["ExtensibilityStrings"]["l_SaveError_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9022,"MessageInDifferentStoreError",window["_u"]["ExtensibilityStrings"]["l_MessageInDifferentStoreError_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9023,"DuplicateNotificationKey",window["_u"]["ExtensibilityStrings"]["l_DuplicateNotificationKey_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9024,"NotificationKeyNotFound",window["_u"]["ExtensibilityStrings"]["l_NotificationKeyNotFound_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9025,"NumberOfNotificationsExceeded",window["_u"]["ExtensibilityStrings"]["l_NumberOfNotificationsExceeded_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9026,"PersistedNotificationArrayReadError",window["_u"]["ExtensibilityStrings"]["l_PersistedNotificationArrayReadError_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9027,"PersistedNotificationArraySaveError",window["_u"]["ExtensibilityStrings"]["l_PersistedNotificationArraySaveError_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9028,"CannotPersistPropertyInUnsavedDraftError",window["_u"]["ExtensibilityStrings"]["l_CannotPersistPropertyInUnsavedDraftError_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9029,"CanOnlyGetTokenForSavedItem",window["_u"]["ExtensibilityStrings"]["l_CallSaveAsyncBeforeToken_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9030,"APICallFailedDueToItemChange",window["_u"]["ExtensibilityStrings"]["l_APICallFailedDueToItemChange_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9031,"InvalidParameterValueError",window["_u"]["ExtensibilityStrings"]["l_InvalidParameterValueError_Text"]); + $h.OutlookErrorManager._isInitialized$p = true + }; + $h.OutlookErrorManager._addErrorMessage$p = function(errorCode, errorName, errorMessage) + { + OSF.DDA.ErrorCodeManager["addErrorMessage"](errorCode,{ + name: errorName, + message: errorMessage + }) + }; + $h.OutlookErrorManager.OutlookErrorCodes = function(){}; + $h.OutlookErrorManager.OsfDdaErrorCodes = function(){}; + $h.PhoneNumber = function(data) + { + this.$$d__getPhoneType$p$0 = Function.createDelegate(this,this._getPhoneType$p$0); + this.$$d__getOriginalPhoneString$p$0 = Function.createDelegate(this,this._getOriginalPhoneString$p$0); + this.$$d__getPhoneString$p$0 = Function.createDelegate(this,this._getPhoneString$p$0); + this._data$p$0 = data; + $h.InitialData._defineReadOnlyProperty$i(this,"phoneString",this.$$d__getPhoneString$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"originalPhoneString",this.$$d__getOriginalPhoneString$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"type",this.$$d__getPhoneType$p$0) + }; + $h.PhoneNumber.prototype = { + _data$p$0: null, + _getPhoneString$p$0: function() + { + return this._data$p$0["PhoneString"] + }, + _getOriginalPhoneString$p$0: function() + { + return this._data$p$0["OriginalPhoneString"] + }, + _getPhoneType$p$0: function() + { + return this._data$p$0["Type"] + } + }; + $h.TaskSuggestion = function(data) + { + this.$$d__getAssignees$p$0 = Function.createDelegate(this,this._getAssignees$p$0); + this.$$d__getTaskString$p$0 = Function.createDelegate(this,this._getTaskString$p$0); + this._data$p$0 = data; + $h.InitialData._defineReadOnlyProperty$i(this,"taskString",this.$$d__getTaskString$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"assignees",this.$$d__getAssignees$p$0) + }; + $h.TaskSuggestion.prototype = { + _data$p$0: null, + _assignees$p$0: null, + _getTaskString$p$0: function() + { + return this._data$p$0["TaskString"] + }, + _getAssignees$p$0: function() + { + if(!this._assignees$p$0) + { + var $$t_1 = this; + this._assignees$p$0 = $h.Entities._getExtractedObjects$i($h.EmailAddressDetails,this._data$p$0,"Assignees",function(data) + { + return $h.EmailAddressDetails._createFromEmailUserDictionary$i(data) + }) + } + return this._assignees$p$0 + } + }; + $h.UserProfile = function(data) + { + this.$$d__getCapabilities$p$0 = Function.createDelegate(this,this._getCapabilities$p$0); + this.$$d__getUserProfileType$p$0 = Function.createDelegate(this,this._getUserProfileType$p$0); + this.$$d__getTimeZone$p$0 = Function.createDelegate(this,this._getTimeZone$p$0); + this.$$d__getEmailAddress$p$0 = Function.createDelegate(this,this._getEmailAddress$p$0); + this.$$d__getDisplayName$p$0 = Function.createDelegate(this,this._getDisplayName$p$0); + this._data$p$0 = data; + $h.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"timeZone",this.$$d__getTimeZone$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"accountType",this.$$d__getUserProfileType$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"capabilities",this.$$d__getCapabilities$p$0) + }; + $h.UserProfile.prototype = { + _data$p$0: null, + _getCapabilities$p$0: function() + { + return this._data$p$0.get__userProfileCapabilities$i$0() || {} + }, + _getUserProfileType$p$0: function() + { + return this._data$p$0.get__userProfileType$i$0() + }, + _getDisplayName$p$0: function() + { + return this._data$p$0.get__userDisplayName$i$0() + }, + _getEmailAddress$p$0: function() + { + return this._data$p$0.get__userEmailAddress$i$0() + }, + _getTimeZone$p$0: function() + { + return this._data$p$0.get__userTimeZone$i$0() + } + }; + $h.OutlookDispid = function(){}; + $h.OutlookDispid.prototype = { + owaOnlyMethod: 0, + getInitialData: 1, + getUserIdentityToken: 2, + loadCustomProperties: 3, + saveCustomProperties: 4, + ewsRequest: 5, + displayNewAppointmentForm: 7, + displayMessageForm: 8, + displayAppointmentForm: 9, + displayReplyForm: 10, + displayReplyAllForm: 11, + getCallbackToken: 12, + bodySetSelectedDataAsync: 13, + getBodyTypeAsync: 14, + getRecipientsAsync: 15, + addFileAttachmentAsync: 16, + setSubjectAsync: 17, + getSubjectAsync: 18, + addItemAttachmentAsync: 19, + removeAttachmentAsync: 20, + setRecipientsAsync: 21, + addRecipientsAsync: 22, + bodyPrependAsync: 23, + getTimeAsync: 24, + setTimeAsync: 25, + getLocationAsync: 26, + setLocationAsync: 27, + getSelectedDataAsync: 28, + setSelectedDataAsync: 29, + displayReplyFormWithAttachments: 30, + displayReplyAllFormWithAttachments: 31, + saveAsync: 32, + addNotficationMessageAsync: 33, + getAllNotficationMessagesAsync: 34, + replaceNotficationMessageAsync: 35, + removeNotficationMessageAsync: 36, + getBodyAsync: 37, + setBodyAsync: 38, + appCommands1: 39, + registerConsentAsync: 40, + close: 41, + closeApp: 42, + displayPersonaCardAsync: 43, + displayNewMessageForm: 44, + navigateToModuleAsync: 45, + eventCompleted: 94, + closeContainer: 97, + getInitializationContextAsync: 99, + moveToFolder: 101, + appendOnSendAsync: 100, + messageParent: 144, + trackCtq: 400, + recordTrace: 401, + recordDataPoint: 402, + windowOpenOverrideHandler: 403, + saveSettingsRequest: 404 + }; + $h.OutlookDispid["registerEnum"]("$h.OutlookDispid",false); + $h.RequestState = function(){}; + $h.RequestState.prototype = { + unsent: 0, + opened: 1, + headersReceived: 2, + loading: 3, + done: 4 + }; + $h.RequestState["registerEnum"]("$h.RequestState",false); + $h.CommonParameters = function(options, callback, asyncContext) + { + this._options$p$0 = options; + this._callback$p$0 = callback; + this._asyncContext$p$0 = asyncContext + }; + $h.CommonParameters.parse = function(args, isCallbackRequired, tryLegacy) + { + var legacyParameters; + var $$t_8, + $$t_9; + if(tryLegacy && ($$t_9 = $h.CommonParameters._tryParseLegacy$p(args,$$t_8 = {val: legacyParameters}),legacyParameters = $$t_8["val"],$$t_9)) + return legacyParameters; + var argsLength = args["length"]; + var options = null; + var callback = null; + var asyncContext = null; + if(argsLength === 1) + if($h.CommonParameters._argIsFunction$p(args[0])) + callback = args[0]; + else if(Object["isInstanceOfType"](args[0])) + options = args[0]; + else + throw Error.argumentType(); + else if(argsLength === 2) + { + if(!Object["isInstanceOfType"](args[0])) + throw Error.argument("options"); + if(!$h.CommonParameters._argIsFunction$p(args[1])) + throw Error.argument("callback"); + options = args[0]; + callback = args[1] + } + else if(argsLength) + throw Error.parameterCount(window["_u"]["ExtensibilityStrings"]["l_ParametersNotAsExpected_Text"]); + if(isCallbackRequired && !callback) + throw Error.argumentNull("callback"); + if(options && !$h.ScriptHelpers.isNullOrUndefined(options["asyncContext"])) + asyncContext = options["asyncContext"]; + return new $h.CommonParameters(options,callback,asyncContext) + }; + $h.CommonParameters._tryParseLegacy$p = function(args, commonParameters) + { + commonParameters["val"] = null; + var argsLength = args["length"]; + var callback = null; + var userContext = null; + if(!argsLength || argsLength > 2) + return false; + if(!$h.CommonParameters._argIsFunction$p(args[0])) + return false; + callback = args[0]; + if(argsLength > 1) + userContext = args[1]; + commonParameters["val"] = new $h.CommonParameters(null,callback,userContext); + return true + }; + $h.CommonParameters._argIsFunction$p = function(arg) + { + return typeof arg === "function" + }; + $h.CommonParameters.prototype = { + _options$p$0: null, + _callback$p$0: null, + _asyncContext$p$0: null, + get_options: function() + { + return this._options$p$0 + }, + get_callback: function() + { + return this._callback$p$0 + }, + get_asyncContext: function() + { + return this._asyncContext$p$0 + } + }; + $h.EwsRequest = function(userContext) + { + $h.EwsRequest["initializeBase"](this,[userContext]) + }; + $h.EwsRequest.prototype = { + readyState: 1, + status: 0, + statusText: null, + onreadystatechange: null, + responseText: null, + get__statusCode$i$1: function() + { + return this.status + }, + set__statusCode$i$1: function(value) + { + this.status = value; + return value + }, + get__statusDescription$i$1: function() + { + return this.statusText + }, + set__statusDescription$i$1: function(value) + { + this.statusText = value; + return value + }, + get__requestState$i$1: function() + { + return this.readyState + }, + set__requestState$i$1: function(value) + { + this.readyState = value; + return value + }, + get_hasOnReadyStateChangeCallback: function() + { + return!$h.ScriptHelpers.isNullOrUndefined(this.onreadystatechange) + }, + get__response$i$1: function() + { + return this.responseText + }, + set__response$i$1: function(value) + { + this.responseText = value; + return value + }, + send: function(data) + { + this._checkSendConditions$i$1(); + if($h.ScriptHelpers.isNullOrUndefined(data)) + this._throwInvalidStateException$i$1(); + this._sendRequest$i$0(5,"EwsRequest",{body: data}) + }, + _callOnReadyStateChangeCallback$i$1: function() + { + if(!$h.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)) + this.onreadystatechange() + }, + _parseExtraResponseData$i$1: function(response){}, + executeExtraFailedResponseSteps: function(){} + }; + $h.InitialData = function(data) + { + this._data$p$0 = data; + this._permissionLevel$p$0 = this._calculatePermissionLevel$p$0() + }; + $h.InitialData._defineReadOnlyProperty$i = function(o, methodName, getter) + { + var propertyDescriptor = { + get: getter, + configurable: false + }; + window["Object"]["defineProperty"](o,methodName,propertyDescriptor) + }; + $h.InitialData.prototype = { + _toRecipients$p$0: null, + _ccRecipients$p$0: null, + _attachments$p$0: null, + _resources$p$0: null, + _entities$p$0: null, + _selectedEntities$p$0: null, + _data$p$0: null, + _permissionLevel$p$0: 0, + get__isRestIdSupported$i$0: function() + { + return this._data$p$0["isRestIdSupported"] + }, + get__itemId$i$0: function() + { + return this._data$p$0["id"] + }, + get__itemClass$i$0: function() + { + return this._data$p$0["itemClass"] + }, + get__dateTimeCreated$i$0: function() + { + return new Date(this._data$p$0["dateTimeCreated"]) + }, + get__dateTimeModified$i$0: function() + { + return new Date(this._data$p$0["dateTimeModified"]) + }, + get__dateTimeSent$i$0: function() + { + return new Date(this._data$p$0["dateTimeSent"]) + }, + get__subject$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + return this._data$p$0["subject"] + }, + get__normalizedSubject$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + return this._data$p$0["normalizedSubject"] + }, + get__internetMessageId$i$0: function() + { + return this._data$p$0["internetMessageId"] + }, + get__conversationId$i$0: function() + { + return this._data$p$0["conversationId"] + }, + get__sender$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + var sender = this._data$p$0["sender"]; + return $h.ScriptHelpers.isNullOrUndefined(sender) ? null : new $h.EmailAddressDetails(sender) + }, + get__from$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + var from = this._data$p$0["from"]; + return $h.ScriptHelpers.isNullOrUndefined(from) ? null : new $h.EmailAddressDetails(from) + }, + get__to$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + if(null === this._toRecipients$p$0) + this._toRecipients$p$0 = this._createEmailAddressDetails$p$0("to"); + return this._toRecipients$p$0 + }, + get__cc$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + if(null === this._ccRecipients$p$0) + this._ccRecipients$p$0 = this._createEmailAddressDetails$p$0("cc"); + return this._ccRecipients$p$0 + }, + get__attachments$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + if(null === this._attachments$p$0) + this._attachments$p$0 = this._createAttachmentDetails$p$0(); + return this._attachments$p$0 + }, + get__ewsUrl$i$0: function() + { + return this._data$p$0["ewsUrl"] + }, + get__restUrl$i$0: function() + { + return this._data$p$0["restUrl"] + }, + get__marketplaceAssetId$i$0: function() + { + return this._data$p$0["marketplaceAssetId"] + }, + get__extensionId$i$0: function() + { + return this._data$p$0["extensionId"] + }, + get__marketplaceContentMarket$i$0: function() + { + return this._data$p$0["marketplaceContentMarket"] + }, + get__consentMetadata$i$0: function() + { + return this._data$p$0["consentMetadata"] + }, + get__isRead$i$0: function() + { + return this._data$p$0["isRead"] + }, + get__endNodeUrl$i$0: function() + { + return this._data$p$0["endNodeUrl"] + }, + get__entryPointUrl$i$0: function() + { + return this._data$p$0["entryPointUrl"] + }, + get__start$i$0: function() + { + return new Date(this._data$p$0["start"]) + }, + get__end$i$0: function() + { + return new Date(this._data$p$0["end"]) + }, + get__location$i$0: function() + { + return this._data$p$0["location"] + }, + get__userProfileType$i$0: function() + { + return this._data$p$0["userProfileType"] + }, + get__resources$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + if(null === this._resources$p$0) + this._resources$p$0 = this._createEmailAddressDetails$p$0("resources"); + return this._resources$p$0 + }, + get__organizer$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + var organizer = this._data$p$0["organizer"]; + return $h.ScriptHelpers.isNullOrUndefined(organizer) ? null : new $h.EmailAddressDetails(organizer) + }, + get__userProfileCapabilities$i$0: function() + { + return this._data$p$0["userProfileCapabilities"] + }, + get__userDisplayName$i$0: function() + { + return this._data$p$0["userDisplayName"] + }, + get__userEmailAddress$i$0: function() + { + return this._data$p$0["userEmailAddress"] + }, + get__userTimeZone$i$0: function() + { + return this._data$p$0["userTimeZone"] + }, + get__timeZoneOffsets$i$0: function() + { + return this._data$p$0["timeZoneOffsets"] + }, + get__hostVersion$i$0: function() + { + return this._data$p$0["hostVersion"] + }, + get__owaView$i$0: function() + { + return this._data$p$0["owaView"] + }, + get__overrideWindowOpen$i$0: function() + { + return this._data$p$0["overrideWindowOpen"] + }, + _getEntities$i$0: function() + { + if(!this._entities$p$0) + this._entities$p$0 = new $h.Entities(this._data$p$0["entities"],this._data$p$0["filteredEntities"],this.get__dateTimeSent$i$0(),this._permissionLevel$p$0); + return this._entities$p$0 + }, + _getSelectedEntities$i$0: function() + { + if(!this._selectedEntities$p$0) + this._selectedEntities$p$0 = new $h.Entities(this._data$p$0["selectedEntities"],null,this.get__dateTimeSent$i$0(),this._permissionLevel$p$0); + return this._selectedEntities$p$0 + }, + _getEntitiesByType$i$0: function(entityType) + { + var entites = this._getEntities$i$0(); + return entites._getByType$i$0(entityType) + }, + _getFilteredEntitiesByName$i$0: function(name) + { + var entities = this._getEntities$i$0(); + return entities._getFilteredEntitiesByName$i$0(name) + }, + _getRegExMatches$i$0: function() + { + if(!this._data$p$0["regExMatches"]) + return null; + return this._data$p$0["regExMatches"] + }, + _getSelectedRegExMatches$i$0: function() + { + if(!this._data$p$0["selectedRegExMatches"]) + return null; + return this._data$p$0["selectedRegExMatches"] + }, + _getRegExMatchesByName$i$0: function(regexName) + { + var regexMatches = this._getRegExMatches$i$0(); + if(!regexMatches || !regexMatches[regexName]) + return null; + return regexMatches[regexName] + }, + _throwOnRestrictedPermissionLevel$i$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0) + }, + _createEmailAddressDetails$p$0: function(key) + { + var to = this._data$p$0[key]; + if($h.ScriptHelpers.isNullOrUndefined(to)) + return[]; + var recipients = []; + for(var i = 0; i < to["length"]; i++) + if(!$h.ScriptHelpers.isNullOrUndefined(to[i])) + recipients[i] = new $h.EmailAddressDetails(to[i]); + return recipients + }, + _createAttachmentDetails$p$0: function() + { + var attachments = this._data$p$0["attachments"]; + if($h.ScriptHelpers.isNullOrUndefined(attachments)) + return[]; + var attachmentDetails = []; + for(var i = 0; i < attachments["length"]; i++) + if(!$h.ScriptHelpers.isNullOrUndefined(attachments[i])) + attachmentDetails[i] = new $h.AttachmentDetails(attachments[i]); + return attachmentDetails + }, + _calculatePermissionLevel$p$0: function() + { + var HostReadItem = 1; + var HostReadWriteMailbox = 2; + var HostReadWriteItem = 3; + var permissionLevelFromHost = this._data$p$0["permissionLevel"]; + if($h.ScriptHelpers.isUndefined(this._permissionLevel$p$0)) + return 0; + switch(permissionLevelFromHost) + { + case HostReadItem: + return 1; + case HostReadWriteItem: + return 2; + case HostReadWriteMailbox: + return 3; + default: + return 0 + } + } + }; + $h._loadDictionaryRequest = function(createResultObject, dictionaryName, callback, userContext) + { + $h._loadDictionaryRequest["initializeBase"](this,[userContext]); + this._createResultObject$p$1 = createResultObject; + this._dictionaryName$p$1 = dictionaryName; + this._callback$p$1 = callback + }; + $h._loadDictionaryRequest.prototype = { + _dictionaryName$p$1: null, + _createResultObject$p$1: null, + _callback$p$1: null, + handleResponse: function(response) + { + if(response["wasSuccessful"]) + { + var value = response[this._dictionaryName$p$1]; + var responseData = window["JSON"]["parse"](value); + this.createAsyncResult(this._createResultObject$p$1(responseData),0,0,null) + } + else + this.createAsyncResult(null,1,9020,response["errorMessage"]); + this._callback$p$1(this._asyncResult$p$0) + } + }; + $h.ProxyRequestBase = function(userContext) + { + $h.ProxyRequestBase["initializeBase"](this,[userContext]) + }; + $h.ProxyRequestBase.prototype = { + handleResponse: function(response) + { + if(!response["wasProxySuccessful"]) + { + this.set__statusCode$i$1(500); + this.set__statusDescription$i$1("Error"); + var errorMessage = response["errorMessage"]; + this.set__response$i$1(errorMessage); + this.createAsyncResult(null,1,9020,errorMessage) + } + else + { + this.set__statusCode$i$1(response["statusCode"]); + this.set__statusDescription$i$1(response["statusDescription"]); + this.set__response$i$1(response["body"]); + this.createAsyncResult(this.get__response$i$1(),0,0,null) + } + this._parseExtraResponseData$i$1(response); + this._cycleReadyStateFromHeadersReceivedToLoadingToDone$i$1() + }, + _throwInvalidStateException$i$1: function() + { + throw Error.create("DOMException",{ + code: 11, + message: "INVALID_STATE_ERR" + }); + }, + _cycleReadyStateFromHeadersReceivedToLoadingToDone$i$1: function() + { + var $$t_0 = this; + this._changeReadyState$i$1(2,function() + { + $$t_0._changeReadyState$i$1(3,function() + { + $$t_0._changeReadyState$i$1(4,null) + }) + }) + }, + _changeReadyState$i$1: function(state, nextStep) + { + this.set__requestState$i$1(state); + var $$t_2 = this; + window.setTimeout(function() + { + try + { + $$t_2._callOnReadyStateChangeCallback$i$1() + } + finally + { + if(!$h.ScriptHelpers.isNullOrUndefined(nextStep)) + nextStep() + } + },0) + }, + _checkSendConditions$i$1: function() + { + if(this.get__requestState$i$1() !== 1) + this._throwInvalidStateException$i$1(); + if(this._isSent$p$0) + this._throwInvalidStateException$i$1() + } + }; + $h.RequestBase = function(userContext) + { + this._userContext$p$0 = userContext + }; + $h.RequestBase.prototype = { + _isSent$p$0: false, + _asyncResult$p$0: null, + _userContext$p$0: null, + get_asyncResult: function() + { + return this._asyncResult$p$0 + }, + _sendRequest$i$0: function(dispid, methodName, dataToSend) + { + this._isSent$p$0 = true; + var $$t_5 = this; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.invokeHostMethod(dispid,dataToSend,function(resultCode, response) + { + if(resultCode) + $$t_5.createAsyncResult(null,1,9017,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode)); + else + $$t_5.handleResponse(response) + }) + }, + createAsyncResult: function(value, errorCode, detailedErrorCode, errorDescription) + { + this._asyncResult$p$0 = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(value,errorCode,detailedErrorCode,this._userContext$p$0,errorDescription) + } + }; + $h.SaveDictionaryRequest = function(callback, userContext) + { + $h.SaveDictionaryRequest["initializeBase"](this,[userContext]); + if(!$h.ScriptHelpers.isNullOrUndefined(callback)) + this._callback$p$1 = callback + }; + $h.SaveDictionaryRequest.prototype = { + _callback$p$1: null, + handleResponse: function(response) + { + if(response["wasSuccessful"]) + this.createAsyncResult(null,0,0,null); + else + this.createAsyncResult(null,1,9020,response["errorMessage"]); + if(!$h.ScriptHelpers.isNullOrUndefined(this._callback$p$1)) + this._callback$p$1(this._asyncResult$p$0) + } + }; + $h.ScriptHelpers = function(){}; + $h.ScriptHelpers.isNull = function(value) + { + return null === value + }; + $h.ScriptHelpers.isNullOrUndefined = function(value) + { + return $h.ScriptHelpers.isNull(value) || $h.ScriptHelpers.isUndefined(value) + }; + $h.ScriptHelpers.isUndefined = function(value) + { + return value === undefined + }; + $h.ScriptHelpers.dictionaryContainsKey = function(obj, keyName) + { + return Object["isInstanceOfType"](obj) ? keyName in obj : false + }; + $h.ScriptHelpers.isNonEmptyString = function(value) + { + if(!value) + return false; + return String["isInstanceOfType"](value) + }; + $h.ScriptHelpers.deepClone = function(obj) + { + return window["JSON"]["parse"](window["JSON"]["stringify"](obj)) + }; + $h.ScriptHelpers.isValueTrue = function(value) + { + if(!$h.ScriptHelpers.isNullOrUndefined(value)) + return value["toString"]().toLowerCase() === "true"; + return false + }; + window["OSF"]["DDA"]["OutlookAppOm"]["registerClass"]("OSF.DDA.OutlookAppOm"); + window["OSF"]["DDA"]["Settings"]["registerClass"]("OSF.DDA.Settings"); + $h.AdditionalGlobalParameters["registerClass"]("$h.AdditionalGlobalParameters"); + $h.ItemBase["registerClass"]("$h.ItemBase"); + $h.Item["registerClass"]("$h.Item",$h.ItemBase); + $h.Appointment["registerClass"]("$h.Appointment",$h.Item); + $h.ComposeItem["registerClass"]("$h.ComposeItem",$h.ItemBase); + $h.AppointmentCompose["registerClass"]("$h.AppointmentCompose",$h.ComposeItem); + $h.AttachmentDetails["registerClass"]("$h.AttachmentDetails"); + $h.Body["registerClass"]("$h.Body"); + $h.ComposeBody["registerClass"]("$h.ComposeBody",$h.Body); + $h.ComposeRecipient["registerClass"]("$h.ComposeRecipient"); + $h.ComposeLocation["registerClass"]("$h.ComposeLocation"); + $h.ComposeSubject["registerClass"]("$h.ComposeSubject"); + $h.ComposeTime["registerClass"]("$h.ComposeTime"); + $h.Contact["registerClass"]("$h.Contact"); + $h.CustomProperties["registerClass"]("$h.CustomProperties"); + $h.Diagnostics["registerClass"]("$h.Diagnostics"); + $h.EmailAddressDetails["registerClass"]("$h.EmailAddressDetails"); + $h.Entities["registerClass"]("$h.Entities"); + $h.Message["registerClass"]("$h.Message",$h.Item); + $h.MeetingRequest["registerClass"]("$h.MeetingRequest",$h.Message); + $h.MeetingSuggestion["registerClass"]("$h.MeetingSuggestion"); + $h._extractedDate["registerClass"]("$h._extractedDate"); + $h._preciseDate["registerClass"]("$h._preciseDate",$h._extractedDate); + $h._relativeDate["registerClass"]("$h._relativeDate",$h._extractedDate); + $h.MessageCompose["registerClass"]("$h.MessageCompose",$h.ComposeItem); + $h.NotificationMessages["registerClass"]("$h.NotificationMessages"); + $h.PhoneNumber["registerClass"]("$h.PhoneNumber"); + $h.TaskSuggestion["registerClass"]("$h.TaskSuggestion"); + $h.UserProfile["registerClass"]("$h.UserProfile"); + $h.CommonParameters["registerClass"]("$h.CommonParameters"); + $h.RequestBase["registerClass"]("$h.RequestBase"); + $h.ProxyRequestBase["registerClass"]("$h.ProxyRequestBase",$h.RequestBase); + $h.EwsRequest["registerClass"]("$h.EwsRequest",$h.ProxyRequestBase); + $h.InitialData["registerClass"]("$h.InitialData"); + $h._loadDictionaryRequest["registerClass"]("$h._loadDictionaryRequest",$h.RequestBase); + $h.SaveDictionaryRequest["registerClass"]("$h.SaveDictionaryRequest",$h.RequestBase); + window["OSF"]["DDA"]["OutlookAppOm"].asyncMethodTimeoutKeyName = "__timeout__"; + window["OSF"]["DDA"]["OutlookAppOm"].ewsIdOrEmailParamName = "ewsIdOrEmail"; + window["OSF"]["DDA"]["OutlookAppOm"].moduleParamName = "module"; + window["OSF"]["DDA"]["OutlookAppOm"].queryStringParamName = "queryString"; + window["OSF"]["DDA"]["OutlookAppOm"]._maxRecipients$p = 100; + window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p = 255; + window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength = 32768; + window["OSF"]["DDA"]["OutlookAppOm"]._maxLocationLength$p = 255; + window["OSF"]["DDA"]["OutlookAppOm"]._maxEwsRequestSize$p = 1e6; + window["OSF"]["DDA"]["OutlookAppOm"].executeMethodName = "ExecuteMethod"; + window["OSF"]["DDA"]["OutlookAppOm"].getInitialDataMethodName = "GetInitialData"; + window["OSF"]["DDA"]["OutlookAppOm"].standardInvokeHostMethodErrorCodeKey = "errorCode"; + window["OSF"]["DDA"]["OutlookAppOm"].standardInvokeHostMethodErrorKey = "error"; + window["OSF"]["DDA"]["OutlookAppOm"].outlookAsyncResponseWasSuccessfulKey = "wasSuccessful"; + window["OSF"]["DDA"]["OutlookAppOm"].outlookAsyncResponseErrorMessageKey = "errorMessage"; + window["OSF"]["DDA"]["OutlookAppOm"].itemIdParameterName = "itemId"; + window["OSF"]["DDA"]["OutlookAppOm"].restVersionParameterName = "restVersion"; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p = null; + $h.AdditionalGlobalParameters.itemNumberKey = "itemNumber"; + $h.AdditionalGlobalParameters.actionsDefinitionKey = "actions"; + $h.AttachmentConstants.maxAttachmentNameLength = 255; + $h.AttachmentConstants.maxUrlLength = 2048; + $h.AttachmentConstants.maxItemIdLength = 200; + $h.AttachmentConstants.maxRemoveIdLength = 200; + $h.AttachmentConstants.attachmentParameterName = "attachments"; + $h.AttachmentConstants.attachmentTypeParameterName = "type"; + $h.AttachmentConstants.attachmentUrlParameterName = "url"; + $h.AttachmentConstants.attachmentItemIdParameterName = "itemId"; + $h.AttachmentConstants.attachmentNameParameterName = "name"; + $h.AttachmentConstants.attachmentIsInlineParameterName = "isInline"; + $h.AttachmentConstants.attachmentTypeFileName = "file"; + $h.AttachmentConstants.attachmentTypeItemName = "item"; + $h.AttachmentDetails._attachmentTypeMap$p = [window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["File"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["Item"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["Cloud"]]; + $h.Body.coercionTypeParameterName = "coercionType"; + $h.ComposeRecipient.displayNameLengthLimit = 255; + $h.ComposeRecipient.maxSmtpLength = 571; + $h.ComposeRecipient.recipientsLimit = 100; + $h.ComposeRecipient.totalRecipientsLimit = 500; + $h.ComposeRecipient.addressParameterName = "address"; + $h.ComposeRecipient.nameParameterName = "name"; + $h.ComposeLocation.locationKey = "location"; + $h.ComposeLocation.maximumLocationLength = 255; + $h.ComposeSubject.maximumSubjectLength = 255; + $h.ComposeTime.timeTypeName = "TimeProperty"; + $h.ComposeTime.timeDataName = "time"; + $h.Diagnostics.outlookAppName = "Outlook"; + $h.Diagnostics.outlookWebAppName = "OutlookWebApp"; + $h.Diagnostics.outlookIOSAppName = "OutlookIOS"; + $h.Diagnostics.outlookAndroidAppName = "OutlookAndroid"; + $h.EmailAddressDetails._emptyString$p = ""; + $h.EmailAddressDetails._responseTypeMap$p = [window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["None"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Organizer"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Tentative"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Accepted"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Declined"]]; + $h.EmailAddressDetails._recipientTypeMap$p = [window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["Other"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["DistributionList"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["User"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["ExternalUser"]]; + $h.Entities._allEntityKeys$p = ["Addresses","EmailAddresses","Urls","PhoneNumbers","TaskSuggestions","MeetingSuggestions","Contacts","FlightReservations","ParcelDeliveries"]; + $h.ReplyConstants.htmlBodyKeyName = "htmlBody"; + $h.AsyncConstants.optionsKeyName = "options"; + $h.AsyncConstants.callbackKeyName = "callback"; + $h.AsyncConstants.asyncResultKeyName = "asyncResult"; + $h.Item.destFolderParameterName = "destinationFolder"; + $h.MeetingSuggestionTimeDecoder._baseDate$p = new Date("0001-01-01T00:00:00Z"); + $h.NotificationMessages.maximumKeyLength = 32; + $h.NotificationMessages.maximumIconLength = 32; + $h.NotificationMessages.maximumMessageLength = 150; + $h.NotificationMessages.maximumActionTextLength = 30; + $h.NotificationMessages.notificationsKeyParameterName = "key"; + $h.NotificationMessages.notificationsTypeParameterName = "type"; + $h.NotificationMessages.notificationsIconParameterName = "icon"; + $h.NotificationMessages.notificationsMessageParameterName = "message"; + $h.NotificationMessages.notificationsPersistentParameterName = "persistent"; + $h.NotificationMessages.notificationsActionsDefinitionParameterName = "actions"; + $h.NotificationMessages.notificationsActionTypeParameterName = "actionType"; + $h.NotificationMessages.notificationsActionTextParameterName = "actionText"; + $h.NotificationMessages.notificationsActionCommandIdParameterName = "commandId"; + $h.NotificationMessages.notificationsActionContextDataParameterName = "contextData"; + $h.NotificationMessages.notificationsActionShowTaskPaneActionId = "showTaskPane"; + $h.OutlookErrorManager.errorNameKey = "name"; + $h.OutlookErrorManager.errorMessageKey = "message"; + $h.OutlookErrorManager._isInitialized$p = false; + $h.OutlookErrorManager.OutlookErrorCodes.attachmentSizeExceeded = 9e3; + $h.OutlookErrorManager.OutlookErrorCodes.numberOfAttachmentsExceeded = 9001; + $h.OutlookErrorManager.OutlookErrorCodes.internalFormatError = 9002; + $h.OutlookErrorManager.OutlookErrorCodes.invalidAttachmentId = 9003; + $h.OutlookErrorManager.OutlookErrorCodes.invalidAttachmentPath = 9004; + $h.OutlookErrorManager.OutlookErrorCodes.cannotAddAttachmentBeforeUpgrade = 9005; + $h.OutlookErrorManager.OutlookErrorCodes.attachmentDeletedBeforeUploadCompletes = 9006; + $h.OutlookErrorManager.OutlookErrorCodes.attachmentUploadGeneralFailure = 9007; + $h.OutlookErrorManager.OutlookErrorCodes.attachmentToDeleteDoesNotExist = 9008; + $h.OutlookErrorManager.OutlookErrorCodes.attachmentDeleteGeneralFailure = 9009; + $h.OutlookErrorManager.OutlookErrorCodes.invalidEndTime = 9010; + $h.OutlookErrorManager.OutlookErrorCodes.htmlSanitizationFailure = 9011; + $h.OutlookErrorManager.OutlookErrorCodes.numberOfRecipientsExceeded = 9012; + $h.OutlookErrorManager.OutlookErrorCodes.noValidRecipientsProvided = 9013; + $h.OutlookErrorManager.OutlookErrorCodes.cursorPositionChanged = 9014; + $h.OutlookErrorManager.OutlookErrorCodes.invalidSelection = 9016; + $h.OutlookErrorManager.OutlookErrorCodes.accessRestricted = 9017; + $h.OutlookErrorManager.OutlookErrorCodes.genericTokenError = 9018; + $h.OutlookErrorManager.OutlookErrorCodes.genericSettingsError = 9019; + $h.OutlookErrorManager.OutlookErrorCodes.genericResponseError = 9020; + $h.OutlookErrorManager.OutlookErrorCodes.saveError = 9021; + $h.OutlookErrorManager.OutlookErrorCodes.messageInDifferentStoreError = 9022; + $h.OutlookErrorManager.OutlookErrorCodes.duplicateNotificationKey = 9023; + $h.OutlookErrorManager.OutlookErrorCodes.notificationKeyNotFound = 9024; + $h.OutlookErrorManager.OutlookErrorCodes.numberOfNotificationsExceeded = 9025; + $h.OutlookErrorManager.OutlookErrorCodes.persistedNotificationArrayReadError = 9026; + $h.OutlookErrorManager.OutlookErrorCodes.persistedNotificationArraySaveError = 9027; + $h.OutlookErrorManager.OutlookErrorCodes.cannotPersistPropertyInUnsavedDraftError = 9028; + $h.OutlookErrorManager.OutlookErrorCodes.callSaveAsyncBeforeToken = 9029; + $h.OutlookErrorManager.OutlookErrorCodes.apiCallFailedDueToItemChange = 9030; + $h.OutlookErrorManager.OutlookErrorCodes.invalidParameterValueError = 9031; + $h.OutlookErrorManager.OutlookErrorCodes.ooeInvalidDataFormat = 2006; + $h.OutlookErrorManager.OsfDdaErrorCodes.ooeCoercionTypeNotSupported = 1e3; + $h.CommonParameters.asyncContextKeyName = "asyncContext"; + $h.InitialData.userProfileTypeKey = "userProfileType"; + $h.ScriptHelpers.emptyString = ""; + OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM); + if(appContext.get_appName() == OSF.AppName.OutlookWebApp || appContext.get_appName() == OSF.AppName.OutlookIOS || appContext.get_appName() == OSF.AppName.OutlookAndroid) + this._settings = this._initializeSettings(appContext,false); + else + this._settings = this._initializeSettings(false); + appContext.appOM = new OSF.DDA.OutlookAppOm(appContext,this._webAppState.wnd,appReady); + if(appContext.get_appName() == OSF.AppName.Outlook || appContext.get_appName() == OSF.AppName.OutlookWebApp || appContext.get_appName() == OSF.AppName.OutlookIOS) + OSF.DDA.DispIdHost.addEventSupport(appContext.appOM,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.ItemChanged])) } - - diff --git a/node_modules/@microsoft/office-js/dist/outlook-mac-16.00.js b/node_modules/@microsoft/office-js/dist/outlook-mac-16.00.js index 3d335b7..c8a5600 100644 --- a/node_modules/@microsoft/office-js/dist/outlook-mac-16.00.js +++ b/node_modules/@microsoft/office-js/dist/outlook-mac-16.00.js @@ -1,18 +1,9 @@ -/* Outlook mac specific API library */ -/* Version: 16.0.8127.1000 */ -/* - Copyright (c) Microsoft Corporation. All rights reserved. -*/ - - -/* - Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419. -*/ - +/* Outlook Mac specific API library */ +/* Version: 16.0.8809.1000 */ /*! Copyright (c) Microsoft Corporation. All rights reserved. */ /*! Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419. */ -var __extends=this&&this.__extends||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);function r(){this.constructor=n}n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},OfficeExt;(function(n){var t=function(){var n=!0;function t(){}t.prototype.isMsAjaxLoaded=function(){var t="function",i="undefined";return typeof Sys!==i&&typeof Type!==i&&Sys.StringBuilder&&typeof Sys.StringBuilder===t&&Type.registerNamespace&&typeof Type.registerNamespace===t&&Type.registerClass&&typeof Type.registerClass===t&&typeof Function._validateParams===t&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===t?n:!1};t.prototype.loadMsAjaxFull=function(n){var t=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,n)};Object.defineProperty(t.prototype,"msAjaxError",{get:function(){var n=this;n._msAjaxError==null&&n.isMsAjaxLoaded()&&(n._msAjaxError=Error);return n._msAjaxError},set:function(n){this._msAjaxError=n},enumerable:n,configurable:n});Object.defineProperty(t.prototype,"msAjaxString",{get:function(){var n=this;n._msAjaxString==null&&n.isMsAjaxLoaded()&&(n._msAjaxString=String);return n._msAjaxString},set:function(n){this._msAjaxString=n},enumerable:n,configurable:n});Object.defineProperty(t.prototype,"msAjaxDebug",{get:function(){var n=this;n._msAjaxDebug==null&&n.isMsAjaxLoaded()&&(n._msAjaxDebug=Sys.Debug);return n._msAjaxDebug},set:function(n){this._msAjaxDebug=n},enumerable:n,configurable:n});return t}();n.MicrosoftAjaxFactory=t})(OfficeExt||(OfficeExt={}));var OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory,OSF=OSF||{},OfficeExt;(function(n){var t=function(){function n(n){this._internalStorage=n}n.prototype.getItem=function(n){try{return this._internalStorage&&this._internalStorage.getItem(n)}catch(t){return null}};n.prototype.setItem=function(n,t){try{this._internalStorage&&this._internalStorage.setItem(n,t)}catch(i){}};n.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(n){}};n.prototype.removeItem=function(n){try{this._internalStorage&&this._internalStorage.removeItem(n)}catch(t){}};n.prototype.getKeysWithPrefix=function(n){var i=[];try{for(var u=this._internalStorage&&this._internalStorage.length||0,t=0;t0?i.push(t):t.tabIndex===0&&u.push(t):u.push(t)}i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;r===0&&(r=i.indexOf(n)-i.indexOf(t));return r});return[].concat(i,u)}return{set_entropy:function(n){if(typeof n=="string")for(var i=0;i1?c[c.length-1]:n;if(u&&o!=n){o.indexOf(it)>=0&&(o=o.split(it)[0]);o=decodeURIComponent(o)}var l=p();if(!f&&l){var s=window.name.indexOf(i);if(s>r){var h=window.name.indexOf(";",s);h==r&&(h=window.name.length);var a=window.name.substring(s,h);o?l.setItem(a,o):o=l.getItem(a)}}return o},getConversationId:function(){var i=window.location.search,t=n;if(i){var r=i.indexOf("&");t=r>0?i.substring(1,r):i.substr(1);if(t&&t.charAt(t.length-1)==="="){t=t.substring(0,t.length-1);t&&(t=decodeURIComponent(t))}}return t},getInfoItems:function(n){var t=n.split("$");typeof t[1]==h&&(t=n.split("|"));typeof t[1]==h&&(t=n.split("%7C"));return t},getXdmFieldValue:function(n,t){var r="",u=OSF.OUtil.parseXdmInfo(t);if(u){var i=OSF.OUtil.getInfoItems(u);if(i!=undefined&&i.length>=3)switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]);if(u)throw u;for(var f in r){u=Function._validateParameter(n[f],r[f],f);if(u)throw u;}},writeProfilerMark:function(n){if(window.msWriteProfilerMark){window.msWriteProfilerMark(n);OsfMsAjaxFactory.msAjaxDebug.trace(n)}},outputDebug:function(n){typeof OsfMsAjaxFactory!==h&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){r=r||{};for(var e in u){var f=u[e];r[f]==undefined&&(r[f]=i)}Object.defineProperty(n,t,r);return n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[o])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[o])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[tt,o,nt])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[tt,o,nt])},finalizeProperties:function(n,r){r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8;f=e&255;i[t++]=r>>2;i[t++]=(r&3)<<4|u>>4;i[t++]=(u&15)<<2|f>>6;i[t++]=f&63;if(!isNaN(e)){r=e>>8;u=s&255;f=s>>8;i[t++]=r>>2;i[t++]=(r&3)<<4|u>>4;i[t++]=(u&15)<<2|f>>6;i[t++]=f&63}if(isNaN(e))i[t-1]=64;else if(isNaN(s)){i[t-2]=64;i[t-1]=64}for(var h=0;h0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(var u=[],r=0;rn)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};u=k(u);s=e?u.length-1:0;if(u.length===0)return n;while(!h&&s>=0&&sn)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};u=k(u);v=y(u,e);s=l(u.length,v,o);if(s<0)return n;while(!c&&s>=0&&s0;t++){(t==8||t==12||t==16||t==20)&&(i+="-");i+=n[r%16];r=Math.floor(r/16)}for(;t<32;t++){(t==8||t==12||t==16||t==20)&&(i+="-");i+=n[Math.floor(Math.random()*16)]}return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidGetDelegateTokenMethod:146,dispidMethodMax:146};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidActivationStatusChangedEvent:32,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];if(i){i.name||(i.name=n[this.errorCodes.ooeInternalError].name);i.message||(i.message=n[this.errorCodes.ooeInternalError].message)}else i=n[this.errorCodes.ooeInternalError];return i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString}}}}();var OfficeExt;(function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}();n.RequirementVersion=ut;var r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){if(n==undefined)return!1;t==undefined&&(t=0);var f=this._setMap,u=f._sets;if(u.hasOwnProperty(n.toLowerCase())){var e=u[n.toLowerCase()];try{var i=this._getVersion(e);t=t+"";var r=this._getVersion(t);if(i.major>0&&i.major>r.major||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),r=0,i=0;if(t.length<2&&isNaN(Number(n)))throw u;else{r=Number(t[0]);t.length>=2&&(i=Number(t[1]));if(isNaN(r)||isNaN(i))throw u;}return{minor:i,major:r}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;var i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;var k=function(n){__extends(i,n);function i(){n.call(this,{dialogapi:t})}return i}(i);n.DefaultDialogSetRequirement=k;var o=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return i}(i);n.ExcelClientDefaultSetRequirement=o;var d=function(n){__extends(i,n);function i(){n.call(this);this._addSetMap({imagecoercion:t})}return i}(o);n.ExcelClientV1DefaultSetRequirement=d;var w=function(n){__extends(t,n);function t(){n.call(this,{mailbox:1.3})}return t}(i);n.OutlookClientDefaultSetRequirement=w;var f=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return i}(i);n.WordClientDefaultSetRequirement=f;var b=function(n){__extends(i,n);function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return i}(f);n.WordClientV1DefaultSetRequirement=b;var e=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return i}(i);n.PowerpointClientDefaultSetRequirement=e;var tt=function(n){__extends(i,n);function i(){n.call(this);this._addSetMap({imagecoercion:t})}return i}(e);n.PowerpointClientV1DefaultSetRequirement=tt;var it=function(n){__extends(i,n);function i(){n.call(this,{selection:t,textcoercion:t})}return i}(i);n.ProjectClientDefaultSetRequirement=it;var g=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return i}(i);n.ExcelWebDefaultSetRequirement=g;var nt=function(n){__extends(i,n);function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return i}(i);n.WordWebDefaultSetRequirement=nt;var h=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,settings:t})}return i}(i);n.PowerpointWebDefaultSetRequirement=h;var s=function(n){__extends(t,n);function t(){n.call(this,{mailbox:1.3})}return t}(i);n.OutlookWebDefaultSetRequirement=s;var l=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return i}(i);n.SwayWebDefaultSetRequirement=l;var c=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return i}(i);n.AccessWebDefaultSetRequirement=c;var y=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return i}(i);n.ExcelIOSDefaultSetRequirement=y;var u=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return i}(i);n.WordIOSDefaultSetRequirement=u;var p=function(n){__extends(t,n);function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return t}(u);n.WordIOSV1DefaultSetRequirement=p;var a=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return i}(i);n.PowerpointIOSDefaultSetRequirement=a;var v=function(n){__extends(i,n);function i(){n.call(this,{mailbox:t})}return i}(i);n.OutlookIOSDefaultSetRequirement=v;var rt=function(){var t="undefined";function n(){}n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)};n.getDefaultRequirementMatrix=function(u){this.initializeDefaultSetMatrix();var f=undefined,o=u.get_requirementMatrix();if(o!=undefined&&o.length>0&&typeof JSON!==t){var s=JSON.parse(u.get_requirementMatrix().toLowerCase());f=new r(new i(s))}else{var e=n.getClientFullVersionString(u);f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[e]!=undefined?new r(n.DefaultSetArrayMatrix[e]):new r(new i({}))}return f};n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix();if(f!=undefined&&f.length>0&&typeof JSON!==t){var e=JSON.parse(n.get_requirementMatrix().toLowerCase());u=new r(new i(e))}else u=new r(new k);return u};n.getClientFullVersionString=function(n){var r=n.get_appMinorVersion(),u="",i="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;if(f&&n.get_appVersion()==1)i=t==4096&&r>=15?"16.00.01":"16.00";else if(n.get_appName()==64)i=n.get_appVersion();else{u=r<10?"0"+r:""+r;i=n.get_appVersion()+"."+u}return n.get_appName()+"-"+i};n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new o;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new d;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new b;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new tt;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new w;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new g;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new nt;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new s;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new s;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new it;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new c;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new h;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new y;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new l;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new u;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new p;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new a;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new v};n.Excel_RCLIENT_1600="1-16.00";n.Excel_RCLIENT_1601="1-16.01";n.Word_RCLIENT_1600="2-16.00";n.Word_RCLIENT_1601="2-16.01";n.PowerPoint_RCLIENT_1600="4-16.00";n.PowerPoint_RCLIENT_1601="4-16.01";n.Outlook_RCLIENT_1600="8-16.00";n.Excel_WAC_1600="16-16.00";n.Word_WAC_1600="32-16.00";n.Outlook_WAC_1600="64-16.00";n.Outlook_WAC_1601="64-16.01";n.Project_RCLIENT_1600="128-16.00";n.Access_WAC_1600="256-16.00";n.PowerPoint_WAC_1600="512-16.00";n.Excel_IOS_1600="1024-16.00";n.SWAY_WAC_1600="2048-16.00";n.Word_IOS_1600="4096-16.00";n.Word_IOS_16001="4096-16.00.01";n.PowerPoint_IOS_1600="8192-16.00";n.Outlook_IOS_1600="65536-16.00";n.DefaultSetArrayMatrix={};return n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))})(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda();var OfficeExt;(function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n};n.getInstance=function(){n.hostObj===undefined&&(n.hostObj=new n);return n.hostObj};n.prototype.getPlatform=function(){var n=this;if(n.hostInfo.hostPlatform){var t=n.hostInfo.hostPlatform.toLowerCase();if(n.platformRemappings[t])return n.platformRemappings[t]}return null};n.prototype.getHost=function(){var n=this;if(n.hostInfo.hostType){var t=n.hostInfo.hostType.toLowerCase();if(n.camelCaseMappings[t])return n.camelCaseMappings[t];t=n.capitalizeFirstLetter(n.hostInfo.hostType);if(Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null};n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null};return n}();n.Host=t})(t=n.HostName||(n.HostName={}))})(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){if(!n){window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window);window.Office=Microsoft.Office.WebExtension;n=!0}},disableShortcut:function(){if(n){t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window);n=!1}}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i;if(n&&typeof n=="string"){var r=n.indexOf("#");if(r!=-1){var o=n.substring(0,r),e=n.substring(r+1);switch(o){case"binding":case"bindings":e&&(i=new OSF.DDA.BindingPromise(e))}}}if(i){i.onFail=t;return i}else if(t){var u=typeof t;if(u=="function"){var f={};f[Microsoft.Office.WebExtension.Parameters.Callback]=t;OSF.DDA.issueAsyncResult(f,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,u);}};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});if(n.get_isDialog()){var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n);OSF.OUtil.defineEnumerableProperty(f,o,{value:e})}else{t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t});if(r){var s=r.displayName||"appOM";delete r.displayName;OSF.OUtil.defineEnumerableProperty(f,s,{value:r})}u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}});var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n);OSF.OUtil.defineEnumerableProperty(f,o,{value:e})}};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});var u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext());return n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,o=n.length,e=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){for(var u in n){var i=n[u],r=t[u];if(i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw e();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw e();}};f.extractRequiredArguments=function(t,i,r){if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var f,e,l=n.length-1;l>=s;l--){var c=n[l];switch(typeof c){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=c;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=c;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}f=o.fillOptions(f,i,r,u);if(e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;o.verifyArguments(t,f);return f}this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),f=c(n,r,t,i);return o.constructCallArgs(r,f,t,i)};this.processResponse=function(n,t,i,f){var e;e=n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n);return e};this.getCallArgs=function(n){for(var t,u,r=n.length-1;r>=s;r--){var i=n[r];switch(typeof i){case"object":t=i;break;case h:u=i}}t=t||{};u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u);return t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var i=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],t=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],i,t,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback];if(f){var u={};u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext];var r;if(t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)u[OSF.DDA.AsyncResultEnum.Properties.Value]=i;else{r={};i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i;r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i}f(new OSF.DDA.AsyncResult(u,r))}};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){for(var t in n){var i={};OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}});OSF.DDA.SyncMethodNames[t]=i}};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);function o(n,i,r,u){if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var o,c,s=n.length-1;s>=e;s--){var h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}o=f.fillOptions(o,i,r,u);f.verifyArguments(t,o);return o}this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),e=o(n,r,t,i);return f.constructCallArgs(r,e,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){var l="fromHost",i=this,o="toHost",f=l,a="sourceData",u="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];function e(i,u){var a=i?{}:undefined;for(var h in i){var s=i[h],o;if(OSF.DDA.ListType.isListType(h)){o=[];for(var v in s)o.push(e(s[v],u))}else if(OSF.OUtil.listContainsKey(r,h))o=r[h][u](s);else if(u==f&&n.preserveNesting(h))o=e(s,u);else{var c=t[h];if(c){var l=c[u];if(l){o=l[s];o===undefined&&(o=s)}}else o=s}a[h]=o}return a}function c(i,r){var s;for(var f in r){var e;e=n.isComplexType(f)?c(i,t[f][o]):i[f];if(e!=undefined){s||(s={});var h=r[f];h==u&&(h=f);s[h]=n.pack(f,e)}}return s}function s(i,r,e){e||(e={});for(var h in r){var l=r[h],o;if(l==u)o=i;else if(l==a){e[h]=i.toArray();continue}else o=i[l];if(o===null||o===undefined)e[h]=undefined;else{o=n.unpack(h,o);var c;if(n.isComplexType(h)){c=t[h][f];n.preserveNesting(h)?e[h]=s(o,c):s(o,c,e)}else if(OSF.DDA.ListType.isListType(h)){c={};var p=OSF.DDA.ListType.getDescriptor(h);c[p]=u;var v=new Array(o.length);for(var y in o)v[y]=s(o[y],c);e[h]=v}else e[h]=o}}return e}function h(n,i,r){var f=t[n][r],u;if(r=="toHost"){var h=e(i,r);u=c(h,f)}else if(r==l){var o=s(i,f);u=e(o,r)}return u}t||(t={});i.addMapping=function(n,i){var e,s;if(i.map){e=i.map;s={};for(var c in e){var l=e[c];l==u&&(l=c);s[l]=c}}else{e=i.toHost;s=i.fromHost}var r=t[n];if(r){var h=r[o];for(var v in h)e[v]=h[v];h=r[f];for(var a in h)s[a]=h[a]}else r=t[n]={};r[o]=e;r[f]=s};i.toHost=function(n,t){return h(n,t,o)};i.fromHost=function(n,t){return h(n,t,f)};i.self=u;i.sourceData=a;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset);OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]));return OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){var r;r=this.isDynamicType(n)?t[n].toHost(i):i;return r};i.unpack=function(n,i){var r;r=this.isDynamicType(n)?t[n].fromHost(i):i;return r}};OSF.DDA.getDecoratedParameterMap=function(n,t){var i=new OSF.DDA.HostParameterMap(n),f=i.self;function r(n){var i=null;if(n){i={};for(var r=n.length,t=0;t0&&t.push(i)}}}catch(s){}return t}var i=[],n={};n[Microsoft.Office.WebExtension.Parameters.Data]=function(){var i=0,n=1;return{toHost:function(t){if(OSF.DDA.TableDataProperties&&typeof t!="string"&&t[OSF.DDA.TableDataProperties.TableRows]!==undefined){var r=[];r[i]=t[OSF.DDA.TableDataProperties.TableRows];r[n]=t[OSF.DDA.TableDataProperties.TableHeaders];t=r}return t},fromHost:function(r){var f;if(r.toArray){var e=r.dimensions();if(e===2)f=t(r);else{var u=r.toArray();if(u.length===2&&(u[0]!=null&&u[0].toArray||u[1]!=null&&u[1].toArray)){f={};f[OSF.DDA.TableDataProperties.TableRows]=t(u[i]);f[OSF.DDA.TableDataProperties.TableHeaders]=t(u[n])}else f=u}}else f=r;return f}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,i,n);this.unpack=function(t,i){var r;if(this.isComplexType(t)||OSF.DDA.ListType.isListType(t)){var u=(i||typeof i=="unknown")&&i.toArray;r=u?i.toArray():i||{}}else r=this.isDynamicType(t)?n[t].fromHost(i):i;return r}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(n){function i(n){var t=n;if(OSF.OUtil.isArray(n))for(var f=t.length,r=0;r2){u=[];for(var o=1;o-1&&(s="&");var y=screen.width*e.width/100,p=screen.height*e.height/100,w="width="+y+", height="+p;f[0]=f[0].concat(s).concat(a);var l=f.join(h);n.popup=window.open(l,"",w);function o(i){if(i.source==n.popup)try{var u=JSON.parse(i.data);u.dialogMessage&&r(t,[OSF.DialogMessageType.DialogMessageReceived,u.dialogMessage.messageContent])}catch(f){OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handlered. Message:"+i.data)}}window.addEventListener("message",o);function v(){try{if(n.popup==null||n.popup.closed){window.clearInterval(n.interval);window.removeEventListener("message",o);r(t,[OSF.DialogMessageType.DialogClosed])}}catch(i){OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed.")}}n.interval=window.setInterval(v,500);u(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}};n.prototype.messageParent=function(n){var i=n[Microsoft.Office.WebExtension.Parameters.MessageToParent],t={dialogMessage:{messageType:OSF.DialogMessageType.DialogMessageReceived,messageContent:i}};window.opener.postMessage(JSON.stringify(t),window.location.origin)};n.prototype.closeDialog=function(t,i,r){if(n.popup){n.interval&&window.clearInterval(n.interval);n.popup.close();r(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}else r(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)};n.prototype.sendMessage=function(){};return n}();n.MacRichClientHostController=t})(OfficeExt||(OfficeExt={}));OSF.ClientHostController=new OfficeExt.MacRichClientHostController;var OfficeExt;(function(n){var t;(function(t){var i=function(){var t=null;function n(){this._osfOfficeTheme=t;this._osfOfficeThemeTimeStamp=t}n.prototype.getOfficeTheme=function(){var u="GetOfficeThemeInfo",t=this;if(OSF.DDA._OsfControlContext){if(t._osfOfficeTheme&&t._osfOfficeThemeTimeStamp&&+new Date-t._osfOfficeThemeTimeStamp=3){f=n[0];e=n[2];var t=OSF.OUtil.parseSerializerVersionWithGivenFragment(!1,OSF._OfficeAppFactory.getWindowLocationHash());isNaN(t)&&OSF._OfficeAppFactory.getWindowName&&(t=OSF.OUtil.parseSerializerVersionFromWindowName(!1,OSF._OfficeAppFactory.getWindowName()));i=Microsoft.Office.Common.XdmCommunicationManager.connect(f,window.parent,e,t)}}var u=null;if(i)try{i.invoke("getCustomizedScriptPathAsync",function(n,t){o(n===0?t:null)},{__timeout__:1e3})}catch(s){OsfMsAjaxFactory.msAjaxDebug.trace("no script override through cross frame communication.")}else{try{window.external&&typeof window.external.getCustomizedScriptPath!="undefined"&&(u=window.external.getCustomizedScriptPath())}catch(s){OsfMsAjaxFactory.msAjaxDebug.trace("no script override through window.external.")}o(u)}},t=!0;t&&!OsfMsAjaxFactory.isMsAjaxLoaded()?OSF._OfficeAppFactory&&OSF._OfficeAppFactory&&OSF._OfficeAppFactory.getLoadScriptHelper&&OSF._OfficeAppFactory.getLoadScriptHelper().isScriptLoading(OSF.ConstantNames.MicrosoftAjaxId)?OSF._OfficeAppFactory.getLoadScriptHelper().waitForScripts([OSF.ConstantNames.MicrosoftAjaxId],n):OsfMsAjaxFactory.loadMsAjaxFull(function(){if(OsfMsAjaxFactory.isMsAjaxLoaded())n();else throw"Not able to load MicrosoftAjax.js.";}):n()})();Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(n){var t=this;t._eventHandlers={};t._queuedEventsArgs={};for(var r in n){var i=n[r];t._eventHandlers[i]=[];t._queuedEventsArgs[i]=[]}};OSF.EventDispatch.prototype={getSupportedEvents:function(){var n=[];for(var t in this._eventHandlers)n.push(t);return n},supportsEvent:function(n){var t=!1;for(var i in this._eventHandlers)if(n==i){t=!0;break}return t},hasEventHandler:function(n,t){var i=this._eventHandlers[n];if(i&&i.length>0)for(var r in i)if(i[r]===t)return!0;return!1},addEventHandler:function(n,t){if(typeof t!="function")return!1;var i=this._eventHandlers[n];if(i&&!this.hasEventHandler(n,t)){i.push(t);return!0}else return!1},addEventHandlerAndFireQueuedEvent:function(n,t){var r=this._eventHandlers[n],u=r.length==0,i=this.addEventHandler(n,t);u&&i&&this.fireQueuedEvent(n);return i},removeEventHandler:function(n,t){var i=this._eventHandlers[n];if(i&&i.length>0)for(var r=0;r0){this._eventHandlers[n]=[];return!0}return!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},fireEvent:function(n){if(n.type==undefined)return!1;var t=n.type;if(t&&this._eventHandlers[t]){var i=this._eventHandlers[t];for(var r in i)i[r](n);return!0}else return!1},fireOrQueueEvent:function(n){var i=this,t=n.type;if(t&&i._eventHandlers[t]){var u=i._eventHandlers[t],r=i._queuedEventsArgs[t];u.length==0?r.push(n):i.fireEvent(n);return!0}else return!1},fireQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var i=this._eventHandlers[n],t=this._queuedEventsArgs[n];if(i.length>0){for(var u=i[0];t.length>0;){var r=t.shift();u(r)}return!0}}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var f="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]=="outlook"||OSF._OfficeAppFactory.getHostInfo()[f]=="outlookwebapp"){r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i);t.initialize(r.initialData);t.setCurrentItemNumber(r.itemNumber.itemNumber)}else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var i=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),t=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];t(arguments,i,n)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(n){var i=OSF.DDA.SyncMethodNames.MessageParent.displayName,t=this;t[i]||OSF.OUtil.defineEnumerableProperty(t,i,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return n(arguments,t)}});var r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;t[r]||typeof OSF.DialogParentMessageEventDispatch=="undefined"||OSF.DDA.DispIdHost.addEventSupport(t,OSF.DialogParentMessageEventDispatch,n);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(n){n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:n[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}}],privateStateCallbacks:[],onSucceeded:function(n){var f=n[Microsoft.Office.WebExtension.Parameters.Id],i=n[Microsoft.Office.WebExtension.Parameters.Data],t=new OSF.DialogHandler,e=OSF.DDA.AsyncMethodNames.CloseAsync.displayName;OSF.OUtil.defineEnumerableProperty(t,e,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];n(arguments,f,i,t)}});var r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;OSF.OUtil.defineEnumerableProperty(t,r,{value:function(){var f=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],n=f.verifyAndExtractCall(arguments,t,i),u=n[Microsoft.Office.WebExtension.Parameters.EventType],r=n[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(u,r)}});var u=OSF.DDA.SyncMethodNames.SendMessage.displayName;OSF.OUtil.defineEnumerableProperty(t,u,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return n(arguments,i,t)}});return t},checkCallArgs:function(n){n[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Width]=1);n[Microsoft.Office.WebExtension.Parameters.Width]>100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99);n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1);n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99);n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0);return n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(n){try{n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,n);OSF.ClientHostController.openDialog(n.dispId,n.targetId,function(t,i){n.onEvent&&n.onEvent(i);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(n){n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,n);try{OSF.ClientHostController.closeDialog(n.dispId,n.targetId,t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.messageParent=function(n){try{n.onCalling&&n.onCalling();var i=+new Date,t=OSF.ClientHostController.messageParent(n.hostCallArgs);n.onReceiving&&n.onReceiving();OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs(+new Date-i),t);return t}catch(r){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(r)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.sendMessage=function(n){try{n.onCalling&&n.onCalling();var r=+new Date,t=OSF.ClientHostController.sendMessage(n.hostCallArgs);n.onReceiving&&n.onReceiving();return t}catch(i){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(i)}};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ItemChanged:"olkItemSelectedChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{OlkItemSelectedData:"OlkItemSelectedData"});OSF.DDA.OlkItemSelectedChangedEventArgs=function(n){var t=n[OSF.DDA.EventDescriptors.OlkItemSelectedData][0];t===""&&(t=null);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.ItemChanged},initialData:{value:JSON.parse(t)},itemNumber:{value:JSON.parse(n[OSF.DDA.EventDescriptors.OlkItemSelectedData][1])}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidOlkItemSelectedChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.OlkItemSelectedData,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}],isComplexType:!0});var OSFLog;(function(n){var u="ResponseTime",f="Message",r="SessionId",i="CorrelationId",t=!0,e=function(){function n(n){this._table=n;this._fields={}}Object.defineProperty(n.prototype,"Fields",{get:function(){return this._fields},enumerable:t,configurable:t});Object.defineProperty(n.prototype,"Table",{get:function(){return this._table},enumerable:t,configurable:t});n.prototype.SerializeFields=function(){};n.prototype.SetSerializedField=function(n,t){typeof t!="undefined"&&t!==null&&(this._serializedFields[n]=t.toString())};n.prototype.SerializeRow=function(){var n=this;n._serializedFields={};n.SetSerializedField("Table",n._table);n.SerializeFields();return JSON.stringify(n._serializedFields)};return n}();n.BaseUsageData=e;var c=function(n){var k="IsFromWacAutomation",w="WacHostEnvironment",b="HostJSVersion",y="OfficeJSVersion",p="DocUrl",g="AppSizeHeight",nt="AppSizeWidth",l="ClientId",d="HostVersion",s="Host",h="UserId",e="Browser",o="AssetId",a="AppURL",v="AppInstanceId",c="AppId";__extends(u,n);function u(){n.call(this,"AppActivated")}Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,c,{get:function(){return this.Fields[c]},set:function(n){this.Fields[c]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,v,{get:function(){return this.Fields[v]},set:function(n){this.Fields[v]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,a,{get:function(){return this.Fields[a]},set:function(n){this.Fields[a]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,d,{get:function(){return this.Fields[d]},set:function(n){this.Fields[d]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,l,{get:function(){return this.Fields[l]},set:function(n){this.Fields[l]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,nt,{get:function(){return this.Fields[nt]},set:function(n){this.Fields[nt]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,g,{get:function(){return this.Fields[g]},set:function(n){this.Fields[g]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,p,{get:function(){return this.Fields[p]},set:function(n){this.Fields[p]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,y,{get:function(){return this.Fields[y]},set:function(n){this.Fields[y]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,b,{get:function(){return this.Fields[b]},set:function(n){this.Fields[b]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,w,{get:function(){return this.Fields[w]},set:function(n){this.Fields[w]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,k,{get:function(){return this.Fields[k]},set:function(n){this.Fields[k]=n},enumerable:t,configurable:t});u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(c,n.AppId);n.SetSerializedField(v,n.AppInstanceId);n.SetSerializedField(a,n.AppURL);n.SetSerializedField(o,n.AssetId);n.SetSerializedField(e,n.Browser);n.SetSerializedField(h,n.UserId);n.SetSerializedField(s,n.Host);n.SetSerializedField(d,n.HostVersion);n.SetSerializedField(l,n.ClientId);n.SetSerializedField(nt,n.AppSizeWidth);n.SetSerializedField(g,n.AppSizeHeight);n.SetSerializedField(f,n.Message);n.SetSerializedField(p,n.DocUrl);n.SetSerializedField(y,n.OfficeJSVersion);n.SetSerializedField(b,n.HostJSVersion);n.SetSerializedField(w,n.WacHostEnvironment);n.SetSerializedField(k,n.IsFromWacAutomation)};return u}(e);n.AppActivatedUsageData=c;var l=function(n){var e="StartTime",o="ScriptId";__extends(f,n);function f(){n.call(this,"ScriptLoad")}Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t});f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(o,n.ScriptId);n.SetSerializedField(e,n.StartTime);n.SetSerializedField(u,n.ResponseTime)};return f}(e);n.ScriptLoadUsageData=l;var h=function(n){var h="CloseMethod",s="OpenTime",e="AppSizeFinalHeight",o="AppSizeFinalWidth",f="FocusTime";__extends(u,n);function u(){n.call(this,"AppClosed")}Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t});u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(f,n.FocusTime);n.SetSerializedField(o,n.AppSizeFinalWidth);n.SetSerializedField(e,n.AppSizeFinalHeight);n.SetSerializedField(s,n.OpenTime);n.SetSerializedField(h,n.CloseMethod)};return u}(e);n.AppClosedUsageData=h;var o=function(n){var s="ErrorType",o="Parameters",h="APIID",e="APIType";__extends(f,n);function f(){n.call(this,"APIUsage")}Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t});f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(e,n.APIType);n.SetSerializedField(h,n.APIID);n.SetSerializedField(o,n.Parameters);n.SetSerializedField(u,n.ResponseTime);n.SetSerializedField(s,n.ErrorType)};return f}(e);n.APIUsageUsageData=o;var s=function(n){var e="SuccessCode";__extends(u,n);function u(){n.call(this,"AppInitialization")}Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t});u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(e,n.SuccessCode);n.SetSerializedField(f,n.Message)};return u}(e);n.AppInitializationUsageData=s})(OSFLog||(OSFLog={}));var Logger;(function(n){"use strict";(function(n){n[n.info=0]="info";n[n.warning=1]="warning";n[n.error=2]="error"})(n.TraceLevel||(n.TraceLevel={}));var f=n.TraceLevel;(function(n){n[n.none=0]="none";n[n.flush=1]="flush"})(n.SendFlag||(n.SendFlag={}));var e=n.SendFlag;function u(){OSF.Logger&&OSF.Logger.ulsEndpoint&&OSF.Logger.ulsEndpoint.loadProxyFrame()}n.allowUploadingData=u;function t(n,t,i){if(OSF.Logger&&OSF.Logger.ulsEndpoint){var u={traceLevel:n,message:t,flag:i,internalLog:!0},r=JSON.stringify(u);OSF.Logger.ulsEndpoint.writeLog(r)}}n.sendLog=t;function i(){try{return new r}catch(n){return null}}var r=function(){function n(){var n=this,t=n;n.proxyFrame=null;n.telemetryEndPoint="https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html";n.buffer=[];n.proxyFrameReady=!1;OSF.OUtil.addEventListener(window,"message",function(n){return t.tellProxyFrameReady(n)});setTimeout(function(){t.loadProxyFrame()},3e3)}n.prototype.writeLog=function(t){var i=this;i.proxyFrameReady===!0?i.proxyFrame.contentWindow.postMessage(t,n.telemetryOrigin):i.buffer.length<128&&i.buffer.push(t)};n.prototype.loadProxyFrame=function(){var n=this;if(n.proxyFrame==null){n.proxyFrame=document.createElement("iframe");n.proxyFrame.setAttribute("style","display:none");n.proxyFrame.setAttribute("src",n.telemetryEndPoint);document.head.appendChild(n.proxyFrame)}};n.prototype.tellProxyFrameReady=function(t){var i=this,e=i;if(t.data==="ProxyFrameReadyToLog"){i.proxyFrameReady=!0;for(var r=0;r40){n=OSF.OUtil.Guid.generateNewGuid();t.setValue(t.clientIDKey,n)}return n};n.prototype.saveLog=function(n,t){var u=this,i=u.getValue(u.logIdSetKey);i=(i&&i.length>0?i+";":r)+n;u.setValue(u.logIdSetKey,i);u.setValue(n,t)};n.prototype.enumerateLog=function(n,t){var i=this,f=i.getValue(i.logIdSetKey);if(f){var e=f.split(";");for(var o in e){var r=e[o],u=i.getValue(r);if(u){n&&n(r,u);t&&i.remove(r)}}t&&i.remove(i.logIdSetKey)}};n.prototype.getValue=function(n){var i=OSF.OUtil.getLocalStorage(),t=r;i&&(t=i.getItem(n));return t};n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)};n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}};return n}(),o=function(){function n(){}n.prototype.LogData=function(n){if(OSF.Logger){OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n.SerializeRow(),OSF.Logger.SendFlag.none);OSFAriaLogger.AriaLogger.getInstance().logData(n)}};n.prototype.LogRawData=function(n){if(OSF.Logger){OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n,OSF.Logger.SendFlag.none);try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(n))}catch(t){}}};return n}();function u(n){n&&(n=n.replace(/[{}]/g,r).toLowerCase());return n||r}function k(e){if(OSF.Logger&&!t){t=new d;t.hostVersion=e.get_hostFullVersion()?e.get_hostFullVersion():e.get_appVersion();t.appId=e.get_id();t.host=e.get_appName();t.browser=window.navigator.userAgent;t.correlationId=u(e.get_correlationId());t.clientId=(new c).getClientId();t.appInstanceId=e.get_appInstanceId();t.appInstanceId&&(t.appInstanceId=t.appInstanceId.replace(/[{}]/g,r).toLowerCase());t.message=e.get_hostCustomMessage();t.officeJSVersion=OSF.ConstantNames.FileVersion;t.hostJSVersion="16.0.8010.1000";e._wacHostEnvironment&&(t.wacHostEnvironment=e._wacHostEnvironment);e._isFromWacAutomation!==undefined&&e._isFromWacAutomation!==i&&(t.isFromWacAutomation=e._isFromWacAutomation.toString().toLowerCase());var s=e.get_docUrl();t.docUrl=g.test(s)?s:r;var o=location.href;o&&(o=o.split("?")[0].split("#")[0]);t.appURL=o;(function(n,t){var o,s,u;t.assetId=r;t.userId=r;try{o=decodeURIComponent(n);s=new DOMParser;u=s.parseFromString(o,"text/xml");var e=u.getElementsByTagName("t")[0].attributes.getNamedItem("cid"),f=u.getElementsByTagName("t")[0].attributes.getNamedItem("oid");e&&e.nodeValue?t.userId=e.nodeValue:f&&f.nodeValue&&(t.userId=f.nodeValue);t.assetId=u.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(h){}finally{o=i;u=i;s=i}})(e.get_eToken(),t);(function(){var c=new Date,r=i,o=0,h=!1,u=function(){if(document.hasFocus())r==i&&(r=new Date);else if(r){o+=Math.abs(+new Date-r.getTime());r=i}},t=[];t.push(new f("focus",u));t.push(new f("blur",u));t.push(new f("focusout",u));t.push(new f("focusin",u));var s=function(){for(var u=0;u6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix){i=new Date(parseInt(t.slice(5,-1)));if(i)return i}return t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,!0);r[i]=t}catch(u){}}return r}};OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(n,t,i){Type.registerNamespace("Microsoft.Office.WebExtension.MailboxEnums");Microsoft.Office.WebExtension.MailboxEnums.EntityType={MeetingSuggestion:"meetingSuggestion",TaskSuggestion:"taskSuggestion",Address:"address",EmailAddress:"emailAddress",Url:"url",PhoneNumber:"phoneNumber",Contact:"contact",FlightReservations:"flightReservations",ParcelDeliveries:"parcelDeliveries"};Microsoft.Office.WebExtension.MailboxEnums.ItemType={Message:"message",Appointment:"appointment"};Microsoft.Office.WebExtension.MailboxEnums.ResponseType={None:"none",Organizer:"organizer",Tentative:"tentative",Accepted:"accepted",Declined:"declined"};Microsoft.Office.WebExtension.MailboxEnums.RecipientType={Other:"other",DistributionList:"distributionList",User:"user",ExternalUser:"externalUser"};Microsoft.Office.WebExtension.MailboxEnums.AttachmentType={File:"file",Item:"item",Cloud:"cloud"};Microsoft.Office.WebExtension.MailboxEnums.BodyType={Text:"text",Html:"html"};Microsoft.Office.WebExtension.MailboxEnums.ItemNotificationMessageType={ProgressIndicator:"progressIndicator",InformationalMessage:"informationalMessage",ErrorMessage:"errorMessage"};Microsoft.Office.WebExtension.CoercionType={Text:"text",Html:"html"};Microsoft.Office.WebExtension.MailboxEnums.UserProfileType={Office365:"office365",OutlookCom:"outlookCom",Enterprise:"enterprise"};Microsoft.Office.WebExtension.MailboxEnums.RestVersion={v1_0:"v1.0",v2_0:"v2.0",Beta:"beta"};Microsoft.Office.WebExtension.MailboxEnums.ModuleType={Addins:"addins"};Type.registerNamespace("OSF.DDA");var u=window.OSF||{};u.DDA=u.DDA||{};window.OSF.DDA.OutlookAppOm=u.DDA.OutlookAppOm=function(n,t,i){this.$$d_navigateToModuleAsync=Function.createDelegate(this,this.navigateToModuleAsync);this.$$d_displayPersonaCardAsync=Function.createDelegate(this,this.displayPersonaCardAsync);this.$$d_displayNewMessageFormApi=Function.createDelegate(this,this.displayNewMessageFormApi);this.$$d__displayNewAppointmentFormApi$p$0=Function.createDelegate(this,this._displayNewAppointmentFormApi$p$0);this.$$d_windowOpenOverrideHandler=Function.createDelegate(this,this.windowOpenOverrideHandler);this.$$d__getRestUrl$p$0=Function.createDelegate(this,this._getRestUrl$p$0);this.$$d__getEwsUrl$p$0=Function.createDelegate(this,this._getEwsUrl$p$0);this.$$d__getDiagnostics$p$0=Function.createDelegate(this,this._getDiagnostics$p$0);this.$$d__getUserProfile$p$0=Function.createDelegate(this,this._getUserProfile$p$0);this.$$d_getItem=Function.createDelegate(this,this.getItem);this.$$d__callAppReadyCallback$p$0=Function.createDelegate(this,this._callAppReadyCallback$p$0);this.$$d__getInitialDataResponseHandler$p$0=Function.createDelegate(this,this._getInitialDataResponseHandler$p$0);window.OSF.DDA.OutlookAppOm._instance$p=this;this._officeAppContext$p$0=n;this._appReadyCallback$p$0=i;var r=this;var u=function(){i&&(r._officeAppContext$p$0.get_isDialog()?window.setTimeout(r.$$d__callAppReadyCallback$p$0,0):r.invokeHostMethod(1,null,r.$$d__getInitialDataResponseHandler$p$0))};this._areStringsLoaded$p$0()?u():this._loadLocalizedScript$p$0(u)};window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i=function(n){if(!n)throw Error.create(window._u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text);};window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i=function(n,t,i,r){if(ni)throw Error.argumentOutOfRange(r);};window.OSF.DDA.OutlookAppOm._throwOnInvalidModule$p=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("module");else if(n==="")throw Error.argument("module","module cannot be empty.");if(n!==window.Microsoft.Office.WebExtension.MailboxEnums.ModuleType.Addins)throw Error.notImplemented(String.format("API not supported for module '{0}'",n));};window.OSF.DDA.OutlookAppOm._getHtmlBody$p=function(n){var t="";if("htmlBody"in n){window.OSF.DDA.OutlookAppOm._throwOnInvalidHtmlBody$p(n.htmlBody);t=n.htmlBody}return t};window.OSF.DDA.OutlookAppOm._getAttachments$p=function(n){var t=[];if("attachments"in n){t=n.attachments;window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentsArray$p(t)}return t};window.OSF.DDA.OutlookAppOm._getOptionsAndCallback$p=function(n){var t=[];"options"in n&&(t[0]=n.options);"callback"in n&&(t[t.length]=n.callback);return t};window.OSF.DDA.OutlookAppOm._createAttachmentsDataForHost$p=function(n){var r=new Array(0);if(Array.isInstanceOfType(n))for(var t=0;t2048)throw Error.argumentOutOfRange("attachments",n.length,window._u.ExtensibilityStrings.l_AttachmentUrlTooLong_Text);window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentName$p(t)};window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentItemIdOrName$p=function(n,t){if(!String.isInstanceOfType(n)||!String.isInstanceOfType(t))throw Error.argument("attachments");if(n.length>200)throw Error.argumentOutOfRange("attachments",n.length,window._u.ExtensibilityStrings.l_AttachmentItemIdTooLong_Text);window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentName$p(t)};window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentName$p=function(n){if(n.length>255)throw Error.argumentOutOfRange("attachments",n.length,window._u.ExtensibilityStrings.l_AttachmentNameTooLong_Text);};window.OSF.DDA.OutlookAppOm._throwOnInvalidRestVersion$p=function(n){if(!n)throw Error.argumentNull("restVersion");if(n!==window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v1_0&&n!==window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v2_0&&n!==window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.Beta)throw Error.argument("restVersion");};window.OSF.DDA.OutlookAppOm.getItemIdBasedOnHost=function(n){return window.OSF.DDA.OutlookAppOm._instance$p._initialData$p$0&&window.OSF.DDA.OutlookAppOm._instance$p._initialData$p$0.get__isRestIdSupported$i$0()?window.OSF.DDA.OutlookAppOm._instance$p.convertToRestId(n,window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v1_0):window.OSF.DDA.OutlookAppOm._instance$p.convertToEwsId(n,window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v1_0)};window.OSF.DDA.OutlookAppOm.addAdditionalArgs=function(n,t){return t};window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p=function(n,t,i){if(Object.getType(n)!==t)throw Error.argumentType(i);};window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p=function(n,t,i,u){if(!r.ScriptHelpers.isNullOrUndefined(n)){window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(n,String,u);var f=n;window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(f.length,t,i,u)}};window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p=function(n){return n?n.join(";"):null};window.OSF.DDA.OutlookAppOm._convertComposeEmailDictionaryParameterForSetApi$p=function(n){if(!n)return null;for(var i=new Array(n.length),t=0;t2&&r[2]>0&&f._additionalOutlookParams$p$0._itemNumber$p$0>0){var h=r[2];s=h!==f._additionalOutlookParams$p$0._itemNumber$p$0}if(Object.isInstanceOfType(o)){var u=o;if(s){u.error=!0;u.errorCode=9030}else if(r.length>1&&r[1]){u.error=!0;u.errorCode=r[1]}else u.error=!1;i(t,u)}else if(Number.isInstanceOfType(o)){var e={};e.error=!0;e.errorCode=s?9030:o;i(t,e)}else throw Error.notImplemented("Return data type from host must be Dictionary or int");}})}},_dictionaryToDate$i$0:function(n){var t=new Date(n.year,n.month,n.date,n.hours,n.minutes,n.seconds,n.milliseconds?n.milliseconds:0);if(window.isNaN(t.getTime()))throw Error.format(window._u.ExtensibilityStrings.l_InvalidDate_Text);return t},_dateToDictionary$i$0:function(n){var t={};t.month=n.getMonth();t.date=n.getDate();t.year=n.getFullYear();t.hours=n.getHours();t.minutes=n.getMinutes();t.seconds=n.getSeconds();t.milliseconds=n.getMilliseconds();return t},_isOwaOnlyMethod$p$0:function(n){switch(n){case 402:case 401:case 400:case 403:return!0;default:return!1}},isOutlook16OrGreater:function(){var n=this._initialData$p$0.get__hostVersion$i$0();var i=0;var t=0;if(n){i=n.indexOf(".");t=window.parseInt(n.substring(0,i))}return t>=16},isApiVersionSupported:function(n){var r=!1;try{var u=window.JSON.parse(this._officeAppContext$p$0.get_requirementMatrix());var f=u.Mailbox;var i=f.split(".");var t=n.split(".");(window.parseInt(i[0])>window.parseInt(t[0])||window.parseInt(i[0])===window.parseInt(t[0])&&window.parseInt(i[1])>=window.parseInt(t[1]))&&(r=!0)}catch(e){}return r},convertToOutlookParameters:function(n,t){var i=null;var u={};switch(n){case 1:case 2:case 3:case 14:case 18:case 26:case 32:case 41:case 34:break;case 12:u.isRest=t.isRest;break;case 4:var f=window.JSON.stringify(t.customProperties);i=[f];break;case 5:i=[t.body];break;case 8:case 9:i=[t.itemId];break;case 7:i=[window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.requiredAttendees),window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.optionalAttendees),t.start,t.end,t.location,window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.resources),t.subject,t.body];break;case 44:i=[window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.toRecipients),window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.ccRecipients),window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.bccRecipients),t.subject,t.htmlBody,t.attachments];break;case 43:i=[t.ewsIdOrEmail];break;case 45:i=[t.module,t.queryString];break;case 40:i=[t.extensionId,t.consentState];break;case 11:case 10:i=[t.htmlBody];break;case 31:case 30:i=[t.htmlBody,t.attachments];break;case 23:case 13:case 38:case 29:i=[t.data,t.coercionType];break;case 37:case 28:i=[t.coercionType];break;case 17:i=[t.subject];break;case 15:i=[t.recipientField];break;case 22:case 21:i=[t.recipientField,window.OSF.DDA.OutlookAppOm._convertComposeEmailDictionaryParameterForSetApi$p(t.recipientArray)];break;case 19:i=[t.itemId,t.name];break;case 16:i=[t.uri,t.name,t.isInline];break;case 20:i=[t.attachmentIndex];break;case 25:i=[t.TimeProperty,t.time];break;case 24:i=[t.TimeProperty];break;case 27:i=[t.location];break;case 33:case 35:i=[t.key,t.type,t.persistent,t.message,t.icon];break;case 36:i=[t.key];break;default:break}if(n!==1){var r;this._additionalOutlookParams$p$0.updateOutlookExecuteParameters(r={val:i},u),i=r.val}return i},_displayNewAppointmentFormApi$p$0:function(n){var f=window.OSF.DDA.OutlookAppOm._validateAndNormalizeRecipientEmails$p(n.requiredAttendees,"requiredAttendees");var u=window.OSF.DDA.OutlookAppOm._validateAndNormalizeRecipientEmails$p(n.optionalAttendees,"optionalAttendees");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(n.location,0,window.OSF.DDA.OutlookAppOm._maxLocationLength$p,"location");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(n.body,0,window.OSF.DDA.OutlookAppOm.maxBodyLength,"body");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(n.subject,0,window.OSF.DDA.OutlookAppOm._maxSubjectLength$p,"subject");if(!r.ScriptHelpers.isNullOrUndefined(n.start)){window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(n.start,Date,"start");var s=n.start;n.start=s.getTime();if(!r.ScriptHelpers.isNullOrUndefined(n.end)){window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(n.end,Date,"end");var i=n.end;if(i=0&&n.getTime()-u<0)return window.parseInt(t.offset)}throw Error.format(window._u.ExtensibilityStrings.l_InvalidDate_Text);},_areStringsLoaded$p$0:function(){var n=!1;try{n=!r.ScriptHelpers.isNullOrUndefined(window._u.ExtensibilityStrings.l_EwsRequestOversized_Text)}catch(t){}return n},_loadLocalizedScript$p$0:function(n){for(var s=null,l="",a=document.getElementsByTagName("script"),o=a.length-1;o>=0;o--){var i=null;var v=a[o].attributes;if(v){var p=v.getNamedItem("src");p&&(i=p.value);if(i){var y=!1;i=i.toLowerCase();var f=i.indexOf("office_strings.js");if(f<0){f=i.indexOf("office_strings.debug.js");y=!0}if(f>0&&fu+1&&(l=r.substring(0,u+1));break}}}}if(s){var h=document.getElementsByTagName("head")[0];var t=null;var b=this;var e=function(){if(n&&(!t.readyState||t.readyState&&(t.readyState==="loaded"||t.readyState==="complete"))){t.onload=null;t.onreadystatechange=null;n()}};var c=this;var w=function(){if(!c._areStringsLoaded$p$0()){var n=l+"en-us/"+"outlook_strings.js";t.onload=null;t.onreadystatechange=null;t=c._createScriptElement$p$0(n);t.onload=e;t.onreadystatechange=e;h.appendChild(t)}};t=this._createScriptElement$p$0(s);t.onload=e;t.onreadystatechange=e;window.setTimeout(w,2e3);h.appendChild(t)}},_createScriptElement$p$0:function(n){var t=document.createElement("script");t.type="text/javascript";t.src=n;return t}};u.DDA.OutlookAppOm.prototype.initialize=function(n){if(!n){this._additionalOutlookParams$p$0=new r.AdditionalGlobalParameters(!0);this._initialData$p$0=null;this._item$p$0=null;return}var t="itemType";this._initialData$p$0=new r.InitialData(n);this._hostItemType$p$0=n[t];1===n[t]?this._item$p$0=new r.Message(this._initialData$p$0):3===n[t]?this._item$p$0=new r.MeetingRequest(this._initialData$p$0):2===n[t]?this._item$p$0=new r.Appointment(this._initialData$p$0):4===n[t]?this._item$p$0=new r.MessageCompose(this._initialData$p$0):5===n[t]?this._item$p$0=new r.AppointmentCompose(this._initialData$p$0):6===n[t];this._userProfile$p$0=new r.UserProfile(this._initialData$p$0);this._diagnostics$p$0=new r.Diagnostics(this._initialData$p$0,this._officeAppContext$p$0.get_appName());var i=window.OSF.DDA.OutlookAppOm._instance$p.get__appName$i$0()!==8||this.isOutlook16OrGreater()||this.isApiVersionSupported("1.5");this._additionalOutlookParams$p$0=new r.AdditionalGlobalParameters(i);"itemNumber"in n&&this.setCurrentItemNumber(n.itemNumber);this._initializeMethods$p$0();r.InitialData._defineReadOnlyProperty$i(this,"item",this.$$d_getItem);r.InitialData._defineReadOnlyProperty$i(this,"userProfile",this.$$d__getUserProfile$p$0);r.InitialData._defineReadOnlyProperty$i(this,"diagnostics",this.$$d__getDiagnostics$p$0);r.InitialData._defineReadOnlyProperty$i(this,"ewsUrl",this.$$d__getEwsUrl$p$0);r.InitialData._defineReadOnlyProperty$i(this,"restUrl",this.$$d__getRestUrl$p$0);window.OSF.DDA.OutlookAppOm._instance$p.get__appName$i$0()===64&&this._initialData$p$0.get__overrideWindowOpen$i$0()&&(window.open=this.$$d_windowOpenOverrideHandler)};u.DDA.OutlookAppOm.prototype.makeEwsRequestAsync=function(n){for(var u=[],i=1;iwindow.OSF.DDA.OutlookAppOm._maxEwsRequestSize$p)throw Error.argument("data",window._u.ExtensibilityStrings.l_EwsRequestOversized_Text);this._throwOnMethodCallForInsufficientPermission$i$0(3,"makeEwsRequestAsync");var f=r.CommonParameters.parse(u,!0,!0);var t=new r.EwsRequest(f._asyncContext$p$0);var e=this;t.onreadystatechange=function(){4===t.get__requestState$i$1()&&f._callback$p$0(t._asyncResult$p$0)};t.send(n)};u.DDA.OutlookAppOm.prototype.recordDataPoint=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");this.invokeHostMethod(402,n,null)};u.DDA.OutlookAppOm.prototype.recordTrace=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");this.invokeHostMethod(401,n,null)};u.DDA.OutlookAppOm.prototype.trackCtq=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");this.invokeHostMethod(400,n,null)};u.DDA.OutlookAppOm.prototype.convertToLocalClientTime=function(n){var t=new Date(n.getTime());var i=t.getTimezoneOffset()*-1;if(this._initialData$p$0&&this._initialData$p$0.get__timeZoneOffsets$i$0()){t.setUTCMinutes(t.getUTCMinutes()-i);i=this._findOffset$p$0(t);t.setUTCMinutes(t.getUTCMinutes()+i)}var r=this._dateToDictionary$i$0(t);r.timezoneOffset=i;return r};u.DDA.OutlookAppOm.prototype.convertToUtcClientTime=function(n){var t=this._dictionaryToDate$i$0(n);if(this._initialData$p$0&&this._initialData$p$0.get__timeZoneOffsets$i$0()){var i=this._findOffset$p$0(t);t.setUTCMinutes(t.getUTCMinutes()-i);i=n.timezoneOffset?n.timezoneOffset:t.getTimezoneOffset()*-1;t.setUTCMinutes(t.getUTCMinutes()+i)}return t};u.DDA.OutlookAppOm.prototype.convertToRestId=function(n,t){if(!n)throw Error.argumentNull("itemId");window.OSF.DDA.OutlookAppOm._throwOnInvalidRestVersion$p(t);return n.replace(new RegExp("[/]","g"),"-").replace(new RegExp("[+]","g"),"_")};u.DDA.OutlookAppOm.prototype.convertToEwsId=function(n,t){if(!n)throw Error.argumentNull("itemId");window.OSF.DDA.OutlookAppOm._throwOnInvalidRestVersion$p(t);return n.replace(new RegExp("[-]","g"),"/").replace(new RegExp("[_]","g"),"+")};u.DDA.OutlookAppOm.prototype.getUserIdentityTokenAsync=function(){for(var i=[],n=0;n32768){var f=window.OSF.DDA.OutlookAppOm._instance$p.createAsyncResult(null,1,9019,n._asyncContext$p$0,"");var e=this;window.setTimeout(function(){n._callback$p$0(f)},0);return}window.OSF.DDA.OutlookAppOm._instance$p.get__appName$i$0()===64?this._saveSettingsForOwa$p$0(n._callback$p$0,n._asyncContext$p$0):this._saveSettingsForOutlook$p$0(n._callback$p$0,n._asyncContext$p$0)};Type.registerNamespace("$h");var r=window.$h||{};Type.registerNamespace("Office.cast");var f=window.Office||{};f.cast=f.cast||{};r.AdditionalGlobalParameters=function(n){this._parameterBlobSupported$p$0=n;this._itemNumber$p$0=0};r.AdditionalGlobalParameters.prototype={_parameterBlobSupported$p$0:!1,_itemNumber$p$0:0,setCurrentItemNumber:function(n){n>0&&(this._itemNumber$p$0=n)},get_itemNumber:function(){return this._itemNumber$p$0},updateOutlookExecuteParameters:function(n,t){if(this._parameterBlobSupported$p$0){this._itemNumber$p$0>0&&(t.itemNumber=this._itemNumber$p$0.toString());if(!Object.keys(t).length)return;n.val||(n.val=[]);n.val.push(window.JSON.stringify(t))}}};r.Appointment=function(n){this.$$d__getOrganizer$p$2=Function.createDelegate(this,this._getOrganizer$p$2);this.$$d__getNormalizedSubject$p$2=Function.createDelegate(this,this._getNormalizedSubject$p$2);this.$$d__getSubject$p$2=Function.createDelegate(this,this._getSubject$p$2);this.$$d__getResources$p$2=Function.createDelegate(this,this._getResources$p$2);this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2);this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2);this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2);this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2);this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2);r.Appointment.initializeBase(this,[n]);r.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2);r.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2);r.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2);r.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"resources",this.$$d__getResources$p$2);r.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2);r.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2);r.InitialData._defineReadOnlyProperty$i(this,"organizer",this.$$d__getOrganizer$p$2)};r.Appointment.prototype={getItemType:function(){return window.Microsoft.Office.WebExtension.MailboxEnums.ItemType.Appointment},_getStart$p$2:function(){return this._data$p$0.get__start$i$0()},_getEnd$p$2:function(){return this._data$p$0.get__end$i$0()},_getLocation$p$2:function(){return this._data$p$0.get__location$i$0()},_getOptionalAttendees$p$2:function(){return this._data$p$0.get__cc$i$0()},_getRequiredAttendees$p$2:function(){return this._data$p$0.get__to$i$0()},_getResources$p$2:function(){return this._data$p$0.get__resources$i$0()},_getSubject$p$2:function(){return this._data$p$0.get__subject$i$0()},_getNormalizedSubject$p$2:function(){return this._data$p$0.get__normalizedSubject$i$0()},_getOrganizer$p$2:function(){return this._data$p$0.get__organizer$i$0()}};r.Appointment.prototype.getEntities=function(){return this._data$p$0._getEntities$i$0()};r.Appointment.prototype.getEntitiesByType=function(n){return this._data$p$0._getEntitiesByType$i$0(n)};r.Appointment.prototype.getSelectedEntities=function(){return this._data$p$0._getSelectedEntities$i$0()};r.Appointment.prototype.getRegExMatches=function(){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches");return this._data$p$0._getRegExMatches$i$0()};r.Appointment.prototype.getFilteredEntitiesByName=function(n){return this._data$p$0._getFilteredEntitiesByName$i$0(n)};r.Appointment.prototype.getRegExMatchesByName=function(n){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName");return this._data$p$0._getRegExMatchesByName$i$0(n)};r.Appointment.prototype.getSelectedRegExMatches=function(){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedRegExMatches");return this._data$p$0._getSelectedRegExMatches$i$0()};r.Appointment.prototype.displayReplyForm=function(n){window.OSF.DDA.OutlookAppOm._instance$p._displayReplyForm$i$0(n)};r.Appointment.prototype.displayReplyAllForm=function(n){window.OSF.DDA.OutlookAppOm._instance$p._displayReplyAllForm$i$0(n)};r.AppointmentCompose=function(n){this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2);this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2);this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2);this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2);this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2);r.AppointmentCompose.initializeBase(this,[n]);r.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2);r.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2);r.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2)};r.AppointmentCompose.prototype={_requiredAttendees$p$2:null,_optionalAttendees$p$2:null,_start$p$2:null,_end$p$2:null,_location$p$2:null,getItemType:function(){return window.Microsoft.Office.WebExtension.MailboxEnums.ItemType.Appointment},_getRequiredAttendees$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._requiredAttendees$p$2||(this._requiredAttendees$p$2=new r.ComposeRecipient(0,"requiredAttendees"));return this._requiredAttendees$p$2},_getOptionalAttendees$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._optionalAttendees$p$2||(this._optionalAttendees$p$2=new r.ComposeRecipient(1,"optionalAttendees"));return this._optionalAttendees$p$2},_getStart$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._start$p$2||(this._start$p$2=new r.ComposeTime(1));return this._start$p$2},_getEnd$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._end$p$2||(this._end$p$2=new r.ComposeTime(2));return this._end$p$2},_getLocation$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._location$p$2||(this._location$p$2=new r.ComposeLocation);return this._location$p$2}};r.AttachmentConstants=function(){};r.AttachmentDetails=function(n){this.$$d__getIsInline$p$0=Function.createDelegate(this,this._getIsInline$p$0);this.$$d__getAttachmentType$p$0=Function.createDelegate(this,this._getAttachmentType$p$0);this.$$d__getSize$p$0=Function.createDelegate(this,this._getSize$p$0);this.$$d__getContentType$p$0=Function.createDelegate(this,this._getContentType$p$0);this.$$d__getName$p$0=Function.createDelegate(this,this._getName$p$0);this.$$d__getId$p$0=Function.createDelegate(this,this._getId$p$0);this._data$p$0=n;r.InitialData._defineReadOnlyProperty$i(this,"id",this.$$d__getId$p$0);r.InitialData._defineReadOnlyProperty$i(this,"name",this.$$d__getName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"contentType",this.$$d__getContentType$p$0);r.InitialData._defineReadOnlyProperty$i(this,"size",this.$$d__getSize$p$0);r.InitialData._defineReadOnlyProperty$i(this,"attachmentType",this.$$d__getAttachmentType$p$0);r.InitialData._defineReadOnlyProperty$i(this,"isInline",this.$$d__getIsInline$p$0)};r.AttachmentDetails.prototype={_data$p$0:null,_getId$p$0:function(){return this._data$p$0.id},_getName$p$0:function(){return this._data$p$0.name},_getContentType$p$0:function(){return this._data$p$0.contentType},_getSize$p$0:function(){return this._data$p$0.size},_getAttachmentType$p$0:function(){var n=this._data$p$0.attachmentType;return n255)throw Error.argumentOutOfRange("recipients",n.length,window._u.ExtensibilityStrings.l_DisplayNameTooLong_Text);if(t&&t.length>571)throw Error.argumentOutOfRange("recipients",t.length,window._u.ExtensibilityStrings.l_EmailAddressTooLong_Text);};r.ComposeRecipient._getAsyncFormatter$p=function(n){for(var u=n,i=[],t=0;t864e13)throw Error.argumentOutOfRange("dateTime");var i=r.CommonParameters.parse(u,!1);window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(25,{TimeProperty:this._timeType$p$0,time:n.getTime()},null,i._asyncContext$p$0,i._callback$p$0)};r.ComposeTime.TimeType=function(){};r.ComposeTime.TimeType.prototype={start:1,end:2};r.ComposeTime.TimeType.registerEnum("$h.ComposeTime.TimeType",!1);r.Contact=function(n){this.$$d__getContactString$p$0=Function.createDelegate(this,this._getContactString$p$0);this.$$d__getAddresses$p$0=Function.createDelegate(this,this._getAddresses$p$0);this.$$d__getUrls$p$0=Function.createDelegate(this,this._getUrls$p$0);this.$$d__getEmailAddresses$p$0=Function.createDelegate(this,this._getEmailAddresses$p$0);this.$$d__getPhoneNumbers$p$0=Function.createDelegate(this,this._getPhoneNumbers$p$0);this.$$d__getBusinessName$p$0=Function.createDelegate(this,this._getBusinessName$p$0);this.$$d__getPersonName$p$0=Function.createDelegate(this,this._getPersonName$p$0);this._data$p$0=n;r.InitialData._defineReadOnlyProperty$i(this,"personName",this.$$d__getPersonName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"businessName",this.$$d__getBusinessName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0);r.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0);r.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0);r.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0);r.InitialData._defineReadOnlyProperty$i(this,"contactString",this.$$d__getContactString$p$0)};r.Contact.prototype={_data$p$0:null,_phoneNumbers$p$0:null,_getPersonName$p$0:function(){return this._data$p$0.PersonName},_getBusinessName$p$0:function(){return this._data$p$0.BusinessName},_getAddresses$p$0:function(){return r.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses")},_getEmailAddresses$p$0:function(){return r.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses")},_getUrls$p$0:function(){return r.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls")},_getPhoneNumbers$p$0:function(){if(!this._phoneNumbers$p$0){var n=this;this._phoneNumbers$p$0=r.Entities._getExtractedObjects$i(r.PhoneNumber,this._data$p$0,"PhoneNumbers",function(n){return new r.PhoneNumber(n)})}return this._phoneNumbers$p$0},_getContactString$p$0:function(){return this._data$p$0.ContactString}};r.CustomProperties=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");if(Array.isInstanceOfType(n)){var t=n;if(t.length>0)this._data$p$0=t[0];else throw Error.argument("data");}else this._data$p$0=n};r.CustomProperties.prototype={_data$p$0:null};r.CustomProperties.prototype.get=function(n){var i=this._data$p$0[n];if(typeof i=="string"){var t=i;if(t.length>6&&t.startsWith("Date(")&&t.endsWith(")")){var f=t.substring(5,t.length-1);var r=window.parseInt(f);if(!window.isNaN(r)){var u=new Date(r);u&&(i=u)}}}return i};r.CustomProperties.prototype.set=function(n,t){window.OSF.OUtil.isDate(t)&&(t="Date("+t.getTime()+")");this._data$p$0[n]=t};r.CustomProperties.prototype.remove=function(n){delete this._data$p$0[n]};r.CustomProperties.prototype.saveAsync=function(){for(var i=[],n=0;nf)throw Error.argument();var t=r.CommonParameters.parse(i,!1,!0);var u=new r.SaveDictionaryRequest(t._callback$p$0,t._asyncContext$p$0);u._sendRequest$i$0(4,"SaveCustomProperties",{customProperties:this._data$p$0})};r.Diagnostics=function(n,t){this.$$d__getOwaView$p$0=Function.createDelegate(this,this._getOwaView$p$0);this.$$d__getHostVersion$p$0=Function.createDelegate(this,this._getHostVersion$p$0);this.$$d__getHostName$p$0=Function.createDelegate(this,this._getHostName$p$0);this._data$p$0=n;this._appName$p$0=t;r.InitialData._defineReadOnlyProperty$i(this,"hostName",this.$$d__getHostName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"hostVersion",this.$$d__getHostVersion$p$0);64===this._appName$p$0&&r.InitialData._defineReadOnlyProperty$i(this,"OWAView",this.$$d__getOwaView$p$0)};r.Diagnostics.prototype={_data$p$0:null,_appName$p$0:0,_getHostName$p$0:function(){switch(this._appName$p$0){case 8:return"Outlook";case 64:return"OutlookWebApp";case 65536:return"OutlookIOS";case 4194304:return"OutlookAndroid";default:return null}},_getHostVersion$p$0:function(){return this._data$p$0.get__hostVersion$i$0()},_getOwaView$p$0:function(){return this._data$p$0.get__owaView$i$0()}};r.EmailAddressDetails=function(n){this.$$d__getRecipientType$p$0=Function.createDelegate(this,this._getRecipientType$p$0);this.$$d__getAppointmentResponse$p$0=Function.createDelegate(this,this._getAppointmentResponse$p$0);this.$$d__getDisplayName$p$0=Function.createDelegate(this,this._getDisplayName$p$0);this.$$d__getEmailAddress$p$0=Function.createDelegate(this,this._getEmailAddress$p$0);this._data$p$0=n;r.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0);r.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0);r.ScriptHelpers.dictionaryContainsKey(n,"appointmentResponse")&&r.InitialData._defineReadOnlyProperty$i(this,"appointmentResponse",this.$$d__getAppointmentResponse$p$0);r.ScriptHelpers.dictionaryContainsKey(n,"recipientType")&&r.InitialData._defineReadOnlyProperty$i(this,"recipientType",this.$$d__getRecipientType$p$0)};r.EmailAddressDetails._createFromEmailUserDictionary$i=function(n){var t={};var u=n.Name;var i=n.UserId;t.name=u||r.EmailAddressDetails._emptyString$p;t.address=i||r.EmailAddressDetails._emptyString$p;return new r.EmailAddressDetails(t)};r.EmailAddressDetails.prototype={_data$p$0:null,_getEmailAddress$p$0:function(){return this._data$p$0.address},_getDisplayName$p$0:function(){return this._data$p$0.name},_getAppointmentResponse$p$0:function(){var n=this._data$p$0.appointmentResponse;return n=0;u--){for(var e=!1,f=u-1;f>=0;f--)if(i(t[u],t[f],r)){e=!0;break}e&&Array.removeAt(t,u)}return t};r.Entities.prototype={_dateTimeSent$p$0:null,_data$p$0:null,_filteredData$p$0:null,_filteredEntitiesCache$p$0:null,_permissionLevel$p$0:0,_taskSuggestions$p$0:null,_meetingSuggestions$p$0:null,_phoneNumbers$p$0:null,_contacts$p$0:null,_addresses$p$0:null,_emailAddresses$p$0:null,_urls$p$0:null,_flightReservations$p$0:null,_parcelDeliveries$p$0:null,_getByType$i$0:function(n){if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.MeetingSuggestion)return this._getMeetingSuggestions$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.TaskSuggestion)return this._getTaskSuggestions$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.Address)return this._getAddresses$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.PhoneNumber)return this._getPhoneNumbers$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.EmailAddress)return this._getEmailAddresses$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.Url)return this._getUrls$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.Contact)return this._getContacts$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.FlightReservations)return this._getFlightReservations$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.ParcelDeliveries)return this._getParcelDeliveries$p$0();return null},_getFilteredEntitiesByName$i$0:function(n){this._filteredEntitiesCache$p$0||(this._filteredEntitiesCache$p$0={});if(!r.ScriptHelpers.dictionaryContainsKey(this._filteredEntitiesCache$p$0,n)){for(var u=!1,i=0;i0)return new Date(n.getFullYear()+t._offset$i$1,0,1);break;default:break}return n};r.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p=function(n,t,i){if(t>-5&&t<5){var u=(i+6)%7+1;var r=7*t+(u-n.getDay());n.setDate(n.getDate()+r);return n}else{var r=(i-n.getDay())%7;r<0&&(r+=7);n.setDate(n.getDate()+r);return n}};r.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p=function(n,t){var e;var i;var u;e=n;if(t._tag$i$1<=0||t._tag$i$1>12||t._offset$i$1<=0||t._offset$i$1>5)return n;var o=(12+t._tag$i$1-e.getMonth()-1)%12;i=new Date(e.getFullYear(),e.getMonth()+o,1);if(t._modifier$i$1===1)if(t._offset$i$1===1&&i.getDay()!==6&&i.getDay())return i;else{u=new Date(i.getFullYear(),i.getMonth(),i.getDate());u.setDate(u.getDate()+(8-i.getDay())%7);i.getDay()!==6&&i.getDay()&&i.getDay()!==1&&u.setDate(u.getDate()-7);u.setDate(u.getDate()+7*(t._offset$i$1-1));return u.getMonth()+1!==t._tag$i$1?n:u}else{u=new Date(i.getFullYear(),i.getMonth(),r.MeetingSuggestionTimeDecoder._daysInMonth$p(i.getMonth(),i.getFullYear()));var f=1-u.getDay();f>0&&(f=f-7);u.setDate(u.getDate()+f);u.setDate(u.getDate()+7*(1-t._offset$i$1));return u.getMonth()+1!==t._tag$i$1?i.getDay()!==6&&i.getDay()?i:n:u}};r.MeetingSuggestionTimeDecoder._decode$p=function(n,t,i,u){var o=32767;i.val=null;u.val=0;if(!n)return!1;u.val=t?r.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p(n):r.MeetingSuggestionTimeDecoder._getTimeOfDayInMilliseconds$p(n);var s=n.getTime()-u.val;var f=(s-r.MeetingSuggestionTimeDecoder._baseDate$p.getTime())/864e5;if(f<0)return!1;else if(f>=262144)return!1;else{var e=f>>15;f=f&o;switch(e){case 0:return r.MeetingSuggestionTimeDecoder._decodePreciseDate$p(f,i);case 1:return r.MeetingSuggestionTimeDecoder._decodeRelativeDate$p(f,i);default:return!1}}};r.MeetingSuggestionTimeDecoder._decodePreciseDate$p=function(n,t){var c=7;var o=15;var s=31;var h=127;var f=null;var u=0;var e=0;t.val=null;var i=n>>12&c;if((i&4)==4){f=n>>5&h;if((i&2)==2){if((i&1)==1)return!1;u=n>>1&o}}else{(i&2)==2&&(u=n>>8&o);(i&1)==1&&(e=n>>3&s)}t.val=new r._preciseDate(e,u,f);return!0};r.MeetingSuggestionTimeDecoder._decodeRelativeDate$p=function(n,t){var s=15;var o=63;var c=7;var h=3;var u=n&s;n>>=4;var i=r.MeetingSuggestionTimeDecoder._fromComplement$p(n&o,6);n>>=6;var e=n&c;n>>=3;var f=n&h;try{t.val=new r._relativeDate(f,i,e,u);return!0}catch(l){t.val=null;return!1}};r.MeetingSuggestionTimeDecoder._fromComplement$p=function(n,t){var i=1<2||!Function.isInstanceOfType(n[0]))return!1;f=n[0];i>1&&(u=n[1]);t.val=new r.CommonParameters(null,f,u);return!0};r.CommonParameters.prototype={_options$p$0:null,_callback$p$0:null,_asyncContext$p$0:null,get_options:function(){return this._options$p$0},get_callback:function(){return this._callback$p$0},get_asyncContext:function(){return this._asyncContext$p$0}};r.EwsRequest=function(n){r.EwsRequest.initializeBase(this,[n])};r.EwsRequest.prototype={readyState:1,status:0,statusText:null,onreadystatechange:null,responseText:null,get__statusCode$i$1:function(){return this.status},set__statusCode$i$1:function(n){this.status=n;return n},get__statusDescription$i$1:function(){return this.statusText},set__statusDescription$i$1:function(n){this.statusText=n;return n},get__requestState$i$1:function(){return this.readyState},set__requestState$i$1:function(n){this.readyState=n;return n},get_hasOnReadyStateChangeCallback:function(){return!r.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)},get__response$i$1:function(){return this.responseText},set__response$i$1:function(n){this.responseText=n;return n},send:function(n){this._checkSendConditions$i$1();r.ScriptHelpers.isNullOrUndefined(n)&&this._throwInvalidStateException$i$1();this._sendRequest$i$0(5,"EwsRequest",{body:n})},_callOnReadyStateChangeCallback$i$1:function(){r.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)||this.onreadystatechange()},_parseExtraResponseData$i$1:function(n){},executeExtraFailedResponseSteps:function(){}};r.InitialData=function(n){this._data$p$0=n;this._permissionLevel$p$0=this._calculatePermissionLevel$p$0()};r.InitialData._defineReadOnlyProperty$i=function(n,t,i){var r={get:i,configurable:!1};window.Object.defineProperty(n,t,r)};r.InitialData.prototype={_toRecipients$p$0:null,_ccRecipients$p$0:null,_attachments$p$0:null,_resources$p$0:null,_entities$p$0:null,_selectedEntities$p$0:null,_data$p$0:null,_permissionLevel$p$0:0,get__isRestIdSupported$i$0:function(){return this._data$p$0.isRestIdSupported},get__itemId$i$0:function(){return this._data$p$0.id},get__itemClass$i$0:function(){return this._data$p$0.itemClass},get__dateTimeCreated$i$0:function(){return new Date(this._data$p$0.dateTimeCreated)},get__dateTimeModified$i$0:function(){return new Date(this._data$p$0.dateTimeModified)},get__dateTimeSent$i$0:function(){return new Date(this._data$p$0.dateTimeSent)},get__subject$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();return this._data$p$0.subject},get__normalizedSubject$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();return this._data$p$0.normalizedSubject},get__internetMessageId$i$0:function(){return this._data$p$0.internetMessageId},get__conversationId$i$0:function(){return this._data$p$0.conversationId},get__sender$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();var n=this._data$p$0.sender;return r.ScriptHelpers.isNullOrUndefined(n)?null:new r.EmailAddressDetails(n)},get__from$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();var n=this._data$p$0.from;return r.ScriptHelpers.isNullOrUndefined(n)?null:new r.EmailAddressDetails(n)},get__to$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._toRecipients$p$0&&(this._toRecipients$p$0=this._createEmailAddressDetails$p$0("to"));return this._toRecipients$p$0},get__cc$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._ccRecipients$p$0&&(this._ccRecipients$p$0=this._createEmailAddressDetails$p$0("cc"));return this._ccRecipients$p$0},get__attachments$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._attachments$p$0&&(this._attachments$p$0=this._createAttachmentDetails$p$0());return this._attachments$p$0},get__ewsUrl$i$0:function(){return this._data$p$0.ewsUrl},get__restUrl$i$0:function(){return this._data$p$0.restUrl},get__marketplaceAssetId$i$0:function(){return this._data$p$0.marketplaceAssetId},get__extensionId$i$0:function(){return this._data$p$0.extensionId},get__marketplaceContentMarket$i$0:function(){return this._data$p$0.marketplaceContentMarket},get__consentMetadata$i$0:function(){return this._data$p$0.consentMetadata},get__isRead$i$0:function(){return this._data$p$0.isRead},get__endNodeUrl$i$0:function(){return this._data$p$0.endNodeUrl},get__entryPointUrl$i$0:function(){return this._data$p$0.entryPointUrl},get__start$i$0:function(){return new Date(this._data$p$0.start)},get__end$i$0:function(){return new Date(this._data$p$0.end)},get__location$i$0:function(){return this._data$p$0.location},get__userProfileType$i$0:function(){return this._data$p$0.userProfileType},get__resources$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._resources$p$0&&(this._resources$p$0=this._createEmailAddressDetails$p$0("resources"));return this._resources$p$0},get__organizer$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();var n=this._data$p$0.organizer;return r.ScriptHelpers.isNullOrUndefined(n)?null:new r.EmailAddressDetails(n)},get__userDisplayName$i$0:function(){return this._data$p$0.userDisplayName},get__userEmailAddress$i$0:function(){return this._data$p$0.userEmailAddress},get__userTimeZone$i$0:function(){return this._data$p$0.userTimeZone},get__timeZoneOffsets$i$0:function(){return this._data$p$0.timeZoneOffsets},get__hostVersion$i$0:function(){return this._data$p$0.hostVersion},get__owaView$i$0:function(){return this._data$p$0.owaView},get__overrideWindowOpen$i$0:function(){return this._data$p$0.overrideWindowOpen},_getEntities$i$0:function(){this._entities$p$0||(this._entities$p$0=new r.Entities(this._data$p$0.entities,this._data$p$0.filteredEntities,this.get__dateTimeSent$i$0(),this._permissionLevel$p$0));return this._entities$p$0},_getSelectedEntities$i$0:function(){this._selectedEntities$p$0||(this._selectedEntities$p$0=new r.Entities(this._data$p$0.selectedEntities,null,this.get__dateTimeSent$i$0(),this._permissionLevel$p$0));return this._selectedEntities$p$0},_getEntitiesByType$i$0:function(n){var t=this._getEntities$i$0();return t._getByType$i$0(n)},_getFilteredEntitiesByName$i$0:function(n){var t=this._getEntities$i$0();return t._getFilteredEntitiesByName$i$0(n)},_getRegExMatches$i$0:function(){return this._data$p$0.regExMatches?this._data$p$0.regExMatches:null},_getSelectedRegExMatches$i$0:function(){return this._data$p$0.selectedRegExMatches?this._data$p$0.selectedRegExMatches:null},_getRegExMatchesByName$i$0:function(n){var t=this._getRegExMatches$i$0();return!t||!t[n]?null:t[n]},_throwOnRestrictedPermissionLevel$i$0:function(){window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0)},_createEmailAddressDetails$p$0:function(n){var i=this._data$p$0[n];if(r.ScriptHelpers.isNullOrUndefined(i))return[];for(var u=[],t=0;t0?i.push(t):t.tabIndex===0&&u.push(t):u.push(t)}i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;r===0&&(r=i.indexOf(n)-i.indexOf(t));return r});return[].concat(i,u)}return{set_entropy:function(n){if(typeof n=="string")for(var i=0;i1?c[c.length-1]:n;if(r&&o!=n){o.indexOf(rt)>=0&&(o=o.split(rt)[0]);o=decodeURIComponent(o)}var l=p();if(!f&&l){var s=window.name.indexOf(i);if(s>u){var h=window.name.indexOf(";",s);h==u&&(h=window.name.length);var a=window.name.substring(s,h);o?l.setItem(a,o):o=l.getItem(a)}}return o},getConversationId:function(){var i=window.location.search,t=n;if(i){var r=i.indexOf("&");t=r>0?i.substring(1,r):i.substr(1);if(t&&t.charAt(t.length-1)==="="){t=t.substring(0,t.length-1);t&&(t=decodeURIComponent(t))}}return t},getInfoItems:function(n){var t=n.split("$");typeof t[1]==c&&(t=n.split("|"));typeof t[1]==c&&(t=n.split("%7C"));return t},getXdmFieldValue:function(n,t){var u=r,f=OSF.OUtil.parseXdmInfo(t);if(f){var i=OSF.OUtil.getInfoItems(f);if(i!=undefined&&i.length>=3)switch(n){case OSF.XdmFieldName.ConversationUrl:u=i[2];break;case OSF.XdmFieldName.AppId:u=i[1]}}return u},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]);if(u)throw u;for(var f in r){u=Function._validateParameter(n[f],r[f],f);if(u)throw u;}},writeProfilerMark:function(n){if(window.msWriteProfilerMark){window.msWriteProfilerMark(n);OsfMsAjaxFactory.msAjaxDebug.trace(n)}},outputDebug:function(n){typeof OsfMsAjaxFactory!==c&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){r=r||{};for(var e in u){var f=u[e];r[f]==undefined&&(r[f]=i)}Object.defineProperty(n,t,r);return n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[h])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[h])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[it,h,tt])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[it,h,tt])},finalizeProperties:function(n,r){r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8;e=o&255;i[t++]=u>>2;i[t++]=(u&3)<<4|f>>4;i[t++]=(f&15)<<2|e>>6;i[t++]=e&63;if(!isNaN(o)){u=o>>8;f=h&255;e=h>>8;i[t++]=u>>2;i[t++]=(u&3)<<4|f>>4;i[t++]=(f&15)<<2|e>>6;i[t++]=e&63}if(isNaN(o))i[t-1]=64;else if(isNaN(h)){i[t-2]=64;i[t-1]=64}for(var c=0;c0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(var u=[],r=0;rn)return u;else if(t===0&&i)return u;else if(t===n-1&&!i)return u;return i?t-1:t+1};r=d(r);s=f?r.length-1:0;if(r.length===0)return n;while(!h&&s>=0&&sn)return u;else if(t===0&&i)return u;else if(t===n-1&&!i)return u;return i?t-1:t+1};r=d(r);v=y(r,f);s=l(r.length,v,e);if(s<0)return n;while(!c&&s>=0&&s0;t++){(t==8||t==12||t==16||t==20)&&(i+="-");i+=n[r%16];r=Math.floor(r/16)}for(;t<32;t++){(t==8||t==12||t==16||t==20)&&(i+="-");i+=n[Math.floor(Math.random()*16)]}return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3};OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",Reserved:"reserved",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidOpenBrowserWindow:102,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];if(i){i.name||(i.name=n[this.errorCodes.ooeInternalError].name);i.message||(i.message=n[this.errorCodes.ooeInternalError].message)}else i=n[this.errorCodes.ooeInternalError];return i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:t.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:t.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage}}}}();var OfficeExt;(function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}();n.RequirementVersion=ut;var r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){if(n==undefined)return!1;t==undefined&&(t=0);var f=this._setMap,u=f._sets;if(u.hasOwnProperty(n.toLowerCase())){var e=u[n.toLowerCase()];try{var i=this._getVersion(e);t=t+"";var r=this._getVersion(t);if(i.major>0&&i.major>r.major||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),r=0,i=0;if(t.length<2&&isNaN(Number(n)))throw u;else{r=Number(t[0]);t.length>=2&&(i=Number(t[1]));if(isNaN(r)||isNaN(i))throw u;}return{minor:i,major:r}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;var i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;var k=function(n){__extends(i,n);function i(){n.call(this,{dialogapi:t})}return i}(i);n.DefaultDialogSetRequirement=k;var o=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return i}(i);n.ExcelClientDefaultSetRequirement=o;var d=function(n){__extends(i,n);function i(){n.call(this);this._addSetMap({imagecoercion:t})}return i}(o);n.ExcelClientV1DefaultSetRequirement=d;var w=function(n){__extends(t,n);function t(){n.call(this,{mailbox:1.3})}return t}(i);n.OutlookClientDefaultSetRequirement=w;var f=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return i}(i);n.WordClientDefaultSetRequirement=f;var b=function(n){__extends(i,n);function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return i}(f);n.WordClientV1DefaultSetRequirement=b;var e=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return i}(i);n.PowerpointClientDefaultSetRequirement=e;var tt=function(n){__extends(i,n);function i(){n.call(this);this._addSetMap({imagecoercion:t})}return i}(e);n.PowerpointClientV1DefaultSetRequirement=tt;var it=function(n){__extends(i,n);function i(){n.call(this,{selection:t,textcoercion:t})}return i}(i);n.ProjectClientDefaultSetRequirement=it;var g=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return i}(i);n.ExcelWebDefaultSetRequirement=g;var nt=function(n){__extends(i,n);function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return i}(i);n.WordWebDefaultSetRequirement=nt;var h=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,settings:t})}return i}(i);n.PowerpointWebDefaultSetRequirement=h;var s=function(n){__extends(t,n);function t(){n.call(this,{mailbox:1.3})}return t}(i);n.OutlookWebDefaultSetRequirement=s;var l=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return i}(i);n.SwayWebDefaultSetRequirement=l;var c=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return i}(i);n.AccessWebDefaultSetRequirement=c;var y=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return i}(i);n.ExcelIOSDefaultSetRequirement=y;var u=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return i}(i);n.WordIOSDefaultSetRequirement=u;var p=function(n){__extends(t,n);function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return t}(u);n.WordIOSV1DefaultSetRequirement=p;var a=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return i}(i);n.PowerpointIOSDefaultSetRequirement=a;var v=function(n){__extends(i,n);function i(){n.call(this,{mailbox:t})}return i}(i);n.OutlookIOSDefaultSetRequirement=v;var rt=function(){var t="undefined";function n(){}n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)};n.getDefaultRequirementMatrix=function(u){this.initializeDefaultSetMatrix();var f=undefined,o=u.get_requirementMatrix();if(o!=undefined&&o.length>0&&typeof JSON!==t){var s=JSON.parse(u.get_requirementMatrix().toLowerCase());f=new r(new i(s))}else{var e=n.getClientFullVersionString(u);f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[e]!=undefined?new r(n.DefaultSetArrayMatrix[e]):new r(new i({}))}return f};n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix();if(f!=undefined&&f.length>0&&typeof JSON!==t){var e=JSON.parse(n.get_requirementMatrix().toLowerCase());u=new r(new i(e))}else u=new r(new k);return u};n.getClientFullVersionString=function(n){var r=n.get_appMinorVersion(),u="",i="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;if(f&&n.get_appVersion()==1)i=t==4096&&r>=15?"16.00.01":"16.00";else if(n.get_appName()==64)i=n.get_appVersion();else{u=r<10?"0"+r:""+r;i=n.get_appVersion()+"."+u}return n.get_appName()+"-"+i};n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new o;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new d;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new b;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new tt;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new w;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new g;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new nt;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new s;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new s;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new it;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new c;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new h;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new y;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new l;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new u;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new p;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new a;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new v};n.Excel_RCLIENT_1600="1-16.00";n.Excel_RCLIENT_1601="1-16.01";n.Word_RCLIENT_1600="2-16.00";n.Word_RCLIENT_1601="2-16.01";n.PowerPoint_RCLIENT_1600="4-16.00";n.PowerPoint_RCLIENT_1601="4-16.01";n.Outlook_RCLIENT_1600="8-16.00";n.Excel_WAC_1600="16-16.00";n.Word_WAC_1600="32-16.00";n.Outlook_WAC_1600="64-16.00";n.Outlook_WAC_1601="64-16.01";n.Project_RCLIENT_1600="128-16.00";n.Access_WAC_1600="256-16.00";n.PowerPoint_WAC_1600="512-16.00";n.Excel_IOS_1600="1024-16.00";n.SWAY_WAC_1600="2048-16.00";n.Word_IOS_1600="4096-16.00";n.Word_IOS_16001="4096-16.00.01";n.PowerPoint_IOS_1600="8192-16.00";n.Outlook_IOS_1600="65536-16.00";n.DefaultSetArrayMatrix={};return n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))})(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda();var OfficeExt;(function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n};n.getInstance=function(){n.hostObj===undefined&&(n.hostObj=new n);return n.hostObj};n.prototype.getPlatform=function(){var n=this;if(n.hostInfo.hostPlatform){var t=n.hostInfo.hostPlatform.toLowerCase();if(n.platformRemappings[t])return n.platformRemappings[t]}return null};n.prototype.getHost=function(){var n=this;if(n.hostInfo.hostType){var t=n.hostInfo.hostType.toLowerCase();if(n.camelCaseMappings[t])return n.camelCaseMappings[t];t=n.capitalizeFirstLetter(n.hostInfo.hostType);if(Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null};n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null};return n}();n.Host=t})(t=n.HostName||(n.HostName={}))})(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){if(!n){window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window);window.Office=Microsoft.Office.WebExtension;n=!0}},disableShortcut:function(){if(n){t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window);n=!1}}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i;if(n&&typeof n=="string"){var r=n.indexOf("#");if(r!=-1){var o=n.substring(0,r),e=n.substring(r+1);switch(o){case"binding":case"bindings":e&&(i=new OSF.DDA.BindingPromise(e))}}}if(i){i.onFail=t;return i}else if(t){var u=typeof t;if(u=="function"){var f={};f[Microsoft.Office.WebExtension.Parameters.Callback]=t;OSF.DDA.issueAsyncResult(f,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,u);}};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.auth&&OSF.OUtil.defineEnumerableProperty(f,"auth",{value:n.auth});if(n.get_isDialog()){var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n);OSF.OUtil.defineEnumerableProperty(f,o,{value:e})}else{t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t});if(r){var s=r.displayName||"appOM";delete r.displayName;OSF.OUtil.defineEnumerableProperty(f,s,{value:r})}u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}});var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n);OSF.OUtil.defineEnumerableProperty(f,o,{value:e})}};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});var u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext());return n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,o=n.length,e=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){for(var u in n){var i=n[u],r=t[u];if(i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw e();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw e();}};f.extractRequiredArguments=function(t,i,r){if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var f,e,l=n.length-1;l>=s;l--){var c=n[l];switch(typeof c){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=c;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=c;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}f=o.fillOptions(f,i,r,u);if(e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;o.verifyArguments(t,f);return f}this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),f=c(n,r,t,i);return o.constructCallArgs(r,f,t,i)};this.processResponse=function(n,t,i,f){var e;e=n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n);return e};this.getCallArgs=function(n){for(var t,u,r=n.length-1;r>=s;r--){var i=n[r];switch(typeof i){case"object":t=i;break;case h:u=i}}t=t||{};u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u);return t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var i=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],t=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],i,t,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback];if(f){var u={};u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext];var r;if(t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)u[OSF.DDA.AsyncResultEnum.Properties.Value]=i;else{r={};i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i;r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i}f(new OSF.DDA.AsyncResult(u,r))}};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){for(var t in n){var i={};OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}});OSF.DDA.SyncMethodNames[t]=i}};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);function o(n,i,r,u){if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var o,c,s=n.length-1;s>=e;s--){var h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}o=f.fillOptions(o,i,r,u);f.verifyArguments(t,o);return o}this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),e=o(n,r,t,i);return f.constructCallArgs(r,e,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){var l="fromHost",i=this,o="toHost",f=l,a="sourceData",u="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];function e(i,u){var a=i?{}:undefined;for(var h in i){var s=i[h],o;if(OSF.DDA.ListType.isListType(h)){o=[];for(var v in s)o.push(e(s[v],u))}else if(OSF.OUtil.listContainsKey(r,h))o=r[h][u](s);else if(u==f&&n.preserveNesting(h))o=e(s,u);else{var c=t[h];if(c){var l=c[u];if(l){o=l[s];o===undefined&&(o=s)}}else o=s}a[h]=o}return a}function c(i,r){var s;for(var f in r){var e;e=n.isComplexType(f)?c(i,t[f][o]):i[f];if(e!=undefined){s||(s={});var h=r[f];h==u&&(h=f);s[h]=n.pack(f,e)}}return s}function s(i,r,e){e||(e={});for(var h in r){var l=r[h],o;if(l==u)o=i;else if(l==a){e[h]=i.toArray();continue}else o=i[l];if(o===null||o===undefined)e[h]=undefined;else{o=n.unpack(h,o);var c;if(n.isComplexType(h)){c=t[h][f];n.preserveNesting(h)?e[h]=s(o,c):s(o,c,e)}else if(OSF.DDA.ListType.isListType(h)){c={};var p=OSF.DDA.ListType.getDescriptor(h);c[p]=u;var v=new Array(o.length);for(var y in o)v[y]=s(o[y],c);e[h]=v}else e[h]=o}}return e}function h(n,i,r){var f=t[n][r],u;if(r=="toHost"){var h=e(i,r);u=c(h,f)}else if(r==l){var o=s(i,f);u=e(o,r)}return u}t||(t={});i.addMapping=function(n,i){var e,s;if(i.map){e=i.map;s={};for(var c in e){var l=e[c];l==u&&(l=c);s[l]=c}}else{e=i.toHost;s=i.fromHost}var r=t[n];if(r){var h=r[o];for(var v in h)e[v]=h[v];h=r[f];for(var a in h)s[a]=h[a]}else r=t[n]={};r[o]=e;r[f]=s};i.toHost=function(n,t){return h(n,t,o)};i.fromHost=function(n,t){return h(n,t,f)};i.self=u;i.sourceData=a;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset);OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]));return OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){var r;r=this.isDynamicType(n)?t[n].toHost(i):i;return r};i.unpack=function(n,i){var r;r=this.isDynamicType(n)?t[n].fromHost(i):i;return r}};OSF.DDA.getDecoratedParameterMap=function(n,t){var i=new OSF.DDA.HostParameterMap(n),f=i.self;function r(n){var i=null;if(n){i={};for(var r=n.length,t=0;t0&&t.push(i)}}}catch(s){}return t}var i=[],n={};n[Microsoft.Office.WebExtension.Parameters.Data]=function(){var i=0,n=1;return{toHost:function(t){if(OSF.DDA.TableDataProperties&&typeof t!="string"&&t[OSF.DDA.TableDataProperties.TableRows]!==undefined){var r=[];r[i]=t[OSF.DDA.TableDataProperties.TableRows];r[n]=t[OSF.DDA.TableDataProperties.TableHeaders];t=r}return t},fromHost:function(r){var f;if(r.toArray){var e=r.dimensions();if(e===2)f=t(r);else{var u=r.toArray();if(u.length===2&&(u[0]!=null&&u[0].toArray||u[1]!=null&&u[1].toArray)){f={};f[OSF.DDA.TableDataProperties.TableRows]=t(u[i]);f[OSF.DDA.TableDataProperties.TableHeaders]=t(u[n])}else f=u}}else f=r;return f}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,i,n);this.unpack=function(t,i){var r;if(this.isComplexType(t)||OSF.DDA.ListType.isListType(t)){var u=(i||typeof i=="unknown")&&i.toArray;r=u?i.toArray():i||{}}else r=this.isDynamicType(t)?n[t].fromHost(i):i;return r}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(n){function i(n){var t=n;if(OSF.OUtil.isArray(n))for(var f=t.length,r=0;r2){r=[];for(var f=1;f-1&&(o="&");var p=screen.width*e.width/100,a=screen.height*e.height/100,k="width="+p+", height="+a;f[0]=f[0].concat(o).concat(w);var b=f.join(c);n.popup=window.open(b,"",k);function h(i){if(i.source==n.popup)try{var u=JSON.parse(i.data);u.dialogMessage&&r(t,[OSF.DialogMessageType.DialogMessageReceived,u.dialogMessage.messageContent])}catch(f){OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handlered. Message:"+i.data)}}function v(){try{if(n.popup==null||n.popup.closed){window.clearInterval(n.interval);window.removeEventListener("message",h);n.NotifyError=null;r(t,[OSF.DialogMessageType.DialogClosed])}}catch(i){OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed.")}}if(n.popup!=undefined&&window.dialogAPIErrorCode==undefined){window.addEventListener("message",h);n.interval=window.setInterval(v,500);function y(n){r(t,[n])}n.NotifyError=y;u(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}else{var s=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;window.dialogAPIErrorCode&&(s=window.dialogAPIErrorCode);u(s)}}};n.prototype.messageParent=function(n){var i=n[Microsoft.Office.WebExtension.Parameters.MessageToParent],t={dialogMessage:{messageType:OSF.DialogMessageType.DialogMessageReceived,messageContent:i}};window.opener.postMessage(JSON.stringify(t),window.location.origin)};n.prototype.closeDialog=function(t,i,r){if(n.popup){n.interval&&window.clearInterval(n.interval);n.popup.close();n.NotifyError=null;r(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}else r(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)};n.prototype.sendMessage=function(){};return n}();n.MacRichClientHostController=t})(OfficeExt||(OfficeExt={}));OSF.ClientHostController=new OfficeExt.MacRichClientHostController;var OfficeExt;(function(n){var t;(function(t){var i=function(){var t=null;function n(){this._osfOfficeTheme=t;this._osfOfficeThemeTimeStamp=t}n.prototype.getOfficeTheme=function(){var u="GetOfficeThemeInfo",t=this;if(OSF.DDA._OsfControlContext){if(t._osfOfficeTheme&&t._osfOfficeThemeTimeStamp&&+new Date-t._osfOfficeThemeTimeStamp=3){f=n[0];e=n[2];var t=OSF.OUtil.parseSerializerVersionWithGivenFragment(!1,OSF._OfficeAppFactory.getWindowLocationHash());isNaN(t)&&OSF._OfficeAppFactory.getWindowName&&(t=OSF.OUtil.parseSerializerVersionFromWindowName(!1,OSF._OfficeAppFactory.getWindowName()));i=Microsoft.Office.Common.XdmCommunicationManager.connect(f,window.parent,e,t)}}var u=null;if(i)try{i.invoke("getCustomizedScriptPathAsync",function(n,t){o(n===0?t:null)},{__timeout__:1e3})}catch(s){OsfMsAjaxFactory.msAjaxDebug.trace("no script override through cross frame communication.")}else{try{window.external&&typeof window.external.getCustomizedScriptPath!="undefined"&&(u=window.external.getCustomizedScriptPath())}catch(s){OsfMsAjaxFactory.msAjaxDebug.trace("no script override through window.external.")}o(u)}},t=!0;t&&!OsfMsAjaxFactory.isMsAjaxLoaded()?OSF._OfficeAppFactory&&OSF._OfficeAppFactory&&OSF._OfficeAppFactory.getLoadScriptHelper&&OSF._OfficeAppFactory.getLoadScriptHelper().isScriptLoading(OSF.ConstantNames.MicrosoftAjaxId)?OSF._OfficeAppFactory.getLoadScriptHelper().waitForScripts([OSF.ConstantNames.MicrosoftAjaxId],n):OsfMsAjaxFactory.loadMsAjaxFull(function(){if(OsfMsAjaxFactory.isMsAjaxLoaded())n();else throw"Not able to load MicrosoftAjax.js.";}):n()})();Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(n){var i=this;i._eventHandlers={};i._objectEventHandlers={};i._queuedEventsArgs={};for(var u in n){var t=n[u],r=t=="objectDeleted"||t=="objectSelectionChanged"||t=="objectDataChanged"||t=="contentControlAdded";r?i._objectEventHandlers[t]={}:i._eventHandlers[t]=[];i._queuedEventsArgs[t]=[]}};OSF.EventDispatch.prototype={getSupportedEvents:function(){var n=[];for(var t in this._eventHandlers)n.push(t);for(var t in this._objectEventHandlers)n.push(t);return n},supportsEvent:function(n){for(var t in this._eventHandlers)if(n==t)return!0;for(var t in this._objectEventHandlers)if(n==t)return!0;return!1},hasEventHandler:function(n,t){var i=this._eventHandlers[n];if(i&&i.length>0)for(var r in i)if(i[r]===t)return!0;return!1},hasObjectEventHandler:function(n,t,i){var f=this._objectEventHandlers[n];if(f!=null)for(var u=f[t],r=0;u!=null&&r0)for(var r=0;r0){this._eventHandlers[n]=[];return!0}return!1},clearObjectEventHandlers:function(n,t){if(this._objectEventHandlers[n]!=null&&this._objectEventHandlers[n][t]!=null){this._objectEventHandlers[n][t]=[];return!0}return!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},getObjectEventHandlerCount:function(n,t){return this._objectEventHandlers[n]==null||this._objectEventHandlers[n][t]==null?0:this._objectEventHandlers[n][t].length},fireEvent:function(n){if(n.type==undefined)return!1;var t=n.type;if(t&&this._eventHandlers[t]){var i=this._eventHandlers[t];for(var r in i)i[r](n);return!0}else return!1},fireObjectEvent:function(n,t){if(t.type==undefined)return!1;var u=t.type;if(u&&this._objectEventHandlers[u]){var f=this._objectEventHandlers[u],i=f[n];if(i!=null){for(var r=0;r0){for(var u=i[0];t.length>0;){var r=t.shift();u(r)}return!0}}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var f="outlook",e="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(n,i[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:r=new OSF.DDA.RichApiMessageEventArgs(n,i);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f){r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i);t.initialize(r.initialData);OSF._OfficeAppFactory.getHostInfo().hostPlatform=="win32"&&t.setCurrentItemNumber(r.itemNumber.itemNumber)}else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkRecipientsChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var i=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),t=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];t(arguments,i,n)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(n){var i=OSF.DDA.SyncMethodNames.MessageParent.displayName,t=this;t[i]||OSF.OUtil.defineEnumerableProperty(t,i,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return n(arguments,t)}});var r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;t[r]||typeof OSF.DialogParentMessageEventDispatch=="undefined"||OSF.DDA.DispIdHost.addEventSupport(t,OSF.DialogParentMessageEventDispatch,n);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(n){n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:n[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels,value:{types:["boolean"],defaultValue:!1}}],privateStateCallbacks:[],onSucceeded:function(n){var f=n[Microsoft.Office.WebExtension.Parameters.Id],i=n[Microsoft.Office.WebExtension.Parameters.Data],t=new OSF.DialogHandler,e=OSF.DDA.AsyncMethodNames.CloseAsync.displayName;OSF.OUtil.defineEnumerableProperty(t,e,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];n(arguments,f,i,t)}});var r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;OSF.OUtil.defineEnumerableProperty(t,r,{value:function(){var f=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],n=f.verifyAndExtractCall(arguments,t,i),u=n[Microsoft.Office.WebExtension.Parameters.EventType],r=n[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(u,r)}});var u=OSF.DDA.SyncMethodNames.SendMessage.displayName;OSF.OUtil.defineEnumerableProperty(t,u,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return n(arguments,i,t)}});return t},checkCallArgs:function(n){n[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Width]=1);!n[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&n[Microsoft.Office.WebExtension.Parameters.Width]>100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99);n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1);!n[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99);n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0);return n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(n){try{n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,n);OSF.ClientHostController.openDialog(n.dispId,n.targetId,function(t,i){n.onEvent&&n.onEvent(i);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(n){n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,n);try{OSF.ClientHostController.closeDialog(n.dispId,n.targetId,t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.messageParent=function(n){try{n.onCalling&&n.onCalling();var i=+new Date,t=OSF.ClientHostController.messageParent(n.hostCallArgs);n.onReceiving&&n.onReceiving();OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs(+new Date-i),t);return t}catch(r){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(r)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.sendMessage=function(n){try{n.onCalling&&n.onCalling();var r=+new Date,t=OSF.ClientHostController.sendMessage(n.hostCallArgs);n.onReceiving&&n.onReceiving();return t}catch(i){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(i)}};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ItemChanged:"olkItemSelectedChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{OlkItemSelectedData:"OlkItemSelectedData"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{RecipientsChanged:"olkRecipientsChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{OlkRecipientsData:"OlkRecipientsData"});OSF.DDA.OlkRecipientsChangedEventArgs=function(n){var t=n[OSF.DDA.EventDescriptors.OlkRecipientsData][0];t===""&&(t=null);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.RecipientsChanged},changedRecipientFields:{value:JSON.parse(t)}})};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppointmentTimeChanged:"olkAppointmentTimeChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{OlkAppointmentTimeChangedData:"OlkAppointmentTimeChangedData"});OSF.DDA.OlkAppointmentTimeChangedEventArgs=function(n){var u=n[OSF.DDA.EventDescriptors.OlkAppointmentTimeChangedData][0],i,t;try{var r=JSON.parse(u);i=new Date(r.start).toISOString();t=new Date(r.end).toISOString()}catch(f){i=null;t=null}OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged},start:{value:i},end:{value:t}})};OSF.DDA.OlkItemSelectedChangedEventArgs=function(n){var t=n[OSF.DDA.EventDescriptors.OlkItemSelectedData][0];t===""&&(t=null);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.ItemChanged},initialData:{value:JSON.parse(t)},itemNumber:{value:JSON.parse(n[OSF.DDA.EventDescriptors.OlkItemSelectedData][1])}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidOlkItemSelectedChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.OlkItemSelectedData,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidOlkRecipientsChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.OlkRecipientsData,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidOlkAppointmentTimeChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.OlkAppointmentTimeChangedData,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}],isComplexType:!0});var OSFLog;(function(n){var u="ResponseTime",f="Message",r="SessionId",i="CorrelationId",t=!0,e=function(){function n(n){this._table=n;this._fields={}}Object.defineProperty(n.prototype,"Fields",{get:function(){return this._fields},enumerable:t,configurable:t});Object.defineProperty(n.prototype,"Table",{get:function(){return this._table},enumerable:t,configurable:t});n.prototype.SerializeFields=function(){};n.prototype.SetSerializedField=function(n,t){typeof t!="undefined"&&t!==null&&(this._serializedFields[n]=t.toString())};n.prototype.SerializeRow=function(){var n=this;n._serializedFields={};n.SetSerializedField("Table",n._table);n.SerializeFields();return JSON.stringify(n._serializedFields)};return n}();n.BaseUsageData=e;var c=function(n){var k="IsFromWacAutomation",w="WacHostEnvironment",b="HostJSVersion",y="OfficeJSVersion",p="DocUrl",g="AppSizeHeight",nt="AppSizeWidth",l="ClientId",d="HostVersion",s="Host",h="UserId",e="Browser",o="AssetId",a="AppURL",v="AppInstanceId",c="AppId";__extends(u,n);function u(){n.call(this,"AppActivated")}Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,c,{get:function(){return this.Fields[c]},set:function(n){this.Fields[c]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,v,{get:function(){return this.Fields[v]},set:function(n){this.Fields[v]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,a,{get:function(){return this.Fields[a]},set:function(n){this.Fields[a]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,d,{get:function(){return this.Fields[d]},set:function(n){this.Fields[d]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,l,{get:function(){return this.Fields[l]},set:function(n){this.Fields[l]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,nt,{get:function(){return this.Fields[nt]},set:function(n){this.Fields[nt]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,g,{get:function(){return this.Fields[g]},set:function(n){this.Fields[g]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,p,{get:function(){return this.Fields[p]},set:function(n){this.Fields[p]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,y,{get:function(){return this.Fields[y]},set:function(n){this.Fields[y]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,b,{get:function(){return this.Fields[b]},set:function(n){this.Fields[b]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,w,{get:function(){return this.Fields[w]},set:function(n){this.Fields[w]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,k,{get:function(){return this.Fields[k]},set:function(n){this.Fields[k]=n},enumerable:t,configurable:t});u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(c,n.AppId);n.SetSerializedField(v,n.AppInstanceId);n.SetSerializedField(a,n.AppURL);n.SetSerializedField(o,n.AssetId);n.SetSerializedField(e,n.Browser);n.SetSerializedField(h,n.UserId);n.SetSerializedField(s,n.Host);n.SetSerializedField(d,n.HostVersion);n.SetSerializedField(l,n.ClientId);n.SetSerializedField(nt,n.AppSizeWidth);n.SetSerializedField(g,n.AppSizeHeight);n.SetSerializedField(f,n.Message);n.SetSerializedField(p,n.DocUrl);n.SetSerializedField(y,n.OfficeJSVersion);n.SetSerializedField(b,n.HostJSVersion);n.SetSerializedField(w,n.WacHostEnvironment);n.SetSerializedField(k,n.IsFromWacAutomation)};return u}(e);n.AppActivatedUsageData=c;var l=function(n){var e="StartTime",o="ScriptId";__extends(f,n);function f(){n.call(this,"ScriptLoad")}Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t});f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(o,n.ScriptId);n.SetSerializedField(e,n.StartTime);n.SetSerializedField(u,n.ResponseTime)};return f}(e);n.ScriptLoadUsageData=l;var h=function(n){var h="CloseMethod",s="OpenTime",e="AppSizeFinalHeight",o="AppSizeFinalWidth",f="FocusTime";__extends(u,n);function u(){n.call(this,"AppClosed")}Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t});u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(f,n.FocusTime);n.SetSerializedField(o,n.AppSizeFinalWidth);n.SetSerializedField(e,n.AppSizeFinalHeight);n.SetSerializedField(s,n.OpenTime);n.SetSerializedField(h,n.CloseMethod)};return u}(e);n.AppClosedUsageData=h;var o=function(n){var s="ErrorType",o="Parameters",h="APIID",e="APIType";__extends(f,n);function f(){n.call(this,"APIUsage")}Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t});f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(e,n.APIType);n.SetSerializedField(h,n.APIID);n.SetSerializedField(o,n.Parameters);n.SetSerializedField(u,n.ResponseTime);n.SetSerializedField(s,n.ErrorType)};return f}(e);n.APIUsageUsageData=o;var s=function(n){var e="SuccessCode";__extends(u,n);function u(){n.call(this,"AppInitialization")}Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t});u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(e,n.SuccessCode);n.SetSerializedField(f,n.Message)};return u}(e);n.AppInitializationUsageData=s})(OSFLog||(OSFLog={}));var Logger;(function(n){"use strict";(function(n){n[n.info=0]="info";n[n.warning=1]="warning";n[n.error=2]="error"})(n.TraceLevel||(n.TraceLevel={}));var f=n.TraceLevel;(function(n){n[n.none=0]="none";n[n.flush=1]="flush"})(n.SendFlag||(n.SendFlag={}));var e=n.SendFlag;function u(){OSF.Logger&&OSF.Logger.ulsEndpoint&&OSF.Logger.ulsEndpoint.loadProxyFrame()}n.allowUploadingData=u;function t(n,t,i){if(OSF.Logger&&OSF.Logger.ulsEndpoint){var u={traceLevel:n,message:t,flag:i,internalLog:!0},r=JSON.stringify(u);OSF.Logger.ulsEndpoint.writeLog(r)}}n.sendLog=t;function i(){try{return new r}catch(n){return null}}var r=function(){function n(){var n=this,t=n;n.proxyFrame=null;n.telemetryEndPoint="https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html";n.buffer=[];n.proxyFrameReady=!1;OSF.OUtil.addEventListener(window,"message",function(n){return t.tellProxyFrameReady(n)});setTimeout(function(){t.loadProxyFrame()},3e3)}n.prototype.writeLog=function(t){var i=this;i.proxyFrameReady===!0?i.proxyFrame.contentWindow.postMessage(t,n.telemetryOrigin):i.buffer.length<128&&i.buffer.push(t)};n.prototype.loadProxyFrame=function(){var n=this;if(n.proxyFrame==null){n.proxyFrame=document.createElement("iframe");n.proxyFrame.setAttribute("style","display:none");n.proxyFrame.setAttribute("src",n.telemetryEndPoint);document.head.appendChild(n.proxyFrame)}};n.prototype.tellProxyFrameReady=function(t){var i=this,e=i;if(t.data==="ProxyFrameReadyToLog"){i.proxyFrameReady=!0;for(var r=0;r40){n=OSF.OUtil.Guid.generateNewGuid();t.setValue(t.clientIDKey,n)}return n};n.prototype.saveLog=function(n,t){var u=this,i=u.getValue(u.logIdSetKey);i=(i&&i.length>0?i+";":r)+n;u.setValue(u.logIdSetKey,i);u.setValue(n,t)};n.prototype.enumerateLog=function(n,t){var i=this,f=i.getValue(i.logIdSetKey);if(f){var e=f.split(";");for(var o in e){var r=e[o],u=i.getValue(r);if(u){n&&n(r,u);t&&i.remove(r)}}t&&i.remove(i.logIdSetKey)}};n.prototype.getValue=function(n){var i=OSF.OUtil.getLocalStorage(),t=r;i&&(t=i.getItem(n));return t};n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)};n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}};return n}(),o=function(){function t(){}t.prototype.LogData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(t)}catch(i){}};t.prototype.LogRawData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(t))}catch(i){}};return t}();function u(n){n&&(n=n.replace(/[{}]/g,r).toLowerCase());return n||r}function d(e){if(OSF.Logger&&!t){t=new g;t.hostVersion=e.get_hostFullVersion()?e.get_hostFullVersion():e.get_appVersion();t.appId=e.get_id();t.host=e.get_appName();t.browser=window.navigator.userAgent;t.correlationId=u(e.get_correlationId());t.clientId=(new l).getClientId();t.appInstanceId=e.get_appInstanceId();t.appInstanceId&&(t.appInstanceId=t.appInstanceId.replace(/[{}]/g,r).toLowerCase());t.message=e.get_hostCustomMessage();t.officeJSVersion=OSF.ConstantNames.FileVersion;t.hostJSVersion="16.0.8809.1000";e._wacHostEnvironment&&(t.wacHostEnvironment=e._wacHostEnvironment);e._isFromWacAutomation!==undefined&&e._isFromWacAutomation!==i&&(t.isFromWacAutomation=e._isFromWacAutomation.toString().toLowerCase());var s=e.get_docUrl();t.docUrl=nt.test(s)?s:r;var o=location.href;o&&(o=o.split("?")[0].split("#")[0]);t.appURL=o;(function(n,t){var o,s,u;t.assetId=r;t.userId=r;try{o=decodeURIComponent(n);s=new DOMParser;u=s.parseFromString(o,"text/xml");var e=u.getElementsByTagName("t")[0].attributes.getNamedItem("cid"),f=u.getElementsByTagName("t")[0].attributes.getNamedItem("oid");e&&e.nodeValue?t.userId=e.nodeValue:f&&f.nodeValue&&(t.userId=f.nodeValue);t.assetId=u.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(h){}finally{o=i;u=i;s=i}})(e.get_eToken(),t);(function(){var l=new Date,r=i,o=0,c=!1,u=function(){if(document.hasFocus())r==i&&(r=new Date);else if(r){o+=Math.abs(+new Date-r.getTime());r=i}},t=[];t.push(new f("focus",u));t.push(new f("blur",u));t.push(new f("focusout",u));t.push(new f("focusin",u));var s=function(){for(var u=0;u6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix){i=new Date(parseInt(t.slice(5,-1)));if(i)return i}return t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,!0);r[i]=t}catch(u){}}return r}};OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(n,t,i){Type.registerNamespace("Microsoft.Office.WebExtension.MailboxEnums");Microsoft.Office.WebExtension.MailboxEnums.EntityType={MeetingSuggestion:"meetingSuggestion",TaskSuggestion:"taskSuggestion",Address:"address",EmailAddress:"emailAddress",Url:"url",PhoneNumber:"phoneNumber",Contact:"contact",FlightReservations:"flightReservations",ParcelDeliveries:"parcelDeliveries"};Microsoft.Office.WebExtension.MailboxEnums.ItemType={Message:"message",Appointment:"appointment"};Microsoft.Office.WebExtension.MailboxEnums.ResponseType={None:"none",Organizer:"organizer",Tentative:"tentative",Accepted:"accepted",Declined:"declined"};Microsoft.Office.WebExtension.MailboxEnums.RecipientType={Other:"other",DistributionList:"distributionList",User:"user",ExternalUser:"externalUser"};Microsoft.Office.WebExtension.MailboxEnums.AttachmentType={File:"file",Item:"item",Cloud:"cloud"};Microsoft.Office.WebExtension.MailboxEnums.BodyType={Text:"text",Html:"html"};Microsoft.Office.WebExtension.MailboxEnums.ItemNotificationMessageType={ProgressIndicator:"progressIndicator",InformationalMessage:"informationalMessage",ErrorMessage:"errorMessage",InsightMessage:"insightMessage"};Microsoft.Office.WebExtension.MailboxEnums.Folder={Inbox:"inbox",Junk:"junk",DeletedItems:"deletedItems"};Microsoft.Office.WebExtension.CoercionType={Text:"text",Html:"html"};Microsoft.Office.WebExtension.MailboxEnums.UserProfileType={Office365:"office365",OutlookCom:"outlookCom",Enterprise:"enterprise"};Microsoft.Office.WebExtension.MailboxEnums.RestVersion={v1_0:"v1.0",v2_0:"v2.0",Beta:"beta"};Microsoft.Office.WebExtension.MailboxEnums.ModuleType={Addins:"addins"};Microsoft.Office.WebExtension.MailboxEnums.ActionType={ShowTaskPane:"showTaskPane"};Type.registerNamespace("OSF.DDA");var u=window.OSF||{};u.DDA=u.DDA||{};window.OSF.DDA.OutlookAppOm=u.DDA.OutlookAppOm=function(n,t,i){this.$$d_navigateToModuleAsync=Function.createDelegate(this,this.navigateToModuleAsync);this.$$d_displayPersonaCardAsync=Function.createDelegate(this,this.displayPersonaCardAsync);this.$$d_displayNewMessageFormApi=Function.createDelegate(this,this.displayNewMessageFormApi);this.$$d__displayNewAppointmentFormApi$p$0=Function.createDelegate(this,this._displayNewAppointmentFormApi$p$0);this.$$d_windowOpenOverrideHandler=Function.createDelegate(this,this.windowOpenOverrideHandler);this.$$d__getRestUrl$p$0=Function.createDelegate(this,this._getRestUrl$p$0);this.$$d__getEwsUrl$p$0=Function.createDelegate(this,this._getEwsUrl$p$0);this.$$d__getDiagnostics$p$0=Function.createDelegate(this,this._getDiagnostics$p$0);this.$$d__getUserProfile$p$0=Function.createDelegate(this,this._getUserProfile$p$0);this.$$d_getItem=Function.createDelegate(this,this.getItem);this.$$d__callAppReadyCallback$p$0=Function.createDelegate(this,this._callAppReadyCallback$p$0);this.$$d__getInitialDataResponseHandler$p$0=Function.createDelegate(this,this._getInitialDataResponseHandler$p$0);window.OSF.DDA.OutlookAppOm._instance$p=this;this._officeAppContext$p$0=n;this._appReadyCallback$p$0=i;var r=this;var u=function(){i&&(r._officeAppContext$p$0.get_isDialog()?window.setTimeout(r.$$d__callAppReadyCallback$p$0,0):r.invokeHostMethod(1,null,r.$$d__getInitialDataResponseHandler$p$0))};this._areStringsLoaded$p$0()?u():this._loadLocalizedScript$p$0(u)};window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i=function(n){if(!n)throw Error.create(window._u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text);};window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i=function(n,t,i,r){if(ni)throw Error.argumentOutOfRange(r);};window.OSF.DDA.OutlookAppOm._throwOnInvalidModule$p=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("module");else if(n==="")throw Error.argument("module","module cannot be empty.");if(n!==window.Microsoft.Office.WebExtension.MailboxEnums.ModuleType.Addins)throw Error.notImplemented(String.format("API not supported for module '{0}'",n));};window.OSF.DDA.OutlookAppOm._getHtmlBody$p=function(n){var t="";if("htmlBody"in n){window.OSF.DDA.OutlookAppOm._throwOnInvalidHtmlBody$p(n.htmlBody);t=n.htmlBody}return t};window.OSF.DDA.OutlookAppOm._getAttachments$p=function(n){var t=[];if("attachments"in n){t=n.attachments;window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentsArray$p(t)}return t};window.OSF.DDA.OutlookAppOm._getOptionsAndCallback$p=function(n){var t=[];"options"in n&&(t[0]=n.options);"callback"in n&&(t[t.length]=n.callback);return t};window.OSF.DDA.OutlookAppOm._createAttachmentsDataForHost$p=function(n){var r=new Array(0);if(Array.isInstanceOfType(n))for(var t=0;t2048)throw Error.argumentOutOfRange("attachments",n.length,window._u.ExtensibilityStrings.l_AttachmentUrlTooLong_Text);window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentName$p(t)};window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentItemIdOrName$p=function(n,t){if(!String.isInstanceOfType(n)||!String.isInstanceOfType(t))throw Error.argument("attachments");if(n.length>200)throw Error.argumentOutOfRange("attachments",n.length,window._u.ExtensibilityStrings.l_AttachmentItemIdTooLong_Text);window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentName$p(t)};window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentName$p=function(n){if(n.length>255)throw Error.argumentOutOfRange("attachments",n.length,window._u.ExtensibilityStrings.l_AttachmentNameTooLong_Text);};window.OSF.DDA.OutlookAppOm._throwOnInvalidRestVersion$p=function(n){if(!n)throw Error.argumentNull("restVersion");if(n!==window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v1_0&&n!==window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v2_0&&n!==window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.Beta)throw Error.argument("restVersion");};window.OSF.DDA.OutlookAppOm.getItemIdBasedOnHost=function(n){return window.OSF.DDA.OutlookAppOm._instance$p._initialData$p$0&&window.OSF.DDA.OutlookAppOm._instance$p._initialData$p$0.get__isRestIdSupported$i$0()?window.OSF.DDA.OutlookAppOm._instance$p.convertToRestId(n,window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v1_0):window.OSF.DDA.OutlookAppOm._instance$p.convertToEwsId(n,window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v1_0)};window.OSF.DDA.OutlookAppOm.addAdditionalArgs=function(n,t){return t};window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p=function(n,t,i){if(Object.getType(n)!==t)throw Error.argumentType(i);};window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p=function(n,t,i,u){if(!r.ScriptHelpers.isNullOrUndefined(n)){window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(n,String,u);var f=n;window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(f.length,t,i,u)}};window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p=function(n){return n?n.join(";"):null};window.OSF.DDA.OutlookAppOm._convertComposeEmailDictionaryParameterForSetApi$p=function(n){if(!n)return null;for(var i=new Array(n.length),t=0;t2){var t=window.JSON.parse(n[2]);if(Object.isInstanceOfType(t)){var r=t;i=r.itemNumber}}return i},createDeserializedData:function(n,t){var i=null;var r=window.JSON.parse(n[0]);if(Object.isInstanceOfType(r))i=this._createDeserializedDataWithDictionary$p$0(n,t);else if(Number.isInstanceOfType(r))i=this._createDeserializedDataWithInt$p$0(n,t);else throw Error.notImplemented("Return data type from host must be Dictionary or int");return i},_createDeserializedDataWithDictionary$p$0:function(n,t){var i=window.JSON.parse(n[0]);if(t){i.error=!0;i.errorCode=9030}else if(n.length>1&&n[1]){i.error=!0;i.errorCode=n[1]}else i.error=!1;return i},_createDeserializedDataWithInt$p$0:function(n,t){var i={};i.error=!0;i.errorCode=n[0];return i},invokeHostMethod:function(n,t,i){var f=+new Date;var o=this;var e=function(t,r){if(window.OSF.AppTelemetry){var u=r;var e=-1;u&&u.errorCode&&(e=u.errorCode);window.OSF.AppTelemetry.onMethodDone(n,null,Math.abs(+new Date-f),e)}i&&i(t,r)};if(64===this._officeAppContext$p$0.get_appName()){var r={ApiParams:t};r.MethodData={ControlId:u._OfficeAppFactory.getId(),DispatchId:n};r=window.OSF.DDA.OutlookAppOm.addAdditionalArgs(n,r);n===1?this.get_clientEndPoint().invoke("GetInitialData",e,r):this.get_clientEndPoint().invoke("ExecuteMethod",e,r)}else this._isOwaOnlyMethod$p$0(n)?i&&i(-2,null):this.callOutlookDispatcher(n,t,i,f)},callOutlookDispatcher:function(n,t,i,r){var e=this.convertToOutlookParameters(n,t);var f=this;u.ClientHostController.execute(n,e,function(t,u){var h=-1;var e=null;var o=t.toArray();if(o.length>0){var s=f.getItemNumberFromOutlookResponse(o);var l=s>0;var c=l&&s>f._additionalOutlookParams$p$0._itemNumber$p$0;e=f.createDeserializedData(o,c);e&&e.errorCode&&(h=e.errorCode)}else if(i)throw Error.argumentNull("responseData","Unexpected null/empty data from host.");if(window.OSF.AppTelemetry)window.OSF.AppTelemetry.onMethodDone(n,null,Math.abs(+new Date-r),h);i&&i(u,e)})},_dictionaryToDate$i$0:function(n){var t=new Date(n.year,n.month,n.date,n.hours,n.minutes,n.seconds,n.milliseconds?n.milliseconds:0);if(window.isNaN(t.getTime()))throw Error.format(window._u.ExtensibilityStrings.l_InvalidDate_Text);return t},_dateToDictionary$i$0:function(n){var t={};t.month=n.getMonth();t.date=n.getDate();t.year=n.getFullYear();t.hours=n.getHours();t.minutes=n.getMinutes();t.seconds=n.getSeconds();t.milliseconds=n.getMilliseconds();return t},_isOwaOnlyMethod$p$0:function(n){switch(n){case 402:case 401:case 400:case 403:return!0;default:return!1}},isOutlook16OrGreater:function(){var n=this._initialData$p$0.get__hostVersion$i$0();var i=0;var t=0;if(n){i=n.indexOf(".");t=window.parseInt(n.substring(0,i))}return t>=16},isApiVersionSupported:function(n){var r=!1;try{var u=window.JSON.parse(this._officeAppContext$p$0.get_requirementMatrix());var f=u.Mailbox;var i=f.split(".");var t=n.split(".");(window.parseInt(i[0])>window.parseInt(t[0])||window.parseInt(i[0])===window.parseInt(t[0])&&window.parseInt(i[1])>=window.parseInt(t[1]))&&(r=!0)}catch(e){}return r},convertToOutlookParameters:function(n,t){var i=null;var r={};switch(n){case 1:case 2:case 3:case 14:case 18:case 26:case 32:case 41:case 34:case 99:break;case 12:r.isRest=t.isRest;break;case 4:var f=window.JSON.stringify(t.customProperties);i=[f];break;case 5:i=[t.body];break;case 8:case 9:i=[t.itemId];break;case 7:i=[window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.requiredAttendees),window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.optionalAttendees),t.start,t.end,t.location,window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.resources),t.subject,t.body];break;case 44:i=[window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.toRecipients),window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.ccRecipients),window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.bccRecipients),t.subject,t.htmlBody,t.attachments];break;case 43:i=[t.ewsIdOrEmail];break;case 45:i=[t.module,t.queryString];break;case 40:i=[t.extensionId,t.consentState];break;case 11:case 10:i=[t.htmlBody];break;case 31:case 30:i=[t.htmlBody,t.attachments];break;case 100:r=t;break;case 23:case 13:case 38:case 29:i=[t.data,t.coercionType];break;case 37:case 28:i=[t.coercionType];break;case 17:i=[t.subject];break;case 15:i=[t.recipientField];break;case 22:case 21:i=[t.recipientField,window.OSF.DDA.OutlookAppOm._convertComposeEmailDictionaryParameterForSetApi$p(t.recipientArray)];break;case 19:i=[t.itemId,t.name];break;case 16:i=[t.uri,t.name,t.isInline];break;case 20:i=[t.attachmentIndex];break;case 25:i=[t.TimeProperty,t.time];break;case 24:i=[t.TimeProperty];break;case 27:i=[t.location];break;case 33:case 35:i=[t.key,t.type,t.persistent,t.message,t.icon];this._additionalOutlookParams$p$0.setActionsDefinition(t.actions);break;case 36:i=[t.key];break;case 101:r=t;break;default:break}if(n!==1){var u;this._additionalOutlookParams$p$0.updateOutlookExecuteParameters(u={val:i},r),i=u.val}return i},_displayNewAppointmentFormApi$p$0:function(n){var f=window.OSF.DDA.OutlookAppOm._validateAndNormalizeRecipientEmails$p(n.requiredAttendees,"requiredAttendees");var u=window.OSF.DDA.OutlookAppOm._validateAndNormalizeRecipientEmails$p(n.optionalAttendees,"optionalAttendees");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(n.location,0,window.OSF.DDA.OutlookAppOm._maxLocationLength$p,"location");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(n.body,0,window.OSF.DDA.OutlookAppOm.maxBodyLength,"body");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(n.subject,0,window.OSF.DDA.OutlookAppOm._maxSubjectLength$p,"subject");if(!r.ScriptHelpers.isNullOrUndefined(n.start)){window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(n.start,Date,"start");var s=n.start;n.start=s.getTime();if(!r.ScriptHelpers.isNullOrUndefined(n.end)){window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(n.end,Date,"end");var i=n.end;if(i=0&&n.getTime()-u<0)return window.parseInt(t.offset)}throw Error.format(window._u.ExtensibilityStrings.l_InvalidDate_Text);},_areStringsLoaded$p$0:function(){var n=!1;try{n=!r.ScriptHelpers.isNullOrUndefined(window._u.ExtensibilityStrings.l_EwsRequestOversized_Text)}catch(t){}return n},_loadLocalizedScript$p$0:function(n){for(var s=null,l="",a=document.getElementsByTagName("script"),o=a.length-1;o>=0;o--){var i=null;var v=a[o].attributes;if(v){var p=v.getNamedItem("src");p&&(i=p.value);if(i){var y=!1;i=i.toLowerCase();var f=i.indexOf("office_strings.js");if(f<0){f=i.indexOf("office_strings.debug.js");y=!0}if(f>0&&fu+1&&(l=r.substring(0,u+1));break}}}}if(s){var h=document.getElementsByTagName("head")[0];var t=null;var b=this;var e=function(){if(n&&(!t.readyState||t.readyState&&(t.readyState==="loaded"||t.readyState==="complete"))){t.onload=null;t.onreadystatechange=null;n()}};var c=this;var w=function(){if(!c._areStringsLoaded$p$0()){var n=l+"en-us/"+"outlook_strings.js";t.onload=null;t.onreadystatechange=null;t=c._createScriptElement$p$0(n);t.onload=e;t.onreadystatechange=e;h.appendChild(t)}};t=this._createScriptElement$p$0(s);t.onload=e;t.onreadystatechange=e;window.setTimeout(w,2e3);h.appendChild(t)}},_createScriptElement$p$0:function(n){var t=document.createElement("script");t.type="text/javascript";t.src=n;return t}};u.DDA.OutlookAppOm.prototype.initialize=function(n){if(!n){this._additionalOutlookParams$p$0=new r.AdditionalGlobalParameters(!0);this._initialData$p$0=null;this._item$p$0=null;return}var t="itemType";this._initialData$p$0=new r.InitialData(n);this._hostItemType$p$0=n[t];1===n[t]?this._item$p$0=new r.Message(this._initialData$p$0):3===n[t]?this._item$p$0=new r.MeetingRequest(this._initialData$p$0):2===n[t]?this._item$p$0=new r.Appointment(this._initialData$p$0):4===n[t]?this._item$p$0=new r.MessageCompose(this._initialData$p$0):5===n[t]?this._item$p$0=new r.AppointmentCompose(this._initialData$p$0):6===n[t];this._userProfile$p$0=new r.UserProfile(this._initialData$p$0);this._diagnostics$p$0=new r.Diagnostics(this._initialData$p$0,this._officeAppContext$p$0.get_appName());var i=window.OSF.DDA.OutlookAppOm._instance$p.get__appName$i$0()!==8||this.isOutlook16OrGreater()||this.isApiVersionSupported("1.5");this._additionalOutlookParams$p$0=new r.AdditionalGlobalParameters(i);"itemNumber"in n&&this.setCurrentItemNumber(n.itemNumber);this._initializeMethods$p$0();r.InitialData._defineReadOnlyProperty$i(this,"item",this.$$d_getItem);r.InitialData._defineReadOnlyProperty$i(this,"userProfile",this.$$d__getUserProfile$p$0);r.InitialData._defineReadOnlyProperty$i(this,"diagnostics",this.$$d__getDiagnostics$p$0);r.InitialData._defineReadOnlyProperty$i(this,"ewsUrl",this.$$d__getEwsUrl$p$0);r.InitialData._defineReadOnlyProperty$i(this,"restUrl",this.$$d__getRestUrl$p$0);window.OSF.DDA.OutlookAppOm._instance$p.get__appName$i$0()===64&&this._initialData$p$0.get__overrideWindowOpen$i$0()&&(window.open=this.$$d_windowOpenOverrideHandler);this.addEventSupport()};u.DDA.OutlookAppOm.prototype.makeEwsRequestAsync=function(n){for(var u=[],i=1;iwindow.OSF.DDA.OutlookAppOm._maxEwsRequestSize$p)throw Error.argument("data",window._u.ExtensibilityStrings.l_EwsRequestOversized_Text);this._throwOnMethodCallForInsufficientPermission$i$0(3,"makeEwsRequestAsync");var f=r.CommonParameters.parse(u,!0,!0);var t=new r.EwsRequest(f._asyncContext$p$0);var e=this;t.onreadystatechange=function(){4===t.get__requestState$i$1()&&f._callback$p$0(t._asyncResult$p$0)};t.send(n)};u.DDA.OutlookAppOm.prototype.recordDataPoint=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");this.invokeHostMethod(402,n,null)};u.DDA.OutlookAppOm.prototype.recordTrace=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");this.invokeHostMethod(401,n,null)};u.DDA.OutlookAppOm.prototype.trackCtq=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");this.invokeHostMethod(400,n,null)};u.DDA.OutlookAppOm.prototype.convertToLocalClientTime=function(n){var t=new Date(n.getTime());var i=t.getTimezoneOffset()*-1;if(this._initialData$p$0&&this._initialData$p$0.get__timeZoneOffsets$i$0()){t.setUTCMinutes(t.getUTCMinutes()-i);i=this._findOffset$p$0(t);t.setUTCMinutes(t.getUTCMinutes()+i)}var r=this._dateToDictionary$i$0(t);r.timezoneOffset=i;return r};u.DDA.OutlookAppOm.prototype.convertToUtcClientTime=function(n){var t=this._dictionaryToDate$i$0(n);if(this._initialData$p$0&&this._initialData$p$0.get__timeZoneOffsets$i$0()){var i=this._findOffset$p$0(t);t.setUTCMinutes(t.getUTCMinutes()-i);i=n.timezoneOffset?n.timezoneOffset:t.getTimezoneOffset()*-1;t.setUTCMinutes(t.getUTCMinutes()+i)}return t};u.DDA.OutlookAppOm.prototype.convertToRestId=function(n,t){if(!n)throw Error.argumentNull("itemId");window.OSF.DDA.OutlookAppOm._throwOnInvalidRestVersion$p(t);return n.replace(new RegExp("[/]","g"),"-").replace(new RegExp("[+]","g"),"_")};u.DDA.OutlookAppOm.prototype.convertToEwsId=function(n,t){if(!n)throw Error.argumentNull("itemId");window.OSF.DDA.OutlookAppOm._throwOnInvalidRestVersion$p(t);return n.replace(new RegExp("[-]","g"),"/").replace(new RegExp("[_]","g"),"+")};u.DDA.OutlookAppOm.prototype.getUserIdentityTokenAsync=function(){for(var i=[],n=0;n32768){var f=window.OSF.DDA.OutlookAppOm._instance$p.createAsyncResult(null,1,9019,n._asyncContext$p$0,"");var e=this;window.setTimeout(function(){n._callback$p$0(f)},0);return}window.OSF.DDA.OutlookAppOm._instance$p.get__appName$i$0()===64?this._saveSettingsForOwa$p$0(n._callback$p$0,n._asyncContext$p$0):this._saveSettingsForOutlook$p$0(n._callback$p$0,n._asyncContext$p$0)};Type.registerNamespace("$h");var r=window.$h||{};Type.registerNamespace("Office.cast");var f=window.Office||{};f.cast=f.cast||{};r.AdditionalGlobalParameters=function(n){this._parameterBlobSupported$p$0=n;this._itemNumber$p$0=0};r.AdditionalGlobalParameters.prototype={_parameterBlobSupported$p$0:!1,_itemNumber$p$0:0,_actionsDefinition$p$0:null,setActionsDefinition:function(n){this._actionsDefinition$p$0=n},setCurrentItemNumber:function(n){n>0&&(this._itemNumber$p$0=n)},get_itemNumber:function(){return this._itemNumber$p$0},get_actionsDefinition:function(){return this._actionsDefinition$p$0},updateOutlookExecuteParameters:function(n,t){if(this._parameterBlobSupported$p$0){this._itemNumber$p$0>0&&(t.itemNumber=this._itemNumber$p$0.toString());this._actionsDefinition$p$0&&(t.actions=this._actionsDefinition$p$0);if(!Object.keys(t).length)return;n.val||(n.val=[]);n.val.push(window.JSON.stringify(t))}}};r.Appointment=function(n){this.$$d__getOrganizer$p$2=Function.createDelegate(this,this._getOrganizer$p$2);this.$$d__getNormalizedSubject$p$2=Function.createDelegate(this,this._getNormalizedSubject$p$2);this.$$d__getSubject$p$2=Function.createDelegate(this,this._getSubject$p$2);this.$$d__getResources$p$2=Function.createDelegate(this,this._getResources$p$2);this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2);this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2);this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2);this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2);this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2);r.Appointment.initializeBase(this,[n]);r.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2);r.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2);r.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2);r.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"resources",this.$$d__getResources$p$2);r.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2);r.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2);r.InitialData._defineReadOnlyProperty$i(this,"organizer",this.$$d__getOrganizer$p$2)};r.Appointment.prototype={getItemType:function(){return window.Microsoft.Office.WebExtension.MailboxEnums.ItemType.Appointment},_getStart$p$2:function(){return this._data$p$0.get__start$i$0()},_getEnd$p$2:function(){return this._data$p$0.get__end$i$0()},_getLocation$p$2:function(){return this._data$p$0.get__location$i$0()},_getOptionalAttendees$p$2:function(){return this._data$p$0.get__cc$i$0()},_getRequiredAttendees$p$2:function(){return this._data$p$0.get__to$i$0()},_getResources$p$2:function(){return this._data$p$0.get__resources$i$0()},_getSubject$p$2:function(){return this._data$p$0.get__subject$i$0()},_getNormalizedSubject$p$2:function(){return this._data$p$0.get__normalizedSubject$i$0()},_getOrganizer$p$2:function(){return this._data$p$0.get__organizer$i$0()}};r.Appointment.prototype.getEntities=function(){return this._data$p$0._getEntities$i$0()};r.Appointment.prototype.getEntitiesByType=function(n){return this._data$p$0._getEntitiesByType$i$0(n)};r.Appointment.prototype.getSelectedEntities=function(){return this._data$p$0._getSelectedEntities$i$0()};r.Appointment.prototype.getRegExMatches=function(){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches");return this._data$p$0._getRegExMatches$i$0()};r.Appointment.prototype.getFilteredEntitiesByName=function(n){return this._data$p$0._getFilteredEntitiesByName$i$0(n)};r.Appointment.prototype.getRegExMatchesByName=function(n){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName");return this._data$p$0._getRegExMatchesByName$i$0(n)};r.Appointment.prototype.getSelectedRegExMatches=function(){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedRegExMatches");return this._data$p$0._getSelectedRegExMatches$i$0()};r.Appointment.prototype.displayReplyForm=function(n){window.OSF.DDA.OutlookAppOm._instance$p._displayReplyForm$i$0(n)};r.Appointment.prototype.displayReplyAllForm=function(n){window.OSF.DDA.OutlookAppOm._instance$p._displayReplyAllForm$i$0(n)};r.AppointmentCompose=function(n){this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2);this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2);this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2);this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2);this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2);r.AppointmentCompose.initializeBase(this,[n]);r.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2);r.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2);r.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2)};r.AppointmentCompose.prototype={_requiredAttendees$p$2:null,_optionalAttendees$p$2:null,_start$p$2:null,_end$p$2:null,_location$p$2:null,getItemType:function(){return window.Microsoft.Office.WebExtension.MailboxEnums.ItemType.Appointment},_getRequiredAttendees$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._requiredAttendees$p$2||(this._requiredAttendees$p$2=new r.ComposeRecipient(0,"requiredAttendees"));return this._requiredAttendees$p$2},_getOptionalAttendees$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._optionalAttendees$p$2||(this._optionalAttendees$p$2=new r.ComposeRecipient(1,"optionalAttendees"));return this._optionalAttendees$p$2},_getStart$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._start$p$2||(this._start$p$2=new r.ComposeTime(1));return this._start$p$2},_getEnd$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._end$p$2||(this._end$p$2=new r.ComposeTime(2));return this._end$p$2},_getLocation$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._location$p$2||(this._location$p$2=new r.ComposeLocation);return this._location$p$2}};r.AttachmentConstants=function(){};r.AttachmentDetails=function(n){this.$$d__getIsInline$p$0=Function.createDelegate(this,this._getIsInline$p$0);this.$$d__getAttachmentType$p$0=Function.createDelegate(this,this._getAttachmentType$p$0);this.$$d__getSize$p$0=Function.createDelegate(this,this._getSize$p$0);this.$$d__getContentType$p$0=Function.createDelegate(this,this._getContentType$p$0);this.$$d__getName$p$0=Function.createDelegate(this,this._getName$p$0);this.$$d__getId$p$0=Function.createDelegate(this,this._getId$p$0);this._data$p$0=n;r.InitialData._defineReadOnlyProperty$i(this,"id",this.$$d__getId$p$0);r.InitialData._defineReadOnlyProperty$i(this,"name",this.$$d__getName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"contentType",this.$$d__getContentType$p$0);r.InitialData._defineReadOnlyProperty$i(this,"size",this.$$d__getSize$p$0);r.InitialData._defineReadOnlyProperty$i(this,"attachmentType",this.$$d__getAttachmentType$p$0);r.InitialData._defineReadOnlyProperty$i(this,"isInline",this.$$d__getIsInline$p$0)};r.AttachmentDetails.prototype={_data$p$0:null,_getId$p$0:function(){return this._data$p$0.id},_getName$p$0:function(){return this._data$p$0.name},_getContentType$p$0:function(){return this._data$p$0.contentType},_getSize$p$0:function(){return this._data$p$0.size},_getAttachmentType$p$0:function(){var n=this._data$p$0.attachmentType;return n255)throw Error.argumentOutOfRange("recipients",n.length,window._u.ExtensibilityStrings.l_DisplayNameTooLong_Text);if(t&&t.length>571)throw Error.argumentOutOfRange("recipients",t.length,window._u.ExtensibilityStrings.l_EmailAddressTooLong_Text);};r.ComposeRecipient._getAsyncFormatter$p=function(n){for(var u=n,i=[],t=0;t864e13)throw Error.argumentOutOfRange("dateTime");var i=r.CommonParameters.parse(u,!1);window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(25,{TimeProperty:this._timeType$p$0,time:n.getTime()},null,i._asyncContext$p$0,i._callback$p$0)};r.ComposeTime.TimeType=function(){};r.ComposeTime.TimeType.prototype={start:1,end:2};r.ComposeTime.TimeType.registerEnum("$h.ComposeTime.TimeType",!1);r.Contact=function(n){this.$$d__getContactString$p$0=Function.createDelegate(this,this._getContactString$p$0);this.$$d__getAddresses$p$0=Function.createDelegate(this,this._getAddresses$p$0);this.$$d__getUrls$p$0=Function.createDelegate(this,this._getUrls$p$0);this.$$d__getEmailAddresses$p$0=Function.createDelegate(this,this._getEmailAddresses$p$0);this.$$d__getPhoneNumbers$p$0=Function.createDelegate(this,this._getPhoneNumbers$p$0);this.$$d__getBusinessName$p$0=Function.createDelegate(this,this._getBusinessName$p$0);this.$$d__getPersonName$p$0=Function.createDelegate(this,this._getPersonName$p$0);this._data$p$0=n;r.InitialData._defineReadOnlyProperty$i(this,"personName",this.$$d__getPersonName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"businessName",this.$$d__getBusinessName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0);r.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0);r.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0);r.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0);r.InitialData._defineReadOnlyProperty$i(this,"contactString",this.$$d__getContactString$p$0)};r.Contact.prototype={_data$p$0:null,_phoneNumbers$p$0:null,_getPersonName$p$0:function(){return this._data$p$0.PersonName},_getBusinessName$p$0:function(){return this._data$p$0.BusinessName},_getAddresses$p$0:function(){return r.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses")},_getEmailAddresses$p$0:function(){return r.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses")},_getUrls$p$0:function(){return r.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls")},_getPhoneNumbers$p$0:function(){if(!this._phoneNumbers$p$0){var n=this;this._phoneNumbers$p$0=r.Entities._getExtractedObjects$i(r.PhoneNumber,this._data$p$0,"PhoneNumbers",function(n){return new r.PhoneNumber(n)})}return this._phoneNumbers$p$0},_getContactString$p$0:function(){return this._data$p$0.ContactString}};r.CustomProperties=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");if(Array.isInstanceOfType(n)){var t=n;if(t.length>0)this._data$p$0=t[0];else throw Error.argument("data");}else this._data$p$0=n};r.CustomProperties.prototype={_data$p$0:null};r.CustomProperties.prototype.get=function(n){var i=this._data$p$0[n];if(typeof i=="string"){var t=i;if(t.length>6&&t.startsWith("Date(")&&t.endsWith(")")){var f=t.substring(5,t.length-1);var r=window.parseInt(f);if(!window.isNaN(r)){var u=new Date(r);u&&(i=u)}}}return i};r.CustomProperties.prototype.set=function(n,t){window.OSF.OUtil.isDate(t)&&(t="Date("+t.getTime()+")");this._data$p$0[n]=t};r.CustomProperties.prototype.remove=function(n){delete this._data$p$0[n]};r.CustomProperties.prototype.saveAsync=function(){for(var i=[],n=0;nf)throw Error.argument();var t=r.CommonParameters.parse(i,!1,!0);var u=new r.SaveDictionaryRequest(t._callback$p$0,t._asyncContext$p$0);u._sendRequest$i$0(4,"SaveCustomProperties",{customProperties:this._data$p$0})};r.Diagnostics=function(n,t){this.$$d__getOwaView$p$0=Function.createDelegate(this,this._getOwaView$p$0);this.$$d__getHostVersion$p$0=Function.createDelegate(this,this._getHostVersion$p$0);this.$$d__getHostName$p$0=Function.createDelegate(this,this._getHostName$p$0);this._data$p$0=n;this._appName$p$0=t;r.InitialData._defineReadOnlyProperty$i(this,"hostName",this.$$d__getHostName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"hostVersion",this.$$d__getHostVersion$p$0);64===this._appName$p$0&&r.InitialData._defineReadOnlyProperty$i(this,"OWAView",this.$$d__getOwaView$p$0)};r.Diagnostics.prototype={_data$p$0:null,_appName$p$0:0,_getHostName$p$0:function(){switch(this._appName$p$0){case 8:return"Outlook";case 64:return"OutlookWebApp";case 65536:return"OutlookIOS";case 4194304:return"OutlookAndroid";default:return null}},_getHostVersion$p$0:function(){return this._data$p$0.get__hostVersion$i$0()},_getOwaView$p$0:function(){return this._data$p$0.get__owaView$i$0()}};r.EmailAddressDetails=function(n){this.$$d__getRecipientType$p$0=Function.createDelegate(this,this._getRecipientType$p$0);this.$$d__getAppointmentResponse$p$0=Function.createDelegate(this,this._getAppointmentResponse$p$0);this.$$d__getDisplayName$p$0=Function.createDelegate(this,this._getDisplayName$p$0);this.$$d__getEmailAddress$p$0=Function.createDelegate(this,this._getEmailAddress$p$0);this._data$p$0=n;r.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0);r.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0);r.ScriptHelpers.dictionaryContainsKey(n,"appointmentResponse")&&r.InitialData._defineReadOnlyProperty$i(this,"appointmentResponse",this.$$d__getAppointmentResponse$p$0);r.ScriptHelpers.dictionaryContainsKey(n,"recipientType")&&r.InitialData._defineReadOnlyProperty$i(this,"recipientType",this.$$d__getRecipientType$p$0)};r.EmailAddressDetails._createFromEmailUserDictionary$i=function(n){var t={};var u=n.Name;var i=n.UserId;t.name=u||r.EmailAddressDetails._emptyString$p;t.address=i||r.EmailAddressDetails._emptyString$p;return new r.EmailAddressDetails(t)};r.EmailAddressDetails.prototype={_data$p$0:null,_getEmailAddress$p$0:function(){return this._data$p$0.address},_getDisplayName$p$0:function(){return this._data$p$0.name},_getAppointmentResponse$p$0:function(){var n=this._data$p$0.appointmentResponse;return n=0;u--){for(var e=!1,f=u-1;f>=0;f--)if(i(t[u],t[f],r)){e=!0;break}e&&Array.removeAt(t,u)}return t};r.Entities.prototype={_dateTimeSent$p$0:null,_data$p$0:null,_filteredData$p$0:null,_filteredEntitiesCache$p$0:null,_permissionLevel$p$0:0,_taskSuggestions$p$0:null,_meetingSuggestions$p$0:null,_phoneNumbers$p$0:null,_contacts$p$0:null,_addresses$p$0:null,_emailAddresses$p$0:null,_urls$p$0:null,_flightReservations$p$0:null,_parcelDeliveries$p$0:null,_getByType$i$0:function(n){if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.MeetingSuggestion)return this._getMeetingSuggestions$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.TaskSuggestion)return this._getTaskSuggestions$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.Address)return this._getAddresses$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.PhoneNumber)return this._getPhoneNumbers$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.EmailAddress)return this._getEmailAddresses$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.Url)return this._getUrls$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.Contact)return this._getContacts$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.FlightReservations)return this._getFlightReservations$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.ParcelDeliveries)return this._getParcelDeliveries$p$0();return null},_getFilteredEntitiesByName$i$0:function(n){this._filteredEntitiesCache$p$0||(this._filteredEntitiesCache$p$0={});if(!r.ScriptHelpers.dictionaryContainsKey(this._filteredEntitiesCache$p$0,n)){for(var u=!1,i=0;i0)return new Date(n.getFullYear()+t._offset$i$1,0,1);break;default:break}return n};r.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p=function(n,t,i){if(t>-5&&t<5){var u=(i+6)%7+1;var r=7*t+(u-n.getDay());n.setDate(n.getDate()+r);return n}else{var r=(i-n.getDay())%7;r<0&&(r+=7);n.setDate(n.getDate()+r);return n}};r.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p=function(n,t){var e;var i;var u;e=n;if(t._tag$i$1<=0||t._tag$i$1>12||t._offset$i$1<=0||t._offset$i$1>5)return n;var o=(12+t._tag$i$1-e.getMonth()-1)%12;i=new Date(e.getFullYear(),e.getMonth()+o,1);if(t._modifier$i$1===1)if(t._offset$i$1===1&&i.getDay()!==6&&i.getDay())return i;else{u=new Date(i.getFullYear(),i.getMonth(),i.getDate());u.setDate(u.getDate()+(8-i.getDay())%7);i.getDay()!==6&&i.getDay()&&i.getDay()!==1&&u.setDate(u.getDate()-7);u.setDate(u.getDate()+7*(t._offset$i$1-1));return u.getMonth()+1!==t._tag$i$1?n:u}else{u=new Date(i.getFullYear(),i.getMonth(),r.MeetingSuggestionTimeDecoder._daysInMonth$p(i.getMonth(),i.getFullYear()));var f=1-u.getDay();f>0&&(f=f-7);u.setDate(u.getDate()+f);u.setDate(u.getDate()+7*(1-t._offset$i$1));return u.getMonth()+1!==t._tag$i$1?i.getDay()!==6&&i.getDay()?i:n:u}};r.MeetingSuggestionTimeDecoder._decode$p=function(n,t,i,u){var o=32767;i.val=null;u.val=0;if(!n)return!1;u.val=t?r.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p(n):r.MeetingSuggestionTimeDecoder._getTimeOfDayInMilliseconds$p(n);var s=n.getTime()-u.val;var f=(s-r.MeetingSuggestionTimeDecoder._baseDate$p.getTime())/864e5;if(f<0)return!1;else if(f>=262144)return!1;else{var e=f>>15;f=f&o;switch(e){case 0:return r.MeetingSuggestionTimeDecoder._decodePreciseDate$p(f,i);case 1:return r.MeetingSuggestionTimeDecoder._decodeRelativeDate$p(f,i);default:return!1}}};r.MeetingSuggestionTimeDecoder._decodePreciseDate$p=function(n,t){var c=7;var o=15;var s=31;var h=127;var f=null;var u=0;var e=0;t.val=null;var i=n>>12&c;if((i&4)==4){f=n>>5&h;if((i&2)==2){if((i&1)==1)return!1;u=n>>1&o}}else{(i&2)==2&&(u=n>>8&o);(i&1)==1&&(e=n>>3&s)}t.val=new r._preciseDate(e,u,f);return!0};r.MeetingSuggestionTimeDecoder._decodeRelativeDate$p=function(n,t){var s=15;var o=63;var c=7;var h=3;var u=n&s;n>>=4;var i=r.MeetingSuggestionTimeDecoder._fromComplement$p(n&o,6);n>>=6;var e=n&c;n>>=3;var f=n&h;try{t.val=new r._relativeDate(f,i,e,u);return!0}catch(l){t.val=null;return!1}};r.MeetingSuggestionTimeDecoder._fromComplement$p=function(n,t){var i=1<1)throw Error.argument("actions",window._u.ExtensibilityStrings.l_ActionsDefinitionMultipleActionsError_Text);}else throw Error.argument("actions",String.format(window._u.ExtensibilityStrings.l_InvalidParameterValueError_Text,"actions"));return i};r.NotificationMessages._validateActionsDefinitionActionType$p=function(n,t){if(!n.actionType)throw Error.argument("actionType",String.format(window._u.ExtensibilityStrings.l_NullOrEmptyParameterError_Text,"actionType"));if("showTaskPane"!==n.actionType)throw Error.argument("actionType",window._u.ExtensibilityStrings.l_InvalidActionType_Text);else if(!r.ScriptHelpers.isNonEmptyString(n.commandId))throw Error.argument("commandId",String.format(window._u.ExtensibilityStrings.l_InvalidCommandIdError_Text,"commandId"));};r.NotificationMessages._validateActionsDefinitionActionText$p=function(n){if(!r.ScriptHelpers.isNonEmptyString(n.actionText))throw Error.argument("actionText",String.format(window._u.ExtensibilityStrings.l_NullOrEmptyParameterError_Text,"actionText"));if(n.actionText.length>30)throw Error.argument(window._u.ExtensibilityStrings.l_ParameterValueTooLongError_Text,String.format(window._u.ExtensibilityStrings.l_ParameterValueTooLongError_Text,"actionText",30));};r.NotificationMessages.prototype.addAsync=function(n,t){for(var f=[],i=2;i2||!r.CommonParameters._argIsFunction$p(n[0]))return!1;f=n[0];i>1&&(u=n[1]);t.val=new r.CommonParameters(null,f,u);return!0};r.CommonParameters._argIsFunction$p=function(n){return typeof n=="function"};r.CommonParameters.prototype={_options$p$0:null,_callback$p$0:null,_asyncContext$p$0:null,get_options:function(){return this._options$p$0},get_callback:function(){return this._callback$p$0},get_asyncContext:function(){return this._asyncContext$p$0}};r.EwsRequest=function(n){r.EwsRequest.initializeBase(this,[n])};r.EwsRequest.prototype={readyState:1,status:0,statusText:null,onreadystatechange:null,responseText:null,get__statusCode$i$1:function(){return this.status},set__statusCode$i$1:function(n){this.status=n;return n},get__statusDescription$i$1:function(){return this.statusText},set__statusDescription$i$1:function(n){this.statusText=n;return n},get__requestState$i$1:function(){return this.readyState},set__requestState$i$1:function(n){this.readyState=n;return n},get_hasOnReadyStateChangeCallback:function(){return!r.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)},get__response$i$1:function(){return this.responseText},set__response$i$1:function(n){this.responseText=n;return n},send:function(n){this._checkSendConditions$i$1();r.ScriptHelpers.isNullOrUndefined(n)&&this._throwInvalidStateException$i$1();this._sendRequest$i$0(5,"EwsRequest",{body:n})},_callOnReadyStateChangeCallback$i$1:function(){r.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)||this.onreadystatechange()},_parseExtraResponseData$i$1:function(n){},executeExtraFailedResponseSteps:function(){}};r.InitialData=function(n){this._data$p$0=n;this._permissionLevel$p$0=this._calculatePermissionLevel$p$0()};r.InitialData._defineReadOnlyProperty$i=function(n,t,i){var r={get:i,configurable:!1};window.Object.defineProperty(n,t,r)};r.InitialData.prototype={_toRecipients$p$0:null,_ccRecipients$p$0:null,_attachments$p$0:null,_resources$p$0:null,_entities$p$0:null,_selectedEntities$p$0:null,_data$p$0:null,_permissionLevel$p$0:0,get__isRestIdSupported$i$0:function(){return this._data$p$0.isRestIdSupported},get__itemId$i$0:function(){return this._data$p$0.id},get__itemClass$i$0:function(){return this._data$p$0.itemClass},get__dateTimeCreated$i$0:function(){return new Date(this._data$p$0.dateTimeCreated)},get__dateTimeModified$i$0:function(){return new Date(this._data$p$0.dateTimeModified)},get__dateTimeSent$i$0:function(){return new Date(this._data$p$0.dateTimeSent)},get__subject$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();return this._data$p$0.subject},get__normalizedSubject$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();return this._data$p$0.normalizedSubject},get__internetMessageId$i$0:function(){return this._data$p$0.internetMessageId},get__conversationId$i$0:function(){return this._data$p$0.conversationId},get__sender$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();var n=this._data$p$0.sender;return r.ScriptHelpers.isNullOrUndefined(n)?null:new r.EmailAddressDetails(n)},get__from$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();var n=this._data$p$0.from;return r.ScriptHelpers.isNullOrUndefined(n)?null:new r.EmailAddressDetails(n)},get__to$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._toRecipients$p$0&&(this._toRecipients$p$0=this._createEmailAddressDetails$p$0("to"));return this._toRecipients$p$0},get__cc$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._ccRecipients$p$0&&(this._ccRecipients$p$0=this._createEmailAddressDetails$p$0("cc"));return this._ccRecipients$p$0},get__attachments$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._attachments$p$0&&(this._attachments$p$0=this._createAttachmentDetails$p$0());return this._attachments$p$0},get__ewsUrl$i$0:function(){return this._data$p$0.ewsUrl},get__restUrl$i$0:function(){return this._data$p$0.restUrl},get__marketplaceAssetId$i$0:function(){return this._data$p$0.marketplaceAssetId},get__extensionId$i$0:function(){return this._data$p$0.extensionId},get__marketplaceContentMarket$i$0:function(){return this._data$p$0.marketplaceContentMarket},get__consentMetadata$i$0:function(){return this._data$p$0.consentMetadata},get__isRead$i$0:function(){return this._data$p$0.isRead},get__endNodeUrl$i$0:function(){return this._data$p$0.endNodeUrl},get__entryPointUrl$i$0:function(){return this._data$p$0.entryPointUrl},get__start$i$0:function(){return new Date(this._data$p$0.start)},get__end$i$0:function(){return new Date(this._data$p$0.end)},get__location$i$0:function(){return this._data$p$0.location},get__userProfileType$i$0:function(){return this._data$p$0.userProfileType},get__resources$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._resources$p$0&&(this._resources$p$0=this._createEmailAddressDetails$p$0("resources"));return this._resources$p$0},get__organizer$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();var n=this._data$p$0.organizer;return r.ScriptHelpers.isNullOrUndefined(n)?null:new r.EmailAddressDetails(n)},get__userProfileCapabilities$i$0:function(){return this._data$p$0.userProfileCapabilities},get__userDisplayName$i$0:function(){return this._data$p$0.userDisplayName},get__userEmailAddress$i$0:function(){return this._data$p$0.userEmailAddress},get__userTimeZone$i$0:function(){return this._data$p$0.userTimeZone},get__timeZoneOffsets$i$0:function(){return this._data$p$0.timeZoneOffsets},get__hostVersion$i$0:function(){return this._data$p$0.hostVersion},get__owaView$i$0:function(){return this._data$p$0.owaView},get__overrideWindowOpen$i$0:function(){return this._data$p$0.overrideWindowOpen},_getEntities$i$0:function(){this._entities$p$0||(this._entities$p$0=new r.Entities(this._data$p$0.entities,this._data$p$0.filteredEntities,this.get__dateTimeSent$i$0(),this._permissionLevel$p$0));return this._entities$p$0},_getSelectedEntities$i$0:function(){this._selectedEntities$p$0||(this._selectedEntities$p$0=new r.Entities(this._data$p$0.selectedEntities,null,this.get__dateTimeSent$i$0(),this._permissionLevel$p$0));return this._selectedEntities$p$0},_getEntitiesByType$i$0:function(n){var t=this._getEntities$i$0();return t._getByType$i$0(n)},_getFilteredEntitiesByName$i$0:function(n){var t=this._getEntities$i$0();return t._getFilteredEntitiesByName$i$0(n)},_getRegExMatches$i$0:function(){return this._data$p$0.regExMatches?this._data$p$0.regExMatches:null},_getSelectedRegExMatches$i$0:function(){return this._data$p$0.selectedRegExMatches?this._data$p$0.selectedRegExMatches:null},_getRegExMatchesByName$i$0:function(n){var t=this._getRegExMatches$i$0();return!t||!t[n]?null:t[n]},_throwOnRestrictedPermissionLevel$i$0:function(){window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0)},_createEmailAddressDetails$p$0:function(n){var i=this._data$p$0[n];if(r.ScriptHelpers.isNullOrUndefined(i))return[];for(var u=[],t=0;t 0) - bucketPositive.push(ele); - else if(ele.tabIndex===0) - bucket0.push(ele) - } - else - bucket0.push(ele) - } - bucketPositive=bucketPositive.sort(function(left, right) - { - var diff=left.tabIndex - right.tabIndex; - if(diff===0) - diff=bucketPositive.indexOf(left) - bucketPositive.indexOf(right); - return diff - }); - return[].concat(bucketPositive,bucket0) - } - return{ - set_entropy: function OSF_OUtil$set_entropy(entropy) - { - if(typeof entropy=="string") - for(var i=0; i < entropy.length; i+=4) - { - var temp=0; - for(var j=0; j < 4 && i+j < entropy.length; j++) - temp=(temp << 8)+entropy.charCodeAt(i+j); - _rndentropy ^=temp - } - else if(typeof entropy=="number") - _rndentropy ^=entropy; - else - _rndentropy ^=2147483647 * Math.random(); - _rndentropy &=2147483647 - }, - extend: function OSF_OUtil$extend(child, parent) - { - var F=function(){}; - F.prototype=parent.prototype; - child.prototype=new F; - child.prototype.constructor=child; - child.uber=parent.prototype; - if(parent.prototype.constructor===Object.prototype.constructor) - parent.prototype.constructor=parent - }, - setNamespace: function OSF_OUtil$setNamespace(name, parent) - { - if(parent && name && !parent[name]) - parent[name]={} - }, - unsetNamespace: function OSF_OUtil$unsetNamespace(name, parent) - { - if(parent && name && parent[name]) - delete parent[name] - }, - loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) - { - if(url && callback) - { - var doc=window.document; - var _loadedScriptEntry=_loadedScripts[url]; - if(!_loadedScriptEntry) - { - var script=doc.createElement("script"); - script.type="text/javascript"; - _loadedScriptEntry={ - loaded: false, - pendingCallbacks: [callback], - timer: null - }; - _loadedScripts[url]=_loadedScriptEntry; - var onLoadCallback=function OSF_OUtil_loadScript$onLoadCallback() - { - if(_loadedScriptEntry.timer !=null) - { - clearTimeout(_loadedScriptEntry.timer); - delete _loadedScriptEntry.timer - } - _loadedScriptEntry.loaded=true; - var pendingCallbackCount=_loadedScriptEntry.pendingCallbacks.length; - for(var i=0; i < pendingCallbackCount; i++) - { - var currentCallback=_loadedScriptEntry.pendingCallbacks.shift(); - currentCallback() - } - }; - var onLoadError=function OSF_OUtil_loadScript$onLoadError() - { - delete _loadedScripts[url]; - if(_loadedScriptEntry.timer !=null) - { - clearTimeout(_loadedScriptEntry.timer); - delete _loadedScriptEntry.timer - } - var pendingCallbackCount=_loadedScriptEntry.pendingCallbacks.length; - for(var i=0; i < pendingCallbackCount; i++) - { - var currentCallback=_loadedScriptEntry.pendingCallbacks.shift(); - currentCallback() - } - }; - if(script.readyState) - script.onreadystatechange=function() - { - if(script.readyState=="loaded" || script.readyState=="complete") - { - script.onreadystatechange=null; - onLoadCallback() - } - }; - else - script.onload=onLoadCallback; - script.onerror=onLoadError; - timeoutInMs=timeoutInMs || _defaultScriptLoadingTimeout; - _loadedScriptEntry.timer=setTimeout(onLoadError,timeoutInMs); - script.setAttribute("crossOrigin","anonymous"); - script.src=url; - doc.getElementsByTagName("head")[0].appendChild(script) - } - else if(_loadedScriptEntry.loaded) - callback(); - else - _loadedScriptEntry.pendingCallbacks.push(callback) - } - }, - loadCSS: function OSF_OUtil$loadCSS(url) - { - if(url) - { - var doc=window.document; - var link=doc.createElement("link"); - link.type="text/css"; - link.rel="stylesheet"; - link.href=url; - doc.getElementsByTagName("head")[0].appendChild(link) - } - }, - parseEnum: function OSF_OUtil$parseEnum(str, enumObject) - { - var parsed=enumObject[str.trim()]; - if(typeof parsed=="undefined") - { - OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:"+str); - throw OsfMsAjaxFactory.msAjaxError.argument("str"); - } - return parsed - }, - delayExecutionAndCache: function OSF_OUtil$delayExecutionAndCache() - { - var obj={calc: arguments[0]}; - return function() - { - if(obj.calc) - { - obj.val=obj.calc.apply(this,arguments); - delete obj.calc - } - return obj.val - } - }, - getUniqueId: function OSF_OUtil$getUniqueId() - { - _uniqueId=_uniqueId+1; - return _uniqueId.toString() - }, - formatString: function OSF_OUtil$formatString() - { - var args=arguments; - var source=args[0]; - return source.replace(/{(\d+)}/gm,function(match, number) - { - var index=parseInt(number,10)+1; - return args[index]===undefined ? "{"+number+"}" : args[index] - }) - }, - generateConversationId: function OSF_OUtil$generateConversationId() - { - return[_random(),_random(),(new Date).getTime().toString()].join("_") - }, - getFrameName: function OSF_OUtil$getFrameName(cacheKey) - { - return _xdmSessionKeyPrefix+cacheKey+this.generateConversationId() - }, - addXdmInfoAsHash: function OSF_OUtil$addXdmInfoAsHash(url, xdmInfoValue) - { - return OSF.OUtil.addInfoAsHash(url,_xdmInfoKey,xdmInfoValue,false) - }, - addSerializerVersionAsHash: function OSF_OUtil$addSerializerVersionAsHash(url, serializerVersion) - { - return OSF.OUtil.addInfoAsHash(url,_serializerVersionKey,serializerVersion,true) - }, - addInfoAsHash: function OSF_OUtil$addInfoAsHash(url, keyName, infoValue, encodeInfo) - { - url=url.trim() || ""; - var urlParts=url.split(_fragmentSeparator); - var urlWithoutFragment=urlParts.shift(); - var fragment=urlParts.join(_fragmentSeparator); - var newFragment; - if(encodeInfo) - newFragment=[keyName,encodeURIComponent(infoValue),fragment].join(""); - else - newFragment=[fragment,keyName,infoValue].join(""); - return[urlWithoutFragment,_fragmentSeparator,newFragment].join("") - }, - parseHostInfoFromWindowName: function OSF_OUtil$parseHostInfoFromWindowName(skipSessionStorage, windowName) - { - return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage,windowName,OSF.WindowNameItemKeys.HostInfo) - }, - parseXdmInfo: function OSF_OUtil$parseXdmInfo(skipSessionStorage) - { - var xdmInfoValue=OSF.OUtil.parseXdmInfoWithGivenFragment(skipSessionStorage,window.location.hash); - if(!xdmInfoValue) - xdmInfoValue=OSF.OUtil.parseXdmInfoFromWindowName(skipSessionStorage,window.name); - return xdmInfoValue - }, - parseXdmInfoFromWindowName: function OSF_OUtil$parseXdmInfoFromWindowName(skipSessionStorage, windowName) - { - return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage,windowName,OSF.WindowNameItemKeys.XdmInfo) - }, - parseXdmInfoWithGivenFragment: function OSF_OUtil$parseXdmInfoWithGivenFragment(skipSessionStorage, fragment) - { - return OSF.OUtil.parseInfoWithGivenFragment(_xdmInfoKey,_xdmSessionKeyPrefix,false,skipSessionStorage,fragment) - }, - parseSerializerVersion: function OSF_OUtil$parseSerializerVersion(skipSessionStorage) - { - var serializerVersion=OSF.OUtil.parseSerializerVersionWithGivenFragment(skipSessionStorage,window.location.hash); - if(isNaN(serializerVersion)) - serializerVersion=OSF.OUtil.parseSerializerVersionFromWindowName(skipSessionStorage,window.name); - return serializerVersion - }, - parseSerializerVersionFromWindowName: function OSF_OUtil$parseSerializerVersionFromWindowName(skipSessionStorage, windowName) - { - return parseInt(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage,windowName,OSF.WindowNameItemKeys.SerializerVersion)) - }, - parseSerializerVersionWithGivenFragment: function OSF_OUtil$parseSerializerVersionWithGivenFragment(skipSessionStorage, fragment) - { - return parseInt(OSF.OUtil.parseInfoWithGivenFragment(_serializerVersionKey,_serializerVersionKeyPrefix,true,skipSessionStorage,fragment)) - }, - parseInfoFromWindowName: function OSF_OUtil$parseInfoFromWindowName(skipSessionStorage, windowName, infoKey) - { - try - { - var windowNameObj=JSON.parse(windowName); - var infoValue=windowNameObj !=null ? windowNameObj[infoKey] : null; - var osfSessionStorage=_getSessionStorage(); - if(!skipSessionStorage && osfSessionStorage && windowNameObj !=null) - { - var sessionKey=windowNameObj[OSF.WindowNameItemKeys.BaseFrameName]+infoKey; - if(infoValue) - osfSessionStorage.setItem(sessionKey,infoValue); - else - infoValue=osfSessionStorage.getItem(sessionKey) - } - return infoValue - } - catch(Exception) - { - return null - } - }, - parseInfoWithGivenFragment: function OSF_OUtil$parseInfoWithGivenFragment(infoKey, infoKeyPrefix, decodeInfo, skipSessionStorage, fragment) - { - var fragmentParts=fragment.split(infoKey); - var infoValue=fragmentParts.length > 1 ? fragmentParts[fragmentParts.length - 1] : null; - if(decodeInfo && infoValue !=null) - { - if(infoValue.indexOf(_fragmentInfoDelimiter) >=0) - infoValue=infoValue.split(_fragmentInfoDelimiter)[0]; - infoValue=decodeURIComponent(infoValue) - } - var osfSessionStorage=_getSessionStorage(); - if(!skipSessionStorage && osfSessionStorage) - { - var sessionKeyStart=window.name.indexOf(infoKeyPrefix); - if(sessionKeyStart > -1) - { - var sessionKeyEnd=window.name.indexOf(";",sessionKeyStart); - if(sessionKeyEnd==-1) - sessionKeyEnd=window.name.length; - var sessionKey=window.name.substring(sessionKeyStart,sessionKeyEnd); - if(infoValue) - osfSessionStorage.setItem(sessionKey,infoValue); - else - infoValue=osfSessionStorage.getItem(sessionKey) - } - } - return infoValue - }, - getConversationId: function OSF_OUtil$getConversationId() - { - var searchString=window.location.search; - var conversationId=null; - if(searchString) - { - var index=searchString.indexOf("&"); - conversationId=index > 0 ? searchString.substring(1,index) : searchString.substr(1); - if(conversationId && conversationId.charAt(conversationId.length - 1)==="=") - { - conversationId=conversationId.substring(0,conversationId.length - 1); - if(conversationId) - conversationId=decodeURIComponent(conversationId) - } - } - return conversationId - }, - getInfoItems: function OSF_OUtil$getInfoItems(strInfo) - { - var items=strInfo.split("$"); - if(typeof items[1]=="undefined") - items=strInfo.split("|"); - if(typeof items[1]=="undefined") - items=strInfo.split("%7C"); - return items - }, - getXdmFieldValue: function OSF_OUtil$getXdmFieldValue(xdmFieldName, skipSessionStorage) - { - var fieldValue=""; - var xdmInfoValue=OSF.OUtil.parseXdmInfo(skipSessionStorage); - if(xdmInfoValue) - { - var items=OSF.OUtil.getInfoItems(xdmInfoValue); - if(items !=undefined && items.length >=3) - switch(xdmFieldName) - { - case OSF.XdmFieldName.ConversationUrl: - fieldValue=items[2]; - break; - case OSF.XdmFieldName.AppId: - fieldValue=items[1]; - break - } - } - return fieldValue - }, - validateParamObject: function OSF_OUtil$validateParamObject(params, expectedProperties, callback) - { - var e=Function._validateParams(arguments,[{ - name: "params", - type: Object, - mayBeNull: false - },{ - name: "expectedProperties", - type: Object, - mayBeNull: false - },{ - name: "callback", - type: Function, - mayBeNull: true - }]); - if(e) - throw e; - for(var p in expectedProperties) - { - e=Function._validateParameter(params[p],expectedProperties[p],p); - if(e) - throw e; - } - }, - writeProfilerMark: function OSF_OUtil$writeProfilerMark(text) - { - if(window.msWriteProfilerMark) - { - window.msWriteProfilerMark(text); - OsfMsAjaxFactory.msAjaxDebug.trace(text) - } - }, - outputDebug: function OSF_OUtil$outputDebug(text) - { - if(typeof OsfMsAjaxFactory !=="undefined" && OsfMsAjaxFactory.msAjaxDebug && OsfMsAjaxFactory.msAjaxDebug.trace) - OsfMsAjaxFactory.msAjaxDebug.trace(text) - }, - defineNondefaultProperty: function OSF_OUtil$defineNondefaultProperty(obj, prop, descriptor, attributes) - { - descriptor=descriptor || {}; - for(var nd in attributes) - { - var attribute=attributes[nd]; - if(descriptor[attribute]==undefined) - descriptor[attribute]=true - } - Object.defineProperty(obj,prop,descriptor); - return obj - }, - defineNondefaultProperties: function OSF_OUtil$defineNondefaultProperties(obj, descriptors, attributes) - { - descriptors=descriptors || {}; - for(var prop in descriptors) - OSF.OUtil.defineNondefaultProperty(obj,prop,descriptors[prop],attributes); - return obj - }, - defineEnumerableProperty: function OSF_OUtil$defineEnumerableProperty(obj, prop, descriptor) - { - return OSF.OUtil.defineNondefaultProperty(obj,prop,descriptor,["enumerable"]) - }, - defineEnumerableProperties: function OSF_OUtil$defineEnumerableProperties(obj, descriptors) - { - return OSF.OUtil.defineNondefaultProperties(obj,descriptors,["enumerable"]) - }, - defineMutableProperty: function OSF_OUtil$defineMutableProperty(obj, prop, descriptor) - { - return OSF.OUtil.defineNondefaultProperty(obj,prop,descriptor,["writable","enumerable","configurable"]) - }, - defineMutableProperties: function OSF_OUtil$defineMutableProperties(obj, descriptors) - { - return OSF.OUtil.defineNondefaultProperties(obj,descriptors,["writable","enumerable","configurable"]) - }, - finalizeProperties: function OSF_OUtil$finalizeProperties(obj, descriptor) - { - descriptor=descriptor || {}; - var props=Object.getOwnPropertyNames(obj); - var propsLength=props.length; - for(var i=0; i < propsLength; i++) - { - var prop=props[i]; - var desc=Object.getOwnPropertyDescriptor(obj,prop); - if(!desc.get && !desc.set) - desc.writable=descriptor.writable || false; - desc.configurable=descriptor.configurable || false; - desc.enumerable=descriptor.enumerable || true; - Object.defineProperty(obj,prop,desc) - } - return obj - }, - mapList: function OSF_OUtil$MapList(list, mapFunction) - { - var ret=[]; - if(list) - for(var item in list) - ret.push(mapFunction(list[item])); - return ret - }, - listContainsKey: function OSF_OUtil$listContainsKey(list, key) - { - for(var item in list) - if(key==item) - return true; - return false - }, - listContainsValue: function OSF_OUtil$listContainsElement(list, value) - { - for(var item in list) - if(value==list[item]) - return true; - return false - }, - augmentList: function OSF_OUtil$augmentList(list, addenda) - { - var add=list.push ? function(key, value) - { - list.push(value) - } : function(key, value) - { - list[key]=value - }; - for(var key in addenda) - add(key,addenda[key]) - }, - redefineList: function OSF_Outil$redefineList(oldList, newList) - { - for(var key1 in oldList) - delete oldList[key1]; - for(var key2 in newList) - oldList[key2]=newList[key2] - }, - isArray: function OSF_OUtil$isArray(obj) - { - return Object.prototype.toString.apply(obj)==="[object Array]" - }, - isFunction: function OSF_OUtil$isFunction(obj) - { - return Object.prototype.toString.apply(obj)==="[object Function]" - }, - isDate: function OSF_OUtil$isDate(obj) - { - return Object.prototype.toString.apply(obj)==="[object Date]" - }, - addEventListener: function OSF_OUtil$addEventListener(element, eventName, listener) - { - if(element.addEventListener) - element.addEventListener(eventName,listener,false); - else if(Sys.Browser.agent===Sys.Browser.InternetExplorer && element.attachEvent) - element.attachEvent("on"+eventName,listener); - else - element["on"+eventName]=listener - }, - removeEventListener: function OSF_OUtil$removeEventListener(element, eventName, listener) - { - if(element.removeEventListener) - element.removeEventListener(eventName,listener,false); - else if(Sys.Browser.agent===Sys.Browser.InternetExplorer && element.detachEvent) - element.detachEvent("on"+eventName,listener); - else - element["on"+eventName]=null - }, - getCookieValue: function OSF_OUtil$getCookieValue(cookieName) - { - var tmpCookieString=RegExp(cookieName+"[^;]+").exec(document.cookie); - return tmpCookieString.toString().replace(/^[^=]+./,"") - }, - xhrGet: function OSF_OUtil$xhrGet(url, onSuccess, onError) - { - var xmlhttp; - try - { - xmlhttp=new XMLHttpRequest; - xmlhttp.onreadystatechange=function() - { - if(xmlhttp.readyState==4) - if(xmlhttp.status==200) - onSuccess(xmlhttp.responseText); - else - onError(xmlhttp.status) - }; - xmlhttp.open("GET",url,true); - xmlhttp.send() - } - catch(ex) - { - onError(ex) - } - }, - xhrGetFull: function OSF_OUtil$xhrGetFull(url, oneDriveFileName, onSuccess, onError) - { - var xmlhttp; - var requestedFileName=oneDriveFileName; - try - { - xmlhttp=new XMLHttpRequest; - xmlhttp.onreadystatechange=function() - { - if(xmlhttp.readyState==4) - if(xmlhttp.status==200) - onSuccess(xmlhttp,requestedFileName); - else - onError(xmlhttp.status) - }; - xmlhttp.open("GET",url,true); - xmlhttp.send() - } - catch(ex) - { - onError(ex) - } - }, - encodeBase64: function OSF_Outil$encodeBase64(input) - { - if(!input) - return input; - var codex="ABCDEFGHIJKLMNOP"+"QRSTUVWXYZabcdef"+"ghijklmnopqrstuv"+"wxyz0123456789+/="; - var output=[]; - var temp=[]; - var index=0; - var c1, - c2, - c3, - a, - b, - c; - var i; - var length=input.length; - do - { - c1=input.charCodeAt(index++); - c2=input.charCodeAt(index++); - c3=input.charCodeAt(index++); - i=0; - a=c1 & 255; - b=c1 >> 8; - c=c2 & 255; - temp[i++]=a >> 2; - temp[i++]=(a & 3) << 4 | b >> 4; - temp[i++]=(b & 15) << 2 | c >> 6; - temp[i++]=c & 63; - if(!isNaN(c2)) - { - a=c2 >> 8; - b=c3 & 255; - c=c3 >> 8; - temp[i++]=a >> 2; - temp[i++]=(a & 3) << 4 | b >> 4; - temp[i++]=(b & 15) << 2 | c >> 6; - temp[i++]=c & 63 - } - if(isNaN(c2)) - temp[i - 1]=64; - else if(isNaN(c3)) - { - temp[i - 2]=64; - temp[i - 1]=64 - } - for(var t=0; t < i; t++) - output.push(codex.charAt(temp[t])) - } while(index < length); - return output.join("") - }, - getSessionStorage: function OSF_Outil$getSessionStorage() - { - return _getSessionStorage() - }, - getLocalStorage: function OSF_Outil$getLocalStorage() - { - if(!_safeLocalStorage) - { - try - { - var localStorage=window.localStorage - } - catch(ex) - { - localStorage=null - } - _safeLocalStorage=new OfficeExt.SafeStorage(localStorage) - } - return _safeLocalStorage - }, - convertIntToCssHexColor: function OSF_Outil$convertIntToCssHexColor(val) - { - var hex="#"+(Number(val)+16777216).toString(16).slice(-6); - return hex - }, - attachClickHandler: function OSF_Outil$attachClickHandler(element, handler) - { - element.onclick=function(e) - { - handler() - }; - element.ontouchend=function(e) - { - handler(); - e.preventDefault() - } - }, - getQueryStringParamValue: function OSF_Outil$getQueryStringParamValue(queryString, paramName) - { - var e=Function._validateParams(arguments,[{ - name: "queryString", - type: String, - mayBeNull: false - },{ - name: "paramName", - type: String, - mayBeNull: false - }]); - if(e) - { - OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null."); - return"" - } - var queryExp=new RegExp("[\\?&]"+paramName+"=([^&#]*)","i"); - if(!queryExp.test(queryString)) - { - OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found."); - return"" - } - return queryExp.exec(queryString)[1] - }, - isiOS: function OSF_Outil$isiOS() - { - return window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false - }, - isChrome: function OSF_Outil$isChrome() - { - return window.navigator.userAgent.indexOf("Chrome") > 0 && !OSF.OUtil.isEdge() - }, - isEdge: function OSF_Outil$isEdge() - { - return window.navigator.userAgent.indexOf("Edge") > 0 - }, - isIE: function OSF_Outil$isIE() - { - return window.navigator.userAgent.indexOf("Trident") > 0 - }, - isFirefox: function OSF_Outil$isFirefox() - { - return window.navigator.userAgent.indexOf("Firefox") > 0 - }, - shallowCopy: function OSF_Outil$shallowCopy(sourceObj) - { - if(sourceObj==null) - return null; - else if(!(sourceObj instanceof Object)) - return sourceObj; - else if(Array.isArray(sourceObj)) - { - var copyArr=[]; - for(var i=0; i < sourceObj.length; i++) - copyArr.push(sourceObj[i]); - return copyArr - } - else - { - var copyObj=sourceObj.constructor(); - for(var property in sourceObj) - if(sourceObj.hasOwnProperty(property)) - copyObj[property]=sourceObj[property]; - return copyObj - } - }, - createObject: function OSF_Outil$createObject(properties) - { - var obj=null; - if(properties) - { - obj={}; - var len=properties.length; - for(var i=0; i < len; i++) - obj[properties[i].name]=properties[i].value - } - return obj - }, - addClass: function OSF_OUtil$addClass(elmt, val) - { - if(!OSF.OUtil.hasClass(elmt,val)) - { - var className=elmt.getAttribute(_classN); - if(className) - elmt.setAttribute(_classN,className+" "+val); - else - elmt.setAttribute(_classN,val) - } - }, - hasClass: function OSF_OUtil$hasClass(elmt, clsName) - { - var className=elmt.getAttribute(_classN); - return className && className.match(new RegExp("(\\s|^)"+clsName+"(\\s|$)")) - }, - focusToFirstTabbable: function OSF_OUtil$focusToFirstTabbable(all, backward) - { - var next; - var focused=false; - var candidate; - var setFlag=function(e) - { - focused=true - }; - var findNextPos=function(allLen, currPos, backward) - { - if(currPos < 0 || currPos > allLen) - return-1; - else if(currPos===0 && backward) - return-1; - else if(currPos===allLen - 1 && !backward) - return-1; - if(backward) - return currPos - 1; - else - return currPos+1 - }; - all=_reOrderTabbableElements(all); - next=backward ? all.length - 1 : 0; - if(all.length===0) - return null; - while(!focused && next >=0 && next < all.length) - { - candidate=all[next]; - window.focus(); - candidate.addEventListener("focus",setFlag); - candidate.focus(); - candidate.removeEventListener("focus",setFlag); - next=findNextPos(all.length,next,backward); - if(!focused && candidate===document.activeElement) - focused=true - } - if(focused) - return candidate; - else - return null - }, - focusToNextTabbable: function OSF_OUtil$focusToNextTabbable(all, curr, shift) - { - var currPos; - var next; - var focused=false; - var candidate; - var setFlag=function(e) - { - focused=true - }; - var findCurrPos=function(all, curr) - { - var i=0; - for(; i < all.length; i++) - if(all[i]===curr) - return i; - return-1 - }; - var findNextPos=function(allLen, currPos, shift) - { - if(currPos < 0 || currPos > allLen) - return-1; - else if(currPos===0 && shift) - return-1; - else if(currPos===allLen - 1 && !shift) - return-1; - if(shift) - return currPos - 1; - else - return currPos+1 - }; - all=_reOrderTabbableElements(all); - currPos=findCurrPos(all,curr); - next=findNextPos(all.length,currPos,shift); - if(next < 0) - return null; - while(!focused && next >=0 && next < all.length) - { - candidate=all[next]; - candidate.addEventListener("focus",setFlag); - candidate.focus(); - candidate.removeEventListener("focus",setFlag); - next=findNextPos(all.length,next,shift); - if(!focused && candidate===document.activeElement) - focused=true - } - if(focused) - return candidate; - else - return null - } - } + var _uniqueId = -1; + var _xdmInfoKey = "&_xdm_Info="; + var _serializerVersionKey = "&_serializer_version="; + var _xdmSessionKeyPrefix = "_xdm_"; + var _serializerVersionKeyPrefix = "_serializer_version="; + var _fragmentSeparator = "#"; + var _fragmentInfoDelimiter = "&"; + var _classN = "class"; + var _loadedScripts = {}; + var _defaultScriptLoadingTimeout = 3e4; + var _safeSessionStorage = null; + var _safeLocalStorage = null; + var _rndentropy = (new Date).getTime(); + function _random() + { + var nextrand = 2147483647 * Math.random(); + nextrand ^= _rndentropy ^ (new Date).getMilliseconds() << Math.floor(Math.random() * (31 - 10)); + return nextrand.toString(16) + } + function _getSessionStorage() + { + if(!_safeSessionStorage) + { + try + { + var sessionStorage = window.sessionStorage + } + catch(ex) + { + sessionStorage = null + } + _safeSessionStorage = new OfficeExt.SafeStorage(sessionStorage) + } + return _safeSessionStorage + } + function _reOrderTabbableElements(elements) + { + var bucket0 = []; + var bucketPositive = []; + var i; + var len = elements.length; + var ele; + for(i = 0; i < len; i++) + { + ele = elements[i]; + if(ele.tabIndex) + { + if(ele.tabIndex > 0) + bucketPositive.push(ele); + else if(ele.tabIndex === 0) + bucket0.push(ele) + } + else + bucket0.push(ele) + } + bucketPositive = bucketPositive.sort(function(left, right) + { + var diff = left.tabIndex - right.tabIndex; + if(diff === 0) + diff = bucketPositive.indexOf(left) - bucketPositive.indexOf(right); + return diff + }); + return[].concat(bucketPositive,bucket0) + } + return{ + set_entropy: function OSF_OUtil$set_entropy(entropy) + { + if(typeof entropy == "string") + for(var i = 0; i < entropy.length; i += 4) + { + var temp = 0; + for(var j = 0; j < 4 && i + j < entropy.length; j++) + temp = (temp << 8) + entropy.charCodeAt(i + j); + _rndentropy ^= temp + } + else if(typeof entropy == "number") + _rndentropy ^= entropy; + else + _rndentropy ^= 2147483647 * Math.random(); + _rndentropy &= 2147483647 + }, + extend: function OSF_OUtil$extend(child, parent) + { + var F = function(){}; + F.prototype = parent.prototype; + child.prototype = new F; + child.prototype.constructor = child; + child.uber = parent.prototype; + if(parent.prototype.constructor === Object.prototype.constructor) + parent.prototype.constructor = parent + }, + setNamespace: function OSF_OUtil$setNamespace(name, parent) + { + if(parent && name && !parent[name]) + parent[name] = {} + }, + unsetNamespace: function OSF_OUtil$unsetNamespace(name, parent) + { + if(parent && name && parent[name]) + delete parent[name] + }, + serializeSettings: function OSF_OUtil$serializeSettings(settingsCollection) + { + var ret = {}; + for(var key in settingsCollection) + { + var value = settingsCollection[key]; + try + { + if(JSON) + value = JSON.stringify(value,function dateReplacer(k, v) + { + return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix + this[k].getTime() + OSF.DDA.SettingsManager.DataJSONSuffix : v + }); + else + value = Sys.Serialization.JavaScriptSerializer.serialize(value); + ret[key] = value + } + catch(ex){} + } + return ret + }, + deserializeSettings: function OSF_OUtil$deserializeSettings(serializedSettings) + { + var ret = {}; + serializedSettings = serializedSettings || {}; + for(var key in serializedSettings) + { + var value = serializedSettings[key]; + try + { + if(JSON) + value = JSON.parse(value,function dateReviver(k, v) + { + var d; + if(typeof v === "string" && v && v.length > 6 && v.slice(0,5) === OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1) === OSF.DDA.SettingsManager.DataJSONSuffix) + { + d = new Date(parseInt(v.slice(5,-1))); + if(d) + return d + } + return v + }); + else + value = Sys.Serialization.JavaScriptSerializer.deserialize(value,true); + ret[key] = value + } + catch(ex){} + } + return ret + }, + loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) + { + if(url && callback) + { + var doc = window.document; + var _loadedScriptEntry = _loadedScripts[url]; + if(!_loadedScriptEntry) + { + var script = doc.createElement("script"); + script.type = "text/javascript"; + _loadedScriptEntry = { + loaded: false, + pendingCallbacks: [callback], + timer: null + }; + _loadedScripts[url] = _loadedScriptEntry; + var onLoadCallback = function OSF_OUtil_loadScript$onLoadCallback() + { + if(_loadedScriptEntry.timer != null) + { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer + } + _loadedScriptEntry.loaded = true; + var pendingCallbackCount = _loadedScriptEntry.pendingCallbacks.length; + for(var i = 0; i < pendingCallbackCount; i++) + { + var currentCallback = _loadedScriptEntry.pendingCallbacks.shift(); + currentCallback() + } + }; + var onLoadError = function OSF_OUtil_loadScript$onLoadError() + { + delete _loadedScripts[url]; + if(_loadedScriptEntry.timer != null) + { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer + } + var pendingCallbackCount = _loadedScriptEntry.pendingCallbacks.length; + for(var i = 0; i < pendingCallbackCount; i++) + { + var currentCallback = _loadedScriptEntry.pendingCallbacks.shift(); + currentCallback() + } + }; + if(script.readyState) + script.onreadystatechange = function() + { + if(script.readyState == "loaded" || script.readyState == "complete") + { + script.onreadystatechange = null; + onLoadCallback() + } + }; + else + script.onload = onLoadCallback; + script.onerror = onLoadError; + timeoutInMs = timeoutInMs || _defaultScriptLoadingTimeout; + _loadedScriptEntry.timer = setTimeout(onLoadError,timeoutInMs); + script.setAttribute("crossOrigin","anonymous"); + script.src = url; + doc.getElementsByTagName("head")[0].appendChild(script) + } + else if(_loadedScriptEntry.loaded) + callback(); + else + _loadedScriptEntry.pendingCallbacks.push(callback) + } + }, + loadCSS: function OSF_OUtil$loadCSS(url) + { + if(url) + { + var doc = window.document; + var link = doc.createElement("link"); + link.type = "text/css"; + link.rel = "stylesheet"; + link.href = url; + doc.getElementsByTagName("head")[0].appendChild(link) + } + }, + parseEnum: function OSF_OUtil$parseEnum(str, enumObject) + { + var parsed = enumObject[str.trim()]; + if(typeof parsed == "undefined") + { + OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:" + str); + throw OsfMsAjaxFactory.msAjaxError.argument("str"); + } + return parsed + }, + delayExecutionAndCache: function OSF_OUtil$delayExecutionAndCache() + { + var obj = {calc: arguments[0]}; + return function() + { + if(obj.calc) + { + obj.val = obj.calc.apply(this,arguments); + delete obj.calc + } + return obj.val + } + }, + getUniqueId: function OSF_OUtil$getUniqueId() + { + _uniqueId = _uniqueId + 1; + return _uniqueId.toString() + }, + formatString: function OSF_OUtil$formatString() + { + var args = arguments; + var source = args[0]; + return source.replace(/{(\d+)}/gm,function(match, number) + { + var index = parseInt(number,10) + 1; + return args[index] === undefined ? "{" + number + "}" : args[index] + }) + }, + generateConversationId: function OSF_OUtil$generateConversationId() + { + return[_random(),_random(),(new Date).getTime().toString()].join("_") + }, + getFrameName: function OSF_OUtil$getFrameName(cacheKey) + { + return _xdmSessionKeyPrefix + cacheKey + this.generateConversationId() + }, + addXdmInfoAsHash: function OSF_OUtil$addXdmInfoAsHash(url, xdmInfoValue) + { + return OSF.OUtil.addInfoAsHash(url,_xdmInfoKey,xdmInfoValue,false) + }, + addSerializerVersionAsHash: function OSF_OUtil$addSerializerVersionAsHash(url, serializerVersion) + { + return OSF.OUtil.addInfoAsHash(url,_serializerVersionKey,serializerVersion,true) + }, + addInfoAsHash: function OSF_OUtil$addInfoAsHash(url, keyName, infoValue, encodeInfo) + { + url = url.trim() || ""; + var urlParts = url.split(_fragmentSeparator); + var urlWithoutFragment = urlParts.shift(); + var fragment = urlParts.join(_fragmentSeparator); + var newFragment; + if(encodeInfo) + newFragment = [keyName,encodeURIComponent(infoValue),fragment].join(""); + else + newFragment = [fragment,keyName,infoValue].join(""); + return[urlWithoutFragment,_fragmentSeparator,newFragment].join("") + }, + parseHostInfoFromWindowName: function OSF_OUtil$parseHostInfoFromWindowName(skipSessionStorage, windowName) + { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage,windowName,OSF.WindowNameItemKeys.HostInfo) + }, + parseXdmInfo: function OSF_OUtil$parseXdmInfo(skipSessionStorage) + { + var xdmInfoValue = OSF.OUtil.parseXdmInfoWithGivenFragment(skipSessionStorage,window.location.hash); + if(!xdmInfoValue) + xdmInfoValue = OSF.OUtil.parseXdmInfoFromWindowName(skipSessionStorage,window.name); + return xdmInfoValue + }, + parseXdmInfoFromWindowName: function OSF_OUtil$parseXdmInfoFromWindowName(skipSessionStorage, windowName) + { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage,windowName,OSF.WindowNameItemKeys.XdmInfo) + }, + parseXdmInfoWithGivenFragment: function OSF_OUtil$parseXdmInfoWithGivenFragment(skipSessionStorage, fragment) + { + return OSF.OUtil.parseInfoWithGivenFragment(_xdmInfoKey,_xdmSessionKeyPrefix,false,skipSessionStorage,fragment) + }, + parseSerializerVersion: function OSF_OUtil$parseSerializerVersion(skipSessionStorage) + { + var serializerVersion = OSF.OUtil.parseSerializerVersionWithGivenFragment(skipSessionStorage,window.location.hash); + if(isNaN(serializerVersion)) + serializerVersion = OSF.OUtil.parseSerializerVersionFromWindowName(skipSessionStorage,window.name); + return serializerVersion + }, + parseSerializerVersionFromWindowName: function OSF_OUtil$parseSerializerVersionFromWindowName(skipSessionStorage, windowName) + { + return parseInt(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage,windowName,OSF.WindowNameItemKeys.SerializerVersion)) + }, + parseSerializerVersionWithGivenFragment: function OSF_OUtil$parseSerializerVersionWithGivenFragment(skipSessionStorage, fragment) + { + return parseInt(OSF.OUtil.parseInfoWithGivenFragment(_serializerVersionKey,_serializerVersionKeyPrefix,true,skipSessionStorage,fragment)) + }, + parseInfoFromWindowName: function OSF_OUtil$parseInfoFromWindowName(skipSessionStorage, windowName, infoKey) + { + try + { + var windowNameObj = JSON.parse(windowName); + var infoValue = windowNameObj != null ? windowNameObj[infoKey] : null; + var osfSessionStorage = _getSessionStorage(); + if(!skipSessionStorage && osfSessionStorage && windowNameObj != null) + { + var sessionKey = windowNameObj[OSF.WindowNameItemKeys.BaseFrameName] + infoKey; + if(infoValue) + osfSessionStorage.setItem(sessionKey,infoValue); + else + infoValue = osfSessionStorage.getItem(sessionKey) + } + return infoValue + } + catch(Exception) + { + return null + } + }, + parseInfoWithGivenFragment: function OSF_OUtil$parseInfoWithGivenFragment(infoKey, infoKeyPrefix, decodeInfo, skipSessionStorage, fragment) + { + var fragmentParts = fragment.split(infoKey); + var infoValue = fragmentParts.length > 1 ? fragmentParts[fragmentParts.length - 1] : null; + if(decodeInfo && infoValue != null) + { + if(infoValue.indexOf(_fragmentInfoDelimiter) >= 0) + infoValue = infoValue.split(_fragmentInfoDelimiter)[0]; + infoValue = decodeURIComponent(infoValue) + } + var osfSessionStorage = _getSessionStorage(); + if(!skipSessionStorage && osfSessionStorage) + { + var sessionKeyStart = window.name.indexOf(infoKeyPrefix); + if(sessionKeyStart > -1) + { + var sessionKeyEnd = window.name.indexOf(";",sessionKeyStart); + if(sessionKeyEnd == -1) + sessionKeyEnd = window.name.length; + var sessionKey = window.name.substring(sessionKeyStart,sessionKeyEnd); + if(infoValue) + osfSessionStorage.setItem(sessionKey,infoValue); + else + infoValue = osfSessionStorage.getItem(sessionKey) + } + } + return infoValue + }, + getConversationId: function OSF_OUtil$getConversationId() + { + var searchString = window.location.search; + var conversationId = null; + if(searchString) + { + var index = searchString.indexOf("&"); + conversationId = index > 0 ? searchString.substring(1,index) : searchString.substr(1); + if(conversationId && conversationId.charAt(conversationId.length - 1) === "=") + { + conversationId = conversationId.substring(0,conversationId.length - 1); + if(conversationId) + conversationId = decodeURIComponent(conversationId) + } + } + return conversationId + }, + getInfoItems: function OSF_OUtil$getInfoItems(strInfo) + { + var items = strInfo.split("$"); + if(typeof items[1] == "undefined") + items = strInfo.split("|"); + if(typeof items[1] == "undefined") + items = strInfo.split("%7C"); + return items + }, + getXdmFieldValue: function OSF_OUtil$getXdmFieldValue(xdmFieldName, skipSessionStorage) + { + var fieldValue = ""; + var xdmInfoValue = OSF.OUtil.parseXdmInfo(skipSessionStorage); + if(xdmInfoValue) + { + var items = OSF.OUtil.getInfoItems(xdmInfoValue); + if(items != undefined && items.length >= 3) + switch(xdmFieldName) + { + case OSF.XdmFieldName.ConversationUrl: + fieldValue = items[2]; + break; + case OSF.XdmFieldName.AppId: + fieldValue = items[1]; + break + } + } + return fieldValue + }, + validateParamObject: function OSF_OUtil$validateParamObject(params, expectedProperties, callback) + { + var e = Function._validateParams(arguments,[{ + name: "params", + type: Object, + mayBeNull: false + },{ + name: "expectedProperties", + type: Object, + mayBeNull: false + },{ + name: "callback", + type: Function, + mayBeNull: true + }]); + if(e) + throw e; + for(var p in expectedProperties) + { + e = Function._validateParameter(params[p],expectedProperties[p],p); + if(e) + throw e; + } + }, + writeProfilerMark: function OSF_OUtil$writeProfilerMark(text) + { + if(window.msWriteProfilerMark) + { + window.msWriteProfilerMark(text); + OsfMsAjaxFactory.msAjaxDebug.trace(text) + } + }, + outputDebug: function OSF_OUtil$outputDebug(text) + { + if(typeof OsfMsAjaxFactory !== "undefined" && OsfMsAjaxFactory.msAjaxDebug && OsfMsAjaxFactory.msAjaxDebug.trace) + OsfMsAjaxFactory.msAjaxDebug.trace(text) + }, + defineNondefaultProperty: function OSF_OUtil$defineNondefaultProperty(obj, prop, descriptor, attributes) + { + descriptor = descriptor || {}; + for(var nd in attributes) + { + var attribute = attributes[nd]; + if(descriptor[attribute] == undefined) + descriptor[attribute] = true + } + Object.defineProperty(obj,prop,descriptor); + return obj + }, + defineNondefaultProperties: function OSF_OUtil$defineNondefaultProperties(obj, descriptors, attributes) + { + descriptors = descriptors || {}; + for(var prop in descriptors) + OSF.OUtil.defineNondefaultProperty(obj,prop,descriptors[prop],attributes); + return obj + }, + defineEnumerableProperty: function OSF_OUtil$defineEnumerableProperty(obj, prop, descriptor) + { + return OSF.OUtil.defineNondefaultProperty(obj,prop,descriptor,["enumerable"]) + }, + defineEnumerableProperties: function OSF_OUtil$defineEnumerableProperties(obj, descriptors) + { + return OSF.OUtil.defineNondefaultProperties(obj,descriptors,["enumerable"]) + }, + defineMutableProperty: function OSF_OUtil$defineMutableProperty(obj, prop, descriptor) + { + return OSF.OUtil.defineNondefaultProperty(obj,prop,descriptor,["writable","enumerable","configurable"]) + }, + defineMutableProperties: function OSF_OUtil$defineMutableProperties(obj, descriptors) + { + return OSF.OUtil.defineNondefaultProperties(obj,descriptors,["writable","enumerable","configurable"]) + }, + finalizeProperties: function OSF_OUtil$finalizeProperties(obj, descriptor) + { + descriptor = descriptor || {}; + var props = Object.getOwnPropertyNames(obj); + var propsLength = props.length; + for(var i = 0; i < propsLength; i++) + { + var prop = props[i]; + var desc = Object.getOwnPropertyDescriptor(obj,prop); + if(!desc.get && !desc.set) + desc.writable = descriptor.writable || false; + desc.configurable = descriptor.configurable || false; + desc.enumerable = descriptor.enumerable || true; + Object.defineProperty(obj,prop,desc) + } + return obj + }, + mapList: function OSF_OUtil$MapList(list, mapFunction) + { + var ret = []; + if(list) + for(var item in list) + ret.push(mapFunction(list[item])); + return ret + }, + listContainsKey: function OSF_OUtil$listContainsKey(list, key) + { + for(var item in list) + if(key == item) + return true; + return false + }, + listContainsValue: function OSF_OUtil$listContainsElement(list, value) + { + for(var item in list) + if(value == list[item]) + return true; + return false + }, + augmentList: function OSF_OUtil$augmentList(list, addenda) + { + var add = list.push ? function(key, value) + { + list.push(value) + } : function(key, value) + { + list[key] = value + }; + for(var key in addenda) + add(key,addenda[key]) + }, + redefineList: function OSF_Outil$redefineList(oldList, newList) + { + for(var key1 in oldList) + delete oldList[key1]; + for(var key2 in newList) + oldList[key2] = newList[key2] + }, + isArray: function OSF_OUtil$isArray(obj) + { + return Object.prototype.toString.apply(obj) === "[object Array]" + }, + isFunction: function OSF_OUtil$isFunction(obj) + { + return Object.prototype.toString.apply(obj) === "[object Function]" + }, + isDate: function OSF_OUtil$isDate(obj) + { + return Object.prototype.toString.apply(obj) === "[object Date]" + }, + addEventListener: function OSF_OUtil$addEventListener(element, eventName, listener) + { + if(element.addEventListener) + element.addEventListener(eventName,listener,false); + else if(Sys.Browser.agent === Sys.Browser.InternetExplorer && element.attachEvent) + element.attachEvent("on" + eventName,listener); + else + element["on" + eventName] = listener + }, + removeEventListener: function OSF_OUtil$removeEventListener(element, eventName, listener) + { + if(element.removeEventListener) + element.removeEventListener(eventName,listener,false); + else if(Sys.Browser.agent === Sys.Browser.InternetExplorer && element.detachEvent) + element.detachEvent("on" + eventName,listener); + else + element["on" + eventName] = null + }, + getCookieValue: function OSF_OUtil$getCookieValue(cookieName) + { + var tmpCookieString = RegExp(cookieName + "[^;]+").exec(document.cookie); + return tmpCookieString.toString().replace(/^[^=]+./,"") + }, + xhrGet: function OSF_OUtil$xhrGet(url, onSuccess, onError) + { + var xmlhttp; + try + { + xmlhttp = new XMLHttpRequest; + xmlhttp.onreadystatechange = function() + { + if(xmlhttp.readyState == 4) + if(xmlhttp.status == 200) + onSuccess(xmlhttp.responseText); + else + onError(xmlhttp.status) + }; + xmlhttp.open("GET",url,true); + xmlhttp.send() + } + catch(ex) + { + onError(ex) + } + }, + xhrGetFull: function OSF_OUtil$xhrGetFull(url, oneDriveFileName, onSuccess, onError) + { + var xmlhttp; + var requestedFileName = oneDriveFileName; + try + { + xmlhttp = new XMLHttpRequest; + xmlhttp.onreadystatechange = function() + { + if(xmlhttp.readyState == 4) + if(xmlhttp.status == 200) + onSuccess(xmlhttp,requestedFileName); + else + onError(xmlhttp.status) + }; + xmlhttp.open("GET",url,true); + xmlhttp.send() + } + catch(ex) + { + onError(ex) + } + }, + encodeBase64: function OSF_Outil$encodeBase64(input) + { + if(!input) + return input; + var codex = "ABCDEFGHIJKLMNOP" + "QRSTUVWXYZabcdef" + "ghijklmnopqrstuv" + "wxyz0123456789+/="; + var output = []; + var temp = []; + var index = 0; + var c1, + c2, + c3, + a, + b, + c; + var i; + var length = input.length; + do + { + c1 = input.charCodeAt(index++); + c2 = input.charCodeAt(index++); + c3 = input.charCodeAt(index++); + i = 0; + a = c1 & 255; + b = c1 >> 8; + c = c2 & 255; + temp[i++] = a >> 2; + temp[i++] = (a & 3) << 4 | b >> 4; + temp[i++] = (b & 15) << 2 | c >> 6; + temp[i++] = c & 63; + if(!isNaN(c2)) + { + a = c2 >> 8; + b = c3 & 255; + c = c3 >> 8; + temp[i++] = a >> 2; + temp[i++] = (a & 3) << 4 | b >> 4; + temp[i++] = (b & 15) << 2 | c >> 6; + temp[i++] = c & 63 + } + if(isNaN(c2)) + temp[i - 1] = 64; + else if(isNaN(c3)) + { + temp[i - 2] = 64; + temp[i - 1] = 64 + } + for(var t = 0; t < i; t++) + output.push(codex.charAt(temp[t])) + } while(index < length); + return output.join("") + }, + getSessionStorage: function OSF_Outil$getSessionStorage() + { + return _getSessionStorage() + }, + getLocalStorage: function OSF_Outil$getLocalStorage() + { + if(!_safeLocalStorage) + { + try + { + var localStorage = window.localStorage + } + catch(ex) + { + localStorage = null + } + _safeLocalStorage = new OfficeExt.SafeStorage(localStorage) + } + return _safeLocalStorage + }, + convertIntToCssHexColor: function OSF_Outil$convertIntToCssHexColor(val) + { + var hex = "#" + (Number(val) + 16777216).toString(16).slice(-6); + return hex + }, + attachClickHandler: function OSF_Outil$attachClickHandler(element, handler) + { + element.onclick = function(e) + { + handler() + }; + element.ontouchend = function(e) + { + handler(); + e.preventDefault() + } + }, + getQueryStringParamValue: function OSF_Outil$getQueryStringParamValue(queryString, paramName) + { + var e = Function._validateParams(arguments,[{ + name: "queryString", + type: String, + mayBeNull: false + },{ + name: "paramName", + type: String, + mayBeNull: false + }]); + if(e) + { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null."); + return"" + } + var queryExp = new RegExp("[\\?&]" + paramName + "=([^&#]*)","i"); + if(!queryExp.test(queryString)) + { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found."); + return"" + } + return queryExp.exec(queryString)[1] + }, + isiOS: function OSF_Outil$isiOS() + { + return window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false + }, + isChrome: function OSF_Outil$isChrome() + { + return window.navigator.userAgent.indexOf("Chrome") > 0 && !OSF.OUtil.isEdge() + }, + isEdge: function OSF_Outil$isEdge() + { + return window.navigator.userAgent.indexOf("Edge") > 0 + }, + isIE: function OSF_Outil$isIE() + { + return window.navigator.userAgent.indexOf("Trident") > 0 + }, + isFirefox: function OSF_Outil$isFirefox() + { + return window.navigator.userAgent.indexOf("Firefox") > 0 + }, + shallowCopy: function OSF_Outil$shallowCopy(sourceObj) + { + if(sourceObj == null) + return null; + else if(!(sourceObj instanceof Object)) + return sourceObj; + else if(Array.isArray(sourceObj)) + { + var copyArr = []; + for(var i = 0; i < sourceObj.length; i++) + copyArr.push(sourceObj[i]); + return copyArr + } + else + { + var copyObj = sourceObj.constructor(); + for(var property in sourceObj) + if(sourceObj.hasOwnProperty(property)) + copyObj[property] = sourceObj[property]; + return copyObj + } + }, + createObject: function OSF_Outil$createObject(properties) + { + var obj = null; + if(properties) + { + obj = {}; + var len = properties.length; + for(var i = 0; i < len; i++) + obj[properties[i].name] = properties[i].value + } + return obj + }, + addClass: function OSF_OUtil$addClass(elmt, val) + { + if(!OSF.OUtil.hasClass(elmt,val)) + { + var className = elmt.getAttribute(_classN); + if(className) + elmt.setAttribute(_classN,className + " " + val); + else + elmt.setAttribute(_classN,val) + } + }, + removeClass: function OSF_OUtil$removeClass(elmt, val) + { + if(OSF.OUtil.hasClass(elmt,val)) + { + var className = elmt.getAttribute(_classN); + var reg = new RegExp("(\\s|^)" + val + "(\\s|$)"); + className = className.replace(reg,""); + elmt.setAttribute(_classN,className) + } + }, + hasClass: function OSF_OUtil$hasClass(elmt, clsName) + { + var className = elmt.getAttribute(_classN); + return className && className.match(new RegExp("(\\s|^)" + clsName + "(\\s|$)")) + }, + focusToFirstTabbable: function OSF_OUtil$focusToFirstTabbable(all, backward) + { + var next; + var focused = false; + var candidate; + var setFlag = function(e) + { + focused = true + }; + var findNextPos = function(allLen, currPos, backward) + { + if(currPos < 0 || currPos > allLen) + return-1; + else if(currPos === 0 && backward) + return-1; + else if(currPos === allLen - 1 && !backward) + return-1; + if(backward) + return currPos - 1; + else + return currPos + 1 + }; + all = _reOrderTabbableElements(all); + next = backward ? all.length - 1 : 0; + if(all.length === 0) + return null; + while(!focused && next >= 0 && next < all.length) + { + candidate = all[next]; + window.focus(); + candidate.addEventListener("focus",setFlag); + candidate.focus(); + candidate.removeEventListener("focus",setFlag); + next = findNextPos(all.length,next,backward); + if(!focused && candidate === document.activeElement) + focused = true + } + if(focused) + return candidate; + else + return null + }, + focusToNextTabbable: function OSF_OUtil$focusToNextTabbable(all, curr, shift) + { + var currPos; + var next; + var focused = false; + var candidate; + var setFlag = function(e) + { + focused = true + }; + var findCurrPos = function(all, curr) + { + var i = 0; + for(; i < all.length; i++) + if(all[i] === curr) + return i; + return-1 + }; + var findNextPos = function(allLen, currPos, shift) + { + if(currPos < 0 || currPos > allLen) + return-1; + else if(currPos === 0 && shift) + return-1; + else if(currPos === allLen - 1 && !shift) + return-1; + if(shift) + return currPos - 1; + else + return currPos + 1 + }; + all = _reOrderTabbableElements(all); + currPos = findCurrPos(all,curr); + next = findNextPos(all.length,currPos,shift); + if(next < 0) + return null; + while(!focused && next >= 0 && next < all.length) + { + candidate = all[next]; + candidate.addEventListener("focus",setFlag); + candidate.focus(); + candidate.removeEventListener("focus",setFlag); + next = findNextPos(all.length,next,shift); + if(!focused && candidate === document.activeElement) + focused = true + } + if(focused) + return candidate; + else + return null + } + } }(); -OSF.OUtil.Guid=function() +OSF.OUtil.Guid = function() { - var hexCode=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"]; - return{generateNewGuid: function OSF_Outil_Guid$generateNewGuid() - { - var result=""; - var tick=(new Date).getTime(); - var index=0; - for(; index < 32 && tick > 0; index++) - { - if(index==8 || index==12 || index==16 || index==20) - result+="-"; - result+=hexCode[tick % 16]; - tick=Math.floor(tick / 16) - } - for(; index < 32; index++) - { - if(index==8 || index==12 || index==16 || index==20) - result+="-"; - result+=hexCode[Math.floor(Math.random() * 16)] - } - return result - }} + var hexCode = ["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"]; + return{generateNewGuid: function OSF_Outil_Guid$generateNewGuid() + { + var result = ""; + var tick = (new Date).getTime(); + var index = 0; + for(; index < 32 && tick > 0; index++) + { + if(index == 8 || index == 12 || index == 16 || index == 20) + result += "-"; + result += hexCode[tick % 16]; + tick = Math.floor(tick / 16) + } + for(; index < 32; index++) + { + if(index == 8 || index == 12 || index == 16 || index == 20) + result += "-"; + result += hexCode[Math.floor(Math.random() * 16)] + } + return result + }} }(); -window.OSF=OSF; +window.OSF = OSF; OSF.OUtil.setNamespace("OSF",window); -OSF.AppName={ - Unsupported: 0, - Excel: 1, - Word: 2, - PowerPoint: 4, - Outlook: 8, - ExcelWebApp: 16, - WordWebApp: 32, - OutlookWebApp: 64, - Project: 128, - AccessWebApp: 256, - PowerpointWebApp: 512, - ExcelIOS: 1024, - Sway: 2048, - WordIOS: 4096, - PowerPointIOS: 8192, - Access: 16384, - Lync: 32768, - OutlookIOS: 65536, - OneNoteWebApp: 131072, - OneNote: 262144, - ExcelWinRT: 524288, - WordWinRT: 1048576, - PowerpointWinRT: 2097152, - OutlookAndroid: 4194304, - OneNoteWinRT: 8388608, - ExcelAndroid: 8388609, - VisioWebApp: 8388610 -}; -OSF.InternalPerfMarker={ - DataCoercionBegin: "Agave.HostCall.CoerceDataStart", - DataCoercionEnd: "Agave.HostCall.CoerceDataEnd" -}; -OSF.HostCallPerfMarker={ - IssueCall: "Agave.HostCall.IssueCall", - ReceiveResponse: "Agave.HostCall.ReceiveResponse", - RuntimeExceptionRaised: "Agave.HostCall.RuntimeExecptionRaised" -}; -OSF.AgaveHostAction={ - Select: 0, - UnSelect: 1, - CancelDialog: 2, - InsertAgave: 3, - CtrlF6In: 4, - CtrlF6Exit: 5, - CtrlF6ExitShift: 6, - SelectWithError: 7, - NotifyHostError: 8, - RefreshAddinCommands: 9, - PageIsReady: 10, - TabIn: 11, - TabInShift: 12, - TabExit: 13, - TabExitShift: 14, - EscExit: 15, - F2Exit: 16, - ExitNoFocusable: 17, - ExitNoFocusableShift: 18 -}; -OSF.SharedConstants={NotificationConversationIdSuffix: "_ntf"}; -OSF.DialogMessageType={ - DialogMessageReceived: 0, - DialogParentMessageReceived: 1, - DialogClosed: 12006 -}; -OSF.OfficeAppContext=function OSF_OfficeAppContext(id, appName, appVersion, appUILocale, dataLocale, docUrl, clientMode, settings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, appMinorVersion, requirementMatrix, hostCustomMessage, hostFullVersion, clientWindowHeight, clientWindowWidth, addinName, appDomains, dialogRequirementMatrix) +OSF.MessageIDs = { + FetchBundleUrl: 0, + LoadReactBundle: 1, + LoadBundleSuccess: 2, + LoadBundleError: 3 +}; +OSF.AppName = { + Unsupported: 0, + Excel: 1, + Word: 2, + PowerPoint: 4, + Outlook: 8, + ExcelWebApp: 16, + WordWebApp: 32, + OutlookWebApp: 64, + Project: 128, + AccessWebApp: 256, + PowerpointWebApp: 512, + ExcelIOS: 1024, + Sway: 2048, + WordIOS: 4096, + PowerPointIOS: 8192, + Access: 16384, + Lync: 32768, + OutlookIOS: 65536, + OneNoteWebApp: 131072, + OneNote: 262144, + ExcelWinRT: 524288, + WordWinRT: 1048576, + PowerpointWinRT: 2097152, + OutlookAndroid: 4194304, + OneNoteWinRT: 8388608, + ExcelAndroid: 8388609, + VisioWebApp: 8388610, + OneNoteIOS: 8388611 +}; +OSF.InternalPerfMarker = { + DataCoercionBegin: "Agave.HostCall.CoerceDataStart", + DataCoercionEnd: "Agave.HostCall.CoerceDataEnd" +}; +OSF.HostCallPerfMarker = { + IssueCall: "Agave.HostCall.IssueCall", + ReceiveResponse: "Agave.HostCall.ReceiveResponse", + RuntimeExceptionRaised: "Agave.HostCall.RuntimeExecptionRaised" +}; +OSF.AgaveHostAction = { + Select: 0, + UnSelect: 1, + CancelDialog: 2, + InsertAgave: 3, + CtrlF6In: 4, + CtrlF6Exit: 5, + CtrlF6ExitShift: 6, + SelectWithError: 7, + NotifyHostError: 8, + RefreshAddinCommands: 9, + PageIsReady: 10, + TabIn: 11, + TabInShift: 12, + TabExit: 13, + TabExitShift: 14, + EscExit: 15, + F2Exit: 16, + ExitNoFocusable: 17, + ExitNoFocusableShift: 18, + MouseEnter: 19, + MouseLeave: 20 +}; +OSF.SharedConstants = {NotificationConversationIdSuffix: "_ntf"}; +OSF.DialogMessageType = { + DialogMessageReceived: 0, + DialogParentMessageReceived: 1, + DialogClosed: 12006 +}; +OSF.OfficeAppContext = function OSF_OfficeAppContext(id, appName, appVersion, appUILocale, dataLocale, docUrl, clientMode, settings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, appMinorVersion, requirementMatrix, hostCustomMessage, hostFullVersion, clientWindowHeight, clientWindowWidth, addinName, appDomains, dialogRequirementMatrix) { - this._id=id; - this._appName=appName; - this._appVersion=appVersion; - this._appUILocale=appUILocale; - this._dataLocale=dataLocale; - this._docUrl=docUrl; - this._clientMode=clientMode; - this._settings=settings; - this._reason=reason; - this._osfControlType=osfControlType; - this._eToken=eToken; - this._correlationId=correlationId; - this._appInstanceId=appInstanceId; - this._touchEnabled=touchEnabled; - this._commerceAllowed=commerceAllowed; - this._appMinorVersion=appMinorVersion; - this._requirementMatrix=requirementMatrix; - this._hostCustomMessage=hostCustomMessage; - this._hostFullVersion=hostFullVersion; - this._isDialog=false; - this._clientWindowHeight=clientWindowHeight; - this._clientWindowWidth=clientWindowWidth; - this._addinName=addinName; - this._appDomains=appDomains; - this._dialogRequirementMatrix=dialogRequirementMatrix; - this.get_id=function get_id() - { - return this._id - }; - this.get_appName=function get_appName() - { - return this._appName - }; - this.get_appVersion=function get_appVersion() - { - return this._appVersion - }; - this.get_appUILocale=function get_appUILocale() - { - return this._appUILocale - }; - this.get_dataLocale=function get_dataLocale() - { - return this._dataLocale - }; - this.get_docUrl=function get_docUrl() - { - return this._docUrl - }; - this.get_clientMode=function get_clientMode() - { - return this._clientMode - }; - this.get_bindings=function get_bindings() - { - return this._bindings - }; - this.get_settings=function get_settings() - { - return this._settings - }; - this.get_reason=function get_reason() - { - return this._reason - }; - this.get_osfControlType=function get_osfControlType() - { - return this._osfControlType - }; - this.get_eToken=function get_eToken() - { - return this._eToken - }; - this.get_correlationId=function get_correlationId() - { - return this._correlationId - }; - this.get_appInstanceId=function get_appInstanceId() - { - return this._appInstanceId - }; - this.get_touchEnabled=function get_touchEnabled() - { - return this._touchEnabled - }; - this.get_commerceAllowed=function get_commerceAllowed() - { - return this._commerceAllowed - }; - this.get_appMinorVersion=function get_appMinorVersion() - { - return this._appMinorVersion - }; - this.get_requirementMatrix=function get_requirementMatrix() - { - return this._requirementMatrix - }; - this.get_dialogRequirementMatrix=function get_dialogRequirementMatrix() - { - return this._dialogRequirementMatrix - }; - this.get_hostCustomMessage=function get_hostCustomMessage() - { - return this._hostCustomMessage - }; - this.get_hostFullVersion=function get_hostFullVersion() - { - return this._hostFullVersion - }; - this.get_isDialog=function get_isDialog() - { - return this._isDialog - }; - this.get_clientWindowHeight=function get_clientWindowHeight() - { - return this._clientWindowHeight - }; - this.get_clientWindowWidth=function get_clientWindowWidth() - { - return this._clientWindowWidth - }; - this.get_addinName=function get_addinName() - { - return this._addinName - }; - this.get_appDomains=function get_appDomains() - { - return this._appDomains - } -}; -OSF.OsfControlType={ - DocumentLevel: 0, - ContainerLevel: 1 -}; -OSF.ClientMode={ - ReadOnly: 0, - ReadWrite: 1 + this._id = id; + this._appName = appName; + this._appVersion = appVersion; + this._appUILocale = appUILocale; + this._dataLocale = dataLocale; + this._docUrl = docUrl; + this._clientMode = clientMode; + this._settings = settings; + this._reason = reason; + this._osfControlType = osfControlType; + this._eToken = eToken; + this._correlationId = correlationId; + this._appInstanceId = appInstanceId; + this._touchEnabled = touchEnabled; + this._commerceAllowed = commerceAllowed; + this._appMinorVersion = appMinorVersion; + this._requirementMatrix = requirementMatrix; + this._hostCustomMessage = hostCustomMessage; + this._hostFullVersion = hostFullVersion; + this._isDialog = false; + this._clientWindowHeight = clientWindowHeight; + this._clientWindowWidth = clientWindowWidth; + this._addinName = addinName; + this._appDomains = appDomains; + this._dialogRequirementMatrix = dialogRequirementMatrix; + this.get_id = function get_id() + { + return this._id + }; + this.get_appName = function get_appName() + { + return this._appName + }; + this.get_appVersion = function get_appVersion() + { + return this._appVersion + }; + this.get_appUILocale = function get_appUILocale() + { + return this._appUILocale + }; + this.get_dataLocale = function get_dataLocale() + { + return this._dataLocale + }; + this.get_docUrl = function get_docUrl() + { + return this._docUrl + }; + this.get_clientMode = function get_clientMode() + { + return this._clientMode + }; + this.get_bindings = function get_bindings() + { + return this._bindings + }; + this.get_settings = function get_settings() + { + return this._settings + }; + this.get_reason = function get_reason() + { + return this._reason + }; + this.get_osfControlType = function get_osfControlType() + { + return this._osfControlType + }; + this.get_eToken = function get_eToken() + { + return this._eToken + }; + this.get_correlationId = function get_correlationId() + { + return this._correlationId + }; + this.get_appInstanceId = function get_appInstanceId() + { + return this._appInstanceId + }; + this.get_touchEnabled = function get_touchEnabled() + { + return this._touchEnabled + }; + this.get_commerceAllowed = function get_commerceAllowed() + { + return this._commerceAllowed + }; + this.get_appMinorVersion = function get_appMinorVersion() + { + return this._appMinorVersion + }; + this.get_requirementMatrix = function get_requirementMatrix() + { + return this._requirementMatrix + }; + this.get_dialogRequirementMatrix = function get_dialogRequirementMatrix() + { + return this._dialogRequirementMatrix + }; + this.get_hostCustomMessage = function get_hostCustomMessage() + { + return this._hostCustomMessage + }; + this.get_hostFullVersion = function get_hostFullVersion() + { + return this._hostFullVersion + }; + this.get_isDialog = function get_isDialog() + { + return this._isDialog + }; + this.get_clientWindowHeight = function get_clientWindowHeight() + { + return this._clientWindowHeight + }; + this.get_clientWindowWidth = function get_clientWindowWidth() + { + return this._clientWindowWidth + }; + this.get_addinName = function get_addinName() + { + return this._addinName + }; + this.get_appDomains = function get_appDomains() + { + return this._appDomains + } +}; +OSF.OsfControlType = { + DocumentLevel: 0, + ContainerLevel: 1 +}; +OSF.ClientMode = { + ReadOnly: 0, + ReadWrite: 1 }; OSF.OUtil.setNamespace("Microsoft",window); OSF.OUtil.setNamespace("Office",Microsoft); OSF.OUtil.setNamespace("Client",Microsoft.Office); OSF.OUtil.setNamespace("WebExtension",Microsoft.Office); -Microsoft.Office.WebExtension.InitializationReason={ - Inserted: "inserted", - DocumentOpened: "documentOpened" -}; -Microsoft.Office.WebExtension.ValueFormat={ - Unformatted: "unformatted", - Formatted: "formatted" -}; -Microsoft.Office.WebExtension.FilterType={All: "all"}; -Microsoft.Office.WebExtension.PlatformType={ - PC: "PC", - OfficeOnline: "OfficeOnline", - Mac: "Mac", - iOS: "iOS", - Android: "Android", - Universal: "Universal" -}; -Microsoft.Office.WebExtension.HostType={ - Word: "Word", - Excel: "Excel", - PowerPoint: "PowerPoint", - Outlook: "Outlook", - OneNote: "OneNote", - Project: "Project", - Access: "Access" -}; -Microsoft.Office.WebExtension.Parameters={ - BindingType: "bindingType", - CoercionType: "coercionType", - ValueFormat: "valueFormat", - FilterType: "filterType", - Columns: "columns", - SampleData: "sampleData", - GoToType: "goToType", - SelectionMode: "selectionMode", - Id: "id", - PromptText: "promptText", - ItemName: "itemName", - FailOnCollision: "failOnCollision", - StartRow: "startRow", - StartColumn: "startColumn", - RowCount: "rowCount", - ColumnCount: "columnCount", - Callback: "callback", - AsyncContext: "asyncContext", - Data: "data", - Rows: "rows", - OverwriteIfStale: "overwriteIfStale", - FileType: "fileType", - EventType: "eventType", - Handler: "handler", - SliceSize: "sliceSize", - SliceIndex: "sliceIndex", - ActiveView: "activeView", - Status: "status", - PlatformType: "platformType", - HostType: "hostType", - Xml: "xml", - Namespace: "namespace", - Prefix: "prefix", - XPath: "xPath", - Text: "text", - ImageLeft: "imageLeft", - ImageTop: "imageTop", - ImageWidth: "imageWidth", - ImageHeight: "imageHeight", - TaskId: "taskId", - FieldId: "fieldId", - FieldValue: "fieldValue", - ServerUrl: "serverUrl", - ListName: "listName", - ResourceId: "resourceId", - ViewType: "viewType", - ViewName: "viewName", - GetRawValue: "getRawValue", - CellFormat: "cellFormat", - TableOptions: "tableOptions", - TaskIndex: "taskIndex", - ResourceIndex: "resourceIndex", - CustomFieldId: "customFieldId", - Url: "url", - MessageHandler: "messageHandler", - Width: "width", - Height: "height", - RequireHTTPs: "requireHTTPS", - MessageToParent: "messageToParent", - DisplayInIframe: "displayInIframe", - MessageContent: "messageContent", - AppCommandInvocationCompletedData: "appCommandInvocationCompletedData" +Microsoft.Office.WebExtension.InitializationReason = { + Inserted: "inserted", + DocumentOpened: "documentOpened" +}; +Microsoft.Office.WebExtension.ValueFormat = { + Unformatted: "unformatted", + Formatted: "formatted" +}; +Microsoft.Office.WebExtension.FilterType = {All: "all"}; +Microsoft.Office.WebExtension.PlatformType = { + PC: "PC", + OfficeOnline: "OfficeOnline", + Mac: "Mac", + iOS: "iOS", + Android: "Android", + Universal: "Universal" +}; +Microsoft.Office.WebExtension.HostType = { + Word: "Word", + Excel: "Excel", + PowerPoint: "PowerPoint", + Outlook: "Outlook", + OneNote: "OneNote", + Project: "Project", + Access: "Access" +}; +Microsoft.Office.WebExtension.Parameters = { + BindingType: "bindingType", + CoercionType: "coercionType", + ValueFormat: "valueFormat", + FilterType: "filterType", + Columns: "columns", + SampleData: "sampleData", + GoToType: "goToType", + SelectionMode: "selectionMode", + Id: "id", + PromptText: "promptText", + ItemName: "itemName", + FailOnCollision: "failOnCollision", + StartRow: "startRow", + StartColumn: "startColumn", + RowCount: "rowCount", + ColumnCount: "columnCount", + Callback: "callback", + AsyncContext: "asyncContext", + Data: "data", + Rows: "rows", + OverwriteIfStale: "overwriteIfStale", + FileType: "fileType", + EventType: "eventType", + Handler: "handler", + SliceSize: "sliceSize", + SliceIndex: "sliceIndex", + ActiveView: "activeView", + Status: "status", + PlatformType: "platformType", + HostType: "hostType", + ForceConsent: "forceConsent", + ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + Reserved: "reserved", + Xml: "xml", + Namespace: "namespace", + Prefix: "prefix", + XPath: "xPath", + Text: "text", + ImageLeft: "imageLeft", + ImageTop: "imageTop", + ImageWidth: "imageWidth", + ImageHeight: "imageHeight", + TaskId: "taskId", + FieldId: "fieldId", + FieldValue: "fieldValue", + ServerUrl: "serverUrl", + ListName: "listName", + ResourceId: "resourceId", + ViewType: "viewType", + ViewName: "viewName", + GetRawValue: "getRawValue", + CellFormat: "cellFormat", + TableOptions: "tableOptions", + TaskIndex: "taskIndex", + ResourceIndex: "resourceIndex", + CustomFieldId: "customFieldId", + Url: "url", + MessageHandler: "messageHandler", + Width: "width", + Height: "height", + RequireHTTPs: "requireHTTPS", + MessageToParent: "messageToParent", + DisplayInIframe: "displayInIframe", + MessageContent: "messageContent", + HideTitle: "hideTitle", + UseDeviceIndependentPixels: "useDeviceIndependentPixels", + AppCommandInvocationCompletedData: "appCommandInvocationCompletedData" }; OSF.OUtil.setNamespace("DDA",OSF); -OSF.DDA.DocumentMode={ - ReadOnly: 1, - ReadWrite: 0 -}; -OSF.DDA.PropertyDescriptors={AsyncResultStatus: "AsyncResultStatus"}; -OSF.DDA.EventDescriptors={}; -OSF.DDA.ListDescriptors={}; -OSF.DDA.UI={}; -OSF.DDA.getXdmEventName=function OSF_DDA$GetXdmEventName(id, eventType) +OSF.DDA.DocumentMode = { + ReadOnly: 1, + ReadWrite: 0 +}; +OSF.DDA.PropertyDescriptors = {AsyncResultStatus: "AsyncResultStatus"}; +OSF.DDA.EventDescriptors = {}; +OSF.DDA.ListDescriptors = {}; +OSF.DDA.UI = {}; +OSF.DDA.getXdmEventName = function OSF_DDA$GetXdmEventName(id, eventType) { - if(eventType==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged || eventType==Microsoft.Office.WebExtension.EventType.BindingDataChanged || eventType==Microsoft.Office.WebExtension.EventType.DataNodeDeleted || eventType==Microsoft.Office.WebExtension.EventType.DataNodeInserted || eventType==Microsoft.Office.WebExtension.EventType.DataNodeReplaced) - return id+"_"+eventType; - else - return eventType -}; -OSF.DDA.MethodDispId={ - dispidMethodMin: 64, - dispidGetSelectedDataMethod: 64, - dispidSetSelectedDataMethod: 65, - dispidAddBindingFromSelectionMethod: 66, - dispidAddBindingFromPromptMethod: 67, - dispidGetBindingMethod: 68, - dispidReleaseBindingMethod: 69, - dispidGetBindingDataMethod: 70, - dispidSetBindingDataMethod: 71, - dispidAddRowsMethod: 72, - dispidClearAllRowsMethod: 73, - dispidGetAllBindingsMethod: 74, - dispidLoadSettingsMethod: 75, - dispidSaveSettingsMethod: 76, - dispidGetDocumentCopyMethod: 77, - dispidAddBindingFromNamedItemMethod: 78, - dispidAddColumnsMethod: 79, - dispidGetDocumentCopyChunkMethod: 80, - dispidReleaseDocumentCopyMethod: 81, - dispidNavigateToMethod: 82, - dispidGetActiveViewMethod: 83, - dispidGetDocumentThemeMethod: 84, - dispidGetOfficeThemeMethod: 85, - dispidGetFilePropertiesMethod: 86, - dispidClearFormatsMethod: 87, - dispidSetTableOptionsMethod: 88, - dispidSetFormatsMethod: 89, - dispidExecuteRichApiRequestMethod: 93, - dispidAppCommandInvocationCompletedMethod: 94, - dispidCloseContainerMethod: 97, - dispidGetSelectedTaskMethod: 110, - dispidGetSelectedResourceMethod: 111, - dispidGetTaskMethod: 112, - dispidGetResourceFieldMethod: 113, - dispidGetWSSUrlMethod: 114, - dispidGetTaskFieldMethod: 115, - dispidGetProjectFieldMethod: 116, - dispidGetSelectedViewMethod: 117, - dispidGetTaskByIndexMethod: 118, - dispidGetResourceByIndexMethod: 119, - dispidSetTaskFieldMethod: 120, - dispidSetResourceFieldMethod: 121, - dispidGetMaxTaskIndexMethod: 122, - dispidGetMaxResourceIndexMethod: 123, - dispidCreateTaskMethod: 124, - dispidAddDataPartMethod: 128, - dispidGetDataPartByIdMethod: 129, - dispidGetDataPartsByNamespaceMethod: 130, - dispidGetDataPartXmlMethod: 131, - dispidGetDataPartNodesMethod: 132, - dispidDeleteDataPartMethod: 133, - dispidGetDataNodeValueMethod: 134, - dispidGetDataNodeXmlMethod: 135, - dispidGetDataNodesMethod: 136, - dispidSetDataNodeValueMethod: 137, - dispidSetDataNodeXmlMethod: 138, - dispidAddDataNamespaceMethod: 139, - dispidGetDataUriByPrefixMethod: 140, - dispidGetDataPrefixByUriMethod: 141, - dispidGetDataNodeTextMethod: 142, - dispidSetDataNodeTextMethod: 143, - dispidMessageParentMethod: 144, - dispidSendMessageMethod: 145, - dispidMethodMax: 145 -}; -OSF.DDA.EventDispId={ - dispidEventMin: 0, - dispidInitializeEvent: 0, - dispidSettingsChangedEvent: 1, - dispidDocumentSelectionChangedEvent: 2, - dispidBindingSelectionChangedEvent: 3, - dispidBindingDataChangedEvent: 4, - dispidDocumentOpenEvent: 5, - dispidDocumentCloseEvent: 6, - dispidActiveViewChangedEvent: 7, - dispidDocumentThemeChangedEvent: 8, - dispidOfficeThemeChangedEvent: 9, - dispidDialogMessageReceivedEvent: 10, - dispidDialogNotificationShownInAddinEvent: 11, - dispidDialogParentMessageReceivedEvent: 12, - dispidActivationStatusChangedEvent: 32, - dispidAppCommandInvokedEvent: 39, - dispidOlkItemSelectedChangedEvent: 46, - dispidTaskSelectionChangedEvent: 56, - dispidResourceSelectionChangedEvent: 57, - dispidViewSelectionChangedEvent: 58, - dispidDataNodeAddedEvent: 60, - dispidDataNodeReplacedEvent: 61, - dispidDataNodeDeletedEvent: 62, - dispidEventMax: 63 -}; -OSF.DDA.ErrorCodeManager=function() + if(eventType == Microsoft.Office.WebExtension.EventType.BindingSelectionChanged || eventType == Microsoft.Office.WebExtension.EventType.BindingDataChanged || eventType == Microsoft.Office.WebExtension.EventType.DataNodeDeleted || eventType == Microsoft.Office.WebExtension.EventType.DataNodeInserted || eventType == Microsoft.Office.WebExtension.EventType.DataNodeReplaced) + return id + "_" + eventType; + else + return eventType +}; +OSF.DDA.MethodDispId = { + dispidMethodMin: 64, + dispidGetSelectedDataMethod: 64, + dispidSetSelectedDataMethod: 65, + dispidAddBindingFromSelectionMethod: 66, + dispidAddBindingFromPromptMethod: 67, + dispidGetBindingMethod: 68, + dispidReleaseBindingMethod: 69, + dispidGetBindingDataMethod: 70, + dispidSetBindingDataMethod: 71, + dispidAddRowsMethod: 72, + dispidClearAllRowsMethod: 73, + dispidGetAllBindingsMethod: 74, + dispidLoadSettingsMethod: 75, + dispidSaveSettingsMethod: 76, + dispidGetDocumentCopyMethod: 77, + dispidAddBindingFromNamedItemMethod: 78, + dispidAddColumnsMethod: 79, + dispidGetDocumentCopyChunkMethod: 80, + dispidReleaseDocumentCopyMethod: 81, + dispidNavigateToMethod: 82, + dispidGetActiveViewMethod: 83, + dispidGetDocumentThemeMethod: 84, + dispidGetOfficeThemeMethod: 85, + dispidGetFilePropertiesMethod: 86, + dispidClearFormatsMethod: 87, + dispidSetTableOptionsMethod: 88, + dispidSetFormatsMethod: 89, + dispidExecuteRichApiRequestMethod: 93, + dispidAppCommandInvocationCompletedMethod: 94, + dispidCloseContainerMethod: 97, + dispidGetAccessTokenMethod: 98, + dispidOpenBrowserWindow: 102, + dispidGetSelectedTaskMethod: 110, + dispidGetSelectedResourceMethod: 111, + dispidGetTaskMethod: 112, + dispidGetResourceFieldMethod: 113, + dispidGetWSSUrlMethod: 114, + dispidGetTaskFieldMethod: 115, + dispidGetProjectFieldMethod: 116, + dispidGetSelectedViewMethod: 117, + dispidGetTaskByIndexMethod: 118, + dispidGetResourceByIndexMethod: 119, + dispidSetTaskFieldMethod: 120, + dispidSetResourceFieldMethod: 121, + dispidGetMaxTaskIndexMethod: 122, + dispidGetMaxResourceIndexMethod: 123, + dispidCreateTaskMethod: 124, + dispidAddDataPartMethod: 128, + dispidGetDataPartByIdMethod: 129, + dispidGetDataPartsByNamespaceMethod: 130, + dispidGetDataPartXmlMethod: 131, + dispidGetDataPartNodesMethod: 132, + dispidDeleteDataPartMethod: 133, + dispidGetDataNodeValueMethod: 134, + dispidGetDataNodeXmlMethod: 135, + dispidGetDataNodesMethod: 136, + dispidSetDataNodeValueMethod: 137, + dispidSetDataNodeXmlMethod: 138, + dispidAddDataNamespaceMethod: 139, + dispidGetDataUriByPrefixMethod: 140, + dispidGetDataPrefixByUriMethod: 141, + dispidGetDataNodeTextMethod: 142, + dispidSetDataNodeTextMethod: 143, + dispidMessageParentMethod: 144, + dispidSendMessageMethod: 145, + dispidMethodMax: 145 +}; +OSF.DDA.EventDispId = { + dispidEventMin: 0, + dispidInitializeEvent: 0, + dispidSettingsChangedEvent: 1, + dispidDocumentSelectionChangedEvent: 2, + dispidBindingSelectionChangedEvent: 3, + dispidBindingDataChangedEvent: 4, + dispidDocumentOpenEvent: 5, + dispidDocumentCloseEvent: 6, + dispidActiveViewChangedEvent: 7, + dispidDocumentThemeChangedEvent: 8, + dispidOfficeThemeChangedEvent: 9, + dispidDialogMessageReceivedEvent: 10, + dispidDialogNotificationShownInAddinEvent: 11, + dispidDialogParentMessageReceivedEvent: 12, + dispidObjectDeletedEvent: 13, + dispidObjectSelectionChangedEvent: 14, + dispidObjectDataChangedEvent: 15, + dispidContentControlAddedEvent: 16, + dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, + dispidAppCommandInvokedEvent: 39, + dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, + dispidTaskSelectionChangedEvent: 56, + dispidResourceSelectionChangedEvent: 57, + dispidViewSelectionChangedEvent: 58, + dispidDataNodeAddedEvent: 60, + dispidDataNodeReplacedEvent: 61, + dispidDataNodeDeletedEvent: 62, + dispidEventMax: 63 +}; +OSF.DDA.ErrorCodeManager = function() { - var _errorMappings={}; - return{ - getErrorArgs: function OSF_DDA_ErrorCodeManager$getErrorArgs(errorCode) - { - var errorArgs=_errorMappings[errorCode]; - if(!errorArgs) - errorArgs=_errorMappings[this.errorCodes.ooeInternalError]; - else - { - if(!errorArgs.name) - errorArgs.name=_errorMappings[this.errorCodes.ooeInternalError].name; - if(!errorArgs.message) - errorArgs.message=_errorMappings[this.errorCodes.ooeInternalError].message - } - return errorArgs - }, - addErrorMessage: function OSF_DDA_ErrorCodeManager$addErrorMessage(errorCode, errorNameMessage) - { - _errorMappings[errorCode]=errorNameMessage - }, - errorCodes: { - ooeSuccess: 0, - ooeChunkResult: 1, - ooeCoercionTypeNotSupported: 1e3, - ooeGetSelectionNotMatchDataType: 1001, - ooeCoercionTypeNotMatchBinding: 1002, - ooeInvalidGetRowColumnCounts: 1003, - ooeSelectionNotSupportCoercionType: 1004, - ooeInvalidGetStartRowColumn: 1005, - ooeNonUniformPartialGetNotSupported: 1006, - ooeGetDataIsTooLarge: 1008, - ooeFileTypeNotSupported: 1009, - ooeGetDataParametersConflict: 1010, - ooeInvalidGetColumns: 1011, - ooeInvalidGetRows: 1012, - ooeInvalidReadForBlankRow: 1013, - ooeUnsupportedDataObject: 2e3, - ooeCannotWriteToSelection: 2001, - ooeDataNotMatchSelection: 2002, - ooeOverwriteWorksheetData: 2003, - ooeDataNotMatchBindingSize: 2004, - ooeInvalidSetStartRowColumn: 2005, - ooeInvalidDataFormat: 2006, - ooeDataNotMatchCoercionType: 2007, - ooeDataNotMatchBindingType: 2008, - ooeSetDataIsTooLarge: 2009, - ooeNonUniformPartialSetNotSupported: 2010, - ooeInvalidSetColumns: 2011, - ooeInvalidSetRows: 2012, - ooeSetDataParametersConflict: 2013, - ooeCellDataAmountBeyondLimits: 2014, - ooeSelectionCannotBound: 3e3, - ooeBindingNotExist: 3002, - ooeBindingToMultipleSelection: 3003, - ooeInvalidSelectionForBindingType: 3004, - ooeOperationNotSupportedOnThisBindingType: 3005, - ooeNamedItemNotFound: 3006, - ooeMultipleNamedItemFound: 3007, - ooeInvalidNamedItemForBindingType: 3008, - ooeUnknownBindingType: 3009, - ooeOperationNotSupportedOnMatrixData: 3010, - ooeInvalidColumnsForBinding: 3011, - ooeSettingNameNotExist: 4e3, - ooeSettingsCannotSave: 4001, - ooeSettingsAreStale: 4002, - ooeOperationNotSupported: 5e3, - ooeInternalError: 5001, - ooeDocumentReadOnly: 5002, - ooeEventHandlerNotExist: 5003, - ooeInvalidApiCallInContext: 5004, - ooeShuttingDown: 5005, - ooeUnsupportedEnumeration: 5007, - ooeIndexOutOfRange: 5008, - ooeBrowserAPINotSupported: 5009, - ooeInvalidParam: 5010, - ooeRequestTimeout: 5011, - ooeTooManyIncompleteRequests: 5100, - ooeRequestTokenUnavailable: 5101, - ooeActivityLimitReached: 5102, - ooeCustomXmlNodeNotFound: 6e3, - ooeCustomXmlError: 6100, - ooeCustomXmlExceedQuota: 6101, - ooeCustomXmlOutOfDate: 6102, - ooeNoCapability: 7e3, - ooeCannotNavTo: 7001, - ooeSpecifiedIdNotExist: 7002, - ooeNavOutOfBound: 7004, - ooeElementMissing: 8e3, - ooeProtectedError: 8001, - ooeInvalidCellsValue: 8010, - ooeInvalidTableOptionValue: 8011, - ooeInvalidFormatValue: 8012, - ooeRowIndexOutOfRange: 8020, - ooeColIndexOutOfRange: 8021, - ooeFormatValueOutOfRange: 8022, - ooeCellFormatAmountBeyondLimits: 8023, - ooeMemoryFileLimit: 11e3, - ooeNetworkProblemRetrieveFile: 11001, - ooeInvalidSliceSize: 11002, - ooeInvalidCallback: 11101, - ooeInvalidWidth: 12e3, - ooeInvalidHeight: 12001, - ooeNavigationError: 12002, - ooeInvalidScheme: 12003, - ooeAppDomains: 12004, - ooeRequireHTTPS: 12005, - ooeWebDialogClosed: 12006, - ooeDialogAlreadyOpened: 12007, - ooeEndUserAllow: 12008, - ooeEndUserIgnore: 12009, - ooeNotUILessDialog: 12010, - ooeCrossZone: 12011 - }, - initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) - { - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={ - name: stringNS.L_InvalidCoercion, - message: stringNS.L_CoercionTypeNotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={ - name: stringNS.L_DataReadError, - message: stringNS.L_GetSelectionNotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={ - name: stringNS.L_InvalidCoercion, - message: stringNS.L_CoercionTypeNotMatchBinding - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={ - name: stringNS.L_DataReadError, - message: stringNS.L_InvalidGetRowColumnCounts - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={ - name: stringNS.L_DataReadError, - message: stringNS.L_SelectionNotSupportCoercionType - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={ - name: stringNS.L_DataReadError, - message: stringNS.L_InvalidGetStartRowColumn - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={ - name: stringNS.L_DataReadError, - message: stringNS.L_NonUniformPartialGetNotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={ - name: stringNS.L_DataReadError, - message: stringNS.L_GetDataIsTooLarge - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={ - name: stringNS.L_DataReadError, - message: stringNS.L_FileTypeNotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={ - name: stringNS.L_DataReadError, - message: stringNS.L_GetDataParametersConflict - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={ - name: stringNS.L_DataReadError, - message: stringNS.L_InvalidGetColumns - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={ - name: stringNS.L_DataReadError, - message: stringNS.L_InvalidGetRows - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={ - name: stringNS.L_DataReadError, - message: stringNS.L_InvalidReadForBlankRow - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_UnsupportedDataObject - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_CannotWriteToSelection - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_DataNotMatchSelection - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_OverwriteWorksheetData - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_DataNotMatchBindingSize - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_InvalidSetStartRowColumn - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={ - name: stringNS.L_InvalidFormat, - message: stringNS.L_InvalidDataFormat - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={ - name: stringNS.L_InvalidDataObject, - message: stringNS.L_DataNotMatchCoercionType - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={ - name: stringNS.L_InvalidDataObject, - message: stringNS.L_DataNotMatchBindingType - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_SetDataIsTooLarge - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_NonUniformPartialSetNotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_InvalidSetColumns - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_InvalidSetRows - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_SetDataParametersConflict - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={ - name: stringNS.L_BindingCreationError, - message: stringNS.L_SelectionCannotBound - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={ - name: stringNS.L_InvalidBindingError, - message: stringNS.L_BindingNotExist - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={ - name: stringNS.L_BindingCreationError, - message: stringNS.L_BindingToMultipleSelection - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={ - name: stringNS.L_BindingCreationError, - message: stringNS.L_InvalidSelectionForBindingType - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={ - name: stringNS.L_InvalidBindingOperation, - message: stringNS.L_OperationNotSupportedOnThisBindingType - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={ - name: stringNS.L_BindingCreationError, - message: stringNS.L_NamedItemNotFound - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={ - name: stringNS.L_BindingCreationError, - message: stringNS.L_MultipleNamedItemFound - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={ - name: stringNS.L_BindingCreationError, - message: stringNS.L_InvalidNamedItemForBindingType - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={ - name: stringNS.L_InvalidBinding, - message: stringNS.L_UnknownBindingType - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={ - name: stringNS.L_InvalidBindingOperation, - message: stringNS.L_OperationNotSupportedOnMatrixData - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={ - name: stringNS.L_InvalidBinding, - message: stringNS.L_InvalidColumnsForBinding - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={ - name: stringNS.L_ReadSettingsError, - message: stringNS.L_SettingNameNotExist - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={ - name: stringNS.L_SaveSettingsError, - message: stringNS.L_SettingsCannotSave - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={ - name: stringNS.L_SettingsStaleError, - message: stringNS.L_SettingsAreStale - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={ - name: stringNS.L_HostError, - message: stringNS.L_OperationNotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={ - name: stringNS.L_InternalError, - message: stringNS.L_InternalErrorDescription - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={ - name: stringNS.L_PermissionDenied, - message: stringNS.L_DocumentReadOnly - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={ - name: stringNS.L_EventRegistrationError, - message: stringNS.L_EventHandlerNotExist - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={ - name: stringNS.L_InvalidAPICall, - message: stringNS.L_InvalidApiCallInContext - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={ - name: stringNS.L_ShuttingDown, - message: stringNS.L_ShuttingDown - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={ - name: stringNS.L_UnsupportedEnumeration, - message: stringNS.L_UnsupportedEnumerationMessage - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={ - name: stringNS.L_IndexOutOfRange, - message: stringNS.L_IndexOutOfRange - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={ - name: stringNS.L_APINotSupported, - message: stringNS.L_BrowserAPINotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={ - name: stringNS.L_APICallFailed, - message: stringNS.L_RequestTimeout - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={ - name: stringNS.L_APICallFailed, - message: stringNS.L_TooManyIncompleteRequests - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={ - name: stringNS.L_APICallFailed, - message: stringNS.L_RequestTokenUnavailable - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={ - name: stringNS.L_APICallFailed, - message: stringNS.L_ActivityLimitReached - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={ - name: stringNS.L_InvalidNode, - message: stringNS.L_CustomXmlNodeNotFound - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={ - name: stringNS.L_CustomXmlError, - message: stringNS.L_CustomXmlError - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={ - name: stringNS.L_CustomXmlExceedQuotaName, - message: stringNS.L_CustomXmlExceedQuotaMessage - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={ - name: stringNS.L_CustomXmlOutOfDateName, - message: stringNS.L_CustomXmlOutOfDateMessage - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={ - name: stringNS.L_PermissionDenied, - message: stringNS.L_NoCapability - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={ - name: stringNS.L_CannotNavigateTo, - message: stringNS.L_CannotNavigateTo - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={ - name: stringNS.L_SpecifiedIdNotExist, - message: stringNS.L_SpecifiedIdNotExist - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={ - name: stringNS.L_NavOutOfBound, - message: stringNS.L_NavOutOfBound - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={ - name: stringNS.L_DataWriteReminder, - message: stringNS.L_CellDataAmountBeyondLimits - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={ - name: stringNS.L_MissingParameter, - message: stringNS.L_ElementMissing - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={ - name: stringNS.L_PermissionDenied, - message: stringNS.L_NoCapability - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={ - name: stringNS.L_InvalidValue, - message: stringNS.L_InvalidCellsValue - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={ - name: stringNS.L_InvalidValue, - message: stringNS.L_InvalidTableOptionValue - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={ - name: stringNS.L_InvalidValue, - message: stringNS.L_InvalidFormatValue - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={ - name: stringNS.L_OutOfRange, - message: stringNS.L_RowIndexOutOfRange - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={ - name: stringNS.L_OutOfRange, - message: stringNS.L_ColIndexOutOfRange - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={ - name: stringNS.L_OutOfRange, - message: stringNS.L_FormatValueOutOfRange - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={ - name: stringNS.L_FormattingReminder, - message: stringNS.L_CellFormatAmountBeyondLimits - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={ - name: stringNS.L_MemoryLimit, - message: stringNS.L_CloseFileBeforeRetrieve - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={ - name: stringNS.L_NetworkProblem, - message: stringNS.L_NetworkProblemRetrieveFile - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={ - name: stringNS.L_InvalidValue, - message: stringNS.L_SliceSizeNotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={ - name: stringNS.L_DisplayDialogError, - message: stringNS.L_DialogAlreadyOpened - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={ - name: stringNS.L_IndexOutOfRange, - message: stringNS.L_IndexOutOfRange - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={ - name: stringNS.L_IndexOutOfRange, - message: stringNS.L_IndexOutOfRange - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={ - name: stringNS.L_DisplayDialogError, - message: stringNS.L_NetworkProblem - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={ - name: stringNS.L_DialogNavigateError, - message: stringNS.L_DialogInvalidScheme - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={ - name: stringNS.L_DisplayDialogError, - message: stringNS.L_DialogAddressNotTrusted - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={ - name: stringNS.L_DisplayDialogError, - message: stringNS.L_DialogRequireHTTPS - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={ - name: stringNS.L_DisplayDialogError, - message: stringNS.L_UserClickIgnore - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={ - name: stringNS.L_DisplayDialogError, - message: stringNS.L_NewWindowCrossZoneErrorString - } - } - } + var _errorMappings = {}; + return{ + getErrorArgs: function OSF_DDA_ErrorCodeManager$getErrorArgs(errorCode) + { + var errorArgs = _errorMappings[errorCode]; + if(!errorArgs) + errorArgs = _errorMappings[this.errorCodes.ooeInternalError]; + else + { + if(!errorArgs.name) + errorArgs.name = _errorMappings[this.errorCodes.ooeInternalError].name; + if(!errorArgs.message) + errorArgs.message = _errorMappings[this.errorCodes.ooeInternalError].message + } + return errorArgs + }, + addErrorMessage: function OSF_DDA_ErrorCodeManager$addErrorMessage(errorCode, errorNameMessage) + { + _errorMappings[errorCode] = errorNameMessage + }, + errorCodes: { + ooeSuccess: 0, + ooeChunkResult: 1, + ooeCoercionTypeNotSupported: 1e3, + ooeGetSelectionNotMatchDataType: 1001, + ooeCoercionTypeNotMatchBinding: 1002, + ooeInvalidGetRowColumnCounts: 1003, + ooeSelectionNotSupportCoercionType: 1004, + ooeInvalidGetStartRowColumn: 1005, + ooeNonUniformPartialGetNotSupported: 1006, + ooeGetDataIsTooLarge: 1008, + ooeFileTypeNotSupported: 1009, + ooeGetDataParametersConflict: 1010, + ooeInvalidGetColumns: 1011, + ooeInvalidGetRows: 1012, + ooeInvalidReadForBlankRow: 1013, + ooeUnsupportedDataObject: 2e3, + ooeCannotWriteToSelection: 2001, + ooeDataNotMatchSelection: 2002, + ooeOverwriteWorksheetData: 2003, + ooeDataNotMatchBindingSize: 2004, + ooeInvalidSetStartRowColumn: 2005, + ooeInvalidDataFormat: 2006, + ooeDataNotMatchCoercionType: 2007, + ooeDataNotMatchBindingType: 2008, + ooeSetDataIsTooLarge: 2009, + ooeNonUniformPartialSetNotSupported: 2010, + ooeInvalidSetColumns: 2011, + ooeInvalidSetRows: 2012, + ooeSetDataParametersConflict: 2013, + ooeCellDataAmountBeyondLimits: 2014, + ooeSelectionCannotBound: 3e3, + ooeBindingNotExist: 3002, + ooeBindingToMultipleSelection: 3003, + ooeInvalidSelectionForBindingType: 3004, + ooeOperationNotSupportedOnThisBindingType: 3005, + ooeNamedItemNotFound: 3006, + ooeMultipleNamedItemFound: 3007, + ooeInvalidNamedItemForBindingType: 3008, + ooeUnknownBindingType: 3009, + ooeOperationNotSupportedOnMatrixData: 3010, + ooeInvalidColumnsForBinding: 3011, + ooeSettingNameNotExist: 4e3, + ooeSettingsCannotSave: 4001, + ooeSettingsAreStale: 4002, + ooeOperationNotSupported: 5e3, + ooeInternalError: 5001, + ooeDocumentReadOnly: 5002, + ooeEventHandlerNotExist: 5003, + ooeInvalidApiCallInContext: 5004, + ooeShuttingDown: 5005, + ooeUnsupportedEnumeration: 5007, + ooeIndexOutOfRange: 5008, + ooeBrowserAPINotSupported: 5009, + ooeInvalidParam: 5010, + ooeRequestTimeout: 5011, + ooeInvalidOrTimedOutSession: 5012, + ooeInvalidApiArguments: 5013, + ooeTooManyIncompleteRequests: 5100, + ooeRequestTokenUnavailable: 5101, + ooeActivityLimitReached: 5102, + ooeCustomXmlNodeNotFound: 6e3, + ooeCustomXmlError: 6100, + ooeCustomXmlExceedQuota: 6101, + ooeCustomXmlOutOfDate: 6102, + ooeNoCapability: 7e3, + ooeCannotNavTo: 7001, + ooeSpecifiedIdNotExist: 7002, + ooeNavOutOfBound: 7004, + ooeElementMissing: 8e3, + ooeProtectedError: 8001, + ooeInvalidCellsValue: 8010, + ooeInvalidTableOptionValue: 8011, + ooeInvalidFormatValue: 8012, + ooeRowIndexOutOfRange: 8020, + ooeColIndexOutOfRange: 8021, + ooeFormatValueOutOfRange: 8022, + ooeCellFormatAmountBeyondLimits: 8023, + ooeMemoryFileLimit: 11e3, + ooeNetworkProblemRetrieveFile: 11001, + ooeInvalidSliceSize: 11002, + ooeInvalidCallback: 11101, + ooeInvalidWidth: 12e3, + ooeInvalidHeight: 12001, + ooeNavigationError: 12002, + ooeInvalidScheme: 12003, + ooeAppDomains: 12004, + ooeRequireHTTPS: 12005, + ooeWebDialogClosed: 12006, + ooeDialogAlreadyOpened: 12007, + ooeEndUserAllow: 12008, + ooeEndUserIgnore: 12009, + ooeNotUILessDialog: 12010, + ooeCrossZone: 12011, + ooeNotSSOAgave: 13e3, + ooeSSOUserNotSignedIn: 13001, + ooeSSOUserAborted: 13002, + ooeSSOUnsupportedUserIdentity: 13003, + ooeSSOInvalidResourceUrl: 13004, + ooeSSOInvalidGrant: 13005, + ooeSSOClientError: 13006, + ooeSSOServerError: 13007, + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009, + ooeSSOConnectionLost: 13010 + }, + initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) + { + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported] = { + name: stringNS.L_InvalidCoercion, + message: stringNS.L_CoercionTypeNotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType] = { + name: stringNS.L_DataReadError, + message: stringNS.L_GetSelectionNotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding] = { + name: stringNS.L_InvalidCoercion, + message: stringNS.L_CoercionTypeNotMatchBinding + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts] = { + name: stringNS.L_DataReadError, + message: stringNS.L_InvalidGetRowColumnCounts + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType] = { + name: stringNS.L_DataReadError, + message: stringNS.L_SelectionNotSupportCoercionType + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn] = { + name: stringNS.L_DataReadError, + message: stringNS.L_InvalidGetStartRowColumn + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported] = { + name: stringNS.L_DataReadError, + message: stringNS.L_NonUniformPartialGetNotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge] = { + name: stringNS.L_DataReadError, + message: stringNS.L_GetDataIsTooLarge + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported] = { + name: stringNS.L_DataReadError, + message: stringNS.L_FileTypeNotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict] = { + name: stringNS.L_DataReadError, + message: stringNS.L_GetDataParametersConflict + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns] = { + name: stringNS.L_DataReadError, + message: stringNS.L_InvalidGetColumns + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows] = { + name: stringNS.L_DataReadError, + message: stringNS.L_InvalidGetRows + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow] = { + name: stringNS.L_DataReadError, + message: stringNS.L_InvalidReadForBlankRow + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_UnsupportedDataObject + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_CannotWriteToSelection + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_DataNotMatchSelection + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_OverwriteWorksheetData + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_DataNotMatchBindingSize + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_InvalidSetStartRowColumn + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat] = { + name: stringNS.L_InvalidFormat, + message: stringNS.L_InvalidDataFormat + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType] = { + name: stringNS.L_InvalidDataObject, + message: stringNS.L_DataNotMatchCoercionType + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType] = { + name: stringNS.L_InvalidDataObject, + message: stringNS.L_DataNotMatchBindingType + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_SetDataIsTooLarge + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_NonUniformPartialSetNotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_InvalidSetColumns + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_InvalidSetRows + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_SetDataParametersConflict + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound] = { + name: stringNS.L_BindingCreationError, + message: stringNS.L_SelectionCannotBound + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist] = { + name: stringNS.L_InvalidBindingError, + message: stringNS.L_BindingNotExist + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection] = { + name: stringNS.L_BindingCreationError, + message: stringNS.L_BindingToMultipleSelection + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType] = { + name: stringNS.L_BindingCreationError, + message: stringNS.L_InvalidSelectionForBindingType + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType] = { + name: stringNS.L_InvalidBindingOperation, + message: stringNS.L_OperationNotSupportedOnThisBindingType + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound] = { + name: stringNS.L_BindingCreationError, + message: stringNS.L_NamedItemNotFound + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound] = { + name: stringNS.L_BindingCreationError, + message: stringNS.L_MultipleNamedItemFound + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType] = { + name: stringNS.L_BindingCreationError, + message: stringNS.L_InvalidNamedItemForBindingType + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType] = { + name: stringNS.L_InvalidBinding, + message: stringNS.L_UnknownBindingType + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData] = { + name: stringNS.L_InvalidBindingOperation, + message: stringNS.L_OperationNotSupportedOnMatrixData + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding] = { + name: stringNS.L_InvalidBinding, + message: stringNS.L_InvalidColumnsForBinding + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist] = { + name: stringNS.L_ReadSettingsError, + message: stringNS.L_SettingNameNotExist + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave] = { + name: stringNS.L_SaveSettingsError, + message: stringNS.L_SettingsCannotSave + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale] = { + name: stringNS.L_SettingsStaleError, + message: stringNS.L_SettingsAreStale + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported] = { + name: stringNS.L_HostError, + message: stringNS.L_OperationNotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError] = { + name: stringNS.L_InternalError, + message: stringNS.L_InternalErrorDescription + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly] = { + name: stringNS.L_PermissionDenied, + message: stringNS.L_DocumentReadOnly + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist] = { + name: stringNS.L_EventRegistrationError, + message: stringNS.L_EventHandlerNotExist + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext] = { + name: stringNS.L_InvalidAPICall, + message: stringNS.L_InvalidApiCallInContext + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown] = { + name: stringNS.L_ShuttingDown, + message: stringNS.L_ShuttingDown + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration] = { + name: stringNS.L_UnsupportedEnumeration, + message: stringNS.L_UnsupportedEnumerationMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange] = { + name: stringNS.L_IndexOutOfRange, + message: stringNS.L_IndexOutOfRange + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported] = { + name: stringNS.L_APINotSupported, + message: stringNS.L_BrowserAPINotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout] = { + name: stringNS.L_APICallFailed, + message: stringNS.L_RequestTimeout + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession] = { + name: stringNS.L_InvalidOrTimedOutSession, + message: stringNS.L_InvalidOrTimedOutSessionMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests] = { + name: stringNS.L_APICallFailed, + message: stringNS.L_TooManyIncompleteRequests + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable] = { + name: stringNS.L_APICallFailed, + message: stringNS.L_RequestTokenUnavailable + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached] = { + name: stringNS.L_APICallFailed, + message: stringNS.L_ActivityLimitReached + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments] = { + name: stringNS.L_APICallFailed, + message: stringNS.L_InvalidApiArgumentsMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound] = { + name: stringNS.L_InvalidNode, + message: stringNS.L_CustomXmlNodeNotFound + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError] = { + name: stringNS.L_CustomXmlError, + message: stringNS.L_CustomXmlError + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota] = { + name: stringNS.L_CustomXmlExceedQuotaName, + message: stringNS.L_CustomXmlExceedQuotaMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate] = { + name: stringNS.L_CustomXmlOutOfDateName, + message: stringNS.L_CustomXmlOutOfDateMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability] = { + name: stringNS.L_PermissionDenied, + message: stringNS.L_NoCapability + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo] = { + name: stringNS.L_CannotNavigateTo, + message: stringNS.L_CannotNavigateTo + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist] = { + name: stringNS.L_SpecifiedIdNotExist, + message: stringNS.L_SpecifiedIdNotExist + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound] = { + name: stringNS.L_NavOutOfBound, + message: stringNS.L_NavOutOfBound + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits] = { + name: stringNS.L_DataWriteReminder, + message: stringNS.L_CellDataAmountBeyondLimits + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing] = { + name: stringNS.L_MissingParameter, + message: stringNS.L_ElementMissing + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError] = { + name: stringNS.L_PermissionDenied, + message: stringNS.L_NoCapability + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue] = { + name: stringNS.L_InvalidValue, + message: stringNS.L_InvalidCellsValue + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue] = { + name: stringNS.L_InvalidValue, + message: stringNS.L_InvalidTableOptionValue + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue] = { + name: stringNS.L_InvalidValue, + message: stringNS.L_InvalidFormatValue + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange] = { + name: stringNS.L_OutOfRange, + message: stringNS.L_RowIndexOutOfRange + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange] = { + name: stringNS.L_OutOfRange, + message: stringNS.L_ColIndexOutOfRange + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange] = { + name: stringNS.L_OutOfRange, + message: stringNS.L_FormatValueOutOfRange + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits] = { + name: stringNS.L_FormattingReminder, + message: stringNS.L_CellFormatAmountBeyondLimits + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit] = { + name: stringNS.L_MemoryLimit, + message: stringNS.L_CloseFileBeforeRetrieve + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile] = { + name: stringNS.L_NetworkProblem, + message: stringNS.L_NetworkProblemRetrieveFile + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize] = { + name: stringNS.L_InvalidValue, + message: stringNS.L_SliceSizeNotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened] = { + name: stringNS.L_DisplayDialogError, + message: stringNS.L_DialogAlreadyOpened + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth] = { + name: stringNS.L_IndexOutOfRange, + message: stringNS.L_IndexOutOfRange + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight] = { + name: stringNS.L_IndexOutOfRange, + message: stringNS.L_IndexOutOfRange + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError] = { + name: stringNS.L_DisplayDialogError, + message: stringNS.L_NetworkProblem + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme] = { + name: stringNS.L_DialogNavigateError, + message: stringNS.L_DialogInvalidScheme + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains] = { + name: stringNS.L_DisplayDialogError, + message: stringNS.L_DialogAddressNotTrusted + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS] = { + name: stringNS.L_DisplayDialogError, + message: stringNS.L_DialogRequireHTTPS + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore] = { + name: stringNS.L_DisplayDialogError, + message: stringNS.L_UserClickIgnore + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone] = { + name: stringNS.L_DisplayDialogError, + message: stringNS.L_NewWindowCrossZoneErrorString + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave] = { + name: stringNS.L_APINotSupported, + message: stringNS.L_InvalidSSOAddinMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn] = { + name: stringNS.L_UserNotSignedIn, + message: stringNS.L_UserNotSignedIn + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted] = { + name: stringNS.L_UserAborted, + message: stringNS.L_UserAbortedMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity] = { + name: stringNS.L_UnsupportedUserIdentity, + message: stringNS.L_UnsupportedUserIdentityMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl] = { + name: stringNS.L_InvalidResourceUrl, + message: stringNS.L_InvalidResourceUrlMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant] = { + name: stringNS.L_InvalidGrant, + message: stringNS.L_InvalidGrantMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError] = { + name: stringNS.L_SSOClientError, + message: stringNS.L_SSOClientErrorMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError] = { + name: stringNS.L_SSOServerError, + message: stringNS.L_SSOServerErrorMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken] = { + name: stringNS.L_AddinIsAlreadyRequestingToken, + message: stringNS.L_AddinIsAlreadyRequestingTokenMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory] = { + name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, + message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost] = { + name: stringNS.L_SSOConnectionLostError, + message: stringNS.L_SSOConnectionLostErrorMessage + } + } + } }(); var OfficeExt; (function(OfficeExt) { - var Requirement; - (function(Requirement) - { - var RequirementVersion=function() - { - function RequirementVersion(){} - return RequirementVersion - }(); - Requirement.RequirementVersion=RequirementVersion; - var RequirementMatrix=function() - { - function RequirementMatrix(_setMap) - { - this.isSetSupported=function _isSetSupported(name, minVersion) - { - if(name==undefined) - return false; - if(minVersion==undefined) - minVersion=0; - var setSupportArray=this._setMap; - var sets=setSupportArray._sets; - if(sets.hasOwnProperty(name.toLowerCase())) - { - var setMaxVersion=sets[name.toLowerCase()]; - try - { - var setMaxVersionNum=this._getVersion(setMaxVersion); - minVersion=minVersion+""; - var minVersionNum=this._getVersion(minVersion); - if(setMaxVersionNum.major > 0 && setMaxVersionNum.major > minVersionNum.major) - return true; - if(setMaxVersionNum.minor > 0 && setMaxVersionNum.minor > 0 && setMaxVersionNum.major==minVersionNum.major && setMaxVersionNum.minor >=minVersionNum.minor) - return true - } - catch(e) - { - return false - } - } - return false - }; - this._getVersion=function(version) - { - var temp=version.split("."); - var major=0; - var minor=0; - if(temp.length < 2 && isNaN(Number(version))) - throw"version format incorrect"; - else - { - major=Number(temp[0]); - if(temp.length >=2) - minor=Number(temp[1]); - if(isNaN(major) || isNaN(minor)) - throw"version format incorrect"; - } - var result={ - minor: minor, - major: major - }; - return result - }; - this._setMap=_setMap; - this.isSetSupported=this.isSetSupported.bind(this) - } - return RequirementMatrix - }(); - Requirement.RequirementMatrix=RequirementMatrix; - var DefaultSetRequirement=function() - { - function DefaultSetRequirement(setMap) - { - this._addSetMap=function DefaultSetRequirement_addSetMap(addedSet) - { - for(var name in addedSet) - this._sets[name]=addedSet[name] - }; - this._sets=setMap - } - return DefaultSetRequirement - }(); - Requirement.DefaultSetRequirement=DefaultSetRequirement; - var DefaultDialogSetRequirement=function(_super) - { - __extends(DefaultDialogSetRequirement,_super); - function DefaultDialogSetRequirement() - { - _super.call(this,{dialogapi: 1.1}) - } - return DefaultDialogSetRequirement - }(DefaultSetRequirement); - Requirement.DefaultDialogSetRequirement=DefaultDialogSetRequirement; - var ExcelClientDefaultSetRequirement=function(_super) - { - __extends(ExcelClientDefaultSetRequirement,_super); - function ExcelClientDefaultSetRequirement() - { - _super.call(this,{ - bindingevents: 1.1, - documentevents: 1.1, - excelapi: 1.1, - matrixbindings: 1.1, - matrixcoercion: 1.1, - selection: 1.1, - settings: 1.1, - tablebindings: 1.1, - tablecoercion: 1.1, - textbindings: 1.1, - textcoercion: 1.1 - }) - } - return ExcelClientDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.ExcelClientDefaultSetRequirement=ExcelClientDefaultSetRequirement; - var ExcelClientV1DefaultSetRequirement=function(_super) - { - __extends(ExcelClientV1DefaultSetRequirement,_super); - function ExcelClientV1DefaultSetRequirement() - { - _super.call(this); - this._addSetMap({imagecoercion: 1.1}) - } - return ExcelClientV1DefaultSetRequirement - }(ExcelClientDefaultSetRequirement); - Requirement.ExcelClientV1DefaultSetRequirement=ExcelClientV1DefaultSetRequirement; - var OutlookClientDefaultSetRequirement=function(_super) - { - __extends(OutlookClientDefaultSetRequirement,_super); - function OutlookClientDefaultSetRequirement() - { - _super.call(this,{mailbox: 1.3}) - } - return OutlookClientDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.OutlookClientDefaultSetRequirement=OutlookClientDefaultSetRequirement; - var WordClientDefaultSetRequirement=function(_super) - { - __extends(WordClientDefaultSetRequirement,_super); - function WordClientDefaultSetRequirement() - { - _super.call(this,{ - bindingevents: 1.1, - compressedfile: 1.1, - customxmlparts: 1.1, - documentevents: 1.1, - file: 1.1, - htmlcoercion: 1.1, - matrixbindings: 1.1, - matrixcoercion: 1.1, - ooxmlcoercion: 1.1, - pdffile: 1.1, - selection: 1.1, - settings: 1.1, - tablebindings: 1.1, - tablecoercion: 1.1, - textbindings: 1.1, - textcoercion: 1.1, - textfile: 1.1, - wordapi: 1.1 - }) - } - return WordClientDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.WordClientDefaultSetRequirement=WordClientDefaultSetRequirement; - var WordClientV1DefaultSetRequirement=function(_super) - { - __extends(WordClientV1DefaultSetRequirement,_super); - function WordClientV1DefaultSetRequirement() - { - _super.call(this); - this._addSetMap({ - customxmlparts: 1.2, - wordapi: 1.2, - imagecoercion: 1.1 - }) - } - return WordClientV1DefaultSetRequirement - }(WordClientDefaultSetRequirement); - Requirement.WordClientV1DefaultSetRequirement=WordClientV1DefaultSetRequirement; - var PowerpointClientDefaultSetRequirement=function(_super) - { - __extends(PowerpointClientDefaultSetRequirement,_super); - function PowerpointClientDefaultSetRequirement() - { - _super.call(this,{ - activeview: 1.1, - compressedfile: 1.1, - documentevents: 1.1, - file: 1.1, - pdffile: 1.1, - selection: 1.1, - settings: 1.1, - textcoercion: 1.1 - }) - } - return PowerpointClientDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.PowerpointClientDefaultSetRequirement=PowerpointClientDefaultSetRequirement; - var PowerpointClientV1DefaultSetRequirement=function(_super) - { - __extends(PowerpointClientV1DefaultSetRequirement,_super); - function PowerpointClientV1DefaultSetRequirement() - { - _super.call(this); - this._addSetMap({imagecoercion: 1.1}) - } - return PowerpointClientV1DefaultSetRequirement - }(PowerpointClientDefaultSetRequirement); - Requirement.PowerpointClientV1DefaultSetRequirement=PowerpointClientV1DefaultSetRequirement; - var ProjectClientDefaultSetRequirement=function(_super) - { - __extends(ProjectClientDefaultSetRequirement,_super); - function ProjectClientDefaultSetRequirement() - { - _super.call(this,{ - selection: 1.1, - textcoercion: 1.1 - }) - } - return ProjectClientDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.ProjectClientDefaultSetRequirement=ProjectClientDefaultSetRequirement; - var ExcelWebDefaultSetRequirement=function(_super) - { - __extends(ExcelWebDefaultSetRequirement,_super); - function ExcelWebDefaultSetRequirement() - { - _super.call(this,{ - bindingevents: 1.1, - documentevents: 1.1, - matrixbindings: 1.1, - matrixcoercion: 1.1, - selection: 1.1, - settings: 1.1, - tablebindings: 1.1, - tablecoercion: 1.1, - textbindings: 1.1, - textcoercion: 1.1, - file: 1.1 - }) - } - return ExcelWebDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.ExcelWebDefaultSetRequirement=ExcelWebDefaultSetRequirement; - var WordWebDefaultSetRequirement=function(_super) - { - __extends(WordWebDefaultSetRequirement,_super); - function WordWebDefaultSetRequirement() - { - _super.call(this,{ - compressedfile: 1.1, - documentevents: 1.1, - file: 1.1, - imagecoercion: 1.1, - matrixcoercion: 1.1, - ooxmlcoercion: 1.1, - pdffile: 1.1, - selection: 1.1, - settings: 1.1, - tablecoercion: 1.1, - textcoercion: 1.1, - textfile: 1.1 - }) - } - return WordWebDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.WordWebDefaultSetRequirement=WordWebDefaultSetRequirement; - var PowerpointWebDefaultSetRequirement=function(_super) - { - __extends(PowerpointWebDefaultSetRequirement,_super); - function PowerpointWebDefaultSetRequirement() - { - _super.call(this,{ - activeview: 1.1, - settings: 1.1 - }) - } - return PowerpointWebDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.PowerpointWebDefaultSetRequirement=PowerpointWebDefaultSetRequirement; - var OutlookWebDefaultSetRequirement=function(_super) - { - __extends(OutlookWebDefaultSetRequirement,_super); - function OutlookWebDefaultSetRequirement() - { - _super.call(this,{mailbox: 1.3}) - } - return OutlookWebDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.OutlookWebDefaultSetRequirement=OutlookWebDefaultSetRequirement; - var SwayWebDefaultSetRequirement=function(_super) - { - __extends(SwayWebDefaultSetRequirement,_super); - function SwayWebDefaultSetRequirement() - { - _super.call(this,{ - activeview: 1.1, - documentevents: 1.1, - selection: 1.1, - settings: 1.1, - textcoercion: 1.1 - }) - } - return SwayWebDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.SwayWebDefaultSetRequirement=SwayWebDefaultSetRequirement; - var AccessWebDefaultSetRequirement=function(_super) - { - __extends(AccessWebDefaultSetRequirement,_super); - function AccessWebDefaultSetRequirement() - { - _super.call(this,{ - bindingevents: 1.1, - partialtablebindings: 1.1, - settings: 1.1, - tablebindings: 1.1, - tablecoercion: 1.1 - }) - } - return AccessWebDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.AccessWebDefaultSetRequirement=AccessWebDefaultSetRequirement; - var ExcelIOSDefaultSetRequirement=function(_super) - { - __extends(ExcelIOSDefaultSetRequirement,_super); - function ExcelIOSDefaultSetRequirement() - { - _super.call(this,{ - bindingevents: 1.1, - documentevents: 1.1, - matrixbindings: 1.1, - matrixcoercion: 1.1, - selection: 1.1, - settings: 1.1, - tablebindings: 1.1, - tablecoercion: 1.1, - textbindings: 1.1, - textcoercion: 1.1 - }) - } - return ExcelIOSDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.ExcelIOSDefaultSetRequirement=ExcelIOSDefaultSetRequirement; - var WordIOSDefaultSetRequirement=function(_super) - { - __extends(WordIOSDefaultSetRequirement,_super); - function WordIOSDefaultSetRequirement() - { - _super.call(this,{ - bindingevents: 1.1, - compressedfile: 1.1, - customxmlparts: 1.1, - documentevents: 1.1, - file: 1.1, - htmlcoercion: 1.1, - matrixbindings: 1.1, - matrixcoercion: 1.1, - ooxmlcoercion: 1.1, - pdffile: 1.1, - selection: 1.1, - settings: 1.1, - tablebindings: 1.1, - tablecoercion: 1.1, - textbindings: 1.1, - textcoercion: 1.1, - textfile: 1.1 - }) - } - return WordIOSDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.WordIOSDefaultSetRequirement=WordIOSDefaultSetRequirement; - var WordIOSV1DefaultSetRequirement=function(_super) - { - __extends(WordIOSV1DefaultSetRequirement,_super); - function WordIOSV1DefaultSetRequirement() - { - _super.call(this); - this._addSetMap({ - customxmlparts: 1.2, - wordapi: 1.2 - }) - } - return WordIOSV1DefaultSetRequirement - }(WordIOSDefaultSetRequirement); - Requirement.WordIOSV1DefaultSetRequirement=WordIOSV1DefaultSetRequirement; - var PowerpointIOSDefaultSetRequirement=function(_super) - { - __extends(PowerpointIOSDefaultSetRequirement,_super); - function PowerpointIOSDefaultSetRequirement() - { - _super.call(this,{ - activeview: 1.1, - compressedfile: 1.1, - documentevents: 1.1, - file: 1.1, - pdffile: 1.1, - selection: 1.1, - settings: 1.1, - textcoercion: 1.1 - }) - } - return PowerpointIOSDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.PowerpointIOSDefaultSetRequirement=PowerpointIOSDefaultSetRequirement; - var OutlookIOSDefaultSetRequirement=function(_super) - { - __extends(OutlookIOSDefaultSetRequirement,_super); - function OutlookIOSDefaultSetRequirement() - { - _super.call(this,{mailbox: 1.1}) - } - return OutlookIOSDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.OutlookIOSDefaultSetRequirement=OutlookIOSDefaultSetRequirement; - var RequirementsMatrixFactory=function() - { - function RequirementsMatrixFactory(){} - RequirementsMatrixFactory.initializeOsfDda=function() - { - OSF.OUtil.setNamespace("Requirement",OSF.DDA) - }; - RequirementsMatrixFactory.getDefaultRequirementMatrix=function(appContext) - { - this.initializeDefaultSetMatrix(); - var defaultRequirementMatrix=undefined; - var clientRequirement=appContext.get_requirementMatrix(); - if(clientRequirement !=undefined && clientRequirement.length > 0 && typeof JSON !=="undefined") - { - var matrixItem=JSON.parse(appContext.get_requirementMatrix().toLowerCase()); - defaultRequirementMatrix=new RequirementMatrix(new DefaultSetRequirement(matrixItem)) - } - else - { - var appLocator=RequirementsMatrixFactory.getClientFullVersionString(appContext); - if(RequirementsMatrixFactory.DefaultSetArrayMatrix !=undefined && RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator] !=undefined) - defaultRequirementMatrix=new RequirementMatrix(RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator]); - else - defaultRequirementMatrix=new RequirementMatrix(new DefaultSetRequirement({})) - } - return defaultRequirementMatrix - }; - RequirementsMatrixFactory.getDefaultDialogRequirementMatrix=function(appContext) - { - var defaultRequirementMatrix=undefined; - var clientRequirement=appContext.get_dialogRequirementMatrix(); - if(clientRequirement !=undefined && clientRequirement.length > 0 && typeof JSON !=="undefined") - { - var matrixItem=JSON.parse(appContext.get_requirementMatrix().toLowerCase()); - defaultRequirementMatrix=new RequirementMatrix(new DefaultSetRequirement(matrixItem)) - } - else - defaultRequirementMatrix=new RequirementMatrix(new DefaultDialogSetRequirement); - return defaultRequirementMatrix - }; - RequirementsMatrixFactory.getClientFullVersionString=function(appContext) - { - var appMinorVersion=appContext.get_appMinorVersion(); - var appMinorVersionString=""; - var appFullVersion=""; - var appName=appContext.get_appName(); - var isIOSClient=appName==1024 || appName==4096 || appName==8192 || appName==65536; - if(isIOSClient && appContext.get_appVersion()==1) - if(appName==4096 && appMinorVersion >=15) - appFullVersion="16.00.01"; - else - appFullVersion="16.00"; - else if(appContext.get_appName()==64) - appFullVersion=appContext.get_appVersion(); - else - { - if(appMinorVersion < 10) - appMinorVersionString="0"+appMinorVersion; - else - appMinorVersionString=""+appMinorVersion; - appFullVersion=appContext.get_appVersion()+"."+appMinorVersionString - } - return appContext.get_appName()+"-"+appFullVersion - }; - RequirementsMatrixFactory.initializeDefaultSetMatrix=function() - { - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1600]=new ExcelClientDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1600]=new WordClientDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1600]=new PowerpointClientDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1601]=new ExcelClientV1DefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1601]=new WordClientV1DefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1601]=new PowerpointClientV1DefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_RCLIENT_1600]=new OutlookClientDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_WAC_1600]=new ExcelWebDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_WAC_1600]=new WordWebDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1600]=new OutlookWebDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1601]=new OutlookWebDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Project_RCLIENT_1600]=new ProjectClientDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Access_WAC_1600]=new AccessWebDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_WAC_1600]=new PowerpointWebDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_IOS_1600]=new ExcelIOSDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.SWAY_WAC_1600]=new SwayWebDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_1600]=new WordIOSDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_16001]=new WordIOSV1DefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_IOS_1600]=new PowerpointIOSDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_IOS_1600]=new OutlookIOSDefaultSetRequirement - }; - RequirementsMatrixFactory.Excel_RCLIENT_1600="1-16.00"; - RequirementsMatrixFactory.Excel_RCLIENT_1601="1-16.01"; - RequirementsMatrixFactory.Word_RCLIENT_1600="2-16.00"; - RequirementsMatrixFactory.Word_RCLIENT_1601="2-16.01"; - RequirementsMatrixFactory.PowerPoint_RCLIENT_1600="4-16.00"; - RequirementsMatrixFactory.PowerPoint_RCLIENT_1601="4-16.01"; - RequirementsMatrixFactory.Outlook_RCLIENT_1600="8-16.00"; - RequirementsMatrixFactory.Excel_WAC_1600="16-16.00"; - RequirementsMatrixFactory.Word_WAC_1600="32-16.00"; - RequirementsMatrixFactory.Outlook_WAC_1600="64-16.00"; - RequirementsMatrixFactory.Outlook_WAC_1601="64-16.01"; - RequirementsMatrixFactory.Project_RCLIENT_1600="128-16.00"; - RequirementsMatrixFactory.Access_WAC_1600="256-16.00"; - RequirementsMatrixFactory.PowerPoint_WAC_1600="512-16.00"; - RequirementsMatrixFactory.Excel_IOS_1600="1024-16.00"; - RequirementsMatrixFactory.SWAY_WAC_1600="2048-16.00"; - RequirementsMatrixFactory.Word_IOS_1600="4096-16.00"; - RequirementsMatrixFactory.Word_IOS_16001="4096-16.00.01"; - RequirementsMatrixFactory.PowerPoint_IOS_1600="8192-16.00"; - RequirementsMatrixFactory.Outlook_IOS_1600="65536-16.00"; - RequirementsMatrixFactory.DefaultSetArrayMatrix={}; - return RequirementsMatrixFactory - }(); - Requirement.RequirementsMatrixFactory=RequirementsMatrixFactory - })(Requirement=OfficeExt.Requirement || (OfficeExt.Requirement={})) -})(OfficeExt || (OfficeExt={})); + var Requirement; + (function(Requirement) + { + var RequirementVersion = function() + { + function RequirementVersion(){} + return RequirementVersion + }(); + Requirement.RequirementVersion = RequirementVersion; + var RequirementMatrix = function() + { + function RequirementMatrix(_setMap) + { + this.isSetSupported = function _isSetSupported(name, minVersion) + { + if(name == undefined) + return false; + if(minVersion == undefined) + minVersion = 0; + var setSupportArray = this._setMap; + var sets = setSupportArray._sets; + if(sets.hasOwnProperty(name.toLowerCase())) + { + var setMaxVersion = sets[name.toLowerCase()]; + try + { + var setMaxVersionNum = this._getVersion(setMaxVersion); + minVersion = minVersion + ""; + var minVersionNum = this._getVersion(minVersion); + if(setMaxVersionNum.major > 0 && setMaxVersionNum.major > minVersionNum.major) + return true; + if(setMaxVersionNum.minor > 0 && setMaxVersionNum.minor > 0 && setMaxVersionNum.major == minVersionNum.major && setMaxVersionNum.minor >= minVersionNum.minor) + return true + } + catch(e) + { + return false + } + } + return false + }; + this._getVersion = function(version) + { + var temp = version.split("."); + var major = 0; + var minor = 0; + if(temp.length < 2 && isNaN(Number(version))) + throw"version format incorrect"; + else + { + major = Number(temp[0]); + if(temp.length >= 2) + minor = Number(temp[1]); + if(isNaN(major) || isNaN(minor)) + throw"version format incorrect"; + } + var result = { + minor: minor, + major: major + }; + return result + }; + this._setMap = _setMap; + this.isSetSupported = this.isSetSupported.bind(this) + } + return RequirementMatrix + }(); + Requirement.RequirementMatrix = RequirementMatrix; + var DefaultSetRequirement = function() + { + function DefaultSetRequirement(setMap) + { + this._addSetMap = function DefaultSetRequirement_addSetMap(addedSet) + { + for(var name in addedSet) + this._sets[name] = addedSet[name] + }; + this._sets = setMap + } + return DefaultSetRequirement + }(); + Requirement.DefaultSetRequirement = DefaultSetRequirement; + var DefaultDialogSetRequirement = function(_super) + { + __extends(DefaultDialogSetRequirement,_super); + function DefaultDialogSetRequirement() + { + _super.call(this,{dialogapi: 1.1}) + } + return DefaultDialogSetRequirement + }(DefaultSetRequirement); + Requirement.DefaultDialogSetRequirement = DefaultDialogSetRequirement; + var ExcelClientDefaultSetRequirement = function(_super) + { + __extends(ExcelClientDefaultSetRequirement,_super); + function ExcelClientDefaultSetRequirement() + { + _super.call(this,{ + bindingevents: 1.1, + documentevents: 1.1, + excelapi: 1.1, + matrixbindings: 1.1, + matrixcoercion: 1.1, + selection: 1.1, + settings: 1.1, + tablebindings: 1.1, + tablecoercion: 1.1, + textbindings: 1.1, + textcoercion: 1.1 + }) + } + return ExcelClientDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.ExcelClientDefaultSetRequirement = ExcelClientDefaultSetRequirement; + var ExcelClientV1DefaultSetRequirement = function(_super) + { + __extends(ExcelClientV1DefaultSetRequirement,_super); + function ExcelClientV1DefaultSetRequirement() + { + _super.call(this); + this._addSetMap({imagecoercion: 1.1}) + } + return ExcelClientV1DefaultSetRequirement + }(ExcelClientDefaultSetRequirement); + Requirement.ExcelClientV1DefaultSetRequirement = ExcelClientV1DefaultSetRequirement; + var OutlookClientDefaultSetRequirement = function(_super) + { + __extends(OutlookClientDefaultSetRequirement,_super); + function OutlookClientDefaultSetRequirement() + { + _super.call(this,{mailbox: 1.3}) + } + return OutlookClientDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.OutlookClientDefaultSetRequirement = OutlookClientDefaultSetRequirement; + var WordClientDefaultSetRequirement = function(_super) + { + __extends(WordClientDefaultSetRequirement,_super); + function WordClientDefaultSetRequirement() + { + _super.call(this,{ + bindingevents: 1.1, + compressedfile: 1.1, + customxmlparts: 1.1, + documentevents: 1.1, + file: 1.1, + htmlcoercion: 1.1, + matrixbindings: 1.1, + matrixcoercion: 1.1, + ooxmlcoercion: 1.1, + pdffile: 1.1, + selection: 1.1, + settings: 1.1, + tablebindings: 1.1, + tablecoercion: 1.1, + textbindings: 1.1, + textcoercion: 1.1, + textfile: 1.1, + wordapi: 1.1 + }) + } + return WordClientDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.WordClientDefaultSetRequirement = WordClientDefaultSetRequirement; + var WordClientV1DefaultSetRequirement = function(_super) + { + __extends(WordClientV1DefaultSetRequirement,_super); + function WordClientV1DefaultSetRequirement() + { + _super.call(this); + this._addSetMap({ + customxmlparts: 1.2, + wordapi: 1.2, + imagecoercion: 1.1 + }) + } + return WordClientV1DefaultSetRequirement + }(WordClientDefaultSetRequirement); + Requirement.WordClientV1DefaultSetRequirement = WordClientV1DefaultSetRequirement; + var PowerpointClientDefaultSetRequirement = function(_super) + { + __extends(PowerpointClientDefaultSetRequirement,_super); + function PowerpointClientDefaultSetRequirement() + { + _super.call(this,{ + activeview: 1.1, + compressedfile: 1.1, + documentevents: 1.1, + file: 1.1, + pdffile: 1.1, + selection: 1.1, + settings: 1.1, + textcoercion: 1.1 + }) + } + return PowerpointClientDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.PowerpointClientDefaultSetRequirement = PowerpointClientDefaultSetRequirement; + var PowerpointClientV1DefaultSetRequirement = function(_super) + { + __extends(PowerpointClientV1DefaultSetRequirement,_super); + function PowerpointClientV1DefaultSetRequirement() + { + _super.call(this); + this._addSetMap({imagecoercion: 1.1}) + } + return PowerpointClientV1DefaultSetRequirement + }(PowerpointClientDefaultSetRequirement); + Requirement.PowerpointClientV1DefaultSetRequirement = PowerpointClientV1DefaultSetRequirement; + var ProjectClientDefaultSetRequirement = function(_super) + { + __extends(ProjectClientDefaultSetRequirement,_super); + function ProjectClientDefaultSetRequirement() + { + _super.call(this,{ + selection: 1.1, + textcoercion: 1.1 + }) + } + return ProjectClientDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.ProjectClientDefaultSetRequirement = ProjectClientDefaultSetRequirement; + var ExcelWebDefaultSetRequirement = function(_super) + { + __extends(ExcelWebDefaultSetRequirement,_super); + function ExcelWebDefaultSetRequirement() + { + _super.call(this,{ + bindingevents: 1.1, + documentevents: 1.1, + matrixbindings: 1.1, + matrixcoercion: 1.1, + selection: 1.1, + settings: 1.1, + tablebindings: 1.1, + tablecoercion: 1.1, + textbindings: 1.1, + textcoercion: 1.1, + file: 1.1 + }) + } + return ExcelWebDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.ExcelWebDefaultSetRequirement = ExcelWebDefaultSetRequirement; + var WordWebDefaultSetRequirement = function(_super) + { + __extends(WordWebDefaultSetRequirement,_super); + function WordWebDefaultSetRequirement() + { + _super.call(this,{ + compressedfile: 1.1, + documentevents: 1.1, + file: 1.1, + imagecoercion: 1.1, + matrixcoercion: 1.1, + ooxmlcoercion: 1.1, + pdffile: 1.1, + selection: 1.1, + settings: 1.1, + tablecoercion: 1.1, + textcoercion: 1.1, + textfile: 1.1 + }) + } + return WordWebDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.WordWebDefaultSetRequirement = WordWebDefaultSetRequirement; + var PowerpointWebDefaultSetRequirement = function(_super) + { + __extends(PowerpointWebDefaultSetRequirement,_super); + function PowerpointWebDefaultSetRequirement() + { + _super.call(this,{ + activeview: 1.1, + settings: 1.1 + }) + } + return PowerpointWebDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.PowerpointWebDefaultSetRequirement = PowerpointWebDefaultSetRequirement; + var OutlookWebDefaultSetRequirement = function(_super) + { + __extends(OutlookWebDefaultSetRequirement,_super); + function OutlookWebDefaultSetRequirement() + { + _super.call(this,{mailbox: 1.3}) + } + return OutlookWebDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.OutlookWebDefaultSetRequirement = OutlookWebDefaultSetRequirement; + var SwayWebDefaultSetRequirement = function(_super) + { + __extends(SwayWebDefaultSetRequirement,_super); + function SwayWebDefaultSetRequirement() + { + _super.call(this,{ + activeview: 1.1, + documentevents: 1.1, + selection: 1.1, + settings: 1.1, + textcoercion: 1.1 + }) + } + return SwayWebDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.SwayWebDefaultSetRequirement = SwayWebDefaultSetRequirement; + var AccessWebDefaultSetRequirement = function(_super) + { + __extends(AccessWebDefaultSetRequirement,_super); + function AccessWebDefaultSetRequirement() + { + _super.call(this,{ + bindingevents: 1.1, + partialtablebindings: 1.1, + settings: 1.1, + tablebindings: 1.1, + tablecoercion: 1.1 + }) + } + return AccessWebDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.AccessWebDefaultSetRequirement = AccessWebDefaultSetRequirement; + var ExcelIOSDefaultSetRequirement = function(_super) + { + __extends(ExcelIOSDefaultSetRequirement,_super); + function ExcelIOSDefaultSetRequirement() + { + _super.call(this,{ + bindingevents: 1.1, + documentevents: 1.1, + matrixbindings: 1.1, + matrixcoercion: 1.1, + selection: 1.1, + settings: 1.1, + tablebindings: 1.1, + tablecoercion: 1.1, + textbindings: 1.1, + textcoercion: 1.1 + }) + } + return ExcelIOSDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.ExcelIOSDefaultSetRequirement = ExcelIOSDefaultSetRequirement; + var WordIOSDefaultSetRequirement = function(_super) + { + __extends(WordIOSDefaultSetRequirement,_super); + function WordIOSDefaultSetRequirement() + { + _super.call(this,{ + bindingevents: 1.1, + compressedfile: 1.1, + customxmlparts: 1.1, + documentevents: 1.1, + file: 1.1, + htmlcoercion: 1.1, + matrixbindings: 1.1, + matrixcoercion: 1.1, + ooxmlcoercion: 1.1, + pdffile: 1.1, + selection: 1.1, + settings: 1.1, + tablebindings: 1.1, + tablecoercion: 1.1, + textbindings: 1.1, + textcoercion: 1.1, + textfile: 1.1 + }) + } + return WordIOSDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.WordIOSDefaultSetRequirement = WordIOSDefaultSetRequirement; + var WordIOSV1DefaultSetRequirement = function(_super) + { + __extends(WordIOSV1DefaultSetRequirement,_super); + function WordIOSV1DefaultSetRequirement() + { + _super.call(this); + this._addSetMap({ + customxmlparts: 1.2, + wordapi: 1.2 + }) + } + return WordIOSV1DefaultSetRequirement + }(WordIOSDefaultSetRequirement); + Requirement.WordIOSV1DefaultSetRequirement = WordIOSV1DefaultSetRequirement; + var PowerpointIOSDefaultSetRequirement = function(_super) + { + __extends(PowerpointIOSDefaultSetRequirement,_super); + function PowerpointIOSDefaultSetRequirement() + { + _super.call(this,{ + activeview: 1.1, + compressedfile: 1.1, + documentevents: 1.1, + file: 1.1, + pdffile: 1.1, + selection: 1.1, + settings: 1.1, + textcoercion: 1.1 + }) + } + return PowerpointIOSDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.PowerpointIOSDefaultSetRequirement = PowerpointIOSDefaultSetRequirement; + var OutlookIOSDefaultSetRequirement = function(_super) + { + __extends(OutlookIOSDefaultSetRequirement,_super); + function OutlookIOSDefaultSetRequirement() + { + _super.call(this,{mailbox: 1.1}) + } + return OutlookIOSDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.OutlookIOSDefaultSetRequirement = OutlookIOSDefaultSetRequirement; + var RequirementsMatrixFactory = function() + { + function RequirementsMatrixFactory(){} + RequirementsMatrixFactory.initializeOsfDda = function() + { + OSF.OUtil.setNamespace("Requirement",OSF.DDA) + }; + RequirementsMatrixFactory.getDefaultRequirementMatrix = function(appContext) + { + this.initializeDefaultSetMatrix(); + var defaultRequirementMatrix = undefined; + var clientRequirement = appContext.get_requirementMatrix(); + if(clientRequirement != undefined && clientRequirement.length > 0 && typeof JSON !== "undefined") + { + var matrixItem = JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement(matrixItem)) + } + else + { + var appLocator = RequirementsMatrixFactory.getClientFullVersionString(appContext); + if(RequirementsMatrixFactory.DefaultSetArrayMatrix != undefined && RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator] != undefined) + defaultRequirementMatrix = new RequirementMatrix(RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator]); + else + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement({})) + } + return defaultRequirementMatrix + }; + RequirementsMatrixFactory.getDefaultDialogRequirementMatrix = function(appContext) + { + var defaultRequirementMatrix = undefined; + var clientRequirement = appContext.get_dialogRequirementMatrix(); + if(clientRequirement != undefined && clientRequirement.length > 0 && typeof JSON !== "undefined") + { + var matrixItem = JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement(matrixItem)) + } + else + defaultRequirementMatrix = new RequirementMatrix(new DefaultDialogSetRequirement); + return defaultRequirementMatrix + }; + RequirementsMatrixFactory.getClientFullVersionString = function(appContext) + { + var appMinorVersion = appContext.get_appMinorVersion(); + var appMinorVersionString = ""; + var appFullVersion = ""; + var appName = appContext.get_appName(); + var isIOSClient = appName == 1024 || appName == 4096 || appName == 8192 || appName == 65536; + if(isIOSClient && appContext.get_appVersion() == 1) + if(appName == 4096 && appMinorVersion >= 15) + appFullVersion = "16.00.01"; + else + appFullVersion = "16.00"; + else if(appContext.get_appName() == 64) + appFullVersion = appContext.get_appVersion(); + else + { + if(appMinorVersion < 10) + appMinorVersionString = "0" + appMinorVersion; + else + appMinorVersionString = "" + appMinorVersion; + appFullVersion = appContext.get_appVersion() + "." + appMinorVersionString + } + return appContext.get_appName() + "-" + appFullVersion + }; + RequirementsMatrixFactory.initializeDefaultSetMatrix = function() + { + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1600] = new ExcelClientDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1600] = new WordClientDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1600] = new PowerpointClientDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1601] = new ExcelClientV1DefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1601] = new WordClientV1DefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1601] = new PowerpointClientV1DefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_RCLIENT_1600] = new OutlookClientDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_WAC_1600] = new ExcelWebDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_WAC_1600] = new WordWebDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1600] = new OutlookWebDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1601] = new OutlookWebDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Project_RCLIENT_1600] = new ProjectClientDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Access_WAC_1600] = new AccessWebDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_WAC_1600] = new PowerpointWebDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_IOS_1600] = new ExcelIOSDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.SWAY_WAC_1600] = new SwayWebDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_1600] = new WordIOSDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_16001] = new WordIOSV1DefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_IOS_1600] = new PowerpointIOSDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_IOS_1600] = new OutlookIOSDefaultSetRequirement + }; + RequirementsMatrixFactory.Excel_RCLIENT_1600 = "1-16.00"; + RequirementsMatrixFactory.Excel_RCLIENT_1601 = "1-16.01"; + RequirementsMatrixFactory.Word_RCLIENT_1600 = "2-16.00"; + RequirementsMatrixFactory.Word_RCLIENT_1601 = "2-16.01"; + RequirementsMatrixFactory.PowerPoint_RCLIENT_1600 = "4-16.00"; + RequirementsMatrixFactory.PowerPoint_RCLIENT_1601 = "4-16.01"; + RequirementsMatrixFactory.Outlook_RCLIENT_1600 = "8-16.00"; + RequirementsMatrixFactory.Excel_WAC_1600 = "16-16.00"; + RequirementsMatrixFactory.Word_WAC_1600 = "32-16.00"; + RequirementsMatrixFactory.Outlook_WAC_1600 = "64-16.00"; + RequirementsMatrixFactory.Outlook_WAC_1601 = "64-16.01"; + RequirementsMatrixFactory.Project_RCLIENT_1600 = "128-16.00"; + RequirementsMatrixFactory.Access_WAC_1600 = "256-16.00"; + RequirementsMatrixFactory.PowerPoint_WAC_1600 = "512-16.00"; + RequirementsMatrixFactory.Excel_IOS_1600 = "1024-16.00"; + RequirementsMatrixFactory.SWAY_WAC_1600 = "2048-16.00"; + RequirementsMatrixFactory.Word_IOS_1600 = "4096-16.00"; + RequirementsMatrixFactory.Word_IOS_16001 = "4096-16.00.01"; + RequirementsMatrixFactory.PowerPoint_IOS_1600 = "8192-16.00"; + RequirementsMatrixFactory.Outlook_IOS_1600 = "65536-16.00"; + RequirementsMatrixFactory.DefaultSetArrayMatrix = {}; + return RequirementsMatrixFactory + }(); + Requirement.RequirementsMatrixFactory = RequirementsMatrixFactory + })(Requirement = OfficeExt.Requirement || (OfficeExt.Requirement = {})) +})(OfficeExt || (OfficeExt = {})); OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(); var OfficeExt; (function(OfficeExt) { - var HostName; - (function(HostName) - { - var Host=function() - { - function Host() - { - this.getDiagnostics=function _getDiagnostics(version) - { - var diagnostics={ - host: this.getHost(), - version: version || this.getDefaultVersion(), - platform: this.getPlatform() - }; - return diagnostics - }; - this.platformRemappings={ - web: Microsoft.Office.WebExtension.PlatformType.OfficeOnline, - winrt: Microsoft.Office.WebExtension.PlatformType.Universal, - win32: Microsoft.Office.WebExtension.PlatformType.PC, - ios: Microsoft.Office.WebExtension.PlatformType.iOS, - android: Microsoft.Office.WebExtension.PlatformType.Android - }; - this.camelCaseMappings={ - powerpoint: Microsoft.Office.WebExtension.HostType.PowerPoint, - onenote: Microsoft.Office.WebExtension.HostType.OneNote - }; - this.hostInfo=OSF._OfficeAppFactory.getHostInfo(); - this.getHost=this.getHost.bind(this); - this.getPlatform=this.getPlatform.bind(this); - this.getDiagnostics=this.getDiagnostics.bind(this) - } - Host.prototype.capitalizeFirstLetter=function(input) - { - if(input) - return input[0].toUpperCase()+input.slice(1).toLowerCase(); - return input - }; - Host.getInstance=function() - { - if(Host.hostObj===undefined) - Host.hostObj=new Host; - return Host.hostObj - }; - Host.prototype.getPlatform=function() - { - if(this.hostInfo.hostPlatform) - { - var hostPlatform=this.hostInfo.hostPlatform.toLowerCase(); - if(this.platformRemappings[hostPlatform]) - return this.platformRemappings[hostPlatform] - } - return null - }; - Host.prototype.getHost=function() - { - if(this.hostInfo.hostType) - { - var hostType=this.hostInfo.hostType.toLowerCase(); - if(this.camelCaseMappings[hostType]) - return this.camelCaseMappings[hostType]; - hostType=this.capitalizeFirstLetter(this.hostInfo.hostType); - if(Microsoft.Office.WebExtension.HostType[hostType]) - return Microsoft.Office.WebExtension.HostType[hostType] - } - return null - }; - Host.prototype.getDefaultVersion=function() - { - if(this.getHost()) - return"16.0.0000.0000"; - return null - }; - return Host - }(); - HostName.Host=Host - })(HostName=OfficeExt.HostName || (OfficeExt.HostName={})) -})(OfficeExt || (OfficeExt={})); -Microsoft.Office.WebExtension.ApplicationMode={ - WebEditor: "webEditor", - WebViewer: "webViewer", - Client: "client" -}; -Microsoft.Office.WebExtension.DocumentMode={ - ReadOnly: "readOnly", - ReadWrite: "readWrite" -}; -OSF.NamespaceManager=function OSF_NamespaceManager() + var HostName; + (function(HostName) + { + var Host = function() + { + function Host() + { + this.getDiagnostics = function _getDiagnostics(version) + { + var diagnostics = { + host: this.getHost(), + version: version || this.getDefaultVersion(), + platform: this.getPlatform() + }; + return diagnostics + }; + this.platformRemappings = { + web: Microsoft.Office.WebExtension.PlatformType.OfficeOnline, + winrt: Microsoft.Office.WebExtension.PlatformType.Universal, + win32: Microsoft.Office.WebExtension.PlatformType.PC, + mac: Microsoft.Office.WebExtension.PlatformType.Mac, + ios: Microsoft.Office.WebExtension.PlatformType.iOS, + android: Microsoft.Office.WebExtension.PlatformType.Android + }; + this.camelCaseMappings = { + powerpoint: Microsoft.Office.WebExtension.HostType.PowerPoint, + onenote: Microsoft.Office.WebExtension.HostType.OneNote + }; + this.hostInfo = OSF._OfficeAppFactory.getHostInfo(); + this.getHost = this.getHost.bind(this); + this.getPlatform = this.getPlatform.bind(this); + this.getDiagnostics = this.getDiagnostics.bind(this) + } + Host.prototype.capitalizeFirstLetter = function(input) + { + if(input) + return input[0].toUpperCase() + input.slice(1).toLowerCase(); + return input + }; + Host.getInstance = function() + { + if(Host.hostObj === undefined) + Host.hostObj = new Host; + return Host.hostObj + }; + Host.prototype.getPlatform = function() + { + if(this.hostInfo.hostPlatform) + { + var hostPlatform = this.hostInfo.hostPlatform.toLowerCase(); + if(this.platformRemappings[hostPlatform]) + return this.platformRemappings[hostPlatform] + } + return null + }; + Host.prototype.getHost = function() + { + if(this.hostInfo.hostType) + { + var hostType = this.hostInfo.hostType.toLowerCase(); + if(this.camelCaseMappings[hostType]) + return this.camelCaseMappings[hostType]; + hostType = this.capitalizeFirstLetter(this.hostInfo.hostType); + if(Microsoft.Office.WebExtension.HostType[hostType]) + return Microsoft.Office.WebExtension.HostType[hostType] + } + return null + }; + Host.prototype.getDefaultVersion = function() + { + if(this.getHost()) + return"16.0.0000.0000"; + return null + }; + return Host + }(); + HostName.Host = Host + })(HostName = OfficeExt.HostName || (OfficeExt.HostName = {})) +})(OfficeExt || (OfficeExt = {})); +Microsoft.Office.WebExtension.ApplicationMode = { + WebEditor: "webEditor", + WebViewer: "webViewer", + Client: "client" +}; +Microsoft.Office.WebExtension.DocumentMode = { + ReadOnly: "readOnly", + ReadWrite: "readWrite" +}; +OSF.NamespaceManager = function OSF_NamespaceManager() { - var _userOffice; - var _useShortcut=false; - return{ - enableShortcut: function OSF_NamespaceManager$enableShortcut() - { - if(!_useShortcut) - { - if(window.Office) - _userOffice=window.Office; - else - OSF.OUtil.setNamespace("Office",window); - window.Office=Microsoft.Office.WebExtension; - _useShortcut=true - } - }, - disableShortcut: function OSF_NamespaceManager$disableShortcut() - { - if(_useShortcut) - { - if(_userOffice) - window.Office=_userOffice; - else - OSF.OUtil.unsetNamespace("Office",window); - _useShortcut=false - } - } - } + var _userOffice; + var _useShortcut = false; + return{ + enableShortcut: function OSF_NamespaceManager$enableShortcut() + { + if(!_useShortcut) + { + if(window.Office) + _userOffice = window.Office; + else + OSF.OUtil.setNamespace("Office",window); + window.Office = Microsoft.Office.WebExtension; + _useShortcut = true + } + }, + disableShortcut: function OSF_NamespaceManager$disableShortcut() + { + if(_useShortcut) + { + if(_userOffice) + window.Office = _userOffice; + else + OSF.OUtil.unsetNamespace("Office",window); + _useShortcut = false + } + } + } }(); OSF.NamespaceManager.enableShortcut(); -Microsoft.Office.WebExtension.useShortNamespace=function Microsoft_Office_WebExtension_useShortNamespace(useShortcut) +Microsoft.Office.WebExtension.useShortNamespace = function Microsoft_Office_WebExtension_useShortNamespace(useShortcut) { - if(useShortcut) - OSF.NamespaceManager.enableShortcut(); - else - OSF.NamespaceManager.disableShortcut() + if(useShortcut) + OSF.NamespaceManager.enableShortcut(); + else + OSF.NamespaceManager.disableShortcut() }; -Microsoft.Office.WebExtension.select=function Microsoft_Office_WebExtension_select(str, errorCallback) +Microsoft.Office.WebExtension.select = function Microsoft_Office_WebExtension_select(str, errorCallback) { - var promise; - if(str && typeof str=="string") - { - var index=str.indexOf("#"); - if(index !=-1) - { - var op=str.substring(0,index); - var target=str.substring(index+1); - switch(op) - { - case"binding": - case"bindings": - if(target) - promise=new OSF.DDA.BindingPromise(target); - break - } - } - } - if(!promise) - { - if(errorCallback) - { - var callbackType=typeof errorCallback; - if(callbackType=="function") - { - var callArgs={}; - callArgs[Microsoft.Office.WebExtension.Parameters.Callback]=errorCallback; - OSF.DDA.issueAsyncResult(callArgs,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext)) - } - else - throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,callbackType); - } - } - else - { - promise.onFail=errorCallback; - return promise - } -}; -OSF.DDA.Context=function OSF_DDA_Context(officeAppContext, document, license, appOM, getOfficeTheme) + var promise; + if(str && typeof str == "string") + { + var index = str.indexOf("#"); + if(index != -1) + { + var op = str.substring(0,index); + var target = str.substring(index + 1); + switch(op) + { + case"binding": + case"bindings": + if(target) + promise = new OSF.DDA.BindingPromise(target); + break + } + } + } + if(!promise) + { + if(errorCallback) + { + var callbackType = typeof errorCallback; + if(callbackType == "function") + { + var callArgs = {}; + callArgs[Microsoft.Office.WebExtension.Parameters.Callback] = errorCallback; + OSF.DDA.issueAsyncResult(callArgs,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext)) + } + else + throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,callbackType); + } + } + else + { + promise.onFail = errorCallback; + return promise + } +}; +OSF.DDA.Context = function OSF_DDA_Context(officeAppContext, document, license, appOM, getOfficeTheme) { - OSF.OUtil.defineEnumerableProperties(this,{ - contentLanguage: {value: officeAppContext.get_dataLocale()}, - displayLanguage: {value: officeAppContext.get_appUILocale()}, - touchEnabled: {value: officeAppContext.get_touchEnabled()}, - commerceAllowed: {value: officeAppContext.get_commerceAllowed()}, - host: {value: OfficeExt.HostName.Host.getInstance().getHost()}, - platform: {value: OfficeExt.HostName.Host.getInstance().getPlatform()}, - diagnostics: {value: OfficeExt.HostName.Host.getInstance().getDiagnostics(officeAppContext.get_hostFullVersion())} - }); - if(license) - OSF.OUtil.defineEnumerableProperty(this,"license",{value: license}); - if(officeAppContext.ui) - OSF.OUtil.defineEnumerableProperty(this,"ui",{value: officeAppContext.ui}); - if(officeAppContext.get_isDialog()) - { - var requirements=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); - OSF.OUtil.defineEnumerableProperty(this,"requirements",{value: requirements}) - } - else - { - if(document) - OSF.OUtil.defineEnumerableProperty(this,"document",{value: document}); - if(appOM) - { - var displayName=appOM.displayName || "appOM"; - delete appOM.displayName; - OSF.OUtil.defineEnumerableProperty(this,displayName,{value: appOM}) - } - if(getOfficeTheme) - OSF.OUtil.defineEnumerableProperty(this,"officeTheme",{get: function() - { - return getOfficeTheme() - }}); - var requirements=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(officeAppContext); - OSF.OUtil.defineEnumerableProperty(this,"requirements",{value: requirements}) - } -}; -OSF.DDA.OutlookContext=function OSF_DDA_OutlookContext(appContext, settings, license, appOM, getOfficeTheme) + OSF.OUtil.defineEnumerableProperties(this,{ + contentLanguage: {value: officeAppContext.get_dataLocale()}, + displayLanguage: {value: officeAppContext.get_appUILocale()}, + touchEnabled: {value: officeAppContext.get_touchEnabled()}, + commerceAllowed: {value: officeAppContext.get_commerceAllowed()}, + host: {value: OfficeExt.HostName.Host.getInstance().getHost()}, + platform: {value: OfficeExt.HostName.Host.getInstance().getPlatform()}, + diagnostics: {value: OfficeExt.HostName.Host.getInstance().getDiagnostics(officeAppContext.get_hostFullVersion())} + }); + if(license) + OSF.OUtil.defineEnumerableProperty(this,"license",{value: license}); + if(officeAppContext.ui) + OSF.OUtil.defineEnumerableProperty(this,"ui",{value: officeAppContext.ui}); + if(officeAppContext.auth) + OSF.OUtil.defineEnumerableProperty(this,"auth",{value: officeAppContext.auth}); + if(officeAppContext.get_isDialog()) + { + var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); + OSF.OUtil.defineEnumerableProperty(this,"requirements",{value: requirements}) + } + else + { + if(document) + OSF.OUtil.defineEnumerableProperty(this,"document",{value: document}); + if(appOM) + { + var displayName = appOM.displayName || "appOM"; + delete appOM.displayName; + OSF.OUtil.defineEnumerableProperty(this,displayName,{value: appOM}) + } + if(getOfficeTheme) + OSF.OUtil.defineEnumerableProperty(this,"officeTheme",{get: function() + { + return getOfficeTheme() + }}); + var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(officeAppContext); + OSF.OUtil.defineEnumerableProperty(this,"requirements",{value: requirements}) + } +}; +OSF.DDA.OutlookContext = function OSF_DDA_OutlookContext(appContext, settings, license, appOM, getOfficeTheme) { - OSF.DDA.OutlookContext.uber.constructor.call(this,appContext,null,license,appOM,getOfficeTheme); - if(settings) - OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value: settings}) + OSF.DDA.OutlookContext.uber.constructor.call(this,appContext,null,license,appOM,getOfficeTheme); + if(settings) + OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value: settings}) }; OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context); -OSF.DDA.OutlookAppOm=function OSF_DDA_OutlookAppOm(appContext, window, appReady){}; -OSF.DDA.Document=function OSF_DDA_Document(officeAppContext, settings) +OSF.DDA.OutlookAppOm = function OSF_DDA_OutlookAppOm(appContext, window, appReady){}; +OSF.DDA.Document = function OSF_DDA_Document(officeAppContext, settings) { - var mode; - switch(officeAppContext.get_clientMode()) - { - case OSF.ClientMode.ReadOnly: - mode=Microsoft.Office.WebExtension.DocumentMode.ReadOnly; - break; - case OSF.ClientMode.ReadWrite: - mode=Microsoft.Office.WebExtension.DocumentMode.ReadWrite; - break - } - if(settings) - OSF.OUtil.defineEnumerableProperty(this,"settings",{value: settings}); - OSF.OUtil.defineMutableProperties(this,{ - mode: {value: mode}, - url: {value: officeAppContext.get_docUrl()} - }) -}; -OSF.DDA.JsomDocument=function OSF_DDA_JsomDocument(officeAppContext, bindingFacade, settings) + var mode; + switch(officeAppContext.get_clientMode()) + { + case OSF.ClientMode.ReadOnly: + mode = Microsoft.Office.WebExtension.DocumentMode.ReadOnly; + break; + case OSF.ClientMode.ReadWrite: + mode = Microsoft.Office.WebExtension.DocumentMode.ReadWrite; + break + } + if(settings) + OSF.OUtil.defineEnumerableProperty(this,"settings",{value: settings}); + OSF.OUtil.defineMutableProperties(this,{ + mode: {value: mode}, + url: {value: officeAppContext.get_docUrl()} + }) +}; +OSF.DDA.JsomDocument = function OSF_DDA_JsomDocument(officeAppContext, bindingFacade, settings) { - OSF.DDA.JsomDocument.uber.constructor.call(this,officeAppContext,settings); - if(bindingFacade) - OSF.OUtil.defineEnumerableProperty(this,"bindings",{get: function OSF_DDA_Document$GetBindings() - { - return bindingFacade - }}); - var am=OSF.DDA.AsyncMethodNames; - OSF.DDA.DispIdHost.addAsyncMethods(this,[am.GetSelectedDataAsync,am.SetSelectedDataAsync]); - OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged])) + OSF.DDA.JsomDocument.uber.constructor.call(this,officeAppContext,settings); + if(bindingFacade) + OSF.OUtil.defineEnumerableProperty(this,"bindings",{get: function OSF_DDA_Document$GetBindings() + { + return bindingFacade + }}); + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this,[am.GetSelectedDataAsync,am.SetSelectedDataAsync]); + OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged])) }; OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document); OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get: function Microsoft_Office_WebExtension$GetContext() - { - var context; - if(OSF && OSF._OfficeAppFactory) - context=OSF._OfficeAppFactory.getContext(); - return context - }}); -OSF.DDA.License=function OSF_DDA_License(eToken) + { + var context; + if(OSF && OSF._OfficeAppFactory) + context = OSF._OfficeAppFactory.getContext(); + return context + }}); +OSF.DDA.License = function OSF_DDA_License(eToken) { - OSF.OUtil.defineEnumerableProperty(this,"value",{value: eToken}) + OSF.OUtil.defineEnumerableProperty(this,"value",{value: eToken}) }; -OSF.DDA.ApiMethodCall=function OSF_DDA_ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) +OSF.DDA.ApiMethodCall = function OSF_DDA_ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { - var requiredCount=requiredParameters.length; - var getInvalidParameterString=OSF.OUtil.delayExecutionAndCache(function() - { - return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,displayName) - }); - this.verifyArguments=function OSF_DDA_ApiMethodCall$VerifyArguments(params, args) - { - for(var name in params) - { - var param=params[name]; - var arg=args[name]; - if(param["enum"]) - switch(typeof arg) - { - case"string": - if(OSF.OUtil.listContainsValue(param["enum"],arg)) - break; - case"undefined": - throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration; - default: - throw getInvalidParameterString(); - } - if(param["types"]) - if(!OSF.OUtil.listContainsValue(param["types"],typeof arg)) - throw getInvalidParameterString(); - } - }; - this.extractRequiredArguments=function OSF_DDA_ApiMethodCall$ExtractRequiredArguments(userArgs, caller, stateInfo) - { - if(userArgs.length < requiredCount) - throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments); - var requiredArgs=[]; - var index; - for(index=0; index < requiredCount; index++) - requiredArgs.push(userArgs[index]); - this.verifyArguments(requiredParameters,requiredArgs); - var ret={}; - for(index=0; index < requiredCount; index++) - { - var param=requiredParameters[index]; - var arg=requiredArgs[index]; - if(param.verify) - { - var isValid=param.verify(arg,caller,stateInfo); - if(!isValid) - throw getInvalidParameterString(); - } - ret[param.name]=arg - } - return ret - },this.fillOptions=function OSF_DDA_ApiMethodCall$FillOptions(options, requiredArgs, caller, stateInfo) - { - options=options || {}; - for(var optionName in supportedOptions) - if(!OSF.OUtil.listContainsKey(options,optionName)) - { - var value=undefined; - var option=supportedOptions[optionName]; - if(option.calculate && requiredArgs) - value=option.calculate(requiredArgs,caller,stateInfo); - if(!value && option.defaultValue !==undefined) - value=option.defaultValue; - options[optionName]=value - } - return options - }; - this.constructCallArgs=function OSF_DAA_ApiMethodCall$ConstructCallArgs(required, options, caller, stateInfo) - { - var callArgs={}; - for(var r in required) - callArgs[r]=required[r]; - for(var o in options) - callArgs[o]=options[o]; - for(var s in privateStateCallbacks) - callArgs[s]=privateStateCallbacks[s](caller,stateInfo); - if(checkCallArgs) - callArgs=checkCallArgs(callArgs,caller,stateInfo); - return callArgs - } + var requiredCount = requiredParameters.length; + var getInvalidParameterString = OSF.OUtil.delayExecutionAndCache(function() + { + return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,displayName) + }); + this.verifyArguments = function OSF_DDA_ApiMethodCall$VerifyArguments(params, args) + { + for(var name in params) + { + var param = params[name]; + var arg = args[name]; + if(param["enum"]) + switch(typeof arg) + { + case"string": + if(OSF.OUtil.listContainsValue(param["enum"],arg)) + break; + case"undefined": + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration; + default: + throw getInvalidParameterString(); + } + if(param["types"]) + if(!OSF.OUtil.listContainsValue(param["types"],typeof arg)) + throw getInvalidParameterString(); + } + }; + this.extractRequiredArguments = function OSF_DDA_ApiMethodCall$ExtractRequiredArguments(userArgs, caller, stateInfo) + { + if(userArgs.length < requiredCount) + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments); + var requiredArgs = []; + var index; + for(index = 0; index < requiredCount; index++) + requiredArgs.push(userArgs[index]); + this.verifyArguments(requiredParameters,requiredArgs); + var ret = {}; + for(index = 0; index < requiredCount; index++) + { + var param = requiredParameters[index]; + var arg = requiredArgs[index]; + if(param.verify) + { + var isValid = param.verify(arg,caller,stateInfo); + if(!isValid) + throw getInvalidParameterString(); + } + ret[param.name] = arg + } + return ret + },this.fillOptions = function OSF_DDA_ApiMethodCall$FillOptions(options, requiredArgs, caller, stateInfo) + { + options = options || {}; + for(var optionName in supportedOptions) + if(!OSF.OUtil.listContainsKey(options,optionName)) + { + var value = undefined; + var option = supportedOptions[optionName]; + if(option.calculate && requiredArgs) + value = option.calculate(requiredArgs,caller,stateInfo); + if(!value && option.defaultValue !== undefined) + value = option.defaultValue; + options[optionName] = value + } + return options + }; + this.constructCallArgs = function OSF_DAA_ApiMethodCall$ConstructCallArgs(required, options, caller, stateInfo) + { + var callArgs = {}; + for(var r in required) + callArgs[r] = required[r]; + for(var o in options) + callArgs[o] = options[o]; + for(var s in privateStateCallbacks) + callArgs[s] = privateStateCallbacks[s](caller,stateInfo); + if(checkCallArgs) + callArgs = checkCallArgs(callArgs,caller,stateInfo); + return callArgs + } }; OSF.OUtil.setNamespace("AsyncResultEnum",OSF.DDA); -OSF.DDA.AsyncResultEnum.Properties={ - Context: "Context", - Value: "Value", - Status: "Status", - Error: "Error" -}; -Microsoft.Office.WebExtension.AsyncResultStatus={ - Succeeded: "succeeded", - Failed: "failed" -}; -OSF.DDA.AsyncResultEnum.ErrorCode={ - Success: 0, - Failed: 1 -}; -OSF.DDA.AsyncResultEnum.ErrorProperties={ - Name: "Name", - Message: "Message", - Code: "Code" -}; -OSF.DDA.AsyncMethodNames={}; -OSF.DDA.AsyncMethodNames.addNames=function(methodNames) +OSF.DDA.AsyncResultEnum.Properties = { + Context: "Context", + Value: "Value", + Status: "Status", + Error: "Error" +}; +Microsoft.Office.WebExtension.AsyncResultStatus = { + Succeeded: "succeeded", + Failed: "failed" +}; +OSF.DDA.AsyncResultEnum.ErrorCode = { + Success: 0, + Failed: 1 +}; +OSF.DDA.AsyncResultEnum.ErrorProperties = { + Name: "Name", + Message: "Message", + Code: "Code" +}; +OSF.DDA.AsyncMethodNames = {}; +OSF.DDA.AsyncMethodNames.addNames = function(methodNames) { - for(var entry in methodNames) - { - var am={}; - OSF.OUtil.defineEnumerableProperties(am,{ - id: {value: entry}, - displayName: {value: methodNames[entry]} - }); - OSF.DDA.AsyncMethodNames[entry]=am - } -}; -OSF.DDA.AsyncMethodCall=function OSF_DDA_AsyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, onSucceeded, onFailed, checkCallArgs, displayName) + for(var entry in methodNames) + { + var am = {}; + OSF.OUtil.defineEnumerableProperties(am,{ + id: {value: entry}, + displayName: {value: methodNames[entry]} + }); + OSF.DDA.AsyncMethodNames[entry] = am + } +}; +OSF.DDA.AsyncMethodCall = function OSF_DDA_AsyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, onSucceeded, onFailed, checkCallArgs, displayName) { - var requiredCount=requiredParameters.length; - var apiMethods=new OSF.DDA.ApiMethodCall(requiredParameters,supportedOptions,privateStateCallbacks,checkCallArgs,displayName); - function OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) - { - if(userArgs.length > requiredCount+2) - throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); - var options, - parameterCallback; - for(var i=userArgs.length - 1; i >=requiredCount; i--) - { - var argument=userArgs[i]; - switch(typeof argument) - { - case"object": - if(options) - throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); - else - options=argument; - break; - case"function": - if(parameterCallback) - throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction); - else - parameterCallback=argument; - break; - default: - throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); - break - } - } - options=apiMethods.fillOptions(options,requiredArgs,caller,stateInfo); - if(parameterCallback) - if(options[Microsoft.Office.WebExtension.Parameters.Callback]) - throw Strings.OfficeOM.L_RedundantCallbackSpecification; - else - options[Microsoft.Office.WebExtension.Parameters.Callback]=parameterCallback; - apiMethods.verifyArguments(supportedOptions,options); - return options - } - this.verifyAndExtractCall=function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) - { - var required=apiMethods.extractRequiredArguments(userArgs,caller,stateInfo); - var options=OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs,required,caller,stateInfo); - var callArgs=apiMethods.constructCallArgs(required,options,caller,stateInfo); - return callArgs - }; - this.processResponse=function OSF_DAA_AsyncMethodCall$ProcessResponse(status, response, caller, callArgs) - { - var payload; - if(status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - if(onSucceeded) - payload=onSucceeded(response,caller,callArgs); - else - payload=response; - else if(onFailed) - payload=onFailed(status,response); - else - payload=OSF.DDA.ErrorCodeManager.getErrorArgs(status); - return payload - }; - this.getCallArgs=function(suppliedArgs) - { - var options, - parameterCallback; - for(var i=suppliedArgs.length - 1; i >=requiredCount; i--) - { - var argument=suppliedArgs[i]; - switch(typeof argument) - { - case"object": - options=argument; - break; - case"function": - parameterCallback=argument; - break - } - } - options=options || {}; - if(parameterCallback) - options[Microsoft.Office.WebExtension.Parameters.Callback]=parameterCallback; - return options - } -}; -OSF.DDA.AsyncMethodCallFactory=function() + var requiredCount = requiredParameters.length; + var apiMethods = new OSF.DDA.ApiMethodCall(requiredParameters,supportedOptions,privateStateCallbacks,checkCallArgs,displayName); + function OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) + { + if(userArgs.length > requiredCount + 2) + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); + var options, + parameterCallback; + for(var i = userArgs.length - 1; i >= requiredCount; i--) + { + var argument = userArgs[i]; + switch(typeof argument) + { + case"object": + if(options) + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); + else + options = argument; + break; + case"function": + if(parameterCallback) + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction); + else + parameterCallback = argument; + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); + break + } + } + options = apiMethods.fillOptions(options,requiredArgs,caller,stateInfo); + if(parameterCallback) + if(options[Microsoft.Office.WebExtension.Parameters.Callback]) + throw Strings.OfficeOM.L_RedundantCallbackSpecification; + else + options[Microsoft.Office.WebExtension.Parameters.Callback] = parameterCallback; + apiMethods.verifyArguments(supportedOptions,options); + return options + } + this.verifyAndExtractCall = function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) + { + var required = apiMethods.extractRequiredArguments(userArgs,caller,stateInfo); + var options = OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs,required,caller,stateInfo); + var callArgs = apiMethods.constructCallArgs(required,options,caller,stateInfo); + return callArgs + }; + this.processResponse = function OSF_DAA_AsyncMethodCall$ProcessResponse(status, response, caller, callArgs) + { + var payload; + if(status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + if(onSucceeded) + payload = onSucceeded(response,caller,callArgs); + else + payload = response; + else if(onFailed) + payload = onFailed(status,response); + else + payload = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + return payload + }; + this.getCallArgs = function(suppliedArgs) + { + var options, + parameterCallback; + for(var i = suppliedArgs.length - 1; i >= requiredCount; i--) + { + var argument = suppliedArgs[i]; + switch(typeof argument) + { + case"object": + options = argument; + break; + case"function": + parameterCallback = argument; + break + } + } + options = options || {}; + if(parameterCallback) + options[Microsoft.Office.WebExtension.Parameters.Callback] = parameterCallback; + return options + } +}; +OSF.DDA.AsyncMethodCallFactory = function() { - return{manufacture: function(params) - { - var supportedOptions=params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; - var privateStateCallbacks=params.privateStateCallbacks ? OSF.OUtil.createObject(params.privateStateCallbacks) : []; - return new OSF.DDA.AsyncMethodCall(params.requiredArguments || [],supportedOptions,privateStateCallbacks,params.onSucceeded,params.onFailed,params.checkCallArgs,params.method.displayName) - }} + return{manufacture: function(params) + { + var supportedOptions = params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + var privateStateCallbacks = params.privateStateCallbacks ? OSF.OUtil.createObject(params.privateStateCallbacks) : []; + return new OSF.DDA.AsyncMethodCall(params.requiredArguments || [],supportedOptions,privateStateCallbacks,params.onSucceeded,params.onFailed,params.checkCallArgs,params.method.displayName) + }} }(); -OSF.DDA.AsyncMethodCalls={}; -OSF.DDA.AsyncMethodCalls.define=function(callDefinition) +OSF.DDA.AsyncMethodCalls = {}; +OSF.DDA.AsyncMethodCalls.define = function(callDefinition) { - OSF.DDA.AsyncMethodCalls[callDefinition.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(callDefinition) + OSF.DDA.AsyncMethodCalls[callDefinition.method.id] = OSF.DDA.AsyncMethodCallFactory.manufacture(callDefinition) }; -OSF.DDA.Error=function OSF_DDA_Error(name, message, code) +OSF.DDA.Error = function OSF_DDA_Error(name, message, code) { - OSF.OUtil.defineEnumerableProperties(this,{ - name: {value: name}, - message: {value: message}, - code: {value: code} - }) + OSF.OUtil.defineEnumerableProperties(this,{ + name: {value: name}, + message: {value: message}, + code: {value: code} + }) }; -OSF.DDA.AsyncResult=function OSF_DDA_AsyncResult(initArgs, errorArgs) +OSF.DDA.AsyncResult = function OSF_DDA_AsyncResult(initArgs, errorArgs) { - OSF.OUtil.defineEnumerableProperties(this,{ - value: {value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Value]}, - status: {value: errorArgs ? Microsoft.Office.WebExtension.AsyncResultStatus.Failed : Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded} - }); - if(initArgs[OSF.DDA.AsyncResultEnum.Properties.Context]) - OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Context]}); - if(errorArgs) - OSF.OUtil.defineEnumerableProperty(this,"error",{value: new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])}) -}; -OSF.DDA.issueAsyncResult=function OSF_DDA$IssueAsyncResult(callArgs, status, payload) + OSF.OUtil.defineEnumerableProperties(this,{ + value: {value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Value]}, + status: {value: errorArgs ? Microsoft.Office.WebExtension.AsyncResultStatus.Failed : Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded} + }); + if(initArgs[OSF.DDA.AsyncResultEnum.Properties.Context]) + OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Context]}); + if(errorArgs) + OSF.OUtil.defineEnumerableProperty(this,"error",{value: new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])}) +}; +OSF.DDA.issueAsyncResult = function OSF_DDA$IssueAsyncResult(callArgs, status, payload) { - var callback=callArgs[Microsoft.Office.WebExtension.Parameters.Callback]; - if(callback) - { - var asyncInitArgs={}; - asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Context]=callArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; - var errorArgs; - if(status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Value]=payload; - else - { - errorArgs={}; - payload=payload || OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=payload.name || payload; - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=payload.message || payload - } - callback(new OSF.DDA.AsyncResult(asyncInitArgs,errorArgs)) - } -}; -OSF.DDA.SyncMethodNames={}; -OSF.DDA.SyncMethodNames.addNames=function(methodNames) + var callback = callArgs[Microsoft.Office.WebExtension.Parameters.Callback]; + if(callback) + { + var asyncInitArgs = {}; + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Context] = callArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; + var errorArgs; + if(status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Value] = payload; + else + { + errorArgs = {}; + payload = payload || OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code] = status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name] = payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message] = payload.message || payload + } + callback(new OSF.DDA.AsyncResult(asyncInitArgs,errorArgs)) + } +}; +OSF.DDA.SyncMethodNames = {}; +OSF.DDA.SyncMethodNames.addNames = function(methodNames) { - for(var entry in methodNames) - { - var am={}; - OSF.OUtil.defineEnumerableProperties(am,{ - id: {value: entry}, - displayName: {value: methodNames[entry]} - }); - OSF.DDA.SyncMethodNames[entry]=am - } -}; -OSF.DDA.SyncMethodCall=function OSF_DDA_SyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) + for(var entry in methodNames) + { + var am = {}; + OSF.OUtil.defineEnumerableProperties(am,{ + id: {value: entry}, + displayName: {value: methodNames[entry]} + }); + OSF.DDA.SyncMethodNames[entry] = am + } +}; +OSF.DDA.SyncMethodCall = function OSF_DDA_SyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { - var requiredCount=requiredParameters.length; - var apiMethods=new OSF.DDA.ApiMethodCall(requiredParameters,supportedOptions,privateStateCallbacks,checkCallArgs,displayName); - function OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) - { - if(userArgs.length > requiredCount+1) - throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); - var options, - parameterCallback; - for(var i=userArgs.length - 1; i >=requiredCount; i--) - { - var argument=userArgs[i]; - switch(typeof argument) - { - case"object": - if(options) - throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); - else - options=argument; - break; - default: - throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); - break - } - } - options=apiMethods.fillOptions(options,requiredArgs,caller,stateInfo); - apiMethods.verifyArguments(supportedOptions,options); - return options - } - this.verifyAndExtractCall=function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) - { - var required=apiMethods.extractRequiredArguments(userArgs,caller,stateInfo); - var options=OSF_DAA_SyncMethodCall$ExtractOptions(userArgs,required,caller,stateInfo); - var callArgs=apiMethods.constructCallArgs(required,options,caller,stateInfo); - return callArgs - } -}; -OSF.DDA.SyncMethodCallFactory=function() + var requiredCount = requiredParameters.length; + var apiMethods = new OSF.DDA.ApiMethodCall(requiredParameters,supportedOptions,privateStateCallbacks,checkCallArgs,displayName); + function OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) + { + if(userArgs.length > requiredCount + 1) + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); + var options, + parameterCallback; + for(var i = userArgs.length - 1; i >= requiredCount; i--) + { + var argument = userArgs[i]; + switch(typeof argument) + { + case"object": + if(options) + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); + else + options = argument; + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); + break + } + } + options = apiMethods.fillOptions(options,requiredArgs,caller,stateInfo); + apiMethods.verifyArguments(supportedOptions,options); + return options + } + this.verifyAndExtractCall = function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) + { + var required = apiMethods.extractRequiredArguments(userArgs,caller,stateInfo); + var options = OSF_DAA_SyncMethodCall$ExtractOptions(userArgs,required,caller,stateInfo); + var callArgs = apiMethods.constructCallArgs(required,options,caller,stateInfo); + return callArgs + } +}; +OSF.DDA.SyncMethodCallFactory = function() { - return{manufacture: function(params) - { - var supportedOptions=params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; - return new OSF.DDA.SyncMethodCall(params.requiredArguments || [],supportedOptions,params.privateStateCallbacks,params.checkCallArgs,params.method.displayName) - }} + return{manufacture: function(params) + { + var supportedOptions = params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + return new OSF.DDA.SyncMethodCall(params.requiredArguments || [],supportedOptions,params.privateStateCallbacks,params.checkCallArgs,params.method.displayName) + }} }(); -OSF.DDA.SyncMethodCalls={}; -OSF.DDA.SyncMethodCalls.define=function(callDefinition) +OSF.DDA.SyncMethodCalls = {}; +OSF.DDA.SyncMethodCalls.define = function(callDefinition) { - OSF.DDA.SyncMethodCalls[callDefinition.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(callDefinition) + OSF.DDA.SyncMethodCalls[callDefinition.method.id] = OSF.DDA.SyncMethodCallFactory.manufacture(callDefinition) }; -OSF.DDA.ListType=function() +OSF.DDA.ListType = function() { - var listTypes={}; - return{ - setListType: function OSF_DDA_ListType$AddListType(t, prop) - { - listTypes[t]=prop - }, - isListType: function OSF_DDA_ListType$IsListType(t) - { - return OSF.OUtil.listContainsKey(listTypes,t) - }, - getDescriptor: function OSF_DDA_ListType$getDescriptor(t) - { - return listTypes[t] - } - } + var listTypes = {}; + return{ + setListType: function OSF_DDA_ListType$AddListType(t, prop) + { + listTypes[t] = prop + }, + isListType: function OSF_DDA_ListType$IsListType(t) + { + return OSF.OUtil.listContainsKey(listTypes,t) + }, + getDescriptor: function OSF_DDA_ListType$getDescriptor(t) + { + return listTypes[t] + } + } }(); -OSF.DDA.HostParameterMap=function(specialProcessor, mappings) +OSF.DDA.HostParameterMap = function(specialProcessor, mappings) { - var toHostMap="toHost"; - var fromHostMap="fromHost"; - var sourceData="sourceData"; - var self="self"; - var dynamicTypes={}; - dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]={ - toHost: function(data) - { - if(data !=null && data.rows !==undefined) - { - var tableData={}; - tableData[OSF.DDA.TableDataProperties.TableRows]=data.rows; - tableData[OSF.DDA.TableDataProperties.TableHeaders]=data.headers; - data=tableData - } - return data - }, - fromHost: function(args) - { - return args - } - }; - dynamicTypes[Microsoft.Office.WebExtension.Parameters.SampleData]=dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]; - function mapValues(preimageSet, mapping) - { - var ret=preimageSet ? {} : undefined; - for(var entry in preimageSet) - { - var preimage=preimageSet[entry]; - var image; - if(OSF.DDA.ListType.isListType(entry)) - { - image=[]; - for(var subEntry in preimage) - image.push(mapValues(preimage[subEntry],mapping)) - } - else if(OSF.OUtil.listContainsKey(dynamicTypes,entry)) - image=dynamicTypes[entry][mapping](preimage); - else if(mapping==fromHostMap && specialProcessor.preserveNesting(entry)) - image=mapValues(preimage,mapping); - else - { - var maps=mappings[entry]; - if(maps) - { - var map=maps[mapping]; - if(map) - { - image=map[preimage]; - if(image===undefined) - image=preimage - } - } - else - image=preimage - } - ret[entry]=image - } - return ret - } - function generateArguments(imageSet, parameters) - { - var ret; - for(var param in parameters) - { - var arg; - if(specialProcessor.isComplexType(param)) - arg=generateArguments(imageSet,mappings[param][toHostMap]); - else - arg=imageSet[param]; - if(arg !=undefined) - { - if(!ret) - ret={}; - var index=parameters[param]; - if(index==self) - index=param; - ret[index]=specialProcessor.pack(param,arg) - } - } - return ret - } - function extractArguments(source, parameters, extracted) - { - if(!extracted) - extracted={}; - for(var param in parameters) - { - var index=parameters[param]; - var value; - if(index==self) - value=source; - else if(index==sourceData) - { - extracted[param]=source.toArray(); - continue - } - else - value=source[index]; - if(value===null || value===undefined) - extracted[param]=undefined; - else - { - value=specialProcessor.unpack(param,value); - var map; - if(specialProcessor.isComplexType(param)) - { - map=mappings[param][fromHostMap]; - if(specialProcessor.preserveNesting(param)) - extracted[param]=extractArguments(value,map); - else - extractArguments(value,map,extracted) - } - else if(OSF.DDA.ListType.isListType(param)) - { - map={}; - var entryDescriptor=OSF.DDA.ListType.getDescriptor(param); - map[entryDescriptor]=self; - var extractedValues=new Array(value.length); - for(var item in value) - extractedValues[item]=extractArguments(value[item],map); - extracted[param]=extractedValues - } - else - extracted[param]=value - } - } - return extracted - } - function applyMap(mapName, preimage, mapping) - { - var parameters=mappings[mapName][mapping]; - var image; - if(mapping=="toHost") - { - var imageSet=mapValues(preimage,mapping); - image=generateArguments(imageSet,parameters) - } - else if(mapping=="fromHost") - { - var argumentSet=extractArguments(preimage,parameters); - image=mapValues(argumentSet,mapping) - } - return image - } - if(!mappings) - mappings={}; - this.addMapping=function(mapName, description) - { - var toHost, - fromHost; - if(description.map) - { - toHost=description.map; - fromHost={}; - for(var preimage in toHost) - { - var image=toHost[preimage]; - if(image==self) - image=preimage; - fromHost[image]=preimage - } - } - else - { - toHost=description.toHost; - fromHost=description.fromHost - } - var pair=mappings[mapName]; - if(pair) - { - var currMap=pair[toHostMap]; - for(var th in currMap) - toHost[th]=currMap[th]; - currMap=pair[fromHostMap]; - for(var fh in currMap) - fromHost[fh]=currMap[fh] - } - else - pair=mappings[mapName]={}; - pair[toHostMap]=toHost; - pair[fromHostMap]=fromHost - }; - this.toHost=function(mapName, preimage) - { - return applyMap(mapName,preimage,toHostMap) - }; - this.fromHost=function(mapName, image) - { - return applyMap(mapName,image,fromHostMap) - }; - this.self=self; - this.sourceData=sourceData; - this.addComplexType=function(ct) - { - specialProcessor.addComplexType(ct) - }; - this.getDynamicType=function(dt) - { - return specialProcessor.getDynamicType(dt) - }; - this.setDynamicType=function(dt, handler) - { - specialProcessor.setDynamicType(dt,handler) - }; - this.dynamicTypes=dynamicTypes; - this.doMapValues=function(preimageSet, mapping) - { - return mapValues(preimageSet,mapping) - } -}; -OSF.DDA.SpecialProcessor=function(complexTypes, dynamicTypes) + var toHostMap = "toHost"; + var fromHostMap = "fromHost"; + var sourceData = "sourceData"; + var self = "self"; + var dynamicTypes = {}; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data] = { + toHost: function(data) + { + if(data != null && data.rows !== undefined) + { + var tableData = {}; + tableData[OSF.DDA.TableDataProperties.TableRows] = data.rows; + tableData[OSF.DDA.TableDataProperties.TableHeaders] = data.headers; + data = tableData + } + return data + }, + fromHost: function(args) + { + return args + } + }; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.SampleData] = dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]; + function mapValues(preimageSet, mapping) + { + var ret = preimageSet ? {} : undefined; + for(var entry in preimageSet) + { + var preimage = preimageSet[entry]; + var image; + if(OSF.DDA.ListType.isListType(entry)) + { + image = []; + for(var subEntry in preimage) + image.push(mapValues(preimage[subEntry],mapping)) + } + else if(OSF.OUtil.listContainsKey(dynamicTypes,entry)) + image = dynamicTypes[entry][mapping](preimage); + else if(mapping == fromHostMap && specialProcessor.preserveNesting(entry)) + image = mapValues(preimage,mapping); + else + { + var maps = mappings[entry]; + if(maps) + { + var map = maps[mapping]; + if(map) + { + image = map[preimage]; + if(image === undefined) + image = preimage + } + } + else + image = preimage + } + ret[entry] = image + } + return ret + } + function generateArguments(imageSet, parameters) + { + var ret; + for(var param in parameters) + { + var arg; + if(specialProcessor.isComplexType(param)) + arg = generateArguments(imageSet,mappings[param][toHostMap]); + else + arg = imageSet[param]; + if(arg != undefined) + { + if(!ret) + ret = {}; + var index = parameters[param]; + if(index == self) + index = param; + ret[index] = specialProcessor.pack(param,arg) + } + } + return ret + } + function extractArguments(source, parameters, extracted) + { + if(!extracted) + extracted = {}; + for(var param in parameters) + { + var index = parameters[param]; + var value; + if(index == self) + value = source; + else if(index == sourceData) + { + extracted[param] = source.toArray(); + continue + } + else + value = source[index]; + if(value === null || value === undefined) + extracted[param] = undefined; + else + { + value = specialProcessor.unpack(param,value); + var map; + if(specialProcessor.isComplexType(param)) + { + map = mappings[param][fromHostMap]; + if(specialProcessor.preserveNesting(param)) + extracted[param] = extractArguments(value,map); + else + extractArguments(value,map,extracted) + } + else if(OSF.DDA.ListType.isListType(param)) + { + map = {}; + var entryDescriptor = OSF.DDA.ListType.getDescriptor(param); + map[entryDescriptor] = self; + var extractedValues = new Array(value.length); + for(var item in value) + extractedValues[item] = extractArguments(value[item],map); + extracted[param] = extractedValues + } + else + extracted[param] = value + } + } + return extracted + } + function applyMap(mapName, preimage, mapping) + { + var parameters = mappings[mapName][mapping]; + var image; + if(mapping == "toHost") + { + var imageSet = mapValues(preimage,mapping); + image = generateArguments(imageSet,parameters) + } + else if(mapping == "fromHost") + { + var argumentSet = extractArguments(preimage,parameters); + image = mapValues(argumentSet,mapping) + } + return image + } + if(!mappings) + mappings = {}; + this.addMapping = function(mapName, description) + { + var toHost, + fromHost; + if(description.map) + { + toHost = description.map; + fromHost = {}; + for(var preimage in toHost) + { + var image = toHost[preimage]; + if(image == self) + image = preimage; + fromHost[image] = preimage + } + } + else + { + toHost = description.toHost; + fromHost = description.fromHost + } + var pair = mappings[mapName]; + if(pair) + { + var currMap = pair[toHostMap]; + for(var th in currMap) + toHost[th] = currMap[th]; + currMap = pair[fromHostMap]; + for(var fh in currMap) + fromHost[fh] = currMap[fh] + } + else + pair = mappings[mapName] = {}; + pair[toHostMap] = toHost; + pair[fromHostMap] = fromHost + }; + this.toHost = function(mapName, preimage) + { + return applyMap(mapName,preimage,toHostMap) + }; + this.fromHost = function(mapName, image) + { + return applyMap(mapName,image,fromHostMap) + }; + this.self = self; + this.sourceData = sourceData; + this.addComplexType = function(ct) + { + specialProcessor.addComplexType(ct) + }; + this.getDynamicType = function(dt) + { + return specialProcessor.getDynamicType(dt) + }; + this.setDynamicType = function(dt, handler) + { + specialProcessor.setDynamicType(dt,handler) + }; + this.dynamicTypes = dynamicTypes; + this.doMapValues = function(preimageSet, mapping) + { + return mapValues(preimageSet,mapping) + } +}; +OSF.DDA.SpecialProcessor = function(complexTypes, dynamicTypes) { - this.addComplexType=function OSF_DDA_SpecialProcessor$addComplexType(ct) - { - complexTypes.push(ct) - }; - this.getDynamicType=function OSF_DDA_SpecialProcessor$getDynamicType(dt) - { - return dynamicTypes[dt] - }; - this.setDynamicType=function OSF_DDA_SpecialProcessor$setDynamicType(dt, handler) - { - dynamicTypes[dt]=handler - }; - this.isComplexType=function OSF_DDA_SpecialProcessor$isComplexType(t) - { - return OSF.OUtil.listContainsValue(complexTypes,t) - }; - this.isDynamicType=function OSF_DDA_SpecialProcessor$isDynamicType(p) - { - return OSF.OUtil.listContainsKey(dynamicTypes,p) - }; - this.preserveNesting=function OSF_DDA_SpecialProcessor$preserveNesting(p) - { - var pn=[]; - if(OSF.DDA.PropertyDescriptors) - pn.push(OSF.DDA.PropertyDescriptors.Subset); - if(OSF.DDA.DataNodeEventProperties) - pn=pn.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]); - return OSF.OUtil.listContainsValue(pn,p) - }; - this.pack=function OSF_DDA_SpecialProcessor$pack(param, arg) - { - var value; - if(this.isDynamicType(param)) - value=dynamicTypes[param].toHost(arg); - else - value=arg; - return value - }; - this.unpack=function OSF_DDA_SpecialProcessor$unpack(param, arg) - { - var value; - if(this.isDynamicType(param)) - value=dynamicTypes[param].fromHost(arg); - else - value=arg; - return value - } -}; -OSF.DDA.getDecoratedParameterMap=function(specialProcessor, initialDefs) + this.addComplexType = function OSF_DDA_SpecialProcessor$addComplexType(ct) + { + complexTypes.push(ct) + }; + this.getDynamicType = function OSF_DDA_SpecialProcessor$getDynamicType(dt) + { + return dynamicTypes[dt] + }; + this.setDynamicType = function OSF_DDA_SpecialProcessor$setDynamicType(dt, handler) + { + dynamicTypes[dt] = handler + }; + this.isComplexType = function OSF_DDA_SpecialProcessor$isComplexType(t) + { + return OSF.OUtil.listContainsValue(complexTypes,t) + }; + this.isDynamicType = function OSF_DDA_SpecialProcessor$isDynamicType(p) + { + return OSF.OUtil.listContainsKey(dynamicTypes,p) + }; + this.preserveNesting = function OSF_DDA_SpecialProcessor$preserveNesting(p) + { + var pn = []; + if(OSF.DDA.PropertyDescriptors) + pn.push(OSF.DDA.PropertyDescriptors.Subset); + if(OSF.DDA.DataNodeEventProperties) + pn = pn.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]); + return OSF.OUtil.listContainsValue(pn,p) + }; + this.pack = function OSF_DDA_SpecialProcessor$pack(param, arg) + { + var value; + if(this.isDynamicType(param)) + value = dynamicTypes[param].toHost(arg); + else + value = arg; + return value + }; + this.unpack = function OSF_DDA_SpecialProcessor$unpack(param, arg) + { + var value; + if(this.isDynamicType(param)) + value = dynamicTypes[param].fromHost(arg); + else + value = arg; + return value + } +}; +OSF.DDA.getDecoratedParameterMap = function(specialProcessor, initialDefs) { - var parameterMap=new OSF.DDA.HostParameterMap(specialProcessor); - var self=parameterMap.self; - function createObject(properties) - { - var obj=null; - if(properties) - { - obj={}; - var len=properties.length; - for(var i=0; i < len; i++) - obj[properties[i].name]=properties[i].value - } - return obj - } - parameterMap.define=function define(definition) - { - var args={}; - var toHost=createObject(definition.toHost); - if(definition.invertible) - args.map=toHost; - else if(definition.canonical) - args.toHost=args.fromHost=toHost; - else - { - args.toHost=toHost; - args.fromHost=createObject(definition.fromHost) - } - parameterMap.addMapping(definition.type,args); - if(definition.isComplexType) - parameterMap.addComplexType(definition.type) - }; - for(var id in initialDefs) - parameterMap.define(initialDefs[id]); - return parameterMap + var parameterMap = new OSF.DDA.HostParameterMap(specialProcessor); + var self = parameterMap.self; + function createObject(properties) + { + var obj = null; + if(properties) + { + obj = {}; + var len = properties.length; + for(var i = 0; i < len; i++) + obj[properties[i].name] = properties[i].value + } + return obj + } + parameterMap.define = function define(definition) + { + var args = {}; + var toHost = createObject(definition.toHost); + if(definition.invertible) + args.map = toHost; + else if(definition.canonical) + args.toHost = args.fromHost = toHost; + else + { + args.toHost = toHost; + args.fromHost = createObject(definition.fromHost) + } + parameterMap.addMapping(definition.type,args); + if(definition.isComplexType) + parameterMap.addComplexType(definition.type) + }; + for(var id in initialDefs) + parameterMap.define(initialDefs[id]); + return parameterMap }; OSF.OUtil.setNamespace("DispIdHost",OSF.DDA); -OSF.DDA.DispIdHost.Methods={ - InvokeMethod: "invokeMethod", - AddEventHandler: "addEventHandler", - RemoveEventHandler: "removeEventHandler", - OpenDialog: "openDialog", - CloseDialog: "closeDialog", - MessageParent: "messageParent", - SendMessage: "sendMessage" -}; -OSF.DDA.DispIdHost.Delegates={ - ExecuteAsync: "executeAsync", - RegisterEventAsync: "registerEventAsync", - UnregisterEventAsync: "unregisterEventAsync", - ParameterMap: "parameterMap", - OpenDialog: "openDialog", - CloseDialog: "closeDialog", - MessageParent: "messageParent", - SendMessage: "sendMessage" -}; -OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, parameterMap) +OSF.DDA.DispIdHost.Methods = { + InvokeMethod: "invokeMethod", + AddEventHandler: "addEventHandler", + RemoveEventHandler: "removeEventHandler", + OpenDialog: "openDialog", + CloseDialog: "closeDialog", + MessageParent: "messageParent", + SendMessage: "sendMessage" +}; +OSF.DDA.DispIdHost.Delegates = { + ExecuteAsync: "executeAsync", + RegisterEventAsync: "registerEventAsync", + UnregisterEventAsync: "unregisterEventAsync", + ParameterMap: "parameterMap", + OpenDialog: "openDialog", + CloseDialog: "closeDialog", + MessageParent: "messageParent", + SendMessage: "sendMessage" +}; +OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethods, parameterMap) { - var dispIdMap={}; - var jsom=OSF.DDA.AsyncMethodNames; - var did=OSF.DDA.MethodDispId; - var methodMap={ - GoToByIdAsync: did.dispidNavigateToMethod, - GetSelectedDataAsync: did.dispidGetSelectedDataMethod, - SetSelectedDataAsync: did.dispidSetSelectedDataMethod, - GetDocumentCopyChunkAsync: did.dispidGetDocumentCopyChunkMethod, - ReleaseDocumentCopyAsync: did.dispidReleaseDocumentCopyMethod, - GetDocumentCopyAsync: did.dispidGetDocumentCopyMethod, - AddFromSelectionAsync: did.dispidAddBindingFromSelectionMethod, - AddFromPromptAsync: did.dispidAddBindingFromPromptMethod, - AddFromNamedItemAsync: did.dispidAddBindingFromNamedItemMethod, - GetAllAsync: did.dispidGetAllBindingsMethod, - GetByIdAsync: did.dispidGetBindingMethod, - ReleaseByIdAsync: did.dispidReleaseBindingMethod, - GetDataAsync: did.dispidGetBindingDataMethod, - SetDataAsync: did.dispidSetBindingDataMethod, - AddRowsAsync: did.dispidAddRowsMethod, - AddColumnsAsync: did.dispidAddColumnsMethod, - DeleteAllDataValuesAsync: did.dispidClearAllRowsMethod, - RefreshAsync: did.dispidLoadSettingsMethod, - SaveAsync: did.dispidSaveSettingsMethod, - GetActiveViewAsync: did.dispidGetActiveViewMethod, - GetFilePropertiesAsync: did.dispidGetFilePropertiesMethod, - GetOfficeThemeAsync: did.dispidGetOfficeThemeMethod, - GetDocumentThemeAsync: did.dispidGetDocumentThemeMethod, - ClearFormatsAsync: did.dispidClearFormatsMethod, - SetTableOptionsAsync: did.dispidSetTableOptionsMethod, - SetFormatsAsync: did.dispidSetFormatsMethod, - ExecuteRichApiRequestAsync: did.dispidExecuteRichApiRequestMethod, - AppCommandInvocationCompletedAsync: did.dispidAppCommandInvocationCompletedMethod, - CloseContainerAsync: did.dispidCloseContainerMethod, - AddDataPartAsync: did.dispidAddDataPartMethod, - GetDataPartByIdAsync: did.dispidGetDataPartByIdMethod, - GetDataPartsByNameSpaceAsync: did.dispidGetDataPartsByNamespaceMethod, - GetPartXmlAsync: did.dispidGetDataPartXmlMethod, - GetPartNodesAsync: did.dispidGetDataPartNodesMethod, - DeleteDataPartAsync: did.dispidDeleteDataPartMethod, - GetNodeValueAsync: did.dispidGetDataNodeValueMethod, - GetNodeXmlAsync: did.dispidGetDataNodeXmlMethod, - GetRelativeNodesAsync: did.dispidGetDataNodesMethod, - SetNodeValueAsync: did.dispidSetDataNodeValueMethod, - SetNodeXmlAsync: did.dispidSetDataNodeXmlMethod, - AddDataPartNamespaceAsync: did.dispidAddDataNamespaceMethod, - GetDataPartNamespaceAsync: did.dispidGetDataUriByPrefixMethod, - GetDataPartPrefixAsync: did.dispidGetDataPrefixByUriMethod, - GetNodeTextAsync: did.dispidGetDataNodeTextMethod, - SetNodeTextAsync: did.dispidSetDataNodeTextMethod, - GetSelectedTask: did.dispidGetSelectedTaskMethod, - GetTask: did.dispidGetTaskMethod, - GetWSSUrl: did.dispidGetWSSUrlMethod, - GetTaskField: did.dispidGetTaskFieldMethod, - GetSelectedResource: did.dispidGetSelectedResourceMethod, - GetResourceField: did.dispidGetResourceFieldMethod, - GetProjectField: did.dispidGetProjectFieldMethod, - GetSelectedView: did.dispidGetSelectedViewMethod, - GetTaskByIndex: did.dispidGetTaskByIndexMethod, - GetResourceByIndex: did.dispidGetResourceByIndexMethod, - SetTaskField: did.dispidSetTaskFieldMethod, - SetResourceField: did.dispidSetResourceFieldMethod, - GetMaxTaskIndex: did.dispidGetMaxTaskIndexMethod, - GetMaxResourceIndex: did.dispidGetMaxResourceIndexMethod, - CreateTask: did.dispidCreateTaskMethod - }; - for(var method in methodMap) - if(jsom[method]) - dispIdMap[jsom[method].id]=methodMap[method]; - jsom=OSF.DDA.SyncMethodNames; - did=OSF.DDA.MethodDispId; - var asyncMethodMap={ - MessageParent: did.dispidMessageParentMethod, - SendMessage: did.dispidSendMessageMethod - }; - for(var method in asyncMethodMap) - if(jsom[method]) - dispIdMap[jsom[method].id]=asyncMethodMap[method]; - jsom=Microsoft.Office.WebExtension.EventType; - did=OSF.DDA.EventDispId; - var eventMap={ - SettingsChanged: did.dispidSettingsChangedEvent, - DocumentSelectionChanged: did.dispidDocumentSelectionChangedEvent, - BindingSelectionChanged: did.dispidBindingSelectionChangedEvent, - BindingDataChanged: did.dispidBindingDataChangedEvent, - ActiveViewChanged: did.dispidActiveViewChangedEvent, - OfficeThemeChanged: did.dispidOfficeThemeChangedEvent, - DocumentThemeChanged: did.dispidDocumentThemeChangedEvent, - AppCommandInvoked: did.dispidAppCommandInvokedEvent, - DialogMessageReceived: did.dispidDialogMessageReceivedEvent, - DialogParentMessageReceived: did.dispidDialogParentMessageReceivedEvent, - ItemChanged: did.dispidOlkItemSelectedChangedEvent, - TaskSelectionChanged: did.dispidTaskSelectionChangedEvent, - ResourceSelectionChanged: did.dispidResourceSelectionChangedEvent, - ViewSelectionChanged: did.dispidViewSelectionChangedEvent, - DataNodeInserted: did.dispidDataNodeAddedEvent, - DataNodeReplaced: did.dispidDataNodeReplacedEvent, - DataNodeDeleted: did.dispidDataNodeDeletedEvent - }; - for(var event in eventMap) - if(jsom[event]) - dispIdMap[jsom[event]]=eventMap[event]; - function onException(ex, asyncMethodCall, suppliedArgs, callArgs) - { - if(typeof ex=="number") - { - if(!callArgs) - callArgs=asyncMethodCall.getCallArgs(suppliedArgs); - OSF.DDA.issueAsyncResult(callArgs,ex,OSF.DDA.ErrorCodeManager.getErrorArgs(ex)) - } - else - throw ex; - } - this[OSF.DDA.DispIdHost.Methods.InvokeMethod]=function OSF_DDA_DispIdHost_Facade$InvokeMethod(method, suppliedArguments, caller, privateState) - { - var callArgs; - try - { - var methodName=method.id; - var asyncMethodCall=OSF.DDA.AsyncMethodCalls[methodName]; - callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,privateState); - var dispId=dispIdMap[methodName]; - var delegate=getDelegateMethods(methodName); - var richApiInExcelMethodSubstitution=null; - if(window.Excel && window.Office.context.requirements.isSetSupported("RedirectV1Api")) - window.Excel._RedirectV1APIs=true; - if(window.Excel && window.Excel._RedirectV1APIs && (richApiInExcelMethodSubstitution=window.Excel._V1APIMap[methodName])) - { - if(richApiInExcelMethodSubstitution.preprocess) - callArgs=richApiInExcelMethodSubstitution.preprocess(callArgs); - var ctx=new window.Excel.RequestContext; - var result=richApiInExcelMethodSubstitution.call(ctx,callArgs); - ctx.sync().then(function() - { - var response=result.value; - var status=response.status; - delete response["status"]; - delete response["@odata.type"]; - if(richApiInExcelMethodSubstitution.postprocess) - response=richApiInExcelMethodSubstitution.postprocess(response,callArgs); - if(status !=0) - response=OSF.DDA.ErrorCodeManager.getErrorArgs(status); - OSF.DDA.issueAsyncResult(callArgs,status,response) - })["catch"](function(error) - { - OSF.DDA.issueAsyncResult(callArgs,OSF.DDA.ErrorCodeManager.errorCodes.ooeFailure,null) - }) - } - else - { - var hostCallArgs; - if(parameterMap.toHost) - hostCallArgs=parameterMap.toHost(dispId,callArgs); - else - hostCallArgs=callArgs; - delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ - dispId: dispId, - hostCallArgs: hostCallArgs, - onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling(){}, - onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving(){}, - onComplete: function(status, hostResponseArgs) - { - var responseArgs; - if(status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - if(parameterMap.fromHost) - responseArgs=parameterMap.fromHost(dispId,hostResponseArgs); - else - responseArgs=hostResponseArgs; - else - responseArgs=hostResponseArgs; - var payload=asyncMethodCall.processResponse(status,responseArgs,caller,callArgs); - OSF.DDA.issueAsyncResult(callArgs,status,payload) - } - }) - } - } - catch(ex) - { - onException(ex,asyncMethodCall,suppliedArguments,callArgs) - } - }; - this[OSF.DDA.DispIdHost.Methods.AddEventHandler]=function OSF_DDA_DispIdHost_Facade$AddEventHandler(suppliedArguments, eventDispatch, caller, isPopupWindow) - { - var callArgs; - var eventType, - handler; - function onEnsureRegistration(status) - { - if(status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - { - var added=eventDispatch.addEventHandler(eventType,handler); - if(!added) - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed - } - var error; - if(status !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - error=OSF.DDA.ErrorCodeManager.getErrorArgs(status); - OSF.DDA.issueAsyncResult(callArgs,status,error) - } - try - { - var asyncMethodCall=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id]; - callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); - eventType=callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; - handler=callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; - if(isPopupWindow) - { - onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); - return - } - if(eventDispatch.getEventHandlerCount(eventType)==0) - { - var dispId=dispIdMap[eventType]; - var invoker=getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; - invoker({ - eventType: eventType, - dispId: dispId, - targetId: caller.id || "", - onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) - }, - onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) - }, - onComplete: onEnsureRegistration, - onEvent: function handleEvent(hostArgs) - { - var args=parameterMap.fromHost(dispId,hostArgs); - eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType,caller,args)) - } - }) - } - else - onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - } - catch(ex) - { - onException(ex,asyncMethodCall,suppliedArguments,callArgs) - } - }; - this[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]=function OSF_DDA_DispIdHost_Facade$RemoveEventHandler(suppliedArguments, eventDispatch, caller) - { - var callArgs; - var eventType, - handler; - function onEnsureRegistration(status) - { - var error; - if(status !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - error=OSF.DDA.ErrorCodeManager.getErrorArgs(status); - OSF.DDA.issueAsyncResult(callArgs,status,error) - } - try - { - var asyncMethodCall=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id]; - callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); - eventType=callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; - handler=callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; - var status, - removeSuccess; - if(handler===null) - { - removeSuccess=eventDispatch.clearEventHandlers(eventType); - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess - } - else - { - removeSuccess=eventDispatch.removeEventHandler(eventType,handler); - status=removeSuccess ? OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess : OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist - } - if(removeSuccess && eventDispatch.getEventHandlerCount(eventType)==0) - { - var dispId=dispIdMap[eventType]; - var invoker=getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; - invoker({ - eventType: eventType, - dispId: dispId, - targetId: caller.id || "", - onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) - }, - onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) - }, - onComplete: onEnsureRegistration - }) - } - else - onEnsureRegistration(status) - } - catch(ex) - { - onException(ex,asyncMethodCall,suppliedArguments,callArgs) - } - }; - this[OSF.DDA.DispIdHost.Methods.OpenDialog]=function OSF_DDA_DispIdHost_Facade$OpenDialog(suppliedArguments, eventDispatch, caller) - { - var callArgs; - var targetId; - var dialogMessageEvent=Microsoft.Office.WebExtension.EventType.DialogMessageReceived; - var dialogOtherEvent=Microsoft.Office.WebExtension.EventType.DialogEventReceived; - function onEnsureRegistration(status) - { - var payload; - if(status !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - payload=OSF.DDA.ErrorCodeManager.getErrorArgs(status); - else - { - var onSucceedArgs={}; - onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Id]=targetId; - onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Data]=eventDispatch; - var payload=asyncMethodCall.processResponse(status,onSucceedArgs,caller,callArgs); - OSF.DialogShownStatus.hasDialogShown=true; - eventDispatch.clearEventHandlers(dialogMessageEvent); - eventDispatch.clearEventHandlers(dialogOtherEvent) - } - OSF.DDA.issueAsyncResult(callArgs,status,payload) - } - try - { - if(dialogMessageEvent==undefined || dialogOtherEvent==undefined) - onEnsureRegistration(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported); - if(OSF.DDA.AsyncMethodNames.DisplayDialogAsync==null) - { - onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); - return - } - var asyncMethodCall=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id]; - callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); - var dispId=dispIdMap[dialogMessageEvent]; - var delegateMethods=getDelegateMethods(dialogMessageEvent); - var invoker=delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] !=undefined ? delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] : delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; - targetId=JSON.stringify(callArgs); - if(!OSF.DialogShownStatus.hasDialogShown) - { - eventDispatch.clearQueuedEvent(dialogMessageEvent); - eventDispatch.clearQueuedEvent(dialogOtherEvent); - eventDispatch.clearQueuedEvent(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived) - } - invoker({ - eventType: dialogMessageEvent, - dispId: dispId, - targetId: targetId, - onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) - }, - onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) - }, - onComplete: onEnsureRegistration, - onEvent: function handleEvent(hostArgs) - { - var args=parameterMap.fromHost(dispId,hostArgs); - var event=OSF.DDA.OMFactory.manufactureEventArgs(dialogMessageEvent,caller,args); - if(event.type==dialogOtherEvent) - { - var payload=OSF.DDA.ErrorCodeManager.getErrorArgs(event.error); - var errorArgs={}; - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=payload.name || payload; - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=payload.message || payload; - event.error=new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]) - } - eventDispatch.fireOrQueueEvent(event); - if(args[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogClosed) - { - eventDispatch.clearEventHandlers(dialogMessageEvent); - eventDispatch.clearEventHandlers(dialogOtherEvent); - eventDispatch.clearEventHandlers(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived); - OSF.DialogShownStatus.hasDialogShown=false - } - } - }) - } - catch(ex) - { - onException(ex,asyncMethodCall,suppliedArguments,callArgs) - } - }; - this[OSF.DDA.DispIdHost.Methods.CloseDialog]=function OSF_DDA_DispIdHost_Facade$CloseDialog(suppliedArguments, targetId, eventDispatch, caller) - { - var callArgs; - var dialogMessageEvent, - dialogOtherEvent; - var closeStatus=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; - function closeCallback(status) - { - closeStatus=status; - OSF.DialogShownStatus.hasDialogShown=false - } - try - { - var asyncMethodCall=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id]; - callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); - dialogMessageEvent=Microsoft.Office.WebExtension.EventType.DialogMessageReceived; - dialogOtherEvent=Microsoft.Office.WebExtension.EventType.DialogEventReceived; - eventDispatch.clearEventHandlers(dialogMessageEvent); - eventDispatch.clearEventHandlers(dialogOtherEvent); - var dispId=dispIdMap[dialogMessageEvent]; - var delegateMethods=getDelegateMethods(dialogMessageEvent); - var invoker=delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] !=undefined ? delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] : delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; - invoker({ - eventType: dialogMessageEvent, - dispId: dispId, - targetId: targetId, - onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) - }, - onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) - }, - onComplete: closeCallback - }) - } - catch(ex) - { - onException(ex,asyncMethodCall,suppliedArguments,callArgs) - } - if(closeStatus !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed,OSF.DDA.AsyncMethodNames.CloseAsync.displayName,closeStatus); - }; - this[OSF.DDA.DispIdHost.Methods.MessageParent]=function OSF_DDA_DispIdHost_Facade$MessageParent(suppliedArguments, caller) - { - var stateInfo={}; - var syncMethodCall=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id]; - var callArgs=syncMethodCall.verifyAndExtractCall(suppliedArguments,caller,stateInfo); - var delegate=getDelegateMethods(OSF.DDA.SyncMethodNames.MessageParent.id); - var invoker=delegate[OSF.DDA.DispIdHost.Delegates.MessageParent]; - var dispId=dispIdMap[OSF.DDA.SyncMethodNames.MessageParent.id]; - return invoker({ - dispId: dispId, - hostCallArgs: callArgs, - onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) - }, - onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) - } - }) - }; - this[OSF.DDA.DispIdHost.Methods.SendMessage]=function OSF_DDA_DispIdHost_Facade$SendMessage(suppliedArguments, eventDispatch, caller) - { - var stateInfo={}; - var syncMethodCall=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.SendMessage.id]; - var callArgs=syncMethodCall.verifyAndExtractCall(suppliedArguments,caller,stateInfo); - var delegate=getDelegateMethods(OSF.DDA.SyncMethodNames.SendMessage.id); - var invoker=delegate[OSF.DDA.DispIdHost.Delegates.SendMessage]; - var dispId=dispIdMap[OSF.DDA.SyncMethodNames.SendMessage.id]; - return invoker({ - dispId: dispId, - hostCallArgs: callArgs, - onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) - }, - onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) - } - }) - } -}; -OSF.DDA.DispIdHost.addAsyncMethods=function OSF_DDA_DispIdHost$AddAsyncMethods(target, asyncMethodNames, privateState) + var dispIdMap = {}; + var jsom = OSF.DDA.AsyncMethodNames; + var did = OSF.DDA.MethodDispId; + var methodMap = { + GoToByIdAsync: did.dispidNavigateToMethod, + GetSelectedDataAsync: did.dispidGetSelectedDataMethod, + SetSelectedDataAsync: did.dispidSetSelectedDataMethod, + GetDocumentCopyChunkAsync: did.dispidGetDocumentCopyChunkMethod, + ReleaseDocumentCopyAsync: did.dispidReleaseDocumentCopyMethod, + GetDocumentCopyAsync: did.dispidGetDocumentCopyMethod, + AddFromSelectionAsync: did.dispidAddBindingFromSelectionMethod, + AddFromPromptAsync: did.dispidAddBindingFromPromptMethod, + AddFromNamedItemAsync: did.dispidAddBindingFromNamedItemMethod, + GetAllAsync: did.dispidGetAllBindingsMethod, + GetByIdAsync: did.dispidGetBindingMethod, + ReleaseByIdAsync: did.dispidReleaseBindingMethod, + GetDataAsync: did.dispidGetBindingDataMethod, + SetDataAsync: did.dispidSetBindingDataMethod, + AddRowsAsync: did.dispidAddRowsMethod, + AddColumnsAsync: did.dispidAddColumnsMethod, + DeleteAllDataValuesAsync: did.dispidClearAllRowsMethod, + RefreshAsync: did.dispidLoadSettingsMethod, + SaveAsync: did.dispidSaveSettingsMethod, + GetActiveViewAsync: did.dispidGetActiveViewMethod, + GetFilePropertiesAsync: did.dispidGetFilePropertiesMethod, + GetOfficeThemeAsync: did.dispidGetOfficeThemeMethod, + GetDocumentThemeAsync: did.dispidGetDocumentThemeMethod, + ClearFormatsAsync: did.dispidClearFormatsMethod, + SetTableOptionsAsync: did.dispidSetTableOptionsMethod, + SetFormatsAsync: did.dispidSetFormatsMethod, + GetAccessTokenAsync: did.dispidGetAccessTokenMethod, + ExecuteRichApiRequestAsync: did.dispidExecuteRichApiRequestMethod, + AppCommandInvocationCompletedAsync: did.dispidAppCommandInvocationCompletedMethod, + CloseContainerAsync: did.dispidCloseContainerMethod, + OpenBrowserWindow: did.dispidOpenBrowserWindow, + AddDataPartAsync: did.dispidAddDataPartMethod, + GetDataPartByIdAsync: did.dispidGetDataPartByIdMethod, + GetDataPartsByNameSpaceAsync: did.dispidGetDataPartsByNamespaceMethod, + GetPartXmlAsync: did.dispidGetDataPartXmlMethod, + GetPartNodesAsync: did.dispidGetDataPartNodesMethod, + DeleteDataPartAsync: did.dispidDeleteDataPartMethod, + GetNodeValueAsync: did.dispidGetDataNodeValueMethod, + GetNodeXmlAsync: did.dispidGetDataNodeXmlMethod, + GetRelativeNodesAsync: did.dispidGetDataNodesMethod, + SetNodeValueAsync: did.dispidSetDataNodeValueMethod, + SetNodeXmlAsync: did.dispidSetDataNodeXmlMethod, + AddDataPartNamespaceAsync: did.dispidAddDataNamespaceMethod, + GetDataPartNamespaceAsync: did.dispidGetDataUriByPrefixMethod, + GetDataPartPrefixAsync: did.dispidGetDataPrefixByUriMethod, + GetNodeTextAsync: did.dispidGetDataNodeTextMethod, + SetNodeTextAsync: did.dispidSetDataNodeTextMethod, + GetSelectedTask: did.dispidGetSelectedTaskMethod, + GetTask: did.dispidGetTaskMethod, + GetWSSUrl: did.dispidGetWSSUrlMethod, + GetTaskField: did.dispidGetTaskFieldMethod, + GetSelectedResource: did.dispidGetSelectedResourceMethod, + GetResourceField: did.dispidGetResourceFieldMethod, + GetProjectField: did.dispidGetProjectFieldMethod, + GetSelectedView: did.dispidGetSelectedViewMethod, + GetTaskByIndex: did.dispidGetTaskByIndexMethod, + GetResourceByIndex: did.dispidGetResourceByIndexMethod, + SetTaskField: did.dispidSetTaskFieldMethod, + SetResourceField: did.dispidSetResourceFieldMethod, + GetMaxTaskIndex: did.dispidGetMaxTaskIndexMethod, + GetMaxResourceIndex: did.dispidGetMaxResourceIndexMethod, + CreateTask: did.dispidCreateTaskMethod + }; + for(var method in methodMap) + if(jsom[method]) + dispIdMap[jsom[method].id] = methodMap[method]; + jsom = OSF.DDA.SyncMethodNames; + did = OSF.DDA.MethodDispId; + var syncMethodMap = { + MessageParent: did.dispidMessageParentMethod, + SendMessage: did.dispidSendMessageMethod + }; + for(var method in syncMethodMap) + if(jsom[method]) + dispIdMap[jsom[method].id] = syncMethodMap[method]; + jsom = Microsoft.Office.WebExtension.EventType; + did = OSF.DDA.EventDispId; + var eventMap = { + SettingsChanged: did.dispidSettingsChangedEvent, + DocumentSelectionChanged: did.dispidDocumentSelectionChangedEvent, + BindingSelectionChanged: did.dispidBindingSelectionChangedEvent, + BindingDataChanged: did.dispidBindingDataChangedEvent, + ActiveViewChanged: did.dispidActiveViewChangedEvent, + OfficeThemeChanged: did.dispidOfficeThemeChangedEvent, + DocumentThemeChanged: did.dispidDocumentThemeChangedEvent, + AppCommandInvoked: did.dispidAppCommandInvokedEvent, + DialogMessageReceived: did.dispidDialogMessageReceivedEvent, + DialogParentMessageReceived: did.dispidDialogParentMessageReceivedEvent, + ObjectDeleted: did.dispidObjectDeletedEvent, + ObjectSelectionChanged: did.dispidObjectSelectionChangedEvent, + ObjectDataChanged: did.dispidObjectDataChangedEvent, + ContentControlAdded: did.dispidContentControlAddedEvent, + RichApiMessage: did.dispidRichApiMessageEvent, + ItemChanged: did.dispidOlkItemSelectedChangedEvent, + RecipientsChanged: did.dispidOlkRecipientsChangedEvent, + AppointmentTimeChanged: did.dispidOlkAppointmentTimeChangedEvent, + TaskSelectionChanged: did.dispidTaskSelectionChangedEvent, + ResourceSelectionChanged: did.dispidResourceSelectionChangedEvent, + ViewSelectionChanged: did.dispidViewSelectionChangedEvent, + DataNodeInserted: did.dispidDataNodeAddedEvent, + DataNodeReplaced: did.dispidDataNodeReplacedEvent, + DataNodeDeleted: did.dispidDataNodeDeletedEvent + }; + for(var event in eventMap) + if(jsom[event]) + dispIdMap[jsom[event]] = eventMap[event]; + function IsObjectEvent(dispId) + { + return dispId == OSF.DDA.EventDispId.dispidObjectDeletedEvent || dispId == OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent || dispId == OSF.DDA.EventDispId.dispidObjectDataChangedEvent || dispId == OSF.DDA.EventDispId.dispidContentControlAddedEvent + } + function onException(ex, asyncMethodCall, suppliedArgs, callArgs) + { + if(typeof ex == "number") + { + if(!callArgs) + callArgs = asyncMethodCall.getCallArgs(suppliedArgs); + OSF.DDA.issueAsyncResult(callArgs,ex,OSF.DDA.ErrorCodeManager.getErrorArgs(ex)) + } + else + throw ex; + } + this[OSF.DDA.DispIdHost.Methods.InvokeMethod] = function OSF_DDA_DispIdHost_Facade$InvokeMethod(method, suppliedArguments, caller, privateState) + { + var callArgs; + try + { + var methodName = method.id; + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[methodName]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,privateState); + var dispId = dispIdMap[methodName]; + var delegate = getDelegateMethods(methodName); + var richApiInExcelMethodSubstitution = null; + if(window.Excel && window.Office.context.requirements.isSetSupported("RedirectV1Api")) + window.Excel._RedirectV1APIs = true; + if(window.Excel && window.Excel._RedirectV1APIs && (richApiInExcelMethodSubstitution = window.Excel._V1APIMap[methodName])) + { + var preprocessedCallArgs = OSF.OUtil.shallowCopy(callArgs); + delete preprocessedCallArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; + if(richApiInExcelMethodSubstitution.preprocess) + preprocessedCallArgs = richApiInExcelMethodSubstitution.preprocess(preprocessedCallArgs); + var ctx = new window.Excel.RequestContext; + var result = richApiInExcelMethodSubstitution.call(ctx,preprocessedCallArgs); + ctx.sync().then(function() + { + var response = result.value; + var status = response.status; + delete response["status"]; + delete response["@odata.type"]; + if(richApiInExcelMethodSubstitution.postprocess) + response = richApiInExcelMethodSubstitution.postprocess(response,preprocessedCallArgs); + if(status != 0) + response = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + OSF.DDA.issueAsyncResult(callArgs,status,response) + })["catch"](function(error) + { + OSF.DDA.issueAsyncResult(callArgs,OSF.DDA.ErrorCodeManager.errorCodes.ooeFailure,null) + }) + } + else + { + var hostCallArgs; + if(parameterMap.toHost) + hostCallArgs = parameterMap.toHost(dispId,callArgs); + else + hostCallArgs = callArgs; + var startTime = (new Date).getTime(); + delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ + dispId: dispId, + hostCallArgs: hostCallArgs, + onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling(){}, + onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving(){}, + onComplete: function(status, hostResponseArgs) + { + var responseArgs; + if(status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + if(parameterMap.fromHost) + responseArgs = parameterMap.fromHost(dispId,hostResponseArgs); + else + responseArgs = hostResponseArgs; + else + responseArgs = hostResponseArgs; + var payload = asyncMethodCall.processResponse(status,responseArgs,caller,callArgs); + OSF.DDA.issueAsyncResult(callArgs,status,payload); + if(OSF.AppTelemetry) + OSF.AppTelemetry.onMethodDone(dispId,hostCallArgs,Math.abs((new Date).getTime() - startTime),status) + } + }) + } + } + catch(ex) + { + onException(ex,asyncMethodCall,suppliedArguments,callArgs) + } + }; + this[OSF.DDA.DispIdHost.Methods.AddEventHandler] = function OSF_DDA_DispIdHost_Facade$AddEventHandler(suppliedArguments, eventDispatch, caller, isPopupWindow) + { + var callArgs; + var eventType, + handler; + var isObjectEvent = false; + function onEnsureRegistration(status) + { + if(status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + { + var added = !isObjectEvent ? eventDispatch.addEventHandler(eventType,handler) : eventDispatch.addObjectEventHandler(eventType,callArgs[Microsoft.Office.WebExtension.Parameters.Id],handler); + if(!added) + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed + } + var error; + if(status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + error = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + OSF.DDA.issueAsyncResult(callArgs,status,error) + } + try + { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); + eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + if(isPopupWindow) + { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + return + } + var dispId = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId); + var targetId = isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : caller.id || ""; + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType,targetId) : eventDispatch.getEventHandlerCount(eventType); + if(count == 0) + { + var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; + invoker({ + eventType: eventType, + dispId: dispId, + targetId: targetId, + onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) + }, + onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) + }, + onComplete: onEnsureRegistration, + onEvent: function handleEvent(hostArgs) + { + var args = parameterMap.fromHost(dispId,hostArgs); + if(!isObjectEvent) + eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType,caller,args)); + else + eventDispatch.fireObjectEvent(targetId,OSF.DDA.OMFactory.manufactureEventArgs(eventType,targetId,args)) + } + }) + } + else + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + } + catch(ex) + { + onException(ex,asyncMethodCall,suppliedArguments,callArgs) + } + }; + this[OSF.DDA.DispIdHost.Methods.RemoveEventHandler] = function OSF_DDA_DispIdHost_Facade$RemoveEventHandler(suppliedArguments, eventDispatch, caller) + { + var callArgs; + var eventType, + handler; + var isObjectEvent = false; + function onEnsureRegistration(status) + { + var error; + if(status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + error = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + OSF.DDA.issueAsyncResult(callArgs,status,error) + } + try + { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); + eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + var dispId = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId); + var targetId = isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : caller.id || ""; + var status, + removeSuccess; + if(handler === null) + { + removeSuccess = isObjectEvent ? eventDispatch.clearObjectEventHandlers(eventType,targetId) : eventDispatch.clearEventHandlers(eventType); + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess + } + else + { + removeSuccess = isObjectEvent ? eventDispatch.removeObjectEventHandler(eventType,targetId,handler) : eventDispatch.removeEventHandler(eventType,handler); + status = removeSuccess ? OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess : OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist + } + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType,targetId) : eventDispatch.getEventHandlerCount(eventType); + if(removeSuccess && count == 0) + { + var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; + invoker({ + eventType: eventType, + dispId: dispId, + targetId: targetId, + onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) + }, + onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) + }, + onComplete: onEnsureRegistration + }) + } + else + onEnsureRegistration(status) + } + catch(ex) + { + onException(ex,asyncMethodCall,suppliedArguments,callArgs) + } + }; + this[OSF.DDA.DispIdHost.Methods.OpenDialog] = function OSF_DDA_DispIdHost_Facade$OpenDialog(suppliedArguments, eventDispatch, caller) + { + var callArgs; + var targetId; + var dialogMessageEvent = Microsoft.Office.WebExtension.EventType.DialogMessageReceived; + var dialogOtherEvent = Microsoft.Office.WebExtension.EventType.DialogEventReceived; + function onEnsureRegistration(status) + { + var payload; + if(status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + payload = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + else + { + var onSucceedArgs = {}; + onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Id] = targetId; + onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Data] = eventDispatch; + var payload = asyncMethodCall.processResponse(status,onSucceedArgs,caller,callArgs); + OSF.DialogShownStatus.hasDialogShown = true; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent) + } + OSF.DDA.issueAsyncResult(callArgs,status,payload) + } + try + { + if(dialogMessageEvent == undefined || dialogOtherEvent == undefined) + onEnsureRegistration(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported); + if(OSF.DDA.AsyncMethodNames.DisplayDialogAsync == null) + { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + return + } + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); + var dispId = dispIdMap[dialogMessageEvent]; + var delegateMethods = getDelegateMethods(dialogMessageEvent); + var invoker = delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] != undefined ? delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] : delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; + targetId = JSON.stringify(callArgs); + if(!OSF.DialogShownStatus.hasDialogShown) + { + eventDispatch.clearQueuedEvent(dialogMessageEvent); + eventDispatch.clearQueuedEvent(dialogOtherEvent); + eventDispatch.clearQueuedEvent(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived) + } + invoker({ + eventType: dialogMessageEvent, + dispId: dispId, + targetId: targetId, + onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) + }, + onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) + }, + onComplete: onEnsureRegistration, + onEvent: function handleEvent(hostArgs) + { + var args = parameterMap.fromHost(dispId,hostArgs); + var event = OSF.DDA.OMFactory.manufactureEventArgs(dialogMessageEvent,caller,args); + if(event.type == dialogOtherEvent) + { + var payload = OSF.DDA.ErrorCodeManager.getErrorArgs(event.error); + var errorArgs = {}; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code] = status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name] = payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message] = payload.message || payload; + event.error = new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]) + } + eventDispatch.fireOrQueueEvent(event); + if(args[OSF.DDA.PropertyDescriptors.MessageType] == OSF.DialogMessageType.DialogClosed) + { + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + eventDispatch.clearEventHandlers(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived); + OSF.DialogShownStatus.hasDialogShown = false + } + } + }) + } + catch(ex) + { + onException(ex,asyncMethodCall,suppliedArguments,callArgs) + } + }; + this[OSF.DDA.DispIdHost.Methods.CloseDialog] = function OSF_DDA_DispIdHost_Facade$CloseDialog(suppliedArguments, targetId, eventDispatch, caller) + { + var callArgs; + var dialogMessageEvent, + dialogOtherEvent; + var closeStatus = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; + function closeCallback(status) + { + closeStatus = status; + OSF.DialogShownStatus.hasDialogShown = false + } + try + { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); + dialogMessageEvent = Microsoft.Office.WebExtension.EventType.DialogMessageReceived; + dialogOtherEvent = Microsoft.Office.WebExtension.EventType.DialogEventReceived; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + var dispId = dispIdMap[dialogMessageEvent]; + var delegateMethods = getDelegateMethods(dialogMessageEvent); + var invoker = delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] != undefined ? delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] : delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; + invoker({ + eventType: dialogMessageEvent, + dispId: dispId, + targetId: targetId, + onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) + }, + onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) + }, + onComplete: closeCallback + }) + } + catch(ex) + { + onException(ex,asyncMethodCall,suppliedArguments,callArgs) + } + if(closeStatus != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed,OSF.DDA.AsyncMethodNames.CloseAsync.displayName,closeStatus); + }; + this[OSF.DDA.DispIdHost.Methods.MessageParent] = function OSF_DDA_DispIdHost_Facade$MessageParent(suppliedArguments, caller) + { + var stateInfo = {}; + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(suppliedArguments,caller,stateInfo); + var delegate = getDelegateMethods(OSF.DDA.SyncMethodNames.MessageParent.id); + var invoker = delegate[OSF.DDA.DispIdHost.Delegates.MessageParent]; + var dispId = dispIdMap[OSF.DDA.SyncMethodNames.MessageParent.id]; + return invoker({ + dispId: dispId, + hostCallArgs: callArgs, + onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) + }, + onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) + } + }) + }; + this[OSF.DDA.DispIdHost.Methods.SendMessage] = function OSF_DDA_DispIdHost_Facade$SendMessage(suppliedArguments, eventDispatch, caller) + { + var stateInfo = {}; + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.SendMessage.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(suppliedArguments,caller,stateInfo); + var delegate = getDelegateMethods(OSF.DDA.SyncMethodNames.SendMessage.id); + var invoker = delegate[OSF.DDA.DispIdHost.Delegates.SendMessage]; + var dispId = dispIdMap[OSF.DDA.SyncMethodNames.SendMessage.id]; + return invoker({ + dispId: dispId, + hostCallArgs: callArgs, + onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) + }, + onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) + } + }) + } +}; +OSF.DDA.DispIdHost.addAsyncMethods = function OSF_DDA_DispIdHost$AddAsyncMethods(target, asyncMethodNames, privateState) { - for(var entry in asyncMethodNames) - { - var method=asyncMethodNames[entry]; - var name=method.displayName; - if(!target[name]) - OSF.OUtil.defineEnumerableProperty(target,name,{value: function(asyncMethod) - { - return function() - { - var invokeMethod=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod]; - invokeMethod(asyncMethod,arguments,target,privateState) - } - }(method)}) - } -}; -OSF.DDA.DispIdHost.addEventSupport=function OSF_DDA_DispIdHost$AddEventSupport(target, eventDispatch, isPopupWindow) + for(var entry in asyncMethodNames) + { + var method = asyncMethodNames[entry]; + var name = method.displayName; + if(!target[name]) + OSF.OUtil.defineEnumerableProperty(target,name,{value: function(asyncMethod) + { + return function() + { + var invokeMethod = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod]; + invokeMethod(asyncMethod,arguments,target,privateState) + } + }(method)}) + } +}; +OSF.DDA.DispIdHost.addEventSupport = function OSF_DDA_DispIdHost$AddEventSupport(target, eventDispatch, isPopupWindow) { - var add=OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName; - var remove=OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName; - if(!target[add]) - OSF.OUtil.defineEnumerableProperty(target,add,{value: function() - { - var addEventHandler=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler]; - addEventHandler(arguments,eventDispatch,target,isPopupWindow) - }}); - if(!target[remove]) - OSF.OUtil.defineEnumerableProperty(target,remove,{value: function() - { - var removeEventHandler=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]; - removeEventHandler(arguments,eventDispatch,target) - }}) -}; -OSF.ShowWindowDialogParameterKeys={ - Url: "url", - Width: "width", - Height: "height", - DisplayInIframe: "displayInIframe" -}; -OSF.HostThemeButtonStyleKeys={ - ButtonBorderColor: "buttonBorderColor", - ButtonBackgroundColor: "buttonBackgroundColor" + var add = OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName; + var remove = OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName; + if(!target[add]) + OSF.OUtil.defineEnumerableProperty(target,add,{value: function() + { + var addEventHandler = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler]; + addEventHandler(arguments,eventDispatch,target,isPopupWindow) + }}); + if(!target[remove]) + OSF.OUtil.defineEnumerableProperty(target,remove,{value: function() + { + var removeEventHandler = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]; + removeEventHandler(arguments,eventDispatch,target) + }}) +}; +OSF.ShowWindowDialogParameterKeys = { + Url: "url", + Width: "width", + Height: "height", + DisplayInIframe: "displayInIframe", + HideTitle: "hideTitle", + UseDeviceIndependentPixels: "useDeviceIndependentPixels" +}; +OSF.HostThemeButtonStyleKeys = { + ButtonBorderColor: "buttonBorderColor", + ButtonBackgroundColor: "buttonBackgroundColor" +}; +OSF.OmexPageParameterKeys = { + AppName: "client", + AppVersion: "cv", + AppUILocale: "ui", + AppDomain: "appDomain", + StoreLocator: "rs", + AssetId: "assetid", + NotificationType: "notificationType", + AppCorrelationId: "corr", + AuthType: "authType" +}; +OSF.AuthType = { + Anonymous: 0, + MSA: 1, + OrgId: 2, + ADAL: 3 +}; +OSF.OmexMessageKeys = { + MessageType: "messageType", + MessageValue: "messageValue" +}; +OSF.OmexRemoveAddinMessageKeys = { + RemoveAddinResultCode: "resultCode", + RemoveAddinResultValue: "resultValue" +}; +OSF.OmexRemoveAddinResultCode = { + Success: 0, + ClientError: 400, + ServerError: 500, + UnknownError: 600 }; var OfficeExt; (function(OfficeExt) { - var WACUtils; - (function(WACUtils) - { - var _trustedDomain="^https://[a-z0-9-]+.(officeapps.live|officeapps-df.live|partner.officewebapps).com/"; - function parseAppContextFromWindowName(skipSessionStorage, windowName) - { - return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage,windowName,OSF.WindowNameItemKeys.AppContext) - } - WACUtils.parseAppContextFromWindowName=parseAppContextFromWindowName; - function serializeObjectToString(response) - { - if(typeof JSON !=="undefined") - try - { - return JSON.stringify(response) - } - catch(ex){} - return"" - } - WACUtils.serializeObjectToString=serializeObjectToString; - function isHostTrusted() - { - return new RegExp(_trustedDomain).test(OSF.getClientEndPoint()._targetUrl.toLowerCase()) - } - WACUtils.isHostTrusted=isHostTrusted; - function addHostInfoAsQueryParam(url, hostInfoValue) - { - if(!url) - return null; - url=url.trim() || ""; - var questionMark="?"; - var hostInfo="_host_Info="; - var ampHostInfo="&_host_Info="; - var fragmentSeparator="#"; - var urlParts=url.split(fragmentSeparator); - var urlWithoutFragment=urlParts.shift(); - var fragment=urlParts.join(fragmentSeparator); - var querySplits=urlWithoutFragment.split(questionMark); - var urlWithoutFragmentWithHostInfo; - if(querySplits.length > 1) - urlWithoutFragmentWithHostInfo=urlWithoutFragment+ampHostInfo+hostInfoValue; - else if(querySplits.length > 0) - urlWithoutFragmentWithHostInfo=urlWithoutFragment+questionMark+hostInfo+hostInfoValue; - if(fragment) - return[urlWithoutFragmentWithHostInfo,fragmentSeparator,fragment].join(""); - else - return urlWithoutFragmentWithHostInfo - } - WACUtils.addHostInfoAsQueryParam=addHostInfoAsQueryParam; - function getDomainForUrl(url) - { - if(!url) - return null; - var url_parser=document.createElement("a"); - url_parser.href=url; - return url_parser.protocol+"//"+url_parser.host - } - WACUtils.getDomainForUrl=getDomainForUrl - })(WACUtils=OfficeExt.WACUtils || (OfficeExt.WACUtils={})) -})(OfficeExt || (OfficeExt={})); + var WACUtils; + (function(WACUtils) + { + var _trustedDomain = "^https://[a-z0-9-]+.(officeapps.live|officeapps-df.live|partner.officewebapps).com/"; + function parseAppContextFromWindowName(skipSessionStorage, windowName) + { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage,windowName,OSF.WindowNameItemKeys.AppContext) + } + WACUtils.parseAppContextFromWindowName = parseAppContextFromWindowName; + function serializeObjectToString(response) + { + if(typeof JSON !== "undefined") + try + { + return JSON.stringify(response) + } + catch(ex){} + return"" + } + WACUtils.serializeObjectToString = serializeObjectToString; + function isHostTrusted() + { + return new RegExp(_trustedDomain).test(OSF.getClientEndPoint()._targetUrl.toLowerCase()) + } + WACUtils.isHostTrusted = isHostTrusted; + function addHostInfoAsQueryParam(url, hostInfoValue) + { + if(!url) + return null; + url = url.trim() || ""; + var questionMark = "?"; + var hostInfo = "_host_Info="; + var ampHostInfo = "&_host_Info="; + var fragmentSeparator = "#"; + var urlParts = url.split(fragmentSeparator); + var urlWithoutFragment = urlParts.shift(); + var fragment = urlParts.join(fragmentSeparator); + var querySplits = urlWithoutFragment.split(questionMark); + var urlWithoutFragmentWithHostInfo; + if(querySplits.length > 1) + urlWithoutFragmentWithHostInfo = urlWithoutFragment + ampHostInfo + hostInfoValue; + else if(querySplits.length > 0) + urlWithoutFragmentWithHostInfo = urlWithoutFragment + questionMark + hostInfo + hostInfoValue; + if(fragment) + return[urlWithoutFragmentWithHostInfo,fragmentSeparator,fragment].join(""); + else + return urlWithoutFragmentWithHostInfo + } + WACUtils.addHostInfoAsQueryParam = addHostInfoAsQueryParam; + function getDomainForUrl(url) + { + if(!url) + return null; + var url_parser = document.createElement("a"); + url_parser.href = url; + return url_parser.protocol + "//" + url_parser.host + } + WACUtils.getDomainForUrl = getDomainForUrl; + function shouldUseLocalStorageToPassMessage() + { + try + { + var osList = ["Windows NT 6.1","Windows NT 6.2","Windows NT 6.3"]; + var userAgent = window.navigator.userAgent; + for(var i = 0, len = osList.length; i < len; i++) + if(userAgent.indexOf(osList[i]) > -1) + return isInternetExplorer(); + return false + } + catch(e) + { + OsfMsAjaxFactory.msAjaxDebug.trace("Error happens in shouldUseLocalStorageToPassMessage: " + e); + return false + } + } + WACUtils.shouldUseLocalStorageToPassMessage = shouldUseLocalStorageToPassMessage; + function isInternetExplorer() + { + try + { + var userAgent = window.navigator.userAgent; + return userAgent.indexOf("MSIE ") > -1 || userAgent.indexOf("Trident/") > -1 || userAgent.indexOf("Edge/") > -1 + } + catch(e) + { + OsfMsAjaxFactory.msAjaxDebug.trace("Error happens in isInternetExplorer: " + e); + return false + } + } + WACUtils.isInternetExplorer = isInternetExplorer + })(WACUtils = OfficeExt.WACUtils || (OfficeExt.WACUtils = {})) +})(OfficeExt || (OfficeExt = {})); OSF.OUtil.setNamespace("Microsoft",window); OSF.OUtil.setNamespace("Office",Microsoft); OSF.OUtil.setNamespace("Common",Microsoft.Office); -OSF.SerializerVersion={ - MsAjax: 0, - Browser: 1 +Microsoft.Office.Common.InvokeType = { + async: 0, + sync: 1, + asyncRegisterEvent: 2, + asyncUnregisterEvent: 3, + syncRegisterEvent: 4, + syncUnregisterEvent: 5 +}; +OSF.SerializerVersion = { + MsAjax: 0, + Browser: 1 }; var OfficeExt; (function(OfficeExt) { - function appSpecificCheckOriginFunction(url, eventObj, messageObj, checkOriginFunction) - { - return true - } - OfficeExt.appSpecificCheckOrigin=appSpecificCheckOriginFunction -})(OfficeExt || (OfficeExt={})); -Microsoft.Office.Common.InvokeType={ - async: 0, - sync: 1, - asyncRegisterEvent: 2, - asyncUnregisterEvent: 3, - syncRegisterEvent: 4, - syncUnregisterEvent: 5 -}; -Microsoft.Office.Common.InvokeResultCode={ - noError: 0, - errorInRequest: -1, - errorHandlingRequest: -2, - errorInResponse: -3, - errorHandlingResponse: -4, - errorHandlingRequestAccessDenied: -5, - errorHandlingMethodCallTimedout: -6 -}; -Microsoft.Office.Common.MessageType={ - request: 0, - response: 1 -}; -Microsoft.Office.Common.ActionType={ - invoke: 0, - registerEvent: 1, - unregisterEvent: 2 -}; -Microsoft.Office.Common.ResponseType={ - forCalling: 0, - forEventing: 1 -}; -Microsoft.Office.Common.MethodObject=function Microsoft_Office_Common_MethodObject(method, invokeType, blockingOthers) + function appSpecificCheckOriginFunction(allowed_domains, eventObj, origin, checkOriginFunction) + { + return false + } + OfficeExt.appSpecificCheckOrigin = appSpecificCheckOriginFunction +})(OfficeExt || (OfficeExt = {})); +Microsoft.Office.Common.InvokeType = { + async: 0, + sync: 1, + asyncRegisterEvent: 2, + asyncUnregisterEvent: 3, + syncRegisterEvent: 4, + syncUnregisterEvent: 5 +}; +Microsoft.Office.Common.InvokeResultCode = { + noError: 0, + errorInRequest: -1, + errorHandlingRequest: -2, + errorInResponse: -3, + errorHandlingResponse: -4, + errorHandlingRequestAccessDenied: -5, + errorHandlingMethodCallTimedout: -6 +}; +Microsoft.Office.Common.MessageType = { + request: 0, + response: 1 +}; +Microsoft.Office.Common.ActionType = { + invoke: 0, + registerEvent: 1, + unregisterEvent: 2 +}; +Microsoft.Office.Common.ResponseType = { + forCalling: 0, + forEventing: 1 +}; +Microsoft.Office.Common.MethodObject = function Microsoft_Office_Common_MethodObject(method, invokeType, blockingOthers) { - this._method=method; - this._invokeType=invokeType; - this._blockingOthers=blockingOthers -}; -Microsoft.Office.Common.MethodObject.prototype={ - getMethod: function Microsoft_Office_Common_MethodObject$getMethod() - { - return this._method - }, - getInvokeType: function Microsoft_Office_Common_MethodObject$getInvokeType() - { - return this._invokeType - }, - getBlockingFlag: function Microsoft_Office_Common_MethodObject$getBlockingFlag() - { - return this._blockingOthers - } -}; -Microsoft.Office.Common.EventMethodObject=function Microsoft_Office_Common_EventMethodObject(registerMethodObject, unregisterMethodObject) + this._method = method; + this._invokeType = invokeType; + this._blockingOthers = blockingOthers +}; +Microsoft.Office.Common.MethodObject.prototype = { + getMethod: function Microsoft_Office_Common_MethodObject$getMethod() + { + return this._method + }, + getInvokeType: function Microsoft_Office_Common_MethodObject$getInvokeType() + { + return this._invokeType + }, + getBlockingFlag: function Microsoft_Office_Common_MethodObject$getBlockingFlag() + { + return this._blockingOthers + } +}; +Microsoft.Office.Common.EventMethodObject = function Microsoft_Office_Common_EventMethodObject(registerMethodObject, unregisterMethodObject) { - this._registerMethodObject=registerMethodObject; - this._unregisterMethodObject=unregisterMethodObject -}; -Microsoft.Office.Common.EventMethodObject.prototype={ - getRegisterMethodObject: function Microsoft_Office_Common_EventMethodObject$getRegisterMethodObject() - { - return this._registerMethodObject - }, - getUnregisterMethodObject: function Microsoft_Office_Common_EventMethodObject$getUnregisterMethodObject() - { - return this._unregisterMethodObject - } -}; -Microsoft.Office.Common.ServiceEndPoint=function Microsoft_Office_Common_ServiceEndPoint(serviceEndPointId) + this._registerMethodObject = registerMethodObject; + this._unregisterMethodObject = unregisterMethodObject +}; +Microsoft.Office.Common.EventMethodObject.prototype = { + getRegisterMethodObject: function Microsoft_Office_Common_EventMethodObject$getRegisterMethodObject() + { + return this._registerMethodObject + }, + getUnregisterMethodObject: function Microsoft_Office_Common_EventMethodObject$getUnregisterMethodObject() + { + return this._unregisterMethodObject + } +}; +Microsoft.Office.Common.ServiceEndPoint = function Microsoft_Office_Common_ServiceEndPoint(serviceEndPointId) { - var e=Function._validateParams(arguments,[{ - name: "serviceEndPointId", - type: String, - mayBeNull: false - }]); - if(e) - throw e; - this._methodObjectList={}; - this._eventHandlerProxyList={}; - this._Id=serviceEndPointId; - this._conversations={}; - this._policyManager=null; - this._appDomains={}; - this._onHandleRequestError=null -}; -Microsoft.Office.Common.ServiceEndPoint.prototype={ - registerMethod: function Microsoft_Office_Common_ServiceEndPoint$registerMethod(methodName, method, invokeType, blockingOthers) - { - var e=Function._validateParams(arguments,[{ - name: "methodName", - type: String, - mayBeNull: false - },{ - name: "method", - type: Function, - mayBeNull: false - },{ - name: "invokeType", - type: Number, - mayBeNull: false - },{ - name: "blockingOthers", - type: Boolean, - mayBeNull: false - }]); - if(e) - throw e; - if(invokeType !==Microsoft.Office.Common.InvokeType.async && invokeType !==Microsoft.Office.Common.InvokeType.sync) - throw OsfMsAjaxFactory.msAjaxError.argument("invokeType"); - var methodObject=new Microsoft.Office.Common.MethodObject(method,invokeType,blockingOthers); - this._methodObjectList[methodName]=methodObject - }, - unregisterMethod: function Microsoft_Office_Common_ServiceEndPoint$unregisterMethod(methodName) - { - var e=Function._validateParams(arguments,[{ - name: "methodName", - type: String, - mayBeNull: false - }]); - if(e) - throw e; - delete this._methodObjectList[methodName] - }, - registerEvent: function Microsoft_Office_Common_ServiceEndPoint$registerEvent(eventName, registerMethod, unregisterMethod) - { - var e=Function._validateParams(arguments,[{ - name: "eventName", - type: String, - mayBeNull: false - },{ - name: "registerMethod", - type: Function, - mayBeNull: false - },{ - name: "unregisterMethod", - type: Function, - mayBeNull: false - }]); - if(e) - throw e; - var methodObject=new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(registerMethod,Microsoft.Office.Common.InvokeType.syncRegisterEvent,false),new Microsoft.Office.Common.MethodObject(unregisterMethod,Microsoft.Office.Common.InvokeType.syncUnregisterEvent,false)); - this._methodObjectList[eventName]=methodObject - }, - registerEventEx: function Microsoft_Office_Common_ServiceEndPoint$registerEventEx(eventName, registerMethod, registerMethodInvokeType, unregisterMethod, unregisterMethodInvokeType) - { - var e=Function._validateParams(arguments,[{ - name: "eventName", - type: String, - mayBeNull: false - },{ - name: "registerMethod", - type: Function, - mayBeNull: false - },{ - name: "registerMethodInvokeType", - type: Number, - mayBeNull: false - },{ - name: "unregisterMethod", - type: Function, - mayBeNull: false - },{ - name: "unregisterMethodInvokeType", - type: Number, - mayBeNull: false - }]); - if(e) - throw e; - var methodObject=new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(registerMethod,registerMethodInvokeType,false),new Microsoft.Office.Common.MethodObject(unregisterMethod,unregisterMethodInvokeType,false)); - this._methodObjectList[eventName]=methodObject - }, - unregisterEvent: function(eventName) - { - var e=Function._validateParams(arguments,[{ - name: "eventName", - type: String, - mayBeNull: false - }]); - if(e) - throw e; - this.unregisterMethod(eventName) - }, - registerConversation: function Microsoft_Office_Common_ServiceEndPoint$registerConversation(conversationId, conversationUrl, appDomains, serializerVersion) - { - var e=Function._validateParams(arguments,[{ - name: "conversationId", - type: String, - mayBeNull: false - },{ - name: "conversationUrl", - type: String, - mayBeNull: false, - optional: true - },{ - name: "appDomains", - type: Object, - mayBeNull: true, - optional: true - },{ - name: "serializerVersion", - type: Number, - mayBeNull: true, - optional: true - }]); - if(e) - throw e; - if(appDomains) - { - if(!(appDomains instanceof Array)) - throw OsfMsAjaxFactory.msAjaxError.argument("appDomains"); - this._appDomains[conversationId]=appDomains - } - this._conversations[conversationId]={ - url: conversationUrl, - serializerVersion: serializerVersion - } - }, - unregisterConversation: function Microsoft_Office_Common_ServiceEndPoint$unregisterConversation(conversationId) - { - var e=Function._validateParams(arguments,[{ - name: "conversationId", - type: String, - mayBeNull: false - }]); - if(e) - throw e; - delete this._conversations[conversationId] - }, - setPolicyManager: function Microsoft_Office_Common_ServiceEndPoint$setPolicyManager(policyManager) - { - var e=Function._validateParams(arguments,[{ - name: "policyManager", - type: Object, - mayBeNull: false - }]); - if(e) - throw e; - if(!policyManager.checkPermission) - throw OsfMsAjaxFactory.msAjaxError.argument("policyManager"); - this._policyManager=policyManager - }, - getPolicyManager: function Microsoft_Office_Common_ServiceEndPoint$getPolicyManager() - { - return this._policyManager - }, - dispose: function Microsoft_Office_Common_ServiceEndPoint$dispose() - { - this._methodObjectList=null; - this._eventHandlerProxyList=null; - this._Id=null; - this._conversations=null; - this._policyManager=null; - this._appDomains=null; - this._onHandleRequestError=null - } -}; -Microsoft.Office.Common.ClientEndPoint=function Microsoft_Office_Common_ClientEndPoint(conversationId, targetWindow, targetUrl, serializerVersion) + var e = Function._validateParams(arguments,[{ + name: "serviceEndPointId", + type: String, + mayBeNull: false + }]); + if(e) + throw e; + this._methodObjectList = {}; + this._eventHandlerProxyList = {}; + this._Id = serviceEndPointId; + this._conversations = {}; + this._policyManager = null; + this._appDomains = {}; + this._onHandleRequestError = null +}; +Microsoft.Office.Common.ServiceEndPoint.prototype = { + registerMethod: function Microsoft_Office_Common_ServiceEndPoint$registerMethod(methodName, method, invokeType, blockingOthers) + { + var e = Function._validateParams(arguments,[{ + name: "methodName", + type: String, + mayBeNull: false + },{ + name: "method", + type: Function, + mayBeNull: false + },{ + name: "invokeType", + type: Number, + mayBeNull: false + },{ + name: "blockingOthers", + type: Boolean, + mayBeNull: false + }]); + if(e) + throw e; + if(invokeType !== Microsoft.Office.Common.InvokeType.async && invokeType !== Microsoft.Office.Common.InvokeType.sync) + throw OsfMsAjaxFactory.msAjaxError.argument("invokeType"); + var methodObject = new Microsoft.Office.Common.MethodObject(method,invokeType,blockingOthers); + this._methodObjectList[methodName] = methodObject + }, + unregisterMethod: function Microsoft_Office_Common_ServiceEndPoint$unregisterMethod(methodName) + { + var e = Function._validateParams(arguments,[{ + name: "methodName", + type: String, + mayBeNull: false + }]); + if(e) + throw e; + delete this._methodObjectList[methodName] + }, + registerEvent: function Microsoft_Office_Common_ServiceEndPoint$registerEvent(eventName, registerMethod, unregisterMethod) + { + var e = Function._validateParams(arguments,[{ + name: "eventName", + type: String, + mayBeNull: false + },{ + name: "registerMethod", + type: Function, + mayBeNull: false + },{ + name: "unregisterMethod", + type: Function, + mayBeNull: false + }]); + if(e) + throw e; + var methodObject = new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(registerMethod,Microsoft.Office.Common.InvokeType.syncRegisterEvent,false),new Microsoft.Office.Common.MethodObject(unregisterMethod,Microsoft.Office.Common.InvokeType.syncUnregisterEvent,false)); + this._methodObjectList[eventName] = methodObject + }, + registerEventEx: function Microsoft_Office_Common_ServiceEndPoint$registerEventEx(eventName, registerMethod, registerMethodInvokeType, unregisterMethod, unregisterMethodInvokeType) + { + var e = Function._validateParams(arguments,[{ + name: "eventName", + type: String, + mayBeNull: false + },{ + name: "registerMethod", + type: Function, + mayBeNull: false + },{ + name: "registerMethodInvokeType", + type: Number, + mayBeNull: false + },{ + name: "unregisterMethod", + type: Function, + mayBeNull: false + },{ + name: "unregisterMethodInvokeType", + type: Number, + mayBeNull: false + }]); + if(e) + throw e; + var methodObject = new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(registerMethod,registerMethodInvokeType,false),new Microsoft.Office.Common.MethodObject(unregisterMethod,unregisterMethodInvokeType,false)); + this._methodObjectList[eventName] = methodObject + }, + unregisterEvent: function(eventName) + { + var e = Function._validateParams(arguments,[{ + name: "eventName", + type: String, + mayBeNull: false + }]); + if(e) + throw e; + this.unregisterMethod(eventName) + }, + registerConversation: function Microsoft_Office_Common_ServiceEndPoint$registerConversation(conversationId, conversationUrl, appDomains, serializerVersion) + { + var e = Function._validateParams(arguments,[{ + name: "conversationId", + type: String, + mayBeNull: false + },{ + name: "conversationUrl", + type: String, + mayBeNull: false, + optional: true + },{ + name: "appDomains", + type: Object, + mayBeNull: true, + optional: true + },{ + name: "serializerVersion", + type: Number, + mayBeNull: true, + optional: true + }]); + if(e) + throw e; + if(appDomains) + { + if(!(appDomains instanceof Array)) + throw OsfMsAjaxFactory.msAjaxError.argument("appDomains"); + this._appDomains[conversationId] = appDomains + } + this._conversations[conversationId] = { + url: conversationUrl, + serializerVersion: serializerVersion + } + }, + unregisterConversation: function Microsoft_Office_Common_ServiceEndPoint$unregisterConversation(conversationId) + { + var e = Function._validateParams(arguments,[{ + name: "conversationId", + type: String, + mayBeNull: false + }]); + if(e) + throw e; + delete this._conversations[conversationId] + }, + setPolicyManager: function Microsoft_Office_Common_ServiceEndPoint$setPolicyManager(policyManager) + { + var e = Function._validateParams(arguments,[{ + name: "policyManager", + type: Object, + mayBeNull: false + }]); + if(e) + throw e; + if(!policyManager.checkPermission) + throw OsfMsAjaxFactory.msAjaxError.argument("policyManager"); + this._policyManager = policyManager + }, + getPolicyManager: function Microsoft_Office_Common_ServiceEndPoint$getPolicyManager() + { + return this._policyManager + }, + dispose: function Microsoft_Office_Common_ServiceEndPoint$dispose() + { + this._methodObjectList = null; + this._eventHandlerProxyList = null; + this._Id = null; + this._conversations = null; + this._policyManager = null; + this._appDomains = null; + this._onHandleRequestError = null + } +}; +Microsoft.Office.Common.ClientEndPoint = function Microsoft_Office_Common_ClientEndPoint(conversationId, targetWindow, targetUrl, serializerVersion) { - var e=Function._validateParams(arguments,[{ - name: "conversationId", - type: String, - mayBeNull: false - },{ - name: "targetWindow", - mayBeNull: false - },{ - name: "targetUrl", - type: String, - mayBeNull: false - },{ - name: "serializerVersion", - type: Number, - mayBeNull: true, - optional: true - }]); - if(e) - throw e; - try - { - if(!targetWindow.postMessage) - throw OsfMsAjaxFactory.msAjaxError.argument("targetWindow"); - } - catch(ex) - { - if(!Object.prototype.hasOwnProperty.call(targetWindow,"postMessage")) - throw OsfMsAjaxFactory.msAjaxError.argument("targetWindow"); - } - this._conversationId=conversationId; - this._targetWindow=targetWindow; - this._targetUrl=targetUrl; - this._callingIndex=0; - this._callbackList={}; - this._eventHandlerList={}; - if(serializerVersion !=null) - this._serializerVersion=serializerVersion; - else - this._serializerVersion=OSF.SerializerVersion.Browser -}; -Microsoft.Office.Common.ClientEndPoint.prototype={ - invoke: function Microsoft_Office_Common_ClientEndPoint$invoke(targetMethodName, callback, param) - { - var e=Function._validateParams(arguments,[{ - name: "targetMethodName", - type: String, - mayBeNull: false - },{ - name: "callback", - type: Function, - mayBeNull: true - },{ - name: "param", - mayBeNull: true - }]); - if(e) - throw e; - var correlationId=this._callingIndex++; - var now=new Date; - var callbackEntry={ - callback: callback, - createdOn: now.getTime() - }; - if(param && typeof param==="object" && typeof param.__timeout__==="number") - { - callbackEntry.timeout=param.__timeout__; - delete param.__timeout__ - } - this._callbackList[correlationId]=callbackEntry; - try - { - var callRequest=new Microsoft.Office.Common.Request(targetMethodName,Microsoft.Office.Common.ActionType.invoke,this._conversationId,correlationId,param); - var msg=Microsoft.Office.Common.MessagePackager.envelope(callRequest,this._serializerVersion); - this._targetWindow.postMessage(msg,this._targetUrl); - Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer() - } - catch(ex) - { - try - { - if(callback !==null) - callback(Microsoft.Office.Common.InvokeResultCode.errorInRequest,ex) - } - finally - { - delete this._callbackList[correlationId] - } - } - }, - registerForEvent: function Microsoft_Office_Common_ClientEndPoint$registerForEvent(targetEventName, eventHandler, callback, data) - { - var e=Function._validateParams(arguments,[{ - name: "targetEventName", - type: String, - mayBeNull: false - },{ - name: "eventHandler", - type: Function, - mayBeNull: false - },{ - name: "callback", - type: Function, - mayBeNull: true - },{ - name: "data", - mayBeNull: true, - optional: true - }]); - if(e) - throw e; - var correlationId=this._callingIndex++; - var now=new Date; - this._callbackList[correlationId]={ - callback: callback, - createdOn: now.getTime() - }; - try - { - var callRequest=new Microsoft.Office.Common.Request(targetEventName,Microsoft.Office.Common.ActionType.registerEvent,this._conversationId,correlationId,data); - var msg=Microsoft.Office.Common.MessagePackager.envelope(callRequest,this._serializerVersion); - this._targetWindow.postMessage(msg,this._targetUrl); - Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer(); - this._eventHandlerList[targetEventName]=eventHandler - } - catch(ex) - { - try - { - if(callback !==null) - callback(Microsoft.Office.Common.InvokeResultCode.errorInRequest,ex) - } - finally - { - delete this._callbackList[correlationId] - } - } - }, - unregisterForEvent: function Microsoft_Office_Common_ClientEndPoint$unregisterForEvent(targetEventName, callback, data) - { - var e=Function._validateParams(arguments,[{ - name: "targetEventName", - type: String, - mayBeNull: false - },{ - name: "callback", - type: Function, - mayBeNull: true - },{ - name: "data", - mayBeNull: true, - optional: true - }]); - if(e) - throw e; - var correlationId=this._callingIndex++; - var now=new Date; - this._callbackList[correlationId]={ - callback: callback, - createdOn: now.getTime() - }; - try - { - var callRequest=new Microsoft.Office.Common.Request(targetEventName,Microsoft.Office.Common.ActionType.unregisterEvent,this._conversationId,correlationId,data); - var msg=Microsoft.Office.Common.MessagePackager.envelope(callRequest,this._serializerVersion); - this._targetWindow.postMessage(msg,this._targetUrl); - Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer() - } - catch(ex) - { - try - { - if(callback !==null) - callback(Microsoft.Office.Common.InvokeResultCode.errorInRequest,ex) - } - finally - { - delete this._callbackList[correlationId] - } - } - finally - { - delete this._eventHandlerList[targetEventName] - } - } -}; -Microsoft.Office.Common.XdmCommunicationManager=function() + var e = Function._validateParams(arguments,[{ + name: "conversationId", + type: String, + mayBeNull: false + },{ + name: "targetWindow", + mayBeNull: false + },{ + name: "targetUrl", + type: String, + mayBeNull: false + },{ + name: "serializerVersion", + type: Number, + mayBeNull: true, + optional: true + }]); + if(e) + throw e; + try + { + if(!targetWindow.postMessage) + throw OsfMsAjaxFactory.msAjaxError.argument("targetWindow"); + } + catch(ex) + { + if(!Object.prototype.hasOwnProperty.call(targetWindow,"postMessage")) + throw OsfMsAjaxFactory.msAjaxError.argument("targetWindow"); + } + this._conversationId = conversationId; + this._targetWindow = targetWindow; + this._targetUrl = targetUrl; + this._callingIndex = 0; + this._callbackList = {}; + this._eventHandlerList = {}; + if(serializerVersion != null) + this._serializerVersion = serializerVersion; + else + this._serializerVersion = OSF.SerializerVersion.Browser +}; +Microsoft.Office.Common.ClientEndPoint.prototype = { + invoke: function Microsoft_Office_Common_ClientEndPoint$invoke(targetMethodName, callback, param) + { + var e = Function._validateParams(arguments,[{ + name: "targetMethodName", + type: String, + mayBeNull: false + },{ + name: "callback", + type: Function, + mayBeNull: true + },{ + name: "param", + mayBeNull: true + }]); + if(e) + throw e; + var correlationId = this._callingIndex++; + var now = new Date; + var callbackEntry = { + callback: callback, + createdOn: now.getTime() + }; + if(param && typeof param === "object" && typeof param.__timeout__ === "number") + { + callbackEntry.timeout = param.__timeout__; + delete param.__timeout__ + } + this._callbackList[correlationId] = callbackEntry; + try + { + var callRequest = new Microsoft.Office.Common.Request(targetMethodName,Microsoft.Office.Common.ActionType.invoke,this._conversationId,correlationId,param); + var msg = Microsoft.Office.Common.MessagePackager.envelope(callRequest,this._serializerVersion); + this._targetWindow.postMessage(msg,this._targetUrl); + Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer() + } + catch(ex) + { + try + { + if(callback !== null) + callback(Microsoft.Office.Common.InvokeResultCode.errorInRequest,ex) + } + finally + { + delete this._callbackList[correlationId] + } + } + }, + registerForEvent: function Microsoft_Office_Common_ClientEndPoint$registerForEvent(targetEventName, eventHandler, callback, data) + { + var e = Function._validateParams(arguments,[{ + name: "targetEventName", + type: String, + mayBeNull: false + },{ + name: "eventHandler", + type: Function, + mayBeNull: false + },{ + name: "callback", + type: Function, + mayBeNull: true + },{ + name: "data", + mayBeNull: true, + optional: true + }]); + if(e) + throw e; + var correlationId = this._callingIndex++; + var now = new Date; + this._callbackList[correlationId] = { + callback: callback, + createdOn: now.getTime() + }; + try + { + var callRequest = new Microsoft.Office.Common.Request(targetEventName,Microsoft.Office.Common.ActionType.registerEvent,this._conversationId,correlationId,data); + var msg = Microsoft.Office.Common.MessagePackager.envelope(callRequest,this._serializerVersion); + this._targetWindow.postMessage(msg,this._targetUrl); + Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer(); + this._eventHandlerList[targetEventName] = eventHandler + } + catch(ex) + { + try + { + if(callback !== null) + callback(Microsoft.Office.Common.InvokeResultCode.errorInRequest,ex) + } + finally + { + delete this._callbackList[correlationId] + } + } + }, + unregisterForEvent: function Microsoft_Office_Common_ClientEndPoint$unregisterForEvent(targetEventName, callback, data) + { + var e = Function._validateParams(arguments,[{ + name: "targetEventName", + type: String, + mayBeNull: false + },{ + name: "callback", + type: Function, + mayBeNull: true + },{ + name: "data", + mayBeNull: true, + optional: true + }]); + if(e) + throw e; + var correlationId = this._callingIndex++; + var now = new Date; + this._callbackList[correlationId] = { + callback: callback, + createdOn: now.getTime() + }; + try + { + var callRequest = new Microsoft.Office.Common.Request(targetEventName,Microsoft.Office.Common.ActionType.unregisterEvent,this._conversationId,correlationId,data); + var msg = Microsoft.Office.Common.MessagePackager.envelope(callRequest,this._serializerVersion); + this._targetWindow.postMessage(msg,this._targetUrl); + Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer() + } + catch(ex) + { + try + { + if(callback !== null) + callback(Microsoft.Office.Common.InvokeResultCode.errorInRequest,ex) + } + finally + { + delete this._callbackList[correlationId] + } + } + finally + { + delete this._eventHandlerList[targetEventName] + } + } +}; +Microsoft.Office.Common.XdmCommunicationManager = function() { - var _invokerQueue=[]; - var _lastMessageProcessTime=null; - var _messageProcessingTimer=null; - var _processInterval=10; - var _blockingFlag=false; - var _methodTimeoutTimer=null; - var _methodTimeoutProcessInterval=2e3; - var _methodTimeoutDefault=65e3; - var _methodTimeout=_methodTimeoutDefault; - var _serviceEndPoints={}; - var _clientEndPoints={}; - var _initialized=false; - function _lookupServiceEndPoint(conversationId) - { - for(var id in _serviceEndPoints) - if(_serviceEndPoints[id]._conversations[conversationId]) - return _serviceEndPoints[id]; - OsfMsAjaxFactory.msAjaxDebug.trace("Unknown conversation Id."); - throw OsfMsAjaxFactory.msAjaxError.argument("conversationId"); - } - function _lookupClientEndPoint(conversationId) - { - var clientEndPoint=_clientEndPoints[conversationId]; - if(!clientEndPoint) - OsfMsAjaxFactory.msAjaxDebug.trace("Unknown conversation Id."); - return clientEndPoint - } - function _lookupMethodObject(serviceEndPoint, messageObject) - { - var methodOrEventMethodObject=serviceEndPoint._methodObjectList[messageObject._actionName]; - if(!methodOrEventMethodObject) - { - OsfMsAjaxFactory.msAjaxDebug.trace("The specified method is not registered on service endpoint:"+messageObject._actionName); - throw OsfMsAjaxFactory.msAjaxError.argument("messageObject"); - } - var methodObject=null; - if(messageObject._actionType===Microsoft.Office.Common.ActionType.invoke) - methodObject=methodOrEventMethodObject; - else if(messageObject._actionType===Microsoft.Office.Common.ActionType.registerEvent) - methodObject=methodOrEventMethodObject.getRegisterMethodObject(); - else - methodObject=methodOrEventMethodObject.getUnregisterMethodObject(); - return methodObject - } - function _enqueInvoker(invoker) - { - _invokerQueue.push(invoker) - } - function _dequeInvoker() - { - if(_messageProcessingTimer !==null) - { - if(!_blockingFlag) - if(_invokerQueue.length > 0) - { - var invoker=_invokerQueue.shift(); - _executeCommand(invoker) - } - else - { - clearInterval(_messageProcessingTimer); - _messageProcessingTimer=null - } - } - else - OsfMsAjaxFactory.msAjaxDebug.trace("channel is not ready.") - } - function _executeCommand(invoker) - { - _blockingFlag=invoker.getInvokeBlockingFlag(); - invoker.invoke(); - _lastMessageProcessTime=(new Date).getTime() - } - function _checkMethodTimeout() - { - if(_methodTimeoutTimer) - { - var clientEndPoint; - var methodCallsNotTimedout=0; - var now=new Date; - var timeoutValue; - for(var conversationId in _clientEndPoints) - { - clientEndPoint=_clientEndPoints[conversationId]; - for(var correlationId in clientEndPoint._callbackList) - { - var callbackEntry=clientEndPoint._callbackList[correlationId]; - timeoutValue=callbackEntry.timeout ? callbackEntry.timeout : _methodTimeout; - if(timeoutValue >=0 && Math.abs(now.getTime() - callbackEntry.createdOn) >=timeoutValue) - try - { - if(callbackEntry.callback) - callbackEntry.callback(Microsoft.Office.Common.InvokeResultCode.errorHandlingMethodCallTimedout,null) - } - finally - { - delete clientEndPoint._callbackList[correlationId] - } - else - methodCallsNotTimedout++ } - } - if(methodCallsNotTimedout===0) - { - clearInterval(_methodTimeoutTimer); - _methodTimeoutTimer=null - } - } - else - OsfMsAjaxFactory.msAjaxDebug.trace("channel is not ready.") - } - function _postCallbackHandler() - { - _blockingFlag=false - } - function _registerListener(listener) - { - if(window.addEventListener) - window.addEventListener("message",listener,false); - else if(navigator.userAgent.indexOf("MSIE") > -1 && window.attachEvent) - window.attachEvent("onmessage",listener); - else - { - OsfMsAjaxFactory.msAjaxDebug.trace("Browser doesn't support the required API."); - throw OsfMsAjaxFactory.msAjaxError.argument("Browser"); - } - } - function _checkOrigin(url, origin) - { - var res=false; - if(url===true) - return true; - if(!url || !origin || !url.length || !origin.length) - return res; - var url_parser, - org_parser; - url_parser=document.createElement("a"); - org_parser=document.createElement("a"); - url_parser.href=url; - org_parser.href=origin; - res=_urlCompare(url_parser,org_parser); - delete url_parser,org_parser; - return res - } - function _checkOriginWithAppDomains(allowed_domains, origin) - { - var res=false; - if(!origin || !origin.length || !allowed_domains || !(allowed_domains instanceof Array) || !allowed_domains.length) - return res; - var org_parser=document.createElement("a"); - var app_domain_parser=document.createElement("a"); - org_parser.href=origin; - for(var i=0; i < allowed_domains.length && !res; i++) - if(allowed_domains[i].indexOf("://") !==-1) - { - app_domain_parser.href=allowed_domains[i]; - res=_urlCompare(org_parser,app_domain_parser) - } - delete org_parser,app_domain_parser; - return res - } - function _urlCompare(url_parser1, url_parser2) - { - return url_parser1.hostname==url_parser2.hostname && url_parser1.protocol==url_parser2.protocol && url_parser1.port==url_parser2.port - } - function _receive(e) - { - if(!OSF) - return; - if(e.data !="") - { - var messageObject; - var serializerVersion=OSF.SerializerVersion.Browser; - var serializedMessage=e.data; - try - { - messageObject=Microsoft.Office.Common.MessagePackager.unenvelope(serializedMessage,OSF.SerializerVersion.Browser); - serializerVersion=messageObject._serializerVersion !=null ? messageObject._serializerVersion : serializerVersion - } - catch(ex) - { - return - } - if(messageObject._messageType===Microsoft.Office.Common.MessageType.request) - { - var requesterUrl=e.origin==null || e.origin=="null" ? messageObject._origin : e.origin; - try - { - var serviceEndPoint=_lookupServiceEndPoint(messageObject._conversationId); - var conversation=serviceEndPoint._conversations[messageObject._conversationId]; - serializerVersion=conversation.serializerVersion !=null ? conversation.serializerVersion : serializerVersion; - if(!_checkOrigin(conversation.url,e.origin) && !_checkOriginWithAppDomains(serviceEndPoint._appDomains[messageObject._conversationId],e.origin)) - throw"Failed origin check"; - var policyManager=serviceEndPoint.getPolicyManager(); - if(policyManager && !policyManager.checkPermission(messageObject._conversationId,messageObject._actionName,messageObject._data)) - throw"Access Denied"; - var methodObject=_lookupMethodObject(serviceEndPoint,messageObject); - var invokeCompleteCallback=new Microsoft.Office.Common.InvokeCompleteCallback(e.source,requesterUrl,messageObject._actionName,messageObject._conversationId,messageObject._correlationId,_postCallbackHandler,serializerVersion); - var invoker=new Microsoft.Office.Common.Invoker(methodObject,messageObject._data,invokeCompleteCallback,serviceEndPoint._eventHandlerProxyList,messageObject._conversationId,messageObject._actionName,serializerVersion); - var shouldEnque=true; - if(_messageProcessingTimer==null) - if((_lastMessageProcessTime==null || (new Date).getTime() - _lastMessageProcessTime > _processInterval) && !_blockingFlag) - { - _executeCommand(invoker); - shouldEnque=false - } - else - _messageProcessingTimer=setInterval(_dequeInvoker,_processInterval); - if(shouldEnque) - _enqueInvoker(invoker) - } - catch(ex) - { - if(serviceEndPoint && serviceEndPoint._onHandleRequestError) - serviceEndPoint._onHandleRequestError(messageObject,ex); - var errorCode=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequest; - if(ex=="Access Denied") - errorCode=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied; - var callResponse=new Microsoft.Office.Common.Response(messageObject._actionName,messageObject._conversationId,messageObject._correlationId,errorCode,Microsoft.Office.Common.ResponseType.forCalling,ex); - var envelopedResult=Microsoft.Office.Common.MessagePackager.envelope(callResponse,serializerVersion); - var canPostMessage=false; - try - { - canPostMessage=!!(e.source && e.source.postMessage) - } - catch(ex){} - if(canPostMessage) - e.source.postMessage(envelopedResult,requesterUrl) - } - } - else if(messageObject._messageType===Microsoft.Office.Common.MessageType.response) - { - var clientEndPoint=_lookupClientEndPoint(messageObject._conversationId); - if(!clientEndPoint) - return; - clientEndPoint._serializerVersion=serializerVersion; - if(!_checkOrigin(clientEndPoint._targetUrl,e.origin)) - throw"Failed orgin check"; - if(messageObject._responseType===Microsoft.Office.Common.ResponseType.forCalling) - { - var callbackEntry=clientEndPoint._callbackList[messageObject._correlationId]; - if(callbackEntry) - try - { - if(callbackEntry.callback) - callbackEntry.callback(messageObject._errorCode,messageObject._data) - } - finally - { - delete clientEndPoint._callbackList[messageObject._correlationId] - } - } - else - { - var eventhandler=clientEndPoint._eventHandlerList[messageObject._actionName]; - if(eventhandler !==undefined && eventhandler !==null) - eventhandler(messageObject._data) - } - } - else - return - } - } - function _initialize() - { - if(!_initialized) - { - _registerListener(_receive); - _initialized=true - } - } - return{ - connect: function Microsoft_Office_Common_XdmCommunicationManager$connect(conversationId, targetWindow, targetUrl, serializerVersion) - { - var clientEndPoint=_clientEndPoints[conversationId]; - if(!clientEndPoint) - { - _initialize(); - clientEndPoint=new Microsoft.Office.Common.ClientEndPoint(conversationId,targetWindow,targetUrl,serializerVersion); - _clientEndPoints[conversationId]=clientEndPoint - } - return clientEndPoint - }, - getClientEndPoint: function Microsoft_Office_Common_XdmCommunicationManager$getClientEndPoint(conversationId) - { - var e=Function._validateParams(arguments,[{ - name: "conversationId", - type: String, - mayBeNull: false - }]); - if(e) - throw e; - return _clientEndPoints[conversationId] - }, - createServiceEndPoint: function Microsoft_Office_Common_XdmCommunicationManager$createServiceEndPoint(serviceEndPointId) - { - _initialize(); - var serviceEndPoint=new Microsoft.Office.Common.ServiceEndPoint(serviceEndPointId); - _serviceEndPoints[serviceEndPointId]=serviceEndPoint; - return serviceEndPoint - }, - getServiceEndPoint: function Microsoft_Office_Common_XdmCommunicationManager$getServiceEndPoint(serviceEndPointId) - { - var e=Function._validateParams(arguments,[{ - name: "serviceEndPointId", - type: String, - mayBeNull: false - }]); - if(e) - throw e; - return _serviceEndPoints[serviceEndPointId] - }, - deleteClientEndPoint: function Microsoft_Office_Common_XdmCommunicationManager$deleteClientEndPoint(conversationId) - { - var e=Function._validateParams(arguments,[{ - name: "conversationId", - type: String, - mayBeNull: false - }]); - if(e) - throw e; - delete _clientEndPoints[conversationId] - }, - deleteServiceEndPoint: function Microsoft_Office_Common_XdmCommunicationManager$deleteServiceEndPoint(serviceEndPointId) - { - var e=Function._validateParams(arguments,[{ - name: "serviceEndPointId", - type: String, - mayBeNull: false - }]); - if(e) - throw e; - delete _serviceEndPoints[serviceEndPointId] - }, - checkUrlWithAppDomains: function Microsoft_Office_Common_XdmCommunicationManager$_checkUrlWithAppDomains(appDomains, origin) - { - return _checkOriginWithAppDomains(appDomains,origin) - }, - _setMethodTimeout: function Microsoft_Office_Common_XdmCommunicationManager$_setMethodTimeout(methodTimeout) - { - var e=Function._validateParams(arguments,[{ - name: "methodTimeout", - type: Number, - mayBeNull: false - }]); - if(e) - throw e; - _methodTimeout=methodTimeout <=0 ? _methodTimeoutDefault : methodTimeout - }, - _startMethodTimeoutTimer: function Microsoft_Office_Common_XdmCommunicationManager$_startMethodTimeoutTimer() - { - if(!_methodTimeoutTimer) - _methodTimeoutTimer=setInterval(_checkMethodTimeout,_methodTimeoutProcessInterval) - } - } + var _invokerQueue = []; + var _lastMessageProcessTime = null; + var _messageProcessingTimer = null; + var _processInterval = 10; + var _blockingFlag = false; + var _methodTimeoutTimer = null; + var _methodTimeoutProcessInterval = 2e3; + var _methodTimeoutDefault = 65e3; + var _methodTimeout = _methodTimeoutDefault; + var _serviceEndPoints = {}; + var _clientEndPoints = {}; + var _initialized = false; + function _lookupServiceEndPoint(conversationId) + { + for(var id in _serviceEndPoints) + if(_serviceEndPoints[id]._conversations[conversationId]) + return _serviceEndPoints[id]; + OsfMsAjaxFactory.msAjaxDebug.trace("Unknown conversation Id."); + throw OsfMsAjaxFactory.msAjaxError.argument("conversationId"); + } + function _lookupClientEndPoint(conversationId) + { + var clientEndPoint = _clientEndPoints[conversationId]; + if(!clientEndPoint) + OsfMsAjaxFactory.msAjaxDebug.trace("Unknown conversation Id."); + return clientEndPoint + } + function _lookupMethodObject(serviceEndPoint, messageObject) + { + var methodOrEventMethodObject = serviceEndPoint._methodObjectList[messageObject._actionName]; + if(!methodOrEventMethodObject) + { + OsfMsAjaxFactory.msAjaxDebug.trace("The specified method is not registered on service endpoint:" + messageObject._actionName); + throw OsfMsAjaxFactory.msAjaxError.argument("messageObject"); + } + var methodObject = null; + if(messageObject._actionType === Microsoft.Office.Common.ActionType.invoke) + methodObject = methodOrEventMethodObject; + else if(messageObject._actionType === Microsoft.Office.Common.ActionType.registerEvent) + methodObject = methodOrEventMethodObject.getRegisterMethodObject(); + else + methodObject = methodOrEventMethodObject.getUnregisterMethodObject(); + return methodObject + } + function _enqueInvoker(invoker) + { + _invokerQueue.push(invoker) + } + function _dequeInvoker() + { + if(_messageProcessingTimer !== null) + { + if(!_blockingFlag) + if(_invokerQueue.length > 0) + { + var invoker = _invokerQueue.shift(); + _executeCommand(invoker) + } + else + { + clearInterval(_messageProcessingTimer); + _messageProcessingTimer = null + } + } + else + OsfMsAjaxFactory.msAjaxDebug.trace("channel is not ready.") + } + function _executeCommand(invoker) + { + _blockingFlag = invoker.getInvokeBlockingFlag(); + invoker.invoke(); + _lastMessageProcessTime = (new Date).getTime() + } + function _checkMethodTimeout() + { + if(_methodTimeoutTimer) + { + var clientEndPoint; + var methodCallsNotTimedout = 0; + var now = new Date; + var timeoutValue; + for(var conversationId in _clientEndPoints) + { + clientEndPoint = _clientEndPoints[conversationId]; + for(var correlationId in clientEndPoint._callbackList) + { + var callbackEntry = clientEndPoint._callbackList[correlationId]; + timeoutValue = callbackEntry.timeout ? callbackEntry.timeout : _methodTimeout; + if(timeoutValue >= 0 && Math.abs(now.getTime() - callbackEntry.createdOn) >= timeoutValue) + try + { + if(callbackEntry.callback) + callbackEntry.callback(Microsoft.Office.Common.InvokeResultCode.errorHandlingMethodCallTimedout,null) + } + finally + { + delete clientEndPoint._callbackList[correlationId] + } + else + methodCallsNotTimedout++ + } + } + if(methodCallsNotTimedout === 0) + { + clearInterval(_methodTimeoutTimer); + _methodTimeoutTimer = null + } + } + else + OsfMsAjaxFactory.msAjaxDebug.trace("channel is not ready.") + } + function _postCallbackHandler() + { + _blockingFlag = false + } + function _registerListener(listener) + { + if(window.addEventListener) + window.addEventListener("message",listener,false); + else if(navigator.userAgent.indexOf("MSIE") > -1 && window.attachEvent) + window.attachEvent("onmessage",listener); + else + { + OsfMsAjaxFactory.msAjaxDebug.trace("Browser doesn't support the required API."); + throw OsfMsAjaxFactory.msAjaxError.argument("Browser"); + } + } + function _checkOrigin(url, origin) + { + var res = false; + if(url === true) + return true; + if(!url || !origin || !url.length || !origin.length) + return res; + var url_parser, + org_parser; + url_parser = document.createElement("a"); + org_parser = document.createElement("a"); + url_parser.href = url; + org_parser.href = origin; + res = _urlCompare(url_parser,org_parser); + delete url_parser,org_parser; + return res + } + function _checkOriginWithAppDomains(allowed_domains, origin) + { + var res = false; + if(!origin || !origin.length || !allowed_domains || !(allowed_domains instanceof Array) || !allowed_domains.length) + return res; + var org_parser = document.createElement("a"); + var app_domain_parser = document.createElement("a"); + org_parser.href = origin; + for(var i = 0; i < allowed_domains.length && !res; i++) + if(allowed_domains[i].indexOf("://") !== -1) + { + app_domain_parser.href = allowed_domains[i]; + res = _urlCompare(org_parser,app_domain_parser) + } + delete org_parser,app_domain_parser; + return res + } + function _urlCompare(url_parser1, url_parser2) + { + return url_parser1.hostname == url_parser2.hostname && url_parser1.protocol == url_parser2.protocol && url_parser1.port == url_parser2.port + } + function _receive(e) + { + if(!OSF) + return; + if(e.data != "") + { + var messageObject; + var serializerVersion = OSF.SerializerVersion.Browser; + var serializedMessage = e.data; + try + { + messageObject = Microsoft.Office.Common.MessagePackager.unenvelope(serializedMessage,OSF.SerializerVersion.Browser); + serializerVersion = messageObject._serializerVersion != null ? messageObject._serializerVersion : serializerVersion + } + catch(ex) + { + return + } + if(messageObject._messageType === Microsoft.Office.Common.MessageType.request) + { + var requesterUrl = e.origin == null || e.origin == "null" ? messageObject._origin : e.origin; + try + { + var serviceEndPoint = _lookupServiceEndPoint(messageObject._conversationId); + var conversation = serviceEndPoint._conversations[messageObject._conversationId]; + serializerVersion = conversation.serializerVersion != null ? conversation.serializerVersion : serializerVersion; + var allowedDomains = [conversation.url].concat(serviceEndPoint._appDomains[messageObject._conversationId]); + if(!_checkOriginWithAppDomains(allowedDomains,e.origin)) + if(!OfficeExt.appSpecificCheckOrigin(allowedDomains,e,messageObject._origin,_checkOriginWithAppDomains)) + throw"Failed origin check"; + var policyManager = serviceEndPoint.getPolicyManager(); + if(policyManager && !policyManager.checkPermission(messageObject._conversationId,messageObject._actionName,messageObject._data)) + throw"Access Denied"; + var methodObject = _lookupMethodObject(serviceEndPoint,messageObject); + var invokeCompleteCallback = new Microsoft.Office.Common.InvokeCompleteCallback(e.source,requesterUrl,messageObject._actionName,messageObject._conversationId,messageObject._correlationId,_postCallbackHandler,serializerVersion); + var invoker = new Microsoft.Office.Common.Invoker(methodObject,messageObject._data,invokeCompleteCallback,serviceEndPoint._eventHandlerProxyList,messageObject._conversationId,messageObject._actionName,serializerVersion); + var shouldEnque = true; + if(_messageProcessingTimer == null) + if((_lastMessageProcessTime == null || (new Date).getTime() - _lastMessageProcessTime > _processInterval) && !_blockingFlag) + { + _executeCommand(invoker); + shouldEnque = false + } + else + _messageProcessingTimer = setInterval(_dequeInvoker,_processInterval); + if(shouldEnque) + _enqueInvoker(invoker) + } + catch(ex) + { + if(serviceEndPoint && serviceEndPoint._onHandleRequestError) + serviceEndPoint._onHandleRequestError(messageObject,ex); + var errorCode = Microsoft.Office.Common.InvokeResultCode.errorHandlingRequest; + if(ex == "Access Denied") + errorCode = Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied; + var callResponse = new Microsoft.Office.Common.Response(messageObject._actionName,messageObject._conversationId,messageObject._correlationId,errorCode,Microsoft.Office.Common.ResponseType.forCalling,ex); + var envelopedResult = Microsoft.Office.Common.MessagePackager.envelope(callResponse,serializerVersion); + var canPostMessage = false; + try + { + canPostMessage = !!(e.source && e.source.postMessage) + } + catch(ex){} + if(canPostMessage) + e.source.postMessage(envelopedResult,requesterUrl) + } + } + else if(messageObject._messageType === Microsoft.Office.Common.MessageType.response) + { + var clientEndPoint = _lookupClientEndPoint(messageObject._conversationId); + if(!clientEndPoint) + return; + clientEndPoint._serializerVersion = serializerVersion; + if(!_checkOrigin(clientEndPoint._targetUrl,e.origin)) + throw"Failed orgin check"; + if(messageObject._responseType === Microsoft.Office.Common.ResponseType.forCalling) + { + var callbackEntry = clientEndPoint._callbackList[messageObject._correlationId]; + if(callbackEntry) + try + { + if(callbackEntry.callback) + callbackEntry.callback(messageObject._errorCode,messageObject._data) + } + finally + { + delete clientEndPoint._callbackList[messageObject._correlationId] + } + } + else + { + var eventhandler = clientEndPoint._eventHandlerList[messageObject._actionName]; + if(eventhandler !== undefined && eventhandler !== null) + eventhandler(messageObject._data) + } + } + else + return + } + } + function _initialize() + { + if(!_initialized) + { + _registerListener(_receive); + _initialized = true + } + } + return{ + connect: function Microsoft_Office_Common_XdmCommunicationManager$connect(conversationId, targetWindow, targetUrl, serializerVersion) + { + var clientEndPoint = _clientEndPoints[conversationId]; + if(!clientEndPoint) + { + _initialize(); + clientEndPoint = new Microsoft.Office.Common.ClientEndPoint(conversationId,targetWindow,targetUrl,serializerVersion); + _clientEndPoints[conversationId] = clientEndPoint + } + return clientEndPoint + }, + getClientEndPoint: function Microsoft_Office_Common_XdmCommunicationManager$getClientEndPoint(conversationId) + { + var e = Function._validateParams(arguments,[{ + name: "conversationId", + type: String, + mayBeNull: false + }]); + if(e) + throw e; + return _clientEndPoints[conversationId] + }, + createServiceEndPoint: function Microsoft_Office_Common_XdmCommunicationManager$createServiceEndPoint(serviceEndPointId) + { + _initialize(); + var serviceEndPoint = new Microsoft.Office.Common.ServiceEndPoint(serviceEndPointId); + _serviceEndPoints[serviceEndPointId] = serviceEndPoint; + return serviceEndPoint + }, + getServiceEndPoint: function Microsoft_Office_Common_XdmCommunicationManager$getServiceEndPoint(serviceEndPointId) + { + var e = Function._validateParams(arguments,[{ + name: "serviceEndPointId", + type: String, + mayBeNull: false + }]); + if(e) + throw e; + return _serviceEndPoints[serviceEndPointId] + }, + deleteClientEndPoint: function Microsoft_Office_Common_XdmCommunicationManager$deleteClientEndPoint(conversationId) + { + var e = Function._validateParams(arguments,[{ + name: "conversationId", + type: String, + mayBeNull: false + }]); + if(e) + throw e; + delete _clientEndPoints[conversationId] + }, + deleteServiceEndPoint: function Microsoft_Office_Common_XdmCommunicationManager$deleteServiceEndPoint(serviceEndPointId) + { + var e = Function._validateParams(arguments,[{ + name: "serviceEndPointId", + type: String, + mayBeNull: false + }]); + if(e) + throw e; + delete _serviceEndPoints[serviceEndPointId] + }, + checkUrlWithAppDomains: function Microsoft_Office_Common_XdmCommunicationManager$_checkUrlWithAppDomains(appDomains, origin) + { + return _checkOriginWithAppDomains(appDomains,origin) + }, + _setMethodTimeout: function Microsoft_Office_Common_XdmCommunicationManager$_setMethodTimeout(methodTimeout) + { + var e = Function._validateParams(arguments,[{ + name: "methodTimeout", + type: Number, + mayBeNull: false + }]); + if(e) + throw e; + _methodTimeout = methodTimeout <= 0 ? _methodTimeoutDefault : methodTimeout + }, + _startMethodTimeoutTimer: function Microsoft_Office_Common_XdmCommunicationManager$_startMethodTimeoutTimer() + { + if(!_methodTimeoutTimer) + _methodTimeoutTimer = setInterval(_checkMethodTimeout,_methodTimeoutProcessInterval) + } + } }(); -Microsoft.Office.Common.Message=function Microsoft_Office_Common_Message(messageType, actionName, conversationId, correlationId, data) +Microsoft.Office.Common.Message = function Microsoft_Office_Common_Message(messageType, actionName, conversationId, correlationId, data) { - var e=Function._validateParams(arguments,[{ - name: "messageType", - type: Number, - mayBeNull: false - },{ - name: "actionName", - type: String, - mayBeNull: false - },{ - name: "conversationId", - type: String, - mayBeNull: false - },{ - name: "correlationId", - mayBeNull: false - },{ - name: "data", - mayBeNull: true, - optional: true - }]); - if(e) - throw e; - this._messageType=messageType; - this._actionName=actionName; - this._conversationId=conversationId; - this._correlationId=correlationId; - this._origin=window.location.href; - if(typeof data=="undefined") - this._data=null; - else - this._data=data -}; -Microsoft.Office.Common.Message.prototype={ - getActionName: function Microsoft_Office_Common_Message$getActionName() - { - return this._actionName - }, - getConversationId: function Microsoft_Office_Common_Message$getConversationId() - { - return this._conversationId - }, - getCorrelationId: function Microsoft_Office_Common_Message$getCorrelationId() - { - return this._correlationId - }, - getOrigin: function Microsoft_Office_Common_Message$getOrigin() - { - return this._origin - }, - getData: function Microsoft_Office_Common_Message$getData() - { - return this._data - }, - getMessageType: function Microsoft_Office_Common_Message$getMessageType() - { - return this._messageType - } -}; -Microsoft.Office.Common.Request=function Microsoft_Office_Common_Request(actionName, actionType, conversationId, correlationId, data) + var e = Function._validateParams(arguments,[{ + name: "messageType", + type: Number, + mayBeNull: false + },{ + name: "actionName", + type: String, + mayBeNull: false + },{ + name: "conversationId", + type: String, + mayBeNull: false + },{ + name: "correlationId", + mayBeNull: false + },{ + name: "data", + mayBeNull: true, + optional: true + }]); + if(e) + throw e; + this._messageType = messageType; + this._actionName = actionName; + this._conversationId = conversationId; + this._correlationId = correlationId; + this._origin = window.location.href; + if(typeof data == "undefined") + this._data = null; + else + this._data = data +}; +Microsoft.Office.Common.Message.prototype = { + getActionName: function Microsoft_Office_Common_Message$getActionName() + { + return this._actionName + }, + getConversationId: function Microsoft_Office_Common_Message$getConversationId() + { + return this._conversationId + }, + getCorrelationId: function Microsoft_Office_Common_Message$getCorrelationId() + { + return this._correlationId + }, + getOrigin: function Microsoft_Office_Common_Message$getOrigin() + { + return this._origin + }, + getData: function Microsoft_Office_Common_Message$getData() + { + return this._data + }, + getMessageType: function Microsoft_Office_Common_Message$getMessageType() + { + return this._messageType + } +}; +Microsoft.Office.Common.Request = function Microsoft_Office_Common_Request(actionName, actionType, conversationId, correlationId, data) { - Microsoft.Office.Common.Request.uber.constructor.call(this,Microsoft.Office.Common.MessageType.request,actionName,conversationId,correlationId,data); - this._actionType=actionType + Microsoft.Office.Common.Request.uber.constructor.call(this,Microsoft.Office.Common.MessageType.request,actionName,conversationId,correlationId,data); + this._actionType = actionType }; OSF.OUtil.extend(Microsoft.Office.Common.Request,Microsoft.Office.Common.Message); -Microsoft.Office.Common.Request.prototype.getActionType=function Microsoft_Office_Common_Request$getActionType() +Microsoft.Office.Common.Request.prototype.getActionType = function Microsoft_Office_Common_Request$getActionType() { - return this._actionType + return this._actionType }; -Microsoft.Office.Common.Response=function Microsoft_Office_Common_Response(actionName, conversationId, correlationId, errorCode, responseType, data) +Microsoft.Office.Common.Response = function Microsoft_Office_Common_Response(actionName, conversationId, correlationId, errorCode, responseType, data) { - Microsoft.Office.Common.Response.uber.constructor.call(this,Microsoft.Office.Common.MessageType.response,actionName,conversationId,correlationId,data); - this._errorCode=errorCode; - this._responseType=responseType + Microsoft.Office.Common.Response.uber.constructor.call(this,Microsoft.Office.Common.MessageType.response,actionName,conversationId,correlationId,data); + this._errorCode = errorCode; + this._responseType = responseType }; OSF.OUtil.extend(Microsoft.Office.Common.Response,Microsoft.Office.Common.Message); -Microsoft.Office.Common.Response.prototype.getErrorCode=function Microsoft_Office_Common_Response$getErrorCode() +Microsoft.Office.Common.Response.prototype.getErrorCode = function Microsoft_Office_Common_Response$getErrorCode() { - return this._errorCode + return this._errorCode }; -Microsoft.Office.Common.Response.prototype.getResponseType=function Microsoft_Office_Common_Response$getResponseType() +Microsoft.Office.Common.Response.prototype.getResponseType = function Microsoft_Office_Common_Response$getResponseType() { - return this._responseType -}; -Microsoft.Office.Common.MessagePackager={ - envelope: function Microsoft_Office_Common_MessagePackager$envelope(messageObject, serializerVersion) - { - if(typeof messageObject==="object") - messageObject._serializerVersion=OSF.SerializerVersion.Browser; - return JSON.stringify(messageObject) - }, - unenvelope: function Microsoft_Office_Common_MessagePackager$unenvelope(messageObject, serializerVersion) - { - return JSON.parse(messageObject) - } -}; -Microsoft.Office.Common.ResponseSender=function Microsoft_Office_Common_ResponseSender(requesterWindow, requesterUrl, actionName, conversationId, correlationId, responseType, serializerVersion) + return this._responseType +}; +Microsoft.Office.Common.MessagePackager = { + envelope: function Microsoft_Office_Common_MessagePackager$envelope(messageObject, serializerVersion) + { + if(typeof messageObject === "object") + messageObject._serializerVersion = OSF.SerializerVersion.Browser; + return JSON.stringify(messageObject) + }, + unenvelope: function Microsoft_Office_Common_MessagePackager$unenvelope(messageObject, serializerVersion) + { + return JSON.parse(messageObject) + } +}; +Microsoft.Office.Common.ResponseSender = function Microsoft_Office_Common_ResponseSender(requesterWindow, requesterUrl, actionName, conversationId, correlationId, responseType, serializerVersion) { - var e=Function._validateParams(arguments,[{ - name: "requesterWindow", - mayBeNull: false - },{ - name: "requesterUrl", - type: String, - mayBeNull: false - },{ - name: "actionName", - type: String, - mayBeNull: false - },{ - name: "conversationId", - type: String, - mayBeNull: false - },{ - name: "correlationId", - mayBeNull: false - },{ - name: "responsetype", - type: Number, - maybeNull: false - },{ - name: "serializerVersion", - type: Number, - maybeNull: true, - optional: true - }]); - if(e) - throw e; - this._requesterWindow=requesterWindow; - this._requesterUrl=requesterUrl; - this._actionName=actionName; - this._conversationId=conversationId; - this._correlationId=correlationId; - this._invokeResultCode=Microsoft.Office.Common.InvokeResultCode.noError; - this._responseType=responseType; - var me=this; - this._send=function(result) - { - try - { - var response=new Microsoft.Office.Common.Response(me._actionName,me._conversationId,me._correlationId,me._invokeResultCode,me._responseType,result); - var envelopedResult=Microsoft.Office.Common.MessagePackager.envelope(response,serializerVersion); - me._requesterWindow.postMessage(envelopedResult,me._requesterUrl) - } - catch(ex) - { - OsfMsAjaxFactory.msAjaxDebug.trace("ResponseSender._send error:"+ex.message) - } - } -}; -Microsoft.Office.Common.ResponseSender.prototype={ - getRequesterWindow: function Microsoft_Office_Common_ResponseSender$getRequesterWindow() - { - return this._requesterWindow - }, - getRequesterUrl: function Microsoft_Office_Common_ResponseSender$getRequesterUrl() - { - return this._requesterUrl - }, - getActionName: function Microsoft_Office_Common_ResponseSender$getActionName() - { - return this._actionName - }, - getConversationId: function Microsoft_Office_Common_ResponseSender$getConversationId() - { - return this._conversationId - }, - getCorrelationId: function Microsoft_Office_Common_ResponseSender$getCorrelationId() - { - return this._correlationId - }, - getSend: function Microsoft_Office_Common_ResponseSender$getSend() - { - return this._send - }, - setResultCode: function Microsoft_Office_Common_ResponseSender$setResultCode(resultCode) - { - this._invokeResultCode=resultCode - } -}; -Microsoft.Office.Common.InvokeCompleteCallback=function Microsoft_Office_Common_InvokeCompleteCallback(requesterWindow, requesterUrl, actionName, conversationId, correlationId, postCallbackHandler, serializerVersion) + var e = Function._validateParams(arguments,[{ + name: "requesterWindow", + mayBeNull: false + },{ + name: "requesterUrl", + type: String, + mayBeNull: false + },{ + name: "actionName", + type: String, + mayBeNull: false + },{ + name: "conversationId", + type: String, + mayBeNull: false + },{ + name: "correlationId", + mayBeNull: false + },{ + name: "responsetype", + type: Number, + maybeNull: false + },{ + name: "serializerVersion", + type: Number, + maybeNull: true, + optional: true + }]); + if(e) + throw e; + this._requesterWindow = requesterWindow; + this._requesterUrl = requesterUrl; + this._actionName = actionName; + this._conversationId = conversationId; + this._correlationId = correlationId; + this._invokeResultCode = Microsoft.Office.Common.InvokeResultCode.noError; + this._responseType = responseType; + var me = this; + this._send = function(result) + { + try + { + var response = new Microsoft.Office.Common.Response(me._actionName,me._conversationId,me._correlationId,me._invokeResultCode,me._responseType,result); + var envelopedResult = Microsoft.Office.Common.MessagePackager.envelope(response,serializerVersion); + me._requesterWindow.postMessage(envelopedResult,me._requesterUrl) + } + catch(ex) + { + OsfMsAjaxFactory.msAjaxDebug.trace("ResponseSender._send error:" + ex.message) + } + } +}; +Microsoft.Office.Common.ResponseSender.prototype = { + getRequesterWindow: function Microsoft_Office_Common_ResponseSender$getRequesterWindow() + { + return this._requesterWindow + }, + getRequesterUrl: function Microsoft_Office_Common_ResponseSender$getRequesterUrl() + { + return this._requesterUrl + }, + getActionName: function Microsoft_Office_Common_ResponseSender$getActionName() + { + return this._actionName + }, + getConversationId: function Microsoft_Office_Common_ResponseSender$getConversationId() + { + return this._conversationId + }, + getCorrelationId: function Microsoft_Office_Common_ResponseSender$getCorrelationId() + { + return this._correlationId + }, + getSend: function Microsoft_Office_Common_ResponseSender$getSend() + { + return this._send + }, + setResultCode: function Microsoft_Office_Common_ResponseSender$setResultCode(resultCode) + { + this._invokeResultCode = resultCode + } +}; +Microsoft.Office.Common.InvokeCompleteCallback = function Microsoft_Office_Common_InvokeCompleteCallback(requesterWindow, requesterUrl, actionName, conversationId, correlationId, postCallbackHandler, serializerVersion) { - Microsoft.Office.Common.InvokeCompleteCallback.uber.constructor.call(this,requesterWindow,requesterUrl,actionName,conversationId,correlationId,Microsoft.Office.Common.ResponseType.forCalling,serializerVersion); - this._postCallbackHandler=postCallbackHandler; - var me=this; - this._send=function(result, responseCode) - { - if(responseCode !=undefined) - me._invokeResultCode=responseCode; - try - { - var response=new Microsoft.Office.Common.Response(me._actionName,me._conversationId,me._correlationId,me._invokeResultCode,me._responseType,result); - var envelopedResult=Microsoft.Office.Common.MessagePackager.envelope(response,serializerVersion); - me._requesterWindow.postMessage(envelopedResult,me._requesterUrl); - me._postCallbackHandler() - } - catch(ex) - { - OsfMsAjaxFactory.msAjaxDebug.trace("InvokeCompleteCallback._send error:"+ex.message) - } - } + Microsoft.Office.Common.InvokeCompleteCallback.uber.constructor.call(this,requesterWindow,requesterUrl,actionName,conversationId,correlationId,Microsoft.Office.Common.ResponseType.forCalling,serializerVersion); + this._postCallbackHandler = postCallbackHandler; + var me = this; + this._send = function(result, responseCode) + { + if(responseCode != undefined) + me._invokeResultCode = responseCode; + try + { + var response = new Microsoft.Office.Common.Response(me._actionName,me._conversationId,me._correlationId,me._invokeResultCode,me._responseType,result); + var envelopedResult = Microsoft.Office.Common.MessagePackager.envelope(response,serializerVersion); + me._requesterWindow.postMessage(envelopedResult,me._requesterUrl); + me._postCallbackHandler() + } + catch(ex) + { + OsfMsAjaxFactory.msAjaxDebug.trace("InvokeCompleteCallback._send error:" + ex.message) + } + } }; OSF.OUtil.extend(Microsoft.Office.Common.InvokeCompleteCallback,Microsoft.Office.Common.ResponseSender); -Microsoft.Office.Common.Invoker=function Microsoft_Office_Common_Invoker(methodObject, paramValue, invokeCompleteCallback, eventHandlerProxyList, conversationId, eventName, serializerVersion) +Microsoft.Office.Common.Invoker = function Microsoft_Office_Common_Invoker(methodObject, paramValue, invokeCompleteCallback, eventHandlerProxyList, conversationId, eventName, serializerVersion) { - var e=Function._validateParams(arguments,[{ - name: "methodObject", - mayBeNull: false - },{ - name: "paramValue", - mayBeNull: true - },{ - name: "invokeCompleteCallback", - mayBeNull: false - },{ - name: "eventHandlerProxyList", - mayBeNull: true - },{ - name: "conversationId", - type: String, - mayBeNull: false - },{ - name: "eventName", - type: String, - mayBeNull: false - },{ - name: "serializerVersion", - type: Number, - mayBeNull: true, - optional: true - }]); - if(e) - throw e; - this._methodObject=methodObject; - this._param=paramValue; - this._invokeCompleteCallback=invokeCompleteCallback; - this._eventHandlerProxyList=eventHandlerProxyList; - this._conversationId=conversationId; - this._eventName=eventName; - this._serializerVersion=serializerVersion -}; -Microsoft.Office.Common.Invoker.prototype={ - invoke: function Microsoft_Office_Common_Invoker$invoke() - { - try - { - var result; - switch(this._methodObject.getInvokeType()) - { - case Microsoft.Office.Common.InvokeType.async: - this._methodObject.getMethod()(this._param,this._invokeCompleteCallback.getSend()); - break; - case Microsoft.Office.Common.InvokeType.sync: - result=this._methodObject.getMethod()(this._param); - this._invokeCompleteCallback.getSend()(result); - break; - case Microsoft.Office.Common.InvokeType.syncRegisterEvent: - var eventHandlerProxy=this._createEventHandlerProxyObject(this._invokeCompleteCallback); - result=this._methodObject.getMethod()(eventHandlerProxy.getSend(),this._param); - this._eventHandlerProxyList[this._conversationId+this._eventName]=eventHandlerProxy.getSend(); - this._invokeCompleteCallback.getSend()(result); - break; - case Microsoft.Office.Common.InvokeType.syncUnregisterEvent: - var eventHandler=this._eventHandlerProxyList[this._conversationId+this._eventName]; - result=this._methodObject.getMethod()(eventHandler,this._param); - delete this._eventHandlerProxyList[this._conversationId+this._eventName]; - this._invokeCompleteCallback.getSend()(result); - break; - case Microsoft.Office.Common.InvokeType.asyncRegisterEvent: - var eventHandlerProxyAsync=this._createEventHandlerProxyObject(this._invokeCompleteCallback); - this._methodObject.getMethod()(eventHandlerProxyAsync.getSend(),this._invokeCompleteCallback.getSend(),this._param); - this._eventHandlerProxyList[this._callerId+this._eventName]=eventHandlerProxyAsync.getSend(); - break; - case Microsoft.Office.Common.InvokeType.asyncUnregisterEvent: - var eventHandlerAsync=this._eventHandlerProxyList[this._callerId+this._eventName]; - this._methodObject.getMethod()(eventHandlerAsync,this._invokeCompleteCallback.getSend(),this._param); - delete this._eventHandlerProxyList[this._callerId+this._eventName]; - break; - default: - break - } - } - catch(ex) - { - this._invokeCompleteCallback.setResultCode(Microsoft.Office.Common.InvokeResultCode.errorInResponse); - this._invokeCompleteCallback.getSend()(ex) - } - }, - getInvokeBlockingFlag: function Microsoft_Office_Common_Invoker$getInvokeBlockingFlag() - { - return this._methodObject.getBlockingFlag() - }, - _createEventHandlerProxyObject: function Microsoft_Office_Common_Invoker$_createEventHandlerProxyObject(invokeCompleteObject) - { - return new Microsoft.Office.Common.ResponseSender(invokeCompleteObject.getRequesterWindow(),invokeCompleteObject.getRequesterUrl(),invokeCompleteObject.getActionName(),invokeCompleteObject.getConversationId(),invokeCompleteObject.getCorrelationId(),Microsoft.Office.Common.ResponseType.forEventing,this._serializerVersion) - } + var e = Function._validateParams(arguments,[{ + name: "methodObject", + mayBeNull: false + },{ + name: "paramValue", + mayBeNull: true + },{ + name: "invokeCompleteCallback", + mayBeNull: false + },{ + name: "eventHandlerProxyList", + mayBeNull: true + },{ + name: "conversationId", + type: String, + mayBeNull: false + },{ + name: "eventName", + type: String, + mayBeNull: false + },{ + name: "serializerVersion", + type: Number, + mayBeNull: true, + optional: true + }]); + if(e) + throw e; + this._methodObject = methodObject; + this._param = paramValue; + this._invokeCompleteCallback = invokeCompleteCallback; + this._eventHandlerProxyList = eventHandlerProxyList; + this._conversationId = conversationId; + this._eventName = eventName; + this._serializerVersion = serializerVersion +}; +Microsoft.Office.Common.Invoker.prototype = { + invoke: function Microsoft_Office_Common_Invoker$invoke() + { + try + { + var result; + switch(this._methodObject.getInvokeType()) + { + case Microsoft.Office.Common.InvokeType.async: + this._methodObject.getMethod()(this._param,this._invokeCompleteCallback.getSend()); + break; + case Microsoft.Office.Common.InvokeType.sync: + result = this._methodObject.getMethod()(this._param); + this._invokeCompleteCallback.getSend()(result); + break; + case Microsoft.Office.Common.InvokeType.syncRegisterEvent: + var eventHandlerProxy = this._createEventHandlerProxyObject(this._invokeCompleteCallback); + result = this._methodObject.getMethod()(eventHandlerProxy.getSend(),this._param); + this._eventHandlerProxyList[this._conversationId + this._eventName] = eventHandlerProxy.getSend(); + this._invokeCompleteCallback.getSend()(result); + break; + case Microsoft.Office.Common.InvokeType.syncUnregisterEvent: + var eventHandler = this._eventHandlerProxyList[this._conversationId + this._eventName]; + result = this._methodObject.getMethod()(eventHandler,this._param); + delete this._eventHandlerProxyList[this._conversationId + this._eventName]; + this._invokeCompleteCallback.getSend()(result); + break; + case Microsoft.Office.Common.InvokeType.asyncRegisterEvent: + var eventHandlerProxyAsync = this._createEventHandlerProxyObject(this._invokeCompleteCallback); + this._methodObject.getMethod()(eventHandlerProxyAsync.getSend(),this._invokeCompleteCallback.getSend(),this._param); + this._eventHandlerProxyList[this._callerId + this._eventName] = eventHandlerProxyAsync.getSend(); + break; + case Microsoft.Office.Common.InvokeType.asyncUnregisterEvent: + var eventHandlerAsync = this._eventHandlerProxyList[this._callerId + this._eventName]; + this._methodObject.getMethod()(eventHandlerAsync,this._invokeCompleteCallback.getSend(),this._param); + delete this._eventHandlerProxyList[this._callerId + this._eventName]; + break; + default: + break + } + } + catch(ex) + { + this._invokeCompleteCallback.setResultCode(Microsoft.Office.Common.InvokeResultCode.errorInResponse); + this._invokeCompleteCallback.getSend()(ex) + } + }, + getInvokeBlockingFlag: function Microsoft_Office_Common_Invoker$getInvokeBlockingFlag() + { + return this._methodObject.getBlockingFlag() + }, + _createEventHandlerProxyObject: function Microsoft_Office_Common_Invoker$_createEventHandlerProxyObject(invokeCompleteObject) + { + return new Microsoft.Office.Common.ResponseSender(invokeCompleteObject.getRequesterWindow(),invokeCompleteObject.getRequesterUrl(),invokeCompleteObject.getActionName(),invokeCompleteObject.getConversationId(),invokeCompleteObject.getCorrelationId(),Microsoft.Office.Common.ResponseType.forEventing,this._serializerVersion) + } }; OSF.OUtil.setNamespace("WAC",OSF.DDA); -OSF.DDA.WAC.UniqueArguments={ - Data: "Data", - Properties: "Properties", - BindingRequest: "DdaBindingsMethod", - BindingResponse: "Bindings", - SingleBindingResponse: "singleBindingResponse", - GetData: "DdaGetBindingData", - AddRowsColumns: "DdaAddRowsColumns", - SetData: "DdaSetBindingData", - ClearFormats: "DdaClearBindingFormats", - SetFormats: "DdaSetBindingFormats", - SettingsRequest: "DdaSettingsMethod", - BindingEventSource: "ddaBinding", - ArrayData: "ArrayData" +OSF.DDA.WAC.UniqueArguments = { + Data: "Data", + Properties: "Properties", + BindingRequest: "DdaBindingsMethod", + BindingResponse: "Bindings", + SingleBindingResponse: "singleBindingResponse", + GetData: "DdaGetBindingData", + AddRowsColumns: "DdaAddRowsColumns", + SetData: "DdaSetBindingData", + ClearFormats: "DdaClearBindingFormats", + SetFormats: "DdaSetBindingFormats", + SettingsRequest: "DdaSettingsMethod", + BindingEventSource: "ddaBinding", + ArrayData: "ArrayData" }; OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC); -OSF.DDA.WAC.Delegate.SpecialProcessor=function OSF_DDA_WAC_Delegate_SpecialProcessor() +OSF.DDA.WAC.Delegate.SpecialProcessor = function OSF_DDA_WAC_Delegate_SpecialProcessor() { - var complexTypes=[OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,OSF.DDA.WAC.UniqueArguments.BindingRequest,OSF.DDA.WAC.UniqueArguments.BindingResponse,OSF.DDA.WAC.UniqueArguments.GetData,OSF.DDA.WAC.UniqueArguments.AddRowsColumns,OSF.DDA.WAC.UniqueArguments.SetData,OSF.DDA.WAC.UniqueArguments.ClearFormats,OSF.DDA.WAC.UniqueArguments.SetFormats,OSF.DDA.WAC.UniqueArguments.SettingsRequest,OSF.DDA.WAC.UniqueArguments.BindingEventSource]; - var dynamicTypes={}; - OSF.DDA.WAC.Delegate.SpecialProcessor.uber.constructor.call(this,complexTypes,dynamicTypes) + var complexTypes = [OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,OSF.DDA.WAC.UniqueArguments.BindingRequest,OSF.DDA.WAC.UniqueArguments.BindingResponse,OSF.DDA.WAC.UniqueArguments.GetData,OSF.DDA.WAC.UniqueArguments.AddRowsColumns,OSF.DDA.WAC.UniqueArguments.SetData,OSF.DDA.WAC.UniqueArguments.ClearFormats,OSF.DDA.WAC.UniqueArguments.SetFormats,OSF.DDA.WAC.UniqueArguments.SettingsRequest,OSF.DDA.WAC.UniqueArguments.BindingEventSource]; + var dynamicTypes = {}; + OSF.DDA.WAC.Delegate.SpecialProcessor.uber.constructor.call(this,complexTypes,dynamicTypes) }; OSF.OUtil.extend(OSF.DDA.WAC.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor); -OSF.DDA.WAC.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.WAC.Delegate.SpecialProcessor,[]); +OSF.DDA.WAC.Delegate.ParameterMap = OSF.DDA.getDecoratedParameterMap(new OSF.DDA.WAC.Delegate.SpecialProcessor,[]); OSF.OUtil.setNamespace("WAC",OSF.DDA); OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC); -OSF.DDA.WAC.getDelegateMethods=function OSF_DDA_WAC_getDelegateMethods() +OSF.DDA.WAC.getDelegateMethods = function OSF_DDA_WAC_getDelegateMethods() { - var delegateMethods={}; - delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.WAC.Delegate.executeAsync; - delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.WAC.Delegate.registerEventAsync; - delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.WAC.Delegate.unregisterEventAsync; - delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog]=OSF.DDA.WAC.Delegate.openDialog; - delegateMethods[OSF.DDA.DispIdHost.Delegates.MessageParent]=OSF.DDA.WAC.Delegate.messageParent; - delegateMethods[OSF.DDA.DispIdHost.Delegates.SendMessage]=OSF.DDA.WAC.Delegate.sendMessage; - delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog]=OSF.DDA.WAC.Delegate.closeDialog; - return delegateMethods -}; -OSF.DDA.WAC.Delegate.version=1; -OSF.DDA.WAC.Delegate.executeAsync=function OSF_DDA_WAC_Delegate$executeAsync(args) + var delegateMethods = {}; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.WAC.Delegate.executeAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync] = OSF.DDA.WAC.Delegate.registerEventAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync] = OSF.DDA.WAC.Delegate.unregisterEventAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] = OSF.DDA.WAC.Delegate.openDialog; + delegateMethods[OSF.DDA.DispIdHost.Delegates.MessageParent] = OSF.DDA.WAC.Delegate.messageParent; + delegateMethods[OSF.DDA.DispIdHost.Delegates.SendMessage] = OSF.DDA.WAC.Delegate.sendMessage; + delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] = OSF.DDA.WAC.Delegate.closeDialog; + return delegateMethods +}; +OSF.DDA.WAC.Delegate.version = 1; +OSF.DDA.WAC.Delegate.executeAsync = function OSF_DDA_WAC_Delegate$executeAsync(args) { - if(!args.hostCallArgs) - args.hostCallArgs={}; - args.hostCallArgs["DdaMethod"]={ - ControlId: OSF._OfficeAppFactory.getId(), - Version: OSF.DDA.WAC.Delegate.version, - DispatchId: args.dispId - }; - args.hostCallArgs["__timeout__"]=-1; - if(args.onCalling) - args.onCalling(); - var startTime=(new Date).getTime(); - OSF.getClientEndPoint().invoke("executeMethod",function OSF_DDA_WAC_Delegate$OMFacade$OnResponse(xdmStatus, payload) - { - if(args.onReceiving) - args.onReceiving(); - var error; - if(xdmStatus==Microsoft.Office.Common.InvokeResultCode.noError) - { - OSF.DDA.WAC.Delegate.version=payload["Version"]; - error=payload["Error"] - } - else - switch(xdmStatus) - { - case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied: - error=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; - break; - default: - error=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; - break - } - if(args.onComplete) - args.onComplete(error,payload); - if(OSF.AppTelemetry) - OSF.AppTelemetry.onMethodDone(args.dispId,args.hostCallArgs,Math.abs((new Date).getTime() - startTime),error) - },args.hostCallArgs) -}; -OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent=function OSF_DDA_WAC_Delegate$GetOnAfterRegisterEvent(register, args) + if(!args.hostCallArgs) + args.hostCallArgs = {}; + args.hostCallArgs["DdaMethod"] = { + ControlId: OSF._OfficeAppFactory.getId(), + Version: OSF.DDA.WAC.Delegate.version, + DispatchId: args.dispId + }; + args.hostCallArgs["__timeout__"] = -1; + if(args.onCalling) + args.onCalling(); + if(!OSF.getClientEndPoint()) + return; + OSF.getClientEndPoint().invoke("executeMethod",function OSF_DDA_WAC_Delegate$OMFacade$OnResponse(xdmStatus, payload) + { + if(args.onReceiving) + args.onReceiving(); + var error; + if(xdmStatus == Microsoft.Office.Common.InvokeResultCode.noError) + { + OSF.DDA.WAC.Delegate.version = payload["Version"]; + error = payload["Error"] + } + else + switch(xdmStatus) + { + case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied: + error = OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; + break; + default: + error = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + break + } + if(args.onComplete) + args.onComplete(error,payload) + },args.hostCallArgs) +}; +OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent = function OSF_DDA_WAC_Delegate$GetOnAfterRegisterEvent(register, args) { - var startTime=(new Date).getTime(); - return function OSF_DDA_WAC_Delegate$OnAfterRegisterEvent(xdmStatus, payload) - { - if(args.onReceiving) - args.onReceiving(); - var status; - if(xdmStatus !=Microsoft.Office.Common.InvokeResultCode.noError) - switch(xdmStatus) - { - case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied: - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; - break; - default: - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; - break - } - else if(payload) - if(payload["Error"]) - status=payload["Error"]; - else - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; - else - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; - if(args.onComplete) - args.onComplete(status); - if(OSF.AppTelemetry) - OSF.AppTelemetry.onRegisterDone(register,args.dispId,Math.abs((new Date).getTime() - startTime),status) - } -}; -OSF.DDA.WAC.Delegate.registerEventAsync=function OSF_DDA_WAC_Delegate$RegisterEventAsync(args) + var startTime = (new Date).getTime(); + return function OSF_DDA_WAC_Delegate$OnAfterRegisterEvent(xdmStatus, payload) + { + if(args.onReceiving) + args.onReceiving(); + var status; + if(xdmStatus != Microsoft.Office.Common.InvokeResultCode.noError) + switch(xdmStatus) + { + case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; + break; + default: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + break + } + else if(payload) + if(payload["Error"]) + status = payload["Error"]; + else + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; + else + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + if(args.onComplete) + args.onComplete(status); + if(OSF.AppTelemetry) + OSF.AppTelemetry.onRegisterDone(register,args.dispId,Math.abs((new Date).getTime() - startTime),status) + } +}; +OSF.DDA.WAC.Delegate.registerEventAsync = function OSF_DDA_WAC_Delegate$RegisterEventAsync(args) { - if(args.onCalling) - args.onCalling(); - OSF.getClientEndPoint().registerForEvent(OSF.DDA.getXdmEventName(args.targetId,args.eventType),function OSF_DDA_WACOMFacade$OnEvent(payload) - { - if(args.onEvent) - args.onEvent(payload); - if(OSF.AppTelemetry) - OSF.AppTelemetry.onEventDone(args.dispId) - },OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(true,args),{ - controlId: OSF._OfficeAppFactory.getId(), - eventDispId: args.dispId, - targetId: args.targetId - }) -}; -OSF.DDA.WAC.Delegate.unregisterEventAsync=function OSF_DDA_WAC_Delegate$UnregisterEventAsync(args) + if(args.onCalling) + args.onCalling(); + if(!OSF.getClientEndPoint()) + return; + OSF.getClientEndPoint().registerForEvent(OSF.DDA.getXdmEventName(args.targetId,args.eventType),function OSF_DDA_WACOMFacade$OnEvent(payload) + { + if(args.onEvent) + args.onEvent(payload); + if(OSF.AppTelemetry) + OSF.AppTelemetry.onEventDone(args.dispId) + },OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(true,args),{ + controlId: OSF._OfficeAppFactory.getId(), + eventDispId: args.dispId, + targetId: args.targetId + }) +}; +OSF.DDA.WAC.Delegate.unregisterEventAsync = function OSF_DDA_WAC_Delegate$UnregisterEventAsync(args) { - if(args.onCalling) - args.onCalling(); - OSF.getClientEndPoint().unregisterForEvent(OSF.DDA.getXdmEventName(args.targetId,args.eventType),OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(false,args),{ - controlId: OSF._OfficeAppFactory.getId(), - eventDispId: args.dispId, - targetId: args.targetId - }) + if(args.onCalling) + args.onCalling(); + if(!OSF.getClientEndPoint()) + return; + OSF.getClientEndPoint().unregisterForEvent(OSF.DDA.getXdmEventName(args.targetId,args.eventType),OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(false,args),{ + controlId: OSF._OfficeAppFactory.getId(), + eventDispId: args.dispId, + targetId: args.targetId + }) }; OSF.OUtil.setNamespace("WebApp",OSF); -OSF.WebApp.AddHostInfoAndXdmInfo=function OSF_WebApp$AddHostInfoAndXdmInfo(url) +OSF.WebApp.AddHostInfoAndXdmInfo = function OSF_WebApp$AddHostInfoAndXdmInfo(url) { - if(OSF._OfficeAppFactory.getWindowLocationSearch && OSF._OfficeAppFactory.getWindowLocationHash) - return url+OSF._OfficeAppFactory.getWindowLocationSearch()+OSF._OfficeAppFactory.getWindowLocationHash(); - else - return url + if(OSF._OfficeAppFactory.getWindowLocationSearch && OSF._OfficeAppFactory.getWindowLocationHash) + return url + OSF._OfficeAppFactory.getWindowLocationSearch() + OSF._OfficeAppFactory.getWindowLocationHash(); + else + return url }; -OSF.WebApp._UpdateLinksForHostAndXdmInfo=function OSF_WebApp$_UpdateLinksForHostAndXdmInfo() +OSF.WebApp._UpdateLinksForHostAndXdmInfo = function OSF_WebApp$_UpdateLinksForHostAndXdmInfo() { - var links=document.querySelectorAll("a[data-officejs-navigate]"); - for(var i=0; i < links.length; i++) - if(OSF.WebApp._isGoodUrl(links[i].href)) - links[i].href=OSF.WebApp.AddHostInfoAndXdmInfo(links[i].href); - var forms=document.querySelectorAll("form[data-officejs-navigate]"); - for(var i=0; i < forms.length; i++) - { - var form=forms[i]; - if(OSF.WebApp._isGoodUrl(form.action)) - form.action=OSF.WebApp.AddHostInfoAndXdmInfo(form.action) - } -}; -OSF.WebApp._isGoodUrl=function OSF_WebApp$_isGoodUrl(url) + var links = document.querySelectorAll("a[data-officejs-navigate]"); + for(var i = 0; i < links.length; i++) + if(OSF.WebApp._isGoodUrl(links[i].href)) + links[i].href = OSF.WebApp.AddHostInfoAndXdmInfo(links[i].href); + var forms = document.querySelectorAll("form[data-officejs-navigate]"); + for(var i = 0; i < forms.length; i++) + { + var form = forms[i]; + if(OSF.WebApp._isGoodUrl(form.action)) + form.action = OSF.WebApp.AddHostInfoAndXdmInfo(form.action) + } +}; +OSF.WebApp._isGoodUrl = function OSF_WebApp$_isGoodUrl(url) { - if(typeof url=="undefined") - return false; - url=url.trim(); - var colonIndex=url.indexOf(":"); - var protocol=colonIndex > 0 ? url.substr(0,colonIndex) : null; - var goodUrl=protocol !==null ? protocol.toLowerCase()==="http" || protocol.toLowerCase()==="https" : true; - goodUrl=goodUrl && url !="#" && url !="/" && url !="" && url !=OSF._OfficeAppFactory.getWebAppState().webAppUrl; - return goodUrl -}; -OSF.InitializationHelper=function OSF_InitializationHelper(hostInfo, webAppState, context, settings, hostFacade) + if(typeof url == "undefined") + return false; + url = url.trim(); + var colonIndex = url.indexOf(":"); + var protocol = colonIndex > 0 ? url.substr(0,colonIndex) : null; + var goodUrl = protocol !== null ? protocol.toLowerCase() === "http" || protocol.toLowerCase() === "https" : true; + goodUrl = goodUrl && url != "#" && url != "/" && url != "" && url != OSF._OfficeAppFactory.getWebAppState().webAppUrl; + return goodUrl +}; +OSF.InitializationHelper = function OSF_InitializationHelper(hostInfo, webAppState, context, settings, hostFacade) { - this._hostInfo=hostInfo; - this._webAppState=webAppState; - this._context=context; - this._settings=settings; - this._hostFacade=hostFacade; - this._appContext={}; - this._tabbableElements="a[href]:not([tabindex='-1']),"+"area[href]:not([tabindex='-1']),"+"button:not([disabled]):not([tabindex='-1']),"+"input:not([disabled]):not([tabindex='-1']),"+"select:not([disabled]):not([tabindex='-1']),"+"textarea:not([disabled]):not([tabindex='-1']),"+"*[tabindex]:not([tabindex='-1']),"+"*[contenteditable]:not([disabled]):not([tabindex='-1'])"; - this._initializeSettings=function OSF_InitializationHelper$initializeSettings(appContext, refreshSupported) - { - var settings; - var serializedSettings=appContext.get_settings(); - var osfSessionStorage=OSF.OUtil.getSessionStorage(); - if(osfSessionStorage) - { - var storageSettings=osfSessionStorage.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey()); - if(storageSettings) - serializedSettings=JSON.parse(storageSettings); - else - { - storageSettings=JSON.stringify(serializedSettings); - osfSessionStorage.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),storageSettings) - } - } - var deserializedSettings=OSF.DDA.SettingsManager.deserializeSettings(serializedSettings); - if(refreshSupported) - settings=new OSF.DDA.RefreshableSettings(deserializedSettings); - else - settings=new OSF.DDA.Settings(deserializedSettings); - return settings - }; - var windowOpen=function OSF_InitializationHelper$windowOpen(windowObj) - { - var proxy=window.open; - windowObj.open=function(strUrl, strWindowName, strWindowFeatures) - { - var windowObject=null; - try - { - windowObject=proxy(strUrl,strWindowName,strWindowFeatures) - } - catch(ex) - { - if(OSF.AppTelemetry) - OSF.AppTelemetry.logAppCommonMessage("Exception happens at windowOpen."+ex) - } - if(!windowObject) - { - var params={ - strUrl: strUrl, - strWindowName: strWindowName, - strWindowFeatures: strWindowFeatures - }; - if(OSF._OfficeAppFactory.getClientEndPoint()) - OSF._OfficeAppFactory.getClientEndPoint().invoke("ContextActivationManager_openWindowInHost",null,params) - } - return windowObject - } - }; - windowOpen(window) -}; -OSF.InitializationHelper.prototype.saveAndSetDialogInfo=function OSF_InitializationHelper$saveAndSetDialogInfo(hostInfoValue) + this._hostInfo = hostInfo; + this._webAppState = webAppState; + this._context = context; + this._settings = settings; + this._hostFacade = hostFacade; + this._appContext = {}; + this._tabbableElements = "a[href]:not([tabindex='-1'])," + "area[href]:not([tabindex='-1'])," + "button:not([disabled]):not([tabindex='-1'])," + "input:not([disabled]):not([tabindex='-1'])," + "select:not([disabled]):not([tabindex='-1'])," + "textarea:not([disabled]):not([tabindex='-1'])," + "*[tabindex]:not([tabindex='-1'])," + "*[contenteditable]:not([disabled]):not([tabindex='-1'])"; + this._initializeSettings = function OSF_InitializationHelper$initializeSettings(appContext, refreshSupported) + { + var settings; + var serializedSettings = appContext.get_settings(); + var osfSessionStorage = OSF.OUtil.getSessionStorage(); + if(osfSessionStorage) + { + var storageSettings = osfSessionStorage.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey()); + if(storageSettings) + serializedSettings = JSON.parse(storageSettings); + else + { + storageSettings = JSON.stringify(serializedSettings); + osfSessionStorage.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),storageSettings) + } + } + var deserializedSettings = OSF.DDA.SettingsManager.deserializeSettings(serializedSettings); + if(refreshSupported) + settings = new OSF.DDA.RefreshableSettings(deserializedSettings); + else + settings = new OSF.DDA.Settings(deserializedSettings); + return settings + }; + var windowOpen = function OSF_InitializationHelper$windowOpen(windowObj) + { + var proxy = window.open; + windowObj.open = function(strUrl, strWindowName, strWindowFeatures) + { + var windowObject = null; + try + { + windowObject = proxy(strUrl,strWindowName,strWindowFeatures) + } + catch(ex) + { + if(OSF.AppTelemetry) + OSF.AppTelemetry.logAppCommonMessage("Exception happens at windowOpen." + ex) + } + if(!windowObject) + { + var params = { + strUrl: strUrl, + strWindowName: strWindowName, + strWindowFeatures: strWindowFeatures + }; + if(OSF._OfficeAppFactory.getClientEndPoint()) + OSF._OfficeAppFactory.getClientEndPoint().invoke("ContextActivationManager_openWindowInHost",null,params) + } + return windowObject + } + }; + windowOpen(window) +}; +OSF.InitializationHelper.prototype.saveAndSetDialogInfo = function OSF_InitializationHelper$saveAndSetDialogInfo(hostInfoValue) { - var getAppIdFromWindowLocation=function OSF_InitializationHelper$getAppIdFromWindowLocation() - { - var xdmInfoValue=OSF.OUtil.parseXdmInfo(true); - if(xdmInfoValue) - { - var items=xdmInfoValue.split("|"); - return items[1] - } - return null - }; - var osfSessionStorage=OSF.OUtil.getSessionStorage(); - if(osfSessionStorage) - { - if(!hostInfoValue) - hostInfoValue=OSF.OUtil.parseHostInfoFromWindowName(true,OSF._OfficeAppFactory.getWindowName()); - if(hostInfoValue && hostInfoValue.indexOf("isDialog") > -1) - { - var appId=getAppIdFromWindowLocation(); - if(appId !=null) - osfSessionStorage.setItem(appId+"IsDialog","true"); - this._hostInfo.isDialog=true; - return - } - this._hostInfo.isDialog=osfSessionStorage.getItem(OSF.OUtil.getXdmFieldValue(OSF.XdmFieldName.AppId,false)+"IsDialog") !=null ? true : false - } -}; -OSF.InitializationHelper.prototype.getAppContext=function OSF_InitializationHelper$getAppContext(wnd, gotAppContext) + var getAppIdFromWindowLocation = function OSF_InitializationHelper$getAppIdFromWindowLocation() + { + var xdmInfoValue = OSF.OUtil.parseXdmInfo(true); + if(xdmInfoValue) + { + var items = xdmInfoValue.split("|"); + return items[1] + } + return null + }; + var osfSessionStorage = OSF.OUtil.getSessionStorage(); + if(osfSessionStorage) + { + if(!hostInfoValue) + hostInfoValue = OSF.OUtil.parseHostInfoFromWindowName(true,OSF._OfficeAppFactory.getWindowName()); + if(hostInfoValue && hostInfoValue.indexOf("isDialog") > -1) + { + var appId = getAppIdFromWindowLocation(); + if(appId != null) + osfSessionStorage.setItem(appId + "IsDialog","true"); + this._hostInfo.isDialog = true; + return + } + this._hostInfo.isDialog = osfSessionStorage.getItem(OSF.OUtil.getXdmFieldValue(OSF.XdmFieldName.AppId,false) + "IsDialog") != null ? true : false + } +}; +OSF.InitializationHelper.prototype.getAppContext = function OSF_InitializationHelper$getAppContext(wnd, gotAppContext) +{ + var me = this; + var getInvocationCallbackWebApp = function OSF_InitializationHelper_getAppContextAsync$getInvocationCallbackWebApp(errorCode, appContext) + { + var settings; + if(appContext._appName === OSF.AppName.ExcelWebApp) + { + var serializedSettings = appContext._settings; + settings = {}; + for(var index in serializedSettings) + { + var setting = serializedSettings[index]; + settings[setting[0]] = setting[1] + } + } + else + settings = appContext._settings; + if(errorCode === 0 && appContext._id != undefined && appContext._appName != undefined && appContext._appVersion != undefined && appContext._appUILocale != undefined && appContext._dataLocale != undefined && appContext._docUrl != undefined && appContext._clientMode != undefined && appContext._settings != undefined && appContext._reason != undefined) + { + me._appContext = appContext; + var appInstanceId = appContext._appInstanceId ? appContext._appInstanceId : appContext._id; + var touchEnabled = false; + var commerceAllowed = true; + var minorVersion = 0; + if(appContext._appMinorVersion != undefined) + minorVersion = appContext._appMinorVersion; + var requirementMatrix = undefined; + if(appContext._requirementMatrix != undefined) + requirementMatrix = appContext._requirementMatrix; + appContext.eToken = appContext.eToken ? appContext.eToken : ""; + var returnedContext = new OSF.OfficeAppContext(appContext._id,appContext._appName,appContext._appVersion,appContext._appUILocale,appContext._dataLocale,appContext._docUrl,appContext._clientMode,settings,appContext._reason,appContext._osfControlType,appContext._eToken,appContext._correlationId,appInstanceId,touchEnabled,commerceAllowed,minorVersion,requirementMatrix,appContext._hostCustomMessage,appContext._hostFullVersion,appContext._clientWindowHeight,appContext._clientWindowWidth,appContext._addinName,appContext._appDomains,appContext._dialogRequirementMatrix); + returnedContext._wacHostEnvironment = appContext._wacHostEnvironment || "0"; + returnedContext._isFromWacAutomation = !!appContext._isFromWacAutomation; + if(OSF.AppTelemetry) + OSF.AppTelemetry.initialize(returnedContext); + gotAppContext(returnedContext) + } + else + { + var errorMsg = "Function ContextActivationManager_getAppContextAsync call failed. ErrorCode is " + errorCode + ", exception: " + appContext; + if(OSF.AppTelemetry) + OSF.AppTelemetry.logAppException(errorMsg); + throw errorMsg; + } + }; + try + { + if(this._hostInfo.isDialog && window.opener != null) + { + var appContext = OfficeExt.WACUtils.parseAppContextFromWindowName(false,OSF._OfficeAppFactory.getWindowName()); + getInvocationCallbackWebApp(0,appContext) + } + else + this._webAppState.clientEndPoint.invoke("ContextActivationManager_getAppContextAsync",getInvocationCallbackWebApp,this._webAppState.id) + } + catch(ex) + { + if(OSF.AppTelemetry) + OSF.AppTelemetry.logAppException("Exception thrown when trying to invoke getAppContextAsync. Exception:[" + ex + "]"); + throw ex; + } +}; +OSF.InitializationHelper.prototype.setAgaveHostCommunication = function OSF_InitializationHelper$setAgaveHostCommunication() { - var me=this; - var getInvocationCallbackWebApp=function OSF_InitializationHelper_getAppContextAsync$getInvocationCallbackWebApp(errorCode, appContext) - { - var settings; - if(appContext._appName===OSF.AppName.ExcelWebApp) - { - var serializedSettings=appContext._settings; - settings={}; - for(var index in serializedSettings) - { - var setting=serializedSettings[index]; - settings[setting[0]]=setting[1] - } - } - else - settings=appContext._settings; - if(errorCode===0 && appContext._id !=undefined && appContext._appName !=undefined && appContext._appVersion !=undefined && appContext._appUILocale !=undefined && appContext._dataLocale !=undefined && appContext._docUrl !=undefined && appContext._clientMode !=undefined && appContext._settings !=undefined && appContext._reason !=undefined) - { - me._appContext=appContext; - var appInstanceId=appContext._appInstanceId ? appContext._appInstanceId : appContext._id; - var touchEnabled=false; - var commerceAllowed=true; - var minorVersion=0; - if(appContext._appMinorVersion !=undefined) - minorVersion=appContext._appMinorVersion; - var requirementMatrix=undefined; - if(appContext._requirementMatrix !=undefined) - requirementMatrix=appContext._requirementMatrix; - appContext.eToken=appContext.eToken ? appContext.eToken : ""; - var returnedContext=new OSF.OfficeAppContext(appContext._id,appContext._appName,appContext._appVersion,appContext._appUILocale,appContext._dataLocale,appContext._docUrl,appContext._clientMode,settings,appContext._reason,appContext._osfControlType,appContext._eToken,appContext._correlationId,appInstanceId,touchEnabled,commerceAllowed,minorVersion,requirementMatrix,appContext._hostCustomMessage,appContext._hostFullVersion,appContext._clientWindowHeight,appContext._clientWindowWidth,appContext._addinName,appContext._appDomains,appContext._dialogRequirementMatrix); - returnedContext._wacHostEnvironment=appContext._wacHostEnvironment || "0"; - returnedContext._isFromWacAutomation=!!appContext._isFromWacAutomation; - if(OSF.AppTelemetry) - OSF.AppTelemetry.initialize(returnedContext); - gotAppContext(returnedContext) - } - else - { - var errorMsg="Function ContextActivationManager_getAppContextAsync call failed. ErrorCode is "+errorCode+", exception: "+appContext; - if(OSF.AppTelemetry) - OSF.AppTelemetry.logAppException(errorMsg); - throw errorMsg; - } - }; - try - { - if(this._hostInfo.isDialog && window.opener !=null) - { - var appContext=OfficeExt.WACUtils.parseAppContextFromWindowName(false,OSF._OfficeAppFactory.getWindowName()); - getInvocationCallbackWebApp(0,appContext) - } - else - this._webAppState.clientEndPoint.invoke("ContextActivationManager_getAppContextAsync",getInvocationCallbackWebApp,this._webAppState.id) - } - catch(ex) - { - if(OSF.AppTelemetry) - OSF.AppTelemetry.logAppException("Exception thrown when trying to invoke getAppContextAsync. Exception:["+ex+"]"); - throw ex; - } -}; -OSF.InitializationHelper.prototype.setAgaveHostCommunication=function OSF_InitializationHelper$setAgaveHostCommunication() + try + { + var me = this; + var xdmInfoValue = OSF.OUtil.parseXdmInfoWithGivenFragment(false,OSF._OfficeAppFactory.getWindowLocationHash()); + if(!xdmInfoValue && OSF._OfficeAppFactory.getWindowName) + xdmInfoValue = OSF.OUtil.parseXdmInfoFromWindowName(false,OSF._OfficeAppFactory.getWindowName()); + if(xdmInfoValue) + { + var xdmItems = OSF.OUtil.getInfoItems(xdmInfoValue); + if(xdmItems != undefined && xdmItems.length >= 3) + { + me._webAppState.conversationID = xdmItems[0]; + me._webAppState.id = xdmItems[1]; + me._webAppState.webAppUrl = xdmItems[2].indexOf(":") >= 0 ? xdmItems[2] : decodeURIComponent(xdmItems[2]) + } + } + me._webAppState.wnd = window.opener != null ? window.opener : window.parent; + var serializerVersion = OSF.OUtil.parseSerializerVersionWithGivenFragment(false,OSF._OfficeAppFactory.getWindowLocationHash()); + if(isNaN(serializerVersion) && OSF._OfficeAppFactory.getWindowName) + serializerVersion = OSF.OUtil.parseSerializerVersionFromWindowName(false,OSF._OfficeAppFactory.getWindowName()); + me._webAppState.serializerVersion = serializerVersion; + if(this._hostInfo.isDialog && window.opener != null) + return; + me._webAppState.clientEndPoint = Microsoft.Office.Common.XdmCommunicationManager.connect(me._webAppState.conversationID,me._webAppState.wnd,me._webAppState.webAppUrl,me._webAppState.serializerVersion); + me._webAppState.serviceEndPoint = Microsoft.Office.Common.XdmCommunicationManager.createServiceEndPoint(me._webAppState.id); + var notificationConversationId = me._webAppState.conversationID + OSF.SharedConstants.NotificationConversationIdSuffix; + me._webAppState.serviceEndPoint.registerConversation(notificationConversationId,me._webAppState.webAppUrl); + var notifyAgave = function OSF__OfficeAppFactory_initialize$notifyAgave(actionId) + { + switch(actionId) + { + case OSF.AgaveHostAction.Select: + me._webAppState.focused = true; + break; + case OSF.AgaveHostAction.UnSelect: + me._webAppState.focused = false; + break; + case OSF.AgaveHostAction.TabIn: + case OSF.AgaveHostAction.CtrlF6In: + window.focus(); + var list = document.querySelectorAll(me._tabbableElements); + var focused = OSF.OUtil.focusToFirstTabbable(list,false); + if(!focused) + { + window.blur(); + me._webAppState.focused = false; + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[me._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable]) + } + break; + case OSF.AgaveHostAction.TabInShift: + window.focus(); + var list = document.querySelectorAll(me._tabbableElements); + var focused = OSF.OUtil.focusToFirstTabbable(list,true); + if(!focused) + { + window.blur(); + me._webAppState.focused = false; + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[me._webAppState.id,OSF.AgaveHostAction.ExitNoFocusableShift]) + } + break; + default: + OsfMsAjaxFactory.msAjaxDebug.trace("actionId " + actionId + " notifyAgave is wrong."); + break + } + }; + me._webAppState.serviceEndPoint.registerMethod("Office_notifyAgave",notifyAgave,Microsoft.Office.Common.InvokeType.async,false); + me.addOrRemoveEventListenersForWindow(true) + } + catch(ex) + { + if(OSF.AppTelemetry) + OSF.AppTelemetry.logAppException("Exception thrown in setAgaveHostCommunication. Exception:[" + ex + "]"); + throw ex; + } +}; +OSF.InitializationHelper.prototype.addOrRemoveEventListenersForWindow = function OSF_InitializationHelper$addOrRemoveEventListenersForWindow(isAdd) { - try - { - var me=this; - var xdmInfoValue=OSF.OUtil.parseXdmInfoWithGivenFragment(false,OSF._OfficeAppFactory.getWindowLocationHash()); - if(!xdmInfoValue && OSF._OfficeAppFactory.getWindowName) - xdmInfoValue=OSF.OUtil.parseXdmInfoFromWindowName(false,OSF._OfficeAppFactory.getWindowName()); - if(xdmInfoValue) - { - var xdmItems=OSF.OUtil.getInfoItems(xdmInfoValue); - if(xdmItems !=undefined && xdmItems.length >=3) - { - me._webAppState.conversationID=xdmItems[0]; - me._webAppState.id=xdmItems[1]; - me._webAppState.webAppUrl=xdmItems[2].indexOf(":") >=0 ? xdmItems[2] : decodeURIComponent(xdmItems[2]) - } - } - me._webAppState.wnd=window.opener !=null ? window.opener : window.parent; - var serializerVersion=OSF.OUtil.parseSerializerVersionWithGivenFragment(false,OSF._OfficeAppFactory.getWindowLocationHash()); - if(isNaN(serializerVersion) && OSF._OfficeAppFactory.getWindowName) - serializerVersion=OSF.OUtil.parseSerializerVersionFromWindowName(false,OSF._OfficeAppFactory.getWindowName()); - me._webAppState.serializerVersion=serializerVersion; - if(this._hostInfo.isDialog && window.opener !=null) - return; - me._webAppState.clientEndPoint=Microsoft.Office.Common.XdmCommunicationManager.connect(me._webAppState.conversationID,me._webAppState.wnd,me._webAppState.webAppUrl,me._webAppState.serializerVersion); - me._webAppState.serviceEndPoint=Microsoft.Office.Common.XdmCommunicationManager.createServiceEndPoint(me._webAppState.id); - var notificationConversationId=me._webAppState.conversationID+OSF.SharedConstants.NotificationConversationIdSuffix; - me._webAppState.serviceEndPoint.registerConversation(notificationConversationId,me._webAppState.webAppUrl); - var notifyAgave=function OSF__OfficeAppFactory_initialize$notifyAgave(actionId) - { - switch(actionId) - { - case OSF.AgaveHostAction.Select: - me._webAppState.focused=true; - break; - case OSF.AgaveHostAction.UnSelect: - me._webAppState.focused=false; - break; - case OSF.AgaveHostAction.TabIn: - case OSF.AgaveHostAction.CtrlF6In: - window.focus(); - var list=document.querySelectorAll(me._tabbableElements); - var focused=OSF.OUtil.focusToFirstTabbable(list,false); - if(!focused) - { - window.blur(); - me._webAppState.focused=false; - me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[me._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable]) - } - break; - case OSF.AgaveHostAction.TabInShift: - window.focus(); - var list=document.querySelectorAll(me._tabbableElements); - var focused=OSF.OUtil.focusToFirstTabbable(list,true); - if(!focused) - { - window.blur(); - me._webAppState.focused=false; - me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[me._webAppState.id,OSF.AgaveHostAction.ExitNoFocusableShift]) - } - break; - default: - OsfMsAjaxFactory.msAjaxDebug.trace("actionId "+actionId+" notifyAgave is wrong."); - break - } - }; - me._webAppState.serviceEndPoint.registerMethod("Office_notifyAgave",notifyAgave,Microsoft.Office.Common.InvokeType.async,false); - me.addOrRemoveEventListenersForWindow(true) - } - catch(ex) - { - if(OSF.AppTelemetry) - OSF.AppTelemetry.logAppException("Exception thrown in setAgaveHostCommunication. Exception:["+ex+"]"); - throw ex; - } -}; -OSF.InitializationHelper.prototype.addOrRemoveEventListenersForWindow=function OSF_InitializationHelper$addOrRemoveEventListenersForWindow(isAdd) + var me = this; + var onWindowFocus = function() + { + if(!me._webAppState.focused) + me._webAppState.focused = true; + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[me._webAppState.id,OSF.AgaveHostAction.Select]) + }; + var onWindowBlur = function() + { + if(!OSF) + return; + if(me._webAppState.focused) + me._webAppState.focused = false; + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[me._webAppState.id,OSF.AgaveHostAction.UnSelect]) + }; + var onWindowKeydown = function(e) + { + e.preventDefault = e.preventDefault || function() + { + e.returnValue = false + }; + if(e.keyCode == 117 && (e.ctrlKey || e.metaKey)) + { + var actionId = OSF.AgaveHostAction.CtrlF6Exit; + if(e.shiftKey) + actionId = OSF.AgaveHostAction.CtrlF6ExitShift; + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[me._webAppState.id,actionId]) + } + else if(e.keyCode == 9) + { + e.preventDefault(); + var allTabbableElements = document.querySelectorAll(me._tabbableElements); + var focused = OSF.OUtil.focusToNextTabbable(allTabbableElements,e.target || e.srcElement,e.shiftKey); + if(!focused) + if(me._hostInfo.isDialog) + OSF.OUtil.focusToFirstTabbable(allTabbableElements,e.shiftKey); + else if(e.shiftKey) + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[me._webAppState.id,OSF.AgaveHostAction.TabExitShift]); + else + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[me._webAppState.id,OSF.AgaveHostAction.TabExit]) + } + else if(e.keyCode == 27) + { + e.preventDefault(); + me.dismissDialogNotification && me.dismissDialogNotification(); + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[me._webAppState.id,OSF.AgaveHostAction.EscExit]) + } + else if(e.keyCode == 113) + { + e.preventDefault(); + me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[me._webAppState.id,OSF.AgaveHostAction.F2Exit]) + } + }; + var onWindowKeypress = function(e) + { + if(e.keyCode == 117 && e.ctrlKey) + if(e.preventDefault) + e.preventDefault(); + else + e.returnValue = false + }; + if(isAdd) + { + OSF.OUtil.addEventListener(window,"focus",onWindowFocus); + OSF.OUtil.addEventListener(window,"blur",onWindowBlur); + OSF.OUtil.addEventListener(window,"keydown",onWindowKeydown); + OSF.OUtil.addEventListener(window,"keypress",onWindowKeypress) + } + else + { + OSF.OUtil.removeEventListener(window,"focus",onWindowFocus); + OSF.OUtil.removeEventListener(window,"blur",onWindowBlur); + OSF.OUtil.removeEventListener(window,"keydown",onWindowKeydown); + OSF.OUtil.removeEventListener(window,"keypress",onWindowKeypress) + } +}; +OSF.InitializationHelper.prototype.initWebDialog = function OSF_InitializationHelper$initWebDialog(appContext) { - var me=this; - var onWindowFocus=function() - { - if(!me._webAppState.focused) - me._webAppState.focused=true; - me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[me._webAppState.id,OSF.AgaveHostAction.Select]) - }; - var onWindowBlur=function() - { - if(!OSF) - return; - if(me._webAppState.focused) - me._webAppState.focused=false; - me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[me._webAppState.id,OSF.AgaveHostAction.UnSelect]) - }; - var onWindowKeydown=function(e) - { - e.preventDefault=e.preventDefault || function() - { - e.returnValue=false - }; - if(e.keyCode==117 && (e.ctrlKey || e.metaKey)) - { - var actionId=OSF.AgaveHostAction.CtrlF6Exit; - if(e.shiftKey) - actionId=OSF.AgaveHostAction.CtrlF6ExitShift; - me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[me._webAppState.id,actionId]) - } - else if(e.keyCode==9) - { - e.preventDefault(); - var allTabbableElements=document.querySelectorAll(me._tabbableElements); - var focused=OSF.OUtil.focusToNextTabbable(allTabbableElements,e.target || e.srcElement,e.shiftKey); - if(!focused) - if(me._hostInfo.isDialog) - OSF.OUtil.focusToFirstTabbable(allTabbableElements,e.shiftKey); - else if(e.shiftKey) - me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[me._webAppState.id,OSF.AgaveHostAction.TabExitShift]); - else - me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[me._webAppState.id,OSF.AgaveHostAction.TabExit]) - } - else if(e.keyCode==27) - { - e.preventDefault(); - me.dismissDialogNotification && me.dismissDialogNotification(); - me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[me._webAppState.id,OSF.AgaveHostAction.EscExit]) - } - else if(e.keyCode==113) - { - e.preventDefault(); - me._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[me._webAppState.id,OSF.AgaveHostAction.F2Exit]) - } - }; - var onWindowKeypress=function(e) - { - if(e.keyCode==117 && e.ctrlKey) - if(e.preventDefault) - e.preventDefault(); - else - e.returnValue=false - }; - if(isAdd) - { - OSF.OUtil.addEventListener(window,"focus",onWindowFocus); - OSF.OUtil.addEventListener(window,"blur",onWindowBlur); - OSF.OUtil.addEventListener(window,"keydown",onWindowKeydown); - OSF.OUtil.addEventListener(window,"keypress",onWindowKeypress) - } - else - { - OSF.OUtil.removeEventListener(window,"focus",onWindowFocus); - OSF.OUtil.removeEventListener(window,"blur",onWindowBlur); - OSF.OUtil.removeEventListener(window,"keydown",onWindowKeydown); - OSF.OUtil.removeEventListener(window,"keypress",onWindowKeypress) - } -}; -OSF.InitializationHelper.prototype.initWebDialog=function OSF_InitializationHelper$initWebDialog(appContext) + if(appContext.get_isDialog()) + { + if(OSF.DDA.UI.ChildUI) + { + var isPopupWindow = window.opener != null; + appContext.ui = new OSF.DDA.UI.ChildUI(isPopupWindow); + if(isPopupWindow) + this.registerMessageReceivedEventForWindowDialog && this.registerMessageReceivedEventForWindowDialog() + } + } + else if(OSF.DDA.UI.ParentUI) + { + appContext.ui = new OSF.DDA.UI.ParentUI; + if(OfficeExt.Container) + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync]) + } +}; +OSF.InitializationHelper.prototype.initWebAuth = function OSF_InitializationHelper$initWebAuth(appContext) { - if(appContext.get_isDialog()) - { - if(OSF.DDA.UI.ChildUI) - { - var isPopupWindow=window.opener !=null; - appContext.ui=new OSF.DDA.UI.ChildUI(isPopupWindow); - if(isPopupWindow) - this.registerMessageReceivedEventForWindowDialog && this.registerMessageReceivedEventForWindowDialog() - } - } - else if(OSF.DDA.UI.ParentUI) - { - appContext.ui=new OSF.DDA.UI.ParentUI; - if(OfficeExt.Container) - OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync]) - } -}; -OSF.getClientEndPoint=function OSF$getClientEndPoint() + if(OSF.DDA.Auth) + { + appContext.auth = new OSF.DDA.Auth; + OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth,[OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]) + } +}; +OSF.getClientEndPoint = function OSF$getClientEndPoint() { - var initializationHelper=OSF._OfficeAppFactory.getInitializationHelper(); - return initializationHelper._webAppState.clientEndPoint + var initializationHelper = OSF._OfficeAppFactory.getInitializationHelper(); + return initializationHelper._webAppState.clientEndPoint }; -OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize=function OSF_InitializationHelper$prepareRightAfterWebExtensionInitialize() +OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize = function OSF_InitializationHelper$prepareRightAfterWebExtensionInitialize() { - if(this._hostInfo.isDialog) - { - window.focus(); - var list=document.querySelectorAll(this._tabbableElements); - var focused=OSF.OUtil.focusToFirstTabbable(list,false); - if(!focused) - { - window.blur(); - this._webAppState.focused=false; - if(this._webAppState.clientEndPoint) - this._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[this._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable]) - } - } + if(this._hostInfo.isDialog) + { + window.focus(); + var list = document.querySelectorAll(this._tabbableElements); + var focused = OSF.OUtil.focusToFirstTabbable(list,false); + if(!focused) + { + window.blur(); + this._webAppState.focused = false; + if(this._webAppState.clientEndPoint) + this._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[this._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable]) + } + } }; (function() { - var checkScriptOverride=function OSF$checkScriptOverride() - { - var postScriptOverrideCheckAction=function OSF$postScriptOverrideCheckAction(customizedScriptPath) - { - if(customizedScriptPath) - OSF.OUtil.loadScript(customizedScriptPath,function() - { - OsfMsAjaxFactory.msAjaxDebug.trace("loaded customized script:"+customizedScriptPath) - }) - }; - var conversationID, - webAppUrl, - items; - var clientEndPoint=null; - var xdmInfoValue=OSF.OUtil.parseXdmInfo(); - if(xdmInfoValue) - { - items=OSF.OUtil.getInfoItems(xdmInfoValue); - if(items && items.length >=3) - { - conversationID=items[0]; - webAppUrl=items[2]; - var serializerVersion=OSF.OUtil.parseSerializerVersionWithGivenFragment(false,OSF._OfficeAppFactory.getWindowLocationHash()); - if(isNaN(serializerVersion) && OSF._OfficeAppFactory.getWindowName) - serializerVersion=OSF.OUtil.parseSerializerVersionFromWindowName(false,OSF._OfficeAppFactory.getWindowName()); - clientEndPoint=Microsoft.Office.Common.XdmCommunicationManager.connect(conversationID,window.parent,webAppUrl,serializerVersion) - } - } - var customizedScriptPath=null; - if(!clientEndPoint) - { - try - { - if(window.external && typeof window.external.getCustomizedScriptPath !=="undefined") - customizedScriptPath=window.external.getCustomizedScriptPath() - } - catch(ex) - { - OsfMsAjaxFactory.msAjaxDebug.trace("no script override through window.external.") - } - postScriptOverrideCheckAction(customizedScriptPath) - } - else - try - { - clientEndPoint.invoke("getCustomizedScriptPathAsync",function OSF$getCustomizedScriptPathAsyncCallback(errorCode, scriptPath) - { - postScriptOverrideCheckAction(errorCode===0 ? scriptPath : null) - },{__timeout__: 1e3}) - } - catch(ex) - { - OsfMsAjaxFactory.msAjaxDebug.trace("no script override through cross frame communication.") - } - }; - var requiresMsAjax=true; - if(requiresMsAjax && !OsfMsAjaxFactory.isMsAjaxLoaded()) - if(!(OSF._OfficeAppFactory && OSF._OfficeAppFactory && OSF._OfficeAppFactory.getLoadScriptHelper && OSF._OfficeAppFactory.getLoadScriptHelper().isScriptLoading(OSF.ConstantNames.MicrosoftAjaxId))) - OsfMsAjaxFactory.loadMsAjaxFull(function OSF$loadMSAjaxCallback() - { - if(OsfMsAjaxFactory.isMsAjaxLoaded()) - checkScriptOverride(); - else - throw"Not able to load MicrosoftAjax.js."; - }); - else - OSF._OfficeAppFactory.getLoadScriptHelper().waitForScripts([OSF.ConstantNames.MicrosoftAjaxId],checkScriptOverride); - else - checkScriptOverride() + var checkScriptOverride = function OSF$checkScriptOverride() + { + var postScriptOverrideCheckAction = function OSF$postScriptOverrideCheckAction(customizedScriptPath) + { + if(customizedScriptPath) + OSF.OUtil.loadScript(customizedScriptPath,function() + { + OsfMsAjaxFactory.msAjaxDebug.trace("loaded customized script:" + customizedScriptPath) + }) + }; + var conversationID, + webAppUrl, + items; + var clientEndPoint = null; + var xdmInfoValue = OSF.OUtil.parseXdmInfo(); + if(xdmInfoValue) + { + items = OSF.OUtil.getInfoItems(xdmInfoValue); + if(items && items.length >= 3) + { + conversationID = items[0]; + webAppUrl = items[2]; + var serializerVersion = OSF.OUtil.parseSerializerVersionWithGivenFragment(false,OSF._OfficeAppFactory.getWindowLocationHash()); + if(isNaN(serializerVersion) && OSF._OfficeAppFactory.getWindowName) + serializerVersion = OSF.OUtil.parseSerializerVersionFromWindowName(false,OSF._OfficeAppFactory.getWindowName()); + clientEndPoint = Microsoft.Office.Common.XdmCommunicationManager.connect(conversationID,window.parent,webAppUrl,serializerVersion) + } + } + var customizedScriptPath = null; + if(!clientEndPoint) + { + try + { + if(window.external && typeof window.external.getCustomizedScriptPath !== "undefined") + customizedScriptPath = window.external.getCustomizedScriptPath() + } + catch(ex) + { + OsfMsAjaxFactory.msAjaxDebug.trace("no script override through window.external.") + } + postScriptOverrideCheckAction(customizedScriptPath) + } + else + try + { + clientEndPoint.invoke("getCustomizedScriptPathAsync",function OSF$getCustomizedScriptPathAsyncCallback(errorCode, scriptPath) + { + postScriptOverrideCheckAction(errorCode === 0 ? scriptPath : null) + },{__timeout__: 1e3}) + } + catch(ex) + { + OsfMsAjaxFactory.msAjaxDebug.trace("no script override through cross frame communication.") + } + }; + var requiresMsAjax = true; + if(requiresMsAjax && !OsfMsAjaxFactory.isMsAjaxLoaded()) + if(!(OSF._OfficeAppFactory && OSF._OfficeAppFactory && OSF._OfficeAppFactory.getLoadScriptHelper && OSF._OfficeAppFactory.getLoadScriptHelper().isScriptLoading(OSF.ConstantNames.MicrosoftAjaxId))) + OsfMsAjaxFactory.loadMsAjaxFull(function OSF$loadMSAjaxCallback() + { + if(OsfMsAjaxFactory.isMsAjaxLoaded()) + checkScriptOverride(); + else + throw"Not able to load MicrosoftAjax.js."; + }); + else + OSF._OfficeAppFactory.getLoadScriptHelper().waitForScripts([OSF.ConstantNames.MicrosoftAjaxId],checkScriptOverride); + else + checkScriptOverride() })(); var OSFLog; (function(OSFLog) { - var BaseUsageData=function() - { - function BaseUsageData(table) - { - this._table=table; - this._fields={} - } - Object.defineProperty(BaseUsageData.prototype,"Fields",{ - get: function() - { - return this._fields - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(BaseUsageData.prototype,"Table",{ - get: function() - { - return this._table - }, - enumerable: true, - configurable: true - }); - BaseUsageData.prototype.SerializeFields=function(){}; - BaseUsageData.prototype.SetSerializedField=function(key, value) - { - if(typeof value !=="undefined" && value !==null) - this._serializedFields[key]=value.toString() - }; - BaseUsageData.prototype.SerializeRow=function() - { - this._serializedFields={}; - this.SetSerializedField("Table",this._table); - this.SerializeFields(); - return JSON.stringify(this._serializedFields) - }; - return BaseUsageData - }(); - OSFLog.BaseUsageData=BaseUsageData; - var AppActivatedUsageData=function(_super) - { - __extends(AppActivatedUsageData,_super); - function AppActivatedUsageData() - { - _super.call(this,"AppActivated") - } - Object.defineProperty(AppActivatedUsageData.prototype,"CorrelationId",{ - get: function() - { - return this.Fields["CorrelationId"] - }, - set: function(value) - { - this.Fields["CorrelationId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"SessionId",{ - get: function() - { - return this.Fields["SessionId"] - }, - set: function(value) - { - this.Fields["SessionId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"AppId",{ - get: function() - { - return this.Fields["AppId"] - }, - set: function(value) - { - this.Fields["AppId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"AppInstanceId",{ - get: function() - { - return this.Fields["AppInstanceId"] - }, - set: function(value) - { - this.Fields["AppInstanceId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"AppURL",{ - get: function() - { - return this.Fields["AppURL"] - }, - set: function(value) - { - this.Fields["AppURL"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"AssetId",{ - get: function() - { - return this.Fields["AssetId"] - }, - set: function(value) - { - this.Fields["AssetId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"Browser",{ - get: function() - { - return this.Fields["Browser"] - }, - set: function(value) - { - this.Fields["Browser"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"UserId",{ - get: function() - { - return this.Fields["UserId"] - }, - set: function(value) - { - this.Fields["UserId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"Host",{ - get: function() - { - return this.Fields["Host"] - }, - set: function(value) - { - this.Fields["Host"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"HostVersion",{ - get: function() - { - return this.Fields["HostVersion"] - }, - set: function(value) - { - this.Fields["HostVersion"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"ClientId",{ - get: function() - { - return this.Fields["ClientId"] - }, - set: function(value) - { - this.Fields["ClientId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"AppSizeWidth",{ - get: function() - { - return this.Fields["AppSizeWidth"] - }, - set: function(value) - { - this.Fields["AppSizeWidth"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"AppSizeHeight",{ - get: function() - { - return this.Fields["AppSizeHeight"] - }, - set: function(value) - { - this.Fields["AppSizeHeight"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"Message",{ - get: function() - { - return this.Fields["Message"] - }, - set: function(value) - { - this.Fields["Message"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"DocUrl",{ - get: function() - { - return this.Fields["DocUrl"] - }, - set: function(value) - { - this.Fields["DocUrl"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"OfficeJSVersion",{ - get: function() - { - return this.Fields["OfficeJSVersion"] - }, - set: function(value) - { - this.Fields["OfficeJSVersion"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"HostJSVersion",{ - get: function() - { - return this.Fields["HostJSVersion"] - }, - set: function(value) - { - this.Fields["HostJSVersion"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"WacHostEnvironment",{ - get: function() - { - return this.Fields["WacHostEnvironment"] - }, - set: function(value) - { - this.Fields["WacHostEnvironment"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"IsFromWacAutomation",{ - get: function() - { - return this.Fields["IsFromWacAutomation"] - }, - set: function(value) - { - this.Fields["IsFromWacAutomation"]=value - }, - enumerable: true, - configurable: true - }); - AppActivatedUsageData.prototype.SerializeFields=function() - { - this.SetSerializedField("CorrelationId",this.CorrelationId); - this.SetSerializedField("SessionId",this.SessionId); - this.SetSerializedField("AppId",this.AppId); - this.SetSerializedField("AppInstanceId",this.AppInstanceId); - this.SetSerializedField("AppURL",this.AppURL); - this.SetSerializedField("AssetId",this.AssetId); - this.SetSerializedField("Browser",this.Browser); - this.SetSerializedField("UserId",this.UserId); - this.SetSerializedField("Host",this.Host); - this.SetSerializedField("HostVersion",this.HostVersion); - this.SetSerializedField("ClientId",this.ClientId); - this.SetSerializedField("AppSizeWidth",this.AppSizeWidth); - this.SetSerializedField("AppSizeHeight",this.AppSizeHeight); - this.SetSerializedField("Message",this.Message); - this.SetSerializedField("DocUrl",this.DocUrl); - this.SetSerializedField("OfficeJSVersion",this.OfficeJSVersion); - this.SetSerializedField("HostJSVersion",this.HostJSVersion); - this.SetSerializedField("WacHostEnvironment",this.WacHostEnvironment); - this.SetSerializedField("IsFromWacAutomation",this.IsFromWacAutomation) - }; - return AppActivatedUsageData - }(BaseUsageData); - OSFLog.AppActivatedUsageData=AppActivatedUsageData; - var ScriptLoadUsageData=function(_super) - { - __extends(ScriptLoadUsageData,_super); - function ScriptLoadUsageData() - { - _super.call(this,"ScriptLoad") - } - Object.defineProperty(ScriptLoadUsageData.prototype,"CorrelationId",{ - get: function() - { - return this.Fields["CorrelationId"] - }, - set: function(value) - { - this.Fields["CorrelationId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ScriptLoadUsageData.prototype,"SessionId",{ - get: function() - { - return this.Fields["SessionId"] - }, - set: function(value) - { - this.Fields["SessionId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ScriptLoadUsageData.prototype,"ScriptId",{ - get: function() - { - return this.Fields["ScriptId"] - }, - set: function(value) - { - this.Fields["ScriptId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ScriptLoadUsageData.prototype,"StartTime",{ - get: function() - { - return this.Fields["StartTime"] - }, - set: function(value) - { - this.Fields["StartTime"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ScriptLoadUsageData.prototype,"ResponseTime",{ - get: function() - { - return this.Fields["ResponseTime"] - }, - set: function(value) - { - this.Fields["ResponseTime"]=value - }, - enumerable: true, - configurable: true - }); - ScriptLoadUsageData.prototype.SerializeFields=function() - { - this.SetSerializedField("CorrelationId",this.CorrelationId); - this.SetSerializedField("SessionId",this.SessionId); - this.SetSerializedField("ScriptId",this.ScriptId); - this.SetSerializedField("StartTime",this.StartTime); - this.SetSerializedField("ResponseTime",this.ResponseTime) - }; - return ScriptLoadUsageData - }(BaseUsageData); - OSFLog.ScriptLoadUsageData=ScriptLoadUsageData; - var AppClosedUsageData=function(_super) - { - __extends(AppClosedUsageData,_super); - function AppClosedUsageData() - { - _super.call(this,"AppClosed") - } - Object.defineProperty(AppClosedUsageData.prototype,"CorrelationId",{ - get: function() - { - return this.Fields["CorrelationId"] - }, - set: function(value) - { - this.Fields["CorrelationId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppClosedUsageData.prototype,"SessionId",{ - get: function() - { - return this.Fields["SessionId"] - }, - set: function(value) - { - this.Fields["SessionId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppClosedUsageData.prototype,"FocusTime",{ - get: function() - { - return this.Fields["FocusTime"] - }, - set: function(value) - { - this.Fields["FocusTime"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppClosedUsageData.prototype,"AppSizeFinalWidth",{ - get: function() - { - return this.Fields["AppSizeFinalWidth"] - }, - set: function(value) - { - this.Fields["AppSizeFinalWidth"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppClosedUsageData.prototype,"AppSizeFinalHeight",{ - get: function() - { - return this.Fields["AppSizeFinalHeight"] - }, - set: function(value) - { - this.Fields["AppSizeFinalHeight"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppClosedUsageData.prototype,"OpenTime",{ - get: function() - { - return this.Fields["OpenTime"] - }, - set: function(value) - { - this.Fields["OpenTime"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppClosedUsageData.prototype,"CloseMethod",{ - get: function() - { - return this.Fields["CloseMethod"] - }, - set: function(value) - { - this.Fields["CloseMethod"]=value - }, - enumerable: true, - configurable: true - }); - AppClosedUsageData.prototype.SerializeFields=function() - { - this.SetSerializedField("CorrelationId",this.CorrelationId); - this.SetSerializedField("SessionId",this.SessionId); - this.SetSerializedField("FocusTime",this.FocusTime); - this.SetSerializedField("AppSizeFinalWidth",this.AppSizeFinalWidth); - this.SetSerializedField("AppSizeFinalHeight",this.AppSizeFinalHeight); - this.SetSerializedField("OpenTime",this.OpenTime); - this.SetSerializedField("CloseMethod",this.CloseMethod) - }; - return AppClosedUsageData - }(BaseUsageData); - OSFLog.AppClosedUsageData=AppClosedUsageData; - var APIUsageUsageData=function(_super) - { - __extends(APIUsageUsageData,_super); - function APIUsageUsageData() - { - _super.call(this,"APIUsage") - } - Object.defineProperty(APIUsageUsageData.prototype,"CorrelationId",{ - get: function() - { - return this.Fields["CorrelationId"] - }, - set: function(value) - { - this.Fields["CorrelationId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(APIUsageUsageData.prototype,"SessionId",{ - get: function() - { - return this.Fields["SessionId"] - }, - set: function(value) - { - this.Fields["SessionId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(APIUsageUsageData.prototype,"APIType",{ - get: function() - { - return this.Fields["APIType"] - }, - set: function(value) - { - this.Fields["APIType"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(APIUsageUsageData.prototype,"APIID",{ - get: function() - { - return this.Fields["APIID"] - }, - set: function(value) - { - this.Fields["APIID"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(APIUsageUsageData.prototype,"Parameters",{ - get: function() - { - return this.Fields["Parameters"] - }, - set: function(value) - { - this.Fields["Parameters"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(APIUsageUsageData.prototype,"ResponseTime",{ - get: function() - { - return this.Fields["ResponseTime"] - }, - set: function(value) - { - this.Fields["ResponseTime"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(APIUsageUsageData.prototype,"ErrorType",{ - get: function() - { - return this.Fields["ErrorType"] - }, - set: function(value) - { - this.Fields["ErrorType"]=value - }, - enumerable: true, - configurable: true - }); - APIUsageUsageData.prototype.SerializeFields=function() - { - this.SetSerializedField("CorrelationId",this.CorrelationId); - this.SetSerializedField("SessionId",this.SessionId); - this.SetSerializedField("APIType",this.APIType); - this.SetSerializedField("APIID",this.APIID); - this.SetSerializedField("Parameters",this.Parameters); - this.SetSerializedField("ResponseTime",this.ResponseTime); - this.SetSerializedField("ErrorType",this.ErrorType) - }; - return APIUsageUsageData - }(BaseUsageData); - OSFLog.APIUsageUsageData=APIUsageUsageData; - var AppInitializationUsageData=function(_super) - { - __extends(AppInitializationUsageData,_super); - function AppInitializationUsageData() - { - _super.call(this,"AppInitialization") - } - Object.defineProperty(AppInitializationUsageData.prototype,"CorrelationId",{ - get: function() - { - return this.Fields["CorrelationId"] - }, - set: function(value) - { - this.Fields["CorrelationId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppInitializationUsageData.prototype,"SessionId",{ - get: function() - { - return this.Fields["SessionId"] - }, - set: function(value) - { - this.Fields["SessionId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppInitializationUsageData.prototype,"SuccessCode",{ - get: function() - { - return this.Fields["SuccessCode"] - }, - set: function(value) - { - this.Fields["SuccessCode"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppInitializationUsageData.prototype,"Message",{ - get: function() - { - return this.Fields["Message"] - }, - set: function(value) - { - this.Fields["Message"]=value - }, - enumerable: true, - configurable: true - }); - AppInitializationUsageData.prototype.SerializeFields=function() - { - this.SetSerializedField("CorrelationId",this.CorrelationId); - this.SetSerializedField("SessionId",this.SessionId); - this.SetSerializedField("SuccessCode",this.SuccessCode); - this.SetSerializedField("Message",this.Message) - }; - return AppInitializationUsageData - }(BaseUsageData); - OSFLog.AppInitializationUsageData=AppInitializationUsageData -})(OSFLog || (OSFLog={})); + var BaseUsageData = function() + { + function BaseUsageData(table) + { + this._table = table; + this._fields = {} + } + Object.defineProperty(BaseUsageData.prototype,"Fields",{ + get: function() + { + return this._fields + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(BaseUsageData.prototype,"Table",{ + get: function() + { + return this._table + }, + enumerable: true, + configurable: true + }); + BaseUsageData.prototype.SerializeFields = function(){}; + BaseUsageData.prototype.SetSerializedField = function(key, value) + { + if(typeof value !== "undefined" && value !== null) + this._serializedFields[key] = value.toString() + }; + BaseUsageData.prototype.SerializeRow = function() + { + this._serializedFields = {}; + this.SetSerializedField("Table",this._table); + this.SerializeFields(); + return JSON.stringify(this._serializedFields) + }; + return BaseUsageData + }(); + OSFLog.BaseUsageData = BaseUsageData; + var AppActivatedUsageData = function(_super) + { + __extends(AppActivatedUsageData,_super); + function AppActivatedUsageData() + { + _super.call(this,"AppActivated") + } + Object.defineProperty(AppActivatedUsageData.prototype,"CorrelationId",{ + get: function() + { + return this.Fields["CorrelationId"] + }, + set: function(value) + { + this.Fields["CorrelationId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"SessionId",{ + get: function() + { + return this.Fields["SessionId"] + }, + set: function(value) + { + this.Fields["SessionId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"AppId",{ + get: function() + { + return this.Fields["AppId"] + }, + set: function(value) + { + this.Fields["AppId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"AppInstanceId",{ + get: function() + { + return this.Fields["AppInstanceId"] + }, + set: function(value) + { + this.Fields["AppInstanceId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"AppURL",{ + get: function() + { + return this.Fields["AppURL"] + }, + set: function(value) + { + this.Fields["AppURL"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"AssetId",{ + get: function() + { + return this.Fields["AssetId"] + }, + set: function(value) + { + this.Fields["AssetId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"Browser",{ + get: function() + { + return this.Fields["Browser"] + }, + set: function(value) + { + this.Fields["Browser"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"UserId",{ + get: function() + { + return this.Fields["UserId"] + }, + set: function(value) + { + this.Fields["UserId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"Host",{ + get: function() + { + return this.Fields["Host"] + }, + set: function(value) + { + this.Fields["Host"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"HostVersion",{ + get: function() + { + return this.Fields["HostVersion"] + }, + set: function(value) + { + this.Fields["HostVersion"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"ClientId",{ + get: function() + { + return this.Fields["ClientId"] + }, + set: function(value) + { + this.Fields["ClientId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"AppSizeWidth",{ + get: function() + { + return this.Fields["AppSizeWidth"] + }, + set: function(value) + { + this.Fields["AppSizeWidth"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"AppSizeHeight",{ + get: function() + { + return this.Fields["AppSizeHeight"] + }, + set: function(value) + { + this.Fields["AppSizeHeight"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"Message",{ + get: function() + { + return this.Fields["Message"] + }, + set: function(value) + { + this.Fields["Message"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"DocUrl",{ + get: function() + { + return this.Fields["DocUrl"] + }, + set: function(value) + { + this.Fields["DocUrl"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"OfficeJSVersion",{ + get: function() + { + return this.Fields["OfficeJSVersion"] + }, + set: function(value) + { + this.Fields["OfficeJSVersion"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"HostJSVersion",{ + get: function() + { + return this.Fields["HostJSVersion"] + }, + set: function(value) + { + this.Fields["HostJSVersion"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"WacHostEnvironment",{ + get: function() + { + return this.Fields["WacHostEnvironment"] + }, + set: function(value) + { + this.Fields["WacHostEnvironment"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"IsFromWacAutomation",{ + get: function() + { + return this.Fields["IsFromWacAutomation"] + }, + set: function(value) + { + this.Fields["IsFromWacAutomation"] = value + }, + enumerable: true, + configurable: true + }); + AppActivatedUsageData.prototype.SerializeFields = function() + { + this.SetSerializedField("CorrelationId",this.CorrelationId); + this.SetSerializedField("SessionId",this.SessionId); + this.SetSerializedField("AppId",this.AppId); + this.SetSerializedField("AppInstanceId",this.AppInstanceId); + this.SetSerializedField("AppURL",this.AppURL); + this.SetSerializedField("AssetId",this.AssetId); + this.SetSerializedField("Browser",this.Browser); + this.SetSerializedField("UserId",this.UserId); + this.SetSerializedField("Host",this.Host); + this.SetSerializedField("HostVersion",this.HostVersion); + this.SetSerializedField("ClientId",this.ClientId); + this.SetSerializedField("AppSizeWidth",this.AppSizeWidth); + this.SetSerializedField("AppSizeHeight",this.AppSizeHeight); + this.SetSerializedField("Message",this.Message); + this.SetSerializedField("DocUrl",this.DocUrl); + this.SetSerializedField("OfficeJSVersion",this.OfficeJSVersion); + this.SetSerializedField("HostJSVersion",this.HostJSVersion); + this.SetSerializedField("WacHostEnvironment",this.WacHostEnvironment); + this.SetSerializedField("IsFromWacAutomation",this.IsFromWacAutomation) + }; + return AppActivatedUsageData + }(BaseUsageData); + OSFLog.AppActivatedUsageData = AppActivatedUsageData; + var ScriptLoadUsageData = function(_super) + { + __extends(ScriptLoadUsageData,_super); + function ScriptLoadUsageData() + { + _super.call(this,"ScriptLoad") + } + Object.defineProperty(ScriptLoadUsageData.prototype,"CorrelationId",{ + get: function() + { + return this.Fields["CorrelationId"] + }, + set: function(value) + { + this.Fields["CorrelationId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype,"SessionId",{ + get: function() + { + return this.Fields["SessionId"] + }, + set: function(value) + { + this.Fields["SessionId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype,"ScriptId",{ + get: function() + { + return this.Fields["ScriptId"] + }, + set: function(value) + { + this.Fields["ScriptId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype,"StartTime",{ + get: function() + { + return this.Fields["StartTime"] + }, + set: function(value) + { + this.Fields["StartTime"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype,"ResponseTime",{ + get: function() + { + return this.Fields["ResponseTime"] + }, + set: function(value) + { + this.Fields["ResponseTime"] = value + }, + enumerable: true, + configurable: true + }); + ScriptLoadUsageData.prototype.SerializeFields = function() + { + this.SetSerializedField("CorrelationId",this.CorrelationId); + this.SetSerializedField("SessionId",this.SessionId); + this.SetSerializedField("ScriptId",this.ScriptId); + this.SetSerializedField("StartTime",this.StartTime); + this.SetSerializedField("ResponseTime",this.ResponseTime) + }; + return ScriptLoadUsageData + }(BaseUsageData); + OSFLog.ScriptLoadUsageData = ScriptLoadUsageData; + var AppClosedUsageData = function(_super) + { + __extends(AppClosedUsageData,_super); + function AppClosedUsageData() + { + _super.call(this,"AppClosed") + } + Object.defineProperty(AppClosedUsageData.prototype,"CorrelationId",{ + get: function() + { + return this.Fields["CorrelationId"] + }, + set: function(value) + { + this.Fields["CorrelationId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype,"SessionId",{ + get: function() + { + return this.Fields["SessionId"] + }, + set: function(value) + { + this.Fields["SessionId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype,"FocusTime",{ + get: function() + { + return this.Fields["FocusTime"] + }, + set: function(value) + { + this.Fields["FocusTime"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype,"AppSizeFinalWidth",{ + get: function() + { + return this.Fields["AppSizeFinalWidth"] + }, + set: function(value) + { + this.Fields["AppSizeFinalWidth"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype,"AppSizeFinalHeight",{ + get: function() + { + return this.Fields["AppSizeFinalHeight"] + }, + set: function(value) + { + this.Fields["AppSizeFinalHeight"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype,"OpenTime",{ + get: function() + { + return this.Fields["OpenTime"] + }, + set: function(value) + { + this.Fields["OpenTime"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype,"CloseMethod",{ + get: function() + { + return this.Fields["CloseMethod"] + }, + set: function(value) + { + this.Fields["CloseMethod"] = value + }, + enumerable: true, + configurable: true + }); + AppClosedUsageData.prototype.SerializeFields = function() + { + this.SetSerializedField("CorrelationId",this.CorrelationId); + this.SetSerializedField("SessionId",this.SessionId); + this.SetSerializedField("FocusTime",this.FocusTime); + this.SetSerializedField("AppSizeFinalWidth",this.AppSizeFinalWidth); + this.SetSerializedField("AppSizeFinalHeight",this.AppSizeFinalHeight); + this.SetSerializedField("OpenTime",this.OpenTime); + this.SetSerializedField("CloseMethod",this.CloseMethod) + }; + return AppClosedUsageData + }(BaseUsageData); + OSFLog.AppClosedUsageData = AppClosedUsageData; + var APIUsageUsageData = function(_super) + { + __extends(APIUsageUsageData,_super); + function APIUsageUsageData() + { + _super.call(this,"APIUsage") + } + Object.defineProperty(APIUsageUsageData.prototype,"CorrelationId",{ + get: function() + { + return this.Fields["CorrelationId"] + }, + set: function(value) + { + this.Fields["CorrelationId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype,"SessionId",{ + get: function() + { + return this.Fields["SessionId"] + }, + set: function(value) + { + this.Fields["SessionId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype,"APIType",{ + get: function() + { + return this.Fields["APIType"] + }, + set: function(value) + { + this.Fields["APIType"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype,"APIID",{ + get: function() + { + return this.Fields["APIID"] + }, + set: function(value) + { + this.Fields["APIID"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype,"Parameters",{ + get: function() + { + return this.Fields["Parameters"] + }, + set: function(value) + { + this.Fields["Parameters"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype,"ResponseTime",{ + get: function() + { + return this.Fields["ResponseTime"] + }, + set: function(value) + { + this.Fields["ResponseTime"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype,"ErrorType",{ + get: function() + { + return this.Fields["ErrorType"] + }, + set: function(value) + { + this.Fields["ErrorType"] = value + }, + enumerable: true, + configurable: true + }); + APIUsageUsageData.prototype.SerializeFields = function() + { + this.SetSerializedField("CorrelationId",this.CorrelationId); + this.SetSerializedField("SessionId",this.SessionId); + this.SetSerializedField("APIType",this.APIType); + this.SetSerializedField("APIID",this.APIID); + this.SetSerializedField("Parameters",this.Parameters); + this.SetSerializedField("ResponseTime",this.ResponseTime); + this.SetSerializedField("ErrorType",this.ErrorType) + }; + return APIUsageUsageData + }(BaseUsageData); + OSFLog.APIUsageUsageData = APIUsageUsageData; + var AppInitializationUsageData = function(_super) + { + __extends(AppInitializationUsageData,_super); + function AppInitializationUsageData() + { + _super.call(this,"AppInitialization") + } + Object.defineProperty(AppInitializationUsageData.prototype,"CorrelationId",{ + get: function() + { + return this.Fields["CorrelationId"] + }, + set: function(value) + { + this.Fields["CorrelationId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype,"SessionId",{ + get: function() + { + return this.Fields["SessionId"] + }, + set: function(value) + { + this.Fields["SessionId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype,"SuccessCode",{ + get: function() + { + return this.Fields["SuccessCode"] + }, + set: function(value) + { + this.Fields["SuccessCode"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype,"Message",{ + get: function() + { + return this.Fields["Message"] + }, + set: function(value) + { + this.Fields["Message"] = value + }, + enumerable: true, + configurable: true + }); + AppInitializationUsageData.prototype.SerializeFields = function() + { + this.SetSerializedField("CorrelationId",this.CorrelationId); + this.SetSerializedField("SessionId",this.SessionId); + this.SetSerializedField("SuccessCode",this.SuccessCode); + this.SetSerializedField("Message",this.Message) + }; + return AppInitializationUsageData + }(BaseUsageData); + OSFLog.AppInitializationUsageData = AppInitializationUsageData +})(OSFLog || (OSFLog = {})); var Logger; (function(Logger) { - "use strict"; - (function(TraceLevel) - { - TraceLevel[TraceLevel["info"]=0]="info"; - TraceLevel[TraceLevel["warning"]=1]="warning"; - TraceLevel[TraceLevel["error"]=2]="error" - })(Logger.TraceLevel || (Logger.TraceLevel={})); - var TraceLevel=Logger.TraceLevel; - (function(SendFlag) - { - SendFlag[SendFlag["none"]=0]="none"; - SendFlag[SendFlag["flush"]=1]="flush" - })(Logger.SendFlag || (Logger.SendFlag={})); - var SendFlag=Logger.SendFlag; - function allowUploadingData() - { - if(OSF.Logger && OSF.Logger.ulsEndpoint) - OSF.Logger.ulsEndpoint.loadProxyFrame() - } - Logger.allowUploadingData=allowUploadingData; - function sendLog(traceLevel, message, flag) - { - if(OSF.Logger && OSF.Logger.ulsEndpoint) - { - var jsonObj={ - traceLevel: traceLevel, - message: message, - flag: flag, - internalLog: true - }; - var logs=JSON.stringify(jsonObj); - OSF.Logger.ulsEndpoint.writeLog(logs) - } - } - Logger.sendLog=sendLog; - function creatULSEndpoint() - { - try - { - return new ULSEndpointProxy - } - catch(e) - { - return null - } - } - var ULSEndpointProxy=function() - { - function ULSEndpointProxy() - { - var _this=this; - this.proxyFrame=null; - this.telemetryEndPoint="https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html"; - this.buffer=[]; - this.proxyFrameReady=false; - OSF.OUtil.addEventListener(window,"message",function(e) - { - return _this.tellProxyFrameReady(e) - }); - setTimeout(function() - { - _this.loadProxyFrame() - },3e3) - } - ULSEndpointProxy.prototype.writeLog=function(log) - { - if(this.proxyFrameReady===true) - this.proxyFrame.contentWindow.postMessage(log,ULSEndpointProxy.telemetryOrigin); - else if(this.buffer.length < 128) - this.buffer.push(log) - }; - ULSEndpointProxy.prototype.loadProxyFrame=function() - { - if(this.proxyFrame==null) - { - this.proxyFrame=document.createElement("iframe"); - this.proxyFrame.setAttribute("style","display:none"); - this.proxyFrame.setAttribute("src",this.telemetryEndPoint); - document.head.appendChild(this.proxyFrame) - } - }; - ULSEndpointProxy.prototype.tellProxyFrameReady=function(e) - { - var _this=this; - if(e.data==="ProxyFrameReadyToLog") - { - this.proxyFrameReady=true; - for(var i=0; i < this.buffer.length; i++) - this.writeLog(this.buffer[i]); - this.buffer.length=0; - OSF.OUtil.removeEventListener(window,"message",function(e) - { - return _this.tellProxyFrameReady(e) - }) - } - else if(e.data==="ProxyFrameReadyToInit") - { - var initJson={ - appName: "Office APPs", - sessionId: OSF.OUtil.Guid.generateNewGuid() - }; - var initStr=JSON.stringify(initJson); - this.proxyFrame.contentWindow.postMessage(initStr,ULSEndpointProxy.telemetryOrigin) - } - }; - ULSEndpointProxy.telemetryOrigin="https://telemetryservice.firstpartyapps.oaspapps.com"; - return ULSEndpointProxy - }(); - if(!OSF.Logger) - OSF.Logger=Logger; - Logger.ulsEndpoint=creatULSEndpoint() -})(Logger || (Logger={})); + "use strict"; + (function(TraceLevel) + { + TraceLevel[TraceLevel["info"] = 0] = "info"; + TraceLevel[TraceLevel["warning"] = 1] = "warning"; + TraceLevel[TraceLevel["error"] = 2] = "error" + })(Logger.TraceLevel || (Logger.TraceLevel = {})); + var TraceLevel = Logger.TraceLevel; + (function(SendFlag) + { + SendFlag[SendFlag["none"] = 0] = "none"; + SendFlag[SendFlag["flush"] = 1] = "flush" + })(Logger.SendFlag || (Logger.SendFlag = {})); + var SendFlag = Logger.SendFlag; + function allowUploadingData() + { + if(OSF.Logger && OSF.Logger.ulsEndpoint) + OSF.Logger.ulsEndpoint.loadProxyFrame() + } + Logger.allowUploadingData = allowUploadingData; + function sendLog(traceLevel, message, flag) + { + if(OSF.Logger && OSF.Logger.ulsEndpoint) + { + var jsonObj = { + traceLevel: traceLevel, + message: message, + flag: flag, + internalLog: true + }; + var logs = JSON.stringify(jsonObj); + OSF.Logger.ulsEndpoint.writeLog(logs) + } + } + Logger.sendLog = sendLog; + function creatULSEndpoint() + { + try + { + return new ULSEndpointProxy + } + catch(e) + { + return null + } + } + var ULSEndpointProxy = function() + { + function ULSEndpointProxy() + { + var _this = this; + this.proxyFrame = null; + this.telemetryEndPoint = "https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html"; + this.buffer = []; + this.proxyFrameReady = false; + OSF.OUtil.addEventListener(window,"message",function(e) + { + return _this.tellProxyFrameReady(e) + }); + setTimeout(function() + { + _this.loadProxyFrame() + },3e3) + } + ULSEndpointProxy.prototype.writeLog = function(log) + { + if(this.proxyFrameReady === true) + this.proxyFrame.contentWindow.postMessage(log,ULSEndpointProxy.telemetryOrigin); + else if(this.buffer.length < 128) + this.buffer.push(log) + }; + ULSEndpointProxy.prototype.loadProxyFrame = function() + { + if(this.proxyFrame == null) + { + this.proxyFrame = document.createElement("iframe"); + this.proxyFrame.setAttribute("style","display:none"); + this.proxyFrame.setAttribute("src",this.telemetryEndPoint); + document.head.appendChild(this.proxyFrame) + } + }; + ULSEndpointProxy.prototype.tellProxyFrameReady = function(e) + { + var _this = this; + if(e.data === "ProxyFrameReadyToLog") + { + this.proxyFrameReady = true; + for(var i = 0; i < this.buffer.length; i++) + this.writeLog(this.buffer[i]); + this.buffer.length = 0; + OSF.OUtil.removeEventListener(window,"message",function(e) + { + return _this.tellProxyFrameReady(e) + }) + } + else if(e.data === "ProxyFrameReadyToInit") + { + var initJson = { + appName: "Office APPs", + sessionId: OSF.OUtil.Guid.generateNewGuid() + }; + var initStr = JSON.stringify(initJson); + this.proxyFrame.contentWindow.postMessage(initStr,ULSEndpointProxy.telemetryOrigin) + } + }; + ULSEndpointProxy.telemetryOrigin = "https://telemetryservice.firstpartyapps.oaspapps.com"; + return ULSEndpointProxy + }(); + if(!OSF.Logger) + OSF.Logger = Logger; + Logger.ulsEndpoint = creatULSEndpoint() +})(Logger || (Logger = {})); var OSFAriaLogger; (function(OSFAriaLogger) { - var AriaLogger=function() - { - function AriaLogger(){} - AriaLogger.prototype.getAriaCDNLocation=function() - { - return OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry-2.8.0.min.js" - }; - AriaLogger.getInstance=function() - { - if(AriaLogger.AriaLoggerObj===undefined) - AriaLogger.AriaLoggerObj=new AriaLogger; - return AriaLogger.AriaLoggerObj - }; - AriaLogger.prototype.isIUsageData=function(arg) - { - return arg["Fields"] !==undefined - }; - AriaLogger.prototype.loadAriaScriptAndLog=function(tableName, telemetryData) - { - var startAfterMs=1e3; - OSF.OUtil.loadScript(this.getAriaCDNLocation(),function() - { - try - { - if(!this.ALogger) - { - var OfficeExtensibilityTenantID="db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; - var configuration=new microsoft.applications.telemetry.LogConfiguration; - configuration.enableAutoUserSession=true; - microsoft.applications.telemetry.LogManager.initialize(OfficeExtensibilityTenantID,configuration); - this.ALogger=new microsoft.applications.telemetry.Logger - } - var eventProperties=new microsoft.applications.telemetry.EventProperties; - eventProperties.name="Office.Extensibility.OfficeJS."+tableName; - for(var key in telemetryData) - if(key.toLowerCase() !=="table") - eventProperties.setProperty(key,telemetryData[key]); - var today=new Date; - eventProperties.setProperty("Date",today.toISOString()); - this.ALogger.logEvent(eventProperties) - } - catch(e){} - },startAfterMs) - }; - AriaLogger.prototype.logData=function(data) - { - if(this.isIUsageData(data)) - this.loadAriaScriptAndLog(data["Table"],data["Fields"]); - else - this.loadAriaScriptAndLog(data["Table"],data) - }; - return AriaLogger - }(); - OSFAriaLogger.AriaLogger=AriaLogger -})(OSFAriaLogger || (OSFAriaLogger={})); + var AriaLogger = function() + { + function AriaLogger(){} + AriaLogger.prototype.getAriaCDNLocation = function() + { + return OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath() + "/ariatelemetry/aria-web-telemetry.js" + }; + AriaLogger.getInstance = function() + { + if(AriaLogger.AriaLoggerObj === undefined) + AriaLogger.AriaLoggerObj = new AriaLogger; + return AriaLogger.AriaLoggerObj + }; + AriaLogger.prototype.isIUsageData = function(arg) + { + return arg["Fields"] !== undefined + }; + AriaLogger.prototype.loadAriaScriptAndLog = function(tableName, telemetryData) + { + var startAfterMs = 1e3; + OSF.OUtil.loadScript(this.getAriaCDNLocation(),function() + { + try + { + if(!this.ALogger) + { + var OfficeExtensibilityTenantID = "db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; + this.ALogger = AWTLogManager.initialize(OfficeExtensibilityTenantID) + } + var eventProperties = new AWTEventProperties; + eventProperties.setName("Office.Extensibility.OfficeJS." + tableName); + for(var key in telemetryData) + if(key.toLowerCase() !== "table") + eventProperties.setProperty(key,telemetryData[key]); + var today = new Date; + eventProperties.setProperty("Date",today.toISOString()); + this.ALogger.logEvent(eventProperties) + } + catch(e){} + },startAfterMs) + }; + AriaLogger.prototype.logData = function(data) + { + if(this.isIUsageData(data)) + this.loadAriaScriptAndLog(data["Table"],data["Fields"]); + else + this.loadAriaScriptAndLog(data["Table"],data) + }; + return AriaLogger + }(); + OSFAriaLogger.AriaLogger = AriaLogger +})(OSFAriaLogger || (OSFAriaLogger = {})); var OSFAppTelemetry; (function(OSFAppTelemetry) { - "use strict"; - var appInfo; - var sessionId=OSF.OUtil.Guid.generateNewGuid(); - var osfControlAppCorrelationId=""; - var omexDomainRegex=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/","i"); - var AppInfo=function() - { - function AppInfo(){} - return AppInfo - }(); - var Event=function() - { - function Event(name, handler) - { - this.name=name; - this.handler=handler - } - return Event - }(); - var AppStorage=function() - { - function AppStorage() - { - this.clientIDKey="Office API client"; - this.logIdSetKey="Office App Log Id Set" - } - AppStorage.prototype.getClientId=function() - { - var clientId=this.getValue(this.clientIDKey); - if(!clientId || clientId.length <=0 || clientId.length > 40) - { - clientId=OSF.OUtil.Guid.generateNewGuid(); - this.setValue(this.clientIDKey,clientId) - } - return clientId - }; - AppStorage.prototype.saveLog=function(logId, log) - { - var logIdSet=this.getValue(this.logIdSetKey); - logIdSet=(logIdSet && logIdSet.length > 0 ? logIdSet+";" : "")+logId; - this.setValue(this.logIdSetKey,logIdSet); - this.setValue(logId,log) - }; - AppStorage.prototype.enumerateLog=function(callback, clean) - { - var logIdSet=this.getValue(this.logIdSetKey); - if(logIdSet) - { - var ids=logIdSet.split(";"); - for(var id in ids) - { - var logId=ids[id]; - var log=this.getValue(logId); - if(log) - { - if(callback) - callback(logId,log); - if(clean) - this.remove(logId) - } - } - if(clean) - this.remove(this.logIdSetKey) - } - }; - AppStorage.prototype.getValue=function(key) - { - var osfLocalStorage=OSF.OUtil.getLocalStorage(); - var value=""; - if(osfLocalStorage) - value=osfLocalStorage.getItem(key); - return value - }; - AppStorage.prototype.setValue=function(key, value) - { - var osfLocalStorage=OSF.OUtil.getLocalStorage(); - if(osfLocalStorage) - osfLocalStorage.setItem(key,value) - }; - AppStorage.prototype.remove=function(key) - { - var osfLocalStorage=OSF.OUtil.getLocalStorage(); - if(osfLocalStorage) - try - { - osfLocalStorage.removeItem(key) - } - catch(ex){} - }; - return AppStorage - }(); - var AppLogger=function() - { - function AppLogger(){} - AppLogger.prototype.LogData=function(data) - { - if(!OSF.Logger) - return; - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,data.SerializeRow(),OSF.Logger.SendFlag.none); - OSFAriaLogger.AriaLogger.getInstance().logData(data) - }; - AppLogger.prototype.LogRawData=function(log) - { - if(!OSF.Logger) - return; - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,log,OSF.Logger.SendFlag.none); - try - { - OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)) - } - catch(e){} - }; - return AppLogger - }(); - function trimStringToLowerCase(input) - { - if(input) - input=input.replace(/[{}]/g,"").toLowerCase(); - return input || "" - } - function initialize(context) - { - if(!OSF.Logger) - return; - if(appInfo) - return; - appInfo=new AppInfo; - if(context.get_hostFullVersion()) - appInfo.hostVersion=context.get_hostFullVersion(); - else - appInfo.hostVersion=context.get_appVersion(); - appInfo.appId=context.get_id(); - appInfo.host=context.get_appName(); - appInfo.browser=window.navigator.userAgent; - appInfo.correlationId=trimStringToLowerCase(context.get_correlationId()); - appInfo.clientId=(new AppStorage).getClientId(); - appInfo.appInstanceId=context.get_appInstanceId(); - if(appInfo.appInstanceId) - appInfo.appInstanceId=appInfo.appInstanceId.replace(/[{}]/g,"").toLowerCase(); - appInfo.message=context.get_hostCustomMessage(); - appInfo.officeJSVersion=OSF.ConstantNames.FileVersion; - appInfo.hostJSVersion="16.0.7920.1000"; - if(context._wacHostEnvironment) - appInfo.wacHostEnvironment=context._wacHostEnvironment; - if(context._isFromWacAutomation !==undefined && context._isFromWacAutomation !==null) - appInfo.isFromWacAutomation=context._isFromWacAutomation.toString().toLowerCase(); - var docUrl=context.get_docUrl(); - appInfo.docUrl=omexDomainRegex.test(docUrl) ? docUrl : ""; - var url=location.href; - if(url) - url=url.split("?")[0].split("#")[0]; - appInfo.appURL=url; - (function getUserIdAndAssetIdFromToken(token, appInfo) - { - var xmlContent; - var parser; - var xmlDoc; - appInfo.assetId=""; - appInfo.userId=""; - try - { - xmlContent=decodeURIComponent(token); - parser=new DOMParser; - xmlDoc=parser.parseFromString(xmlContent,"text/xml"); - var cidNode=xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("cid"); - var oidNode=xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("oid"); - if(cidNode && cidNode.nodeValue) - appInfo.userId=cidNode.nodeValue; - else if(oidNode && oidNode.nodeValue) - appInfo.userId=oidNode.nodeValue; - appInfo.assetId=xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue - } - catch(e){} - finally - { - xmlContent=null; - xmlDoc=null; - parser=null - } - })(context.get_eToken(),appInfo); - (function handleLifecycle() - { - var startTime=new Date; - var lastFocus=null; - var focusTime=0; - var finished=false; - var adjustFocusTime=function() - { - if(document.hasFocus()) - { - if(lastFocus==null) - lastFocus=new Date - } - else if(lastFocus) - { - focusTime+=Math.abs((new Date).getTime() - lastFocus.getTime()); - lastFocus=null - } - }; - var eventList=[]; - eventList.push(new Event("focus",adjustFocusTime)); - eventList.push(new Event("blur",adjustFocusTime)); - eventList.push(new Event("focusout",adjustFocusTime)); - eventList.push(new Event("focusin",adjustFocusTime)); - var exitFunction=function() - { - for(var i=0; i < eventList.length; i++) - OSF.OUtil.removeEventListener(window,eventList[i].name,eventList[i].handler); - eventList.length=0; - if(!finished) - { - if(document.hasFocus() && lastFocus) - { - focusTime+=Math.abs((new Date).getTime() - lastFocus.getTime()); - lastFocus=null - } - OSFAppTelemetry.onAppClosed(Math.abs((new Date).getTime() - startTime.getTime()),focusTime); - finished=true - } - }; - eventList.push(new Event("beforeunload",exitFunction)); - eventList.push(new Event("unload",exitFunction)); - for(var i=0; i < eventList.length; i++) - OSF.OUtil.addEventListener(window,eventList[i].name,eventList[i].handler); - adjustFocusTime() - })(); - OSFAppTelemetry.onAppActivated() - } - OSFAppTelemetry.initialize=initialize; - function onAppActivated() - { - if(!appInfo) - return; - (new AppStorage).enumerateLog(function(id, log) - { - return(new AppLogger).LogRawData(log) - },true); - var data=new OSFLog.AppActivatedUsageData; - data.SessionId=sessionId; - data.AppId=appInfo.appId; - data.AssetId=appInfo.assetId; - data.AppURL=appInfo.appURL; - data.UserId=appInfo.userId; - data.ClientId=appInfo.clientId; - data.Browser=appInfo.browser; - data.Host=appInfo.host; - data.HostVersion=appInfo.hostVersion; - data.CorrelationId=trimStringToLowerCase(appInfo.correlationId); - data.AppSizeWidth=window.innerWidth; - data.AppSizeHeight=window.innerHeight; - data.AppInstanceId=appInfo.appInstanceId; - data.Message=appInfo.message; - data.DocUrl=appInfo.docUrl; - data.OfficeJSVersion=appInfo.officeJSVersion; - data.HostJSVersion=appInfo.hostJSVersion; - if(appInfo.wacHostEnvironment) - data.WacHostEnvironment=appInfo.wacHostEnvironment; - if(appInfo.isFromWacAutomation !==undefined && appInfo.isFromWacAutomation !==null) - data.IsFromWacAutomation=appInfo.isFromWacAutomation; - (new AppLogger).LogData(data); - setTimeout(function() - { - if(!OSF.Logger) - return; - OSF.Logger.allowUploadingData() - },100) - } - OSFAppTelemetry.onAppActivated=onAppActivated; - function onScriptDone(scriptId, msStartTime, msResponseTime, appCorrelationId) - { - var data=new OSFLog.ScriptLoadUsageData; - data.CorrelationId=trimStringToLowerCase(appCorrelationId); - data.SessionId=sessionId; - data.ScriptId=scriptId; - data.StartTime=msStartTime; - data.ResponseTime=msResponseTime; - (new AppLogger).LogData(data) - } - OSFAppTelemetry.onScriptDone=onScriptDone; - function onCallDone(apiType, id, parameters, msResponseTime, errorType) - { - if(!appInfo) - return; - var data=new OSFLog.APIUsageUsageData; - data.CorrelationId=trimStringToLowerCase(osfControlAppCorrelationId); - data.SessionId=sessionId; - data.APIType=apiType; - data.APIID=id; - data.Parameters=parameters; - data.ResponseTime=msResponseTime; - data.ErrorType=errorType; - (new AppLogger).LogData(data) - } - OSFAppTelemetry.onCallDone=onCallDone; - function onMethodDone(id, args, msResponseTime, errorType) - { - var parameters=null; - if(args) - if(typeof args=="number") - parameters=String(args); - else if(typeof args==="object") - for(var index in args) - { - if(parameters !==null) - parameters+=","; - else - parameters=""; - if(typeof args[index]=="number") - parameters+=String(args[index]) - } - else - parameters=""; - OSF.AppTelemetry.onCallDone("method",id,parameters,msResponseTime,errorType) - } - OSFAppTelemetry.onMethodDone=onMethodDone; - function onPropertyDone(propertyName, msResponseTime) - { - OSF.AppTelemetry.onCallDone("property",-1,propertyName,msResponseTime) - } - OSFAppTelemetry.onPropertyDone=onPropertyDone; - function onEventDone(id, errorType) - { - OSF.AppTelemetry.onCallDone("event",id,null,0,errorType) - } - OSFAppTelemetry.onEventDone=onEventDone; - function onRegisterDone(register, id, msResponseTime, errorType) - { - OSF.AppTelemetry.onCallDone(register ? "registerevent" : "unregisterevent",id,null,msResponseTime,errorType) - } - OSFAppTelemetry.onRegisterDone=onRegisterDone; - function onAppClosed(openTime, focusTime) - { - if(!appInfo) - return; - var data=new OSFLog.AppClosedUsageData; - data.CorrelationId=trimStringToLowerCase(osfControlAppCorrelationId); - data.SessionId=sessionId; - data.FocusTime=focusTime; - data.OpenTime=openTime; - data.AppSizeFinalWidth=window.innerWidth; - data.AppSizeFinalHeight=window.innerHeight; - (new AppStorage).saveLog(sessionId,data.SerializeRow()) - } - OSFAppTelemetry.onAppClosed=onAppClosed; - function setOsfControlAppCorrelationId(correlationId) - { - osfControlAppCorrelationId=trimStringToLowerCase(correlationId) - } - OSFAppTelemetry.setOsfControlAppCorrelationId=setOsfControlAppCorrelationId; - function doAppInitializationLogging(isException, message) - { - var data=new OSFLog.AppInitializationUsageData; - data.CorrelationId=trimStringToLowerCase(osfControlAppCorrelationId); - data.SessionId=sessionId; - data.SuccessCode=isException ? 1 : 0; - data.Message=message; - (new AppLogger).LogData(data) - } - OSFAppTelemetry.doAppInitializationLogging=doAppInitializationLogging; - function logAppCommonMessage(message) - { - doAppInitializationLogging(false,message) - } - OSFAppTelemetry.logAppCommonMessage=logAppCommonMessage; - function logAppException(errorMessage) - { - doAppInitializationLogging(true,errorMessage) - } - OSFAppTelemetry.logAppException=logAppException; - OSF.AppTelemetry=OSFAppTelemetry -})(OSFAppTelemetry || (OSFAppTelemetry={})); -Microsoft.Office.WebExtension.EventType={}; -OSF.EventDispatch=function OSF_EventDispatch(eventTypes) + "use strict"; + var appInfo; + var sessionId = OSF.OUtil.Guid.generateNewGuid(); + var osfControlAppCorrelationId = ""; + var omexDomainRegex = new RegExp("^https?://store\\.office(ppe|-int)?\\.com/","i"); + OSFAppTelemetry.enableTelemetry = true; + var AppInfo = function() + { + function AppInfo(){} + return AppInfo + }(); + var Event = function() + { + function Event(name, handler) + { + this.name = name; + this.handler = handler + } + return Event + }(); + var AppStorage = function() + { + function AppStorage() + { + this.clientIDKey = "Office API client"; + this.logIdSetKey = "Office App Log Id Set" + } + AppStorage.prototype.getClientId = function() + { + var clientId = this.getValue(this.clientIDKey); + if(!clientId || clientId.length <= 0 || clientId.length > 40) + { + clientId = OSF.OUtil.Guid.generateNewGuid(); + this.setValue(this.clientIDKey,clientId) + } + return clientId + }; + AppStorage.prototype.saveLog = function(logId, log) + { + var logIdSet = this.getValue(this.logIdSetKey); + logIdSet = (logIdSet && logIdSet.length > 0 ? logIdSet + ";" : "") + logId; + this.setValue(this.logIdSetKey,logIdSet); + this.setValue(logId,log) + }; + AppStorage.prototype.enumerateLog = function(callback, clean) + { + var logIdSet = this.getValue(this.logIdSetKey); + if(logIdSet) + { + var ids = logIdSet.split(";"); + for(var id in ids) + { + var logId = ids[id]; + var log = this.getValue(logId); + if(log) + { + if(callback) + callback(logId,log); + if(clean) + this.remove(logId) + } + } + if(clean) + this.remove(this.logIdSetKey) + } + }; + AppStorage.prototype.getValue = function(key) + { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + var value = ""; + if(osfLocalStorage) + value = osfLocalStorage.getItem(key); + return value + }; + AppStorage.prototype.setValue = function(key, value) + { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + if(osfLocalStorage) + osfLocalStorage.setItem(key,value) + }; + AppStorage.prototype.remove = function(key) + { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + if(osfLocalStorage) + try + { + osfLocalStorage.removeItem(key) + } + catch(ex){} + }; + return AppStorage + }(); + var AppLogger = function() + { + function AppLogger(){} + AppLogger.prototype.LogData = function(data) + { + if(!OSF.Logger || !OSFAppTelemetry.enableTelemetry) + return; + try + { + OSFAriaLogger.AriaLogger.getInstance().logData(data) + } + catch(e){} + }; + AppLogger.prototype.LogRawData = function(log) + { + if(!OSF.Logger || !OSFAppTelemetry.enableTelemetry) + return; + try + { + OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)) + } + catch(e){} + }; + return AppLogger + }(); + function trimStringToLowerCase(input) + { + if(input) + input = input.replace(/[{}]/g,"").toLowerCase(); + return input || "" + } + function initialize(context) + { + if(!OSF.Logger) + return; + if(appInfo) + return; + appInfo = new AppInfo; + if(context.get_hostFullVersion()) + appInfo.hostVersion = context.get_hostFullVersion(); + else + appInfo.hostVersion = context.get_appVersion(); + appInfo.appId = context.get_id(); + appInfo.host = context.get_appName(); + appInfo.browser = window.navigator.userAgent; + appInfo.correlationId = trimStringToLowerCase(context.get_correlationId()); + appInfo.clientId = (new AppStorage).getClientId(); + appInfo.appInstanceId = context.get_appInstanceId(); + if(appInfo.appInstanceId) + appInfo.appInstanceId = appInfo.appInstanceId.replace(/[{}]/g,"").toLowerCase(); + appInfo.message = context.get_hostCustomMessage(); + appInfo.officeJSVersion = OSF.ConstantNames.FileVersion; + appInfo.hostJSVersion = "16.0.8902.1000"; + if(context._wacHostEnvironment) + appInfo.wacHostEnvironment = context._wacHostEnvironment; + if(context._isFromWacAutomation !== undefined && context._isFromWacAutomation !== null) + appInfo.isFromWacAutomation = context._isFromWacAutomation.toString().toLowerCase(); + var docUrl = context.get_docUrl(); + appInfo.docUrl = omexDomainRegex.test(docUrl) ? docUrl : ""; + var url = location.href; + if(url) + url = url.split("?")[0].split("#")[0]; + appInfo.appURL = url; + (function getUserIdAndAssetIdFromToken(token, appInfo) + { + var xmlContent; + var parser; + var xmlDoc; + appInfo.assetId = ""; + appInfo.userId = ""; + try + { + xmlContent = decodeURIComponent(token); + parser = new DOMParser; + xmlDoc = parser.parseFromString(xmlContent,"text/xml"); + var cidNode = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("cid"); + var oidNode = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("oid"); + if(cidNode && cidNode.nodeValue) + appInfo.userId = cidNode.nodeValue; + else if(oidNode && oidNode.nodeValue) + appInfo.userId = oidNode.nodeValue; + appInfo.assetId = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue + } + catch(e){} + finally + { + xmlContent = null; + xmlDoc = null; + parser = null + } + })(context.get_eToken(),appInfo); + (function handleLifecycle() + { + var startTime = new Date; + var lastFocus = null; + var focusTime = 0; + var finished = false; + var adjustFocusTime = function() + { + if(document.hasFocus()) + { + if(lastFocus == null) + lastFocus = new Date + } + else if(lastFocus) + { + focusTime += Math.abs((new Date).getTime() - lastFocus.getTime()); + lastFocus = null + } + }; + var eventList = []; + eventList.push(new Event("focus",adjustFocusTime)); + eventList.push(new Event("blur",adjustFocusTime)); + eventList.push(new Event("focusout",adjustFocusTime)); + eventList.push(new Event("focusin",adjustFocusTime)); + var exitFunction = function() + { + for(var i = 0; i < eventList.length; i++) + OSF.OUtil.removeEventListener(window,eventList[i].name,eventList[i].handler); + eventList.length = 0; + if(!finished) + { + if(document.hasFocus() && lastFocus) + { + focusTime += Math.abs((new Date).getTime() - lastFocus.getTime()); + lastFocus = null + } + OSFAppTelemetry.onAppClosed(Math.abs((new Date).getTime() - startTime.getTime()),focusTime); + finished = true + } + }; + eventList.push(new Event("beforeunload",exitFunction)); + eventList.push(new Event("unload",exitFunction)); + for(var i = 0; i < eventList.length; i++) + OSF.OUtil.addEventListener(window,eventList[i].name,eventList[i].handler); + adjustFocusTime() + })(); + OSFAppTelemetry.onAppActivated() + } + OSFAppTelemetry.initialize = initialize; + function onAppActivated() + { + if(!appInfo) + return; + (new AppStorage).enumerateLog(function(id, log) + { + return(new AppLogger).LogRawData(log) + },true); + var data = new OSFLog.AppActivatedUsageData; + data.SessionId = sessionId; + data.AppId = appInfo.appId; + data.AssetId = appInfo.assetId; + data.AppURL = appInfo.appURL; + data.UserId = appInfo.userId; + data.ClientId = appInfo.clientId; + data.Browser = appInfo.browser; + data.Host = appInfo.host; + data.HostVersion = appInfo.hostVersion; + data.CorrelationId = trimStringToLowerCase(appInfo.correlationId); + data.AppSizeWidth = window.innerWidth; + data.AppSizeHeight = window.innerHeight; + data.AppInstanceId = appInfo.appInstanceId; + data.Message = appInfo.message; + data.DocUrl = appInfo.docUrl; + data.OfficeJSVersion = appInfo.officeJSVersion; + data.HostJSVersion = appInfo.hostJSVersion; + if(appInfo.wacHostEnvironment) + data.WacHostEnvironment = appInfo.wacHostEnvironment; + if(appInfo.isFromWacAutomation !== undefined && appInfo.isFromWacAutomation !== null) + data.IsFromWacAutomation = appInfo.isFromWacAutomation; + (new AppLogger).LogData(data); + setTimeout(function() + { + if(!OSF.Logger) + return; + OSF.Logger.allowUploadingData() + },100) + } + OSFAppTelemetry.onAppActivated = onAppActivated; + function onScriptDone(scriptId, msStartTime, msResponseTime, appCorrelationId) + { + var data = new OSFLog.ScriptLoadUsageData; + data.CorrelationId = trimStringToLowerCase(appCorrelationId); + data.SessionId = sessionId; + data.ScriptId = scriptId; + data.StartTime = msStartTime; + data.ResponseTime = msResponseTime; + (new AppLogger).LogData(data) + } + OSFAppTelemetry.onScriptDone = onScriptDone; + function onCallDone(apiType, id, parameters, msResponseTime, errorType) + { + if(!appInfo) + return; + var data = new OSFLog.APIUsageUsageData; + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.APIType = apiType; + data.APIID = id; + data.Parameters = parameters; + data.ResponseTime = msResponseTime; + data.ErrorType = errorType; + (new AppLogger).LogData(data) + } + OSFAppTelemetry.onCallDone = onCallDone; + function onMethodDone(id, args, msResponseTime, errorType) + { + var parameters = null; + if(args) + if(typeof args == "number") + parameters = String(args); + else if(typeof args === "object") + for(var index in args) + { + if(parameters !== null) + parameters += ","; + else + parameters = ""; + if(typeof args[index] == "number") + parameters += String(args[index]) + } + else + parameters = ""; + OSF.AppTelemetry.onCallDone("method",id,parameters,msResponseTime,errorType) + } + OSFAppTelemetry.onMethodDone = onMethodDone; + function onPropertyDone(propertyName, msResponseTime) + { + OSF.AppTelemetry.onCallDone("property",-1,propertyName,msResponseTime) + } + OSFAppTelemetry.onPropertyDone = onPropertyDone; + function onEventDone(id, errorType) + { + OSF.AppTelemetry.onCallDone("event",id,null,0,errorType) + } + OSFAppTelemetry.onEventDone = onEventDone; + function onRegisterDone(register, id, msResponseTime, errorType) + { + OSF.AppTelemetry.onCallDone(register ? "registerevent" : "unregisterevent",id,null,msResponseTime,errorType) + } + OSFAppTelemetry.onRegisterDone = onRegisterDone; + function onAppClosed(openTime, focusTime) + { + if(!appInfo) + return; + var data = new OSFLog.AppClosedUsageData; + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.FocusTime = focusTime; + data.OpenTime = openTime; + data.AppSizeFinalWidth = window.innerWidth; + data.AppSizeFinalHeight = window.innerHeight; + (new AppStorage).saveLog(sessionId,data.SerializeRow()) + } + OSFAppTelemetry.onAppClosed = onAppClosed; + function setOsfControlAppCorrelationId(correlationId) + { + osfControlAppCorrelationId = trimStringToLowerCase(correlationId) + } + OSFAppTelemetry.setOsfControlAppCorrelationId = setOsfControlAppCorrelationId; + function doAppInitializationLogging(isException, message) + { + var data = new OSFLog.AppInitializationUsageData; + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.SuccessCode = isException ? 1 : 0; + data.Message = message; + (new AppLogger).LogData(data) + } + OSFAppTelemetry.doAppInitializationLogging = doAppInitializationLogging; + function logAppCommonMessage(message) + { + doAppInitializationLogging(false,message) + } + OSFAppTelemetry.logAppCommonMessage = logAppCommonMessage; + function logAppException(errorMessage) + { + doAppInitializationLogging(true,errorMessage) + } + OSFAppTelemetry.logAppException = logAppException; + OSF.AppTelemetry = OSFAppTelemetry +})(OSFAppTelemetry || (OSFAppTelemetry = {})); +Microsoft.Office.WebExtension.EventType = {}; +OSF.EventDispatch = function OSF_EventDispatch(eventTypes) { - this._eventHandlers={}; - this._queuedEventsArgs={}; - for(var entry in eventTypes) - { - var eventType=eventTypes[entry]; - this._eventHandlers[eventType]=[]; - this._queuedEventsArgs[eventType]=[] - } -}; -OSF.EventDispatch.prototype={ - getSupportedEvents: function OSF_EventDispatch$getSupportedEvents() - { - var events=[]; - for(var eventName in this._eventHandlers) - events.push(eventName); - return events - }, - supportsEvent: function OSF_EventDispatch$supportsEvent(event) - { - var isSupported=false; - for(var eventName in this._eventHandlers) - if(event==eventName) - { - isSupported=true; - break - } - return isSupported - }, - hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) - { - var handlers=this._eventHandlers[eventType]; - if(handlers && handlers.length > 0) - for(var h in handlers) - if(handlers[h]===handler) - return true; - return false - }, - addEventHandler: function OSF_EventDispatch$addEventHandler(eventType, handler) - { - if(typeof handler !="function") - return false; - var handlers=this._eventHandlers[eventType]; - if(handlers && !this.hasEventHandler(eventType,handler)) - { - handlers.push(handler); - return true - } - else - return false - }, - addEventHandlerAndFireQueuedEvent: function OSF_EventDispatch$addEventHandlerAndFireQueuedEvent(eventType, handler) - { - var handlers=this._eventHandlers[eventType]; - var isFirstHandler=handlers.length==0; - var succeed=this.addEventHandler(eventType,handler); - if(isFirstHandler && succeed) - this.fireQueuedEvent(eventType); - return succeed - }, - removeEventHandler: function OSF_EventDispatch$removeEventHandler(eventType, handler) - { - var handlers=this._eventHandlers[eventType]; - if(handlers && handlers.length > 0) - for(var index=0; index < handlers.length; index++) - if(handlers[index]===handler) - { - handlers.splice(index,1); - return true - } - return false - }, - clearEventHandlers: function OSF_EventDispatch$clearEventHandlers(eventType) - { - if(typeof this._eventHandlers[eventType] !="undefined" && this._eventHandlers[eventType].length > 0) - { - this._eventHandlers[eventType]=[]; - return true - } - return false - }, - getEventHandlerCount: function OSF_EventDispatch$getEventHandlerCount(eventType) - { - return this._eventHandlers[eventType] !=undefined ? this._eventHandlers[eventType].length : -1 - }, - fireEvent: function OSF_EventDispatch$fireEvent(eventArgs) - { - if(eventArgs.type==undefined) - return false; - var eventType=eventArgs.type; - if(eventType && this._eventHandlers[eventType]) - { - var eventHandlers=this._eventHandlers[eventType]; - for(var handler in eventHandlers) - eventHandlers[handler](eventArgs); - return true - } - else - return false - }, - fireOrQueueEvent: function OSF_EventDispatch$fireOrQueueEvent(eventArgs) - { - var eventType=eventArgs.type; - if(eventType && this._eventHandlers[eventType]) - { - var eventHandlers=this._eventHandlers[eventType]; - var queuedEvents=this._queuedEventsArgs[eventType]; - if(eventHandlers.length==0) - queuedEvents.push(eventArgs); - else - this.fireEvent(eventArgs); - return true - } - else - return false - }, - fireQueuedEvent: function OSF_EventDispatch$queueEvent(eventType) - { - if(eventType && this._eventHandlers[eventType]) - { - var eventHandlers=this._eventHandlers[eventType]; - var queuedEvents=this._queuedEventsArgs[eventType]; - if(eventHandlers.length > 0) - { - var eventHandler=eventHandlers[0]; - while(queuedEvents.length > 0) - { - var eventArgs=queuedEvents.shift(); - eventHandler(eventArgs) - } - return true - } - } - return false - }, - clearQueuedEvent: function OSF_EventDispatch$clearQueuedEvent(eventType) - { - if(eventType && this._eventHandlers[eventType]) - { - var queuedEvents=this._queuedEventsArgs[eventType]; - if(queuedEvents) - this._queuedEventsArgs[eventType]=[] - } - } -}; -OSF.DDA.OMFactory=OSF.DDA.OMFactory || {}; -OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEventArgs(eventType, target, eventProperties) + this._eventHandlers = {}; + this._objectEventHandlers = {}; + this._queuedEventsArgs = {}; + for(var entry in eventTypes) + { + var eventType = eventTypes[entry]; + var isObjectEvent = eventType == "objectDeleted" || eventType == "objectSelectionChanged" || eventType == "objectDataChanged" || eventType == "contentControlAdded"; + if(!isObjectEvent) + this._eventHandlers[eventType] = []; + else + this._objectEventHandlers[eventType] = {}; + this._queuedEventsArgs[eventType] = [] + } +}; +OSF.EventDispatch.prototype = { + getSupportedEvents: function OSF_EventDispatch$getSupportedEvents() + { + var events = []; + for(var eventName in this._eventHandlers) + events.push(eventName); + for(var eventName in this._objectEventHandlers) + events.push(eventName); + return events + }, + supportsEvent: function OSF_EventDispatch$supportsEvent(event) + { + for(var eventName in this._eventHandlers) + if(event == eventName) + return true; + for(var eventName in this._objectEventHandlers) + if(event == eventName) + return true; + return false + }, + hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) + { + var handlers = this._eventHandlers[eventType]; + if(handlers && handlers.length > 0) + for(var h in handlers) + if(handlers[h] === handler) + return true; + return false + }, + hasObjectEventHandler: function OSF_EventDispatch$hasObjectEventHandler(eventType, objectId, handler) + { + var handlers = this._objectEventHandlers[eventType]; + if(handlers != null) + { + var _handlers = handlers[objectId]; + for(var i = 0; _handlers != null && i < _handlers.length; i++) + if(_handlers[i] === handler) + return true + } + return false + }, + addEventHandler: function OSF_EventDispatch$addEventHandler(eventType, handler) + { + if(typeof handler != "function") + return false; + var handlers = this._eventHandlers[eventType]; + if(handlers && !this.hasEventHandler(eventType,handler)) + { + handlers.push(handler); + return true + } + else + return false + }, + addObjectEventHandler: function OSF_EventDispatch$addObjectEventHandler(eventType, objectId, handler) + { + if(typeof handler != "function") + return false; + var handlers = this._objectEventHandlers[eventType]; + if(handlers && !this.hasObjectEventHandler(eventType,objectId,handler)) + { + if(handlers[objectId] == null) + handlers[objectId] = []; + handlers[objectId].push(handler); + return true + } + return false + }, + addEventHandlerAndFireQueuedEvent: function OSF_EventDispatch$addEventHandlerAndFireQueuedEvent(eventType, handler) + { + var handlers = this._eventHandlers[eventType]; + var isFirstHandler = handlers.length == 0; + var succeed = this.addEventHandler(eventType,handler); + if(isFirstHandler && succeed) + this.fireQueuedEvent(eventType); + return succeed + }, + removeEventHandler: function OSF_EventDispatch$removeEventHandler(eventType, handler) + { + var handlers = this._eventHandlers[eventType]; + if(handlers && handlers.length > 0) + for(var index = 0; index < handlers.length; index++) + if(handlers[index] === handler) + { + handlers.splice(index,1); + return true + } + return false + }, + removeObjectEventHandler: function OSF_EventDispatch$removeObjectEventHandler(eventType, objectId, handler) + { + var handlers = this._objectEventHandlers[eventType]; + if(handlers != null) + { + var _handlers = handlers[objectId]; + for(var i = 0; _handlers != null && i < _handlers.length; i++) + if(_handlers[i] === handler) + { + _handlers.splice(i,1); + return true + } + } + return false + }, + clearEventHandlers: function OSF_EventDispatch$clearEventHandlers(eventType) + { + if(typeof this._eventHandlers[eventType] != "undefined" && this._eventHandlers[eventType].length > 0) + { + this._eventHandlers[eventType] = []; + return true + } + return false + }, + clearObjectEventHandlers: function OSF_EventDispatch$clearObjectEventHandlers(eventType, objectId) + { + if(this._objectEventHandlers[eventType] != null && this._objectEventHandlers[eventType][objectId] != null) + { + this._objectEventHandlers[eventType][objectId] = []; + return true + } + return false + }, + getEventHandlerCount: function OSF_EventDispatch$getEventHandlerCount(eventType) + { + return this._eventHandlers[eventType] != undefined ? this._eventHandlers[eventType].length : -1 + }, + getObjectEventHandlerCount: function OSF_EventDispatch$getObjectEventHandlerCount(eventType, objectId) + { + if(this._objectEventHandlers[eventType] == null || this._objectEventHandlers[eventType][objectId] == null) + return 0; + return this._objectEventHandlers[eventType][objectId].length + }, + fireEvent: function OSF_EventDispatch$fireEvent(eventArgs) + { + if(eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if(eventType && this._eventHandlers[eventType]) + { + var eventHandlers = this._eventHandlers[eventType]; + for(var handler in eventHandlers) + eventHandlers[handler](eventArgs); + return true + } + else + return false + }, + fireObjectEvent: function OSF_EventDispatch$fireObjectEvent(objectId, eventArgs) + { + if(eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if(eventType && this._objectEventHandlers[eventType]) + { + var eventHandlers = this._objectEventHandlers[eventType]; + var _handlers = eventHandlers[objectId]; + if(_handlers != null) + { + for(var i = 0; i < _handlers.length; i++) + _handlers[i](eventArgs); + return true + } + } + return false + }, + fireOrQueueEvent: function OSF_EventDispatch$fireOrQueueEvent(eventArgs) + { + var eventType = eventArgs.type; + if(eventType && this._eventHandlers[eventType]) + { + var eventHandlers = this._eventHandlers[eventType]; + var queuedEvents = this._queuedEventsArgs[eventType]; + if(eventHandlers.length == 0) + queuedEvents.push(eventArgs); + else + this.fireEvent(eventArgs); + return true + } + else + return false + }, + fireQueuedEvent: function OSF_EventDispatch$queueEvent(eventType) + { + if(eventType && this._eventHandlers[eventType]) + { + var eventHandlers = this._eventHandlers[eventType]; + var queuedEvents = this._queuedEventsArgs[eventType]; + if(eventHandlers.length > 0) + { + var eventHandler = eventHandlers[0]; + while(queuedEvents.length > 0) + { + var eventArgs = queuedEvents.shift(); + eventHandler(eventArgs) + } + return true + } + } + return false + }, + clearQueuedEvent: function OSF_EventDispatch$clearQueuedEvent(eventType) + { + if(eventType && this._eventHandlers[eventType]) + { + var queuedEvents = this._queuedEventsArgs[eventType]; + if(queuedEvents) + this._queuedEventsArgs[eventType] = [] + } + } +}; +OSF.DDA.OMFactory = OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureEventArgs = function OSF_DDA_OMFactory$manufactureEventArgs(eventType, target, eventProperties) { - var args; - switch(eventType) - { - case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged: - args=new OSF.DDA.DocumentSelectionChangedEventArgs(target); - break; - case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged: - args=new OSF.DDA.BindingSelectionChangedEventArgs(this.manufactureBinding(eventProperties,target.document),eventProperties[OSF.DDA.PropertyDescriptors.Subset]); - break; - case Microsoft.Office.WebExtension.EventType.BindingDataChanged: - args=new OSF.DDA.BindingDataChangedEventArgs(this.manufactureBinding(eventProperties,target.document)); - break; - case Microsoft.Office.WebExtension.EventType.SettingsChanged: - args=new OSF.DDA.SettingsChangedEventArgs(target); - break; - case Microsoft.Office.WebExtension.EventType.ActiveViewChanged: - args=new OSF.DDA.ActiveViewChangedEventArgs(eventProperties); - break; - case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged: - args=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(eventProperties); - break; - case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged: - args=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(eventProperties); - break; - case Microsoft.Office.WebExtension.EventType.AppCommandInvoked: - args=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(eventProperties); - break; - case Microsoft.Office.WebExtension.EventType.DataNodeInserted: - args=new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]),eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); - break; - case Microsoft.Office.WebExtension.EventType.DataNodeReplaced: - args=new OSF.DDA.NodeReplacedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]),eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); - break; - case Microsoft.Office.WebExtension.EventType.DataNodeDeleted: - args=new OSF.DDA.NodeDeletedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); - break; - case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged: - args=new OSF.DDA.TaskSelectionChangedEventArgs(target); - break; - case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged: - args=new OSF.DDA.ResourceSelectionChangedEventArgs(target); - break; - case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged: - args=new OSF.DDA.ViewSelectionChangedEventArgs(target); - break; - case Microsoft.Office.WebExtension.EventType.DialogMessageReceived: - args=new OSF.DDA.DialogEventArgs(eventProperties); - break; - case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived: - args=new OSF.DDA.DialogParentEventArgs(eventProperties); - break; - case Microsoft.Office.WebExtension.EventType.ItemChanged: - if(OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlookwebapp") - { - args=new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); - target.initialize(args["initialData"]); - target.setCurrentItemNumber(args["itemNumber"].itemNumber) - } - else - throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,eventType)); - break; - default: - throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,eventType)); - } - return args + var args; + switch(eventType) + { + case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged: + args = new OSF.DDA.DocumentSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged: + args = new OSF.DDA.BindingSelectionChangedEventArgs(this.manufactureBinding(eventProperties,target.document),eventProperties[OSF.DDA.PropertyDescriptors.Subset]); + break; + case Microsoft.Office.WebExtension.EventType.BindingDataChanged: + args = new OSF.DDA.BindingDataChangedEventArgs(this.manufactureBinding(eventProperties,target.document)); + break; + case Microsoft.Office.WebExtension.EventType.SettingsChanged: + args = new OSF.DDA.SettingsChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ActiveViewChanged: + args = new OSF.DDA.ActiveViewChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged: + args = new OSF.DDA.Theming.OfficeThemeChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged: + args = new OSF.DDA.Theming.DocumentThemeChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.AppCommandInvoked: + args = OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.ObjectDeleted: + case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged: + case Microsoft.Office.WebExtension.EventType.ObjectDataChanged: + case Microsoft.Office.WebExtension.EventType.ContentControlAdded: + args = new OSF.DDA.ObjectEventArgs(eventType,eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); + break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args = new OSF.DDA.RichApiMessageEventArgs(eventType,eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeInserted: + args = new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]),eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeReplaced: + args = new OSF.DDA.NodeReplacedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]),eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeDeleted: + args = new OSF.DDA.NodeDeletedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged: + args = new OSF.DDA.TaskSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged: + args = new OSF.DDA.ResourceSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged: + args = new OSF.DDA.ViewSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.DialogMessageReceived: + args = new OSF.DDA.DialogEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived: + args = new OSF.DDA.DialogParentEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.ItemChanged: + if(OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") + { + args = new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); + target.initialize(args["initialData"]); + if(OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "win32") + target.setCurrentItemNumber(args["itemNumber"].itemNumber) + } + else + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,eventType)); + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if(OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") + args = new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + else + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,eventType)); + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if(OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") + args = new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); + else + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,eventType)); + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,eventType)); + } + return args }; OSF.DDA.AsyncMethodNames.addNames({ - AddHandlerAsync: "addHandlerAsync", - RemoveHandlerAsync: "removeHandlerAsync" + AddHandlerAsync: "addHandlerAsync", + RemoveHandlerAsync: "removeHandlerAsync" }); OSF.DDA.AsyncMethodCalls.define({ - method: OSF.DDA.AsyncMethodNames.AddHandlerAsync, - requiredArguments: [{ - name: Microsoft.Office.WebExtension.Parameters.EventType, - "enum": Microsoft.Office.WebExtension.EventType, - verify: function(eventType, caller, eventDispatch) - { - return eventDispatch.supportsEvent(eventType) - } - },{ - name: Microsoft.Office.WebExtension.Parameters.Handler, - types: ["function"] - }], - supportedOptions: [], - privateStateCallbacks: [] + method: OSF.DDA.AsyncMethodNames.AddHandlerAsync, + requiredArguments: [{ + name: Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + verify: function(eventType, caller, eventDispatch) + { + return eventDispatch.supportsEvent(eventType) + } + },{ + name: Microsoft.Office.WebExtension.Parameters.Handler, + types: ["function"] + }], + supportedOptions: [], + privateStateCallbacks: [] }); OSF.DDA.AsyncMethodCalls.define({ - method: OSF.DDA.AsyncMethodNames.RemoveHandlerAsync, - requiredArguments: [{ - name: Microsoft.Office.WebExtension.Parameters.EventType, - "enum": Microsoft.Office.WebExtension.EventType, - verify: function(eventType, caller, eventDispatch) - { - return eventDispatch.supportsEvent(eventType) - } - }], - supportedOptions: [{ - name: Microsoft.Office.WebExtension.Parameters.Handler, - value: { - types: ["function","object"], - defaultValue: null - } - }], - privateStateCallbacks: [] + method: OSF.DDA.AsyncMethodNames.RemoveHandlerAsync, + requiredArguments: [{ + name: Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + verify: function(eventType, caller, eventDispatch) + { + return eventDispatch.supportsEvent(eventType) + } + }], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Handler, + value: { + types: ["function","object"], + defaultValue: null + } + }], + privateStateCallbacks: [] }); var OfficeExt; (function(OfficeExt) { - var AppCommand; - (function(AppCommand) - { - var AppCommandManager=function() - { - function AppCommandManager() - { - var _this=this; - this._pseudoDocument=null; - this._eventDispatch=null; - this._processAppCommandInvocation=function(args) - { - var verifyResult=_this._verifyManifestCallback(args.callbackName); - if(verifyResult.errorCode !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - { - _this._invokeAppCommandCompletedMethod(args.appCommandId,verifyResult.errorCode,""); - return - } - var eventObj=_this._constructEventObjectForCallback(args); - if(eventObj) - window.setTimeout(function() - { - verifyResult.callback(eventObj) - },0); - else - _this._invokeAppCommandCompletedMethod(args.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"") - } - } - AppCommandManager.initializeOsfDda=function() - { - OSF.DDA.AsyncMethodNames.addNames({AppCommandInvocationCompletedAsync: "appCommandInvocationCompletedAsync"}); - OSF.DDA.AsyncMethodCalls.define({ - method: OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync, - requiredArguments: [{ - name: Microsoft.Office.WebExtension.Parameters.Id, - types: ["string"] - },{ - name: Microsoft.Office.WebExtension.Parameters.Status, - types: ["number"] - },{ - name: Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData, - types: ["string"] - }] - }); - OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{AppCommandInvokedEvent: "AppCommandInvokedEvent"}); - OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppCommandInvoked: "appCommandInvoked"}); - OSF.OUtil.setNamespace("AppCommand",OSF.DDA); - OSF.DDA.AppCommand.AppCommandInvokedEventArgs=OfficeExt.AppCommand.AppCommandInvokedEventArgs - }; - AppCommandManager.prototype.initializeAndChangeOnce=function(callback) - { - AppCommand.registerDdaFacade(); - this._pseudoDocument={}; - OSF.DDA.DispIdHost.addAsyncMethods(this._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync,]); - this._eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked,]); - var onRegisterCompleted=function(result) - { - if(callback) - if(result.status=="succeeded") - callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); - else - callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError) - }; - OSF.DDA.DispIdHost.addEventSupport(this._pseudoDocument,this._eventDispatch); - this._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,this._processAppCommandInvocation,onRegisterCompleted) - }; - AppCommandManager.prototype._verifyManifestCallback=function(callbackName) - { - var defaultResult={ - callback: null, - errorCode: OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback - }; - callbackName=callbackName.trim(); - try - { - var callList=callbackName.split("."); - var parentObject=window; - for(var i=0; i < callList.length - 1; i++) - if(parentObject[callList[i]] && (typeof parentObject[callList[i]]=="object" || typeof parentObject[callList[i]]=="function")) - parentObject=parentObject[callList[i]]; - else - return defaultResult; - var callbackFunc=parentObject[callList[callList.length - 1]]; - if(typeof callbackFunc !="function") - return defaultResult - } - catch(e) - { - return defaultResult - } - return{ - callback: callbackFunc, - errorCode: OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess - } - }; - AppCommandManager.prototype._invokeAppCommandCompletedMethod=function(appCommandId, resultCode, data) - { - this._pseudoDocument.appCommandInvocationCompletedAsync(appCommandId,resultCode,data) - }; - AppCommandManager.prototype._constructEventObjectForCallback=function(args) - { - var _this=this; - var eventObj=new AppCommandCallbackEventArgs; - try - { - var jsonData=JSON.parse(args.eventObjStr); - this._translateEventObjectInternal(jsonData,eventObj); - Object.defineProperty(eventObj,"completed",{ - value: function(completedContext) - { - eventObj.completedContext=completedContext; - var jsonString=JSON.stringify(eventObj); - _this._invokeAppCommandCompletedMethod(args.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,jsonString) - }, - enumerable: true - }) - } - catch(e) - { - eventObj=null - } - return eventObj - }; - AppCommandManager.prototype._translateEventObjectInternal=function(input, output) - { - for(var key in input) - { - if(!input.hasOwnProperty(key)) - continue; - var inputChild=input[key]; - if(typeof inputChild=="object" && inputChild !=null) - { - OSF.OUtil.defineEnumerableProperty(output,key,{value: {}}); - this._translateEventObjectInternal(inputChild,output[key]) - } - else - Object.defineProperty(output,key,{ - value: inputChild, - enumerable: true, - writable: true - }) - } - }; - AppCommandManager.prototype._constructObjectByTemplate=function(template, input) - { - var output={}; - if(!template || !input) - return output; - for(var key in template) - if(template.hasOwnProperty(key)) - { - output[key]=null; - if(input[key] !=null) - { - var templateChild=template[key]; - var inputChild=input[key]; - var inputChildType=typeof inputChild; - if(typeof templateChild=="object" && templateChild !=null) - output[key]=this._constructObjectByTemplate(templateChild,inputChild); - else if(inputChildType=="number" || inputChildType=="string" || inputChildType=="boolean") - output[key]=inputChild - } - } - return output - }; - AppCommandManager.instance=function() - { - if(AppCommandManager._instance==null) - AppCommandManager._instance=new AppCommandManager; - return AppCommandManager._instance - }; - AppCommandManager._instance=null; - return AppCommandManager - }(); - AppCommand.AppCommandManager=AppCommandManager; - var AppCommandInvokedEventArgs=function() - { - function AppCommandInvokedEventArgs(appCommandId, callbackName, eventObjStr) - { - this.type=Microsoft.Office.WebExtension.EventType.AppCommandInvoked; - this.appCommandId=appCommandId; - this.callbackName=callbackName; - this.eventObjStr=eventObjStr - } - AppCommandInvokedEventArgs.create=function(eventProperties) - { - return new AppCommandInvokedEventArgs(eventProperties[AppCommand.AppCommandInvokedEventEnums.AppCommandId],eventProperties[AppCommand.AppCommandInvokedEventEnums.CallbackName],eventProperties[AppCommand.AppCommandInvokedEventEnums.EventObjStr]) - }; - return AppCommandInvokedEventArgs - }(); - AppCommand.AppCommandInvokedEventArgs=AppCommandInvokedEventArgs; - var AppCommandCallbackEventArgs=function() - { - function AppCommandCallbackEventArgs(){} - return AppCommandCallbackEventArgs - }(); - AppCommand.AppCommandCallbackEventArgs=AppCommandCallbackEventArgs; - AppCommand.AppCommandInvokedEventEnums={ - AppCommandId: "appCommandId", - CallbackName: "callbackName", - EventObjStr: "eventObjStr" - } - })(AppCommand=OfficeExt.AppCommand || (OfficeExt.AppCommand={})) -})(OfficeExt || (OfficeExt={})); + var AppCommand; + (function(AppCommand) + { + var AppCommandManager = function() + { + function AppCommandManager() + { + var _this = this; + this._pseudoDocument = null; + this._eventDispatch = null; + this._processAppCommandInvocation = function(args) + { + var verifyResult = _this._verifyManifestCallback(args.callbackName); + if(verifyResult.errorCode != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + { + _this._invokeAppCommandCompletedMethod(args.appCommandId,verifyResult.errorCode,""); + return + } + var eventObj = _this._constructEventObjectForCallback(args); + if(eventObj) + window.setTimeout(function() + { + verifyResult.callback(eventObj) + },0); + else + _this._invokeAppCommandCompletedMethod(args.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"") + } + } + AppCommandManager.initializeOsfDda = function() + { + OSF.DDA.AsyncMethodNames.addNames({AppCommandInvocationCompletedAsync: "appCommandInvocationCompletedAsync"}); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync, + requiredArguments: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + types: ["string"] + },{ + name: Microsoft.Office.WebExtension.Parameters.Status, + types: ["number"] + },{ + name: Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData, + types: ["string"] + }] + }); + OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{AppCommandInvokedEvent: "AppCommandInvokedEvent"}); + OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppCommandInvoked: "appCommandInvoked"}); + OSF.OUtil.setNamespace("AppCommand",OSF.DDA); + OSF.DDA.AppCommand.AppCommandInvokedEventArgs = OfficeExt.AppCommand.AppCommandInvokedEventArgs + }; + AppCommandManager.prototype.initializeAndChangeOnce = function(callback) + { + AppCommand.registerDdaFacade(); + this._pseudoDocument = {}; + OSF.DDA.DispIdHost.addAsyncMethods(this._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync,]); + this._eventDispatch = new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked,]); + var onRegisterCompleted = function(result) + { + if(callback) + if(result.status == "succeeded") + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + else + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError) + }; + OSF.DDA.DispIdHost.addEventSupport(this._pseudoDocument,this._eventDispatch); + this._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,this._processAppCommandInvocation,onRegisterCompleted) + }; + AppCommandManager.prototype._verifyManifestCallback = function(callbackName) + { + var defaultResult = { + callback: null, + errorCode: OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback + }; + callbackName = callbackName.trim(); + try + { + var callList = callbackName.split("."); + var parentObject = window; + for(var i = 0; i < callList.length - 1; i++) + if(parentObject[callList[i]] && (typeof parentObject[callList[i]] == "object" || typeof parentObject[callList[i]] == "function")) + parentObject = parentObject[callList[i]]; + else + return defaultResult; + var callbackFunc = parentObject[callList[callList.length - 1]]; + if(typeof callbackFunc != "function") + return defaultResult + } + catch(e) + { + return defaultResult + } + return{ + callback: callbackFunc, + errorCode: OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess + } + }; + AppCommandManager.prototype._invokeAppCommandCompletedMethod = function(appCommandId, resultCode, data) + { + this._pseudoDocument.appCommandInvocationCompletedAsync(appCommandId,resultCode,data) + }; + AppCommandManager.prototype._constructEventObjectForCallback = function(args) + { + var _this = this; + var eventObj = new AppCommandCallbackEventArgs; + try + { + var jsonData = JSON.parse(args.eventObjStr); + this._translateEventObjectInternal(jsonData,eventObj); + Object.defineProperty(eventObj,"completed",{ + value: function(completedContext) + { + eventObj.completedContext = completedContext; + var jsonString = JSON.stringify(eventObj); + _this._invokeAppCommandCompletedMethod(args.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,jsonString) + }, + enumerable: true + }) + } + catch(e) + { + eventObj = null + } + return eventObj + }; + AppCommandManager.prototype._translateEventObjectInternal = function(input, output) + { + for(var key in input) + { + if(!input.hasOwnProperty(key)) + continue; + var inputChild = input[key]; + if(typeof inputChild == "object" && inputChild != null) + { + OSF.OUtil.defineEnumerableProperty(output,key,{value: {}}); + this._translateEventObjectInternal(inputChild,output[key]) + } + else + Object.defineProperty(output,key,{ + value: inputChild, + enumerable: true, + writable: true + }) + } + }; + AppCommandManager.prototype._constructObjectByTemplate = function(template, input) + { + var output = {}; + if(!template || !input) + return output; + for(var key in template) + if(template.hasOwnProperty(key)) + { + output[key] = null; + if(input[key] != null) + { + var templateChild = template[key]; + var inputChild = input[key]; + var inputChildType = typeof inputChild; + if(typeof templateChild == "object" && templateChild != null) + output[key] = this._constructObjectByTemplate(templateChild,inputChild); + else if(inputChildType == "number" || inputChildType == "string" || inputChildType == "boolean") + output[key] = inputChild + } + } + return output + }; + AppCommandManager.instance = function() + { + if(AppCommandManager._instance == null) + AppCommandManager._instance = new AppCommandManager; + return AppCommandManager._instance + }; + AppCommandManager._instance = null; + return AppCommandManager + }(); + AppCommand.AppCommandManager = AppCommandManager; + var AppCommandInvokedEventArgs = function() + { + function AppCommandInvokedEventArgs(appCommandId, callbackName, eventObjStr) + { + this.type = Microsoft.Office.WebExtension.EventType.AppCommandInvoked; + this.appCommandId = appCommandId; + this.callbackName = callbackName; + this.eventObjStr = eventObjStr + } + AppCommandInvokedEventArgs.create = function(eventProperties) + { + return new AppCommandInvokedEventArgs(eventProperties[AppCommand.AppCommandInvokedEventEnums.AppCommandId],eventProperties[AppCommand.AppCommandInvokedEventEnums.CallbackName],eventProperties[AppCommand.AppCommandInvokedEventEnums.EventObjStr]) + }; + return AppCommandInvokedEventArgs + }(); + AppCommand.AppCommandInvokedEventArgs = AppCommandInvokedEventArgs; + var AppCommandCallbackEventArgs = function() + { + function AppCommandCallbackEventArgs(){} + return AppCommandCallbackEventArgs + }(); + AppCommand.AppCommandCallbackEventArgs = AppCommandCallbackEventArgs; + AppCommand.AppCommandInvokedEventEnums = { + AppCommandId: "appCommandId", + CallbackName: "callbackName", + EventObjStr: "eventObjStr" + } + })(AppCommand = OfficeExt.AppCommand || (OfficeExt.AppCommand = {})) +})(OfficeExt || (OfficeExt = {})); OfficeExt.AppCommand.AppCommandManager.initializeOsfDda(); OSF.OUtil.setNamespace("Marshaling",OSF.DDA); OSF.OUtil.setNamespace("AppCommand",OSF.DDA.Marshaling); var OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys; (function(OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys) { - OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys[OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys["AppCommandId"]=0]="AppCommandId"; - OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys[OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys["CallbackName"]=1]="CallbackName"; - OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys[OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys["EventObjStr"]=2]="EventObjStr" -})(OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys || (OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys={})); -OSF.DDA.Marshaling.AppCommand.AppCommandInvokedEventKeys=OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys; + OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys[OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys["AppCommandId"] = 0] = "AppCommandId"; + OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys[OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys["CallbackName"] = 1] = "CallbackName"; + OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys[OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys["EventObjStr"] = 2] = "EventObjStr" +})(OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys || (OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys = {})); +OSF.DDA.Marshaling.AppCommand.AppCommandInvokedEventKeys = OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys; var OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys; (function(OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys) { - OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys[OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys["Id"]=0]="Id"; - OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys[OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys["Status"]=1]="Status"; - OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys[OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys["Data"]=2]="Data" -})(OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys || (OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys={})); -OSF.DDA.Marshaling.AppCommand.AppCommandCompletedMethodParameterKeys=OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys; + OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys[OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys["Id"] = 0] = "Id"; + OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys[OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys["Status"] = 1] = "Status"; + OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys[OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys["Data"] = 2] = "Data" +})(OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys || (OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys = {})); +OSF.DDA.Marshaling.AppCommand.AppCommandCompletedMethodParameterKeys = OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys; var OfficeExt; (function(OfficeExt) { - var AppCommand; - (function(AppCommand) - { - function registerDdaFacade() - { - if(OSF.DDA.WAC) - { - var parameterMap=OSF.DDA.WAC.Delegate.ParameterMap; - parameterMap.define({ - type: OSF.DDA.MethodDispId.dispidAppCommandInvocationCompletedMethod, - toHost: [{ - name: Microsoft.Office.WebExtension.Parameters.Id, - value: OSF.DDA.Marshaling.AppCommand.AppCommandCompletedMethodParameterKeys.Id - },{ - name: Microsoft.Office.WebExtension.Parameters.Status, - value: OSF.DDA.Marshaling.AppCommand.AppCommandCompletedMethodParameterKeys.Status - },{ - name: Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData, - value: OSF.DDA.Marshaling.AppCommand.AppCommandCompletedMethodParameterKeys.Data - }] - }); - parameterMap.define({ - type: OSF.DDA.EventDispId.dispidAppCommandInvokedEvent, - fromHost: [{ - name: OSF.DDA.EventDescriptors.AppCommandInvokedEvent, - value: parameterMap.self - }] - }); - parameterMap.addComplexType(OSF.DDA.EventDescriptors.AppCommandInvokedEvent); - parameterMap.define({ - type: OSF.DDA.EventDescriptors.AppCommandInvokedEvent, - fromHost: [{ - name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.AppCommandId, - value: OSF.DDA.Marshaling.AppCommand.AppCommandInvokedEventKeys.AppCommandId - },{ - name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.CallbackName, - value: OSF.DDA.Marshaling.AppCommand.AppCommandInvokedEventKeys.CallbackName - },{ - name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.EventObjStr, - value: OSF.DDA.Marshaling.AppCommand.AppCommandInvokedEventKeys.EventObjStr - },] - }) - } - } - AppCommand.registerDdaFacade=registerDdaFacade - })(AppCommand=OfficeExt.AppCommand || (OfficeExt.AppCommand={})) -})(OfficeExt || (OfficeExt={})); -OSF.DialogShownStatus={ - hasDialogShown: false, - isWindowDialog: false + var AppCommand; + (function(AppCommand) + { + function registerDdaFacade() + { + if(OSF.DDA.WAC) + { + var parameterMap = OSF.DDA.WAC.Delegate.ParameterMap; + parameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAppCommandInvocationCompletedMethod, + toHost: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + value: OSF.DDA.Marshaling.AppCommand.AppCommandCompletedMethodParameterKeys.Id + },{ + name: Microsoft.Office.WebExtension.Parameters.Status, + value: OSF.DDA.Marshaling.AppCommand.AppCommandCompletedMethodParameterKeys.Status + },{ + name: Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData, + value: OSF.DDA.Marshaling.AppCommand.AppCommandCompletedMethodParameterKeys.Data + }] + }); + parameterMap.define({ + type: OSF.DDA.EventDispId.dispidAppCommandInvokedEvent, + fromHost: [{ + name: OSF.DDA.EventDescriptors.AppCommandInvokedEvent, + value: parameterMap.self + }] + }); + parameterMap.addComplexType(OSF.DDA.EventDescriptors.AppCommandInvokedEvent); + parameterMap.define({ + type: OSF.DDA.EventDescriptors.AppCommandInvokedEvent, + fromHost: [{ + name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.AppCommandId, + value: OSF.DDA.Marshaling.AppCommand.AppCommandInvokedEventKeys.AppCommandId + },{ + name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.CallbackName, + value: OSF.DDA.Marshaling.AppCommand.AppCommandInvokedEventKeys.CallbackName + },{ + name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.EventObjStr, + value: OSF.DDA.Marshaling.AppCommand.AppCommandInvokedEventKeys.EventObjStr + },] + }) + } + } + AppCommand.registerDdaFacade = registerDdaFacade + })(AppCommand = OfficeExt.AppCommand || (OfficeExt.AppCommand = {})) +})(OfficeExt || (OfficeExt = {})); +OSF.DialogShownStatus = { + hasDialogShown: false, + isWindowDialog: false }; OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent: "DialogMessageReceivedEvent"}); OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ - DialogMessageReceived: "dialogMessageReceived", - DialogEventReceived: "dialogEventReceived" + DialogMessageReceived: "dialogMessageReceived", + DialogEventReceived: "dialogEventReceived" }); OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{ - MessageType: "messageType", - MessageContent: "messageContent" + MessageType: "messageType", + MessageContent: "messageContent" }); -OSF.DDA.DialogEventType={}; +OSF.DDA.DialogEventType = {}; OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{ - DialogClosed: "dialogClosed", - NavigationFailed: "naviationFailed" + DialogClosed: "dialogClosed", + NavigationFailed: "naviationFailed" }); OSF.DDA.AsyncMethodNames.addNames({ - DisplayDialogAsync: "displayDialogAsync", - CloseAsync: "close" + DisplayDialogAsync: "displayDialogAsync", + CloseAsync: "close" }); OSF.DDA.SyncMethodNames.addNames({ - MessageParent: "messageParent", - AddMessageHandler: "addEventHandler", - SendMessage: "sendMessage" + MessageParent: "messageParent", + AddMessageHandler: "addEventHandler", + SendMessage: "sendMessage" }); -OSF.DDA.UI.ParentUI=function OSF_DDA_ParentUI() +OSF.DDA.UI.ParentUI = function OSF_DDA_ParentUI() { - var eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]); - var openDialogName=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName; - var target=this; - if(!target[openDialogName]) - OSF.OUtil.defineEnumerableProperty(target,openDialogName,{value: function() - { - var openDialog=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog]; - openDialog(arguments,eventDispatch,target) - }}); - OSF.OUtil.finalizeProperties(this) -}; -OSF.DDA.UI.ChildUI=function OSF_DDA_ChildUI(isPopupWindow) + var eventDispatch = new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]); + var openDialogName = OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName; + var target = this; + if(!target[openDialogName]) + OSF.OUtil.defineEnumerableProperty(target,openDialogName,{value: function() + { + var openDialog = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog]; + openDialog(arguments,eventDispatch,target) + }}); + OSF.OUtil.finalizeProperties(this) +}; +OSF.DDA.UI.ChildUI = function OSF_DDA_ChildUI(isPopupWindow) { - var messageParentName=OSF.DDA.SyncMethodNames.MessageParent.displayName; - var target=this; - if(!target[messageParentName]) - OSF.OUtil.defineEnumerableProperty(target,messageParentName,{value: function() - { - var messageParent=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent]; - return messageParent(arguments,target) - }}); - var addEventHandler=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; - if(!target[addEventHandler] && typeof OSF.DialogParentMessageEventDispatch !="undefined") - OSF.DDA.DispIdHost.addEventSupport(target,OSF.DialogParentMessageEventDispatch,isPopupWindow); - OSF.OUtil.finalizeProperties(this) -}; -OSF.DialogHandler=function OSF_DialogHandler(){}; -OSF.DDA.DialogEventArgs=function OSF_DDA_DialogEventArgs(message) + var messageParentName = OSF.DDA.SyncMethodNames.MessageParent.displayName; + var target = this; + if(!target[messageParentName]) + OSF.OUtil.defineEnumerableProperty(target,messageParentName,{value: function() + { + var messageParent = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent]; + return messageParent(arguments,target) + }}); + var addEventHandler = OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; + if(!target[addEventHandler] && typeof OSF.DialogParentMessageEventDispatch != "undefined") + OSF.DDA.DispIdHost.addEventSupport(target,OSF.DialogParentMessageEventDispatch,isPopupWindow); + OSF.OUtil.finalizeProperties(this) +}; +OSF.DialogHandler = function OSF_DialogHandler(){}; +OSF.DDA.DialogEventArgs = function OSF_DDA_DialogEventArgs(message) { - if(message[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived) - OSF.OUtil.defineEnumerableProperties(this,{ - type: {value: Microsoft.Office.WebExtension.EventType.DialogMessageReceived}, - message: {value: message[OSF.DDA.PropertyDescriptors.MessageContent]} - }); - else - OSF.OUtil.defineEnumerableProperties(this,{ - type: {value: Microsoft.Office.WebExtension.EventType.DialogEventReceived}, - error: {value: message[OSF.DDA.PropertyDescriptors.MessageType]} - }) -}; -OSF.DDA.DialogParentEventArgs=function OSF_DDA_DialogParentEventArgs(message) + if(message[OSF.DDA.PropertyDescriptors.MessageType] == OSF.DialogMessageType.DialogMessageReceived) + OSF.OUtil.defineEnumerableProperties(this,{ + type: {value: Microsoft.Office.WebExtension.EventType.DialogMessageReceived}, + message: {value: message[OSF.DDA.PropertyDescriptors.MessageContent]} + }); + else + OSF.OUtil.defineEnumerableProperties(this,{ + type: {value: Microsoft.Office.WebExtension.EventType.DialogEventReceived}, + error: {value: message[OSF.DDA.PropertyDescriptors.MessageType]} + }) +}; +OSF.DDA.DialogParentEventArgs = function OSF_DDA_DialogParentEventArgs(message) { - OSF.OUtil.defineEnumerableProperties(this,{ - type: {value: Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived}, - message: {value: message[OSF.DDA.PropertyDescriptors.MessageContent]} - }) + OSF.OUtil.defineEnumerableProperties(this,{ + type: {value: Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived}, + message: {value: message[OSF.DDA.PropertyDescriptors.MessageContent]} + }) }; OSF.DDA.AsyncMethodCalls.define({ - method: OSF.DDA.AsyncMethodNames.DisplayDialogAsync, - requiredArguments: [{ - name: Microsoft.Office.WebExtension.Parameters.Url, - types: ["string"] - }], - supportedOptions: [{ - name: Microsoft.Office.WebExtension.Parameters.Width, - value: { - types: ["number"], - defaultValue: 99 - } - },{ - name: Microsoft.Office.WebExtension.Parameters.Height, - value: { - types: ["number"], - defaultValue: 99 - } - },{ - name: Microsoft.Office.WebExtension.Parameters.RequireHTTPs, - value: { - types: ["boolean"], - defaultValue: true - } - },{ - name: Microsoft.Office.WebExtension.Parameters.DisplayInIframe, - value: { - types: ["boolean"], - defaultValue: false - } - }], - privateStateCallbacks: [], - onSucceeded: function(args, caller, callArgs) - { - var targetId=args[Microsoft.Office.WebExtension.Parameters.Id]; - var eventDispatch=args[Microsoft.Office.WebExtension.Parameters.Data]; - var dialog=new OSF.DialogHandler; - var closeDialog=OSF.DDA.AsyncMethodNames.CloseAsync.displayName; - OSF.OUtil.defineEnumerableProperty(dialog,closeDialog,{value: function() - { - var closeDialogfunction=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog]; - closeDialogfunction(arguments,targetId,eventDispatch,dialog) - }}); - var addHandler=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; - OSF.OUtil.defineEnumerableProperty(dialog,addHandler,{value: function() - { - var syncMethodCall=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id]; - var callArgs=syncMethodCall.verifyAndExtractCall(arguments,dialog,eventDispatch); - var eventType=callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; - var handler=callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; - return eventDispatch.addEventHandlerAndFireQueuedEvent(eventType,handler) - }}); - var sendMessage=OSF.DDA.SyncMethodNames.SendMessage.displayName; - OSF.OUtil.defineEnumerableProperty(dialog,sendMessage,{value: function() - { - var execute=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; - return execute(arguments,eventDispatch,dialog) - }}); - return dialog - }, - checkCallArgs: function(callArgs, caller, stateInfo) - { - if(callArgs[Microsoft.Office.WebExtension.Parameters.Width] <=0) - callArgs[Microsoft.Office.WebExtension.Parameters.Width]=1; - if(callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) - callArgs[Microsoft.Office.WebExtension.Parameters.Width]=99; - if(callArgs[Microsoft.Office.WebExtension.Parameters.Height] <=0) - callArgs[Microsoft.Office.WebExtension.Parameters.Height]=1; - if(callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) - callArgs[Microsoft.Office.WebExtension.Parameters.Height]=99; - if(!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) - callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=true; - return callArgs - } + method: OSF.DDA.AsyncMethodNames.DisplayDialogAsync, + requiredArguments: [{ + name: Microsoft.Office.WebExtension.Parameters.Url, + types: ["string"] + }], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Width, + value: { + types: ["number"], + defaultValue: 99 + } + },{ + name: Microsoft.Office.WebExtension.Parameters.Height, + value: { + types: ["number"], + defaultValue: 99 + } + },{ + name: Microsoft.Office.WebExtension.Parameters.RequireHTTPs, + value: { + types: ["boolean"], + defaultValue: true + } + },{ + name: Microsoft.Office.WebExtension.Parameters.DisplayInIframe, + value: { + types: ["boolean"], + defaultValue: false + } + },{ + name: Microsoft.Office.WebExtension.Parameters.HideTitle, + value: { + types: ["boolean"], + defaultValue: false + } + },{ + name: Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels, + value: { + types: ["boolean"], + defaultValue: false + } + }], + privateStateCallbacks: [], + onSucceeded: function(args, caller, callArgs) + { + var targetId = args[Microsoft.Office.WebExtension.Parameters.Id]; + var eventDispatch = args[Microsoft.Office.WebExtension.Parameters.Data]; + var dialog = new OSF.DialogHandler; + var closeDialog = OSF.DDA.AsyncMethodNames.CloseAsync.displayName; + OSF.OUtil.defineEnumerableProperty(dialog,closeDialog,{value: function() + { + var closeDialogfunction = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog]; + closeDialogfunction(arguments,targetId,eventDispatch,dialog) + }}); + var addHandler = OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; + OSF.OUtil.defineEnumerableProperty(dialog,addHandler,{value: function() + { + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(arguments,dialog,eventDispatch); + var eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + var handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + return eventDispatch.addEventHandlerAndFireQueuedEvent(eventType,handler) + }}); + var sendMessage = OSF.DDA.SyncMethodNames.SendMessage.displayName; + OSF.OUtil.defineEnumerableProperty(dialog,sendMessage,{value: function() + { + var execute = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; + return execute(arguments,eventDispatch,dialog) + }}); + return dialog + }, + checkCallArgs: function(callArgs, caller, stateInfo) + { + if(callArgs[Microsoft.Office.WebExtension.Parameters.Width] <= 0) + callArgs[Microsoft.Office.WebExtension.Parameters.Width] = 1; + if(!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) + callArgs[Microsoft.Office.WebExtension.Parameters.Width] = 99; + if(callArgs[Microsoft.Office.WebExtension.Parameters.Height] <= 0) + callArgs[Microsoft.Office.WebExtension.Parameters.Height] = 1; + if(!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) + callArgs[Microsoft.Office.WebExtension.Parameters.Height] = 99; + if(!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) + callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs] = true; + return callArgs + } }); OSF.DDA.AsyncMethodCalls.define({ - method: OSF.DDA.AsyncMethodNames.CloseAsync, - requiredArguments: [], - supportedOptions: [], - privateStateCallbacks: [] + method: OSF.DDA.AsyncMethodNames.CloseAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [] }); OSF.DDA.SyncMethodCalls.define({ - method: OSF.DDA.SyncMethodNames.MessageParent, - requiredArguments: [{ - name: Microsoft.Office.WebExtension.Parameters.MessageToParent, - types: ["string","number","boolean"] - }], - supportedOptions: [] + method: OSF.DDA.SyncMethodNames.MessageParent, + requiredArguments: [{ + name: Microsoft.Office.WebExtension.Parameters.MessageToParent, + types: ["string","number","boolean"] + }], + supportedOptions: [] }); OSF.DDA.SyncMethodCalls.define({ - method: OSF.DDA.SyncMethodNames.AddMessageHandler, - requiredArguments: [{ - name: Microsoft.Office.WebExtension.Parameters.EventType, - "enum": Microsoft.Office.WebExtension.EventType, - verify: function(eventType, caller, eventDispatch) - { - return eventDispatch.supportsEvent(eventType) - } - },{ - name: Microsoft.Office.WebExtension.Parameters.Handler, - types: ["function"] - }], - supportedOptions: [] + method: OSF.DDA.SyncMethodNames.AddMessageHandler, + requiredArguments: [{ + name: Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + verify: function(eventType, caller, eventDispatch) + { + return eventDispatch.supportsEvent(eventType) + } + },{ + name: Microsoft.Office.WebExtension.Parameters.Handler, + types: ["function"] + }], + supportedOptions: [] }); OSF.DDA.SyncMethodCalls.define({ - method: OSF.DDA.SyncMethodNames.SendMessage, - requiredArguments: [{ - name: Microsoft.Office.WebExtension.Parameters.MessageContent, - types: ["string"] - }], - supportedOptions: [], - privateStateCallbacks: [] + method: OSF.DDA.SyncMethodNames.SendMessage, + requiredArguments: [{ + name: Microsoft.Office.WebExtension.Parameters.MessageContent, + types: ["string"] + }], + supportedOptions: [], + privateStateCallbacks: [] }); OSF.OUtil.setNamespace("Marshaling",OSF.DDA); OSF.OUtil.setNamespace("Dialog",OSF.DDA.Marshaling); -OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys={ - MessageType: "messageType", - MessageContent: "messageContent" +OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys = { + MessageType: "messageType", + MessageContent: "messageContent" }; -OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys={ - MessageType: "messageType", - MessageContent: "messageContent" +OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys = { + MessageType: "messageType", + MessageContent: "messageContent" }; -OSF.DDA.Marshaling.MessageParentKeys={MessageToParent: "messageToParent"}; -OSF.DDA.Marshaling.DialogNotificationShownEventType={DialogNotificationShown: "dialogNotificationShown"}; -OSF.DDA.Marshaling.SendMessageKeys={MessageContent: "messageContent"}; +OSF.DDA.Marshaling.MessageParentKeys = {MessageToParent: "messageToParent"}; +OSF.DDA.Marshaling.DialogNotificationShownEventType = {DialogNotificationShown: "dialogNotificationShown"}; +OSF.DDA.Marshaling.SendMessageKeys = {MessageContent: "messageContent"}; var OfficeExt; (function(OfficeExt) { - var WacCommonUICssManager; - (function(WacCommonUICssManager) - { - var hostType={ - Excel: "excel", - Word: "word", - PowerPoint: "powerpoint", - Outlook: "outlook" - }; - function getDialogCssManager(applicationHostType) - { - switch(applicationHostType) - { - case hostType.Excel: - case hostType.Word: - case hostType.PowerPoint: - case hostType.Outlook: - return new DefaultDialogCSSManager; - default: - return new DefaultDialogCSSManager - } - return null - } - WacCommonUICssManager.getDialogCssManager=getDialogCssManager; - var DefaultDialogCSSManager=function() - { - function DefaultDialogCSSManager() - { - this.overlayElementCSS=["position: absolute","top: 0","left: 0","width: 100%","height: 100%","background-color: rgba(198, 198, 198, 0.5)","z-index: 99998"]; - this.dialogNotificationPanelCSS=["width: 100%","height: 190px","position: absolute","z-index: 99999","background-color: rgba(255, 255, 255, 1)","left: 0px","top: 50%","margin-top: -95px"]; - this.newWindowNotificationTextPanelCSS=["margin: 20px 14px","font-family: Segoe UI,Arial,Verdana,sans-serif","font-size: 14px","height: 100px","line-height: 100px"]; - this.newWindowNotificationTextSpanCSS=["display: inline-block","line-height: normal","vertical-align: middle"]; - this.crossZoneNotificationTextPanelCSS=["margin: 20px 14px","font-family: Segoe UI,Arial,Verdana,sans-serif","font-size: 14px","height: 100px",]; - this.dialogNotificationButtonPanelCSS="margin:0px 9px"; - this.buttonStyleCSS=["text-align: center","width: 70px","height: 25px","font-size: 14px","font-family: Segoe UI,Arial,Verdana,sans-serif","margin: 0px 5px","border-width: 1px","border-style: solid"] - } - DefaultDialogCSSManager.prototype.getOverlayElementCSS=function() - { - return this.overlayElementCSS.join(";") - }; - DefaultDialogCSSManager.prototype.getDialogNotificationPanelCSS=function() - { - return this.dialogNotificationPanelCSS.join(";") - }; - DefaultDialogCSSManager.prototype.getNewWindowNotificationTextPanelCSS=function() - { - return this.newWindowNotificationTextPanelCSS.join(";") - }; - DefaultDialogCSSManager.prototype.getNewWindowNotificationTextSpanCSS=function() - { - return this.newWindowNotificationTextSpanCSS.join(";") - }; - DefaultDialogCSSManager.prototype.getCrossZoneNotificationTextPanelCSS=function() - { - return this.crossZoneNotificationTextPanelCSS.join(";") - }; - DefaultDialogCSSManager.prototype.getDialogNotificationButtonPanelCSS=function() - { - return this.dialogNotificationButtonPanelCSS - }; - DefaultDialogCSSManager.prototype.getDialogButtonCSS=function() - { - return this.buttonStyleCSS.join(";") - }; - return DefaultDialogCSSManager - }(); - WacCommonUICssManager.DefaultDialogCSSManager=DefaultDialogCSSManager - })(WacCommonUICssManager=OfficeExt.WacCommonUICssManager || (OfficeExt.WacCommonUICssManager={})) -})(OfficeExt || (OfficeExt={})); + var WacCommonUICssManager; + (function(WacCommonUICssManager) + { + var hostType = { + Excel: "excel", + Word: "word", + PowerPoint: "powerpoint", + Outlook: "outlook" + }; + function getDialogCssManager(applicationHostType) + { + switch(applicationHostType) + { + case hostType.Excel: + case hostType.Word: + case hostType.PowerPoint: + case hostType.Outlook: + return new DefaultDialogCSSManager; + default: + return new DefaultDialogCSSManager + } + return null + } + WacCommonUICssManager.getDialogCssManager = getDialogCssManager; + var DefaultDialogCSSManager = function() + { + function DefaultDialogCSSManager() + { + this.overlayElementCSS = ["position: absolute","top: 0","left: 0","width: 100%","height: 100%","background-color: rgba(198, 198, 198, 0.5)","z-index: 99998"]; + this.dialogNotificationPanelCSS = ["width: 100%","height: 190px","position: absolute","z-index: 99999","background-color: rgba(255, 255, 255, 1)","left: 0px","top: 50%","margin-top: -95px"]; + this.newWindowNotificationTextPanelCSS = ["margin: 20px 14px","font-family: Segoe UI,Arial,Verdana,sans-serif","font-size: 14px","height: 100px","line-height: 100px"]; + this.newWindowNotificationTextSpanCSS = ["display: inline-block","line-height: normal","vertical-align: middle"]; + this.crossZoneNotificationTextPanelCSS = ["margin: 20px 14px","font-family: Segoe UI,Arial,Verdana,sans-serif","font-size: 14px","height: 100px",]; + this.dialogNotificationButtonPanelCSS = "margin:0px 9px"; + this.buttonStyleCSS = ["text-align: center","width: 70px","height: 25px","font-size: 14px","font-family: Segoe UI,Arial,Verdana,sans-serif","margin: 0px 5px","border-width: 1px","border-style: solid"] + } + DefaultDialogCSSManager.prototype.getOverlayElementCSS = function() + { + return this.overlayElementCSS.join(";") + }; + DefaultDialogCSSManager.prototype.getDialogNotificationPanelCSS = function() + { + return this.dialogNotificationPanelCSS.join(";") + }; + DefaultDialogCSSManager.prototype.getNewWindowNotificationTextPanelCSS = function() + { + return this.newWindowNotificationTextPanelCSS.join(";") + }; + DefaultDialogCSSManager.prototype.getNewWindowNotificationTextSpanCSS = function() + { + return this.newWindowNotificationTextSpanCSS.join(";") + }; + DefaultDialogCSSManager.prototype.getCrossZoneNotificationTextPanelCSS = function() + { + return this.crossZoneNotificationTextPanelCSS.join(";") + }; + DefaultDialogCSSManager.prototype.getDialogNotificationButtonPanelCSS = function() + { + return this.dialogNotificationButtonPanelCSS + }; + DefaultDialogCSSManager.prototype.getDialogButtonCSS = function() + { + return this.buttonStyleCSS.join(";") + }; + return DefaultDialogCSSManager + }(); + WacCommonUICssManager.DefaultDialogCSSManager = DefaultDialogCSSManager + })(WacCommonUICssManager = OfficeExt.WacCommonUICssManager || (OfficeExt.WacCommonUICssManager = {})) +})(OfficeExt || (OfficeExt = {})); var OfficeExt; (function(OfficeExt) { - var AddinNativeAction; - (function(AddinNativeAction) - { - var Dialog; - (function(Dialog) - { - var windowInstance=null; - var handler=null; - var overlayElement=null; - var dialogNotificationPanel=null; - var closeDialogKey="osfDialogInternal:action=closeDialog"; - var showDialogCallback=null; - var hasCrossZoneNotification=false; - var checkWindowDialogCloseInterval=-1; - var hostThemeButtonStyle=null; - var commonButtonBorderColor="#ababab"; - var commonButtonBackgroundColor="#ffffff"; - var commonEventInButtonBackgroundColor="#ccc"; - var newWindowNotificationId="newWindowNotificaiton"; - var crossZoneNotificationId="crossZoneNotification"; - var configureBrowserLinkId="configureBrowserLink"; - var dialogNotificationTextPanelId="dialogNotificationTextPanel"; - var registerDialogNotificationShownArgs={ - dispId: OSF.DDA.EventDispId.dispidDialogNotificationShownInAddinEvent, - eventType: OSF.DDA.Marshaling.DialogNotificationShownEventType.DialogNotificationShown, - onComplete: null - }; - function setHostThemeButtonStyle(args) - { - var hostThemeButtonStyleArgs=args.input; - if(hostThemeButtonStyleArgs !=null) - hostThemeButtonStyle={ - HostButtonBorderColor: hostThemeButtonStyleArgs[OSF.HostThemeButtonStyleKeys.ButtonBorderColor], - HostButtonBackgroundColor: hostThemeButtonStyleArgs[OSF.HostThemeButtonStyleKeys.ButtonBackgroundColor] - }; - args.completed() - } - Dialog.setHostThemeButtonStyle=setHostThemeButtonStyle; - function removeEventListenersForDialog(args) - { - OSF._OfficeAppFactory.getInitializationHelper().addOrRemoveEventListenersForWindow(false); - args.completed() - } - Dialog.removeEventListenersForDialog=removeEventListenersForDialog; - function handleNewWindowDialog(dialogInfo) - { - try - { - hasCrossZoneNotification=false; - var ignoreButtonKeyDownClick=false; - var hostInfoObj=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo; - var dialogCssManager=OfficeExt.WacCommonUICssManager.getDialogCssManager(hostInfoObj.hostType); - var notificationText=OSF.OUtil.formatString(Strings.OfficeOM.L_ShowWindowDialogNotification,OSF._OfficeAppFactory.getInitializationHelper()._appContext._addinName); - overlayElement=createOverlayElement(dialogCssManager); - document.body.insertBefore(overlayElement,document.body.firstChild); - dialogNotificationPanel=createNotificationPanel(dialogCssManager,notificationText); - dialogNotificationPanel.id=newWindowNotificationId; - var dialogNotificationButtonPanel=createButtonPanel(dialogCssManager); - var allowButton=createButtonControl(dialogCssManager,Strings.OfficeOM.L_ShowWindowDialogNotificationAllow); - var ignoreButton=createButtonControl(dialogCssManager,Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore); - dialogNotificationButtonPanel.appendChild(allowButton); - dialogNotificationButtonPanel.appendChild(ignoreButton); - dialogNotificationPanel.appendChild(dialogNotificationButtonPanel); - document.body.insertBefore(dialogNotificationPanel,document.body.firstChild); - allowButton.onclick=function() - { - showDialog(dialogInfo); - if(!hasCrossZoneNotification) - dismissDialogNotification() - }; - function ignoreButtonClickEventHandler() - { - function unregisterDialogNotificationShownEventCallback(status) - { - removeDialogNotificationElement(); - setFocusOnFirstElement(status); - showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore) - } - registerDialogNotificationShownArgs.onComplete=unregisterDialogNotificationShownEventCallback; - OSF.DDA.WAC.Delegate.unregisterEventAsync(registerDialogNotificationShownArgs) - } - ignoreButton.onclick=ignoreButtonClickEventHandler; - allowButton.addEventListener("keydown",function(event) - { - if(event.shiftKey && event.keyCode==9) - { - handleButtonControlEventOut(allowButton); - handleButtonControlEventIn(ignoreButton); - ignoreButton.focus(); - event.preventDefault(); - event.stopPropagation() - } - },false); - ignoreButton.addEventListener("keydown",function(event) - { - if(!event.shiftKey && event.keyCode==9) - { - handleButtonControlEventOut(ignoreButton); - handleButtonControlEventIn(allowButton); - allowButton.focus(); - event.preventDefault(); - event.stopPropagation() - } - else if(event.keyCode==13) - { - ignoreButtonKeyDownClick=true; - event.preventDefault(); - event.stopPropagation() - } - },false); - ignoreButton.addEventListener("keyup",function(event) - { - if(event.keyCode==13 && ignoreButtonKeyDownClick) - { - ignoreButtonKeyDownClick=false; - ignoreButtonClickEventHandler(); - event.preventDefault(); - event.stopPropagation() - } - },false); - window.focus(); - function registerDialogNotificationShownEventCallback(status) - { - allowButton.focus() - } - registerDialogNotificationShownArgs.onComplete=registerDialogNotificationShownEventCallback; - OSF.DDA.WAC.Delegate.registerEventAsync(registerDialogNotificationShownArgs) - } - catch(e) - { - if(OSF.AppTelemetry) - OSF.AppTelemetry.logAppException("Exception happens at new window dialog."+e); - showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError) - } - } - Dialog.handleNewWindowDialog=handleNewWindowDialog; - function closeDialog(callback) - { - try - { - if(windowInstance !=null) - { - var appDomains=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains; - if(appDomains) - for(var i=0; i < appDomains.length && appDomains[i].indexOf("://") !==-1; i++) - windowInstance.postMessage(closeDialogKey,appDomains[i]); - if(windowInstance !=null && !windowInstance.closed) - windowInstance.close(); - window.removeEventListener("message",receiveMessage); - window.clearInterval(checkWindowDialogCloseInterval); - windowInstance=null; - callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - } - else - callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError) - } - catch(e) - { - if(OSF.AppTelemetry) - OSF.AppTelemetry.logAppException("Exception happens at close window dialog."+e); - callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError) - } - } - Dialog.closeDialog=closeDialog; - function messageParent(params) - { - var message=params.hostCallArgs[Microsoft.Office.WebExtension.Parameters.MessageToParent]; - var appDomains=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains; - if(appDomains) - for(var i=0; i < appDomains.length && appDomains[i].indexOf("://") !==-1; i++) - window.opener.postMessage(message,appDomains[i]) - } - Dialog.messageParent=messageParent; - function sendMessage(params) - { - if(windowInstance !=null) - { - var message=params.hostCallArgs, - appDomains=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains; - if(appDomains) - for(var i=0; i < appDomains.length && appDomains[i].indexOf("://") !==-1; i++) - { - if(typeof message !="string") - message=JSON.stringify(message); - windowInstance.postMessage(message,appDomains[i]) - } - } - } - Dialog.sendMessage=sendMessage; - function registerMessageReceivedEvent() - { - function receiveCloseDialogMessage(event) - { - if(event.source==window.opener) - if(typeof event.data==="string" && event.data.indexOf(closeDialogKey) > -1) - window.close(); - else - { - var messageContent=event.data, - type=typeof messageContent; - if(messageContent && (type=="object" || type=="string")) - { - if(type=="string") - messageContent=JSON.parse(messageContent); - var eventArgs=OSF.DDA.OMFactory.manufactureEventArgs(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived,null,messageContent); - OSF.DialogParentMessageEventDispatch.fireEvent(eventArgs) - } - } - } - window.addEventListener("message",receiveCloseDialogMessage) - } - Dialog.registerMessageReceivedEvent=registerMessageReceivedEvent; - function setHandlerAndShowDialogCallback(onEventHandler, callback) - { - handler=onEventHandler; - showDialogCallback=callback - } - Dialog.setHandlerAndShowDialogCallback=setHandlerAndShowDialogCallback; - function escDismissDialogNotification() - { - try - { - if(dialogNotificationPanel && dialogNotificationPanel.id==newWindowNotificationId && showDialogCallback) - showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore) - } - catch(e) - { - if(OSF.AppTelemetry) - OSF.AppTelemetry.logAppException("Error happened during executing displayDialogAsync callback."+e) - } - dismissDialogNotification() - } - Dialog.escDismissDialogNotification=escDismissDialogNotification; - function showCrossZoneNotification(windowUrl, hostType) - { - var okButtonKeyDownClick=false; - var dialogCssManager=OfficeExt.WacCommonUICssManager.getDialogCssManager(hostType); - overlayElement=createOverlayElement(dialogCssManager); - document.body.insertBefore(overlayElement,document.body.firstChild); - dialogNotificationPanel=createNotificationPanelForCrossZoneIssue(dialogCssManager,windowUrl); - dialogNotificationPanel.id=crossZoneNotificationId; - var dialogNotificationButtonPanel=createButtonPanel(dialogCssManager); - var okButton=createButtonControl(dialogCssManager,Strings.OfficeOM.L_DialogOK ? Strings.OfficeOM.L_DialogOK : "OK"); - dialogNotificationButtonPanel.appendChild(okButton); - dialogNotificationPanel.appendChild(dialogNotificationButtonPanel); - document.body.insertBefore(dialogNotificationPanel,document.body.firstChild); - hasCrossZoneNotification=true; - okButton.onclick=function() - { - dismissDialogNotification() - }; - okButton.addEventListener("keydown",function(event) - { - if(event.keyCode==9) - { - document.getElementById(configureBrowserLinkId).focus(); - event.preventDefault(); - event.stopPropagation() - } - else if(event.keyCode==13) - { - okButtonKeyDownClick=true; - event.preventDefault(); - event.stopPropagation() - } - },false); - okButton.addEventListener("keyup",function(event) - { - if(event.keyCode==13 && okButtonKeyDownClick) - { - okButtonKeyDownClick=false; - dismissDialogNotification(); - event.preventDefault(); - event.stopPropagation() - } - },false); - document.getElementById(configureBrowserLinkId).addEventListener("keydown",function(event) - { - if(event.keyCode==9) - { - okButton.focus(); - event.preventDefault(); - event.stopPropagation() - } - },false); - window.focus(); - okButton.focus() - } - Dialog.showCrossZoneNotification=showCrossZoneNotification; - function receiveMessage(event) - { - if(event.source==windowInstance) - try - { - var dialogMessageReceivedArgs={}; - dialogMessageReceivedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogMessageReceived; - dialogMessageReceivedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent]=event.data; - handler(dialogMessageReceivedArgs) - } - catch(e) - { - if(OSF.AppTelemetry) - OSF.AppTelemetry.logAppException("Error happened during receive message handler."+e) - } - } - function showDialog(dialogInfo) - { - var hostInfoObj=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo; - var hostInfoVals=[hostInfoObj.hostType,hostInfoObj.hostPlatform,hostInfoObj.hostSpecificFileVersion,hostInfoObj.hostLocale,hostInfoObj.osfControlAppCorrelationId,"isDialog"]; - var hostInfo=hostInfoVals.join("|"); - var appContext=OSF._OfficeAppFactory.getInitializationHelper()._appContext; - var windowUrl=dialogInfo[OSF.ShowWindowDialogParameterKeys.Url]; - windowUrl=OfficeExt.WACUtils.addHostInfoAsQueryParam(windowUrl,hostInfo); - var windowName=JSON.parse(window.name); - windowName[OSF.WindowNameItemKeys.HostInfo]=hostInfo; - windowName[OSF.WindowNameItemKeys.AppContext]=appContext; - var width=dialogInfo[OSF.ShowWindowDialogParameterKeys.Width] * appContext._clientWindowWidth / 100; - var height=dialogInfo[OSF.ShowWindowDialogParameterKeys.Height] * appContext._clientWindowHeight / 100; - var left=appContext._clientWindowWidth / 2 - width / 2; - var top=appContext._clientWindowHeight / 2 - height / 2; - var windowSpecs="width="+width+", height="+height+", left="+left+", top="+top+",channelmode=no,directories=no,fullscreen=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=yes,toolbar=no"; - windowInstance=window.open(windowUrl,OfficeExt.WACUtils.serializeObjectToString(windowName),windowSpecs); - if(windowInstance==null) - { - OSF.AppTelemetry.logAppCommonMessage("Encountered cross zone issue in displayDialogAsync api."); - removeDialogNotificationElement(); - showCrossZoneNotification(windowUrl,hostInfoObj.hostType); - showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone); - return - } - window.addEventListener("message",receiveMessage); - function checkWindowClose() - { - try - { - if(windowInstance==null || windowInstance.closed) - { - window.clearInterval(checkWindowDialogCloseInterval); - window.removeEventListener("message",receiveMessage); - var dialogClosedArgs={}; - dialogClosedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogClosed; - handler(dialogClosedArgs) - } - } - catch(e) - { - if(OSF.AppTelemetry) - OSF.AppTelemetry.logAppException("Error happened during check or handle window close."+e) - } - } - checkWindowDialogCloseInterval=window.setInterval(checkWindowClose,1e3); - if(showDialogCallback !=null) - showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); - else if(OSF.AppTelemetry) - OSF.AppTelemetry.logAppException("showDialogCallback can not be null.") - } - function createButtonControl(dialogCssManager, buttonValue) - { - var buttonControl=document.createElement("input"); - buttonControl.setAttribute("type","button"); - buttonControl.style.cssText=dialogCssManager.getDialogButtonCSS(); - buttonControl.style.borderColor=commonButtonBorderColor; - buttonControl.style.backgroundColor=commonButtonBackgroundColor; - buttonControl.setAttribute("value",buttonValue); - var buttonControlEventInHandler=function() - { - handleButtonControlEventIn(buttonControl) - }; - var buttonControlEventOutHandler=function() - { - handleButtonControlEventOut(buttonControl) - }; - buttonControl.addEventListener("mouseover",buttonControlEventInHandler); - buttonControl.addEventListener("focus",buttonControlEventInHandler); - buttonControl.addEventListener("mouseout",buttonControlEventOutHandler); - buttonControl.addEventListener("focusout",buttonControlEventOutHandler); - return buttonControl - } - function handleButtonControlEventIn(buttonControl) - { - if(hostThemeButtonStyle !=null) - { - buttonControl.style.borderColor=hostThemeButtonStyle.HostButtonBorderColor; - buttonControl.style.backgroundColor=hostThemeButtonStyle.HostButtonBackgroundColor - } - else if(OSF.CommonUI && OSF.CommonUI.HostButtonBorderColor && OSF.CommonUI.HostButtonBackgroundColor) - { - buttonControl.style.borderColor=OSF.CommonUI.HostButtonBorderColor; - buttonControl.style.backgroundColor=OSF.CommonUI.HostButtonBackgroundColor - } - else - buttonControl.style.backgroundColor=commonEventInButtonBackgroundColor - } - function handleButtonControlEventOut(buttonControl) - { - buttonControl.style.borderColor=commonButtonBorderColor; - buttonControl.style.backgroundColor=commonButtonBackgroundColor - } - function dismissDialogNotification() - { - function unregisterDialogNotificationShownEventCallback(status) - { - removeDialogNotificationElement(); - setFocusOnFirstElement(status) - } - registerDialogNotificationShownArgs.onComplete=unregisterDialogNotificationShownEventCallback; - OSF.DDA.WAC.Delegate.unregisterEventAsync(registerDialogNotificationShownArgs) - } - function removeDialogNotificationElement() - { - if(dialogNotificationPanel !=null) - { - document.body.removeChild(dialogNotificationPanel); - dialogNotificationPanel=null - } - if(overlayElement !=null) - { - document.body.removeChild(overlayElement); - overlayElement=null - } - } - function createOverlayElement(dialogCssManager) - { - var overlayElement=document.createElement("div"); - overlayElement.style.cssText=dialogCssManager.getOverlayElementCSS(); - return overlayElement - } - function createNotificationPanel(dialogCssManager, notificationString) - { - var dialogNotificationPanel=document.createElement("div"); - dialogNotificationPanel.style.cssText=dialogCssManager.getDialogNotificationPanelCSS(); - setAttributeForDialogNotificationPanel(dialogNotificationPanel); - var dialogNotificationTextPanel=document.createElement("div"); - dialogNotificationTextPanel.style.cssText=dialogCssManager.getNewWindowNotificationTextPanelCSS(); - dialogNotificationTextPanel.id=dialogNotificationTextPanelId; - if(document.documentElement.getAttribute("dir")=="rtl") - dialogNotificationTextPanel.style.paddingRight="30px"; - else - dialogNotificationTextPanel.style.paddingLeft="30px"; - var dialogNotificationTextSpan=document.createElement("span"); - dialogNotificationTextSpan.style.cssText=dialogCssManager.getNewWindowNotificationTextSpanCSS(); - dialogNotificationTextSpan.innerText=notificationString; - dialogNotificationTextPanel.appendChild(dialogNotificationTextSpan); - dialogNotificationPanel.appendChild(dialogNotificationTextPanel); - return dialogNotificationPanel - } - function createButtonPanel(dialogCssManager) - { - var dialogNotificationButtonPanel=document.createElement("div"); - dialogNotificationButtonPanel.style.cssText=dialogCssManager.getDialogNotificationButtonPanelCSS(); - if(document.documentElement.getAttribute("dir")=="rtl") - dialogNotificationButtonPanel.style.cssFloat="left"; - else - dialogNotificationButtonPanel.style.cssFloat="right"; - return dialogNotificationButtonPanel - } - function setFocusOnFirstElement(status) - { - if(status !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - { - var list=document.querySelectorAll(OSF._OfficeAppFactory.getInitializationHelper()._tabbableElements); - OSF.OUtil.focusToFirstTabbable(list,false) - } - } - function createNotificationPanelForCrossZoneIssue(dialogCssManager, windowUrl) - { - var dialogNotificationPanel=document.createElement("div"); - dialogNotificationPanel.style.cssText=dialogCssManager.getDialogNotificationPanelCSS(); - setAttributeForDialogNotificationPanel(dialogNotificationPanel); - var dialogNotificationTextPanel=document.createElement("div"); - dialogNotificationTextPanel.style.cssText=dialogCssManager.getCrossZoneNotificationTextPanelCSS(); - dialogNotificationTextPanel.id=dialogNotificationTextPanelId; - var configureBrowserLink=document.createElement("a"); - configureBrowserLink.id=configureBrowserLinkId; - configureBrowserLink.href="#"; - configureBrowserLink.innerText=Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink; - configureBrowserLink.setAttribute("onclick","window.open('https://support.microsoft.com/en-us/help/17479/windows-internet-explorer-11-change-security-privacy-settings', '_blank', 'fullscreen=1')"); - var dialogNotificationTextSpan=document.createElement("span"); - if(Strings.OfficeOM.L_NewWindowCrossZone) - dialogNotificationTextSpan.innerHTML=OSF.OUtil.formatString(Strings.OfficeOM.L_NewWindowCrossZone,configureBrowserLink.outerHTML,OfficeExt.WACUtils.getDomainForUrl(windowUrl)); - dialogNotificationTextPanel.appendChild(dialogNotificationTextSpan); - dialogNotificationPanel.appendChild(dialogNotificationTextPanel); - return dialogNotificationPanel - } - function setAttributeForDialogNotificationPanel(dialogNotificationDiv) - { - dialogNotificationDiv.setAttribute("role","dialog"); - dialogNotificationDiv.setAttribute("aria-describedby",dialogNotificationTextPanelId) - } - })(Dialog=AddinNativeAction.Dialog || (AddinNativeAction.Dialog={})) - })(AddinNativeAction=OfficeExt.AddinNativeAction || (OfficeExt.AddinNativeAction={})) -})(OfficeExt || (OfficeExt={})); + var AddinNativeAction; + (function(AddinNativeAction) + { + var Dialog; + (function(Dialog) + { + var windowInstance = null; + var handler = null; + var overlayElement = null; + var dialogNotificationPanel = null; + var closeDialogKey = "osfDialogInternal:action=closeDialog"; + var showDialogCallback = null; + var hasCrossZoneNotification = false; + var checkWindowDialogCloseInterval = -1; + var messageParentKey = "messageParentKey"; + var hostThemeButtonStyle = null; + var commonButtonBorderColor = "#ababab"; + var commonButtonBackgroundColor = "#ffffff"; + var commonEventInButtonBackgroundColor = "#ccc"; + var newWindowNotificationId = "newWindowNotificaiton"; + var crossZoneNotificationId = "crossZoneNotification"; + var configureBrowserLinkId = "configureBrowserLink"; + var dialogNotificationTextPanelId = "dialogNotificationTextPanel"; + var shouldUseLocalStorageToPassMessage = OfficeExt.WACUtils.shouldUseLocalStorageToPassMessage(); + var registerDialogNotificationShownArgs = { + dispId: OSF.DDA.EventDispId.dispidDialogNotificationShownInAddinEvent, + eventType: OSF.DDA.Marshaling.DialogNotificationShownEventType.DialogNotificationShown, + onComplete: null + }; + function setHostThemeButtonStyle(args) + { + var hostThemeButtonStyleArgs = args.input; + if(hostThemeButtonStyleArgs != null) + hostThemeButtonStyle = { + HostButtonBorderColor: hostThemeButtonStyleArgs[OSF.HostThemeButtonStyleKeys.ButtonBorderColor], + HostButtonBackgroundColor: hostThemeButtonStyleArgs[OSF.HostThemeButtonStyleKeys.ButtonBackgroundColor] + }; + args.completed() + } + Dialog.setHostThemeButtonStyle = setHostThemeButtonStyle; + function removeEventListenersForDialog(args) + { + OSF._OfficeAppFactory.getInitializationHelper().addOrRemoveEventListenersForWindow(false); + args.completed() + } + Dialog.removeEventListenersForDialog = removeEventListenersForDialog; + function handleNewWindowDialog(dialogInfo) + { + try + { + if(OSF._OfficeAppFactory.getInitializationHelper()._appContext._skipNewWindowNotification) + { + showDialog(dialogInfo); + return + } + hasCrossZoneNotification = false; + var ignoreButtonKeyDownClick = false; + var hostInfoObj = OSF._OfficeAppFactory.getInitializationHelper()._hostInfo; + var dialogCssManager = OfficeExt.WacCommonUICssManager.getDialogCssManager(hostInfoObj.hostType); + var notificationText = OSF.OUtil.formatString(Strings.OfficeOM.L_ShowWindowDialogNotification,OSF._OfficeAppFactory.getInitializationHelper()._appContext._addinName); + overlayElement = createOverlayElement(dialogCssManager); + document.body.insertBefore(overlayElement,document.body.firstChild); + dialogNotificationPanel = createNotificationPanel(dialogCssManager,notificationText); + dialogNotificationPanel.id = newWindowNotificationId; + var dialogNotificationButtonPanel = createButtonPanel(dialogCssManager); + var allowButton = createButtonControl(dialogCssManager,Strings.OfficeOM.L_ShowWindowDialogNotificationAllow); + var ignoreButton = createButtonControl(dialogCssManager,Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore); + dialogNotificationButtonPanel.appendChild(allowButton); + dialogNotificationButtonPanel.appendChild(ignoreButton); + dialogNotificationPanel.appendChild(dialogNotificationButtonPanel); + document.body.insertBefore(dialogNotificationPanel,document.body.firstChild); + allowButton.onclick = function() + { + showDialog(dialogInfo); + if(!hasCrossZoneNotification) + dismissDialogNotification() + }; + function ignoreButtonClickEventHandler() + { + function unregisterDialogNotificationShownEventCallback(status) + { + removeDialogNotificationElement(); + setFocusOnFirstElement(status); + showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore) + } + registerDialogNotificationShownArgs.onComplete = unregisterDialogNotificationShownEventCallback; + OSF.DDA.WAC.Delegate.unregisterEventAsync(registerDialogNotificationShownArgs) + } + ignoreButton.onclick = ignoreButtonClickEventHandler; + allowButton.addEventListener("keydown",function(event) + { + if(event.shiftKey && event.keyCode == 9) + { + handleButtonControlEventOut(allowButton); + handleButtonControlEventIn(ignoreButton); + ignoreButton.focus(); + event.preventDefault(); + event.stopPropagation() + } + },false); + ignoreButton.addEventListener("keydown",function(event) + { + if(!event.shiftKey && event.keyCode == 9) + { + handleButtonControlEventOut(ignoreButton); + handleButtonControlEventIn(allowButton); + allowButton.focus(); + event.preventDefault(); + event.stopPropagation() + } + else if(event.keyCode == 13) + { + ignoreButtonKeyDownClick = true; + event.preventDefault(); + event.stopPropagation() + } + },false); + ignoreButton.addEventListener("keyup",function(event) + { + if(event.keyCode == 13 && ignoreButtonKeyDownClick) + { + ignoreButtonKeyDownClick = false; + ignoreButtonClickEventHandler(); + event.preventDefault(); + event.stopPropagation() + } + },false); + window.focus(); + function registerDialogNotificationShownEventCallback(status) + { + allowButton.focus() + } + registerDialogNotificationShownArgs.onComplete = registerDialogNotificationShownEventCallback; + OSF.DDA.WAC.Delegate.registerEventAsync(registerDialogNotificationShownArgs) + } + catch(e) + { + if(OSF.AppTelemetry) + OSF.AppTelemetry.logAppException("Exception happens at new window dialog." + e); + showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError) + } + } + Dialog.handleNewWindowDialog = handleNewWindowDialog; + function closeDialog(callback) + { + try + { + if(windowInstance != null) + { + var appDomains = OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains; + if(appDomains) + for(var i = 0; i < appDomains.length && appDomains[i].indexOf("://") !== -1; i++) + windowInstance.postMessage(closeDialogKey,appDomains[i]); + if(windowInstance != null && !windowInstance.closed) + windowInstance.close(); + if(shouldUseLocalStorageToPassMessage) + window.removeEventListener("storage",storageChangedHandler); + else + window.removeEventListener("message",receiveMessage); + window.clearInterval(checkWindowDialogCloseInterval); + windowInstance = null; + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + } + else + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError) + } + catch(e) + { + if(OSF.AppTelemetry) + OSF.AppTelemetry.logAppException("Exception happens at close window dialog." + e); + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError) + } + } + Dialog.closeDialog = closeDialog; + function messageParent(params) + { + var message = params.hostCallArgs[Microsoft.Office.WebExtension.Parameters.MessageToParent]; + if(shouldUseLocalStorageToPassMessage) + try + { + var messageKey = OSF._OfficeAppFactory.getInitializationHelper()._webAppState.id + messageParentKey; + window.localStorage.setItem(messageKey,message) + } + catch(e) + { + if(OSF.AppTelemetry) + OSF.AppTelemetry.logAppException("Error happened during messageParent method:" + e) + } + else + { + var appDomains = OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains; + if(appDomains) + for(var i = 0; i < appDomains.length && appDomains[i].indexOf("://") !== -1; i++) + window.opener.postMessage(message,appDomains[i]) + } + } + Dialog.messageParent = messageParent; + function sendMessage(params) + { + if(windowInstance != null) + { + var message = params.hostCallArgs, + appDomains = OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains; + if(appDomains) + for(var i = 0; i < appDomains.length && appDomains[i].indexOf("://") !== -1; i++) + { + if(typeof message != "string") + message = JSON.stringify(message); + windowInstance.postMessage(message,appDomains[i]) + } + } + } + Dialog.sendMessage = sendMessage; + function registerMessageReceivedEvent() + { + function receiveCloseDialogMessage(event) + { + if(event.source == window.opener) + if(typeof event.data === "string" && event.data.indexOf(closeDialogKey) > -1) + window.close(); + else + { + var messageContent = event.data, + type = typeof messageContent; + if(messageContent && (type == "object" || type == "string")) + { + if(type == "string") + messageContent = JSON.parse(messageContent); + var eventArgs = OSF.DDA.OMFactory.manufactureEventArgs(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived,null,messageContent); + OSF.DialogParentMessageEventDispatch.fireEvent(eventArgs) + } + } + } + window.addEventListener("message",receiveCloseDialogMessage) + } + Dialog.registerMessageReceivedEvent = registerMessageReceivedEvent; + function setHandlerAndShowDialogCallback(onEventHandler, callback) + { + handler = onEventHandler; + showDialogCallback = callback + } + Dialog.setHandlerAndShowDialogCallback = setHandlerAndShowDialogCallback; + function escDismissDialogNotification() + { + try + { + if(dialogNotificationPanel && dialogNotificationPanel.id == newWindowNotificationId && showDialogCallback) + showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore) + } + catch(e) + { + if(OSF.AppTelemetry) + OSF.AppTelemetry.logAppException("Error happened during executing displayDialogAsync callback." + e) + } + dismissDialogNotification() + } + Dialog.escDismissDialogNotification = escDismissDialogNotification; + function showCrossZoneNotification(windowUrl, hostType) + { + var okButtonKeyDownClick = false; + var dialogCssManager = OfficeExt.WacCommonUICssManager.getDialogCssManager(hostType); + overlayElement = createOverlayElement(dialogCssManager); + document.body.insertBefore(overlayElement,document.body.firstChild); + dialogNotificationPanel = createNotificationPanelForCrossZoneIssue(dialogCssManager,windowUrl); + dialogNotificationPanel.id = crossZoneNotificationId; + var dialogNotificationButtonPanel = createButtonPanel(dialogCssManager); + var okButton = createButtonControl(dialogCssManager,Strings.OfficeOM.L_DialogOK ? Strings.OfficeOM.L_DialogOK : "OK"); + dialogNotificationButtonPanel.appendChild(okButton); + dialogNotificationPanel.appendChild(dialogNotificationButtonPanel); + document.body.insertBefore(dialogNotificationPanel,document.body.firstChild); + hasCrossZoneNotification = true; + okButton.onclick = function() + { + dismissDialogNotification() + }; + okButton.addEventListener("keydown",function(event) + { + if(event.keyCode == 9) + { + document.getElementById(configureBrowserLinkId).focus(); + event.preventDefault(); + event.stopPropagation() + } + else if(event.keyCode == 13) + { + okButtonKeyDownClick = true; + event.preventDefault(); + event.stopPropagation() + } + },false); + okButton.addEventListener("keyup",function(event) + { + if(event.keyCode == 13 && okButtonKeyDownClick) + { + okButtonKeyDownClick = false; + dismissDialogNotification(); + event.preventDefault(); + event.stopPropagation() + } + },false); + document.getElementById(configureBrowserLinkId).addEventListener("keydown",function(event) + { + if(event.keyCode == 9) + { + okButton.focus(); + event.preventDefault(); + event.stopPropagation() + } + },false); + window.focus(); + okButton.focus() + } + Dialog.showCrossZoneNotification = showCrossZoneNotification; + function receiveMessage(event) + { + if(event.source == windowInstance) + try + { + var dialogMessageReceivedArgs = {}; + dialogMessageReceivedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType] = OSF.DialogMessageType.DialogMessageReceived; + dialogMessageReceivedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent] = event.data; + handler(dialogMessageReceivedArgs) + } + catch(e) + { + if(OSF.AppTelemetry) + OSF.AppTelemetry.logAppException("Error happened during receive message handler." + e) + } + } + function storageChangedHandler(event) + { + var messageKey = OSF._OfficeAppFactory.getInitializationHelper()._webAppState.id + messageParentKey; + if(event.key == messageKey) + try + { + var dialogMessageReceivedArgs = {}; + dialogMessageReceivedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType] = OSF.DialogMessageType.DialogMessageReceived; + dialogMessageReceivedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent] = event.newValue; + handler(dialogMessageReceivedArgs) + } + catch(e) + { + if(OSF.AppTelemetry) + OSF.AppTelemetry.logAppException("Error happened during storage changed handler." + e) + } + } + function showDialog(dialogInfo) + { + var hostInfoObj = OSF._OfficeAppFactory.getInitializationHelper()._hostInfo; + var hostInfoVals = [hostInfoObj.hostType,hostInfoObj.hostPlatform,hostInfoObj.hostSpecificFileVersion,hostInfoObj.hostLocale,hostInfoObj.osfControlAppCorrelationId,"isDialog"]; + var hostInfo = hostInfoVals.join("|"); + var appContext = OSF._OfficeAppFactory.getInitializationHelper()._appContext; + var windowUrl = dialogInfo[OSF.ShowWindowDialogParameterKeys.Url]; + windowUrl = OfficeExt.WACUtils.addHostInfoAsQueryParam(windowUrl,hostInfo); + var windowName = JSON.parse(window.name); + windowName[OSF.WindowNameItemKeys.HostInfo] = hostInfo; + windowName[OSF.WindowNameItemKeys.AppContext] = appContext; + var width = dialogInfo[OSF.ShowWindowDialogParameterKeys.Width] * screen.width / 100; + var height = dialogInfo[OSF.ShowWindowDialogParameterKeys.Height] * screen.height / 100; + var left = appContext._clientWindowWidth / 2 - width / 2; + var top = appContext._clientWindowHeight / 2 - height / 2; + var windowSpecs = "width=" + width + ", height=" + height + ", left=" + left + ", top=" + top + ",channelmode=no,directories=no,fullscreen=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=yes,toolbar=no"; + windowInstance = window.open(windowUrl,OfficeExt.WACUtils.serializeObjectToString(windowName),windowSpecs); + if(windowInstance == null) + { + OSF.AppTelemetry.logAppCommonMessage("Encountered cross zone issue in displayDialogAsync api."); + removeDialogNotificationElement(); + showCrossZoneNotification(windowUrl,hostInfoObj.hostType); + showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone); + return + } + if(shouldUseLocalStorageToPassMessage) + window.addEventListener("storage",storageChangedHandler); + else + window.addEventListener("message",receiveMessage); + function checkWindowClose() + { + try + { + if(windowInstance == null || windowInstance.closed) + { + window.clearInterval(checkWindowDialogCloseInterval); + if(shouldUseLocalStorageToPassMessage) + window.removeEventListener("storage",storageChangedHandler); + else + window.removeEventListener("message",receiveMessage); + var dialogClosedArgs = {}; + dialogClosedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType] = OSF.DialogMessageType.DialogClosed; + handler(dialogClosedArgs) + } + } + catch(e) + { + if(OSF.AppTelemetry) + OSF.AppTelemetry.logAppException("Error happened during check or handle window close." + e) + } + } + checkWindowDialogCloseInterval = window.setInterval(checkWindowClose,1e3); + if(showDialogCallback != null) + showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + else if(OSF.AppTelemetry) + OSF.AppTelemetry.logAppException("showDialogCallback can not be null.") + } + function createButtonControl(dialogCssManager, buttonValue) + { + var buttonControl = document.createElement("input"); + buttonControl.setAttribute("type","button"); + buttonControl.style.cssText = dialogCssManager.getDialogButtonCSS(); + buttonControl.style.borderColor = commonButtonBorderColor; + buttonControl.style.backgroundColor = commonButtonBackgroundColor; + buttonControl.setAttribute("value",buttonValue); + var buttonControlEventInHandler = function() + { + handleButtonControlEventIn(buttonControl) + }; + var buttonControlEventOutHandler = function() + { + handleButtonControlEventOut(buttonControl) + }; + buttonControl.addEventListener("mouseover",buttonControlEventInHandler); + buttonControl.addEventListener("focus",buttonControlEventInHandler); + buttonControl.addEventListener("mouseout",buttonControlEventOutHandler); + buttonControl.addEventListener("focusout",buttonControlEventOutHandler); + return buttonControl + } + function handleButtonControlEventIn(buttonControl) + { + if(hostThemeButtonStyle != null) + { + buttonControl.style.borderColor = hostThemeButtonStyle.HostButtonBorderColor; + buttonControl.style.backgroundColor = hostThemeButtonStyle.HostButtonBackgroundColor + } + else if(OSF.CommonUI && OSF.CommonUI.HostButtonBorderColor && OSF.CommonUI.HostButtonBackgroundColor) + { + buttonControl.style.borderColor = OSF.CommonUI.HostButtonBorderColor; + buttonControl.style.backgroundColor = OSF.CommonUI.HostButtonBackgroundColor + } + else + buttonControl.style.backgroundColor = commonEventInButtonBackgroundColor + } + function handleButtonControlEventOut(buttonControl) + { + buttonControl.style.borderColor = commonButtonBorderColor; + buttonControl.style.backgroundColor = commonButtonBackgroundColor + } + function dismissDialogNotification() + { + function unregisterDialogNotificationShownEventCallback(status) + { + removeDialogNotificationElement(); + setFocusOnFirstElement(status) + } + registerDialogNotificationShownArgs.onComplete = unregisterDialogNotificationShownEventCallback; + OSF.DDA.WAC.Delegate.unregisterEventAsync(registerDialogNotificationShownArgs) + } + function removeDialogNotificationElement() + { + if(dialogNotificationPanel != null) + { + document.body.removeChild(dialogNotificationPanel); + dialogNotificationPanel = null + } + if(overlayElement != null) + { + document.body.removeChild(overlayElement); + overlayElement = null + } + } + function createOverlayElement(dialogCssManager) + { + var overlayElement = document.createElement("div"); + overlayElement.style.cssText = dialogCssManager.getOverlayElementCSS(); + return overlayElement + } + function createNotificationPanel(dialogCssManager, notificationString) + { + var dialogNotificationPanel = document.createElement("div"); + dialogNotificationPanel.style.cssText = dialogCssManager.getDialogNotificationPanelCSS(); + setAttributeForDialogNotificationPanel(dialogNotificationPanel); + var dialogNotificationTextPanel = document.createElement("div"); + dialogNotificationTextPanel.style.cssText = dialogCssManager.getNewWindowNotificationTextPanelCSS(); + dialogNotificationTextPanel.id = dialogNotificationTextPanelId; + if(document.documentElement.getAttribute("dir") == "rtl") + dialogNotificationTextPanel.style.paddingRight = "30px"; + else + dialogNotificationTextPanel.style.paddingLeft = "30px"; + var dialogNotificationTextSpan = document.createElement("span"); + dialogNotificationTextSpan.style.cssText = dialogCssManager.getNewWindowNotificationTextSpanCSS(); + dialogNotificationTextSpan.innerText = notificationString; + dialogNotificationTextPanel.appendChild(dialogNotificationTextSpan); + dialogNotificationPanel.appendChild(dialogNotificationTextPanel); + return dialogNotificationPanel + } + function createButtonPanel(dialogCssManager) + { + var dialogNotificationButtonPanel = document.createElement("div"); + dialogNotificationButtonPanel.style.cssText = dialogCssManager.getDialogNotificationButtonPanelCSS(); + if(document.documentElement.getAttribute("dir") == "rtl") + dialogNotificationButtonPanel.style.cssFloat = "left"; + else + dialogNotificationButtonPanel.style.cssFloat = "right"; + return dialogNotificationButtonPanel + } + function setFocusOnFirstElement(status) + { + if(status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + { + var list = document.querySelectorAll(OSF._OfficeAppFactory.getInitializationHelper()._tabbableElements); + OSF.OUtil.focusToFirstTabbable(list,false) + } + } + function createNotificationPanelForCrossZoneIssue(dialogCssManager, windowUrl) + { + var dialogNotificationPanel = document.createElement("div"); + dialogNotificationPanel.style.cssText = dialogCssManager.getDialogNotificationPanelCSS(); + setAttributeForDialogNotificationPanel(dialogNotificationPanel); + var dialogNotificationTextPanel = document.createElement("div"); + dialogNotificationTextPanel.style.cssText = dialogCssManager.getCrossZoneNotificationTextPanelCSS(); + dialogNotificationTextPanel.id = dialogNotificationTextPanelId; + var configureBrowserLink = document.createElement("a"); + configureBrowserLink.id = configureBrowserLinkId; + configureBrowserLink.href = "#"; + configureBrowserLink.innerText = Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink; + configureBrowserLink.setAttribute("onclick","window.open('https://support.microsoft.com/en-us/help/17479/windows-internet-explorer-11-change-security-privacy-settings', '_blank', 'fullscreen=1')"); + var dialogNotificationTextSpan = document.createElement("span"); + if(Strings.OfficeOM.L_NewWindowCrossZone) + dialogNotificationTextSpan.innerHTML = OSF.OUtil.formatString(Strings.OfficeOM.L_NewWindowCrossZone,configureBrowserLink.outerHTML,OfficeExt.WACUtils.getDomainForUrl(windowUrl)); + dialogNotificationTextPanel.appendChild(dialogNotificationTextSpan); + dialogNotificationPanel.appendChild(dialogNotificationTextPanel); + return dialogNotificationPanel + } + function setAttributeForDialogNotificationPanel(dialogNotificationDiv) + { + dialogNotificationDiv.setAttribute("role","dialog"); + dialogNotificationDiv.setAttribute("aria-describedby",dialogNotificationTextPanelId) + } + })(Dialog = AddinNativeAction.Dialog || (AddinNativeAction.Dialog = {})) + })(AddinNativeAction = OfficeExt.AddinNativeAction || (OfficeExt.AddinNativeAction = {})) +})(OfficeExt || (OfficeExt = {})); OSF.DDA.WAC.Delegate.ParameterMap.define({ - type: OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent, - fromHost: [{ - name: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, - value: OSF.DDA.WAC.Delegate.ParameterMap.self - }] + type: OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent, + fromHost: [{ + name: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, + value: OSF.DDA.WAC.Delegate.ParameterMap.self + }] }); OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogMessageReceivedEvent); OSF.DDA.WAC.Delegate.ParameterMap.define({ - type: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, - fromHost: [{ - name: OSF.DDA.PropertyDescriptors.MessageType, - value: OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType - },{ - name: OSF.DDA.PropertyDescriptors.MessageContent, - value: OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent - }] + type: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, + fromHost: [{ + name: OSF.DDA.PropertyDescriptors.MessageType, + value: OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType + },{ + name: OSF.DDA.PropertyDescriptors.MessageContent, + value: OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent + }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ - type: OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent, - fromHost: [{ - name: OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent, - value: OSF.DDA.WAC.Delegate.ParameterMap.self - }] + type: OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent, + fromHost: [{ + name: OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent, + value: OSF.DDA.WAC.Delegate.ParameterMap.self + }] }); OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent); OSF.DDA.WAC.Delegate.ParameterMap.define({ - type: OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent, - fromHost: [{ - name: OSF.DDA.PropertyDescriptors.MessageType, - value: OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageType - },{ - name: OSF.DDA.PropertyDescriptors.MessageContent, - value: OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageContent - }] + type: OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent, + fromHost: [{ + name: OSF.DDA.PropertyDescriptors.MessageType, + value: OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageType + },{ + name: OSF.DDA.PropertyDescriptors.MessageContent, + value: OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageContent + }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ - type: OSF.DDA.MethodDispId.dispidMessageParentMethod, - toHost: [{ - name: Microsoft.Office.WebExtension.Parameters.MessageToParent, - value: OSF.DDA.Marshaling.MessageParentKeys.MessageToParent - }] + type: OSF.DDA.MethodDispId.dispidMessageParentMethod, + toHost: [{ + name: Microsoft.Office.WebExtension.Parameters.MessageToParent, + value: OSF.DDA.Marshaling.MessageParentKeys.MessageToParent + }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ - type: OSF.DDA.MethodDispId.dispidSendMessageMethod, - toHost: [{ - name: Microsoft.Office.WebExtension.Parameters.MessageContent, - value: OSF.DDA.Marshaling.SendMessageKeys.MessageContent - }] + type: OSF.DDA.MethodDispId.dispidSendMessageMethod, + toHost: [{ + name: Microsoft.Office.WebExtension.Parameters.MessageContent, + value: OSF.DDA.Marshaling.SendMessageKeys.MessageContent + }] }); -OSF.DDA.WAC.Delegate.openDialog=function OSF_DDA_WAC_Delegate$OpenDialog(args) +OSF.DDA.WAC.Delegate.openDialog = function OSF_DDA_WAC_Delegate$OpenDialog(args) { - var httpsIdentifyString="https://"; - var httpIdentifyString="http://"; - var dialogInfo=JSON.parse(args.targetId); - var callback=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(true,args); - function showDialogCallback(status) - { - var payload={Error: status}; - callback(Microsoft.Office.Common.InvokeResultCode.noError,payload) - } - if(OSF.DialogShownStatus.hasDialogShown) - { - showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened); - return - } - var dialogUrl=dialogInfo[OSF.ShowWindowDialogParameterKeys.Url].toLowerCase(); - if(dialogUrl==null || !(dialogUrl.substr(0,httpsIdentifyString.length)===httpsIdentifyString)) - { - if(dialogUrl.substr(0,httpIdentifyString.length)===httpIdentifyString) - showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS); - else - showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme); - return - } - if(!dialogInfo[OSF.ShowWindowDialogParameterKeys.DisplayInIframe]) - { - OSF.DialogShownStatus.isWindowDialog=true; - OfficeExt.AddinNativeAction.Dialog.setHandlerAndShowDialogCallback(function OSF_DDA_WACDelegate$RegisterEventAsync_OnEvent(payload) - { - if(args.onEvent) - args.onEvent(payload); - if(OSF.AppTelemetry) - OSF.AppTelemetry.onEventDone(args.dispId) - },showDialogCallback); - OfficeExt.AddinNativeAction.Dialog.handleNewWindowDialog(dialogInfo) - } - else - { - OSF.DialogShownStatus.isWindowDialog=false; - OSF.DDA.WAC.Delegate.registerEventAsync(args) - } -}; -OSF.DDA.WAC.Delegate.messageParent=function OSF_DDA_WAC_Delegate$MessageParent(args) + var httpsIdentifyString = "https://"; + var httpIdentifyString = "http://"; + var dialogInfo = JSON.parse(args.targetId); + var callback = OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(true,args); + function showDialogCallback(status) + { + var payload = {Error: status}; + try + { + callback(Microsoft.Office.Common.InvokeResultCode.noError,payload) + } + catch(e) + { + if(OSF.AppTelemetry) + OSF.AppTelemetry.logAppException("Exception happens at showDialogCallback." + e) + } + } + if(OSF.DialogShownStatus.hasDialogShown) + { + showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened); + return + } + var dialogUrl = dialogInfo[OSF.ShowWindowDialogParameterKeys.Url].toLowerCase(); + if(dialogUrl == null || !(dialogUrl.substr(0,httpsIdentifyString.length) === httpsIdentifyString)) + { + if(dialogUrl.substr(0,httpIdentifyString.length) === httpIdentifyString) + showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS); + else + showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme); + return + } + if(!dialogInfo[OSF.ShowWindowDialogParameterKeys.DisplayInIframe]) + { + OSF.DialogShownStatus.isWindowDialog = true; + OfficeExt.AddinNativeAction.Dialog.setHandlerAndShowDialogCallback(function OSF_DDA_WACDelegate$RegisterEventAsync_OnEvent(payload) + { + if(args.onEvent) + args.onEvent(payload); + if(OSF.AppTelemetry) + OSF.AppTelemetry.onEventDone(args.dispId) + },showDialogCallback); + OfficeExt.AddinNativeAction.Dialog.handleNewWindowDialog(dialogInfo) + } + else + { + OSF.DialogShownStatus.isWindowDialog = false; + OSF.DDA.WAC.Delegate.registerEventAsync(args) + } +}; +OSF.DDA.WAC.Delegate.messageParent = function OSF_DDA_WAC_Delegate$MessageParent(args) { - if(window.opener !=null) - OfficeExt.AddinNativeAction.Dialog.messageParent(args); - else - OSF.DDA.WAC.Delegate.executeAsync(args) + if(window.opener != null) + OfficeExt.AddinNativeAction.Dialog.messageParent(args); + else + OSF.DDA.WAC.Delegate.executeAsync(args) }; -OSF.DDA.WAC.Delegate.sendMessage=function OSF_DDA_WAC_Delegate$SendMessage(args) +OSF.DDA.WAC.Delegate.sendMessage = function OSF_DDA_WAC_Delegate$SendMessage(args) { - if(OSF.DialogShownStatus.hasDialogShown) - if(OSF.DialogShownStatus.isWindowDialog) - OfficeExt.AddinNativeAction.Dialog.sendMessage(args); - else - OSF.DDA.WAC.Delegate.executeAsync(args) + if(OSF.DialogShownStatus.hasDialogShown) + if(OSF.DialogShownStatus.isWindowDialog) + OfficeExt.AddinNativeAction.Dialog.sendMessage(args); + else + OSF.DDA.WAC.Delegate.executeAsync(args) }; -OSF.DDA.WAC.Delegate.closeDialog=function OSF_DDA_WAC_Delegate$CloseDialog(args) +OSF.DDA.WAC.Delegate.closeDialog = function OSF_DDA_WAC_Delegate$CloseDialog(args) { - var callback=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(false,args); - function closeDialogCallback(status) - { - var payload={Error: status}; - callback(Microsoft.Office.Common.InvokeResultCode.noError,payload) - } - if(!OSF.DialogShownStatus.hasDialogShown) - closeDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeWebDialogClosed); - else if(OSF.DialogShownStatus.isWindowDialog) - { - if(args.onCalling) - args.onCalling(); - OfficeExt.AddinNativeAction.Dialog.closeDialog(closeDialogCallback) - } - else - OSF.DDA.WAC.Delegate.unregisterEventAsync(args) -}; -OSF.InitializationHelper.prototype.dismissDialogNotification=function OSF_InitializationHelper$dismissDialogNotification() + var callback = OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(false,args); + function closeDialogCallback(status) + { + var payload = {Error: status}; + try + { + callback(Microsoft.Office.Common.InvokeResultCode.noError,payload) + } + catch(e) + { + if(OSF.AppTelemetry) + OSF.AppTelemetry.logAppException("Exception happens at closeDialogCallback." + e) + } + } + if(!OSF.DialogShownStatus.hasDialogShown) + closeDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeWebDialogClosed); + else if(OSF.DialogShownStatus.isWindowDialog) + { + if(args.onCalling) + args.onCalling(); + OfficeExt.AddinNativeAction.Dialog.closeDialog(closeDialogCallback) + } + else + OSF.DDA.WAC.Delegate.unregisterEventAsync(args) +}; +OSF.InitializationHelper.prototype.dismissDialogNotification = function OSF_InitializationHelper$dismissDialogNotification() { - OfficeExt.AddinNativeAction.Dialog.escDismissDialogNotification() + OfficeExt.AddinNativeAction.Dialog.escDismissDialogNotification() }; -OSF.InitializationHelper.prototype.registerMessageReceivedEventForWindowDialog=function OSF_InitializationHelper$registerMessageReceivedEventForWindowDialog() +OSF.InitializationHelper.prototype.registerMessageReceivedEventForWindowDialog = function OSF_InitializationHelper$registerMessageReceivedEventForWindowDialog() { - OfficeExt.AddinNativeAction.Dialog.registerMessageReceivedEvent() + OfficeExt.AddinNativeAction.Dialog.registerMessageReceivedEvent() }; OSF.DDA.AsyncMethodNames.addNames({CloseContainerAsync: "closeContainer"}); var OfficeExt; (function(OfficeExt) { - var Container=function() - { - function Container(parameters){} - return Container - }(); - OfficeExt.Container=Container -})(OfficeExt || (OfficeExt={})); + var Container = function() + { + function Container(parameters){} + return Container + }(); + OfficeExt.Container = Container +})(OfficeExt || (OfficeExt = {})); OSF.DDA.AsyncMethodCalls.define({ - method: OSF.DDA.AsyncMethodNames.CloseContainerAsync, - requiredArguments: [], - supportedOptions: [], - privateStateCallbacks: [] + method: OSF.DDA.AsyncMethodNames.CloseContainerAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ - type: OSF.DDA.MethodDispId.dispidCloseContainerMethod, - fromHost: [], - toHost: [] + type: OSF.DDA.MethodDispId.dispidCloseContainerMethod, + fromHost: [], + toHost: [] }); OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ItemChanged: "olkItemSelectedChanged"}); OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{OlkItemSelectedData: "OlkItemSelectedData"}); -OSF.DDA.OlkItemSelectedChangedEventArgs=function OSF_DDA_OlkItemSelectedChangedEventArgs(eventData) +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{RecipientsChanged: "olkRecipientsChanged"}); +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{OlkRecipientsData: "OlkRecipientsData"}); +OSF.DDA.OlkRecipientsChangedEventArgs = function OSF_DDA_OlkRecipientsChangedEventArgs(eventData) +{ + var changedRecipientFields = eventData[OSF.DDA.EventDescriptors.OlkRecipientsData][0]; + if(changedRecipientFields === "") + changedRecipientFields = null; + OSF.OUtil.defineEnumerableProperties(this,{ + type: {value: Microsoft.Office.WebExtension.EventType.RecipientsChanged}, + changedRecipientFields: {value: JSON.parse(changedRecipientFields)} + }) +}; +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppointmentTimeChanged: "olkAppointmentTimeChanged"}); +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{OlkAppointmentTimeChangedData: "OlkAppointmentTimeChangedData"}); +OSF.DDA.OlkAppointmentTimeChangedEventArgs = function OSF_DDA_OlkAppointmentTimeChangedEventArgs(eventData) { - var initialDataSource=eventData[OSF.DDA.EventDescriptors.OlkItemSelectedData][0]; - if(initialDataSource==="") - initialDataSource=null; - OSF.OUtil.defineEnumerableProperties(this,{ - type: {value: Microsoft.Office.WebExtension.EventType.ItemChanged}, - initialData: {value: JSON.parse(initialDataSource)}, - itemNumber: {value: JSON.parse(eventData[OSF.DDA.EventDescriptors.OlkItemSelectedData][1])} - }) + var appointmentTimeString = eventData[OSF.DDA.EventDescriptors.OlkAppointmentTimeChangedData][0]; + var start; + var end; + try + { + var appointmentTime = JSON.parse(appointmentTimeString); + start = new Date(appointmentTime.start).toISOString(); + end = new Date(appointmentTime.end).toISOString() + } + catch(e) + { + start = null; + end = null + } + OSF.OUtil.defineEnumerableProperties(this,{ + type: {value: Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged}, + start: {value: start}, + end: {value: end} + }) }; +OSF.DDA.OlkItemSelectedChangedEventArgs = function OSF_DDA_OlkItemSelectedChangedEventArgs(eventData) +{ + var initialDataSource = eventData[OSF.DDA.EventDescriptors.OlkItemSelectedData]; + if(initialDataSource === "") + initialDataSource = null; + OSF.OUtil.defineEnumerableProperties(this,{ + type: {value: Microsoft.Office.WebExtension.EventType.ItemChanged}, + initialData: {value: initialDataSource} + }) +}; +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidOlkItemSelectedChangedEvent, + fromHost: [{ + name: OSF.DDA.EventDescriptors.OlkItemSelectedData, + value: OSF.DDA.WAC.Delegate.ParameterMap.self + }], + isComplexType: true +}); OSF.DDA.WAC.Delegate.ParameterMap.define({ - type: OSF.DDA.EventDispId.dispidOlkItemSelectedChangedEvent, - fromHost: [{ - name: OSF.DDA.EventDescriptors.OlkItemSelectedData, - value: OSF.DDA.WAC.Delegate.ParameterMap.sourceData - }], - isComplexType: true + type: OSF.DDA.EventDispId.dispidOlkRecipientsChangedEvent, + fromHost: [{ + name: OSF.DDA.EventDescriptors.OlkRecipientsData, + value: OSF.DDA.WAC.Delegate.ParameterMap.self + }], + isComplexType: true }); -OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize=function OSF_InitializationHelper$prepareRightBeforeWebExtensionInitialize(appContext) +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidOlkAppointmentTimeChangedEvent, + fromHost: [{ + name: OSF.DDA.EventDescriptors.OlkAppointmentTimeChangedData, + value: OSF.DDA.WAC.Delegate.ParameterMap.self + }], + isComplexType: true +}); +OSF.DDA.AsyncMethodNames.addNames({GetAccessTokenAsync: "getAccessTokenAsync"}); +OSF.DDA.Auth = function OSF_DDA_Auth(){}; +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetAccessTokenAsync, + requiredArguments: [], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.ForceConsent, + value: { + types: ["boolean"], + defaultValue: false + } + },{ + name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, + value: { + types: ["boolean"], + defaultValue: false + } + },{ + name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, + value: { + types: ["string"], + defaultValue: "" + } + }], + onSucceeded: function(dataDescriptor, caller, callArgs) + { + var data = dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + return data + } +}); +OSF.OUtil.setNamespace("Marshaling",OSF.DDA); +OSF.OUtil.setNamespace("SingleSignOn",OSF.DDA.Marshaling); +OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys = { + ForceConsent: "forceConsent", + ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge" +}; +OSF.DDA.Marshaling.SingleSignOn.AccessTokenResultKeys = {AccessToken: "accessToken"}; +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetAccessTokenMethod, + toHost: [{ + name: Microsoft.Office.WebExtension.Parameters.ForceConsent, + value: OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.ForceConsent + },{ + name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, + value: OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.ForceAddAccount + },{ + name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, + value: OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.AuthChallenge + }], + fromHost: [{ + name: Microsoft.Office.WebExtension.Parameters.Data, + value: OSF.DDA.Marshaling.SingleSignOn.AccessTokenResultKeys.AccessToken + }] +}); +OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize = function OSF_InitializationHelper$prepareRightBeforeWebExtensionInitialize(appContext) { - OSF.WebApp._UpdateLinksForHostAndXdmInfo() + OSF.WebApp._UpdateLinksForHostAndXdmInfo() }; -OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize=function() +OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize = function() { - var appCommandHandler=OfficeExt.AppCommand.AppCommandManager.instance(); - appCommandHandler.initializeAndChangeOnce() + var appCommandHandler = OfficeExt.AppCommand.AppCommandManager.instance(); + appCommandHandler.initializeAndChangeOnce() }; -OSF.InitializationHelper.prototype.getInitializationReason=function OSF_InitializationHelper$getInitializationReason(appContext) +OSF.InitializationHelper.prototype.getInitializationReason = function OSF_InitializationHelper$getInitializationReason(appContext) { - return appContext.get_reason() + return appContext.get_reason() }; -var executeAsyncBase=OSF.DDA.WAC.Delegate.executeAsync; -OSF.DDA.WAC.Delegate.executeAsync=function OSF_DDA_WAC_Delegate$executeAsyncOverride(args) +var executeAsyncBase = OSF.DDA.WAC.Delegate.executeAsync; +OSF.DDA.WAC.Delegate.executeAsync = function OSF_DDA_WAC_Delegate$executeAsyncOverride(args) { - var onCallingBase=args.onCalling; - args.onCalling=function OSF_DDA_WAC_Delegate$executeAsync$onCalling() - { - args.hostCallArgs=OSF.DDA.OutlookAppOm.addAdditionalArgs(args.dispId,args.hostCallArgs); - onCallingBase && onCallingBase() - }; - executeAsyncBase(args) -}; -OSF.InitializationHelper.prototype.prepareApiSurface=function OSF_InitializationHelper$prepareApiSurface(appContext) + var onCallingBase = args.onCalling; + args.onCalling = function OSF_DDA_WAC_Delegate$executeAsync$onCalling() + { + args.hostCallArgs = OSF.DDA.OutlookAppOm.addAdditionalArgs(args.dispId,args.hostCallArgs); + onCallingBase && onCallingBase() + }; + executeAsyncBase(args) +}; +OSF.InitializationHelper.prototype.prepareApiSurface = function OSF_InitializationHelper$prepareApiSurface(appContext) { - var license=new OSF.DDA.License(appContext.get_eToken()); - if(appContext.get_appName()==OSF.AppName.OutlookWebApp) - { - OSF.WebApp._UpdateLinksForHostAndXdmInfo(); - this.initWebDialog(appContext); - OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(appContext,this._settings,license,appContext.appOM)); - OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.WAC.getDelegateMethods,OSF.DDA.WAC.Delegate.ParameterMap)) - } - else - { - OfficeJsClient_OutlookWin32.prepareApiSurface(appContext); - OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(appContext,this._settings,license,appContext.appOM,OSF.DDA.Theming ? OSF.DDA.Theming.getOfficeTheme : null,appContext.ui)); - OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.DispIdHost.getClientDelegateMethods,OSF.DDA.SafeArray.Delegate.ParameterMap)) - } -}; -OSF.DDA.SettingsManager={ - SerializedSettings: "serializedSettings", - DateJSONPrefix: "Date(", - DataJSONSuffix: ")", - serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) - { - var ret={}; - for(var key in settingsCollection) - { - var value=settingsCollection[key]; - try - { - if(JSON) - value=JSON.stringify(value,function dateReplacer(k, v) - { - return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix+this[k].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix : v - }); - else - value=Sys.Serialization.JavaScriptSerializer.serialize(value); - ret[key]=value - } - catch(ex){} - } - return ret - }, - deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) - { - var ret={}; - serializedSettings=serializedSettings || {}; - for(var key in serializedSettings) - { - var value=serializedSettings[key]; - try - { - if(JSON) - value=JSON.parse(value,function dateReviver(k, v) - { - var d; - if(typeof v==="string" && v && v.length > 6 && v.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) - { - d=new Date(parseInt(v.slice(5,-1))); - if(d) - return d - } - return v - }); - else - value=Sys.Serialization.JavaScriptSerializer.deserialize(value,true); - ret[key]=value - } - catch(ex){} - } - return ret - } -}; -OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function OSF_InitializationHelper$loadAppSpecificScriptAndCreateOM(appContext, appReady, basePath) + var license = new OSF.DDA.License(appContext.get_eToken()); + if(appContext.get_appName() == OSF.AppName.OutlookWebApp) + { + OSF.WebApp._UpdateLinksForHostAndXdmInfo(); + this.initWebDialog(appContext); + this.initWebAuth(appContext); + OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(appContext,this._settings,license,appContext.appOM)); + OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.WAC.getDelegateMethods,OSF.DDA.WAC.Delegate.ParameterMap)) + } + else + { + OfficeJsClient_OutlookWin32.prepareApiSurface(appContext); + OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(appContext,this._settings,license,appContext.appOM,OSF.DDA.Theming ? OSF.DDA.Theming.getOfficeTheme : null,appContext.ui)); + OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.DispIdHost.getClientDelegateMethods,OSF.DDA.SafeArray.Delegate.ParameterMap)) + } +}; +OSF.DDA.SettingsManager = { + SerializedSettings: "serializedSettings", + DateJSONPrefix: "Date(", + DataJSONSuffix: ")", + serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) + { + var ret = {}; + for(var key in settingsCollection) + { + var value = settingsCollection[key]; + try + { + if(JSON) + value = JSON.stringify(value,function dateReplacer(k, v) + { + return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix + this[k].getTime() + OSF.DDA.SettingsManager.DataJSONSuffix : v + }); + else + value = Sys.Serialization.JavaScriptSerializer.serialize(value); + ret[key] = value + } + catch(ex){} + } + return ret + }, + deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) + { + var ret = {}; + serializedSettings = serializedSettings || {}; + for(var key in serializedSettings) + { + var value = serializedSettings[key]; + try + { + if(JSON) + value = JSON.parse(value,function dateReviver(k, v) + { + var d; + if(typeof v === "string" && v && v.length > 6 && v.slice(0,5) === OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1) === OSF.DDA.SettingsManager.DataJSONSuffix) + { + d = new Date(parseInt(v.slice(5,-1))); + if(d) + return d + } + return v + }); + else + value = Sys.Serialization.JavaScriptSerializer.deserialize(value,true); + ret[key] = value + } + catch(ex){} + } + return ret + } +}; +OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM = function OSF_InitializationHelper$loadAppSpecificScriptAndCreateOM(appContext, appReady, basePath) { - Type.registerNamespace("Microsoft.Office.WebExtension.MailboxEnums"); - Microsoft.Office.WebExtension.MailboxEnums.EntityType={ - MeetingSuggestion: "meetingSuggestion", - TaskSuggestion: "taskSuggestion", - Address: "address", - EmailAddress: "emailAddress", - Url: "url", - PhoneNumber: "phoneNumber", - Contact: "contact", - FlightReservations: "flightReservations", - ParcelDeliveries: "parcelDeliveries" - }; - Microsoft.Office.WebExtension.MailboxEnums.ItemType={ - Message: "message", - Appointment: "appointment" - }; - Microsoft.Office.WebExtension.MailboxEnums.ResponseType={ - None: "none", - Organizer: "organizer", - Tentative: "tentative", - Accepted: "accepted", - Declined: "declined" - }; - Microsoft.Office.WebExtension.MailboxEnums.RecipientType={ - Other: "other", - DistributionList: "distributionList", - User: "user", - ExternalUser: "externalUser" - }; - Microsoft.Office.WebExtension.MailboxEnums.AttachmentType={ - File: "file", - Item: "item", - Cloud: "cloud" - }; - Microsoft.Office.WebExtension.MailboxEnums.BodyType={ - Text: "text", - Html: "html" - }; - Microsoft.Office.WebExtension.MailboxEnums.ItemNotificationMessageType={ - ProgressIndicator: "progressIndicator", - InformationalMessage: "informationalMessage", - ErrorMessage: "errorMessage" - }; - Microsoft.Office.WebExtension.CoercionType={ - Text: "text", - Html: "html" - }; - Microsoft.Office.WebExtension.MailboxEnums.UserProfileType={ - Office365: "office365", - OutlookCom: "outlookCom", - Enterprise: "enterprise" - }; - Microsoft.Office.WebExtension.MailboxEnums.RestVersion={ - v1_0: "v1.0", - v2_0: "v2.0", - Beta: "beta" - }; - Microsoft.Office.WebExtension.MailboxEnums.ModuleType={Addins: "addins"}; - Type.registerNamespace("OSF.DDA"); - var OSF=window["OSF"] || {}; - OSF.DDA=OSF.DDA || {}; - window["OSF"]["DDA"]["OutlookAppOm"]=OSF.DDA.OutlookAppOm=function(officeAppContext, targetWindow, appReadyCallback) - { - this.$$d_navigateToModuleAsync=Function.createDelegate(this,this.navigateToModuleAsync); - this.$$d_displayPersonaCardAsync=Function.createDelegate(this,this.displayPersonaCardAsync); - this.$$d_displayNewMessageFormApi=Function.createDelegate(this,this.displayNewMessageFormApi); - this.$$d__displayNewAppointmentFormApi$p$0=Function.createDelegate(this,this._displayNewAppointmentFormApi$p$0); - this.$$d_windowOpenOverrideHandler=Function.createDelegate(this,this.windowOpenOverrideHandler); - this.$$d__getRestUrl$p$0=Function.createDelegate(this,this._getRestUrl$p$0); - this.$$d__getEwsUrl$p$0=Function.createDelegate(this,this._getEwsUrl$p$0); - this.$$d__getDiagnostics$p$0=Function.createDelegate(this,this._getDiagnostics$p$0); - this.$$d__getUserProfile$p$0=Function.createDelegate(this,this._getUserProfile$p$0); - this.$$d_getItem=Function.createDelegate(this,this.getItem); - this.$$d__callAppReadyCallback$p$0=Function.createDelegate(this,this._callAppReadyCallback$p$0); - this.$$d__getInitialDataResponseHandler$p$0=Function.createDelegate(this,this._getInitialDataResponseHandler$p$0); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p=this; - this._officeAppContext$p$0=officeAppContext; - this._appReadyCallback$p$0=appReadyCallback; - var $$t_4=this; - var stringLoadedCallback=function() - { - if(appReadyCallback) - if(!$$t_4._officeAppContext$p$0["get_isDialog"]()) - $$t_4.invokeHostMethod(1,null,$$t_4.$$d__getInitialDataResponseHandler$p$0); - else - window.setTimeout($$t_4.$$d__callAppReadyCallback$p$0,0) - }; - if(this._areStringsLoaded$p$0()) - stringLoadedCallback(); - else - this._loadLocalizedScript$p$0(stringLoadedCallback) - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i=function(currentPermissionLevel) - { - if(!currentPermissionLevel) - throw Error.create(window["_u"]["ExtensibilityStrings"]["l_ElevatedPermissionNeeded_Text"]); - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i=function(value, minValue, maxValue, argumentName) - { - if(value < minValue || value > maxValue) - throw Error.argumentOutOfRange(argumentName); - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidModule$p=function(module) - { - if($h.ScriptHelpers.isNullOrUndefined(module)) - throw Error.argumentNull("module"); - else if(module==="") - throw Error.argument("module","module cannot be empty."); - if(module !==window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ModuleType"]["Addins"]) - throw Error.notImplemented(String.format("API not supported for module '{0}'",module)); - }; - window["OSF"]["DDA"]["OutlookAppOm"]._getHtmlBody$p=function(data) - { - var htmlBody=""; - if("htmlBody" in data) - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidHtmlBody$p(data["htmlBody"]); - htmlBody=data["htmlBody"] - } - return htmlBody - }; - window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p=function(data) - { - var attachments=[]; - if("attachments" in data) - { - attachments=data["attachments"]; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentsArray$p(attachments) - } - return attachments - }; - window["OSF"]["DDA"]["OutlookAppOm"]._getOptionsAndCallback$p=function(data) - { - var args=[]; - if("options" in data) - args[0]=data["options"]; - if("callback" in data) - args[args["length"]]=data["callback"]; - return args - }; - window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p=function(attachments) - { - var attachmentsData=new Array(0); - if(Array["isInstanceOfType"](attachments)) - for(var i=0; i < attachments["length"]; i++) - if(Object["isInstanceOfType"](attachments[i])) - { - var attachment=attachments[i]; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachment$p(attachment); - attachmentsData[i]=window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentData$p(attachment) - } - else - throw Error.argument("attachments"); - return attachmentsData - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidHtmlBody$p=function(htmlBody) - { - if(!String["isInstanceOfType"](htmlBody)) - throw Error.argument("htmlBody"); - if($h.ScriptHelpers.isNullOrUndefined(htmlBody)) - throw Error.argument("htmlBody"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(htmlBody.length,0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody") - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentsArray$p=function(attachments) - { - if(!Array["isInstanceOfType"](attachments)) - throw Error.argument("attachments"); - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachment$p=function(attachment) - { - if(!Object["isInstanceOfType"](attachment)) - throw Error.argument("attachments"); - if(!("type" in attachment) || !("name" in attachment)) - throw Error.argument("attachments"); - if(!("url" in attachment || "itemId" in attachment)) - throw Error.argument("attachments"); - }; - window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentData$p=function(attachment) - { - var attachmentData=null; - if(attachment["type"]==="file") - { - var url=attachment["url"]; - var name=attachment["name"]; - var isInline=$h.ScriptHelpers.isValueTrue(attachment["isInline"]); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentUrlOrName$p(url,name); - attachmentData=window["OSF"]["DDA"]["OutlookAppOm"]._createFileAttachmentData$p(url,name,isInline) - } - else if(attachment["type"]==="item") - { - var itemId=window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(attachment["itemId"]); - var name=attachment["name"]; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentItemIdOrName$p(itemId,name); - attachmentData=window["OSF"]["DDA"]["OutlookAppOm"]._createItemAttachmentData$p(itemId,name) - } - else - throw Error.argument("attachments"); - return attachmentData - }; - window["OSF"]["DDA"]["OutlookAppOm"]._createFileAttachmentData$p=function(url, name, isInline) - { - return["file",name,url,isInline] - }; - window["OSF"]["DDA"]["OutlookAppOm"]._createItemAttachmentData$p=function(itemId, name) - { - return["item",name,itemId] - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentUrlOrName$p=function(url, name) - { - if(!String["isInstanceOfType"](url) || !String["isInstanceOfType"](name)) - throw Error.argument("attachments"); - if(url.length > 2048) - throw Error.argumentOutOfRange("attachments",url.length,window["_u"]["ExtensibilityStrings"]["l_AttachmentUrlTooLong_Text"]); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p(name) - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentItemIdOrName$p=function(itemId, name) - { - if(!String["isInstanceOfType"](itemId) || !String["isInstanceOfType"](name)) - throw Error.argument("attachments"); - if(itemId.length > 200) - throw Error.argumentOutOfRange("attachments",itemId.length,window["_u"]["ExtensibilityStrings"]["l_AttachmentItemIdTooLong_Text"]); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p(name) - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p=function(name) - { - if(name.length > 255) - throw Error.argumentOutOfRange("attachments",name.length,window["_u"]["ExtensibilityStrings"]["l_AttachmentNameTooLong_Text"]); - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p=function(restVersion) - { - if(!restVersion) - throw Error.argumentNull("restVersion"); - if(restVersion !==window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"] && restVersion !==window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v2_0"] && restVersion !==window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["Beta"]) - throw Error.argument("restVersion"); - }; - window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost=function(itemId) - { - if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._initialData$p$0 && window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._initialData$p$0.get__isRestIdSupported$i$0()) - return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToRestId"](itemId,window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"]); - return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToEwsId"](itemId,window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"]) - }; - window["OSF"]["DDA"]["OutlookAppOm"]["addAdditionalArgs"]=function(dispid, data) - { - return data - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p=function(value, expectedType, argumentName) - { - if(Object["getType"](value) !==expectedType) - throw Error.argumentType(argumentName); - }; - window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p=function(value, minLength, maxLength, name) - { - if($h.ScriptHelpers.isNullOrUndefined(value)) - return; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(value,String,name); - var stringValue=value; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(stringValue.length,minLength,maxLength,name) - }; - window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p=function(array) - { - return array ? array["join"](";") : null - }; - window["OSF"]["DDA"]["OutlookAppOm"]._convertComposeEmailDictionaryParameterForSetApi$p=function(recipients) - { - if(!recipients) - return null; - var results=new Array(recipients["length"]); - for(var i=0; i < recipients["length"]; i++) - results[i]=[recipients[i]["address"],recipients[i]["name"]]; - return results - }; - window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p=function(emailset, name) - { - if($h.ScriptHelpers.isNullOrUndefined(emailset)) - return null; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(emailset,Array,name); - var originalAttendees=emailset; - var updatedAttendees=null; - var normalizationNeeded=false; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(originalAttendees["length"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxRecipients$p,String.format("{0}.length",name)); - for(var i=0; i < originalAttendees["length"]; i++) - if($h.EmailAddressDetails["isInstanceOfType"](originalAttendees[i])) - { - normalizationNeeded=true; - break - } - if(normalizationNeeded) - updatedAttendees=[]; - for(var i=0; i < originalAttendees["length"]; i++) - if(normalizationNeeded) - { - updatedAttendees[i]=$h.EmailAddressDetails["isInstanceOfType"](originalAttendees[i]) ? originalAttendees[i]["emailAddress"] : originalAttendees[i]; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(updatedAttendees[i],String,String.format("{0}[{1}]",name,i)) - } - else - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(originalAttendees[i],String,String.format("{0}[{1}]",name,i)); - return updatedAttendees - }; - OSF.DDA.OutlookAppOm.prototype={ - _initialData$p$0: null, - _item$p$0: null, - _userProfile$p$0: null, - _diagnostics$p$0: null, - _officeAppContext$p$0: null, - _appReadyCallback$p$0: null, - _clientEndPoint$p$0: null, - _hostItemType$p$0: 0, - _additionalOutlookParams$p$0: null, - get_clientEndPoint: function() - { - if(!this._clientEndPoint$p$0) - this._clientEndPoint$p$0=OSF._OfficeAppFactory["getClientEndPoint"](); - return this._clientEndPoint$p$0 - }, - set_clientEndPoint: function(value) - { - this._clientEndPoint$p$0=value; - return value - }, - get_initialData: function() - { - return this._initialData$p$0 - }, - get__appName$i$0: function() - { - return this._officeAppContext$p$0["get_appName"]() - }, - get_additionalOutlookParams: function() - { - return this._additionalOutlookParams$p$0 - }, - windowOpenOverrideHandler: function(url, targetName, features, replace) - { - this.invokeHostMethod(403,{launchUrl: url},null) - }, - createAsyncResult: function(value, errorCode, detailedErrorCode, userContext, errorMessage) - { - var initArgs={}; - var errorArgs=null; - initArgs[OSF.DDA.AsyncResultEnum.Properties["Value"]]=value; - initArgs[OSF.DDA.AsyncResultEnum.Properties["Context"]]=userContext; - if(0 !==errorCode) - { - errorArgs={}; - var errorProperties=$h.OutlookErrorManager.getErrorArgs(detailedErrorCode); - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties["Name"]]=errorProperties["name"]; - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties["Message"]]=!errorMessage ? errorProperties["message"] : errorMessage; - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties["Code"]]=detailedErrorCode - } - return new OSF.DDA.AsyncResult(initArgs,errorArgs) - }, - _throwOnMethodCallForInsufficientPermission$i$0: function(requiredPermissionLevel, methodName) - { - if(this._initialData$p$0._permissionLevel$p$0 < requiredPermissionLevel) - throw Error.create(String.format(window["_u"]["ExtensibilityStrings"]["l_ElevatedPermissionNeededForMethod_Text"],methodName)); - }, - _displayReplyForm$i$0: function(obj) - { - this._displayReplyFormHelper$p$0(obj,false) - }, - _displayReplyAllForm$i$0: function(obj) - { - this._displayReplyFormHelper$p$0(obj,true) - }, - get_itemNumber: function() - { - return this._additionalOutlookParams$p$0._itemNumber$p$0 - }, - _displayReplyFormHelper$p$0: function(obj, isReplyAll) - { - if(String["isInstanceOfType"](obj)) - this._doDisplayReplyForm$p$0(obj,isReplyAll); - else if(Object["isInstanceOfType"](obj) && Object.getTypeName(obj)==="Object") - this._doDisplayReplyFormWithAttachments$p$0(obj,isReplyAll); - else - throw Error.argumentType(); - }, - _doDisplayReplyForm$p$0: function(htmlBody, isReplyAll) - { - if(!$h.ScriptHelpers.isNullOrUndefined(htmlBody)) - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(htmlBody.length,0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody"); - this.invokeHostMethod(isReplyAll ? 11 : 10,{htmlBody: htmlBody},null) - }, - _doDisplayReplyFormWithAttachments$p$0: function(data, isReplyAll) - { - var htmlBody=window["OSF"]["DDA"]["OutlookAppOm"]._getHtmlBody$p(data); - var attachments=window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p(data); - var parameters=$h.CommonParameters.parse(window["OSF"]["DDA"]["OutlookAppOm"]._getOptionsAndCallback$p(data),false); - var $$t_6=this; - this._standardInvokeHostMethod$i$0(isReplyAll ? 31 : 30,{ - htmlBody: htmlBody, - attachments: window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p(attachments) - },function(rawInput) - { - return rawInput - },parameters._asyncContext$p$0,parameters._callback$p$0) - }, - _standardInvokeHostMethod$i$0: function(dispid, data, format, userContext, callback) - { - var $$t_B=this; - this.invokeHostMethod(dispid,data,function(resultCode, response) - { - if(callback) - { - var asyncResult=null; - if(Object["isInstanceOfType"](response)) - { - var responseDictionary=response; - if("error" in responseDictionary || "data" in responseDictionary || "errorCode" in responseDictionary) - if(!responseDictionary["error"]) - { - var formattedData=format ? format(responseDictionary["data"]) : responseDictionary["data"]; - asyncResult=$$t_B.createAsyncResult(formattedData,0,0,userContext,null) - } - else - { - var errorCode=responseDictionary["errorCode"]; - asyncResult=$$t_B.createAsyncResult(null,1,errorCode,userContext,null) - } - } - if(!asyncResult && resultCode) - asyncResult=$$t_B.createAsyncResult(null,1,9002,userContext,null); - callback(asyncResult) - } - }) - }, - invokeHostMethod: function(dispid, data, responseCallback) - { - if(64===this._officeAppContext$p$0["get_appName"]()) - { - var args={ApiParams: data}; - args["MethodData"]={ - ControlId: OSF._OfficeAppFactory["getId"](), - DispatchId: dispid - }; - args=window["OSF"]["DDA"]["OutlookAppOm"]["addAdditionalArgs"](dispid,args); - if(dispid===1) - this.get_clientEndPoint()["invoke"]("GetInitialData",responseCallback,args); - else - this.get_clientEndPoint()["invoke"]("ExecuteMethod",responseCallback,args) - } - else if(!this._isOwaOnlyMethod$p$0(dispid)) - { - var executeParameters=this.convertToOutlookParameters(dispid,data); - var $$t_B=this; - OSF.ClientHostController["execute"](dispid,executeParameters,function(nativeData, resultCode) - { - if(responseCallback) - { - var responseData=nativeData.toArray(); - var rawData=window["JSON"]["parse"](responseData[0]); - if(Object["isInstanceOfType"](rawData)) - { - var deserializedData=rawData; - if(responseData["length"] > 1 && responseData[1]) - { - deserializedData["error"]=true; - deserializedData["errorCode"]=responseData[1] - } - else - deserializedData["error"]=false; - responseCallback(resultCode,deserializedData) - } - else if(Number["isInstanceOfType"](rawData)) - { - var returnDict={}; - returnDict["error"]=true; - returnDict["errorCode"]=rawData; - responseCallback(resultCode,returnDict) - } - else - throw Error.notImplemented("Return data type from host must be Dictionary or int"); - } - }) - } - else if(responseCallback) - responseCallback(-2,null) - }, - _dictionaryToDate$i$0: function(input) - { - var retValue=new Date(input["year"],input["month"],input["date"],input["hours"],input["minutes"],input["seconds"],!input["milliseconds"] ? 0 : input["milliseconds"]); - if(window["isNaN"](retValue["getTime"]())) - throw Error.format(window["_u"]["ExtensibilityStrings"]["l_InvalidDate_Text"]); - return retValue - }, - _dateToDictionary$i$0: function(input) - { - var retValue={}; - retValue["month"]=input["getMonth"](); - retValue["date"]=input["getDate"](); - retValue["year"]=input["getFullYear"](); - retValue["hours"]=input["getHours"](); - retValue["minutes"]=input["getMinutes"](); - retValue["seconds"]=input["getSeconds"](); - retValue["milliseconds"]=input["getMilliseconds"](); - return retValue - }, - _isOwaOnlyMethod$p$0: function(dispId) - { - switch(dispId) - { - case 402: - case 401: - case 400: - case 403: - return true; - default: - return false - } - }, - isOutlook16OrGreater: function() - { - var hostVersion=this._initialData$p$0.get__hostVersion$i$0(); - var endIndex=0; - var majorVersionNumber=0; - if(hostVersion) - { - endIndex=hostVersion.indexOf("."); - majorVersionNumber=window["parseInt"](hostVersion.substring(0,endIndex)) - } - return majorVersionNumber >=16 - }, - convertToOutlookParameters: function(dispid, data) - { - var executeParameters=null; - var optionalParameters={}; - switch(dispid) - { - case 1: - case 2: - case 3: - case 14: - case 18: - case 26: - case 32: - case 41: - case 34: - break; - case 12: - optionalParameters["isRest"]=data["isRest"]; - break; - case 4: - var jsonProperty=window["JSON"]["stringify"](data["customProperties"]); - executeParameters=[jsonProperty]; - break; - case 5: - executeParameters=[data["body"]]; - break; - case 8: - case 9: - executeParameters=[data["itemId"]]; - break; - case 7: - executeParameters=[window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["requiredAttendees"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["optionalAttendees"]),data["start"],data["end"],data["location"],window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["resources"]),data["subject"],data["body"]]; - break; - case 44: - executeParameters=[window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["toRecipients"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["ccRecipients"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["bccRecipients"]),data["subject"],data["htmlBody"],data["attachments"]]; - break; - case 43: - executeParameters=[data["ewsIdOrEmail"]]; - break; - case 45: - executeParameters=[data["module"],data["queryString"]]; - break; - case 40: - executeParameters=[data["extensionId"],data["consentState"]]; - break; - case 11: - case 10: - executeParameters=[data["htmlBody"]]; - break; - case 31: - case 30: - executeParameters=[data["htmlBody"],data["attachments"]]; - break; - case 23: - case 13: - case 38: - case 29: - executeParameters=[data["data"],data["coercionType"]]; - break; - case 37: - case 28: - executeParameters=[data["coercionType"]]; - break; - case 17: - executeParameters=[data["subject"]]; - break; - case 15: - executeParameters=[data["recipientField"]]; - break; - case 22: - case 21: - executeParameters=[data["recipientField"],window["OSF"]["DDA"]["OutlookAppOm"]._convertComposeEmailDictionaryParameterForSetApi$p(data["recipientArray"])]; - break; - case 19: - executeParameters=[data["itemId"],data["name"]]; - break; - case 16: - executeParameters=[data["uri"],data["name"],data["isInline"]]; - break; - case 20: - executeParameters=[data["attachmentIndex"]]; - break; - case 25: - executeParameters=[data["TimeProperty"],data["time"]]; - break; - case 24: - executeParameters=[data["TimeProperty"]]; - break; - case 27: - executeParameters=[data["location"]]; - break; - case 33: - case 35: - executeParameters=[data["key"],data["type"],data["persistent"],data["message"],data["icon"]]; - break; - case 36: - executeParameters=[data["key"]]; - break; - default: - Sys.Debug.fail("Unexpected method dispid"); - break - } - if(dispid !==1) - { - var $$t_5; - this._additionalOutlookParams$p$0.updateOutlookExecuteParameters($$t_5={val: executeParameters},optionalParameters),executeParameters=$$t_5["val"] - } - return executeParameters - }, - _displayNewAppointmentFormApi$p$0: function(parameters) - { - var normalizedRequiredAttendees=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["requiredAttendees"],"requiredAttendees"); - var normalizedOptionalAttendees=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["optionalAttendees"],"optionalAttendees"); - window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["location"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxLocationLength$p,"location"); - window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["body"],0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"body"); - window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["subject"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p,"subject"); - if(!$h.ScriptHelpers.isNullOrUndefined(parameters["start"])) - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(parameters["start"],Date,"start"); - var startDateTime=parameters["start"]; - parameters["start"]=startDateTime["getTime"](); - if(!$h.ScriptHelpers.isNullOrUndefined(parameters["end"])) - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(parameters["end"],Date,"end"); - var endDateTime=parameters["end"]; - if(endDateTime < startDateTime) - throw Error.argumentOutOfRange("end",endDateTime,window["_u"]["ExtensibilityStrings"]["l_InvalidEventDates_Text"]); - parameters["end"]=endDateTime["getTime"]() - } - } - var updatedParameters=null; - if(normalizedRequiredAttendees || normalizedOptionalAttendees) - { - updatedParameters={}; - var $$dict_7=parameters; - for(var $$key_8 in $$dict_7) - { - var entry={ - key: $$key_8, - value: $$dict_7[$$key_8] - }; - updatedParameters[entry["key"]]=entry["value"] - } - if(normalizedRequiredAttendees) - updatedParameters["requiredAttendees"]=normalizedRequiredAttendees; - if(normalizedOptionalAttendees) - updatedParameters["optionalAttendees"]=normalizedOptionalAttendees - } - this.invokeHostMethod(7,updatedParameters || parameters,null) - }, - displayNewMessageFormApi: function(parameters) - { - var updatedParameters={}; - if(parameters) - { - var normalizedToRecipients=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["toRecipients"],"toRecipients"); - var normalizedCcRecipients=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["ccRecipients"],"ccRecipients"); - var normalizedBccRecipients=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["bccRecipients"],"bccRecipients"); - window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["htmlBody"],0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody"); - window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["subject"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p,"subject"); - var attachments=window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p(parameters); - var $$dict_7=parameters; - for(var $$key_8 in $$dict_7) - { - var entry={ - key: $$key_8, - value: $$dict_7[$$key_8] - }; - updatedParameters[entry["key"]]=entry["value"] - } - if(normalizedToRecipients) - updatedParameters["toRecipients"]=normalizedToRecipients; - if(normalizedCcRecipients) - updatedParameters["ccRecipients"]=normalizedCcRecipients; - if(normalizedBccRecipients) - updatedParameters["bccRecipients"]=normalizedBccRecipients; - if(attachments) - updatedParameters["attachments"]=window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p(attachments) - } - this.invokeHostMethod(44,updatedParameters || parameters,null) - }, - displayPersonaCardAsync: function(ewsIdOrEmail) - { - var args=[]; - for(var $$pai_3=1; $$pai_3 < arguments["length"];++$$pai_3) - args[$$pai_3 - 1]=arguments[$$pai_3]; - if($h.ScriptHelpers.isNullOrUndefined(ewsIdOrEmail)) - throw Error.argumentNull("ewsIdOrEmail"); - else if(ewsIdOrEmail==="") - throw Error.argument("ewsIdOrEmail","ewsIdOrEmail cannot be empty."); - var parameters=$h.CommonParameters.parse(args,false); - this._standardInvokeHostMethod$i$0(43,{ewsIdOrEmail: ewsIdOrEmail.trim()},null,parameters._asyncContext$p$0,parameters._callback$p$0) - }, - navigateToModuleAsync: function(module) - { - var args=[]; - for(var $$pai_5=1; $$pai_5 < arguments["length"];++$$pai_5) - args[$$pai_5 - 1]=arguments[$$pai_5]; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidModule$p(module); - var parameters=$h.CommonParameters.parse(args,false); - var updatedParameters={}; - if(module===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ModuleType"]["Addins"]) - { - var queryString=""; - if(parameters._options$p$0 && parameters._options$p$0["queryString"]) - queryString=parameters._options$p$0["queryString"]; - updatedParameters["queryString"]=queryString - } - updatedParameters["module"]=module; - this._standardInvokeHostMethod$i$0(45,updatedParameters,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }, - _initializeMethods$p$0: function() - { - var currentInstance=this; - if($h.Item["isInstanceOfType"](this._item$p$0) || this._hostItemType$p$0===6) - { - currentInstance["displayNewAppointmentForm"]=this.$$d__displayNewAppointmentFormApi$p$0; - currentInstance["displayNewMessageForm"]=this.$$d_displayNewMessageFormApi; - currentInstance["displayPersonaCardAsync"]=this.$$d_displayPersonaCardAsync; - currentInstance["navigateToModuleAsync"]=this.$$d_navigateToModuleAsync - } - }, - _getInitialDataResponseHandler$p$0: function(resultCode, data) - { - if(resultCode) - return; - this["initialize"](data); - this["displayName"]="mailbox"; - window.setTimeout(this.$$d__callAppReadyCallback$p$0,0) - }, - _callAppReadyCallback$p$0: function() - { - this._appReadyCallback$p$0() - }, - _invokeGetTokenMethodAsync$p$0: function(outlookDispid, data, methodName, callback, userContext) - { - if($h.ScriptHelpers.isNullOrUndefined(callback)) - throw Error.argumentNull("callback"); - var $$t_9=this; - this.invokeHostMethod(outlookDispid,data,function(resultCode, response) - { - var asyncResult; - if(resultCode) - asyncResult=$$t_9.createAsyncResult(null,1,9017,userContext,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode)); - else - { - var responseDictionary=response; - if(responseDictionary["wasSuccessful"]) - asyncResult=$$t_9.createAsyncResult(responseDictionary["token"],0,0,userContext,null); - else - asyncResult=$$t_9.createAsyncResult(null,1,responseDictionary["errorCode"],userContext,responseDictionary["errorMessage"]) - } - callback(asyncResult) - }) - }, - getItem: function() - { - return this._item$p$0 - }, - _getUserProfile$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0); - return this._userProfile$p$0 - }, - _getDiagnostics$p$0: function() - { - return this._diagnostics$p$0 - }, - _getEwsUrl$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0); - return this._initialData$p$0.get__ewsUrl$i$0() - }, - _getRestUrl$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0); - if(!this._initialData$p$0.get__restUrl$i$0()) - return null; - return this._initialData$p$0.get__restUrl$i$0() - }, - _findOffset$p$0: function(value) - { - var ranges=this._initialData$p$0.get__timeZoneOffsets$i$0(); - for(var r=0; r < ranges["length"]; r++) - { - var range=ranges[r]; - var start=window["parseInt"](range["start"]); - var end=window["parseInt"](range["end"]); - if(value["getTime"]() - start >=0 && value["getTime"]() - end < 0) - return window["parseInt"](range["offset"]) - } - throw Error.format(window["_u"]["ExtensibilityStrings"]["l_InvalidDate_Text"]); - }, - _areStringsLoaded$p$0: function() - { - var stringsLoaded=false; - try - { - stringsLoaded=!$h.ScriptHelpers.isNullOrUndefined(window["_u"]["ExtensibilityStrings"]["l_EwsRequestOversized_Text"]) - } - catch($$e_1){} - return stringsLoaded - }, - _loadLocalizedScript$p$0: function(stringLoadedCallback) - { - var url=null; - var baseUrl=""; - var scripts=document.getElementsByTagName("script"); - for(var i=scripts.length - 1; i >=0; i--) - { - var filename=null; - var attributes=scripts[i].attributes; - if(attributes) - { - var attribute=attributes.getNamedItem("src"); - if(attribute) - filename=attribute.value; - if(filename) - { - var debug=false; - filename=filename.toLowerCase(); - var officeIndex=filename.indexOf("office_strings.js"); - if(officeIndex < 0) - { - officeIndex=filename.indexOf("office_strings.debug.js"); - debug=true - } - if(officeIndex > 0 && officeIndex < filename.length) - { - url=filename.replace(debug ? "office_strings.debug.js" : "office_strings.js","outlook_strings.js"); - var languageUrl=filename.substring(0,officeIndex); - var lastIndexOfSlash=languageUrl.lastIndexOf("/",languageUrl.length - 2); - if(lastIndexOfSlash===-1) - lastIndexOfSlash=languageUrl.lastIndexOf("\\",languageUrl.length - 2); - if(lastIndexOfSlash !==-1 && languageUrl.length > lastIndexOfSlash+1) - baseUrl=languageUrl.substring(0,lastIndexOfSlash+1); - break - } - } - } - } - if(url) - { - var head=document.getElementsByTagName("head")[0]; - var scriptElement=null; - var $$t_H=this; - var scriptElementCallback=function() - { - if(stringLoadedCallback && (!scriptElement.readyState || scriptElement.readyState && (scriptElement.readyState==="loaded" || scriptElement.readyState==="complete"))) - { - scriptElement.onload=null; - scriptElement.onreadystatechange=null; - stringLoadedCallback() - } - }; - var $$t_I=this; - var failureCallback=function() - { - if(!$$t_I._areStringsLoaded$p$0()) - { - var fallbackUrl=baseUrl+"en-us/"+"outlook_strings.js"; - scriptElement.onload=null; - scriptElement.onreadystatechange=null; - scriptElement=$$t_I._createScriptElement$p$0(fallbackUrl); - scriptElement.onload=scriptElementCallback; - scriptElement.onreadystatechange=scriptElementCallback; - head.appendChild(scriptElement) - } - }; - scriptElement=this._createScriptElement$p$0(url); - scriptElement.onload=scriptElementCallback; - scriptElement.onreadystatechange=scriptElementCallback; - window.setTimeout(failureCallback,2e3); - head.appendChild(scriptElement) - } - }, - _createScriptElement$p$0: function(url) - { - var scriptElement=document.createElement("script"); - scriptElement.type="text/javascript"; - scriptElement.src=url; - return scriptElement - } - }; - OSF.DDA.OutlookAppOm.prototype.initialize=function(initialData) - { - if(!initialData) - { - this._additionalOutlookParams$p$0=new $h.AdditionalGlobalParameters(true); - this._initialData$p$0=null; - this._item$p$0=null; - return - } - var ItemTypeKey="itemType"; - this._initialData$p$0=new $h.InitialData(initialData); - this._hostItemType$p$0=initialData[ItemTypeKey]; - if(1===initialData[ItemTypeKey]) - this._item$p$0=new $h.Message(this._initialData$p$0); - else if(3===initialData[ItemTypeKey]) - this._item$p$0=new $h.MeetingRequest(this._initialData$p$0); - else if(2===initialData[ItemTypeKey]) - this._item$p$0=new $h.Appointment(this._initialData$p$0); - else if(4===initialData[ItemTypeKey]) - this._item$p$0=new $h.MessageCompose(this._initialData$p$0); - else if(5===initialData[ItemTypeKey]) - this._item$p$0=new $h.AppointmentCompose(this._initialData$p$0); - else if(6===initialData[ItemTypeKey]); - else - Sys.Debug.trace("Unexpected item type was received from the host."); - this._userProfile$p$0=new $h.UserProfile(this._initialData$p$0); - this._diagnostics$p$0=new $h.Diagnostics(this._initialData$p$0,this._officeAppContext$p$0["get_appName"]()); - var supportsAdditionalParameters=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() !==8 || this.isOutlook16OrGreater(); - this._additionalOutlookParams$p$0=new $h.AdditionalGlobalParameters(supportsAdditionalParameters); - if("itemNumber" in initialData) - this["setCurrentItemNumber"](initialData["itemNumber"]); - this._initializeMethods$p$0(); - $h.InitialData._defineReadOnlyProperty$i(this,"item",this.$$d_getItem); - $h.InitialData._defineReadOnlyProperty$i(this,"userProfile",this.$$d__getUserProfile$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"diagnostics",this.$$d__getDiagnostics$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"ewsUrl",this.$$d__getEwsUrl$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"restUrl",this.$$d__getRestUrl$p$0); - if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===64) - if(this._initialData$p$0.get__overrideWindowOpen$i$0()) - window.open=this.$$d_windowOpenOverrideHandler - }; - OSF.DDA.OutlookAppOm.prototype.makeEwsRequestAsync=function(data) - { - var args=[]; - for(var $$pai_5=1; $$pai_5 < arguments["length"];++$$pai_5) - args[$$pai_5 - 1]=arguments[$$pai_5]; - if($h.ScriptHelpers.isNullOrUndefined(data)) - throw Error.argumentNull("data"); - if(data.length > window["OSF"]["DDA"]["OutlookAppOm"]._maxEwsRequestSize$p) - throw Error.argument("data",window["_u"]["ExtensibilityStrings"]["l_EwsRequestOversized_Text"]); - this._throwOnMethodCallForInsufficientPermission$i$0(3,"makeEwsRequestAsync"); - var parameters=$h.CommonParameters.parse(args,true,true); - var ewsRequest=new $h.EwsRequest(parameters._asyncContext$p$0); - var $$t_4=this; - ewsRequest.onreadystatechange=function() - { - if(4===ewsRequest.get__requestState$i$1()) - parameters._callback$p$0(ewsRequest._asyncResult$p$0) - }; - ewsRequest.send(data) - }; - OSF.DDA.OutlookAppOm.prototype.recordDataPoint=function(data) - { - if($h.ScriptHelpers.isNullOrUndefined(data)) - throw Error.argumentNull("data"); - this.invokeHostMethod(402,data,null) - }; - OSF.DDA.OutlookAppOm.prototype.recordTrace=function(data) - { - if($h.ScriptHelpers.isNullOrUndefined(data)) - throw Error.argumentNull("data"); - this.invokeHostMethod(401,data,null) - }; - OSF.DDA.OutlookAppOm.prototype.trackCtq=function(data) - { - if($h.ScriptHelpers.isNullOrUndefined(data)) - throw Error.argumentNull("data"); - this.invokeHostMethod(400,data,null) - }; - OSF.DDA.OutlookAppOm.prototype.convertToLocalClientTime=function(timeValue) - { - var date=new Date(timeValue["getTime"]()); - var offset=date["getTimezoneOffset"]() * -1; - if(this._initialData$p$0 && this._initialData$p$0.get__timeZoneOffsets$i$0()) - { - date["setUTCMinutes"](date["getUTCMinutes"]() - offset); - offset=this._findOffset$p$0(date); - date["setUTCMinutes"](date["getUTCMinutes"]()+offset) - } - var retValue=this._dateToDictionary$i$0(date); - retValue["timezoneOffset"]=offset; - return retValue - }; - OSF.DDA.OutlookAppOm.prototype.convertToUtcClientTime=function(input) - { - var retValue=this._dictionaryToDate$i$0(input); - if(this._initialData$p$0 && this._initialData$p$0.get__timeZoneOffsets$i$0()) - { - var offset=this._findOffset$p$0(retValue); - retValue["setUTCMinutes"](retValue["getUTCMinutes"]() - offset); - offset=!input["timezoneOffset"] ? retValue["getTimezoneOffset"]() * -1 : input["timezoneOffset"]; - retValue["setUTCMinutes"](retValue["getUTCMinutes"]()+offset) - } - return retValue - }; - OSF.DDA.OutlookAppOm.prototype.convertToRestId=function(itemId, restVersion) - { - if(!itemId) - throw Error.argumentNull("itemId"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p(restVersion); - return itemId.replace(new RegExp("[/]","g"),"-").replace(new RegExp("[+]","g"),"_") - }; - OSF.DDA.OutlookAppOm.prototype.convertToEwsId=function(itemId, restVersion) - { - if(!itemId) - throw Error.argumentNull("itemId"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p(restVersion); - return itemId.replace(new RegExp("[-]","g"),"/").replace(new RegExp("[_]","g"),"+") - }; - OSF.DDA.OutlookAppOm.prototype.getUserIdentityTokenAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - this._throwOnMethodCallForInsufficientPermission$i$0(1,"getUserIdentityTokenAsync"); - var parameters=$h.CommonParameters.parse(args,true,true); - this._invokeGetTokenMethodAsync$p$0(2,null,"GetUserIdentityToken",parameters._callback$p$0,parameters._asyncContext$p$0) - }; - OSF.DDA.OutlookAppOm.prototype.getCallbackTokenAsync=function() - { - var args=[]; - for(var $$pai_7=0; $$pai_7 < arguments["length"];++$$pai_7) - args[$$pai_7]=arguments[$$pai_7]; - this._throwOnMethodCallForInsufficientPermission$i$0(1,"getCallbackTokenAsync"); - var parameters=$h.CommonParameters.parse(args,true,true); - var options={}; - if(parameters._options$p$0) - for(var $$arr_3=Object["keys"](parameters._options$p$0), $$len_4=$$arr_3.length, $$idx_5=0; $$idx_5 < $$len_4;++$$idx_5) - { - var key=$$arr_3[$$idx_5]; - options[key]=parameters._options$p$0[key] - } - if(!("isRest" in options)) - options["isRest"]=false; - this._invokeGetTokenMethodAsync$p$0(12,options,"GetCallbackToken",parameters._callback$p$0,parameters._asyncContext$p$0) - }; - OSF.DDA.OutlookAppOm.prototype.displayMessageForm=function(itemId) - { - if($h.ScriptHelpers.isNullOrUndefined(itemId)) - throw Error.argumentNull("itemId"); - this.invokeHostMethod(8,{itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId)},null) - }; - OSF.DDA.OutlookAppOm.prototype.displayAppointmentForm=function(itemId) - { - if($h.ScriptHelpers.isNullOrUndefined(itemId)) - throw Error.argumentNull("itemId"); - this.invokeHostMethod(9,{itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId)},null) - }; - OSF.DDA.OutlookAppOm.prototype.RegisterConsentAsync=function(consentState) - { - if(consentState !==2 && consentState !==1 && consentState) - throw Error.argumentOutOfRange("consentState"); - var parameters={}; - parameters["consentState"]=consentState["toString"](); - parameters["extensionId"]=this["GetExtensionId"](); - this.invokeHostMethod(40,parameters,null) - }; - OSF.DDA.OutlookAppOm.prototype.CloseApp=function() - { - this.invokeHostMethod(42,null,null) - }; - OSF.DDA.OutlookAppOm.prototype.GetIsRead=function() - { - return this._initialData$p$0.get__isRead$i$0() - }; - OSF.DDA.OutlookAppOm.prototype.GetEndNodeUrl=function() - { - return this._initialData$p$0.get__endNodeUrl$i$0() - }; - OSF.DDA.OutlookAppOm.prototype.GetConsentMetadata=function() - { - return this._initialData$p$0.get__consentMetadata$i$0() - }; - OSF.DDA.OutlookAppOm.prototype.GetEntryPointUrl=function() - { - return this._initialData$p$0.get__entryPointUrl$i$0() - }; - OSF.DDA.OutlookAppOm.prototype.GetMarketplaceContentMarket=function() - { - return this._initialData$p$0.get__marketplaceContentMarket$i$0() - }; - OSF.DDA.OutlookAppOm.prototype.GetMarketplaceAssetId=function() - { - return this._initialData$p$0.get__marketplaceAssetId$i$0() - }; - OSF.DDA.OutlookAppOm.prototype.GetExtensionId=function() - { - return this._initialData$p$0.get__extensionId$i$0() - }; - OSF.DDA.OutlookAppOm.prototype.setCurrentItemNumber=function(itemNumber) - { - this._additionalOutlookParams$p$0.setCurrentItemNumber(itemNumber) - }; - window["OSF"]["DDA"]["Settings"]=OSF.DDA.Settings=function(data) - { - this._rawData$p$0=data - }; - window["OSF"]["DDA"]["Settings"]._convertFromRawSettings$p=function(rawSettings) - { - if(!rawSettings) - return{}; - if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===8 || window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===65536 || window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===4194304) - { - var outlookSettings=rawSettings["SettingsKey"]; - if(outlookSettings) - return OSF.DDA.SettingsManager["deserializeSettings"](outlookSettings) - } - return rawSettings - }; - OSF.DDA.Settings.prototype={ - _rawData$p$0: null, - _settingsData$p$0: null, - get__data$p$0: function() - { - if(!this._settingsData$p$0) - { - this._settingsData$p$0=window["OSF"]["DDA"]["Settings"]._convertFromRawSettings$p(this._rawData$p$0); - this._rawData$p$0=null - } - return this._settingsData$p$0 - }, - _saveSettingsForOutlook$p$0: function(callback, userContext) - { - var storedException=null; - try - { - var serializedSettings=OSF.DDA.SettingsManager["serializeSettings"](this.get__data$p$0()); - var jsonSettings=window["JSON"]["stringify"](serializedSettings); - var settingsObjectToSave={SettingsKey: jsonSettings}; - OSF.DDA.ClientSettingsManager["write"](settingsObjectToSave) - } - catch(ex) - { - storedException=ex - } - if(callback) - { - var asyncResult; - if(storedException) - asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9019,userContext,storedException["message"]); - else - asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,0,0,userContext,null); - callback(asyncResult) - } - }, - _saveSettingsForOwa$p$0: function(callback, userContext) - { - var serializedSettings=OSF.DDA.SettingsManager["serializeSettings"](this.get__data$p$0()); - var $$t_7=this; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.invokeHostMethod(404,[serializedSettings],function(resultCode, response) - { - if(callback) - { - var asyncResult; - if(resultCode) - asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9017,userContext,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode)); - else - { - var responseDictionary=response; - if(!responseDictionary["error"]) - asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,0,0,userContext,null); - else - asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9019,userContext,responseDictionary["errorMessage"]) - } - callback(asyncResult) - } - }) - } - }; - OSF.DDA.Settings.prototype.get=function(name) - { - return this.get__data$p$0()[name] - }; - OSF.DDA.Settings.prototype.set=function(name, value) - { - this.get__data$p$0()[name]=value - }; - OSF.DDA.Settings.prototype.remove=function(name) - { - delete this.get__data$p$0()[name] - }; - OSF.DDA.Settings.prototype.saveAsync=function() - { - var args=[]; - for(var $$pai_4=0; $$pai_4 < arguments["length"];++$$pai_4) - args[$$pai_4]=arguments[$$pai_4]; - var commonParameters=$h.CommonParameters.parse(args,false); - if(window["JSON"]["stringify"](OSF.DDA.SettingsManager["serializeSettings"](this.get__data$p$0())).length > 32768) - { - var asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9019,commonParameters._asyncContext$p$0,""); - var $$t_3=this; - window.setTimeout(function() - { - commonParameters._callback$p$0(asyncResult) - },0); - return - } - if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===64) - this._saveSettingsForOwa$p$0(commonParameters._callback$p$0,commonParameters._asyncContext$p$0); - else - this._saveSettingsForOutlook$p$0(commonParameters._callback$p$0,commonParameters._asyncContext$p$0) - }; - Type.registerNamespace("$h"); - var $h=window["$h"] || {}; - Type.registerNamespace("Office.cast"); - var Office=window["Office"] || {}; - Office.cast=Office.cast || {}; - $h.AdditionalGlobalParameters=function(supported) - { - this._parameterBlobSupported$p$0=supported; - this._itemNumber$p$0=0 - }; - $h.AdditionalGlobalParameters.prototype={ - _parameterBlobSupported$p$0: false, - _itemNumber$p$0: 0, - setCurrentItemNumber: function(itemNumber) - { - if(itemNumber > 0) - this._itemNumber$p$0=itemNumber - }, - get_itemNumber: function() - { - return this._itemNumber$p$0 - }, - updateOutlookExecuteParameters: function(executeParameters, additionalApiParameters) - { - if(this._parameterBlobSupported$p$0) - { - if(this._itemNumber$p$0 > 0) - additionalApiParameters["itemNumber"]=this._itemNumber$p$0["toString"](); - if(!Object["keys"](additionalApiParameters)["length"]) - return; - if(!executeParameters["val"]) - executeParameters["val"]=[]; - executeParameters["val"]["push"](window["JSON"]["stringify"](additionalApiParameters)) - } - } - }; - $h.Appointment=function(dataDictionary) - { - this.$$d__getOrganizer$p$2=Function.createDelegate(this,this._getOrganizer$p$2); - this.$$d__getNormalizedSubject$p$2=Function.createDelegate(this,this._getNormalizedSubject$p$2); - this.$$d__getSubject$p$2=Function.createDelegate(this,this._getSubject$p$2); - this.$$d__getResources$p$2=Function.createDelegate(this,this._getResources$p$2); - this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2); - this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2); - this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2); - this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2); - this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2); - $h.Appointment["initializeBase"](this,[dataDictionary]); - $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"resources",this.$$d__getResources$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"organizer",this.$$d__getOrganizer$p$2) - }; - $h.Appointment.prototype={ - getItemType: function() - { - return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Appointment"] - }, - _getStart$p$2: function() - { - return this._data$p$0.get__start$i$0() - }, - _getEnd$p$2: function() - { - return this._data$p$0.get__end$i$0() - }, - _getLocation$p$2: function() - { - return this._data$p$0.get__location$i$0() - }, - _getOptionalAttendees$p$2: function() - { - return this._data$p$0.get__cc$i$0() - }, - _getRequiredAttendees$p$2: function() - { - return this._data$p$0.get__to$i$0() - }, - _getResources$p$2: function() - { - return this._data$p$0.get__resources$i$0() - }, - _getSubject$p$2: function() - { - return this._data$p$0.get__subject$i$0() - }, - _getNormalizedSubject$p$2: function() - { - return this._data$p$0.get__normalizedSubject$i$0() - }, - _getOrganizer$p$2: function() - { - return this._data$p$0.get__organizer$i$0() - } - }; - $h.Appointment.prototype.getEntities=function() - { - return this._data$p$0._getEntities$i$0() - }; - $h.Appointment.prototype.getEntitiesByType=function(entityType) - { - return this._data$p$0._getEntitiesByType$i$0(entityType) - }; - $h.Appointment.prototype.getSelectedEntities=function() - { - return this._data$p$0._getSelectedEntities$i$0() - }; - $h.Appointment.prototype.getRegExMatches=function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches"); - return this._data$p$0._getRegExMatches$i$0() - }; - $h.Appointment.prototype.getFilteredEntitiesByName=function(name) - { - return this._data$p$0._getFilteredEntitiesByName$i$0(name) - }; - $h.Appointment.prototype.getRegExMatchesByName=function(name) - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName"); - return this._data$p$0._getRegExMatchesByName$i$0(name) - }; - $h.Appointment.prototype.getSelectedRegExMatches=function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedRegExMatches"); - return this._data$p$0._getSelectedRegExMatches$i$0() - }; - $h.Appointment.prototype.displayReplyForm=function(obj) - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyForm$i$0(obj) - }; - $h.Appointment.prototype.displayReplyAllForm=function(obj) - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyAllForm$i$0(obj) - }; - $h.AppointmentCompose=function(data) - { - this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2); - this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2); - this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2); - this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2); - this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2); - $h.AppointmentCompose["initializeBase"](this,[data]); - $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2) - }; - $h.AppointmentCompose.prototype={ - _requiredAttendees$p$2: null, - _optionalAttendees$p$2: null, - _start$p$2: null, - _end$p$2: null, - _location$p$2: null, - getItemType: function() - { - return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Appointment"] - }, - _getRequiredAttendees$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._requiredAttendees$p$2) - this._requiredAttendees$p$2=new $h.ComposeRecipient(0,"requiredAttendees"); - return this._requiredAttendees$p$2 - }, - _getOptionalAttendees$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._optionalAttendees$p$2) - this._optionalAttendees$p$2=new $h.ComposeRecipient(1,"optionalAttendees"); - return this._optionalAttendees$p$2 - }, - _getStart$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._start$p$2) - this._start$p$2=new $h.ComposeTime(1); - return this._start$p$2 - }, - _getEnd$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._end$p$2) - this._end$p$2=new $h.ComposeTime(2); - return this._end$p$2 - }, - _getLocation$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._location$p$2) - this._location$p$2=new $h.ComposeLocation; - return this._location$p$2 - } - }; - $h.AttachmentConstants=function(){}; - $h.AttachmentDetails=function(data) - { - this.$$d__getIsInline$p$0=Function.createDelegate(this,this._getIsInline$p$0); - this.$$d__getAttachmentType$p$0=Function.createDelegate(this,this._getAttachmentType$p$0); - this.$$d__getSize$p$0=Function.createDelegate(this,this._getSize$p$0); - this.$$d__getContentType$p$0=Function.createDelegate(this,this._getContentType$p$0); - this.$$d__getName$p$0=Function.createDelegate(this,this._getName$p$0); - this.$$d__getId$p$0=Function.createDelegate(this,this._getId$p$0); - this._data$p$0=data; - $h.InitialData._defineReadOnlyProperty$i(this,"id",this.$$d__getId$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"name",this.$$d__getName$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"contentType",this.$$d__getContentType$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"size",this.$$d__getSize$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"attachmentType",this.$$d__getAttachmentType$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"isInline",this.$$d__getIsInline$p$0) - }; - $h.AttachmentDetails.prototype={ - _data$p$0: null, - _getId$p$0: function() - { - return this._data$p$0["id"] - }, - _getName$p$0: function() - { - return this._data$p$0["name"] - }, - _getContentType$p$0: function() - { - return this._data$p$0["contentType"] - }, - _getSize$p$0: function() - { - return this._data$p$0["size"] - }, - _getAttachmentType$p$0: function() - { - var response=this._data$p$0["attachmentType"]; - return response < $h.AttachmentDetails._attachmentTypeMap$p["length"] ? $h.AttachmentDetails._attachmentTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["File"] - }, - _getIsInline$p$0: function() - { - return this._data$p$0["isInline"] - } - }; - $h.Body=function(){}; - $h.Body._tryMapToHostCoercionType$i=function(coercionType, hostCoercionType) - { - hostCoercionType["val"]=undefined; - if(coercionType===window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Html"]) - hostCoercionType["val"]=3; - else if(coercionType===window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Text"]) - hostCoercionType["val"]=0; - else - return false; - return true - }; - $h.Body.prototype.getAsync=function(coercionType) - { - var args=[]; - for(var $$pai_7=1; $$pai_7 < arguments["length"];++$$pai_7) - args[$$pai_7 - 1]=arguments[$$pai_7]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"body.getAsync"); - var commonParameters=$h.CommonParameters.parse(args,true); - var hostCoercionType; - var $$t_5, - $$t_6; - if(!($$t_6=$h.Body._tryMapToHostCoercionType$i(coercionType,$$t_5={val: hostCoercionType}),hostCoercionType=$$t_5["val"],$$t_6)) - throw Error.argument("coercionType"); - var dataToHost={coercionType: hostCoercionType}; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(37,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.ComposeBody=function() - { - $h.ComposeBody["initializeBase"](this) - }; - $h.ComposeBody._createParameterDictionaryToHost$i=function(data, parameters) - { - var dataToHost={data: data}; - if(parameters._options$p$0 && parameters._options$p$0["hasOwnProperty"]("coercionType") && !$h.ScriptHelpers.isNull(parameters._options$p$0["coercionType"])) - { - var hostCoercionType; - var $$t_4, - $$t_5; - if(!($$t_5=$h.Body._tryMapToHostCoercionType$i(parameters._options$p$0["coercionType"],$$t_4={val: hostCoercionType}),hostCoercionType=$$t_4["val"],$$t_5)) - { - if(parameters._callback$p$0) - parameters._callback$p$0(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,1e3,parameters._asyncContext$p$0,null)); - return null - } - dataToHost["coercionType"]=hostCoercionType - } - else - dataToHost["coercionType"]=0; - return dataToHost - }; - $h.ComposeBody.prototype.getTypeAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"body.getTypeAsync"); - var parameters=$h.CommonParameters.parse(args,true); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(14,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeBody.prototype.setSelectedDataAsync=function(data) - { - var args=[]; - for(var $$pai_4=1; $$pai_4 < arguments["length"];++$$pai_4) - args[$$pai_4 - 1]=arguments[$$pai_4]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.setSelectedDataAsync"); - var parameters=$h.CommonParameters.parse(args,false); - if(!String["isInstanceOfType"](data)) - throw Error.argumentType("data",Object["getType"](data),String); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); - var dataToHost=$h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); - if(!dataToHost) - return; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(13,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeBody.prototype.prependAsync=function(data) - { - var args=[]; - for(var $$pai_4=1; $$pai_4 < arguments["length"];++$$pai_4) - args[$$pai_4 - 1]=arguments[$$pai_4]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.prependAsync"); - var parameters=$h.CommonParameters.parse(args,false); - if(!String["isInstanceOfType"](data)) - throw Error.argumentType("data",Object["getType"](data),String); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); - var dataToHost=$h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); - if(!dataToHost) - return; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(23,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeBody.prototype.setAsync=function(data) - { - var args=[]; - for(var $$pai_4=1; $$pai_4 < arguments["length"];++$$pai_4) - args[$$pai_4 - 1]=arguments[$$pai_4]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.setAsync"); - var parameters=$h.CommonParameters.parse(args,false); - if(!String["isInstanceOfType"](data)) - throw Error.argumentType("data",Object["getType"](data),String); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); - var dataToHost=$h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); - if(!dataToHost) - return; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(38,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeItem=function(data) - { - this.$$d__getBody$p$1=Function.createDelegate(this,this._getBody$p$1); - this.$$d__getSubject$p$1=Function.createDelegate(this,this._getSubject$p$1); - $h.ComposeItem["initializeBase"](this,[data]); - $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$1); - $h.InitialData._defineReadOnlyProperty$i(this,"body",this.$$d__getBody$p$1) - }; - $h.ComposeItem.prototype={ - _subject$p$1: null, - _body$p$1: null, - _getBody$p$1: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._body$p$1) - this._body$p$1=new $h.ComposeBody; - return this._body$p$1 - }, - _getSubject$p$1: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._subject$p$1) - this._subject$p$1=new $h.ComposeSubject; - return this._subject$p$1 - } - }; - $h.ComposeItem.prototype.addFileAttachmentAsync=function(uri, attachmentName) - { - var args=[]; - for(var $$pai_6=2; $$pai_6 < arguments["length"];++$$pai_6) - args[$$pai_6 - 2]=arguments[$$pai_6]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"addFileAttachmentAsync"); - if(!$h.ScriptHelpers.isNonEmptyString(uri)) - throw Error.argument("uri"); - if(!$h.ScriptHelpers.isNonEmptyString(attachmentName)) - throw Error.argument("attachmentName"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(uri.length,0,2048,"uri"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentName.length,0,255,"attachmentName"); - var commonParameters=$h.CommonParameters.parse(args,false); - var isInline=false; - if(!$h.ScriptHelpers.isNull(commonParameters._options$p$0)) - isInline=$h.ScriptHelpers.isValueTrue(commonParameters._options$p$0["isInline"]); - var parameters={ - uri: uri, - name: attachmentName, - isInline: isInline, - __timeout__: 6e5 - }; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(16,parameters,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.ComposeItem.prototype.addItemAttachmentAsync=function(itemId, attachmentName) - { - var args=[]; - for(var $$pai_5=2; $$pai_5 < arguments["length"];++$$pai_5) - args[$$pai_5 - 2]=arguments[$$pai_5]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"addItemAttachmentAsync"); - if(!$h.ScriptHelpers.isNonEmptyString(itemId)) - throw Error.argument("itemId"); - if(!$h.ScriptHelpers.isNonEmptyString(attachmentName)) - throw Error.argument("attachmentName"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(itemId.length,0,200,"itemId"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentName.length,0,255,"attachmentName"); - var commonParameters=$h.CommonParameters.parse(args,false); - var parameters={ - itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId), - name: attachmentName, - __timeout__: 6e5 - }; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(19,parameters,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.ComposeItem.prototype.removeAttachmentAsync=function(attachmentId) - { - var args=[]; - for(var $$pai_3=1; $$pai_3 < arguments["length"];++$$pai_3) - args[$$pai_3 - 1]=arguments[$$pai_3]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"removeAttachmentAsync"); - if(!$h.ScriptHelpers.isNonEmptyString(attachmentId)) - throw Error.argument("attachmentId"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentId.length,0,200,"attachmentId"); - var commonParameters=$h.CommonParameters.parse(args,false); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(20,{attachmentIndex: attachmentId},null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.ComposeItem.prototype.getSelectedDataAsync=function(coercionType) - { - var args=[]; - for(var $$pai_7=1; $$pai_7 < arguments["length"];++$$pai_7) - args[$$pai_7 - 1]=arguments[$$pai_7]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedDataAsync"); - var commonParameters=$h.CommonParameters.parse(args,true); - var hostCoercionType; - var $$t_5, - $$t_6; - if(coercionType !==window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Html"] && coercionType !==window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Text"] || !($$t_6=$h.Body._tryMapToHostCoercionType$i(coercionType,$$t_5={val: hostCoercionType}),hostCoercionType=$$t_5["val"],$$t_6)) - throw Error.argument("coercionType"); - var dataToHost={coercionType: hostCoercionType}; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(28,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.ComposeItem.prototype.setSelectedDataAsync=function(data) - { - var args=[]; - for(var $$pai_4=1; $$pai_4 < arguments["length"];++$$pai_4) - args[$$pai_4 - 1]=arguments[$$pai_4]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"setSelectedDataAsync"); - var parameters=$h.CommonParameters.parse(args,false); - if(!String["isInstanceOfType"](data)) - throw Error.argumentType("data",Object["getType"](data),String); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); - var dataToHost=$h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); - if(!dataToHost) - return; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(29,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeItem.prototype.close=function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(41,null,null,null,null) - }; - $h.ComposeItem.prototype.saveAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"saveAsync"); - var parameters=$h.CommonParameters.parse(args,false); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(32,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeRecipient=function(type, propertyName) - { - this._type$p$0=type; - this._propertyName$p$0=propertyName - }; - $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p=function(displayName, emailAddress) - { - if(!displayName && !emailAddress) - throw Error.argument("recipients"); - if(displayName && displayName.length > 255) - throw Error.argumentOutOfRange("recipients",displayName.length,window["_u"]["ExtensibilityStrings"]["l_DisplayNameTooLong_Text"]); - if(emailAddress && emailAddress.length > 571) - throw Error.argumentOutOfRange("recipients",emailAddress.length,window["_u"]["ExtensibilityStrings"]["l_EmailAddressTooLong_Text"]); - }; - $h.ComposeRecipient._getAsyncFormatter$p=function(rawInput) - { - var input=rawInput; - var output=[]; - for(var i=0; i < input["length"]; i++) - { - var email=new $h.EmailAddressDetails(input[i]); - output[i]=email - } - return output - }; - $h.ComposeRecipient._createEmailDictionaryForHost$p=function(address, name) - { - return{ - address: address, - name: name - } - }; - $h.ComposeRecipient.prototype={ - _propertyName$p$0: null, - _type$p$0: 0, - setAddHelper: function(recipients, args, isSet) - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(recipients["length"],0,100,"recipients"); - var parameters=$h.CommonParameters.parse(args,false); - var recipientData=[]; - if(Array["isInstanceOfType"](recipients)) - for(var i=0; i < recipients["length"]; i++) - if(String["isInstanceOfType"](recipients[i])) - { - $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(recipients[i],recipients[i]); - recipientData[i]=$h.ComposeRecipient._createEmailDictionaryForHost$p(recipients[i],recipients[i]) - } - else if($h.EmailAddressDetails["isInstanceOfType"](recipients[i])) - { - var address=recipients[i]; - $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(address["displayName"],address["emailAddress"]); - recipientData[i]=$h.ComposeRecipient._createEmailDictionaryForHost$p(address["emailAddress"],address["displayName"]) - } - else if(Object["isInstanceOfType"](recipients[i])) - { - var input=recipients[i]; - var emailAddress=input["emailAddress"]; - var displayName=input["displayName"]; - $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(displayName,emailAddress); - recipientData[i]=$h.ComposeRecipient._createEmailDictionaryForHost$p(emailAddress,displayName) - } - else - throw Error.argument("recipients"); - else - throw Error.argument("recipients"); - var $$t_B=this; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(isSet ? 21 : 22,{ - recipientField: this._type$p$0, - recipientArray: recipientData - },function(rawInput) - { - return rawInput - },parameters._asyncContext$p$0,parameters._callback$p$0) - } - }; - $h.ComposeRecipient.prototype.getAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - var parameters=$h.CommonParameters.parse(args,true); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,this._propertyName$p$0+".getAsync"); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(15,{recipientField: this._type$p$0},$h.ComposeRecipient._getAsyncFormatter$p,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeRecipient.prototype.setAsync=function(recipients) - { - var args=[]; - for(var $$pai_2=1; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2 - 1]=arguments[$$pai_2]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._propertyName$p$0+".setAsync"); - this.setAddHelper(recipients,args,true) - }; - $h.ComposeRecipient.prototype.addAsync=function(recipients) - { - var args=[]; - for(var $$pai_2=1; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2 - 1]=arguments[$$pai_2]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._propertyName$p$0+".addAsync"); - this.setAddHelper(recipients,args,false) - }; - $h.ComposeRecipient.RecipientField=function(){}; - $h.ComposeRecipient.RecipientField.prototype={ - to: 0, - cc: 1, - bcc: 2, - requiredAttendees: 0, - optionalAttendees: 1 - }; - $h.ComposeRecipient.RecipientField["registerEnum"]("$h.ComposeRecipient.RecipientField",false); - $h.ComposeLocation=function(){}; - $h.ComposeLocation.prototype.getAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"location.getAsync"); - var parameters=$h.CommonParameters.parse(args,true); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(26,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeLocation.prototype.setAsync=function(location) - { - var args=[]; - for(var $$pai_3=1; $$pai_3 < arguments["length"];++$$pai_3) - args[$$pai_3 - 1]=arguments[$$pai_3]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"location.setAsync"); - var parameters=$h.CommonParameters.parse(args,false); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(location.length,0,255,"location"); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(27,{location: location},null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeSubject=function(){}; - $h.ComposeSubject.prototype.getAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - var parameters=$h.CommonParameters.parse(args,true); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"subject.getAsync"); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(18,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeSubject.prototype.setAsync=function(data) - { - var args=[]; - for(var $$pai_3=1; $$pai_3 < arguments["length"];++$$pai_3) - args[$$pai_3 - 1]=arguments[$$pai_3]; - var parameters=$h.CommonParameters.parse(args,false); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"subject.setAsync"); - if(!String["isInstanceOfType"](data)) - throw Error.argument("data"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,255,"data"); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(17,{subject: data},null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeTime=function(type) - { - this.$$d__ticksToDateFormatter$p$0=Function.createDelegate(this,this._ticksToDateFormatter$p$0); - this._timeType$p$0=type - }; - $h.ComposeTime.prototype={ - _timeType$p$0: 0, - _ticksToDateFormatter$p$0: function(rawInput) - { - var ticks=rawInput; - return new Date(ticks) - }, - _getPropertyName$p$0: function() - { - return this._timeType$p$0===1 ? "start" : "end" - } - }; - $h.ComposeTime.prototype.getAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,this._getPropertyName$p$0()+".getAsync"); - var parameters=$h.CommonParameters.parse(args,true); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(24,{TimeProperty: this._timeType$p$0},this.$$d__ticksToDateFormatter$p$0,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeTime.prototype.setAsync=function(dateTime) - { - var args=[]; - for(var $$pai_3=1; $$pai_3 < arguments["length"];++$$pai_3) - args[$$pai_3 - 1]=arguments[$$pai_3]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._getPropertyName$p$0()+".setAsync"); - if(!Date["isInstanceOfType"](dateTime)) - throw Error.argumentType("dateTime",Object["getType"](dateTime),Date); - if(window["isNaN"](dateTime["getTime"]())) - throw Error.argument("dateTime"); - if(dateTime["getTime"]() < -864e13 || dateTime["getTime"]() > 864e13) - throw Error.argumentOutOfRange("dateTime"); - var parameters=$h.CommonParameters.parse(args,false); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(25,{ - TimeProperty: this._timeType$p$0, - time: dateTime["getTime"]() - },null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeTime.TimeType=function(){}; - $h.ComposeTime.TimeType.prototype={ - start: 1, - end: 2 - }; - $h.ComposeTime.TimeType["registerEnum"]("$h.ComposeTime.TimeType",false); - $h.Contact=function(data) - { - this.$$d__getContactString$p$0=Function.createDelegate(this,this._getContactString$p$0); - this.$$d__getAddresses$p$0=Function.createDelegate(this,this._getAddresses$p$0); - this.$$d__getUrls$p$0=Function.createDelegate(this,this._getUrls$p$0); - this.$$d__getEmailAddresses$p$0=Function.createDelegate(this,this._getEmailAddresses$p$0); - this.$$d__getPhoneNumbers$p$0=Function.createDelegate(this,this._getPhoneNumbers$p$0); - this.$$d__getBusinessName$p$0=Function.createDelegate(this,this._getBusinessName$p$0); - this.$$d__getPersonName$p$0=Function.createDelegate(this,this._getPersonName$p$0); - this._data$p$0=data; - $h.InitialData._defineReadOnlyProperty$i(this,"personName",this.$$d__getPersonName$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"businessName",this.$$d__getBusinessName$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"contactString",this.$$d__getContactString$p$0) - }; - $h.Contact.prototype={ - _data$p$0: null, - _phoneNumbers$p$0: null, - _getPersonName$p$0: function() - { - return this._data$p$0["PersonName"] - }, - _getBusinessName$p$0: function() - { - return this._data$p$0["BusinessName"] - }, - _getAddresses$p$0: function() - { - return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses") - }, - _getEmailAddresses$p$0: function() - { - return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses") - }, - _getUrls$p$0: function() - { - return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls") - }, - _getPhoneNumbers$p$0: function() - { - if(!this._phoneNumbers$p$0) - { - var $$t_1=this; - this._phoneNumbers$p$0=$h.Entities._getExtractedObjects$i($h.PhoneNumber,this._data$p$0,"PhoneNumbers",function(data) - { - return new $h.PhoneNumber(data) - }) - } - return this._phoneNumbers$p$0 - }, - _getContactString$p$0: function() - { - return this._data$p$0["ContactString"] - } - }; - $h.CustomProperties=function(data) - { - if($h.ScriptHelpers.isNullOrUndefined(data)) - throw Error.argumentNull("data"); - if(Array["isInstanceOfType"](data)) - { - var customPropertiesArray=data; - if(customPropertiesArray["length"] > 0) - this._data$p$0=customPropertiesArray[0]; - else - throw Error.argument("data"); - } - else - this._data$p$0=data - }; - $h.CustomProperties.prototype={_data$p$0: null}; - $h.CustomProperties.prototype.get=function(name) - { - var value=this._data$p$0[name]; - if(typeof value==="string") - { - var valueString=value; - if(valueString.length > 6 && valueString.startsWith("Date(") && valueString.endsWith(")")) - { - var ticksString=valueString.substring(5,valueString.length - 1); - var ticks=window["parseInt"](ticksString); - if(!window["isNaN"](ticks)) - { - var dateTimeValue=new Date(ticks); - if(dateTimeValue) - value=dateTimeValue - } - } - } - return value - }; - $h.CustomProperties.prototype.set=function(name, value) - { - if(window["OSF"]["OUtil"]["isDate"](value)) - value="Date("+value["getTime"]()+")"; - this._data$p$0[name]=value - }; - $h.CustomProperties.prototype.remove=function(name) - { - delete this._data$p$0[name] - }; - $h.CustomProperties.prototype.saveAsync=function() - { - var args=[]; - for(var $$pai_4=0; $$pai_4 < arguments["length"];++$$pai_4) - args[$$pai_4]=arguments[$$pai_4]; - var MaxCustomPropertiesLength=2500; - if(window["JSON"]["stringify"](this._data$p$0).length > MaxCustomPropertiesLength) - throw Error.argument(); - var parameters=$h.CommonParameters.parse(args,false,true); - var saveCustomProperties=new $h.SaveDictionaryRequest(parameters._callback$p$0,parameters._asyncContext$p$0); - saveCustomProperties._sendRequest$i$0(4,"SaveCustomProperties",{customProperties: this._data$p$0}) - }; - $h.Diagnostics=function(data, appName) - { - this.$$d__getOwaView$p$0=Function.createDelegate(this,this._getOwaView$p$0); - this.$$d__getHostVersion$p$0=Function.createDelegate(this,this._getHostVersion$p$0); - this.$$d__getHostName$p$0=Function.createDelegate(this,this._getHostName$p$0); - this._data$p$0=data; - this._appName$p$0=appName; - $h.InitialData._defineReadOnlyProperty$i(this,"hostName",this.$$d__getHostName$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"hostVersion",this.$$d__getHostVersion$p$0); - if(64===this._appName$p$0) - $h.InitialData._defineReadOnlyProperty$i(this,"OWAView",this.$$d__getOwaView$p$0) - }; - $h.Diagnostics.prototype={ - _data$p$0: null, - _appName$p$0: 0, - _getHostName$p$0: function() - { - switch(this._appName$p$0) - { - case 8: - return"Outlook"; - case 64: - return"OutlookWebApp"; - case 65536: - return"OutlookIOS"; - case 4194304: - return"OutlookAndroid"; - default: - return null - } - }, - _getHostVersion$p$0: function() - { - return this._data$p$0.get__hostVersion$i$0() - }, - _getOwaView$p$0: function() - { - return this._data$p$0.get__owaView$i$0() - } - }; - $h.EmailAddressDetails=function(data) - { - this.$$d__getRecipientType$p$0=Function.createDelegate(this,this._getRecipientType$p$0); - this.$$d__getAppointmentResponse$p$0=Function.createDelegate(this,this._getAppointmentResponse$p$0); - this.$$d__getDisplayName$p$0=Function.createDelegate(this,this._getDisplayName$p$0); - this.$$d__getEmailAddress$p$0=Function.createDelegate(this,this._getEmailAddress$p$0); - this._data$p$0=data; - $h.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0); - if($h.ScriptHelpers.dictionaryContainsKey(data,"appointmentResponse")) - $h.InitialData._defineReadOnlyProperty$i(this,"appointmentResponse",this.$$d__getAppointmentResponse$p$0); - if($h.ScriptHelpers.dictionaryContainsKey(data,"recipientType")) - $h.InitialData._defineReadOnlyProperty$i(this,"recipientType",this.$$d__getRecipientType$p$0) - }; - $h.EmailAddressDetails._createFromEmailUserDictionary$i=function(data) - { - var emailAddressDetailsDictionary={}; - var displayName=data["Name"]; - var emailAddress=data["UserId"]; - emailAddressDetailsDictionary["name"]=displayName || $h.EmailAddressDetails._emptyString$p; - emailAddressDetailsDictionary["address"]=emailAddress || $h.EmailAddressDetails._emptyString$p; - return new $h.EmailAddressDetails(emailAddressDetailsDictionary) - }; - $h.EmailAddressDetails.prototype={ - _data$p$0: null, - _getEmailAddress$p$0: function() - { - return this._data$p$0["address"] - }, - _getDisplayName$p$0: function() - { - return this._data$p$0["name"] - }, - _getAppointmentResponse$p$0: function() - { - var response=this._data$p$0["appointmentResponse"]; - return response < $h.EmailAddressDetails._responseTypeMap$p["length"] ? $h.EmailAddressDetails._responseTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["None"] - }, - _getRecipientType$p$0: function() - { - var response=this._data$p$0["recipientType"]; - return response < $h.EmailAddressDetails._recipientTypeMap$p["length"] ? $h.EmailAddressDetails._recipientTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["Other"] - } - }; - $h.EmailAddressDetails.prototype.toJSON=function() - { - var result={}; - result["emailAddress"]=this._getEmailAddress$p$0(); - result["displayName"]=this._getDisplayName$p$0(); - if($h.ScriptHelpers.dictionaryContainsKey(this._data$p$0,"appointmentResponse")) - result["appointmentResponse"]=this._getAppointmentResponse$p$0(); - if($h.ScriptHelpers.dictionaryContainsKey(this._data$p$0,"recipientType")) - result["recipientType"]=this._getRecipientType$p$0(); - return result - }; - $h.Entities=function(data, filteredEntitiesData, timeSent, permissionLevel) - { - this.$$d__createMeetingSuggestion$p$0=Function.createDelegate(this,this._createMeetingSuggestion$p$0); - this.$$d__getParcelDeliveries$p$0=Function.createDelegate(this,this._getParcelDeliveries$p$0); - this.$$d__getFlightReservations$p$0=Function.createDelegate(this,this._getFlightReservations$p$0); - this.$$d__getContacts$p$0=Function.createDelegate(this,this._getContacts$p$0); - this.$$d__getPhoneNumbers$p$0=Function.createDelegate(this,this._getPhoneNumbers$p$0); - this.$$d__getUrls$p$0=Function.createDelegate(this,this._getUrls$p$0); - this.$$d__getEmailAddresses$p$0=Function.createDelegate(this,this._getEmailAddresses$p$0); - this.$$d__getMeetingSuggestions$p$0=Function.createDelegate(this,this._getMeetingSuggestions$p$0); - this.$$d__getTaskSuggestions$p$0=Function.createDelegate(this,this._getTaskSuggestions$p$0); - this.$$d__getAddresses$p$0=Function.createDelegate(this,this._getAddresses$p$0); - this._data$p$0=data || {}; - this._filteredData$p$0=filteredEntitiesData || {}; - this._dateTimeSent$p$0=timeSent; - $h.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"taskSuggestions",this.$$d__getTaskSuggestions$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"meetingSuggestions",this.$$d__getMeetingSuggestions$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"contacts",this.$$d__getContacts$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"flightReservations",this.$$d__getFlightReservations$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"parcelDeliveries",this.$$d__getParcelDeliveries$p$0); - this._permissionLevel$p$0=permissionLevel - }; - $h.Entities._getExtractedObjects$i=function(T, data, name, creator, removeDuplicates, stringPropertyName) - { - var results=null; - var extractedObjects=data[name]; - if(!extractedObjects) - return new Array(0); - if(removeDuplicates) - extractedObjects=$h.Entities._removeDuplicate$p(Object,extractedObjects,$h.Entities._entityDictionaryEquals$p,stringPropertyName); - results=new Array(extractedObjects["length"]); - var count=0; - for(var $$arr_9=extractedObjects, $$len_A=$$arr_9.length, $$idx_B=0; $$idx_B < $$len_A;++$$idx_B) - { - var extractedObject=$$arr_9[$$idx_B]; - if(creator) - results[count++]=creator(extractedObject); - else - results[count++]=extractedObject - } - return results - }; - $h.Entities._getExtractedStringProperty$i=function(data, name, removeDuplicate) - { - var extractedProperties=data[name]; - if(!extractedProperties) - return new Array(0); - if(removeDuplicate) - extractedProperties=$h.Entities._removeDuplicate$p(String,extractedProperties,$h.Entities._stringEquals$p,null); - return extractedProperties - }; - $h.Entities._createContact$p=function(data) - { - return new $h.Contact(data) - }; - $h.Entities._createTaskSuggestion$p=function(data) - { - return new $h.TaskSuggestion(data) - }; - $h.Entities._createPhoneNumber$p=function(data) - { - return new $h.PhoneNumber(data) - }; - $h.Entities._entityDictionaryEquals$p=function(dictionary1, dictionary2, entityPropertyIdentifier) - { - if(dictionary1===dictionary2) - return true; - if(!dictionary1 || !dictionary2) - return false; - if(dictionary1[entityPropertyIdentifier]===dictionary2[entityPropertyIdentifier]) - return true; - return false - }; - $h.Entities._stringEquals$p=function(string1, string2, entityProperty) - { - return string1===string2 - }; - $h.Entities._removeDuplicate$p=function(T, array, entityEquals, entityPropertyIdentifier) - { - for(var matchIndex1=array["length"] - 1; matchIndex1 >=0; matchIndex1--) - { - var removeMatch=false; - for(var matchIndex2=matchIndex1 - 1; matchIndex2 >=0; matchIndex2--) - if(entityEquals(array[matchIndex1],array[matchIndex2],entityPropertyIdentifier)) - { - removeMatch=true; - break - } - if(removeMatch) - Array.removeAt(array,matchIndex1) - } - return array - }; - $h.Entities.prototype={ - _dateTimeSent$p$0: null, - _data$p$0: null, - _filteredData$p$0: null, - _filteredEntitiesCache$p$0: null, - _permissionLevel$p$0: 0, - _taskSuggestions$p$0: null, - _meetingSuggestions$p$0: null, - _phoneNumbers$p$0: null, - _contacts$p$0: null, - _addresses$p$0: null, - _emailAddresses$p$0: null, - _urls$p$0: null, - _flightReservations$p$0: null, - _parcelDeliveries$p$0: null, - _getByType$i$0: function(entityType) - { - if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["MeetingSuggestion"]) - return this._getMeetingSuggestions$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["TaskSuggestion"]) - return this._getTaskSuggestions$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Address"]) - return this._getAddresses$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["PhoneNumber"]) - return this._getPhoneNumbers$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["EmailAddress"]) - return this._getEmailAddresses$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Url"]) - return this._getUrls$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Contact"]) - return this._getContacts$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["FlightReservations"]) - return this._getFlightReservations$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["ParcelDeliveries"]) - return this._getParcelDeliveries$p$0(); - return null - }, - _getFilteredEntitiesByName$i$0: function(name) - { - if(!this._filteredEntitiesCache$p$0) - this._filteredEntitiesCache$p$0={}; - if(!$h.ScriptHelpers.dictionaryContainsKey(this._filteredEntitiesCache$p$0,name)) - { - var found=false; - for(var i=0; i < $h.Entities._allEntityKeys$p["length"]; i++) - { - var entityTypeKey=$h.Entities._allEntityKeys$p[i]; - var perEntityTypeDictionary=this._filteredData$p$0[entityTypeKey]; - if(!perEntityTypeDictionary) - continue; - if($h.ScriptHelpers.dictionaryContainsKey(perEntityTypeDictionary,name)) - { - switch(entityTypeKey) - { - case"EmailAddresses": - case"Urls": - this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedStringProperty$i(perEntityTypeDictionary,name); - break; - case"Addresses": - this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedStringProperty$i(perEntityTypeDictionary,name,true); - break; - case"PhoneNumbers": - this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedObjects$i($h.PhoneNumber,perEntityTypeDictionary,name,$h.Entities._createPhoneNumber$p,false,null); - break; - case"TaskSuggestions": - this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedObjects$i($h.TaskSuggestion,perEntityTypeDictionary,name,$h.Entities._createTaskSuggestion$p,true,"TaskString"); - break; - case"MeetingSuggestions": - this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedObjects$i($h.MeetingSuggestion,perEntityTypeDictionary,name,this.$$d__createMeetingSuggestion$p$0,true,"MeetingString"); - break; - case"Contacts": - this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedObjects$i($h.Contact,perEntityTypeDictionary,name,$h.Entities._createContact$p,true,"ContactString"); - break - } - found=true; - break - } - } - if(!found) - this._filteredEntitiesCache$p$0[name]=null - } - return this._filteredEntitiesCache$p$0[name] - }, - _createMeetingSuggestion$p$0: function(data) - { - return new $h.MeetingSuggestion(data,this._dateTimeSent$p$0) - }, - _getAddresses$p$0: function() - { - if(!this._addresses$p$0) - this._addresses$p$0=$h.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses",true); - return this._addresses$p$0 - }, - _getEmailAddresses$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); - if(!this._emailAddresses$p$0) - this._emailAddresses$p$0=$h.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses",false); - return this._emailAddresses$p$0 - }, - _getUrls$p$0: function() - { - if(!this._urls$p$0) - this._urls$p$0=$h.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls",false); - return this._urls$p$0 - }, - _getPhoneNumbers$p$0: function() - { - if(!this._phoneNumbers$p$0) - this._phoneNumbers$p$0=$h.Entities._getExtractedObjects$i($h.PhoneNumber,this._data$p$0,"PhoneNumbers",$h.Entities._createPhoneNumber$p); - return this._phoneNumbers$p$0 - }, - _getTaskSuggestions$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); - if(!this._taskSuggestions$p$0) - this._taskSuggestions$p$0=$h.Entities._getExtractedObjects$i($h.TaskSuggestion,this._data$p$0,"TaskSuggestions",$h.Entities._createTaskSuggestion$p,true,"TaskString"); - return this._taskSuggestions$p$0 - }, - _getMeetingSuggestions$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); - if(!this._meetingSuggestions$p$0) - this._meetingSuggestions$p$0=$h.Entities._getExtractedObjects$i($h.MeetingSuggestion,this._data$p$0,"MeetingSuggestions",this.$$d__createMeetingSuggestion$p$0,true,"MeetingString"); - return this._meetingSuggestions$p$0 - }, - _getContacts$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); - if(!this._contacts$p$0) - this._contacts$p$0=$h.Entities._getExtractedObjects$i($h.Contact,this._data$p$0,"Contacts",$h.Entities._createContact$p,true,"ContactString"); - return this._contacts$p$0 - }, - _getParcelDeliveries$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); - if(!this._parcelDeliveries$p$0) - this._parcelDeliveries$p$0=$h.Entities._getExtractedObjects$i(Object,this._data$p$0,"ParcelDeliveries",null); - return this._parcelDeliveries$p$0 - }, - _getFlightReservations$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); - if(!this._flightReservations$p$0) - this._flightReservations$p$0=$h.Entities._getExtractedObjects$i(Object,this._data$p$0,"FlightReservations",null); - return this._flightReservations$p$0 - } - }; - $h.ReplyConstants=function(){}; - $h.AsyncConstants=function(){}; - window["Office"]["cast"]["item"]=Office.cast.item=function(){}; - window["Office"]["cast"]["item"]["toItemRead"]=function(item) - { - if($h.Item["isInstanceOfType"](item)) - return item; - throw Error.argumentType(); - }; - window["Office"]["cast"]["item"]["toItemCompose"]=function(item) - { - if($h.ComposeItem["isInstanceOfType"](item)) - return item; - throw Error.argumentType(); - }; - window["Office"]["cast"]["item"]["toMessage"]=function(item) - { - return window["Office"]["cast"]["item"]["toMessageRead"](item) - }; - window["Office"]["cast"]["item"]["toMessageRead"]=function(item) - { - if($h.Message["isInstanceOfType"](item)) - return item; - throw Error.argumentType(); - }; - window["Office"]["cast"]["item"]["toMessageCompose"]=function(item) - { - if($h.MessageCompose["isInstanceOfType"](item)) - return item; - throw Error.argumentType(); - }; - window["Office"]["cast"]["item"]["toMeetingRequest"]=function(item) - { - if($h.MeetingRequest["isInstanceOfType"](item)) - return item; - throw Error.argumentType(); - }; - window["Office"]["cast"]["item"]["toAppointment"]=function(item) - { - return window["Office"]["cast"]["item"]["toAppointmentRead"](item) - }; - window["Office"]["cast"]["item"]["toAppointmentRead"]=function(item) - { - if($h.Appointment["isInstanceOfType"](item)) - return item; - throw Error.argumentType(); - }; - window["Office"]["cast"]["item"]["toAppointmentCompose"]=function(item) - { - if($h.AppointmentCompose["isInstanceOfType"](item)) - return item; - throw Error.argumentType(); - }; - $h.Item=function(data) - { - this.$$d__getBody$p$1=Function.createDelegate(this,this._getBody$p$1); - this.$$d__getAttachments$p$1=Function.createDelegate(this,this._getAttachments$p$1); - this.$$d__getItemClass$p$1=Function.createDelegate(this,this._getItemClass$p$1); - this.$$d__getItemId$p$1=Function.createDelegate(this,this._getItemId$p$1); - this.$$d__getDateTimeModified$p$1=Function.createDelegate(this,this._getDateTimeModified$p$1); - this.$$d__getDateTimeCreated$p$1=Function.createDelegate(this,this._getDateTimeCreated$p$1); - $h.Item["initializeBase"](this,[data]); - $h.InitialData._defineReadOnlyProperty$i(this,"dateTimeCreated",this.$$d__getDateTimeCreated$p$1); - $h.InitialData._defineReadOnlyProperty$i(this,"dateTimeModified",this.$$d__getDateTimeModified$p$1); - $h.InitialData._defineReadOnlyProperty$i(this,"itemId",this.$$d__getItemId$p$1); - $h.InitialData._defineReadOnlyProperty$i(this,"itemClass",this.$$d__getItemClass$p$1); - $h.InitialData._defineReadOnlyProperty$i(this,"attachments",this.$$d__getAttachments$p$1); - $h.InitialData._defineReadOnlyProperty$i(this,"body",this.$$d__getBody$p$1) - }; - $h.Item.prototype={ - _body$p$1: null, - _getItemId$p$1: function() - { - return this._data$p$0.get__itemId$i$0() - }, - _getItemClass$p$1: function() - { - return this._data$p$0.get__itemClass$i$0() - }, - _getDateTimeCreated$p$1: function() - { - return this._data$p$0.get__dateTimeCreated$i$0() - }, - _getDateTimeModified$p$1: function() - { - return this._data$p$0.get__dateTimeModified$i$0() - }, - _getAttachments$p$1: function() - { - return this._data$p$0.get__attachments$i$0() - }, - _getBody$p$1: function() - { - if(!this._body$p$1) - this._body$p$1=new $h.Body; - return this._body$p$1 - } - }; - $h.ItemBase=function(data) - { - this.$$d__createCustomProperties$i$0=Function.createDelegate(this,this._createCustomProperties$i$0); - this.$$d__getNotificationMessages$p$0=Function.createDelegate(this,this._getNotificationMessages$p$0); - this.$$d_getItemType=Function.createDelegate(this,this.getItemType); - this._data$p$0=data; - $h.InitialData._defineReadOnlyProperty$i(this,"itemType",this.$$d_getItemType); - $h.InitialData._defineReadOnlyProperty$i(this,"notificationMessages",this.$$d__getNotificationMessages$p$0) - }; - $h.ItemBase.prototype={ - _data$p$0: null, - _notificationMessages$p$0: null, - get_data: function() - { - return this._data$p$0 - }, - _createCustomProperties$i$0: function(data) - { - return new $h.CustomProperties(data) - }, - _getNotificationMessages$p$0: function() - { - if(!this._notificationMessages$p$0) - this._notificationMessages$p$0=new $h.NotificationMessages; - return this._notificationMessages$p$0 - } - }; - $h.ItemBase.prototype.loadCustomPropertiesAsync=function() - { - var args=[]; - for(var $$pai_3=0; $$pai_3 < arguments["length"];++$$pai_3) - args[$$pai_3]=arguments[$$pai_3]; - var parameters=$h.CommonParameters.parse(args,true,true); - var loadCustomProperties=new $h._loadDictionaryRequest(this.$$d__createCustomProperties$i$0,"customProperties",parameters._callback$p$0,parameters._asyncContext$p$0); - loadCustomProperties._sendRequest$i$0(3,"LoadCustomProperties",{}) - }; - $h.MeetingRequest=function(data) - { - this.$$d__getRequiredAttendees$p$3=Function.createDelegate(this,this._getRequiredAttendees$p$3); - this.$$d__getOptionalAttendees$p$3=Function.createDelegate(this,this._getOptionalAttendees$p$3); - this.$$d__getLocation$p$3=Function.createDelegate(this,this._getLocation$p$3); - this.$$d__getEnd$p$3=Function.createDelegate(this,this._getEnd$p$3); - this.$$d__getStart$p$3=Function.createDelegate(this,this._getStart$p$3); - $h.MeetingRequest["initializeBase"](this,[data]); - $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$3); - $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$3); - $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$3); - $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$3); - $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$3) - }; - $h.MeetingRequest.prototype={ - _getStart$p$3: function() - { - return this._data$p$0.get__start$i$0() - }, - _getEnd$p$3: function() - { - return this._data$p$0.get__end$i$0() - }, - _getLocation$p$3: function() - { - return this._data$p$0.get__location$i$0() - }, - _getOptionalAttendees$p$3: function() - { - return this._data$p$0.get__cc$i$0() - }, - _getRequiredAttendees$p$3: function() - { - return this._data$p$0.get__to$i$0() - } - }; - $h.MeetingSuggestion=function(data, dateTimeSent) - { - this.$$d__getEndTime$p$0=Function.createDelegate(this,this._getEndTime$p$0); - this.$$d__getStartTime$p$0=Function.createDelegate(this,this._getStartTime$p$0); - this.$$d__getSubject$p$0=Function.createDelegate(this,this._getSubject$p$0); - this.$$d__getLocation$p$0=Function.createDelegate(this,this._getLocation$p$0); - this.$$d__getAttendees$p$0=Function.createDelegate(this,this._getAttendees$p$0); - this.$$d__getMeetingString$p$0=Function.createDelegate(this,this._getMeetingString$p$0); - this._data$p$0=data; - this._dateTimeSent$p$0=dateTimeSent; - $h.InitialData._defineReadOnlyProperty$i(this,"meetingString",this.$$d__getMeetingString$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"attendees",this.$$d__getAttendees$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStartTime$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEndTime$p$0) - }; - $h.MeetingSuggestion.prototype={ - _dateTimeSent$p$0: null, - _data$p$0: null, - _attendees$p$0: null, - _getMeetingString$p$0: function() - { - return this._data$p$0["MeetingString"] - }, - _getLocation$p$0: function() - { - return this._data$p$0["Location"] - }, - _getSubject$p$0: function() - { - return this._data$p$0["Subject"] - }, - _getStartTime$p$0: function() - { - var time=this._createDateTimeFromParameter$p$0("StartTime"); - var resolvedTime=$h.MeetingSuggestionTimeDecoder.resolve(time,this._dateTimeSent$p$0); - if(resolvedTime["getTime"]() !==time["getTime"]()) - return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToUtcClientTime"](window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._dateToDictionary$i$0(resolvedTime)); - return time - }, - _getEndTime$p$0: function() - { - var time=this._createDateTimeFromParameter$p$0("EndTime"); - var resolvedTime=$h.MeetingSuggestionTimeDecoder.resolve(time,this._dateTimeSent$p$0); - if(resolvedTime["getTime"]() !==time["getTime"]()) - return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToUtcClientTime"](window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._dateToDictionary$i$0(resolvedTime)); - return time - }, - _createDateTimeFromParameter$p$0: function(keyName) - { - var dateTimeString=this._data$p$0[keyName]; - if(!dateTimeString) - return null; - return new Date(dateTimeString) - }, - _getAttendees$p$0: function() - { - if(!this._attendees$p$0) - { - var $$t_1=this; - this._attendees$p$0=$h.Entities._getExtractedObjects$i($h.EmailAddressDetails,this._data$p$0,"Attendees",function(data) - { - return $h.EmailAddressDetails._createFromEmailUserDictionary$i(data) - }) - } - return this._attendees$p$0 - } - }; - $h.MeetingSuggestionTimeDecoder=function(){}; - $h.MeetingSuggestionTimeDecoder.resolve=function(inTime, sentTime) - { - if(!sentTime) - return inTime; - try - { - var tod; - var outDate; - var extractedDate; - var sentDate=new Date(sentTime["getFullYear"](),sentTime["getMonth"](),sentTime["getDate"](),0,0,0,0); - var $$t_7, - $$t_8, - $$t_9; - if(!($$t_9=$h.MeetingSuggestionTimeDecoder._decode$p(inTime,$$t_7={val: extractedDate},$$t_8={val: tod}),extractedDate=$$t_7["val"],tod=$$t_8["val"],$$t_9)) - return inTime; - else - { - if($h._preciseDate["isInstanceOfType"](extractedDate)) - outDate=$h.MeetingSuggestionTimeDecoder._resolvePreciseDate$p(sentDate,extractedDate); - else if($h._relativeDate["isInstanceOfType"](extractedDate)) - outDate=$h.MeetingSuggestionTimeDecoder._resolveRelativeDate$p(sentDate,extractedDate); - else - outDate=sentDate; - if(window["isNaN"](outDate["getTime"]())) - return sentTime; - outDate["setMilliseconds"](outDate["getMilliseconds"]()+tod); - return outDate - } - } - catch($$e_6) - { - return sentTime - } - }; - $h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i=function(value) - { - return null===value || value===undefined - }; - $h.MeetingSuggestionTimeDecoder._resolvePreciseDate$p=function(sentDate, precise) - { - var year=precise._year$i$1; - var month=!precise._month$i$1 ? sentDate["getMonth"]() : precise._month$i$1 - 1; - var day=precise._day$i$1; - if(!day) - return sentDate; - var candidate; - if($h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i(year)) - { - candidate=new Date(sentDate["getFullYear"](),month,day); - if(candidate["getTime"]() < sentDate["getTime"]()) - candidate=new Date(sentDate["getFullYear"]()+1,month,day) - } - else - candidate=new Date(year < 50 ? 2e3+year : 1900+year,month,day); - if(candidate["getMonth"]() !==month) - return sentDate; - return candidate - }; - $h.MeetingSuggestionTimeDecoder._resolveRelativeDate$p=function(sentDate, relative) - { - var date; - switch(relative._unit$i$1) - { - case 0: - date=new Date(sentDate["getFullYear"](),sentDate["getMonth"](),sentDate["getDate"]()); - date["setDate"](date["getDate"]()+relative._offset$i$1); - return date; - case 5: - return $h.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p(sentDate,relative._offset$i$1,relative._tag$i$1); - case 2: - var days=1; - switch(relative._modifier$i$1) - { - case 1: - break; - case 2: - days=16; - break; - default: - if(!relative._offset$i$1) - days=sentDate["getDate"](); - break - } - date=new Date(sentDate["getFullYear"](),sentDate["getMonth"](),days); - date["setMonth"](date["getMonth"]()+relative._offset$i$1); - if(date["getTime"]() < sentDate["getTime"]()) - date["setDate"](date["getDate"]()+sentDate["getDate"]() - 1); - return date; - case 1: - date=new Date(sentDate["getFullYear"](),sentDate["getMonth"](),sentDate["getDate"]()); - date["setDate"](sentDate["getDate"]()+7 * relative._offset$i$1); - if(relative._modifier$i$1===1 || !relative._modifier$i$1) - { - date["setDate"](date["getDate"]()+1 - date["getDay"]()); - if(date["getTime"]() < sentDate["getTime"]()) - return sentDate; - return date - } - else if(relative._modifier$i$1===2) - { - date["setDate"](date["getDate"]()+5 - date["getDay"]()); - return date - } - break; - case 4: - return $h.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p(sentDate,relative); - case 3: - if(relative._offset$i$1 > 0) - return new Date(sentDate["getFullYear"]()+relative._offset$i$1,0,1); - break; - default: - break - } - return sentDate - }; - $h.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p=function(sentDate, offset, tag) - { - if(offset > -5 && offset < 5) - { - var dayOfWeek=(tag+6) % 7+1; - var days=7 * offset+(dayOfWeek - sentDate["getDay"]()); - sentDate["setDate"](sentDate["getDate"]()+days); - return sentDate - } - else - { - var days=(tag - sentDate["getDay"]()) % 7; - if(days < 0) - days+=7; - sentDate["setDate"](sentDate["getDate"]()+days); - return sentDate - } - }; - $h.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p=function(sentDate, relative) - { - var date; - var firstDay; - var newDate; - date=sentDate; - if(relative._tag$i$1 <=0 || relative._tag$i$1 > 12 || relative._offset$i$1 <=0 || relative._offset$i$1 > 5) - return sentDate; - var monthOffset=(12+relative._tag$i$1 - date["getMonth"]() - 1) % 12; - firstDay=new Date(date["getFullYear"](),date["getMonth"]()+monthOffset,1); - if(relative._modifier$i$1===1) - if(relative._offset$i$1===1 && firstDay["getDay"]() !==6 && firstDay["getDay"]()) - return firstDay; - else - { - newDate=new Date(firstDay["getFullYear"](),firstDay["getMonth"](),firstDay["getDate"]()); - newDate["setDate"](newDate["getDate"]()+(7+(1 - firstDay["getDay"]())) % 7); - if(firstDay["getDay"]() !==6 && firstDay["getDay"]() && firstDay["getDay"]() !==1) - newDate["setDate"](newDate["getDate"]() - 7); - newDate["setDate"](newDate["getDate"]()+7 * (relative._offset$i$1 - 1)); - if(newDate["getMonth"]()+1 !==relative._tag$i$1) - return sentDate; - return newDate - } - else - { - newDate=new Date(firstDay["getFullYear"](),firstDay["getMonth"](),$h.MeetingSuggestionTimeDecoder._daysInMonth$p(firstDay["getMonth"](),firstDay["getFullYear"]())); - var offset=1 - newDate["getDay"](); - if(offset > 0) - offset=offset - 7; - newDate["setDate"](newDate["getDate"]()+offset); - newDate["setDate"](newDate["getDate"]()+7 * (1 - relative._offset$i$1)); - if(newDate["getMonth"]()+1 !==relative._tag$i$1) - if(firstDay["getDay"]() !==6 && firstDay["getDay"]()) - return firstDay; - else - return sentDate; - else - return newDate - } - }; - $h.MeetingSuggestionTimeDecoder._decode$p=function(inDate, date, time) - { - var DateValueMask=32767; - date["val"]=null; - time["val"]=0; - if(!inDate) - return false; - time["val"]=$h.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p(inDate); - var inDateAtMidnight=inDate["getTime"]() - time["val"]; - var value=(inDateAtMidnight - $h.MeetingSuggestionTimeDecoder._baseDate$p["getTime"]()) / 864e5; - if(value < 0) - return false; - else if(value >=262144) - return false; - else - { - var type=value >> 15; - value=value & DateValueMask; - switch(type) - { - case 0: - return $h.MeetingSuggestionTimeDecoder._decodePreciseDate$p(value,date); - case 1: - return $h.MeetingSuggestionTimeDecoder._decodeRelativeDate$p(value,date); - default: - return false - } - } - }; - $h.MeetingSuggestionTimeDecoder._decodePreciseDate$p=function(value, date) - { - var c_SubTypeMask=7; - var c_MonthMask=15; - var c_DayMask=31; - var c_YearMask=127; - var year=null; - var month=0; - var day=0; - date["val"]=null; - var subType=value >> 12 & c_SubTypeMask; - if((subType & 4)===4) - { - year=value >> 5 & c_YearMask; - if((subType & 2)===2) - { - if((subType & 1)===1) - return false; - month=value >> 1 & c_MonthMask - } - } - else - { - if((subType & 2)===2) - month=value >> 8 & c_MonthMask; - if((subType & 1)===1) - day=value >> 3 & c_DayMask - } - date["val"]=new $h._preciseDate(day,month,year); - return true - }; - $h.MeetingSuggestionTimeDecoder._decodeRelativeDate$p=function(value, date) - { - var TagMask=15; - var OffsetMask=63; - var UnitMask=7; - var ModifierMask=3; - var tag=value & TagMask; - value >>=4; - var offset=$h.MeetingSuggestionTimeDecoder._fromComplement$p(value & OffsetMask,6); - value >>=6; - var unit=value & UnitMask; - value >>=3; - var modifier=value & ModifierMask; - try - { - date["val"]=new $h._relativeDate(modifier,offset,unit,tag); - return true - } - catch($$e_A) - { - date["val"]=null; - return false - } - }; - $h.MeetingSuggestionTimeDecoder._fromComplement$p=function(value, n) - { - var signed=1 << n - 1; - var mask=(1 << n) - 1; - if((value & signed)===signed) - return-((value ^ mask)+1); - else - return value - }; - $h.MeetingSuggestionTimeDecoder._daysInMonth$p=function(month, year) - { - return 32 - new Date(year,month,32)["getDate"]() - }; - $h.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p=function(inputTime) - { - var timeOfDay=0; - timeOfDay+=inputTime["getUTCHours"]() * 3600; - timeOfDay+=inputTime["getUTCMinutes"]() * 60; - timeOfDay+=inputTime["getUTCSeconds"](); - timeOfDay *=1e3; - timeOfDay+=inputTime["getUTCMilliseconds"](); - return timeOfDay - }; - $h._extractedDate=function(){}; - $h._preciseDate=function(day, month, year) - { - $h._preciseDate["initializeBase"](this); - if(day < 0 || day > 31) - throw Error.argumentOutOfRange("day"); - if(month < 0 || month > 12) - throw Error.argumentOutOfRange("month"); - this._day$i$1=day; - this._month$i$1=month; - if(!$h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i(year)) - { - if(!month && day) - throw Error.argument("Invalid arguments"); - if(year < 0 || year > 2099) - throw Error.argumentOutOfRange("year"); - this._year$i$1=year % 100 - } - else if(!this._month$i$1 && !this._day$i$1) - throw Error.argument("Invalid datetime"); - }; - $h._preciseDate.prototype={ - _day$i$1: 0, - _month$i$1: 0, - _year$i$1: null - }; - $h._relativeDate=function(modifier, offset, unit, tag) - { - $h._relativeDate["initializeBase"](this); - if(offset < -32 || offset > 31) - throw Error.argumentOutOfRange("offset"); - if(tag < 0 || tag > 15) - throw Error.argumentOutOfRange("tag"); - if(!unit && offset < 0) - throw Error.argument("unit & offset do not form a valid date"); - this._modifier$i$1=modifier; - this._offset$i$1=offset; - this._unit$i$1=unit; - this._tag$i$1=tag - }; - $h._relativeDate.prototype={ - _modifier$i$1: 0, - _offset$i$1: 0, - _unit$i$1: 0, - _tag$i$1: 0 - }; - $h.Message=function(dataDictionary) - { - this.$$d__getConversationId$p$2=Function.createDelegate(this,this._getConversationId$p$2); - this.$$d__getInternetMessageId$p$2=Function.createDelegate(this,this._getInternetMessageId$p$2); - this.$$d__getCc$p$2=Function.createDelegate(this,this._getCc$p$2); - this.$$d__getTo$p$2=Function.createDelegate(this,this._getTo$p$2); - this.$$d__getFrom$p$2=Function.createDelegate(this,this._getFrom$p$2); - this.$$d__getSender$p$2=Function.createDelegate(this,this._getSender$p$2); - this.$$d__getNormalizedSubject$p$2=Function.createDelegate(this,this._getNormalizedSubject$p$2); - this.$$d__getSubject$p$2=Function.createDelegate(this,this._getSubject$p$2); - $h.Message["initializeBase"](this,[dataDictionary]); - $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"sender",this.$$d__getSender$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"from",this.$$d__getFrom$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"to",this.$$d__getTo$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"cc",this.$$d__getCc$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"internetMessageId",this.$$d__getInternetMessageId$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"conversationId",this.$$d__getConversationId$p$2) - }; - $h.Message.prototype={ - getItemType: function() - { - return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Message"] - }, - _getSubject$p$2: function() - { - return this._data$p$0.get__subject$i$0() - }, - _getNormalizedSubject$p$2: function() - { - return this._data$p$0.get__normalizedSubject$i$0() - }, - _getSender$p$2: function() - { - return this._data$p$0.get__sender$i$0() - }, - _getFrom$p$2: function() - { - return this._data$p$0.get__from$i$0() - }, - _getTo$p$2: function() - { - return this._data$p$0.get__to$i$0() - }, - _getCc$p$2: function() - { - return this._data$p$0.get__cc$i$0() - }, - _getInternetMessageId$p$2: function() - { - return this._data$p$0.get__internetMessageId$i$0() - }, - _getConversationId$p$2: function() - { - return this._data$p$0.get__conversationId$i$0() - } - }; - $h.Message.prototype.getEntities=function() - { - return this._data$p$0._getEntities$i$0() - }; - $h.Message.prototype.getEntitiesByType=function(entityType) - { - return this._data$p$0._getEntitiesByType$i$0(entityType) - }; - $h.Message.prototype.getFilteredEntitiesByName=function(name) - { - return this._data$p$0._getFilteredEntitiesByName$i$0(name) - }; - $h.Message.prototype.getSelectedEntities=function() - { - return this._data$p$0._getSelectedEntities$i$0() - }; - $h.Message.prototype.getRegExMatches=function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches"); - return this._data$p$0._getRegExMatches$i$0() - }; - $h.Message.prototype.getRegExMatchesByName=function(name) - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName"); - return this._data$p$0._getRegExMatchesByName$i$0(name) - }; - $h.Message.prototype.getSelectedRegExMatches=function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedRegExMatches"); - return this._data$p$0._getSelectedRegExMatches$i$0() - }; - $h.Message.prototype.displayReplyForm=function(obj) - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyForm$i$0(obj) - }; - $h.Message.prototype.displayReplyAllForm=function(obj) - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyAllForm$i$0(obj) - }; - $h.MessageCompose=function(data) - { - this.$$d__getConversationId$p$2=Function.createDelegate(this,this._getConversationId$p$2); - this.$$d__getBcc$p$2=Function.createDelegate(this,this._getBcc$p$2); - this.$$d__getCc$p$2=Function.createDelegate(this,this._getCc$p$2); - this.$$d__getTo$p$2=Function.createDelegate(this,this._getTo$p$2); - $h.MessageCompose["initializeBase"](this,[data]); - $h.InitialData._defineReadOnlyProperty$i(this,"to",this.$$d__getTo$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"cc",this.$$d__getCc$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"bcc",this.$$d__getBcc$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"conversationId",this.$$d__getConversationId$p$2) - }; - $h.MessageCompose.prototype={ - _to$p$2: null, - _cc$p$2: null, - _bcc$p$2: null, - getItemType: function() - { - return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Message"] - }, - _getTo$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._to$p$2) - this._to$p$2=new $h.ComposeRecipient(0,"to"); - return this._to$p$2 - }, - _getCc$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._cc$p$2) - this._cc$p$2=new $h.ComposeRecipient(1,"cc"); - return this._cc$p$2 - }, - _getBcc$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._bcc$p$2) - this._bcc$p$2=new $h.ComposeRecipient(2,"bcc"); - return this._bcc$p$2 - }, - _getConversationId$p$2: function() - { - return this._data$p$0.get__conversationId$i$0() - } - }; - $h.NotificationMessages=function(){}; - $h.NotificationMessages._mapToHostItemNotificationMessageType$p=function(dataToHost) - { - var notificationType; - var hostItemNotificationMessageType; - notificationType=dataToHost["type"]; - if(notificationType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["ProgressIndicator"]) - hostItemNotificationMessageType=1; - else if(notificationType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["InformationalMessage"]) - hostItemNotificationMessageType=0; - else if(notificationType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["ErrorMessage"]) - hostItemNotificationMessageType=2; - else - throw Error.argument("type"); - dataToHost["type"]=hostItemNotificationMessageType - }; - $h.NotificationMessages._validateKey$p=function(key) - { - if(!$h.ScriptHelpers.isNonEmptyString(key)) - throw Error.argument("key"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(key.length,0,32,"key") - }; - $h.NotificationMessages._validateDictionary$p=function(dictionary) - { - if(!$h.ScriptHelpers.isNonEmptyString(dictionary["type"])) - throw Error.argument("type"); - if(dictionary["type"]===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["InformationalMessage"]) - { - if(!$h.ScriptHelpers.isNonEmptyString(dictionary["icon"])) - throw Error.argument("icon"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(dictionary["icon"].length,0,32,"icon"); - if($h.ScriptHelpers.isUndefined(dictionary["persistent"])) - throw Error.argument("persistent"); - if(!Boolean["isInstanceOfType"](dictionary["persistent"])) - throw Error.argumentType("persistent",Object["getType"](dictionary["persistent"]),Boolean); - } - else - { - if(!$h.ScriptHelpers.isUndefined(dictionary["icon"])) - throw Error.argument("icon"); - if(!$h.ScriptHelpers.isUndefined(dictionary["persistent"])) - throw Error.argument("persistent"); - } - if(!$h.ScriptHelpers.isNonEmptyString(dictionary["message"])) - throw Error.argument("message"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(dictionary["message"].length,0,150,"message") - }; - $h.NotificationMessages.prototype.addAsync=function(key, dictionary) - { - var args=[]; - for(var $$pai_5=2; $$pai_5 < arguments["length"];++$$pai_5) - args[$$pai_5 - 2]=arguments[$$pai_5]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.addAsync"); - var commonParameters=$h.CommonParameters.parse(args,false); - $h.NotificationMessages._validateKey$p(key); - $h.NotificationMessages._validateDictionary$p(dictionary); - var dataToHost={}; - dataToHost=$h.ScriptHelpers.deepClone(dictionary); - dataToHost["key"]=key; - $h.NotificationMessages._mapToHostItemNotificationMessageType$p(dataToHost); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(33,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.NotificationMessages.prototype.getAllAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.getAllAsync"); - var commonParameters=$h.CommonParameters.parse(args,true); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(34,null,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.NotificationMessages.prototype.replaceAsync=function(key, dictionary) - { - var args=[]; - for(var $$pai_5=2; $$pai_5 < arguments["length"];++$$pai_5) - args[$$pai_5 - 2]=arguments[$$pai_5]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.replaceAsync"); - var commonParameters=$h.CommonParameters.parse(args,false); - $h.NotificationMessages._validateKey$p(key); - $h.NotificationMessages._validateDictionary$p(dictionary); - var dataToHost={}; - dataToHost=$h.ScriptHelpers.deepClone(dictionary); - dataToHost["key"]=key; - $h.NotificationMessages._mapToHostItemNotificationMessageType$p(dataToHost); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(35,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.NotificationMessages.prototype.removeAsync=function(key) - { - var args=[]; - for(var $$pai_4=1; $$pai_4 < arguments["length"];++$$pai_4) - args[$$pai_4 - 1]=arguments[$$pai_4]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.removeAsync"); - var commonParameters=$h.CommonParameters.parse(args,false); - $h.NotificationMessages._validateKey$p(key); - var dataToHost={key: key}; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(36,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.OutlookErrorManager=function(){}; - $h.OutlookErrorManager.getErrorArgs=function(errorCode) - { - if(!$h.OutlookErrorManager._isInitialized$p) - $h.OutlookErrorManager._initialize$p(); - return OSF.DDA.ErrorCodeManager["getErrorArgs"](errorCode) - }; - $h.OutlookErrorManager._initialize$p=function() - { - $h.OutlookErrorManager._addErrorMessage$p(9e3,"AttachmentSizeExceeded",window["_u"]["ExtensibilityStrings"]["l_AttachmentExceededSize_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9001,"NumberOfAttachmentsExceeded",window["_u"]["ExtensibilityStrings"]["l_ExceededMaxNumberOfAttachments_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9002,"InternalFormatError",window["_u"]["ExtensibilityStrings"]["l_InternalFormatError_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9003,"InvalidAttachmentId",window["_u"]["ExtensibilityStrings"]["l_InvalidAttachmentId_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9004,"InvalidAttachmentPath",window["_u"]["ExtensibilityStrings"]["l_InvalidAttachmentPath_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9005,"CannotAddAttachmentBeforeUpgrade",window["_u"]["ExtensibilityStrings"]["l_CannotAddAttachmentBeforeUpgrade_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9006,"AttachmentDeletedBeforeUploadCompletes",window["_u"]["ExtensibilityStrings"]["l_AttachmentDeletedBeforeUploadCompletes_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9007,"AttachmentUploadGeneralFailure",window["_u"]["ExtensibilityStrings"]["l_AttachmentUploadGeneralFailure_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9008,"AttachmentToDeleteDoesNotExist",window["_u"]["ExtensibilityStrings"]["l_DeleteAttachmentDoesNotExist_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9009,"AttachmentDeleteGeneralFailure",window["_u"]["ExtensibilityStrings"]["l_AttachmentDeleteGeneralFailure_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9010,"InvalidEndTime",window["_u"]["ExtensibilityStrings"]["l_InvalidEndTime_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9011,"HtmlSanitizationFailure",window["_u"]["ExtensibilityStrings"]["l_HtmlSanitizationFailure_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9012,"NumberOfRecipientsExceeded",String.format(window["_u"]["ExtensibilityStrings"]["l_NumberOfRecipientsExceeded_Text"],500)); - $h.OutlookErrorManager._addErrorMessage$p(9013,"NoValidRecipientsProvided",window["_u"]["ExtensibilityStrings"]["l_NoValidRecipientsProvided_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9014,"CursorPositionChanged",window["_u"]["ExtensibilityStrings"]["l_CursorPositionChanged_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9016,"InvalidSelection",window["_u"]["ExtensibilityStrings"]["l_InvalidSelection_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9017,"AccessRestricted",""); - $h.OutlookErrorManager._addErrorMessage$p(9018,"GenericTokenError",""); - $h.OutlookErrorManager._addErrorMessage$p(9019,"GenericSettingsError",""); - $h.OutlookErrorManager._addErrorMessage$p(9020,"GenericResponseError",""); - $h.OutlookErrorManager._addErrorMessage$p(9021,"SaveError",window["_u"]["ExtensibilityStrings"]["l_SaveError_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9022,"MessageInDifferentStoreError",window["_u"]["ExtensibilityStrings"]["l_MessageInDifferentStoreError_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9023,"DuplicateNotificationKey",window["_u"]["ExtensibilityStrings"]["l_DuplicateNotificationKey_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9024,"NotificationKeyNotFound",window["_u"]["ExtensibilityStrings"]["l_NotificationKeyNotFound_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9025,"NumberOfNotificationsExceeded",window["_u"]["ExtensibilityStrings"]["l_NumberOfNotificationsExceeded_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9026,"PersistedNotificationArrayReadError",window["_u"]["ExtensibilityStrings"]["l_PersistedNotificationArrayReadError_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9027,"PersistedNotificationArraySaveError",window["_u"]["ExtensibilityStrings"]["l_PersistedNotificationArraySaveError_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9028,"CannotPersistPropertyInUnsavedDraftError",window["_u"]["ExtensibilityStrings"]["l_CannotPersistPropertyInUnsavedDraftError_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9029,"CanOnlyGetTokenForSavedItem",window["_u"]["ExtensibilityStrings"]["l_CallSaveAsyncBeforeToken_Text"]); - $h.OutlookErrorManager._isInitialized$p=true - }; - $h.OutlookErrorManager._addErrorMessage$p=function(errorCode, errorName, errorMessage) - { - OSF.DDA.ErrorCodeManager["addErrorMessage"](errorCode,{ - name: errorName, - message: errorMessage - }) - }; - $h.OutlookErrorManager.OutlookErrorCodes=function(){}; - $h.OutlookErrorManager.OsfDdaErrorCodes=function(){}; - $h.PhoneNumber=function(data) - { - this.$$d__getPhoneType$p$0=Function.createDelegate(this,this._getPhoneType$p$0); - this.$$d__getOriginalPhoneString$p$0=Function.createDelegate(this,this._getOriginalPhoneString$p$0); - this.$$d__getPhoneString$p$0=Function.createDelegate(this,this._getPhoneString$p$0); - this._data$p$0=data; - $h.InitialData._defineReadOnlyProperty$i(this,"phoneString",this.$$d__getPhoneString$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"originalPhoneString",this.$$d__getOriginalPhoneString$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"type",this.$$d__getPhoneType$p$0) - }; - $h.PhoneNumber.prototype={ - _data$p$0: null, - _getPhoneString$p$0: function() - { - return this._data$p$0["PhoneString"] - }, - _getOriginalPhoneString$p$0: function() - { - return this._data$p$0["OriginalPhoneString"] - }, - _getPhoneType$p$0: function() - { - return this._data$p$0["Type"] - } - }; - $h.TaskSuggestion=function(data) - { - this.$$d__getAssignees$p$0=Function.createDelegate(this,this._getAssignees$p$0); - this.$$d__getTaskString$p$0=Function.createDelegate(this,this._getTaskString$p$0); - this._data$p$0=data; - $h.InitialData._defineReadOnlyProperty$i(this,"taskString",this.$$d__getTaskString$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"assignees",this.$$d__getAssignees$p$0) - }; - $h.TaskSuggestion.prototype={ - _data$p$0: null, - _assignees$p$0: null, - _getTaskString$p$0: function() - { - return this._data$p$0["TaskString"] - }, - _getAssignees$p$0: function() - { - if(!this._assignees$p$0) - { - var $$t_1=this; - this._assignees$p$0=$h.Entities._getExtractedObjects$i($h.EmailAddressDetails,this._data$p$0,"Assignees",function(data) - { - return $h.EmailAddressDetails._createFromEmailUserDictionary$i(data) - }) - } - return this._assignees$p$0 - } - }; - $h.UserProfile=function(data) - { - this.$$d__getUserProfileType$p$0=Function.createDelegate(this,this._getUserProfileType$p$0); - this.$$d__getTimeZone$p$0=Function.createDelegate(this,this._getTimeZone$p$0); - this.$$d__getEmailAddress$p$0=Function.createDelegate(this,this._getEmailAddress$p$0); - this.$$d__getDisplayName$p$0=Function.createDelegate(this,this._getDisplayName$p$0); - this._data$p$0=data; - $h.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"timeZone",this.$$d__getTimeZone$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"type",this.$$d__getUserProfileType$p$0) - }; - $h.UserProfile.prototype={ - _data$p$0: null, - _getUserProfileType$p$0: function() - { - return this._data$p$0.get__userProfileType$i$0() - }, - _getDisplayName$p$0: function() - { - return this._data$p$0.get__userDisplayName$i$0() - }, - _getEmailAddress$p$0: function() - { - return this._data$p$0.get__userEmailAddress$i$0() - }, - _getTimeZone$p$0: function() - { - return this._data$p$0.get__userTimeZone$i$0() - } - }; - $h.OutlookDispid=function(){}; - $h.OutlookDispid.prototype={ - owaOnlyMethod: 0, - getInitialData: 1, - getUserIdentityToken: 2, - loadCustomProperties: 3, - saveCustomProperties: 4, - ewsRequest: 5, - displayNewAppointmentForm: 7, - displayMessageForm: 8, - displayAppointmentForm: 9, - displayReplyForm: 10, - displayReplyAllForm: 11, - getCallbackToken: 12, - bodySetSelectedDataAsync: 13, - getBodyTypeAsync: 14, - getRecipientsAsync: 15, - addFileAttachmentAsync: 16, - setSubjectAsync: 17, - getSubjectAsync: 18, - addItemAttachmentAsync: 19, - removeAttachmentAsync: 20, - setRecipientsAsync: 21, - addRecipientsAsync: 22, - bodyPrependAsync: 23, - getTimeAsync: 24, - setTimeAsync: 25, - getLocationAsync: 26, - setLocationAsync: 27, - getSelectedDataAsync: 28, - setSelectedDataAsync: 29, - displayReplyFormWithAttachments: 30, - displayReplyAllFormWithAttachments: 31, - saveAsync: 32, - addNotficationMessageAsync: 33, - getAllNotficationMessagesAsync: 34, - replaceNotficationMessageAsync: 35, - removeNotficationMessageAsync: 36, - getBodyAsync: 37, - setBodyAsync: 38, - appCommands1: 39, - registerConsentAsync: 40, - close: 41, - closeApp: 42, - displayPersonaCardAsync: 43, - displayNewMessageForm: 44, - navigateToModuleAsync: 45, - eventCompleted: 94, - closeContainer: 97, - messageParent: 144, - trackCtq: 400, - recordTrace: 401, - recordDataPoint: 402, - windowOpenOverrideHandler: 403, - saveSettingsRequest: 404 - }; - $h.OutlookDispid["registerEnum"]("$h.OutlookDispid",false); - $h.RequestState=function(){}; - $h.RequestState.prototype={ - unsent: 0, - opened: 1, - headersReceived: 2, - loading: 3, - done: 4 - }; - $h.RequestState["registerEnum"]("$h.RequestState",false); - $h.CommonParameters=function(options, callback, asyncContext) - { - this._options$p$0=options; - this._callback$p$0=callback; - this._asyncContext$p$0=asyncContext - }; - $h.CommonParameters.parse=function(args, isCallbackRequired, tryLegacy) - { - var legacyParameters; - var $$t_8, - $$t_9; - if(tryLegacy && ($$t_9=$h.CommonParameters._tryParseLegacy$p(args,$$t_8={val: legacyParameters}),legacyParameters=$$t_8["val"],$$t_9)) - return legacyParameters; - var argsLength=args["length"]; - var options=null; - var callback=null; - var asyncContext=null; - if(argsLength===1) - if(Function["isInstanceOfType"](args[0])) - callback=args[0]; - else if(Object["isInstanceOfType"](args[0])) - options=args[0]; - else - throw Error.argumentType(); - else if(argsLength===2) - { - if(!Object["isInstanceOfType"](args[0])) - throw Error.argument("options"); - if(!Function["isInstanceOfType"](args[1])) - throw Error.argument("callback"); - options=args[0]; - callback=args[1] - } - else if(argsLength) - throw Error.parameterCount(window["_u"]["ExtensibilityStrings"]["l_ParametersNotAsExpected_Text"]); - if(isCallbackRequired && !callback) - throw Error.argumentNull("callback"); - if(options && !$h.ScriptHelpers.isNullOrUndefined(options["asyncContext"])) - asyncContext=options["asyncContext"]; - return new $h.CommonParameters(options,callback,asyncContext) - }; - $h.CommonParameters._tryParseLegacy$p=function(args, commonParameters) - { - commonParameters["val"]=null; - var argsLength=args["length"]; - var callback=null; - var userContext=null; - if(!argsLength || argsLength > 2) - return false; - if(!Function["isInstanceOfType"](args[0])) - return false; - callback=args[0]; - if(argsLength > 1) - userContext=args[1]; - commonParameters["val"]=new $h.CommonParameters(null,callback,userContext); - return true - }; - $h.CommonParameters.prototype={ - _options$p$0: null, - _callback$p$0: null, - _asyncContext$p$0: null, - get_options: function() - { - return this._options$p$0 - }, - get_callback: function() - { - return this._callback$p$0 - }, - get_asyncContext: function() - { - return this._asyncContext$p$0 - } - }; - $h.EwsRequest=function(userContext) - { - $h.EwsRequest["initializeBase"](this,[userContext]) - }; - $h.EwsRequest.prototype={ - readyState: 1, - status: 0, - statusText: null, - onreadystatechange: null, - responseText: null, - get__statusCode$i$1: function() - { - return this.status - }, - set__statusCode$i$1: function(value) - { - this.status=value; - return value - }, - get__statusDescription$i$1: function() - { - return this.statusText - }, - set__statusDescription$i$1: function(value) - { - this.statusText=value; - return value - }, - get__requestState$i$1: function() - { - return this.readyState - }, - set__requestState$i$1: function(value) - { - this.readyState=value; - return value - }, - get_hasOnReadyStateChangeCallback: function() - { - return!$h.ScriptHelpers.isNullOrUndefined(this.onreadystatechange) - }, - get__response$i$1: function() - { - return this.responseText - }, - set__response$i$1: function(value) - { - this.responseText=value; - return value - }, - send: function(data) - { - this._checkSendConditions$i$1(); - if($h.ScriptHelpers.isNullOrUndefined(data)) - this._throwInvalidStateException$i$1(); - this._sendRequest$i$0(5,"EwsRequest",{body: data}) - }, - _callOnReadyStateChangeCallback$i$1: function() - { - if(!$h.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)) - this.onreadystatechange() - }, - _parseExtraResponseData$i$1: function(response){}, - executeExtraFailedResponseSteps: function(){} - }; - $h.InitialData=function(data) - { - this._data$p$0=data; - this._permissionLevel$p$0=this._calculatePermissionLevel$p$0() - }; - $h.InitialData._defineReadOnlyProperty$i=function(o, methodName, getter) - { - var propertyDescriptor={ - get: getter, - configurable: false - }; - window["Object"]["defineProperty"](o,methodName,propertyDescriptor) - }; - $h.InitialData.prototype={ - _toRecipients$p$0: null, - _ccRecipients$p$0: null, - _attachments$p$0: null, - _resources$p$0: null, - _entities$p$0: null, - _selectedEntities$p$0: null, - _data$p$0: null, - _permissionLevel$p$0: 0, - get__isRestIdSupported$i$0: function() - { - return this._data$p$0["isRestIdSupported"] - }, - get__itemId$i$0: function() - { - return this._data$p$0["id"] - }, - get__itemClass$i$0: function() - { - return this._data$p$0["itemClass"] - }, - get__dateTimeCreated$i$0: function() - { - return new Date(this._data$p$0["dateTimeCreated"]) - }, - get__dateTimeModified$i$0: function() - { - return new Date(this._data$p$0["dateTimeModified"]) - }, - get__dateTimeSent$i$0: function() - { - return new Date(this._data$p$0["dateTimeSent"]) - }, - get__subject$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - return this._data$p$0["subject"] - }, - get__normalizedSubject$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - return this._data$p$0["normalizedSubject"] - }, - get__internetMessageId$i$0: function() - { - return this._data$p$0["internetMessageId"] - }, - get__conversationId$i$0: function() - { - return this._data$p$0["conversationId"] - }, - get__sender$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - var sender=this._data$p$0["sender"]; - return $h.ScriptHelpers.isNullOrUndefined(sender) ? null : new $h.EmailAddressDetails(sender) - }, - get__from$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - var from=this._data$p$0["from"]; - return $h.ScriptHelpers.isNullOrUndefined(from) ? null : new $h.EmailAddressDetails(from) - }, - get__to$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - if(null===this._toRecipients$p$0) - this._toRecipients$p$0=this._createEmailAddressDetails$p$0("to"); - return this._toRecipients$p$0 - }, - get__cc$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - if(null===this._ccRecipients$p$0) - this._ccRecipients$p$0=this._createEmailAddressDetails$p$0("cc"); - return this._ccRecipients$p$0 - }, - get__attachments$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - if(null===this._attachments$p$0) - this._attachments$p$0=this._createAttachmentDetails$p$0(); - return this._attachments$p$0 - }, - get__ewsUrl$i$0: function() - { - return this._data$p$0["ewsUrl"] - }, - get__restUrl$i$0: function() - { - return this._data$p$0["restUrl"] - }, - get__marketplaceAssetId$i$0: function() - { - return this._data$p$0["marketplaceAssetId"] - }, - get__extensionId$i$0: function() - { - return this._data$p$0["extensionId"] - }, - get__marketplaceContentMarket$i$0: function() - { - return this._data$p$0["marketplaceContentMarket"] - }, - get__consentMetadata$i$0: function() - { - return this._data$p$0["consentMetadata"] - }, - get__isRead$i$0: function() - { - return this._data$p$0["isRead"] - }, - get__endNodeUrl$i$0: function() - { - return this._data$p$0["endNodeUrl"] - }, - get__entryPointUrl$i$0: function() - { - return this._data$p$0["entryPointUrl"] - }, - get__start$i$0: function() - { - return new Date(this._data$p$0["start"]) - }, - get__end$i$0: function() - { - return new Date(this._data$p$0["end"]) - }, - get__location$i$0: function() - { - return this._data$p$0["location"] - }, - get__userProfileType$i$0: function() - { - return this._data$p$0["userProfileType"] - }, - get__resources$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - if(null===this._resources$p$0) - this._resources$p$0=this._createEmailAddressDetails$p$0("resources"); - return this._resources$p$0 - }, - get__organizer$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - var organizer=this._data$p$0["organizer"]; - return $h.ScriptHelpers.isNullOrUndefined(organizer) ? null : new $h.EmailAddressDetails(organizer) - }, - get__userDisplayName$i$0: function() - { - return this._data$p$0["userDisplayName"] - }, - get__userEmailAddress$i$0: function() - { - return this._data$p$0["userEmailAddress"] - }, - get__userTimeZone$i$0: function() - { - return this._data$p$0["userTimeZone"] - }, - get__timeZoneOffsets$i$0: function() - { - return this._data$p$0["timeZoneOffsets"] - }, - get__hostVersion$i$0: function() - { - return this._data$p$0["hostVersion"] - }, - get__owaView$i$0: function() - { - return this._data$p$0["owaView"] - }, - get__overrideWindowOpen$i$0: function() - { - return this._data$p$0["overrideWindowOpen"] - }, - _getEntities$i$0: function() - { - if(!this._entities$p$0) - this._entities$p$0=new $h.Entities(this._data$p$0["entities"],this._data$p$0["filteredEntities"],this.get__dateTimeSent$i$0(),this._permissionLevel$p$0); - return this._entities$p$0 - }, - _getSelectedEntities$i$0: function() - { - if(!this._selectedEntities$p$0) - this._selectedEntities$p$0=new $h.Entities(this._data$p$0["selectedEntities"],null,this.get__dateTimeSent$i$0(),this._permissionLevel$p$0); - return this._selectedEntities$p$0 - }, - _getEntitiesByType$i$0: function(entityType) - { - var entites=this._getEntities$i$0(); - return entites._getByType$i$0(entityType) - }, - _getFilteredEntitiesByName$i$0: function(name) - { - var entities=this._getEntities$i$0(); - return entities._getFilteredEntitiesByName$i$0(name) - }, - _getRegExMatches$i$0: function() - { - if(!this._data$p$0["regExMatches"]) - return null; - return this._data$p$0["regExMatches"] - }, - _getSelectedRegExMatches$i$0: function() - { - if(!this._data$p$0["selectedRegExMatches"]) - return null; - return this._data$p$0["selectedRegExMatches"] - }, - _getRegExMatchesByName$i$0: function(regexName) - { - var regexMatches=this._getRegExMatches$i$0(); - if(!regexMatches || !regexMatches[regexName]) - return null; - return regexMatches[regexName] - }, - _throwOnRestrictedPermissionLevel$i$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0) - }, - _createEmailAddressDetails$p$0: function(key) - { - var to=this._data$p$0[key]; - if($h.ScriptHelpers.isNullOrUndefined(to)) - return[]; - var recipients=[]; - for(var i=0; i < to["length"]; i++) - if(!$h.ScriptHelpers.isNullOrUndefined(to[i])) - recipients[i]=new $h.EmailAddressDetails(to[i]); - return recipients - }, - _createAttachmentDetails$p$0: function() - { - var attachments=this._data$p$0["attachments"]; - if($h.ScriptHelpers.isNullOrUndefined(attachments)) - return[]; - var attachmentDetails=[]; - for(var i=0; i < attachments["length"]; i++) - if(!$h.ScriptHelpers.isNullOrUndefined(attachments[i])) - attachmentDetails[i]=new $h.AttachmentDetails(attachments[i]); - return attachmentDetails - }, - _calculatePermissionLevel$p$0: function() - { - var HostReadItem=1; - var HostReadWriteMailbox=2; - var HostReadWriteItem=3; - var permissionLevelFromHost=this._data$p$0["permissionLevel"]; - if($h.ScriptHelpers.isUndefined(this._permissionLevel$p$0)) - return 0; - switch(permissionLevelFromHost) - { - case HostReadItem: - return 1; - case HostReadWriteItem: - return 2; - case HostReadWriteMailbox: - return 3; - default: - return 0 - } - } - }; - $h._loadDictionaryRequest=function(createResultObject, dictionaryName, callback, userContext) - { - $h._loadDictionaryRequest["initializeBase"](this,[userContext]); - this._createResultObject$p$1=createResultObject; - this._dictionaryName$p$1=dictionaryName; - this._callback$p$1=callback - }; - $h._loadDictionaryRequest.prototype={ - _dictionaryName$p$1: null, - _createResultObject$p$1: null, - _callback$p$1: null, - handleResponse: function(response) - { - if(response["wasSuccessful"]) - { - var value=response[this._dictionaryName$p$1]; - var responseData=window["JSON"]["parse"](value); - this.createAsyncResult(this._createResultObject$p$1(responseData),0,0,null) - } - else - this.createAsyncResult(null,1,9020,response["errorMessage"]); - this._callback$p$1(this._asyncResult$p$0) - } - }; - $h.ProxyRequestBase=function(userContext) - { - $h.ProxyRequestBase["initializeBase"](this,[userContext]) - }; - $h.ProxyRequestBase.prototype={ - handleResponse: function(response) - { - if(!response["wasProxySuccessful"]) - { - this.set__statusCode$i$1(500); - this.set__statusDescription$i$1("Error"); - var errorMessage=response["errorMessage"]; - this.set__response$i$1(errorMessage); - this.createAsyncResult(null,1,9020,errorMessage) - } - else - { - this.set__statusCode$i$1(response["statusCode"]); - this.set__statusDescription$i$1(response["statusDescription"]); - this.set__response$i$1(response["body"]); - this.createAsyncResult(this.get__response$i$1(),0,0,null) - } - this._parseExtraResponseData$i$1(response); - this._cycleReadyStateFromHeadersReceivedToLoadingToDone$i$1() - }, - _throwInvalidStateException$i$1: function() - { - throw Error.create("DOMException",{ - code: 11, - message: "INVALID_STATE_ERR" - }); - }, - _cycleReadyStateFromHeadersReceivedToLoadingToDone$i$1: function() - { - var $$t_0=this; - this._changeReadyState$i$1(2,function() - { - $$t_0._changeReadyState$i$1(3,function() - { - $$t_0._changeReadyState$i$1(4,null) - }) - }) - }, - _changeReadyState$i$1: function(state, nextStep) - { - this.set__requestState$i$1(state); - var $$t_2=this; - window.setTimeout(function() - { - try - { - $$t_2._callOnReadyStateChangeCallback$i$1() - } - finally - { - if(!$h.ScriptHelpers.isNullOrUndefined(nextStep)) - nextStep() - } - },0) - }, - _checkSendConditions$i$1: function() - { - if(this.get__requestState$i$1() !==1) - this._throwInvalidStateException$i$1(); - if(this._isSent$p$0) - this._throwInvalidStateException$i$1() - } - }; - $h.RequestBase=function(userContext) - { - this._userContext$p$0=userContext - }; - $h.RequestBase.prototype={ - _isSent$p$0: false, - _asyncResult$p$0: null, - _userContext$p$0: null, - get_asyncResult: function() - { - return this._asyncResult$p$0 - }, - _sendRequest$i$0: function(dispid, methodName, dataToSend) - { - this._isSent$p$0=true; - var $$t_5=this; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.invokeHostMethod(dispid,dataToSend,function(resultCode, response) - { - if(resultCode) - $$t_5.createAsyncResult(null,1,9017,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode)); - else - $$t_5.handleResponse(response) - }) - }, - createAsyncResult: function(value, errorCode, detailedErrorCode, errorDescription) - { - this._asyncResult$p$0=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(value,errorCode,detailedErrorCode,this._userContext$p$0,errorDescription) - } - }; - $h.SaveDictionaryRequest=function(callback, userContext) - { - $h.SaveDictionaryRequest["initializeBase"](this,[userContext]); - if(!$h.ScriptHelpers.isNullOrUndefined(callback)) - this._callback$p$1=callback - }; - $h.SaveDictionaryRequest.prototype={ - _callback$p$1: null, - handleResponse: function(response) - { - if(response["wasSuccessful"]) - this.createAsyncResult(null,0,0,null); - else - this.createAsyncResult(null,1,9020,response["errorMessage"]); - if(!$h.ScriptHelpers.isNullOrUndefined(this._callback$p$1)) - this._callback$p$1(this._asyncResult$p$0) - } - }; - $h.ScriptHelpers=function(){}; - $h.ScriptHelpers.isNull=function(value) - { - return null===value - }; - $h.ScriptHelpers.isNullOrUndefined=function(value) - { - return $h.ScriptHelpers.isNull(value) || $h.ScriptHelpers.isUndefined(value) - }; - $h.ScriptHelpers.isUndefined=function(value) - { - return value===undefined - }; - $h.ScriptHelpers.dictionaryContainsKey=function(obj, keyName) - { - return Object["isInstanceOfType"](obj) ? keyName in obj : false - }; - $h.ScriptHelpers.isNonEmptyString=function(value) - { - if(!value) - return false; - return String["isInstanceOfType"](value) - }; - $h.ScriptHelpers.deepClone=function(obj) - { - return window["JSON"]["parse"](window["JSON"]["stringify"](obj)) - }; - $h.ScriptHelpers.isValueTrue=function(value) - { - if(!$h.ScriptHelpers.isNullOrUndefined(value)) - return value["toString"]().toLowerCase()==="true"; - return false - }; - window["OSF"]["DDA"]["OutlookAppOm"]["registerClass"]("OSF.DDA.OutlookAppOm"); - window["OSF"]["DDA"]["Settings"]["registerClass"]("OSF.DDA.Settings"); - $h.AdditionalGlobalParameters["registerClass"]("$h.AdditionalGlobalParameters"); - $h.ItemBase["registerClass"]("$h.ItemBase"); - $h.Item["registerClass"]("$h.Item",$h.ItemBase); - $h.Appointment["registerClass"]("$h.Appointment",$h.Item); - $h.ComposeItem["registerClass"]("$h.ComposeItem",$h.ItemBase); - $h.AppointmentCompose["registerClass"]("$h.AppointmentCompose",$h.ComposeItem); - $h.AttachmentDetails["registerClass"]("$h.AttachmentDetails"); - $h.Body["registerClass"]("$h.Body"); - $h.ComposeBody["registerClass"]("$h.ComposeBody",$h.Body); - $h.ComposeRecipient["registerClass"]("$h.ComposeRecipient"); - $h.ComposeLocation["registerClass"]("$h.ComposeLocation"); - $h.ComposeSubject["registerClass"]("$h.ComposeSubject"); - $h.ComposeTime["registerClass"]("$h.ComposeTime"); - $h.Contact["registerClass"]("$h.Contact"); - $h.CustomProperties["registerClass"]("$h.CustomProperties"); - $h.Diagnostics["registerClass"]("$h.Diagnostics"); - $h.EmailAddressDetails["registerClass"]("$h.EmailAddressDetails"); - $h.Entities["registerClass"]("$h.Entities"); - $h.Message["registerClass"]("$h.Message",$h.Item); - $h.MeetingRequest["registerClass"]("$h.MeetingRequest",$h.Message); - $h.MeetingSuggestion["registerClass"]("$h.MeetingSuggestion"); - $h._extractedDate["registerClass"]("$h._extractedDate"); - $h._preciseDate["registerClass"]("$h._preciseDate",$h._extractedDate); - $h._relativeDate["registerClass"]("$h._relativeDate",$h._extractedDate); - $h.MessageCompose["registerClass"]("$h.MessageCompose",$h.ComposeItem); - $h.NotificationMessages["registerClass"]("$h.NotificationMessages"); - $h.PhoneNumber["registerClass"]("$h.PhoneNumber"); - $h.TaskSuggestion["registerClass"]("$h.TaskSuggestion"); - $h.UserProfile["registerClass"]("$h.UserProfile"); - $h.CommonParameters["registerClass"]("$h.CommonParameters"); - $h.RequestBase["registerClass"]("$h.RequestBase"); - $h.ProxyRequestBase["registerClass"]("$h.ProxyRequestBase",$h.RequestBase); - $h.EwsRequest["registerClass"]("$h.EwsRequest",$h.ProxyRequestBase); - $h.InitialData["registerClass"]("$h.InitialData"); - $h._loadDictionaryRequest["registerClass"]("$h._loadDictionaryRequest",$h.RequestBase); - $h.SaveDictionaryRequest["registerClass"]("$h.SaveDictionaryRequest",$h.RequestBase); - window["OSF"]["DDA"]["OutlookAppOm"].asyncMethodTimeoutKeyName="__timeout__"; - window["OSF"]["DDA"]["OutlookAppOm"].ewsIdOrEmailParamName="ewsIdOrEmail"; - window["OSF"]["DDA"]["OutlookAppOm"].moduleParamName="module"; - window["OSF"]["DDA"]["OutlookAppOm"].queryStringParamName="queryString"; - window["OSF"]["DDA"]["OutlookAppOm"]._maxRecipients$p=100; - window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p=255; - window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength=32768; - window["OSF"]["DDA"]["OutlookAppOm"]._maxLocationLength$p=255; - window["OSF"]["DDA"]["OutlookAppOm"]._maxEwsRequestSize$p=1e6; - window["OSF"]["DDA"]["OutlookAppOm"].executeMethodName="ExecuteMethod"; - window["OSF"]["DDA"]["OutlookAppOm"].getInitialDataMethodName="GetInitialData"; - window["OSF"]["DDA"]["OutlookAppOm"].itemIdParameterName="itemId"; - window["OSF"]["DDA"]["OutlookAppOm"].restVersionParameterName="restVersion"; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p=null; - $h.AdditionalGlobalParameters.itemNumberKey="itemNumber"; - $h.AttachmentConstants.maxAttachmentNameLength=255; - $h.AttachmentConstants.maxUrlLength=2048; - $h.AttachmentConstants.maxItemIdLength=200; - $h.AttachmentConstants.maxRemoveIdLength=200; - $h.AttachmentConstants.attachmentParameterName="attachments"; - $h.AttachmentConstants.attachmentTypeParameterName="type"; - $h.AttachmentConstants.attachmentUrlParameterName="url"; - $h.AttachmentConstants.attachmentItemIdParameterName="itemId"; - $h.AttachmentConstants.attachmentNameParameterName="name"; - $h.AttachmentConstants.attachmentIsInlineParameterName="isInline"; - $h.AttachmentConstants.attachmentTypeFileName="file"; - $h.AttachmentConstants.attachmentTypeItemName="item"; - $h.AttachmentDetails._attachmentTypeMap$p=[window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["File"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["Item"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["Cloud"]]; - $h.Body.coercionTypeParameterName="coercionType"; - $h.ComposeRecipient.displayNameLengthLimit=255; - $h.ComposeRecipient.maxSmtpLength=571; - $h.ComposeRecipient.recipientsLimit=100; - $h.ComposeRecipient.totalRecipientsLimit=500; - $h.ComposeRecipient.addressParameterName="address"; - $h.ComposeRecipient.nameParameterName="name"; - $h.ComposeLocation.locationKey="location"; - $h.ComposeLocation.maximumLocationLength=255; - $h.ComposeSubject.maximumSubjectLength=255; - $h.ComposeTime.timeTypeName="TimeProperty"; - $h.ComposeTime.timeDataName="time"; - $h.Diagnostics.outlookAppName="Outlook"; - $h.Diagnostics.outlookWebAppName="OutlookWebApp"; - $h.Diagnostics.outlookIOSAppName="OutlookIOS"; - $h.Diagnostics.outlookAndroidAppName="OutlookAndroid"; - $h.EmailAddressDetails._emptyString$p=""; - $h.EmailAddressDetails._responseTypeMap$p=[window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["None"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Organizer"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Tentative"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Accepted"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Declined"]]; - $h.EmailAddressDetails._recipientTypeMap$p=[window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["Other"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["DistributionList"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["User"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["ExternalUser"]]; - $h.Entities._allEntityKeys$p=["Addresses","EmailAddresses","Urls","PhoneNumbers","TaskSuggestions","MeetingSuggestions","Contacts","FlightReservations","ParcelDeliveries"]; - $h.ReplyConstants.htmlBodyKeyName="htmlBody"; - $h.AsyncConstants.optionsKeyName="options"; - $h.AsyncConstants.callbackKeyName="callback"; - $h.AsyncConstants.asyncResultKeyName="asyncResult"; - $h.MeetingSuggestionTimeDecoder._baseDate$p=new Date("0001-01-01T00:00:00Z"); - $h.NotificationMessages.maximumKeyLength=32; - $h.NotificationMessages.maximumIconLength=32; - $h.NotificationMessages.maximumMessageLength=150; - $h.NotificationMessages.notificationsKeyParameterName="key"; - $h.NotificationMessages.notificationsTypeParameterName="type"; - $h.NotificationMessages.notificationsIconParameterName="icon"; - $h.NotificationMessages.notificationsMessageParameterName="message"; - $h.NotificationMessages.notificationsPersistentParameterName="persistent"; - $h.OutlookErrorManager.errorNameKey="name"; - $h.OutlookErrorManager.errorMessageKey="message"; - $h.OutlookErrorManager._isInitialized$p=false; - $h.OutlookErrorManager.OutlookErrorCodes.attachmentSizeExceeded=9e3; - $h.OutlookErrorManager.OutlookErrorCodes.numberOfAttachmentsExceeded=9001; - $h.OutlookErrorManager.OutlookErrorCodes.internalFormatError=9002; - $h.OutlookErrorManager.OutlookErrorCodes.invalidAttachmentId=9003; - $h.OutlookErrorManager.OutlookErrorCodes.invalidAttachmentPath=9004; - $h.OutlookErrorManager.OutlookErrorCodes.cannotAddAttachmentBeforeUpgrade=9005; - $h.OutlookErrorManager.OutlookErrorCodes.attachmentDeletedBeforeUploadCompletes=9006; - $h.OutlookErrorManager.OutlookErrorCodes.attachmentUploadGeneralFailure=9007; - $h.OutlookErrorManager.OutlookErrorCodes.attachmentToDeleteDoesNotExist=9008; - $h.OutlookErrorManager.OutlookErrorCodes.attachmentDeleteGeneralFailure=9009; - $h.OutlookErrorManager.OutlookErrorCodes.invalidEndTime=9010; - $h.OutlookErrorManager.OutlookErrorCodes.htmlSanitizationFailure=9011; - $h.OutlookErrorManager.OutlookErrorCodes.numberOfRecipientsExceeded=9012; - $h.OutlookErrorManager.OutlookErrorCodes.noValidRecipientsProvided=9013; - $h.OutlookErrorManager.OutlookErrorCodes.cursorPositionChanged=9014; - $h.OutlookErrorManager.OutlookErrorCodes.invalidSelection=9016; - $h.OutlookErrorManager.OutlookErrorCodes.accessRestricted=9017; - $h.OutlookErrorManager.OutlookErrorCodes.genericTokenError=9018; - $h.OutlookErrorManager.OutlookErrorCodes.genericSettingsError=9019; - $h.OutlookErrorManager.OutlookErrorCodes.genericResponseError=9020; - $h.OutlookErrorManager.OutlookErrorCodes.saveError=9021; - $h.OutlookErrorManager.OutlookErrorCodes.messageInDifferentStoreError=9022; - $h.OutlookErrorManager.OutlookErrorCodes.duplicateNotificationKey=9023; - $h.OutlookErrorManager.OutlookErrorCodes.notificationKeyNotFound=9024; - $h.OutlookErrorManager.OutlookErrorCodes.numberOfNotificationsExceeded=9025; - $h.OutlookErrorManager.OutlookErrorCodes.persistedNotificationArrayReadError=9026; - $h.OutlookErrorManager.OutlookErrorCodes.persistedNotificationArraySaveError=9027; - $h.OutlookErrorManager.OutlookErrorCodes.cannotPersistPropertyInUnsavedDraftError=9028; - $h.OutlookErrorManager.OutlookErrorCodes.callSaveAsyncBeforeToken=9029; - $h.OutlookErrorManager.OutlookErrorCodes.ooeInvalidDataFormat=2006; - $h.OutlookErrorManager.OsfDdaErrorCodes.ooeCoercionTypeNotSupported=1e3; - $h.CommonParameters.asyncContextKeyName="asyncContext"; - $h.InitialData.userProfileTypeKey="userProfileType"; - $h.ScriptHelpers.emptyString=""; - OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM); - if(appContext.get_appName()==OSF.AppName.OutlookWebApp || appContext.get_appName()==OSF.AppName.OutlookIOS || appContext.get_appName()==OSF.AppName.OutlookAndroid) - this._settings=this._initializeSettings(appContext,false); - else - this._settings=this._initializeSettings(false); - appContext.appOM=new OSF.DDA.OutlookAppOm(appContext,this._webAppState.wnd,appReady); - if(appContext.get_appName()==OSF.AppName.Outlook || appContext.get_appName()==OSF.AppName.OutlookWebApp) - OSF.DDA.DispIdHost.addEventSupport(appContext.appOM,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.ItemChanged])) + Type.registerNamespace("Microsoft.Office.WebExtension.MailboxEnums"); + Microsoft.Office.WebExtension.MailboxEnums.EntityType = { + MeetingSuggestion: "meetingSuggestion", + TaskSuggestion: "taskSuggestion", + Address: "address", + EmailAddress: "emailAddress", + Url: "url", + PhoneNumber: "phoneNumber", + Contact: "contact", + FlightReservations: "flightReservations", + ParcelDeliveries: "parcelDeliveries" + }; + Microsoft.Office.WebExtension.MailboxEnums.ItemType = { + Message: "message", + Appointment: "appointment" + }; + Microsoft.Office.WebExtension.MailboxEnums.ResponseType = { + None: "none", + Organizer: "organizer", + Tentative: "tentative", + Accepted: "accepted", + Declined: "declined" + }; + Microsoft.Office.WebExtension.MailboxEnums.RecipientType = { + Other: "other", + DistributionList: "distributionList", + User: "user", + ExternalUser: "externalUser" + }; + Microsoft.Office.WebExtension.MailboxEnums.AttachmentType = { + File: "file", + Item: "item", + Cloud: "cloud" + }; + Microsoft.Office.WebExtension.MailboxEnums.BodyType = { + Text: "text", + Html: "html" + }; + Microsoft.Office.WebExtension.MailboxEnums.ItemNotificationMessageType = { + ProgressIndicator: "progressIndicator", + InformationalMessage: "informationalMessage", + ErrorMessage: "errorMessage", + InsightMessage: "insightMessage" + }; + Microsoft.Office.WebExtension.MailboxEnums.Folder = { + Inbox: "inbox", + Junk: "junk", + DeletedItems: "deletedItems" + }; + Microsoft.Office.WebExtension.CoercionType = { + Text: "text", + Html: "html" + }; + Microsoft.Office.WebExtension.MailboxEnums.UserProfileType = { + Office365: "office365", + OutlookCom: "outlookCom", + Enterprise: "enterprise" + }; + Microsoft.Office.WebExtension.MailboxEnums.RestVersion = { + v1_0: "v1.0", + v2_0: "v2.0", + Beta: "beta" + }; + Microsoft.Office.WebExtension.MailboxEnums.ModuleType = {Addins: "addins"}; + Microsoft.Office.WebExtension.MailboxEnums.ActionType = {ShowTaskPane: "showTaskPane"}; + Type.registerNamespace("OSF.DDA"); + var OSF = window["OSF"] || {}; + OSF.DDA = OSF.DDA || {}; + window["OSF"]["DDA"]["OutlookAppOm"] = OSF.DDA.OutlookAppOm = function(officeAppContext, targetWindow, appReadyCallback) + { + this.$$d_navigateToModuleAsync = Function.createDelegate(this,this.navigateToModuleAsync); + this.$$d_displayPersonaCardAsync = Function.createDelegate(this,this.displayPersonaCardAsync); + this.$$d_displayNewMessageFormApi = Function.createDelegate(this,this.displayNewMessageFormApi); + this.$$d__displayNewAppointmentFormApi$p$0 = Function.createDelegate(this,this._displayNewAppointmentFormApi$p$0); + this.$$d_windowOpenOverrideHandler = Function.createDelegate(this,this.windowOpenOverrideHandler); + this.$$d__getRestUrl$p$0 = Function.createDelegate(this,this._getRestUrl$p$0); + this.$$d__getEwsUrl$p$0 = Function.createDelegate(this,this._getEwsUrl$p$0); + this.$$d__getDiagnostics$p$0 = Function.createDelegate(this,this._getDiagnostics$p$0); + this.$$d__getUserProfile$p$0 = Function.createDelegate(this,this._getUserProfile$p$0); + this.$$d_getItem = Function.createDelegate(this,this.getItem); + this.$$d__callAppReadyCallback$p$0 = Function.createDelegate(this,this._callAppReadyCallback$p$0); + this.$$d__getInitialDataResponseHandler$p$0 = Function.createDelegate(this,this._getInitialDataResponseHandler$p$0); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p = this; + this._officeAppContext$p$0 = officeAppContext; + this._appReadyCallback$p$0 = appReadyCallback; + var $$t_4 = this; + var stringLoadedCallback = function() + { + if(appReadyCallback) + if(!$$t_4._officeAppContext$p$0["get_isDialog"]()) + $$t_4.invokeHostMethod(1,null,$$t_4.$$d__getInitialDataResponseHandler$p$0); + else + window.setTimeout($$t_4.$$d__callAppReadyCallback$p$0,0) + }; + if(this._areStringsLoaded$p$0()) + stringLoadedCallback(); + else + this._loadLocalizedScript$p$0(stringLoadedCallback) + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i = function(currentPermissionLevel) + { + if(!currentPermissionLevel) + throw Error.create(window["_u"]["ExtensibilityStrings"]["l_ElevatedPermissionNeeded_Text"]); + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i = function(value, minValue, maxValue, argumentName) + { + if(value < minValue || value > maxValue) + throw Error.argumentOutOfRange(argumentName); + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidModule$p = function(module) + { + if($h.ScriptHelpers.isNullOrUndefined(module)) + throw Error.argumentNull("module"); + else if(module === "") + throw Error.argument("module","module cannot be empty."); + if(module !== window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ModuleType"]["Addins"]) + throw Error.notImplemented(String.format("API not supported for module '{0}'",module)); + }; + window["OSF"]["DDA"]["OutlookAppOm"]._getHtmlBody$p = function(data) + { + var htmlBody = ""; + if("htmlBody" in data) + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidHtmlBody$p(data["htmlBody"]); + htmlBody = data["htmlBody"] + } + return htmlBody + }; + window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p = function(data) + { + var attachments = []; + if("attachments" in data) + { + attachments = data["attachments"]; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentsArray$p(attachments) + } + return attachments + }; + window["OSF"]["DDA"]["OutlookAppOm"]._getOptionsAndCallback$p = function(data) + { + var args = []; + if("options" in data) + args[0] = data["options"]; + if("callback" in data) + args[args["length"]] = data["callback"]; + return args + }; + window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p = function(attachments) + { + var attachmentsData = new Array(0); + if(Array["isInstanceOfType"](attachments)) + for(var i = 0; i < attachments["length"]; i++) + if(Object["isInstanceOfType"](attachments[i])) + { + var attachment = attachments[i]; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachment$p(attachment); + attachmentsData[i] = window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentData$p(attachment) + } + else + throw Error.argument("attachments"); + return attachmentsData + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidHtmlBody$p = function(htmlBody) + { + if(!String["isInstanceOfType"](htmlBody)) + throw Error.argument("htmlBody"); + if($h.ScriptHelpers.isNullOrUndefined(htmlBody)) + throw Error.argument("htmlBody"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(htmlBody.length,0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody") + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentsArray$p = function(attachments) + { + if(!Array["isInstanceOfType"](attachments)) + throw Error.argument("attachments"); + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachment$p = function(attachment) + { + if(!Object["isInstanceOfType"](attachment)) + throw Error.argument("attachments"); + if(!("type" in attachment) || !("name" in attachment)) + throw Error.argument("attachments"); + if(!("url" in attachment || "itemId" in attachment)) + throw Error.argument("attachments"); + }; + window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentData$p = function(attachment) + { + var attachmentData = null; + if(attachment["type"] === "file") + { + var url = attachment["url"]; + var name = attachment["name"]; + var isInline = $h.ScriptHelpers.isValueTrue(attachment["isInline"]); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentUrlOrName$p(url,name); + attachmentData = window["OSF"]["DDA"]["OutlookAppOm"]._createFileAttachmentData$p(url,name,isInline) + } + else if(attachment["type"] === "item") + { + var itemId = window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(attachment["itemId"]); + var name = attachment["name"]; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentItemIdOrName$p(itemId,name); + attachmentData = window["OSF"]["DDA"]["OutlookAppOm"]._createItemAttachmentData$p(itemId,name) + } + else + throw Error.argument("attachments"); + return attachmentData + }; + window["OSF"]["DDA"]["OutlookAppOm"]._createFileAttachmentData$p = function(url, name, isInline) + { + return["file",name,url,isInline] + }; + window["OSF"]["DDA"]["OutlookAppOm"]._createItemAttachmentData$p = function(itemId, name) + { + return["item",name,itemId] + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentUrlOrName$p = function(url, name) + { + if(!String["isInstanceOfType"](url) || !String["isInstanceOfType"](name)) + throw Error.argument("attachments"); + if(url.length > 2048) + throw Error.argumentOutOfRange("attachments",url.length,window["_u"]["ExtensibilityStrings"]["l_AttachmentUrlTooLong_Text"]); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p(name) + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentItemIdOrName$p = function(itemId, name) + { + if(!String["isInstanceOfType"](itemId) || !String["isInstanceOfType"](name)) + throw Error.argument("attachments"); + if(itemId.length > 200) + throw Error.argumentOutOfRange("attachments",itemId.length,window["_u"]["ExtensibilityStrings"]["l_AttachmentItemIdTooLong_Text"]); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p(name) + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p = function(name) + { + if(name.length > 255) + throw Error.argumentOutOfRange("attachments",name.length,window["_u"]["ExtensibilityStrings"]["l_AttachmentNameTooLong_Text"]); + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p = function(restVersion) + { + if(!restVersion) + throw Error.argumentNull("restVersion"); + if(restVersion !== window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"] && restVersion !== window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v2_0"] && restVersion !== window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["Beta"]) + throw Error.argument("restVersion"); + }; + window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost = function(itemId) + { + if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._initialData$p$0 && window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._initialData$p$0.get__isRestIdSupported$i$0()) + return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToRestId"](itemId,window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"]); + return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToEwsId"](itemId,window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"]) + }; + window["OSF"]["DDA"]["OutlookAppOm"]["addAdditionalArgs"] = function(dispid, data) + { + return data + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p = function(value, expectedType, argumentName) + { + if(Object["getType"](value) !== expectedType) + throw Error.argumentType(argumentName); + }; + window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p = function(value, minLength, maxLength, name) + { + if($h.ScriptHelpers.isNullOrUndefined(value)) + return; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(value,String,name); + var stringValue = value; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(stringValue.length,minLength,maxLength,name) + }; + window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p = function(array) + { + return array ? array["join"](";") : null + }; + window["OSF"]["DDA"]["OutlookAppOm"]._convertComposeEmailDictionaryParameterForSetApi$p = function(recipients) + { + if(!recipients) + return null; + var results = new Array(recipients["length"]); + for(var i = 0; i < recipients["length"]; i++) + results[i] = [recipients[i]["address"],recipients[i]["name"]]; + return results + }; + window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p = function(emailset, name) + { + if($h.ScriptHelpers.isNullOrUndefined(emailset)) + return null; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(emailset,Array,name); + var originalAttendees = emailset; + var updatedAttendees = null; + var normalizationNeeded = false; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(originalAttendees["length"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxRecipients$p,String.format("{0}.length",name)); + for(var i = 0; i < originalAttendees["length"]; i++) + if($h.EmailAddressDetails["isInstanceOfType"](originalAttendees[i])) + { + normalizationNeeded = true; + break + } + if(normalizationNeeded) + updatedAttendees = []; + for(var i = 0; i < originalAttendees["length"]; i++) + if(normalizationNeeded) + { + updatedAttendees[i] = $h.EmailAddressDetails["isInstanceOfType"](originalAttendees[i]) ? originalAttendees[i]["emailAddress"] : originalAttendees[i]; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(updatedAttendees[i],String,String.format("{0}[{1}]",name,i)) + } + else + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(originalAttendees[i],String,String.format("{0}[{1}]",name,i)); + return updatedAttendees + }; + OSF.DDA.OutlookAppOm.prototype = { + _initialData$p$0: null, + _item$p$0: null, + _userProfile$p$0: null, + _diagnostics$p$0: null, + _officeAppContext$p$0: null, + _appReadyCallback$p$0: null, + _clientEndPoint$p$0: null, + _hostItemType$p$0: 0, + _additionalOutlookParams$p$0: null, + get_clientEndPoint: function() + { + if(!this._clientEndPoint$p$0) + this._clientEndPoint$p$0 = OSF._OfficeAppFactory["getClientEndPoint"](); + return this._clientEndPoint$p$0 + }, + set_clientEndPoint: function(value) + { + this._clientEndPoint$p$0 = value; + return value + }, + get_initialData: function() + { + return this._initialData$p$0 + }, + get__appName$i$0: function() + { + return this._officeAppContext$p$0["get_appName"]() + }, + get_additionalOutlookParams: function() + { + return this._additionalOutlookParams$p$0 + }, + addEventSupport: function() + { + if(this._item$p$0) + OSF.DDA.DispIdHost["addEventSupport"](this._item$p$0,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType["RecipientsChanged"],Microsoft.Office.WebExtension.EventType["AppointmentTimeChanged"]])) + }, + windowOpenOverrideHandler: function(url, targetName, features, replace) + { + this.invokeHostMethod(403,{launchUrl: url},null) + }, + createAsyncResult: function(value, errorCode, detailedErrorCode, userContext, errorMessage) + { + var initArgs = {}; + var errorArgs = null; + initArgs[OSF.DDA.AsyncResultEnum.Properties["Value"]] = value; + initArgs[OSF.DDA.AsyncResultEnum.Properties["Context"]] = userContext; + if(0 !== errorCode) + { + errorArgs = {}; + var errorProperties = $h.OutlookErrorManager.getErrorArgs(detailedErrorCode); + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties["Name"]] = errorProperties["name"]; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties["Message"]] = !errorMessage ? errorProperties["message"] : errorMessage; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties["Code"]] = detailedErrorCode + } + return new OSF.DDA.AsyncResult(initArgs,errorArgs) + }, + _throwOnMethodCallForInsufficientPermission$i$0: function(requiredPermissionLevel, methodName) + { + if(this._initialData$p$0._permissionLevel$p$0 < requiredPermissionLevel) + throw Error.create(String.format(window["_u"]["ExtensibilityStrings"]["l_ElevatedPermissionNeededForMethod_Text"],methodName)); + }, + _displayReplyForm$i$0: function(obj) + { + this._displayReplyFormHelper$p$0(obj,false) + }, + _displayReplyAllForm$i$0: function(obj) + { + this._displayReplyFormHelper$p$0(obj,true) + }, + setActionsDefinition: function(actionsDefinition) + { + this._additionalOutlookParams$p$0.setActionsDefinition(actionsDefinition) + }, + get_itemNumber: function() + { + return this._additionalOutlookParams$p$0._itemNumber$p$0 + }, + get_actionsDefinition: function() + { + return this._additionalOutlookParams$p$0._actionsDefinition$p$0 + }, + _displayReplyFormHelper$p$0: function(obj, isReplyAll) + { + if(String["isInstanceOfType"](obj)) + this._doDisplayReplyForm$p$0(obj,isReplyAll); + else if(Object["isInstanceOfType"](obj) && Object.getTypeName(obj) === "Object") + this._doDisplayReplyFormWithAttachments$p$0(obj,isReplyAll); + else + throw Error.argumentType(); + }, + _doDisplayReplyForm$p$0: function(htmlBody, isReplyAll) + { + if(!$h.ScriptHelpers.isNullOrUndefined(htmlBody)) + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(htmlBody.length,0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody"); + this.invokeHostMethod(isReplyAll ? 11 : 10,{htmlBody: htmlBody},null) + }, + _doDisplayReplyFormWithAttachments$p$0: function(data, isReplyAll) + { + var htmlBody = window["OSF"]["DDA"]["OutlookAppOm"]._getHtmlBody$p(data); + var attachments = window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p(data); + var parameters = $h.CommonParameters.parse(window["OSF"]["DDA"]["OutlookAppOm"]._getOptionsAndCallback$p(data),false); + var $$t_6 = this; + this._standardInvokeHostMethod$i$0(isReplyAll ? 31 : 30,{ + htmlBody: htmlBody, + attachments: window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p(attachments) + },function(rawInput) + { + return rawInput + },parameters._asyncContext$p$0,parameters._callback$p$0) + }, + _standardInvokeHostMethod$i$0: function(dispid, data, format, userContext, callback) + { + var $$t_B = this; + this.invokeHostMethod(dispid,data,function(resultCode, response) + { + if(callback) + { + var asyncResult = null; + if(Object["isInstanceOfType"](response)) + { + var responseDictionary = response; + if("error" in responseDictionary || "data" in responseDictionary || "errorCode" in responseDictionary) + if(!responseDictionary["error"]) + { + var formattedData = format ? format(responseDictionary["data"]) : responseDictionary["data"]; + asyncResult = $$t_B.createAsyncResult(formattedData,0,0,userContext,null) + } + else + { + var errorCode = responseDictionary["errorCode"]; + asyncResult = $$t_B.createAsyncResult(null,1,errorCode,userContext,null) + } + } + if(!asyncResult && resultCode) + asyncResult = $$t_B.createAsyncResult(null,1,9002,userContext,null); + callback(asyncResult) + } + }) + }, + getItemNumberFromOutlookResponse: function(responseData) + { + var itemNumber = 0; + if(responseData["length"] > 2) + { + var extraParameters = window["JSON"]["parse"](responseData[2]); + if(Object["isInstanceOfType"](extraParameters)) + { + var extraParametersDictionary = extraParameters; + itemNumber = extraParametersDictionary["itemNumber"] + } + } + return itemNumber + }, + createDeserializedData: function(responseData, itemChanged) + { + var deserializedData = null; + var returnValues = window["JSON"]["parse"](responseData[0]); + if(Object["isInstanceOfType"](returnValues)) + deserializedData = this._createDeserializedDataWithDictionary$p$0(responseData,itemChanged); + else if(Number["isInstanceOfType"](returnValues)) + deserializedData = this._createDeserializedDataWithInt$p$0(responseData,itemChanged); + else + throw Error.notImplemented("Return data type from host must be Dictionary or int"); + return deserializedData + }, + _createDeserializedDataWithDictionary$p$0: function(responseData, itemChanged) + { + var deserializedData = window["JSON"]["parse"](responseData[0]); + if(itemChanged) + { + deserializedData["error"] = true; + deserializedData["errorCode"] = 9030 + } + else if(responseData["length"] > 1 && responseData[1]) + { + deserializedData["error"] = true; + deserializedData["errorCode"] = responseData[1] + } + else + deserializedData["error"] = false; + return deserializedData + }, + _createDeserializedDataWithInt$p$0: function(responseData, itemChanged) + { + var deserializedData = {}; + deserializedData["error"] = true; + deserializedData["errorCode"] = responseData[0]; + return deserializedData + }, + invokeHostMethod: function(dispid, data, responseCallback) + { + var startTime = (new Date)["getTime"](); + var $$t_A = this; + var invokeResponseCallback = function(resultCode, resultData) + { + if(window["OSF"]["AppTelemetry"]) + { + var deserializedData = resultData; + var detailedErrorCode = -1; + if(deserializedData && deserializedData["errorCode"]) + detailedErrorCode = deserializedData["errorCode"]; + window["OSF"]["AppTelemetry"]["onMethodDone"](dispid,null,Math["abs"]((new Date)["getTime"]() - startTime),detailedErrorCode) + } + if(responseCallback) + responseCallback(resultCode,resultData) + }; + if(64 === this._officeAppContext$p$0["get_appName"]()) + { + var args = {ApiParams: data}; + args["MethodData"] = { + ControlId: OSF._OfficeAppFactory["getId"](), + DispatchId: dispid + }; + args = window["OSF"]["DDA"]["OutlookAppOm"]["addAdditionalArgs"](dispid,args); + if(dispid === 1) + this.get_clientEndPoint()["invoke"]("GetInitialData",invokeResponseCallback,args); + else + this.get_clientEndPoint()["invoke"]("ExecuteMethod",invokeResponseCallback,args) + } + else if(!this._isOwaOnlyMethod$p$0(dispid)) + this.callOutlookDispatcher(dispid,data,responseCallback,startTime); + else if(responseCallback) + responseCallback(-2,null) + }, + callOutlookDispatcher: function(dispid, data, responseCallback, startTime) + { + var executeParameters = this.convertToOutlookParameters(dispid,data); + var $$t_D = this; + OSF.ClientHostController["execute"](dispid,executeParameters,function(nativeData, resultCode) + { + var detailedErrorCode = -1; + var deserializedData = null; + var responseData = nativeData.toArray(); + if(responseData["length"] > 0) + { + var itemNumberFromOutlookResponse = $$t_D.getItemNumberFromOutlookResponse(responseData); + var isValidItemNumber = itemNumberFromOutlookResponse > 0; + var itemChanged = isValidItemNumber && itemNumberFromOutlookResponse > $$t_D._additionalOutlookParams$p$0._itemNumber$p$0; + deserializedData = $$t_D.createDeserializedData(responseData,itemChanged); + if(deserializedData && deserializedData["errorCode"]) + detailedErrorCode = deserializedData["errorCode"] + } + else if(responseCallback) + throw Error.argumentNull("responseData","Unexpected null/empty data from host."); + if(window["OSF"]["AppTelemetry"]) + window["OSF"]["AppTelemetry"]["onMethodDone"](dispid,null,Math["abs"]((new Date)["getTime"]() - startTime),detailedErrorCode); + if(responseCallback) + responseCallback(resultCode,deserializedData) + }) + }, + _dictionaryToDate$i$0: function(input) + { + var retValue = new Date(input["year"],input["month"],input["date"],input["hours"],input["minutes"],input["seconds"],!input["milliseconds"] ? 0 : input["milliseconds"]); + if(window["isNaN"](retValue["getTime"]())) + throw Error.format(window["_u"]["ExtensibilityStrings"]["l_InvalidDate_Text"]); + return retValue + }, + _dateToDictionary$i$0: function(input) + { + var retValue = {}; + retValue["month"] = input["getMonth"](); + retValue["date"] = input["getDate"](); + retValue["year"] = input["getFullYear"](); + retValue["hours"] = input["getHours"](); + retValue["minutes"] = input["getMinutes"](); + retValue["seconds"] = input["getSeconds"](); + retValue["milliseconds"] = input["getMilliseconds"](); + return retValue + }, + _isOwaOnlyMethod$p$0: function(dispId) + { + switch(dispId) + { + case 402: + case 401: + case 400: + case 403: + return true; + default: + return false + } + }, + isOutlook16OrGreater: function() + { + var hostVersion = this._initialData$p$0.get__hostVersion$i$0(); + var endIndex = 0; + var majorVersionNumber = 0; + if(hostVersion) + { + endIndex = hostVersion.indexOf("."); + majorVersionNumber = window["parseInt"](hostVersion.substring(0,endIndex)) + } + return majorVersionNumber >= 16 + }, + isApiVersionSupported: function(requirementSet) + { + var apiSupported = false; + try + { + var requirementDict = window["JSON"]["parse"](this._officeAppContext$p$0["get_requirementMatrix"]()); + var hostApiVersion = requirementDict["Mailbox"]; + var hostApiVersionParts = hostApiVersion.split("."); + var requirementSetParts = requirementSet.split("."); + if(window["parseInt"](hostApiVersionParts[0]) > window["parseInt"](requirementSetParts[0]) || window["parseInt"](hostApiVersionParts[0]) === window["parseInt"](requirementSetParts[0]) && window["parseInt"](hostApiVersionParts[1]) >= window["parseInt"](requirementSetParts[1])) + apiSupported = true + } + catch($$e_6){} + return apiSupported + }, + convertToOutlookParameters: function(dispid, data) + { + var executeParameters = null; + var optionalParameters = {}; + switch(dispid) + { + case 1: + case 2: + case 3: + case 14: + case 18: + case 26: + case 32: + case 41: + case 34: + case 99: + break; + case 12: + optionalParameters["isRest"] = data["isRest"]; + break; + case 4: + var jsonProperty = window["JSON"]["stringify"](data["customProperties"]); + executeParameters = [jsonProperty]; + break; + case 5: + executeParameters = [data["body"]]; + break; + case 8: + case 9: + executeParameters = [data["itemId"]]; + break; + case 7: + executeParameters = [window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["requiredAttendees"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["optionalAttendees"]),data["start"],data["end"],data["location"],window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["resources"]),data["subject"],data["body"]]; + break; + case 44: + executeParameters = [window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["toRecipients"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["ccRecipients"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["bccRecipients"]),data["subject"],data["htmlBody"],data["attachments"]]; + break; + case 43: + executeParameters = [data["ewsIdOrEmail"]]; + break; + case 45: + executeParameters = [data["module"],data["queryString"]]; + break; + case 40: + executeParameters = [data["extensionId"],data["consentState"]]; + break; + case 11: + case 10: + executeParameters = [data["htmlBody"]]; + break; + case 31: + case 30: + executeParameters = [data["htmlBody"],data["attachments"]]; + break; + case 100: + optionalParameters = data; + break; + case 23: + case 13: + case 38: + case 29: + executeParameters = [data["data"],data["coercionType"]]; + break; + case 37: + case 28: + executeParameters = [data["coercionType"]]; + break; + case 17: + executeParameters = [data["subject"]]; + break; + case 15: + executeParameters = [data["recipientField"]]; + break; + case 22: + case 21: + executeParameters = [data["recipientField"],window["OSF"]["DDA"]["OutlookAppOm"]._convertComposeEmailDictionaryParameterForSetApi$p(data["recipientArray"])]; + break; + case 19: + executeParameters = [data["itemId"],data["name"]]; + break; + case 16: + executeParameters = [data["uri"],data["name"],data["isInline"]]; + break; + case 20: + executeParameters = [data["attachmentIndex"]]; + break; + case 25: + executeParameters = [data["TimeProperty"],data["time"]]; + break; + case 24: + executeParameters = [data["TimeProperty"]]; + break; + case 27: + executeParameters = [data["location"]]; + break; + case 33: + case 35: + executeParameters = [data["key"],data["type"],data["persistent"],data["message"],data["icon"]]; + this._additionalOutlookParams$p$0.setActionsDefinition(data["actions"]); + break; + case 36: + executeParameters = [data["key"]]; + break; + case 101: + optionalParameters = data; + break; + default: + Sys.Debug.fail("Unexpected method dispid"); + break + } + if(dispid !== 1) + { + var $$t_5; + this._additionalOutlookParams$p$0.updateOutlookExecuteParameters($$t_5 = {val: executeParameters},optionalParameters),executeParameters = $$t_5["val"] + } + return executeParameters + }, + _displayNewAppointmentFormApi$p$0: function(parameters) + { + var normalizedRequiredAttendees = window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["requiredAttendees"],"requiredAttendees"); + var normalizedOptionalAttendees = window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["optionalAttendees"],"optionalAttendees"); + window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["location"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxLocationLength$p,"location"); + window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["body"],0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"body"); + window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["subject"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p,"subject"); + if(!$h.ScriptHelpers.isNullOrUndefined(parameters["start"])) + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(parameters["start"],Date,"start"); + var startDateTime = parameters["start"]; + parameters["start"] = startDateTime["getTime"](); + if(!$h.ScriptHelpers.isNullOrUndefined(parameters["end"])) + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(parameters["end"],Date,"end"); + var endDateTime = parameters["end"]; + if(endDateTime < startDateTime) + throw Error.argumentOutOfRange("end",endDateTime,window["_u"]["ExtensibilityStrings"]["l_InvalidEventDates_Text"]); + parameters["end"] = endDateTime["getTime"]() + } + } + var updatedParameters = null; + if(normalizedRequiredAttendees || normalizedOptionalAttendees) + { + updatedParameters = {}; + var $$dict_7 = parameters; + for(var $$key_8 in $$dict_7) + { + var entry = { + key: $$key_8, + value: $$dict_7[$$key_8] + }; + updatedParameters[entry["key"]] = entry["value"] + } + if(normalizedRequiredAttendees) + updatedParameters["requiredAttendees"] = normalizedRequiredAttendees; + if(normalizedOptionalAttendees) + updatedParameters["optionalAttendees"] = normalizedOptionalAttendees + } + this.invokeHostMethod(7,updatedParameters || parameters,null) + }, + displayNewMessageFormApi: function(parameters) + { + var updatedParameters = {}; + if(parameters) + { + var normalizedToRecipients = window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["toRecipients"],"toRecipients"); + var normalizedCcRecipients = window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["ccRecipients"],"ccRecipients"); + var normalizedBccRecipients = window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["bccRecipients"],"bccRecipients"); + window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["htmlBody"],0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody"); + window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["subject"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p,"subject"); + var attachments = window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p(parameters); + var $$dict_7 = parameters; + for(var $$key_8 in $$dict_7) + { + var entry = { + key: $$key_8, + value: $$dict_7[$$key_8] + }; + updatedParameters[entry["key"]] = entry["value"] + } + if(normalizedToRecipients) + updatedParameters["toRecipients"] = normalizedToRecipients; + if(normalizedCcRecipients) + updatedParameters["ccRecipients"] = normalizedCcRecipients; + if(normalizedBccRecipients) + updatedParameters["bccRecipients"] = normalizedBccRecipients; + if(attachments) + updatedParameters["attachments"] = window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p(attachments) + } + this.invokeHostMethod(44,updatedParameters || parameters,null) + }, + displayPersonaCardAsync: function(ewsIdOrEmail) + { + var args = []; + for(var $$pai_3 = 1; $$pai_3 < arguments["length"]; ++$$pai_3) + args[$$pai_3 - 1] = arguments[$$pai_3]; + if($h.ScriptHelpers.isNullOrUndefined(ewsIdOrEmail)) + throw Error.argumentNull("ewsIdOrEmail"); + else if(ewsIdOrEmail === "") + throw Error.argument("ewsIdOrEmail","ewsIdOrEmail cannot be empty."); + var parameters = $h.CommonParameters.parse(args,false); + this._standardInvokeHostMethod$i$0(43,{ewsIdOrEmail: ewsIdOrEmail.trim()},null,parameters._asyncContext$p$0,parameters._callback$p$0) + }, + navigateToModuleAsync: function(module) + { + var args = []; + for(var $$pai_5 = 1; $$pai_5 < arguments["length"]; ++$$pai_5) + args[$$pai_5 - 1] = arguments[$$pai_5]; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidModule$p(module); + var parameters = $h.CommonParameters.parse(args,false); + var updatedParameters = {}; + if(module === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ModuleType"]["Addins"]) + { + var queryString = ""; + if(parameters._options$p$0 && parameters._options$p$0["queryString"]) + queryString = parameters._options$p$0["queryString"]; + updatedParameters["queryString"] = queryString + } + updatedParameters["module"] = module; + this._standardInvokeHostMethod$i$0(45,updatedParameters,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }, + _initializeMethods$p$0: function() + { + var currentInstance = this; + if($h.Item["isInstanceOfType"](this._item$p$0) || this._hostItemType$p$0 === 6) + { + currentInstance["displayNewAppointmentForm"] = this.$$d__displayNewAppointmentFormApi$p$0; + currentInstance["displayNewMessageForm"] = this.$$d_displayNewMessageFormApi; + currentInstance["displayPersonaCardAsync"] = this.$$d_displayPersonaCardAsync; + currentInstance["navigateToModuleAsync"] = this.$$d_navigateToModuleAsync + } + }, + _getInitialDataResponseHandler$p$0: function(resultCode, data) + { + if(resultCode) + return; + this["initialize"](data); + this["displayName"] = "mailbox"; + window.setTimeout(this.$$d__callAppReadyCallback$p$0,0) + }, + _callAppReadyCallback$p$0: function() + { + this._appReadyCallback$p$0() + }, + _invokeGetTokenMethodAsync$p$0: function(outlookDispid, data, methodName, callback, userContext) + { + if($h.ScriptHelpers.isNullOrUndefined(callback)) + throw Error.argumentNull("callback"); + var $$t_9 = this; + this.invokeHostMethod(outlookDispid,data,function(resultCode, response) + { + var asyncResult; + if(resultCode) + asyncResult = $$t_9.createAsyncResult(null,1,9017,userContext,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode)); + else + { + var responseDictionary = response; + if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() === 8 && "error" in responseDictionary && "errorCode" in responseDictionary && responseDictionary["error"] && responseDictionary["errorCode"] === 9030) + asyncResult = $$t_9.createAsyncResult(null,1,responseDictionary["errorCode"],userContext,responseDictionary["errorMessage"]); + else if(responseDictionary["wasSuccessful"]) + asyncResult = $$t_9.createAsyncResult(responseDictionary["token"],0,0,userContext,null); + else + asyncResult = $$t_9.createAsyncResult(null,1,responseDictionary["errorCode"],userContext,responseDictionary["errorMessage"]) + } + callback(asyncResult) + }) + }, + getItem: function() + { + return this._item$p$0 + }, + _getUserProfile$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0); + return this._userProfile$p$0 + }, + _getDiagnostics$p$0: function() + { + return this._diagnostics$p$0 + }, + _getEwsUrl$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0); + return this._initialData$p$0.get__ewsUrl$i$0() + }, + _getRestUrl$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0); + if(this._shouldInferRestUrl$p$0()) + return this._inferRestUrlFromEwsUrl$p$0(); + return this._initialData$p$0.get__restUrl$i$0() + }, + _shouldInferRestUrl$p$0: function() + { + return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() === 8 && !this._initialData$p$0.get__restUrl$i$0() && this.isApiVersionSupported("1.5") && this._isHostBuildNumberLessThan$p$0("16.0.8414.1000") + }, + _isHostBuildNumberLessThan$p$0: function(buildNumber) + { + var hostVersion = this._initialData$p$0.get__hostVersion$i$0(); + if(hostVersion) + { + var hostVersionParts = hostVersion.split("."); + var buildNumberParts = buildNumber.split("."); + return window["parseInt"](hostVersionParts[0]) < window["parseInt"](buildNumberParts[0]) || window["parseInt"](hostVersionParts[0]) === window["parseInt"](buildNumberParts[0]) && window["parseInt"](hostVersionParts[2]) < window["parseInt"](buildNumberParts[2]) + } + return false + }, + _inferRestUrlFromEwsUrl$p$0: function() + { + var inferredRestUrl = ""; + var stringToFind = "/ews/"; + var index = this._initialData$p$0.get__ewsUrl$i$0().toLowerCase().indexOf(stringToFind); + if(index !== -1) + inferredRestUrl = String.format("{0}/{1}",this._initialData$p$0.get__ewsUrl$i$0().slice(0,index),"api"); + return $h.ScriptHelpers.isNonEmptyString(inferredRestUrl) ? inferredRestUrl : null + }, + _findOffset$p$0: function(value) + { + var ranges = this._initialData$p$0.get__timeZoneOffsets$i$0(); + for(var r = 0; r < ranges["length"]; r++) + { + var range = ranges[r]; + var start = window["parseInt"](range["start"]); + var end = window["parseInt"](range["end"]); + if(value["getTime"]() - start >= 0 && value["getTime"]() - end < 0) + return window["parseInt"](range["offset"]) + } + throw Error.format(window["_u"]["ExtensibilityStrings"]["l_InvalidDate_Text"]); + }, + _areStringsLoaded$p$0: function() + { + var stringsLoaded = false; + try + { + stringsLoaded = !$h.ScriptHelpers.isNullOrUndefined(window["_u"]["ExtensibilityStrings"]["l_EwsRequestOversized_Text"]) + } + catch($$e_1){} + return stringsLoaded + }, + _loadLocalizedScript$p$0: function(stringLoadedCallback) + { + var url = null; + var baseUrl = ""; + var scripts = document.getElementsByTagName("script"); + for(var i = scripts.length - 1; i >= 0; i--) + { + var filename = null; + var attributes = scripts[i].attributes; + if(attributes) + { + var attribute = attributes.getNamedItem("src"); + if(attribute) + filename = attribute.value; + if(filename) + { + var debug = false; + filename = filename.toLowerCase(); + var officeIndex = filename.indexOf("office_strings.js"); + if(officeIndex < 0) + { + officeIndex = filename.indexOf("office_strings.debug.js"); + debug = true + } + if(officeIndex > 0 && officeIndex < filename.length) + { + url = filename.replace(debug ? "office_strings.debug.js" : "office_strings.js","outlook_strings.js"); + var languageUrl = filename.substring(0,officeIndex); + var lastIndexOfSlash = languageUrl.lastIndexOf("/",languageUrl.length - 2); + if(lastIndexOfSlash === -1) + lastIndexOfSlash = languageUrl.lastIndexOf("\\",languageUrl.length - 2); + if(lastIndexOfSlash !== -1 && languageUrl.length > lastIndexOfSlash + 1) + baseUrl = languageUrl.substring(0,lastIndexOfSlash + 1); + break + } + } + } + } + if(url) + { + var head = document.getElementsByTagName("head")[0]; + var scriptElement = null; + var $$t_H = this; + var scriptElementCallback = function() + { + if(stringLoadedCallback && (!scriptElement.readyState || scriptElement.readyState && (scriptElement.readyState === "loaded" || scriptElement.readyState === "complete"))) + { + scriptElement.onload = null; + scriptElement.onreadystatechange = null; + stringLoadedCallback() + } + }; + var $$t_I = this; + var failureCallback = function() + { + if(!$$t_I._areStringsLoaded$p$0()) + { + var fallbackUrl = baseUrl + "en-us/" + "outlook_strings.js"; + scriptElement.onload = null; + scriptElement.onreadystatechange = null; + scriptElement = $$t_I._createScriptElement$p$0(fallbackUrl); + scriptElement.onload = scriptElementCallback; + scriptElement.onreadystatechange = scriptElementCallback; + head.appendChild(scriptElement) + } + }; + scriptElement = this._createScriptElement$p$0(url); + scriptElement.onload = scriptElementCallback; + scriptElement.onreadystatechange = scriptElementCallback; + window.setTimeout(failureCallback,2e3); + head.appendChild(scriptElement) + } + }, + _createScriptElement$p$0: function(url) + { + var scriptElement = document.createElement("script"); + scriptElement.type = "text/javascript"; + scriptElement.src = url; + return scriptElement + } + }; + OSF.DDA.OutlookAppOm.prototype.initialize = function(initialData) + { + if(!initialData) + { + this._additionalOutlookParams$p$0 = new $h.AdditionalGlobalParameters(true); + this._initialData$p$0 = null; + this._item$p$0 = null; + return + } + var ItemTypeKey = "itemType"; + this._initialData$p$0 = new $h.InitialData(initialData); + this._hostItemType$p$0 = initialData[ItemTypeKey]; + if(1 === initialData[ItemTypeKey]) + this._item$p$0 = new $h.Message(this._initialData$p$0); + else if(3 === initialData[ItemTypeKey]) + this._item$p$0 = new $h.MeetingRequest(this._initialData$p$0); + else if(2 === initialData[ItemTypeKey]) + this._item$p$0 = new $h.Appointment(this._initialData$p$0); + else if(4 === initialData[ItemTypeKey]) + this._item$p$0 = new $h.MessageCompose(this._initialData$p$0); + else if(5 === initialData[ItemTypeKey]) + this._item$p$0 = new $h.AppointmentCompose(this._initialData$p$0); + else if(6 === initialData[ItemTypeKey]); + else + Sys.Debug.trace("Unexpected item type was received from the host."); + this._userProfile$p$0 = new $h.UserProfile(this._initialData$p$0); + this._diagnostics$p$0 = new $h.Diagnostics(this._initialData$p$0,this._officeAppContext$p$0["get_appName"]()); + var supportsAdditionalParameters = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() !== 8 || this.isOutlook16OrGreater() || this.isApiVersionSupported("1.5"); + this._additionalOutlookParams$p$0 = new $h.AdditionalGlobalParameters(supportsAdditionalParameters); + if("itemNumber" in initialData) + this["setCurrentItemNumber"](initialData["itemNumber"]); + this._initializeMethods$p$0(); + $h.InitialData._defineReadOnlyProperty$i(this,"item",this.$$d_getItem); + $h.InitialData._defineReadOnlyProperty$i(this,"userProfile",this.$$d__getUserProfile$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"diagnostics",this.$$d__getDiagnostics$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"ewsUrl",this.$$d__getEwsUrl$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"restUrl",this.$$d__getRestUrl$p$0); + if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() === 64) + if(this._initialData$p$0.get__overrideWindowOpen$i$0()) + window.open = this.$$d_windowOpenOverrideHandler; + this.addEventSupport() + }; + OSF.DDA.OutlookAppOm.prototype.makeEwsRequestAsync = function(data) + { + var args = []; + for(var $$pai_5 = 1; $$pai_5 < arguments["length"]; ++$$pai_5) + args[$$pai_5 - 1] = arguments[$$pai_5]; + if($h.ScriptHelpers.isNullOrUndefined(data)) + throw Error.argumentNull("data"); + if(data.length > window["OSF"]["DDA"]["OutlookAppOm"]._maxEwsRequestSize$p) + throw Error.argument("data",window["_u"]["ExtensibilityStrings"]["l_EwsRequestOversized_Text"]); + this._throwOnMethodCallForInsufficientPermission$i$0(3,"makeEwsRequestAsync"); + var parameters = $h.CommonParameters.parse(args,true,true); + var ewsRequest = new $h.EwsRequest(parameters._asyncContext$p$0); + var $$t_4 = this; + ewsRequest.onreadystatechange = function() + { + if(4 === ewsRequest.get__requestState$i$1()) + parameters._callback$p$0(ewsRequest._asyncResult$p$0) + }; + ewsRequest.send(data) + }; + OSF.DDA.OutlookAppOm.prototype.recordDataPoint = function(data) + { + if($h.ScriptHelpers.isNullOrUndefined(data)) + throw Error.argumentNull("data"); + this.invokeHostMethod(402,data,null) + }; + OSF.DDA.OutlookAppOm.prototype.recordTrace = function(data) + { + if($h.ScriptHelpers.isNullOrUndefined(data)) + throw Error.argumentNull("data"); + this.invokeHostMethod(401,data,null) + }; + OSF.DDA.OutlookAppOm.prototype.trackCtq = function(data) + { + if($h.ScriptHelpers.isNullOrUndefined(data)) + throw Error.argumentNull("data"); + this.invokeHostMethod(400,data,null) + }; + OSF.DDA.OutlookAppOm.prototype.convertToLocalClientTime = function(timeValue) + { + var date = new Date(timeValue["getTime"]()); + var offset = date["getTimezoneOffset"]() * -1; + if(this._initialData$p$0 && this._initialData$p$0.get__timeZoneOffsets$i$0()) + { + date["setUTCMinutes"](date["getUTCMinutes"]() - offset); + offset = this._findOffset$p$0(date); + date["setUTCMinutes"](date["getUTCMinutes"]() + offset) + } + var retValue = this._dateToDictionary$i$0(date); + retValue["timezoneOffset"] = offset; + return retValue + }; + OSF.DDA.OutlookAppOm.prototype.convertToUtcClientTime = function(input) + { + var retValue = this._dictionaryToDate$i$0(input); + if(this._initialData$p$0 && this._initialData$p$0.get__timeZoneOffsets$i$0()) + { + var offset = this._findOffset$p$0(retValue); + retValue["setUTCMinutes"](retValue["getUTCMinutes"]() - offset); + offset = !input["timezoneOffset"] ? retValue["getTimezoneOffset"]() * -1 : input["timezoneOffset"]; + retValue["setUTCMinutes"](retValue["getUTCMinutes"]() + offset) + } + return retValue + }; + OSF.DDA.OutlookAppOm.prototype.convertToRestId = function(itemId, restVersion) + { + if(!itemId) + throw Error.argumentNull("itemId"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p(restVersion); + return itemId.replace(new RegExp("[/]","g"),"-").replace(new RegExp("[+]","g"),"_") + }; + OSF.DDA.OutlookAppOm.prototype.convertToEwsId = function(itemId, restVersion) + { + if(!itemId) + throw Error.argumentNull("itemId"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p(restVersion); + return itemId.replace(new RegExp("[-]","g"),"/").replace(new RegExp("[_]","g"),"+") + }; + OSF.DDA.OutlookAppOm.prototype.getUserIdentityTokenAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + this._throwOnMethodCallForInsufficientPermission$i$0(1,"getUserIdentityTokenAsync"); + var parameters = $h.CommonParameters.parse(args,true,true); + this._invokeGetTokenMethodAsync$p$0(2,null,"GetUserIdentityToken",parameters._callback$p$0,parameters._asyncContext$p$0) + }; + OSF.DDA.OutlookAppOm.prototype.getCallbackTokenAsync = function() + { + var args = []; + for(var $$pai_7 = 0; $$pai_7 < arguments["length"]; ++$$pai_7) + args[$$pai_7] = arguments[$$pai_7]; + this._throwOnMethodCallForInsufficientPermission$i$0(1,"getCallbackTokenAsync"); + var parameters = $h.CommonParameters.parse(args,true,true); + var options = {}; + if(parameters._options$p$0) + for(var $$arr_3 = Object["keys"](parameters._options$p$0), $$len_4 = $$arr_3.length, $$idx_5 = 0; $$idx_5 < $$len_4; ++$$idx_5) + { + var key = $$arr_3[$$idx_5]; + options[key] = parameters._options$p$0[key] + } + if(!("isRest" in options)) + options["isRest"] = false; + this._invokeGetTokenMethodAsync$p$0(12,options,"GetCallbackToken",parameters._callback$p$0,parameters._asyncContext$p$0) + }; + OSF.DDA.OutlookAppOm.prototype.displayMessageForm = function(itemId) + { + if($h.ScriptHelpers.isNullOrUndefined(itemId)) + throw Error.argumentNull("itemId"); + this.invokeHostMethod(8,{itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId)},null) + }; + OSF.DDA.OutlookAppOm.prototype.displayAppointmentForm = function(itemId) + { + if($h.ScriptHelpers.isNullOrUndefined(itemId)) + throw Error.argumentNull("itemId"); + this.invokeHostMethod(9,{itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId)},null) + }; + OSF.DDA.OutlookAppOm.prototype.RegisterConsentAsync = function(consentState) + { + if(consentState !== 2 && consentState !== 1 && consentState) + throw Error.argumentOutOfRange("consentState"); + var parameters = {}; + parameters["consentState"] = consentState["toString"](); + parameters["extensionId"] = this["GetExtensionId"](); + this.invokeHostMethod(40,parameters,null) + }; + OSF.DDA.OutlookAppOm.prototype.CloseApp = function() + { + this.invokeHostMethod(42,null,null) + }; + OSF.DDA.OutlookAppOm.prototype.GetIsRead = function() + { + return this._initialData$p$0.get__isRead$i$0() + }; + OSF.DDA.OutlookAppOm.prototype.GetEndNodeUrl = function() + { + return this._initialData$p$0.get__endNodeUrl$i$0() + }; + OSF.DDA.OutlookAppOm.prototype.GetConsentMetadata = function() + { + return this._initialData$p$0.get__consentMetadata$i$0() + }; + OSF.DDA.OutlookAppOm.prototype.GetEntryPointUrl = function() + { + return this._initialData$p$0.get__entryPointUrl$i$0() + }; + OSF.DDA.OutlookAppOm.prototype.GetMarketplaceContentMarket = function() + { + return this._initialData$p$0.get__marketplaceContentMarket$i$0() + }; + OSF.DDA.OutlookAppOm.prototype.GetMarketplaceAssetId = function() + { + return this._initialData$p$0.get__marketplaceAssetId$i$0() + }; + OSF.DDA.OutlookAppOm.prototype.GetExtensionId = function() + { + return this._initialData$p$0.get__extensionId$i$0() + }; + OSF.DDA.OutlookAppOm.prototype.setCurrentItemNumber = function(itemNumber) + { + this._additionalOutlookParams$p$0.setCurrentItemNumber(itemNumber) + }; + window["OSF"]["DDA"]["Settings"] = OSF.DDA.Settings = function(data) + { + this._rawData$p$0 = data + }; + window["OSF"]["DDA"]["Settings"]._convertFromRawSettings$p = function(rawSettings) + { + if(!rawSettings) + return{}; + if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() === 8 || window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() === 65536 || window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() === 4194304) + { + var outlookSettings = rawSettings["SettingsKey"]; + if(outlookSettings) + return OSF.DDA.SettingsManager["deserializeSettings"](outlookSettings) + } + return rawSettings + }; + OSF.DDA.Settings.prototype = { + _rawData$p$0: null, + _settingsData$p$0: null, + get__data$p$0: function() + { + if(!this._settingsData$p$0) + { + this._settingsData$p$0 = window["OSF"]["DDA"]["Settings"]._convertFromRawSettings$p(this._rawData$p$0); + this._rawData$p$0 = null + } + return this._settingsData$p$0 + }, + _saveSettingsForOutlook$p$0: function(callback, userContext) + { + var storedException = null; + var startTime = (new Date)["getTime"](); + var detailedErrorCode = -1; + try + { + var serializedSettings = OSF.DDA.SettingsManager["serializeSettings"](this.get__data$p$0()); + var jsonSettings = window["JSON"]["stringify"](serializedSettings); + var settingsObjectToSave = {SettingsKey: jsonSettings}; + OSF.DDA.ClientSettingsManager["write"](settingsObjectToSave) + } + catch(ex) + { + storedException = ex + } + var asyncResult; + if(storedException) + { + detailedErrorCode = 9019; + asyncResult = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,detailedErrorCode,userContext,storedException["message"]) + } + else + { + detailedErrorCode = 0; + asyncResult = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,0,detailedErrorCode,userContext,null) + } + window["OSF"]["AppTelemetry"]["onMethodDone"](404,null,Math["abs"]((new Date)["getTime"]() - startTime),detailedErrorCode); + if(callback) + callback(asyncResult) + }, + _saveSettingsForOwa$p$0: function(callback, userContext) + { + var serializedSettings = OSF.DDA.SettingsManager["serializeSettings"](this.get__data$p$0()); + var $$t_7 = this; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.invokeHostMethod(404,[serializedSettings],function(resultCode, response) + { + if(callback) + { + var asyncResult; + if(resultCode) + asyncResult = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9017,userContext,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode)); + else + { + var responseDictionary = response; + if(!responseDictionary["error"]) + asyncResult = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,0,0,userContext,null); + else + asyncResult = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9019,userContext,responseDictionary["errorMessage"]) + } + callback(asyncResult) + } + }) + } + }; + OSF.DDA.Settings.prototype.get = function(name) + { + return this.get__data$p$0()[name] + }; + OSF.DDA.Settings.prototype.set = function(name, value) + { + this.get__data$p$0()[name] = value + }; + OSF.DDA.Settings.prototype.remove = function(name) + { + delete this.get__data$p$0()[name] + }; + OSF.DDA.Settings.prototype.saveAsync = function() + { + var args = []; + for(var $$pai_4 = 0; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4] = arguments[$$pai_4]; + var commonParameters = $h.CommonParameters.parse(args,false); + if(window["JSON"]["stringify"](OSF.DDA.SettingsManager["serializeSettings"](this.get__data$p$0())).length > 32768) + { + var asyncResult = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9019,commonParameters._asyncContext$p$0,""); + var $$t_3 = this; + window.setTimeout(function() + { + commonParameters._callback$p$0(asyncResult) + },0); + return + } + if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() === 64) + this._saveSettingsForOwa$p$0(commonParameters._callback$p$0,commonParameters._asyncContext$p$0); + else + this._saveSettingsForOutlook$p$0(commonParameters._callback$p$0,commonParameters._asyncContext$p$0) + }; + Type.registerNamespace("$h"); + var $h = window["$h"] || {}; + Type.registerNamespace("Office.cast"); + var Office = window["Office"] || {}; + Office.cast = Office.cast || {}; + $h.AdditionalGlobalParameters = function(supported) + { + this._parameterBlobSupported$p$0 = supported; + this._itemNumber$p$0 = 0 + }; + $h.AdditionalGlobalParameters.prototype = { + _parameterBlobSupported$p$0: false, + _itemNumber$p$0: 0, + _actionsDefinition$p$0: null, + setActionsDefinition: function(actionsDefinition) + { + this._actionsDefinition$p$0 = actionsDefinition + }, + setCurrentItemNumber: function(itemNumber) + { + if(itemNumber > 0) + this._itemNumber$p$0 = itemNumber + }, + get_itemNumber: function() + { + return this._itemNumber$p$0 + }, + get_actionsDefinition: function() + { + return this._actionsDefinition$p$0 + }, + updateOutlookExecuteParameters: function(executeParameters, additionalApiParameters) + { + if(this._parameterBlobSupported$p$0) + { + if(this._itemNumber$p$0 > 0) + additionalApiParameters["itemNumber"] = this._itemNumber$p$0["toString"](); + if(this._actionsDefinition$p$0) + additionalApiParameters["actions"] = this._actionsDefinition$p$0; + if(!Object["keys"](additionalApiParameters)["length"]) + return; + if(!executeParameters["val"]) + executeParameters["val"] = []; + executeParameters["val"]["push"](window["JSON"]["stringify"](additionalApiParameters)) + } + } + }; + $h.Appointment = function(dataDictionary) + { + this.$$d__getOrganizer$p$2 = Function.createDelegate(this,this._getOrganizer$p$2); + this.$$d__getNormalizedSubject$p$2 = Function.createDelegate(this,this._getNormalizedSubject$p$2); + this.$$d__getSubject$p$2 = Function.createDelegate(this,this._getSubject$p$2); + this.$$d__getResources$p$2 = Function.createDelegate(this,this._getResources$p$2); + this.$$d__getRequiredAttendees$p$2 = Function.createDelegate(this,this._getRequiredAttendees$p$2); + this.$$d__getOptionalAttendees$p$2 = Function.createDelegate(this,this._getOptionalAttendees$p$2); + this.$$d__getLocation$p$2 = Function.createDelegate(this,this._getLocation$p$2); + this.$$d__getEnd$p$2 = Function.createDelegate(this,this._getEnd$p$2); + this.$$d__getStart$p$2 = Function.createDelegate(this,this._getStart$p$2); + $h.Appointment["initializeBase"](this,[dataDictionary]); + $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"resources",this.$$d__getResources$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"organizer",this.$$d__getOrganizer$p$2) + }; + $h.Appointment.prototype = { + getItemType: function() + { + return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Appointment"] + }, + _getStart$p$2: function() + { + return this._data$p$0.get__start$i$0() + }, + _getEnd$p$2: function() + { + return this._data$p$0.get__end$i$0() + }, + _getLocation$p$2: function() + { + return this._data$p$0.get__location$i$0() + }, + _getOptionalAttendees$p$2: function() + { + return this._data$p$0.get__cc$i$0() + }, + _getRequiredAttendees$p$2: function() + { + return this._data$p$0.get__to$i$0() + }, + _getResources$p$2: function() + { + return this._data$p$0.get__resources$i$0() + }, + _getSubject$p$2: function() + { + return this._data$p$0.get__subject$i$0() + }, + _getNormalizedSubject$p$2: function() + { + return this._data$p$0.get__normalizedSubject$i$0() + }, + _getOrganizer$p$2: function() + { + return this._data$p$0.get__organizer$i$0() + } + }; + $h.Appointment.prototype.getEntities = function() + { + return this._data$p$0._getEntities$i$0() + }; + $h.Appointment.prototype.getEntitiesByType = function(entityType) + { + return this._data$p$0._getEntitiesByType$i$0(entityType) + }; + $h.Appointment.prototype.getSelectedEntities = function() + { + return this._data$p$0._getSelectedEntities$i$0() + }; + $h.Appointment.prototype.getRegExMatches = function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches"); + return this._data$p$0._getRegExMatches$i$0() + }; + $h.Appointment.prototype.getFilteredEntitiesByName = function(name) + { + return this._data$p$0._getFilteredEntitiesByName$i$0(name) + }; + $h.Appointment.prototype.getRegExMatchesByName = function(name) + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName"); + return this._data$p$0._getRegExMatchesByName$i$0(name) + }; + $h.Appointment.prototype.getSelectedRegExMatches = function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedRegExMatches"); + return this._data$p$0._getSelectedRegExMatches$i$0() + }; + $h.Appointment.prototype.displayReplyForm = function(obj) + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyForm$i$0(obj) + }; + $h.Appointment.prototype.displayReplyAllForm = function(obj) + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyAllForm$i$0(obj) + }; + $h.AppointmentCompose = function(data) + { + this.$$d__getLocation$p$2 = Function.createDelegate(this,this._getLocation$p$2); + this.$$d__getEnd$p$2 = Function.createDelegate(this,this._getEnd$p$2); + this.$$d__getStart$p$2 = Function.createDelegate(this,this._getStart$p$2); + this.$$d__getOptionalAttendees$p$2 = Function.createDelegate(this,this._getOptionalAttendees$p$2); + this.$$d__getRequiredAttendees$p$2 = Function.createDelegate(this,this._getRequiredAttendees$p$2); + $h.AppointmentCompose["initializeBase"](this,[data]); + $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2) + }; + $h.AppointmentCompose.prototype = { + _requiredAttendees$p$2: null, + _optionalAttendees$p$2: null, + _start$p$2: null, + _end$p$2: null, + _location$p$2: null, + getItemType: function() + { + return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Appointment"] + }, + _getRequiredAttendees$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._requiredAttendees$p$2) + this._requiredAttendees$p$2 = new $h.ComposeRecipient(0,"requiredAttendees"); + return this._requiredAttendees$p$2 + }, + _getOptionalAttendees$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._optionalAttendees$p$2) + this._optionalAttendees$p$2 = new $h.ComposeRecipient(1,"optionalAttendees"); + return this._optionalAttendees$p$2 + }, + _getStart$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._start$p$2) + this._start$p$2 = new $h.ComposeTime(1); + return this._start$p$2 + }, + _getEnd$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._end$p$2) + this._end$p$2 = new $h.ComposeTime(2); + return this._end$p$2 + }, + _getLocation$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._location$p$2) + this._location$p$2 = new $h.ComposeLocation; + return this._location$p$2 + } + }; + $h.AttachmentConstants = function(){}; + $h.AttachmentDetails = function(data) + { + this.$$d__getIsInline$p$0 = Function.createDelegate(this,this._getIsInline$p$0); + this.$$d__getAttachmentType$p$0 = Function.createDelegate(this,this._getAttachmentType$p$0); + this.$$d__getSize$p$0 = Function.createDelegate(this,this._getSize$p$0); + this.$$d__getContentType$p$0 = Function.createDelegate(this,this._getContentType$p$0); + this.$$d__getName$p$0 = Function.createDelegate(this,this._getName$p$0); + this.$$d__getId$p$0 = Function.createDelegate(this,this._getId$p$0); + this._data$p$0 = data; + $h.InitialData._defineReadOnlyProperty$i(this,"id",this.$$d__getId$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"name",this.$$d__getName$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"contentType",this.$$d__getContentType$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"size",this.$$d__getSize$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"attachmentType",this.$$d__getAttachmentType$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"isInline",this.$$d__getIsInline$p$0) + }; + $h.AttachmentDetails.prototype = { + _data$p$0: null, + _getId$p$0: function() + { + return this._data$p$0["id"] + }, + _getName$p$0: function() + { + return this._data$p$0["name"] + }, + _getContentType$p$0: function() + { + return this._data$p$0["contentType"] + }, + _getSize$p$0: function() + { + return this._data$p$0["size"] + }, + _getAttachmentType$p$0: function() + { + var response = this._data$p$0["attachmentType"]; + return response < $h.AttachmentDetails._attachmentTypeMap$p["length"] ? $h.AttachmentDetails._attachmentTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["File"] + }, + _getIsInline$p$0: function() + { + return this._data$p$0["isInline"] + } + }; + $h.Body = function(){}; + $h.Body._tryMapToHostCoercionType$i = function(coercionType, hostCoercionType) + { + hostCoercionType["val"] = undefined; + if(coercionType === window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Html"]) + hostCoercionType["val"] = 3; + else if(coercionType === window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Text"]) + hostCoercionType["val"] = 0; + else + return false; + return true + }; + $h.Body.prototype.getAsync = function(coercionType) + { + var args = []; + for(var $$pai_7 = 1; $$pai_7 < arguments["length"]; ++$$pai_7) + args[$$pai_7 - 1] = arguments[$$pai_7]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"body.getAsync"); + var commonParameters = $h.CommonParameters.parse(args,true); + var hostCoercionType; + var $$t_5, + $$t_6; + if(!($$t_6 = $h.Body._tryMapToHostCoercionType$i(coercionType,$$t_5 = {val: hostCoercionType}),hostCoercionType = $$t_5["val"],$$t_6)) + throw Error.argument("coercionType"); + var dataToHost = {coercionType: hostCoercionType}; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(37,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.ComposeBody = function() + { + $h.ComposeBody["initializeBase"](this) + }; + $h.ComposeBody._createParameterDictionaryToHost$i = function(data, parameters) + { + var dataToHost = {data: data}; + return $h.ComposeBody._addCoercionTypeToDictionary$i(dataToHost,parameters) + }; + $h.ComposeBody._createAppendParameterDictionaryToHost$i = function(data, parameters) + { + var dataToHost = {appendTxt: data}; + return $h.ComposeBody._addCoercionTypeToDictionary$i(dataToHost,parameters) + }; + $h.ComposeBody._addCoercionTypeToDictionary$i = function(dataToHost, parameters) + { + if(parameters._options$p$0 && parameters._options$p$0["hasOwnProperty"]("coercionType") && !$h.ScriptHelpers.isNull(parameters._options$p$0["coercionType"])) + { + var hostCoercionType; + var $$t_3, + $$t_4; + if(!($$t_4 = $h.Body._tryMapToHostCoercionType$i(parameters._options$p$0["coercionType"],$$t_3 = {val: hostCoercionType}),hostCoercionType = $$t_3["val"],$$t_4)) + { + if(parameters._callback$p$0) + parameters._callback$p$0(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,1e3,parameters._asyncContext$p$0,null)); + return null + } + dataToHost["coercionType"] = hostCoercionType + } + else + dataToHost["coercionType"] = 0; + return dataToHost + }; + $h.ComposeBody.prototype.getTypeAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"body.getTypeAsync"); + var parameters = $h.CommonParameters.parse(args,true); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(14,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeBody.prototype.setSelectedDataAsync = function(data) + { + var args = []; + for(var $$pai_4 = 1; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4 - 1] = arguments[$$pai_4]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.setSelectedDataAsync"); + var parameters = $h.CommonParameters.parse(args,false); + if(!String["isInstanceOfType"](data)) + throw Error.argumentType("data",Object["getType"](data),String); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); + var dataToHost = $h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); + if(!dataToHost) + return; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(13,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeBody.prototype.prependAsync = function(data) + { + var args = []; + for(var $$pai_4 = 1; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4 - 1] = arguments[$$pai_4]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.prependAsync"); + var parameters = $h.CommonParameters.parse(args,false); + if(!String["isInstanceOfType"](data)) + throw Error.argumentType("data",Object["getType"](data),String); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); + var dataToHost = $h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); + if(!dataToHost) + return; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(23,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeBody.prototype.appendOnSendAsync = function(data) + { + var args = []; + for(var $$pai_4 = 1; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4 - 1] = arguments[$$pai_4]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.appendOnSendAsync"); + var parameters = $h.CommonParameters.parse(args,false); + if(!data) + data = ""; + if(!String["isInstanceOfType"](data)) + throw Error.argumentType("data",Object["getType"](data),String); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,5e3,"data"); + var dataToHost = $h.ComposeBody._createAppendParameterDictionaryToHost$i(data,parameters); + if(!dataToHost) + return; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(100,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeBody.prototype.setAsync = function(data) + { + var args = []; + for(var $$pai_4 = 1; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4 - 1] = arguments[$$pai_4]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.setAsync"); + var parameters = $h.CommonParameters.parse(args,false); + if(!String["isInstanceOfType"](data)) + throw Error.argumentType("data",Object["getType"](data),String); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); + var dataToHost = $h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); + if(!dataToHost) + return; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(38,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeItem = function(data) + { + this.$$d__getBody$p$1 = Function.createDelegate(this,this._getBody$p$1); + this.$$d__getSubject$p$1 = Function.createDelegate(this,this._getSubject$p$1); + $h.ComposeItem["initializeBase"](this,[data]); + $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$1); + $h.InitialData._defineReadOnlyProperty$i(this,"body",this.$$d__getBody$p$1) + }; + $h.ComposeItem.prototype = { + _subject$p$1: null, + _body$p$1: null, + _getBody$p$1: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._body$p$1) + this._body$p$1 = new $h.ComposeBody; + return this._body$p$1 + }, + _getSubject$p$1: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._subject$p$1) + this._subject$p$1 = new $h.ComposeSubject; + return this._subject$p$1 + } + }; + $h.ComposeItem.prototype.addFileAttachmentAsync = function(uri, attachmentName) + { + var args = []; + for(var $$pai_6 = 2; $$pai_6 < arguments["length"]; ++$$pai_6) + args[$$pai_6 - 2] = arguments[$$pai_6]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"addFileAttachmentAsync"); + if(!$h.ScriptHelpers.isNonEmptyString(uri)) + throw Error.argument("uri"); + if(!$h.ScriptHelpers.isNonEmptyString(attachmentName)) + throw Error.argument("attachmentName"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(uri.length,0,2048,"uri"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentName.length,0,255,"attachmentName"); + var commonParameters = $h.CommonParameters.parse(args,false); + var isInline = false; + if(!$h.ScriptHelpers.isNull(commonParameters._options$p$0)) + isInline = $h.ScriptHelpers.isValueTrue(commonParameters._options$p$0["isInline"]); + var parameters = { + uri: uri, + name: attachmentName, + isInline: isInline, + __timeout__: 6e5 + }; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(16,parameters,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.ComposeItem.prototype.addItemAttachmentAsync = function(itemId, attachmentName) + { + var args = []; + for(var $$pai_5 = 2; $$pai_5 < arguments["length"]; ++$$pai_5) + args[$$pai_5 - 2] = arguments[$$pai_5]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"addItemAttachmentAsync"); + if(!$h.ScriptHelpers.isNonEmptyString(itemId)) + throw Error.argument("itemId"); + if(!$h.ScriptHelpers.isNonEmptyString(attachmentName)) + throw Error.argument("attachmentName"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(itemId.length,0,200,"itemId"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentName.length,0,255,"attachmentName"); + var commonParameters = $h.CommonParameters.parse(args,false); + var parameters = { + itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId), + name: attachmentName, + __timeout__: 6e5 + }; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(19,parameters,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.ComposeItem.prototype.removeAttachmentAsync = function(attachmentId) + { + var args = []; + for(var $$pai_3 = 1; $$pai_3 < arguments["length"]; ++$$pai_3) + args[$$pai_3 - 1] = arguments[$$pai_3]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"removeAttachmentAsync"); + if(!$h.ScriptHelpers.isNonEmptyString(attachmentId)) + throw Error.argument("attachmentId"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentId.length,0,200,"attachmentId"); + var commonParameters = $h.CommonParameters.parse(args,false); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(20,{attachmentIndex: attachmentId},null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.ComposeItem.prototype.getSelectedDataAsync = function(coercionType) + { + var args = []; + for(var $$pai_7 = 1; $$pai_7 < arguments["length"]; ++$$pai_7) + args[$$pai_7 - 1] = arguments[$$pai_7]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedDataAsync"); + var commonParameters = $h.CommonParameters.parse(args,true); + var hostCoercionType; + var $$t_5, + $$t_6; + if(coercionType !== window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Html"] && coercionType !== window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Text"] || !($$t_6 = $h.Body._tryMapToHostCoercionType$i(coercionType,$$t_5 = {val: hostCoercionType}),hostCoercionType = $$t_5["val"],$$t_6)) + throw Error.argument("coercionType"); + var dataToHost = {coercionType: hostCoercionType}; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(28,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.ComposeItem.prototype.setSelectedDataAsync = function(data) + { + var args = []; + for(var $$pai_4 = 1; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4 - 1] = arguments[$$pai_4]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"setSelectedDataAsync"); + var parameters = $h.CommonParameters.parse(args,false); + if(!String["isInstanceOfType"](data)) + throw Error.argumentType("data",Object["getType"](data),String); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); + var dataToHost = $h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); + if(!dataToHost) + return; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(29,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeItem.prototype.close = function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(41,null,null,null,null) + }; + $h.ComposeItem.prototype.saveAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"saveAsync"); + var parameters = $h.CommonParameters.parse(args,false); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(32,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeRecipient = function(type, propertyName) + { + this._type$p$0 = type; + this._propertyName$p$0 = propertyName + }; + $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p = function(displayName, emailAddress) + { + if(!displayName && !emailAddress) + throw Error.argument("recipients"); + if(displayName && displayName.length > 255) + throw Error.argumentOutOfRange("recipients",displayName.length,window["_u"]["ExtensibilityStrings"]["l_DisplayNameTooLong_Text"]); + if(emailAddress && emailAddress.length > 571) + throw Error.argumentOutOfRange("recipients",emailAddress.length,window["_u"]["ExtensibilityStrings"]["l_EmailAddressTooLong_Text"]); + }; + $h.ComposeRecipient._getAsyncFormatter$p = function(rawInput) + { + var input = rawInput; + var output = []; + for(var i = 0; i < input["length"]; i++) + { + var email = new $h.EmailAddressDetails(input[i]); + output[i] = email + } + return output + }; + $h.ComposeRecipient._createEmailDictionaryForHost$p = function(address, name) + { + return{ + address: address, + name: name + } + }; + $h.ComposeRecipient.prototype = { + _propertyName$p$0: null, + _type$p$0: 0, + setAddHelper: function(recipients, args, isSet) + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(recipients["length"],0,100,"recipients"); + var parameters = $h.CommonParameters.parse(args,false); + var recipientData = []; + if(Array["isInstanceOfType"](recipients)) + for(var i = 0; i < recipients["length"]; i++) + if(String["isInstanceOfType"](recipients[i])) + { + $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(recipients[i],recipients[i]); + recipientData[i] = $h.ComposeRecipient._createEmailDictionaryForHost$p(recipients[i],recipients[i]) + } + else if($h.EmailAddressDetails["isInstanceOfType"](recipients[i])) + { + var address = recipients[i]; + $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(address["displayName"],address["emailAddress"]); + recipientData[i] = $h.ComposeRecipient._createEmailDictionaryForHost$p(address["emailAddress"],address["displayName"]) + } + else if(Object["isInstanceOfType"](recipients[i])) + { + var input = recipients[i]; + var emailAddress = input["emailAddress"]; + var displayName = input["displayName"]; + $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(displayName,emailAddress); + recipientData[i] = $h.ComposeRecipient._createEmailDictionaryForHost$p(emailAddress,displayName) + } + else + throw Error.argument("recipients"); + else + throw Error.argument("recipients"); + var $$t_B = this; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(isSet ? 21 : 22,{ + recipientField: this._type$p$0, + recipientArray: recipientData + },function(rawInput) + { + return rawInput + },parameters._asyncContext$p$0,parameters._callback$p$0) + } + }; + $h.ComposeRecipient.prototype.getAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + var parameters = $h.CommonParameters.parse(args,true); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,this._propertyName$p$0 + ".getAsync"); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(15,{recipientField: this._type$p$0},$h.ComposeRecipient._getAsyncFormatter$p,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeRecipient.prototype.setAsync = function(recipients) + { + var args = []; + for(var $$pai_2 = 1; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2 - 1] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._propertyName$p$0 + ".setAsync"); + this.setAddHelper(recipients,args,true) + }; + $h.ComposeRecipient.prototype.addAsync = function(recipients) + { + var args = []; + for(var $$pai_2 = 1; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2 - 1] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._propertyName$p$0 + ".addAsync"); + this.setAddHelper(recipients,args,false) + }; + $h.ComposeRecipient.RecipientField = function(){}; + $h.ComposeRecipient.RecipientField.prototype = { + to: 0, + cc: 1, + bcc: 2, + requiredAttendees: 0, + optionalAttendees: 1 + }; + $h.ComposeRecipient.RecipientField["registerEnum"]("$h.ComposeRecipient.RecipientField",false); + $h.ComposeLocation = function(){}; + $h.ComposeLocation.prototype.getAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"location.getAsync"); + var parameters = $h.CommonParameters.parse(args,true); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(26,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeLocation.prototype.setAsync = function(location) + { + var args = []; + for(var $$pai_3 = 1; $$pai_3 < arguments["length"]; ++$$pai_3) + args[$$pai_3 - 1] = arguments[$$pai_3]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"location.setAsync"); + var parameters = $h.CommonParameters.parse(args,false); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(location.length,0,255,"location"); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(27,{location: location},null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeSubject = function(){}; + $h.ComposeSubject.prototype.getAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + var parameters = $h.CommonParameters.parse(args,true); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"subject.getAsync"); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(18,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeSubject.prototype.setAsync = function(data) + { + var args = []; + for(var $$pai_3 = 1; $$pai_3 < arguments["length"]; ++$$pai_3) + args[$$pai_3 - 1] = arguments[$$pai_3]; + var parameters = $h.CommonParameters.parse(args,false); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"subject.setAsync"); + if(!String["isInstanceOfType"](data)) + throw Error.argument("data"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,255,"data"); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(17,{subject: data},null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeTime = function(type) + { + this.$$d__ticksToDateFormatter$p$0 = Function.createDelegate(this,this._ticksToDateFormatter$p$0); + this._timeType$p$0 = type + }; + $h.ComposeTime.prototype = { + _timeType$p$0: 0, + _ticksToDateFormatter$p$0: function(rawInput) + { + var ticks = rawInput; + return new Date(ticks) + }, + _getPropertyName$p$0: function() + { + return this._timeType$p$0 === 1 ? "start" : "end" + } + }; + $h.ComposeTime.prototype.getAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,this._getPropertyName$p$0() + ".getAsync"); + var parameters = $h.CommonParameters.parse(args,true); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(24,{TimeProperty: this._timeType$p$0},this.$$d__ticksToDateFormatter$p$0,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeTime.prototype.setAsync = function(dateTime) + { + var args = []; + for(var $$pai_3 = 1; $$pai_3 < arguments["length"]; ++$$pai_3) + args[$$pai_3 - 1] = arguments[$$pai_3]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._getPropertyName$p$0() + ".setAsync"); + if(!Date["isInstanceOfType"](dateTime)) + throw Error.argumentType("dateTime",Object["getType"](dateTime),Date); + if(window["isNaN"](dateTime["getTime"]())) + throw Error.argument("dateTime"); + if(dateTime["getTime"]() < -864e13 || dateTime["getTime"]() > 864e13) + throw Error.argumentOutOfRange("dateTime"); + var parameters = $h.CommonParameters.parse(args,false); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(25,{ + TimeProperty: this._timeType$p$0, + time: dateTime["getTime"]() + },null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeTime.TimeType = function(){}; + $h.ComposeTime.TimeType.prototype = { + start: 1, + end: 2 + }; + $h.ComposeTime.TimeType["registerEnum"]("$h.ComposeTime.TimeType",false); + $h.Contact = function(data) + { + this.$$d__getContactString$p$0 = Function.createDelegate(this,this._getContactString$p$0); + this.$$d__getAddresses$p$0 = Function.createDelegate(this,this._getAddresses$p$0); + this.$$d__getUrls$p$0 = Function.createDelegate(this,this._getUrls$p$0); + this.$$d__getEmailAddresses$p$0 = Function.createDelegate(this,this._getEmailAddresses$p$0); + this.$$d__getPhoneNumbers$p$0 = Function.createDelegate(this,this._getPhoneNumbers$p$0); + this.$$d__getBusinessName$p$0 = Function.createDelegate(this,this._getBusinessName$p$0); + this.$$d__getPersonName$p$0 = Function.createDelegate(this,this._getPersonName$p$0); + this._data$p$0 = data; + $h.InitialData._defineReadOnlyProperty$i(this,"personName",this.$$d__getPersonName$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"businessName",this.$$d__getBusinessName$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"contactString",this.$$d__getContactString$p$0) + }; + $h.Contact.prototype = { + _data$p$0: null, + _phoneNumbers$p$0: null, + _getPersonName$p$0: function() + { + return this._data$p$0["PersonName"] + }, + _getBusinessName$p$0: function() + { + return this._data$p$0["BusinessName"] + }, + _getAddresses$p$0: function() + { + return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses") + }, + _getEmailAddresses$p$0: function() + { + return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses") + }, + _getUrls$p$0: function() + { + return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls") + }, + _getPhoneNumbers$p$0: function() + { + if(!this._phoneNumbers$p$0) + { + var $$t_1 = this; + this._phoneNumbers$p$0 = $h.Entities._getExtractedObjects$i($h.PhoneNumber,this._data$p$0,"PhoneNumbers",function(data) + { + return new $h.PhoneNumber(data) + }) + } + return this._phoneNumbers$p$0 + }, + _getContactString$p$0: function() + { + return this._data$p$0["ContactString"] + } + }; + $h.CustomProperties = function(data) + { + if($h.ScriptHelpers.isNullOrUndefined(data)) + throw Error.argumentNull("data"); + if(Array["isInstanceOfType"](data)) + { + var customPropertiesArray = data; + if(customPropertiesArray["length"] > 0) + this._data$p$0 = customPropertiesArray[0]; + else + throw Error.argument("data"); + } + else + this._data$p$0 = data + }; + $h.CustomProperties.prototype = {_data$p$0: null}; + $h.CustomProperties.prototype.get = function(name) + { + var value = this._data$p$0[name]; + if(typeof value === "string") + { + var valueString = value; + if(valueString.length > 6 && valueString.startsWith("Date(") && valueString.endsWith(")")) + { + var ticksString = valueString.substring(5,valueString.length - 1); + var ticks = window["parseInt"](ticksString); + if(!window["isNaN"](ticks)) + { + var dateTimeValue = new Date(ticks); + if(dateTimeValue) + value = dateTimeValue + } + } + } + return value + }; + $h.CustomProperties.prototype.set = function(name, value) + { + if(window["OSF"]["OUtil"]["isDate"](value)) + value = "Date(" + value["getTime"]() + ")"; + this._data$p$0[name] = value + }; + $h.CustomProperties.prototype.remove = function(name) + { + delete this._data$p$0[name] + }; + $h.CustomProperties.prototype.saveAsync = function() + { + var args = []; + for(var $$pai_4 = 0; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4] = arguments[$$pai_4]; + var MaxCustomPropertiesLength = 2500; + if(window["JSON"]["stringify"](this._data$p$0).length > MaxCustomPropertiesLength) + throw Error.argument(); + var parameters = $h.CommonParameters.parse(args,false,true); + var saveCustomProperties = new $h.SaveDictionaryRequest(parameters._callback$p$0,parameters._asyncContext$p$0); + saveCustomProperties._sendRequest$i$0(4,"SaveCustomProperties",{customProperties: this._data$p$0}) + }; + $h.Diagnostics = function(data, appName) + { + this.$$d__getOwaView$p$0 = Function.createDelegate(this,this._getOwaView$p$0); + this.$$d__getHostVersion$p$0 = Function.createDelegate(this,this._getHostVersion$p$0); + this.$$d__getHostName$p$0 = Function.createDelegate(this,this._getHostName$p$0); + this._data$p$0 = data; + this._appName$p$0 = appName; + $h.InitialData._defineReadOnlyProperty$i(this,"hostName",this.$$d__getHostName$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"hostVersion",this.$$d__getHostVersion$p$0); + if(64 === this._appName$p$0) + $h.InitialData._defineReadOnlyProperty$i(this,"OWAView",this.$$d__getOwaView$p$0) + }; + $h.Diagnostics.prototype = { + _data$p$0: null, + _appName$p$0: 0, + _getHostName$p$0: function() + { + switch(this._appName$p$0) + { + case 8: + return"Outlook"; + case 64: + return"OutlookWebApp"; + case 65536: + return"OutlookIOS"; + case 4194304: + return"OutlookAndroid"; + default: + return null + } + }, + _getHostVersion$p$0: function() + { + return this._data$p$0.get__hostVersion$i$0() + }, + _getOwaView$p$0: function() + { + return this._data$p$0.get__owaView$i$0() + } + }; + $h.EmailAddressDetails = function(data) + { + this.$$d__getRecipientType$p$0 = Function.createDelegate(this,this._getRecipientType$p$0); + this.$$d__getAppointmentResponse$p$0 = Function.createDelegate(this,this._getAppointmentResponse$p$0); + this.$$d__getDisplayName$p$0 = Function.createDelegate(this,this._getDisplayName$p$0); + this.$$d__getEmailAddress$p$0 = Function.createDelegate(this,this._getEmailAddress$p$0); + this._data$p$0 = data; + $h.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0); + if($h.ScriptHelpers.dictionaryContainsKey(data,"appointmentResponse")) + $h.InitialData._defineReadOnlyProperty$i(this,"appointmentResponse",this.$$d__getAppointmentResponse$p$0); + if($h.ScriptHelpers.dictionaryContainsKey(data,"recipientType")) + $h.InitialData._defineReadOnlyProperty$i(this,"recipientType",this.$$d__getRecipientType$p$0) + }; + $h.EmailAddressDetails._createFromEmailUserDictionary$i = function(data) + { + var emailAddressDetailsDictionary = {}; + var displayName = data["Name"]; + var emailAddress = data["UserId"]; + emailAddressDetailsDictionary["name"] = displayName || $h.EmailAddressDetails._emptyString$p; + emailAddressDetailsDictionary["address"] = emailAddress || $h.EmailAddressDetails._emptyString$p; + return new $h.EmailAddressDetails(emailAddressDetailsDictionary) + }; + $h.EmailAddressDetails.prototype = { + _data$p$0: null, + _getEmailAddress$p$0: function() + { + return this._data$p$0["address"] + }, + _getDisplayName$p$0: function() + { + return this._data$p$0["name"] + }, + _getAppointmentResponse$p$0: function() + { + var response = this._data$p$0["appointmentResponse"]; + return response < $h.EmailAddressDetails._responseTypeMap$p["length"] ? $h.EmailAddressDetails._responseTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["None"] + }, + _getRecipientType$p$0: function() + { + var response = this._data$p$0["recipientType"]; + return response < $h.EmailAddressDetails._recipientTypeMap$p["length"] ? $h.EmailAddressDetails._recipientTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["Other"] + } + }; + $h.EmailAddressDetails.prototype.toJSON = function() + { + var result = {}; + result["emailAddress"] = this._getEmailAddress$p$0(); + result["displayName"] = this._getDisplayName$p$0(); + if($h.ScriptHelpers.dictionaryContainsKey(this._data$p$0,"appointmentResponse")) + result["appointmentResponse"] = this._getAppointmentResponse$p$0(); + if($h.ScriptHelpers.dictionaryContainsKey(this._data$p$0,"recipientType")) + result["recipientType"] = this._getRecipientType$p$0(); + return result + }; + $h.Entities = function(data, filteredEntitiesData, timeSent, permissionLevel) + { + this.$$d__createMeetingSuggestion$p$0 = Function.createDelegate(this,this._createMeetingSuggestion$p$0); + this.$$d__getParcelDeliveries$p$0 = Function.createDelegate(this,this._getParcelDeliveries$p$0); + this.$$d__getFlightReservations$p$0 = Function.createDelegate(this,this._getFlightReservations$p$0); + this.$$d__getContacts$p$0 = Function.createDelegate(this,this._getContacts$p$0); + this.$$d__getPhoneNumbers$p$0 = Function.createDelegate(this,this._getPhoneNumbers$p$0); + this.$$d__getUrls$p$0 = Function.createDelegate(this,this._getUrls$p$0); + this.$$d__getEmailAddresses$p$0 = Function.createDelegate(this,this._getEmailAddresses$p$0); + this.$$d__getMeetingSuggestions$p$0 = Function.createDelegate(this,this._getMeetingSuggestions$p$0); + this.$$d__getTaskSuggestions$p$0 = Function.createDelegate(this,this._getTaskSuggestions$p$0); + this.$$d__getAddresses$p$0 = Function.createDelegate(this,this._getAddresses$p$0); + this._data$p$0 = data || {}; + this._filteredData$p$0 = filteredEntitiesData || {}; + this._dateTimeSent$p$0 = timeSent; + $h.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"taskSuggestions",this.$$d__getTaskSuggestions$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"meetingSuggestions",this.$$d__getMeetingSuggestions$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"contacts",this.$$d__getContacts$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"flightReservations",this.$$d__getFlightReservations$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"parcelDeliveries",this.$$d__getParcelDeliveries$p$0); + this._permissionLevel$p$0 = permissionLevel + }; + $h.Entities._getExtractedObjects$i = function(T, data, name, creator, removeDuplicates, stringPropertyName) + { + var results = null; + var extractedObjects = data[name]; + if(!extractedObjects) + return new Array(0); + if(removeDuplicates) + extractedObjects = $h.Entities._removeDuplicate$p(Object,extractedObjects,$h.Entities._entityDictionaryEquals$p,stringPropertyName); + results = new Array(extractedObjects["length"]); + var count = 0; + for(var $$arr_9 = extractedObjects, $$len_A = $$arr_9.length, $$idx_B = 0; $$idx_B < $$len_A; ++$$idx_B) + { + var extractedObject = $$arr_9[$$idx_B]; + if(name === "MeetingSuggestions") + extractedObject["IsLegacyEntityExtraction"] = "IsLegacyEntityExtraction" in data ? data["IsLegacyEntityExtraction"] : true; + if(creator) + results[count++] = creator(extractedObject); + else + results[count++] = extractedObject + } + return results + }; + $h.Entities._getExtractedStringProperty$i = function(data, name, removeDuplicate) + { + var extractedProperties = data[name]; + if(!extractedProperties) + return new Array(0); + if(removeDuplicate) + extractedProperties = $h.Entities._removeDuplicate$p(String,extractedProperties,$h.Entities._stringEquals$p,null); + return extractedProperties + }; + $h.Entities._createContact$p = function(data) + { + return new $h.Contact(data) + }; + $h.Entities._createTaskSuggestion$p = function(data) + { + return new $h.TaskSuggestion(data) + }; + $h.Entities._createPhoneNumber$p = function(data) + { + return new $h.PhoneNumber(data) + }; + $h.Entities._entityDictionaryEquals$p = function(dictionary1, dictionary2, entityPropertyIdentifier) + { + if(dictionary1 === dictionary2) + return true; + if(!dictionary1 || !dictionary2) + return false; + if(dictionary1[entityPropertyIdentifier] === dictionary2[entityPropertyIdentifier]) + return true; + return false + }; + $h.Entities._stringEquals$p = function(string1, string2, entityProperty) + { + return string1 === string2 + }; + $h.Entities._removeDuplicate$p = function(T, array, entityEquals, entityPropertyIdentifier) + { + for(var matchIndex1 = array["length"] - 1; matchIndex1 >= 0; matchIndex1--) + { + var removeMatch = false; + for(var matchIndex2 = matchIndex1 - 1; matchIndex2 >= 0; matchIndex2--) + if(entityEquals(array[matchIndex1],array[matchIndex2],entityPropertyIdentifier)) + { + removeMatch = true; + break + } + if(removeMatch) + Array.removeAt(array,matchIndex1) + } + return array + }; + $h.Entities.prototype = { + _dateTimeSent$p$0: null, + _data$p$0: null, + _filteredData$p$0: null, + _filteredEntitiesCache$p$0: null, + _permissionLevel$p$0: 0, + _taskSuggestions$p$0: null, + _meetingSuggestions$p$0: null, + _phoneNumbers$p$0: null, + _contacts$p$0: null, + _addresses$p$0: null, + _emailAddresses$p$0: null, + _urls$p$0: null, + _flightReservations$p$0: null, + _parcelDeliveries$p$0: null, + _getByType$i$0: function(entityType) + { + if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["MeetingSuggestion"]) + return this._getMeetingSuggestions$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["TaskSuggestion"]) + return this._getTaskSuggestions$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Address"]) + return this._getAddresses$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["PhoneNumber"]) + return this._getPhoneNumbers$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["EmailAddress"]) + return this._getEmailAddresses$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Url"]) + return this._getUrls$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Contact"]) + return this._getContacts$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["FlightReservations"]) + return this._getFlightReservations$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["ParcelDeliveries"]) + return this._getParcelDeliveries$p$0(); + return null + }, + _getFilteredEntitiesByName$i$0: function(name) + { + if(!this._filteredEntitiesCache$p$0) + this._filteredEntitiesCache$p$0 = {}; + if(!$h.ScriptHelpers.dictionaryContainsKey(this._filteredEntitiesCache$p$0,name)) + { + var found = false; + for(var i = 0; i < $h.Entities._allEntityKeys$p["length"]; i++) + { + var entityTypeKey = $h.Entities._allEntityKeys$p[i]; + var perEntityTypeDictionary = this._filteredData$p$0[entityTypeKey]; + if(!perEntityTypeDictionary) + continue; + if($h.ScriptHelpers.dictionaryContainsKey(perEntityTypeDictionary,name)) + { + switch(entityTypeKey) + { + case"EmailAddresses": + case"Urls": + this._filteredEntitiesCache$p$0[name] = $h.Entities._getExtractedStringProperty$i(perEntityTypeDictionary,name); + break; + case"Addresses": + this._filteredEntitiesCache$p$0[name] = $h.Entities._getExtractedStringProperty$i(perEntityTypeDictionary,name,true); + break; + case"PhoneNumbers": + this._filteredEntitiesCache$p$0[name] = $h.Entities._getExtractedObjects$i($h.PhoneNumber,perEntityTypeDictionary,name,$h.Entities._createPhoneNumber$p,false,null); + break; + case"TaskSuggestions": + this._filteredEntitiesCache$p$0[name] = $h.Entities._getExtractedObjects$i($h.TaskSuggestion,perEntityTypeDictionary,name,$h.Entities._createTaskSuggestion$p,true,"TaskString"); + break; + case"MeetingSuggestions": + this._filteredEntitiesCache$p$0[name] = $h.Entities._getExtractedObjects$i($h.MeetingSuggestion,perEntityTypeDictionary,name,this.$$d__createMeetingSuggestion$p$0,true,"MeetingString"); + break; + case"Contacts": + this._filteredEntitiesCache$p$0[name] = $h.Entities._getExtractedObjects$i($h.Contact,perEntityTypeDictionary,name,$h.Entities._createContact$p,true,"ContactString"); + break + } + found = true; + break + } + } + if(!found) + this._filteredEntitiesCache$p$0[name] = null + } + return this._filteredEntitiesCache$p$0[name] + }, + _createMeetingSuggestion$p$0: function(data) + { + return new $h.MeetingSuggestion(data,this._dateTimeSent$p$0) + }, + _getAddresses$p$0: function() + { + if(!this._addresses$p$0) + this._addresses$p$0 = $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses",true); + return this._addresses$p$0 + }, + _getEmailAddresses$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); + if(!this._emailAddresses$p$0) + this._emailAddresses$p$0 = $h.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses",false); + return this._emailAddresses$p$0 + }, + _getUrls$p$0: function() + { + if(!this._urls$p$0) + this._urls$p$0 = $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls",false); + return this._urls$p$0 + }, + _getPhoneNumbers$p$0: function() + { + if(!this._phoneNumbers$p$0) + this._phoneNumbers$p$0 = $h.Entities._getExtractedObjects$i($h.PhoneNumber,this._data$p$0,"PhoneNumbers",$h.Entities._createPhoneNumber$p); + return this._phoneNumbers$p$0 + }, + _getTaskSuggestions$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); + if(!this._taskSuggestions$p$0) + this._taskSuggestions$p$0 = $h.Entities._getExtractedObjects$i($h.TaskSuggestion,this._data$p$0,"TaskSuggestions",$h.Entities._createTaskSuggestion$p,true,"TaskString"); + return this._taskSuggestions$p$0 + }, + _getMeetingSuggestions$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); + if(!this._meetingSuggestions$p$0) + this._meetingSuggestions$p$0 = $h.Entities._getExtractedObjects$i($h.MeetingSuggestion,this._data$p$0,"MeetingSuggestions",this.$$d__createMeetingSuggestion$p$0,true,"MeetingString"); + return this._meetingSuggestions$p$0 + }, + _getContacts$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); + if(!this._contacts$p$0) + this._contacts$p$0 = $h.Entities._getExtractedObjects$i($h.Contact,this._data$p$0,"Contacts",$h.Entities._createContact$p,true,"ContactString"); + return this._contacts$p$0 + }, + _getParcelDeliveries$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); + if(!this._parcelDeliveries$p$0) + this._parcelDeliveries$p$0 = $h.Entities._getExtractedObjects$i(Object,this._data$p$0,"ParcelDeliveries",null); + return this._parcelDeliveries$p$0 + }, + _getFlightReservations$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); + if(!this._flightReservations$p$0) + this._flightReservations$p$0 = $h.Entities._getExtractedObjects$i(Object,this._data$p$0,"FlightReservations",null); + return this._flightReservations$p$0 + } + }; + $h.ReplyConstants = function(){}; + $h.AsyncConstants = function(){}; + window["Office"]["cast"]["item"] = Office.cast.item = function(){}; + window["Office"]["cast"]["item"]["toItemRead"] = function(item) + { + if($h.Item["isInstanceOfType"](item)) + return item; + throw Error.argumentType(); + }; + window["Office"]["cast"]["item"]["toItemCompose"] = function(item) + { + if($h.ComposeItem["isInstanceOfType"](item)) + return item; + throw Error.argumentType(); + }; + window["Office"]["cast"]["item"]["toMessage"] = function(item) + { + return window["Office"]["cast"]["item"]["toMessageRead"](item) + }; + window["Office"]["cast"]["item"]["toMessageRead"] = function(item) + { + if($h.Message["isInstanceOfType"](item)) + return item; + throw Error.argumentType(); + }; + window["Office"]["cast"]["item"]["toMessageCompose"] = function(item) + { + if($h.MessageCompose["isInstanceOfType"](item)) + return item; + throw Error.argumentType(); + }; + window["Office"]["cast"]["item"]["toMeetingRequest"] = function(item) + { + if($h.MeetingRequest["isInstanceOfType"](item)) + return item; + throw Error.argumentType(); + }; + window["Office"]["cast"]["item"]["toAppointment"] = function(item) + { + return window["Office"]["cast"]["item"]["toAppointmentRead"](item) + }; + window["Office"]["cast"]["item"]["toAppointmentRead"] = function(item) + { + if($h.Appointment["isInstanceOfType"](item)) + return item; + throw Error.argumentType(); + }; + window["Office"]["cast"]["item"]["toAppointmentCompose"] = function(item) + { + if($h.AppointmentCompose["isInstanceOfType"](item)) + return item; + throw Error.argumentType(); + }; + $h.Item = function(data) + { + this.$$d__getBody$p$1 = Function.createDelegate(this,this._getBody$p$1); + this.$$d__getAttachments$p$1 = Function.createDelegate(this,this._getAttachments$p$1); + this.$$d__getItemClass$p$1 = Function.createDelegate(this,this._getItemClass$p$1); + this.$$d__getItemId$p$1 = Function.createDelegate(this,this._getItemId$p$1); + this.$$d__getDateTimeModified$p$1 = Function.createDelegate(this,this._getDateTimeModified$p$1); + this.$$d__getDateTimeCreated$p$1 = Function.createDelegate(this,this._getDateTimeCreated$p$1); + $h.Item["initializeBase"](this,[data]); + $h.InitialData._defineReadOnlyProperty$i(this,"dateTimeCreated",this.$$d__getDateTimeCreated$p$1); + $h.InitialData._defineReadOnlyProperty$i(this,"dateTimeModified",this.$$d__getDateTimeModified$p$1); + $h.InitialData._defineReadOnlyProperty$i(this,"itemId",this.$$d__getItemId$p$1); + $h.InitialData._defineReadOnlyProperty$i(this,"itemClass",this.$$d__getItemClass$p$1); + $h.InitialData._defineReadOnlyProperty$i(this,"attachments",this.$$d__getAttachments$p$1); + $h.InitialData._defineReadOnlyProperty$i(this,"body",this.$$d__getBody$p$1) + }; + $h.Item.prototype = { + _body$p$1: null, + _getItemId$p$1: function() + { + return this._data$p$0.get__itemId$i$0() + }, + _getItemClass$p$1: function() + { + return this._data$p$0.get__itemClass$i$0() + }, + _getDateTimeCreated$p$1: function() + { + return this._data$p$0.get__dateTimeCreated$i$0() + }, + _getDateTimeModified$p$1: function() + { + return this._data$p$0.get__dateTimeModified$i$0() + }, + _getAttachments$p$1: function() + { + return this._data$p$0.get__attachments$i$0() + }, + _getBody$p$1: function() + { + if(!this._body$p$1) + this._body$p$1 = new $h.Body; + return this._body$p$1 + }, + _validateDestinationFolder$p$1: function(destinationFolder) + { + if(destinationFolder !== window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["Folder"]["Inbox"] && destinationFolder !== window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["Folder"]["Junk"] && destinationFolder !== window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["Folder"]["DeletedItems"]) + throw Error.argument("destinationFolder"); + } + }; + $h.Item.prototype.move = function(destinationFolder) + { + var args = []; + for(var $$pai_4 = 1; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4 - 1] = arguments[$$pai_4]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(3,"item.move"); + this._validateDestinationFolder$p$1(destinationFolder); + var commonParameters = $h.CommonParameters.parse(args,false); + var dataToHost = {destinationFolder: destinationFolder}; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(101,dataToHost,null,null,commonParameters._callback$p$0) + }; + $h.ItemBase = function(data) + { + this.$$d__createCustomProperties$i$0 = Function.createDelegate(this,this._createCustomProperties$i$0); + this.$$d__getNotificationMessages$p$0 = Function.createDelegate(this,this._getNotificationMessages$p$0); + this.$$d_getItemType = Function.createDelegate(this,this.getItemType); + this._data$p$0 = data; + $h.InitialData._defineReadOnlyProperty$i(this,"itemType",this.$$d_getItemType); + $h.InitialData._defineReadOnlyProperty$i(this,"notificationMessages",this.$$d__getNotificationMessages$p$0) + }; + $h.ItemBase.prototype = { + _data$p$0: null, + _notificationMessages$p$0: null, + get_data: function() + { + return this._data$p$0 + }, + _createCustomProperties$i$0: function(data) + { + return new $h.CustomProperties(data) + }, + _getNotificationMessages$p$0: function() + { + if(!this._notificationMessages$p$0) + this._notificationMessages$p$0 = new $h.NotificationMessages; + return this._notificationMessages$p$0 + } + }; + $h.ItemBase.prototype.loadCustomPropertiesAsync = function() + { + var args = []; + for(var $$pai_3 = 0; $$pai_3 < arguments["length"]; ++$$pai_3) + args[$$pai_3] = arguments[$$pai_3]; + var parameters = $h.CommonParameters.parse(args,true,true); + var loadCustomProperties = new $h._loadDictionaryRequest(this.$$d__createCustomProperties$i$0,"customProperties",parameters._callback$p$0,parameters._asyncContext$p$0); + loadCustomProperties._sendRequest$i$0(3,"LoadCustomProperties",{}) + }; + $h.ItemBase.prototype.getInitializationContextAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"item.getInitializationContextAsync"); + var parameters = $h.CommonParameters.parse(args,true); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(99,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.MeetingRequest = function(data) + { + this.$$d__getRequiredAttendees$p$3 = Function.createDelegate(this,this._getRequiredAttendees$p$3); + this.$$d__getOptionalAttendees$p$3 = Function.createDelegate(this,this._getOptionalAttendees$p$3); + this.$$d__getLocation$p$3 = Function.createDelegate(this,this._getLocation$p$3); + this.$$d__getEnd$p$3 = Function.createDelegate(this,this._getEnd$p$3); + this.$$d__getStart$p$3 = Function.createDelegate(this,this._getStart$p$3); + $h.MeetingRequest["initializeBase"](this,[data]); + $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$3); + $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$3); + $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$3); + $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$3); + $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$3) + }; + $h.MeetingRequest.prototype = { + _getStart$p$3: function() + { + return this._data$p$0.get__start$i$0() + }, + _getEnd$p$3: function() + { + return this._data$p$0.get__end$i$0() + }, + _getLocation$p$3: function() + { + return this._data$p$0.get__location$i$0() + }, + _getOptionalAttendees$p$3: function() + { + return this._data$p$0.get__cc$i$0() + }, + _getRequiredAttendees$p$3: function() + { + return this._data$p$0.get__to$i$0() + } + }; + $h.MeetingSuggestion = function(data, dateTimeSent) + { + this.$$d__getEndTime$p$0 = Function.createDelegate(this,this._getEndTime$p$0); + this.$$d__getStartTime$p$0 = Function.createDelegate(this,this._getStartTime$p$0); + this.$$d__getSubject$p$0 = Function.createDelegate(this,this._getSubject$p$0); + this.$$d__getLocation$p$0 = Function.createDelegate(this,this._getLocation$p$0); + this.$$d__getAttendees$p$0 = Function.createDelegate(this,this._getAttendees$p$0); + this.$$d__getMeetingString$p$0 = Function.createDelegate(this,this._getMeetingString$p$0); + this._data$p$0 = data; + this._dateTimeSent$p$0 = dateTimeSent; + $h.InitialData._defineReadOnlyProperty$i(this,"meetingString",this.$$d__getMeetingString$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"attendees",this.$$d__getAttendees$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStartTime$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEndTime$p$0) + }; + $h.MeetingSuggestion.prototype = { + _dateTimeSent$p$0: null, + _data$p$0: null, + _attendees$p$0: null, + _getMeetingString$p$0: function() + { + return this._data$p$0["MeetingString"] + }, + _getLocation$p$0: function() + { + return this._data$p$0["Location"] + }, + _getSubject$p$0: function() + { + return this._data$p$0["Subject"] + }, + _isUTC$p$0: function() + { + if(!("IsLegacyEntityExtraction" in this._data$p$0)) + return true; + return this._data$p$0["IsLegacyEntityExtraction"] + }, + _getStartTime$p$0: function() + { + var time = this._createDateTimeFromParameter$p$0("StartTime"); + var resolvedTime = $h.MeetingSuggestionTimeDecoder.resolve(time,this._dateTimeSent$p$0,this._isUTC$p$0()); + if(resolvedTime["getTime"]() !== time["getTime"]()) + return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToUtcClientTime"](window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._dateToDictionary$i$0(resolvedTime)); + return time + }, + _getEndTime$p$0: function() + { + var time = this._createDateTimeFromParameter$p$0("EndTime"); + var resolvedTime = $h.MeetingSuggestionTimeDecoder.resolve(time,this._dateTimeSent$p$0,this._isUTC$p$0()); + if(resolvedTime["getTime"]() !== time["getTime"]()) + return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToUtcClientTime"](window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._dateToDictionary$i$0(resolvedTime)); + return time + }, + _createDateTimeFromParameter$p$0: function(keyName) + { + var dateTimeString = this._data$p$0[keyName]; + if(!dateTimeString) + return null; + return new Date(dateTimeString) + }, + _getAttendees$p$0: function() + { + if(!this._attendees$p$0) + { + var $$t_1 = this; + this._attendees$p$0 = $h.Entities._getExtractedObjects$i($h.EmailAddressDetails,this._data$p$0,"Attendees",function(data) + { + return $h.EmailAddressDetails._createFromEmailUserDictionary$i(data) + }) + } + return this._attendees$p$0 + } + }; + $h.MeetingSuggestionTimeDecoder = function(){}; + $h.MeetingSuggestionTimeDecoder.resolve = function(inTime, sentTime, isUTC) + { + if(!sentTime) + return inTime; + try + { + var tod; + var outDate; + var extractedDate; + var sentDate = new Date(sentTime["getFullYear"](),sentTime["getMonth"](),sentTime["getDate"](),0,0,0,0); + var $$t_8, + $$t_9, + $$t_A; + if(!($$t_A = $h.MeetingSuggestionTimeDecoder._decode$p(inTime,isUTC,$$t_8 = {val: extractedDate},$$t_9 = {val: tod}),extractedDate = $$t_8["val"],tod = $$t_9["val"],$$t_A)) + return inTime; + else + { + if($h._preciseDate["isInstanceOfType"](extractedDate)) + outDate = $h.MeetingSuggestionTimeDecoder._resolvePreciseDate$p(sentDate,extractedDate); + else if($h._relativeDate["isInstanceOfType"](extractedDate)) + outDate = $h.MeetingSuggestionTimeDecoder._resolveRelativeDate$p(sentDate,extractedDate); + else + outDate = sentDate; + if(window["isNaN"](outDate["getTime"]())) + return sentTime; + outDate["setMilliseconds"](outDate["getMilliseconds"]() + tod); + return outDate + } + } + catch($$e_7) + { + return sentTime + } + }; + $h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i = function(value) + { + return null === value || value === undefined + }; + $h.MeetingSuggestionTimeDecoder._resolvePreciseDate$p = function(sentDate, precise) + { + var year = precise._year$i$1; + var month = !precise._month$i$1 ? sentDate["getMonth"]() : precise._month$i$1 - 1; + var day = precise._day$i$1; + if(!day) + return sentDate; + var candidate; + if($h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i(year)) + { + candidate = new Date(sentDate["getFullYear"](),month,day); + if(candidate["getTime"]() < sentDate["getTime"]()) + candidate = new Date(sentDate["getFullYear"]() + 1,month,day) + } + else + candidate = new Date(year < 50 ? 2e3 + year : 1900 + year,month,day); + if(candidate["getMonth"]() !== month) + return sentDate; + return candidate + }; + $h.MeetingSuggestionTimeDecoder._resolveRelativeDate$p = function(sentDate, relative) + { + var date; + switch(relative._unit$i$1) + { + case 0: + date = new Date(sentDate["getFullYear"](),sentDate["getMonth"](),sentDate["getDate"]()); + date["setDate"](date["getDate"]() + relative._offset$i$1); + return date; + case 5: + return $h.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p(sentDate,relative._offset$i$1,relative._tag$i$1); + case 2: + var days = 1; + switch(relative._modifier$i$1) + { + case 1: + break; + case 2: + days = 16; + break; + default: + if(!relative._offset$i$1) + days = sentDate["getDate"](); + break + } + date = new Date(sentDate["getFullYear"](),sentDate["getMonth"](),days); + date["setMonth"](date["getMonth"]() + relative._offset$i$1); + if(date["getTime"]() < sentDate["getTime"]()) + date["setDate"](date["getDate"]() + sentDate["getDate"]() - 1); + return date; + case 1: + date = new Date(sentDate["getFullYear"](),sentDate["getMonth"](),sentDate["getDate"]()); + date["setDate"](sentDate["getDate"]() + 7 * relative._offset$i$1); + if(relative._modifier$i$1 === 1 || !relative._modifier$i$1) + { + date["setDate"](date["getDate"]() + 1 - date["getDay"]()); + if(date["getTime"]() < sentDate["getTime"]()) + return sentDate; + return date + } + else if(relative._modifier$i$1 === 2) + { + date["setDate"](date["getDate"]() + 5 - date["getDay"]()); + return date + } + break; + case 4: + return $h.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p(sentDate,relative); + case 3: + if(relative._offset$i$1 > 0) + return new Date(sentDate["getFullYear"]() + relative._offset$i$1,0,1); + break; + default: + break + } + return sentDate + }; + $h.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p = function(sentDate, offset, tag) + { + if(offset > -5 && offset < 5) + { + var dayOfWeek = (tag + 6) % 7 + 1; + var days = 7 * offset + (dayOfWeek - sentDate["getDay"]()); + sentDate["setDate"](sentDate["getDate"]() + days); + return sentDate + } + else + { + var days = (tag - sentDate["getDay"]()) % 7; + if(days < 0) + days += 7; + sentDate["setDate"](sentDate["getDate"]() + days); + return sentDate + } + }; + $h.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p = function(sentDate, relative) + { + var date; + var firstDay; + var newDate; + date = sentDate; + if(relative._tag$i$1 <= 0 || relative._tag$i$1 > 12 || relative._offset$i$1 <= 0 || relative._offset$i$1 > 5) + return sentDate; + var monthOffset = (12 + relative._tag$i$1 - date["getMonth"]() - 1) % 12; + firstDay = new Date(date["getFullYear"](),date["getMonth"]() + monthOffset,1); + if(relative._modifier$i$1 === 1) + if(relative._offset$i$1 === 1 && firstDay["getDay"]() !== 6 && firstDay["getDay"]()) + return firstDay; + else + { + newDate = new Date(firstDay["getFullYear"](),firstDay["getMonth"](),firstDay["getDate"]()); + newDate["setDate"](newDate["getDate"]() + (7 + (1 - firstDay["getDay"]())) % 7); + if(firstDay["getDay"]() !== 6 && firstDay["getDay"]() && firstDay["getDay"]() !== 1) + newDate["setDate"](newDate["getDate"]() - 7); + newDate["setDate"](newDate["getDate"]() + 7 * (relative._offset$i$1 - 1)); + if(newDate["getMonth"]() + 1 !== relative._tag$i$1) + return sentDate; + return newDate + } + else + { + newDate = new Date(firstDay["getFullYear"](),firstDay["getMonth"](),$h.MeetingSuggestionTimeDecoder._daysInMonth$p(firstDay["getMonth"](),firstDay["getFullYear"]())); + var offset = 1 - newDate["getDay"](); + if(offset > 0) + offset = offset - 7; + newDate["setDate"](newDate["getDate"]() + offset); + newDate["setDate"](newDate["getDate"]() + 7 * (1 - relative._offset$i$1)); + if(newDate["getMonth"]() + 1 !== relative._tag$i$1) + if(firstDay["getDay"]() !== 6 && firstDay["getDay"]()) + return firstDay; + else + return sentDate; + else + return newDate + } + }; + $h.MeetingSuggestionTimeDecoder._decode$p = function(inDate, isUTC, date, time) + { + var DateValueMask = 32767; + date["val"] = null; + time["val"] = 0; + if(!inDate) + return false; + if(isUTC) + time["val"] = $h.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p(inDate); + else + time["val"] = $h.MeetingSuggestionTimeDecoder._getTimeOfDayInMilliseconds$p(inDate); + var inDateAtMidnight = inDate["getTime"]() - time["val"]; + var value = (inDateAtMidnight - $h.MeetingSuggestionTimeDecoder._baseDate$p["getTime"]()) / 864e5; + if(value < 0) + return false; + else if(value >= 262144) + return false; + else + { + var type = value >> 15; + value = value & DateValueMask; + switch(type) + { + case 0: + return $h.MeetingSuggestionTimeDecoder._decodePreciseDate$p(value,date); + case 1: + return $h.MeetingSuggestionTimeDecoder._decodeRelativeDate$p(value,date); + default: + return false + } + } + }; + $h.MeetingSuggestionTimeDecoder._decodePreciseDate$p = function(value, date) + { + var c_SubTypeMask = 7; + var c_MonthMask = 15; + var c_DayMask = 31; + var c_YearMask = 127; + var year = null; + var month = 0; + var day = 0; + date["val"] = null; + var subType = value >> 12 & c_SubTypeMask; + if((subType & 4) === 4) + { + year = value >> 5 & c_YearMask; + if((subType & 2) === 2) + { + if((subType & 1) === 1) + return false; + month = value >> 1 & c_MonthMask + } + } + else + { + if((subType & 2) === 2) + month = value >> 8 & c_MonthMask; + if((subType & 1) === 1) + day = value >> 3 & c_DayMask + } + date["val"] = new $h._preciseDate(day,month,year); + return true + }; + $h.MeetingSuggestionTimeDecoder._decodeRelativeDate$p = function(value, date) + { + var TagMask = 15; + var OffsetMask = 63; + var UnitMask = 7; + var ModifierMask = 3; + var tag = value & TagMask; + value >>= 4; + var offset = $h.MeetingSuggestionTimeDecoder._fromComplement$p(value & OffsetMask,6); + value >>= 6; + var unit = value & UnitMask; + value >>= 3; + var modifier = value & ModifierMask; + try + { + date["val"] = new $h._relativeDate(modifier,offset,unit,tag); + return true + } + catch($$e_A) + { + date["val"] = null; + return false + } + }; + $h.MeetingSuggestionTimeDecoder._fromComplement$p = function(value, n) + { + var signed = 1 << n - 1; + var mask = (1 << n) - 1; + if((value & signed) === signed) + return-((value ^ mask) + 1); + else + return value + }; + $h.MeetingSuggestionTimeDecoder._daysInMonth$p = function(month, year) + { + return 32 - new Date(year,month,32)["getDate"]() + }; + $h.MeetingSuggestionTimeDecoder._getTimeOfDayInMilliseconds$p = function(inputTime) + { + var timeOfDay = 0; + timeOfDay += inputTime["getHours"]() * 3600; + timeOfDay += inputTime["getMinutes"]() * 60; + timeOfDay += inputTime["getSeconds"](); + timeOfDay *= 1e3; + timeOfDay += inputTime["getMilliseconds"](); + return timeOfDay + }; + $h.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p = function(inputTime) + { + var timeOfDay = 0; + timeOfDay += inputTime["getUTCHours"]() * 3600; + timeOfDay += inputTime["getUTCMinutes"]() * 60; + timeOfDay += inputTime["getUTCSeconds"](); + timeOfDay *= 1e3; + timeOfDay += inputTime["getUTCMilliseconds"](); + return timeOfDay + }; + $h._extractedDate = function(){}; + $h._preciseDate = function(day, month, year) + { + $h._preciseDate["initializeBase"](this); + if(day < 0 || day > 31) + throw Error.argumentOutOfRange("day"); + if(month < 0 || month > 12) + throw Error.argumentOutOfRange("month"); + this._day$i$1 = day; + this._month$i$1 = month; + if(!$h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i(year)) + { + if(!month && day) + throw Error.argument("Invalid arguments"); + if(year < 0 || year > 2099) + throw Error.argumentOutOfRange("year"); + this._year$i$1 = year % 100 + } + else if(!this._month$i$1 && !this._day$i$1) + throw Error.argument("Invalid datetime"); + }; + $h._preciseDate.prototype = { + _day$i$1: 0, + _month$i$1: 0, + _year$i$1: null + }; + $h._relativeDate = function(modifier, offset, unit, tag) + { + $h._relativeDate["initializeBase"](this); + if(offset < -32 || offset > 31) + throw Error.argumentOutOfRange("offset"); + if(tag < 0 || tag > 15) + throw Error.argumentOutOfRange("tag"); + if(!unit && offset < 0) + throw Error.argument("unit & offset do not form a valid date"); + this._modifier$i$1 = modifier; + this._offset$i$1 = offset; + this._unit$i$1 = unit; + this._tag$i$1 = tag + }; + $h._relativeDate.prototype = { + _modifier$i$1: 0, + _offset$i$1: 0, + _unit$i$1: 0, + _tag$i$1: 0 + }; + $h.Message = function(dataDictionary) + { + this.$$d__getConversationId$p$2 = Function.createDelegate(this,this._getConversationId$p$2); + this.$$d__getInternetMessageId$p$2 = Function.createDelegate(this,this._getInternetMessageId$p$2); + this.$$d__getCc$p$2 = Function.createDelegate(this,this._getCc$p$2); + this.$$d__getTo$p$2 = Function.createDelegate(this,this._getTo$p$2); + this.$$d__getFrom$p$2 = Function.createDelegate(this,this._getFrom$p$2); + this.$$d__getSender$p$2 = Function.createDelegate(this,this._getSender$p$2); + this.$$d__getNormalizedSubject$p$2 = Function.createDelegate(this,this._getNormalizedSubject$p$2); + this.$$d__getSubject$p$2 = Function.createDelegate(this,this._getSubject$p$2); + $h.Message["initializeBase"](this,[dataDictionary]); + $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"sender",this.$$d__getSender$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"from",this.$$d__getFrom$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"to",this.$$d__getTo$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"cc",this.$$d__getCc$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"internetMessageId",this.$$d__getInternetMessageId$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"conversationId",this.$$d__getConversationId$p$2) + }; + $h.Message.prototype = { + getItemType: function() + { + return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Message"] + }, + _getSubject$p$2: function() + { + return this._data$p$0.get__subject$i$0() + }, + _getNormalizedSubject$p$2: function() + { + return this._data$p$0.get__normalizedSubject$i$0() + }, + _getSender$p$2: function() + { + return this._data$p$0.get__sender$i$0() + }, + _getFrom$p$2: function() + { + return this._data$p$0.get__from$i$0() + }, + _getTo$p$2: function() + { + return this._data$p$0.get__to$i$0() + }, + _getCc$p$2: function() + { + return this._data$p$0.get__cc$i$0() + }, + _getInternetMessageId$p$2: function() + { + return this._data$p$0.get__internetMessageId$i$0() + }, + _getConversationId$p$2: function() + { + return this._data$p$0.get__conversationId$i$0() + } + }; + $h.Message.prototype.getEntities = function() + { + return this._data$p$0._getEntities$i$0() + }; + $h.Message.prototype.getEntitiesByType = function(entityType) + { + return this._data$p$0._getEntitiesByType$i$0(entityType) + }; + $h.Message.prototype.getFilteredEntitiesByName = function(name) + { + return this._data$p$0._getFilteredEntitiesByName$i$0(name) + }; + $h.Message.prototype.getSelectedEntities = function() + { + return this._data$p$0._getSelectedEntities$i$0() + }; + $h.Message.prototype.getRegExMatches = function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches"); + return this._data$p$0._getRegExMatches$i$0() + }; + $h.Message.prototype.getRegExMatchesByName = function(name) + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName"); + return this._data$p$0._getRegExMatchesByName$i$0(name) + }; + $h.Message.prototype.getSelectedRegExMatches = function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedRegExMatches"); + return this._data$p$0._getSelectedRegExMatches$i$0() + }; + $h.Message.prototype.displayReplyForm = function(obj) + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyForm$i$0(obj) + }; + $h.Message.prototype.displayReplyAllForm = function(obj) + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyAllForm$i$0(obj) + }; + $h.MessageCompose = function(data) + { + this.$$d__getConversationId$p$2 = Function.createDelegate(this,this._getConversationId$p$2); + this.$$d__getBcc$p$2 = Function.createDelegate(this,this._getBcc$p$2); + this.$$d__getCc$p$2 = Function.createDelegate(this,this._getCc$p$2); + this.$$d__getTo$p$2 = Function.createDelegate(this,this._getTo$p$2); + $h.MessageCompose["initializeBase"](this,[data]); + $h.InitialData._defineReadOnlyProperty$i(this,"to",this.$$d__getTo$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"cc",this.$$d__getCc$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"bcc",this.$$d__getBcc$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"conversationId",this.$$d__getConversationId$p$2) + }; + $h.MessageCompose.prototype = { + _to$p$2: null, + _cc$p$2: null, + _bcc$p$2: null, + getItemType: function() + { + return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Message"] + }, + _getTo$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._to$p$2) + this._to$p$2 = new $h.ComposeRecipient(0,"to"); + return this._to$p$2 + }, + _getCc$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._cc$p$2) + this._cc$p$2 = new $h.ComposeRecipient(1,"cc"); + return this._cc$p$2 + }, + _getBcc$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._bcc$p$2) + this._bcc$p$2 = new $h.ComposeRecipient(2,"bcc"); + return this._bcc$p$2 + }, + _getConversationId$p$2: function() + { + return this._data$p$0.get__conversationId$i$0() + } + }; + $h.NotificationMessages = function(){}; + $h.NotificationMessages._mapToHostItemNotificationMessageType$p = function(dataToHost) + { + var notificationType; + var hostItemNotificationMessageType; + notificationType = dataToHost["type"]; + if(notificationType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["ProgressIndicator"]) + hostItemNotificationMessageType = 1; + else if(notificationType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["InformationalMessage"]) + hostItemNotificationMessageType = 0; + else if(notificationType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["ErrorMessage"]) + hostItemNotificationMessageType = 2; + else if(notificationType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["InsightMessage"]) + hostItemNotificationMessageType = 3; + else + throw Error.argument("type"); + dataToHost["type"] = hostItemNotificationMessageType + }; + $h.NotificationMessages._validateKey$p = function(key) + { + if(!$h.ScriptHelpers.isNonEmptyString(key)) + throw Error.argument("key"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(key.length,0,32,"key") + }; + $h.NotificationMessages._validateDictionary$p = function(dictionary) + { + if(!$h.ScriptHelpers.isNonEmptyString(dictionary["type"])) + throw Error.argument("type"); + if(dictionary["type"] === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["InformationalMessage"]) + { + if(!$h.ScriptHelpers.isNonEmptyString(dictionary["icon"])) + throw Error.argument("icon"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(dictionary["icon"].length,0,32,"icon"); + if($h.ScriptHelpers.isUndefined(dictionary["persistent"])) + throw Error.argument("persistent"); + if(!Boolean["isInstanceOfType"](dictionary["persistent"])) + throw Error.argumentType("persistent",Object["getType"](dictionary["persistent"]),Boolean); + $h.NotificationMessages._verifyActionDefinitionIsNotDefined$p(dictionary) + } + else if(dictionary["type"] === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["InsightMessage"]) + { + if(!$h.ScriptHelpers.isNonEmptyString(dictionary["icon"])) + throw Error.argument("icon"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(dictionary["icon"].length,0,32,"icon"); + if(!$h.ScriptHelpers.isUndefined(dictionary["persistent"])) + throw Error.argument("persistent"); + if(dictionary["actions"]) + $h.NotificationMessages._validateActionsDefinitionBlob$p(dictionary["actions"],dictionary) + } + else + { + if(!$h.ScriptHelpers.isUndefined(dictionary["icon"])) + throw Error.argument("icon"); + if(!$h.ScriptHelpers.isUndefined(dictionary["persistent"])) + throw Error.argument("persistent"); + $h.NotificationMessages._verifyActionDefinitionIsNotDefined$p(dictionary) + } + if(!$h.ScriptHelpers.isNonEmptyString(dictionary["message"])) + throw Error.argument("message"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(dictionary["message"].length,0,150,"message") + }; + $h.NotificationMessages._validateActionsDefinitionBlob$p = function(actionsDefinitionBlob, notificationParametersDictionary) + { + var actionsDefinition = $h.NotificationMessages._extractActionDefinitionDictionary$p(actionsDefinitionBlob); + if(!actionsDefinition) + return; + $h.NotificationMessages._validateActionsDefinitionActionType$p(actionsDefinition,notificationParametersDictionary); + $h.NotificationMessages._validateActionsDefinitionActionText$p(actionsDefinition) + }; + $h.NotificationMessages._verifyActionDefinitionIsNotDefined$p = function(notificationParametersDictionary) + { + if(!$h.ScriptHelpers.isUndefined(notificationParametersDictionary["actions"])) + throw Error.argument("actions",window["_u"]["ExtensibilityStrings"]["l_ActionsDefinitionWrongNotificationMessageError_Text"]); + }; + $h.NotificationMessages._extractActionDefinitionDictionary$p = function(actionsDefinitionBlob) + { + var actionsDefinition = null; + if(Array["isInstanceOfType"](actionsDefinitionBlob)) + { + var dicArray = actionsDefinitionBlob; + if(dicArray["length"] === 1) + actionsDefinition = dicArray[0]; + else if(dicArray["length"] > 1) + throw Error.argument("actions",window["_u"]["ExtensibilityStrings"]["l_ActionsDefinitionMultipleActionsError_Text"]); + } + else + throw Error.argument("actions",String.format(window["_u"]["ExtensibilityStrings"]["l_InvalidParameterValueError_Text"],"actions")); + return actionsDefinition + }; + $h.NotificationMessages._validateActionsDefinitionActionType$p = function(actionsDefinition, notificationParametersDictionary) + { + if(!actionsDefinition["actionType"]) + throw Error.argument("actionType",String.format(window["_u"]["ExtensibilityStrings"]["l_NullOrEmptyParameterError_Text"],"actionType")); + if("showTaskPane" !== actionsDefinition["actionType"]) + throw Error.argument("actionType",window["_u"]["ExtensibilityStrings"]["l_InvalidActionType_Text"]); + else if(!$h.ScriptHelpers.isNonEmptyString(actionsDefinition["commandId"])) + throw Error.argument("commandId",String.format(window["_u"]["ExtensibilityStrings"]["l_InvalidCommandIdError_Text"],"commandId")); + }; + $h.NotificationMessages._validateActionsDefinitionActionText$p = function(actionsDefinition) + { + if(!$h.ScriptHelpers.isNonEmptyString(actionsDefinition["actionText"])) + throw Error.argument("actionText",String.format(window["_u"]["ExtensibilityStrings"]["l_NullOrEmptyParameterError_Text"],"actionText")); + if(actionsDefinition["actionText"].length > 30) + throw Error.argument(window["_u"]["ExtensibilityStrings"]["l_ParameterValueTooLongError_Text"],String.format(window["_u"]["ExtensibilityStrings"]["l_ParameterValueTooLongError_Text"],"actionText",30)); + }; + $h.NotificationMessages.prototype.addAsync = function(key, dictionary) + { + var args = []; + for(var $$pai_5 = 2; $$pai_5 < arguments["length"]; ++$$pai_5) + args[$$pai_5 - 2] = arguments[$$pai_5]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.addAsync"); + var commonParameters = $h.CommonParameters.parse(args,false); + $h.NotificationMessages._validateKey$p(key); + $h.NotificationMessages._validateDictionary$p(dictionary); + var dataToHost = {}; + dataToHost = $h.ScriptHelpers.deepClone(dictionary); + dataToHost["key"] = key; + $h.NotificationMessages._mapToHostItemNotificationMessageType$p(dataToHost); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(33,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.NotificationMessages.prototype.getAllAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.getAllAsync"); + var commonParameters = $h.CommonParameters.parse(args,true); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(34,null,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.NotificationMessages.prototype.replaceAsync = function(key, dictionary) + { + var args = []; + for(var $$pai_5 = 2; $$pai_5 < arguments["length"]; ++$$pai_5) + args[$$pai_5 - 2] = arguments[$$pai_5]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.replaceAsync"); + var commonParameters = $h.CommonParameters.parse(args,false); + $h.NotificationMessages._validateKey$p(key); + $h.NotificationMessages._validateDictionary$p(dictionary); + var dataToHost = {}; + dataToHost = $h.ScriptHelpers.deepClone(dictionary); + dataToHost["key"] = key; + $h.NotificationMessages._mapToHostItemNotificationMessageType$p(dataToHost); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(35,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.NotificationMessages.prototype.removeAsync = function(key) + { + var args = []; + for(var $$pai_4 = 1; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4 - 1] = arguments[$$pai_4]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.removeAsync"); + var commonParameters = $h.CommonParameters.parse(args,false); + $h.NotificationMessages._validateKey$p(key); + var dataToHost = {key: key}; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(36,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.OutlookErrorManager = function(){}; + $h.OutlookErrorManager.getErrorArgs = function(errorCode) + { + if(!$h.OutlookErrorManager._isInitialized$p) + $h.OutlookErrorManager._initialize$p(); + return OSF.DDA.ErrorCodeManager["getErrorArgs"](errorCode) + }; + $h.OutlookErrorManager._initialize$p = function() + { + $h.OutlookErrorManager._addErrorMessage$p(9e3,"AttachmentSizeExceeded",window["_u"]["ExtensibilityStrings"]["l_AttachmentExceededSize_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9001,"NumberOfAttachmentsExceeded",window["_u"]["ExtensibilityStrings"]["l_ExceededMaxNumberOfAttachments_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9002,"InternalFormatError",window["_u"]["ExtensibilityStrings"]["l_InternalFormatError_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9003,"InvalidAttachmentId",window["_u"]["ExtensibilityStrings"]["l_InvalidAttachmentId_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9004,"InvalidAttachmentPath",window["_u"]["ExtensibilityStrings"]["l_InvalidAttachmentPath_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9005,"CannotAddAttachmentBeforeUpgrade",window["_u"]["ExtensibilityStrings"]["l_CannotAddAttachmentBeforeUpgrade_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9006,"AttachmentDeletedBeforeUploadCompletes",window["_u"]["ExtensibilityStrings"]["l_AttachmentDeletedBeforeUploadCompletes_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9007,"AttachmentUploadGeneralFailure",window["_u"]["ExtensibilityStrings"]["l_AttachmentUploadGeneralFailure_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9008,"AttachmentToDeleteDoesNotExist",window["_u"]["ExtensibilityStrings"]["l_DeleteAttachmentDoesNotExist_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9009,"AttachmentDeleteGeneralFailure",window["_u"]["ExtensibilityStrings"]["l_AttachmentDeleteGeneralFailure_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9010,"InvalidEndTime",window["_u"]["ExtensibilityStrings"]["l_InvalidEndTime_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9011,"HtmlSanitizationFailure",window["_u"]["ExtensibilityStrings"]["l_HtmlSanitizationFailure_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9012,"NumberOfRecipientsExceeded",String.format(window["_u"]["ExtensibilityStrings"]["l_NumberOfRecipientsExceeded_Text"],500)); + $h.OutlookErrorManager._addErrorMessage$p(9013,"NoValidRecipientsProvided",window["_u"]["ExtensibilityStrings"]["l_NoValidRecipientsProvided_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9014,"CursorPositionChanged",window["_u"]["ExtensibilityStrings"]["l_CursorPositionChanged_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9016,"InvalidSelection",window["_u"]["ExtensibilityStrings"]["l_InvalidSelection_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9017,"AccessRestricted",""); + $h.OutlookErrorManager._addErrorMessage$p(9018,"GenericTokenError",""); + $h.OutlookErrorManager._addErrorMessage$p(9019,"GenericSettingsError",""); + $h.OutlookErrorManager._addErrorMessage$p(9020,"GenericResponseError",""); + $h.OutlookErrorManager._addErrorMessage$p(9021,"SaveError",window["_u"]["ExtensibilityStrings"]["l_SaveError_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9022,"MessageInDifferentStoreError",window["_u"]["ExtensibilityStrings"]["l_MessageInDifferentStoreError_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9023,"DuplicateNotificationKey",window["_u"]["ExtensibilityStrings"]["l_DuplicateNotificationKey_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9024,"NotificationKeyNotFound",window["_u"]["ExtensibilityStrings"]["l_NotificationKeyNotFound_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9025,"NumberOfNotificationsExceeded",window["_u"]["ExtensibilityStrings"]["l_NumberOfNotificationsExceeded_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9026,"PersistedNotificationArrayReadError",window["_u"]["ExtensibilityStrings"]["l_PersistedNotificationArrayReadError_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9027,"PersistedNotificationArraySaveError",window["_u"]["ExtensibilityStrings"]["l_PersistedNotificationArraySaveError_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9028,"CannotPersistPropertyInUnsavedDraftError",window["_u"]["ExtensibilityStrings"]["l_CannotPersistPropertyInUnsavedDraftError_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9029,"CanOnlyGetTokenForSavedItem",window["_u"]["ExtensibilityStrings"]["l_CallSaveAsyncBeforeToken_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9030,"APICallFailedDueToItemChange",window["_u"]["ExtensibilityStrings"]["l_APICallFailedDueToItemChange_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9031,"InvalidParameterValueError",window["_u"]["ExtensibilityStrings"]["l_InvalidParameterValueError_Text"]); + $h.OutlookErrorManager._isInitialized$p = true + }; + $h.OutlookErrorManager._addErrorMessage$p = function(errorCode, errorName, errorMessage) + { + OSF.DDA.ErrorCodeManager["addErrorMessage"](errorCode,{ + name: errorName, + message: errorMessage + }) + }; + $h.OutlookErrorManager.OutlookErrorCodes = function(){}; + $h.OutlookErrorManager.OsfDdaErrorCodes = function(){}; + $h.PhoneNumber = function(data) + { + this.$$d__getPhoneType$p$0 = Function.createDelegate(this,this._getPhoneType$p$0); + this.$$d__getOriginalPhoneString$p$0 = Function.createDelegate(this,this._getOriginalPhoneString$p$0); + this.$$d__getPhoneString$p$0 = Function.createDelegate(this,this._getPhoneString$p$0); + this._data$p$0 = data; + $h.InitialData._defineReadOnlyProperty$i(this,"phoneString",this.$$d__getPhoneString$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"originalPhoneString",this.$$d__getOriginalPhoneString$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"type",this.$$d__getPhoneType$p$0) + }; + $h.PhoneNumber.prototype = { + _data$p$0: null, + _getPhoneString$p$0: function() + { + return this._data$p$0["PhoneString"] + }, + _getOriginalPhoneString$p$0: function() + { + return this._data$p$0["OriginalPhoneString"] + }, + _getPhoneType$p$0: function() + { + return this._data$p$0["Type"] + } + }; + $h.TaskSuggestion = function(data) + { + this.$$d__getAssignees$p$0 = Function.createDelegate(this,this._getAssignees$p$0); + this.$$d__getTaskString$p$0 = Function.createDelegate(this,this._getTaskString$p$0); + this._data$p$0 = data; + $h.InitialData._defineReadOnlyProperty$i(this,"taskString",this.$$d__getTaskString$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"assignees",this.$$d__getAssignees$p$0) + }; + $h.TaskSuggestion.prototype = { + _data$p$0: null, + _assignees$p$0: null, + _getTaskString$p$0: function() + { + return this._data$p$0["TaskString"] + }, + _getAssignees$p$0: function() + { + if(!this._assignees$p$0) + { + var $$t_1 = this; + this._assignees$p$0 = $h.Entities._getExtractedObjects$i($h.EmailAddressDetails,this._data$p$0,"Assignees",function(data) + { + return $h.EmailAddressDetails._createFromEmailUserDictionary$i(data) + }) + } + return this._assignees$p$0 + } + }; + $h.UserProfile = function(data) + { + this.$$d__getCapabilities$p$0 = Function.createDelegate(this,this._getCapabilities$p$0); + this.$$d__getUserProfileType$p$0 = Function.createDelegate(this,this._getUserProfileType$p$0); + this.$$d__getTimeZone$p$0 = Function.createDelegate(this,this._getTimeZone$p$0); + this.$$d__getEmailAddress$p$0 = Function.createDelegate(this,this._getEmailAddress$p$0); + this.$$d__getDisplayName$p$0 = Function.createDelegate(this,this._getDisplayName$p$0); + this._data$p$0 = data; + $h.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"timeZone",this.$$d__getTimeZone$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"type",this.$$d__getUserProfileType$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"capabilities",this.$$d__getCapabilities$p$0) + }; + $h.UserProfile.prototype = { + _data$p$0: null, + _getCapabilities$p$0: function() + { + return this._data$p$0.get__userProfileCapabilities$i$0() || {} + }, + _getUserProfileType$p$0: function() + { + return this._data$p$0.get__userProfileType$i$0() + }, + _getDisplayName$p$0: function() + { + return this._data$p$0.get__userDisplayName$i$0() + }, + _getEmailAddress$p$0: function() + { + return this._data$p$0.get__userEmailAddress$i$0() + }, + _getTimeZone$p$0: function() + { + return this._data$p$0.get__userTimeZone$i$0() + } + }; + $h.OutlookDispid = function(){}; + $h.OutlookDispid.prototype = { + owaOnlyMethod: 0, + getInitialData: 1, + getUserIdentityToken: 2, + loadCustomProperties: 3, + saveCustomProperties: 4, + ewsRequest: 5, + displayNewAppointmentForm: 7, + displayMessageForm: 8, + displayAppointmentForm: 9, + displayReplyForm: 10, + displayReplyAllForm: 11, + getCallbackToken: 12, + bodySetSelectedDataAsync: 13, + getBodyTypeAsync: 14, + getRecipientsAsync: 15, + addFileAttachmentAsync: 16, + setSubjectAsync: 17, + getSubjectAsync: 18, + addItemAttachmentAsync: 19, + removeAttachmentAsync: 20, + setRecipientsAsync: 21, + addRecipientsAsync: 22, + bodyPrependAsync: 23, + getTimeAsync: 24, + setTimeAsync: 25, + getLocationAsync: 26, + setLocationAsync: 27, + getSelectedDataAsync: 28, + setSelectedDataAsync: 29, + displayReplyFormWithAttachments: 30, + displayReplyAllFormWithAttachments: 31, + saveAsync: 32, + addNotficationMessageAsync: 33, + getAllNotficationMessagesAsync: 34, + replaceNotficationMessageAsync: 35, + removeNotficationMessageAsync: 36, + getBodyAsync: 37, + setBodyAsync: 38, + appCommands1: 39, + registerConsentAsync: 40, + close: 41, + closeApp: 42, + displayPersonaCardAsync: 43, + displayNewMessageForm: 44, + navigateToModuleAsync: 45, + eventCompleted: 94, + closeContainer: 97, + getInitializationContextAsync: 99, + moveToFolder: 101, + appendOnSendAsync: 100, + messageParent: 144, + trackCtq: 400, + recordTrace: 401, + recordDataPoint: 402, + windowOpenOverrideHandler: 403, + saveSettingsRequest: 404 + }; + $h.OutlookDispid["registerEnum"]("$h.OutlookDispid",false); + $h.RequestState = function(){}; + $h.RequestState.prototype = { + unsent: 0, + opened: 1, + headersReceived: 2, + loading: 3, + done: 4 + }; + $h.RequestState["registerEnum"]("$h.RequestState",false); + $h.CommonParameters = function(options, callback, asyncContext) + { + this._options$p$0 = options; + this._callback$p$0 = callback; + this._asyncContext$p$0 = asyncContext + }; + $h.CommonParameters.parse = function(args, isCallbackRequired, tryLegacy) + { + var legacyParameters; + var $$t_8, + $$t_9; + if(tryLegacy && ($$t_9 = $h.CommonParameters._tryParseLegacy$p(args,$$t_8 = {val: legacyParameters}),legacyParameters = $$t_8["val"],$$t_9)) + return legacyParameters; + var argsLength = args["length"]; + var options = null; + var callback = null; + var asyncContext = null; + if(argsLength === 1) + if($h.CommonParameters._argIsFunction$p(args[0])) + callback = args[0]; + else if(Object["isInstanceOfType"](args[0])) + options = args[0]; + else + throw Error.argumentType(); + else if(argsLength === 2) + { + if(!Object["isInstanceOfType"](args[0])) + throw Error.argument("options"); + if(!$h.CommonParameters._argIsFunction$p(args[1])) + throw Error.argument("callback"); + options = args[0]; + callback = args[1] + } + else if(argsLength) + throw Error.parameterCount(window["_u"]["ExtensibilityStrings"]["l_ParametersNotAsExpected_Text"]); + if(isCallbackRequired && !callback) + throw Error.argumentNull("callback"); + if(options && !$h.ScriptHelpers.isNullOrUndefined(options["asyncContext"])) + asyncContext = options["asyncContext"]; + return new $h.CommonParameters(options,callback,asyncContext) + }; + $h.CommonParameters._tryParseLegacy$p = function(args, commonParameters) + { + commonParameters["val"] = null; + var argsLength = args["length"]; + var callback = null; + var userContext = null; + if(!argsLength || argsLength > 2) + return false; + if(!$h.CommonParameters._argIsFunction$p(args[0])) + return false; + callback = args[0]; + if(argsLength > 1) + userContext = args[1]; + commonParameters["val"] = new $h.CommonParameters(null,callback,userContext); + return true + }; + $h.CommonParameters._argIsFunction$p = function(arg) + { + return typeof arg === "function" + }; + $h.CommonParameters.prototype = { + _options$p$0: null, + _callback$p$0: null, + _asyncContext$p$0: null, + get_options: function() + { + return this._options$p$0 + }, + get_callback: function() + { + return this._callback$p$0 + }, + get_asyncContext: function() + { + return this._asyncContext$p$0 + } + }; + $h.EwsRequest = function(userContext) + { + $h.EwsRequest["initializeBase"](this,[userContext]) + }; + $h.EwsRequest.prototype = { + readyState: 1, + status: 0, + statusText: null, + onreadystatechange: null, + responseText: null, + get__statusCode$i$1: function() + { + return this.status + }, + set__statusCode$i$1: function(value) + { + this.status = value; + return value + }, + get__statusDescription$i$1: function() + { + return this.statusText + }, + set__statusDescription$i$1: function(value) + { + this.statusText = value; + return value + }, + get__requestState$i$1: function() + { + return this.readyState + }, + set__requestState$i$1: function(value) + { + this.readyState = value; + return value + }, + get_hasOnReadyStateChangeCallback: function() + { + return!$h.ScriptHelpers.isNullOrUndefined(this.onreadystatechange) + }, + get__response$i$1: function() + { + return this.responseText + }, + set__response$i$1: function(value) + { + this.responseText = value; + return value + }, + send: function(data) + { + this._checkSendConditions$i$1(); + if($h.ScriptHelpers.isNullOrUndefined(data)) + this._throwInvalidStateException$i$1(); + this._sendRequest$i$0(5,"EwsRequest",{body: data}) + }, + _callOnReadyStateChangeCallback$i$1: function() + { + if(!$h.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)) + this.onreadystatechange() + }, + _parseExtraResponseData$i$1: function(response){}, + executeExtraFailedResponseSteps: function(){} + }; + $h.InitialData = function(data) + { + this._data$p$0 = data; + this._permissionLevel$p$0 = this._calculatePermissionLevel$p$0() + }; + $h.InitialData._defineReadOnlyProperty$i = function(o, methodName, getter) + { + var propertyDescriptor = { + get: getter, + configurable: false + }; + window["Object"]["defineProperty"](o,methodName,propertyDescriptor) + }; + $h.InitialData.prototype = { + _toRecipients$p$0: null, + _ccRecipients$p$0: null, + _attachments$p$0: null, + _resources$p$0: null, + _entities$p$0: null, + _selectedEntities$p$0: null, + _data$p$0: null, + _permissionLevel$p$0: 0, + get__isRestIdSupported$i$0: function() + { + return this._data$p$0["isRestIdSupported"] + }, + get__itemId$i$0: function() + { + return this._data$p$0["id"] + }, + get__itemClass$i$0: function() + { + return this._data$p$0["itemClass"] + }, + get__dateTimeCreated$i$0: function() + { + return new Date(this._data$p$0["dateTimeCreated"]) + }, + get__dateTimeModified$i$0: function() + { + return new Date(this._data$p$0["dateTimeModified"]) + }, + get__dateTimeSent$i$0: function() + { + return new Date(this._data$p$0["dateTimeSent"]) + }, + get__subject$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + return this._data$p$0["subject"] + }, + get__normalizedSubject$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + return this._data$p$0["normalizedSubject"] + }, + get__internetMessageId$i$0: function() + { + return this._data$p$0["internetMessageId"] + }, + get__conversationId$i$0: function() + { + return this._data$p$0["conversationId"] + }, + get__sender$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + var sender = this._data$p$0["sender"]; + return $h.ScriptHelpers.isNullOrUndefined(sender) ? null : new $h.EmailAddressDetails(sender) + }, + get__from$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + var from = this._data$p$0["from"]; + return $h.ScriptHelpers.isNullOrUndefined(from) ? null : new $h.EmailAddressDetails(from) + }, + get__to$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + if(null === this._toRecipients$p$0) + this._toRecipients$p$0 = this._createEmailAddressDetails$p$0("to"); + return this._toRecipients$p$0 + }, + get__cc$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + if(null === this._ccRecipients$p$0) + this._ccRecipients$p$0 = this._createEmailAddressDetails$p$0("cc"); + return this._ccRecipients$p$0 + }, + get__attachments$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + if(null === this._attachments$p$0) + this._attachments$p$0 = this._createAttachmentDetails$p$0(); + return this._attachments$p$0 + }, + get__ewsUrl$i$0: function() + { + return this._data$p$0["ewsUrl"] + }, + get__restUrl$i$0: function() + { + return this._data$p$0["restUrl"] + }, + get__marketplaceAssetId$i$0: function() + { + return this._data$p$0["marketplaceAssetId"] + }, + get__extensionId$i$0: function() + { + return this._data$p$0["extensionId"] + }, + get__marketplaceContentMarket$i$0: function() + { + return this._data$p$0["marketplaceContentMarket"] + }, + get__consentMetadata$i$0: function() + { + return this._data$p$0["consentMetadata"] + }, + get__isRead$i$0: function() + { + return this._data$p$0["isRead"] + }, + get__endNodeUrl$i$0: function() + { + return this._data$p$0["endNodeUrl"] + }, + get__entryPointUrl$i$0: function() + { + return this._data$p$0["entryPointUrl"] + }, + get__start$i$0: function() + { + return new Date(this._data$p$0["start"]) + }, + get__end$i$0: function() + { + return new Date(this._data$p$0["end"]) + }, + get__location$i$0: function() + { + return this._data$p$0["location"] + }, + get__userProfileType$i$0: function() + { + return this._data$p$0["userProfileType"] + }, + get__resources$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + if(null === this._resources$p$0) + this._resources$p$0 = this._createEmailAddressDetails$p$0("resources"); + return this._resources$p$0 + }, + get__organizer$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + var organizer = this._data$p$0["organizer"]; + return $h.ScriptHelpers.isNullOrUndefined(organizer) ? null : new $h.EmailAddressDetails(organizer) + }, + get__userProfileCapabilities$i$0: function() + { + return this._data$p$0["userProfileCapabilities"] + }, + get__userDisplayName$i$0: function() + { + return this._data$p$0["userDisplayName"] + }, + get__userEmailAddress$i$0: function() + { + return this._data$p$0["userEmailAddress"] + }, + get__userTimeZone$i$0: function() + { + return this._data$p$0["userTimeZone"] + }, + get__timeZoneOffsets$i$0: function() + { + return this._data$p$0["timeZoneOffsets"] + }, + get__hostVersion$i$0: function() + { + return this._data$p$0["hostVersion"] + }, + get__owaView$i$0: function() + { + return this._data$p$0["owaView"] + }, + get__overrideWindowOpen$i$0: function() + { + return this._data$p$0["overrideWindowOpen"] + }, + _getEntities$i$0: function() + { + if(!this._entities$p$0) + this._entities$p$0 = new $h.Entities(this._data$p$0["entities"],this._data$p$0["filteredEntities"],this.get__dateTimeSent$i$0(),this._permissionLevel$p$0); + return this._entities$p$0 + }, + _getSelectedEntities$i$0: function() + { + if(!this._selectedEntities$p$0) + this._selectedEntities$p$0 = new $h.Entities(this._data$p$0["selectedEntities"],null,this.get__dateTimeSent$i$0(),this._permissionLevel$p$0); + return this._selectedEntities$p$0 + }, + _getEntitiesByType$i$0: function(entityType) + { + var entites = this._getEntities$i$0(); + return entites._getByType$i$0(entityType) + }, + _getFilteredEntitiesByName$i$0: function(name) + { + var entities = this._getEntities$i$0(); + return entities._getFilteredEntitiesByName$i$0(name) + }, + _getRegExMatches$i$0: function() + { + if(!this._data$p$0["regExMatches"]) + return null; + return this._data$p$0["regExMatches"] + }, + _getSelectedRegExMatches$i$0: function() + { + if(!this._data$p$0["selectedRegExMatches"]) + return null; + return this._data$p$0["selectedRegExMatches"] + }, + _getRegExMatchesByName$i$0: function(regexName) + { + var regexMatches = this._getRegExMatches$i$0(); + if(!regexMatches || !regexMatches[regexName]) + return null; + return regexMatches[regexName] + }, + _throwOnRestrictedPermissionLevel$i$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0) + }, + _createEmailAddressDetails$p$0: function(key) + { + var to = this._data$p$0[key]; + if($h.ScriptHelpers.isNullOrUndefined(to)) + return[]; + var recipients = []; + for(var i = 0; i < to["length"]; i++) + if(!$h.ScriptHelpers.isNullOrUndefined(to[i])) + recipients[i] = new $h.EmailAddressDetails(to[i]); + return recipients + }, + _createAttachmentDetails$p$0: function() + { + var attachments = this._data$p$0["attachments"]; + if($h.ScriptHelpers.isNullOrUndefined(attachments)) + return[]; + var attachmentDetails = []; + for(var i = 0; i < attachments["length"]; i++) + if(!$h.ScriptHelpers.isNullOrUndefined(attachments[i])) + attachmentDetails[i] = new $h.AttachmentDetails(attachments[i]); + return attachmentDetails + }, + _calculatePermissionLevel$p$0: function() + { + var HostReadItem = 1; + var HostReadWriteMailbox = 2; + var HostReadWriteItem = 3; + var permissionLevelFromHost = this._data$p$0["permissionLevel"]; + if($h.ScriptHelpers.isUndefined(this._permissionLevel$p$0)) + return 0; + switch(permissionLevelFromHost) + { + case HostReadItem: + return 1; + case HostReadWriteItem: + return 2; + case HostReadWriteMailbox: + return 3; + default: + return 0 + } + } + }; + $h._loadDictionaryRequest = function(createResultObject, dictionaryName, callback, userContext) + { + $h._loadDictionaryRequest["initializeBase"](this,[userContext]); + this._createResultObject$p$1 = createResultObject; + this._dictionaryName$p$1 = dictionaryName; + this._callback$p$1 = callback + }; + $h._loadDictionaryRequest.prototype = { + _dictionaryName$p$1: null, + _createResultObject$p$1: null, + _callback$p$1: null, + handleResponse: function(response) + { + if(response["wasSuccessful"]) + { + var value = response[this._dictionaryName$p$1]; + var responseData = window["JSON"]["parse"](value); + this.createAsyncResult(this._createResultObject$p$1(responseData),0,0,null) + } + else + this.createAsyncResult(null,1,9020,response["errorMessage"]); + this._callback$p$1(this._asyncResult$p$0) + } + }; + $h.ProxyRequestBase = function(userContext) + { + $h.ProxyRequestBase["initializeBase"](this,[userContext]) + }; + $h.ProxyRequestBase.prototype = { + handleResponse: function(response) + { + if(!response["wasProxySuccessful"]) + { + this.set__statusCode$i$1(500); + this.set__statusDescription$i$1("Error"); + var errorMessage = response["errorMessage"]; + this.set__response$i$1(errorMessage); + this.createAsyncResult(null,1,9020,errorMessage) + } + else + { + this.set__statusCode$i$1(response["statusCode"]); + this.set__statusDescription$i$1(response["statusDescription"]); + this.set__response$i$1(response["body"]); + this.createAsyncResult(this.get__response$i$1(),0,0,null) + } + this._parseExtraResponseData$i$1(response); + this._cycleReadyStateFromHeadersReceivedToLoadingToDone$i$1() + }, + _throwInvalidStateException$i$1: function() + { + throw Error.create("DOMException",{ + code: 11, + message: "INVALID_STATE_ERR" + }); + }, + _cycleReadyStateFromHeadersReceivedToLoadingToDone$i$1: function() + { + var $$t_0 = this; + this._changeReadyState$i$1(2,function() + { + $$t_0._changeReadyState$i$1(3,function() + { + $$t_0._changeReadyState$i$1(4,null) + }) + }) + }, + _changeReadyState$i$1: function(state, nextStep) + { + this.set__requestState$i$1(state); + var $$t_2 = this; + window.setTimeout(function() + { + try + { + $$t_2._callOnReadyStateChangeCallback$i$1() + } + finally + { + if(!$h.ScriptHelpers.isNullOrUndefined(nextStep)) + nextStep() + } + },0) + }, + _checkSendConditions$i$1: function() + { + if(this.get__requestState$i$1() !== 1) + this._throwInvalidStateException$i$1(); + if(this._isSent$p$0) + this._throwInvalidStateException$i$1() + } + }; + $h.RequestBase = function(userContext) + { + this._userContext$p$0 = userContext + }; + $h.RequestBase.prototype = { + _isSent$p$0: false, + _asyncResult$p$0: null, + _userContext$p$0: null, + get_asyncResult: function() + { + return this._asyncResult$p$0 + }, + _sendRequest$i$0: function(dispid, methodName, dataToSend) + { + this._isSent$p$0 = true; + var $$t_5 = this; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.invokeHostMethod(dispid,dataToSend,function(resultCode, response) + { + if(resultCode) + $$t_5.createAsyncResult(null,1,9017,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode)); + else + $$t_5.handleResponse(response) + }) + }, + createAsyncResult: function(value, errorCode, detailedErrorCode, errorDescription) + { + this._asyncResult$p$0 = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(value,errorCode,detailedErrorCode,this._userContext$p$0,errorDescription) + } + }; + $h.SaveDictionaryRequest = function(callback, userContext) + { + $h.SaveDictionaryRequest["initializeBase"](this,[userContext]); + if(!$h.ScriptHelpers.isNullOrUndefined(callback)) + this._callback$p$1 = callback + }; + $h.SaveDictionaryRequest.prototype = { + _callback$p$1: null, + handleResponse: function(response) + { + if(response["wasSuccessful"]) + this.createAsyncResult(null,0,0,null); + else + this.createAsyncResult(null,1,9020,response["errorMessage"]); + if(!$h.ScriptHelpers.isNullOrUndefined(this._callback$p$1)) + this._callback$p$1(this._asyncResult$p$0) + } + }; + $h.ScriptHelpers = function(){}; + $h.ScriptHelpers.isNull = function(value) + { + return null === value + }; + $h.ScriptHelpers.isNullOrUndefined = function(value) + { + return $h.ScriptHelpers.isNull(value) || $h.ScriptHelpers.isUndefined(value) + }; + $h.ScriptHelpers.isUndefined = function(value) + { + return value === undefined + }; + $h.ScriptHelpers.dictionaryContainsKey = function(obj, keyName) + { + return Object["isInstanceOfType"](obj) ? keyName in obj : false + }; + $h.ScriptHelpers.isNonEmptyString = function(value) + { + if(!value) + return false; + return String["isInstanceOfType"](value) + }; + $h.ScriptHelpers.deepClone = function(obj) + { + return window["JSON"]["parse"](window["JSON"]["stringify"](obj)) + }; + $h.ScriptHelpers.isValueTrue = function(value) + { + if(!$h.ScriptHelpers.isNullOrUndefined(value)) + return value["toString"]().toLowerCase() === "true"; + return false + }; + window["OSF"]["DDA"]["OutlookAppOm"]["registerClass"]("OSF.DDA.OutlookAppOm"); + window["OSF"]["DDA"]["Settings"]["registerClass"]("OSF.DDA.Settings"); + $h.AdditionalGlobalParameters["registerClass"]("$h.AdditionalGlobalParameters"); + $h.ItemBase["registerClass"]("$h.ItemBase"); + $h.Item["registerClass"]("$h.Item",$h.ItemBase); + $h.Appointment["registerClass"]("$h.Appointment",$h.Item); + $h.ComposeItem["registerClass"]("$h.ComposeItem",$h.ItemBase); + $h.AppointmentCompose["registerClass"]("$h.AppointmentCompose",$h.ComposeItem); + $h.AttachmentDetails["registerClass"]("$h.AttachmentDetails"); + $h.Body["registerClass"]("$h.Body"); + $h.ComposeBody["registerClass"]("$h.ComposeBody",$h.Body); + $h.ComposeRecipient["registerClass"]("$h.ComposeRecipient"); + $h.ComposeLocation["registerClass"]("$h.ComposeLocation"); + $h.ComposeSubject["registerClass"]("$h.ComposeSubject"); + $h.ComposeTime["registerClass"]("$h.ComposeTime"); + $h.Contact["registerClass"]("$h.Contact"); + $h.CustomProperties["registerClass"]("$h.CustomProperties"); + $h.Diagnostics["registerClass"]("$h.Diagnostics"); + $h.EmailAddressDetails["registerClass"]("$h.EmailAddressDetails"); + $h.Entities["registerClass"]("$h.Entities"); + $h.Message["registerClass"]("$h.Message",$h.Item); + $h.MeetingRequest["registerClass"]("$h.MeetingRequest",$h.Message); + $h.MeetingSuggestion["registerClass"]("$h.MeetingSuggestion"); + $h._extractedDate["registerClass"]("$h._extractedDate"); + $h._preciseDate["registerClass"]("$h._preciseDate",$h._extractedDate); + $h._relativeDate["registerClass"]("$h._relativeDate",$h._extractedDate); + $h.MessageCompose["registerClass"]("$h.MessageCompose",$h.ComposeItem); + $h.NotificationMessages["registerClass"]("$h.NotificationMessages"); + $h.PhoneNumber["registerClass"]("$h.PhoneNumber"); + $h.TaskSuggestion["registerClass"]("$h.TaskSuggestion"); + $h.UserProfile["registerClass"]("$h.UserProfile"); + $h.CommonParameters["registerClass"]("$h.CommonParameters"); + $h.RequestBase["registerClass"]("$h.RequestBase"); + $h.ProxyRequestBase["registerClass"]("$h.ProxyRequestBase",$h.RequestBase); + $h.EwsRequest["registerClass"]("$h.EwsRequest",$h.ProxyRequestBase); + $h.InitialData["registerClass"]("$h.InitialData"); + $h._loadDictionaryRequest["registerClass"]("$h._loadDictionaryRequest",$h.RequestBase); + $h.SaveDictionaryRequest["registerClass"]("$h.SaveDictionaryRequest",$h.RequestBase); + window["OSF"]["DDA"]["OutlookAppOm"].asyncMethodTimeoutKeyName = "__timeout__"; + window["OSF"]["DDA"]["OutlookAppOm"].ewsIdOrEmailParamName = "ewsIdOrEmail"; + window["OSF"]["DDA"]["OutlookAppOm"].moduleParamName = "module"; + window["OSF"]["DDA"]["OutlookAppOm"].queryStringParamName = "queryString"; + window["OSF"]["DDA"]["OutlookAppOm"]._maxRecipients$p = 100; + window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p = 255; + window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength = 32768; + window["OSF"]["DDA"]["OutlookAppOm"]._maxLocationLength$p = 255; + window["OSF"]["DDA"]["OutlookAppOm"]._maxEwsRequestSize$p = 1e6; + window["OSF"]["DDA"]["OutlookAppOm"].executeMethodName = "ExecuteMethod"; + window["OSF"]["DDA"]["OutlookAppOm"].getInitialDataMethodName = "GetInitialData"; + window["OSF"]["DDA"]["OutlookAppOm"].standardInvokeHostMethodErrorCodeKey = "errorCode"; + window["OSF"]["DDA"]["OutlookAppOm"].standardInvokeHostMethodErrorKey = "error"; + window["OSF"]["DDA"]["OutlookAppOm"].outlookAsyncResponseWasSuccessfulKey = "wasSuccessful"; + window["OSF"]["DDA"]["OutlookAppOm"].outlookAsyncResponseErrorMessageKey = "errorMessage"; + window["OSF"]["DDA"]["OutlookAppOm"].itemIdParameterName = "itemId"; + window["OSF"]["DDA"]["OutlookAppOm"].restVersionParameterName = "restVersion"; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p = null; + $h.AdditionalGlobalParameters.itemNumberKey = "itemNumber"; + $h.AdditionalGlobalParameters.actionsDefinitionKey = "actions"; + $h.AttachmentConstants.maxAttachmentNameLength = 255; + $h.AttachmentConstants.maxUrlLength = 2048; + $h.AttachmentConstants.maxItemIdLength = 200; + $h.AttachmentConstants.maxRemoveIdLength = 200; + $h.AttachmentConstants.attachmentParameterName = "attachments"; + $h.AttachmentConstants.attachmentTypeParameterName = "type"; + $h.AttachmentConstants.attachmentUrlParameterName = "url"; + $h.AttachmentConstants.attachmentItemIdParameterName = "itemId"; + $h.AttachmentConstants.attachmentNameParameterName = "name"; + $h.AttachmentConstants.attachmentIsInlineParameterName = "isInline"; + $h.AttachmentConstants.attachmentTypeFileName = "file"; + $h.AttachmentConstants.attachmentTypeItemName = "item"; + $h.AttachmentDetails._attachmentTypeMap$p = [window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["File"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["Item"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["Cloud"]]; + $h.Body.coercionTypeParameterName = "coercionType"; + $h.ComposeRecipient.displayNameLengthLimit = 255; + $h.ComposeRecipient.maxSmtpLength = 571; + $h.ComposeRecipient.recipientsLimit = 100; + $h.ComposeRecipient.totalRecipientsLimit = 500; + $h.ComposeRecipient.addressParameterName = "address"; + $h.ComposeRecipient.nameParameterName = "name"; + $h.ComposeLocation.locationKey = "location"; + $h.ComposeLocation.maximumLocationLength = 255; + $h.ComposeSubject.maximumSubjectLength = 255; + $h.ComposeTime.timeTypeName = "TimeProperty"; + $h.ComposeTime.timeDataName = "time"; + $h.Diagnostics.outlookAppName = "Outlook"; + $h.Diagnostics.outlookWebAppName = "OutlookWebApp"; + $h.Diagnostics.outlookIOSAppName = "OutlookIOS"; + $h.Diagnostics.outlookAndroidAppName = "OutlookAndroid"; + $h.EmailAddressDetails._emptyString$p = ""; + $h.EmailAddressDetails._responseTypeMap$p = [window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["None"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Organizer"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Tentative"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Accepted"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Declined"]]; + $h.EmailAddressDetails._recipientTypeMap$p = [window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["Other"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["DistributionList"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["User"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["ExternalUser"]]; + $h.Entities._allEntityKeys$p = ["Addresses","EmailAddresses","Urls","PhoneNumbers","TaskSuggestions","MeetingSuggestions","Contacts","FlightReservations","ParcelDeliveries"]; + $h.ReplyConstants.htmlBodyKeyName = "htmlBody"; + $h.AsyncConstants.optionsKeyName = "options"; + $h.AsyncConstants.callbackKeyName = "callback"; + $h.AsyncConstants.asyncResultKeyName = "asyncResult"; + $h.Item.destFolderParameterName = "destinationFolder"; + $h.MeetingSuggestionTimeDecoder._baseDate$p = new Date("0001-01-01T00:00:00Z"); + $h.NotificationMessages.maximumKeyLength = 32; + $h.NotificationMessages.maximumIconLength = 32; + $h.NotificationMessages.maximumMessageLength = 150; + $h.NotificationMessages.maximumActionTextLength = 30; + $h.NotificationMessages.notificationsKeyParameterName = "key"; + $h.NotificationMessages.notificationsTypeParameterName = "type"; + $h.NotificationMessages.notificationsIconParameterName = "icon"; + $h.NotificationMessages.notificationsMessageParameterName = "message"; + $h.NotificationMessages.notificationsPersistentParameterName = "persistent"; + $h.NotificationMessages.notificationsActionsDefinitionParameterName = "actions"; + $h.NotificationMessages.notificationsActionTypeParameterName = "actionType"; + $h.NotificationMessages.notificationsActionTextParameterName = "actionText"; + $h.NotificationMessages.notificationsActionCommandIdParameterName = "commandId"; + $h.NotificationMessages.notificationsActionContextDataParameterName = "contextData"; + $h.NotificationMessages.notificationsActionShowTaskPaneActionId = "showTaskPane"; + $h.OutlookErrorManager.errorNameKey = "name"; + $h.OutlookErrorManager.errorMessageKey = "message"; + $h.OutlookErrorManager._isInitialized$p = false; + $h.OutlookErrorManager.OutlookErrorCodes.attachmentSizeExceeded = 9e3; + $h.OutlookErrorManager.OutlookErrorCodes.numberOfAttachmentsExceeded = 9001; + $h.OutlookErrorManager.OutlookErrorCodes.internalFormatError = 9002; + $h.OutlookErrorManager.OutlookErrorCodes.invalidAttachmentId = 9003; + $h.OutlookErrorManager.OutlookErrorCodes.invalidAttachmentPath = 9004; + $h.OutlookErrorManager.OutlookErrorCodes.cannotAddAttachmentBeforeUpgrade = 9005; + $h.OutlookErrorManager.OutlookErrorCodes.attachmentDeletedBeforeUploadCompletes = 9006; + $h.OutlookErrorManager.OutlookErrorCodes.attachmentUploadGeneralFailure = 9007; + $h.OutlookErrorManager.OutlookErrorCodes.attachmentToDeleteDoesNotExist = 9008; + $h.OutlookErrorManager.OutlookErrorCodes.attachmentDeleteGeneralFailure = 9009; + $h.OutlookErrorManager.OutlookErrorCodes.invalidEndTime = 9010; + $h.OutlookErrorManager.OutlookErrorCodes.htmlSanitizationFailure = 9011; + $h.OutlookErrorManager.OutlookErrorCodes.numberOfRecipientsExceeded = 9012; + $h.OutlookErrorManager.OutlookErrorCodes.noValidRecipientsProvided = 9013; + $h.OutlookErrorManager.OutlookErrorCodes.cursorPositionChanged = 9014; + $h.OutlookErrorManager.OutlookErrorCodes.invalidSelection = 9016; + $h.OutlookErrorManager.OutlookErrorCodes.accessRestricted = 9017; + $h.OutlookErrorManager.OutlookErrorCodes.genericTokenError = 9018; + $h.OutlookErrorManager.OutlookErrorCodes.genericSettingsError = 9019; + $h.OutlookErrorManager.OutlookErrorCodes.genericResponseError = 9020; + $h.OutlookErrorManager.OutlookErrorCodes.saveError = 9021; + $h.OutlookErrorManager.OutlookErrorCodes.messageInDifferentStoreError = 9022; + $h.OutlookErrorManager.OutlookErrorCodes.duplicateNotificationKey = 9023; + $h.OutlookErrorManager.OutlookErrorCodes.notificationKeyNotFound = 9024; + $h.OutlookErrorManager.OutlookErrorCodes.numberOfNotificationsExceeded = 9025; + $h.OutlookErrorManager.OutlookErrorCodes.persistedNotificationArrayReadError = 9026; + $h.OutlookErrorManager.OutlookErrorCodes.persistedNotificationArraySaveError = 9027; + $h.OutlookErrorManager.OutlookErrorCodes.cannotPersistPropertyInUnsavedDraftError = 9028; + $h.OutlookErrorManager.OutlookErrorCodes.callSaveAsyncBeforeToken = 9029; + $h.OutlookErrorManager.OutlookErrorCodes.apiCallFailedDueToItemChange = 9030; + $h.OutlookErrorManager.OutlookErrorCodes.invalidParameterValueError = 9031; + $h.OutlookErrorManager.OutlookErrorCodes.ooeInvalidDataFormat = 2006; + $h.OutlookErrorManager.OsfDdaErrorCodes.ooeCoercionTypeNotSupported = 1e3; + $h.CommonParameters.asyncContextKeyName = "asyncContext"; + $h.InitialData.userProfileTypeKey = "userProfileType"; + $h.ScriptHelpers.emptyString = ""; + OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM); + if(appContext.get_appName() == OSF.AppName.OutlookWebApp || appContext.get_appName() == OSF.AppName.OutlookIOS || appContext.get_appName() == OSF.AppName.OutlookAndroid) + this._settings = this._initializeSettings(appContext,false); + else + this._settings = this._initializeSettings(false); + appContext.appOM = new OSF.DDA.OutlookAppOm(appContext,this._webAppState.wnd,appReady); + if(appContext.get_appName() == OSF.AppName.Outlook || appContext.get_appName() == OSF.AppName.OutlookWebApp || appContext.get_appName() == OSF.AppName.OutlookIOS) + OSF.DDA.DispIdHost.addEventSupport(appContext.appOM,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.ItemChanged])) } - - diff --git a/node_modules/@microsoft/office-js/dist/outlook-web-16.01.js b/node_modules/@microsoft/office-js/dist/outlook-web-16.01.js index 1489b2e..c1904b3 100644 --- a/node_modules/@microsoft/office-js/dist/outlook-web-16.01.js +++ b/node_modules/@microsoft/office-js/dist/outlook-web-16.01.js @@ -1,18 +1,13 @@ -/* Outlook web application specific API library */ -/* Version: 16.0.7920.3000 */ +/* Outlook OWA specific API library */ +/* Version: 16.0.8902.1000 */ /* - Copyright (c) Microsoft Corporation. All rights reserved. + Copyright (c) Microsoft Corporation. All rights reserved. */ /* - Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419. + Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419. */ -/*! -Copyright (c) Microsoft Corporation. All rights reserved. -*/ -/*! -Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419. -*/ -var __extends=this&&this.__extends||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);function r(){this.constructor=n}n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},OfficeExt;(function(n){var t=function(){var n=!0;function t(){}t.prototype.isMsAjaxLoaded=function(){var t="function",i="undefined";return typeof Sys!==i&&typeof Type!==i&&Sys.StringBuilder&&typeof Sys.StringBuilder===t&&Type.registerNamespace&&typeof Type.registerNamespace===t&&Type.registerClass&&typeof Type.registerClass===t&&typeof Function._validateParams===t&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===t?n:!1};t.prototype.loadMsAjaxFull=function(n){var t=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,n)};Object.defineProperty(t.prototype,"msAjaxError",{get:function(){var n=this;n._msAjaxError==null&&n.isMsAjaxLoaded()&&(n._msAjaxError=Error);return n._msAjaxError},set:function(n){this._msAjaxError=n},enumerable:n,configurable:n});Object.defineProperty(t.prototype,"msAjaxString",{get:function(){var n=this;n._msAjaxString==null&&n.isMsAjaxLoaded()&&(n._msAjaxString=String);return n._msAjaxString},set:function(n){this._msAjaxString=n},enumerable:n,configurable:n});Object.defineProperty(t.prototype,"msAjaxDebug",{get:function(){var n=this;n._msAjaxDebug==null&&n.isMsAjaxLoaded()&&(n._msAjaxDebug=Sys.Debug);return n._msAjaxDebug},set:function(n){this._msAjaxDebug=n},enumerable:n,configurable:n});return t}();n.MicrosoftAjaxFactory=t})(OfficeExt||(OfficeExt={}));var OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory,OSF=OSF||{},OfficeExt;(function(n){var t=function(){function n(n){this._internalStorage=n}n.prototype.getItem=function(n){try{return this._internalStorage&&this._internalStorage.getItem(n)}catch(t){return null}};n.prototype.setItem=function(n,t){try{this._internalStorage&&this._internalStorage.setItem(n,t)}catch(i){}};n.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(n){}};n.prototype.removeItem=function(n){try{this._internalStorage&&this._internalStorage.removeItem(n)}catch(t){}};n.prototype.getKeysWithPrefix=function(n){var i=[];try{for(var u=this._internalStorage&&this._internalStorage.length||0,t=0;t0?i.push(t):t.tabIndex===0&&u.push(t):u.push(t)}i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;r===0&&(r=i.indexOf(n)-i.indexOf(t));return r});return[].concat(i,u)}return{set_entropy:function(n){if(typeof n=="string")for(var i=0;i1?c[c.length-1]:n;if(u&&o!=n){o.indexOf(it)>=0&&(o=o.split(it)[0]);o=decodeURIComponent(o)}var l=p();if(!f&&l){var s=window.name.indexOf(i);if(s>r){var h=window.name.indexOf(";",s);h==r&&(h=window.name.length);var a=window.name.substring(s,h);o?l.setItem(a,o):o=l.getItem(a)}}return o},getConversationId:function(){var i=window.location.search,t=n;if(i){var r=i.indexOf("&");t=r>0?i.substring(1,r):i.substr(1);if(t&&t.charAt(t.length-1)==="="){t=t.substring(0,t.length-1);t&&(t=decodeURIComponent(t))}}return t},getInfoItems:function(n){var t=n.split("$");typeof t[1]==h&&(t=n.split("|"));typeof t[1]==h&&(t=n.split("%7C"));return t},getXdmFieldValue:function(n,t){var r="",u=OSF.OUtil.parseXdmInfo(t);if(u){var i=OSF.OUtil.getInfoItems(u);if(i!=undefined&&i.length>=3)switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]);if(u)throw u;for(var f in r){u=Function._validateParameter(n[f],r[f],f);if(u)throw u;}},writeProfilerMark:function(n){if(window.msWriteProfilerMark){window.msWriteProfilerMark(n);OsfMsAjaxFactory.msAjaxDebug.trace(n)}},outputDebug:function(n){typeof OsfMsAjaxFactory!==h&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){r=r||{};for(var e in u){var f=u[e];r[f]==undefined&&(r[f]=i)}Object.defineProperty(n,t,r);return n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[o])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[o])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[tt,o,nt])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[tt,o,nt])},finalizeProperties:function(n,r){r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8;f=e&255;i[t++]=r>>2;i[t++]=(r&3)<<4|u>>4;i[t++]=(u&15)<<2|f>>6;i[t++]=f&63;if(!isNaN(e)){r=e>>8;u=s&255;f=s>>8;i[t++]=r>>2;i[t++]=(r&3)<<4|u>>4;i[t++]=(u&15)<<2|f>>6;i[t++]=f&63}if(isNaN(e))i[t-1]=64;else if(isNaN(s)){i[t-2]=64;i[t-1]=64}for(var h=0;h0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(var u=[],r=0;rn)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};u=k(u);s=e?u.length-1:0;if(u.length===0)return n;while(!h&&s>=0&&sn)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};u=k(u);v=y(u,e);s=l(u.length,v,o);if(s<0)return n;while(!c&&s>=0&&s0;t++){(t==8||t==12||t==16||t==20)&&(i+="-");i+=n[r%16];r=Math.floor(r/16)}for(;t<32;t++){(t==8||t==12||t==16||t==20)&&(i+="-");i+=n[Math.floor(Math.random()*16)]}return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidActivationStatusChangedEvent:32,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];if(i){i.name||(i.name=n[this.errorCodes.ooeInternalError].name);i.message||(i.message=n[this.errorCodes.ooeInternalError].message)}else i=n[this.errorCodes.ooeInternalError];return i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString}}}}();var OfficeExt;(function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}();n.RequirementVersion=ut;var r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){if(n==undefined)return!1;t==undefined&&(t=0);var f=this._setMap,u=f._sets;if(u.hasOwnProperty(n.toLowerCase())){var e=u[n.toLowerCase()];try{var i=this._getVersion(e);t=t+"";var r=this._getVersion(t);if(i.major>0&&i.major>r.major||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),r=0,i=0;if(t.length<2&&isNaN(Number(n)))throw u;else{r=Number(t[0]);t.length>=2&&(i=Number(t[1]));if(isNaN(r)||isNaN(i))throw u;}return{minor:i,major:r}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;var i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;var k=function(n){__extends(i,n);function i(){n.call(this,{dialogapi:t})}return i}(i);n.DefaultDialogSetRequirement=k;var o=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return i}(i);n.ExcelClientDefaultSetRequirement=o;var d=function(n){__extends(i,n);function i(){n.call(this);this._addSetMap({imagecoercion:t})}return i}(o);n.ExcelClientV1DefaultSetRequirement=d;var w=function(n){__extends(t,n);function t(){n.call(this,{mailbox:1.3})}return t}(i);n.OutlookClientDefaultSetRequirement=w;var f=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return i}(i);n.WordClientDefaultSetRequirement=f;var b=function(n){__extends(i,n);function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return i}(f);n.WordClientV1DefaultSetRequirement=b;var e=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return i}(i);n.PowerpointClientDefaultSetRequirement=e;var tt=function(n){__extends(i,n);function i(){n.call(this);this._addSetMap({imagecoercion:t})}return i}(e);n.PowerpointClientV1DefaultSetRequirement=tt;var it=function(n){__extends(i,n);function i(){n.call(this,{selection:t,textcoercion:t})}return i}(i);n.ProjectClientDefaultSetRequirement=it;var g=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return i}(i);n.ExcelWebDefaultSetRequirement=g;var nt=function(n){__extends(i,n);function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return i}(i);n.WordWebDefaultSetRequirement=nt;var h=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,settings:t})}return i}(i);n.PowerpointWebDefaultSetRequirement=h;var s=function(n){__extends(t,n);function t(){n.call(this,{mailbox:1.3})}return t}(i);n.OutlookWebDefaultSetRequirement=s;var l=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return i}(i);n.SwayWebDefaultSetRequirement=l;var c=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return i}(i);n.AccessWebDefaultSetRequirement=c;var y=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return i}(i);n.ExcelIOSDefaultSetRequirement=y;var u=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return i}(i);n.WordIOSDefaultSetRequirement=u;var p=function(n){__extends(t,n);function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return t}(u);n.WordIOSV1DefaultSetRequirement=p;var a=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return i}(i);n.PowerpointIOSDefaultSetRequirement=a;var v=function(n){__extends(i,n);function i(){n.call(this,{mailbox:t})}return i}(i);n.OutlookIOSDefaultSetRequirement=v;var rt=function(){var t="undefined";function n(){}n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)};n.getDefaultRequirementMatrix=function(u){this.initializeDefaultSetMatrix();var f=undefined,o=u.get_requirementMatrix();if(o!=undefined&&o.length>0&&typeof JSON!==t){var s=JSON.parse(u.get_requirementMatrix().toLowerCase());f=new r(new i(s))}else{var e=n.getClientFullVersionString(u);f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[e]!=undefined?new r(n.DefaultSetArrayMatrix[e]):new r(new i({}))}return f};n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix();if(f!=undefined&&f.length>0&&typeof JSON!==t){var e=JSON.parse(n.get_requirementMatrix().toLowerCase());u=new r(new i(e))}else u=new r(new k);return u};n.getClientFullVersionString=function(n){var r=n.get_appMinorVersion(),u="",i="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;if(f&&n.get_appVersion()==1)i=t==4096&&r>=15?"16.00.01":"16.00";else if(n.get_appName()==64)i=n.get_appVersion();else{u=r<10?"0"+r:""+r;i=n.get_appVersion()+"."+u}return n.get_appName()+"-"+i};n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new o;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new d;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new b;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new tt;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new w;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new g;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new nt;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new s;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new s;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new it;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new c;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new h;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new y;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new l;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new u;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new p;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new a;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new v};n.Excel_RCLIENT_1600="1-16.00";n.Excel_RCLIENT_1601="1-16.01";n.Word_RCLIENT_1600="2-16.00";n.Word_RCLIENT_1601="2-16.01";n.PowerPoint_RCLIENT_1600="4-16.00";n.PowerPoint_RCLIENT_1601="4-16.01";n.Outlook_RCLIENT_1600="8-16.00";n.Excel_WAC_1600="16-16.00";n.Word_WAC_1600="32-16.00";n.Outlook_WAC_1600="64-16.00";n.Outlook_WAC_1601="64-16.01";n.Project_RCLIENT_1600="128-16.00";n.Access_WAC_1600="256-16.00";n.PowerPoint_WAC_1600="512-16.00";n.Excel_IOS_1600="1024-16.00";n.SWAY_WAC_1600="2048-16.00";n.Word_IOS_1600="4096-16.00";n.Word_IOS_16001="4096-16.00.01";n.PowerPoint_IOS_1600="8192-16.00";n.Outlook_IOS_1600="65536-16.00";n.DefaultSetArrayMatrix={};return n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))})(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda();var OfficeExt;(function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n};n.getInstance=function(){n.hostObj===undefined&&(n.hostObj=new n);return n.hostObj};n.prototype.getPlatform=function(){var n=this;if(n.hostInfo.hostPlatform){var t=n.hostInfo.hostPlatform.toLowerCase();if(n.platformRemappings[t])return n.platformRemappings[t]}return null};n.prototype.getHost=function(){var n=this;if(n.hostInfo.hostType){var t=n.hostInfo.hostType.toLowerCase();if(n.camelCaseMappings[t])return n.camelCaseMappings[t];t=n.capitalizeFirstLetter(n.hostInfo.hostType);if(Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null};n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null};return n}();n.Host=t})(t=n.HostName||(n.HostName={}))})(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){if(!n){window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window);window.Office=Microsoft.Office.WebExtension;n=!0}},disableShortcut:function(){if(n){t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window);n=!1}}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i;if(n&&typeof n=="string"){var r=n.indexOf("#");if(r!=-1){var o=n.substring(0,r),e=n.substring(r+1);switch(o){case"binding":case"bindings":e&&(i=new OSF.DDA.BindingPromise(e))}}}if(i){i.onFail=t;return i}else if(t){var u=typeof t;if(u=="function"){var f={};f[Microsoft.Office.WebExtension.Parameters.Callback]=t;OSF.DDA.issueAsyncResult(f,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,u);}};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});if(n.get_isDialog()){var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n);OSF.OUtil.defineEnumerableProperty(f,o,{value:e})}else{t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t});if(r){var s=r.displayName||"appOM";delete r.displayName;OSF.OUtil.defineEnumerableProperty(f,s,{value:r})}u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}});var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n);OSF.OUtil.defineEnumerableProperty(f,o,{value:e})}};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});var u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext());return n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,o=n.length,e=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){for(var u in n){var i=n[u],r=t[u];if(i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw e();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw e();}};f.extractRequiredArguments=function(t,i,r){if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var f,e,l=n.length-1;l>=s;l--){var c=n[l];switch(typeof c){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=c;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=c;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}f=o.fillOptions(f,i,r,u);if(e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;o.verifyArguments(t,f);return f}this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),f=c(n,r,t,i);return o.constructCallArgs(r,f,t,i)};this.processResponse=function(n,t,i,f){var e;e=n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n);return e};this.getCallArgs=function(n){for(var t,u,r=n.length-1;r>=s;r--){var i=n[r];switch(typeof i){case"object":t=i;break;case h:u=i}}t=t||{};u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u);return t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var i=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],t=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],i,t,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback];if(f){var u={};u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext];var r;if(t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)u[OSF.DDA.AsyncResultEnum.Properties.Value]=i;else{r={};i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i;r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i}f(new OSF.DDA.AsyncResult(u,r))}};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){for(var t in n){var i={};OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}});OSF.DDA.SyncMethodNames[t]=i}};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);function o(n,i,r,u){if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var o,c,s=n.length-1;s>=e;s--){var h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}o=f.fillOptions(o,i,r,u);f.verifyArguments(t,o);return o}this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),e=o(n,r,t,i);return f.constructCallArgs(r,e,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){var l="fromHost",i=this,o="toHost",f=l,a="sourceData",u="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];function e(i,u){var a=i?{}:undefined;for(var h in i){var s=i[h],o;if(OSF.DDA.ListType.isListType(h)){o=[];for(var v in s)o.push(e(s[v],u))}else if(OSF.OUtil.listContainsKey(r,h))o=r[h][u](s);else if(u==f&&n.preserveNesting(h))o=e(s,u);else{var c=t[h];if(c){var l=c[u];if(l){o=l[s];o===undefined&&(o=s)}}else o=s}a[h]=o}return a}function c(i,r){var s;for(var f in r){var e;e=n.isComplexType(f)?c(i,t[f][o]):i[f];if(e!=undefined){s||(s={});var h=r[f];h==u&&(h=f);s[h]=n.pack(f,e)}}return s}function s(i,r,e){e||(e={});for(var h in r){var l=r[h],o;if(l==u)o=i;else if(l==a){e[h]=i.toArray();continue}else o=i[l];if(o===null||o===undefined)e[h]=undefined;else{o=n.unpack(h,o);var c;if(n.isComplexType(h)){c=t[h][f];n.preserveNesting(h)?e[h]=s(o,c):s(o,c,e)}else if(OSF.DDA.ListType.isListType(h)){c={};var p=OSF.DDA.ListType.getDescriptor(h);c[p]=u;var v=new Array(o.length);for(var y in o)v[y]=s(o[y],c);e[h]=v}else e[h]=o}}return e}function h(n,i,r){var f=t[n][r],u;if(r=="toHost"){var h=e(i,r);u=c(h,f)}else if(r==l){var o=s(i,f);u=e(o,r)}return u}t||(t={});i.addMapping=function(n,i){var e,s;if(i.map){e=i.map;s={};for(var c in e){var l=e[c];l==u&&(l=c);s[l]=c}}else{e=i.toHost;s=i.fromHost}var r=t[n];if(r){var h=r[o];for(var v in h)e[v]=h[v];h=r[f];for(var a in h)s[a]=h[a]}else r=t[n]={};r[o]=e;r[f]=s};i.toHost=function(n,t){return h(n,t,o)};i.fromHost=function(n,t){return h(n,t,f)};i.self=u;i.sourceData=a;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset);OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]));return OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){var r;r=this.isDynamicType(n)?t[n].toHost(i):i;return r};i.unpack=function(n,i){var r;r=this.isDynamicType(n)?t[n].fromHost(i):i;return r}};OSF.DDA.getDecoratedParameterMap=function(n,t){var i=new OSF.DDA.HostParameterMap(n),f=i.self;function r(n){var i=null;if(n){i={};for(var r=n.length,t=0;t1?i=r+c+t:f.length>0&&(i=r+o+h+t);return e?[i,u,e].join(""):i}n.addHostInfoAsQueryParam=i;function r(n){if(!n)return null;var t=document.createElement("a");t.href=n;return t.protocol+"//"+t.host}n.getDomainForUrl=r})(t=n.WACUtils||(n.WACUtils={}))})(OfficeExt||(OfficeExt={}));OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Common",Microsoft.Office);OSF.SerializerVersion={MsAjax:0,Browser:1};var OfficeExt;(function(n){function t(){return!0}n.appSpecificCheckOrigin=t})(OfficeExt||(OfficeExt={}));Microsoft.Office.Common.InvokeType={async:0,sync:1,asyncRegisterEvent:2,asyncUnregisterEvent:3,syncRegisterEvent:4,syncUnregisterEvent:5};Microsoft.Office.Common.InvokeResultCode={noError:0,errorInRequest:-1,errorHandlingRequest:-2,errorInResponse:-3,errorHandlingResponse:-4,errorHandlingRequestAccessDenied:-5,errorHandlingMethodCallTimedout:-6};Microsoft.Office.Common.MessageType={request:0,response:1};Microsoft.Office.Common.ActionType={invoke:0,registerEvent:1,unregisterEvent:2};Microsoft.Office.Common.ResponseType={forCalling:0,forEventing:1};Microsoft.Office.Common.MethodObject=function(n,t,i){this._method=n;this._invokeType=t;this._blockingOthers=i};Microsoft.Office.Common.MethodObject.prototype={getMethod:function(){return this._method},getInvokeType:function(){return this._invokeType},getBlockingFlag:function(){return this._blockingOthers}};Microsoft.Office.Common.EventMethodObject=function(n,t){this._registerMethodObject=n;this._unregisterMethodObject=t};Microsoft.Office.Common.EventMethodObject.prototype={getRegisterMethodObject:function(){return this._registerMethodObject},getUnregisterMethodObject:function(){return this._unregisterMethodObject}};Microsoft.Office.Common.ServiceEndPoint=function(n){var t=this,i=Function._validateParams(arguments,[{name:"serviceEndPointId",type:String,mayBeNull:!1}]);if(i)throw i;t._methodObjectList={};t._eventHandlerProxyList={};t._Id=n;t._conversations={};t._policyManager=null;t._appDomains={};t._onHandleRequestError=null};Microsoft.Office.Common.ServiceEndPoint.prototype={registerMethod:function(n,t,i,r){var e="invokeType",u=!1,f=Function._validateParams(arguments,[{name:"methodName",type:String,mayBeNull:u},{name:"method",type:Function,mayBeNull:u},{name:e,type:Number,mayBeNull:u},{name:"blockingOthers",type:Boolean,mayBeNull:u}]);if(f)throw f;if(i!==Microsoft.Office.Common.InvokeType.async&&i!==Microsoft.Office.Common.InvokeType.sync)throw OsfMsAjaxFactory.msAjaxError.argument(e);var o=new Microsoft.Office.Common.MethodObject(t,i,r);this._methodObjectList[n]=o},unregisterMethod:function(n){var t=Function._validateParams(arguments,[{name:"methodName",type:String,mayBeNull:!1}]);if(t)throw t;delete this._methodObjectList[n]},registerEvent:function(n,t,i){var r=!1,u=Function._validateParams(arguments,[{name:"eventName",type:String,mayBeNull:r},{name:"registerMethod",type:Function,mayBeNull:r},{name:"unregisterMethod",type:Function,mayBeNull:r}]);if(u)throw u;var f=new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(t,Microsoft.Office.Common.InvokeType.syncRegisterEvent,r),new Microsoft.Office.Common.MethodObject(i,Microsoft.Office.Common.InvokeType.syncUnregisterEvent,r));this._methodObjectList[n]=f},registerEventEx:function(n,t,i,r,u){var f=!1,e=Function._validateParams(arguments,[{name:"eventName",type:String,mayBeNull:f},{name:"registerMethod",type:Function,mayBeNull:f},{name:"registerMethodInvokeType",type:Number,mayBeNull:f},{name:"unregisterMethod",type:Function,mayBeNull:f},{name:"unregisterMethodInvokeType",type:Number,mayBeNull:f}]);if(e)throw e;var o=new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(t,i,f),new Microsoft.Office.Common.MethodObject(r,u,f));this._methodObjectList[n]=o},unregisterEvent:function(n){var t=Function._validateParams(arguments,[{name:"eventName",type:String,mayBeNull:!1}]);if(t)throw t;this.unregisterMethod(n)},registerConversation:function(n,t,i,r){var e="appDomains",u=!0,f=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:!1},{name:"conversationUrl",type:String,mayBeNull:!1,optional:u},{name:e,type:Object,mayBeNull:u,optional:u},{name:"serializerVersion",type:Number,mayBeNull:u,optional:u}]);if(f)throw f;if(i){if(!(i instanceof Array))throw OsfMsAjaxFactory.msAjaxError.argument(e);this._appDomains[n]=i}this._conversations[n]={url:t,serializerVersion:r}},unregisterConversation:function(n){var t=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:!1}]);if(t)throw t;delete this._conversations[n]},setPolicyManager:function(n){var i="policyManager",t=Function._validateParams(arguments,[{name:i,type:Object,mayBeNull:!1}]);if(t)throw t;if(!n.checkPermission)throw OsfMsAjaxFactory.msAjaxError.argument(i);this._policyManager=n},getPolicyManager:function(){return this._policyManager},dispose:function(){var t=null,n=this;n._methodObjectList=t;n._eventHandlerProxyList=t;n._Id=t;n._conversations=t;n._policyManager=t;n._appDomains=t;n._onHandleRequestError=t}};Microsoft.Office.Common.ClientEndPoint=function(n,t,i,r){var f="targetWindow",u=this,e=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:!1},{name:f,mayBeNull:!1},{name:"targetUrl",type:String,mayBeNull:!1},{name:"serializerVersion",type:Number,mayBeNull:!0,optional:!0}]);if(e)throw e;try{if(!t.postMessage)throw OsfMsAjaxFactory.msAjaxError.argument(f);}catch(o){if(!Object.prototype.hasOwnProperty.call(t,"postMessage"))throw OsfMsAjaxFactory.msAjaxError.argument(f);}u._conversationId=n;u._targetWindow=t;u._targetUrl=i;u._callingIndex=0;u._callbackList={};u._eventHandlerList={};u._serializerVersion=r!=null?r:OSF.SerializerVersion.Browser};Microsoft.Office.Common.ClientEndPoint.prototype={invoke:function(n,t,i){var r=this,e=Function._validateParams(arguments,[{name:"targetMethodName",type:String,mayBeNull:!1},{name:"callback",type:Function,mayBeNull:!0},{name:"param",mayBeNull:!0}]);if(e)throw e;var u=r._callingIndex++,h=new Date,f={callback:t,createdOn:h.getTime()};if(i&&typeof i=="object"&&typeof i.__timeout__=="number"){f.timeout=i.__timeout__;delete i.__timeout__}r._callbackList[u]=f;try{var s=new Microsoft.Office.Common.Request(n,Microsoft.Office.Common.ActionType.invoke,r._conversationId,u,i),o=Microsoft.Office.Common.MessagePackager.envelope(s,r._serializerVersion);r._targetWindow.postMessage(o,r._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer()}catch(c){try{t!==null&&t(Microsoft.Office.Common.InvokeResultCode.errorInRequest,c)}finally{delete r._callbackList[u]}}},registerForEvent:function(n,t,i,r){var u=this,e=Function._validateParams(arguments,[{name:"targetEventName",type:String,mayBeNull:!1},{name:"eventHandler",type:Function,mayBeNull:!1},{name:"callback",type:Function,mayBeNull:!0},{name:"data",mayBeNull:!0,optional:!0}]);if(e)throw e;var f=u._callingIndex++,h=new Date;u._callbackList[f]={callback:i,createdOn:h.getTime()};try{var s=new Microsoft.Office.Common.Request(n,Microsoft.Office.Common.ActionType.registerEvent,u._conversationId,f,r),o=Microsoft.Office.Common.MessagePackager.envelope(s,u._serializerVersion);u._targetWindow.postMessage(o,u._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer();u._eventHandlerList[n]=t}catch(c){try{i!==null&&i(Microsoft.Office.Common.InvokeResultCode.errorInRequest,c)}finally{delete u._callbackList[f]}}},unregisterForEvent:function(n,t,i){var r=this,f=Function._validateParams(arguments,[{name:"targetEventName",type:String,mayBeNull:!1},{name:"callback",type:Function,mayBeNull:!0},{name:"data",mayBeNull:!0,optional:!0}]);if(f)throw f;var u=r._callingIndex++,s=new Date;r._callbackList[u]={callback:t,createdOn:s.getTime()};try{var o=new Microsoft.Office.Common.Request(n,Microsoft.Office.Common.ActionType.unregisterEvent,r._conversationId,u,i),e=Microsoft.Office.Common.MessagePackager.envelope(o,r._serializerVersion);r._targetWindow.postMessage(e,r._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer()}catch(h){try{t!==null&&t(Microsoft.Office.Common.InvokeResultCode.errorInRequest,h)}finally{delete r._callbackList[u]}}finally{delete r._eventHandlerList[n]}}};Microsoft.Office.Common.XdmCommunicationManager=function(){var tt="serviceEndPointId",e=!0,d="channel is not ready.",h="conversationId",g="Unknown conversation Id.",t=!1,n=null,c=[],s=n,u=n,b=10,o=t,f=n,it=2e3,k=65e3,nt=k,r={},i={},a=t;function rt(n){for(var t in r)if(r[t]._conversations[n])return r[t];OsfMsAjaxFactory.msAjaxDebug.trace(g);throw OsfMsAjaxFactory.msAjaxError.argument(h);}function ht(n){var t=i[n];t||OsfMsAjaxFactory.msAjaxDebug.trace(g);return t}function ut(t,i){var u=t._methodObjectList[i._actionName];if(!u){OsfMsAjaxFactory.msAjaxDebug.trace("The specified method is not registered on service endpoint:"+i._actionName);throw OsfMsAjaxFactory.msAjaxError.argument("messageObject");}var r=n;r=i._actionType===Microsoft.Office.Common.ActionType.invoke?u:i._actionType===Microsoft.Office.Common.ActionType.registerEvent?u.getRegisterMethodObject():u.getUnregisterMethodObject();return r}function st(n){c.push(n)}function ot(){if(u!==n){if(!o)if(c.length>0){var t=c.shift();l(t)}else{clearInterval(u);u=n}}else OsfMsAjaxFactory.msAjaxDebug.trace(d)}function l(n){o=n.getInvokeBlockingFlag();n.invoke();s=+new Date}function lt(){if(f){var r,o=0,s=new Date,u;for(var h in i){r=i[h];for(var e in r._callbackList){var t=r._callbackList[e];u=t.timeout?t.timeout:nt;if(u>=0&&Math.abs(s.getTime()-t.createdOn)>=u)try{t.callback&&t.callback(Microsoft.Office.Common.InvokeResultCode.errorHandlingMethodCallTimedout,n)}finally{delete r._callbackList[e]}else o++}}if(o===0){clearInterval(f);f=n}}else OsfMsAjaxFactory.msAjaxDebug.trace(d)}function ct(){o=t}function et(n){if(window.addEventListener)window.addEventListener("message",n,t);else if(navigator.userAgent.indexOf("MSIE")>-1&&window.attachEvent)window.attachEvent("onmessage",n);else{OsfMsAjaxFactory.msAjaxDebug.trace("Browser doesn't support the required API.");throw OsfMsAjaxFactory.msAjaxError.argument("Browser");}}function w(n,i){var f=t;if(n===e)return e;if(!n||!i||!n.length||!i.length)return f;var r,u;r=document.createElement("a");u=document.createElement("a");r.href=n;u.href=i;f=v(r,u);delete r,u;return f}function p(n,i){var u=t;if(!i||!i.length||!n||!(n instanceof Array)||!n.length)return u;var f=document.createElement("a"),e=document.createElement("a");f.href=i;for(var r=0;rb)&&!o){l(nt);k=t}else u=setInterval(ot,b);k&&st(nt)}catch(pt){f&&f._onHandleRequestError&&f._onHandleRequestError(r,pt);var g=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequest;pt==ft&&(g=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied);var vt=new Microsoft.Office.Common.Response(r._actionName,r._conversationId,r._correlationId,g,Microsoft.Office.Common.ResponseType.forCalling,pt),et=Microsoft.Office.Common.MessagePackager.envelope(vt,h),d=t;try{d=!!(i.source&&i.source.postMessage)}catch(pt){}d&&i.source.postMessage(et,tt)}}else if(r._messageType===Microsoft.Office.Common.MessageType.response){var c=ht(r._conversationId);if(!c)return;c._serializerVersion=h;if(!w(c._targetUrl,i.origin))throw"Failed orgin check";if(r._responseType===Microsoft.Office.Common.ResponseType.forCalling){var a=c._callbackList[r._correlationId];if(a)try{a.callback&&a.callback(r._errorCode,r._data)}finally{delete c._callbackList[r._correlationId]}}else{var y=c._eventHandlerList[r._actionName];y!==undefined&&y!==n&&y(r._data)}}else return}}function y(){if(!a){et(ft);a=e}}return{connect:function(n,t,r,u){var f=i[n];if(!f){y();f=new Microsoft.Office.Common.ClientEndPoint(n,t,r,u);i[n]=f}return f},getClientEndPoint:function(n){var r=Function._validateParams(arguments,[{name:h,type:String,mayBeNull:t}]);if(r)throw r;return i[n]},createServiceEndPoint:function(n){y();var t=new Microsoft.Office.Common.ServiceEndPoint(n);r[n]=t;return t},getServiceEndPoint:function(n){var i=Function._validateParams(arguments,[{name:tt,type:String,mayBeNull:t}]);if(i)throw i;return r[n]},deleteClientEndPoint:function(n){var r=Function._validateParams(arguments,[{name:h,type:String,mayBeNull:t}]);if(r)throw r;delete i[n]},deleteServiceEndPoint:function(n){var i=Function._validateParams(arguments,[{name:tt,type:String,mayBeNull:t}]);if(i)throw i;delete r[n]},checkUrlWithAppDomains:function(n,t){return p(n,t)},_setMethodTimeout:function(n){var i=Function._validateParams(arguments,[{name:"methodTimeout",type:Number,mayBeNull:t}]);if(i)throw i;nt=n<=0?k:n},_startMethodTimeoutTimer:function(){f||(f=setInterval(lt,it))}}}();Microsoft.Office.Common.Message=function(n,t,i,r,u){var e=!1,f=this,o=Function._validateParams(arguments,[{name:"messageType",type:Number,mayBeNull:e},{name:"actionName",type:String,mayBeNull:e},{name:"conversationId",type:String,mayBeNull:e},{name:"correlationId",mayBeNull:e},{name:"data",mayBeNull:!0,optional:!0}]);if(o)throw o;f._messageType=n;f._actionName=t;f._conversationId=i;f._correlationId=r;f._origin=window.location.href;f._data=typeof u=="undefined"?null:u};Microsoft.Office.Common.Message.prototype={getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getOrigin:function(){return this._origin},getData:function(){return this._data},getMessageType:function(){return this._messageType}};Microsoft.Office.Common.Request=function(n,t,i,r,u){Microsoft.Office.Common.Request.uber.constructor.call(this,Microsoft.Office.Common.MessageType.request,n,i,r,u);this._actionType=t};OSF.OUtil.extend(Microsoft.Office.Common.Request,Microsoft.Office.Common.Message);Microsoft.Office.Common.Request.prototype.getActionType=function(){return this._actionType};Microsoft.Office.Common.Response=function(n,t,i,r,u,f){Microsoft.Office.Common.Response.uber.constructor.call(this,Microsoft.Office.Common.MessageType.response,n,t,i,f);this._errorCode=r;this._responseType=u};OSF.OUtil.extend(Microsoft.Office.Common.Response,Microsoft.Office.Common.Message);Microsoft.Office.Common.Response.prototype.getErrorCode=function(){return this._errorCode};Microsoft.Office.Common.Response.prototype.getResponseType=function(){return this._responseType};Microsoft.Office.Common.MessagePackager={envelope:function(n){typeof n=="object"&&(n._serializerVersion=OSF.SerializerVersion.Browser);return JSON.stringify(n)},unenvelope:function(n){return JSON.parse(n)}};Microsoft.Office.Common.ResponseSender=function(n,t,i,r,u,f,e){var h=!1,o=this,c=Function._validateParams(arguments,[{name:"requesterWindow",mayBeNull:h},{name:"requesterUrl",type:String,mayBeNull:h},{name:"actionName",type:String,mayBeNull:h},{name:"conversationId",type:String,mayBeNull:h},{name:"correlationId",mayBeNull:h},{name:"responsetype",type:Number,maybeNull:h},{name:"serializerVersion",type:Number,maybeNull:!0,optional:!0}]);if(c)throw c;o._requesterWindow=n;o._requesterUrl=t;o._actionName=i;o._conversationId=r;o._correlationId=u;o._invokeResultCode=Microsoft.Office.Common.InvokeResultCode.noError;o._responseType=f;var s=o;o._send=function(n){try{var i=new Microsoft.Office.Common.Response(s._actionName,s._conversationId,s._correlationId,s._invokeResultCode,s._responseType,n),t=Microsoft.Office.Common.MessagePackager.envelope(i,e);s._requesterWindow.postMessage(t,s._requesterUrl)}catch(r){OsfMsAjaxFactory.msAjaxDebug.trace("ResponseSender._send error:"+r.message)}}};Microsoft.Office.Common.ResponseSender.prototype={getRequesterWindow:function(){return this._requesterWindow},getRequesterUrl:function(){return this._requesterUrl},getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getSend:function(){return this._send},setResultCode:function(n){this._invokeResultCode=n}};Microsoft.Office.Common.InvokeCompleteCallback=function(n,t,i,r,u,f,e){var s=this;Microsoft.Office.Common.InvokeCompleteCallback.uber.constructor.call(s,n,t,i,r,u,Microsoft.Office.Common.ResponseType.forCalling,e);s._postCallbackHandler=f;var o=s;s._send=function(n,t){t!=undefined&&(o._invokeResultCode=t);try{var r=new Microsoft.Office.Common.Response(o._actionName,o._conversationId,o._correlationId,o._invokeResultCode,o._responseType,n),i=Microsoft.Office.Common.MessagePackager.envelope(r,e);o._requesterWindow.postMessage(i,o._requesterUrl);o._postCallbackHandler()}catch(u){OsfMsAjaxFactory.msAjaxDebug.trace("InvokeCompleteCallback._send error:"+u.message)}}};OSF.OUtil.extend(Microsoft.Office.Common.InvokeCompleteCallback,Microsoft.Office.Common.ResponseSender);Microsoft.Office.Common.Invoker=function(n,t,i,r,u,f,e){var h=!0,s=!1,o=this,c=Function._validateParams(arguments,[{name:"methodObject",mayBeNull:s},{name:"paramValue",mayBeNull:h},{name:"invokeCompleteCallback",mayBeNull:s},{name:"eventHandlerProxyList",mayBeNull:h},{name:"conversationId",type:String,mayBeNull:s},{name:"eventName",type:String,mayBeNull:s},{name:"serializerVersion",type:Number,mayBeNull:h,optional:h}]);if(c)throw c;o._methodObject=n;o._param=t;o._invokeCompleteCallback=i;o._eventHandlerProxyList=r;o._conversationId=u;o._eventName=f;o._serializerVersion=e};Microsoft.Office.Common.Invoker.prototype={invoke:function(){var n=this;try{var t;switch(n._methodObject.getInvokeType()){case Microsoft.Office.Common.InvokeType.async:n._methodObject.getMethod()(n._param,n._invokeCompleteCallback.getSend());break;case Microsoft.Office.Common.InvokeType.sync:t=n._methodObject.getMethod()(n._param);n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.syncRegisterEvent:var r=n._createEventHandlerProxyObject(n._invokeCompleteCallback);t=n._methodObject.getMethod()(r.getSend(),n._param);n._eventHandlerProxyList[n._conversationId+n._eventName]=r.getSend();n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.syncUnregisterEvent:var f=n._eventHandlerProxyList[n._conversationId+n._eventName];t=n._methodObject.getMethod()(f,n._param);delete n._eventHandlerProxyList[n._conversationId+n._eventName];n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.asyncRegisterEvent:var i=n._createEventHandlerProxyObject(n._invokeCompleteCallback);n._methodObject.getMethod()(i.getSend(),n._invokeCompleteCallback.getSend(),n._param);n._eventHandlerProxyList[n._callerId+n._eventName]=i.getSend();break;case Microsoft.Office.Common.InvokeType.asyncUnregisterEvent:var u=n._eventHandlerProxyList[n._callerId+n._eventName];n._methodObject.getMethod()(u,n._invokeCompleteCallback.getSend(),n._param);delete n._eventHandlerProxyList[n._callerId+n._eventName]}}catch(e){n._invokeCompleteCallback.setResultCode(Microsoft.Office.Common.InvokeResultCode.errorInResponse);n._invokeCompleteCallback.getSend()(e)}},getInvokeBlockingFlag:function(){return this._methodObject.getBlockingFlag()},_createEventHandlerProxyObject:function(n){return new Microsoft.Office.Common.ResponseSender(n.getRequesterWindow(),n.getRequesterUrl(),n.getActionName(),n.getConversationId(),n.getCorrelationId(),Microsoft.Office.Common.ResponseType.forEventing,this._serializerVersion)}};OSF.OUtil.setNamespace("WAC",OSF.DDA);OSF.DDA.WAC.UniqueArguments={Data:"Data",Properties:"Properties",BindingRequest:"DdaBindingsMethod",BindingResponse:"Bindings",SingleBindingResponse:"singleBindingResponse",GetData:"DdaGetBindingData",AddRowsColumns:"DdaAddRowsColumns",SetData:"DdaSetBindingData",ClearFormats:"DdaClearBindingFormats",SetFormats:"DdaSetBindingFormats",SettingsRequest:"DdaSettingsMethod",BindingEventSource:"ddaBinding",ArrayData:"ArrayData"};OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC);OSF.DDA.WAC.Delegate.SpecialProcessor=function(){var t=[OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,OSF.DDA.WAC.UniqueArguments.BindingRequest,OSF.DDA.WAC.UniqueArguments.BindingResponse,OSF.DDA.WAC.UniqueArguments.GetData,OSF.DDA.WAC.UniqueArguments.AddRowsColumns,OSF.DDA.WAC.UniqueArguments.SetData,OSF.DDA.WAC.UniqueArguments.ClearFormats,OSF.DDA.WAC.UniqueArguments.SetFormats,OSF.DDA.WAC.UniqueArguments.SettingsRequest,OSF.DDA.WAC.UniqueArguments.BindingEventSource],n={};OSF.DDA.WAC.Delegate.SpecialProcessor.uber.constructor.call(this,t,n)};OSF.OUtil.extend(OSF.DDA.WAC.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.WAC.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.WAC.Delegate.SpecialProcessor,[]);OSF.OUtil.setNamespace("WAC",OSF.DDA);OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC);OSF.DDA.WAC.getDelegateMethods=function(){var n={};n[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.WAC.Delegate.executeAsync;n[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.WAC.Delegate.registerEventAsync;n[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.WAC.Delegate.unregisterEventAsync;n[OSF.DDA.DispIdHost.Delegates.OpenDialog]=OSF.DDA.WAC.Delegate.openDialog;n[OSF.DDA.DispIdHost.Delegates.MessageParent]=OSF.DDA.WAC.Delegate.messageParent;n[OSF.DDA.DispIdHost.Delegates.SendMessage]=OSF.DDA.WAC.Delegate.sendMessage;n[OSF.DDA.DispIdHost.Delegates.CloseDialog]=OSF.DDA.WAC.Delegate.closeDialog;return n};OSF.DDA.WAC.Delegate.version=1;OSF.DDA.WAC.Delegate.executeAsync=function(n){n.hostCallArgs||(n.hostCallArgs={});n.hostCallArgs.DdaMethod={ControlId:OSF._OfficeAppFactory.getId(),Version:OSF.DDA.WAC.Delegate.version,DispatchId:n.dispId};n.hostCallArgs.__timeout__=-1;n.onCalling&&n.onCalling();var t=+new Date;OSF.getClientEndPoint().invoke("executeMethod",function(i,r){n.onReceiving&&n.onReceiving();var u;if(i==Microsoft.Office.Common.InvokeResultCode.noError){OSF.DDA.WAC.Delegate.version=r.Version;u=r.Error}else switch(i){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:u=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:u=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}n.onComplete&&n.onComplete(u,r);OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs(+new Date-t),u)},n.hostCallArgs)};OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent=function(n,t){var i=+new Date;return function(r,u){t.onReceiving&&t.onReceiving();var f;if(r!=Microsoft.Office.Common.InvokeResultCode.noError)switch(r){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:f=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:f=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}else f=u?u.Error?u.Error:OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess:OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;t.onComplete&&t.onComplete(f);OSF.AppTelemetry&&OSF.AppTelemetry.onRegisterDone(n,t.dispId,Math.abs(+new Date-i),f)}};OSF.DDA.WAC.Delegate.registerEventAsync=function(n){n.onCalling&&n.onCalling();OSF.getClientEndPoint().registerForEvent(OSF.DDA.getXdmEventName(n.targetId,n.eventType),function(t){n.onEvent&&n.onEvent(t);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!0,n),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:n.dispId,targetId:n.targetId})};OSF.DDA.WAC.Delegate.unregisterEventAsync=function(n){n.onCalling&&n.onCalling();OSF.getClientEndPoint().unregisterForEvent(OSF.DDA.getXdmEventName(n.targetId,n.eventType),OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!1,n),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:n.dispId,targetId:n.targetId})};OSF.OUtil.setNamespace("WebApp",OSF);OSF.WebApp.AddHostInfoAndXdmInfo=function(n){return OSF._OfficeAppFactory.getWindowLocationSearch&&OSF._OfficeAppFactory.getWindowLocationHash?n+OSF._OfficeAppFactory.getWindowLocationSearch()+OSF._OfficeAppFactory.getWindowLocationHash():n};OSF.WebApp._UpdateLinksForHostAndXdmInfo=function(){for(var t=document.querySelectorAll("a[data-officejs-navigate]"),n=0;n0?n.substr(0,r):null,i=t!==null?t.toLowerCase()==="http"||t.toLowerCase()==="https":!0;i=i&&n!="#"&&n!="/"&&n!=""&&n!=OSF._OfficeAppFactory.getWebAppState().webAppUrl;return i};OSF.InitializationHelper=function(n,t,i,r,u){var f=this;f._hostInfo=n;f._webAppState=t;f._context=i;f._settings=r;f._hostFacade=u;f._appContext={};f._tabbableElements="a[href]:not([tabindex='-1']),area[href]:not([tabindex='-1']),button:not([disabled]):not([tabindex='-1']),input:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),textarea:not([disabled]):not([tabindex='-1']),*[tabindex]:not([tabindex='-1']),*[contenteditable]:not([disabled]):not([tabindex='-1'])";f._initializeSettings=function(n,t){var u,f=n.get_settings(),r=OSF.OUtil.getSessionStorage();if(r){var i=r.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey());if(i)f=JSON.parse(i);else{i=JSON.stringify(f);r.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),i)}}var e=OSF.DDA.SettingsManager.deserializeSettings(f);u=t?new OSF.DDA.RefreshableSettings(e):new OSF.DDA.Settings(e);return u};var e=function(n){var t=window.open;n.open=function(n,i,r){var u=null;try{u=t(n,i,r)}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppCommonMessage("Exception happens at windowOpen."+e)}if(!u){var f={strUrl:n,strWindowName:i,strWindowFeatures:r};OSF._OfficeAppFactory.getClientEndPoint()&&OSF._OfficeAppFactory.getClientEndPoint().invoke("ContextActivationManager_openWindowInHost",null,f)}return u}};e(window)};OSF.InitializationHelper.prototype.saveAndSetDialogInfo=function(n){var u="IsDialog",t=!0,f=function(){var n=OSF.OUtil.parseXdmInfo(t);if(n){var i=n.split("|");return i[1]}return null},i=OSF.OUtil.getSessionStorage();if(i){n||(n=OSF.OUtil.parseHostInfoFromWindowName(t,OSF._OfficeAppFactory.getWindowName()));if(n&&n.indexOf("isDialog")>-1){var r=f();r!=null&&i.setItem(r+u,"true");this._hostInfo.isDialog=t;return}this._hostInfo.isDialog=i.getItem(OSF.OUtil.getXdmFieldValue(OSF.XdmFieldName.AppId,!1)+u)!=null?t:!1}};OSF.InitializationHelper.prototype.getAppContext=function(n,t){var i=this,f=i,r=function(n,i){var u;if(i._appName===OSF.AppName.ExcelWebApp){var h=i._settings;u={};for(var a in h){var c=h[a];u[c[0]]=c[1]}}else u=i._settings;if(n===0&&i._id!=undefined&&i._appName!=undefined&&i._appVersion!=undefined&&i._appUILocale!=undefined&&i._dataLocale!=undefined&&i._docUrl!=undefined&&i._clientMode!=undefined&&i._settings!=undefined&&i._reason!=undefined){f._appContext=i;var l=i._appInstanceId?i._appInstanceId:i._id,y=!1,v=!0,e=0;i._appMinorVersion!=undefined&&(e=i._appMinorVersion);var o=undefined;i._requirementMatrix!=undefined&&(o=i._requirementMatrix);i.eToken=i.eToken?i.eToken:"";var r=new OSF.OfficeAppContext(i._id,i._appName,i._appVersion,i._appUILocale,i._dataLocale,i._docUrl,i._clientMode,u,i._reason,i._osfControlType,i._eToken,i._correlationId,l,y,v,e,o,i._hostCustomMessage,i._hostFullVersion,i._clientWindowHeight,i._clientWindowWidth,i._addinName,i._appDomains,i._dialogRequirementMatrix);r._wacHostEnvironment=i._wacHostEnvironment||"0";r._isFromWacAutomation=!!i._isFromWacAutomation;OSF.AppTelemetry&&OSF.AppTelemetry.initialize(r);t(r)}else{var s="Function ContextActivationManager_getAppContextAsync call failed. ErrorCode is "+n+", exception: "+i;OSF.AppTelemetry&&OSF.AppTelemetry.logAppException(s);throw s;}};try{if(i._hostInfo.isDialog&&window.opener!=null){var u=OfficeExt.WACUtils.parseAppContextFromWindowName(!1,OSF._OfficeAppFactory.getWindowName());r(0,u)}else i._webAppState.clientEndPoint.invoke("ContextActivationManager_getAppContextAsync",r,i._webAppState.id)}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown when trying to invoke getAppContextAsync. Exception:["+e+"]");throw e;}};OSF.InitializationHelper.prototype.setAgaveHostCommunication=function(){var r=null,t=!1;try{var n=this,u=OSF.OUtil.parseXdmInfoWithGivenFragment(t,OSF._OfficeAppFactory.getWindowLocationHash());!u&&OSF._OfficeAppFactory.getWindowName&&(u=OSF.OUtil.parseXdmInfoFromWindowName(t,OSF._OfficeAppFactory.getWindowName()));if(u){var i=OSF.OUtil.getInfoItems(u);if(i!=undefined&&i.length>=3){n._webAppState.conversationID=i[0];n._webAppState.id=i[1];n._webAppState.webAppUrl=i[2].indexOf(":")>=0?i[2]:decodeURIComponent(i[2])}}n._webAppState.wnd=window.opener!=r?window.opener:window.parent;var f=OSF.OUtil.parseSerializerVersionWithGivenFragment(t,OSF._OfficeAppFactory.getWindowLocationHash());isNaN(f)&&OSF._OfficeAppFactory.getWindowName&&(f=OSF.OUtil.parseSerializerVersionFromWindowName(t,OSF._OfficeAppFactory.getWindowName()));n._webAppState.serializerVersion=f;if(this._hostInfo.isDialog&&window.opener!=r)return;n._webAppState.clientEndPoint=Microsoft.Office.Common.XdmCommunicationManager.connect(n._webAppState.conversationID,n._webAppState.wnd,n._webAppState.webAppUrl,n._webAppState.serializerVersion);n._webAppState.serviceEndPoint=Microsoft.Office.Common.XdmCommunicationManager.createServiceEndPoint(n._webAppState.id);var o=n._webAppState.conversationID+OSF.SharedConstants.NotificationConversationIdSuffix;n._webAppState.serviceEndPoint.registerConversation(o,n._webAppState.webAppUrl);var e=function(i){var e="ContextActivationManager_notifyHost";switch(i){case OSF.AgaveHostAction.Select:n._webAppState.focused=!0;break;case OSF.AgaveHostAction.UnSelect:n._webAppState.focused=t;break;case OSF.AgaveHostAction.TabIn:case OSF.AgaveHostAction.CtrlF6In:window.focus();var f=document.querySelectorAll(n._tabbableElements),u=OSF.OUtil.focusToFirstTabbable(f,t);if(!u){window.blur();n._webAppState.focused=t;n._webAppState.clientEndPoint.invoke(e,r,[n._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable])}break;case OSF.AgaveHostAction.TabInShift:window.focus();var f=document.querySelectorAll(n._tabbableElements),u=OSF.OUtil.focusToFirstTabbable(f,!0);if(!u){window.blur();n._webAppState.focused=t;n._webAppState.clientEndPoint.invoke(e,r,[n._webAppState.id,OSF.AgaveHostAction.ExitNoFocusableShift])}break;default:OsfMsAjaxFactory.msAjaxDebug.trace("actionId "+i+" notifyAgave is wrong.")}};n._webAppState.serviceEndPoint.registerMethod("Office_notifyAgave",e,Microsoft.Office.Common.InvokeType.async,t);n.addOrRemoveEventListenersForWindow(!0)}catch(s){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown in setAgaveHostCommunication. Exception:["+s+"]");throw s;}};OSF.InitializationHelper.prototype.addOrRemoveEventListenersForWindow=function(n){var o="keypress",r=null,i="ContextActivationManager_notifyHost",t=this,s=function(){t._webAppState.focused||(t._webAppState.focused=!0);t._webAppState.clientEndPoint.invoke(i,r,[t._webAppState.id,OSF.AgaveHostAction.Select])},e=function(){if(OSF){t._webAppState.focused&&(t._webAppState.focused=!1);t._webAppState.clientEndPoint.invoke(i,r,[t._webAppState.id,OSF.AgaveHostAction.UnSelect])}},u=function(n){n.preventDefault=n.preventDefault||function(){n.returnValue=!1};if(n.keyCode==117&&(n.ctrlKey||n.metaKey)){var f=OSF.AgaveHostAction.CtrlF6Exit;n.shiftKey&&(f=OSF.AgaveHostAction.CtrlF6ExitShift);t._webAppState.clientEndPoint.invoke(i,r,[t._webAppState.id,f])}else if(n.keyCode==9){n.preventDefault();var u=document.querySelectorAll(t._tabbableElements),e=OSF.OUtil.focusToNextTabbable(u,n.target||n.srcElement,n.shiftKey);e||(t._hostInfo.isDialog?OSF.OUtil.focusToFirstTabbable(u,n.shiftKey):n.shiftKey?t._webAppState.clientEndPoint.invoke(i,r,[t._webAppState.id,OSF.AgaveHostAction.TabExitShift]):t._webAppState.clientEndPoint.invoke(i,r,[t._webAppState.id,OSF.AgaveHostAction.TabExit]))}else if(n.keyCode==27){n.preventDefault();t.dismissDialogNotification&&t.dismissDialogNotification();t._webAppState.clientEndPoint.invoke(i,r,[t._webAppState.id,OSF.AgaveHostAction.EscExit])}else if(n.keyCode==113){n.preventDefault();t._webAppState.clientEndPoint.invoke(i,r,[t._webAppState.id,OSF.AgaveHostAction.F2Exit])}},f=function(n){n.keyCode==117&&n.ctrlKey&&(n.preventDefault?n.preventDefault():n.returnValue=!1)};if(n){OSF.OUtil.addEventListener(window,"focus",s);OSF.OUtil.addEventListener(window,"blur",e);OSF.OUtil.addEventListener(window,"keydown",u);OSF.OUtil.addEventListener(window,o,f)}else{OSF.OUtil.removeEventListener(window,"focus",s);OSF.OUtil.removeEventListener(window,"blur",e);OSF.OUtil.removeEventListener(window,"keydown",u);OSF.OUtil.removeEventListener(window,o,f)}};OSF.InitializationHelper.prototype.initWebDialog=function(n){if(n.get_isDialog()){if(OSF.DDA.UI.ChildUI){var t=window.opener!=null;n.ui=new OSF.DDA.UI.ChildUI(t);t&&this.registerMessageReceivedEventForWindowDialog&&this.registerMessageReceivedEventForWindowDialog()}}else if(OSF.DDA.UI.ParentUI){n.ui=new OSF.DDA.UI.ParentUI;OfficeExt.Container&&OSF.DDA.DispIdHost.addAsyncMethods(n.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync])}};OSF.getClientEndPoint=function(){var n=OSF._OfficeAppFactory.getInitializationHelper();return n._webAppState.clientEndPoint};OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize=function(){var n=this;if(n._hostInfo.isDialog){window.focus();var i=document.querySelectorAll(n._tabbableElements),t=OSF.OUtil.focusToFirstTabbable(i,!1);if(!t){window.blur();n._webAppState.focused=!1;n._webAppState.clientEndPoint&&n._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[n._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable])}}};(function(){var n=function(){var o=function(n){n&&OSF.OUtil.loadScript(n,function(){OsfMsAjaxFactory.msAjaxDebug.trace("loaded customized script:"+n)})},f,e,n,i=null,r=OSF.OUtil.parseXdmInfo();if(r){n=OSF.OUtil.getInfoItems(r);if(n&&n.length>=3){f=n[0];e=n[2];var t=OSF.OUtil.parseSerializerVersionWithGivenFragment(!1,OSF._OfficeAppFactory.getWindowLocationHash());isNaN(t)&&OSF._OfficeAppFactory.getWindowName&&(t=OSF.OUtil.parseSerializerVersionFromWindowName(!1,OSF._OfficeAppFactory.getWindowName()));i=Microsoft.Office.Common.XdmCommunicationManager.connect(f,window.parent,e,t)}}var u=null;if(i)try{i.invoke("getCustomizedScriptPathAsync",function(n,t){o(n===0?t:null)},{__timeout__:1e3})}catch(s){OsfMsAjaxFactory.msAjaxDebug.trace("no script override through cross frame communication.")}else{try{window.external&&typeof window.external.getCustomizedScriptPath!="undefined"&&(u=window.external.getCustomizedScriptPath())}catch(s){OsfMsAjaxFactory.msAjaxDebug.trace("no script override through window.external.")}o(u)}},t=!0;t&&!OsfMsAjaxFactory.isMsAjaxLoaded()?OSF._OfficeAppFactory&&OSF._OfficeAppFactory&&OSF._OfficeAppFactory.getLoadScriptHelper&&OSF._OfficeAppFactory.getLoadScriptHelper().isScriptLoading(OSF.ConstantNames.MicrosoftAjaxId)?OSF._OfficeAppFactory.getLoadScriptHelper().waitForScripts([OSF.ConstantNames.MicrosoftAjaxId],n):OsfMsAjaxFactory.loadMsAjaxFull(function(){if(OsfMsAjaxFactory.isMsAjaxLoaded())n();else throw"Not able to load MicrosoftAjax.js.";}):n()})();var OSFLog;(function(n){var u="ResponseTime",f="Message",r="SessionId",i="CorrelationId",t=!0,e=function(){function n(n){this._table=n;this._fields={}}Object.defineProperty(n.prototype,"Fields",{get:function(){return this._fields},enumerable:t,configurable:t});Object.defineProperty(n.prototype,"Table",{get:function(){return this._table},enumerable:t,configurable:t});n.prototype.SerializeFields=function(){};n.prototype.SetSerializedField=function(n,t){typeof t!="undefined"&&t!==null&&(this._serializedFields[n]=t.toString())};n.prototype.SerializeRow=function(){var n=this;n._serializedFields={};n.SetSerializedField("Table",n._table);n.SerializeFields();return JSON.stringify(n._serializedFields)};return n}();n.BaseUsageData=e;var c=function(n){var k="IsFromWacAutomation",w="WacHostEnvironment",b="HostJSVersion",y="OfficeJSVersion",p="DocUrl",g="AppSizeHeight",nt="AppSizeWidth",l="ClientId",d="HostVersion",s="Host",h="UserId",e="Browser",o="AssetId",a="AppURL",v="AppInstanceId",c="AppId";__extends(u,n);function u(){n.call(this,"AppActivated")}Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,c,{get:function(){return this.Fields[c]},set:function(n){this.Fields[c]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,v,{get:function(){return this.Fields[v]},set:function(n){this.Fields[v]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,a,{get:function(){return this.Fields[a]},set:function(n){this.Fields[a]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,d,{get:function(){return this.Fields[d]},set:function(n){this.Fields[d]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,l,{get:function(){return this.Fields[l]},set:function(n){this.Fields[l]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,nt,{get:function(){return this.Fields[nt]},set:function(n){this.Fields[nt]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,g,{get:function(){return this.Fields[g]},set:function(n){this.Fields[g]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,p,{get:function(){return this.Fields[p]},set:function(n){this.Fields[p]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,y,{get:function(){return this.Fields[y]},set:function(n){this.Fields[y]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,b,{get:function(){return this.Fields[b]},set:function(n){this.Fields[b]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,w,{get:function(){return this.Fields[w]},set:function(n){this.Fields[w]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,k,{get:function(){return this.Fields[k]},set:function(n){this.Fields[k]=n},enumerable:t,configurable:t});u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(c,n.AppId);n.SetSerializedField(v,n.AppInstanceId);n.SetSerializedField(a,n.AppURL);n.SetSerializedField(o,n.AssetId);n.SetSerializedField(e,n.Browser);n.SetSerializedField(h,n.UserId);n.SetSerializedField(s,n.Host);n.SetSerializedField(d,n.HostVersion);n.SetSerializedField(l,n.ClientId);n.SetSerializedField(nt,n.AppSizeWidth);n.SetSerializedField(g,n.AppSizeHeight);n.SetSerializedField(f,n.Message);n.SetSerializedField(p,n.DocUrl);n.SetSerializedField(y,n.OfficeJSVersion);n.SetSerializedField(b,n.HostJSVersion);n.SetSerializedField(w,n.WacHostEnvironment);n.SetSerializedField(k,n.IsFromWacAutomation)};return u}(e);n.AppActivatedUsageData=c;var l=function(n){var e="StartTime",o="ScriptId";__extends(f,n);function f(){n.call(this,"ScriptLoad")}Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t});f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(o,n.ScriptId);n.SetSerializedField(e,n.StartTime);n.SetSerializedField(u,n.ResponseTime)};return f}(e);n.ScriptLoadUsageData=l;var h=function(n){var h="CloseMethod",s="OpenTime",e="AppSizeFinalHeight",o="AppSizeFinalWidth",f="FocusTime";__extends(u,n);function u(){n.call(this,"AppClosed")}Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t});u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(f,n.FocusTime);n.SetSerializedField(o,n.AppSizeFinalWidth);n.SetSerializedField(e,n.AppSizeFinalHeight);n.SetSerializedField(s,n.OpenTime);n.SetSerializedField(h,n.CloseMethod)};return u}(e);n.AppClosedUsageData=h;var o=function(n){var s="ErrorType",o="Parameters",h="APIID",e="APIType";__extends(f,n);function f(){n.call(this,"APIUsage")}Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t});f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(e,n.APIType);n.SetSerializedField(h,n.APIID);n.SetSerializedField(o,n.Parameters);n.SetSerializedField(u,n.ResponseTime);n.SetSerializedField(s,n.ErrorType)};return f}(e);n.APIUsageUsageData=o;var s=function(n){var e="SuccessCode";__extends(u,n);function u(){n.call(this,"AppInitialization")}Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t});u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(e,n.SuccessCode);n.SetSerializedField(f,n.Message)};return u}(e);n.AppInitializationUsageData=s})(OSFLog||(OSFLog={}));var Logger;(function(n){"use strict";(function(n){n[n.info=0]="info";n[n.warning=1]="warning";n[n.error=2]="error"})(n.TraceLevel||(n.TraceLevel={}));var f=n.TraceLevel;(function(n){n[n.none=0]="none";n[n.flush=1]="flush"})(n.SendFlag||(n.SendFlag={}));var e=n.SendFlag;function u(){OSF.Logger&&OSF.Logger.ulsEndpoint&&OSF.Logger.ulsEndpoint.loadProxyFrame()}n.allowUploadingData=u;function t(n,t,i){if(OSF.Logger&&OSF.Logger.ulsEndpoint){var u={traceLevel:n,message:t,flag:i,internalLog:!0},r=JSON.stringify(u);OSF.Logger.ulsEndpoint.writeLog(r)}}n.sendLog=t;function i(){try{return new r}catch(n){return null}}var r=function(){function n(){var n=this,t=n;n.proxyFrame=null;n.telemetryEndPoint="https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html";n.buffer=[];n.proxyFrameReady=!1;OSF.OUtil.addEventListener(window,"message",function(n){return t.tellProxyFrameReady(n)});setTimeout(function(){t.loadProxyFrame()},3e3)}n.prototype.writeLog=function(t){var i=this;i.proxyFrameReady===!0?i.proxyFrame.contentWindow.postMessage(t,n.telemetryOrigin):i.buffer.length<128&&i.buffer.push(t)};n.prototype.loadProxyFrame=function(){var n=this;if(n.proxyFrame==null){n.proxyFrame=document.createElement("iframe");n.proxyFrame.setAttribute("style","display:none");n.proxyFrame.setAttribute("src",n.telemetryEndPoint);document.head.appendChild(n.proxyFrame)}};n.prototype.tellProxyFrameReady=function(t){var i=this,e=i;if(t.data==="ProxyFrameReadyToLog"){i.proxyFrameReady=!0;for(var r=0;r40){n=OSF.OUtil.Guid.generateNewGuid();t.setValue(t.clientIDKey,n)}return n};n.prototype.saveLog=function(n,t){var u=this,i=u.getValue(u.logIdSetKey);i=(i&&i.length>0?i+";":r)+n;u.setValue(u.logIdSetKey,i);u.setValue(n,t)};n.prototype.enumerateLog=function(n,t){var i=this,f=i.getValue(i.logIdSetKey);if(f){var e=f.split(";");for(var o in e){var r=e[o],u=i.getValue(r);if(u){n&&n(r,u);t&&i.remove(r)}}t&&i.remove(i.logIdSetKey)}};n.prototype.getValue=function(n){var i=OSF.OUtil.getLocalStorage(),t=r;i&&(t=i.getItem(n));return t};n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)};n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}};return n}(),o=function(){function n(){}n.prototype.LogData=function(n){if(OSF.Logger){OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n.SerializeRow(),OSF.Logger.SendFlag.none);OSFAriaLogger.AriaLogger.getInstance().logData(n)}};n.prototype.LogRawData=function(n){if(OSF.Logger){OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n,OSF.Logger.SendFlag.none);try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(n))}catch(t){}}};return n}();function u(n){n&&(n=n.replace(/[{}]/g,r).toLowerCase());return n||r}function k(e){if(OSF.Logger&&!t){t=new d;t.hostVersion=e.get_hostFullVersion()?e.get_hostFullVersion():e.get_appVersion();t.appId=e.get_id();t.host=e.get_appName();t.browser=window.navigator.userAgent;t.correlationId=u(e.get_correlationId());t.clientId=(new c).getClientId();t.appInstanceId=e.get_appInstanceId();t.appInstanceId&&(t.appInstanceId=t.appInstanceId.replace(/[{}]/g,r).toLowerCase());t.message=e.get_hostCustomMessage();t.officeJSVersion=OSF.ConstantNames.FileVersion;t.hostJSVersion="16.0.7920.1000";e._wacHostEnvironment&&(t.wacHostEnvironment=e._wacHostEnvironment);e._isFromWacAutomation!==undefined&&e._isFromWacAutomation!==i&&(t.isFromWacAutomation=e._isFromWacAutomation.toString().toLowerCase());var s=e.get_docUrl();t.docUrl=g.test(s)?s:r;var o=location.href;o&&(o=o.split("?")[0].split("#")[0]);t.appURL=o;(function(n,t){var o,s,u;t.assetId=r;t.userId=r;try{o=decodeURIComponent(n);s=new DOMParser;u=s.parseFromString(o,"text/xml");var e=u.getElementsByTagName("t")[0].attributes.getNamedItem("cid"),f=u.getElementsByTagName("t")[0].attributes.getNamedItem("oid");e&&e.nodeValue?t.userId=e.nodeValue:f&&f.nodeValue&&(t.userId=f.nodeValue);t.assetId=u.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(h){}finally{o=i;u=i;s=i}})(e.get_eToken(),t);(function(){var c=new Date,r=i,o=0,h=!1,u=function(){if(document.hasFocus())r==i&&(r=new Date);else if(r){o+=Math.abs(+new Date-r.getTime());r=i}},t=[];t.push(new f("focus",u));t.push(new f("blur",u));t.push(new f("focusout",u));t.push(new f("focusin",u));var s=function(){for(var u=0;u0)for(var r in i)if(i[r]===t)return!0;return!1},addEventHandler:function(n,t){if(typeof t!="function")return!1;var i=this._eventHandlers[n];if(i&&!this.hasEventHandler(n,t)){i.push(t);return!0}else return!1},addEventHandlerAndFireQueuedEvent:function(n,t){var r=this._eventHandlers[n],u=r.length==0,i=this.addEventHandler(n,t);u&&i&&this.fireQueuedEvent(n);return i},removeEventHandler:function(n,t){var i=this._eventHandlers[n];if(i&&i.length>0)for(var r=0;r0){this._eventHandlers[n]=[];return!0}return!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},fireEvent:function(n){if(n.type==undefined)return!1;var t=n.type;if(t&&this._eventHandlers[t]){var i=this._eventHandlers[t];for(var r in i)i[r](n);return!0}else return!1},fireOrQueueEvent:function(n){var i=this,t=n.type;if(t&&i._eventHandlers[t]){var u=i._eventHandlers[t],r=i._queuedEventsArgs[t];u.length==0?r.push(n):i.fireEvent(n);return!0}else return!1},fireQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var i=this._eventHandlers[n],t=this._queuedEventsArgs[n];if(i.length>0){for(var u=i[0];t.length>0;){var r=t.shift();u(r)}return!0}}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var f="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]=="outlook"||OSF._OfficeAppFactory.getHostInfo()[f]=="outlookwebapp"){r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i);t.initialize(r.initialData);t.setCurrentItemNumber(r.itemNumber.itemNumber)}else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});var OfficeExt;(function(n){var t;(function(t){var r=function(){var f="object",e="string",u=null;function r(){var t=this,n=t;t._pseudoDocument=u;t._eventDispatch=u;t._processAppCommandInvocation=function(t){var i=n._verifyManifestCallback(t.callbackName);if(i.errorCode!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){n._invokeAppCommandCompletedMethod(t.appCommandId,i.errorCode,"");return}var r=n._constructEventObjectForCallback(t);r?window.setTimeout(function(){i.callback(r)},0):n._invokeAppCommandCompletedMethod(t.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"")}}r.initializeOsfDda=function(){OSF.DDA.AsyncMethodNames.addNames({AppCommandInvocationCompletedAsync:"appCommandInvocationCompletedAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[e]},{name:Microsoft.Office.WebExtension.Parameters.Status,types:["number"]},{name:Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData,types:[e]}]});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{AppCommandInvokedEvent:"AppCommandInvokedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppCommandInvoked:"appCommandInvoked"});OSF.OUtil.setNamespace("AppCommand",OSF.DDA);OSF.DDA.AppCommand.AppCommandInvokedEventArgs=n.AppCommand.AppCommandInvokedEventArgs};r.prototype.initializeAndChangeOnce=function(n){var i=this;t.registerDdaFacade();i._pseudoDocument={};OSF.DDA.DispIdHost.addAsyncMethods(i._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync]);i._eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked]);var r=function(t){n&&(t.status=="succeeded"?n(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):n(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError))};OSF.DDA.DispIdHost.addEventSupport(i._pseudoDocument,i._eventDispatch);i._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,i._processAppCommandInvocation,r)};r.prototype._verifyManifestCallback=function(n){var s="function",e={callback:u,errorCode:OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback};n=n.trim();try{for(var t=n.split("."),r=window,i=0;i100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99);n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1);n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99);n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0);return n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("Dialog",OSF.DDA.Marshaling);OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys={MessageType:"messageType",MessageContent:"messageContent"};OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys={MessageType:"messageType",MessageContent:"messageContent"};OSF.DDA.Marshaling.MessageParentKeys={MessageToParent:"messageToParent"};OSF.DDA.Marshaling.DialogNotificationShownEventType={DialogNotificationShown:"dialogNotificationShown"};OSF.DDA.Marshaling.SendMessageKeys={MessageContent:"messageContent"};var OfficeExt;(function(n){var t;(function(n){var t={Excel:"excel",Word:"word",PowerPoint:"powerpoint",Outlook:"outlook"};function r(n){switch(n){case t.Excel:case t.Word:case t.PowerPoint:case t.Outlook:return new i;default:return new i}return null}n.getDialogCssManager=r;var i=function(){var t=";";function n(){var u="height: 100px",i="font-size: 14px",t="font-family: Segoe UI,Arial,Verdana,sans-serif",f="margin: 20px 14px",e="width: 100%",r="position: absolute",n=this;n.overlayElementCSS=[r,"top: 0","left: 0",e,"height: 100%","background-color: rgba(198, 198, 198, 0.5)","z-index: 99998"];n.dialogNotificationPanelCSS=[e,"height: 190px",r,"z-index: 99999","background-color: rgba(255, 255, 255, 1)","left: 0px","top: 50%","margin-top: -95px"];n.newWindowNotificationTextPanelCSS=[f,t,i,u,"line-height: 100px"];n.newWindowNotificationTextSpanCSS=["display: inline-block","line-height: normal","vertical-align: middle"];n.crossZoneNotificationTextPanelCSS=[f,t,i,u];n.dialogNotificationButtonPanelCSS="margin:0px 9px";n.buttonStyleCSS=["text-align: center","width: 70px","height: 25px",i,t,"margin: 0px 5px","border-width: 1px","border-style: solid"]}n.prototype.getOverlayElementCSS=function(){return this.overlayElementCSS.join(t)};n.prototype.getDialogNotificationPanelCSS=function(){return this.dialogNotificationPanelCSS.join(t)};n.prototype.getNewWindowNotificationTextPanelCSS=function(){return this.newWindowNotificationTextPanelCSS.join(t)};n.prototype.getNewWindowNotificationTextSpanCSS=function(){return this.newWindowNotificationTextSpanCSS.join(t)};n.prototype.getCrossZoneNotificationTextPanelCSS=function(){return this.crossZoneNotificationTextPanelCSS.join(t)};n.prototype.getDialogNotificationButtonPanelCSS=function(){return this.dialogNotificationButtonPanelCSS};n.prototype.getDialogButtonCSS=function(){return this.buttonStyleCSS.join(t)};return n}();n.DefaultDialogCSSManager=i})(t=n.WacCommonUICssManager||(n.WacCommonUICssManager={}))})(OfficeExt||(OfficeExt={}));var OfficeExt;(function(n){var t;(function(t){var i;(function(t){var h="div",a="string",y="message",v="keydown",r=!1,i=null,u=i,nt=i,o=i,f=i,ct="osfDialogInternal:action=closeDialog",e=i,g=r,tt=-1,c=i,lt="#ababab",st="#ffffff",yt="#ccc",at="newWindowNotificaiton",vt="crossZoneNotification",k="configureBrowserLink",b="dialogNotificationTextPanel",s={dispId:OSF.DDA.EventDispId.dispidDialogNotificationShownInAddinEvent,eventType:OSF.DDA.Marshaling.DialogNotificationShownEventType.DialogNotificationShown,onComplete:i};function ri(n){var t=n.input;t!=i&&(c={HostButtonBorderColor:t[OSF.HostThemeButtonStyleKeys.ButtonBorderColor],HostButtonBackgroundColor:t[OSF.HostThemeButtonStyleKeys.ButtonBackgroundColor]});n.completed()}t.setHostThemeButtonStyle=ri;function ii(n){OSF._OfficeAppFactory.getInitializationHelper().addOrRemoveEventListenersForWindow(r);n.completed()}t.removeEventListenersForDialog=ii;function ui(t){try{g=r;var a=r,k=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo,h=n.WacCommonUICssManager.getDialogCssManager(k.hostType),nt=OSF.OUtil.formatString(Strings.OfficeOM.L_ShowWindowDialogNotification,OSF._OfficeAppFactory.getInitializationHelper()._appContext._addinName);o=ot(h);document.body.insertBefore(o,document.body.firstChild);f=bt(h,nt);f.id=at;var c=et(h),i=it(h,Strings.OfficeOM.L_ShowWindowDialogNotificationAllow),u=it(h,Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore);c.appendChild(i);c.appendChild(u);f.appendChild(c);document.body.insertBefore(f,document.body.firstChild);i.onclick=function(){fi(t);g||l()};function y(){function n(n){d();ft(n);e(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore)}s.onComplete=n;OSF.DDA.WAC.Delegate.unregisterEventAsync(s)}u.onclick=y;i.addEventListener(v,function(n){if(n.shiftKey&&n.keyCode==9){w(i);p(u);u.focus();n.preventDefault();n.stopPropagation()}},r);u.addEventListener(v,function(n){if(n.shiftKey||n.keyCode!=9){if(n.keyCode==13){a=!0;n.preventDefault();n.stopPropagation()}}else{w(u);p(i);i.focus();n.preventDefault();n.stopPropagation()}},r);u.addEventListener("keyup",function(n){if(n.keyCode==13&&a){a=r;y();n.preventDefault();n.stopPropagation()}},r);window.focus();function b(){i.focus()}s.onComplete=b;OSF.DDA.WAC.Delegate.registerEventAsync(s)}catch(tt){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at new window dialog."+tt);e(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)}}t.handleNewWindowDialog=ui;function pt(n){try{if(u!=i){var r=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains;if(r)for(var t=0;t-1)window.close();else{var t=n.data,r=typeof t;if(t&&(r=="object"||r==a)){r==a&&(t=JSON.parse(t));var u=OSF.DDA.OMFactory.manufactureEventArgs(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived,i,t);OSF.DialogParentMessageEventDispatch.fireEvent(u)}}}window.addEventListener(y,n)}t.registerMessageReceivedEvent=kt;function dt(n,t){nt=n;e=t}t.setHandlerAndShowDialogCallback=dt;function ti(){try{f&&f.id==at&&e&&e(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore)}catch(n){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during executing displayDialogAsync callback."+n)}l()}t.escDismissDialogNotification=ti;function ut(t,i){var s=r,e=n.WacCommonUICssManager.getDialogCssManager(i);o=ot(e);document.body.insertBefore(o,document.body.firstChild);f=wt(e,t);f.id=vt;var h=et(e),u=it(e,Strings.OfficeOM.L_DialogOK?Strings.OfficeOM.L_DialogOK:"OK");h.appendChild(u);f.appendChild(h);document.body.insertBefore(f,document.body.firstChild);g=!0;u.onclick=function(){l()};u.addEventListener(v,function(n){if(n.keyCode==9){document.getElementById(k).focus();n.preventDefault();n.stopPropagation()}else if(n.keyCode==13){s=!0;n.preventDefault();n.stopPropagation()}},r);u.addEventListener("keyup",function(n){if(n.keyCode==13&&s){s=r;l();n.preventDefault();n.stopPropagation()}},r);document.getElementById(k).addEventListener(v,function(n){if(n.keyCode==9){u.focus();n.preventDefault();n.stopPropagation()}},r);window.focus();u.focus()}t.showCrossZoneNotification=ut;function rt(n){if(n.source==u)try{var t={};t[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogMessageReceived;t[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent]=n.data;nt(t)}catch(i){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during receive message handler."+i)}}function fi(t){var r=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo,w=[r.hostType,r.hostPlatform,r.hostSpecificFileVersion,r.hostLocale,r.osfControlAppCorrelationId,"isDialog"],l=w.join("|"),f=OSF._OfficeAppFactory.getInitializationHelper()._appContext,o=t[OSF.ShowWindowDialogParameterKeys.Url];o=n.WACUtils.addHostInfoAsQueryParam(o,l);var s=JSON.parse(window.name);s[OSF.WindowNameItemKeys.HostInfo]=l;s[OSF.WindowNameItemKeys.AppContext]=f;var h=t[OSF.ShowWindowDialogParameterKeys.Width]*f._clientWindowWidth/100,c=t[OSF.ShowWindowDialogParameterKeys.Height]*f._clientWindowHeight/100,b=f._clientWindowWidth/2-h/2,p=f._clientWindowHeight/2-c/2,a="width="+h+", height="+c+", left="+b+", top="+p+",channelmode=no,directories=no,fullscreen=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=yes,toolbar=no";u=window.open(o,n.WACUtils.serializeObjectToString(s),a);if(u==i){OSF.AppTelemetry.logAppCommonMessage("Encountered cross zone issue in displayDialogAsync api.");d();ut(o,r.hostType);e(OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone);return}window.addEventListener(y,rt);function v(){try{if(u==i||u.closed){window.clearInterval(tt);window.removeEventListener(y,rt);var n={};n[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogClosed;nt(n)}}catch(t){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during check or handle window close."+t)}}tt=window.setInterval(v,1e3);e!=i?e(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("showDialogCallback can not be null.")}function it(n,t){var i=document.createElement("input");i.setAttribute("type","button");i.style.cssText=n.getDialogButtonCSS();i.style.borderColor=lt;i.style.backgroundColor=st;i.setAttribute("value",t);var u=function(){p(i)},r=function(){w(i)};i.addEventListener("mouseover",u);i.addEventListener("focus",u);i.addEventListener("mouseout",r);i.addEventListener("focusout",r);return i}function p(n){if(c!=i){n.style.borderColor=c.HostButtonBorderColor;n.style.backgroundColor=c.HostButtonBackgroundColor}else if(OSF.CommonUI&&OSF.CommonUI.HostButtonBorderColor&&OSF.CommonUI.HostButtonBackgroundColor){n.style.borderColor=OSF.CommonUI.HostButtonBorderColor;n.style.backgroundColor=OSF.CommonUI.HostButtonBackgroundColor}else n.style.backgroundColor=yt}function w(n){n.style.borderColor=lt;n.style.backgroundColor=st}function l(){function n(n){d();ft(n)}s.onComplete=n;OSF.DDA.WAC.Delegate.unregisterEventAsync(s)}function d(){if(f!=i){document.body.removeChild(f);f=i}if(o!=i){document.body.removeChild(o);o=i}}function ot(n){var t=document.createElement(h);t.style.cssText=n.getOverlayElementCSS();return t}function bt(n,t){var r=document.createElement(h);r.style.cssText=n.getDialogNotificationPanelCSS();ht(r);var i=document.createElement(h);i.style.cssText=n.getNewWindowNotificationTextPanelCSS();i.id=b;document.documentElement.getAttribute("dir")=="rtl"?i.style.paddingRight="30px":i.style.paddingLeft="30px";var u=document.createElement("span");u.style.cssText=n.getNewWindowNotificationTextSpanCSS();u.innerText=t;i.appendChild(u);r.appendChild(i);return r}function et(n){var t=document.createElement(h);t.style.cssText=n.getDialogNotificationButtonPanelCSS();t.style.cssFloat=document.documentElement.getAttribute("dir")=="rtl"?"left":"right";return t}function ft(n){if(n!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){var t=document.querySelectorAll(OSF._OfficeAppFactory.getInitializationHelper()._tabbableElements);OSF.OUtil.focusToFirstTabbable(t,r)}}function wt(t,i){var f=document.createElement(h);f.style.cssText=t.getDialogNotificationPanelCSS();ht(f);var u=document.createElement(h);u.style.cssText=t.getCrossZoneNotificationTextPanelCSS();u.id=b;var r=document.createElement("a");r.id=k;r.href="#";r.innerText=Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink;r.setAttribute("onclick","window.open('https://support.microsoft.com/en-us/help/17479/windows-internet-explorer-11-change-security-privacy-settings', '_blank', 'fullscreen=1')");var e=document.createElement("span");Strings.OfficeOM.L_NewWindowCrossZone&&(e.innerHTML=OSF.OUtil.formatString(Strings.OfficeOM.L_NewWindowCrossZone,r.outerHTML,n.WACUtils.getDomainForUrl(i)));u.appendChild(e);f.appendChild(u);return f}function ht(n){n.setAttribute("role","dialog");n.setAttribute("aria-describedby",b)}})(i=t.Dialog||(t.Dialog={}))})(t=n.AddinNativeAction||(n.AddinNativeAction={}))})(OfficeExt||(OfficeExt={}));OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogMessageReceivedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageType},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageContent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidMessageParentMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,value:OSF.DDA.Marshaling.MessageParentKeys.MessageToParent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSendMessageMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,value:OSF.DDA.Marshaling.SendMessageKeys.MessageContent}]});OSF.DDA.WAC.Delegate.openDialog=function(n){var u="https://",f="http://",r=JSON.parse(n.targetId),e=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!0,n);function t(n){var t={Error:n};e(Microsoft.Office.Common.InvokeResultCode.noError,t)}if(OSF.DialogShownStatus.hasDialogShown){t(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened);return}var i=r[OSF.ShowWindowDialogParameterKeys.Url].toLowerCase();if(i==null||!(i.substr(0,u.length)===u)){i.substr(0,f.length)===f?t(OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS):t(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme);return}if(r[OSF.ShowWindowDialogParameterKeys.DisplayInIframe]){OSF.DialogShownStatus.isWindowDialog=!1;OSF.DDA.WAC.Delegate.registerEventAsync(n)}else{OSF.DialogShownStatus.isWindowDialog=!0;OfficeExt.AddinNativeAction.Dialog.setHandlerAndShowDialogCallback(function(t){n.onEvent&&n.onEvent(t);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t);OfficeExt.AddinNativeAction.Dialog.handleNewWindowDialog(r)}};OSF.DDA.WAC.Delegate.messageParent=function(n){window.opener!=null?OfficeExt.AddinNativeAction.Dialog.messageParent(n):OSF.DDA.WAC.Delegate.executeAsync(n)};OSF.DDA.WAC.Delegate.sendMessage=function(n){OSF.DialogShownStatus.hasDialogShown&&(OSF.DialogShownStatus.isWindowDialog?OfficeExt.AddinNativeAction.Dialog.sendMessage(n):OSF.DDA.WAC.Delegate.executeAsync(n))};OSF.DDA.WAC.Delegate.closeDialog=function(n){var i=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!1,n);function t(n){var t={Error:n};i(Microsoft.Office.Common.InvokeResultCode.noError,t)}if(OSF.DialogShownStatus.hasDialogShown)if(OSF.DialogShownStatus.isWindowDialog){n.onCalling&&n.onCalling();OfficeExt.AddinNativeAction.Dialog.closeDialog(t)}else OSF.DDA.WAC.Delegate.unregisterEventAsync(n);else t(OSF.DDA.ErrorCodeManager.errorCodes.ooeWebDialogClosed)};OSF.InitializationHelper.prototype.dismissDialogNotification=function(){OfficeExt.AddinNativeAction.Dialog.escDismissDialogNotification()};OSF.InitializationHelper.prototype.registerMessageReceivedEventForWindowDialog=function(){OfficeExt.AddinNativeAction.Dialog.registerMessageReceivedEvent()};OSF.DDA.AsyncMethodNames.addNames({CloseContainerAsync:"closeContainer"});var OfficeExt;(function(n){var t=function(){function n(){}return n}();n.Container=t})(OfficeExt||(OfficeExt={}));OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseContainerAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidCloseContainerMethod,fromHost:[],toHost:[]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ItemChanged:"olkItemSelectedChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{OlkItemSelectedData:"OlkItemSelectedData"});OSF.DDA.OlkItemSelectedChangedEventArgs=function(n){var t=n[OSF.DDA.EventDescriptors.OlkItemSelectedData][0];t===""&&(t=null);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.ItemChanged},initialData:{value:JSON.parse(t)},itemNumber:{value:JSON.parse(n[OSF.DDA.EventDescriptors.OlkItemSelectedData][1])}})};OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidOlkItemSelectedChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.OlkItemSelectedData,value:OSF.DDA.WAC.Delegate.ParameterMap.sourceData}],isComplexType:!0});OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize=function(){OSF.WebApp._UpdateLinksForHostAndXdmInfo()};OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize=function(){var n=OfficeExt.AppCommand.AppCommandManager.instance();n.initializeAndChangeOnce()};OSF.InitializationHelper.prototype.getInitializationReason=function(n){return n.get_reason()};var executeAsyncBase=OSF.DDA.WAC.Delegate.executeAsync;OSF.DDA.WAC.Delegate.executeAsync=function(n){var t=n.onCalling;n.onCalling=function(){n.hostCallArgs=OSF.DDA.OutlookAppOm.addAdditionalArgs(n.dispId,n.hostCallArgs);t&&t()};executeAsyncBase(n)};OSF.InitializationHelper.prototype.prepareApiSurface=function(n){var t=new OSF.DDA.License(n.get_eToken());if(n.get_appName()==OSF.AppName.OutlookWebApp){OSF.WebApp._UpdateLinksForHostAndXdmInfo();this.initWebDialog(n);OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(n,this._settings,t,n.appOM));OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.WAC.getDelegateMethods,OSF.DDA.WAC.Delegate.ParameterMap))}else{OfficeJsClient_OutlookWin32.prepareApiSurface(n);OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(n,this._settings,t,n.appOM,OSF.DDA.Theming?OSF.DDA.Theming.getOfficeTheme:null,n.ui));OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.DispIdHost.getClientDelegateMethods,OSF.DDA.SafeArray.Delegate.ParameterMap))}};OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(n){var r={};for(var i in n){var t=n[i];try{t=JSON?JSON.stringify(t,function(n,t){return OSF.OUtil.isDate(this[n])?OSF.DDA.SettingsManager.DateJSONPrefix+this[n].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix:t}):Sys.Serialization.JavaScriptSerializer.serialize(t);r[i]=t}catch(u){}}return r},deserializeSettings:function(n){var r={};n=n||{};for(var i in n){var t=n[i];try{t=JSON?JSON.parse(t,function(n,t){var i;if(typeof t=="string"&&t&&t.length>6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix){i=new Date(parseInt(t.slice(5,-1)));if(i)return i}return t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,!0);r[i]=t}catch(u){}}return r}};OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(n,t,i){Type.registerNamespace("Microsoft.Office.WebExtension.MailboxEnums");Microsoft.Office.WebExtension.MailboxEnums.EntityType={MeetingSuggestion:"meetingSuggestion",TaskSuggestion:"taskSuggestion",Address:"address",EmailAddress:"emailAddress",Url:"url",PhoneNumber:"phoneNumber",Contact:"contact",FlightReservations:"flightReservations",ParcelDeliveries:"parcelDeliveries"};Microsoft.Office.WebExtension.MailboxEnums.ItemType={Message:"message",Appointment:"appointment"};Microsoft.Office.WebExtension.MailboxEnums.ResponseType={None:"none",Organizer:"organizer",Tentative:"tentative",Accepted:"accepted",Declined:"declined"};Microsoft.Office.WebExtension.MailboxEnums.RecipientType={Other:"other",DistributionList:"distributionList",User:"user",ExternalUser:"externalUser"};Microsoft.Office.WebExtension.MailboxEnums.AttachmentType={File:"file",Item:"item",Cloud:"cloud"};Microsoft.Office.WebExtension.MailboxEnums.BodyType={Text:"text",Html:"html"};Microsoft.Office.WebExtension.MailboxEnums.ItemNotificationMessageType={ProgressIndicator:"progressIndicator",InformationalMessage:"informationalMessage",ErrorMessage:"errorMessage"};Microsoft.Office.WebExtension.CoercionType={Text:"text",Html:"html"};Microsoft.Office.WebExtension.MailboxEnums.UserProfileType={Office365:"office365",OutlookCom:"outlookCom",Enterprise:"enterprise"};Microsoft.Office.WebExtension.MailboxEnums.RestVersion={v1_0:"v1.0",v2_0:"v2.0",Beta:"beta"};Microsoft.Office.WebExtension.MailboxEnums.ModuleType={Addins:"addins"};Type.registerNamespace("OSF.DDA");var u=window.OSF||{};u.DDA=u.DDA||{};window.OSF.DDA.OutlookAppOm=u.DDA.OutlookAppOm=function(n,t,i){this.$$d_navigateToModuleAsync=Function.createDelegate(this,this.navigateToModuleAsync);this.$$d_displayPersonaCardAsync=Function.createDelegate(this,this.displayPersonaCardAsync);this.$$d_displayNewMessageFormApi=Function.createDelegate(this,this.displayNewMessageFormApi);this.$$d__displayNewAppointmentFormApi$p$0=Function.createDelegate(this,this._displayNewAppointmentFormApi$p$0);this.$$d_windowOpenOverrideHandler=Function.createDelegate(this,this.windowOpenOverrideHandler);this.$$d__getRestUrl$p$0=Function.createDelegate(this,this._getRestUrl$p$0);this.$$d__getEwsUrl$p$0=Function.createDelegate(this,this._getEwsUrl$p$0);this.$$d__getDiagnostics$p$0=Function.createDelegate(this,this._getDiagnostics$p$0);this.$$d__getUserProfile$p$0=Function.createDelegate(this,this._getUserProfile$p$0);this.$$d_getItem=Function.createDelegate(this,this.getItem);this.$$d__callAppReadyCallback$p$0=Function.createDelegate(this,this._callAppReadyCallback$p$0);this.$$d__getInitialDataResponseHandler$p$0=Function.createDelegate(this,this._getInitialDataResponseHandler$p$0);window.OSF.DDA.OutlookAppOm._instance$p=this;this._officeAppContext$p$0=n;this._appReadyCallback$p$0=i;var r=this;var u=function(){i&&(r._officeAppContext$p$0.get_isDialog()?window.setTimeout(r.$$d__callAppReadyCallback$p$0,0):r.invokeHostMethod(1,null,r.$$d__getInitialDataResponseHandler$p$0))};this._areStringsLoaded$p$0()?u():this._loadLocalizedScript$p$0(u)};window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i=function(n){if(!n)throw Error.create(window._u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text);};window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i=function(n,t,i,r){if(ni)throw Error.argumentOutOfRange(r);};window.OSF.DDA.OutlookAppOm._throwOnInvalidModule$p=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("module");else if(n==="")throw Error.argument("module","module cannot be empty.");if(n!==window.Microsoft.Office.WebExtension.MailboxEnums.ModuleType.Addins)throw Error.notImplemented(String.format("API not supported for module '{0}'",n));};window.OSF.DDA.OutlookAppOm._getHtmlBody$p=function(n){var t="";if("htmlBody"in n){window.OSF.DDA.OutlookAppOm._throwOnInvalidHtmlBody$p(n.htmlBody);t=n.htmlBody}return t};window.OSF.DDA.OutlookAppOm._getAttachments$p=function(n){var t=[];if("attachments"in n){t=n.attachments;window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentsArray$p(t)}return t};window.OSF.DDA.OutlookAppOm._getOptionsAndCallback$p=function(n){var t=[];"options"in n&&(t[0]=n.options);"callback"in n&&(t[t.length]=n.callback);return t};window.OSF.DDA.OutlookAppOm._createAttachmentsDataForHost$p=function(n){var r=new Array(0);if(Array.isInstanceOfType(n))for(var t=0;t2048)throw Error.argumentOutOfRange("attachments",n.length,window._u.ExtensibilityStrings.l_AttachmentUrlTooLong_Text);window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentName$p(t)};window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentItemIdOrName$p=function(n,t){if(!String.isInstanceOfType(n)||!String.isInstanceOfType(t))throw Error.argument("attachments");if(n.length>200)throw Error.argumentOutOfRange("attachments",n.length,window._u.ExtensibilityStrings.l_AttachmentItemIdTooLong_Text);window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentName$p(t)};window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentName$p=function(n){if(n.length>255)throw Error.argumentOutOfRange("attachments",n.length,window._u.ExtensibilityStrings.l_AttachmentNameTooLong_Text);};window.OSF.DDA.OutlookAppOm._throwOnInvalidRestVersion$p=function(n){if(!n)throw Error.argumentNull("restVersion");if(n!==window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v1_0&&n!==window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v2_0&&n!==window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.Beta)throw Error.argument("restVersion");};window.OSF.DDA.OutlookAppOm.getItemIdBasedOnHost=function(n){return window.OSF.DDA.OutlookAppOm._instance$p._initialData$p$0&&window.OSF.DDA.OutlookAppOm._instance$p._initialData$p$0.get__isRestIdSupported$i$0()?window.OSF.DDA.OutlookAppOm._instance$p.convertToRestId(n,window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v1_0):window.OSF.DDA.OutlookAppOm._instance$p.convertToEwsId(n,window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v1_0)};window.OSF.DDA.OutlookAppOm.addAdditionalArgs=function(n,t){return t};window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p=function(n,t,i){if(Object.getType(n)!==t)throw Error.argumentType(i);};window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p=function(n,t,i,u){if(!r.ScriptHelpers.isNullOrUndefined(n)){window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(n,String,u);var f=n;window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(f.length,t,i,u)}};window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p=function(n){return n?n.join(";"):null};window.OSF.DDA.OutlookAppOm._convertComposeEmailDictionaryParameterForSetApi$p=function(n){if(!n)return null;for(var i=new Array(n.length),t=0;t1&&f[1]){r.error=!0;r.errorCode=f[1]}else r.error=!1;i(t,r)}else if(Number.isInstanceOfType(u)){var e={};e.error=!0;e.errorCode=u;i(t,e)}else throw Error.notImplemented("Return data type from host must be Dictionary or int");}})}},_dictionaryToDate$i$0:function(n){var t=new Date(n.year,n.month,n.date,n.hours,n.minutes,n.seconds,n.milliseconds?n.milliseconds:0);if(window.isNaN(t.getTime()))throw Error.format(window._u.ExtensibilityStrings.l_InvalidDate_Text);return t},_dateToDictionary$i$0:function(n){var t={};t.month=n.getMonth();t.date=n.getDate();t.year=n.getFullYear();t.hours=n.getHours();t.minutes=n.getMinutes();t.seconds=n.getSeconds();t.milliseconds=n.getMilliseconds();return t},_isOwaOnlyMethod$p$0:function(n){switch(n){case 402:case 401:case 400:case 403:return!0;default:return!1}},isOutlook16OrGreater:function(){var n=this._initialData$p$0.get__hostVersion$i$0();var i=0;var t=0;if(n){i=n.indexOf(".");t=window.parseInt(n.substring(0,i))}return t>=16},convertToOutlookParameters:function(n,t){var i=null;var u={};switch(n){case 1:case 2:case 3:case 14:case 18:case 26:case 32:case 41:case 34:break;case 12:u.isRest=t.isRest;break;case 4:var f=window.JSON.stringify(t.customProperties);i=[f];break;case 5:i=[t.body];break;case 8:case 9:i=[t.itemId];break;case 7:i=[window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.requiredAttendees),window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.optionalAttendees),t.start,t.end,t.location,window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.resources),t.subject,t.body];break;case 44:i=[window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.toRecipients),window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.ccRecipients),window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.bccRecipients),t.subject,t.htmlBody,t.attachments];break;case 43:i=[t.ewsIdOrEmail];break;case 45:i=[t.module,t.queryString];break;case 40:i=[t.extensionId,t.consentState];break;case 11:case 10:i=[t.htmlBody];break;case 31:case 30:i=[t.htmlBody,t.attachments];break;case 23:case 13:case 38:case 29:i=[t.data,t.coercionType];break;case 37:case 28:i=[t.coercionType];break;case 17:i=[t.subject];break;case 15:i=[t.recipientField];break;case 22:case 21:i=[t.recipientField,window.OSF.DDA.OutlookAppOm._convertComposeEmailDictionaryParameterForSetApi$p(t.recipientArray)];break;case 19:i=[t.itemId,t.name];break;case 16:i=[t.uri,t.name,t.isInline];break;case 20:i=[t.attachmentIndex];break;case 25:i=[t.TimeProperty,t.time];break;case 24:i=[t.TimeProperty];break;case 27:i=[t.location];break;case 33:case 35:i=[t.key,t.type,t.persistent,t.message,t.icon];break;case 36:i=[t.key];break;default:break}if(n!==1){var r;this._additionalOutlookParams$p$0.updateOutlookExecuteParameters(r={val:i},u),i=r.val}return i},_displayNewAppointmentFormApi$p$0:function(n){var f=window.OSF.DDA.OutlookAppOm._validateAndNormalizeRecipientEmails$p(n.requiredAttendees,"requiredAttendees");var u=window.OSF.DDA.OutlookAppOm._validateAndNormalizeRecipientEmails$p(n.optionalAttendees,"optionalAttendees");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(n.location,0,window.OSF.DDA.OutlookAppOm._maxLocationLength$p,"location");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(n.body,0,window.OSF.DDA.OutlookAppOm.maxBodyLength,"body");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(n.subject,0,window.OSF.DDA.OutlookAppOm._maxSubjectLength$p,"subject");if(!r.ScriptHelpers.isNullOrUndefined(n.start)){window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(n.start,Date,"start");var s=n.start;n.start=s.getTime();if(!r.ScriptHelpers.isNullOrUndefined(n.end)){window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(n.end,Date,"end");var i=n.end;if(i=0&&n.getTime()-u<0)return window.parseInt(t.offset)}throw Error.format(window._u.ExtensibilityStrings.l_InvalidDate_Text);},_areStringsLoaded$p$0:function(){var n=!1;try{n=!r.ScriptHelpers.isNullOrUndefined(window._u.ExtensibilityStrings.l_EwsRequestOversized_Text)}catch(t){}return n},_loadLocalizedScript$p$0:function(n){for(var s=null,l="",a=document.getElementsByTagName("script"),o=a.length-1;o>=0;o--){var i=null;var v=a[o].attributes;if(v){var p=v.getNamedItem("src");p&&(i=p.value);if(i){var y=!1;i=i.toLowerCase();var f=i.indexOf("office_strings.js");if(f<0){f=i.indexOf("office_strings.debug.js");y=!0}if(f>0&&fu+1&&(l=r.substring(0,u+1));break}}}}if(s){var h=document.getElementsByTagName("head")[0];var t=null;var b=this;var e=function(){if(n&&(!t.readyState||t.readyState&&(t.readyState==="loaded"||t.readyState==="complete"))){t.onload=null;t.onreadystatechange=null;n()}};var c=this;var w=function(){if(!c._areStringsLoaded$p$0()){var n=l+"en-us/"+"outlook_strings.js";t.onload=null;t.onreadystatechange=null;t=c._createScriptElement$p$0(n);t.onload=e;t.onreadystatechange=e;h.appendChild(t)}};t=this._createScriptElement$p$0(s);t.onload=e;t.onreadystatechange=e;window.setTimeout(w,2e3);h.appendChild(t)}},_createScriptElement$p$0:function(n){var t=document.createElement("script");t.type="text/javascript";t.src=n;return t}};u.DDA.OutlookAppOm.prototype.initialize=function(n){if(!n){this._additionalOutlookParams$p$0=new r.AdditionalGlobalParameters(!0);this._initialData$p$0=null;this._item$p$0=null;return}var t="itemType";this._initialData$p$0=new r.InitialData(n);this._hostItemType$p$0=n[t];1===n[t]?this._item$p$0=new r.Message(this._initialData$p$0):3===n[t]?this._item$p$0=new r.MeetingRequest(this._initialData$p$0):2===n[t]?this._item$p$0=new r.Appointment(this._initialData$p$0):4===n[t]?this._item$p$0=new r.MessageCompose(this._initialData$p$0):5===n[t]?this._item$p$0=new r.AppointmentCompose(this._initialData$p$0):6===n[t];this._userProfile$p$0=new r.UserProfile(this._initialData$p$0);this._diagnostics$p$0=new r.Diagnostics(this._initialData$p$0,this._officeAppContext$p$0.get_appName());var i=window.OSF.DDA.OutlookAppOm._instance$p.get__appName$i$0()!==8||this.isOutlook16OrGreater();this._additionalOutlookParams$p$0=new r.AdditionalGlobalParameters(i);"itemNumber"in n&&this.setCurrentItemNumber(n.itemNumber);this._initializeMethods$p$0();r.InitialData._defineReadOnlyProperty$i(this,"item",this.$$d_getItem);r.InitialData._defineReadOnlyProperty$i(this,"userProfile",this.$$d__getUserProfile$p$0);r.InitialData._defineReadOnlyProperty$i(this,"diagnostics",this.$$d__getDiagnostics$p$0);r.InitialData._defineReadOnlyProperty$i(this,"ewsUrl",this.$$d__getEwsUrl$p$0);r.InitialData._defineReadOnlyProperty$i(this,"restUrl",this.$$d__getRestUrl$p$0);window.OSF.DDA.OutlookAppOm._instance$p.get__appName$i$0()===64&&this._initialData$p$0.get__overrideWindowOpen$i$0()&&(window.open=this.$$d_windowOpenOverrideHandler)};u.DDA.OutlookAppOm.prototype.makeEwsRequestAsync=function(n){for(var u=[],i=1;iwindow.OSF.DDA.OutlookAppOm._maxEwsRequestSize$p)throw Error.argument("data",window._u.ExtensibilityStrings.l_EwsRequestOversized_Text);this._throwOnMethodCallForInsufficientPermission$i$0(3,"makeEwsRequestAsync");var f=r.CommonParameters.parse(u,!0,!0);var t=new r.EwsRequest(f._asyncContext$p$0);var e=this;t.onreadystatechange=function(){4===t.get__requestState$i$1()&&f._callback$p$0(t._asyncResult$p$0)};t.send(n)};u.DDA.OutlookAppOm.prototype.recordDataPoint=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");this.invokeHostMethod(402,n,null)};u.DDA.OutlookAppOm.prototype.recordTrace=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");this.invokeHostMethod(401,n,null)};u.DDA.OutlookAppOm.prototype.trackCtq=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");this.invokeHostMethod(400,n,null)};u.DDA.OutlookAppOm.prototype.convertToLocalClientTime=function(n){var t=new Date(n.getTime());var i=t.getTimezoneOffset()*-1;if(this._initialData$p$0&&this._initialData$p$0.get__timeZoneOffsets$i$0()){t.setUTCMinutes(t.getUTCMinutes()-i);i=this._findOffset$p$0(t);t.setUTCMinutes(t.getUTCMinutes()+i)}var r=this._dateToDictionary$i$0(t);r.timezoneOffset=i;return r};u.DDA.OutlookAppOm.prototype.convertToUtcClientTime=function(n){var t=this._dictionaryToDate$i$0(n);if(this._initialData$p$0&&this._initialData$p$0.get__timeZoneOffsets$i$0()){var i=this._findOffset$p$0(t);t.setUTCMinutes(t.getUTCMinutes()-i);i=n.timezoneOffset?n.timezoneOffset:t.getTimezoneOffset()*-1;t.setUTCMinutes(t.getUTCMinutes()+i)}return t};u.DDA.OutlookAppOm.prototype.convertToRestId=function(n,t){if(!n)throw Error.argumentNull("itemId");window.OSF.DDA.OutlookAppOm._throwOnInvalidRestVersion$p(t);return n.replace(new RegExp("[/]","g"),"-").replace(new RegExp("[+]","g"),"_")};u.DDA.OutlookAppOm.prototype.convertToEwsId=function(n,t){if(!n)throw Error.argumentNull("itemId");window.OSF.DDA.OutlookAppOm._throwOnInvalidRestVersion$p(t);return n.replace(new RegExp("[-]","g"),"/").replace(new RegExp("[_]","g"),"+")};u.DDA.OutlookAppOm.prototype.getUserIdentityTokenAsync=function(){for(var i=[],n=0;n32768){var f=window.OSF.DDA.OutlookAppOm._instance$p.createAsyncResult(null,1,9019,n._asyncContext$p$0,"");var e=this;window.setTimeout(function(){n._callback$p$0(f)},0);return}window.OSF.DDA.OutlookAppOm._instance$p.get__appName$i$0()===64?this._saveSettingsForOwa$p$0(n._callback$p$0,n._asyncContext$p$0):this._saveSettingsForOutlook$p$0(n._callback$p$0,n._asyncContext$p$0)};Type.registerNamespace("$h");var r=window.$h||{};Type.registerNamespace("Office.cast");var f=window.Office||{};f.cast=f.cast||{};r.AdditionalGlobalParameters=function(n){this._parameterBlobSupported$p$0=n;this._itemNumber$p$0=0};r.AdditionalGlobalParameters.prototype={_parameterBlobSupported$p$0:!1,_itemNumber$p$0:0,setCurrentItemNumber:function(n){n>0&&(this._itemNumber$p$0=n)},get_itemNumber:function(){return this._itemNumber$p$0},updateOutlookExecuteParameters:function(n,t){if(this._parameterBlobSupported$p$0){this._itemNumber$p$0>0&&(t.itemNumber=this._itemNumber$p$0.toString());if(!Object.keys(t).length)return;n.val||(n.val=[]);n.val.push(window.JSON.stringify(t))}}};r.Appointment=function(n){this.$$d__getOrganizer$p$2=Function.createDelegate(this,this._getOrganizer$p$2);this.$$d__getNormalizedSubject$p$2=Function.createDelegate(this,this._getNormalizedSubject$p$2);this.$$d__getSubject$p$2=Function.createDelegate(this,this._getSubject$p$2);this.$$d__getResources$p$2=Function.createDelegate(this,this._getResources$p$2);this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2);this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2);this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2);this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2);this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2);r.Appointment.initializeBase(this,[n]);r.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2);r.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2);r.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2);r.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"resources",this.$$d__getResources$p$2);r.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2);r.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2);r.InitialData._defineReadOnlyProperty$i(this,"organizer",this.$$d__getOrganizer$p$2)};r.Appointment.prototype={getItemType:function(){return window.Microsoft.Office.WebExtension.MailboxEnums.ItemType.Appointment},_getStart$p$2:function(){return this._data$p$0.get__start$i$0()},_getEnd$p$2:function(){return this._data$p$0.get__end$i$0()},_getLocation$p$2:function(){return this._data$p$0.get__location$i$0()},_getOptionalAttendees$p$2:function(){return this._data$p$0.get__cc$i$0()},_getRequiredAttendees$p$2:function(){return this._data$p$0.get__to$i$0()},_getResources$p$2:function(){return this._data$p$0.get__resources$i$0()},_getSubject$p$2:function(){return this._data$p$0.get__subject$i$0()},_getNormalizedSubject$p$2:function(){return this._data$p$0.get__normalizedSubject$i$0()},_getOrganizer$p$2:function(){return this._data$p$0.get__organizer$i$0()}};r.Appointment.prototype.getEntities=function(){return this._data$p$0._getEntities$i$0()};r.Appointment.prototype.getEntitiesByType=function(n){return this._data$p$0._getEntitiesByType$i$0(n)};r.Appointment.prototype.getSelectedEntities=function(){return this._data$p$0._getSelectedEntities$i$0()};r.Appointment.prototype.getRegExMatches=function(){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches");return this._data$p$0._getRegExMatches$i$0()};r.Appointment.prototype.getFilteredEntitiesByName=function(n){return this._data$p$0._getFilteredEntitiesByName$i$0(n)};r.Appointment.prototype.getRegExMatchesByName=function(n){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName");return this._data$p$0._getRegExMatchesByName$i$0(n)};r.Appointment.prototype.getSelectedRegExMatches=function(){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedRegExMatches");return this._data$p$0._getSelectedRegExMatches$i$0()};r.Appointment.prototype.displayReplyForm=function(n){window.OSF.DDA.OutlookAppOm._instance$p._displayReplyForm$i$0(n)};r.Appointment.prototype.displayReplyAllForm=function(n){window.OSF.DDA.OutlookAppOm._instance$p._displayReplyAllForm$i$0(n)};r.AppointmentCompose=function(n){this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2);this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2);this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2);this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2);this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2);r.AppointmentCompose.initializeBase(this,[n]);r.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2);r.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2);r.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2)};r.AppointmentCompose.prototype={_requiredAttendees$p$2:null,_optionalAttendees$p$2:null,_start$p$2:null,_end$p$2:null,_location$p$2:null,getItemType:function(){return window.Microsoft.Office.WebExtension.MailboxEnums.ItemType.Appointment},_getRequiredAttendees$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._requiredAttendees$p$2||(this._requiredAttendees$p$2=new r.ComposeRecipient(0,"requiredAttendees"));return this._requiredAttendees$p$2},_getOptionalAttendees$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._optionalAttendees$p$2||(this._optionalAttendees$p$2=new r.ComposeRecipient(1,"optionalAttendees"));return this._optionalAttendees$p$2},_getStart$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._start$p$2||(this._start$p$2=new r.ComposeTime(1));return this._start$p$2},_getEnd$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._end$p$2||(this._end$p$2=new r.ComposeTime(2));return this._end$p$2},_getLocation$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._location$p$2||(this._location$p$2=new r.ComposeLocation);return this._location$p$2}};r.AttachmentConstants=function(){};r.AttachmentDetails=function(n){this.$$d__getIsInline$p$0=Function.createDelegate(this,this._getIsInline$p$0);this.$$d__getAttachmentType$p$0=Function.createDelegate(this,this._getAttachmentType$p$0);this.$$d__getSize$p$0=Function.createDelegate(this,this._getSize$p$0);this.$$d__getContentType$p$0=Function.createDelegate(this,this._getContentType$p$0);this.$$d__getName$p$0=Function.createDelegate(this,this._getName$p$0);this.$$d__getId$p$0=Function.createDelegate(this,this._getId$p$0);this._data$p$0=n;r.InitialData._defineReadOnlyProperty$i(this,"id",this.$$d__getId$p$0);r.InitialData._defineReadOnlyProperty$i(this,"name",this.$$d__getName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"contentType",this.$$d__getContentType$p$0);r.InitialData._defineReadOnlyProperty$i(this,"size",this.$$d__getSize$p$0);r.InitialData._defineReadOnlyProperty$i(this,"attachmentType",this.$$d__getAttachmentType$p$0);r.InitialData._defineReadOnlyProperty$i(this,"isInline",this.$$d__getIsInline$p$0)};r.AttachmentDetails.prototype={_data$p$0:null,_getId$p$0:function(){return this._data$p$0.id},_getName$p$0:function(){return this._data$p$0.name},_getContentType$p$0:function(){return this._data$p$0.contentType},_getSize$p$0:function(){return this._data$p$0.size},_getAttachmentType$p$0:function(){var n=this._data$p$0.attachmentType;return n255)throw Error.argumentOutOfRange("recipients",n.length,window._u.ExtensibilityStrings.l_DisplayNameTooLong_Text);if(t&&t.length>571)throw Error.argumentOutOfRange("recipients",t.length,window._u.ExtensibilityStrings.l_EmailAddressTooLong_Text);};r.ComposeRecipient._getAsyncFormatter$p=function(n){for(var u=n,i=[],t=0;t864e13)throw Error.argumentOutOfRange("dateTime");var i=r.CommonParameters.parse(u,!1);window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(25,{TimeProperty:this._timeType$p$0,time:n.getTime()},null,i._asyncContext$p$0,i._callback$p$0)};r.ComposeTime.TimeType=function(){};r.ComposeTime.TimeType.prototype={start:1,end:2};r.ComposeTime.TimeType.registerEnum("$h.ComposeTime.TimeType",!1);r.Contact=function(n){this.$$d__getContactString$p$0=Function.createDelegate(this,this._getContactString$p$0);this.$$d__getAddresses$p$0=Function.createDelegate(this,this._getAddresses$p$0);this.$$d__getUrls$p$0=Function.createDelegate(this,this._getUrls$p$0);this.$$d__getEmailAddresses$p$0=Function.createDelegate(this,this._getEmailAddresses$p$0);this.$$d__getPhoneNumbers$p$0=Function.createDelegate(this,this._getPhoneNumbers$p$0);this.$$d__getBusinessName$p$0=Function.createDelegate(this,this._getBusinessName$p$0);this.$$d__getPersonName$p$0=Function.createDelegate(this,this._getPersonName$p$0);this._data$p$0=n;r.InitialData._defineReadOnlyProperty$i(this,"personName",this.$$d__getPersonName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"businessName",this.$$d__getBusinessName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0);r.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0);r.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0);r.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0);r.InitialData._defineReadOnlyProperty$i(this,"contactString",this.$$d__getContactString$p$0)};r.Contact.prototype={_data$p$0:null,_phoneNumbers$p$0:null,_getPersonName$p$0:function(){return this._data$p$0.PersonName},_getBusinessName$p$0:function(){return this._data$p$0.BusinessName},_getAddresses$p$0:function(){return r.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses")},_getEmailAddresses$p$0:function(){return r.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses")},_getUrls$p$0:function(){return r.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls")},_getPhoneNumbers$p$0:function(){if(!this._phoneNumbers$p$0){var n=this;this._phoneNumbers$p$0=r.Entities._getExtractedObjects$i(r.PhoneNumber,this._data$p$0,"PhoneNumbers",function(n){return new r.PhoneNumber(n)})}return this._phoneNumbers$p$0},_getContactString$p$0:function(){return this._data$p$0.ContactString}};r.CustomProperties=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");if(Array.isInstanceOfType(n)){var t=n;if(t.length>0)this._data$p$0=t[0];else throw Error.argument("data");}else this._data$p$0=n};r.CustomProperties.prototype={_data$p$0:null};r.CustomProperties.prototype.get=function(n){var i=this._data$p$0[n];if(typeof i=="string"){var t=i;if(t.length>6&&t.startsWith("Date(")&&t.endsWith(")")){var f=t.substring(5,t.length-1);var r=window.parseInt(f);if(!window.isNaN(r)){var u=new Date(r);u&&(i=u)}}}return i};r.CustomProperties.prototype.set=function(n,t){window.OSF.OUtil.isDate(t)&&(t="Date("+t.getTime()+")");this._data$p$0[n]=t};r.CustomProperties.prototype.remove=function(n){delete this._data$p$0[n]};r.CustomProperties.prototype.saveAsync=function(){for(var i=[],n=0;nf)throw Error.argument();var t=r.CommonParameters.parse(i,!1,!0);var u=new r.SaveDictionaryRequest(t._callback$p$0,t._asyncContext$p$0);u._sendRequest$i$0(4,"SaveCustomProperties",{customProperties:this._data$p$0})};r.Diagnostics=function(n,t){this.$$d__getOwaView$p$0=Function.createDelegate(this,this._getOwaView$p$0);this.$$d__getHostVersion$p$0=Function.createDelegate(this,this._getHostVersion$p$0);this.$$d__getHostName$p$0=Function.createDelegate(this,this._getHostName$p$0);this._data$p$0=n;this._appName$p$0=t;r.InitialData._defineReadOnlyProperty$i(this,"hostName",this.$$d__getHostName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"hostVersion",this.$$d__getHostVersion$p$0);64===this._appName$p$0&&r.InitialData._defineReadOnlyProperty$i(this,"OWAView",this.$$d__getOwaView$p$0)};r.Diagnostics.prototype={_data$p$0:null,_appName$p$0:0,_getHostName$p$0:function(){switch(this._appName$p$0){case 8:return"Outlook";case 64:return"OutlookWebApp";case 65536:return"OutlookIOS";case 4194304:return"OutlookAndroid";default:return null}},_getHostVersion$p$0:function(){return this._data$p$0.get__hostVersion$i$0()},_getOwaView$p$0:function(){return this._data$p$0.get__owaView$i$0()}};r.EmailAddressDetails=function(n){this.$$d__getRecipientType$p$0=Function.createDelegate(this,this._getRecipientType$p$0);this.$$d__getAppointmentResponse$p$0=Function.createDelegate(this,this._getAppointmentResponse$p$0);this.$$d__getDisplayName$p$0=Function.createDelegate(this,this._getDisplayName$p$0);this.$$d__getEmailAddress$p$0=Function.createDelegate(this,this._getEmailAddress$p$0);this._data$p$0=n;r.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0);r.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0);r.ScriptHelpers.dictionaryContainsKey(n,"appointmentResponse")&&r.InitialData._defineReadOnlyProperty$i(this,"appointmentResponse",this.$$d__getAppointmentResponse$p$0);r.ScriptHelpers.dictionaryContainsKey(n,"recipientType")&&r.InitialData._defineReadOnlyProperty$i(this,"recipientType",this.$$d__getRecipientType$p$0)};r.EmailAddressDetails._createFromEmailUserDictionary$i=function(n){var t={};var u=n.Name;var i=n.UserId;t.name=u||r.EmailAddressDetails._emptyString$p;t.address=i||r.EmailAddressDetails._emptyString$p;return new r.EmailAddressDetails(t)};r.EmailAddressDetails.prototype={_data$p$0:null,_getEmailAddress$p$0:function(){return this._data$p$0.address},_getDisplayName$p$0:function(){return this._data$p$0.name},_getAppointmentResponse$p$0:function(){var n=this._data$p$0.appointmentResponse;return n=0;u--){for(var e=!1,f=u-1;f>=0;f--)if(i(t[u],t[f],r)){e=!0;break}e&&Array.removeAt(t,u)}return t};r.Entities.prototype={_dateTimeSent$p$0:null,_data$p$0:null,_filteredData$p$0:null,_filteredEntitiesCache$p$0:null,_permissionLevel$p$0:0,_taskSuggestions$p$0:null,_meetingSuggestions$p$0:null,_phoneNumbers$p$0:null,_contacts$p$0:null,_addresses$p$0:null,_emailAddresses$p$0:null,_urls$p$0:null,_flightReservations$p$0:null,_parcelDeliveries$p$0:null,_getByType$i$0:function(n){if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.MeetingSuggestion)return this._getMeetingSuggestions$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.TaskSuggestion)return this._getTaskSuggestions$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.Address)return this._getAddresses$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.PhoneNumber)return this._getPhoneNumbers$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.EmailAddress)return this._getEmailAddresses$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.Url)return this._getUrls$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.Contact)return this._getContacts$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.FlightReservations)return this._getFlightReservations$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.ParcelDeliveries)return this._getParcelDeliveries$p$0();return null},_getFilteredEntitiesByName$i$0:function(n){this._filteredEntitiesCache$p$0||(this._filteredEntitiesCache$p$0={});if(!r.ScriptHelpers.dictionaryContainsKey(this._filteredEntitiesCache$p$0,n)){for(var u=!1,i=0;i0)return new Date(n.getFullYear()+t._offset$i$1,0,1);break;default:break}return n};r.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p=function(n,t,i){if(t>-5&&t<5){var u=(i+6)%7+1;var r=7*t+(u-n.getDay());n.setDate(n.getDate()+r);return n}else{var r=(i-n.getDay())%7;r<0&&(r+=7);n.setDate(n.getDate()+r);return n}};r.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p=function(n,t){var e;var i;var u;e=n;if(t._tag$i$1<=0||t._tag$i$1>12||t._offset$i$1<=0||t._offset$i$1>5)return n;var o=(12+t._tag$i$1-e.getMonth()-1)%12;i=new Date(e.getFullYear(),e.getMonth()+o,1);if(t._modifier$i$1===1)if(t._offset$i$1===1&&i.getDay()!==6&&i.getDay())return i;else{u=new Date(i.getFullYear(),i.getMonth(),i.getDate());u.setDate(u.getDate()+(8-i.getDay())%7);i.getDay()!==6&&i.getDay()&&i.getDay()!==1&&u.setDate(u.getDate()-7);u.setDate(u.getDate()+7*(t._offset$i$1-1));return u.getMonth()+1!==t._tag$i$1?n:u}else{u=new Date(i.getFullYear(),i.getMonth(),r.MeetingSuggestionTimeDecoder._daysInMonth$p(i.getMonth(),i.getFullYear()));var f=1-u.getDay();f>0&&(f=f-7);u.setDate(u.getDate()+f);u.setDate(u.getDate()+7*(1-t._offset$i$1));return u.getMonth()+1!==t._tag$i$1?i.getDay()!==6&&i.getDay()?i:n:u}};r.MeetingSuggestionTimeDecoder._decode$p=function(n,t,i){var e=32767;t.val=null;i.val=0;if(!n)return!1;i.val=r.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p(n);var o=n.getTime()-i.val;var u=(o-r.MeetingSuggestionTimeDecoder._baseDate$p.getTime())/864e5;if(u<0)return!1;else if(u>=262144)return!1;else{var f=u>>15;u=u&e;switch(f){case 0:return r.MeetingSuggestionTimeDecoder._decodePreciseDate$p(u,t);case 1:return r.MeetingSuggestionTimeDecoder._decodeRelativeDate$p(u,t);default:return!1}}};r.MeetingSuggestionTimeDecoder._decodePreciseDate$p=function(n,t){var c=7;var o=15;var s=31;var h=127;var f=null;var u=0;var e=0;t.val=null;var i=n>>12&c;if((i&4)==4){f=n>>5&h;if((i&2)==2){if((i&1)==1)return!1;u=n>>1&o}}else{(i&2)==2&&(u=n>>8&o);(i&1)==1&&(e=n>>3&s)}t.val=new r._preciseDate(e,u,f);return!0};r.MeetingSuggestionTimeDecoder._decodeRelativeDate$p=function(n,t){var s=15;var o=63;var c=7;var h=3;var u=n&s;n>>=4;var i=r.MeetingSuggestionTimeDecoder._fromComplement$p(n&o,6);n>>=6;var e=n&c;n>>=3;var f=n&h;try{t.val=new r._relativeDate(f,i,e,u);return!0}catch(l){t.val=null;return!1}};r.MeetingSuggestionTimeDecoder._fromComplement$p=function(n,t){var i=1<2||!Function.isInstanceOfType(n[0]))return!1;f=n[0];i>1&&(u=n[1]);t.val=new r.CommonParameters(null,f,u);return!0};r.CommonParameters.prototype={_options$p$0:null,_callback$p$0:null,_asyncContext$p$0:null,get_options:function(){return this._options$p$0},get_callback:function(){return this._callback$p$0},get_asyncContext:function(){return this._asyncContext$p$0}};r.EwsRequest=function(n){r.EwsRequest.initializeBase(this,[n])};r.EwsRequest.prototype={readyState:1,status:0,statusText:null,onreadystatechange:null,responseText:null,get__statusCode$i$1:function(){return this.status},set__statusCode$i$1:function(n){this.status=n;return n},get__statusDescription$i$1:function(){return this.statusText},set__statusDescription$i$1:function(n){this.statusText=n;return n},get__requestState$i$1:function(){return this.readyState},set__requestState$i$1:function(n){this.readyState=n;return n},get_hasOnReadyStateChangeCallback:function(){return!r.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)},get__response$i$1:function(){return this.responseText},set__response$i$1:function(n){this.responseText=n;return n},send:function(n){this._checkSendConditions$i$1();r.ScriptHelpers.isNullOrUndefined(n)&&this._throwInvalidStateException$i$1();this._sendRequest$i$0(5,"EwsRequest",{body:n})},_callOnReadyStateChangeCallback$i$1:function(){r.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)||this.onreadystatechange()},_parseExtraResponseData$i$1:function(n){},executeExtraFailedResponseSteps:function(){}};r.InitialData=function(n){this._data$p$0=n;this._permissionLevel$p$0=this._calculatePermissionLevel$p$0()};r.InitialData._defineReadOnlyProperty$i=function(n,t,i){var r={get:i,configurable:!1};window.Object.defineProperty(n,t,r)};r.InitialData.prototype={_toRecipients$p$0:null,_ccRecipients$p$0:null,_attachments$p$0:null,_resources$p$0:null,_entities$p$0:null,_selectedEntities$p$0:null,_data$p$0:null,_permissionLevel$p$0:0,get__isRestIdSupported$i$0:function(){return this._data$p$0.isRestIdSupported},get__itemId$i$0:function(){return this._data$p$0.id},get__itemClass$i$0:function(){return this._data$p$0.itemClass},get__dateTimeCreated$i$0:function(){return new Date(this._data$p$0.dateTimeCreated)},get__dateTimeModified$i$0:function(){return new Date(this._data$p$0.dateTimeModified)},get__dateTimeSent$i$0:function(){return new Date(this._data$p$0.dateTimeSent)},get__subject$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();return this._data$p$0.subject},get__normalizedSubject$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();return this._data$p$0.normalizedSubject},get__internetMessageId$i$0:function(){return this._data$p$0.internetMessageId},get__conversationId$i$0:function(){return this._data$p$0.conversationId},get__sender$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();var n=this._data$p$0.sender;return r.ScriptHelpers.isNullOrUndefined(n)?null:new r.EmailAddressDetails(n)},get__from$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();var n=this._data$p$0.from;return r.ScriptHelpers.isNullOrUndefined(n)?null:new r.EmailAddressDetails(n)},get__to$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._toRecipients$p$0&&(this._toRecipients$p$0=this._createEmailAddressDetails$p$0("to"));return this._toRecipients$p$0},get__cc$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._ccRecipients$p$0&&(this._ccRecipients$p$0=this._createEmailAddressDetails$p$0("cc"));return this._ccRecipients$p$0},get__attachments$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._attachments$p$0&&(this._attachments$p$0=this._createAttachmentDetails$p$0());return this._attachments$p$0},get__ewsUrl$i$0:function(){return this._data$p$0.ewsUrl},get__restUrl$i$0:function(){return this._data$p$0.restUrl},get__marketplaceAssetId$i$0:function(){return this._data$p$0.marketplaceAssetId},get__extensionId$i$0:function(){return this._data$p$0.extensionId},get__marketplaceContentMarket$i$0:function(){return this._data$p$0.marketplaceContentMarket},get__consentMetadata$i$0:function(){return this._data$p$0.consentMetadata},get__isRead$i$0:function(){return this._data$p$0.isRead},get__endNodeUrl$i$0:function(){return this._data$p$0.endNodeUrl},get__entryPointUrl$i$0:function(){return this._data$p$0.entryPointUrl},get__start$i$0:function(){return new Date(this._data$p$0.start)},get__end$i$0:function(){return new Date(this._data$p$0.end)},get__location$i$0:function(){return this._data$p$0.location},get__userProfileType$i$0:function(){return this._data$p$0.userProfileType},get__resources$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._resources$p$0&&(this._resources$p$0=this._createEmailAddressDetails$p$0("resources"));return this._resources$p$0},get__organizer$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();var n=this._data$p$0.organizer;return r.ScriptHelpers.isNullOrUndefined(n)?null:new r.EmailAddressDetails(n)},get__userDisplayName$i$0:function(){return this._data$p$0.userDisplayName},get__userEmailAddress$i$0:function(){return this._data$p$0.userEmailAddress},get__userTimeZone$i$0:function(){return this._data$p$0.userTimeZone},get__timeZoneOffsets$i$0:function(){return this._data$p$0.timeZoneOffsets},get__hostVersion$i$0:function(){return this._data$p$0.hostVersion},get__owaView$i$0:function(){return this._data$p$0.owaView},get__overrideWindowOpen$i$0:function(){return this._data$p$0.overrideWindowOpen},_getEntities$i$0:function(){this._entities$p$0||(this._entities$p$0=new r.Entities(this._data$p$0.entities,this._data$p$0.filteredEntities,this.get__dateTimeSent$i$0(),this._permissionLevel$p$0));return this._entities$p$0},_getSelectedEntities$i$0:function(){this._selectedEntities$p$0||(this._selectedEntities$p$0=new r.Entities(this._data$p$0.selectedEntities,null,this.get__dateTimeSent$i$0(),this._permissionLevel$p$0));return this._selectedEntities$p$0},_getEntitiesByType$i$0:function(n){var t=this._getEntities$i$0();return t._getByType$i$0(n)},_getFilteredEntitiesByName$i$0:function(n){var t=this._getEntities$i$0();return t._getFilteredEntitiesByName$i$0(n)},_getRegExMatches$i$0:function(){return this._data$p$0.regExMatches?this._data$p$0.regExMatches:null},_getSelectedRegExMatches$i$0:function(){return this._data$p$0.selectedRegExMatches?this._data$p$0.selectedRegExMatches:null},_getRegExMatchesByName$i$0:function(n){var t=this._getRegExMatches$i$0();return!t||!t[n]?null:t[n]},_throwOnRestrictedPermissionLevel$i$0:function(){window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0)},_createEmailAddressDetails$p$0:function(n){var i=this._data$p$0[n];if(r.ScriptHelpers.isNullOrUndefined(i))return[];for(var u=[],t=0;t0?i.push(t):t.tabIndex===0&&u.push(t):u.push(t)}i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;r===0&&(r=i.indexOf(n)-i.indexOf(t));return r});return[].concat(i,u)}return{set_entropy:function(n){if(typeof n=="string")for(var i=0;i6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(r)===OSF.DDA.SettingsManager.DataJSONSuffix){i=new Date(parseInt(t.slice(5,r)));if(i)return i}return t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,i);f[u]=t}catch(e){}}return f},loadScript:function(r,u,f){if(r&&u){var c=window.document,e=v[r];if(e)e.loaded?u():e.pendingCallbacks.push(u);else{var o=c.createElement("script");o.type="text/javascript";e={loaded:t,pendingCallbacks:[u],timer:n};v[r]=e;var h=function(){if(e.timer!=n){clearTimeout(e.timer);delete e.timer}e.loaded=i;for(var u=e.pendingCallbacks.length,t=0;t1?c[c.length-1]:n;if(u&&o!=n){o.indexOf(rt)>=0&&(o=o.split(rt)[0]);o=decodeURIComponent(o)}var l=p();if(!f&&l){var s=window.name.indexOf(i);if(s>r){var h=window.name.indexOf(";",s);h==r&&(h=window.name.length);var a=window.name.substring(s,h);o?l.setItem(a,o):o=l.getItem(a)}}return o},getConversationId:function(){var i=window.location.search,t=n;if(i){var r=i.indexOf("&");t=r>0?i.substring(1,r):i.substr(1);if(t&&t.charAt(t.length-1)==="="){t=t.substring(0,t.length-1);t&&(t=decodeURIComponent(t))}}return t},getInfoItems:function(n){var t=n.split("$");typeof t[1]==c&&(t=n.split("|"));typeof t[1]==c&&(t=n.split("%7C"));return t},getXdmFieldValue:function(n,t){var r=u,f=OSF.OUtil.parseXdmInfo(t);if(f){var i=OSF.OUtil.getInfoItems(f);if(i!=undefined&&i.length>=3)switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]);if(u)throw u;for(var f in r){u=Function._validateParameter(n[f],r[f],f);if(u)throw u;}},writeProfilerMark:function(n){if(window.msWriteProfilerMark){window.msWriteProfilerMark(n);OsfMsAjaxFactory.msAjaxDebug.trace(n)}},outputDebug:function(n){typeof OsfMsAjaxFactory!==c&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){r=r||{};for(var e in u){var f=u[e];r[f]==undefined&&(r[f]=i)}Object.defineProperty(n,t,r);return n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[h])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[h])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[it,h,tt])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[it,h,tt])},finalizeProperties:function(n,r){r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8;e=o&255;i[t++]=r>>2;i[t++]=(r&3)<<4|f>>4;i[t++]=(f&15)<<2|e>>6;i[t++]=e&63;if(!isNaN(o)){r=o>>8;f=h&255;e=h>>8;i[t++]=r>>2;i[t++]=(r&3)<<4|f>>4;i[t++]=(f&15)<<2|e>>6;i[t++]=e&63}if(isNaN(o))i[t-1]=64;else if(isNaN(h)){i[t-2]=64;i[t-1]=64}for(var c=0;c0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(var u=[],r=0;rn)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};u=d(u);s=f?u.length-1:0;if(u.length===0)return n;while(!h&&s>=0&&sn)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};u=d(u);v=y(u,f);s=l(u.length,v,e);if(s<0)return n;while(!c&&s>=0&&s0;t++){(t==8||t==12||t==16||t==20)&&(i+="-");i+=n[r%16];r=Math.floor(r/16)}for(;t<32;t++){(t==8||t==12||t==16||t==20)&&(i+="-");i+=n[Math.floor(Math.random()*16)]}return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3};OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",Reserved:"reserved",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidOpenBrowserWindow:102,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];if(i){i.name||(i.name=n[this.errorCodes.ooeInternalError].name);i.message||(i.message=n[this.errorCodes.ooeInternalError].message)}else i=n[this.errorCodes.ooeInternalError];return i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:t.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:t.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:t.L_SSOConnectionLostError,message:t.L_SSOConnectionLostErrorMessage}}}}();var OfficeExt;(function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}();n.RequirementVersion=ut;var r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){if(n==undefined)return!1;t==undefined&&(t=0);var f=this._setMap,u=f._sets;if(u.hasOwnProperty(n.toLowerCase())){var e=u[n.toLowerCase()];try{var i=this._getVersion(e);t=t+"";var r=this._getVersion(t);if(i.major>0&&i.major>r.major||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),r=0,i=0;if(t.length<2&&isNaN(Number(n)))throw u;else{r=Number(t[0]);t.length>=2&&(i=Number(t[1]));if(isNaN(r)||isNaN(i))throw u;}return{minor:i,major:r}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;var i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;var k=function(n){__extends(i,n);function i(){n.call(this,{dialogapi:t})}return i}(i);n.DefaultDialogSetRequirement=k;var o=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return i}(i);n.ExcelClientDefaultSetRequirement=o;var d=function(n){__extends(i,n);function i(){n.call(this);this._addSetMap({imagecoercion:t})}return i}(o);n.ExcelClientV1DefaultSetRequirement=d;var w=function(n){__extends(t,n);function t(){n.call(this,{mailbox:1.3})}return t}(i);n.OutlookClientDefaultSetRequirement=w;var f=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return i}(i);n.WordClientDefaultSetRequirement=f;var b=function(n){__extends(i,n);function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return i}(f);n.WordClientV1DefaultSetRequirement=b;var e=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return i}(i);n.PowerpointClientDefaultSetRequirement=e;var tt=function(n){__extends(i,n);function i(){n.call(this);this._addSetMap({imagecoercion:t})}return i}(e);n.PowerpointClientV1DefaultSetRequirement=tt;var it=function(n){__extends(i,n);function i(){n.call(this,{selection:t,textcoercion:t})}return i}(i);n.ProjectClientDefaultSetRequirement=it;var g=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return i}(i);n.ExcelWebDefaultSetRequirement=g;var nt=function(n){__extends(i,n);function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return i}(i);n.WordWebDefaultSetRequirement=nt;var h=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,settings:t})}return i}(i);n.PowerpointWebDefaultSetRequirement=h;var s=function(n){__extends(t,n);function t(){n.call(this,{mailbox:1.3})}return t}(i);n.OutlookWebDefaultSetRequirement=s;var l=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return i}(i);n.SwayWebDefaultSetRequirement=l;var c=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return i}(i);n.AccessWebDefaultSetRequirement=c;var y=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return i}(i);n.ExcelIOSDefaultSetRequirement=y;var u=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return i}(i);n.WordIOSDefaultSetRequirement=u;var p=function(n){__extends(t,n);function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return t}(u);n.WordIOSV1DefaultSetRequirement=p;var a=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return i}(i);n.PowerpointIOSDefaultSetRequirement=a;var v=function(n){__extends(i,n);function i(){n.call(this,{mailbox:t})}return i}(i);n.OutlookIOSDefaultSetRequirement=v;var rt=function(){var t="undefined";function n(){}n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)};n.getDefaultRequirementMatrix=function(u){this.initializeDefaultSetMatrix();var f=undefined,o=u.get_requirementMatrix();if(o!=undefined&&o.length>0&&typeof JSON!==t){var s=JSON.parse(u.get_requirementMatrix().toLowerCase());f=new r(new i(s))}else{var e=n.getClientFullVersionString(u);f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[e]!=undefined?new r(n.DefaultSetArrayMatrix[e]):new r(new i({}))}return f};n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix();if(f!=undefined&&f.length>0&&typeof JSON!==t){var e=JSON.parse(n.get_requirementMatrix().toLowerCase());u=new r(new i(e))}else u=new r(new k);return u};n.getClientFullVersionString=function(n){var r=n.get_appMinorVersion(),u="",i="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;if(f&&n.get_appVersion()==1)i=t==4096&&r>=15?"16.00.01":"16.00";else if(n.get_appName()==64)i=n.get_appVersion();else{u=r<10?"0"+r:""+r;i=n.get_appVersion()+"."+u}return n.get_appName()+"-"+i};n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new o;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new d;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new b;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new tt;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new w;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new g;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new nt;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new s;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new s;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new it;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new c;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new h;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new y;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new l;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new u;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new p;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new a;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new v};n.Excel_RCLIENT_1600="1-16.00";n.Excel_RCLIENT_1601="1-16.01";n.Word_RCLIENT_1600="2-16.00";n.Word_RCLIENT_1601="2-16.01";n.PowerPoint_RCLIENT_1600="4-16.00";n.PowerPoint_RCLIENT_1601="4-16.01";n.Outlook_RCLIENT_1600="8-16.00";n.Excel_WAC_1600="16-16.00";n.Word_WAC_1600="32-16.00";n.Outlook_WAC_1600="64-16.00";n.Outlook_WAC_1601="64-16.01";n.Project_RCLIENT_1600="128-16.00";n.Access_WAC_1600="256-16.00";n.PowerPoint_WAC_1600="512-16.00";n.Excel_IOS_1600="1024-16.00";n.SWAY_WAC_1600="2048-16.00";n.Word_IOS_1600="4096-16.00";n.Word_IOS_16001="4096-16.00.01";n.PowerPoint_IOS_1600="8192-16.00";n.Outlook_IOS_1600="65536-16.00";n.DefaultSetArrayMatrix={};return n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))})(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda();var OfficeExt;(function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n};n.getInstance=function(){n.hostObj===undefined&&(n.hostObj=new n);return n.hostObj};n.prototype.getPlatform=function(){var n=this;if(n.hostInfo.hostPlatform){var t=n.hostInfo.hostPlatform.toLowerCase();if(n.platformRemappings[t])return n.platformRemappings[t]}return null};n.prototype.getHost=function(){var n=this;if(n.hostInfo.hostType){var t=n.hostInfo.hostType.toLowerCase();if(n.camelCaseMappings[t])return n.camelCaseMappings[t];t=n.capitalizeFirstLetter(n.hostInfo.hostType);if(Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null};n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null};return n}();n.Host=t})(t=n.HostName||(n.HostName={}))})(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){if(!n){window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window);window.Office=Microsoft.Office.WebExtension;n=!0}},disableShortcut:function(){if(n){t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window);n=!1}}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i;if(n&&typeof n=="string"){var r=n.indexOf("#");if(r!=-1){var o=n.substring(0,r),e=n.substring(r+1);switch(o){case"binding":case"bindings":e&&(i=new OSF.DDA.BindingPromise(e))}}}if(i){i.onFail=t;return i}else if(t){var u=typeof t;if(u=="function"){var f={};f[Microsoft.Office.WebExtension.Parameters.Callback]=t;OSF.DDA.issueAsyncResult(f,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,u);}};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.auth&&OSF.OUtil.defineEnumerableProperty(f,"auth",{value:n.auth});if(n.get_isDialog()){var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n);OSF.OUtil.defineEnumerableProperty(f,o,{value:e})}else{t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t});if(r){var s=r.displayName||"appOM";delete r.displayName;OSF.OUtil.defineEnumerableProperty(f,s,{value:r})}u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}});var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n);OSF.OUtil.defineEnumerableProperty(f,o,{value:e})}};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});var u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext());return n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,o=n.length,e=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){for(var u in n){var i=n[u],r=t[u];if(i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw e();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw e();}};f.extractRequiredArguments=function(t,i,r){if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var f,e,l=n.length-1;l>=s;l--){var c=n[l];switch(typeof c){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=c;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=c;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}f=o.fillOptions(f,i,r,u);if(e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;o.verifyArguments(t,f);return f}this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),f=c(n,r,t,i);return o.constructCallArgs(r,f,t,i)};this.processResponse=function(n,t,i,f){var e;e=n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n);return e};this.getCallArgs=function(n){for(var t,u,r=n.length-1;r>=s;r--){var i=n[r];switch(typeof i){case"object":t=i;break;case h:u=i}}t=t||{};u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u);return t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var i=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],t=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],i,t,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback];if(f){var u={};u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext];var r;if(t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)u[OSF.DDA.AsyncResultEnum.Properties.Value]=i;else{r={};i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i;r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i}f(new OSF.DDA.AsyncResult(u,r))}};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){for(var t in n){var i={};OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}});OSF.DDA.SyncMethodNames[t]=i}};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);function o(n,i,r,u){if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var o,c,s=n.length-1;s>=e;s--){var h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}o=f.fillOptions(o,i,r,u);f.verifyArguments(t,o);return o}this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),e=o(n,r,t,i);return f.constructCallArgs(r,e,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){var l="fromHost",i=this,o="toHost",f=l,a="sourceData",u="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];function e(i,u){var a=i?{}:undefined;for(var h in i){var s=i[h],o;if(OSF.DDA.ListType.isListType(h)){o=[];for(var v in s)o.push(e(s[v],u))}else if(OSF.OUtil.listContainsKey(r,h))o=r[h][u](s);else if(u==f&&n.preserveNesting(h))o=e(s,u);else{var c=t[h];if(c){var l=c[u];if(l){o=l[s];o===undefined&&(o=s)}}else o=s}a[h]=o}return a}function c(i,r){var s;for(var f in r){var e;e=n.isComplexType(f)?c(i,t[f][o]):i[f];if(e!=undefined){s||(s={});var h=r[f];h==u&&(h=f);s[h]=n.pack(f,e)}}return s}function s(i,r,e){e||(e={});for(var h in r){var l=r[h],o;if(l==u)o=i;else if(l==a){e[h]=i.toArray();continue}else o=i[l];if(o===null||o===undefined)e[h]=undefined;else{o=n.unpack(h,o);var c;if(n.isComplexType(h)){c=t[h][f];n.preserveNesting(h)?e[h]=s(o,c):s(o,c,e)}else if(OSF.DDA.ListType.isListType(h)){c={};var p=OSF.DDA.ListType.getDescriptor(h);c[p]=u;var v=new Array(o.length);for(var y in o)v[y]=s(o[y],c);e[h]=v}else e[h]=o}}return e}function h(n,i,r){var f=t[n][r],u;if(r=="toHost"){var h=e(i,r);u=c(h,f)}else if(r==l){var o=s(i,f);u=e(o,r)}return u}t||(t={});i.addMapping=function(n,i){var e,s;if(i.map){e=i.map;s={};for(var c in e){var l=e[c];l==u&&(l=c);s[l]=c}}else{e=i.toHost;s=i.fromHost}var r=t[n];if(r){var h=r[o];for(var v in h)e[v]=h[v];h=r[f];for(var a in h)s[a]=h[a]}else r=t[n]={};r[o]=e;r[f]=s};i.toHost=function(n,t){return h(n,t,o)};i.fromHost=function(n,t){return h(n,t,f)};i.self=u;i.sourceData=a;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset);OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]));return OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){var r;r=this.isDynamicType(n)?t[n].toHost(i):i;return r};i.unpack=function(n,i){var r;r=this.isDynamicType(n)?t[n].fromHost(i):i;return r}};OSF.DDA.getDecoratedParameterMap=function(n,t){var i=new OSF.DDA.HostParameterMap(n),f=i.self;function r(n){var i=null;if(n){i={};for(var r=n.length,t=0;t1?i=r+c+t:f.length>0&&(i=r+o+h+t);return e?[i,u,e].join(""):i}n.addHostInfoAsQueryParam=f;function i(n){if(!n)return null;var t=document.createElement("a");t.href=n;return t.protocol+"//"+t.host}n.getDomainForUrl=i;function r(){try{for(var i=["Windows NT 6.1","Windows NT 6.2","Windows NT 6.3"],u=window.navigator.userAgent,n=0,r=i.length;n-1)return t();return!1}catch(f){OsfMsAjaxFactory.msAjaxDebug.trace("Error happens in shouldUseLocalStorageToPassMessage: "+f);return!1}}n.shouldUseLocalStorageToPassMessage=r;function t(){try{var n=window.navigator.userAgent;return n.indexOf("MSIE ")>-1||n.indexOf("Trident/")>-1||n.indexOf("Edge/")>-1}catch(t){OsfMsAjaxFactory.msAjaxDebug.trace("Error happens in isInternetExplorer: "+t);return!1}}n.isInternetExplorer=t})(t=n.WACUtils||(n.WACUtils={}))})(OfficeExt||(OfficeExt={}));OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Common",Microsoft.Office);Microsoft.Office.Common.InvokeType={async:0,sync:1,asyncRegisterEvent:2,asyncUnregisterEvent:3,syncRegisterEvent:4,syncUnregisterEvent:5};OSF.SerializerVersion={MsAjax:0,Browser:1};var OfficeExt;(function(n){function t(){return!1}n.appSpecificCheckOrigin=t})(OfficeExt||(OfficeExt={}));Microsoft.Office.Common.InvokeType={async:0,sync:1,asyncRegisterEvent:2,asyncUnregisterEvent:3,syncRegisterEvent:4,syncUnregisterEvent:5};Microsoft.Office.Common.InvokeResultCode={noError:0,errorInRequest:-1,errorHandlingRequest:-2,errorInResponse:-3,errorHandlingResponse:-4,errorHandlingRequestAccessDenied:-5,errorHandlingMethodCallTimedout:-6};Microsoft.Office.Common.MessageType={request:0,response:1};Microsoft.Office.Common.ActionType={invoke:0,registerEvent:1,unregisterEvent:2};Microsoft.Office.Common.ResponseType={forCalling:0,forEventing:1};Microsoft.Office.Common.MethodObject=function(n,t,i){this._method=n;this._invokeType=t;this._blockingOthers=i};Microsoft.Office.Common.MethodObject.prototype={getMethod:function(){return this._method},getInvokeType:function(){return this._invokeType},getBlockingFlag:function(){return this._blockingOthers}};Microsoft.Office.Common.EventMethodObject=function(n,t){this._registerMethodObject=n;this._unregisterMethodObject=t};Microsoft.Office.Common.EventMethodObject.prototype={getRegisterMethodObject:function(){return this._registerMethodObject},getUnregisterMethodObject:function(){return this._unregisterMethodObject}};Microsoft.Office.Common.ServiceEndPoint=function(n){var t=this,i=Function._validateParams(arguments,[{name:"serviceEndPointId",type:String,mayBeNull:!1}]);if(i)throw i;t._methodObjectList={};t._eventHandlerProxyList={};t._Id=n;t._conversations={};t._policyManager=null;t._appDomains={};t._onHandleRequestError=null};Microsoft.Office.Common.ServiceEndPoint.prototype={registerMethod:function(n,t,i,r){var e="invokeType",u=!1,f=Function._validateParams(arguments,[{name:"methodName",type:String,mayBeNull:u},{name:"method",type:Function,mayBeNull:u},{name:e,type:Number,mayBeNull:u},{name:"blockingOthers",type:Boolean,mayBeNull:u}]);if(f)throw f;if(i!==Microsoft.Office.Common.InvokeType.async&&i!==Microsoft.Office.Common.InvokeType.sync)throw OsfMsAjaxFactory.msAjaxError.argument(e);var o=new Microsoft.Office.Common.MethodObject(t,i,r);this._methodObjectList[n]=o},unregisterMethod:function(n){var t=Function._validateParams(arguments,[{name:"methodName",type:String,mayBeNull:!1}]);if(t)throw t;delete this._methodObjectList[n]},registerEvent:function(n,t,i){var r=!1,u=Function._validateParams(arguments,[{name:"eventName",type:String,mayBeNull:r},{name:"registerMethod",type:Function,mayBeNull:r},{name:"unregisterMethod",type:Function,mayBeNull:r}]);if(u)throw u;var f=new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(t,Microsoft.Office.Common.InvokeType.syncRegisterEvent,r),new Microsoft.Office.Common.MethodObject(i,Microsoft.Office.Common.InvokeType.syncUnregisterEvent,r));this._methodObjectList[n]=f},registerEventEx:function(n,t,i,r,u){var f=!1,e=Function._validateParams(arguments,[{name:"eventName",type:String,mayBeNull:f},{name:"registerMethod",type:Function,mayBeNull:f},{name:"registerMethodInvokeType",type:Number,mayBeNull:f},{name:"unregisterMethod",type:Function,mayBeNull:f},{name:"unregisterMethodInvokeType",type:Number,mayBeNull:f}]);if(e)throw e;var o=new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(t,i,f),new Microsoft.Office.Common.MethodObject(r,u,f));this._methodObjectList[n]=o},unregisterEvent:function(n){var t=Function._validateParams(arguments,[{name:"eventName",type:String,mayBeNull:!1}]);if(t)throw t;this.unregisterMethod(n)},registerConversation:function(n,t,i,r){var e="appDomains",u=!0,f=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:!1},{name:"conversationUrl",type:String,mayBeNull:!1,optional:u},{name:e,type:Object,mayBeNull:u,optional:u},{name:"serializerVersion",type:Number,mayBeNull:u,optional:u}]);if(f)throw f;if(i){if(!(i instanceof Array))throw OsfMsAjaxFactory.msAjaxError.argument(e);this._appDomains[n]=i}this._conversations[n]={url:t,serializerVersion:r}},unregisterConversation:function(n){var t=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:!1}]);if(t)throw t;delete this._conversations[n]},setPolicyManager:function(n){var i="policyManager",t=Function._validateParams(arguments,[{name:i,type:Object,mayBeNull:!1}]);if(t)throw t;if(!n.checkPermission)throw OsfMsAjaxFactory.msAjaxError.argument(i);this._policyManager=n},getPolicyManager:function(){return this._policyManager},dispose:function(){var t=null,n=this;n._methodObjectList=t;n._eventHandlerProxyList=t;n._Id=t;n._conversations=t;n._policyManager=t;n._appDomains=t;n._onHandleRequestError=t}};Microsoft.Office.Common.ClientEndPoint=function(n,t,i,r){var f="targetWindow",u=this,e=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:!1},{name:f,mayBeNull:!1},{name:"targetUrl",type:String,mayBeNull:!1},{name:"serializerVersion",type:Number,mayBeNull:!0,optional:!0}]);if(e)throw e;try{if(!t.postMessage)throw OsfMsAjaxFactory.msAjaxError.argument(f);}catch(o){if(!Object.prototype.hasOwnProperty.call(t,"postMessage"))throw OsfMsAjaxFactory.msAjaxError.argument(f);}u._conversationId=n;u._targetWindow=t;u._targetUrl=i;u._callingIndex=0;u._callbackList={};u._eventHandlerList={};u._serializerVersion=r!=null?r:OSF.SerializerVersion.Browser};Microsoft.Office.Common.ClientEndPoint.prototype={invoke:function(n,t,i){var r=this,e=Function._validateParams(arguments,[{name:"targetMethodName",type:String,mayBeNull:!1},{name:"callback",type:Function,mayBeNull:!0},{name:"param",mayBeNull:!0}]);if(e)throw e;var u=r._callingIndex++,h=new Date,f={callback:t,createdOn:h.getTime()};if(i&&typeof i=="object"&&typeof i.__timeout__=="number"){f.timeout=i.__timeout__;delete i.__timeout__}r._callbackList[u]=f;try{var s=new Microsoft.Office.Common.Request(n,Microsoft.Office.Common.ActionType.invoke,r._conversationId,u,i),o=Microsoft.Office.Common.MessagePackager.envelope(s,r._serializerVersion);r._targetWindow.postMessage(o,r._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer()}catch(c){try{t!==null&&t(Microsoft.Office.Common.InvokeResultCode.errorInRequest,c)}finally{delete r._callbackList[u]}}},registerForEvent:function(n,t,i,r){var u=this,e=Function._validateParams(arguments,[{name:"targetEventName",type:String,mayBeNull:!1},{name:"eventHandler",type:Function,mayBeNull:!1},{name:"callback",type:Function,mayBeNull:!0},{name:"data",mayBeNull:!0,optional:!0}]);if(e)throw e;var f=u._callingIndex++,h=new Date;u._callbackList[f]={callback:i,createdOn:h.getTime()};try{var s=new Microsoft.Office.Common.Request(n,Microsoft.Office.Common.ActionType.registerEvent,u._conversationId,f,r),o=Microsoft.Office.Common.MessagePackager.envelope(s,u._serializerVersion);u._targetWindow.postMessage(o,u._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer();u._eventHandlerList[n]=t}catch(c){try{i!==null&&i(Microsoft.Office.Common.InvokeResultCode.errorInRequest,c)}finally{delete u._callbackList[f]}}},unregisterForEvent:function(n,t,i){var r=this,f=Function._validateParams(arguments,[{name:"targetEventName",type:String,mayBeNull:!1},{name:"callback",type:Function,mayBeNull:!0},{name:"data",mayBeNull:!0,optional:!0}]);if(f)throw f;var u=r._callingIndex++,s=new Date;r._callbackList[u]={callback:t,createdOn:s.getTime()};try{var o=new Microsoft.Office.Common.Request(n,Microsoft.Office.Common.ActionType.unregisterEvent,r._conversationId,u,i),e=Microsoft.Office.Common.MessagePackager.envelope(o,r._serializerVersion);r._targetWindow.postMessage(e,r._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer()}catch(h){try{t!==null&&t(Microsoft.Office.Common.InvokeResultCode.errorInRequest,h)}finally{delete r._callbackList[u]}}finally{delete r._eventHandlerList[n]}}};Microsoft.Office.Common.XdmCommunicationManager=function(){var w="serviceEndPointId",e=!0,b="channel is not ready.",c="conversationId",d="Unknown conversation Id.",t=!1,n=null,h=[],l=n,f=n,k=10,o=t,u=n,ut=2e3,g=65e3,nt=g,r={},i={},a=t;function ct(n){for(var t in r)if(r[t]._conversations[n])return r[t];OsfMsAjaxFactory.msAjaxDebug.trace(d);throw OsfMsAjaxFactory.msAjaxError.argument(c);}function st(n){var t=i[n];t||OsfMsAjaxFactory.msAjaxDebug.trace(d);return t}function ot(t,i){var u=t._methodObjectList[i._actionName];if(!u){OsfMsAjaxFactory.msAjaxDebug.trace("The specified method is not registered on service endpoint:"+i._actionName);throw OsfMsAjaxFactory.msAjaxError.argument("messageObject");}var r=n;r=i._actionType===Microsoft.Office.Common.ActionType.invoke?u:i._actionType===Microsoft.Office.Common.ActionType.registerEvent?u.getRegisterMethodObject():u.getUnregisterMethodObject();return r}function et(n){h.push(n)}function lt(){if(f!==n){if(!o)if(h.length>0){var t=h.shift();p(t)}else{clearInterval(f);f=n}}else OsfMsAjaxFactory.msAjaxDebug.trace(b)}function p(n){o=n.getInvokeBlockingFlag();n.invoke();l=+new Date}function ht(){if(u){var r,o=0,s=new Date,f;for(var h in i){r=i[h];for(var e in r._callbackList){var t=r._callbackList[e];f=t.timeout?t.timeout:nt;if(f>=0&&Math.abs(s.getTime()-t.createdOn)>=f)try{t.callback&&t.callback(Microsoft.Office.Common.InvokeResultCode.errorHandlingMethodCallTimedout,n)}finally{delete r._callbackList[e]}else o++}}if(o===0){clearInterval(u);u=n}}else OsfMsAjaxFactory.msAjaxDebug.trace(b)}function ft(){o=t}function tt(n){if(window.addEventListener)window.addEventListener("message",n,t);else if(navigator.userAgent.indexOf("MSIE")>-1&&window.attachEvent)window.attachEvent("onmessage",n);else{OsfMsAjaxFactory.msAjaxDebug.trace("Browser doesn't support the required API.");throw OsfMsAjaxFactory.msAjaxError.argument("Browser");}}function it(n,i){var f=t;if(n===e)return e;if(!n||!i||!n.length||!i.length)return f;var r,u;r=document.createElement("a");u=document.createElement("a");r.href=n;u.href=i;f=v(r,u);delete r,u;return f}function s(n,i){var u=t;if(!i||!i.length||!n||!(n instanceof Array)||!n.length)return u;var f=document.createElement("a"),e=document.createElement("a");f.href=i;for(var r=0;rk)&&!o){p(w);b=t}else f=setInterval(lt,k);b&&et(w)}catch(wt){u&&u._onHandleRequestError&&u._onHandleRequestError(r,wt);var g=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequest;wt==rt&&(g=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied);var yt=new Microsoft.Office.Common.Response(r._actionName,r._conversationId,r._correlationId,g,Microsoft.Office.Common.ResponseType.forCalling,wt),ht=Microsoft.Office.Common.MessagePackager.envelope(yt,h),d=t;try{d=!!(i.source&&i.source.postMessage)}catch(wt){}d&&i.source.postMessage(ht,tt)}}else if(r._messageType===Microsoft.Office.Common.MessageType.response){var c=st(r._conversationId);if(!c)return;c._serializerVersion=h;if(!it(c._targetUrl,i.origin))throw"Failed orgin check";if(r._responseType===Microsoft.Office.Common.ResponseType.forCalling){var a=c._callbackList[r._correlationId];if(a)try{a.callback&&a.callback(r._errorCode,r._data)}finally{delete c._callbackList[r._correlationId]}}else{var y=c._eventHandlerList[r._actionName];y!==undefined&&y!==n&&y(r._data)}}else return}}function y(){if(!a){tt(rt);a=e}}return{connect:function(n,t,r,u){var f=i[n];if(!f){y();f=new Microsoft.Office.Common.ClientEndPoint(n,t,r,u);i[n]=f}return f},getClientEndPoint:function(n){var r=Function._validateParams(arguments,[{name:c,type:String,mayBeNull:t}]);if(r)throw r;return i[n]},createServiceEndPoint:function(n){y();var t=new Microsoft.Office.Common.ServiceEndPoint(n);r[n]=t;return t},getServiceEndPoint:function(n){var i=Function._validateParams(arguments,[{name:w,type:String,mayBeNull:t}]);if(i)throw i;return r[n]},deleteClientEndPoint:function(n){var r=Function._validateParams(arguments,[{name:c,type:String,mayBeNull:t}]);if(r)throw r;delete i[n]},deleteServiceEndPoint:function(n){var i=Function._validateParams(arguments,[{name:w,type:String,mayBeNull:t}]);if(i)throw i;delete r[n]},checkUrlWithAppDomains:function(n,t){return s(n,t)},_setMethodTimeout:function(n){var i=Function._validateParams(arguments,[{name:"methodTimeout",type:Number,mayBeNull:t}]);if(i)throw i;nt=n<=0?g:n},_startMethodTimeoutTimer:function(){u||(u=setInterval(ht,ut))}}}();Microsoft.Office.Common.Message=function(n,t,i,r,u){var e=!1,f=this,o=Function._validateParams(arguments,[{name:"messageType",type:Number,mayBeNull:e},{name:"actionName",type:String,mayBeNull:e},{name:"conversationId",type:String,mayBeNull:e},{name:"correlationId",mayBeNull:e},{name:"data",mayBeNull:!0,optional:!0}]);if(o)throw o;f._messageType=n;f._actionName=t;f._conversationId=i;f._correlationId=r;f._origin=window.location.href;f._data=typeof u=="undefined"?null:u};Microsoft.Office.Common.Message.prototype={getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getOrigin:function(){return this._origin},getData:function(){return this._data},getMessageType:function(){return this._messageType}};Microsoft.Office.Common.Request=function(n,t,i,r,u){Microsoft.Office.Common.Request.uber.constructor.call(this,Microsoft.Office.Common.MessageType.request,n,i,r,u);this._actionType=t};OSF.OUtil.extend(Microsoft.Office.Common.Request,Microsoft.Office.Common.Message);Microsoft.Office.Common.Request.prototype.getActionType=function(){return this._actionType};Microsoft.Office.Common.Response=function(n,t,i,r,u,f){Microsoft.Office.Common.Response.uber.constructor.call(this,Microsoft.Office.Common.MessageType.response,n,t,i,f);this._errorCode=r;this._responseType=u};OSF.OUtil.extend(Microsoft.Office.Common.Response,Microsoft.Office.Common.Message);Microsoft.Office.Common.Response.prototype.getErrorCode=function(){return this._errorCode};Microsoft.Office.Common.Response.prototype.getResponseType=function(){return this._responseType};Microsoft.Office.Common.MessagePackager={envelope:function(n){typeof n=="object"&&(n._serializerVersion=OSF.SerializerVersion.Browser);return JSON.stringify(n)},unenvelope:function(n){return JSON.parse(n)}};Microsoft.Office.Common.ResponseSender=function(n,t,i,r,u,f,e){var h=!1,o=this,c=Function._validateParams(arguments,[{name:"requesterWindow",mayBeNull:h},{name:"requesterUrl",type:String,mayBeNull:h},{name:"actionName",type:String,mayBeNull:h},{name:"conversationId",type:String,mayBeNull:h},{name:"correlationId",mayBeNull:h},{name:"responsetype",type:Number,maybeNull:h},{name:"serializerVersion",type:Number,maybeNull:!0,optional:!0}]);if(c)throw c;o._requesterWindow=n;o._requesterUrl=t;o._actionName=i;o._conversationId=r;o._correlationId=u;o._invokeResultCode=Microsoft.Office.Common.InvokeResultCode.noError;o._responseType=f;var s=o;o._send=function(n){try{var i=new Microsoft.Office.Common.Response(s._actionName,s._conversationId,s._correlationId,s._invokeResultCode,s._responseType,n),t=Microsoft.Office.Common.MessagePackager.envelope(i,e);s._requesterWindow.postMessage(t,s._requesterUrl)}catch(r){OsfMsAjaxFactory.msAjaxDebug.trace("ResponseSender._send error:"+r.message)}}};Microsoft.Office.Common.ResponseSender.prototype={getRequesterWindow:function(){return this._requesterWindow},getRequesterUrl:function(){return this._requesterUrl},getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getSend:function(){return this._send},setResultCode:function(n){this._invokeResultCode=n}};Microsoft.Office.Common.InvokeCompleteCallback=function(n,t,i,r,u,f,e){var s=this;Microsoft.Office.Common.InvokeCompleteCallback.uber.constructor.call(s,n,t,i,r,u,Microsoft.Office.Common.ResponseType.forCalling,e);s._postCallbackHandler=f;var o=s;s._send=function(n,t){t!=undefined&&(o._invokeResultCode=t);try{var r=new Microsoft.Office.Common.Response(o._actionName,o._conversationId,o._correlationId,o._invokeResultCode,o._responseType,n),i=Microsoft.Office.Common.MessagePackager.envelope(r,e);o._requesterWindow.postMessage(i,o._requesterUrl);o._postCallbackHandler()}catch(u){OsfMsAjaxFactory.msAjaxDebug.trace("InvokeCompleteCallback._send error:"+u.message)}}};OSF.OUtil.extend(Microsoft.Office.Common.InvokeCompleteCallback,Microsoft.Office.Common.ResponseSender);Microsoft.Office.Common.Invoker=function(n,t,i,r,u,f,e){var h=!0,s=!1,o=this,c=Function._validateParams(arguments,[{name:"methodObject",mayBeNull:s},{name:"paramValue",mayBeNull:h},{name:"invokeCompleteCallback",mayBeNull:s},{name:"eventHandlerProxyList",mayBeNull:h},{name:"conversationId",type:String,mayBeNull:s},{name:"eventName",type:String,mayBeNull:s},{name:"serializerVersion",type:Number,mayBeNull:h,optional:h}]);if(c)throw c;o._methodObject=n;o._param=t;o._invokeCompleteCallback=i;o._eventHandlerProxyList=r;o._conversationId=u;o._eventName=f;o._serializerVersion=e};Microsoft.Office.Common.Invoker.prototype={invoke:function(){var n=this;try{var t;switch(n._methodObject.getInvokeType()){case Microsoft.Office.Common.InvokeType.async:n._methodObject.getMethod()(n._param,n._invokeCompleteCallback.getSend());break;case Microsoft.Office.Common.InvokeType.sync:t=n._methodObject.getMethod()(n._param);n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.syncRegisterEvent:var r=n._createEventHandlerProxyObject(n._invokeCompleteCallback);t=n._methodObject.getMethod()(r.getSend(),n._param);n._eventHandlerProxyList[n._conversationId+n._eventName]=r.getSend();n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.syncUnregisterEvent:var f=n._eventHandlerProxyList[n._conversationId+n._eventName];t=n._methodObject.getMethod()(f,n._param);delete n._eventHandlerProxyList[n._conversationId+n._eventName];n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.asyncRegisterEvent:var i=n._createEventHandlerProxyObject(n._invokeCompleteCallback);n._methodObject.getMethod()(i.getSend(),n._invokeCompleteCallback.getSend(),n._param);n._eventHandlerProxyList[n._callerId+n._eventName]=i.getSend();break;case Microsoft.Office.Common.InvokeType.asyncUnregisterEvent:var u=n._eventHandlerProxyList[n._callerId+n._eventName];n._methodObject.getMethod()(u,n._invokeCompleteCallback.getSend(),n._param);delete n._eventHandlerProxyList[n._callerId+n._eventName]}}catch(e){n._invokeCompleteCallback.setResultCode(Microsoft.Office.Common.InvokeResultCode.errorInResponse);n._invokeCompleteCallback.getSend()(e)}},getInvokeBlockingFlag:function(){return this._methodObject.getBlockingFlag()},_createEventHandlerProxyObject:function(n){return new Microsoft.Office.Common.ResponseSender(n.getRequesterWindow(),n.getRequesterUrl(),n.getActionName(),n.getConversationId(),n.getCorrelationId(),Microsoft.Office.Common.ResponseType.forEventing,this._serializerVersion)}};OSF.OUtil.setNamespace("WAC",OSF.DDA);OSF.DDA.WAC.UniqueArguments={Data:"Data",Properties:"Properties",BindingRequest:"DdaBindingsMethod",BindingResponse:"Bindings",SingleBindingResponse:"singleBindingResponse",GetData:"DdaGetBindingData",AddRowsColumns:"DdaAddRowsColumns",SetData:"DdaSetBindingData",ClearFormats:"DdaClearBindingFormats",SetFormats:"DdaSetBindingFormats",SettingsRequest:"DdaSettingsMethod",BindingEventSource:"ddaBinding",ArrayData:"ArrayData"};OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC);OSF.DDA.WAC.Delegate.SpecialProcessor=function(){var t=[OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,OSF.DDA.WAC.UniqueArguments.BindingRequest,OSF.DDA.WAC.UniqueArguments.BindingResponse,OSF.DDA.WAC.UniqueArguments.GetData,OSF.DDA.WAC.UniqueArguments.AddRowsColumns,OSF.DDA.WAC.UniqueArguments.SetData,OSF.DDA.WAC.UniqueArguments.ClearFormats,OSF.DDA.WAC.UniqueArguments.SetFormats,OSF.DDA.WAC.UniqueArguments.SettingsRequest,OSF.DDA.WAC.UniqueArguments.BindingEventSource],n={};OSF.DDA.WAC.Delegate.SpecialProcessor.uber.constructor.call(this,t,n)};OSF.OUtil.extend(OSF.DDA.WAC.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.WAC.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.WAC.Delegate.SpecialProcessor,[]);OSF.OUtil.setNamespace("WAC",OSF.DDA);OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC);OSF.DDA.WAC.getDelegateMethods=function(){var n={};n[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.WAC.Delegate.executeAsync;n[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.WAC.Delegate.registerEventAsync;n[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.WAC.Delegate.unregisterEventAsync;n[OSF.DDA.DispIdHost.Delegates.OpenDialog]=OSF.DDA.WAC.Delegate.openDialog;n[OSF.DDA.DispIdHost.Delegates.MessageParent]=OSF.DDA.WAC.Delegate.messageParent;n[OSF.DDA.DispIdHost.Delegates.SendMessage]=OSF.DDA.WAC.Delegate.sendMessage;n[OSF.DDA.DispIdHost.Delegates.CloseDialog]=OSF.DDA.WAC.Delegate.closeDialog;return n};OSF.DDA.WAC.Delegate.version=1;OSF.DDA.WAC.Delegate.executeAsync=function(n){n.hostCallArgs||(n.hostCallArgs={});n.hostCallArgs.DdaMethod={ControlId:OSF._OfficeAppFactory.getId(),Version:OSF.DDA.WAC.Delegate.version,DispatchId:n.dispId};n.hostCallArgs.__timeout__=-1;n.onCalling&&n.onCalling();OSF.getClientEndPoint()&&OSF.getClientEndPoint().invoke("executeMethod",function(t,i){n.onReceiving&&n.onReceiving();var r;if(t==Microsoft.Office.Common.InvokeResultCode.noError){OSF.DDA.WAC.Delegate.version=i.Version;r=i.Error}else switch(t){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:r=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:r=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}n.onComplete&&n.onComplete(r,i)},n.hostCallArgs)};OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent=function(n,t){var i=+new Date;return function(r,u){t.onReceiving&&t.onReceiving();var f;if(r!=Microsoft.Office.Common.InvokeResultCode.noError)switch(r){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:f=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:f=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}else f=u?u.Error?u.Error:OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess:OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;t.onComplete&&t.onComplete(f);OSF.AppTelemetry&&OSF.AppTelemetry.onRegisterDone(n,t.dispId,Math.abs(+new Date-i),f)}};OSF.DDA.WAC.Delegate.registerEventAsync=function(n){n.onCalling&&n.onCalling();OSF.getClientEndPoint()&&OSF.getClientEndPoint().registerForEvent(OSF.DDA.getXdmEventName(n.targetId,n.eventType),function(t){n.onEvent&&n.onEvent(t);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!0,n),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:n.dispId,targetId:n.targetId})};OSF.DDA.WAC.Delegate.unregisterEventAsync=function(n){n.onCalling&&n.onCalling();OSF.getClientEndPoint()&&OSF.getClientEndPoint().unregisterForEvent(OSF.DDA.getXdmEventName(n.targetId,n.eventType),OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!1,n),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:n.dispId,targetId:n.targetId})};OSF.OUtil.setNamespace("WebApp",OSF);OSF.WebApp.AddHostInfoAndXdmInfo=function(n){return OSF._OfficeAppFactory.getWindowLocationSearch&&OSF._OfficeAppFactory.getWindowLocationHash?n+OSF._OfficeAppFactory.getWindowLocationSearch()+OSF._OfficeAppFactory.getWindowLocationHash():n};OSF.WebApp._UpdateLinksForHostAndXdmInfo=function(){for(var t=document.querySelectorAll("a[data-officejs-navigate]"),n=0;n0?n.substr(0,r):null,i=t!==null?t.toLowerCase()==="http"||t.toLowerCase()==="https":!0;i=i&&n!="#"&&n!="/"&&n!=""&&n!=OSF._OfficeAppFactory.getWebAppState().webAppUrl;return i};OSF.InitializationHelper=function(n,t,i,r,u){var f=this;f._hostInfo=n;f._webAppState=t;f._context=i;f._settings=r;f._hostFacade=u;f._appContext={};f._tabbableElements="a[href]:not([tabindex='-1']),area[href]:not([tabindex='-1']),button:not([disabled]):not([tabindex='-1']),input:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),textarea:not([disabled]):not([tabindex='-1']),*[tabindex]:not([tabindex='-1']),*[contenteditable]:not([disabled]):not([tabindex='-1'])";f._initializeSettings=function(n,t){var u,f=n.get_settings(),r=OSF.OUtil.getSessionStorage();if(r){var i=r.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey());if(i)f=JSON.parse(i);else{i=JSON.stringify(f);r.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),i)}}var e=OSF.DDA.SettingsManager.deserializeSettings(f);u=t?new OSF.DDA.RefreshableSettings(e):new OSF.DDA.Settings(e);return u};var e=function(n){var t=window.open;n.open=function(n,i,r){var u=null;try{u=t(n,i,r)}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppCommonMessage("Exception happens at windowOpen."+e)}if(!u){var f={strUrl:n,strWindowName:i,strWindowFeatures:r};OSF._OfficeAppFactory.getClientEndPoint()&&OSF._OfficeAppFactory.getClientEndPoint().invoke("ContextActivationManager_openWindowInHost",null,f)}return u}};e(window)};OSF.InitializationHelper.prototype.saveAndSetDialogInfo=function(n){var u="IsDialog",t=!0,f=function(){var n=OSF.OUtil.parseXdmInfo(t);if(n){var i=n.split("|");return i[1]}return null},i=OSF.OUtil.getSessionStorage();if(i){n||(n=OSF.OUtil.parseHostInfoFromWindowName(t,OSF._OfficeAppFactory.getWindowName()));if(n&&n.indexOf("isDialog")>-1){var r=f();r!=null&&i.setItem(r+u,"true");this._hostInfo.isDialog=t;return}this._hostInfo.isDialog=i.getItem(OSF.OUtil.getXdmFieldValue(OSF.XdmFieldName.AppId,!1)+u)!=null?t:!1}};OSF.InitializationHelper.prototype.getAppContext=function(n,t){var i=this,f=i,r=function(n,i){var u;if(i._appName===OSF.AppName.ExcelWebApp){var h=i._settings;u={};for(var a in h){var c=h[a];u[c[0]]=c[1]}}else u=i._settings;if(n===0&&i._id!=undefined&&i._appName!=undefined&&i._appVersion!=undefined&&i._appUILocale!=undefined&&i._dataLocale!=undefined&&i._docUrl!=undefined&&i._clientMode!=undefined&&i._settings!=undefined&&i._reason!=undefined){f._appContext=i;var l=i._appInstanceId?i._appInstanceId:i._id,y=!1,v=!0,e=0;i._appMinorVersion!=undefined&&(e=i._appMinorVersion);var o=undefined;i._requirementMatrix!=undefined&&(o=i._requirementMatrix);i.eToken=i.eToken?i.eToken:"";var r=new OSF.OfficeAppContext(i._id,i._appName,i._appVersion,i._appUILocale,i._dataLocale,i._docUrl,i._clientMode,u,i._reason,i._osfControlType,i._eToken,i._correlationId,l,y,v,e,o,i._hostCustomMessage,i._hostFullVersion,i._clientWindowHeight,i._clientWindowWidth,i._addinName,i._appDomains,i._dialogRequirementMatrix);r._wacHostEnvironment=i._wacHostEnvironment||"0";r._isFromWacAutomation=!!i._isFromWacAutomation;OSF.AppTelemetry&&OSF.AppTelemetry.initialize(r);t(r)}else{var s="Function ContextActivationManager_getAppContextAsync call failed. ErrorCode is "+n+", exception: "+i;OSF.AppTelemetry&&OSF.AppTelemetry.logAppException(s);throw s;}};try{if(i._hostInfo.isDialog&&window.opener!=null){var u=OfficeExt.WACUtils.parseAppContextFromWindowName(!1,OSF._OfficeAppFactory.getWindowName());r(0,u)}else i._webAppState.clientEndPoint.invoke("ContextActivationManager_getAppContextAsync",r,i._webAppState.id)}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown when trying to invoke getAppContextAsync. Exception:["+e+"]");throw e;}};OSF.InitializationHelper.prototype.setAgaveHostCommunication=function(){var r=null,t=!1;try{var n=this,u=OSF.OUtil.parseXdmInfoWithGivenFragment(t,OSF._OfficeAppFactory.getWindowLocationHash());!u&&OSF._OfficeAppFactory.getWindowName&&(u=OSF.OUtil.parseXdmInfoFromWindowName(t,OSF._OfficeAppFactory.getWindowName()));if(u){var i=OSF.OUtil.getInfoItems(u);if(i!=undefined&&i.length>=3){n._webAppState.conversationID=i[0];n._webAppState.id=i[1];n._webAppState.webAppUrl=i[2].indexOf(":")>=0?i[2]:decodeURIComponent(i[2])}}n._webAppState.wnd=window.opener!=r?window.opener:window.parent;var f=OSF.OUtil.parseSerializerVersionWithGivenFragment(t,OSF._OfficeAppFactory.getWindowLocationHash());isNaN(f)&&OSF._OfficeAppFactory.getWindowName&&(f=OSF.OUtil.parseSerializerVersionFromWindowName(t,OSF._OfficeAppFactory.getWindowName()));n._webAppState.serializerVersion=f;if(this._hostInfo.isDialog&&window.opener!=r)return;n._webAppState.clientEndPoint=Microsoft.Office.Common.XdmCommunicationManager.connect(n._webAppState.conversationID,n._webAppState.wnd,n._webAppState.webAppUrl,n._webAppState.serializerVersion);n._webAppState.serviceEndPoint=Microsoft.Office.Common.XdmCommunicationManager.createServiceEndPoint(n._webAppState.id);var o=n._webAppState.conversationID+OSF.SharedConstants.NotificationConversationIdSuffix;n._webAppState.serviceEndPoint.registerConversation(o,n._webAppState.webAppUrl);var e=function(i){var e="ContextActivationManager_notifyHost";switch(i){case OSF.AgaveHostAction.Select:n._webAppState.focused=!0;break;case OSF.AgaveHostAction.UnSelect:n._webAppState.focused=t;break;case OSF.AgaveHostAction.TabIn:case OSF.AgaveHostAction.CtrlF6In:window.focus();var f=document.querySelectorAll(n._tabbableElements),u=OSF.OUtil.focusToFirstTabbable(f,t);if(!u){window.blur();n._webAppState.focused=t;n._webAppState.clientEndPoint.invoke(e,r,[n._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable])}break;case OSF.AgaveHostAction.TabInShift:window.focus();var f=document.querySelectorAll(n._tabbableElements),u=OSF.OUtil.focusToFirstTabbable(f,!0);if(!u){window.blur();n._webAppState.focused=t;n._webAppState.clientEndPoint.invoke(e,r,[n._webAppState.id,OSF.AgaveHostAction.ExitNoFocusableShift])}break;default:OsfMsAjaxFactory.msAjaxDebug.trace("actionId "+i+" notifyAgave is wrong.")}};n._webAppState.serviceEndPoint.registerMethod("Office_notifyAgave",e,Microsoft.Office.Common.InvokeType.async,t);n.addOrRemoveEventListenersForWindow(!0)}catch(s){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown in setAgaveHostCommunication. Exception:["+s+"]");throw s;}};OSF.InitializationHelper.prototype.addOrRemoveEventListenersForWindow=function(n){var o="keypress",r=null,i="ContextActivationManager_notifyHost",t=this,s=function(){t._webAppState.focused||(t._webAppState.focused=!0);t._webAppState.clientEndPoint.invoke(i,r,[t._webAppState.id,OSF.AgaveHostAction.Select])},e=function(){if(OSF){t._webAppState.focused&&(t._webAppState.focused=!1);t._webAppState.clientEndPoint.invoke(i,r,[t._webAppState.id,OSF.AgaveHostAction.UnSelect])}},u=function(n){n.preventDefault=n.preventDefault||function(){n.returnValue=!1};if(n.keyCode==117&&(n.ctrlKey||n.metaKey)){var f=OSF.AgaveHostAction.CtrlF6Exit;n.shiftKey&&(f=OSF.AgaveHostAction.CtrlF6ExitShift);t._webAppState.clientEndPoint.invoke(i,r,[t._webAppState.id,f])}else if(n.keyCode==9){n.preventDefault();var u=document.querySelectorAll(t._tabbableElements),e=OSF.OUtil.focusToNextTabbable(u,n.target||n.srcElement,n.shiftKey);e||(t._hostInfo.isDialog?OSF.OUtil.focusToFirstTabbable(u,n.shiftKey):n.shiftKey?t._webAppState.clientEndPoint.invoke(i,r,[t._webAppState.id,OSF.AgaveHostAction.TabExitShift]):t._webAppState.clientEndPoint.invoke(i,r,[t._webAppState.id,OSF.AgaveHostAction.TabExit]))}else if(n.keyCode==27){n.preventDefault();t.dismissDialogNotification&&t.dismissDialogNotification();t._webAppState.clientEndPoint.invoke(i,r,[t._webAppState.id,OSF.AgaveHostAction.EscExit])}else if(n.keyCode==113){n.preventDefault();t._webAppState.clientEndPoint.invoke(i,r,[t._webAppState.id,OSF.AgaveHostAction.F2Exit])}},f=function(n){n.keyCode==117&&n.ctrlKey&&(n.preventDefault?n.preventDefault():n.returnValue=!1)};if(n){OSF.OUtil.addEventListener(window,"focus",s);OSF.OUtil.addEventListener(window,"blur",e);OSF.OUtil.addEventListener(window,"keydown",u);OSF.OUtil.addEventListener(window,o,f)}else{OSF.OUtil.removeEventListener(window,"focus",s);OSF.OUtil.removeEventListener(window,"blur",e);OSF.OUtil.removeEventListener(window,"keydown",u);OSF.OUtil.removeEventListener(window,o,f)}};OSF.InitializationHelper.prototype.initWebDialog=function(n){if(n.get_isDialog()){if(OSF.DDA.UI.ChildUI){var t=window.opener!=null;n.ui=new OSF.DDA.UI.ChildUI(t);t&&this.registerMessageReceivedEventForWindowDialog&&this.registerMessageReceivedEventForWindowDialog()}}else if(OSF.DDA.UI.ParentUI){n.ui=new OSF.DDA.UI.ParentUI;OfficeExt.Container&&OSF.DDA.DispIdHost.addAsyncMethods(n.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync])}};OSF.InitializationHelper.prototype.initWebAuth=function(n){if(OSF.DDA.Auth){n.auth=new OSF.DDA.Auth;OSF.DDA.DispIdHost.addAsyncMethods(n.auth,[OSF.DDA.AsyncMethodNames.GetAccessTokenAsync])}};OSF.getClientEndPoint=function(){var n=OSF._OfficeAppFactory.getInitializationHelper();return n._webAppState.clientEndPoint};OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize=function(){var n=this;if(n._hostInfo.isDialog){window.focus();var i=document.querySelectorAll(n._tabbableElements),t=OSF.OUtil.focusToFirstTabbable(i,!1);if(!t){window.blur();n._webAppState.focused=!1;n._webAppState.clientEndPoint&&n._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[n._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable])}}};(function(){var n=function(){var o=function(n){n&&OSF.OUtil.loadScript(n,function(){OsfMsAjaxFactory.msAjaxDebug.trace("loaded customized script:"+n)})},f,e,n,i=null,r=OSF.OUtil.parseXdmInfo();if(r){n=OSF.OUtil.getInfoItems(r);if(n&&n.length>=3){f=n[0];e=n[2];var t=OSF.OUtil.parseSerializerVersionWithGivenFragment(!1,OSF._OfficeAppFactory.getWindowLocationHash());isNaN(t)&&OSF._OfficeAppFactory.getWindowName&&(t=OSF.OUtil.parseSerializerVersionFromWindowName(!1,OSF._OfficeAppFactory.getWindowName()));i=Microsoft.Office.Common.XdmCommunicationManager.connect(f,window.parent,e,t)}}var u=null;if(i)try{i.invoke("getCustomizedScriptPathAsync",function(n,t){o(n===0?t:null)},{__timeout__:1e3})}catch(s){OsfMsAjaxFactory.msAjaxDebug.trace("no script override through cross frame communication.")}else{try{window.external&&typeof window.external.getCustomizedScriptPath!="undefined"&&(u=window.external.getCustomizedScriptPath())}catch(s){OsfMsAjaxFactory.msAjaxDebug.trace("no script override through window.external.")}o(u)}},t=!0;t&&!OsfMsAjaxFactory.isMsAjaxLoaded()?OSF._OfficeAppFactory&&OSF._OfficeAppFactory&&OSF._OfficeAppFactory.getLoadScriptHelper&&OSF._OfficeAppFactory.getLoadScriptHelper().isScriptLoading(OSF.ConstantNames.MicrosoftAjaxId)?OSF._OfficeAppFactory.getLoadScriptHelper().waitForScripts([OSF.ConstantNames.MicrosoftAjaxId],n):OsfMsAjaxFactory.loadMsAjaxFull(function(){if(OsfMsAjaxFactory.isMsAjaxLoaded())n();else throw"Not able to load MicrosoftAjax.js.";}):n()})();var OSFLog;(function(n){var u="ResponseTime",f="Message",r="SessionId",i="CorrelationId",t=!0,e=function(){function n(n){this._table=n;this._fields={}}Object.defineProperty(n.prototype,"Fields",{get:function(){return this._fields},enumerable:t,configurable:t});Object.defineProperty(n.prototype,"Table",{get:function(){return this._table},enumerable:t,configurable:t});n.prototype.SerializeFields=function(){};n.prototype.SetSerializedField=function(n,t){typeof t!="undefined"&&t!==null&&(this._serializedFields[n]=t.toString())};n.prototype.SerializeRow=function(){var n=this;n._serializedFields={};n.SetSerializedField("Table",n._table);n.SerializeFields();return JSON.stringify(n._serializedFields)};return n}();n.BaseUsageData=e;var c=function(n){var k="IsFromWacAutomation",w="WacHostEnvironment",b="HostJSVersion",y="OfficeJSVersion",p="DocUrl",g="AppSizeHeight",nt="AppSizeWidth",l="ClientId",d="HostVersion",s="Host",h="UserId",e="Browser",o="AssetId",a="AppURL",v="AppInstanceId",c="AppId";__extends(u,n);function u(){n.call(this,"AppActivated")}Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,c,{get:function(){return this.Fields[c]},set:function(n){this.Fields[c]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,v,{get:function(){return this.Fields[v]},set:function(n){this.Fields[v]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,a,{get:function(){return this.Fields[a]},set:function(n){this.Fields[a]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,d,{get:function(){return this.Fields[d]},set:function(n){this.Fields[d]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,l,{get:function(){return this.Fields[l]},set:function(n){this.Fields[l]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,nt,{get:function(){return this.Fields[nt]},set:function(n){this.Fields[nt]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,g,{get:function(){return this.Fields[g]},set:function(n){this.Fields[g]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,p,{get:function(){return this.Fields[p]},set:function(n){this.Fields[p]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,y,{get:function(){return this.Fields[y]},set:function(n){this.Fields[y]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,b,{get:function(){return this.Fields[b]},set:function(n){this.Fields[b]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,w,{get:function(){return this.Fields[w]},set:function(n){this.Fields[w]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,k,{get:function(){return this.Fields[k]},set:function(n){this.Fields[k]=n},enumerable:t,configurable:t});u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(c,n.AppId);n.SetSerializedField(v,n.AppInstanceId);n.SetSerializedField(a,n.AppURL);n.SetSerializedField(o,n.AssetId);n.SetSerializedField(e,n.Browser);n.SetSerializedField(h,n.UserId);n.SetSerializedField(s,n.Host);n.SetSerializedField(d,n.HostVersion);n.SetSerializedField(l,n.ClientId);n.SetSerializedField(nt,n.AppSizeWidth);n.SetSerializedField(g,n.AppSizeHeight);n.SetSerializedField(f,n.Message);n.SetSerializedField(p,n.DocUrl);n.SetSerializedField(y,n.OfficeJSVersion);n.SetSerializedField(b,n.HostJSVersion);n.SetSerializedField(w,n.WacHostEnvironment);n.SetSerializedField(k,n.IsFromWacAutomation)};return u}(e);n.AppActivatedUsageData=c;var l=function(n){var e="StartTime",o="ScriptId";__extends(f,n);function f(){n.call(this,"ScriptLoad")}Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t});f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(o,n.ScriptId);n.SetSerializedField(e,n.StartTime);n.SetSerializedField(u,n.ResponseTime)};return f}(e);n.ScriptLoadUsageData=l;var h=function(n){var h="CloseMethod",s="OpenTime",e="AppSizeFinalHeight",o="AppSizeFinalWidth",f="FocusTime";__extends(u,n);function u(){n.call(this,"AppClosed")}Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t});u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(f,n.FocusTime);n.SetSerializedField(o,n.AppSizeFinalWidth);n.SetSerializedField(e,n.AppSizeFinalHeight);n.SetSerializedField(s,n.OpenTime);n.SetSerializedField(h,n.CloseMethod)};return u}(e);n.AppClosedUsageData=h;var o=function(n){var s="ErrorType",o="Parameters",h="APIID",e="APIType";__extends(f,n);function f(){n.call(this,"APIUsage")}Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t});f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(e,n.APIType);n.SetSerializedField(h,n.APIID);n.SetSerializedField(o,n.Parameters);n.SetSerializedField(u,n.ResponseTime);n.SetSerializedField(s,n.ErrorType)};return f}(e);n.APIUsageUsageData=o;var s=function(n){var e="SuccessCode";__extends(u,n);function u(){n.call(this,"AppInitialization")}Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t});u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(e,n.SuccessCode);n.SetSerializedField(f,n.Message)};return u}(e);n.AppInitializationUsageData=s})(OSFLog||(OSFLog={}));var Logger;(function(n){"use strict";(function(n){n[n.info=0]="info";n[n.warning=1]="warning";n[n.error=2]="error"})(n.TraceLevel||(n.TraceLevel={}));var f=n.TraceLevel;(function(n){n[n.none=0]="none";n[n.flush=1]="flush"})(n.SendFlag||(n.SendFlag={}));var e=n.SendFlag;function u(){OSF.Logger&&OSF.Logger.ulsEndpoint&&OSF.Logger.ulsEndpoint.loadProxyFrame()}n.allowUploadingData=u;function t(n,t,i){if(OSF.Logger&&OSF.Logger.ulsEndpoint){var u={traceLevel:n,message:t,flag:i,internalLog:!0},r=JSON.stringify(u);OSF.Logger.ulsEndpoint.writeLog(r)}}n.sendLog=t;function i(){try{return new r}catch(n){return null}}var r=function(){function n(){var n=this,t=n;n.proxyFrame=null;n.telemetryEndPoint="https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html";n.buffer=[];n.proxyFrameReady=!1;OSF.OUtil.addEventListener(window,"message",function(n){return t.tellProxyFrameReady(n)});setTimeout(function(){t.loadProxyFrame()},3e3)}n.prototype.writeLog=function(t){var i=this;i.proxyFrameReady===!0?i.proxyFrame.contentWindow.postMessage(t,n.telemetryOrigin):i.buffer.length<128&&i.buffer.push(t)};n.prototype.loadProxyFrame=function(){var n=this;if(n.proxyFrame==null){n.proxyFrame=document.createElement("iframe");n.proxyFrame.setAttribute("style","display:none");n.proxyFrame.setAttribute("src",n.telemetryEndPoint);document.head.appendChild(n.proxyFrame)}};n.prototype.tellProxyFrameReady=function(t){var i=this,e=i;if(t.data==="ProxyFrameReadyToLog"){i.proxyFrameReady=!0;for(var r=0;r40){n=OSF.OUtil.Guid.generateNewGuid();t.setValue(t.clientIDKey,n)}return n};n.prototype.saveLog=function(n,t){var u=this,i=u.getValue(u.logIdSetKey);i=(i&&i.length>0?i+";":r)+n;u.setValue(u.logIdSetKey,i);u.setValue(n,t)};n.prototype.enumerateLog=function(n,t){var i=this,f=i.getValue(i.logIdSetKey);if(f){var e=f.split(";");for(var o in e){var r=e[o],u=i.getValue(r);if(u){n&&n(r,u);t&&i.remove(r)}}t&&i.remove(i.logIdSetKey)}};n.prototype.getValue=function(n){var i=OSF.OUtil.getLocalStorage(),t=r;i&&(t=i.getItem(n));return t};n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)};n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}};return n}(),o=function(){function t(){}t.prototype.LogData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(t)}catch(i){}};t.prototype.LogRawData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(t))}catch(i){}};return t}();function u(n){n&&(n=n.replace(/[{}]/g,r).toLowerCase());return n||r}function d(e){if(OSF.Logger&&!t){t=new g;t.hostVersion=e.get_hostFullVersion()?e.get_hostFullVersion():e.get_appVersion();t.appId=e.get_id();t.host=e.get_appName();t.browser=window.navigator.userAgent;t.correlationId=u(e.get_correlationId());t.clientId=(new l).getClientId();t.appInstanceId=e.get_appInstanceId();t.appInstanceId&&(t.appInstanceId=t.appInstanceId.replace(/[{}]/g,r).toLowerCase());t.message=e.get_hostCustomMessage();t.officeJSVersion=OSF.ConstantNames.FileVersion;t.hostJSVersion="16.0.8902.1000";e._wacHostEnvironment&&(t.wacHostEnvironment=e._wacHostEnvironment);e._isFromWacAutomation!==undefined&&e._isFromWacAutomation!==i&&(t.isFromWacAutomation=e._isFromWacAutomation.toString().toLowerCase());var s=e.get_docUrl();t.docUrl=nt.test(s)?s:r;var o=location.href;o&&(o=o.split("?")[0].split("#")[0]);t.appURL=o;(function(n,t){var o,s,u;t.assetId=r;t.userId=r;try{o=decodeURIComponent(n);s=new DOMParser;u=s.parseFromString(o,"text/xml");var e=u.getElementsByTagName("t")[0].attributes.getNamedItem("cid"),f=u.getElementsByTagName("t")[0].attributes.getNamedItem("oid");e&&e.nodeValue?t.userId=e.nodeValue:f&&f.nodeValue&&(t.userId=f.nodeValue);t.assetId=u.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(h){}finally{o=i;u=i;s=i}})(e.get_eToken(),t);(function(){var l=new Date,r=i,o=0,c=!1,u=function(){if(document.hasFocus())r==i&&(r=new Date);else if(r){o+=Math.abs(+new Date-r.getTime());r=i}},t=[];t.push(new f("focus",u));t.push(new f("blur",u));t.push(new f("focusout",u));t.push(new f("focusin",u));var s=function(){for(var u=0;u0)for(var r in i)if(i[r]===t)return!0;return!1},hasObjectEventHandler:function(n,t,i){var f=this._objectEventHandlers[n];if(f!=null)for(var u=f[t],r=0;u!=null&&r0)for(var r=0;r0){this._eventHandlers[n]=[];return!0}return!1},clearObjectEventHandlers:function(n,t){if(this._objectEventHandlers[n]!=null&&this._objectEventHandlers[n][t]!=null){this._objectEventHandlers[n][t]=[];return!0}return!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},getObjectEventHandlerCount:function(n,t){return this._objectEventHandlers[n]==null||this._objectEventHandlers[n][t]==null?0:this._objectEventHandlers[n][t].length},fireEvent:function(n){if(n.type==undefined)return!1;var t=n.type;if(t&&this._eventHandlers[t]){var i=this._eventHandlers[t];for(var r in i)i[r](n);return!0}else return!1},fireObjectEvent:function(n,t){if(t.type==undefined)return!1;var u=t.type;if(u&&this._objectEventHandlers[u]){var f=this._objectEventHandlers[u],i=f[n];if(i!=null){for(var r=0;r0){for(var u=i[0];t.length>0;){var r=t.shift();u(r)}return!0}}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var f="outlook",e="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(n,i[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:r=new OSF.DDA.RichApiMessageEventArgs(n,i);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f){r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i);t.initialize(r.initialData);OSF._OfficeAppFactory.getHostInfo().hostPlatform=="win32"&&t.setCurrentItemNumber(r.itemNumber.itemNumber)}else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkRecipientsChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});var OfficeExt;(function(n){var t;(function(t){var r=function(){var f="object",e="string",u=null;function r(){var t=this,n=t;t._pseudoDocument=u;t._eventDispatch=u;t._processAppCommandInvocation=function(t){var i=n._verifyManifestCallback(t.callbackName);if(i.errorCode!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){n._invokeAppCommandCompletedMethod(t.appCommandId,i.errorCode,"");return}var r=n._constructEventObjectForCallback(t);r?window.setTimeout(function(){i.callback(r)},0):n._invokeAppCommandCompletedMethod(t.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"")}}r.initializeOsfDda=function(){OSF.DDA.AsyncMethodNames.addNames({AppCommandInvocationCompletedAsync:"appCommandInvocationCompletedAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[e]},{name:Microsoft.Office.WebExtension.Parameters.Status,types:["number"]},{name:Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData,types:[e]}]});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{AppCommandInvokedEvent:"AppCommandInvokedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppCommandInvoked:"appCommandInvoked"});OSF.OUtil.setNamespace("AppCommand",OSF.DDA);OSF.DDA.AppCommand.AppCommandInvokedEventArgs=n.AppCommand.AppCommandInvokedEventArgs};r.prototype.initializeAndChangeOnce=function(n){var i=this;t.registerDdaFacade();i._pseudoDocument={};OSF.DDA.DispIdHost.addAsyncMethods(i._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync]);i._eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked]);var r=function(t){n&&(t.status=="succeeded"?n(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):n(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError))};OSF.DDA.DispIdHost.addEventSupport(i._pseudoDocument,i._eventDispatch);i._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,i._processAppCommandInvocation,r)};r.prototype._verifyManifestCallback=function(n){var s="function",e={callback:u,errorCode:OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback};n=n.trim();try{for(var t=n.split("."),r=window,i=0;i100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99);n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1);!n[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99);n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0);return n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("Dialog",OSF.DDA.Marshaling);OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys={MessageType:"messageType",MessageContent:"messageContent"};OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys={MessageType:"messageType",MessageContent:"messageContent"};OSF.DDA.Marshaling.MessageParentKeys={MessageToParent:"messageToParent"};OSF.DDA.Marshaling.DialogNotificationShownEventType={DialogNotificationShown:"dialogNotificationShown"};OSF.DDA.Marshaling.SendMessageKeys={MessageContent:"messageContent"};var OfficeExt;(function(n){var t;(function(n){var t={Excel:"excel",Word:"word",PowerPoint:"powerpoint",Outlook:"outlook"};function r(n){switch(n){case t.Excel:case t.Word:case t.PowerPoint:case t.Outlook:return new i;default:return new i}return null}n.getDialogCssManager=r;var i=function(){var t=";";function n(){var u="height: 100px",i="font-size: 14px",t="font-family: Segoe UI,Arial,Verdana,sans-serif",f="margin: 20px 14px",e="width: 100%",r="position: absolute",n=this;n.overlayElementCSS=[r,"top: 0","left: 0",e,"height: 100%","background-color: rgba(198, 198, 198, 0.5)","z-index: 99998"];n.dialogNotificationPanelCSS=[e,"height: 190px",r,"z-index: 99999","background-color: rgba(255, 255, 255, 1)","left: 0px","top: 50%","margin-top: -95px"];n.newWindowNotificationTextPanelCSS=[f,t,i,u,"line-height: 100px"];n.newWindowNotificationTextSpanCSS=["display: inline-block","line-height: normal","vertical-align: middle"];n.crossZoneNotificationTextPanelCSS=[f,t,i,u];n.dialogNotificationButtonPanelCSS="margin:0px 9px";n.buttonStyleCSS=["text-align: center","width: 70px","height: 25px",i,t,"margin: 0px 5px","border-width: 1px","border-style: solid"]}n.prototype.getOverlayElementCSS=function(){return this.overlayElementCSS.join(t)};n.prototype.getDialogNotificationPanelCSS=function(){return this.dialogNotificationPanelCSS.join(t)};n.prototype.getNewWindowNotificationTextPanelCSS=function(){return this.newWindowNotificationTextPanelCSS.join(t)};n.prototype.getNewWindowNotificationTextSpanCSS=function(){return this.newWindowNotificationTextSpanCSS.join(t)};n.prototype.getCrossZoneNotificationTextPanelCSS=function(){return this.crossZoneNotificationTextPanelCSS.join(t)};n.prototype.getDialogNotificationButtonPanelCSS=function(){return this.dialogNotificationButtonPanelCSS};n.prototype.getDialogButtonCSS=function(){return this.buttonStyleCSS.join(t)};return n}();n.DefaultDialogCSSManager=i})(t=n.WacCommonUICssManager||(n.WacCommonUICssManager={}))})(OfficeExt||(OfficeExt={}));var OfficeExt;(function(n){var t;(function(t){var i;(function(t){var s="div",p="string",v="message",g="storage",y="keydown",r=!1,i=null,f=i,w=i,o=i,u=i,bt="osfDialogInternal:action=closeDialog",e=i,rt=r,it=-1,pt="messageParentKey",c=i,vt="#ababab",yt="#ffffff",dt="#ccc",at="newWindowNotificaiton",oi="crossZoneNotification",d="configureBrowserLink",nt="dialogNotificationTextPanel",a=n.WACUtils.shouldUseLocalStorageToPassMessage(),h={dispId:OSF.DDA.EventDispId.dispidDialogNotificationShownInAddinEvent,eventType:OSF.DDA.Marshaling.DialogNotificationShownEventType.DialogNotificationShown,onComplete:i};function ei(n){var t=n.input;t!=i&&(c={HostButtonBorderColor:t[OSF.HostThemeButtonStyleKeys.ButtonBorderColor],HostButtonBackgroundColor:t[OSF.HostThemeButtonStyleKeys.ButtonBackgroundColor]});n.completed()}t.setHostThemeButtonStyle=ei;function hi(n){OSF._OfficeAppFactory.getInitializationHelper().addOrRemoveEventListenersForWindow(r);n.completed()}t.removeEventListenersForDialog=hi;function si(t){try{if(OSF._OfficeAppFactory.getInitializationHelper()._appContext._skipNewWindowNotification){st(t);return}rt=r;var a=r,w=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo,s=n.WacCommonUICssManager.getDialogCssManager(w.hostType),d=OSF.OUtil.formatString(Strings.OfficeOM.L_ShowWindowDialogNotification,OSF._OfficeAppFactory.getInitializationHelper()._appContext._addinName);o=ct(s);document.body.insertBefore(o,document.body.firstChild);u=gt(s,d);u.id=at;var c=ht(s),i=b(s,Strings.OfficeOM.L_ShowWindowDialogNotificationAllow),f=b(s,Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore);c.appendChild(i);c.appendChild(f);u.appendChild(c);document.body.insertBefore(u,document.body.firstChild);i.onclick=function(){st(t);rt||l()};function v(){function n(n){ft();lt(n);e(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore)}h.onComplete=n;OSF.DDA.WAC.Delegate.unregisterEventAsync(h)}f.onclick=v;i.addEventListener(y,function(n){if(n.shiftKey&&n.keyCode==9){ut(i);k(f);f.focus();n.preventDefault();n.stopPropagation()}},r);f.addEventListener(y,function(n){if(n.shiftKey||n.keyCode!=9){if(n.keyCode==13){a=!0;n.preventDefault();n.stopPropagation()}}else{ut(f);k(i);i.focus();n.preventDefault();n.stopPropagation()}},r);f.addEventListener("keyup",function(n){if(n.keyCode==13&&a){a=r;v();n.preventDefault();n.stopPropagation()}},r);window.focus();function p(){i.focus()}h.onComplete=p;OSF.DDA.WAC.Delegate.registerEventAsync(h)}catch(g){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at new window dialog."+g);e(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)}}t.handleNewWindowDialog=si;function fi(n){try{if(f!=i){var r=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains;if(r)for(var t=0;t-1)window.close();else{var t=n.data,r=typeof t;if(t&&(r=="object"||r==p)){r==p&&(t=JSON.parse(t));var u=OSF.DDA.OMFactory.manufactureEventArgs(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived,i,t);OSF.DialogParentMessageEventDispatch.fireEvent(u)}}}window.addEventListener(v,n)}t.registerMessageReceivedEvent=ui;function ti(n,t){w=n;e=t}t.setHandlerAndShowDialogCallback=ti;function ii(){try{u&&u.id==at&&e&&e(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore)}catch(n){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during executing displayDialogAsync callback."+n)}l()}t.escDismissDialogNotification=ii;function ot(t,i){var s=r,e=n.WacCommonUICssManager.getDialogCssManager(i);o=ct(e);document.body.insertBefore(o,document.body.firstChild);u=ni(e,t);u.id=oi;var h=ht(e),f=b(e,Strings.OfficeOM.L_DialogOK?Strings.OfficeOM.L_DialogOK:"OK");h.appendChild(f);u.appendChild(h);document.body.insertBefore(u,document.body.firstChild);rt=!0;f.onclick=function(){l()};f.addEventListener(y,function(n){if(n.keyCode==9){document.getElementById(d).focus();n.preventDefault();n.stopPropagation()}else if(n.keyCode==13){s=!0;n.preventDefault();n.stopPropagation()}},r);f.addEventListener("keyup",function(n){if(n.keyCode==13&&s){s=r;l();n.preventDefault();n.stopPropagation()}},r);document.getElementById(d).addEventListener(y,function(n){if(n.keyCode==9){f.focus();n.preventDefault();n.stopPropagation()}},r);window.focus();f.focus()}t.showCrossZoneNotification=ot;function et(n){if(n.source==f)try{var t={};t[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogMessageReceived;t[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent]=n.data;w(t)}catch(i){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during receive message handler."+i)}}function tt(n){var i=OSF._OfficeAppFactory.getInitializationHelper()._webAppState.id+pt;if(n.key==i)try{var t={};t[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogMessageReceived;t[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent]=n.newValue;w(t)}catch(r){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during storage changed handler."+r)}}function st(t){var r=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo,k=[r.hostType,r.hostPlatform,r.hostSpecificFileVersion,r.hostLocale,r.osfControlAppCorrelationId,"isDialog"],l=k.join("|"),s=OSF._OfficeAppFactory.getInitializationHelper()._appContext,u=t[OSF.ShowWindowDialogParameterKeys.Url];u=n.WACUtils.addHostInfoAsQueryParam(u,l);var o=JSON.parse(window.name);o[OSF.WindowNameItemKeys.HostInfo]=l;o[OSF.WindowNameItemKeys.AppContext]=s;var h=t[OSF.ShowWindowDialogParameterKeys.Width]*screen.width/100,c=t[OSF.ShowWindowDialogParameterKeys.Height]*screen.height/100,d=s._clientWindowWidth/2-h/2,b=s._clientWindowHeight/2-c/2,y="width="+h+", height="+c+", left="+d+", top="+b+",channelmode=no,directories=no,fullscreen=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=yes,toolbar=no";f=window.open(u,n.WACUtils.serializeObjectToString(o),y);if(f==i){OSF.AppTelemetry.logAppCommonMessage("Encountered cross zone issue in displayDialogAsync api.");ft();ot(u,r.hostType);e(OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone);return}a?window.addEventListener(g,tt):window.addEventListener(v,et);function p(){try{if(f==i||f.closed){window.clearInterval(it);a?window.removeEventListener(g,tt):window.removeEventListener(v,et);var n={};n[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogClosed;w(n)}}catch(t){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during check or handle window close."+t)}}it=window.setInterval(p,1e3);e!=i?e(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("showDialogCallback can not be null.")}function b(n,t){var i=document.createElement("input");i.setAttribute("type","button");i.style.cssText=n.getDialogButtonCSS();i.style.borderColor=vt;i.style.backgroundColor=yt;i.setAttribute("value",t);var u=function(){k(i)},r=function(){ut(i)};i.addEventListener("mouseover",u);i.addEventListener("focus",u);i.addEventListener("mouseout",r);i.addEventListener("focusout",r);return i}function k(n){if(c!=i){n.style.borderColor=c.HostButtonBorderColor;n.style.backgroundColor=c.HostButtonBackgroundColor}else if(OSF.CommonUI&&OSF.CommonUI.HostButtonBorderColor&&OSF.CommonUI.HostButtonBackgroundColor){n.style.borderColor=OSF.CommonUI.HostButtonBorderColor;n.style.backgroundColor=OSF.CommonUI.HostButtonBackgroundColor}else n.style.backgroundColor=dt}function ut(n){n.style.borderColor=vt;n.style.backgroundColor=yt}function l(){function n(n){ft();lt(n)}h.onComplete=n;OSF.DDA.WAC.Delegate.unregisterEventAsync(h)}function ft(){if(u!=i){document.body.removeChild(u);u=i}if(o!=i){document.body.removeChild(o);o=i}}function ct(n){var t=document.createElement(s);t.style.cssText=n.getOverlayElementCSS();return t}function gt(n,t){var r=document.createElement(s);r.style.cssText=n.getDialogNotificationPanelCSS();wt(r);var i=document.createElement(s);i.style.cssText=n.getNewWindowNotificationTextPanelCSS();i.id=nt;document.documentElement.getAttribute("dir")=="rtl"?i.style.paddingRight="30px":i.style.paddingLeft="30px";var u=document.createElement("span");u.style.cssText=n.getNewWindowNotificationTextSpanCSS();u.innerText=t;i.appendChild(u);r.appendChild(i);return r}function ht(n){var t=document.createElement(s);t.style.cssText=n.getDialogNotificationButtonPanelCSS();t.style.cssFloat=document.documentElement.getAttribute("dir")=="rtl"?"left":"right";return t}function lt(n){if(n!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){var t=document.querySelectorAll(OSF._OfficeAppFactory.getInitializationHelper()._tabbableElements);OSF.OUtil.focusToFirstTabbable(t,r)}}function ni(t,i){var f=document.createElement(s);f.style.cssText=t.getDialogNotificationPanelCSS();wt(f);var u=document.createElement(s);u.style.cssText=t.getCrossZoneNotificationTextPanelCSS();u.id=nt;var r=document.createElement("a");r.id=d;r.href="#";r.innerText=Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink;r.setAttribute("onclick","window.open('https://support.microsoft.com/en-us/help/17479/windows-internet-explorer-11-change-security-privacy-settings', '_blank', 'fullscreen=1')");var e=document.createElement("span");Strings.OfficeOM.L_NewWindowCrossZone&&(e.innerHTML=OSF.OUtil.formatString(Strings.OfficeOM.L_NewWindowCrossZone,r.outerHTML,n.WACUtils.getDomainForUrl(i)));u.appendChild(e);f.appendChild(u);return f}function wt(n){n.setAttribute("role","dialog");n.setAttribute("aria-describedby",nt)}})(i=t.Dialog||(t.Dialog={}))})(t=n.AddinNativeAction||(n.AddinNativeAction={}))})(OfficeExt||(OfficeExt={}));OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogMessageReceivedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageType},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageContent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidMessageParentMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,value:OSF.DDA.Marshaling.MessageParentKeys.MessageToParent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSendMessageMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,value:OSF.DDA.Marshaling.SendMessageKeys.MessageContent}]});OSF.DDA.WAC.Delegate.openDialog=function(n){var u="https://",f="http://",r=JSON.parse(n.targetId),e=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!0,n);function t(n){var t={Error:n};try{e(Microsoft.Office.Common.InvokeResultCode.noError,t)}catch(i){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at showDialogCallback."+i)}}if(OSF.DialogShownStatus.hasDialogShown){t(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened);return}var i=r[OSF.ShowWindowDialogParameterKeys.Url].toLowerCase();if(i==null||!(i.substr(0,u.length)===u)){i.substr(0,f.length)===f?t(OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS):t(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme);return}if(r[OSF.ShowWindowDialogParameterKeys.DisplayInIframe]){OSF.DialogShownStatus.isWindowDialog=!1;OSF.DDA.WAC.Delegate.registerEventAsync(n)}else{OSF.DialogShownStatus.isWindowDialog=!0;OfficeExt.AddinNativeAction.Dialog.setHandlerAndShowDialogCallback(function(t){n.onEvent&&n.onEvent(t);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t);OfficeExt.AddinNativeAction.Dialog.handleNewWindowDialog(r)}};OSF.DDA.WAC.Delegate.messageParent=function(n){window.opener!=null?OfficeExt.AddinNativeAction.Dialog.messageParent(n):OSF.DDA.WAC.Delegate.executeAsync(n)};OSF.DDA.WAC.Delegate.sendMessage=function(n){OSF.DialogShownStatus.hasDialogShown&&(OSF.DialogShownStatus.isWindowDialog?OfficeExt.AddinNativeAction.Dialog.sendMessage(n):OSF.DDA.WAC.Delegate.executeAsync(n))};OSF.DDA.WAC.Delegate.closeDialog=function(n){var i=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!1,n);function t(n){var t={Error:n};try{i(Microsoft.Office.Common.InvokeResultCode.noError,t)}catch(r){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at closeDialogCallback."+r)}}if(OSF.DialogShownStatus.hasDialogShown)if(OSF.DialogShownStatus.isWindowDialog){n.onCalling&&n.onCalling();OfficeExt.AddinNativeAction.Dialog.closeDialog(t)}else OSF.DDA.WAC.Delegate.unregisterEventAsync(n);else t(OSF.DDA.ErrorCodeManager.errorCodes.ooeWebDialogClosed)};OSF.InitializationHelper.prototype.dismissDialogNotification=function(){OfficeExt.AddinNativeAction.Dialog.escDismissDialogNotification()};OSF.InitializationHelper.prototype.registerMessageReceivedEventForWindowDialog=function(){OfficeExt.AddinNativeAction.Dialog.registerMessageReceivedEvent()};OSF.DDA.AsyncMethodNames.addNames({CloseContainerAsync:"closeContainer"});var OfficeExt;(function(n){var t=function(){function n(){}return n}();n.Container=t})(OfficeExt||(OfficeExt={}));OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseContainerAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidCloseContainerMethod,fromHost:[],toHost:[]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ItemChanged:"olkItemSelectedChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{OlkItemSelectedData:"OlkItemSelectedData"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{RecipientsChanged:"olkRecipientsChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{OlkRecipientsData:"OlkRecipientsData"});OSF.DDA.OlkRecipientsChangedEventArgs=function(n){var t=n[OSF.DDA.EventDescriptors.OlkRecipientsData][0];t===""&&(t=null);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.RecipientsChanged},changedRecipientFields:{value:JSON.parse(t)}})};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppointmentTimeChanged:"olkAppointmentTimeChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{OlkAppointmentTimeChangedData:"OlkAppointmentTimeChangedData"});OSF.DDA.OlkAppointmentTimeChangedEventArgs=function(n){var u=n[OSF.DDA.EventDescriptors.OlkAppointmentTimeChangedData][0],i,t;try{var r=JSON.parse(u);i=new Date(r.start).toISOString();t=new Date(r.end).toISOString()}catch(f){i=null;t=null}OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged},start:{value:i},end:{value:t}})};OSF.DDA.OlkItemSelectedChangedEventArgs=function(n){var t=n[OSF.DDA.EventDescriptors.OlkItemSelectedData];t===""&&(t=null);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.ItemChanged},initialData:{value:t}})};OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidOlkItemSelectedChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.OlkItemSelectedData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidOlkRecipientsChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.OlkRecipientsData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidOlkAppointmentTimeChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.OlkAppointmentTimeChangedData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.AsyncMethodNames.addNames({GetAccessTokenAsync:"getAccessTokenAsync"});OSF.DDA.Auth=function(){};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAccessTokenAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ForceConsent,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.ForceAddAccount,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.AuthChallenge,value:{types:["string"],defaultValue:""}}],onSucceeded:function(n){return n[Microsoft.Office.WebExtension.Parameters.Data]}});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("SingleSignOn",OSF.DDA.Marshaling);OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys={ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge"};OSF.DDA.Marshaling.SingleSignOn.AccessTokenResultKeys={AccessToken:"accessToken"};OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAccessTokenMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.ForceConsent,value:OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.ForceConsent},{name:Microsoft.Office.WebExtension.Parameters.ForceAddAccount,value:OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.ForceAddAccount},{name:Microsoft.Office.WebExtension.Parameters.AuthChallenge,value:OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.AuthChallenge}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.Marshaling.SingleSignOn.AccessTokenResultKeys.AccessToken}]});OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize=function(){OSF.WebApp._UpdateLinksForHostAndXdmInfo()};OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize=function(){var n=OfficeExt.AppCommand.AppCommandManager.instance();n.initializeAndChangeOnce()};OSF.InitializationHelper.prototype.getInitializationReason=function(n){return n.get_reason()};var executeAsyncBase=OSF.DDA.WAC.Delegate.executeAsync;OSF.DDA.WAC.Delegate.executeAsync=function(n){var t=n.onCalling;n.onCalling=function(){n.hostCallArgs=OSF.DDA.OutlookAppOm.addAdditionalArgs(n.dispId,n.hostCallArgs);t&&t()};executeAsyncBase(n)};OSF.InitializationHelper.prototype.prepareApiSurface=function(n){var t=new OSF.DDA.License(n.get_eToken());if(n.get_appName()==OSF.AppName.OutlookWebApp){OSF.WebApp._UpdateLinksForHostAndXdmInfo();this.initWebDialog(n);this.initWebAuth(n);OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(n,this._settings,t,n.appOM));OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.WAC.getDelegateMethods,OSF.DDA.WAC.Delegate.ParameterMap))}else{OfficeJsClient_OutlookWin32.prepareApiSurface(n);OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(n,this._settings,t,n.appOM,OSF.DDA.Theming?OSF.DDA.Theming.getOfficeTheme:null,n.ui));OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.DispIdHost.getClientDelegateMethods,OSF.DDA.SafeArray.Delegate.ParameterMap))}};OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(n){var r={};for(var i in n){var t=n[i];try{t=JSON?JSON.stringify(t,function(n,t){return OSF.OUtil.isDate(this[n])?OSF.DDA.SettingsManager.DateJSONPrefix+this[n].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix:t}):Sys.Serialization.JavaScriptSerializer.serialize(t);r[i]=t}catch(u){}}return r},deserializeSettings:function(n){var r={};n=n||{};for(var i in n){var t=n[i];try{t=JSON?JSON.parse(t,function(n,t){var i;if(typeof t=="string"&&t&&t.length>6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix){i=new Date(parseInt(t.slice(5,-1)));if(i)return i}return t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,!0);r[i]=t}catch(u){}}return r}};OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(n,t,i){Type.registerNamespace("Microsoft.Office.WebExtension.MailboxEnums");Microsoft.Office.WebExtension.MailboxEnums.EntityType={MeetingSuggestion:"meetingSuggestion",TaskSuggestion:"taskSuggestion",Address:"address",EmailAddress:"emailAddress",Url:"url",PhoneNumber:"phoneNumber",Contact:"contact",FlightReservations:"flightReservations",ParcelDeliveries:"parcelDeliveries"};Microsoft.Office.WebExtension.MailboxEnums.ItemType={Message:"message",Appointment:"appointment"};Microsoft.Office.WebExtension.MailboxEnums.ResponseType={None:"none",Organizer:"organizer",Tentative:"tentative",Accepted:"accepted",Declined:"declined"};Microsoft.Office.WebExtension.MailboxEnums.RecipientType={Other:"other",DistributionList:"distributionList",User:"user",ExternalUser:"externalUser"};Microsoft.Office.WebExtension.MailboxEnums.AttachmentType={File:"file",Item:"item",Cloud:"cloud"};Microsoft.Office.WebExtension.MailboxEnums.BodyType={Text:"text",Html:"html"};Microsoft.Office.WebExtension.MailboxEnums.ItemNotificationMessageType={ProgressIndicator:"progressIndicator",InformationalMessage:"informationalMessage",ErrorMessage:"errorMessage",InsightMessage:"insightMessage"};Microsoft.Office.WebExtension.MailboxEnums.Folder={Inbox:"inbox",Junk:"junk",DeletedItems:"deletedItems"};Microsoft.Office.WebExtension.CoercionType={Text:"text",Html:"html"};Microsoft.Office.WebExtension.MailboxEnums.UserProfileType={Office365:"office365",OutlookCom:"outlookCom",Enterprise:"enterprise"};Microsoft.Office.WebExtension.MailboxEnums.RestVersion={v1_0:"v1.0",v2_0:"v2.0",Beta:"beta"};Microsoft.Office.WebExtension.MailboxEnums.ModuleType={Addins:"addins"};Microsoft.Office.WebExtension.MailboxEnums.ActionType={ShowTaskPane:"showTaskPane"};Type.registerNamespace("OSF.DDA");var u=window.OSF||{};u.DDA=u.DDA||{};window.OSF.DDA.OutlookAppOm=u.DDA.OutlookAppOm=function(n,t,i){this.$$d_navigateToModuleAsync=Function.createDelegate(this,this.navigateToModuleAsync);this.$$d_displayPersonaCardAsync=Function.createDelegate(this,this.displayPersonaCardAsync);this.$$d_displayNewMessageFormApi=Function.createDelegate(this,this.displayNewMessageFormApi);this.$$d__displayNewAppointmentFormApi$p$0=Function.createDelegate(this,this._displayNewAppointmentFormApi$p$0);this.$$d_windowOpenOverrideHandler=Function.createDelegate(this,this.windowOpenOverrideHandler);this.$$d__getRestUrl$p$0=Function.createDelegate(this,this._getRestUrl$p$0);this.$$d__getEwsUrl$p$0=Function.createDelegate(this,this._getEwsUrl$p$0);this.$$d__getDiagnostics$p$0=Function.createDelegate(this,this._getDiagnostics$p$0);this.$$d__getUserProfile$p$0=Function.createDelegate(this,this._getUserProfile$p$0);this.$$d_getItem=Function.createDelegate(this,this.getItem);this.$$d__callAppReadyCallback$p$0=Function.createDelegate(this,this._callAppReadyCallback$p$0);this.$$d__getInitialDataResponseHandler$p$0=Function.createDelegate(this,this._getInitialDataResponseHandler$p$0);window.OSF.DDA.OutlookAppOm._instance$p=this;this._officeAppContext$p$0=n;this._appReadyCallback$p$0=i;var r=this;var u=function(){i&&(r._officeAppContext$p$0.get_isDialog()?window.setTimeout(r.$$d__callAppReadyCallback$p$0,0):r.invokeHostMethod(1,null,r.$$d__getInitialDataResponseHandler$p$0))};this._areStringsLoaded$p$0()?u():this._loadLocalizedScript$p$0(u)};window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i=function(n){if(!n)throw Error.create(window._u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text);};window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i=function(n,t,i,r){if(ni)throw Error.argumentOutOfRange(r);};window.OSF.DDA.OutlookAppOm._throwOnInvalidModule$p=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("module");else if(n==="")throw Error.argument("module","module cannot be empty.");if(n!==window.Microsoft.Office.WebExtension.MailboxEnums.ModuleType.Addins)throw Error.notImplemented(String.format("API not supported for module '{0}'",n));};window.OSF.DDA.OutlookAppOm._getHtmlBody$p=function(n){var t="";if("htmlBody"in n){window.OSF.DDA.OutlookAppOm._throwOnInvalidHtmlBody$p(n.htmlBody);t=n.htmlBody}return t};window.OSF.DDA.OutlookAppOm._getAttachments$p=function(n){var t=[];if("attachments"in n){t=n.attachments;window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentsArray$p(t)}return t};window.OSF.DDA.OutlookAppOm._getOptionsAndCallback$p=function(n){var t=[];"options"in n&&(t[0]=n.options);"callback"in n&&(t[t.length]=n.callback);return t};window.OSF.DDA.OutlookAppOm._createAttachmentsDataForHost$p=function(n){var r=new Array(0);if(Array.isInstanceOfType(n))for(var t=0;t2048)throw Error.argumentOutOfRange("attachments",n.length,window._u.ExtensibilityStrings.l_AttachmentUrlTooLong_Text);window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentName$p(t)};window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentItemIdOrName$p=function(n,t){if(!String.isInstanceOfType(n)||!String.isInstanceOfType(t))throw Error.argument("attachments");if(n.length>200)throw Error.argumentOutOfRange("attachments",n.length,window._u.ExtensibilityStrings.l_AttachmentItemIdTooLong_Text);window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentName$p(t)};window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentName$p=function(n){if(n.length>255)throw Error.argumentOutOfRange("attachments",n.length,window._u.ExtensibilityStrings.l_AttachmentNameTooLong_Text);};window.OSF.DDA.OutlookAppOm._throwOnInvalidRestVersion$p=function(n){if(!n)throw Error.argumentNull("restVersion");if(n!==window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v1_0&&n!==window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v2_0&&n!==window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.Beta)throw Error.argument("restVersion");};window.OSF.DDA.OutlookAppOm.getItemIdBasedOnHost=function(n){return window.OSF.DDA.OutlookAppOm._instance$p._initialData$p$0&&window.OSF.DDA.OutlookAppOm._instance$p._initialData$p$0.get__isRestIdSupported$i$0()?window.OSF.DDA.OutlookAppOm._instance$p.convertToRestId(n,window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v1_0):window.OSF.DDA.OutlookAppOm._instance$p.convertToEwsId(n,window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v1_0)};window.OSF.DDA.OutlookAppOm.addAdditionalArgs=function(n,t){return t};window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p=function(n,t,i){if(Object.getType(n)!==t)throw Error.argumentType(i);};window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p=function(n,t,i,u){if(!r.ScriptHelpers.isNullOrUndefined(n)){window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(n,String,u);var f=n;window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(f.length,t,i,u)}};window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p=function(n){return n?n.join(";"):null};window.OSF.DDA.OutlookAppOm._convertComposeEmailDictionaryParameterForSetApi$p=function(n){if(!n)return null;for(var i=new Array(n.length),t=0;t2){var t=window.JSON.parse(n[2]);if(Object.isInstanceOfType(t)){var r=t;i=r.itemNumber}}return i},createDeserializedData:function(n,t){var i=null;var r=window.JSON.parse(n[0]);if(Object.isInstanceOfType(r))i=this._createDeserializedDataWithDictionary$p$0(n,t);else if(Number.isInstanceOfType(r))i=this._createDeserializedDataWithInt$p$0(n,t);else throw Error.notImplemented("Return data type from host must be Dictionary or int");return i},_createDeserializedDataWithDictionary$p$0:function(n,t){var i=window.JSON.parse(n[0]);if(t){i.error=!0;i.errorCode=9030}else if(n.length>1&&n[1]){i.error=!0;i.errorCode=n[1]}else i.error=!1;return i},_createDeserializedDataWithInt$p$0:function(n,t){var i={};i.error=!0;i.errorCode=n[0];return i},invokeHostMethod:function(n,t,i){var f=+new Date;var o=this;var e=function(t,r){if(window.OSF.AppTelemetry){var u=r;var e=-1;u&&u.errorCode&&(e=u.errorCode);window.OSF.AppTelemetry.onMethodDone(n,null,Math.abs(+new Date-f),e)}i&&i(t,r)};if(64===this._officeAppContext$p$0.get_appName()){var r={ApiParams:t};r.MethodData={ControlId:u._OfficeAppFactory.getId(),DispatchId:n};r=window.OSF.DDA.OutlookAppOm.addAdditionalArgs(n,r);n===1?this.get_clientEndPoint().invoke("GetInitialData",e,r):this.get_clientEndPoint().invoke("ExecuteMethod",e,r)}else this._isOwaOnlyMethod$p$0(n)?i&&i(-2,null):this.callOutlookDispatcher(n,t,i,f)},callOutlookDispatcher:function(n,t,i,r){var e=this.convertToOutlookParameters(n,t);var f=this;u.ClientHostController.execute(n,e,function(t,u){var h=-1;var e=null;var o=t.toArray();if(o.length>0){var s=f.getItemNumberFromOutlookResponse(o);var l=s>0;var c=l&&s>f._additionalOutlookParams$p$0._itemNumber$p$0;e=f.createDeserializedData(o,c);e&&e.errorCode&&(h=e.errorCode)}else if(i)throw Error.argumentNull("responseData","Unexpected null/empty data from host.");if(window.OSF.AppTelemetry)window.OSF.AppTelemetry.onMethodDone(n,null,Math.abs(+new Date-r),h);i&&i(u,e)})},_dictionaryToDate$i$0:function(n){var t=new Date(n.year,n.month,n.date,n.hours,n.minutes,n.seconds,n.milliseconds?n.milliseconds:0);if(window.isNaN(t.getTime()))throw Error.format(window._u.ExtensibilityStrings.l_InvalidDate_Text);return t},_dateToDictionary$i$0:function(n){var t={};t.month=n.getMonth();t.date=n.getDate();t.year=n.getFullYear();t.hours=n.getHours();t.minutes=n.getMinutes();t.seconds=n.getSeconds();t.milliseconds=n.getMilliseconds();return t},_isOwaOnlyMethod$p$0:function(n){switch(n){case 402:case 401:case 400:case 403:return!0;default:return!1}},isOutlook16OrGreater:function(){var n=this._initialData$p$0.get__hostVersion$i$0();var i=0;var t=0;if(n){i=n.indexOf(".");t=window.parseInt(n.substring(0,i))}return t>=16},isApiVersionSupported:function(n){var r=!1;try{var u=window.JSON.parse(this._officeAppContext$p$0.get_requirementMatrix());var f=u.Mailbox;var i=f.split(".");var t=n.split(".");(window.parseInt(i[0])>window.parseInt(t[0])||window.parseInt(i[0])===window.parseInt(t[0])&&window.parseInt(i[1])>=window.parseInt(t[1]))&&(r=!0)}catch(e){}return r},convertToOutlookParameters:function(n,t){var i=null;var r={};switch(n){case 1:case 2:case 3:case 14:case 18:case 26:case 32:case 41:case 34:case 99:break;case 12:r.isRest=t.isRest;break;case 4:var f=window.JSON.stringify(t.customProperties);i=[f];break;case 5:i=[t.body];break;case 8:case 9:i=[t.itemId];break;case 7:i=[window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.requiredAttendees),window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.optionalAttendees),t.start,t.end,t.location,window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.resources),t.subject,t.body];break;case 44:i=[window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.toRecipients),window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.ccRecipients),window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.bccRecipients),t.subject,t.htmlBody,t.attachments];break;case 43:i=[t.ewsIdOrEmail];break;case 45:i=[t.module,t.queryString];break;case 40:i=[t.extensionId,t.consentState];break;case 11:case 10:i=[t.htmlBody];break;case 31:case 30:i=[t.htmlBody,t.attachments];break;case 100:r=t;break;case 23:case 13:case 38:case 29:i=[t.data,t.coercionType];break;case 37:case 28:i=[t.coercionType];break;case 17:i=[t.subject];break;case 15:i=[t.recipientField];break;case 22:case 21:i=[t.recipientField,window.OSF.DDA.OutlookAppOm._convertComposeEmailDictionaryParameterForSetApi$p(t.recipientArray)];break;case 19:i=[t.itemId,t.name];break;case 16:i=[t.uri,t.name,t.isInline];break;case 20:i=[t.attachmentIndex];break;case 25:i=[t.TimeProperty,t.time];break;case 24:i=[t.TimeProperty];break;case 27:i=[t.location];break;case 33:case 35:i=[t.key,t.type,t.persistent,t.message,t.icon];this._additionalOutlookParams$p$0.setActionsDefinition(t.actions);break;case 36:i=[t.key];break;case 101:r=t;break;default:break}if(n!==1){var u;this._additionalOutlookParams$p$0.updateOutlookExecuteParameters(u={val:i},r),i=u.val}return i},_displayNewAppointmentFormApi$p$0:function(n){var f=window.OSF.DDA.OutlookAppOm._validateAndNormalizeRecipientEmails$p(n.requiredAttendees,"requiredAttendees");var u=window.OSF.DDA.OutlookAppOm._validateAndNormalizeRecipientEmails$p(n.optionalAttendees,"optionalAttendees");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(n.location,0,window.OSF.DDA.OutlookAppOm._maxLocationLength$p,"location");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(n.body,0,window.OSF.DDA.OutlookAppOm.maxBodyLength,"body");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(n.subject,0,window.OSF.DDA.OutlookAppOm._maxSubjectLength$p,"subject");if(!r.ScriptHelpers.isNullOrUndefined(n.start)){window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(n.start,Date,"start");var s=n.start;n.start=s.getTime();if(!r.ScriptHelpers.isNullOrUndefined(n.end)){window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(n.end,Date,"end");var i=n.end;if(i=0&&n.getTime()-u<0)return window.parseInt(t.offset)}throw Error.format(window._u.ExtensibilityStrings.l_InvalidDate_Text);},_areStringsLoaded$p$0:function(){var n=!1;try{n=!r.ScriptHelpers.isNullOrUndefined(window._u.ExtensibilityStrings.l_EwsRequestOversized_Text)}catch(t){}return n},_loadLocalizedScript$p$0:function(n){for(var s=null,l="",a=document.getElementsByTagName("script"),o=a.length-1;o>=0;o--){var i=null;var v=a[o].attributes;if(v){var p=v.getNamedItem("src");p&&(i=p.value);if(i){var y=!1;i=i.toLowerCase();var f=i.indexOf("office_strings.js");if(f<0){f=i.indexOf("office_strings.debug.js");y=!0}if(f>0&&fu+1&&(l=r.substring(0,u+1));break}}}}if(s){var h=document.getElementsByTagName("head")[0];var t=null;var b=this;var e=function(){if(n&&(!t.readyState||t.readyState&&(t.readyState==="loaded"||t.readyState==="complete"))){t.onload=null;t.onreadystatechange=null;n()}};var c=this;var w=function(){if(!c._areStringsLoaded$p$0()){var n=l+"en-us/"+"outlook_strings.js";t.onload=null;t.onreadystatechange=null;t=c._createScriptElement$p$0(n);t.onload=e;t.onreadystatechange=e;h.appendChild(t)}};t=this._createScriptElement$p$0(s);t.onload=e;t.onreadystatechange=e;window.setTimeout(w,2e3);h.appendChild(t)}},_createScriptElement$p$0:function(n){var t=document.createElement("script");t.type="text/javascript";t.src=n;return t}};u.DDA.OutlookAppOm.prototype.initialize=function(n){if(!n){this._additionalOutlookParams$p$0=new r.AdditionalGlobalParameters(!0);this._initialData$p$0=null;this._item$p$0=null;return}var t="itemType";this._initialData$p$0=new r.InitialData(n);this._hostItemType$p$0=n[t];1===n[t]?this._item$p$0=new r.Message(this._initialData$p$0):3===n[t]?this._item$p$0=new r.MeetingRequest(this._initialData$p$0):2===n[t]?this._item$p$0=new r.Appointment(this._initialData$p$0):4===n[t]?this._item$p$0=new r.MessageCompose(this._initialData$p$0):5===n[t]?this._item$p$0=new r.AppointmentCompose(this._initialData$p$0):6===n[t];this._userProfile$p$0=new r.UserProfile(this._initialData$p$0);this._diagnostics$p$0=new r.Diagnostics(this._initialData$p$0,this._officeAppContext$p$0.get_appName());var i=window.OSF.DDA.OutlookAppOm._instance$p.get__appName$i$0()!==8||this.isOutlook16OrGreater()||this.isApiVersionSupported("1.5");this._additionalOutlookParams$p$0=new r.AdditionalGlobalParameters(i);"itemNumber"in n&&this.setCurrentItemNumber(n.itemNumber);this._initializeMethods$p$0();r.InitialData._defineReadOnlyProperty$i(this,"item",this.$$d_getItem);r.InitialData._defineReadOnlyProperty$i(this,"userProfile",this.$$d__getUserProfile$p$0);r.InitialData._defineReadOnlyProperty$i(this,"diagnostics",this.$$d__getDiagnostics$p$0);r.InitialData._defineReadOnlyProperty$i(this,"ewsUrl",this.$$d__getEwsUrl$p$0);r.InitialData._defineReadOnlyProperty$i(this,"restUrl",this.$$d__getRestUrl$p$0);window.OSF.DDA.OutlookAppOm._instance$p.get__appName$i$0()===64&&this._initialData$p$0.get__overrideWindowOpen$i$0()&&(window.open=this.$$d_windowOpenOverrideHandler);this.addEventSupport()};u.DDA.OutlookAppOm.prototype.makeEwsRequestAsync=function(n){for(var u=[],i=1;iwindow.OSF.DDA.OutlookAppOm._maxEwsRequestSize$p)throw Error.argument("data",window._u.ExtensibilityStrings.l_EwsRequestOversized_Text);this._throwOnMethodCallForInsufficientPermission$i$0(3,"makeEwsRequestAsync");var f=r.CommonParameters.parse(u,!0,!0);var t=new r.EwsRequest(f._asyncContext$p$0);var e=this;t.onreadystatechange=function(){4===t.get__requestState$i$1()&&f._callback$p$0(t._asyncResult$p$0)};t.send(n)};u.DDA.OutlookAppOm.prototype.recordDataPoint=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");this.invokeHostMethod(402,n,null)};u.DDA.OutlookAppOm.prototype.recordTrace=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");this.invokeHostMethod(401,n,null)};u.DDA.OutlookAppOm.prototype.trackCtq=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");this.invokeHostMethod(400,n,null)};u.DDA.OutlookAppOm.prototype.convertToLocalClientTime=function(n){var t=new Date(n.getTime());var i=t.getTimezoneOffset()*-1;if(this._initialData$p$0&&this._initialData$p$0.get__timeZoneOffsets$i$0()){t.setUTCMinutes(t.getUTCMinutes()-i);i=this._findOffset$p$0(t);t.setUTCMinutes(t.getUTCMinutes()+i)}var r=this._dateToDictionary$i$0(t);r.timezoneOffset=i;return r};u.DDA.OutlookAppOm.prototype.convertToUtcClientTime=function(n){var t=this._dictionaryToDate$i$0(n);if(this._initialData$p$0&&this._initialData$p$0.get__timeZoneOffsets$i$0()){var i=this._findOffset$p$0(t);t.setUTCMinutes(t.getUTCMinutes()-i);i=n.timezoneOffset?n.timezoneOffset:t.getTimezoneOffset()*-1;t.setUTCMinutes(t.getUTCMinutes()+i)}return t};u.DDA.OutlookAppOm.prototype.convertToRestId=function(n,t){if(!n)throw Error.argumentNull("itemId");window.OSF.DDA.OutlookAppOm._throwOnInvalidRestVersion$p(t);return n.replace(new RegExp("[/]","g"),"-").replace(new RegExp("[+]","g"),"_")};u.DDA.OutlookAppOm.prototype.convertToEwsId=function(n,t){if(!n)throw Error.argumentNull("itemId");window.OSF.DDA.OutlookAppOm._throwOnInvalidRestVersion$p(t);return n.replace(new RegExp("[-]","g"),"/").replace(new RegExp("[_]","g"),"+")};u.DDA.OutlookAppOm.prototype.getUserIdentityTokenAsync=function(){for(var i=[],n=0;n32768){var f=window.OSF.DDA.OutlookAppOm._instance$p.createAsyncResult(null,1,9019,n._asyncContext$p$0,"");var e=this;window.setTimeout(function(){n._callback$p$0(f)},0);return}window.OSF.DDA.OutlookAppOm._instance$p.get__appName$i$0()===64?this._saveSettingsForOwa$p$0(n._callback$p$0,n._asyncContext$p$0):this._saveSettingsForOutlook$p$0(n._callback$p$0,n._asyncContext$p$0)};Type.registerNamespace("$h");var r=window.$h||{};Type.registerNamespace("Office.cast");var f=window.Office||{};f.cast=f.cast||{};r.AdditionalGlobalParameters=function(n){this._parameterBlobSupported$p$0=n;this._itemNumber$p$0=0};r.AdditionalGlobalParameters.prototype={_parameterBlobSupported$p$0:!1,_itemNumber$p$0:0,_actionsDefinition$p$0:null,setActionsDefinition:function(n){this._actionsDefinition$p$0=n},setCurrentItemNumber:function(n){n>0&&(this._itemNumber$p$0=n)},get_itemNumber:function(){return this._itemNumber$p$0},get_actionsDefinition:function(){return this._actionsDefinition$p$0},updateOutlookExecuteParameters:function(n,t){if(this._parameterBlobSupported$p$0){this._itemNumber$p$0>0&&(t.itemNumber=this._itemNumber$p$0.toString());this._actionsDefinition$p$0&&(t.actions=this._actionsDefinition$p$0);if(!Object.keys(t).length)return;n.val||(n.val=[]);n.val.push(window.JSON.stringify(t))}}};r.Appointment=function(n){this.$$d__getOrganizer$p$2=Function.createDelegate(this,this._getOrganizer$p$2);this.$$d__getNormalizedSubject$p$2=Function.createDelegate(this,this._getNormalizedSubject$p$2);this.$$d__getSubject$p$2=Function.createDelegate(this,this._getSubject$p$2);this.$$d__getResources$p$2=Function.createDelegate(this,this._getResources$p$2);this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2);this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2);this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2);this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2);this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2);r.Appointment.initializeBase(this,[n]);r.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2);r.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2);r.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2);r.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"resources",this.$$d__getResources$p$2);r.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2);r.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2);r.InitialData._defineReadOnlyProperty$i(this,"organizer",this.$$d__getOrganizer$p$2)};r.Appointment.prototype={getItemType:function(){return window.Microsoft.Office.WebExtension.MailboxEnums.ItemType.Appointment},_getStart$p$2:function(){return this._data$p$0.get__start$i$0()},_getEnd$p$2:function(){return this._data$p$0.get__end$i$0()},_getLocation$p$2:function(){return this._data$p$0.get__location$i$0()},_getOptionalAttendees$p$2:function(){return this._data$p$0.get__cc$i$0()},_getRequiredAttendees$p$2:function(){return this._data$p$0.get__to$i$0()},_getResources$p$2:function(){return this._data$p$0.get__resources$i$0()},_getSubject$p$2:function(){return this._data$p$0.get__subject$i$0()},_getNormalizedSubject$p$2:function(){return this._data$p$0.get__normalizedSubject$i$0()},_getOrganizer$p$2:function(){return this._data$p$0.get__organizer$i$0()}};r.Appointment.prototype.getEntities=function(){return this._data$p$0._getEntities$i$0()};r.Appointment.prototype.getEntitiesByType=function(n){return this._data$p$0._getEntitiesByType$i$0(n)};r.Appointment.prototype.getSelectedEntities=function(){return this._data$p$0._getSelectedEntities$i$0()};r.Appointment.prototype.getRegExMatches=function(){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches");return this._data$p$0._getRegExMatches$i$0()};r.Appointment.prototype.getFilteredEntitiesByName=function(n){return this._data$p$0._getFilteredEntitiesByName$i$0(n)};r.Appointment.prototype.getRegExMatchesByName=function(n){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName");return this._data$p$0._getRegExMatchesByName$i$0(n)};r.Appointment.prototype.getSelectedRegExMatches=function(){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedRegExMatches");return this._data$p$0._getSelectedRegExMatches$i$0()};r.Appointment.prototype.displayReplyForm=function(n){window.OSF.DDA.OutlookAppOm._instance$p._displayReplyForm$i$0(n)};r.Appointment.prototype.displayReplyAllForm=function(n){window.OSF.DDA.OutlookAppOm._instance$p._displayReplyAllForm$i$0(n)};r.AppointmentCompose=function(n){this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2);this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2);this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2);this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2);this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2);r.AppointmentCompose.initializeBase(this,[n]);r.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2);r.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2);r.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2)};r.AppointmentCompose.prototype={_requiredAttendees$p$2:null,_optionalAttendees$p$2:null,_start$p$2:null,_end$p$2:null,_location$p$2:null,getItemType:function(){return window.Microsoft.Office.WebExtension.MailboxEnums.ItemType.Appointment},_getRequiredAttendees$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._requiredAttendees$p$2||(this._requiredAttendees$p$2=new r.ComposeRecipient(0,"requiredAttendees"));return this._requiredAttendees$p$2},_getOptionalAttendees$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._optionalAttendees$p$2||(this._optionalAttendees$p$2=new r.ComposeRecipient(1,"optionalAttendees"));return this._optionalAttendees$p$2},_getStart$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._start$p$2||(this._start$p$2=new r.ComposeTime(1));return this._start$p$2},_getEnd$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._end$p$2||(this._end$p$2=new r.ComposeTime(2));return this._end$p$2},_getLocation$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._location$p$2||(this._location$p$2=new r.ComposeLocation);return this._location$p$2}};r.AttachmentConstants=function(){};r.AttachmentDetails=function(n){this.$$d__getIsInline$p$0=Function.createDelegate(this,this._getIsInline$p$0);this.$$d__getAttachmentType$p$0=Function.createDelegate(this,this._getAttachmentType$p$0);this.$$d__getSize$p$0=Function.createDelegate(this,this._getSize$p$0);this.$$d__getContentType$p$0=Function.createDelegate(this,this._getContentType$p$0);this.$$d__getName$p$0=Function.createDelegate(this,this._getName$p$0);this.$$d__getId$p$0=Function.createDelegate(this,this._getId$p$0);this._data$p$0=n;r.InitialData._defineReadOnlyProperty$i(this,"id",this.$$d__getId$p$0);r.InitialData._defineReadOnlyProperty$i(this,"name",this.$$d__getName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"contentType",this.$$d__getContentType$p$0);r.InitialData._defineReadOnlyProperty$i(this,"size",this.$$d__getSize$p$0);r.InitialData._defineReadOnlyProperty$i(this,"attachmentType",this.$$d__getAttachmentType$p$0);r.InitialData._defineReadOnlyProperty$i(this,"isInline",this.$$d__getIsInline$p$0)};r.AttachmentDetails.prototype={_data$p$0:null,_getId$p$0:function(){return this._data$p$0.id},_getName$p$0:function(){return this._data$p$0.name},_getContentType$p$0:function(){return this._data$p$0.contentType},_getSize$p$0:function(){return this._data$p$0.size},_getAttachmentType$p$0:function(){var n=this._data$p$0.attachmentType;return n255)throw Error.argumentOutOfRange("recipients",n.length,window._u.ExtensibilityStrings.l_DisplayNameTooLong_Text);if(t&&t.length>571)throw Error.argumentOutOfRange("recipients",t.length,window._u.ExtensibilityStrings.l_EmailAddressTooLong_Text);};r.ComposeRecipient._getAsyncFormatter$p=function(n){for(var u=n,i=[],t=0;t864e13)throw Error.argumentOutOfRange("dateTime");var i=r.CommonParameters.parse(u,!1);window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(25,{TimeProperty:this._timeType$p$0,time:n.getTime()},null,i._asyncContext$p$0,i._callback$p$0)};r.ComposeTime.TimeType=function(){};r.ComposeTime.TimeType.prototype={start:1,end:2};r.ComposeTime.TimeType.registerEnum("$h.ComposeTime.TimeType",!1);r.Contact=function(n){this.$$d__getContactString$p$0=Function.createDelegate(this,this._getContactString$p$0);this.$$d__getAddresses$p$0=Function.createDelegate(this,this._getAddresses$p$0);this.$$d__getUrls$p$0=Function.createDelegate(this,this._getUrls$p$0);this.$$d__getEmailAddresses$p$0=Function.createDelegate(this,this._getEmailAddresses$p$0);this.$$d__getPhoneNumbers$p$0=Function.createDelegate(this,this._getPhoneNumbers$p$0);this.$$d__getBusinessName$p$0=Function.createDelegate(this,this._getBusinessName$p$0);this.$$d__getPersonName$p$0=Function.createDelegate(this,this._getPersonName$p$0);this._data$p$0=n;r.InitialData._defineReadOnlyProperty$i(this,"personName",this.$$d__getPersonName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"businessName",this.$$d__getBusinessName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0);r.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0);r.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0);r.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0);r.InitialData._defineReadOnlyProperty$i(this,"contactString",this.$$d__getContactString$p$0)};r.Contact.prototype={_data$p$0:null,_phoneNumbers$p$0:null,_getPersonName$p$0:function(){return this._data$p$0.PersonName},_getBusinessName$p$0:function(){return this._data$p$0.BusinessName},_getAddresses$p$0:function(){return r.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses")},_getEmailAddresses$p$0:function(){return r.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses")},_getUrls$p$0:function(){return r.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls")},_getPhoneNumbers$p$0:function(){if(!this._phoneNumbers$p$0){var n=this;this._phoneNumbers$p$0=r.Entities._getExtractedObjects$i(r.PhoneNumber,this._data$p$0,"PhoneNumbers",function(n){return new r.PhoneNumber(n)})}return this._phoneNumbers$p$0},_getContactString$p$0:function(){return this._data$p$0.ContactString}};r.CustomProperties=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");if(Array.isInstanceOfType(n)){var t=n;if(t.length>0)this._data$p$0=t[0];else throw Error.argument("data");}else this._data$p$0=n};r.CustomProperties.prototype={_data$p$0:null};r.CustomProperties.prototype.get=function(n){var i=this._data$p$0[n];if(typeof i=="string"){var t=i;if(t.length>6&&t.startsWith("Date(")&&t.endsWith(")")){var f=t.substring(5,t.length-1);var r=window.parseInt(f);if(!window.isNaN(r)){var u=new Date(r);u&&(i=u)}}}return i};r.CustomProperties.prototype.set=function(n,t){window.OSF.OUtil.isDate(t)&&(t="Date("+t.getTime()+")");this._data$p$0[n]=t};r.CustomProperties.prototype.remove=function(n){delete this._data$p$0[n]};r.CustomProperties.prototype.saveAsync=function(){for(var i=[],n=0;nf)throw Error.argument();var t=r.CommonParameters.parse(i,!1,!0);var u=new r.SaveDictionaryRequest(t._callback$p$0,t._asyncContext$p$0);u._sendRequest$i$0(4,"SaveCustomProperties",{customProperties:this._data$p$0})};r.Diagnostics=function(n,t){this.$$d__getOwaView$p$0=Function.createDelegate(this,this._getOwaView$p$0);this.$$d__getHostVersion$p$0=Function.createDelegate(this,this._getHostVersion$p$0);this.$$d__getHostName$p$0=Function.createDelegate(this,this._getHostName$p$0);this._data$p$0=n;this._appName$p$0=t;r.InitialData._defineReadOnlyProperty$i(this,"hostName",this.$$d__getHostName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"hostVersion",this.$$d__getHostVersion$p$0);64===this._appName$p$0&&r.InitialData._defineReadOnlyProperty$i(this,"OWAView",this.$$d__getOwaView$p$0)};r.Diagnostics.prototype={_data$p$0:null,_appName$p$0:0,_getHostName$p$0:function(){switch(this._appName$p$0){case 8:return"Outlook";case 64:return"OutlookWebApp";case 65536:return"OutlookIOS";case 4194304:return"OutlookAndroid";default:return null}},_getHostVersion$p$0:function(){return this._data$p$0.get__hostVersion$i$0()},_getOwaView$p$0:function(){return this._data$p$0.get__owaView$i$0()}};r.EmailAddressDetails=function(n){this.$$d__getRecipientType$p$0=Function.createDelegate(this,this._getRecipientType$p$0);this.$$d__getAppointmentResponse$p$0=Function.createDelegate(this,this._getAppointmentResponse$p$0);this.$$d__getDisplayName$p$0=Function.createDelegate(this,this._getDisplayName$p$0);this.$$d__getEmailAddress$p$0=Function.createDelegate(this,this._getEmailAddress$p$0);this._data$p$0=n;r.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0);r.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0);r.ScriptHelpers.dictionaryContainsKey(n,"appointmentResponse")&&r.InitialData._defineReadOnlyProperty$i(this,"appointmentResponse",this.$$d__getAppointmentResponse$p$0);r.ScriptHelpers.dictionaryContainsKey(n,"recipientType")&&r.InitialData._defineReadOnlyProperty$i(this,"recipientType",this.$$d__getRecipientType$p$0)};r.EmailAddressDetails._createFromEmailUserDictionary$i=function(n){var t={};var u=n.Name;var i=n.UserId;t.name=u||r.EmailAddressDetails._emptyString$p;t.address=i||r.EmailAddressDetails._emptyString$p;return new r.EmailAddressDetails(t)};r.EmailAddressDetails.prototype={_data$p$0:null,_getEmailAddress$p$0:function(){return this._data$p$0.address},_getDisplayName$p$0:function(){return this._data$p$0.name},_getAppointmentResponse$p$0:function(){var n=this._data$p$0.appointmentResponse;return n=0;u--){for(var e=!1,f=u-1;f>=0;f--)if(i(t[u],t[f],r)){e=!0;break}e&&Array.removeAt(t,u)}return t};r.Entities.prototype={_dateTimeSent$p$0:null,_data$p$0:null,_filteredData$p$0:null,_filteredEntitiesCache$p$0:null,_permissionLevel$p$0:0,_taskSuggestions$p$0:null,_meetingSuggestions$p$0:null,_phoneNumbers$p$0:null,_contacts$p$0:null,_addresses$p$0:null,_emailAddresses$p$0:null,_urls$p$0:null,_flightReservations$p$0:null,_parcelDeliveries$p$0:null,_getByType$i$0:function(n){if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.MeetingSuggestion)return this._getMeetingSuggestions$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.TaskSuggestion)return this._getTaskSuggestions$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.Address)return this._getAddresses$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.PhoneNumber)return this._getPhoneNumbers$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.EmailAddress)return this._getEmailAddresses$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.Url)return this._getUrls$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.Contact)return this._getContacts$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.FlightReservations)return this._getFlightReservations$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.ParcelDeliveries)return this._getParcelDeliveries$p$0();return null},_getFilteredEntitiesByName$i$0:function(n){this._filteredEntitiesCache$p$0||(this._filteredEntitiesCache$p$0={});if(!r.ScriptHelpers.dictionaryContainsKey(this._filteredEntitiesCache$p$0,n)){for(var u=!1,i=0;i0)return new Date(n.getFullYear()+t._offset$i$1,0,1);break;default:break}return n};r.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p=function(n,t,i){if(t>-5&&t<5){var u=(i+6)%7+1;var r=7*t+(u-n.getDay());n.setDate(n.getDate()+r);return n}else{var r=(i-n.getDay())%7;r<0&&(r+=7);n.setDate(n.getDate()+r);return n}};r.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p=function(n,t){var e;var i;var u;e=n;if(t._tag$i$1<=0||t._tag$i$1>12||t._offset$i$1<=0||t._offset$i$1>5)return n;var o=(12+t._tag$i$1-e.getMonth()-1)%12;i=new Date(e.getFullYear(),e.getMonth()+o,1);if(t._modifier$i$1===1)if(t._offset$i$1===1&&i.getDay()!==6&&i.getDay())return i;else{u=new Date(i.getFullYear(),i.getMonth(),i.getDate());u.setDate(u.getDate()+(8-i.getDay())%7);i.getDay()!==6&&i.getDay()&&i.getDay()!==1&&u.setDate(u.getDate()-7);u.setDate(u.getDate()+7*(t._offset$i$1-1));return u.getMonth()+1!==t._tag$i$1?n:u}else{u=new Date(i.getFullYear(),i.getMonth(),r.MeetingSuggestionTimeDecoder._daysInMonth$p(i.getMonth(),i.getFullYear()));var f=1-u.getDay();f>0&&(f=f-7);u.setDate(u.getDate()+f);u.setDate(u.getDate()+7*(1-t._offset$i$1));return u.getMonth()+1!==t._tag$i$1?i.getDay()!==6&&i.getDay()?i:n:u}};r.MeetingSuggestionTimeDecoder._decode$p=function(n,t,i,u){var o=32767;i.val=null;u.val=0;if(!n)return!1;u.val=t?r.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p(n):r.MeetingSuggestionTimeDecoder._getTimeOfDayInMilliseconds$p(n);var s=n.getTime()-u.val;var f=(s-r.MeetingSuggestionTimeDecoder._baseDate$p.getTime())/864e5;if(f<0)return!1;else if(f>=262144)return!1;else{var e=f>>15;f=f&o;switch(e){case 0:return r.MeetingSuggestionTimeDecoder._decodePreciseDate$p(f,i);case 1:return r.MeetingSuggestionTimeDecoder._decodeRelativeDate$p(f,i);default:return!1}}};r.MeetingSuggestionTimeDecoder._decodePreciseDate$p=function(n,t){var c=7;var o=15;var s=31;var h=127;var f=null;var u=0;var e=0;t.val=null;var i=n>>12&c;if((i&4)==4){f=n>>5&h;if((i&2)==2){if((i&1)==1)return!1;u=n>>1&o}}else{(i&2)==2&&(u=n>>8&o);(i&1)==1&&(e=n>>3&s)}t.val=new r._preciseDate(e,u,f);return!0};r.MeetingSuggestionTimeDecoder._decodeRelativeDate$p=function(n,t){var s=15;var o=63;var c=7;var h=3;var u=n&s;n>>=4;var i=r.MeetingSuggestionTimeDecoder._fromComplement$p(n&o,6);n>>=6;var e=n&c;n>>=3;var f=n&h;try{t.val=new r._relativeDate(f,i,e,u);return!0}catch(l){t.val=null;return!1}};r.MeetingSuggestionTimeDecoder._fromComplement$p=function(n,t){var i=1<1)throw Error.argument("actions",window._u.ExtensibilityStrings.l_ActionsDefinitionMultipleActionsError_Text);}else throw Error.argument("actions",String.format(window._u.ExtensibilityStrings.l_InvalidParameterValueError_Text,"actions"));return i};r.NotificationMessages._validateActionsDefinitionActionType$p=function(n,t){if(!n.actionType)throw Error.argument("actionType",String.format(window._u.ExtensibilityStrings.l_NullOrEmptyParameterError_Text,"actionType"));if("showTaskPane"!==n.actionType)throw Error.argument("actionType",window._u.ExtensibilityStrings.l_InvalidActionType_Text);else if(!r.ScriptHelpers.isNonEmptyString(n.commandId))throw Error.argument("commandId",String.format(window._u.ExtensibilityStrings.l_InvalidCommandIdError_Text,"commandId"));};r.NotificationMessages._validateActionsDefinitionActionText$p=function(n){if(!r.ScriptHelpers.isNonEmptyString(n.actionText))throw Error.argument("actionText",String.format(window._u.ExtensibilityStrings.l_NullOrEmptyParameterError_Text,"actionText"));if(n.actionText.length>30)throw Error.argument(window._u.ExtensibilityStrings.l_ParameterValueTooLongError_Text,String.format(window._u.ExtensibilityStrings.l_ParameterValueTooLongError_Text,"actionText",30));};r.NotificationMessages.prototype.addAsync=function(n,t){for(var f=[],i=2;i2||!r.CommonParameters._argIsFunction$p(n[0]))return!1;f=n[0];i>1&&(u=n[1]);t.val=new r.CommonParameters(null,f,u);return!0};r.CommonParameters._argIsFunction$p=function(n){return typeof n=="function"};r.CommonParameters.prototype={_options$p$0:null,_callback$p$0:null,_asyncContext$p$0:null,get_options:function(){return this._options$p$0},get_callback:function(){return this._callback$p$0},get_asyncContext:function(){return this._asyncContext$p$0}};r.EwsRequest=function(n){r.EwsRequest.initializeBase(this,[n])};r.EwsRequest.prototype={readyState:1,status:0,statusText:null,onreadystatechange:null,responseText:null,get__statusCode$i$1:function(){return this.status},set__statusCode$i$1:function(n){this.status=n;return n},get__statusDescription$i$1:function(){return this.statusText},set__statusDescription$i$1:function(n){this.statusText=n;return n},get__requestState$i$1:function(){return this.readyState},set__requestState$i$1:function(n){this.readyState=n;return n},get_hasOnReadyStateChangeCallback:function(){return!r.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)},get__response$i$1:function(){return this.responseText},set__response$i$1:function(n){this.responseText=n;return n},send:function(n){this._checkSendConditions$i$1();r.ScriptHelpers.isNullOrUndefined(n)&&this._throwInvalidStateException$i$1();this._sendRequest$i$0(5,"EwsRequest",{body:n})},_callOnReadyStateChangeCallback$i$1:function(){r.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)||this.onreadystatechange()},_parseExtraResponseData$i$1:function(n){},executeExtraFailedResponseSteps:function(){}};r.InitialData=function(n){this._data$p$0=n;this._permissionLevel$p$0=this._calculatePermissionLevel$p$0()};r.InitialData._defineReadOnlyProperty$i=function(n,t,i){var r={get:i,configurable:!1};window.Object.defineProperty(n,t,r)};r.InitialData.prototype={_toRecipients$p$0:null,_ccRecipients$p$0:null,_attachments$p$0:null,_resources$p$0:null,_entities$p$0:null,_selectedEntities$p$0:null,_data$p$0:null,_permissionLevel$p$0:0,get__isRestIdSupported$i$0:function(){return this._data$p$0.isRestIdSupported},get__itemId$i$0:function(){return this._data$p$0.id},get__itemClass$i$0:function(){return this._data$p$0.itemClass},get__dateTimeCreated$i$0:function(){return new Date(this._data$p$0.dateTimeCreated)},get__dateTimeModified$i$0:function(){return new Date(this._data$p$0.dateTimeModified)},get__dateTimeSent$i$0:function(){return new Date(this._data$p$0.dateTimeSent)},get__subject$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();return this._data$p$0.subject},get__normalizedSubject$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();return this._data$p$0.normalizedSubject},get__internetMessageId$i$0:function(){return this._data$p$0.internetMessageId},get__conversationId$i$0:function(){return this._data$p$0.conversationId},get__sender$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();var n=this._data$p$0.sender;return r.ScriptHelpers.isNullOrUndefined(n)?null:new r.EmailAddressDetails(n)},get__from$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();var n=this._data$p$0.from;return r.ScriptHelpers.isNullOrUndefined(n)?null:new r.EmailAddressDetails(n)},get__to$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._toRecipients$p$0&&(this._toRecipients$p$0=this._createEmailAddressDetails$p$0("to"));return this._toRecipients$p$0},get__cc$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._ccRecipients$p$0&&(this._ccRecipients$p$0=this._createEmailAddressDetails$p$0("cc"));return this._ccRecipients$p$0},get__attachments$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._attachments$p$0&&(this._attachments$p$0=this._createAttachmentDetails$p$0());return this._attachments$p$0},get__ewsUrl$i$0:function(){return this._data$p$0.ewsUrl},get__restUrl$i$0:function(){return this._data$p$0.restUrl},get__marketplaceAssetId$i$0:function(){return this._data$p$0.marketplaceAssetId},get__extensionId$i$0:function(){return this._data$p$0.extensionId},get__marketplaceContentMarket$i$0:function(){return this._data$p$0.marketplaceContentMarket},get__consentMetadata$i$0:function(){return this._data$p$0.consentMetadata},get__isRead$i$0:function(){return this._data$p$0.isRead},get__endNodeUrl$i$0:function(){return this._data$p$0.endNodeUrl},get__entryPointUrl$i$0:function(){return this._data$p$0.entryPointUrl},get__start$i$0:function(){return new Date(this._data$p$0.start)},get__end$i$0:function(){return new Date(this._data$p$0.end)},get__location$i$0:function(){return this._data$p$0.location},get__userProfileType$i$0:function(){return this._data$p$0.userProfileType},get__resources$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._resources$p$0&&(this._resources$p$0=this._createEmailAddressDetails$p$0("resources"));return this._resources$p$0},get__organizer$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();var n=this._data$p$0.organizer;return r.ScriptHelpers.isNullOrUndefined(n)?null:new r.EmailAddressDetails(n)},get__userProfileCapabilities$i$0:function(){return this._data$p$0.userProfileCapabilities},get__userDisplayName$i$0:function(){return this._data$p$0.userDisplayName},get__userEmailAddress$i$0:function(){return this._data$p$0.userEmailAddress},get__userTimeZone$i$0:function(){return this._data$p$0.userTimeZone},get__timeZoneOffsets$i$0:function(){return this._data$p$0.timeZoneOffsets},get__hostVersion$i$0:function(){return this._data$p$0.hostVersion},get__owaView$i$0:function(){return this._data$p$0.owaView},get__overrideWindowOpen$i$0:function(){return this._data$p$0.overrideWindowOpen},_getEntities$i$0:function(){this._entities$p$0||(this._entities$p$0=new r.Entities(this._data$p$0.entities,this._data$p$0.filteredEntities,this.get__dateTimeSent$i$0(),this._permissionLevel$p$0));return this._entities$p$0},_getSelectedEntities$i$0:function(){this._selectedEntities$p$0||(this._selectedEntities$p$0=new r.Entities(this._data$p$0.selectedEntities,null,this.get__dateTimeSent$i$0(),this._permissionLevel$p$0));return this._selectedEntities$p$0},_getEntitiesByType$i$0:function(n){var t=this._getEntities$i$0();return t._getByType$i$0(n)},_getFilteredEntitiesByName$i$0:function(n){var t=this._getEntities$i$0();return t._getFilteredEntitiesByName$i$0(n)},_getRegExMatches$i$0:function(){return this._data$p$0.regExMatches?this._data$p$0.regExMatches:null},_getSelectedRegExMatches$i$0:function(){return this._data$p$0.selectedRegExMatches?this._data$p$0.selectedRegExMatches:null},_getRegExMatchesByName$i$0:function(n){var t=this._getRegExMatches$i$0();return!t||!t[n]?null:t[n]},_throwOnRestrictedPermissionLevel$i$0:function(){window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0)},_createEmailAddressDetails$p$0:function(n){var i=this._data$p$0[n];if(r.ScriptHelpers.isNullOrUndefined(i))return[];for(var u=[],t=0;t 0) - bucketPositive.push(ele); - else if(ele.tabIndex===0) - bucket0.push(ele) - } - else - bucket0.push(ele) - } - bucketPositive=bucketPositive.sort(function(left, right) - { - var diff=left.tabIndex - right.tabIndex; - if(diff===0) - diff=bucketPositive.indexOf(left) - bucketPositive.indexOf(right); - return diff - }); - return[].concat(bucketPositive,bucket0) - } - return{ - set_entropy: function OSF_OUtil$set_entropy(entropy) - { - if(typeof entropy=="string") - for(var i=0; i < entropy.length; i+=4) - { - var temp=0; - for(var j=0; j < 4 && i+j < entropy.length; j++) - temp=(temp << 8)+entropy.charCodeAt(i+j); - _rndentropy ^=temp - } - else if(typeof entropy=="number") - _rndentropy ^=entropy; - else - _rndentropy ^=2147483647 * Math.random(); - _rndentropy &=2147483647 - }, - extend: function OSF_OUtil$extend(child, parent) - { - var F=function(){}; - F.prototype=parent.prototype; - child.prototype=new F; - child.prototype.constructor=child; - child.uber=parent.prototype; - if(parent.prototype.constructor===Object.prototype.constructor) - parent.prototype.constructor=parent - }, - setNamespace: function OSF_OUtil$setNamespace(name, parent) - { - if(parent && name && !parent[name]) - parent[name]={} - }, - unsetNamespace: function OSF_OUtil$unsetNamespace(name, parent) - { - if(parent && name && parent[name]) - delete parent[name] - }, - loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) - { - if(url && callback) - { - var doc=window.document; - var _loadedScriptEntry=_loadedScripts[url]; - if(!_loadedScriptEntry) - { - var script=doc.createElement("script"); - script.type="text/javascript"; - _loadedScriptEntry={ - loaded: false, - pendingCallbacks: [callback], - timer: null - }; - _loadedScripts[url]=_loadedScriptEntry; - var onLoadCallback=function OSF_OUtil_loadScript$onLoadCallback() - { - if(_loadedScriptEntry.timer !=null) - { - clearTimeout(_loadedScriptEntry.timer); - delete _loadedScriptEntry.timer - } - _loadedScriptEntry.loaded=true; - var pendingCallbackCount=_loadedScriptEntry.pendingCallbacks.length; - for(var i=0; i < pendingCallbackCount; i++) - { - var currentCallback=_loadedScriptEntry.pendingCallbacks.shift(); - currentCallback() - } - }; - var onLoadError=function OSF_OUtil_loadScript$onLoadError() - { - delete _loadedScripts[url]; - if(_loadedScriptEntry.timer !=null) - { - clearTimeout(_loadedScriptEntry.timer); - delete _loadedScriptEntry.timer - } - var pendingCallbackCount=_loadedScriptEntry.pendingCallbacks.length; - for(var i=0; i < pendingCallbackCount; i++) - { - var currentCallback=_loadedScriptEntry.pendingCallbacks.shift(); - currentCallback() - } - }; - if(script.readyState) - script.onreadystatechange=function() - { - if(script.readyState=="loaded" || script.readyState=="complete") - { - script.onreadystatechange=null; - onLoadCallback() - } - }; - else - script.onload=onLoadCallback; - script.onerror=onLoadError; - timeoutInMs=timeoutInMs || _defaultScriptLoadingTimeout; - _loadedScriptEntry.timer=setTimeout(onLoadError,timeoutInMs); - script.src=url; - doc.getElementsByTagName("head")[0].appendChild(script) - } - else if(_loadedScriptEntry.loaded) - callback(); - else - _loadedScriptEntry.pendingCallbacks.push(callback) - } - }, - loadCSS: function OSF_OUtil$loadCSS(url) - { - if(url) - { - var doc=window.document; - var link=doc.createElement("link"); - link.type="text/css"; - link.rel="stylesheet"; - link.href=url; - doc.getElementsByTagName("head")[0].appendChild(link) - } - }, - parseEnum: function OSF_OUtil$parseEnum(str, enumObject) - { - var parsed=enumObject[str.trim()]; - if(typeof parsed=="undefined") - { - OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:"+str); - throw OsfMsAjaxFactory.msAjaxError.argument("str"); - } - return parsed - }, - delayExecutionAndCache: function OSF_OUtil$delayExecutionAndCache() - { - var obj={calc: arguments[0]}; - return function() - { - if(obj.calc) - { - obj.val=obj.calc.apply(this,arguments); - delete obj.calc - } - return obj.val - } - }, - getUniqueId: function OSF_OUtil$getUniqueId() - { - _uniqueId=_uniqueId+1; - return _uniqueId.toString() - }, - formatString: function OSF_OUtil$formatString() - { - var args=arguments; - var source=args[0]; - return source.replace(/{(\d+)}/gm,function(match, number) - { - var index=parseInt(number,10)+1; - return args[index]===undefined ? "{"+number+"}" : args[index] - }) - }, - generateConversationId: function OSF_OUtil$generateConversationId() - { - return[_random(),_random(),(new Date).getTime().toString()].join("_") - }, - getFrameName: function OSF_OUtil$getFrameName(cacheKey) - { - return _xdmSessionKeyPrefix+cacheKey+this.generateConversationId() - }, - addXdmInfoAsHash: function OSF_OUtil$addXdmInfoAsHash(url, xdmInfoValue) - { - return OSF.OUtil.addInfoAsHash(url,_xdmInfoKey,xdmInfoValue,false) - }, - addSerializerVersionAsHash: function OSF_OUtil$addSerializerVersionAsHash(url, serializerVersion) - { - return OSF.OUtil.addInfoAsHash(url,_serializerVersionKey,serializerVersion,true) - }, - addInfoAsHash: function OSF_OUtil$addInfoAsHash(url, keyName, infoValue, encodeInfo) - { - url=url.trim() || ""; - var urlParts=url.split(_fragmentSeparator); - var urlWithoutFragment=urlParts.shift(); - var fragment=urlParts.join(_fragmentSeparator); - var newFragment; - if(encodeInfo) - newFragment=[keyName,encodeURIComponent(infoValue),fragment].join(""); - else - newFragment=[fragment,keyName,infoValue].join(""); - return[urlWithoutFragment,_fragmentSeparator,newFragment].join("") - }, - parseHostInfoFromWindowName: function OSF_OUtil$parseHostInfoFromWindowName(skipSessionStorage, windowName) - { - return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage,windowName,OSF.WindowNameItemKeys.HostInfo) - }, - parseXdmInfo: function OSF_OUtil$parseXdmInfo(skipSessionStorage) - { - var xdmInfoValue=OSF.OUtil.parseXdmInfoWithGivenFragment(skipSessionStorage,window.location.hash); - if(!xdmInfoValue) - xdmInfoValue=OSF.OUtil.parseXdmInfoFromWindowName(skipSessionStorage,window.name); - return xdmInfoValue - }, - parseXdmInfoFromWindowName: function OSF_OUtil$parseXdmInfoFromWindowName(skipSessionStorage, windowName) - { - return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage,windowName,OSF.WindowNameItemKeys.XdmInfo) - }, - parseXdmInfoWithGivenFragment: function OSF_OUtil$parseXdmInfoWithGivenFragment(skipSessionStorage, fragment) - { - return OSF.OUtil.parseInfoWithGivenFragment(_xdmInfoKey,_xdmSessionKeyPrefix,false,skipSessionStorage,fragment) - }, - parseSerializerVersion: function OSF_OUtil$parseSerializerVersion(skipSessionStorage) - { - var serializerVersion=OSF.OUtil.parseSerializerVersionWithGivenFragment(skipSessionStorage,window.location.hash); - if(isNaN(serializerVersion)) - serializerVersion=OSF.OUtil.parseSerializerVersionFromWindowName(skipSessionStorage,window.name); - return serializerVersion - }, - parseSerializerVersionFromWindowName: function OSF_OUtil$parseSerializerVersionFromWindowName(skipSessionStorage, windowName) - { - return parseInt(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage,windowName,OSF.WindowNameItemKeys.SerializerVersion)) - }, - parseSerializerVersionWithGivenFragment: function OSF_OUtil$parseSerializerVersionWithGivenFragment(skipSessionStorage, fragment) - { - return parseInt(OSF.OUtil.parseInfoWithGivenFragment(_serializerVersionKey,_serializerVersionKeyPrefix,true,skipSessionStorage,fragment)) - }, - parseInfoFromWindowName: function OSF_OUtil$parseInfoFromWindowName(skipSessionStorage, windowName, infoKey) - { - try - { - var windowNameObj=JSON.parse(windowName); - var infoValue=windowNameObj !=null ? windowNameObj[infoKey] : null; - var osfSessionStorage=_getSessionStorage(); - if(!skipSessionStorage && osfSessionStorage && windowNameObj !=null) - { - var sessionKey=windowNameObj[OSF.WindowNameItemKeys.BaseFrameName]+infoKey; - if(infoValue) - osfSessionStorage.setItem(sessionKey,infoValue); - else - infoValue=osfSessionStorage.getItem(sessionKey) - } - return infoValue - } - catch(Exception) - { - return null - } - }, - parseInfoWithGivenFragment: function OSF_OUtil$parseInfoWithGivenFragment(infoKey, infoKeyPrefix, decodeInfo, skipSessionStorage, fragment) - { - var fragmentParts=fragment.split(infoKey); - var infoValue=fragmentParts.length > 1 ? fragmentParts[fragmentParts.length - 1] : null; - if(decodeInfo && infoValue !=null) - { - if(infoValue.indexOf(_fragmentInfoDelimiter) >=0) - infoValue=infoValue.split(_fragmentInfoDelimiter)[0]; - infoValue=decodeURIComponent(infoValue) - } - var osfSessionStorage=_getSessionStorage(); - if(!skipSessionStorage && osfSessionStorage) - { - var sessionKeyStart=window.name.indexOf(infoKeyPrefix); - if(sessionKeyStart > -1) - { - var sessionKeyEnd=window.name.indexOf(";",sessionKeyStart); - if(sessionKeyEnd==-1) - sessionKeyEnd=window.name.length; - var sessionKey=window.name.substring(sessionKeyStart,sessionKeyEnd); - if(infoValue) - osfSessionStorage.setItem(sessionKey,infoValue); - else - infoValue=osfSessionStorage.getItem(sessionKey) - } - } - return infoValue - }, - getConversationId: function OSF_OUtil$getConversationId() - { - var searchString=window.location.search; - var conversationId=null; - if(searchString) - { - var index=searchString.indexOf("&"); - conversationId=index > 0 ? searchString.substring(1,index) : searchString.substr(1); - if(conversationId && conversationId.charAt(conversationId.length - 1)==="=") - { - conversationId=conversationId.substring(0,conversationId.length - 1); - if(conversationId) - conversationId=decodeURIComponent(conversationId) - } - } - return conversationId - }, - getInfoItems: function OSF_OUtil$getInfoItems(strInfo) - { - var items=strInfo.split("$"); - if(typeof items[1]=="undefined") - items=strInfo.split("|"); - if(typeof items[1]=="undefined") - items=strInfo.split("%7C"); - return items - }, - getXdmFieldValue: function OSF_OUtil$getXdmFieldValue(xdmFieldName, skipSessionStorage) - { - var fieldValue=""; - var xdmInfoValue=OSF.OUtil.parseXdmInfo(skipSessionStorage); - if(xdmInfoValue) - { - var items=OSF.OUtil.getInfoItems(xdmInfoValue); - if(items !=undefined && items.length >=3) - switch(xdmFieldName) - { - case OSF.XdmFieldName.ConversationUrl: - fieldValue=items[2]; - break; - case OSF.XdmFieldName.AppId: - fieldValue=items[1]; - break - } - } - return fieldValue - }, - validateParamObject: function OSF_OUtil$validateParamObject(params, expectedProperties, callback) - { - var e=Function._validateParams(arguments,[{ - name: "params", - type: Object, - mayBeNull: false - },{ - name: "expectedProperties", - type: Object, - mayBeNull: false - },{ - name: "callback", - type: Function, - mayBeNull: true - }]); - if(e) - throw e; - for(var p in expectedProperties) - { - e=Function._validateParameter(params[p],expectedProperties[p],p); - if(e) - throw e; - } - }, - writeProfilerMark: function OSF_OUtil$writeProfilerMark(text) - { - if(window.msWriteProfilerMark) - { - window.msWriteProfilerMark(text); - OsfMsAjaxFactory.msAjaxDebug.trace(text) - } - }, - outputDebug: function OSF_OUtil$outputDebug(text) - { - if(typeof OsfMsAjaxFactory !=="undefined" && OsfMsAjaxFactory.msAjaxDebug && OsfMsAjaxFactory.msAjaxDebug.trace) - OsfMsAjaxFactory.msAjaxDebug.trace(text) - }, - defineNondefaultProperty: function OSF_OUtil$defineNondefaultProperty(obj, prop, descriptor, attributes) - { - descriptor=descriptor || {}; - for(var nd in attributes) - { - var attribute=attributes[nd]; - if(descriptor[attribute]==undefined) - descriptor[attribute]=true - } - Object.defineProperty(obj,prop,descriptor); - return obj - }, - defineNondefaultProperties: function OSF_OUtil$defineNondefaultProperties(obj, descriptors, attributes) - { - descriptors=descriptors || {}; - for(var prop in descriptors) - OSF.OUtil.defineNondefaultProperty(obj,prop,descriptors[prop],attributes); - return obj - }, - defineEnumerableProperty: function OSF_OUtil$defineEnumerableProperty(obj, prop, descriptor) - { - return OSF.OUtil.defineNondefaultProperty(obj,prop,descriptor,["enumerable"]) - }, - defineEnumerableProperties: function OSF_OUtil$defineEnumerableProperties(obj, descriptors) - { - return OSF.OUtil.defineNondefaultProperties(obj,descriptors,["enumerable"]) - }, - defineMutableProperty: function OSF_OUtil$defineMutableProperty(obj, prop, descriptor) - { - return OSF.OUtil.defineNondefaultProperty(obj,prop,descriptor,["writable","enumerable","configurable"]) - }, - defineMutableProperties: function OSF_OUtil$defineMutableProperties(obj, descriptors) - { - return OSF.OUtil.defineNondefaultProperties(obj,descriptors,["writable","enumerable","configurable"]) - }, - finalizeProperties: function OSF_OUtil$finalizeProperties(obj, descriptor) - { - descriptor=descriptor || {}; - var props=Object.getOwnPropertyNames(obj); - var propsLength=props.length; - for(var i=0; i < propsLength; i++) - { - var prop=props[i]; - var desc=Object.getOwnPropertyDescriptor(obj,prop); - if(!desc.get && !desc.set) - desc.writable=descriptor.writable || false; - desc.configurable=descriptor.configurable || false; - desc.enumerable=descriptor.enumerable || true; - Object.defineProperty(obj,prop,desc) - } - return obj - }, - mapList: function OSF_OUtil$MapList(list, mapFunction) - { - var ret=[]; - if(list) - for(var item in list) - ret.push(mapFunction(list[item])); - return ret - }, - listContainsKey: function OSF_OUtil$listContainsKey(list, key) - { - for(var item in list) - if(key==item) - return true; - return false - }, - listContainsValue: function OSF_OUtil$listContainsElement(list, value) - { - for(var item in list) - if(value==list[item]) - return true; - return false - }, - augmentList: function OSF_OUtil$augmentList(list, addenda) - { - var add=list.push ? function(key, value) - { - list.push(value) - } : function(key, value) - { - list[key]=value - }; - for(var key in addenda) - add(key,addenda[key]) - }, - redefineList: function OSF_Outil$redefineList(oldList, newList) - { - for(var key1 in oldList) - delete oldList[key1]; - for(var key2 in newList) - oldList[key2]=newList[key2] - }, - isArray: function OSF_OUtil$isArray(obj) - { - return Object.prototype.toString.apply(obj)==="[object Array]" - }, - isFunction: function OSF_OUtil$isFunction(obj) - { - return Object.prototype.toString.apply(obj)==="[object Function]" - }, - isDate: function OSF_OUtil$isDate(obj) - { - return Object.prototype.toString.apply(obj)==="[object Date]" - }, - addEventListener: function OSF_OUtil$addEventListener(element, eventName, listener) - { - if(element.addEventListener) - element.addEventListener(eventName,listener,false); - else if(Sys.Browser.agent===Sys.Browser.InternetExplorer && element.attachEvent) - element.attachEvent("on"+eventName,listener); - else - element["on"+eventName]=listener - }, - removeEventListener: function OSF_OUtil$removeEventListener(element, eventName, listener) - { - if(element.removeEventListener) - element.removeEventListener(eventName,listener,false); - else if(Sys.Browser.agent===Sys.Browser.InternetExplorer && element.detachEvent) - element.detachEvent("on"+eventName,listener); - else - element["on"+eventName]=null - }, - getCookieValue: function OSF_OUtil$getCookieValue(cookieName) - { - var tmpCookieString=RegExp(cookieName+"[^;]+").exec(document.cookie); - return tmpCookieString.toString().replace(/^[^=]+./,"") - }, - xhrGet: function OSF_OUtil$xhrGet(url, onSuccess, onError) - { - var xmlhttp; - try - { - xmlhttp=new XMLHttpRequest; - xmlhttp.onreadystatechange=function() - { - if(xmlhttp.readyState==4) - if(xmlhttp.status==200) - onSuccess(xmlhttp.responseText); - else - onError(xmlhttp.status) - }; - xmlhttp.open("GET",url,true); - xmlhttp.send() - } - catch(ex) - { - onError(ex) - } - }, - xhrGetFull: function OSF_OUtil$xhrGetFull(url, oneDriveFileName, onSuccess, onError) - { - var xmlhttp; - var requestedFileName=oneDriveFileName; - try - { - xmlhttp=new XMLHttpRequest; - xmlhttp.onreadystatechange=function() - { - if(xmlhttp.readyState==4) - if(xmlhttp.status==200) - onSuccess(xmlhttp,requestedFileName); - else - onError(xmlhttp.status) - }; - xmlhttp.open("GET",url,true); - xmlhttp.send() - } - catch(ex) - { - onError(ex) - } - }, - encodeBase64: function OSF_Outil$encodeBase64(input) - { - if(!input) - return input; - var codex="ABCDEFGHIJKLMNOP"+"QRSTUVWXYZabcdef"+"ghijklmnopqrstuv"+"wxyz0123456789+/="; - var output=[]; - var temp=[]; - var index=0; - var c1, - c2, - c3, - a, - b, - c; - var i; - var length=input.length; - do - { - c1=input.charCodeAt(index++); - c2=input.charCodeAt(index++); - c3=input.charCodeAt(index++); - i=0; - a=c1 & 255; - b=c1 >> 8; - c=c2 & 255; - temp[i++]=a >> 2; - temp[i++]=(a & 3) << 4 | b >> 4; - temp[i++]=(b & 15) << 2 | c >> 6; - temp[i++]=c & 63; - if(!isNaN(c2)) - { - a=c2 >> 8; - b=c3 & 255; - c=c3 >> 8; - temp[i++]=a >> 2; - temp[i++]=(a & 3) << 4 | b >> 4; - temp[i++]=(b & 15) << 2 | c >> 6; - temp[i++]=c & 63 - } - if(isNaN(c2)) - temp[i - 1]=64; - else if(isNaN(c3)) - { - temp[i - 2]=64; - temp[i - 1]=64 - } - for(var t=0; t < i; t++) - output.push(codex.charAt(temp[t])) - } while(index < length); - return output.join("") - }, - getSessionStorage: function OSF_Outil$getSessionStorage() - { - return _getSessionStorage() - }, - getLocalStorage: function OSF_Outil$getLocalStorage() - { - if(!_safeLocalStorage) - { - try - { - var localStorage=window.localStorage - } - catch(ex) - { - localStorage=null - } - _safeLocalStorage=new OfficeExt.SafeStorage(localStorage) - } - return _safeLocalStorage - }, - convertIntToCssHexColor: function OSF_Outil$convertIntToCssHexColor(val) - { - var hex="#"+(Number(val)+16777216).toString(16).slice(-6); - return hex - }, - attachClickHandler: function OSF_Outil$attachClickHandler(element, handler) - { - element.onclick=function(e) - { - handler() - }; - element.ontouchend=function(e) - { - handler(); - e.preventDefault() - } - }, - getQueryStringParamValue: function OSF_Outil$getQueryStringParamValue(queryString, paramName) - { - var e=Function._validateParams(arguments,[{ - name: "queryString", - type: String, - mayBeNull: false - },{ - name: "paramName", - type: String, - mayBeNull: false - }]); - if(e) - { - OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null."); - return"" - } - var queryExp=new RegExp("[\\?&]"+paramName+"=([^&#]*)","i"); - if(!queryExp.test(queryString)) - { - OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found."); - return"" - } - return queryExp.exec(queryString)[1] - }, - isiOS: function OSF_Outil$isiOS() - { - return window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false - }, - isChrome: function OSF_Outil$isChrome() - { - return window.navigator.userAgent.indexOf("Chrome") > 0 && !OSF.OUtil.isEdge() - }, - isEdge: function OSF_Outil$isEdge() - { - return window.navigator.userAgent.indexOf("Edge") > 0 - }, - isIE: function OSF_Outil$isIE() - { - return window.navigator.userAgent.indexOf("Trident") > 0 - }, - isFirefox: function OSF_Outil$isFirefox() - { - return window.navigator.userAgent.indexOf("Firefox") > 0 - }, - shallowCopy: function OSF_Outil$shallowCopy(sourceObj) - { - var copyObj=sourceObj.constructor(); - for(var property in sourceObj) - if(sourceObj.hasOwnProperty(property)) - copyObj[property]=sourceObj[property]; - return copyObj - }, - createObject: function OSF_Outil$createObject(properties) - { - var obj=null; - if(properties) - { - obj={}; - var len=properties.length; - for(var i=0; i < len; i++) - obj[properties[i].name]=properties[i].value - } - return obj - }, - addClass: function OSF_OUtil$addClass(elmt, val) - { - if(!OSF.OUtil.hasClass(elmt,val)) - { - var className=elmt.getAttribute(_classN); - if(className) - elmt.setAttribute(_classN,className+" "+val); - else - elmt.setAttribute(_classN,val) - } - }, - hasClass: function OSF_OUtil$hasClass(elmt, clsName) - { - var className=elmt.getAttribute(_classN); - return className && className.match(new RegExp("(\\s|^)"+clsName+"(\\s|$)")) - }, - focusToFirstTabbable: function OSF_OUtil$focusToFirstTabbable(all, backward) - { - var next; - var focused=false; - var candidate; - var setFlag=function(e) - { - focused=true - }; - var findNextPos=function(allLen, currPos, backward) - { - if(currPos < 0 || currPos > allLen) - return-1; - else if(currPos===0 && backward) - return-1; - else if(currPos===allLen - 1 && !backward) - return-1; - if(backward) - return currPos - 1; - else - return currPos+1 - }; - all=_reOrderTabbableElements(all); - next=backward ? all.length - 1 : 0; - if(all.length===0) - return null; - while(!focused && next >=0 && next < all.length) - { - candidate=all[next]; - window.focus(); - candidate.addEventListener("focus",setFlag); - candidate.focus(); - candidate.removeEventListener("focus",setFlag); - next=findNextPos(all.length,next,backward); - if(!focused && candidate===document.activeElement) - focused=true - } - if(focused) - return candidate; - else - return null - }, - focusToNextTabbable: function OSF_OUtil$focusToNextTabbable(all, curr, shift) - { - var currPos; - var next; - var focused=false; - var candidate; - var setFlag=function(e) - { - focused=true - }; - var findCurrPos=function(all, curr) - { - var i=0; - for(; i < all.length; i++) - if(all[i]===curr) - return i; - return-1 - }; - var findNextPos=function(allLen, currPos, shift) - { - if(currPos < 0 || currPos > allLen) - return-1; - else if(currPos===0 && shift) - return-1; - else if(currPos===allLen - 1 && !shift) - return-1; - if(shift) - return currPos - 1; - else - return currPos+1 - }; - all=_reOrderTabbableElements(all); - currPos=findCurrPos(all,curr); - next=findNextPos(all.length,currPos,shift); - if(next < 0) - return null; - while(!focused && next >=0 && next < all.length) - { - candidate=all[next]; - candidate.addEventListener("focus",setFlag); - candidate.focus(); - candidate.removeEventListener("focus",setFlag); - next=findNextPos(all.length,next,shift); - if(!focused && candidate===document.activeElement) - focused=true - } - if(focused) - return candidate; - else - return null - } - } + var _uniqueId = -1; + var _xdmInfoKey = "&_xdm_Info="; + var _serializerVersionKey = "&_serializer_version="; + var _xdmSessionKeyPrefix = "_xdm_"; + var _serializerVersionKeyPrefix = "_serializer_version="; + var _fragmentSeparator = "#"; + var _fragmentInfoDelimiter = "&"; + var _classN = "class"; + var _loadedScripts = {}; + var _defaultScriptLoadingTimeout = 3e4; + var _safeSessionStorage = null; + var _safeLocalStorage = null; + var _rndentropy = (new Date).getTime(); + function _random() + { + var nextrand = 2147483647 * Math.random(); + nextrand ^= _rndentropy ^ (new Date).getMilliseconds() << Math.floor(Math.random() * (31 - 10)); + return nextrand.toString(16) + } + function _getSessionStorage() + { + if(!_safeSessionStorage) + { + try + { + var sessionStorage = window.sessionStorage + } + catch(ex) + { + sessionStorage = null + } + _safeSessionStorage = new OfficeExt.SafeStorage(sessionStorage) + } + return _safeSessionStorage + } + function _reOrderTabbableElements(elements) + { + var bucket0 = []; + var bucketPositive = []; + var i; + var len = elements.length; + var ele; + for(i = 0; i < len; i++) + { + ele = elements[i]; + if(ele.tabIndex) + { + if(ele.tabIndex > 0) + bucketPositive.push(ele); + else if(ele.tabIndex === 0) + bucket0.push(ele) + } + else + bucket0.push(ele) + } + bucketPositive = bucketPositive.sort(function(left, right) + { + var diff = left.tabIndex - right.tabIndex; + if(diff === 0) + diff = bucketPositive.indexOf(left) - bucketPositive.indexOf(right); + return diff + }); + return[].concat(bucketPositive,bucket0) + } + return{ + set_entropy: function OSF_OUtil$set_entropy(entropy) + { + if(typeof entropy == "string") + for(var i = 0; i < entropy.length; i += 4) + { + var temp = 0; + for(var j = 0; j < 4 && i + j < entropy.length; j++) + temp = (temp << 8) + entropy.charCodeAt(i + j); + _rndentropy ^= temp + } + else if(typeof entropy == "number") + _rndentropy ^= entropy; + else + _rndentropy ^= 2147483647 * Math.random(); + _rndentropy &= 2147483647 + }, + extend: function OSF_OUtil$extend(child, parent) + { + var F = function(){}; + F.prototype = parent.prototype; + child.prototype = new F; + child.prototype.constructor = child; + child.uber = parent.prototype; + if(parent.prototype.constructor === Object.prototype.constructor) + parent.prototype.constructor = parent + }, + setNamespace: function OSF_OUtil$setNamespace(name, parent) + { + if(parent && name && !parent[name]) + parent[name] = {} + }, + unsetNamespace: function OSF_OUtil$unsetNamespace(name, parent) + { + if(parent && name && parent[name]) + delete parent[name] + }, + loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) + { + if(url && callback) + { + var doc = window.document; + var _loadedScriptEntry = _loadedScripts[url]; + if(!_loadedScriptEntry) + { + var script = doc.createElement("script"); + script.type = "text/javascript"; + _loadedScriptEntry = { + loaded: false, + pendingCallbacks: [callback], + timer: null + }; + _loadedScripts[url] = _loadedScriptEntry; + var onLoadCallback = function OSF_OUtil_loadScript$onLoadCallback() + { + if(_loadedScriptEntry.timer != null) + { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer + } + _loadedScriptEntry.loaded = true; + var pendingCallbackCount = _loadedScriptEntry.pendingCallbacks.length; + for(var i = 0; i < pendingCallbackCount; i++) + { + var currentCallback = _loadedScriptEntry.pendingCallbacks.shift(); + currentCallback() + } + }; + var onLoadError = function OSF_OUtil_loadScript$onLoadError() + { + delete _loadedScripts[url]; + if(_loadedScriptEntry.timer != null) + { + clearTimeout(_loadedScriptEntry.timer); + delete _loadedScriptEntry.timer + } + var pendingCallbackCount = _loadedScriptEntry.pendingCallbacks.length; + for(var i = 0; i < pendingCallbackCount; i++) + { + var currentCallback = _loadedScriptEntry.pendingCallbacks.shift(); + currentCallback() + } + }; + if(script.readyState) + script.onreadystatechange = function() + { + if(script.readyState == "loaded" || script.readyState == "complete") + { + script.onreadystatechange = null; + onLoadCallback() + } + }; + else + script.onload = onLoadCallback; + script.onerror = onLoadError; + timeoutInMs = timeoutInMs || _defaultScriptLoadingTimeout; + _loadedScriptEntry.timer = setTimeout(onLoadError,timeoutInMs); + script.setAttribute("crossOrigin","anonymous"); + script.src = url; + doc.getElementsByTagName("head")[0].appendChild(script) + } + else if(_loadedScriptEntry.loaded) + callback(); + else + _loadedScriptEntry.pendingCallbacks.push(callback) + } + }, + loadCSS: function OSF_OUtil$loadCSS(url) + { + if(url) + { + var doc = window.document; + var link = doc.createElement("link"); + link.type = "text/css"; + link.rel = "stylesheet"; + link.href = url; + doc.getElementsByTagName("head")[0].appendChild(link) + } + }, + parseEnum: function OSF_OUtil$parseEnum(str, enumObject) + { + var parsed = enumObject[str.trim()]; + if(typeof parsed == "undefined") + { + OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:" + str); + throw OsfMsAjaxFactory.msAjaxError.argument("str"); + } + return parsed + }, + delayExecutionAndCache: function OSF_OUtil$delayExecutionAndCache() + { + var obj = {calc: arguments[0]}; + return function() + { + if(obj.calc) + { + obj.val = obj.calc.apply(this,arguments); + delete obj.calc + } + return obj.val + } + }, + getUniqueId: function OSF_OUtil$getUniqueId() + { + _uniqueId = _uniqueId + 1; + return _uniqueId.toString() + }, + formatString: function OSF_OUtil$formatString() + { + var args = arguments; + var source = args[0]; + return source.replace(/{(\d+)}/gm,function(match, number) + { + var index = parseInt(number,10) + 1; + return args[index] === undefined ? "{" + number + "}" : args[index] + }) + }, + generateConversationId: function OSF_OUtil$generateConversationId() + { + return[_random(),_random(),(new Date).getTime().toString()].join("_") + }, + getFrameName: function OSF_OUtil$getFrameName(cacheKey) + { + return _xdmSessionKeyPrefix + cacheKey + this.generateConversationId() + }, + addXdmInfoAsHash: function OSF_OUtil$addXdmInfoAsHash(url, xdmInfoValue) + { + return OSF.OUtil.addInfoAsHash(url,_xdmInfoKey,xdmInfoValue,false) + }, + addSerializerVersionAsHash: function OSF_OUtil$addSerializerVersionAsHash(url, serializerVersion) + { + return OSF.OUtil.addInfoAsHash(url,_serializerVersionKey,serializerVersion,true) + }, + addInfoAsHash: function OSF_OUtil$addInfoAsHash(url, keyName, infoValue, encodeInfo) + { + url = url.trim() || ""; + var urlParts = url.split(_fragmentSeparator); + var urlWithoutFragment = urlParts.shift(); + var fragment = urlParts.join(_fragmentSeparator); + var newFragment; + if(encodeInfo) + newFragment = [keyName,encodeURIComponent(infoValue),fragment].join(""); + else + newFragment = [fragment,keyName,infoValue].join(""); + return[urlWithoutFragment,_fragmentSeparator,newFragment].join("") + }, + parseHostInfoFromWindowName: function OSF_OUtil$parseHostInfoFromWindowName(skipSessionStorage, windowName) + { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage,windowName,OSF.WindowNameItemKeys.HostInfo) + }, + parseXdmInfo: function OSF_OUtil$parseXdmInfo(skipSessionStorage) + { + var xdmInfoValue = OSF.OUtil.parseXdmInfoWithGivenFragment(skipSessionStorage,window.location.hash); + if(!xdmInfoValue) + xdmInfoValue = OSF.OUtil.parseXdmInfoFromWindowName(skipSessionStorage,window.name); + return xdmInfoValue + }, + parseXdmInfoFromWindowName: function OSF_OUtil$parseXdmInfoFromWindowName(skipSessionStorage, windowName) + { + return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage,windowName,OSF.WindowNameItemKeys.XdmInfo) + }, + parseXdmInfoWithGivenFragment: function OSF_OUtil$parseXdmInfoWithGivenFragment(skipSessionStorage, fragment) + { + return OSF.OUtil.parseInfoWithGivenFragment(_xdmInfoKey,_xdmSessionKeyPrefix,false,skipSessionStorage,fragment) + }, + parseSerializerVersion: function OSF_OUtil$parseSerializerVersion(skipSessionStorage) + { + var serializerVersion = OSF.OUtil.parseSerializerVersionWithGivenFragment(skipSessionStorage,window.location.hash); + if(isNaN(serializerVersion)) + serializerVersion = OSF.OUtil.parseSerializerVersionFromWindowName(skipSessionStorage,window.name); + return serializerVersion + }, + parseSerializerVersionFromWindowName: function OSF_OUtil$parseSerializerVersionFromWindowName(skipSessionStorage, windowName) + { + return parseInt(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage,windowName,OSF.WindowNameItemKeys.SerializerVersion)) + }, + parseSerializerVersionWithGivenFragment: function OSF_OUtil$parseSerializerVersionWithGivenFragment(skipSessionStorage, fragment) + { + return parseInt(OSF.OUtil.parseInfoWithGivenFragment(_serializerVersionKey,_serializerVersionKeyPrefix,true,skipSessionStorage,fragment)) + }, + parseInfoFromWindowName: function OSF_OUtil$parseInfoFromWindowName(skipSessionStorage, windowName, infoKey) + { + try + { + var windowNameObj = JSON.parse(windowName); + var infoValue = windowNameObj != null ? windowNameObj[infoKey] : null; + var osfSessionStorage = _getSessionStorage(); + if(!skipSessionStorage && osfSessionStorage && windowNameObj != null) + { + var sessionKey = windowNameObj[OSF.WindowNameItemKeys.BaseFrameName] + infoKey; + if(infoValue) + osfSessionStorage.setItem(sessionKey,infoValue); + else + infoValue = osfSessionStorage.getItem(sessionKey) + } + return infoValue + } + catch(Exception) + { + return null + } + }, + parseInfoWithGivenFragment: function OSF_OUtil$parseInfoWithGivenFragment(infoKey, infoKeyPrefix, decodeInfo, skipSessionStorage, fragment) + { + var fragmentParts = fragment.split(infoKey); + var infoValue = fragmentParts.length > 1 ? fragmentParts[fragmentParts.length - 1] : null; + if(decodeInfo && infoValue != null) + { + if(infoValue.indexOf(_fragmentInfoDelimiter) >= 0) + infoValue = infoValue.split(_fragmentInfoDelimiter)[0]; + infoValue = decodeURIComponent(infoValue) + } + var osfSessionStorage = _getSessionStorage(); + if(!skipSessionStorage && osfSessionStorage) + { + var sessionKeyStart = window.name.indexOf(infoKeyPrefix); + if(sessionKeyStart > -1) + { + var sessionKeyEnd = window.name.indexOf(";",sessionKeyStart); + if(sessionKeyEnd == -1) + sessionKeyEnd = window.name.length; + var sessionKey = window.name.substring(sessionKeyStart,sessionKeyEnd); + if(infoValue) + osfSessionStorage.setItem(sessionKey,infoValue); + else + infoValue = osfSessionStorage.getItem(sessionKey) + } + } + return infoValue + }, + getConversationId: function OSF_OUtil$getConversationId() + { + var searchString = window.location.search; + var conversationId = null; + if(searchString) + { + var index = searchString.indexOf("&"); + conversationId = index > 0 ? searchString.substring(1,index) : searchString.substr(1); + if(conversationId && conversationId.charAt(conversationId.length - 1) === "=") + { + conversationId = conversationId.substring(0,conversationId.length - 1); + if(conversationId) + conversationId = decodeURIComponent(conversationId) + } + } + return conversationId + }, + getInfoItems: function OSF_OUtil$getInfoItems(strInfo) + { + var items = strInfo.split("$"); + if(typeof items[1] == "undefined") + items = strInfo.split("|"); + if(typeof items[1] == "undefined") + items = strInfo.split("%7C"); + return items + }, + getXdmFieldValue: function OSF_OUtil$getXdmFieldValue(xdmFieldName, skipSessionStorage) + { + var fieldValue = ""; + var xdmInfoValue = OSF.OUtil.parseXdmInfo(skipSessionStorage); + if(xdmInfoValue) + { + var items = OSF.OUtil.getInfoItems(xdmInfoValue); + if(items != undefined && items.length >= 3) + switch(xdmFieldName) + { + case OSF.XdmFieldName.ConversationUrl: + fieldValue = items[2]; + break; + case OSF.XdmFieldName.AppId: + fieldValue = items[1]; + break + } + } + return fieldValue + }, + validateParamObject: function OSF_OUtil$validateParamObject(params, expectedProperties, callback) + { + var e = Function._validateParams(arguments,[{ + name: "params", + type: Object, + mayBeNull: false + },{ + name: "expectedProperties", + type: Object, + mayBeNull: false + },{ + name: "callback", + type: Function, + mayBeNull: true + }]); + if(e) + throw e; + for(var p in expectedProperties) + { + e = Function._validateParameter(params[p],expectedProperties[p],p); + if(e) + throw e; + } + }, + writeProfilerMark: function OSF_OUtil$writeProfilerMark(text) + { + if(window.msWriteProfilerMark) + { + window.msWriteProfilerMark(text); + OsfMsAjaxFactory.msAjaxDebug.trace(text) + } + }, + outputDebug: function OSF_OUtil$outputDebug(text) + { + if(typeof OsfMsAjaxFactory !== "undefined" && OsfMsAjaxFactory.msAjaxDebug && OsfMsAjaxFactory.msAjaxDebug.trace) + OsfMsAjaxFactory.msAjaxDebug.trace(text) + }, + defineNondefaultProperty: function OSF_OUtil$defineNondefaultProperty(obj, prop, descriptor, attributes) + { + descriptor = descriptor || {}; + for(var nd in attributes) + { + var attribute = attributes[nd]; + if(descriptor[attribute] == undefined) + descriptor[attribute] = true + } + Object.defineProperty(obj,prop,descriptor); + return obj + }, + defineNondefaultProperties: function OSF_OUtil$defineNondefaultProperties(obj, descriptors, attributes) + { + descriptors = descriptors || {}; + for(var prop in descriptors) + OSF.OUtil.defineNondefaultProperty(obj,prop,descriptors[prop],attributes); + return obj + }, + defineEnumerableProperty: function OSF_OUtil$defineEnumerableProperty(obj, prop, descriptor) + { + return OSF.OUtil.defineNondefaultProperty(obj,prop,descriptor,["enumerable"]) + }, + defineEnumerableProperties: function OSF_OUtil$defineEnumerableProperties(obj, descriptors) + { + return OSF.OUtil.defineNondefaultProperties(obj,descriptors,["enumerable"]) + }, + defineMutableProperty: function OSF_OUtil$defineMutableProperty(obj, prop, descriptor) + { + return OSF.OUtil.defineNondefaultProperty(obj,prop,descriptor,["writable","enumerable","configurable"]) + }, + defineMutableProperties: function OSF_OUtil$defineMutableProperties(obj, descriptors) + { + return OSF.OUtil.defineNondefaultProperties(obj,descriptors,["writable","enumerable","configurable"]) + }, + finalizeProperties: function OSF_OUtil$finalizeProperties(obj, descriptor) + { + descriptor = descriptor || {}; + var props = Object.getOwnPropertyNames(obj); + var propsLength = props.length; + for(var i = 0; i < propsLength; i++) + { + var prop = props[i]; + var desc = Object.getOwnPropertyDescriptor(obj,prop); + if(!desc.get && !desc.set) + desc.writable = descriptor.writable || false; + desc.configurable = descriptor.configurable || false; + desc.enumerable = descriptor.enumerable || true; + Object.defineProperty(obj,prop,desc) + } + return obj + }, + mapList: function OSF_OUtil$MapList(list, mapFunction) + { + var ret = []; + if(list) + for(var item in list) + ret.push(mapFunction(list[item])); + return ret + }, + listContainsKey: function OSF_OUtil$listContainsKey(list, key) + { + for(var item in list) + if(key == item) + return true; + return false + }, + listContainsValue: function OSF_OUtil$listContainsElement(list, value) + { + for(var item in list) + if(value == list[item]) + return true; + return false + }, + augmentList: function OSF_OUtil$augmentList(list, addenda) + { + var add = list.push ? function(key, value) + { + list.push(value) + } : function(key, value) + { + list[key] = value + }; + for(var key in addenda) + add(key,addenda[key]) + }, + redefineList: function OSF_Outil$redefineList(oldList, newList) + { + for(var key1 in oldList) + delete oldList[key1]; + for(var key2 in newList) + oldList[key2] = newList[key2] + }, + isArray: function OSF_OUtil$isArray(obj) + { + return Object.prototype.toString.apply(obj) === "[object Array]" + }, + isFunction: function OSF_OUtil$isFunction(obj) + { + return Object.prototype.toString.apply(obj) === "[object Function]" + }, + isDate: function OSF_OUtil$isDate(obj) + { + return Object.prototype.toString.apply(obj) === "[object Date]" + }, + addEventListener: function OSF_OUtil$addEventListener(element, eventName, listener) + { + if(element.addEventListener) + element.addEventListener(eventName,listener,false); + else if(Sys.Browser.agent === Sys.Browser.InternetExplorer && element.attachEvent) + element.attachEvent("on" + eventName,listener); + else + element["on" + eventName] = listener + }, + removeEventListener: function OSF_OUtil$removeEventListener(element, eventName, listener) + { + if(element.removeEventListener) + element.removeEventListener(eventName,listener,false); + else if(Sys.Browser.agent === Sys.Browser.InternetExplorer && element.detachEvent) + element.detachEvent("on" + eventName,listener); + else + element["on" + eventName] = null + }, + getCookieValue: function OSF_OUtil$getCookieValue(cookieName) + { + var tmpCookieString = RegExp(cookieName + "[^;]+").exec(document.cookie); + return tmpCookieString.toString().replace(/^[^=]+./,"") + }, + xhrGet: function OSF_OUtil$xhrGet(url, onSuccess, onError) + { + var xmlhttp; + try + { + xmlhttp = new XMLHttpRequest; + xmlhttp.onreadystatechange = function() + { + if(xmlhttp.readyState == 4) + if(xmlhttp.status == 200) + onSuccess(xmlhttp.responseText); + else + onError(xmlhttp.status) + }; + xmlhttp.open("GET",url,true); + xmlhttp.send() + } + catch(ex) + { + onError(ex) + } + }, + xhrGetFull: function OSF_OUtil$xhrGetFull(url, oneDriveFileName, onSuccess, onError) + { + var xmlhttp; + var requestedFileName = oneDriveFileName; + try + { + xmlhttp = new XMLHttpRequest; + xmlhttp.onreadystatechange = function() + { + if(xmlhttp.readyState == 4) + if(xmlhttp.status == 200) + onSuccess(xmlhttp,requestedFileName); + else + onError(xmlhttp.status) + }; + xmlhttp.open("GET",url,true); + xmlhttp.send() + } + catch(ex) + { + onError(ex) + } + }, + encodeBase64: function OSF_Outil$encodeBase64(input) + { + if(!input) + return input; + var codex = "ABCDEFGHIJKLMNOP" + "QRSTUVWXYZabcdef" + "ghijklmnopqrstuv" + "wxyz0123456789+/="; + var output = []; + var temp = []; + var index = 0; + var c1, + c2, + c3, + a, + b, + c; + var i; + var length = input.length; + do + { + c1 = input.charCodeAt(index++); + c2 = input.charCodeAt(index++); + c3 = input.charCodeAt(index++); + i = 0; + a = c1 & 255; + b = c1 >> 8; + c = c2 & 255; + temp[i++] = a >> 2; + temp[i++] = (a & 3) << 4 | b >> 4; + temp[i++] = (b & 15) << 2 | c >> 6; + temp[i++] = c & 63; + if(!isNaN(c2)) + { + a = c2 >> 8; + b = c3 & 255; + c = c3 >> 8; + temp[i++] = a >> 2; + temp[i++] = (a & 3) << 4 | b >> 4; + temp[i++] = (b & 15) << 2 | c >> 6; + temp[i++] = c & 63 + } + if(isNaN(c2)) + temp[i - 1] = 64; + else if(isNaN(c3)) + { + temp[i - 2] = 64; + temp[i - 1] = 64 + } + for(var t = 0; t < i; t++) + output.push(codex.charAt(temp[t])) + } while(index < length); + return output.join("") + }, + getSessionStorage: function OSF_Outil$getSessionStorage() + { + return _getSessionStorage() + }, + getLocalStorage: function OSF_Outil$getLocalStorage() + { + if(!_safeLocalStorage) + { + try + { + var localStorage = window.localStorage + } + catch(ex) + { + localStorage = null + } + _safeLocalStorage = new OfficeExt.SafeStorage(localStorage) + } + return _safeLocalStorage + }, + convertIntToCssHexColor: function OSF_Outil$convertIntToCssHexColor(val) + { + var hex = "#" + (Number(val) + 16777216).toString(16).slice(-6); + return hex + }, + attachClickHandler: function OSF_Outil$attachClickHandler(element, handler) + { + element.onclick = function(e) + { + handler() + }; + element.ontouchend = function(e) + { + handler(); + e.preventDefault() + } + }, + getQueryStringParamValue: function OSF_Outil$getQueryStringParamValue(queryString, paramName) + { + var e = Function._validateParams(arguments,[{ + name: "queryString", + type: String, + mayBeNull: false + },{ + name: "paramName", + type: String, + mayBeNull: false + }]); + if(e) + { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null."); + return"" + } + var queryExp = new RegExp("[\\?&]" + paramName + "=([^&#]*)","i"); + if(!queryExp.test(queryString)) + { + OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found."); + return"" + } + return queryExp.exec(queryString)[1] + }, + isiOS: function OSF_Outil$isiOS() + { + return window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false + }, + isChrome: function OSF_Outil$isChrome() + { + return window.navigator.userAgent.indexOf("Chrome") > 0 && !OSF.OUtil.isEdge() + }, + isEdge: function OSF_Outil$isEdge() + { + return window.navigator.userAgent.indexOf("Edge") > 0 + }, + isIE: function OSF_Outil$isIE() + { + return window.navigator.userAgent.indexOf("Trident") > 0 + }, + isFirefox: function OSF_Outil$isFirefox() + { + return window.navigator.userAgent.indexOf("Firefox") > 0 + }, + shallowCopy: function OSF_Outil$shallowCopy(sourceObj) + { + if(sourceObj == null) + return null; + else if(!(sourceObj instanceof Object)) + return sourceObj; + else if(Array.isArray(sourceObj)) + { + var copyArr = []; + for(var i = 0; i < sourceObj.length; i++) + copyArr.push(sourceObj[i]); + return copyArr + } + else + { + var copyObj = sourceObj.constructor(); + for(var property in sourceObj) + if(sourceObj.hasOwnProperty(property)) + copyObj[property] = sourceObj[property]; + return copyObj + } + }, + createObject: function OSF_Outil$createObject(properties) + { + var obj = null; + if(properties) + { + obj = {}; + var len = properties.length; + for(var i = 0; i < len; i++) + obj[properties[i].name] = properties[i].value + } + return obj + }, + addClass: function OSF_OUtil$addClass(elmt, val) + { + if(!OSF.OUtil.hasClass(elmt,val)) + { + var className = elmt.getAttribute(_classN); + if(className) + elmt.setAttribute(_classN,className + " " + val); + else + elmt.setAttribute(_classN,val) + } + }, + removeClass: function OSF_OUtil$removeClass(elmt, val) + { + if(OSF.OUtil.hasClass(elmt,val)) + { + var className = elmt.getAttribute(_classN); + var reg = new RegExp("(\\s|^)" + val + "(\\s|$)"); + className = className.replace(reg,""); + elmt.setAttribute(_classN,className) + } + }, + hasClass: function OSF_OUtil$hasClass(elmt, clsName) + { + var className = elmt.getAttribute(_classN); + return className && className.match(new RegExp("(\\s|^)" + clsName + "(\\s|$)")) + }, + focusToFirstTabbable: function OSF_OUtil$focusToFirstTabbable(all, backward) + { + var next; + var focused = false; + var candidate; + var setFlag = function(e) + { + focused = true + }; + var findNextPos = function(allLen, currPos, backward) + { + if(currPos < 0 || currPos > allLen) + return-1; + else if(currPos === 0 && backward) + return-1; + else if(currPos === allLen - 1 && !backward) + return-1; + if(backward) + return currPos - 1; + else + return currPos + 1 + }; + all = _reOrderTabbableElements(all); + next = backward ? all.length - 1 : 0; + if(all.length === 0) + return null; + while(!focused && next >= 0 && next < all.length) + { + candidate = all[next]; + window.focus(); + candidate.addEventListener("focus",setFlag); + candidate.focus(); + candidate.removeEventListener("focus",setFlag); + next = findNextPos(all.length,next,backward); + if(!focused && candidate === document.activeElement) + focused = true + } + if(focused) + return candidate; + else + return null + }, + focusToNextTabbable: function OSF_OUtil$focusToNextTabbable(all, curr, shift) + { + var currPos; + var next; + var focused = false; + var candidate; + var setFlag = function(e) + { + focused = true + }; + var findCurrPos = function(all, curr) + { + var i = 0; + for(; i < all.length; i++) + if(all[i] === curr) + return i; + return-1 + }; + var findNextPos = function(allLen, currPos, shift) + { + if(currPos < 0 || currPos > allLen) + return-1; + else if(currPos === 0 && shift) + return-1; + else if(currPos === allLen - 1 && !shift) + return-1; + if(shift) + return currPos - 1; + else + return currPos + 1 + }; + all = _reOrderTabbableElements(all); + currPos = findCurrPos(all,curr); + next = findNextPos(all.length,currPos,shift); + if(next < 0) + return null; + while(!focused && next >= 0 && next < all.length) + { + candidate = all[next]; + candidate.addEventListener("focus",setFlag); + candidate.focus(); + candidate.removeEventListener("focus",setFlag); + next = findNextPos(all.length,next,shift); + if(!focused && candidate === document.activeElement) + focused = true + } + if(focused) + return candidate; + else + return null + } + } }(); -OSF.OUtil.Guid=function() +OSF.OUtil.Guid = function() { - var hexCode=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"]; - return{generateNewGuid: function OSF_Outil_Guid$generateNewGuid() - { - var result=""; - var tick=(new Date).getTime(); - var index=0; - for(; index < 32 && tick > 0; index++) - { - if(index==8 || index==12 || index==16 || index==20) - result+="-"; - result+=hexCode[tick % 16]; - tick=Math.floor(tick / 16) - } - for(; index < 32; index++) - { - if(index==8 || index==12 || index==16 || index==20) - result+="-"; - result+=hexCode[Math.floor(Math.random() * 16)] - } - return result - }} + var hexCode = ["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"]; + return{generateNewGuid: function OSF_Outil_Guid$generateNewGuid() + { + var result = ""; + var tick = (new Date).getTime(); + var index = 0; + for(; index < 32 && tick > 0; index++) + { + if(index == 8 || index == 12 || index == 16 || index == 20) + result += "-"; + result += hexCode[tick % 16]; + tick = Math.floor(tick / 16) + } + for(; index < 32; index++) + { + if(index == 8 || index == 12 || index == 16 || index == 20) + result += "-"; + result += hexCode[Math.floor(Math.random() * 16)] + } + return result + }} }(); -window.OSF=OSF; +window.OSF = OSF; OSF.OUtil.setNamespace("OSF",window); -OSF.AppName={ - Unsupported: 0, - Excel: 1, - Word: 2, - PowerPoint: 4, - Outlook: 8, - ExcelWebApp: 16, - WordWebApp: 32, - OutlookWebApp: 64, - Project: 128, - AccessWebApp: 256, - PowerpointWebApp: 512, - ExcelIOS: 1024, - Sway: 2048, - WordIOS: 4096, - PowerPointIOS: 8192, - Access: 16384, - Lync: 32768, - OutlookIOS: 65536, - OneNoteWebApp: 131072, - OneNote: 262144, - ExcelWinRT: 524288, - WordWinRT: 1048576, - PowerpointWinRT: 2097152, - OutlookAndroid: 4194304, - OneNoteWinRT: 8388608, - ExcelAndroid: 8388609, - VisioWebApp: 8388610 +OSF.AppName = { + Unsupported: 0, + Excel: 1, + Word: 2, + PowerPoint: 4, + Outlook: 8, + ExcelWebApp: 16, + WordWebApp: 32, + OutlookWebApp: 64, + Project: 128, + AccessWebApp: 256, + PowerpointWebApp: 512, + ExcelIOS: 1024, + Sway: 2048, + WordIOS: 4096, + PowerPointIOS: 8192, + Access: 16384, + Lync: 32768, + OutlookIOS: 65536, + OneNoteWebApp: 131072, + OneNote: 262144, + ExcelWinRT: 524288, + WordWinRT: 1048576, + PowerpointWinRT: 2097152, + OutlookAndroid: 4194304, + OneNoteWinRT: 8388608, + ExcelAndroid: 8388609, + VisioWebApp: 8388610, + OneNoteIOS: 8388611 }; -OSF.InternalPerfMarker={ - DataCoercionBegin: "Agave.HostCall.CoerceDataStart", - DataCoercionEnd: "Agave.HostCall.CoerceDataEnd" +OSF.InternalPerfMarker = { + DataCoercionBegin: "Agave.HostCall.CoerceDataStart", + DataCoercionEnd: "Agave.HostCall.CoerceDataEnd" }; -OSF.HostCallPerfMarker={ - IssueCall: "Agave.HostCall.IssueCall", - ReceiveResponse: "Agave.HostCall.ReceiveResponse", - RuntimeExceptionRaised: "Agave.HostCall.RuntimeExecptionRaised" +OSF.HostCallPerfMarker = { + IssueCall: "Agave.HostCall.IssueCall", + ReceiveResponse: "Agave.HostCall.ReceiveResponse", + RuntimeExceptionRaised: "Agave.HostCall.RuntimeExecptionRaised" }; -OSF.AgaveHostAction={ - Select: 0, - UnSelect: 1, - CancelDialog: 2, - InsertAgave: 3, - CtrlF6In: 4, - CtrlF6Exit: 5, - CtrlF6ExitShift: 6, - SelectWithError: 7, - NotifyHostError: 8, - RefreshAddinCommands: 9, - PageIsReady: 10, - TabIn: 11, - TabInShift: 12, - TabExit: 13, - TabExitShift: 14, - EscExit: 15, - F2Exit: 16, - ExitNoFocusable: 17, - ExitNoFocusableShift: 18 +OSF.AgaveHostAction = { + Select: 0, + UnSelect: 1, + CancelDialog: 2, + InsertAgave: 3, + CtrlF6In: 4, + CtrlF6Exit: 5, + CtrlF6ExitShift: 6, + SelectWithError: 7, + NotifyHostError: 8, + RefreshAddinCommands: 9, + PageIsReady: 10, + TabIn: 11, + TabInShift: 12, + TabExit: 13, + TabExitShift: 14, + EscExit: 15, + F2Exit: 16, + ExitNoFocusable: 17, + ExitNoFocusableShift: 18, + MouseEnter: 19, + MouseLeave: 20 }; -OSF.SharedConstants={NotificationConversationIdSuffix: "_ntf"}; -OSF.DialogMessageType={ - DialogMessageReceived: 0, - DialogParentMessageReceived: 1, - DialogClosed: 12006 +OSF.SharedConstants = {NotificationConversationIdSuffix: "_ntf"}; +OSF.DialogMessageType = { + DialogMessageReceived: 0, + DialogParentMessageReceived: 1, + DialogClosed: 12006 }; -OSF.OfficeAppContext=function OSF_OfficeAppContext(id, appName, appVersion, appUILocale, dataLocale, docUrl, clientMode, settings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, appMinorVersion, requirementMatrix, hostCustomMessage, hostFullVersion, clientWindowHeight, clientWindowWidth, addinName, appDomains, dialogRequirementMatrix) +OSF.OfficeAppContext = function OSF_OfficeAppContext(id, appName, appVersion, appUILocale, dataLocale, docUrl, clientMode, settings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, appMinorVersion, requirementMatrix, hostCustomMessage, hostFullVersion, clientWindowHeight, clientWindowWidth, addinName, appDomains, dialogRequirementMatrix) { - this._id=id; - this._appName=appName; - this._appVersion=appVersion; - this._appUILocale=appUILocale; - this._dataLocale=dataLocale; - this._docUrl=docUrl; - this._clientMode=clientMode; - this._settings=settings; - this._reason=reason; - this._osfControlType=osfControlType; - this._eToken=eToken; - this._correlationId=correlationId; - this._appInstanceId=appInstanceId; - this._touchEnabled=touchEnabled; - this._commerceAllowed=commerceAllowed; - this._appMinorVersion=appMinorVersion; - this._requirementMatrix=requirementMatrix; - this._hostCustomMessage=hostCustomMessage; - this._hostFullVersion=hostFullVersion; - this._isDialog=false; - this._clientWindowHeight=clientWindowHeight; - this._clientWindowWidth=clientWindowWidth; - this._addinName=addinName; - this._appDomains=appDomains; - this._dialogRequirementMatrix=dialogRequirementMatrix; - this.get_id=function get_id() - { - return this._id - }; - this.get_appName=function get_appName() - { - return this._appName - }; - this.get_appVersion=function get_appVersion() - { - return this._appVersion - }; - this.get_appUILocale=function get_appUILocale() - { - return this._appUILocale - }; - this.get_dataLocale=function get_dataLocale() - { - return this._dataLocale - }; - this.get_docUrl=function get_docUrl() - { - return this._docUrl - }; - this.get_clientMode=function get_clientMode() - { - return this._clientMode - }; - this.get_bindings=function get_bindings() - { - return this._bindings - }; - this.get_settings=function get_settings() - { - return this._settings - }; - this.get_reason=function get_reason() - { - return this._reason - }; - this.get_osfControlType=function get_osfControlType() - { - return this._osfControlType - }; - this.get_eToken=function get_eToken() - { - return this._eToken - }; - this.get_correlationId=function get_correlationId() - { - return this._correlationId - }; - this.get_appInstanceId=function get_appInstanceId() - { - return this._appInstanceId - }; - this.get_touchEnabled=function get_touchEnabled() - { - return this._touchEnabled - }; - this.get_commerceAllowed=function get_commerceAllowed() - { - return this._commerceAllowed - }; - this.get_appMinorVersion=function get_appMinorVersion() - { - return this._appMinorVersion - }; - this.get_requirementMatrix=function get_requirementMatrix() - { - return this._requirementMatrix - }; - this.get_dialogRequirementMatrix=function get_dialogRequirementMatrix() - { - return this._dialogRequirementMatrix - }; - this.get_hostCustomMessage=function get_hostCustomMessage() - { - return this._hostCustomMessage - }; - this.get_hostFullVersion=function get_hostFullVersion() - { - return this._hostFullVersion - }; - this.get_isDialog=function get_isDialog() - { - return this._isDialog - }; - this.get_clientWindowHeight=function get_clientWindowHeight() - { - return this._clientWindowHeight - }; - this.get_clientWindowWidth=function get_clientWindowWidth() - { - return this._clientWindowWidth - }; - this.get_addinName=function get_addinName() - { - return this._addinName - }; - this.get_appDomains=function get_appDomains() - { - return this._appDomains - } + this._id = id; + this._appName = appName; + this._appVersion = appVersion; + this._appUILocale = appUILocale; + this._dataLocale = dataLocale; + this._docUrl = docUrl; + this._clientMode = clientMode; + this._settings = settings; + this._reason = reason; + this._osfControlType = osfControlType; + this._eToken = eToken; + this._correlationId = correlationId; + this._appInstanceId = appInstanceId; + this._touchEnabled = touchEnabled; + this._commerceAllowed = commerceAllowed; + this._appMinorVersion = appMinorVersion; + this._requirementMatrix = requirementMatrix; + this._hostCustomMessage = hostCustomMessage; + this._hostFullVersion = hostFullVersion; + this._isDialog = false; + this._clientWindowHeight = clientWindowHeight; + this._clientWindowWidth = clientWindowWidth; + this._addinName = addinName; + this._appDomains = appDomains; + this._dialogRequirementMatrix = dialogRequirementMatrix; + this.get_id = function get_id() + { + return this._id + }; + this.get_appName = function get_appName() + { + return this._appName + }; + this.get_appVersion = function get_appVersion() + { + return this._appVersion + }; + this.get_appUILocale = function get_appUILocale() + { + return this._appUILocale + }; + this.get_dataLocale = function get_dataLocale() + { + return this._dataLocale + }; + this.get_docUrl = function get_docUrl() + { + return this._docUrl + }; + this.get_clientMode = function get_clientMode() + { + return this._clientMode + }; + this.get_bindings = function get_bindings() + { + return this._bindings + }; + this.get_settings = function get_settings() + { + return this._settings + }; + this.get_reason = function get_reason() + { + return this._reason + }; + this.get_osfControlType = function get_osfControlType() + { + return this._osfControlType + }; + this.get_eToken = function get_eToken() + { + return this._eToken + }; + this.get_correlationId = function get_correlationId() + { + return this._correlationId + }; + this.get_appInstanceId = function get_appInstanceId() + { + return this._appInstanceId + }; + this.get_touchEnabled = function get_touchEnabled() + { + return this._touchEnabled + }; + this.get_commerceAllowed = function get_commerceAllowed() + { + return this._commerceAllowed + }; + this.get_appMinorVersion = function get_appMinorVersion() + { + return this._appMinorVersion + }; + this.get_requirementMatrix = function get_requirementMatrix() + { + return this._requirementMatrix + }; + this.get_dialogRequirementMatrix = function get_dialogRequirementMatrix() + { + return this._dialogRequirementMatrix + }; + this.get_hostCustomMessage = function get_hostCustomMessage() + { + return this._hostCustomMessage + }; + this.get_hostFullVersion = function get_hostFullVersion() + { + return this._hostFullVersion + }; + this.get_isDialog = function get_isDialog() + { + return this._isDialog + }; + this.get_clientWindowHeight = function get_clientWindowHeight() + { + return this._clientWindowHeight + }; + this.get_clientWindowWidth = function get_clientWindowWidth() + { + return this._clientWindowWidth + }; + this.get_addinName = function get_addinName() + { + return this._addinName + }; + this.get_appDomains = function get_appDomains() + { + return this._appDomains + } }; -OSF.OsfControlType={ - DocumentLevel: 0, - ContainerLevel: 1 +OSF.OsfControlType = { + DocumentLevel: 0, + ContainerLevel: 1 }; -OSF.ClientMode={ - ReadOnly: 0, - ReadWrite: 1 +OSF.ClientMode = { + ReadOnly: 0, + ReadWrite: 1 }; OSF.OUtil.setNamespace("Microsoft",window); OSF.OUtil.setNamespace("Office",Microsoft); OSF.OUtil.setNamespace("Client",Microsoft.Office); OSF.OUtil.setNamespace("WebExtension",Microsoft.Office); -Microsoft.Office.WebExtension.InitializationReason={ - Inserted: "inserted", - DocumentOpened: "documentOpened" +Microsoft.Office.WebExtension.InitializationReason = { + Inserted: "inserted", + DocumentOpened: "documentOpened" }; -Microsoft.Office.WebExtension.ValueFormat={ - Unformatted: "unformatted", - Formatted: "formatted" +Microsoft.Office.WebExtension.ValueFormat = { + Unformatted: "unformatted", + Formatted: "formatted" }; -Microsoft.Office.WebExtension.FilterType={All: "all"}; -Microsoft.Office.WebExtension.Parameters={ - BindingType: "bindingType", - CoercionType: "coercionType", - ValueFormat: "valueFormat", - FilterType: "filterType", - Columns: "columns", - SampleData: "sampleData", - GoToType: "goToType", - SelectionMode: "selectionMode", - Id: "id", - PromptText: "promptText", - ItemName: "itemName", - FailOnCollision: "failOnCollision", - StartRow: "startRow", - StartColumn: "startColumn", - RowCount: "rowCount", - ColumnCount: "columnCount", - Callback: "callback", - AsyncContext: "asyncContext", - Data: "data", - Rows: "rows", - OverwriteIfStale: "overwriteIfStale", - FileType: "fileType", - EventType: "eventType", - Handler: "handler", - SliceSize: "sliceSize", - SliceIndex: "sliceIndex", - ActiveView: "activeView", - Status: "status", - Xml: "xml", - Namespace: "namespace", - Prefix: "prefix", - XPath: "xPath", - Text: "text", - ImageLeft: "imageLeft", - ImageTop: "imageTop", - ImageWidth: "imageWidth", - ImageHeight: "imageHeight", - TaskId: "taskId", - FieldId: "fieldId", - FieldValue: "fieldValue", - ServerUrl: "serverUrl", - ListName: "listName", - ResourceId: "resourceId", - ViewType: "viewType", - ViewName: "viewName", - GetRawValue: "getRawValue", - CellFormat: "cellFormat", - TableOptions: "tableOptions", - TaskIndex: "taskIndex", - ResourceIndex: "resourceIndex", - CustomFieldId: "customFieldId", - Url: "url", - MessageHandler: "messageHandler", - Width: "width", - Height: "height", - RequireHTTPs: "requireHTTPS", - MessageToParent: "messageToParent", - DisplayInIframe: "displayInIframe", - MessageContent: "messageContent" +Microsoft.Office.WebExtension.FilterType = {All: "all"}; +Microsoft.Office.WebExtension.PlatformType = { + PC: "PC", + OfficeOnline: "OfficeOnline", + Mac: "Mac", + iOS: "iOS", + Android: "Android", + Universal: "Universal" +}; +Microsoft.Office.WebExtension.HostType = { + Word: "Word", + Excel: "Excel", + PowerPoint: "PowerPoint", + Outlook: "Outlook", + OneNote: "OneNote", + Project: "Project", + Access: "Access" +}; +Microsoft.Office.WebExtension.Parameters = { + BindingType: "bindingType", + CoercionType: "coercionType", + ValueFormat: "valueFormat", + FilterType: "filterType", + Columns: "columns", + SampleData: "sampleData", + GoToType: "goToType", + SelectionMode: "selectionMode", + Id: "id", + PromptText: "promptText", + ItemName: "itemName", + FailOnCollision: "failOnCollision", + StartRow: "startRow", + StartColumn: "startColumn", + RowCount: "rowCount", + ColumnCount: "columnCount", + Callback: "callback", + AsyncContext: "asyncContext", + Data: "data", + Rows: "rows", + OverwriteIfStale: "overwriteIfStale", + FileType: "fileType", + EventType: "eventType", + Handler: "handler", + SliceSize: "sliceSize", + SliceIndex: "sliceIndex", + ActiveView: "activeView", + Status: "status", + PlatformType: "platformType", + HostType: "hostType", + ForceConsent: "forceConsent", + ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + Xml: "xml", + Namespace: "namespace", + Prefix: "prefix", + XPath: "xPath", + Text: "text", + ImageLeft: "imageLeft", + ImageTop: "imageTop", + ImageWidth: "imageWidth", + ImageHeight: "imageHeight", + TaskId: "taskId", + FieldId: "fieldId", + FieldValue: "fieldValue", + ServerUrl: "serverUrl", + ListName: "listName", + ResourceId: "resourceId", + ViewType: "viewType", + ViewName: "viewName", + GetRawValue: "getRawValue", + CellFormat: "cellFormat", + TableOptions: "tableOptions", + TaskIndex: "taskIndex", + ResourceIndex: "resourceIndex", + CustomFieldId: "customFieldId", + Url: "url", + MessageHandler: "messageHandler", + Width: "width", + Height: "height", + RequireHTTPs: "requireHTTPS", + MessageToParent: "messageToParent", + DisplayInIframe: "displayInIframe", + MessageContent: "messageContent", + HideTitle: "hideTitle", + AppCommandInvocationCompletedData: "appCommandInvocationCompletedData" }; OSF.OUtil.setNamespace("DDA",OSF); -OSF.DDA.DocumentMode={ - ReadOnly: 1, - ReadWrite: 0 +OSF.DDA.DocumentMode = { + ReadOnly: 1, + ReadWrite: 0 }; -OSF.DDA.PropertyDescriptors={AsyncResultStatus: "AsyncResultStatus"}; -OSF.DDA.EventDescriptors={}; -OSF.DDA.ListDescriptors={}; -OSF.DDA.UI={}; -OSF.DDA.getXdmEventName=function OSF_DDA$GetXdmEventName(id, eventType) +OSF.DDA.PropertyDescriptors = {AsyncResultStatus: "AsyncResultStatus"}; +OSF.DDA.EventDescriptors = {}; +OSF.DDA.ListDescriptors = {}; +OSF.DDA.UI = {}; +OSF.DDA.getXdmEventName = function OSF_DDA$GetXdmEventName(id, eventType) { - if(eventType==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged || eventType==Microsoft.Office.WebExtension.EventType.BindingDataChanged || eventType==Microsoft.Office.WebExtension.EventType.DataNodeDeleted || eventType==Microsoft.Office.WebExtension.EventType.DataNodeInserted || eventType==Microsoft.Office.WebExtension.EventType.DataNodeReplaced) - return id+"_"+eventType; - else - return eventType + if(eventType == Microsoft.Office.WebExtension.EventType.BindingSelectionChanged || eventType == Microsoft.Office.WebExtension.EventType.BindingDataChanged || eventType == Microsoft.Office.WebExtension.EventType.DataNodeDeleted || eventType == Microsoft.Office.WebExtension.EventType.DataNodeInserted || eventType == Microsoft.Office.WebExtension.EventType.DataNodeReplaced) + return id + "_" + eventType; + else + return eventType }; -OSF.DDA.MethodDispId={ - dispidMethodMin: 64, - dispidGetSelectedDataMethod: 64, - dispidSetSelectedDataMethod: 65, - dispidAddBindingFromSelectionMethod: 66, - dispidAddBindingFromPromptMethod: 67, - dispidGetBindingMethod: 68, - dispidReleaseBindingMethod: 69, - dispidGetBindingDataMethod: 70, - dispidSetBindingDataMethod: 71, - dispidAddRowsMethod: 72, - dispidClearAllRowsMethod: 73, - dispidGetAllBindingsMethod: 74, - dispidLoadSettingsMethod: 75, - dispidSaveSettingsMethod: 76, - dispidGetDocumentCopyMethod: 77, - dispidAddBindingFromNamedItemMethod: 78, - dispidAddColumnsMethod: 79, - dispidGetDocumentCopyChunkMethod: 80, - dispidReleaseDocumentCopyMethod: 81, - dispidNavigateToMethod: 82, - dispidGetActiveViewMethod: 83, - dispidGetDocumentThemeMethod: 84, - dispidGetOfficeThemeMethod: 85, - dispidGetFilePropertiesMethod: 86, - dispidClearFormatsMethod: 87, - dispidSetTableOptionsMethod: 88, - dispidSetFormatsMethod: 89, - dispidExecuteRichApiRequestMethod: 93, - dispidAppCommandInvocationCompletedMethod: 94, - dispidCloseContainerMethod: 97, - dispidGetSelectedTaskMethod: 110, - dispidGetSelectedResourceMethod: 111, - dispidGetTaskMethod: 112, - dispidGetResourceFieldMethod: 113, - dispidGetWSSUrlMethod: 114, - dispidGetTaskFieldMethod: 115, - dispidGetProjectFieldMethod: 116, - dispidGetSelectedViewMethod: 117, - dispidGetTaskByIndexMethod: 118, - dispidGetResourceByIndexMethod: 119, - dispidSetTaskFieldMethod: 120, - dispidSetResourceFieldMethod: 121, - dispidGetMaxTaskIndexMethod: 122, - dispidGetMaxResourceIndexMethod: 123, - dispidCreateTaskMethod: 124, - dispidAddDataPartMethod: 128, - dispidGetDataPartByIdMethod: 129, - dispidGetDataPartsByNamespaceMethod: 130, - dispidGetDataPartXmlMethod: 131, - dispidGetDataPartNodesMethod: 132, - dispidDeleteDataPartMethod: 133, - dispidGetDataNodeValueMethod: 134, - dispidGetDataNodeXmlMethod: 135, - dispidGetDataNodesMethod: 136, - dispidSetDataNodeValueMethod: 137, - dispidSetDataNodeXmlMethod: 138, - dispidAddDataNamespaceMethod: 139, - dispidGetDataUriByPrefixMethod: 140, - dispidGetDataPrefixByUriMethod: 141, - dispidGetDataNodeTextMethod: 142, - dispidSetDataNodeTextMethod: 143, - dispidMessageParentMethod: 144, - dispidSendMessageMethod: 145, - dispidMethodMax: 145 +OSF.DDA.MethodDispId = { + dispidMethodMin: 64, + dispidGetSelectedDataMethod: 64, + dispidSetSelectedDataMethod: 65, + dispidAddBindingFromSelectionMethod: 66, + dispidAddBindingFromPromptMethod: 67, + dispidGetBindingMethod: 68, + dispidReleaseBindingMethod: 69, + dispidGetBindingDataMethod: 70, + dispidSetBindingDataMethod: 71, + dispidAddRowsMethod: 72, + dispidClearAllRowsMethod: 73, + dispidGetAllBindingsMethod: 74, + dispidLoadSettingsMethod: 75, + dispidSaveSettingsMethod: 76, + dispidGetDocumentCopyMethod: 77, + dispidAddBindingFromNamedItemMethod: 78, + dispidAddColumnsMethod: 79, + dispidGetDocumentCopyChunkMethod: 80, + dispidReleaseDocumentCopyMethod: 81, + dispidNavigateToMethod: 82, + dispidGetActiveViewMethod: 83, + dispidGetDocumentThemeMethod: 84, + dispidGetOfficeThemeMethod: 85, + dispidGetFilePropertiesMethod: 86, + dispidClearFormatsMethod: 87, + dispidSetTableOptionsMethod: 88, + dispidSetFormatsMethod: 89, + dispidExecuteRichApiRequestMethod: 93, + dispidAppCommandInvocationCompletedMethod: 94, + dispidCloseContainerMethod: 97, + dispidGetAccessTokenMethod: 98, + dispidGetSelectedTaskMethod: 110, + dispidGetSelectedResourceMethod: 111, + dispidGetTaskMethod: 112, + dispidGetResourceFieldMethod: 113, + dispidGetWSSUrlMethod: 114, + dispidGetTaskFieldMethod: 115, + dispidGetProjectFieldMethod: 116, + dispidGetSelectedViewMethod: 117, + dispidGetTaskByIndexMethod: 118, + dispidGetResourceByIndexMethod: 119, + dispidSetTaskFieldMethod: 120, + dispidSetResourceFieldMethod: 121, + dispidGetMaxTaskIndexMethod: 122, + dispidGetMaxResourceIndexMethod: 123, + dispidCreateTaskMethod: 124, + dispidAddDataPartMethod: 128, + dispidGetDataPartByIdMethod: 129, + dispidGetDataPartsByNamespaceMethod: 130, + dispidGetDataPartXmlMethod: 131, + dispidGetDataPartNodesMethod: 132, + dispidDeleteDataPartMethod: 133, + dispidGetDataNodeValueMethod: 134, + dispidGetDataNodeXmlMethod: 135, + dispidGetDataNodesMethod: 136, + dispidSetDataNodeValueMethod: 137, + dispidSetDataNodeXmlMethod: 138, + dispidAddDataNamespaceMethod: 139, + dispidGetDataUriByPrefixMethod: 140, + dispidGetDataPrefixByUriMethod: 141, + dispidGetDataNodeTextMethod: 142, + dispidSetDataNodeTextMethod: 143, + dispidMessageParentMethod: 144, + dispidSendMessageMethod: 145, + dispidMethodMax: 145 }; -OSF.DDA.EventDispId={ - dispidEventMin: 0, - dispidInitializeEvent: 0, - dispidSettingsChangedEvent: 1, - dispidDocumentSelectionChangedEvent: 2, - dispidBindingSelectionChangedEvent: 3, - dispidBindingDataChangedEvent: 4, - dispidDocumentOpenEvent: 5, - dispidDocumentCloseEvent: 6, - dispidActiveViewChangedEvent: 7, - dispidDocumentThemeChangedEvent: 8, - dispidOfficeThemeChangedEvent: 9, - dispidDialogMessageReceivedEvent: 10, - dispidDialogNotificationShownInAddinEvent: 11, - dispidDialogParentMessageReceivedEvent: 12, - dispidActivationStatusChangedEvent: 32, - dispidAppCommandInvokedEvent: 39, - dispidOlkItemSelectedChangedEvent: 46, - dispidTaskSelectionChangedEvent: 56, - dispidResourceSelectionChangedEvent: 57, - dispidViewSelectionChangedEvent: 58, - dispidDataNodeAddedEvent: 60, - dispidDataNodeReplacedEvent: 61, - dispidDataNodeDeletedEvent: 62, - dispidEventMax: 63 +OSF.DDA.EventDispId = { + dispidEventMin: 0, + dispidInitializeEvent: 0, + dispidSettingsChangedEvent: 1, + dispidDocumentSelectionChangedEvent: 2, + dispidBindingSelectionChangedEvent: 3, + dispidBindingDataChangedEvent: 4, + dispidDocumentOpenEvent: 5, + dispidDocumentCloseEvent: 6, + dispidActiveViewChangedEvent: 7, + dispidDocumentThemeChangedEvent: 8, + dispidOfficeThemeChangedEvent: 9, + dispidDialogMessageReceivedEvent: 10, + dispidDialogNotificationShownInAddinEvent: 11, + dispidDialogParentMessageReceivedEvent: 12, + dispidObjectDeletedEvent: 13, + dispidObjectSelectionChangedEvent: 14, + dispidObjectDataChangedEvent: 15, + dispidContentControlAddedEvent: 16, + dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, + dispidAppCommandInvokedEvent: 39, + dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, + dispidTaskSelectionChangedEvent: 56, + dispidResourceSelectionChangedEvent: 57, + dispidViewSelectionChangedEvent: 58, + dispidDataNodeAddedEvent: 60, + dispidDataNodeReplacedEvent: 61, + dispidDataNodeDeletedEvent: 62, + dispidEventMax: 63 }; -OSF.DDA.ErrorCodeManager=function() +OSF.DDA.ErrorCodeManager = function() { - var _errorMappings={}; - return{ - getErrorArgs: function OSF_DDA_ErrorCodeManager$getErrorArgs(errorCode) - { - var errorArgs=_errorMappings[errorCode]; - if(!errorArgs) - errorArgs=_errorMappings[this.errorCodes.ooeInternalError]; - else - { - if(!errorArgs.name) - errorArgs.name=_errorMappings[this.errorCodes.ooeInternalError].name; - if(!errorArgs.message) - errorArgs.message=_errorMappings[this.errorCodes.ooeInternalError].message - } - return errorArgs - }, - addErrorMessage: function OSF_DDA_ErrorCodeManager$addErrorMessage(errorCode, errorNameMessage) - { - _errorMappings[errorCode]=errorNameMessage - }, - errorCodes: { - ooeSuccess: 0, - ooeChunkResult: 1, - ooeCoercionTypeNotSupported: 1e3, - ooeGetSelectionNotMatchDataType: 1001, - ooeCoercionTypeNotMatchBinding: 1002, - ooeInvalidGetRowColumnCounts: 1003, - ooeSelectionNotSupportCoercionType: 1004, - ooeInvalidGetStartRowColumn: 1005, - ooeNonUniformPartialGetNotSupported: 1006, - ooeGetDataIsTooLarge: 1008, - ooeFileTypeNotSupported: 1009, - ooeGetDataParametersConflict: 1010, - ooeInvalidGetColumns: 1011, - ooeInvalidGetRows: 1012, - ooeInvalidReadForBlankRow: 1013, - ooeUnsupportedDataObject: 2e3, - ooeCannotWriteToSelection: 2001, - ooeDataNotMatchSelection: 2002, - ooeOverwriteWorksheetData: 2003, - ooeDataNotMatchBindingSize: 2004, - ooeInvalidSetStartRowColumn: 2005, - ooeInvalidDataFormat: 2006, - ooeDataNotMatchCoercionType: 2007, - ooeDataNotMatchBindingType: 2008, - ooeSetDataIsTooLarge: 2009, - ooeNonUniformPartialSetNotSupported: 2010, - ooeInvalidSetColumns: 2011, - ooeInvalidSetRows: 2012, - ooeSetDataParametersConflict: 2013, - ooeCellDataAmountBeyondLimits: 2014, - ooeSelectionCannotBound: 3e3, - ooeBindingNotExist: 3002, - ooeBindingToMultipleSelection: 3003, - ooeInvalidSelectionForBindingType: 3004, - ooeOperationNotSupportedOnThisBindingType: 3005, - ooeNamedItemNotFound: 3006, - ooeMultipleNamedItemFound: 3007, - ooeInvalidNamedItemForBindingType: 3008, - ooeUnknownBindingType: 3009, - ooeOperationNotSupportedOnMatrixData: 3010, - ooeInvalidColumnsForBinding: 3011, - ooeSettingNameNotExist: 4e3, - ooeSettingsCannotSave: 4001, - ooeSettingsAreStale: 4002, - ooeOperationNotSupported: 5e3, - ooeInternalError: 5001, - ooeDocumentReadOnly: 5002, - ooeEventHandlerNotExist: 5003, - ooeInvalidApiCallInContext: 5004, - ooeShuttingDown: 5005, - ooeUnsupportedEnumeration: 5007, - ooeIndexOutOfRange: 5008, - ooeBrowserAPINotSupported: 5009, - ooeInvalidParam: 5010, - ooeRequestTimeout: 5011, - ooeTooManyIncompleteRequests: 5100, - ooeRequestTokenUnavailable: 5101, - ooeActivityLimitReached: 5102, - ooeCustomXmlNodeNotFound: 6e3, - ooeCustomXmlError: 6100, - ooeCustomXmlExceedQuota: 6101, - ooeCustomXmlOutOfDate: 6102, - ooeNoCapability: 7e3, - ooeCannotNavTo: 7001, - ooeSpecifiedIdNotExist: 7002, - ooeNavOutOfBound: 7004, - ooeElementMissing: 8e3, - ooeProtectedError: 8001, - ooeInvalidCellsValue: 8010, - ooeInvalidTableOptionValue: 8011, - ooeInvalidFormatValue: 8012, - ooeRowIndexOutOfRange: 8020, - ooeColIndexOutOfRange: 8021, - ooeFormatValueOutOfRange: 8022, - ooeCellFormatAmountBeyondLimits: 8023, - ooeMemoryFileLimit: 11e3, - ooeNetworkProblemRetrieveFile: 11001, - ooeInvalidSliceSize: 11002, - ooeInvalidCallback: 11101, - ooeInvalidWidth: 12e3, - ooeInvalidHeight: 12001, - ooeNavigationError: 12002, - ooeInvalidScheme: 12003, - ooeAppDomains: 12004, - ooeRequireHTTPS: 12005, - ooeWebDialogClosed: 12006, - ooeDialogAlreadyOpened: 12007, - ooeEndUserAllow: 12008, - ooeEndUserIgnore: 12009, - ooeNotUILessDialog: 12010, - ooeCrossZone: 12011 - }, - initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) - { - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={ - name: stringNS.L_InvalidCoercion, - message: stringNS.L_CoercionTypeNotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={ - name: stringNS.L_DataReadError, - message: stringNS.L_GetSelectionNotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={ - name: stringNS.L_InvalidCoercion, - message: stringNS.L_CoercionTypeNotMatchBinding - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={ - name: stringNS.L_DataReadError, - message: stringNS.L_InvalidGetRowColumnCounts - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={ - name: stringNS.L_DataReadError, - message: stringNS.L_SelectionNotSupportCoercionType - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={ - name: stringNS.L_DataReadError, - message: stringNS.L_InvalidGetStartRowColumn - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={ - name: stringNS.L_DataReadError, - message: stringNS.L_NonUniformPartialGetNotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={ - name: stringNS.L_DataReadError, - message: stringNS.L_GetDataIsTooLarge - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={ - name: stringNS.L_DataReadError, - message: stringNS.L_FileTypeNotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={ - name: stringNS.L_DataReadError, - message: stringNS.L_GetDataParametersConflict - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={ - name: stringNS.L_DataReadError, - message: stringNS.L_InvalidGetColumns - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={ - name: stringNS.L_DataReadError, - message: stringNS.L_InvalidGetRows - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={ - name: stringNS.L_DataReadError, - message: stringNS.L_InvalidReadForBlankRow - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_UnsupportedDataObject - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_CannotWriteToSelection - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_DataNotMatchSelection - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_OverwriteWorksheetData - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_DataNotMatchBindingSize - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_InvalidSetStartRowColumn - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={ - name: stringNS.L_InvalidFormat, - message: stringNS.L_InvalidDataFormat - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={ - name: stringNS.L_InvalidDataObject, - message: stringNS.L_DataNotMatchCoercionType - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={ - name: stringNS.L_InvalidDataObject, - message: stringNS.L_DataNotMatchBindingType - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_SetDataIsTooLarge - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_NonUniformPartialSetNotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_InvalidSetColumns - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_InvalidSetRows - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={ - name: stringNS.L_DataWriteError, - message: stringNS.L_SetDataParametersConflict - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={ - name: stringNS.L_BindingCreationError, - message: stringNS.L_SelectionCannotBound - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={ - name: stringNS.L_InvalidBindingError, - message: stringNS.L_BindingNotExist - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={ - name: stringNS.L_BindingCreationError, - message: stringNS.L_BindingToMultipleSelection - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={ - name: stringNS.L_BindingCreationError, - message: stringNS.L_InvalidSelectionForBindingType - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={ - name: stringNS.L_InvalidBindingOperation, - message: stringNS.L_OperationNotSupportedOnThisBindingType - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={ - name: stringNS.L_BindingCreationError, - message: stringNS.L_NamedItemNotFound - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={ - name: stringNS.L_BindingCreationError, - message: stringNS.L_MultipleNamedItemFound - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={ - name: stringNS.L_BindingCreationError, - message: stringNS.L_InvalidNamedItemForBindingType - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={ - name: stringNS.L_InvalidBinding, - message: stringNS.L_UnknownBindingType - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={ - name: stringNS.L_InvalidBindingOperation, - message: stringNS.L_OperationNotSupportedOnMatrixData - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={ - name: stringNS.L_InvalidBinding, - message: stringNS.L_InvalidColumnsForBinding - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={ - name: stringNS.L_ReadSettingsError, - message: stringNS.L_SettingNameNotExist - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={ - name: stringNS.L_SaveSettingsError, - message: stringNS.L_SettingsCannotSave - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={ - name: stringNS.L_SettingsStaleError, - message: stringNS.L_SettingsAreStale - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={ - name: stringNS.L_HostError, - message: stringNS.L_OperationNotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={ - name: stringNS.L_InternalError, - message: stringNS.L_InternalErrorDescription - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={ - name: stringNS.L_PermissionDenied, - message: stringNS.L_DocumentReadOnly - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={ - name: stringNS.L_EventRegistrationError, - message: stringNS.L_EventHandlerNotExist - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={ - name: stringNS.L_InvalidAPICall, - message: stringNS.L_InvalidApiCallInContext - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={ - name: stringNS.L_ShuttingDown, - message: stringNS.L_ShuttingDown - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={ - name: stringNS.L_UnsupportedEnumeration, - message: stringNS.L_UnsupportedEnumerationMessage - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={ - name: stringNS.L_IndexOutOfRange, - message: stringNS.L_IndexOutOfRange - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={ - name: stringNS.L_APINotSupported, - message: stringNS.L_BrowserAPINotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={ - name: stringNS.L_APICallFailed, - message: stringNS.L_RequestTimeout - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={ - name: stringNS.L_APICallFailed, - message: stringNS.L_TooManyIncompleteRequests - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={ - name: stringNS.L_APICallFailed, - message: stringNS.L_RequestTokenUnavailable - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={ - name: stringNS.L_APICallFailed, - message: stringNS.L_ActivityLimitReached - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={ - name: stringNS.L_InvalidNode, - message: stringNS.L_CustomXmlNodeNotFound - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={ - name: stringNS.L_CustomXmlError, - message: stringNS.L_CustomXmlError - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={ - name: stringNS.L_CustomXmlExceedQuotaName, - message: stringNS.L_CustomXmlExceedQuotaMessage - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={ - name: stringNS.L_CustomXmlOutOfDateName, - message: stringNS.L_CustomXmlOutOfDateMessage - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={ - name: stringNS.L_PermissionDenied, - message: stringNS.L_NoCapability - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={ - name: stringNS.L_CannotNavigateTo, - message: stringNS.L_CannotNavigateTo - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={ - name: stringNS.L_SpecifiedIdNotExist, - message: stringNS.L_SpecifiedIdNotExist - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={ - name: stringNS.L_NavOutOfBound, - message: stringNS.L_NavOutOfBound - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={ - name: stringNS.L_DataWriteReminder, - message: stringNS.L_CellDataAmountBeyondLimits - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={ - name: stringNS.L_MissingParameter, - message: stringNS.L_ElementMissing - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={ - name: stringNS.L_PermissionDenied, - message: stringNS.L_NoCapability - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={ - name: stringNS.L_InvalidValue, - message: stringNS.L_InvalidCellsValue - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={ - name: stringNS.L_InvalidValue, - message: stringNS.L_InvalidTableOptionValue - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={ - name: stringNS.L_InvalidValue, - message: stringNS.L_InvalidFormatValue - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={ - name: stringNS.L_OutOfRange, - message: stringNS.L_RowIndexOutOfRange - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={ - name: stringNS.L_OutOfRange, - message: stringNS.L_ColIndexOutOfRange - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={ - name: stringNS.L_OutOfRange, - message: stringNS.L_FormatValueOutOfRange - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={ - name: stringNS.L_FormattingReminder, - message: stringNS.L_CellFormatAmountBeyondLimits - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={ - name: stringNS.L_MemoryLimit, - message: stringNS.L_CloseFileBeforeRetrieve - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={ - name: stringNS.L_NetworkProblem, - message: stringNS.L_NetworkProblemRetrieveFile - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={ - name: stringNS.L_InvalidValue, - message: stringNS.L_SliceSizeNotSupported - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={ - name: stringNS.L_DisplayDialogError, - message: stringNS.L_DialogAlreadyOpened - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={ - name: stringNS.L_IndexOutOfRange, - message: stringNS.L_IndexOutOfRange - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={ - name: stringNS.L_IndexOutOfRange, - message: stringNS.L_IndexOutOfRange - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={ - name: stringNS.L_DisplayDialogError, - message: stringNS.L_NetworkProblem - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={ - name: stringNS.L_DialogNavigateError, - message: stringNS.L_DialogAddressNotTrusted - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={ - name: stringNS.L_DisplayDialogError, - message: stringNS.L_DialogAddressNotTrusted - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={ - name: stringNS.L_DisplayDialogError, - message: stringNS.L_DialogAddressNotTrusted - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={ - name: stringNS.L_DisplayDialogError, - message: stringNS.L_UserClickIgnore - }; - _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={ - name: stringNS.L_DisplayDialogError, - message: stringNS.L_NewWindowCrossZoneErrorString - } - } - } + var _errorMappings = {}; + return{ + getErrorArgs: function OSF_DDA_ErrorCodeManager$getErrorArgs(errorCode) + { + var errorArgs = _errorMappings[errorCode]; + if(!errorArgs) + errorArgs = _errorMappings[this.errorCodes.ooeInternalError]; + else + { + if(!errorArgs.name) + errorArgs.name = _errorMappings[this.errorCodes.ooeInternalError].name; + if(!errorArgs.message) + errorArgs.message = _errorMappings[this.errorCodes.ooeInternalError].message + } + return errorArgs + }, + addErrorMessage: function OSF_DDA_ErrorCodeManager$addErrorMessage(errorCode, errorNameMessage) + { + _errorMappings[errorCode] = errorNameMessage + }, + errorCodes: { + ooeSuccess: 0, + ooeChunkResult: 1, + ooeCoercionTypeNotSupported: 1e3, + ooeGetSelectionNotMatchDataType: 1001, + ooeCoercionTypeNotMatchBinding: 1002, + ooeInvalidGetRowColumnCounts: 1003, + ooeSelectionNotSupportCoercionType: 1004, + ooeInvalidGetStartRowColumn: 1005, + ooeNonUniformPartialGetNotSupported: 1006, + ooeGetDataIsTooLarge: 1008, + ooeFileTypeNotSupported: 1009, + ooeGetDataParametersConflict: 1010, + ooeInvalidGetColumns: 1011, + ooeInvalidGetRows: 1012, + ooeInvalidReadForBlankRow: 1013, + ooeUnsupportedDataObject: 2e3, + ooeCannotWriteToSelection: 2001, + ooeDataNotMatchSelection: 2002, + ooeOverwriteWorksheetData: 2003, + ooeDataNotMatchBindingSize: 2004, + ooeInvalidSetStartRowColumn: 2005, + ooeInvalidDataFormat: 2006, + ooeDataNotMatchCoercionType: 2007, + ooeDataNotMatchBindingType: 2008, + ooeSetDataIsTooLarge: 2009, + ooeNonUniformPartialSetNotSupported: 2010, + ooeInvalidSetColumns: 2011, + ooeInvalidSetRows: 2012, + ooeSetDataParametersConflict: 2013, + ooeCellDataAmountBeyondLimits: 2014, + ooeSelectionCannotBound: 3e3, + ooeBindingNotExist: 3002, + ooeBindingToMultipleSelection: 3003, + ooeInvalidSelectionForBindingType: 3004, + ooeOperationNotSupportedOnThisBindingType: 3005, + ooeNamedItemNotFound: 3006, + ooeMultipleNamedItemFound: 3007, + ooeInvalidNamedItemForBindingType: 3008, + ooeUnknownBindingType: 3009, + ooeOperationNotSupportedOnMatrixData: 3010, + ooeInvalidColumnsForBinding: 3011, + ooeSettingNameNotExist: 4e3, + ooeSettingsCannotSave: 4001, + ooeSettingsAreStale: 4002, + ooeOperationNotSupported: 5e3, + ooeInternalError: 5001, + ooeDocumentReadOnly: 5002, + ooeEventHandlerNotExist: 5003, + ooeInvalidApiCallInContext: 5004, + ooeShuttingDown: 5005, + ooeUnsupportedEnumeration: 5007, + ooeIndexOutOfRange: 5008, + ooeBrowserAPINotSupported: 5009, + ooeInvalidParam: 5010, + ooeRequestTimeout: 5011, + ooeInvalidOrTimedOutSession: 5012, + ooeInvalidApiArguments: 5013, + ooeTooManyIncompleteRequests: 5100, + ooeRequestTokenUnavailable: 5101, + ooeActivityLimitReached: 5102, + ooeCustomXmlNodeNotFound: 6e3, + ooeCustomXmlError: 6100, + ooeCustomXmlExceedQuota: 6101, + ooeCustomXmlOutOfDate: 6102, + ooeNoCapability: 7e3, + ooeCannotNavTo: 7001, + ooeSpecifiedIdNotExist: 7002, + ooeNavOutOfBound: 7004, + ooeElementMissing: 8e3, + ooeProtectedError: 8001, + ooeInvalidCellsValue: 8010, + ooeInvalidTableOptionValue: 8011, + ooeInvalidFormatValue: 8012, + ooeRowIndexOutOfRange: 8020, + ooeColIndexOutOfRange: 8021, + ooeFormatValueOutOfRange: 8022, + ooeCellFormatAmountBeyondLimits: 8023, + ooeMemoryFileLimit: 11e3, + ooeNetworkProblemRetrieveFile: 11001, + ooeInvalidSliceSize: 11002, + ooeInvalidCallback: 11101, + ooeInvalidWidth: 12e3, + ooeInvalidHeight: 12001, + ooeNavigationError: 12002, + ooeInvalidScheme: 12003, + ooeAppDomains: 12004, + ooeRequireHTTPS: 12005, + ooeWebDialogClosed: 12006, + ooeDialogAlreadyOpened: 12007, + ooeEndUserAllow: 12008, + ooeEndUserIgnore: 12009, + ooeNotUILessDialog: 12010, + ooeCrossZone: 12011, + ooeNotSSOAgave: 13e3, + ooeSSOUserNotSignedIn: 13001, + ooeSSOUserAborted: 13002, + ooeSSOUnsupportedUserIdentity: 13003, + ooeSSOInvalidResourceUrl: 13004, + ooeSSOInvalidGrant: 13005, + ooeSSOClientError: 13006, + ooeSSOServerError: 13007, + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009 + }, + initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) + { + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported] = { + name: stringNS.L_InvalidCoercion, + message: stringNS.L_CoercionTypeNotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType] = { + name: stringNS.L_DataReadError, + message: stringNS.L_GetSelectionNotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding] = { + name: stringNS.L_InvalidCoercion, + message: stringNS.L_CoercionTypeNotMatchBinding + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts] = { + name: stringNS.L_DataReadError, + message: stringNS.L_InvalidGetRowColumnCounts + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType] = { + name: stringNS.L_DataReadError, + message: stringNS.L_SelectionNotSupportCoercionType + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn] = { + name: stringNS.L_DataReadError, + message: stringNS.L_InvalidGetStartRowColumn + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported] = { + name: stringNS.L_DataReadError, + message: stringNS.L_NonUniformPartialGetNotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge] = { + name: stringNS.L_DataReadError, + message: stringNS.L_GetDataIsTooLarge + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported] = { + name: stringNS.L_DataReadError, + message: stringNS.L_FileTypeNotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict] = { + name: stringNS.L_DataReadError, + message: stringNS.L_GetDataParametersConflict + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns] = { + name: stringNS.L_DataReadError, + message: stringNS.L_InvalidGetColumns + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows] = { + name: stringNS.L_DataReadError, + message: stringNS.L_InvalidGetRows + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow] = { + name: stringNS.L_DataReadError, + message: stringNS.L_InvalidReadForBlankRow + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_UnsupportedDataObject + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_CannotWriteToSelection + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_DataNotMatchSelection + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_OverwriteWorksheetData + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_DataNotMatchBindingSize + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_InvalidSetStartRowColumn + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat] = { + name: stringNS.L_InvalidFormat, + message: stringNS.L_InvalidDataFormat + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType] = { + name: stringNS.L_InvalidDataObject, + message: stringNS.L_DataNotMatchCoercionType + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType] = { + name: stringNS.L_InvalidDataObject, + message: stringNS.L_DataNotMatchBindingType + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_SetDataIsTooLarge + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_NonUniformPartialSetNotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_InvalidSetColumns + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_InvalidSetRows + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict] = { + name: stringNS.L_DataWriteError, + message: stringNS.L_SetDataParametersConflict + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound] = { + name: stringNS.L_BindingCreationError, + message: stringNS.L_SelectionCannotBound + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist] = { + name: stringNS.L_InvalidBindingError, + message: stringNS.L_BindingNotExist + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection] = { + name: stringNS.L_BindingCreationError, + message: stringNS.L_BindingToMultipleSelection + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType] = { + name: stringNS.L_BindingCreationError, + message: stringNS.L_InvalidSelectionForBindingType + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType] = { + name: stringNS.L_InvalidBindingOperation, + message: stringNS.L_OperationNotSupportedOnThisBindingType + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound] = { + name: stringNS.L_BindingCreationError, + message: stringNS.L_NamedItemNotFound + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound] = { + name: stringNS.L_BindingCreationError, + message: stringNS.L_MultipleNamedItemFound + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType] = { + name: stringNS.L_BindingCreationError, + message: stringNS.L_InvalidNamedItemForBindingType + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType] = { + name: stringNS.L_InvalidBinding, + message: stringNS.L_UnknownBindingType + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData] = { + name: stringNS.L_InvalidBindingOperation, + message: stringNS.L_OperationNotSupportedOnMatrixData + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding] = { + name: stringNS.L_InvalidBinding, + message: stringNS.L_InvalidColumnsForBinding + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist] = { + name: stringNS.L_ReadSettingsError, + message: stringNS.L_SettingNameNotExist + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave] = { + name: stringNS.L_SaveSettingsError, + message: stringNS.L_SettingsCannotSave + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale] = { + name: stringNS.L_SettingsStaleError, + message: stringNS.L_SettingsAreStale + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported] = { + name: stringNS.L_HostError, + message: stringNS.L_OperationNotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError] = { + name: stringNS.L_InternalError, + message: stringNS.L_InternalErrorDescription + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly] = { + name: stringNS.L_PermissionDenied, + message: stringNS.L_DocumentReadOnly + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist] = { + name: stringNS.L_EventRegistrationError, + message: stringNS.L_EventHandlerNotExist + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext] = { + name: stringNS.L_InvalidAPICall, + message: stringNS.L_InvalidApiCallInContext + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown] = { + name: stringNS.L_ShuttingDown, + message: stringNS.L_ShuttingDown + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration] = { + name: stringNS.L_UnsupportedEnumeration, + message: stringNS.L_UnsupportedEnumerationMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange] = { + name: stringNS.L_IndexOutOfRange, + message: stringNS.L_IndexOutOfRange + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported] = { + name: stringNS.L_APINotSupported, + message: stringNS.L_BrowserAPINotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout] = { + name: stringNS.L_APICallFailed, + message: stringNS.L_RequestTimeout + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession] = { + name: stringNS.L_InvalidOrTimedOutSession, + message: stringNS.L_InvalidOrTimedOutSessionMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests] = { + name: stringNS.L_APICallFailed, + message: stringNS.L_TooManyIncompleteRequests + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable] = { + name: stringNS.L_APICallFailed, + message: stringNS.L_RequestTokenUnavailable + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached] = { + name: stringNS.L_APICallFailed, + message: stringNS.L_ActivityLimitReached + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments] = { + name: stringNS.L_APICallFailed, + message: stringNS.L_InvalidApiArgumentsMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound] = { + name: stringNS.L_InvalidNode, + message: stringNS.L_CustomXmlNodeNotFound + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError] = { + name: stringNS.L_CustomXmlError, + message: stringNS.L_CustomXmlError + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota] = { + name: stringNS.L_CustomXmlExceedQuotaName, + message: stringNS.L_CustomXmlExceedQuotaMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate] = { + name: stringNS.L_CustomXmlOutOfDateName, + message: stringNS.L_CustomXmlOutOfDateMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability] = { + name: stringNS.L_PermissionDenied, + message: stringNS.L_NoCapability + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo] = { + name: stringNS.L_CannotNavigateTo, + message: stringNS.L_CannotNavigateTo + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist] = { + name: stringNS.L_SpecifiedIdNotExist, + message: stringNS.L_SpecifiedIdNotExist + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound] = { + name: stringNS.L_NavOutOfBound, + message: stringNS.L_NavOutOfBound + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits] = { + name: stringNS.L_DataWriteReminder, + message: stringNS.L_CellDataAmountBeyondLimits + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing] = { + name: stringNS.L_MissingParameter, + message: stringNS.L_ElementMissing + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError] = { + name: stringNS.L_PermissionDenied, + message: stringNS.L_NoCapability + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue] = { + name: stringNS.L_InvalidValue, + message: stringNS.L_InvalidCellsValue + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue] = { + name: stringNS.L_InvalidValue, + message: stringNS.L_InvalidTableOptionValue + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue] = { + name: stringNS.L_InvalidValue, + message: stringNS.L_InvalidFormatValue + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange] = { + name: stringNS.L_OutOfRange, + message: stringNS.L_RowIndexOutOfRange + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange] = { + name: stringNS.L_OutOfRange, + message: stringNS.L_ColIndexOutOfRange + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange] = { + name: stringNS.L_OutOfRange, + message: stringNS.L_FormatValueOutOfRange + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits] = { + name: stringNS.L_FormattingReminder, + message: stringNS.L_CellFormatAmountBeyondLimits + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit] = { + name: stringNS.L_MemoryLimit, + message: stringNS.L_CloseFileBeforeRetrieve + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile] = { + name: stringNS.L_NetworkProblem, + message: stringNS.L_NetworkProblemRetrieveFile + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize] = { + name: stringNS.L_InvalidValue, + message: stringNS.L_SliceSizeNotSupported + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened] = { + name: stringNS.L_DisplayDialogError, + message: stringNS.L_DialogAlreadyOpened + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth] = { + name: stringNS.L_IndexOutOfRange, + message: stringNS.L_IndexOutOfRange + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight] = { + name: stringNS.L_IndexOutOfRange, + message: stringNS.L_IndexOutOfRange + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError] = { + name: stringNS.L_DisplayDialogError, + message: stringNS.L_NetworkProblem + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme] = { + name: stringNS.L_DialogNavigateError, + message: stringNS.L_DialogInvalidScheme + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains] = { + name: stringNS.L_DisplayDialogError, + message: stringNS.L_DialogAddressNotTrusted + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS] = { + name: stringNS.L_DisplayDialogError, + message: stringNS.L_DialogRequireHTTPS + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore] = { + name: stringNS.L_DisplayDialogError, + message: stringNS.L_UserClickIgnore + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone] = { + name: stringNS.L_DisplayDialogError, + message: stringNS.L_NewWindowCrossZoneErrorString + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave] = { + name: stringNS.L_APINotSupported, + message: stringNS.L_InvalidSSOAddinMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn] = { + name: stringNS.L_UserNotSignedIn, + message: stringNS.L_UserNotSignedIn + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted] = { + name: stringNS.L_UserAborted, + message: stringNS.L_UserAbortedMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity] = { + name: stringNS.L_UnsupportedUserIdentity, + message: stringNS.L_UnsupportedUserIdentityMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl] = { + name: stringNS.L_InvalidResourceUrl, + message: stringNS.L_InvalidResourceUrlMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant] = { + name: stringNS.L_InvalidGrant, + message: stringNS.L_InvalidGrantMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError] = { + name: stringNS.L_SSOClientError, + message: stringNS.L_SSOClientErrorMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError] = { + name: stringNS.L_SSOServerError, + message: stringNS.L_SSOServerErrorMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken] = { + name: stringNS.L_AddinIsAlreadyRequestingToken, + message: stringNS.L_AddinIsAlreadyRequestingTokenMessage + }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory] = { + name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, + message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage + } + } + } }(); var OfficeExt; (function(OfficeExt) { - var Requirement; - (function(Requirement) - { - var RequirementMatrix=function() - { - function RequirementMatrix(_setMap) - { - this.isSetSupported=function _isSetSupported(name, minVersion) - { - if(name==undefined) - return false; - if(minVersion==undefined) - minVersion=0; - var setSupportArray=this._setMap; - var sets=setSupportArray._sets; - if(sets.hasOwnProperty(name.toLowerCase())) - { - var setMaxVersion=sets[name.toLowerCase()]; - return setMaxVersion > 0 && setMaxVersion >=minVersion - } - else - return false - }; - this._setMap=_setMap; - this.isSetSupported=this.isSetSupported.bind(this) - } - return RequirementMatrix - }(); - Requirement.RequirementMatrix=RequirementMatrix; - var DefaultSetRequirement=function() - { - function DefaultSetRequirement(setMap) - { - this._addSetMap=function DefaultSetRequirement_addSetMap(addedSet) - { - for(var name in addedSet) - this._sets[name]=addedSet[name] - }; - this._sets=setMap - } - return DefaultSetRequirement - }(); - Requirement.DefaultSetRequirement=DefaultSetRequirement; - var DefaultDialogSetRequirement=function(_super) - { - __extends(DefaultDialogSetRequirement,_super); - function DefaultDialogSetRequirement() - { - _super.call(this,{dialogapi: 1.1}) - } - return DefaultDialogSetRequirement - }(DefaultSetRequirement); - Requirement.DefaultDialogSetRequirement=DefaultDialogSetRequirement; - var ExcelClientDefaultSetRequirement=function(_super) - { - __extends(ExcelClientDefaultSetRequirement,_super); - function ExcelClientDefaultSetRequirement() - { - _super.call(this,{ - bindingevents: 1.1, - documentevents: 1.1, - excelapi: 1.1, - matrixbindings: 1.1, - matrixcoercion: 1.1, - selection: 1.1, - settings: 1.1, - tablebindings: 1.1, - tablecoercion: 1.1, - textbindings: 1.1, - textcoercion: 1.1 - }) - } - return ExcelClientDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.ExcelClientDefaultSetRequirement=ExcelClientDefaultSetRequirement; - var ExcelClientV1DefaultSetRequirement=function(_super) - { - __extends(ExcelClientV1DefaultSetRequirement,_super); - function ExcelClientV1DefaultSetRequirement() - { - _super.call(this); - this._addSetMap({imagecoercion: 1.1}) - } - return ExcelClientV1DefaultSetRequirement - }(ExcelClientDefaultSetRequirement); - Requirement.ExcelClientV1DefaultSetRequirement=ExcelClientV1DefaultSetRequirement; - var OutlookClientDefaultSetRequirement=function(_super) - { - __extends(OutlookClientDefaultSetRequirement,_super); - function OutlookClientDefaultSetRequirement() - { - _super.call(this,{mailbox: 1.3}) - } - return OutlookClientDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.OutlookClientDefaultSetRequirement=OutlookClientDefaultSetRequirement; - var WordClientDefaultSetRequirement=function(_super) - { - __extends(WordClientDefaultSetRequirement,_super); - function WordClientDefaultSetRequirement() - { - _super.call(this,{ - bindingevents: 1.1, - compressedfile: 1.1, - customxmlparts: 1.1, - documentevents: 1.1, - file: 1.1, - htmlcoercion: 1.1, - matrixbindings: 1.1, - matrixcoercion: 1.1, - ooxmlcoercion: 1.1, - pdffile: 1.1, - selection: 1.1, - settings: 1.1, - tablebindings: 1.1, - tablecoercion: 1.1, - textbindings: 1.1, - textcoercion: 1.1, - textfile: 1.1, - wordapi: 1.1 - }) - } - return WordClientDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.WordClientDefaultSetRequirement=WordClientDefaultSetRequirement; - var WordClientV1DefaultSetRequirement=function(_super) - { - __extends(WordClientV1DefaultSetRequirement,_super); - function WordClientV1DefaultSetRequirement() - { - _super.call(this); - this._addSetMap({ - customxmlparts: 1.2, - wordapi: 1.2, - imagecoercion: 1.1 - }) - } - return WordClientV1DefaultSetRequirement - }(WordClientDefaultSetRequirement); - Requirement.WordClientV1DefaultSetRequirement=WordClientV1DefaultSetRequirement; - var PowerpointClientDefaultSetRequirement=function(_super) - { - __extends(PowerpointClientDefaultSetRequirement,_super); - function PowerpointClientDefaultSetRequirement() - { - _super.call(this,{ - activeview: 1.1, - compressedfile: 1.1, - documentevents: 1.1, - file: 1.1, - pdffile: 1.1, - selection: 1.1, - settings: 1.1, - textcoercion: 1.1 - }) - } - return PowerpointClientDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.PowerpointClientDefaultSetRequirement=PowerpointClientDefaultSetRequirement; - var PowerpointClientV1DefaultSetRequirement=function(_super) - { - __extends(PowerpointClientV1DefaultSetRequirement,_super); - function PowerpointClientV1DefaultSetRequirement() - { - _super.call(this); - this._addSetMap({imagecoercion: 1.1}) - } - return PowerpointClientV1DefaultSetRequirement - }(PowerpointClientDefaultSetRequirement); - Requirement.PowerpointClientV1DefaultSetRequirement=PowerpointClientV1DefaultSetRequirement; - var ProjectClientDefaultSetRequirement=function(_super) - { - __extends(ProjectClientDefaultSetRequirement,_super); - function ProjectClientDefaultSetRequirement() - { - _super.call(this,{ - selection: 1.1, - textcoercion: 1.1 - }) - } - return ProjectClientDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.ProjectClientDefaultSetRequirement=ProjectClientDefaultSetRequirement; - var ExcelWebDefaultSetRequirement=function(_super) - { - __extends(ExcelWebDefaultSetRequirement,_super); - function ExcelWebDefaultSetRequirement() - { - _super.call(this,{ - bindingevents: 1.1, - documentevents: 1.1, - matrixbindings: 1.1, - matrixcoercion: 1.1, - selection: 1.1, - settings: 1.1, - tablebindings: 1.1, - tablecoercion: 1.1, - textbindings: 1.1, - textcoercion: 1.1, - file: 1.1 - }) - } - return ExcelWebDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.ExcelWebDefaultSetRequirement=ExcelWebDefaultSetRequirement; - var WordWebDefaultSetRequirement=function(_super) - { - __extends(WordWebDefaultSetRequirement,_super); - function WordWebDefaultSetRequirement() - { - _super.call(this,{ - compressedfile: 1.1, - documentevents: 1.1, - file: 1.1, - imagecoercion: 1.1, - matrixcoercion: 1.1, - ooxmlcoercion: 1.1, - pdffile: 1.1, - selection: 1.1, - settings: 1.1, - tablecoercion: 1.1, - textcoercion: 1.1, - textfile: 1.1 - }) - } - return WordWebDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.WordWebDefaultSetRequirement=WordWebDefaultSetRequirement; - var PowerpointWebDefaultSetRequirement=function(_super) - { - __extends(PowerpointWebDefaultSetRequirement,_super); - function PowerpointWebDefaultSetRequirement() - { - _super.call(this,{ - activeview: 1.1, - settings: 1.1 - }) - } - return PowerpointWebDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.PowerpointWebDefaultSetRequirement=PowerpointWebDefaultSetRequirement; - var OutlookWebDefaultSetRequirement=function(_super) - { - __extends(OutlookWebDefaultSetRequirement,_super); - function OutlookWebDefaultSetRequirement() - { - _super.call(this,{mailbox: 1.3}) - } - return OutlookWebDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.OutlookWebDefaultSetRequirement=OutlookWebDefaultSetRequirement; - var SwayWebDefaultSetRequirement=function(_super) - { - __extends(SwayWebDefaultSetRequirement,_super); - function SwayWebDefaultSetRequirement() - { - _super.call(this,{ - activeview: 1.1, - documentevents: 1.1, - selection: 1.1, - settings: 1.1, - textcoercion: 1.1 - }) - } - return SwayWebDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.SwayWebDefaultSetRequirement=SwayWebDefaultSetRequirement; - var AccessWebDefaultSetRequirement=function(_super) - { - __extends(AccessWebDefaultSetRequirement,_super); - function AccessWebDefaultSetRequirement() - { - _super.call(this,{ - bindingevents: 1.1, - partialtablebindings: 1.1, - settings: 1.1, - tablebindings: 1.1, - tablecoercion: 1.1 - }) - } - return AccessWebDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.AccessWebDefaultSetRequirement=AccessWebDefaultSetRequirement; - var ExcelIOSDefaultSetRequirement=function(_super) - { - __extends(ExcelIOSDefaultSetRequirement,_super); - function ExcelIOSDefaultSetRequirement() - { - _super.call(this,{ - bindingevents: 1.1, - documentevents: 1.1, - matrixbindings: 1.1, - matrixcoercion: 1.1, - selection: 1.1, - settings: 1.1, - tablebindings: 1.1, - tablecoercion: 1.1, - textbindings: 1.1, - textcoercion: 1.1 - }) - } - return ExcelIOSDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.ExcelIOSDefaultSetRequirement=ExcelIOSDefaultSetRequirement; - var WordIOSDefaultSetRequirement=function(_super) - { - __extends(WordIOSDefaultSetRequirement,_super); - function WordIOSDefaultSetRequirement() - { - _super.call(this,{ - bindingevents: 1.1, - compressedfile: 1.1, - customxmlparts: 1.1, - documentevents: 1.1, - file: 1.1, - htmlcoercion: 1.1, - matrixbindings: 1.1, - matrixcoercion: 1.1, - ooxmlcoercion: 1.1, - pdffile: 1.1, - selection: 1.1, - settings: 1.1, - tablebindings: 1.1, - tablecoercion: 1.1, - textbindings: 1.1, - textcoercion: 1.1, - textfile: 1.1 - }) - } - return WordIOSDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.WordIOSDefaultSetRequirement=WordIOSDefaultSetRequirement; - var WordIOSV1DefaultSetRequirement=function(_super) - { - __extends(WordIOSV1DefaultSetRequirement,_super); - function WordIOSV1DefaultSetRequirement() - { - _super.call(this); - this._addSetMap({ - customxmlparts: 1.2, - wordapi: 1.2 - }) - } - return WordIOSV1DefaultSetRequirement - }(WordIOSDefaultSetRequirement); - Requirement.WordIOSV1DefaultSetRequirement=WordIOSV1DefaultSetRequirement; - var PowerpointIOSDefaultSetRequirement=function(_super) - { - __extends(PowerpointIOSDefaultSetRequirement,_super); - function PowerpointIOSDefaultSetRequirement() - { - _super.call(this,{ - activeview: 1.1, - compressedfile: 1.1, - documentevents: 1.1, - file: 1.1, - pdffile: 1.1, - selection: 1.1, - settings: 1.1, - textcoercion: 1.1 - }) - } - return PowerpointIOSDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.PowerpointIOSDefaultSetRequirement=PowerpointIOSDefaultSetRequirement; - var OutlookIOSDefaultSetRequirement=function(_super) - { - __extends(OutlookIOSDefaultSetRequirement,_super); - function OutlookIOSDefaultSetRequirement() - { - _super.call(this,{mailbox: 1.1}) - } - return OutlookIOSDefaultSetRequirement - }(DefaultSetRequirement); - Requirement.OutlookIOSDefaultSetRequirement=OutlookIOSDefaultSetRequirement; - var RequirementsMatrixFactory=function() - { - function RequirementsMatrixFactory(){} - RequirementsMatrixFactory.initializeOsfDda=function() - { - OSF.OUtil.setNamespace("Requirement",OSF.DDA) - }; - RequirementsMatrixFactory.getDefaultRequirementMatrix=function(appContext) - { - this.initializeDefaultSetMatrix(); - var defaultRequirementMatrix=undefined; - var clientRequirement=appContext.get_requirementMatrix(); - if(clientRequirement !=undefined && clientRequirement.length > 0 && typeof JSON !=="undefined") - { - var matrixItem=JSON.parse(appContext.get_requirementMatrix().toLowerCase()); - defaultRequirementMatrix=new RequirementMatrix(new DefaultSetRequirement(matrixItem)) - } - else - { - var appLocator=RequirementsMatrixFactory.getClientFullVersionString(appContext); - if(RequirementsMatrixFactory.DefaultSetArrayMatrix !=undefined && RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator] !=undefined) - defaultRequirementMatrix=new RequirementMatrix(RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator]); - else - defaultRequirementMatrix=new RequirementMatrix(new DefaultSetRequirement({})) - } - return defaultRequirementMatrix - }; - RequirementsMatrixFactory.getDefaultDialogRequirementMatrix=function(appContext) - { - var defaultRequirementMatrix=undefined; - var clientRequirement=appContext.get_dialogRequirementMatrix(); - if(clientRequirement !=undefined && clientRequirement.length > 0 && typeof JSON !=="undefined") - { - var matrixItem=JSON.parse(appContext.get_requirementMatrix().toLowerCase()); - defaultRequirementMatrix=new RequirementMatrix(new DefaultSetRequirement(matrixItem)) - } - else - defaultRequirementMatrix=new RequirementMatrix(new DefaultDialogSetRequirement); - return defaultRequirementMatrix - }; - RequirementsMatrixFactory.getClientFullVersionString=function(appContext) - { - var appMinorVersion=appContext.get_appMinorVersion(); - var appMinorVersionString=""; - var appFullVersion=""; - var appName=appContext.get_appName(); - var isIOSClient=appName==1024 || appName==4096 || appName==8192 || appName==65536; - if(isIOSClient && appContext.get_appVersion()==1) - if(appName==4096 && appMinorVersion >=15) - appFullVersion="16.00.01"; - else - appFullVersion="16.00"; - else if(appContext.get_appName()==64) - appFullVersion=appContext.get_appVersion(); - else - { - if(appMinorVersion < 10) - appMinorVersionString="0"+appMinorVersion; - else - appMinorVersionString=""+appMinorVersion; - appFullVersion=appContext.get_appVersion()+"."+appMinorVersionString - } - return appContext.get_appName()+"-"+appFullVersion - }; - RequirementsMatrixFactory.initializeDefaultSetMatrix=function() - { - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1600]=new ExcelClientDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1600]=new WordClientDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1600]=new PowerpointClientDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1601]=new ExcelClientV1DefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1601]=new WordClientV1DefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1601]=new PowerpointClientV1DefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_RCLIENT_1600]=new OutlookClientDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_WAC_1600]=new ExcelWebDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_WAC_1600]=new WordWebDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1600]=new OutlookWebDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1601]=new OutlookWebDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Project_RCLIENT_1600]=new ProjectClientDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Access_WAC_1600]=new AccessWebDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_WAC_1600]=new PowerpointWebDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_IOS_1600]=new ExcelIOSDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.SWAY_WAC_1600]=new SwayWebDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_1600]=new WordIOSDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_16001]=new WordIOSV1DefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_IOS_1600]=new PowerpointIOSDefaultSetRequirement; - RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_IOS_1600]=new OutlookIOSDefaultSetRequirement - }; - RequirementsMatrixFactory.Excel_RCLIENT_1600="1-16.00"; - RequirementsMatrixFactory.Excel_RCLIENT_1601="1-16.01"; - RequirementsMatrixFactory.Word_RCLIENT_1600="2-16.00"; - RequirementsMatrixFactory.Word_RCLIENT_1601="2-16.01"; - RequirementsMatrixFactory.PowerPoint_RCLIENT_1600="4-16.00"; - RequirementsMatrixFactory.PowerPoint_RCLIENT_1601="4-16.01"; - RequirementsMatrixFactory.Outlook_RCLIENT_1600="8-16.00"; - RequirementsMatrixFactory.Excel_WAC_1600="16-16.00"; - RequirementsMatrixFactory.Word_WAC_1600="32-16.00"; - RequirementsMatrixFactory.Outlook_WAC_1600="64-16.00"; - RequirementsMatrixFactory.Outlook_WAC_1601="64-16.01"; - RequirementsMatrixFactory.Project_RCLIENT_1600="128-16.00"; - RequirementsMatrixFactory.Access_WAC_1600="256-16.00"; - RequirementsMatrixFactory.PowerPoint_WAC_1600="512-16.00"; - RequirementsMatrixFactory.Excel_IOS_1600="1024-16.00"; - RequirementsMatrixFactory.SWAY_WAC_1600="2048-16.00"; - RequirementsMatrixFactory.Word_IOS_1600="4096-16.00"; - RequirementsMatrixFactory.Word_IOS_16001="4096-16.00.01"; - RequirementsMatrixFactory.PowerPoint_IOS_1600="8192-16.00"; - RequirementsMatrixFactory.Outlook_IOS_1600="65536-16.00"; - RequirementsMatrixFactory.DefaultSetArrayMatrix={}; - return RequirementsMatrixFactory - }(); - Requirement.RequirementsMatrixFactory=RequirementsMatrixFactory - })(Requirement=OfficeExt.Requirement || (OfficeExt.Requirement={})) -})(OfficeExt || (OfficeExt={})); + var Requirement; + (function(Requirement) + { + var RequirementVersion = function() + { + function RequirementVersion(){} + return RequirementVersion + }(); + Requirement.RequirementVersion = RequirementVersion; + var RequirementMatrix = function() + { + function RequirementMatrix(_setMap) + { + this.isSetSupported = function _isSetSupported(name, minVersion) + { + if(name == undefined) + return false; + if(minVersion == undefined) + minVersion = 0; + var setSupportArray = this._setMap; + var sets = setSupportArray._sets; + if(sets.hasOwnProperty(name.toLowerCase())) + { + var setMaxVersion = sets[name.toLowerCase()]; + try + { + var setMaxVersionNum = this._getVersion(setMaxVersion); + minVersion = minVersion + ""; + var minVersionNum = this._getVersion(minVersion); + if(setMaxVersionNum.major > 0 && setMaxVersionNum.major > minVersionNum.major) + return true; + if(setMaxVersionNum.minor > 0 && setMaxVersionNum.minor > 0 && setMaxVersionNum.major == minVersionNum.major && setMaxVersionNum.minor >= minVersionNum.minor) + return true + } + catch(e) + { + return false + } + } + return false + }; + this._getVersion = function(version) + { + var temp = version.split("."); + var major = 0; + var minor = 0; + if(temp.length < 2 && isNaN(Number(version))) + throw"version format incorrect"; + else + { + major = Number(temp[0]); + if(temp.length >= 2) + minor = Number(temp[1]); + if(isNaN(major) || isNaN(minor)) + throw"version format incorrect"; + } + var result = { + minor: minor, + major: major + }; + return result + }; + this._setMap = _setMap; + this.isSetSupported = this.isSetSupported.bind(this) + } + return RequirementMatrix + }(); + Requirement.RequirementMatrix = RequirementMatrix; + var DefaultSetRequirement = function() + { + function DefaultSetRequirement(setMap) + { + this._addSetMap = function DefaultSetRequirement_addSetMap(addedSet) + { + for(var name in addedSet) + this._sets[name] = addedSet[name] + }; + this._sets = setMap + } + return DefaultSetRequirement + }(); + Requirement.DefaultSetRequirement = DefaultSetRequirement; + var DefaultDialogSetRequirement = function(_super) + { + __extends(DefaultDialogSetRequirement,_super); + function DefaultDialogSetRequirement() + { + _super.call(this,{dialogapi: 1.1}) + } + return DefaultDialogSetRequirement + }(DefaultSetRequirement); + Requirement.DefaultDialogSetRequirement = DefaultDialogSetRequirement; + var ExcelClientDefaultSetRequirement = function(_super) + { + __extends(ExcelClientDefaultSetRequirement,_super); + function ExcelClientDefaultSetRequirement() + { + _super.call(this,{ + bindingevents: 1.1, + documentevents: 1.1, + excelapi: 1.1, + matrixbindings: 1.1, + matrixcoercion: 1.1, + selection: 1.1, + settings: 1.1, + tablebindings: 1.1, + tablecoercion: 1.1, + textbindings: 1.1, + textcoercion: 1.1 + }) + } + return ExcelClientDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.ExcelClientDefaultSetRequirement = ExcelClientDefaultSetRequirement; + var ExcelClientV1DefaultSetRequirement = function(_super) + { + __extends(ExcelClientV1DefaultSetRequirement,_super); + function ExcelClientV1DefaultSetRequirement() + { + _super.call(this); + this._addSetMap({imagecoercion: 1.1}) + } + return ExcelClientV1DefaultSetRequirement + }(ExcelClientDefaultSetRequirement); + Requirement.ExcelClientV1DefaultSetRequirement = ExcelClientV1DefaultSetRequirement; + var OutlookClientDefaultSetRequirement = function(_super) + { + __extends(OutlookClientDefaultSetRequirement,_super); + function OutlookClientDefaultSetRequirement() + { + _super.call(this,{mailbox: 1.3}) + } + return OutlookClientDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.OutlookClientDefaultSetRequirement = OutlookClientDefaultSetRequirement; + var WordClientDefaultSetRequirement = function(_super) + { + __extends(WordClientDefaultSetRequirement,_super); + function WordClientDefaultSetRequirement() + { + _super.call(this,{ + bindingevents: 1.1, + compressedfile: 1.1, + customxmlparts: 1.1, + documentevents: 1.1, + file: 1.1, + htmlcoercion: 1.1, + matrixbindings: 1.1, + matrixcoercion: 1.1, + ooxmlcoercion: 1.1, + pdffile: 1.1, + selection: 1.1, + settings: 1.1, + tablebindings: 1.1, + tablecoercion: 1.1, + textbindings: 1.1, + textcoercion: 1.1, + textfile: 1.1, + wordapi: 1.1 + }) + } + return WordClientDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.WordClientDefaultSetRequirement = WordClientDefaultSetRequirement; + var WordClientV1DefaultSetRequirement = function(_super) + { + __extends(WordClientV1DefaultSetRequirement,_super); + function WordClientV1DefaultSetRequirement() + { + _super.call(this); + this._addSetMap({ + customxmlparts: 1.2, + wordapi: 1.2, + imagecoercion: 1.1 + }) + } + return WordClientV1DefaultSetRequirement + }(WordClientDefaultSetRequirement); + Requirement.WordClientV1DefaultSetRequirement = WordClientV1DefaultSetRequirement; + var PowerpointClientDefaultSetRequirement = function(_super) + { + __extends(PowerpointClientDefaultSetRequirement,_super); + function PowerpointClientDefaultSetRequirement() + { + _super.call(this,{ + activeview: 1.1, + compressedfile: 1.1, + documentevents: 1.1, + file: 1.1, + pdffile: 1.1, + selection: 1.1, + settings: 1.1, + textcoercion: 1.1 + }) + } + return PowerpointClientDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.PowerpointClientDefaultSetRequirement = PowerpointClientDefaultSetRequirement; + var PowerpointClientV1DefaultSetRequirement = function(_super) + { + __extends(PowerpointClientV1DefaultSetRequirement,_super); + function PowerpointClientV1DefaultSetRequirement() + { + _super.call(this); + this._addSetMap({imagecoercion: 1.1}) + } + return PowerpointClientV1DefaultSetRequirement + }(PowerpointClientDefaultSetRequirement); + Requirement.PowerpointClientV1DefaultSetRequirement = PowerpointClientV1DefaultSetRequirement; + var ProjectClientDefaultSetRequirement = function(_super) + { + __extends(ProjectClientDefaultSetRequirement,_super); + function ProjectClientDefaultSetRequirement() + { + _super.call(this,{ + selection: 1.1, + textcoercion: 1.1 + }) + } + return ProjectClientDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.ProjectClientDefaultSetRequirement = ProjectClientDefaultSetRequirement; + var ExcelWebDefaultSetRequirement = function(_super) + { + __extends(ExcelWebDefaultSetRequirement,_super); + function ExcelWebDefaultSetRequirement() + { + _super.call(this,{ + bindingevents: 1.1, + documentevents: 1.1, + matrixbindings: 1.1, + matrixcoercion: 1.1, + selection: 1.1, + settings: 1.1, + tablebindings: 1.1, + tablecoercion: 1.1, + textbindings: 1.1, + textcoercion: 1.1, + file: 1.1 + }) + } + return ExcelWebDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.ExcelWebDefaultSetRequirement = ExcelWebDefaultSetRequirement; + var WordWebDefaultSetRequirement = function(_super) + { + __extends(WordWebDefaultSetRequirement,_super); + function WordWebDefaultSetRequirement() + { + _super.call(this,{ + compressedfile: 1.1, + documentevents: 1.1, + file: 1.1, + imagecoercion: 1.1, + matrixcoercion: 1.1, + ooxmlcoercion: 1.1, + pdffile: 1.1, + selection: 1.1, + settings: 1.1, + tablecoercion: 1.1, + textcoercion: 1.1, + textfile: 1.1 + }) + } + return WordWebDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.WordWebDefaultSetRequirement = WordWebDefaultSetRequirement; + var PowerpointWebDefaultSetRequirement = function(_super) + { + __extends(PowerpointWebDefaultSetRequirement,_super); + function PowerpointWebDefaultSetRequirement() + { + _super.call(this,{ + activeview: 1.1, + settings: 1.1 + }) + } + return PowerpointWebDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.PowerpointWebDefaultSetRequirement = PowerpointWebDefaultSetRequirement; + var OutlookWebDefaultSetRequirement = function(_super) + { + __extends(OutlookWebDefaultSetRequirement,_super); + function OutlookWebDefaultSetRequirement() + { + _super.call(this,{mailbox: 1.3}) + } + return OutlookWebDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.OutlookWebDefaultSetRequirement = OutlookWebDefaultSetRequirement; + var SwayWebDefaultSetRequirement = function(_super) + { + __extends(SwayWebDefaultSetRequirement,_super); + function SwayWebDefaultSetRequirement() + { + _super.call(this,{ + activeview: 1.1, + documentevents: 1.1, + selection: 1.1, + settings: 1.1, + textcoercion: 1.1 + }) + } + return SwayWebDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.SwayWebDefaultSetRequirement = SwayWebDefaultSetRequirement; + var AccessWebDefaultSetRequirement = function(_super) + { + __extends(AccessWebDefaultSetRequirement,_super); + function AccessWebDefaultSetRequirement() + { + _super.call(this,{ + bindingevents: 1.1, + partialtablebindings: 1.1, + settings: 1.1, + tablebindings: 1.1, + tablecoercion: 1.1 + }) + } + return AccessWebDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.AccessWebDefaultSetRequirement = AccessWebDefaultSetRequirement; + var ExcelIOSDefaultSetRequirement = function(_super) + { + __extends(ExcelIOSDefaultSetRequirement,_super); + function ExcelIOSDefaultSetRequirement() + { + _super.call(this,{ + bindingevents: 1.1, + documentevents: 1.1, + matrixbindings: 1.1, + matrixcoercion: 1.1, + selection: 1.1, + settings: 1.1, + tablebindings: 1.1, + tablecoercion: 1.1, + textbindings: 1.1, + textcoercion: 1.1 + }) + } + return ExcelIOSDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.ExcelIOSDefaultSetRequirement = ExcelIOSDefaultSetRequirement; + var WordIOSDefaultSetRequirement = function(_super) + { + __extends(WordIOSDefaultSetRequirement,_super); + function WordIOSDefaultSetRequirement() + { + _super.call(this,{ + bindingevents: 1.1, + compressedfile: 1.1, + customxmlparts: 1.1, + documentevents: 1.1, + file: 1.1, + htmlcoercion: 1.1, + matrixbindings: 1.1, + matrixcoercion: 1.1, + ooxmlcoercion: 1.1, + pdffile: 1.1, + selection: 1.1, + settings: 1.1, + tablebindings: 1.1, + tablecoercion: 1.1, + textbindings: 1.1, + textcoercion: 1.1, + textfile: 1.1 + }) + } + return WordIOSDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.WordIOSDefaultSetRequirement = WordIOSDefaultSetRequirement; + var WordIOSV1DefaultSetRequirement = function(_super) + { + __extends(WordIOSV1DefaultSetRequirement,_super); + function WordIOSV1DefaultSetRequirement() + { + _super.call(this); + this._addSetMap({ + customxmlparts: 1.2, + wordapi: 1.2 + }) + } + return WordIOSV1DefaultSetRequirement + }(WordIOSDefaultSetRequirement); + Requirement.WordIOSV1DefaultSetRequirement = WordIOSV1DefaultSetRequirement; + var PowerpointIOSDefaultSetRequirement = function(_super) + { + __extends(PowerpointIOSDefaultSetRequirement,_super); + function PowerpointIOSDefaultSetRequirement() + { + _super.call(this,{ + activeview: 1.1, + compressedfile: 1.1, + documentevents: 1.1, + file: 1.1, + pdffile: 1.1, + selection: 1.1, + settings: 1.1, + textcoercion: 1.1 + }) + } + return PowerpointIOSDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.PowerpointIOSDefaultSetRequirement = PowerpointIOSDefaultSetRequirement; + var OutlookIOSDefaultSetRequirement = function(_super) + { + __extends(OutlookIOSDefaultSetRequirement,_super); + function OutlookIOSDefaultSetRequirement() + { + _super.call(this,{mailbox: 1.1}) + } + return OutlookIOSDefaultSetRequirement + }(DefaultSetRequirement); + Requirement.OutlookIOSDefaultSetRequirement = OutlookIOSDefaultSetRequirement; + var RequirementsMatrixFactory = function() + { + function RequirementsMatrixFactory(){} + RequirementsMatrixFactory.initializeOsfDda = function() + { + OSF.OUtil.setNamespace("Requirement",OSF.DDA) + }; + RequirementsMatrixFactory.getDefaultRequirementMatrix = function(appContext) + { + this.initializeDefaultSetMatrix(); + var defaultRequirementMatrix = undefined; + var clientRequirement = appContext.get_requirementMatrix(); + if(clientRequirement != undefined && clientRequirement.length > 0 && typeof JSON !== "undefined") + { + var matrixItem = JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement(matrixItem)) + } + else + { + var appLocator = RequirementsMatrixFactory.getClientFullVersionString(appContext); + if(RequirementsMatrixFactory.DefaultSetArrayMatrix != undefined && RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator] != undefined) + defaultRequirementMatrix = new RequirementMatrix(RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator]); + else + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement({})) + } + return defaultRequirementMatrix + }; + RequirementsMatrixFactory.getDefaultDialogRequirementMatrix = function(appContext) + { + var defaultRequirementMatrix = undefined; + var clientRequirement = appContext.get_dialogRequirementMatrix(); + if(clientRequirement != undefined && clientRequirement.length > 0 && typeof JSON !== "undefined") + { + var matrixItem = JSON.parse(appContext.get_requirementMatrix().toLowerCase()); + defaultRequirementMatrix = new RequirementMatrix(new DefaultSetRequirement(matrixItem)) + } + else + defaultRequirementMatrix = new RequirementMatrix(new DefaultDialogSetRequirement); + return defaultRequirementMatrix + }; + RequirementsMatrixFactory.getClientFullVersionString = function(appContext) + { + var appMinorVersion = appContext.get_appMinorVersion(); + var appMinorVersionString = ""; + var appFullVersion = ""; + var appName = appContext.get_appName(); + var isIOSClient = appName == 1024 || appName == 4096 || appName == 8192 || appName == 65536; + if(isIOSClient && appContext.get_appVersion() == 1) + if(appName == 4096 && appMinorVersion >= 15) + appFullVersion = "16.00.01"; + else + appFullVersion = "16.00"; + else if(appContext.get_appName() == 64) + appFullVersion = appContext.get_appVersion(); + else + { + if(appMinorVersion < 10) + appMinorVersionString = "0" + appMinorVersion; + else + appMinorVersionString = "" + appMinorVersion; + appFullVersion = appContext.get_appVersion() + "." + appMinorVersionString + } + return appContext.get_appName() + "-" + appFullVersion + }; + RequirementsMatrixFactory.initializeDefaultSetMatrix = function() + { + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1600] = new ExcelClientDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1600] = new WordClientDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1600] = new PowerpointClientDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1601] = new ExcelClientV1DefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1601] = new WordClientV1DefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1601] = new PowerpointClientV1DefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_RCLIENT_1600] = new OutlookClientDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_WAC_1600] = new ExcelWebDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_WAC_1600] = new WordWebDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1600] = new OutlookWebDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1601] = new OutlookWebDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Project_RCLIENT_1600] = new ProjectClientDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Access_WAC_1600] = new AccessWebDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_WAC_1600] = new PowerpointWebDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_IOS_1600] = new ExcelIOSDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.SWAY_WAC_1600] = new SwayWebDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_1600] = new WordIOSDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_16001] = new WordIOSV1DefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_IOS_1600] = new PowerpointIOSDefaultSetRequirement; + RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_IOS_1600] = new OutlookIOSDefaultSetRequirement + }; + RequirementsMatrixFactory.Excel_RCLIENT_1600 = "1-16.00"; + RequirementsMatrixFactory.Excel_RCLIENT_1601 = "1-16.01"; + RequirementsMatrixFactory.Word_RCLIENT_1600 = "2-16.00"; + RequirementsMatrixFactory.Word_RCLIENT_1601 = "2-16.01"; + RequirementsMatrixFactory.PowerPoint_RCLIENT_1600 = "4-16.00"; + RequirementsMatrixFactory.PowerPoint_RCLIENT_1601 = "4-16.01"; + RequirementsMatrixFactory.Outlook_RCLIENT_1600 = "8-16.00"; + RequirementsMatrixFactory.Excel_WAC_1600 = "16-16.00"; + RequirementsMatrixFactory.Word_WAC_1600 = "32-16.00"; + RequirementsMatrixFactory.Outlook_WAC_1600 = "64-16.00"; + RequirementsMatrixFactory.Outlook_WAC_1601 = "64-16.01"; + RequirementsMatrixFactory.Project_RCLIENT_1600 = "128-16.00"; + RequirementsMatrixFactory.Access_WAC_1600 = "256-16.00"; + RequirementsMatrixFactory.PowerPoint_WAC_1600 = "512-16.00"; + RequirementsMatrixFactory.Excel_IOS_1600 = "1024-16.00"; + RequirementsMatrixFactory.SWAY_WAC_1600 = "2048-16.00"; + RequirementsMatrixFactory.Word_IOS_1600 = "4096-16.00"; + RequirementsMatrixFactory.Word_IOS_16001 = "4096-16.00.01"; + RequirementsMatrixFactory.PowerPoint_IOS_1600 = "8192-16.00"; + RequirementsMatrixFactory.Outlook_IOS_1600 = "65536-16.00"; + RequirementsMatrixFactory.DefaultSetArrayMatrix = {}; + return RequirementsMatrixFactory + }(); + Requirement.RequirementsMatrixFactory = RequirementsMatrixFactory + })(Requirement = OfficeExt.Requirement || (OfficeExt.Requirement = {})) +})(OfficeExt || (OfficeExt = {})); OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(); -Microsoft.Office.WebExtension.ApplicationMode={ - WebEditor: "webEditor", - WebViewer: "webViewer", - Client: "client" +var OfficeExt; +(function(OfficeExt) +{ + var HostName; + (function(HostName) + { + var Host = function() + { + function Host() + { + this.getDiagnostics = function _getDiagnostics(version) + { + var diagnostics = { + host: this.getHost(), + version: version || this.getDefaultVersion(), + platform: this.getPlatform() + }; + return diagnostics + }; + this.platformRemappings = { + web: Microsoft.Office.WebExtension.PlatformType.OfficeOnline, + winrt: Microsoft.Office.WebExtension.PlatformType.Universal, + win32: Microsoft.Office.WebExtension.PlatformType.PC, + mac: Microsoft.Office.WebExtension.PlatformType.Mac, + ios: Microsoft.Office.WebExtension.PlatformType.iOS, + android: Microsoft.Office.WebExtension.PlatformType.Android + }; + this.camelCaseMappings = { + powerpoint: Microsoft.Office.WebExtension.HostType.PowerPoint, + onenote: Microsoft.Office.WebExtension.HostType.OneNote + }; + this.hostInfo = OSF._OfficeAppFactory.getHostInfo(); + this.getHost = this.getHost.bind(this); + this.getPlatform = this.getPlatform.bind(this); + this.getDiagnostics = this.getDiagnostics.bind(this) + } + Host.prototype.capitalizeFirstLetter = function(input) + { + if(input) + return input[0].toUpperCase() + input.slice(1).toLowerCase(); + return input + }; + Host.getInstance = function() + { + if(Host.hostObj === undefined) + Host.hostObj = new Host; + return Host.hostObj + }; + Host.prototype.getPlatform = function() + { + if(this.hostInfo.hostPlatform) + { + var hostPlatform = this.hostInfo.hostPlatform.toLowerCase(); + if(this.platformRemappings[hostPlatform]) + return this.platformRemappings[hostPlatform] + } + return null + }; + Host.prototype.getHost = function() + { + if(this.hostInfo.hostType) + { + var hostType = this.hostInfo.hostType.toLowerCase(); + if(this.camelCaseMappings[hostType]) + return this.camelCaseMappings[hostType]; + hostType = this.capitalizeFirstLetter(this.hostInfo.hostType); + if(Microsoft.Office.WebExtension.HostType[hostType]) + return Microsoft.Office.WebExtension.HostType[hostType] + } + return null + }; + Host.prototype.getDefaultVersion = function() + { + if(this.getHost()) + return"16.0.0000.0000"; + return null + }; + return Host + }(); + HostName.Host = Host + })(HostName = OfficeExt.HostName || (OfficeExt.HostName = {})) +})(OfficeExt || (OfficeExt = {})); +Microsoft.Office.WebExtension.ApplicationMode = { + WebEditor: "webEditor", + WebViewer: "webViewer", + Client: "client" }; -Microsoft.Office.WebExtension.DocumentMode={ - ReadOnly: "readOnly", - ReadWrite: "readWrite" +Microsoft.Office.WebExtension.DocumentMode = { + ReadOnly: "readOnly", + ReadWrite: "readWrite" }; -OSF.NamespaceManager=function OSF_NamespaceManager() +OSF.NamespaceManager = function OSF_NamespaceManager() { - var _userOffice; - var _useShortcut=false; - return{ - enableShortcut: function OSF_NamespaceManager$enableShortcut() - { - if(!_useShortcut) - { - if(window.Office) - _userOffice=window.Office; - else - OSF.OUtil.setNamespace("Office",window); - window.Office=Microsoft.Office.WebExtension; - _useShortcut=true - } - }, - disableShortcut: function OSF_NamespaceManager$disableShortcut() - { - if(_useShortcut) - { - if(_userOffice) - window.Office=_userOffice; - else - OSF.OUtil.unsetNamespace("Office",window); - _useShortcut=false - } - } - } + var _userOffice; + var _useShortcut = false; + return{ + enableShortcut: function OSF_NamespaceManager$enableShortcut() + { + if(!_useShortcut) + { + if(window.Office) + _userOffice = window.Office; + else + OSF.OUtil.setNamespace("Office",window); + window.Office = Microsoft.Office.WebExtension; + _useShortcut = true + } + }, + disableShortcut: function OSF_NamespaceManager$disableShortcut() + { + if(_useShortcut) + { + if(_userOffice) + window.Office = _userOffice; + else + OSF.OUtil.unsetNamespace("Office",window); + _useShortcut = false + } + } + } }(); OSF.NamespaceManager.enableShortcut(); -Microsoft.Office.WebExtension.useShortNamespace=function Microsoft_Office_WebExtension_useShortNamespace(useShortcut) +Microsoft.Office.WebExtension.useShortNamespace = function Microsoft_Office_WebExtension_useShortNamespace(useShortcut) { - if(useShortcut) - OSF.NamespaceManager.enableShortcut(); - else - OSF.NamespaceManager.disableShortcut() + if(useShortcut) + OSF.NamespaceManager.enableShortcut(); + else + OSF.NamespaceManager.disableShortcut() }; -Microsoft.Office.WebExtension.select=function Microsoft_Office_WebExtension_select(str, errorCallback) +Microsoft.Office.WebExtension.select = function Microsoft_Office_WebExtension_select(str, errorCallback) { - var promise; - if(str && typeof str=="string") - { - var index=str.indexOf("#"); - if(index !=-1) - { - var op=str.substring(0,index); - var target=str.substring(index+1); - switch(op) - { - case"binding": - case"bindings": - if(target) - promise=new OSF.DDA.BindingPromise(target); - break - } - } - } - if(!promise) - { - if(errorCallback) - { - var callbackType=typeof errorCallback; - if(callbackType=="function") - { - var callArgs={}; - callArgs[Microsoft.Office.WebExtension.Parameters.Callback]=errorCallback; - OSF.DDA.issueAsyncResult(callArgs,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext)) - } - else - throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,callbackType); - } - } - else - { - promise.onFail=errorCallback; - return promise - } + var promise; + if(str && typeof str == "string") + { + var index = str.indexOf("#"); + if(index != -1) + { + var op = str.substring(0,index); + var target = str.substring(index + 1); + switch(op) + { + case"binding": + case"bindings": + if(target) + promise = new OSF.DDA.BindingPromise(target); + break + } + } + } + if(!promise) + { + if(errorCallback) + { + var callbackType = typeof errorCallback; + if(callbackType == "function") + { + var callArgs = {}; + callArgs[Microsoft.Office.WebExtension.Parameters.Callback] = errorCallback; + OSF.DDA.issueAsyncResult(callArgs,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext)) + } + else + throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,callbackType); + } + } + else + { + promise.onFail = errorCallback; + return promise + } }; -OSF.DDA.Context=function OSF_DDA_Context(officeAppContext, document, license, appOM, getOfficeTheme) +OSF.DDA.Context = function OSF_DDA_Context(officeAppContext, document, license, appOM, getOfficeTheme) { - OSF.OUtil.defineEnumerableProperties(this,{ - contentLanguage: {value: officeAppContext.get_dataLocale()}, - displayLanguage: {value: officeAppContext.get_appUILocale()}, - touchEnabled: {value: officeAppContext.get_touchEnabled()}, - commerceAllowed: {value: officeAppContext.get_commerceAllowed()} - }); - if(license) - OSF.OUtil.defineEnumerableProperty(this,"license",{value: license}); - if(officeAppContext.ui) - OSF.OUtil.defineEnumerableProperty(this,"ui",{value: officeAppContext.ui}); - if(officeAppContext.get_isDialog()) - { - var requirements=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); - OSF.OUtil.defineEnumerableProperty(this,"requirements",{value: requirements}) - } - else - { - if(document) - OSF.OUtil.defineEnumerableProperty(this,"document",{value: document}); - if(appOM) - { - var displayName=appOM.displayName || "appOM"; - delete appOM.displayName; - OSF.OUtil.defineEnumerableProperty(this,displayName,{value: appOM}) - } - if(getOfficeTheme) - OSF.OUtil.defineEnumerableProperty(this,"officeTheme",{get: function() - { - return getOfficeTheme() - }}); - var requirements=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(officeAppContext); - OSF.OUtil.defineEnumerableProperty(this,"requirements",{value: requirements}) - } + OSF.OUtil.defineEnumerableProperties(this,{ + contentLanguage: {value: officeAppContext.get_dataLocale()}, + displayLanguage: {value: officeAppContext.get_appUILocale()}, + touchEnabled: {value: officeAppContext.get_touchEnabled()}, + commerceAllowed: {value: officeAppContext.get_commerceAllowed()}, + host: {value: OfficeExt.HostName.Host.getInstance().getHost()}, + platform: {value: OfficeExt.HostName.Host.getInstance().getPlatform()}, + diagnostics: {value: OfficeExt.HostName.Host.getInstance().getDiagnostics(officeAppContext.get_hostFullVersion())} + }); + if(license) + OSF.OUtil.defineEnumerableProperty(this,"license",{value: license}); + if(officeAppContext.ui) + OSF.OUtil.defineEnumerableProperty(this,"ui",{value: officeAppContext.ui}); + if(officeAppContext.auth) + OSF.OUtil.defineEnumerableProperty(this,"auth",{value: officeAppContext.auth}); + if(officeAppContext.get_isDialog()) + { + var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); + OSF.OUtil.defineEnumerableProperty(this,"requirements",{value: requirements}) + } + else + { + if(document) + OSF.OUtil.defineEnumerableProperty(this,"document",{value: document}); + if(appOM) + { + var displayName = appOM.displayName || "appOM"; + delete appOM.displayName; + OSF.OUtil.defineEnumerableProperty(this,displayName,{value: appOM}) + } + if(getOfficeTheme) + OSF.OUtil.defineEnumerableProperty(this,"officeTheme",{get: function() + { + return getOfficeTheme() + }}); + var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(officeAppContext); + OSF.OUtil.defineEnumerableProperty(this,"requirements",{value: requirements}) + } }; -OSF.DDA.OutlookContext=function OSF_DDA_OutlookContext(appContext, settings, license, appOM, getOfficeTheme) +OSF.DDA.OutlookContext = function OSF_DDA_OutlookContext(appContext, settings, license, appOM, getOfficeTheme) { - OSF.DDA.OutlookContext.uber.constructor.call(this,appContext,null,license,appOM,getOfficeTheme); - if(settings) - OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value: settings}) + OSF.DDA.OutlookContext.uber.constructor.call(this,appContext,null,license,appOM,getOfficeTheme); + if(settings) + OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value: settings}) }; OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context); -OSF.DDA.OutlookAppOm=function OSF_DDA_OutlookAppOm(appContext, window, appReady){}; -OSF.DDA.Document=function OSF_DDA_Document(officeAppContext, settings) +OSF.DDA.OutlookAppOm = function OSF_DDA_OutlookAppOm(appContext, window, appReady){}; +OSF.DDA.Document = function OSF_DDA_Document(officeAppContext, settings) { - var mode; - switch(officeAppContext.get_clientMode()) - { - case OSF.ClientMode.ReadOnly: - mode=Microsoft.Office.WebExtension.DocumentMode.ReadOnly; - break; - case OSF.ClientMode.ReadWrite: - mode=Microsoft.Office.WebExtension.DocumentMode.ReadWrite; - break - } - if(settings) - OSF.OUtil.defineEnumerableProperty(this,"settings",{value: settings}); - OSF.OUtil.defineMutableProperties(this,{ - mode: {value: mode}, - url: {value: officeAppContext.get_docUrl()} - }) + var mode; + switch(officeAppContext.get_clientMode()) + { + case OSF.ClientMode.ReadOnly: + mode = Microsoft.Office.WebExtension.DocumentMode.ReadOnly; + break; + case OSF.ClientMode.ReadWrite: + mode = Microsoft.Office.WebExtension.DocumentMode.ReadWrite; + break + } + if(settings) + OSF.OUtil.defineEnumerableProperty(this,"settings",{value: settings}); + OSF.OUtil.defineMutableProperties(this,{ + mode: {value: mode}, + url: {value: officeAppContext.get_docUrl()} + }) }; -OSF.DDA.JsomDocument=function OSF_DDA_JsomDocument(officeAppContext, bindingFacade, settings) +OSF.DDA.JsomDocument = function OSF_DDA_JsomDocument(officeAppContext, bindingFacade, settings) { - OSF.DDA.JsomDocument.uber.constructor.call(this,officeAppContext,settings); - if(bindingFacade) - OSF.OUtil.defineEnumerableProperty(this,"bindings",{get: function OSF_DDA_Document$GetBindings() - { - return bindingFacade - }}); - var am=OSF.DDA.AsyncMethodNames; - OSF.DDA.DispIdHost.addAsyncMethods(this,[am.GetSelectedDataAsync,am.SetSelectedDataAsync]); - OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged])) + OSF.DDA.JsomDocument.uber.constructor.call(this,officeAppContext,settings); + if(bindingFacade) + OSF.OUtil.defineEnumerableProperty(this,"bindings",{get: function OSF_DDA_Document$GetBindings() + { + return bindingFacade + }}); + var am = OSF.DDA.AsyncMethodNames; + OSF.DDA.DispIdHost.addAsyncMethods(this,[am.GetSelectedDataAsync,am.SetSelectedDataAsync]); + OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged])) }; OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document); OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get: function Microsoft_Office_WebExtension$GetContext() - { - var context; - if(OSF && OSF._OfficeAppFactory) - context=OSF._OfficeAppFactory.getContext(); - return context - }}); -OSF.DDA.License=function OSF_DDA_License(eToken) + { + var context; + if(OSF && OSF._OfficeAppFactory) + context = OSF._OfficeAppFactory.getContext(); + return context + }}); +OSF.DDA.License = function OSF_DDA_License(eToken) { - OSF.OUtil.defineEnumerableProperty(this,"value",{value: eToken}) + OSF.OUtil.defineEnumerableProperty(this,"value",{value: eToken}) }; -OSF.DDA.ApiMethodCall=function OSF_DDA_ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) +OSF.DDA.ApiMethodCall = function OSF_DDA_ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { - var requiredCount=requiredParameters.length; - var getInvalidParameterString=OSF.OUtil.delayExecutionAndCache(function() - { - return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,displayName) - }); - this.verifyArguments=function OSF_DDA_ApiMethodCall$VerifyArguments(params, args) - { - for(var name in params) - { - var param=params[name]; - var arg=args[name]; - if(param["enum"]) - switch(typeof arg) - { - case"string": - if(OSF.OUtil.listContainsValue(param["enum"],arg)) - break; - case"undefined": - throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration; - default: - throw getInvalidParameterString(); - } - if(param["types"]) - if(!OSF.OUtil.listContainsValue(param["types"],typeof arg)) - throw getInvalidParameterString(); - } - }; - this.extractRequiredArguments=function OSF_DDA_ApiMethodCall$ExtractRequiredArguments(userArgs, caller, stateInfo) - { - if(userArgs.length < requiredCount) - throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments); - var requiredArgs=[]; - var index; - for(index=0; index < requiredCount; index++) - requiredArgs.push(userArgs[index]); - this.verifyArguments(requiredParameters,requiredArgs); - var ret={}; - for(index=0; index < requiredCount; index++) - { - var param=requiredParameters[index]; - var arg=requiredArgs[index]; - if(param.verify) - { - var isValid=param.verify(arg,caller,stateInfo); - if(!isValid) - throw getInvalidParameterString(); - } - ret[param.name]=arg - } - return ret - },this.fillOptions=function OSF_DDA_ApiMethodCall$FillOptions(options, requiredArgs, caller, stateInfo) - { - options=options || {}; - for(var optionName in supportedOptions) - if(!OSF.OUtil.listContainsKey(options,optionName)) - { - var value=undefined; - var option=supportedOptions[optionName]; - if(option.calculate && requiredArgs) - value=option.calculate(requiredArgs,caller,stateInfo); - if(!value && option.defaultValue !==undefined) - value=option.defaultValue; - options[optionName]=value - } - return options - }; - this.constructCallArgs=function OSF_DAA_ApiMethodCall$ConstructCallArgs(required, options, caller, stateInfo) - { - var callArgs={}; - for(var r in required) - callArgs[r]=required[r]; - for(var o in options) - callArgs[o]=options[o]; - for(var s in privateStateCallbacks) - callArgs[s]=privateStateCallbacks[s](caller,stateInfo); - if(checkCallArgs) - callArgs=checkCallArgs(callArgs,caller,stateInfo); - return callArgs - } + var requiredCount = requiredParameters.length; + var getInvalidParameterString = OSF.OUtil.delayExecutionAndCache(function() + { + return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,displayName) + }); + this.verifyArguments = function OSF_DDA_ApiMethodCall$VerifyArguments(params, args) + { + for(var name in params) + { + var param = params[name]; + var arg = args[name]; + if(param["enum"]) + switch(typeof arg) + { + case"string": + if(OSF.OUtil.listContainsValue(param["enum"],arg)) + break; + case"undefined": + throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration; + default: + throw getInvalidParameterString(); + } + if(param["types"]) + if(!OSF.OUtil.listContainsValue(param["types"],typeof arg)) + throw getInvalidParameterString(); + } + }; + this.extractRequiredArguments = function OSF_DDA_ApiMethodCall$ExtractRequiredArguments(userArgs, caller, stateInfo) + { + if(userArgs.length < requiredCount) + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments); + var requiredArgs = []; + var index; + for(index = 0; index < requiredCount; index++) + requiredArgs.push(userArgs[index]); + this.verifyArguments(requiredParameters,requiredArgs); + var ret = {}; + for(index = 0; index < requiredCount; index++) + { + var param = requiredParameters[index]; + var arg = requiredArgs[index]; + if(param.verify) + { + var isValid = param.verify(arg,caller,stateInfo); + if(!isValid) + throw getInvalidParameterString(); + } + ret[param.name] = arg + } + return ret + },this.fillOptions = function OSF_DDA_ApiMethodCall$FillOptions(options, requiredArgs, caller, stateInfo) + { + options = options || {}; + for(var optionName in supportedOptions) + if(!OSF.OUtil.listContainsKey(options,optionName)) + { + var value = undefined; + var option = supportedOptions[optionName]; + if(option.calculate && requiredArgs) + value = option.calculate(requiredArgs,caller,stateInfo); + if(!value && option.defaultValue !== undefined) + value = option.defaultValue; + options[optionName] = value + } + return options + }; + this.constructCallArgs = function OSF_DAA_ApiMethodCall$ConstructCallArgs(required, options, caller, stateInfo) + { + var callArgs = {}; + for(var r in required) + callArgs[r] = required[r]; + for(var o in options) + callArgs[o] = options[o]; + for(var s in privateStateCallbacks) + callArgs[s] = privateStateCallbacks[s](caller,stateInfo); + if(checkCallArgs) + callArgs = checkCallArgs(callArgs,caller,stateInfo); + return callArgs + } }; OSF.OUtil.setNamespace("AsyncResultEnum",OSF.DDA); -OSF.DDA.AsyncResultEnum.Properties={ - Context: "Context", - Value: "Value", - Status: "Status", - Error: "Error" +OSF.DDA.AsyncResultEnum.Properties = { + Context: "Context", + Value: "Value", + Status: "Status", + Error: "Error" }; -Microsoft.Office.WebExtension.AsyncResultStatus={ - Succeeded: "succeeded", - Failed: "failed" +Microsoft.Office.WebExtension.AsyncResultStatus = { + Succeeded: "succeeded", + Failed: "failed" }; -OSF.DDA.AsyncResultEnum.ErrorCode={ - Success: 0, - Failed: 1 +OSF.DDA.AsyncResultEnum.ErrorCode = { + Success: 0, + Failed: 1 }; -OSF.DDA.AsyncResultEnum.ErrorProperties={ - Name: "Name", - Message: "Message", - Code: "Code" +OSF.DDA.AsyncResultEnum.ErrorProperties = { + Name: "Name", + Message: "Message", + Code: "Code" }; -OSF.DDA.AsyncMethodNames={}; -OSF.DDA.AsyncMethodNames.addNames=function(methodNames) +OSF.DDA.AsyncMethodNames = {}; +OSF.DDA.AsyncMethodNames.addNames = function(methodNames) { - for(var entry in methodNames) - { - var am={}; - OSF.OUtil.defineEnumerableProperties(am,{ - id: {value: entry}, - displayName: {value: methodNames[entry]} - }); - OSF.DDA.AsyncMethodNames[entry]=am - } + for(var entry in methodNames) + { + var am = {}; + OSF.OUtil.defineEnumerableProperties(am,{ + id: {value: entry}, + displayName: {value: methodNames[entry]} + }); + OSF.DDA.AsyncMethodNames[entry] = am + } }; -OSF.DDA.AsyncMethodCall=function OSF_DDA_AsyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, onSucceeded, onFailed, checkCallArgs, displayName) +OSF.DDA.AsyncMethodCall = function OSF_DDA_AsyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, onSucceeded, onFailed, checkCallArgs, displayName) { - var requiredCount=requiredParameters.length; - var apiMethods=new OSF.DDA.ApiMethodCall(requiredParameters,supportedOptions,privateStateCallbacks,checkCallArgs,displayName); - function OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) - { - if(userArgs.length > requiredCount+2) - throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); - var options, - parameterCallback; - for(var i=userArgs.length - 1; i >=requiredCount; i--) - { - var argument=userArgs[i]; - switch(typeof argument) - { - case"object": - if(options) - throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); - else - options=argument; - break; - case"function": - if(parameterCallback) - throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction); - else - parameterCallback=argument; - break; - default: - throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); - break - } - } - options=apiMethods.fillOptions(options,requiredArgs,caller,stateInfo); - if(parameterCallback) - if(options[Microsoft.Office.WebExtension.Parameters.Callback]) - throw Strings.OfficeOM.L_RedundantCallbackSpecification; - else - options[Microsoft.Office.WebExtension.Parameters.Callback]=parameterCallback; - apiMethods.verifyArguments(supportedOptions,options); - return options - } - this.verifyAndExtractCall=function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) - { - var required=apiMethods.extractRequiredArguments(userArgs,caller,stateInfo); - var options=OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs,required,caller,stateInfo); - var callArgs=apiMethods.constructCallArgs(required,options,caller,stateInfo); - return callArgs - }; - this.processResponse=function OSF_DAA_AsyncMethodCall$ProcessResponse(status, response, caller, callArgs) - { - var payload; - if(status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - if(onSucceeded) - payload=onSucceeded(response,caller,callArgs); - else - payload=response; - else if(onFailed) - payload=onFailed(status,response); - else - payload=OSF.DDA.ErrorCodeManager.getErrorArgs(status); - return payload - }; - this.getCallArgs=function(suppliedArgs) - { - var options, - parameterCallback; - for(var i=suppliedArgs.length - 1; i >=requiredCount; i--) - { - var argument=suppliedArgs[i]; - switch(typeof argument) - { - case"object": - options=argument; - break; - case"function": - parameterCallback=argument; - break - } - } - options=options || {}; - if(parameterCallback) - options[Microsoft.Office.WebExtension.Parameters.Callback]=parameterCallback; - return options - } + var requiredCount = requiredParameters.length; + var apiMethods = new OSF.DDA.ApiMethodCall(requiredParameters,supportedOptions,privateStateCallbacks,checkCallArgs,displayName); + function OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) + { + if(userArgs.length > requiredCount + 2) + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); + var options, + parameterCallback; + for(var i = userArgs.length - 1; i >= requiredCount; i--) + { + var argument = userArgs[i]; + switch(typeof argument) + { + case"object": + if(options) + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); + else + options = argument; + break; + case"function": + if(parameterCallback) + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction); + else + parameterCallback = argument; + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); + break + } + } + options = apiMethods.fillOptions(options,requiredArgs,caller,stateInfo); + if(parameterCallback) + if(options[Microsoft.Office.WebExtension.Parameters.Callback]) + throw Strings.OfficeOM.L_RedundantCallbackSpecification; + else + options[Microsoft.Office.WebExtension.Parameters.Callback] = parameterCallback; + apiMethods.verifyArguments(supportedOptions,options); + return options + } + this.verifyAndExtractCall = function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) + { + var required = apiMethods.extractRequiredArguments(userArgs,caller,stateInfo); + var options = OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs,required,caller,stateInfo); + var callArgs = apiMethods.constructCallArgs(required,options,caller,stateInfo); + return callArgs + }; + this.processResponse = function OSF_DAA_AsyncMethodCall$ProcessResponse(status, response, caller, callArgs) + { + var payload; + if(status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + if(onSucceeded) + payload = onSucceeded(response,caller,callArgs); + else + payload = response; + else if(onFailed) + payload = onFailed(status,response); + else + payload = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + return payload + }; + this.getCallArgs = function(suppliedArgs) + { + var options, + parameterCallback; + for(var i = suppliedArgs.length - 1; i >= requiredCount; i--) + { + var argument = suppliedArgs[i]; + switch(typeof argument) + { + case"object": + options = argument; + break; + case"function": + parameterCallback = argument; + break + } + } + options = options || {}; + if(parameterCallback) + options[Microsoft.Office.WebExtension.Parameters.Callback] = parameterCallback; + return options + } }; -OSF.DDA.AsyncMethodCallFactory=function() +OSF.DDA.AsyncMethodCallFactory = function() { - return{manufacture: function(params) - { - var supportedOptions=params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; - var privateStateCallbacks=params.privateStateCallbacks ? OSF.OUtil.createObject(params.privateStateCallbacks) : []; - return new OSF.DDA.AsyncMethodCall(params.requiredArguments || [],supportedOptions,privateStateCallbacks,params.onSucceeded,params.onFailed,params.checkCallArgs,params.method.displayName) - }} + return{manufacture: function(params) + { + var supportedOptions = params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + var privateStateCallbacks = params.privateStateCallbacks ? OSF.OUtil.createObject(params.privateStateCallbacks) : []; + return new OSF.DDA.AsyncMethodCall(params.requiredArguments || [],supportedOptions,privateStateCallbacks,params.onSucceeded,params.onFailed,params.checkCallArgs,params.method.displayName) + }} }(); -OSF.DDA.AsyncMethodCalls={}; -OSF.DDA.AsyncMethodCalls.define=function(callDefinition) +OSF.DDA.AsyncMethodCalls = {}; +OSF.DDA.AsyncMethodCalls.define = function(callDefinition) { - OSF.DDA.AsyncMethodCalls[callDefinition.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(callDefinition) + OSF.DDA.AsyncMethodCalls[callDefinition.method.id] = OSF.DDA.AsyncMethodCallFactory.manufacture(callDefinition) }; -OSF.DDA.Error=function OSF_DDA_Error(name, message, code) +OSF.DDA.Error = function OSF_DDA_Error(name, message, code) { - OSF.OUtil.defineEnumerableProperties(this,{ - name: {value: name}, - message: {value: message}, - code: {value: code} - }) + OSF.OUtil.defineEnumerableProperties(this,{ + name: {value: name}, + message: {value: message}, + code: {value: code} + }) }; -OSF.DDA.AsyncResult=function OSF_DDA_AsyncResult(initArgs, errorArgs) +OSF.DDA.AsyncResult = function OSF_DDA_AsyncResult(initArgs, errorArgs) { - OSF.OUtil.defineEnumerableProperties(this,{ - value: {value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Value]}, - status: {value: errorArgs ? Microsoft.Office.WebExtension.AsyncResultStatus.Failed : Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded} - }); - if(initArgs[OSF.DDA.AsyncResultEnum.Properties.Context]) - OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Context]}); - if(errorArgs) - OSF.OUtil.defineEnumerableProperty(this,"error",{value: new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])}) + OSF.OUtil.defineEnumerableProperties(this,{ + value: {value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Value]}, + status: {value: errorArgs ? Microsoft.Office.WebExtension.AsyncResultStatus.Failed : Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded} + }); + if(initArgs[OSF.DDA.AsyncResultEnum.Properties.Context]) + OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Context]}); + if(errorArgs) + OSF.OUtil.defineEnumerableProperty(this,"error",{value: new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])}) }; -OSF.DDA.issueAsyncResult=function OSF_DDA$IssueAsyncResult(callArgs, status, payload) +OSF.DDA.issueAsyncResult = function OSF_DDA$IssueAsyncResult(callArgs, status, payload) { - var callback=callArgs[Microsoft.Office.WebExtension.Parameters.Callback]; - if(callback) - { - var asyncInitArgs={}; - asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Context]=callArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; - var errorArgs; - if(status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Value]=payload; - else - { - errorArgs={}; - payload=payload || OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=payload.name || payload; - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=payload.message || payload - } - callback(new OSF.DDA.AsyncResult(asyncInitArgs,errorArgs)) - } + var callback = callArgs[Microsoft.Office.WebExtension.Parameters.Callback]; + if(callback) + { + var asyncInitArgs = {}; + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Context] = callArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; + var errorArgs; + if(status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Value] = payload; + else + { + errorArgs = {}; + payload = payload || OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code] = status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name] = payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message] = payload.message || payload + } + callback(new OSF.DDA.AsyncResult(asyncInitArgs,errorArgs)) + } }; -OSF.DDA.SyncMethodNames={}; -OSF.DDA.SyncMethodNames.addNames=function(methodNames) +OSF.DDA.SyncMethodNames = {}; +OSF.DDA.SyncMethodNames.addNames = function(methodNames) { - for(var entry in methodNames) - { - var am={}; - OSF.OUtil.defineEnumerableProperties(am,{ - id: {value: entry}, - displayName: {value: methodNames[entry]} - }); - OSF.DDA.SyncMethodNames[entry]=am - } + for(var entry in methodNames) + { + var am = {}; + OSF.OUtil.defineEnumerableProperties(am,{ + id: {value: entry}, + displayName: {value: methodNames[entry]} + }); + OSF.DDA.SyncMethodNames[entry] = am + } }; -OSF.DDA.SyncMethodCall=function OSF_DDA_SyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) +OSF.DDA.SyncMethodCall = function OSF_DDA_SyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName) { - var requiredCount=requiredParameters.length; - var apiMethods=new OSF.DDA.ApiMethodCall(requiredParameters,supportedOptions,privateStateCallbacks,checkCallArgs,displayName); - function OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) - { - if(userArgs.length > requiredCount+1) - throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); - var options, - parameterCallback; - for(var i=userArgs.length - 1; i >=requiredCount; i--) - { - var argument=userArgs[i]; - switch(typeof argument) - { - case"object": - if(options) - throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); - else - options=argument; - break; - default: - throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); - break - } - } - options=apiMethods.fillOptions(options,requiredArgs,caller,stateInfo); - apiMethods.verifyArguments(supportedOptions,options); - return options - } - this.verifyAndExtractCall=function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) - { - var required=apiMethods.extractRequiredArguments(userArgs,caller,stateInfo); - var options=OSF_DAA_SyncMethodCall$ExtractOptions(userArgs,required,caller,stateInfo); - var callArgs=apiMethods.constructCallArgs(required,options,caller,stateInfo); - return callArgs - } + var requiredCount = requiredParameters.length; + var apiMethods = new OSF.DDA.ApiMethodCall(requiredParameters,supportedOptions,privateStateCallbacks,checkCallArgs,displayName); + function OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo) + { + if(userArgs.length > requiredCount + 1) + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); + var options, + parameterCallback; + for(var i = userArgs.length - 1; i >= requiredCount; i--) + { + var argument = userArgs[i]; + switch(typeof argument) + { + case"object": + if(options) + throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); + else + options = argument; + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument); + break + } + } + options = apiMethods.fillOptions(options,requiredArgs,caller,stateInfo); + apiMethods.verifyArguments(supportedOptions,options); + return options + } + this.verifyAndExtractCall = function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo) + { + var required = apiMethods.extractRequiredArguments(userArgs,caller,stateInfo); + var options = OSF_DAA_SyncMethodCall$ExtractOptions(userArgs,required,caller,stateInfo); + var callArgs = apiMethods.constructCallArgs(required,options,caller,stateInfo); + return callArgs + } }; -OSF.DDA.SyncMethodCallFactory=function() +OSF.DDA.SyncMethodCallFactory = function() { - return{manufacture: function(params) - { - var supportedOptions=params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; - return new OSF.DDA.SyncMethodCall(params.requiredArguments || [],supportedOptions,params.privateStateCallbacks,params.checkCallArgs,params.method.displayName) - }} + return{manufacture: function(params) + { + var supportedOptions = params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : []; + return new OSF.DDA.SyncMethodCall(params.requiredArguments || [],supportedOptions,params.privateStateCallbacks,params.checkCallArgs,params.method.displayName) + }} }(); -OSF.DDA.SyncMethodCalls={}; -OSF.DDA.SyncMethodCalls.define=function(callDefinition) +OSF.DDA.SyncMethodCalls = {}; +OSF.DDA.SyncMethodCalls.define = function(callDefinition) { - OSF.DDA.SyncMethodCalls[callDefinition.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(callDefinition) + OSF.DDA.SyncMethodCalls[callDefinition.method.id] = OSF.DDA.SyncMethodCallFactory.manufacture(callDefinition) }; -OSF.DDA.ListType=function() +OSF.DDA.ListType = function() { - var listTypes={}; - return{ - setListType: function OSF_DDA_ListType$AddListType(t, prop) - { - listTypes[t]=prop - }, - isListType: function OSF_DDA_ListType$IsListType(t) - { - return OSF.OUtil.listContainsKey(listTypes,t) - }, - getDescriptor: function OSF_DDA_ListType$getDescriptor(t) - { - return listTypes[t] - } - } + var listTypes = {}; + return{ + setListType: function OSF_DDA_ListType$AddListType(t, prop) + { + listTypes[t] = prop + }, + isListType: function OSF_DDA_ListType$IsListType(t) + { + return OSF.OUtil.listContainsKey(listTypes,t) + }, + getDescriptor: function OSF_DDA_ListType$getDescriptor(t) + { + return listTypes[t] + } + } }(); -OSF.DDA.HostParameterMap=function(specialProcessor, mappings) +OSF.DDA.HostParameterMap = function(specialProcessor, mappings) { - var toHostMap="toHost"; - var fromHostMap="fromHost"; - var sourceData="sourceData"; - var self="self"; - var dynamicTypes={}; - dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]={ - toHost: function(data) - { - if(data !=null && data.rows !==undefined) - { - var tableData={}; - tableData[OSF.DDA.TableDataProperties.TableRows]=data.rows; - tableData[OSF.DDA.TableDataProperties.TableHeaders]=data.headers; - data=tableData - } - return data - }, - fromHost: function(args) - { - return args - } - }; - dynamicTypes[Microsoft.Office.WebExtension.Parameters.SampleData]=dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]; - function mapValues(preimageSet, mapping) - { - var ret=preimageSet ? {} : undefined; - for(var entry in preimageSet) - { - var preimage=preimageSet[entry]; - var image; - if(OSF.DDA.ListType.isListType(entry)) - { - image=[]; - for(var subEntry in preimage) - image.push(mapValues(preimage[subEntry],mapping)) - } - else if(OSF.OUtil.listContainsKey(dynamicTypes,entry)) - image=dynamicTypes[entry][mapping](preimage); - else if(mapping==fromHostMap && specialProcessor.preserveNesting(entry)) - image=mapValues(preimage,mapping); - else - { - var maps=mappings[entry]; - if(maps) - { - var map=maps[mapping]; - if(map) - { - image=map[preimage]; - if(image===undefined) - image=preimage - } - } - else - image=preimage - } - ret[entry]=image - } - return ret - } - function generateArguments(imageSet, parameters) - { - var ret; - for(var param in parameters) - { - var arg; - if(specialProcessor.isComplexType(param)) - arg=generateArguments(imageSet,mappings[param][toHostMap]); - else - arg=imageSet[param]; - if(arg !=undefined) - { - if(!ret) - ret={}; - var index=parameters[param]; - if(index==self) - index=param; - ret[index]=specialProcessor.pack(param,arg) - } - } - return ret - } - function extractArguments(source, parameters, extracted) - { - if(!extracted) - extracted={}; - for(var param in parameters) - { - var index=parameters[param]; - var value; - if(index==self) - value=source; - else if(index==sourceData) - { - extracted[param]=source.toArray(); - continue - } - else - value=source[index]; - if(value===null || value===undefined) - extracted[param]=undefined; - else - { - value=specialProcessor.unpack(param,value); - var map; - if(specialProcessor.isComplexType(param)) - { - map=mappings[param][fromHostMap]; - if(specialProcessor.preserveNesting(param)) - extracted[param]=extractArguments(value,map); - else - extractArguments(value,map,extracted) - } - else if(OSF.DDA.ListType.isListType(param)) - { - map={}; - var entryDescriptor=OSF.DDA.ListType.getDescriptor(param); - map[entryDescriptor]=self; - var extractedValues=new Array(value.length); - for(var item in value) - extractedValues[item]=extractArguments(value[item],map); - extracted[param]=extractedValues - } - else - extracted[param]=value - } - } - return extracted - } - function applyMap(mapName, preimage, mapping) - { - var parameters=mappings[mapName][mapping]; - var image; - if(mapping=="toHost") - { - var imageSet=mapValues(preimage,mapping); - image=generateArguments(imageSet,parameters) - } - else if(mapping=="fromHost") - { - var argumentSet=extractArguments(preimage,parameters); - image=mapValues(argumentSet,mapping) - } - return image - } - if(!mappings) - mappings={}; - this.addMapping=function(mapName, description) - { - var toHost, - fromHost; - if(description.map) - { - toHost=description.map; - fromHost={}; - for(var preimage in toHost) - { - var image=toHost[preimage]; - if(image==self) - image=preimage; - fromHost[image]=preimage - } - } - else - { - toHost=description.toHost; - fromHost=description.fromHost - } - var pair=mappings[mapName]; - if(pair) - { - var currMap=pair[toHostMap]; - for(var th in currMap) - toHost[th]=currMap[th]; - currMap=pair[fromHostMap]; - for(var fh in currMap) - fromHost[fh]=currMap[fh] - } - else - pair=mappings[mapName]={}; - pair[toHostMap]=toHost; - pair[fromHostMap]=fromHost - }; - this.toHost=function(mapName, preimage) - { - return applyMap(mapName,preimage,toHostMap) - }; - this.fromHost=function(mapName, image) - { - return applyMap(mapName,image,fromHostMap) - }; - this.self=self; - this.sourceData=sourceData; - this.addComplexType=function(ct) - { - specialProcessor.addComplexType(ct) - }; - this.getDynamicType=function(dt) - { - return specialProcessor.getDynamicType(dt) - }; - this.setDynamicType=function(dt, handler) - { - specialProcessor.setDynamicType(dt,handler) - }; - this.dynamicTypes=dynamicTypes; - this.doMapValues=function(preimageSet, mapping) - { - return mapValues(preimageSet,mapping) - } + var toHostMap = "toHost"; + var fromHostMap = "fromHost"; + var sourceData = "sourceData"; + var self = "self"; + var dynamicTypes = {}; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data] = { + toHost: function(data) + { + if(data != null && data.rows !== undefined) + { + var tableData = {}; + tableData[OSF.DDA.TableDataProperties.TableRows] = data.rows; + tableData[OSF.DDA.TableDataProperties.TableHeaders] = data.headers; + data = tableData + } + return data + }, + fromHost: function(args) + { + return args + } + }; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.SampleData] = dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]; + function mapValues(preimageSet, mapping) + { + var ret = preimageSet ? {} : undefined; + for(var entry in preimageSet) + { + var preimage = preimageSet[entry]; + var image; + if(OSF.DDA.ListType.isListType(entry)) + { + image = []; + for(var subEntry in preimage) + image.push(mapValues(preimage[subEntry],mapping)) + } + else if(OSF.OUtil.listContainsKey(dynamicTypes,entry)) + image = dynamicTypes[entry][mapping](preimage); + else if(mapping == fromHostMap && specialProcessor.preserveNesting(entry)) + image = mapValues(preimage,mapping); + else + { + var maps = mappings[entry]; + if(maps) + { + var map = maps[mapping]; + if(map) + { + image = map[preimage]; + if(image === undefined) + image = preimage + } + } + else + image = preimage + } + ret[entry] = image + } + return ret + } + function generateArguments(imageSet, parameters) + { + var ret; + for(var param in parameters) + { + var arg; + if(specialProcessor.isComplexType(param)) + arg = generateArguments(imageSet,mappings[param][toHostMap]); + else + arg = imageSet[param]; + if(arg != undefined) + { + if(!ret) + ret = {}; + var index = parameters[param]; + if(index == self) + index = param; + ret[index] = specialProcessor.pack(param,arg) + } + } + return ret + } + function extractArguments(source, parameters, extracted) + { + if(!extracted) + extracted = {}; + for(var param in parameters) + { + var index = parameters[param]; + var value; + if(index == self) + value = source; + else if(index == sourceData) + { + extracted[param] = source.toArray(); + continue + } + else + value = source[index]; + if(value === null || value === undefined) + extracted[param] = undefined; + else + { + value = specialProcessor.unpack(param,value); + var map; + if(specialProcessor.isComplexType(param)) + { + map = mappings[param][fromHostMap]; + if(specialProcessor.preserveNesting(param)) + extracted[param] = extractArguments(value,map); + else + extractArguments(value,map,extracted) + } + else if(OSF.DDA.ListType.isListType(param)) + { + map = {}; + var entryDescriptor = OSF.DDA.ListType.getDescriptor(param); + map[entryDescriptor] = self; + var extractedValues = new Array(value.length); + for(var item in value) + extractedValues[item] = extractArguments(value[item],map); + extracted[param] = extractedValues + } + else + extracted[param] = value + } + } + return extracted + } + function applyMap(mapName, preimage, mapping) + { + var parameters = mappings[mapName][mapping]; + var image; + if(mapping == "toHost") + { + var imageSet = mapValues(preimage,mapping); + image = generateArguments(imageSet,parameters) + } + else if(mapping == "fromHost") + { + var argumentSet = extractArguments(preimage,parameters); + image = mapValues(argumentSet,mapping) + } + return image + } + if(!mappings) + mappings = {}; + this.addMapping = function(mapName, description) + { + var toHost, + fromHost; + if(description.map) + { + toHost = description.map; + fromHost = {}; + for(var preimage in toHost) + { + var image = toHost[preimage]; + if(image == self) + image = preimage; + fromHost[image] = preimage + } + } + else + { + toHost = description.toHost; + fromHost = description.fromHost + } + var pair = mappings[mapName]; + if(pair) + { + var currMap = pair[toHostMap]; + for(var th in currMap) + toHost[th] = currMap[th]; + currMap = pair[fromHostMap]; + for(var fh in currMap) + fromHost[fh] = currMap[fh] + } + else + pair = mappings[mapName] = {}; + pair[toHostMap] = toHost; + pair[fromHostMap] = fromHost + }; + this.toHost = function(mapName, preimage) + { + return applyMap(mapName,preimage,toHostMap) + }; + this.fromHost = function(mapName, image) + { + return applyMap(mapName,image,fromHostMap) + }; + this.self = self; + this.sourceData = sourceData; + this.addComplexType = function(ct) + { + specialProcessor.addComplexType(ct) + }; + this.getDynamicType = function(dt) + { + return specialProcessor.getDynamicType(dt) + }; + this.setDynamicType = function(dt, handler) + { + specialProcessor.setDynamicType(dt,handler) + }; + this.dynamicTypes = dynamicTypes; + this.doMapValues = function(preimageSet, mapping) + { + return mapValues(preimageSet,mapping) + } }; -OSF.DDA.SpecialProcessor=function(complexTypes, dynamicTypes) +OSF.DDA.SpecialProcessor = function(complexTypes, dynamicTypes) { - this.addComplexType=function OSF_DDA_SpecialProcessor$addComplexType(ct) - { - complexTypes.push(ct) - }; - this.getDynamicType=function OSF_DDA_SpecialProcessor$getDynamicType(dt) - { - return dynamicTypes[dt] - }; - this.setDynamicType=function OSF_DDA_SpecialProcessor$setDynamicType(dt, handler) - { - dynamicTypes[dt]=handler - }; - this.isComplexType=function OSF_DDA_SpecialProcessor$isComplexType(t) - { - return OSF.OUtil.listContainsValue(complexTypes,t) - }; - this.isDynamicType=function OSF_DDA_SpecialProcessor$isDynamicType(p) - { - return OSF.OUtil.listContainsKey(dynamicTypes,p) - }; - this.preserveNesting=function OSF_DDA_SpecialProcessor$preserveNesting(p) - { - var pn=[]; - if(OSF.DDA.PropertyDescriptors) - pn.push(OSF.DDA.PropertyDescriptors.Subset); - if(OSF.DDA.DataNodeEventProperties) - pn=pn.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]); - return OSF.OUtil.listContainsValue(pn,p) - }; - this.pack=function OSF_DDA_SpecialProcessor$pack(param, arg) - { - var value; - if(this.isDynamicType(param)) - value=dynamicTypes[param].toHost(arg); - else - value=arg; - return value - }; - this.unpack=function OSF_DDA_SpecialProcessor$unpack(param, arg) - { - var value; - if(this.isDynamicType(param)) - value=dynamicTypes[param].fromHost(arg); - else - value=arg; - return value - } + this.addComplexType = function OSF_DDA_SpecialProcessor$addComplexType(ct) + { + complexTypes.push(ct) + }; + this.getDynamicType = function OSF_DDA_SpecialProcessor$getDynamicType(dt) + { + return dynamicTypes[dt] + }; + this.setDynamicType = function OSF_DDA_SpecialProcessor$setDynamicType(dt, handler) + { + dynamicTypes[dt] = handler + }; + this.isComplexType = function OSF_DDA_SpecialProcessor$isComplexType(t) + { + return OSF.OUtil.listContainsValue(complexTypes,t) + }; + this.isDynamicType = function OSF_DDA_SpecialProcessor$isDynamicType(p) + { + return OSF.OUtil.listContainsKey(dynamicTypes,p) + }; + this.preserveNesting = function OSF_DDA_SpecialProcessor$preserveNesting(p) + { + var pn = []; + if(OSF.DDA.PropertyDescriptors) + pn.push(OSF.DDA.PropertyDescriptors.Subset); + if(OSF.DDA.DataNodeEventProperties) + pn = pn.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]); + return OSF.OUtil.listContainsValue(pn,p) + }; + this.pack = function OSF_DDA_SpecialProcessor$pack(param, arg) + { + var value; + if(this.isDynamicType(param)) + value = dynamicTypes[param].toHost(arg); + else + value = arg; + return value + }; + this.unpack = function OSF_DDA_SpecialProcessor$unpack(param, arg) + { + var value; + if(this.isDynamicType(param)) + value = dynamicTypes[param].fromHost(arg); + else + value = arg; + return value + } }; -OSF.DDA.getDecoratedParameterMap=function(specialProcessor, initialDefs) +OSF.DDA.getDecoratedParameterMap = function(specialProcessor, initialDefs) { - var parameterMap=new OSF.DDA.HostParameterMap(specialProcessor); - var self=parameterMap.self; - function createObject(properties) - { - var obj=null; - if(properties) - { - obj={}; - var len=properties.length; - for(var i=0; i < len; i++) - obj[properties[i].name]=properties[i].value - } - return obj - } - parameterMap.define=function define(definition) - { - var args={}; - var toHost=createObject(definition.toHost); - if(definition.invertible) - args.map=toHost; - else if(definition.canonical) - args.toHost=args.fromHost=toHost; - else - { - args.toHost=toHost; - args.fromHost=createObject(definition.fromHost) - } - parameterMap.addMapping(definition.type,args); - if(definition.isComplexType) - parameterMap.addComplexType(definition.type) - }; - for(var id in initialDefs) - parameterMap.define(initialDefs[id]); - return parameterMap + var parameterMap = new OSF.DDA.HostParameterMap(specialProcessor); + var self = parameterMap.self; + function createObject(properties) + { + var obj = null; + if(properties) + { + obj = {}; + var len = properties.length; + for(var i = 0; i < len; i++) + obj[properties[i].name] = properties[i].value + } + return obj + } + parameterMap.define = function define(definition) + { + var args = {}; + var toHost = createObject(definition.toHost); + if(definition.invertible) + args.map = toHost; + else if(definition.canonical) + args.toHost = args.fromHost = toHost; + else + { + args.toHost = toHost; + args.fromHost = createObject(definition.fromHost) + } + parameterMap.addMapping(definition.type,args); + if(definition.isComplexType) + parameterMap.addComplexType(definition.type) + }; + for(var id in initialDefs) + parameterMap.define(initialDefs[id]); + return parameterMap }; OSF.OUtil.setNamespace("DispIdHost",OSF.DDA); -OSF.DDA.DispIdHost.Methods={ - InvokeMethod: "invokeMethod", - AddEventHandler: "addEventHandler", - RemoveEventHandler: "removeEventHandler", - OpenDialog: "openDialog", - CloseDialog: "closeDialog", - MessageParent: "messageParent", - SendMessage: "sendMessage" +OSF.DDA.DispIdHost.Methods = { + InvokeMethod: "invokeMethod", + AddEventHandler: "addEventHandler", + RemoveEventHandler: "removeEventHandler", + OpenDialog: "openDialog", + CloseDialog: "closeDialog", + MessageParent: "messageParent", + SendMessage: "sendMessage" }; -OSF.DDA.DispIdHost.Delegates={ - ExecuteAsync: "executeAsync", - RegisterEventAsync: "registerEventAsync", - UnregisterEventAsync: "unregisterEventAsync", - ParameterMap: "parameterMap", - OpenDialog: "openDialog", - CloseDialog: "closeDialog", - MessageParent: "messageParent", - SendMessage: "sendMessage" +OSF.DDA.DispIdHost.Delegates = { + ExecuteAsync: "executeAsync", + RegisterEventAsync: "registerEventAsync", + UnregisterEventAsync: "unregisterEventAsync", + ParameterMap: "parameterMap", + OpenDialog: "openDialog", + CloseDialog: "closeDialog", + MessageParent: "messageParent", + SendMessage: "sendMessage" }; -OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, parameterMap) +OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethods, parameterMap) { - var dispIdMap={}; - var jsom=OSF.DDA.AsyncMethodNames; - var did=OSF.DDA.MethodDispId; - var methodMap={ - GoToByIdAsync: did.dispidNavigateToMethod, - GetSelectedDataAsync: did.dispidGetSelectedDataMethod, - SetSelectedDataAsync: did.dispidSetSelectedDataMethod, - GetDocumentCopyChunkAsync: did.dispidGetDocumentCopyChunkMethod, - ReleaseDocumentCopyAsync: did.dispidReleaseDocumentCopyMethod, - GetDocumentCopyAsync: did.dispidGetDocumentCopyMethod, - AddFromSelectionAsync: did.dispidAddBindingFromSelectionMethod, - AddFromPromptAsync: did.dispidAddBindingFromPromptMethod, - AddFromNamedItemAsync: did.dispidAddBindingFromNamedItemMethod, - GetAllAsync: did.dispidGetAllBindingsMethod, - GetByIdAsync: did.dispidGetBindingMethod, - ReleaseByIdAsync: did.dispidReleaseBindingMethod, - GetDataAsync: did.dispidGetBindingDataMethod, - SetDataAsync: did.dispidSetBindingDataMethod, - AddRowsAsync: did.dispidAddRowsMethod, - AddColumnsAsync: did.dispidAddColumnsMethod, - DeleteAllDataValuesAsync: did.dispidClearAllRowsMethod, - RefreshAsync: did.dispidLoadSettingsMethod, - SaveAsync: did.dispidSaveSettingsMethod, - GetActiveViewAsync: did.dispidGetActiveViewMethod, - GetFilePropertiesAsync: did.dispidGetFilePropertiesMethod, - GetOfficeThemeAsync: did.dispidGetOfficeThemeMethod, - GetDocumentThemeAsync: did.dispidGetDocumentThemeMethod, - ClearFormatsAsync: did.dispidClearFormatsMethod, - SetTableOptionsAsync: did.dispidSetTableOptionsMethod, - SetFormatsAsync: did.dispidSetFormatsMethod, - ExecuteRichApiRequestAsync: did.dispidExecuteRichApiRequestMethod, - AppCommandInvocationCompletedAsync: did.dispidAppCommandInvocationCompletedMethod, - CloseContainerAsync: did.dispidCloseContainerMethod, - AddDataPartAsync: did.dispidAddDataPartMethod, - GetDataPartByIdAsync: did.dispidGetDataPartByIdMethod, - GetDataPartsByNameSpaceAsync: did.dispidGetDataPartsByNamespaceMethod, - GetPartXmlAsync: did.dispidGetDataPartXmlMethod, - GetPartNodesAsync: did.dispidGetDataPartNodesMethod, - DeleteDataPartAsync: did.dispidDeleteDataPartMethod, - GetNodeValueAsync: did.dispidGetDataNodeValueMethod, - GetNodeXmlAsync: did.dispidGetDataNodeXmlMethod, - GetRelativeNodesAsync: did.dispidGetDataNodesMethod, - SetNodeValueAsync: did.dispidSetDataNodeValueMethod, - SetNodeXmlAsync: did.dispidSetDataNodeXmlMethod, - AddDataPartNamespaceAsync: did.dispidAddDataNamespaceMethod, - GetDataPartNamespaceAsync: did.dispidGetDataUriByPrefixMethod, - GetDataPartPrefixAsync: did.dispidGetDataPrefixByUriMethod, - GetNodeTextAsync: did.dispidGetDataNodeTextMethod, - SetNodeTextAsync: did.dispidSetDataNodeTextMethod, - GetSelectedTask: did.dispidGetSelectedTaskMethod, - GetTask: did.dispidGetTaskMethod, - GetWSSUrl: did.dispidGetWSSUrlMethod, - GetTaskField: did.dispidGetTaskFieldMethod, - GetSelectedResource: did.dispidGetSelectedResourceMethod, - GetResourceField: did.dispidGetResourceFieldMethod, - GetProjectField: did.dispidGetProjectFieldMethod, - GetSelectedView: did.dispidGetSelectedViewMethod, - GetTaskByIndex: did.dispidGetTaskByIndexMethod, - GetResourceByIndex: did.dispidGetResourceByIndexMethod, - SetTaskField: did.dispidSetTaskFieldMethod, - SetResourceField: did.dispidSetResourceFieldMethod, - GetMaxTaskIndex: did.dispidGetMaxTaskIndexMethod, - GetMaxResourceIndex: did.dispidGetMaxResourceIndexMethod, - CreateTask: did.dispidCreateTaskMethod - }; - for(var method in methodMap) - if(jsom[method]) - dispIdMap[jsom[method].id]=methodMap[method]; - jsom=OSF.DDA.SyncMethodNames; - did=OSF.DDA.MethodDispId; - var asyncMethodMap={ - MessageParent: did.dispidMessageParentMethod, - SendMessage: did.dispidSendMessageMethod - }; - for(var method in asyncMethodMap) - if(jsom[method]) - dispIdMap[jsom[method].id]=asyncMethodMap[method]; - jsom=Microsoft.Office.WebExtension.EventType; - did=OSF.DDA.EventDispId; - var eventMap={ - SettingsChanged: did.dispidSettingsChangedEvent, - DocumentSelectionChanged: did.dispidDocumentSelectionChangedEvent, - BindingSelectionChanged: did.dispidBindingSelectionChangedEvent, - BindingDataChanged: did.dispidBindingDataChangedEvent, - ActiveViewChanged: did.dispidActiveViewChangedEvent, - OfficeThemeChanged: did.dispidOfficeThemeChangedEvent, - DocumentThemeChanged: did.dispidDocumentThemeChangedEvent, - AppCommandInvoked: did.dispidAppCommandInvokedEvent, - DialogMessageReceived: did.dispidDialogMessageReceivedEvent, - DialogParentMessageReceived: did.dispidDialogParentMessageReceivedEvent, - ItemChanged: did.dispidOlkItemSelectedChangedEvent, - TaskSelectionChanged: did.dispidTaskSelectionChangedEvent, - ResourceSelectionChanged: did.dispidResourceSelectionChangedEvent, - ViewSelectionChanged: did.dispidViewSelectionChangedEvent, - DataNodeInserted: did.dispidDataNodeAddedEvent, - DataNodeReplaced: did.dispidDataNodeReplacedEvent, - DataNodeDeleted: did.dispidDataNodeDeletedEvent - }; - for(var event in eventMap) - if(jsom[event]) - dispIdMap[jsom[event]]=eventMap[event]; - function onException(ex, asyncMethodCall, suppliedArgs, callArgs) - { - if(typeof ex=="number") - { - if(!callArgs) - callArgs=asyncMethodCall.getCallArgs(suppliedArgs); - OSF.DDA.issueAsyncResult(callArgs,ex,OSF.DDA.ErrorCodeManager.getErrorArgs(ex)) - } - else - throw ex; - } - this[OSF.DDA.DispIdHost.Methods.InvokeMethod]=function OSF_DDA_DispIdHost_Facade$InvokeMethod(method, suppliedArguments, caller, privateState) - { - var callArgs; - try - { - var methodName=method.id; - var asyncMethodCall=OSF.DDA.AsyncMethodCalls[methodName]; - callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,privateState); - var dispId=dispIdMap[methodName]; - var delegate=getDelegateMethods(methodName); - var richApiInExcelMethodSubstitution=null; - if(window.Excel && window.Office.context.requirements.isSetSupported("RedirectV1Api")) - window.Excel._RedirectV1APIs=true; - if(window.Excel && window.Excel._RedirectV1APIs && (richApiInExcelMethodSubstitution=window.Excel._V1APIMap[methodName])) - { - if(richApiInExcelMethodSubstitution.preprocess) - callArgs=richApiInExcelMethodSubstitution.preprocess(callArgs); - var ctx=new window.Excel.RequestContext; - var result=richApiInExcelMethodSubstitution.call(ctx,callArgs); - ctx.sync().then(function() - { - var response=result.value; - var status=response.status; - delete response["status"]; - delete response["@odata.type"]; - if(richApiInExcelMethodSubstitution.postprocess) - response=richApiInExcelMethodSubstitution.postprocess(response,callArgs); - if(status !=0) - response=OSF.DDA.ErrorCodeManager.getErrorArgs(status); - OSF.DDA.issueAsyncResult(callArgs,status,response) - })["catch"](function(error) - { - OSF.DDA.issueAsyncResult(callArgs,OSF.DDA.ErrorCodeManager.errorCodes.ooeFailure,null) - }) - } - else - { - var hostCallArgs; - if(parameterMap.toHost) - hostCallArgs=parameterMap.toHost(dispId,callArgs); - else - hostCallArgs=callArgs; - delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ - dispId: dispId, - hostCallArgs: hostCallArgs, - onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling(){}, - onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving(){}, - onComplete: function(status, hostResponseArgs) - { - var responseArgs; - if(status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - if(parameterMap.fromHost) - responseArgs=parameterMap.fromHost(dispId,hostResponseArgs); - else - responseArgs=hostResponseArgs; - else - responseArgs=hostResponseArgs; - var payload=asyncMethodCall.processResponse(status,responseArgs,caller,callArgs); - OSF.DDA.issueAsyncResult(callArgs,status,payload) - } - }) - } - } - catch(ex) - { - onException(ex,asyncMethodCall,suppliedArguments,callArgs) - } - }; - this[OSF.DDA.DispIdHost.Methods.AddEventHandler]=function OSF_DDA_DispIdHost_Facade$AddEventHandler(suppliedArguments, eventDispatch, caller) - { - var callArgs; - var eventType, - handler; - function onEnsureRegistration(status) - { - if(status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - { - var added=eventDispatch.addEventHandler(eventType,handler); - if(!added) - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed - } - var error; - if(status !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - error=OSF.DDA.ErrorCodeManager.getErrorArgs(status); - OSF.DDA.issueAsyncResult(callArgs,status,error) - } - try - { - var asyncMethodCall=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id]; - callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); - eventType=callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; - handler=callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; - if(eventDispatch.getEventHandlerCount(eventType)==0) - { - var dispId=dispIdMap[eventType]; - var invoker=getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; - invoker({ - eventType: eventType, - dispId: dispId, - targetId: caller.id || "", - onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) - }, - onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) - }, - onComplete: onEnsureRegistration, - onEvent: function handleEvent(hostArgs) - { - var args=parameterMap.fromHost(dispId,hostArgs); - eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType,caller,args)) - } - }) - } - else - onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - } - catch(ex) - { - onException(ex,asyncMethodCall,suppliedArguments,callArgs) - } - }; - this[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]=function OSF_DDA_DispIdHost_Facade$RemoveEventHandler(suppliedArguments, eventDispatch, caller) - { - var callArgs; - var eventType, - handler; - function onEnsureRegistration(status) - { - var error; - if(status !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - error=OSF.DDA.ErrorCodeManager.getErrorArgs(status); - OSF.DDA.issueAsyncResult(callArgs,status,error) - } - try - { - var asyncMethodCall=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id]; - callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); - eventType=callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; - handler=callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; - var status, - removeSuccess; - if(handler===null) - { - removeSuccess=eventDispatch.clearEventHandlers(eventType); - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess - } - else - { - removeSuccess=eventDispatch.removeEventHandler(eventType,handler); - status=removeSuccess ? OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess : OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist - } - if(removeSuccess && eventDispatch.getEventHandlerCount(eventType)==0) - { - var dispId=dispIdMap[eventType]; - var invoker=getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; - invoker({ - eventType: eventType, - dispId: dispId, - targetId: caller.id || "", - onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) - }, - onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) - }, - onComplete: onEnsureRegistration - }) - } - else - onEnsureRegistration(status) - } - catch(ex) - { - onException(ex,asyncMethodCall,suppliedArguments,callArgs) - } - }; - this[OSF.DDA.DispIdHost.Methods.OpenDialog]=function OSF_DDA_DispIdHost_Facade$OpenDialog(suppliedArguments, eventDispatch, caller) - { - var callArgs; - var targetId; - var dialogMessageEvent=Microsoft.Office.WebExtension.EventType.DialogMessageReceived; - var dialogOtherEvent=Microsoft.Office.WebExtension.EventType.DialogEventReceived; - function onEnsureRegistration(status) - { - var payload; - if(status !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - payload=OSF.DDA.ErrorCodeManager.getErrorArgs(status); - else - { - var onSucceedArgs={}; - onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Id]=targetId; - onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Data]=eventDispatch; - var payload=asyncMethodCall.processResponse(status,onSucceedArgs,caller,callArgs); - OSF.DialogShownStatus.hasDialogShown=true; - eventDispatch.clearEventHandlers(dialogMessageEvent); - eventDispatch.clearEventHandlers(dialogOtherEvent) - } - OSF.DDA.issueAsyncResult(callArgs,status,payload) - } - try - { - if(dialogMessageEvent==undefined || dialogOtherEvent==undefined) - onEnsureRegistration(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported); - if(OSF.DDA.AsyncMethodNames.DisplayDialogAsync==null) - { - onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); - return - } - var asyncMethodCall=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id]; - callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); - var dispId=dispIdMap[dialogMessageEvent]; - var delegateMethods=getDelegateMethods(dialogMessageEvent); - var invoker=delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] !=undefined ? delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] : delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; - targetId=JSON.stringify(callArgs); - invoker({ - eventType: dialogMessageEvent, - dispId: dispId, - targetId: targetId, - onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) - }, - onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) - }, - onComplete: onEnsureRegistration, - onEvent: function handleEvent(hostArgs) - { - var args=parameterMap.fromHost(dispId,hostArgs); - var event=OSF.DDA.OMFactory.manufactureEventArgs(dialogMessageEvent,caller,args); - if(event.type==dialogOtherEvent) - { - var payload=OSF.DDA.ErrorCodeManager.getErrorArgs(event.error); - var errorArgs={}; - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=payload.name || payload; - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=payload.message || payload; - event.error=new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]) - } - eventDispatch.fireOrQueueEvent(event); - if(args[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogClosed) - { - eventDispatch.clearEventHandlers(dialogMessageEvent); - eventDispatch.clearEventHandlers(dialogOtherEvent); - eventDispatch.clearEventHandlers(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived); - OSF.DialogShownStatus.hasDialogShown=false - } - } - }) - } - catch(ex) - { - onException(ex,asyncMethodCall,suppliedArguments,callArgs) - } - }; - this[OSF.DDA.DispIdHost.Methods.CloseDialog]=function OSF_DDA_DispIdHost_Facade$CloseDialog(suppliedArguments, targetId, eventDispatch, caller) - { - var callArgs; - var dialogMessageEvent, - dialogOtherEvent; - var closeStatus=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; - function closeCallback(status) - { - closeStatus=status; - OSF.DialogShownStatus.hasDialogShown=false - } - try - { - var asyncMethodCall=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id]; - callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); - dialogMessageEvent=Microsoft.Office.WebExtension.EventType.DialogMessageReceived; - dialogOtherEvent=Microsoft.Office.WebExtension.EventType.DialogEventReceived; - eventDispatch.clearEventHandlers(dialogMessageEvent); - eventDispatch.clearEventHandlers(dialogOtherEvent); - var dispId=dispIdMap[dialogMessageEvent]; - var delegateMethods=getDelegateMethods(dialogMessageEvent); - var invoker=delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] !=undefined ? delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] : delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; - invoker({ - eventType: dialogMessageEvent, - dispId: dispId, - targetId: targetId, - onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) - }, - onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) - }, - onComplete: closeCallback - }) - } - catch(ex) - { - onException(ex,asyncMethodCall,suppliedArguments,callArgs) - } - if(closeStatus !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed,OSF.DDA.AsyncMethodNames.CloseAsync.displayName,closeStatus); - }; - this[OSF.DDA.DispIdHost.Methods.MessageParent]=function OSF_DDA_DispIdHost_Facade$MessageParent(suppliedArguments, caller) - { - var stateInfo={}; - var syncMethodCall=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id]; - var callArgs=syncMethodCall.verifyAndExtractCall(suppliedArguments,caller,stateInfo); - var delegate=getDelegateMethods(OSF.DDA.SyncMethodNames.MessageParent.id); - var invoker=delegate[OSF.DDA.DispIdHost.Delegates.MessageParent]; - var dispId=dispIdMap[OSF.DDA.SyncMethodNames.MessageParent.id]; - return invoker({ - dispId: dispId, - hostCallArgs: callArgs, - onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) - }, - onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) - } - }) - }; - this[OSF.DDA.DispIdHost.Methods.SendMessage]=function OSF_DDA_DispIdHost_Facade$SendMessage(suppliedArguments, eventDispatch, caller) - { - var stateInfo={}; - var syncMethodCall=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.SendMessage.id]; - var callArgs=syncMethodCall.verifyAndExtractCall(suppliedArguments,caller,stateInfo); - var delegate=getDelegateMethods(OSF.DDA.SyncMethodNames.SendMessage.id); - var invoker=delegate[OSF.DDA.DispIdHost.Delegates.SendMessage]; - var dispId=dispIdMap[OSF.DDA.SyncMethodNames.SendMessage.id]; - return invoker({ - dispId: dispId, - hostCallArgs: callArgs, - onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) - }, - onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() - { - OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) - } - }) - } + var dispIdMap = {}; + var jsom = OSF.DDA.AsyncMethodNames; + var did = OSF.DDA.MethodDispId; + var methodMap = { + GoToByIdAsync: did.dispidNavigateToMethod, + GetSelectedDataAsync: did.dispidGetSelectedDataMethod, + SetSelectedDataAsync: did.dispidSetSelectedDataMethod, + GetDocumentCopyChunkAsync: did.dispidGetDocumentCopyChunkMethod, + ReleaseDocumentCopyAsync: did.dispidReleaseDocumentCopyMethod, + GetDocumentCopyAsync: did.dispidGetDocumentCopyMethod, + AddFromSelectionAsync: did.dispidAddBindingFromSelectionMethod, + AddFromPromptAsync: did.dispidAddBindingFromPromptMethod, + AddFromNamedItemAsync: did.dispidAddBindingFromNamedItemMethod, + GetAllAsync: did.dispidGetAllBindingsMethod, + GetByIdAsync: did.dispidGetBindingMethod, + ReleaseByIdAsync: did.dispidReleaseBindingMethod, + GetDataAsync: did.dispidGetBindingDataMethod, + SetDataAsync: did.dispidSetBindingDataMethod, + AddRowsAsync: did.dispidAddRowsMethod, + AddColumnsAsync: did.dispidAddColumnsMethod, + DeleteAllDataValuesAsync: did.dispidClearAllRowsMethod, + RefreshAsync: did.dispidLoadSettingsMethod, + SaveAsync: did.dispidSaveSettingsMethod, + GetActiveViewAsync: did.dispidGetActiveViewMethod, + GetFilePropertiesAsync: did.dispidGetFilePropertiesMethod, + GetOfficeThemeAsync: did.dispidGetOfficeThemeMethod, + GetDocumentThemeAsync: did.dispidGetDocumentThemeMethod, + ClearFormatsAsync: did.dispidClearFormatsMethod, + SetTableOptionsAsync: did.dispidSetTableOptionsMethod, + SetFormatsAsync: did.dispidSetFormatsMethod, + GetAccessTokenAsync: did.dispidGetAccessTokenMethod, + ExecuteRichApiRequestAsync: did.dispidExecuteRichApiRequestMethod, + AppCommandInvocationCompletedAsync: did.dispidAppCommandInvocationCompletedMethod, + CloseContainerAsync: did.dispidCloseContainerMethod, + AddDataPartAsync: did.dispidAddDataPartMethod, + GetDataPartByIdAsync: did.dispidGetDataPartByIdMethod, + GetDataPartsByNameSpaceAsync: did.dispidGetDataPartsByNamespaceMethod, + GetPartXmlAsync: did.dispidGetDataPartXmlMethod, + GetPartNodesAsync: did.dispidGetDataPartNodesMethod, + DeleteDataPartAsync: did.dispidDeleteDataPartMethod, + GetNodeValueAsync: did.dispidGetDataNodeValueMethod, + GetNodeXmlAsync: did.dispidGetDataNodeXmlMethod, + GetRelativeNodesAsync: did.dispidGetDataNodesMethod, + SetNodeValueAsync: did.dispidSetDataNodeValueMethod, + SetNodeXmlAsync: did.dispidSetDataNodeXmlMethod, + AddDataPartNamespaceAsync: did.dispidAddDataNamespaceMethod, + GetDataPartNamespaceAsync: did.dispidGetDataUriByPrefixMethod, + GetDataPartPrefixAsync: did.dispidGetDataPrefixByUriMethod, + GetNodeTextAsync: did.dispidGetDataNodeTextMethod, + SetNodeTextAsync: did.dispidSetDataNodeTextMethod, + GetSelectedTask: did.dispidGetSelectedTaskMethod, + GetTask: did.dispidGetTaskMethod, + GetWSSUrl: did.dispidGetWSSUrlMethod, + GetTaskField: did.dispidGetTaskFieldMethod, + GetSelectedResource: did.dispidGetSelectedResourceMethod, + GetResourceField: did.dispidGetResourceFieldMethod, + GetProjectField: did.dispidGetProjectFieldMethod, + GetSelectedView: did.dispidGetSelectedViewMethod, + GetTaskByIndex: did.dispidGetTaskByIndexMethod, + GetResourceByIndex: did.dispidGetResourceByIndexMethod, + SetTaskField: did.dispidSetTaskFieldMethod, + SetResourceField: did.dispidSetResourceFieldMethod, + GetMaxTaskIndex: did.dispidGetMaxTaskIndexMethod, + GetMaxResourceIndex: did.dispidGetMaxResourceIndexMethod, + CreateTask: did.dispidCreateTaskMethod + }; + for(var method in methodMap) + if(jsom[method]) + dispIdMap[jsom[method].id] = methodMap[method]; + jsom = OSF.DDA.SyncMethodNames; + did = OSF.DDA.MethodDispId; + var asyncMethodMap = { + MessageParent: did.dispidMessageParentMethod, + SendMessage: did.dispidSendMessageMethod + }; + for(var method in asyncMethodMap) + if(jsom[method]) + dispIdMap[jsom[method].id] = asyncMethodMap[method]; + jsom = Microsoft.Office.WebExtension.EventType; + did = OSF.DDA.EventDispId; + var eventMap = { + SettingsChanged: did.dispidSettingsChangedEvent, + DocumentSelectionChanged: did.dispidDocumentSelectionChangedEvent, + BindingSelectionChanged: did.dispidBindingSelectionChangedEvent, + BindingDataChanged: did.dispidBindingDataChangedEvent, + ActiveViewChanged: did.dispidActiveViewChangedEvent, + OfficeThemeChanged: did.dispidOfficeThemeChangedEvent, + DocumentThemeChanged: did.dispidDocumentThemeChangedEvent, + AppCommandInvoked: did.dispidAppCommandInvokedEvent, + DialogMessageReceived: did.dispidDialogMessageReceivedEvent, + DialogParentMessageReceived: did.dispidDialogParentMessageReceivedEvent, + ObjectDeleted: did.dispidObjectDeletedEvent, + ObjectSelectionChanged: did.dispidObjectSelectionChangedEvent, + ObjectDataChanged: did.dispidObjectDataChangedEvent, + ContentControlAdded: did.dispidContentControlAddedEvent, + RichApiMessage: did.dispidRichApiMessageEvent, + ItemChanged: did.dispidOlkItemSelectedChangedEvent, + RecipientsChanged: did.dispidOlkRecipientsChangedEvent, + AppointmentTimeChanged: did.dispidOlkAppointmentTimeChangedEvent, + TaskSelectionChanged: did.dispidTaskSelectionChangedEvent, + ResourceSelectionChanged: did.dispidResourceSelectionChangedEvent, + ViewSelectionChanged: did.dispidViewSelectionChangedEvent, + DataNodeInserted: did.dispidDataNodeAddedEvent, + DataNodeReplaced: did.dispidDataNodeReplacedEvent, + DataNodeDeleted: did.dispidDataNodeDeletedEvent + }; + for(var event in eventMap) + if(jsom[event]) + dispIdMap[jsom[event]] = eventMap[event]; + function IsObjectEvent(dispId) + { + return dispId == OSF.DDA.EventDispId.dispidObjectDeletedEvent || dispId == OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent || dispId == OSF.DDA.EventDispId.dispidObjectDataChangedEvent || dispId == OSF.DDA.EventDispId.dispidContentControlAddedEvent + } + function onException(ex, asyncMethodCall, suppliedArgs, callArgs) + { + if(typeof ex == "number") + { + if(!callArgs) + callArgs = asyncMethodCall.getCallArgs(suppliedArgs); + OSF.DDA.issueAsyncResult(callArgs,ex,OSF.DDA.ErrorCodeManager.getErrorArgs(ex)) + } + else + throw ex; + } + this[OSF.DDA.DispIdHost.Methods.InvokeMethod] = function OSF_DDA_DispIdHost_Facade$InvokeMethod(method, suppliedArguments, caller, privateState) + { + var callArgs; + try + { + var methodName = method.id; + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[methodName]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,privateState); + var dispId = dispIdMap[methodName]; + var delegate = getDelegateMethods(methodName); + var richApiInExcelMethodSubstitution = null; + if(window.Excel && window.Office.context.requirements.isSetSupported("RedirectV1Api")) + window.Excel._RedirectV1APIs = true; + if(window.Excel && window.Excel._RedirectV1APIs && (richApiInExcelMethodSubstitution = window.Excel._V1APIMap[methodName])) + { + var preprocessedCallArgs = OSF.OUtil.shallowCopy(callArgs); + delete preprocessedCallArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; + if(richApiInExcelMethodSubstitution.preprocess) + preprocessedCallArgs = richApiInExcelMethodSubstitution.preprocess(preprocessedCallArgs); + var ctx = new window.Excel.RequestContext; + var result = richApiInExcelMethodSubstitution.call(ctx,preprocessedCallArgs); + ctx.sync().then(function() + { + var response = result.value; + var status = response.status; + delete response["status"]; + delete response["@odata.type"]; + if(richApiInExcelMethodSubstitution.postprocess) + response = richApiInExcelMethodSubstitution.postprocess(response,preprocessedCallArgs); + if(status != 0) + response = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + OSF.DDA.issueAsyncResult(callArgs,status,response) + })["catch"](function(error) + { + OSF.DDA.issueAsyncResult(callArgs,OSF.DDA.ErrorCodeManager.errorCodes.ooeFailure,null) + }) + } + else + { + var hostCallArgs; + if(parameterMap.toHost) + hostCallArgs = parameterMap.toHost(dispId,callArgs); + else + hostCallArgs = callArgs; + var startTime = (new Date).getTime(); + delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ + dispId: dispId, + hostCallArgs: hostCallArgs, + onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling(){}, + onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving(){}, + onComplete: function(status, hostResponseArgs) + { + var responseArgs; + if(status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + if(parameterMap.fromHost) + responseArgs = parameterMap.fromHost(dispId,hostResponseArgs); + else + responseArgs = hostResponseArgs; + else + responseArgs = hostResponseArgs; + var payload = asyncMethodCall.processResponse(status,responseArgs,caller,callArgs); + OSF.DDA.issueAsyncResult(callArgs,status,payload); + if(OSF.AppTelemetry) + OSF.AppTelemetry.onMethodDone(dispId,hostCallArgs,Math.abs((new Date).getTime() - startTime),status) + } + }) + } + } + catch(ex) + { + onException(ex,asyncMethodCall,suppliedArguments,callArgs) + } + }; + this[OSF.DDA.DispIdHost.Methods.AddEventHandler] = function OSF_DDA_DispIdHost_Facade$AddEventHandler(suppliedArguments, eventDispatch, caller, isPopupWindow) + { + var callArgs; + var eventType, + handler; + var isObjectEvent = false; + function onEnsureRegistration(status) + { + if(status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + { + var added = !isObjectEvent ? eventDispatch.addEventHandler(eventType,handler) : eventDispatch.addObjectEventHandler(eventType,callArgs[Microsoft.Office.WebExtension.Parameters.Id],handler); + if(!added) + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed + } + var error; + if(status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + error = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + OSF.DDA.issueAsyncResult(callArgs,status,error) + } + try + { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); + eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + if(isPopupWindow) + { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + return + } + var dispId = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId); + var targetId = isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : caller.id || ""; + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType,targetId) : eventDispatch.getEventHandlerCount(eventType); + if(count == 0) + { + var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; + invoker({ + eventType: eventType, + dispId: dispId, + targetId: targetId, + onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) + }, + onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) + }, + onComplete: onEnsureRegistration, + onEvent: function handleEvent(hostArgs) + { + var args = parameterMap.fromHost(dispId,hostArgs); + if(!isObjectEvent) + eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType,caller,args)); + else + eventDispatch.fireObjectEvent(targetId,OSF.DDA.OMFactory.manufactureEventArgs(eventType,targetId,args)) + } + }) + } + else + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + } + catch(ex) + { + onException(ex,asyncMethodCall,suppliedArguments,callArgs) + } + }; + this[OSF.DDA.DispIdHost.Methods.RemoveEventHandler] = function OSF_DDA_DispIdHost_Facade$RemoveEventHandler(suppliedArguments, eventDispatch, caller) + { + var callArgs; + var eventType, + handler; + var isObjectEvent = false; + function onEnsureRegistration(status) + { + var error; + if(status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + error = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + OSF.DDA.issueAsyncResult(callArgs,status,error) + } + try + { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); + eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + var dispId = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId); + var targetId = isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : caller.id || ""; + var status, + removeSuccess; + if(handler === null) + { + removeSuccess = isObjectEvent ? eventDispatch.clearObjectEventHandlers(eventType,targetId) : eventDispatch.clearEventHandlers(eventType); + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess + } + else + { + removeSuccess = isObjectEvent ? eventDispatch.removeObjectEventHandler(eventType,targetId,handler) : eventDispatch.removeEventHandler(eventType,handler); + status = removeSuccess ? OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess : OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist + } + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType,targetId) : eventDispatch.getEventHandlerCount(eventType); + if(removeSuccess && count == 0) + { + var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; + invoker({ + eventType: eventType, + dispId: dispId, + targetId: targetId, + onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) + }, + onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) + }, + onComplete: onEnsureRegistration + }) + } + else + onEnsureRegistration(status) + } + catch(ex) + { + onException(ex,asyncMethodCall,suppliedArguments,callArgs) + } + }; + this[OSF.DDA.DispIdHost.Methods.OpenDialog] = function OSF_DDA_DispIdHost_Facade$OpenDialog(suppliedArguments, eventDispatch, caller) + { + var callArgs; + var targetId; + var dialogMessageEvent = Microsoft.Office.WebExtension.EventType.DialogMessageReceived; + var dialogOtherEvent = Microsoft.Office.WebExtension.EventType.DialogEventReceived; + function onEnsureRegistration(status) + { + var payload; + if(status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + payload = OSF.DDA.ErrorCodeManager.getErrorArgs(status); + else + { + var onSucceedArgs = {}; + onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Id] = targetId; + onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Data] = eventDispatch; + var payload = asyncMethodCall.processResponse(status,onSucceedArgs,caller,callArgs); + OSF.DialogShownStatus.hasDialogShown = true; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent) + } + OSF.DDA.issueAsyncResult(callArgs,status,payload) + } + try + { + if(dialogMessageEvent == undefined || dialogOtherEvent == undefined) + onEnsureRegistration(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported); + if(OSF.DDA.AsyncMethodNames.DisplayDialogAsync == null) + { + onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); + return + } + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); + var dispId = dispIdMap[dialogMessageEvent]; + var delegateMethods = getDelegateMethods(dialogMessageEvent); + var invoker = delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] != undefined ? delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] : delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; + targetId = JSON.stringify(callArgs); + if(!OSF.DialogShownStatus.hasDialogShown) + { + eventDispatch.clearQueuedEvent(dialogMessageEvent); + eventDispatch.clearQueuedEvent(dialogOtherEvent); + eventDispatch.clearQueuedEvent(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived) + } + invoker({ + eventType: dialogMessageEvent, + dispId: dispId, + targetId: targetId, + onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) + }, + onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) + }, + onComplete: onEnsureRegistration, + onEvent: function handleEvent(hostArgs) + { + var args = parameterMap.fromHost(dispId,hostArgs); + var event = OSF.DDA.OMFactory.manufactureEventArgs(dialogMessageEvent,caller,args); + if(event.type == dialogOtherEvent) + { + var payload = OSF.DDA.ErrorCodeManager.getErrorArgs(event.error); + var errorArgs = {}; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code] = status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name] = payload.name || payload; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message] = payload.message || payload; + event.error = new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]) + } + eventDispatch.fireOrQueueEvent(event); + if(args[OSF.DDA.PropertyDescriptors.MessageType] == OSF.DialogMessageType.DialogClosed) + { + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + eventDispatch.clearEventHandlers(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived); + OSF.DialogShownStatus.hasDialogShown = false + } + } + }) + } + catch(ex) + { + onException(ex,asyncMethodCall,suppliedArguments,callArgs) + } + }; + this[OSF.DDA.DispIdHost.Methods.CloseDialog] = function OSF_DDA_DispIdHost_Facade$CloseDialog(suppliedArguments, targetId, eventDispatch, caller) + { + var callArgs; + var dialogMessageEvent, + dialogOtherEvent; + var closeStatus = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; + function closeCallback(status) + { + closeStatus = status; + OSF.DialogShownStatus.hasDialogShown = false + } + try + { + var asyncMethodCall = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id]; + callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch); + dialogMessageEvent = Microsoft.Office.WebExtension.EventType.DialogMessageReceived; + dialogOtherEvent = Microsoft.Office.WebExtension.EventType.DialogEventReceived; + eventDispatch.clearEventHandlers(dialogMessageEvent); + eventDispatch.clearEventHandlers(dialogOtherEvent); + var dispId = dispIdMap[dialogMessageEvent]; + var delegateMethods = getDelegateMethods(dialogMessageEvent); + var invoker = delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] != undefined ? delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] : delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; + invoker({ + eventType: dialogMessageEvent, + dispId: dispId, + targetId: targetId, + onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) + }, + onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) + }, + onComplete: closeCallback + }) + } + catch(ex) + { + onException(ex,asyncMethodCall,suppliedArguments,callArgs) + } + if(closeStatus != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed,OSF.DDA.AsyncMethodNames.CloseAsync.displayName,closeStatus); + }; + this[OSF.DDA.DispIdHost.Methods.MessageParent] = function OSF_DDA_DispIdHost_Facade$MessageParent(suppliedArguments, caller) + { + var stateInfo = {}; + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(suppliedArguments,caller,stateInfo); + var delegate = getDelegateMethods(OSF.DDA.SyncMethodNames.MessageParent.id); + var invoker = delegate[OSF.DDA.DispIdHost.Delegates.MessageParent]; + var dispId = dispIdMap[OSF.DDA.SyncMethodNames.MessageParent.id]; + return invoker({ + dispId: dispId, + hostCallArgs: callArgs, + onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) + }, + onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) + } + }) + }; + this[OSF.DDA.DispIdHost.Methods.SendMessage] = function OSF_DDA_DispIdHost_Facade$SendMessage(suppliedArguments, eventDispatch, caller) + { + var stateInfo = {}; + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.SendMessage.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(suppliedArguments,caller,stateInfo); + var delegate = getDelegateMethods(OSF.DDA.SyncMethodNames.SendMessage.id); + var invoker = delegate[OSF.DDA.DispIdHost.Delegates.SendMessage]; + var dispId = dispIdMap[OSF.DDA.SyncMethodNames.SendMessage.id]; + return invoker({ + dispId: dispId, + hostCallArgs: callArgs, + onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) + }, + onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving() + { + OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) + } + }) + } }; -OSF.DDA.DispIdHost.addAsyncMethods=function OSF_DDA_DispIdHost$AddAsyncMethods(target, asyncMethodNames, privateState) +OSF.DDA.DispIdHost.addAsyncMethods = function OSF_DDA_DispIdHost$AddAsyncMethods(target, asyncMethodNames, privateState) { - for(var entry in asyncMethodNames) - { - var method=asyncMethodNames[entry]; - var name=method.displayName; - if(!target[name]) - OSF.OUtil.defineEnumerableProperty(target,name,{value: function(asyncMethod) - { - return function() - { - var invokeMethod=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod]; - invokeMethod(asyncMethod,arguments,target,privateState) - } - }(method)}) - } + for(var entry in asyncMethodNames) + { + var method = asyncMethodNames[entry]; + var name = method.displayName; + if(!target[name]) + OSF.OUtil.defineEnumerableProperty(target,name,{value: function(asyncMethod) + { + return function() + { + var invokeMethod = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod]; + invokeMethod(asyncMethod,arguments,target,privateState) + } + }(method)}) + } }; -OSF.DDA.DispIdHost.addEventSupport=function OSF_DDA_DispIdHost$AddEventSupport(target, eventDispatch) +OSF.DDA.DispIdHost.addEventSupport = function OSF_DDA_DispIdHost$AddEventSupport(target, eventDispatch, isPopupWindow) { - var add=OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName; - var remove=OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName; - if(!target[add]) - OSF.OUtil.defineEnumerableProperty(target,add,{value: function() - { - var addEventHandler=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler]; - addEventHandler(arguments,eventDispatch,target) - }}); - if(!target[remove]) - OSF.OUtil.defineEnumerableProperty(target,remove,{value: function() - { - var removeEventHandler=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]; - removeEventHandler(arguments,eventDispatch,target) - }}) + var add = OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName; + var remove = OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName; + if(!target[add]) + OSF.OUtil.defineEnumerableProperty(target,add,{value: function() + { + var addEventHandler = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler]; + addEventHandler(arguments,eventDispatch,target,isPopupWindow) + }}); + if(!target[remove]) + OSF.OUtil.defineEnumerableProperty(target,remove,{value: function() + { + var removeEventHandler = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]; + removeEventHandler(arguments,eventDispatch,target) + }}) }; OSF.OUtil.setNamespace("SafeArray",OSF.DDA); -OSF.DDA.SafeArray.Response={ - Status: 0, - Payload: 1 +OSF.DDA.SafeArray.Response = { + Status: 0, + Payload: 1 }; -OSF.DDA.SafeArray.UniqueArguments={ - Offset: "offset", - Run: "run", - BindingSpecificData: "bindingSpecificData", - MergedCellGuid: "{66e7831f-81b2-42e2-823c-89e872d541b3}" +OSF.DDA.SafeArray.UniqueArguments = { + Offset: "offset", + Run: "run", + BindingSpecificData: "bindingSpecificData", + MergedCellGuid: "{66e7831f-81b2-42e2-823c-89e872d541b3}" }; OSF.OUtil.setNamespace("Delegate",OSF.DDA.SafeArray); -OSF.DDA.SafeArray.Delegate._onException=function OSF_DDA_SafeArray_Delegate$OnException(ex, args) +OSF.DDA.SafeArray.Delegate._onException = function OSF_DDA_SafeArray_Delegate$OnException(ex, args) { - var status; - var statusNumber=ex.number; - if(statusNumber) - switch(statusNumber) - { - case-2146828218: - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; - break; - case-2147467259: - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened; - break; - case-2146828283: - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam; - break; - case-2147209089: - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam; - break; - case-2146827850: - default: - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; - break - } - if(args.onComplete) - args.onComplete(status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError) + var status; + var statusNumber = ex.number; + if(statusNumber) + switch(statusNumber) + { + case-2146828218: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; + break; + case-2147467259: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened; + break; + case-2146828283: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam; + break; + case-2147209089: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam; + break; + case-2146827850: + default: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + break + } + if(args.onComplete) + args.onComplete(status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError) }; -OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod=function OSF_DDA_SafeArray_Delegate$OnExceptionSyncMethod(ex, args) +OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod = function OSF_DDA_SafeArray_Delegate$OnExceptionSyncMethod(ex, args) { - var status; - var number=ex.number; - if(number) - switch(number) - { - case-2146828218: - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; - break; - case-2146827850: - default: - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; - break - } - return status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError + var status; + var number = ex.number; + if(number) + switch(number) + { + case-2146828218: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; + break; + case-2146827850: + default: + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + break + } + return status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError }; -OSF.DDA.SafeArray.Delegate.SpecialProcessor=function OSF_DDA_SafeArray_Delegate_SpecialProcessor() +OSF.DDA.SafeArray.Delegate.SpecialProcessor = function OSF_DDA_SafeArray_Delegate_SpecialProcessor() { - function _2DVBArrayToJaggedArray(vbArr) - { - var ret; - try - { - var rows=vbArr.ubound(1); - var cols=vbArr.ubound(2); - vbArr=vbArr.toArray(); - if(rows==1 && cols==1) - ret=[vbArr]; - else - { - ret=[]; - for(var row=0; row < rows; row++) - { - var rowArr=[]; - for(var col=0; col < cols; col++) - { - var datum=vbArr[row * cols+col]; - if(datum !=OSF.DDA.SafeArray.UniqueArguments.MergedCellGuid) - rowArr.push(datum) - } - if(rowArr.length > 0) - ret.push(rowArr) - } - } - } - catch(ex){} - return ret - } - var complexTypes=[]; - var dynamicTypes={}; - dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]=function() - { - var tableRows=0; - var tableHeaders=1; - return{ - toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$toHost(data) - { - if(OSF.DDA.TableDataProperties && typeof data !="string" && data[OSF.DDA.TableDataProperties.TableRows] !==undefined) - { - var tableData=[]; - tableData[tableRows]=data[OSF.DDA.TableDataProperties.TableRows]; - tableData[tableHeaders]=data[OSF.DDA.TableDataProperties.TableHeaders]; - data=tableData - } - return data - }, - fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$fromHost(hostArgs) - { - var ret; - if(hostArgs.toArray) - { - var dimensions=hostArgs.dimensions(); - if(dimensions===2) - ret=_2DVBArrayToJaggedArray(hostArgs); - else - { - var array=hostArgs.toArray(); - if(array.length===2 && (array[0] !=null && array[0].toArray || array[1] !=null && array[1].toArray)) - { - ret={}; - ret[OSF.DDA.TableDataProperties.TableRows]=_2DVBArrayToJaggedArray(array[tableRows]); - ret[OSF.DDA.TableDataProperties.TableHeaders]=_2DVBArrayToJaggedArray(array[tableHeaders]) - } - else - ret=array - } - } - else - ret=hostArgs; - return ret - } - } - }(); - OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,complexTypes,dynamicTypes); - this.unpack=function OSF_DDA_SafeArray_Delegate_SpecialProcessor$unpack(param, arg) - { - var value; - if(this.isComplexType(param) || OSF.DDA.ListType.isListType(param)) - { - var toArraySupported=(arg || typeof arg==="unknown") && arg.toArray; - value=toArraySupported ? arg.toArray() : arg || {} - } - else if(this.isDynamicType(param)) - value=dynamicTypes[param].fromHost(arg); - else - value=arg; - return value - } + function _2DVBArrayToJaggedArray(vbArr) + { + var ret; + try + { + var rows = vbArr.ubound(1); + var cols = vbArr.ubound(2); + vbArr = vbArr.toArray(); + if(rows == 1 && cols == 1) + ret = [vbArr]; + else + { + ret = []; + for(var row = 0; row < rows; row++) + { + var rowArr = []; + for(var col = 0; col < cols; col++) + { + var datum = vbArr[row * cols + col]; + if(datum != OSF.DDA.SafeArray.UniqueArguments.MergedCellGuid) + rowArr.push(datum) + } + if(rowArr.length > 0) + ret.push(rowArr) + } + } + } + catch(ex){} + return ret + } + var complexTypes = []; + var dynamicTypes = {}; + dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data] = function() + { + var tableRows = 0; + var tableHeaders = 1; + return{ + toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$toHost(data) + { + if(OSF.DDA.TableDataProperties && typeof data != "string" && data[OSF.DDA.TableDataProperties.TableRows] !== undefined) + { + var tableData = []; + tableData[tableRows] = data[OSF.DDA.TableDataProperties.TableRows]; + tableData[tableHeaders] = data[OSF.DDA.TableDataProperties.TableHeaders]; + data = tableData + } + return data + }, + fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$fromHost(hostArgs) + { + var ret; + if(hostArgs.toArray) + { + var dimensions = hostArgs.dimensions(); + if(dimensions === 2) + ret = _2DVBArrayToJaggedArray(hostArgs); + else + { + var array = hostArgs.toArray(); + if(array.length === 2 && (array[0] != null && array[0].toArray || array[1] != null && array[1].toArray)) + { + ret = {}; + ret[OSF.DDA.TableDataProperties.TableRows] = _2DVBArrayToJaggedArray(array[tableRows]); + ret[OSF.DDA.TableDataProperties.TableHeaders] = _2DVBArrayToJaggedArray(array[tableHeaders]) + } + else + ret = array + } + } + else + ret = hostArgs; + return ret + } + } + }(); + OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,complexTypes,dynamicTypes); + this.unpack = function OSF_DDA_SafeArray_Delegate_SpecialProcessor$unpack(param, arg) + { + var value; + if(this.isComplexType(param) || OSF.DDA.ListType.isListType(param)) + { + var toArraySupported = (arg || typeof arg === "unknown") && arg.toArray; + value = toArraySupported ? arg.toArray() : arg || {} + } + else if(this.isDynamicType(param)) + value = dynamicTypes[param].fromHost(arg); + else + value = arg; + return value + } }; OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor); -OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{ - type: Microsoft.Office.WebExtension.Parameters.ValueFormat, - toHost: [{ - name: Microsoft.Office.WebExtension.ValueFormat.Unformatted, - value: 0 - },{ - name: Microsoft.Office.WebExtension.ValueFormat.Formatted, - value: 1 - }] - },{ - type: Microsoft.Office.WebExtension.Parameters.FilterType, - toHost: [{ - name: Microsoft.Office.WebExtension.FilterType.All, - value: 0 - }] - }]); +OSF.DDA.SafeArray.Delegate.ParameterMap = OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{ + type: Microsoft.Office.WebExtension.Parameters.ValueFormat, + toHost: [{ + name: Microsoft.Office.WebExtension.ValueFormat.Unformatted, + value: 0 + },{ + name: Microsoft.Office.WebExtension.ValueFormat.Formatted, + value: 1 + }] + },{ + type: Microsoft.Office.WebExtension.Parameters.FilterType, + toHost: [{ + name: Microsoft.Office.WebExtension.FilterType.All, + value: 0 + }] + }]); OSF.DDA.SafeArray.Delegate.ParameterMap.define({ - type: OSF.DDA.PropertyDescriptors.AsyncResultStatus, - fromHost: [{ - name: Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded, - value: 0 - },{ - name: Microsoft.Office.WebExtension.AsyncResultStatus.Failed, - value: 1 - }] + type: OSF.DDA.PropertyDescriptors.AsyncResultStatus, + fromHost: [{ + name: Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded, + value: 0 + },{ + name: Microsoft.Office.WebExtension.AsyncResultStatus.Failed, + value: 1 + }] }); -OSF.DDA.SafeArray.Delegate.executeAsync=function OSF_DDA_SafeArray_Delegate$ExecuteAsync(args) +OSF.DDA.SafeArray.Delegate.executeAsync = function OSF_DDA_SafeArray_Delegate$ExecuteAsync(args) { - function toArray(args) - { - var arrArgs=args; - if(OSF.OUtil.isArray(args)) - { - var len=arrArgs.length; - for(var i=0; i < len; i++) - arrArgs[i]=toArray(arrArgs[i]) - } - else if(OSF.OUtil.isDate(args)) - arrArgs=args.getVarDate(); - else if(typeof args==="object" && !OSF.OUtil.isArray(args)) - { - arrArgs=[]; - for(var index in args) - if(!OSF.OUtil.isFunction(args[index])) - arrArgs[index]=toArray(args[index]) - } - return arrArgs - } - function fromSafeArray(value) - { - var ret=value; - if(value !=null && value.toArray) - { - var arrayResult=value.toArray(); - ret=new Array(arrayResult.length); - for(var i=0; i < arrayResult.length; i++) - ret[i]=fromSafeArray(arrayResult[i]) - } - return ret - } - try - { - if(args.onCalling) - args.onCalling(); - var startTime=(new Date).getTime(); - OSF.ClientHostController.execute(args.dispId,toArray(args.hostCallArgs),function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode) - { - var result=hostResponseArgs.toArray(); - var status=result[OSF.DDA.SafeArray.Response.Status]; - if(status==OSF.DDA.ErrorCodeManager.errorCodes.ooeChunkResult) - { - var payload=result[OSF.DDA.SafeArray.Response.Payload]; - payload=fromSafeArray(payload); - if(payload !=null) - { - if(!args._chunkResultData) - args._chunkResultData=new Array; - args._chunkResultData[payload[0]]=payload[1] - } - return false - } - if(args.onReceiving) - args.onReceiving(); - if(args.onComplete) - { - var payload; - if(status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - { - if(result.length > 2) - { - payload=[]; - for(var i=1; i < result.length; i++) - payload[i - 1]=result[i] - } - else - payload=result[OSF.DDA.SafeArray.Response.Payload]; - if(args._chunkResultData) - { - payload=fromSafeArray(payload); - if(payload !=null) - { - var expectedChunkCount=payload[payload.length - 1]; - if(args._chunkResultData.length==expectedChunkCount) - payload[payload.length - 1]=args._chunkResultData; - else - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError - } - } - } - else - payload=result[OSF.DDA.SafeArray.Response.Payload]; - args.onComplete(status,payload) - } - if(OSF.AppTelemetry) - OSF.AppTelemetry.onMethodDone(args.dispId,args.hostCallArgs,Math.abs((new Date).getTime() - startTime),status); - return true - }) - } - catch(ex) - { - OSF.DDA.SafeArray.Delegate._onException(ex,args) - } + function toArray(args) + { + var arrArgs = args; + if(OSF.OUtil.isArray(args)) + { + var len = arrArgs.length; + for(var i = 0; i < len; i++) + arrArgs[i] = toArray(arrArgs[i]) + } + else if(OSF.OUtil.isDate(args)) + arrArgs = args.getVarDate(); + else if(typeof args === "object" && !OSF.OUtil.isArray(args)) + { + arrArgs = []; + for(var index in args) + if(!OSF.OUtil.isFunction(args[index])) + arrArgs[index] = toArray(args[index]) + } + return arrArgs + } + function fromSafeArray(value) + { + var ret = value; + if(value != null && value.toArray) + { + var arrayResult = value.toArray(); + ret = new Array(arrayResult.length); + for(var i = 0; i < arrayResult.length; i++) + ret[i] = fromSafeArray(arrayResult[i]) + } + return ret + } + try + { + if(args.onCalling) + args.onCalling(); + OSF.ClientHostController.execute(args.dispId,toArray(args.hostCallArgs),function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode) + { + var result = hostResponseArgs.toArray(); + var status = result[OSF.DDA.SafeArray.Response.Status]; + if(status == OSF.DDA.ErrorCodeManager.errorCodes.ooeChunkResult) + { + var payload = result[OSF.DDA.SafeArray.Response.Payload]; + payload = fromSafeArray(payload); + if(payload != null) + { + if(!args._chunkResultData) + args._chunkResultData = new Array; + args._chunkResultData[payload[0]] = payload[1] + } + return false + } + if(args.onReceiving) + args.onReceiving(); + if(args.onComplete) + { + var payload; + if(status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + { + if(result.length > 2) + { + payload = []; + for(var i = 1; i < result.length; i++) + payload[i - 1] = result[i] + } + else + payload = result[OSF.DDA.SafeArray.Response.Payload]; + if(args._chunkResultData) + { + payload = fromSafeArray(payload); + if(payload != null) + { + var expectedChunkCount = payload[payload.length - 1]; + if(args._chunkResultData.length == expectedChunkCount) + payload[payload.length - 1] = args._chunkResultData; + else + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError + } + } + } + else + payload = result[OSF.DDA.SafeArray.Response.Payload]; + args.onComplete(status,payload) + } + return true + }) + } + catch(ex) + { + OSF.DDA.SafeArray.Delegate._onException(ex,args) + } }; -OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent=function OSF_DDA_SafeArrayDelegate$GetOnAfterRegisterEvent(register, args) +OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent = function OSF_DDA_SafeArrayDelegate$GetOnAfterRegisterEvent(register, args) { - var startTime=(new Date).getTime(); - return function OSF_DDA_SafeArrayDelegate$OnAfterRegisterEvent(hostResponseArgs) - { - if(args.onReceiving) - args.onReceiving(); - var status=hostResponseArgs.toArray ? hostResponseArgs.toArray()[OSF.DDA.SafeArray.Response.Status] : hostResponseArgs; - if(args.onComplete) - args.onComplete(status); - if(OSF.AppTelemetry) - OSF.AppTelemetry.onRegisterDone(register,args.dispId,Math.abs((new Date).getTime() - startTime),status) - } + var startTime = (new Date).getTime(); + return function OSF_DDA_SafeArrayDelegate$OnAfterRegisterEvent(hostResponseArgs) + { + if(args.onReceiving) + args.onReceiving(); + var status = hostResponseArgs.toArray ? hostResponseArgs.toArray()[OSF.DDA.SafeArray.Response.Status] : hostResponseArgs; + if(args.onComplete) + args.onComplete(status); + if(OSF.AppTelemetry) + OSF.AppTelemetry.onRegisterDone(register,args.dispId,Math.abs((new Date).getTime() - startTime),status) + } }; -OSF.DDA.SafeArray.Delegate.registerEventAsync=function OSF_DDA_SafeArray_Delegate$RegisterEventAsync(args) +OSF.DDA.SafeArray.Delegate.registerEventAsync = function OSF_DDA_SafeArray_Delegate$RegisterEventAsync(args) { - if(args.onCalling) - args.onCalling(); - var callback=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true,args); - try - { - OSF.ClientHostController.registerEvent(args.dispId,args.targetId,function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) - { - if(args.onEvent) - args.onEvent(payload); - if(OSF.AppTelemetry) - OSF.AppTelemetry.onEventDone(args.dispId) - },callback) - } - catch(ex) - { - OSF.DDA.SafeArray.Delegate._onException(ex,args) - } + if(args.onCalling) + args.onCalling(); + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true,args); + try + { + OSF.ClientHostController.registerEvent(args.dispId,args.targetId,function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) + { + if(args.onEvent) + args.onEvent(payload); + if(OSF.AppTelemetry) + OSF.AppTelemetry.onEventDone(args.dispId) + },callback) + } + catch(ex) + { + OSF.DDA.SafeArray.Delegate._onException(ex,args) + } }; -OSF.DDA.SafeArray.Delegate.unregisterEventAsync=function OSF_DDA_SafeArray_Delegate$UnregisterEventAsync(args) +OSF.DDA.SafeArray.Delegate.unregisterEventAsync = function OSF_DDA_SafeArray_Delegate$UnregisterEventAsync(args) { - if(args.onCalling) - args.onCalling(); - var callback=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false,args); - try - { - OSF.ClientHostController.unregisterEvent(args.dispId,args.targetId,callback) - } - catch(ex) - { - OSF.DDA.SafeArray.Delegate._onException(ex,args) - } + if(args.onCalling) + args.onCalling(); + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false,args); + try + { + OSF.ClientHostController.unregisterEvent(args.dispId,args.targetId,callback) + } + catch(ex) + { + OSF.DDA.SafeArray.Delegate._onException(ex,args) + } }; -OSF.ClientMode={ - ReadWrite: 0, - ReadOnly: 1 +OSF.ClientMode = { + ReadWrite: 0, + ReadOnly: 1 }; -OSF.DDA.RichInitializationReason={ - 1: Microsoft.Office.WebExtension.InitializationReason.Inserted, - 2: Microsoft.Office.WebExtension.InitializationReason.DocumentOpened +OSF.DDA.RichInitializationReason = { + 1: Microsoft.Office.WebExtension.InitializationReason.Inserted, + 2: Microsoft.Office.WebExtension.InitializationReason.DocumentOpened }; -OSF.InitializationHelper=function OSF_InitializationHelper(hostInfo, webAppState, context, settings, hostFacade) +OSF.InitializationHelper = function OSF_InitializationHelper(hostInfo, webAppState, context, settings, hostFacade) { - this._hostInfo=hostInfo; - this._webAppState=webAppState; - this._context=context; - this._settings=settings; - this._hostFacade=hostFacade; - this._initializeSettings=this.initializeSettings + this._hostInfo = hostInfo; + this._webAppState = webAppState; + this._context = context; + this._settings = settings; + this._hostFacade = hostFacade; + this._initializeSettings = this.initializeSettings }; -OSF.InitializationHelper.prototype.deserializeSettings=function OSF_InitializationHelper$deserializeSettings(serializedSettings, refreshSupported) +OSF.InitializationHelper.prototype.deserializeSettings = function OSF_InitializationHelper$deserializeSettings(serializedSettings, refreshSupported) { - var settings; - var osfSessionStorage=OSF.OUtil.getSessionStorage(); - if(osfSessionStorage) - { - var storageSettings=osfSessionStorage.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey()); - if(storageSettings) - serializedSettings=JSON.parse(storageSettings); - else - { - storageSettings=JSON.stringify(serializedSettings); - osfSessionStorage.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),storageSettings) - } - } - var deserializedSettings=OSF.DDA.SettingsManager.deserializeSettings(serializedSettings); - if(refreshSupported) - settings=new OSF.DDA.RefreshableSettings(deserializedSettings); - else - settings=new OSF.DDA.Settings(deserializedSettings); - return settings + var settings; + var osfSessionStorage = OSF.OUtil.getSessionStorage(); + if(osfSessionStorage) + { + var storageSettings = osfSessionStorage.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey()); + if(storageSettings) + serializedSettings = JSON.parse(storageSettings); + else + { + storageSettings = JSON.stringify(serializedSettings); + osfSessionStorage.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),storageSettings) + } + } + var deserializedSettings = OSF.DDA.SettingsManager.deserializeSettings(serializedSettings); + if(refreshSupported) + settings = new OSF.DDA.RefreshableSettings(deserializedSettings); + else + settings = new OSF.DDA.Settings(deserializedSettings); + return settings }; -OSF.InitializationHelper.prototype.saveAndSetDialogInfo=function OSF_InitializationHelper$saveAndSetDialogInfo(hostInfoValue){}; -OSF.InitializationHelper.prototype.setAgaveHostCommunication=function OSF_InitializationHelper$setAgaveHostCommunication(){}; -OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize=function OSF_InitializationHelper$prepareRightBeforeWebExtensionInitialize(appContext) +OSF.InitializationHelper.prototype.saveAndSetDialogInfo = function OSF_InitializationHelper$saveAndSetDialogInfo(hostInfoValue){}; +OSF.InitializationHelper.prototype.setAgaveHostCommunication = function OSF_InitializationHelper$setAgaveHostCommunication(){}; +OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize = function OSF_InitializationHelper$prepareRightBeforeWebExtensionInitialize(appContext) { - this.prepareApiSurface(appContext); - Microsoft.Office.WebExtension.initialize(this.getInitializationReason(appContext)) + this.prepareApiSurface(appContext); + Microsoft.Office.WebExtension.initialize(this.getInitializationReason(appContext)) }; -OSF.InitializationHelper.prototype.prepareApiSurface=function OSF_InitializationHelper$prepareApiSurfaceAndInitialize(appContext) +OSF.InitializationHelper.prototype.prepareApiSurface = function OSF_InitializationHelper$prepareApiSurfaceAndInitialize(appContext) { - var license=new OSF.DDA.License(appContext.get_eToken()); - var getOfficeThemeHandler=OSF.DDA.OfficeTheme && OSF.DDA.OfficeTheme.getOfficeTheme ? OSF.DDA.OfficeTheme.getOfficeTheme : null; - if(appContext.get_isDialog()) - { - if(OSF.DDA.UI.ChildUI) - appContext.ui=new OSF.DDA.UI.ChildUI - } - else if(OSF.DDA.UI.ParentUI) - { - appContext.ui=new OSF.DDA.UI.ParentUI; - if(OfficeExt.Container) - OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync]) - } - OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(appContext,appContext.doc,license,null,getOfficeThemeHandler)); - var getDelegateMethods, - parameterMap; - getDelegateMethods=OSF.DDA.DispIdHost.getClientDelegateMethods; - parameterMap=OSF.DDA.SafeArray.Delegate.ParameterMap; - OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(getDelegateMethods,parameterMap)) + var license = new OSF.DDA.License(appContext.get_eToken()); + var getOfficeThemeHandler = OSF.DDA.OfficeTheme && OSF.DDA.OfficeTheme.getOfficeTheme ? OSF.DDA.OfficeTheme.getOfficeTheme : null; + if(appContext.get_isDialog()) + { + if(OSF.DDA.UI.ChildUI) + appContext.ui = new OSF.DDA.UI.ChildUI + } + else if(OSF.DDA.UI.ParentUI) + { + appContext.ui = new OSF.DDA.UI.ParentUI; + if(OfficeExt.Container) + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync]) + } + if(OSF.DDA.Auth) + { + appContext.auth = new OSF.DDA.Auth; + OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth,[OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]) + } + OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(appContext,appContext.doc,license,null,getOfficeThemeHandler)); + var getDelegateMethods, + parameterMap; + getDelegateMethods = OSF.DDA.DispIdHost.getClientDelegateMethods; + parameterMap = OSF.DDA.SafeArray.Delegate.ParameterMap; + OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(getDelegateMethods,parameterMap)) }; -OSF.InitializationHelper.prototype.getInitializationReason=function(appContext) +OSF.InitializationHelper.prototype.getInitializationReason = function(appContext) { - return OSF.DDA.RichInitializationReason[appContext.get_reason()] + return OSF.DDA.RichInitializationReason[appContext.get_reason()] }; -OSF.DDA.DispIdHost.getClientDelegateMethods=function(actionId) +OSF.DDA.DispIdHost.getClientDelegateMethods = function(actionId) { - var delegateMethods={}; - delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.SafeArray.Delegate.executeAsync; - delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.SafeArray.Delegate.registerEventAsync; - delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.SafeArray.Delegate.unregisterEventAsync; - delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog]=OSF.DDA.SafeArray.Delegate.openDialog; - delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog]=OSF.DDA.SafeArray.Delegate.closeDialog; - delegateMethods[OSF.DDA.DispIdHost.Delegates.MessageParent]=OSF.DDA.SafeArray.Delegate.messageParent; - if(OSF.DDA.AsyncMethodNames.RefreshAsync && actionId==OSF.DDA.AsyncMethodNames.RefreshAsync.id) - { - var readSerializedSettings=function(hostCallArgs, onCalling, onReceiving) - { - return OSF.DDA.ClientSettingsManager.read(onCalling,onReceiving) - }; - delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(readSerializedSettings) - } - if(OSF.DDA.AsyncMethodNames.SaveAsync && actionId==OSF.DDA.AsyncMethodNames.SaveAsync.id) - { - var writeSerializedSettings=function(hostCallArgs, onCalling, onReceiving) - { - return OSF.DDA.ClientSettingsManager.write(hostCallArgs[OSF.DDA.SettingsManager.SerializedSettings],hostCallArgs[Microsoft.Office.WebExtension.Parameters.OverwriteIfStale],onCalling,onReceiving) - }; - delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(writeSerializedSettings) - } - return delegateMethods + var delegateMethods = {}; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.SafeArray.Delegate.executeAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync] = OSF.DDA.SafeArray.Delegate.registerEventAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync] = OSF.DDA.SafeArray.Delegate.unregisterEventAsync; + delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] = OSF.DDA.SafeArray.Delegate.openDialog; + delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] = OSF.DDA.SafeArray.Delegate.closeDialog; + delegateMethods[OSF.DDA.DispIdHost.Delegates.MessageParent] = OSF.DDA.SafeArray.Delegate.messageParent; + delegateMethods[OSF.DDA.DispIdHost.Delegates.SendMessage] = OSF.DDA.SafeArray.Delegate.sendMessage; + if(OSF.DDA.AsyncMethodNames.RefreshAsync && actionId == OSF.DDA.AsyncMethodNames.RefreshAsync.id) + { + var readSerializedSettings = function(hostCallArgs, onCalling, onReceiving) + { + return OSF.DDA.ClientSettingsManager.read(onCalling,onReceiving) + }; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(readSerializedSettings) + } + if(OSF.DDA.AsyncMethodNames.SaveAsync && actionId == OSF.DDA.AsyncMethodNames.SaveAsync.id) + { + var writeSerializedSettings = function(hostCallArgs, onCalling, onReceiving) + { + return OSF.DDA.ClientSettingsManager.write(hostCallArgs[OSF.DDA.SettingsManager.SerializedSettings],hostCallArgs[Microsoft.Office.WebExtension.Parameters.OverwriteIfStale],onCalling,onReceiving) + }; + delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(writeSerializedSettings) + } + return delegateMethods }; var OfficeExt; (function(OfficeExt) { - var RichClientHostController=function() - { - function RichClientHostController(){} - RichClientHostController.prototype.execute=function(id, params, callback) - { - window.external.Execute(id,params,callback) - }; - RichClientHostController.prototype.registerEvent=function(id, targetId, handler, callback) - { - window.external.RegisterEvent(id,targetId,handler,callback) - }; - RichClientHostController.prototype.unregisterEvent=function(id, targetId, callback) - { - window.external.UnregisterEvent(id,targetId,callback) - }; - return RichClientHostController - }(); - OfficeExt.RichClientHostController=RichClientHostController -})(OfficeExt || (OfficeExt={})); + var RichClientHostController = function() + { + function RichClientHostController(){} + RichClientHostController.prototype.execute = function(id, params, callback) + { + window.external.Execute(id,params,callback) + }; + RichClientHostController.prototype.registerEvent = function(id, targetId, handler, callback) + { + window.external.RegisterEvent(id,targetId,handler,callback) + }; + RichClientHostController.prototype.unregisterEvent = function(id, targetId, callback) + { + window.external.UnregisterEvent(id,targetId,callback) + }; + return RichClientHostController + }(); + OfficeExt.RichClientHostController = RichClientHostController +})(OfficeExt || (OfficeExt = {})); var OfficeExt; (function(OfficeExt) { - var Win32RichClientHostController=function(_super) - { - __extends(Win32RichClientHostController,_super); - function Win32RichClientHostController() - { - _super.apply(this,arguments) - } - Win32RichClientHostController.prototype.messageParent=function(params) - { - var message=params[Microsoft.Office.WebExtension.Parameters.MessageToParent]; - window.external.MessageParent(message) - }; - Win32RichClientHostController.prototype.openDialog=function(id, targetId, handler, callback) - { - this.registerEvent(id,targetId,handler,callback) - }; - Win32RichClientHostController.prototype.closeDialog=function(id, targetId, callback) - { - this.unregisterEvent(id,targetId,callback) - }; - return Win32RichClientHostController - }(OfficeExt.RichClientHostController); - OfficeExt.Win32RichClientHostController=Win32RichClientHostController -})(OfficeExt || (OfficeExt={})); -OSF.ClientHostController=new OfficeExt.Win32RichClientHostController; + var Win32RichClientHostController = function(_super) + { + __extends(Win32RichClientHostController,_super); + function Win32RichClientHostController() + { + _super.apply(this,arguments) + } + Win32RichClientHostController.prototype.messageParent = function(params) + { + var message = params[Microsoft.Office.WebExtension.Parameters.MessageToParent]; + window.external.MessageParent(message) + }; + Win32RichClientHostController.prototype.openDialog = function(id, targetId, handler, callback) + { + this.registerEvent(id,targetId,handler,callback) + }; + Win32RichClientHostController.prototype.closeDialog = function(id, targetId, callback) + { + this.unregisterEvent(id,targetId,callback) + }; + Win32RichClientHostController.prototype.sendMessage = function(params){}; + return Win32RichClientHostController + }(OfficeExt.RichClientHostController); + OfficeExt.Win32RichClientHostController = Win32RichClientHostController +})(OfficeExt || (OfficeExt = {})); +OSF.ClientHostController = new OfficeExt.Win32RichClientHostController; var OfficeExt; (function(OfficeExt) { - var OfficeTheme; - (function(OfficeTheme) - { - var OfficeThemeManager=function() - { - function OfficeThemeManager() - { - this._osfOfficeTheme=null; - this._osfOfficeThemeTimeStamp=null - } - OfficeThemeManager.prototype.getOfficeTheme=function() - { - if(OSF.DDA._OsfControlContext) - { - if(this._osfOfficeTheme && this._osfOfficeThemeTimeStamp && (new Date).getTime() - this._osfOfficeThemeTimeStamp < OfficeThemeManager._osfOfficeThemeCacheValidPeriod) - { - if(OSF.AppTelemetry) - OSF.AppTelemetry.onPropertyDone("GetOfficeThemeInfo",0) - } - else - { - var startTime=(new Date).getTime(); - var osfOfficeTheme=OSF.DDA._OsfControlContext.GetOfficeThemeInfo(); - var endTime=(new Date).getTime(); - if(OSF.AppTelemetry) - OSF.AppTelemetry.onPropertyDone("GetOfficeThemeInfo",Math.abs(endTime - startTime)); - this._osfOfficeTheme=JSON.parse(osfOfficeTheme); - for(var color in this._osfOfficeTheme) - this._osfOfficeTheme[color]=OSF.OUtil.convertIntToCssHexColor(this._osfOfficeTheme[color]); - this._osfOfficeThemeTimeStamp=endTime - } - return this._osfOfficeTheme - } - }; - OfficeThemeManager.instance=function() - { - if(OfficeThemeManager._instance==null) - OfficeThemeManager._instance=new OfficeThemeManager; - return OfficeThemeManager._instance - }; - OfficeThemeManager._osfOfficeThemeCacheValidPeriod=5e3; - OfficeThemeManager._instance=null; - return OfficeThemeManager - }(); - OfficeTheme.OfficeThemeManager=OfficeThemeManager; - OSF.OUtil.setNamespace("OfficeTheme",OSF.DDA); - OSF.DDA.OfficeTheme.getOfficeTheme=OfficeExt.OfficeTheme.OfficeThemeManager.instance().getOfficeTheme - })(OfficeTheme=OfficeExt.OfficeTheme || (OfficeExt.OfficeTheme={})) -})(OfficeExt || (OfficeExt={})); -OSF.DDA.ClientSettingsManager={ - getSettingsExecuteMethod: function OSF_DDA_ClientSettingsManager$getSettingsExecuteMethod(hostDelegateMethod) - { - return function(args) - { - var status, - response; - try - { - response=hostDelegateMethod(args.hostCallArgs,args.onCalling,args.onReceiving); - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess - } - catch(ex) - { - status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; - response={ - name: Strings.OfficeOM.L_InternalError, - message: ex - } - } - if(args.onComplete) - args.onComplete(status,response) - } - }, - read: function OSF_DDA_ClientSettingsManager$read(onCalling, onReceiving) - { - var keys=[]; - var values=[]; - if(onCalling) - onCalling(); - OSF.DDA._OsfControlContext.GetSettings().Read(keys,values); - if(onReceiving) - onReceiving(); - var serializedSettings={}; - for(var index=0; index < keys.length; index++) - serializedSettings[keys[index]]=values[index]; - return serializedSettings - }, - write: function OSF_DDA_ClientSettingsManager$write(serializedSettings, overwriteIfStale, onCalling, onReceiving) - { - var keys=[]; - var values=[]; - for(var key in serializedSettings) - { - keys.push(key); - values.push(serializedSettings[key]) - } - if(onCalling) - onCalling(); - OSF.DDA._OsfControlContext.GetSettings().Write(keys,values); - if(onReceiving) - onReceiving() - } + var OfficeTheme; + (function(OfficeTheme) + { + var OfficeThemeManager = function() + { + function OfficeThemeManager() + { + this._osfOfficeTheme = null; + this._osfOfficeThemeTimeStamp = null + } + OfficeThemeManager.prototype.getOfficeTheme = function() + { + if(OSF.DDA._OsfControlContext) + { + if(this._osfOfficeTheme && this._osfOfficeThemeTimeStamp && (new Date).getTime() - this._osfOfficeThemeTimeStamp < OfficeThemeManager._osfOfficeThemeCacheValidPeriod) + { + if(OSF.AppTelemetry) + OSF.AppTelemetry.onPropertyDone("GetOfficeThemeInfo",0) + } + else + { + var startTime = (new Date).getTime(); + var osfOfficeTheme = OSF.DDA._OsfControlContext.GetOfficeThemeInfo(); + var endTime = (new Date).getTime(); + if(OSF.AppTelemetry) + OSF.AppTelemetry.onPropertyDone("GetOfficeThemeInfo",Math.abs(endTime - startTime)); + this._osfOfficeTheme = JSON.parse(osfOfficeTheme); + for(var color in this._osfOfficeTheme) + this._osfOfficeTheme[color] = OSF.OUtil.convertIntToCssHexColor(this._osfOfficeTheme[color]); + this._osfOfficeThemeTimeStamp = endTime + } + return this._osfOfficeTheme + } + }; + OfficeThemeManager.instance = function() + { + if(OfficeThemeManager._instance == null) + OfficeThemeManager._instance = new OfficeThemeManager; + return OfficeThemeManager._instance + }; + OfficeThemeManager._osfOfficeThemeCacheValidPeriod = 5e3; + OfficeThemeManager._instance = null; + return OfficeThemeManager + }(); + OfficeTheme.OfficeThemeManager = OfficeThemeManager; + OSF.OUtil.setNamespace("OfficeTheme",OSF.DDA); + OSF.DDA.OfficeTheme.getOfficeTheme = OfficeExt.OfficeTheme.OfficeThemeManager.instance().getOfficeTheme + })(OfficeTheme = OfficeExt.OfficeTheme || (OfficeExt.OfficeTheme = {})) +})(OfficeExt || (OfficeExt = {})); +OSF.DDA.ClientSettingsManager = { + getSettingsExecuteMethod: function OSF_DDA_ClientSettingsManager$getSettingsExecuteMethod(hostDelegateMethod) + { + return function(args) + { + var status, + response; + try + { + response = hostDelegateMethod(args.hostCallArgs,args.onCalling,args.onReceiving); + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess + } + catch(ex) + { + status = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; + response = { + name: Strings.OfficeOM.L_InternalError, + message: ex + } + } + if(args.onComplete) + args.onComplete(status,response) + } + }, + read: function OSF_DDA_ClientSettingsManager$read(onCalling, onReceiving) + { + var keys = []; + var values = []; + if(onCalling) + onCalling(); + OSF.DDA._OsfControlContext.GetSettings().Read(keys,values); + if(onReceiving) + onReceiving(); + var serializedSettings = {}; + for(var index = 0; index < keys.length; index++) + serializedSettings[keys[index]] = values[index]; + return serializedSettings + }, + write: function OSF_DDA_ClientSettingsManager$write(serializedSettings, overwriteIfStale, onCalling, onReceiving) + { + var keys = []; + var values = []; + for(var key in serializedSettings) + { + keys.push(key); + values.push(serializedSettings[key]) + } + if(onCalling) + onCalling(); + OSF.DDA._OsfControlContext.GetSettings().Write(keys,values); + if(onReceiving) + onReceiving() + } }; -OSF.InitializationHelper.prototype.initializeSettings=function OSF_InitializationHelper$initializeSettings(refreshSupported) +OSF.InitializationHelper.prototype.initializeSettings = function OSF_InitializationHelper$initializeSettings(refreshSupported) { - var serializedSettings=OSF.DDA.ClientSettingsManager.read(); - var settings=this.deserializeSettings(serializedSettings,refreshSupported); - return settings + var serializedSettings = OSF.DDA.ClientSettingsManager.read(); + var settings = this.deserializeSettings(serializedSettings,refreshSupported); + return settings }; -OSF.InitializationHelper.prototype.getAppContext=function OSF_InitializationHelper$getAppContext(wnd, gotAppContext) +OSF.InitializationHelper.prototype.getAppContext = function OSF_InitializationHelper$getAppContext(wnd, gotAppContext) { - var returnedContext; - var context; - var warningText="Warning: Office.js is loaded outside of Office client"; - try - { - if(window.external && typeof window.external.GetContext !=="undefined") - context=OSF.DDA._OsfControlContext=window.external.GetContext(); - else - { - OsfMsAjaxFactory.msAjaxDebug.trace(warningText); - return - } - } - catch(e) - { - OsfMsAjaxFactory.msAjaxDebug.trace(warningText); - return - } - var appType=context.GetAppType(); - var id=context.GetSolutionRef(); - var version=context.GetAppVersionMajor(); - var minorVersion=context.GetAppVersionMinor(); - var UILocale=context.GetAppUILocale(); - var dataLocale=context.GetAppDataLocale(); - var docUrl=context.GetDocUrl(); - var clientMode=context.GetAppCapabilities(); - var reason=context.GetActivationMode(); - var osfControlType=context.GetControlIntegrationLevel(); - var settings=[]; - var eToken; - try - { - eToken=context.GetSolutionToken() - } - catch(ex){} - var correlationId; - if(typeof context.GetCorrelationId !=="undefined") - correlationId=context.GetCorrelationId(); - var appInstanceId; - if(typeof context.GetInstanceId !=="undefined") - appInstanceId=context.GetInstanceId(); - var touchEnabled; - if(typeof context.GetTouchEnabled !=="undefined") - touchEnabled=context.GetTouchEnabled(); - var commerceAllowed; - if(typeof context.GetCommerceAllowed !=="undefined") - commerceAllowed=context.GetCommerceAllowed(); - var requirementMatrix; - if(typeof context.GetSupportedMatrix !=="undefined") - requirementMatrix=context.GetSupportedMatrix(); - var hostCustomMessage; - if(typeof context.GetHostCustomMessage !=="undefined") - hostCustomMessage=context.GetHostCustomMessage(); - var hostFullVersion; - if(typeof context.GetHostFullVersion !=="undefined") - hostFullVersion=context.GetHostFullVersion(); - var dialogRequirementMatrix; - if(typeof context.GetDialogRequirementMatrix !="undefined") - dialogRequirementMatrix=context.GetDialogRequirementMatrix(); - eToken=eToken ? eToken.toString() : ""; - returnedContext=new OSF.OfficeAppContext(id,appType,version,UILocale,dataLocale,docUrl,clientMode,settings,reason,osfControlType,eToken,correlationId,appInstanceId,touchEnabled,commerceAllowed,minorVersion,requirementMatrix,hostCustomMessage,hostFullVersion,undefined,undefined,undefined,dialogRequirementMatrix); - if(OSF.AppTelemetry) - OSF.AppTelemetry.initialize(returnedContext); - gotAppContext(returnedContext) + var returnedContext; + var context; + var warningText = "Warning: Office.js is loaded outside of Office client"; + try + { + if(window.external && typeof window.external.GetContext !== "undefined") + context = OSF.DDA._OsfControlContext = window.external.GetContext(); + else + { + OsfMsAjaxFactory.msAjaxDebug.trace(warningText); + return + } + } + catch(e) + { + OsfMsAjaxFactory.msAjaxDebug.trace(warningText); + return + } + var appType = context.GetAppType(); + var id = context.GetSolutionRef(); + var version = context.GetAppVersionMajor(); + var minorVersion = context.GetAppVersionMinor(); + var UILocale = context.GetAppUILocale(); + var dataLocale = context.GetAppDataLocale(); + var docUrl = context.GetDocUrl(); + var clientMode = context.GetAppCapabilities(); + var reason = context.GetActivationMode(); + var osfControlType = context.GetControlIntegrationLevel(); + var settings = []; + var eToken; + try + { + eToken = context.GetSolutionToken() + } + catch(ex){} + var correlationId; + if(typeof context.GetCorrelationId !== "undefined") + correlationId = context.GetCorrelationId(); + var appInstanceId; + if(typeof context.GetInstanceId !== "undefined") + appInstanceId = context.GetInstanceId(); + var touchEnabled; + if(typeof context.GetTouchEnabled !== "undefined") + touchEnabled = context.GetTouchEnabled(); + var commerceAllowed; + if(typeof context.GetCommerceAllowed !== "undefined") + commerceAllowed = context.GetCommerceAllowed(); + var requirementMatrix; + if(typeof context.GetSupportedMatrix !== "undefined") + requirementMatrix = context.GetSupportedMatrix(); + var hostCustomMessage; + if(typeof context.GetHostCustomMessage !== "undefined") + hostCustomMessage = context.GetHostCustomMessage(); + var hostFullVersion; + if(typeof context.GetHostFullVersion !== "undefined") + hostFullVersion = context.GetHostFullVersion(); + var dialogRequirementMatrix; + if(typeof context.GetDialogRequirementMatrix != "undefined") + dialogRequirementMatrix = context.GetDialogRequirementMatrix(); + eToken = eToken ? eToken.toString() : ""; + returnedContext = new OSF.OfficeAppContext(id,appType,version,UILocale,dataLocale,docUrl,clientMode,settings,reason,osfControlType,eToken,correlationId,appInstanceId,touchEnabled,commerceAllowed,minorVersion,requirementMatrix,hostCustomMessage,hostFullVersion,undefined,undefined,undefined,dialogRequirementMatrix); + if(OSF.AppTelemetry) + OSF.AppTelemetry.initialize(returnedContext); + gotAppContext(returnedContext) }; (function() { - var checkScriptOverride=function OSF$checkScriptOverride() - { - var postScriptOverrideCheckAction=function OSF$postScriptOverrideCheckAction(customizedScriptPath) - { - if(customizedScriptPath) - OSF.OUtil.loadScript(customizedScriptPath,function() - { - OsfMsAjaxFactory.msAjaxDebug.trace("loaded customized script:"+customizedScriptPath) - }) - }; - var conversationID, - webAppUrl, - items; - var clientEndPoint=null; - var xdmInfoValue=OSF.OUtil.parseXdmInfo(); - if(xdmInfoValue) - { - items=OSF.OUtil.getInfoItems(xdmInfoValue); - if(items && items.length >=3) - { - conversationID=items[0]; - webAppUrl=items[2]; - var serializerVersion=OSF.OUtil.parseSerializerVersionWithGivenFragment(false,OSF._OfficeAppFactory.getWindowLocationHash()); - if(isNaN(serializerVersion) && OSF._OfficeAppFactory.getWindowName) - serializerVersion=OSF.OUtil.parseSerializerVersionFromWindowName(false,OSF._OfficeAppFactory.getWindowName()); - clientEndPoint=Microsoft.Office.Common.XdmCommunicationManager.connect(conversationID,window.parent,webAppUrl,serializerVersion) - } - } - var customizedScriptPath=null; - if(!clientEndPoint) - { - try - { - if(window.external && typeof window.external.getCustomizedScriptPath !=="undefined") - customizedScriptPath=window.external.getCustomizedScriptPath() - } - catch(ex) - { - OsfMsAjaxFactory.msAjaxDebug.trace("no script override through window.external.") - } - postScriptOverrideCheckAction(customizedScriptPath) - } - else - try - { - clientEndPoint.invoke("getCustomizedScriptPathAsync",function OSF$getCustomizedScriptPathAsyncCallback(errorCode, scriptPath) - { - postScriptOverrideCheckAction(errorCode===0 ? scriptPath : null) - },{__timeout__: 1e3}) - } - catch(ex) - { - OsfMsAjaxFactory.msAjaxDebug.trace("no script override through cross frame communication.") - } - }; - var requiresMsAjax=true; - if(requiresMsAjax && !OsfMsAjaxFactory.isMsAjaxLoaded()) - if(!(OSF._OfficeAppFactory && OSF._OfficeAppFactory && OSF._OfficeAppFactory.getLoadScriptHelper && OSF._OfficeAppFactory.getLoadScriptHelper().isScriptLoading(OSF.ConstantNames.MicrosoftAjaxId))) - OsfMsAjaxFactory.loadMsAjaxFull(function OSF$loadMSAjaxCallback() - { - if(OsfMsAjaxFactory.isMsAjaxLoaded()) - checkScriptOverride(); - else - throw"Not able to load MicrosoftAjax.js."; - }); - else - OSF._OfficeAppFactory.getLoadScriptHelper().waitForScripts([OSF.ConstantNames.MicrosoftAjaxId],checkScriptOverride); - else - checkScriptOverride() + var checkScriptOverride = function OSF$checkScriptOverride() + { + var postScriptOverrideCheckAction = function OSF$postScriptOverrideCheckAction(customizedScriptPath) + { + if(customizedScriptPath) + OSF.OUtil.loadScript(customizedScriptPath,function() + { + OsfMsAjaxFactory.msAjaxDebug.trace("loaded customized script:" + customizedScriptPath) + }) + }; + var conversationID, + webAppUrl, + items; + var clientEndPoint = null; + var xdmInfoValue = OSF.OUtil.parseXdmInfo(); + if(xdmInfoValue) + { + items = OSF.OUtil.getInfoItems(xdmInfoValue); + if(items && items.length >= 3) + { + conversationID = items[0]; + webAppUrl = items[2]; + var serializerVersion = OSF.OUtil.parseSerializerVersionWithGivenFragment(false,OSF._OfficeAppFactory.getWindowLocationHash()); + if(isNaN(serializerVersion) && OSF._OfficeAppFactory.getWindowName) + serializerVersion = OSF.OUtil.parseSerializerVersionFromWindowName(false,OSF._OfficeAppFactory.getWindowName()); + clientEndPoint = Microsoft.Office.Common.XdmCommunicationManager.connect(conversationID,window.parent,webAppUrl,serializerVersion) + } + } + var customizedScriptPath = null; + if(!clientEndPoint) + { + try + { + if(window.external && typeof window.external.getCustomizedScriptPath !== "undefined") + customizedScriptPath = window.external.getCustomizedScriptPath() + } + catch(ex) + { + OsfMsAjaxFactory.msAjaxDebug.trace("no script override through window.external.") + } + postScriptOverrideCheckAction(customizedScriptPath) + } + else + try + { + clientEndPoint.invoke("getCustomizedScriptPathAsync",function OSF$getCustomizedScriptPathAsyncCallback(errorCode, scriptPath) + { + postScriptOverrideCheckAction(errorCode === 0 ? scriptPath : null) + },{__timeout__: 1e3}) + } + catch(ex) + { + OsfMsAjaxFactory.msAjaxDebug.trace("no script override through cross frame communication.") + } + }; + var requiresMsAjax = true; + if(requiresMsAjax && !OsfMsAjaxFactory.isMsAjaxLoaded()) + if(!(OSF._OfficeAppFactory && OSF._OfficeAppFactory && OSF._OfficeAppFactory.getLoadScriptHelper && OSF._OfficeAppFactory.getLoadScriptHelper().isScriptLoading(OSF.ConstantNames.MicrosoftAjaxId))) + OsfMsAjaxFactory.loadMsAjaxFull(function OSF$loadMSAjaxCallback() + { + if(OsfMsAjaxFactory.isMsAjaxLoaded()) + checkScriptOverride(); + else + throw"Not able to load MicrosoftAjax.js."; + }); + else + OSF._OfficeAppFactory.getLoadScriptHelper().waitForScripts([OSF.ConstantNames.MicrosoftAjaxId],checkScriptOverride); + else + checkScriptOverride() })(); -Microsoft.Office.WebExtension.EventType={}; -OSF.EventDispatch=function OSF_EventDispatch(eventTypes) +Microsoft.Office.WebExtension.EventType = {}; +OSF.EventDispatch = function OSF_EventDispatch(eventTypes) { - this._eventHandlers={}; - this._queuedEventsArgs={}; - for(var entry in eventTypes) - { - var eventType=eventTypes[entry]; - this._eventHandlers[eventType]=[]; - this._queuedEventsArgs[eventType]=[] - } + this._eventHandlers = {}; + this._objectEventHandlers = {}; + this._queuedEventsArgs = {}; + for(var entry in eventTypes) + { + var eventType = eventTypes[entry]; + var isObjectEvent = eventType == "objectDeleted" || eventType == "objectSelectionChanged" || eventType == "objectDataChanged" || eventType == "contentControlAdded"; + if(!isObjectEvent) + this._eventHandlers[eventType] = []; + else + this._objectEventHandlers[eventType] = {}; + this._queuedEventsArgs[eventType] = [] + } }; -OSF.EventDispatch.prototype={ - getSupportedEvents: function OSF_EventDispatch$getSupportedEvents() - { - var events=[]; - for(var eventName in this._eventHandlers) - events.push(eventName); - return events - }, - supportsEvent: function OSF_EventDispatch$supportsEvent(event) - { - var isSupported=false; - for(var eventName in this._eventHandlers) - if(event==eventName) - { - isSupported=true; - break - } - return isSupported - }, - hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) - { - var handlers=this._eventHandlers[eventType]; - if(handlers && handlers.length > 0) - for(var h in handlers) - if(handlers[h]===handler) - return true; - return false - }, - addEventHandler: function OSF_EventDispatch$addEventHandler(eventType, handler) - { - if(typeof handler !="function") - return false; - var handlers=this._eventHandlers[eventType]; - if(handlers && !this.hasEventHandler(eventType,handler)) - { - handlers.push(handler); - return true - } - else - return false - }, - addEventHandlerAndFireQueuedEvent: function OSF_EventDispatch$addEventHandlerAndFireQueuedEvent(eventType, handler) - { - var handlers=this._eventHandlers[eventType]; - var isFirstHandler=handlers.length==0; - var succeed=this.addEventHandler(eventType,handler); - if(isFirstHandler && succeed) - this.fireQueuedEvent(eventType); - return succeed - }, - removeEventHandler: function OSF_EventDispatch$removeEventHandler(eventType, handler) - { - var handlers=this._eventHandlers[eventType]; - if(handlers && handlers.length > 0) - for(var index=0; index < handlers.length; index++) - if(handlers[index]===handler) - { - handlers.splice(index,1); - return true - } - return false - }, - clearEventHandlers: function OSF_EventDispatch$clearEventHandlers(eventType) - { - if(typeof this._eventHandlers[eventType] !="undefined" && this._eventHandlers[eventType].length > 0) - { - this._eventHandlers[eventType]=[]; - return true - } - return false - }, - getEventHandlerCount: function OSF_EventDispatch$getEventHandlerCount(eventType) - { - return this._eventHandlers[eventType] !=undefined ? this._eventHandlers[eventType].length : -1 - }, - fireEvent: function OSF_EventDispatch$fireEvent(eventArgs) - { - if(eventArgs.type==undefined) - return false; - var eventType=eventArgs.type; - if(eventType && this._eventHandlers[eventType]) - { - var eventHandlers=this._eventHandlers[eventType]; - for(var handler in eventHandlers) - eventHandlers[handler](eventArgs); - return true - } - else - return false - }, - fireOrQueueEvent: function OSF_EventDispatch$fireOrQueueEvent(eventArgs) - { - var eventType=eventArgs.type; - if(eventType && this._eventHandlers[eventType]) - { - var eventHandlers=this._eventHandlers[eventType]; - var queuedEvents=this._queuedEventsArgs[eventType]; - if(eventHandlers.length==0) - queuedEvents.push(eventArgs); - else - this.fireEvent(eventArgs); - return true - } - else - return false - }, - fireQueuedEvent: function OSF_EventDispatch$queueEvent(eventType) - { - if(eventType && this._eventHandlers[eventType]) - { - var eventHandlers=this._eventHandlers[eventType]; - var queuedEvents=this._queuedEventsArgs[eventType]; - if(eventHandlers.length > 0) - { - var eventHandler=eventHandlers[0]; - while(queuedEvents.length > 0) - { - var eventArgs=queuedEvents.shift(); - eventHandler(eventArgs) - } - return true - } - } - return false - } +OSF.EventDispatch.prototype = { + getSupportedEvents: function OSF_EventDispatch$getSupportedEvents() + { + var events = []; + for(var eventName in this._eventHandlers) + events.push(eventName); + for(var eventName in this._objectEventHandlers) + events.push(eventName); + return events + }, + supportsEvent: function OSF_EventDispatch$supportsEvent(event) + { + for(var eventName in this._eventHandlers) + if(event == eventName) + return true; + for(var eventName in this._objectEventHandlers) + if(event == eventName) + return true; + return false + }, + hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) + { + var handlers = this._eventHandlers[eventType]; + if(handlers && handlers.length > 0) + for(var h in handlers) + if(handlers[h] === handler) + return true; + return false + }, + hasObjectEventHandler: function OSF_EventDispatch$hasObjectEventHandler(eventType, objectId, handler) + { + var handlers = this._objectEventHandlers[eventType]; + if(handlers != null) + { + var _handlers = handlers[objectId]; + for(var i = 0; _handlers != null && i < _handlers.length; i++) + if(_handlers[i] === handler) + return true + } + return false + }, + addEventHandler: function OSF_EventDispatch$addEventHandler(eventType, handler) + { + if(typeof handler != "function") + return false; + var handlers = this._eventHandlers[eventType]; + if(handlers && !this.hasEventHandler(eventType,handler)) + { + handlers.push(handler); + return true + } + else + return false + }, + addObjectEventHandler: function OSF_EventDispatch$addObjectEventHandler(eventType, objectId, handler) + { + if(typeof handler != "function") + return false; + var handlers = this._objectEventHandlers[eventType]; + if(handlers && !this.hasObjectEventHandler(eventType,objectId,handler)) + { + if(handlers[objectId] == null) + handlers[objectId] = []; + handlers[objectId].push(handler); + return true + } + return false + }, + addEventHandlerAndFireQueuedEvent: function OSF_EventDispatch$addEventHandlerAndFireQueuedEvent(eventType, handler) + { + var handlers = this._eventHandlers[eventType]; + var isFirstHandler = handlers.length == 0; + var succeed = this.addEventHandler(eventType,handler); + if(isFirstHandler && succeed) + this.fireQueuedEvent(eventType); + return succeed + }, + removeEventHandler: function OSF_EventDispatch$removeEventHandler(eventType, handler) + { + var handlers = this._eventHandlers[eventType]; + if(handlers && handlers.length > 0) + for(var index = 0; index < handlers.length; index++) + if(handlers[index] === handler) + { + handlers.splice(index,1); + return true + } + return false + }, + removeObjectEventHandler: function OSF_EventDispatch$removeObjectEventHandler(eventType, objectId, handler) + { + var handlers = this._objectEventHandlers[eventType]; + if(handlers != null) + { + var _handlers = handlers[objectId]; + for(var i = 0; _handlers != null && i < _handlers.length; i++) + if(_handlers[i] === handler) + { + _handlers.splice(i,1); + return true + } + } + return false + }, + clearEventHandlers: function OSF_EventDispatch$clearEventHandlers(eventType) + { + if(typeof this._eventHandlers[eventType] != "undefined" && this._eventHandlers[eventType].length > 0) + { + this._eventHandlers[eventType] = []; + return true + } + return false + }, + clearObjectEventHandlers: function OSF_EventDispatch$clearObjectEventHandlers(eventType, objectId) + { + if(this._objectEventHandlers[eventType] != null && this._objectEventHandlers[eventType][objectId] != null) + { + this._objectEventHandlers[eventType][objectId] = []; + return true + } + return false + }, + getEventHandlerCount: function OSF_EventDispatch$getEventHandlerCount(eventType) + { + return this._eventHandlers[eventType] != undefined ? this._eventHandlers[eventType].length : -1 + }, + getObjectEventHandlerCount: function OSF_EventDispatch$getObjectEventHandlerCount(eventType, objectId) + { + if(this._objectEventHandlers[eventType] == null || this._objectEventHandlers[eventType][objectId] == null) + return 0; + return this._objectEventHandlers[eventType][objectId].length + }, + fireEvent: function OSF_EventDispatch$fireEvent(eventArgs) + { + if(eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if(eventType && this._eventHandlers[eventType]) + { + var eventHandlers = this._eventHandlers[eventType]; + for(var handler in eventHandlers) + eventHandlers[handler](eventArgs); + return true + } + else + return false + }, + fireObjectEvent: function OSF_EventDispatch$fireObjectEvent(objectId, eventArgs) + { + if(eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if(eventType && this._objectEventHandlers[eventType]) + { + var eventHandlers = this._objectEventHandlers[eventType]; + var _handlers = eventHandlers[objectId]; + if(_handlers != null) + { + for(var i = 0; i < _handlers.length; i++) + _handlers[i](eventArgs); + return true + } + } + return false + }, + fireOrQueueEvent: function OSF_EventDispatch$fireOrQueueEvent(eventArgs) + { + var eventType = eventArgs.type; + if(eventType && this._eventHandlers[eventType]) + { + var eventHandlers = this._eventHandlers[eventType]; + var queuedEvents = this._queuedEventsArgs[eventType]; + if(eventHandlers.length == 0) + queuedEvents.push(eventArgs); + else + this.fireEvent(eventArgs); + return true + } + else + return false + }, + fireQueuedEvent: function OSF_EventDispatch$queueEvent(eventType) + { + if(eventType && this._eventHandlers[eventType]) + { + var eventHandlers = this._eventHandlers[eventType]; + var queuedEvents = this._queuedEventsArgs[eventType]; + if(eventHandlers.length > 0) + { + var eventHandler = eventHandlers[0]; + while(queuedEvents.length > 0) + { + var eventArgs = queuedEvents.shift(); + eventHandler(eventArgs) + } + return true + } + } + return false + }, + clearQueuedEvent: function OSF_EventDispatch$clearQueuedEvent(eventType) + { + if(eventType && this._eventHandlers[eventType]) + { + var queuedEvents = this._queuedEventsArgs[eventType]; + if(queuedEvents) + this._queuedEventsArgs[eventType] = [] + } + } }; -OSF.DDA.OMFactory=OSF.DDA.OMFactory || {}; -OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEventArgs(eventType, target, eventProperties) +OSF.DDA.OMFactory = OSF.DDA.OMFactory || {}; +OSF.DDA.OMFactory.manufactureEventArgs = function OSF_DDA_OMFactory$manufactureEventArgs(eventType, target, eventProperties) { - var args; - switch(eventType) - { - case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged: - args=new OSF.DDA.DocumentSelectionChangedEventArgs(target); - break; - case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged: - args=new OSF.DDA.BindingSelectionChangedEventArgs(this.manufactureBinding(eventProperties,target.document),eventProperties[OSF.DDA.PropertyDescriptors.Subset]); - break; - case Microsoft.Office.WebExtension.EventType.BindingDataChanged: - args=new OSF.DDA.BindingDataChangedEventArgs(this.manufactureBinding(eventProperties,target.document)); - break; - case Microsoft.Office.WebExtension.EventType.SettingsChanged: - args=new OSF.DDA.SettingsChangedEventArgs(target); - break; - case Microsoft.Office.WebExtension.EventType.ActiveViewChanged: - args=new OSF.DDA.ActiveViewChangedEventArgs(eventProperties); - break; - case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged: - args=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(eventProperties); - break; - case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged: - args=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(eventProperties); - break; - case Microsoft.Office.WebExtension.EventType.AppCommandInvoked: - args=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(eventProperties); - break; - case Microsoft.Office.WebExtension.EventType.DataNodeInserted: - args=new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]),eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); - break; - case Microsoft.Office.WebExtension.EventType.DataNodeReplaced: - args=new OSF.DDA.NodeReplacedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]),eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); - break; - case Microsoft.Office.WebExtension.EventType.DataNodeDeleted: - args=new OSF.DDA.NodeDeletedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); - break; - case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged: - args=new OSF.DDA.TaskSelectionChangedEventArgs(target); - break; - case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged: - args=new OSF.DDA.ResourceSelectionChangedEventArgs(target); - break; - case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged: - args=new OSF.DDA.ViewSelectionChangedEventArgs(target); - break; - case Microsoft.Office.WebExtension.EventType.DialogMessageReceived: - args=new OSF.DDA.DialogEventArgs(eventProperties); - break; - case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived: - args=new OSF.DDA.DialogParentEventArgs(eventProperties); - break; - case Microsoft.Office.WebExtension.EventType.ItemChanged: - if(OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlookwebapp") - { - args=new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); - target.initialize(args["initialData"]); - target.setCurrentItemNumber(args["itemNumber"].itemNumber) - } - else - throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,eventType)); - break; - default: - throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,eventType)); - } - return args + var args; + switch(eventType) + { + case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged: + args = new OSF.DDA.DocumentSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged: + args = new OSF.DDA.BindingSelectionChangedEventArgs(this.manufactureBinding(eventProperties,target.document),eventProperties[OSF.DDA.PropertyDescriptors.Subset]); + break; + case Microsoft.Office.WebExtension.EventType.BindingDataChanged: + args = new OSF.DDA.BindingDataChangedEventArgs(this.manufactureBinding(eventProperties,target.document)); + break; + case Microsoft.Office.WebExtension.EventType.SettingsChanged: + args = new OSF.DDA.SettingsChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ActiveViewChanged: + args = new OSF.DDA.ActiveViewChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged: + args = new OSF.DDA.Theming.OfficeThemeChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged: + args = new OSF.DDA.Theming.DocumentThemeChangedEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.AppCommandInvoked: + args = OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.ObjectDeleted: + case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged: + case Microsoft.Office.WebExtension.EventType.ObjectDataChanged: + case Microsoft.Office.WebExtension.EventType.ContentControlAdded: + args = new OSF.DDA.ObjectEventArgs(eventType,eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); + break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args = new OSF.DDA.RichApiMessageEventArgs(eventType,eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeInserted: + args = new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]),eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeReplaced: + args = new OSF.DDA.NodeReplacedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]),eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.DataNodeDeleted: + args = new OSF.DDA.NodeDeletedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); + break; + case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged: + args = new OSF.DDA.TaskSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged: + args = new OSF.DDA.ResourceSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged: + args = new OSF.DDA.ViewSelectionChangedEventArgs(target); + break; + case Microsoft.Office.WebExtension.EventType.DialogMessageReceived: + args = new OSF.DDA.DialogEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived: + args = new OSF.DDA.DialogParentEventArgs(eventProperties); + break; + case Microsoft.Office.WebExtension.EventType.ItemChanged: + if(OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlookwebapp") + { + args = new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); + target.initialize(args["initialData"]); + target.setCurrentItemNumber(args["itemNumber"].itemNumber) + } + else + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,eventType)); + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if(OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlookwebapp") + args = new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + else + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,eventType)); + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if(OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlookwebapp") + args = new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); + else + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,eventType)); + break; + default: + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,eventType)); + } + return args }; OSF.DDA.AsyncMethodNames.addNames({ - AddHandlerAsync: "addHandlerAsync", - RemoveHandlerAsync: "removeHandlerAsync" + AddHandlerAsync: "addHandlerAsync", + RemoveHandlerAsync: "removeHandlerAsync" }); OSF.DDA.AsyncMethodCalls.define({ - method: OSF.DDA.AsyncMethodNames.AddHandlerAsync, - requiredArguments: [{ - name: Microsoft.Office.WebExtension.Parameters.EventType, - "enum": Microsoft.Office.WebExtension.EventType, - verify: function(eventType, caller, eventDispatch) - { - return eventDispatch.supportsEvent(eventType) - } - },{ - name: Microsoft.Office.WebExtension.Parameters.Handler, - types: ["function"] - }], - supportedOptions: [], - privateStateCallbacks: [] + method: OSF.DDA.AsyncMethodNames.AddHandlerAsync, + requiredArguments: [{ + name: Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + verify: function(eventType, caller, eventDispatch) + { + return eventDispatch.supportsEvent(eventType) + } + },{ + name: Microsoft.Office.WebExtension.Parameters.Handler, + types: ["function"] + }], + supportedOptions: [], + privateStateCallbacks: [] }); OSF.DDA.AsyncMethodCalls.define({ - method: OSF.DDA.AsyncMethodNames.RemoveHandlerAsync, - requiredArguments: [{ - name: Microsoft.Office.WebExtension.Parameters.EventType, - "enum": Microsoft.Office.WebExtension.EventType, - verify: function(eventType, caller, eventDispatch) - { - return eventDispatch.supportsEvent(eventType) - } - }], - supportedOptions: [{ - name: Microsoft.Office.WebExtension.Parameters.Handler, - value: { - types: ["function","object"], - defaultValue: null - } - }], - privateStateCallbacks: [] + method: OSF.DDA.AsyncMethodNames.RemoveHandlerAsync, + requiredArguments: [{ + name: Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + verify: function(eventType, caller, eventDispatch) + { + return eventDispatch.supportsEvent(eventType) + } + }], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Handler, + value: { + types: ["function","object"], + defaultValue: null + } + }], + privateStateCallbacks: [] }); -OSF.DialogShownStatus={ - hasDialogShown: false, - isWindowDialog: false +OSF.DialogShownStatus = { + hasDialogShown: false, + isWindowDialog: false }; OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent: "DialogMessageReceivedEvent"}); OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ - DialogMessageReceived: "dialogMessageReceived", - DialogEventReceived: "dialogEventReceived" + DialogMessageReceived: "dialogMessageReceived", + DialogEventReceived: "dialogEventReceived" }); OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{ - MessageType: "messageType", - MessageContent: "messageContent" + MessageType: "messageType", + MessageContent: "messageContent" }); -OSF.DDA.DialogEventType={}; +OSF.DDA.DialogEventType = {}; OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{ - DialogClosed: "dialogClosed", - NavigationFailed: "naviationFailed" + DialogClosed: "dialogClosed", + NavigationFailed: "naviationFailed" }); OSF.DDA.AsyncMethodNames.addNames({ - DisplayDialogAsync: "displayDialogAsync", - CloseAsync: "close" + DisplayDialogAsync: "displayDialogAsync", + CloseAsync: "close" }); OSF.DDA.SyncMethodNames.addNames({ - MessageParent: "messageParent", - AddMessageHandler: "addEventHandler", - SendMessage: "sendMessage" + MessageParent: "messageParent", + AddMessageHandler: "addEventHandler", + SendMessage: "sendMessage" }); -OSF.DDA.UI.ParentUI=function OSF_DDA_ParentUI() +OSF.DDA.UI.ParentUI = function OSF_DDA_ParentUI() { - var eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]); - var openDialogName=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName; - var target=this; - if(!target[openDialogName]) - OSF.OUtil.defineEnumerableProperty(target,openDialogName,{value: function() - { - var openDialog=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog]; - openDialog(arguments,eventDispatch,target) - }}); - OSF.OUtil.finalizeProperties(this) + var eventDispatch = new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]); + var openDialogName = OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName; + var target = this; + if(!target[openDialogName]) + OSF.OUtil.defineEnumerableProperty(target,openDialogName,{value: function() + { + var openDialog = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog]; + openDialog(arguments,eventDispatch,target) + }}); + OSF.OUtil.finalizeProperties(this) }; -OSF.DDA.UI.ChildUI=function OSF_DDA_ChildUI() +OSF.DDA.UI.ChildUI = function OSF_DDA_ChildUI(isPopupWindow) { - var messageParentName=OSF.DDA.SyncMethodNames.MessageParent.displayName; - var target=this; - if(!target[messageParentName]) - OSF.OUtil.defineEnumerableProperty(target,messageParentName,{value: function() - { - var messageParent=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent]; - return messageParent(arguments,target) - }}); - var addEventHandler=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; - if(!target[addEventHandler] && typeof OSF.DialogParentMessageEventDispatch !="undefined") - OSF.DDA.DispIdHost.addEventSupport(target,OSF.DialogParentMessageEventDispatch); - OSF.OUtil.finalizeProperties(this) + var messageParentName = OSF.DDA.SyncMethodNames.MessageParent.displayName; + var target = this; + if(!target[messageParentName]) + OSF.OUtil.defineEnumerableProperty(target,messageParentName,{value: function() + { + var messageParent = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent]; + return messageParent(arguments,target) + }}); + var addEventHandler = OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; + if(!target[addEventHandler] && typeof OSF.DialogParentMessageEventDispatch != "undefined") + OSF.DDA.DispIdHost.addEventSupport(target,OSF.DialogParentMessageEventDispatch,isPopupWindow); + OSF.OUtil.finalizeProperties(this) }; -OSF.DialogHandler=function OSF_DialogHandler(){}; -OSF.DDA.DialogEventArgs=function OSF_DDA_DialogEventArgs(message) +OSF.DialogHandler = function OSF_DialogHandler(){}; +OSF.DDA.DialogEventArgs = function OSF_DDA_DialogEventArgs(message) { - if(message[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived) - OSF.OUtil.defineEnumerableProperties(this,{ - type: {value: Microsoft.Office.WebExtension.EventType.DialogMessageReceived}, - message: {value: message[OSF.DDA.PropertyDescriptors.MessageContent]} - }); - else - OSF.OUtil.defineEnumerableProperties(this,{ - type: {value: Microsoft.Office.WebExtension.EventType.DialogEventReceived}, - error: {value: message[OSF.DDA.PropertyDescriptors.MessageType]} - }) + if(message[OSF.DDA.PropertyDescriptors.MessageType] == OSF.DialogMessageType.DialogMessageReceived) + OSF.OUtil.defineEnumerableProperties(this,{ + type: {value: Microsoft.Office.WebExtension.EventType.DialogMessageReceived}, + message: {value: message[OSF.DDA.PropertyDescriptors.MessageContent]} + }); + else + OSF.OUtil.defineEnumerableProperties(this,{ + type: {value: Microsoft.Office.WebExtension.EventType.DialogEventReceived}, + error: {value: message[OSF.DDA.PropertyDescriptors.MessageType]} + }) }; -OSF.DDA.DialogParentEventArgs=function OSF_DDA_DialogParentEventArgs(message) +OSF.DDA.DialogParentEventArgs = function OSF_DDA_DialogParentEventArgs(message) { - if(message[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogParentMessageReceived) - OSF.OUtil.defineEnumerableProperties(this,{ - type: {value: Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived}, - message: {value: message[OSF.DDA.PropertyDescriptors.MessageContent]} - }); - else - OSF.OUtil.defineEnumerableProperties(this,{ - type: {value: Microsoft.Office.WebExtension.EventType.DialogParentEventReceived}, - error: {value: message[OSF.DDA.PropertyDescriptors.MessageType]} - }) + OSF.OUtil.defineEnumerableProperties(this,{ + type: {value: Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived}, + message: {value: message[OSF.DDA.PropertyDescriptors.MessageContent]} + }) }; OSF.DDA.AsyncMethodCalls.define({ - method: OSF.DDA.AsyncMethodNames.DisplayDialogAsync, - requiredArguments: [{ - name: Microsoft.Office.WebExtension.Parameters.Url, - types: ["string"] - }], - supportedOptions: [{ - name: Microsoft.Office.WebExtension.Parameters.Width, - value: { - types: ["number"], - defaultValue: 99 - } - },{ - name: Microsoft.Office.WebExtension.Parameters.Height, - value: { - types: ["number"], - defaultValue: 99 - } - },{ - name: Microsoft.Office.WebExtension.Parameters.RequireHTTPs, - value: { - types: ["boolean"], - defaultValue: true - } - },{ - name: Microsoft.Office.WebExtension.Parameters.DisplayInIframe, - value: { - types: ["boolean"], - defaultValue: false - } - }], - privateStateCallbacks: [], - onSucceeded: function(args, caller, callArgs) - { - var targetId=args[Microsoft.Office.WebExtension.Parameters.Id]; - var eventDispatch=args[Microsoft.Office.WebExtension.Parameters.Data]; - var dialog=new OSF.DialogHandler; - var closeDialog=OSF.DDA.AsyncMethodNames.CloseAsync.displayName; - OSF.OUtil.defineEnumerableProperty(dialog,closeDialog,{value: function() - { - var closeDialogfunction=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog]; - closeDialogfunction(arguments,targetId,eventDispatch,dialog) - }}); - var addHandler=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; - OSF.OUtil.defineEnumerableProperty(dialog,addHandler,{value: function() - { - var syncMethodCall=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id]; - var callArgs=syncMethodCall.verifyAndExtractCall(arguments,dialog,eventDispatch); - var eventType=callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; - var handler=callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; - return eventDispatch.addEventHandlerAndFireQueuedEvent(eventType,handler) - }}); - var sendMessage=OSF.DDA.SyncMethodNames.SendMessage.displayName; - OSF.OUtil.defineEnumerableProperty(dialog,sendMessage,{value: function() - { - var execute=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; - return execute(arguments,eventDispatch,dialog) - }}); - return dialog - }, - checkCallArgs: function(callArgs, caller, stateInfo) - { - if(callArgs[Microsoft.Office.WebExtension.Parameters.Width] <=0) - callArgs[Microsoft.Office.WebExtension.Parameters.Width]=1; - if(callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) - callArgs[Microsoft.Office.WebExtension.Parameters.Width]=99; - if(callArgs[Microsoft.Office.WebExtension.Parameters.Height] <=0) - callArgs[Microsoft.Office.WebExtension.Parameters.Height]=1; - if(callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) - callArgs[Microsoft.Office.WebExtension.Parameters.Height]=99; - if(!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) - callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=true; - return callArgs - } + method: OSF.DDA.AsyncMethodNames.DisplayDialogAsync, + requiredArguments: [{ + name: Microsoft.Office.WebExtension.Parameters.Url, + types: ["string"] + }], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.Width, + value: { + types: ["number"], + defaultValue: 99 + } + },{ + name: Microsoft.Office.WebExtension.Parameters.Height, + value: { + types: ["number"], + defaultValue: 99 + } + },{ + name: Microsoft.Office.WebExtension.Parameters.RequireHTTPs, + value: { + types: ["boolean"], + defaultValue: true + } + },{ + name: Microsoft.Office.WebExtension.Parameters.DisplayInIframe, + value: { + types: ["boolean"], + defaultValue: false + } + },{ + name: Microsoft.Office.WebExtension.Parameters.HideTitle, + value: { + types: ["boolean"], + defaultValue: false + } + }], + privateStateCallbacks: [], + onSucceeded: function(args, caller, callArgs) + { + var targetId = args[Microsoft.Office.WebExtension.Parameters.Id]; + var eventDispatch = args[Microsoft.Office.WebExtension.Parameters.Data]; + var dialog = new OSF.DialogHandler; + var closeDialog = OSF.DDA.AsyncMethodNames.CloseAsync.displayName; + OSF.OUtil.defineEnumerableProperty(dialog,closeDialog,{value: function() + { + var closeDialogfunction = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog]; + closeDialogfunction(arguments,targetId,eventDispatch,dialog) + }}); + var addHandler = OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; + OSF.OUtil.defineEnumerableProperty(dialog,addHandler,{value: function() + { + var syncMethodCall = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id]; + var callArgs = syncMethodCall.verifyAndExtractCall(arguments,dialog,eventDispatch); + var eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; + var handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + return eventDispatch.addEventHandlerAndFireQueuedEvent(eventType,handler) + }}); + var sendMessage = OSF.DDA.SyncMethodNames.SendMessage.displayName; + OSF.OUtil.defineEnumerableProperty(dialog,sendMessage,{value: function() + { + var execute = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; + return execute(arguments,eventDispatch,dialog) + }}); + return dialog + }, + checkCallArgs: function(callArgs, caller, stateInfo) + { + if(callArgs[Microsoft.Office.WebExtension.Parameters.Width] <= 0) + callArgs[Microsoft.Office.WebExtension.Parameters.Width] = 1; + if(callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) + callArgs[Microsoft.Office.WebExtension.Parameters.Width] = 99; + if(callArgs[Microsoft.Office.WebExtension.Parameters.Height] <= 0) + callArgs[Microsoft.Office.WebExtension.Parameters.Height] = 1; + if(callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) + callArgs[Microsoft.Office.WebExtension.Parameters.Height] = 99; + if(!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) + callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs] = true; + return callArgs + } }); OSF.DDA.AsyncMethodCalls.define({ - method: OSF.DDA.AsyncMethodNames.CloseAsync, - requiredArguments: [], - supportedOptions: [], - privateStateCallbacks: [] + method: OSF.DDA.AsyncMethodNames.CloseAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [] }); OSF.DDA.SyncMethodCalls.define({ - method: OSF.DDA.SyncMethodNames.MessageParent, - requiredArguments: [{ - name: Microsoft.Office.WebExtension.Parameters.MessageToParent, - types: ["string","number","boolean"] - }], - supportedOptions: [] + method: OSF.DDA.SyncMethodNames.MessageParent, + requiredArguments: [{ + name: Microsoft.Office.WebExtension.Parameters.MessageToParent, + types: ["string","number","boolean"] + }], + supportedOptions: [] }); OSF.DDA.SyncMethodCalls.define({ - method: OSF.DDA.SyncMethodNames.AddMessageHandler, - requiredArguments: [{ - name: Microsoft.Office.WebExtension.Parameters.EventType, - "enum": Microsoft.Office.WebExtension.EventType, - verify: function(eventType, caller, eventDispatch) - { - return eventDispatch.supportsEvent(eventType) - } - },{ - name: Microsoft.Office.WebExtension.Parameters.Handler, - types: ["function"] - }], - supportedOptions: [] + method: OSF.DDA.SyncMethodNames.AddMessageHandler, + requiredArguments: [{ + name: Microsoft.Office.WebExtension.Parameters.EventType, + "enum": Microsoft.Office.WebExtension.EventType, + verify: function(eventType, caller, eventDispatch) + { + return eventDispatch.supportsEvent(eventType) + } + },{ + name: Microsoft.Office.WebExtension.Parameters.Handler, + types: ["function"] + }], + supportedOptions: [] }); OSF.DDA.SyncMethodCalls.define({ - method: OSF.DDA.SyncMethodNames.SendMessage, - requiredArguments: [{ - name: Microsoft.Office.WebExtension.Parameters.MessageContent, - types: ["string"] - }], - supportedOptions: [], - privateStateCallbacks: [] + method: OSF.DDA.SyncMethodNames.SendMessage, + requiredArguments: [{ + name: Microsoft.Office.WebExtension.Parameters.MessageContent, + types: ["string"] + }], + supportedOptions: [], + privateStateCallbacks: [] }); -OSF.DDA.SafeArray.Delegate.openDialog=function OSF_DDA_SafeArray_Delegate$OpenDialog(args) +OSF.DDA.SafeArray.Delegate.openDialog = function OSF_DDA_SafeArray_Delegate$OpenDialog(args) { - try - { - if(args.onCalling) - args.onCalling(); - var callback=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true,args); - OSF.ClientHostController.openDialog(args.dispId,args.targetId,function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) - { - if(args.onEvent) - args.onEvent(payload); - if(OSF.AppTelemetry) - OSF.AppTelemetry.onEventDone(args.dispId) - },callback) - } - catch(ex) - { - OSF.DDA.SafeArray.Delegate._onException(ex,args) - } + try + { + if(args.onCalling) + args.onCalling(); + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true,args); + OSF.ClientHostController.openDialog(args.dispId,args.targetId,function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload) + { + if(args.onEvent) + args.onEvent(payload); + if(OSF.AppTelemetry) + OSF.AppTelemetry.onEventDone(args.dispId) + },callback) + } + catch(ex) + { + OSF.DDA.SafeArray.Delegate._onException(ex,args) + } }; -OSF.DDA.SafeArray.Delegate.closeDialog=function OSF_DDA_SafeArray_Delegate$CloseDialog(args) +OSF.DDA.SafeArray.Delegate.closeDialog = function OSF_DDA_SafeArray_Delegate$CloseDialog(args) { - if(args.onCalling) - args.onCalling(); - var callback=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false,args); - try - { - OSF.ClientHostController.closeDialog(args.dispId,args.targetId,callback) - } - catch(ex) - { - OSF.DDA.SafeArray.Delegate._onException(ex,args) - } + if(args.onCalling) + args.onCalling(); + var callback = OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false,args); + try + { + OSF.ClientHostController.closeDialog(args.dispId,args.targetId,callback) + } + catch(ex) + { + OSF.DDA.SafeArray.Delegate._onException(ex,args) + } }; -OSF.DDA.SafeArray.Delegate.messageParent=function OSF_DDA_SafeArray_Delegate$MessageParent(args) +OSF.DDA.SafeArray.Delegate.messageParent = function OSF_DDA_SafeArray_Delegate$MessageParent(args) { - try - { - if(args.onCalling) - args.onCalling(); - var startTime=(new Date).getTime(); - var result=OSF.ClientHostController.messageParent(args.hostCallArgs); - if(args.onReceiving) - args.onReceiving(); - if(OSF.AppTelemetry) - OSF.AppTelemetry.onMethodDone(args.dispId,args.hostCallArgs,Math.abs((new Date).getTime() - startTime),result); - return result - } - catch(ex) - { - return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(ex) - } + try + { + if(args.onCalling) + args.onCalling(); + var startTime = (new Date).getTime(); + var result = OSF.ClientHostController.messageParent(args.hostCallArgs); + if(args.onReceiving) + args.onReceiving(); + if(OSF.AppTelemetry) + OSF.AppTelemetry.onMethodDone(args.dispId,args.hostCallArgs,Math.abs((new Date).getTime() - startTime),result); + return result + } + catch(ex) + { + return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(ex) + } }; OSF.DDA.SafeArray.Delegate.ParameterMap.define({ - type: OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent, - fromHost: [{ - name: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, - value: OSF.DDA.SafeArray.Delegate.ParameterMap.self - }], - isComplexType: true -}); -OSF.DDA.SafeArray.Delegate.ParameterMap.define({ - type: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, - fromHost: [{ - name: OSF.DDA.PropertyDescriptors.MessageType, - value: 0 - },{ - name: OSF.DDA.PropertyDescriptors.MessageContent, - value: 1 - }], - isComplexType: true -}); -OSF.DDA.SafeArray.Delegate.ParameterMap.define({ - type: OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent, - fromHost: [{ - name: OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent, - value: OSF.DDA.SafeArray.Delegate.ParameterMap.self - }], - isComplexType: true + type: OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent, + fromHost: [{ + name: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, + value: OSF.DDA.SafeArray.Delegate.ParameterMap.self + }], + isComplexType: true }); OSF.DDA.SafeArray.Delegate.ParameterMap.define({ - type: OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent, - fromHost: [{ - name: OSF.DDA.PropertyDescriptors.MessageType, - value: 0 - },{ - name: OSF.DDA.PropertyDescriptors.MessageContent, - value: 1 - }], - isComplexType: true + type: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, + fromHost: [{ + name: OSF.DDA.PropertyDescriptors.MessageType, + value: 0 + },{ + name: OSF.DDA.PropertyDescriptors.MessageContent, + value: 1 + }], + isComplexType: true }); +OSF.DDA.SafeArray.Delegate.sendMessage = function OSF_DDA_SafeArray_Delegate$SendMessage(args) +{ + try + { + if(args.onCalling) + args.onCalling(); + var startTime = (new Date).getTime(); + var result = OSF.ClientHostController.sendMessage(args.hostCallArgs); + if(args.onReceiving) + args.onReceiving(); + return result + } + catch(ex) + { + return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(ex) + } +}; OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ItemChanged: "olkItemSelectedChanged"}); OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{OlkItemSelectedData: "OlkItemSelectedData"}); -OSF.DDA.OlkItemSelectedChangedEventArgs=function OSF_DDA_OlkItemSelectedChangedEventArgs(eventData) +OSF.DDA.OlkItemSelectedChangedEventArgs = function OSF_DDA_OlkItemSelectedChangedEventArgs(eventData) +{ + var initialDataSource = eventData[OSF.DDA.EventDescriptors.OlkItemSelectedData][0]; + if(initialDataSource === "") + initialDataSource = null; + OSF.OUtil.defineEnumerableProperties(this,{ + type: {value: Microsoft.Office.WebExtension.EventType.ItemChanged}, + initialData: {value: JSON.parse(initialDataSource)}, + itemNumber: {value: JSON.parse(eventData[OSF.DDA.EventDescriptors.OlkItemSelectedData][1])} + }) +}; +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{RecipientsChanged: "olkRecipientsChanged"}); +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{OlkRecipientsData: "OlkRecipientsData"}); +OSF.DDA.OlkRecipientsChangedEventArgs = function OSF_DDA_OlkRecipientsChangedEventArgs(eventData) +{ + var changedRecipientFields = eventData[OSF.DDA.EventDescriptors.OlkRecipientsData][0]; + if(changedRecipientFields === "") + changedRecipientFields = null; + OSF.OUtil.defineEnumerableProperties(this,{ + type: {value: Microsoft.Office.WebExtension.EventType.RecipientsChanged}, + changedRecipientFields: {value: JSON.parse(changedRecipientFields)} + }) +}; +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppointmentTimeChanged: "olkAppointmentTimeChanged"}); +OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{OlkAppointmentTimeChangedData: "OlkAppointmentTimeChangedData"}); +OSF.DDA.OlkAppointmentTimeChangedEventArgs = function OSF_DDA_OlkAppointmentTimeChangedEventArgs(eventData) { - var initialDataSource=eventData[OSF.DDA.EventDescriptors.OlkItemSelectedData][0]; - if(initialDataSource==="") - initialDataSource=null; - OSF.OUtil.defineEnumerableProperties(this,{ - type: {value: Microsoft.Office.WebExtension.EventType.ItemChanged}, - initialData: {value: JSON.parse(initialDataSource)}, - itemNumber: {value: JSON.parse(eventData[OSF.DDA.EventDescriptors.OlkItemSelectedData][1])} - }) + var appointmentTimeString = eventData[OSF.DDA.EventDescriptors.OlkAppointmentTimeChangedData][0]; + var start; + var end; + try + { + var appointmentTime = JSON.parse(appointmentTimeString); + start = new Date(appointmentTime.start).toISOString(); + end = new Date(appointmentTime.end).toISOString() + } + catch(e) + { + start = null; + end = null + } + OSF.OUtil.defineEnumerableProperties(this,{ + type: {value: Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged}, + start: {value: start}, + end: {value: end} + }) }; OSF.DDA.SafeArray.Delegate.ParameterMap.define({ - type: OSF.DDA.EventDispId.dispidOlkItemSelectedChangedEvent, - fromHost: [{ - name: OSF.DDA.EventDescriptors.OlkItemSelectedData, - value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData - }], - isComplexType: true + type: OSF.DDA.EventDispId.dispidOlkItemSelectedChangedEvent, + fromHost: [{ + name: OSF.DDA.EventDescriptors.OlkItemSelectedData, + value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData + }], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidOlkRecipientsChangedEvent, + fromHost: [{ + name: OSF.DDA.EventDescriptors.OlkRecipientsData, + value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData + }], + isComplexType: true +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidOlkAppointmentTimeChangedEvent, + fromHost: [{ + name: OSF.DDA.EventDescriptors.OlkAppointmentTimeChangedData, + value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData + }], + isComplexType: true }); var OSFLog; (function(OSFLog) { - var BaseUsageData=function() - { - function BaseUsageData(table) - { - this._table=table; - this._fields={} - } - Object.defineProperty(BaseUsageData.prototype,"Fields",{ - get: function() - { - return this._fields - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(BaseUsageData.prototype,"Table",{ - get: function() - { - return this._table - }, - enumerable: true, - configurable: true - }); - BaseUsageData.prototype.SerializeFields=function(){}; - BaseUsageData.prototype.SetSerializedField=function(key, value) - { - if(typeof value !=="undefined" && value !==null) - this._serializedFields[key]=value.toString() - }; - BaseUsageData.prototype.SerializeRow=function() - { - this._serializedFields={}; - this.SetSerializedField("Table",this._table); - this.SerializeFields(); - return JSON.stringify(this._serializedFields) - }; - return BaseUsageData - }(); - OSFLog.BaseUsageData=BaseUsageData; - var AppActivatedUsageData=function(_super) - { - __extends(AppActivatedUsageData,_super); - function AppActivatedUsageData() - { - _super.call(this,"AppActivated") - } - Object.defineProperty(AppActivatedUsageData.prototype,"CorrelationId",{ - get: function() - { - return this.Fields["CorrelationId"] - }, - set: function(value) - { - this.Fields["CorrelationId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"SessionId",{ - get: function() - { - return this.Fields["SessionId"] - }, - set: function(value) - { - this.Fields["SessionId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"AppId",{ - get: function() - { - return this.Fields["AppId"] - }, - set: function(value) - { - this.Fields["AppId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"AppInstanceId",{ - get: function() - { - return this.Fields["AppInstanceId"] - }, - set: function(value) - { - this.Fields["AppInstanceId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"AppURL",{ - get: function() - { - return this.Fields["AppURL"] - }, - set: function(value) - { - this.Fields["AppURL"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"AssetId",{ - get: function() - { - return this.Fields["AssetId"] - }, - set: function(value) - { - this.Fields["AssetId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"Browser",{ - get: function() - { - return this.Fields["Browser"] - }, - set: function(value) - { - this.Fields["Browser"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"UserId",{ - get: function() - { - return this.Fields["UserId"] - }, - set: function(value) - { - this.Fields["UserId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"Host",{ - get: function() - { - return this.Fields["Host"] - }, - set: function(value) - { - this.Fields["Host"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"HostVersion",{ - get: function() - { - return this.Fields["HostVersion"] - }, - set: function(value) - { - this.Fields["HostVersion"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"ClientId",{ - get: function() - { - return this.Fields["ClientId"] - }, - set: function(value) - { - this.Fields["ClientId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"AppSizeWidth",{ - get: function() - { - return this.Fields["AppSizeWidth"] - }, - set: function(value) - { - this.Fields["AppSizeWidth"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"AppSizeHeight",{ - get: function() - { - return this.Fields["AppSizeHeight"] - }, - set: function(value) - { - this.Fields["AppSizeHeight"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"Message",{ - get: function() - { - return this.Fields["Message"] - }, - set: function(value) - { - this.Fields["Message"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"DocUrl",{ - get: function() - { - return this.Fields["DocUrl"] - }, - set: function(value) - { - this.Fields["DocUrl"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"OfficeJSVersion",{ - get: function() - { - return this.Fields["OfficeJSVersion"] - }, - set: function(value) - { - this.Fields["OfficeJSVersion"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppActivatedUsageData.prototype,"HostJSVersion",{ - get: function() - { - return this.Fields["HostJSVersion"] - }, - set: function(value) - { - this.Fields["HostJSVersion"]=value - }, - enumerable: true, - configurable: true - }); - AppActivatedUsageData.prototype.SerializeFields=function() - { - this.SetSerializedField("CorrelationId",this.CorrelationId); - this.SetSerializedField("SessionId",this.SessionId); - this.SetSerializedField("AppId",this.AppId); - this.SetSerializedField("AppInstanceId",this.AppInstanceId); - this.SetSerializedField("AppURL",this.AppURL); - this.SetSerializedField("AssetId",this.AssetId); - this.SetSerializedField("Browser",this.Browser); - this.SetSerializedField("UserId",this.UserId); - this.SetSerializedField("Host",this.Host); - this.SetSerializedField("HostVersion",this.HostVersion); - this.SetSerializedField("ClientId",this.ClientId); - this.SetSerializedField("AppSizeWidth",this.AppSizeWidth); - this.SetSerializedField("AppSizeHeight",this.AppSizeHeight); - this.SetSerializedField("Message",this.Message); - this.SetSerializedField("DocUrl",this.DocUrl); - this.SetSerializedField("OfficeJSVersion",this.OfficeJSVersion); - this.SetSerializedField("HostJSVersion",this.HostJSVersion) - }; - return AppActivatedUsageData - }(BaseUsageData); - OSFLog.AppActivatedUsageData=AppActivatedUsageData; - var ScriptLoadUsageData=function(_super) - { - __extends(ScriptLoadUsageData,_super); - function ScriptLoadUsageData() - { - _super.call(this,"ScriptLoad") - } - Object.defineProperty(ScriptLoadUsageData.prototype,"CorrelationId",{ - get: function() - { - return this.Fields["CorrelationId"] - }, - set: function(value) - { - this.Fields["CorrelationId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ScriptLoadUsageData.prototype,"SessionId",{ - get: function() - { - return this.Fields["SessionId"] - }, - set: function(value) - { - this.Fields["SessionId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ScriptLoadUsageData.prototype,"ScriptId",{ - get: function() - { - return this.Fields["ScriptId"] - }, - set: function(value) - { - this.Fields["ScriptId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ScriptLoadUsageData.prototype,"StartTime",{ - get: function() - { - return this.Fields["StartTime"] - }, - set: function(value) - { - this.Fields["StartTime"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(ScriptLoadUsageData.prototype,"ResponseTime",{ - get: function() - { - return this.Fields["ResponseTime"] - }, - set: function(value) - { - this.Fields["ResponseTime"]=value - }, - enumerable: true, - configurable: true - }); - ScriptLoadUsageData.prototype.SerializeFields=function() - { - this.SetSerializedField("CorrelationId",this.CorrelationId); - this.SetSerializedField("SessionId",this.SessionId); - this.SetSerializedField("ScriptId",this.ScriptId); - this.SetSerializedField("StartTime",this.StartTime); - this.SetSerializedField("ResponseTime",this.ResponseTime) - }; - return ScriptLoadUsageData - }(BaseUsageData); - OSFLog.ScriptLoadUsageData=ScriptLoadUsageData; - var AppClosedUsageData=function(_super) - { - __extends(AppClosedUsageData,_super); - function AppClosedUsageData() - { - _super.call(this,"AppClosed") - } - Object.defineProperty(AppClosedUsageData.prototype,"CorrelationId",{ - get: function() - { - return this.Fields["CorrelationId"] - }, - set: function(value) - { - this.Fields["CorrelationId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppClosedUsageData.prototype,"SessionId",{ - get: function() - { - return this.Fields["SessionId"] - }, - set: function(value) - { - this.Fields["SessionId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppClosedUsageData.prototype,"FocusTime",{ - get: function() - { - return this.Fields["FocusTime"] - }, - set: function(value) - { - this.Fields["FocusTime"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppClosedUsageData.prototype,"AppSizeFinalWidth",{ - get: function() - { - return this.Fields["AppSizeFinalWidth"] - }, - set: function(value) - { - this.Fields["AppSizeFinalWidth"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppClosedUsageData.prototype,"AppSizeFinalHeight",{ - get: function() - { - return this.Fields["AppSizeFinalHeight"] - }, - set: function(value) - { - this.Fields["AppSizeFinalHeight"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppClosedUsageData.prototype,"OpenTime",{ - get: function() - { - return this.Fields["OpenTime"] - }, - set: function(value) - { - this.Fields["OpenTime"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppClosedUsageData.prototype,"CloseMethod",{ - get: function() - { - return this.Fields["CloseMethod"] - }, - set: function(value) - { - this.Fields["CloseMethod"]=value - }, - enumerable: true, - configurable: true - }); - AppClosedUsageData.prototype.SerializeFields=function() - { - this.SetSerializedField("CorrelationId",this.CorrelationId); - this.SetSerializedField("SessionId",this.SessionId); - this.SetSerializedField("FocusTime",this.FocusTime); - this.SetSerializedField("AppSizeFinalWidth",this.AppSizeFinalWidth); - this.SetSerializedField("AppSizeFinalHeight",this.AppSizeFinalHeight); - this.SetSerializedField("OpenTime",this.OpenTime); - this.SetSerializedField("CloseMethod",this.CloseMethod) - }; - return AppClosedUsageData - }(BaseUsageData); - OSFLog.AppClosedUsageData=AppClosedUsageData; - var APIUsageUsageData=function(_super) - { - __extends(APIUsageUsageData,_super); - function APIUsageUsageData() - { - _super.call(this,"APIUsage") - } - Object.defineProperty(APIUsageUsageData.prototype,"CorrelationId",{ - get: function() - { - return this.Fields["CorrelationId"] - }, - set: function(value) - { - this.Fields["CorrelationId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(APIUsageUsageData.prototype,"SessionId",{ - get: function() - { - return this.Fields["SessionId"] - }, - set: function(value) - { - this.Fields["SessionId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(APIUsageUsageData.prototype,"APIType",{ - get: function() - { - return this.Fields["APIType"] - }, - set: function(value) - { - this.Fields["APIType"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(APIUsageUsageData.prototype,"APIID",{ - get: function() - { - return this.Fields["APIID"] - }, - set: function(value) - { - this.Fields["APIID"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(APIUsageUsageData.prototype,"Parameters",{ - get: function() - { - return this.Fields["Parameters"] - }, - set: function(value) - { - this.Fields["Parameters"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(APIUsageUsageData.prototype,"ResponseTime",{ - get: function() - { - return this.Fields["ResponseTime"] - }, - set: function(value) - { - this.Fields["ResponseTime"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(APIUsageUsageData.prototype,"ErrorType",{ - get: function() - { - return this.Fields["ErrorType"] - }, - set: function(value) - { - this.Fields["ErrorType"]=value - }, - enumerable: true, - configurable: true - }); - APIUsageUsageData.prototype.SerializeFields=function() - { - this.SetSerializedField("CorrelationId",this.CorrelationId); - this.SetSerializedField("SessionId",this.SessionId); - this.SetSerializedField("APIType",this.APIType); - this.SetSerializedField("APIID",this.APIID); - this.SetSerializedField("Parameters",this.Parameters); - this.SetSerializedField("ResponseTime",this.ResponseTime); - this.SetSerializedField("ErrorType",this.ErrorType) - }; - return APIUsageUsageData - }(BaseUsageData); - OSFLog.APIUsageUsageData=APIUsageUsageData; - var AppInitializationUsageData=function(_super) - { - __extends(AppInitializationUsageData,_super); - function AppInitializationUsageData() - { - _super.call(this,"AppInitialization") - } - Object.defineProperty(AppInitializationUsageData.prototype,"CorrelationId",{ - get: function() - { - return this.Fields["CorrelationId"] - }, - set: function(value) - { - this.Fields["CorrelationId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppInitializationUsageData.prototype,"SessionId",{ - get: function() - { - return this.Fields["SessionId"] - }, - set: function(value) - { - this.Fields["SessionId"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppInitializationUsageData.prototype,"SuccessCode",{ - get: function() - { - return this.Fields["SuccessCode"] - }, - set: function(value) - { - this.Fields["SuccessCode"]=value - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(AppInitializationUsageData.prototype,"Message",{ - get: function() - { - return this.Fields["Message"] - }, - set: function(value) - { - this.Fields["Message"]=value - }, - enumerable: true, - configurable: true - }); - AppInitializationUsageData.prototype.SerializeFields=function() - { - this.SetSerializedField("CorrelationId",this.CorrelationId); - this.SetSerializedField("SessionId",this.SessionId); - this.SetSerializedField("SuccessCode",this.SuccessCode); - this.SetSerializedField("Message",this.Message) - }; - return AppInitializationUsageData - }(BaseUsageData); - OSFLog.AppInitializationUsageData=AppInitializationUsageData -})(OSFLog || (OSFLog={})); + var BaseUsageData = function() + { + function BaseUsageData(table) + { + this._table = table; + this._fields = {} + } + Object.defineProperty(BaseUsageData.prototype,"Fields",{ + get: function() + { + return this._fields + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(BaseUsageData.prototype,"Table",{ + get: function() + { + return this._table + }, + enumerable: true, + configurable: true + }); + BaseUsageData.prototype.SerializeFields = function(){}; + BaseUsageData.prototype.SetSerializedField = function(key, value) + { + if(typeof value !== "undefined" && value !== null) + this._serializedFields[key] = value.toString() + }; + BaseUsageData.prototype.SerializeRow = function() + { + this._serializedFields = {}; + this.SetSerializedField("Table",this._table); + this.SerializeFields(); + return JSON.stringify(this._serializedFields) + }; + return BaseUsageData + }(); + OSFLog.BaseUsageData = BaseUsageData; + var AppActivatedUsageData = function(_super) + { + __extends(AppActivatedUsageData,_super); + function AppActivatedUsageData() + { + _super.call(this,"AppActivated") + } + Object.defineProperty(AppActivatedUsageData.prototype,"CorrelationId",{ + get: function() + { + return this.Fields["CorrelationId"] + }, + set: function(value) + { + this.Fields["CorrelationId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"SessionId",{ + get: function() + { + return this.Fields["SessionId"] + }, + set: function(value) + { + this.Fields["SessionId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"AppId",{ + get: function() + { + return this.Fields["AppId"] + }, + set: function(value) + { + this.Fields["AppId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"AppInstanceId",{ + get: function() + { + return this.Fields["AppInstanceId"] + }, + set: function(value) + { + this.Fields["AppInstanceId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"AppURL",{ + get: function() + { + return this.Fields["AppURL"] + }, + set: function(value) + { + this.Fields["AppURL"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"AssetId",{ + get: function() + { + return this.Fields["AssetId"] + }, + set: function(value) + { + this.Fields["AssetId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"Browser",{ + get: function() + { + return this.Fields["Browser"] + }, + set: function(value) + { + this.Fields["Browser"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"UserId",{ + get: function() + { + return this.Fields["UserId"] + }, + set: function(value) + { + this.Fields["UserId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"Host",{ + get: function() + { + return this.Fields["Host"] + }, + set: function(value) + { + this.Fields["Host"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"HostVersion",{ + get: function() + { + return this.Fields["HostVersion"] + }, + set: function(value) + { + this.Fields["HostVersion"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"ClientId",{ + get: function() + { + return this.Fields["ClientId"] + }, + set: function(value) + { + this.Fields["ClientId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"AppSizeWidth",{ + get: function() + { + return this.Fields["AppSizeWidth"] + }, + set: function(value) + { + this.Fields["AppSizeWidth"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"AppSizeHeight",{ + get: function() + { + return this.Fields["AppSizeHeight"] + }, + set: function(value) + { + this.Fields["AppSizeHeight"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"Message",{ + get: function() + { + return this.Fields["Message"] + }, + set: function(value) + { + this.Fields["Message"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"DocUrl",{ + get: function() + { + return this.Fields["DocUrl"] + }, + set: function(value) + { + this.Fields["DocUrl"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"OfficeJSVersion",{ + get: function() + { + return this.Fields["OfficeJSVersion"] + }, + set: function(value) + { + this.Fields["OfficeJSVersion"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"HostJSVersion",{ + get: function() + { + return this.Fields["HostJSVersion"] + }, + set: function(value) + { + this.Fields["HostJSVersion"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"WacHostEnvironment",{ + get: function() + { + return this.Fields["WacHostEnvironment"] + }, + set: function(value) + { + this.Fields["WacHostEnvironment"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppActivatedUsageData.prototype,"IsFromWacAutomation",{ + get: function() + { + return this.Fields["IsFromWacAutomation"] + }, + set: function(value) + { + this.Fields["IsFromWacAutomation"] = value + }, + enumerable: true, + configurable: true + }); + AppActivatedUsageData.prototype.SerializeFields = function() + { + this.SetSerializedField("CorrelationId",this.CorrelationId); + this.SetSerializedField("SessionId",this.SessionId); + this.SetSerializedField("AppId",this.AppId); + this.SetSerializedField("AppInstanceId",this.AppInstanceId); + this.SetSerializedField("AppURL",this.AppURL); + this.SetSerializedField("AssetId",this.AssetId); + this.SetSerializedField("Browser",this.Browser); + this.SetSerializedField("UserId",this.UserId); + this.SetSerializedField("Host",this.Host); + this.SetSerializedField("HostVersion",this.HostVersion); + this.SetSerializedField("ClientId",this.ClientId); + this.SetSerializedField("AppSizeWidth",this.AppSizeWidth); + this.SetSerializedField("AppSizeHeight",this.AppSizeHeight); + this.SetSerializedField("Message",this.Message); + this.SetSerializedField("DocUrl",this.DocUrl); + this.SetSerializedField("OfficeJSVersion",this.OfficeJSVersion); + this.SetSerializedField("HostJSVersion",this.HostJSVersion); + this.SetSerializedField("WacHostEnvironment",this.WacHostEnvironment); + this.SetSerializedField("IsFromWacAutomation",this.IsFromWacAutomation) + }; + return AppActivatedUsageData + }(BaseUsageData); + OSFLog.AppActivatedUsageData = AppActivatedUsageData; + var ScriptLoadUsageData = function(_super) + { + __extends(ScriptLoadUsageData,_super); + function ScriptLoadUsageData() + { + _super.call(this,"ScriptLoad") + } + Object.defineProperty(ScriptLoadUsageData.prototype,"CorrelationId",{ + get: function() + { + return this.Fields["CorrelationId"] + }, + set: function(value) + { + this.Fields["CorrelationId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype,"SessionId",{ + get: function() + { + return this.Fields["SessionId"] + }, + set: function(value) + { + this.Fields["SessionId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype,"ScriptId",{ + get: function() + { + return this.Fields["ScriptId"] + }, + set: function(value) + { + this.Fields["ScriptId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype,"StartTime",{ + get: function() + { + return this.Fields["StartTime"] + }, + set: function(value) + { + this.Fields["StartTime"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ScriptLoadUsageData.prototype,"ResponseTime",{ + get: function() + { + return this.Fields["ResponseTime"] + }, + set: function(value) + { + this.Fields["ResponseTime"] = value + }, + enumerable: true, + configurable: true + }); + ScriptLoadUsageData.prototype.SerializeFields = function() + { + this.SetSerializedField("CorrelationId",this.CorrelationId); + this.SetSerializedField("SessionId",this.SessionId); + this.SetSerializedField("ScriptId",this.ScriptId); + this.SetSerializedField("StartTime",this.StartTime); + this.SetSerializedField("ResponseTime",this.ResponseTime) + }; + return ScriptLoadUsageData + }(BaseUsageData); + OSFLog.ScriptLoadUsageData = ScriptLoadUsageData; + var AppClosedUsageData = function(_super) + { + __extends(AppClosedUsageData,_super); + function AppClosedUsageData() + { + _super.call(this,"AppClosed") + } + Object.defineProperty(AppClosedUsageData.prototype,"CorrelationId",{ + get: function() + { + return this.Fields["CorrelationId"] + }, + set: function(value) + { + this.Fields["CorrelationId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype,"SessionId",{ + get: function() + { + return this.Fields["SessionId"] + }, + set: function(value) + { + this.Fields["SessionId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype,"FocusTime",{ + get: function() + { + return this.Fields["FocusTime"] + }, + set: function(value) + { + this.Fields["FocusTime"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype,"AppSizeFinalWidth",{ + get: function() + { + return this.Fields["AppSizeFinalWidth"] + }, + set: function(value) + { + this.Fields["AppSizeFinalWidth"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype,"AppSizeFinalHeight",{ + get: function() + { + return this.Fields["AppSizeFinalHeight"] + }, + set: function(value) + { + this.Fields["AppSizeFinalHeight"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype,"OpenTime",{ + get: function() + { + return this.Fields["OpenTime"] + }, + set: function(value) + { + this.Fields["OpenTime"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppClosedUsageData.prototype,"CloseMethod",{ + get: function() + { + return this.Fields["CloseMethod"] + }, + set: function(value) + { + this.Fields["CloseMethod"] = value + }, + enumerable: true, + configurable: true + }); + AppClosedUsageData.prototype.SerializeFields = function() + { + this.SetSerializedField("CorrelationId",this.CorrelationId); + this.SetSerializedField("SessionId",this.SessionId); + this.SetSerializedField("FocusTime",this.FocusTime); + this.SetSerializedField("AppSizeFinalWidth",this.AppSizeFinalWidth); + this.SetSerializedField("AppSizeFinalHeight",this.AppSizeFinalHeight); + this.SetSerializedField("OpenTime",this.OpenTime); + this.SetSerializedField("CloseMethod",this.CloseMethod) + }; + return AppClosedUsageData + }(BaseUsageData); + OSFLog.AppClosedUsageData = AppClosedUsageData; + var APIUsageUsageData = function(_super) + { + __extends(APIUsageUsageData,_super); + function APIUsageUsageData() + { + _super.call(this,"APIUsage") + } + Object.defineProperty(APIUsageUsageData.prototype,"CorrelationId",{ + get: function() + { + return this.Fields["CorrelationId"] + }, + set: function(value) + { + this.Fields["CorrelationId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype,"SessionId",{ + get: function() + { + return this.Fields["SessionId"] + }, + set: function(value) + { + this.Fields["SessionId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype,"APIType",{ + get: function() + { + return this.Fields["APIType"] + }, + set: function(value) + { + this.Fields["APIType"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype,"APIID",{ + get: function() + { + return this.Fields["APIID"] + }, + set: function(value) + { + this.Fields["APIID"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype,"Parameters",{ + get: function() + { + return this.Fields["Parameters"] + }, + set: function(value) + { + this.Fields["Parameters"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype,"ResponseTime",{ + get: function() + { + return this.Fields["ResponseTime"] + }, + set: function(value) + { + this.Fields["ResponseTime"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(APIUsageUsageData.prototype,"ErrorType",{ + get: function() + { + return this.Fields["ErrorType"] + }, + set: function(value) + { + this.Fields["ErrorType"] = value + }, + enumerable: true, + configurable: true + }); + APIUsageUsageData.prototype.SerializeFields = function() + { + this.SetSerializedField("CorrelationId",this.CorrelationId); + this.SetSerializedField("SessionId",this.SessionId); + this.SetSerializedField("APIType",this.APIType); + this.SetSerializedField("APIID",this.APIID); + this.SetSerializedField("Parameters",this.Parameters); + this.SetSerializedField("ResponseTime",this.ResponseTime); + this.SetSerializedField("ErrorType",this.ErrorType) + }; + return APIUsageUsageData + }(BaseUsageData); + OSFLog.APIUsageUsageData = APIUsageUsageData; + var AppInitializationUsageData = function(_super) + { + __extends(AppInitializationUsageData,_super); + function AppInitializationUsageData() + { + _super.call(this,"AppInitialization") + } + Object.defineProperty(AppInitializationUsageData.prototype,"CorrelationId",{ + get: function() + { + return this.Fields["CorrelationId"] + }, + set: function(value) + { + this.Fields["CorrelationId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype,"SessionId",{ + get: function() + { + return this.Fields["SessionId"] + }, + set: function(value) + { + this.Fields["SessionId"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype,"SuccessCode",{ + get: function() + { + return this.Fields["SuccessCode"] + }, + set: function(value) + { + this.Fields["SuccessCode"] = value + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(AppInitializationUsageData.prototype,"Message",{ + get: function() + { + return this.Fields["Message"] + }, + set: function(value) + { + this.Fields["Message"] = value + }, + enumerable: true, + configurable: true + }); + AppInitializationUsageData.prototype.SerializeFields = function() + { + this.SetSerializedField("CorrelationId",this.CorrelationId); + this.SetSerializedField("SessionId",this.SessionId); + this.SetSerializedField("SuccessCode",this.SuccessCode); + this.SetSerializedField("Message",this.Message) + }; + return AppInitializationUsageData + }(BaseUsageData); + OSFLog.AppInitializationUsageData = AppInitializationUsageData +})(OSFLog || (OSFLog = {})); var Logger; (function(Logger) { - "use strict"; - (function(TraceLevel) - { - TraceLevel[TraceLevel["info"]=0]="info"; - TraceLevel[TraceLevel["warning"]=1]="warning"; - TraceLevel[TraceLevel["error"]=2]="error" - })(Logger.TraceLevel || (Logger.TraceLevel={})); - var TraceLevel=Logger.TraceLevel; - (function(SendFlag) - { - SendFlag[SendFlag["none"]=0]="none"; - SendFlag[SendFlag["flush"]=1]="flush" - })(Logger.SendFlag || (Logger.SendFlag={})); - var SendFlag=Logger.SendFlag; - function allowUploadingData() - { - if(OSF.Logger && OSF.Logger.ulsEndpoint) - OSF.Logger.ulsEndpoint.loadProxyFrame() - } - Logger.allowUploadingData=allowUploadingData; - function sendLog(traceLevel, message, flag) - { - if(OSF.Logger && OSF.Logger.ulsEndpoint) - { - var jsonObj={ - traceLevel: traceLevel, - message: message, - flag: flag, - internalLog: true - }; - var logs=JSON.stringify(jsonObj); - OSF.Logger.ulsEndpoint.writeLog(logs) - } - } - Logger.sendLog=sendLog; - function creatULSEndpoint() - { - try - { - return new ULSEndpointProxy - } - catch(e) - { - return null - } - } - var ULSEndpointProxy=function() - { - function ULSEndpointProxy() - { - var _this=this; - this.proxyFrame=null; - this.telemetryEndPoint="https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html"; - this.buffer=[]; - this.proxyFrameReady=false; - OSF.OUtil.addEventListener(window,"message",function(e) - { - return _this.tellProxyFrameReady(e) - }); - setTimeout(function() - { - _this.loadProxyFrame() - },3e3) - } - ULSEndpointProxy.prototype.writeLog=function(log) - { - if(this.proxyFrameReady===true) - this.proxyFrame.contentWindow.postMessage(log,ULSEndpointProxy.telemetryOrigin); - else if(this.buffer.length < 128) - this.buffer.push(log) - }; - ULSEndpointProxy.prototype.loadProxyFrame=function() - { - if(this.proxyFrame==null) - { - this.proxyFrame=document.createElement("iframe"); - this.proxyFrame.setAttribute("style","display:none"); - this.proxyFrame.setAttribute("src",this.telemetryEndPoint); - document.head.appendChild(this.proxyFrame) - } - }; - ULSEndpointProxy.prototype.tellProxyFrameReady=function(e) - { - var _this=this; - if(e.data==="ProxyFrameReadyToLog") - { - this.proxyFrameReady=true; - for(var i=0; i < this.buffer.length; i++) - this.writeLog(this.buffer[i]); - this.buffer.length=0; - OSF.OUtil.removeEventListener(window,"message",function(e) - { - return _this.tellProxyFrameReady(e) - }) - } - else if(e.data==="ProxyFrameReadyToInit") - { - var initJson={ - appName: "Office APPs", - sessionId: OSF.OUtil.Guid.generateNewGuid() - }; - var initStr=JSON.stringify(initJson); - this.proxyFrame.contentWindow.postMessage(initStr,ULSEndpointProxy.telemetryOrigin) - } - }; - ULSEndpointProxy.telemetryOrigin="https://telemetryservice.firstpartyapps.oaspapps.com"; - return ULSEndpointProxy - }(); - if(!OSF.Logger) - OSF.Logger=Logger; - Logger.ulsEndpoint=creatULSEndpoint() -})(Logger || (Logger={})); + "use strict"; + (function(TraceLevel) + { + TraceLevel[TraceLevel["info"] = 0] = "info"; + TraceLevel[TraceLevel["warning"] = 1] = "warning"; + TraceLevel[TraceLevel["error"] = 2] = "error" + })(Logger.TraceLevel || (Logger.TraceLevel = {})); + var TraceLevel = Logger.TraceLevel; + (function(SendFlag) + { + SendFlag[SendFlag["none"] = 0] = "none"; + SendFlag[SendFlag["flush"] = 1] = "flush" + })(Logger.SendFlag || (Logger.SendFlag = {})); + var SendFlag = Logger.SendFlag; + function allowUploadingData() + { + if(OSF.Logger && OSF.Logger.ulsEndpoint) + OSF.Logger.ulsEndpoint.loadProxyFrame() + } + Logger.allowUploadingData = allowUploadingData; + function sendLog(traceLevel, message, flag) + { + if(OSF.Logger && OSF.Logger.ulsEndpoint) + { + var jsonObj = { + traceLevel: traceLevel, + message: message, + flag: flag, + internalLog: true + }; + var logs = JSON.stringify(jsonObj); + OSF.Logger.ulsEndpoint.writeLog(logs) + } + } + Logger.sendLog = sendLog; + function creatULSEndpoint() + { + try + { + return new ULSEndpointProxy + } + catch(e) + { + return null + } + } + var ULSEndpointProxy = function() + { + function ULSEndpointProxy() + { + var _this = this; + this.proxyFrame = null; + this.telemetryEndPoint = "https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html"; + this.buffer = []; + this.proxyFrameReady = false; + OSF.OUtil.addEventListener(window,"message",function(e) + { + return _this.tellProxyFrameReady(e) + }); + setTimeout(function() + { + _this.loadProxyFrame() + },3e3) + } + ULSEndpointProxy.prototype.writeLog = function(log) + { + if(this.proxyFrameReady === true) + this.proxyFrame.contentWindow.postMessage(log,ULSEndpointProxy.telemetryOrigin); + else if(this.buffer.length < 128) + this.buffer.push(log) + }; + ULSEndpointProxy.prototype.loadProxyFrame = function() + { + if(this.proxyFrame == null) + { + this.proxyFrame = document.createElement("iframe"); + this.proxyFrame.setAttribute("style","display:none"); + this.proxyFrame.setAttribute("src",this.telemetryEndPoint); + document.head.appendChild(this.proxyFrame) + } + }; + ULSEndpointProxy.prototype.tellProxyFrameReady = function(e) + { + var _this = this; + if(e.data === "ProxyFrameReadyToLog") + { + this.proxyFrameReady = true; + for(var i = 0; i < this.buffer.length; i++) + this.writeLog(this.buffer[i]); + this.buffer.length = 0; + OSF.OUtil.removeEventListener(window,"message",function(e) + { + return _this.tellProxyFrameReady(e) + }) + } + else if(e.data === "ProxyFrameReadyToInit") + { + var initJson = { + appName: "Office APPs", + sessionId: OSF.OUtil.Guid.generateNewGuid() + }; + var initStr = JSON.stringify(initJson); + this.proxyFrame.contentWindow.postMessage(initStr,ULSEndpointProxy.telemetryOrigin) + } + }; + ULSEndpointProxy.telemetryOrigin = "https://telemetryservice.firstpartyapps.oaspapps.com"; + return ULSEndpointProxy + }(); + if(!OSF.Logger) + OSF.Logger = Logger; + Logger.ulsEndpoint = creatULSEndpoint() +})(Logger || (Logger = {})); +var OSFAriaLogger; +(function(OSFAriaLogger) +{ + var AriaLogger = function() + { + function AriaLogger(){} + AriaLogger.prototype.getAriaCDNLocation = function() + { + return OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath() + "/ariatelemetry/aria-web-telemetry.js" + }; + AriaLogger.getInstance = function() + { + if(AriaLogger.AriaLoggerObj === undefined) + AriaLogger.AriaLoggerObj = new AriaLogger; + return AriaLogger.AriaLoggerObj + }; + AriaLogger.prototype.isIUsageData = function(arg) + { + return arg["Fields"] !== undefined + }; + AriaLogger.prototype.loadAriaScriptAndLog = function(tableName, telemetryData) + { + var startAfterMs = 1e3; + OSF.OUtil.loadScript(this.getAriaCDNLocation(),function() + { + try + { + if(!this.ALogger) + { + var OfficeExtensibilityTenantID = "db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; + this.ALogger = AWTLogManager.initialize(OfficeExtensibilityTenantID) + } + var eventProperties = new AWTEventProperties; + eventProperties.setName("Office.Extensibility.OfficeJS." + tableName); + for(var key in telemetryData) + if(key.toLowerCase() !== "table") + eventProperties.setProperty(key,telemetryData[key]); + var today = new Date; + eventProperties.setProperty("Date",today.toISOString()); + this.ALogger.logEvent(eventProperties) + } + catch(e){} + },startAfterMs) + }; + AriaLogger.prototype.logData = function(data) + { + if(this.isIUsageData(data)) + this.loadAriaScriptAndLog(data["Table"],data["Fields"]); + else + this.loadAriaScriptAndLog(data["Table"],data) + }; + return AriaLogger + }(); + OSFAriaLogger.AriaLogger = AriaLogger +})(OSFAriaLogger || (OSFAriaLogger = {})); var OSFAppTelemetry; (function(OSFAppTelemetry) { - "use strict"; - var appInfo; - var sessionId=OSF.OUtil.Guid.generateNewGuid(); - var osfControlAppCorrelationId=""; - var omexDomainRegex=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/","i"); - var AppInfo=function() - { - function AppInfo(){} - return AppInfo - }(); - var Event=function() - { - function Event(name, handler) - { - this.name=name; - this.handler=handler - } - return Event - }(); - var AppStorage=function() - { - function AppStorage() - { - this.clientIDKey="Office API client"; - this.logIdSetKey="Office App Log Id Set" - } - AppStorage.prototype.getClientId=function() - { - var clientId=this.getValue(this.clientIDKey); - if(!clientId || clientId.length <=0 || clientId.length > 40) - { - clientId=OSF.OUtil.Guid.generateNewGuid(); - this.setValue(this.clientIDKey,clientId) - } - return clientId - }; - AppStorage.prototype.saveLog=function(logId, log) - { - var logIdSet=this.getValue(this.logIdSetKey); - logIdSet=(logIdSet && logIdSet.length > 0 ? logIdSet+";" : "")+logId; - this.setValue(this.logIdSetKey,logIdSet); - this.setValue(logId,log) - }; - AppStorage.prototype.enumerateLog=function(callback, clean) - { - var logIdSet=this.getValue(this.logIdSetKey); - if(logIdSet) - { - var ids=logIdSet.split(";"); - for(var id in ids) - { - var logId=ids[id]; - var log=this.getValue(logId); - if(log) - { - if(callback) - callback(logId,log); - if(clean) - this.remove(logId) - } - } - if(clean) - this.remove(this.logIdSetKey) - } - }; - AppStorage.prototype.getValue=function(key) - { - var osfLocalStorage=OSF.OUtil.getLocalStorage(); - var value=""; - if(osfLocalStorage) - value=osfLocalStorage.getItem(key); - return value - }; - AppStorage.prototype.setValue=function(key, value) - { - var osfLocalStorage=OSF.OUtil.getLocalStorage(); - if(osfLocalStorage) - osfLocalStorage.setItem(key,value) - }; - AppStorage.prototype.remove=function(key) - { - var osfLocalStorage=OSF.OUtil.getLocalStorage(); - if(osfLocalStorage) - try - { - osfLocalStorage.removeItem(key) - } - catch(ex){} - }; - return AppStorage - }(); - var AppLogger=function() - { - function AppLogger(){} - AppLogger.prototype.LogData=function(data) - { - if(!OSF.Logger) - return; - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,data.SerializeRow(),OSF.Logger.SendFlag.none) - }; - AppLogger.prototype.LogRawData=function(log) - { - if(!OSF.Logger) - return; - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,log,OSF.Logger.SendFlag.none) - }; - return AppLogger - }(); - function initialize(context) - { - if(!OSF.Logger) - return; - if(appInfo) - return; - appInfo=new AppInfo; - if(context.get_hostFullVersion()) - appInfo.hostVersion=context.get_hostFullVersion(); - else - appInfo.hostVersion=context.get_appVersion(); - appInfo.appId=context.get_id(); - appInfo.host=context.get_appName(); - appInfo.browser=window.navigator.userAgent; - appInfo.correlationId=context.get_correlationId(); - appInfo.clientId=(new AppStorage).getClientId(); - appInfo.appInstanceId=context.get_appInstanceId(); - if(appInfo.appInstanceId) - appInfo.appInstanceId=appInfo.appInstanceId.replace(/[{}]/g,"").toLowerCase(); - appInfo.message=context.get_hostCustomMessage(); - appInfo.officeJSVersion=OSF.ConstantNames.FileVersion; - appInfo.hostJSVersion="16.0.7524.3000"; - var docUrl=context.get_docUrl(); - appInfo.docUrl=omexDomainRegex.test(docUrl) ? docUrl : ""; - var url=location.href; - if(url) - url=url.split("?")[0].split("#")[0]; - appInfo.appURL=url; - (function getUserIdAndAssetIdFromToken(token, appInfo) - { - var xmlContent; - var parser; - var xmlDoc; - appInfo.assetId=""; - appInfo.userId=""; - try - { - xmlContent=decodeURIComponent(token); - parser=new DOMParser; - xmlDoc=parser.parseFromString(xmlContent,"text/xml"); - var cidNode=xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("cid"); - var oidNode=xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("oid"); - if(cidNode && cidNode.nodeValue) - appInfo.userId=cidNode.nodeValue; - else if(oidNode && oidNode.nodeValue) - appInfo.userId=oidNode.nodeValue; - appInfo.assetId=xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue - } - catch(e){} - finally - { - xmlContent=null; - xmlDoc=null; - parser=null - } - })(context.get_eToken(),appInfo); - (function handleLifecycle() - { - var startTime=new Date; - var lastFocus=null; - var focusTime=0; - var finished=false; - var adjustFocusTime=function() - { - if(document.hasFocus()) - { - if(lastFocus==null) - lastFocus=new Date - } - else if(lastFocus) - { - focusTime+=Math.abs((new Date).getTime() - lastFocus.getTime()); - lastFocus=null - } - }; - var eventList=[]; - eventList.push(new Event("focus",adjustFocusTime)); - eventList.push(new Event("blur",adjustFocusTime)); - eventList.push(new Event("focusout",adjustFocusTime)); - eventList.push(new Event("focusin",adjustFocusTime)); - var exitFunction=function() - { - for(var i=0; i < eventList.length; i++) - OSF.OUtil.removeEventListener(window,eventList[i].name,eventList[i].handler); - eventList.length=0; - if(!finished) - { - if(document.hasFocus() && lastFocus) - { - focusTime+=Math.abs((new Date).getTime() - lastFocus.getTime()); - lastFocus=null - } - OSFAppTelemetry.onAppClosed(Math.abs((new Date).getTime() - startTime.getTime()),focusTime); - finished=true - } - }; - eventList.push(new Event("beforeunload",exitFunction)); - eventList.push(new Event("unload",exitFunction)); - for(var i=0; i < eventList.length; i++) - OSF.OUtil.addEventListener(window,eventList[i].name,eventList[i].handler); - adjustFocusTime() - })(); - OSFAppTelemetry.onAppActivated() - } - OSFAppTelemetry.initialize=initialize; - function onAppActivated() - { - if(!appInfo) - return; - (new AppStorage).enumerateLog(function(id, log) - { - return(new AppLogger).LogRawData(log) - },true); - var data=new OSFLog.AppActivatedUsageData; - data.SessionId=sessionId; - data.AppId=appInfo.appId; - data.AssetId=appInfo.assetId; - data.AppURL=appInfo.appURL; - data.UserId=appInfo.userId; - data.ClientId=appInfo.clientId; - data.Browser=appInfo.browser; - data.Host=appInfo.host; - data.HostVersion=appInfo.hostVersion; - data.CorrelationId=appInfo.correlationId; - data.AppSizeWidth=window.innerWidth; - data.AppSizeHeight=window.innerHeight; - data.AppInstanceId=appInfo.appInstanceId; - data.Message=appInfo.message; - data.DocUrl=appInfo.docUrl; - data.OfficeJSVersion=appInfo.officeJSVersion; - data.HostJSVersion=appInfo.hostJSVersion; - (new AppLogger).LogData(data); - setTimeout(function() - { - if(!OSF.Logger) - return; - OSF.Logger.allowUploadingData() - },100) - } - OSFAppTelemetry.onAppActivated=onAppActivated; - function onScriptDone(scriptId, msStartTime, msResponseTime, appCorrelationId) - { - var data=new OSFLog.ScriptLoadUsageData; - data.CorrelationId=appCorrelationId; - data.SessionId=sessionId; - data.ScriptId=scriptId; - data.StartTime=msStartTime; - data.ResponseTime=msResponseTime; - (new AppLogger).LogData(data) - } - OSFAppTelemetry.onScriptDone=onScriptDone; - function onCallDone(apiType, id, parameters, msResponseTime, errorType) - { - if(!appInfo) - return; - var data=new OSFLog.APIUsageUsageData; - data.CorrelationId=osfControlAppCorrelationId; - data.SessionId=sessionId; - data.APIType=apiType; - data.APIID=id; - data.Parameters=parameters; - data.ResponseTime=msResponseTime; - data.ErrorType=errorType; - (new AppLogger).LogData(data) - } - OSFAppTelemetry.onCallDone=onCallDone; - function onMethodDone(id, args, msResponseTime, errorType) - { - var parameters=null; - if(args) - if(typeof args=="number") - parameters=String(args); - else if(typeof args==="object") - for(var index in args) - { - if(parameters !==null) - parameters+=","; - else - parameters=""; - if(typeof args[index]=="number") - parameters+=String(args[index]) - } - else - parameters=""; - OSF.AppTelemetry.onCallDone("method",id,parameters,msResponseTime,errorType) - } - OSFAppTelemetry.onMethodDone=onMethodDone; - function onPropertyDone(propertyName, msResponseTime) - { - OSF.AppTelemetry.onCallDone("property",-1,propertyName,msResponseTime) - } - OSFAppTelemetry.onPropertyDone=onPropertyDone; - function onEventDone(id, errorType) - { - OSF.AppTelemetry.onCallDone("event",id,null,0,errorType) - } - OSFAppTelemetry.onEventDone=onEventDone; - function onRegisterDone(register, id, msResponseTime, errorType) - { - OSF.AppTelemetry.onCallDone(register ? "registerevent" : "unregisterevent",id,null,msResponseTime,errorType) - } - OSFAppTelemetry.onRegisterDone=onRegisterDone; - function onAppClosed(openTime, focusTime) - { - if(!appInfo) - return; - var data=new OSFLog.AppClosedUsageData; - data.CorrelationId=osfControlAppCorrelationId; - data.SessionId=sessionId; - data.FocusTime=focusTime; - data.OpenTime=openTime; - data.AppSizeFinalWidth=window.innerWidth; - data.AppSizeFinalHeight=window.innerHeight; - (new AppStorage).saveLog(sessionId,data.SerializeRow()) - } - OSFAppTelemetry.onAppClosed=onAppClosed; - function setOsfControlAppCorrelationId(correlationId) - { - osfControlAppCorrelationId=correlationId - } - OSFAppTelemetry.setOsfControlAppCorrelationId=setOsfControlAppCorrelationId; - function doAppInitializationLogging(isException, message) - { - var data=new OSFLog.AppInitializationUsageData; - data.CorrelationId=osfControlAppCorrelationId; - data.SessionId=sessionId; - data.SuccessCode=isException ? 1 : 0; - data.Message=message; - (new AppLogger).LogData(data) - } - OSFAppTelemetry.doAppInitializationLogging=doAppInitializationLogging; - function logAppCommonMessage(message) - { - doAppInitializationLogging(false,message) - } - OSFAppTelemetry.logAppCommonMessage=logAppCommonMessage; - function logAppException(errorMessage) - { - doAppInitializationLogging(true,errorMessage) - } - OSFAppTelemetry.logAppException=logAppException; - OSF.AppTelemetry=OSFAppTelemetry -})(OSFAppTelemetry || (OSFAppTelemetry={})); + "use strict"; + var appInfo; + var sessionId = OSF.OUtil.Guid.generateNewGuid(); + var osfControlAppCorrelationId = ""; + var omexDomainRegex = new RegExp("^https?://store\\.office(ppe|-int)?\\.com/","i"); + OSFAppTelemetry.enableTelemetry = true; + var AppInfo = function() + { + function AppInfo(){} + return AppInfo + }(); + var Event = function() + { + function Event(name, handler) + { + this.name = name; + this.handler = handler + } + return Event + }(); + var AppStorage = function() + { + function AppStorage() + { + this.clientIDKey = "Office API client"; + this.logIdSetKey = "Office App Log Id Set" + } + AppStorage.prototype.getClientId = function() + { + var clientId = this.getValue(this.clientIDKey); + if(!clientId || clientId.length <= 0 || clientId.length > 40) + { + clientId = OSF.OUtil.Guid.generateNewGuid(); + this.setValue(this.clientIDKey,clientId) + } + return clientId + }; + AppStorage.prototype.saveLog = function(logId, log) + { + var logIdSet = this.getValue(this.logIdSetKey); + logIdSet = (logIdSet && logIdSet.length > 0 ? logIdSet + ";" : "") + logId; + this.setValue(this.logIdSetKey,logIdSet); + this.setValue(logId,log) + }; + AppStorage.prototype.enumerateLog = function(callback, clean) + { + var logIdSet = this.getValue(this.logIdSetKey); + if(logIdSet) + { + var ids = logIdSet.split(";"); + for(var id in ids) + { + var logId = ids[id]; + var log = this.getValue(logId); + if(log) + { + if(callback) + callback(logId,log); + if(clean) + this.remove(logId) + } + } + if(clean) + this.remove(this.logIdSetKey) + } + }; + AppStorage.prototype.getValue = function(key) + { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + var value = ""; + if(osfLocalStorage) + value = osfLocalStorage.getItem(key); + return value + }; + AppStorage.prototype.setValue = function(key, value) + { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + if(osfLocalStorage) + osfLocalStorage.setItem(key,value) + }; + AppStorage.prototype.remove = function(key) + { + var osfLocalStorage = OSF.OUtil.getLocalStorage(); + if(osfLocalStorage) + try + { + osfLocalStorage.removeItem(key) + } + catch(ex){} + }; + return AppStorage + }(); + var AppLogger = function() + { + function AppLogger(){} + AppLogger.prototype.LogData = function(data) + { + if(!OSF.Logger || !OSFAppTelemetry.enableTelemetry) + return; + try + { + OSFAriaLogger.AriaLogger.getInstance().logData(data) + } + catch(e){} + }; + AppLogger.prototype.LogRawData = function(log) + { + if(!OSF.Logger || !OSFAppTelemetry.enableTelemetry) + return; + try + { + OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)) + } + catch(e){} + }; + return AppLogger + }(); + function trimStringToLowerCase(input) + { + if(input) + input = input.replace(/[{}]/g,"").toLowerCase(); + return input || "" + } + function initialize(context) + { + if(!OSF.Logger) + return; + if(appInfo) + return; + appInfo = new AppInfo; + if(context.get_hostFullVersion()) + appInfo.hostVersion = context.get_hostFullVersion(); + else + appInfo.hostVersion = context.get_appVersion(); + appInfo.appId = context.get_id(); + appInfo.host = context.get_appName(); + appInfo.browser = window.navigator.userAgent; + appInfo.correlationId = trimStringToLowerCase(context.get_correlationId()); + appInfo.clientId = (new AppStorage).getClientId(); + appInfo.appInstanceId = context.get_appInstanceId(); + if(appInfo.appInstanceId) + appInfo.appInstanceId = appInfo.appInstanceId.replace(/[{}]/g,"").toLowerCase(); + appInfo.message = context.get_hostCustomMessage(); + appInfo.officeJSVersion = OSF.ConstantNames.FileVersion; + appInfo.hostJSVersion = "16.0.8620.1000"; + if(context._wacHostEnvironment) + appInfo.wacHostEnvironment = context._wacHostEnvironment; + if(context._isFromWacAutomation !== undefined && context._isFromWacAutomation !== null) + appInfo.isFromWacAutomation = context._isFromWacAutomation.toString().toLowerCase(); + var docUrl = context.get_docUrl(); + appInfo.docUrl = omexDomainRegex.test(docUrl) ? docUrl : ""; + var url = location.href; + if(url) + url = url.split("?")[0].split("#")[0]; + appInfo.appURL = url; + (function getUserIdAndAssetIdFromToken(token, appInfo) + { + var xmlContent; + var parser; + var xmlDoc; + appInfo.assetId = ""; + appInfo.userId = ""; + try + { + xmlContent = decodeURIComponent(token); + parser = new DOMParser; + xmlDoc = parser.parseFromString(xmlContent,"text/xml"); + var cidNode = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("cid"); + var oidNode = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("oid"); + if(cidNode && cidNode.nodeValue) + appInfo.userId = cidNode.nodeValue; + else if(oidNode && oidNode.nodeValue) + appInfo.userId = oidNode.nodeValue; + appInfo.assetId = xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue + } + catch(e){} + finally + { + xmlContent = null; + xmlDoc = null; + parser = null + } + })(context.get_eToken(),appInfo); + (function handleLifecycle() + { + var startTime = new Date; + var lastFocus = null; + var focusTime = 0; + var finished = false; + var adjustFocusTime = function() + { + if(document.hasFocus()) + { + if(lastFocus == null) + lastFocus = new Date + } + else if(lastFocus) + { + focusTime += Math.abs((new Date).getTime() - lastFocus.getTime()); + lastFocus = null + } + }; + var eventList = []; + eventList.push(new Event("focus",adjustFocusTime)); + eventList.push(new Event("blur",adjustFocusTime)); + eventList.push(new Event("focusout",adjustFocusTime)); + eventList.push(new Event("focusin",adjustFocusTime)); + var exitFunction = function() + { + for(var i = 0; i < eventList.length; i++) + OSF.OUtil.removeEventListener(window,eventList[i].name,eventList[i].handler); + eventList.length = 0; + if(!finished) + { + if(document.hasFocus() && lastFocus) + { + focusTime += Math.abs((new Date).getTime() - lastFocus.getTime()); + lastFocus = null + } + OSFAppTelemetry.onAppClosed(Math.abs((new Date).getTime() - startTime.getTime()),focusTime); + finished = true + } + }; + eventList.push(new Event("beforeunload",exitFunction)); + eventList.push(new Event("unload",exitFunction)); + for(var i = 0; i < eventList.length; i++) + OSF.OUtil.addEventListener(window,eventList[i].name,eventList[i].handler); + adjustFocusTime() + })(); + OSFAppTelemetry.onAppActivated() + } + OSFAppTelemetry.initialize = initialize; + function onAppActivated() + { + if(!appInfo) + return; + (new AppStorage).enumerateLog(function(id, log) + { + return(new AppLogger).LogRawData(log) + },true); + var data = new OSFLog.AppActivatedUsageData; + data.SessionId = sessionId; + data.AppId = appInfo.appId; + data.AssetId = appInfo.assetId; + data.AppURL = appInfo.appURL; + data.UserId = appInfo.userId; + data.ClientId = appInfo.clientId; + data.Browser = appInfo.browser; + data.Host = appInfo.host; + data.HostVersion = appInfo.hostVersion; + data.CorrelationId = trimStringToLowerCase(appInfo.correlationId); + data.AppSizeWidth = window.innerWidth; + data.AppSizeHeight = window.innerHeight; + data.AppInstanceId = appInfo.appInstanceId; + data.Message = appInfo.message; + data.DocUrl = appInfo.docUrl; + data.OfficeJSVersion = appInfo.officeJSVersion; + data.HostJSVersion = appInfo.hostJSVersion; + if(appInfo.wacHostEnvironment) + data.WacHostEnvironment = appInfo.wacHostEnvironment; + if(appInfo.isFromWacAutomation !== undefined && appInfo.isFromWacAutomation !== null) + data.IsFromWacAutomation = appInfo.isFromWacAutomation; + (new AppLogger).LogData(data); + setTimeout(function() + { + if(!OSF.Logger) + return; + OSF.Logger.allowUploadingData() + },100) + } + OSFAppTelemetry.onAppActivated = onAppActivated; + function onScriptDone(scriptId, msStartTime, msResponseTime, appCorrelationId) + { + var data = new OSFLog.ScriptLoadUsageData; + data.CorrelationId = trimStringToLowerCase(appCorrelationId); + data.SessionId = sessionId; + data.ScriptId = scriptId; + data.StartTime = msStartTime; + data.ResponseTime = msResponseTime; + (new AppLogger).LogData(data) + } + OSFAppTelemetry.onScriptDone = onScriptDone; + function onCallDone(apiType, id, parameters, msResponseTime, errorType) + { + if(!appInfo) + return; + var data = new OSFLog.APIUsageUsageData; + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.APIType = apiType; + data.APIID = id; + data.Parameters = parameters; + data.ResponseTime = msResponseTime; + data.ErrorType = errorType; + (new AppLogger).LogData(data) + } + OSFAppTelemetry.onCallDone = onCallDone; + function onMethodDone(id, args, msResponseTime, errorType) + { + var parameters = null; + if(args) + if(typeof args == "number") + parameters = String(args); + else if(typeof args === "object") + for(var index in args) + { + if(parameters !== null) + parameters += ","; + else + parameters = ""; + if(typeof args[index] == "number") + parameters += String(args[index]) + } + else + parameters = ""; + OSF.AppTelemetry.onCallDone("method",id,parameters,msResponseTime,errorType) + } + OSFAppTelemetry.onMethodDone = onMethodDone; + function onPropertyDone(propertyName, msResponseTime) + { + OSF.AppTelemetry.onCallDone("property",-1,propertyName,msResponseTime) + } + OSFAppTelemetry.onPropertyDone = onPropertyDone; + function onEventDone(id, errorType) + { + OSF.AppTelemetry.onCallDone("event",id,null,0,errorType) + } + OSFAppTelemetry.onEventDone = onEventDone; + function onRegisterDone(register, id, msResponseTime, errorType) + { + OSF.AppTelemetry.onCallDone(register ? "registerevent" : "unregisterevent",id,null,msResponseTime,errorType) + } + OSFAppTelemetry.onRegisterDone = onRegisterDone; + function onAppClosed(openTime, focusTime) + { + if(!appInfo) + return; + var data = new OSFLog.AppClosedUsageData; + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.FocusTime = focusTime; + data.OpenTime = openTime; + data.AppSizeFinalWidth = window.innerWidth; + data.AppSizeFinalHeight = window.innerHeight; + (new AppStorage).saveLog(sessionId,data.SerializeRow()) + } + OSFAppTelemetry.onAppClosed = onAppClosed; + function setOsfControlAppCorrelationId(correlationId) + { + osfControlAppCorrelationId = trimStringToLowerCase(correlationId) + } + OSFAppTelemetry.setOsfControlAppCorrelationId = setOsfControlAppCorrelationId; + function doAppInitializationLogging(isException, message) + { + var data = new OSFLog.AppInitializationUsageData; + data.CorrelationId = trimStringToLowerCase(osfControlAppCorrelationId); + data.SessionId = sessionId; + data.SuccessCode = isException ? 1 : 0; + data.Message = message; + (new AppLogger).LogData(data) + } + OSFAppTelemetry.doAppInitializationLogging = doAppInitializationLogging; + function logAppCommonMessage(message) + { + doAppInitializationLogging(false,message) + } + OSFAppTelemetry.logAppCommonMessage = logAppCommonMessage; + function logAppException(errorMessage) + { + doAppInitializationLogging(true,errorMessage) + } + OSFAppTelemetry.logAppException = logAppException; + OSF.AppTelemetry = OSFAppTelemetry +})(OSFAppTelemetry || (OSFAppTelemetry = {})); var OfficeExt; (function(OfficeExt) { - var AppCommand; - (function(AppCommand) - { - var AppCommandManager=function() - { - function AppCommandManager() - { - var _this=this; - this._pseudoDocument=null; - this._eventDispatch=null; - this._processAppCommandInvocation=function(args) - { - var verifyResult=_this._verifyManifestCallback(args.callbackName); - if(verifyResult.errorCode !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) - { - _this._invokeAppCommandCompletedMethod(args.appCommandId,verifyResult.errorCode,""); - return - } - var eventObj=_this._constructEventObjectForCallback(args); - if(eventObj) - window.setTimeout(function() - { - verifyResult.callback(eventObj) - },0); - else - _this._invokeAppCommandCompletedMethod(args.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"") - } - } - AppCommandManager.initializeOsfDda=function() - { - OSF.DDA.AsyncMethodNames.addNames({AppCommandInvocationCompletedAsync: "appCommandInvocationCompletedAsync"}); - OSF.DDA.AsyncMethodCalls.define({ - method: OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync, - requiredArguments: [{ - name: Microsoft.Office.WebExtension.Parameters.Id, - types: ["string"] - },{ - name: Microsoft.Office.WebExtension.Parameters.Status, - types: ["number"] - },{ - name: Microsoft.Office.WebExtension.Parameters.Data, - types: ["string"] - }] - }); - OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{AppCommandInvokedEvent: "AppCommandInvokedEvent"}); - OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppCommandInvoked: "appCommandInvoked"}); - OSF.OUtil.setNamespace("AppCommand",OSF.DDA); - OSF.DDA.AppCommand.AppCommandInvokedEventArgs=OfficeExt.AppCommand.AppCommandInvokedEventArgs - }; - AppCommandManager.prototype.initializeAndChangeOnce=function(callback) - { - AppCommand.registerDdaFacade(); - this._pseudoDocument={}; - OSF.DDA.DispIdHost.addAsyncMethods(this._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync,]); - this._eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked,]); - var onRegisterCompleted=function(result) - { - if(callback) - if(result.status=="succeeded") - callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); - else - callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError) - }; - OSF.DDA.DispIdHost.addEventSupport(this._pseudoDocument,this._eventDispatch); - this._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,this._processAppCommandInvocation,onRegisterCompleted) - }; - AppCommandManager.prototype._verifyManifestCallback=function(callbackName) - { - var defaultResult={ - callback: null, - errorCode: OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback - }; - callbackName=callbackName.trim(); - try - { - var callList=callbackName.split("."); - var parentObject=window; - for(var i=0; i < callList.length - 1; i++) - if(parentObject[callList[i]] && (typeof parentObject[callList[i]]=="object" || typeof parentObject[callList[i]]=="function")) - parentObject=parentObject[callList[i]]; - else - return defaultResult; - var callbackFunc=parentObject[callList[callList.length - 1]]; - if(typeof callbackFunc !="function") - return defaultResult - } - catch(e) - { - return defaultResult - } - return{ - callback: callbackFunc, - errorCode: OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess - } - }; - AppCommandManager.prototype._invokeAppCommandCompletedMethod=function(appCommandId, resultCode, data) - { - this._pseudoDocument.appCommandInvocationCompletedAsync(appCommandId,resultCode,data) - }; - AppCommandManager.prototype._constructEventObjectForCallback=function(args) - { - var _this=this; - var eventObj=new AppCommandCallbackEventArgs; - try - { - var jsonData=JSON.parse(args.eventObjStr); - this._translateEventObjectInternal(jsonData,eventObj); - Object.defineProperty(eventObj,"completed",{ - value: function(completedContext) - { - eventObj.completedContext=completedContext; - var jsonString=JSON.stringify(eventObj); - _this._invokeAppCommandCompletedMethod(args.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,jsonString) - }, - enumerable: true - }) - } - catch(e) - { - eventObj=null - } - return eventObj - }; - AppCommandManager.prototype._translateEventObjectInternal=function(input, output) - { - for(var key in input) - { - if(!input.hasOwnProperty(key)) - continue; - var inputChild=input[key]; - if(typeof inputChild=="object" && inputChild !=null) - { - OSF.OUtil.defineEnumerableProperty(output,key,{value: {}}); - this._translateEventObjectInternal(inputChild,output[key]) - } - else - Object.defineProperty(output,key,{ - value: inputChild, - enumerable: true, - writable: true - }) - } - }; - AppCommandManager.prototype._constructObjectByTemplate=function(template, input) - { - var output={}; - if(!template || !input) - return output; - for(var key in template) - if(template.hasOwnProperty(key)) - { - output[key]=null; - if(input[key] !=null) - { - var templateChild=template[key]; - var inputChild=input[key]; - var inputChildType=typeof inputChild; - if(typeof templateChild=="object" && templateChild !=null) - output[key]=this._constructObjectByTemplate(templateChild,inputChild); - else if(inputChildType=="number" || inputChildType=="string" || inputChildType=="boolean") - output[key]=inputChild - } - } - return output - }; - AppCommandManager.instance=function() - { - if(AppCommandManager._instance==null) - AppCommandManager._instance=new AppCommandManager; - return AppCommandManager._instance - }; - AppCommandManager._instance=null; - return AppCommandManager - }(); - AppCommand.AppCommandManager=AppCommandManager; - var AppCommandInvokedEventArgs=function() - { - function AppCommandInvokedEventArgs(appCommandId, callbackName, eventObjStr) - { - this.type=Microsoft.Office.WebExtension.EventType.AppCommandInvoked; - this.appCommandId=appCommandId; - this.callbackName=callbackName; - this.eventObjStr=eventObjStr - } - AppCommandInvokedEventArgs.create=function(eventProperties) - { - return new AppCommandInvokedEventArgs(eventProperties[AppCommand.AppCommandInvokedEventEnums.AppCommandId],eventProperties[AppCommand.AppCommandInvokedEventEnums.CallbackName],eventProperties[AppCommand.AppCommandInvokedEventEnums.EventObjStr]) - }; - return AppCommandInvokedEventArgs - }(); - AppCommand.AppCommandInvokedEventArgs=AppCommandInvokedEventArgs; - var AppCommandCallbackEventArgs=function() - { - function AppCommandCallbackEventArgs(){} - return AppCommandCallbackEventArgs - }(); - AppCommand.AppCommandCallbackEventArgs=AppCommandCallbackEventArgs; - AppCommand.AppCommandInvokedEventEnums={ - AppCommandId: "appCommandId", - CallbackName: "callbackName", - EventObjStr: "eventObjStr" - } - })(AppCommand=OfficeExt.AppCommand || (OfficeExt.AppCommand={})) -})(OfficeExt || (OfficeExt={})); + var AppCommand; + (function(AppCommand) + { + var AppCommandManager = function() + { + function AppCommandManager() + { + var _this = this; + this._pseudoDocument = null; + this._eventDispatch = null; + this._processAppCommandInvocation = function(args) + { + var verifyResult = _this._verifyManifestCallback(args.callbackName); + if(verifyResult.errorCode != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) + { + _this._invokeAppCommandCompletedMethod(args.appCommandId,verifyResult.errorCode,""); + return + } + var eventObj = _this._constructEventObjectForCallback(args); + if(eventObj) + window.setTimeout(function() + { + verifyResult.callback(eventObj) + },0); + else + _this._invokeAppCommandCompletedMethod(args.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"") + } + } + AppCommandManager.initializeOsfDda = function() + { + OSF.DDA.AsyncMethodNames.addNames({AppCommandInvocationCompletedAsync: "appCommandInvocationCompletedAsync"}); + OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync, + requiredArguments: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + types: ["string"] + },{ + name: Microsoft.Office.WebExtension.Parameters.Status, + types: ["number"] + },{ + name: Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData, + types: ["string"] + }] + }); + OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{AppCommandInvokedEvent: "AppCommandInvokedEvent"}); + OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppCommandInvoked: "appCommandInvoked"}); + OSF.OUtil.setNamespace("AppCommand",OSF.DDA); + OSF.DDA.AppCommand.AppCommandInvokedEventArgs = OfficeExt.AppCommand.AppCommandInvokedEventArgs + }; + AppCommandManager.prototype.initializeAndChangeOnce = function(callback) + { + AppCommand.registerDdaFacade(); + this._pseudoDocument = {}; + OSF.DDA.DispIdHost.addAsyncMethods(this._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync,]); + this._eventDispatch = new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked,]); + var onRegisterCompleted = function(result) + { + if(callback) + if(result.status == "succeeded") + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); + else + callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError) + }; + OSF.DDA.DispIdHost.addEventSupport(this._pseudoDocument,this._eventDispatch); + this._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,this._processAppCommandInvocation,onRegisterCompleted) + }; + AppCommandManager.prototype._verifyManifestCallback = function(callbackName) + { + var defaultResult = { + callback: null, + errorCode: OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback + }; + callbackName = callbackName.trim(); + try + { + var callList = callbackName.split("."); + var parentObject = window; + for(var i = 0; i < callList.length - 1; i++) + if(parentObject[callList[i]] && (typeof parentObject[callList[i]] == "object" || typeof parentObject[callList[i]] == "function")) + parentObject = parentObject[callList[i]]; + else + return defaultResult; + var callbackFunc = parentObject[callList[callList.length - 1]]; + if(typeof callbackFunc != "function") + return defaultResult + } + catch(e) + { + return defaultResult + } + return{ + callback: callbackFunc, + errorCode: OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess + } + }; + AppCommandManager.prototype._invokeAppCommandCompletedMethod = function(appCommandId, resultCode, data) + { + this._pseudoDocument.appCommandInvocationCompletedAsync(appCommandId,resultCode,data) + }; + AppCommandManager.prototype._constructEventObjectForCallback = function(args) + { + var _this = this; + var eventObj = new AppCommandCallbackEventArgs; + try + { + var jsonData = JSON.parse(args.eventObjStr); + this._translateEventObjectInternal(jsonData,eventObj); + Object.defineProperty(eventObj,"completed",{ + value: function(completedContext) + { + eventObj.completedContext = completedContext; + var jsonString = JSON.stringify(eventObj); + _this._invokeAppCommandCompletedMethod(args.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,jsonString) + }, + enumerable: true + }) + } + catch(e) + { + eventObj = null + } + return eventObj + }; + AppCommandManager.prototype._translateEventObjectInternal = function(input, output) + { + for(var key in input) + { + if(!input.hasOwnProperty(key)) + continue; + var inputChild = input[key]; + if(typeof inputChild == "object" && inputChild != null) + { + OSF.OUtil.defineEnumerableProperty(output,key,{value: {}}); + this._translateEventObjectInternal(inputChild,output[key]) + } + else + Object.defineProperty(output,key,{ + value: inputChild, + enumerable: true, + writable: true + }) + } + }; + AppCommandManager.prototype._constructObjectByTemplate = function(template, input) + { + var output = {}; + if(!template || !input) + return output; + for(var key in template) + if(template.hasOwnProperty(key)) + { + output[key] = null; + if(input[key] != null) + { + var templateChild = template[key]; + var inputChild = input[key]; + var inputChildType = typeof inputChild; + if(typeof templateChild == "object" && templateChild != null) + output[key] = this._constructObjectByTemplate(templateChild,inputChild); + else if(inputChildType == "number" || inputChildType == "string" || inputChildType == "boolean") + output[key] = inputChild + } + } + return output + }; + AppCommandManager.instance = function() + { + if(AppCommandManager._instance == null) + AppCommandManager._instance = new AppCommandManager; + return AppCommandManager._instance + }; + AppCommandManager._instance = null; + return AppCommandManager + }(); + AppCommand.AppCommandManager = AppCommandManager; + var AppCommandInvokedEventArgs = function() + { + function AppCommandInvokedEventArgs(appCommandId, callbackName, eventObjStr) + { + this.type = Microsoft.Office.WebExtension.EventType.AppCommandInvoked; + this.appCommandId = appCommandId; + this.callbackName = callbackName; + this.eventObjStr = eventObjStr + } + AppCommandInvokedEventArgs.create = function(eventProperties) + { + return new AppCommandInvokedEventArgs(eventProperties[AppCommand.AppCommandInvokedEventEnums.AppCommandId],eventProperties[AppCommand.AppCommandInvokedEventEnums.CallbackName],eventProperties[AppCommand.AppCommandInvokedEventEnums.EventObjStr]) + }; + return AppCommandInvokedEventArgs + }(); + AppCommand.AppCommandInvokedEventArgs = AppCommandInvokedEventArgs; + var AppCommandCallbackEventArgs = function() + { + function AppCommandCallbackEventArgs(){} + return AppCommandCallbackEventArgs + }(); + AppCommand.AppCommandCallbackEventArgs = AppCommandCallbackEventArgs; + AppCommand.AppCommandInvokedEventEnums = { + AppCommandId: "appCommandId", + CallbackName: "callbackName", + EventObjStr: "eventObjStr" + } + })(AppCommand = OfficeExt.AppCommand || (OfficeExt.AppCommand = {})) +})(OfficeExt || (OfficeExt = {})); OfficeExt.AppCommand.AppCommandManager.initializeOsfDda(); var OfficeExt; (function(OfficeExt) { - var AppCommand; - (function(AppCommand) - { - function registerDdaFacade() - { - if(OSF.DDA.SafeArray) - { - var parameterMap=OSF.DDA.SafeArray.Delegate.ParameterMap; - parameterMap.define({ - type: OSF.DDA.MethodDispId.dispidAppCommandInvocationCompletedMethod, - toHost: [{ - name: Microsoft.Office.WebExtension.Parameters.Id, - value: 0 - },{ - name: Microsoft.Office.WebExtension.Parameters.Status, - value: 1 - },{ - name: Microsoft.Office.WebExtension.Parameters.Data, - value: 2 - }] - }); - parameterMap.define({ - type: OSF.DDA.EventDispId.dispidAppCommandInvokedEvent, - fromHost: [{ - name: OSF.DDA.EventDescriptors.AppCommandInvokedEvent, - value: parameterMap.self - }], - isComplexType: true - }); - parameterMap.define({ - type: OSF.DDA.EventDescriptors.AppCommandInvokedEvent, - fromHost: [{ - name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.AppCommandId, - value: 0 - },{ - name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.CallbackName, - value: 1 - },{ - name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.EventObjStr, - value: 2 - },], - isComplexType: true - }) - } - } - AppCommand.registerDdaFacade=registerDdaFacade - })(AppCommand=OfficeExt.AppCommand || (OfficeExt.AppCommand={})) -})(OfficeExt || (OfficeExt={})); + var AppCommand; + (function(AppCommand) + { + function registerDdaFacade() + { + if(OSF.DDA.SafeArray) + { + var parameterMap = OSF.DDA.SafeArray.Delegate.ParameterMap; + parameterMap.define({ + type: OSF.DDA.MethodDispId.dispidAppCommandInvocationCompletedMethod, + toHost: [{ + name: Microsoft.Office.WebExtension.Parameters.Id, + value: 0 + },{ + name: Microsoft.Office.WebExtension.Parameters.Status, + value: 1 + },{ + name: Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData, + value: 2 + }] + }); + parameterMap.define({ + type: OSF.DDA.EventDispId.dispidAppCommandInvokedEvent, + fromHost: [{ + name: OSF.DDA.EventDescriptors.AppCommandInvokedEvent, + value: parameterMap.self + }], + isComplexType: true + }); + parameterMap.define({ + type: OSF.DDA.EventDescriptors.AppCommandInvokedEvent, + fromHost: [{ + name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.AppCommandId, + value: 0 + },{ + name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.CallbackName, + value: 1 + },{ + name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.EventObjStr, + value: 2 + },], + isComplexType: true + }) + } + } + AppCommand.registerDdaFacade = registerDdaFacade + })(AppCommand = OfficeExt.AppCommand || (OfficeExt.AppCommand = {})) +})(OfficeExt || (OfficeExt = {})); OSF.DDA.AsyncMethodNames.addNames({CloseContainerAsync: "closeContainer"}); var OfficeExt; (function(OfficeExt) { - var Container=function() - { - function Container(parameters){} - return Container - }(); - OfficeExt.Container=Container -})(OfficeExt || (OfficeExt={})); + var Container = function() + { + function Container(parameters){} + return Container + }(); + OfficeExt.Container = Container +})(OfficeExt || (OfficeExt = {})); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.CloseContainerAsync, + requiredArguments: [], + supportedOptions: [], + privateStateCallbacks: [] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidCloseContainerMethod, + fromHost: [], + toHost: [] +}); +OSF.DDA.AsyncMethodNames.addNames({GetAccessTokenAsync: "getAccessTokenAsync"}); +OSF.DDA.Auth = function OSF_DDA_Auth(){}; OSF.DDA.AsyncMethodCalls.define({ - method: OSF.DDA.AsyncMethodNames.CloseContainerAsync, - requiredArguments: [], - supportedOptions: [], - privateStateCallbacks: [] + method: OSF.DDA.AsyncMethodNames.GetAccessTokenAsync, + requiredArguments: [], + supportedOptions: [{ + name: Microsoft.Office.WebExtension.Parameters.ForceConsent, + value: { + types: ["boolean"], + defaultValue: false + } + },{ + name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, + value: { + types: ["boolean"], + defaultValue: false + } + },{ + name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, + value: { + types: ["string"], + defaultValue: "" + } + }], + onSucceeded: function(dataDescriptor, caller, callArgs) + { + var data = dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + return data + } }); OSF.DDA.SafeArray.Delegate.ParameterMap.define({ - type: OSF.DDA.MethodDispId.dispidCloseContainerMethod, - fromHost: [], - toHost: [] + type: OSF.DDA.MethodDispId.dispidGetAccessTokenMethod, + toHost: [{ + name: Microsoft.Office.WebExtension.Parameters.ForceConsent, + value: 0 + },{ + name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, + value: 1 + },{ + name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, + value: 2 + }], + fromHost: [{ + name: Microsoft.Office.WebExtension.Parameters.Data, + value: OSF.DDA.SafeArray.Delegate.ParameterMap.self + }] }); var OfficeJsClient_OutlookWin32; (function(OfficeJsClient_OutlookWin32) { - function prepareApiSurface(appContext) - { - if(appContext.get_isDialog()) - appContext.ui=new OSF.DDA.UI.ChildUI; - else - { - appContext.ui=new OSF.DDA.UI.ParentUI; - OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync]) - } - } - OfficeJsClient_OutlookWin32.prepareApiSurface=prepareApiSurface; - function prepareRightAfterWebExtensionInitialize() - { - var appCommandHandler=OfficeExt.AppCommand.AppCommandManager.instance(); - appCommandHandler.initializeAndChangeOnce() - } - OfficeJsClient_OutlookWin32.prepareRightAfterWebExtensionInitialize=prepareRightAfterWebExtensionInitialize -})(OfficeJsClient_OutlookWin32 || (OfficeJsClient_OutlookWin32={})); -OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize=function OSF_InitializationHelper$prepareRightAfterWebExtensionInitialize() + function prepareApiSurface(appContext) + { + if(appContext.get_isDialog()) + appContext.ui = new OSF.DDA.UI.ChildUI; + else + { + appContext.ui = new OSF.DDA.UI.ParentUI; + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync]) + } + appContext.auth = new OSF.DDA.Auth; + OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth,[OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]) + } + OfficeJsClient_OutlookWin32.prepareApiSurface = prepareApiSurface; + function prepareRightAfterWebExtensionInitialize() + { + var appCommandHandler = OfficeExt.AppCommand.AppCommandManager.instance(); + appCommandHandler.initializeAndChangeOnce() + } + OfficeJsClient_OutlookWin32.prepareRightAfterWebExtensionInitialize = prepareRightAfterWebExtensionInitialize +})(OfficeJsClient_OutlookWin32 || (OfficeJsClient_OutlookWin32 = {})); +OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize = function OSF_InitializationHelper$prepareRightAfterWebExtensionInitialize() { - OfficeJsClient_OutlookWin32.prepareRightAfterWebExtensionInitialize() + OfficeJsClient_OutlookWin32.prepareRightAfterWebExtensionInitialize() }; -OSF.InitializationHelper.prototype.prepareApiSurface=function OSF_InitializationHelper$prepareApiSurface(appContext) +OSF.InitializationHelper.prototype.prepareApiSurface = function OSF_InitializationHelper$prepareApiSurface(appContext) { - var license=new OSF.DDA.License(appContext.get_eToken()); - if(appContext.get_appName()==OSF.AppName.OutlookWebApp) - { - OSF.WebApp._UpdateLinksForHostAndXdmInfo(); - this.initWebDialog(appContext); - OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(appContext,this._settings,license,appContext.appOM)); - OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.WAC.getDelegateMethods,OSF.DDA.WAC.Delegate.ParameterMap)) - } - else - { - OfficeJsClient_OutlookWin32.prepareApiSurface(appContext); - OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(appContext,this._settings,license,appContext.appOM,OSF.DDA.Theming ? OSF.DDA.Theming.getOfficeTheme : null,appContext.ui)); - OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.DispIdHost.getClientDelegateMethods,OSF.DDA.SafeArray.Delegate.ParameterMap)) - } + var license = new OSF.DDA.License(appContext.get_eToken()); + if(appContext.get_appName() == OSF.AppName.OutlookWebApp) + { + OSF.WebApp._UpdateLinksForHostAndXdmInfo(); + this.initWebDialog(appContext); + this.initWebAuth(appContext); + OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(appContext,this._settings,license,appContext.appOM)); + OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.WAC.getDelegateMethods,OSF.DDA.WAC.Delegate.ParameterMap)) + } + else + { + OfficeJsClient_OutlookWin32.prepareApiSurface(appContext); + OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(appContext,this._settings,license,appContext.appOM,OSF.DDA.Theming ? OSF.DDA.Theming.getOfficeTheme : null,appContext.ui)); + OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.DispIdHost.getClientDelegateMethods,OSF.DDA.SafeArray.Delegate.ParameterMap)) + } }; -OSF.DDA.SettingsManager={ - SerializedSettings: "serializedSettings", - DateJSONPrefix: "Date(", - DataJSONSuffix: ")", - serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) - { - var ret={}; - for(var key in settingsCollection) - { - var value=settingsCollection[key]; - try - { - if(JSON) - value=JSON.stringify(value,function dateReplacer(k, v) - { - return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix+this[k].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix : v - }); - else - value=Sys.Serialization.JavaScriptSerializer.serialize(value); - ret[key]=value - } - catch(ex){} - } - return ret - }, - deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) - { - var ret={}; - serializedSettings=serializedSettings || {}; - for(var key in serializedSettings) - { - var value=serializedSettings[key]; - try - { - if(JSON) - value=JSON.parse(value,function dateReviver(k, v) - { - var d; - if(typeof v==="string" && v && v.length > 6 && v.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) - { - d=new Date(parseInt(v.slice(5,-1))); - if(d) - return d - } - return v - }); - else - value=Sys.Serialization.JavaScriptSerializer.deserialize(value,true); - ret[key]=value - } - catch(ex){} - } - return ret - } +OSF.DDA.SettingsManager = { + SerializedSettings: "serializedSettings", + DateJSONPrefix: "Date(", + DataJSONSuffix: ")", + serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) + { + var ret = {}; + for(var key in settingsCollection) + { + var value = settingsCollection[key]; + try + { + if(JSON) + value = JSON.stringify(value,function dateReplacer(k, v) + { + return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix + this[k].getTime() + OSF.DDA.SettingsManager.DataJSONSuffix : v + }); + else + value = Sys.Serialization.JavaScriptSerializer.serialize(value); + ret[key] = value + } + catch(ex){} + } + return ret + }, + deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) + { + var ret = {}; + serializedSettings = serializedSettings || {}; + for(var key in serializedSettings) + { + var value = serializedSettings[key]; + try + { + if(JSON) + value = JSON.parse(value,function dateReviver(k, v) + { + var d; + if(typeof v === "string" && v && v.length > 6 && v.slice(0,5) === OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1) === OSF.DDA.SettingsManager.DataJSONSuffix) + { + d = new Date(parseInt(v.slice(5,-1))); + if(d) + return d + } + return v + }); + else + value = Sys.Serialization.JavaScriptSerializer.deserialize(value,true); + ret[key] = value + } + catch(ex){} + } + return ret + } }; -OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function OSF_InitializationHelper$loadAppSpecificScriptAndCreateOM(appContext, appReady, basePath) +OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM = function OSF_InitializationHelper$loadAppSpecificScriptAndCreateOM(appContext, appReady, basePath) { - Type.registerNamespace("Microsoft.Office.WebExtension.MailboxEnums"); - Microsoft.Office.WebExtension.MailboxEnums.EntityType={ - MeetingSuggestion: "meetingSuggestion", - TaskSuggestion: "taskSuggestion", - Address: "address", - EmailAddress: "emailAddress", - Url: "url", - PhoneNumber: "phoneNumber", - Contact: "contact", - FlightReservations: "flightReservations", - ParcelDeliveries: "parcelDeliveries" - }; - Microsoft.Office.WebExtension.MailboxEnums.ItemType={ - Message: "message", - Appointment: "appointment" - }; - Microsoft.Office.WebExtension.MailboxEnums.ResponseType={ - None: "none", - Organizer: "organizer", - Tentative: "tentative", - Accepted: "accepted", - Declined: "declined" - }; - Microsoft.Office.WebExtension.MailboxEnums.RecipientType={ - Other: "other", - DistributionList: "distributionList", - User: "user", - ExternalUser: "externalUser" - }; - Microsoft.Office.WebExtension.MailboxEnums.AttachmentType={ - File: "file", - Item: "item", - Cloud: "cloud" - }; - Microsoft.Office.WebExtension.MailboxEnums.BodyType={ - Text: "text", - Html: "html" - }; - Microsoft.Office.WebExtension.MailboxEnums.ItemNotificationMessageType={ - ProgressIndicator: "progressIndicator", - InformationalMessage: "informationalMessage", - ErrorMessage: "errorMessage" - }; - Microsoft.Office.WebExtension.CoercionType={ - Text: "text", - Html: "html" - }; - Microsoft.Office.WebExtension.MailboxEnums.UserProfileType={ - Office365: "office365", - OutlookCom: "outlookCom", - Enterprise: "enterprise" - }; - Microsoft.Office.WebExtension.MailboxEnums.RestVersion={ - v1_0: "v1.0", - v2_0: "v2.0", - Beta: "beta" - }; - Microsoft.Office.WebExtension.MailboxEnums.ModuleType={Addins: "addins"}; - Type.registerNamespace("OSF.DDA"); - var OSF=window["OSF"] || {}; - OSF.DDA=OSF.DDA || {}; - window["OSF"]["DDA"]["OutlookAppOm"]=OSF.DDA.OutlookAppOm=function(officeAppContext, targetWindow, appReadyCallback) - { - this.$$d_navigateToModuleAsync=Function.createDelegate(this,this.navigateToModuleAsync); - this.$$d_displayPersonaCardAsync=Function.createDelegate(this,this.displayPersonaCardAsync); - this.$$d_displayNewMessageFormApi=Function.createDelegate(this,this.displayNewMessageFormApi); - this.$$d__displayNewAppointmentFormApi$p$0=Function.createDelegate(this,this._displayNewAppointmentFormApi$p$0); - this.$$d_windowOpenOverrideHandler=Function.createDelegate(this,this.windowOpenOverrideHandler); - this.$$d__getRestUrl$p$0=Function.createDelegate(this,this._getRestUrl$p$0); - this.$$d__getEwsUrl$p$0=Function.createDelegate(this,this._getEwsUrl$p$0); - this.$$d__getDiagnostics$p$0=Function.createDelegate(this,this._getDiagnostics$p$0); - this.$$d__getUserProfile$p$0=Function.createDelegate(this,this._getUserProfile$p$0); - this.$$d_getItem=Function.createDelegate(this,this.getItem); - this.$$d__callAppReadyCallback$p$0=Function.createDelegate(this,this._callAppReadyCallback$p$0); - this.$$d__getInitialDataResponseHandler$p$0=Function.createDelegate(this,this._getInitialDataResponseHandler$p$0); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p=this; - this._officeAppContext$p$0=officeAppContext; - this._appReadyCallback$p$0=appReadyCallback; - var $$t_4=this; - var stringLoadedCallback=function() - { - if(appReadyCallback) - if(!$$t_4._officeAppContext$p$0["get_isDialog"]()) - $$t_4.invokeHostMethod(1,null,$$t_4.$$d__getInitialDataResponseHandler$p$0); - else - window.setTimeout($$t_4.$$d__callAppReadyCallback$p$0,0) - }; - if(this._areStringsLoaded$p$0()) - stringLoadedCallback(); - else - this._loadLocalizedScript$p$0(stringLoadedCallback) - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i=function(currentPermissionLevel) - { - if(!currentPermissionLevel) - throw Error.create(window["_u"]["ExtensibilityStrings"]["l_ElevatedPermissionNeeded_Text"]); - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i=function(value, minValue, maxValue, argumentName) - { - if(value < minValue || value > maxValue) - throw Error.argumentOutOfRange(argumentName); - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidModule$p=function(module) - { - if($h.ScriptHelpers.isNullOrUndefined(module)) - throw Error.argumentNull("module"); - else if(module==="") - throw Error.argument("module","module cannot be empty."); - if(module !==window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ModuleType"]["Addins"]) - throw Error.notImplemented(String.format("API not supported for module '{0}'",module)); - }; - window["OSF"]["DDA"]["OutlookAppOm"]._getHtmlBody$p=function(data) - { - var htmlBody=""; - if("htmlBody" in data) - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidHtmlBody$p(data["htmlBody"]); - htmlBody=data["htmlBody"] - } - return htmlBody - }; - window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p=function(data) - { - var attachments=[]; - if("attachments" in data) - { - attachments=data["attachments"]; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentsArray$p(attachments) - } - return attachments - }; - window["OSF"]["DDA"]["OutlookAppOm"]._getOptionsAndCallback$p=function(data) - { - var args=[]; - if("options" in data) - args[0]=data["options"]; - if("callback" in data) - args[args["length"]]=data["callback"]; - return args - }; - window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p=function(attachments) - { - var attachmentsData=new Array(0); - if(Array["isInstanceOfType"](attachments)) - for(var i=0; i < attachments["length"]; i++) - if(Object["isInstanceOfType"](attachments[i])) - { - var attachment=attachments[i]; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachment$p(attachment); - attachmentsData[i]=window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentData$p(attachment) - } - else - throw Error.argument("attachments"); - return attachmentsData - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidHtmlBody$p=function(htmlBody) - { - if(!String["isInstanceOfType"](htmlBody)) - throw Error.argument("htmlBody"); - if($h.ScriptHelpers.isNullOrUndefined(htmlBody)) - throw Error.argument("htmlBody"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(htmlBody.length,0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody") - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentsArray$p=function(attachments) - { - if(!Array["isInstanceOfType"](attachments)) - throw Error.argument("attachments"); - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachment$p=function(attachment) - { - if(!Object["isInstanceOfType"](attachment)) - throw Error.argument("attachments"); - if(!("type" in attachment) || !("name" in attachment)) - throw Error.argument("attachments"); - if(!("url" in attachment || "itemId" in attachment)) - throw Error.argument("attachments"); - }; - window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentData$p=function(attachment) - { - var attachmentData=null; - if(attachment["type"]==="file") - { - var url=attachment["url"]; - var name=attachment["name"]; - var isInline=$h.ScriptHelpers.isValueTrue(attachment["isInline"]); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentUrlOrName$p(url,name); - attachmentData=window["OSF"]["DDA"]["OutlookAppOm"]._createFileAttachmentData$p(url,name,isInline) - } - else if(attachment["type"]==="item") - { - var itemId=window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(attachment["itemId"]); - var name=attachment["name"]; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentItemIdOrName$p(itemId,name); - attachmentData=window["OSF"]["DDA"]["OutlookAppOm"]._createItemAttachmentData$p(itemId,name) - } - else - throw Error.argument("attachments"); - return attachmentData - }; - window["OSF"]["DDA"]["OutlookAppOm"]._createFileAttachmentData$p=function(url, name, isInline) - { - return["file",name,url,isInline] - }; - window["OSF"]["DDA"]["OutlookAppOm"]._createItemAttachmentData$p=function(itemId, name) - { - return["item",name,itemId] - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentUrlOrName$p=function(url, name) - { - if(!String["isInstanceOfType"](url) || !String["isInstanceOfType"](name)) - throw Error.argument("attachments"); - if(url.length > 2048) - throw Error.argumentOutOfRange("attachments",url.length,window["_u"]["ExtensibilityStrings"]["l_AttachmentUrlTooLong_Text"]); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p(name) - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentItemIdOrName$p=function(itemId, name) - { - if(!String["isInstanceOfType"](itemId) || !String["isInstanceOfType"](name)) - throw Error.argument("attachments"); - if(itemId.length > 200) - throw Error.argumentOutOfRange("attachments",itemId.length,window["_u"]["ExtensibilityStrings"]["l_AttachmentItemIdTooLong_Text"]); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p(name) - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p=function(name) - { - if(name.length > 255) - throw Error.argumentOutOfRange("attachments",name.length,window["_u"]["ExtensibilityStrings"]["l_AttachmentNameTooLong_Text"]); - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p=function(restVersion) - { - if(!restVersion) - throw Error.argumentNull("restVersion"); - if(restVersion !==window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"] && restVersion !==window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v2_0"] && restVersion !==window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["Beta"]) - throw Error.argument("restVersion"); - }; - window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost=function(itemId) - { - if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._initialData$p$0 && window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._initialData$p$0.get__isRestIdSupported$i$0()) - return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToRestId"](itemId,window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"]); - return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToEwsId"](itemId,window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"]) - }; - window["OSF"]["DDA"]["OutlookAppOm"]["addAdditionalArgs"]=function(dispid, data) - { - return data - }; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p=function(value, expectedType, argumentName) - { - if(Object["getType"](value) !==expectedType) - throw Error.argumentType(argumentName); - }; - window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p=function(value, minLength, maxLength, name) - { - if($h.ScriptHelpers.isNullOrUndefined(value)) - return; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(value,String,name); - var stringValue=value; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(stringValue.length,minLength,maxLength,name) - }; - window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p=function(array) - { - return array ? array["join"](";") : null - }; - window["OSF"]["DDA"]["OutlookAppOm"]._convertComposeEmailDictionaryParameterForSetApi$p=function(recipients) - { - if(!recipients) - return null; - var results=new Array(recipients["length"]); - for(var i=0; i < recipients["length"]; i++) - results[i]=[recipients[i]["address"],recipients[i]["name"]]; - return results - }; - window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p=function(emailset, name) - { - if($h.ScriptHelpers.isNullOrUndefined(emailset)) - return null; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(emailset,Array,name); - var originalAttendees=emailset; - var updatedAttendees=null; - var normalizationNeeded=false; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(originalAttendees["length"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxRecipients$p,String.format("{0}.length",name)); - for(var i=0; i < originalAttendees["length"]; i++) - if($h.EmailAddressDetails["isInstanceOfType"](originalAttendees[i])) - { - normalizationNeeded=true; - break - } - if(normalizationNeeded) - updatedAttendees=[]; - for(var i=0; i < originalAttendees["length"]; i++) - if(normalizationNeeded) - { - updatedAttendees[i]=$h.EmailAddressDetails["isInstanceOfType"](originalAttendees[i]) ? originalAttendees[i]["emailAddress"] : originalAttendees[i]; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(updatedAttendees[i],String,String.format("{0}[{1}]",name,i)) - } - else - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(originalAttendees[i],String,String.format("{0}[{1}]",name,i)); - return updatedAttendees - }; - OSF.DDA.OutlookAppOm.prototype={ - _initialData$p$0: null, - _item$p$0: null, - _userProfile$p$0: null, - _diagnostics$p$0: null, - _officeAppContext$p$0: null, - _appReadyCallback$p$0: null, - _clientEndPoint$p$0: null, - _hostItemType$p$0: 0, - _additionalOutlookParams$p$0: null, - get_clientEndPoint: function() - { - if(!this._clientEndPoint$p$0) - this._clientEndPoint$p$0=OSF._OfficeAppFactory["getClientEndPoint"](); - return this._clientEndPoint$p$0 - }, - set_clientEndPoint: function(value) - { - this._clientEndPoint$p$0=value; - return value - }, - get_initialData: function() - { - return this._initialData$p$0 - }, - get__appName$i$0: function() - { - return this._officeAppContext$p$0["get_appName"]() - }, - get_additionalOutlookParams: function() - { - return this._additionalOutlookParams$p$0 - }, - windowOpenOverrideHandler: function(url, targetName, features, replace) - { - this.invokeHostMethod(403,{launchUrl: url},null) - }, - createAsyncResult: function(value, errorCode, detailedErrorCode, userContext, errorMessage) - { - var initArgs={}; - var errorArgs=null; - initArgs[OSF.DDA.AsyncResultEnum.Properties["Value"]]=value; - initArgs[OSF.DDA.AsyncResultEnum.Properties["Context"]]=userContext; - if(0 !==errorCode) - { - errorArgs={}; - var errorProperties=$h.OutlookErrorManager.getErrorArgs(detailedErrorCode); - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties["Name"]]=errorProperties["name"]; - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties["Message"]]=!errorMessage ? errorProperties["message"] : errorMessage; - errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties["Code"]]=detailedErrorCode - } - return new OSF.DDA.AsyncResult(initArgs,errorArgs) - }, - _throwOnMethodCallForInsufficientPermission$i$0: function(requiredPermissionLevel, methodName) - { - if(this._initialData$p$0._permissionLevel$p$0 < requiredPermissionLevel) - throw Error.create(String.format(window["_u"]["ExtensibilityStrings"]["l_ElevatedPermissionNeededForMethod_Text"],methodName)); - }, - _displayReplyForm$i$0: function(obj) - { - this._displayReplyFormHelper$p$0(obj,false) - }, - _displayReplyAllForm$i$0: function(obj) - { - this._displayReplyFormHelper$p$0(obj,true) - }, - get_itemNumber: function() - { - return this._additionalOutlookParams$p$0._itemNumber$p$0 - }, - _displayReplyFormHelper$p$0: function(obj, isReplyAll) - { - if(String["isInstanceOfType"](obj)) - this._doDisplayReplyForm$p$0(obj,isReplyAll); - else if(Object["isInstanceOfType"](obj) && Object.getTypeName(obj)==="Object") - this._doDisplayReplyFormWithAttachments$p$0(obj,isReplyAll); - else - throw Error.argumentType(); - }, - _doDisplayReplyForm$p$0: function(htmlBody, isReplyAll) - { - if(!$h.ScriptHelpers.isNullOrUndefined(htmlBody)) - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(htmlBody.length,0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody"); - this.invokeHostMethod(isReplyAll ? 11 : 10,{htmlBody: htmlBody},null) - }, - _doDisplayReplyFormWithAttachments$p$0: function(data, isReplyAll) - { - var htmlBody=window["OSF"]["DDA"]["OutlookAppOm"]._getHtmlBody$p(data); - var attachments=window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p(data); - var parameters=$h.CommonParameters.parse(window["OSF"]["DDA"]["OutlookAppOm"]._getOptionsAndCallback$p(data),false); - var $$t_6=this; - this._standardInvokeHostMethod$i$0(isReplyAll ? 31 : 30,{ - htmlBody: htmlBody, - attachments: window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p(attachments) - },function(rawInput) - { - return rawInput - },parameters._asyncContext$p$0,parameters._callback$p$0) - }, - _standardInvokeHostMethod$i$0: function(dispid, data, format, userContext, callback) - { - var $$t_B=this; - this.invokeHostMethod(dispid,data,function(resultCode, response) - { - if(callback) - { - var asyncResult=null; - if(Object["isInstanceOfType"](response)) - { - var responseDictionary=response; - if("error" in responseDictionary || "data" in responseDictionary || "errorCode" in responseDictionary) - if(!responseDictionary["error"]) - { - var formattedData=format ? format(responseDictionary["data"]) : responseDictionary["data"]; - asyncResult=$$t_B.createAsyncResult(formattedData,0,0,userContext,null) - } - else - { - var errorCode=responseDictionary["errorCode"]; - asyncResult=$$t_B.createAsyncResult(null,1,errorCode,userContext,null) - } - } - if(!asyncResult && resultCode) - asyncResult=$$t_B.createAsyncResult(null,1,9002,userContext,null); - callback(asyncResult) - } - }) - }, - invokeHostMethod: function(dispid, data, responseCallback) - { - if(64===this._officeAppContext$p$0["get_appName"]()) - { - var args={ApiParams: data}; - args["MethodData"]={ - ControlId: OSF._OfficeAppFactory["getId"](), - DispatchId: dispid - }; - args=window["OSF"]["DDA"]["OutlookAppOm"]["addAdditionalArgs"](dispid,args); - if(dispid===1) - this.get_clientEndPoint()["invoke"]("GetInitialData",responseCallback,args); - else - this.get_clientEndPoint()["invoke"]("ExecuteMethod",responseCallback,args) - } - else if(!this._isOwaOnlyMethod$p$0(dispid)) - { - var executeParameters=this.convertToOutlookParameters(dispid,data); - var $$t_B=this; - OSF.ClientHostController["execute"](dispid,executeParameters,function(nativeData, resultCode) - { - if(responseCallback) - { - var responseData=nativeData.toArray(); - var rawData=window["JSON"]["parse"](responseData[0]); - if(Object["isInstanceOfType"](rawData)) - { - var deserializedData=rawData; - if(responseData["length"] > 1 && responseData[1]) - { - deserializedData["error"]=true; - deserializedData["errorCode"]=responseData[1] - } - else - deserializedData["error"]=false; - responseCallback(resultCode,deserializedData) - } - else if(Number["isInstanceOfType"](rawData)) - { - var returnDict={}; - returnDict["error"]=true; - returnDict["errorCode"]=rawData; - responseCallback(resultCode,returnDict) - } - else - throw Error.notImplemented("Return data type from host must be Dictionary or int"); - } - }) - } - else if(responseCallback) - responseCallback(-2,null) - }, - _dictionaryToDate$i$0: function(input) - { - var retValue=new Date(input["year"],input["month"],input["date"],input["hours"],input["minutes"],input["seconds"],!input["milliseconds"] ? 0 : input["milliseconds"]); - if(window["isNaN"](retValue["getTime"]())) - throw Error.format(window["_u"]["ExtensibilityStrings"]["l_InvalidDate_Text"]); - return retValue - }, - _dateToDictionary$i$0: function(input) - { - var retValue={}; - retValue["month"]=input["getMonth"](); - retValue["date"]=input["getDate"](); - retValue["year"]=input["getFullYear"](); - retValue["hours"]=input["getHours"](); - retValue["minutes"]=input["getMinutes"](); - retValue["seconds"]=input["getSeconds"](); - retValue["milliseconds"]=input["getMilliseconds"](); - return retValue - }, - _isOwaOnlyMethod$p$0: function(dispId) - { - switch(dispId) - { - case 402: - case 401: - case 400: - case 403: - return true; - default: - return false - } - }, - isOutlook16OrGreater: function() - { - var hostVersion=this._initialData$p$0.get__hostVersion$i$0(); - var endIndex=0; - var majorVersionNumber=0; - if(hostVersion) - { - endIndex=hostVersion.indexOf("."); - majorVersionNumber=window["parseInt"](hostVersion.substring(0,endIndex)) - } - return majorVersionNumber >=16 - }, - convertToOutlookParameters: function(dispid, data) - { - var executeParameters=null; - var optionalParameters={}; - switch(dispid) - { - case 1: - case 2: - case 3: - case 14: - case 18: - case 26: - case 32: - case 41: - case 34: - break; - case 12: - optionalParameters["isRest"]=data["isRest"]; - break; - case 4: - var jsonProperty=window["JSON"]["stringify"](data["customProperties"]); - executeParameters=[jsonProperty]; - break; - case 5: - executeParameters=[data["body"]]; - break; - case 8: - case 9: - executeParameters=[data["itemId"]]; - break; - case 7: - executeParameters=[window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["requiredAttendees"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["optionalAttendees"]),data["start"],data["end"],data["location"],window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["resources"]),data["subject"],data["body"]]; - break; - case 44: - executeParameters=[window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["toRecipients"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["ccRecipients"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["bccRecipients"]),data["subject"],data["htmlBody"],data["attachments"]]; - break; - case 43: - executeParameters=[data["ewsIdOrEmail"]]; - break; - case 45: - executeParameters=[data["module"],data["queryString"]]; - break; - case 40: - executeParameters=[data["extensionId"],data["consentState"]]; - break; - case 11: - case 10: - executeParameters=[data["htmlBody"]]; - break; - case 31: - case 30: - executeParameters=[data["htmlBody"],data["attachments"]]; - break; - case 23: - case 13: - case 38: - case 29: - executeParameters=[data["data"],data["coercionType"]]; - break; - case 37: - case 28: - executeParameters=[data["coercionType"]]; - break; - case 17: - executeParameters=[data["subject"]]; - break; - case 15: - executeParameters=[data["recipientField"]]; - break; - case 22: - case 21: - executeParameters=[data["recipientField"],window["OSF"]["DDA"]["OutlookAppOm"]._convertComposeEmailDictionaryParameterForSetApi$p(data["recipientArray"])]; - break; - case 19: - executeParameters=[data["itemId"],data["name"]]; - break; - case 16: - executeParameters=[data["uri"],data["name"],data["isInline"]]; - break; - case 20: - executeParameters=[data["attachmentIndex"]]; - break; - case 25: - executeParameters=[data["TimeProperty"],data["time"]]; - break; - case 24: - executeParameters=[data["TimeProperty"]]; - break; - case 27: - executeParameters=[data["location"]]; - break; - case 33: - case 35: - executeParameters=[data["key"],data["type"],data["persistent"],data["message"],data["icon"]]; - break; - case 36: - executeParameters=[data["key"]]; - break; - default: - Sys.Debug.fail("Unexpected method dispid"); - break - } - if(dispid !==1) - { - var $$t_5; - this._additionalOutlookParams$p$0.updateOutlookExecuteParameters($$t_5={val: executeParameters},optionalParameters),executeParameters=$$t_5["val"] - } - return executeParameters - }, - _displayNewAppointmentFormApi$p$0: function(parameters) - { - var normalizedRequiredAttendees=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["requiredAttendees"],"requiredAttendees"); - var normalizedOptionalAttendees=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["optionalAttendees"],"optionalAttendees"); - window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["location"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxLocationLength$p,"location"); - window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["body"],0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"body"); - window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["subject"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p,"subject"); - if(!$h.ScriptHelpers.isNullOrUndefined(parameters["start"])) - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(parameters["start"],Date,"start"); - var startDateTime=parameters["start"]; - parameters["start"]=startDateTime["getTime"](); - if(!$h.ScriptHelpers.isNullOrUndefined(parameters["end"])) - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(parameters["end"],Date,"end"); - var endDateTime=parameters["end"]; - if(endDateTime < startDateTime) - throw Error.argumentOutOfRange("end",endDateTime,window["_u"]["ExtensibilityStrings"]["l_InvalidEventDates_Text"]); - parameters["end"]=endDateTime["getTime"]() - } - } - var updatedParameters=null; - if(normalizedRequiredAttendees || normalizedOptionalAttendees) - { - updatedParameters={}; - var $$dict_7=parameters; - for(var $$key_8 in $$dict_7) - { - var entry={ - key: $$key_8, - value: $$dict_7[$$key_8] - }; - updatedParameters[entry["key"]]=entry["value"] - } - if(normalizedRequiredAttendees) - updatedParameters["requiredAttendees"]=normalizedRequiredAttendees; - if(normalizedOptionalAttendees) - updatedParameters["optionalAttendees"]=normalizedOptionalAttendees - } - this.invokeHostMethod(7,updatedParameters || parameters,null) - }, - displayNewMessageFormApi: function(parameters) - { - var updatedParameters={}; - if(parameters) - { - var normalizedToRecipients=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["toRecipients"],"toRecipients"); - var normalizedCcRecipients=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["ccRecipients"],"ccRecipients"); - var normalizedBccRecipients=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["bccRecipients"],"bccRecipients"); - window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["htmlBody"],0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody"); - window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["subject"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p,"subject"); - var attachments=window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p(parameters); - var $$dict_7=parameters; - for(var $$key_8 in $$dict_7) - { - var entry={ - key: $$key_8, - value: $$dict_7[$$key_8] - }; - updatedParameters[entry["key"]]=entry["value"] - } - if(normalizedToRecipients) - updatedParameters["toRecipients"]=normalizedToRecipients; - if(normalizedCcRecipients) - updatedParameters["ccRecipients"]=normalizedCcRecipients; - if(normalizedBccRecipients) - updatedParameters["bccRecipients"]=normalizedBccRecipients; - if(attachments) - updatedParameters["attachments"]=window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p(attachments) - } - this.invokeHostMethod(44,updatedParameters || parameters,null) - }, - displayPersonaCardAsync: function(ewsIdOrEmail) - { - var args=[]; - for(var $$pai_3=1; $$pai_3 < arguments["length"];++$$pai_3) - args[$$pai_3 - 1]=arguments[$$pai_3]; - if($h.ScriptHelpers.isNullOrUndefined(ewsIdOrEmail)) - throw Error.argumentNull("ewsIdOrEmail"); - else if(ewsIdOrEmail==="") - throw Error.argument("ewsIdOrEmail","ewsIdOrEmail cannot be empty."); - var parameters=$h.CommonParameters.parse(args,false); - this._standardInvokeHostMethod$i$0(43,{ewsIdOrEmail: ewsIdOrEmail.trim()},null,parameters._asyncContext$p$0,parameters._callback$p$0) - }, - navigateToModuleAsync: function(module) - { - var args=[]; - for(var $$pai_5=1; $$pai_5 < arguments["length"];++$$pai_5) - args[$$pai_5 - 1]=arguments[$$pai_5]; - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidModule$p(module); - var parameters=$h.CommonParameters.parse(args,false); - var updatedParameters={}; - if(module===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ModuleType"]["Addins"]) - { - var queryString=""; - if(parameters._options$p$0 && parameters._options$p$0["queryString"]) - queryString=parameters._options$p$0["queryString"]; - updatedParameters["queryString"]=queryString - } - updatedParameters["module"]=module; - this._standardInvokeHostMethod$i$0(45,updatedParameters,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }, - _initializeMethods$p$0: function() - { - var currentInstance=this; - if($h.Item["isInstanceOfType"](this._item$p$0) || this._hostItemType$p$0===6) - { - currentInstance["displayNewAppointmentForm"]=this.$$d__displayNewAppointmentFormApi$p$0; - currentInstance["displayNewMessageForm"]=this.$$d_displayNewMessageFormApi; - currentInstance["displayPersonaCardAsync"]=this.$$d_displayPersonaCardAsync; - currentInstance["navigateToModuleAsync"]=this.$$d_navigateToModuleAsync - } - }, - _getInitialDataResponseHandler$p$0: function(resultCode, data) - { - if(resultCode) - return; - this["initialize"](data); - this["displayName"]="mailbox"; - window.setTimeout(this.$$d__callAppReadyCallback$p$0,0) - }, - _callAppReadyCallback$p$0: function() - { - this._appReadyCallback$p$0() - }, - _invokeGetTokenMethodAsync$p$0: function(outlookDispid, data, methodName, callback, userContext) - { - if($h.ScriptHelpers.isNullOrUndefined(callback)) - throw Error.argumentNull("callback"); - var $$t_9=this; - this.invokeHostMethod(outlookDispid,data,function(resultCode, response) - { - var asyncResult; - if(resultCode) - asyncResult=$$t_9.createAsyncResult(null,1,9017,userContext,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode)); - else - { - var responseDictionary=response; - if(responseDictionary["wasSuccessful"]) - asyncResult=$$t_9.createAsyncResult(responseDictionary["token"],0,0,userContext,null); - else - asyncResult=$$t_9.createAsyncResult(null,1,responseDictionary["errorCode"],userContext,responseDictionary["errorMessage"]) - } - callback(asyncResult) - }) - }, - getItem: function() - { - return this._item$p$0 - }, - _getUserProfile$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0); - return this._userProfile$p$0 - }, - _getDiagnostics$p$0: function() - { - return this._diagnostics$p$0 - }, - _getEwsUrl$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0); - return this._initialData$p$0.get__ewsUrl$i$0() - }, - _getRestUrl$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0); - if(!this._initialData$p$0.get__restUrl$i$0()) - return null; - return this._initialData$p$0.get__restUrl$i$0() - }, - _findOffset$p$0: function(value) - { - var ranges=this._initialData$p$0.get__timeZoneOffsets$i$0(); - for(var r=0; r < ranges["length"]; r++) - { - var range=ranges[r]; - var start=window["parseInt"](range["start"]); - var end=window["parseInt"](range["end"]); - if(value["getTime"]() - start >=0 && value["getTime"]() - end < 0) - return window["parseInt"](range["offset"]) - } - throw Error.format(window["_u"]["ExtensibilityStrings"]["l_InvalidDate_Text"]); - }, - _areStringsLoaded$p$0: function() - { - var stringsLoaded=false; - try - { - stringsLoaded=!$h.ScriptHelpers.isNullOrUndefined(window["_u"]["ExtensibilityStrings"]["l_EwsRequestOversized_Text"]) - } - catch($$e_1){} - return stringsLoaded - }, - _loadLocalizedScript$p$0: function(stringLoadedCallback) - { - var url=null; - var baseUrl=""; - var scripts=document.getElementsByTagName("script"); - for(var i=scripts.length - 1; i >=0; i--) - { - var filename=null; - var attributes=scripts[i].attributes; - if(attributes) - { - var attribute=attributes.getNamedItem("src"); - if(attribute) - filename=attribute.value; - if(filename) - { - var debug=false; - filename=filename.toLowerCase(); - var officeIndex=filename.indexOf("office_strings.js"); - if(officeIndex < 0) - { - officeIndex=filename.indexOf("office_strings.debug.js"); - debug=true - } - if(officeIndex > 0 && officeIndex < filename.length) - { - url=filename.replace(debug ? "office_strings.debug.js" : "office_strings.js","outlook_strings.js"); - var languageUrl=filename.substring(0,officeIndex); - var lastIndexOfSlash=languageUrl.lastIndexOf("/",languageUrl.length - 2); - if(lastIndexOfSlash===-1) - lastIndexOfSlash=languageUrl.lastIndexOf("\\",languageUrl.length - 2); - if(lastIndexOfSlash !==-1 && languageUrl.length > lastIndexOfSlash+1) - baseUrl=languageUrl.substring(0,lastIndexOfSlash+1); - break - } - } - } - } - if(url) - { - var head=document.getElementsByTagName("head")[0]; - var scriptElement=null; - var $$t_H=this; - var scriptElementCallback=function() - { - if(stringLoadedCallback && (!scriptElement.readyState || scriptElement.readyState && (scriptElement.readyState==="loaded" || scriptElement.readyState==="complete"))) - { - scriptElement.onload=null; - scriptElement.onreadystatechange=null; - stringLoadedCallback() - } - }; - var $$t_I=this; - var failureCallback=function() - { - if(!$$t_I._areStringsLoaded$p$0()) - { - var fallbackUrl=baseUrl+"en-us/"+"outlook_strings.js"; - scriptElement.onload=null; - scriptElement.onreadystatechange=null; - scriptElement=$$t_I._createScriptElement$p$0(fallbackUrl); - scriptElement.onload=scriptElementCallback; - scriptElement.onreadystatechange=scriptElementCallback; - head.appendChild(scriptElement) - } - }; - scriptElement=this._createScriptElement$p$0(url); - scriptElement.onload=scriptElementCallback; - scriptElement.onreadystatechange=scriptElementCallback; - window.setTimeout(failureCallback,2e3); - head.appendChild(scriptElement) - } - }, - _createScriptElement$p$0: function(url) - { - var scriptElement=document.createElement("script"); - scriptElement.type="text/javascript"; - scriptElement.src=url; - return scriptElement - } - }; - OSF.DDA.OutlookAppOm.prototype.initialize=function(initialData) - { - if(!initialData) - { - if(!this._additionalOutlookParams$p$0) - this._additionalOutlookParams$p$0=new $h.AdditionalGlobalParameters(true); - this._additionalOutlookParams$p$0.setCurrentItemNumber(0,true); - this._initialData$p$0=null; - this._item$p$0=null; - return - } - var ItemTypeKey="itemType"; - this._initialData$p$0=new $h.InitialData(initialData); - this._hostItemType$p$0=initialData[ItemTypeKey]; - if(1===initialData[ItemTypeKey]) - this._item$p$0=new $h.Message(this._initialData$p$0); - else if(3===initialData[ItemTypeKey]) - this._item$p$0=new $h.MeetingRequest(this._initialData$p$0); - else if(2===initialData[ItemTypeKey]) - this._item$p$0=new $h.Appointment(this._initialData$p$0); - else if(4===initialData[ItemTypeKey]) - this._item$p$0=new $h.MessageCompose(this._initialData$p$0); - else if(5===initialData[ItemTypeKey]) - this._item$p$0=new $h.AppointmentCompose(this._initialData$p$0); - else if(6===initialData[ItemTypeKey]); - else - Sys.Debug.trace("Unexpected item type was received from the host."); - this._userProfile$p$0=new $h.UserProfile(this._initialData$p$0); - this._diagnostics$p$0=new $h.Diagnostics(this._initialData$p$0,this._officeAppContext$p$0["get_appName"]()); - var supportsAdditionalParameters=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() !==8 || this.isOutlook16OrGreater(); - this._additionalOutlookParams$p$0=new $h.AdditionalGlobalParameters(supportsAdditionalParameters); - if("itemNumber" in initialData) - this["setCurrentItemNumber"](initialData["itemNumber"]); - this._initializeMethods$p$0(); - $h.InitialData._defineReadOnlyProperty$i(this,"item",this.$$d_getItem); - $h.InitialData._defineReadOnlyProperty$i(this,"userProfile",this.$$d__getUserProfile$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"diagnostics",this.$$d__getDiagnostics$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"ewsUrl",this.$$d__getEwsUrl$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"restUrl",this.$$d__getRestUrl$p$0); - if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===64) - if(this._initialData$p$0.get__overrideWindowOpen$i$0()) - window.open=this.$$d_windowOpenOverrideHandler - }; - OSF.DDA.OutlookAppOm.prototype.makeEwsRequestAsync=function(data) - { - var args=[]; - for(var $$pai_5=1; $$pai_5 < arguments["length"];++$$pai_5) - args[$$pai_5 - 1]=arguments[$$pai_5]; - if($h.ScriptHelpers.isNullOrUndefined(data)) - throw Error.argumentNull("data"); - if(data.length > window["OSF"]["DDA"]["OutlookAppOm"]._maxEwsRequestSize$p) - throw Error.argument("data",window["_u"]["ExtensibilityStrings"]["l_EwsRequestOversized_Text"]); - this._throwOnMethodCallForInsufficientPermission$i$0(3,"makeEwsRequestAsync"); - var parameters=$h.CommonParameters.parse(args,true,true); - var ewsRequest=new $h.EwsRequest(parameters._asyncContext$p$0); - var $$t_4=this; - ewsRequest.onreadystatechange=function() - { - if(4===ewsRequest.get__requestState$i$1()) - parameters._callback$p$0(ewsRequest._asyncResult$p$0) - }; - ewsRequest.send(data) - }; - OSF.DDA.OutlookAppOm.prototype.recordDataPoint=function(data) - { - if($h.ScriptHelpers.isNullOrUndefined(data)) - throw Error.argumentNull("data"); - this.invokeHostMethod(402,data,null) - }; - OSF.DDA.OutlookAppOm.prototype.recordTrace=function(data) - { - if($h.ScriptHelpers.isNullOrUndefined(data)) - throw Error.argumentNull("data"); - this.invokeHostMethod(401,data,null) - }; - OSF.DDA.OutlookAppOm.prototype.trackCtq=function(data) - { - if($h.ScriptHelpers.isNullOrUndefined(data)) - throw Error.argumentNull("data"); - this.invokeHostMethod(400,data,null) - }; - OSF.DDA.OutlookAppOm.prototype.convertToLocalClientTime=function(timeValue) - { - var date=new Date(timeValue["getTime"]()); - var offset=date["getTimezoneOffset"]() * -1; - if(this._initialData$p$0 && this._initialData$p$0.get__timeZoneOffsets$i$0()) - { - date["setUTCMinutes"](date["getUTCMinutes"]() - offset); - offset=this._findOffset$p$0(date); - date["setUTCMinutes"](date["getUTCMinutes"]()+offset) - } - var retValue=this._dateToDictionary$i$0(date); - retValue["timezoneOffset"]=offset; - return retValue - }; - OSF.DDA.OutlookAppOm.prototype.convertToUtcClientTime=function(input) - { - var retValue=this._dictionaryToDate$i$0(input); - if(this._initialData$p$0 && this._initialData$p$0.get__timeZoneOffsets$i$0()) - { - var offset=this._findOffset$p$0(retValue); - retValue["setUTCMinutes"](retValue["getUTCMinutes"]() - offset); - offset=!input["timezoneOffset"] ? retValue["getTimezoneOffset"]() * -1 : input["timezoneOffset"]; - retValue["setUTCMinutes"](retValue["getUTCMinutes"]()+offset) - } - return retValue - }; - OSF.DDA.OutlookAppOm.prototype.convertToRestId=function(itemId, restVersion) - { - if(!itemId) - throw Error.argumentNull("itemId"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p(restVersion); - return itemId.replace(new RegExp("[/]","g"),"-").replace(new RegExp("[+]","g"),"_") - }; - OSF.DDA.OutlookAppOm.prototype.convertToEwsId=function(itemId, restVersion) - { - if(!itemId) - throw Error.argumentNull("itemId"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p(restVersion); - return itemId.replace(new RegExp("[-]","g"),"/").replace(new RegExp("[_]","g"),"+") - }; - OSF.DDA.OutlookAppOm.prototype.getUserIdentityTokenAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - this._throwOnMethodCallForInsufficientPermission$i$0(1,"getUserIdentityTokenAsync"); - var parameters=$h.CommonParameters.parse(args,true,true); - this._invokeGetTokenMethodAsync$p$0(2,null,"GetUserIdentityToken",parameters._callback$p$0,parameters._asyncContext$p$0) - }; - OSF.DDA.OutlookAppOm.prototype.getCallbackTokenAsync=function() - { - var args=[]; - for(var $$pai_7=0; $$pai_7 < arguments["length"];++$$pai_7) - args[$$pai_7]=arguments[$$pai_7]; - this._throwOnMethodCallForInsufficientPermission$i$0(1,"getCallbackTokenAsync"); - var parameters=$h.CommonParameters.parse(args,true,true); - var options={}; - if(parameters._options$p$0) - for(var $$arr_3=Object["keys"](parameters._options$p$0), $$len_4=$$arr_3.length, $$idx_5=0; $$idx_5 < $$len_4;++$$idx_5) - { - var key=$$arr_3[$$idx_5]; - options[key]=parameters._options$p$0[key] - } - if(!("isRest" in options)) - options["isRest"]=false; - this._invokeGetTokenMethodAsync$p$0(12,options,"GetCallbackToken",parameters._callback$p$0,parameters._asyncContext$p$0) - }; - OSF.DDA.OutlookAppOm.prototype.displayMessageForm=function(itemId) - { - if($h.ScriptHelpers.isNullOrUndefined(itemId)) - throw Error.argumentNull("itemId"); - this.invokeHostMethod(8,{itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId)},null) - }; - OSF.DDA.OutlookAppOm.prototype.displayAppointmentForm=function(itemId) - { - if($h.ScriptHelpers.isNullOrUndefined(itemId)) - throw Error.argumentNull("itemId"); - this.invokeHostMethod(9,{itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId)},null) - }; - OSF.DDA.OutlookAppOm.prototype.RegisterConsentAsync=function(consentState) - { - if(consentState !==2 && consentState !==1 && consentState) - throw Error.argumentOutOfRange("consentState"); - var parameters={}; - parameters["consentState"]=consentState["toString"](); - parameters["extensionId"]=this["GetExtensionId"](); - this.invokeHostMethod(40,parameters,null) - }; - OSF.DDA.OutlookAppOm.prototype.CloseApp=function() - { - this.invokeHostMethod(42,null,null) - }; - OSF.DDA.OutlookAppOm.prototype.GetIsRead=function() - { - return this._initialData$p$0.get__isRead$i$0() - }; - OSF.DDA.OutlookAppOm.prototype.GetEndNodeUrl=function() - { - return this._initialData$p$0.get__endNodeUrl$i$0() - }; - OSF.DDA.OutlookAppOm.prototype.GetConsentMetadata=function() - { - return this._initialData$p$0.get__consentMetadata$i$0() - }; - OSF.DDA.OutlookAppOm.prototype.GetEntryPointUrl=function() - { - return this._initialData$p$0.get__entryPointUrl$i$0() - }; - OSF.DDA.OutlookAppOm.prototype.GetMarketplaceContentMarket=function() - { - return this._initialData$p$0.get__marketplaceContentMarket$i$0() - }; - OSF.DDA.OutlookAppOm.prototype.GetMarketplaceAssetId=function() - { - return this._initialData$p$0.get__marketplaceAssetId$i$0() - }; - OSF.DDA.OutlookAppOm.prototype.GetExtensionId=function() - { - return this._initialData$p$0.get__extensionId$i$0() - }; - OSF.DDA.OutlookAppOm.prototype.setCurrentItemNumber=function(itemNumber) - { - this._additionalOutlookParams$p$0.setCurrentItemNumber(itemNumber,false) - }; - window["OSF"]["DDA"]["Settings"]=OSF.DDA.Settings=function(data) - { - this._rawData$p$0=data - }; - window["OSF"]["DDA"]["Settings"]._convertFromRawSettings$p=function(rawSettings) - { - if(!rawSettings) - return{}; - if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===8 || window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===65536 || window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===4194304) - { - var outlookSettings=rawSettings["SettingsKey"]; - if(outlookSettings) - return OSF.DDA.SettingsManager["deserializeSettings"](outlookSettings) - } - return rawSettings - }; - OSF.DDA.Settings.prototype={ - _rawData$p$0: null, - _settingsData$p$0: null, - get__data$p$0: function() - { - if(!this._settingsData$p$0) - { - this._settingsData$p$0=window["OSF"]["DDA"]["Settings"]._convertFromRawSettings$p(this._rawData$p$0); - this._rawData$p$0=null - } - return this._settingsData$p$0 - }, - _saveSettingsForOutlook$p$0: function(callback, userContext) - { - var storedException=null; - try - { - var serializedSettings=OSF.DDA.SettingsManager["serializeSettings"](this.get__data$p$0()); - var jsonSettings=window["JSON"]["stringify"](serializedSettings); - var settingsObjectToSave={SettingsKey: jsonSettings}; - OSF.DDA.ClientSettingsManager["write"](settingsObjectToSave) - } - catch(ex) - { - storedException=ex - } - if(callback) - { - var asyncResult; - if(storedException) - asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9019,userContext,storedException["message"]); - else - asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,0,0,userContext,null); - callback(asyncResult) - } - }, - _saveSettingsForOwa$p$0: function(callback, userContext) - { - var serializedSettings=OSF.DDA.SettingsManager["serializeSettings"](this.get__data$p$0()); - var $$t_7=this; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.invokeHostMethod(404,[serializedSettings],function(resultCode, response) - { - if(callback) - { - var asyncResult; - if(resultCode) - asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9017,userContext,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode)); - else - { - var responseDictionary=response; - if(!responseDictionary["error"]) - asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,0,0,userContext,null); - else - asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9019,userContext,responseDictionary["errorMessage"]) - } - callback(asyncResult) - } - }) - } - }; - OSF.DDA.Settings.prototype.get=function(name) - { - return this.get__data$p$0()[name] - }; - OSF.DDA.Settings.prototype.set=function(name, value) - { - this.get__data$p$0()[name]=value - }; - OSF.DDA.Settings.prototype.remove=function(name) - { - delete this.get__data$p$0()[name] - }; - OSF.DDA.Settings.prototype.saveAsync=function() - { - var args=[]; - for(var $$pai_4=0; $$pai_4 < arguments["length"];++$$pai_4) - args[$$pai_4]=arguments[$$pai_4]; - var commonParameters=$h.CommonParameters.parse(args,false); - if(window["JSON"]["stringify"](OSF.DDA.SettingsManager["serializeSettings"](this.get__data$p$0())).length > 32768) - { - var asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9019,commonParameters._asyncContext$p$0,""); - var $$t_3=this; - window.setTimeout(function() - { - commonParameters._callback$p$0(asyncResult) - },0); - return - } - if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===64) - this._saveSettingsForOwa$p$0(commonParameters._callback$p$0,commonParameters._asyncContext$p$0); - else - this._saveSettingsForOutlook$p$0(commonParameters._callback$p$0,commonParameters._asyncContext$p$0) - }; - Type.registerNamespace("$h"); - var $h=window["$h"] || {}; - Type.registerNamespace("Office.cast"); - var Office=window["Office"] || {}; - Office.cast=Office.cast || {}; - $h.AdditionalGlobalParameters=function(supported) - { - this._parameterBlobSupported$p$0=supported; - this._itemNumber$p$0=0 - }; - $h.AdditionalGlobalParameters.prototype={ - _parameterBlobSupported$p$0: false, - _itemNumber$p$0: 0, - setCurrentItemNumber: function(itemNumber, force) - { - if(force) - this._itemNumber$p$0=itemNumber; - else if(itemNumber > 0) - this._itemNumber$p$0=itemNumber - }, - get_itemNumber: function() - { - return this._itemNumber$p$0 - }, - updateOutlookExecuteParameters: function(executeParameters, additionalApiParameters) - { - if(this._parameterBlobSupported$p$0) - { - if(this._itemNumber$p$0 > 0) - additionalApiParameters["itemNumber"]=this._itemNumber$p$0["toString"](); - if(!Object["keys"](additionalApiParameters)["length"]) - return; - if(!executeParameters["val"]) - executeParameters["val"]=[]; - executeParameters["val"]["push"](window["JSON"]["stringify"](additionalApiParameters)) - } - } - }; - $h.Appointment=function(dataDictionary) - { - this.$$d__getOrganizer$p$2=Function.createDelegate(this,this._getOrganizer$p$2); - this.$$d__getNormalizedSubject$p$2=Function.createDelegate(this,this._getNormalizedSubject$p$2); - this.$$d__getSubject$p$2=Function.createDelegate(this,this._getSubject$p$2); - this.$$d__getResources$p$2=Function.createDelegate(this,this._getResources$p$2); - this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2); - this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2); - this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2); - this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2); - this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2); - $h.Appointment["initializeBase"](this,[dataDictionary]); - $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"resources",this.$$d__getResources$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"organizer",this.$$d__getOrganizer$p$2) - }; - $h.Appointment.prototype={ - getItemType: function() - { - return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Appointment"] - }, - _getStart$p$2: function() - { - return this._data$p$0.get__start$i$0() - }, - _getEnd$p$2: function() - { - return this._data$p$0.get__end$i$0() - }, - _getLocation$p$2: function() - { - return this._data$p$0.get__location$i$0() - }, - _getOptionalAttendees$p$2: function() - { - return this._data$p$0.get__cc$i$0() - }, - _getRequiredAttendees$p$2: function() - { - return this._data$p$0.get__to$i$0() - }, - _getResources$p$2: function() - { - return this._data$p$0.get__resources$i$0() - }, - _getSubject$p$2: function() - { - return this._data$p$0.get__subject$i$0() - }, - _getNormalizedSubject$p$2: function() - { - return this._data$p$0.get__normalizedSubject$i$0() - }, - _getOrganizer$p$2: function() - { - return this._data$p$0.get__organizer$i$0() - } - }; - $h.Appointment.prototype.getEntities=function() - { - return this._data$p$0._getEntities$i$0() - }; - $h.Appointment.prototype.getEntitiesByType=function(entityType) - { - return this._data$p$0._getEntitiesByType$i$0(entityType) - }; - $h.Appointment.prototype.getSelectedEntities=function() - { - return this._data$p$0._getSelectedEntities$i$0() - }; - $h.Appointment.prototype.getRegExMatches=function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches"); - return this._data$p$0._getRegExMatches$i$0() - }; - $h.Appointment.prototype.getFilteredEntitiesByName=function(name) - { - return this._data$p$0._getFilteredEntitiesByName$i$0(name) - }; - $h.Appointment.prototype.getRegExMatchesByName=function(name) - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName"); - return this._data$p$0._getRegExMatchesByName$i$0(name) - }; - $h.Appointment.prototype.getSelectedRegExMatches=function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedRegExMatches"); - return this._data$p$0._getSelectedRegExMatches$i$0() - }; - $h.Appointment.prototype.displayReplyForm=function(obj) - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyForm$i$0(obj) - }; - $h.Appointment.prototype.displayReplyAllForm=function(obj) - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyAllForm$i$0(obj) - }; - $h.AppointmentCompose=function(data) - { - this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2); - this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2); - this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2); - this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2); - this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2); - $h.AppointmentCompose["initializeBase"](this,[data]); - $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2) - }; - $h.AppointmentCompose.prototype={ - _requiredAttendees$p$2: null, - _optionalAttendees$p$2: null, - _start$p$2: null, - _end$p$2: null, - _location$p$2: null, - getItemType: function() - { - return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Appointment"] - }, - _getRequiredAttendees$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._requiredAttendees$p$2) - this._requiredAttendees$p$2=new $h.ComposeRecipient(0,"requiredAttendees"); - return this._requiredAttendees$p$2 - }, - _getOptionalAttendees$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._optionalAttendees$p$2) - this._optionalAttendees$p$2=new $h.ComposeRecipient(1,"optionalAttendees"); - return this._optionalAttendees$p$2 - }, - _getStart$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._start$p$2) - this._start$p$2=new $h.ComposeTime(1); - return this._start$p$2 - }, - _getEnd$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._end$p$2) - this._end$p$2=new $h.ComposeTime(2); - return this._end$p$2 - }, - _getLocation$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._location$p$2) - this._location$p$2=new $h.ComposeLocation; - return this._location$p$2 - } - }; - $h.AttachmentConstants=function(){}; - $h.AttachmentDetails=function(data) - { - this.$$d__getIsInline$p$0=Function.createDelegate(this,this._getIsInline$p$0); - this.$$d__getAttachmentType$p$0=Function.createDelegate(this,this._getAttachmentType$p$0); - this.$$d__getSize$p$0=Function.createDelegate(this,this._getSize$p$0); - this.$$d__getContentType$p$0=Function.createDelegate(this,this._getContentType$p$0); - this.$$d__getName$p$0=Function.createDelegate(this,this._getName$p$0); - this.$$d__getId$p$0=Function.createDelegate(this,this._getId$p$0); - this._data$p$0=data; - $h.InitialData._defineReadOnlyProperty$i(this,"id",this.$$d__getId$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"name",this.$$d__getName$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"contentType",this.$$d__getContentType$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"size",this.$$d__getSize$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"attachmentType",this.$$d__getAttachmentType$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"isInline",this.$$d__getIsInline$p$0) - }; - $h.AttachmentDetails.prototype={ - _data$p$0: null, - _getId$p$0: function() - { - return this._data$p$0["id"] - }, - _getName$p$0: function() - { - return this._data$p$0["name"] - }, - _getContentType$p$0: function() - { - return this._data$p$0["contentType"] - }, - _getSize$p$0: function() - { - return this._data$p$0["size"] - }, - _getAttachmentType$p$0: function() - { - var response=this._data$p$0["attachmentType"]; - return response < $h.AttachmentDetails._attachmentTypeMap$p["length"] ? $h.AttachmentDetails._attachmentTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["File"] - }, - _getIsInline$p$0: function() - { - return this._data$p$0["isInline"] - } - }; - $h.Body=function(){}; - $h.Body._tryMapToHostCoercionType$i=function(coercionType, hostCoercionType) - { - hostCoercionType["val"]=undefined; - if(coercionType===window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Html"]) - hostCoercionType["val"]=3; - else if(coercionType===window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Text"]) - hostCoercionType["val"]=0; - else - return false; - return true - }; - $h.Body.prototype.getAsync=function(coercionType) - { - var args=[]; - for(var $$pai_7=1; $$pai_7 < arguments["length"];++$$pai_7) - args[$$pai_7 - 1]=arguments[$$pai_7]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"body.getAsync"); - var commonParameters=$h.CommonParameters.parse(args,true); - var hostCoercionType; - var $$t_5, - $$t_6; - if(!($$t_6=$h.Body._tryMapToHostCoercionType$i(coercionType,$$t_5={val: hostCoercionType}),hostCoercionType=$$t_5["val"],$$t_6)) - throw Error.argument("coercionType"); - var dataToHost={coercionType: hostCoercionType}; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(37,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.ComposeBody=function() - { - $h.ComposeBody["initializeBase"](this) - }; - $h.ComposeBody._createParameterDictionaryToHost$i=function(data, parameters) - { - var dataToHost={data: data}; - if(parameters._options$p$0 && parameters._options$p$0["hasOwnProperty"]("coercionType") && !$h.ScriptHelpers.isNull(parameters._options$p$0["coercionType"])) - { - var hostCoercionType; - var $$t_4, - $$t_5; - if(!($$t_5=$h.Body._tryMapToHostCoercionType$i(parameters._options$p$0["coercionType"],$$t_4={val: hostCoercionType}),hostCoercionType=$$t_4["val"],$$t_5)) - { - if(parameters._callback$p$0) - parameters._callback$p$0(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,1e3,parameters._asyncContext$p$0,null)); - return null - } - dataToHost["coercionType"]=hostCoercionType - } - else - dataToHost["coercionType"]=0; - return dataToHost - }; - $h.ComposeBody.prototype.getTypeAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"body.getTypeAsync"); - var parameters=$h.CommonParameters.parse(args,true); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(14,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeBody.prototype.setSelectedDataAsync=function(data) - { - var args=[]; - for(var $$pai_4=1; $$pai_4 < arguments["length"];++$$pai_4) - args[$$pai_4 - 1]=arguments[$$pai_4]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.setSelectedDataAsync"); - var parameters=$h.CommonParameters.parse(args,false); - if(!String["isInstanceOfType"](data)) - throw Error.argumentType("data",Object["getType"](data),String); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); - var dataToHost=$h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); - if(!dataToHost) - return; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(13,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeBody.prototype.prependAsync=function(data) - { - var args=[]; - for(var $$pai_4=1; $$pai_4 < arguments["length"];++$$pai_4) - args[$$pai_4 - 1]=arguments[$$pai_4]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.prependAsync"); - var parameters=$h.CommonParameters.parse(args,false); - if(!String["isInstanceOfType"](data)) - throw Error.argumentType("data",Object["getType"](data),String); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); - var dataToHost=$h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); - if(!dataToHost) - return; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(23,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeBody.prototype.setAsync=function(data) - { - var args=[]; - for(var $$pai_4=1; $$pai_4 < arguments["length"];++$$pai_4) - args[$$pai_4 - 1]=arguments[$$pai_4]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.setAsync"); - var parameters=$h.CommonParameters.parse(args,false); - if(!String["isInstanceOfType"](data)) - throw Error.argumentType("data",Object["getType"](data),String); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); - var dataToHost=$h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); - if(!dataToHost) - return; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(38,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeItem=function(data) - { - this.$$d__getBody$p$1=Function.createDelegate(this,this._getBody$p$1); - this.$$d__getSubject$p$1=Function.createDelegate(this,this._getSubject$p$1); - $h.ComposeItem["initializeBase"](this,[data]); - $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$1); - $h.InitialData._defineReadOnlyProperty$i(this,"body",this.$$d__getBody$p$1) - }; - $h.ComposeItem.prototype={ - _subject$p$1: null, - _body$p$1: null, - _getBody$p$1: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._body$p$1) - this._body$p$1=new $h.ComposeBody; - return this._body$p$1 - }, - _getSubject$p$1: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._subject$p$1) - this._subject$p$1=new $h.ComposeSubject; - return this._subject$p$1 - } - }; - $h.ComposeItem.prototype.addFileAttachmentAsync=function(uri, attachmentName) - { - var args=[]; - for(var $$pai_6=2; $$pai_6 < arguments["length"];++$$pai_6) - args[$$pai_6 - 2]=arguments[$$pai_6]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"addFileAttachmentAsync"); - if(!$h.ScriptHelpers.isNonEmptyString(uri)) - throw Error.argument("uri"); - if(!$h.ScriptHelpers.isNonEmptyString(attachmentName)) - throw Error.argument("attachmentName"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(uri.length,0,2048,"uri"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentName.length,0,255,"attachmentName"); - var commonParameters=$h.CommonParameters.parse(args,false); - var isInline=false; - if(!$h.ScriptHelpers.isNull(commonParameters._options$p$0)) - isInline=$h.ScriptHelpers.isValueTrue(commonParameters._options$p$0["isInline"]); - var parameters={ - uri: uri, - name: attachmentName, - isInline: isInline, - __timeout__: 6e5 - }; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(16,parameters,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.ComposeItem.prototype.addItemAttachmentAsync=function(itemId, attachmentName) - { - var args=[]; - for(var $$pai_5=2; $$pai_5 < arguments["length"];++$$pai_5) - args[$$pai_5 - 2]=arguments[$$pai_5]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"addItemAttachmentAsync"); - if(!$h.ScriptHelpers.isNonEmptyString(itemId)) - throw Error.argument("itemId"); - if(!$h.ScriptHelpers.isNonEmptyString(attachmentName)) - throw Error.argument("attachmentName"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(itemId.length,0,200,"itemId"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentName.length,0,255,"attachmentName"); - var commonParameters=$h.CommonParameters.parse(args,false); - var parameters={ - itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId), - name: attachmentName, - __timeout__: 6e5 - }; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(19,parameters,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.ComposeItem.prototype.removeAttachmentAsync=function(attachmentId) - { - var args=[]; - for(var $$pai_3=1; $$pai_3 < arguments["length"];++$$pai_3) - args[$$pai_3 - 1]=arguments[$$pai_3]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"removeAttachmentAsync"); - if(!$h.ScriptHelpers.isNonEmptyString(attachmentId)) - throw Error.argument("attachmentId"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentId.length,0,200,"attachmentId"); - var commonParameters=$h.CommonParameters.parse(args,false); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(20,{attachmentIndex: attachmentId},null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.ComposeItem.prototype.getSelectedDataAsync=function(coercionType) - { - var args=[]; - for(var $$pai_7=1; $$pai_7 < arguments["length"];++$$pai_7) - args[$$pai_7 - 1]=arguments[$$pai_7]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedDataAsync"); - var commonParameters=$h.CommonParameters.parse(args,true); - var hostCoercionType; - var $$t_5, - $$t_6; - if(coercionType !==window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Html"] && coercionType !==window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Text"] || !($$t_6=$h.Body._tryMapToHostCoercionType$i(coercionType,$$t_5={val: hostCoercionType}),hostCoercionType=$$t_5["val"],$$t_6)) - throw Error.argument("coercionType"); - var dataToHost={coercionType: hostCoercionType}; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(28,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.ComposeItem.prototype.setSelectedDataAsync=function(data) - { - var args=[]; - for(var $$pai_4=1; $$pai_4 < arguments["length"];++$$pai_4) - args[$$pai_4 - 1]=arguments[$$pai_4]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"setSelectedDataAsync"); - var parameters=$h.CommonParameters.parse(args,false); - if(!String["isInstanceOfType"](data)) - throw Error.argumentType("data",Object["getType"](data),String); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); - var dataToHost=$h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); - if(!dataToHost) - return; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(29,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeItem.prototype.close=function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(41,null,null,null,null) - }; - $h.ComposeItem.prototype.saveAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"saveAsync"); - var parameters=$h.CommonParameters.parse(args,false); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(32,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeRecipient=function(type, propertyName) - { - this._type$p$0=type; - this._propertyName$p$0=propertyName - }; - $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p=function(displayName, emailAddress) - { - if(!displayName && !emailAddress) - throw Error.argument("recipients"); - if(displayName && displayName.length > 255) - throw Error.argumentOutOfRange("recipients",displayName.length,window["_u"]["ExtensibilityStrings"]["l_DisplayNameTooLong_Text"]); - if(emailAddress && emailAddress.length > 571) - throw Error.argumentOutOfRange("recipients",emailAddress.length,window["_u"]["ExtensibilityStrings"]["l_EmailAddressTooLong_Text"]); - }; - $h.ComposeRecipient._getAsyncFormatter$p=function(rawInput) - { - var input=rawInput; - var output=[]; - for(var i=0; i < input["length"]; i++) - { - var email=new $h.EmailAddressDetails(input[i]); - output[i]=email - } - return output - }; - $h.ComposeRecipient._createEmailDictionaryForHost$p=function(address, name) - { - return{ - address: address, - name: name - } - }; - $h.ComposeRecipient.prototype={ - _propertyName$p$0: null, - _type$p$0: 0, - setAddHelper: function(recipients, args, isSet) - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(recipients["length"],0,100,"recipients"); - var parameters=$h.CommonParameters.parse(args,false); - var recipientData=[]; - if(Array["isInstanceOfType"](recipients)) - for(var i=0; i < recipients["length"]; i++) - if(String["isInstanceOfType"](recipients[i])) - { - $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(recipients[i],recipients[i]); - recipientData[i]=$h.ComposeRecipient._createEmailDictionaryForHost$p(recipients[i],recipients[i]) - } - else if($h.EmailAddressDetails["isInstanceOfType"](recipients[i])) - { - var address=recipients[i]; - $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(address["displayName"],address["emailAddress"]); - recipientData[i]=$h.ComposeRecipient._createEmailDictionaryForHost$p(address["emailAddress"],address["displayName"]) - } - else if(Object["isInstanceOfType"](recipients[i])) - { - var input=recipients[i]; - var emailAddress=input["emailAddress"]; - var displayName=input["displayName"]; - $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(displayName,emailAddress); - recipientData[i]=$h.ComposeRecipient._createEmailDictionaryForHost$p(emailAddress,displayName) - } - else - throw Error.argument("recipients"); - else - throw Error.argument("recipients"); - var $$t_B=this; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(isSet ? 21 : 22,{ - recipientField: this._type$p$0, - recipientArray: recipientData - },function(rawInput) - { - return rawInput - },parameters._asyncContext$p$0,parameters._callback$p$0) - } - }; - $h.ComposeRecipient.prototype.getAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - var parameters=$h.CommonParameters.parse(args,true); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,this._propertyName$p$0+".getAsync"); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(15,{recipientField: this._type$p$0},$h.ComposeRecipient._getAsyncFormatter$p,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeRecipient.prototype.setAsync=function(recipients) - { - var args=[]; - for(var $$pai_2=1; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2 - 1]=arguments[$$pai_2]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._propertyName$p$0+".setAsync"); - this.setAddHelper(recipients,args,true) - }; - $h.ComposeRecipient.prototype.addAsync=function(recipients) - { - var args=[]; - for(var $$pai_2=1; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2 - 1]=arguments[$$pai_2]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._propertyName$p$0+".addAsync"); - this.setAddHelper(recipients,args,false) - }; - $h.ComposeRecipient.RecipientField=function(){}; - $h.ComposeRecipient.RecipientField.prototype={ - to: 0, - cc: 1, - bcc: 2, - requiredAttendees: 0, - optionalAttendees: 1 - }; - $h.ComposeRecipient.RecipientField["registerEnum"]("$h.0",false); - $h.ComposeLocation=function(){}; - $h.ComposeLocation.prototype.getAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"location.getAsync"); - var parameters=$h.CommonParameters.parse(args,true); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(26,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeLocation.prototype.setAsync=function(location) - { - var args=[]; - for(var $$pai_3=1; $$pai_3 < arguments["length"];++$$pai_3) - args[$$pai_3 - 1]=arguments[$$pai_3]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"location.setAsync"); - var parameters=$h.CommonParameters.parse(args,false); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(location.length,0,255,"location"); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(27,{location: location},null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeSubject=function(){}; - $h.ComposeSubject.prototype.getAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - var parameters=$h.CommonParameters.parse(args,true); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"subject.getAsync"); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(18,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeSubject.prototype.setAsync=function(data) - { - var args=[]; - for(var $$pai_3=1; $$pai_3 < arguments["length"];++$$pai_3) - args[$$pai_3 - 1]=arguments[$$pai_3]; - var parameters=$h.CommonParameters.parse(args,false); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"subject.setAsync"); - if(!String["isInstanceOfType"](data)) - throw Error.argument("data"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,255,"data"); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(17,{subject: data},null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeTime=function(type) - { - this.$$d__ticksToDateFormatter$p$0=Function.createDelegate(this,this._ticksToDateFormatter$p$0); - this._timeType$p$0=type - }; - $h.ComposeTime.prototype={ - _timeType$p$0: 0, - _ticksToDateFormatter$p$0: function(rawInput) - { - var ticks=rawInput; - return new Date(ticks) - }, - _getPropertyName$p$0: function() - { - return this._timeType$p$0===1 ? "start" : "end" - } - }; - $h.ComposeTime.prototype.getAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,this._getPropertyName$p$0()+".getAsync"); - var parameters=$h.CommonParameters.parse(args,true); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(24,{TimeProperty: this._timeType$p$0},this.$$d__ticksToDateFormatter$p$0,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeTime.prototype.setAsync=function(dateTime) - { - var args=[]; - for(var $$pai_3=1; $$pai_3 < arguments["length"];++$$pai_3) - args[$$pai_3 - 1]=arguments[$$pai_3]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._getPropertyName$p$0()+".setAsync"); - if(!Date["isInstanceOfType"](dateTime)) - throw Error.argumentType("dateTime",Object["getType"](dateTime),Date); - if(window["isNaN"](dateTime["getTime"]())) - throw Error.argument("dateTime"); - if(dateTime["getTime"]() < -864e13 || dateTime["getTime"]() > 864e13) - throw Error.argumentOutOfRange("dateTime"); - var parameters=$h.CommonParameters.parse(args,false); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(25,{ - TimeProperty: this._timeType$p$0, - time: dateTime["getTime"]() - },null,parameters._asyncContext$p$0,parameters._callback$p$0) - }; - $h.ComposeTime.TimeType=function(){}; - $h.ComposeTime.TimeType.prototype={ - start: 1, - end: 2 - }; - $h.ComposeTime.TimeType["registerEnum"]("$h.1",false); - $h.Contact=function(data) - { - this.$$d__getContactString$p$0=Function.createDelegate(this,this._getContactString$p$0); - this.$$d__getAddresses$p$0=Function.createDelegate(this,this._getAddresses$p$0); - this.$$d__getUrls$p$0=Function.createDelegate(this,this._getUrls$p$0); - this.$$d__getEmailAddresses$p$0=Function.createDelegate(this,this._getEmailAddresses$p$0); - this.$$d__getPhoneNumbers$p$0=Function.createDelegate(this,this._getPhoneNumbers$p$0); - this.$$d__getBusinessName$p$0=Function.createDelegate(this,this._getBusinessName$p$0); - this.$$d__getPersonName$p$0=Function.createDelegate(this,this._getPersonName$p$0); - this._data$p$0=data; - $h.InitialData._defineReadOnlyProperty$i(this,"personName",this.$$d__getPersonName$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"businessName",this.$$d__getBusinessName$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"contactString",this.$$d__getContactString$p$0) - }; - $h.Contact.prototype={ - _data$p$0: null, - _phoneNumbers$p$0: null, - _getPersonName$p$0: function() - { - return this._data$p$0["PersonName"] - }, - _getBusinessName$p$0: function() - { - return this._data$p$0["BusinessName"] - }, - _getAddresses$p$0: function() - { - return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses") - }, - _getEmailAddresses$p$0: function() - { - return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses") - }, - _getUrls$p$0: function() - { - return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls") - }, - _getPhoneNumbers$p$0: function() - { - if(!this._phoneNumbers$p$0) - { - var $$t_1=this; - this._phoneNumbers$p$0=$h.Entities._getExtractedObjects$i($h.PhoneNumber,this._data$p$0,"PhoneNumbers",function(data) - { - return new $h.PhoneNumber(data) - }) - } - return this._phoneNumbers$p$0 - }, - _getContactString$p$0: function() - { - return this._data$p$0["ContactString"] - } - }; - $h.CustomProperties=function(data) - { - if($h.ScriptHelpers.isNullOrUndefined(data)) - throw Error.argumentNull("data"); - if(Array["isInstanceOfType"](data)) - { - var customPropertiesArray=data; - if(customPropertiesArray["length"] > 0) - this._data$p$0=customPropertiesArray[0]; - else - throw Error.argument("data"); - } - else - this._data$p$0=data - }; - $h.CustomProperties.prototype={_data$p$0: null}; - $h.CustomProperties.prototype.get=function(name) - { - var value=this._data$p$0[name]; - if(typeof value==="string") - { - var valueString=value; - if(valueString.length > 6 && valueString.startsWith("Date(") && valueString.endsWith(")")) - { - var ticksString=valueString.substring(5,valueString.length - 1); - var ticks=window["parseInt"](ticksString); - if(!window["isNaN"](ticks)) - { - var dateTimeValue=new Date(ticks); - if(dateTimeValue) - value=dateTimeValue - } - } - } - return value - }; - $h.CustomProperties.prototype.set=function(name, value) - { - if(window["OSF"]["OUtil"]["isDate"](value)) - value="Date("+value["getTime"]()+")"; - this._data$p$0[name]=value - }; - $h.CustomProperties.prototype.remove=function(name) - { - delete this._data$p$0[name] - }; - $h.CustomProperties.prototype.saveAsync=function() - { - var args=[]; - for(var $$pai_4=0; $$pai_4 < arguments["length"];++$$pai_4) - args[$$pai_4]=arguments[$$pai_4]; - var MaxCustomPropertiesLength=2500; - if(window["JSON"]["stringify"](this._data$p$0).length > MaxCustomPropertiesLength) - throw Error.argument(); - var parameters=$h.CommonParameters.parse(args,false,true); - var saveCustomProperties=new $h.SaveDictionaryRequest(parameters._callback$p$0,parameters._asyncContext$p$0); - saveCustomProperties._sendRequest$i$0(4,"SaveCustomProperties",{customProperties: this._data$p$0}) - }; - $h.Diagnostics=function(data, appName) - { - this.$$d__getOwaView$p$0=Function.createDelegate(this,this._getOwaView$p$0); - this.$$d__getHostVersion$p$0=Function.createDelegate(this,this._getHostVersion$p$0); - this.$$d__getHostName$p$0=Function.createDelegate(this,this._getHostName$p$0); - this._data$p$0=data; - this._appName$p$0=appName; - $h.InitialData._defineReadOnlyProperty$i(this,"hostName",this.$$d__getHostName$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"hostVersion",this.$$d__getHostVersion$p$0); - if(64===this._appName$p$0) - $h.InitialData._defineReadOnlyProperty$i(this,"OWAView",this.$$d__getOwaView$p$0) - }; - $h.Diagnostics.prototype={ - _data$p$0: null, - _appName$p$0: 0, - _getHostName$p$0: function() - { - switch(this._appName$p$0) - { - case 8: - return"Outlook"; - case 64: - return"OutlookWebApp"; - case 65536: - return"OutlookIOS"; - case 4194304: - return"OutlookAndroid"; - default: - return null - } - }, - _getHostVersion$p$0: function() - { - return this._data$p$0.get__hostVersion$i$0() - }, - _getOwaView$p$0: function() - { - return this._data$p$0.get__owaView$i$0() - } - }; - $h.EmailAddressDetails=function(data) - { - this.$$d__getRecipientType$p$0=Function.createDelegate(this,this._getRecipientType$p$0); - this.$$d__getAppointmentResponse$p$0=Function.createDelegate(this,this._getAppointmentResponse$p$0); - this.$$d__getDisplayName$p$0=Function.createDelegate(this,this._getDisplayName$p$0); - this.$$d__getEmailAddress$p$0=Function.createDelegate(this,this._getEmailAddress$p$0); - this._data$p$0=data; - $h.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0); - if($h.ScriptHelpers.dictionaryContainsKey(data,"appointmentResponse")) - $h.InitialData._defineReadOnlyProperty$i(this,"appointmentResponse",this.$$d__getAppointmentResponse$p$0); - if($h.ScriptHelpers.dictionaryContainsKey(data,"recipientType")) - $h.InitialData._defineReadOnlyProperty$i(this,"recipientType",this.$$d__getRecipientType$p$0) - }; - $h.EmailAddressDetails._createFromEmailUserDictionary$i=function(data) - { - var emailAddressDetailsDictionary={}; - var displayName=data["Name"]; - var emailAddress=data["UserId"]; - emailAddressDetailsDictionary["name"]=displayName || $h.EmailAddressDetails._emptyString$p; - emailAddressDetailsDictionary["address"]=emailAddress || $h.EmailAddressDetails._emptyString$p; - return new $h.EmailAddressDetails(emailAddressDetailsDictionary) - }; - $h.EmailAddressDetails.prototype={ - _data$p$0: null, - _getEmailAddress$p$0: function() - { - return this._data$p$0["address"] - }, - _getDisplayName$p$0: function() - { - return this._data$p$0["name"] - }, - _getAppointmentResponse$p$0: function() - { - var response=this._data$p$0["appointmentResponse"]; - return response < $h.EmailAddressDetails._responseTypeMap$p["length"] ? $h.EmailAddressDetails._responseTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["None"] - }, - _getRecipientType$p$0: function() - { - var response=this._data$p$0["recipientType"]; - return response < $h.EmailAddressDetails._recipientTypeMap$p["length"] ? $h.EmailAddressDetails._recipientTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["Other"] - } - }; - $h.EmailAddressDetails.prototype.toJSON=function() - { - var result={}; - result["emailAddress"]=this._getEmailAddress$p$0(); - result["displayName"]=this._getDisplayName$p$0(); - if($h.ScriptHelpers.dictionaryContainsKey(this._data$p$0,"appointmentResponse")) - result["appointmentResponse"]=this._getAppointmentResponse$p$0(); - if($h.ScriptHelpers.dictionaryContainsKey(this._data$p$0,"recipientType")) - result["recipientType"]=this._getRecipientType$p$0(); - return result - }; - $h.Entities=function(data, filteredEntitiesData, timeSent, permissionLevel) - { - this.$$d__createMeetingSuggestion$p$0=Function.createDelegate(this,this._createMeetingSuggestion$p$0); - this.$$d__getParcelDeliveries$p$0=Function.createDelegate(this,this._getParcelDeliveries$p$0); - this.$$d__getFlightReservations$p$0=Function.createDelegate(this,this._getFlightReservations$p$0); - this.$$d__getContacts$p$0=Function.createDelegate(this,this._getContacts$p$0); - this.$$d__getPhoneNumbers$p$0=Function.createDelegate(this,this._getPhoneNumbers$p$0); - this.$$d__getUrls$p$0=Function.createDelegate(this,this._getUrls$p$0); - this.$$d__getEmailAddresses$p$0=Function.createDelegate(this,this._getEmailAddresses$p$0); - this.$$d__getMeetingSuggestions$p$0=Function.createDelegate(this,this._getMeetingSuggestions$p$0); - this.$$d__getTaskSuggestions$p$0=Function.createDelegate(this,this._getTaskSuggestions$p$0); - this.$$d__getAddresses$p$0=Function.createDelegate(this,this._getAddresses$p$0); - this._data$p$0=data || {}; - this._filteredData$p$0=filteredEntitiesData || {}; - this._dateTimeSent$p$0=timeSent; - $h.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"taskSuggestions",this.$$d__getTaskSuggestions$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"meetingSuggestions",this.$$d__getMeetingSuggestions$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"contacts",this.$$d__getContacts$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"flightReservations",this.$$d__getFlightReservations$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"parcelDeliveries",this.$$d__getParcelDeliveries$p$0); - this._permissionLevel$p$0=permissionLevel - }; - $h.Entities._getExtractedObjects$i=function(T, data, name, creator, removeDuplicates, stringPropertyName) - { - var results=null; - var extractedObjects=data[name]; - if(!extractedObjects) - return new Array(0); - if(removeDuplicates) - extractedObjects=$h.Entities._removeDuplicate$p(Object,extractedObjects,$h.Entities._entityDictionaryEquals$p,stringPropertyName); - results=new Array(extractedObjects["length"]); - var count=0; - for(var $$arr_9=extractedObjects, $$len_A=$$arr_9.length, $$idx_B=0; $$idx_B < $$len_A;++$$idx_B) - { - var extractedObject=$$arr_9[$$idx_B]; - if(creator) - results[count++]=creator(extractedObject); - else - results[count++]=extractedObject - } - return results - }; - $h.Entities._getExtractedStringProperty$i=function(data, name, removeDuplicate) - { - var extractedProperties=data[name]; - if(!extractedProperties) - return new Array(0); - if(removeDuplicate) - extractedProperties=$h.Entities._removeDuplicate$p(String,extractedProperties,$h.Entities._stringEquals$p,null); - return extractedProperties - }; - $h.Entities._createContact$p=function(data) - { - return new $h.Contact(data) - }; - $h.Entities._createTaskSuggestion$p=function(data) - { - return new $h.TaskSuggestion(data) - }; - $h.Entities._createPhoneNumber$p=function(data) - { - return new $h.PhoneNumber(data) - }; - $h.Entities._entityDictionaryEquals$p=function(dictionary1, dictionary2, entityPropertyIdentifier) - { - if(dictionary1===dictionary2) - return true; - if(!dictionary1 || !dictionary2) - return false; - if(dictionary1[entityPropertyIdentifier]===dictionary2[entityPropertyIdentifier]) - return true; - return false - }; - $h.Entities._stringEquals$p=function(string1, string2, entityProperty) - { - return string1===string2 - }; - $h.Entities._removeDuplicate$p=function(T, array, entityEquals, entityPropertyIdentifier) - { - for(var matchIndex1=array["length"] - 1; matchIndex1 >=0; matchIndex1--) - { - var removeMatch=false; - for(var matchIndex2=matchIndex1 - 1; matchIndex2 >=0; matchIndex2--) - if(entityEquals(array[matchIndex1],array[matchIndex2],entityPropertyIdentifier)) - { - removeMatch=true; - break - } - if(removeMatch) - Array.removeAt(array,matchIndex1) - } - return array - }; - $h.Entities.prototype={ - _dateTimeSent$p$0: null, - _data$p$0: null, - _filteredData$p$0: null, - _filteredEntitiesCache$p$0: null, - _permissionLevel$p$0: 0, - _taskSuggestions$p$0: null, - _meetingSuggestions$p$0: null, - _phoneNumbers$p$0: null, - _contacts$p$0: null, - _addresses$p$0: null, - _emailAddresses$p$0: null, - _urls$p$0: null, - _flightReservations$p$0: null, - _parcelDeliveries$p$0: null, - _getByType$i$0: function(entityType) - { - if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["MeetingSuggestion"]) - return this._getMeetingSuggestions$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["TaskSuggestion"]) - return this._getTaskSuggestions$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Address"]) - return this._getAddresses$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["PhoneNumber"]) - return this._getPhoneNumbers$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["EmailAddress"]) - return this._getEmailAddresses$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Url"]) - return this._getUrls$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Contact"]) - return this._getContacts$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["FlightReservations"]) - return this._getFlightReservations$p$0(); - else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["ParcelDeliveries"]) - return this._getParcelDeliveries$p$0(); - return null - }, - _getFilteredEntitiesByName$i$0: function(name) - { - if(!this._filteredEntitiesCache$p$0) - this._filteredEntitiesCache$p$0={}; - if(!$h.ScriptHelpers.dictionaryContainsKey(this._filteredEntitiesCache$p$0,name)) - { - var found=false; - for(var i=0; i < $h.Entities._allEntityKeys$p["length"]; i++) - { - var entityTypeKey=$h.Entities._allEntityKeys$p[i]; - var perEntityTypeDictionary=this._filteredData$p$0[entityTypeKey]; - if(!perEntityTypeDictionary) - continue; - if($h.ScriptHelpers.dictionaryContainsKey(perEntityTypeDictionary,name)) - { - switch(entityTypeKey) - { - case"EmailAddresses": - case"Urls": - this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedStringProperty$i(perEntityTypeDictionary,name); - break; - case"Addresses": - this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedStringProperty$i(perEntityTypeDictionary,name,true); - break; - case"PhoneNumbers": - this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedObjects$i($h.PhoneNumber,perEntityTypeDictionary,name,$h.Entities._createPhoneNumber$p,false,null); - break; - case"TaskSuggestions": - this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedObjects$i($h.TaskSuggestion,perEntityTypeDictionary,name,$h.Entities._createTaskSuggestion$p,true,"TaskString"); - break; - case"MeetingSuggestions": - this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedObjects$i($h.MeetingSuggestion,perEntityTypeDictionary,name,this.$$d__createMeetingSuggestion$p$0,true,"MeetingString"); - break; - case"Contacts": - this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedObjects$i($h.Contact,perEntityTypeDictionary,name,$h.Entities._createContact$p,true,"ContactString"); - break - } - found=true; - break - } - } - if(!found) - this._filteredEntitiesCache$p$0[name]=null - } - return this._filteredEntitiesCache$p$0[name] - }, - _createMeetingSuggestion$p$0: function(data) - { - return new $h.MeetingSuggestion(data,this._dateTimeSent$p$0) - }, - _getAddresses$p$0: function() - { - if(!this._addresses$p$0) - this._addresses$p$0=$h.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses",true); - return this._addresses$p$0 - }, - _getEmailAddresses$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); - if(!this._emailAddresses$p$0) - this._emailAddresses$p$0=$h.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses",false); - return this._emailAddresses$p$0 - }, - _getUrls$p$0: function() - { - if(!this._urls$p$0) - this._urls$p$0=$h.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls",false); - return this._urls$p$0 - }, - _getPhoneNumbers$p$0: function() - { - if(!this._phoneNumbers$p$0) - this._phoneNumbers$p$0=$h.Entities._getExtractedObjects$i($h.PhoneNumber,this._data$p$0,"PhoneNumbers",$h.Entities._createPhoneNumber$p); - return this._phoneNumbers$p$0 - }, - _getTaskSuggestions$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); - if(!this._taskSuggestions$p$0) - this._taskSuggestions$p$0=$h.Entities._getExtractedObjects$i($h.TaskSuggestion,this._data$p$0,"TaskSuggestions",$h.Entities._createTaskSuggestion$p,true,"TaskString"); - return this._taskSuggestions$p$0 - }, - _getMeetingSuggestions$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); - if(!this._meetingSuggestions$p$0) - this._meetingSuggestions$p$0=$h.Entities._getExtractedObjects$i($h.MeetingSuggestion,this._data$p$0,"MeetingSuggestions",this.$$d__createMeetingSuggestion$p$0,true,"MeetingString"); - return this._meetingSuggestions$p$0 - }, - _getContacts$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); - if(!this._contacts$p$0) - this._contacts$p$0=$h.Entities._getExtractedObjects$i($h.Contact,this._data$p$0,"Contacts",$h.Entities._createContact$p,true,"ContactString"); - return this._contacts$p$0 - }, - _getParcelDeliveries$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); - if(!this._parcelDeliveries$p$0) - this._parcelDeliveries$p$0=$h.Entities._getExtractedObjects$i(Object,this._data$p$0,"ParcelDeliveries",null); - return this._parcelDeliveries$p$0 - }, - _getFlightReservations$p$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); - if(!this._flightReservations$p$0) - this._flightReservations$p$0=$h.Entities._getExtractedObjects$i(Object,this._data$p$0,"FlightReservations",null); - return this._flightReservations$p$0 - } - }; - $h.ReplyConstants=function(){}; - $h.AsyncConstants=function(){}; - window["Office"]["cast"]["item"]=Office.cast.item=function(){}; - window["Office"]["cast"]["item"]["toItemRead"]=function(item) - { - if($h.Item["isInstanceOfType"](item)) - return item; - throw Error.argumentType(); - }; - window["Office"]["cast"]["item"]["toItemCompose"]=function(item) - { - if($h.ComposeItem["isInstanceOfType"](item)) - return item; - throw Error.argumentType(); - }; - window["Office"]["cast"]["item"]["toMessage"]=function(item) - { - return window["Office"]["cast"]["item"]["toMessageRead"](item) - }; - window["Office"]["cast"]["item"]["toMessageRead"]=function(item) - { - if($h.Message["isInstanceOfType"](item)) - return item; - throw Error.argumentType(); - }; - window["Office"]["cast"]["item"]["toMessageCompose"]=function(item) - { - if($h.MessageCompose["isInstanceOfType"](item)) - return item; - throw Error.argumentType(); - }; - window["Office"]["cast"]["item"]["toMeetingRequest"]=function(item) - { - if($h.MeetingRequest["isInstanceOfType"](item)) - return item; - throw Error.argumentType(); - }; - window["Office"]["cast"]["item"]["toAppointment"]=function(item) - { - return window["Office"]["cast"]["item"]["toAppointmentRead"](item) - }; - window["Office"]["cast"]["item"]["toAppointmentRead"]=function(item) - { - if($h.Appointment["isInstanceOfType"](item)) - return item; - throw Error.argumentType(); - }; - window["Office"]["cast"]["item"]["toAppointmentCompose"]=function(item) - { - if($h.AppointmentCompose["isInstanceOfType"](item)) - return item; - throw Error.argumentType(); - }; - $h.Item=function(data) - { - this.$$d__getBody$p$1=Function.createDelegate(this,this._getBody$p$1); - this.$$d__getAttachments$p$1=Function.createDelegate(this,this._getAttachments$p$1); - this.$$d__getItemClass$p$1=Function.createDelegate(this,this._getItemClass$p$1); - this.$$d__getItemId$p$1=Function.createDelegate(this,this._getItemId$p$1); - this.$$d__getDateTimeModified$p$1=Function.createDelegate(this,this._getDateTimeModified$p$1); - this.$$d__getDateTimeCreated$p$1=Function.createDelegate(this,this._getDateTimeCreated$p$1); - $h.Item["initializeBase"](this,[data]); - $h.InitialData._defineReadOnlyProperty$i(this,"dateTimeCreated",this.$$d__getDateTimeCreated$p$1); - $h.InitialData._defineReadOnlyProperty$i(this,"dateTimeModified",this.$$d__getDateTimeModified$p$1); - $h.InitialData._defineReadOnlyProperty$i(this,"itemId",this.$$d__getItemId$p$1); - $h.InitialData._defineReadOnlyProperty$i(this,"itemClass",this.$$d__getItemClass$p$1); - $h.InitialData._defineReadOnlyProperty$i(this,"attachments",this.$$d__getAttachments$p$1); - $h.InitialData._defineReadOnlyProperty$i(this,"body",this.$$d__getBody$p$1) - }; - $h.Item.prototype={ - _body$p$1: null, - _getItemId$p$1: function() - { - return this._data$p$0.get__itemId$i$0() - }, - _getItemClass$p$1: function() - { - return this._data$p$0.get__itemClass$i$0() - }, - _getDateTimeCreated$p$1: function() - { - return this._data$p$0.get__dateTimeCreated$i$0() - }, - _getDateTimeModified$p$1: function() - { - return this._data$p$0.get__dateTimeModified$i$0() - }, - _getAttachments$p$1: function() - { - return this._data$p$0.get__attachments$i$0() - }, - _getBody$p$1: function() - { - if(!this._body$p$1) - this._body$p$1=new $h.Body; - return this._body$p$1 - } - }; - $h.ItemBase=function(data) - { - this.$$d__createCustomProperties$i$0=Function.createDelegate(this,this._createCustomProperties$i$0); - this.$$d__getNotificationMessages$p$0=Function.createDelegate(this,this._getNotificationMessages$p$0); - this.$$d_getItemType=Function.createDelegate(this,this.getItemType); - this._data$p$0=data; - $h.InitialData._defineReadOnlyProperty$i(this,"itemType",this.$$d_getItemType); - $h.InitialData._defineReadOnlyProperty$i(this,"notificationMessages",this.$$d__getNotificationMessages$p$0) - }; - $h.ItemBase.prototype={ - _data$p$0: null, - _notificationMessages$p$0: null, - get_data: function() - { - return this._data$p$0 - }, - _createCustomProperties$i$0: function(data) - { - return new $h.CustomProperties(data) - }, - _getNotificationMessages$p$0: function() - { - if(!this._notificationMessages$p$0) - this._notificationMessages$p$0=new $h.NotificationMessages; - return this._notificationMessages$p$0 - } - }; - $h.ItemBase.prototype.loadCustomPropertiesAsync=function() - { - var args=[]; - for(var $$pai_3=0; $$pai_3 < arguments["length"];++$$pai_3) - args[$$pai_3]=arguments[$$pai_3]; - var parameters=$h.CommonParameters.parse(args,true,true); - var loadCustomProperties=new $h._loadDictionaryRequest(this.$$d__createCustomProperties$i$0,"customProperties",parameters._callback$p$0,parameters._asyncContext$p$0); - loadCustomProperties._sendRequest$i$0(3,"LoadCustomProperties",{}) - }; - $h.MeetingRequest=function(data) - { - this.$$d__getRequiredAttendees$p$3=Function.createDelegate(this,this._getRequiredAttendees$p$3); - this.$$d__getOptionalAttendees$p$3=Function.createDelegate(this,this._getOptionalAttendees$p$3); - this.$$d__getLocation$p$3=Function.createDelegate(this,this._getLocation$p$3); - this.$$d__getEnd$p$3=Function.createDelegate(this,this._getEnd$p$3); - this.$$d__getStart$p$3=Function.createDelegate(this,this._getStart$p$3); - $h.MeetingRequest["initializeBase"](this,[data]); - $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$3); - $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$3); - $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$3); - $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$3); - $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$3) - }; - $h.MeetingRequest.prototype={ - _getStart$p$3: function() - { - return this._data$p$0.get__start$i$0() - }, - _getEnd$p$3: function() - { - return this._data$p$0.get__end$i$0() - }, - _getLocation$p$3: function() - { - return this._data$p$0.get__location$i$0() - }, - _getOptionalAttendees$p$3: function() - { - return this._data$p$0.get__cc$i$0() - }, - _getRequiredAttendees$p$3: function() - { - return this._data$p$0.get__to$i$0() - } - }; - $h.MeetingSuggestion=function(data, dateTimeSent) - { - this.$$d__getEndTime$p$0=Function.createDelegate(this,this._getEndTime$p$0); - this.$$d__getStartTime$p$0=Function.createDelegate(this,this._getStartTime$p$0); - this.$$d__getSubject$p$0=Function.createDelegate(this,this._getSubject$p$0); - this.$$d__getLocation$p$0=Function.createDelegate(this,this._getLocation$p$0); - this.$$d__getAttendees$p$0=Function.createDelegate(this,this._getAttendees$p$0); - this.$$d__getMeetingString$p$0=Function.createDelegate(this,this._getMeetingString$p$0); - this._data$p$0=data; - this._dateTimeSent$p$0=dateTimeSent; - $h.InitialData._defineReadOnlyProperty$i(this,"meetingString",this.$$d__getMeetingString$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"attendees",this.$$d__getAttendees$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStartTime$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEndTime$p$0) - }; - $h.MeetingSuggestion.prototype={ - _dateTimeSent$p$0: null, - _data$p$0: null, - _attendees$p$0: null, - _getMeetingString$p$0: function() - { - return this._data$p$0["MeetingString"] - }, - _getLocation$p$0: function() - { - return this._data$p$0["Location"] - }, - _getSubject$p$0: function() - { - return this._data$p$0["Subject"] - }, - _getStartTime$p$0: function() - { - var time=this._createDateTimeFromParameter$p$0("StartTime"); - var resolvedTime=$h.MeetingSuggestionTimeDecoder.resolve(time,this._dateTimeSent$p$0); - if(resolvedTime["getTime"]() !==time["getTime"]()) - return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToUtcClientTime"](window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._dateToDictionary$i$0(resolvedTime)); - return time - }, - _getEndTime$p$0: function() - { - var time=this._createDateTimeFromParameter$p$0("EndTime"); - var resolvedTime=$h.MeetingSuggestionTimeDecoder.resolve(time,this._dateTimeSent$p$0); - if(resolvedTime["getTime"]() !==time["getTime"]()) - return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToUtcClientTime"](window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._dateToDictionary$i$0(resolvedTime)); - return time - }, - _createDateTimeFromParameter$p$0: function(keyName) - { - var dateTimeString=this._data$p$0[keyName]; - if(!dateTimeString) - return null; - return new Date(dateTimeString) - }, - _getAttendees$p$0: function() - { - if(!this._attendees$p$0) - { - var $$t_1=this; - this._attendees$p$0=$h.Entities._getExtractedObjects$i($h.EmailAddressDetails,this._data$p$0,"Attendees",function(data) - { - return $h.EmailAddressDetails._createFromEmailUserDictionary$i(data) - }) - } - return this._attendees$p$0 - } - }; - $h.MeetingSuggestionTimeDecoder=function(){}; - $h.MeetingSuggestionTimeDecoder.resolve=function(inTime, sentTime) - { - if(!sentTime) - return inTime; - try - { - var tod; - var outDate; - var extractedDate; - var sentDate=new Date(sentTime["getFullYear"](),sentTime["getMonth"](),sentTime["getDate"](),0,0,0,0); - var $$t_7, - $$t_8, - $$t_9; - if(!($$t_9=$h.MeetingSuggestionTimeDecoder._decode$p(inTime,$$t_7={val: extractedDate},$$t_8={val: tod}),extractedDate=$$t_7["val"],tod=$$t_8["val"],$$t_9)) - return inTime; - else - { - if($h._preciseDate["isInstanceOfType"](extractedDate)) - outDate=$h.MeetingSuggestionTimeDecoder._resolvePreciseDate$p(sentDate,extractedDate); - else if($h._relativeDate["isInstanceOfType"](extractedDate)) - outDate=$h.MeetingSuggestionTimeDecoder._resolveRelativeDate$p(sentDate,extractedDate); - else - outDate=sentDate; - if(window["isNaN"](outDate["getTime"]())) - return sentTime; - outDate["setMilliseconds"](outDate["getMilliseconds"]()+tod); - return outDate - } - } - catch($$e_6) - { - return sentTime - } - }; - $h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i=function(value) - { - return null===value || value===undefined - }; - $h.MeetingSuggestionTimeDecoder._resolvePreciseDate$p=function(sentDate, precise) - { - var year=precise._year$i$1; - var month=!precise._month$i$1 ? sentDate["getMonth"]() : precise._month$i$1 - 1; - var day=precise._day$i$1; - if(!day) - return sentDate; - var candidate; - if($h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i(year)) - { - candidate=new Date(sentDate["getFullYear"](),month,day); - if(candidate["getTime"]() < sentDate["getTime"]()) - candidate=new Date(sentDate["getFullYear"]()+1,month,day) - } - else - candidate=new Date(year < 50 ? 2e3+year : 1900+year,month,day); - if(candidate["getMonth"]() !==month) - return sentDate; - return candidate - }; - $h.MeetingSuggestionTimeDecoder._resolveRelativeDate$p=function(sentDate, relative) - { - var date; - switch(relative._unit$i$1) - { - case 0: - date=new Date(sentDate["getFullYear"](),sentDate["getMonth"](),sentDate["getDate"]()); - date["setDate"](date["getDate"]()+relative._offset$i$1); - return date; - case 5: - return $h.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p(sentDate,relative._offset$i$1,relative._tag$i$1); - case 2: - var days=1; - switch(relative._modifier$i$1) - { - case 1: - break; - case 2: - days=16; - break; - default: - if(!relative._offset$i$1) - days=sentDate["getDate"](); - break - } - date=new Date(sentDate["getFullYear"](),sentDate["getMonth"](),days); - date["setMonth"](date["getMonth"]()+relative._offset$i$1); - if(date["getTime"]() < sentDate["getTime"]()) - date["setDate"](date["getDate"]()+sentDate["getDate"]() - 1); - return date; - case 1: - date=new Date(sentDate["getFullYear"](),sentDate["getMonth"](),sentDate["getDate"]()); - date["setDate"](sentDate["getDate"]()+7 * relative._offset$i$1); - if(relative._modifier$i$1===1 || !relative._modifier$i$1) - { - date["setDate"](date["getDate"]()+1 - date["getDay"]()); - if(date["getTime"]() < sentDate["getTime"]()) - return sentDate; - return date - } - else if(relative._modifier$i$1===2) - { - date["setDate"](date["getDate"]()+5 - date["getDay"]()); - return date - } - break; - case 4: - return $h.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p(sentDate,relative); - case 3: - if(relative._offset$i$1 > 0) - return new Date(sentDate["getFullYear"]()+relative._offset$i$1,0,1); - break; - default: - break - } - return sentDate - }; - $h.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p=function(sentDate, offset, tag) - { - if(offset > -5 && offset < 5) - { - var dayOfWeek=(tag+6) % 7+1; - var days=7 * offset+(dayOfWeek - sentDate["getDay"]()); - sentDate["setDate"](sentDate["getDate"]()+days); - return sentDate - } - else - { - var days=(tag - sentDate["getDay"]()) % 7; - if(days < 0) - days+=7; - sentDate["setDate"](sentDate["getDate"]()+days); - return sentDate - } - }; - $h.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p=function(sentDate, relative) - { - var date; - var firstDay; - var newDate; - date=sentDate; - if(relative._tag$i$1 <=0 || relative._tag$i$1 > 12 || relative._offset$i$1 <=0 || relative._offset$i$1 > 5) - return sentDate; - var monthOffset=(12+relative._tag$i$1 - date["getMonth"]() - 1) % 12; - firstDay=new Date(date["getFullYear"](),date["getMonth"]()+monthOffset,1); - if(relative._modifier$i$1===1) - if(relative._offset$i$1===1 && firstDay["getDay"]() !==6 && firstDay["getDay"]()) - return firstDay; - else - { - newDate=new Date(firstDay["getFullYear"](),firstDay["getMonth"](),firstDay["getDate"]()); - newDate["setDate"](newDate["getDate"]()+(7+(1 - firstDay["getDay"]())) % 7); - if(firstDay["getDay"]() !==6 && firstDay["getDay"]() && firstDay["getDay"]() !==1) - newDate["setDate"](newDate["getDate"]() - 7); - newDate["setDate"](newDate["getDate"]()+7 * (relative._offset$i$1 - 1)); - if(newDate["getMonth"]()+1 !==relative._tag$i$1) - return sentDate; - return newDate - } - else - { - newDate=new Date(firstDay["getFullYear"](),firstDay["getMonth"](),$h.MeetingSuggestionTimeDecoder._daysInMonth$p(firstDay["getMonth"](),firstDay["getFullYear"]())); - var offset=1 - newDate["getDay"](); - if(offset > 0) - offset=offset - 7; - newDate["setDate"](newDate["getDate"]()+offset); - newDate["setDate"](newDate["getDate"]()+7 * (1 - relative._offset$i$1)); - if(newDate["getMonth"]()+1 !==relative._tag$i$1) - if(firstDay["getDay"]() !==6 && firstDay["getDay"]()) - return firstDay; - else - return sentDate; - else - return newDate - } - }; - $h.MeetingSuggestionTimeDecoder._decode$p=function(inDate, date, time) - { - var DateValueMask=32767; - date["val"]=null; - time["val"]=0; - if(!inDate) - return false; - time["val"]=$h.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p(inDate); - var inDateAtMidnight=inDate["getTime"]() - time["val"]; - var value=(inDateAtMidnight - $h.MeetingSuggestionTimeDecoder._baseDate$p["getTime"]()) / 864e5; - if(value < 0) - return false; - else if(value >=262144) - return false; - else - { - var type=value >> 15; - value=value & DateValueMask; - switch(type) - { - case 0: - return $h.MeetingSuggestionTimeDecoder._decodePreciseDate$p(value,date); - case 1: - return $h.MeetingSuggestionTimeDecoder._decodeRelativeDate$p(value,date); - default: - return false - } - } - }; - $h.MeetingSuggestionTimeDecoder._decodePreciseDate$p=function(value, date) - { - var c_SubTypeMask=7; - var c_MonthMask=15; - var c_DayMask=31; - var c_YearMask=127; - var year=null; - var month=0; - var day=0; - date["val"]=null; - var subType=value >> 12 & c_SubTypeMask; - if((subType & 4)===4) - { - year=value >> 5 & c_YearMask; - if((subType & 2)===2) - { - if((subType & 1)===1) - return false; - month=value >> 1 & c_MonthMask - } - } - else - { - if((subType & 2)===2) - month=value >> 8 & c_MonthMask; - if((subType & 1)===1) - day=value >> 3 & c_DayMask - } - date["val"]=new $h._preciseDate(day,month,year); - return true - }; - $h.MeetingSuggestionTimeDecoder._decodeRelativeDate$p=function(value, date) - { - var TagMask=15; - var OffsetMask=63; - var UnitMask=7; - var ModifierMask=3; - var tag=value & TagMask; - value >>=4; - var offset=$h.MeetingSuggestionTimeDecoder._fromComplement$p(value & OffsetMask,6); - value >>=6; - var unit=value & UnitMask; - value >>=3; - var modifier=value & ModifierMask; - try - { - date["val"]=new $h._relativeDate(modifier,offset,unit,tag); - return true - } - catch($$e_A) - { - date["val"]=null; - return false - } - }; - $h.MeetingSuggestionTimeDecoder._fromComplement$p=function(value, n) - { - var signed=1 << n - 1; - var mask=(1 << n) - 1; - if((value & signed)===signed) - return-((value ^ mask)+1); - else - return value - }; - $h.MeetingSuggestionTimeDecoder._daysInMonth$p=function(month, year) - { - return 32 - new Date(year,month,32)["getDate"]() - }; - $h.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p=function(inputTime) - { - var timeOfDay=0; - timeOfDay+=inputTime["getUTCHours"]() * 3600; - timeOfDay+=inputTime["getUTCMinutes"]() * 60; - timeOfDay+=inputTime["getUTCSeconds"](); - timeOfDay *=1e3; - timeOfDay+=inputTime["getUTCMilliseconds"](); - return timeOfDay - }; - $h._extractedDate=function(){}; - $h._preciseDate=function(day, month, year) - { - $h._preciseDate["initializeBase"](this); - if(day < 0 || day > 31) - throw Error.argumentOutOfRange("day"); - if(month < 0 || month > 12) - throw Error.argumentOutOfRange("month"); - this._day$i$1=day; - this._month$i$1=month; - if(!$h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i(year)) - { - if(!month && day) - throw Error.argument("Invalid arguments"); - if(year < 0 || year > 2099) - throw Error.argumentOutOfRange("year"); - this._year$i$1=year % 100 - } - else if(!this._month$i$1 && !this._day$i$1) - throw Error.argument("Invalid datetime"); - }; - $h._preciseDate.prototype={ - _day$i$1: 0, - _month$i$1: 0, - _year$i$1: null - }; - $h._relativeDate=function(modifier, offset, unit, tag) - { - $h._relativeDate["initializeBase"](this); - if(offset < -32 || offset > 31) - throw Error.argumentOutOfRange("offset"); - if(tag < 0 || tag > 15) - throw Error.argumentOutOfRange("tag"); - if(!unit && offset < 0) - throw Error.argument("unit & offset do not form a valid date"); - this._modifier$i$1=modifier; - this._offset$i$1=offset; - this._unit$i$1=unit; - this._tag$i$1=tag - }; - $h._relativeDate.prototype={ - _modifier$i$1: 0, - _offset$i$1: 0, - _unit$i$1: 0, - _tag$i$1: 0 - }; - $h.Message=function(dataDictionary) - { - this.$$d__getConversationId$p$2=Function.createDelegate(this,this._getConversationId$p$2); - this.$$d__getInternetMessageId$p$2=Function.createDelegate(this,this._getInternetMessageId$p$2); - this.$$d__getCc$p$2=Function.createDelegate(this,this._getCc$p$2); - this.$$d__getTo$p$2=Function.createDelegate(this,this._getTo$p$2); - this.$$d__getFrom$p$2=Function.createDelegate(this,this._getFrom$p$2); - this.$$d__getSender$p$2=Function.createDelegate(this,this._getSender$p$2); - this.$$d__getNormalizedSubject$p$2=Function.createDelegate(this,this._getNormalizedSubject$p$2); - this.$$d__getSubject$p$2=Function.createDelegate(this,this._getSubject$p$2); - $h.Message["initializeBase"](this,[dataDictionary]); - $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"sender",this.$$d__getSender$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"from",this.$$d__getFrom$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"to",this.$$d__getTo$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"cc",this.$$d__getCc$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"internetMessageId",this.$$d__getInternetMessageId$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"conversationId",this.$$d__getConversationId$p$2) - }; - $h.Message.prototype={ - getItemType: function() - { - return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Message"] - }, - _getSubject$p$2: function() - { - return this._data$p$0.get__subject$i$0() - }, - _getNormalizedSubject$p$2: function() - { - return this._data$p$0.get__normalizedSubject$i$0() - }, - _getSender$p$2: function() - { - return this._data$p$0.get__sender$i$0() - }, - _getFrom$p$2: function() - { - return this._data$p$0.get__from$i$0() - }, - _getTo$p$2: function() - { - return this._data$p$0.get__to$i$0() - }, - _getCc$p$2: function() - { - return this._data$p$0.get__cc$i$0() - }, - _getInternetMessageId$p$2: function() - { - return this._data$p$0.get__internetMessageId$i$0() - }, - _getConversationId$p$2: function() - { - return this._data$p$0.get__conversationId$i$0() - } - }; - $h.Message.prototype.getEntities=function() - { - return this._data$p$0._getEntities$i$0() - }; - $h.Message.prototype.getEntitiesByType=function(entityType) - { - return this._data$p$0._getEntitiesByType$i$0(entityType) - }; - $h.Message.prototype.getFilteredEntitiesByName=function(name) - { - return this._data$p$0._getFilteredEntitiesByName$i$0(name) - }; - $h.Message.prototype.getSelectedEntities=function() - { - return this._data$p$0._getSelectedEntities$i$0() - }; - $h.Message.prototype.getRegExMatches=function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches"); - return this._data$p$0._getRegExMatches$i$0() - }; - $h.Message.prototype.getRegExMatchesByName=function(name) - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName"); - return this._data$p$0._getRegExMatchesByName$i$0(name) - }; - $h.Message.prototype.getSelectedRegExMatches=function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedRegExMatches"); - return this._data$p$0._getSelectedRegExMatches$i$0() - }; - $h.Message.prototype.displayReplyForm=function(obj) - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyForm$i$0(obj) - }; - $h.Message.prototype.displayReplyAllForm=function(obj) - { - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyAllForm$i$0(obj) - }; - $h.MessageCompose=function(data) - { - this.$$d__getConversationId$p$2=Function.createDelegate(this,this._getConversationId$p$2); - this.$$d__getBcc$p$2=Function.createDelegate(this,this._getBcc$p$2); - this.$$d__getCc$p$2=Function.createDelegate(this,this._getCc$p$2); - this.$$d__getTo$p$2=Function.createDelegate(this,this._getTo$p$2); - $h.MessageCompose["initializeBase"](this,[data]); - $h.InitialData._defineReadOnlyProperty$i(this,"to",this.$$d__getTo$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"cc",this.$$d__getCc$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"bcc",this.$$d__getBcc$p$2); - $h.InitialData._defineReadOnlyProperty$i(this,"conversationId",this.$$d__getConversationId$p$2) - }; - $h.MessageCompose.prototype={ - _to$p$2: null, - _cc$p$2: null, - _bcc$p$2: null, - getItemType: function() - { - return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Message"] - }, - _getTo$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._to$p$2) - this._to$p$2=new $h.ComposeRecipient(0,"to"); - return this._to$p$2 - }, - _getCc$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._cc$p$2) - this._cc$p$2=new $h.ComposeRecipient(1,"cc"); - return this._cc$p$2 - }, - _getBcc$p$2: function() - { - this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); - if(!this._bcc$p$2) - this._bcc$p$2=new $h.ComposeRecipient(2,"bcc"); - return this._bcc$p$2 - }, - _getConversationId$p$2: function() - { - return this._data$p$0.get__conversationId$i$0() - } - }; - $h.NotificationMessages=function(){}; - $h.NotificationMessages._mapToHostItemNotificationMessageType$p=function(dataToHost) - { - var notificationType; - var hostItemNotificationMessageType; - notificationType=dataToHost["type"]; - if(notificationType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["ProgressIndicator"]) - hostItemNotificationMessageType=1; - else if(notificationType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["InformationalMessage"]) - hostItemNotificationMessageType=0; - else if(notificationType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["ErrorMessage"]) - hostItemNotificationMessageType=2; - else - throw Error.argument("type"); - dataToHost["type"]=hostItemNotificationMessageType - }; - $h.NotificationMessages._validateKey$p=function(key) - { - if(!$h.ScriptHelpers.isNonEmptyString(key)) - throw Error.argument("key"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(key.length,0,32,"key") - }; - $h.NotificationMessages._validateDictionary$p=function(dictionary) - { - if(!$h.ScriptHelpers.isNonEmptyString(dictionary["type"])) - throw Error.argument("type"); - if(dictionary["type"]===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["InformationalMessage"]) - { - if(!$h.ScriptHelpers.isNonEmptyString(dictionary["icon"])) - throw Error.argument("icon"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(dictionary["icon"].length,0,32,"icon"); - if($h.ScriptHelpers.isUndefined(dictionary["persistent"])) - throw Error.argument("persistent"); - if(!Boolean["isInstanceOfType"](dictionary["persistent"])) - throw Error.argumentType("persistent",Object["getType"](dictionary["persistent"]),Boolean); - } - else - { - if(!$h.ScriptHelpers.isUndefined(dictionary["icon"])) - throw Error.argument("icon"); - if(!$h.ScriptHelpers.isUndefined(dictionary["persistent"])) - throw Error.argument("persistent"); - } - if(!$h.ScriptHelpers.isNonEmptyString(dictionary["message"])) - throw Error.argument("message"); - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(dictionary["message"].length,0,150,"message") - }; - $h.NotificationMessages.prototype.addAsync=function(key, dictionary) - { - var args=[]; - for(var $$pai_5=2; $$pai_5 < arguments["length"];++$$pai_5) - args[$$pai_5 - 2]=arguments[$$pai_5]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.addAsync"); - var commonParameters=$h.CommonParameters.parse(args,false); - $h.NotificationMessages._validateKey$p(key); - $h.NotificationMessages._validateDictionary$p(dictionary); - var dataToHost={}; - dataToHost=$h.ScriptHelpers.deepClone(dictionary); - dataToHost["key"]=key; - $h.NotificationMessages._mapToHostItemNotificationMessageType$p(dataToHost); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(33,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.NotificationMessages.prototype.getAllAsync=function() - { - var args=[]; - for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2) - args[$$pai_2]=arguments[$$pai_2]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.getAllAsync"); - var commonParameters=$h.CommonParameters.parse(args,true); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(34,null,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.NotificationMessages.prototype.replaceAsync=function(key, dictionary) - { - var args=[]; - for(var $$pai_5=2; $$pai_5 < arguments["length"];++$$pai_5) - args[$$pai_5 - 2]=arguments[$$pai_5]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.replaceAsync"); - var commonParameters=$h.CommonParameters.parse(args,false); - $h.NotificationMessages._validateKey$p(key); - $h.NotificationMessages._validateDictionary$p(dictionary); - var dataToHost={}; - dataToHost=$h.ScriptHelpers.deepClone(dictionary); - dataToHost["key"]=key; - $h.NotificationMessages._mapToHostItemNotificationMessageType$p(dataToHost); - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(35,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.NotificationMessages.prototype.removeAsync=function(key) - { - var args=[]; - for(var $$pai_4=1; $$pai_4 < arguments["length"];++$$pai_4) - args[$$pai_4 - 1]=arguments[$$pai_4]; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.removeAsync"); - var commonParameters=$h.CommonParameters.parse(args,false); - $h.NotificationMessages._validateKey$p(key); - var dataToHost={key: key}; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(36,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) - }; - $h.OutlookErrorManager=function(){}; - $h.OutlookErrorManager.getErrorArgs=function(errorCode) - { - if(!$h.OutlookErrorManager._isInitialized$p) - $h.OutlookErrorManager._initialize$p(); - return OSF.DDA.ErrorCodeManager["getErrorArgs"](errorCode) - }; - $h.OutlookErrorManager._initialize$p=function() - { - $h.OutlookErrorManager._addErrorMessage$p(9e3,"AttachmentSizeExceeded",window["_u"]["ExtensibilityStrings"]["l_AttachmentExceededSize_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9001,"NumberOfAttachmentsExceeded",window["_u"]["ExtensibilityStrings"]["l_ExceededMaxNumberOfAttachments_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9002,"InternalFormatError",window["_u"]["ExtensibilityStrings"]["l_InternalFormatError_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9003,"InvalidAttachmentId",window["_u"]["ExtensibilityStrings"]["l_InvalidAttachmentId_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9004,"InvalidAttachmentPath",window["_u"]["ExtensibilityStrings"]["l_InvalidAttachmentPath_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9005,"CannotAddAttachmentBeforeUpgrade",window["_u"]["ExtensibilityStrings"]["l_CannotAddAttachmentBeforeUpgrade_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9006,"AttachmentDeletedBeforeUploadCompletes",window["_u"]["ExtensibilityStrings"]["l_AttachmentDeletedBeforeUploadCompletes_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9007,"AttachmentUploadGeneralFailure",window["_u"]["ExtensibilityStrings"]["l_AttachmentUploadGeneralFailure_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9008,"AttachmentToDeleteDoesNotExist",window["_u"]["ExtensibilityStrings"]["l_DeleteAttachmentDoesNotExist_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9009,"AttachmentDeleteGeneralFailure",window["_u"]["ExtensibilityStrings"]["l_AttachmentDeleteGeneralFailure_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9010,"InvalidEndTime",window["_u"]["ExtensibilityStrings"]["l_InvalidEndTime_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9011,"HtmlSanitizationFailure",window["_u"]["ExtensibilityStrings"]["l_HtmlSanitizationFailure_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9012,"NumberOfRecipientsExceeded",String.format(window["_u"]["ExtensibilityStrings"]["l_NumberOfRecipientsExceeded_Text"],500)); - $h.OutlookErrorManager._addErrorMessage$p(9013,"NoValidRecipientsProvided",window["_u"]["ExtensibilityStrings"]["l_NoValidRecipientsProvided_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9014,"CursorPositionChanged",window["_u"]["ExtensibilityStrings"]["l_CursorPositionChanged_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9016,"InvalidSelection",window["_u"]["ExtensibilityStrings"]["l_InvalidSelection_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9017,"AccessRestricted",""); - $h.OutlookErrorManager._addErrorMessage$p(9018,"GenericTokenError",""); - $h.OutlookErrorManager._addErrorMessage$p(9019,"GenericSettingsError",""); - $h.OutlookErrorManager._addErrorMessage$p(9020,"GenericResponseError",""); - $h.OutlookErrorManager._addErrorMessage$p(9021,"SaveError",window["_u"]["ExtensibilityStrings"]["l_SaveError_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9022,"MessageInDifferentStoreError",window["_u"]["ExtensibilityStrings"]["l_MessageInDifferentStoreError_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9023,"DuplicateNotificationKey",window["_u"]["ExtensibilityStrings"]["l_DuplicateNotificationKey_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9024,"NotificationKeyNotFound",window["_u"]["ExtensibilityStrings"]["l_NotificationKeyNotFound_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9025,"NumberOfNotificationsExceeded",window["_u"]["ExtensibilityStrings"]["l_NumberOfNotificationsExceeded_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9026,"PersistedNotificationArrayReadError",window["_u"]["ExtensibilityStrings"]["l_PersistedNotificationArrayReadError_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9027,"PersistedNotificationArraySaveError",window["_u"]["ExtensibilityStrings"]["l_PersistedNotificationArraySaveError_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9028,"CannotPersistPropertyInUnsavedDraftError",window["_u"]["ExtensibilityStrings"]["l_CannotPersistPropertyInUnsavedDraftError_Text"]); - $h.OutlookErrorManager._addErrorMessage$p(9029,"CanOnlyGetTokenForSavedItem",window["_u"]["ExtensibilityStrings"]["l_CallSaveAsyncBeforeToken_Text"]); - $h.OutlookErrorManager._isInitialized$p=true - }; - $h.OutlookErrorManager._addErrorMessage$p=function(errorCode, errorName, errorMessage) - { - OSF.DDA.ErrorCodeManager["addErrorMessage"](errorCode,{ - name: errorName, - message: errorMessage - }) - }; - $h.OutlookErrorManager.OutlookErrorCodes=function(){}; - $h.OutlookErrorManager.OsfDdaErrorCodes=function(){}; - $h.PhoneNumber=function(data) - { - this.$$d__getPhoneType$p$0=Function.createDelegate(this,this._getPhoneType$p$0); - this.$$d__getOriginalPhoneString$p$0=Function.createDelegate(this,this._getOriginalPhoneString$p$0); - this.$$d__getPhoneString$p$0=Function.createDelegate(this,this._getPhoneString$p$0); - this._data$p$0=data; - $h.InitialData._defineReadOnlyProperty$i(this,"phoneString",this.$$d__getPhoneString$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"originalPhoneString",this.$$d__getOriginalPhoneString$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"type",this.$$d__getPhoneType$p$0) - }; - $h.PhoneNumber.prototype={ - _data$p$0: null, - _getPhoneString$p$0: function() - { - return this._data$p$0["PhoneString"] - }, - _getOriginalPhoneString$p$0: function() - { - return this._data$p$0["OriginalPhoneString"] - }, - _getPhoneType$p$0: function() - { - return this._data$p$0["Type"] - } - }; - $h.TaskSuggestion=function(data) - { - this.$$d__getAssignees$p$0=Function.createDelegate(this,this._getAssignees$p$0); - this.$$d__getTaskString$p$0=Function.createDelegate(this,this._getTaskString$p$0); - this._data$p$0=data; - $h.InitialData._defineReadOnlyProperty$i(this,"taskString",this.$$d__getTaskString$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"assignees",this.$$d__getAssignees$p$0) - }; - $h.TaskSuggestion.prototype={ - _data$p$0: null, - _assignees$p$0: null, - _getTaskString$p$0: function() - { - return this._data$p$0["TaskString"] - }, - _getAssignees$p$0: function() - { - if(!this._assignees$p$0) - { - var $$t_1=this; - this._assignees$p$0=$h.Entities._getExtractedObjects$i($h.EmailAddressDetails,this._data$p$0,"Assignees",function(data) - { - return $h.EmailAddressDetails._createFromEmailUserDictionary$i(data) - }) - } - return this._assignees$p$0 - } - }; - $h.UserProfile=function(data) - { - this.$$d__getUserProfileType$p$0=Function.createDelegate(this,this._getUserProfileType$p$0); - this.$$d__getTimeZone$p$0=Function.createDelegate(this,this._getTimeZone$p$0); - this.$$d__getEmailAddress$p$0=Function.createDelegate(this,this._getEmailAddress$p$0); - this.$$d__getDisplayName$p$0=Function.createDelegate(this,this._getDisplayName$p$0); - this._data$p$0=data; - $h.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"timeZone",this.$$d__getTimeZone$p$0); - $h.InitialData._defineReadOnlyProperty$i(this,"type",this.$$d__getUserProfileType$p$0) - }; - $h.UserProfile.prototype={ - _data$p$0: null, - _getUserProfileType$p$0: function() - { - return this._data$p$0.get__userProfileType$i$0() - }, - _getDisplayName$p$0: function() - { - return this._data$p$0.get__userDisplayName$i$0() - }, - _getEmailAddress$p$0: function() - { - return this._data$p$0.get__userEmailAddress$i$0() - }, - _getTimeZone$p$0: function() - { - return this._data$p$0.get__userTimeZone$i$0() - } - }; - $h.OutlookDispid=function(){}; - $h.OutlookDispid.prototype={ - owaOnlyMethod: 0, - getInitialData: 1, - getUserIdentityToken: 2, - loadCustomProperties: 3, - saveCustomProperties: 4, - ewsRequest: 5, - displayNewAppointmentForm: 7, - displayMessageForm: 8, - displayAppointmentForm: 9, - displayReplyForm: 10, - displayReplyAllForm: 11, - getCallbackToken: 12, - bodySetSelectedDataAsync: 13, - getBodyTypeAsync: 14, - getRecipientsAsync: 15, - addFileAttachmentAsync: 16, - setSubjectAsync: 17, - getSubjectAsync: 18, - addItemAttachmentAsync: 19, - removeAttachmentAsync: 20, - setRecipientsAsync: 21, - addRecipientsAsync: 22, - bodyPrependAsync: 23, - getTimeAsync: 24, - setTimeAsync: 25, - getLocationAsync: 26, - setLocationAsync: 27, - getSelectedDataAsync: 28, - setSelectedDataAsync: 29, - displayReplyFormWithAttachments: 30, - displayReplyAllFormWithAttachments: 31, - saveAsync: 32, - addNotficationMessageAsync: 33, - getAllNotficationMessagesAsync: 34, - replaceNotficationMessageAsync: 35, - removeNotficationMessageAsync: 36, - getBodyAsync: 37, - setBodyAsync: 38, - appCommands1: 39, - registerConsentAsync: 40, - close: 41, - closeApp: 42, - displayPersonaCardAsync: 43, - displayNewMessageForm: 44, - navigateToModuleAsync: 45, - eventCompleted: 94, - closeContainer: 97, - messageParent: 144, - trackCtq: 400, - recordTrace: 401, - recordDataPoint: 402, - windowOpenOverrideHandler: 403, - saveSettingsRequest: 404 - }; - $h.OutlookDispid["registerEnum"]("$h.2",false); - $h.RequestState=function(){}; - $h.RequestState.prototype={ - unsent: 0, - opened: 1, - headersReceived: 2, - loading: 3, - done: 4 - }; - $h.RequestState["registerEnum"]("$h.3",false); - $h.CommonParameters=function(options, callback, asyncContext) - { - this._options$p$0=options; - this._callback$p$0=callback; - this._asyncContext$p$0=asyncContext - }; - $h.CommonParameters.parse=function(args, isCallbackRequired, tryLegacy) - { - var legacyParameters; - var $$t_8, - $$t_9; - if(tryLegacy && ($$t_9=$h.CommonParameters._tryParseLegacy$p(args,$$t_8={val: legacyParameters}),legacyParameters=$$t_8["val"],$$t_9)) - return legacyParameters; - var argsLength=args["length"]; - var options=null; - var callback=null; - var asyncContext=null; - if(argsLength===1) - if(Function["isInstanceOfType"](args[0])) - callback=args[0]; - else if(Object["isInstanceOfType"](args[0])) - options=args[0]; - else - throw Error.argumentType(); - else if(argsLength===2) - { - if(!Object["isInstanceOfType"](args[0])) - throw Error.argument("options"); - if(!Function["isInstanceOfType"](args[1])) - throw Error.argument("callback"); - options=args[0]; - callback=args[1] - } - else if(argsLength) - throw Error.parameterCount(window["_u"]["ExtensibilityStrings"]["l_ParametersNotAsExpected_Text"]); - if(isCallbackRequired && !callback) - throw Error.argumentNull("callback"); - if(options && !$h.ScriptHelpers.isNullOrUndefined(options["asyncContext"])) - asyncContext=options["asyncContext"]; - return new $h.CommonParameters(options,callback,asyncContext) - }; - $h.CommonParameters._tryParseLegacy$p=function(args, commonParameters) - { - commonParameters["val"]=null; - var argsLength=args["length"]; - var callback=null; - var userContext=null; - if(!argsLength || argsLength > 2) - return false; - if(!Function["isInstanceOfType"](args[0])) - return false; - callback=args[0]; - if(argsLength > 1) - userContext=args[1]; - commonParameters["val"]=new $h.CommonParameters(null,callback,userContext); - return true - }; - $h.CommonParameters.prototype={ - _options$p$0: null, - _callback$p$0: null, - _asyncContext$p$0: null, - get_options: function() - { - return this._options$p$0 - }, - get_callback: function() - { - return this._callback$p$0 - }, - get_asyncContext: function() - { - return this._asyncContext$p$0 - } - }; - $h.EwsRequest=function(userContext) - { - $h.EwsRequest["initializeBase"](this,[userContext]) - }; - $h.EwsRequest.prototype={ - readyState: 1, - status: 0, - statusText: null, - onreadystatechange: null, - responseText: null, - get__statusCode$i$1: function() - { - return this.status - }, - set__statusCode$i$1: function(value) - { - this.status=value; - return value - }, - get__statusDescription$i$1: function() - { - return this.statusText - }, - set__statusDescription$i$1: function(value) - { - this.statusText=value; - return value - }, - get__requestState$i$1: function() - { - return this.readyState - }, - set__requestState$i$1: function(value) - { - this.readyState=value; - return value - }, - get_hasOnReadyStateChangeCallback: function() - { - return!$h.ScriptHelpers.isNullOrUndefined(this.onreadystatechange) - }, - get__response$i$1: function() - { - return this.responseText - }, - set__response$i$1: function(value) - { - this.responseText=value; - return value - }, - send: function(data) - { - this._checkSendConditions$i$1(); - if($h.ScriptHelpers.isNullOrUndefined(data)) - this._throwInvalidStateException$i$1(); - this._sendRequest$i$0(5,"EwsRequest",{body: data}) - }, - _callOnReadyStateChangeCallback$i$1: function() - { - if(!$h.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)) - this.onreadystatechange() - }, - _parseExtraResponseData$i$1: function(response){}, - executeExtraFailedResponseSteps: function(){} - }; - $h.InitialData=function(data) - { - this._data$p$0=data; - this._permissionLevel$p$0=this._calculatePermissionLevel$p$0() - }; - $h.InitialData._defineReadOnlyProperty$i=function(o, methodName, getter) - { - var propertyDescriptor={ - get: getter, - configurable: false - }; - window["Object"]["defineProperty"](o,methodName,propertyDescriptor) - }; - $h.InitialData.prototype={ - _toRecipients$p$0: null, - _ccRecipients$p$0: null, - _attachments$p$0: null, - _resources$p$0: null, - _entities$p$0: null, - _selectedEntities$p$0: null, - _data$p$0: null, - _permissionLevel$p$0: 0, - get__isRestIdSupported$i$0: function() - { - return this._data$p$0["isRestIdSupported"] - }, - get__itemId$i$0: function() - { - return this._data$p$0["id"] - }, - get__itemClass$i$0: function() - { - return this._data$p$0["itemClass"] - }, - get__dateTimeCreated$i$0: function() - { - return new Date(this._data$p$0["dateTimeCreated"]) - }, - get__dateTimeModified$i$0: function() - { - return new Date(this._data$p$0["dateTimeModified"]) - }, - get__dateTimeSent$i$0: function() - { - return new Date(this._data$p$0["dateTimeSent"]) - }, - get__subject$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - return this._data$p$0["subject"] - }, - get__normalizedSubject$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - return this._data$p$0["normalizedSubject"] - }, - get__internetMessageId$i$0: function() - { - return this._data$p$0["internetMessageId"] - }, - get__conversationId$i$0: function() - { - return this._data$p$0["conversationId"] - }, - get__sender$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - var sender=this._data$p$0["sender"]; - return $h.ScriptHelpers.isNullOrUndefined(sender) ? null : new $h.EmailAddressDetails(sender) - }, - get__from$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - var from=this._data$p$0["from"]; - return $h.ScriptHelpers.isNullOrUndefined(from) ? null : new $h.EmailAddressDetails(from) - }, - get__to$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - if(null===this._toRecipients$p$0) - this._toRecipients$p$0=this._createEmailAddressDetails$p$0("to"); - return this._toRecipients$p$0 - }, - get__cc$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - if(null===this._ccRecipients$p$0) - this._ccRecipients$p$0=this._createEmailAddressDetails$p$0("cc"); - return this._ccRecipients$p$0 - }, - get__attachments$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - if(null===this._attachments$p$0) - this._attachments$p$0=this._createAttachmentDetails$p$0(); - return this._attachments$p$0 - }, - get__ewsUrl$i$0: function() - { - return this._data$p$0["ewsUrl"] - }, - get__restUrl$i$0: function() - { - return this._data$p$0["restUrl"] - }, - get__marketplaceAssetId$i$0: function() - { - return this._data$p$0["marketplaceAssetId"] - }, - get__extensionId$i$0: function() - { - return this._data$p$0["extensionId"] - }, - get__marketplaceContentMarket$i$0: function() - { - return this._data$p$0["marketplaceContentMarket"] - }, - get__consentMetadata$i$0: function() - { - return this._data$p$0["consentMetadata"] - }, - get__isRead$i$0: function() - { - return this._data$p$0["isRead"] - }, - get__endNodeUrl$i$0: function() - { - return this._data$p$0["endNodeUrl"] - }, - get__entryPointUrl$i$0: function() - { - return this._data$p$0["entryPointUrl"] - }, - get__start$i$0: function() - { - return new Date(this._data$p$0["start"]) - }, - get__end$i$0: function() - { - return new Date(this._data$p$0["end"]) - }, - get__location$i$0: function() - { - return this._data$p$0["location"] - }, - get__userProfileType$i$0: function() - { - return this._data$p$0["userProfileType"] - }, - get__resources$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - if(null===this._resources$p$0) - this._resources$p$0=this._createEmailAddressDetails$p$0("resources"); - return this._resources$p$0 - }, - get__organizer$i$0: function() - { - this._throwOnRestrictedPermissionLevel$i$0(); - var organizer=this._data$p$0["organizer"]; - return $h.ScriptHelpers.isNullOrUndefined(organizer) ? null : new $h.EmailAddressDetails(organizer) - }, - get__userDisplayName$i$0: function() - { - return this._data$p$0["userDisplayName"] - }, - get__userEmailAddress$i$0: function() - { - return this._data$p$0["userEmailAddress"] - }, - get__userTimeZone$i$0: function() - { - return this._data$p$0["userTimeZone"] - }, - get__timeZoneOffsets$i$0: function() - { - return this._data$p$0["timeZoneOffsets"] - }, - get__hostVersion$i$0: function() - { - return this._data$p$0["hostVersion"] - }, - get__owaView$i$0: function() - { - return this._data$p$0["owaView"] - }, - get__overrideWindowOpen$i$0: function() - { - return this._data$p$0["overrideWindowOpen"] - }, - _getEntities$i$0: function() - { - if(!this._entities$p$0) - this._entities$p$0=new $h.Entities(this._data$p$0["entities"],this._data$p$0["filteredEntities"],this.get__dateTimeSent$i$0(),this._permissionLevel$p$0); - return this._entities$p$0 - }, - _getSelectedEntities$i$0: function() - { - if(!this._selectedEntities$p$0) - this._selectedEntities$p$0=new $h.Entities(this._data$p$0["selectedEntities"],null,this.get__dateTimeSent$i$0(),this._permissionLevel$p$0); - return this._selectedEntities$p$0 - }, - _getEntitiesByType$i$0: function(entityType) - { - var entites=this._getEntities$i$0(); - return entites._getByType$i$0(entityType) - }, - _getFilteredEntitiesByName$i$0: function(name) - { - var entities=this._getEntities$i$0(); - return entities._getFilteredEntitiesByName$i$0(name) - }, - _getRegExMatches$i$0: function() - { - if(!this._data$p$0["regExMatches"]) - return null; - return this._data$p$0["regExMatches"] - }, - _getSelectedRegExMatches$i$0: function() - { - if(!this._data$p$0["selectedRegExMatches"]) - return null; - return this._data$p$0["selectedRegExMatches"] - }, - _getRegExMatchesByName$i$0: function(regexName) - { - var regexMatches=this._getRegExMatches$i$0(); - if(!regexMatches || !regexMatches[regexName]) - return null; - return regexMatches[regexName] - }, - _throwOnRestrictedPermissionLevel$i$0: function() - { - window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0) - }, - _createEmailAddressDetails$p$0: function(key) - { - var to=this._data$p$0[key]; - if($h.ScriptHelpers.isNullOrUndefined(to)) - return[]; - var recipients=[]; - for(var i=0; i < to["length"]; i++) - if(!$h.ScriptHelpers.isNullOrUndefined(to[i])) - recipients[i]=new $h.EmailAddressDetails(to[i]); - return recipients - }, - _createAttachmentDetails$p$0: function() - { - var attachments=this._data$p$0["attachments"]; - if($h.ScriptHelpers.isNullOrUndefined(attachments)) - return[]; - var attachmentDetails=[]; - for(var i=0; i < attachments["length"]; i++) - if(!$h.ScriptHelpers.isNullOrUndefined(attachments[i])) - attachmentDetails[i]=new $h.AttachmentDetails(attachments[i]); - return attachmentDetails - }, - _calculatePermissionLevel$p$0: function() - { - var HostReadItem=1; - var HostReadWriteMailbox=2; - var HostReadWriteItem=3; - var permissionLevelFromHost=this._data$p$0["permissionLevel"]; - if($h.ScriptHelpers.isUndefined(this._permissionLevel$p$0)) - return 0; - switch(permissionLevelFromHost) - { - case HostReadItem: - return 1; - case HostReadWriteItem: - return 2; - case HostReadWriteMailbox: - return 3; - default: - return 0 - } - } - }; - $h._loadDictionaryRequest=function(createResultObject, dictionaryName, callback, userContext) - { - $h._loadDictionaryRequest["initializeBase"](this,[userContext]); - this._createResultObject$p$1=createResultObject; - this._dictionaryName$p$1=dictionaryName; - this._callback$p$1=callback - }; - $h._loadDictionaryRequest.prototype={ - _dictionaryName$p$1: null, - _createResultObject$p$1: null, - _callback$p$1: null, - handleResponse: function(response) - { - if(response["wasSuccessful"]) - { - var value=response[this._dictionaryName$p$1]; - var responseData=window["JSON"]["parse"](value); - this.createAsyncResult(this._createResultObject$p$1(responseData),0,0,null) - } - else - this.createAsyncResult(null,1,9020,response["errorMessage"]); - this._callback$p$1(this._asyncResult$p$0) - } - }; - $h.ProxyRequestBase=function(userContext) - { - $h.ProxyRequestBase["initializeBase"](this,[userContext]) - }; - $h.ProxyRequestBase.prototype={ - handleResponse: function(response) - { - if(!response["wasProxySuccessful"]) - { - this.set__statusCode$i$1(500); - this.set__statusDescription$i$1("Error"); - var errorMessage=response["errorMessage"]; - this.set__response$i$1(errorMessage); - this.createAsyncResult(null,1,9020,errorMessage) - } - else - { - this.set__statusCode$i$1(response["statusCode"]); - this.set__statusDescription$i$1(response["statusDescription"]); - this.set__response$i$1(response["body"]); - this.createAsyncResult(this.get__response$i$1(),0,0,null) - } - this._parseExtraResponseData$i$1(response); - this._cycleReadyStateFromHeadersReceivedToLoadingToDone$i$1() - }, - _throwInvalidStateException$i$1: function() - { - throw Error.create("DOMException",{ - code: 11, - message: "INVALID_STATE_ERR" - }); - }, - _cycleReadyStateFromHeadersReceivedToLoadingToDone$i$1: function() - { - var $$t_0=this; - this._changeReadyState$i$1(2,function() - { - $$t_0._changeReadyState$i$1(3,function() - { - $$t_0._changeReadyState$i$1(4,null) - }) - }) - }, - _changeReadyState$i$1: function(state, nextStep) - { - this.set__requestState$i$1(state); - var $$t_2=this; - window.setTimeout(function() - { - try - { - $$t_2._callOnReadyStateChangeCallback$i$1() - } - finally - { - if(!$h.ScriptHelpers.isNullOrUndefined(nextStep)) - nextStep() - } - },0) - }, - _checkSendConditions$i$1: function() - { - if(this.get__requestState$i$1() !==1) - this._throwInvalidStateException$i$1(); - if(this._isSent$p$0) - this._throwInvalidStateException$i$1() - } - }; - $h.RequestBase=function(userContext) - { - this._userContext$p$0=userContext - }; - $h.RequestBase.prototype={ - _isSent$p$0: false, - _asyncResult$p$0: null, - _userContext$p$0: null, - get_asyncResult: function() - { - return this._asyncResult$p$0 - }, - _sendRequest$i$0: function(dispid, methodName, dataToSend) - { - this._isSent$p$0=true; - var $$t_5=this; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.invokeHostMethod(dispid,dataToSend,function(resultCode, response) - { - if(resultCode) - $$t_5.createAsyncResult(null,1,9017,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode)); - else - $$t_5.handleResponse(response) - }) - }, - createAsyncResult: function(value, errorCode, detailedErrorCode, errorDescription) - { - this._asyncResult$p$0=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(value,errorCode,detailedErrorCode,this._userContext$p$0,errorDescription) - } - }; - $h.SaveDictionaryRequest=function(callback, userContext) - { - $h.SaveDictionaryRequest["initializeBase"](this,[userContext]); - if(!$h.ScriptHelpers.isNullOrUndefined(callback)) - this._callback$p$1=callback - }; - $h.SaveDictionaryRequest.prototype={ - _callback$p$1: null, - handleResponse: function(response) - { - if(response["wasSuccessful"]) - this.createAsyncResult(null,0,0,null); - else - this.createAsyncResult(null,1,9020,response["errorMessage"]); - if(!$h.ScriptHelpers.isNullOrUndefined(this._callback$p$1)) - this._callback$p$1(this._asyncResult$p$0) - } - }; - $h.ScriptHelpers=function(){}; - $h.ScriptHelpers.isNull=function(value) - { - return null===value - }; - $h.ScriptHelpers.isNullOrUndefined=function(value) - { - return $h.ScriptHelpers.isNull(value) || $h.ScriptHelpers.isUndefined(value) - }; - $h.ScriptHelpers.isUndefined=function(value) - { - return value===undefined - }; - $h.ScriptHelpers.dictionaryContainsKey=function(obj, keyName) - { - return Object["isInstanceOfType"](obj) ? keyName in obj : false - }; - $h.ScriptHelpers.isNonEmptyString=function(value) - { - if(!value) - return false; - return String["isInstanceOfType"](value) - }; - $h.ScriptHelpers.deepClone=function(obj) - { - return window["JSON"]["parse"](window["JSON"]["stringify"](obj)) - }; - $h.ScriptHelpers.isValueTrue=function(value) - { - if(!$h.ScriptHelpers.isNullOrUndefined(value)) - return value["toString"]().toLowerCase()==="true"; - return false - }; - window["OSF"]["DDA"]["OutlookAppOm"]["registerClass"]("OSF.DDA.OutlookAppOm"); - window["OSF"]["DDA"]["Settings"]["registerClass"]("OSF.DDA.Settings"); - $h.AdditionalGlobalParameters["registerClass"]("$h.4"); - $h.ItemBase["registerClass"]("$h.5"); - $h.Item["registerClass"]("$h.6",$h.ItemBase); - $h.Appointment["registerClass"]("$h.7",$h.Item); - $h.ComposeItem["registerClass"]("$h.8",$h.ItemBase); - $h.AppointmentCompose["registerClass"]("$h.9",$h.ComposeItem); - $h.AttachmentDetails["registerClass"]("$h.A"); - $h.Body["registerClass"]("$h.B"); - $h.ComposeBody["registerClass"]("$h.C",$h.Body); - $h.ComposeRecipient["registerClass"]("$h.D"); - $h.ComposeLocation["registerClass"]("$h.E"); - $h.ComposeSubject["registerClass"]("$h.F"); - $h.ComposeTime["registerClass"]("$h.G"); - $h.Contact["registerClass"]("$h.H"); - $h.CustomProperties["registerClass"]("$h.I"); - $h.Diagnostics["registerClass"]("$h.J"); - $h.EmailAddressDetails["registerClass"]("$h.K"); - $h.Entities["registerClass"]("$h.L"); - $h.Message["registerClass"]("$h.M",$h.Item); - $h.MeetingRequest["registerClass"]("$h.N",$h.Message); - $h.MeetingSuggestion["registerClass"]("$h.O"); - $h._extractedDate["registerClass"]("$h.P"); - $h._preciseDate["registerClass"]("$h.Q",$h._extractedDate); - $h._relativeDate["registerClass"]("$h.R",$h._extractedDate); - $h.MessageCompose["registerClass"]("$h.S",$h.ComposeItem); - $h.NotificationMessages["registerClass"]("$h.T"); - $h.PhoneNumber["registerClass"]("$h.U"); - $h.TaskSuggestion["registerClass"]("$h.V"); - $h.UserProfile["registerClass"]("$h.W"); - $h.CommonParameters["registerClass"]("$h.X"); - $h.RequestBase["registerClass"]("$h.Y"); - $h.ProxyRequestBase["registerClass"]("$h.Z",$h.RequestBase); - $h.EwsRequest["registerClass"]("$h.a",$h.ProxyRequestBase); - $h.InitialData["registerClass"]("$h.b"); - $h._loadDictionaryRequest["registerClass"]("$h.c",$h.RequestBase); - $h.SaveDictionaryRequest["registerClass"]("$h.d",$h.RequestBase); - window["OSF"]["DDA"]["OutlookAppOm"].asyncMethodTimeoutKeyName="__timeout__"; - window["OSF"]["DDA"]["OutlookAppOm"].ewsIdOrEmailParamName="ewsIdOrEmail"; - window["OSF"]["DDA"]["OutlookAppOm"].moduleParamName="module"; - window["OSF"]["DDA"]["OutlookAppOm"].queryStringParamName="queryString"; - window["OSF"]["DDA"]["OutlookAppOm"]._maxRecipients$p=100; - window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p=255; - window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength=32768; - window["OSF"]["DDA"]["OutlookAppOm"]._maxLocationLength$p=255; - window["OSF"]["DDA"]["OutlookAppOm"]._maxEwsRequestSize$p=1e6; - window["OSF"]["DDA"]["OutlookAppOm"].executeMethodName="ExecuteMethod"; - window["OSF"]["DDA"]["OutlookAppOm"].getInitialDataMethodName="GetInitialData"; - window["OSF"]["DDA"]["OutlookAppOm"].itemIdParameterName="itemId"; - window["OSF"]["DDA"]["OutlookAppOm"].restVersionParameterName="restVersion"; - window["OSF"]["DDA"]["OutlookAppOm"]._instance$p=null; - $h.AdditionalGlobalParameters.itemNumberKey="itemNumber"; - $h.AttachmentConstants.maxAttachmentNameLength=255; - $h.AttachmentConstants.maxUrlLength=2048; - $h.AttachmentConstants.maxItemIdLength=200; - $h.AttachmentConstants.maxRemoveIdLength=200; - $h.AttachmentConstants.attachmentParameterName="attachments"; - $h.AttachmentConstants.attachmentTypeParameterName="type"; - $h.AttachmentConstants.attachmentUrlParameterName="url"; - $h.AttachmentConstants.attachmentItemIdParameterName="itemId"; - $h.AttachmentConstants.attachmentNameParameterName="name"; - $h.AttachmentConstants.attachmentIsInlineParameterName="isInline"; - $h.AttachmentConstants.attachmentTypeFileName="file"; - $h.AttachmentConstants.attachmentTypeItemName="item"; - $h.AttachmentDetails._attachmentTypeMap$p=[window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["File"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["Item"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["Cloud"]]; - $h.Body.coercionTypeParameterName="coercionType"; - $h.ComposeRecipient.displayNameLengthLimit=255; - $h.ComposeRecipient.maxSmtpLength=571; - $h.ComposeRecipient.recipientsLimit=100; - $h.ComposeRecipient.totalRecipientsLimit=500; - $h.ComposeRecipient.addressParameterName="address"; - $h.ComposeRecipient.nameParameterName="name"; - $h.ComposeLocation.locationKey="location"; - $h.ComposeLocation.maximumLocationLength=255; - $h.ComposeSubject.maximumSubjectLength=255; - $h.ComposeTime.timeTypeName="TimeProperty"; - $h.ComposeTime.timeDataName="time"; - $h.Diagnostics.outlookAppName="Outlook"; - $h.Diagnostics.outlookWebAppName="OutlookWebApp"; - $h.Diagnostics.outlookIOSAppName="OutlookIOS"; - $h.Diagnostics.outlookAndroidAppName="OutlookAndroid"; - $h.EmailAddressDetails._emptyString$p=""; - $h.EmailAddressDetails._responseTypeMap$p=[window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["None"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Organizer"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Tentative"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Accepted"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Declined"]]; - $h.EmailAddressDetails._recipientTypeMap$p=[window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["Other"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["DistributionList"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["User"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["ExternalUser"]]; - $h.Entities._allEntityKeys$p=["Addresses","EmailAddresses","Urls","PhoneNumbers","TaskSuggestions","MeetingSuggestions","Contacts","FlightReservations","ParcelDeliveries"]; - $h.ReplyConstants.htmlBodyKeyName="htmlBody"; - $h.AsyncConstants.optionsKeyName="options"; - $h.AsyncConstants.callbackKeyName="callback"; - $h.AsyncConstants.asyncResultKeyName="asyncResult"; - $h.MeetingSuggestionTimeDecoder._baseDate$p=new Date("0001-01-01T00:00:00Z"); - $h.NotificationMessages.maximumKeyLength=32; - $h.NotificationMessages.maximumIconLength=32; - $h.NotificationMessages.maximumMessageLength=150; - $h.NotificationMessages.notificationsKeyParameterName="key"; - $h.NotificationMessages.notificationsTypeParameterName="type"; - $h.NotificationMessages.notificationsIconParameterName="icon"; - $h.NotificationMessages.notificationsMessageParameterName="message"; - $h.NotificationMessages.notificationsPersistentParameterName="persistent"; - $h.OutlookErrorManager.errorNameKey="name"; - $h.OutlookErrorManager.errorMessageKey="message"; - $h.OutlookErrorManager._isInitialized$p=false; - $h.OutlookErrorManager.OutlookErrorCodes.attachmentSizeExceeded=9e3; - $h.OutlookErrorManager.OutlookErrorCodes.numberOfAttachmentsExceeded=9001; - $h.OutlookErrorManager.OutlookErrorCodes.internalFormatError=9002; - $h.OutlookErrorManager.OutlookErrorCodes.invalidAttachmentId=9003; - $h.OutlookErrorManager.OutlookErrorCodes.invalidAttachmentPath=9004; - $h.OutlookErrorManager.OutlookErrorCodes.cannotAddAttachmentBeforeUpgrade=9005; - $h.OutlookErrorManager.OutlookErrorCodes.attachmentDeletedBeforeUploadCompletes=9006; - $h.OutlookErrorManager.OutlookErrorCodes.attachmentUploadGeneralFailure=9007; - $h.OutlookErrorManager.OutlookErrorCodes.attachmentToDeleteDoesNotExist=9008; - $h.OutlookErrorManager.OutlookErrorCodes.attachmentDeleteGeneralFailure=9009; - $h.OutlookErrorManager.OutlookErrorCodes.invalidEndTime=9010; - $h.OutlookErrorManager.OutlookErrorCodes.htmlSanitizationFailure=9011; - $h.OutlookErrorManager.OutlookErrorCodes.numberOfRecipientsExceeded=9012; - $h.OutlookErrorManager.OutlookErrorCodes.noValidRecipientsProvided=9013; - $h.OutlookErrorManager.OutlookErrorCodes.cursorPositionChanged=9014; - $h.OutlookErrorManager.OutlookErrorCodes.invalidSelection=9016; - $h.OutlookErrorManager.OutlookErrorCodes.accessRestricted=9017; - $h.OutlookErrorManager.OutlookErrorCodes.genericTokenError=9018; - $h.OutlookErrorManager.OutlookErrorCodes.genericSettingsError=9019; - $h.OutlookErrorManager.OutlookErrorCodes.genericResponseError=9020; - $h.OutlookErrorManager.OutlookErrorCodes.saveError=9021; - $h.OutlookErrorManager.OutlookErrorCodes.messageInDifferentStoreError=9022; - $h.OutlookErrorManager.OutlookErrorCodes.duplicateNotificationKey=9023; - $h.OutlookErrorManager.OutlookErrorCodes.notificationKeyNotFound=9024; - $h.OutlookErrorManager.OutlookErrorCodes.numberOfNotificationsExceeded=9025; - $h.OutlookErrorManager.OutlookErrorCodes.persistedNotificationArrayReadError=9026; - $h.OutlookErrorManager.OutlookErrorCodes.persistedNotificationArraySaveError=9027; - $h.OutlookErrorManager.OutlookErrorCodes.cannotPersistPropertyInUnsavedDraftError=9028; - $h.OutlookErrorManager.OutlookErrorCodes.callSaveAsyncBeforeToken=9029; - $h.OutlookErrorManager.OutlookErrorCodes.ooeInvalidDataFormat=2006; - $h.OutlookErrorManager.OsfDdaErrorCodes.ooeCoercionTypeNotSupported=1e3; - $h.CommonParameters.asyncContextKeyName="asyncContext"; - $h.InitialData.userProfileTypeKey="userProfileType"; - $h.ScriptHelpers.emptyString=""; - OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM); - if(appContext.get_appName()==OSF.AppName.OutlookWebApp || appContext.get_appName()==OSF.AppName.OutlookIOS || appContext.get_appName()==OSF.AppName.OutlookAndroid) - this._settings=this._initializeSettings(appContext,false); - else - this._settings=this._initializeSettings(false); - appContext.appOM=new OSF.DDA.OutlookAppOm(appContext,this._webAppState.wnd,appReady); - if(appContext.get_appName()==OSF.AppName.Outlook || appContext.get_appName()==OSF.AppName.OutlookWebApp) - OSF.DDA.DispIdHost.addEventSupport(appContext.appOM,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.ItemChanged])) + Type.registerNamespace("Microsoft.Office.WebExtension.MailboxEnums"); + Microsoft.Office.WebExtension.MailboxEnums.EntityType = { + MeetingSuggestion: "meetingSuggestion", + TaskSuggestion: "taskSuggestion", + Address: "address", + EmailAddress: "emailAddress", + Url: "url", + PhoneNumber: "phoneNumber", + Contact: "contact", + FlightReservations: "flightReservations", + ParcelDeliveries: "parcelDeliveries" + }; + Microsoft.Office.WebExtension.MailboxEnums.ItemType = { + Message: "message", + Appointment: "appointment" + }; + Microsoft.Office.WebExtension.MailboxEnums.ResponseType = { + None: "none", + Organizer: "organizer", + Tentative: "tentative", + Accepted: "accepted", + Declined: "declined" + }; + Microsoft.Office.WebExtension.MailboxEnums.RecipientType = { + Other: "other", + DistributionList: "distributionList", + User: "user", + ExternalUser: "externalUser" + }; + Microsoft.Office.WebExtension.MailboxEnums.AttachmentType = { + File: "file", + Item: "item", + Cloud: "cloud" + }; + Microsoft.Office.WebExtension.MailboxEnums.BodyType = { + Text: "text", + Html: "html" + }; + Microsoft.Office.WebExtension.MailboxEnums.ItemNotificationMessageType = { + ProgressIndicator: "progressIndicator", + InformationalMessage: "informationalMessage", + ErrorMessage: "errorMessage", + InsightMessage: "insightMessage" + }; + Microsoft.Office.WebExtension.MailboxEnums.Folder = { + Inbox: "inbox", + Junk: "junk", + DeletedItems: "deletedItems" + }; + Microsoft.Office.WebExtension.CoercionType = { + Text: "text", + Html: "html" + }; + Microsoft.Office.WebExtension.MailboxEnums.UserProfileType = { + Office365: "office365", + OutlookCom: "outlookCom", + Enterprise: "enterprise" + }; + Microsoft.Office.WebExtension.MailboxEnums.RestVersion = { + v1_0: "v1.0", + v2_0: "v2.0", + Beta: "beta" + }; + Microsoft.Office.WebExtension.MailboxEnums.ModuleType = {Addins: "addins"}; + Microsoft.Office.WebExtension.MailboxEnums.ActionType = {ShowTaskPane: "showTaskPane"}; + Type.registerNamespace("OSF.DDA"); + var OSF = window["OSF"] || {}; + OSF.DDA = OSF.DDA || {}; + window["OSF"]["DDA"]["OutlookAppOm"] = OSF.DDA.OutlookAppOm = function(officeAppContext, targetWindow, appReadyCallback) + { + this.$$d_navigateToModuleAsync = Function.createDelegate(this,this.navigateToModuleAsync); + this.$$d_displayPersonaCardAsync = Function.createDelegate(this,this.displayPersonaCardAsync); + this.$$d_displayNewMessageFormApi = Function.createDelegate(this,this.displayNewMessageFormApi); + this.$$d__displayNewAppointmentFormApi$p$0 = Function.createDelegate(this,this._displayNewAppointmentFormApi$p$0); + this.$$d_windowOpenOverrideHandler = Function.createDelegate(this,this.windowOpenOverrideHandler); + this.$$d__getRestUrl$p$0 = Function.createDelegate(this,this._getRestUrl$p$0); + this.$$d__getEwsUrl$p$0 = Function.createDelegate(this,this._getEwsUrl$p$0); + this.$$d__getDiagnostics$p$0 = Function.createDelegate(this,this._getDiagnostics$p$0); + this.$$d__getUserProfile$p$0 = Function.createDelegate(this,this._getUserProfile$p$0); + this.$$d_getItem = Function.createDelegate(this,this.getItem); + this.$$d__callAppReadyCallback$p$0 = Function.createDelegate(this,this._callAppReadyCallback$p$0); + this.$$d__getInitialDataResponseHandler$p$0 = Function.createDelegate(this,this._getInitialDataResponseHandler$p$0); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p = this; + this._officeAppContext$p$0 = officeAppContext; + this._appReadyCallback$p$0 = appReadyCallback; + var $$t_4 = this; + var stringLoadedCallback = function() + { + if(appReadyCallback) + if(!$$t_4._officeAppContext$p$0["get_isDialog"]()) + $$t_4.invokeHostMethod(1,null,$$t_4.$$d__getInitialDataResponseHandler$p$0); + else + window.setTimeout($$t_4.$$d__callAppReadyCallback$p$0,0) + }; + if(this._areStringsLoaded$p$0()) + stringLoadedCallback(); + else + this._loadLocalizedScript$p$0(stringLoadedCallback) + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i = function(currentPermissionLevel) + { + if(!currentPermissionLevel) + throw Error.create(window["_u"]["ExtensibilityStrings"]["l_ElevatedPermissionNeeded_Text"]); + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i = function(value, minValue, maxValue, argumentName) + { + if(value < minValue || value > maxValue) + throw Error.argumentOutOfRange(argumentName); + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidModule$p = function(module) + { + if($h.ScriptHelpers.isNullOrUndefined(module)) + throw Error.argumentNull("module"); + else if(module === "") + throw Error.argument("module","module cannot be empty."); + if(module !== window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ModuleType"]["Addins"]) + throw Error.notImplemented(String.format("API not supported for module '{0}'",module)); + }; + window["OSF"]["DDA"]["OutlookAppOm"]._getHtmlBody$p = function(data) + { + var htmlBody = ""; + if("htmlBody" in data) + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidHtmlBody$p(data["htmlBody"]); + htmlBody = data["htmlBody"] + } + return htmlBody + }; + window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p = function(data) + { + var attachments = []; + if("attachments" in data) + { + attachments = data["attachments"]; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentsArray$p(attachments) + } + return attachments + }; + window["OSF"]["DDA"]["OutlookAppOm"]._getOptionsAndCallback$p = function(data) + { + var args = []; + if("options" in data) + args[0] = data["options"]; + if("callback" in data) + args[args["length"]] = data["callback"]; + return args + }; + window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p = function(attachments) + { + var attachmentsData = new Array(0); + if(Array["isInstanceOfType"](attachments)) + for(var i = 0; i < attachments["length"]; i++) + if(Object["isInstanceOfType"](attachments[i])) + { + var attachment = attachments[i]; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachment$p(attachment); + attachmentsData[i] = window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentData$p(attachment) + } + else + throw Error.argument("attachments"); + return attachmentsData + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidHtmlBody$p = function(htmlBody) + { + if(!String["isInstanceOfType"](htmlBody)) + throw Error.argument("htmlBody"); + if($h.ScriptHelpers.isNullOrUndefined(htmlBody)) + throw Error.argument("htmlBody"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(htmlBody.length,0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody") + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentsArray$p = function(attachments) + { + if(!Array["isInstanceOfType"](attachments)) + throw Error.argument("attachments"); + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachment$p = function(attachment) + { + if(!Object["isInstanceOfType"](attachment)) + throw Error.argument("attachments"); + if(!("type" in attachment) || !("name" in attachment)) + throw Error.argument("attachments"); + if(!("url" in attachment || "itemId" in attachment)) + throw Error.argument("attachments"); + }; + window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentData$p = function(attachment) + { + var attachmentData = null; + if(attachment["type"] === "file") + { + var url = attachment["url"]; + var name = attachment["name"]; + var isInline = $h.ScriptHelpers.isValueTrue(attachment["isInline"]); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentUrlOrName$p(url,name); + attachmentData = window["OSF"]["DDA"]["OutlookAppOm"]._createFileAttachmentData$p(url,name,isInline) + } + else if(attachment["type"] === "item") + { + var itemId = window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(attachment["itemId"]); + var name = attachment["name"]; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentItemIdOrName$p(itemId,name); + attachmentData = window["OSF"]["DDA"]["OutlookAppOm"]._createItemAttachmentData$p(itemId,name) + } + else + throw Error.argument("attachments"); + return attachmentData + }; + window["OSF"]["DDA"]["OutlookAppOm"]._createFileAttachmentData$p = function(url, name, isInline) + { + return["file",name,url,isInline] + }; + window["OSF"]["DDA"]["OutlookAppOm"]._createItemAttachmentData$p = function(itemId, name) + { + return["item",name,itemId] + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentUrlOrName$p = function(url, name) + { + if(!String["isInstanceOfType"](url) || !String["isInstanceOfType"](name)) + throw Error.argument("attachments"); + if(url.length > 2048) + throw Error.argumentOutOfRange("attachments",url.length,window["_u"]["ExtensibilityStrings"]["l_AttachmentUrlTooLong_Text"]); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p(name) + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentItemIdOrName$p = function(itemId, name) + { + if(!String["isInstanceOfType"](itemId) || !String["isInstanceOfType"](name)) + throw Error.argument("attachments"); + if(itemId.length > 200) + throw Error.argumentOutOfRange("attachments",itemId.length,window["_u"]["ExtensibilityStrings"]["l_AttachmentItemIdTooLong_Text"]); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p(name) + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p = function(name) + { + if(name.length > 255) + throw Error.argumentOutOfRange("attachments",name.length,window["_u"]["ExtensibilityStrings"]["l_AttachmentNameTooLong_Text"]); + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p = function(restVersion) + { + if(!restVersion) + throw Error.argumentNull("restVersion"); + if(restVersion !== window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"] && restVersion !== window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v2_0"] && restVersion !== window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["Beta"]) + throw Error.argument("restVersion"); + }; + window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost = function(itemId) + { + if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._initialData$p$0 && window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._initialData$p$0.get__isRestIdSupported$i$0()) + return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToRestId"](itemId,window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"]); + return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToEwsId"](itemId,window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"]) + }; + window["OSF"]["DDA"]["OutlookAppOm"]["addAdditionalArgs"] = function(dispid, data) + { + return data + }; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p = function(value, expectedType, argumentName) + { + if(Object["getType"](value) !== expectedType) + throw Error.argumentType(argumentName); + }; + window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p = function(value, minLength, maxLength, name) + { + if($h.ScriptHelpers.isNullOrUndefined(value)) + return; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(value,String,name); + var stringValue = value; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(stringValue.length,minLength,maxLength,name) + }; + window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p = function(array) + { + return array ? array["join"](";") : null + }; + window["OSF"]["DDA"]["OutlookAppOm"]._convertComposeEmailDictionaryParameterForSetApi$p = function(recipients) + { + if(!recipients) + return null; + var results = new Array(recipients["length"]); + for(var i = 0; i < recipients["length"]; i++) + results[i] = [recipients[i]["address"],recipients[i]["name"]]; + return results + }; + window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p = function(emailset, name) + { + if($h.ScriptHelpers.isNullOrUndefined(emailset)) + return null; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(emailset,Array,name); + var originalAttendees = emailset; + var updatedAttendees = null; + var normalizationNeeded = false; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(originalAttendees["length"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxRecipients$p,String.format("{0}.length",name)); + for(var i = 0; i < originalAttendees["length"]; i++) + if($h.EmailAddressDetails["isInstanceOfType"](originalAttendees[i])) + { + normalizationNeeded = true; + break + } + if(normalizationNeeded) + updatedAttendees = []; + for(var i = 0; i < originalAttendees["length"]; i++) + if(normalizationNeeded) + { + updatedAttendees[i] = $h.EmailAddressDetails["isInstanceOfType"](originalAttendees[i]) ? originalAttendees[i]["emailAddress"] : originalAttendees[i]; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(updatedAttendees[i],String,String.format("{0}[{1}]",name,i)) + } + else + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(originalAttendees[i],String,String.format("{0}[{1}]",name,i)); + return updatedAttendees + }; + OSF.DDA.OutlookAppOm.prototype = { + _initialData$p$0: null, + _item$p$0: null, + _userProfile$p$0: null, + _diagnostics$p$0: null, + _officeAppContext$p$0: null, + _appReadyCallback$p$0: null, + _clientEndPoint$p$0: null, + _hostItemType$p$0: 0, + _additionalOutlookParams$p$0: null, + get_clientEndPoint: function() + { + if(!this._clientEndPoint$p$0) + this._clientEndPoint$p$0 = OSF._OfficeAppFactory["getClientEndPoint"](); + return this._clientEndPoint$p$0 + }, + set_clientEndPoint: function(value) + { + this._clientEndPoint$p$0 = value; + return value + }, + get_initialData: function() + { + return this._initialData$p$0 + }, + get__appName$i$0: function() + { + return this._officeAppContext$p$0["get_appName"]() + }, + get_additionalOutlookParams: function() + { + return this._additionalOutlookParams$p$0 + }, + addEventSupport: function() + { + if(this._item$p$0) + OSF.DDA.DispIdHost["addEventSupport"](this._item$p$0,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType["RecipientsChanged"],Microsoft.Office.WebExtension.EventType["AppointmentTimeChanged"]])) + }, + windowOpenOverrideHandler: function(url, targetName, features, replace) + { + this.invokeHostMethod(403,{launchUrl: url},null) + }, + createAsyncResult: function(value, errorCode, detailedErrorCode, userContext, errorMessage) + { + var initArgs = {}; + var errorArgs = null; + initArgs[OSF.DDA.AsyncResultEnum.Properties["Value"]] = value; + initArgs[OSF.DDA.AsyncResultEnum.Properties["Context"]] = userContext; + if(0 !== errorCode) + { + errorArgs = {}; + var errorProperties = $h.OutlookErrorManager.getErrorArgs(detailedErrorCode); + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties["Name"]] = errorProperties["name"]; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties["Message"]] = !errorMessage ? errorProperties["message"] : errorMessage; + errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties["Code"]] = detailedErrorCode + } + return new OSF.DDA.AsyncResult(initArgs,errorArgs) + }, + _throwOnMethodCallForInsufficientPermission$i$0: function(requiredPermissionLevel, methodName) + { + if(this._initialData$p$0._permissionLevel$p$0 < requiredPermissionLevel) + throw Error.create(String.format(window["_u"]["ExtensibilityStrings"]["l_ElevatedPermissionNeededForMethod_Text"],methodName)); + }, + _displayReplyForm$i$0: function(obj) + { + this._displayReplyFormHelper$p$0(obj,false) + }, + _displayReplyAllForm$i$0: function(obj) + { + this._displayReplyFormHelper$p$0(obj,true) + }, + setActionsDefinition: function(actionsDefinition) + { + this._additionalOutlookParams$p$0.setActionsDefinition(actionsDefinition) + }, + get_itemNumber: function() + { + return this._additionalOutlookParams$p$0._itemNumber$p$0 + }, + get_actionsDefinition: function() + { + return this._additionalOutlookParams$p$0._actionsDefinition$p$0 + }, + _displayReplyFormHelper$p$0: function(obj, isReplyAll) + { + if(String["isInstanceOfType"](obj)) + this._doDisplayReplyForm$p$0(obj,isReplyAll); + else if(Object["isInstanceOfType"](obj) && Object.getTypeName(obj) === "Object") + this._doDisplayReplyFormWithAttachments$p$0(obj,isReplyAll); + else + throw Error.argumentType(); + }, + _doDisplayReplyForm$p$0: function(htmlBody, isReplyAll) + { + if(!$h.ScriptHelpers.isNullOrUndefined(htmlBody)) + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(htmlBody.length,0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody"); + this.invokeHostMethod(isReplyAll ? 11 : 10,{htmlBody: htmlBody},null) + }, + _doDisplayReplyFormWithAttachments$p$0: function(data, isReplyAll) + { + var htmlBody = window["OSF"]["DDA"]["OutlookAppOm"]._getHtmlBody$p(data); + var attachments = window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p(data); + var parameters = $h.CommonParameters.parse(window["OSF"]["DDA"]["OutlookAppOm"]._getOptionsAndCallback$p(data),false); + var $$t_6 = this; + this._standardInvokeHostMethod$i$0(isReplyAll ? 31 : 30,{ + htmlBody: htmlBody, + attachments: window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p(attachments) + },function(rawInput) + { + return rawInput + },parameters._asyncContext$p$0,parameters._callback$p$0) + }, + _standardInvokeHostMethod$i$0: function(dispid, data, format, userContext, callback) + { + var $$t_B = this; + this.invokeHostMethod(dispid,data,function(resultCode, response) + { + if(callback) + { + var asyncResult = null; + if(Object["isInstanceOfType"](response)) + { + var responseDictionary = response; + if("error" in responseDictionary || "data" in responseDictionary || "errorCode" in responseDictionary) + if(!responseDictionary["error"]) + { + var formattedData = format ? format(responseDictionary["data"]) : responseDictionary["data"]; + asyncResult = $$t_B.createAsyncResult(formattedData,0,0,userContext,null) + } + else + { + var errorCode = responseDictionary["errorCode"]; + asyncResult = $$t_B.createAsyncResult(null,1,errorCode,userContext,null) + } + } + if(!asyncResult && resultCode) + asyncResult = $$t_B.createAsyncResult(null,1,9002,userContext,null); + callback(asyncResult) + } + }) + }, + getItemNumberFromOutlookResponse: function(responseData) + { + var itemNumber = 0; + if(responseData["length"] > 2) + { + var extraParameters = window["JSON"]["parse"](responseData[2]); + if(Object["isInstanceOfType"](extraParameters)) + { + var extraParametersDictionary = extraParameters; + itemNumber = extraParametersDictionary["itemNumber"] + } + } + return itemNumber + }, + createDeserializedData: function(responseData, itemChanged) + { + var deserializedData = null; + var returnValues = window["JSON"]["parse"](responseData[0]); + if(Object["isInstanceOfType"](returnValues)) + deserializedData = this._createDeserializedDataWithDictionary$p$0(responseData,itemChanged); + else if(Number["isInstanceOfType"](returnValues)) + deserializedData = this._createDeserializedDataWithInt$p$0(responseData,itemChanged); + else + throw Error.notImplemented("Return data type from host must be Dictionary or int"); + return deserializedData + }, + _createDeserializedDataWithDictionary$p$0: function(responseData, itemChanged) + { + var deserializedData = window["JSON"]["parse"](responseData[0]); + if(itemChanged) + { + deserializedData["error"] = true; + deserializedData["errorCode"] = 9030 + } + else if(responseData["length"] > 1 && responseData[1]) + { + deserializedData["error"] = true; + deserializedData["errorCode"] = responseData[1] + } + else + deserializedData["error"] = false; + return deserializedData + }, + _createDeserializedDataWithInt$p$0: function(responseData, itemChanged) + { + var deserializedData = {}; + deserializedData["error"] = true; + deserializedData["errorCode"] = responseData[0]; + return deserializedData + }, + invokeHostMethod: function(dispid, data, responseCallback) + { + var startTime = (new Date)["getTime"](); + var $$t_A = this; + var invokeResponseCallback = function(resultCode, resultData) + { + if(window["OSF"]["AppTelemetry"]) + { + var deserializedData = resultData; + var detailedErrorCode = -1; + if(deserializedData && deserializedData["errorCode"]) + detailedErrorCode = deserializedData["errorCode"]; + window["OSF"]["AppTelemetry"]["onMethodDone"](dispid,null,Math["abs"]((new Date)["getTime"]() - startTime),detailedErrorCode) + } + if(responseCallback) + responseCallback(resultCode,resultData) + }; + if(64 === this._officeAppContext$p$0["get_appName"]()) + { + var args = {ApiParams: data}; + args["MethodData"] = { + ControlId: OSF._OfficeAppFactory["getId"](), + DispatchId: dispid + }; + args = window["OSF"]["DDA"]["OutlookAppOm"]["addAdditionalArgs"](dispid,args); + if(dispid === 1) + this.get_clientEndPoint()["invoke"]("GetInitialData",invokeResponseCallback,args); + else + this.get_clientEndPoint()["invoke"]("ExecuteMethod",invokeResponseCallback,args) + } + else if(!this._isOwaOnlyMethod$p$0(dispid)) + this.callOutlookDispatcher(dispid,data,responseCallback,startTime); + else if(responseCallback) + responseCallback(-2,null) + }, + callOutlookDispatcher: function(dispid, data, responseCallback, startTime) + { + var executeParameters = this.convertToOutlookParameters(dispid,data); + var $$t_D = this; + OSF.ClientHostController["execute"](dispid,executeParameters,function(nativeData, resultCode) + { + var detailedErrorCode = -1; + var deserializedData = null; + var responseData = nativeData.toArray(); + if(responseData["length"] > 0) + { + var itemNumberFromOutlookResponse = $$t_D.getItemNumberFromOutlookResponse(responseData); + var isValidItemNumber = itemNumberFromOutlookResponse > 0; + var itemChanged = isValidItemNumber && itemNumberFromOutlookResponse > $$t_D._additionalOutlookParams$p$0._itemNumber$p$0; + deserializedData = $$t_D.createDeserializedData(responseData,itemChanged); + if(deserializedData && deserializedData["errorCode"]) + detailedErrorCode = deserializedData["errorCode"] + } + else if(responseCallback) + throw Error.argumentNull("responseData","Unexpected null/empty data from host."); + if(window["OSF"]["AppTelemetry"]) + window["OSF"]["AppTelemetry"]["onMethodDone"](dispid,null,Math["abs"]((new Date)["getTime"]() - startTime),detailedErrorCode); + if(responseCallback) + responseCallback(resultCode,deserializedData) + }) + }, + _dictionaryToDate$i$0: function(input) + { + var retValue = new Date(input["year"],input["month"],input["date"],input["hours"],input["minutes"],input["seconds"],!input["milliseconds"] ? 0 : input["milliseconds"]); + if(window["isNaN"](retValue["getTime"]())) + throw Error.format(window["_u"]["ExtensibilityStrings"]["l_InvalidDate_Text"]); + return retValue + }, + _dateToDictionary$i$0: function(input) + { + var retValue = {}; + retValue["month"] = input["getMonth"](); + retValue["date"] = input["getDate"](); + retValue["year"] = input["getFullYear"](); + retValue["hours"] = input["getHours"](); + retValue["minutes"] = input["getMinutes"](); + retValue["seconds"] = input["getSeconds"](); + retValue["milliseconds"] = input["getMilliseconds"](); + return retValue + }, + _isOwaOnlyMethod$p$0: function(dispId) + { + switch(dispId) + { + case 402: + case 401: + case 400: + case 403: + return true; + default: + return false + } + }, + isOutlook16OrGreater: function() + { + var hostVersion = this._initialData$p$0.get__hostVersion$i$0(); + var endIndex = 0; + var majorVersionNumber = 0; + if(hostVersion) + { + endIndex = hostVersion.indexOf("."); + majorVersionNumber = window["parseInt"](hostVersion.substring(0,endIndex)) + } + return majorVersionNumber >= 16 + }, + isApiVersionSupported: function(requirementSet) + { + var apiSupported = false; + try + { + var requirementDict = window["JSON"]["parse"](this._officeAppContext$p$0["get_requirementMatrix"]()); + var hostApiVersion = requirementDict["Mailbox"]; + var hostApiVersionParts = hostApiVersion.split("."); + var requirementSetParts = requirementSet.split("."); + if(window["parseInt"](hostApiVersionParts[0]) > window["parseInt"](requirementSetParts[0]) || window["parseInt"](hostApiVersionParts[0]) === window["parseInt"](requirementSetParts[0]) && window["parseInt"](hostApiVersionParts[1]) >= window["parseInt"](requirementSetParts[1])) + apiSupported = true + } + catch($$e_6){} + return apiSupported + }, + convertToOutlookParameters: function(dispid, data) + { + var executeParameters = null; + var optionalParameters = {}; + switch(dispid) + { + case 1: + case 2: + case 3: + case 14: + case 18: + case 26: + case 32: + case 41: + case 34: + case 99: + break; + case 12: + optionalParameters["isRest"] = data["isRest"]; + break; + case 4: + var jsonProperty = window["JSON"]["stringify"](data["customProperties"]); + executeParameters = [jsonProperty]; + break; + case 5: + executeParameters = [data["body"]]; + break; + case 8: + case 9: + executeParameters = [data["itemId"]]; + break; + case 7: + executeParameters = [window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["requiredAttendees"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["optionalAttendees"]),data["start"],data["end"],data["location"],window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["resources"]),data["subject"],data["body"]]; + break; + case 44: + executeParameters = [window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["toRecipients"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["ccRecipients"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["bccRecipients"]),data["subject"],data["htmlBody"],data["attachments"]]; + break; + case 43: + executeParameters = [data["ewsIdOrEmail"]]; + break; + case 45: + executeParameters = [data["module"],data["queryString"]]; + break; + case 40: + executeParameters = [data["extensionId"],data["consentState"]]; + break; + case 11: + case 10: + executeParameters = [data["htmlBody"]]; + break; + case 31: + case 30: + executeParameters = [data["htmlBody"],data["attachments"]]; + break; + case 100: + optionalParameters = data; + break; + case 23: + case 13: + case 38: + case 29: + executeParameters = [data["data"],data["coercionType"]]; + break; + case 37: + case 28: + executeParameters = [data["coercionType"]]; + break; + case 17: + executeParameters = [data["subject"]]; + break; + case 15: + executeParameters = [data["recipientField"]]; + break; + case 22: + case 21: + executeParameters = [data["recipientField"],window["OSF"]["DDA"]["OutlookAppOm"]._convertComposeEmailDictionaryParameterForSetApi$p(data["recipientArray"])]; + break; + case 19: + executeParameters = [data["itemId"],data["name"]]; + break; + case 16: + executeParameters = [data["uri"],data["name"],data["isInline"]]; + break; + case 20: + executeParameters = [data["attachmentIndex"]]; + break; + case 25: + executeParameters = [data["TimeProperty"],data["time"]]; + break; + case 24: + executeParameters = [data["TimeProperty"]]; + break; + case 27: + executeParameters = [data["location"]]; + break; + case 33: + case 35: + executeParameters = [data["key"],data["type"],data["persistent"],data["message"],data["icon"]]; + this._additionalOutlookParams$p$0.setActionsDefinition(data["actions"]); + break; + case 36: + executeParameters = [data["key"]]; + break; + case 101: + optionalParameters = data; + break; + default: + Sys.Debug.fail("Unexpected method dispid"); + break + } + if(dispid !== 1) + { + var $$t_5; + this._additionalOutlookParams$p$0.updateOutlookExecuteParameters($$t_5 = {val: executeParameters},optionalParameters),executeParameters = $$t_5["val"] + } + return executeParameters + }, + _displayNewAppointmentFormApi$p$0: function(parameters) + { + var normalizedRequiredAttendees = window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["requiredAttendees"],"requiredAttendees"); + var normalizedOptionalAttendees = window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["optionalAttendees"],"optionalAttendees"); + window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["location"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxLocationLength$p,"location"); + window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["body"],0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"body"); + window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["subject"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p,"subject"); + if(!$h.ScriptHelpers.isNullOrUndefined(parameters["start"])) + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(parameters["start"],Date,"start"); + var startDateTime = parameters["start"]; + parameters["start"] = startDateTime["getTime"](); + if(!$h.ScriptHelpers.isNullOrUndefined(parameters["end"])) + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(parameters["end"],Date,"end"); + var endDateTime = parameters["end"]; + if(endDateTime < startDateTime) + throw Error.argumentOutOfRange("end",endDateTime,window["_u"]["ExtensibilityStrings"]["l_InvalidEventDates_Text"]); + parameters["end"] = endDateTime["getTime"]() + } + } + var updatedParameters = null; + if(normalizedRequiredAttendees || normalizedOptionalAttendees) + { + updatedParameters = {}; + var $$dict_7 = parameters; + for(var $$key_8 in $$dict_7) + { + var entry = { + key: $$key_8, + value: $$dict_7[$$key_8] + }; + updatedParameters[entry["key"]] = entry["value"] + } + if(normalizedRequiredAttendees) + updatedParameters["requiredAttendees"] = normalizedRequiredAttendees; + if(normalizedOptionalAttendees) + updatedParameters["optionalAttendees"] = normalizedOptionalAttendees + } + this.invokeHostMethod(7,updatedParameters || parameters,null) + }, + displayNewMessageFormApi: function(parameters) + { + var updatedParameters = {}; + if(parameters) + { + var normalizedToRecipients = window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["toRecipients"],"toRecipients"); + var normalizedCcRecipients = window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["ccRecipients"],"ccRecipients"); + var normalizedBccRecipients = window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["bccRecipients"],"bccRecipients"); + window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["htmlBody"],0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody"); + window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["subject"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p,"subject"); + var attachments = window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p(parameters); + var $$dict_7 = parameters; + for(var $$key_8 in $$dict_7) + { + var entry = { + key: $$key_8, + value: $$dict_7[$$key_8] + }; + updatedParameters[entry["key"]] = entry["value"] + } + if(normalizedToRecipients) + updatedParameters["toRecipients"] = normalizedToRecipients; + if(normalizedCcRecipients) + updatedParameters["ccRecipients"] = normalizedCcRecipients; + if(normalizedBccRecipients) + updatedParameters["bccRecipients"] = normalizedBccRecipients; + if(attachments) + updatedParameters["attachments"] = window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p(attachments) + } + this.invokeHostMethod(44,updatedParameters || parameters,null) + }, + displayPersonaCardAsync: function(ewsIdOrEmail) + { + var args = []; + for(var $$pai_3 = 1; $$pai_3 < arguments["length"]; ++$$pai_3) + args[$$pai_3 - 1] = arguments[$$pai_3]; + if($h.ScriptHelpers.isNullOrUndefined(ewsIdOrEmail)) + throw Error.argumentNull("ewsIdOrEmail"); + else if(ewsIdOrEmail === "") + throw Error.argument("ewsIdOrEmail","ewsIdOrEmail cannot be empty."); + var parameters = $h.CommonParameters.parse(args,false); + this._standardInvokeHostMethod$i$0(43,{ewsIdOrEmail: ewsIdOrEmail.trim()},null,parameters._asyncContext$p$0,parameters._callback$p$0) + }, + navigateToModuleAsync: function(module) + { + var args = []; + for(var $$pai_5 = 1; $$pai_5 < arguments["length"]; ++$$pai_5) + args[$$pai_5 - 1] = arguments[$$pai_5]; + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidModule$p(module); + var parameters = $h.CommonParameters.parse(args,false); + var updatedParameters = {}; + if(module === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ModuleType"]["Addins"]) + { + var queryString = ""; + if(parameters._options$p$0 && parameters._options$p$0["queryString"]) + queryString = parameters._options$p$0["queryString"]; + updatedParameters["queryString"] = queryString + } + updatedParameters["module"] = module; + this._standardInvokeHostMethod$i$0(45,updatedParameters,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }, + _initializeMethods$p$0: function() + { + var currentInstance = this; + if($h.Item["isInstanceOfType"](this._item$p$0) || this._hostItemType$p$0 === 6) + { + currentInstance["displayNewAppointmentForm"] = this.$$d__displayNewAppointmentFormApi$p$0; + currentInstance["displayNewMessageForm"] = this.$$d_displayNewMessageFormApi; + currentInstance["displayPersonaCardAsync"] = this.$$d_displayPersonaCardAsync; + currentInstance["navigateToModuleAsync"] = this.$$d_navigateToModuleAsync + } + }, + _getInitialDataResponseHandler$p$0: function(resultCode, data) + { + if(resultCode) + return; + this["initialize"](data); + this["displayName"] = "mailbox"; + window.setTimeout(this.$$d__callAppReadyCallback$p$0,0) + }, + _callAppReadyCallback$p$0: function() + { + this._appReadyCallback$p$0() + }, + _invokeGetTokenMethodAsync$p$0: function(outlookDispid, data, methodName, callback, userContext) + { + if($h.ScriptHelpers.isNullOrUndefined(callback)) + throw Error.argumentNull("callback"); + var $$t_9 = this; + this.invokeHostMethod(outlookDispid,data,function(resultCode, response) + { + var asyncResult; + if(resultCode) + asyncResult = $$t_9.createAsyncResult(null,1,9017,userContext,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode)); + else + { + var responseDictionary = response; + if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() === 8 && "error" in responseDictionary && "errorCode" in responseDictionary && responseDictionary["error"] && responseDictionary["errorCode"] === 9030) + asyncResult = $$t_9.createAsyncResult(null,1,responseDictionary["errorCode"],userContext,responseDictionary["errorMessage"]); + else if(responseDictionary["wasSuccessful"]) + asyncResult = $$t_9.createAsyncResult(responseDictionary["token"],0,0,userContext,null); + else + asyncResult = $$t_9.createAsyncResult(null,1,responseDictionary["errorCode"],userContext,responseDictionary["errorMessage"]) + } + callback(asyncResult) + }) + }, + getItem: function() + { + return this._item$p$0 + }, + _getUserProfile$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0); + return this._userProfile$p$0 + }, + _getDiagnostics$p$0: function() + { + return this._diagnostics$p$0 + }, + _getEwsUrl$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0); + return this._initialData$p$0.get__ewsUrl$i$0() + }, + _getRestUrl$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0); + if(this._shouldInferRestUrl$p$0()) + return this._inferRestUrlFromEwsUrl$p$0(); + return this._initialData$p$0.get__restUrl$i$0() + }, + _shouldInferRestUrl$p$0: function() + { + return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() === 8 && !this._initialData$p$0.get__restUrl$i$0() && this.isApiVersionSupported("1.5") && this._isHostBuildNumberLessThan$p$0("16.0.8414.1000") + }, + _isHostBuildNumberLessThan$p$0: function(buildNumber) + { + var hostVersion = this._initialData$p$0.get__hostVersion$i$0(); + if(hostVersion) + { + var hostVersionParts = hostVersion.split("."); + var buildNumberParts = buildNumber.split("."); + return window["parseInt"](hostVersionParts[0]) < window["parseInt"](buildNumberParts[0]) || window["parseInt"](hostVersionParts[0]) === window["parseInt"](buildNumberParts[0]) && window["parseInt"](hostVersionParts[2]) < window["parseInt"](buildNumberParts[2]) + } + return false + }, + _inferRestUrlFromEwsUrl$p$0: function() + { + var inferredRestUrl = ""; + var stringToFind = "/ews/"; + var index = this._initialData$p$0.get__ewsUrl$i$0().toLowerCase().indexOf(stringToFind); + if(index !== -1) + inferredRestUrl = String.format("{0}/{1}",this._initialData$p$0.get__ewsUrl$i$0().slice(0,index),"api"); + return $h.ScriptHelpers.isNonEmptyString(inferredRestUrl) ? inferredRestUrl : null + }, + _findOffset$p$0: function(value) + { + var ranges = this._initialData$p$0.get__timeZoneOffsets$i$0(); + for(var r = 0; r < ranges["length"]; r++) + { + var range = ranges[r]; + var start = window["parseInt"](range["start"]); + var end = window["parseInt"](range["end"]); + if(value["getTime"]() - start >= 0 && value["getTime"]() - end < 0) + return window["parseInt"](range["offset"]) + } + throw Error.format(window["_u"]["ExtensibilityStrings"]["l_InvalidDate_Text"]); + }, + _areStringsLoaded$p$0: function() + { + var stringsLoaded = false; + try + { + stringsLoaded = !$h.ScriptHelpers.isNullOrUndefined(window["_u"]["ExtensibilityStrings"]["l_EwsRequestOversized_Text"]) + } + catch($$e_1){} + return stringsLoaded + }, + _loadLocalizedScript$p$0: function(stringLoadedCallback) + { + var url = null; + var baseUrl = ""; + var scripts = document.getElementsByTagName("script"); + for(var i = scripts.length - 1; i >= 0; i--) + { + var filename = null; + var attributes = scripts[i].attributes; + if(attributes) + { + var attribute = attributes.getNamedItem("src"); + if(attribute) + filename = attribute.value; + if(filename) + { + var debug = false; + filename = filename.toLowerCase(); + var officeIndex = filename.indexOf("office_strings.js"); + if(officeIndex < 0) + { + officeIndex = filename.indexOf("office_strings.debug.js"); + debug = true + } + if(officeIndex > 0 && officeIndex < filename.length) + { + url = filename.replace(debug ? "office_strings.debug.js" : "office_strings.js","outlook_strings.js"); + var languageUrl = filename.substring(0,officeIndex); + var lastIndexOfSlash = languageUrl.lastIndexOf("/",languageUrl.length - 2); + if(lastIndexOfSlash === -1) + lastIndexOfSlash = languageUrl.lastIndexOf("\\",languageUrl.length - 2); + if(lastIndexOfSlash !== -1 && languageUrl.length > lastIndexOfSlash + 1) + baseUrl = languageUrl.substring(0,lastIndexOfSlash + 1); + break + } + } + } + } + if(url) + { + var head = document.getElementsByTagName("head")[0]; + var scriptElement = null; + var $$t_H = this; + var scriptElementCallback = function() + { + if(stringLoadedCallback && (!scriptElement.readyState || scriptElement.readyState && (scriptElement.readyState === "loaded" || scriptElement.readyState === "complete"))) + { + scriptElement.onload = null; + scriptElement.onreadystatechange = null; + stringLoadedCallback() + } + }; + var $$t_I = this; + var failureCallback = function() + { + if(!$$t_I._areStringsLoaded$p$0()) + { + var fallbackUrl = baseUrl + "en-us/" + "outlook_strings.js"; + scriptElement.onload = null; + scriptElement.onreadystatechange = null; + scriptElement = $$t_I._createScriptElement$p$0(fallbackUrl); + scriptElement.onload = scriptElementCallback; + scriptElement.onreadystatechange = scriptElementCallback; + head.appendChild(scriptElement) + } + }; + scriptElement = this._createScriptElement$p$0(url); + scriptElement.onload = scriptElementCallback; + scriptElement.onreadystatechange = scriptElementCallback; + window.setTimeout(failureCallback,2e3); + head.appendChild(scriptElement) + } + }, + _createScriptElement$p$0: function(url) + { + var scriptElement = document.createElement("script"); + scriptElement.type = "text/javascript"; + scriptElement.src = url; + return scriptElement + } + }; + OSF.DDA.OutlookAppOm.prototype.initialize = function(initialData) + { + if(!initialData) + { + this._additionalOutlookParams$p$0 = new $h.AdditionalGlobalParameters(true); + this._initialData$p$0 = null; + this._item$p$0 = null; + return + } + var ItemTypeKey = "itemType"; + this._initialData$p$0 = new $h.InitialData(initialData); + this._hostItemType$p$0 = initialData[ItemTypeKey]; + if(1 === initialData[ItemTypeKey]) + this._item$p$0 = new $h.Message(this._initialData$p$0); + else if(3 === initialData[ItemTypeKey]) + this._item$p$0 = new $h.MeetingRequest(this._initialData$p$0); + else if(2 === initialData[ItemTypeKey]) + this._item$p$0 = new $h.Appointment(this._initialData$p$0); + else if(4 === initialData[ItemTypeKey]) + this._item$p$0 = new $h.MessageCompose(this._initialData$p$0); + else if(5 === initialData[ItemTypeKey]) + this._item$p$0 = new $h.AppointmentCompose(this._initialData$p$0); + else if(6 === initialData[ItemTypeKey]); + else + Sys.Debug.trace("Unexpected item type was received from the host."); + this._userProfile$p$0 = new $h.UserProfile(this._initialData$p$0); + this._diagnostics$p$0 = new $h.Diagnostics(this._initialData$p$0,this._officeAppContext$p$0["get_appName"]()); + var supportsAdditionalParameters = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() !== 8 || this.isOutlook16OrGreater() || this.isApiVersionSupported("1.5"); + this._additionalOutlookParams$p$0 = new $h.AdditionalGlobalParameters(supportsAdditionalParameters); + if("itemNumber" in initialData) + this["setCurrentItemNumber"](initialData["itemNumber"]); + this._initializeMethods$p$0(); + $h.InitialData._defineReadOnlyProperty$i(this,"item",this.$$d_getItem); + $h.InitialData._defineReadOnlyProperty$i(this,"userProfile",this.$$d__getUserProfile$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"diagnostics",this.$$d__getDiagnostics$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"ewsUrl",this.$$d__getEwsUrl$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"restUrl",this.$$d__getRestUrl$p$0); + if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() === 64) + if(this._initialData$p$0.get__overrideWindowOpen$i$0()) + window.open = this.$$d_windowOpenOverrideHandler; + this.addEventSupport() + }; + OSF.DDA.OutlookAppOm.prototype.makeEwsRequestAsync = function(data) + { + var args = []; + for(var $$pai_5 = 1; $$pai_5 < arguments["length"]; ++$$pai_5) + args[$$pai_5 - 1] = arguments[$$pai_5]; + if($h.ScriptHelpers.isNullOrUndefined(data)) + throw Error.argumentNull("data"); + if(data.length > window["OSF"]["DDA"]["OutlookAppOm"]._maxEwsRequestSize$p) + throw Error.argument("data",window["_u"]["ExtensibilityStrings"]["l_EwsRequestOversized_Text"]); + this._throwOnMethodCallForInsufficientPermission$i$0(3,"makeEwsRequestAsync"); + var parameters = $h.CommonParameters.parse(args,true,true); + var ewsRequest = new $h.EwsRequest(parameters._asyncContext$p$0); + var $$t_4 = this; + ewsRequest.onreadystatechange = function() + { + if(4 === ewsRequest.get__requestState$i$1()) + parameters._callback$p$0(ewsRequest._asyncResult$p$0) + }; + ewsRequest.send(data) + }; + OSF.DDA.OutlookAppOm.prototype.recordDataPoint = function(data) + { + if($h.ScriptHelpers.isNullOrUndefined(data)) + throw Error.argumentNull("data"); + this.invokeHostMethod(402,data,null) + }; + OSF.DDA.OutlookAppOm.prototype.recordTrace = function(data) + { + if($h.ScriptHelpers.isNullOrUndefined(data)) + throw Error.argumentNull("data"); + this.invokeHostMethod(401,data,null) + }; + OSF.DDA.OutlookAppOm.prototype.trackCtq = function(data) + { + if($h.ScriptHelpers.isNullOrUndefined(data)) + throw Error.argumentNull("data"); + this.invokeHostMethod(400,data,null) + }; + OSF.DDA.OutlookAppOm.prototype.convertToLocalClientTime = function(timeValue) + { + var date = new Date(timeValue["getTime"]()); + var offset = date["getTimezoneOffset"]() * -1; + if(this._initialData$p$0 && this._initialData$p$0.get__timeZoneOffsets$i$0()) + { + date["setUTCMinutes"](date["getUTCMinutes"]() - offset); + offset = this._findOffset$p$0(date); + date["setUTCMinutes"](date["getUTCMinutes"]() + offset) + } + var retValue = this._dateToDictionary$i$0(date); + retValue["timezoneOffset"] = offset; + return retValue + }; + OSF.DDA.OutlookAppOm.prototype.convertToUtcClientTime = function(input) + { + var retValue = this._dictionaryToDate$i$0(input); + if(this._initialData$p$0 && this._initialData$p$0.get__timeZoneOffsets$i$0()) + { + var offset = this._findOffset$p$0(retValue); + retValue["setUTCMinutes"](retValue["getUTCMinutes"]() - offset); + offset = !input["timezoneOffset"] ? retValue["getTimezoneOffset"]() * -1 : input["timezoneOffset"]; + retValue["setUTCMinutes"](retValue["getUTCMinutes"]() + offset) + } + return retValue + }; + OSF.DDA.OutlookAppOm.prototype.convertToRestId = function(itemId, restVersion) + { + if(!itemId) + throw Error.argumentNull("itemId"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p(restVersion); + return itemId.replace(new RegExp("[/]","g"),"-").replace(new RegExp("[+]","g"),"_") + }; + OSF.DDA.OutlookAppOm.prototype.convertToEwsId = function(itemId, restVersion) + { + if(!itemId) + throw Error.argumentNull("itemId"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p(restVersion); + return itemId.replace(new RegExp("[-]","g"),"/").replace(new RegExp("[_]","g"),"+") + }; + OSF.DDA.OutlookAppOm.prototype.getUserIdentityTokenAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + this._throwOnMethodCallForInsufficientPermission$i$0(1,"getUserIdentityTokenAsync"); + var parameters = $h.CommonParameters.parse(args,true,true); + this._invokeGetTokenMethodAsync$p$0(2,null,"GetUserIdentityToken",parameters._callback$p$0,parameters._asyncContext$p$0) + }; + OSF.DDA.OutlookAppOm.prototype.getCallbackTokenAsync = function() + { + var args = []; + for(var $$pai_7 = 0; $$pai_7 < arguments["length"]; ++$$pai_7) + args[$$pai_7] = arguments[$$pai_7]; + this._throwOnMethodCallForInsufficientPermission$i$0(1,"getCallbackTokenAsync"); + var parameters = $h.CommonParameters.parse(args,true,true); + var options = {}; + if(parameters._options$p$0) + for(var $$arr_3 = Object["keys"](parameters._options$p$0), $$len_4 = $$arr_3.length, $$idx_5 = 0; $$idx_5 < $$len_4; ++$$idx_5) + { + var key = $$arr_3[$$idx_5]; + options[key] = parameters._options$p$0[key] + } + if(!("isRest" in options)) + options["isRest"] = false; + this._invokeGetTokenMethodAsync$p$0(12,options,"GetCallbackToken",parameters._callback$p$0,parameters._asyncContext$p$0) + }; + OSF.DDA.OutlookAppOm.prototype.displayMessageForm = function(itemId) + { + if($h.ScriptHelpers.isNullOrUndefined(itemId)) + throw Error.argumentNull("itemId"); + this.invokeHostMethod(8,{itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId)},null) + }; + OSF.DDA.OutlookAppOm.prototype.displayAppointmentForm = function(itemId) + { + if($h.ScriptHelpers.isNullOrUndefined(itemId)) + throw Error.argumentNull("itemId"); + this.invokeHostMethod(9,{itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId)},null) + }; + OSF.DDA.OutlookAppOm.prototype.RegisterConsentAsync = function(consentState) + { + if(consentState !== 2 && consentState !== 1 && consentState) + throw Error.argumentOutOfRange("consentState"); + var parameters = {}; + parameters["consentState"] = consentState["toString"](); + parameters["extensionId"] = this["GetExtensionId"](); + this.invokeHostMethod(40,parameters,null) + }; + OSF.DDA.OutlookAppOm.prototype.CloseApp = function() + { + this.invokeHostMethod(42,null,null) + }; + OSF.DDA.OutlookAppOm.prototype.GetIsRead = function() + { + return this._initialData$p$0.get__isRead$i$0() + }; + OSF.DDA.OutlookAppOm.prototype.GetEndNodeUrl = function() + { + return this._initialData$p$0.get__endNodeUrl$i$0() + }; + OSF.DDA.OutlookAppOm.prototype.GetConsentMetadata = function() + { + return this._initialData$p$0.get__consentMetadata$i$0() + }; + OSF.DDA.OutlookAppOm.prototype.GetEntryPointUrl = function() + { + return this._initialData$p$0.get__entryPointUrl$i$0() + }; + OSF.DDA.OutlookAppOm.prototype.GetMarketplaceContentMarket = function() + { + return this._initialData$p$0.get__marketplaceContentMarket$i$0() + }; + OSF.DDA.OutlookAppOm.prototype.GetMarketplaceAssetId = function() + { + return this._initialData$p$0.get__marketplaceAssetId$i$0() + }; + OSF.DDA.OutlookAppOm.prototype.GetExtensionId = function() + { + return this._initialData$p$0.get__extensionId$i$0() + }; + OSF.DDA.OutlookAppOm.prototype.setCurrentItemNumber = function(itemNumber) + { + this._additionalOutlookParams$p$0.setCurrentItemNumber(itemNumber) + }; + window["OSF"]["DDA"]["Settings"] = OSF.DDA.Settings = function(data) + { + this._rawData$p$0 = data + }; + window["OSF"]["DDA"]["Settings"]._convertFromRawSettings$p = function(rawSettings) + { + if(!rawSettings) + return{}; + if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() === 8 || window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() === 65536 || window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() === 4194304) + { + var outlookSettings = rawSettings["SettingsKey"]; + if(outlookSettings) + return OSF.DDA.SettingsManager["deserializeSettings"](outlookSettings) + } + return rawSettings + }; + OSF.DDA.Settings.prototype = { + _rawData$p$0: null, + _settingsData$p$0: null, + get__data$p$0: function() + { + if(!this._settingsData$p$0) + { + this._settingsData$p$0 = window["OSF"]["DDA"]["Settings"]._convertFromRawSettings$p(this._rawData$p$0); + this._rawData$p$0 = null + } + return this._settingsData$p$0 + }, + _saveSettingsForOutlook$p$0: function(callback, userContext) + { + var storedException = null; + var startTime = (new Date)["getTime"](); + var detailedErrorCode = -1; + try + { + var serializedSettings = OSF.DDA.SettingsManager["serializeSettings"](this.get__data$p$0()); + var jsonSettings = window["JSON"]["stringify"](serializedSettings); + var settingsObjectToSave = {SettingsKey: jsonSettings}; + OSF.DDA.ClientSettingsManager["write"](settingsObjectToSave) + } + catch(ex) + { + storedException = ex + } + var asyncResult; + if(storedException) + { + detailedErrorCode = 9019; + asyncResult = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,detailedErrorCode,userContext,storedException["message"]) + } + else + { + detailedErrorCode = 0; + asyncResult = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,0,detailedErrorCode,userContext,null) + } + window["OSF"]["AppTelemetry"]["onMethodDone"](404,null,Math["abs"]((new Date)["getTime"]() - startTime),detailedErrorCode); + if(callback) + callback(asyncResult) + }, + _saveSettingsForOwa$p$0: function(callback, userContext) + { + var serializedSettings = OSF.DDA.SettingsManager["serializeSettings"](this.get__data$p$0()); + var $$t_7 = this; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.invokeHostMethod(404,[serializedSettings],function(resultCode, response) + { + if(callback) + { + var asyncResult; + if(resultCode) + asyncResult = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9017,userContext,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode)); + else + { + var responseDictionary = response; + if(!responseDictionary["error"]) + asyncResult = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,0,0,userContext,null); + else + asyncResult = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9019,userContext,responseDictionary["errorMessage"]) + } + callback(asyncResult) + } + }) + } + }; + OSF.DDA.Settings.prototype.get = function(name) + { + return this.get__data$p$0()[name] + }; + OSF.DDA.Settings.prototype.set = function(name, value) + { + this.get__data$p$0()[name] = value + }; + OSF.DDA.Settings.prototype.remove = function(name) + { + delete this.get__data$p$0()[name] + }; + OSF.DDA.Settings.prototype.saveAsync = function() + { + var args = []; + for(var $$pai_4 = 0; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4] = arguments[$$pai_4]; + var commonParameters = $h.CommonParameters.parse(args,false); + if(window["JSON"]["stringify"](OSF.DDA.SettingsManager["serializeSettings"](this.get__data$p$0())).length > 32768) + { + var asyncResult = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9019,commonParameters._asyncContext$p$0,""); + var $$t_3 = this; + window.setTimeout(function() + { + commonParameters._callback$p$0(asyncResult) + },0); + return + } + if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() === 64) + this._saveSettingsForOwa$p$0(commonParameters._callback$p$0,commonParameters._asyncContext$p$0); + else + this._saveSettingsForOutlook$p$0(commonParameters._callback$p$0,commonParameters._asyncContext$p$0) + }; + Type.registerNamespace("$h"); + var $h = window["$h"] || {}; + Type.registerNamespace("Office.cast"); + var Office = window["Office"] || {}; + Office.cast = Office.cast || {}; + $h.AdditionalGlobalParameters = function(supported) + { + this._parameterBlobSupported$p$0 = supported; + this._itemNumber$p$0 = 0 + }; + $h.AdditionalGlobalParameters.prototype = { + _parameterBlobSupported$p$0: false, + _itemNumber$p$0: 0, + _actionsDefinition$p$0: null, + setActionsDefinition: function(actionsDefinition) + { + this._actionsDefinition$p$0 = actionsDefinition + }, + setCurrentItemNumber: function(itemNumber) + { + if(itemNumber > 0) + this._itemNumber$p$0 = itemNumber + }, + get_itemNumber: function() + { + return this._itemNumber$p$0 + }, + get_actionsDefinition: function() + { + return this._actionsDefinition$p$0 + }, + updateOutlookExecuteParameters: function(executeParameters, additionalApiParameters) + { + if(this._parameterBlobSupported$p$0) + { + if(this._itemNumber$p$0 > 0) + additionalApiParameters["itemNumber"] = this._itemNumber$p$0["toString"](); + if(this._actionsDefinition$p$0) + additionalApiParameters["actions"] = this._actionsDefinition$p$0; + if(!Object["keys"](additionalApiParameters)["length"]) + return; + if(!executeParameters["val"]) + executeParameters["val"] = []; + executeParameters["val"]["push"](window["JSON"]["stringify"](additionalApiParameters)) + } + } + }; + $h.Appointment = function(dataDictionary) + { + this.$$d__getOrganizer$p$2 = Function.createDelegate(this,this._getOrganizer$p$2); + this.$$d__getNormalizedSubject$p$2 = Function.createDelegate(this,this._getNormalizedSubject$p$2); + this.$$d__getSubject$p$2 = Function.createDelegate(this,this._getSubject$p$2); + this.$$d__getResources$p$2 = Function.createDelegate(this,this._getResources$p$2); + this.$$d__getRequiredAttendees$p$2 = Function.createDelegate(this,this._getRequiredAttendees$p$2); + this.$$d__getOptionalAttendees$p$2 = Function.createDelegate(this,this._getOptionalAttendees$p$2); + this.$$d__getLocation$p$2 = Function.createDelegate(this,this._getLocation$p$2); + this.$$d__getEnd$p$2 = Function.createDelegate(this,this._getEnd$p$2); + this.$$d__getStart$p$2 = Function.createDelegate(this,this._getStart$p$2); + $h.Appointment["initializeBase"](this,[dataDictionary]); + $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"resources",this.$$d__getResources$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"organizer",this.$$d__getOrganizer$p$2) + }; + $h.Appointment.prototype = { + getItemType: function() + { + return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Appointment"] + }, + _getStart$p$2: function() + { + return this._data$p$0.get__start$i$0() + }, + _getEnd$p$2: function() + { + return this._data$p$0.get__end$i$0() + }, + _getLocation$p$2: function() + { + return this._data$p$0.get__location$i$0() + }, + _getOptionalAttendees$p$2: function() + { + return this._data$p$0.get__cc$i$0() + }, + _getRequiredAttendees$p$2: function() + { + return this._data$p$0.get__to$i$0() + }, + _getResources$p$2: function() + { + return this._data$p$0.get__resources$i$0() + }, + _getSubject$p$2: function() + { + return this._data$p$0.get__subject$i$0() + }, + _getNormalizedSubject$p$2: function() + { + return this._data$p$0.get__normalizedSubject$i$0() + }, + _getOrganizer$p$2: function() + { + return this._data$p$0.get__organizer$i$0() + } + }; + $h.Appointment.prototype.getEntities = function() + { + return this._data$p$0._getEntities$i$0() + }; + $h.Appointment.prototype.getEntitiesByType = function(entityType) + { + return this._data$p$0._getEntitiesByType$i$0(entityType) + }; + $h.Appointment.prototype.getSelectedEntities = function() + { + return this._data$p$0._getSelectedEntities$i$0() + }; + $h.Appointment.prototype.getRegExMatches = function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches"); + return this._data$p$0._getRegExMatches$i$0() + }; + $h.Appointment.prototype.getFilteredEntitiesByName = function(name) + { + return this._data$p$0._getFilteredEntitiesByName$i$0(name) + }; + $h.Appointment.prototype.getRegExMatchesByName = function(name) + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName"); + return this._data$p$0._getRegExMatchesByName$i$0(name) + }; + $h.Appointment.prototype.getSelectedRegExMatches = function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedRegExMatches"); + return this._data$p$0._getSelectedRegExMatches$i$0() + }; + $h.Appointment.prototype.displayReplyForm = function(obj) + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyForm$i$0(obj) + }; + $h.Appointment.prototype.displayReplyAllForm = function(obj) + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyAllForm$i$0(obj) + }; + $h.AppointmentCompose = function(data) + { + this.$$d__getLocation$p$2 = Function.createDelegate(this,this._getLocation$p$2); + this.$$d__getEnd$p$2 = Function.createDelegate(this,this._getEnd$p$2); + this.$$d__getStart$p$2 = Function.createDelegate(this,this._getStart$p$2); + this.$$d__getOptionalAttendees$p$2 = Function.createDelegate(this,this._getOptionalAttendees$p$2); + this.$$d__getRequiredAttendees$p$2 = Function.createDelegate(this,this._getRequiredAttendees$p$2); + $h.AppointmentCompose["initializeBase"](this,[data]); + $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2) + }; + $h.AppointmentCompose.prototype = { + _requiredAttendees$p$2: null, + _optionalAttendees$p$2: null, + _start$p$2: null, + _end$p$2: null, + _location$p$2: null, + getItemType: function() + { + return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Appointment"] + }, + _getRequiredAttendees$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._requiredAttendees$p$2) + this._requiredAttendees$p$2 = new $h.ComposeRecipient(0,"requiredAttendees"); + return this._requiredAttendees$p$2 + }, + _getOptionalAttendees$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._optionalAttendees$p$2) + this._optionalAttendees$p$2 = new $h.ComposeRecipient(1,"optionalAttendees"); + return this._optionalAttendees$p$2 + }, + _getStart$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._start$p$2) + this._start$p$2 = new $h.ComposeTime(1); + return this._start$p$2 + }, + _getEnd$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._end$p$2) + this._end$p$2 = new $h.ComposeTime(2); + return this._end$p$2 + }, + _getLocation$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._location$p$2) + this._location$p$2 = new $h.ComposeLocation; + return this._location$p$2 + } + }; + $h.AttachmentConstants = function(){}; + $h.AttachmentDetails = function(data) + { + this.$$d__getIsInline$p$0 = Function.createDelegate(this,this._getIsInline$p$0); + this.$$d__getAttachmentType$p$0 = Function.createDelegate(this,this._getAttachmentType$p$0); + this.$$d__getSize$p$0 = Function.createDelegate(this,this._getSize$p$0); + this.$$d__getContentType$p$0 = Function.createDelegate(this,this._getContentType$p$0); + this.$$d__getName$p$0 = Function.createDelegate(this,this._getName$p$0); + this.$$d__getId$p$0 = Function.createDelegate(this,this._getId$p$0); + this._data$p$0 = data; + $h.InitialData._defineReadOnlyProperty$i(this,"id",this.$$d__getId$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"name",this.$$d__getName$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"contentType",this.$$d__getContentType$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"size",this.$$d__getSize$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"attachmentType",this.$$d__getAttachmentType$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"isInline",this.$$d__getIsInline$p$0) + }; + $h.AttachmentDetails.prototype = { + _data$p$0: null, + _getId$p$0: function() + { + return this._data$p$0["id"] + }, + _getName$p$0: function() + { + return this._data$p$0["name"] + }, + _getContentType$p$0: function() + { + return this._data$p$0["contentType"] + }, + _getSize$p$0: function() + { + return this._data$p$0["size"] + }, + _getAttachmentType$p$0: function() + { + var response = this._data$p$0["attachmentType"]; + return response < $h.AttachmentDetails._attachmentTypeMap$p["length"] ? $h.AttachmentDetails._attachmentTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["File"] + }, + _getIsInline$p$0: function() + { + return this._data$p$0["isInline"] + } + }; + $h.Body = function(){}; + $h.Body._tryMapToHostCoercionType$i = function(coercionType, hostCoercionType) + { + hostCoercionType["val"] = undefined; + if(coercionType === window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Html"]) + hostCoercionType["val"] = 3; + else if(coercionType === window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Text"]) + hostCoercionType["val"] = 0; + else + return false; + return true + }; + $h.Body.prototype.getAsync = function(coercionType) + { + var args = []; + for(var $$pai_7 = 1; $$pai_7 < arguments["length"]; ++$$pai_7) + args[$$pai_7 - 1] = arguments[$$pai_7]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"body.getAsync"); + var commonParameters = $h.CommonParameters.parse(args,true); + var hostCoercionType; + var $$t_5, + $$t_6; + if(!($$t_6 = $h.Body._tryMapToHostCoercionType$i(coercionType,$$t_5 = {val: hostCoercionType}),hostCoercionType = $$t_5["val"],$$t_6)) + throw Error.argument("coercionType"); + var dataToHost = {coercionType: hostCoercionType}; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(37,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.ComposeBody = function() + { + $h.ComposeBody["initializeBase"](this) + }; + $h.ComposeBody._createParameterDictionaryToHost$i = function(data, parameters) + { + var dataToHost = {data: data}; + return $h.ComposeBody._addCoercionTypeToDictionary$i(dataToHost,parameters) + }; + $h.ComposeBody._createAppendParameterDictionaryToHost$i = function(data, parameters) + { + var dataToHost = {appendTxt: data}; + return $h.ComposeBody._addCoercionTypeToDictionary$i(dataToHost,parameters) + }; + $h.ComposeBody._addCoercionTypeToDictionary$i = function(dataToHost, parameters) + { + if(parameters._options$p$0 && parameters._options$p$0["hasOwnProperty"]("coercionType") && !$h.ScriptHelpers.isNull(parameters._options$p$0["coercionType"])) + { + var hostCoercionType; + var $$t_3, + $$t_4; + if(!($$t_4 = $h.Body._tryMapToHostCoercionType$i(parameters._options$p$0["coercionType"],$$t_3 = {val: hostCoercionType}),hostCoercionType = $$t_3["val"],$$t_4)) + { + if(parameters._callback$p$0) + parameters._callback$p$0(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,1e3,parameters._asyncContext$p$0,null)); + return null + } + dataToHost["coercionType"] = hostCoercionType + } + else + dataToHost["coercionType"] = 0; + return dataToHost + }; + $h.ComposeBody.prototype.getTypeAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"body.getTypeAsync"); + var parameters = $h.CommonParameters.parse(args,true); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(14,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeBody.prototype.setSelectedDataAsync = function(data) + { + var args = []; + for(var $$pai_4 = 1; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4 - 1] = arguments[$$pai_4]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.setSelectedDataAsync"); + var parameters = $h.CommonParameters.parse(args,false); + if(!String["isInstanceOfType"](data)) + throw Error.argumentType("data",Object["getType"](data),String); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); + var dataToHost = $h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); + if(!dataToHost) + return; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(13,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeBody.prototype.prependAsync = function(data) + { + var args = []; + for(var $$pai_4 = 1; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4 - 1] = arguments[$$pai_4]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.prependAsync"); + var parameters = $h.CommonParameters.parse(args,false); + if(!String["isInstanceOfType"](data)) + throw Error.argumentType("data",Object["getType"](data),String); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); + var dataToHost = $h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); + if(!dataToHost) + return; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(23,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeBody.prototype.appendOnSendAsync = function(data) + { + var args = []; + for(var $$pai_4 = 1; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4 - 1] = arguments[$$pai_4]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.appendOnSendAsync"); + var parameters = $h.CommonParameters.parse(args,false); + if(!data) + data = ""; + if(!String["isInstanceOfType"](data)) + throw Error.argumentType("data",Object["getType"](data),String); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,5e3,"data"); + var dataToHost = $h.ComposeBody._createAppendParameterDictionaryToHost$i(data,parameters); + if(!dataToHost) + return; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(100,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeBody.prototype.setAsync = function(data) + { + var args = []; + for(var $$pai_4 = 1; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4 - 1] = arguments[$$pai_4]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.setAsync"); + var parameters = $h.CommonParameters.parse(args,false); + if(!String["isInstanceOfType"](data)) + throw Error.argumentType("data",Object["getType"](data),String); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); + var dataToHost = $h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); + if(!dataToHost) + return; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(38,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeItem = function(data) + { + this.$$d__getBody$p$1 = Function.createDelegate(this,this._getBody$p$1); + this.$$d__getSubject$p$1 = Function.createDelegate(this,this._getSubject$p$1); + $h.ComposeItem["initializeBase"](this,[data]); + $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$1); + $h.InitialData._defineReadOnlyProperty$i(this,"body",this.$$d__getBody$p$1) + }; + $h.ComposeItem.prototype = { + _subject$p$1: null, + _body$p$1: null, + _getBody$p$1: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._body$p$1) + this._body$p$1 = new $h.ComposeBody; + return this._body$p$1 + }, + _getSubject$p$1: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._subject$p$1) + this._subject$p$1 = new $h.ComposeSubject; + return this._subject$p$1 + } + }; + $h.ComposeItem.prototype.addFileAttachmentAsync = function(uri, attachmentName) + { + var args = []; + for(var $$pai_6 = 2; $$pai_6 < arguments["length"]; ++$$pai_6) + args[$$pai_6 - 2] = arguments[$$pai_6]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"addFileAttachmentAsync"); + if(!$h.ScriptHelpers.isNonEmptyString(uri)) + throw Error.argument("uri"); + if(!$h.ScriptHelpers.isNonEmptyString(attachmentName)) + throw Error.argument("attachmentName"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(uri.length,0,2048,"uri"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentName.length,0,255,"attachmentName"); + var commonParameters = $h.CommonParameters.parse(args,false); + var isInline = false; + if(!$h.ScriptHelpers.isNull(commonParameters._options$p$0)) + isInline = $h.ScriptHelpers.isValueTrue(commonParameters._options$p$0["isInline"]); + var parameters = { + uri: uri, + name: attachmentName, + isInline: isInline, + __timeout__: 6e5 + }; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(16,parameters,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.ComposeItem.prototype.addItemAttachmentAsync = function(itemId, attachmentName) + { + var args = []; + for(var $$pai_5 = 2; $$pai_5 < arguments["length"]; ++$$pai_5) + args[$$pai_5 - 2] = arguments[$$pai_5]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"addItemAttachmentAsync"); + if(!$h.ScriptHelpers.isNonEmptyString(itemId)) + throw Error.argument("itemId"); + if(!$h.ScriptHelpers.isNonEmptyString(attachmentName)) + throw Error.argument("attachmentName"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(itemId.length,0,200,"itemId"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentName.length,0,255,"attachmentName"); + var commonParameters = $h.CommonParameters.parse(args,false); + var parameters = { + itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId), + name: attachmentName, + __timeout__: 6e5 + }; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(19,parameters,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.ComposeItem.prototype.removeAttachmentAsync = function(attachmentId) + { + var args = []; + for(var $$pai_3 = 1; $$pai_3 < arguments["length"]; ++$$pai_3) + args[$$pai_3 - 1] = arguments[$$pai_3]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"removeAttachmentAsync"); + if(!$h.ScriptHelpers.isNonEmptyString(attachmentId)) + throw Error.argument("attachmentId"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentId.length,0,200,"attachmentId"); + var commonParameters = $h.CommonParameters.parse(args,false); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(20,{attachmentIndex: attachmentId},null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.ComposeItem.prototype.getSelectedDataAsync = function(coercionType) + { + var args = []; + for(var $$pai_7 = 1; $$pai_7 < arguments["length"]; ++$$pai_7) + args[$$pai_7 - 1] = arguments[$$pai_7]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedDataAsync"); + var commonParameters = $h.CommonParameters.parse(args,true); + var hostCoercionType; + var $$t_5, + $$t_6; + if(coercionType !== window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Html"] && coercionType !== window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Text"] || !($$t_6 = $h.Body._tryMapToHostCoercionType$i(coercionType,$$t_5 = {val: hostCoercionType}),hostCoercionType = $$t_5["val"],$$t_6)) + throw Error.argument("coercionType"); + var dataToHost = {coercionType: hostCoercionType}; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(28,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.ComposeItem.prototype.setSelectedDataAsync = function(data) + { + var args = []; + for(var $$pai_4 = 1; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4 - 1] = arguments[$$pai_4]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"setSelectedDataAsync"); + var parameters = $h.CommonParameters.parse(args,false); + if(!String["isInstanceOfType"](data)) + throw Error.argumentType("data",Object["getType"](data),String); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data"); + var dataToHost = $h.ComposeBody._createParameterDictionaryToHost$i(data,parameters); + if(!dataToHost) + return; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(29,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeItem.prototype.close = function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(41,null,null,null,null) + }; + $h.ComposeItem.prototype.saveAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"saveAsync"); + var parameters = $h.CommonParameters.parse(args,false); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(32,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeRecipient = function(type, propertyName) + { + this._type$p$0 = type; + this._propertyName$p$0 = propertyName + }; + $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p = function(displayName, emailAddress) + { + if(!displayName && !emailAddress) + throw Error.argument("recipients"); + if(displayName && displayName.length > 255) + throw Error.argumentOutOfRange("recipients",displayName.length,window["_u"]["ExtensibilityStrings"]["l_DisplayNameTooLong_Text"]); + if(emailAddress && emailAddress.length > 571) + throw Error.argumentOutOfRange("recipients",emailAddress.length,window["_u"]["ExtensibilityStrings"]["l_EmailAddressTooLong_Text"]); + }; + $h.ComposeRecipient._getAsyncFormatter$p = function(rawInput) + { + var input = rawInput; + var output = []; + for(var i = 0; i < input["length"]; i++) + { + var email = new $h.EmailAddressDetails(input[i]); + output[i] = email + } + return output + }; + $h.ComposeRecipient._createEmailDictionaryForHost$p = function(address, name) + { + return{ + address: address, + name: name + } + }; + $h.ComposeRecipient.prototype = { + _propertyName$p$0: null, + _type$p$0: 0, + setAddHelper: function(recipients, args, isSet) + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(recipients["length"],0,100,"recipients"); + var parameters = $h.CommonParameters.parse(args,false); + var recipientData = []; + if(Array["isInstanceOfType"](recipients)) + for(var i = 0; i < recipients["length"]; i++) + if(String["isInstanceOfType"](recipients[i])) + { + $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(recipients[i],recipients[i]); + recipientData[i] = $h.ComposeRecipient._createEmailDictionaryForHost$p(recipients[i],recipients[i]) + } + else if($h.EmailAddressDetails["isInstanceOfType"](recipients[i])) + { + var address = recipients[i]; + $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(address["displayName"],address["emailAddress"]); + recipientData[i] = $h.ComposeRecipient._createEmailDictionaryForHost$p(address["emailAddress"],address["displayName"]) + } + else if(Object["isInstanceOfType"](recipients[i])) + { + var input = recipients[i]; + var emailAddress = input["emailAddress"]; + var displayName = input["displayName"]; + $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(displayName,emailAddress); + recipientData[i] = $h.ComposeRecipient._createEmailDictionaryForHost$p(emailAddress,displayName) + } + else + throw Error.argument("recipients"); + else + throw Error.argument("recipients"); + var $$t_B = this; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(isSet ? 21 : 22,{ + recipientField: this._type$p$0, + recipientArray: recipientData + },function(rawInput) + { + return rawInput + },parameters._asyncContext$p$0,parameters._callback$p$0) + } + }; + $h.ComposeRecipient.prototype.getAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + var parameters = $h.CommonParameters.parse(args,true); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,this._propertyName$p$0 + ".getAsync"); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(15,{recipientField: this._type$p$0},$h.ComposeRecipient._getAsyncFormatter$p,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeRecipient.prototype.setAsync = function(recipients) + { + var args = []; + for(var $$pai_2 = 1; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2 - 1] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._propertyName$p$0 + ".setAsync"); + this.setAddHelper(recipients,args,true) + }; + $h.ComposeRecipient.prototype.addAsync = function(recipients) + { + var args = []; + for(var $$pai_2 = 1; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2 - 1] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._propertyName$p$0 + ".addAsync"); + this.setAddHelper(recipients,args,false) + }; + $h.ComposeRecipient.RecipientField = function(){}; + $h.ComposeRecipient.RecipientField.prototype = { + to: 0, + cc: 1, + bcc: 2, + requiredAttendees: 0, + optionalAttendees: 1 + }; + $h.ComposeRecipient.RecipientField["registerEnum"]("$h.ComposeRecipient.RecipientField",false); + $h.ComposeLocation = function(){}; + $h.ComposeLocation.prototype.getAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"location.getAsync"); + var parameters = $h.CommonParameters.parse(args,true); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(26,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeLocation.prototype.setAsync = function(location) + { + var args = []; + for(var $$pai_3 = 1; $$pai_3 < arguments["length"]; ++$$pai_3) + args[$$pai_3 - 1] = arguments[$$pai_3]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"location.setAsync"); + var parameters = $h.CommonParameters.parse(args,false); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(location.length,0,255,"location"); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(27,{location: location},null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeSubject = function(){}; + $h.ComposeSubject.prototype.getAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + var parameters = $h.CommonParameters.parse(args,true); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"subject.getAsync"); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(18,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeSubject.prototype.setAsync = function(data) + { + var args = []; + for(var $$pai_3 = 1; $$pai_3 < arguments["length"]; ++$$pai_3) + args[$$pai_3 - 1] = arguments[$$pai_3]; + var parameters = $h.CommonParameters.parse(args,false); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"subject.setAsync"); + if(!String["isInstanceOfType"](data)) + throw Error.argument("data"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,255,"data"); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(17,{subject: data},null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeTime = function(type) + { + this.$$d__ticksToDateFormatter$p$0 = Function.createDelegate(this,this._ticksToDateFormatter$p$0); + this._timeType$p$0 = type + }; + $h.ComposeTime.prototype = { + _timeType$p$0: 0, + _ticksToDateFormatter$p$0: function(rawInput) + { + var ticks = rawInput; + return new Date(ticks) + }, + _getPropertyName$p$0: function() + { + return this._timeType$p$0 === 1 ? "start" : "end" + } + }; + $h.ComposeTime.prototype.getAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,this._getPropertyName$p$0() + ".getAsync"); + var parameters = $h.CommonParameters.parse(args,true); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(24,{TimeProperty: this._timeType$p$0},this.$$d__ticksToDateFormatter$p$0,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeTime.prototype.setAsync = function(dateTime) + { + var args = []; + for(var $$pai_3 = 1; $$pai_3 < arguments["length"]; ++$$pai_3) + args[$$pai_3 - 1] = arguments[$$pai_3]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._getPropertyName$p$0() + ".setAsync"); + if(!Date["isInstanceOfType"](dateTime)) + throw Error.argumentType("dateTime",Object["getType"](dateTime),Date); + if(window["isNaN"](dateTime["getTime"]())) + throw Error.argument("dateTime"); + if(dateTime["getTime"]() < -864e13 || dateTime["getTime"]() > 864e13) + throw Error.argumentOutOfRange("dateTime"); + var parameters = $h.CommonParameters.parse(args,false); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(25,{ + TimeProperty: this._timeType$p$0, + time: dateTime["getTime"]() + },null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.ComposeTime.TimeType = function(){}; + $h.ComposeTime.TimeType.prototype = { + start: 1, + end: 2 + }; + $h.ComposeTime.TimeType["registerEnum"]("$h.ComposeTime.TimeType",false); + $h.Contact = function(data) + { + this.$$d__getContactString$p$0 = Function.createDelegate(this,this._getContactString$p$0); + this.$$d__getAddresses$p$0 = Function.createDelegate(this,this._getAddresses$p$0); + this.$$d__getUrls$p$0 = Function.createDelegate(this,this._getUrls$p$0); + this.$$d__getEmailAddresses$p$0 = Function.createDelegate(this,this._getEmailAddresses$p$0); + this.$$d__getPhoneNumbers$p$0 = Function.createDelegate(this,this._getPhoneNumbers$p$0); + this.$$d__getBusinessName$p$0 = Function.createDelegate(this,this._getBusinessName$p$0); + this.$$d__getPersonName$p$0 = Function.createDelegate(this,this._getPersonName$p$0); + this._data$p$0 = data; + $h.InitialData._defineReadOnlyProperty$i(this,"personName",this.$$d__getPersonName$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"businessName",this.$$d__getBusinessName$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"contactString",this.$$d__getContactString$p$0) + }; + $h.Contact.prototype = { + _data$p$0: null, + _phoneNumbers$p$0: null, + _getPersonName$p$0: function() + { + return this._data$p$0["PersonName"] + }, + _getBusinessName$p$0: function() + { + return this._data$p$0["BusinessName"] + }, + _getAddresses$p$0: function() + { + return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses") + }, + _getEmailAddresses$p$0: function() + { + return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses") + }, + _getUrls$p$0: function() + { + return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls") + }, + _getPhoneNumbers$p$0: function() + { + if(!this._phoneNumbers$p$0) + { + var $$t_1 = this; + this._phoneNumbers$p$0 = $h.Entities._getExtractedObjects$i($h.PhoneNumber,this._data$p$0,"PhoneNumbers",function(data) + { + return new $h.PhoneNumber(data) + }) + } + return this._phoneNumbers$p$0 + }, + _getContactString$p$0: function() + { + return this._data$p$0["ContactString"] + } + }; + $h.CustomProperties = function(data) + { + if($h.ScriptHelpers.isNullOrUndefined(data)) + throw Error.argumentNull("data"); + if(Array["isInstanceOfType"](data)) + { + var customPropertiesArray = data; + if(customPropertiesArray["length"] > 0) + this._data$p$0 = customPropertiesArray[0]; + else + throw Error.argument("data"); + } + else + this._data$p$0 = data + }; + $h.CustomProperties.prototype = {_data$p$0: null}; + $h.CustomProperties.prototype.get = function(name) + { + var value = this._data$p$0[name]; + if(typeof value === "string") + { + var valueString = value; + if(valueString.length > 6 && valueString.startsWith("Date(") && valueString.endsWith(")")) + { + var ticksString = valueString.substring(5,valueString.length - 1); + var ticks = window["parseInt"](ticksString); + if(!window["isNaN"](ticks)) + { + var dateTimeValue = new Date(ticks); + if(dateTimeValue) + value = dateTimeValue + } + } + } + return value + }; + $h.CustomProperties.prototype.set = function(name, value) + { + if(window["OSF"]["OUtil"]["isDate"](value)) + value = "Date(" + value["getTime"]() + ")"; + this._data$p$0[name] = value + }; + $h.CustomProperties.prototype.remove = function(name) + { + delete this._data$p$0[name] + }; + $h.CustomProperties.prototype.saveAsync = function() + { + var args = []; + for(var $$pai_4 = 0; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4] = arguments[$$pai_4]; + var MaxCustomPropertiesLength = 2500; + if(window["JSON"]["stringify"](this._data$p$0).length > MaxCustomPropertiesLength) + throw Error.argument(); + var parameters = $h.CommonParameters.parse(args,false,true); + var saveCustomProperties = new $h.SaveDictionaryRequest(parameters._callback$p$0,parameters._asyncContext$p$0); + saveCustomProperties._sendRequest$i$0(4,"SaveCustomProperties",{customProperties: this._data$p$0}) + }; + $h.Diagnostics = function(data, appName) + { + this.$$d__getOwaView$p$0 = Function.createDelegate(this,this._getOwaView$p$0); + this.$$d__getHostVersion$p$0 = Function.createDelegate(this,this._getHostVersion$p$0); + this.$$d__getHostName$p$0 = Function.createDelegate(this,this._getHostName$p$0); + this._data$p$0 = data; + this._appName$p$0 = appName; + $h.InitialData._defineReadOnlyProperty$i(this,"hostName",this.$$d__getHostName$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"hostVersion",this.$$d__getHostVersion$p$0); + if(64 === this._appName$p$0) + $h.InitialData._defineReadOnlyProperty$i(this,"OWAView",this.$$d__getOwaView$p$0) + }; + $h.Diagnostics.prototype = { + _data$p$0: null, + _appName$p$0: 0, + _getHostName$p$0: function() + { + switch(this._appName$p$0) + { + case 8: + return"Outlook"; + case 64: + return"OutlookWebApp"; + case 65536: + return"OutlookIOS"; + case 4194304: + return"OutlookAndroid"; + default: + return null + } + }, + _getHostVersion$p$0: function() + { + return this._data$p$0.get__hostVersion$i$0() + }, + _getOwaView$p$0: function() + { + return this._data$p$0.get__owaView$i$0() + } + }; + $h.EmailAddressDetails = function(data) + { + this.$$d__getRecipientType$p$0 = Function.createDelegate(this,this._getRecipientType$p$0); + this.$$d__getAppointmentResponse$p$0 = Function.createDelegate(this,this._getAppointmentResponse$p$0); + this.$$d__getDisplayName$p$0 = Function.createDelegate(this,this._getDisplayName$p$0); + this.$$d__getEmailAddress$p$0 = Function.createDelegate(this,this._getEmailAddress$p$0); + this._data$p$0 = data; + $h.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0); + if($h.ScriptHelpers.dictionaryContainsKey(data,"appointmentResponse")) + $h.InitialData._defineReadOnlyProperty$i(this,"appointmentResponse",this.$$d__getAppointmentResponse$p$0); + if($h.ScriptHelpers.dictionaryContainsKey(data,"recipientType")) + $h.InitialData._defineReadOnlyProperty$i(this,"recipientType",this.$$d__getRecipientType$p$0) + }; + $h.EmailAddressDetails._createFromEmailUserDictionary$i = function(data) + { + var emailAddressDetailsDictionary = {}; + var displayName = data["Name"]; + var emailAddress = data["UserId"]; + emailAddressDetailsDictionary["name"] = displayName || $h.EmailAddressDetails._emptyString$p; + emailAddressDetailsDictionary["address"] = emailAddress || $h.EmailAddressDetails._emptyString$p; + return new $h.EmailAddressDetails(emailAddressDetailsDictionary) + }; + $h.EmailAddressDetails.prototype = { + _data$p$0: null, + _getEmailAddress$p$0: function() + { + return this._data$p$0["address"] + }, + _getDisplayName$p$0: function() + { + return this._data$p$0["name"] + }, + _getAppointmentResponse$p$0: function() + { + var response = this._data$p$0["appointmentResponse"]; + return response < $h.EmailAddressDetails._responseTypeMap$p["length"] ? $h.EmailAddressDetails._responseTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["None"] + }, + _getRecipientType$p$0: function() + { + var response = this._data$p$0["recipientType"]; + return response < $h.EmailAddressDetails._recipientTypeMap$p["length"] ? $h.EmailAddressDetails._recipientTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["Other"] + } + }; + $h.EmailAddressDetails.prototype.toJSON = function() + { + var result = {}; + result["emailAddress"] = this._getEmailAddress$p$0(); + result["displayName"] = this._getDisplayName$p$0(); + if($h.ScriptHelpers.dictionaryContainsKey(this._data$p$0,"appointmentResponse")) + result["appointmentResponse"] = this._getAppointmentResponse$p$0(); + if($h.ScriptHelpers.dictionaryContainsKey(this._data$p$0,"recipientType")) + result["recipientType"] = this._getRecipientType$p$0(); + return result + }; + $h.Entities = function(data, filteredEntitiesData, timeSent, permissionLevel) + { + this.$$d__createMeetingSuggestion$p$0 = Function.createDelegate(this,this._createMeetingSuggestion$p$0); + this.$$d__getParcelDeliveries$p$0 = Function.createDelegate(this,this._getParcelDeliveries$p$0); + this.$$d__getFlightReservations$p$0 = Function.createDelegate(this,this._getFlightReservations$p$0); + this.$$d__getContacts$p$0 = Function.createDelegate(this,this._getContacts$p$0); + this.$$d__getPhoneNumbers$p$0 = Function.createDelegate(this,this._getPhoneNumbers$p$0); + this.$$d__getUrls$p$0 = Function.createDelegate(this,this._getUrls$p$0); + this.$$d__getEmailAddresses$p$0 = Function.createDelegate(this,this._getEmailAddresses$p$0); + this.$$d__getMeetingSuggestions$p$0 = Function.createDelegate(this,this._getMeetingSuggestions$p$0); + this.$$d__getTaskSuggestions$p$0 = Function.createDelegate(this,this._getTaskSuggestions$p$0); + this.$$d__getAddresses$p$0 = Function.createDelegate(this,this._getAddresses$p$0); + this._data$p$0 = data || {}; + this._filteredData$p$0 = filteredEntitiesData || {}; + this._dateTimeSent$p$0 = timeSent; + $h.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"taskSuggestions",this.$$d__getTaskSuggestions$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"meetingSuggestions",this.$$d__getMeetingSuggestions$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"contacts",this.$$d__getContacts$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"flightReservations",this.$$d__getFlightReservations$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"parcelDeliveries",this.$$d__getParcelDeliveries$p$0); + this._permissionLevel$p$0 = permissionLevel + }; + $h.Entities._getExtractedObjects$i = function(T, data, name, creator, removeDuplicates, stringPropertyName) + { + var results = null; + var extractedObjects = data[name]; + if(!extractedObjects) + return new Array(0); + if(removeDuplicates) + extractedObjects = $h.Entities._removeDuplicate$p(Object,extractedObjects,$h.Entities._entityDictionaryEquals$p,stringPropertyName); + results = new Array(extractedObjects["length"]); + var count = 0; + for(var $$arr_9 = extractedObjects, $$len_A = $$arr_9.length, $$idx_B = 0; $$idx_B < $$len_A; ++$$idx_B) + { + var extractedObject = $$arr_9[$$idx_B]; + if(name === "MeetingSuggestions") + extractedObject["IsLegacyEntityExtraction"] = "IsLegacyEntityExtraction" in data ? data["IsLegacyEntityExtraction"] : true; + if(creator) + results[count++] = creator(extractedObject); + else + results[count++] = extractedObject + } + return results + }; + $h.Entities._getExtractedStringProperty$i = function(data, name, removeDuplicate) + { + var extractedProperties = data[name]; + if(!extractedProperties) + return new Array(0); + if(removeDuplicate) + extractedProperties = $h.Entities._removeDuplicate$p(String,extractedProperties,$h.Entities._stringEquals$p,null); + return extractedProperties + }; + $h.Entities._createContact$p = function(data) + { + return new $h.Contact(data) + }; + $h.Entities._createTaskSuggestion$p = function(data) + { + return new $h.TaskSuggestion(data) + }; + $h.Entities._createPhoneNumber$p = function(data) + { + return new $h.PhoneNumber(data) + }; + $h.Entities._entityDictionaryEquals$p = function(dictionary1, dictionary2, entityPropertyIdentifier) + { + if(dictionary1 === dictionary2) + return true; + if(!dictionary1 || !dictionary2) + return false; + if(dictionary1[entityPropertyIdentifier] === dictionary2[entityPropertyIdentifier]) + return true; + return false + }; + $h.Entities._stringEquals$p = function(string1, string2, entityProperty) + { + return string1 === string2 + }; + $h.Entities._removeDuplicate$p = function(T, array, entityEquals, entityPropertyIdentifier) + { + for(var matchIndex1 = array["length"] - 1; matchIndex1 >= 0; matchIndex1--) + { + var removeMatch = false; + for(var matchIndex2 = matchIndex1 - 1; matchIndex2 >= 0; matchIndex2--) + if(entityEquals(array[matchIndex1],array[matchIndex2],entityPropertyIdentifier)) + { + removeMatch = true; + break + } + if(removeMatch) + Array.removeAt(array,matchIndex1) + } + return array + }; + $h.Entities.prototype = { + _dateTimeSent$p$0: null, + _data$p$0: null, + _filteredData$p$0: null, + _filteredEntitiesCache$p$0: null, + _permissionLevel$p$0: 0, + _taskSuggestions$p$0: null, + _meetingSuggestions$p$0: null, + _phoneNumbers$p$0: null, + _contacts$p$0: null, + _addresses$p$0: null, + _emailAddresses$p$0: null, + _urls$p$0: null, + _flightReservations$p$0: null, + _parcelDeliveries$p$0: null, + _getByType$i$0: function(entityType) + { + if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["MeetingSuggestion"]) + return this._getMeetingSuggestions$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["TaskSuggestion"]) + return this._getTaskSuggestions$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Address"]) + return this._getAddresses$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["PhoneNumber"]) + return this._getPhoneNumbers$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["EmailAddress"]) + return this._getEmailAddresses$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Url"]) + return this._getUrls$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Contact"]) + return this._getContacts$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["FlightReservations"]) + return this._getFlightReservations$p$0(); + else if(entityType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["ParcelDeliveries"]) + return this._getParcelDeliveries$p$0(); + return null + }, + _getFilteredEntitiesByName$i$0: function(name) + { + if(!this._filteredEntitiesCache$p$0) + this._filteredEntitiesCache$p$0 = {}; + if(!$h.ScriptHelpers.dictionaryContainsKey(this._filteredEntitiesCache$p$0,name)) + { + var found = false; + for(var i = 0; i < $h.Entities._allEntityKeys$p["length"]; i++) + { + var entityTypeKey = $h.Entities._allEntityKeys$p[i]; + var perEntityTypeDictionary = this._filteredData$p$0[entityTypeKey]; + if(!perEntityTypeDictionary) + continue; + if($h.ScriptHelpers.dictionaryContainsKey(perEntityTypeDictionary,name)) + { + switch(entityTypeKey) + { + case"EmailAddresses": + case"Urls": + this._filteredEntitiesCache$p$0[name] = $h.Entities._getExtractedStringProperty$i(perEntityTypeDictionary,name); + break; + case"Addresses": + this._filteredEntitiesCache$p$0[name] = $h.Entities._getExtractedStringProperty$i(perEntityTypeDictionary,name,true); + break; + case"PhoneNumbers": + this._filteredEntitiesCache$p$0[name] = $h.Entities._getExtractedObjects$i($h.PhoneNumber,perEntityTypeDictionary,name,$h.Entities._createPhoneNumber$p,false,null); + break; + case"TaskSuggestions": + this._filteredEntitiesCache$p$0[name] = $h.Entities._getExtractedObjects$i($h.TaskSuggestion,perEntityTypeDictionary,name,$h.Entities._createTaskSuggestion$p,true,"TaskString"); + break; + case"MeetingSuggestions": + this._filteredEntitiesCache$p$0[name] = $h.Entities._getExtractedObjects$i($h.MeetingSuggestion,perEntityTypeDictionary,name,this.$$d__createMeetingSuggestion$p$0,true,"MeetingString"); + break; + case"Contacts": + this._filteredEntitiesCache$p$0[name] = $h.Entities._getExtractedObjects$i($h.Contact,perEntityTypeDictionary,name,$h.Entities._createContact$p,true,"ContactString"); + break + } + found = true; + break + } + } + if(!found) + this._filteredEntitiesCache$p$0[name] = null + } + return this._filteredEntitiesCache$p$0[name] + }, + _createMeetingSuggestion$p$0: function(data) + { + return new $h.MeetingSuggestion(data,this._dateTimeSent$p$0) + }, + _getAddresses$p$0: function() + { + if(!this._addresses$p$0) + this._addresses$p$0 = $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses",true); + return this._addresses$p$0 + }, + _getEmailAddresses$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); + if(!this._emailAddresses$p$0) + this._emailAddresses$p$0 = $h.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses",false); + return this._emailAddresses$p$0 + }, + _getUrls$p$0: function() + { + if(!this._urls$p$0) + this._urls$p$0 = $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls",false); + return this._urls$p$0 + }, + _getPhoneNumbers$p$0: function() + { + if(!this._phoneNumbers$p$0) + this._phoneNumbers$p$0 = $h.Entities._getExtractedObjects$i($h.PhoneNumber,this._data$p$0,"PhoneNumbers",$h.Entities._createPhoneNumber$p); + return this._phoneNumbers$p$0 + }, + _getTaskSuggestions$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); + if(!this._taskSuggestions$p$0) + this._taskSuggestions$p$0 = $h.Entities._getExtractedObjects$i($h.TaskSuggestion,this._data$p$0,"TaskSuggestions",$h.Entities._createTaskSuggestion$p,true,"TaskString"); + return this._taskSuggestions$p$0 + }, + _getMeetingSuggestions$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); + if(!this._meetingSuggestions$p$0) + this._meetingSuggestions$p$0 = $h.Entities._getExtractedObjects$i($h.MeetingSuggestion,this._data$p$0,"MeetingSuggestions",this.$$d__createMeetingSuggestion$p$0,true,"MeetingString"); + return this._meetingSuggestions$p$0 + }, + _getContacts$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); + if(!this._contacts$p$0) + this._contacts$p$0 = $h.Entities._getExtractedObjects$i($h.Contact,this._data$p$0,"Contacts",$h.Entities._createContact$p,true,"ContactString"); + return this._contacts$p$0 + }, + _getParcelDeliveries$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); + if(!this._parcelDeliveries$p$0) + this._parcelDeliveries$p$0 = $h.Entities._getExtractedObjects$i(Object,this._data$p$0,"ParcelDeliveries",null); + return this._parcelDeliveries$p$0 + }, + _getFlightReservations$p$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0); + if(!this._flightReservations$p$0) + this._flightReservations$p$0 = $h.Entities._getExtractedObjects$i(Object,this._data$p$0,"FlightReservations",null); + return this._flightReservations$p$0 + } + }; + $h.ReplyConstants = function(){}; + $h.AsyncConstants = function(){}; + window["Office"]["cast"]["item"] = Office.cast.item = function(){}; + window["Office"]["cast"]["item"]["toItemRead"] = function(item) + { + if($h.Item["isInstanceOfType"](item)) + return item; + throw Error.argumentType(); + }; + window["Office"]["cast"]["item"]["toItemCompose"] = function(item) + { + if($h.ComposeItem["isInstanceOfType"](item)) + return item; + throw Error.argumentType(); + }; + window["Office"]["cast"]["item"]["toMessage"] = function(item) + { + return window["Office"]["cast"]["item"]["toMessageRead"](item) + }; + window["Office"]["cast"]["item"]["toMessageRead"] = function(item) + { + if($h.Message["isInstanceOfType"](item)) + return item; + throw Error.argumentType(); + }; + window["Office"]["cast"]["item"]["toMessageCompose"] = function(item) + { + if($h.MessageCompose["isInstanceOfType"](item)) + return item; + throw Error.argumentType(); + }; + window["Office"]["cast"]["item"]["toMeetingRequest"] = function(item) + { + if($h.MeetingRequest["isInstanceOfType"](item)) + return item; + throw Error.argumentType(); + }; + window["Office"]["cast"]["item"]["toAppointment"] = function(item) + { + return window["Office"]["cast"]["item"]["toAppointmentRead"](item) + }; + window["Office"]["cast"]["item"]["toAppointmentRead"] = function(item) + { + if($h.Appointment["isInstanceOfType"](item)) + return item; + throw Error.argumentType(); + }; + window["Office"]["cast"]["item"]["toAppointmentCompose"] = function(item) + { + if($h.AppointmentCompose["isInstanceOfType"](item)) + return item; + throw Error.argumentType(); + }; + $h.Item = function(data) + { + this.$$d__getBody$p$1 = Function.createDelegate(this,this._getBody$p$1); + this.$$d__getAttachments$p$1 = Function.createDelegate(this,this._getAttachments$p$1); + this.$$d__getItemClass$p$1 = Function.createDelegate(this,this._getItemClass$p$1); + this.$$d__getItemId$p$1 = Function.createDelegate(this,this._getItemId$p$1); + this.$$d__getDateTimeModified$p$1 = Function.createDelegate(this,this._getDateTimeModified$p$1); + this.$$d__getDateTimeCreated$p$1 = Function.createDelegate(this,this._getDateTimeCreated$p$1); + $h.Item["initializeBase"](this,[data]); + $h.InitialData._defineReadOnlyProperty$i(this,"dateTimeCreated",this.$$d__getDateTimeCreated$p$1); + $h.InitialData._defineReadOnlyProperty$i(this,"dateTimeModified",this.$$d__getDateTimeModified$p$1); + $h.InitialData._defineReadOnlyProperty$i(this,"itemId",this.$$d__getItemId$p$1); + $h.InitialData._defineReadOnlyProperty$i(this,"itemClass",this.$$d__getItemClass$p$1); + $h.InitialData._defineReadOnlyProperty$i(this,"attachments",this.$$d__getAttachments$p$1); + $h.InitialData._defineReadOnlyProperty$i(this,"body",this.$$d__getBody$p$1) + }; + $h.Item.prototype = { + _body$p$1: null, + _getItemId$p$1: function() + { + return this._data$p$0.get__itemId$i$0() + }, + _getItemClass$p$1: function() + { + return this._data$p$0.get__itemClass$i$0() + }, + _getDateTimeCreated$p$1: function() + { + return this._data$p$0.get__dateTimeCreated$i$0() + }, + _getDateTimeModified$p$1: function() + { + return this._data$p$0.get__dateTimeModified$i$0() + }, + _getAttachments$p$1: function() + { + return this._data$p$0.get__attachments$i$0() + }, + _getBody$p$1: function() + { + if(!this._body$p$1) + this._body$p$1 = new $h.Body; + return this._body$p$1 + }, + _validateDestinationFolder$p$1: function(destinationFolder) + { + if(destinationFolder !== window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["Folder"]["Inbox"] && destinationFolder !== window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["Folder"]["Junk"] && destinationFolder !== window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["Folder"]["DeletedItems"]) + throw Error.argument("destinationFolder"); + } + }; + $h.Item.prototype.move = function(destinationFolder) + { + var args = []; + for(var $$pai_4 = 1; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4 - 1] = arguments[$$pai_4]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(3,"item.move"); + this._validateDestinationFolder$p$1(destinationFolder); + var commonParameters = $h.CommonParameters.parse(args,false); + var dataToHost = {destinationFolder: destinationFolder}; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(101,dataToHost,null,null,commonParameters._callback$p$0) + }; + $h.ItemBase = function(data) + { + this.$$d__createCustomProperties$i$0 = Function.createDelegate(this,this._createCustomProperties$i$0); + this.$$d__getNotificationMessages$p$0 = Function.createDelegate(this,this._getNotificationMessages$p$0); + this.$$d_getItemType = Function.createDelegate(this,this.getItemType); + this._data$p$0 = data; + $h.InitialData._defineReadOnlyProperty$i(this,"itemType",this.$$d_getItemType); + $h.InitialData._defineReadOnlyProperty$i(this,"notificationMessages",this.$$d__getNotificationMessages$p$0) + }; + $h.ItemBase.prototype = { + _data$p$0: null, + _notificationMessages$p$0: null, + get_data: function() + { + return this._data$p$0 + }, + _createCustomProperties$i$0: function(data) + { + return new $h.CustomProperties(data) + }, + _getNotificationMessages$p$0: function() + { + if(!this._notificationMessages$p$0) + this._notificationMessages$p$0 = new $h.NotificationMessages; + return this._notificationMessages$p$0 + } + }; + $h.ItemBase.prototype.loadCustomPropertiesAsync = function() + { + var args = []; + for(var $$pai_3 = 0; $$pai_3 < arguments["length"]; ++$$pai_3) + args[$$pai_3] = arguments[$$pai_3]; + var parameters = $h.CommonParameters.parse(args,true,true); + var loadCustomProperties = new $h._loadDictionaryRequest(this.$$d__createCustomProperties$i$0,"customProperties",parameters._callback$p$0,parameters._asyncContext$p$0); + loadCustomProperties._sendRequest$i$0(3,"LoadCustomProperties",{}) + }; + $h.ItemBase.prototype.getInitializationContextAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"item.getInitializationContextAsync"); + var parameters = $h.CommonParameters.parse(args,true); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(99,null,null,parameters._asyncContext$p$0,parameters._callback$p$0) + }; + $h.MeetingRequest = function(data) + { + this.$$d__getRequiredAttendees$p$3 = Function.createDelegate(this,this._getRequiredAttendees$p$3); + this.$$d__getOptionalAttendees$p$3 = Function.createDelegate(this,this._getOptionalAttendees$p$3); + this.$$d__getLocation$p$3 = Function.createDelegate(this,this._getLocation$p$3); + this.$$d__getEnd$p$3 = Function.createDelegate(this,this._getEnd$p$3); + this.$$d__getStart$p$3 = Function.createDelegate(this,this._getStart$p$3); + $h.MeetingRequest["initializeBase"](this,[data]); + $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$3); + $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$3); + $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$3); + $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$3); + $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$3) + }; + $h.MeetingRequest.prototype = { + _getStart$p$3: function() + { + return this._data$p$0.get__start$i$0() + }, + _getEnd$p$3: function() + { + return this._data$p$0.get__end$i$0() + }, + _getLocation$p$3: function() + { + return this._data$p$0.get__location$i$0() + }, + _getOptionalAttendees$p$3: function() + { + return this._data$p$0.get__cc$i$0() + }, + _getRequiredAttendees$p$3: function() + { + return this._data$p$0.get__to$i$0() + } + }; + $h.MeetingSuggestion = function(data, dateTimeSent) + { + this.$$d__getEndTime$p$0 = Function.createDelegate(this,this._getEndTime$p$0); + this.$$d__getStartTime$p$0 = Function.createDelegate(this,this._getStartTime$p$0); + this.$$d__getSubject$p$0 = Function.createDelegate(this,this._getSubject$p$0); + this.$$d__getLocation$p$0 = Function.createDelegate(this,this._getLocation$p$0); + this.$$d__getAttendees$p$0 = Function.createDelegate(this,this._getAttendees$p$0); + this.$$d__getMeetingString$p$0 = Function.createDelegate(this,this._getMeetingString$p$0); + this._data$p$0 = data; + this._dateTimeSent$p$0 = dateTimeSent; + $h.InitialData._defineReadOnlyProperty$i(this,"meetingString",this.$$d__getMeetingString$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"attendees",this.$$d__getAttendees$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStartTime$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEndTime$p$0) + }; + $h.MeetingSuggestion.prototype = { + _dateTimeSent$p$0: null, + _data$p$0: null, + _attendees$p$0: null, + _getMeetingString$p$0: function() + { + return this._data$p$0["MeetingString"] + }, + _getLocation$p$0: function() + { + return this._data$p$0["Location"] + }, + _getSubject$p$0: function() + { + return this._data$p$0["Subject"] + }, + _isUTC$p$0: function() + { + if(!("IsLegacyEntityExtraction" in this._data$p$0)) + return true; + return this._data$p$0["IsLegacyEntityExtraction"] + }, + _getStartTime$p$0: function() + { + var time = this._createDateTimeFromParameter$p$0("StartTime"); + var resolvedTime = $h.MeetingSuggestionTimeDecoder.resolve(time,this._dateTimeSent$p$0,this._isUTC$p$0()); + if(resolvedTime["getTime"]() !== time["getTime"]()) + return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToUtcClientTime"](window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._dateToDictionary$i$0(resolvedTime)); + return time + }, + _getEndTime$p$0: function() + { + var time = this._createDateTimeFromParameter$p$0("EndTime"); + var resolvedTime = $h.MeetingSuggestionTimeDecoder.resolve(time,this._dateTimeSent$p$0,this._isUTC$p$0()); + if(resolvedTime["getTime"]() !== time["getTime"]()) + return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToUtcClientTime"](window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._dateToDictionary$i$0(resolvedTime)); + return time + }, + _createDateTimeFromParameter$p$0: function(keyName) + { + var dateTimeString = this._data$p$0[keyName]; + if(!dateTimeString) + return null; + return new Date(dateTimeString) + }, + _getAttendees$p$0: function() + { + if(!this._attendees$p$0) + { + var $$t_1 = this; + this._attendees$p$0 = $h.Entities._getExtractedObjects$i($h.EmailAddressDetails,this._data$p$0,"Attendees",function(data) + { + return $h.EmailAddressDetails._createFromEmailUserDictionary$i(data) + }) + } + return this._attendees$p$0 + } + }; + $h.MeetingSuggestionTimeDecoder = function(){}; + $h.MeetingSuggestionTimeDecoder.resolve = function(inTime, sentTime, isUTC) + { + if(!sentTime) + return inTime; + try + { + var tod; + var outDate; + var extractedDate; + var sentDate = new Date(sentTime["getFullYear"](),sentTime["getMonth"](),sentTime["getDate"](),0,0,0,0); + var $$t_8, + $$t_9, + $$t_A; + if(!($$t_A = $h.MeetingSuggestionTimeDecoder._decode$p(inTime,isUTC,$$t_8 = {val: extractedDate},$$t_9 = {val: tod}),extractedDate = $$t_8["val"],tod = $$t_9["val"],$$t_A)) + return inTime; + else + { + if($h._preciseDate["isInstanceOfType"](extractedDate)) + outDate = $h.MeetingSuggestionTimeDecoder._resolvePreciseDate$p(sentDate,extractedDate); + else if($h._relativeDate["isInstanceOfType"](extractedDate)) + outDate = $h.MeetingSuggestionTimeDecoder._resolveRelativeDate$p(sentDate,extractedDate); + else + outDate = sentDate; + if(window["isNaN"](outDate["getTime"]())) + return sentTime; + outDate["setMilliseconds"](outDate["getMilliseconds"]() + tod); + return outDate + } + } + catch($$e_7) + { + return sentTime + } + }; + $h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i = function(value) + { + return null === value || value === undefined + }; + $h.MeetingSuggestionTimeDecoder._resolvePreciseDate$p = function(sentDate, precise) + { + var year = precise._year$i$1; + var month = !precise._month$i$1 ? sentDate["getMonth"]() : precise._month$i$1 - 1; + var day = precise._day$i$1; + if(!day) + return sentDate; + var candidate; + if($h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i(year)) + { + candidate = new Date(sentDate["getFullYear"](),month,day); + if(candidate["getTime"]() < sentDate["getTime"]()) + candidate = new Date(sentDate["getFullYear"]() + 1,month,day) + } + else + candidate = new Date(year < 50 ? 2e3 + year : 1900 + year,month,day); + if(candidate["getMonth"]() !== month) + return sentDate; + return candidate + }; + $h.MeetingSuggestionTimeDecoder._resolveRelativeDate$p = function(sentDate, relative) + { + var date; + switch(relative._unit$i$1) + { + case 0: + date = new Date(sentDate["getFullYear"](),sentDate["getMonth"](),sentDate["getDate"]()); + date["setDate"](date["getDate"]() + relative._offset$i$1); + return date; + case 5: + return $h.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p(sentDate,relative._offset$i$1,relative._tag$i$1); + case 2: + var days = 1; + switch(relative._modifier$i$1) + { + case 1: + break; + case 2: + days = 16; + break; + default: + if(!relative._offset$i$1) + days = sentDate["getDate"](); + break + } + date = new Date(sentDate["getFullYear"](),sentDate["getMonth"](),days); + date["setMonth"](date["getMonth"]() + relative._offset$i$1); + if(date["getTime"]() < sentDate["getTime"]()) + date["setDate"](date["getDate"]() + sentDate["getDate"]() - 1); + return date; + case 1: + date = new Date(sentDate["getFullYear"](),sentDate["getMonth"](),sentDate["getDate"]()); + date["setDate"](sentDate["getDate"]() + 7 * relative._offset$i$1); + if(relative._modifier$i$1 === 1 || !relative._modifier$i$1) + { + date["setDate"](date["getDate"]() + 1 - date["getDay"]()); + if(date["getTime"]() < sentDate["getTime"]()) + return sentDate; + return date + } + else if(relative._modifier$i$1 === 2) + { + date["setDate"](date["getDate"]() + 5 - date["getDay"]()); + return date + } + break; + case 4: + return $h.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p(sentDate,relative); + case 3: + if(relative._offset$i$1 > 0) + return new Date(sentDate["getFullYear"]() + relative._offset$i$1,0,1); + break; + default: + break + } + return sentDate + }; + $h.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p = function(sentDate, offset, tag) + { + if(offset > -5 && offset < 5) + { + var dayOfWeek = (tag + 6) % 7 + 1; + var days = 7 * offset + (dayOfWeek - sentDate["getDay"]()); + sentDate["setDate"](sentDate["getDate"]() + days); + return sentDate + } + else + { + var days = (tag - sentDate["getDay"]()) % 7; + if(days < 0) + days += 7; + sentDate["setDate"](sentDate["getDate"]() + days); + return sentDate + } + }; + $h.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p = function(sentDate, relative) + { + var date; + var firstDay; + var newDate; + date = sentDate; + if(relative._tag$i$1 <= 0 || relative._tag$i$1 > 12 || relative._offset$i$1 <= 0 || relative._offset$i$1 > 5) + return sentDate; + var monthOffset = (12 + relative._tag$i$1 - date["getMonth"]() - 1) % 12; + firstDay = new Date(date["getFullYear"](),date["getMonth"]() + monthOffset,1); + if(relative._modifier$i$1 === 1) + if(relative._offset$i$1 === 1 && firstDay["getDay"]() !== 6 && firstDay["getDay"]()) + return firstDay; + else + { + newDate = new Date(firstDay["getFullYear"](),firstDay["getMonth"](),firstDay["getDate"]()); + newDate["setDate"](newDate["getDate"]() + (7 + (1 - firstDay["getDay"]())) % 7); + if(firstDay["getDay"]() !== 6 && firstDay["getDay"]() && firstDay["getDay"]() !== 1) + newDate["setDate"](newDate["getDate"]() - 7); + newDate["setDate"](newDate["getDate"]() + 7 * (relative._offset$i$1 - 1)); + if(newDate["getMonth"]() + 1 !== relative._tag$i$1) + return sentDate; + return newDate + } + else + { + newDate = new Date(firstDay["getFullYear"](),firstDay["getMonth"](),$h.MeetingSuggestionTimeDecoder._daysInMonth$p(firstDay["getMonth"](),firstDay["getFullYear"]())); + var offset = 1 - newDate["getDay"](); + if(offset > 0) + offset = offset - 7; + newDate["setDate"](newDate["getDate"]() + offset); + newDate["setDate"](newDate["getDate"]() + 7 * (1 - relative._offset$i$1)); + if(newDate["getMonth"]() + 1 !== relative._tag$i$1) + if(firstDay["getDay"]() !== 6 && firstDay["getDay"]()) + return firstDay; + else + return sentDate; + else + return newDate + } + }; + $h.MeetingSuggestionTimeDecoder._decode$p = function(inDate, isUTC, date, time) + { + var DateValueMask = 32767; + date["val"] = null; + time["val"] = 0; + if(!inDate) + return false; + if(isUTC) + time["val"] = $h.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p(inDate); + else + time["val"] = $h.MeetingSuggestionTimeDecoder._getTimeOfDayInMilliseconds$p(inDate); + var inDateAtMidnight = inDate["getTime"]() - time["val"]; + var value = (inDateAtMidnight - $h.MeetingSuggestionTimeDecoder._baseDate$p["getTime"]()) / 864e5; + if(value < 0) + return false; + else if(value >= 262144) + return false; + else + { + var type = value >> 15; + value = value & DateValueMask; + switch(type) + { + case 0: + return $h.MeetingSuggestionTimeDecoder._decodePreciseDate$p(value,date); + case 1: + return $h.MeetingSuggestionTimeDecoder._decodeRelativeDate$p(value,date); + default: + return false + } + } + }; + $h.MeetingSuggestionTimeDecoder._decodePreciseDate$p = function(value, date) + { + var c_SubTypeMask = 7; + var c_MonthMask = 15; + var c_DayMask = 31; + var c_YearMask = 127; + var year = null; + var month = 0; + var day = 0; + date["val"] = null; + var subType = value >> 12 & c_SubTypeMask; + if((subType & 4) === 4) + { + year = value >> 5 & c_YearMask; + if((subType & 2) === 2) + { + if((subType & 1) === 1) + return false; + month = value >> 1 & c_MonthMask + } + } + else + { + if((subType & 2) === 2) + month = value >> 8 & c_MonthMask; + if((subType & 1) === 1) + day = value >> 3 & c_DayMask + } + date["val"] = new $h._preciseDate(day,month,year); + return true + }; + $h.MeetingSuggestionTimeDecoder._decodeRelativeDate$p = function(value, date) + { + var TagMask = 15; + var OffsetMask = 63; + var UnitMask = 7; + var ModifierMask = 3; + var tag = value & TagMask; + value >>= 4; + var offset = $h.MeetingSuggestionTimeDecoder._fromComplement$p(value & OffsetMask,6); + value >>= 6; + var unit = value & UnitMask; + value >>= 3; + var modifier = value & ModifierMask; + try + { + date["val"] = new $h._relativeDate(modifier,offset,unit,tag); + return true + } + catch($$e_A) + { + date["val"] = null; + return false + } + }; + $h.MeetingSuggestionTimeDecoder._fromComplement$p = function(value, n) + { + var signed = 1 << n - 1; + var mask = (1 << n) - 1; + if((value & signed) === signed) + return-((value ^ mask) + 1); + else + return value + }; + $h.MeetingSuggestionTimeDecoder._daysInMonth$p = function(month, year) + { + return 32 - new Date(year,month,32)["getDate"]() + }; + $h.MeetingSuggestionTimeDecoder._getTimeOfDayInMilliseconds$p = function(inputTime) + { + var timeOfDay = 0; + timeOfDay += inputTime["getHours"]() * 3600; + timeOfDay += inputTime["getMinutes"]() * 60; + timeOfDay += inputTime["getSeconds"](); + timeOfDay *= 1e3; + timeOfDay += inputTime["getMilliseconds"](); + return timeOfDay + }; + $h.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p = function(inputTime) + { + var timeOfDay = 0; + timeOfDay += inputTime["getUTCHours"]() * 3600; + timeOfDay += inputTime["getUTCMinutes"]() * 60; + timeOfDay += inputTime["getUTCSeconds"](); + timeOfDay *= 1e3; + timeOfDay += inputTime["getUTCMilliseconds"](); + return timeOfDay + }; + $h._extractedDate = function(){}; + $h._preciseDate = function(day, month, year) + { + $h._preciseDate["initializeBase"](this); + if(day < 0 || day > 31) + throw Error.argumentOutOfRange("day"); + if(month < 0 || month > 12) + throw Error.argumentOutOfRange("month"); + this._day$i$1 = day; + this._month$i$1 = month; + if(!$h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i(year)) + { + if(!month && day) + throw Error.argument("Invalid arguments"); + if(year < 0 || year > 2099) + throw Error.argumentOutOfRange("year"); + this._year$i$1 = year % 100 + } + else if(!this._month$i$1 && !this._day$i$1) + throw Error.argument("Invalid datetime"); + }; + $h._preciseDate.prototype = { + _day$i$1: 0, + _month$i$1: 0, + _year$i$1: null + }; + $h._relativeDate = function(modifier, offset, unit, tag) + { + $h._relativeDate["initializeBase"](this); + if(offset < -32 || offset > 31) + throw Error.argumentOutOfRange("offset"); + if(tag < 0 || tag > 15) + throw Error.argumentOutOfRange("tag"); + if(!unit && offset < 0) + throw Error.argument("unit & offset do not form a valid date"); + this._modifier$i$1 = modifier; + this._offset$i$1 = offset; + this._unit$i$1 = unit; + this._tag$i$1 = tag + }; + $h._relativeDate.prototype = { + _modifier$i$1: 0, + _offset$i$1: 0, + _unit$i$1: 0, + _tag$i$1: 0 + }; + $h.Message = function(dataDictionary) + { + this.$$d__getConversationId$p$2 = Function.createDelegate(this,this._getConversationId$p$2); + this.$$d__getInternetMessageId$p$2 = Function.createDelegate(this,this._getInternetMessageId$p$2); + this.$$d__getCc$p$2 = Function.createDelegate(this,this._getCc$p$2); + this.$$d__getTo$p$2 = Function.createDelegate(this,this._getTo$p$2); + this.$$d__getFrom$p$2 = Function.createDelegate(this,this._getFrom$p$2); + this.$$d__getSender$p$2 = Function.createDelegate(this,this._getSender$p$2); + this.$$d__getNormalizedSubject$p$2 = Function.createDelegate(this,this._getNormalizedSubject$p$2); + this.$$d__getSubject$p$2 = Function.createDelegate(this,this._getSubject$p$2); + $h.Message["initializeBase"](this,[dataDictionary]); + $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"sender",this.$$d__getSender$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"from",this.$$d__getFrom$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"to",this.$$d__getTo$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"cc",this.$$d__getCc$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"internetMessageId",this.$$d__getInternetMessageId$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"conversationId",this.$$d__getConversationId$p$2) + }; + $h.Message.prototype = { + getItemType: function() + { + return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Message"] + }, + _getSubject$p$2: function() + { + return this._data$p$0.get__subject$i$0() + }, + _getNormalizedSubject$p$2: function() + { + return this._data$p$0.get__normalizedSubject$i$0() + }, + _getSender$p$2: function() + { + return this._data$p$0.get__sender$i$0() + }, + _getFrom$p$2: function() + { + return this._data$p$0.get__from$i$0() + }, + _getTo$p$2: function() + { + return this._data$p$0.get__to$i$0() + }, + _getCc$p$2: function() + { + return this._data$p$0.get__cc$i$0() + }, + _getInternetMessageId$p$2: function() + { + return this._data$p$0.get__internetMessageId$i$0() + }, + _getConversationId$p$2: function() + { + return this._data$p$0.get__conversationId$i$0() + } + }; + $h.Message.prototype.getEntities = function() + { + return this._data$p$0._getEntities$i$0() + }; + $h.Message.prototype.getEntitiesByType = function(entityType) + { + return this._data$p$0._getEntitiesByType$i$0(entityType) + }; + $h.Message.prototype.getFilteredEntitiesByName = function(name) + { + return this._data$p$0._getFilteredEntitiesByName$i$0(name) + }; + $h.Message.prototype.getSelectedEntities = function() + { + return this._data$p$0._getSelectedEntities$i$0() + }; + $h.Message.prototype.getRegExMatches = function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches"); + return this._data$p$0._getRegExMatches$i$0() + }; + $h.Message.prototype.getRegExMatchesByName = function(name) + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName"); + return this._data$p$0._getRegExMatchesByName$i$0(name) + }; + $h.Message.prototype.getSelectedRegExMatches = function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedRegExMatches"); + return this._data$p$0._getSelectedRegExMatches$i$0() + }; + $h.Message.prototype.displayReplyForm = function(obj) + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyForm$i$0(obj) + }; + $h.Message.prototype.displayReplyAllForm = function(obj) + { + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyAllForm$i$0(obj) + }; + $h.MessageCompose = function(data) + { + this.$$d__getConversationId$p$2 = Function.createDelegate(this,this._getConversationId$p$2); + this.$$d__getBcc$p$2 = Function.createDelegate(this,this._getBcc$p$2); + this.$$d__getCc$p$2 = Function.createDelegate(this,this._getCc$p$2); + this.$$d__getTo$p$2 = Function.createDelegate(this,this._getTo$p$2); + $h.MessageCompose["initializeBase"](this,[data]); + $h.InitialData._defineReadOnlyProperty$i(this,"to",this.$$d__getTo$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"cc",this.$$d__getCc$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"bcc",this.$$d__getBcc$p$2); + $h.InitialData._defineReadOnlyProperty$i(this,"conversationId",this.$$d__getConversationId$p$2) + }; + $h.MessageCompose.prototype = { + _to$p$2: null, + _cc$p$2: null, + _bcc$p$2: null, + getItemType: function() + { + return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Message"] + }, + _getTo$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._to$p$2) + this._to$p$2 = new $h.ComposeRecipient(0,"to"); + return this._to$p$2 + }, + _getCc$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._cc$p$2) + this._cc$p$2 = new $h.ComposeRecipient(1,"cc"); + return this._cc$p$2 + }, + _getBcc$p$2: function() + { + this._data$p$0._throwOnRestrictedPermissionLevel$i$0(); + if(!this._bcc$p$2) + this._bcc$p$2 = new $h.ComposeRecipient(2,"bcc"); + return this._bcc$p$2 + }, + _getConversationId$p$2: function() + { + return this._data$p$0.get__conversationId$i$0() + } + }; + $h.NotificationMessages = function(){}; + $h.NotificationMessages._mapToHostItemNotificationMessageType$p = function(dataToHost) + { + var notificationType; + var hostItemNotificationMessageType; + notificationType = dataToHost["type"]; + if(notificationType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["ProgressIndicator"]) + hostItemNotificationMessageType = 1; + else if(notificationType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["InformationalMessage"]) + hostItemNotificationMessageType = 0; + else if(notificationType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["ErrorMessage"]) + hostItemNotificationMessageType = 2; + else if(notificationType === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["InsightMessage"]) + hostItemNotificationMessageType = 3; + else + throw Error.argument("type"); + dataToHost["type"] = hostItemNotificationMessageType + }; + $h.NotificationMessages._validateKey$p = function(key) + { + if(!$h.ScriptHelpers.isNonEmptyString(key)) + throw Error.argument("key"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(key.length,0,32,"key") + }; + $h.NotificationMessages._validateDictionary$p = function(dictionary) + { + if(!$h.ScriptHelpers.isNonEmptyString(dictionary["type"])) + throw Error.argument("type"); + if(dictionary["type"] === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["InformationalMessage"]) + { + if(!$h.ScriptHelpers.isNonEmptyString(dictionary["icon"])) + throw Error.argument("icon"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(dictionary["icon"].length,0,32,"icon"); + if($h.ScriptHelpers.isUndefined(dictionary["persistent"])) + throw Error.argument("persistent"); + if(!Boolean["isInstanceOfType"](dictionary["persistent"])) + throw Error.argumentType("persistent",Object["getType"](dictionary["persistent"]),Boolean); + $h.NotificationMessages._verifyActionDefinitionIsNotDefined$p(dictionary) + } + else if(dictionary["type"] === window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["InsightMessage"]) + { + if(!$h.ScriptHelpers.isNonEmptyString(dictionary["icon"])) + throw Error.argument("icon"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(dictionary["icon"].length,0,32,"icon"); + if(!$h.ScriptHelpers.isUndefined(dictionary["persistent"])) + throw Error.argument("persistent"); + if(dictionary["actions"]) + $h.NotificationMessages._validateActionsDefinitionBlob$p(dictionary["actions"],dictionary) + } + else + { + if(!$h.ScriptHelpers.isUndefined(dictionary["icon"])) + throw Error.argument("icon"); + if(!$h.ScriptHelpers.isUndefined(dictionary["persistent"])) + throw Error.argument("persistent"); + $h.NotificationMessages._verifyActionDefinitionIsNotDefined$p(dictionary) + } + if(!$h.ScriptHelpers.isNonEmptyString(dictionary["message"])) + throw Error.argument("message"); + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(dictionary["message"].length,0,150,"message") + }; + $h.NotificationMessages._validateActionsDefinitionBlob$p = function(actionsDefinitionBlob, notificationParametersDictionary) + { + var actionsDefinition = $h.NotificationMessages._extractActionDefinitionDictionary$p(actionsDefinitionBlob); + if(!actionsDefinition) + return; + $h.NotificationMessages._validateActionsDefinitionActionType$p(actionsDefinition,notificationParametersDictionary); + $h.NotificationMessages._validateActionsDefinitionActionText$p(actionsDefinition) + }; + $h.NotificationMessages._verifyActionDefinitionIsNotDefined$p = function(notificationParametersDictionary) + { + if(!$h.ScriptHelpers.isUndefined(notificationParametersDictionary["actions"])) + throw Error.argument("actions",window["_u"]["ExtensibilityStrings"]["l_ActionsDefinitionWrongNotificationMessageError_Text"]); + }; + $h.NotificationMessages._extractActionDefinitionDictionary$p = function(actionsDefinitionBlob) + { + var actionsDefinition = null; + if(Array["isInstanceOfType"](actionsDefinitionBlob)) + { + var dicArray = actionsDefinitionBlob; + if(dicArray["length"] === 1) + actionsDefinition = dicArray[0]; + else if(dicArray["length"] > 1) + throw Error.argument("actions",window["_u"]["ExtensibilityStrings"]["l_ActionsDefinitionMultipleActionsError_Text"]); + } + else + throw Error.argument("actions",String.format(window["_u"]["ExtensibilityStrings"]["l_InvalidParameterValueError_Text"],"actions")); + return actionsDefinition + }; + $h.NotificationMessages._validateActionsDefinitionActionType$p = function(actionsDefinition, notificationParametersDictionary) + { + if(!actionsDefinition["actionType"]) + throw Error.argument("actionType",String.format(window["_u"]["ExtensibilityStrings"]["l_NullOrEmptyParameterError_Text"],"actionType")); + if("showTaskPane" !== actionsDefinition["actionType"]) + throw Error.argument("actionType",window["_u"]["ExtensibilityStrings"]["l_InvalidActionType_Text"]); + else if(!$h.ScriptHelpers.isNonEmptyString(actionsDefinition["commandId"])) + throw Error.argument("commandId",String.format(window["_u"]["ExtensibilityStrings"]["l_InvalidCommandIdError_Text"],"commandId")); + }; + $h.NotificationMessages._validateActionsDefinitionActionText$p = function(actionsDefinition) + { + if(!$h.ScriptHelpers.isNonEmptyString(actionsDefinition["actionText"])) + throw Error.argument("actionText",String.format(window["_u"]["ExtensibilityStrings"]["l_NullOrEmptyParameterError_Text"],"actionText")); + if(actionsDefinition["actionText"].length > 30) + throw Error.argument(window["_u"]["ExtensibilityStrings"]["l_ParameterValueTooLongError_Text"],String.format(window["_u"]["ExtensibilityStrings"]["l_ParameterValueTooLongError_Text"],"actionText",30)); + }; + $h.NotificationMessages.prototype.addAsync = function(key, dictionary) + { + var args = []; + for(var $$pai_5 = 2; $$pai_5 < arguments["length"]; ++$$pai_5) + args[$$pai_5 - 2] = arguments[$$pai_5]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.addAsync"); + var commonParameters = $h.CommonParameters.parse(args,false); + $h.NotificationMessages._validateKey$p(key); + $h.NotificationMessages._validateDictionary$p(dictionary); + var dataToHost = {}; + dataToHost = $h.ScriptHelpers.deepClone(dictionary); + dataToHost["key"] = key; + $h.NotificationMessages._mapToHostItemNotificationMessageType$p(dataToHost); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(33,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.NotificationMessages.prototype.getAllAsync = function() + { + var args = []; + for(var $$pai_2 = 0; $$pai_2 < arguments["length"]; ++$$pai_2) + args[$$pai_2] = arguments[$$pai_2]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.getAllAsync"); + var commonParameters = $h.CommonParameters.parse(args,true); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(34,null,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.NotificationMessages.prototype.replaceAsync = function(key, dictionary) + { + var args = []; + for(var $$pai_5 = 2; $$pai_5 < arguments["length"]; ++$$pai_5) + args[$$pai_5 - 2] = arguments[$$pai_5]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.replaceAsync"); + var commonParameters = $h.CommonParameters.parse(args,false); + $h.NotificationMessages._validateKey$p(key); + $h.NotificationMessages._validateDictionary$p(dictionary); + var dataToHost = {}; + dataToHost = $h.ScriptHelpers.deepClone(dictionary); + dataToHost["key"] = key; + $h.NotificationMessages._mapToHostItemNotificationMessageType$p(dataToHost); + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(35,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.NotificationMessages.prototype.removeAsync = function(key) + { + var args = []; + for(var $$pai_4 = 1; $$pai_4 < arguments["length"]; ++$$pai_4) + args[$$pai_4 - 1] = arguments[$$pai_4]; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.removeAsync"); + var commonParameters = $h.CommonParameters.parse(args,false); + $h.NotificationMessages._validateKey$p(key); + var dataToHost = {key: key}; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(36,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0) + }; + $h.OutlookErrorManager = function(){}; + $h.OutlookErrorManager.getErrorArgs = function(errorCode) + { + if(!$h.OutlookErrorManager._isInitialized$p) + $h.OutlookErrorManager._initialize$p(); + return OSF.DDA.ErrorCodeManager["getErrorArgs"](errorCode) + }; + $h.OutlookErrorManager._initialize$p = function() + { + $h.OutlookErrorManager._addErrorMessage$p(9e3,"AttachmentSizeExceeded",window["_u"]["ExtensibilityStrings"]["l_AttachmentExceededSize_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9001,"NumberOfAttachmentsExceeded",window["_u"]["ExtensibilityStrings"]["l_ExceededMaxNumberOfAttachments_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9002,"InternalFormatError",window["_u"]["ExtensibilityStrings"]["l_InternalFormatError_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9003,"InvalidAttachmentId",window["_u"]["ExtensibilityStrings"]["l_InvalidAttachmentId_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9004,"InvalidAttachmentPath",window["_u"]["ExtensibilityStrings"]["l_InvalidAttachmentPath_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9005,"CannotAddAttachmentBeforeUpgrade",window["_u"]["ExtensibilityStrings"]["l_CannotAddAttachmentBeforeUpgrade_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9006,"AttachmentDeletedBeforeUploadCompletes",window["_u"]["ExtensibilityStrings"]["l_AttachmentDeletedBeforeUploadCompletes_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9007,"AttachmentUploadGeneralFailure",window["_u"]["ExtensibilityStrings"]["l_AttachmentUploadGeneralFailure_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9008,"AttachmentToDeleteDoesNotExist",window["_u"]["ExtensibilityStrings"]["l_DeleteAttachmentDoesNotExist_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9009,"AttachmentDeleteGeneralFailure",window["_u"]["ExtensibilityStrings"]["l_AttachmentDeleteGeneralFailure_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9010,"InvalidEndTime",window["_u"]["ExtensibilityStrings"]["l_InvalidEndTime_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9011,"HtmlSanitizationFailure",window["_u"]["ExtensibilityStrings"]["l_HtmlSanitizationFailure_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9012,"NumberOfRecipientsExceeded",String.format(window["_u"]["ExtensibilityStrings"]["l_NumberOfRecipientsExceeded_Text"],500)); + $h.OutlookErrorManager._addErrorMessage$p(9013,"NoValidRecipientsProvided",window["_u"]["ExtensibilityStrings"]["l_NoValidRecipientsProvided_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9014,"CursorPositionChanged",window["_u"]["ExtensibilityStrings"]["l_CursorPositionChanged_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9016,"InvalidSelection",window["_u"]["ExtensibilityStrings"]["l_InvalidSelection_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9017,"AccessRestricted",""); + $h.OutlookErrorManager._addErrorMessage$p(9018,"GenericTokenError",""); + $h.OutlookErrorManager._addErrorMessage$p(9019,"GenericSettingsError",""); + $h.OutlookErrorManager._addErrorMessage$p(9020,"GenericResponseError",""); + $h.OutlookErrorManager._addErrorMessage$p(9021,"SaveError",window["_u"]["ExtensibilityStrings"]["l_SaveError_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9022,"MessageInDifferentStoreError",window["_u"]["ExtensibilityStrings"]["l_MessageInDifferentStoreError_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9023,"DuplicateNotificationKey",window["_u"]["ExtensibilityStrings"]["l_DuplicateNotificationKey_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9024,"NotificationKeyNotFound",window["_u"]["ExtensibilityStrings"]["l_NotificationKeyNotFound_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9025,"NumberOfNotificationsExceeded",window["_u"]["ExtensibilityStrings"]["l_NumberOfNotificationsExceeded_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9026,"PersistedNotificationArrayReadError",window["_u"]["ExtensibilityStrings"]["l_PersistedNotificationArrayReadError_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9027,"PersistedNotificationArraySaveError",window["_u"]["ExtensibilityStrings"]["l_PersistedNotificationArraySaveError_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9028,"CannotPersistPropertyInUnsavedDraftError",window["_u"]["ExtensibilityStrings"]["l_CannotPersistPropertyInUnsavedDraftError_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9029,"CanOnlyGetTokenForSavedItem",window["_u"]["ExtensibilityStrings"]["l_CallSaveAsyncBeforeToken_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9030,"APICallFailedDueToItemChange",window["_u"]["ExtensibilityStrings"]["l_APICallFailedDueToItemChange_Text"]); + $h.OutlookErrorManager._addErrorMessage$p(9031,"InvalidParameterValueError",window["_u"]["ExtensibilityStrings"]["l_InvalidParameterValueError_Text"]); + $h.OutlookErrorManager._isInitialized$p = true + }; + $h.OutlookErrorManager._addErrorMessage$p = function(errorCode, errorName, errorMessage) + { + OSF.DDA.ErrorCodeManager["addErrorMessage"](errorCode,{ + name: errorName, + message: errorMessage + }) + }; + $h.OutlookErrorManager.OutlookErrorCodes = function(){}; + $h.OutlookErrorManager.OsfDdaErrorCodes = function(){}; + $h.PhoneNumber = function(data) + { + this.$$d__getPhoneType$p$0 = Function.createDelegate(this,this._getPhoneType$p$0); + this.$$d__getOriginalPhoneString$p$0 = Function.createDelegate(this,this._getOriginalPhoneString$p$0); + this.$$d__getPhoneString$p$0 = Function.createDelegate(this,this._getPhoneString$p$0); + this._data$p$0 = data; + $h.InitialData._defineReadOnlyProperty$i(this,"phoneString",this.$$d__getPhoneString$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"originalPhoneString",this.$$d__getOriginalPhoneString$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"type",this.$$d__getPhoneType$p$0) + }; + $h.PhoneNumber.prototype = { + _data$p$0: null, + _getPhoneString$p$0: function() + { + return this._data$p$0["PhoneString"] + }, + _getOriginalPhoneString$p$0: function() + { + return this._data$p$0["OriginalPhoneString"] + }, + _getPhoneType$p$0: function() + { + return this._data$p$0["Type"] + } + }; + $h.TaskSuggestion = function(data) + { + this.$$d__getAssignees$p$0 = Function.createDelegate(this,this._getAssignees$p$0); + this.$$d__getTaskString$p$0 = Function.createDelegate(this,this._getTaskString$p$0); + this._data$p$0 = data; + $h.InitialData._defineReadOnlyProperty$i(this,"taskString",this.$$d__getTaskString$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"assignees",this.$$d__getAssignees$p$0) + }; + $h.TaskSuggestion.prototype = { + _data$p$0: null, + _assignees$p$0: null, + _getTaskString$p$0: function() + { + return this._data$p$0["TaskString"] + }, + _getAssignees$p$0: function() + { + if(!this._assignees$p$0) + { + var $$t_1 = this; + this._assignees$p$0 = $h.Entities._getExtractedObjects$i($h.EmailAddressDetails,this._data$p$0,"Assignees",function(data) + { + return $h.EmailAddressDetails._createFromEmailUserDictionary$i(data) + }) + } + return this._assignees$p$0 + } + }; + $h.UserProfile = function(data) + { + this.$$d__getCapabilities$p$0 = Function.createDelegate(this,this._getCapabilities$p$0); + this.$$d__getUserProfileType$p$0 = Function.createDelegate(this,this._getUserProfileType$p$0); + this.$$d__getTimeZone$p$0 = Function.createDelegate(this,this._getTimeZone$p$0); + this.$$d__getEmailAddress$p$0 = Function.createDelegate(this,this._getEmailAddress$p$0); + this.$$d__getDisplayName$p$0 = Function.createDelegate(this,this._getDisplayName$p$0); + this._data$p$0 = data; + $h.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"timeZone",this.$$d__getTimeZone$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"type",this.$$d__getUserProfileType$p$0); + $h.InitialData._defineReadOnlyProperty$i(this,"capabilities",this.$$d__getCapabilities$p$0) + }; + $h.UserProfile.prototype = { + _data$p$0: null, + _getCapabilities$p$0: function() + { + return this._data$p$0.get__userProfileCapabilities$i$0() || {} + }, + _getUserProfileType$p$0: function() + { + return this._data$p$0.get__userProfileType$i$0() + }, + _getDisplayName$p$0: function() + { + return this._data$p$0.get__userDisplayName$i$0() + }, + _getEmailAddress$p$0: function() + { + return this._data$p$0.get__userEmailAddress$i$0() + }, + _getTimeZone$p$0: function() + { + return this._data$p$0.get__userTimeZone$i$0() + } + }; + $h.OutlookDispid = function(){}; + $h.OutlookDispid.prototype = { + owaOnlyMethod: 0, + getInitialData: 1, + getUserIdentityToken: 2, + loadCustomProperties: 3, + saveCustomProperties: 4, + ewsRequest: 5, + displayNewAppointmentForm: 7, + displayMessageForm: 8, + displayAppointmentForm: 9, + displayReplyForm: 10, + displayReplyAllForm: 11, + getCallbackToken: 12, + bodySetSelectedDataAsync: 13, + getBodyTypeAsync: 14, + getRecipientsAsync: 15, + addFileAttachmentAsync: 16, + setSubjectAsync: 17, + getSubjectAsync: 18, + addItemAttachmentAsync: 19, + removeAttachmentAsync: 20, + setRecipientsAsync: 21, + addRecipientsAsync: 22, + bodyPrependAsync: 23, + getTimeAsync: 24, + setTimeAsync: 25, + getLocationAsync: 26, + setLocationAsync: 27, + getSelectedDataAsync: 28, + setSelectedDataAsync: 29, + displayReplyFormWithAttachments: 30, + displayReplyAllFormWithAttachments: 31, + saveAsync: 32, + addNotficationMessageAsync: 33, + getAllNotficationMessagesAsync: 34, + replaceNotficationMessageAsync: 35, + removeNotficationMessageAsync: 36, + getBodyAsync: 37, + setBodyAsync: 38, + appCommands1: 39, + registerConsentAsync: 40, + close: 41, + closeApp: 42, + displayPersonaCardAsync: 43, + displayNewMessageForm: 44, + navigateToModuleAsync: 45, + eventCompleted: 94, + closeContainer: 97, + getInitializationContextAsync: 99, + moveToFolder: 101, + appendOnSendAsync: 100, + messageParent: 144, + trackCtq: 400, + recordTrace: 401, + recordDataPoint: 402, + windowOpenOverrideHandler: 403, + saveSettingsRequest: 404 + }; + $h.OutlookDispid["registerEnum"]("$h.OutlookDispid",false); + $h.RequestState = function(){}; + $h.RequestState.prototype = { + unsent: 0, + opened: 1, + headersReceived: 2, + loading: 3, + done: 4 + }; + $h.RequestState["registerEnum"]("$h.RequestState",false); + $h.CommonParameters = function(options, callback, asyncContext) + { + this._options$p$0 = options; + this._callback$p$0 = callback; + this._asyncContext$p$0 = asyncContext + }; + $h.CommonParameters.parse = function(args, isCallbackRequired, tryLegacy) + { + var legacyParameters; + var $$t_8, + $$t_9; + if(tryLegacy && ($$t_9 = $h.CommonParameters._tryParseLegacy$p(args,$$t_8 = {val: legacyParameters}),legacyParameters = $$t_8["val"],$$t_9)) + return legacyParameters; + var argsLength = args["length"]; + var options = null; + var callback = null; + var asyncContext = null; + if(argsLength === 1) + if($h.CommonParameters._argIsFunction$p(args[0])) + callback = args[0]; + else if(Object["isInstanceOfType"](args[0])) + options = args[0]; + else + throw Error.argumentType(); + else if(argsLength === 2) + { + if(!Object["isInstanceOfType"](args[0])) + throw Error.argument("options"); + if(!$h.CommonParameters._argIsFunction$p(args[1])) + throw Error.argument("callback"); + options = args[0]; + callback = args[1] + } + else if(argsLength) + throw Error.parameterCount(window["_u"]["ExtensibilityStrings"]["l_ParametersNotAsExpected_Text"]); + if(isCallbackRequired && !callback) + throw Error.argumentNull("callback"); + if(options && !$h.ScriptHelpers.isNullOrUndefined(options["asyncContext"])) + asyncContext = options["asyncContext"]; + return new $h.CommonParameters(options,callback,asyncContext) + }; + $h.CommonParameters._tryParseLegacy$p = function(args, commonParameters) + { + commonParameters["val"] = null; + var argsLength = args["length"]; + var callback = null; + var userContext = null; + if(!argsLength || argsLength > 2) + return false; + if(!$h.CommonParameters._argIsFunction$p(args[0])) + return false; + callback = args[0]; + if(argsLength > 1) + userContext = args[1]; + commonParameters["val"] = new $h.CommonParameters(null,callback,userContext); + return true + }; + $h.CommonParameters._argIsFunction$p = function(arg) + { + return typeof arg === "function" + }; + $h.CommonParameters.prototype = { + _options$p$0: null, + _callback$p$0: null, + _asyncContext$p$0: null, + get_options: function() + { + return this._options$p$0 + }, + get_callback: function() + { + return this._callback$p$0 + }, + get_asyncContext: function() + { + return this._asyncContext$p$0 + } + }; + $h.EwsRequest = function(userContext) + { + $h.EwsRequest["initializeBase"](this,[userContext]) + }; + $h.EwsRequest.prototype = { + readyState: 1, + status: 0, + statusText: null, + onreadystatechange: null, + responseText: null, + get__statusCode$i$1: function() + { + return this.status + }, + set__statusCode$i$1: function(value) + { + this.status = value; + return value + }, + get__statusDescription$i$1: function() + { + return this.statusText + }, + set__statusDescription$i$1: function(value) + { + this.statusText = value; + return value + }, + get__requestState$i$1: function() + { + return this.readyState + }, + set__requestState$i$1: function(value) + { + this.readyState = value; + return value + }, + get_hasOnReadyStateChangeCallback: function() + { + return!$h.ScriptHelpers.isNullOrUndefined(this.onreadystatechange) + }, + get__response$i$1: function() + { + return this.responseText + }, + set__response$i$1: function(value) + { + this.responseText = value; + return value + }, + send: function(data) + { + this._checkSendConditions$i$1(); + if($h.ScriptHelpers.isNullOrUndefined(data)) + this._throwInvalidStateException$i$1(); + this._sendRequest$i$0(5,"EwsRequest",{body: data}) + }, + _callOnReadyStateChangeCallback$i$1: function() + { + if(!$h.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)) + this.onreadystatechange() + }, + _parseExtraResponseData$i$1: function(response){}, + executeExtraFailedResponseSteps: function(){} + }; + $h.InitialData = function(data) + { + this._data$p$0 = data; + this._permissionLevel$p$0 = this._calculatePermissionLevel$p$0() + }; + $h.InitialData._defineReadOnlyProperty$i = function(o, methodName, getter) + { + var propertyDescriptor = { + get: getter, + configurable: false + }; + window["Object"]["defineProperty"](o,methodName,propertyDescriptor) + }; + $h.InitialData.prototype = { + _toRecipients$p$0: null, + _ccRecipients$p$0: null, + _attachments$p$0: null, + _resources$p$0: null, + _entities$p$0: null, + _selectedEntities$p$0: null, + _data$p$0: null, + _permissionLevel$p$0: 0, + get__isRestIdSupported$i$0: function() + { + return this._data$p$0["isRestIdSupported"] + }, + get__itemId$i$0: function() + { + return this._data$p$0["id"] + }, + get__itemClass$i$0: function() + { + return this._data$p$0["itemClass"] + }, + get__dateTimeCreated$i$0: function() + { + return new Date(this._data$p$0["dateTimeCreated"]) + }, + get__dateTimeModified$i$0: function() + { + return new Date(this._data$p$0["dateTimeModified"]) + }, + get__dateTimeSent$i$0: function() + { + return new Date(this._data$p$0["dateTimeSent"]) + }, + get__subject$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + return this._data$p$0["subject"] + }, + get__normalizedSubject$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + return this._data$p$0["normalizedSubject"] + }, + get__internetMessageId$i$0: function() + { + return this._data$p$0["internetMessageId"] + }, + get__conversationId$i$0: function() + { + return this._data$p$0["conversationId"] + }, + get__sender$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + var sender = this._data$p$0["sender"]; + return $h.ScriptHelpers.isNullOrUndefined(sender) ? null : new $h.EmailAddressDetails(sender) + }, + get__from$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + var from = this._data$p$0["from"]; + return $h.ScriptHelpers.isNullOrUndefined(from) ? null : new $h.EmailAddressDetails(from) + }, + get__to$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + if(null === this._toRecipients$p$0) + this._toRecipients$p$0 = this._createEmailAddressDetails$p$0("to"); + return this._toRecipients$p$0 + }, + get__cc$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + if(null === this._ccRecipients$p$0) + this._ccRecipients$p$0 = this._createEmailAddressDetails$p$0("cc"); + return this._ccRecipients$p$0 + }, + get__attachments$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + if(null === this._attachments$p$0) + this._attachments$p$0 = this._createAttachmentDetails$p$0(); + return this._attachments$p$0 + }, + get__ewsUrl$i$0: function() + { + return this._data$p$0["ewsUrl"] + }, + get__restUrl$i$0: function() + { + return this._data$p$0["restUrl"] + }, + get__marketplaceAssetId$i$0: function() + { + return this._data$p$0["marketplaceAssetId"] + }, + get__extensionId$i$0: function() + { + return this._data$p$0["extensionId"] + }, + get__marketplaceContentMarket$i$0: function() + { + return this._data$p$0["marketplaceContentMarket"] + }, + get__consentMetadata$i$0: function() + { + return this._data$p$0["consentMetadata"] + }, + get__isRead$i$0: function() + { + return this._data$p$0["isRead"] + }, + get__endNodeUrl$i$0: function() + { + return this._data$p$0["endNodeUrl"] + }, + get__entryPointUrl$i$0: function() + { + return this._data$p$0["entryPointUrl"] + }, + get__start$i$0: function() + { + return new Date(this._data$p$0["start"]) + }, + get__end$i$0: function() + { + return new Date(this._data$p$0["end"]) + }, + get__location$i$0: function() + { + return this._data$p$0["location"] + }, + get__userProfileType$i$0: function() + { + return this._data$p$0["userProfileType"] + }, + get__resources$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + if(null === this._resources$p$0) + this._resources$p$0 = this._createEmailAddressDetails$p$0("resources"); + return this._resources$p$0 + }, + get__organizer$i$0: function() + { + this._throwOnRestrictedPermissionLevel$i$0(); + var organizer = this._data$p$0["organizer"]; + return $h.ScriptHelpers.isNullOrUndefined(organizer) ? null : new $h.EmailAddressDetails(organizer) + }, + get__userProfileCapabilities$i$0: function() + { + return this._data$p$0["userProfileCapabilities"] + }, + get__userDisplayName$i$0: function() + { + return this._data$p$0["userDisplayName"] + }, + get__userEmailAddress$i$0: function() + { + return this._data$p$0["userEmailAddress"] + }, + get__userTimeZone$i$0: function() + { + return this._data$p$0["userTimeZone"] + }, + get__timeZoneOffsets$i$0: function() + { + return this._data$p$0["timeZoneOffsets"] + }, + get__hostVersion$i$0: function() + { + return this._data$p$0["hostVersion"] + }, + get__owaView$i$0: function() + { + return this._data$p$0["owaView"] + }, + get__overrideWindowOpen$i$0: function() + { + return this._data$p$0["overrideWindowOpen"] + }, + _getEntities$i$0: function() + { + if(!this._entities$p$0) + this._entities$p$0 = new $h.Entities(this._data$p$0["entities"],this._data$p$0["filteredEntities"],this.get__dateTimeSent$i$0(),this._permissionLevel$p$0); + return this._entities$p$0 + }, + _getSelectedEntities$i$0: function() + { + if(!this._selectedEntities$p$0) + this._selectedEntities$p$0 = new $h.Entities(this._data$p$0["selectedEntities"],null,this.get__dateTimeSent$i$0(),this._permissionLevel$p$0); + return this._selectedEntities$p$0 + }, + _getEntitiesByType$i$0: function(entityType) + { + var entites = this._getEntities$i$0(); + return entites._getByType$i$0(entityType) + }, + _getFilteredEntitiesByName$i$0: function(name) + { + var entities = this._getEntities$i$0(); + return entities._getFilteredEntitiesByName$i$0(name) + }, + _getRegExMatches$i$0: function() + { + if(!this._data$p$0["regExMatches"]) + return null; + return this._data$p$0["regExMatches"] + }, + _getSelectedRegExMatches$i$0: function() + { + if(!this._data$p$0["selectedRegExMatches"]) + return null; + return this._data$p$0["selectedRegExMatches"] + }, + _getRegExMatchesByName$i$0: function(regexName) + { + var regexMatches = this._getRegExMatches$i$0(); + if(!regexMatches || !regexMatches[regexName]) + return null; + return regexMatches[regexName] + }, + _throwOnRestrictedPermissionLevel$i$0: function() + { + window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0) + }, + _createEmailAddressDetails$p$0: function(key) + { + var to = this._data$p$0[key]; + if($h.ScriptHelpers.isNullOrUndefined(to)) + return[]; + var recipients = []; + for(var i = 0; i < to["length"]; i++) + if(!$h.ScriptHelpers.isNullOrUndefined(to[i])) + recipients[i] = new $h.EmailAddressDetails(to[i]); + return recipients + }, + _createAttachmentDetails$p$0: function() + { + var attachments = this._data$p$0["attachments"]; + if($h.ScriptHelpers.isNullOrUndefined(attachments)) + return[]; + var attachmentDetails = []; + for(var i = 0; i < attachments["length"]; i++) + if(!$h.ScriptHelpers.isNullOrUndefined(attachments[i])) + attachmentDetails[i] = new $h.AttachmentDetails(attachments[i]); + return attachmentDetails + }, + _calculatePermissionLevel$p$0: function() + { + var HostReadItem = 1; + var HostReadWriteMailbox = 2; + var HostReadWriteItem = 3; + var permissionLevelFromHost = this._data$p$0["permissionLevel"]; + if($h.ScriptHelpers.isUndefined(this._permissionLevel$p$0)) + return 0; + switch(permissionLevelFromHost) + { + case HostReadItem: + return 1; + case HostReadWriteItem: + return 2; + case HostReadWriteMailbox: + return 3; + default: + return 0 + } + } + }; + $h._loadDictionaryRequest = function(createResultObject, dictionaryName, callback, userContext) + { + $h._loadDictionaryRequest["initializeBase"](this,[userContext]); + this._createResultObject$p$1 = createResultObject; + this._dictionaryName$p$1 = dictionaryName; + this._callback$p$1 = callback + }; + $h._loadDictionaryRequest.prototype = { + _dictionaryName$p$1: null, + _createResultObject$p$1: null, + _callback$p$1: null, + handleResponse: function(response) + { + if(response["wasSuccessful"]) + { + var value = response[this._dictionaryName$p$1]; + var responseData = window["JSON"]["parse"](value); + this.createAsyncResult(this._createResultObject$p$1(responseData),0,0,null) + } + else + this.createAsyncResult(null,1,9020,response["errorMessage"]); + this._callback$p$1(this._asyncResult$p$0) + } + }; + $h.ProxyRequestBase = function(userContext) + { + $h.ProxyRequestBase["initializeBase"](this,[userContext]) + }; + $h.ProxyRequestBase.prototype = { + handleResponse: function(response) + { + if(!response["wasProxySuccessful"]) + { + this.set__statusCode$i$1(500); + this.set__statusDescription$i$1("Error"); + var errorMessage = response["errorMessage"]; + this.set__response$i$1(errorMessage); + this.createAsyncResult(null,1,9020,errorMessage) + } + else + { + this.set__statusCode$i$1(response["statusCode"]); + this.set__statusDescription$i$1(response["statusDescription"]); + this.set__response$i$1(response["body"]); + this.createAsyncResult(this.get__response$i$1(),0,0,null) + } + this._parseExtraResponseData$i$1(response); + this._cycleReadyStateFromHeadersReceivedToLoadingToDone$i$1() + }, + _throwInvalidStateException$i$1: function() + { + throw Error.create("DOMException",{ + code: 11, + message: "INVALID_STATE_ERR" + }); + }, + _cycleReadyStateFromHeadersReceivedToLoadingToDone$i$1: function() + { + var $$t_0 = this; + this._changeReadyState$i$1(2,function() + { + $$t_0._changeReadyState$i$1(3,function() + { + $$t_0._changeReadyState$i$1(4,null) + }) + }) + }, + _changeReadyState$i$1: function(state, nextStep) + { + this.set__requestState$i$1(state); + var $$t_2 = this; + window.setTimeout(function() + { + try + { + $$t_2._callOnReadyStateChangeCallback$i$1() + } + finally + { + if(!$h.ScriptHelpers.isNullOrUndefined(nextStep)) + nextStep() + } + },0) + }, + _checkSendConditions$i$1: function() + { + if(this.get__requestState$i$1() !== 1) + this._throwInvalidStateException$i$1(); + if(this._isSent$p$0) + this._throwInvalidStateException$i$1() + } + }; + $h.RequestBase = function(userContext) + { + this._userContext$p$0 = userContext + }; + $h.RequestBase.prototype = { + _isSent$p$0: false, + _asyncResult$p$0: null, + _userContext$p$0: null, + get_asyncResult: function() + { + return this._asyncResult$p$0 + }, + _sendRequest$i$0: function(dispid, methodName, dataToSend) + { + this._isSent$p$0 = true; + var $$t_5 = this; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.invokeHostMethod(dispid,dataToSend,function(resultCode, response) + { + if(resultCode) + $$t_5.createAsyncResult(null,1,9017,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode)); + else + $$t_5.handleResponse(response) + }) + }, + createAsyncResult: function(value, errorCode, detailedErrorCode, errorDescription) + { + this._asyncResult$p$0 = window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(value,errorCode,detailedErrorCode,this._userContext$p$0,errorDescription) + } + }; + $h.SaveDictionaryRequest = function(callback, userContext) + { + $h.SaveDictionaryRequest["initializeBase"](this,[userContext]); + if(!$h.ScriptHelpers.isNullOrUndefined(callback)) + this._callback$p$1 = callback + }; + $h.SaveDictionaryRequest.prototype = { + _callback$p$1: null, + handleResponse: function(response) + { + if(response["wasSuccessful"]) + this.createAsyncResult(null,0,0,null); + else + this.createAsyncResult(null,1,9020,response["errorMessage"]); + if(!$h.ScriptHelpers.isNullOrUndefined(this._callback$p$1)) + this._callback$p$1(this._asyncResult$p$0) + } + }; + $h.ScriptHelpers = function(){}; + $h.ScriptHelpers.isNull = function(value) + { + return null === value + }; + $h.ScriptHelpers.isNullOrUndefined = function(value) + { + return $h.ScriptHelpers.isNull(value) || $h.ScriptHelpers.isUndefined(value) + }; + $h.ScriptHelpers.isUndefined = function(value) + { + return value === undefined + }; + $h.ScriptHelpers.dictionaryContainsKey = function(obj, keyName) + { + return Object["isInstanceOfType"](obj) ? keyName in obj : false + }; + $h.ScriptHelpers.isNonEmptyString = function(value) + { + if(!value) + return false; + return String["isInstanceOfType"](value) + }; + $h.ScriptHelpers.deepClone = function(obj) + { + return window["JSON"]["parse"](window["JSON"]["stringify"](obj)) + }; + $h.ScriptHelpers.isValueTrue = function(value) + { + if(!$h.ScriptHelpers.isNullOrUndefined(value)) + return value["toString"]().toLowerCase() === "true"; + return false + }; + window["OSF"]["DDA"]["OutlookAppOm"]["registerClass"]("OSF.DDA.OutlookAppOm"); + window["OSF"]["DDA"]["Settings"]["registerClass"]("OSF.DDA.Settings"); + $h.AdditionalGlobalParameters["registerClass"]("$h.AdditionalGlobalParameters"); + $h.ItemBase["registerClass"]("$h.ItemBase"); + $h.Item["registerClass"]("$h.Item",$h.ItemBase); + $h.Appointment["registerClass"]("$h.Appointment",$h.Item); + $h.ComposeItem["registerClass"]("$h.ComposeItem",$h.ItemBase); + $h.AppointmentCompose["registerClass"]("$h.AppointmentCompose",$h.ComposeItem); + $h.AttachmentDetails["registerClass"]("$h.AttachmentDetails"); + $h.Body["registerClass"]("$h.Body"); + $h.ComposeBody["registerClass"]("$h.ComposeBody",$h.Body); + $h.ComposeRecipient["registerClass"]("$h.ComposeRecipient"); + $h.ComposeLocation["registerClass"]("$h.ComposeLocation"); + $h.ComposeSubject["registerClass"]("$h.ComposeSubject"); + $h.ComposeTime["registerClass"]("$h.ComposeTime"); + $h.Contact["registerClass"]("$h.Contact"); + $h.CustomProperties["registerClass"]("$h.CustomProperties"); + $h.Diagnostics["registerClass"]("$h.Diagnostics"); + $h.EmailAddressDetails["registerClass"]("$h.EmailAddressDetails"); + $h.Entities["registerClass"]("$h.Entities"); + $h.Message["registerClass"]("$h.Message",$h.Item); + $h.MeetingRequest["registerClass"]("$h.MeetingRequest",$h.Message); + $h.MeetingSuggestion["registerClass"]("$h.MeetingSuggestion"); + $h._extractedDate["registerClass"]("$h._extractedDate"); + $h._preciseDate["registerClass"]("$h._preciseDate",$h._extractedDate); + $h._relativeDate["registerClass"]("$h._relativeDate",$h._extractedDate); + $h.MessageCompose["registerClass"]("$h.MessageCompose",$h.ComposeItem); + $h.NotificationMessages["registerClass"]("$h.NotificationMessages"); + $h.PhoneNumber["registerClass"]("$h.PhoneNumber"); + $h.TaskSuggestion["registerClass"]("$h.TaskSuggestion"); + $h.UserProfile["registerClass"]("$h.UserProfile"); + $h.CommonParameters["registerClass"]("$h.CommonParameters"); + $h.RequestBase["registerClass"]("$h.RequestBase"); + $h.ProxyRequestBase["registerClass"]("$h.ProxyRequestBase",$h.RequestBase); + $h.EwsRequest["registerClass"]("$h.EwsRequest",$h.ProxyRequestBase); + $h.InitialData["registerClass"]("$h.InitialData"); + $h._loadDictionaryRequest["registerClass"]("$h._loadDictionaryRequest",$h.RequestBase); + $h.SaveDictionaryRequest["registerClass"]("$h.SaveDictionaryRequest",$h.RequestBase); + window["OSF"]["DDA"]["OutlookAppOm"].asyncMethodTimeoutKeyName = "__timeout__"; + window["OSF"]["DDA"]["OutlookAppOm"].ewsIdOrEmailParamName = "ewsIdOrEmail"; + window["OSF"]["DDA"]["OutlookAppOm"].moduleParamName = "module"; + window["OSF"]["DDA"]["OutlookAppOm"].queryStringParamName = "queryString"; + window["OSF"]["DDA"]["OutlookAppOm"]._maxRecipients$p = 100; + window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p = 255; + window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength = 32768; + window["OSF"]["DDA"]["OutlookAppOm"]._maxLocationLength$p = 255; + window["OSF"]["DDA"]["OutlookAppOm"]._maxEwsRequestSize$p = 1e6; + window["OSF"]["DDA"]["OutlookAppOm"].executeMethodName = "ExecuteMethod"; + window["OSF"]["DDA"]["OutlookAppOm"].getInitialDataMethodName = "GetInitialData"; + window["OSF"]["DDA"]["OutlookAppOm"].standardInvokeHostMethodErrorCodeKey = "errorCode"; + window["OSF"]["DDA"]["OutlookAppOm"].standardInvokeHostMethodErrorKey = "error"; + window["OSF"]["DDA"]["OutlookAppOm"].outlookAsyncResponseWasSuccessfulKey = "wasSuccessful"; + window["OSF"]["DDA"]["OutlookAppOm"].outlookAsyncResponseErrorMessageKey = "errorMessage"; + window["OSF"]["DDA"]["OutlookAppOm"].itemIdParameterName = "itemId"; + window["OSF"]["DDA"]["OutlookAppOm"].restVersionParameterName = "restVersion"; + window["OSF"]["DDA"]["OutlookAppOm"]._instance$p = null; + $h.AdditionalGlobalParameters.itemNumberKey = "itemNumber"; + $h.AdditionalGlobalParameters.actionsDefinitionKey = "actions"; + $h.AttachmentConstants.maxAttachmentNameLength = 255; + $h.AttachmentConstants.maxUrlLength = 2048; + $h.AttachmentConstants.maxItemIdLength = 200; + $h.AttachmentConstants.maxRemoveIdLength = 200; + $h.AttachmentConstants.attachmentParameterName = "attachments"; + $h.AttachmentConstants.attachmentTypeParameterName = "type"; + $h.AttachmentConstants.attachmentUrlParameterName = "url"; + $h.AttachmentConstants.attachmentItemIdParameterName = "itemId"; + $h.AttachmentConstants.attachmentNameParameterName = "name"; + $h.AttachmentConstants.attachmentIsInlineParameterName = "isInline"; + $h.AttachmentConstants.attachmentTypeFileName = "file"; + $h.AttachmentConstants.attachmentTypeItemName = "item"; + $h.AttachmentDetails._attachmentTypeMap$p = [window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["File"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["Item"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["Cloud"]]; + $h.Body.coercionTypeParameterName = "coercionType"; + $h.ComposeRecipient.displayNameLengthLimit = 255; + $h.ComposeRecipient.maxSmtpLength = 571; + $h.ComposeRecipient.recipientsLimit = 100; + $h.ComposeRecipient.totalRecipientsLimit = 500; + $h.ComposeRecipient.addressParameterName = "address"; + $h.ComposeRecipient.nameParameterName = "name"; + $h.ComposeLocation.locationKey = "location"; + $h.ComposeLocation.maximumLocationLength = 255; + $h.ComposeSubject.maximumSubjectLength = 255; + $h.ComposeTime.timeTypeName = "TimeProperty"; + $h.ComposeTime.timeDataName = "time"; + $h.Diagnostics.outlookAppName = "Outlook"; + $h.Diagnostics.outlookWebAppName = "OutlookWebApp"; + $h.Diagnostics.outlookIOSAppName = "OutlookIOS"; + $h.Diagnostics.outlookAndroidAppName = "OutlookAndroid"; + $h.EmailAddressDetails._emptyString$p = ""; + $h.EmailAddressDetails._responseTypeMap$p = [window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["None"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Organizer"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Tentative"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Accepted"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Declined"]]; + $h.EmailAddressDetails._recipientTypeMap$p = [window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["Other"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["DistributionList"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["User"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["ExternalUser"]]; + $h.Entities._allEntityKeys$p = ["Addresses","EmailAddresses","Urls","PhoneNumbers","TaskSuggestions","MeetingSuggestions","Contacts","FlightReservations","ParcelDeliveries"]; + $h.ReplyConstants.htmlBodyKeyName = "htmlBody"; + $h.AsyncConstants.optionsKeyName = "options"; + $h.AsyncConstants.callbackKeyName = "callback"; + $h.AsyncConstants.asyncResultKeyName = "asyncResult"; + $h.Item.destFolderParameterName = "destinationFolder"; + $h.MeetingSuggestionTimeDecoder._baseDate$p = new Date("0001-01-01T00:00:00Z"); + $h.NotificationMessages.maximumKeyLength = 32; + $h.NotificationMessages.maximumIconLength = 32; + $h.NotificationMessages.maximumMessageLength = 150; + $h.NotificationMessages.maximumActionTextLength = 30; + $h.NotificationMessages.notificationsKeyParameterName = "key"; + $h.NotificationMessages.notificationsTypeParameterName = "type"; + $h.NotificationMessages.notificationsIconParameterName = "icon"; + $h.NotificationMessages.notificationsMessageParameterName = "message"; + $h.NotificationMessages.notificationsPersistentParameterName = "persistent"; + $h.NotificationMessages.notificationsActionsDefinitionParameterName = "actions"; + $h.NotificationMessages.notificationsActionTypeParameterName = "actionType"; + $h.NotificationMessages.notificationsActionTextParameterName = "actionText"; + $h.NotificationMessages.notificationsActionCommandIdParameterName = "commandId"; + $h.NotificationMessages.notificationsActionContextDataParameterName = "contextData"; + $h.NotificationMessages.notificationsActionShowTaskPaneActionId = "showTaskPane"; + $h.OutlookErrorManager.errorNameKey = "name"; + $h.OutlookErrorManager.errorMessageKey = "message"; + $h.OutlookErrorManager._isInitialized$p = false; + $h.OutlookErrorManager.OutlookErrorCodes.attachmentSizeExceeded = 9e3; + $h.OutlookErrorManager.OutlookErrorCodes.numberOfAttachmentsExceeded = 9001; + $h.OutlookErrorManager.OutlookErrorCodes.internalFormatError = 9002; + $h.OutlookErrorManager.OutlookErrorCodes.invalidAttachmentId = 9003; + $h.OutlookErrorManager.OutlookErrorCodes.invalidAttachmentPath = 9004; + $h.OutlookErrorManager.OutlookErrorCodes.cannotAddAttachmentBeforeUpgrade = 9005; + $h.OutlookErrorManager.OutlookErrorCodes.attachmentDeletedBeforeUploadCompletes = 9006; + $h.OutlookErrorManager.OutlookErrorCodes.attachmentUploadGeneralFailure = 9007; + $h.OutlookErrorManager.OutlookErrorCodes.attachmentToDeleteDoesNotExist = 9008; + $h.OutlookErrorManager.OutlookErrorCodes.attachmentDeleteGeneralFailure = 9009; + $h.OutlookErrorManager.OutlookErrorCodes.invalidEndTime = 9010; + $h.OutlookErrorManager.OutlookErrorCodes.htmlSanitizationFailure = 9011; + $h.OutlookErrorManager.OutlookErrorCodes.numberOfRecipientsExceeded = 9012; + $h.OutlookErrorManager.OutlookErrorCodes.noValidRecipientsProvided = 9013; + $h.OutlookErrorManager.OutlookErrorCodes.cursorPositionChanged = 9014; + $h.OutlookErrorManager.OutlookErrorCodes.invalidSelection = 9016; + $h.OutlookErrorManager.OutlookErrorCodes.accessRestricted = 9017; + $h.OutlookErrorManager.OutlookErrorCodes.genericTokenError = 9018; + $h.OutlookErrorManager.OutlookErrorCodes.genericSettingsError = 9019; + $h.OutlookErrorManager.OutlookErrorCodes.genericResponseError = 9020; + $h.OutlookErrorManager.OutlookErrorCodes.saveError = 9021; + $h.OutlookErrorManager.OutlookErrorCodes.messageInDifferentStoreError = 9022; + $h.OutlookErrorManager.OutlookErrorCodes.duplicateNotificationKey = 9023; + $h.OutlookErrorManager.OutlookErrorCodes.notificationKeyNotFound = 9024; + $h.OutlookErrorManager.OutlookErrorCodes.numberOfNotificationsExceeded = 9025; + $h.OutlookErrorManager.OutlookErrorCodes.persistedNotificationArrayReadError = 9026; + $h.OutlookErrorManager.OutlookErrorCodes.persistedNotificationArraySaveError = 9027; + $h.OutlookErrorManager.OutlookErrorCodes.cannotPersistPropertyInUnsavedDraftError = 9028; + $h.OutlookErrorManager.OutlookErrorCodes.callSaveAsyncBeforeToken = 9029; + $h.OutlookErrorManager.OutlookErrorCodes.apiCallFailedDueToItemChange = 9030; + $h.OutlookErrorManager.OutlookErrorCodes.invalidParameterValueError = 9031; + $h.OutlookErrorManager.OutlookErrorCodes.ooeInvalidDataFormat = 2006; + $h.OutlookErrorManager.OsfDdaErrorCodes.ooeCoercionTypeNotSupported = 1e3; + $h.CommonParameters.asyncContextKeyName = "asyncContext"; + $h.InitialData.userProfileTypeKey = "userProfileType"; + $h.ScriptHelpers.emptyString = ""; + OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM); + if(appContext.get_appName() == OSF.AppName.OutlookWebApp || appContext.get_appName() == OSF.AppName.OutlookIOS || appContext.get_appName() == OSF.AppName.OutlookAndroid) + this._settings = this._initializeSettings(appContext,false); + else + this._settings = this._initializeSettings(false); + appContext.appOM = new OSF.DDA.OutlookAppOm(appContext,this._webAppState.wnd,appReady); + if(appContext.get_appName() == OSF.AppName.Outlook || appContext.get_appName() == OSF.AppName.OutlookWebApp || appContext.get_appName() == OSF.AppName.OutlookIOS) + OSF.DDA.DispIdHost.addEventSupport(appContext.appOM,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.ItemChanged])) } - - diff --git a/node_modules/@microsoft/office-js/dist/outlook-win32-16.02.js b/node_modules/@microsoft/office-js/dist/outlook-win32-16.02.js index a7b9e92..884fb8d 100644 --- a/node_modules/@microsoft/office-js/dist/outlook-win32-16.02.js +++ b/node_modules/@microsoft/office-js/dist/outlook-win32-16.02.js @@ -1,18 +1,9 @@ /* Outlook specific API library */ -/* Version: 16.0.7524.3000 */ +/* Version: 16.0.8620.1000 */ /* - Copyright (c) Microsoft Corporation. All rights reserved. + Copyright (c) Microsoft Corporation. All rights reserved. */ - - /* - Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419. + Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419. */ - -/*! -Copyright (c) Microsoft Corporation. All rights reserved. -*/ -/*! -Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419. -*/ -var __extends=this&&this.__extends||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);function r(){this.constructor=n}n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},OfficeExt;(function(n){var t=function(){var n=!0;function t(){}t.prototype.isMsAjaxLoaded=function(){var t="function",i="undefined";return typeof Sys!==i&&typeof Type!==i&&Sys.StringBuilder&&typeof Sys.StringBuilder===t&&Type.registerNamespace&&typeof Type.registerNamespace===t&&Type.registerClass&&typeof Type.registerClass===t&&typeof Function._validateParams===t&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===t?n:!1};t.prototype.loadMsAjaxFull=function(n){var t=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,n)};Object.defineProperty(t.prototype,"msAjaxError",{get:function(){var n=this;n._msAjaxError==null&&n.isMsAjaxLoaded()&&(n._msAjaxError=Error);return n._msAjaxError},set:function(n){this._msAjaxError=n},enumerable:n,configurable:n});Object.defineProperty(t.prototype,"msAjaxString",{get:function(){var n=this;n._msAjaxString==null&&n.isMsAjaxLoaded()&&(n._msAjaxString=String);return n._msAjaxString},set:function(n){this._msAjaxString=n},enumerable:n,configurable:n});Object.defineProperty(t.prototype,"msAjaxDebug",{get:function(){var n=this;n._msAjaxDebug==null&&n.isMsAjaxLoaded()&&(n._msAjaxDebug=Sys.Debug);return n._msAjaxDebug},set:function(n){this._msAjaxDebug=n},enumerable:n,configurable:n});return t}();n.MicrosoftAjaxFactory=t})(OfficeExt||(OfficeExt={}));var OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory,OSF=OSF||{},OfficeExt;(function(n){var t=function(){function n(n){this._internalStorage=n}n.prototype.getItem=function(n){try{return this._internalStorage&&this._internalStorage.getItem(n)}catch(t){return null}};n.prototype.setItem=function(n,t){try{this._internalStorage&&this._internalStorage.setItem(n,t)}catch(i){}};n.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(n){}};n.prototype.removeItem=function(n){try{this._internalStorage&&this._internalStorage.removeItem(n)}catch(t){}};n.prototype.getKeysWithPrefix=function(n){var i=[];try{for(var u=this._internalStorage&&this._internalStorage.length||0,t=0;t0?i.push(t):t.tabIndex===0&&u.push(t):u.push(t)}i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;r===0&&(r=i.indexOf(n)-i.indexOf(t));return r});return[].concat(i,u)}return{set_entropy:function(n){if(typeof n=="string")for(var i=0;i1?c[c.length-1]:n;if(u&&o!=n){o.indexOf(it)>=0&&(o=o.split(it)[0]);o=decodeURIComponent(o)}var l=p();if(!f&&l){var s=window.name.indexOf(i);if(s>r){var h=window.name.indexOf(";",s);h==r&&(h=window.name.length);var a=window.name.substring(s,h);o?l.setItem(a,o):o=l.getItem(a)}}return o},getConversationId:function(){var i=window.location.search,t=n;if(i){var r=i.indexOf("&");t=r>0?i.substring(1,r):i.substr(1);if(t&&t.charAt(t.length-1)==="="){t=t.substring(0,t.length-1);t&&(t=decodeURIComponent(t))}}return t},getInfoItems:function(n){var t=n.split("$");typeof t[1]==h&&(t=n.split("|"));typeof t[1]==h&&(t=n.split("%7C"));return t},getXdmFieldValue:function(n,t){var r="",u=OSF.OUtil.parseXdmInfo(t);if(u){var i=OSF.OUtil.getInfoItems(u);if(i!=undefined&&i.length>=3)switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]);if(u)throw u;for(var f in r){u=Function._validateParameter(n[f],r[f],f);if(u)throw u;}},writeProfilerMark:function(n){if(window.msWriteProfilerMark){window.msWriteProfilerMark(n);OsfMsAjaxFactory.msAjaxDebug.trace(n)}},outputDebug:function(n){typeof OsfMsAjaxFactory!==h&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){r=r||{};for(var e in u){var f=u[e];r[f]==undefined&&(r[f]=i)}Object.defineProperty(n,t,r);return n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[o])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[o])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[tt,o,nt])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[tt,o,nt])},finalizeProperties:function(n,r){r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8;f=e&255;i[t++]=r>>2;i[t++]=(r&3)<<4|u>>4;i[t++]=(u&15)<<2|f>>6;i[t++]=f&63;if(!isNaN(e)){r=e>>8;u=s&255;f=s>>8;i[t++]=r>>2;i[t++]=(r&3)<<4|u>>4;i[t++]=(u&15)<<2|f>>6;i[t++]=f&63}if(isNaN(e))i[t-1]=64;else if(isNaN(s)){i[t-2]=64;i[t-1]=64}for(var h=0;h0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(n){var i=n.constructor();for(var t in n)n.hasOwnProperty(t)&&(i[t]=n[t]);return i},createObject:function(t){var r=n;if(t){r={};for(var u=t.length,i=0;in)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};u=k(u);s=e?u.length-1:0;if(u.length===0)return n;while(!h&&s>=0&&sn)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};u=k(u);v=y(u,e);s=l(u.length,v,o);if(s<0)return n;while(!c&&s>=0&&s0;t++){(t==8||t==12||t==16||t==20)&&(i+="-");i+=n[r%16];r=Math.floor(r/16)}for(;t<32;t++){(t==8||t==12||t==16||t==20)&&(i+="-");i+=n[Math.floor(Math.random()*16)]}return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidActivationStatusChangedEvent:32,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];if(i){i.name||(i.name=n[this.errorCodes.ooeInternalError].name);i.message||(i.message=n[this.errorCodes.ooeInternalError].message)}else i=n[this.errorCodes.ooeInternalError];return i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString}}}}();var OfficeExt;(function(n){var t;(function(n){var t=1.1,r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){if(n==undefined)return!1;t==undefined&&(t=0);var u=this._setMap,i=u._sets;if(i.hasOwnProperty(n.toLowerCase())){var r=i[n.toLowerCase()];return r>0&&r>=t}else return!1};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;var i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;var k=function(n){__extends(i,n);function i(){n.call(this,{dialogapi:t})}return i}(i);n.DefaultDialogSetRequirement=k;var s=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return i}(i);n.ExcelClientDefaultSetRequirement=s;var d=function(n){__extends(i,n);function i(){n.call(this);this._addSetMap({imagecoercion:t})}return i}(s);n.ExcelClientV1DefaultSetRequirement=d;var w=function(n){__extends(t,n);function t(){n.call(this,{mailbox:1.3})}return t}(i);n.OutlookClientDefaultSetRequirement=w;var u=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return i}(i);n.WordClientDefaultSetRequirement=u;var b=function(n){__extends(i,n);function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return i}(u);n.WordClientV1DefaultSetRequirement=b;var e=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return i}(i);n.PowerpointClientDefaultSetRequirement=e;var tt=function(n){__extends(i,n);function i(){n.call(this);this._addSetMap({imagecoercion:t})}return i}(e);n.PowerpointClientV1DefaultSetRequirement=tt;var it=function(n){__extends(i,n);function i(){n.call(this,{selection:t,textcoercion:t})}return i}(i);n.ProjectClientDefaultSetRequirement=it;var g=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return i}(i);n.ExcelWebDefaultSetRequirement=g;var nt=function(n){__extends(i,n);function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return i}(i);n.WordWebDefaultSetRequirement=nt;var p=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,settings:t})}return i}(i);n.PowerpointWebDefaultSetRequirement=p;var o=function(n){__extends(t,n);function t(){n.call(this,{mailbox:1.3})}return t}(i);n.OutlookWebDefaultSetRequirement=o;var c=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return i}(i);n.SwayWebDefaultSetRequirement=c;var h=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return i}(i);n.AccessWebDefaultSetRequirement=h;var y=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return i}(i);n.ExcelIOSDefaultSetRequirement=y;var f=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return i}(i);n.WordIOSDefaultSetRequirement=f;var l=function(n){__extends(t,n);function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return t}(f);n.WordIOSV1DefaultSetRequirement=l;var a=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return i}(i);n.PowerpointIOSDefaultSetRequirement=a;var v=function(n){__extends(i,n);function i(){n.call(this,{mailbox:t})}return i}(i);n.OutlookIOSDefaultSetRequirement=v;var rt=function(){var t="undefined";function n(){}n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)};n.getDefaultRequirementMatrix=function(u){this.initializeDefaultSetMatrix();var f=undefined,o=u.get_requirementMatrix();if(o!=undefined&&o.length>0&&typeof JSON!==t){var s=JSON.parse(u.get_requirementMatrix().toLowerCase());f=new r(new i(s))}else{var e=n.getClientFullVersionString(u);f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[e]!=undefined?new r(n.DefaultSetArrayMatrix[e]):new r(new i({}))}return f};n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix();if(f!=undefined&&f.length>0&&typeof JSON!==t){var e=JSON.parse(n.get_requirementMatrix().toLowerCase());u=new r(new i(e))}else u=new r(new k);return u};n.getClientFullVersionString=function(n){var r=n.get_appMinorVersion(),u="",i="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;if(f&&n.get_appVersion()==1)i=t==4096&&r>=15?"16.00.01":"16.00";else if(n.get_appName()==64)i=n.get_appVersion();else{u=r<10?"0"+r:""+r;i=n.get_appVersion()+"."+u}return n.get_appName()+"-"+i};n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new s;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new d;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new b;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new tt;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new w;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new g;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new nt;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new it;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new h;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new y;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new c;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new f;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new l;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new a;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new v};n.Excel_RCLIENT_1600="1-16.00";n.Excel_RCLIENT_1601="1-16.01";n.Word_RCLIENT_1600="2-16.00";n.Word_RCLIENT_1601="2-16.01";n.PowerPoint_RCLIENT_1600="4-16.00";n.PowerPoint_RCLIENT_1601="4-16.01";n.Outlook_RCLIENT_1600="8-16.00";n.Excel_WAC_1600="16-16.00";n.Word_WAC_1600="32-16.00";n.Outlook_WAC_1600="64-16.00";n.Outlook_WAC_1601="64-16.01";n.Project_RCLIENT_1600="128-16.00";n.Access_WAC_1600="256-16.00";n.PowerPoint_WAC_1600="512-16.00";n.Excel_IOS_1600="1024-16.00";n.SWAY_WAC_1600="2048-16.00";n.Word_IOS_1600="4096-16.00";n.Word_IOS_16001="4096-16.00.01";n.PowerPoint_IOS_1600="8192-16.00";n.Outlook_IOS_1600="65536-16.00";n.DefaultSetArrayMatrix={};return n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))})(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda();Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){if(!n){window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window);window.Office=Microsoft.Office.WebExtension;n=!0}},disableShortcut:function(){if(n){t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window);n=!1}}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i;if(n&&typeof n=="string"){var r=n.indexOf("#");if(r!=-1){var o=n.substring(0,r),e=n.substring(r+1);switch(o){case"binding":case"bindings":e&&(i=new OSF.DDA.BindingPromise(e))}}}if(i){i.onFail=t;return i}else if(t){var u=typeof t;if(u=="function"){var f={};f[Microsoft.Office.WebExtension.Parameters.Callback]=t;OSF.DDA.issueAsyncResult(f,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,u);}};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});if(n.get_isDialog()){var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n);OSF.OUtil.defineEnumerableProperty(f,o,{value:e})}else{t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t});if(r){var s=r.displayName||"appOM";delete r.displayName;OSF.OUtil.defineEnumerableProperty(f,s,{value:r})}u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}});var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n);OSF.OUtil.defineEnumerableProperty(f,o,{value:e})}};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});var u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext());return n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,o=n.length,e=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){for(var u in n){var i=n[u],r=t[u];if(i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw e();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw e();}};f.extractRequiredArguments=function(t,i,r){if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var f,e,l=n.length-1;l>=s;l--){var c=n[l];switch(typeof c){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=c;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=c;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}f=o.fillOptions(f,i,r,u);if(e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;o.verifyArguments(t,f);return f}this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),f=c(n,r,t,i);return o.constructCallArgs(r,f,t,i)};this.processResponse=function(n,t,i,f){var e;e=n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n);return e};this.getCallArgs=function(n){for(var t,u,r=n.length-1;r>=s;r--){var i=n[r];switch(typeof i){case"object":t=i;break;case h:u=i}}t=t||{};u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u);return t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var i=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],t=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],i,t,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback];if(f){var u={};u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext];var r;if(t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)u[OSF.DDA.AsyncResultEnum.Properties.Value]=i;else{r={};i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i;r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i}f(new OSF.DDA.AsyncResult(u,r))}};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){for(var t in n){var i={};OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}});OSF.DDA.SyncMethodNames[t]=i}};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);function o(n,i,r,u){if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var o,c,s=n.length-1;s>=e;s--){var h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}o=f.fillOptions(o,i,r,u);f.verifyArguments(t,o);return o}this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),e=o(n,r,t,i);return f.constructCallArgs(r,e,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){var l="fromHost",i=this,o="toHost",f=l,a="sourceData",u="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];function e(i,u){var a=i?{}:undefined;for(var h in i){var s=i[h],o;if(OSF.DDA.ListType.isListType(h)){o=[];for(var v in s)o.push(e(s[v],u))}else if(OSF.OUtil.listContainsKey(r,h))o=r[h][u](s);else if(u==f&&n.preserveNesting(h))o=e(s,u);else{var c=t[h];if(c){var l=c[u];if(l){o=l[s];o===undefined&&(o=s)}}else o=s}a[h]=o}return a}function c(i,r){var s;for(var f in r){var e;e=n.isComplexType(f)?c(i,t[f][o]):i[f];if(e!=undefined){s||(s={});var h=r[f];h==u&&(h=f);s[h]=n.pack(f,e)}}return s}function s(i,r,e){e||(e={});for(var h in r){var l=r[h],o;if(l==u)o=i;else if(l==a){e[h]=i.toArray();continue}else o=i[l];if(o===null||o===undefined)e[h]=undefined;else{o=n.unpack(h,o);var c;if(n.isComplexType(h)){c=t[h][f];n.preserveNesting(h)?e[h]=s(o,c):s(o,c,e)}else if(OSF.DDA.ListType.isListType(h)){c={};var p=OSF.DDA.ListType.getDescriptor(h);c[p]=u;var v=new Array(o.length);for(var y in o)v[y]=s(o[y],c);e[h]=v}else e[h]=o}}return e}function h(n,i,r){var f=t[n][r],u;if(r=="toHost"){var h=e(i,r);u=c(h,f)}else if(r==l){var o=s(i,f);u=e(o,r)}return u}t||(t={});i.addMapping=function(n,i){var e,s;if(i.map){e=i.map;s={};for(var c in e){var l=e[c];l==u&&(l=c);s[l]=c}}else{e=i.toHost;s=i.fromHost}var r=t[n];if(r){var h=r[o];for(var v in h)e[v]=h[v];h=r[f];for(var a in h)s[a]=h[a]}else r=t[n]={};r[o]=e;r[f]=s};i.toHost=function(n,t){return h(n,t,o)};i.fromHost=function(n,t){return h(n,t,f)};i.self=u;i.sourceData=a;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset);OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]));return OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){var r;r=this.isDynamicType(n)?t[n].toHost(i):i;return r};i.unpack=function(n,i){var r;r=this.isDynamicType(n)?t[n].fromHost(i):i;return r}};OSF.DDA.getDecoratedParameterMap=function(n,t){var i=new OSF.DDA.HostParameterMap(n),f=i.self;function r(n){var i=null;if(n){i={};for(var r=n.length,t=0;t0&&t.push(i)}}}catch(s){}return t}var i=[],n={};n[Microsoft.Office.WebExtension.Parameters.Data]=function(){var i=0,n=1;return{toHost:function(t){if(OSF.DDA.TableDataProperties&&typeof t!="string"&&t[OSF.DDA.TableDataProperties.TableRows]!==undefined){var r=[];r[i]=t[OSF.DDA.TableDataProperties.TableRows];r[n]=t[OSF.DDA.TableDataProperties.TableHeaders];t=r}return t},fromHost:function(r){var f;if(r.toArray){var e=r.dimensions();if(e===2)f=t(r);else{var u=r.toArray();if(u.length===2&&(u[0]!=null&&u[0].toArray||u[1]!=null&&u[1].toArray)){f={};f[OSF.DDA.TableDataProperties.TableRows]=t(u[i]);f[OSF.DDA.TableDataProperties.TableHeaders]=t(u[n])}else f=u}}else f=r;return f}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,i,n);this.unpack=function(t,i){var r;if(this.isComplexType(t)||OSF.DDA.ListType.isListType(t)){var u=(i||typeof i=="unknown")&&i.toArray;r=u?i.toArray():i||{}}else r=this.isDynamicType(t)?n[t].fromHost(i):i;return r}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(n){function i(n){var t=n;if(OSF.OUtil.isArray(n))for(var f=t.length,r=0;r2){u=[];for(var o=1;o=3){f=n[0];e=n[2];var t=OSF.OUtil.parseSerializerVersionWithGivenFragment(!1,OSF._OfficeAppFactory.getWindowLocationHash());isNaN(t)&&OSF._OfficeAppFactory.getWindowName&&(t=OSF.OUtil.parseSerializerVersionFromWindowName(!1,OSF._OfficeAppFactory.getWindowName()));i=Microsoft.Office.Common.XdmCommunicationManager.connect(f,window.parent,e,t)}}var u=null;if(i)try{i.invoke("getCustomizedScriptPathAsync",function(n,t){o(n===0?t:null)},{__timeout__:1e3})}catch(s){OsfMsAjaxFactory.msAjaxDebug.trace("no script override through cross frame communication.")}else{try{window.external&&typeof window.external.getCustomizedScriptPath!="undefined"&&(u=window.external.getCustomizedScriptPath())}catch(s){OsfMsAjaxFactory.msAjaxDebug.trace("no script override through window.external.")}o(u)}},t=!0;t&&!OsfMsAjaxFactory.isMsAjaxLoaded()?OSF._OfficeAppFactory&&OSF._OfficeAppFactory&&OSF._OfficeAppFactory.getLoadScriptHelper&&OSF._OfficeAppFactory.getLoadScriptHelper().isScriptLoading(OSF.ConstantNames.MicrosoftAjaxId)?OSF._OfficeAppFactory.getLoadScriptHelper().waitForScripts([OSF.ConstantNames.MicrosoftAjaxId],n):OsfMsAjaxFactory.loadMsAjaxFull(function(){if(OsfMsAjaxFactory.isMsAjaxLoaded())n();else throw"Not able to load MicrosoftAjax.js.";}):n()})();Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(n){var t=this;t._eventHandlers={};t._queuedEventsArgs={};for(var r in n){var i=n[r];t._eventHandlers[i]=[];t._queuedEventsArgs[i]=[]}};OSF.EventDispatch.prototype={getSupportedEvents:function(){var n=[];for(var t in this._eventHandlers)n.push(t);return n},supportsEvent:function(n){var t=!1;for(var i in this._eventHandlers)if(n==i){t=!0;break}return t},hasEventHandler:function(n,t){var i=this._eventHandlers[n];if(i&&i.length>0)for(var r in i)if(i[r]===t)return!0;return!1},addEventHandler:function(n,t){if(typeof t!="function")return!1;var i=this._eventHandlers[n];if(i&&!this.hasEventHandler(n,t)){i.push(t);return!0}else return!1},addEventHandlerAndFireQueuedEvent:function(n,t){var r=this._eventHandlers[n],u=r.length==0,i=this.addEventHandler(n,t);u&&i&&this.fireQueuedEvent(n);return i},removeEventHandler:function(n,t){var i=this._eventHandlers[n];if(i&&i.length>0)for(var r=0;r0){this._eventHandlers[n]=[];return!0}return!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},fireEvent:function(n){if(n.type==undefined)return!1;var t=n.type;if(t&&this._eventHandlers[t]){var i=this._eventHandlers[t];for(var r in i)i[r](n);return!0}else return!1},fireOrQueueEvent:function(n){var i=this,t=n.type;if(t&&i._eventHandlers[t]){var u=i._eventHandlers[t],r=i._queuedEventsArgs[t];u.length==0?r.push(n):i.fireEvent(n);return!0}else return!1},fireQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var i=this._eventHandlers[n],t=this._queuedEventsArgs[n];if(i.length>0){for(var u=i[0];t.length>0;){var r=t.shift();u(r)}return!0}}return!1}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var f="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]=="outlook"||OSF._OfficeAppFactory.getHostInfo()[f]=="outlookwebapp"){r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i);t.initialize(r.initialData);t.setCurrentItemNumber(r.itemNumber.itemNumber)}else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var i=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),t=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];t(arguments,i,n)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(){var t=OSF.DDA.SyncMethodNames.MessageParent.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return t(arguments,n)}});var i=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;n[i]||typeof OSF.DialogParentMessageEventDispatch=="undefined"||OSF.DDA.DispIdHost.addEventSupport(n,OSF.DialogParentMessageEventDispatch);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(n){n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:n[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(n){n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogParentMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentEventReceived},error:{value:n[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}}],privateStateCallbacks:[],onSucceeded:function(n){var f=n[Microsoft.Office.WebExtension.Parameters.Id],i=n[Microsoft.Office.WebExtension.Parameters.Data],t=new OSF.DialogHandler,e=OSF.DDA.AsyncMethodNames.CloseAsync.displayName;OSF.OUtil.defineEnumerableProperty(t,e,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];n(arguments,f,i,t)}});var r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;OSF.OUtil.defineEnumerableProperty(t,r,{value:function(){var f=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],n=f.verifyAndExtractCall(arguments,t,i),u=n[Microsoft.Office.WebExtension.Parameters.EventType],r=n[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(u,r)}});var u=OSF.DDA.SyncMethodNames.SendMessage.displayName;OSF.OUtil.defineEnumerableProperty(t,u,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return n(arguments,i,t)}});return t},checkCallArgs:function(n){n[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Width]=1);n[Microsoft.Office.WebExtension.Parameters.Width]>100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99);n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1);n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99);n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0);return n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(n){try{n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,n);OSF.ClientHostController.openDialog(n.dispId,n.targetId,function(t,i){n.onEvent&&n.onEvent(i);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(n){n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,n);try{OSF.ClientHostController.closeDialog(n.dispId,n.targetId,t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.messageParent=function(n){try{n.onCalling&&n.onCalling();var i=+new Date,t=OSF.ClientHostController.messageParent(n.hostCallArgs);n.onReceiving&&n.onReceiving();OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs(+new Date-i),t);return t}catch(r){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(r)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ItemChanged:"olkItemSelectedChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{OlkItemSelectedData:"OlkItemSelectedData"});OSF.DDA.OlkItemSelectedChangedEventArgs=function(n){var t=n[OSF.DDA.EventDescriptors.OlkItemSelectedData][0];t===""&&(t=null);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.ItemChanged},initialData:{value:JSON.parse(t)},itemNumber:{value:JSON.parse(n[OSF.DDA.EventDescriptors.OlkItemSelectedData][1])}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidOlkItemSelectedChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.OlkItemSelectedData,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}],isComplexType:!0});var OSFLog;(function(n){var u="ResponseTime",f="Message",r="SessionId",i="CorrelationId",t=!0,e=function(){function n(n){this._table=n;this._fields={}}Object.defineProperty(n.prototype,"Fields",{get:function(){return this._fields},enumerable:t,configurable:t});Object.defineProperty(n.prototype,"Table",{get:function(){return this._table},enumerable:t,configurable:t});n.prototype.SerializeFields=function(){};n.prototype.SetSerializedField=function(n,t){typeof t!="undefined"&&t!==null&&(this._serializedFields[n]=t.toString())};n.prototype.SerializeRow=function(){var n=this;n._serializedFields={};n.SetSerializedField("Table",n._table);n.SerializeFields();return JSON.stringify(n._serializedFields)};return n}();n.BaseUsageData=e;var c=function(n){var k="HostJSVersion",p="OfficeJSVersion",y="DocUrl",v="AppSizeHeight",w="AppSizeWidth",d="ClientId",c="HostVersion",b="Host",s="UserId",o="Browser",e="AssetId",h="AppURL",a="AppInstanceId",l="AppId";__extends(u,n);function u(){n.call(this,"AppActivated")}Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,l,{get:function(){return this.Fields[l]},set:function(n){this.Fields[l]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,a,{get:function(){return this.Fields[a]},set:function(n){this.Fields[a]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,b,{get:function(){return this.Fields[b]},set:function(n){this.Fields[b]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,c,{get:function(){return this.Fields[c]},set:function(n){this.Fields[c]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,d,{get:function(){return this.Fields[d]},set:function(n){this.Fields[d]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,w,{get:function(){return this.Fields[w]},set:function(n){this.Fields[w]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,v,{get:function(){return this.Fields[v]},set:function(n){this.Fields[v]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,y,{get:function(){return this.Fields[y]},set:function(n){this.Fields[y]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,p,{get:function(){return this.Fields[p]},set:function(n){this.Fields[p]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,k,{get:function(){return this.Fields[k]},set:function(n){this.Fields[k]=n},enumerable:t,configurable:t});u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(l,n.AppId);n.SetSerializedField(a,n.AppInstanceId);n.SetSerializedField(h,n.AppURL);n.SetSerializedField(e,n.AssetId);n.SetSerializedField(o,n.Browser);n.SetSerializedField(s,n.UserId);n.SetSerializedField(b,n.Host);n.SetSerializedField(c,n.HostVersion);n.SetSerializedField(d,n.ClientId);n.SetSerializedField(w,n.AppSizeWidth);n.SetSerializedField(v,n.AppSizeHeight);n.SetSerializedField(f,n.Message);n.SetSerializedField(y,n.DocUrl);n.SetSerializedField(p,n.OfficeJSVersion);n.SetSerializedField(k,n.HostJSVersion)};return u}(e);n.AppActivatedUsageData=c;var l=function(n){var e="StartTime",o="ScriptId";__extends(f,n);function f(){n.call(this,"ScriptLoad")}Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t});f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(o,n.ScriptId);n.SetSerializedField(e,n.StartTime);n.SetSerializedField(u,n.ResponseTime)};return f}(e);n.ScriptLoadUsageData=l;var h=function(n){var h="CloseMethod",s="OpenTime",e="AppSizeFinalHeight",o="AppSizeFinalWidth",f="FocusTime";__extends(u,n);function u(){n.call(this,"AppClosed")}Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t});u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(f,n.FocusTime);n.SetSerializedField(o,n.AppSizeFinalWidth);n.SetSerializedField(e,n.AppSizeFinalHeight);n.SetSerializedField(s,n.OpenTime);n.SetSerializedField(h,n.CloseMethod)};return u}(e);n.AppClosedUsageData=h;var o=function(n){var s="ErrorType",o="Parameters",h="APIID",e="APIType";__extends(f,n);function f(){n.call(this,"APIUsage")}Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t});f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(e,n.APIType);n.SetSerializedField(h,n.APIID);n.SetSerializedField(o,n.Parameters);n.SetSerializedField(u,n.ResponseTime);n.SetSerializedField(s,n.ErrorType)};return f}(e);n.APIUsageUsageData=o;var s=function(n){var e="SuccessCode";__extends(u,n);function u(){n.call(this,"AppInitialization")}Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t});u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(e,n.SuccessCode);n.SetSerializedField(f,n.Message)};return u}(e);n.AppInitializationUsageData=s})(OSFLog||(OSFLog={}));var Logger;(function(n){"use strict";(function(n){n[n.info=0]="info";n[n.warning=1]="warning";n[n.error=2]="error"})(n.TraceLevel||(n.TraceLevel={}));var f=n.TraceLevel;(function(n){n[n.none=0]="none";n[n.flush=1]="flush"})(n.SendFlag||(n.SendFlag={}));var e=n.SendFlag;function u(){OSF.Logger&&OSF.Logger.ulsEndpoint&&OSF.Logger.ulsEndpoint.loadProxyFrame()}n.allowUploadingData=u;function t(n,t,i){if(OSF.Logger&&OSF.Logger.ulsEndpoint){var u={traceLevel:n,message:t,flag:i,internalLog:!0},r=JSON.stringify(u);OSF.Logger.ulsEndpoint.writeLog(r)}}n.sendLog=t;function i(){try{return new r}catch(n){return null}}var r=function(){function n(){var n=this,t=n;n.proxyFrame=null;n.telemetryEndPoint="https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html";n.buffer=[];n.proxyFrameReady=!1;OSF.OUtil.addEventListener(window,"message",function(n){return t.tellProxyFrameReady(n)});setTimeout(function(){t.loadProxyFrame()},3e3)}n.prototype.writeLog=function(t){var i=this;i.proxyFrameReady===!0?i.proxyFrame.contentWindow.postMessage(t,n.telemetryOrigin):i.buffer.length<128&&i.buffer.push(t)};n.prototype.loadProxyFrame=function(){var n=this;if(n.proxyFrame==null){n.proxyFrame=document.createElement("iframe");n.proxyFrame.setAttribute("style","display:none");n.proxyFrame.setAttribute("src",n.telemetryEndPoint);document.head.appendChild(n.proxyFrame)}};n.prototype.tellProxyFrameReady=function(t){var i=this,e=i;if(t.data==="ProxyFrameReadyToLog"){i.proxyFrameReady=!0;for(var r=0;r40){n=OSF.OUtil.Guid.generateNewGuid();t.setValue(t.clientIDKey,n)}return n};n.prototype.saveLog=function(n,t){var r=this,i=r.getValue(r.logIdSetKey);i=(i&&i.length>0?i+";":"")+n;r.setValue(r.logIdSetKey,i);r.setValue(n,t)};n.prototype.enumerateLog=function(n,t){var i=this,f=i.getValue(i.logIdSetKey);if(f){var e=f.split(";");for(var o in e){var r=e[o],u=i.getValue(r);if(u){n&&n(r,u);t&&i.remove(r)}}t&&i.remove(i.logIdSetKey)}};n.prototype.getValue=function(n){var i=OSF.OUtil.getLocalStorage(),t="";i&&(t=i.getItem(n));return t};n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)};n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}};return n}(),f=function(){function n(){}n.prototype.LogData=function(n){OSF.Logger&&OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n.SerializeRow(),OSF.Logger.SendFlag.none)};n.prototype.LogRawData=function(n){OSF.Logger&&OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n,OSF.Logger.SendFlag.none)};return n}();function w(u){if(OSF.Logger&&!t){t=new b;t.hostVersion=u.get_hostFullVersion()?u.get_hostFullVersion():u.get_appVersion();t.appId=u.get_id();t.host=u.get_appName();t.browser=window.navigator.userAgent;t.correlationId=u.get_correlationId();t.clientId=(new o).getClientId();t.appInstanceId=u.get_appInstanceId();t.appInstanceId&&(t.appInstanceId=t.appInstanceId.replace(/[{}]/g,"").toLowerCase());t.message=u.get_hostCustomMessage();t.officeJSVersion=OSF.ConstantNames.FileVersion;t.hostJSVersion="16.0.7524.3000";var e=u.get_docUrl();t.docUrl=k.test(e)?e:"";var f=location.href;f&&(f=f.split("?")[0].split("#")[0]);t.appURL=f;(function(n,t){var e,o,r;t.assetId="";t.userId="";try{e=decodeURIComponent(n);o=new DOMParser;r=o.parseFromString(e,"text/xml");var f=r.getElementsByTagName("t")[0].attributes.getNamedItem("cid"),u=r.getElementsByTagName("t")[0].attributes.getNamedItem("oid");f&&f.nodeValue?t.userId=f.nodeValue:u&&u.nodeValue&&(t.userId=u.nodeValue);t.assetId=r.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(s){}finally{e=i;r=i;o=i}})(u.get_eToken(),t);(function(){var c=new Date,u=i,o=0,h=!1,f=function(){if(document.hasFocus())u==i&&(u=new Date);else if(u){o+=Math.abs(+new Date-u.getTime());u=i}},t=[];t.push(new r("focus",f));t.push(new r("blur",f));t.push(new r("focusout",f));t.push(new r("focusin",f));var s=function(){for(var r=0;r6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix){i=new Date(parseInt(t.slice(5,-1)));if(i)return i}return t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,!0);r[i]=t}catch(u){}}return r}};OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(n,t,i){Type.registerNamespace("Microsoft.Office.WebExtension.MailboxEnums");Microsoft.Office.WebExtension.MailboxEnums.EntityType={MeetingSuggestion:"meetingSuggestion",TaskSuggestion:"taskSuggestion",Address:"address",EmailAddress:"emailAddress",Url:"url",PhoneNumber:"phoneNumber",Contact:"contact",FlightReservations:"flightReservations",ParcelDeliveries:"parcelDeliveries"};Microsoft.Office.WebExtension.MailboxEnums.ItemType={Message:"message",Appointment:"appointment"};Microsoft.Office.WebExtension.MailboxEnums.ResponseType={None:"none",Organizer:"organizer",Tentative:"tentative",Accepted:"accepted",Declined:"declined"};Microsoft.Office.WebExtension.MailboxEnums.RecipientType={Other:"other",DistributionList:"distributionList",User:"user",ExternalUser:"externalUser"};Microsoft.Office.WebExtension.MailboxEnums.AttachmentType={File:"file",Item:"item",Cloud:"cloud"};Microsoft.Office.WebExtension.MailboxEnums.BodyType={Text:"text",Html:"html"};Microsoft.Office.WebExtension.MailboxEnums.ItemNotificationMessageType={ProgressIndicator:"progressIndicator",InformationalMessage:"informationalMessage",ErrorMessage:"errorMessage"};Microsoft.Office.WebExtension.CoercionType={Text:"text",Html:"html"};Microsoft.Office.WebExtension.MailboxEnums.UserProfileType={Office365:"office365",OutlookCom:"outlookCom",Enterprise:"enterprise"};Microsoft.Office.WebExtension.MailboxEnums.RestVersion={v1_0:"v1.0",v2_0:"v2.0",Beta:"beta"};Microsoft.Office.WebExtension.MailboxEnums.ModuleType={Addins:"addins"};Type.registerNamespace("OSF.DDA");var u=window.OSF||{};u.DDA=u.DDA||{};window.OSF.DDA.OutlookAppOm=u.DDA.OutlookAppOm=function(n,t,i){this.$$d_navigateToModuleAsync=Function.createDelegate(this,this.navigateToModuleAsync);this.$$d_displayPersonaCardAsync=Function.createDelegate(this,this.displayPersonaCardAsync);this.$$d_displayNewMessageFormApi=Function.createDelegate(this,this.displayNewMessageFormApi);this.$$d__displayNewAppointmentFormApi$p$0=Function.createDelegate(this,this._displayNewAppointmentFormApi$p$0);this.$$d_windowOpenOverrideHandler=Function.createDelegate(this,this.windowOpenOverrideHandler);this.$$d__getRestUrl$p$0=Function.createDelegate(this,this._getRestUrl$p$0);this.$$d__getEwsUrl$p$0=Function.createDelegate(this,this._getEwsUrl$p$0);this.$$d__getDiagnostics$p$0=Function.createDelegate(this,this._getDiagnostics$p$0);this.$$d__getUserProfile$p$0=Function.createDelegate(this,this._getUserProfile$p$0);this.$$d_getItem=Function.createDelegate(this,this.getItem);this.$$d__callAppReadyCallback$p$0=Function.createDelegate(this,this._callAppReadyCallback$p$0);this.$$d__getInitialDataResponseHandler$p$0=Function.createDelegate(this,this._getInitialDataResponseHandler$p$0);window.OSF.DDA.OutlookAppOm._instance$p=this;this._officeAppContext$p$0=n;this._appReadyCallback$p$0=i;var r=this;var u=function(){i&&(r._officeAppContext$p$0.get_isDialog()?window.setTimeout(r.$$d__callAppReadyCallback$p$0,0):r.invokeHostMethod(1,null,r.$$d__getInitialDataResponseHandler$p$0))};this._areStringsLoaded$p$0()?u():this._loadLocalizedScript$p$0(u)};window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i=function(n){if(!n)throw Error.create(window._u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text);};window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i=function(n,t,i,r){if(ni)throw Error.argumentOutOfRange(r);};window.OSF.DDA.OutlookAppOm._throwOnInvalidModule$p=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("module");else if(n==="")throw Error.argument("module","module cannot be empty.");if(n!==window.Microsoft.Office.WebExtension.MailboxEnums.ModuleType.Addins)throw Error.notImplemented(String.format("API not supported for module '{0}'",n));};window.OSF.DDA.OutlookAppOm._getHtmlBody$p=function(n){var t="";if("htmlBody"in n){window.OSF.DDA.OutlookAppOm._throwOnInvalidHtmlBody$p(n.htmlBody);t=n.htmlBody}return t};window.OSF.DDA.OutlookAppOm._getAttachments$p=function(n){var t=[];if("attachments"in n){t=n.attachments;window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentsArray$p(t)}return t};window.OSF.DDA.OutlookAppOm._getOptionsAndCallback$p=function(n){var t=[];"options"in n&&(t[0]=n.options);"callback"in n&&(t[t.length]=n.callback);return t};window.OSF.DDA.OutlookAppOm._createAttachmentsDataForHost$p=function(n){var r=new Array(0);if(Array.isInstanceOfType(n))for(var t=0;t2048)throw Error.argumentOutOfRange("attachments",n.length,window._u.ExtensibilityStrings.l_AttachmentUrlTooLong_Text);window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentName$p(t)};window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentItemIdOrName$p=function(n,t){if(!String.isInstanceOfType(n)||!String.isInstanceOfType(t))throw Error.argument("attachments");if(n.length>200)throw Error.argumentOutOfRange("attachments",n.length,window._u.ExtensibilityStrings.l_AttachmentItemIdTooLong_Text);window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentName$p(t)};window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentName$p=function(n){if(n.length>255)throw Error.argumentOutOfRange("attachments",n.length,window._u.ExtensibilityStrings.l_AttachmentNameTooLong_Text);};window.OSF.DDA.OutlookAppOm._throwOnInvalidRestVersion$p=function(n){if(!n)throw Error.argumentNull("restVersion");if(n!==window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v1_0&&n!==window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v2_0&&n!==window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.Beta)throw Error.argument("restVersion");};window.OSF.DDA.OutlookAppOm.getItemIdBasedOnHost=function(n){return window.OSF.DDA.OutlookAppOm._instance$p._initialData$p$0&&window.OSF.DDA.OutlookAppOm._instance$p._initialData$p$0.get__isRestIdSupported$i$0()?window.OSF.DDA.OutlookAppOm._instance$p.convertToRestId(n,window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v1_0):window.OSF.DDA.OutlookAppOm._instance$p.convertToEwsId(n,window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v1_0)};window.OSF.DDA.OutlookAppOm.addAdditionalArgs=function(n,t){return t};window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p=function(n,t,i){if(Object.getType(n)!==t)throw Error.argumentType(i);};window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p=function(n,t,i,u){if(!r.ScriptHelpers.isNullOrUndefined(n)){window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(n,String,u);var f=n;window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(f.length,t,i,u)}};window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p=function(n){return n?n.join(";"):null};window.OSF.DDA.OutlookAppOm._convertComposeEmailDictionaryParameterForSetApi$p=function(n){if(!n)return null;for(var i=new Array(n.length),t=0;t1&&f[1]){r.error=!0;r.errorCode=f[1]}else r.error=!1;i(t,r)}else if(Number.isInstanceOfType(u)){var e={};e.error=!0;e.errorCode=u;i(t,e)}else throw Error.notImplemented("Return data type from host must be Dictionary or int");}})}},_dictionaryToDate$i$0:function(n){var t=new Date(n.year,n.month,n.date,n.hours,n.minutes,n.seconds,n.milliseconds?n.milliseconds:0);if(window.isNaN(t.getTime()))throw Error.format(window._u.ExtensibilityStrings.l_InvalidDate_Text);return t},_dateToDictionary$i$0:function(n){var t={};t.month=n.getMonth();t.date=n.getDate();t.year=n.getFullYear();t.hours=n.getHours();t.minutes=n.getMinutes();t.seconds=n.getSeconds();t.milliseconds=n.getMilliseconds();return t},_isOwaOnlyMethod$p$0:function(n){switch(n){case 402:case 401:case 400:case 403:return!0;default:return!1}},isOutlook16OrGreater:function(){var n=this._initialData$p$0.get__hostVersion$i$0();var i=0;var t=0;if(n){i=n.indexOf(".");t=window.parseInt(n.substring(0,i))}return t>=16},convertToOutlookParameters:function(n,t){var i=null;var u={};switch(n){case 1:case 2:case 3:case 14:case 18:case 26:case 32:case 41:case 34:break;case 12:u.isRest=t.isRest;break;case 4:var f=window.JSON.stringify(t.customProperties);i=[f];break;case 5:i=[t.body];break;case 8:case 9:i=[t.itemId];break;case 7:i=[window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.requiredAttendees),window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.optionalAttendees),t.start,t.end,t.location,window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.resources),t.subject,t.body];break;case 44:i=[window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.toRecipients),window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.ccRecipients),window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.bccRecipients),t.subject,t.htmlBody,t.attachments];break;case 43:i=[t.ewsIdOrEmail];break;case 45:i=[t.module,t.queryString];break;case 40:i=[t.extensionId,t.consentState];break;case 11:case 10:i=[t.htmlBody];break;case 31:case 30:i=[t.htmlBody,t.attachments];break;case 23:case 13:case 38:case 29:i=[t.data,t.coercionType];break;case 37:case 28:i=[t.coercionType];break;case 17:i=[t.subject];break;case 15:i=[t.recipientField];break;case 22:case 21:i=[t.recipientField,window.OSF.DDA.OutlookAppOm._convertComposeEmailDictionaryParameterForSetApi$p(t.recipientArray)];break;case 19:i=[t.itemId,t.name];break;case 16:i=[t.uri,t.name,t.isInline];break;case 20:i=[t.attachmentIndex];break;case 25:i=[t.TimeProperty,t.time];break;case 24:i=[t.TimeProperty];break;case 27:i=[t.location];break;case 33:case 35:i=[t.key,t.type,t.persistent,t.message,t.icon];break;case 36:i=[t.key];break;default:break}if(n!==1){var r;this._additionalOutlookParams$p$0.updateOutlookExecuteParameters(r={val:i},u),i=r.val}return i},_displayNewAppointmentFormApi$p$0:function(n){var f=window.OSF.DDA.OutlookAppOm._validateAndNormalizeRecipientEmails$p(n.requiredAttendees,"requiredAttendees");var u=window.OSF.DDA.OutlookAppOm._validateAndNormalizeRecipientEmails$p(n.optionalAttendees,"optionalAttendees");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(n.location,0,window.OSF.DDA.OutlookAppOm._maxLocationLength$p,"location");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(n.body,0,window.OSF.DDA.OutlookAppOm.maxBodyLength,"body");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(n.subject,0,window.OSF.DDA.OutlookAppOm._maxSubjectLength$p,"subject");if(!r.ScriptHelpers.isNullOrUndefined(n.start)){window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(n.start,Date,"start");var s=n.start;n.start=s.getTime();if(!r.ScriptHelpers.isNullOrUndefined(n.end)){window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(n.end,Date,"end");var i=n.end;if(i=0&&n.getTime()-u<0)return window.parseInt(t.offset)}throw Error.format(window._u.ExtensibilityStrings.l_InvalidDate_Text);},_areStringsLoaded$p$0:function(){var n=!1;try{n=!r.ScriptHelpers.isNullOrUndefined(window._u.ExtensibilityStrings.l_EwsRequestOversized_Text)}catch(t){}return n},_loadLocalizedScript$p$0:function(n){for(var s=null,l="",a=document.getElementsByTagName("script"),o=a.length-1;o>=0;o--){var i=null;var v=a[o].attributes;if(v){var p=v.getNamedItem("src");p&&(i=p.value);if(i){var y=!1;i=i.toLowerCase();var f=i.indexOf("office_strings.js");if(f<0){f=i.indexOf("office_strings.debug.js");y=!0}if(f>0&&fu+1&&(l=r.substring(0,u+1));break}}}}if(s){var h=document.getElementsByTagName("head")[0];var t=null;var b=this;var e=function(){if(n&&(!t.readyState||t.readyState&&(t.readyState==="loaded"||t.readyState==="complete"))){t.onload=null;t.onreadystatechange=null;n()}};var c=this;var w=function(){if(!c._areStringsLoaded$p$0()){var n=l+"en-us/"+"outlook_strings.js";t.onload=null;t.onreadystatechange=null;t=c._createScriptElement$p$0(n);t.onload=e;t.onreadystatechange=e;h.appendChild(t)}};t=this._createScriptElement$p$0(s);t.onload=e;t.onreadystatechange=e;window.setTimeout(w,2e3);h.appendChild(t)}},_createScriptElement$p$0:function(n){var t=document.createElement("script");t.type="text/javascript";t.src=n;return t}};u.DDA.OutlookAppOm.prototype.initialize=function(n){if(!n){this._additionalOutlookParams$p$0||(this._additionalOutlookParams$p$0=new r.AdditionalGlobalParameters(!0));this._additionalOutlookParams$p$0.setCurrentItemNumber(0,!0);this._initialData$p$0=null;this._item$p$0=null;return}var t="itemType";this._initialData$p$0=new r.InitialData(n);this._hostItemType$p$0=n[t];1===n[t]?this._item$p$0=new r.Message(this._initialData$p$0):3===n[t]?this._item$p$0=new r.MeetingRequest(this._initialData$p$0):2===n[t]?this._item$p$0=new r.Appointment(this._initialData$p$0):4===n[t]?this._item$p$0=new r.MessageCompose(this._initialData$p$0):5===n[t]?this._item$p$0=new r.AppointmentCompose(this._initialData$p$0):6===n[t];this._userProfile$p$0=new r.UserProfile(this._initialData$p$0);this._diagnostics$p$0=new r.Diagnostics(this._initialData$p$0,this._officeAppContext$p$0.get_appName());var i=window.OSF.DDA.OutlookAppOm._instance$p.get__appName$i$0()!==8||this.isOutlook16OrGreater();this._additionalOutlookParams$p$0=new r.AdditionalGlobalParameters(i);"itemNumber"in n&&this.setCurrentItemNumber(n.itemNumber);this._initializeMethods$p$0();r.InitialData._defineReadOnlyProperty$i(this,"item",this.$$d_getItem);r.InitialData._defineReadOnlyProperty$i(this,"userProfile",this.$$d__getUserProfile$p$0);r.InitialData._defineReadOnlyProperty$i(this,"diagnostics",this.$$d__getDiagnostics$p$0);r.InitialData._defineReadOnlyProperty$i(this,"ewsUrl",this.$$d__getEwsUrl$p$0);r.InitialData._defineReadOnlyProperty$i(this,"restUrl",this.$$d__getRestUrl$p$0);window.OSF.DDA.OutlookAppOm._instance$p.get__appName$i$0()===64&&this._initialData$p$0.get__overrideWindowOpen$i$0()&&(window.open=this.$$d_windowOpenOverrideHandler)};u.DDA.OutlookAppOm.prototype.makeEwsRequestAsync=function(n){for(var u=[],i=1;iwindow.OSF.DDA.OutlookAppOm._maxEwsRequestSize$p)throw Error.argument("data",window._u.ExtensibilityStrings.l_EwsRequestOversized_Text);this._throwOnMethodCallForInsufficientPermission$i$0(3,"makeEwsRequestAsync");var f=r.CommonParameters.parse(u,!0,!0);var t=new r.EwsRequest(f._asyncContext$p$0);var e=this;t.onreadystatechange=function(){4===t.get__requestState$i$1()&&f._callback$p$0(t._asyncResult$p$0)};t.send(n)};u.DDA.OutlookAppOm.prototype.recordDataPoint=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");this.invokeHostMethod(402,n,null)};u.DDA.OutlookAppOm.prototype.recordTrace=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");this.invokeHostMethod(401,n,null)};u.DDA.OutlookAppOm.prototype.trackCtq=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");this.invokeHostMethod(400,n,null)};u.DDA.OutlookAppOm.prototype.convertToLocalClientTime=function(n){var t=new Date(n.getTime());var i=t.getTimezoneOffset()*-1;if(this._initialData$p$0&&this._initialData$p$0.get__timeZoneOffsets$i$0()){t.setUTCMinutes(t.getUTCMinutes()-i);i=this._findOffset$p$0(t);t.setUTCMinutes(t.getUTCMinutes()+i)}var r=this._dateToDictionary$i$0(t);r.timezoneOffset=i;return r};u.DDA.OutlookAppOm.prototype.convertToUtcClientTime=function(n){var t=this._dictionaryToDate$i$0(n);if(this._initialData$p$0&&this._initialData$p$0.get__timeZoneOffsets$i$0()){var i=this._findOffset$p$0(t);t.setUTCMinutes(t.getUTCMinutes()-i);i=n.timezoneOffset?n.timezoneOffset:t.getTimezoneOffset()*-1;t.setUTCMinutes(t.getUTCMinutes()+i)}return t};u.DDA.OutlookAppOm.prototype.convertToRestId=function(n,t){if(!n)throw Error.argumentNull("itemId");window.OSF.DDA.OutlookAppOm._throwOnInvalidRestVersion$p(t);return n.replace(new RegExp("[/]","g"),"-").replace(new RegExp("[+]","g"),"_")};u.DDA.OutlookAppOm.prototype.convertToEwsId=function(n,t){if(!n)throw Error.argumentNull("itemId");window.OSF.DDA.OutlookAppOm._throwOnInvalidRestVersion$p(t);return n.replace(new RegExp("[-]","g"),"/").replace(new RegExp("[_]","g"),"+")};u.DDA.OutlookAppOm.prototype.getUserIdentityTokenAsync=function(){for(var i=[],n=0;n32768){var f=window.OSF.DDA.OutlookAppOm._instance$p.createAsyncResult(null,1,9019,n._asyncContext$p$0,"");var e=this;window.setTimeout(function(){n._callback$p$0(f)},0);return}window.OSF.DDA.OutlookAppOm._instance$p.get__appName$i$0()===64?this._saveSettingsForOwa$p$0(n._callback$p$0,n._asyncContext$p$0):this._saveSettingsForOutlook$p$0(n._callback$p$0,n._asyncContext$p$0)};Type.registerNamespace("$h");var r=window.$h||{};Type.registerNamespace("Office.cast");var f=window.Office||{};f.cast=f.cast||{};r.AdditionalGlobalParameters=function(n){this._parameterBlobSupported$p$0=n;this._itemNumber$p$0=0};r.AdditionalGlobalParameters.prototype={_parameterBlobSupported$p$0:!1,_itemNumber$p$0:0,setCurrentItemNumber:function(n,t){t?this._itemNumber$p$0=n:n>0&&(this._itemNumber$p$0=n)},get_itemNumber:function(){return this._itemNumber$p$0},updateOutlookExecuteParameters:function(n,t){if(this._parameterBlobSupported$p$0){this._itemNumber$p$0>0&&(t.itemNumber=this._itemNumber$p$0.toString());if(!Object.keys(t).length)return;n.val||(n.val=[]);n.val.push(window.JSON.stringify(t))}}};r.Appointment=function(n){this.$$d__getOrganizer$p$2=Function.createDelegate(this,this._getOrganizer$p$2);this.$$d__getNormalizedSubject$p$2=Function.createDelegate(this,this._getNormalizedSubject$p$2);this.$$d__getSubject$p$2=Function.createDelegate(this,this._getSubject$p$2);this.$$d__getResources$p$2=Function.createDelegate(this,this._getResources$p$2);this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2);this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2);this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2);this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2);this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2);r.Appointment.initializeBase(this,[n]);r.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2);r.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2);r.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2);r.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"resources",this.$$d__getResources$p$2);r.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2);r.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2);r.InitialData._defineReadOnlyProperty$i(this,"organizer",this.$$d__getOrganizer$p$2)};r.Appointment.prototype={getItemType:function(){return window.Microsoft.Office.WebExtension.MailboxEnums.ItemType.Appointment},_getStart$p$2:function(){return this._data$p$0.get__start$i$0()},_getEnd$p$2:function(){return this._data$p$0.get__end$i$0()},_getLocation$p$2:function(){return this._data$p$0.get__location$i$0()},_getOptionalAttendees$p$2:function(){return this._data$p$0.get__cc$i$0()},_getRequiredAttendees$p$2:function(){return this._data$p$0.get__to$i$0()},_getResources$p$2:function(){return this._data$p$0.get__resources$i$0()},_getSubject$p$2:function(){return this._data$p$0.get__subject$i$0()},_getNormalizedSubject$p$2:function(){return this._data$p$0.get__normalizedSubject$i$0()},_getOrganizer$p$2:function(){return this._data$p$0.get__organizer$i$0()}};r.Appointment.prototype.getEntities=function(){return this._data$p$0._getEntities$i$0()};r.Appointment.prototype.getEntitiesByType=function(n){return this._data$p$0._getEntitiesByType$i$0(n)};r.Appointment.prototype.getSelectedEntities=function(){return this._data$p$0._getSelectedEntities$i$0()};r.Appointment.prototype.getRegExMatches=function(){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches");return this._data$p$0._getRegExMatches$i$0()};r.Appointment.prototype.getFilteredEntitiesByName=function(n){return this._data$p$0._getFilteredEntitiesByName$i$0(n)};r.Appointment.prototype.getRegExMatchesByName=function(n){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName");return this._data$p$0._getRegExMatchesByName$i$0(n)};r.Appointment.prototype.getSelectedRegExMatches=function(){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedRegExMatches");return this._data$p$0._getSelectedRegExMatches$i$0()};r.Appointment.prototype.displayReplyForm=function(n){window.OSF.DDA.OutlookAppOm._instance$p._displayReplyForm$i$0(n)};r.Appointment.prototype.displayReplyAllForm=function(n){window.OSF.DDA.OutlookAppOm._instance$p._displayReplyAllForm$i$0(n)};r.AppointmentCompose=function(n){this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2);this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2);this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2);this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2);this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2);r.AppointmentCompose.initializeBase(this,[n]);r.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2);r.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2);r.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2)};r.AppointmentCompose.prototype={_requiredAttendees$p$2:null,_optionalAttendees$p$2:null,_start$p$2:null,_end$p$2:null,_location$p$2:null,getItemType:function(){return window.Microsoft.Office.WebExtension.MailboxEnums.ItemType.Appointment},_getRequiredAttendees$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._requiredAttendees$p$2||(this._requiredAttendees$p$2=new r.ComposeRecipient(0,"requiredAttendees"));return this._requiredAttendees$p$2},_getOptionalAttendees$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._optionalAttendees$p$2||(this._optionalAttendees$p$2=new r.ComposeRecipient(1,"optionalAttendees"));return this._optionalAttendees$p$2},_getStart$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._start$p$2||(this._start$p$2=new r.ComposeTime(1));return this._start$p$2},_getEnd$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._end$p$2||(this._end$p$2=new r.ComposeTime(2));return this._end$p$2},_getLocation$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._location$p$2||(this._location$p$2=new r.ComposeLocation);return this._location$p$2}};r.AttachmentConstants=function(){};r.AttachmentDetails=function(n){this.$$d__getIsInline$p$0=Function.createDelegate(this,this._getIsInline$p$0);this.$$d__getAttachmentType$p$0=Function.createDelegate(this,this._getAttachmentType$p$0);this.$$d__getSize$p$0=Function.createDelegate(this,this._getSize$p$0);this.$$d__getContentType$p$0=Function.createDelegate(this,this._getContentType$p$0);this.$$d__getName$p$0=Function.createDelegate(this,this._getName$p$0);this.$$d__getId$p$0=Function.createDelegate(this,this._getId$p$0);this._data$p$0=n;r.InitialData._defineReadOnlyProperty$i(this,"id",this.$$d__getId$p$0);r.InitialData._defineReadOnlyProperty$i(this,"name",this.$$d__getName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"contentType",this.$$d__getContentType$p$0);r.InitialData._defineReadOnlyProperty$i(this,"size",this.$$d__getSize$p$0);r.InitialData._defineReadOnlyProperty$i(this,"attachmentType",this.$$d__getAttachmentType$p$0);r.InitialData._defineReadOnlyProperty$i(this,"isInline",this.$$d__getIsInline$p$0)};r.AttachmentDetails.prototype={_data$p$0:null,_getId$p$0:function(){return this._data$p$0.id},_getName$p$0:function(){return this._data$p$0.name},_getContentType$p$0:function(){return this._data$p$0.contentType},_getSize$p$0:function(){return this._data$p$0.size},_getAttachmentType$p$0:function(){var n=this._data$p$0.attachmentType;return n255)throw Error.argumentOutOfRange("recipients",n.length,window._u.ExtensibilityStrings.l_DisplayNameTooLong_Text);if(t&&t.length>571)throw Error.argumentOutOfRange("recipients",t.length,window._u.ExtensibilityStrings.l_EmailAddressTooLong_Text);};r.ComposeRecipient._getAsyncFormatter$p=function(n){for(var u=n,i=[],t=0;t864e13)throw Error.argumentOutOfRange("dateTime");var i=r.CommonParameters.parse(u,!1);window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(25,{TimeProperty:this._timeType$p$0,time:n.getTime()},null,i._asyncContext$p$0,i._callback$p$0)};r.ComposeTime.TimeType=function(){};r.ComposeTime.TimeType.prototype={start:1,end:2};r.ComposeTime.TimeType.registerEnum("$h.1",!1);r.Contact=function(n){this.$$d__getContactString$p$0=Function.createDelegate(this,this._getContactString$p$0);this.$$d__getAddresses$p$0=Function.createDelegate(this,this._getAddresses$p$0);this.$$d__getUrls$p$0=Function.createDelegate(this,this._getUrls$p$0);this.$$d__getEmailAddresses$p$0=Function.createDelegate(this,this._getEmailAddresses$p$0);this.$$d__getPhoneNumbers$p$0=Function.createDelegate(this,this._getPhoneNumbers$p$0);this.$$d__getBusinessName$p$0=Function.createDelegate(this,this._getBusinessName$p$0);this.$$d__getPersonName$p$0=Function.createDelegate(this,this._getPersonName$p$0);this._data$p$0=n;r.InitialData._defineReadOnlyProperty$i(this,"personName",this.$$d__getPersonName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"businessName",this.$$d__getBusinessName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0);r.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0);r.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0);r.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0);r.InitialData._defineReadOnlyProperty$i(this,"contactString",this.$$d__getContactString$p$0)};r.Contact.prototype={_data$p$0:null,_phoneNumbers$p$0:null,_getPersonName$p$0:function(){return this._data$p$0.PersonName},_getBusinessName$p$0:function(){return this._data$p$0.BusinessName},_getAddresses$p$0:function(){return r.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses")},_getEmailAddresses$p$0:function(){return r.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses")},_getUrls$p$0:function(){return r.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls")},_getPhoneNumbers$p$0:function(){if(!this._phoneNumbers$p$0){var n=this;this._phoneNumbers$p$0=r.Entities._getExtractedObjects$i(r.PhoneNumber,this._data$p$0,"PhoneNumbers",function(n){return new r.PhoneNumber(n)})}return this._phoneNumbers$p$0},_getContactString$p$0:function(){return this._data$p$0.ContactString}};r.CustomProperties=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");if(Array.isInstanceOfType(n)){var t=n;if(t.length>0)this._data$p$0=t[0];else throw Error.argument("data");}else this._data$p$0=n};r.CustomProperties.prototype={_data$p$0:null};r.CustomProperties.prototype.get=function(n){var i=this._data$p$0[n];if(typeof i=="string"){var t=i;if(t.length>6&&t.startsWith("Date(")&&t.endsWith(")")){var f=t.substring(5,t.length-1);var r=window.parseInt(f);if(!window.isNaN(r)){var u=new Date(r);u&&(i=u)}}}return i};r.CustomProperties.prototype.set=function(n,t){window.OSF.OUtil.isDate(t)&&(t="Date("+t.getTime()+")");this._data$p$0[n]=t};r.CustomProperties.prototype.remove=function(n){delete this._data$p$0[n]};r.CustomProperties.prototype.saveAsync=function(){for(var i=[],n=0;nf)throw Error.argument();var t=r.CommonParameters.parse(i,!1,!0);var u=new r.SaveDictionaryRequest(t._callback$p$0,t._asyncContext$p$0);u._sendRequest$i$0(4,"SaveCustomProperties",{customProperties:this._data$p$0})};r.Diagnostics=function(n,t){this.$$d__getOwaView$p$0=Function.createDelegate(this,this._getOwaView$p$0);this.$$d__getHostVersion$p$0=Function.createDelegate(this,this._getHostVersion$p$0);this.$$d__getHostName$p$0=Function.createDelegate(this,this._getHostName$p$0);this._data$p$0=n;this._appName$p$0=t;r.InitialData._defineReadOnlyProperty$i(this,"hostName",this.$$d__getHostName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"hostVersion",this.$$d__getHostVersion$p$0);64===this._appName$p$0&&r.InitialData._defineReadOnlyProperty$i(this,"OWAView",this.$$d__getOwaView$p$0)};r.Diagnostics.prototype={_data$p$0:null,_appName$p$0:0,_getHostName$p$0:function(){switch(this._appName$p$0){case 8:return"Outlook";case 64:return"OutlookWebApp";case 65536:return"OutlookIOS";case 4194304:return"OutlookAndroid";default:return null}},_getHostVersion$p$0:function(){return this._data$p$0.get__hostVersion$i$0()},_getOwaView$p$0:function(){return this._data$p$0.get__owaView$i$0()}};r.EmailAddressDetails=function(n){this.$$d__getRecipientType$p$0=Function.createDelegate(this,this._getRecipientType$p$0);this.$$d__getAppointmentResponse$p$0=Function.createDelegate(this,this._getAppointmentResponse$p$0);this.$$d__getDisplayName$p$0=Function.createDelegate(this,this._getDisplayName$p$0);this.$$d__getEmailAddress$p$0=Function.createDelegate(this,this._getEmailAddress$p$0);this._data$p$0=n;r.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0);r.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0);r.ScriptHelpers.dictionaryContainsKey(n,"appointmentResponse")&&r.InitialData._defineReadOnlyProperty$i(this,"appointmentResponse",this.$$d__getAppointmentResponse$p$0);r.ScriptHelpers.dictionaryContainsKey(n,"recipientType")&&r.InitialData._defineReadOnlyProperty$i(this,"recipientType",this.$$d__getRecipientType$p$0)};r.EmailAddressDetails._createFromEmailUserDictionary$i=function(n){var t={};var u=n.Name;var i=n.UserId;t.name=u||r.EmailAddressDetails._emptyString$p;t.address=i||r.EmailAddressDetails._emptyString$p;return new r.EmailAddressDetails(t)};r.EmailAddressDetails.prototype={_data$p$0:null,_getEmailAddress$p$0:function(){return this._data$p$0.address},_getDisplayName$p$0:function(){return this._data$p$0.name},_getAppointmentResponse$p$0:function(){var n=this._data$p$0.appointmentResponse;return n=0;u--){for(var e=!1,f=u-1;f>=0;f--)if(i(t[u],t[f],r)){e=!0;break}e&&Array.removeAt(t,u)}return t};r.Entities.prototype={_dateTimeSent$p$0:null,_data$p$0:null,_filteredData$p$0:null,_filteredEntitiesCache$p$0:null,_permissionLevel$p$0:0,_taskSuggestions$p$0:null,_meetingSuggestions$p$0:null,_phoneNumbers$p$0:null,_contacts$p$0:null,_addresses$p$0:null,_emailAddresses$p$0:null,_urls$p$0:null,_flightReservations$p$0:null,_parcelDeliveries$p$0:null,_getByType$i$0:function(n){if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.MeetingSuggestion)return this._getMeetingSuggestions$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.TaskSuggestion)return this._getTaskSuggestions$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.Address)return this._getAddresses$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.PhoneNumber)return this._getPhoneNumbers$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.EmailAddress)return this._getEmailAddresses$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.Url)return this._getUrls$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.Contact)return this._getContacts$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.FlightReservations)return this._getFlightReservations$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.ParcelDeliveries)return this._getParcelDeliveries$p$0();return null},_getFilteredEntitiesByName$i$0:function(n){this._filteredEntitiesCache$p$0||(this._filteredEntitiesCache$p$0={});if(!r.ScriptHelpers.dictionaryContainsKey(this._filteredEntitiesCache$p$0,n)){for(var u=!1,i=0;i0)return new Date(n.getFullYear()+t._offset$i$1,0,1);break;default:break}return n};r.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p=function(n,t,i){if(t>-5&&t<5){var u=(i+6)%7+1;var r=7*t+(u-n.getDay());n.setDate(n.getDate()+r);return n}else{var r=(i-n.getDay())%7;r<0&&(r+=7);n.setDate(n.getDate()+r);return n}};r.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p=function(n,t){var e;var i;var u;e=n;if(t._tag$i$1<=0||t._tag$i$1>12||t._offset$i$1<=0||t._offset$i$1>5)return n;var o=(12+t._tag$i$1-e.getMonth()-1)%12;i=new Date(e.getFullYear(),e.getMonth()+o,1);if(t._modifier$i$1===1)if(t._offset$i$1===1&&i.getDay()!==6&&i.getDay())return i;else{u=new Date(i.getFullYear(),i.getMonth(),i.getDate());u.setDate(u.getDate()+(8-i.getDay())%7);i.getDay()!==6&&i.getDay()&&i.getDay()!==1&&u.setDate(u.getDate()-7);u.setDate(u.getDate()+7*(t._offset$i$1-1));return u.getMonth()+1!==t._tag$i$1?n:u}else{u=new Date(i.getFullYear(),i.getMonth(),r.MeetingSuggestionTimeDecoder._daysInMonth$p(i.getMonth(),i.getFullYear()));var f=1-u.getDay();f>0&&(f=f-7);u.setDate(u.getDate()+f);u.setDate(u.getDate()+7*(1-t._offset$i$1));return u.getMonth()+1!==t._tag$i$1?i.getDay()!==6&&i.getDay()?i:n:u}};r.MeetingSuggestionTimeDecoder._decode$p=function(n,t,i){var e=32767;t.val=null;i.val=0;if(!n)return!1;i.val=r.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p(n);var o=n.getTime()-i.val;var u=(o-r.MeetingSuggestionTimeDecoder._baseDate$p.getTime())/864e5;if(u<0)return!1;else if(u>=262144)return!1;else{var f=u>>15;u=u&e;switch(f){case 0:return r.MeetingSuggestionTimeDecoder._decodePreciseDate$p(u,t);case 1:return r.MeetingSuggestionTimeDecoder._decodeRelativeDate$p(u,t);default:return!1}}};r.MeetingSuggestionTimeDecoder._decodePreciseDate$p=function(n,t){var c=7;var o=15;var s=31;var h=127;var f=null;var u=0;var e=0;t.val=null;var i=n>>12&c;if((i&4)==4){f=n>>5&h;if((i&2)==2){if((i&1)==1)return!1;u=n>>1&o}}else{(i&2)==2&&(u=n>>8&o);(i&1)==1&&(e=n>>3&s)}t.val=new r._preciseDate(e,u,f);return!0};r.MeetingSuggestionTimeDecoder._decodeRelativeDate$p=function(n,t){var s=15;var o=63;var c=7;var h=3;var u=n&s;n>>=4;var i=r.MeetingSuggestionTimeDecoder._fromComplement$p(n&o,6);n>>=6;var e=n&c;n>>=3;var f=n&h;try{t.val=new r._relativeDate(f,i,e,u);return!0}catch(l){t.val=null;return!1}};r.MeetingSuggestionTimeDecoder._fromComplement$p=function(n,t){var i=1<2||!Function.isInstanceOfType(n[0]))return!1;f=n[0];i>1&&(u=n[1]);t.val=new r.CommonParameters(null,f,u);return!0};r.CommonParameters.prototype={_options$p$0:null,_callback$p$0:null,_asyncContext$p$0:null,get_options:function(){return this._options$p$0},get_callback:function(){return this._callback$p$0},get_asyncContext:function(){return this._asyncContext$p$0}};r.EwsRequest=function(n){r.EwsRequest.initializeBase(this,[n])};r.EwsRequest.prototype={readyState:1,status:0,statusText:null,onreadystatechange:null,responseText:null,get__statusCode$i$1:function(){return this.status},set__statusCode$i$1:function(n){this.status=n;return n},get__statusDescription$i$1:function(){return this.statusText},set__statusDescription$i$1:function(n){this.statusText=n;return n},get__requestState$i$1:function(){return this.readyState},set__requestState$i$1:function(n){this.readyState=n;return n},get_hasOnReadyStateChangeCallback:function(){return!r.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)},get__response$i$1:function(){return this.responseText},set__response$i$1:function(n){this.responseText=n;return n},send:function(n){this._checkSendConditions$i$1();r.ScriptHelpers.isNullOrUndefined(n)&&this._throwInvalidStateException$i$1();this._sendRequest$i$0(5,"EwsRequest",{body:n})},_callOnReadyStateChangeCallback$i$1:function(){r.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)||this.onreadystatechange()},_parseExtraResponseData$i$1:function(n){},executeExtraFailedResponseSteps:function(){}};r.InitialData=function(n){this._data$p$0=n;this._permissionLevel$p$0=this._calculatePermissionLevel$p$0()};r.InitialData._defineReadOnlyProperty$i=function(n,t,i){var r={get:i,configurable:!1};window.Object.defineProperty(n,t,r)};r.InitialData.prototype={_toRecipients$p$0:null,_ccRecipients$p$0:null,_attachments$p$0:null,_resources$p$0:null,_entities$p$0:null,_selectedEntities$p$0:null,_data$p$0:null,_permissionLevel$p$0:0,get__isRestIdSupported$i$0:function(){return this._data$p$0.isRestIdSupported},get__itemId$i$0:function(){return this._data$p$0.id},get__itemClass$i$0:function(){return this._data$p$0.itemClass},get__dateTimeCreated$i$0:function(){return new Date(this._data$p$0.dateTimeCreated)},get__dateTimeModified$i$0:function(){return new Date(this._data$p$0.dateTimeModified)},get__dateTimeSent$i$0:function(){return new Date(this._data$p$0.dateTimeSent)},get__subject$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();return this._data$p$0.subject},get__normalizedSubject$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();return this._data$p$0.normalizedSubject},get__internetMessageId$i$0:function(){return this._data$p$0.internetMessageId},get__conversationId$i$0:function(){return this._data$p$0.conversationId},get__sender$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();var n=this._data$p$0.sender;return r.ScriptHelpers.isNullOrUndefined(n)?null:new r.EmailAddressDetails(n)},get__from$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();var n=this._data$p$0.from;return r.ScriptHelpers.isNullOrUndefined(n)?null:new r.EmailAddressDetails(n)},get__to$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._toRecipients$p$0&&(this._toRecipients$p$0=this._createEmailAddressDetails$p$0("to"));return this._toRecipients$p$0},get__cc$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._ccRecipients$p$0&&(this._ccRecipients$p$0=this._createEmailAddressDetails$p$0("cc"));return this._ccRecipients$p$0},get__attachments$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._attachments$p$0&&(this._attachments$p$0=this._createAttachmentDetails$p$0());return this._attachments$p$0},get__ewsUrl$i$0:function(){return this._data$p$0.ewsUrl},get__restUrl$i$0:function(){return this._data$p$0.restUrl},get__marketplaceAssetId$i$0:function(){return this._data$p$0.marketplaceAssetId},get__extensionId$i$0:function(){return this._data$p$0.extensionId},get__marketplaceContentMarket$i$0:function(){return this._data$p$0.marketplaceContentMarket},get__consentMetadata$i$0:function(){return this._data$p$0.consentMetadata},get__isRead$i$0:function(){return this._data$p$0.isRead},get__endNodeUrl$i$0:function(){return this._data$p$0.endNodeUrl},get__entryPointUrl$i$0:function(){return this._data$p$0.entryPointUrl},get__start$i$0:function(){return new Date(this._data$p$0.start)},get__end$i$0:function(){return new Date(this._data$p$0.end)},get__location$i$0:function(){return this._data$p$0.location},get__userProfileType$i$0:function(){return this._data$p$0.userProfileType},get__resources$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._resources$p$0&&(this._resources$p$0=this._createEmailAddressDetails$p$0("resources"));return this._resources$p$0},get__organizer$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();var n=this._data$p$0.organizer;return r.ScriptHelpers.isNullOrUndefined(n)?null:new r.EmailAddressDetails(n)},get__userDisplayName$i$0:function(){return this._data$p$0.userDisplayName},get__userEmailAddress$i$0:function(){return this._data$p$0.userEmailAddress},get__userTimeZone$i$0:function(){return this._data$p$0.userTimeZone},get__timeZoneOffsets$i$0:function(){return this._data$p$0.timeZoneOffsets},get__hostVersion$i$0:function(){return this._data$p$0.hostVersion},get__owaView$i$0:function(){return this._data$p$0.owaView},get__overrideWindowOpen$i$0:function(){return this._data$p$0.overrideWindowOpen},_getEntities$i$0:function(){this._entities$p$0||(this._entities$p$0=new r.Entities(this._data$p$0.entities,this._data$p$0.filteredEntities,this.get__dateTimeSent$i$0(),this._permissionLevel$p$0));return this._entities$p$0},_getSelectedEntities$i$0:function(){this._selectedEntities$p$0||(this._selectedEntities$p$0=new r.Entities(this._data$p$0.selectedEntities,null,this.get__dateTimeSent$i$0(),this._permissionLevel$p$0));return this._selectedEntities$p$0},_getEntitiesByType$i$0:function(n){var t=this._getEntities$i$0();return t._getByType$i$0(n)},_getFilteredEntitiesByName$i$0:function(n){var t=this._getEntities$i$0();return t._getFilteredEntitiesByName$i$0(n)},_getRegExMatches$i$0:function(){return this._data$p$0.regExMatches?this._data$p$0.regExMatches:null},_getSelectedRegExMatches$i$0:function(){return this._data$p$0.selectedRegExMatches?this._data$p$0.selectedRegExMatches:null},_getRegExMatchesByName$i$0:function(n){var t=this._getRegExMatches$i$0();return!t||!t[n]?null:t[n]},_throwOnRestrictedPermissionLevel$i$0:function(){window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0)},_createEmailAddressDetails$p$0:function(n){var i=this._data$p$0[n];if(r.ScriptHelpers.isNullOrUndefined(i))return[];for(var u=[],t=0;t0?i.push(t):t.tabIndex===0&&u.push(t):u.push(t)}i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;r===0&&(r=i.indexOf(n)-i.indexOf(t));return r});return[].concat(i,u)}return{set_entropy:function(n){if(typeof n=="string")for(var i=0;i1?c[c.length-1]:n;if(r&&o!=n){o.indexOf(rt)>=0&&(o=o.split(rt)[0]);o=decodeURIComponent(o)}var l=p();if(!f&&l){var s=window.name.indexOf(i);if(s>u){var h=window.name.indexOf(";",s);h==u&&(h=window.name.length);var a=window.name.substring(s,h);o?l.setItem(a,o):o=l.getItem(a)}}return o},getConversationId:function(){var i=window.location.search,t=n;if(i){var r=i.indexOf("&");t=r>0?i.substring(1,r):i.substr(1);if(t&&t.charAt(t.length-1)==="="){t=t.substring(0,t.length-1);t&&(t=decodeURIComponent(t))}}return t},getInfoItems:function(n){var t=n.split("$");typeof t[1]==c&&(t=n.split("|"));typeof t[1]==c&&(t=n.split("%7C"));return t},getXdmFieldValue:function(n,t){var u=r,f=OSF.OUtil.parseXdmInfo(t);if(f){var i=OSF.OUtil.getInfoItems(f);if(i!=undefined&&i.length>=3)switch(n){case OSF.XdmFieldName.ConversationUrl:u=i[2];break;case OSF.XdmFieldName.AppId:u=i[1]}}return u},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]);if(u)throw u;for(var f in r){u=Function._validateParameter(n[f],r[f],f);if(u)throw u;}},writeProfilerMark:function(n){if(window.msWriteProfilerMark){window.msWriteProfilerMark(n);OsfMsAjaxFactory.msAjaxDebug.trace(n)}},outputDebug:function(n){typeof OsfMsAjaxFactory!==c&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){r=r||{};for(var e in u){var f=u[e];r[f]==undefined&&(r[f]=i)}Object.defineProperty(n,t,r);return n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[h])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[h])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[it,h,tt])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[it,h,tt])},finalizeProperties:function(n,r){r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8;e=o&255;i[t++]=u>>2;i[t++]=(u&3)<<4|f>>4;i[t++]=(f&15)<<2|e>>6;i[t++]=e&63;if(!isNaN(o)){u=o>>8;f=h&255;e=h>>8;i[t++]=u>>2;i[t++]=(u&3)<<4|f>>4;i[t++]=(f&15)<<2|e>>6;i[t++]=e&63}if(isNaN(o))i[t-1]=64;else if(isNaN(h)){i[t-2]=64;i[t-1]=64}for(var c=0;c0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(var u=[],r=0;rn)return u;else if(t===0&&i)return u;else if(t===n-1&&!i)return u;return i?t-1:t+1};r=d(r);s=f?r.length-1:0;if(r.length===0)return n;while(!h&&s>=0&&sn)return u;else if(t===0&&i)return u;else if(t===n-1&&!i)return u;return i?t-1:t+1};r=d(r);v=y(r,f);s=l(r.length,v,e);if(s<0)return n;while(!c&&s>=0&&s0;t++){(t==8||t==12||t==16||t==20)&&(i+="-");i+=n[r%16];r=Math.floor(r/16)}for(;t<32;t++){(t==8||t==12||t==16||t==20)&&(i+="-");i+=n[Math.floor(Math.random()*16)]}return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];if(i){i.name||(i.name=n[this.errorCodes.ooeInternalError].name);i.message||(i.message=n[this.errorCodes.ooeInternalError].message)}else i=n[this.errorCodes.ooeInternalError];return i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:t.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:t.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage}}}}();var OfficeExt;(function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}();n.RequirementVersion=ut;var r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){if(n==undefined)return!1;t==undefined&&(t=0);var f=this._setMap,u=f._sets;if(u.hasOwnProperty(n.toLowerCase())){var e=u[n.toLowerCase()];try{var i=this._getVersion(e);t=t+"";var r=this._getVersion(t);if(i.major>0&&i.major>r.major||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),r=0,i=0;if(t.length<2&&isNaN(Number(n)))throw u;else{r=Number(t[0]);t.length>=2&&(i=Number(t[1]));if(isNaN(r)||isNaN(i))throw u;}return{minor:i,major:r}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;var i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;var k=function(n){__extends(i,n);function i(){n.call(this,{dialogapi:t})}return i}(i);n.DefaultDialogSetRequirement=k;var o=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return i}(i);n.ExcelClientDefaultSetRequirement=o;var d=function(n){__extends(i,n);function i(){n.call(this);this._addSetMap({imagecoercion:t})}return i}(o);n.ExcelClientV1DefaultSetRequirement=d;var w=function(n){__extends(t,n);function t(){n.call(this,{mailbox:1.3})}return t}(i);n.OutlookClientDefaultSetRequirement=w;var f=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return i}(i);n.WordClientDefaultSetRequirement=f;var b=function(n){__extends(i,n);function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return i}(f);n.WordClientV1DefaultSetRequirement=b;var e=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return i}(i);n.PowerpointClientDefaultSetRequirement=e;var tt=function(n){__extends(i,n);function i(){n.call(this);this._addSetMap({imagecoercion:t})}return i}(e);n.PowerpointClientV1DefaultSetRequirement=tt;var it=function(n){__extends(i,n);function i(){n.call(this,{selection:t,textcoercion:t})}return i}(i);n.ProjectClientDefaultSetRequirement=it;var g=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return i}(i);n.ExcelWebDefaultSetRequirement=g;var nt=function(n){__extends(i,n);function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return i}(i);n.WordWebDefaultSetRequirement=nt;var h=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,settings:t})}return i}(i);n.PowerpointWebDefaultSetRequirement=h;var s=function(n){__extends(t,n);function t(){n.call(this,{mailbox:1.3})}return t}(i);n.OutlookWebDefaultSetRequirement=s;var l=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return i}(i);n.SwayWebDefaultSetRequirement=l;var c=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return i}(i);n.AccessWebDefaultSetRequirement=c;var y=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return i}(i);n.ExcelIOSDefaultSetRequirement=y;var u=function(n){__extends(i,n);function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return i}(i);n.WordIOSDefaultSetRequirement=u;var p=function(n){__extends(t,n);function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return t}(u);n.WordIOSV1DefaultSetRequirement=p;var a=function(n){__extends(i,n);function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return i}(i);n.PowerpointIOSDefaultSetRequirement=a;var v=function(n){__extends(i,n);function i(){n.call(this,{mailbox:t})}return i}(i);n.OutlookIOSDefaultSetRequirement=v;var rt=function(){var t="undefined";function n(){}n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)};n.getDefaultRequirementMatrix=function(u){this.initializeDefaultSetMatrix();var f=undefined,o=u.get_requirementMatrix();if(o!=undefined&&o.length>0&&typeof JSON!==t){var s=JSON.parse(u.get_requirementMatrix().toLowerCase());f=new r(new i(s))}else{var e=n.getClientFullVersionString(u);f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[e]!=undefined?new r(n.DefaultSetArrayMatrix[e]):new r(new i({}))}return f};n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix();if(f!=undefined&&f.length>0&&typeof JSON!==t){var e=JSON.parse(n.get_requirementMatrix().toLowerCase());u=new r(new i(e))}else u=new r(new k);return u};n.getClientFullVersionString=function(n){var r=n.get_appMinorVersion(),u="",i="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;if(f&&n.get_appVersion()==1)i=t==4096&&r>=15?"16.00.01":"16.00";else if(n.get_appName()==64)i=n.get_appVersion();else{u=r<10?"0"+r:""+r;i=n.get_appVersion()+"."+u}return n.get_appName()+"-"+i};n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new o;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new d;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new b;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new tt;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new w;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new g;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new nt;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new s;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new s;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new it;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new c;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new h;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new y;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new l;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new u;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new p;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new a;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new v};n.Excel_RCLIENT_1600="1-16.00";n.Excel_RCLIENT_1601="1-16.01";n.Word_RCLIENT_1600="2-16.00";n.Word_RCLIENT_1601="2-16.01";n.PowerPoint_RCLIENT_1600="4-16.00";n.PowerPoint_RCLIENT_1601="4-16.01";n.Outlook_RCLIENT_1600="8-16.00";n.Excel_WAC_1600="16-16.00";n.Word_WAC_1600="32-16.00";n.Outlook_WAC_1600="64-16.00";n.Outlook_WAC_1601="64-16.01";n.Project_RCLIENT_1600="128-16.00";n.Access_WAC_1600="256-16.00";n.PowerPoint_WAC_1600="512-16.00";n.Excel_IOS_1600="1024-16.00";n.SWAY_WAC_1600="2048-16.00";n.Word_IOS_1600="4096-16.00";n.Word_IOS_16001="4096-16.00.01";n.PowerPoint_IOS_1600="8192-16.00";n.Outlook_IOS_1600="65536-16.00";n.DefaultSetArrayMatrix={};return n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))})(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda();var OfficeExt;(function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n};n.getInstance=function(){n.hostObj===undefined&&(n.hostObj=new n);return n.hostObj};n.prototype.getPlatform=function(){var n=this;if(n.hostInfo.hostPlatform){var t=n.hostInfo.hostPlatform.toLowerCase();if(n.platformRemappings[t])return n.platformRemappings[t]}return null};n.prototype.getHost=function(){var n=this;if(n.hostInfo.hostType){var t=n.hostInfo.hostType.toLowerCase();if(n.camelCaseMappings[t])return n.camelCaseMappings[t];t=n.capitalizeFirstLetter(n.hostInfo.hostType);if(Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null};n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null};return n}();n.Host=t})(t=n.HostName||(n.HostName={}))})(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){if(!n){window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window);window.Office=Microsoft.Office.WebExtension;n=!0}},disableShortcut:function(){if(n){t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window);n=!1}}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i;if(n&&typeof n=="string"){var r=n.indexOf("#");if(r!=-1){var o=n.substring(0,r),e=n.substring(r+1);switch(o){case"binding":case"bindings":e&&(i=new OSF.DDA.BindingPromise(e))}}}if(i){i.onFail=t;return i}else if(t){var u=typeof t;if(u=="function"){var f={};f[Microsoft.Office.WebExtension.Parameters.Callback]=t;OSF.DDA.issueAsyncResult(f,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,u);}};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.auth&&OSF.OUtil.defineEnumerableProperty(f,"auth",{value:n.auth});if(n.get_isDialog()){var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n);OSF.OUtil.defineEnumerableProperty(f,o,{value:e})}else{t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t});if(r){var s=r.displayName||"appOM";delete r.displayName;OSF.OUtil.defineEnumerableProperty(f,s,{value:r})}u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}});var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n);OSF.OUtil.defineEnumerableProperty(f,o,{value:e})}};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});var u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext());return n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,o=n.length,e=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){for(var u in n){var i=n[u],r=t[u];if(i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw e();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw e();}};f.extractRequiredArguments=function(t,i,r){if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var f,e,l=n.length-1;l>=s;l--){var c=n[l];switch(typeof c){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=c;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=c;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}f=o.fillOptions(f,i,r,u);if(e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;o.verifyArguments(t,f);return f}this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),f=c(n,r,t,i);return o.constructCallArgs(r,f,t,i)};this.processResponse=function(n,t,i,f){var e;e=n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n);return e};this.getCallArgs=function(n){for(var t,u,r=n.length-1;r>=s;r--){var i=n[r];switch(typeof i){case"object":t=i;break;case h:u=i}}t=t||{};u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u);return t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var i=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],t=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],i,t,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback];if(f){var u={};u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext];var r;if(t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)u[OSF.DDA.AsyncResultEnum.Properties.Value]=i;else{r={};i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i;r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i}f(new OSF.DDA.AsyncResult(u,r))}};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){for(var t in n){var i={};OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}});OSF.DDA.SyncMethodNames[t]=i}};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);function o(n,i,r,u){if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var o,c,s=n.length-1;s>=e;s--){var h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}o=f.fillOptions(o,i,r,u);f.verifyArguments(t,o);return o}this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),e=o(n,r,t,i);return f.constructCallArgs(r,e,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){var l="fromHost",i=this,o="toHost",f=l,a="sourceData",u="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];function e(i,u){var a=i?{}:undefined;for(var h in i){var s=i[h],o;if(OSF.DDA.ListType.isListType(h)){o=[];for(var v in s)o.push(e(s[v],u))}else if(OSF.OUtil.listContainsKey(r,h))o=r[h][u](s);else if(u==f&&n.preserveNesting(h))o=e(s,u);else{var c=t[h];if(c){var l=c[u];if(l){o=l[s];o===undefined&&(o=s)}}else o=s}a[h]=o}return a}function c(i,r){var s;for(var f in r){var e;e=n.isComplexType(f)?c(i,t[f][o]):i[f];if(e!=undefined){s||(s={});var h=r[f];h==u&&(h=f);s[h]=n.pack(f,e)}}return s}function s(i,r,e){e||(e={});for(var h in r){var l=r[h],o;if(l==u)o=i;else if(l==a){e[h]=i.toArray();continue}else o=i[l];if(o===null||o===undefined)e[h]=undefined;else{o=n.unpack(h,o);var c;if(n.isComplexType(h)){c=t[h][f];n.preserveNesting(h)?e[h]=s(o,c):s(o,c,e)}else if(OSF.DDA.ListType.isListType(h)){c={};var p=OSF.DDA.ListType.getDescriptor(h);c[p]=u;var v=new Array(o.length);for(var y in o)v[y]=s(o[y],c);e[h]=v}else e[h]=o}}return e}function h(n,i,r){var f=t[n][r],u;if(r=="toHost"){var h=e(i,r);u=c(h,f)}else if(r==l){var o=s(i,f);u=e(o,r)}return u}t||(t={});i.addMapping=function(n,i){var e,s;if(i.map){e=i.map;s={};for(var c in e){var l=e[c];l==u&&(l=c);s[l]=c}}else{e=i.toHost;s=i.fromHost}var r=t[n];if(r){var h=r[o];for(var v in h)e[v]=h[v];h=r[f];for(var a in h)s[a]=h[a]}else r=t[n]={};r[o]=e;r[f]=s};i.toHost=function(n,t){return h(n,t,o)};i.fromHost=function(n,t){return h(n,t,f)};i.self=u;i.sourceData=a;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset);OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]));return OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){var r;r=this.isDynamicType(n)?t[n].toHost(i):i;return r};i.unpack=function(n,i){var r;r=this.isDynamicType(n)?t[n].fromHost(i):i;return r}};OSF.DDA.getDecoratedParameterMap=function(n,t){var i=new OSF.DDA.HostParameterMap(n),f=i.self;function r(n){var i=null;if(n){i={};for(var r=n.length,t=0;t0&&t.push(i)}}}catch(s){}return t}var i=[],n={};n[Microsoft.Office.WebExtension.Parameters.Data]=function(){var i=0,n=1;return{toHost:function(t){if(OSF.DDA.TableDataProperties&&typeof t!="string"&&t[OSF.DDA.TableDataProperties.TableRows]!==undefined){var r=[];r[i]=t[OSF.DDA.TableDataProperties.TableRows];r[n]=t[OSF.DDA.TableDataProperties.TableHeaders];t=r}return t},fromHost:function(r){var f;if(r.toArray){var e=r.dimensions();if(e===2)f=t(r);else{var u=r.toArray();if(u.length===2&&(u[0]!=null&&u[0].toArray||u[1]!=null&&u[1].toArray)){f={};f[OSF.DDA.TableDataProperties.TableRows]=t(u[i]);f[OSF.DDA.TableDataProperties.TableHeaders]=t(u[n])}else f=u}}else f=r;return f}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,i,n);this.unpack=function(t,i){var r;if(this.isComplexType(t)||OSF.DDA.ListType.isListType(t)){var u=(i||typeof i=="unknown")&&i.toArray;r=u?i.toArray():i||{}}else r=this.isDynamicType(t)?n[t].fromHost(i):i;return r}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(n){function i(n){var t=n;if(OSF.OUtil.isArray(n))for(var f=t.length,r=0;r2){r=[];for(var f=1;f=3){f=n[0];e=n[2];var t=OSF.OUtil.parseSerializerVersionWithGivenFragment(!1,OSF._OfficeAppFactory.getWindowLocationHash());isNaN(t)&&OSF._OfficeAppFactory.getWindowName&&(t=OSF.OUtil.parseSerializerVersionFromWindowName(!1,OSF._OfficeAppFactory.getWindowName()));i=Microsoft.Office.Common.XdmCommunicationManager.connect(f,window.parent,e,t)}}var u=null;if(i)try{i.invoke("getCustomizedScriptPathAsync",function(n,t){o(n===0?t:null)},{__timeout__:1e3})}catch(s){OsfMsAjaxFactory.msAjaxDebug.trace("no script override through cross frame communication.")}else{try{window.external&&typeof window.external.getCustomizedScriptPath!="undefined"&&(u=window.external.getCustomizedScriptPath())}catch(s){OsfMsAjaxFactory.msAjaxDebug.trace("no script override through window.external.")}o(u)}},t=!0;t&&!OsfMsAjaxFactory.isMsAjaxLoaded()?OSF._OfficeAppFactory&&OSF._OfficeAppFactory&&OSF._OfficeAppFactory.getLoadScriptHelper&&OSF._OfficeAppFactory.getLoadScriptHelper().isScriptLoading(OSF.ConstantNames.MicrosoftAjaxId)?OSF._OfficeAppFactory.getLoadScriptHelper().waitForScripts([OSF.ConstantNames.MicrosoftAjaxId],n):OsfMsAjaxFactory.loadMsAjaxFull(function(){if(OsfMsAjaxFactory.isMsAjaxLoaded())n();else throw"Not able to load MicrosoftAjax.js.";}):n()})();Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(n){var i=this;i._eventHandlers={};i._objectEventHandlers={};i._queuedEventsArgs={};for(var u in n){var t=n[u],r=t=="objectDeleted"||t=="objectSelectionChanged"||t=="objectDataChanged"||t=="contentControlAdded";r?i._objectEventHandlers[t]={}:i._eventHandlers[t]=[];i._queuedEventsArgs[t]=[]}};OSF.EventDispatch.prototype={getSupportedEvents:function(){var n=[];for(var t in this._eventHandlers)n.push(t);for(var t in this._objectEventHandlers)n.push(t);return n},supportsEvent:function(n){for(var t in this._eventHandlers)if(n==t)return!0;for(var t in this._objectEventHandlers)if(n==t)return!0;return!1},hasEventHandler:function(n,t){var i=this._eventHandlers[n];if(i&&i.length>0)for(var r in i)if(i[r]===t)return!0;return!1},hasObjectEventHandler:function(n,t,i){var f=this._objectEventHandlers[n];if(f!=null)for(var u=f[t],r=0;u!=null&&r0)for(var r=0;r0){this._eventHandlers[n]=[];return!0}return!1},clearObjectEventHandlers:function(n,t){if(this._objectEventHandlers[n]!=null&&this._objectEventHandlers[n][t]!=null){this._objectEventHandlers[n][t]=[];return!0}return!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},getObjectEventHandlerCount:function(n,t){return this._objectEventHandlers[n]==null||this._objectEventHandlers[n][t]==null?0:this._objectEventHandlers[n][t].length},fireEvent:function(n){if(n.type==undefined)return!1;var t=n.type;if(t&&this._eventHandlers[t]){var i=this._eventHandlers[t];for(var r in i)i[r](n);return!0}else return!1},fireObjectEvent:function(n,t){if(t.type==undefined)return!1;var u=t.type;if(u&&this._objectEventHandlers[u]){var f=this._objectEventHandlers[u],i=f[n];if(i!=null){for(var r=0;r0){for(var u=i[0];t.length>0;){var r=t.shift();u(r)}return!0}}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var e="outlookwebapp",o="outlook",f="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(n,i[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:r=new OSF.DDA.RichApiMessageEventArgs(n,i);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]==o||OSF._OfficeAppFactory.getHostInfo()[f]==e){r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i);t.initialize(r.initialData);t.setCurrentItemNumber(r.itemNumber.itemNumber)}else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]==o||OSF._OfficeAppFactory.getHostInfo()[f]==e)r=new OSF.DDA.OlkRecipientsChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]==o||OSF._OfficeAppFactory.getHostInfo()[f]==e)r=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var i=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),t=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];t(arguments,i,n)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(n){var i=OSF.DDA.SyncMethodNames.MessageParent.displayName,t=this;t[i]||OSF.OUtil.defineEnumerableProperty(t,i,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return n(arguments,t)}});var r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;t[r]||typeof OSF.DialogParentMessageEventDispatch=="undefined"||OSF.DDA.DispIdHost.addEventSupport(t,OSF.DialogParentMessageEventDispatch,n);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(n){n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:n[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}}],privateStateCallbacks:[],onSucceeded:function(n){var f=n[Microsoft.Office.WebExtension.Parameters.Id],i=n[Microsoft.Office.WebExtension.Parameters.Data],t=new OSF.DialogHandler,e=OSF.DDA.AsyncMethodNames.CloseAsync.displayName;OSF.OUtil.defineEnumerableProperty(t,e,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];n(arguments,f,i,t)}});var r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;OSF.OUtil.defineEnumerableProperty(t,r,{value:function(){var f=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],n=f.verifyAndExtractCall(arguments,t,i),u=n[Microsoft.Office.WebExtension.Parameters.EventType],r=n[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(u,r)}});var u=OSF.DDA.SyncMethodNames.SendMessage.displayName;OSF.OUtil.defineEnumerableProperty(t,u,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return n(arguments,i,t)}});return t},checkCallArgs:function(n){n[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Width]=1);n[Microsoft.Office.WebExtension.Parameters.Width]>100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99);n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1);n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99);n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0);return n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(n){try{n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,n);OSF.ClientHostController.openDialog(n.dispId,n.targetId,function(t,i){n.onEvent&&n.onEvent(i);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(n){n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,n);try{OSF.ClientHostController.closeDialog(n.dispId,n.targetId,t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.messageParent=function(n){try{n.onCalling&&n.onCalling();var i=+new Date,t=OSF.ClientHostController.messageParent(n.hostCallArgs);n.onReceiving&&n.onReceiving();OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs(+new Date-i),t);return t}catch(r){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(r)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.sendMessage=function(n){try{n.onCalling&&n.onCalling();var r=+new Date,t=OSF.ClientHostController.sendMessage(n.hostCallArgs);n.onReceiving&&n.onReceiving();return t}catch(i){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(i)}};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ItemChanged:"olkItemSelectedChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{OlkItemSelectedData:"OlkItemSelectedData"});OSF.DDA.OlkItemSelectedChangedEventArgs=function(n){var t=n[OSF.DDA.EventDescriptors.OlkItemSelectedData][0];t===""&&(t=null);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.ItemChanged},initialData:{value:JSON.parse(t)},itemNumber:{value:JSON.parse(n[OSF.DDA.EventDescriptors.OlkItemSelectedData][1])}})};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{RecipientsChanged:"olkRecipientsChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{OlkRecipientsData:"OlkRecipientsData"});OSF.DDA.OlkRecipientsChangedEventArgs=function(n){var t=n[OSF.DDA.EventDescriptors.OlkRecipientsData][0];t===""&&(t=null);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.RecipientsChanged},changedRecipientFields:{value:JSON.parse(t)}})};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppointmentTimeChanged:"olkAppointmentTimeChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{OlkAppointmentTimeChangedData:"OlkAppointmentTimeChangedData"});OSF.DDA.OlkAppointmentTimeChangedEventArgs=function(n){var u=n[OSF.DDA.EventDescriptors.OlkAppointmentTimeChangedData][0],i,t;try{var r=JSON.parse(u);i=new Date(r.start).toISOString();t=new Date(r.end).toISOString()}catch(f){i=null;t=null}OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged},start:{value:i},end:{value:t}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidOlkItemSelectedChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.OlkItemSelectedData,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidOlkRecipientsChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.OlkRecipientsData,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidOlkAppointmentTimeChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.OlkAppointmentTimeChangedData,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}],isComplexType:!0});var OSFLog;(function(n){var u="ResponseTime",f="Message",r="SessionId",i="CorrelationId",t=!0,e=function(){function n(n){this._table=n;this._fields={}}Object.defineProperty(n.prototype,"Fields",{get:function(){return this._fields},enumerable:t,configurable:t});Object.defineProperty(n.prototype,"Table",{get:function(){return this._table},enumerable:t,configurable:t});n.prototype.SerializeFields=function(){};n.prototype.SetSerializedField=function(n,t){typeof t!="undefined"&&t!==null&&(this._serializedFields[n]=t.toString())};n.prototype.SerializeRow=function(){var n=this;n._serializedFields={};n.SetSerializedField("Table",n._table);n.SerializeFields();return JSON.stringify(n._serializedFields)};return n}();n.BaseUsageData=e;var c=function(n){var k="IsFromWacAutomation",w="WacHostEnvironment",b="HostJSVersion",y="OfficeJSVersion",p="DocUrl",g="AppSizeHeight",nt="AppSizeWidth",l="ClientId",d="HostVersion",s="Host",h="UserId",e="Browser",o="AssetId",a="AppURL",v="AppInstanceId",c="AppId";__extends(u,n);function u(){n.call(this,"AppActivated")}Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,c,{get:function(){return this.Fields[c]},set:function(n){this.Fields[c]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,v,{get:function(){return this.Fields[v]},set:function(n){this.Fields[v]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,a,{get:function(){return this.Fields[a]},set:function(n){this.Fields[a]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,d,{get:function(){return this.Fields[d]},set:function(n){this.Fields[d]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,l,{get:function(){return this.Fields[l]},set:function(n){this.Fields[l]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,nt,{get:function(){return this.Fields[nt]},set:function(n){this.Fields[nt]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,g,{get:function(){return this.Fields[g]},set:function(n){this.Fields[g]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,p,{get:function(){return this.Fields[p]},set:function(n){this.Fields[p]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,y,{get:function(){return this.Fields[y]},set:function(n){this.Fields[y]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,b,{get:function(){return this.Fields[b]},set:function(n){this.Fields[b]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,w,{get:function(){return this.Fields[w]},set:function(n){this.Fields[w]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,k,{get:function(){return this.Fields[k]},set:function(n){this.Fields[k]=n},enumerable:t,configurable:t});u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(c,n.AppId);n.SetSerializedField(v,n.AppInstanceId);n.SetSerializedField(a,n.AppURL);n.SetSerializedField(o,n.AssetId);n.SetSerializedField(e,n.Browser);n.SetSerializedField(h,n.UserId);n.SetSerializedField(s,n.Host);n.SetSerializedField(d,n.HostVersion);n.SetSerializedField(l,n.ClientId);n.SetSerializedField(nt,n.AppSizeWidth);n.SetSerializedField(g,n.AppSizeHeight);n.SetSerializedField(f,n.Message);n.SetSerializedField(p,n.DocUrl);n.SetSerializedField(y,n.OfficeJSVersion);n.SetSerializedField(b,n.HostJSVersion);n.SetSerializedField(w,n.WacHostEnvironment);n.SetSerializedField(k,n.IsFromWacAutomation)};return u}(e);n.AppActivatedUsageData=c;var l=function(n){var e="StartTime",o="ScriptId";__extends(f,n);function f(){n.call(this,"ScriptLoad")}Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t});f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(o,n.ScriptId);n.SetSerializedField(e,n.StartTime);n.SetSerializedField(u,n.ResponseTime)};return f}(e);n.ScriptLoadUsageData=l;var h=function(n){var h="CloseMethod",s="OpenTime",e="AppSizeFinalHeight",o="AppSizeFinalWidth",f="FocusTime";__extends(u,n);function u(){n.call(this,"AppClosed")}Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t});u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(f,n.FocusTime);n.SetSerializedField(o,n.AppSizeFinalWidth);n.SetSerializedField(e,n.AppSizeFinalHeight);n.SetSerializedField(s,n.OpenTime);n.SetSerializedField(h,n.CloseMethod)};return u}(e);n.AppClosedUsageData=h;var o=function(n){var s="ErrorType",o="Parameters",h="APIID",e="APIType";__extends(f,n);function f(){n.call(this,"APIUsage")}Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t});Object.defineProperty(f.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t});f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(e,n.APIType);n.SetSerializedField(h,n.APIID);n.SetSerializedField(o,n.Parameters);n.SetSerializedField(u,n.ResponseTime);n.SetSerializedField(s,n.ErrorType)};return f}(e);n.APIUsageUsageData=o;var s=function(n){var e="SuccessCode";__extends(u,n);function u(){n.call(this,"AppInitialization")}Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t});Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t});u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(i,n.CorrelationId);n.SetSerializedField(r,n.SessionId);n.SetSerializedField(e,n.SuccessCode);n.SetSerializedField(f,n.Message)};return u}(e);n.AppInitializationUsageData=s})(OSFLog||(OSFLog={}));var Logger;(function(n){"use strict";(function(n){n[n.info=0]="info";n[n.warning=1]="warning";n[n.error=2]="error"})(n.TraceLevel||(n.TraceLevel={}));var f=n.TraceLevel;(function(n){n[n.none=0]="none";n[n.flush=1]="flush"})(n.SendFlag||(n.SendFlag={}));var e=n.SendFlag;function u(){OSF.Logger&&OSF.Logger.ulsEndpoint&&OSF.Logger.ulsEndpoint.loadProxyFrame()}n.allowUploadingData=u;function t(n,t,i){if(OSF.Logger&&OSF.Logger.ulsEndpoint){var u={traceLevel:n,message:t,flag:i,internalLog:!0},r=JSON.stringify(u);OSF.Logger.ulsEndpoint.writeLog(r)}}n.sendLog=t;function i(){try{return new r}catch(n){return null}}var r=function(){function n(){var n=this,t=n;n.proxyFrame=null;n.telemetryEndPoint="https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html";n.buffer=[];n.proxyFrameReady=!1;OSF.OUtil.addEventListener(window,"message",function(n){return t.tellProxyFrameReady(n)});setTimeout(function(){t.loadProxyFrame()},3e3)}n.prototype.writeLog=function(t){var i=this;i.proxyFrameReady===!0?i.proxyFrame.contentWindow.postMessage(t,n.telemetryOrigin):i.buffer.length<128&&i.buffer.push(t)};n.prototype.loadProxyFrame=function(){var n=this;if(n.proxyFrame==null){n.proxyFrame=document.createElement("iframe");n.proxyFrame.setAttribute("style","display:none");n.proxyFrame.setAttribute("src",n.telemetryEndPoint);document.head.appendChild(n.proxyFrame)}};n.prototype.tellProxyFrameReady=function(t){var i=this,e=i;if(t.data==="ProxyFrameReadyToLog"){i.proxyFrameReady=!0;for(var r=0;r40){n=OSF.OUtil.Guid.generateNewGuid();t.setValue(t.clientIDKey,n)}return n};n.prototype.saveLog=function(n,t){var u=this,i=u.getValue(u.logIdSetKey);i=(i&&i.length>0?i+";":r)+n;u.setValue(u.logIdSetKey,i);u.setValue(n,t)};n.prototype.enumerateLog=function(n,t){var i=this,f=i.getValue(i.logIdSetKey);if(f){var e=f.split(";");for(var o in e){var r=e[o],u=i.getValue(r);if(u){n&&n(r,u);t&&i.remove(r)}}t&&i.remove(i.logIdSetKey)}};n.prototype.getValue=function(n){var i=OSF.OUtil.getLocalStorage(),t=r;i&&(t=i.getItem(n));return t};n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)};n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}};return n}(),o=function(){function t(){}t.prototype.LogData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(t)}catch(i){}};t.prototype.LogRawData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(t))}catch(i){}};return t}();function u(n){n&&(n=n.replace(/[{}]/g,r).toLowerCase());return n||r}function d(e){if(OSF.Logger&&!t){t=new g;t.hostVersion=e.get_hostFullVersion()?e.get_hostFullVersion():e.get_appVersion();t.appId=e.get_id();t.host=e.get_appName();t.browser=window.navigator.userAgent;t.correlationId=u(e.get_correlationId());t.clientId=(new l).getClientId();t.appInstanceId=e.get_appInstanceId();t.appInstanceId&&(t.appInstanceId=t.appInstanceId.replace(/[{}]/g,r).toLowerCase());t.message=e.get_hostCustomMessage();t.officeJSVersion=OSF.ConstantNames.FileVersion;t.hostJSVersion="16.0.8620.1000";e._wacHostEnvironment&&(t.wacHostEnvironment=e._wacHostEnvironment);e._isFromWacAutomation!==undefined&&e._isFromWacAutomation!==i&&(t.isFromWacAutomation=e._isFromWacAutomation.toString().toLowerCase());var s=e.get_docUrl();t.docUrl=nt.test(s)?s:r;var o=location.href;o&&(o=o.split("?")[0].split("#")[0]);t.appURL=o;(function(n,t){var o,s,u;t.assetId=r;t.userId=r;try{o=decodeURIComponent(n);s=new DOMParser;u=s.parseFromString(o,"text/xml");var e=u.getElementsByTagName("t")[0].attributes.getNamedItem("cid"),f=u.getElementsByTagName("t")[0].attributes.getNamedItem("oid");e&&e.nodeValue?t.userId=e.nodeValue:f&&f.nodeValue&&(t.userId=f.nodeValue);t.assetId=u.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(h){}finally{o=i;u=i;s=i}})(e.get_eToken(),t);(function(){var l=new Date,r=i,o=0,c=!1,u=function(){if(document.hasFocus())r==i&&(r=new Date);else if(r){o+=Math.abs(+new Date-r.getTime());r=i}},t=[];t.push(new f("focus",u));t.push(new f("blur",u));t.push(new f("focusout",u));t.push(new f("focusin",u));var s=function(){for(var u=0;u6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix){i=new Date(parseInt(t.slice(5,-1)));if(i)return i}return t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,!0);r[i]=t}catch(u){}}return r}};OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(n,t,i){Type.registerNamespace("Microsoft.Office.WebExtension.MailboxEnums");Microsoft.Office.WebExtension.MailboxEnums.EntityType={MeetingSuggestion:"meetingSuggestion",TaskSuggestion:"taskSuggestion",Address:"address",EmailAddress:"emailAddress",Url:"url",PhoneNumber:"phoneNumber",Contact:"contact",FlightReservations:"flightReservations",ParcelDeliveries:"parcelDeliveries"};Microsoft.Office.WebExtension.MailboxEnums.ItemType={Message:"message",Appointment:"appointment"};Microsoft.Office.WebExtension.MailboxEnums.ResponseType={None:"none",Organizer:"organizer",Tentative:"tentative",Accepted:"accepted",Declined:"declined"};Microsoft.Office.WebExtension.MailboxEnums.RecipientType={Other:"other",DistributionList:"distributionList",User:"user",ExternalUser:"externalUser"};Microsoft.Office.WebExtension.MailboxEnums.AttachmentType={File:"file",Item:"item",Cloud:"cloud"};Microsoft.Office.WebExtension.MailboxEnums.BodyType={Text:"text",Html:"html"};Microsoft.Office.WebExtension.MailboxEnums.ItemNotificationMessageType={ProgressIndicator:"progressIndicator",InformationalMessage:"informationalMessage",ErrorMessage:"errorMessage",InsightMessage:"insightMessage"};Microsoft.Office.WebExtension.MailboxEnums.Folder={Inbox:"inbox",Junk:"junk",DeletedItems:"deletedItems"};Microsoft.Office.WebExtension.CoercionType={Text:"text",Html:"html"};Microsoft.Office.WebExtension.MailboxEnums.UserProfileType={Office365:"office365",OutlookCom:"outlookCom",Enterprise:"enterprise"};Microsoft.Office.WebExtension.MailboxEnums.RestVersion={v1_0:"v1.0",v2_0:"v2.0",Beta:"beta"};Microsoft.Office.WebExtension.MailboxEnums.ModuleType={Addins:"addins"};Microsoft.Office.WebExtension.MailboxEnums.ActionType={ShowTaskPane:"showTaskPane"};Type.registerNamespace("OSF.DDA");var u=window.OSF||{};u.DDA=u.DDA||{};window.OSF.DDA.OutlookAppOm=u.DDA.OutlookAppOm=function(n,t,i){this.$$d_navigateToModuleAsync=Function.createDelegate(this,this.navigateToModuleAsync);this.$$d_displayPersonaCardAsync=Function.createDelegate(this,this.displayPersonaCardAsync);this.$$d_displayNewMessageFormApi=Function.createDelegate(this,this.displayNewMessageFormApi);this.$$d__displayNewAppointmentFormApi$p$0=Function.createDelegate(this,this._displayNewAppointmentFormApi$p$0);this.$$d_windowOpenOverrideHandler=Function.createDelegate(this,this.windowOpenOverrideHandler);this.$$d__getRestUrl$p$0=Function.createDelegate(this,this._getRestUrl$p$0);this.$$d__getEwsUrl$p$0=Function.createDelegate(this,this._getEwsUrl$p$0);this.$$d__getDiagnostics$p$0=Function.createDelegate(this,this._getDiagnostics$p$0);this.$$d__getUserProfile$p$0=Function.createDelegate(this,this._getUserProfile$p$0);this.$$d_getItem=Function.createDelegate(this,this.getItem);this.$$d__callAppReadyCallback$p$0=Function.createDelegate(this,this._callAppReadyCallback$p$0);this.$$d__getInitialDataResponseHandler$p$0=Function.createDelegate(this,this._getInitialDataResponseHandler$p$0);window.OSF.DDA.OutlookAppOm._instance$p=this;this._officeAppContext$p$0=n;this._appReadyCallback$p$0=i;var r=this;var u=function(){i&&(r._officeAppContext$p$0.get_isDialog()?window.setTimeout(r.$$d__callAppReadyCallback$p$0,0):r.invokeHostMethod(1,null,r.$$d__getInitialDataResponseHandler$p$0))};this._areStringsLoaded$p$0()?u():this._loadLocalizedScript$p$0(u)};window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i=function(n){if(!n)throw Error.create(window._u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text);};window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i=function(n,t,i,r){if(ni)throw Error.argumentOutOfRange(r);};window.OSF.DDA.OutlookAppOm._throwOnInvalidModule$p=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("module");else if(n==="")throw Error.argument("module","module cannot be empty.");if(n!==window.Microsoft.Office.WebExtension.MailboxEnums.ModuleType.Addins)throw Error.notImplemented(String.format("API not supported for module '{0}'",n));};window.OSF.DDA.OutlookAppOm._getHtmlBody$p=function(n){var t="";if("htmlBody"in n){window.OSF.DDA.OutlookAppOm._throwOnInvalidHtmlBody$p(n.htmlBody);t=n.htmlBody}return t};window.OSF.DDA.OutlookAppOm._getAttachments$p=function(n){var t=[];if("attachments"in n){t=n.attachments;window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentsArray$p(t)}return t};window.OSF.DDA.OutlookAppOm._getOptionsAndCallback$p=function(n){var t=[];"options"in n&&(t[0]=n.options);"callback"in n&&(t[t.length]=n.callback);return t};window.OSF.DDA.OutlookAppOm._createAttachmentsDataForHost$p=function(n){var r=new Array(0);if(Array.isInstanceOfType(n))for(var t=0;t2048)throw Error.argumentOutOfRange("attachments",n.length,window._u.ExtensibilityStrings.l_AttachmentUrlTooLong_Text);window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentName$p(t)};window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentItemIdOrName$p=function(n,t){if(!String.isInstanceOfType(n)||!String.isInstanceOfType(t))throw Error.argument("attachments");if(n.length>200)throw Error.argumentOutOfRange("attachments",n.length,window._u.ExtensibilityStrings.l_AttachmentItemIdTooLong_Text);window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentName$p(t)};window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentName$p=function(n){if(n.length>255)throw Error.argumentOutOfRange("attachments",n.length,window._u.ExtensibilityStrings.l_AttachmentNameTooLong_Text);};window.OSF.DDA.OutlookAppOm._throwOnInvalidRestVersion$p=function(n){if(!n)throw Error.argumentNull("restVersion");if(n!==window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v1_0&&n!==window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v2_0&&n!==window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.Beta)throw Error.argument("restVersion");};window.OSF.DDA.OutlookAppOm.getItemIdBasedOnHost=function(n){return window.OSF.DDA.OutlookAppOm._instance$p._initialData$p$0&&window.OSF.DDA.OutlookAppOm._instance$p._initialData$p$0.get__isRestIdSupported$i$0()?window.OSF.DDA.OutlookAppOm._instance$p.convertToRestId(n,window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v1_0):window.OSF.DDA.OutlookAppOm._instance$p.convertToEwsId(n,window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v1_0)};window.OSF.DDA.OutlookAppOm.addAdditionalArgs=function(n,t){return t};window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p=function(n,t,i){if(Object.getType(n)!==t)throw Error.argumentType(i);};window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p=function(n,t,i,u){if(!r.ScriptHelpers.isNullOrUndefined(n)){window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(n,String,u);var f=n;window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(f.length,t,i,u)}};window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p=function(n){return n?n.join(";"):null};window.OSF.DDA.OutlookAppOm._convertComposeEmailDictionaryParameterForSetApi$p=function(n){if(!n)return null;for(var i=new Array(n.length),t=0;t2){var t=window.JSON.parse(n[2]);if(Object.isInstanceOfType(t)){var r=t;i=r.itemNumber}}return i},createDeserializedData:function(n,t){var i=null;var r=window.JSON.parse(n[0]);if(Object.isInstanceOfType(r))i=this._createDeserializedDataWithDictionary$p$0(n,t);else if(Number.isInstanceOfType(r))i=this._createDeserializedDataWithInt$p$0(n,t);else throw Error.notImplemented("Return data type from host must be Dictionary or int");return i},_createDeserializedDataWithDictionary$p$0:function(n,t){var i=window.JSON.parse(n[0]);if(t){i.error=!0;i.errorCode=9030}else if(n.length>1&&n[1]){i.error=!0;i.errorCode=n[1]}else i.error=!1;return i},_createDeserializedDataWithInt$p$0:function(n,t){var i={};i.error=!0;i.errorCode=n[0];return i},invokeHostMethod:function(n,t,i){var f=+new Date;var o=this;var e=function(t,r){if(window.OSF.AppTelemetry){var u=r;var e=-1;u&&u.errorCode&&(e=u.errorCode);window.OSF.AppTelemetry.onMethodDone(n,null,Math.abs(+new Date-f),e)}i&&i(t,r)};if(64===this._officeAppContext$p$0.get_appName()){var r={ApiParams:t};r.MethodData={ControlId:u._OfficeAppFactory.getId(),DispatchId:n};r=window.OSF.DDA.OutlookAppOm.addAdditionalArgs(n,r);n===1?this.get_clientEndPoint().invoke("GetInitialData",e,r):this.get_clientEndPoint().invoke("ExecuteMethod",e,r)}else this._isOwaOnlyMethod$p$0(n)?i&&i(-2,null):this.callOutlookDispatcher(n,t,i,f)},callOutlookDispatcher:function(n,t,i,r){var e=this.convertToOutlookParameters(n,t);var f=this;u.ClientHostController.execute(n,e,function(t,u){var h=-1;var e=null;var o=t.toArray();if(o.length>0){var s=f.getItemNumberFromOutlookResponse(o);var l=s>0;var c=l&&s>f._additionalOutlookParams$p$0._itemNumber$p$0;e=f.createDeserializedData(o,c);e&&e.errorCode&&(h=e.errorCode)}else if(i)throw Error.argumentNull("responseData","Unexpected null/empty data from host.");if(window.OSF.AppTelemetry)window.OSF.AppTelemetry.onMethodDone(n,null,Math.abs(+new Date-r),h);i&&i(u,e)})},_dictionaryToDate$i$0:function(n){var t=new Date(n.year,n.month,n.date,n.hours,n.minutes,n.seconds,n.milliseconds?n.milliseconds:0);if(window.isNaN(t.getTime()))throw Error.format(window._u.ExtensibilityStrings.l_InvalidDate_Text);return t},_dateToDictionary$i$0:function(n){var t={};t.month=n.getMonth();t.date=n.getDate();t.year=n.getFullYear();t.hours=n.getHours();t.minutes=n.getMinutes();t.seconds=n.getSeconds();t.milliseconds=n.getMilliseconds();return t},_isOwaOnlyMethod$p$0:function(n){switch(n){case 402:case 401:case 400:case 403:return!0;default:return!1}},isOutlook16OrGreater:function(){var n=this._initialData$p$0.get__hostVersion$i$0();var i=0;var t=0;if(n){i=n.indexOf(".");t=window.parseInt(n.substring(0,i))}return t>=16},isApiVersionSupported:function(n){var r=!1;try{var u=window.JSON.parse(this._officeAppContext$p$0.get_requirementMatrix());var f=u.Mailbox;var i=f.split(".");var t=n.split(".");(window.parseInt(i[0])>window.parseInt(t[0])||window.parseInt(i[0])===window.parseInt(t[0])&&window.parseInt(i[1])>=window.parseInt(t[1]))&&(r=!0)}catch(e){}return r},convertToOutlookParameters:function(n,t){var i=null;var r={};switch(n){case 1:case 2:case 3:case 14:case 18:case 26:case 32:case 41:case 34:case 99:break;case 12:r.isRest=t.isRest;break;case 4:var f=window.JSON.stringify(t.customProperties);i=[f];break;case 5:i=[t.body];break;case 8:case 9:i=[t.itemId];break;case 7:i=[window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.requiredAttendees),window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.optionalAttendees),t.start,t.end,t.location,window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.resources),t.subject,t.body];break;case 44:i=[window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.toRecipients),window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.ccRecipients),window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(t.bccRecipients),t.subject,t.htmlBody,t.attachments];break;case 43:i=[t.ewsIdOrEmail];break;case 45:i=[t.module,t.queryString];break;case 40:i=[t.extensionId,t.consentState];break;case 11:case 10:i=[t.htmlBody];break;case 31:case 30:i=[t.htmlBody,t.attachments];break;case 100:r=t;break;case 23:case 13:case 38:case 29:i=[t.data,t.coercionType];break;case 37:case 28:i=[t.coercionType];break;case 17:i=[t.subject];break;case 15:i=[t.recipientField];break;case 22:case 21:i=[t.recipientField,window.OSF.DDA.OutlookAppOm._convertComposeEmailDictionaryParameterForSetApi$p(t.recipientArray)];break;case 19:i=[t.itemId,t.name];break;case 16:i=[t.uri,t.name,t.isInline];break;case 20:i=[t.attachmentIndex];break;case 25:i=[t.TimeProperty,t.time];break;case 24:i=[t.TimeProperty];break;case 27:i=[t.location];break;case 33:case 35:i=[t.key,t.type,t.persistent,t.message,t.icon];this._additionalOutlookParams$p$0.setActionsDefinition(t.actions);break;case 36:i=[t.key];break;case 101:r=t;break;default:break}if(n!==1){var u;this._additionalOutlookParams$p$0.updateOutlookExecuteParameters(u={val:i},r),i=u.val}return i},_displayNewAppointmentFormApi$p$0:function(n){var f=window.OSF.DDA.OutlookAppOm._validateAndNormalizeRecipientEmails$p(n.requiredAttendees,"requiredAttendees");var u=window.OSF.DDA.OutlookAppOm._validateAndNormalizeRecipientEmails$p(n.optionalAttendees,"optionalAttendees");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(n.location,0,window.OSF.DDA.OutlookAppOm._maxLocationLength$p,"location");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(n.body,0,window.OSF.DDA.OutlookAppOm.maxBodyLength,"body");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(n.subject,0,window.OSF.DDA.OutlookAppOm._maxSubjectLength$p,"subject");if(!r.ScriptHelpers.isNullOrUndefined(n.start)){window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(n.start,Date,"start");var s=n.start;n.start=s.getTime();if(!r.ScriptHelpers.isNullOrUndefined(n.end)){window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(n.end,Date,"end");var i=n.end;if(i=0&&n.getTime()-u<0)return window.parseInt(t.offset)}throw Error.format(window._u.ExtensibilityStrings.l_InvalidDate_Text);},_areStringsLoaded$p$0:function(){var n=!1;try{n=!r.ScriptHelpers.isNullOrUndefined(window._u.ExtensibilityStrings.l_EwsRequestOversized_Text)}catch(t){}return n},_loadLocalizedScript$p$0:function(n){for(var s=null,l="",a=document.getElementsByTagName("script"),o=a.length-1;o>=0;o--){var i=null;var v=a[o].attributes;if(v){var p=v.getNamedItem("src");p&&(i=p.value);if(i){var y=!1;i=i.toLowerCase();var f=i.indexOf("office_strings.js");if(f<0){f=i.indexOf("office_strings.debug.js");y=!0}if(f>0&&fu+1&&(l=r.substring(0,u+1));break}}}}if(s){var h=document.getElementsByTagName("head")[0];var t=null;var b=this;var e=function(){if(n&&(!t.readyState||t.readyState&&(t.readyState==="loaded"||t.readyState==="complete"))){t.onload=null;t.onreadystatechange=null;n()}};var c=this;var w=function(){if(!c._areStringsLoaded$p$0()){var n=l+"en-us/"+"outlook_strings.js";t.onload=null;t.onreadystatechange=null;t=c._createScriptElement$p$0(n);t.onload=e;t.onreadystatechange=e;h.appendChild(t)}};t=this._createScriptElement$p$0(s);t.onload=e;t.onreadystatechange=e;window.setTimeout(w,2e3);h.appendChild(t)}},_createScriptElement$p$0:function(n){var t=document.createElement("script");t.type="text/javascript";t.src=n;return t}};u.DDA.OutlookAppOm.prototype.initialize=function(n){if(!n){this._additionalOutlookParams$p$0=new r.AdditionalGlobalParameters(!0);this._initialData$p$0=null;this._item$p$0=null;return}var t="itemType";this._initialData$p$0=new r.InitialData(n);this._hostItemType$p$0=n[t];1===n[t]?this._item$p$0=new r.Message(this._initialData$p$0):3===n[t]?this._item$p$0=new r.MeetingRequest(this._initialData$p$0):2===n[t]?this._item$p$0=new r.Appointment(this._initialData$p$0):4===n[t]?this._item$p$0=new r.MessageCompose(this._initialData$p$0):5===n[t]?this._item$p$0=new r.AppointmentCompose(this._initialData$p$0):6===n[t];this._userProfile$p$0=new r.UserProfile(this._initialData$p$0);this._diagnostics$p$0=new r.Diagnostics(this._initialData$p$0,this._officeAppContext$p$0.get_appName());var i=window.OSF.DDA.OutlookAppOm._instance$p.get__appName$i$0()!==8||this.isOutlook16OrGreater()||this.isApiVersionSupported("1.5");this._additionalOutlookParams$p$0=new r.AdditionalGlobalParameters(i);"itemNumber"in n&&this.setCurrentItemNumber(n.itemNumber);this._initializeMethods$p$0();r.InitialData._defineReadOnlyProperty$i(this,"item",this.$$d_getItem);r.InitialData._defineReadOnlyProperty$i(this,"userProfile",this.$$d__getUserProfile$p$0);r.InitialData._defineReadOnlyProperty$i(this,"diagnostics",this.$$d__getDiagnostics$p$0);r.InitialData._defineReadOnlyProperty$i(this,"ewsUrl",this.$$d__getEwsUrl$p$0);r.InitialData._defineReadOnlyProperty$i(this,"restUrl",this.$$d__getRestUrl$p$0);window.OSF.DDA.OutlookAppOm._instance$p.get__appName$i$0()===64&&this._initialData$p$0.get__overrideWindowOpen$i$0()&&(window.open=this.$$d_windowOpenOverrideHandler);this.addEventSupport()};u.DDA.OutlookAppOm.prototype.makeEwsRequestAsync=function(n){for(var u=[],i=1;iwindow.OSF.DDA.OutlookAppOm._maxEwsRequestSize$p)throw Error.argument("data",window._u.ExtensibilityStrings.l_EwsRequestOversized_Text);this._throwOnMethodCallForInsufficientPermission$i$0(3,"makeEwsRequestAsync");var f=r.CommonParameters.parse(u,!0,!0);var t=new r.EwsRequest(f._asyncContext$p$0);var e=this;t.onreadystatechange=function(){4===t.get__requestState$i$1()&&f._callback$p$0(t._asyncResult$p$0)};t.send(n)};u.DDA.OutlookAppOm.prototype.recordDataPoint=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");this.invokeHostMethod(402,n,null)};u.DDA.OutlookAppOm.prototype.recordTrace=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");this.invokeHostMethod(401,n,null)};u.DDA.OutlookAppOm.prototype.trackCtq=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");this.invokeHostMethod(400,n,null)};u.DDA.OutlookAppOm.prototype.convertToLocalClientTime=function(n){var t=new Date(n.getTime());var i=t.getTimezoneOffset()*-1;if(this._initialData$p$0&&this._initialData$p$0.get__timeZoneOffsets$i$0()){t.setUTCMinutes(t.getUTCMinutes()-i);i=this._findOffset$p$0(t);t.setUTCMinutes(t.getUTCMinutes()+i)}var r=this._dateToDictionary$i$0(t);r.timezoneOffset=i;return r};u.DDA.OutlookAppOm.prototype.convertToUtcClientTime=function(n){var t=this._dictionaryToDate$i$0(n);if(this._initialData$p$0&&this._initialData$p$0.get__timeZoneOffsets$i$0()){var i=this._findOffset$p$0(t);t.setUTCMinutes(t.getUTCMinutes()-i);i=n.timezoneOffset?n.timezoneOffset:t.getTimezoneOffset()*-1;t.setUTCMinutes(t.getUTCMinutes()+i)}return t};u.DDA.OutlookAppOm.prototype.convertToRestId=function(n,t){if(!n)throw Error.argumentNull("itemId");window.OSF.DDA.OutlookAppOm._throwOnInvalidRestVersion$p(t);return n.replace(new RegExp("[/]","g"),"-").replace(new RegExp("[+]","g"),"_")};u.DDA.OutlookAppOm.prototype.convertToEwsId=function(n,t){if(!n)throw Error.argumentNull("itemId");window.OSF.DDA.OutlookAppOm._throwOnInvalidRestVersion$p(t);return n.replace(new RegExp("[-]","g"),"/").replace(new RegExp("[_]","g"),"+")};u.DDA.OutlookAppOm.prototype.getUserIdentityTokenAsync=function(){for(var i=[],n=0;n32768){var f=window.OSF.DDA.OutlookAppOm._instance$p.createAsyncResult(null,1,9019,n._asyncContext$p$0,"");var e=this;window.setTimeout(function(){n._callback$p$0(f)},0);return}window.OSF.DDA.OutlookAppOm._instance$p.get__appName$i$0()===64?this._saveSettingsForOwa$p$0(n._callback$p$0,n._asyncContext$p$0):this._saveSettingsForOutlook$p$0(n._callback$p$0,n._asyncContext$p$0)};Type.registerNamespace("$h");var r=window.$h||{};Type.registerNamespace("Office.cast");var f=window.Office||{};f.cast=f.cast||{};r.AdditionalGlobalParameters=function(n){this._parameterBlobSupported$p$0=n;this._itemNumber$p$0=0};r.AdditionalGlobalParameters.prototype={_parameterBlobSupported$p$0:!1,_itemNumber$p$0:0,_actionsDefinition$p$0:null,setActionsDefinition:function(n){this._actionsDefinition$p$0=n},setCurrentItemNumber:function(n){n>0&&(this._itemNumber$p$0=n)},get_itemNumber:function(){return this._itemNumber$p$0},get_actionsDefinition:function(){return this._actionsDefinition$p$0},updateOutlookExecuteParameters:function(n,t){if(this._parameterBlobSupported$p$0){this._itemNumber$p$0>0&&(t.itemNumber=this._itemNumber$p$0.toString());this._actionsDefinition$p$0&&(t.actions=this._actionsDefinition$p$0);if(!Object.keys(t).length)return;n.val||(n.val=[]);n.val.push(window.JSON.stringify(t))}}};r.Appointment=function(n){this.$$d__getOrganizer$p$2=Function.createDelegate(this,this._getOrganizer$p$2);this.$$d__getNormalizedSubject$p$2=Function.createDelegate(this,this._getNormalizedSubject$p$2);this.$$d__getSubject$p$2=Function.createDelegate(this,this._getSubject$p$2);this.$$d__getResources$p$2=Function.createDelegate(this,this._getResources$p$2);this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2);this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2);this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2);this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2);this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2);r.Appointment.initializeBase(this,[n]);r.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2);r.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2);r.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2);r.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"resources",this.$$d__getResources$p$2);r.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2);r.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2);r.InitialData._defineReadOnlyProperty$i(this,"organizer",this.$$d__getOrganizer$p$2)};r.Appointment.prototype={getItemType:function(){return window.Microsoft.Office.WebExtension.MailboxEnums.ItemType.Appointment},_getStart$p$2:function(){return this._data$p$0.get__start$i$0()},_getEnd$p$2:function(){return this._data$p$0.get__end$i$0()},_getLocation$p$2:function(){return this._data$p$0.get__location$i$0()},_getOptionalAttendees$p$2:function(){return this._data$p$0.get__cc$i$0()},_getRequiredAttendees$p$2:function(){return this._data$p$0.get__to$i$0()},_getResources$p$2:function(){return this._data$p$0.get__resources$i$0()},_getSubject$p$2:function(){return this._data$p$0.get__subject$i$0()},_getNormalizedSubject$p$2:function(){return this._data$p$0.get__normalizedSubject$i$0()},_getOrganizer$p$2:function(){return this._data$p$0.get__organizer$i$0()}};r.Appointment.prototype.getEntities=function(){return this._data$p$0._getEntities$i$0()};r.Appointment.prototype.getEntitiesByType=function(n){return this._data$p$0._getEntitiesByType$i$0(n)};r.Appointment.prototype.getSelectedEntities=function(){return this._data$p$0._getSelectedEntities$i$0()};r.Appointment.prototype.getRegExMatches=function(){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches");return this._data$p$0._getRegExMatches$i$0()};r.Appointment.prototype.getFilteredEntitiesByName=function(n){return this._data$p$0._getFilteredEntitiesByName$i$0(n)};r.Appointment.prototype.getRegExMatchesByName=function(n){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName");return this._data$p$0._getRegExMatchesByName$i$0(n)};r.Appointment.prototype.getSelectedRegExMatches=function(){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedRegExMatches");return this._data$p$0._getSelectedRegExMatches$i$0()};r.Appointment.prototype.displayReplyForm=function(n){window.OSF.DDA.OutlookAppOm._instance$p._displayReplyForm$i$0(n)};r.Appointment.prototype.displayReplyAllForm=function(n){window.OSF.DDA.OutlookAppOm._instance$p._displayReplyAllForm$i$0(n)};r.AppointmentCompose=function(n){this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2);this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2);this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2);this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2);this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2);r.AppointmentCompose.initializeBase(this,[n]);r.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2);r.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2);r.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2);r.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2)};r.AppointmentCompose.prototype={_requiredAttendees$p$2:null,_optionalAttendees$p$2:null,_start$p$2:null,_end$p$2:null,_location$p$2:null,getItemType:function(){return window.Microsoft.Office.WebExtension.MailboxEnums.ItemType.Appointment},_getRequiredAttendees$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._requiredAttendees$p$2||(this._requiredAttendees$p$2=new r.ComposeRecipient(0,"requiredAttendees"));return this._requiredAttendees$p$2},_getOptionalAttendees$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._optionalAttendees$p$2||(this._optionalAttendees$p$2=new r.ComposeRecipient(1,"optionalAttendees"));return this._optionalAttendees$p$2},_getStart$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._start$p$2||(this._start$p$2=new r.ComposeTime(1));return this._start$p$2},_getEnd$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._end$p$2||(this._end$p$2=new r.ComposeTime(2));return this._end$p$2},_getLocation$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();this._location$p$2||(this._location$p$2=new r.ComposeLocation);return this._location$p$2}};r.AttachmentConstants=function(){};r.AttachmentDetails=function(n){this.$$d__getIsInline$p$0=Function.createDelegate(this,this._getIsInline$p$0);this.$$d__getAttachmentType$p$0=Function.createDelegate(this,this._getAttachmentType$p$0);this.$$d__getSize$p$0=Function.createDelegate(this,this._getSize$p$0);this.$$d__getContentType$p$0=Function.createDelegate(this,this._getContentType$p$0);this.$$d__getName$p$0=Function.createDelegate(this,this._getName$p$0);this.$$d__getId$p$0=Function.createDelegate(this,this._getId$p$0);this._data$p$0=n;r.InitialData._defineReadOnlyProperty$i(this,"id",this.$$d__getId$p$0);r.InitialData._defineReadOnlyProperty$i(this,"name",this.$$d__getName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"contentType",this.$$d__getContentType$p$0);r.InitialData._defineReadOnlyProperty$i(this,"size",this.$$d__getSize$p$0);r.InitialData._defineReadOnlyProperty$i(this,"attachmentType",this.$$d__getAttachmentType$p$0);r.InitialData._defineReadOnlyProperty$i(this,"isInline",this.$$d__getIsInline$p$0)};r.AttachmentDetails.prototype={_data$p$0:null,_getId$p$0:function(){return this._data$p$0.id},_getName$p$0:function(){return this._data$p$0.name},_getContentType$p$0:function(){return this._data$p$0.contentType},_getSize$p$0:function(){return this._data$p$0.size},_getAttachmentType$p$0:function(){var n=this._data$p$0.attachmentType;return n255)throw Error.argumentOutOfRange("recipients",n.length,window._u.ExtensibilityStrings.l_DisplayNameTooLong_Text);if(t&&t.length>571)throw Error.argumentOutOfRange("recipients",t.length,window._u.ExtensibilityStrings.l_EmailAddressTooLong_Text);};r.ComposeRecipient._getAsyncFormatter$p=function(n){for(var u=n,i=[],t=0;t864e13)throw Error.argumentOutOfRange("dateTime");var i=r.CommonParameters.parse(u,!1);window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(25,{TimeProperty:this._timeType$p$0,time:n.getTime()},null,i._asyncContext$p$0,i._callback$p$0)};r.ComposeTime.TimeType=function(){};r.ComposeTime.TimeType.prototype={start:1,end:2};r.ComposeTime.TimeType.registerEnum("$h.ComposeTime.TimeType",!1);r.Contact=function(n){this.$$d__getContactString$p$0=Function.createDelegate(this,this._getContactString$p$0);this.$$d__getAddresses$p$0=Function.createDelegate(this,this._getAddresses$p$0);this.$$d__getUrls$p$0=Function.createDelegate(this,this._getUrls$p$0);this.$$d__getEmailAddresses$p$0=Function.createDelegate(this,this._getEmailAddresses$p$0);this.$$d__getPhoneNumbers$p$0=Function.createDelegate(this,this._getPhoneNumbers$p$0);this.$$d__getBusinessName$p$0=Function.createDelegate(this,this._getBusinessName$p$0);this.$$d__getPersonName$p$0=Function.createDelegate(this,this._getPersonName$p$0);this._data$p$0=n;r.InitialData._defineReadOnlyProperty$i(this,"personName",this.$$d__getPersonName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"businessName",this.$$d__getBusinessName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0);r.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0);r.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0);r.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0);r.InitialData._defineReadOnlyProperty$i(this,"contactString",this.$$d__getContactString$p$0)};r.Contact.prototype={_data$p$0:null,_phoneNumbers$p$0:null,_getPersonName$p$0:function(){return this._data$p$0.PersonName},_getBusinessName$p$0:function(){return this._data$p$0.BusinessName},_getAddresses$p$0:function(){return r.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses")},_getEmailAddresses$p$0:function(){return r.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses")},_getUrls$p$0:function(){return r.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls")},_getPhoneNumbers$p$0:function(){if(!this._phoneNumbers$p$0){var n=this;this._phoneNumbers$p$0=r.Entities._getExtractedObjects$i(r.PhoneNumber,this._data$p$0,"PhoneNumbers",function(n){return new r.PhoneNumber(n)})}return this._phoneNumbers$p$0},_getContactString$p$0:function(){return this._data$p$0.ContactString}};r.CustomProperties=function(n){if(r.ScriptHelpers.isNullOrUndefined(n))throw Error.argumentNull("data");if(Array.isInstanceOfType(n)){var t=n;if(t.length>0)this._data$p$0=t[0];else throw Error.argument("data");}else this._data$p$0=n};r.CustomProperties.prototype={_data$p$0:null};r.CustomProperties.prototype.get=function(n){var i=this._data$p$0[n];if(typeof i=="string"){var t=i;if(t.length>6&&t.startsWith("Date(")&&t.endsWith(")")){var f=t.substring(5,t.length-1);var r=window.parseInt(f);if(!window.isNaN(r)){var u=new Date(r);u&&(i=u)}}}return i};r.CustomProperties.prototype.set=function(n,t){window.OSF.OUtil.isDate(t)&&(t="Date("+t.getTime()+")");this._data$p$0[n]=t};r.CustomProperties.prototype.remove=function(n){delete this._data$p$0[n]};r.CustomProperties.prototype.saveAsync=function(){for(var i=[],n=0;nf)throw Error.argument();var t=r.CommonParameters.parse(i,!1,!0);var u=new r.SaveDictionaryRequest(t._callback$p$0,t._asyncContext$p$0);u._sendRequest$i$0(4,"SaveCustomProperties",{customProperties:this._data$p$0})};r.Diagnostics=function(n,t){this.$$d__getOwaView$p$0=Function.createDelegate(this,this._getOwaView$p$0);this.$$d__getHostVersion$p$0=Function.createDelegate(this,this._getHostVersion$p$0);this.$$d__getHostName$p$0=Function.createDelegate(this,this._getHostName$p$0);this._data$p$0=n;this._appName$p$0=t;r.InitialData._defineReadOnlyProperty$i(this,"hostName",this.$$d__getHostName$p$0);r.InitialData._defineReadOnlyProperty$i(this,"hostVersion",this.$$d__getHostVersion$p$0);64===this._appName$p$0&&r.InitialData._defineReadOnlyProperty$i(this,"OWAView",this.$$d__getOwaView$p$0)};r.Diagnostics.prototype={_data$p$0:null,_appName$p$0:0,_getHostName$p$0:function(){switch(this._appName$p$0){case 8:return"Outlook";case 64:return"OutlookWebApp";case 65536:return"OutlookIOS";case 4194304:return"OutlookAndroid";default:return null}},_getHostVersion$p$0:function(){return this._data$p$0.get__hostVersion$i$0()},_getOwaView$p$0:function(){return this._data$p$0.get__owaView$i$0()}};r.EmailAddressDetails=function(n){this.$$d__getRecipientType$p$0=Function.createDelegate(this,this._getRecipientType$p$0);this.$$d__getAppointmentResponse$p$0=Function.createDelegate(this,this._getAppointmentResponse$p$0);this.$$d__getDisplayName$p$0=Function.createDelegate(this,this._getDisplayName$p$0);this.$$d__getEmailAddress$p$0=Function.createDelegate(this,this._getEmailAddress$p$0);this._data$p$0=n;r.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0);r.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0);r.ScriptHelpers.dictionaryContainsKey(n,"appointmentResponse")&&r.InitialData._defineReadOnlyProperty$i(this,"appointmentResponse",this.$$d__getAppointmentResponse$p$0);r.ScriptHelpers.dictionaryContainsKey(n,"recipientType")&&r.InitialData._defineReadOnlyProperty$i(this,"recipientType",this.$$d__getRecipientType$p$0)};r.EmailAddressDetails._createFromEmailUserDictionary$i=function(n){var t={};var u=n.Name;var i=n.UserId;t.name=u||r.EmailAddressDetails._emptyString$p;t.address=i||r.EmailAddressDetails._emptyString$p;return new r.EmailAddressDetails(t)};r.EmailAddressDetails.prototype={_data$p$0:null,_getEmailAddress$p$0:function(){return this._data$p$0.address},_getDisplayName$p$0:function(){return this._data$p$0.name},_getAppointmentResponse$p$0:function(){var n=this._data$p$0.appointmentResponse;return n=0;u--){for(var e=!1,f=u-1;f>=0;f--)if(i(t[u],t[f],r)){e=!0;break}e&&Array.removeAt(t,u)}return t};r.Entities.prototype={_dateTimeSent$p$0:null,_data$p$0:null,_filteredData$p$0:null,_filteredEntitiesCache$p$0:null,_permissionLevel$p$0:0,_taskSuggestions$p$0:null,_meetingSuggestions$p$0:null,_phoneNumbers$p$0:null,_contacts$p$0:null,_addresses$p$0:null,_emailAddresses$p$0:null,_urls$p$0:null,_flightReservations$p$0:null,_parcelDeliveries$p$0:null,_getByType$i$0:function(n){if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.MeetingSuggestion)return this._getMeetingSuggestions$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.TaskSuggestion)return this._getTaskSuggestions$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.Address)return this._getAddresses$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.PhoneNumber)return this._getPhoneNumbers$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.EmailAddress)return this._getEmailAddresses$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.Url)return this._getUrls$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.Contact)return this._getContacts$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.FlightReservations)return this._getFlightReservations$p$0();else if(n===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.ParcelDeliveries)return this._getParcelDeliveries$p$0();return null},_getFilteredEntitiesByName$i$0:function(n){this._filteredEntitiesCache$p$0||(this._filteredEntitiesCache$p$0={});if(!r.ScriptHelpers.dictionaryContainsKey(this._filteredEntitiesCache$p$0,n)){for(var u=!1,i=0;i0)return new Date(n.getFullYear()+t._offset$i$1,0,1);break;default:break}return n};r.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p=function(n,t,i){if(t>-5&&t<5){var u=(i+6)%7+1;var r=7*t+(u-n.getDay());n.setDate(n.getDate()+r);return n}else{var r=(i-n.getDay())%7;r<0&&(r+=7);n.setDate(n.getDate()+r);return n}};r.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p=function(n,t){var e;var i;var u;e=n;if(t._tag$i$1<=0||t._tag$i$1>12||t._offset$i$1<=0||t._offset$i$1>5)return n;var o=(12+t._tag$i$1-e.getMonth()-1)%12;i=new Date(e.getFullYear(),e.getMonth()+o,1);if(t._modifier$i$1===1)if(t._offset$i$1===1&&i.getDay()!==6&&i.getDay())return i;else{u=new Date(i.getFullYear(),i.getMonth(),i.getDate());u.setDate(u.getDate()+(8-i.getDay())%7);i.getDay()!==6&&i.getDay()&&i.getDay()!==1&&u.setDate(u.getDate()-7);u.setDate(u.getDate()+7*(t._offset$i$1-1));return u.getMonth()+1!==t._tag$i$1?n:u}else{u=new Date(i.getFullYear(),i.getMonth(),r.MeetingSuggestionTimeDecoder._daysInMonth$p(i.getMonth(),i.getFullYear()));var f=1-u.getDay();f>0&&(f=f-7);u.setDate(u.getDate()+f);u.setDate(u.getDate()+7*(1-t._offset$i$1));return u.getMonth()+1!==t._tag$i$1?i.getDay()!==6&&i.getDay()?i:n:u}};r.MeetingSuggestionTimeDecoder._decode$p=function(n,t,i,u){var o=32767;i.val=null;u.val=0;if(!n)return!1;u.val=t?r.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p(n):r.MeetingSuggestionTimeDecoder._getTimeOfDayInMilliseconds$p(n);var s=n.getTime()-u.val;var f=(s-r.MeetingSuggestionTimeDecoder._baseDate$p.getTime())/864e5;if(f<0)return!1;else if(f>=262144)return!1;else{var e=f>>15;f=f&o;switch(e){case 0:return r.MeetingSuggestionTimeDecoder._decodePreciseDate$p(f,i);case 1:return r.MeetingSuggestionTimeDecoder._decodeRelativeDate$p(f,i);default:return!1}}};r.MeetingSuggestionTimeDecoder._decodePreciseDate$p=function(n,t){var c=7;var o=15;var s=31;var h=127;var f=null;var u=0;var e=0;t.val=null;var i=n>>12&c;if((i&4)==4){f=n>>5&h;if((i&2)==2){if((i&1)==1)return!1;u=n>>1&o}}else{(i&2)==2&&(u=n>>8&o);(i&1)==1&&(e=n>>3&s)}t.val=new r._preciseDate(e,u,f);return!0};r.MeetingSuggestionTimeDecoder._decodeRelativeDate$p=function(n,t){var s=15;var o=63;var c=7;var h=3;var u=n&s;n>>=4;var i=r.MeetingSuggestionTimeDecoder._fromComplement$p(n&o,6);n>>=6;var e=n&c;n>>=3;var f=n&h;try{t.val=new r._relativeDate(f,i,e,u);return!0}catch(l){t.val=null;return!1}};r.MeetingSuggestionTimeDecoder._fromComplement$p=function(n,t){var i=1<1)throw Error.argument("actions",window._u.ExtensibilityStrings.l_ActionsDefinitionMultipleActionsError_Text);}else throw Error.argument("actions",String.format(window._u.ExtensibilityStrings.l_InvalidParameterValueError_Text,"actions"));return i};r.NotificationMessages._validateActionsDefinitionActionType$p=function(n,t){if(!n.actionType)throw Error.argument("actionType",String.format(window._u.ExtensibilityStrings.l_NullOrEmptyParameterError_Text,"actionType"));if("showTaskPane"!==n.actionType)throw Error.argument("actionType",window._u.ExtensibilityStrings.l_InvalidActionType_Text);else if(!r.ScriptHelpers.isNonEmptyString(n.commandId))throw Error.argument("commandId",String.format(window._u.ExtensibilityStrings.l_InvalidCommandIdError_Text,"commandId"));};r.NotificationMessages._validateActionsDefinitionActionText$p=function(n){if(!r.ScriptHelpers.isNonEmptyString(n.actionText))throw Error.argument("actionText",String.format(window._u.ExtensibilityStrings.l_NullOrEmptyParameterError_Text,"actionText"));if(n.actionText.length>30)throw Error.argument(window._u.ExtensibilityStrings.l_ParameterValueTooLongError_Text,String.format(window._u.ExtensibilityStrings.l_ParameterValueTooLongError_Text,"actionText",30));};r.NotificationMessages.prototype.addAsync=function(n,t){for(var f=[],i=2;i2||!r.CommonParameters._argIsFunction$p(n[0]))return!1;f=n[0];i>1&&(u=n[1]);t.val=new r.CommonParameters(null,f,u);return!0};r.CommonParameters._argIsFunction$p=function(n){return typeof n=="function"};r.CommonParameters.prototype={_options$p$0:null,_callback$p$0:null,_asyncContext$p$0:null,get_options:function(){return this._options$p$0},get_callback:function(){return this._callback$p$0},get_asyncContext:function(){return this._asyncContext$p$0}};r.EwsRequest=function(n){r.EwsRequest.initializeBase(this,[n])};r.EwsRequest.prototype={readyState:1,status:0,statusText:null,onreadystatechange:null,responseText:null,get__statusCode$i$1:function(){return this.status},set__statusCode$i$1:function(n){this.status=n;return n},get__statusDescription$i$1:function(){return this.statusText},set__statusDescription$i$1:function(n){this.statusText=n;return n},get__requestState$i$1:function(){return this.readyState},set__requestState$i$1:function(n){this.readyState=n;return n},get_hasOnReadyStateChangeCallback:function(){return!r.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)},get__response$i$1:function(){return this.responseText},set__response$i$1:function(n){this.responseText=n;return n},send:function(n){this._checkSendConditions$i$1();r.ScriptHelpers.isNullOrUndefined(n)&&this._throwInvalidStateException$i$1();this._sendRequest$i$0(5,"EwsRequest",{body:n})},_callOnReadyStateChangeCallback$i$1:function(){r.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)||this.onreadystatechange()},_parseExtraResponseData$i$1:function(n){},executeExtraFailedResponseSteps:function(){}};r.InitialData=function(n){this._data$p$0=n;this._permissionLevel$p$0=this._calculatePermissionLevel$p$0()};r.InitialData._defineReadOnlyProperty$i=function(n,t,i){var r={get:i,configurable:!1};window.Object.defineProperty(n,t,r)};r.InitialData.prototype={_toRecipients$p$0:null,_ccRecipients$p$0:null,_attachments$p$0:null,_resources$p$0:null,_entities$p$0:null,_selectedEntities$p$0:null,_data$p$0:null,_permissionLevel$p$0:0,get__isRestIdSupported$i$0:function(){return this._data$p$0.isRestIdSupported},get__itemId$i$0:function(){return this._data$p$0.id},get__itemClass$i$0:function(){return this._data$p$0.itemClass},get__dateTimeCreated$i$0:function(){return new Date(this._data$p$0.dateTimeCreated)},get__dateTimeModified$i$0:function(){return new Date(this._data$p$0.dateTimeModified)},get__dateTimeSent$i$0:function(){return new Date(this._data$p$0.dateTimeSent)},get__subject$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();return this._data$p$0.subject},get__normalizedSubject$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();return this._data$p$0.normalizedSubject},get__internetMessageId$i$0:function(){return this._data$p$0.internetMessageId},get__conversationId$i$0:function(){return this._data$p$0.conversationId},get__sender$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();var n=this._data$p$0.sender;return r.ScriptHelpers.isNullOrUndefined(n)?null:new r.EmailAddressDetails(n)},get__from$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();var n=this._data$p$0.from;return r.ScriptHelpers.isNullOrUndefined(n)?null:new r.EmailAddressDetails(n)},get__to$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._toRecipients$p$0&&(this._toRecipients$p$0=this._createEmailAddressDetails$p$0("to"));return this._toRecipients$p$0},get__cc$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._ccRecipients$p$0&&(this._ccRecipients$p$0=this._createEmailAddressDetails$p$0("cc"));return this._ccRecipients$p$0},get__attachments$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._attachments$p$0&&(this._attachments$p$0=this._createAttachmentDetails$p$0());return this._attachments$p$0},get__ewsUrl$i$0:function(){return this._data$p$0.ewsUrl},get__restUrl$i$0:function(){return this._data$p$0.restUrl},get__marketplaceAssetId$i$0:function(){return this._data$p$0.marketplaceAssetId},get__extensionId$i$0:function(){return this._data$p$0.extensionId},get__marketplaceContentMarket$i$0:function(){return this._data$p$0.marketplaceContentMarket},get__consentMetadata$i$0:function(){return this._data$p$0.consentMetadata},get__isRead$i$0:function(){return this._data$p$0.isRead},get__endNodeUrl$i$0:function(){return this._data$p$0.endNodeUrl},get__entryPointUrl$i$0:function(){return this._data$p$0.entryPointUrl},get__start$i$0:function(){return new Date(this._data$p$0.start)},get__end$i$0:function(){return new Date(this._data$p$0.end)},get__location$i$0:function(){return this._data$p$0.location},get__userProfileType$i$0:function(){return this._data$p$0.userProfileType},get__resources$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();null===this._resources$p$0&&(this._resources$p$0=this._createEmailAddressDetails$p$0("resources"));return this._resources$p$0},get__organizer$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();var n=this._data$p$0.organizer;return r.ScriptHelpers.isNullOrUndefined(n)?null:new r.EmailAddressDetails(n)},get__userProfileCapabilities$i$0:function(){return this._data$p$0.userProfileCapabilities},get__userDisplayName$i$0:function(){return this._data$p$0.userDisplayName},get__userEmailAddress$i$0:function(){return this._data$p$0.userEmailAddress},get__userTimeZone$i$0:function(){return this._data$p$0.userTimeZone},get__timeZoneOffsets$i$0:function(){return this._data$p$0.timeZoneOffsets},get__hostVersion$i$0:function(){return this._data$p$0.hostVersion},get__owaView$i$0:function(){return this._data$p$0.owaView},get__overrideWindowOpen$i$0:function(){return this._data$p$0.overrideWindowOpen},_getEntities$i$0:function(){this._entities$p$0||(this._entities$p$0=new r.Entities(this._data$p$0.entities,this._data$p$0.filteredEntities,this.get__dateTimeSent$i$0(),this._permissionLevel$p$0));return this._entities$p$0},_getSelectedEntities$i$0:function(){this._selectedEntities$p$0||(this._selectedEntities$p$0=new r.Entities(this._data$p$0.selectedEntities,null,this.get__dateTimeSent$i$0(),this._permissionLevel$p$0));return this._selectedEntities$p$0},_getEntitiesByType$i$0:function(n){var t=this._getEntities$i$0();return t._getByType$i$0(n)},_getFilteredEntitiesByName$i$0:function(n){var t=this._getEntities$i$0();return t._getFilteredEntitiesByName$i$0(n)},_getRegExMatches$i$0:function(){return this._data$p$0.regExMatches?this._data$p$0.regExMatches:null},_getSelectedRegExMatches$i$0:function(){return this._data$p$0.selectedRegExMatches?this._data$p$0.selectedRegExMatches:null},_getRegExMatchesByName$i$0:function(n){var t=this._getRegExMatches$i$0();return!t||!t[n]?null:t[n]},_throwOnRestrictedPermissionLevel$i$0:function(){window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0)},_createEmailAddressDetails$p$0:function(n){var i=this._data$p$0[n];if(r.ScriptHelpers.isNullOrUndefined(i))return[];for(var u=[],t=0;t 6 && v.slice(0, 5) === OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1) === OSF.DDA.SettingsManager.DataJSONSuffix) { + d = new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + } + else { + value = Sys.Serialization.JavaScriptSerializer.deserialize(value, true); + } + ret[key] = value; + } + catch (ex) { + } + } + return ret; + }, loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) { if (url && callback) { var doc = window.document; @@ -828,6 +876,14 @@ OSF.OUtil = (function () { } } }, + removeClass: function OSF_OUtil$removeClass(elmt, val) { + if (OSF.OUtil.hasClass(elmt, val)) { + var className = elmt.getAttribute(_classN); + var reg = new RegExp('(\\s|^)' + val + '(\\s|$)'); + className = className.replace(reg, ''); + elmt.setAttribute(_classN, className); + } + }, hasClass: function OSF_OUtil$hasClass(elmt, clsName) { var className = elmt.getAttribute(_classN); return className && className.match(new RegExp('(\\s|^)' + clsName + '(\\s|$)')); @@ -964,6 +1020,12 @@ OSF.OUtil.Guid = (function () { })(); window.OSF = OSF; OSF.OUtil.setNamespace("OSF", window); +OSF.MessageIDs = { + "FetchBundleUrl": 0, + "LoadReactBundle": 1, + "LoadBundleSuccess": 2, + "LoadBundleError": 3 +}; OSF.AppName = { Unsupported: 0, Excel: 1, @@ -991,7 +1053,10 @@ OSF.AppName = { OutlookAndroid: 4194304, OneNoteWinRT: 8388608, ExcelAndroid: 8388609, - VisioWebApp: 8388610 + VisioWebApp: 8388610, + OneNoteIOS: 8388611, + WordAndroid: 8388613, + PowerpointAndroid: 8388614 }; OSF.InternalPerfMarker = { DataCoercionBegin: "Agave.HostCall.CoerceDataStart", @@ -1021,7 +1086,9 @@ OSF.AgaveHostAction = { "EscExit": 15, "F2Exit": 16, "ExitNoFocusable": 17, - "ExitNoFocusableShift": 18 + "ExitNoFocusableShift": 18, + "MouseEnter": 19, + "MouseLeave": 20 }; OSF.SharedConstants = { "NotificationConversationIdSuffix": '_ntf' @@ -1157,6 +1224,8 @@ Microsoft.Office.WebExtension.Parameters = { HostType: "hostType", ForceConsent: "forceConsent", ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + Reserved: "reserved", Xml: "xml", Namespace: "namespace", Prefix: "prefix", @@ -1189,7 +1258,9 @@ Microsoft.Office.WebExtension.Parameters = { DisplayInIframe: "displayInIframe", MessageContent: "messageContent", HideTitle: "hideTitle", - AppCommandInvocationCompletedData: "appCommandInvocationCompletedData" + UseDeviceIndependentPixels: "useDeviceIndependentPixels", + AppCommandInvocationCompletedData: "appCommandInvocationCompletedData", + Base64: "base64" }; OSF.OUtil.setNamespace("DDA", OSF); OSF.DDA.DocumentMode = { @@ -1246,6 +1317,8 @@ OSF.DDA.MethodDispId = { dispidAppCommandInvocationCompletedMethod: 94, dispidCloseContainerMethod: 97, dispidGetAccessTokenMethod: 98, + dispidOpenBrowserWindow: 102, + dispidCreateDocumentMethod: 105, dispidGetSelectedTaskMethod: 110, dispidGetSelectedResourceMethod: 111, dispidGetTaskMethod: 112, @@ -1301,8 +1374,11 @@ OSF.DDA.EventDispId = { dispidObjectDataChangedEvent: 15, dispidContentControlAddedEvent: 16, dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, dispidAppCommandInvokedEvent: 39, dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, dispidTaskSelectionChangedEvent: 56, dispidResourceSelectionChangedEvent: 57, dispidViewSelectionChangedEvent: 58, @@ -1434,7 +1510,9 @@ OSF.DDA.ErrorCodeManager = (function () { ooeSSOInvalidGrant: 13005, ooeSSOClientError: 13006, ooeSSOServerError: 13007, - ooeAddinIsAlreadyRequestingToken: 13008 + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009, + ooeSSOConnectionLost: 13010 }, initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported] = { name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotSupported }; @@ -1532,6 +1610,8 @@ OSF.DDA.ErrorCodeManager = (function () { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError] = { name: stringNS.L_SSOClientError, message: stringNS.L_SSOClientErrorMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError] = { name: stringNS.L_SSOServerError, message: stringNS.L_SSOServerErrorMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken] = { name: stringNS.L_AddinIsAlreadyRequestingToken, message: stringNS.L_AddinIsAlreadyRequestingTokenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory] = { name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost] = { name: stringNS.L_SSOConnectionLostError, message: stringNS.L_SSOConnectionLostErrorMessage }; } }; })(); @@ -2233,6 +2313,11 @@ OSF.DDA.Context = function OSF_DDA_Context(officeAppContext, document, license, value: officeAppContext.auth }); } + if (officeAppContext.application) { + OSF.OUtil.defineEnumerableProperty(this, "application", { + value: officeAppContext.application + }); + } if (officeAppContext.get_isDialog()) { var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); OSF.OUtil.defineEnumerableProperty(this, "requirements", { @@ -2275,6 +2360,8 @@ OSF.DDA.OutlookContext = function OSF_DDA_OutlookContext(appContext, settings, l }; OSF.OUtil.extend(OSF.DDA.OutlookContext, OSF.DDA.Context); OSF.DDA.OutlookAppOm = function OSF_DDA_OutlookAppOm(appContext, window, appReady) { }; +OSF.DDA.Application = function OSF_DDA_Application(officeAppContext) { +}; OSF.DDA.Document = function OSF_DDA_Document(officeAppContext, settings) { var mode; switch (officeAppContext.get_clientMode()) { @@ -3011,6 +3098,8 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod "ExecuteRichApiRequestAsync": did.dispidExecuteRichApiRequestMethod, "AppCommandInvocationCompletedAsync": did.dispidAppCommandInvocationCompletedMethod, "CloseContainerAsync": did.dispidCloseContainerMethod, + "OpenBrowserWindow": did.dispidOpenBrowserWindow, + "CreateDocumentAsync": did.dispidCreateDocumentMethod, "AddDataPartAsync": did.dispidAddDataPartMethod, "GetDataPartByIdAsync": did.dispidGetDataPartByIdMethod, "GetDataPartsByNameSpaceAsync": did.dispidGetDataPartsByNamespaceMethod, @@ -3050,13 +3139,13 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod } jsom = OSF.DDA.SyncMethodNames; did = OSF.DDA.MethodDispId; - var asyncMethodMap = { + var syncMethodMap = { "MessageParent": did.dispidMessageParentMethod, "SendMessage": did.dispidSendMessageMethod }; - for (var method in asyncMethodMap) { + for (var method in syncMethodMap) { if (jsom[method]) { - dispIdMap[jsom[method].id] = asyncMethodMap[method]; + dispIdMap[jsom[method].id] = syncMethodMap[method]; } } jsom = Microsoft.Office.WebExtension.EventType; @@ -3076,7 +3165,10 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod "ObjectSelectionChanged": did.dispidObjectSelectionChangedEvent, "ObjectDataChanged": did.dispidObjectDataChangedEvent, "ContentControlAdded": did.dispidContentControlAddedEvent, + "RichApiMessage": did.dispidRichApiMessageEvent, "ItemChanged": did.dispidOlkItemSelectedChangedEvent, + "RecipientsChanged": did.dispidOlkRecipientsChangedEvent, + "AppointmentTimeChanged": did.dispidOlkAppointmentTimeChangedEvent, "TaskSelectionChanged": did.dispidTaskSelectionChangedEvent, "ResourceSelectionChanged": did.dispidResourceSelectionChangedEvent, "ViewSelectionChanged": did.dispidViewSelectionChangedEvent, @@ -3152,6 +3244,7 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod else { hostCallArgs = callArgs; } + var startTime = (new Date()).getTime(); delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ "dispId": dispId, "hostCallArgs": hostCallArgs, @@ -3172,6 +3265,9 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod } var payload = asyncMethodCall.processResponse(status, responseArgs, caller, callArgs); OSF.DDA.issueAsyncResult(callArgs, status, payload); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(dispId, hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); + } } }); } @@ -4039,7 +4135,6 @@ OSF.DDA.SafeArray.Delegate.executeAsync = function OSF_DDA_SafeArray_Delegate$Ex if (args.onCalling) { args.onCalling(); } - var startTime = (new Date()).getTime(); OSF.ClientHostController.execute(args.dispId, toArray(args.hostCallArgs), function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode) { var result = hostResponseArgs.toArray(); var status = result[OSF.DDA.SafeArray.Response.Status]; @@ -4086,9 +4181,6 @@ OSF.DDA.SafeArray.Delegate.executeAsync = function OSF_DDA_SafeArray_Delegate$Ex } args.onComplete(status, payload); } - if (OSF.AppTelemetry) { - OSF.AppTelemetry.onMethodDone(args.dispId, args.hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); - } return true; }); } @@ -4204,6 +4296,9 @@ OSF.InitializationHelper.prototype.prepareApiSurface = function OSF_Initializati } } } + if (OSF.DDA.OpenBrowser) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.OpenBrowserWindow]); + } if (OSF.DDA.Auth) { appContext.auth = new OSF.DDA.Auth(); OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth, [OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]); @@ -4494,6 +4589,7 @@ var OSFWebkit; MethodId[MethodId["UnregisterEvent"] = 3] = "UnregisterEvent"; MethodId[MethodId["WriteSettings"] = 4] = "WriteSettings"; MethodId[MethodId["GetContext"] = 5] = "GetContext"; + MethodId[MethodId["SendMessage"] = 6] = "SendMessage"; })(OSFWebkit.MethodId || (OSFWebkit.MethodId = {})); var MethodId = OSFWebkit.MethodId; var WebkitHostController = (function () { @@ -4636,6 +4732,11 @@ var OSFWebkit; } }; WebkitHostController.prototype.sendMessage = function (params) { + var message = params[Microsoft.Office.WebExtension.Parameters.MessageContent]; + if (!isNaN(parseFloat(message)) && isFinite(message)) { + message = message.toString(); + } + this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName, OSF.Webkit.MethodId.SendMessage, message, null); }; return WebkitHostController; })(); @@ -5228,7 +5329,7 @@ var OSFAriaLogger; function AriaLogger() { } AriaLogger.prototype.getAriaCDNLocation = function () { - return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath() + "/ariatelemetry/aria-web-telemetry-2.8.0.min.js"); + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath() + "/ariatelemetry/aria-web-telemetry.js"); }; AriaLogger.getInstance = function () { if (AriaLogger.AriaLoggerObj === undefined) { @@ -5245,13 +5346,10 @@ var OSFAriaLogger; try { if (!this.ALogger) { var OfficeExtensibilityTenantID = "db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; - var configuration = new microsoft.applications.telemetry.LogConfiguration(); - configuration.enableAutoUserSession = true; - microsoft.applications.telemetry.LogManager.initialize(OfficeExtensibilityTenantID, configuration); - this.ALogger = new microsoft.applications.telemetry.Logger(); + this.ALogger = AWTLogManager.initialize(OfficeExtensibilityTenantID); } - var eventProperties = new microsoft.applications.telemetry.EventProperties(); - eventProperties.name = "Office.Extensibility.OfficeJS." + tableName; + var eventProperties = new AWTEventProperties(); + eventProperties.setName("Office.Extensibility.OfficeJS." + tableName); for (var key in telemetryData) { if (key.toLowerCase() !== "table") { eventProperties.setProperty(key, telemetryData[key]); @@ -5284,6 +5382,7 @@ var OSFAppTelemetry; var sessionId = OSF.OUtil.Guid.generateNewGuid(); var osfControlAppCorrelationId = ""; var omexDomainRegex = new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"); + OSFAppTelemetry.enableTelemetry = true; ; var AppInfo = (function () { function AppInfo() { @@ -5367,17 +5466,19 @@ var OSFAppTelemetry; function AppLogger() { } AppLogger.prototype.LogData = function (data) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, data.SerializeRow(), OSF.Logger.SendFlag.none); - OSFAriaLogger.AriaLogger.getInstance().logData(data); + try { + OSFAriaLogger.AriaLogger.getInstance().logData(data); + } + catch (e) { + } }; AppLogger.prototype.LogRawData = function (log) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, log, OSF.Logger.SendFlag.none); try { OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)); } @@ -5417,7 +5518,7 @@ var OSFAppTelemetry; } appInfo.message = context.get_hostCustomMessage(); appInfo.officeJSVersion = OSF.ConstantNames.FileVersion; - appInfo.hostJSVersion = "16.0.8118.1000"; + appInfo.hostJSVersion = "16.0.8916.1000"; if (context._wacHostEnvironment) { appInfo.wacHostEnvironment = context._wacHostEnvironment; } @@ -5648,14 +5749,16 @@ OSF.EventDispatch = function OSF_EventDispatch(eventTypes) { this._eventHandlers = {}; this._objectEventHandlers = {}; this._queuedEventsArgs = {}; - for (var entry in eventTypes) { - var eventType = eventTypes[entry]; - var isObjectEvent = (eventType == "objectDeleted" || eventType == "objectSelectionChanged" || eventType == "objectDataChanged" || eventType == "contentControlAdded"); - if (!isObjectEvent) - this._eventHandlers[eventType] = []; - else - this._objectEventHandlers[eventType] = {}; - this._queuedEventsArgs[eventType] = []; + if (eventTypes != null) { + for (var i = 0; i < eventTypes.length; i++) { + var eventType = eventTypes[i]; + var isObjectEvent = (eventType == "objectDeleted" || eventType == "objectSelectionChanged" || eventType == "objectDataChanged" || eventType == "contentControlAdded"); + if (!isObjectEvent) + this._eventHandlers[eventType] = []; + else + this._objectEventHandlers[eventType] = {}; + this._queuedEventsArgs[eventType] = []; + } } }; OSF.EventDispatch.prototype = { @@ -5681,8 +5784,8 @@ OSF.EventDispatch.prototype = { hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) { var handlers = this._eventHandlers[eventType]; if (handlers && handlers.length > 0) { - for (var h in handlers) { - if (handlers[h] === handler) + for (var i = 0; i < handlers.length; i++) { + if (handlers[i] === handler) return true; } } @@ -5787,8 +5890,9 @@ OSF.EventDispatch.prototype = { var eventType = eventArgs.type; if (eventType && this._eventHandlers[eventType]) { var eventHandlers = this._eventHandlers[eventType]; - for (var handler in eventHandlers) - eventHandlers[handler](eventArgs); + for (var i = 0; i < eventHandlers.length; i++) { + eventHandlers[i](eventArgs); + } return true; } else { @@ -5885,6 +5989,9 @@ OSF.DDA.OMFactory.manufactureEventArgs = function OSF_DDA_OMFactory$manufactureE case Microsoft.Office.WebExtension.EventType.ContentControlAdded: args = new OSF.DDA.ObjectEventArgs(eventType, eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args = new OSF.DDA.RichApiMessageEventArgs(eventType, eventProperties); + break; case Microsoft.Office.WebExtension.EventType.DataNodeInserted: args = new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); break; @@ -5910,10 +6017,28 @@ OSF.DDA.OMFactory.manufactureEventArgs = function OSF_DDA_OMFactory$manufactureE args = new OSF.DDA.DialogParentEventArgs(eventProperties); break; case Microsoft.Office.WebExtension.EventType.ItemChanged: - if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlookwebapp") { + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { args = new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); target.initialize(args["initialData"]); - target.setCurrentItemNumber(args["itemNumber"].itemNumber); + if (OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "win32" || OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "mac") { + target.setCurrentItemNumber(args["itemNumber"].itemNumber); + } + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); } else { throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); @@ -6100,6 +6225,13 @@ OSF.DDA.AsyncMethodCalls.define({ "types": ["boolean"], "defaultValue": false } + }, + { + name: Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels, + value: { + "types": ["boolean"], + "defaultValue": false + } } ], privateStateCallbacks: [], @@ -6137,13 +6269,13 @@ OSF.DDA.AsyncMethodCalls.define({ if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] <= 0) { callArgs[Microsoft.Office.WebExtension.Parameters.Width] = 1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Width] = 99; } if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] <= 0) { callArgs[Microsoft.Office.WebExtension.Parameters.Height] = 1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Height] = 99; } if (!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) { @@ -7472,52 +7604,10 @@ OSF.DDA.SettingsManager = { DateJSONPrefix: "Date(", DataJSONSuffix: ")", serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) { - var ret = {}; - for (var key in settingsCollection) { - var value = settingsCollection[key]; - try { - if (JSON) { - value = JSON.stringify(value, function dateReplacer(k, v) { - return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix + this[k].getTime() + OSF.DDA.SettingsManager.DataJSONSuffix : v; - }); - } - else { - value = Sys.Serialization.JavaScriptSerializer.serialize(value); - } - ret[key] = value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.serializeSettings(settingsCollection); }, deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) { - var ret = {}; - serializedSettings = serializedSettings || {}; - for (var key in serializedSettings) { - var value = serializedSettings[key]; - try { - if (JSON) { - value = JSON.parse(value, function dateReviver(k, v) { - var d; - if (typeof v === 'string' && v && v.length > 6 && v.slice(0, 5) === OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1) === OSF.DDA.SettingsManager.DataJSONSuffix) { - d = new Date(parseInt(v.slice(5, -1))); - if (d) { - return d; - } - } - return v; - }); - } - else { - value = Sys.Serialization.JavaScriptSerializer.deserialize(value, true); - } - ret[key] = value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.deserializeSettings(serializedSettings); } }; OSF.DDA.Settings = function OSF_DDA_Settings(settings) { @@ -8176,6 +8266,51 @@ OSF.DDA.SafeArray.Delegate.ParameterMap.define({ { name: Microsoft.Office.WebExtension.CoercionType.Image, value: 8 } ] }); +OSF.DDA.AsyncMethodNames.addNames({ GetAccessTokenAsync: "getAccessTokenAsync" }); +OSF.DDA.Auth = function OSF_DDA_Auth() { +}; +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetAccessTokenAsync, + requiredArguments: [], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.ForceConsent, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, + value: { + "types": ["string"], + "defaultValue": "" + } + } + ], + onSucceeded: function (dataDescriptor, caller, callArgs) { + var data = dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + return data; + } +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetAccessTokenMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.ForceConsent, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, value: 2 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); OSF.DDA.PowerPointDocument = function OSF_DDA_PowerPointDocument(officeAppContext, settings) { OSF.DDA.PowerPointDocument.uber.constructor.call(this, officeAppContext, settings); OSF.DDA.DispIdHost.addAsyncMethods(this, [ diff --git a/node_modules/@microsoft/office-js/dist/powerpoint-ios-16.00.js b/node_modules/@microsoft/office-js/dist/powerpoint-ios-16.00.js index 334a30c..af55ba1 100644 --- a/node_modules/@microsoft/office-js/dist/powerpoint-ios-16.00.js +++ b/node_modules/@microsoft/office-js/dist/powerpoint-ios-16.00.js @@ -1,5 +1,5 @@ /* PowerPoint iOS specific API library */ -/* Version: 16.0.8118.1000 */ +/* Version: 16.0.8916.1000 */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ @@ -9,4 +9,4 @@ Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419. */ -var __extends=this&&this.__extends||function(b,a){for(var c in a)if(a.hasOwnProperty(c))b[c]=a[c];function d(){this.constructor=b}b.prototype=a===null?Object.create(a):(d.prototype=a.prototype,new d)},OfficeExt;(function(b){var a=function(){var a=true;function b(){}b.prototype.isMsAjaxLoaded=function(){var b="function",c="undefined";if(typeof Sys!==c&&typeof Type!==c&&Sys.StringBuilder&&typeof Sys.StringBuilder===b&&Type.registerNamespace&&typeof Type.registerNamespace===b&&Type.registerClass&&typeof Type.registerClass===b&&typeof Function._validateParams===b&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===b)return a;else return false};b.prototype.loadMsAjaxFull=function(b){var a=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(a,b)};Object.defineProperty(b.prototype,"msAjaxError",{"get":function(){var a=this;if(a._msAjaxError==null&&a.isMsAjaxLoaded())a._msAjaxError=Error;return a._msAjaxError},"set":function(a){this._msAjaxError=a},enumerable:a,configurable:a});Object.defineProperty(b.prototype,"msAjaxString",{"get":function(){var a=this;if(a._msAjaxString==null&&a.isMsAjaxLoaded())a._msAjaxString=String;return a._msAjaxString},"set":function(a){this._msAjaxString=a},enumerable:a,configurable:a});Object.defineProperty(b.prototype,"msAjaxDebug",{"get":function(){var a=this;if(a._msAjaxDebug==null&&a.isMsAjaxLoaded())a._msAjaxDebug=Sys.Debug;return a._msAjaxDebug},"set":function(a){this._msAjaxDebug=a},enumerable:a,configurable:a});return b}();b.MicrosoftAjaxFactory=a})(OfficeExt||(OfficeExt={}));var OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory,OSF=OSF||{},OfficeExt;(function(b){var a=function(){function a(a){this._internalStorage=a}a.prototype.getItem=function(a){try{return this._internalStorage&&this._internalStorage.getItem(a)}catch(b){return null}};a.prototype.setItem=function(b,a){try{this._internalStorage&&this._internalStorage.setItem(b,a)}catch(c){}};a.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(a){}};a.prototype.removeItem=function(a){try{this._internalStorage&&this._internalStorage.removeItem(a)}catch(b){}};a.prototype.getKeysWithPrefix=function(d){var b=[];try{for(var e=this._internalStorage&&this._internalStorage.length||0,a=0;a0)b.push(a);else a.tabIndex===0&&c.push(a);else c.push(a)}b=b.sort(function(d,c){var a=d.tabIndex-c.tabIndex;if(a===0)a=b.indexOf(d)-b.indexOf(c);return a});return [].concat(b,c)}return {set_entropy:function(a){if(typeof a=="string")for(var b=0;b1?f[f.length-1]:a;if(k&&b!=a){if(b.indexOf(u)>=0)b=b.split(u)[0];b=decodeURIComponent(b)}var c=p();if(!i&&c){var e=window.name.indexOf(j);if(e>d){var g=window.name.indexOf(";",e);if(g==d)g=window.name.length;var h=window.name.substring(e,g);if(b)c.setItem(h,b);else b=c.getItem(h)}}return b},getConversationId:function(){var c=window.location.search,b=a;if(c){var d=c.indexOf("&");b=d>0?c.substring(1,d):c.substr(1);if(b&&b.charAt(b.length-1)==="="){b=b.substring(0,b.length-1);if(b)b=decodeURIComponent(b)}}return b},getInfoItems:function(b){var a=b.split("$");if(typeof a[1]==h)a=b.split("|");if(typeof a[1]==h)a=b.split("%7C");return a},getXdmFieldValue:function(e,d){var b="",c=OSF.OUtil.parseXdmInfo(d);if(c){var a=OSF.OUtil.getInfoItems(c);if(a!=undefined&&a.length>=3)switch(e){case OSF.XdmFieldName.ConversationUrl:b=a[2];break;case OSF.XdmFieldName.AppId:b=a[1]}}return b},validateParamObject:function(f,e){var a=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:c},{name:"expectedProperties",type:Object,mayBeNull:c},{name:"callback",type:Function,mayBeNull:b}]);if(a)throw a;for(var d in e){a=Function._validateParameter(f[d],e[d],d);if(a)throw a}},writeProfilerMark:function(a){if(window.msWriteProfilerMark){window.msWriteProfilerMark(a);OsfMsAjaxFactory.msAjaxDebug.trace(a)}},outputDebug:function(a){typeof OsfMsAjaxFactory!==h&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(a)},defineNondefaultProperty:function(e,f,a,c){a=a||{};for(var g in c){var d=c[g];if(a[d]==undefined)a[d]=b}Object.defineProperty(e,f,a);return e},defineNondefaultProperties:function(c,a,d){a=a||{};for(var b in a)OSF.OUtil.defineNondefaultProperty(c,b,a[b],d);return c},defineEnumerableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[e])},defineEnumerableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[e])},defineMutableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[k,e,l])},defineMutableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[k,e,l])},finalizeProperties:function(e,d){d=d||{};for(var g=Object.getOwnPropertyNames(e),i=g.length,f=0;f>8;f=g&255;b[a++]=d>>2;b[a++]=(d&3)<<4|e>>4;b[a++]=(e&15)<<2|f>>6;b[a++]=f&63;if(!isNaN(g)){d=g>>8;e=i&255;f=i>>8;b[a++]=d>>2;b[a++]=(d&3)<<4|e>>4;b[a++]=(e&15)<<2|f>>6;b[a++]=f&63}if(isNaN(g))b[a-1]=64;else if(isNaN(i)){b[a-2]=64;b[a-1]=64}for(var k=0;k0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(b){if(b==a)return a;else if(!(b instanceof Object))return b;else if(Array.isArray(b)){for(var e=[],d=0;dc)return d;else if(a===0&&b)return d;else if(a===c-1&&!b)return d;if(b)return a-1;else return a+1};e=t(e);h=j?e.length-1:0;if(e.length===0)return a;while(!i&&h>=0&&hc)return d;else if(a===0&&b)return d;else if(a===c-1&&!b)return d;if(b)return a-1;else return a+1};f=t(f);k=n(f,o);e=j(f.length,k,m);if(e<0)return a;while(!i&&e>=0&&e0;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[d%16];d=Math.floor(d/16)}for(;b<32;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[Math.floor(Math.random()*16)]}return c}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(y,u,p,n,r,v,q,t,x,j,w,l,k,m,h,g,f,e,i,c,d,s,o,b){var a=this;a._id=y;a._appName=u;a._appVersion=p;a._appUILocale=n;a._dataLocale=r;a._docUrl=v;a._clientMode=q;a._settings=t;a._reason=x;a._osfControlType=j;a._eToken=w;a._correlationId=l;a._appInstanceId=k;a._touchEnabled=m;a._commerceAllowed=h;a._appMinorVersion=g;a._requirementMatrix=f;a._hostCustomMessage=e;a._hostFullVersion=i;a._isDialog=false;a._clientWindowHeight=c;a._clientWindowWidth=d;a._addinName=s;a._appDomains=o;a._dialogRequirementMatrix=b;a.get_id=function(){return this._id};a.get_appName=function(){return this._appName};a.get_appVersion=function(){return this._appVersion};a.get_appUILocale=function(){return this._appUILocale};a.get_dataLocale=function(){return this._dataLocale};a.get_docUrl=function(){return this._docUrl};a.get_clientMode=function(){return this._clientMode};a.get_bindings=function(){return this._bindings};a.get_settings=function(){return this._settings};a.get_reason=function(){return this._reason};a.get_osfControlType=function(){return this._osfControlType};a.get_eToken=function(){return this._eToken};a.get_correlationId=function(){return this._correlationId};a.get_appInstanceId=function(){return this._appInstanceId};a.get_touchEnabled=function(){return this._touchEnabled};a.get_commerceAllowed=function(){return this._commerceAllowed};a.get_appMinorVersion=function(){return this._appMinorVersion};a.get_requirementMatrix=function(){return this._requirementMatrix};a.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};a.get_hostCustomMessage=function(){return this._hostCustomMessage};a.get_hostFullVersion=function(){return this._hostFullVersion};a.get_isDialog=function(){return this._isDialog};a.get_clientWindowHeight=function(){return this._clientWindowHeight};a.get_clientWindowWidth=function(){return this._clientWindowWidth};a.get_addinName=function(){return this._addinName};a.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(b,a){if(a==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||a==Microsoft.Office.WebExtension.EventType.BindingDataChanged||a==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||a==Microsoft.Office.WebExtension.EventType.DataNodeInserted||a==Microsoft.Office.WebExtension.EventType.DataNodeReplaced)return b+"_"+a;else return a};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var a={};return {getErrorArgs:function(c){var b=a[c];if(!b)b=a[this.errorCodes.ooeInternalError];else{if(!b.name)b.name=a[this.errorCodes.ooeInternalError].name;if(!b.message)b.message=a[this.errorCodes.ooeInternalError].message}return b},addErrorMessage:function(c,b){a[c]=b},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11000,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12000,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13000,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008},initializeErrorMessages:function(b){a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:b.L_DataReadError,message:b.L_GetSelectionNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotMatchBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:b.L_DataReadError,message:b.L_InvalidGetRowColumnCounts};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:b.L_DataReadError,message:b.L_SelectionNotSupportCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:b.L_DataReadError,message:b.L_InvalidGetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:b.L_DataReadError,message:b.L_NonUniformPartialGetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:b.L_DataReadError,message:b.L_GetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:b.L_DataReadError,message:b.L_FileTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:b.L_DataReadError,message:b.L_GetDataParametersConflict};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:b.L_DataReadError,message:b.L_InvalidGetColumns};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:b.L_DataReadError,message:b.L_InvalidGetRows};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:b.L_DataReadError,message:b.L_InvalidReadForBlankRow};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:b.L_DataWriteError,message:b.L_UnsupportedDataObject};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:b.L_DataWriteError,message:b.L_CannotWriteToSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:b.L_DataWriteError,message:b.L_DataNotMatchSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:b.L_DataWriteError,message:b.L_OverwriteWorksheetData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:b.L_DataWriteError,message:b.L_DataNotMatchBindingSize};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:b.L_DataWriteError,message:b.L_InvalidSetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:b.L_InvalidFormat,message:b.L_InvalidDataFormat};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:b.L_DataWriteError,message:b.L_SetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:b.L_DataWriteError,message:b.L_NonUniformPartialSetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:b.L_DataWriteError,message:b.L_InvalidSetColumns};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:b.L_DataWriteError,message:b.L_InvalidSetRows};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:b.L_DataWriteError,message:b.L_SetDataParametersConflict};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:b.L_BindingCreationError,message:b.L_SelectionCannotBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:b.L_InvalidBindingError,message:b.L_BindingNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:b.L_BindingCreationError,message:b.L_BindingToMultipleSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidSelectionForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnThisBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:b.L_BindingCreationError,message:b.L_NamedItemNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:b.L_BindingCreationError,message:b.L_MultipleNamedItemFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidNamedItemForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:b.L_InvalidBinding,message:b.L_UnknownBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnMatrixData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:b.L_InvalidBinding,message:b.L_InvalidColumnsForBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:b.L_ReadSettingsError,message:b.L_SettingNameNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:b.L_SaveSettingsError,message:b.L_SettingsCannotSave};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:b.L_SettingsStaleError,message:b.L_SettingsAreStale};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:b.L_HostError,message:b.L_OperationNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:b.L_InternalError,message:b.L_InternalErrorDescription};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:b.L_PermissionDenied,message:b.L_DocumentReadOnly};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:b.L_EventRegistrationError,message:b.L_EventHandlerNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:b.L_InvalidAPICall,message:b.L_InvalidApiCallInContext};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:b.L_ShuttingDown,message:b.L_ShuttingDown};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:b.L_UnsupportedEnumeration,message:b.L_UnsupportedEnumerationMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:b.L_APINotSupported,message:b.L_BrowserAPINotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:b.L_APICallFailed,message:b.L_RequestTimeout};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:b.L_InvalidOrTimedOutSession,message:b.L_InvalidOrTimedOutSessionMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:b.L_APICallFailed,message:b.L_TooManyIncompleteRequests};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:b.L_APICallFailed,message:b.L_RequestTokenUnavailable};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:b.L_APICallFailed,message:b.L_ActivityLimitReached};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:b.L_APICallFailed,message:b.L_InvalidApiArgumentsMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:b.L_InvalidNode,message:b.L_CustomXmlNodeNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:b.L_CustomXmlError,message:b.L_CustomXmlError};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:b.L_CustomXmlExceedQuotaName,message:b.L_CustomXmlExceedQuotaMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:b.L_CustomXmlOutOfDateName,message:b.L_CustomXmlOutOfDateMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:b.L_CannotNavigateTo,message:b.L_CannotNavigateTo};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:b.L_SpecifiedIdNotExist,message:b.L_SpecifiedIdNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:b.L_NavOutOfBound,message:b.L_NavOutOfBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:b.L_DataWriteReminder,message:b.L_CellDataAmountBeyondLimits};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:b.L_MissingParameter,message:b.L_ElementMissing};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:b.L_InvalidValue,message:b.L_InvalidCellsValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:b.L_InvalidValue,message:b.L_InvalidTableOptionValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:b.L_InvalidValue,message:b.L_InvalidFormatValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_RowIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_ColIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:b.L_OutOfRange,message:b.L_FormatValueOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:b.L_FormattingReminder,message:b.L_CellFormatAmountBeyondLimits};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:b.L_MemoryLimit,message:b.L_CloseFileBeforeRetrieve};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:b.L_NetworkProblem,message:b.L_NetworkProblemRetrieveFile};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:b.L_InvalidValue,message:b.L_SliceSizeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:b.L_DisplayDialogError,message:b.L_DialogAlreadyOpened};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:b.L_DisplayDialogError,message:b.L_NetworkProblem};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:b.L_DialogNavigateError,message:b.L_DialogInvalidScheme};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:b.L_DisplayDialogError,message:b.L_DialogAddressNotTrusted};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:b.L_DisplayDialogError,message:b.L_DialogRequireHTTPS};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:b.L_DisplayDialogError,message:b.L_UserClickIgnore};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:b.L_DisplayDialogError,message:b.L_NewWindowCrossZoneErrorString};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:b.L_APINotSupported,message:b.L_InvalidSSOAddinMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:b.L_UserNotSignedIn,message:b.L_UserNotSignedIn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:b.L_UserAborted,message:b.L_UserAbortedMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:b.L_UnsupportedUserIdentity,message:b.L_UnsupportedUserIdentityMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:b.L_InvalidResourceUrl,message:b.L_InvalidResourceUrlMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:b.L_InvalidGrant,message:b.L_InvalidGrantMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:b.L_SSOClientError,message:b.L_SSOClientErrorMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:b.L_SSOServerError,message:b.L_SSOServerErrorMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:b.L_AddinIsAlreadyRequestingToken,message:b.L_AddinIsAlreadyRequestingTokenMessage}}}}();var OfficeExt;(function(a){var b;(function(b){var a=1.1,z=function(){function a(){}return a}();b.RequirementVersion=z;var d=function(){function a(b){var a=this;a.isSetSupported=function(d,b){if(d==undefined)return false;if(b==undefined)b=0;var f=this._setMap,e=f._sets;if(e.hasOwnProperty(d.toLowerCase())){var g=e[d.toLowerCase()];try{var a=this._getVersion(g);b=b+"";var c=this._getVersion(b);if(a.major>0&&a.major>c.major)return true;if(a.minor>0&&a.minor>0&&a.major==c.major&&a.minor>=c.minor)return true}catch(h){return false}}return false};a._getVersion=function(e){var a="version format incorrect",b=e.split("."),c=0,d=0;if(b.length<2&&isNaN(Number(e)))throw a;else{c=Number(b[0]);if(b.length>=2)d=Number(b[1]);if(isNaN(c)||isNaN(d))throw a}var f={minor:d,major:c};return f};a._setMap=b;a.isSetSupported=a.isSetSupported.bind(a)}return a}();b.RequirementMatrix=d;var c=function(){function a(a){this._addSetMap=function(a){for(var b in a)this._sets[b]=a[b]};this._sets=a}return a}();b.DefaultSetRequirement=c;var x=function(c){__extends(b,c);function b(){c.call(this,{dialogapi:a})}return b}(c);b.DefaultDialogSetRequirement=x;var f=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,excelapi:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a})}return b}(c);b.ExcelClientDefaultSetRequirement=f;var k=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({imagecoercion:a})}return b}(f);b.ExcelClientV1DefaultSetRequirement=k;var l=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.3})}return a}(c);b.OutlookClientDefaultSetRequirement=l;var h=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,compressedfile:a,customxmlparts:a,documentevents:a,file:a,htmlcoercion:a,matrixbindings:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,textfile:a,wordapi:a})}return b}(c);b.WordClientDefaultSetRequirement=h;var p=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:a})}return b}(h);b.WordClientV1DefaultSetRequirement=p;var e=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,compressedfile:a,documentevents:a,file:a,pdffile:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.PowerpointClientDefaultSetRequirement=e;var j=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({imagecoercion:a})}return b}(e);b.PowerpointClientV1DefaultSetRequirement=j;var o=function(c){__extends(b,c);function b(){c.call(this,{selection:a,textcoercion:a})}return b}(c);b.ProjectClientDefaultSetRequirement=o;var u=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,file:a})}return b}(c);b.ExcelWebDefaultSetRequirement=u;var w=function(c){__extends(b,c);function b(){c.call(this,{compressedfile:a,documentevents:a,file:a,imagecoercion:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablecoercion:a,textcoercion:a,textfile:a})}return b}(c);b.WordWebDefaultSetRequirement=w;var n=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,settings:a})}return b}(c);b.PowerpointWebDefaultSetRequirement=n;var g=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.3})}return a}(c);b.OutlookWebDefaultSetRequirement=g;var v=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,documentevents:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.SwayWebDefaultSetRequirement=v;var r=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,partialtablebindings:a,settings:a,tablebindings:a,tablecoercion:a})}return b}(c);b.AccessWebDefaultSetRequirement=r;var t=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a})}return b}(c);b.ExcelIOSDefaultSetRequirement=t;var i=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,compressedfile:a,customxmlparts:a,documentevents:a,file:a,htmlcoercion:a,matrixbindings:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,textfile:a})}return b}(c);b.WordIOSDefaultSetRequirement=i;var s=function(b){__extends(a,b);function a(){b.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return a}(i);b.WordIOSV1DefaultSetRequirement=s;var m=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,compressedfile:a,documentevents:a,file:a,pdffile:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.PowerpointIOSDefaultSetRequirement=m;var q=function(c){__extends(b,c);function b(){c.call(this,{mailbox:a})}return b}(c);b.OutlookIOSDefaultSetRequirement=q;var y=function(){var b="undefined";function a(){}a.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)};a.getDefaultRequirementMatrix=function(f){this.initializeDefaultSetMatrix();var e=undefined,g=f.get_requirementMatrix();if(g!=undefined&&g.length>0&&typeof JSON!==b){var i=JSON.parse(f.get_requirementMatrix().toLowerCase());e=new d(new c(i))}else{var h=a.getClientFullVersionString(f);if(a.DefaultSetArrayMatrix!=undefined&&a.DefaultSetArrayMatrix[h]!=undefined)e=new d(a.DefaultSetArrayMatrix[h]);else e=new d(new c({}))}return e};a.getDefaultDialogRequirementMatrix=function(f){var a=undefined,e=f.get_dialogRequirementMatrix();if(e!=undefined&&e.length>0&&typeof JSON!==b){var g=JSON.parse(f.get_requirementMatrix().toLowerCase());a=new d(new c(g))}else a=new d(new x);return a};a.getClientFullVersionString=function(a){var d=a.get_appMinorVersion(),e="",b="",c=a.get_appName(),f=c==1024||c==4096||c==8192||c==65536;if(f&&a.get_appVersion()==1)if(c==4096&&d>=15)b="16.00.01";else b="16.00";else if(a.get_appName()==64)b=a.get_appVersion();else{if(d<10)e="0"+d;else e=""+d;b=a.get_appVersion()+"."+e}return a.get_appName()+"-"+b};a.initializeDefaultSetMatrix=function(){a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1600]=new f;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1600]=new h;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1600]=new e;a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1601]=new k;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1601]=new p;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1601]=new j;a.DefaultSetArrayMatrix[a.Outlook_RCLIENT_1600]=new l;a.DefaultSetArrayMatrix[a.Excel_WAC_1600]=new u;a.DefaultSetArrayMatrix[a.Word_WAC_1600]=new w;a.DefaultSetArrayMatrix[a.Outlook_WAC_1600]=new g;a.DefaultSetArrayMatrix[a.Outlook_WAC_1601]=new g;a.DefaultSetArrayMatrix[a.Project_RCLIENT_1600]=new o;a.DefaultSetArrayMatrix[a.Access_WAC_1600]=new r;a.DefaultSetArrayMatrix[a.PowerPoint_WAC_1600]=new n;a.DefaultSetArrayMatrix[a.Excel_IOS_1600]=new t;a.DefaultSetArrayMatrix[a.SWAY_WAC_1600]=new v;a.DefaultSetArrayMatrix[a.Word_IOS_1600]=new i;a.DefaultSetArrayMatrix[a.Word_IOS_16001]=new s;a.DefaultSetArrayMatrix[a.PowerPoint_IOS_1600]=new m;a.DefaultSetArrayMatrix[a.Outlook_IOS_1600]=new q};a.Excel_RCLIENT_1600="1-16.00";a.Excel_RCLIENT_1601="1-16.01";a.Word_RCLIENT_1600="2-16.00";a.Word_RCLIENT_1601="2-16.01";a.PowerPoint_RCLIENT_1600="4-16.00";a.PowerPoint_RCLIENT_1601="4-16.01";a.Outlook_RCLIENT_1600="8-16.00";a.Excel_WAC_1600="16-16.00";a.Word_WAC_1600="32-16.00";a.Outlook_WAC_1600="64-16.00";a.Outlook_WAC_1601="64-16.01";a.Project_RCLIENT_1600="128-16.00";a.Access_WAC_1600="256-16.00";a.PowerPoint_WAC_1600="512-16.00";a.Excel_IOS_1600="1024-16.00";a.SWAY_WAC_1600="2048-16.00";a.Word_IOS_1600="4096-16.00";a.Word_IOS_16001="4096-16.00.01";a.PowerPoint_IOS_1600="8192-16.00";a.Outlook_IOS_1600="65536-16.00";a.DefaultSetArrayMatrix={};return a}();b.RequirementsMatrixFactory=y})(b=a.Requirement||(a.Requirement={}))})(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda();var OfficeExt;(function(a){var b;(function(a){var b=function(){function a(){var a=this;a.getDiagnostics=function(b){var a={host:this.getHost(),version:b||this.getDefaultVersion(),platform:this.getPlatform()};return a};a.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};a.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};a.hostInfo=OSF._OfficeAppFactory.getHostInfo();a.getHost=a.getHost.bind(a);a.getPlatform=a.getPlatform.bind(a);a.getDiagnostics=a.getDiagnostics.bind(a)}a.prototype.capitalizeFirstLetter=function(a){if(a)return a[0].toUpperCase()+a.slice(1).toLowerCase();return a};a.getInstance=function(){if(a.hostObj===undefined)a.hostObj=new a;return a.hostObj};a.prototype.getPlatform=function(){var a=this;if(a.hostInfo.hostPlatform){var b=a.hostInfo.hostPlatform.toLowerCase();if(a.platformRemappings[b])return a.platformRemappings[b]}return null};a.prototype.getHost=function(){var a=this;if(a.hostInfo.hostType){var b=a.hostInfo.hostType.toLowerCase();if(a.camelCaseMappings[b])return a.camelCaseMappings[b];b=a.capitalizeFirstLetter(a.hostInfo.hostType);if(Microsoft.Office.WebExtension.HostType[b])return Microsoft.Office.WebExtension.HostType[b]}return null};a.prototype.getDefaultVersion=function(){if(this.getHost())return "16.0.0000.0000";return null};return a}();a.Host=b})(b=a.HostName||(a.HostName={}))})(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var b,a=false;return {enableShortcut:function(){if(!a){if(window.Office)b=window.Office;else OSF.OUtil.setNamespace("Office",window);window.Office=Microsoft.Office.WebExtension;a=true}},disableShortcut:function(){if(a){if(b)window.Office=b;else OSF.OUtil.unsetNamespace("Office",window);a=false}}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(a){if(a)OSF.NamespaceManager.enableShortcut();else OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(a,b){var c;if(a&&typeof a=="string"){var d=a.indexOf("#");if(d!=-1){var h=a.substring(0,d),g=a.substring(d+1);switch(h){case "binding":case "bindings":if(g)c=new OSF.DDA.BindingPromise(g)}}}if(!c){if(b){var e=typeof b;if(e=="function"){var f={};f[Microsoft.Office.WebExtension.Parameters.Callback]=b;OSF.DDA.issueAsyncResult(f,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,e)}}else{c.onFail=b;return c}};OSF.DDA.Context=function(a,g,h,c,d){var f="requirements",b=this;OSF.OUtil.defineEnumerableProperties(b,{contentLanguage:{value:a.get_dataLocale()},displayLanguage:{value:a.get_appUILocale()},touchEnabled:{value:a.get_touchEnabled()},commerceAllowed:{value:a.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(a.get_hostFullVersion())}});h&&OSF.OUtil.defineEnumerableProperty(b,"license",{value:h});a.ui&&OSF.OUtil.defineEnumerableProperty(b,"ui",{value:a.ui});a.auth&&OSF.OUtil.defineEnumerableProperty(b,"auth",{value:a.auth});if(a.get_isDialog()){var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,f,{value:e})}else{g&&OSF.OUtil.defineEnumerableProperty(b,"document",{value:g});if(c){var i=c.displayName||"appOM";delete c.displayName;OSF.OUtil.defineEnumerableProperty(b,i,{value:c})}d&&OSF.OUtil.defineEnumerableProperty(b,"officeTheme",{"get":function(){return d()}});var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,f,{value:e})}};OSF.DDA.OutlookContext=function(c,a,d,e,b){OSF.DDA.OutlookContext.uber.constructor.call(this,c,null,d,e,b);a&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:a})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(b,c){var a;switch(b.get_clientMode()){case OSF.ClientMode.ReadOnly:a=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:a=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}c&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:c});OSF.OUtil.defineMutableProperties(this,{mode:{value:a},url:{value:b.get_docUrl()}})};OSF.DDA.JsomDocument=function(d,b,e){var a=this;OSF.DDA.JsomDocument.uber.constructor.call(a,d,e);b&&OSF.OUtil.defineEnumerableProperty(a,"bindings",{"get":function(){return b}});var c=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(a,[c.GetSelectedDataAsync,c.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(a,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{"get":function(){var a;if(OSF&&OSF._OfficeAppFactory)a=OSF._OfficeAppFactory.getContext();return a}});OSF.DDA.License=function(a){OSF.OUtil.defineEnumerableProperty(this,"value",{value:a})};OSF.DDA.ApiMethodCall=function(c,f,e,g,h){var a=this,d=c.length,b=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,h)});a.verifyArguments=function(d,f){for(var e in d){var a=d[e],c=f[e];if(a["enum"])switch(typeof c){case "string":if(OSF.OUtil.listContainsValue(a["enum"],c))break;case "undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw b()}if(a["types"])if(!OSF.OUtil.listContainsValue(a["types"],typeof c))throw b()}};a.extractRequiredArguments=function(g,l,j){if(g.lengthc+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var d,f,i=h.length-1;i>=c;i--){var g=h[i];switch(typeof g){case "object":if(d)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else d=g;break;case a:if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else f=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}d=b.fillOptions(d,j,l,k);if(f)if(d[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else d[Microsoft.Office.WebExtension.Parameters.Callback]=f;b.verifyArguments(e,d);return d}this.verifyAndExtractCall=function(e,c,a){var d=b.extractRequiredArguments(e,c,a),g=h(e,d,c,a),f=b.constructCallArgs(d,g,c,a);return f};this.processResponse=function(c,b,e,d){var a;if(c==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)if(f)a=f(b,e,d);else a=b;else if(g)a=g(c,b);else a=OSF.DDA.ErrorCodeManager.getErrorArgs(c);return a};this.getCallArgs=function(g){for(var b,d,f=g.length-1;f>=c;f--){var e=g[f];switch(typeof e){case "object":b=e;break;case a:d=e}}b=b||{};if(d)b[Microsoft.Office.WebExtension.Parameters.Callback]=d;return b}};OSF.DDA.AsyncMethodCallFactory=function(){return {manufacture:function(a){var c=a.supportedOptions?OSF.OUtil.createObject(a.supportedOptions):[],b=a.privateStateCallbacks?OSF.OUtil.createObject(a.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(a.requiredArguments||[],c,b,a.onSucceeded,a.onFailed,a.checkCallArgs,a.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(a){OSF.DDA.AsyncMethodCalls[a.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(a)};OSF.DDA.Error=function(c,a,b){OSF.OUtil.defineEnumerableProperties(this,{name:{value:c},message:{value:a},code:{value:b}})};OSF.DDA.AsyncResult=function(b,a){OSF.OUtil.defineEnumerableProperties(this,{value:{value:b[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:a?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});b[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:b[OSF.DDA.AsyncResultEnum.Properties.Context]});a&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(a[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(d,f,a){var e=d[Microsoft.Office.WebExtension.Parameters.Callback];if(e){var c={};c[OSF.DDA.AsyncResultEnum.Properties.Context]=d[Microsoft.Office.WebExtension.Parameters.AsyncContext];var b;if(f==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)c[OSF.DDA.AsyncResultEnum.Properties.Value]=a;else{b={};a=a||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);b[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=f||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=a.name||a;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=a.message||a}e(new OSF.DDA.AsyncResult(c,b))}};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(b){for(var a in b){var c={};OSF.OUtil.defineEnumerableProperties(c,{id:{value:a},displayName:{value:b[a]}});OSF.DDA.SyncMethodNames[a]=c}};OSF.DDA.SyncMethodCall=function(b,c,f,g,h){var d=b.length,a=new OSF.DDA.ApiMethodCall(b,c,f,g,h);function e(e,h,j,i){if(e.length>d+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var b,k,f=e.length-1;f>=d;f--){var g=e[f];switch(typeof g){case "object":if(b)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else b=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}b=a.fillOptions(b,h,j,i);a.verifyArguments(c,b);return b}this.verifyAndExtractCall=function(f,c,b){var d=a.extractRequiredArguments(f,c,b),h=e(f,d,c,b),g=a.constructCallArgs(d,h,c,b);return g}};OSF.DDA.SyncMethodCallFactory=function(){return {manufacture:function(a){var b=a.supportedOptions?OSF.OUtil.createObject(a.supportedOptions):[];return new OSF.DDA.SyncMethodCall(a.requiredArguments||[],b,a.privateStateCallbacks,a.checkCallArgs,a.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(a){OSF.DDA.SyncMethodCalls[a.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(a)};OSF.DDA.ListType=function(){var a={};return {setListType:function(c,b){a[c]=b},isListType:function(b){return OSF.OUtil.listContainsKey(a,b)},getDescriptor:function(b){return a[b]}}}();OSF.DDA.HostParameterMap=function(b,c){var j="fromHost",a=this,i="toHost",e=j,l="sourceData",g="self",d={};d[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(a){if(a!=null&&a.rows!==undefined){var b={};b[OSF.DDA.TableDataProperties.TableRows]=a.rows;b[OSF.DDA.TableDataProperties.TableHeaders]=a.headers;a=b}return a},fromHost:function(a){return a}};d[Microsoft.Office.WebExtension.Parameters.SampleData]=d[Microsoft.Office.WebExtension.Parameters.Data];function f(j,i){var m=j?{}:undefined;for(var h in j){var g=j[h],a;if(OSF.DDA.ListType.isListType(h)){a=[];for(var n in g)a.push(f(g[n],i))}else if(OSF.OUtil.listContainsKey(d,h))a=d[h][i](g);else if(i==e&&b.preserveNesting(h))a=f(g,i);else{var k=c[h];if(k){var l=k[i];if(l){a=l[g];if(a===undefined)a=g}}else a=g}m[h]=a}return m}function k(j,h){var e;for(var a in h){var d;if(b.isComplexType(a))d=k(j,c[a][i]);else d=j[a];if(d!=undefined){if(!e)e={};var f=h[a];if(f==g)f=a;e[f]=b.pack(a,d)}}return e}function h(j,n,f){if(!f)f={};for(var a in n){var k=n[a],d;if(k==g)d=j;else if(k==l){f[a]=j.toArray();continue}else d=j[k];if(d===null||d===undefined)f[a]=undefined;else{d=b.unpack(a,d);var i;if(b.isComplexType(a)){i=c[a][e];if(b.preserveNesting(a))f[a]=h(d,i);else h(d,i,f)}else if(OSF.DDA.ListType.isListType(a)){i={};var p=OSF.DDA.ListType.getDescriptor(a);i[p]=g;var m=new Array(d.length);for(var o in d)m[o]=h(d[o],i);f[a]=m}else f[a]=d}}return f}function m(l,e,a){var d=c[l][a],b;if(a=="toHost"){var i=f(e,a);b=k(i,d)}else if(a==j){var g=h(e,d);b=f(g,a)}return b}if(!c)c={};a.addMapping=function(l,h){var a,d;if(h.map){a=h.map;d={};for(var j in a){var k=a[j];if(k==g)k=j;d[k]=j}}else{a=h.toHost;d=h.fromHost}var b=c[l];if(b){var f=b[i];for(var n in f)a[n]=f[n];f=b[e];for(var m in f)d[m]=f[m]}else b=c[l]={};b[i]=a;b[e]=d};a.toHost=function(b,a){return m(b,a,i)};a.fromHost=function(a,b){return m(a,b,e)};a.self=g;a.sourceData=l;a.addComplexType=function(a){b.addComplexType(a)};a.getDynamicType=function(a){return b.getDynamicType(a)};a.setDynamicType=function(c,a){b.setDynamicType(c,a)};a.dynamicTypes=d;a.doMapValues=function(a,b){return f(a,b)}};OSF.DDA.SpecialProcessor=function(c,b){var a=this;a.addComplexType=function(a){c.push(a)};a.getDynamicType=function(a){return b[a]};a.setDynamicType=function(c,a){b[c]=a};a.isComplexType=function(a){return OSF.OUtil.listContainsValue(c,a)};a.isDynamicType=function(a){return OSF.OUtil.listContainsKey(b,a)};a.preserveNesting=function(b){var a=[];OSF.DDA.PropertyDescriptors&&a.push(OSF.DDA.PropertyDescriptors.Subset);if(OSF.DDA.DataNodeEventProperties)a=a.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]);return OSF.OUtil.listContainsValue(a,b)};a.pack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].toHost(d);else a=d;return a};a.unpack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].fromHost(d);else a=d;return a}};OSF.DDA.getDecoratedParameterMap=function(d,c){var a=new OSF.DDA.HostParameterMap(d),f=a.self;function b(a){var c=null;if(a){c={};for(var d=a.length,b=0;b0){for(var d=[],c=0;c=f)break;c=Function._validateParameter(i[d],h,j);if(c){c.popStackFrame();return c}}return a};if(!Function._validateParameterCount)Function._validateParameterCount=function(m,f,l){var b,e,c=f.length,g=m.length;if(gc){e=d;for(b=0;b0&&b.push(c)}}}catch(i){}return b}var c=[],b={};b[Microsoft.Office.WebExtension.Parameters.Data]=function(){var c=0,b=1;return {toHost:function(a){if(OSF.DDA.TableDataProperties&&typeof a!="string"&&a[OSF.DDA.TableDataProperties.TableRows]!==undefined){var d=[];d[c]=a[OSF.DDA.TableDataProperties.TableRows];d[b]=a[OSF.DDA.TableDataProperties.TableHeaders];a=d}return a},fromHost:function(f){var e;if(f.toArray){var g=f.dimensions();if(g===2)e=a(f);else{var d=f.toArray();if(d.length===2&&(d[0]!=null&&d[0].toArray||d[1]!=null&&d[1].toArray)){e={};e[OSF.DDA.TableDataProperties.TableRows]=a(d[c]);e[OSF.DDA.TableDataProperties.TableHeaders]=a(d[b])}else e=d}}else e=f;return e}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,c,b);this.unpack=function(c,a){var d;if(this.isComplexType(c)||OSF.DDA.ListType.isListType(c)){var e=(a||typeof a==="unknown")&&a.toArray;d=e?a.toArray():a||{}}else if(this.isDynamicType(c))d=b[c].fromHost(a);else d=a;return d}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(a){function c(a){var b=a;if(OSF.OUtil.isArray(a))for(var f=b.length,d=0;d2){c=[];for(var g=1;g=a.MESSAGE_TIME_DELTA){f();b.lastMessageTimestamp=d}else{b.lastMessageTimestamp+=a.MESSAGE_TIME_DELTA;setTimeout(function(){f()},b.lastMessageTimestamp-d)}return e};a.prototype.generateCorrelationId=function(){++this.callingIndex;return this.conversationId+this.callingIndex};a.getCurrentTimeMS=function(){return (new Date).getTime()};a.MESSAGE_TIME_DELTA=10;return a}();b.WebkitScriptMessaging=c})(b=a.ScriptMessaging||(a.ScriptMessaging={}))})(OSFWebkit||(OSFWebkit={}));OSF.ScriptMessaging=OSFWebkit.ScriptMessaging;var OSFWebkit;(function(a){a.MessageHandlerName="Agave";a.PopupMessageHandlerName="WefPopupHandler";(function(a){var w="HostFullVersion",v="HostCustomMessage",u="RequirementMatrix",t="CommerceAllowed",s="TouchEnabled",r="InstanceId",q="CorrelationId",p="APISetVersion",o="SolutionToken",n="ControlIntegrationLevel",m="ActivationMode",l="DocumentUrl",k="BindingCount",j="AppDataLocale",i="APPUILocale",h="AppCapabilities",g="APIVersionSequence",f="RevisionVersion",e="MinorVersion",d="MajorVersion",c="SolutionReferenceId",b="Settings";a[a[b]=0]=b;a[a[c]=1]=c;a[a["AppType"]=2]="AppType";a[a[d]=3]=d;a[a[e]=4]=e;a[a[f]=5]=f;a[a[g]=6]=g;a[a[h]=7]=h;a[a[i]=8]=i;a[a[j]=9]=j;a[a[k]=10]=k;a[a[l]=11]=l;a[a[m]=12]=m;a[a[n]=13]=n;a[a[o]=14]=o;a[a[p]=15]=p;a[a[q]=16]=q;a[a[r]=17]=r;a[a[s]=18]=s;a[a[t]=19]=t;a[a[u]=20]=u;a[a[v]=21]=v;a[a[w]=22]=w})(a.AppContextProperties||(a.AppContextProperties={}));var c=a.AppContextProperties;(function(a){var e="GetContext",d="WriteSettings",c="UnregisterEvent",b="RegisterEvent";a[a["Execute"]=1]="Execute";a[a[b]=2]=b;a[a[c]=3]=c;a[a[d]=4]=d;a[a[e]=5]=e})(a.MethodId||(a.MethodId={}));var d=a.MethodId,b=function(){var d="message",c=null;function b(a){this.hostScriptProxy=a}b.prototype.execute=function(h,g,d){var b=g;if(b==c)b=[];var f={id:h,apiArgs:b},e=function(e){if(d){var g=[];if(OSF.OUtil.isArray(e))for(var f=0;f=2){d=b[0];e=b[1]}c&&c(e,new a.WebkitSafeArray(d))},e=function(c){if(b)return b(new a.WebkitSafeArray(c))};this.hostScriptProxy.registerEvent(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.RegisterEvent,g,f,d,e)};b.prototype.unregisterEvent=function(e,d,c){var b=function(b){return c(new a.WebkitSafeArray(b))};this.hostScriptProxy.unregisterEvent(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.UnregisterEvent,e,d,b)};b.prototype.messageParent=function(c){var b=c[Microsoft.Office.WebExtension.Parameters.MessageToParent],a={dialogMessage:{messageType:OSF.DialogMessageType.DialogMessageReceived,messageContent:b}};window.opener.postMessage(JSON.stringify(a),window.location.origin)};b.prototype.openDialog=function(h,o,g,k){if(b.popup&&!b.popup.closed){k(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened);return}var n="action=displayDialog";b.OpenDialogCallback=undefined;var i="#",f=JSON.parse(o),l=f.url;if(!l)return;var a=l.split(i),j="?";if(a[0].indexOf("?")>-1)j="&";var s=screen.width*f.width/100,q=screen.height*f.height/100,r="width="+s+", height="+q;a[0]=a[0].concat(j).concat(n);var p=a.join(i);b.popup=window.open(p,"",r);function e(a){if(a.origin==window.location.origin)try{var b=JSON.parse(a.data);b.dialogMessage&&g(h,[OSF.DialogMessageType.DialogMessageReceived,b.dialogMessage.messageContent])}catch(c){OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handlered. Message:"+a.data)}}function m(){try{if(b.popup==c||b.popup.closed){window.clearInterval(b.interval);window.removeEventListener(d,e);b.NotifyError=c;b.popup=c;g(h,[OSF.DialogMessageType.DialogClosed])}}catch(a){OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed.")}}b.OpenDialogCallback=function(a){if(a==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){window.addEventListener(d,e);this.messageEventListener=e;b.interval=window.setInterval(m,1e3);function c(a){g(h,[a])}b.NotifyError=c}k(a)}};b.prototype.closeDialog=function(f,e,a){if(b.popup){b.interval&&window.clearInterval(b.interval);b.popup.close();b.popup=c;window.removeEventListener(d,this.messageEventListener);b.NotifyError=c;a(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}else a(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)};b.prototype.sendMessage=function(){};return b}();a.WebkitHostController=b})(OSFWebkit||(OSFWebkit={}));OSF.Webkit=OSFWebkit;OSF.ClientHostController=new OSFWebkit.WebkitHostController(OSF.ScriptMessaging.GetScriptMessenger());OSF.DDA.ClientSettingsManager={getSettingsExecuteMethod:function(a){return function(b){var e,d,c=function(c,a){b.onReceiving&&b.onReceiving();b.onComplete&&b.onComplete(c,a)};try{a(b.hostCallArgs,b.onCalling,c)}catch(f){e=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;d={name:Strings.OfficeOM.L_InternalError,message:f};c(e,d)}}},read:function(b,a){var f=[],e=[];b&&b();var c=OSF._OfficeAppFactory.getInitializationHelper(),d=function(b){a&&a(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,b.get_settings())};c.getAppContext(null,d)},write:function(b,i,d,c){var a={},f=[],e=[];for(var g in b){f.push(g);e.push(b[g])}a["keys"]=f;a["values"]=e;d&&d();var h=function(a){c&&c(a[0],null)};OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.WriteSettings,a,h)}};OSF.InitializationHelper.prototype.initializeSettings=function(c,b){var a=c.get_settings(),d=this.deserializeSettings(a,b);return d};OSF.InitializationHelper.prototype.getAppContext=function(d,c){var b=function(b){for(var f,a=OSF.Webkit.AppContextProperties,v=b[a.AppType],h=b[a.Settings],g={},i=h[0],z=h[1],e=0;e40){a=OSF.OUtil.Guid.generateNewGuid();b.setValue(b.clientIDKey,a)}return a};a.prototype.saveLog=function(d,e){var b=this,a=b.getValue(b.logIdSetKey);a=(a&&a.length>0?a+";":c)+d;b.setValue(b.logIdSetKey,a);b.setValue(d,e)};a.prototype.enumerateLog=function(c,e){var a=this,d=a.getValue(a.logIdSetKey);if(d){var f=d.split(";");for(var h in f){var b=f[h],g=a.getValue(b);if(g){c&&c(b,g);e&&a.remove(b)}}e&&a.remove(a.logIdSetKey)}};a.prototype.getValue=function(d){var a=OSF.OUtil.getLocalStorage(),b=c;if(a)b=a.getItem(d);return b};a.prototype.setValue=function(c,b){var a=OSF.OUtil.getLocalStorage();a&&a.setItem(c,b)};a.prototype.remove=function(b){var a=OSF.OUtil.getLocalStorage();if(a)try{a.removeItem(b)}catch(c){}};return a}(),h=function(){function a(){}a.prototype.LogData=function(a){if(!OSF.Logger)return;OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,a.SerializeRow(),OSF.Logger.SendFlag.none);OSFAriaLogger.AriaLogger.getInstance().logData(a)};a.prototype.LogRawData=function(a){if(!OSF.Logger)return;OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,a,OSF.Logger.SendFlag.none);try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(a))}catch(b){}};return a}();function e(a){if(a)a=a.replace(/[{}]/g,c).toLowerCase();return a||c}function w(f){if(!OSF.Logger)return;if(a)return;a=new y;if(f.get_hostFullVersion())a.hostVersion=f.get_hostFullVersion();else a.hostVersion=f.get_appVersion();a.appId=f.get_id();a.host=f.get_appName();a.browser=window.navigator.userAgent;a.correlationId=e(f.get_correlationId());a.clientId=(new k).getClientId();a.appInstanceId=f.get_appInstanceId();if(a.appInstanceId)a.appInstanceId=a.appInstanceId.replace(/[{}]/g,c).toLowerCase();a.message=f.get_hostCustomMessage();a.officeJSVersion=OSF.ConstantNames.FileVersion;a.hostJSVersion="16.0.8118.1000";if(f._wacHostEnvironment)a.wacHostEnvironment=f._wacHostEnvironment;if(f._isFromWacAutomation!==undefined&&f._isFromWacAutomation!==b)a.isFromWacAutomation=f._isFromWacAutomation.toString().toLowerCase();var i=f.get_docUrl();a.docUrl=o.test(i)?i:c;var h=location.href;if(h)h=h.split("?")[0].split("#")[0];a.appURL=h;(function(i,a){var e,h,d;a.assetId=c;a.userId=c;try{e=decodeURIComponent(i);h=new DOMParser;d=h.parseFromString(e,"text/xml");var f=d.getElementsByTagName("t")[0].attributes.getNamedItem("cid"),g=d.getElementsByTagName("t")[0].attributes.getNamedItem("oid");if(f&&f.nodeValue)a.userId=f.nodeValue;else if(g&&g.nodeValue)a.userId=g.nodeValue;a.assetId=d.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(j){}finally{e=b;d=b;h=b}})(f.get_eToken(),a);(function(){var k=new Date,c=b,h=0,j=false,e=function(){if(document.hasFocus()){if(c==b)c=new Date}else if(c){h+=Math.abs((new Date).getTime()-c.getTime());c=b}},a=[];a.push(new g("focus",e));a.push(new g("blur",e));a.push(new g("focusout",e));a.push(new g("focusin",e));var i=function(){for(var e=0;e0)for(var d in a)if(a[d]===c)return true;return false},hasObjectEventHandler:function(d,e,f){var c=this._objectEventHandlers[d];if(c!=null)for(var a=c[e],b=0;a!=null&&b0)for(var b=0;b0){this._eventHandlers[a]=[];return true}return false},clearObjectEventHandlers:function(a,b){if(this._objectEventHandlers[a]!=null&&this._objectEventHandlers[a][b]!=null){this._objectEventHandlers[a][b]=[];return true}return false},getEventHandlerCount:function(a){return this._eventHandlers[a]!=undefined?this._eventHandlers[a].length:-1},getObjectEventHandlerCount:function(a,b){if(this._objectEventHandlers[a]==null||this._objectEventHandlers[a][b]==null)return 0;return this._objectEventHandlers[a][b].length},fireEvent:function(a){if(a.type==undefined)return false;var b=a.type;if(b&&this._eventHandlers[b]){var c=this._eventHandlers[b];for(var d in c)c[d](a);return true}else return false},fireObjectEvent:function(f,a){if(a.type==undefined)return false;var b=a.type;if(b&&this._objectEventHandlers[b]){var e=this._objectEventHandlers[b],c=e[f];if(c!=null){for(var d=0;d0){var d=b[0];while(c.length>0){var e=c.shift();d(e)}return true}}return false},clearQueuedEvent:function(a){if(a&&this._eventHandlers[a]){var b=this._queuedEventsArgs[a];if(b)this._queuedEventsArgs[a]=[]}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(e,c,b){var f="hostType",d=this,a;switch(e){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:a=new OSF.DDA.DocumentSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:a=new OSF.DDA.BindingSelectionChangedEventArgs(d.manufactureBinding(b,c.document),b[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:a=new OSF.DDA.BindingDataChangedEventArgs(d.manufactureBinding(b,c.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:a=new OSF.DDA.SettingsChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:a=new OSF.DDA.ActiveViewChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:a=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:a=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:a=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(b);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:a=new OSF.DDA.ObjectEventArgs(e,b[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:a=new OSF.DDA.NodeInsertedEventArgs(d.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NewNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:a=new OSF.DDA.NodeReplacedEventArgs(d.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.OldNode]),d.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NewNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:a=new OSF.DDA.NodeDeletedEventArgs(d.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.OldNode]),d.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:a=new OSF.DDA.TaskSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:a=new OSF.DDA.ResourceSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:a=new OSF.DDA.ViewSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:a=new OSF.DDA.DialogEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:a=new OSF.DDA.DialogParentEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]=="outlook"||OSF._OfficeAppFactory.getHostInfo()[f]=="outlookwebapp"){a=new OSF.DDA.OlkItemSelectedChangedEventArgs(b);c.initialize(a["initialData"]);c.setCurrentItemNumber(a["itemNumber"].itemNumber)}else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e))}return a};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:false,isWindowDialog:false};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var c=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),b=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,a=this;!a[b]&&OSF.OUtil.defineEnumerableProperty(a,b,{value:function(){var b=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];b(arguments,c,a)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(d){var b=OSF.DDA.SyncMethodNames.MessageParent.displayName,a=this;!a[b]&&OSF.OUtil.defineEnumerableProperty(a,b,{value:function(){var b=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return b(arguments,a)}});var c=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;!a[c]&&typeof OSF.DialogParentMessageEventDispatch!="undefined"&&OSF.DDA.DispIdHost.addEventSupport(a,OSF.DialogParentMessageEventDispatch,d);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(a){if(a[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived)OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:a[OSF.DDA.PropertyDescriptors.MessageContent]}});else OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:a[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:a[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:true}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:false}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:false}}],privateStateCallbacks:[],onSucceeded:function(c){var g=c[Microsoft.Office.WebExtension.Parameters.Id],b=c[Microsoft.Office.WebExtension.Parameters.Data],a=new OSF.DialogHandler,d=OSF.DDA.AsyncMethodNames.CloseAsync.displayName;OSF.OUtil.defineEnumerableProperty(a,d,{value:function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];c(arguments,g,b,a)}});var f=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;OSF.OUtil.defineEnumerableProperty(a,f,{value:function(){var d=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],c=d.verifyAndExtractCall(arguments,a,b),e=c[Microsoft.Office.WebExtension.Parameters.EventType],f=c[Microsoft.Office.WebExtension.Parameters.Handler];return b.addEventHandlerAndFireQueuedEvent(e,f)}});var e=OSF.DDA.SyncMethodNames.SendMessage.displayName;OSF.OUtil.defineEnumerableProperty(a,e,{value:function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return c(arguments,b,a)}});return a},checkCallArgs:function(a){if(a[Microsoft.Office.WebExtension.Parameters.Width]<=0)a[Microsoft.Office.WebExtension.Parameters.Width]=1;if(a[Microsoft.Office.WebExtension.Parameters.Width]>100)a[Microsoft.Office.WebExtension.Parameters.Width]=99;if(a[Microsoft.Office.WebExtension.Parameters.Height]<=0)a[Microsoft.Office.WebExtension.Parameters.Height]=1;if(a[Microsoft.Office.WebExtension.Parameters.Height]>100)a[Microsoft.Office.WebExtension.Parameters.Height]=99;if(!a[Microsoft.Office.WebExtension.Parameters.RequireHTTPs])a[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=true;return a}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(a){try{a.onCalling&&a.onCalling();var c=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true,a);OSF.ClientHostController.openDialog(a.dispId,a.targetId,function(c,b){a.onEvent&&a.onEvent(b);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(a.dispId)},c)}catch(b){OSF.DDA.SafeArray.Delegate._onException(b,a)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(a){a.onCalling&&a.onCalling();var c=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false,a);try{OSF.ClientHostController.closeDialog(a.dispId,a.targetId,c)}catch(b){OSF.DDA.SafeArray.Delegate._onException(b,a)}};OSF.DDA.SafeArray.Delegate.messageParent=function(a){try{a.onCalling&&a.onCalling();var d=(new Date).getTime(),b=OSF.ClientHostController.messageParent(a.hostCallArgs);a.onReceiving&&a.onReceiving();OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(a.dispId,a.hostCallArgs,Math.abs((new Date).getTime()-d),b);return b}catch(c){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(c)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:true});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:true});OSF.DDA.SafeArray.Delegate.sendMessage=function(a){try{a.onCalling&&a.onCalling();var d=(new Date).getTime(),c=OSF.ClientHostController.sendMessage(a.hostCallArgs);a.onReceiving&&a.onReceiving();return c}catch(b){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(b)}};Microsoft.Office.WebExtension.BindingType={Table:"table",Text:"text",Matrix:"matrix"};OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType};OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{BindingList:"BindingList"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{Subset:"subset",BindingProperties:"BindingProperties"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList,OSF.DDA.PropertyDescriptors.BindingProperties);OSF.DDA.BindingPromise=function(b,a){this._id=b;OSF.OUtil.defineEnumerableProperty(this,"onFail",{"get":function(){return a},"set":function(c){var b=typeof c;if(b!="undefined"&&b!="function")throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,b);a=c}})};OSF.DDA.BindingPromise.prototype={_fetch:function(b){var a=this;if(a.binding)b&&b(a.binding);else if(!a._binding){var c=a;Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(a._id,function(a){if(a.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded){OSF.OUtil.defineEnumerableProperty(c,"binding",{value:a.value});b&&b(c.binding)}else c.onFail&&c.onFail(a)})}return a},getDataAsync:function(){var a=arguments;this._fetch(function(b){b.getDataAsync.apply(b,a)});return this},setDataAsync:function(){var a=arguments;this._fetch(function(b){b.setDataAsync.apply(b,a)});return this},addHandlerAsync:function(){var a=arguments;this._fetch(function(b){b.addHandlerAsync.apply(b,a)});return this},removeHandlerAsync:function(){var a=arguments;this._fetch(function(b){b.removeHandlerAsync.apply(b,a)});return this}};OSF.DDA.BindingFacade=function(b){this._eventDispatches=[];OSF.OUtil.defineEnumerableProperty(this,"document",{value:b});var a=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[a.AddFromSelectionAsync,a.AddFromNamedItemAsync,a.GetAllAsync,a.GetByIdAsync,a.ReleaseByIdAsync])};OSF.DDA.UnknownBinding=function(b,a){OSF.OUtil.defineEnumerableProperties(this,{document:{value:a},id:{value:b}})};OSF.DDA.Binding=function(a,c){OSF.OUtil.defineEnumerableProperties(this,{document:{value:c},id:{value:a}});var d=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[d.GetDataAsync,d.SetDataAsync]);var e=Microsoft.Office.WebExtension.EventType,b=c.bindings._eventDispatches;if(!b[a])b[a]=new OSF.EventDispatch([e.BindingSelectionChanged,e.BindingDataChanged]);var f=b[a];OSF.DDA.DispIdHost.addEventSupport(this,f)};OSF.DDA.generateBindingId=function(){return "UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+(new Date).getTime()};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureBinding=function(a,c){var d=a[OSF.DDA.BindingProperties.Id],g=a[OSF.DDA.BindingProperties.RowCount],f=a[OSF.DDA.BindingProperties.ColumnCount],h=a[OSF.DDA.BindingProperties.HasHeaders],b;switch(a[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:b=new OSF.DDA.TextBinding(d,c);break;case Microsoft.Office.WebExtension.BindingType.Matrix:b=new OSF.DDA.MatrixBinding(d,c,g,f);break;case Microsoft.Office.WebExtension.BindingType.Table:var i=function(){return OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument},e;if(i()&&OSF.DDA.ExcelTableBinding)e=OSF.DDA.ExcelTableBinding;else e=OSF.DDA.TableBinding;b=new e(d,c,g,f,h);break;default:b=new OSF.DDA.UnknownBinding(d,c)}return b};OSF.DDA.AsyncMethodNames.addNames({AddFromSelectionAsync:"addFromSelectionAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:"getByIdAsync",ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync"});(function(){var d="number",c="object",b="string",a=null;function e(a){return OSF.DDA.OMFactory.manufactureBinding(a,Microsoft.Office.WebExtension.context.document)}function f(a){return a.id}function g(c,e,d){var b=c[Microsoft.Office.WebExtension.Parameters.Data];if(OSF.DDA.TableDataProperties&&b&&(b[OSF.DDA.TableDataProperties.TableRows]!=undefined||b[OSF.DDA.TableDataProperties.TableHeaders]!=undefined))b=OSF.DDA.OMFactory.manufactureTableData(b);b=OSF.DDA.DataCoercion.coerceData(b,d[Microsoft.Office.WebExtension.Parameters.CoercionType]);return b==undefined?a:b}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[b],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[c],defaultValue:a}}],privateStateCallbacks:[],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:[b]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[b],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[c],defaultValue:a}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return true}}],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(a){return OSF.OUtil.mapList(a[OSF.DDA.ListDescriptors.BindingList],e)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[b]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[b]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(d,b,a){var c=a[Microsoft.Office.WebExtension.Parameters.Id];delete b._eventDispatches[c]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(b,a){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(a.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[c,b],defaultValue:a}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[c],defaultValue:a}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[d],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[d],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:[d],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:[d],defaultValue:0}}],checkCallArgs:function(a,b){if(a[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&a[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&a[Microsoft.Office.WebExtension.Parameters.RowCount]==0&&a[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0){delete a[Microsoft.Office.WebExtension.Parameters.StartRow];delete a[Microsoft.Office.WebExtension.Parameters.StartColumn];delete a[Microsoft.Office.WebExtension.Parameters.RowCount];delete a[Microsoft.Office.WebExtension.Parameters.ColumnCount]}if(a[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(b.type)&&(a[Microsoft.Office.WebExtension.Parameters.StartRow]||a[Microsoft.Office.WebExtension.Parameters.StartColumn]||a[Microsoft.Office.WebExtension.Parameters.RowCount]||a[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return a},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}],onSucceeded:g});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[b,c,d,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(a){return OSF.DDA.DataCoercion.determineCoercionType(a[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[c,b],defaultValue:a}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[c],defaultValue:a}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[d],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[d],defaultValue:0}}],checkCallArgs:function(a,b){if(a[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&a[Microsoft.Office.WebExtension.Parameters.StartColumn]==0){delete a[Microsoft.Office.WebExtension.Parameters.StartRow];delete a[Microsoft.Office.WebExtension.Parameters.StartColumn]}if(a[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(b.type)&&(a[Microsoft.Office.WebExtension.Parameters.StartRow]||a[Microsoft.Office.WebExtension.Parameters.StartColumn]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return a},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}]})})();Microsoft.Office.WebExtension.TableData=function(b,a){function c(a){if(a==null||a==undefined)return null;try{for(var b=OSF.DDA.DataCoercion.findArrayDimensionality(a,2);b<2;b++)a=[a];return a}catch(c){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{"get":function(){return a},"set":function(b){a=c(b)}},rows:{"get":function(){return b},"set":function(a){b=a==null||OSF.OUtil.isArray(a)&&a.length==0?[]:c(a)}}});this.headers=a;this.rows=b};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(a){return new Microsoft.Office.WebExtension.TableData(a[OSF.DDA.TableDataProperties.TableRows],a[OSF.DDA.TableDataProperties.TableHeaders])};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{TableDataProperties:"TableDataProperties"});OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};OSF.DDA.TableBinding=function(f,e,d,c,b){OSF.DDA.TableBinding.uber.constructor.call(this,f,e);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:d?d:0},columnCount:{value:c?c:0},hasHeaders:{value:b?b:false}});var a=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[a.AddRowsAsync,a.AddColumnsAsync,a.DeleteAllDataValuesAsync])};OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync"});(function(){function a(a){return a.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:a}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:a}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:a}]})})();Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var a=null;return {findArrayDimensionality:function(c){if(OSF.OUtil.isArray(c)){for(var b=0,a=0;a4*1024*1024)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return b},onSucceeded:function(a,c,b){return new OSF.DDA.File(a[OSF.DDA.FileProperties.Handle],a[OSF.DDA.FileProperties.FileSize],b[Microsoft.Office.WebExtension.Parameters.SliceSize])}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(b,a){return a[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(b,a){return a[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(a,d,c){var b=a[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(b<0||b>=d.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;a[OSF.DDA.FileSliceOffset]=parseInt((b*c[OSF.DDA.FileProperties.SliceSize]).toString());return a},onSucceeded:function(a,d,c){var b={};OSF.OUtil.defineEnumerableProperties(b,{data:{value:a[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:c[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:a[OSF.DDA.FileProperties.SliceSize]}});return b}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(b,a){return a[OSF.DDA.FileProperties.Handle]}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileProperties.FileSize,value:1}],isComplexType:true});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0},{name:OSF.DDA.FileProperties.SliceSize,value:1}],isComplexType:true});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:0},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:5},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:6}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:0}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileSliceOffset,value:1},{name:OSF.DDA.FileProperties.SliceSize,value:2}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0}]});OSF.DDA.AsyncMethodNames.addNames({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync"});(function(){var c=false,a="boolean",b="number";function d(b,d,c){var a=b[Microsoft.Office.WebExtension.Parameters.Data];if(OSF.DDA.TableDataProperties&&a&&(a[OSF.DDA.TableDataProperties.TableRows]!=undefined||a[OSF.DDA.TableDataProperties.TableHeaders]!=undefined))a=OSF.DDA.OMFactory.manufactureTableData(a);a=OSF.DDA.DataCoercion.coerceData(a,c[Microsoft.Office.WebExtension.Parameters.CoercionType]);return a==undefined?null:a}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,"enum":Microsoft.Office.WebExtension.CoercionType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}}],privateStateCallbacks:[],onSucceeded:d});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object",b,a]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(a){return OSF.DDA.DataCoercion.determineCoercionType(a[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:[b,a],defaultValue:c}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:[b,a],defaultValue:c}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[b,a],defaultValue:c}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[b,a],defaultValue:c}}],privateStateCallbacks:[]})})();OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:1},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:2},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:3},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:4},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:5}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:0},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:1},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:2},{name:Microsoft.Office.WebExtension.GoToType.Index,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:0},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:1},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:1},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:2}]});OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",RefreshingSettings:"refreshingSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(b){var d={};for(var c in b){var a=b[c];try{if(JSON)a=JSON.stringify(a,function(a,b){return OSF.OUtil.isDate(this[a])?OSF.DDA.SettingsManager.DateJSONPrefix+this[a].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix:b});else a=Sys.Serialization.JavaScriptSerializer.serialize(a);d[c]=a}catch(e){}}return d},deserializeSettings:function(b){var d={};b=b||{};for(var c in b){var a=b[c];try{if(JSON)a=JSON.parse(a,function(c,a){var b;if(typeof a==="string"&&a&&a.length>6&&a.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&a.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix){b=new Date(parseInt(a.slice(5,-1)));if(b)return b}return a});else a=Sys.Serialization.JavaScriptSerializer.deserialize(a,true);d[c]=a}catch(e){}}return d}};OSF.DDA.Settings=function(a){var b="name";a=a||{};var c=function(d){var b=OSF.OUtil.getSessionStorage();if(b){var a=OSF.DDA.SettingsManager.serializeSettings(d),c=JSON?JSON.stringify(a):Sys.Serialization.JavaScriptSerializer.serialize(a);b.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),c)}};OSF.OUtil.defineEnumerableProperties(this,{"get":{value:function(e){var d=Function._validateParams(arguments,[{name:b,type:String,mayBeNull:false}]);if(d)throw d;var c=a[e];return typeof c==="undefined"?null:c}},"set":{value:function(f,e){var d=Function._validateParams(arguments,[{name:b,type:String,mayBeNull:false},{name:"value",mayBeNull:true}]);if(d)throw d;a[f]=e;c(a)}},remove:{value:function(e){var d=Function._validateParams(arguments,[{name:b,type:String,mayBeNull:false}]);if(d)throw d;delete a[e];c(a)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],a)};OSF.DDA.RefreshableSettings=function(a){OSF.DDA.RefreshableSettings.uber.constructor.call(this,a);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],a);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:a}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(b,a){return a}}],onSucceeded:function(d,a,e){var f=d[OSF.DDA.SettingsManager.SerializedSettings],c=OSF.DDA.SettingsManager.deserializeSettings(f),g=e[OSF.DDA.SettingsManager.RefreshingSettings];for(var b in g)a.remove(b);for(var b in c)a.set(b,c[b]);return a}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:true}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(b,a){return OSF.DDA.SettingsManager.serializeSettings(a)}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});OSF.DDA.AsyncMethodNames.addNames({GetOfficeThemeAsync:"getOfficeThemeAsync",GetDocumentThemeAsync:"getDocumentThemeAsync"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{OfficeThemeChanged:"officeThemeChanged",DocumentThemeChanged:"documentThemeChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.Parameters,{DocumentTheme:"documentTheme",OfficeTheme:"officeTheme"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DocumentThemeChangedEvent:"DocumentThemeChangedEvent",OfficeThemeChangedEvent:"OfficeThemeChangedEvent"});OSF.OUtil.setNamespace("Theming",OSF.DDA);OSF.DDA.Theming.OfficeThemeEnum={PrimaryFontColor:"primaryFontColor",PrimaryBackgroundColor:"primaryBackgroundColor",SecondaryFontColor:"secondaryFontColor",SecondaryBackgroundColor:"secondaryBackgroundColor"};OSF.DDA.Theming.DocumentThemeEnum={PrimaryFontColor:"primaryFontColor",PrimaryBackgroundColor:"primaryBackgroundColor",SecondaryFontColor:"secondaryFontColor",SecondaryBackgroundColor:"secondaryBackgroundColor",Accent1:"accent1",Accent2:"accent2",Accent3:"accent3",Accent4:"accent4",Accent5:"accent5",Accent6:"accent6",Hyperlink:"hyperlink",FollowedHyperlink:"followedHyperlink",HeaderLatinFont:"headerLatinFont",HeaderEastAsianFont:"headerEastAsianFont",HeaderScriptFont:"headerScriptFont",HeaderLocalizedFont:"headerLocalizedFont",BodyLatinFont:"bodyLatinFont",BodyEastAsianFont:"bodyEastAsianFont",BodyScriptFont:"bodyScriptFont",BodyLocalizedFont:"bodyLocalizedFont"};OSF.DDA.Theming.ConvertToDocumentTheme=function(f){var b=false,a=true;for(var d=[{name:"primaryFontColor",needToConvertToHex:a},{name:"primaryBackgroundColor",needToConvertToHex:a},{name:"secondaryFontColor",needToConvertToHex:a},{name:"secondaryBackgroundColor",needToConvertToHex:a},{name:"accent1",needToConvertToHex:a},{name:"accent2",needToConvertToHex:a},{name:"accent3",needToConvertToHex:a},{name:"accent4",needToConvertToHex:a},{name:"accent5",needToConvertToHex:a},{name:"accent6",needToConvertToHex:a},{name:"hyperlink",needToConvertToHex:a},{name:"followedHyperlink",needToConvertToHex:a},{name:"headerLatinFont",needToConvertToHex:b},{name:"headerEastAsianFont",needToConvertToHex:b},{name:"headerScriptFont",needToConvertToHex:b},{name:"headerLocalizedFont",needToConvertToHex:b},{name:"bodyLatinFont",needToConvertToHex:b},{name:"bodyEastAsianFont",needToConvertToHex:b},{name:"bodyScriptFont",needToConvertToHex:b},{name:"bodyLocalizedFont",needToConvertToHex:b}],e={},c=0;c0)b.push(a);else a.tabIndex===0&&c.push(a);else c.push(a)}b=b.sort(function(d,c){var a=d.tabIndex-c.tabIndex;if(a===0)a=b.indexOf(d)-b.indexOf(c);return a});return [].concat(b,c)}return {set_entropy:function(a){if(typeof a=="string")for(var b=0;b6&&a.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&a.slice(c)===OSF.DDA.SettingsManager.DataJSONSuffix){b=new Date(parseInt(a.slice(5,c)));if(b)return b}return a});else a=Sys.Serialization.JavaScriptSerializer.deserialize(a,b);f[e]=a}catch(g){}}return f},loadScript:function(f,g,h){if(f&&g){var k=window.document,c=s[f];if(!c){var e=k.createElement("script");e.type="text/javascript";c={loaded:d,pendingCallbacks:[g],timer:a};s[f]=c;var i=function(){if(c.timer!=a){clearTimeout(c.timer);delete c.timer}c.loaded=b;for(var e=c.pendingCallbacks.length,d=0;d1?f[f.length-1]:a;if(k&&b!=a){if(b.indexOf(v)>=0)b=b.split(v)[0];b=decodeURIComponent(b)}var d=q();if(!i&&d){var e=window.name.indexOf(j);if(e>c){var g=window.name.indexOf(";",e);if(g==c)g=window.name.length;var h=window.name.substring(e,g);if(b)d.setItem(h,b);else b=d.getItem(h)}}return b},getConversationId:function(){var c=window.location.search,b=a;if(c){var d=c.indexOf("&");b=d>0?c.substring(1,d):c.substr(1);if(b&&b.charAt(b.length-1)==="="){b=b.substring(0,b.length-1);if(b)b=decodeURIComponent(b)}}return b},getInfoItems:function(b){var a=b.split("$");if(typeof a[1]==i)a=b.split("|");if(typeof a[1]==i)a=b.split("%7C");return a},getXdmFieldValue:function(f,d){var b=e,c=OSF.OUtil.parseXdmInfo(d);if(c){var a=OSF.OUtil.getInfoItems(c);if(a!=undefined&&a.length>=3)switch(f){case OSF.XdmFieldName.ConversationUrl:b=a[2];break;case OSF.XdmFieldName.AppId:b=a[1]}}return b},validateParamObject:function(f,e){var a=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:d},{name:"expectedProperties",type:Object,mayBeNull:d},{name:"callback",type:Function,mayBeNull:b}]);if(a)throw a;for(var c in e){a=Function._validateParameter(f[c],e[c],c);if(a)throw a}},writeProfilerMark:function(a){if(window.msWriteProfilerMark){window.msWriteProfilerMark(a);OsfMsAjaxFactory.msAjaxDebug.trace(a)}},outputDebug:function(a){typeof OsfMsAjaxFactory!==i&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(a)},defineNondefaultProperty:function(e,f,a,c){a=a||{};for(var g in c){var d=c[g];if(a[d]==undefined)a[d]=b}Object.defineProperty(e,f,a);return e},defineNondefaultProperties:function(c,a,d){a=a||{};for(var b in a)OSF.OUtil.defineNondefaultProperty(c,b,a[b],d);return c},defineEnumerableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[f])},defineEnumerableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[f])},defineMutableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[m,f,n])},defineMutableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[m,f,n])},finalizeProperties:function(e,c){c=c||{};for(var g=Object.getOwnPropertyNames(e),i=g.length,f=0;f>8;g=h&255;b[a++]=d>>2;b[a++]=(d&3)<<4|f>>4;b[a++]=(f&15)<<2|g>>6;b[a++]=g&63;if(!isNaN(h)){d=h>>8;f=j&255;g=j>>8;b[a++]=d>>2;b[a++]=(d&3)<<4|f>>4;b[a++]=(f&15)<<2|g>>6;b[a++]=g&63}if(isNaN(h))b[a-1]=64;else if(isNaN(j)){b[a-2]=64;b[a-1]=64}for(var l=0;l0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(b){if(b==a)return a;else if(!(b instanceof Object))return b;else if(Array.isArray(b)){for(var e=[],d=0;dd)return c;else if(a===0&&b)return c;else if(a===d-1&&!b)return c;if(b)return a-1;else return a+1};e=u(e);g=j?e.length-1:0;if(e.length===0)return a;while(!i&&g>=0&&gd)return c;else if(a===0&&b)return c;else if(a===d-1&&!b)return c;if(b)return a-1;else return a+1};f=u(f);k=n(f,o);e=j(f.length,k,m);if(e<0)return a;while(!i&&e>=0&&e0;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[d%16];d=Math.floor(d/16)}for(;b<32;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[Math.floor(Math.random()*16)]}return c}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3};OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611,WordAndroid:8388613,PowerpointAndroid:8388614};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(y,u,p,n,r,v,q,t,x,j,w,l,k,m,h,g,f,e,i,c,d,s,o,b){var a=this;a._id=y;a._appName=u;a._appVersion=p;a._appUILocale=n;a._dataLocale=r;a._docUrl=v;a._clientMode=q;a._settings=t;a._reason=x;a._osfControlType=j;a._eToken=w;a._correlationId=l;a._appInstanceId=k;a._touchEnabled=m;a._commerceAllowed=h;a._appMinorVersion=g;a._requirementMatrix=f;a._hostCustomMessage=e;a._hostFullVersion=i;a._isDialog=false;a._clientWindowHeight=c;a._clientWindowWidth=d;a._addinName=s;a._appDomains=o;a._dialogRequirementMatrix=b;a.get_id=function(){return this._id};a.get_appName=function(){return this._appName};a.get_appVersion=function(){return this._appVersion};a.get_appUILocale=function(){return this._appUILocale};a.get_dataLocale=function(){return this._dataLocale};a.get_docUrl=function(){return this._docUrl};a.get_clientMode=function(){return this._clientMode};a.get_bindings=function(){return this._bindings};a.get_settings=function(){return this._settings};a.get_reason=function(){return this._reason};a.get_osfControlType=function(){return this._osfControlType};a.get_eToken=function(){return this._eToken};a.get_correlationId=function(){return this._correlationId};a.get_appInstanceId=function(){return this._appInstanceId};a.get_touchEnabled=function(){return this._touchEnabled};a.get_commerceAllowed=function(){return this._commerceAllowed};a.get_appMinorVersion=function(){return this._appMinorVersion};a.get_requirementMatrix=function(){return this._requirementMatrix};a.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};a.get_hostCustomMessage=function(){return this._hostCustomMessage};a.get_hostFullVersion=function(){return this._hostFullVersion};a.get_isDialog=function(){return this._isDialog};a.get_clientWindowHeight=function(){return this._clientWindowHeight};a.get_clientWindowWidth=function(){return this._clientWindowWidth};a.get_addinName=function(){return this._addinName};a.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",Reserved:"reserved",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData",Base64:"base64"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(b,a){if(a==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||a==Microsoft.Office.WebExtension.EventType.BindingDataChanged||a==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||a==Microsoft.Office.WebExtension.EventType.DataNodeInserted||a==Microsoft.Office.WebExtension.EventType.DataNodeReplaced)return b+"_"+a;else return a};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidOpenBrowserWindow:102,dispidCreateDocumentMethod:105,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var a={};return {getErrorArgs:function(c){var b=a[c];if(!b)b=a[this.errorCodes.ooeInternalError];else{if(!b.name)b.name=a[this.errorCodes.ooeInternalError].name;if(!b.message)b.message=a[this.errorCodes.ooeInternalError].message}return b},addErrorMessage:function(c,b){a[c]=b},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11000,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12000,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13000,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010},initializeErrorMessages:function(b){a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:b.L_DataReadError,message:b.L_GetSelectionNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotMatchBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:b.L_DataReadError,message:b.L_InvalidGetRowColumnCounts};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:b.L_DataReadError,message:b.L_SelectionNotSupportCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:b.L_DataReadError,message:b.L_InvalidGetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:b.L_DataReadError,message:b.L_NonUniformPartialGetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:b.L_DataReadError,message:b.L_GetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:b.L_DataReadError,message:b.L_FileTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:b.L_DataReadError,message:b.L_GetDataParametersConflict};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:b.L_DataReadError,message:b.L_InvalidGetColumns};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:b.L_DataReadError,message:b.L_InvalidGetRows};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:b.L_DataReadError,message:b.L_InvalidReadForBlankRow};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:b.L_DataWriteError,message:b.L_UnsupportedDataObject};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:b.L_DataWriteError,message:b.L_CannotWriteToSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:b.L_DataWriteError,message:b.L_DataNotMatchSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:b.L_DataWriteError,message:b.L_OverwriteWorksheetData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:b.L_DataWriteError,message:b.L_DataNotMatchBindingSize};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:b.L_DataWriteError,message:b.L_InvalidSetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:b.L_InvalidFormat,message:b.L_InvalidDataFormat};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:b.L_DataWriteError,message:b.L_SetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:b.L_DataWriteError,message:b.L_NonUniformPartialSetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:b.L_DataWriteError,message:b.L_InvalidSetColumns};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:b.L_DataWriteError,message:b.L_InvalidSetRows};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:b.L_DataWriteError,message:b.L_SetDataParametersConflict};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:b.L_BindingCreationError,message:b.L_SelectionCannotBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:b.L_InvalidBindingError,message:b.L_BindingNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:b.L_BindingCreationError,message:b.L_BindingToMultipleSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidSelectionForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnThisBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:b.L_BindingCreationError,message:b.L_NamedItemNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:b.L_BindingCreationError,message:b.L_MultipleNamedItemFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidNamedItemForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:b.L_InvalidBinding,message:b.L_UnknownBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnMatrixData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:b.L_InvalidBinding,message:b.L_InvalidColumnsForBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:b.L_ReadSettingsError,message:b.L_SettingNameNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:b.L_SaveSettingsError,message:b.L_SettingsCannotSave};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:b.L_SettingsStaleError,message:b.L_SettingsAreStale};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:b.L_HostError,message:b.L_OperationNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:b.L_InternalError,message:b.L_InternalErrorDescription};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:b.L_PermissionDenied,message:b.L_DocumentReadOnly};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:b.L_EventRegistrationError,message:b.L_EventHandlerNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:b.L_InvalidAPICall,message:b.L_InvalidApiCallInContext};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:b.L_ShuttingDown,message:b.L_ShuttingDown};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:b.L_UnsupportedEnumeration,message:b.L_UnsupportedEnumerationMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:b.L_APINotSupported,message:b.L_BrowserAPINotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:b.L_APICallFailed,message:b.L_RequestTimeout};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:b.L_InvalidOrTimedOutSession,message:b.L_InvalidOrTimedOutSessionMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:b.L_APICallFailed,message:b.L_TooManyIncompleteRequests};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:b.L_APICallFailed,message:b.L_RequestTokenUnavailable};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:b.L_APICallFailed,message:b.L_ActivityLimitReached};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:b.L_APICallFailed,message:b.L_InvalidApiArgumentsMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:b.L_InvalidNode,message:b.L_CustomXmlNodeNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:b.L_CustomXmlError,message:b.L_CustomXmlError};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:b.L_CustomXmlExceedQuotaName,message:b.L_CustomXmlExceedQuotaMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:b.L_CustomXmlOutOfDateName,message:b.L_CustomXmlOutOfDateMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:b.L_CannotNavigateTo,message:b.L_CannotNavigateTo};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:b.L_SpecifiedIdNotExist,message:b.L_SpecifiedIdNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:b.L_NavOutOfBound,message:b.L_NavOutOfBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:b.L_DataWriteReminder,message:b.L_CellDataAmountBeyondLimits};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:b.L_MissingParameter,message:b.L_ElementMissing};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:b.L_InvalidValue,message:b.L_InvalidCellsValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:b.L_InvalidValue,message:b.L_InvalidTableOptionValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:b.L_InvalidValue,message:b.L_InvalidFormatValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_RowIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_ColIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:b.L_OutOfRange,message:b.L_FormatValueOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:b.L_FormattingReminder,message:b.L_CellFormatAmountBeyondLimits};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:b.L_MemoryLimit,message:b.L_CloseFileBeforeRetrieve};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:b.L_NetworkProblem,message:b.L_NetworkProblemRetrieveFile};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:b.L_InvalidValue,message:b.L_SliceSizeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:b.L_DisplayDialogError,message:b.L_DialogAlreadyOpened};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:b.L_DisplayDialogError,message:b.L_NetworkProblem};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:b.L_DialogNavigateError,message:b.L_DialogInvalidScheme};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:b.L_DisplayDialogError,message:b.L_DialogAddressNotTrusted};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:b.L_DisplayDialogError,message:b.L_DialogRequireHTTPS};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:b.L_DisplayDialogError,message:b.L_UserClickIgnore};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:b.L_DisplayDialogError,message:b.L_NewWindowCrossZoneErrorString};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:b.L_APINotSupported,message:b.L_InvalidSSOAddinMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:b.L_UserNotSignedIn,message:b.L_UserNotSignedIn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:b.L_UserAborted,message:b.L_UserAbortedMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:b.L_UnsupportedUserIdentity,message:b.L_UnsupportedUserIdentityMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:b.L_InvalidResourceUrl,message:b.L_InvalidResourceUrlMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:b.L_InvalidGrant,message:b.L_InvalidGrantMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:b.L_SSOClientError,message:b.L_SSOClientErrorMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:b.L_SSOServerError,message:b.L_SSOServerErrorMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:b.L_AddinIsAlreadyRequestingToken,message:b.L_AddinIsAlreadyRequestingTokenMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:b.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:b.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:b.L_SSOConnectionLostError,message:b.L_SSOConnectionLostErrorMessage}}}}();var OfficeExt;(function(a){var b;(function(b){var a=1.1,z=function(){function a(){}return a}();b.RequirementVersion=z;var d=function(){function a(b){var a=this;a.isSetSupported=function(d,b){if(d==undefined)return false;if(b==undefined)b=0;var f=this._setMap,e=f._sets;if(e.hasOwnProperty(d.toLowerCase())){var g=e[d.toLowerCase()];try{var a=this._getVersion(g);b=b+"";var c=this._getVersion(b);if(a.major>0&&a.major>c.major)return true;if(a.minor>0&&a.minor>0&&a.major==c.major&&a.minor>=c.minor)return true}catch(h){return false}}return false};a._getVersion=function(e){var a="version format incorrect",b=e.split("."),c=0,d=0;if(b.length<2&&isNaN(Number(e)))throw a;else{c=Number(b[0]);if(b.length>=2)d=Number(b[1]);if(isNaN(c)||isNaN(d))throw a}var f={minor:d,major:c};return f};a._setMap=b;a.isSetSupported=a.isSetSupported.bind(a)}return a}();b.RequirementMatrix=d;var c=function(){function a(a){this._addSetMap=function(a){for(var b in a)this._sets[b]=a[b]};this._sets=a}return a}();b.DefaultSetRequirement=c;var x=function(c){__extends(b,c);function b(){c.call(this,{dialogapi:a})}return b}(c);b.DefaultDialogSetRequirement=x;var f=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,excelapi:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a})}return b}(c);b.ExcelClientDefaultSetRequirement=f;var k=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({imagecoercion:a})}return b}(f);b.ExcelClientV1DefaultSetRequirement=k;var l=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.3})}return a}(c);b.OutlookClientDefaultSetRequirement=l;var h=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,compressedfile:a,customxmlparts:a,documentevents:a,file:a,htmlcoercion:a,matrixbindings:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,textfile:a,wordapi:a})}return b}(c);b.WordClientDefaultSetRequirement=h;var p=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:a})}return b}(h);b.WordClientV1DefaultSetRequirement=p;var e=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,compressedfile:a,documentevents:a,file:a,pdffile:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.PowerpointClientDefaultSetRequirement=e;var j=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({imagecoercion:a})}return b}(e);b.PowerpointClientV1DefaultSetRequirement=j;var o=function(c){__extends(b,c);function b(){c.call(this,{selection:a,textcoercion:a})}return b}(c);b.ProjectClientDefaultSetRequirement=o;var u=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,file:a})}return b}(c);b.ExcelWebDefaultSetRequirement=u;var w=function(c){__extends(b,c);function b(){c.call(this,{compressedfile:a,documentevents:a,file:a,imagecoercion:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablecoercion:a,textcoercion:a,textfile:a})}return b}(c);b.WordWebDefaultSetRequirement=w;var n=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,settings:a})}return b}(c);b.PowerpointWebDefaultSetRequirement=n;var g=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.3})}return a}(c);b.OutlookWebDefaultSetRequirement=g;var v=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,documentevents:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.SwayWebDefaultSetRequirement=v;var r=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,partialtablebindings:a,settings:a,tablebindings:a,tablecoercion:a})}return b}(c);b.AccessWebDefaultSetRequirement=r;var t=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a})}return b}(c);b.ExcelIOSDefaultSetRequirement=t;var i=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,compressedfile:a,customxmlparts:a,documentevents:a,file:a,htmlcoercion:a,matrixbindings:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,textfile:a})}return b}(c);b.WordIOSDefaultSetRequirement=i;var s=function(b){__extends(a,b);function a(){b.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return a}(i);b.WordIOSV1DefaultSetRequirement=s;var m=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,compressedfile:a,documentevents:a,file:a,pdffile:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.PowerpointIOSDefaultSetRequirement=m;var q=function(c){__extends(b,c);function b(){c.call(this,{mailbox:a})}return b}(c);b.OutlookIOSDefaultSetRequirement=q;var y=function(){var b="undefined";function a(){}a.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)};a.getDefaultRequirementMatrix=function(f){this.initializeDefaultSetMatrix();var e=undefined,g=f.get_requirementMatrix();if(g!=undefined&&g.length>0&&typeof JSON!==b){var i=JSON.parse(f.get_requirementMatrix().toLowerCase());e=new d(new c(i))}else{var h=a.getClientFullVersionString(f);if(a.DefaultSetArrayMatrix!=undefined&&a.DefaultSetArrayMatrix[h]!=undefined)e=new d(a.DefaultSetArrayMatrix[h]);else e=new d(new c({}))}return e};a.getDefaultDialogRequirementMatrix=function(f){var a=undefined,e=f.get_dialogRequirementMatrix();if(e!=undefined&&e.length>0&&typeof JSON!==b){var g=JSON.parse(f.get_requirementMatrix().toLowerCase());a=new d(new c(g))}else a=new d(new x);return a};a.getClientFullVersionString=function(a){var d=a.get_appMinorVersion(),e="",b="",c=a.get_appName(),f=c==1024||c==4096||c==8192||c==65536;if(f&&a.get_appVersion()==1)if(c==4096&&d>=15)b="16.00.01";else b="16.00";else if(a.get_appName()==64)b=a.get_appVersion();else{if(d<10)e="0"+d;else e=""+d;b=a.get_appVersion()+"."+e}return a.get_appName()+"-"+b};a.initializeDefaultSetMatrix=function(){a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1600]=new f;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1600]=new h;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1600]=new e;a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1601]=new k;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1601]=new p;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1601]=new j;a.DefaultSetArrayMatrix[a.Outlook_RCLIENT_1600]=new l;a.DefaultSetArrayMatrix[a.Excel_WAC_1600]=new u;a.DefaultSetArrayMatrix[a.Word_WAC_1600]=new w;a.DefaultSetArrayMatrix[a.Outlook_WAC_1600]=new g;a.DefaultSetArrayMatrix[a.Outlook_WAC_1601]=new g;a.DefaultSetArrayMatrix[a.Project_RCLIENT_1600]=new o;a.DefaultSetArrayMatrix[a.Access_WAC_1600]=new r;a.DefaultSetArrayMatrix[a.PowerPoint_WAC_1600]=new n;a.DefaultSetArrayMatrix[a.Excel_IOS_1600]=new t;a.DefaultSetArrayMatrix[a.SWAY_WAC_1600]=new v;a.DefaultSetArrayMatrix[a.Word_IOS_1600]=new i;a.DefaultSetArrayMatrix[a.Word_IOS_16001]=new s;a.DefaultSetArrayMatrix[a.PowerPoint_IOS_1600]=new m;a.DefaultSetArrayMatrix[a.Outlook_IOS_1600]=new q};a.Excel_RCLIENT_1600="1-16.00";a.Excel_RCLIENT_1601="1-16.01";a.Word_RCLIENT_1600="2-16.00";a.Word_RCLIENT_1601="2-16.01";a.PowerPoint_RCLIENT_1600="4-16.00";a.PowerPoint_RCLIENT_1601="4-16.01";a.Outlook_RCLIENT_1600="8-16.00";a.Excel_WAC_1600="16-16.00";a.Word_WAC_1600="32-16.00";a.Outlook_WAC_1600="64-16.00";a.Outlook_WAC_1601="64-16.01";a.Project_RCLIENT_1600="128-16.00";a.Access_WAC_1600="256-16.00";a.PowerPoint_WAC_1600="512-16.00";a.Excel_IOS_1600="1024-16.00";a.SWAY_WAC_1600="2048-16.00";a.Word_IOS_1600="4096-16.00";a.Word_IOS_16001="4096-16.00.01";a.PowerPoint_IOS_1600="8192-16.00";a.Outlook_IOS_1600="65536-16.00";a.DefaultSetArrayMatrix={};return a}();b.RequirementsMatrixFactory=y})(b=a.Requirement||(a.Requirement={}))})(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda();var OfficeExt;(function(a){var b;(function(a){var b=function(){function a(){var a=this;a.getDiagnostics=function(b){var a={host:this.getHost(),version:b||this.getDefaultVersion(),platform:this.getPlatform()};return a};a.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};a.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};a.hostInfo=OSF._OfficeAppFactory.getHostInfo();a.getHost=a.getHost.bind(a);a.getPlatform=a.getPlatform.bind(a);a.getDiagnostics=a.getDiagnostics.bind(a)}a.prototype.capitalizeFirstLetter=function(a){if(a)return a[0].toUpperCase()+a.slice(1).toLowerCase();return a};a.getInstance=function(){if(a.hostObj===undefined)a.hostObj=new a;return a.hostObj};a.prototype.getPlatform=function(){var a=this;if(a.hostInfo.hostPlatform){var b=a.hostInfo.hostPlatform.toLowerCase();if(a.platformRemappings[b])return a.platformRemappings[b]}return null};a.prototype.getHost=function(){var a=this;if(a.hostInfo.hostType){var b=a.hostInfo.hostType.toLowerCase();if(a.camelCaseMappings[b])return a.camelCaseMappings[b];b=a.capitalizeFirstLetter(a.hostInfo.hostType);if(Microsoft.Office.WebExtension.HostType[b])return Microsoft.Office.WebExtension.HostType[b]}return null};a.prototype.getDefaultVersion=function(){if(this.getHost())return "16.0.0000.0000";return null};return a}();a.Host=b})(b=a.HostName||(a.HostName={}))})(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var b,a=false;return {enableShortcut:function(){if(!a){if(window.Office)b=window.Office;else OSF.OUtil.setNamespace("Office",window);window.Office=Microsoft.Office.WebExtension;a=true}},disableShortcut:function(){if(a){if(b)window.Office=b;else OSF.OUtil.unsetNamespace("Office",window);a=false}}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(a){if(a)OSF.NamespaceManager.enableShortcut();else OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(a,b){var c;if(a&&typeof a=="string"){var d=a.indexOf("#");if(d!=-1){var h=a.substring(0,d),g=a.substring(d+1);switch(h){case "binding":case "bindings":if(g)c=new OSF.DDA.BindingPromise(g)}}}if(!c){if(b){var e=typeof b;if(e=="function"){var f={};f[Microsoft.Office.WebExtension.Parameters.Callback]=b;OSF.DDA.issueAsyncResult(f,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,e)}}else{c.onFail=b;return c}};OSF.DDA.Context=function(a,g,h,c,d){var f="requirements",b=this;OSF.OUtil.defineEnumerableProperties(b,{contentLanguage:{value:a.get_dataLocale()},displayLanguage:{value:a.get_appUILocale()},touchEnabled:{value:a.get_touchEnabled()},commerceAllowed:{value:a.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(a.get_hostFullVersion())}});h&&OSF.OUtil.defineEnumerableProperty(b,"license",{value:h});a.ui&&OSF.OUtil.defineEnumerableProperty(b,"ui",{value:a.ui});a.auth&&OSF.OUtil.defineEnumerableProperty(b,"auth",{value:a.auth});a.application&&OSF.OUtil.defineEnumerableProperty(b,"application",{value:a.application});if(a.get_isDialog()){var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,f,{value:e})}else{g&&OSF.OUtil.defineEnumerableProperty(b,"document",{value:g});if(c){var i=c.displayName||"appOM";delete c.displayName;OSF.OUtil.defineEnumerableProperty(b,i,{value:c})}d&&OSF.OUtil.defineEnumerableProperty(b,"officeTheme",{"get":function(){return d()}});var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,f,{value:e})}};OSF.DDA.OutlookContext=function(c,a,d,e,b){OSF.DDA.OutlookContext.uber.constructor.call(this,c,null,d,e,b);a&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:a})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Application=function(){};OSF.DDA.Document=function(b,c){var a;switch(b.get_clientMode()){case OSF.ClientMode.ReadOnly:a=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:a=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}c&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:c});OSF.OUtil.defineMutableProperties(this,{mode:{value:a},url:{value:b.get_docUrl()}})};OSF.DDA.JsomDocument=function(d,b,e){var a=this;OSF.DDA.JsomDocument.uber.constructor.call(a,d,e);b&&OSF.OUtil.defineEnumerableProperty(a,"bindings",{"get":function(){return b}});var c=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(a,[c.GetSelectedDataAsync,c.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(a,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{"get":function(){var a;if(OSF&&OSF._OfficeAppFactory)a=OSF._OfficeAppFactory.getContext();return a}});OSF.DDA.License=function(a){OSF.OUtil.defineEnumerableProperty(this,"value",{value:a})};OSF.DDA.ApiMethodCall=function(c,f,e,g,h){var a=this,d=c.length,b=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,h)});a.verifyArguments=function(d,f){for(var e in d){var a=d[e],c=f[e];if(a["enum"])switch(typeof c){case "string":if(OSF.OUtil.listContainsValue(a["enum"],c))break;case "undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw b()}if(a["types"])if(!OSF.OUtil.listContainsValue(a["types"],typeof c))throw b()}};a.extractRequiredArguments=function(g,l,j){if(g.lengthc+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var d,f,i=h.length-1;i>=c;i--){var g=h[i];switch(typeof g){case "object":if(d)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else d=g;break;case a:if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else f=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}d=b.fillOptions(d,j,l,k);if(f)if(d[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else d[Microsoft.Office.WebExtension.Parameters.Callback]=f;b.verifyArguments(e,d);return d}this.verifyAndExtractCall=function(e,c,a){var d=b.extractRequiredArguments(e,c,a),g=h(e,d,c,a),f=b.constructCallArgs(d,g,c,a);return f};this.processResponse=function(c,b,e,d){var a;if(c==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)if(f)a=f(b,e,d);else a=b;else if(g)a=g(c,b);else a=OSF.DDA.ErrorCodeManager.getErrorArgs(c);return a};this.getCallArgs=function(g){for(var b,d,f=g.length-1;f>=c;f--){var e=g[f];switch(typeof e){case "object":b=e;break;case a:d=e}}b=b||{};if(d)b[Microsoft.Office.WebExtension.Parameters.Callback]=d;return b}};OSF.DDA.AsyncMethodCallFactory=function(){return {manufacture:function(a){var c=a.supportedOptions?OSF.OUtil.createObject(a.supportedOptions):[],b=a.privateStateCallbacks?OSF.OUtil.createObject(a.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(a.requiredArguments||[],c,b,a.onSucceeded,a.onFailed,a.checkCallArgs,a.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(a){OSF.DDA.AsyncMethodCalls[a.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(a)};OSF.DDA.Error=function(c,a,b){OSF.OUtil.defineEnumerableProperties(this,{name:{value:c},message:{value:a},code:{value:b}})};OSF.DDA.AsyncResult=function(b,a){OSF.OUtil.defineEnumerableProperties(this,{value:{value:b[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:a?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});b[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:b[OSF.DDA.AsyncResultEnum.Properties.Context]});a&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(a[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(d,f,a){var e=d[Microsoft.Office.WebExtension.Parameters.Callback];if(e){var c={};c[OSF.DDA.AsyncResultEnum.Properties.Context]=d[Microsoft.Office.WebExtension.Parameters.AsyncContext];var b;if(f==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)c[OSF.DDA.AsyncResultEnum.Properties.Value]=a;else{b={};a=a||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);b[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=f||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=a.name||a;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=a.message||a}e(new OSF.DDA.AsyncResult(c,b))}};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(b){for(var a in b){var c={};OSF.OUtil.defineEnumerableProperties(c,{id:{value:a},displayName:{value:b[a]}});OSF.DDA.SyncMethodNames[a]=c}};OSF.DDA.SyncMethodCall=function(b,c,f,g,h){var d=b.length,a=new OSF.DDA.ApiMethodCall(b,c,f,g,h);function e(e,h,j,i){if(e.length>d+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var b,k,f=e.length-1;f>=d;f--){var g=e[f];switch(typeof g){case "object":if(b)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else b=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}b=a.fillOptions(b,h,j,i);a.verifyArguments(c,b);return b}this.verifyAndExtractCall=function(f,c,b){var d=a.extractRequiredArguments(f,c,b),h=e(f,d,c,b),g=a.constructCallArgs(d,h,c,b);return g}};OSF.DDA.SyncMethodCallFactory=function(){return {manufacture:function(a){var b=a.supportedOptions?OSF.OUtil.createObject(a.supportedOptions):[];return new OSF.DDA.SyncMethodCall(a.requiredArguments||[],b,a.privateStateCallbacks,a.checkCallArgs,a.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(a){OSF.DDA.SyncMethodCalls[a.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(a)};OSF.DDA.ListType=function(){var a={};return {setListType:function(c,b){a[c]=b},isListType:function(b){return OSF.OUtil.listContainsKey(a,b)},getDescriptor:function(b){return a[b]}}}();OSF.DDA.HostParameterMap=function(b,c){var j="fromHost",a=this,i="toHost",e=j,l="sourceData",g="self",d={};d[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(a){if(a!=null&&a.rows!==undefined){var b={};b[OSF.DDA.TableDataProperties.TableRows]=a.rows;b[OSF.DDA.TableDataProperties.TableHeaders]=a.headers;a=b}return a},fromHost:function(a){return a}};d[Microsoft.Office.WebExtension.Parameters.SampleData]=d[Microsoft.Office.WebExtension.Parameters.Data];function f(j,i){var m=j?{}:undefined;for(var h in j){var g=j[h],a;if(OSF.DDA.ListType.isListType(h)){a=[];for(var n in g)a.push(f(g[n],i))}else if(OSF.OUtil.listContainsKey(d,h))a=d[h][i](g);else if(i==e&&b.preserveNesting(h))a=f(g,i);else{var k=c[h];if(k){var l=k[i];if(l){a=l[g];if(a===undefined)a=g}}else a=g}m[h]=a}return m}function k(j,h){var e;for(var a in h){var d;if(b.isComplexType(a))d=k(j,c[a][i]);else d=j[a];if(d!=undefined){if(!e)e={};var f=h[a];if(f==g)f=a;e[f]=b.pack(a,d)}}return e}function h(j,n,f){if(!f)f={};for(var a in n){var k=n[a],d;if(k==g)d=j;else if(k==l){f[a]=j.toArray();continue}else d=j[k];if(d===null||d===undefined)f[a]=undefined;else{d=b.unpack(a,d);var i;if(b.isComplexType(a)){i=c[a][e];if(b.preserveNesting(a))f[a]=h(d,i);else h(d,i,f)}else if(OSF.DDA.ListType.isListType(a)){i={};var p=OSF.DDA.ListType.getDescriptor(a);i[p]=g;var m=new Array(d.length);for(var o in d)m[o]=h(d[o],i);f[a]=m}else f[a]=d}}return f}function m(l,e,a){var d=c[l][a],b;if(a=="toHost"){var i=f(e,a);b=k(i,d)}else if(a==j){var g=h(e,d);b=f(g,a)}return b}if(!c)c={};a.addMapping=function(l,h){var a,d;if(h.map){a=h.map;d={};for(var j in a){var k=a[j];if(k==g)k=j;d[k]=j}}else{a=h.toHost;d=h.fromHost}var b=c[l];if(b){var f=b[i];for(var n in f)a[n]=f[n];f=b[e];for(var m in f)d[m]=f[m]}else b=c[l]={};b[i]=a;b[e]=d};a.toHost=function(b,a){return m(b,a,i)};a.fromHost=function(a,b){return m(a,b,e)};a.self=g;a.sourceData=l;a.addComplexType=function(a){b.addComplexType(a)};a.getDynamicType=function(a){return b.getDynamicType(a)};a.setDynamicType=function(c,a){b.setDynamicType(c,a)};a.dynamicTypes=d;a.doMapValues=function(a,b){return f(a,b)}};OSF.DDA.SpecialProcessor=function(c,b){var a=this;a.addComplexType=function(a){c.push(a)};a.getDynamicType=function(a){return b[a]};a.setDynamicType=function(c,a){b[c]=a};a.isComplexType=function(a){return OSF.OUtil.listContainsValue(c,a)};a.isDynamicType=function(a){return OSF.OUtil.listContainsKey(b,a)};a.preserveNesting=function(b){var a=[];OSF.DDA.PropertyDescriptors&&a.push(OSF.DDA.PropertyDescriptors.Subset);if(OSF.DDA.DataNodeEventProperties)a=a.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]);return OSF.OUtil.listContainsValue(a,b)};a.pack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].toHost(d);else a=d;return a};a.unpack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].fromHost(d);else a=d;return a}};OSF.DDA.getDecoratedParameterMap=function(d,c){var a=new OSF.DDA.HostParameterMap(d),f=a.self;function b(a){var c=null;if(a){c={};for(var d=a.length,b=0;b0){for(var d=[],c=0;c=f)break;c=Function._validateParameter(i[d],h,j);if(c){c.popStackFrame();return c}}return a};if(!Function._validateParameterCount)Function._validateParameterCount=function(m,f,l){var b,e,c=f.length,g=m.length;if(gc){e=d;for(b=0;b0&&b.push(c)}}}catch(i){}return b}var c=[],b={};b[Microsoft.Office.WebExtension.Parameters.Data]=function(){var c=0,b=1;return {toHost:function(a){if(OSF.DDA.TableDataProperties&&typeof a!="string"&&a[OSF.DDA.TableDataProperties.TableRows]!==undefined){var d=[];d[c]=a[OSF.DDA.TableDataProperties.TableRows];d[b]=a[OSF.DDA.TableDataProperties.TableHeaders];a=d}return a},fromHost:function(f){var e;if(f.toArray){var g=f.dimensions();if(g===2)e=a(f);else{var d=f.toArray();if(d.length===2&&(d[0]!=null&&d[0].toArray||d[1]!=null&&d[1].toArray)){e={};e[OSF.DDA.TableDataProperties.TableRows]=a(d[c]);e[OSF.DDA.TableDataProperties.TableHeaders]=a(d[b])}else e=d}}else e=f;return e}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,c,b);this.unpack=function(c,a){var d;if(this.isComplexType(c)||OSF.DDA.ListType.isListType(c)){var e=(a||typeof a==="unknown")&&a.toArray;d=e?a.toArray():a||{}}else if(this.isDynamicType(c))d=b[c].fromHost(a);else d=a;return d}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(a){function c(a){var b=a;if(OSF.OUtil.isArray(a))for(var f=b.length,d=0;d2){c=[];for(var f=1;f=a.MESSAGE_TIME_DELTA){f();b.lastMessageTimestamp=d}else{b.lastMessageTimestamp+=a.MESSAGE_TIME_DELTA;setTimeout(function(){f()},b.lastMessageTimestamp-d)}return e};a.prototype.generateCorrelationId=function(){++this.callingIndex;return this.conversationId+this.callingIndex};a.getCurrentTimeMS=function(){return (new Date).getTime()};a.MESSAGE_TIME_DELTA=10;return a}();b.WebkitScriptMessaging=c})(b=a.ScriptMessaging||(a.ScriptMessaging={}))})(OSFWebkit||(OSFWebkit={}));OSF.ScriptMessaging=OSFWebkit.ScriptMessaging;var OSFWebkit;(function(a){a.MessageHandlerName="Agave";a.PopupMessageHandlerName="WefPopupHandler";(function(a){var w="HostFullVersion",v="HostCustomMessage",u="RequirementMatrix",t="CommerceAllowed",s="TouchEnabled",r="InstanceId",q="CorrelationId",p="APISetVersion",o="SolutionToken",n="ControlIntegrationLevel",m="ActivationMode",l="DocumentUrl",k="BindingCount",j="AppDataLocale",i="APPUILocale",h="AppCapabilities",g="APIVersionSequence",f="RevisionVersion",e="MinorVersion",d="MajorVersion",c="SolutionReferenceId",b="Settings";a[a[b]=0]=b;a[a[c]=1]=c;a[a["AppType"]=2]="AppType";a[a[d]=3]=d;a[a[e]=4]=e;a[a[f]=5]=f;a[a[g]=6]=g;a[a[h]=7]=h;a[a[i]=8]=i;a[a[j]=9]=j;a[a[k]=10]=k;a[a[l]=11]=l;a[a[m]=12]=m;a[a[n]=13]=n;a[a[o]=14]=o;a[a[p]=15]=p;a[a[q]=16]=q;a[a[r]=17]=r;a[a[s]=18]=s;a[a[t]=19]=t;a[a[u]=20]=u;a[a[v]=21]=v;a[a[w]=22]=w})(a.AppContextProperties||(a.AppContextProperties={}));var c=a.AppContextProperties;(function(a){var f="SendMessage",e="GetContext",d="WriteSettings",c="UnregisterEvent",b="RegisterEvent";a[a["Execute"]=1]="Execute";a[a[b]=2]=b;a[a[c]=3]=c;a[a[d]=4]=d;a[a[e]=5]=e;a[a[f]=6]=f})(a.MethodId||(a.MethodId={}));var d=a.MethodId,b=function(){var d="message",b=null;function c(a){this.hostScriptProxy=a}c.prototype.execute=function(h,g,d){var c=g;if(c==b)c=[];var f={id:h,apiArgs:c},e=function(e){if(d){var g=[];if(OSF.OUtil.isArray(e))for(var f=0;f=2){d=b[0];e=b[1]}c&&c(e,new a.WebkitSafeArray(d))},e=function(c){if(b)return b(new a.WebkitSafeArray(c))};this.hostScriptProxy.registerEvent(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.RegisterEvent,g,f,d,e)};c.prototype.unregisterEvent=function(e,d,c){var b=function(b){return c(new a.WebkitSafeArray(b))};this.hostScriptProxy.unregisterEvent(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.UnregisterEvent,e,d,b)};c.prototype.messageParent=function(c){var b=c[Microsoft.Office.WebExtension.Parameters.MessageToParent],a={dialogMessage:{messageType:OSF.DialogMessageType.DialogMessageReceived,messageContent:b}};window.opener.postMessage(JSON.stringify(a),window.location.origin)};c.prototype.openDialog=function(h,o,g,k){if(c.popup&&!c.popup.closed){k(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened);return}var n="action=displayDialog";c.OpenDialogCallback=undefined;var i="#",f=JSON.parse(o),l=f.url;if(!l)return;var a=l.split(i),j="?";if(a[0].indexOf("?")>-1)j="&";var s=screen.width*f.width/100,q=screen.height*f.height/100,r="width="+s+", height="+q;a[0]=a[0].concat(j).concat(n);var p=a.join(i);c.popup=window.open(p,"",r);function e(a){if(a.origin==window.location.origin)try{var b=JSON.parse(a.data);b.dialogMessage&&g(h,[OSF.DialogMessageType.DialogMessageReceived,b.dialogMessage.messageContent])}catch(c){OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handlered. Message:"+a.data)}}function m(){try{if(c.popup==b||c.popup.closed){window.clearInterval(c.interval);window.removeEventListener(d,e);c.NotifyError=b;c.popup=b;g(h,[OSF.DialogMessageType.DialogClosed])}}catch(a){OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed.")}}c.OpenDialogCallback=function(a){if(a==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){window.addEventListener(d,e);this.messageEventListener=e;c.interval=window.setInterval(m,1e3);function b(a){g(h,[a])}c.NotifyError=b}k(a)}};c.prototype.closeDialog=function(f,e,a){if(c.popup){c.interval&&window.clearInterval(c.interval);c.popup.close();c.popup=b;window.removeEventListener(d,this.messageEventListener);c.NotifyError=b;a(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}else a(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)};c.prototype.sendMessage=function(c){var a=c[Microsoft.Office.WebExtension.Parameters.MessageContent];if(!isNaN(parseFloat(a))&&isFinite(a))a=a.toString();this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.SendMessage,a,b)};return c}();a.WebkitHostController=b})(OSFWebkit||(OSFWebkit={}));OSF.Webkit=OSFWebkit;OSF.ClientHostController=new OSFWebkit.WebkitHostController(OSF.ScriptMessaging.GetScriptMessenger());OSF.DDA.ClientSettingsManager={getSettingsExecuteMethod:function(a){return function(b){var e,d,c=function(c,a){b.onReceiving&&b.onReceiving();b.onComplete&&b.onComplete(c,a)};try{a(b.hostCallArgs,b.onCalling,c)}catch(f){e=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;d={name:Strings.OfficeOM.L_InternalError,message:f};c(e,d)}}},read:function(b,a){var f=[],e=[];b&&b();var c=OSF._OfficeAppFactory.getInitializationHelper(),d=function(b){a&&a(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,b.get_settings())};c.getAppContext(null,d)},write:function(b,i,d,c){var a={},f=[],e=[];for(var g in b){f.push(g);e.push(b[g])}a["keys"]=f;a["values"]=e;d&&d();var h=function(a){c&&c(a[0],null)};OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.WriteSettings,a,h)}};OSF.InitializationHelper.prototype.initializeSettings=function(c,b){var a=c.get_settings(),d=this.deserializeSettings(a,b);return d};OSF.InitializationHelper.prototype.getAppContext=function(d,c){var b=function(b){for(var f,a=OSF.Webkit.AppContextProperties,v=b[a.AppType],h=b[a.Settings],g={},i=h[0],z=h[1],e=0;e40){a=OSF.OUtil.Guid.generateNewGuid();b.setValue(b.clientIDKey,a)}return a};a.prototype.saveLog=function(d,e){var b=this,a=b.getValue(b.logIdSetKey);a=(a&&a.length>0?a+";":c)+d;b.setValue(b.logIdSetKey,a);b.setValue(d,e)};a.prototype.enumerateLog=function(c,e){var a=this,d=a.getValue(a.logIdSetKey);if(d){var f=d.split(";");for(var h in f){var b=f[h],g=a.getValue(b);if(g){c&&c(b,g);e&&a.remove(b)}}e&&a.remove(a.logIdSetKey)}};a.prototype.getValue=function(d){var a=OSF.OUtil.getLocalStorage(),b=c;if(a)b=a.getItem(d);return b};a.prototype.setValue=function(c,b){var a=OSF.OUtil.getLocalStorage();a&&a.setItem(c,b)};a.prototype.remove=function(b){var a=OSF.OUtil.getLocalStorage();if(a)try{a.removeItem(b)}catch(c){}};return a}(),i=function(){function a(){}a.prototype.LogData=function(a){if(!OSF.Logger||!d.enableTelemetry)return;try{OSFAriaLogger.AriaLogger.getInstance().logData(a)}catch(b){}};a.prototype.LogRawData=function(a){if(!OSF.Logger||!d.enableTelemetry)return;try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(a))}catch(b){}};return a}();function f(a){if(a)a=a.replace(/[{}]/g,c).toLowerCase();return a||c}function x(g){if(!OSF.Logger)return;if(a)return;a=new z;if(g.get_hostFullVersion())a.hostVersion=g.get_hostFullVersion();else a.hostVersion=g.get_appVersion();a.appId=g.get_id();a.host=g.get_appName();a.browser=window.navigator.userAgent;a.correlationId=f(g.get_correlationId());a.clientId=(new l).getClientId();a.appInstanceId=g.get_appInstanceId();if(a.appInstanceId)a.appInstanceId=a.appInstanceId.replace(/[{}]/g,c).toLowerCase();a.message=g.get_hostCustomMessage();a.officeJSVersion=OSF.ConstantNames.FileVersion;a.hostJSVersion="16.0.8916.1000";if(g._wacHostEnvironment)a.wacHostEnvironment=g._wacHostEnvironment;if(g._isFromWacAutomation!==undefined&&g._isFromWacAutomation!==b)a.isFromWacAutomation=g._isFromWacAutomation.toString().toLowerCase();var j=g.get_docUrl();a.docUrl=p.test(j)?j:c;var i=location.href;if(i)i=i.split("?")[0].split("#")[0];a.appURL=i;(function(i,a){var e,h,d;a.assetId=c;a.userId=c;try{e=decodeURIComponent(i);h=new DOMParser;d=h.parseFromString(e,"text/xml");var f=d.getElementsByTagName("t")[0].attributes.getNamedItem("cid"),g=d.getElementsByTagName("t")[0].attributes.getNamedItem("oid");if(f&&f.nodeValue)a.userId=f.nodeValue;else if(g&&g.nodeValue)a.userId=g.nodeValue;a.assetId=d.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(j){}finally{e=b;d=b;h=b}})(g.get_eToken(),a);(function(){var l=new Date,c=b,i=0,k=false,f=function(){if(document.hasFocus()){if(c==b)c=new Date}else if(c){i+=Math.abs((new Date).getTime()-c.getTime());c=b}},a=[];a.push(new h("focus",f));a.push(new h("blur",f));a.push(new h("focusout",f));a.push(new h("focusin",f));var j=function(){for(var f=0;f0)for(var b=0;b0)for(var b=0;b0){this._eventHandlers[a]=[];return true}return false},clearObjectEventHandlers:function(a,b){if(this._objectEventHandlers[a]!=null&&this._objectEventHandlers[a][b]!=null){this._objectEventHandlers[a][b]=[];return true}return false},getEventHandlerCount:function(a){return this._eventHandlers[a]!=undefined?this._eventHandlers[a].length:-1},getObjectEventHandlerCount:function(a,b){if(this._objectEventHandlers[a]==null||this._objectEventHandlers[a][b]==null)return 0;return this._objectEventHandlers[a][b].length},fireEvent:function(a){if(a.type==undefined)return false;var b=a.type;if(b&&this._eventHandlers[b]){for(var d=this._eventHandlers[b],c=0;c0){var d=b[0];while(c.length>0){var e=c.shift();d(e)}return true}}return false},clearQueuedEvent:function(a){if(a&&this._eventHandlers[a]){var b=this._queuedEventsArgs[a];if(b)this._queuedEventsArgs[a]=[]}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(d,c,b){var h="hostPlatform",g="outlook",f="hostType",e=this,a;switch(d){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:a=new OSF.DDA.DocumentSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:a=new OSF.DDA.BindingSelectionChangedEventArgs(e.manufactureBinding(b,c.document),b[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:a=new OSF.DDA.BindingDataChangedEventArgs(e.manufactureBinding(b,c.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:a=new OSF.DDA.SettingsChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:a=new OSF.DDA.ActiveViewChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:a=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:a=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:a=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(b);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:a=new OSF.DDA.ObjectEventArgs(d,b[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:a=new OSF.DDA.RichApiMessageEventArgs(d,b);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:a=new OSF.DDA.NodeInsertedEventArgs(e.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NewNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:a=new OSF.DDA.NodeReplacedEventArgs(e.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.OldNode]),e.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NewNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:a=new OSF.DDA.NodeDeletedEventArgs(e.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.OldNode]),e.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:a=new OSF.DDA.TaskSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:a=new OSF.DDA.ResourceSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:a=new OSF.DDA.ViewSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:a=new OSF.DDA.DialogEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:a=new OSF.DDA.DialogParentEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]==g){a=new OSF.DDA.OlkItemSelectedChangedEventArgs(b);c.initialize(a["initialData"]);(OSF._OfficeAppFactory.getHostInfo()[h]=="win32"||OSF._OfficeAppFactory.getHostInfo()[h]=="mac")&&c.setCurrentItemNumber(a["itemNumber"].itemNumber)}else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,d));break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]==g)a=new OSF.DDA.OlkRecipientsChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,d));break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]==g)a=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,d));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,d))}return a};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:false,isWindowDialog:false};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var c=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),b=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,a=this;!a[b]&&OSF.OUtil.defineEnumerableProperty(a,b,{value:function(){var b=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];b(arguments,c,a)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(d){var b=OSF.DDA.SyncMethodNames.MessageParent.displayName,a=this;!a[b]&&OSF.OUtil.defineEnumerableProperty(a,b,{value:function(){var b=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return b(arguments,a)}});var c=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;!a[c]&&typeof OSF.DialogParentMessageEventDispatch!="undefined"&&OSF.DDA.DispIdHost.addEventSupport(a,OSF.DialogParentMessageEventDispatch,d);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(a){if(a[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived)OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:a[OSF.DDA.PropertyDescriptors.MessageContent]}});else OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:a[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:a[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:true}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:false}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:false}},{name:Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels,value:{types:["boolean"],defaultValue:false}}],privateStateCallbacks:[],onSucceeded:function(c){var g=c[Microsoft.Office.WebExtension.Parameters.Id],b=c[Microsoft.Office.WebExtension.Parameters.Data],a=new OSF.DialogHandler,d=OSF.DDA.AsyncMethodNames.CloseAsync.displayName;OSF.OUtil.defineEnumerableProperty(a,d,{value:function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];c(arguments,g,b,a)}});var f=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;OSF.OUtil.defineEnumerableProperty(a,f,{value:function(){var d=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],c=d.verifyAndExtractCall(arguments,a,b),e=c[Microsoft.Office.WebExtension.Parameters.EventType],f=c[Microsoft.Office.WebExtension.Parameters.Handler];return b.addEventHandlerAndFireQueuedEvent(e,f)}});var e=OSF.DDA.SyncMethodNames.SendMessage.displayName;OSF.OUtil.defineEnumerableProperty(a,e,{value:function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return c(arguments,b,a)}});return a},checkCallArgs:function(a){if(a[Microsoft.Office.WebExtension.Parameters.Width]<=0)a[Microsoft.Office.WebExtension.Parameters.Width]=1;if(!a[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&a[Microsoft.Office.WebExtension.Parameters.Width]>100)a[Microsoft.Office.WebExtension.Parameters.Width]=99;if(a[Microsoft.Office.WebExtension.Parameters.Height]<=0)a[Microsoft.Office.WebExtension.Parameters.Height]=1;if(!a[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&a[Microsoft.Office.WebExtension.Parameters.Height]>100)a[Microsoft.Office.WebExtension.Parameters.Height]=99;if(!a[Microsoft.Office.WebExtension.Parameters.RequireHTTPs])a[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=true;return a}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(a){try{a.onCalling&&a.onCalling();var c=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true,a);OSF.ClientHostController.openDialog(a.dispId,a.targetId,function(c,b){a.onEvent&&a.onEvent(b);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(a.dispId)},c)}catch(b){OSF.DDA.SafeArray.Delegate._onException(b,a)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(a){a.onCalling&&a.onCalling();var c=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false,a);try{OSF.ClientHostController.closeDialog(a.dispId,a.targetId,c)}catch(b){OSF.DDA.SafeArray.Delegate._onException(b,a)}};OSF.DDA.SafeArray.Delegate.messageParent=function(a){try{a.onCalling&&a.onCalling();var d=(new Date).getTime(),b=OSF.ClientHostController.messageParent(a.hostCallArgs);a.onReceiving&&a.onReceiving();OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(a.dispId,a.hostCallArgs,Math.abs((new Date).getTime()-d),b);return b}catch(c){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(c)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:true});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:true});OSF.DDA.SafeArray.Delegate.sendMessage=function(a){try{a.onCalling&&a.onCalling();var d=(new Date).getTime(),c=OSF.ClientHostController.sendMessage(a.hostCallArgs);a.onReceiving&&a.onReceiving();return c}catch(b){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(b)}};Microsoft.Office.WebExtension.BindingType={Table:"table",Text:"text",Matrix:"matrix"};OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType};OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{BindingList:"BindingList"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{Subset:"subset",BindingProperties:"BindingProperties"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList,OSF.DDA.PropertyDescriptors.BindingProperties);OSF.DDA.BindingPromise=function(b,a){this._id=b;OSF.OUtil.defineEnumerableProperty(this,"onFail",{"get":function(){return a},"set":function(c){var b=typeof c;if(b!="undefined"&&b!="function")throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,b);a=c}})};OSF.DDA.BindingPromise.prototype={_fetch:function(b){var a=this;if(a.binding)b&&b(a.binding);else if(!a._binding){var c=a;Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(a._id,function(a){if(a.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded){OSF.OUtil.defineEnumerableProperty(c,"binding",{value:a.value});b&&b(c.binding)}else c.onFail&&c.onFail(a)})}return a},getDataAsync:function(){var a=arguments;this._fetch(function(b){b.getDataAsync.apply(b,a)});return this},setDataAsync:function(){var a=arguments;this._fetch(function(b){b.setDataAsync.apply(b,a)});return this},addHandlerAsync:function(){var a=arguments;this._fetch(function(b){b.addHandlerAsync.apply(b,a)});return this},removeHandlerAsync:function(){var a=arguments;this._fetch(function(b){b.removeHandlerAsync.apply(b,a)});return this}};OSF.DDA.BindingFacade=function(b){this._eventDispatches=[];OSF.OUtil.defineEnumerableProperty(this,"document",{value:b});var a=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[a.AddFromSelectionAsync,a.AddFromNamedItemAsync,a.GetAllAsync,a.GetByIdAsync,a.ReleaseByIdAsync])};OSF.DDA.UnknownBinding=function(b,a){OSF.OUtil.defineEnumerableProperties(this,{document:{value:a},id:{value:b}})};OSF.DDA.Binding=function(a,c){OSF.OUtil.defineEnumerableProperties(this,{document:{value:c},id:{value:a}});var d=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[d.GetDataAsync,d.SetDataAsync]);var e=Microsoft.Office.WebExtension.EventType,b=c.bindings._eventDispatches;if(!b[a])b[a]=new OSF.EventDispatch([e.BindingSelectionChanged,e.BindingDataChanged]);var f=b[a];OSF.DDA.DispIdHost.addEventSupport(this,f)};OSF.DDA.generateBindingId=function(){return "UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+(new Date).getTime()};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureBinding=function(a,c){var d=a[OSF.DDA.BindingProperties.Id],g=a[OSF.DDA.BindingProperties.RowCount],f=a[OSF.DDA.BindingProperties.ColumnCount],h=a[OSF.DDA.BindingProperties.HasHeaders],b;switch(a[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:b=new OSF.DDA.TextBinding(d,c);break;case Microsoft.Office.WebExtension.BindingType.Matrix:b=new OSF.DDA.MatrixBinding(d,c,g,f);break;case Microsoft.Office.WebExtension.BindingType.Table:var i=function(){return OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument},e;if(i()&&OSF.DDA.ExcelTableBinding)e=OSF.DDA.ExcelTableBinding;else e=OSF.DDA.TableBinding;b=new e(d,c,g,f,h);break;default:b=new OSF.DDA.UnknownBinding(d,c)}return b};OSF.DDA.AsyncMethodNames.addNames({AddFromSelectionAsync:"addFromSelectionAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:"getByIdAsync",ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync"});(function(){var d="number",c="object",b="string",a=null;function e(a){return OSF.DDA.OMFactory.manufactureBinding(a,Microsoft.Office.WebExtension.context.document)}function f(a){return a.id}function g(c,e,d){var b=c[Microsoft.Office.WebExtension.Parameters.Data];if(OSF.DDA.TableDataProperties&&b&&(b[OSF.DDA.TableDataProperties.TableRows]!=undefined||b[OSF.DDA.TableDataProperties.TableHeaders]!=undefined))b=OSF.DDA.OMFactory.manufactureTableData(b);b=OSF.DDA.DataCoercion.coerceData(b,d[Microsoft.Office.WebExtension.Parameters.CoercionType]);return b==undefined?a:b}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[b],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[c],defaultValue:a}}],privateStateCallbacks:[],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:[b]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[b],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[c],defaultValue:a}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return true}}],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(a){return OSF.OUtil.mapList(a[OSF.DDA.ListDescriptors.BindingList],e)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[b]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[b]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(d,b,a){var c=a[Microsoft.Office.WebExtension.Parameters.Id];delete b._eventDispatches[c]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(b,a){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(a.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[c,b],defaultValue:a}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[c],defaultValue:a}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[d],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[d],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:[d],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:[d],defaultValue:0}}],checkCallArgs:function(a,b){if(a[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&a[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&a[Microsoft.Office.WebExtension.Parameters.RowCount]==0&&a[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0){delete a[Microsoft.Office.WebExtension.Parameters.StartRow];delete a[Microsoft.Office.WebExtension.Parameters.StartColumn];delete a[Microsoft.Office.WebExtension.Parameters.RowCount];delete a[Microsoft.Office.WebExtension.Parameters.ColumnCount]}if(a[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(b.type)&&(a[Microsoft.Office.WebExtension.Parameters.StartRow]||a[Microsoft.Office.WebExtension.Parameters.StartColumn]||a[Microsoft.Office.WebExtension.Parameters.RowCount]||a[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return a},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}],onSucceeded:g});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[b,c,d,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(a){return OSF.DDA.DataCoercion.determineCoercionType(a[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[c,b],defaultValue:a}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[c],defaultValue:a}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[d],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[d],defaultValue:0}}],checkCallArgs:function(a,b){if(a[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&a[Microsoft.Office.WebExtension.Parameters.StartColumn]==0){delete a[Microsoft.Office.WebExtension.Parameters.StartRow];delete a[Microsoft.Office.WebExtension.Parameters.StartColumn]}if(a[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(b.type)&&(a[Microsoft.Office.WebExtension.Parameters.StartRow]||a[Microsoft.Office.WebExtension.Parameters.StartColumn]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return a},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}]})})();Microsoft.Office.WebExtension.TableData=function(b,a){function c(a){if(a==null||a==undefined)return null;try{for(var b=OSF.DDA.DataCoercion.findArrayDimensionality(a,2);b<2;b++)a=[a];return a}catch(c){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{"get":function(){return a},"set":function(b){a=c(b)}},rows:{"get":function(){return b},"set":function(a){b=a==null||OSF.OUtil.isArray(a)&&a.length==0?[]:c(a)}}});this.headers=a;this.rows=b};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(a){return new Microsoft.Office.WebExtension.TableData(a[OSF.DDA.TableDataProperties.TableRows],a[OSF.DDA.TableDataProperties.TableHeaders])};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{TableDataProperties:"TableDataProperties"});OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};OSF.DDA.TableBinding=function(f,e,d,c,b){OSF.DDA.TableBinding.uber.constructor.call(this,f,e);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:d?d:0},columnCount:{value:c?c:0},hasHeaders:{value:b?b:false}});var a=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[a.AddRowsAsync,a.AddColumnsAsync,a.DeleteAllDataValuesAsync])};OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync"});(function(){function a(a){return a.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:a}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:a}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:a}]})})();Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var a=null;return {findArrayDimensionality:function(c){if(OSF.OUtil.isArray(c)){for(var b=0,a=0;a4*1024*1024)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return b},onSucceeded:function(a,c,b){return new OSF.DDA.File(a[OSF.DDA.FileProperties.Handle],a[OSF.DDA.FileProperties.FileSize],b[Microsoft.Office.WebExtension.Parameters.SliceSize])}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(b,a){return a[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(b,a){return a[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(a,d,c){var b=a[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(b<0||b>=d.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;a[OSF.DDA.FileSliceOffset]=parseInt((b*c[OSF.DDA.FileProperties.SliceSize]).toString());return a},onSucceeded:function(a,d,c){var b={};OSF.OUtil.defineEnumerableProperties(b,{data:{value:a[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:c[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:a[OSF.DDA.FileProperties.SliceSize]}});return b}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(b,a){return a[OSF.DDA.FileProperties.Handle]}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileProperties.FileSize,value:1}],isComplexType:true});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0},{name:OSF.DDA.FileProperties.SliceSize,value:1}],isComplexType:true});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:0},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:5},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:6}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:0}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileSliceOffset,value:1},{name:OSF.DDA.FileProperties.SliceSize,value:2}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0}]});OSF.DDA.AsyncMethodNames.addNames({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync"});(function(){var c=false,b="boolean",a="number";function d(b,d,c){var a=b[Microsoft.Office.WebExtension.Parameters.Data];if(OSF.DDA.TableDataProperties&&a&&(a[OSF.DDA.TableDataProperties.TableRows]!=undefined||a[OSF.DDA.TableDataProperties.TableHeaders]!=undefined))a=OSF.DDA.OMFactory.manufactureTableData(a);a=OSF.DDA.DataCoercion.coerceData(a,c[Microsoft.Office.WebExtension.Parameters.CoercionType]);return a==undefined?null:a}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,"enum":Microsoft.Office.WebExtension.CoercionType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}}],privateStateCallbacks:[],onSucceeded:d});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object",a,b]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(a){return OSF.DDA.DataCoercion.determineCoercionType(a[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:[a,b],defaultValue:c}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:[a,b],defaultValue:c}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[a,b],defaultValue:c}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[a,b],defaultValue:c}}],privateStateCallbacks:[]})})();OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:1},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:2},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:3},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:4},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:5}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:0},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:1},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:2},{name:Microsoft.Office.WebExtension.GoToType.Index,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:0},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:1},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:1},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:2}]});OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",RefreshingSettings:"refreshingSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(a){return OSF.OUtil.serializeSettings(a)},deserializeSettings:function(a){return OSF.OUtil.deserializeSettings(a)}};OSF.DDA.Settings=function(a){var b="name";a=a||{};var c=function(d){var b=OSF.OUtil.getSessionStorage();if(b){var a=OSF.DDA.SettingsManager.serializeSettings(d),c=JSON?JSON.stringify(a):Sys.Serialization.JavaScriptSerializer.serialize(a);b.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),c)}};OSF.OUtil.defineEnumerableProperties(this,{"get":{value:function(e){var d=Function._validateParams(arguments,[{name:b,type:String,mayBeNull:false}]);if(d)throw d;var c=a[e];return typeof c==="undefined"?null:c}},"set":{value:function(f,e){var d=Function._validateParams(arguments,[{name:b,type:String,mayBeNull:false},{name:"value",mayBeNull:true}]);if(d)throw d;a[f]=e;c(a)}},remove:{value:function(e){var d=Function._validateParams(arguments,[{name:b,type:String,mayBeNull:false}]);if(d)throw d;delete a[e];c(a)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],a)};OSF.DDA.RefreshableSettings=function(a){OSF.DDA.RefreshableSettings.uber.constructor.call(this,a);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],a);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:a}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(b,a){return a}}],onSucceeded:function(d,a,e){var f=d[OSF.DDA.SettingsManager.SerializedSettings],c=OSF.DDA.SettingsManager.deserializeSettings(f),g=e[OSF.DDA.SettingsManager.RefreshingSettings];for(var b in g)a.remove(b);for(var b in c)a.set(b,c[b]);return a}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:true}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(b,a){return OSF.DDA.SettingsManager.serializeSettings(a)}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});OSF.DDA.AsyncMethodNames.addNames({GetOfficeThemeAsync:"getOfficeThemeAsync",GetDocumentThemeAsync:"getDocumentThemeAsync"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{OfficeThemeChanged:"officeThemeChanged",DocumentThemeChanged:"documentThemeChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.Parameters,{DocumentTheme:"documentTheme",OfficeTheme:"officeTheme"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DocumentThemeChangedEvent:"DocumentThemeChangedEvent",OfficeThemeChangedEvent:"OfficeThemeChangedEvent"});OSF.OUtil.setNamespace("Theming",OSF.DDA);OSF.DDA.Theming.OfficeThemeEnum={PrimaryFontColor:"primaryFontColor",PrimaryBackgroundColor:"primaryBackgroundColor",SecondaryFontColor:"secondaryFontColor",SecondaryBackgroundColor:"secondaryBackgroundColor"};OSF.DDA.Theming.DocumentThemeEnum={PrimaryFontColor:"primaryFontColor",PrimaryBackgroundColor:"primaryBackgroundColor",SecondaryFontColor:"secondaryFontColor",SecondaryBackgroundColor:"secondaryBackgroundColor",Accent1:"accent1",Accent2:"accent2",Accent3:"accent3",Accent4:"accent4",Accent5:"accent5",Accent6:"accent6",Hyperlink:"hyperlink",FollowedHyperlink:"followedHyperlink",HeaderLatinFont:"headerLatinFont",HeaderEastAsianFont:"headerEastAsianFont",HeaderScriptFont:"headerScriptFont",HeaderLocalizedFont:"headerLocalizedFont",BodyLatinFont:"bodyLatinFont",BodyEastAsianFont:"bodyEastAsianFont",BodyScriptFont:"bodyScriptFont",BodyLocalizedFont:"bodyLocalizedFont"};OSF.DDA.Theming.ConvertToDocumentTheme=function(f){var b=false,a=true;for(var d=[{name:"primaryFontColor",needToConvertToHex:a},{name:"primaryBackgroundColor",needToConvertToHex:a},{name:"secondaryFontColor",needToConvertToHex:a},{name:"secondaryBackgroundColor",needToConvertToHex:a},{name:"accent1",needToConvertToHex:a},{name:"accent2",needToConvertToHex:a},{name:"accent3",needToConvertToHex:a},{name:"accent4",needToConvertToHex:a},{name:"accent5",needToConvertToHex:a},{name:"accent6",needToConvertToHex:a},{name:"hyperlink",needToConvertToHex:a},{name:"followedHyperlink",needToConvertToHex:a},{name:"headerLatinFont",needToConvertToHex:b},{name:"headerEastAsianFont",needToConvertToHex:b},{name:"headerScriptFont",needToConvertToHex:b},{name:"headerLocalizedFont",needToConvertToHex:b},{name:"bodyLatinFont",needToConvertToHex:b},{name:"bodyEastAsianFont",needToConvertToHex:b},{name:"bodyScriptFont",needToConvertToHex:b},{name:"bodyLocalizedFont",needToConvertToHex:b}],e={},c=0;c 6 && v.slice(0, 5) === OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1) === OSF.DDA.SettingsManager.DataJSONSuffix) { + d = new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + } + else { + value = Sys.Serialization.JavaScriptSerializer.deserialize(value, true); + } + ret[key] = value; + } + catch (ex) { + } + } + return ret; + }, loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) { if (url && callback) { var doc = window.document; @@ -828,6 +876,14 @@ OSF.OUtil = (function () { } } }, + removeClass: function OSF_OUtil$removeClass(elmt, val) { + if (OSF.OUtil.hasClass(elmt, val)) { + var className = elmt.getAttribute(_classN); + var reg = new RegExp('(\\s|^)' + val + '(\\s|$)'); + className = className.replace(reg, ''); + elmt.setAttribute(_classN, className); + } + }, hasClass: function OSF_OUtil$hasClass(elmt, clsName) { var className = elmt.getAttribute(_classN); return className && className.match(new RegExp('(\\s|^)' + clsName + '(\\s|$)')); @@ -964,6 +1020,12 @@ OSF.OUtil.Guid = (function () { })(); window.OSF = OSF; OSF.OUtil.setNamespace("OSF", window); +OSF.MessageIDs = { + "FetchBundleUrl": 0, + "LoadReactBundle": 1, + "LoadBundleSuccess": 2, + "LoadBundleError": 3 +}; OSF.AppName = { Unsupported: 0, Excel: 1, @@ -991,7 +1053,10 @@ OSF.AppName = { OutlookAndroid: 4194304, OneNoteWinRT: 8388608, ExcelAndroid: 8388609, - VisioWebApp: 8388610 + VisioWebApp: 8388610, + OneNoteIOS: 8388611, + WordAndroid: 8388613, + PowerpointAndroid: 8388614 }; OSF.InternalPerfMarker = { DataCoercionBegin: "Agave.HostCall.CoerceDataStart", @@ -1021,7 +1086,9 @@ OSF.AgaveHostAction = { "EscExit": 15, "F2Exit": 16, "ExitNoFocusable": 17, - "ExitNoFocusableShift": 18 + "ExitNoFocusableShift": 18, + "MouseEnter": 19, + "MouseLeave": 20 }; OSF.SharedConstants = { "NotificationConversationIdSuffix": '_ntf' @@ -1157,6 +1224,8 @@ Microsoft.Office.WebExtension.Parameters = { HostType: "hostType", ForceConsent: "forceConsent", ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + Reserved: "reserved", Xml: "xml", Namespace: "namespace", Prefix: "prefix", @@ -1189,7 +1258,9 @@ Microsoft.Office.WebExtension.Parameters = { DisplayInIframe: "displayInIframe", MessageContent: "messageContent", HideTitle: "hideTitle", - AppCommandInvocationCompletedData: "appCommandInvocationCompletedData" + UseDeviceIndependentPixels: "useDeviceIndependentPixels", + AppCommandInvocationCompletedData: "appCommandInvocationCompletedData", + Base64: "base64" }; OSF.OUtil.setNamespace("DDA", OSF); OSF.DDA.DocumentMode = { @@ -1246,6 +1317,8 @@ OSF.DDA.MethodDispId = { dispidAppCommandInvocationCompletedMethod: 94, dispidCloseContainerMethod: 97, dispidGetAccessTokenMethod: 98, + dispidOpenBrowserWindow: 102, + dispidCreateDocumentMethod: 105, dispidGetSelectedTaskMethod: 110, dispidGetSelectedResourceMethod: 111, dispidGetTaskMethod: 112, @@ -1301,8 +1374,11 @@ OSF.DDA.EventDispId = { dispidObjectDataChangedEvent: 15, dispidContentControlAddedEvent: 16, dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, dispidAppCommandInvokedEvent: 39, dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, dispidTaskSelectionChangedEvent: 56, dispidResourceSelectionChangedEvent: 57, dispidViewSelectionChangedEvent: 58, @@ -1434,7 +1510,9 @@ OSF.DDA.ErrorCodeManager = (function () { ooeSSOInvalidGrant: 13005, ooeSSOClientError: 13006, ooeSSOServerError: 13007, - ooeAddinIsAlreadyRequestingToken: 13008 + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009, + ooeSSOConnectionLost: 13010 }, initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported] = { name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotSupported }; @@ -1532,6 +1610,8 @@ OSF.DDA.ErrorCodeManager = (function () { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError] = { name: stringNS.L_SSOClientError, message: stringNS.L_SSOClientErrorMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError] = { name: stringNS.L_SSOServerError, message: stringNS.L_SSOServerErrorMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken] = { name: stringNS.L_AddinIsAlreadyRequestingToken, message: stringNS.L_AddinIsAlreadyRequestingTokenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory] = { name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost] = { name: stringNS.L_SSOConnectionLostError, message: stringNS.L_SSOConnectionLostErrorMessage }; } }; })(); @@ -2233,6 +2313,11 @@ OSF.DDA.Context = function OSF_DDA_Context(officeAppContext, document, license, value: officeAppContext.auth }); } + if (officeAppContext.application) { + OSF.OUtil.defineEnumerableProperty(this, "application", { + value: officeAppContext.application + }); + } if (officeAppContext.get_isDialog()) { var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); OSF.OUtil.defineEnumerableProperty(this, "requirements", { @@ -2275,6 +2360,8 @@ OSF.DDA.OutlookContext = function OSF_DDA_OutlookContext(appContext, settings, l }; OSF.OUtil.extend(OSF.DDA.OutlookContext, OSF.DDA.Context); OSF.DDA.OutlookAppOm = function OSF_DDA_OutlookAppOm(appContext, window, appReady) { }; +OSF.DDA.Application = function OSF_DDA_Application(officeAppContext) { +}; OSF.DDA.Document = function OSF_DDA_Document(officeAppContext, settings) { var mode; switch (officeAppContext.get_clientMode()) { @@ -3011,6 +3098,8 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod "ExecuteRichApiRequestAsync": did.dispidExecuteRichApiRequestMethod, "AppCommandInvocationCompletedAsync": did.dispidAppCommandInvocationCompletedMethod, "CloseContainerAsync": did.dispidCloseContainerMethod, + "OpenBrowserWindow": did.dispidOpenBrowserWindow, + "CreateDocumentAsync": did.dispidCreateDocumentMethod, "AddDataPartAsync": did.dispidAddDataPartMethod, "GetDataPartByIdAsync": did.dispidGetDataPartByIdMethod, "GetDataPartsByNameSpaceAsync": did.dispidGetDataPartsByNamespaceMethod, @@ -3050,13 +3139,13 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod } jsom = OSF.DDA.SyncMethodNames; did = OSF.DDA.MethodDispId; - var asyncMethodMap = { + var syncMethodMap = { "MessageParent": did.dispidMessageParentMethod, "SendMessage": did.dispidSendMessageMethod }; - for (var method in asyncMethodMap) { + for (var method in syncMethodMap) { if (jsom[method]) { - dispIdMap[jsom[method].id] = asyncMethodMap[method]; + dispIdMap[jsom[method].id] = syncMethodMap[method]; } } jsom = Microsoft.Office.WebExtension.EventType; @@ -3076,7 +3165,10 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod "ObjectSelectionChanged": did.dispidObjectSelectionChangedEvent, "ObjectDataChanged": did.dispidObjectDataChangedEvent, "ContentControlAdded": did.dispidContentControlAddedEvent, + "RichApiMessage": did.dispidRichApiMessageEvent, "ItemChanged": did.dispidOlkItemSelectedChangedEvent, + "RecipientsChanged": did.dispidOlkRecipientsChangedEvent, + "AppointmentTimeChanged": did.dispidOlkAppointmentTimeChangedEvent, "TaskSelectionChanged": did.dispidTaskSelectionChangedEvent, "ResourceSelectionChanged": did.dispidResourceSelectionChangedEvent, "ViewSelectionChanged": did.dispidViewSelectionChangedEvent, @@ -3152,6 +3244,7 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod else { hostCallArgs = callArgs; } + var startTime = (new Date()).getTime(); delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ "dispId": dispId, "hostCallArgs": hostCallArgs, @@ -3172,6 +3265,9 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod } var payload = asyncMethodCall.processResponse(status, responseArgs, caller, callArgs); OSF.DDA.issueAsyncResult(callArgs, status, payload); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(dispId, hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); + } } }); } @@ -4039,7 +4135,6 @@ OSF.DDA.SafeArray.Delegate.executeAsync = function OSF_DDA_SafeArray_Delegate$Ex if (args.onCalling) { args.onCalling(); } - var startTime = (new Date()).getTime(); OSF.ClientHostController.execute(args.dispId, toArray(args.hostCallArgs), function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode) { var result = hostResponseArgs.toArray(); var status = result[OSF.DDA.SafeArray.Response.Status]; @@ -4086,9 +4181,6 @@ OSF.DDA.SafeArray.Delegate.executeAsync = function OSF_DDA_SafeArray_Delegate$Ex } args.onComplete(status, payload); } - if (OSF.AppTelemetry) { - OSF.AppTelemetry.onMethodDone(args.dispId, args.hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); - } return true; }); } @@ -4204,6 +4296,9 @@ OSF.InitializationHelper.prototype.prepareApiSurface = function OSF_Initializati } } } + if (OSF.DDA.OpenBrowser) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.OpenBrowserWindow]); + } if (OSF.DDA.Auth) { appContext.auth = new OSF.DDA.Auth(); OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth, [OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]); @@ -5002,7 +5097,7 @@ var OSFAriaLogger; function AriaLogger() { } AriaLogger.prototype.getAriaCDNLocation = function () { - return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath() + "/ariatelemetry/aria-web-telemetry-2.8.0.min.js"); + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath() + "/ariatelemetry/aria-web-telemetry.js"); }; AriaLogger.getInstance = function () { if (AriaLogger.AriaLoggerObj === undefined) { @@ -5019,13 +5114,10 @@ var OSFAriaLogger; try { if (!this.ALogger) { var OfficeExtensibilityTenantID = "db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; - var configuration = new microsoft.applications.telemetry.LogConfiguration(); - configuration.enableAutoUserSession = true; - microsoft.applications.telemetry.LogManager.initialize(OfficeExtensibilityTenantID, configuration); - this.ALogger = new microsoft.applications.telemetry.Logger(); + this.ALogger = AWTLogManager.initialize(OfficeExtensibilityTenantID); } - var eventProperties = new microsoft.applications.telemetry.EventProperties(); - eventProperties.name = "Office.Extensibility.OfficeJS." + tableName; + var eventProperties = new AWTEventProperties(); + eventProperties.setName("Office.Extensibility.OfficeJS." + tableName); for (var key in telemetryData) { if (key.toLowerCase() !== "table") { eventProperties.setProperty(key, telemetryData[key]); @@ -5058,6 +5150,7 @@ var OSFAppTelemetry; var sessionId = OSF.OUtil.Guid.generateNewGuid(); var osfControlAppCorrelationId = ""; var omexDomainRegex = new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"); + OSFAppTelemetry.enableTelemetry = true; ; var AppInfo = (function () { function AppInfo() { @@ -5141,17 +5234,19 @@ var OSFAppTelemetry; function AppLogger() { } AppLogger.prototype.LogData = function (data) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, data.SerializeRow(), OSF.Logger.SendFlag.none); - OSFAriaLogger.AriaLogger.getInstance().logData(data); + try { + OSFAriaLogger.AriaLogger.getInstance().logData(data); + } + catch (e) { + } }; AppLogger.prototype.LogRawData = function (log) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, log, OSF.Logger.SendFlag.none); try { OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)); } @@ -5191,7 +5286,7 @@ var OSFAppTelemetry; } appInfo.message = context.get_hostCustomMessage(); appInfo.officeJSVersion = OSF.ConstantNames.FileVersion; - appInfo.hostJSVersion = "16.0.8118.1000"; + appInfo.hostJSVersion = "16.0.8916.1000"; if (context._wacHostEnvironment) { appInfo.wacHostEnvironment = context._wacHostEnvironment; } @@ -5422,14 +5517,16 @@ OSF.EventDispatch = function OSF_EventDispatch(eventTypes) { this._eventHandlers = {}; this._objectEventHandlers = {}; this._queuedEventsArgs = {}; - for (var entry in eventTypes) { - var eventType = eventTypes[entry]; - var isObjectEvent = (eventType == "objectDeleted" || eventType == "objectSelectionChanged" || eventType == "objectDataChanged" || eventType == "contentControlAdded"); - if (!isObjectEvent) - this._eventHandlers[eventType] = []; - else - this._objectEventHandlers[eventType] = {}; - this._queuedEventsArgs[eventType] = []; + if (eventTypes != null) { + for (var i = 0; i < eventTypes.length; i++) { + var eventType = eventTypes[i]; + var isObjectEvent = (eventType == "objectDeleted" || eventType == "objectSelectionChanged" || eventType == "objectDataChanged" || eventType == "contentControlAdded"); + if (!isObjectEvent) + this._eventHandlers[eventType] = []; + else + this._objectEventHandlers[eventType] = {}; + this._queuedEventsArgs[eventType] = []; + } } }; OSF.EventDispatch.prototype = { @@ -5455,8 +5552,8 @@ OSF.EventDispatch.prototype = { hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) { var handlers = this._eventHandlers[eventType]; if (handlers && handlers.length > 0) { - for (var h in handlers) { - if (handlers[h] === handler) + for (var i = 0; i < handlers.length; i++) { + if (handlers[i] === handler) return true; } } @@ -5561,8 +5658,9 @@ OSF.EventDispatch.prototype = { var eventType = eventArgs.type; if (eventType && this._eventHandlers[eventType]) { var eventHandlers = this._eventHandlers[eventType]; - for (var handler in eventHandlers) - eventHandlers[handler](eventArgs); + for (var i = 0; i < eventHandlers.length; i++) { + eventHandlers[i](eventArgs); + } return true; } else { @@ -5659,6 +5757,9 @@ OSF.DDA.OMFactory.manufactureEventArgs = function OSF_DDA_OMFactory$manufactureE case Microsoft.Office.WebExtension.EventType.ContentControlAdded: args = new OSF.DDA.ObjectEventArgs(eventType, eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args = new OSF.DDA.RichApiMessageEventArgs(eventType, eventProperties); + break; case Microsoft.Office.WebExtension.EventType.DataNodeInserted: args = new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); break; @@ -5684,10 +5785,28 @@ OSF.DDA.OMFactory.manufactureEventArgs = function OSF_DDA_OMFactory$manufactureE args = new OSF.DDA.DialogParentEventArgs(eventProperties); break; case Microsoft.Office.WebExtension.EventType.ItemChanged: - if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlookwebapp") { + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { args = new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); target.initialize(args["initialData"]); - target.setCurrentItemNumber(args["itemNumber"].itemNumber); + if (OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "win32" || OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "mac") { + target.setCurrentItemNumber(args["itemNumber"].itemNumber); + } + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); } else { throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); @@ -5874,6 +5993,13 @@ OSF.DDA.AsyncMethodCalls.define({ "types": ["boolean"], "defaultValue": false } + }, + { + name: Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels, + value: { + "types": ["boolean"], + "defaultValue": false + } } ], privateStateCallbacks: [], @@ -5911,13 +6037,13 @@ OSF.DDA.AsyncMethodCalls.define({ if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] <= 0) { callArgs[Microsoft.Office.WebExtension.Parameters.Width] = 1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Width] = 99; } if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] <= 0) { callArgs[Microsoft.Office.WebExtension.Parameters.Height] = 1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Height] = 99; } if (!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) { @@ -7246,52 +7372,10 @@ OSF.DDA.SettingsManager = { DateJSONPrefix: "Date(", DataJSONSuffix: ")", serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) { - var ret = {}; - for (var key in settingsCollection) { - var value = settingsCollection[key]; - try { - if (JSON) { - value = JSON.stringify(value, function dateReplacer(k, v) { - return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix + this[k].getTime() + OSF.DDA.SettingsManager.DataJSONSuffix : v; - }); - } - else { - value = Sys.Serialization.JavaScriptSerializer.serialize(value); - } - ret[key] = value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.serializeSettings(settingsCollection); }, deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) { - var ret = {}; - serializedSettings = serializedSettings || {}; - for (var key in serializedSettings) { - var value = serializedSettings[key]; - try { - if (JSON) { - value = JSON.parse(value, function dateReviver(k, v) { - var d; - if (typeof v === 'string' && v && v.length > 6 && v.slice(0, 5) === OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1) === OSF.DDA.SettingsManager.DataJSONSuffix) { - d = new Date(parseInt(v.slice(5, -1))); - if (d) { - return d; - } - } - return v; - }); - } - else { - value = Sys.Serialization.JavaScriptSerializer.deserialize(value, true); - } - ret[key] = value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.deserializeSettings(serializedSettings); } }; OSF.DDA.Settings = function OSF_DDA_Settings(settings) { @@ -8187,6 +8271,51 @@ var OfficeExt; AppCommand.registerDdaFacade = registerDdaFacade; })(AppCommand = OfficeExt.AppCommand || (OfficeExt.AppCommand = {})); })(OfficeExt || (OfficeExt = {})); +OSF.DDA.AsyncMethodNames.addNames({ GetAccessTokenAsync: "getAccessTokenAsync" }); +OSF.DDA.Auth = function OSF_DDA_Auth() { +}; +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetAccessTokenAsync, + requiredArguments: [], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.ForceConsent, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, + value: { + "types": ["string"], + "defaultValue": "" + } + } + ], + onSucceeded: function (dataDescriptor, caller, callArgs) { + var data = dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + return data; + } +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetAccessTokenMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.ForceConsent, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, value: 2 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); OSF.DDA.PowerPointDocument = function OSF_DDA_PowerPointDocument(officeAppContext, settings) { OSF.DDA.PowerPointDocument.uber.constructor.call(this, officeAppContext, settings); OSF.DDA.DispIdHost.addAsyncMethods(this, [ @@ -8221,6 +8350,10 @@ OSF.InitializationHelper.prototype.prepareApiSurface = function OSF_Initializati else { appContext.ui = new OSF.DDA.UI.ParentUI(); } + if (OSF.DDA.Auth) { + appContext.auth = new OSF.DDA.Auth(); + OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth, [OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]); + } OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(appContext, appContext.doc, license)); OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.DispIdHost.getClientDelegateMethods, OSF.DDA.SafeArray.Delegate.ParameterMap)); var themeHandler = new OSF.DDA.Theming.InternalThemeHandler(); diff --git a/node_modules/@microsoft/office-js/dist/powerpoint-mac-16.00.js b/node_modules/@microsoft/office-js/dist/powerpoint-mac-16.00.js index 702f08d..cebf034 100644 --- a/node_modules/@microsoft/office-js/dist/powerpoint-mac-16.00.js +++ b/node_modules/@microsoft/office-js/dist/powerpoint-mac-16.00.js @@ -1,5 +1,5 @@ /* PowerPoint Mac specific API library */ -/* Version: 16.0.8118.1000 */ +/* Version: 16.0.8916.1000 */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ @@ -9,4 +9,4 @@ Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419. */ -var __extends=this&&this.__extends||function(b,a){for(var c in a)if(a.hasOwnProperty(c))b[c]=a[c];function d(){this.constructor=b}b.prototype=a===null?Object.create(a):(d.prototype=a.prototype,new d)},OfficeExt;(function(b){var a=function(){var a=true;function b(){}b.prototype.isMsAjaxLoaded=function(){var b="function",c="undefined";if(typeof Sys!==c&&typeof Type!==c&&Sys.StringBuilder&&typeof Sys.StringBuilder===b&&Type.registerNamespace&&typeof Type.registerNamespace===b&&Type.registerClass&&typeof Type.registerClass===b&&typeof Function._validateParams===b&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===b)return a;else return false};b.prototype.loadMsAjaxFull=function(b){var a=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(a,b)};Object.defineProperty(b.prototype,"msAjaxError",{"get":function(){var a=this;if(a._msAjaxError==null&&a.isMsAjaxLoaded())a._msAjaxError=Error;return a._msAjaxError},"set":function(a){this._msAjaxError=a},enumerable:a,configurable:a});Object.defineProperty(b.prototype,"msAjaxString",{"get":function(){var a=this;if(a._msAjaxString==null&&a.isMsAjaxLoaded())a._msAjaxString=String;return a._msAjaxString},"set":function(a){this._msAjaxString=a},enumerable:a,configurable:a});Object.defineProperty(b.prototype,"msAjaxDebug",{"get":function(){var a=this;if(a._msAjaxDebug==null&&a.isMsAjaxLoaded())a._msAjaxDebug=Sys.Debug;return a._msAjaxDebug},"set":function(a){this._msAjaxDebug=a},enumerable:a,configurable:a});return b}();b.MicrosoftAjaxFactory=a})(OfficeExt||(OfficeExt={}));var OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory,OSF=OSF||{},OfficeExt;(function(b){var a=function(){function a(a){this._internalStorage=a}a.prototype.getItem=function(a){try{return this._internalStorage&&this._internalStorage.getItem(a)}catch(b){return null}};a.prototype.setItem=function(b,a){try{this._internalStorage&&this._internalStorage.setItem(b,a)}catch(c){}};a.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(a){}};a.prototype.removeItem=function(a){try{this._internalStorage&&this._internalStorage.removeItem(a)}catch(b){}};a.prototype.getKeysWithPrefix=function(d){var b=[];try{for(var e=this._internalStorage&&this._internalStorage.length||0,a=0;a0)b.push(a);else a.tabIndex===0&&c.push(a);else c.push(a)}b=b.sort(function(d,c){var a=d.tabIndex-c.tabIndex;if(a===0)a=b.indexOf(d)-b.indexOf(c);return a});return [].concat(b,c)}return {set_entropy:function(a){if(typeof a=="string")for(var b=0;b1?f[f.length-1]:a;if(k&&b!=a){if(b.indexOf(u)>=0)b=b.split(u)[0];b=decodeURIComponent(b)}var c=p();if(!i&&c){var e=window.name.indexOf(j);if(e>d){var g=window.name.indexOf(";",e);if(g==d)g=window.name.length;var h=window.name.substring(e,g);if(b)c.setItem(h,b);else b=c.getItem(h)}}return b},getConversationId:function(){var c=window.location.search,b=a;if(c){var d=c.indexOf("&");b=d>0?c.substring(1,d):c.substr(1);if(b&&b.charAt(b.length-1)==="="){b=b.substring(0,b.length-1);if(b)b=decodeURIComponent(b)}}return b},getInfoItems:function(b){var a=b.split("$");if(typeof a[1]==h)a=b.split("|");if(typeof a[1]==h)a=b.split("%7C");return a},getXdmFieldValue:function(e,d){var b="",c=OSF.OUtil.parseXdmInfo(d);if(c){var a=OSF.OUtil.getInfoItems(c);if(a!=undefined&&a.length>=3)switch(e){case OSF.XdmFieldName.ConversationUrl:b=a[2];break;case OSF.XdmFieldName.AppId:b=a[1]}}return b},validateParamObject:function(f,e){var a=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:c},{name:"expectedProperties",type:Object,mayBeNull:c},{name:"callback",type:Function,mayBeNull:b}]);if(a)throw a;for(var d in e){a=Function._validateParameter(f[d],e[d],d);if(a)throw a}},writeProfilerMark:function(a){if(window.msWriteProfilerMark){window.msWriteProfilerMark(a);OsfMsAjaxFactory.msAjaxDebug.trace(a)}},outputDebug:function(a){typeof OsfMsAjaxFactory!==h&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(a)},defineNondefaultProperty:function(e,f,a,c){a=a||{};for(var g in c){var d=c[g];if(a[d]==undefined)a[d]=b}Object.defineProperty(e,f,a);return e},defineNondefaultProperties:function(c,a,d){a=a||{};for(var b in a)OSF.OUtil.defineNondefaultProperty(c,b,a[b],d);return c},defineEnumerableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[e])},defineEnumerableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[e])},defineMutableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[k,e,l])},defineMutableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[k,e,l])},finalizeProperties:function(e,d){d=d||{};for(var g=Object.getOwnPropertyNames(e),i=g.length,f=0;f>8;f=g&255;b[a++]=d>>2;b[a++]=(d&3)<<4|e>>4;b[a++]=(e&15)<<2|f>>6;b[a++]=f&63;if(!isNaN(g)){d=g>>8;e=i&255;f=i>>8;b[a++]=d>>2;b[a++]=(d&3)<<4|e>>4;b[a++]=(e&15)<<2|f>>6;b[a++]=f&63}if(isNaN(g))b[a-1]=64;else if(isNaN(i)){b[a-2]=64;b[a-1]=64}for(var k=0;k0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(b){if(b==a)return a;else if(!(b instanceof Object))return b;else if(Array.isArray(b)){for(var e=[],d=0;dc)return d;else if(a===0&&b)return d;else if(a===c-1&&!b)return d;if(b)return a-1;else return a+1};e=t(e);h=j?e.length-1:0;if(e.length===0)return a;while(!i&&h>=0&&hc)return d;else if(a===0&&b)return d;else if(a===c-1&&!b)return d;if(b)return a-1;else return a+1};f=t(f);k=n(f,o);e=j(f.length,k,m);if(e<0)return a;while(!i&&e>=0&&e0;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[d%16];d=Math.floor(d/16)}for(;b<32;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[Math.floor(Math.random()*16)]}return c}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(y,u,p,n,r,v,q,t,x,j,w,l,k,m,h,g,f,e,i,c,d,s,o,b){var a=this;a._id=y;a._appName=u;a._appVersion=p;a._appUILocale=n;a._dataLocale=r;a._docUrl=v;a._clientMode=q;a._settings=t;a._reason=x;a._osfControlType=j;a._eToken=w;a._correlationId=l;a._appInstanceId=k;a._touchEnabled=m;a._commerceAllowed=h;a._appMinorVersion=g;a._requirementMatrix=f;a._hostCustomMessage=e;a._hostFullVersion=i;a._isDialog=false;a._clientWindowHeight=c;a._clientWindowWidth=d;a._addinName=s;a._appDomains=o;a._dialogRequirementMatrix=b;a.get_id=function(){return this._id};a.get_appName=function(){return this._appName};a.get_appVersion=function(){return this._appVersion};a.get_appUILocale=function(){return this._appUILocale};a.get_dataLocale=function(){return this._dataLocale};a.get_docUrl=function(){return this._docUrl};a.get_clientMode=function(){return this._clientMode};a.get_bindings=function(){return this._bindings};a.get_settings=function(){return this._settings};a.get_reason=function(){return this._reason};a.get_osfControlType=function(){return this._osfControlType};a.get_eToken=function(){return this._eToken};a.get_correlationId=function(){return this._correlationId};a.get_appInstanceId=function(){return this._appInstanceId};a.get_touchEnabled=function(){return this._touchEnabled};a.get_commerceAllowed=function(){return this._commerceAllowed};a.get_appMinorVersion=function(){return this._appMinorVersion};a.get_requirementMatrix=function(){return this._requirementMatrix};a.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};a.get_hostCustomMessage=function(){return this._hostCustomMessage};a.get_hostFullVersion=function(){return this._hostFullVersion};a.get_isDialog=function(){return this._isDialog};a.get_clientWindowHeight=function(){return this._clientWindowHeight};a.get_clientWindowWidth=function(){return this._clientWindowWidth};a.get_addinName=function(){return this._addinName};a.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(b,a){if(a==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||a==Microsoft.Office.WebExtension.EventType.BindingDataChanged||a==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||a==Microsoft.Office.WebExtension.EventType.DataNodeInserted||a==Microsoft.Office.WebExtension.EventType.DataNodeReplaced)return b+"_"+a;else return a};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var a={};return {getErrorArgs:function(c){var b=a[c];if(!b)b=a[this.errorCodes.ooeInternalError];else{if(!b.name)b.name=a[this.errorCodes.ooeInternalError].name;if(!b.message)b.message=a[this.errorCodes.ooeInternalError].message}return b},addErrorMessage:function(c,b){a[c]=b},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11000,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12000,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13000,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008},initializeErrorMessages:function(b){a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:b.L_DataReadError,message:b.L_GetSelectionNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotMatchBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:b.L_DataReadError,message:b.L_InvalidGetRowColumnCounts};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:b.L_DataReadError,message:b.L_SelectionNotSupportCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:b.L_DataReadError,message:b.L_InvalidGetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:b.L_DataReadError,message:b.L_NonUniformPartialGetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:b.L_DataReadError,message:b.L_GetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:b.L_DataReadError,message:b.L_FileTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:b.L_DataReadError,message:b.L_GetDataParametersConflict};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:b.L_DataReadError,message:b.L_InvalidGetColumns};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:b.L_DataReadError,message:b.L_InvalidGetRows};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:b.L_DataReadError,message:b.L_InvalidReadForBlankRow};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:b.L_DataWriteError,message:b.L_UnsupportedDataObject};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:b.L_DataWriteError,message:b.L_CannotWriteToSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:b.L_DataWriteError,message:b.L_DataNotMatchSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:b.L_DataWriteError,message:b.L_OverwriteWorksheetData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:b.L_DataWriteError,message:b.L_DataNotMatchBindingSize};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:b.L_DataWriteError,message:b.L_InvalidSetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:b.L_InvalidFormat,message:b.L_InvalidDataFormat};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:b.L_DataWriteError,message:b.L_SetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:b.L_DataWriteError,message:b.L_NonUniformPartialSetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:b.L_DataWriteError,message:b.L_InvalidSetColumns};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:b.L_DataWriteError,message:b.L_InvalidSetRows};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:b.L_DataWriteError,message:b.L_SetDataParametersConflict};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:b.L_BindingCreationError,message:b.L_SelectionCannotBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:b.L_InvalidBindingError,message:b.L_BindingNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:b.L_BindingCreationError,message:b.L_BindingToMultipleSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidSelectionForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnThisBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:b.L_BindingCreationError,message:b.L_NamedItemNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:b.L_BindingCreationError,message:b.L_MultipleNamedItemFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidNamedItemForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:b.L_InvalidBinding,message:b.L_UnknownBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnMatrixData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:b.L_InvalidBinding,message:b.L_InvalidColumnsForBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:b.L_ReadSettingsError,message:b.L_SettingNameNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:b.L_SaveSettingsError,message:b.L_SettingsCannotSave};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:b.L_SettingsStaleError,message:b.L_SettingsAreStale};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:b.L_HostError,message:b.L_OperationNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:b.L_InternalError,message:b.L_InternalErrorDescription};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:b.L_PermissionDenied,message:b.L_DocumentReadOnly};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:b.L_EventRegistrationError,message:b.L_EventHandlerNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:b.L_InvalidAPICall,message:b.L_InvalidApiCallInContext};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:b.L_ShuttingDown,message:b.L_ShuttingDown};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:b.L_UnsupportedEnumeration,message:b.L_UnsupportedEnumerationMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:b.L_APINotSupported,message:b.L_BrowserAPINotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:b.L_APICallFailed,message:b.L_RequestTimeout};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:b.L_InvalidOrTimedOutSession,message:b.L_InvalidOrTimedOutSessionMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:b.L_APICallFailed,message:b.L_TooManyIncompleteRequests};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:b.L_APICallFailed,message:b.L_RequestTokenUnavailable};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:b.L_APICallFailed,message:b.L_ActivityLimitReached};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:b.L_APICallFailed,message:b.L_InvalidApiArgumentsMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:b.L_InvalidNode,message:b.L_CustomXmlNodeNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:b.L_CustomXmlError,message:b.L_CustomXmlError};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:b.L_CustomXmlExceedQuotaName,message:b.L_CustomXmlExceedQuotaMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:b.L_CustomXmlOutOfDateName,message:b.L_CustomXmlOutOfDateMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:b.L_CannotNavigateTo,message:b.L_CannotNavigateTo};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:b.L_SpecifiedIdNotExist,message:b.L_SpecifiedIdNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:b.L_NavOutOfBound,message:b.L_NavOutOfBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:b.L_DataWriteReminder,message:b.L_CellDataAmountBeyondLimits};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:b.L_MissingParameter,message:b.L_ElementMissing};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:b.L_InvalidValue,message:b.L_InvalidCellsValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:b.L_InvalidValue,message:b.L_InvalidTableOptionValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:b.L_InvalidValue,message:b.L_InvalidFormatValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_RowIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_ColIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:b.L_OutOfRange,message:b.L_FormatValueOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:b.L_FormattingReminder,message:b.L_CellFormatAmountBeyondLimits};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:b.L_MemoryLimit,message:b.L_CloseFileBeforeRetrieve};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:b.L_NetworkProblem,message:b.L_NetworkProblemRetrieveFile};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:b.L_InvalidValue,message:b.L_SliceSizeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:b.L_DisplayDialogError,message:b.L_DialogAlreadyOpened};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:b.L_DisplayDialogError,message:b.L_NetworkProblem};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:b.L_DialogNavigateError,message:b.L_DialogInvalidScheme};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:b.L_DisplayDialogError,message:b.L_DialogAddressNotTrusted};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:b.L_DisplayDialogError,message:b.L_DialogRequireHTTPS};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:b.L_DisplayDialogError,message:b.L_UserClickIgnore};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:b.L_DisplayDialogError,message:b.L_NewWindowCrossZoneErrorString};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:b.L_APINotSupported,message:b.L_InvalidSSOAddinMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:b.L_UserNotSignedIn,message:b.L_UserNotSignedIn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:b.L_UserAborted,message:b.L_UserAbortedMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:b.L_UnsupportedUserIdentity,message:b.L_UnsupportedUserIdentityMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:b.L_InvalidResourceUrl,message:b.L_InvalidResourceUrlMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:b.L_InvalidGrant,message:b.L_InvalidGrantMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:b.L_SSOClientError,message:b.L_SSOClientErrorMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:b.L_SSOServerError,message:b.L_SSOServerErrorMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:b.L_AddinIsAlreadyRequestingToken,message:b.L_AddinIsAlreadyRequestingTokenMessage}}}}();var OfficeExt;(function(a){var b;(function(b){var a=1.1,z=function(){function a(){}return a}();b.RequirementVersion=z;var d=function(){function a(b){var a=this;a.isSetSupported=function(d,b){if(d==undefined)return false;if(b==undefined)b=0;var f=this._setMap,e=f._sets;if(e.hasOwnProperty(d.toLowerCase())){var g=e[d.toLowerCase()];try{var a=this._getVersion(g);b=b+"";var c=this._getVersion(b);if(a.major>0&&a.major>c.major)return true;if(a.minor>0&&a.minor>0&&a.major==c.major&&a.minor>=c.minor)return true}catch(h){return false}}return false};a._getVersion=function(e){var a="version format incorrect",b=e.split("."),c=0,d=0;if(b.length<2&&isNaN(Number(e)))throw a;else{c=Number(b[0]);if(b.length>=2)d=Number(b[1]);if(isNaN(c)||isNaN(d))throw a}var f={minor:d,major:c};return f};a._setMap=b;a.isSetSupported=a.isSetSupported.bind(a)}return a}();b.RequirementMatrix=d;var c=function(){function a(a){this._addSetMap=function(a){for(var b in a)this._sets[b]=a[b]};this._sets=a}return a}();b.DefaultSetRequirement=c;var x=function(c){__extends(b,c);function b(){c.call(this,{dialogapi:a})}return b}(c);b.DefaultDialogSetRequirement=x;var f=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,excelapi:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a})}return b}(c);b.ExcelClientDefaultSetRequirement=f;var k=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({imagecoercion:a})}return b}(f);b.ExcelClientV1DefaultSetRequirement=k;var l=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.3})}return a}(c);b.OutlookClientDefaultSetRequirement=l;var h=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,compressedfile:a,customxmlparts:a,documentevents:a,file:a,htmlcoercion:a,matrixbindings:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,textfile:a,wordapi:a})}return b}(c);b.WordClientDefaultSetRequirement=h;var p=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:a})}return b}(h);b.WordClientV1DefaultSetRequirement=p;var e=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,compressedfile:a,documentevents:a,file:a,pdffile:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.PowerpointClientDefaultSetRequirement=e;var j=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({imagecoercion:a})}return b}(e);b.PowerpointClientV1DefaultSetRequirement=j;var o=function(c){__extends(b,c);function b(){c.call(this,{selection:a,textcoercion:a})}return b}(c);b.ProjectClientDefaultSetRequirement=o;var u=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,file:a})}return b}(c);b.ExcelWebDefaultSetRequirement=u;var w=function(c){__extends(b,c);function b(){c.call(this,{compressedfile:a,documentevents:a,file:a,imagecoercion:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablecoercion:a,textcoercion:a,textfile:a})}return b}(c);b.WordWebDefaultSetRequirement=w;var n=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,settings:a})}return b}(c);b.PowerpointWebDefaultSetRequirement=n;var g=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.3})}return a}(c);b.OutlookWebDefaultSetRequirement=g;var v=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,documentevents:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.SwayWebDefaultSetRequirement=v;var r=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,partialtablebindings:a,settings:a,tablebindings:a,tablecoercion:a})}return b}(c);b.AccessWebDefaultSetRequirement=r;var t=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a})}return b}(c);b.ExcelIOSDefaultSetRequirement=t;var i=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,compressedfile:a,customxmlparts:a,documentevents:a,file:a,htmlcoercion:a,matrixbindings:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,textfile:a})}return b}(c);b.WordIOSDefaultSetRequirement=i;var s=function(b){__extends(a,b);function a(){b.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return a}(i);b.WordIOSV1DefaultSetRequirement=s;var m=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,compressedfile:a,documentevents:a,file:a,pdffile:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.PowerpointIOSDefaultSetRequirement=m;var q=function(c){__extends(b,c);function b(){c.call(this,{mailbox:a})}return b}(c);b.OutlookIOSDefaultSetRequirement=q;var y=function(){var b="undefined";function a(){}a.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)};a.getDefaultRequirementMatrix=function(f){this.initializeDefaultSetMatrix();var e=undefined,g=f.get_requirementMatrix();if(g!=undefined&&g.length>0&&typeof JSON!==b){var i=JSON.parse(f.get_requirementMatrix().toLowerCase());e=new d(new c(i))}else{var h=a.getClientFullVersionString(f);if(a.DefaultSetArrayMatrix!=undefined&&a.DefaultSetArrayMatrix[h]!=undefined)e=new d(a.DefaultSetArrayMatrix[h]);else e=new d(new c({}))}return e};a.getDefaultDialogRequirementMatrix=function(f){var a=undefined,e=f.get_dialogRequirementMatrix();if(e!=undefined&&e.length>0&&typeof JSON!==b){var g=JSON.parse(f.get_requirementMatrix().toLowerCase());a=new d(new c(g))}else a=new d(new x);return a};a.getClientFullVersionString=function(a){var d=a.get_appMinorVersion(),e="",b="",c=a.get_appName(),f=c==1024||c==4096||c==8192||c==65536;if(f&&a.get_appVersion()==1)if(c==4096&&d>=15)b="16.00.01";else b="16.00";else if(a.get_appName()==64)b=a.get_appVersion();else{if(d<10)e="0"+d;else e=""+d;b=a.get_appVersion()+"."+e}return a.get_appName()+"-"+b};a.initializeDefaultSetMatrix=function(){a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1600]=new f;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1600]=new h;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1600]=new e;a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1601]=new k;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1601]=new p;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1601]=new j;a.DefaultSetArrayMatrix[a.Outlook_RCLIENT_1600]=new l;a.DefaultSetArrayMatrix[a.Excel_WAC_1600]=new u;a.DefaultSetArrayMatrix[a.Word_WAC_1600]=new w;a.DefaultSetArrayMatrix[a.Outlook_WAC_1600]=new g;a.DefaultSetArrayMatrix[a.Outlook_WAC_1601]=new g;a.DefaultSetArrayMatrix[a.Project_RCLIENT_1600]=new o;a.DefaultSetArrayMatrix[a.Access_WAC_1600]=new r;a.DefaultSetArrayMatrix[a.PowerPoint_WAC_1600]=new n;a.DefaultSetArrayMatrix[a.Excel_IOS_1600]=new t;a.DefaultSetArrayMatrix[a.SWAY_WAC_1600]=new v;a.DefaultSetArrayMatrix[a.Word_IOS_1600]=new i;a.DefaultSetArrayMatrix[a.Word_IOS_16001]=new s;a.DefaultSetArrayMatrix[a.PowerPoint_IOS_1600]=new m;a.DefaultSetArrayMatrix[a.Outlook_IOS_1600]=new q};a.Excel_RCLIENT_1600="1-16.00";a.Excel_RCLIENT_1601="1-16.01";a.Word_RCLIENT_1600="2-16.00";a.Word_RCLIENT_1601="2-16.01";a.PowerPoint_RCLIENT_1600="4-16.00";a.PowerPoint_RCLIENT_1601="4-16.01";a.Outlook_RCLIENT_1600="8-16.00";a.Excel_WAC_1600="16-16.00";a.Word_WAC_1600="32-16.00";a.Outlook_WAC_1600="64-16.00";a.Outlook_WAC_1601="64-16.01";a.Project_RCLIENT_1600="128-16.00";a.Access_WAC_1600="256-16.00";a.PowerPoint_WAC_1600="512-16.00";a.Excel_IOS_1600="1024-16.00";a.SWAY_WAC_1600="2048-16.00";a.Word_IOS_1600="4096-16.00";a.Word_IOS_16001="4096-16.00.01";a.PowerPoint_IOS_1600="8192-16.00";a.Outlook_IOS_1600="65536-16.00";a.DefaultSetArrayMatrix={};return a}();b.RequirementsMatrixFactory=y})(b=a.Requirement||(a.Requirement={}))})(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda();var OfficeExt;(function(a){var b;(function(a){var b=function(){function a(){var a=this;a.getDiagnostics=function(b){var a={host:this.getHost(),version:b||this.getDefaultVersion(),platform:this.getPlatform()};return a};a.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};a.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};a.hostInfo=OSF._OfficeAppFactory.getHostInfo();a.getHost=a.getHost.bind(a);a.getPlatform=a.getPlatform.bind(a);a.getDiagnostics=a.getDiagnostics.bind(a)}a.prototype.capitalizeFirstLetter=function(a){if(a)return a[0].toUpperCase()+a.slice(1).toLowerCase();return a};a.getInstance=function(){if(a.hostObj===undefined)a.hostObj=new a;return a.hostObj};a.prototype.getPlatform=function(){var a=this;if(a.hostInfo.hostPlatform){var b=a.hostInfo.hostPlatform.toLowerCase();if(a.platformRemappings[b])return a.platformRemappings[b]}return null};a.prototype.getHost=function(){var a=this;if(a.hostInfo.hostType){var b=a.hostInfo.hostType.toLowerCase();if(a.camelCaseMappings[b])return a.camelCaseMappings[b];b=a.capitalizeFirstLetter(a.hostInfo.hostType);if(Microsoft.Office.WebExtension.HostType[b])return Microsoft.Office.WebExtension.HostType[b]}return null};a.prototype.getDefaultVersion=function(){if(this.getHost())return "16.0.0000.0000";return null};return a}();a.Host=b})(b=a.HostName||(a.HostName={}))})(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var b,a=false;return {enableShortcut:function(){if(!a){if(window.Office)b=window.Office;else OSF.OUtil.setNamespace("Office",window);window.Office=Microsoft.Office.WebExtension;a=true}},disableShortcut:function(){if(a){if(b)window.Office=b;else OSF.OUtil.unsetNamespace("Office",window);a=false}}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(a){if(a)OSF.NamespaceManager.enableShortcut();else OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(a,b){var c;if(a&&typeof a=="string"){var d=a.indexOf("#");if(d!=-1){var h=a.substring(0,d),g=a.substring(d+1);switch(h){case "binding":case "bindings":if(g)c=new OSF.DDA.BindingPromise(g)}}}if(!c){if(b){var e=typeof b;if(e=="function"){var f={};f[Microsoft.Office.WebExtension.Parameters.Callback]=b;OSF.DDA.issueAsyncResult(f,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,e)}}else{c.onFail=b;return c}};OSF.DDA.Context=function(a,g,h,c,d){var f="requirements",b=this;OSF.OUtil.defineEnumerableProperties(b,{contentLanguage:{value:a.get_dataLocale()},displayLanguage:{value:a.get_appUILocale()},touchEnabled:{value:a.get_touchEnabled()},commerceAllowed:{value:a.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(a.get_hostFullVersion())}});h&&OSF.OUtil.defineEnumerableProperty(b,"license",{value:h});a.ui&&OSF.OUtil.defineEnumerableProperty(b,"ui",{value:a.ui});a.auth&&OSF.OUtil.defineEnumerableProperty(b,"auth",{value:a.auth});if(a.get_isDialog()){var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,f,{value:e})}else{g&&OSF.OUtil.defineEnumerableProperty(b,"document",{value:g});if(c){var i=c.displayName||"appOM";delete c.displayName;OSF.OUtil.defineEnumerableProperty(b,i,{value:c})}d&&OSF.OUtil.defineEnumerableProperty(b,"officeTheme",{"get":function(){return d()}});var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,f,{value:e})}};OSF.DDA.OutlookContext=function(c,a,d,e,b){OSF.DDA.OutlookContext.uber.constructor.call(this,c,null,d,e,b);a&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:a})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(b,c){var a;switch(b.get_clientMode()){case OSF.ClientMode.ReadOnly:a=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:a=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}c&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:c});OSF.OUtil.defineMutableProperties(this,{mode:{value:a},url:{value:b.get_docUrl()}})};OSF.DDA.JsomDocument=function(d,b,e){var a=this;OSF.DDA.JsomDocument.uber.constructor.call(a,d,e);b&&OSF.OUtil.defineEnumerableProperty(a,"bindings",{"get":function(){return b}});var c=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(a,[c.GetSelectedDataAsync,c.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(a,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{"get":function(){var a;if(OSF&&OSF._OfficeAppFactory)a=OSF._OfficeAppFactory.getContext();return a}});OSF.DDA.License=function(a){OSF.OUtil.defineEnumerableProperty(this,"value",{value:a})};OSF.DDA.ApiMethodCall=function(c,f,e,g,h){var a=this,d=c.length,b=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,h)});a.verifyArguments=function(d,f){for(var e in d){var a=d[e],c=f[e];if(a["enum"])switch(typeof c){case "string":if(OSF.OUtil.listContainsValue(a["enum"],c))break;case "undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw b()}if(a["types"])if(!OSF.OUtil.listContainsValue(a["types"],typeof c))throw b()}};a.extractRequiredArguments=function(g,l,j){if(g.lengthc+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var d,f,i=h.length-1;i>=c;i--){var g=h[i];switch(typeof g){case "object":if(d)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else d=g;break;case a:if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else f=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}d=b.fillOptions(d,j,l,k);if(f)if(d[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else d[Microsoft.Office.WebExtension.Parameters.Callback]=f;b.verifyArguments(e,d);return d}this.verifyAndExtractCall=function(e,c,a){var d=b.extractRequiredArguments(e,c,a),g=h(e,d,c,a),f=b.constructCallArgs(d,g,c,a);return f};this.processResponse=function(c,b,e,d){var a;if(c==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)if(f)a=f(b,e,d);else a=b;else if(g)a=g(c,b);else a=OSF.DDA.ErrorCodeManager.getErrorArgs(c);return a};this.getCallArgs=function(g){for(var b,d,f=g.length-1;f>=c;f--){var e=g[f];switch(typeof e){case "object":b=e;break;case a:d=e}}b=b||{};if(d)b[Microsoft.Office.WebExtension.Parameters.Callback]=d;return b}};OSF.DDA.AsyncMethodCallFactory=function(){return {manufacture:function(a){var c=a.supportedOptions?OSF.OUtil.createObject(a.supportedOptions):[],b=a.privateStateCallbacks?OSF.OUtil.createObject(a.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(a.requiredArguments||[],c,b,a.onSucceeded,a.onFailed,a.checkCallArgs,a.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(a){OSF.DDA.AsyncMethodCalls[a.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(a)};OSF.DDA.Error=function(c,a,b){OSF.OUtil.defineEnumerableProperties(this,{name:{value:c},message:{value:a},code:{value:b}})};OSF.DDA.AsyncResult=function(b,a){OSF.OUtil.defineEnumerableProperties(this,{value:{value:b[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:a?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});b[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:b[OSF.DDA.AsyncResultEnum.Properties.Context]});a&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(a[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(d,f,a){var e=d[Microsoft.Office.WebExtension.Parameters.Callback];if(e){var c={};c[OSF.DDA.AsyncResultEnum.Properties.Context]=d[Microsoft.Office.WebExtension.Parameters.AsyncContext];var b;if(f==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)c[OSF.DDA.AsyncResultEnum.Properties.Value]=a;else{b={};a=a||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);b[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=f||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=a.name||a;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=a.message||a}e(new OSF.DDA.AsyncResult(c,b))}};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(b){for(var a in b){var c={};OSF.OUtil.defineEnumerableProperties(c,{id:{value:a},displayName:{value:b[a]}});OSF.DDA.SyncMethodNames[a]=c}};OSF.DDA.SyncMethodCall=function(b,c,f,g,h){var d=b.length,a=new OSF.DDA.ApiMethodCall(b,c,f,g,h);function e(e,h,j,i){if(e.length>d+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var b,k,f=e.length-1;f>=d;f--){var g=e[f];switch(typeof g){case "object":if(b)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else b=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}b=a.fillOptions(b,h,j,i);a.verifyArguments(c,b);return b}this.verifyAndExtractCall=function(f,c,b){var d=a.extractRequiredArguments(f,c,b),h=e(f,d,c,b),g=a.constructCallArgs(d,h,c,b);return g}};OSF.DDA.SyncMethodCallFactory=function(){return {manufacture:function(a){var b=a.supportedOptions?OSF.OUtil.createObject(a.supportedOptions):[];return new OSF.DDA.SyncMethodCall(a.requiredArguments||[],b,a.privateStateCallbacks,a.checkCallArgs,a.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(a){OSF.DDA.SyncMethodCalls[a.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(a)};OSF.DDA.ListType=function(){var a={};return {setListType:function(c,b){a[c]=b},isListType:function(b){return OSF.OUtil.listContainsKey(a,b)},getDescriptor:function(b){return a[b]}}}();OSF.DDA.HostParameterMap=function(b,c){var j="fromHost",a=this,i="toHost",e=j,l="sourceData",g="self",d={};d[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(a){if(a!=null&&a.rows!==undefined){var b={};b[OSF.DDA.TableDataProperties.TableRows]=a.rows;b[OSF.DDA.TableDataProperties.TableHeaders]=a.headers;a=b}return a},fromHost:function(a){return a}};d[Microsoft.Office.WebExtension.Parameters.SampleData]=d[Microsoft.Office.WebExtension.Parameters.Data];function f(j,i){var m=j?{}:undefined;for(var h in j){var g=j[h],a;if(OSF.DDA.ListType.isListType(h)){a=[];for(var n in g)a.push(f(g[n],i))}else if(OSF.OUtil.listContainsKey(d,h))a=d[h][i](g);else if(i==e&&b.preserveNesting(h))a=f(g,i);else{var k=c[h];if(k){var l=k[i];if(l){a=l[g];if(a===undefined)a=g}}else a=g}m[h]=a}return m}function k(j,h){var e;for(var a in h){var d;if(b.isComplexType(a))d=k(j,c[a][i]);else d=j[a];if(d!=undefined){if(!e)e={};var f=h[a];if(f==g)f=a;e[f]=b.pack(a,d)}}return e}function h(j,n,f){if(!f)f={};for(var a in n){var k=n[a],d;if(k==g)d=j;else if(k==l){f[a]=j.toArray();continue}else d=j[k];if(d===null||d===undefined)f[a]=undefined;else{d=b.unpack(a,d);var i;if(b.isComplexType(a)){i=c[a][e];if(b.preserveNesting(a))f[a]=h(d,i);else h(d,i,f)}else if(OSF.DDA.ListType.isListType(a)){i={};var p=OSF.DDA.ListType.getDescriptor(a);i[p]=g;var m=new Array(d.length);for(var o in d)m[o]=h(d[o],i);f[a]=m}else f[a]=d}}return f}function m(l,e,a){var d=c[l][a],b;if(a=="toHost"){var i=f(e,a);b=k(i,d)}else if(a==j){var g=h(e,d);b=f(g,a)}return b}if(!c)c={};a.addMapping=function(l,h){var a,d;if(h.map){a=h.map;d={};for(var j in a){var k=a[j];if(k==g)k=j;d[k]=j}}else{a=h.toHost;d=h.fromHost}var b=c[l];if(b){var f=b[i];for(var n in f)a[n]=f[n];f=b[e];for(var m in f)d[m]=f[m]}else b=c[l]={};b[i]=a;b[e]=d};a.toHost=function(b,a){return m(b,a,i)};a.fromHost=function(a,b){return m(a,b,e)};a.self=g;a.sourceData=l;a.addComplexType=function(a){b.addComplexType(a)};a.getDynamicType=function(a){return b.getDynamicType(a)};a.setDynamicType=function(c,a){b.setDynamicType(c,a)};a.dynamicTypes=d;a.doMapValues=function(a,b){return f(a,b)}};OSF.DDA.SpecialProcessor=function(c,b){var a=this;a.addComplexType=function(a){c.push(a)};a.getDynamicType=function(a){return b[a]};a.setDynamicType=function(c,a){b[c]=a};a.isComplexType=function(a){return OSF.OUtil.listContainsValue(c,a)};a.isDynamicType=function(a){return OSF.OUtil.listContainsKey(b,a)};a.preserveNesting=function(b){var a=[];OSF.DDA.PropertyDescriptors&&a.push(OSF.DDA.PropertyDescriptors.Subset);if(OSF.DDA.DataNodeEventProperties)a=a.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]);return OSF.OUtil.listContainsValue(a,b)};a.pack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].toHost(d);else a=d;return a};a.unpack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].fromHost(d);else a=d;return a}};OSF.DDA.getDecoratedParameterMap=function(d,c){var a=new OSF.DDA.HostParameterMap(d),f=a.self;function b(a){var c=null;if(a){c={};for(var d=a.length,b=0;b0){for(var d=[],c=0;c=f)break;c=Function._validateParameter(i[d],h,j);if(c){c.popStackFrame();return c}}return a};if(!Function._validateParameterCount)Function._validateParameterCount=function(m,f,l){var b,e,c=f.length,g=m.length;if(gc){e=d;for(b=0;b0&&b.push(c)}}}catch(i){}return b}var c=[],b={};b[Microsoft.Office.WebExtension.Parameters.Data]=function(){var c=0,b=1;return {toHost:function(a){if(OSF.DDA.TableDataProperties&&typeof a!="string"&&a[OSF.DDA.TableDataProperties.TableRows]!==undefined){var d=[];d[c]=a[OSF.DDA.TableDataProperties.TableRows];d[b]=a[OSF.DDA.TableDataProperties.TableHeaders];a=d}return a},fromHost:function(f){var e;if(f.toArray){var g=f.dimensions();if(g===2)e=a(f);else{var d=f.toArray();if(d.length===2&&(d[0]!=null&&d[0].toArray||d[1]!=null&&d[1].toArray)){e={};e[OSF.DDA.TableDataProperties.TableRows]=a(d[c]);e[OSF.DDA.TableDataProperties.TableHeaders]=a(d[b])}else e=d}}else e=f;return e}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,c,b);this.unpack=function(c,a){var d;if(this.isComplexType(c)||OSF.DDA.ListType.isListType(c)){var e=(a||typeof a==="unknown")&&a.toArray;d=e?a.toArray():a||{}}else if(this.isDynamicType(c))d=b[c].fromHost(a);else d=a;return d}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(a){function c(a){var b=a;if(OSF.OUtil.isArray(a))for(var f=b.length,d=0;d2){c=[];for(var g=1;g-1)i="&";var s=screen.width*c.width/100,q=screen.height*c.height/100,r="width="+s+", height="+q;b[0]=b[0].concat(i).concat(n);var p=b.join(g);a.popup=window.open(p,"",r);function h(b){if(b.source==a.popup)try{var c=JSON.parse(b.data);c.dialogMessage&&e(f,[OSF.DialogMessageType.DialogMessageReceived,c.dialogMessage.messageContent])}catch(d){OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handlered. Message:"+b.data)}}function l(){try{if(a.popup==null||a.popup.closed){window.clearInterval(a.interval);window.removeEventListener("message",h);a.NotifyError=null;e(f,[OSF.DialogMessageType.DialogClosed])}}catch(b){OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed.")}}if(a.popup!=undefined&&window.dialogAPIErrorCode==undefined){window.addEventListener("message",h);a.interval=window.setInterval(l,500);function m(a){e(f,[a])}a.NotifyError=m;d(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}else{var k=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;if(window.dialogAPIErrorCode)k=window.dialogAPIErrorCode;d(k)}};a.prototype.messageParent=function(c){var b=c[Microsoft.Office.WebExtension.Parameters.MessageToParent],a={dialogMessage:{messageType:OSF.DialogMessageType.DialogMessageReceived,messageContent:b}};window.opener.postMessage(JSON.stringify(a),window.location.origin)};a.prototype.closeDialog=function(d,c,b){if(a.popup){a.interval&&window.clearInterval(a.interval);a.popup.close();a.NotifyError=null;b(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}else b(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)};a.prototype.sendMessage=function(){};return a}();b.MacRichClientHostController=a})(OfficeExt||(OfficeExt={}));OSF.ClientHostController=new OfficeExt.MacRichClientHostController;var OfficeExt;(function(a){var b;(function(c){var b=function(){var a=null;function b(){this._osfOfficeTheme=a;this._osfOfficeThemeTimeStamp=a}b.prototype.getOfficeTheme=function(){var c="GetOfficeThemeInfo",a=this;if(OSF.DDA._OsfControlContext){if(a._osfOfficeTheme&&a._osfOfficeThemeTimeStamp&&(new Date).getTime()-a._osfOfficeThemeTimeStamp40){a=OSF.OUtil.Guid.generateNewGuid();b.setValue(b.clientIDKey,a)}return a};a.prototype.saveLog=function(d,e){var b=this,a=b.getValue(b.logIdSetKey);a=(a&&a.length>0?a+";":c)+d;b.setValue(b.logIdSetKey,a);b.setValue(d,e)};a.prototype.enumerateLog=function(c,e){var a=this,d=a.getValue(a.logIdSetKey);if(d){var f=d.split(";");for(var h in f){var b=f[h],g=a.getValue(b);if(g){c&&c(b,g);e&&a.remove(b)}}e&&a.remove(a.logIdSetKey)}};a.prototype.getValue=function(d){var a=OSF.OUtil.getLocalStorage(),b=c;if(a)b=a.getItem(d);return b};a.prototype.setValue=function(c,b){var a=OSF.OUtil.getLocalStorage();a&&a.setItem(c,b)};a.prototype.remove=function(b){var a=OSF.OUtil.getLocalStorage();if(a)try{a.removeItem(b)}catch(c){}};return a}(),h=function(){function a(){}a.prototype.LogData=function(a){if(!OSF.Logger)return;OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,a.SerializeRow(),OSF.Logger.SendFlag.none);OSFAriaLogger.AriaLogger.getInstance().logData(a)};a.prototype.LogRawData=function(a){if(!OSF.Logger)return;OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,a,OSF.Logger.SendFlag.none);try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(a))}catch(b){}};return a}();function e(a){if(a)a=a.replace(/[{}]/g,c).toLowerCase();return a||c}function w(f){if(!OSF.Logger)return;if(a)return;a=new y;if(f.get_hostFullVersion())a.hostVersion=f.get_hostFullVersion();else a.hostVersion=f.get_appVersion();a.appId=f.get_id();a.host=f.get_appName();a.browser=window.navigator.userAgent;a.correlationId=e(f.get_correlationId());a.clientId=(new k).getClientId();a.appInstanceId=f.get_appInstanceId();if(a.appInstanceId)a.appInstanceId=a.appInstanceId.replace(/[{}]/g,c).toLowerCase();a.message=f.get_hostCustomMessage();a.officeJSVersion=OSF.ConstantNames.FileVersion;a.hostJSVersion="16.0.8118.1000";if(f._wacHostEnvironment)a.wacHostEnvironment=f._wacHostEnvironment;if(f._isFromWacAutomation!==undefined&&f._isFromWacAutomation!==b)a.isFromWacAutomation=f._isFromWacAutomation.toString().toLowerCase();var i=f.get_docUrl();a.docUrl=o.test(i)?i:c;var h=location.href;if(h)h=h.split("?")[0].split("#")[0];a.appURL=h;(function(i,a){var e,h,d;a.assetId=c;a.userId=c;try{e=decodeURIComponent(i);h=new DOMParser;d=h.parseFromString(e,"text/xml");var f=d.getElementsByTagName("t")[0].attributes.getNamedItem("cid"),g=d.getElementsByTagName("t")[0].attributes.getNamedItem("oid");if(f&&f.nodeValue)a.userId=f.nodeValue;else if(g&&g.nodeValue)a.userId=g.nodeValue;a.assetId=d.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(j){}finally{e=b;d=b;h=b}})(f.get_eToken(),a);(function(){var k=new Date,c=b,h=0,j=false,e=function(){if(document.hasFocus()){if(c==b)c=new Date}else if(c){h+=Math.abs((new Date).getTime()-c.getTime());c=b}},a=[];a.push(new g("focus",e));a.push(new g("blur",e));a.push(new g("focusout",e));a.push(new g("focusin",e));var i=function(){for(var e=0;e0)for(var d in a)if(a[d]===c)return true;return false},hasObjectEventHandler:function(d,e,f){var c=this._objectEventHandlers[d];if(c!=null)for(var a=c[e],b=0;a!=null&&b0)for(var b=0;b0){this._eventHandlers[a]=[];return true}return false},clearObjectEventHandlers:function(a,b){if(this._objectEventHandlers[a]!=null&&this._objectEventHandlers[a][b]!=null){this._objectEventHandlers[a][b]=[];return true}return false},getEventHandlerCount:function(a){return this._eventHandlers[a]!=undefined?this._eventHandlers[a].length:-1},getObjectEventHandlerCount:function(a,b){if(this._objectEventHandlers[a]==null||this._objectEventHandlers[a][b]==null)return 0;return this._objectEventHandlers[a][b].length},fireEvent:function(a){if(a.type==undefined)return false;var b=a.type;if(b&&this._eventHandlers[b]){var c=this._eventHandlers[b];for(var d in c)c[d](a);return true}else return false},fireObjectEvent:function(f,a){if(a.type==undefined)return false;var b=a.type;if(b&&this._objectEventHandlers[b]){var e=this._objectEventHandlers[b],c=e[f];if(c!=null){for(var d=0;d0){var d=b[0];while(c.length>0){var e=c.shift();d(e)}return true}}return false},clearQueuedEvent:function(a){if(a&&this._eventHandlers[a]){var b=this._queuedEventsArgs[a];if(b)this._queuedEventsArgs[a]=[]}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(e,c,b){var f="hostType",d=this,a;switch(e){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:a=new OSF.DDA.DocumentSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:a=new OSF.DDA.BindingSelectionChangedEventArgs(d.manufactureBinding(b,c.document),b[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:a=new OSF.DDA.BindingDataChangedEventArgs(d.manufactureBinding(b,c.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:a=new OSF.DDA.SettingsChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:a=new OSF.DDA.ActiveViewChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:a=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:a=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:a=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(b);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:a=new OSF.DDA.ObjectEventArgs(e,b[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:a=new OSF.DDA.NodeInsertedEventArgs(d.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NewNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:a=new OSF.DDA.NodeReplacedEventArgs(d.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.OldNode]),d.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NewNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:a=new OSF.DDA.NodeDeletedEventArgs(d.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.OldNode]),d.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:a=new OSF.DDA.TaskSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:a=new OSF.DDA.ResourceSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:a=new OSF.DDA.ViewSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:a=new OSF.DDA.DialogEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:a=new OSF.DDA.DialogParentEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]=="outlook"||OSF._OfficeAppFactory.getHostInfo()[f]=="outlookwebapp"){a=new OSF.DDA.OlkItemSelectedChangedEventArgs(b);c.initialize(a["initialData"]);c.setCurrentItemNumber(a["itemNumber"].itemNumber)}else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e))}return a};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:false,isWindowDialog:false};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var c=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),b=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,a=this;!a[b]&&OSF.OUtil.defineEnumerableProperty(a,b,{value:function(){var b=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];b(arguments,c,a)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(d){var b=OSF.DDA.SyncMethodNames.MessageParent.displayName,a=this;!a[b]&&OSF.OUtil.defineEnumerableProperty(a,b,{value:function(){var b=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return b(arguments,a)}});var c=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;!a[c]&&typeof OSF.DialogParentMessageEventDispatch!="undefined"&&OSF.DDA.DispIdHost.addEventSupport(a,OSF.DialogParentMessageEventDispatch,d);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(a){if(a[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived)OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:a[OSF.DDA.PropertyDescriptors.MessageContent]}});else OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:a[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:a[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:true}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:false}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:false}}],privateStateCallbacks:[],onSucceeded:function(c){var g=c[Microsoft.Office.WebExtension.Parameters.Id],b=c[Microsoft.Office.WebExtension.Parameters.Data],a=new OSF.DialogHandler,d=OSF.DDA.AsyncMethodNames.CloseAsync.displayName;OSF.OUtil.defineEnumerableProperty(a,d,{value:function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];c(arguments,g,b,a)}});var f=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;OSF.OUtil.defineEnumerableProperty(a,f,{value:function(){var d=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],c=d.verifyAndExtractCall(arguments,a,b),e=c[Microsoft.Office.WebExtension.Parameters.EventType],f=c[Microsoft.Office.WebExtension.Parameters.Handler];return b.addEventHandlerAndFireQueuedEvent(e,f)}});var e=OSF.DDA.SyncMethodNames.SendMessage.displayName;OSF.OUtil.defineEnumerableProperty(a,e,{value:function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return c(arguments,b,a)}});return a},checkCallArgs:function(a){if(a[Microsoft.Office.WebExtension.Parameters.Width]<=0)a[Microsoft.Office.WebExtension.Parameters.Width]=1;if(a[Microsoft.Office.WebExtension.Parameters.Width]>100)a[Microsoft.Office.WebExtension.Parameters.Width]=99;if(a[Microsoft.Office.WebExtension.Parameters.Height]<=0)a[Microsoft.Office.WebExtension.Parameters.Height]=1;if(a[Microsoft.Office.WebExtension.Parameters.Height]>100)a[Microsoft.Office.WebExtension.Parameters.Height]=99;if(!a[Microsoft.Office.WebExtension.Parameters.RequireHTTPs])a[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=true;return a}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(a){try{a.onCalling&&a.onCalling();var c=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true,a);OSF.ClientHostController.openDialog(a.dispId,a.targetId,function(c,b){a.onEvent&&a.onEvent(b);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(a.dispId)},c)}catch(b){OSF.DDA.SafeArray.Delegate._onException(b,a)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(a){a.onCalling&&a.onCalling();var c=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false,a);try{OSF.ClientHostController.closeDialog(a.dispId,a.targetId,c)}catch(b){OSF.DDA.SafeArray.Delegate._onException(b,a)}};OSF.DDA.SafeArray.Delegate.messageParent=function(a){try{a.onCalling&&a.onCalling();var d=(new Date).getTime(),b=OSF.ClientHostController.messageParent(a.hostCallArgs);a.onReceiving&&a.onReceiving();OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(a.dispId,a.hostCallArgs,Math.abs((new Date).getTime()-d),b);return b}catch(c){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(c)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:true});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:true});OSF.DDA.SafeArray.Delegate.sendMessage=function(a){try{a.onCalling&&a.onCalling();var d=(new Date).getTime(),c=OSF.ClientHostController.sendMessage(a.hostCallArgs);a.onReceiving&&a.onReceiving();return c}catch(b){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(b)}};Microsoft.Office.WebExtension.BindingType={Table:"table",Text:"text",Matrix:"matrix"};OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType};OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{BindingList:"BindingList"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{Subset:"subset",BindingProperties:"BindingProperties"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList,OSF.DDA.PropertyDescriptors.BindingProperties);OSF.DDA.BindingPromise=function(b,a){this._id=b;OSF.OUtil.defineEnumerableProperty(this,"onFail",{"get":function(){return a},"set":function(c){var b=typeof c;if(b!="undefined"&&b!="function")throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,b);a=c}})};OSF.DDA.BindingPromise.prototype={_fetch:function(b){var a=this;if(a.binding)b&&b(a.binding);else if(!a._binding){var c=a;Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(a._id,function(a){if(a.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded){OSF.OUtil.defineEnumerableProperty(c,"binding",{value:a.value});b&&b(c.binding)}else c.onFail&&c.onFail(a)})}return a},getDataAsync:function(){var a=arguments;this._fetch(function(b){b.getDataAsync.apply(b,a)});return this},setDataAsync:function(){var a=arguments;this._fetch(function(b){b.setDataAsync.apply(b,a)});return this},addHandlerAsync:function(){var a=arguments;this._fetch(function(b){b.addHandlerAsync.apply(b,a)});return this},removeHandlerAsync:function(){var a=arguments;this._fetch(function(b){b.removeHandlerAsync.apply(b,a)});return this}};OSF.DDA.BindingFacade=function(b){this._eventDispatches=[];OSF.OUtil.defineEnumerableProperty(this,"document",{value:b});var a=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[a.AddFromSelectionAsync,a.AddFromNamedItemAsync,a.GetAllAsync,a.GetByIdAsync,a.ReleaseByIdAsync])};OSF.DDA.UnknownBinding=function(b,a){OSF.OUtil.defineEnumerableProperties(this,{document:{value:a},id:{value:b}})};OSF.DDA.Binding=function(a,c){OSF.OUtil.defineEnumerableProperties(this,{document:{value:c},id:{value:a}});var d=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[d.GetDataAsync,d.SetDataAsync]);var e=Microsoft.Office.WebExtension.EventType,b=c.bindings._eventDispatches;if(!b[a])b[a]=new OSF.EventDispatch([e.BindingSelectionChanged,e.BindingDataChanged]);var f=b[a];OSF.DDA.DispIdHost.addEventSupport(this,f)};OSF.DDA.generateBindingId=function(){return "UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+(new Date).getTime()};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureBinding=function(a,c){var d=a[OSF.DDA.BindingProperties.Id],g=a[OSF.DDA.BindingProperties.RowCount],f=a[OSF.DDA.BindingProperties.ColumnCount],h=a[OSF.DDA.BindingProperties.HasHeaders],b;switch(a[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:b=new OSF.DDA.TextBinding(d,c);break;case Microsoft.Office.WebExtension.BindingType.Matrix:b=new OSF.DDA.MatrixBinding(d,c,g,f);break;case Microsoft.Office.WebExtension.BindingType.Table:var i=function(){return OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument},e;if(i()&&OSF.DDA.ExcelTableBinding)e=OSF.DDA.ExcelTableBinding;else e=OSF.DDA.TableBinding;b=new e(d,c,g,f,h);break;default:b=new OSF.DDA.UnknownBinding(d,c)}return b};OSF.DDA.AsyncMethodNames.addNames({AddFromSelectionAsync:"addFromSelectionAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:"getByIdAsync",ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync"});(function(){var d="number",c="object",b="string",a=null;function e(a){return OSF.DDA.OMFactory.manufactureBinding(a,Microsoft.Office.WebExtension.context.document)}function f(a){return a.id}function g(c,e,d){var b=c[Microsoft.Office.WebExtension.Parameters.Data];if(OSF.DDA.TableDataProperties&&b&&(b[OSF.DDA.TableDataProperties.TableRows]!=undefined||b[OSF.DDA.TableDataProperties.TableHeaders]!=undefined))b=OSF.DDA.OMFactory.manufactureTableData(b);b=OSF.DDA.DataCoercion.coerceData(b,d[Microsoft.Office.WebExtension.Parameters.CoercionType]);return b==undefined?a:b}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[b],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[c],defaultValue:a}}],privateStateCallbacks:[],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:[b]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[b],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[c],defaultValue:a}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return true}}],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(a){return OSF.OUtil.mapList(a[OSF.DDA.ListDescriptors.BindingList],e)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[b]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[b]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(d,b,a){var c=a[Microsoft.Office.WebExtension.Parameters.Id];delete b._eventDispatches[c]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(b,a){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(a.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[c,b],defaultValue:a}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[c],defaultValue:a}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[d],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[d],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:[d],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:[d],defaultValue:0}}],checkCallArgs:function(a,b){if(a[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&a[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&a[Microsoft.Office.WebExtension.Parameters.RowCount]==0&&a[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0){delete a[Microsoft.Office.WebExtension.Parameters.StartRow];delete a[Microsoft.Office.WebExtension.Parameters.StartColumn];delete a[Microsoft.Office.WebExtension.Parameters.RowCount];delete a[Microsoft.Office.WebExtension.Parameters.ColumnCount]}if(a[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(b.type)&&(a[Microsoft.Office.WebExtension.Parameters.StartRow]||a[Microsoft.Office.WebExtension.Parameters.StartColumn]||a[Microsoft.Office.WebExtension.Parameters.RowCount]||a[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return a},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}],onSucceeded:g});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[b,c,d,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(a){return OSF.DDA.DataCoercion.determineCoercionType(a[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[c,b],defaultValue:a}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[c],defaultValue:a}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[d],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[d],defaultValue:0}}],checkCallArgs:function(a,b){if(a[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&a[Microsoft.Office.WebExtension.Parameters.StartColumn]==0){delete a[Microsoft.Office.WebExtension.Parameters.StartRow];delete a[Microsoft.Office.WebExtension.Parameters.StartColumn]}if(a[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(b.type)&&(a[Microsoft.Office.WebExtension.Parameters.StartRow]||a[Microsoft.Office.WebExtension.Parameters.StartColumn]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return a},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}]})})();Microsoft.Office.WebExtension.TableData=function(b,a){function c(a){if(a==null||a==undefined)return null;try{for(var b=OSF.DDA.DataCoercion.findArrayDimensionality(a,2);b<2;b++)a=[a];return a}catch(c){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{"get":function(){return a},"set":function(b){a=c(b)}},rows:{"get":function(){return b},"set":function(a){b=a==null||OSF.OUtil.isArray(a)&&a.length==0?[]:c(a)}}});this.headers=a;this.rows=b};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(a){return new Microsoft.Office.WebExtension.TableData(a[OSF.DDA.TableDataProperties.TableRows],a[OSF.DDA.TableDataProperties.TableHeaders])};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{TableDataProperties:"TableDataProperties"});OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};OSF.DDA.TableBinding=function(f,e,d,c,b){OSF.DDA.TableBinding.uber.constructor.call(this,f,e);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:d?d:0},columnCount:{value:c?c:0},hasHeaders:{value:b?b:false}});var a=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[a.AddRowsAsync,a.AddColumnsAsync,a.DeleteAllDataValuesAsync])};OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync"});(function(){function a(a){return a.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:a}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:a}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:a}]})})();Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var a=null;return {findArrayDimensionality:function(c){if(OSF.OUtil.isArray(c)){for(var b=0,a=0;a4*1024*1024)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return b},onSucceeded:function(a,c,b){return new OSF.DDA.File(a[OSF.DDA.FileProperties.Handle],a[OSF.DDA.FileProperties.FileSize],b[Microsoft.Office.WebExtension.Parameters.SliceSize])}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(b,a){return a[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(b,a){return a[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(a,d,c){var b=a[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(b<0||b>=d.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;a[OSF.DDA.FileSliceOffset]=parseInt((b*c[OSF.DDA.FileProperties.SliceSize]).toString());return a},onSucceeded:function(a,d,c){var b={};OSF.OUtil.defineEnumerableProperties(b,{data:{value:OSF.OUtil.shallowCopy(a[Microsoft.Office.WebExtension.Parameters.Data])},index:{value:c[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:a[OSF.DDA.FileProperties.SliceSize]}});return b}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(b,a){return a[OSF.DDA.FileProperties.Handle]}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileProperties.FileSize,value:1}],isComplexType:true});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0},{name:OSF.DDA.FileProperties.SliceSize,value:1}],isComplexType:true});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:0},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:5},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:6}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:0}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileSliceOffset,value:1},{name:OSF.DDA.FileProperties.SliceSize,value:2}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0}]});OSF.DDA.AsyncMethodNames.addNames({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync"});(function(){var c=false,b="boolean",a="number";function d(b,d,c){var a=b[Microsoft.Office.WebExtension.Parameters.Data];if(OSF.DDA.TableDataProperties&&a&&(a[OSF.DDA.TableDataProperties.TableRows]!=undefined||a[OSF.DDA.TableDataProperties.TableHeaders]!=undefined))a=OSF.DDA.OMFactory.manufactureTableData(a);a=OSF.DDA.DataCoercion.coerceData(a,c[Microsoft.Office.WebExtension.Parameters.CoercionType]);return a==undefined?null:a}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,"enum":Microsoft.Office.WebExtension.CoercionType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}}],privateStateCallbacks:[],onSucceeded:d});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object",a,b]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(a){return OSF.DDA.DataCoercion.determineCoercionType(a[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:[a,b],defaultValue:c}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:[a,b],defaultValue:c}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[a,b],defaultValue:c}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[a,b],defaultValue:c}}],privateStateCallbacks:[]})})();OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:1},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:2},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:3},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:4},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:5}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:0},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:1},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:2},{name:Microsoft.Office.WebExtension.GoToType.Index,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:0},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:1},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:1},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:2}]});OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",RefreshingSettings:"refreshingSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(b){var d={};for(var c in b){var a=b[c];try{if(JSON)a=JSON.stringify(a,function(a,b){return OSF.OUtil.isDate(this[a])?OSF.DDA.SettingsManager.DateJSONPrefix+this[a].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix:b});else a=Sys.Serialization.JavaScriptSerializer.serialize(a);d[c]=a}catch(e){}}return d},deserializeSettings:function(b){var d={};b=b||{};for(var c in b){var a=b[c];try{if(JSON)a=JSON.parse(a,function(c,a){var b;if(typeof a==="string"&&a&&a.length>6&&a.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&a.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix){b=new Date(parseInt(a.slice(5,-1)));if(b)return b}return a});else a=Sys.Serialization.JavaScriptSerializer.deserialize(a,true);d[c]=a}catch(e){}}return d}};OSF.DDA.Settings=function(a){var b="name";a=a||{};var c=function(d){var b=OSF.OUtil.getSessionStorage();if(b){var a=OSF.DDA.SettingsManager.serializeSettings(d),c=JSON?JSON.stringify(a):Sys.Serialization.JavaScriptSerializer.serialize(a);b.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),c)}};OSF.OUtil.defineEnumerableProperties(this,{"get":{value:function(e){var d=Function._validateParams(arguments,[{name:b,type:String,mayBeNull:false}]);if(d)throw d;var c=a[e];return typeof c==="undefined"?null:c}},"set":{value:function(f,e){var d=Function._validateParams(arguments,[{name:b,type:String,mayBeNull:false},{name:"value",mayBeNull:true}]);if(d)throw d;a[f]=e;c(a)}},remove:{value:function(e){var d=Function._validateParams(arguments,[{name:b,type:String,mayBeNull:false}]);if(d)throw d;delete a[e];c(a)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],a)};OSF.DDA.RefreshableSettings=function(a){OSF.DDA.RefreshableSettings.uber.constructor.call(this,a);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],a);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:a}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(b,a){return a}}],onSucceeded:function(d,a,e){var f=d[OSF.DDA.SettingsManager.SerializedSettings],c=OSF.DDA.SettingsManager.deserializeSettings(f),g=e[OSF.DDA.SettingsManager.RefreshingSettings];for(var b in g)a.remove(b);for(var b in c)a.set(b,c[b]);return a}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:true}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(b,a){return OSF.DDA.SettingsManager.serializeSettings(a)}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});OSF.DDA.AsyncMethodNames.addNames({GetOfficeThemeAsync:"getOfficeThemeAsync",GetDocumentThemeAsync:"getDocumentThemeAsync"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{OfficeThemeChanged:"officeThemeChanged",DocumentThemeChanged:"documentThemeChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.Parameters,{DocumentTheme:"documentTheme",OfficeTheme:"officeTheme"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DocumentThemeChangedEvent:"DocumentThemeChangedEvent",OfficeThemeChangedEvent:"OfficeThemeChangedEvent"});OSF.OUtil.setNamespace("Theming",OSF.DDA);OSF.DDA.Theming.OfficeThemeEnum={PrimaryFontColor:"primaryFontColor",PrimaryBackgroundColor:"primaryBackgroundColor",SecondaryFontColor:"secondaryFontColor",SecondaryBackgroundColor:"secondaryBackgroundColor"};OSF.DDA.Theming.DocumentThemeEnum={PrimaryFontColor:"primaryFontColor",PrimaryBackgroundColor:"primaryBackgroundColor",SecondaryFontColor:"secondaryFontColor",SecondaryBackgroundColor:"secondaryBackgroundColor",Accent1:"accent1",Accent2:"accent2",Accent3:"accent3",Accent4:"accent4",Accent5:"accent5",Accent6:"accent6",Hyperlink:"hyperlink",FollowedHyperlink:"followedHyperlink",HeaderLatinFont:"headerLatinFont",HeaderEastAsianFont:"headerEastAsianFont",HeaderScriptFont:"headerScriptFont",HeaderLocalizedFont:"headerLocalizedFont",BodyLatinFont:"bodyLatinFont",BodyEastAsianFont:"bodyEastAsianFont",BodyScriptFont:"bodyScriptFont",BodyLocalizedFont:"bodyLocalizedFont"};OSF.DDA.Theming.ConvertToDocumentTheme=function(f){var b=false,a=true;for(var d=[{name:"primaryFontColor",needToConvertToHex:a},{name:"primaryBackgroundColor",needToConvertToHex:a},{name:"secondaryFontColor",needToConvertToHex:a},{name:"secondaryBackgroundColor",needToConvertToHex:a},{name:"accent1",needToConvertToHex:a},{name:"accent2",needToConvertToHex:a},{name:"accent3",needToConvertToHex:a},{name:"accent4",needToConvertToHex:a},{name:"accent5",needToConvertToHex:a},{name:"accent6",needToConvertToHex:a},{name:"hyperlink",needToConvertToHex:a},{name:"followedHyperlink",needToConvertToHex:a},{name:"headerLatinFont",needToConvertToHex:b},{name:"headerEastAsianFont",needToConvertToHex:b},{name:"headerScriptFont",needToConvertToHex:b},{name:"headerLocalizedFont",needToConvertToHex:b},{name:"bodyLatinFont",needToConvertToHex:b},{name:"bodyEastAsianFont",needToConvertToHex:b},{name:"bodyScriptFont",needToConvertToHex:b},{name:"bodyLocalizedFont",needToConvertToHex:b}],e={},c=0;c0)b.push(a);else a.tabIndex===0&&c.push(a);else c.push(a)}b=b.sort(function(d,c){var a=d.tabIndex-c.tabIndex;if(a===0)a=b.indexOf(d)-b.indexOf(c);return a});return [].concat(b,c)}return {set_entropy:function(a){if(typeof a=="string")for(var b=0;b6&&a.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&a.slice(c)===OSF.DDA.SettingsManager.DataJSONSuffix){b=new Date(parseInt(a.slice(5,c)));if(b)return b}return a});else a=Sys.Serialization.JavaScriptSerializer.deserialize(a,b);f[e]=a}catch(g){}}return f},loadScript:function(f,g,h){if(f&&g){var k=window.document,c=s[f];if(!c){var e=k.createElement("script");e.type="text/javascript";c={loaded:d,pendingCallbacks:[g],timer:a};s[f]=c;var i=function(){if(c.timer!=a){clearTimeout(c.timer);delete c.timer}c.loaded=b;for(var e=c.pendingCallbacks.length,d=0;d1?f[f.length-1]:a;if(k&&b!=a){if(b.indexOf(v)>=0)b=b.split(v)[0];b=decodeURIComponent(b)}var d=q();if(!i&&d){var e=window.name.indexOf(j);if(e>c){var g=window.name.indexOf(";",e);if(g==c)g=window.name.length;var h=window.name.substring(e,g);if(b)d.setItem(h,b);else b=d.getItem(h)}}return b},getConversationId:function(){var c=window.location.search,b=a;if(c){var d=c.indexOf("&");b=d>0?c.substring(1,d):c.substr(1);if(b&&b.charAt(b.length-1)==="="){b=b.substring(0,b.length-1);if(b)b=decodeURIComponent(b)}}return b},getInfoItems:function(b){var a=b.split("$");if(typeof a[1]==i)a=b.split("|");if(typeof a[1]==i)a=b.split("%7C");return a},getXdmFieldValue:function(f,d){var b=e,c=OSF.OUtil.parseXdmInfo(d);if(c){var a=OSF.OUtil.getInfoItems(c);if(a!=undefined&&a.length>=3)switch(f){case OSF.XdmFieldName.ConversationUrl:b=a[2];break;case OSF.XdmFieldName.AppId:b=a[1]}}return b},validateParamObject:function(f,e){var a=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:d},{name:"expectedProperties",type:Object,mayBeNull:d},{name:"callback",type:Function,mayBeNull:b}]);if(a)throw a;for(var c in e){a=Function._validateParameter(f[c],e[c],c);if(a)throw a}},writeProfilerMark:function(a){if(window.msWriteProfilerMark){window.msWriteProfilerMark(a);OsfMsAjaxFactory.msAjaxDebug.trace(a)}},outputDebug:function(a){typeof OsfMsAjaxFactory!==i&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(a)},defineNondefaultProperty:function(e,f,a,c){a=a||{};for(var g in c){var d=c[g];if(a[d]==undefined)a[d]=b}Object.defineProperty(e,f,a);return e},defineNondefaultProperties:function(c,a,d){a=a||{};for(var b in a)OSF.OUtil.defineNondefaultProperty(c,b,a[b],d);return c},defineEnumerableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[f])},defineEnumerableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[f])},defineMutableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[m,f,n])},defineMutableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[m,f,n])},finalizeProperties:function(e,c){c=c||{};for(var g=Object.getOwnPropertyNames(e),i=g.length,f=0;f>8;g=h&255;b[a++]=d>>2;b[a++]=(d&3)<<4|f>>4;b[a++]=(f&15)<<2|g>>6;b[a++]=g&63;if(!isNaN(h)){d=h>>8;f=j&255;g=j>>8;b[a++]=d>>2;b[a++]=(d&3)<<4|f>>4;b[a++]=(f&15)<<2|g>>6;b[a++]=g&63}if(isNaN(h))b[a-1]=64;else if(isNaN(j)){b[a-2]=64;b[a-1]=64}for(var l=0;l0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(b){if(b==a)return a;else if(!(b instanceof Object))return b;else if(Array.isArray(b)){for(var e=[],d=0;dd)return c;else if(a===0&&b)return c;else if(a===d-1&&!b)return c;if(b)return a-1;else return a+1};e=u(e);g=j?e.length-1:0;if(e.length===0)return a;while(!i&&g>=0&&gd)return c;else if(a===0&&b)return c;else if(a===d-1&&!b)return c;if(b)return a-1;else return a+1};f=u(f);k=n(f,o);e=j(f.length,k,m);if(e<0)return a;while(!i&&e>=0&&e0;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[d%16];d=Math.floor(d/16)}for(;b<32;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[Math.floor(Math.random()*16)]}return c}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3};OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611,WordAndroid:8388613,PowerpointAndroid:8388614};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(y,u,p,n,r,v,q,t,x,j,w,l,k,m,h,g,f,e,i,c,d,s,o,b){var a=this;a._id=y;a._appName=u;a._appVersion=p;a._appUILocale=n;a._dataLocale=r;a._docUrl=v;a._clientMode=q;a._settings=t;a._reason=x;a._osfControlType=j;a._eToken=w;a._correlationId=l;a._appInstanceId=k;a._touchEnabled=m;a._commerceAllowed=h;a._appMinorVersion=g;a._requirementMatrix=f;a._hostCustomMessage=e;a._hostFullVersion=i;a._isDialog=false;a._clientWindowHeight=c;a._clientWindowWidth=d;a._addinName=s;a._appDomains=o;a._dialogRequirementMatrix=b;a.get_id=function(){return this._id};a.get_appName=function(){return this._appName};a.get_appVersion=function(){return this._appVersion};a.get_appUILocale=function(){return this._appUILocale};a.get_dataLocale=function(){return this._dataLocale};a.get_docUrl=function(){return this._docUrl};a.get_clientMode=function(){return this._clientMode};a.get_bindings=function(){return this._bindings};a.get_settings=function(){return this._settings};a.get_reason=function(){return this._reason};a.get_osfControlType=function(){return this._osfControlType};a.get_eToken=function(){return this._eToken};a.get_correlationId=function(){return this._correlationId};a.get_appInstanceId=function(){return this._appInstanceId};a.get_touchEnabled=function(){return this._touchEnabled};a.get_commerceAllowed=function(){return this._commerceAllowed};a.get_appMinorVersion=function(){return this._appMinorVersion};a.get_requirementMatrix=function(){return this._requirementMatrix};a.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};a.get_hostCustomMessage=function(){return this._hostCustomMessage};a.get_hostFullVersion=function(){return this._hostFullVersion};a.get_isDialog=function(){return this._isDialog};a.get_clientWindowHeight=function(){return this._clientWindowHeight};a.get_clientWindowWidth=function(){return this._clientWindowWidth};a.get_addinName=function(){return this._addinName};a.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",Reserved:"reserved",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData",Base64:"base64"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(b,a){if(a==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||a==Microsoft.Office.WebExtension.EventType.BindingDataChanged||a==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||a==Microsoft.Office.WebExtension.EventType.DataNodeInserted||a==Microsoft.Office.WebExtension.EventType.DataNodeReplaced)return b+"_"+a;else return a};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidOpenBrowserWindow:102,dispidCreateDocumentMethod:105,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var a={};return {getErrorArgs:function(c){var b=a[c];if(!b)b=a[this.errorCodes.ooeInternalError];else{if(!b.name)b.name=a[this.errorCodes.ooeInternalError].name;if(!b.message)b.message=a[this.errorCodes.ooeInternalError].message}return b},addErrorMessage:function(c,b){a[c]=b},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11000,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12000,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13000,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010},initializeErrorMessages:function(b){a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:b.L_DataReadError,message:b.L_GetSelectionNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotMatchBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:b.L_DataReadError,message:b.L_InvalidGetRowColumnCounts};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:b.L_DataReadError,message:b.L_SelectionNotSupportCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:b.L_DataReadError,message:b.L_InvalidGetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:b.L_DataReadError,message:b.L_NonUniformPartialGetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:b.L_DataReadError,message:b.L_GetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:b.L_DataReadError,message:b.L_FileTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:b.L_DataReadError,message:b.L_GetDataParametersConflict};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:b.L_DataReadError,message:b.L_InvalidGetColumns};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:b.L_DataReadError,message:b.L_InvalidGetRows};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:b.L_DataReadError,message:b.L_InvalidReadForBlankRow};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:b.L_DataWriteError,message:b.L_UnsupportedDataObject};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:b.L_DataWriteError,message:b.L_CannotWriteToSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:b.L_DataWriteError,message:b.L_DataNotMatchSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:b.L_DataWriteError,message:b.L_OverwriteWorksheetData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:b.L_DataWriteError,message:b.L_DataNotMatchBindingSize};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:b.L_DataWriteError,message:b.L_InvalidSetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:b.L_InvalidFormat,message:b.L_InvalidDataFormat};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:b.L_DataWriteError,message:b.L_SetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:b.L_DataWriteError,message:b.L_NonUniformPartialSetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:b.L_DataWriteError,message:b.L_InvalidSetColumns};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:b.L_DataWriteError,message:b.L_InvalidSetRows};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:b.L_DataWriteError,message:b.L_SetDataParametersConflict};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:b.L_BindingCreationError,message:b.L_SelectionCannotBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:b.L_InvalidBindingError,message:b.L_BindingNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:b.L_BindingCreationError,message:b.L_BindingToMultipleSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidSelectionForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnThisBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:b.L_BindingCreationError,message:b.L_NamedItemNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:b.L_BindingCreationError,message:b.L_MultipleNamedItemFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidNamedItemForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:b.L_InvalidBinding,message:b.L_UnknownBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnMatrixData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:b.L_InvalidBinding,message:b.L_InvalidColumnsForBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:b.L_ReadSettingsError,message:b.L_SettingNameNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:b.L_SaveSettingsError,message:b.L_SettingsCannotSave};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:b.L_SettingsStaleError,message:b.L_SettingsAreStale};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:b.L_HostError,message:b.L_OperationNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:b.L_InternalError,message:b.L_InternalErrorDescription};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:b.L_PermissionDenied,message:b.L_DocumentReadOnly};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:b.L_EventRegistrationError,message:b.L_EventHandlerNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:b.L_InvalidAPICall,message:b.L_InvalidApiCallInContext};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:b.L_ShuttingDown,message:b.L_ShuttingDown};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:b.L_UnsupportedEnumeration,message:b.L_UnsupportedEnumerationMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:b.L_APINotSupported,message:b.L_BrowserAPINotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:b.L_APICallFailed,message:b.L_RequestTimeout};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:b.L_InvalidOrTimedOutSession,message:b.L_InvalidOrTimedOutSessionMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:b.L_APICallFailed,message:b.L_TooManyIncompleteRequests};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:b.L_APICallFailed,message:b.L_RequestTokenUnavailable};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:b.L_APICallFailed,message:b.L_ActivityLimitReached};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:b.L_APICallFailed,message:b.L_InvalidApiArgumentsMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:b.L_InvalidNode,message:b.L_CustomXmlNodeNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:b.L_CustomXmlError,message:b.L_CustomXmlError};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:b.L_CustomXmlExceedQuotaName,message:b.L_CustomXmlExceedQuotaMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:b.L_CustomXmlOutOfDateName,message:b.L_CustomXmlOutOfDateMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:b.L_CannotNavigateTo,message:b.L_CannotNavigateTo};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:b.L_SpecifiedIdNotExist,message:b.L_SpecifiedIdNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:b.L_NavOutOfBound,message:b.L_NavOutOfBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:b.L_DataWriteReminder,message:b.L_CellDataAmountBeyondLimits};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:b.L_MissingParameter,message:b.L_ElementMissing};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:b.L_InvalidValue,message:b.L_InvalidCellsValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:b.L_InvalidValue,message:b.L_InvalidTableOptionValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:b.L_InvalidValue,message:b.L_InvalidFormatValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_RowIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_ColIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:b.L_OutOfRange,message:b.L_FormatValueOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:b.L_FormattingReminder,message:b.L_CellFormatAmountBeyondLimits};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:b.L_MemoryLimit,message:b.L_CloseFileBeforeRetrieve};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:b.L_NetworkProblem,message:b.L_NetworkProblemRetrieveFile};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:b.L_InvalidValue,message:b.L_SliceSizeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:b.L_DisplayDialogError,message:b.L_DialogAlreadyOpened};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:b.L_DisplayDialogError,message:b.L_NetworkProblem};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:b.L_DialogNavigateError,message:b.L_DialogInvalidScheme};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:b.L_DisplayDialogError,message:b.L_DialogAddressNotTrusted};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:b.L_DisplayDialogError,message:b.L_DialogRequireHTTPS};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:b.L_DisplayDialogError,message:b.L_UserClickIgnore};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:b.L_DisplayDialogError,message:b.L_NewWindowCrossZoneErrorString};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:b.L_APINotSupported,message:b.L_InvalidSSOAddinMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:b.L_UserNotSignedIn,message:b.L_UserNotSignedIn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:b.L_UserAborted,message:b.L_UserAbortedMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:b.L_UnsupportedUserIdentity,message:b.L_UnsupportedUserIdentityMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:b.L_InvalidResourceUrl,message:b.L_InvalidResourceUrlMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:b.L_InvalidGrant,message:b.L_InvalidGrantMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:b.L_SSOClientError,message:b.L_SSOClientErrorMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:b.L_SSOServerError,message:b.L_SSOServerErrorMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:b.L_AddinIsAlreadyRequestingToken,message:b.L_AddinIsAlreadyRequestingTokenMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:b.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:b.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:b.L_SSOConnectionLostError,message:b.L_SSOConnectionLostErrorMessage}}}}();var OfficeExt;(function(a){var b;(function(b){var a=1.1,z=function(){function a(){}return a}();b.RequirementVersion=z;var d=function(){function a(b){var a=this;a.isSetSupported=function(d,b){if(d==undefined)return false;if(b==undefined)b=0;var f=this._setMap,e=f._sets;if(e.hasOwnProperty(d.toLowerCase())){var g=e[d.toLowerCase()];try{var a=this._getVersion(g);b=b+"";var c=this._getVersion(b);if(a.major>0&&a.major>c.major)return true;if(a.minor>0&&a.minor>0&&a.major==c.major&&a.minor>=c.minor)return true}catch(h){return false}}return false};a._getVersion=function(e){var a="version format incorrect",b=e.split("."),c=0,d=0;if(b.length<2&&isNaN(Number(e)))throw a;else{c=Number(b[0]);if(b.length>=2)d=Number(b[1]);if(isNaN(c)||isNaN(d))throw a}var f={minor:d,major:c};return f};a._setMap=b;a.isSetSupported=a.isSetSupported.bind(a)}return a}();b.RequirementMatrix=d;var c=function(){function a(a){this._addSetMap=function(a){for(var b in a)this._sets[b]=a[b]};this._sets=a}return a}();b.DefaultSetRequirement=c;var x=function(c){__extends(b,c);function b(){c.call(this,{dialogapi:a})}return b}(c);b.DefaultDialogSetRequirement=x;var f=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,excelapi:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a})}return b}(c);b.ExcelClientDefaultSetRequirement=f;var k=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({imagecoercion:a})}return b}(f);b.ExcelClientV1DefaultSetRequirement=k;var l=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.3})}return a}(c);b.OutlookClientDefaultSetRequirement=l;var h=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,compressedfile:a,customxmlparts:a,documentevents:a,file:a,htmlcoercion:a,matrixbindings:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,textfile:a,wordapi:a})}return b}(c);b.WordClientDefaultSetRequirement=h;var p=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:a})}return b}(h);b.WordClientV1DefaultSetRequirement=p;var e=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,compressedfile:a,documentevents:a,file:a,pdffile:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.PowerpointClientDefaultSetRequirement=e;var j=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({imagecoercion:a})}return b}(e);b.PowerpointClientV1DefaultSetRequirement=j;var o=function(c){__extends(b,c);function b(){c.call(this,{selection:a,textcoercion:a})}return b}(c);b.ProjectClientDefaultSetRequirement=o;var u=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,file:a})}return b}(c);b.ExcelWebDefaultSetRequirement=u;var w=function(c){__extends(b,c);function b(){c.call(this,{compressedfile:a,documentevents:a,file:a,imagecoercion:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablecoercion:a,textcoercion:a,textfile:a})}return b}(c);b.WordWebDefaultSetRequirement=w;var n=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,settings:a})}return b}(c);b.PowerpointWebDefaultSetRequirement=n;var g=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.3})}return a}(c);b.OutlookWebDefaultSetRequirement=g;var v=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,documentevents:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.SwayWebDefaultSetRequirement=v;var r=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,partialtablebindings:a,settings:a,tablebindings:a,tablecoercion:a})}return b}(c);b.AccessWebDefaultSetRequirement=r;var t=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a})}return b}(c);b.ExcelIOSDefaultSetRequirement=t;var i=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,compressedfile:a,customxmlparts:a,documentevents:a,file:a,htmlcoercion:a,matrixbindings:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,textfile:a})}return b}(c);b.WordIOSDefaultSetRequirement=i;var s=function(b){__extends(a,b);function a(){b.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return a}(i);b.WordIOSV1DefaultSetRequirement=s;var m=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,compressedfile:a,documentevents:a,file:a,pdffile:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.PowerpointIOSDefaultSetRequirement=m;var q=function(c){__extends(b,c);function b(){c.call(this,{mailbox:a})}return b}(c);b.OutlookIOSDefaultSetRequirement=q;var y=function(){var b="undefined";function a(){}a.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)};a.getDefaultRequirementMatrix=function(f){this.initializeDefaultSetMatrix();var e=undefined,g=f.get_requirementMatrix();if(g!=undefined&&g.length>0&&typeof JSON!==b){var i=JSON.parse(f.get_requirementMatrix().toLowerCase());e=new d(new c(i))}else{var h=a.getClientFullVersionString(f);if(a.DefaultSetArrayMatrix!=undefined&&a.DefaultSetArrayMatrix[h]!=undefined)e=new d(a.DefaultSetArrayMatrix[h]);else e=new d(new c({}))}return e};a.getDefaultDialogRequirementMatrix=function(f){var a=undefined,e=f.get_dialogRequirementMatrix();if(e!=undefined&&e.length>0&&typeof JSON!==b){var g=JSON.parse(f.get_requirementMatrix().toLowerCase());a=new d(new c(g))}else a=new d(new x);return a};a.getClientFullVersionString=function(a){var d=a.get_appMinorVersion(),e="",b="",c=a.get_appName(),f=c==1024||c==4096||c==8192||c==65536;if(f&&a.get_appVersion()==1)if(c==4096&&d>=15)b="16.00.01";else b="16.00";else if(a.get_appName()==64)b=a.get_appVersion();else{if(d<10)e="0"+d;else e=""+d;b=a.get_appVersion()+"."+e}return a.get_appName()+"-"+b};a.initializeDefaultSetMatrix=function(){a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1600]=new f;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1600]=new h;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1600]=new e;a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1601]=new k;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1601]=new p;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1601]=new j;a.DefaultSetArrayMatrix[a.Outlook_RCLIENT_1600]=new l;a.DefaultSetArrayMatrix[a.Excel_WAC_1600]=new u;a.DefaultSetArrayMatrix[a.Word_WAC_1600]=new w;a.DefaultSetArrayMatrix[a.Outlook_WAC_1600]=new g;a.DefaultSetArrayMatrix[a.Outlook_WAC_1601]=new g;a.DefaultSetArrayMatrix[a.Project_RCLIENT_1600]=new o;a.DefaultSetArrayMatrix[a.Access_WAC_1600]=new r;a.DefaultSetArrayMatrix[a.PowerPoint_WAC_1600]=new n;a.DefaultSetArrayMatrix[a.Excel_IOS_1600]=new t;a.DefaultSetArrayMatrix[a.SWAY_WAC_1600]=new v;a.DefaultSetArrayMatrix[a.Word_IOS_1600]=new i;a.DefaultSetArrayMatrix[a.Word_IOS_16001]=new s;a.DefaultSetArrayMatrix[a.PowerPoint_IOS_1600]=new m;a.DefaultSetArrayMatrix[a.Outlook_IOS_1600]=new q};a.Excel_RCLIENT_1600="1-16.00";a.Excel_RCLIENT_1601="1-16.01";a.Word_RCLIENT_1600="2-16.00";a.Word_RCLIENT_1601="2-16.01";a.PowerPoint_RCLIENT_1600="4-16.00";a.PowerPoint_RCLIENT_1601="4-16.01";a.Outlook_RCLIENT_1600="8-16.00";a.Excel_WAC_1600="16-16.00";a.Word_WAC_1600="32-16.00";a.Outlook_WAC_1600="64-16.00";a.Outlook_WAC_1601="64-16.01";a.Project_RCLIENT_1600="128-16.00";a.Access_WAC_1600="256-16.00";a.PowerPoint_WAC_1600="512-16.00";a.Excel_IOS_1600="1024-16.00";a.SWAY_WAC_1600="2048-16.00";a.Word_IOS_1600="4096-16.00";a.Word_IOS_16001="4096-16.00.01";a.PowerPoint_IOS_1600="8192-16.00";a.Outlook_IOS_1600="65536-16.00";a.DefaultSetArrayMatrix={};return a}();b.RequirementsMatrixFactory=y})(b=a.Requirement||(a.Requirement={}))})(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda();var OfficeExt;(function(a){var b;(function(a){var b=function(){function a(){var a=this;a.getDiagnostics=function(b){var a={host:this.getHost(),version:b||this.getDefaultVersion(),platform:this.getPlatform()};return a};a.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};a.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};a.hostInfo=OSF._OfficeAppFactory.getHostInfo();a.getHost=a.getHost.bind(a);a.getPlatform=a.getPlatform.bind(a);a.getDiagnostics=a.getDiagnostics.bind(a)}a.prototype.capitalizeFirstLetter=function(a){if(a)return a[0].toUpperCase()+a.slice(1).toLowerCase();return a};a.getInstance=function(){if(a.hostObj===undefined)a.hostObj=new a;return a.hostObj};a.prototype.getPlatform=function(){var a=this;if(a.hostInfo.hostPlatform){var b=a.hostInfo.hostPlatform.toLowerCase();if(a.platformRemappings[b])return a.platformRemappings[b]}return null};a.prototype.getHost=function(){var a=this;if(a.hostInfo.hostType){var b=a.hostInfo.hostType.toLowerCase();if(a.camelCaseMappings[b])return a.camelCaseMappings[b];b=a.capitalizeFirstLetter(a.hostInfo.hostType);if(Microsoft.Office.WebExtension.HostType[b])return Microsoft.Office.WebExtension.HostType[b]}return null};a.prototype.getDefaultVersion=function(){if(this.getHost())return "16.0.0000.0000";return null};return a}();a.Host=b})(b=a.HostName||(a.HostName={}))})(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var b,a=false;return {enableShortcut:function(){if(!a){if(window.Office)b=window.Office;else OSF.OUtil.setNamespace("Office",window);window.Office=Microsoft.Office.WebExtension;a=true}},disableShortcut:function(){if(a){if(b)window.Office=b;else OSF.OUtil.unsetNamespace("Office",window);a=false}}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(a){if(a)OSF.NamespaceManager.enableShortcut();else OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(a,b){var c;if(a&&typeof a=="string"){var d=a.indexOf("#");if(d!=-1){var h=a.substring(0,d),g=a.substring(d+1);switch(h){case "binding":case "bindings":if(g)c=new OSF.DDA.BindingPromise(g)}}}if(!c){if(b){var e=typeof b;if(e=="function"){var f={};f[Microsoft.Office.WebExtension.Parameters.Callback]=b;OSF.DDA.issueAsyncResult(f,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,e)}}else{c.onFail=b;return c}};OSF.DDA.Context=function(a,g,h,c,d){var f="requirements",b=this;OSF.OUtil.defineEnumerableProperties(b,{contentLanguage:{value:a.get_dataLocale()},displayLanguage:{value:a.get_appUILocale()},touchEnabled:{value:a.get_touchEnabled()},commerceAllowed:{value:a.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(a.get_hostFullVersion())}});h&&OSF.OUtil.defineEnumerableProperty(b,"license",{value:h});a.ui&&OSF.OUtil.defineEnumerableProperty(b,"ui",{value:a.ui});a.auth&&OSF.OUtil.defineEnumerableProperty(b,"auth",{value:a.auth});a.application&&OSF.OUtil.defineEnumerableProperty(b,"application",{value:a.application});if(a.get_isDialog()){var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,f,{value:e})}else{g&&OSF.OUtil.defineEnumerableProperty(b,"document",{value:g});if(c){var i=c.displayName||"appOM";delete c.displayName;OSF.OUtil.defineEnumerableProperty(b,i,{value:c})}d&&OSF.OUtil.defineEnumerableProperty(b,"officeTheme",{"get":function(){return d()}});var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,f,{value:e})}};OSF.DDA.OutlookContext=function(c,a,d,e,b){OSF.DDA.OutlookContext.uber.constructor.call(this,c,null,d,e,b);a&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:a})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Application=function(){};OSF.DDA.Document=function(b,c){var a;switch(b.get_clientMode()){case OSF.ClientMode.ReadOnly:a=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:a=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}c&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:c});OSF.OUtil.defineMutableProperties(this,{mode:{value:a},url:{value:b.get_docUrl()}})};OSF.DDA.JsomDocument=function(d,b,e){var a=this;OSF.DDA.JsomDocument.uber.constructor.call(a,d,e);b&&OSF.OUtil.defineEnumerableProperty(a,"bindings",{"get":function(){return b}});var c=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(a,[c.GetSelectedDataAsync,c.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(a,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{"get":function(){var a;if(OSF&&OSF._OfficeAppFactory)a=OSF._OfficeAppFactory.getContext();return a}});OSF.DDA.License=function(a){OSF.OUtil.defineEnumerableProperty(this,"value",{value:a})};OSF.DDA.ApiMethodCall=function(c,f,e,g,h){var a=this,d=c.length,b=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,h)});a.verifyArguments=function(d,f){for(var e in d){var a=d[e],c=f[e];if(a["enum"])switch(typeof c){case "string":if(OSF.OUtil.listContainsValue(a["enum"],c))break;case "undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw b()}if(a["types"])if(!OSF.OUtil.listContainsValue(a["types"],typeof c))throw b()}};a.extractRequiredArguments=function(g,l,j){if(g.lengthc+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var d,f,i=h.length-1;i>=c;i--){var g=h[i];switch(typeof g){case "object":if(d)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else d=g;break;case a:if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else f=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}d=b.fillOptions(d,j,l,k);if(f)if(d[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else d[Microsoft.Office.WebExtension.Parameters.Callback]=f;b.verifyArguments(e,d);return d}this.verifyAndExtractCall=function(e,c,a){var d=b.extractRequiredArguments(e,c,a),g=h(e,d,c,a),f=b.constructCallArgs(d,g,c,a);return f};this.processResponse=function(c,b,e,d){var a;if(c==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)if(f)a=f(b,e,d);else a=b;else if(g)a=g(c,b);else a=OSF.DDA.ErrorCodeManager.getErrorArgs(c);return a};this.getCallArgs=function(g){for(var b,d,f=g.length-1;f>=c;f--){var e=g[f];switch(typeof e){case "object":b=e;break;case a:d=e}}b=b||{};if(d)b[Microsoft.Office.WebExtension.Parameters.Callback]=d;return b}};OSF.DDA.AsyncMethodCallFactory=function(){return {manufacture:function(a){var c=a.supportedOptions?OSF.OUtil.createObject(a.supportedOptions):[],b=a.privateStateCallbacks?OSF.OUtil.createObject(a.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(a.requiredArguments||[],c,b,a.onSucceeded,a.onFailed,a.checkCallArgs,a.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(a){OSF.DDA.AsyncMethodCalls[a.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(a)};OSF.DDA.Error=function(c,a,b){OSF.OUtil.defineEnumerableProperties(this,{name:{value:c},message:{value:a},code:{value:b}})};OSF.DDA.AsyncResult=function(b,a){OSF.OUtil.defineEnumerableProperties(this,{value:{value:b[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:a?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});b[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:b[OSF.DDA.AsyncResultEnum.Properties.Context]});a&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(a[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(d,f,a){var e=d[Microsoft.Office.WebExtension.Parameters.Callback];if(e){var c={};c[OSF.DDA.AsyncResultEnum.Properties.Context]=d[Microsoft.Office.WebExtension.Parameters.AsyncContext];var b;if(f==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)c[OSF.DDA.AsyncResultEnum.Properties.Value]=a;else{b={};a=a||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);b[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=f||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=a.name||a;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=a.message||a}e(new OSF.DDA.AsyncResult(c,b))}};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(b){for(var a in b){var c={};OSF.OUtil.defineEnumerableProperties(c,{id:{value:a},displayName:{value:b[a]}});OSF.DDA.SyncMethodNames[a]=c}};OSF.DDA.SyncMethodCall=function(b,c,f,g,h){var d=b.length,a=new OSF.DDA.ApiMethodCall(b,c,f,g,h);function e(e,h,j,i){if(e.length>d+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var b,k,f=e.length-1;f>=d;f--){var g=e[f];switch(typeof g){case "object":if(b)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else b=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}b=a.fillOptions(b,h,j,i);a.verifyArguments(c,b);return b}this.verifyAndExtractCall=function(f,c,b){var d=a.extractRequiredArguments(f,c,b),h=e(f,d,c,b),g=a.constructCallArgs(d,h,c,b);return g}};OSF.DDA.SyncMethodCallFactory=function(){return {manufacture:function(a){var b=a.supportedOptions?OSF.OUtil.createObject(a.supportedOptions):[];return new OSF.DDA.SyncMethodCall(a.requiredArguments||[],b,a.privateStateCallbacks,a.checkCallArgs,a.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(a){OSF.DDA.SyncMethodCalls[a.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(a)};OSF.DDA.ListType=function(){var a={};return {setListType:function(c,b){a[c]=b},isListType:function(b){return OSF.OUtil.listContainsKey(a,b)},getDescriptor:function(b){return a[b]}}}();OSF.DDA.HostParameterMap=function(b,c){var j="fromHost",a=this,i="toHost",e=j,l="sourceData",g="self",d={};d[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(a){if(a!=null&&a.rows!==undefined){var b={};b[OSF.DDA.TableDataProperties.TableRows]=a.rows;b[OSF.DDA.TableDataProperties.TableHeaders]=a.headers;a=b}return a},fromHost:function(a){return a}};d[Microsoft.Office.WebExtension.Parameters.SampleData]=d[Microsoft.Office.WebExtension.Parameters.Data];function f(j,i){var m=j?{}:undefined;for(var h in j){var g=j[h],a;if(OSF.DDA.ListType.isListType(h)){a=[];for(var n in g)a.push(f(g[n],i))}else if(OSF.OUtil.listContainsKey(d,h))a=d[h][i](g);else if(i==e&&b.preserveNesting(h))a=f(g,i);else{var k=c[h];if(k){var l=k[i];if(l){a=l[g];if(a===undefined)a=g}}else a=g}m[h]=a}return m}function k(j,h){var e;for(var a in h){var d;if(b.isComplexType(a))d=k(j,c[a][i]);else d=j[a];if(d!=undefined){if(!e)e={};var f=h[a];if(f==g)f=a;e[f]=b.pack(a,d)}}return e}function h(j,n,f){if(!f)f={};for(var a in n){var k=n[a],d;if(k==g)d=j;else if(k==l){f[a]=j.toArray();continue}else d=j[k];if(d===null||d===undefined)f[a]=undefined;else{d=b.unpack(a,d);var i;if(b.isComplexType(a)){i=c[a][e];if(b.preserveNesting(a))f[a]=h(d,i);else h(d,i,f)}else if(OSF.DDA.ListType.isListType(a)){i={};var p=OSF.DDA.ListType.getDescriptor(a);i[p]=g;var m=new Array(d.length);for(var o in d)m[o]=h(d[o],i);f[a]=m}else f[a]=d}}return f}function m(l,e,a){var d=c[l][a],b;if(a=="toHost"){var i=f(e,a);b=k(i,d)}else if(a==j){var g=h(e,d);b=f(g,a)}return b}if(!c)c={};a.addMapping=function(l,h){var a,d;if(h.map){a=h.map;d={};for(var j in a){var k=a[j];if(k==g)k=j;d[k]=j}}else{a=h.toHost;d=h.fromHost}var b=c[l];if(b){var f=b[i];for(var n in f)a[n]=f[n];f=b[e];for(var m in f)d[m]=f[m]}else b=c[l]={};b[i]=a;b[e]=d};a.toHost=function(b,a){return m(b,a,i)};a.fromHost=function(a,b){return m(a,b,e)};a.self=g;a.sourceData=l;a.addComplexType=function(a){b.addComplexType(a)};a.getDynamicType=function(a){return b.getDynamicType(a)};a.setDynamicType=function(c,a){b.setDynamicType(c,a)};a.dynamicTypes=d;a.doMapValues=function(a,b){return f(a,b)}};OSF.DDA.SpecialProcessor=function(c,b){var a=this;a.addComplexType=function(a){c.push(a)};a.getDynamicType=function(a){return b[a]};a.setDynamicType=function(c,a){b[c]=a};a.isComplexType=function(a){return OSF.OUtil.listContainsValue(c,a)};a.isDynamicType=function(a){return OSF.OUtil.listContainsKey(b,a)};a.preserveNesting=function(b){var a=[];OSF.DDA.PropertyDescriptors&&a.push(OSF.DDA.PropertyDescriptors.Subset);if(OSF.DDA.DataNodeEventProperties)a=a.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]);return OSF.OUtil.listContainsValue(a,b)};a.pack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].toHost(d);else a=d;return a};a.unpack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].fromHost(d);else a=d;return a}};OSF.DDA.getDecoratedParameterMap=function(d,c){var a=new OSF.DDA.HostParameterMap(d),f=a.self;function b(a){var c=null;if(a){c={};for(var d=a.length,b=0;b0){for(var d=[],c=0;c=f)break;c=Function._validateParameter(i[d],h,j);if(c){c.popStackFrame();return c}}return a};if(!Function._validateParameterCount)Function._validateParameterCount=function(m,f,l){var b,e,c=f.length,g=m.length;if(gc){e=d;for(b=0;b0&&b.push(c)}}}catch(i){}return b}var c=[],b={};b[Microsoft.Office.WebExtension.Parameters.Data]=function(){var c=0,b=1;return {toHost:function(a){if(OSF.DDA.TableDataProperties&&typeof a!="string"&&a[OSF.DDA.TableDataProperties.TableRows]!==undefined){var d=[];d[c]=a[OSF.DDA.TableDataProperties.TableRows];d[b]=a[OSF.DDA.TableDataProperties.TableHeaders];a=d}return a},fromHost:function(f){var e;if(f.toArray){var g=f.dimensions();if(g===2)e=a(f);else{var d=f.toArray();if(d.length===2&&(d[0]!=null&&d[0].toArray||d[1]!=null&&d[1].toArray)){e={};e[OSF.DDA.TableDataProperties.TableRows]=a(d[c]);e[OSF.DDA.TableDataProperties.TableHeaders]=a(d[b])}else e=d}}else e=f;return e}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,c,b);this.unpack=function(c,a){var d;if(this.isComplexType(c)||OSF.DDA.ListType.isListType(c)){var e=(a||typeof a==="unknown")&&a.toArray;d=e?a.toArray():a||{}}else if(this.isDynamicType(c))d=b[c].fromHost(a);else d=a;return d}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(a){function c(a){var b=a;if(OSF.OUtil.isArray(a))for(var f=b.length,d=0;d2){c=[];for(var f=1;f-1)i="&";var s=screen.width*c.width/100,q=screen.height*c.height/100,r="width="+s+", height="+q;b[0]=b[0].concat(i).concat(n);var p=b.join(g);a.popup=window.open(p,"",r);function h(b){if(b.source==a.popup)try{var c=JSON.parse(b.data);c.dialogMessage&&e(f,[OSF.DialogMessageType.DialogMessageReceived,c.dialogMessage.messageContent])}catch(d){OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handlered. Message:"+b.data)}}function l(){try{if(a.popup==null||a.popup.closed){window.clearInterval(a.interval);window.removeEventListener("message",h);a.NotifyError=null;e(f,[OSF.DialogMessageType.DialogClosed])}}catch(b){OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed.")}}if(a.popup!=undefined&&window.dialogAPIErrorCode==undefined){window.addEventListener("message",h);a.interval=window.setInterval(l,500);function m(a){e(f,[a])}a.NotifyError=m;d(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}else{var k=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;if(window.dialogAPIErrorCode)k=window.dialogAPIErrorCode;d(k)}};a.prototype.messageParent=function(c){var b=c[Microsoft.Office.WebExtension.Parameters.MessageToParent],a={dialogMessage:{messageType:OSF.DialogMessageType.DialogMessageReceived,messageContent:b}};window.opener.postMessage(JSON.stringify(a),window.location.origin)};a.prototype.closeDialog=function(d,c,b){if(a.popup){a.interval&&window.clearInterval(a.interval);a.popup.close();a.NotifyError=null;b(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}else b(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)};a.prototype.sendMessage=function(){};return a}();b.MacRichClientHostController=a})(OfficeExt||(OfficeExt={}));OSF.ClientHostController=new OfficeExt.MacRichClientHostController;var OfficeExt;(function(a){var b;(function(c){var b=function(){var a=null;function b(){this._osfOfficeTheme=a;this._osfOfficeThemeTimeStamp=a}b.prototype.getOfficeTheme=function(){var c="GetOfficeThemeInfo",a=this;if(OSF.DDA._OsfControlContext){if(a._osfOfficeTheme&&a._osfOfficeThemeTimeStamp&&(new Date).getTime()-a._osfOfficeThemeTimeStamp40){a=OSF.OUtil.Guid.generateNewGuid();b.setValue(b.clientIDKey,a)}return a};a.prototype.saveLog=function(d,e){var b=this,a=b.getValue(b.logIdSetKey);a=(a&&a.length>0?a+";":c)+d;b.setValue(b.logIdSetKey,a);b.setValue(d,e)};a.prototype.enumerateLog=function(c,e){var a=this,d=a.getValue(a.logIdSetKey);if(d){var f=d.split(";");for(var h in f){var b=f[h],g=a.getValue(b);if(g){c&&c(b,g);e&&a.remove(b)}}e&&a.remove(a.logIdSetKey)}};a.prototype.getValue=function(d){var a=OSF.OUtil.getLocalStorage(),b=c;if(a)b=a.getItem(d);return b};a.prototype.setValue=function(c,b){var a=OSF.OUtil.getLocalStorage();a&&a.setItem(c,b)};a.prototype.remove=function(b){var a=OSF.OUtil.getLocalStorage();if(a)try{a.removeItem(b)}catch(c){}};return a}(),i=function(){function a(){}a.prototype.LogData=function(a){if(!OSF.Logger||!d.enableTelemetry)return;try{OSFAriaLogger.AriaLogger.getInstance().logData(a)}catch(b){}};a.prototype.LogRawData=function(a){if(!OSF.Logger||!d.enableTelemetry)return;try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(a))}catch(b){}};return a}();function f(a){if(a)a=a.replace(/[{}]/g,c).toLowerCase();return a||c}function x(g){if(!OSF.Logger)return;if(a)return;a=new z;if(g.get_hostFullVersion())a.hostVersion=g.get_hostFullVersion();else a.hostVersion=g.get_appVersion();a.appId=g.get_id();a.host=g.get_appName();a.browser=window.navigator.userAgent;a.correlationId=f(g.get_correlationId());a.clientId=(new l).getClientId();a.appInstanceId=g.get_appInstanceId();if(a.appInstanceId)a.appInstanceId=a.appInstanceId.replace(/[{}]/g,c).toLowerCase();a.message=g.get_hostCustomMessage();a.officeJSVersion=OSF.ConstantNames.FileVersion;a.hostJSVersion="16.0.8916.1000";if(g._wacHostEnvironment)a.wacHostEnvironment=g._wacHostEnvironment;if(g._isFromWacAutomation!==undefined&&g._isFromWacAutomation!==b)a.isFromWacAutomation=g._isFromWacAutomation.toString().toLowerCase();var j=g.get_docUrl();a.docUrl=p.test(j)?j:c;var i=location.href;if(i)i=i.split("?")[0].split("#")[0];a.appURL=i;(function(i,a){var e,h,d;a.assetId=c;a.userId=c;try{e=decodeURIComponent(i);h=new DOMParser;d=h.parseFromString(e,"text/xml");var f=d.getElementsByTagName("t")[0].attributes.getNamedItem("cid"),g=d.getElementsByTagName("t")[0].attributes.getNamedItem("oid");if(f&&f.nodeValue)a.userId=f.nodeValue;else if(g&&g.nodeValue)a.userId=g.nodeValue;a.assetId=d.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(j){}finally{e=b;d=b;h=b}})(g.get_eToken(),a);(function(){var l=new Date,c=b,i=0,k=false,f=function(){if(document.hasFocus()){if(c==b)c=new Date}else if(c){i+=Math.abs((new Date).getTime()-c.getTime());c=b}},a=[];a.push(new h("focus",f));a.push(new h("blur",f));a.push(new h("focusout",f));a.push(new h("focusin",f));var j=function(){for(var f=0;f0)for(var b=0;b0)for(var b=0;b0){this._eventHandlers[a]=[];return true}return false},clearObjectEventHandlers:function(a,b){if(this._objectEventHandlers[a]!=null&&this._objectEventHandlers[a][b]!=null){this._objectEventHandlers[a][b]=[];return true}return false},getEventHandlerCount:function(a){return this._eventHandlers[a]!=undefined?this._eventHandlers[a].length:-1},getObjectEventHandlerCount:function(a,b){if(this._objectEventHandlers[a]==null||this._objectEventHandlers[a][b]==null)return 0;return this._objectEventHandlers[a][b].length},fireEvent:function(a){if(a.type==undefined)return false;var b=a.type;if(b&&this._eventHandlers[b]){for(var d=this._eventHandlers[b],c=0;c0){var d=b[0];while(c.length>0){var e=c.shift();d(e)}return true}}return false},clearQueuedEvent:function(a){if(a&&this._eventHandlers[a]){var b=this._queuedEventsArgs[a];if(b)this._queuedEventsArgs[a]=[]}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(d,c,b){var h="hostPlatform",g="outlook",f="hostType",e=this,a;switch(d){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:a=new OSF.DDA.DocumentSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:a=new OSF.DDA.BindingSelectionChangedEventArgs(e.manufactureBinding(b,c.document),b[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:a=new OSF.DDA.BindingDataChangedEventArgs(e.manufactureBinding(b,c.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:a=new OSF.DDA.SettingsChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:a=new OSF.DDA.ActiveViewChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:a=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:a=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:a=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(b);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:a=new OSF.DDA.ObjectEventArgs(d,b[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:a=new OSF.DDA.RichApiMessageEventArgs(d,b);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:a=new OSF.DDA.NodeInsertedEventArgs(e.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NewNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:a=new OSF.DDA.NodeReplacedEventArgs(e.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.OldNode]),e.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NewNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:a=new OSF.DDA.NodeDeletedEventArgs(e.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.OldNode]),e.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:a=new OSF.DDA.TaskSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:a=new OSF.DDA.ResourceSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:a=new OSF.DDA.ViewSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:a=new OSF.DDA.DialogEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:a=new OSF.DDA.DialogParentEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]==g){a=new OSF.DDA.OlkItemSelectedChangedEventArgs(b);c.initialize(a["initialData"]);(OSF._OfficeAppFactory.getHostInfo()[h]=="win32"||OSF._OfficeAppFactory.getHostInfo()[h]=="mac")&&c.setCurrentItemNumber(a["itemNumber"].itemNumber)}else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,d));break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]==g)a=new OSF.DDA.OlkRecipientsChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,d));break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]==g)a=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,d));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,d))}return a};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:false,isWindowDialog:false};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var c=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),b=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,a=this;!a[b]&&OSF.OUtil.defineEnumerableProperty(a,b,{value:function(){var b=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];b(arguments,c,a)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(d){var b=OSF.DDA.SyncMethodNames.MessageParent.displayName,a=this;!a[b]&&OSF.OUtil.defineEnumerableProperty(a,b,{value:function(){var b=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return b(arguments,a)}});var c=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;!a[c]&&typeof OSF.DialogParentMessageEventDispatch!="undefined"&&OSF.DDA.DispIdHost.addEventSupport(a,OSF.DialogParentMessageEventDispatch,d);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(a){if(a[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived)OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:a[OSF.DDA.PropertyDescriptors.MessageContent]}});else OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:a[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:a[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:true}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:false}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:false}},{name:Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels,value:{types:["boolean"],defaultValue:false}}],privateStateCallbacks:[],onSucceeded:function(c){var g=c[Microsoft.Office.WebExtension.Parameters.Id],b=c[Microsoft.Office.WebExtension.Parameters.Data],a=new OSF.DialogHandler,d=OSF.DDA.AsyncMethodNames.CloseAsync.displayName;OSF.OUtil.defineEnumerableProperty(a,d,{value:function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];c(arguments,g,b,a)}});var f=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;OSF.OUtil.defineEnumerableProperty(a,f,{value:function(){var d=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],c=d.verifyAndExtractCall(arguments,a,b),e=c[Microsoft.Office.WebExtension.Parameters.EventType],f=c[Microsoft.Office.WebExtension.Parameters.Handler];return b.addEventHandlerAndFireQueuedEvent(e,f)}});var e=OSF.DDA.SyncMethodNames.SendMessage.displayName;OSF.OUtil.defineEnumerableProperty(a,e,{value:function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return c(arguments,b,a)}});return a},checkCallArgs:function(a){if(a[Microsoft.Office.WebExtension.Parameters.Width]<=0)a[Microsoft.Office.WebExtension.Parameters.Width]=1;if(!a[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&a[Microsoft.Office.WebExtension.Parameters.Width]>100)a[Microsoft.Office.WebExtension.Parameters.Width]=99;if(a[Microsoft.Office.WebExtension.Parameters.Height]<=0)a[Microsoft.Office.WebExtension.Parameters.Height]=1;if(!a[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&a[Microsoft.Office.WebExtension.Parameters.Height]>100)a[Microsoft.Office.WebExtension.Parameters.Height]=99;if(!a[Microsoft.Office.WebExtension.Parameters.RequireHTTPs])a[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=true;return a}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(a){try{a.onCalling&&a.onCalling();var c=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true,a);OSF.ClientHostController.openDialog(a.dispId,a.targetId,function(c,b){a.onEvent&&a.onEvent(b);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(a.dispId)},c)}catch(b){OSF.DDA.SafeArray.Delegate._onException(b,a)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(a){a.onCalling&&a.onCalling();var c=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false,a);try{OSF.ClientHostController.closeDialog(a.dispId,a.targetId,c)}catch(b){OSF.DDA.SafeArray.Delegate._onException(b,a)}};OSF.DDA.SafeArray.Delegate.messageParent=function(a){try{a.onCalling&&a.onCalling();var d=(new Date).getTime(),b=OSF.ClientHostController.messageParent(a.hostCallArgs);a.onReceiving&&a.onReceiving();OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(a.dispId,a.hostCallArgs,Math.abs((new Date).getTime()-d),b);return b}catch(c){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(c)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:true});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:true});OSF.DDA.SafeArray.Delegate.sendMessage=function(a){try{a.onCalling&&a.onCalling();var d=(new Date).getTime(),c=OSF.ClientHostController.sendMessage(a.hostCallArgs);a.onReceiving&&a.onReceiving();return c}catch(b){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(b)}};Microsoft.Office.WebExtension.BindingType={Table:"table",Text:"text",Matrix:"matrix"};OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType};OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{BindingList:"BindingList"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{Subset:"subset",BindingProperties:"BindingProperties"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList,OSF.DDA.PropertyDescriptors.BindingProperties);OSF.DDA.BindingPromise=function(b,a){this._id=b;OSF.OUtil.defineEnumerableProperty(this,"onFail",{"get":function(){return a},"set":function(c){var b=typeof c;if(b!="undefined"&&b!="function")throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,b);a=c}})};OSF.DDA.BindingPromise.prototype={_fetch:function(b){var a=this;if(a.binding)b&&b(a.binding);else if(!a._binding){var c=a;Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(a._id,function(a){if(a.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded){OSF.OUtil.defineEnumerableProperty(c,"binding",{value:a.value});b&&b(c.binding)}else c.onFail&&c.onFail(a)})}return a},getDataAsync:function(){var a=arguments;this._fetch(function(b){b.getDataAsync.apply(b,a)});return this},setDataAsync:function(){var a=arguments;this._fetch(function(b){b.setDataAsync.apply(b,a)});return this},addHandlerAsync:function(){var a=arguments;this._fetch(function(b){b.addHandlerAsync.apply(b,a)});return this},removeHandlerAsync:function(){var a=arguments;this._fetch(function(b){b.removeHandlerAsync.apply(b,a)});return this}};OSF.DDA.BindingFacade=function(b){this._eventDispatches=[];OSF.OUtil.defineEnumerableProperty(this,"document",{value:b});var a=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[a.AddFromSelectionAsync,a.AddFromNamedItemAsync,a.GetAllAsync,a.GetByIdAsync,a.ReleaseByIdAsync])};OSF.DDA.UnknownBinding=function(b,a){OSF.OUtil.defineEnumerableProperties(this,{document:{value:a},id:{value:b}})};OSF.DDA.Binding=function(a,c){OSF.OUtil.defineEnumerableProperties(this,{document:{value:c},id:{value:a}});var d=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[d.GetDataAsync,d.SetDataAsync]);var e=Microsoft.Office.WebExtension.EventType,b=c.bindings._eventDispatches;if(!b[a])b[a]=new OSF.EventDispatch([e.BindingSelectionChanged,e.BindingDataChanged]);var f=b[a];OSF.DDA.DispIdHost.addEventSupport(this,f)};OSF.DDA.generateBindingId=function(){return "UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+(new Date).getTime()};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureBinding=function(a,c){var d=a[OSF.DDA.BindingProperties.Id],g=a[OSF.DDA.BindingProperties.RowCount],f=a[OSF.DDA.BindingProperties.ColumnCount],h=a[OSF.DDA.BindingProperties.HasHeaders],b;switch(a[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:b=new OSF.DDA.TextBinding(d,c);break;case Microsoft.Office.WebExtension.BindingType.Matrix:b=new OSF.DDA.MatrixBinding(d,c,g,f);break;case Microsoft.Office.WebExtension.BindingType.Table:var i=function(){return OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument},e;if(i()&&OSF.DDA.ExcelTableBinding)e=OSF.DDA.ExcelTableBinding;else e=OSF.DDA.TableBinding;b=new e(d,c,g,f,h);break;default:b=new OSF.DDA.UnknownBinding(d,c)}return b};OSF.DDA.AsyncMethodNames.addNames({AddFromSelectionAsync:"addFromSelectionAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:"getByIdAsync",ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync"});(function(){var d="number",c="object",b="string",a=null;function e(a){return OSF.DDA.OMFactory.manufactureBinding(a,Microsoft.Office.WebExtension.context.document)}function f(a){return a.id}function g(c,e,d){var b=c[Microsoft.Office.WebExtension.Parameters.Data];if(OSF.DDA.TableDataProperties&&b&&(b[OSF.DDA.TableDataProperties.TableRows]!=undefined||b[OSF.DDA.TableDataProperties.TableHeaders]!=undefined))b=OSF.DDA.OMFactory.manufactureTableData(b);b=OSF.DDA.DataCoercion.coerceData(b,d[Microsoft.Office.WebExtension.Parameters.CoercionType]);return b==undefined?a:b}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[b],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[c],defaultValue:a}}],privateStateCallbacks:[],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:[b]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[b],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[c],defaultValue:a}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return true}}],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(a){return OSF.OUtil.mapList(a[OSF.DDA.ListDescriptors.BindingList],e)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[b]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[b]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(d,b,a){var c=a[Microsoft.Office.WebExtension.Parameters.Id];delete b._eventDispatches[c]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(b,a){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(a.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[c,b],defaultValue:a}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[c],defaultValue:a}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[d],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[d],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:[d],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:[d],defaultValue:0}}],checkCallArgs:function(a,b){if(a[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&a[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&a[Microsoft.Office.WebExtension.Parameters.RowCount]==0&&a[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0){delete a[Microsoft.Office.WebExtension.Parameters.StartRow];delete a[Microsoft.Office.WebExtension.Parameters.StartColumn];delete a[Microsoft.Office.WebExtension.Parameters.RowCount];delete a[Microsoft.Office.WebExtension.Parameters.ColumnCount]}if(a[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(b.type)&&(a[Microsoft.Office.WebExtension.Parameters.StartRow]||a[Microsoft.Office.WebExtension.Parameters.StartColumn]||a[Microsoft.Office.WebExtension.Parameters.RowCount]||a[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return a},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}],onSucceeded:g});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[b,c,d,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(a){return OSF.DDA.DataCoercion.determineCoercionType(a[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[c,b],defaultValue:a}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[c],defaultValue:a}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[d],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[d],defaultValue:0}}],checkCallArgs:function(a,b){if(a[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&a[Microsoft.Office.WebExtension.Parameters.StartColumn]==0){delete a[Microsoft.Office.WebExtension.Parameters.StartRow];delete a[Microsoft.Office.WebExtension.Parameters.StartColumn]}if(a[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(b.type)&&(a[Microsoft.Office.WebExtension.Parameters.StartRow]||a[Microsoft.Office.WebExtension.Parameters.StartColumn]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return a},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}]})})();Microsoft.Office.WebExtension.TableData=function(b,a){function c(a){if(a==null||a==undefined)return null;try{for(var b=OSF.DDA.DataCoercion.findArrayDimensionality(a,2);b<2;b++)a=[a];return a}catch(c){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{"get":function(){return a},"set":function(b){a=c(b)}},rows:{"get":function(){return b},"set":function(a){b=a==null||OSF.OUtil.isArray(a)&&a.length==0?[]:c(a)}}});this.headers=a;this.rows=b};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(a){return new Microsoft.Office.WebExtension.TableData(a[OSF.DDA.TableDataProperties.TableRows],a[OSF.DDA.TableDataProperties.TableHeaders])};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{TableDataProperties:"TableDataProperties"});OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};OSF.DDA.TableBinding=function(f,e,d,c,b){OSF.DDA.TableBinding.uber.constructor.call(this,f,e);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:d?d:0},columnCount:{value:c?c:0},hasHeaders:{value:b?b:false}});var a=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[a.AddRowsAsync,a.AddColumnsAsync,a.DeleteAllDataValuesAsync])};OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync"});(function(){function a(a){return a.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:a}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:a}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:a}]})})();Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var a=null;return {findArrayDimensionality:function(c){if(OSF.OUtil.isArray(c)){for(var b=0,a=0;a4*1024*1024)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return b},onSucceeded:function(a,c,b){return new OSF.DDA.File(a[OSF.DDA.FileProperties.Handle],a[OSF.DDA.FileProperties.FileSize],b[Microsoft.Office.WebExtension.Parameters.SliceSize])}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(b,a){return a[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(b,a){return a[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(a,d,c){var b=a[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(b<0||b>=d.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;a[OSF.DDA.FileSliceOffset]=parseInt((b*c[OSF.DDA.FileProperties.SliceSize]).toString());return a},onSucceeded:function(a,d,c){var b={};OSF.OUtil.defineEnumerableProperties(b,{data:{value:OSF.OUtil.shallowCopy(a[Microsoft.Office.WebExtension.Parameters.Data])},index:{value:c[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:a[OSF.DDA.FileProperties.SliceSize]}});return b}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(b,a){return a[OSF.DDA.FileProperties.Handle]}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileProperties.FileSize,value:1}],isComplexType:true});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0},{name:OSF.DDA.FileProperties.SliceSize,value:1}],isComplexType:true});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:0},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:5},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:6}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:0}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileSliceOffset,value:1},{name:OSF.DDA.FileProperties.SliceSize,value:2}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0}]});OSF.DDA.AsyncMethodNames.addNames({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync"});(function(){var c=false,b="boolean",a="number";function d(b,d,c){var a=b[Microsoft.Office.WebExtension.Parameters.Data];if(OSF.DDA.TableDataProperties&&a&&(a[OSF.DDA.TableDataProperties.TableRows]!=undefined||a[OSF.DDA.TableDataProperties.TableHeaders]!=undefined))a=OSF.DDA.OMFactory.manufactureTableData(a);a=OSF.DDA.DataCoercion.coerceData(a,c[Microsoft.Office.WebExtension.Parameters.CoercionType]);return a==undefined?null:a}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,"enum":Microsoft.Office.WebExtension.CoercionType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}}],privateStateCallbacks:[],onSucceeded:d});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object",a,b]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(a){return OSF.DDA.DataCoercion.determineCoercionType(a[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:[a,b],defaultValue:c}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:[a,b],defaultValue:c}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[a,b],defaultValue:c}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[a,b],defaultValue:c}}],privateStateCallbacks:[]})})();OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:1},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:2},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:3},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:4},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:5}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:0},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:1},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:2},{name:Microsoft.Office.WebExtension.GoToType.Index,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:0},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:1},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:1},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:2}]});OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",RefreshingSettings:"refreshingSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(a){return OSF.OUtil.serializeSettings(a)},deserializeSettings:function(a){return OSF.OUtil.deserializeSettings(a)}};OSF.DDA.Settings=function(a){var b="name";a=a||{};var c=function(d){var b=OSF.OUtil.getSessionStorage();if(b){var a=OSF.DDA.SettingsManager.serializeSettings(d),c=JSON?JSON.stringify(a):Sys.Serialization.JavaScriptSerializer.serialize(a);b.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),c)}};OSF.OUtil.defineEnumerableProperties(this,{"get":{value:function(e){var d=Function._validateParams(arguments,[{name:b,type:String,mayBeNull:false}]);if(d)throw d;var c=a[e];return typeof c==="undefined"?null:c}},"set":{value:function(f,e){var d=Function._validateParams(arguments,[{name:b,type:String,mayBeNull:false},{name:"value",mayBeNull:true}]);if(d)throw d;a[f]=e;c(a)}},remove:{value:function(e){var d=Function._validateParams(arguments,[{name:b,type:String,mayBeNull:false}]);if(d)throw d;delete a[e];c(a)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],a)};OSF.DDA.RefreshableSettings=function(a){OSF.DDA.RefreshableSettings.uber.constructor.call(this,a);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],a);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:a}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(b,a){return a}}],onSucceeded:function(d,a,e){var f=d[OSF.DDA.SettingsManager.SerializedSettings],c=OSF.DDA.SettingsManager.deserializeSettings(f),g=e[OSF.DDA.SettingsManager.RefreshingSettings];for(var b in g)a.remove(b);for(var b in c)a.set(b,c[b]);return a}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:true}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(b,a){return OSF.DDA.SettingsManager.serializeSettings(a)}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});OSF.DDA.AsyncMethodNames.addNames({GetOfficeThemeAsync:"getOfficeThemeAsync",GetDocumentThemeAsync:"getDocumentThemeAsync"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{OfficeThemeChanged:"officeThemeChanged",DocumentThemeChanged:"documentThemeChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.Parameters,{DocumentTheme:"documentTheme",OfficeTheme:"officeTheme"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DocumentThemeChangedEvent:"DocumentThemeChangedEvent",OfficeThemeChangedEvent:"OfficeThemeChangedEvent"});OSF.OUtil.setNamespace("Theming",OSF.DDA);OSF.DDA.Theming.OfficeThemeEnum={PrimaryFontColor:"primaryFontColor",PrimaryBackgroundColor:"primaryBackgroundColor",SecondaryFontColor:"secondaryFontColor",SecondaryBackgroundColor:"secondaryBackgroundColor"};OSF.DDA.Theming.DocumentThemeEnum={PrimaryFontColor:"primaryFontColor",PrimaryBackgroundColor:"primaryBackgroundColor",SecondaryFontColor:"secondaryFontColor",SecondaryBackgroundColor:"secondaryBackgroundColor",Accent1:"accent1",Accent2:"accent2",Accent3:"accent3",Accent4:"accent4",Accent5:"accent5",Accent6:"accent6",Hyperlink:"hyperlink",FollowedHyperlink:"followedHyperlink",HeaderLatinFont:"headerLatinFont",HeaderEastAsianFont:"headerEastAsianFont",HeaderScriptFont:"headerScriptFont",HeaderLocalizedFont:"headerLocalizedFont",BodyLatinFont:"bodyLatinFont",BodyEastAsianFont:"bodyEastAsianFont",BodyScriptFont:"bodyScriptFont",BodyLocalizedFont:"bodyLocalizedFont"};OSF.DDA.Theming.ConvertToDocumentTheme=function(f){var b=false,a=true;for(var d=[{name:"primaryFontColor",needToConvertToHex:a},{name:"primaryBackgroundColor",needToConvertToHex:a},{name:"secondaryFontColor",needToConvertToHex:a},{name:"secondaryBackgroundColor",needToConvertToHex:a},{name:"accent1",needToConvertToHex:a},{name:"accent2",needToConvertToHex:a},{name:"accent3",needToConvertToHex:a},{name:"accent4",needToConvertToHex:a},{name:"accent5",needToConvertToHex:a},{name:"accent6",needToConvertToHex:a},{name:"hyperlink",needToConvertToHex:a},{name:"followedHyperlink",needToConvertToHex:a},{name:"headerLatinFont",needToConvertToHex:b},{name:"headerEastAsianFont",needToConvertToHex:b},{name:"headerScriptFont",needToConvertToHex:b},{name:"headerLocalizedFont",needToConvertToHex:b},{name:"bodyLatinFont",needToConvertToHex:b},{name:"bodyEastAsianFont",needToConvertToHex:b},{name:"bodyScriptFont",needToConvertToHex:b},{name:"bodyLocalizedFont",needToConvertToHex:b}],e={},c=0;c 6 && v.slice(0, 5) === OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1) === OSF.DDA.SettingsManager.DataJSONSuffix) { + d = new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + } + else { + value = Sys.Serialization.JavaScriptSerializer.deserialize(value, true); + } + ret[key] = value; + } + catch (ex) { + } + } + return ret; + }, loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) { if (url && callback) { var doc = window.document; @@ -828,6 +876,14 @@ OSF.OUtil = (function () { } } }, + removeClass: function OSF_OUtil$removeClass(elmt, val) { + if (OSF.OUtil.hasClass(elmt, val)) { + var className = elmt.getAttribute(_classN); + var reg = new RegExp('(\\s|^)' + val + '(\\s|$)'); + className = className.replace(reg, ''); + elmt.setAttribute(_classN, className); + } + }, hasClass: function OSF_OUtil$hasClass(elmt, clsName) { var className = elmt.getAttribute(_classN); return className && className.match(new RegExp('(\\s|^)' + clsName + '(\\s|$)')); @@ -964,6 +1020,12 @@ OSF.OUtil.Guid = (function () { })(); window.OSF = OSF; OSF.OUtil.setNamespace("OSF", window); +OSF.MessageIDs = { + "FetchBundleUrl": 0, + "LoadReactBundle": 1, + "LoadBundleSuccess": 2, + "LoadBundleError": 3 +}; OSF.AppName = { Unsupported: 0, Excel: 1, @@ -991,7 +1053,10 @@ OSF.AppName = { OutlookAndroid: 4194304, OneNoteWinRT: 8388608, ExcelAndroid: 8388609, - VisioWebApp: 8388610 + VisioWebApp: 8388610, + OneNoteIOS: 8388611, + WordAndroid: 8388613, + PowerpointAndroid: 8388614 }; OSF.InternalPerfMarker = { DataCoercionBegin: "Agave.HostCall.CoerceDataStart", @@ -1021,7 +1086,9 @@ OSF.AgaveHostAction = { "EscExit": 15, "F2Exit": 16, "ExitNoFocusable": 17, - "ExitNoFocusableShift": 18 + "ExitNoFocusableShift": 18, + "MouseEnter": 19, + "MouseLeave": 20 }; OSF.SharedConstants = { "NotificationConversationIdSuffix": '_ntf' @@ -1155,6 +1222,10 @@ Microsoft.Office.WebExtension.Parameters = { Status: "status", PlatformType: "platformType", HostType: "hostType", + ForceConsent: "forceConsent", + ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + Reserved: "reserved", Xml: "xml", Namespace: "namespace", Prefix: "prefix", @@ -1186,7 +1257,10 @@ Microsoft.Office.WebExtension.Parameters = { MessageToParent: "messageToParent", DisplayInIframe: "displayInIframe", MessageContent: "messageContent", - AppCommandInvocationCompletedData: "appCommandInvocationCompletedData" + HideTitle: "hideTitle", + UseDeviceIndependentPixels: "useDeviceIndependentPixels", + AppCommandInvocationCompletedData: "appCommandInvocationCompletedData", + Base64: "base64" }; OSF.OUtil.setNamespace("DDA", OSF); OSF.DDA.DocumentMode = { @@ -1242,6 +1316,9 @@ OSF.DDA.MethodDispId = { dispidExecuteRichApiRequestMethod: 93, dispidAppCommandInvocationCompletedMethod: 94, dispidCloseContainerMethod: 97, + dispidGetAccessTokenMethod: 98, + dispidOpenBrowserWindow: 102, + dispidCreateDocumentMethod: 105, dispidGetSelectedTaskMethod: 110, dispidGetSelectedResourceMethod: 111, dispidGetTaskMethod: 112, @@ -1292,9 +1369,16 @@ OSF.DDA.EventDispId = { dispidDialogMessageReceivedEvent: 10, dispidDialogNotificationShownInAddinEvent: 11, dispidDialogParentMessageReceivedEvent: 12, + dispidObjectDeletedEvent: 13, + dispidObjectSelectionChangedEvent: 14, + dispidObjectDataChangedEvent: 15, + dispidContentControlAddedEvent: 16, dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, dispidAppCommandInvokedEvent: 39, dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, dispidTaskSelectionChangedEvent: 56, dispidResourceSelectionChangedEvent: 57, dispidViewSelectionChangedEvent: 58, @@ -1380,6 +1464,8 @@ OSF.DDA.ErrorCodeManager = (function () { ooeBrowserAPINotSupported: 5009, ooeInvalidParam: 5010, ooeRequestTimeout: 5011, + ooeInvalidOrTimedOutSession: 5012, + ooeInvalidApiArguments: 5013, ooeTooManyIncompleteRequests: 5100, ooeRequestTokenUnavailable: 5101, ooeActivityLimitReached: 5102, @@ -1415,7 +1501,18 @@ OSF.DDA.ErrorCodeManager = (function () { ooeEndUserAllow: 12008, ooeEndUserIgnore: 12009, ooeNotUILessDialog: 12010, - ooeCrossZone: 12011 + ooeCrossZone: 12011, + ooeNotSSOAgave: 13000, + ooeSSOUserNotSignedIn: 13001, + ooeSSOUserAborted: 13002, + ooeSSOUnsupportedUserIdentity: 13003, + ooeSSOInvalidResourceUrl: 13004, + ooeSSOInvalidGrant: 13005, + ooeSSOClientError: 13006, + ooeSSOServerError: 13007, + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009, + ooeSSOConnectionLost: 13010 }, initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported] = { name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotSupported }; @@ -1469,9 +1566,11 @@ OSF.DDA.ErrorCodeManager = (function () { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported] = { name: stringNS.L_APINotSupported, message: stringNS.L_BrowserAPINotSupported }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTimeout }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession] = { name: stringNS.L_InvalidOrTimedOutSession, message: stringNS.L_InvalidOrTimedOutSessionMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests] = { name: stringNS.L_APICallFailed, message: stringNS.L_TooManyIncompleteRequests }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTokenUnavailable }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached] = { name: stringNS.L_APICallFailed, message: stringNS.L_ActivityLimitReached }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments] = { name: stringNS.L_APICallFailed, message: stringNS.L_InvalidApiArgumentsMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound] = { name: stringNS.L_InvalidNode, message: stringNS.L_CustomXmlNodeNotFound }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError] = { name: stringNS.L_CustomXmlError, message: stringNS.L_CustomXmlError }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota] = { name: stringNS.L_CustomXmlExceedQuotaName, message: stringNS.L_CustomXmlExceedQuotaMessage }; @@ -1502,6 +1601,17 @@ OSF.DDA.ErrorCodeManager = (function () { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogRequireHTTPS }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_UserClickIgnore }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_NewWindowCrossZoneErrorString }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave] = { name: stringNS.L_APINotSupported, message: stringNS.L_InvalidSSOAddinMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn] = { name: stringNS.L_UserNotSignedIn, message: stringNS.L_UserNotSignedIn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted] = { name: stringNS.L_UserAborted, message: stringNS.L_UserAbortedMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity] = { name: stringNS.L_UnsupportedUserIdentity, message: stringNS.L_UnsupportedUserIdentityMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl] = { name: stringNS.L_InvalidResourceUrl, message: stringNS.L_InvalidResourceUrlMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant] = { name: stringNS.L_InvalidGrant, message: stringNS.L_InvalidGrantMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError] = { name: stringNS.L_SSOClientError, message: stringNS.L_SSOClientErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError] = { name: stringNS.L_SSOServerError, message: stringNS.L_SSOServerErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken] = { name: stringNS.L_AddinIsAlreadyRequestingToken, message: stringNS.L_AddinIsAlreadyRequestingTokenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory] = { name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost] = { name: stringNS.L_SSOConnectionLostError, message: stringNS.L_SSOConnectionLostErrorMessage }; } }; })(); @@ -2024,6 +2134,7 @@ var OfficeExt; web: Microsoft.Office.WebExtension.PlatformType.OfficeOnline, winrt: Microsoft.Office.WebExtension.PlatformType.Universal, win32: Microsoft.Office.WebExtension.PlatformType.PC, + mac: Microsoft.Office.WebExtension.PlatformType.Mac, ios: Microsoft.Office.WebExtension.PlatformType.iOS, android: Microsoft.Office.WebExtension.PlatformType.Android }; @@ -2197,6 +2308,16 @@ OSF.DDA.Context = function OSF_DDA_Context(officeAppContext, document, license, value: officeAppContext.ui }); } + if (officeAppContext.auth) { + OSF.OUtil.defineEnumerableProperty(this, "auth", { + value: officeAppContext.auth + }); + } + if (officeAppContext.application) { + OSF.OUtil.defineEnumerableProperty(this, "application", { + value: officeAppContext.application + }); + } if (officeAppContext.get_isDialog()) { var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); OSF.OUtil.defineEnumerableProperty(this, "requirements", { @@ -2239,6 +2360,8 @@ OSF.DDA.OutlookContext = function OSF_DDA_OutlookContext(appContext, settings, l }; OSF.OUtil.extend(OSF.DDA.OutlookContext, OSF.DDA.Context); OSF.DDA.OutlookAppOm = function OSF_DDA_OutlookAppOm(appContext, window, appReady) { }; +OSF.DDA.Application = function OSF_DDA_Application(officeAppContext) { +}; OSF.DDA.Document = function OSF_DDA_Document(officeAppContext, settings) { var mode; switch (officeAppContext.get_clientMode()) { @@ -2971,9 +3094,12 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod "ClearFormatsAsync": did.dispidClearFormatsMethod, "SetTableOptionsAsync": did.dispidSetTableOptionsMethod, "SetFormatsAsync": did.dispidSetFormatsMethod, + "GetAccessTokenAsync": did.dispidGetAccessTokenMethod, "ExecuteRichApiRequestAsync": did.dispidExecuteRichApiRequestMethod, "AppCommandInvocationCompletedAsync": did.dispidAppCommandInvocationCompletedMethod, "CloseContainerAsync": did.dispidCloseContainerMethod, + "OpenBrowserWindow": did.dispidOpenBrowserWindow, + "CreateDocumentAsync": did.dispidCreateDocumentMethod, "AddDataPartAsync": did.dispidAddDataPartMethod, "GetDataPartByIdAsync": did.dispidGetDataPartByIdMethod, "GetDataPartsByNameSpaceAsync": did.dispidGetDataPartsByNamespaceMethod, @@ -3013,13 +3139,13 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod } jsom = OSF.DDA.SyncMethodNames; did = OSF.DDA.MethodDispId; - var asyncMethodMap = { + var syncMethodMap = { "MessageParent": did.dispidMessageParentMethod, "SendMessage": did.dispidSendMessageMethod }; - for (var method in asyncMethodMap) { + for (var method in syncMethodMap) { if (jsom[method]) { - dispIdMap[jsom[method].id] = asyncMethodMap[method]; + dispIdMap[jsom[method].id] = syncMethodMap[method]; } } jsom = Microsoft.Office.WebExtension.EventType; @@ -3035,7 +3161,14 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod "AppCommandInvoked": did.dispidAppCommandInvokedEvent, "DialogMessageReceived": did.dispidDialogMessageReceivedEvent, "DialogParentMessageReceived": did.dispidDialogParentMessageReceivedEvent, + "ObjectDeleted": did.dispidObjectDeletedEvent, + "ObjectSelectionChanged": did.dispidObjectSelectionChangedEvent, + "ObjectDataChanged": did.dispidObjectDataChangedEvent, + "ContentControlAdded": did.dispidContentControlAddedEvent, + "RichApiMessage": did.dispidRichApiMessageEvent, "ItemChanged": did.dispidOlkItemSelectedChangedEvent, + "RecipientsChanged": did.dispidOlkRecipientsChangedEvent, + "AppointmentTimeChanged": did.dispidOlkAppointmentTimeChangedEvent, "TaskSelectionChanged": did.dispidTaskSelectionChangedEvent, "ResourceSelectionChanged": did.dispidResourceSelectionChangedEvent, "ViewSelectionChanged": did.dispidViewSelectionChangedEvent, @@ -3048,6 +3181,12 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod dispIdMap[jsom[event]] = eventMap[event]; } } + function IsObjectEvent(dispId) { + return (dispId == OSF.DDA.EventDispId.dispidObjectDeletedEvent || + dispId == OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent || + dispId == OSF.DDA.EventDispId.dispidObjectDataChangedEvent || + dispId == OSF.DDA.EventDispId.dispidContentControlAddedEvent); + } function onException(ex, asyncMethodCall, suppliedArgs, callArgs) { if (typeof ex == "number") { if (!callArgs) { @@ -3073,11 +3212,13 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod window.Excel._RedirectV1APIs = true; } if (window.Excel && window.Excel._RedirectV1APIs && (richApiInExcelMethodSubstitution = window.Excel._V1APIMap[methodName])) { + var preprocessedCallArgs = OSF.OUtil.shallowCopy(callArgs); + delete preprocessedCallArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; if (richApiInExcelMethodSubstitution.preprocess) { - callArgs = richApiInExcelMethodSubstitution.preprocess(callArgs); + preprocessedCallArgs = richApiInExcelMethodSubstitution.preprocess(preprocessedCallArgs); } var ctx = new window.Excel.RequestContext(); - var result = richApiInExcelMethodSubstitution.call(ctx, callArgs); + var result = richApiInExcelMethodSubstitution.call(ctx, preprocessedCallArgs); ctx.sync() .then(function () { var response = result.value; @@ -3085,7 +3226,7 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod delete response["status"]; delete response["@odata.type"]; if (richApiInExcelMethodSubstitution.postprocess) { - response = richApiInExcelMethodSubstitution.postprocess(response, callArgs); + response = richApiInExcelMethodSubstitution.postprocess(response, preprocessedCallArgs); } if (status != 0) { response = OSF.DDA.ErrorCodeManager.getErrorArgs(status); @@ -3103,6 +3244,7 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod else { hostCallArgs = callArgs; } + var startTime = (new Date()).getTime(); delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ "dispId": dispId, "hostCallArgs": hostCallArgs, @@ -3123,6 +3265,9 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod } var payload = asyncMethodCall.processResponse(status, responseArgs, caller, callArgs); OSF.DDA.issueAsyncResult(callArgs, status, payload); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(dispId, hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); + } } }); } @@ -3134,9 +3279,11 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod this[OSF.DDA.DispIdHost.Methods.AddEventHandler] = function OSF_DDA_DispIdHost_Facade$AddEventHandler(suppliedArguments, eventDispatch, caller, isPopupWindow) { var callArgs; var eventType, handler; + var isObjectEvent = false; function onEnsureRegistration(status) { if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { - var added = eventDispatch.addEventHandler(eventType, handler); + var added = !isObjectEvent ? eventDispatch.addEventHandler(eventType, handler) : + eventDispatch.addObjectEventHandler(eventType, callArgs[Microsoft.Office.WebExtension.Parameters.Id], handler); if (!added) { status = OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed; } @@ -3156,19 +3303,25 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); return; } - if (eventDispatch.getEventHandlerCount(eventType) == 0) { - var dispId = dispIdMap[eventType]; + var dispId = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId); + var targetId = (isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId) : eventDispatch.getEventHandlerCount(eventType); + if (count == 0) { var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; invoker({ "eventType": eventType, "dispId": dispId, - "targetId": caller.id || "", + "targetId": targetId, "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, "onComplete": onEnsureRegistration, "onEvent": function handleEvent(hostArgs) { var args = parameterMap.fromHost(dispId, hostArgs); - eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType, caller, args)); + if (!isObjectEvent) + eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType, caller, args)); + else + eventDispatch.fireObjectEvent(targetId, OSF.DDA.OMFactory.manufactureEventArgs(eventType, targetId, args)); } }); } @@ -3183,6 +3336,7 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod this[OSF.DDA.DispIdHost.Methods.RemoveEventHandler] = function OSF_DDA_DispIdHost_Facade$RemoveEventHandler(suppliedArguments, eventDispatch, caller) { var callArgs; var eventType, handler; + var isObjectEvent = false; function onEnsureRegistration(status) { var error; if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { @@ -3195,22 +3349,25 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + var dispId = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId); + var targetId = (isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); var status, removeSuccess; if (handler === null) { - removeSuccess = eventDispatch.clearEventHandlers(eventType); + removeSuccess = isObjectEvent ? eventDispatch.clearObjectEventHandlers(eventType, targetId) : eventDispatch.clearEventHandlers(eventType); status = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; } else { - removeSuccess = eventDispatch.removeEventHandler(eventType, handler); + removeSuccess = isObjectEvent ? eventDispatch.removeObjectEventHandler(eventType, targetId, handler) : eventDispatch.removeEventHandler(eventType, handler); status = removeSuccess ? OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess : OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist; } - if (removeSuccess && eventDispatch.getEventHandlerCount(eventType) == 0) { - var dispId = dispIdMap[eventType]; + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId) : eventDispatch.getEventHandlerCount(eventType); + if (removeSuccess && count == 0) { var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; invoker({ "eventType": eventType, "dispId": dispId, - "targetId": caller.id || "", + "targetId": targetId, "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, "onComplete": onEnsureRegistration @@ -3403,12 +3560,45 @@ OSF.ShowWindowDialogParameterKeys = { Url: "url", Width: "width", Height: "height", - DisplayInIframe: "displayInIframe" + DisplayInIframe: "displayInIframe", + HideTitle: "hideTitle", + UseDeviceIndependentPixels: "useDeviceIndependentPixels" }; OSF.HostThemeButtonStyleKeys = { ButtonBorderColor: "buttonBorderColor", ButtonBackgroundColor: "buttonBackgroundColor" }; +OSF.OmexPageParameterKeys = { + AppName: "client", + AppVersion: "cv", + AppUILocale: "ui", + AppDomain: "appDomain", + StoreLocator: "rs", + AssetId: "assetid", + NotificationType: "notificationType", + AppCorrelationId: "corr", + AuthType: "authType" +}; +OSF.AuthType = { + Anonymous: 0, + MSA: 1, + OrgId: 2, + ADAL: 3 +}; +OSF.OmexMessageKeys = { + MessageType: "messageType", + MessageValue: "messageValue" +}; +OSF.OmexRemoveAddinMessageKeys = { + RemoveAddinResultCode: "resultCode", + RemoveAddinResultValue: "resultValue" +}; +OSF.OmexRemoveAddinResultCode = { + Success: 0, + ClientError: 400, + ServerError: 500, + UnknownError: 600 +}; var OfficeExt; (function (OfficeExt) { var WACUtils; @@ -3470,6 +3660,38 @@ var OfficeExt; return url_parser.protocol + "//" + url_parser.host; } WACUtils.getDomainForUrl = getDomainForUrl; + function shouldUseLocalStorageToPassMessage() { + try { + var osList = [ + "Windows NT 6.1", + "Windows NT 6.2", + "Windows NT 6.3" + ]; + var userAgent = window.navigator.userAgent; + for (var i = 0, len = osList.length; i < len; i++) { + if (userAgent.indexOf(osList[i]) > -1) { + return isInternetExplorer(); + } + } + return false; + } + catch (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("Error happens in shouldUseLocalStorageToPassMessage: " + e); + return false; + } + } + WACUtils.shouldUseLocalStorageToPassMessage = shouldUseLocalStorageToPassMessage; + function isInternetExplorer() { + try { + var userAgent = window.navigator.userAgent; + return userAgent.indexOf("MSIE ") > -1 || userAgent.indexOf("Trident/") > -1 || userAgent.indexOf("Edge/") > -1; + } + catch (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("Error happens in isInternetExplorer: " + e); + return false; + } + } + WACUtils.isInternetExplorer = isInternetExplorer; })(WACUtils = OfficeExt.WACUtils || (OfficeExt.WACUtils = {})); })(OfficeExt || (OfficeExt = {})); var OfficeExt; @@ -3852,14 +4074,22 @@ var OfficeExt; OSF.OUtil.setNamespace("Microsoft", window); OSF.OUtil.setNamespace("Office", Microsoft); OSF.OUtil.setNamespace("Common", Microsoft.Office); +Microsoft.Office.Common.InvokeType = { + "async": 0, + "sync": 1, + "asyncRegisterEvent": 2, + "asyncUnregisterEvent": 3, + "syncRegisterEvent": 4, + "syncUnregisterEvent": 5 +}; OSF.SerializerVersion = { MsAjax: 0, Browser: 1 }; var OfficeExt; (function (OfficeExt) { - function appSpecificCheckOriginFunction(url, eventObj, messageObj, checkOriginFunction) { - return true; + function appSpecificCheckOriginFunction(allowed_domains, eventObj, origin, checkOriginFunction) { + return false; } ; OfficeExt.appSpecificCheckOrigin = appSpecificCheckOriginFunction; @@ -4353,8 +4583,11 @@ Microsoft.Office.Common.XdmCommunicationManager = (function () { var conversation = serviceEndPoint._conversations[messageObject._conversationId]; serializerVersion = conversation.serializerVersion != null ? conversation.serializerVersion : serializerVersion; ; - if (!_checkOrigin(conversation.url, e.origin) && !_checkOriginWithAppDomains(serviceEndPoint._appDomains[messageObject._conversationId], e.origin)) { - throw "Failed origin check"; + var allowedDomains = [conversation.url].concat(serviceEndPoint._appDomains[messageObject._conversationId]); + if (!_checkOriginWithAppDomains(allowedDomains, e.origin)) { + if (!OfficeExt.appSpecificCheckOrigin(allowedDomains, e, messageObject._origin, _checkOriginWithAppDomains)) { + throw "Failed origin check"; + } } var policyManager = serviceEndPoint.getPolicyManager(); if (policyManager && !policyManager.checkPermission(messageObject._conversationId, messageObject._actionName, messageObject._data)) { @@ -4784,7 +5017,9 @@ OSF.DDA.WAC.Delegate.executeAsync = function OSF_DDA_WAC_Delegate$executeAsync(a if (args.onCalling) { args.onCalling(); } - var startTime = (new Date()).getTime(); + if (!OSF.getClientEndPoint()) { + return; + } OSF.getClientEndPoint().invoke("executeMethod", function OSF_DDA_WAC_Delegate$OMFacade$OnResponse(xdmStatus, payload) { if (args.onReceiving) { args.onReceiving(); @@ -4807,9 +5042,6 @@ OSF.DDA.WAC.Delegate.executeAsync = function OSF_DDA_WAC_Delegate$executeAsync(a if (args.onComplete) { args.onComplete(error, payload); } - if (OSF.AppTelemetry) { - OSF.AppTelemetry.onMethodDone(args.dispId, args.hostCallArgs, Math.abs((new Date()).getTime() - startTime), error); - } }, args.hostCallArgs); }; OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent = function OSF_DDA_WAC_Delegate$GetOnAfterRegisterEvent(register, args) { @@ -4854,6 +5086,9 @@ OSF.DDA.WAC.Delegate.registerEventAsync = function OSF_DDA_WAC_Delegate$Register if (args.onCalling) { args.onCalling(); } + if (!OSF.getClientEndPoint()) { + return; + } OSF.getClientEndPoint().registerForEvent(OSF.DDA.getXdmEventName(args.targetId, args.eventType), function OSF_DDA_WACOMFacade$OnEvent(payload) { if (args.onEvent) { args.onEvent(payload); @@ -4871,6 +5106,9 @@ OSF.DDA.WAC.Delegate.unregisterEventAsync = function OSF_DDA_WAC_Delegate$Unregi if (args.onCalling) { args.onCalling(); } + if (!OSF.getClientEndPoint()) { + return; + } OSF.getClientEndPoint().unregisterForEvent(OSF.DDA.getXdmEventName(args.targetId, args.eventType), OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(false, args), { "controlId": OSF._OfficeAppFactory.getId(), "eventDispId": args.dispId, @@ -5226,6 +5464,12 @@ OSF.InitializationHelper.prototype.initWebDialog = function OSF_InitializationHe } } }; +OSF.InitializationHelper.prototype.initWebAuth = function OSF_InitializationHelper$initWebAuth(appContext) { + if (OSF.DDA.Auth) { + appContext.auth = new OSF.DDA.Auth(); + OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth, [OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]); + } +}; OSF.getClientEndPoint = function OSF$getClientEndPoint() { var initializationHelper = OSF._OfficeAppFactory.getInitializationHelper(); return initializationHelper._webAppState.clientEndPoint; @@ -5726,7 +5970,7 @@ var OSFAriaLogger; function AriaLogger() { } AriaLogger.prototype.getAriaCDNLocation = function () { - return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath() + "/ariatelemetry/aria-web-telemetry-2.8.0.min.js"); + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath() + "/ariatelemetry/aria-web-telemetry.js"); }; AriaLogger.getInstance = function () { if (AriaLogger.AriaLoggerObj === undefined) { @@ -5743,13 +5987,10 @@ var OSFAriaLogger; try { if (!this.ALogger) { var OfficeExtensibilityTenantID = "db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; - var configuration = new microsoft.applications.telemetry.LogConfiguration(); - configuration.enableAutoUserSession = true; - microsoft.applications.telemetry.LogManager.initialize(OfficeExtensibilityTenantID, configuration); - this.ALogger = new microsoft.applications.telemetry.Logger(); + this.ALogger = AWTLogManager.initialize(OfficeExtensibilityTenantID); } - var eventProperties = new microsoft.applications.telemetry.EventProperties(); - eventProperties.name = "Office.Extensibility.OfficeJS." + tableName; + var eventProperties = new AWTEventProperties(); + eventProperties.setName("Office.Extensibility.OfficeJS." + tableName); for (var key in telemetryData) { if (key.toLowerCase() !== "table") { eventProperties.setProperty(key, telemetryData[key]); @@ -5782,6 +6023,7 @@ var OSFAppTelemetry; var sessionId = OSF.OUtil.Guid.generateNewGuid(); var osfControlAppCorrelationId = ""; var omexDomainRegex = new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"); + OSFAppTelemetry.enableTelemetry = true; ; var AppInfo = (function () { function AppInfo() { @@ -5865,17 +6107,19 @@ var OSFAppTelemetry; function AppLogger() { } AppLogger.prototype.LogData = function (data) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, data.SerializeRow(), OSF.Logger.SendFlag.none); - OSFAriaLogger.AriaLogger.getInstance().logData(data); + try { + OSFAriaLogger.AriaLogger.getInstance().logData(data); + } + catch (e) { + } }; AppLogger.prototype.LogRawData = function (log) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, log, OSF.Logger.SendFlag.none); try { OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)); } @@ -5915,7 +6159,7 @@ var OSFAppTelemetry; } appInfo.message = context.get_hostCustomMessage(); appInfo.officeJSVersion = OSF.ConstantNames.FileVersion; - appInfo.hostJSVersion = "16.0.7920.1000"; + appInfo.hostJSVersion = "16.0.8916.1000"; if (context._wacHostEnvironment) { appInfo.wacHostEnvironment = context._wacHostEnvironment; } @@ -7176,11 +7420,18 @@ OSF.DDA.WAC.Delegate.ParameterMap.define({ Microsoft.Office.WebExtension.EventType = {}; OSF.EventDispatch = function OSF_EventDispatch(eventTypes) { this._eventHandlers = {}; + this._objectEventHandlers = {}; this._queuedEventsArgs = {}; - for (var entry in eventTypes) { - var eventType = eventTypes[entry]; - this._eventHandlers[eventType] = []; - this._queuedEventsArgs[eventType] = []; + if (eventTypes != null) { + for (var i = 0; i < eventTypes.length; i++) { + var eventType = eventTypes[i]; + var isObjectEvent = (eventType == "objectDeleted" || eventType == "objectSelectionChanged" || eventType == "objectDataChanged" || eventType == "contentControlAdded"); + if (!isObjectEvent) + this._eventHandlers[eventType] = []; + else + this._objectEventHandlers[eventType] = {}; + this._queuedEventsArgs[eventType] = []; + } } }; OSF.EventDispatch.prototype = { @@ -7188,23 +7439,37 @@ OSF.EventDispatch.prototype = { var events = []; for (var eventName in this._eventHandlers) events.push(eventName); + for (var eventName in this._objectEventHandlers) + events.push(eventName); return events; }, supportsEvent: function OSF_EventDispatch$supportsEvent(event) { - var isSupported = false; for (var eventName in this._eventHandlers) { - if (event == eventName) { - isSupported = true; - break; - } + if (event == eventName) + return true; } - return isSupported; + for (var eventName in this._objectEventHandlers) { + if (event == eventName) + return true; + } + return false; }, hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) { var handlers = this._eventHandlers[eventType]; if (handlers && handlers.length > 0) { - for (var h in handlers) { - if (handlers[h] === handler) + for (var i = 0; i < handlers.length; i++) { + if (handlers[i] === handler) + return true; + } + } + return false; + }, + hasObjectEventHandler: function OSF_EventDispatch$hasObjectEventHandler(eventType, objectId, handler) { + var handlers = this._objectEventHandlers[eventType]; + if (handlers != null) { + var _handlers = handlers[objectId]; + for (var i = 0; _handlers != null && i < _handlers.length; i++) { + if (_handlers[i] === handler) return true; } } @@ -7223,6 +7488,19 @@ OSF.EventDispatch.prototype = { return false; } }, + addObjectEventHandler: function OSF_EventDispatch$addObjectEventHandler(eventType, objectId, handler) { + if (typeof handler != "function") { + return false; + } + var handlers = this._objectEventHandlers[eventType]; + if (handlers && !this.hasObjectEventHandler(eventType, objectId, handler)) { + if (handlers[objectId] == null) + handlers[objectId] = []; + handlers[objectId].push(handler); + return true; + } + return false; + }, addEventHandlerAndFireQueuedEvent: function OSF_EventDispatch$addEventHandlerAndFireQueuedEvent(eventType, handler) { var handlers = this._eventHandlers[eventType]; var isFirstHandler = handlers.length == 0; @@ -7244,6 +7522,19 @@ OSF.EventDispatch.prototype = { } return false; }, + removeObjectEventHandler: function OSF_EventDispatch$removeObjectEventHandler(eventType, objectId, handler) { + var handlers = this._objectEventHandlers[eventType]; + if (handlers != null) { + var _handlers = handlers[objectId]; + for (var i = 0; _handlers != null && i < _handlers.length; i++) { + if (_handlers[i] === handler) { + _handlers.splice(i, 1); + return true; + } + } + } + return false; + }, clearEventHandlers: function OSF_EventDispatch$clearEventHandlers(eventType) { if (typeof this._eventHandlers[eventType] != "undefined" && this._eventHandlers[eventType].length > 0) { this._eventHandlers[eventType] = []; @@ -7251,23 +7542,51 @@ OSF.EventDispatch.prototype = { } return false; }, + clearObjectEventHandlers: function OSF_EventDispatch$clearObjectEventHandlers(eventType, objectId) { + if (this._objectEventHandlers[eventType] != null && this._objectEventHandlers[eventType][objectId] != null) { + this._objectEventHandlers[eventType][objectId] = []; + return true; + } + return false; + }, getEventHandlerCount: function OSF_EventDispatch$getEventHandlerCount(eventType) { return this._eventHandlers[eventType] != undefined ? this._eventHandlers[eventType].length : -1; }, + getObjectEventHandlerCount: function OSF_EventDispatch$getObjectEventHandlerCount(eventType, objectId) { + if (this._objectEventHandlers[eventType] == null || this._objectEventHandlers[eventType][objectId] == null) + return 0; + return this._objectEventHandlers[eventType][objectId].length; + }, fireEvent: function OSF_EventDispatch$fireEvent(eventArgs) { if (eventArgs.type == undefined) return false; var eventType = eventArgs.type; if (eventType && this._eventHandlers[eventType]) { var eventHandlers = this._eventHandlers[eventType]; - for (var handler in eventHandlers) - eventHandlers[handler](eventArgs); + for (var i = 0; i < eventHandlers.length; i++) { + eventHandlers[i](eventArgs); + } return true; } else { return false; } }, + fireObjectEvent: function OSF_EventDispatch$fireObjectEvent(objectId, eventArgs) { + if (eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if (eventType && this._objectEventHandlers[eventType]) { + var eventHandlers = this._objectEventHandlers[eventType]; + var _handlers = eventHandlers[objectId]; + if (_handlers != null) { + for (var i = 0; i < _handlers.length; i++) + _handlers[i](eventArgs); + return true; + } + } + return false; + }, fireOrQueueEvent: function OSF_EventDispatch$fireOrQueueEvent(eventArgs) { var eventType = eventArgs.type; if (eventType && this._eventHandlers[eventType]) { @@ -7337,6 +7656,15 @@ OSF.DDA.OMFactory.manufactureEventArgs = function OSF_DDA_OMFactory$manufactureE case Microsoft.Office.WebExtension.EventType.AppCommandInvoked: args = OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(eventProperties); break; + case Microsoft.Office.WebExtension.EventType.ObjectDeleted: + case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged: + case Microsoft.Office.WebExtension.EventType.ObjectDataChanged: + case Microsoft.Office.WebExtension.EventType.ContentControlAdded: + args = new OSF.DDA.ObjectEventArgs(eventType, eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); + break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args = new OSF.DDA.RichApiMessageEventArgs(eventType, eventProperties); + break; case Microsoft.Office.WebExtension.EventType.DataNodeInserted: args = new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); break; @@ -7362,10 +7690,28 @@ OSF.DDA.OMFactory.manufactureEventArgs = function OSF_DDA_OMFactory$manufactureE args = new OSF.DDA.DialogParentEventArgs(eventProperties); break; case Microsoft.Office.WebExtension.EventType.ItemChanged: - if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlookwebapp") { + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { args = new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); target.initialize(args["initialData"]); - target.setCurrentItemNumber(args["itemNumber"].itemNumber); + if (OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "win32" || OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "mac") { + target.setCurrentItemNumber(args["itemNumber"].itemNumber); + } + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); } else { throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); @@ -8205,52 +8551,10 @@ OSF.DDA.SettingsManager = { DateJSONPrefix: "Date(", DataJSONSuffix: ")", serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) { - var ret = {}; - for (var key in settingsCollection) { - var value = settingsCollection[key]; - try { - if (JSON) { - value = JSON.stringify(value, function dateReplacer(k, v) { - return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix + this[k].getTime() + OSF.DDA.SettingsManager.DataJSONSuffix : v; - }); - } - else { - value = Sys.Serialization.JavaScriptSerializer.serialize(value); - } - ret[key] = value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.serializeSettings(settingsCollection); }, deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) { - var ret = {}; - serializedSettings = serializedSettings || {}; - for (var key in serializedSettings) { - var value = serializedSettings[key]; - try { - if (JSON) { - value = JSON.parse(value, function dateReviver(k, v) { - var d; - if (typeof v === 'string' && v && v.length > 6 && v.slice(0, 5) === OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1) === OSF.DDA.SettingsManager.DataJSONSuffix) { - d = new Date(parseInt(v.slice(5, -1))); - if (d) { - return d; - } - } - return v; - }); - } - else { - value = Sys.Serialization.JavaScriptSerializer.deserialize(value, true); - } - ret[key] = value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.deserializeSettings(serializedSettings); } }; OSF.DDA.Settings = function OSF_DDA_Settings(settings) { @@ -8686,6 +8990,16 @@ OSF.DDA.DocumentSelectionChangedEventArgs = function OSF_DDA_DocumentSelectionCh } }); }; +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectDeleted: "objectDeleted" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectSelectionChanged: "objectSelectionChanged" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectDataChanged: "objectDataChanged" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ContentControlAdded: "contentControlAdded" }); +OSF.DDA.ObjectEventArgs = function OSF_DDA_ObjectEventArgs(eventType, object) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { value: eventType }, + "object": { value: object } + }); +}; OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent }); OSF.DialogShownStatus = { hasDialogShown: false, isWindowDialog: false }; OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { @@ -8817,6 +9131,20 @@ OSF.DDA.AsyncMethodCalls.define({ "types": ["boolean"], "defaultValue": false } + }, + { + name: Microsoft.Office.WebExtension.Parameters.HideTitle, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels, + value: { + "types": ["boolean"], + "defaultValue": false + } } ], privateStateCallbacks: [], @@ -8854,13 +9182,13 @@ OSF.DDA.AsyncMethodCalls.define({ if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] <= 0) { callArgs[Microsoft.Office.WebExtension.Parameters.Width] = 1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Width] = 99; } if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] <= 0) { callArgs[Microsoft.Office.WebExtension.Parameters.Height] = 1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Height] = 99; } if (!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) { @@ -9044,6 +9372,7 @@ var OfficeExt; var showDialogCallback = null; var hasCrossZoneNotification = false; var checkWindowDialogCloseInterval = -1; + var messageParentKey = "messageParentKey"; var hostThemeButtonStyle = null; var commonButtonBorderColor = "#ababab"; var commonButtonBackgroundColor = "#ffffff"; @@ -9052,6 +9381,7 @@ var OfficeExt; var crossZoneNotificationId = "crossZoneNotification"; var configureBrowserLinkId = "configureBrowserLink"; var dialogNotificationTextPanelId = "dialogNotificationTextPanel"; + var shouldUseLocalStorageToPassMessage = OfficeExt.WACUtils.shouldUseLocalStorageToPassMessage(); var registerDialogNotificationShownArgs = { "dispId": OSF.DDA.EventDispId.dispidDialogNotificationShownInAddinEvent, "eventType": OSF.DDA.Marshaling.DialogNotificationShownEventType.DialogNotificationShown, @@ -9075,6 +9405,10 @@ var OfficeExt; Dialog.removeEventListenersForDialog = removeEventListenersForDialog; function handleNewWindowDialog(dialogInfo) { try { + if (OSF._OfficeAppFactory.getInitializationHelper()._appContext._skipNewWindowNotification) { + showDialog(dialogInfo); + return; + } hasCrossZoneNotification = false; var ignoreButtonKeyDownClick = false; var hostInfoObj = OSF._OfficeAppFactory.getInitializationHelper()._hostInfo; @@ -9165,7 +9499,12 @@ var OfficeExt; if (windowInstance != null && !windowInstance.closed) { windowInstance.close(); } - window.removeEventListener("message", receiveMessage); + if (shouldUseLocalStorageToPassMessage) { + window.removeEventListener("storage", storageChangedHandler); + } + else { + window.removeEventListener("message", receiveMessage); + } window.clearInterval(checkWindowDialogCloseInterval); windowInstance = null; callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); @@ -9184,10 +9523,23 @@ var OfficeExt; Dialog.closeDialog = closeDialog; function messageParent(params) { var message = params.hostCallArgs[Microsoft.Office.WebExtension.Parameters.MessageToParent]; - var appDomains = OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains; - if (appDomains) { - for (var i = 0; i < appDomains.length && appDomains[i].indexOf("://") !== -1; i++) { - window.opener.postMessage(message, appDomains[i]); + if (shouldUseLocalStorageToPassMessage) { + try { + var messageKey = OSF._OfficeAppFactory.getInitializationHelper()._webAppState.id + messageParentKey; + window.localStorage.setItem(messageKey, message); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Error happened during messageParent method:" + e); + } + } + } + else { + var appDomains = OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains; + if (appDomains) { + for (var i = 0; i < appDomains.length && appDomains[i].indexOf("://") !== -1; i++) { + window.opener.postMessage(message, appDomains[i]); + } } } } @@ -9308,6 +9660,22 @@ var OfficeExt; } } } + function storageChangedHandler(event) { + var messageKey = OSF._OfficeAppFactory.getInitializationHelper()._webAppState.id + messageParentKey; + if (event.key == messageKey) { + try { + var dialogMessageReceivedArgs = {}; + dialogMessageReceivedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType] = OSF.DialogMessageType.DialogMessageReceived; + dialogMessageReceivedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent] = event.newValue; + handler(dialogMessageReceivedArgs); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Error happened during storage changed handler." + e); + } + } + } + } function showDialog(dialogInfo) { var hostInfoObj = OSF._OfficeAppFactory.getInitializationHelper()._hostInfo; var hostInfoVals = [ @@ -9325,8 +9693,8 @@ var OfficeExt; var windowName = JSON.parse(window.name); windowName[OSF.WindowNameItemKeys.HostInfo] = hostInfo; windowName[OSF.WindowNameItemKeys.AppContext] = appContext; - var width = dialogInfo[OSF.ShowWindowDialogParameterKeys.Width] * appContext._clientWindowWidth / 100; - var height = dialogInfo[OSF.ShowWindowDialogParameterKeys.Height] * appContext._clientWindowHeight / 100; + var width = dialogInfo[OSF.ShowWindowDialogParameterKeys.Width] * screen.width / 100; + var height = dialogInfo[OSF.ShowWindowDialogParameterKeys.Height] * screen.height / 100; var left = appContext._clientWindowWidth / 2 - width / 2; var top = appContext._clientWindowHeight / 2 - height / 2; var windowSpecs = "width=" + width + ", height=" + height + ", left=" + left + ", top=" + top + ",channelmode=no,directories=no,fullscreen=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=yes,toolbar=no"; @@ -9338,12 +9706,22 @@ var OfficeExt; showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone); return; } - window.addEventListener("message", receiveMessage); + if (shouldUseLocalStorageToPassMessage) { + window.addEventListener("storage", storageChangedHandler); + } + else { + window.addEventListener("message", receiveMessage); + } function checkWindowClose() { try { if (windowInstance == null || windowInstance.closed) { window.clearInterval(checkWindowDialogCloseInterval); - window.removeEventListener("message", receiveMessage); + if (shouldUseLocalStorageToPassMessage) { + window.removeEventListener("storage", storageChangedHandler); + } + else { + window.removeEventListener("message", receiveMessage); + } var dialogClosedArgs = {}; dialogClosedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType] = OSF.DialogMessageType.DialogClosed; handler(dialogClosedArgs); @@ -9535,7 +9913,14 @@ OSF.DDA.WAC.Delegate.openDialog = function OSF_DDA_WAC_Delegate$OpenDialog(args) var callback = OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(true, args); function showDialogCallback(status) { var payload = { "Error": status }; - callback(Microsoft.Office.Common.InvokeResultCode.noError, payload); + try { + callback(Microsoft.Office.Common.InvokeResultCode.noError, payload); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Exception happens at showDialogCallback." + e); + } + } } if (OSF.DialogShownStatus.hasDialogShown) { showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened); @@ -9590,7 +9975,14 @@ OSF.DDA.WAC.Delegate.closeDialog = function OSF_DDA_WAC_Delegate$CloseDialog(arg var callback = OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(false, args); function closeDialogCallback(status) { var payload = { "Error": status }; - callback(Microsoft.Office.Common.InvokeResultCode.noError, payload); + try { + callback(Microsoft.Office.Common.InvokeResultCode.noError, payload); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Exception happens at closeDialogCallback." + e); + } + } } if (!OSF.DialogShownStatus.hasDialogShown) { closeDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeWebDialogClosed); @@ -9690,6 +10082,61 @@ var OfficeExt; })(Snapshot = AddinNativeAction.Snapshot || (AddinNativeAction.Snapshot = {})); })(AddinNativeAction = OfficeExt.AddinNativeAction || (OfficeExt.AddinNativeAction = {})); })(OfficeExt || (OfficeExt = {})); +OSF.DDA.AsyncMethodNames.addNames({ GetAccessTokenAsync: "getAccessTokenAsync" }); +OSF.DDA.Auth = function OSF_DDA_Auth() { +}; +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetAccessTokenAsync, + requiredArguments: [], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.ForceConsent, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, + value: { + "types": ["string"], + "defaultValue": "" + } + } + ], + onSucceeded: function (dataDescriptor, caller, callArgs) { + var data = dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + return data; + } +}); +OSF.OUtil.setNamespace("Marshaling", OSF.DDA); +OSF.OUtil.setNamespace("SingleSignOn", OSF.DDA.Marshaling); +OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys = { + ForceConsent: "forceConsent", + ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge" +}; +OSF.DDA.Marshaling.SingleSignOn.AccessTokenResultKeys = { + AccessToken: "accessToken" +}; +OSF.DDA.WAC.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetAccessTokenMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.ForceConsent, value: OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.ForceConsent }, + { name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, value: OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.ForceAddAccount }, + { name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, value: OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.AuthChallenge } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.Marshaling.SingleSignOn.AccessTokenResultKeys.AccessToken } + ] +}); var OSFPPTWAC; (function (OSFPPTWAC) { var PowerPointDocument = (function () { @@ -9703,8 +10150,7 @@ var OSFPPTWAC; OSF.DDA.AsyncMethodNames.GoToByIdAsync, OSF.DDA.AsyncMethodNames.GetActiveViewAsync, OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync, - OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync, - OSF.DDA.SyncMethodNames.MessageParent + OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync ]); OSF.OUtil.finalizeProperties(this); } @@ -9727,11 +10173,12 @@ OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize = fu OSF.WebApp._UpdateLinksForHostAndXdmInfo(); var license = new OSF.DDA.License(appContext.get_eToken()); this.initWebDialog(appContext); + this.initWebAuth(appContext); OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(appContext, appContext.doc, license)); var getActivationCompletedStatusCallback; OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.WAC.getDelegateMethods, OSF.DDA.WAC.Delegate.ParameterMap)); getActivationCompletedStatusCallback = function (invokeResultCode, status) { - if (invokeResultCode == 0 && status != true) { + if (invokeResultCode == 0 && status != true && OSF.getClientEndPoint()) { OSF.getClientEndPoint().registerForEvent("activationCompleted", function () { var reason = appContext.get_reason(); Microsoft.Office.WebExtension.initialize(reason); diff --git a/node_modules/@microsoft/office-js/dist/powerpoint-web-16.00.js b/node_modules/@microsoft/office-js/dist/powerpoint-web-16.00.js index 7724796..7ebb7e0 100644 --- a/node_modules/@microsoft/office-js/dist/powerpoint-web-16.00.js +++ b/node_modules/@microsoft/office-js/dist/powerpoint-web-16.00.js @@ -1,5 +1,5 @@ /* PowerPointer web application specific API library */ -/* Version: 16.0.7920.1000 */ +/* Version: 16.0.8916.1000 */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ @@ -9,4 +9,4 @@ Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419. */ -var __extends = this && this.__extends || function (b, a) { for (var c in a) if (a.hasOwnProperty(c)) b[c] = a[c]; function d() { this.constructor = b } b.prototype = a === null ? Object.create(a) : (d.prototype = a.prototype, new d) }, OfficeExt; (function (b) { var a = function () { var a = true; function b() { } b.prototype.isMsAjaxLoaded = function () { var b = "function", c = "undefined"; if (typeof Sys !== c && typeof Type !== c && Sys.StringBuilder && typeof Sys.StringBuilder === b && Type.registerNamespace && typeof Type.registerNamespace === b && Type.registerClass && typeof Type.registerClass === b && typeof Function._validateParams === b && Sys.Serialization && Sys.Serialization.JavaScriptSerializer && typeof Sys.Serialization.JavaScriptSerializer.serialize === b) return a; else return false }; b.prototype.loadMsAjaxFull = function (b) { var a = (window.location.protocol.toLowerCase() === "https:" ? "https:" : "http:") + "//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js"; OSF.OUtil.loadScript(a, b) }; Object.defineProperty(b.prototype, "msAjaxError", { "get": function () { var a = this; if (a._msAjaxError == null && a.isMsAjaxLoaded()) a._msAjaxError = Error; return a._msAjaxError }, "set": function (a) { this._msAjaxError = a }, enumerable: a, configurable: a }); Object.defineProperty(b.prototype, "msAjaxString", { "get": function () { var a = this; if (a._msAjaxString == null && a.isMsAjaxLoaded()) a._msAjaxString = String; return a._msAjaxString }, "set": function (a) { this._msAjaxString = a }, enumerable: a, configurable: a }); Object.defineProperty(b.prototype, "msAjaxDebug", { "get": function () { var a = this; if (a._msAjaxDebug == null && a.isMsAjaxLoaded()) a._msAjaxDebug = Sys.Debug; return a._msAjaxDebug }, "set": function (a) { this._msAjaxDebug = a }, enumerable: a, configurable: a }); return b }(); b.MicrosoftAjaxFactory = a })(OfficeExt || (OfficeExt = {})); var OsfMsAjaxFactory = new OfficeExt.MicrosoftAjaxFactory, OSF = OSF || {}, OfficeExt; (function (b) { var a = function () { function a(a) { this._internalStorage = a } a.prototype.getItem = function (a) { try { return this._internalStorage && this._internalStorage.getItem(a) } catch (b) { return null } }; a.prototype.setItem = function (b, a) { try { this._internalStorage && this._internalStorage.setItem(b, a) } catch (c) { } }; a.prototype.clear = function () { try { this._internalStorage && this._internalStorage.clear() } catch (a) { } }; a.prototype.removeItem = function (a) { try { this._internalStorage && this._internalStorage.removeItem(a) } catch (b) { } }; a.prototype.getKeysWithPrefix = function (d) { var b = []; try { for (var e = this._internalStorage && this._internalStorage.length || 0, a = 0; a < e; a++) { var c = this._internalStorage.key(a); c.indexOf(d) === 0 && b.push(c) } } catch (f) { } return b }; return a }(); b.SafeStorage = a })(OfficeExt || (OfficeExt = {})); OSF.XdmFieldName = { ConversationUrl: "ConversationUrl", AppId: "AppId" }; OSF.WindowNameItemKeys = { BaseFrameName: "baseFrameName", HostInfo: "hostInfo", XdmInfo: "xdmInfo", SerializerVersion: "serializerVersion", AppContext: "appContext" }; OSF.OUtil = function () { var g = "focus", f = "on", l = "configurable", k = "writable", e = "enumerable", h = "undefined", b = true, c = false, i = 2147483647, a = null, d = -1, s = d, x = "&_xdm_Info=", v = "&_serializer_version=", w = "_xdm_", A = "_serializer_version=", o = "#", u = "&", m = "class", r = {}, z = 3e4, n = a, q = a, j = (new Date).getTime(); function y() { var a = i * Math.random(); a ^= j ^ (new Date).getMilliseconds() << Math.floor(Math.random() * (31 - 10)); return a.toString(16) } function p() { if (!n) { try { var b = window.sessionStorage } catch (c) { b = a } n = new OfficeExt.SafeStorage(b) } return n } function t(e) { for (var c = [], b = [], f = e.length, a, d = 0; d < f; d++) { a = e[d]; if (a.tabIndex) if (a.tabIndex > 0) b.push(a); else a.tabIndex === 0 && c.push(a); else c.push(a) } b = b.sort(function (d, c) { var a = d.tabIndex - c.tabIndex; if (a === 0) a = b.indexOf(d) - b.indexOf(c); return a }); return [].concat(b, c) } return { set_entropy: function (a) { if (typeof a == "string") for (var b = 0; b < a.length; b += 4) { for (var d = 0, c = 0; c < 4 && b + c < a.length; c++) d = (d << 8) + a.charCodeAt(b + c); j ^= d } else if (typeof a == "number") j ^= a; else j ^= i * Math.random(); j &= i }, extend: function (b, a) { var c = function () { }; c.prototype = a.prototype; b.prototype = new c; b.prototype.constructor = b; b.uber = a.prototype; if (a.prototype.constructor === Object.prototype.constructor) a.prototype.constructor = a }, setNamespace: function (b, a) { if (a && b && !a[b]) a[b] = {} }, unsetNamespace: function (b, a) { if (a && b && a[b]) delete a[b] }, loadScript: function (f, g, h) { if (f && g) { var k = window.document, d = r[f]; if (!d) { var e = k.createElement("script"); e.type = "text/javascript"; d = { loaded: c, pendingCallbacks: [g], timer: a }; r[f] = d; var i = function () { if (d.timer != a) { clearTimeout(d.timer); delete d.timer } d.loaded = b; for (var e = d.pendingCallbacks.length, c = 0; c < e; c++) { var f = d.pendingCallbacks.shift(); f() } }, j = function () { delete r[f]; if (d.timer != a) { clearTimeout(d.timer); delete d.timer } for (var c = d.pendingCallbacks.length, b = 0; b < c; b++) { var e = d.pendingCallbacks.shift(); e() } }; if (e.readyState) e.onreadystatechange = function () { if (e.readyState == "loaded" || e.readyState == "complete") { e.onreadystatechange = a; i() } }; else e.onload = i; e.onerror = j; h = h || z; d.timer = setTimeout(j, h); e.setAttribute("crossOrigin", "anonymous"); e.src = f; k.getElementsByTagName("head")[0].appendChild(e) } else if (d.loaded) g(); else d.pendingCallbacks.push(g) } }, loadCSS: function (c) { if (c) { var b = window.document, a = b.createElement("link"); a.type = "text/css"; a.rel = "stylesheet"; a.href = c; b.getElementsByTagName("head")[0].appendChild(a) } }, parseEnum: function (b, c) { var a = c[b.trim()]; if (typeof a == h) { OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:" + b); throw OsfMsAjaxFactory.msAjaxError.argument("str") } return a }, delayExecutionAndCache: function () { var a = { calc: arguments[0] }; return function () { if (a.calc) { a.val = a.calc.apply(this, arguments); delete a.calc } return a.val } }, getUniqueId: function () { s = s + 1; return s.toString() }, formatString: function () { var a = arguments, b = a[0]; return b.replace(/{(\d+)}/gm, function (d, b) { var c = parseInt(b, 10) + 1; return a[c] === undefined ? "{" + b + "}" : a[c] }) }, generateConversationId: function () { return [y(), y(), (new Date).getTime().toString()].join("_") }, getFrameName: function (a) { return w + a + this.generateConversationId() }, addXdmInfoAsHash: function (b, a) { return OSF.OUtil.addInfoAsHash(b, x, a, c) }, addSerializerVersionAsHash: function (c, a) { return OSF.OUtil.addInfoAsHash(c, v, a, b) }, addInfoAsHash: function (b, f, c, h) { b = b.trim() || ""; var e = b.split(o), g = e.shift(), d = e.join(o), a; if (h) a = [f, encodeURIComponent(c), d].join(""); else a = [d, f, c].join(""); return [g, o, a].join("") }, parseHostInfoFromWindowName: function (a, b) { return OSF.OUtil.parseInfoFromWindowName(a, b, OSF.WindowNameItemKeys.HostInfo) }, parseXdmInfo: function (b) { var a = OSF.OUtil.parseXdmInfoWithGivenFragment(b, window.location.hash); if (!a) a = OSF.OUtil.parseXdmInfoFromWindowName(b, window.name); return a }, parseXdmInfoFromWindowName: function (a, b) { return OSF.OUtil.parseInfoFromWindowName(a, b, OSF.WindowNameItemKeys.XdmInfo) }, parseXdmInfoWithGivenFragment: function (a, b) { return OSF.OUtil.parseInfoWithGivenFragment(x, w, c, a, b) }, parseSerializerVersion: function (b) { var a = OSF.OUtil.parseSerializerVersionWithGivenFragment(b, window.location.hash); if (isNaN(a)) a = OSF.OUtil.parseSerializerVersionFromWindowName(b, window.name); return a }, parseSerializerVersionFromWindowName: function (a, b) { return parseInt(OSF.OUtil.parseInfoFromWindowName(a, b, OSF.WindowNameItemKeys.SerializerVersion)) }, parseSerializerVersionWithGivenFragment: function (a, c) { return parseInt(OSF.OUtil.parseInfoWithGivenFragment(v, A, b, a, c)) }, parseInfoFromWindowName: function (g, h, f) { try { var b = JSON.parse(h), c = b != a ? b[f] : a, d = p(); if (!g && d && b != a) { var e = b[OSF.WindowNameItemKeys.BaseFrameName] + f; if (c) d.setItem(e, c); else c = d.getItem(e) } return c } catch (i) { return a } }, parseInfoWithGivenFragment: function (m, j, k, i, l) { var f = l.split(m), b = f.length > 1 ? f[f.length - 1] : a; if (k && b != a) { if (b.indexOf(u) >= 0) b = b.split(u)[0]; b = decodeURIComponent(b) } var c = p(); if (!i && c) { var e = window.name.indexOf(j); if (e > d) { var g = window.name.indexOf(";", e); if (g == d) g = window.name.length; var h = window.name.substring(e, g); if (b) c.setItem(h, b); else b = c.getItem(h) } } return b }, getConversationId: function () { var c = window.location.search, b = a; if (c) { var d = c.indexOf("&"); b = d > 0 ? c.substring(1, d) : c.substr(1); if (b && b.charAt(b.length - 1) === "=") { b = b.substring(0, b.length - 1); if (b) b = decodeURIComponent(b) } } return b }, getInfoItems: function (b) { var a = b.split("$"); if (typeof a[1] == h) a = b.split("|"); if (typeof a[1] == h) a = b.split("%7C"); return a }, getXdmFieldValue: function (e, d) { var b = "", c = OSF.OUtil.parseXdmInfo(d); if (c) { var a = OSF.OUtil.getInfoItems(c); if (a != undefined && a.length >= 3) switch (e) { case OSF.XdmFieldName.ConversationUrl: b = a[2]; break; case OSF.XdmFieldName.AppId: b = a[1] } } return b }, validateParamObject: function (f, e) { var a = Function._validateParams(arguments, [{ name: "params", type: Object, mayBeNull: c }, { name: "expectedProperties", type: Object, mayBeNull: c }, { name: "callback", type: Function, mayBeNull: b }]); if (a) throw a; for (var d in e) { a = Function._validateParameter(f[d], e[d], d); if (a) throw a } }, writeProfilerMark: function (a) { if (window.msWriteProfilerMark) { window.msWriteProfilerMark(a); OsfMsAjaxFactory.msAjaxDebug.trace(a) } }, outputDebug: function (a) { typeof OsfMsAjaxFactory !== h && OsfMsAjaxFactory.msAjaxDebug && OsfMsAjaxFactory.msAjaxDebug.trace && OsfMsAjaxFactory.msAjaxDebug.trace(a) }, defineNondefaultProperty: function (e, f, a, c) { a = a || {}; for (var g in c) { var d = c[g]; if (a[d] == undefined) a[d] = b } Object.defineProperty(e, f, a); return e }, defineNondefaultProperties: function (c, a, d) { a = a || {}; for (var b in a) OSF.OUtil.defineNondefaultProperty(c, b, a[b], d); return c }, defineEnumerableProperty: function (c, b, a) { return OSF.OUtil.defineNondefaultProperty(c, b, a, [e]) }, defineEnumerableProperties: function (b, a) { return OSF.OUtil.defineNondefaultProperties(b, a, [e]) }, defineMutableProperty: function (c, b, a) { return OSF.OUtil.defineNondefaultProperty(c, b, a, [k, e, l]) }, defineMutableProperties: function (b, a) { return OSF.OUtil.defineNondefaultProperties(b, a, [k, e, l]) }, finalizeProperties: function (e, d) { d = d || {}; for (var g = Object.getOwnPropertyNames(e), i = g.length, f = 0; f < i; f++) { var h = g[f], a = Object.getOwnPropertyDescriptor(e, h); if (!a.get && !a.set) a.writable = d.writable || c; a.configurable = d.configurable || c; a.enumerable = d.enumerable || b; Object.defineProperty(e, h, a) } return e }, mapList: function (a, c) { var b = []; if (a) for (var d in a) b.push(c(a[d])); return b }, listContainsKey: function (d, e) { for (var a in d) if (e == a) return b; return c }, listContainsValue: function (a, d) { for (var e in a) if (d == a[e]) return b; return c }, augmentList: function (a, b) { var d = a.push ? function (c, b) { a.push(b) } : function (c, b) { a[c] = b }; for (var c in b) d(c, b[c]) }, redefineList: function (a, b) { for (var d in a) delete a[d]; for (var c in b) a[c] = b[c] }, isArray: function (a) { return Object.prototype.toString.apply(a) === "[object Array]" }, isFunction: function (a) { return Object.prototype.toString.apply(a) === "[object Function]" }, isDate: function (a) { return Object.prototype.toString.apply(a) === "[object Date]" }, addEventListener: function (a, b, d) { if (a.addEventListener) a.addEventListener(b, d, c); else if (Sys.Browser.agent === Sys.Browser.InternetExplorer && a.attachEvent) a.attachEvent(f + b, d); else a[f + b] = d }, removeEventListener: function (b, d, e) { if (b.removeEventListener) b.removeEventListener(d, e, c); else if (Sys.Browser.agent === Sys.Browser.InternetExplorer && b.detachEvent) b.detachEvent(f + d, e); else b[f + d] = a }, getCookieValue: function (b) { var a = RegExp(b + "[^;]+").exec(document.cookie); return a.toString().replace(/^[^=]+./, "") }, xhrGet: function (f, e, c) { var a; try { a = new XMLHttpRequest; a.onreadystatechange = function () { if (a.readyState == 4) if (a.status == 200) e(a.responseText); else c(a.status) }; a.open("GET", f, b); a.send() } catch (d) { c(d) } }, xhrGetFull: function (h, f, g, c) { var a, e = f; try { a = new XMLHttpRequest; a.onreadystatechange = function () { if (a.readyState == 4) if (a.status == 200) g(a, e); else c(a.status) }; a.open("GET", h, b); a.send() } catch (d) { c(d) } }, encodeBase64: function (c) { if (!c) return c; var n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", l = [], b = [], h = 0, j, g, i, d, e, f, a, m = c.length; do { j = c.charCodeAt(h++); g = c.charCodeAt(h++); i = c.charCodeAt(h++); a = 0; d = j & 255; e = j >> 8; f = g & 255; b[a++] = d >> 2; b[a++] = (d & 3) << 4 | e >> 4; b[a++] = (e & 15) << 2 | f >> 6; b[a++] = f & 63; if (!isNaN(g)) { d = g >> 8; e = i & 255; f = i >> 8; b[a++] = d >> 2; b[a++] = (d & 3) << 4 | e >> 4; b[a++] = (e & 15) << 2 | f >> 6; b[a++] = f & 63 } if (isNaN(g)) b[a - 1] = 64; else if (isNaN(i)) { b[a - 2] = 64; b[a - 1] = 64 } for (var k = 0; k < a; k++) l.push(n.charAt(b[k])) } while (h < m); return l.join("") }, getSessionStorage: function () { return p() }, getLocalStorage: function () { if (!q) { try { var b = window.localStorage } catch (c) { b = a } q = new OfficeExt.SafeStorage(b) } return q }, convertIntToCssHexColor: function (b) { var a = "#" + (Number(b) + 16777216).toString(16).slice(-6); return a }, attachClickHandler: function (a, b) { a.onclick = function () { b() }; a.ontouchend = function (a) { b(); a.preventDefault() } }, getQueryStringParamValue: function (a, d) { var e = Function._validateParams(arguments, [{ name: "queryString", type: String, mayBeNull: c }, { name: "paramName", type: String, mayBeNull: c }]); if (e) { OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null."); return "" } var b = new RegExp("[\\?&]" + d + "=([^&#]*)", "i"); if (!b.test(a)) { OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found."); return "" } return b.exec(a)[1] }, isiOS: function () { return window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? b : c }, isChrome: function () { return window.navigator.userAgent.indexOf("Chrome") > 0 && !OSF.OUtil.isEdge() }, isEdge: function () { return window.navigator.userAgent.indexOf("Edge") > 0 }, isIE: function () { return window.navigator.userAgent.indexOf("Trident") > 0 }, isFirefox: function () { return window.navigator.userAgent.indexOf("Firefox") > 0 }, shallowCopy: function (b) { if (b == a) return a; else if (!(b instanceof Object)) return b; else if (Array.isArray(b)) { for (var e = [], d = 0; d < b.length; d++) e.push(b[d]); return e } else { var f = b.constructor(); for (var c in b) if (b.hasOwnProperty(c)) f[c] = b[c]; return f } }, createObject: function (b) { var d = a; if (b) { d = {}; for (var e = b.length, c = 0; c < e; c++) d[b[c].name] = b[c].value } return d }, addClass: function (a, b) { if (!OSF.OUtil.hasClass(a, b)) { var c = a.getAttribute(m); if (c) a.setAttribute(m, c + " " + b); else a.setAttribute(m, b) } }, hasClass: function (c, b) { var a = c.getAttribute(m); return a && a.match(new RegExp("(\\s|^)" + b + "(\\s|$)")) }, focusToFirstTabbable: function (e, j) { var h, i = c, f, k = function () { i = b }, l = function (c, a, b) { if (a < 0 || a > c) return d; else if (a === 0 && b) return d; else if (a === c - 1 && !b) return d; if (b) return a - 1; else return a + 1 }; e = t(e); h = j ? e.length - 1 : 0; if (e.length === 0) return a; while (!i && h >= 0 && h < e.length) { f = e[h]; window.focus(); f.addEventListener(g, k); f.focus(); f.removeEventListener(g, k); h = l(e.length, h, j); if (!i && f === document.activeElement) i = b } if (i) return f; else return a }, focusToNextTabbable: function (f, o, m) { var k, e, i = c, h, l = function () { i = b }, n = function (b, c) { for (var a = 0; a < b.length; a++) if (b[a] === c) return a; return d }, j = function (c, a, b) { if (a < 0 || a > c) return d; else if (a === 0 && b) return d; else if (a === c - 1 && !b) return d; if (b) return a - 1; else return a + 1 }; f = t(f); k = n(f, o); e = j(f.length, k, m); if (e < 0) return a; while (!i && e >= 0 && e < f.length) { h = f[e]; h.addEventListener(g, l); h.focus(); h.removeEventListener(g, l); e = j(f.length, e, m); if (!i && h === document.activeElement) i = b } if (i) return h; else return a } } }(); OSF.OUtil.Guid = function () { var a = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]; return { generateNewGuid: function () { for (var c = "", d = (new Date).getTime(), b = 0; b < 32 && d > 0; b++) { if (b == 8 || b == 12 || b == 16 || b == 20) c += "-"; c += a[d % 16]; d = Math.floor(d / 16) } for (; b < 32; b++) { if (b == 8 || b == 12 || b == 16 || b == 20) c += "-"; c += a[Math.floor(Math.random() * 16)] } return c } } }(); window.OSF = OSF; OSF.OUtil.setNamespace("OSF", window); OSF.AppName = { Unsupported: 0, Excel: 1, Word: 2, PowerPoint: 4, Outlook: 8, ExcelWebApp: 16, WordWebApp: 32, OutlookWebApp: 64, Project: 128, AccessWebApp: 256, PowerpointWebApp: 512, ExcelIOS: 1024, Sway: 2048, WordIOS: 4096, PowerPointIOS: 8192, Access: 16384, Lync: 32768, OutlookIOS: 65536, OneNoteWebApp: 131072, OneNote: 262144, ExcelWinRT: 524288, WordWinRT: 1048576, PowerpointWinRT: 2097152, OutlookAndroid: 4194304, OneNoteWinRT: 8388608, ExcelAndroid: 8388609, VisioWebApp: 8388610 }; OSF.InternalPerfMarker = { DataCoercionBegin: "Agave.HostCall.CoerceDataStart", DataCoercionEnd: "Agave.HostCall.CoerceDataEnd" }; OSF.HostCallPerfMarker = { IssueCall: "Agave.HostCall.IssueCall", ReceiveResponse: "Agave.HostCall.ReceiveResponse", RuntimeExceptionRaised: "Agave.HostCall.RuntimeExecptionRaised" }; OSF.AgaveHostAction = { Select: 0, UnSelect: 1, CancelDialog: 2, InsertAgave: 3, CtrlF6In: 4, CtrlF6Exit: 5, CtrlF6ExitShift: 6, SelectWithError: 7, NotifyHostError: 8, RefreshAddinCommands: 9, PageIsReady: 10, TabIn: 11, TabInShift: 12, TabExit: 13, TabExitShift: 14, EscExit: 15, F2Exit: 16, ExitNoFocusable: 17, ExitNoFocusableShift: 18 }; OSF.SharedConstants = { NotificationConversationIdSuffix: "_ntf" }; OSF.DialogMessageType = { DialogMessageReceived: 0, DialogParentMessageReceived: 1, DialogClosed: 12006 }; OSF.OfficeAppContext = function (y, u, p, n, r, v, q, t, x, j, w, l, k, m, h, g, f, e, i, c, d, s, o, b) { var a = this; a._id = y; a._appName = u; a._appVersion = p; a._appUILocale = n; a._dataLocale = r; a._docUrl = v; a._clientMode = q; a._settings = t; a._reason = x; a._osfControlType = j; a._eToken = w; a._correlationId = l; a._appInstanceId = k; a._touchEnabled = m; a._commerceAllowed = h; a._appMinorVersion = g; a._requirementMatrix = f; a._hostCustomMessage = e; a._hostFullVersion = i; a._isDialog = false; a._clientWindowHeight = c; a._clientWindowWidth = d; a._addinName = s; a._appDomains = o; a._dialogRequirementMatrix = b; a.get_id = function () { return this._id }; a.get_appName = function () { return this._appName }; a.get_appVersion = function () { return this._appVersion }; a.get_appUILocale = function () { return this._appUILocale }; a.get_dataLocale = function () { return this._dataLocale }; a.get_docUrl = function () { return this._docUrl }; a.get_clientMode = function () { return this._clientMode }; a.get_bindings = function () { return this._bindings }; a.get_settings = function () { return this._settings }; a.get_reason = function () { return this._reason }; a.get_osfControlType = function () { return this._osfControlType }; a.get_eToken = function () { return this._eToken }; a.get_correlationId = function () { return this._correlationId }; a.get_appInstanceId = function () { return this._appInstanceId }; a.get_touchEnabled = function () { return this._touchEnabled }; a.get_commerceAllowed = function () { return this._commerceAllowed }; a.get_appMinorVersion = function () { return this._appMinorVersion }; a.get_requirementMatrix = function () { return this._requirementMatrix }; a.get_dialogRequirementMatrix = function () { return this._dialogRequirementMatrix }; a.get_hostCustomMessage = function () { return this._hostCustomMessage }; a.get_hostFullVersion = function () { return this._hostFullVersion }; a.get_isDialog = function () { return this._isDialog }; a.get_clientWindowHeight = function () { return this._clientWindowHeight }; a.get_clientWindowWidth = function () { return this._clientWindowWidth }; a.get_addinName = function () { return this._addinName }; a.get_appDomains = function () { return this._appDomains } }; OSF.OsfControlType = { DocumentLevel: 0, ContainerLevel: 1 }; OSF.ClientMode = { ReadOnly: 0, ReadWrite: 1 }; OSF.OUtil.setNamespace("Microsoft", window); OSF.OUtil.setNamespace("Office", Microsoft); OSF.OUtil.setNamespace("Client", Microsoft.Office); OSF.OUtil.setNamespace("WebExtension", Microsoft.Office); Microsoft.Office.WebExtension.InitializationReason = { Inserted: "inserted", DocumentOpened: "documentOpened" }; Microsoft.Office.WebExtension.ValueFormat = { Unformatted: "unformatted", Formatted: "formatted" }; Microsoft.Office.WebExtension.FilterType = { All: "all" }; Microsoft.Office.WebExtension.PlatformType = { PC: "PC", OfficeOnline: "OfficeOnline", Mac: "Mac", iOS: "iOS", Android: "Android", Universal: "Universal" }; Microsoft.Office.WebExtension.HostType = { Word: "Word", Excel: "Excel", PowerPoint: "PowerPoint", Outlook: "Outlook", OneNote: "OneNote", Project: "Project", Access: "Access" }; Microsoft.Office.WebExtension.Parameters = { BindingType: "bindingType", CoercionType: "coercionType", ValueFormat: "valueFormat", FilterType: "filterType", Columns: "columns", SampleData: "sampleData", GoToType: "goToType", SelectionMode: "selectionMode", Id: "id", PromptText: "promptText", ItemName: "itemName", FailOnCollision: "failOnCollision", StartRow: "startRow", StartColumn: "startColumn", RowCount: "rowCount", ColumnCount: "columnCount", Callback: "callback", AsyncContext: "asyncContext", Data: "data", Rows: "rows", OverwriteIfStale: "overwriteIfStale", FileType: "fileType", EventType: "eventType", Handler: "handler", SliceSize: "sliceSize", SliceIndex: "sliceIndex", ActiveView: "activeView", Status: "status", PlatformType: "platformType", HostType: "hostType", Xml: "xml", Namespace: "namespace", Prefix: "prefix", XPath: "xPath", Text: "text", ImageLeft: "imageLeft", ImageTop: "imageTop", ImageWidth: "imageWidth", ImageHeight: "imageHeight", TaskId: "taskId", FieldId: "fieldId", FieldValue: "fieldValue", ServerUrl: "serverUrl", ListName: "listName", ResourceId: "resourceId", ViewType: "viewType", ViewName: "viewName", GetRawValue: "getRawValue", CellFormat: "cellFormat", TableOptions: "tableOptions", TaskIndex: "taskIndex", ResourceIndex: "resourceIndex", CustomFieldId: "customFieldId", Url: "url", MessageHandler: "messageHandler", Width: "width", Height: "height", RequireHTTPs: "requireHTTPS", MessageToParent: "messageToParent", DisplayInIframe: "displayInIframe", MessageContent: "messageContent", AppCommandInvocationCompletedData: "appCommandInvocationCompletedData" }; OSF.OUtil.setNamespace("DDA", OSF); OSF.DDA.DocumentMode = { ReadOnly: 1, ReadWrite: 0 }; OSF.DDA.PropertyDescriptors = { AsyncResultStatus: "AsyncResultStatus" }; OSF.DDA.EventDescriptors = {}; OSF.DDA.ListDescriptors = {}; OSF.DDA.UI = {}; OSF.DDA.getXdmEventName = function (b, a) { if (a == Microsoft.Office.WebExtension.EventType.BindingSelectionChanged || a == Microsoft.Office.WebExtension.EventType.BindingDataChanged || a == Microsoft.Office.WebExtension.EventType.DataNodeDeleted || a == Microsoft.Office.WebExtension.EventType.DataNodeInserted || a == Microsoft.Office.WebExtension.EventType.DataNodeReplaced) return b + "_" + a; else return a }; OSF.DDA.MethodDispId = { dispidMethodMin: 64, dispidGetSelectedDataMethod: 64, dispidSetSelectedDataMethod: 65, dispidAddBindingFromSelectionMethod: 66, dispidAddBindingFromPromptMethod: 67, dispidGetBindingMethod: 68, dispidReleaseBindingMethod: 69, dispidGetBindingDataMethod: 70, dispidSetBindingDataMethod: 71, dispidAddRowsMethod: 72, dispidClearAllRowsMethod: 73, dispidGetAllBindingsMethod: 74, dispidLoadSettingsMethod: 75, dispidSaveSettingsMethod: 76, dispidGetDocumentCopyMethod: 77, dispidAddBindingFromNamedItemMethod: 78, dispidAddColumnsMethod: 79, dispidGetDocumentCopyChunkMethod: 80, dispidReleaseDocumentCopyMethod: 81, dispidNavigateToMethod: 82, dispidGetActiveViewMethod: 83, dispidGetDocumentThemeMethod: 84, dispidGetOfficeThemeMethod: 85, dispidGetFilePropertiesMethod: 86, dispidClearFormatsMethod: 87, dispidSetTableOptionsMethod: 88, dispidSetFormatsMethod: 89, dispidExecuteRichApiRequestMethod: 93, dispidAppCommandInvocationCompletedMethod: 94, dispidCloseContainerMethod: 97, dispidGetSelectedTaskMethod: 110, dispidGetSelectedResourceMethod: 111, dispidGetTaskMethod: 112, dispidGetResourceFieldMethod: 113, dispidGetWSSUrlMethod: 114, dispidGetTaskFieldMethod: 115, dispidGetProjectFieldMethod: 116, dispidGetSelectedViewMethod: 117, dispidGetTaskByIndexMethod: 118, dispidGetResourceByIndexMethod: 119, dispidSetTaskFieldMethod: 120, dispidSetResourceFieldMethod: 121, dispidGetMaxTaskIndexMethod: 122, dispidGetMaxResourceIndexMethod: 123, dispidCreateTaskMethod: 124, dispidAddDataPartMethod: 128, dispidGetDataPartByIdMethod: 129, dispidGetDataPartsByNamespaceMethod: 130, dispidGetDataPartXmlMethod: 131, dispidGetDataPartNodesMethod: 132, dispidDeleteDataPartMethod: 133, dispidGetDataNodeValueMethod: 134, dispidGetDataNodeXmlMethod: 135, dispidGetDataNodesMethod: 136, dispidSetDataNodeValueMethod: 137, dispidSetDataNodeXmlMethod: 138, dispidAddDataNamespaceMethod: 139, dispidGetDataUriByPrefixMethod: 140, dispidGetDataPrefixByUriMethod: 141, dispidGetDataNodeTextMethod: 142, dispidSetDataNodeTextMethod: 143, dispidMessageParentMethod: 144, dispidSendMessageMethod: 145, dispidMethodMax: 145 }; OSF.DDA.EventDispId = { dispidEventMin: 0, dispidInitializeEvent: 0, dispidSettingsChangedEvent: 1, dispidDocumentSelectionChangedEvent: 2, dispidBindingSelectionChangedEvent: 3, dispidBindingDataChangedEvent: 4, dispidDocumentOpenEvent: 5, dispidDocumentCloseEvent: 6, dispidActiveViewChangedEvent: 7, dispidDocumentThemeChangedEvent: 8, dispidOfficeThemeChangedEvent: 9, dispidDialogMessageReceivedEvent: 10, dispidDialogNotificationShownInAddinEvent: 11, dispidDialogParentMessageReceivedEvent: 12, dispidActivationStatusChangedEvent: 32, dispidAppCommandInvokedEvent: 39, dispidOlkItemSelectedChangedEvent: 46, dispidTaskSelectionChangedEvent: 56, dispidResourceSelectionChangedEvent: 57, dispidViewSelectionChangedEvent: 58, dispidDataNodeAddedEvent: 60, dispidDataNodeReplacedEvent: 61, dispidDataNodeDeletedEvent: 62, dispidEventMax: 63 }; OSF.DDA.ErrorCodeManager = function () { var a = {}; return { getErrorArgs: function (c) { var b = a[c]; if (!b) b = a[this.errorCodes.ooeInternalError]; else { if (!b.name) b.name = a[this.errorCodes.ooeInternalError].name; if (!b.message) b.message = a[this.errorCodes.ooeInternalError].message } return b }, addErrorMessage: function (c, b) { a[c] = b }, errorCodes: { ooeSuccess: 0, ooeChunkResult: 1, ooeCoercionTypeNotSupported: 1e3, ooeGetSelectionNotMatchDataType: 1001, ooeCoercionTypeNotMatchBinding: 1002, ooeInvalidGetRowColumnCounts: 1003, ooeSelectionNotSupportCoercionType: 1004, ooeInvalidGetStartRowColumn: 1005, ooeNonUniformPartialGetNotSupported: 1006, ooeGetDataIsTooLarge: 1008, ooeFileTypeNotSupported: 1009, ooeGetDataParametersConflict: 1010, ooeInvalidGetColumns: 1011, ooeInvalidGetRows: 1012, ooeInvalidReadForBlankRow: 1013, ooeUnsupportedDataObject: 2e3, ooeCannotWriteToSelection: 2001, ooeDataNotMatchSelection: 2002, ooeOverwriteWorksheetData: 2003, ooeDataNotMatchBindingSize: 2004, ooeInvalidSetStartRowColumn: 2005, ooeInvalidDataFormat: 2006, ooeDataNotMatchCoercionType: 2007, ooeDataNotMatchBindingType: 2008, ooeSetDataIsTooLarge: 2009, ooeNonUniformPartialSetNotSupported: 2010, ooeInvalidSetColumns: 2011, ooeInvalidSetRows: 2012, ooeSetDataParametersConflict: 2013, ooeCellDataAmountBeyondLimits: 2014, ooeSelectionCannotBound: 3e3, ooeBindingNotExist: 3002, ooeBindingToMultipleSelection: 3003, ooeInvalidSelectionForBindingType: 3004, ooeOperationNotSupportedOnThisBindingType: 3005, ooeNamedItemNotFound: 3006, ooeMultipleNamedItemFound: 3007, ooeInvalidNamedItemForBindingType: 3008, ooeUnknownBindingType: 3009, ooeOperationNotSupportedOnMatrixData: 3010, ooeInvalidColumnsForBinding: 3011, ooeSettingNameNotExist: 4e3, ooeSettingsCannotSave: 4001, ooeSettingsAreStale: 4002, ooeOperationNotSupported: 5e3, ooeInternalError: 5001, ooeDocumentReadOnly: 5002, ooeEventHandlerNotExist: 5003, ooeInvalidApiCallInContext: 5004, ooeShuttingDown: 5005, ooeUnsupportedEnumeration: 5007, ooeIndexOutOfRange: 5008, ooeBrowserAPINotSupported: 5009, ooeInvalidParam: 5010, ooeRequestTimeout: 5011, ooeTooManyIncompleteRequests: 5100, ooeRequestTokenUnavailable: 5101, ooeActivityLimitReached: 5102, ooeCustomXmlNodeNotFound: 6e3, ooeCustomXmlError: 6100, ooeCustomXmlExceedQuota: 6101, ooeCustomXmlOutOfDate: 6102, ooeNoCapability: 7e3, ooeCannotNavTo: 7001, ooeSpecifiedIdNotExist: 7002, ooeNavOutOfBound: 7004, ooeElementMissing: 8e3, ooeProtectedError: 8001, ooeInvalidCellsValue: 8010, ooeInvalidTableOptionValue: 8011, ooeInvalidFormatValue: 8012, ooeRowIndexOutOfRange: 8020, ooeColIndexOutOfRange: 8021, ooeFormatValueOutOfRange: 8022, ooeCellFormatAmountBeyondLimits: 8023, ooeMemoryFileLimit: 11000, ooeNetworkProblemRetrieveFile: 11001, ooeInvalidSliceSize: 11002, ooeInvalidCallback: 11101, ooeInvalidWidth: 12000, ooeInvalidHeight: 12001, ooeNavigationError: 12002, ooeInvalidScheme: 12003, ooeAppDomains: 12004, ooeRequireHTTPS: 12005, ooeWebDialogClosed: 12006, ooeDialogAlreadyOpened: 12007, ooeEndUserAllow: 12008, ooeEndUserIgnore: 12009, ooeNotUILessDialog: 12010, ooeCrossZone: 12011 }, initializeErrorMessages: function (b) { a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported] = { name: b.L_InvalidCoercion, message: b.L_CoercionTypeNotSupported }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType] = { name: b.L_DataReadError, message: b.L_GetSelectionNotSupported }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding] = { name: b.L_InvalidCoercion, message: b.L_CoercionTypeNotMatchBinding }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts] = { name: b.L_DataReadError, message: b.L_InvalidGetRowColumnCounts }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType] = { name: b.L_DataReadError, message: b.L_SelectionNotSupportCoercionType }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn] = { name: b.L_DataReadError, message: b.L_InvalidGetStartRowColumn }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported] = { name: b.L_DataReadError, message: b.L_NonUniformPartialGetNotSupported }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge] = { name: b.L_DataReadError, message: b.L_GetDataIsTooLarge }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported] = { name: b.L_DataReadError, message: b.L_FileTypeNotSupported }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict] = { name: b.L_DataReadError, message: b.L_GetDataParametersConflict }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns] = { name: b.L_DataReadError, message: b.L_InvalidGetColumns }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows] = { name: b.L_DataReadError, message: b.L_InvalidGetRows }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow] = { name: b.L_DataReadError, message: b.L_InvalidReadForBlankRow }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject] = { name: b.L_DataWriteError, message: b.L_UnsupportedDataObject }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection] = { name: b.L_DataWriteError, message: b.L_CannotWriteToSelection }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection] = { name: b.L_DataWriteError, message: b.L_DataNotMatchSelection }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData] = { name: b.L_DataWriteError, message: b.L_OverwriteWorksheetData }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize] = { name: b.L_DataWriteError, message: b.L_DataNotMatchBindingSize }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn] = { name: b.L_DataWriteError, message: b.L_InvalidSetStartRowColumn }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat] = { name: b.L_InvalidFormat, message: b.L_InvalidDataFormat }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType] = { name: b.L_InvalidDataObject, message: b.L_DataNotMatchCoercionType }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType] = { name: b.L_InvalidDataObject, message: b.L_DataNotMatchBindingType }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge] = { name: b.L_DataWriteError, message: b.L_SetDataIsTooLarge }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported] = { name: b.L_DataWriteError, message: b.L_NonUniformPartialSetNotSupported }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns] = { name: b.L_DataWriteError, message: b.L_InvalidSetColumns }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows] = { name: b.L_DataWriteError, message: b.L_InvalidSetRows }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict] = { name: b.L_DataWriteError, message: b.L_SetDataParametersConflict }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound] = { name: b.L_BindingCreationError, message: b.L_SelectionCannotBound }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist] = { name: b.L_InvalidBindingError, message: b.L_BindingNotExist }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection] = { name: b.L_BindingCreationError, message: b.L_BindingToMultipleSelection }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType] = { name: b.L_BindingCreationError, message: b.L_InvalidSelectionForBindingType }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType] = { name: b.L_InvalidBindingOperation, message: b.L_OperationNotSupportedOnThisBindingType }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound] = { name: b.L_BindingCreationError, message: b.L_NamedItemNotFound }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound] = { name: b.L_BindingCreationError, message: b.L_MultipleNamedItemFound }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType] = { name: b.L_BindingCreationError, message: b.L_InvalidNamedItemForBindingType }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType] = { name: b.L_InvalidBinding, message: b.L_UnknownBindingType }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData] = { name: b.L_InvalidBindingOperation, message: b.L_OperationNotSupportedOnMatrixData }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding] = { name: b.L_InvalidBinding, message: b.L_InvalidColumnsForBinding }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist] = { name: b.L_ReadSettingsError, message: b.L_SettingNameNotExist }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave] = { name: b.L_SaveSettingsError, message: b.L_SettingsCannotSave }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale] = { name: b.L_SettingsStaleError, message: b.L_SettingsAreStale }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported] = { name: b.L_HostError, message: b.L_OperationNotSupported }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError] = { name: b.L_InternalError, message: b.L_InternalErrorDescription }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly] = { name: b.L_PermissionDenied, message: b.L_DocumentReadOnly }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist] = { name: b.L_EventRegistrationError, message: b.L_EventHandlerNotExist }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext] = { name: b.L_InvalidAPICall, message: b.L_InvalidApiCallInContext }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown] = { name: b.L_ShuttingDown, message: b.L_ShuttingDown }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration] = { name: b.L_UnsupportedEnumeration, message: b.L_UnsupportedEnumerationMessage }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange] = { name: b.L_IndexOutOfRange, message: b.L_IndexOutOfRange }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported] = { name: b.L_APINotSupported, message: b.L_BrowserAPINotSupported }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout] = { name: b.L_APICallFailed, message: b.L_RequestTimeout }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests] = { name: b.L_APICallFailed, message: b.L_TooManyIncompleteRequests }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable] = { name: b.L_APICallFailed, message: b.L_RequestTokenUnavailable }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached] = { name: b.L_APICallFailed, message: b.L_ActivityLimitReached }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound] = { name: b.L_InvalidNode, message: b.L_CustomXmlNodeNotFound }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError] = { name: b.L_CustomXmlError, message: b.L_CustomXmlError }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota] = { name: b.L_CustomXmlExceedQuotaName, message: b.L_CustomXmlExceedQuotaMessage }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate] = { name: b.L_CustomXmlOutOfDateName, message: b.L_CustomXmlOutOfDateMessage }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability] = { name: b.L_PermissionDenied, message: b.L_NoCapability }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo] = { name: b.L_CannotNavigateTo, message: b.L_CannotNavigateTo }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist] = { name: b.L_SpecifiedIdNotExist, message: b.L_SpecifiedIdNotExist }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound] = { name: b.L_NavOutOfBound, message: b.L_NavOutOfBound }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits] = { name: b.L_DataWriteReminder, message: b.L_CellDataAmountBeyondLimits }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing] = { name: b.L_MissingParameter, message: b.L_ElementMissing }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError] = { name: b.L_PermissionDenied, message: b.L_NoCapability }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue] = { name: b.L_InvalidValue, message: b.L_InvalidCellsValue }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue] = { name: b.L_InvalidValue, message: b.L_InvalidTableOptionValue }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue] = { name: b.L_InvalidValue, message: b.L_InvalidFormatValue }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange] = { name: b.L_OutOfRange, message: b.L_RowIndexOutOfRange }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange] = { name: b.L_OutOfRange, message: b.L_ColIndexOutOfRange }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange] = { name: b.L_OutOfRange, message: b.L_FormatValueOutOfRange }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits] = { name: b.L_FormattingReminder, message: b.L_CellFormatAmountBeyondLimits }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit] = { name: b.L_MemoryLimit, message: b.L_CloseFileBeforeRetrieve }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile] = { name: b.L_NetworkProblem, message: b.L_NetworkProblemRetrieveFile }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize] = { name: b.L_InvalidValue, message: b.L_SliceSizeNotSupported }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened] = { name: b.L_DisplayDialogError, message: b.L_DialogAlreadyOpened }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth] = { name: b.L_IndexOutOfRange, message: b.L_IndexOutOfRange }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight] = { name: b.L_IndexOutOfRange, message: b.L_IndexOutOfRange }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError] = { name: b.L_DisplayDialogError, message: b.L_NetworkProblem }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme] = { name: b.L_DialogNavigateError, message: b.L_DialogInvalidScheme }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains] = { name: b.L_DisplayDialogError, message: b.L_DialogAddressNotTrusted }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS] = { name: b.L_DisplayDialogError, message: b.L_DialogRequireHTTPS }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore] = { name: b.L_DisplayDialogError, message: b.L_UserClickIgnore }; a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone] = { name: b.L_DisplayDialogError, message: b.L_NewWindowCrossZoneErrorString } } } }(); var OfficeExt; (function (a) { var b; (function (b) { var a = 1.1, z = function () { function a() { } return a }(); b.RequirementVersion = z; var d = function () { function a(b) { var a = this; a.isSetSupported = function (d, b) { if (d == undefined) return false; if (b == undefined) b = 0; var f = this._setMap, e = f._sets; if (e.hasOwnProperty(d.toLowerCase())) { var g = e[d.toLowerCase()]; try { var a = this._getVersion(g); b = b + ""; var c = this._getVersion(b); if (a.major > 0 && a.major > c.major) return true; if (a.minor > 0 && a.minor > 0 && a.major == c.major && a.minor >= c.minor) return true } catch (h) { return false } } return false }; a._getVersion = function (e) { var a = "version format incorrect", b = e.split("."), c = 0, d = 0; if (b.length < 2 && isNaN(Number(e))) throw a; else { c = Number(b[0]); if (b.length >= 2) d = Number(b[1]); if (isNaN(c) || isNaN(d)) throw a } var f = { minor: d, major: c }; return f }; a._setMap = b; a.isSetSupported = a.isSetSupported.bind(a) } return a }(); b.RequirementMatrix = d; var c = function () { function a(a) { this._addSetMap = function (a) { for (var b in a) this._sets[b] = a[b] }; this._sets = a } return a }(); b.DefaultSetRequirement = c; var x = function (c) { __extends(b, c); function b() { c.call(this, { dialogapi: a }) } return b }(c); b.DefaultDialogSetRequirement = x; var f = function (c) { __extends(b, c); function b() { c.call(this, { bindingevents: a, documentevents: a, excelapi: a, matrixbindings: a, matrixcoercion: a, selection: a, settings: a, tablebindings: a, tablecoercion: a, textbindings: a, textcoercion: a }) } return b }(c); b.ExcelClientDefaultSetRequirement = f; var k = function (c) { __extends(b, c); function b() { c.call(this); this._addSetMap({ imagecoercion: a }) } return b }(f); b.ExcelClientV1DefaultSetRequirement = k; var l = function (b) { __extends(a, b); function a() { b.call(this, { mailbox: 1.3 }) } return a }(c); b.OutlookClientDefaultSetRequirement = l; var h = function (c) { __extends(b, c); function b() { c.call(this, { bindingevents: a, compressedfile: a, customxmlparts: a, documentevents: a, file: a, htmlcoercion: a, matrixbindings: a, matrixcoercion: a, ooxmlcoercion: a, pdffile: a, selection: a, settings: a, tablebindings: a, tablecoercion: a, textbindings: a, textcoercion: a, textfile: a, wordapi: a }) } return b }(c); b.WordClientDefaultSetRequirement = h; var p = function (c) { __extends(b, c); function b() { c.call(this); this._addSetMap({ customxmlparts: 1.2, wordapi: 1.2, imagecoercion: a }) } return b }(h); b.WordClientV1DefaultSetRequirement = p; var e = function (c) { __extends(b, c); function b() { c.call(this, { activeview: a, compressedfile: a, documentevents: a, file: a, pdffile: a, selection: a, settings: a, textcoercion: a }) } return b }(c); b.PowerpointClientDefaultSetRequirement = e; var j = function (c) { __extends(b, c); function b() { c.call(this); this._addSetMap({ imagecoercion: a }) } return b }(e); b.PowerpointClientV1DefaultSetRequirement = j; var o = function (c) { __extends(b, c); function b() { c.call(this, { selection: a, textcoercion: a }) } return b }(c); b.ProjectClientDefaultSetRequirement = o; var u = function (c) { __extends(b, c); function b() { c.call(this, { bindingevents: a, documentevents: a, matrixbindings: a, matrixcoercion: a, selection: a, settings: a, tablebindings: a, tablecoercion: a, textbindings: a, textcoercion: a, file: a }) } return b }(c); b.ExcelWebDefaultSetRequirement = u; var w = function (c) { __extends(b, c); function b() { c.call(this, { compressedfile: a, documentevents: a, file: a, imagecoercion: a, matrixcoercion: a, ooxmlcoercion: a, pdffile: a, selection: a, settings: a, tablecoercion: a, textcoercion: a, textfile: a }) } return b }(c); b.WordWebDefaultSetRequirement = w; var n = function (c) { __extends(b, c); function b() { c.call(this, { activeview: a, settings: a }) } return b }(c); b.PowerpointWebDefaultSetRequirement = n; var g = function (b) { __extends(a, b); function a() { b.call(this, { mailbox: 1.3 }) } return a }(c); b.OutlookWebDefaultSetRequirement = g; var v = function (c) { __extends(b, c); function b() { c.call(this, { activeview: a, documentevents: a, selection: a, settings: a, textcoercion: a }) } return b }(c); b.SwayWebDefaultSetRequirement = v; var r = function (c) { __extends(b, c); function b() { c.call(this, { bindingevents: a, partialtablebindings: a, settings: a, tablebindings: a, tablecoercion: a }) } return b }(c); b.AccessWebDefaultSetRequirement = r; var t = function (c) { __extends(b, c); function b() { c.call(this, { bindingevents: a, documentevents: a, matrixbindings: a, matrixcoercion: a, selection: a, settings: a, tablebindings: a, tablecoercion: a, textbindings: a, textcoercion: a }) } return b }(c); b.ExcelIOSDefaultSetRequirement = t; var i = function (c) { __extends(b, c); function b() { c.call(this, { bindingevents: a, compressedfile: a, customxmlparts: a, documentevents: a, file: a, htmlcoercion: a, matrixbindings: a, matrixcoercion: a, ooxmlcoercion: a, pdffile: a, selection: a, settings: a, tablebindings: a, tablecoercion: a, textbindings: a, textcoercion: a, textfile: a }) } return b }(c); b.WordIOSDefaultSetRequirement = i; var s = function (b) { __extends(a, b); function a() { b.call(this); this._addSetMap({ customxmlparts: 1.2, wordapi: 1.2 }) } return a }(i); b.WordIOSV1DefaultSetRequirement = s; var m = function (c) { __extends(b, c); function b() { c.call(this, { activeview: a, compressedfile: a, documentevents: a, file: a, pdffile: a, selection: a, settings: a, textcoercion: a }) } return b }(c); b.PowerpointIOSDefaultSetRequirement = m; var q = function (c) { __extends(b, c); function b() { c.call(this, { mailbox: a }) } return b }(c); b.OutlookIOSDefaultSetRequirement = q; var y = function () { var b = "undefined"; function a() { } a.initializeOsfDda = function () { OSF.OUtil.setNamespace("Requirement", OSF.DDA) }; a.getDefaultRequirementMatrix = function (f) { this.initializeDefaultSetMatrix(); var e = undefined, g = f.get_requirementMatrix(); if (g != undefined && g.length > 0 && typeof JSON !== b) { var i = JSON.parse(f.get_requirementMatrix().toLowerCase()); e = new d(new c(i)) } else { var h = a.getClientFullVersionString(f); if (a.DefaultSetArrayMatrix != undefined && a.DefaultSetArrayMatrix[h] != undefined) e = new d(a.DefaultSetArrayMatrix[h]); else e = new d(new c({})) } return e }; a.getDefaultDialogRequirementMatrix = function (f) { var a = undefined, e = f.get_dialogRequirementMatrix(); if (e != undefined && e.length > 0 && typeof JSON !== b) { var g = JSON.parse(f.get_requirementMatrix().toLowerCase()); a = new d(new c(g)) } else a = new d(new x); return a }; a.getClientFullVersionString = function (a) { var d = a.get_appMinorVersion(), e = "", b = "", c = a.get_appName(), f = c == 1024 || c == 4096 || c == 8192 || c == 65536; if (f && a.get_appVersion() == 1) if (c == 4096 && d >= 15) b = "16.00.01"; else b = "16.00"; else if (a.get_appName() == 64) b = a.get_appVersion(); else { if (d < 10) e = "0" + d; else e = "" + d; b = a.get_appVersion() + "." + e } return a.get_appName() + "-" + b }; a.initializeDefaultSetMatrix = function () { a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1600] = new f; a.DefaultSetArrayMatrix[a.Word_RCLIENT_1600] = new h; a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1600] = new e; a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1601] = new k; a.DefaultSetArrayMatrix[a.Word_RCLIENT_1601] = new p; a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1601] = new j; a.DefaultSetArrayMatrix[a.Outlook_RCLIENT_1600] = new l; a.DefaultSetArrayMatrix[a.Excel_WAC_1600] = new u; a.DefaultSetArrayMatrix[a.Word_WAC_1600] = new w; a.DefaultSetArrayMatrix[a.Outlook_WAC_1600] = new g; a.DefaultSetArrayMatrix[a.Outlook_WAC_1601] = new g; a.DefaultSetArrayMatrix[a.Project_RCLIENT_1600] = new o; a.DefaultSetArrayMatrix[a.Access_WAC_1600] = new r; a.DefaultSetArrayMatrix[a.PowerPoint_WAC_1600] = new n; a.DefaultSetArrayMatrix[a.Excel_IOS_1600] = new t; a.DefaultSetArrayMatrix[a.SWAY_WAC_1600] = new v; a.DefaultSetArrayMatrix[a.Word_IOS_1600] = new i; a.DefaultSetArrayMatrix[a.Word_IOS_16001] = new s; a.DefaultSetArrayMatrix[a.PowerPoint_IOS_1600] = new m; a.DefaultSetArrayMatrix[a.Outlook_IOS_1600] = new q }; a.Excel_RCLIENT_1600 = "1-16.00"; a.Excel_RCLIENT_1601 = "1-16.01"; a.Word_RCLIENT_1600 = "2-16.00"; a.Word_RCLIENT_1601 = "2-16.01"; a.PowerPoint_RCLIENT_1600 = "4-16.00"; a.PowerPoint_RCLIENT_1601 = "4-16.01"; a.Outlook_RCLIENT_1600 = "8-16.00"; a.Excel_WAC_1600 = "16-16.00"; a.Word_WAC_1600 = "32-16.00"; a.Outlook_WAC_1600 = "64-16.00"; a.Outlook_WAC_1601 = "64-16.01"; a.Project_RCLIENT_1600 = "128-16.00"; a.Access_WAC_1600 = "256-16.00"; a.PowerPoint_WAC_1600 = "512-16.00"; a.Excel_IOS_1600 = "1024-16.00"; a.SWAY_WAC_1600 = "2048-16.00"; a.Word_IOS_1600 = "4096-16.00"; a.Word_IOS_16001 = "4096-16.00.01"; a.PowerPoint_IOS_1600 = "8192-16.00"; a.Outlook_IOS_1600 = "65536-16.00"; a.DefaultSetArrayMatrix = {}; return a }(); b.RequirementsMatrixFactory = y })(b = a.Requirement || (a.Requirement = {})) })(OfficeExt || (OfficeExt = {})); OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(); var OfficeExt; (function (a) { var b; (function (a) { var b = function () { function a() { var a = this; a.getDiagnostics = function (b) { var a = { host: this.getHost(), version: b || this.getDefaultVersion(), platform: this.getPlatform() }; return a }; a.platformRemappings = { web: Microsoft.Office.WebExtension.PlatformType.OfficeOnline, winrt: Microsoft.Office.WebExtension.PlatformType.Universal, win32: Microsoft.Office.WebExtension.PlatformType.PC, ios: Microsoft.Office.WebExtension.PlatformType.iOS, android: Microsoft.Office.WebExtension.PlatformType.Android }; a.camelCaseMappings = { powerpoint: Microsoft.Office.WebExtension.HostType.PowerPoint, onenote: Microsoft.Office.WebExtension.HostType.OneNote }; a.hostInfo = OSF._OfficeAppFactory.getHostInfo(); a.getHost = a.getHost.bind(a); a.getPlatform = a.getPlatform.bind(a); a.getDiagnostics = a.getDiagnostics.bind(a) } a.prototype.capitalizeFirstLetter = function (a) { if (a) return a[0].toUpperCase() + a.slice(1).toLowerCase(); return a }; a.getInstance = function () { if (a.hostObj === undefined) a.hostObj = new a; return a.hostObj }; a.prototype.getPlatform = function () { var a = this; if (a.hostInfo.hostPlatform) { var b = a.hostInfo.hostPlatform.toLowerCase(); if (a.platformRemappings[b]) return a.platformRemappings[b] } return null }; a.prototype.getHost = function () { var a = this; if (a.hostInfo.hostType) { var b = a.hostInfo.hostType.toLowerCase(); if (a.camelCaseMappings[b]) return a.camelCaseMappings[b]; b = a.capitalizeFirstLetter(a.hostInfo.hostType); if (Microsoft.Office.WebExtension.HostType[b]) return Microsoft.Office.WebExtension.HostType[b] } return null }; a.prototype.getDefaultVersion = function () { if (this.getHost()) return "16.0.0000.0000"; return null }; return a }(); a.Host = b })(b = a.HostName || (a.HostName = {})) })(OfficeExt || (OfficeExt = {})); Microsoft.Office.WebExtension.ApplicationMode = { WebEditor: "webEditor", WebViewer: "webViewer", Client: "client" }; Microsoft.Office.WebExtension.DocumentMode = { ReadOnly: "readOnly", ReadWrite: "readWrite" }; OSF.NamespaceManager = function () { var b, a = false; return { enableShortcut: function () { if (!a) { if (window.Office) b = window.Office; else OSF.OUtil.setNamespace("Office", window); window.Office = Microsoft.Office.WebExtension; a = true } }, disableShortcut: function () { if (a) { if (b) window.Office = b; else OSF.OUtil.unsetNamespace("Office", window); a = false } } } }(); OSF.NamespaceManager.enableShortcut(); Microsoft.Office.WebExtension.useShortNamespace = function (a) { if (a) OSF.NamespaceManager.enableShortcut(); else OSF.NamespaceManager.disableShortcut() }; Microsoft.Office.WebExtension.select = function (a, b) { var c; if (a && typeof a == "string") { var d = a.indexOf("#"); if (d != -1) { var h = a.substring(0, d), g = a.substring(d + 1); switch (h) { case "binding": case "bindings": if (g) c = new OSF.DDA.BindingPromise(g) } } } if (!c) { if (b) { var e = typeof b; if (e == "function") { var f = {}; f[Microsoft.Office.WebExtension.Parameters.Callback] = b; OSF.DDA.issueAsyncResult(f, OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext, OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext)) } else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction, e) } } else { c.onFail = b; return c } }; OSF.DDA.Context = function (a, g, h, c, d) { var f = "requirements", b = this; OSF.OUtil.defineEnumerableProperties(b, { contentLanguage: { value: a.get_dataLocale() }, displayLanguage: { value: a.get_appUILocale() }, touchEnabled: { value: a.get_touchEnabled() }, commerceAllowed: { value: a.get_commerceAllowed() }, host: { value: OfficeExt.HostName.Host.getInstance().getHost() }, platform: { value: OfficeExt.HostName.Host.getInstance().getPlatform() }, diagnostics: { value: OfficeExt.HostName.Host.getInstance().getDiagnostics(a.get_hostFullVersion()) } }); h && OSF.OUtil.defineEnumerableProperty(b, "license", { value: h }); a.ui && OSF.OUtil.defineEnumerableProperty(b, "ui", { value: a.ui }); if (a.get_isDialog()) { var e = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(a); OSF.OUtil.defineEnumerableProperty(b, f, { value: e }) } else { g && OSF.OUtil.defineEnumerableProperty(b, "document", { value: g }); if (c) { var i = c.displayName || "appOM"; delete c.displayName; OSF.OUtil.defineEnumerableProperty(b, i, { value: c }) } d && OSF.OUtil.defineEnumerableProperty(b, "officeTheme", { "get": function () { return d() } }); var e = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(a); OSF.OUtil.defineEnumerableProperty(b, f, { value: e }) } }; OSF.DDA.OutlookContext = function (c, a, d, e, b) { OSF.DDA.OutlookContext.uber.constructor.call(this, c, null, d, e, b); a && OSF.OUtil.defineEnumerableProperty(this, "roamingSettings", { value: a }) }; OSF.OUtil.extend(OSF.DDA.OutlookContext, OSF.DDA.Context); OSF.DDA.OutlookAppOm = function () { }; OSF.DDA.Document = function (b, c) { var a; switch (b.get_clientMode()) { case OSF.ClientMode.ReadOnly: a = Microsoft.Office.WebExtension.DocumentMode.ReadOnly; break; case OSF.ClientMode.ReadWrite: a = Microsoft.Office.WebExtension.DocumentMode.ReadWrite } c && OSF.OUtil.defineEnumerableProperty(this, "settings", { value: c }); OSF.OUtil.defineMutableProperties(this, { mode: { value: a }, url: { value: b.get_docUrl() } }) }; OSF.DDA.JsomDocument = function (d, b, e) { var a = this; OSF.DDA.JsomDocument.uber.constructor.call(a, d, e); b && OSF.OUtil.defineEnumerableProperty(a, "bindings", { "get": function () { return b } }); var c = OSF.DDA.AsyncMethodNames; OSF.DDA.DispIdHost.addAsyncMethods(a, [c.GetSelectedDataAsync, c.SetSelectedDataAsync]); OSF.DDA.DispIdHost.addEventSupport(a, new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged])) }; OSF.OUtil.extend(OSF.DDA.JsomDocument, OSF.DDA.Document); OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension, "context", { "get": function () { var a; if (OSF && OSF._OfficeAppFactory) a = OSF._OfficeAppFactory.getContext(); return a } }); OSF.DDA.License = function (a) { OSF.OUtil.defineEnumerableProperty(this, "value", { value: a }) }; OSF.DDA.ApiMethodCall = function (c, f, e, g, h) { var a = this, d = c.length, b = OSF.OUtil.delayExecutionAndCache(function () { return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters, h) }); a.verifyArguments = function (d, f) { for (var e in d) { var a = d[e], c = f[e]; if (a["enum"]) switch (typeof c) { case "string": if (OSF.OUtil.listContainsValue(a["enum"], c)) break; case "undefined": throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration; default: throw b() } if (a["types"]) if (!OSF.OUtil.listContainsValue(a["types"], typeof c)) throw b() } }; a.extractRequiredArguments = function (g, l, j) { if (g.length < d) throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments); for (var e = [], a = 0; a < d; a++) e.push(g[a]); this.verifyArguments(c, e); var i = {}; for (a = 0; a < d; a++) { var f = c[a], h = e[a]; if (f.verify) { var k = f.verify(h, l, j); if (!k) throw b() } i[f.name] = h } return i }, a.fillOptions = function (a, e, h, g) { a = a || {}; for (var d in f) if (!OSF.OUtil.listContainsKey(a, d)) { var c = undefined, b = f[d]; if (b.calculate && e) c = b.calculate(e, h, g); if (!c && b.defaultValue !== undefined) c = b.defaultValue; a[d] = c } return a }; a.constructCallArgs = function (c, d, f, b) { var a = {}; for (var i in c) a[i] = c[i]; for (var h in d) a[h] = d[h]; for (var j in e) a[j] = e[j](f, b); if (g) a = g(a, f, b); return a } }; OSF.OUtil.setNamespace("AsyncResultEnum", OSF.DDA); OSF.DDA.AsyncResultEnum.Properties = { Context: "Context", Value: "Value", Status: "Status", Error: "Error" }; Microsoft.Office.WebExtension.AsyncResultStatus = { Succeeded: "succeeded", Failed: "failed" }; OSF.DDA.AsyncResultEnum.ErrorCode = { Success: 0, Failed: 1 }; OSF.DDA.AsyncResultEnum.ErrorProperties = { Name: "Name", Message: "Message", Code: "Code" }; OSF.DDA.AsyncMethodNames = {}; OSF.DDA.AsyncMethodNames.addNames = function (b) { for (var a in b) { var c = {}; OSF.OUtil.defineEnumerableProperties(c, { id: { value: a }, displayName: { value: b[a] } }); OSF.DDA.AsyncMethodNames[a] = c } }; OSF.DDA.AsyncMethodCall = function (d, e, i, f, g, j, k) { var a = "function", c = d.length, b = new OSF.DDA.ApiMethodCall(d, e, i, j, k); function h(h, j, l, k) { if (h.length > c + 2) throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); for (var d, f, i = h.length - 1; i >= c; i--) { var g = h[i]; switch (typeof g) { case "object": if (d) throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); else d = g; break; case a: if (f) throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction); else f = g; break; default: throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument) } } d = b.fillOptions(d, j, l, k); if (f) if (d[Microsoft.Office.WebExtension.Parameters.Callback]) throw Strings.OfficeOM.L_RedundantCallbackSpecification; else d[Microsoft.Office.WebExtension.Parameters.Callback] = f; b.verifyArguments(e, d); return d } this.verifyAndExtractCall = function (e, c, a) { var d = b.extractRequiredArguments(e, c, a), g = h(e, d, c, a), f = b.constructCallArgs(d, g, c, a); return f }; this.processResponse = function (c, b, e, d) { var a; if (c == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) if (f) a = f(b, e, d); else a = b; else if (g) a = g(c, b); else a = OSF.DDA.ErrorCodeManager.getErrorArgs(c); return a }; this.getCallArgs = function (g) { for (var b, d, f = g.length - 1; f >= c; f--) { var e = g[f]; switch (typeof e) { case "object": b = e; break; case a: d = e } } b = b || {}; if (d) b[Microsoft.Office.WebExtension.Parameters.Callback] = d; return b } }; OSF.DDA.AsyncMethodCallFactory = function () { return { manufacture: function (a) { var c = a.supportedOptions ? OSF.OUtil.createObject(a.supportedOptions) : [], b = a.privateStateCallbacks ? OSF.OUtil.createObject(a.privateStateCallbacks) : []; return new OSF.DDA.AsyncMethodCall(a.requiredArguments || [], c, b, a.onSucceeded, a.onFailed, a.checkCallArgs, a.method.displayName) } } }(); OSF.DDA.AsyncMethodCalls = {}; OSF.DDA.AsyncMethodCalls.define = function (a) { OSF.DDA.AsyncMethodCalls[a.method.id] = OSF.DDA.AsyncMethodCallFactory.manufacture(a) }; OSF.DDA.Error = function (c, a, b) { OSF.OUtil.defineEnumerableProperties(this, { name: { value: c }, message: { value: a }, code: { value: b } }) }; OSF.DDA.AsyncResult = function (b, a) { OSF.OUtil.defineEnumerableProperties(this, { value: { value: b[OSF.DDA.AsyncResultEnum.Properties.Value] }, status: { value: a ? Microsoft.Office.WebExtension.AsyncResultStatus.Failed : Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded } }); b[OSF.DDA.AsyncResultEnum.Properties.Context] && OSF.OUtil.defineEnumerableProperty(this, "asyncContext", { value: b[OSF.DDA.AsyncResultEnum.Properties.Context] }); a && OSF.OUtil.defineEnumerableProperty(this, "error", { value: new OSF.DDA.Error(a[OSF.DDA.AsyncResultEnum.ErrorProperties.Name], a[OSF.DDA.AsyncResultEnum.ErrorProperties.Message], a[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]) }) }; OSF.DDA.issueAsyncResult = function (d, f, a) { var e = d[Microsoft.Office.WebExtension.Parameters.Callback]; if (e) { var c = {}; c[OSF.DDA.AsyncResultEnum.Properties.Context] = d[Microsoft.Office.WebExtension.Parameters.AsyncContext]; var b; if (f == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) c[OSF.DDA.AsyncResultEnum.Properties.Value] = a; else { b = {}; a = a || OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); b[OSF.DDA.AsyncResultEnum.ErrorProperties.Code] = f || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; b[OSF.DDA.AsyncResultEnum.ErrorProperties.Name] = a.name || a; b[OSF.DDA.AsyncResultEnum.ErrorProperties.Message] = a.message || a } e(new OSF.DDA.AsyncResult(c, b)) } }; OSF.DDA.SyncMethodNames = {}; OSF.DDA.SyncMethodNames.addNames = function (b) { for (var a in b) { var c = {}; OSF.OUtil.defineEnumerableProperties(c, { id: { value: a }, displayName: { value: b[a] } }); OSF.DDA.SyncMethodNames[a] = c } }; OSF.DDA.SyncMethodCall = function (b, c, f, g, h) { var d = b.length, a = new OSF.DDA.ApiMethodCall(b, c, f, g, h); function e(e, h, j, i) { if (e.length > d + 1) throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments); for (var b, k, f = e.length - 1; f >= d; f--) { var g = e[f]; switch (typeof g) { case "object": if (b) throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects); else b = g; break; default: throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument) } } b = a.fillOptions(b, h, j, i); a.verifyArguments(c, b); return b } this.verifyAndExtractCall = function (f, c, b) { var d = a.extractRequiredArguments(f, c, b), h = e(f, d, c, b), g = a.constructCallArgs(d, h, c, b); return g } }; OSF.DDA.SyncMethodCallFactory = function () { return { manufacture: function (a) { var b = a.supportedOptions ? OSF.OUtil.createObject(a.supportedOptions) : []; return new OSF.DDA.SyncMethodCall(a.requiredArguments || [], b, a.privateStateCallbacks, a.checkCallArgs, a.method.displayName) } } }(); OSF.DDA.SyncMethodCalls = {}; OSF.DDA.SyncMethodCalls.define = function (a) { OSF.DDA.SyncMethodCalls[a.method.id] = OSF.DDA.SyncMethodCallFactory.manufacture(a) }; OSF.DDA.ListType = function () { var a = {}; return { setListType: function (c, b) { a[c] = b }, isListType: function (b) { return OSF.OUtil.listContainsKey(a, b) }, getDescriptor: function (b) { return a[b] } } }(); OSF.DDA.HostParameterMap = function (b, c) { var j = "fromHost", a = this, i = "toHost", e = j, l = "sourceData", g = "self", d = {}; d[Microsoft.Office.WebExtension.Parameters.Data] = { toHost: function (a) { if (a != null && a.rows !== undefined) { var b = {}; b[OSF.DDA.TableDataProperties.TableRows] = a.rows; b[OSF.DDA.TableDataProperties.TableHeaders] = a.headers; a = b } return a }, fromHost: function (a) { return a } }; d[Microsoft.Office.WebExtension.Parameters.SampleData] = d[Microsoft.Office.WebExtension.Parameters.Data]; function f(j, i) { var m = j ? {} : undefined; for (var h in j) { var g = j[h], a; if (OSF.DDA.ListType.isListType(h)) { a = []; for (var n in g) a.push(f(g[n], i)) } else if (OSF.OUtil.listContainsKey(d, h)) a = d[h][i](g); else if (i == e && b.preserveNesting(h)) a = f(g, i); else { var k = c[h]; if (k) { var l = k[i]; if (l) { a = l[g]; if (a === undefined) a = g } } else a = g } m[h] = a } return m } function k(j, h) { var e; for (var a in h) { var d; if (b.isComplexType(a)) d = k(j, c[a][i]); else d = j[a]; if (d != undefined) { if (!e) e = {}; var f = h[a]; if (f == g) f = a; e[f] = b.pack(a, d) } } return e } function h(j, n, f) { if (!f) f = {}; for (var a in n) { var k = n[a], d; if (k == g) d = j; else if (k == l) { f[a] = j.toArray(); continue } else d = j[k]; if (d === null || d === undefined) f[a] = undefined; else { d = b.unpack(a, d); var i; if (b.isComplexType(a)) { i = c[a][e]; if (b.preserveNesting(a)) f[a] = h(d, i); else h(d, i, f) } else if (OSF.DDA.ListType.isListType(a)) { i = {}; var p = OSF.DDA.ListType.getDescriptor(a); i[p] = g; var m = new Array(d.length); for (var o in d) m[o] = h(d[o], i); f[a] = m } else f[a] = d } } return f } function m(l, e, a) { var d = c[l][a], b; if (a == "toHost") { var i = f(e, a); b = k(i, d) } else if (a == j) { var g = h(e, d); b = f(g, a) } return b } if (!c) c = {}; a.addMapping = function (l, h) { var a, d; if (h.map) { a = h.map; d = {}; for (var j in a) { var k = a[j]; if (k == g) k = j; d[k] = j } } else { a = h.toHost; d = h.fromHost } var b = c[l]; if (b) { var f = b[i]; for (var n in f) a[n] = f[n]; f = b[e]; for (var m in f) d[m] = f[m] } else b = c[l] = {}; b[i] = a; b[e] = d }; a.toHost = function (b, a) { return m(b, a, i) }; a.fromHost = function (a, b) { return m(a, b, e) }; a.self = g; a.sourceData = l; a.addComplexType = function (a) { b.addComplexType(a) }; a.getDynamicType = function (a) { return b.getDynamicType(a) }; a.setDynamicType = function (c, a) { b.setDynamicType(c, a) }; a.dynamicTypes = d; a.doMapValues = function (a, b) { return f(a, b) } }; OSF.DDA.SpecialProcessor = function (c, b) { var a = this; a.addComplexType = function (a) { c.push(a) }; a.getDynamicType = function (a) { return b[a] }; a.setDynamicType = function (c, a) { b[c] = a }; a.isComplexType = function (a) { return OSF.OUtil.listContainsValue(c, a) }; a.isDynamicType = function (a) { return OSF.OUtil.listContainsKey(b, a) }; a.preserveNesting = function (b) { var a = []; OSF.DDA.PropertyDescriptors && a.push(OSF.DDA.PropertyDescriptors.Subset); if (OSF.DDA.DataNodeEventProperties) a = a.concat([OSF.DDA.DataNodeEventProperties.OldNode, OSF.DDA.DataNodeEventProperties.NewNode, OSF.DDA.DataNodeEventProperties.NextSiblingNode]); return OSF.OUtil.listContainsValue(a, b) }; a.pack = function (c, d) { var a; if (this.isDynamicType(c)) a = b[c].toHost(d); else a = d; return a }; a.unpack = function (c, d) { var a; if (this.isDynamicType(c)) a = b[c].fromHost(d); else a = d; return a } }; OSF.DDA.getDecoratedParameterMap = function (d, c) { var a = new OSF.DDA.HostParameterMap(d), f = a.self; function b(a) { var c = null; if (a) { c = {}; for (var d = a.length, b = 0; b < d; b++) c[a[b].name] = a[b].value } return c } a.define = function (c) { var d = {}, e = b(c.toHost); if (c.invertible) d.map = e; else if (c.canonical) d.toHost = d.fromHost = e; else { d.toHost = e; d.fromHost = b(c.fromHost) } a.addMapping(c.type, d); c.isComplexType && a.addComplexType(c.type) }; for (var e in c) a.define(c[e]); return a }; OSF.OUtil.setNamespace("DispIdHost", OSF.DDA); OSF.DDA.DispIdHost.Methods = { InvokeMethod: "invokeMethod", AddEventHandler: "addEventHandler", RemoveEventHandler: "removeEventHandler", OpenDialog: "openDialog", CloseDialog: "closeDialog", MessageParent: "messageParent", SendMessage: "sendMessage" }; OSF.DDA.DispIdHost.Delegates = { ExecuteAsync: "executeAsync", RegisterEventAsync: "registerEventAsync", UnregisterEventAsync: "unregisterEventAsync", ParameterMap: "parameterMap", OpenDialog: "openDialog", CloseDialog: "closeDialog", MessageParent: "messageParent", SendMessage: "sendMessage" }; OSF.DDA.DispIdHost.Facade = function (e, g) { var c = null, f = this, b = {}, d = OSF.DDA.AsyncMethodNames, a = OSF.DDA.MethodDispId, l = { GoToByIdAsync: a.dispidNavigateToMethod, GetSelectedDataAsync: a.dispidGetSelectedDataMethod, SetSelectedDataAsync: a.dispidSetSelectedDataMethod, GetDocumentCopyChunkAsync: a.dispidGetDocumentCopyChunkMethod, ReleaseDocumentCopyAsync: a.dispidReleaseDocumentCopyMethod, GetDocumentCopyAsync: a.dispidGetDocumentCopyMethod, AddFromSelectionAsync: a.dispidAddBindingFromSelectionMethod, AddFromPromptAsync: a.dispidAddBindingFromPromptMethod, AddFromNamedItemAsync: a.dispidAddBindingFromNamedItemMethod, GetAllAsync: a.dispidGetAllBindingsMethod, GetByIdAsync: a.dispidGetBindingMethod, ReleaseByIdAsync: a.dispidReleaseBindingMethod, GetDataAsync: a.dispidGetBindingDataMethod, SetDataAsync: a.dispidSetBindingDataMethod, AddRowsAsync: a.dispidAddRowsMethod, AddColumnsAsync: a.dispidAddColumnsMethod, DeleteAllDataValuesAsync: a.dispidClearAllRowsMethod, RefreshAsync: a.dispidLoadSettingsMethod, SaveAsync: a.dispidSaveSettingsMethod, GetActiveViewAsync: a.dispidGetActiveViewMethod, GetFilePropertiesAsync: a.dispidGetFilePropertiesMethod, GetOfficeThemeAsync: a.dispidGetOfficeThemeMethod, GetDocumentThemeAsync: a.dispidGetDocumentThemeMethod, ClearFormatsAsync: a.dispidClearFormatsMethod, SetTableOptionsAsync: a.dispidSetTableOptionsMethod, SetFormatsAsync: a.dispidSetFormatsMethod, ExecuteRichApiRequestAsync: a.dispidExecuteRichApiRequestMethod, AppCommandInvocationCompletedAsync: a.dispidAppCommandInvocationCompletedMethod, CloseContainerAsync: a.dispidCloseContainerMethod, AddDataPartAsync: a.dispidAddDataPartMethod, GetDataPartByIdAsync: a.dispidGetDataPartByIdMethod, GetDataPartsByNameSpaceAsync: a.dispidGetDataPartsByNamespaceMethod, GetPartXmlAsync: a.dispidGetDataPartXmlMethod, GetPartNodesAsync: a.dispidGetDataPartNodesMethod, DeleteDataPartAsync: a.dispidDeleteDataPartMethod, GetNodeValueAsync: a.dispidGetDataNodeValueMethod, GetNodeXmlAsync: a.dispidGetDataNodeXmlMethod, GetRelativeNodesAsync: a.dispidGetDataNodesMethod, SetNodeValueAsync: a.dispidSetDataNodeValueMethod, SetNodeXmlAsync: a.dispidSetDataNodeXmlMethod, AddDataPartNamespaceAsync: a.dispidAddDataNamespaceMethod, GetDataPartNamespaceAsync: a.dispidGetDataUriByPrefixMethod, GetDataPartPrefixAsync: a.dispidGetDataPrefixByUriMethod, GetNodeTextAsync: a.dispidGetDataNodeTextMethod, SetNodeTextAsync: a.dispidSetDataNodeTextMethod, GetSelectedTask: a.dispidGetSelectedTaskMethod, GetTask: a.dispidGetTaskMethod, GetWSSUrl: a.dispidGetWSSUrlMethod, GetTaskField: a.dispidGetTaskFieldMethod, GetSelectedResource: a.dispidGetSelectedResourceMethod, GetResourceField: a.dispidGetResourceFieldMethod, GetProjectField: a.dispidGetProjectFieldMethod, GetSelectedView: a.dispidGetSelectedViewMethod, GetTaskByIndex: a.dispidGetTaskByIndexMethod, GetResourceByIndex: a.dispidGetResourceByIndexMethod, SetTaskField: a.dispidSetTaskFieldMethod, SetResourceField: a.dispidSetResourceFieldMethod, GetMaxTaskIndex: a.dispidGetMaxTaskIndexMethod, GetMaxResourceIndex: a.dispidGetMaxResourceIndexMethod, CreateTask: a.dispidCreateTaskMethod }; for (var h in l) if (d[h]) b[d[h].id] = l[h]; d = OSF.DDA.SyncMethodNames; a = OSF.DDA.MethodDispId; var k = { MessageParent: a.dispidMessageParentMethod, SendMessage: a.dispidSendMessageMethod }; for (var h in k) if (d[h]) b[d[h].id] = k[h]; d = Microsoft.Office.WebExtension.EventType; a = OSF.DDA.EventDispId; var m = { SettingsChanged: a.dispidSettingsChangedEvent, DocumentSelectionChanged: a.dispidDocumentSelectionChangedEvent, BindingSelectionChanged: a.dispidBindingSelectionChangedEvent, BindingDataChanged: a.dispidBindingDataChangedEvent, ActiveViewChanged: a.dispidActiveViewChangedEvent, OfficeThemeChanged: a.dispidOfficeThemeChangedEvent, DocumentThemeChanged: a.dispidDocumentThemeChangedEvent, AppCommandInvoked: a.dispidAppCommandInvokedEvent, DialogMessageReceived: a.dispidDialogMessageReceivedEvent, DialogParentMessageReceived: a.dispidDialogParentMessageReceivedEvent, ItemChanged: a.dispidOlkItemSelectedChangedEvent, TaskSelectionChanged: a.dispidTaskSelectionChangedEvent, ResourceSelectionChanged: a.dispidResourceSelectionChangedEvent, ViewSelectionChanged: a.dispidViewSelectionChangedEvent, DataNodeInserted: a.dispidDataNodeAddedEvent, DataNodeReplaced: a.dispidDataNodeReplacedEvent, DataNodeDeleted: a.dispidDataNodeDeletedEvent }; for (var j in m) if (d[j]) b[d[j]] = m[j]; function i(a, c, d, b) { if (typeof a == "number") { if (!b) b = c.getCallArgs(d); OSF.DDA.issueAsyncResult(b, a, OSF.DDA.ErrorCodeManager.getErrorArgs(a)) } else throw a } f[OSF.DDA.DispIdHost.Methods.InvokeMethod] = function (r, l, m, p) { var a; try { var f = r.id, h = OSF.DDA.AsyncMethodCalls[f]; a = h.verifyAndExtractCall(l, m, p); var k = b[f], q = e(f), d = c; if (window.Excel && window.Office.context.requirements.isSetSupported("RedirectV1Api")) window.Excel._RedirectV1APIs = true; if (window.Excel && window.Excel._RedirectV1APIs && (d = window.Excel._V1APIMap[f])) { if (d.preprocess) a = d.preprocess(a); var n = new window.Excel.RequestContext, s = d.call(n, a); n.sync().then(function () { var b = s.value, c = b.status; delete b["status"]; delete b["@odata.type"]; if (d.postprocess) b = d.postprocess(b, a); if (c != 0) b = OSF.DDA.ErrorCodeManager.getErrorArgs(c); OSF.DDA.issueAsyncResult(a, c, b) })["catch"](function () { OSF.DDA.issueAsyncResult(a, OSF.DDA.ErrorCodeManager.errorCodes.ooeFailure, c) }) } else { var j; if (g.toHost) j = g.toHost(k, a); else j = a; q[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ dispId: k, hostCallArgs: j, onCalling: function () { }, onReceiving: function () { }, onComplete: function (d, c) { var b; if (d == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) if (g.fromHost) b = g.fromHost(k, c); else b = c; else b = c; var e = h.processResponse(d, b, m, a); OSF.DDA.issueAsyncResult(a, d, e) } }) } } catch (o) { i(o, h, l, a) } }; f[OSF.DDA.DispIdHost.Methods.AddEventHandler] = function (j, d, h, o) { var c, a, l; function f(b) { if (b == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { var f = d.addEventHandler(a, l); if (!f) b = OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed } var e; if (b != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) e = OSF.DDA.ErrorCodeManager.getErrorArgs(b); OSF.DDA.issueAsyncResult(c, b, e) } try { var k = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id]; c = k.verifyAndExtractCall(j, h, d); a = c[Microsoft.Office.WebExtension.Parameters.EventType]; l = c[Microsoft.Office.WebExtension.Parameters.Handler]; if (o) { f(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); return } if (d.getEventHandlerCount(a) == 0) { var m = b[a], p = e(a)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; p({ eventType: a, dispId: m, targetId: h.id || "", onCalling: function () { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) }, onReceiving: function () { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) }, onComplete: f, onEvent: function (b) { var c = g.fromHost(m, b); d.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(a, h, c)) } }) } else f(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) } catch (n) { i(n, k, j, c) } }; f[OSF.DDA.DispIdHost.Methods.RemoveEventHandler] = function (l, f, n) { var d, a, h; function k(a) { var b; if (a != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) b = OSF.DDA.ErrorCodeManager.getErrorArgs(a); OSF.DDA.issueAsyncResult(d, a, b) } try { var m = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id]; d = m.verifyAndExtractCall(l, n, f); a = d[Microsoft.Office.WebExtension.Parameters.EventType]; h = d[Microsoft.Office.WebExtension.Parameters.Handler]; var j, g; if (h === c) { g = f.clearEventHandlers(a); j = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess } else { g = f.removeEventHandler(a, h); j = g ? OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess : OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist } if (g && f.getEventHandlerCount(a) == 0) { var q = b[a], p = e(a)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; p({ eventType: a, dispId: q, targetId: n.id || "", onCalling: function () { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) }, onReceiving: function () { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) }, onComplete: k }) } else k(j) } catch (o) { i(o, m, l, d) } }; f[OSF.DDA.DispIdHost.Methods.OpenDialog] = function (o, a, n) { var h, m, d = Microsoft.Office.WebExtension.EventType.DialogMessageReceived, f = Microsoft.Office.WebExtension.EventType.DialogEventReceived; function j(b) { var e; if (b != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) e = OSF.DDA.ErrorCodeManager.getErrorArgs(b); else { var c = {}; c[Microsoft.Office.WebExtension.Parameters.Id] = m; c[Microsoft.Office.WebExtension.Parameters.Data] = a; var e = k.processResponse(b, c, n, h); OSF.DialogShownStatus.hasDialogShown = true; a.clearEventHandlers(d); a.clearEventHandlers(f) } OSF.DDA.issueAsyncResult(h, b, e) } try { (d == undefined || f == undefined) && j(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported); if (OSF.DDA.AsyncMethodNames.DisplayDialogAsync == c) { j(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError); return } var k = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id]; h = k.verifyAndExtractCall(o, n, a); var p = b[d], l = e(d), r = l[OSF.DDA.DispIdHost.Delegates.OpenDialog] != undefined ? l[OSF.DDA.DispIdHost.Delegates.OpenDialog] : l[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; m = JSON.stringify(h); if (!OSF.DialogShownStatus.hasDialogShown) { a.clearQueuedEvent(d); a.clearQueuedEvent(f); a.clearQueuedEvent(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived) } r({ eventType: d, dispId: p, targetId: m, onCalling: function () { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) }, onReceiving: function () { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) }, onComplete: j, onEvent: function (i) { var h = g.fromHost(p, i), e = OSF.DDA.OMFactory.manufactureEventArgs(d, n, h); if (e.type == f) { var c = OSF.DDA.ErrorCodeManager.getErrorArgs(e.error), b = {}; b[OSF.DDA.AsyncResultEnum.ErrorProperties.Code] = status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; b[OSF.DDA.AsyncResultEnum.ErrorProperties.Name] = c.name || c; b[OSF.DDA.AsyncResultEnum.ErrorProperties.Message] = c.message || c; e.error = new OSF.DDA.Error(b[OSF.DDA.AsyncResultEnum.ErrorProperties.Name], b[OSF.DDA.AsyncResultEnum.ErrorProperties.Message], b[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]) } a.fireOrQueueEvent(e); if (h[OSF.DDA.PropertyDescriptors.MessageType] == OSF.DialogMessageType.DialogClosed) { a.clearEventHandlers(d); a.clearEventHandlers(f); a.clearEventHandlers(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived); OSF.DialogShownStatus.hasDialogShown = false } } }) } catch (q) { i(q, k, o, h) } }; f[OSF.DDA.DispIdHost.Methods.CloseDialog] = function (g, n, d, p) { var k, a, h, f = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; function m(a) { f = a; OSF.DialogShownStatus.hasDialogShown = false } try { var j = OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id]; k = j.verifyAndExtractCall(g, p, d); a = Microsoft.Office.WebExtension.EventType.DialogMessageReceived; h = Microsoft.Office.WebExtension.EventType.DialogEventReceived; d.clearEventHandlers(a); d.clearEventHandlers(h); var q = b[a], c = e(a), o = c[OSF.DDA.DispIdHost.Delegates.CloseDialog] != undefined ? c[OSF.DDA.DispIdHost.Delegates.CloseDialog] : c[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; o({ eventType: a, dispId: q, targetId: n, onCalling: function () { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) }, onReceiving: function () { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) }, onComplete: m }) } catch (l) { i(l, j, g, k) } if (f != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed, OSF.DDA.AsyncMethodNames.CloseAsync.displayName, f) }; f[OSF.DDA.DispIdHost.Methods.MessageParent] = function (a, i) { var d = {}, c = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id], f = c.verifyAndExtractCall(a, i, d), g = e(OSF.DDA.SyncMethodNames.MessageParent.id), h = g[OSF.DDA.DispIdHost.Delegates.MessageParent], j = b[OSF.DDA.SyncMethodNames.MessageParent.id]; return h({ dispId: j, hostCallArgs: f, onCalling: function () { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) }, onReceiving: function () { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) } }) }; f[OSF.DDA.DispIdHost.Methods.SendMessage] = function (a, k, i) { var d = {}, c = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.SendMessage.id], f = c.verifyAndExtractCall(a, i, d), g = e(OSF.DDA.SyncMethodNames.SendMessage.id), h = g[OSF.DDA.DispIdHost.Delegates.SendMessage], j = b[OSF.DDA.SyncMethodNames.SendMessage.id]; return h({ dispId: j, hostCallArgs: f, onCalling: function () { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall) }, onReceiving: function () { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse) } }) } }; OSF.DDA.DispIdHost.addAsyncMethods = function (a, b, e) { for (var f in b) { var c = b[f], d = c.displayName; !a[d] && OSF.OUtil.defineEnumerableProperty(a, d, { value: function (b) { return function () { var c = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod]; c(b, arguments, a, e) } }(c) }) } }; OSF.DDA.DispIdHost.addEventSupport = function (a, b, e) { var d = OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName, c = OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName; !a[d] && OSF.OUtil.defineEnumerableProperty(a, d, { value: function () { var c = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler]; c(arguments, b, a, e) } }); !a[c] && OSF.OUtil.defineEnumerableProperty(a, c, { value: function () { var c = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]; c(arguments, b, a) } }) }; OSF.ShowWindowDialogParameterKeys = { Url: "url", Width: "width", Height: "height", DisplayInIframe: "displayInIframe" }; OSF.HostThemeButtonStyleKeys = { ButtonBorderColor: "buttonBorderColor", ButtonBackgroundColor: "buttonBackgroundColor" }; var OfficeExt; (function (a) { var b; (function (a) { var f = "^https://[a-z0-9-]+.(officeapps.live|officeapps-df.live|partner.officewebapps).com/"; function b(a, b) { return OSF.OUtil.parseInfoFromWindowName(a, b, OSF.WindowNameItemKeys.AppContext) } a.parseAppContextFromWindowName = b; function d(a) { if (typeof JSON !== "undefined") try { return JSON.stringify(a) } catch (b) { } return "" } a.serializeObjectToString = d; function g() { return (new RegExp(f)).test(OSF.getClientEndPoint()._targetUrl.toLowerCase()) } a.isHostTrusted = g; function c(b, e) { if (!b) return null; b = b.trim() || ""; var f = "?", k = "_host_Info=", j = "&_host_Info=", d = "#", i = b.split(d), c = i.shift(), h = i.join(d), g = c.split(f), a; if (g.length > 1) a = c + j + e; else if (g.length > 0) a = c + f + k + e; if (h) return [a, d, h].join(""); else return a } a.addHostInfoAsQueryParam = c; function e(b) { if (!b) return null; var a = document.createElement("a"); a.href = b; return a.protocol + "//" + a.host } a.getDomainForUrl = e })(b = a.WACUtils || (a.WACUtils = {})) })(OfficeExt || (OfficeExt = {})); var OfficeExt; (function (g) { var c = "\n", d = true, a = null, b = "undefined", j = function () { function c() { } c.isInstanceOfType = function (f, e) { if (typeof e === b || e === a) return false; if (e instanceof f) return d; var c = e.constructor; if (!c || typeof c !== "function" || !c.__typeName || c.__typeName === "Object") c = Object; return !!(c === f) || c.__typeName && f.__typeName && c.__typeName === f.__typeName }; return c }(); g.MsAjaxTypeHelper = j; var h = function () { var e = "Parameter name: {0}"; function d() { } d.create = function (c, b) { var a = new Error(c); a.message = c; if (b) for (var d in b) a[d] = b[d]; a.popStackFrame(); return a }; d.parameterCount = function (a) { var c = "Sys.ParameterCountException: " + (a ? a : "Parameter count mismatch."), b = d.create(c, { name: "Sys.ParameterCountException" }); b.popStackFrame(); return b }; d.argument = function (a, g) { var b = "Sys.ArgumentException: " + (g ? g : "Value does not fall within the expected range."); if (a) b += c + f.format(e, a); var h = d.create(b, { name: "Sys.ArgumentException", paramName: a }); h.popStackFrame(); return h }; d.argumentNull = function (a, g) { var b = "Sys.ArgumentNullException: " + (g ? g : "Value cannot be null."); if (a) b += c + f.format(e, a); var h = d.create(b, { name: "Sys.ArgumentNullException", paramName: a }); h.popStackFrame(); return h }; d.argumentOutOfRange = function (i, g, j) { var h = "Sys.ArgumentOutOfRangeException: " + (j ? j : "Specified argument was out of the range of valid values."); if (i) h += c + f.format(e, i); if (typeof g !== b && g !== a) h += c + f.format("Actual value was {0}.", g); var k = d.create(h, { name: "Sys.ArgumentOutOfRangeException", paramName: i, actualValue: g }); k.popStackFrame(); return k }; d.argumentType = function (h, g, b, i) { var a = "Sys.ArgumentTypeException: "; if (i) a += i; else if (g && b) a += f.format("Object of type '{0}' cannot be converted to type '{1}'.", g.getName ? g.getName() : g, b.getName ? b.getName() : b); else a += "Object cannot be converted to the required type."; if (h) a += c + f.format(e, h); var j = d.create(a, { name: "Sys.ArgumentTypeException", paramName: h, actualType: g, expectedType: b }); j.popStackFrame(); return j }; d.argumentUndefined = function (a, g) { var b = "Sys.ArgumentUndefinedException: " + (g ? g : "Value cannot be undefined."); if (a) b += c + f.format(e, a); var h = d.create(b, { name: "Sys.ArgumentUndefinedException", paramName: a }); h.popStackFrame(); return h }; d.invalidOperation = function (a) { var c = "Sys.InvalidOperationException: " + (a ? a : "Operation is not valid due to the current state of the object."), b = d.create(c, { name: "Sys.InvalidOperationException" }); b.popStackFrame(); return b }; return d }(); g.MsAjaxError = h; var f = function () { function a() { } a.format = function (c) { for (var b = [], a = 1; a < arguments.length; a++) b[a - 1] = arguments[a]; var d = c; return d.replace(/{(\d+)}/gm, function (d, a) { var c = parseInt(a, 10); return b[c] === undefined ? "{" + a + "}" : b[c] }) }; a.startsWith = function (b, a) { return b.substr(0, a.length) === a }; return a }(); g.MsAjaxString = f; var i = function () { function a() { } a.trace = function () { }; return a }(); g.MsAjaxDebug = i; if (!OsfMsAjaxFactory.isMsAjaxLoaded()) { var e = function (a, c, b) { if (a.__typeName === undefined) a.__typeName = c; if (a.__class === undefined) a.__class = b }; e(Function, "Function", d); e(Error, "Error", d); e(Object, "Object", d); e(String, "String", d); e(Boolean, "Boolean", d); e(Date, "Date", d); e(Number, "Number", d); e(RegExp, "RegExp", d); e(Array, "Array", d); if (!Function.createCallback) Function.createCallback = function (b, a) { var c = Function._validateParams(arguments, [{ name: "method", type: Function }, { name: "context", mayBeNull: d }]); if (c) throw c; return function () { var e = arguments.length; if (e > 0) { for (var d = [], c = 0; c < e; c++) d[c] = arguments[c]; d[e] = a; return b.apply(this, d) } return b.call(this, a) } }; if (!Function.createDelegate) Function.createDelegate = function (b, c) { var a = Function._validateParams(arguments, [{ name: "instance", mayBeNull: d }, { name: "method", type: Function }]); if (a) throw a; return function () { return c.apply(b, arguments) } }; if (!Function._validateParams) Function._validateParams = function (i, g, e) { var c, f = g.length; e = e || typeof e === b; c = Function._validateParameterCount(i, g, e); if (c) { c.popStackFrame(); return c } for (var d = 0, k = i.length; d < k; d++) { var h = g[Math.min(d, f - 1)], j = h.name; if (h.parameterArray) j += "[" + (d - f + 1) + "]"; else if (!e && d >= f) break; c = Function._validateParameter(i[d], h, j); if (c) { c.popStackFrame(); return c } } return a }; if (!Function._validateParameterCount) Function._validateParameterCount = function (m, f, l) { var b, e, c = f.length, g = m.length; if (g < c) { var i = c; for (b = 0; b < c; b++) { var j = f[b]; if (j.optional || j.parameterArray) i-- } if (g < i) e = d } else if (l && g > c) { e = d; for (b = 0; b < c; b++) if (f[b].parameterArray) { e = false; break } } if (e) { var k = h.parameterCount(); k.popStackFrame(); return k } return a }; if (!Function._validateParameter) Function._validateParameter = function (e, c, j) { var d, i = c.type, n = !!c.integer, m = !!c.domElement, o = !!c.mayBeNull; d = Function._validateParameterType(e, i, n, m, o, j); if (d) { d.popStackFrame(); return d } var g = c.elementType, h = !!c.elementMayBeNull; if (i === Array && typeof e !== b && e !== a && (g || !h)) for (var l = !!c.elementInteger, k = !!c.elementDomElement, f = 0; f < e.length; f++) { var p = e[f]; d = Function._validateParameterType(p, g, l, k, h, j + "[" + f + "]"); if (d) { d.popStackFrame(); return d } } return a }; if (!Function._validateParameterType) Function._validateParameterType = function (d, e, j, i, h, f) { var c, k; if (typeof d === b) if (h) return a; else { c = g.MsAjaxError.argumentUndefined(f); c.popStackFrame(); return c } if (d === a) if (h) return a; else { c = g.MsAjaxError.argumentNull(f); c.popStackFrame(); return c } if (e && !g.MsAjaxTypeHelper.isInstanceOfType(e, d)) { c = g.MsAjaxError.argumentType(f, typeof d, e); c.popStackFrame(); return c } return a }; if (!window.Type) window.Type = Function; if (!Type.registerNamespace) Type.registerNamespace = function (d) { for (var c = d.split("."), b = window, a = 0; a < c.length; a++) { b[c[a]] = b[c[a]] || {}; b = b[c[a]] } }; if (!Type.prototype.registerClass) Type.prototype.registerClass = function (a) { a = {} }; typeof Sys === b && Type.registerNamespace("Sys"); if (!Error.prototype.popStackFrame) Error.prototype.popStackFrame = function () { var d = this; if (arguments.length !== 0) throw h.parameterCount(); if (typeof d.stack === b || d.stack === a || typeof d.fileName === b || d.fileName === a || typeof d.lineNumber === b || d.lineNumber === a) return; var e = d.stack.split(c), g = e[0], j = d.fileName + ":" + d.lineNumber; while (typeof g !== b && g !== a && g.indexOf(j) === -1) { e.shift(); g = e[0] } var i = e[1]; if (typeof i === b || i === a) return; var f = i.match(/@(.*):(\d+)$/); if (typeof f === b || f === a) return; d.fileName = f[1]; d.lineNumber = parseInt(f[2]); e.shift(); d.stack = e.join(c) }; OsfMsAjaxFactory.msAjaxError = h; OsfMsAjaxFactory.msAjaxString = f; OsfMsAjaxFactory.msAjaxDebug = i } })(OfficeExt || (OfficeExt = {})); OSF.OUtil.setNamespace("Microsoft", window); OSF.OUtil.setNamespace("Office", Microsoft); OSF.OUtil.setNamespace("Common", Microsoft.Office); OSF.SerializerVersion = { MsAjax: 0, Browser: 1 }; var OfficeExt; (function (b) { function a() { return true } b.appSpecificCheckOrigin = a })(OfficeExt || (OfficeExt = {})); Microsoft.Office.Common.InvokeType = { async: 0, sync: 1, asyncRegisterEvent: 2, asyncUnregisterEvent: 3, syncRegisterEvent: 4, syncUnregisterEvent: 5 }; Microsoft.Office.Common.InvokeResultCode = { noError: 0, errorInRequest: -1, errorHandlingRequest: -2, errorInResponse: -3, errorHandlingResponse: -4, errorHandlingRequestAccessDenied: -5, errorHandlingMethodCallTimedout: -6 }; Microsoft.Office.Common.MessageType = { request: 0, response: 1 }; Microsoft.Office.Common.ActionType = { invoke: 0, registerEvent: 1, unregisterEvent: 2 }; Microsoft.Office.Common.ResponseType = { forCalling: 0, forEventing: 1 }; Microsoft.Office.Common.MethodObject = function (c, b, a) { this._method = c; this._invokeType = b; this._blockingOthers = a }; Microsoft.Office.Common.MethodObject.prototype = { getMethod: function () { return this._method }, getInvokeType: function () { return this._invokeType }, getBlockingFlag: function () { return this._blockingOthers } }; Microsoft.Office.Common.EventMethodObject = function (b, a) { this._registerMethodObject = b; this._unregisterMethodObject = a }; Microsoft.Office.Common.EventMethodObject.prototype = { getRegisterMethodObject: function () { return this._registerMethodObject }, getUnregisterMethodObject: function () { return this._unregisterMethodObject } }; Microsoft.Office.Common.ServiceEndPoint = function (c) { var a = this, b = Function._validateParams(arguments, [{ name: "serviceEndPointId", type: String, mayBeNull: false }]); if (b) throw b; a._methodObjectList = {}; a._eventHandlerProxyList = {}; a._Id = c; a._conversations = {}; a._policyManager = null; a._appDomains = {}; a._onHandleRequestError = null }; Microsoft.Office.Common.ServiceEndPoint.prototype = { registerMethod: function (g, h, b, e) { var c = "invokeType", a = false, d = Function._validateParams(arguments, [{ name: "methodName", type: String, mayBeNull: a }, { name: "method", type: Function, mayBeNull: a }, { name: c, type: Number, mayBeNull: a }, { name: "blockingOthers", type: Boolean, mayBeNull: a }]); if (d) throw d; if (b !== Microsoft.Office.Common.InvokeType.async && b !== Microsoft.Office.Common.InvokeType.sync) throw OsfMsAjaxFactory.msAjaxError.argument(c); var f = new Microsoft.Office.Common.MethodObject(h, b, e); this._methodObjectList[g] = f }, unregisterMethod: function (b) { var a = Function._validateParams(arguments, [{ name: "methodName", type: String, mayBeNull: false }]); if (a) throw a; delete this._methodObjectList[b] }, registerEvent: function (f, d, c) { var a = false, b = Function._validateParams(arguments, [{ name: "eventName", type: String, mayBeNull: a }, { name: "registerMethod", type: Function, mayBeNull: a }, { name: "unregisterMethod", type: Function, mayBeNull: a }]); if (b) throw b; var e = new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(d, Microsoft.Office.Common.InvokeType.syncRegisterEvent, a), new Microsoft.Office.Common.MethodObject(c, Microsoft.Office.Common.InvokeType.syncUnregisterEvent, a)); this._methodObjectList[f] = e }, registerEventEx: function (h, f, d, e, c) { var a = false, b = Function._validateParams(arguments, [{ name: "eventName", type: String, mayBeNull: a }, { name: "registerMethod", type: Function, mayBeNull: a }, { name: "registerMethodInvokeType", type: Number, mayBeNull: a }, { name: "unregisterMethod", type: Function, mayBeNull: a }, { name: "unregisterMethodInvokeType", type: Number, mayBeNull: a }]); if (b) throw b; var g = new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(f, d, a), new Microsoft.Office.Common.MethodObject(e, c, a)); this._methodObjectList[h] = g }, unregisterEvent: function (b) { var a = Function._validateParams(arguments, [{ name: "eventName", type: String, mayBeNull: false }]); if (a) throw a; this.unregisterMethod(b) }, registerConversation: function (c, g, b, f) { var d = "appDomains", a = true, e = Function._validateParams(arguments, [{ name: "conversationId", type: String, mayBeNull: false }, { name: "conversationUrl", type: String, mayBeNull: false, optional: a }, { name: d, type: Object, mayBeNull: a, optional: a }, { name: "serializerVersion", type: Number, mayBeNull: a, optional: a }]); if (e) throw e; if (b) { if (!(b instanceof Array)) throw OsfMsAjaxFactory.msAjaxError.argument(d); this._appDomains[c] = b } this._conversations[c] = { url: g, serializerVersion: f } }, unregisterConversation: function (b) { var a = Function._validateParams(arguments, [{ name: "conversationId", type: String, mayBeNull: false }]); if (a) throw a; delete this._conversations[b] }, setPolicyManager: function (a) { var b = "policyManager", c = Function._validateParams(arguments, [{ name: b, type: Object, mayBeNull: false }]); if (c) throw c; if (!a.checkPermission) throw OsfMsAjaxFactory.msAjaxError.argument(b); this._policyManager = a }, getPolicyManager: function () { return this._policyManager }, dispose: function () { var a = null, b = this; b._methodObjectList = a; b._eventHandlerProxyList = a; b._Id = a; b._conversations = a; b._policyManager = a; b._appDomains = a; b._onHandleRequestError = a } }; Microsoft.Office.Common.ClientEndPoint = function (f, b, g, d) { var c = "targetWindow", a = this, e = Function._validateParams(arguments, [{ name: "conversationId", type: String, mayBeNull: false }, { name: c, mayBeNull: false }, { name: "targetUrl", type: String, mayBeNull: false }, { name: "serializerVersion", type: Number, mayBeNull: true, optional: true }]); if (e) throw e; try { if (!b.postMessage) throw OsfMsAjaxFactory.msAjaxError.argument(c) } catch (h) { if (!Object.prototype.hasOwnProperty.call(b, "postMessage")) throw OsfMsAjaxFactory.msAjaxError.argument(c) } a._conversationId = f; a._targetWindow = b; a._targetUrl = g; a._callingIndex = 0; a._callbackList = {}; a._eventHandlerList = {}; if (d != null) a._serializerVersion = d; else a._serializerVersion = OSF.SerializerVersion.Browser }; Microsoft.Office.Common.ClientEndPoint.prototype = { invoke: function (h, d, b) { var a = this, g = Function._validateParams(arguments, [{ name: "targetMethodName", type: String, mayBeNull: false }, { name: "callback", type: Function, mayBeNull: true }, { name: "param", mayBeNull: true }]); if (g) throw g; var c = a._callingIndex++, k = new Date, e = { callback: d, createdOn: k.getTime() }; if (b && typeof b === "object" && typeof b.__timeout__ === "number") { e.timeout = b.__timeout__; delete b.__timeout__ } a._callbackList[c] = e; try { var i = new Microsoft.Office.Common.Request(h, Microsoft.Office.Common.ActionType.invoke, a._conversationId, c, b), j = Microsoft.Office.Common.MessagePackager.envelope(i, a._serializerVersion); a._targetWindow.postMessage(j, a._targetUrl); Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer() } catch (f) { try { d !== null && d(Microsoft.Office.Common.InvokeResultCode.errorInRequest, f) } finally { delete a._callbackList[c] } } }, registerForEvent: function (d, g, c, i) { var a = this, f = Function._validateParams(arguments, [{ name: "targetEventName", type: String, mayBeNull: false }, { name: "eventHandler", type: Function, mayBeNull: false }, { name: "callback", type: Function, mayBeNull: true }, { name: "data", mayBeNull: true, optional: true }]); if (f) throw f; var b = a._callingIndex++, k = new Date; a._callbackList[b] = { callback: c, createdOn: k.getTime() }; try { var h = new Microsoft.Office.Common.Request(d, Microsoft.Office.Common.ActionType.registerEvent, a._conversationId, b, i), j = Microsoft.Office.Common.MessagePackager.envelope(h, a._serializerVersion); a._targetWindow.postMessage(j, a._targetUrl); Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer(); a._eventHandlerList[d] = g } catch (e) { try { c !== null && c(Microsoft.Office.Common.InvokeResultCode.errorInRequest, e) } finally { delete a._callbackList[b] } } }, unregisterForEvent: function (d, c, h) { var a = this, f = Function._validateParams(arguments, [{ name: "targetEventName", type: String, mayBeNull: false }, { name: "callback", type: Function, mayBeNull: true }, { name: "data", mayBeNull: true, optional: true }]); if (f) throw f; var b = a._callingIndex++, j = new Date; a._callbackList[b] = { callback: c, createdOn: j.getTime() }; try { var g = new Microsoft.Office.Common.Request(d, Microsoft.Office.Common.ActionType.unregisterEvent, a._conversationId, b, h), i = Microsoft.Office.Common.MessagePackager.envelope(g, a._serializerVersion); a._targetWindow.postMessage(i, a._targetUrl); Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer() } catch (e) { try { c !== null && c(Microsoft.Office.Common.InvokeResultCode.errorInRequest, e) } finally { delete a._callbackList[b] } } finally { delete a._eventHandlerList[d] } } }; Microsoft.Office.Common.XdmCommunicationManager = function () { var l = "serviceEndPointId", c = true, k = "channel is not ready.", f = "conversationId", j = "Unknown conversation Id.", b = false, a = null, n = [], m = a, g = a, q = 10, i = b, h = a, x = 2e3, p = 65000, s = p, e = {}, d = {}, u = b; function y(b) { for (var a in e) if (e[a]._conversations[b]) return e[a]; OsfMsAjaxFactory.msAjaxDebug.trace(j); throw OsfMsAjaxFactory.msAjaxError.argument(f) } function z(b) { var a = d[b]; !a && OsfMsAjaxFactory.msAjaxDebug.trace(j); return a } function C(e, c) { var b = e._methodObjectList[c._actionName]; if (!b) { OsfMsAjaxFactory.msAjaxDebug.trace("The specified method is not registered on service endpoint:" + c._actionName); throw OsfMsAjaxFactory.msAjaxError.argument("messageObject") } var d = a; if (c._actionType === Microsoft.Office.Common.ActionType.invoke) d = b; else if (c._actionType === Microsoft.Office.Common.ActionType.registerEvent) d = b.getRegisterMethodObject(); else d = b.getUnregisterMethodObject(); return d } function F(a) { n.push(a) } function E() { if (g !== a) { if (!i) if (n.length > 0) { var b = n.shift(); r(b) } else { clearInterval(g); g = a } } else OsfMsAjaxFactory.msAjaxDebug.trace(k) } function r(a) { i = a.getInvokeBlockingFlag(); a.invoke(); m = (new Date).getTime() } function B() { if (h) { var c, f = 0, j = new Date, e; for (var i in d) { c = d[i]; for (var g in c._callbackList) { var b = c._callbackList[g]; e = b.timeout ? b.timeout : s; if (e >= 0 && Math.abs(j.getTime() - b.createdOn) >= e) try { b.callback && b.callback(Microsoft.Office.Common.InvokeResultCode.errorHandlingMethodCallTimedout, a) } finally { delete c._callbackList[g] } else f++ } } if (f === 0) { clearInterval(h); h = a } } else OsfMsAjaxFactory.msAjaxDebug.trace(k) } function A() { i = b } function D(a) { if (window.addEventListener) window.addEventListener("message", a, b); else if (navigator.userAgent.indexOf("MSIE") > -1 && window.attachEvent) window.attachEvent("onmessage", a); else { OsfMsAjaxFactory.msAjaxDebug.trace("Browser doesn't support the required API."); throw OsfMsAjaxFactory.msAjaxError.argument("Browser") } } function t(e, f) { var g = b; if (e === c) return c; if (!e || !f || !e.length || !f.length) return g; var d, a; d = document.createElement("a"); a = document.createElement("a"); d.href = e; a.href = f; g = w(d, a); delete d, a; return g } function o(a, g) { var c = b; if (!g || !g.length || !a || !(a instanceof Array) || !a.length) return c; var f = document.createElement("a"), e = document.createElement("a"); f.href = g; for (var d = 0; d < a.length && !c; d++) if (a[d].indexOf("://") !== -1) { e.href = a[d]; c = w(f, e) } delete f, e; return c } function w(a, b) { return a.hostname == b.hostname && a.protocol == b.protocol && a.port == b.port } function G(e) { var l = "Access Denied"; if (!OSF) return; if (e.data != "") { var d, f = OSF.SerializerVersion.Browser, H = e.data; try { d = Microsoft.Office.Common.MessagePackager.unenvelope(H, OSF.SerializerVersion.Browser); f = d._serializerVersion != a ? d._serializerVersion : f } catch (k) { return } if (d._messageType === Microsoft.Office.Common.MessageType.request) { var w = e.origin == a || e.origin == "null" ? d._origin : e.origin; try { var h = y(d._conversationId), p = h._conversations[d._conversationId]; f = p.serializerVersion != a ? p.serializerVersion : f; if (!t(p.url, e.origin) && !o(h._appDomains[d._conversationId], e.origin)) throw "Failed origin check"; var v = h.getPolicyManager(); if (v && !v.checkPermission(d._conversationId, d._actionName, d._data)) throw l; var K = C(h, d), G = new Microsoft.Office.Common.InvokeCompleteCallback(e.source, w, d._actionName, d._conversationId, d._correlationId, A, f), D = new Microsoft.Office.Common.Invoker(K, d._data, G, h._eventHandlerProxyList, d._conversationId, d._actionName, f), x = c; if (g == a) if ((m == a || (new Date).getTime() - m > q) && !i) { r(D); x = b } else g = setInterval(E, q); x && F(D) } catch (k) { h && h._onHandleRequestError && h._onHandleRequestError(d, k); var B = Microsoft.Office.Common.InvokeResultCode.errorHandlingRequest; if (k == l) B = Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied; var J = new Microsoft.Office.Common.Response(d._actionName, d._conversationId, d._correlationId, B, Microsoft.Office.Common.ResponseType.forCalling, k), I = Microsoft.Office.Common.MessagePackager.envelope(J, f), u = b; try { u = !!(e.source && e.source.postMessage) } catch (k) { } u && e.source.postMessage(I, w) } } else if (d._messageType === Microsoft.Office.Common.MessageType.response) { var j = z(d._conversationId); if (!j) return; j._serializerVersion = f; if (!t(j._targetUrl, e.origin)) throw "Failed orgin check"; if (d._responseType === Microsoft.Office.Common.ResponseType.forCalling) { var n = j._callbackList[d._correlationId]; if (n) try { n.callback && n.callback(d._errorCode, d._data) } finally { delete j._callbackList[d._correlationId] } } else { var s = j._eventHandlerList[d._actionName]; s !== undefined && s !== a && s(d._data) } } else return } } function v() { if (!u) { D(G); u = c } } return { connect: function (b, e, f, c) { var a = d[b]; if (!a) { v(); a = new Microsoft.Office.Common.ClientEndPoint(b, e, f, c); d[b] = a } return a }, getClientEndPoint: function (c) { var a = Function._validateParams(arguments, [{ name: f, type: String, mayBeNull: b }]); if (a) throw a; return d[c] }, createServiceEndPoint: function (a) { v(); var b = new Microsoft.Office.Common.ServiceEndPoint(a); e[a] = b; return b }, getServiceEndPoint: function (c) { var a = Function._validateParams(arguments, [{ name: l, type: String, mayBeNull: b }]); if (a) throw a; return e[c] }, deleteClientEndPoint: function (c) { var a = Function._validateParams(arguments, [{ name: f, type: String, mayBeNull: b }]); if (a) throw a; delete d[c] }, deleteServiceEndPoint: function (c) { var a = Function._validateParams(arguments, [{ name: l, type: String, mayBeNull: b }]); if (a) throw a; delete e[c] }, checkUrlWithAppDomains: function (a, b) { return o(a, b) }, _setMethodTimeout: function (a) { var c = Function._validateParams(arguments, [{ name: "methodTimeout", type: Number, mayBeNull: b }]); if (c) throw c; s = a <= 0 ? p : a }, _startMethodTimeoutTimer: function () { if (!h) h = setInterval(B, x) } } }(); Microsoft.Office.Common.Message = function (g, h, e, f, c) { var b = false, a = this, d = Function._validateParams(arguments, [{ name: "messageType", type: Number, mayBeNull: b }, { name: "actionName", type: String, mayBeNull: b }, { name: "conversationId", type: String, mayBeNull: b }, { name: "correlationId", mayBeNull: b }, { name: "data", mayBeNull: true, optional: true }]); if (d) throw d; a._messageType = g; a._actionName = h; a._conversationId = e; a._correlationId = f; a._origin = window.location.href; if (typeof c == "undefined") a._data = null; else a._data = c }; Microsoft.Office.Common.Message.prototype = { getActionName: function () { return this._actionName }, getConversationId: function () { return this._conversationId }, getCorrelationId: function () { return this._correlationId }, getOrigin: function () { return this._origin }, getData: function () { return this._data }, getMessageType: function () { return this._messageType } }; Microsoft.Office.Common.Request = function (c, d, a, b, e) { Microsoft.Office.Common.Request.uber.constructor.call(this, Microsoft.Office.Common.MessageType.request, c, a, b, e); this._actionType = d }; OSF.OUtil.extend(Microsoft.Office.Common.Request, Microsoft.Office.Common.Message); Microsoft.Office.Common.Request.prototype.getActionType = function () { return this._actionType }; Microsoft.Office.Common.Response = function (d, a, b, e, c, f) { Microsoft.Office.Common.Response.uber.constructor.call(this, Microsoft.Office.Common.MessageType.response, d, a, b, f); this._errorCode = e; this._responseType = c }; OSF.OUtil.extend(Microsoft.Office.Common.Response, Microsoft.Office.Common.Message); Microsoft.Office.Common.Response.prototype.getErrorCode = function () { return this._errorCode }; Microsoft.Office.Common.Response.prototype.getResponseType = function () { return this._responseType }; Microsoft.Office.Common.MessagePackager = { envelope: function (a) { if (typeof a === "object") a._serializerVersion = OSF.SerializerVersion.Browser; return JSON.stringify(a) }, unenvelope: function (a) { return JSON.parse(a) } }; Microsoft.Office.Common.ResponseSender = function (f, i, k, g, h, j, e) { var c = false, a = this, d = Function._validateParams(arguments, [{ name: "requesterWindow", mayBeNull: c }, { name: "requesterUrl", type: String, mayBeNull: c }, { name: "actionName", type: String, mayBeNull: c }, { name: "conversationId", type: String, mayBeNull: c }, { name: "correlationId", mayBeNull: c }, { name: "responsetype", type: Number, maybeNull: c }, { name: "serializerVersion", type: Number, maybeNull: true, optional: true }]); if (d) throw d; a._requesterWindow = f; a._requesterUrl = i; a._actionName = k; a._conversationId = g; a._correlationId = h; a._invokeResultCode = Microsoft.Office.Common.InvokeResultCode.noError; a._responseType = j; var b = a; a._send = function (f) { try { var d = new Microsoft.Office.Common.Response(b._actionName, b._conversationId, b._correlationId, b._invokeResultCode, b._responseType, f), c = Microsoft.Office.Common.MessagePackager.envelope(d, e); b._requesterWindow.postMessage(c, b._requesterUrl) } catch (a) { OsfMsAjaxFactory.msAjaxDebug.trace("ResponseSender._send error:" + a.message) } } }; Microsoft.Office.Common.ResponseSender.prototype = { getRequesterWindow: function () { return this._requesterWindow }, getRequesterUrl: function () { return this._requesterUrl }, getActionName: function () { return this._actionName }, getConversationId: function () { return this._conversationId }, getCorrelationId: function () { return this._correlationId }, getSend: function () { return this._send }, setResultCode: function (a) { this._invokeResultCode = a } }; Microsoft.Office.Common.InvokeCompleteCallback = function (e, h, i, f, g, d, c) { var b = this; Microsoft.Office.Common.InvokeCompleteCallback.uber.constructor.call(b, e, h, i, f, g, Microsoft.Office.Common.ResponseType.forCalling, c); b._postCallbackHandler = d; var a = b; b._send = function (g, b) { if (b != undefined) a._invokeResultCode = b; try { var f = new Microsoft.Office.Common.Response(a._actionName, a._conversationId, a._correlationId, a._invokeResultCode, a._responseType, g), e = Microsoft.Office.Common.MessagePackager.envelope(f, c); a._requesterWindow.postMessage(e, a._requesterUrl); a._postCallbackHandler() } catch (d) { OsfMsAjaxFactory.msAjaxDebug.trace("InvokeCompleteCallback._send error:" + d.message) } } }; OSF.OUtil.extend(Microsoft.Office.Common.InvokeCompleteCallback, Microsoft.Office.Common.ResponseSender); Microsoft.Office.Common.Invoker = function (i, j, e, f, h, k, g) { var c = true, b = false, a = this, d = Function._validateParams(arguments, [{ name: "methodObject", mayBeNull: b }, { name: "paramValue", mayBeNull: c }, { name: "invokeCompleteCallback", mayBeNull: b }, { name: "eventHandlerProxyList", mayBeNull: c }, { name: "conversationId", type: String, mayBeNull: b }, { name: "eventName", type: String, mayBeNull: b }, { name: "serializerVersion", type: Number, mayBeNull: c, optional: c }]); if (d) throw d; a._methodObject = i; a._param = j; a._invokeCompleteCallback = e; a._eventHandlerProxyList = f; a._conversationId = h; a._eventName = k; a._serializerVersion = g }; Microsoft.Office.Common.Invoker.prototype = { invoke: function () { var a = this; try { var b; switch (a._methodObject.getInvokeType()) { case Microsoft.Office.Common.InvokeType.async: a._methodObject.getMethod()(a._param, a._invokeCompleteCallback.getSend()); break; case Microsoft.Office.Common.InvokeType.sync: b = a._methodObject.getMethod()(a._param); a._invokeCompleteCallback.getSend()(b); break; case Microsoft.Office.Common.InvokeType.syncRegisterEvent: var d = a._createEventHandlerProxyObject(a._invokeCompleteCallback); b = a._methodObject.getMethod()(d.getSend(), a._param); a._eventHandlerProxyList[a._conversationId + a._eventName] = d.getSend(); a._invokeCompleteCallback.getSend()(b); break; case Microsoft.Office.Common.InvokeType.syncUnregisterEvent: var g = a._eventHandlerProxyList[a._conversationId + a._eventName]; b = a._methodObject.getMethod()(g, a._param); delete a._eventHandlerProxyList[a._conversationId + a._eventName]; a._invokeCompleteCallback.getSend()(b); break; case Microsoft.Office.Common.InvokeType.asyncRegisterEvent: var c = a._createEventHandlerProxyObject(a._invokeCompleteCallback); a._methodObject.getMethod()(c.getSend(), a._invokeCompleteCallback.getSend(), a._param); a._eventHandlerProxyList[a._callerId + a._eventName] = c.getSend(); break; case Microsoft.Office.Common.InvokeType.asyncUnregisterEvent: var f = a._eventHandlerProxyList[a._callerId + a._eventName]; a._methodObject.getMethod()(f, a._invokeCompleteCallback.getSend(), a._param); delete a._eventHandlerProxyList[a._callerId + a._eventName] } } catch (e) { a._invokeCompleteCallback.setResultCode(Microsoft.Office.Common.InvokeResultCode.errorInResponse); a._invokeCompleteCallback.getSend()(e) } }, getInvokeBlockingFlag: function () { return this._methodObject.getBlockingFlag() }, _createEventHandlerProxyObject: function (a) { return new Microsoft.Office.Common.ResponseSender(a.getRequesterWindow(), a.getRequesterUrl(), a.getActionName(), a.getConversationId(), a.getCorrelationId(), Microsoft.Office.Common.ResponseType.forEventing, this._serializerVersion) } }; OSF.OUtil.setNamespace("WAC", OSF.DDA); OSF.DDA.WAC.UniqueArguments = { Data: "Data", Properties: "Properties", BindingRequest: "DdaBindingsMethod", BindingResponse: "Bindings", SingleBindingResponse: "singleBindingResponse", GetData: "DdaGetBindingData", AddRowsColumns: "DdaAddRowsColumns", SetData: "DdaSetBindingData", ClearFormats: "DdaClearBindingFormats", SetFormats: "DdaSetBindingFormats", SettingsRequest: "DdaSettingsMethod", BindingEventSource: "ddaBinding", ArrayData: "ArrayData" }; OSF.OUtil.setNamespace("Delegate", OSF.DDA.WAC); OSF.DDA.WAC.Delegate.SpecialProcessor = function () { var a = [OSF.DDA.WAC.UniqueArguments.SingleBindingResponse, OSF.DDA.WAC.UniqueArguments.BindingRequest, OSF.DDA.WAC.UniqueArguments.BindingResponse, OSF.DDA.WAC.UniqueArguments.GetData, OSF.DDA.WAC.UniqueArguments.AddRowsColumns, OSF.DDA.WAC.UniqueArguments.SetData, OSF.DDA.WAC.UniqueArguments.ClearFormats, OSF.DDA.WAC.UniqueArguments.SetFormats, OSF.DDA.WAC.UniqueArguments.SettingsRequest, OSF.DDA.WAC.UniqueArguments.BindingEventSource], b = {}; OSF.DDA.WAC.Delegate.SpecialProcessor.uber.constructor.call(this, a, b) }; OSF.OUtil.extend(OSF.DDA.WAC.Delegate.SpecialProcessor, OSF.DDA.SpecialProcessor); OSF.DDA.WAC.Delegate.ParameterMap = OSF.DDA.getDecoratedParameterMap(new OSF.DDA.WAC.Delegate.SpecialProcessor, []); OSF.OUtil.setNamespace("WAC", OSF.DDA); OSF.OUtil.setNamespace("Delegate", OSF.DDA.WAC); OSF.DDA.WAC.getDelegateMethods = function () { var a = {}; a[OSF.DDA.DispIdHost.Delegates.ExecuteAsync] = OSF.DDA.WAC.Delegate.executeAsync; a[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync] = OSF.DDA.WAC.Delegate.registerEventAsync; a[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync] = OSF.DDA.WAC.Delegate.unregisterEventAsync; a[OSF.DDA.DispIdHost.Delegates.OpenDialog] = OSF.DDA.WAC.Delegate.openDialog; a[OSF.DDA.DispIdHost.Delegates.MessageParent] = OSF.DDA.WAC.Delegate.messageParent; a[OSF.DDA.DispIdHost.Delegates.SendMessage] = OSF.DDA.WAC.Delegate.sendMessage; a[OSF.DDA.DispIdHost.Delegates.CloseDialog] = OSF.DDA.WAC.Delegate.closeDialog; return a }; OSF.DDA.WAC.Delegate.version = 1; OSF.DDA.WAC.Delegate.executeAsync = function (a) { if (!a.hostCallArgs) a.hostCallArgs = {}; a.hostCallArgs["DdaMethod"] = { ControlId: OSF._OfficeAppFactory.getId(), Version: OSF.DDA.WAC.Delegate.version, DispatchId: a.dispId }; a.hostCallArgs["__timeout__"] = -1; a.onCalling && a.onCalling(); var b = (new Date).getTime(); OSF.getClientEndPoint().invoke("executeMethod", function (e, d) { a.onReceiving && a.onReceiving(); var c; if (e == Microsoft.Office.Common.InvokeResultCode.noError) { OSF.DDA.WAC.Delegate.version = d["Version"]; c = d["Error"] } else switch (e) { case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied: c = OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; break; default: c = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError } a.onComplete && a.onComplete(c, d); OSF.AppTelemetry && OSF.AppTelemetry.onMethodDone(a.dispId, a.hostCallArgs, Math.abs((new Date).getTime() - b), c) }, a.hostCallArgs) }; OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent = function (c, a) { var b = (new Date).getTime(); return function (f, e) { a.onReceiving && a.onReceiving(); var d; if (f != Microsoft.Office.Common.InvokeResultCode.noError) switch (f) { case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied: d = OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability; break; default: d = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError } else if (e) if (e["Error"]) d = e["Error"]; else d = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; else d = OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError; a.onComplete && a.onComplete(d); OSF.AppTelemetry && OSF.AppTelemetry.onRegisterDone(c, a.dispId, Math.abs((new Date).getTime() - b), d) } }; OSF.DDA.WAC.Delegate.registerEventAsync = function (a) { a.onCalling && a.onCalling(); OSF.getClientEndPoint().registerForEvent(OSF.DDA.getXdmEventName(a.targetId, a.eventType), function (b) { a.onEvent && a.onEvent(b); OSF.AppTelemetry && OSF.AppTelemetry.onEventDone(a.dispId) }, OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(true, a), { controlId: OSF._OfficeAppFactory.getId(), eventDispId: a.dispId, targetId: a.targetId }) }; OSF.DDA.WAC.Delegate.unregisterEventAsync = function (a) { a.onCalling && a.onCalling(); OSF.getClientEndPoint().unregisterForEvent(OSF.DDA.getXdmEventName(a.targetId, a.eventType), OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(false, a), { controlId: OSF._OfficeAppFactory.getId(), eventDispId: a.dispId, targetId: a.targetId }) }; OSF.OUtil.setNamespace("WebApp", OSF); OSF.WebApp.AddHostInfoAndXdmInfo = function (a) { if (OSF._OfficeAppFactory.getWindowLocationSearch && OSF._OfficeAppFactory.getWindowLocationHash) return a + OSF._OfficeAppFactory.getWindowLocationSearch() + OSF._OfficeAppFactory.getWindowLocationHash(); else return a }; OSF.WebApp._UpdateLinksForHostAndXdmInfo = function () { for (var b = document.querySelectorAll("a[data-officejs-navigate]"), a = 0; a < b.length; a++) if (OSF.WebApp._isGoodUrl(b[a].href)) b[a].href = OSF.WebApp.AddHostInfoAndXdmInfo(b[a].href); for (var d = document.querySelectorAll("form[data-officejs-navigate]"), a = 0; a < d.length; a++) { var c = d[a]; if (OSF.WebApp._isGoodUrl(c.action)) c.action = OSF.WebApp.AddHostInfoAndXdmInfo(c.action) } }; OSF.WebApp._isGoodUrl = function (a) { if (typeof a == "undefined") return false; a = a.trim(); var d = a.indexOf(":"), b = d > 0 ? a.substr(0, d) : null, c = b !== null ? b.toLowerCase() === "http" || b.toLowerCase() === "https" : true; c = c && a != "#" && a != "/" && a != "" && a != OSF._OfficeAppFactory.getWebAppState().webAppUrl; return c }; OSF.InitializationHelper = function (e, b, g, f, c) { var a = this; a._hostInfo = e; a._webAppState = b; a._context = g; a._settings = f; a._hostFacade = c; a._appContext = {}; a._tabbableElements = "a[href]:not([tabindex='-1']),area[href]:not([tabindex='-1']),button:not([disabled]):not([tabindex='-1']),input:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),textarea:not([disabled]):not([tabindex='-1']),*[tabindex]:not([tabindex='-1']),*[contenteditable]:not([disabled]):not([tabindex='-1'])"; a._initializeSettings = function (g, f) { var d, b = g.get_settings(), c = OSF.OUtil.getSessionStorage(); if (c) { var a = c.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey()); if (a) b = JSON.parse(a); else { a = JSON.stringify(b); c.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(), a) } } var e = OSF.DDA.SettingsManager.deserializeSettings(b); if (f) d = new OSF.DDA.RefreshableSettings(e); else d = new OSF.DDA.Settings(e); return d }; var d = function (a) { var b = window.open; a.open = function (e, d, c) { var a = null; try { a = b(e, d, c) } catch (f) { OSF.AppTelemetry && OSF.AppTelemetry.logAppCommonMessage("Exception happens at windowOpen." + f) } if (!a) { var g = { strUrl: e, strWindowName: d, strWindowFeatures: c }; OSF._OfficeAppFactory.getClientEndPoint() && OSF._OfficeAppFactory.getClientEndPoint().invoke("ContextActivationManager_openWindowInHost", null, g) } return a } }; d(window) }; OSF.InitializationHelper.prototype.saveAndSetDialogInfo = function (b) { var d = "IsDialog", a = true, f = function () { var b = OSF.OUtil.parseXdmInfo(a); if (b) { var c = b.split("|"); return c[1] } return null }, c = OSF.OUtil.getSessionStorage(); if (c) { if (!b) b = OSF.OUtil.parseHostInfoFromWindowName(a, OSF._OfficeAppFactory.getWindowName()); if (b && b.indexOf("isDialog") > -1) { var e = f(); e != null && c.setItem(e + d, "true"); this._hostInfo.isDialog = a; return } this._hostInfo.isDialog = c.getItem(OSF.OUtil.getXdmFieldValue(OSF.XdmFieldName.AppId, false) + d) != null ? a : false } }; OSF.InitializationHelper.prototype.getAppContext = function (g, d) { var a = this, f = a, c = function (i, a) { var c; if (a._appName === OSF.AppName.ExcelWebApp) { var e = a._settings; c = {}; for (var o in e) { var k = e[o]; c[k[0]] = k[1] } } else c = a._settings; if (i === 0 && a._id != undefined && a._appName != undefined && a._appVersion != undefined && a._appUILocale != undefined && a._dataLocale != undefined && a._docUrl != undefined && a._clientMode != undefined && a._settings != undefined && a._reason != undefined) { f._appContext = a; var m = a._appInstanceId ? a._appInstanceId : a._id, n = false, l = true, h = 0; if (a._appMinorVersion != undefined) h = a._appMinorVersion; var g = undefined; if (a._requirementMatrix != undefined) g = a._requirementMatrix; a.eToken = a.eToken ? a.eToken : ""; var b = new OSF.OfficeAppContext(a._id, a._appName, a._appVersion, a._appUILocale, a._dataLocale, a._docUrl, a._clientMode, c, a._reason, a._osfControlType, a._eToken, a._correlationId, m, n, l, h, g, a._hostCustomMessage, a._hostFullVersion, a._clientWindowHeight, a._clientWindowWidth, a._addinName, a._appDomains, a._dialogRequirementMatrix); b._wacHostEnvironment = a._wacHostEnvironment || "0"; b._isFromWacAutomation = !!a._isFromWacAutomation; OSF.AppTelemetry && OSF.AppTelemetry.initialize(b); d(b) } else { var j = "Function ContextActivationManager_getAppContextAsync call failed. ErrorCode is " + i + ", exception: " + a; OSF.AppTelemetry && OSF.AppTelemetry.logAppException(j); throw j } }; try { if (a._hostInfo.isDialog && window.opener != null) { var e = OfficeExt.WACUtils.parseAppContextFromWindowName(false, OSF._OfficeAppFactory.getWindowName()); c(0, e) } else a._webAppState.clientEndPoint.invoke("ContextActivationManager_getAppContextAsync", c, a._webAppState.id) } catch (b) { OSF.AppTelemetry && OSF.AppTelemetry.logAppException("Exception thrown when trying to invoke getAppContextAsync. Exception:[" + b + "]"); throw b } }; OSF.InitializationHelper.prototype.setAgaveHostCommunication = function () { var d = null, b = false; try { var a = this, e = OSF.OUtil.parseXdmInfoWithGivenFragment(b, OSF._OfficeAppFactory.getWindowLocationHash()); if (!e && OSF._OfficeAppFactory.getWindowName) e = OSF.OUtil.parseXdmInfoFromWindowName(b, OSF._OfficeAppFactory.getWindowName()); if (e) { var c = OSF.OUtil.getInfoItems(e); if (c != undefined && c.length >= 3) { a._webAppState.conversationID = c[0]; a._webAppState.id = c[1]; a._webAppState.webAppUrl = c[2].indexOf(":") >= 0 ? c[2] : decodeURIComponent(c[2]) } } a._webAppState.wnd = window.opener != d ? window.opener : window.parent; var f = OSF.OUtil.parseSerializerVersionWithGivenFragment(b, OSF._OfficeAppFactory.getWindowLocationHash()); if (isNaN(f) && OSF._OfficeAppFactory.getWindowName) f = OSF.OUtil.parseSerializerVersionFromWindowName(b, OSF._OfficeAppFactory.getWindowName()); a._webAppState.serializerVersion = f; if (this._hostInfo.isDialog && window.opener != d) return; a._webAppState.clientEndPoint = Microsoft.Office.Common.XdmCommunicationManager.connect(a._webAppState.conversationID, a._webAppState.wnd, a._webAppState.webAppUrl, a._webAppState.serializerVersion); a._webAppState.serviceEndPoint = Microsoft.Office.Common.XdmCommunicationManager.createServiceEndPoint(a._webAppState.id); var h = a._webAppState.conversationID + OSF.SharedConstants.NotificationConversationIdSuffix; a._webAppState.serviceEndPoint.registerConversation(h, a._webAppState.webAppUrl); var i = function (e) { var c = "ContextActivationManager_notifyHost"; switch (e) { case OSF.AgaveHostAction.Select: a._webAppState.focused = true; break; case OSF.AgaveHostAction.UnSelect: a._webAppState.focused = b; break; case OSF.AgaveHostAction.TabIn: case OSF.AgaveHostAction.CtrlF6In: window.focus(); var g = document.querySelectorAll(a._tabbableElements), f = OSF.OUtil.focusToFirstTabbable(g, b); if (!f) { window.blur(); a._webAppState.focused = b; a._webAppState.clientEndPoint.invoke(c, d, [a._webAppState.id, OSF.AgaveHostAction.ExitNoFocusable]) } break; case OSF.AgaveHostAction.TabInShift: window.focus(); var g = document.querySelectorAll(a._tabbableElements), f = OSF.OUtil.focusToFirstTabbable(g, true); if (!f) { window.blur(); a._webAppState.focused = b; a._webAppState.clientEndPoint.invoke(c, d, [a._webAppState.id, OSF.AgaveHostAction.ExitNoFocusableShift]) } break; default: OsfMsAjaxFactory.msAjaxDebug.trace("actionId " + e + " notifyAgave is wrong.") } }; a._webAppState.serviceEndPoint.registerMethod("Office_notifyAgave", i, Microsoft.Office.Common.InvokeType.async, b); a.addOrRemoveEventListenersForWindow(true) } catch (g) { OSF.AppTelemetry && OSF.AppTelemetry.logAppException("Exception thrown in setAgaveHostCommunication. Exception:[" + g + "]"); throw g } }; OSF.InitializationHelper.prototype.addOrRemoveEventListenersForWindow = function (i) { var h = "keypress", c = null, b = "ContextActivationManager_notifyHost", a = this, f = function () { if (!a._webAppState.focused) a._webAppState.focused = true; a._webAppState.clientEndPoint.invoke(b, c, [a._webAppState.id, OSF.AgaveHostAction.Select]) }, g = function () { if (!OSF) return; if (a._webAppState.focused) a._webAppState.focused = false; a._webAppState.clientEndPoint.invoke(b, c, [a._webAppState.id, OSF.AgaveHostAction.UnSelect]) }, e = function (d) { d.preventDefault = d.preventDefault || function () { d.returnValue = false }; if (d.keyCode == 117 && (d.ctrlKey || d.metaKey)) { var f = OSF.AgaveHostAction.CtrlF6Exit; if (d.shiftKey) f = OSF.AgaveHostAction.CtrlF6ExitShift; a._webAppState.clientEndPoint.invoke(b, c, [a._webAppState.id, f]) } else if (d.keyCode == 9) { d.preventDefault(); var e = document.querySelectorAll(a._tabbableElements), g = OSF.OUtil.focusToNextTabbable(e, d.target || d.srcElement, d.shiftKey); if (!g) if (a._hostInfo.isDialog) OSF.OUtil.focusToFirstTabbable(e, d.shiftKey); else if (d.shiftKey) a._webAppState.clientEndPoint.invoke(b, c, [a._webAppState.id, OSF.AgaveHostAction.TabExitShift]); else a._webAppState.clientEndPoint.invoke(b, c, [a._webAppState.id, OSF.AgaveHostAction.TabExit]) } else if (d.keyCode == 27) { d.preventDefault(); a.dismissDialogNotification && a.dismissDialogNotification(); a._webAppState.clientEndPoint.invoke(b, c, [a._webAppState.id, OSF.AgaveHostAction.EscExit]) } else if (d.keyCode == 113) { d.preventDefault(); a._webAppState.clientEndPoint.invoke(b, c, [a._webAppState.id, OSF.AgaveHostAction.F2Exit]) } }, d = function (a) { if (a.keyCode == 117 && a.ctrlKey) if (a.preventDefault) a.preventDefault(); else a.returnValue = false }; if (i) { OSF.OUtil.addEventListener(window, "focus", f); OSF.OUtil.addEventListener(window, "blur", g); OSF.OUtil.addEventListener(window, "keydown", e); OSF.OUtil.addEventListener(window, h, d) } else { OSF.OUtil.removeEventListener(window, "focus", f); OSF.OUtil.removeEventListener(window, "blur", g); OSF.OUtil.removeEventListener(window, "keydown", e); OSF.OUtil.removeEventListener(window, h, d) } }; OSF.InitializationHelper.prototype.initWebDialog = function (a) { if (a.get_isDialog()) { if (OSF.DDA.UI.ChildUI) { var b = window.opener != null; a.ui = new OSF.DDA.UI.ChildUI(b); if (b) this.registerMessageReceivedEventForWindowDialog && this.registerMessageReceivedEventForWindowDialog() } } else if (OSF.DDA.UI.ParentUI) { a.ui = new OSF.DDA.UI.ParentUI; OfficeExt.Container && OSF.DDA.DispIdHost.addAsyncMethods(a.ui, [OSF.DDA.AsyncMethodNames.CloseContainerAsync]) } }; OSF.getClientEndPoint = function () { var a = OSF._OfficeAppFactory.getInitializationHelper(); return a._webAppState.clientEndPoint }; OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize = function () { var a = this; if (a._hostInfo.isDialog) { window.focus(); var c = document.querySelectorAll(a._tabbableElements), b = OSF.OUtil.focusToFirstTabbable(c, false); if (!b) { window.blur(); a._webAppState.focused = false; a._webAppState.clientEndPoint && a._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost", null, [a._webAppState.id, OSF.AgaveHostAction.ExitNoFocusable]) } } }; OSF.CommonUI = { HostButtonBorderColor: "#f5ba9d", HostButtonBackgroundColor: "#fcf0ed" }; var OSFLog; (function (g) { var e = "ResponseTime", d = "Message", c = "SessionId", b = "CorrelationId", a = true, f = function () { function b(a) { this._table = a; this._fields = {} } Object.defineProperty(b.prototype, "Fields", { "get": function () { return this._fields }, enumerable: a, configurable: a }); Object.defineProperty(b.prototype, "Table", { "get": function () { return this._table }, enumerable: a, configurable: a }); b.prototype.SerializeFields = function () { }; b.prototype.SetSerializedField = function (b, a) { if (typeof a !== "undefined" && a !== null) this._serializedFields[b] = a.toString() }; b.prototype.SerializeRow = function () { var a = this; a._serializedFields = {}; a.SetSerializedField("Table", a._table); a.SerializeFields(); return JSON.stringify(a._serializedFields) }; return b }(); g.BaseUsageData = f; var i = function (v) { var u = "IsFromWacAutomation", t = "WacHostEnvironment", s = "HostJSVersion", r = "OfficeJSVersion", q = "DocUrl", p = "AppSizeHeight", o = "AppSizeWidth", n = "ClientId", m = "HostVersion", l = "Host", k = "UserId", j = "Browser", i = "AssetId", h = "AppURL", g = "AppInstanceId", f = "AppId"; __extends(e, v); function e() { v.call(this, "AppActivated") } Object.defineProperty(e.prototype, b, { "get": function () { return this.Fields[b] }, "set": function (a) { this.Fields[b] = a }, enumerable: a, configurable: a }); Object.defineProperty(e.prototype, c, { "get": function () { return this.Fields[c] }, "set": function (a) { this.Fields[c] = a }, enumerable: a, configurable: a }); Object.defineProperty(e.prototype, f, { "get": function () { return this.Fields[f] }, "set": function (a) { this.Fields[f] = a }, enumerable: a, configurable: a }); Object.defineProperty(e.prototype, g, { "get": function () { return this.Fields[g] }, "set": function (a) { this.Fields[g] = a }, enumerable: a, configurable: a }); Object.defineProperty(e.prototype, h, { "get": function () { return this.Fields[h] }, "set": function (a) { this.Fields[h] = a }, enumerable: a, configurable: a }); Object.defineProperty(e.prototype, i, { "get": function () { return this.Fields[i] }, "set": function (a) { this.Fields[i] = a }, enumerable: a, configurable: a }); Object.defineProperty(e.prototype, j, { "get": function () { return this.Fields[j] }, "set": function (a) { this.Fields[j] = a }, enumerable: a, configurable: a }); Object.defineProperty(e.prototype, k, { "get": function () { return this.Fields[k] }, "set": function (a) { this.Fields[k] = a }, enumerable: a, configurable: a }); Object.defineProperty(e.prototype, l, { "get": function () { return this.Fields[l] }, "set": function (a) { this.Fields[l] = a }, enumerable: a, configurable: a }); Object.defineProperty(e.prototype, m, { "get": function () { return this.Fields[m] }, "set": function (a) { this.Fields[m] = a }, enumerable: a, configurable: a }); Object.defineProperty(e.prototype, n, { "get": function () { return this.Fields[n] }, "set": function (a) { this.Fields[n] = a }, enumerable: a, configurable: a }); Object.defineProperty(e.prototype, o, { "get": function () { return this.Fields[o] }, "set": function (a) { this.Fields[o] = a }, enumerable: a, configurable: a }); Object.defineProperty(e.prototype, p, { "get": function () { return this.Fields[p] }, "set": function (a) { this.Fields[p] = a }, enumerable: a, configurable: a }); Object.defineProperty(e.prototype, d, { "get": function () { return this.Fields[d] }, "set": function (a) { this.Fields[d] = a }, enumerable: a, configurable: a }); Object.defineProperty(e.prototype, q, { "get": function () { return this.Fields[q] }, "set": function (a) { this.Fields[q] = a }, enumerable: a, configurable: a }); Object.defineProperty(e.prototype, r, { "get": function () { return this.Fields[r] }, "set": function (a) { this.Fields[r] = a }, enumerable: a, configurable: a }); Object.defineProperty(e.prototype, s, { "get": function () { return this.Fields[s] }, "set": function (a) { this.Fields[s] = a }, enumerable: a, configurable: a }); Object.defineProperty(e.prototype, t, { "get": function () { return this.Fields[t] }, "set": function (a) { this.Fields[t] = a }, enumerable: a, configurable: a }); Object.defineProperty(e.prototype, u, { "get": function () { return this.Fields[u] }, "set": function (a) { this.Fields[u] = a }, enumerable: a, configurable: a }); e.prototype.SerializeFields = function () { var a = this; a.SetSerializedField(b, a.CorrelationId); a.SetSerializedField(c, a.SessionId); a.SetSerializedField(f, a.AppId); a.SetSerializedField(g, a.AppInstanceId); a.SetSerializedField(h, a.AppURL); a.SetSerializedField(i, a.AssetId); a.SetSerializedField(j, a.Browser); a.SetSerializedField(k, a.UserId); a.SetSerializedField(l, a.Host); a.SetSerializedField(m, a.HostVersion); a.SetSerializedField(n, a.ClientId); a.SetSerializedField(o, a.AppSizeWidth); a.SetSerializedField(p, a.AppSizeHeight); a.SetSerializedField(d, a.Message); a.SetSerializedField(q, a.DocUrl); a.SetSerializedField(r, a.OfficeJSVersion); a.SetSerializedField(s, a.HostJSVersion); a.SetSerializedField(t, a.WacHostEnvironment); a.SetSerializedField(u, a.IsFromWacAutomation) }; return e }(f); g.AppActivatedUsageData = i; var j = function (h) { var f = "StartTime", d = "ScriptId"; __extends(g, h); function g() { h.call(this, "ScriptLoad") } Object.defineProperty(g.prototype, b, { "get": function () { return this.Fields[b] }, "set": function (a) { this.Fields[b] = a }, enumerable: a, configurable: a }); Object.defineProperty(g.prototype, c, { "get": function () { return this.Fields[c] }, "set": function (a) { this.Fields[c] = a }, enumerable: a, configurable: a }); Object.defineProperty(g.prototype, d, { "get": function () { return this.Fields[d] }, "set": function (a) { this.Fields[d] = a }, enumerable: a, configurable: a }); Object.defineProperty(g.prototype, f, { "get": function () { return this.Fields[f] }, "set": function (a) { this.Fields[f] = a }, enumerable: a, configurable: a }); Object.defineProperty(g.prototype, e, { "get": function () { return this.Fields[e] }, "set": function (a) { this.Fields[e] = a }, enumerable: a, configurable: a }); g.prototype.SerializeFields = function () { var a = this; a.SetSerializedField(b, a.CorrelationId); a.SetSerializedField(c, a.SessionId); a.SetSerializedField(d, a.ScriptId); a.SetSerializedField(f, a.StartTime); a.SetSerializedField(e, a.ResponseTime) }; return g }(f); g.ScriptLoadUsageData = j; var k = function (j) { var h = "CloseMethod", g = "OpenTime", f = "AppSizeFinalHeight", e = "AppSizeFinalWidth", d = "FocusTime"; __extends(i, j); function i() { j.call(this, "AppClosed") } Object.defineProperty(i.prototype, b, { "get": function () { return this.Fields[b] }, "set": function (a) { this.Fields[b] = a }, enumerable: a, configurable: a }); Object.defineProperty(i.prototype, c, { "get": function () { return this.Fields[c] }, "set": function (a) { this.Fields[c] = a }, enumerable: a, configurable: a }); Object.defineProperty(i.prototype, d, { "get": function () { return this.Fields[d] }, "set": function (a) { this.Fields[d] = a }, enumerable: a, configurable: a }); Object.defineProperty(i.prototype, e, { "get": function () { return this.Fields[e] }, "set": function (a) { this.Fields[e] = a }, enumerable: a, configurable: a }); Object.defineProperty(i.prototype, f, { "get": function () { return this.Fields[f] }, "set": function (a) { this.Fields[f] = a }, enumerable: a, configurable: a }); Object.defineProperty(i.prototype, g, { "get": function () { return this.Fields[g] }, "set": function (a) { this.Fields[g] = a }, enumerable: a, configurable: a }); Object.defineProperty(i.prototype, h, { "get": function () { return this.Fields[h] }, "set": function (a) { this.Fields[h] = a }, enumerable: a, configurable: a }); i.prototype.SerializeFields = function () { var a = this; a.SetSerializedField(b, a.CorrelationId); a.SetSerializedField(c, a.SessionId); a.SetSerializedField(d, a.FocusTime); a.SetSerializedField(e, a.AppSizeFinalWidth); a.SetSerializedField(f, a.AppSizeFinalHeight); a.SetSerializedField(g, a.OpenTime); a.SetSerializedField(h, a.CloseMethod) }; return i }(f); g.AppClosedUsageData = k; var l = function (j) { var h = "ErrorType", g = "Parameters", f = "APIID", d = "APIType"; __extends(i, j); function i() { j.call(this, "APIUsage") } Object.defineProperty(i.prototype, b, { "get": function () { return this.Fields[b] }, "set": function (a) { this.Fields[b] = a }, enumerable: a, configurable: a }); Object.defineProperty(i.prototype, c, { "get": function () { return this.Fields[c] }, "set": function (a) { this.Fields[c] = a }, enumerable: a, configurable: a }); Object.defineProperty(i.prototype, d, { "get": function () { return this.Fields[d] }, "set": function (a) { this.Fields[d] = a }, enumerable: a, configurable: a }); Object.defineProperty(i.prototype, f, { "get": function () { return this.Fields[f] }, "set": function (a) { this.Fields[f] = a }, enumerable: a, configurable: a }); Object.defineProperty(i.prototype, g, { "get": function () { return this.Fields[g] }, "set": function (a) { this.Fields[g] = a }, enumerable: a, configurable: a }); Object.defineProperty(i.prototype, e, { "get": function () { return this.Fields[e] }, "set": function (a) { this.Fields[e] = a }, enumerable: a, configurable: a }); Object.defineProperty(i.prototype, h, { "get": function () { return this.Fields[h] }, "set": function (a) { this.Fields[h] = a }, enumerable: a, configurable: a }); i.prototype.SerializeFields = function () { var a = this; a.SetSerializedField(b, a.CorrelationId); a.SetSerializedField(c, a.SessionId); a.SetSerializedField(d, a.APIType); a.SetSerializedField(f, a.APIID); a.SetSerializedField(g, a.Parameters); a.SetSerializedField(e, a.ResponseTime); a.SetSerializedField(h, a.ErrorType) }; return i }(f); g.APIUsageUsageData = l; var h = function (g) { var e = "SuccessCode"; __extends(f, g); function f() { g.call(this, "AppInitialization") } Object.defineProperty(f.prototype, b, { "get": function () { return this.Fields[b] }, "set": function (a) { this.Fields[b] = a }, enumerable: a, configurable: a }); Object.defineProperty(f.prototype, c, { "get": function () { return this.Fields[c] }, "set": function (a) { this.Fields[c] = a }, enumerable: a, configurable: a }); Object.defineProperty(f.prototype, e, { "get": function () { return this.Fields[e] }, "set": function (a) { this.Fields[e] = a }, enumerable: a, configurable: a }); Object.defineProperty(f.prototype, d, { "get": function () { return this.Fields[d] }, "set": function (a) { this.Fields[d] = a }, enumerable: a, configurable: a }); f.prototype.SerializeFields = function () { var a = this; a.SetSerializedField(b, a.CorrelationId); a.SetSerializedField(c, a.SessionId); a.SetSerializedField(e, a.SuccessCode); a.SetSerializedField(d, a.Message) }; return f }(f); g.AppInitializationUsageData = h })(OSFLog || (OSFLog = {})); var Logger; (function (a) { "use strict"; (function (a) { a[a["info"] = 0] = "info"; a[a["warning"] = 1] = "warning"; a[a["error"] = 2] = "error" })(a.TraceLevel || (a.TraceLevel = {})); var f = a.TraceLevel; (function (a) { a[a["none"] = 0] = "none"; a[a["flush"] = 1] = "flush" })(a.SendFlag || (a.SendFlag = {})); var g = a.SendFlag; function b() { OSF.Logger && OSF.Logger.ulsEndpoint && OSF.Logger.ulsEndpoint.loadProxyFrame() } a.allowUploadingData = b; function e(a, c, d) { if (OSF.Logger && OSF.Logger.ulsEndpoint) { var b = { traceLevel: a, message: c, flag: d, internalLog: true }, e = JSON.stringify(b); OSF.Logger.ulsEndpoint.writeLog(e) } } a.sendLog = e; function c() { try { return new d } catch (a) { return null } } var d = function () { function a() { var a = this, b = a; a.proxyFrame = null; a.telemetryEndPoint = "https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html"; a.buffer = []; a.proxyFrameReady = false; OSF.OUtil.addEventListener(window, "message", function (a) { return b.tellProxyFrameReady(a) }); setTimeout(function () { b.loadProxyFrame() }, 3e3) } a.prototype.writeLog = function (c) { var b = this; if (b.proxyFrameReady === true) b.proxyFrame.contentWindow.postMessage(c, a.telemetryOrigin); else b.buffer.length < 128 && b.buffer.push(c) }; a.prototype.loadProxyFrame = function () { var a = this; if (a.proxyFrame == null) { a.proxyFrame = document.createElement("iframe"); a.proxyFrame.setAttribute("style", "display:none"); a.proxyFrame.setAttribute("src", a.telemetryEndPoint); document.head.appendChild(a.proxyFrame) } }; a.prototype.tellProxyFrameReady = function (d) { var b = this, g = b; if (d.data === "ProxyFrameReadyToLog") { b.proxyFrameReady = true; for (var c = 0; c < b.buffer.length; c++) b.writeLog(b.buffer[c]); b.buffer.length = 0; OSF.OUtil.removeEventListener(window, "message", function (a) { return g.tellProxyFrameReady(a) }) } else if (d.data === "ProxyFrameReadyToInit") { var e = { appName: "Office APPs", sessionId: OSF.OUtil.Guid.generateNewGuid() }, f = JSON.stringify(e); b.proxyFrame.contentWindow.postMessage(f, a.telemetryOrigin) } }; a.telemetryOrigin = "https://telemetryservice.firstpartyapps.oaspapps.com"; return a }(); if (!OSF.Logger) OSF.Logger = a; a.ulsEndpoint = c() })(Logger || (Logger = {})); var OSFAriaLogger; (function (a) { var b = function () { function a() { } a.prototype.getAriaCDNLocation = function () { return OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath() + "/ariatelemetry/aria-web-telemetry-2.8.0.min.js" }; a.getInstance = function () { if (a.AriaLoggerObj === undefined) a.AriaLoggerObj = new a; return a.AriaLoggerObj }; a.prototype.isIUsageData = function (a) { return a["Fields"] !== undefined }; a.prototype.loadAriaScriptAndLog = function (c, a) { var b = 1e3; OSF.OUtil.loadScript(this.getAriaCDNLocation(), function () { try { if (!this.ALogger) { var f = "db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439", e = new microsoft.applications.telemetry.LogConfiguration; e.enableAutoUserSession = true; microsoft.applications.telemetry.LogManager.initialize(f, e); this.ALogger = new microsoft.applications.telemetry.Logger } var b = new microsoft.applications.telemetry.EventProperties; b.name = "Office.Extensibility.OfficeJS." + c; for (var d in a) d.toLowerCase() !== "table" && b.setProperty(d, a[d]); var g = new Date; b.setProperty("Date", g.toISOString()); this.ALogger.logEvent(b) } catch (h) { } }, b) }; a.prototype.logData = function (a) { if (this.isIUsageData(a)) this.loadAriaScriptAndLog(a["Table"], a["Fields"]); else this.loadAriaScriptAndLog(a["Table"], a) }; return a }(); a.AriaLogger = b })(OSFAriaLogger || (OSFAriaLogger = {})); var OSFAppTelemetry; (function (d) { var b = null, c = ""; "use strict"; var a, f = OSF.OUtil.Guid.generateNewGuid(), i = c, o = new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"), y = function () { function a() { } return a }(), g = function () { function a(b, a) { this.name = b; this.handler = a } return a }(), k = function () { function a() { this.clientIDKey = "Office API client"; this.logIdSetKey = "Office App Log Id Set" } a.prototype.getClientId = function () { var b = this, a = b.getValue(b.clientIDKey); if (!a || a.length <= 0 || a.length > 40) { a = OSF.OUtil.Guid.generateNewGuid(); b.setValue(b.clientIDKey, a) } return a }; a.prototype.saveLog = function (d, e) { var b = this, a = b.getValue(b.logIdSetKey); a = (a && a.length > 0 ? a + ";" : c) + d; b.setValue(b.logIdSetKey, a); b.setValue(d, e) }; a.prototype.enumerateLog = function (c, e) { var a = this, d = a.getValue(a.logIdSetKey); if (d) { var f = d.split(";"); for (var h in f) { var b = f[h], g = a.getValue(b); if (g) { c && c(b, g); e && a.remove(b) } } e && a.remove(a.logIdSetKey) } }; a.prototype.getValue = function (d) { var a = OSF.OUtil.getLocalStorage(), b = c; if (a) b = a.getItem(d); return b }; a.prototype.setValue = function (c, b) { var a = OSF.OUtil.getLocalStorage(); a && a.setItem(c, b) }; a.prototype.remove = function (b) { var a = OSF.OUtil.getLocalStorage(); if (a) try { a.removeItem(b) } catch (c) { } }; return a }(), h = function () { function a() { } a.prototype.LogData = function (a) { if (!OSF.Logger) return; OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, a.SerializeRow(), OSF.Logger.SendFlag.none); OSFAriaLogger.AriaLogger.getInstance().logData(a) }; a.prototype.LogRawData = function (a) { if (!OSF.Logger) return; OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, a, OSF.Logger.SendFlag.none); try { OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(a)) } catch (b) { } }; return a }(); function e(a) { if (a) a = a.replace(/[{}]/g, c).toLowerCase(); return a || c } function w(f) { if (!OSF.Logger) return; if (a) return; a = new y; if (f.get_hostFullVersion()) a.hostVersion = f.get_hostFullVersion(); else a.hostVersion = f.get_appVersion(); a.appId = f.get_id(); a.host = f.get_appName(); a.browser = window.navigator.userAgent; a.correlationId = e(f.get_correlationId()); a.clientId = (new k).getClientId(); a.appInstanceId = f.get_appInstanceId(); if (a.appInstanceId) a.appInstanceId = a.appInstanceId.replace(/[{}]/g, c).toLowerCase(); a.message = f.get_hostCustomMessage(); a.officeJSVersion = OSF.ConstantNames.FileVersion; a.hostJSVersion = "16.0.7920.1000"; if (f._wacHostEnvironment) a.wacHostEnvironment = f._wacHostEnvironment; if (f._isFromWacAutomation !== undefined && f._isFromWacAutomation !== b) a.isFromWacAutomation = f._isFromWacAutomation.toString().toLowerCase(); var i = f.get_docUrl(); a.docUrl = o.test(i) ? i : c; var h = location.href; if (h) h = h.split("?")[0].split("#")[0]; a.appURL = h; (function (i, a) { var e, h, d; a.assetId = c; a.userId = c; try { e = decodeURIComponent(i); h = new DOMParser; d = h.parseFromString(e, "text/xml"); var f = d.getElementsByTagName("t")[0].attributes.getNamedItem("cid"), g = d.getElementsByTagName("t")[0].attributes.getNamedItem("oid"); if (f && f.nodeValue) a.userId = f.nodeValue; else if (g && g.nodeValue) a.userId = g.nodeValue; a.assetId = d.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue } catch (j) { } finally { e = b; d = b; h = b } })(f.get_eToken(), a); (function () { var k = new Date, c = b, h = 0, j = false, e = function () { if (document.hasFocus()) { if (c == b) c = new Date } else if (c) { h += Math.abs((new Date).getTime() - c.getTime()); c = b } }, a = []; a.push(new g("focus", e)); a.push(new g("blur", e)); a.push(new g("focusout", e)); a.push(new g("focusin", e)); var i = function () { for (var e = 0; e < a.length; e++) OSF.OUtil.removeEventListener(window, a[e].name, a[e].handler); a.length = 0; if (!j) { if (document.hasFocus() && c) { h += Math.abs((new Date).getTime() - c.getTime()); c = b } d.onAppClosed(Math.abs((new Date).getTime() - k.getTime()), h); j = true } }; a.push(new g("beforeunload", i)); a.push(new g("unload", i)); for (var f = 0; f < a.length; f++) OSF.OUtil.addEventListener(window, a[f].name, a[f].handler); e() })(); d.onAppActivated() } d.initialize = w; function p() { if (!a) return; (new k).enumerateLog(function (b, a) { return (new h).LogRawData(a) }, true); var c = new OSFLog.AppActivatedUsageData; c.SessionId = f; c.AppId = a.appId; c.AssetId = a.assetId; c.AppURL = a.appURL; c.UserId = a.userId; c.ClientId = a.clientId; c.Browser = a.browser; c.Host = a.host; c.HostVersion = a.hostVersion; c.CorrelationId = e(a.correlationId); c.AppSizeWidth = window.innerWidth; c.AppSizeHeight = window.innerHeight; c.AppInstanceId = a.appInstanceId; c.Message = a.message; c.DocUrl = a.docUrl; c.OfficeJSVersion = a.officeJSVersion; c.HostJSVersion = a.hostJSVersion; if (a.wacHostEnvironment) c.WacHostEnvironment = a.wacHostEnvironment; if (a.isFromWacAutomation !== undefined && a.isFromWacAutomation !== b) c.IsFromWacAutomation = a.isFromWacAutomation; (new h).LogData(c); setTimeout(function () { if (!OSF.Logger) return; OSF.Logger.allowUploadingData() }, 100) } d.onAppActivated = p; function t(g, d, c, b) { var a = new OSFLog.ScriptLoadUsageData; a.CorrelationId = e(b); a.SessionId = f; a.ScriptId = g; a.StartTime = d; a.ResponseTime = c; (new h).LogData(a) } d.onScriptDone = t; function x(j, k, d, c, g) { if (!a) return; var b = new OSFLog.APIUsageUsageData; b.CorrelationId = e(i); b.SessionId = f; b.APIType = j; b.APIID = k; b.Parameters = d; b.ResponseTime = c; b.ErrorType = g; (new h).LogData(b) } d.onCallDone = x; function s(h, d, f, g) { var a = b; if (d) if (typeof d == "number") a = String(d); else if (typeof d === "object") for (var e in d) { if (a !== b) a += ","; else a = c; if (typeof d[e] == "number") a += String(d[e]) } else a = c; OSF.AppTelemetry.onCallDone("method", h, a, f, g) } d.onMethodDone = s; function q(b, a) { OSF.AppTelemetry.onCallDone("property", -1, b, a) } d.onPropertyDone = q; function v(c, a) { OSF.AppTelemetry.onCallDone("event", c, b, 0, a) } d.onEventDone = v; function r(d, e, a, c) { OSF.AppTelemetry.onCallDone(d ? "registerevent" : "unregisterevent", e, b, a, c) } d.onRegisterDone = r; function u(d, c) { if (!a) return; var b = new OSFLog.AppClosedUsageData; b.CorrelationId = e(i); b.SessionId = f; b.FocusTime = c; b.OpenTime = d; b.AppSizeFinalWidth = window.innerWidth; b.AppSizeFinalHeight = window.innerHeight; (new k).saveLog(f, b.SerializeRow()) } d.onAppClosed = u; function l(a) { i = e(a) } d.setOsfControlAppCorrelationId = l; function j(b, c) { var a = new OSFLog.AppInitializationUsageData; a.CorrelationId = e(i); a.SessionId = f; a.SuccessCode = b ? 1 : 0; a.Message = c; (new h).LogData(a) } d.doAppInitializationLogging = j; function m(a) { j(false, a) } d.logAppCommonMessage = m; function n(a) { j(true, a) } d.logAppException = n; OSF.AppTelemetry = d })(OSFAppTelemetry || (OSFAppTelemetry = {})); Microsoft.Office.WebExtension.TableData = function (b, a) { function c(a) { if (a == null || a == undefined) return null; try { for (var b = OSF.DDA.DataCoercion.findArrayDimensionality(a, 2) ; b < 2; b++) a = [a]; return a } catch (c) { } } OSF.OUtil.defineEnumerableProperties(this, { headers: { "get": function () { return a }, "set": function (b) { a = c(b) } }, rows: { "get": function () { return b }, "set": function (a) { b = a == null || OSF.OUtil.isArray(a) && a.length == 0 ? [] : c(a) } } }); this.headers = a; this.rows = b }; OSF.DDA.OMFactory = OSF.DDA.OMFactory || {}; OSF.DDA.OMFactory.manufactureTableData = function (a) { return new Microsoft.Office.WebExtension.TableData(a[OSF.DDA.TableDataProperties.TableRows], a[OSF.DDA.TableDataProperties.TableHeaders]) }; Microsoft.Office.WebExtension.CoercionType = { Text: "text", Matrix: "matrix", Table: "table" }; OSF.DDA.DataCoercion = function () { var a = null; return { findArrayDimensionality: function (c) { if (OSF.OUtil.isArray(c)) { for (var b = 0, a = 0; a < c.length; a++) b = Math.max(b, OSF.DDA.DataCoercion.findArrayDimensionality(c[a])); return b + 1 } else return 0 }, getCoercionDefaultForBinding: function (a) { switch (a) { case Microsoft.Office.WebExtension.BindingType.Matrix: return Microsoft.Office.WebExtension.CoercionType.Matrix; case Microsoft.Office.WebExtension.BindingType.Table: return Microsoft.Office.WebExtension.CoercionType.Table; case Microsoft.Office.WebExtension.BindingType.Text: default: return Microsoft.Office.WebExtension.CoercionType.Text } }, getBindingDefaultForCoercion: function (a) { switch (a) { case Microsoft.Office.WebExtension.CoercionType.Matrix: return Microsoft.Office.WebExtension.BindingType.Matrix; case Microsoft.Office.WebExtension.CoercionType.Table: return Microsoft.Office.WebExtension.BindingType.Table; case Microsoft.Office.WebExtension.CoercionType.Text: case Microsoft.Office.WebExtension.CoercionType.Html: case Microsoft.Office.WebExtension.CoercionType.Ooxml: default: return Microsoft.Office.WebExtension.BindingType.Text } }, determineCoercionType: function (b) { if (b == a || b == undefined) return a; var c = a, d = typeof b; if (b.rows !== undefined) c = Microsoft.Office.WebExtension.CoercionType.Table; else if (OSF.OUtil.isArray(b)) c = Microsoft.Office.WebExtension.CoercionType.Matrix; else if (d == "string" || d == "number" || d == "boolean" || OSF.OUtil.isDate(b)) c = Microsoft.Office.WebExtension.CoercionType.Text; else throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject; return c }, coerceData: function (b, c, a) { a = a || OSF.DDA.DataCoercion.determineCoercionType(b); if (a && a != c) { OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionBegin); b = OSF.DDA.DataCoercion._coerceDataFromTable(c, OSF.DDA.DataCoercion._coerceDataToTable(b, a)); OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionEnd) } return b }, _matrixToText: function (a) { if (a.length == 1 && a[0].length == 1) return "" + a[0][0]; for (var b = "", c = 0; c < a.length; c++) b += a[c].join("\t") + "\n"; return b.substring(0, b.length - 1) }, _textToMatrix: function (c) { for (var a = c.split("\n"), b = 0; b < a.length; b++) a[b] = a[b].split("\t"); return a }, _tableToText: function (c) { var b = ""; if (c.headers != a) b = OSF.DDA.DataCoercion._matrixToText([c.headers]) + "\n"; var d = OSF.DDA.DataCoercion._matrixToText(c.rows); if (d == "") b = b.substring(0, b.length - 1); return b + d }, _tableToMatrix: function (b) { var c = b.rows; b.headers != a && c.unshift(b.headers); return c }, _coerceDataFromTable: function (d, c) { var b; switch (d) { case Microsoft.Office.WebExtension.CoercionType.Table: b = c; break; case Microsoft.Office.WebExtension.CoercionType.Matrix: b = OSF.DDA.DataCoercion._tableToMatrix(c); break; case Microsoft.Office.WebExtension.CoercionType.SlideRange: b = a; if (OSF.DDA.OMFactory.manufactureSlideRange) b = OSF.DDA.OMFactory.manufactureSlideRange(OSF.DDA.DataCoercion._tableToText(c)); if (b == a) b = OSF.DDA.DataCoercion._tableToText(c); break; case Microsoft.Office.WebExtension.CoercionType.Text: case Microsoft.Office.WebExtension.CoercionType.Html: case Microsoft.Office.WebExtension.CoercionType.Ooxml: default: b = OSF.DDA.DataCoercion._tableToText(c) } return b }, _coerceDataToTable: function (b, c) { if (c == undefined) c = OSF.DDA.DataCoercion.determineCoercionType(b); var a; switch (c) { case Microsoft.Office.WebExtension.CoercionType.Table: a = b; break; case Microsoft.Office.WebExtension.CoercionType.Matrix: a = new Microsoft.Office.WebExtension.TableData(b); break; case Microsoft.Office.WebExtension.CoercionType.Text: case Microsoft.Office.WebExtension.CoercionType.Html: case Microsoft.Office.WebExtension.CoercionType.Ooxml: default: a = new Microsoft.Office.WebExtension.TableData(OSF.DDA.DataCoercion._textToMatrix(b)) } return a } } }(); OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType, { SlideRange: "slideRange" }); OSF.DDA.SlideProperties = { Id: 0, Title: 1, Index: 2 }; OSF.DDA.Slide = function (c, b, a) { OSF.OUtil.defineEnumerableProperties(this, { id: { value: c }, title: { value: b }, index: { value: a } }) }; OSF.DDA.SlideRange = function (a) { OSF.OUtil.defineEnumerableProperties(this, { slides: { value: a } }) }; OSF.DDA.OMFactory = OSF.DDA.OMFactory || {}; OSF.DDA.OMFactory.manufactureSlideRange = function (h) { var c = null, a = c; if (JSON) a = JSON.parse(h); else a = Sys.Serialization.JavaScriptSerializer.deserialize(h); if (a == c) return c; var e = 0; for (var k in OSF.DDA.SlideProperties) if (OSF.DDA.SlideProperties.hasOwnProperty(k)) e++; for (var f = [], d = true, b = 0; b < a.length && d; b++) { d = false; if (a[b].length == e) { var i = parseInt(a[b][OSF.DDA.SlideProperties.Id]), j = a[b][OSF.DDA.SlideProperties.Title], g = parseInt(a[b][OSF.DDA.SlideProperties.Index]); if (!isNaN(i) && !isNaN(g)) { d = true; f.push(new OSF.DDA.Slide(i, j, g)) } } } if (!d) return c; return new OSF.DDA.SlideRange(f) }; Microsoft.Office.WebExtension.BindingType = { Table: "table", Text: "text", Matrix: "matrix" }; OSF.DDA.BindingProperties = { Id: "BindingId", Type: Microsoft.Office.WebExtension.Parameters.BindingType }; OSF.OUtil.augmentList(OSF.DDA.ListDescriptors, { BindingList: "BindingList" }); OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { Subset: "subset", BindingProperties: "BindingProperties" }); OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList, OSF.DDA.PropertyDescriptors.BindingProperties); OSF.DDA.BindingPromise = function (b, a) { this._id = b; OSF.OUtil.defineEnumerableProperty(this, "onFail", { "get": function () { return a }, "set": function (c) { var b = typeof c; if (b != "undefined" && b != "function") throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction, b); a = c } }) }; OSF.DDA.BindingPromise.prototype = { _fetch: function (b) { var a = this; if (a.binding) b && b(a.binding); else if (!a._binding) { var c = a; Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(a._id, function (a) { if (a.status == Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded) { OSF.OUtil.defineEnumerableProperty(c, "binding", { value: a.value }); b && b(c.binding) } else c.onFail && c.onFail(a) }) } return a }, getDataAsync: function () { var a = arguments; this._fetch(function (b) { b.getDataAsync.apply(b, a) }); return this }, setDataAsync: function () { var a = arguments; this._fetch(function (b) { b.setDataAsync.apply(b, a) }); return this }, addHandlerAsync: function () { var a = arguments; this._fetch(function (b) { b.addHandlerAsync.apply(b, a) }); return this }, removeHandlerAsync: function () { var a = arguments; this._fetch(function (b) { b.removeHandlerAsync.apply(b, a) }); return this } }; OSF.DDA.BindingFacade = function (b) { this._eventDispatches = []; OSF.OUtil.defineEnumerableProperty(this, "document", { value: b }); var a = OSF.DDA.AsyncMethodNames; OSF.DDA.DispIdHost.addAsyncMethods(this, [a.AddFromSelectionAsync, a.AddFromNamedItemAsync, a.GetAllAsync, a.GetByIdAsync, a.ReleaseByIdAsync]) }; OSF.DDA.UnknownBinding = function (b, a) { OSF.OUtil.defineEnumerableProperties(this, { document: { value: a }, id: { value: b } }) }; OSF.DDA.Binding = function (a, c) { OSF.OUtil.defineEnumerableProperties(this, { document: { value: c }, id: { value: a } }); var d = OSF.DDA.AsyncMethodNames; OSF.DDA.DispIdHost.addAsyncMethods(this, [d.GetDataAsync, d.SetDataAsync]); var e = Microsoft.Office.WebExtension.EventType, b = c.bindings._eventDispatches; if (!b[a]) b[a] = new OSF.EventDispatch([e.BindingSelectionChanged, e.BindingDataChanged]); var f = b[a]; OSF.DDA.DispIdHost.addEventSupport(this, f) }; OSF.DDA.generateBindingId = function () { return "UnnamedBinding_" + OSF.OUtil.getUniqueId() + "_" + (new Date).getTime() }; OSF.DDA.OMFactory = OSF.DDA.OMFactory || {}; OSF.DDA.OMFactory.manufactureBinding = function (a, c) { var d = a[OSF.DDA.BindingProperties.Id], g = a[OSF.DDA.BindingProperties.RowCount], f = a[OSF.DDA.BindingProperties.ColumnCount], h = a[OSF.DDA.BindingProperties.HasHeaders], b; switch (a[OSF.DDA.BindingProperties.Type]) { case Microsoft.Office.WebExtension.BindingType.Text: b = new OSF.DDA.TextBinding(d, c); break; case Microsoft.Office.WebExtension.BindingType.Matrix: b = new OSF.DDA.MatrixBinding(d, c, g, f); break; case Microsoft.Office.WebExtension.BindingType.Table: var i = function () { return OSF.DDA.ExcelDocument && Microsoft.Office.WebExtension.context.document && Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument }, e; if (i() && OSF.DDA.ExcelTableBinding) e = OSF.DDA.ExcelTableBinding; else e = OSF.DDA.TableBinding; b = new e(d, c, g, f, h); break; default: b = new OSF.DDA.UnknownBinding(d, c) } return b }; OSF.DDA.AsyncMethodNames.addNames({ AddFromSelectionAsync: "addFromSelectionAsync", AddFromNamedItemAsync: "addFromNamedItemAsync", GetAllAsync: "getAllAsync", GetByIdAsync: "getByIdAsync", ReleaseByIdAsync: "releaseByIdAsync", GetDataAsync: "getDataAsync", SetDataAsync: "setDataAsync" }); (function () { var d = "number", c = "object", b = "string", a = null; function e(a) { return OSF.DDA.OMFactory.manufactureBinding(a, Microsoft.Office.WebExtension.context.document) } function f(a) { return a.id } function g(c, e, d) { var b = c[Microsoft.Office.WebExtension.Parameters.Data]; if (OSF.DDA.TableDataProperties && b && (b[OSF.DDA.TableDataProperties.TableRows] != undefined || b[OSF.DDA.TableDataProperties.TableHeaders] != undefined)) b = OSF.DDA.OMFactory.manufactureTableData(b); b = OSF.DDA.DataCoercion.coerceData(b, d[Microsoft.Office.WebExtension.Parameters.CoercionType]); return b == undefined ? a : b } OSF.DDA.AsyncMethodCalls.define({ method: OSF.DDA.AsyncMethodNames.AddFromSelectionAsync, requiredArguments: [{ name: Microsoft.Office.WebExtension.Parameters.BindingType, "enum": Microsoft.Office.WebExtension.BindingType }], supportedOptions: [{ name: Microsoft.Office.WebExtension.Parameters.Id, value: { types: [b], calculate: OSF.DDA.generateBindingId } }, { name: Microsoft.Office.WebExtension.Parameters.Columns, value: { types: [c], defaultValue: a } }], privateStateCallbacks: [], onSucceeded: e }); OSF.DDA.AsyncMethodCalls.define({ method: OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync, requiredArguments: [{ name: Microsoft.Office.WebExtension.Parameters.ItemName, types: [b] }, { name: Microsoft.Office.WebExtension.Parameters.BindingType, "enum": Microsoft.Office.WebExtension.BindingType }], supportedOptions: [{ name: Microsoft.Office.WebExtension.Parameters.Id, value: { types: [b], calculate: OSF.DDA.generateBindingId } }, { name: Microsoft.Office.WebExtension.Parameters.Columns, value: { types: [c], defaultValue: a } }], privateStateCallbacks: [{ name: Microsoft.Office.WebExtension.Parameters.FailOnCollision, value: function () { return true } }], onSucceeded: e }); OSF.DDA.AsyncMethodCalls.define({ method: OSF.DDA.AsyncMethodNames.GetAllAsync, requiredArguments: [], supportedOptions: [], privateStateCallbacks: [], onSucceeded: function (a) { return OSF.OUtil.mapList(a[OSF.DDA.ListDescriptors.BindingList], e) } }); OSF.DDA.AsyncMethodCalls.define({ method: OSF.DDA.AsyncMethodNames.GetByIdAsync, requiredArguments: [{ name: Microsoft.Office.WebExtension.Parameters.Id, types: [b] }], supportedOptions: [], privateStateCallbacks: [], onSucceeded: e }); OSF.DDA.AsyncMethodCalls.define({ method: OSF.DDA.AsyncMethodNames.ReleaseByIdAsync, requiredArguments: [{ name: Microsoft.Office.WebExtension.Parameters.Id, types: [b] }], supportedOptions: [], privateStateCallbacks: [], onSucceeded: function (d, b, a) { var c = a[Microsoft.Office.WebExtension.Parameters.Id]; delete b._eventDispatches[c] } }); OSF.DDA.AsyncMethodCalls.define({ method: OSF.DDA.AsyncMethodNames.GetDataAsync, requiredArguments: [], supportedOptions: [{ name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: { "enum": Microsoft.Office.WebExtension.CoercionType, calculate: function (b, a) { return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(a.type) } } }, { name: Microsoft.Office.WebExtension.Parameters.ValueFormat, value: { "enum": Microsoft.Office.WebExtension.ValueFormat, defaultValue: Microsoft.Office.WebExtension.ValueFormat.Unformatted } }, { name: Microsoft.Office.WebExtension.Parameters.FilterType, value: { "enum": Microsoft.Office.WebExtension.FilterType, defaultValue: Microsoft.Office.WebExtension.FilterType.All } }, { name: Microsoft.Office.WebExtension.Parameters.Rows, value: { types: [c, b], defaultValue: a } }, { name: Microsoft.Office.WebExtension.Parameters.Columns, value: { types: [c], defaultValue: a } }, { name: Microsoft.Office.WebExtension.Parameters.StartRow, value: { types: [d], defaultValue: 0 } }, { name: Microsoft.Office.WebExtension.Parameters.StartColumn, value: { types: [d], defaultValue: 0 } }, { name: Microsoft.Office.WebExtension.Parameters.RowCount, value: { types: [d], defaultValue: 0 } }, { name: Microsoft.Office.WebExtension.Parameters.ColumnCount, value: { types: [d], defaultValue: 0 } }], checkCallArgs: function (a, b) { if (a[Microsoft.Office.WebExtension.Parameters.StartRow] == 0 && a[Microsoft.Office.WebExtension.Parameters.StartColumn] == 0 && a[Microsoft.Office.WebExtension.Parameters.RowCount] == 0 && a[Microsoft.Office.WebExtension.Parameters.ColumnCount] == 0) { delete a[Microsoft.Office.WebExtension.Parameters.StartRow]; delete a[Microsoft.Office.WebExtension.Parameters.StartColumn]; delete a[Microsoft.Office.WebExtension.Parameters.RowCount]; delete a[Microsoft.Office.WebExtension.Parameters.ColumnCount] } if (a[Microsoft.Office.WebExtension.Parameters.CoercionType] != OSF.DDA.DataCoercion.getCoercionDefaultForBinding(b.type) && (a[Microsoft.Office.WebExtension.Parameters.StartRow] || a[Microsoft.Office.WebExtension.Parameters.StartColumn] || a[Microsoft.Office.WebExtension.Parameters.RowCount] || a[Microsoft.Office.WebExtension.Parameters.ColumnCount])) throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding; return a }, privateStateCallbacks: [{ name: Microsoft.Office.WebExtension.Parameters.Id, value: f }], onSucceeded: g }); OSF.DDA.AsyncMethodCalls.define({ method: OSF.DDA.AsyncMethodNames.SetDataAsync, requiredArguments: [{ name: Microsoft.Office.WebExtension.Parameters.Data, types: [b, c, d, "boolean"] }], supportedOptions: [{ name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: { "enum": Microsoft.Office.WebExtension.CoercionType, calculate: function (a) { return OSF.DDA.DataCoercion.determineCoercionType(a[Microsoft.Office.WebExtension.Parameters.Data]) } } }, { name: Microsoft.Office.WebExtension.Parameters.Rows, value: { types: [c, b], defaultValue: a } }, { name: Microsoft.Office.WebExtension.Parameters.Columns, value: { types: [c], defaultValue: a } }, { name: Microsoft.Office.WebExtension.Parameters.StartRow, value: { types: [d], defaultValue: 0 } }, { name: Microsoft.Office.WebExtension.Parameters.StartColumn, value: { types: [d], defaultValue: 0 } }], checkCallArgs: function (a, b) { if (a[Microsoft.Office.WebExtension.Parameters.StartRow] == 0 && a[Microsoft.Office.WebExtension.Parameters.StartColumn] == 0) { delete a[Microsoft.Office.WebExtension.Parameters.StartRow]; delete a[Microsoft.Office.WebExtension.Parameters.StartColumn] } if (a[Microsoft.Office.WebExtension.Parameters.CoercionType] != OSF.DDA.DataCoercion.getCoercionDefaultForBinding(b.type) && (a[Microsoft.Office.WebExtension.Parameters.StartRow] || a[Microsoft.Office.WebExtension.Parameters.StartColumn])) throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding; return a }, privateStateCallbacks: [{ name: Microsoft.Office.WebExtension.Parameters.Id, value: f }] }) })(); OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { TableDataProperties: "TableDataProperties" }); OSF.OUtil.augmentList(OSF.DDA.BindingProperties, { RowCount: "BindingRowCount", ColumnCount: "BindingColumnCount", HasHeaders: "HasHeaders" }); OSF.DDA.TableDataProperties = { TableRows: "TableRows", TableHeaders: "TableHeaders" }; OSF.DDA.TableBinding = function (f, e, d, c, b) { OSF.DDA.TableBinding.uber.constructor.call(this, f, e); OSF.OUtil.defineEnumerableProperties(this, { type: { value: Microsoft.Office.WebExtension.BindingType.Table }, rowCount: { value: d ? d : 0 }, columnCount: { value: c ? c : 0 }, hasHeaders: { value: b ? b : false } }); var a = OSF.DDA.AsyncMethodNames; OSF.DDA.DispIdHost.addAsyncMethods(this, [a.AddRowsAsync, a.AddColumnsAsync, a.DeleteAllDataValuesAsync]) }; OSF.OUtil.extend(OSF.DDA.TableBinding, OSF.DDA.Binding); OSF.DDA.AsyncMethodNames.addNames({ AddRowsAsync: "addRowsAsync", AddColumnsAsync: "addColumnsAsync", DeleteAllDataValuesAsync: "deleteAllDataValuesAsync" }); (function () { function a(a) { return a.id } OSF.DDA.AsyncMethodCalls.define({ method: OSF.DDA.AsyncMethodNames.AddRowsAsync, requiredArguments: [{ name: Microsoft.Office.WebExtension.Parameters.Data, types: ["object"] }], supportedOptions: [], privateStateCallbacks: [{ name: Microsoft.Office.WebExtension.Parameters.Id, value: a }] }); OSF.DDA.AsyncMethodCalls.define({ method: OSF.DDA.AsyncMethodNames.AddColumnsAsync, requiredArguments: [{ name: Microsoft.Office.WebExtension.Parameters.Data, types: ["object"] }], supportedOptions: [], privateStateCallbacks: [{ name: Microsoft.Office.WebExtension.Parameters.Id, value: a }] }); OSF.DDA.AsyncMethodCalls.define({ method: OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync, requiredArguments: [], supportedOptions: [], privateStateCallbacks: [{ name: Microsoft.Office.WebExtension.Parameters.Id, value: a }] }) })(); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.WAC.UniqueArguments.GetData, toHost: [{ name: Microsoft.Office.WebExtension.Parameters.Id, value: "BindingId" }, { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: "CoerceType" }, { name: Microsoft.Office.WebExtension.Parameters.ValueFormat, value: "ValueFormat" }, { name: Microsoft.Office.WebExtension.Parameters.FilterType, value: "FilterType" }, { name: Microsoft.Office.WebExtension.Parameters.Rows, value: "Rows" }, { name: Microsoft.Office.WebExtension.Parameters.Columns, value: "Columns" }, { name: Microsoft.Office.WebExtension.Parameters.StartRow, value: "StartRow" }, { name: Microsoft.Office.WebExtension.Parameters.StartColumn, value: "StartCol" }, { name: Microsoft.Office.WebExtension.Parameters.RowCount, value: "RowCount" }, { name: Microsoft.Office.WebExtension.Parameters.ColumnCount, value: "ColCount" }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.WAC.UniqueArguments.SetData, toHost: [{ name: Microsoft.Office.WebExtension.Parameters.Id, value: "BindingId" }, { name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: "CoerceType" }, { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.WAC.UniqueArguments.Data }, { name: Microsoft.Office.WebExtension.Parameters.Rows, value: "Rows" }, { name: Microsoft.Office.WebExtension.Parameters.Columns, value: "Columns" }, { name: Microsoft.Office.WebExtension.Parameters.StartRow, value: "StartRow" }, { name: Microsoft.Office.WebExtension.Parameters.StartColumn, value: "StartCol" }, { name: Microsoft.Office.WebExtension.Parameters.ImageLeft, value: "ImageLeft" }, { name: Microsoft.Office.WebExtension.Parameters.ImageTop, value: "ImageTop" }, { name: Microsoft.Office.WebExtension.Parameters.ImageWidth, value: "ImageWidth" }, { name: Microsoft.Office.WebExtension.Parameters.ImageHeight, value: "ImageHeight" }] }); OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.BindingProperties); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.WAC.UniqueArguments.BindingRequest, toHost: [{ name: Microsoft.Office.WebExtension.Parameters.ItemName, value: "ItemName" }, { name: Microsoft.Office.WebExtension.Parameters.Id, value: "BindingId" }, { name: Microsoft.Office.WebExtension.Parameters.BindingType, value: "BindingType" }, { name: Microsoft.Office.WebExtension.Parameters.PromptText, value: "PromptText" }, { name: Microsoft.Office.WebExtension.Parameters.Columns, value: "Columns" }, { name: Microsoft.Office.WebExtension.Parameters.SampleData, value: "SampleData" }, { name: Microsoft.Office.WebExtension.Parameters.FailOnCollision, value: "FailOnCollision" }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: Microsoft.Office.WebExtension.Parameters.BindingType, toHost: [{ name: Microsoft.Office.WebExtension.BindingType.Text, value: 2 }, { name: Microsoft.Office.WebExtension.BindingType.Matrix, value: 3 }, { name: Microsoft.Office.WebExtension.BindingType.Table, value: 1 }], invertible: true }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.PropertyDescriptors.BindingProperties, fromHost: [{ name: OSF.DDA.BindingProperties.Id, value: "Name" }, { name: OSF.DDA.BindingProperties.Type, value: "BindingType" }, { name: OSF.DDA.BindingProperties.RowCount, value: "RowCount" }, { name: OSF.DDA.BindingProperties.ColumnCount, value: "ColCount" }, { name: OSF.DDA.BindingProperties.HasHeaders, value: "HasHeaders" }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.WAC.UniqueArguments.SingleBindingResponse, fromHost: [{ name: OSF.DDA.PropertyDescriptors.BindingProperties, value: 0 }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod, fromHost: [{ name: OSF.DDA.WAC.UniqueArguments.SingleBindingResponse, value: OSF.DDA.WAC.UniqueArguments.BindingResponse }], toHost: [{ name: OSF.DDA.WAC.UniqueArguments.BindingRequest, value: OSF.DDA.WAC.Delegate.ParameterMap.self }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod, fromHost: [{ name: OSF.DDA.WAC.UniqueArguments.SingleBindingResponse, value: OSF.DDA.WAC.UniqueArguments.BindingResponse }], toHost: [{ name: OSF.DDA.WAC.UniqueArguments.BindingRequest, value: OSF.DDA.WAC.Delegate.ParameterMap.self }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.MethodDispId.dispidReleaseBindingMethod, toHost: [{ name: OSF.DDA.WAC.UniqueArguments.BindingRequest, value: OSF.DDA.WAC.Delegate.ParameterMap.self }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.MethodDispId.dispidGetBindingMethod, fromHost: [{ name: OSF.DDA.WAC.UniqueArguments.SingleBindingResponse, value: OSF.DDA.WAC.UniqueArguments.BindingResponse }], toHost: [{ name: OSF.DDA.WAC.UniqueArguments.BindingRequest, value: OSF.DDA.WAC.Delegate.ParameterMap.self }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.MethodDispId.dispidGetAllBindingsMethod, fromHost: [{ name: OSF.DDA.ListDescriptors.BindingList, value: OSF.DDA.WAC.UniqueArguments.BindingResponse }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.MethodDispId.dispidGetBindingDataMethod, fromHost: [{ name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.WAC.UniqueArguments.Data }], toHost: [{ name: OSF.DDA.WAC.UniqueArguments.GetData, value: OSF.DDA.WAC.Delegate.ParameterMap.self }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.MethodDispId.dispidSetBindingDataMethod, toHost: [{ name: OSF.DDA.WAC.UniqueArguments.SetData, value: OSF.DDA.WAC.Delegate.ParameterMap.self }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.MethodDispId.dispidAddRowsMethod, toHost: [{ name: OSF.DDA.WAC.UniqueArguments.AddRowsColumns, value: OSF.DDA.WAC.Delegate.ParameterMap.self }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.MethodDispId.dispidAddColumnsMethod, toHost: [{ name: OSF.DDA.WAC.UniqueArguments.AddRowsColumns, value: OSF.DDA.WAC.Delegate.ParameterMap.self }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.MethodDispId.dispidClearAllRowsMethod, toHost: [{ name: OSF.DDA.WAC.UniqueArguments.BindingRequest, value: OSF.DDA.WAC.Delegate.ParameterMap.self }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.WAC.UniqueArguments.AddRowsColumns, toHost: [{ name: Microsoft.Office.WebExtension.Parameters.Id, value: "BindingId" }, { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.WAC.UniqueArguments.Data }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.PropertyDescriptors.Subset, fromHost: [{ name: Microsoft.Office.WebExtension.Parameters.StartRow, value: "StartRow" }, { name: Microsoft.Office.WebExtension.Parameters.StartColumn, value: "StartCol" }, { name: Microsoft.Office.WebExtension.Parameters.RowCount, value: "RowCount" }, { name: Microsoft.Office.WebExtension.Parameters.ColumnCount, value: "ColCount" }] }); OSF.DDA.AsyncMethodNames.addNames({ GetSelectedDataAsync: "getSelectedDataAsync", SetSelectedDataAsync: "setSelectedDataAsync" }); (function () { var c = false, b = "boolean", a = "number"; function d(b, d, c) { var a = b[Microsoft.Office.WebExtension.Parameters.Data]; if (OSF.DDA.TableDataProperties && a && (a[OSF.DDA.TableDataProperties.TableRows] != undefined || a[OSF.DDA.TableDataProperties.TableHeaders] != undefined)) a = OSF.DDA.OMFactory.manufactureTableData(a); a = OSF.DDA.DataCoercion.coerceData(a, c[Microsoft.Office.WebExtension.Parameters.CoercionType]); return a == undefined ? null : a } OSF.DDA.AsyncMethodCalls.define({ method: OSF.DDA.AsyncMethodNames.GetSelectedDataAsync, requiredArguments: [{ name: Microsoft.Office.WebExtension.Parameters.CoercionType, "enum": Microsoft.Office.WebExtension.CoercionType }], supportedOptions: [{ name: Microsoft.Office.WebExtension.Parameters.ValueFormat, value: { "enum": Microsoft.Office.WebExtension.ValueFormat, defaultValue: Microsoft.Office.WebExtension.ValueFormat.Unformatted } }, { name: Microsoft.Office.WebExtension.Parameters.FilterType, value: { "enum": Microsoft.Office.WebExtension.FilterType, defaultValue: Microsoft.Office.WebExtension.FilterType.All } }], privateStateCallbacks: [], onSucceeded: d }); OSF.DDA.AsyncMethodCalls.define({ method: OSF.DDA.AsyncMethodNames.SetSelectedDataAsync, requiredArguments: [{ name: Microsoft.Office.WebExtension.Parameters.Data, types: ["string", "object", a, b] }], supportedOptions: [{ name: Microsoft.Office.WebExtension.Parameters.CoercionType, value: { "enum": Microsoft.Office.WebExtension.CoercionType, calculate: function (a) { return OSF.DDA.DataCoercion.determineCoercionType(a[Microsoft.Office.WebExtension.Parameters.Data]) } } }, { name: Microsoft.Office.WebExtension.Parameters.ImageLeft, value: { types: [a, b], defaultValue: c } }, { name: Microsoft.Office.WebExtension.Parameters.ImageTop, value: { types: [a, b], defaultValue: c } }, { name: Microsoft.Office.WebExtension.Parameters.ImageWidth, value: { types: [a, b], defaultValue: c } }, { name: Microsoft.Office.WebExtension.Parameters.ImageHeight, value: { types: [a, b], defaultValue: c } }], privateStateCallbacks: [] }) })(); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.MethodDispId.dispidGetSelectedDataMethod, fromHost: [{ name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.WAC.UniqueArguments.Data }], toHost: [{ name: OSF.DDA.WAC.UniqueArguments.GetData, value: OSF.DDA.WAC.Delegate.ParameterMap.self }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.MethodDispId.dispidSetSelectedDataMethod, toHost: [{ name: OSF.DDA.WAC.UniqueArguments.SetData, value: OSF.DDA.WAC.Delegate.ParameterMap.self }] }); Microsoft.Office.WebExtension.EventType = {}; OSF.EventDispatch = function (b) { var a = this; a._eventHandlers = {}; a._queuedEventsArgs = {}; for (var d in b) { var c = b[d]; a._eventHandlers[c] = []; a._queuedEventsArgs[c] = [] } }; OSF.EventDispatch.prototype = { getSupportedEvents: function () { var a = []; for (var b in this._eventHandlers) a.push(b); return a }, supportsEvent: function (c) { var a = false; for (var b in this._eventHandlers) if (c == b) { a = true; break } return a }, hasEventHandler: function (b, c) { var a = this._eventHandlers[b]; if (a && a.length > 0) for (var d in a) if (a[d] === c) return true; return false }, addEventHandler: function (b, a) { if (typeof a != "function") return false; var c = this._eventHandlers[b]; if (c && !this.hasEventHandler(b, a)) { c.push(a); return true } else return false }, addEventHandlerAndFireQueuedEvent: function (a, e) { var d = this._eventHandlers[a], c = d.length == 0, b = this.addEventHandler(a, e); c && b && this.fireQueuedEvent(a); return b }, removeEventHandler: function (c, d) { var a = this._eventHandlers[c]; if (a && a.length > 0) for (var b = 0; b < a.length; b++) if (a[b] === d) { a.splice(b, 1); return true } return false }, clearEventHandlers: function (a) { if (typeof this._eventHandlers[a] != "undefined" && this._eventHandlers[a].length > 0) { this._eventHandlers[a] = []; return true } return false }, getEventHandlerCount: function (a) { return this._eventHandlers[a] != undefined ? this._eventHandlers[a].length : -1 }, fireEvent: function (a) { if (a.type == undefined) return false; var b = a.type; if (b && this._eventHandlers[b]) { var c = this._eventHandlers[b]; for (var d in c) c[d](a); return true } else return false }, fireOrQueueEvent: function (c) { var b = this, a = c.type; if (a && b._eventHandlers[a]) { var d = b._eventHandlers[a], e = b._queuedEventsArgs[a]; if (d.length == 0) e.push(c); else b.fireEvent(c); return true } else return false }, fireQueuedEvent: function (a) { if (a && this._eventHandlers[a]) { var b = this._eventHandlers[a], c = this._queuedEventsArgs[a]; if (b.length > 0) { var d = b[0]; while (c.length > 0) { var e = c.shift(); d(e) } return true } } return false }, clearQueuedEvent: function (a) { if (a && this._eventHandlers[a]) { var b = this._queuedEventsArgs[a]; if (b) this._queuedEventsArgs[a] = [] } } }; OSF.DDA.OMFactory = OSF.DDA.OMFactory || {}; OSF.DDA.OMFactory.manufactureEventArgs = function (e, c, b) { var f = "hostType", d = this, a; switch (e) { case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged: a = new OSF.DDA.DocumentSelectionChangedEventArgs(c); break; case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged: a = new OSF.DDA.BindingSelectionChangedEventArgs(d.manufactureBinding(b, c.document), b[OSF.DDA.PropertyDescriptors.Subset]); break; case Microsoft.Office.WebExtension.EventType.BindingDataChanged: a = new OSF.DDA.BindingDataChangedEventArgs(d.manufactureBinding(b, c.document)); break; case Microsoft.Office.WebExtension.EventType.SettingsChanged: a = new OSF.DDA.SettingsChangedEventArgs(c); break; case Microsoft.Office.WebExtension.EventType.ActiveViewChanged: a = new OSF.DDA.ActiveViewChangedEventArgs(b); break; case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged: a = new OSF.DDA.Theming.OfficeThemeChangedEventArgs(b); break; case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged: a = new OSF.DDA.Theming.DocumentThemeChangedEventArgs(b); break; case Microsoft.Office.WebExtension.EventType.AppCommandInvoked: a = OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(b); break; case Microsoft.Office.WebExtension.EventType.DataNodeInserted: a = new OSF.DDA.NodeInsertedEventArgs(d.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NewNode]), b[OSF.DDA.DataNodeEventProperties.InUndoRedo]); break; case Microsoft.Office.WebExtension.EventType.DataNodeReplaced: a = new OSF.DDA.NodeReplacedEventArgs(d.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.OldNode]), d.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NewNode]), b[OSF.DDA.DataNodeEventProperties.InUndoRedo]); break; case Microsoft.Office.WebExtension.EventType.DataNodeDeleted: a = new OSF.DDA.NodeDeletedEventArgs(d.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.OldNode]), d.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NextSiblingNode]), b[OSF.DDA.DataNodeEventProperties.InUndoRedo]); break; case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged: a = new OSF.DDA.TaskSelectionChangedEventArgs(c); break; case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged: a = new OSF.DDA.ResourceSelectionChangedEventArgs(c); break; case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged: a = new OSF.DDA.ViewSelectionChangedEventArgs(c); break; case Microsoft.Office.WebExtension.EventType.DialogMessageReceived: a = new OSF.DDA.DialogEventArgs(b); break; case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived: a = new OSF.DDA.DialogParentEventArgs(b); break; case Microsoft.Office.WebExtension.EventType.ItemChanged: if (OSF._OfficeAppFactory.getHostInfo()[f] == "outlook" || OSF._OfficeAppFactory.getHostInfo()[f] == "outlookwebapp") { a = new OSF.DDA.OlkItemSelectedChangedEventArgs(b); c.initialize(a["initialData"]); c.setCurrentItemNumber(a["itemNumber"].itemNumber) } else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, e)); break; default: throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, e)) } return a }; OSF.DDA.AsyncMethodNames.addNames({ AddHandlerAsync: "addHandlerAsync", RemoveHandlerAsync: "removeHandlerAsync" }); OSF.DDA.AsyncMethodCalls.define({ method: OSF.DDA.AsyncMethodNames.AddHandlerAsync, requiredArguments: [{ name: Microsoft.Office.WebExtension.Parameters.EventType, "enum": Microsoft.Office.WebExtension.EventType, verify: function (b, c, a) { return a.supportsEvent(b) } }, { name: Microsoft.Office.WebExtension.Parameters.Handler, types: ["function"] }], supportedOptions: [], privateStateCallbacks: [] }); OSF.DDA.AsyncMethodCalls.define({ method: OSF.DDA.AsyncMethodNames.RemoveHandlerAsync, requiredArguments: [{ name: Microsoft.Office.WebExtension.Parameters.EventType, "enum": Microsoft.Office.WebExtension.EventType, verify: function (b, c, a) { return a.supportsEvent(b) } }], supportedOptions: [{ name: Microsoft.Office.WebExtension.Parameters.Handler, value: { types: ["function", "object"], defaultValue: null } }], privateStateCallbacks: [] }); OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { ActiveViewChangedEvent: "ActiveViewChangedEvent" }); Microsoft.Office.WebExtension.ActiveView = { Read: "read", Edit: "edit" }; OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ActiveViewChanged: "activeViewChanged" }); OSF.DDA.AsyncMethodNames.addNames({ GetActiveViewAsync: "getActiveViewAsync" }); OSF.DDA.AsyncMethodCalls.define({ method: OSF.DDA.AsyncMethodNames.GetActiveViewAsync, requiredArguments: [], supportedOptions: [], privateStateCallbacks: [], onSucceeded: function (b) { var a = b[Microsoft.Office.WebExtension.Parameters.ActiveView]; return a == undefined ? null : a } }); OSF.DDA.ActiveViewChangedEventArgs = function (a) { OSF.OUtil.defineEnumerableProperties(this, { type: { value: Microsoft.Office.WebExtension.EventType.ActiveViewChanged }, activeView: { value: a.activeView } }) }; OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.MethodDispId.dispidGetActiveViewMethod, fromHost: [{ name: Microsoft.Office.WebExtension.Parameters.ActiveView, value: Microsoft.Office.WebExtension.Parameters.Data }] }); Microsoft.Office.WebExtension.GoToType = { Binding: "binding", NamedItem: "namedItem", Slide: "slide", Index: "index" }; Microsoft.Office.WebExtension.SelectionMode = { Default: "default", Selected: "selected", None: "none" }; Microsoft.Office.WebExtension.Index = { First: "first", Last: "last", Next: "next", Previous: "previous" }; OSF.DDA.AsyncMethodNames.addNames({ GoToByIdAsync: "goToByIdAsync" }); OSF.DDA.AsyncMethodCalls.define({ method: OSF.DDA.AsyncMethodNames.GoToByIdAsync, requiredArguments: [{ name: Microsoft.Office.WebExtension.Parameters.Id, types: ["string", "number"] }, { name: Microsoft.Office.WebExtension.Parameters.GoToType, "enum": Microsoft.Office.WebExtension.GoToType }], supportedOptions: [{ name: Microsoft.Office.WebExtension.Parameters.SelectionMode, value: { "enum": Microsoft.Office.WebExtension.SelectionMode, defaultValue: Microsoft.Office.WebExtension.SelectionMode.Default } }] }); OSF.OUtil.setNamespace("Marshaling", OSF.DDA); OSF.DDA.Marshaling.NavigationKeys = { NavigationRequest: "DdaGoToByIdMethod", Id: "Id", GoToType: "GoToType", SelectionMode: "SelectionMode" }; var OSF_DDA_Marshaling_GoToType; (function (a) { var b = "NamedItem"; a[a["Binding"] = 0] = "Binding"; a[a[b] = 1] = b; a[a["Slide"] = 2] = "Slide"; a[a["Index"] = 3] = "Index" })(OSF_DDA_Marshaling_GoToType || (OSF_DDA_Marshaling_GoToType = {})); OSF.DDA.Marshaling.GoToType = OSF_DDA_Marshaling_GoToType; var OSF_DDA_Marshaling_SelectionMode; (function (a) { var b = "Selected"; a[a["Default"] = 0] = "Default"; a[a[b] = 1] = b; a[a["None"] = 2] = "None" })(OSF_DDA_Marshaling_SelectionMode || (OSF_DDA_Marshaling_SelectionMode = {})); OSF.DDA.Marshaling.SelectionMode = OSF_DDA_Marshaling_SelectionMode; OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.Marshaling.NavigationKeys.NavigationRequest); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.Marshaling.NavigationKeys.NavigationRequest, toHost: [{ name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.Marshaling.NavigationKeys.Id }, { name: Microsoft.Office.WebExtension.Parameters.GoToType, value: OSF.DDA.Marshaling.NavigationKeys.GoToType }, { name: Microsoft.Office.WebExtension.Parameters.SelectionMode, value: OSF.DDA.Marshaling.NavigationKeys.SelectionMode }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: Microsoft.Office.WebExtension.Parameters.GoToType, toHost: [{ name: Microsoft.Office.WebExtension.GoToType.Binding, value: OSF.DDA.Marshaling.GoToType.Binding }, { name: Microsoft.Office.WebExtension.GoToType.NamedItem, value: OSF.DDA.Marshaling.GoToType.NamedItem }, { name: Microsoft.Office.WebExtension.GoToType.Slide, value: OSF.DDA.Marshaling.GoToType.Slide }, { name: Microsoft.Office.WebExtension.GoToType.Index, value: OSF.DDA.Marshaling.GoToType.Index }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: Microsoft.Office.WebExtension.Parameters.SelectionMode, toHost: [{ name: Microsoft.Office.WebExtension.SelectionMode.Default, value: OSF.DDA.Marshaling.SelectionMode.Default }, { name: Microsoft.Office.WebExtension.SelectionMode.Selected, value: OSF.DDA.Marshaling.SelectionMode.Selected }, { name: Microsoft.Office.WebExtension.SelectionMode.None, value: OSF.DDA.Marshaling.SelectionMode.None }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.MethodDispId.dispidNavigateToMethod, toHost: [{ name: OSF.DDA.Marshaling.NavigationKeys.NavigationRequest, value: OSF.DDA.WAC.Delegate.ParameterMap.self }] }); Microsoft.Office.WebExtension.FileType = { Text: "text", Compressed: "compressed", Pdf: "pdf" }; OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { FileProperties: "FileProperties", FileSliceProperties: "FileSliceProperties" }); OSF.DDA.FileProperties = { Handle: "FileHandle", FileSize: "FileSize", SliceSize: Microsoft.Office.WebExtension.Parameters.SliceSize }; OSF.DDA.File = function (e, c, b) { OSF.OUtil.defineEnumerableProperties(this, { size: { value: c }, sliceCount: { value: Math.ceil(c / b) } }); var a = {}; a[OSF.DDA.FileProperties.Handle] = e; a[OSF.DDA.FileProperties.SliceSize] = b; var d = OSF.DDA.AsyncMethodNames; OSF.DDA.DispIdHost.addAsyncMethods(this, [d.GetDocumentCopyChunkAsync, d.ReleaseDocumentCopyAsync], a) }; OSF.DDA.FileSliceOffset = "fileSliceoffset"; OSF.DDA.AsyncMethodNames.addNames({ GetDocumentCopyAsync: "getFileAsync", GetDocumentCopyChunkAsync: "getSliceAsync", ReleaseDocumentCopyAsync: "closeAsync" }); OSF.DDA.AsyncMethodCalls.define({ method: OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync, requiredArguments: [{ name: Microsoft.Office.WebExtension.Parameters.FileType, "enum": Microsoft.Office.WebExtension.FileType }], supportedOptions: [{ name: Microsoft.Office.WebExtension.Parameters.SliceSize, value: { types: ["number"], defaultValue: 4 * 1024 * 1024 } }], checkCallArgs: function (b) { var a = b[Microsoft.Office.WebExtension.Parameters.SliceSize]; if (a <= 0 || a > 4 * 1024 * 1024) throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize; return b }, onSucceeded: function (a, c, b) { return new OSF.DDA.File(a[OSF.DDA.FileProperties.Handle], a[OSF.DDA.FileProperties.FileSize], b[Microsoft.Office.WebExtension.Parameters.SliceSize]) } }); OSF.DDA.AsyncMethodCalls.define({ method: OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync, requiredArguments: [{ name: Microsoft.Office.WebExtension.Parameters.SliceIndex, types: ["number"] }], privateStateCallbacks: [{ name: OSF.DDA.FileProperties.Handle, value: function (b, a) { return a[OSF.DDA.FileProperties.Handle] } }, { name: OSF.DDA.FileProperties.SliceSize, value: function (b, a) { return a[OSF.DDA.FileProperties.SliceSize] } }], checkCallArgs: function (a, d, c) { var b = a[Microsoft.Office.WebExtension.Parameters.SliceIndex]; if (b < 0 || b >= d.sliceCount) throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange; a[OSF.DDA.FileSliceOffset] = parseInt((b * c[OSF.DDA.FileProperties.SliceSize]).toString()); return a }, onSucceeded: function (a, d, c) { var b = {}; OSF.OUtil.defineEnumerableProperties(b, { data: { value: a[Microsoft.Office.WebExtension.Parameters.Data] }, index: { value: c[Microsoft.Office.WebExtension.Parameters.SliceIndex] }, size: { value: a[OSF.DDA.FileProperties.SliceSize] } }); return b } }); OSF.DDA.AsyncMethodCalls.define({ method: OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync, privateStateCallbacks: [{ name: OSF.DDA.FileProperties.Handle, value: function (b, a) { return a[OSF.DDA.FileProperties.Handle] } }] }); OSF.OUtil.setNamespace("Marshaling", OSF.DDA); OSF.OUtil.setNamespace("File", OSF.DDA.Marshaling); var OSF_DDA_Marshaling_File_FilePropertiesKeys; (function (a) { var b = "FileSize"; a[a["Handle"] = 0] = "Handle"; a[a[b] = 1] = b })(OSF_DDA_Marshaling_File_FilePropertiesKeys || (OSF_DDA_Marshaling_File_FilePropertiesKeys = {})); OSF.DDA.Marshaling.File.FilePropertiesKeys = OSF_DDA_Marshaling_File_FilePropertiesKeys; var OSF_DDA_Marshaling_File_SlicePropertiesKeys; (function (a) { var b = "SliceSize"; a[a["Data"] = 0] = "Data"; a[a[b] = 1] = b })(OSF_DDA_Marshaling_File_SlicePropertiesKeys || (OSF_DDA_Marshaling_File_SlicePropertiesKeys = {})); OSF.DDA.Marshaling.File.SlicePropertiesKeys = OSF_DDA_Marshaling_File_SlicePropertiesKeys; var OSF_DDA_Marshaling_File_FileType; (function (a) { var b = "Compressed"; a[a["Text"] = 0] = "Text"; a[a[b] = 1] = b; a[a["Pdf"] = 2] = "Pdf" })(OSF_DDA_Marshaling_File_FileType || (OSF_DDA_Marshaling_File_FileType = {})); OSF.DDA.Marshaling.File.FileType = OSF_DDA_Marshaling_File_FileType; var OSF_DDA_Marshaling_File_ParameterKeys; (function (a) { var d = "SliceIndex", c = "SliceSize", b = "FileType"; a[a[b] = 0] = b; a[a[c] = 1] = c; a[a["Handle"] = 2] = "Handle"; a[a[d] = 3] = d })(OSF_DDA_Marshaling_File_ParameterKeys || (OSF_DDA_Marshaling_File_ParameterKeys = {})); OSF.DDA.Marshaling.File.ParameterKeys = OSF_DDA_Marshaling_File_ParameterKeys; OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FileProperties); OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FileSliceProperties); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.PropertyDescriptors.FileProperties, fromHost: [{ name: OSF.DDA.FileProperties.Handle, value: OSF.DDA.Marshaling.File.FilePropertiesKeys.Handle }, { name: OSF.DDA.FileProperties.FileSize, value: OSF.DDA.Marshaling.File.FilePropertiesKeys.FileSize }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.PropertyDescriptors.FileSliceProperties, fromHost: [{ name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.Marshaling.File.SlicePropertiesKeys.Data }, { name: OSF.DDA.FileProperties.SliceSize, value: OSF.DDA.Marshaling.File.SlicePropertiesKeys.SliceSize }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: Microsoft.Office.WebExtension.Parameters.FileType, toHost: [{ name: Microsoft.Office.WebExtension.FileType.Text, value: OSF.DDA.Marshaling.File.FileType.Text }, { name: Microsoft.Office.WebExtension.FileType.Compressed, value: OSF.DDA.Marshaling.File.FileType.Compressed }, { name: Microsoft.Office.WebExtension.FileType.Pdf, value: OSF.DDA.Marshaling.File.FileType.Pdf }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod, toHost: [{ name: Microsoft.Office.WebExtension.Parameters.FileType, value: OSF.DDA.Marshaling.File.ParameterKeys.FileType }, { name: Microsoft.Office.WebExtension.Parameters.SliceSize, value: OSF.DDA.Marshaling.File.ParameterKeys.SliceSize }], fromHost: [{ name: OSF.DDA.PropertyDescriptors.FileProperties, value: OSF.DDA.WAC.Delegate.ParameterMap.self }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod, toHost: [{ name: OSF.DDA.FileProperties.Handle, value: OSF.DDA.Marshaling.File.ParameterKeys.Handle }, { name: Microsoft.Office.WebExtension.Parameters.SliceIndex, value: OSF.DDA.Marshaling.File.ParameterKeys.SliceIndex }], fromHost: [{ name: OSF.DDA.PropertyDescriptors.FileSliceProperties, value: OSF.DDA.WAC.Delegate.ParameterMap.self }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod, toHost: [{ name: OSF.DDA.FileProperties.Handle, value: OSF.DDA.Marshaling.File.ParameterKeys.Handle }] }); OSF.DDA.FilePropertiesDescriptor = { Url: "Url" }; OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { FilePropertiesDescriptor: "FilePropertiesDescriptor" }); Microsoft.Office.WebExtension.FileProperties = function (a) { OSF.OUtil.defineEnumerableProperties(this, { url: { value: a[OSF.DDA.FilePropertiesDescriptor.Url] } }) }; OSF.DDA.AsyncMethodNames.addNames({ GetFilePropertiesAsync: "getFilePropertiesAsync" }); OSF.DDA.AsyncMethodCalls.define({ method: OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync, fromHost: [{ name: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor, value: 0 }], requiredArguments: [], supportedOptions: [], onSucceeded: function (a) { return new Microsoft.Office.WebExtension.FileProperties(a) } }); OSF.OUtil.setNamespace("Marshaling", OSF.DDA); var OSF_DDA_Marshaling_FilePropertiesKeys; (function (a) { var b = "Properties"; a[a[b] = 0] = b; a[a["Url"] = 1] = "Url" })(OSF_DDA_Marshaling_FilePropertiesKeys || (OSF_DDA_Marshaling_FilePropertiesKeys = {})); OSF.DDA.Marshaling.FilePropertiesKeys = OSF_DDA_Marshaling_FilePropertiesKeys; OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor, fromHost: [{ name: OSF.DDA.FilePropertiesDescriptor.Url, value: OSF.DDA.Marshaling.FilePropertiesKeys.Url }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod, fromHost: [{ name: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor, value: OSF.DDA.Marshaling.FilePropertiesKeys.Properties }] }); OSF.DDA.AsyncMethodNames.addNames({ GetOfficeThemeAsync: "getOfficeThemeAsync", GetDocumentThemeAsync: "getDocumentThemeAsync" }); OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { OfficeThemeChanged: "officeThemeChanged", DocumentThemeChanged: "documentThemeChanged" }); OSF.OUtil.augmentList(Microsoft.Office.WebExtension.Parameters, { DocumentTheme: "documentTheme", OfficeTheme: "officeTheme" }); OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { DocumentThemeChangedEvent: "DocumentThemeChangedEvent", OfficeThemeChangedEvent: "OfficeThemeChangedEvent" }); OSF.OUtil.setNamespace("Theming", OSF.DDA); OSF.DDA.Theming.OfficeThemeEnum = { PrimaryFontColor: "primaryFontColor", PrimaryBackgroundColor: "primaryBackgroundColor", SecondaryFontColor: "secondaryFontColor", SecondaryBackgroundColor: "secondaryBackgroundColor" }; OSF.DDA.Theming.DocumentThemeEnum = { PrimaryFontColor: "primaryFontColor", PrimaryBackgroundColor: "primaryBackgroundColor", SecondaryFontColor: "secondaryFontColor", SecondaryBackgroundColor: "secondaryBackgroundColor", Accent1: "accent1", Accent2: "accent2", Accent3: "accent3", Accent4: "accent4", Accent5: "accent5", Accent6: "accent6", Hyperlink: "hyperlink", FollowedHyperlink: "followedHyperlink", HeaderLatinFont: "headerLatinFont", HeaderEastAsianFont: "headerEastAsianFont", HeaderScriptFont: "headerScriptFont", HeaderLocalizedFont: "headerLocalizedFont", BodyLatinFont: "bodyLatinFont", BodyEastAsianFont: "bodyEastAsianFont", BodyScriptFont: "bodyScriptFont", BodyLocalizedFont: "bodyLocalizedFont" }; OSF.DDA.Theming.ConvertToDocumentTheme = function (f) { var b = false, a = true; for (var d = [{ name: "primaryFontColor", needToConvertToHex: a }, { name: "primaryBackgroundColor", needToConvertToHex: a }, { name: "secondaryFontColor", needToConvertToHex: a }, { name: "secondaryBackgroundColor", needToConvertToHex: a }, { name: "accent1", needToConvertToHex: a }, { name: "accent2", needToConvertToHex: a }, { name: "accent3", needToConvertToHex: a }, { name: "accent4", needToConvertToHex: a }, { name: "accent5", needToConvertToHex: a }, { name: "accent6", needToConvertToHex: a }, { name: "hyperlink", needToConvertToHex: a }, { name: "followedHyperlink", needToConvertToHex: a }, { name: "headerLatinFont", needToConvertToHex: b }, { name: "headerEastAsianFont", needToConvertToHex: b }, { name: "headerScriptFont", needToConvertToHex: b }, { name: "headerLocalizedFont", needToConvertToHex: b }, { name: "bodyLatinFont", needToConvertToHex: b }, { name: "bodyEastAsianFont", needToConvertToHex: b }, { name: "bodyScriptFont", needToConvertToHex: b }, { name: "bodyLocalizedFont", needToConvertToHex: b }], e = {}, c = 0; c < d.length; c++) if (d[c].needToConvertToHex) e[d[c].name] = OSF.OUtil.convertIntToCssHexColor(f[d[c].name]); else e[d[c].name] = f[d[c].name]; return e }; OSF.DDA.Theming.ConvertToOfficeTheme = function (a) { var b = {}; for (var c in a) b[c] = OSF.OUtil.convertIntToCssHexColor(a[c]); return b }; OSF.DDA.AsyncMethodCalls.define({ method: OSF.DDA.AsyncMethodNames.GetDocumentThemeAsync, requiredArguments: [], supportedOptions: [], privateStateCallbacks: [], onSucceeded: OSF.DDA.Theming.ConvertToDocumentTheme }); OSF.DDA.AsyncMethodCalls.define({ method: OSF.DDA.AsyncMethodNames.GetOfficeThemeAsync, requiredArguments: [], supportedOptions: [], privateStateCallbacks: [], onSucceeded: OSF.DDA.Theming.ConvertToOfficeTheme }); OSF.DDA.Theming.OfficeThemeChangedEventArgs = function (a) { var b = OSF.DDA.Theming.ConvertToOfficeTheme(a); OSF.OUtil.defineEnumerableProperties(this, { type: { value: Microsoft.Office.WebExtension.EventType.OfficeThemeChanged }, officeTheme: { value: b } }) }; OSF.DDA.Theming.DocumentThemeChangedEventArgs = function (a) { var b = OSF.DDA.Theming.ConvertToDocumentTheme(a); OSF.OUtil.defineEnumerableProperties(this, { type: { value: Microsoft.Office.WebExtension.EventType.DocumentThemeChanged }, documentTheme: { value: b } }) }; var OSF_DDA_Theming_InternalThemeHandler = function () { var h = "secondaryBackgroundColor", g = "secondaryFontColor", c = "background-color", f = "primaryBackgroundColor", b = "color", e = "primaryFontColor", a = null; function d() { var b = this; b._pseudoDocumentObject = a; b._previousDocumentThemeData = a; b._previousOfficeThemeData = a; b._officeCss = a; b._asyncCallsCompleted = a; b._onAsyncCallsCompleted = a } d.prototype.InitializeAndChangeOnce = function (c) { var a = this; a._officeCss = a._getOfficeThemesCss(); if (!a._officeCss) { c && c(); return } a._onAsyncCallsCompleted = c; a._pseudoDocumentObject = {}; var b = a._pseudoDocumentObject; OSF.DDA.DispIdHost.addAsyncMethods(b, [OSF.DDA.AsyncMethodNames.GetOfficeThemeAsync, OSF.DDA.AsyncMethodNames.GetDocumentThemeAsync]); OSF.DDA.DispIdHost.addEventSupport(b, new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.OfficeThemeChanged, Microsoft.Office.WebExtension.EventType.DocumentThemeChanged])); a._asyncCallsCompleted = {}; a._asyncCallsCompleted[OSF.DDA.AsyncMethodNames.GetOfficeThemeAsync] = false; a._asyncCallsCompleted[OSF.DDA.AsyncMethodNames.GetDocumentThemeAsync] = false; a._getAndProcessThemeData(b.getDocumentThemeAsync, Function.createDelegate(a, a._processDocumentThemeData), OSF.DDA.AsyncMethodNames.GetDocumentThemeAsync); a._getAndProcessThemeData(b.getOfficeThemeAsync, Function.createDelegate(a, a._processOfficeThemeData), OSF.DDA.AsyncMethodNames.GetOfficeThemeAsync) }; d.prototype._getOfficeThemesCss = function () { function b() { for (var d = "officethemes.css", c = 0; c < document.styleSheets.length; c++) { var b = document.styleSheets[c]; if (!b.disabled && b.href && d == b.href.substring(b.href.length - d.length, b.href.length).toLowerCase()) if (!b.cssRules && !b.rules) return a; else return b } } try { return b() } catch (c) { return a } }; d.prototype._changeCss = function (a, f, e) { for (var g = a.cssRules ? a.cssRules.length : a.rules.length, b = 0; b < g; b++) { var d; if (a.cssRules) d = a.cssRules[b]; else d = a.rules[b]; var c = d.selectorText; if (c && c.toLowerCase() == f.toLowerCase()) if (a.cssRules) { a.deleteRule(b); a.insertRule(c + e, b) } else { a.removeRule(b); a.addRule(c, e, b) } } }; d.prototype._changeDocumentThemeData = function (u) { var d = "font-family", i = "border-color", r = "accent6", q = "accent5", p = "accent4", o = "accent3", n = "accent2", m = "accent1", l = this; for (var k = [{ name: e, cssSelector: ".office-docTheme-primary-fontColor", cssProperty: b }, { name: f, cssSelector: ".office-docTheme-primary-bgColor", cssProperty: c }, { name: g, cssSelector: ".office-docTheme-secondary-fontColor", cssProperty: b }, { name: h, cssSelector: ".office-docTheme-secondary-bgColor", cssProperty: c }, { name: m, cssSelector: ".office-contentAccent1-color", cssProperty: b }, { name: n, cssSelector: ".office-contentAccent2-color", cssProperty: b }, { name: o, cssSelector: ".office-contentAccent3-color", cssProperty: b }, { name: p, cssSelector: ".office-contentAccent4-color", cssProperty: b }, { name: q, cssSelector: ".office-contentAccent5-color", cssProperty: b }, { name: r, cssSelector: ".office-contentAccent6-color", cssProperty: b }, { name: m, cssSelector: ".office-contentAccent1-bgColor", cssProperty: c }, { name: n, cssSelector: ".office-contentAccent2-bgColor", cssProperty: c }, { name: o, cssSelector: ".office-contentAccent3-bgColor", cssProperty: c }, { name: p, cssSelector: ".office-contentAccent4-bgColor", cssProperty: c }, { name: q, cssSelector: ".office-contentAccent5-bgColor", cssProperty: c }, { name: r, cssSelector: ".office-contentAccent6-bgColor", cssProperty: c }, { name: m, cssSelector: ".office-contentAccent1-borderColor", cssProperty: i }, { name: n, cssSelector: ".office-contentAccent2-borderColor", cssProperty: i }, { name: o, cssSelector: ".office-contentAccent3-borderColor", cssProperty: i }, { name: p, cssSelector: ".office-contentAccent4-borderColor", cssProperty: i }, { name: q, cssSelector: ".office-contentAccent5-borderColor", cssProperty: i }, { name: r, cssSelector: ".office-contentAccent6-borderColor", cssProperty: i }, { name: "hyperlink", cssSelector: ".office-a", cssProperty: b }, { name: "followedHyperlink", cssSelector: ".office-a:visited", cssProperty: b }, { name: "headerLatinFont", cssSelector: ".office-headerFont-latin", cssProperty: d }, { name: "headerEastAsianFont", cssSelector: ".office-headerFont-eastAsian", cssProperty: d }, { name: "headerScriptFont", cssSelector: ".office-headerFont-script", cssProperty: d }, { name: "headerLocalizedFont", cssSelector: ".office-headerFont-localized", cssProperty: d }, { name: "bodyLatinFont", cssSelector: ".office-bodyFont-latin", cssProperty: d }, { name: "bodyEastAsianFont", cssSelector: ".office-bodyFont-eastAsian", cssProperty: d }, { name: "bodyScriptFont", cssSelector: ".office-bodyFont-script", cssProperty: d }, { name: "bodyLocalizedFont", cssSelector: ".office-bodyFont-localized", cssProperty: d }], s = u.type == "documentThemeChanged" ? u.documentTheme : u, j = 0; j < k.length; j++) if (l._previousDocumentThemeData === a || l._previousDocumentThemeData[k[j].name] != s[k[j].name]) if (s[k[j].name] != a && s[k[j].name] != "") { var t = s[k[j].name]; if (k[j].cssProperty === d) t = '"' + t.replace(/"/g, '\\"') + '"'; l._changeCss(l._officeCss, k[j].cssSelector, "{" + k[j].cssProperty + ":" + t + ";}") } else l._changeCss(l._officeCss, k[j].cssSelector, "{}"); l._previousDocumentThemeData = s }; d.prototype._changeOfficeThemeData = function (l) { var j = this; for (var i = [{ name: e, cssSelector: ".office-officeTheme-primary-fontColor", cssProperty: b }, { name: f, cssSelector: ".office-officeTheme-primary-bgColor", cssProperty: c }, { name: g, cssSelector: ".office-officeTheme-secondary-fontColor", cssProperty: b }, { name: h, cssSelector: ".office-officeTheme-secondary-bgColor", cssProperty: c }], k = l.type == "officeThemeChanged" ? l.officeTheme : l, d = 0; d < i.length; d++) if (j._previousOfficeThemeData === a || j._previousOfficeThemeData[i[d].name] != k[i[d].name]) k[i[d].name] !== undefined && j._changeCss(j._officeCss, i[d].cssSelector, "{" + i[d].cssProperty + ":" + k[i[d].name] + ";}"); j._previousOfficeThemeData = k }; d.prototype._getAndProcessThemeData = function (d, c, b) { d(Function.createDelegate(this, function (e) { var d = this; if (e.status == "succeeded") { var f = e.value; c(f) } if (d._areAllCallsCompleted(b) && d._onAsyncCallsCompleted) { d._onAsyncCallsCompleted(); d._onAsyncCallsCompleted = a } })) }; d.prototype._processOfficeThemeData = function (c) { var b = this; b._changeOfficeThemeData(c); b._pseudoDocumentObject.addHandlerAsync(Microsoft.Office.WebExtension.EventType.OfficeThemeChanged, Function.createDelegate(b, b._changeOfficeThemeData), a) }; d.prototype._processDocumentThemeData = function (c) { var b = this; b._changeDocumentThemeData(c); b._pseudoDocumentObject.addHandlerAsync(Microsoft.Office.WebExtension.EventType.DocumentThemeChanged, Function.createDelegate(b, b._changeDocumentThemeData), a) }; d.prototype._areAllCallsCompleted = function (b) { var a; if (!(a = this._asyncCallsCompleted)) return true; if (b && a.hasOwnProperty(b)) a[b] = true; for (var c in a) { if (a.hasOwnProperty(c) && a[c]) continue; return false } return true }; return d }(); OSF.DDA.Theming.InternalThemeHandler = OSF_DDA_Theming_InternalThemeHandler; OSF.OUtil.setNamespace("Marshaling", OSF.DDA); var OSF_DDA_Marshaling_ThemingKeys; (function (a) { var r = "SecondaryBackground", q = "SecondaryText", p = "PrimaryBackground", o = "PrimaryText", n = "BackgroundColor", m = "BdLocalized", l = "BdScript", k = "BdEastAsian", j = "HdLocalized", i = "HdScript", h = "HdEastAsian", g = "FollowedHyperlink", f = "Hyperlink", e = "Background2", d = "Background1", c = "OfficeTheme", b = "DocumentTheme"; a[a[b] = 0] = b; a[a[c] = 1] = c; a[a[d] = 2] = d; a[a["Text1"] = 3] = "Text1"; a[a[e] = 4] = e; a[a["Text2"] = 5] = "Text2"; a[a["Accent1"] = 6] = "Accent1"; a[a["Accent2"] = 7] = "Accent2"; a[a["Accent3"] = 8] = "Accent3"; a[a["Accent4"] = 9] = "Accent4"; a[a["Accent5"] = 10] = "Accent5"; a[a["Accent6"] = 11] = "Accent6"; a[a[f] = 12] = f; a[a[g] = 13] = g; a[a["HdLatin"] = 14] = "HdLatin"; a[a[h] = 15] = h; a[a[i] = 16] = i; a[a[j] = 17] = j; a[a["BdLatin"] = 18] = "BdLatin"; a[a[k] = 19] = k; a[a[l] = 20] = l; a[a[m] = 21] = m; a[a[n] = 22] = n; a[a[o] = 23] = o; a[a[p] = 24] = p; a[a[q] = 25] = q; a[a[r] = 26] = r })(OSF_DDA_Marshaling_ThemingKeys || (OSF_DDA_Marshaling_ThemingKeys = {})); OSF.DDA.Marshaling.ThemingKeys = OSF_DDA_Marshaling_ThemingKeys; var parameterMap = OSF.DDA.WAC.Delegate.ParameterMap, hostKeys = OSF.DDA.Marshaling.ThemingKeys; parameterMap.addComplexType(Microsoft.Office.WebExtension.Parameters.DocumentTheme); parameterMap.addComplexType(Microsoft.Office.WebExtension.Parameters.OfficeTheme); parameterMap.define({ type: OSF.DDA.MethodDispId.dispidGetDocumentThemeMethod, fromHost: [{ name: Microsoft.Office.WebExtension.Parameters.DocumentTheme, value: hostKeys.DocumentTheme }] }); parameterMap.define({ type: OSF.DDA.MethodDispId.dispidGetOfficeThemeMethod, fromHost: [{ name: Microsoft.Office.WebExtension.Parameters.OfficeTheme, value: hostKeys.OfficeTheme }] }); parameterMap.define({ type: OSF.DDA.EventDispId.dispidDocumentThemeChangedEvent, fromHost: [{ name: Microsoft.Office.WebExtension.Parameters.DocumentTheme, value: hostKeys.DocumentTheme }] }); parameterMap.define({ type: OSF.DDA.EventDispId.dispidOfficeThemeChangedEvent, fromHost: [{ name: Microsoft.Office.WebExtension.Parameters.OfficeTheme, value: hostKeys.OfficeTheme }] }); var destKeys = OSF.DDA.Theming.DocumentThemeEnum; parameterMap.define({ type: Microsoft.Office.WebExtension.Parameters.DocumentTheme, fromHost: [{ name: destKeys.PrimaryBackgroundColor, value: hostKeys.Background1 }, { name: destKeys.PrimaryFontColor, value: hostKeys.Text1 }, { name: destKeys.SecondaryBackgroundColor, value: hostKeys.Background2 }, { name: destKeys.SecondaryFontColor, value: hostKeys.Text2 }, { name: destKeys.Accent1, value: hostKeys.Accent1 }, { name: destKeys.Accent2, value: hostKeys.Accent2 }, { name: destKeys.Accent3, value: hostKeys.Accent3 }, { name: destKeys.Accent4, value: hostKeys.Accent4 }, { name: destKeys.Accent5, value: hostKeys.Accent5 }, { name: destKeys.Accent6, value: hostKeys.Accent6 }, { name: destKeys.Hyperlink, value: hostKeys.Hyperlink }, { name: destKeys.FollowedHyperlink, value: hostKeys.FollowedHyperlink }, { name: destKeys.HeaderLatinFont, value: hostKeys.HdLatin }, { name: destKeys.HeaderEastAsianFont, value: hostKeys.HdEastAsian }, { name: destKeys.HeaderScriptFont, value: hostKeys.HdScript }, { name: destKeys.HeaderLocalizedFont, value: hostKeys.HdLocalized }, { name: destKeys.BodyLatinFont, value: hostKeys.BdLatin }, { name: destKeys.BodyEastAsianFont, value: hostKeys.BdEastAsian }, { name: destKeys.BodyScriptFont, value: hostKeys.BdScript }, { name: destKeys.BodyLocalizedFont, value: hostKeys.BdLocalized }] }); destKeys = OSF.DDA.Theming.OfficeThemeEnum; parameterMap.define({ type: Microsoft.Office.WebExtension.Parameters.OfficeTheme, fromHost: [{ name: destKeys.PrimaryFontColor, value: hostKeys.PrimaryText }, { name: destKeys.PrimaryBackgroundColor, value: hostKeys.PrimaryBackground }, { name: destKeys.SecondaryFontColor, value: hostKeys.SecondaryText }, { name: destKeys.SecondaryBackgroundColor, value: hostKeys.SecondaryBackground }] }); OSF.DDA.SettingsManager = { SerializedSettings: "serializedSettings", RefreshingSettings: "refreshingSettings", DateJSONPrefix: "Date(", DataJSONSuffix: ")", serializeSettings: function (b) { var d = {}; for (var c in b) { var a = b[c]; try { if (JSON) a = JSON.stringify(a, function (a, b) { return OSF.OUtil.isDate(this[a]) ? OSF.DDA.SettingsManager.DateJSONPrefix + this[a].getTime() + OSF.DDA.SettingsManager.DataJSONSuffix : b }); else a = Sys.Serialization.JavaScriptSerializer.serialize(a); d[c] = a } catch (e) { } } return d }, deserializeSettings: function (b) { var d = {}; b = b || {}; for (var c in b) { var a = b[c]; try { if (JSON) a = JSON.parse(a, function (c, a) { var b; if (typeof a === "string" && a && a.length > 6 && a.slice(0, 5) === OSF.DDA.SettingsManager.DateJSONPrefix && a.slice(-1) === OSF.DDA.SettingsManager.DataJSONSuffix) { b = new Date(parseInt(a.slice(5, -1))); if (b) return b } return a }); else a = Sys.Serialization.JavaScriptSerializer.deserialize(a, true); d[c] = a } catch (e) { } } return d } }; OSF.DDA.Settings = function (a) { var b = "name"; a = a || {}; var c = function (d) { var b = OSF.OUtil.getSessionStorage(); if (b) { var a = OSF.DDA.SettingsManager.serializeSettings(d), c = JSON ? JSON.stringify(a) : Sys.Serialization.JavaScriptSerializer.serialize(a); b.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(), c) } }; OSF.OUtil.defineEnumerableProperties(this, { "get": { value: function (e) { var d = Function._validateParams(arguments, [{ name: b, type: String, mayBeNull: false }]); if (d) throw d; var c = a[e]; return typeof c === "undefined" ? null : c } }, "set": { value: function (f, e) { var d = Function._validateParams(arguments, [{ name: b, type: String, mayBeNull: false }, { name: "value", mayBeNull: true }]); if (d) throw d; a[f] = e; c(a) } }, remove: { value: function (e) { var d = Function._validateParams(arguments, [{ name: b, type: String, mayBeNull: false }]); if (d) throw d; delete a[e]; c(a) } } }); OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.SaveAsync], a) }; OSF.DDA.RefreshableSettings = function (a) { OSF.DDA.RefreshableSettings.uber.constructor.call(this, a); OSF.DDA.DispIdHost.addAsyncMethods(this, [OSF.DDA.AsyncMethodNames.RefreshAsync], a); OSF.DDA.DispIdHost.addEventSupport(this, new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged])) }; OSF.OUtil.extend(OSF.DDA.RefreshableSettings, OSF.DDA.Settings); OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { SettingsChanged: "settingsChanged" }); OSF.DDA.SettingsChangedEventArgs = function (a) { OSF.OUtil.defineEnumerableProperties(this, { type: { value: Microsoft.Office.WebExtension.EventType.SettingsChanged }, settings: { value: a } }) }; OSF.DDA.AsyncMethodNames.addNames({ RefreshAsync: "refreshAsync", SaveAsync: "saveAsync" }); OSF.DDA.AsyncMethodCalls.define({ method: OSF.DDA.AsyncMethodNames.RefreshAsync, requiredArguments: [], supportedOptions: [], privateStateCallbacks: [{ name: OSF.DDA.SettingsManager.RefreshingSettings, value: function (b, a) { return a } }], onSucceeded: function (d, a, e) { var f = d[OSF.DDA.SettingsManager.SerializedSettings], c = OSF.DDA.SettingsManager.deserializeSettings(f), g = e[OSF.DDA.SettingsManager.RefreshingSettings]; for (var b in g) a.remove(b); for (var b in c) a.set(b, c[b]); return a } }); OSF.DDA.AsyncMethodCalls.define({ method: OSF.DDA.AsyncMethodNames.SaveAsync, requiredArguments: [], supportedOptions: [{ name: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale, value: { types: ["boolean"], defaultValue: true } }], privateStateCallbacks: [{ name: OSF.DDA.SettingsManager.SerializedSettings, value: function (b, a) { return OSF.DDA.SettingsManager.serializeSettings(a) } }] }); OSF.DDA.WAC.SettingsTranslator = function () { var b = 0, a = 1; return { read: function (f) { var c = {}, d = f.Settings; for (var g in d) { var e = d[g]; c[e[b]] = e[a] } return c }, write: function (d) { var e = []; for (var f in d) { var c = []; c[b] = f; c[a] = d[f]; e.push(c) } return e } } }(); OSF.DDA.WAC.Delegate.ParameterMap.setDynamicType(OSF.DDA.SettingsManager.SerializedSettings, { toHost: OSF.DDA.WAC.SettingsTranslator.write, fromHost: OSF.DDA.WAC.SettingsTranslator.read }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.WAC.UniqueArguments.SettingsRequest, toHost: [{ name: Microsoft.Office.WebExtension.Parameters.OverwriteIfStale, value: "OverwriteIfStale" }, { name: OSF.DDA.SettingsManager.SerializedSettings, value: OSF.DDA.WAC.UniqueArguments.Properties }], invertible: true }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.MethodDispId.dispidLoadSettingsMethod, fromHost: [{ name: OSF.DDA.SettingsManager.SerializedSettings, value: OSF.DDA.WAC.UniqueArguments.Properties }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.MethodDispId.dispidSaveSettingsMethod, toHost: [{ name: OSF.DDA.WAC.UniqueArguments.SettingsRequest, value: OSF.DDA.WAC.Delegate.ParameterMap.self }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.EventDispId.dispidSettingsChangedEvent }); var OfficeExt; (function (a) { var b; (function (b) { var e = function () { var g = "object", f = "string", d = null; function e() { var a = this, b = a; a._pseudoDocument = d; a._eventDispatch = d; a._processAppCommandInvocation = function (a) { var c = b._verifyManifestCallback(a.callbackName); if (c.errorCode != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { b._invokeAppCommandCompletedMethod(a.appCommandId, c.errorCode, ""); return } var d = b._constructEventObjectForCallback(a); if (d) window.setTimeout(function () { c.callback(d) }, 0); else b._invokeAppCommandCompletedMethod(a.appCommandId, OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError, "") } } e.initializeOsfDda = function () { OSF.DDA.AsyncMethodNames.addNames({ AppCommandInvocationCompletedAsync: "appCommandInvocationCompletedAsync" }); OSF.DDA.AsyncMethodCalls.define({ method: OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync, requiredArguments: [{ name: Microsoft.Office.WebExtension.Parameters.Id, types: [f] }, { name: Microsoft.Office.WebExtension.Parameters.Status, types: ["number"] }, { name: Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData, types: [f] }] }); OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { AppCommandInvokedEvent: "AppCommandInvokedEvent" }); OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { AppCommandInvoked: "appCommandInvoked" }); OSF.OUtil.setNamespace("AppCommand", OSF.DDA); OSF.DDA.AppCommand.AppCommandInvokedEventArgs = a.AppCommand.AppCommandInvokedEventArgs }; e.prototype.initializeAndChangeOnce = function (c) { var a = this; b.registerDdaFacade(); a._pseudoDocument = {}; OSF.DDA.DispIdHost.addAsyncMethods(a._pseudoDocument, [OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync]); a._eventDispatch = new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked]); var d = function (a) { if (c) if (a.status == "succeeded") c(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); else c(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError) }; OSF.DDA.DispIdHost.addEventSupport(a._pseudoDocument, a._eventDispatch); a._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked, a._processAppCommandInvocation, d) }; e.prototype._verifyManifestCallback = function (h) { var a = "function", f = { callback: d, errorCode: OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback }; h = h.trim(); try { for (var b = h.split("."), c = window, e = 0; e < b.length - 1; e++) if (c[b[e]] && (typeof c[b[e]] == g || typeof c[b[e]] == a)) c = c[b[e]]; else return f; var i = c[b[b.length - 1]]; if (typeof i != a) return f } catch (j) { return f } return { callback: i, errorCode: OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess } }; e.prototype._invokeAppCommandCompletedMethod = function (a, b, c) { this._pseudoDocument.appCommandInvocationCompletedAsync(a, b, c) }; e.prototype._constructEventObjectForCallback = function (b) { var f = this, a = new c; try { var e = JSON.parse(b.eventObjStr); this._translateEventObjectInternal(e, a); Object.defineProperty(a, "completed", { value: function (c) { a.completedContext = c; var d = JSON.stringify(a); f._invokeAppCommandCompletedMethod(b.appCommandId, OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess, d) }, enumerable: true }) } catch (g) { a = d } return a }; e.prototype._translateEventObjectInternal = function (e, c) { for (var a in e) { if (!e.hasOwnProperty(a)) continue; var b = e[a]; if (typeof b == g && b != d) { OSF.OUtil.defineEnumerableProperty(c, a, { value: {} }); this._translateEventObjectInternal(b, c[a]) } else Object.defineProperty(c, a, { value: b, enumerable: true, writable: true }) } }; e.prototype._constructObjectByTemplate = function (c, j) { var b = {}; if (!c || !j) return b; for (var a in c) if (c.hasOwnProperty(a)) { b[a] = d; if (j[a] != d) { var h = c[a], i = j[a], e = typeof i; if (typeof h == g && h != d) b[a] = this._constructObjectByTemplate(h, i); else if (e == "number" || e == f || e == "boolean") b[a] = i } } return b }; e.instance = function () { if (e._instance == d) e._instance = new e; return e._instance }; e._instance = d; return e }(); b.AppCommandManager = e; var d = function () { function a(b, c, d) { var a = this; a.type = Microsoft.Office.WebExtension.EventType.AppCommandInvoked; a.appCommandId = b; a.callbackName = c; a.eventObjStr = d } a.create = function (c) { return new a(c[b.AppCommandInvokedEventEnums.AppCommandId], c[b.AppCommandInvokedEventEnums.CallbackName], c[b.AppCommandInvokedEventEnums.EventObjStr]) }; return a }(); b.AppCommandInvokedEventArgs = d; var c = function () { function a() { } return a }(); b.AppCommandCallbackEventArgs = c; b.AppCommandInvokedEventEnums = { AppCommandId: "appCommandId", CallbackName: "callbackName", EventObjStr: "eventObjStr" } })(b = a.AppCommand || (a.AppCommand = {})) })(OfficeExt || (OfficeExt = {})); OfficeExt.AppCommand.AppCommandManager.initializeOsfDda(); OSF.OUtil.setNamespace("Marshaling", OSF.DDA); OSF.OUtil.setNamespace("AppCommand", OSF.DDA.Marshaling); var OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys; (function (a) { var d = "EventObjStr", c = "CallbackName", b = "AppCommandId"; a[a[b] = 0] = b; a[a[c] = 1] = c; a[a[d] = 2] = d })(OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys || (OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys = {})); OSF.DDA.Marshaling.AppCommand.AppCommandInvokedEventKeys = OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys; var OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys; (function (a) { a[a["Id"] = 0] = "Id"; a[a["Status"] = 1] = "Status"; a[a["Data"] = 2] = "Data" })(OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys || (OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys = {})); OSF.DDA.Marshaling.AppCommand.AppCommandCompletedMethodParameterKeys = OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys; var OfficeExt; (function (a) { var b; (function (c) { function b() { if (OSF.DDA.WAC) { var b = OSF.DDA.WAC.Delegate.ParameterMap; b.define({ type: OSF.DDA.MethodDispId.dispidAppCommandInvocationCompletedMethod, toHost: [{ name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.Marshaling.AppCommand.AppCommandCompletedMethodParameterKeys.Id }, { name: Microsoft.Office.WebExtension.Parameters.Status, value: OSF.DDA.Marshaling.AppCommand.AppCommandCompletedMethodParameterKeys.Status }, { name: Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData, value: OSF.DDA.Marshaling.AppCommand.AppCommandCompletedMethodParameterKeys.Data }] }); b.define({ type: OSF.DDA.EventDispId.dispidAppCommandInvokedEvent, fromHost: [{ name: OSF.DDA.EventDescriptors.AppCommandInvokedEvent, value: b.self }] }); b.addComplexType(OSF.DDA.EventDescriptors.AppCommandInvokedEvent); b.define({ type: OSF.DDA.EventDescriptors.AppCommandInvokedEvent, fromHost: [{ name: a.AppCommand.AppCommandInvokedEventEnums.AppCommandId, value: OSF.DDA.Marshaling.AppCommand.AppCommandInvokedEventKeys.AppCommandId }, { name: a.AppCommand.AppCommandInvokedEventEnums.CallbackName, value: OSF.DDA.Marshaling.AppCommand.AppCommandInvokedEventKeys.CallbackName }, { name: a.AppCommand.AppCommandInvokedEventEnums.EventObjStr, value: OSF.DDA.Marshaling.AppCommand.AppCommandInvokedEventKeys.EventObjStr }] }) } } c.registerDdaFacade = b })(b = a.AppCommand || (a.AppCommand = {})) })(OfficeExt || (OfficeExt = {})); OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType, { Image: "image" }); OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { DocumentSelectionChanged: "documentSelectionChanged" }); OSF.DDA.DocumentSelectionChangedEventArgs = function (a) { OSF.OUtil.defineEnumerableProperties(this, { type: { value: Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged }, document: { value: a } }) }; OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent }); OSF.DialogShownStatus = { hasDialogShown: false, isWindowDialog: false }; OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { DialogMessageReceivedEvent: "DialogMessageReceivedEvent" }); OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { DialogMessageReceived: "dialogMessageReceived", DialogEventReceived: "dialogEventReceived" }); OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors, { MessageType: "messageType", MessageContent: "messageContent" }); OSF.DDA.DialogEventType = {}; OSF.OUtil.augmentList(OSF.DDA.DialogEventType, { DialogClosed: "dialogClosed", NavigationFailed: "naviationFailed" }); OSF.DDA.AsyncMethodNames.addNames({ DisplayDialogAsync: "displayDialogAsync", CloseAsync: "close" }); OSF.DDA.SyncMethodNames.addNames({ MessageParent: "messageParent", AddMessageHandler: "addEventHandler", SendMessage: "sendMessage" }); OSF.DDA.UI.ParentUI = function () { var c = new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived, Microsoft.Office.WebExtension.EventType.DialogEventReceived, Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]), b = OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName, a = this; !a[b] && OSF.OUtil.defineEnumerableProperty(a, b, { value: function () { var b = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog]; b(arguments, c, a) } }); OSF.OUtil.finalizeProperties(this) }; OSF.DDA.UI.ChildUI = function (d) { var b = OSF.DDA.SyncMethodNames.MessageParent.displayName, a = this; !a[b] && OSF.OUtil.defineEnumerableProperty(a, b, { value: function () { var b = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent]; return b(arguments, a) } }); var c = OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; !a[c] && typeof OSF.DialogParentMessageEventDispatch != "undefined" && OSF.DDA.DispIdHost.addEventSupport(a, OSF.DialogParentMessageEventDispatch, d); OSF.OUtil.finalizeProperties(this) }; OSF.DialogHandler = function () { }; OSF.DDA.DialogEventArgs = function (a) { if (a[OSF.DDA.PropertyDescriptors.MessageType] == OSF.DialogMessageType.DialogMessageReceived) OSF.OUtil.defineEnumerableProperties(this, { type: { value: Microsoft.Office.WebExtension.EventType.DialogMessageReceived }, message: { value: a[OSF.DDA.PropertyDescriptors.MessageContent] } }); else OSF.OUtil.defineEnumerableProperties(this, { type: { value: Microsoft.Office.WebExtension.EventType.DialogEventReceived }, error: { value: a[OSF.DDA.PropertyDescriptors.MessageType] } }) }; OSF.DDA.DialogParentEventArgs = function (a) { OSF.OUtil.defineEnumerableProperties(this, { type: { value: Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived }, message: { value: a[OSF.DDA.PropertyDescriptors.MessageContent] } }) }; OSF.DDA.AsyncMethodCalls.define({ method: OSF.DDA.AsyncMethodNames.DisplayDialogAsync, requiredArguments: [{ name: Microsoft.Office.WebExtension.Parameters.Url, types: ["string"] }], supportedOptions: [{ name: Microsoft.Office.WebExtension.Parameters.Width, value: { types: ["number"], defaultValue: 99 } }, { name: Microsoft.Office.WebExtension.Parameters.Height, value: { types: ["number"], defaultValue: 99 } }, { name: Microsoft.Office.WebExtension.Parameters.RequireHTTPs, value: { types: ["boolean"], defaultValue: true } }, { name: Microsoft.Office.WebExtension.Parameters.DisplayInIframe, value: { types: ["boolean"], defaultValue: false } }], privateStateCallbacks: [], onSucceeded: function (c) { var g = c[Microsoft.Office.WebExtension.Parameters.Id], b = c[Microsoft.Office.WebExtension.Parameters.Data], a = new OSF.DialogHandler, d = OSF.DDA.AsyncMethodNames.CloseAsync.displayName; OSF.OUtil.defineEnumerableProperty(a, d, { value: function () { var c = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog]; c(arguments, g, b, a) } }); var f = OSF.DDA.SyncMethodNames.AddMessageHandler.displayName; OSF.OUtil.defineEnumerableProperty(a, f, { value: function () { var d = OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id], c = d.verifyAndExtractCall(arguments, a, b), e = c[Microsoft.Office.WebExtension.Parameters.EventType], f = c[Microsoft.Office.WebExtension.Parameters.Handler]; return b.addEventHandlerAndFireQueuedEvent(e, f) } }); var e = OSF.DDA.SyncMethodNames.SendMessage.displayName; OSF.OUtil.defineEnumerableProperty(a, e, { value: function () { var c = OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage]; return c(arguments, b, a) } }); return a }, checkCallArgs: function (a) { if (a[Microsoft.Office.WebExtension.Parameters.Width] <= 0) a[Microsoft.Office.WebExtension.Parameters.Width] = 1; if (a[Microsoft.Office.WebExtension.Parameters.Width] > 100) a[Microsoft.Office.WebExtension.Parameters.Width] = 99; if (a[Microsoft.Office.WebExtension.Parameters.Height] <= 0) a[Microsoft.Office.WebExtension.Parameters.Height] = 1; if (a[Microsoft.Office.WebExtension.Parameters.Height] > 100) a[Microsoft.Office.WebExtension.Parameters.Height] = 99; if (!a[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) a[Microsoft.Office.WebExtension.Parameters.RequireHTTPs] = true; return a } }); OSF.DDA.AsyncMethodCalls.define({ method: OSF.DDA.AsyncMethodNames.CloseAsync, requiredArguments: [], supportedOptions: [], privateStateCallbacks: [] }); OSF.DDA.SyncMethodCalls.define({ method: OSF.DDA.SyncMethodNames.MessageParent, requiredArguments: [{ name: Microsoft.Office.WebExtension.Parameters.MessageToParent, types: ["string", "number", "boolean"] }], supportedOptions: [] }); OSF.DDA.SyncMethodCalls.define({ method: OSF.DDA.SyncMethodNames.AddMessageHandler, requiredArguments: [{ name: Microsoft.Office.WebExtension.Parameters.EventType, "enum": Microsoft.Office.WebExtension.EventType, verify: function (b, c, a) { return a.supportsEvent(b) } }, { name: Microsoft.Office.WebExtension.Parameters.Handler, types: ["function"] }], supportedOptions: [] }); OSF.DDA.SyncMethodCalls.define({ method: OSF.DDA.SyncMethodNames.SendMessage, requiredArguments: [{ name: Microsoft.Office.WebExtension.Parameters.MessageContent, types: ["string"] }], supportedOptions: [], privateStateCallbacks: [] }); OSF.OUtil.setNamespace("Marshaling", OSF.DDA); OSF.OUtil.setNamespace("Dialog", OSF.DDA.Marshaling); OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys = { MessageType: "messageType", MessageContent: "messageContent" }; OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys = { MessageType: "messageType", MessageContent: "messageContent" }; OSF.DDA.Marshaling.MessageParentKeys = { MessageToParent: "messageToParent" }; OSF.DDA.Marshaling.DialogNotificationShownEventType = { DialogNotificationShown: "dialogNotificationShown" }; OSF.DDA.Marshaling.SendMessageKeys = { MessageContent: "messageContent" }; var OfficeExt; (function (a) { var b; (function (c) { var a = { Excel: "excel", Word: "word", PowerPoint: "powerpoint", Outlook: "outlook" }; function d(c) { switch (c) { case a.Excel: case a.Word: case a.PowerPoint: case a.Outlook: return new b; default: return new b } return null } c.getDialogCssManager = d; var b = function () { var a = ";"; function b() { var f = "height: 100px", b = "font-size: 14px", a = "font-family: Segoe UI,Arial,Verdana,sans-serif", e = "margin: 20px 14px", d = "width: 100%", c = "position: absolute", g = this; g.overlayElementCSS = [c, "top: 0", "left: 0", d, "height: 100%", "background-color: rgba(198, 198, 198, 0.5)", "z-index: 99998"]; g.dialogNotificationPanelCSS = [d, "height: 190px", c, "z-index: 99999", "background-color: rgba(255, 255, 255, 1)", "left: 0px", "top: 50%", "margin-top: -95px"]; g.newWindowNotificationTextPanelCSS = [e, a, b, f, "line-height: 100px"]; g.newWindowNotificationTextSpanCSS = ["display: inline-block", "line-height: normal", "vertical-align: middle"]; g.crossZoneNotificationTextPanelCSS = [e, a, b, f]; g.dialogNotificationButtonPanelCSS = "margin:0px 9px"; g.buttonStyleCSS = ["text-align: center", "width: 70px", "height: 25px", b, a, "margin: 0px 5px", "border-width: 1px", "border-style: solid"] } b.prototype.getOverlayElementCSS = function () { return this.overlayElementCSS.join(a) }; b.prototype.getDialogNotificationPanelCSS = function () { return this.dialogNotificationPanelCSS.join(a) }; b.prototype.getNewWindowNotificationTextPanelCSS = function () { return this.newWindowNotificationTextPanelCSS.join(a) }; b.prototype.getNewWindowNotificationTextSpanCSS = function () { return this.newWindowNotificationTextSpanCSS.join(a) }; b.prototype.getCrossZoneNotificationTextPanelCSS = function () { return this.crossZoneNotificationTextPanelCSS.join(a) }; b.prototype.getDialogNotificationButtonPanelCSS = function () { return this.dialogNotificationButtonPanelCSS }; b.prototype.getDialogButtonCSS = function () { return this.buttonStyleCSS.join(a) }; return b }(); c.DefaultDialogCSSManager = b })(b = a.WacCommonUICssManager || (a.WacCommonUICssManager = {})) })(OfficeExt || (OfficeExt = {})); var OfficeExt; (function (a) { var b; (function (b) { var c; (function (j) { var d = "div", e = "string", f = "message", g = "keydown", c = false, b = null, i = b, y = b, l = b, h = b, H = "osfDialogInternal:action=closeDialog", k = b, u = c, q = -1, o = b, C = "#ababab", A = "#ffffff", J = "#ccc", D = "newWindowNotificaiton", P = "crossZoneNotification", v = "configureBrowserLink", r = "dialogNotificationTextPanel", m = { dispId: OSF.DDA.EventDispId.dispidDialogNotificationShownInAddinEvent, eventType: OSF.DDA.Marshaling.DialogNotificationShownEventType.DialogNotificationShown, onComplete: b }; function Q(c) { var a = c.input; if (a != b) o = { HostButtonBorderColor: a[OSF.HostThemeButtonStyleKeys.ButtonBorderColor], HostButtonBackgroundColor: a[OSF.HostThemeButtonStyleKeys.ButtonBackgroundColor] }; c.completed() } j.setHostThemeButtonStyle = Q; function L(a) { OSF._OfficeAppFactory.getInitializationHelper().addOrRemoveEventListenersForWindow(c); a.completed() } j.removeEventListenersForDialog = L; function R(x) { try { u = c; var i = c, v = OSF._OfficeAppFactory.getInitializationHelper()._hostInfo, e = a.WacCommonUICssManager.getDialogCssManager(v.hostType), r = OSF.OUtil.formatString(Strings.OfficeOM.L_ShowWindowDialogNotification, OSF._OfficeAppFactory.getInitializationHelper()._appContext._addinName); l = F(e); document.body.insertBefore(l, document.body.firstChild); h = O(e, r); h.id = D; var f = G(e), d = w(e, Strings.OfficeOM.L_ShowWindowDialogNotificationAllow), b = w(e, Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore); f.appendChild(d); f.appendChild(b); h.appendChild(f); document.body.insertBefore(h, document.body.firstChild); d.onclick = function () { V(x); !u && n() }; function j() { function a(a) { p(); E(a); k(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore) } m.onComplete = a; OSF.DDA.WAC.Delegate.unregisterEventAsync(m) } b.onclick = j; d.addEventListener(g, function (a) { if (a.shiftKey && a.keyCode == 9) { s(d); t(b); b.focus(); a.preventDefault(); a.stopPropagation() } }, c); b.addEventListener(g, function (a) { if (!a.shiftKey && a.keyCode == 9) { s(b); t(d); d.focus(); a.preventDefault(); a.stopPropagation() } else if (a.keyCode == 13) { i = true; a.preventDefault(); a.stopPropagation() } }, c); b.addEventListener("keyup", function (a) { if (a.keyCode == 13 && i) { i = c; j(); a.preventDefault(); a.stopPropagation() } }, c); window.focus(); function q() { d.focus() } m.onComplete = q; OSF.DDA.WAC.Delegate.registerEventAsync(m) } catch (o) { OSF.AppTelemetry && OSF.AppTelemetry.logAppException("Exception happens at new window dialog." + o); k(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError) } } j.handleNewWindowDialog = R; function T(d) { try { if (i != b) { var a = OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains; if (a) for (var c = 0; c < a.length && a[c].indexOf("://") !== -1; c++) i.postMessage(H, a[c]); i != b && !i.closed && i.close(); window.removeEventListener(f, x); window.clearInterval(q); i = b; d(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) } else d(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError) } catch (e) { OSF.AppTelemetry && OSF.AppTelemetry.logAppException("Exception happens at close window dialog." + e); d(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError) } } j.closeDialog = T; function S(d) { var c = d.hostCallArgs[Microsoft.Office.WebExtension.Parameters.MessageToParent], a = OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains; if (a) for (var b = 0; b < a.length && a[b].indexOf("://") !== -1; b++) window.opener.postMessage(c, a[b]) } j.messageParent = S; function U(f) { if (i != b) { var c = f.hostCallArgs, a = OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains; if (a) for (var d = 0; d < a.length && a[d].indexOf("://") !== -1; d++) { if (typeof c != e) c = JSON.stringify(c); i.postMessage(c, a[d]) } } } j.sendMessage = U; function N() { function a(c) { if (c.source == window.opener) if (typeof c.data === e && c.data.indexOf(H) > -1) window.close(); else { var a = c.data, d = typeof a; if (a && (d == "object" || d == e)) { if (d == e) a = JSON.parse(a); var f = OSF.DDA.OMFactory.manufactureEventArgs(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived, b, a); OSF.DialogParentMessageEventDispatch.fireEvent(f) } } } window.addEventListener(f, a) } j.registerMessageReceivedEvent = N; function K(a, b) { y = a; k = b } j.setHandlerAndShowDialogCallback = K; function M() { try { h && h.id == D && k && k(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore) } catch (a) { OSF.AppTelemetry && OSF.AppTelemetry.logAppException("Error happened during executing displayDialogAsync callback." + a) } n() } j.escDismissDialogNotification = M; function B(i, j) { var e = c, d = a.WacCommonUICssManager.getDialogCssManager(j); l = F(d); document.body.insertBefore(l, document.body.firstChild); h = I(d, i); h.id = P; var f = G(d), b = w(d, Strings.OfficeOM.L_DialogOK ? Strings.OfficeOM.L_DialogOK : "OK"); f.appendChild(b); h.appendChild(f); document.body.insertBefore(h, document.body.firstChild); u = true; b.onclick = function () { n() }; b.addEventListener(g, function (a) { if (a.keyCode == 9) { document.getElementById(v).focus(); a.preventDefault(); a.stopPropagation() } else if (a.keyCode == 13) { e = true; a.preventDefault(); a.stopPropagation() } }, c); b.addEventListener("keyup", function (a) { if (a.keyCode == 13 && e) { e = c; n(); a.preventDefault(); a.stopPropagation() } }, c); document.getElementById(v).addEventListener(g, function (a) { if (a.keyCode == 9) { b.focus(); a.preventDefault(); a.stopPropagation() } }, c); window.focus(); b.focus() } j.showCrossZoneNotification = B; function x(b) { if (b.source == i) try { var a = {}; a[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType] = OSF.DialogMessageType.DialogMessageReceived; a[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent] = b.data; y(a) } catch (c) { OSF.AppTelemetry && OSF.AppTelemetry.logAppException("Error happened during receive message handler." + c) } } function V(g) { var c = OSF._OfficeAppFactory.getInitializationHelper()._hostInfo, o = [c.hostType, c.hostPlatform, c.hostSpecificFileVersion, c.hostLocale, c.osfControlAppCorrelationId, "isDialog"], j = o.join("|"), d = OSF._OfficeAppFactory.getInitializationHelper()._appContext, e = g[OSF.ShowWindowDialogParameterKeys.Url]; e = a.WACUtils.addHostInfoAsQueryParam(e, j); var h = JSON.parse(window.name); h[OSF.WindowNameItemKeys.HostInfo] = j; h[OSF.WindowNameItemKeys.AppContext] = d; var m = g[OSF.ShowWindowDialogParameterKeys.Width] * d._clientWindowWidth / 100, l = g[OSF.ShowWindowDialogParameterKeys.Height] * d._clientWindowHeight / 100, s = d._clientWindowWidth / 2 - m / 2, t = d._clientWindowHeight / 2 - l / 2, r = "width=" + m + ", height=" + l + ", left=" + s + ", top=" + t + ",channelmode=no,directories=no,fullscreen=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=yes,toolbar=no"; i = window.open(e, a.WACUtils.serializeObjectToString(h), r); if (i == b) { OSF.AppTelemetry.logAppCommonMessage("Encountered cross zone issue in displayDialogAsync api."); p(); B(e, c.hostType); k(OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone); return } window.addEventListener(f, x); function n() { try { if (i == b || i.closed) { window.clearInterval(q); window.removeEventListener(f, x); var a = {}; a[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType] = OSF.DialogMessageType.DialogClosed; y(a) } } catch (c) { OSF.AppTelemetry && OSF.AppTelemetry.logAppException("Error happened during check or handle window close." + c) } } q = window.setInterval(n, 1e3); if (k != b) k(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); else OSF.AppTelemetry && OSF.AppTelemetry.logAppException("showDialogCallback can not be null.") } function w(d, e) { var a = document.createElement("input"); a.setAttribute("type", "button"); a.style.cssText = d.getDialogButtonCSS(); a.style.borderColor = C; a.style.backgroundColor = A; a.setAttribute("value", e); var c = function () { t(a) }, b = function () { s(a) }; a.addEventListener("mouseover", c); a.addEventListener("focus", c); a.addEventListener("mouseout", b); a.addEventListener("focusout", b); return a } function t(a) { if (o != b) { a.style.borderColor = o.HostButtonBorderColor; a.style.backgroundColor = o.HostButtonBackgroundColor } else if (OSF.CommonUI && OSF.CommonUI.HostButtonBorderColor && OSF.CommonUI.HostButtonBackgroundColor) { a.style.borderColor = OSF.CommonUI.HostButtonBorderColor; a.style.backgroundColor = OSF.CommonUI.HostButtonBackgroundColor } else a.style.backgroundColor = J } function s(a) { a.style.borderColor = C; a.style.backgroundColor = A } function n() { function a(a) { p(); E(a) } m.onComplete = a; OSF.DDA.WAC.Delegate.unregisterEventAsync(m) } function p() { if (h != b) { document.body.removeChild(h); h = b } if (l != b) { document.body.removeChild(l); l = b } } function F(b) { var a = document.createElement(d); a.style.cssText = b.getOverlayElementCSS(); return a } function O(e, f) { var b = document.createElement(d); b.style.cssText = e.getDialogNotificationPanelCSS(); z(b); var a = document.createElement(d); a.style.cssText = e.getNewWindowNotificationTextPanelCSS(); a.id = r; if (document.documentElement.getAttribute("dir") == "rtl") a.style.paddingRight = "30px"; else a.style.paddingLeft = "30px"; var c = document.createElement("span"); c.style.cssText = e.getNewWindowNotificationTextSpanCSS(); c.innerText = f; a.appendChild(c); b.appendChild(a); return b } function G(b) { var a = document.createElement(d); a.style.cssText = b.getDialogNotificationButtonPanelCSS(); if (document.documentElement.getAttribute("dir") == "rtl") a.style.cssFloat = "left"; else a.style.cssFloat = "right"; return a } function E(a) { if (a != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { var b = document.querySelectorAll(OSF._OfficeAppFactory.getInitializationHelper()._tabbableElements); OSF.OUtil.focusToFirstTabbable(b, c) } } function I(g, h) { var e = document.createElement(d); e.style.cssText = g.getDialogNotificationPanelCSS(); z(e); var c = document.createElement(d); c.style.cssText = g.getCrossZoneNotificationTextPanelCSS(); c.id = r; var b = document.createElement("a"); b.id = v; b.href = "#"; b.innerText = Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink; b.setAttribute("onclick", "window.open('https://support.microsoft.com/en-us/help/17479/windows-internet-explorer-11-change-security-privacy-settings', '_blank', 'fullscreen=1')"); var f = document.createElement("span"); if (Strings.OfficeOM.L_NewWindowCrossZone) f.innerHTML = OSF.OUtil.formatString(Strings.OfficeOM.L_NewWindowCrossZone, b.outerHTML, a.WACUtils.getDomainForUrl(h)); c.appendChild(f); e.appendChild(c); return e } function z(a) { a.setAttribute("role", "dialog"); a.setAttribute("aria-describedby", r) } })(c = b.Dialog || (b.Dialog = {})) })(b = a.AddinNativeAction || (a.AddinNativeAction = {})) })(OfficeExt || (OfficeExt = {})); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent, fromHost: [{ name: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, value: OSF.DDA.WAC.Delegate.ParameterMap.self }] }); OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogMessageReceivedEvent); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent, fromHost: [{ name: OSF.DDA.PropertyDescriptors.MessageType, value: OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType }, { name: OSF.DDA.PropertyDescriptors.MessageContent, value: OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent, fromHost: [{ name: OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent, value: OSF.DDA.WAC.Delegate.ParameterMap.self }] }); OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent, fromHost: [{ name: OSF.DDA.PropertyDescriptors.MessageType, value: OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageType }, { name: OSF.DDA.PropertyDescriptors.MessageContent, value: OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageContent }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.MethodDispId.dispidMessageParentMethod, toHost: [{ name: Microsoft.Office.WebExtension.Parameters.MessageToParent, value: OSF.DDA.Marshaling.MessageParentKeys.MessageToParent }] }); OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.MethodDispId.dispidSendMessageMethod, toHost: [{ name: Microsoft.Office.WebExtension.Parameters.MessageContent, value: OSF.DDA.Marshaling.SendMessageKeys.MessageContent }] }); OSF.DDA.WAC.Delegate.openDialog = function (a) { var e = "https://", f = "http://", c = JSON.parse(a.targetId), g = OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(true, a); function b(b) { var a = { Error: b }; g(Microsoft.Office.Common.InvokeResultCode.noError, a) } if (OSF.DialogShownStatus.hasDialogShown) { b(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened); return } var d = c[OSF.ShowWindowDialogParameterKeys.Url].toLowerCase(); if (d == null || !(d.substr(0, e.length) === e)) { if (d.substr(0, f.length) === f) b(OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS); else b(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme); return } if (!c[OSF.ShowWindowDialogParameterKeys.DisplayInIframe]) { OSF.DialogShownStatus.isWindowDialog = true; OfficeExt.AddinNativeAction.Dialog.setHandlerAndShowDialogCallback(function (b) { a.onEvent && a.onEvent(b); OSF.AppTelemetry && OSF.AppTelemetry.onEventDone(a.dispId) }, b); OfficeExt.AddinNativeAction.Dialog.handleNewWindowDialog(c) } else { OSF.DialogShownStatus.isWindowDialog = false; OSF.DDA.WAC.Delegate.registerEventAsync(a) } }; OSF.DDA.WAC.Delegate.messageParent = function (a) { if (window.opener != null) OfficeExt.AddinNativeAction.Dialog.messageParent(a); else OSF.DDA.WAC.Delegate.executeAsync(a) }; OSF.DDA.WAC.Delegate.sendMessage = function (a) { if (OSF.DialogShownStatus.hasDialogShown) if (OSF.DialogShownStatus.isWindowDialog) OfficeExt.AddinNativeAction.Dialog.sendMessage(a); else OSF.DDA.WAC.Delegate.executeAsync(a) }; OSF.DDA.WAC.Delegate.closeDialog = function (a) { var c = OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(false, a); function b(b) { var a = { Error: b }; c(Microsoft.Office.Common.InvokeResultCode.noError, a) } if (!OSF.DialogShownStatus.hasDialogShown) b(OSF.DDA.ErrorCodeManager.errorCodes.ooeWebDialogClosed); else if (OSF.DialogShownStatus.isWindowDialog) { a.onCalling && a.onCalling(); OfficeExt.AddinNativeAction.Dialog.closeDialog(b) } else OSF.DDA.WAC.Delegate.unregisterEventAsync(a) }; OSF.InitializationHelper.prototype.dismissDialogNotification = function () { OfficeExt.AddinNativeAction.Dialog.escDismissDialogNotification() }; OSF.InitializationHelper.prototype.registerMessageReceivedEventForWindowDialog = function () { OfficeExt.AddinNativeAction.Dialog.registerMessageReceivedEvent() }; var OfficeExt; (function (a) { var b; (function (b) { var c; (function (d) { var e = function () { function a() { } return a }(); function b(g, i) { var a = "undefined", f = function () { return typeof Html2canvas !== a && typeof Html2canvas.html2canvas !== a }, c = function () { return typeof window.Promise !== a || typeof OfficeExtension !== a && typeof OfficeExtension.Promise !== a }; if (f() && c()) { g(); return } var b = new ScriptLoading.LoadScriptHelper, d = b.getOfficeJsBasePath(), e = { html2canvasJs: "Html2canvas.js", promiseJs: "es6-promise.js" }, h = function () { if (f() && c()) g(); else i() }; if (!c()) b.loadScript(d + e.promiseJs, null, function () { b.loadScript(d + e.html2canvasJs, null, h) }); else b.loadScript(d + e.html2canvasJs, null, h) } function c(c) { if (!a.WACUtils.isHostTrusted || !a.WACUtils.isHostTrusted()) c.completed(); else { var d = function () { c.completed() }, f = function (b) { var a = "image/png"; try { c.result = b.toDataURL(a).replace(a, "image/octet-stream") } catch (d) { } c.completed() }, e = function () { try { Html2canvas.html2canvas(document.body, { onrendered: f }) } catch (a) { d() } }; b(e, d) } } d.generateLatestSnapshot = c })(c = b.Snapshot || (b.Snapshot = {})) })(b = a.AddinNativeAction || (a.AddinNativeAction = {})) })(OfficeExt || (OfficeExt = {})); var OSFPPTWAC; (function (b) { var a = function () { function a(b, c) { var a = this; OSF.DDA.DispIdHost.addEventSupport(a, new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.ActiveViewChanged, Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged])); OSF.DDA.PowerPointDocument.uber.constructor.call(a, b, c); OSF.DDA.DispIdHost.addAsyncMethods(a, [OSF.DDA.AsyncMethodNames.GetSelectedDataAsync, OSF.DDA.AsyncMethodNames.SetSelectedDataAsync, OSF.DDA.AsyncMethodNames.GoToByIdAsync, OSF.DDA.AsyncMethodNames.GetActiveViewAsync, OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync, OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync, OSF.DDA.SyncMethodNames.MessageParent]); OSF.OUtil.finalizeProperties(a) } return a }(); b.PowerPointDocument = a })(OSFPPTWAC || (OSFPPTWAC = {})); OSF.DDA.PowerPointDocument = OSFPPTWAC.PowerPointDocument; OSF.OUtil.extend(OSF.DDA.PowerPointDocument, OSF.DDA.Document); OSF.OUtil.redefineList(Microsoft.Office.WebExtension.GoToType, { Slide: "slide", Index: "index" }); OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM = function (a, b) { OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM); a.doc = new OSF.DDA.PowerPointDocument(a, this._initializeSettings(a, true)); b() }; OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize = function (a) { OSF.WebApp._UpdateLinksForHostAndXdmInfo(); var e = new OSF.DDA.License(a.get_eToken()); this.initWebDialog(a); OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(a, a.doc, e)); var b; OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.WAC.getDelegateMethods, OSF.DDA.WAC.Delegate.ParameterMap)); b = function (b, d) { if (b == 0 && d != true) OSF.getClientEndPoint().registerForEvent("activationCompleted", function () { var b = a.get_reason(); Microsoft.Office.WebExtension.initialize(b) }, null, { controlId: OSF._OfficeAppFactory.getId(), eventDispId: OSF.DDA.EventDispId.dispidActivationStatusChangedEvent, targetId: "" }); else { var c = a.get_reason(); Microsoft.Office.WebExtension.initialize(c) } }; if (OSF.getClientEndPoint()) OSF.getClientEndPoint().invoke("getActivationCompletedStatus", b, this._webAppState.id); else if (a.get_isDialog()) { var f = a.get_reason(); Microsoft.Office.WebExtension.initialize(f); return } var d = new OSF.DDA.Theming.InternalThemeHandler; d.InitializeAndChangeOnce(); var c = OfficeExt.AppCommand.AppCommandManager.instance(); c.initializeAndChangeOnce() } \ No newline at end of file +var __extends=this&&this.__extends||function(b,a){for(var c in a)if(a.hasOwnProperty(c))b[c]=a[c];function d(){this.constructor=b}b.prototype=a===null?Object.create(a):(d.prototype=a.prototype,new d)},OfficeExt;(function(b){var a=function(){var a=true;function b(){}b.prototype.isMsAjaxLoaded=function(){var b="function",c="undefined";if(typeof Sys!==c&&typeof Type!==c&&Sys.StringBuilder&&typeof Sys.StringBuilder===b&&Type.registerNamespace&&typeof Type.registerNamespace===b&&Type.registerClass&&typeof Type.registerClass===b&&typeof Function._validateParams===b&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===b)return a;else return false};b.prototype.loadMsAjaxFull=function(b){var a=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(a,b)};Object.defineProperty(b.prototype,"msAjaxError",{"get":function(){var a=this;if(a._msAjaxError==null&&a.isMsAjaxLoaded())a._msAjaxError=Error;return a._msAjaxError},"set":function(a){this._msAjaxError=a},enumerable:a,configurable:a});Object.defineProperty(b.prototype,"msAjaxString",{"get":function(){var a=this;if(a._msAjaxString==null&&a.isMsAjaxLoaded())a._msAjaxString=String;return a._msAjaxString},"set":function(a){this._msAjaxString=a},enumerable:a,configurable:a});Object.defineProperty(b.prototype,"msAjaxDebug",{"get":function(){var a=this;if(a._msAjaxDebug==null&&a.isMsAjaxLoaded())a._msAjaxDebug=Sys.Debug;return a._msAjaxDebug},"set":function(a){this._msAjaxDebug=a},enumerable:a,configurable:a});return b}();b.MicrosoftAjaxFactory=a})(OfficeExt||(OfficeExt={}));var OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory,OSF=OSF||{},OfficeExt;(function(b){var a=function(){function a(a){this._internalStorage=a}a.prototype.getItem=function(a){try{return this._internalStorage&&this._internalStorage.getItem(a)}catch(b){return null}};a.prototype.setItem=function(b,a){try{this._internalStorage&&this._internalStorage.setItem(b,a)}catch(c){}};a.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(a){}};a.prototype.removeItem=function(a){try{this._internalStorage&&this._internalStorage.removeItem(a)}catch(b){}};a.prototype.getKeysWithPrefix=function(d){var b=[];try{for(var e=this._internalStorage&&this._internalStorage.length||0,a=0;a0)b.push(a);else a.tabIndex===0&&c.push(a);else c.push(a)}b=b.sort(function(d,c){var a=d.tabIndex-c.tabIndex;if(a===0)a=b.indexOf(d)-b.indexOf(c);return a});return [].concat(b,c)}return {set_entropy:function(a){if(typeof a=="string")for(var b=0;b6&&a.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&a.slice(c)===OSF.DDA.SettingsManager.DataJSONSuffix){b=new Date(parseInt(a.slice(5,c)));if(b)return b}return a});else a=Sys.Serialization.JavaScriptSerializer.deserialize(a,b);f[e]=a}catch(g){}}return f},loadScript:function(f,g,h){if(f&&g){var k=window.document,c=s[f];if(!c){var e=k.createElement("script");e.type="text/javascript";c={loaded:d,pendingCallbacks:[g],timer:a};s[f]=c;var i=function(){if(c.timer!=a){clearTimeout(c.timer);delete c.timer}c.loaded=b;for(var e=c.pendingCallbacks.length,d=0;d1?f[f.length-1]:a;if(k&&b!=a){if(b.indexOf(v)>=0)b=b.split(v)[0];b=decodeURIComponent(b)}var d=q();if(!i&&d){var e=window.name.indexOf(j);if(e>c){var g=window.name.indexOf(";",e);if(g==c)g=window.name.length;var h=window.name.substring(e,g);if(b)d.setItem(h,b);else b=d.getItem(h)}}return b},getConversationId:function(){var c=window.location.search,b=a;if(c){var d=c.indexOf("&");b=d>0?c.substring(1,d):c.substr(1);if(b&&b.charAt(b.length-1)==="="){b=b.substring(0,b.length-1);if(b)b=decodeURIComponent(b)}}return b},getInfoItems:function(b){var a=b.split("$");if(typeof a[1]==i)a=b.split("|");if(typeof a[1]==i)a=b.split("%7C");return a},getXdmFieldValue:function(f,d){var b=e,c=OSF.OUtil.parseXdmInfo(d);if(c){var a=OSF.OUtil.getInfoItems(c);if(a!=undefined&&a.length>=3)switch(f){case OSF.XdmFieldName.ConversationUrl:b=a[2];break;case OSF.XdmFieldName.AppId:b=a[1]}}return b},validateParamObject:function(f,e){var a=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:d},{name:"expectedProperties",type:Object,mayBeNull:d},{name:"callback",type:Function,mayBeNull:b}]);if(a)throw a;for(var c in e){a=Function._validateParameter(f[c],e[c],c);if(a)throw a}},writeProfilerMark:function(a){if(window.msWriteProfilerMark){window.msWriteProfilerMark(a);OsfMsAjaxFactory.msAjaxDebug.trace(a)}},outputDebug:function(a){typeof OsfMsAjaxFactory!==i&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(a)},defineNondefaultProperty:function(e,f,a,c){a=a||{};for(var g in c){var d=c[g];if(a[d]==undefined)a[d]=b}Object.defineProperty(e,f,a);return e},defineNondefaultProperties:function(c,a,d){a=a||{};for(var b in a)OSF.OUtil.defineNondefaultProperty(c,b,a[b],d);return c},defineEnumerableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[f])},defineEnumerableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[f])},defineMutableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[m,f,n])},defineMutableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[m,f,n])},finalizeProperties:function(e,c){c=c||{};for(var g=Object.getOwnPropertyNames(e),i=g.length,f=0;f>8;g=h&255;b[a++]=d>>2;b[a++]=(d&3)<<4|f>>4;b[a++]=(f&15)<<2|g>>6;b[a++]=g&63;if(!isNaN(h)){d=h>>8;f=j&255;g=j>>8;b[a++]=d>>2;b[a++]=(d&3)<<4|f>>4;b[a++]=(f&15)<<2|g>>6;b[a++]=g&63}if(isNaN(h))b[a-1]=64;else if(isNaN(j)){b[a-2]=64;b[a-1]=64}for(var l=0;l0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(b){if(b==a)return a;else if(!(b instanceof Object))return b;else if(Array.isArray(b)){for(var e=[],d=0;dd)return c;else if(a===0&&b)return c;else if(a===d-1&&!b)return c;if(b)return a-1;else return a+1};e=u(e);g=j?e.length-1:0;if(e.length===0)return a;while(!i&&g>=0&&gd)return c;else if(a===0&&b)return c;else if(a===d-1&&!b)return c;if(b)return a-1;else return a+1};f=u(f);k=n(f,o);e=j(f.length,k,m);if(e<0)return a;while(!i&&e>=0&&e0;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[d%16];d=Math.floor(d/16)}for(;b<32;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[Math.floor(Math.random()*16)]}return c}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3};OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611,WordAndroid:8388613,PowerpointAndroid:8388614};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(y,u,p,n,r,v,q,t,x,j,w,l,k,m,h,g,f,e,i,c,d,s,o,b){var a=this;a._id=y;a._appName=u;a._appVersion=p;a._appUILocale=n;a._dataLocale=r;a._docUrl=v;a._clientMode=q;a._settings=t;a._reason=x;a._osfControlType=j;a._eToken=w;a._correlationId=l;a._appInstanceId=k;a._touchEnabled=m;a._commerceAllowed=h;a._appMinorVersion=g;a._requirementMatrix=f;a._hostCustomMessage=e;a._hostFullVersion=i;a._isDialog=false;a._clientWindowHeight=c;a._clientWindowWidth=d;a._addinName=s;a._appDomains=o;a._dialogRequirementMatrix=b;a.get_id=function(){return this._id};a.get_appName=function(){return this._appName};a.get_appVersion=function(){return this._appVersion};a.get_appUILocale=function(){return this._appUILocale};a.get_dataLocale=function(){return this._dataLocale};a.get_docUrl=function(){return this._docUrl};a.get_clientMode=function(){return this._clientMode};a.get_bindings=function(){return this._bindings};a.get_settings=function(){return this._settings};a.get_reason=function(){return this._reason};a.get_osfControlType=function(){return this._osfControlType};a.get_eToken=function(){return this._eToken};a.get_correlationId=function(){return this._correlationId};a.get_appInstanceId=function(){return this._appInstanceId};a.get_touchEnabled=function(){return this._touchEnabled};a.get_commerceAllowed=function(){return this._commerceAllowed};a.get_appMinorVersion=function(){return this._appMinorVersion};a.get_requirementMatrix=function(){return this._requirementMatrix};a.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};a.get_hostCustomMessage=function(){return this._hostCustomMessage};a.get_hostFullVersion=function(){return this._hostFullVersion};a.get_isDialog=function(){return this._isDialog};a.get_clientWindowHeight=function(){return this._clientWindowHeight};a.get_clientWindowWidth=function(){return this._clientWindowWidth};a.get_addinName=function(){return this._addinName};a.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",Reserved:"reserved",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData",Base64:"base64"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(b,a){if(a==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||a==Microsoft.Office.WebExtension.EventType.BindingDataChanged||a==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||a==Microsoft.Office.WebExtension.EventType.DataNodeInserted||a==Microsoft.Office.WebExtension.EventType.DataNodeReplaced)return b+"_"+a;else return a};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidOpenBrowserWindow:102,dispidCreateDocumentMethod:105,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var a={};return {getErrorArgs:function(c){var b=a[c];if(!b)b=a[this.errorCodes.ooeInternalError];else{if(!b.name)b.name=a[this.errorCodes.ooeInternalError].name;if(!b.message)b.message=a[this.errorCodes.ooeInternalError].message}return b},addErrorMessage:function(c,b){a[c]=b},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11000,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12000,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13000,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010},initializeErrorMessages:function(b){a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:b.L_DataReadError,message:b.L_GetSelectionNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotMatchBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:b.L_DataReadError,message:b.L_InvalidGetRowColumnCounts};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:b.L_DataReadError,message:b.L_SelectionNotSupportCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:b.L_DataReadError,message:b.L_InvalidGetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:b.L_DataReadError,message:b.L_NonUniformPartialGetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:b.L_DataReadError,message:b.L_GetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:b.L_DataReadError,message:b.L_FileTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:b.L_DataReadError,message:b.L_GetDataParametersConflict};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:b.L_DataReadError,message:b.L_InvalidGetColumns};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:b.L_DataReadError,message:b.L_InvalidGetRows};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:b.L_DataReadError,message:b.L_InvalidReadForBlankRow};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:b.L_DataWriteError,message:b.L_UnsupportedDataObject};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:b.L_DataWriteError,message:b.L_CannotWriteToSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:b.L_DataWriteError,message:b.L_DataNotMatchSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:b.L_DataWriteError,message:b.L_OverwriteWorksheetData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:b.L_DataWriteError,message:b.L_DataNotMatchBindingSize};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:b.L_DataWriteError,message:b.L_InvalidSetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:b.L_InvalidFormat,message:b.L_InvalidDataFormat};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:b.L_DataWriteError,message:b.L_SetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:b.L_DataWriteError,message:b.L_NonUniformPartialSetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:b.L_DataWriteError,message:b.L_InvalidSetColumns};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:b.L_DataWriteError,message:b.L_InvalidSetRows};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:b.L_DataWriteError,message:b.L_SetDataParametersConflict};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:b.L_BindingCreationError,message:b.L_SelectionCannotBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:b.L_InvalidBindingError,message:b.L_BindingNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:b.L_BindingCreationError,message:b.L_BindingToMultipleSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidSelectionForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnThisBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:b.L_BindingCreationError,message:b.L_NamedItemNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:b.L_BindingCreationError,message:b.L_MultipleNamedItemFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidNamedItemForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:b.L_InvalidBinding,message:b.L_UnknownBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnMatrixData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:b.L_InvalidBinding,message:b.L_InvalidColumnsForBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:b.L_ReadSettingsError,message:b.L_SettingNameNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:b.L_SaveSettingsError,message:b.L_SettingsCannotSave};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:b.L_SettingsStaleError,message:b.L_SettingsAreStale};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:b.L_HostError,message:b.L_OperationNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:b.L_InternalError,message:b.L_InternalErrorDescription};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:b.L_PermissionDenied,message:b.L_DocumentReadOnly};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:b.L_EventRegistrationError,message:b.L_EventHandlerNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:b.L_InvalidAPICall,message:b.L_InvalidApiCallInContext};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:b.L_ShuttingDown,message:b.L_ShuttingDown};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:b.L_UnsupportedEnumeration,message:b.L_UnsupportedEnumerationMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:b.L_APINotSupported,message:b.L_BrowserAPINotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:b.L_APICallFailed,message:b.L_RequestTimeout};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:b.L_InvalidOrTimedOutSession,message:b.L_InvalidOrTimedOutSessionMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:b.L_APICallFailed,message:b.L_TooManyIncompleteRequests};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:b.L_APICallFailed,message:b.L_RequestTokenUnavailable};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:b.L_APICallFailed,message:b.L_ActivityLimitReached};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:b.L_APICallFailed,message:b.L_InvalidApiArgumentsMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:b.L_InvalidNode,message:b.L_CustomXmlNodeNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:b.L_CustomXmlError,message:b.L_CustomXmlError};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:b.L_CustomXmlExceedQuotaName,message:b.L_CustomXmlExceedQuotaMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:b.L_CustomXmlOutOfDateName,message:b.L_CustomXmlOutOfDateMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:b.L_CannotNavigateTo,message:b.L_CannotNavigateTo};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:b.L_SpecifiedIdNotExist,message:b.L_SpecifiedIdNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:b.L_NavOutOfBound,message:b.L_NavOutOfBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:b.L_DataWriteReminder,message:b.L_CellDataAmountBeyondLimits};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:b.L_MissingParameter,message:b.L_ElementMissing};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:b.L_InvalidValue,message:b.L_InvalidCellsValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:b.L_InvalidValue,message:b.L_InvalidTableOptionValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:b.L_InvalidValue,message:b.L_InvalidFormatValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_RowIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_ColIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:b.L_OutOfRange,message:b.L_FormatValueOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:b.L_FormattingReminder,message:b.L_CellFormatAmountBeyondLimits};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:b.L_MemoryLimit,message:b.L_CloseFileBeforeRetrieve};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:b.L_NetworkProblem,message:b.L_NetworkProblemRetrieveFile};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:b.L_InvalidValue,message:b.L_SliceSizeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:b.L_DisplayDialogError,message:b.L_DialogAlreadyOpened};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:b.L_DisplayDialogError,message:b.L_NetworkProblem};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:b.L_DialogNavigateError,message:b.L_DialogInvalidScheme};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:b.L_DisplayDialogError,message:b.L_DialogAddressNotTrusted};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:b.L_DisplayDialogError,message:b.L_DialogRequireHTTPS};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:b.L_DisplayDialogError,message:b.L_UserClickIgnore};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:b.L_DisplayDialogError,message:b.L_NewWindowCrossZoneErrorString};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:b.L_APINotSupported,message:b.L_InvalidSSOAddinMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:b.L_UserNotSignedIn,message:b.L_UserNotSignedIn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:b.L_UserAborted,message:b.L_UserAbortedMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:b.L_UnsupportedUserIdentity,message:b.L_UnsupportedUserIdentityMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:b.L_InvalidResourceUrl,message:b.L_InvalidResourceUrlMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:b.L_InvalidGrant,message:b.L_InvalidGrantMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:b.L_SSOClientError,message:b.L_SSOClientErrorMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:b.L_SSOServerError,message:b.L_SSOServerErrorMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:b.L_AddinIsAlreadyRequestingToken,message:b.L_AddinIsAlreadyRequestingTokenMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:b.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:b.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:b.L_SSOConnectionLostError,message:b.L_SSOConnectionLostErrorMessage}}}}();var OfficeExt;(function(a){var b;(function(b){var a=1.1,z=function(){function a(){}return a}();b.RequirementVersion=z;var d=function(){function a(b){var a=this;a.isSetSupported=function(d,b){if(d==undefined)return false;if(b==undefined)b=0;var f=this._setMap,e=f._sets;if(e.hasOwnProperty(d.toLowerCase())){var g=e[d.toLowerCase()];try{var a=this._getVersion(g);b=b+"";var c=this._getVersion(b);if(a.major>0&&a.major>c.major)return true;if(a.minor>0&&a.minor>0&&a.major==c.major&&a.minor>=c.minor)return true}catch(h){return false}}return false};a._getVersion=function(e){var a="version format incorrect",b=e.split("."),c=0,d=0;if(b.length<2&&isNaN(Number(e)))throw a;else{c=Number(b[0]);if(b.length>=2)d=Number(b[1]);if(isNaN(c)||isNaN(d))throw a}var f={minor:d,major:c};return f};a._setMap=b;a.isSetSupported=a.isSetSupported.bind(a)}return a}();b.RequirementMatrix=d;var c=function(){function a(a){this._addSetMap=function(a){for(var b in a)this._sets[b]=a[b]};this._sets=a}return a}();b.DefaultSetRequirement=c;var x=function(c){__extends(b,c);function b(){c.call(this,{dialogapi:a})}return b}(c);b.DefaultDialogSetRequirement=x;var f=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,excelapi:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a})}return b}(c);b.ExcelClientDefaultSetRequirement=f;var k=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({imagecoercion:a})}return b}(f);b.ExcelClientV1DefaultSetRequirement=k;var l=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.3})}return a}(c);b.OutlookClientDefaultSetRequirement=l;var h=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,compressedfile:a,customxmlparts:a,documentevents:a,file:a,htmlcoercion:a,matrixbindings:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,textfile:a,wordapi:a})}return b}(c);b.WordClientDefaultSetRequirement=h;var p=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:a})}return b}(h);b.WordClientV1DefaultSetRequirement=p;var e=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,compressedfile:a,documentevents:a,file:a,pdffile:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.PowerpointClientDefaultSetRequirement=e;var j=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({imagecoercion:a})}return b}(e);b.PowerpointClientV1DefaultSetRequirement=j;var o=function(c){__extends(b,c);function b(){c.call(this,{selection:a,textcoercion:a})}return b}(c);b.ProjectClientDefaultSetRequirement=o;var u=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,file:a})}return b}(c);b.ExcelWebDefaultSetRequirement=u;var w=function(c){__extends(b,c);function b(){c.call(this,{compressedfile:a,documentevents:a,file:a,imagecoercion:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablecoercion:a,textcoercion:a,textfile:a})}return b}(c);b.WordWebDefaultSetRequirement=w;var n=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,settings:a})}return b}(c);b.PowerpointWebDefaultSetRequirement=n;var g=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.3})}return a}(c);b.OutlookWebDefaultSetRequirement=g;var v=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,documentevents:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.SwayWebDefaultSetRequirement=v;var r=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,partialtablebindings:a,settings:a,tablebindings:a,tablecoercion:a})}return b}(c);b.AccessWebDefaultSetRequirement=r;var t=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a})}return b}(c);b.ExcelIOSDefaultSetRequirement=t;var i=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,compressedfile:a,customxmlparts:a,documentevents:a,file:a,htmlcoercion:a,matrixbindings:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,textfile:a})}return b}(c);b.WordIOSDefaultSetRequirement=i;var s=function(b){__extends(a,b);function a(){b.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return a}(i);b.WordIOSV1DefaultSetRequirement=s;var m=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,compressedfile:a,documentevents:a,file:a,pdffile:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.PowerpointIOSDefaultSetRequirement=m;var q=function(c){__extends(b,c);function b(){c.call(this,{mailbox:a})}return b}(c);b.OutlookIOSDefaultSetRequirement=q;var y=function(){var b="undefined";function a(){}a.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)};a.getDefaultRequirementMatrix=function(f){this.initializeDefaultSetMatrix();var e=undefined,g=f.get_requirementMatrix();if(g!=undefined&&g.length>0&&typeof JSON!==b){var i=JSON.parse(f.get_requirementMatrix().toLowerCase());e=new d(new c(i))}else{var h=a.getClientFullVersionString(f);if(a.DefaultSetArrayMatrix!=undefined&&a.DefaultSetArrayMatrix[h]!=undefined)e=new d(a.DefaultSetArrayMatrix[h]);else e=new d(new c({}))}return e};a.getDefaultDialogRequirementMatrix=function(f){var a=undefined,e=f.get_dialogRequirementMatrix();if(e!=undefined&&e.length>0&&typeof JSON!==b){var g=JSON.parse(f.get_requirementMatrix().toLowerCase());a=new d(new c(g))}else a=new d(new x);return a};a.getClientFullVersionString=function(a){var d=a.get_appMinorVersion(),e="",b="",c=a.get_appName(),f=c==1024||c==4096||c==8192||c==65536;if(f&&a.get_appVersion()==1)if(c==4096&&d>=15)b="16.00.01";else b="16.00";else if(a.get_appName()==64)b=a.get_appVersion();else{if(d<10)e="0"+d;else e=""+d;b=a.get_appVersion()+"."+e}return a.get_appName()+"-"+b};a.initializeDefaultSetMatrix=function(){a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1600]=new f;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1600]=new h;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1600]=new e;a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1601]=new k;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1601]=new p;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1601]=new j;a.DefaultSetArrayMatrix[a.Outlook_RCLIENT_1600]=new l;a.DefaultSetArrayMatrix[a.Excel_WAC_1600]=new u;a.DefaultSetArrayMatrix[a.Word_WAC_1600]=new w;a.DefaultSetArrayMatrix[a.Outlook_WAC_1600]=new g;a.DefaultSetArrayMatrix[a.Outlook_WAC_1601]=new g;a.DefaultSetArrayMatrix[a.Project_RCLIENT_1600]=new o;a.DefaultSetArrayMatrix[a.Access_WAC_1600]=new r;a.DefaultSetArrayMatrix[a.PowerPoint_WAC_1600]=new n;a.DefaultSetArrayMatrix[a.Excel_IOS_1600]=new t;a.DefaultSetArrayMatrix[a.SWAY_WAC_1600]=new v;a.DefaultSetArrayMatrix[a.Word_IOS_1600]=new i;a.DefaultSetArrayMatrix[a.Word_IOS_16001]=new s;a.DefaultSetArrayMatrix[a.PowerPoint_IOS_1600]=new m;a.DefaultSetArrayMatrix[a.Outlook_IOS_1600]=new q};a.Excel_RCLIENT_1600="1-16.00";a.Excel_RCLIENT_1601="1-16.01";a.Word_RCLIENT_1600="2-16.00";a.Word_RCLIENT_1601="2-16.01";a.PowerPoint_RCLIENT_1600="4-16.00";a.PowerPoint_RCLIENT_1601="4-16.01";a.Outlook_RCLIENT_1600="8-16.00";a.Excel_WAC_1600="16-16.00";a.Word_WAC_1600="32-16.00";a.Outlook_WAC_1600="64-16.00";a.Outlook_WAC_1601="64-16.01";a.Project_RCLIENT_1600="128-16.00";a.Access_WAC_1600="256-16.00";a.PowerPoint_WAC_1600="512-16.00";a.Excel_IOS_1600="1024-16.00";a.SWAY_WAC_1600="2048-16.00";a.Word_IOS_1600="4096-16.00";a.Word_IOS_16001="4096-16.00.01";a.PowerPoint_IOS_1600="8192-16.00";a.Outlook_IOS_1600="65536-16.00";a.DefaultSetArrayMatrix={};return a}();b.RequirementsMatrixFactory=y})(b=a.Requirement||(a.Requirement={}))})(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda();var OfficeExt;(function(a){var b;(function(a){var b=function(){function a(){var a=this;a.getDiagnostics=function(b){var a={host:this.getHost(),version:b||this.getDefaultVersion(),platform:this.getPlatform()};return a};a.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};a.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};a.hostInfo=OSF._OfficeAppFactory.getHostInfo();a.getHost=a.getHost.bind(a);a.getPlatform=a.getPlatform.bind(a);a.getDiagnostics=a.getDiagnostics.bind(a)}a.prototype.capitalizeFirstLetter=function(a){if(a)return a[0].toUpperCase()+a.slice(1).toLowerCase();return a};a.getInstance=function(){if(a.hostObj===undefined)a.hostObj=new a;return a.hostObj};a.prototype.getPlatform=function(){var a=this;if(a.hostInfo.hostPlatform){var b=a.hostInfo.hostPlatform.toLowerCase();if(a.platformRemappings[b])return a.platformRemappings[b]}return null};a.prototype.getHost=function(){var a=this;if(a.hostInfo.hostType){var b=a.hostInfo.hostType.toLowerCase();if(a.camelCaseMappings[b])return a.camelCaseMappings[b];b=a.capitalizeFirstLetter(a.hostInfo.hostType);if(Microsoft.Office.WebExtension.HostType[b])return Microsoft.Office.WebExtension.HostType[b]}return null};a.prototype.getDefaultVersion=function(){if(this.getHost())return "16.0.0000.0000";return null};return a}();a.Host=b})(b=a.HostName||(a.HostName={}))})(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var b,a=false;return {enableShortcut:function(){if(!a){if(window.Office)b=window.Office;else OSF.OUtil.setNamespace("Office",window);window.Office=Microsoft.Office.WebExtension;a=true}},disableShortcut:function(){if(a){if(b)window.Office=b;else OSF.OUtil.unsetNamespace("Office",window);a=false}}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(a){if(a)OSF.NamespaceManager.enableShortcut();else OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(a,b){var c;if(a&&typeof a=="string"){var d=a.indexOf("#");if(d!=-1){var h=a.substring(0,d),g=a.substring(d+1);switch(h){case "binding":case "bindings":if(g)c=new OSF.DDA.BindingPromise(g)}}}if(!c){if(b){var e=typeof b;if(e=="function"){var f={};f[Microsoft.Office.WebExtension.Parameters.Callback]=b;OSF.DDA.issueAsyncResult(f,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,e)}}else{c.onFail=b;return c}};OSF.DDA.Context=function(a,g,h,c,d){var f="requirements",b=this;OSF.OUtil.defineEnumerableProperties(b,{contentLanguage:{value:a.get_dataLocale()},displayLanguage:{value:a.get_appUILocale()},touchEnabled:{value:a.get_touchEnabled()},commerceAllowed:{value:a.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(a.get_hostFullVersion())}});h&&OSF.OUtil.defineEnumerableProperty(b,"license",{value:h});a.ui&&OSF.OUtil.defineEnumerableProperty(b,"ui",{value:a.ui});a.auth&&OSF.OUtil.defineEnumerableProperty(b,"auth",{value:a.auth});a.application&&OSF.OUtil.defineEnumerableProperty(b,"application",{value:a.application});if(a.get_isDialog()){var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,f,{value:e})}else{g&&OSF.OUtil.defineEnumerableProperty(b,"document",{value:g});if(c){var i=c.displayName||"appOM";delete c.displayName;OSF.OUtil.defineEnumerableProperty(b,i,{value:c})}d&&OSF.OUtil.defineEnumerableProperty(b,"officeTheme",{"get":function(){return d()}});var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,f,{value:e})}};OSF.DDA.OutlookContext=function(c,a,d,e,b){OSF.DDA.OutlookContext.uber.constructor.call(this,c,null,d,e,b);a&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:a})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Application=function(){};OSF.DDA.Document=function(b,c){var a;switch(b.get_clientMode()){case OSF.ClientMode.ReadOnly:a=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:a=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}c&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:c});OSF.OUtil.defineMutableProperties(this,{mode:{value:a},url:{value:b.get_docUrl()}})};OSF.DDA.JsomDocument=function(d,b,e){var a=this;OSF.DDA.JsomDocument.uber.constructor.call(a,d,e);b&&OSF.OUtil.defineEnumerableProperty(a,"bindings",{"get":function(){return b}});var c=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(a,[c.GetSelectedDataAsync,c.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(a,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{"get":function(){var a;if(OSF&&OSF._OfficeAppFactory)a=OSF._OfficeAppFactory.getContext();return a}});OSF.DDA.License=function(a){OSF.OUtil.defineEnumerableProperty(this,"value",{value:a})};OSF.DDA.ApiMethodCall=function(c,f,e,g,h){var a=this,d=c.length,b=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,h)});a.verifyArguments=function(d,f){for(var e in d){var a=d[e],c=f[e];if(a["enum"])switch(typeof c){case "string":if(OSF.OUtil.listContainsValue(a["enum"],c))break;case "undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw b()}if(a["types"])if(!OSF.OUtil.listContainsValue(a["types"],typeof c))throw b()}};a.extractRequiredArguments=function(g,l,j){if(g.lengthc+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var d,f,i=h.length-1;i>=c;i--){var g=h[i];switch(typeof g){case "object":if(d)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else d=g;break;case a:if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else f=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}d=b.fillOptions(d,j,l,k);if(f)if(d[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else d[Microsoft.Office.WebExtension.Parameters.Callback]=f;b.verifyArguments(e,d);return d}this.verifyAndExtractCall=function(e,c,a){var d=b.extractRequiredArguments(e,c,a),g=h(e,d,c,a),f=b.constructCallArgs(d,g,c,a);return f};this.processResponse=function(c,b,e,d){var a;if(c==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)if(f)a=f(b,e,d);else a=b;else if(g)a=g(c,b);else a=OSF.DDA.ErrorCodeManager.getErrorArgs(c);return a};this.getCallArgs=function(g){for(var b,d,f=g.length-1;f>=c;f--){var e=g[f];switch(typeof e){case "object":b=e;break;case a:d=e}}b=b||{};if(d)b[Microsoft.Office.WebExtension.Parameters.Callback]=d;return b}};OSF.DDA.AsyncMethodCallFactory=function(){return {manufacture:function(a){var c=a.supportedOptions?OSF.OUtil.createObject(a.supportedOptions):[],b=a.privateStateCallbacks?OSF.OUtil.createObject(a.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(a.requiredArguments||[],c,b,a.onSucceeded,a.onFailed,a.checkCallArgs,a.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(a){OSF.DDA.AsyncMethodCalls[a.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(a)};OSF.DDA.Error=function(c,a,b){OSF.OUtil.defineEnumerableProperties(this,{name:{value:c},message:{value:a},code:{value:b}})};OSF.DDA.AsyncResult=function(b,a){OSF.OUtil.defineEnumerableProperties(this,{value:{value:b[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:a?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});b[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:b[OSF.DDA.AsyncResultEnum.Properties.Context]});a&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(a[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(d,f,a){var e=d[Microsoft.Office.WebExtension.Parameters.Callback];if(e){var c={};c[OSF.DDA.AsyncResultEnum.Properties.Context]=d[Microsoft.Office.WebExtension.Parameters.AsyncContext];var b;if(f==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)c[OSF.DDA.AsyncResultEnum.Properties.Value]=a;else{b={};a=a||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);b[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=f||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=a.name||a;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=a.message||a}e(new OSF.DDA.AsyncResult(c,b))}};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(b){for(var a in b){var c={};OSF.OUtil.defineEnumerableProperties(c,{id:{value:a},displayName:{value:b[a]}});OSF.DDA.SyncMethodNames[a]=c}};OSF.DDA.SyncMethodCall=function(b,c,f,g,h){var d=b.length,a=new OSF.DDA.ApiMethodCall(b,c,f,g,h);function e(e,h,j,i){if(e.length>d+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var b,k,f=e.length-1;f>=d;f--){var g=e[f];switch(typeof g){case "object":if(b)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else b=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}b=a.fillOptions(b,h,j,i);a.verifyArguments(c,b);return b}this.verifyAndExtractCall=function(f,c,b){var d=a.extractRequiredArguments(f,c,b),h=e(f,d,c,b),g=a.constructCallArgs(d,h,c,b);return g}};OSF.DDA.SyncMethodCallFactory=function(){return {manufacture:function(a){var b=a.supportedOptions?OSF.OUtil.createObject(a.supportedOptions):[];return new OSF.DDA.SyncMethodCall(a.requiredArguments||[],b,a.privateStateCallbacks,a.checkCallArgs,a.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(a){OSF.DDA.SyncMethodCalls[a.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(a)};OSF.DDA.ListType=function(){var a={};return {setListType:function(c,b){a[c]=b},isListType:function(b){return OSF.OUtil.listContainsKey(a,b)},getDescriptor:function(b){return a[b]}}}();OSF.DDA.HostParameterMap=function(b,c){var j="fromHost",a=this,i="toHost",e=j,l="sourceData",g="self",d={};d[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(a){if(a!=null&&a.rows!==undefined){var b={};b[OSF.DDA.TableDataProperties.TableRows]=a.rows;b[OSF.DDA.TableDataProperties.TableHeaders]=a.headers;a=b}return a},fromHost:function(a){return a}};d[Microsoft.Office.WebExtension.Parameters.SampleData]=d[Microsoft.Office.WebExtension.Parameters.Data];function f(j,i){var m=j?{}:undefined;for(var h in j){var g=j[h],a;if(OSF.DDA.ListType.isListType(h)){a=[];for(var n in g)a.push(f(g[n],i))}else if(OSF.OUtil.listContainsKey(d,h))a=d[h][i](g);else if(i==e&&b.preserveNesting(h))a=f(g,i);else{var k=c[h];if(k){var l=k[i];if(l){a=l[g];if(a===undefined)a=g}}else a=g}m[h]=a}return m}function k(j,h){var e;for(var a in h){var d;if(b.isComplexType(a))d=k(j,c[a][i]);else d=j[a];if(d!=undefined){if(!e)e={};var f=h[a];if(f==g)f=a;e[f]=b.pack(a,d)}}return e}function h(j,n,f){if(!f)f={};for(var a in n){var k=n[a],d;if(k==g)d=j;else if(k==l){f[a]=j.toArray();continue}else d=j[k];if(d===null||d===undefined)f[a]=undefined;else{d=b.unpack(a,d);var i;if(b.isComplexType(a)){i=c[a][e];if(b.preserveNesting(a))f[a]=h(d,i);else h(d,i,f)}else if(OSF.DDA.ListType.isListType(a)){i={};var p=OSF.DDA.ListType.getDescriptor(a);i[p]=g;var m=new Array(d.length);for(var o in d)m[o]=h(d[o],i);f[a]=m}else f[a]=d}}return f}function m(l,e,a){var d=c[l][a],b;if(a=="toHost"){var i=f(e,a);b=k(i,d)}else if(a==j){var g=h(e,d);b=f(g,a)}return b}if(!c)c={};a.addMapping=function(l,h){var a,d;if(h.map){a=h.map;d={};for(var j in a){var k=a[j];if(k==g)k=j;d[k]=j}}else{a=h.toHost;d=h.fromHost}var b=c[l];if(b){var f=b[i];for(var n in f)a[n]=f[n];f=b[e];for(var m in f)d[m]=f[m]}else b=c[l]={};b[i]=a;b[e]=d};a.toHost=function(b,a){return m(b,a,i)};a.fromHost=function(a,b){return m(a,b,e)};a.self=g;a.sourceData=l;a.addComplexType=function(a){b.addComplexType(a)};a.getDynamicType=function(a){return b.getDynamicType(a)};a.setDynamicType=function(c,a){b.setDynamicType(c,a)};a.dynamicTypes=d;a.doMapValues=function(a,b){return f(a,b)}};OSF.DDA.SpecialProcessor=function(c,b){var a=this;a.addComplexType=function(a){c.push(a)};a.getDynamicType=function(a){return b[a]};a.setDynamicType=function(c,a){b[c]=a};a.isComplexType=function(a){return OSF.OUtil.listContainsValue(c,a)};a.isDynamicType=function(a){return OSF.OUtil.listContainsKey(b,a)};a.preserveNesting=function(b){var a=[];OSF.DDA.PropertyDescriptors&&a.push(OSF.DDA.PropertyDescriptors.Subset);if(OSF.DDA.DataNodeEventProperties)a=a.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]);return OSF.OUtil.listContainsValue(a,b)};a.pack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].toHost(d);else a=d;return a};a.unpack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].fromHost(d);else a=d;return a}};OSF.DDA.getDecoratedParameterMap=function(d,c){var a=new OSF.DDA.HostParameterMap(d),f=a.self;function b(a){var c=null;if(a){c={};for(var d=a.length,b=0;b1)a=c+j+e;else if(g.length>0)a=c+f+k+e;if(h)return [a,d,h].join("");else return a}a.addHostInfoAsQueryParam=e;function g(b){if(!b)return null;var a=document.createElement("a");a.href=b;return a.protocol+"//"+a.host}a.getDomainForUrl=g;function c(){try{for(var c=["Windows NT 6.1","Windows NT 6.2","Windows NT 6.3"],e=window.navigator.userAgent,a=0,f=c.length;a-1)return b();return false}catch(d){OsfMsAjaxFactory.msAjaxDebug.trace("Error happens in shouldUseLocalStorageToPassMessage: "+d);return false}}a.shouldUseLocalStorageToPassMessage=c;function b(){try{var a=window.navigator.userAgent;return a.indexOf("MSIE ")>-1||a.indexOf("Trident/")>-1||a.indexOf("Edge/")>-1}catch(b){OsfMsAjaxFactory.msAjaxDebug.trace("Error happens in isInternetExplorer: "+b);return false}}a.isInternetExplorer=b})(b=a.WACUtils||(a.WACUtils={}))})(OfficeExt||(OfficeExt={}));var OfficeExt;(function(g){var c="\n",d=true,a=null,b="undefined",j=function(){function c(){}c.isInstanceOfType=function(f,e){if(typeof e===b||e===a)return false;if(e instanceof f)return d;var c=e.constructor;if(!c||typeof c!=="function"||!c.__typeName||c.__typeName==="Object")c=Object;return !!(c===f)||c.__typeName&&f.__typeName&&c.__typeName===f.__typeName};return c}();g.MsAjaxTypeHelper=j;var h=function(){var e="Parameter name: {0}";function d(){}d.create=function(c,b){var a=new Error(c);a.message=c;if(b)for(var d in b)a[d]=b[d];a.popStackFrame();return a};d.parameterCount=function(a){var c="Sys.ParameterCountException: "+(a?a:"Parameter count mismatch."),b=d.create(c,{name:"Sys.ParameterCountException"});b.popStackFrame();return b};d.argument=function(a,g){var b="Sys.ArgumentException: "+(g?g:"Value does not fall within the expected range.");if(a)b+=c+f.format(e,a);var h=d.create(b,{name:"Sys.ArgumentException",paramName:a});h.popStackFrame();return h};d.argumentNull=function(a,g){var b="Sys.ArgumentNullException: "+(g?g:"Value cannot be null.");if(a)b+=c+f.format(e,a);var h=d.create(b,{name:"Sys.ArgumentNullException",paramName:a});h.popStackFrame();return h};d.argumentOutOfRange=function(i,g,j){var h="Sys.ArgumentOutOfRangeException: "+(j?j:"Specified argument was out of the range of valid values.");if(i)h+=c+f.format(e,i);if(typeof g!==b&&g!==a)h+=c+f.format("Actual value was {0}.",g);var k=d.create(h,{name:"Sys.ArgumentOutOfRangeException",paramName:i,actualValue:g});k.popStackFrame();return k};d.argumentType=function(h,g,b,i){var a="Sys.ArgumentTypeException: ";if(i)a+=i;else if(g&&b)a+=f.format("Object of type '{0}' cannot be converted to type '{1}'.",g.getName?g.getName():g,b.getName?b.getName():b);else a+="Object cannot be converted to the required type.";if(h)a+=c+f.format(e,h);var j=d.create(a,{name:"Sys.ArgumentTypeException",paramName:h,actualType:g,expectedType:b});j.popStackFrame();return j};d.argumentUndefined=function(a,g){var b="Sys.ArgumentUndefinedException: "+(g?g:"Value cannot be undefined.");if(a)b+=c+f.format(e,a);var h=d.create(b,{name:"Sys.ArgumentUndefinedException",paramName:a});h.popStackFrame();return h};d.invalidOperation=function(a){var c="Sys.InvalidOperationException: "+(a?a:"Operation is not valid due to the current state of the object."),b=d.create(c,{name:"Sys.InvalidOperationException"});b.popStackFrame();return b};return d}();g.MsAjaxError=h;var f=function(){function a(){}a.format=function(c){for(var b=[],a=1;a0){for(var d=[],c=0;c=f)break;c=Function._validateParameter(i[d],h,j);if(c){c.popStackFrame();return c}}return a};if(!Function._validateParameterCount)Function._validateParameterCount=function(m,f,l){var b,e,c=f.length,g=m.length;if(gc){e=d;for(b=0;b0){var b=o.shift();r(b)}else{clearInterval(g);g=a}}else OsfMsAjaxFactory.msAjaxDebug.trace(k)}function r(a){i=a.getInvokeBlockingFlag();a.invoke();n=(new Date).getTime()}function A(){if(h){var c,f=0,j=new Date,e;for(var i in d){c=d[i];for(var g in c._callbackList){var b=c._callbackList[g];e=b.timeout?b.timeout:s;if(e>=0&&Math.abs(j.getTime()-b.createdOn)>=e)try{b.callback&&b.callback(Microsoft.Office.Common.InvokeResultCode.errorHandlingMethodCallTimedout,a)}finally{delete c._callbackList[g]}else f++}}if(f===0){clearInterval(h);h=a}}else OsfMsAjaxFactory.msAjaxDebug.trace(k)}function z(){i=b}function C(a){if(window.addEventListener)window.addEventListener("message",a,b);else if(navigator.userAgent.indexOf("MSIE")>-1&&window.attachEvent)window.attachEvent("onmessage",a);else{OsfMsAjaxFactory.msAjaxDebug.trace("Browser doesn't support the required API.");throw OsfMsAjaxFactory.msAjaxError.argument("Browser")}}function F(e,f){var g=b;if(e===c)return c;if(!e||!f||!e.length||!f.length)return g;var d,a;d=document.createElement("a");a=document.createElement("a");d.href=e;a.href=f;g=v(d,a);delete d,a;return g}function m(a,g){var c=b;if(!g||!g.length||!a||!(a instanceof Array)||!a.length)return c;var f=document.createElement("a"),e=document.createElement("a");f.href=g;for(var d=0;dq)&&!i){r(G);A=b}else g=setInterval(D,q);A&&E(G)}catch(k){h&&h._onHandleRequestError&&h._onHandleRequestError(d,k);var C=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequest;if(k==l)C=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied;var K=new Microsoft.Office.Common.Response(d._actionName,d._conversationId,d._correlationId,C,Microsoft.Office.Common.ResponseType.forCalling,k),J=Microsoft.Office.Common.MessagePackager.envelope(K,f),u=b;try{u=!!(e.source&&e.source.postMessage)}catch(k){}u&&e.source.postMessage(J,w)}}else if(d._messageType===Microsoft.Office.Common.MessageType.response){var j=y(d._conversationId);if(!j)return;j._serializerVersion=f;if(!F(j._targetUrl,e.origin))throw"Failed orgin check";if(d._responseType===Microsoft.Office.Common.ResponseType.forCalling){var o=j._callbackList[d._correlationId];if(o)try{o.callback&&o.callback(d._errorCode,d._data)}finally{delete j._callbackList[d._correlationId]}}else{var s=j._eventHandlerList[d._actionName];s!==undefined&&s!==a&&s(d._data)}}else return}}function u(){if(!t){C(G);t=c}}return {connect:function(b,e,f,c){var a=d[b];if(!a){u();a=new Microsoft.Office.Common.ClientEndPoint(b,e,f,c);d[b]=a}return a},getClientEndPoint:function(c){var a=Function._validateParams(arguments,[{name:f,type:String,mayBeNull:b}]);if(a)throw a;return d[c]},createServiceEndPoint:function(a){u();var b=new Microsoft.Office.Common.ServiceEndPoint(a);e[a]=b;return b},getServiceEndPoint:function(c){var a=Function._validateParams(arguments,[{name:l,type:String,mayBeNull:b}]);if(a)throw a;return e[c]},deleteClientEndPoint:function(c){var a=Function._validateParams(arguments,[{name:f,type:String,mayBeNull:b}]);if(a)throw a;delete d[c]},deleteServiceEndPoint:function(c){var a=Function._validateParams(arguments,[{name:l,type:String,mayBeNull:b}]);if(a)throw a;delete e[c]},checkUrlWithAppDomains:function(a,b){return m(a,b)},_setMethodTimeout:function(a){var c=Function._validateParams(arguments,[{name:"methodTimeout",type:Number,mayBeNull:b}]);if(c)throw c;s=a<=0?p:a},_startMethodTimeoutTimer:function(){if(!h)h=setInterval(A,w)}}}();Microsoft.Office.Common.Message=function(g,h,e,f,c){var b=false,a=this,d=Function._validateParams(arguments,[{name:"messageType",type:Number,mayBeNull:b},{name:"actionName",type:String,mayBeNull:b},{name:"conversationId",type:String,mayBeNull:b},{name:"correlationId",mayBeNull:b},{name:"data",mayBeNull:true,optional:true}]);if(d)throw d;a._messageType=g;a._actionName=h;a._conversationId=e;a._correlationId=f;a._origin=window.location.href;if(typeof c=="undefined")a._data=null;else a._data=c};Microsoft.Office.Common.Message.prototype={getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getOrigin:function(){return this._origin},getData:function(){return this._data},getMessageType:function(){return this._messageType}};Microsoft.Office.Common.Request=function(c,d,a,b,e){Microsoft.Office.Common.Request.uber.constructor.call(this,Microsoft.Office.Common.MessageType.request,c,a,b,e);this._actionType=d};OSF.OUtil.extend(Microsoft.Office.Common.Request,Microsoft.Office.Common.Message);Microsoft.Office.Common.Request.prototype.getActionType=function(){return this._actionType};Microsoft.Office.Common.Response=function(d,a,b,e,c,f){Microsoft.Office.Common.Response.uber.constructor.call(this,Microsoft.Office.Common.MessageType.response,d,a,b,f);this._errorCode=e;this._responseType=c};OSF.OUtil.extend(Microsoft.Office.Common.Response,Microsoft.Office.Common.Message);Microsoft.Office.Common.Response.prototype.getErrorCode=function(){return this._errorCode};Microsoft.Office.Common.Response.prototype.getResponseType=function(){return this._responseType};Microsoft.Office.Common.MessagePackager={envelope:function(a){if(typeof a==="object")a._serializerVersion=OSF.SerializerVersion.Browser;return JSON.stringify(a)},unenvelope:function(a){return JSON.parse(a)}};Microsoft.Office.Common.ResponseSender=function(f,i,k,g,h,j,e){var c=false,a=this,d=Function._validateParams(arguments,[{name:"requesterWindow",mayBeNull:c},{name:"requesterUrl",type:String,mayBeNull:c},{name:"actionName",type:String,mayBeNull:c},{name:"conversationId",type:String,mayBeNull:c},{name:"correlationId",mayBeNull:c},{name:"responsetype",type:Number,maybeNull:c},{name:"serializerVersion",type:Number,maybeNull:true,optional:true}]);if(d)throw d;a._requesterWindow=f;a._requesterUrl=i;a._actionName=k;a._conversationId=g;a._correlationId=h;a._invokeResultCode=Microsoft.Office.Common.InvokeResultCode.noError;a._responseType=j;var b=a;a._send=function(f){try{var d=new Microsoft.Office.Common.Response(b._actionName,b._conversationId,b._correlationId,b._invokeResultCode,b._responseType,f),c=Microsoft.Office.Common.MessagePackager.envelope(d,e);b._requesterWindow.postMessage(c,b._requesterUrl)}catch(a){OsfMsAjaxFactory.msAjaxDebug.trace("ResponseSender._send error:"+a.message)}}};Microsoft.Office.Common.ResponseSender.prototype={getRequesterWindow:function(){return this._requesterWindow},getRequesterUrl:function(){return this._requesterUrl},getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getSend:function(){return this._send},setResultCode:function(a){this._invokeResultCode=a}};Microsoft.Office.Common.InvokeCompleteCallback=function(e,h,i,f,g,d,c){var b=this;Microsoft.Office.Common.InvokeCompleteCallback.uber.constructor.call(b,e,h,i,f,g,Microsoft.Office.Common.ResponseType.forCalling,c);b._postCallbackHandler=d;var a=b;b._send=function(g,b){if(b!=undefined)a._invokeResultCode=b;try{var f=new Microsoft.Office.Common.Response(a._actionName,a._conversationId,a._correlationId,a._invokeResultCode,a._responseType,g),e=Microsoft.Office.Common.MessagePackager.envelope(f,c);a._requesterWindow.postMessage(e,a._requesterUrl);a._postCallbackHandler()}catch(d){OsfMsAjaxFactory.msAjaxDebug.trace("InvokeCompleteCallback._send error:"+d.message)}}};OSF.OUtil.extend(Microsoft.Office.Common.InvokeCompleteCallback,Microsoft.Office.Common.ResponseSender);Microsoft.Office.Common.Invoker=function(i,j,e,f,h,k,g){var c=true,b=false,a=this,d=Function._validateParams(arguments,[{name:"methodObject",mayBeNull:b},{name:"paramValue",mayBeNull:c},{name:"invokeCompleteCallback",mayBeNull:b},{name:"eventHandlerProxyList",mayBeNull:c},{name:"conversationId",type:String,mayBeNull:b},{name:"eventName",type:String,mayBeNull:b},{name:"serializerVersion",type:Number,mayBeNull:c,optional:c}]);if(d)throw d;a._methodObject=i;a._param=j;a._invokeCompleteCallback=e;a._eventHandlerProxyList=f;a._conversationId=h;a._eventName=k;a._serializerVersion=g};Microsoft.Office.Common.Invoker.prototype={invoke:function(){var a=this;try{var b;switch(a._methodObject.getInvokeType()){case Microsoft.Office.Common.InvokeType.async:a._methodObject.getMethod()(a._param,a._invokeCompleteCallback.getSend());break;case Microsoft.Office.Common.InvokeType.sync:b=a._methodObject.getMethod()(a._param);a._invokeCompleteCallback.getSend()(b);break;case Microsoft.Office.Common.InvokeType.syncRegisterEvent:var d=a._createEventHandlerProxyObject(a._invokeCompleteCallback);b=a._methodObject.getMethod()(d.getSend(),a._param);a._eventHandlerProxyList[a._conversationId+a._eventName]=d.getSend();a._invokeCompleteCallback.getSend()(b);break;case Microsoft.Office.Common.InvokeType.syncUnregisterEvent:var g=a._eventHandlerProxyList[a._conversationId+a._eventName];b=a._methodObject.getMethod()(g,a._param);delete a._eventHandlerProxyList[a._conversationId+a._eventName];a._invokeCompleteCallback.getSend()(b);break;case Microsoft.Office.Common.InvokeType.asyncRegisterEvent:var c=a._createEventHandlerProxyObject(a._invokeCompleteCallback);a._methodObject.getMethod()(c.getSend(),a._invokeCompleteCallback.getSend(),a._param);a._eventHandlerProxyList[a._callerId+a._eventName]=c.getSend();break;case Microsoft.Office.Common.InvokeType.asyncUnregisterEvent:var f=a._eventHandlerProxyList[a._callerId+a._eventName];a._methodObject.getMethod()(f,a._invokeCompleteCallback.getSend(),a._param);delete a._eventHandlerProxyList[a._callerId+a._eventName]}}catch(e){a._invokeCompleteCallback.setResultCode(Microsoft.Office.Common.InvokeResultCode.errorInResponse);a._invokeCompleteCallback.getSend()(e)}},getInvokeBlockingFlag:function(){return this._methodObject.getBlockingFlag()},_createEventHandlerProxyObject:function(a){return new Microsoft.Office.Common.ResponseSender(a.getRequesterWindow(),a.getRequesterUrl(),a.getActionName(),a.getConversationId(),a.getCorrelationId(),Microsoft.Office.Common.ResponseType.forEventing,this._serializerVersion)}};OSF.OUtil.setNamespace("WAC",OSF.DDA);OSF.DDA.WAC.UniqueArguments={Data:"Data",Properties:"Properties",BindingRequest:"DdaBindingsMethod",BindingResponse:"Bindings",SingleBindingResponse:"singleBindingResponse",GetData:"DdaGetBindingData",AddRowsColumns:"DdaAddRowsColumns",SetData:"DdaSetBindingData",ClearFormats:"DdaClearBindingFormats",SetFormats:"DdaSetBindingFormats",SettingsRequest:"DdaSettingsMethod",BindingEventSource:"ddaBinding",ArrayData:"ArrayData"};OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC);OSF.DDA.WAC.Delegate.SpecialProcessor=function(){var a=[OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,OSF.DDA.WAC.UniqueArguments.BindingRequest,OSF.DDA.WAC.UniqueArguments.BindingResponse,OSF.DDA.WAC.UniqueArguments.GetData,OSF.DDA.WAC.UniqueArguments.AddRowsColumns,OSF.DDA.WAC.UniqueArguments.SetData,OSF.DDA.WAC.UniqueArguments.ClearFormats,OSF.DDA.WAC.UniqueArguments.SetFormats,OSF.DDA.WAC.UniqueArguments.SettingsRequest,OSF.DDA.WAC.UniqueArguments.BindingEventSource],b={};OSF.DDA.WAC.Delegate.SpecialProcessor.uber.constructor.call(this,a,b)};OSF.OUtil.extend(OSF.DDA.WAC.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.WAC.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.WAC.Delegate.SpecialProcessor,[]);OSF.OUtil.setNamespace("WAC",OSF.DDA);OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC);OSF.DDA.WAC.getDelegateMethods=function(){var a={};a[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.WAC.Delegate.executeAsync;a[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.WAC.Delegate.registerEventAsync;a[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.WAC.Delegate.unregisterEventAsync;a[OSF.DDA.DispIdHost.Delegates.OpenDialog]=OSF.DDA.WAC.Delegate.openDialog;a[OSF.DDA.DispIdHost.Delegates.MessageParent]=OSF.DDA.WAC.Delegate.messageParent;a[OSF.DDA.DispIdHost.Delegates.SendMessage]=OSF.DDA.WAC.Delegate.sendMessage;a[OSF.DDA.DispIdHost.Delegates.CloseDialog]=OSF.DDA.WAC.Delegate.closeDialog;return a};OSF.DDA.WAC.Delegate.version=1;OSF.DDA.WAC.Delegate.executeAsync=function(a){if(!a.hostCallArgs)a.hostCallArgs={};a.hostCallArgs["DdaMethod"]={ControlId:OSF._OfficeAppFactory.getId(),Version:OSF.DDA.WAC.Delegate.version,DispatchId:a.dispId};a.hostCallArgs["__timeout__"]=-1;a.onCalling&&a.onCalling();if(!OSF.getClientEndPoint())return;OSF.getClientEndPoint().invoke("executeMethod",function(d,c){a.onReceiving&&a.onReceiving();var b;if(d==Microsoft.Office.Common.InvokeResultCode.noError){OSF.DDA.WAC.Delegate.version=c["Version"];b=c["Error"]}else switch(d){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:b=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:b=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}a.onComplete&&a.onComplete(b,c)},a.hostCallArgs)};OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent=function(c,a){var b=(new Date).getTime();return function(f,e){a.onReceiving&&a.onReceiving();var d;if(f!=Microsoft.Office.Common.InvokeResultCode.noError)switch(f){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:d=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:d=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}else if(e)if(e["Error"])d=e["Error"];else d=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess;else d=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;a.onComplete&&a.onComplete(d);OSF.AppTelemetry&&OSF.AppTelemetry.onRegisterDone(c,a.dispId,Math.abs((new Date).getTime()-b),d)}};OSF.DDA.WAC.Delegate.registerEventAsync=function(a){a.onCalling&&a.onCalling();if(!OSF.getClientEndPoint())return;OSF.getClientEndPoint().registerForEvent(OSF.DDA.getXdmEventName(a.targetId,a.eventType),function(b){a.onEvent&&a.onEvent(b);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(a.dispId)},OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(true,a),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:a.dispId,targetId:a.targetId})};OSF.DDA.WAC.Delegate.unregisterEventAsync=function(a){a.onCalling&&a.onCalling();if(!OSF.getClientEndPoint())return;OSF.getClientEndPoint().unregisterForEvent(OSF.DDA.getXdmEventName(a.targetId,a.eventType),OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(false,a),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:a.dispId,targetId:a.targetId})};OSF.OUtil.setNamespace("WebApp",OSF);OSF.WebApp.AddHostInfoAndXdmInfo=function(a){if(OSF._OfficeAppFactory.getWindowLocationSearch&&OSF._OfficeAppFactory.getWindowLocationHash)return a+OSF._OfficeAppFactory.getWindowLocationSearch()+OSF._OfficeAppFactory.getWindowLocationHash();else return a};OSF.WebApp._UpdateLinksForHostAndXdmInfo=function(){for(var b=document.querySelectorAll("a[data-officejs-navigate]"),a=0;a0?a.substr(0,d):null,c=b!==null?b.toLowerCase()==="http"||b.toLowerCase()==="https":true;c=c&&a!="#"&&a!="/"&&a!=""&&a!=OSF._OfficeAppFactory.getWebAppState().webAppUrl;return c};OSF.InitializationHelper=function(e,b,g,f,c){var a=this;a._hostInfo=e;a._webAppState=b;a._context=g;a._settings=f;a._hostFacade=c;a._appContext={};a._tabbableElements="a[href]:not([tabindex='-1']),area[href]:not([tabindex='-1']),button:not([disabled]):not([tabindex='-1']),input:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),textarea:not([disabled]):not([tabindex='-1']),*[tabindex]:not([tabindex='-1']),*[contenteditable]:not([disabled]):not([tabindex='-1'])";a._initializeSettings=function(g,f){var d,b=g.get_settings(),c=OSF.OUtil.getSessionStorage();if(c){var a=c.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey());if(a)b=JSON.parse(a);else{a=JSON.stringify(b);c.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),a)}}var e=OSF.DDA.SettingsManager.deserializeSettings(b);if(f)d=new OSF.DDA.RefreshableSettings(e);else d=new OSF.DDA.Settings(e);return d};var d=function(a){var b=window.open;a.open=function(e,d,c){var a=null;try{a=b(e,d,c)}catch(f){OSF.AppTelemetry&&OSF.AppTelemetry.logAppCommonMessage("Exception happens at windowOpen."+f)}if(!a){var g={strUrl:e,strWindowName:d,strWindowFeatures:c};OSF._OfficeAppFactory.getClientEndPoint()&&OSF._OfficeAppFactory.getClientEndPoint().invoke("ContextActivationManager_openWindowInHost",null,g)}return a}};d(window)};OSF.InitializationHelper.prototype.saveAndSetDialogInfo=function(b){var d="IsDialog",a=true,f=function(){var b=OSF.OUtil.parseXdmInfo(a);if(b){var c=b.split("|");return c[1]}return null},c=OSF.OUtil.getSessionStorage();if(c){if(!b)b=OSF.OUtil.parseHostInfoFromWindowName(a,OSF._OfficeAppFactory.getWindowName());if(b&&b.indexOf("isDialog")>-1){var e=f();e!=null&&c.setItem(e+d,"true");this._hostInfo.isDialog=a;return}this._hostInfo.isDialog=c.getItem(OSF.OUtil.getXdmFieldValue(OSF.XdmFieldName.AppId,false)+d)!=null?a:false}};OSF.InitializationHelper.prototype.getAppContext=function(g,d){var a=this,f=a,c=function(i,a){var c;if(a._appName===OSF.AppName.ExcelWebApp){var e=a._settings;c={};for(var o in e){var k=e[o];c[k[0]]=k[1]}}else c=a._settings;if(i===0&&a._id!=undefined&&a._appName!=undefined&&a._appVersion!=undefined&&a._appUILocale!=undefined&&a._dataLocale!=undefined&&a._docUrl!=undefined&&a._clientMode!=undefined&&a._settings!=undefined&&a._reason!=undefined){f._appContext=a;var m=a._appInstanceId?a._appInstanceId:a._id,n=false,l=true,h=0;if(a._appMinorVersion!=undefined)h=a._appMinorVersion;var g=undefined;if(a._requirementMatrix!=undefined)g=a._requirementMatrix;a.eToken=a.eToken?a.eToken:"";var b=new OSF.OfficeAppContext(a._id,a._appName,a._appVersion,a._appUILocale,a._dataLocale,a._docUrl,a._clientMode,c,a._reason,a._osfControlType,a._eToken,a._correlationId,m,n,l,h,g,a._hostCustomMessage,a._hostFullVersion,a._clientWindowHeight,a._clientWindowWidth,a._addinName,a._appDomains,a._dialogRequirementMatrix);b._wacHostEnvironment=a._wacHostEnvironment||"0";b._isFromWacAutomation=!!a._isFromWacAutomation;OSF.AppTelemetry&&OSF.AppTelemetry.initialize(b);d(b)}else{var j="Function ContextActivationManager_getAppContextAsync call failed. ErrorCode is "+i+", exception: "+a;OSF.AppTelemetry&&OSF.AppTelemetry.logAppException(j);throw j}};try{if(a._hostInfo.isDialog&&window.opener!=null){var e=OfficeExt.WACUtils.parseAppContextFromWindowName(false,OSF._OfficeAppFactory.getWindowName());c(0,e)}else a._webAppState.clientEndPoint.invoke("ContextActivationManager_getAppContextAsync",c,a._webAppState.id)}catch(b){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown when trying to invoke getAppContextAsync. Exception:["+b+"]");throw b}};OSF.InitializationHelper.prototype.setAgaveHostCommunication=function(){var d=null,b=false;try{var a=this,e=OSF.OUtil.parseXdmInfoWithGivenFragment(b,OSF._OfficeAppFactory.getWindowLocationHash());if(!e&&OSF._OfficeAppFactory.getWindowName)e=OSF.OUtil.parseXdmInfoFromWindowName(b,OSF._OfficeAppFactory.getWindowName());if(e){var c=OSF.OUtil.getInfoItems(e);if(c!=undefined&&c.length>=3){a._webAppState.conversationID=c[0];a._webAppState.id=c[1];a._webAppState.webAppUrl=c[2].indexOf(":")>=0?c[2]:decodeURIComponent(c[2])}}a._webAppState.wnd=window.opener!=d?window.opener:window.parent;var f=OSF.OUtil.parseSerializerVersionWithGivenFragment(b,OSF._OfficeAppFactory.getWindowLocationHash());if(isNaN(f)&&OSF._OfficeAppFactory.getWindowName)f=OSF.OUtil.parseSerializerVersionFromWindowName(b,OSF._OfficeAppFactory.getWindowName());a._webAppState.serializerVersion=f;if(this._hostInfo.isDialog&&window.opener!=d)return;a._webAppState.clientEndPoint=Microsoft.Office.Common.XdmCommunicationManager.connect(a._webAppState.conversationID,a._webAppState.wnd,a._webAppState.webAppUrl,a._webAppState.serializerVersion);a._webAppState.serviceEndPoint=Microsoft.Office.Common.XdmCommunicationManager.createServiceEndPoint(a._webAppState.id);var h=a._webAppState.conversationID+OSF.SharedConstants.NotificationConversationIdSuffix;a._webAppState.serviceEndPoint.registerConversation(h,a._webAppState.webAppUrl);var i=function(e){var c="ContextActivationManager_notifyHost";switch(e){case OSF.AgaveHostAction.Select:a._webAppState.focused=true;break;case OSF.AgaveHostAction.UnSelect:a._webAppState.focused=b;break;case OSF.AgaveHostAction.TabIn:case OSF.AgaveHostAction.CtrlF6In:window.focus();var g=document.querySelectorAll(a._tabbableElements),f=OSF.OUtil.focusToFirstTabbable(g,b);if(!f){window.blur();a._webAppState.focused=b;a._webAppState.clientEndPoint.invoke(c,d,[a._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable])}break;case OSF.AgaveHostAction.TabInShift:window.focus();var g=document.querySelectorAll(a._tabbableElements),f=OSF.OUtil.focusToFirstTabbable(g,true);if(!f){window.blur();a._webAppState.focused=b;a._webAppState.clientEndPoint.invoke(c,d,[a._webAppState.id,OSF.AgaveHostAction.ExitNoFocusableShift])}break;default:OsfMsAjaxFactory.msAjaxDebug.trace("actionId "+e+" notifyAgave is wrong.")}};a._webAppState.serviceEndPoint.registerMethod("Office_notifyAgave",i,Microsoft.Office.Common.InvokeType.async,b);a.addOrRemoveEventListenersForWindow(true)}catch(g){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown in setAgaveHostCommunication. Exception:["+g+"]");throw g}};OSF.InitializationHelper.prototype.addOrRemoveEventListenersForWindow=function(i){var h="keypress",c=null,b="ContextActivationManager_notifyHost",a=this,f=function(){if(!a._webAppState.focused)a._webAppState.focused=true;a._webAppState.clientEndPoint.invoke(b,c,[a._webAppState.id,OSF.AgaveHostAction.Select])},g=function(){if(!OSF)return;if(a._webAppState.focused)a._webAppState.focused=false;a._webAppState.clientEndPoint.invoke(b,c,[a._webAppState.id,OSF.AgaveHostAction.UnSelect])},e=function(d){d.preventDefault=d.preventDefault||function(){d.returnValue=false};if(d.keyCode==117&&(d.ctrlKey||d.metaKey)){var f=OSF.AgaveHostAction.CtrlF6Exit;if(d.shiftKey)f=OSF.AgaveHostAction.CtrlF6ExitShift;a._webAppState.clientEndPoint.invoke(b,c,[a._webAppState.id,f])}else if(d.keyCode==9){d.preventDefault();var e=document.querySelectorAll(a._tabbableElements),g=OSF.OUtil.focusToNextTabbable(e,d.target||d.srcElement,d.shiftKey);if(!g)if(a._hostInfo.isDialog)OSF.OUtil.focusToFirstTabbable(e,d.shiftKey);else if(d.shiftKey)a._webAppState.clientEndPoint.invoke(b,c,[a._webAppState.id,OSF.AgaveHostAction.TabExitShift]);else a._webAppState.clientEndPoint.invoke(b,c,[a._webAppState.id,OSF.AgaveHostAction.TabExit])}else if(d.keyCode==27){d.preventDefault();a.dismissDialogNotification&&a.dismissDialogNotification();a._webAppState.clientEndPoint.invoke(b,c,[a._webAppState.id,OSF.AgaveHostAction.EscExit])}else if(d.keyCode==113){d.preventDefault();a._webAppState.clientEndPoint.invoke(b,c,[a._webAppState.id,OSF.AgaveHostAction.F2Exit])}},d=function(a){if(a.keyCode==117&&a.ctrlKey)if(a.preventDefault)a.preventDefault();else a.returnValue=false};if(i){OSF.OUtil.addEventListener(window,"focus",f);OSF.OUtil.addEventListener(window,"blur",g);OSF.OUtil.addEventListener(window,"keydown",e);OSF.OUtil.addEventListener(window,h,d)}else{OSF.OUtil.removeEventListener(window,"focus",f);OSF.OUtil.removeEventListener(window,"blur",g);OSF.OUtil.removeEventListener(window,"keydown",e);OSF.OUtil.removeEventListener(window,h,d)}};OSF.InitializationHelper.prototype.initWebDialog=function(a){if(a.get_isDialog()){if(OSF.DDA.UI.ChildUI){var b=window.opener!=null;a.ui=new OSF.DDA.UI.ChildUI(b);if(b)this.registerMessageReceivedEventForWindowDialog&&this.registerMessageReceivedEventForWindowDialog()}}else if(OSF.DDA.UI.ParentUI){a.ui=new OSF.DDA.UI.ParentUI;OfficeExt.Container&&OSF.DDA.DispIdHost.addAsyncMethods(a.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync])}};OSF.InitializationHelper.prototype.initWebAuth=function(a){if(OSF.DDA.Auth){a.auth=new OSF.DDA.Auth;OSF.DDA.DispIdHost.addAsyncMethods(a.auth,[OSF.DDA.AsyncMethodNames.GetAccessTokenAsync])}};OSF.getClientEndPoint=function(){var a=OSF._OfficeAppFactory.getInitializationHelper();return a._webAppState.clientEndPoint};OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize=function(){var a=this;if(a._hostInfo.isDialog){window.focus();var c=document.querySelectorAll(a._tabbableElements),b=OSF.OUtil.focusToFirstTabbable(c,false);if(!b){window.blur();a._webAppState.focused=false;a._webAppState.clientEndPoint&&a._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[a._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable])}}};OSF.CommonUI={HostButtonBorderColor:"#f5ba9d",HostButtonBackgroundColor:"#fcf0ed"};var OSFLog;(function(g){var e="ResponseTime",d="Message",c="SessionId",b="CorrelationId",a=true,f=function(){function b(a){this._table=a;this._fields={}}Object.defineProperty(b.prototype,"Fields",{"get":function(){return this._fields},enumerable:a,configurable:a});Object.defineProperty(b.prototype,"Table",{"get":function(){return this._table},enumerable:a,configurable:a});b.prototype.SerializeFields=function(){};b.prototype.SetSerializedField=function(b,a){if(typeof a!=="undefined"&&a!==null)this._serializedFields[b]=a.toString()};b.prototype.SerializeRow=function(){var a=this;a._serializedFields={};a.SetSerializedField("Table",a._table);a.SerializeFields();return JSON.stringify(a._serializedFields)};return b}();g.BaseUsageData=f;var i=function(v){var u="IsFromWacAutomation",t="WacHostEnvironment",s="HostJSVersion",r="OfficeJSVersion",q="DocUrl",p="AppSizeHeight",o="AppSizeWidth",n="ClientId",m="HostVersion",l="Host",k="UserId",j="Browser",i="AssetId",h="AppURL",g="AppInstanceId",f="AppId";__extends(e,v);function e(){v.call(this,"AppActivated")}Object.defineProperty(e.prototype,b,{"get":function(){return this.Fields[b]},"set":function(a){this.Fields[b]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,c,{"get":function(){return this.Fields[c]},"set":function(a){this.Fields[c]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,f,{"get":function(){return this.Fields[f]},"set":function(a){this.Fields[f]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,g,{"get":function(){return this.Fields[g]},"set":function(a){this.Fields[g]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,h,{"get":function(){return this.Fields[h]},"set":function(a){this.Fields[h]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,i,{"get":function(){return this.Fields[i]},"set":function(a){this.Fields[i]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,j,{"get":function(){return this.Fields[j]},"set":function(a){this.Fields[j]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,k,{"get":function(){return this.Fields[k]},"set":function(a){this.Fields[k]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,l,{"get":function(){return this.Fields[l]},"set":function(a){this.Fields[l]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,m,{"get":function(){return this.Fields[m]},"set":function(a){this.Fields[m]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,n,{"get":function(){return this.Fields[n]},"set":function(a){this.Fields[n]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,o,{"get":function(){return this.Fields[o]},"set":function(a){this.Fields[o]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,p,{"get":function(){return this.Fields[p]},"set":function(a){this.Fields[p]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,d,{"get":function(){return this.Fields[d]},"set":function(a){this.Fields[d]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,q,{"get":function(){return this.Fields[q]},"set":function(a){this.Fields[q]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,r,{"get":function(){return this.Fields[r]},"set":function(a){this.Fields[r]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,s,{"get":function(){return this.Fields[s]},"set":function(a){this.Fields[s]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,t,{"get":function(){return this.Fields[t]},"set":function(a){this.Fields[t]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,u,{"get":function(){return this.Fields[u]},"set":function(a){this.Fields[u]=a},enumerable:a,configurable:a});e.prototype.SerializeFields=function(){var a=this;a.SetSerializedField(b,a.CorrelationId);a.SetSerializedField(c,a.SessionId);a.SetSerializedField(f,a.AppId);a.SetSerializedField(g,a.AppInstanceId);a.SetSerializedField(h,a.AppURL);a.SetSerializedField(i,a.AssetId);a.SetSerializedField(j,a.Browser);a.SetSerializedField(k,a.UserId);a.SetSerializedField(l,a.Host);a.SetSerializedField(m,a.HostVersion);a.SetSerializedField(n,a.ClientId);a.SetSerializedField(o,a.AppSizeWidth);a.SetSerializedField(p,a.AppSizeHeight);a.SetSerializedField(d,a.Message);a.SetSerializedField(q,a.DocUrl);a.SetSerializedField(r,a.OfficeJSVersion);a.SetSerializedField(s,a.HostJSVersion);a.SetSerializedField(t,a.WacHostEnvironment);a.SetSerializedField(u,a.IsFromWacAutomation)};return e}(f);g.AppActivatedUsageData=i;var j=function(h){var f="StartTime",d="ScriptId";__extends(g,h);function g(){h.call(this,"ScriptLoad")}Object.defineProperty(g.prototype,b,{"get":function(){return this.Fields[b]},"set":function(a){this.Fields[b]=a},enumerable:a,configurable:a});Object.defineProperty(g.prototype,c,{"get":function(){return this.Fields[c]},"set":function(a){this.Fields[c]=a},enumerable:a,configurable:a});Object.defineProperty(g.prototype,d,{"get":function(){return this.Fields[d]},"set":function(a){this.Fields[d]=a},enumerable:a,configurable:a});Object.defineProperty(g.prototype,f,{"get":function(){return this.Fields[f]},"set":function(a){this.Fields[f]=a},enumerable:a,configurable:a});Object.defineProperty(g.prototype,e,{"get":function(){return this.Fields[e]},"set":function(a){this.Fields[e]=a},enumerable:a,configurable:a});g.prototype.SerializeFields=function(){var a=this;a.SetSerializedField(b,a.CorrelationId);a.SetSerializedField(c,a.SessionId);a.SetSerializedField(d,a.ScriptId);a.SetSerializedField(f,a.StartTime);a.SetSerializedField(e,a.ResponseTime)};return g}(f);g.ScriptLoadUsageData=j;var k=function(j){var h="CloseMethod",g="OpenTime",f="AppSizeFinalHeight",e="AppSizeFinalWidth",d="FocusTime";__extends(i,j);function i(){j.call(this,"AppClosed")}Object.defineProperty(i.prototype,b,{"get":function(){return this.Fields[b]},"set":function(a){this.Fields[b]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,c,{"get":function(){return this.Fields[c]},"set":function(a){this.Fields[c]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,d,{"get":function(){return this.Fields[d]},"set":function(a){this.Fields[d]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,e,{"get":function(){return this.Fields[e]},"set":function(a){this.Fields[e]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,f,{"get":function(){return this.Fields[f]},"set":function(a){this.Fields[f]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,g,{"get":function(){return this.Fields[g]},"set":function(a){this.Fields[g]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,h,{"get":function(){return this.Fields[h]},"set":function(a){this.Fields[h]=a},enumerable:a,configurable:a});i.prototype.SerializeFields=function(){var a=this;a.SetSerializedField(b,a.CorrelationId);a.SetSerializedField(c,a.SessionId);a.SetSerializedField(d,a.FocusTime);a.SetSerializedField(e,a.AppSizeFinalWidth);a.SetSerializedField(f,a.AppSizeFinalHeight);a.SetSerializedField(g,a.OpenTime);a.SetSerializedField(h,a.CloseMethod)};return i}(f);g.AppClosedUsageData=k;var l=function(j){var h="ErrorType",g="Parameters",f="APIID",d="APIType";__extends(i,j);function i(){j.call(this,"APIUsage")}Object.defineProperty(i.prototype,b,{"get":function(){return this.Fields[b]},"set":function(a){this.Fields[b]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,c,{"get":function(){return this.Fields[c]},"set":function(a){this.Fields[c]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,d,{"get":function(){return this.Fields[d]},"set":function(a){this.Fields[d]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,f,{"get":function(){return this.Fields[f]},"set":function(a){this.Fields[f]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,g,{"get":function(){return this.Fields[g]},"set":function(a){this.Fields[g]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,e,{"get":function(){return this.Fields[e]},"set":function(a){this.Fields[e]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,h,{"get":function(){return this.Fields[h]},"set":function(a){this.Fields[h]=a},enumerable:a,configurable:a});i.prototype.SerializeFields=function(){var a=this;a.SetSerializedField(b,a.CorrelationId);a.SetSerializedField(c,a.SessionId);a.SetSerializedField(d,a.APIType);a.SetSerializedField(f,a.APIID);a.SetSerializedField(g,a.Parameters);a.SetSerializedField(e,a.ResponseTime);a.SetSerializedField(h,a.ErrorType)};return i}(f);g.APIUsageUsageData=l;var h=function(g){var e="SuccessCode";__extends(f,g);function f(){g.call(this,"AppInitialization")}Object.defineProperty(f.prototype,b,{"get":function(){return this.Fields[b]},"set":function(a){this.Fields[b]=a},enumerable:a,configurable:a});Object.defineProperty(f.prototype,c,{"get":function(){return this.Fields[c]},"set":function(a){this.Fields[c]=a},enumerable:a,configurable:a});Object.defineProperty(f.prototype,e,{"get":function(){return this.Fields[e]},"set":function(a){this.Fields[e]=a},enumerable:a,configurable:a});Object.defineProperty(f.prototype,d,{"get":function(){return this.Fields[d]},"set":function(a){this.Fields[d]=a},enumerable:a,configurable:a});f.prototype.SerializeFields=function(){var a=this;a.SetSerializedField(b,a.CorrelationId);a.SetSerializedField(c,a.SessionId);a.SetSerializedField(e,a.SuccessCode);a.SetSerializedField(d,a.Message)};return f}(f);g.AppInitializationUsageData=h})(OSFLog||(OSFLog={}));var Logger;(function(a){"use strict";(function(a){a[a["info"]=0]="info";a[a["warning"]=1]="warning";a[a["error"]=2]="error"})(a.TraceLevel||(a.TraceLevel={}));var f=a.TraceLevel;(function(a){a[a["none"]=0]="none";a[a["flush"]=1]="flush"})(a.SendFlag||(a.SendFlag={}));var g=a.SendFlag;function b(){OSF.Logger&&OSF.Logger.ulsEndpoint&&OSF.Logger.ulsEndpoint.loadProxyFrame()}a.allowUploadingData=b;function e(a,c,d){if(OSF.Logger&&OSF.Logger.ulsEndpoint){var b={traceLevel:a,message:c,flag:d,internalLog:true},e=JSON.stringify(b);OSF.Logger.ulsEndpoint.writeLog(e)}}a.sendLog=e;function c(){try{return new d}catch(a){return null}}var d=function(){function a(){var a=this,b=a;a.proxyFrame=null;a.telemetryEndPoint="https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html";a.buffer=[];a.proxyFrameReady=false;OSF.OUtil.addEventListener(window,"message",function(a){return b.tellProxyFrameReady(a)});setTimeout(function(){b.loadProxyFrame()},3e3)}a.prototype.writeLog=function(c){var b=this;if(b.proxyFrameReady===true)b.proxyFrame.contentWindow.postMessage(c,a.telemetryOrigin);else b.buffer.length<128&&b.buffer.push(c)};a.prototype.loadProxyFrame=function(){var a=this;if(a.proxyFrame==null){a.proxyFrame=document.createElement("iframe");a.proxyFrame.setAttribute("style","display:none");a.proxyFrame.setAttribute("src",a.telemetryEndPoint);document.head.appendChild(a.proxyFrame)}};a.prototype.tellProxyFrameReady=function(d){var b=this,g=b;if(d.data==="ProxyFrameReadyToLog"){b.proxyFrameReady=true;for(var c=0;c40){a=OSF.OUtil.Guid.generateNewGuid();b.setValue(b.clientIDKey,a)}return a};a.prototype.saveLog=function(d,e){var b=this,a=b.getValue(b.logIdSetKey);a=(a&&a.length>0?a+";":c)+d;b.setValue(b.logIdSetKey,a);b.setValue(d,e)};a.prototype.enumerateLog=function(c,e){var a=this,d=a.getValue(a.logIdSetKey);if(d){var f=d.split(";");for(var h in f){var b=f[h],g=a.getValue(b);if(g){c&&c(b,g);e&&a.remove(b)}}e&&a.remove(a.logIdSetKey)}};a.prototype.getValue=function(d){var a=OSF.OUtil.getLocalStorage(),b=c;if(a)b=a.getItem(d);return b};a.prototype.setValue=function(c,b){var a=OSF.OUtil.getLocalStorage();a&&a.setItem(c,b)};a.prototype.remove=function(b){var a=OSF.OUtil.getLocalStorage();if(a)try{a.removeItem(b)}catch(c){}};return a}(),i=function(){function a(){}a.prototype.LogData=function(a){if(!OSF.Logger||!d.enableTelemetry)return;try{OSFAriaLogger.AriaLogger.getInstance().logData(a)}catch(b){}};a.prototype.LogRawData=function(a){if(!OSF.Logger||!d.enableTelemetry)return;try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(a))}catch(b){}};return a}();function f(a){if(a)a=a.replace(/[{}]/g,c).toLowerCase();return a||c}function x(g){if(!OSF.Logger)return;if(a)return;a=new z;if(g.get_hostFullVersion())a.hostVersion=g.get_hostFullVersion();else a.hostVersion=g.get_appVersion();a.appId=g.get_id();a.host=g.get_appName();a.browser=window.navigator.userAgent;a.correlationId=f(g.get_correlationId());a.clientId=(new l).getClientId();a.appInstanceId=g.get_appInstanceId();if(a.appInstanceId)a.appInstanceId=a.appInstanceId.replace(/[{}]/g,c).toLowerCase();a.message=g.get_hostCustomMessage();a.officeJSVersion=OSF.ConstantNames.FileVersion;a.hostJSVersion="16.0.8916.1000";if(g._wacHostEnvironment)a.wacHostEnvironment=g._wacHostEnvironment;if(g._isFromWacAutomation!==undefined&&g._isFromWacAutomation!==b)a.isFromWacAutomation=g._isFromWacAutomation.toString().toLowerCase();var j=g.get_docUrl();a.docUrl=p.test(j)?j:c;var i=location.href;if(i)i=i.split("?")[0].split("#")[0];a.appURL=i;(function(i,a){var e,h,d;a.assetId=c;a.userId=c;try{e=decodeURIComponent(i);h=new DOMParser;d=h.parseFromString(e,"text/xml");var f=d.getElementsByTagName("t")[0].attributes.getNamedItem("cid"),g=d.getElementsByTagName("t")[0].attributes.getNamedItem("oid");if(f&&f.nodeValue)a.userId=f.nodeValue;else if(g&&g.nodeValue)a.userId=g.nodeValue;a.assetId=d.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(j){}finally{e=b;d=b;h=b}})(g.get_eToken(),a);(function(){var l=new Date,c=b,i=0,k=false,f=function(){if(document.hasFocus()){if(c==b)c=new Date}else if(c){i+=Math.abs((new Date).getTime()-c.getTime());c=b}},a=[];a.push(new h("focus",f));a.push(new h("blur",f));a.push(new h("focusout",f));a.push(new h("focusin",f));var j=function(){for(var f=0;f0)for(var b=0;b0)for(var b=0;b0){this._eventHandlers[a]=[];return true}return false},clearObjectEventHandlers:function(a,b){if(this._objectEventHandlers[a]!=null&&this._objectEventHandlers[a][b]!=null){this._objectEventHandlers[a][b]=[];return true}return false},getEventHandlerCount:function(a){return this._eventHandlers[a]!=undefined?this._eventHandlers[a].length:-1},getObjectEventHandlerCount:function(a,b){if(this._objectEventHandlers[a]==null||this._objectEventHandlers[a][b]==null)return 0;return this._objectEventHandlers[a][b].length},fireEvent:function(a){if(a.type==undefined)return false;var b=a.type;if(b&&this._eventHandlers[b]){for(var d=this._eventHandlers[b],c=0;c0){var d=b[0];while(c.length>0){var e=c.shift();d(e)}return true}}return false},clearQueuedEvent:function(a){if(a&&this._eventHandlers[a]){var b=this._queuedEventsArgs[a];if(b)this._queuedEventsArgs[a]=[]}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(d,c,b){var h="hostPlatform",g="outlook",f="hostType",e=this,a;switch(d){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:a=new OSF.DDA.DocumentSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:a=new OSF.DDA.BindingSelectionChangedEventArgs(e.manufactureBinding(b,c.document),b[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:a=new OSF.DDA.BindingDataChangedEventArgs(e.manufactureBinding(b,c.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:a=new OSF.DDA.SettingsChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:a=new OSF.DDA.ActiveViewChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:a=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:a=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:a=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(b);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:a=new OSF.DDA.ObjectEventArgs(d,b[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:a=new OSF.DDA.RichApiMessageEventArgs(d,b);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:a=new OSF.DDA.NodeInsertedEventArgs(e.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NewNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:a=new OSF.DDA.NodeReplacedEventArgs(e.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.OldNode]),e.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NewNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:a=new OSF.DDA.NodeDeletedEventArgs(e.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.OldNode]),e.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:a=new OSF.DDA.TaskSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:a=new OSF.DDA.ResourceSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:a=new OSF.DDA.ViewSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:a=new OSF.DDA.DialogEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:a=new OSF.DDA.DialogParentEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]==g){a=new OSF.DDA.OlkItemSelectedChangedEventArgs(b);c.initialize(a["initialData"]);(OSF._OfficeAppFactory.getHostInfo()[h]=="win32"||OSF._OfficeAppFactory.getHostInfo()[h]=="mac")&&c.setCurrentItemNumber(a["itemNumber"].itemNumber)}else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,d));break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]==g)a=new OSF.DDA.OlkRecipientsChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,d));break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]==g)a=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,d));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,d))}return a};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{ActiveViewChangedEvent:"ActiveViewChangedEvent"});Microsoft.Office.WebExtension.ActiveView={Read:"read",Edit:"edit"};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ActiveViewChanged:"activeViewChanged"});OSF.DDA.AsyncMethodNames.addNames({GetActiveViewAsync:"getActiveViewAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetActiveViewAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(b){var a=b[Microsoft.Office.WebExtension.Parameters.ActiveView];return a==undefined?null:a}});OSF.DDA.ActiveViewChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.ActiveViewChanged},activeView:{value:a.activeView}})};OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetActiveViewMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.ActiveView,value:Microsoft.Office.WebExtension.Parameters.Data}]});Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"};Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"};Microsoft.Office.WebExtension.Index={First:"first",Last:"last",Next:"next",Previous:"previous"};OSF.DDA.AsyncMethodNames.addNames({GoToByIdAsync:"goToByIdAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GoToByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string","number"]},{name:Microsoft.Office.WebExtension.Parameters.GoToType,"enum":Microsoft.Office.WebExtension.GoToType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:{"enum":Microsoft.Office.WebExtension.SelectionMode,defaultValue:Microsoft.Office.WebExtension.SelectionMode.Default}}]});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.DDA.Marshaling.NavigationKeys={NavigationRequest:"DdaGoToByIdMethod",Id:"Id",GoToType:"GoToType",SelectionMode:"SelectionMode"};var OSF_DDA_Marshaling_GoToType;(function(a){var b="NamedItem";a[a["Binding"]=0]="Binding";a[a[b]=1]=b;a[a["Slide"]=2]="Slide";a[a["Index"]=3]="Index"})(OSF_DDA_Marshaling_GoToType||(OSF_DDA_Marshaling_GoToType={}));OSF.DDA.Marshaling.GoToType=OSF_DDA_Marshaling_GoToType;var OSF_DDA_Marshaling_SelectionMode;(function(a){var b="Selected";a[a["Default"]=0]="Default";a[a[b]=1]=b;a[a["None"]=2]="None"})(OSF_DDA_Marshaling_SelectionMode||(OSF_DDA_Marshaling_SelectionMode={}));OSF.DDA.Marshaling.SelectionMode=OSF_DDA_Marshaling_SelectionMode;OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.Marshaling.NavigationKeys.NavigationRequest);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.Marshaling.NavigationKeys.NavigationRequest,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.NavigationKeys.Id},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:OSF.DDA.Marshaling.NavigationKeys.GoToType},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:OSF.DDA.Marshaling.NavigationKeys.SelectionMode}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:OSF.DDA.Marshaling.GoToType.Binding},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:OSF.DDA.Marshaling.GoToType.NamedItem},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:OSF.DDA.Marshaling.GoToType.Slide},{name:Microsoft.Office.WebExtension.GoToType.Index,value:OSF.DDA.Marshaling.GoToType.Index}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:OSF.DDA.Marshaling.SelectionMode.Default},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:OSF.DDA.Marshaling.SelectionMode.Selected},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:OSF.DDA.Marshaling.SelectionMode.None}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:OSF.DDA.Marshaling.NavigationKeys.NavigationRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});Microsoft.Office.WebExtension.FileType={Text:"text",Compressed:"compressed",Pdf:"pdf"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FileProperties:"FileProperties",FileSliceProperties:"FileSliceProperties"});OSF.DDA.FileProperties={Handle:"FileHandle",FileSize:"FileSize",SliceSize:Microsoft.Office.WebExtension.Parameters.SliceSize};OSF.DDA.File=function(e,c,b){OSF.OUtil.defineEnumerableProperties(this,{size:{value:c},sliceCount:{value:Math.ceil(c/b)}});var a={};a[OSF.DDA.FileProperties.Handle]=e;a[OSF.DDA.FileProperties.SliceSize]=b;var d=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[d.GetDocumentCopyChunkAsync,d.ReleaseDocumentCopyAsync],a)};OSF.DDA.FileSliceOffset="fileSliceoffset";OSF.DDA.AsyncMethodNames.addNames({GetDocumentCopyAsync:"getFileAsync",GetDocumentCopyChunkAsync:"getSliceAsync",ReleaseDocumentCopyAsync:"closeAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FileType,"enum":Microsoft.Office.WebExtension.FileType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:{types:["number"],defaultValue:4*1024*1024}}],checkCallArgs:function(b){var a=b[Microsoft.Office.WebExtension.Parameters.SliceSize];if(a<=0||a>4*1024*1024)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return b},onSucceeded:function(a,c,b){return new OSF.DDA.File(a[OSF.DDA.FileProperties.Handle],a[OSF.DDA.FileProperties.FileSize],b[Microsoft.Office.WebExtension.Parameters.SliceSize])}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(b,a){return a[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(b,a){return a[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(a,d,c){var b=a[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(b<0||b>=d.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;a[OSF.DDA.FileSliceOffset]=parseInt((b*c[OSF.DDA.FileProperties.SliceSize]).toString());return a},onSucceeded:function(a,d,c){var b={};OSF.OUtil.defineEnumerableProperties(b,{data:{value:a[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:c[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:a[OSF.DDA.FileProperties.SliceSize]}});return b}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(b,a){return a[OSF.DDA.FileProperties.Handle]}}]});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("File",OSF.DDA.Marshaling);var OSF_DDA_Marshaling_File_FilePropertiesKeys;(function(a){var b="FileSize";a[a["Handle"]=0]="Handle";a[a[b]=1]=b})(OSF_DDA_Marshaling_File_FilePropertiesKeys||(OSF_DDA_Marshaling_File_FilePropertiesKeys={}));OSF.DDA.Marshaling.File.FilePropertiesKeys=OSF_DDA_Marshaling_File_FilePropertiesKeys;var OSF_DDA_Marshaling_File_SlicePropertiesKeys;(function(a){var b="SliceSize";a[a["Data"]=0]="Data";a[a[b]=1]=b})(OSF_DDA_Marshaling_File_SlicePropertiesKeys||(OSF_DDA_Marshaling_File_SlicePropertiesKeys={}));OSF.DDA.Marshaling.File.SlicePropertiesKeys=OSF_DDA_Marshaling_File_SlicePropertiesKeys;var OSF_DDA_Marshaling_File_FileType;(function(a){var b="Compressed";a[a["Text"]=0]="Text";a[a[b]=1]=b;a[a["Pdf"]=2]="Pdf"})(OSF_DDA_Marshaling_File_FileType||(OSF_DDA_Marshaling_File_FileType={}));OSF.DDA.Marshaling.File.FileType=OSF_DDA_Marshaling_File_FileType;var OSF_DDA_Marshaling_File_ParameterKeys;(function(a){var d="SliceIndex",c="SliceSize",b="FileType";a[a[b]=0]=b;a[a[c]=1]=c;a[a["Handle"]=2]="Handle";a[a[d]=3]=d})(OSF_DDA_Marshaling_File_ParameterKeys||(OSF_DDA_Marshaling_File_ParameterKeys={}));OSF.DDA.Marshaling.File.ParameterKeys=OSF_DDA_Marshaling_File_ParameterKeys;OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FileProperties);OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FileSliceProperties);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.FilePropertiesKeys.Handle},{name:OSF.DDA.FileProperties.FileSize,value:OSF.DDA.Marshaling.File.FilePropertiesKeys.FileSize}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.Marshaling.File.SlicePropertiesKeys.Data},{name:OSF.DDA.FileProperties.SliceSize,value:OSF.DDA.Marshaling.File.SlicePropertiesKeys.SliceSize}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:OSF.DDA.Marshaling.File.FileType.Text},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:OSF.DDA.Marshaling.File.FileType.Compressed},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:OSF.DDA.Marshaling.File.FileType.Pdf}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:OSF.DDA.Marshaling.File.ParameterKeys.FileType},{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:OSF.DDA.Marshaling.File.ParameterKeys.SliceSize}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.ParameterKeys.Handle},{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,value:OSF.DDA.Marshaling.File.ParameterKeys.SliceIndex}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.ParameterKeys.Handle}]});OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(a){OSF.OUtil.defineEnumerableProperties(this,{url:{value:a[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(a){return new Microsoft.Office.WebExtension.FileProperties(a)}});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);var OSF_DDA_Marshaling_FilePropertiesKeys;(function(a){var b="Properties";a[a[b]=0]=b;a[a["Url"]=1]="Url"})(OSF_DDA_Marshaling_FilePropertiesKeys||(OSF_DDA_Marshaling_FilePropertiesKeys={}));OSF.DDA.Marshaling.FilePropertiesKeys=OSF_DDA_Marshaling_FilePropertiesKeys;OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,fromHost:[{name:OSF.DDA.FilePropertiesDescriptor.Url,value:OSF.DDA.Marshaling.FilePropertiesKeys.Url}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:OSF.DDA.Marshaling.FilePropertiesKeys.Properties}]});OSF.DDA.AsyncMethodNames.addNames({GetOfficeThemeAsync:"getOfficeThemeAsync",GetDocumentThemeAsync:"getDocumentThemeAsync"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{OfficeThemeChanged:"officeThemeChanged",DocumentThemeChanged:"documentThemeChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.Parameters,{DocumentTheme:"documentTheme",OfficeTheme:"officeTheme"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DocumentThemeChangedEvent:"DocumentThemeChangedEvent",OfficeThemeChangedEvent:"OfficeThemeChangedEvent"});OSF.OUtil.setNamespace("Theming",OSF.DDA);OSF.DDA.Theming.OfficeThemeEnum={PrimaryFontColor:"primaryFontColor",PrimaryBackgroundColor:"primaryBackgroundColor",SecondaryFontColor:"secondaryFontColor",SecondaryBackgroundColor:"secondaryBackgroundColor"};OSF.DDA.Theming.DocumentThemeEnum={PrimaryFontColor:"primaryFontColor",PrimaryBackgroundColor:"primaryBackgroundColor",SecondaryFontColor:"secondaryFontColor",SecondaryBackgroundColor:"secondaryBackgroundColor",Accent1:"accent1",Accent2:"accent2",Accent3:"accent3",Accent4:"accent4",Accent5:"accent5",Accent6:"accent6",Hyperlink:"hyperlink",FollowedHyperlink:"followedHyperlink",HeaderLatinFont:"headerLatinFont",HeaderEastAsianFont:"headerEastAsianFont",HeaderScriptFont:"headerScriptFont",HeaderLocalizedFont:"headerLocalizedFont",BodyLatinFont:"bodyLatinFont",BodyEastAsianFont:"bodyEastAsianFont",BodyScriptFont:"bodyScriptFont",BodyLocalizedFont:"bodyLocalizedFont"};OSF.DDA.Theming.ConvertToDocumentTheme=function(f){var b=false,a=true;for(var d=[{name:"primaryFontColor",needToConvertToHex:a},{name:"primaryBackgroundColor",needToConvertToHex:a},{name:"secondaryFontColor",needToConvertToHex:a},{name:"secondaryBackgroundColor",needToConvertToHex:a},{name:"accent1",needToConvertToHex:a},{name:"accent2",needToConvertToHex:a},{name:"accent3",needToConvertToHex:a},{name:"accent4",needToConvertToHex:a},{name:"accent5",needToConvertToHex:a},{name:"accent6",needToConvertToHex:a},{name:"hyperlink",needToConvertToHex:a},{name:"followedHyperlink",needToConvertToHex:a},{name:"headerLatinFont",needToConvertToHex:b},{name:"headerEastAsianFont",needToConvertToHex:b},{name:"headerScriptFont",needToConvertToHex:b},{name:"headerLocalizedFont",needToConvertToHex:b},{name:"bodyLatinFont",needToConvertToHex:b},{name:"bodyEastAsianFont",needToConvertToHex:b},{name:"bodyScriptFont",needToConvertToHex:b},{name:"bodyLocalizedFont",needToConvertToHex:b}],e={},c=0;c100)a[Microsoft.Office.WebExtension.Parameters.Width]=99;if(a[Microsoft.Office.WebExtension.Parameters.Height]<=0)a[Microsoft.Office.WebExtension.Parameters.Height]=1;if(!a[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&a[Microsoft.Office.WebExtension.Parameters.Height]>100)a[Microsoft.Office.WebExtension.Parameters.Height]=99;if(!a[Microsoft.Office.WebExtension.Parameters.RequireHTTPs])a[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=true;return a}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("Dialog",OSF.DDA.Marshaling);OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys={MessageType:"messageType",MessageContent:"messageContent"};OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys={MessageType:"messageType",MessageContent:"messageContent"};OSF.DDA.Marshaling.MessageParentKeys={MessageToParent:"messageToParent"};OSF.DDA.Marshaling.DialogNotificationShownEventType={DialogNotificationShown:"dialogNotificationShown"};OSF.DDA.Marshaling.SendMessageKeys={MessageContent:"messageContent"};var OfficeExt;(function(a){var b;(function(c){var a={Excel:"excel",Word:"word",PowerPoint:"powerpoint",Outlook:"outlook"};function d(c){switch(c){case a.Excel:case a.Word:case a.PowerPoint:case a.Outlook:return new b;default:return new b}return null}c.getDialogCssManager=d;var b=function(){var a=";";function b(){var f="height: 100px",b="font-size: 14px",a="font-family: Segoe UI,Arial,Verdana,sans-serif",e="margin: 20px 14px",d="width: 100%",c="position: absolute",g=this;g.overlayElementCSS=[c,"top: 0","left: 0",d,"height: 100%","background-color: rgba(198, 198, 198, 0.5)","z-index: 99998"];g.dialogNotificationPanelCSS=[d,"height: 190px",c,"z-index: 99999","background-color: rgba(255, 255, 255, 1)","left: 0px","top: 50%","margin-top: -95px"];g.newWindowNotificationTextPanelCSS=[e,a,b,f,"line-height: 100px"];g.newWindowNotificationTextSpanCSS=["display: inline-block","line-height: normal","vertical-align: middle"];g.crossZoneNotificationTextPanelCSS=[e,a,b,f];g.dialogNotificationButtonPanelCSS="margin:0px 9px";g.buttonStyleCSS=["text-align: center","width: 70px","height: 25px",b,a,"margin: 0px 5px","border-width: 1px","border-style: solid"]}b.prototype.getOverlayElementCSS=function(){return this.overlayElementCSS.join(a)};b.prototype.getDialogNotificationPanelCSS=function(){return this.dialogNotificationPanelCSS.join(a)};b.prototype.getNewWindowNotificationTextPanelCSS=function(){return this.newWindowNotificationTextPanelCSS.join(a)};b.prototype.getNewWindowNotificationTextSpanCSS=function(){return this.newWindowNotificationTextSpanCSS.join(a)};b.prototype.getCrossZoneNotificationTextPanelCSS=function(){return this.crossZoneNotificationTextPanelCSS.join(a)};b.prototype.getDialogNotificationButtonPanelCSS=function(){return this.dialogNotificationButtonPanelCSS};b.prototype.getDialogButtonCSS=function(){return this.buttonStyleCSS.join(a)};return b}();c.DefaultDialogCSSManager=b})(b=a.WacCommonUICssManager||(a.WacCommonUICssManager={}))})(OfficeExt||(OfficeExt={}));var OfficeExt;(function(a){var b;(function(b){var c;(function(k){var d="div",e="string",f="message",j="storage",g="keydown",c=false,b=null,i=b,r=b,m=b,h=b,L="osfDialogInternal:action=closeDialog",l=b,x=c,t=-1,K="messageParentKey",q=b,F="#ababab",D="#ffffff",O="#ccc",G="newWindowNotificaiton",U="crossZoneNotification",y="configureBrowserLink",u="dialogNotificationTextPanel",o=a.WACUtils.shouldUseLocalStorageToPassMessage(),n={dispId:OSF.DDA.EventDispId.dispidDialogNotificationShownInAddinEvent,eventType:OSF.DDA.Marshaling.DialogNotificationShownEventType.DialogNotificationShown,onComplete:b};function V(c){var a=c.input;if(a!=b)q={HostButtonBorderColor:a[OSF.HostThemeButtonStyleKeys.ButtonBorderColor],HostButtonBackgroundColor:a[OSF.HostThemeButtonStyleKeys.ButtonBackgroundColor]};c.completed()}k.setHostThemeButtonStyle=V;function Q(a){OSF._OfficeAppFactory.getInitializationHelper().addOrRemoveEventListenersForWindow(c);a.completed()}k.removeEventListenersForDialog=Q;function W(k){try{if(OSF._OfficeAppFactory.getInitializationHelper()._appContext._skipNewWindowNotification){M(k);return}x=c;var i=c,t=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo,e=a.WacCommonUICssManager.getDialogCssManager(t.hostType),r=OSF.OUtil.formatString(Strings.OfficeOM.L_ShowWindowDialogNotification,OSF._OfficeAppFactory.getInitializationHelper()._appContext._addinName);m=I(e);document.body.insertBefore(m,document.body.firstChild);h=T(e,r);h.id=G;var f=J(e),d=A(e,Strings.OfficeOM.L_ShowWindowDialogNotificationAllow),b=A(e,Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore);f.appendChild(d);f.appendChild(b);h.appendChild(f);document.body.insertBefore(h,document.body.firstChild);d.onclick=function(){M(k);!x&&p()};function j(){function a(a){s();H(a);l(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore)}n.onComplete=a;OSF.DDA.WAC.Delegate.unregisterEventAsync(n)}b.onclick=j;d.addEventListener(g,function(a){if(a.shiftKey&&a.keyCode==9){v(d);w(b);b.focus();a.preventDefault();a.stopPropagation()}},c);b.addEventListener(g,function(a){if(!a.shiftKey&&a.keyCode==9){v(b);w(d);d.focus();a.preventDefault();a.stopPropagation()}else if(a.keyCode==13){i=true;a.preventDefault();a.stopPropagation()}},c);b.addEventListener("keyup",function(a){if(a.keyCode==13&&i){i=c;j();a.preventDefault();a.stopPropagation()}},c);window.focus();function q(){d.focus()}n.onComplete=q;OSF.DDA.WAC.Delegate.registerEventAsync(n)}catch(o){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at new window dialog."+o);l(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)}}k.handleNewWindowDialog=W;function Y(d){try{if(i!=b){var a=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains;if(a)for(var c=0;c-1)window.close();else{var a=c.data,d=typeof a;if(a&&(d=="object"||d==e)){if(d==e)a=JSON.parse(a);var f=OSF.DDA.OMFactory.manufactureEventArgs(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived,b,a);OSF.DialogParentMessageEventDispatch.fireEvent(f)}}}window.addEventListener(f,a)}k.registerMessageReceivedEvent=S;function P(a,b){r=a;l=b}k.setHandlerAndShowDialogCallback=P;function R(){try{h&&h.id==G&&l&&l(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore)}catch(a){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during executing displayDialogAsync callback."+a)}p()}k.escDismissDialogNotification=R;function E(i,j){var e=c,d=a.WacCommonUICssManager.getDialogCssManager(j);m=I(d);document.body.insertBefore(m,document.body.firstChild);h=N(d,i);h.id=U;var f=J(d),b=A(d,Strings.OfficeOM.L_DialogOK?Strings.OfficeOM.L_DialogOK:"OK");f.appendChild(b);h.appendChild(f);document.body.insertBefore(h,document.body.firstChild);x=true;b.onclick=function(){p()};b.addEventListener(g,function(a){if(a.keyCode==9){document.getElementById(y).focus();a.preventDefault();a.stopPropagation()}else if(a.keyCode==13){e=true;a.preventDefault();a.stopPropagation()}},c);b.addEventListener("keyup",function(a){if(a.keyCode==13&&e){e=c;p();a.preventDefault();a.stopPropagation()}},c);document.getElementById(y).addEventListener(g,function(a){if(a.keyCode==9){b.focus();a.preventDefault();a.stopPropagation()}},c);window.focus();b.focus()}k.showCrossZoneNotification=E;function B(b){if(b.source==i)try{var a={};a[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogMessageReceived;a[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent]=b.data;r(a)}catch(c){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during receive message handler."+c)}}function z(b){var d=OSF._OfficeAppFactory.getInitializationHelper()._webAppState.id+K;if(b.key==d)try{var a={};a[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogMessageReceived;a[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent]=b.newValue;r(a)}catch(c){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during storage changed handler."+c)}}function M(g){var c=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo,q=[c.hostType,c.hostPlatform,c.hostSpecificFileVersion,c.hostLocale,c.osfControlAppCorrelationId,"isDialog"],k=q.join("|"),e=OSF._OfficeAppFactory.getInitializationHelper()._appContext,d=g[OSF.ShowWindowDialogParameterKeys.Url];d=a.WACUtils.addHostInfoAsQueryParam(d,k);var h=JSON.parse(window.name);h[OSF.WindowNameItemKeys.HostInfo]=k;h[OSF.WindowNameItemKeys.AppContext]=e;var n=g[OSF.ShowWindowDialogParameterKeys.Width]*screen.width/100,m=g[OSF.ShowWindowDialogParameterKeys.Height]*screen.height/100,v=e._clientWindowWidth/2-n/2,w=e._clientWindowHeight/2-m/2,u="width="+n+", height="+m+", left="+v+", top="+w+",channelmode=no,directories=no,fullscreen=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=yes,toolbar=no";i=window.open(d,a.WACUtils.serializeObjectToString(h),u);if(i==b){OSF.AppTelemetry.logAppCommonMessage("Encountered cross zone issue in displayDialogAsync api.");s();E(d,c.hostType);l(OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone);return}if(o)window.addEventListener(j,z);else window.addEventListener(f,B);function p(){try{if(i==b||i.closed){window.clearInterval(t);if(o)window.removeEventListener(j,z);else window.removeEventListener(f,B);var a={};a[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogClosed;r(a)}}catch(c){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during check or handle window close."+c)}}t=window.setInterval(p,1e3);if(l!=b)l(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess);else OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("showDialogCallback can not be null.")}function A(d,e){var a=document.createElement("input");a.setAttribute("type","button");a.style.cssText=d.getDialogButtonCSS();a.style.borderColor=F;a.style.backgroundColor=D;a.setAttribute("value",e);var c=function(){w(a)},b=function(){v(a)};a.addEventListener("mouseover",c);a.addEventListener("focus",c);a.addEventListener("mouseout",b);a.addEventListener("focusout",b);return a}function w(a){if(q!=b){a.style.borderColor=q.HostButtonBorderColor;a.style.backgroundColor=q.HostButtonBackgroundColor}else if(OSF.CommonUI&&OSF.CommonUI.HostButtonBorderColor&&OSF.CommonUI.HostButtonBackgroundColor){a.style.borderColor=OSF.CommonUI.HostButtonBorderColor;a.style.backgroundColor=OSF.CommonUI.HostButtonBackgroundColor}else a.style.backgroundColor=O}function v(a){a.style.borderColor=F;a.style.backgroundColor=D}function p(){function a(a){s();H(a)}n.onComplete=a;OSF.DDA.WAC.Delegate.unregisterEventAsync(n)}function s(){if(h!=b){document.body.removeChild(h);h=b}if(m!=b){document.body.removeChild(m);m=b}}function I(b){var a=document.createElement(d);a.style.cssText=b.getOverlayElementCSS();return a}function T(e,f){var b=document.createElement(d);b.style.cssText=e.getDialogNotificationPanelCSS();C(b);var a=document.createElement(d);a.style.cssText=e.getNewWindowNotificationTextPanelCSS();a.id=u;if(document.documentElement.getAttribute("dir")=="rtl")a.style.paddingRight="30px";else a.style.paddingLeft="30px";var c=document.createElement("span");c.style.cssText=e.getNewWindowNotificationTextSpanCSS();c.innerText=f;a.appendChild(c);b.appendChild(a);return b}function J(b){var a=document.createElement(d);a.style.cssText=b.getDialogNotificationButtonPanelCSS();if(document.documentElement.getAttribute("dir")=="rtl")a.style.cssFloat="left";else a.style.cssFloat="right";return a}function H(a){if(a!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){var b=document.querySelectorAll(OSF._OfficeAppFactory.getInitializationHelper()._tabbableElements);OSF.OUtil.focusToFirstTabbable(b,c)}}function N(g,h){var e=document.createElement(d);e.style.cssText=g.getDialogNotificationPanelCSS();C(e);var c=document.createElement(d);c.style.cssText=g.getCrossZoneNotificationTextPanelCSS();c.id=u;var b=document.createElement("a");b.id=y;b.href="#";b.innerText=Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink;b.setAttribute("onclick","window.open('https://support.microsoft.com/en-us/help/17479/windows-internet-explorer-11-change-security-privacy-settings', '_blank', 'fullscreen=1')");var f=document.createElement("span");if(Strings.OfficeOM.L_NewWindowCrossZone)f.innerHTML=OSF.OUtil.formatString(Strings.OfficeOM.L_NewWindowCrossZone,b.outerHTML,a.WACUtils.getDomainForUrl(h));c.appendChild(f);e.appendChild(c);return e}function C(a){a.setAttribute("role","dialog");a.setAttribute("aria-describedby",u)}})(c=b.Dialog||(b.Dialog={}))})(b=a.AddinNativeAction||(a.AddinNativeAction={}))})(OfficeExt||(OfficeExt={}));OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogMessageReceivedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageType},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageContent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidMessageParentMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,value:OSF.DDA.Marshaling.MessageParentKeys.MessageToParent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSendMessageMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,value:OSF.DDA.Marshaling.SendMessageKeys.MessageContent}]});OSF.DDA.WAC.Delegate.openDialog=function(a){var e="https://",f="http://",c=JSON.parse(a.targetId),g=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(true,a);function b(c){var b={Error:c};try{g(Microsoft.Office.Common.InvokeResultCode.noError,b)}catch(a){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at showDialogCallback."+a)}}if(OSF.DialogShownStatus.hasDialogShown){b(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened);return}var d=c[OSF.ShowWindowDialogParameterKeys.Url].toLowerCase();if(d==null||!(d.substr(0,e.length)===e)){if(d.substr(0,f.length)===f)b(OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS);else b(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme);return}if(!c[OSF.ShowWindowDialogParameterKeys.DisplayInIframe]){OSF.DialogShownStatus.isWindowDialog=true;OfficeExt.AddinNativeAction.Dialog.setHandlerAndShowDialogCallback(function(b){a.onEvent&&a.onEvent(b);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(a.dispId)},b);OfficeExt.AddinNativeAction.Dialog.handleNewWindowDialog(c)}else{OSF.DialogShownStatus.isWindowDialog=false;OSF.DDA.WAC.Delegate.registerEventAsync(a)}};OSF.DDA.WAC.Delegate.messageParent=function(a){if(window.opener!=null)OfficeExt.AddinNativeAction.Dialog.messageParent(a);else OSF.DDA.WAC.Delegate.executeAsync(a)};OSF.DDA.WAC.Delegate.sendMessage=function(a){if(OSF.DialogShownStatus.hasDialogShown)if(OSF.DialogShownStatus.isWindowDialog)OfficeExt.AddinNativeAction.Dialog.sendMessage(a);else OSF.DDA.WAC.Delegate.executeAsync(a)};OSF.DDA.WAC.Delegate.closeDialog=function(a){var c=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(false,a);function b(d){var b={Error:d};try{c(Microsoft.Office.Common.InvokeResultCode.noError,b)}catch(a){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at closeDialogCallback."+a)}}if(!OSF.DialogShownStatus.hasDialogShown)b(OSF.DDA.ErrorCodeManager.errorCodes.ooeWebDialogClosed);else if(OSF.DialogShownStatus.isWindowDialog){a.onCalling&&a.onCalling();OfficeExt.AddinNativeAction.Dialog.closeDialog(b)}else OSF.DDA.WAC.Delegate.unregisterEventAsync(a)};OSF.InitializationHelper.prototype.dismissDialogNotification=function(){OfficeExt.AddinNativeAction.Dialog.escDismissDialogNotification()};OSF.InitializationHelper.prototype.registerMessageReceivedEventForWindowDialog=function(){OfficeExt.AddinNativeAction.Dialog.registerMessageReceivedEvent()};var OfficeExt;(function(a){var b;(function(b){var c;(function(d){var e=function(){function a(){}return a}();function b(g,i){var a="undefined",f=function(){return typeof Html2canvas!==a&&typeof Html2canvas.html2canvas!==a},c=function(){return typeof window.Promise!==a||typeof OfficeExtension!==a&&typeof OfficeExtension.Promise!==a};if(f()&&c()){g();return}var b=new ScriptLoading.LoadScriptHelper,d=b.getOfficeJsBasePath(),e={html2canvasJs:"Html2canvas.js",promiseJs:"es6-promise.js"},h=function(){if(f()&&c())g();else i()};if(!c())b.loadScript(d+e.promiseJs,null,function(){b.loadScript(d+e.html2canvasJs,null,h)});else b.loadScript(d+e.html2canvasJs,null,h)}function c(c){if(!a.WACUtils.isHostTrusted||!a.WACUtils.isHostTrusted())c.completed();else{var d=function(){c.completed()},f=function(b){var a="image/png";try{c.result=b.toDataURL(a).replace(a,"image/octet-stream")}catch(d){}c.completed()},e=function(){try{Html2canvas.html2canvas(document.body,{onrendered:f})}catch(a){d()}};b(e,d)}}d.generateLatestSnapshot=c})(c=b.Snapshot||(b.Snapshot={}))})(b=a.AddinNativeAction||(a.AddinNativeAction={}))})(OfficeExt||(OfficeExt={}));OSF.DDA.AsyncMethodNames.addNames({GetAccessTokenAsync:"getAccessTokenAsync"});OSF.DDA.Auth=function(){};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAccessTokenAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ForceConsent,value:{types:["boolean"],defaultValue:false}},{name:Microsoft.Office.WebExtension.Parameters.ForceAddAccount,value:{types:["boolean"],defaultValue:false}},{name:Microsoft.Office.WebExtension.Parameters.AuthChallenge,value:{types:["string"],defaultValue:""}}],onSucceeded:function(a){var b=a[Microsoft.Office.WebExtension.Parameters.Data];return b}});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("SingleSignOn",OSF.DDA.Marshaling);OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys={ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge"};OSF.DDA.Marshaling.SingleSignOn.AccessTokenResultKeys={AccessToken:"accessToken"};OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAccessTokenMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.ForceConsent,value:OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.ForceConsent},{name:Microsoft.Office.WebExtension.Parameters.ForceAddAccount,value:OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.ForceAddAccount},{name:Microsoft.Office.WebExtension.Parameters.AuthChallenge,value:OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.AuthChallenge}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.Marshaling.SingleSignOn.AccessTokenResultKeys.AccessToken}]});var OSFPPTWAC;(function(b){var a=function(){function a(b,c){var a=this;OSF.DDA.DispIdHost.addEventSupport(a,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.ActiveViewChanged,Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]));OSF.DDA.PowerPointDocument.uber.constructor.call(a,b,c);OSF.DDA.DispIdHost.addAsyncMethods(a,[OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,OSF.DDA.AsyncMethodNames.GoToByIdAsync,OSF.DDA.AsyncMethodNames.GetActiveViewAsync,OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync]);OSF.OUtil.finalizeProperties(a)}return a}();b.PowerPointDocument=a})(OSFPPTWAC||(OSFPPTWAC={}));OSF.DDA.PowerPointDocument=OSFPPTWAC.PowerPointDocument;OSF.OUtil.extend(OSF.DDA.PowerPointDocument,OSF.DDA.Document);OSF.OUtil.redefineList(Microsoft.Office.WebExtension.GoToType,{Slide:"slide",Index:"index"});OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(a,b){OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM);a.doc=new OSF.DDA.PowerPointDocument(a,this._initializeSettings(a,true));b()};OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize=function(a){OSF.WebApp._UpdateLinksForHostAndXdmInfo();var e=new OSF.DDA.License(a.get_eToken());this.initWebDialog(a);this.initWebAuth(a);OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(a,a.doc,e));var b;OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.WAC.getDelegateMethods,OSF.DDA.WAC.Delegate.ParameterMap));b=function(b,d){if(b==0&&d!=true&&OSF.getClientEndPoint())OSF.getClientEndPoint().registerForEvent("activationCompleted",function(){var b=a.get_reason();Microsoft.Office.WebExtension.initialize(b)},null,{controlId:OSF._OfficeAppFactory.getId(),eventDispId:OSF.DDA.EventDispId.dispidActivationStatusChangedEvent,targetId:""});else{var c=a.get_reason();Microsoft.Office.WebExtension.initialize(c)}};if(OSF.getClientEndPoint())OSF.getClientEndPoint().invoke("getActivationCompletedStatus",b,this._webAppState.id);else if(a.get_isDialog()){var f=a.get_reason();Microsoft.Office.WebExtension.initialize(f);return}var d=new OSF.DDA.Theming.InternalThemeHandler;d.InitializeAndChangeOnce();var c=OfficeExt.AppCommand.AppCommandManager.instance();c.initializeAndChangeOnce()} \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/powerpoint-win32-16.01.debug.js b/node_modules/@microsoft/office-js/dist/powerpoint-win32-16.01.debug.js index fad7330..3d384d4 100644 --- a/node_modules/@microsoft/office-js/dist/powerpoint-win32-16.01.debug.js +++ b/node_modules/@microsoft/office-js/dist/powerpoint-win32-16.01.debug.js @@ -1,5 +1,5 @@ /* PowerPoint specific API library */ -/* Version: 16.0.7819.1000 */ +/* Version: 16.0.8916.1000 */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ @@ -248,6 +248,54 @@ OSF.OUtil = (function () { delete parent[name]; } }, + serializeSettings: function OSF_OUtil$serializeSettings(settingsCollection) { + var ret = {}; + for (var key in settingsCollection) { + var value = settingsCollection[key]; + try { + if (JSON) { + value = JSON.stringify(value, function dateReplacer(k, v) { + return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix + this[k].getTime() + OSF.DDA.SettingsManager.DataJSONSuffix : v; + }); + } + else { + value = Sys.Serialization.JavaScriptSerializer.serialize(value); + } + ret[key] = value; + } + catch (ex) { + } + } + return ret; + }, + deserializeSettings: function OSF_OUtil$deserializeSettings(serializedSettings) { + var ret = {}; + serializedSettings = serializedSettings || {}; + for (var key in serializedSettings) { + var value = serializedSettings[key]; + try { + if (JSON) { + value = JSON.parse(value, function dateReviver(k, v) { + var d; + if (typeof v === 'string' && v && v.length > 6 && v.slice(0, 5) === OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1) === OSF.DDA.SettingsManager.DataJSONSuffix) { + d = new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + } + else { + value = Sys.Serialization.JavaScriptSerializer.deserialize(value, true); + } + ret[key] = value; + } + catch (ex) { + } + } + return ret; + }, loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) { if (url && callback) { var doc = window.document; @@ -295,6 +343,7 @@ OSF.OUtil = (function () { script.onerror = onLoadError; timeoutInMs = timeoutInMs || _defaultScriptLoadingTimeout; _loadedScriptEntry.timer = setTimeout(onLoadError, timeoutInMs); + script.setAttribute("crossOrigin", "anonymous"); script.src = url; doc.getElementsByTagName("head")[0].appendChild(script); } @@ -785,6 +834,9 @@ OSF.OUtil = (function () { if (sourceObj == null) { return null; } + else if (!(sourceObj instanceof Object)) { + return sourceObj; + } else if (Array.isArray(sourceObj)) { var copyArr = []; for (var i = 0; i < sourceObj.length; i++) { @@ -824,6 +876,14 @@ OSF.OUtil = (function () { } } }, + removeClass: function OSF_OUtil$removeClass(elmt, val) { + if (OSF.OUtil.hasClass(elmt, val)) { + var className = elmt.getAttribute(_classN); + var reg = new RegExp('(\\s|^)' + val + '(\\s|$)'); + className = className.replace(reg, ''); + elmt.setAttribute(_classN, className); + } + }, hasClass: function OSF_OUtil$hasClass(elmt, clsName) { var className = elmt.getAttribute(_classN); return className && className.match(new RegExp('(\\s|^)' + clsName + '(\\s|$)')); @@ -960,6 +1020,12 @@ OSF.OUtil.Guid = (function () { })(); window.OSF = OSF; OSF.OUtil.setNamespace("OSF", window); +OSF.MessageIDs = { + "FetchBundleUrl": 0, + "LoadReactBundle": 1, + "LoadBundleSuccess": 2, + "LoadBundleError": 3 +}; OSF.AppName = { Unsupported: 0, Excel: 1, @@ -987,7 +1053,10 @@ OSF.AppName = { OutlookAndroid: 4194304, OneNoteWinRT: 8388608, ExcelAndroid: 8388609, - VisioWebApp: 8388610 + VisioWebApp: 8388610, + OneNoteIOS: 8388611, + WordAndroid: 8388613, + PowerpointAndroid: 8388614 }; OSF.InternalPerfMarker = { DataCoercionBegin: "Agave.HostCall.CoerceDataStart", @@ -1017,7 +1086,9 @@ OSF.AgaveHostAction = { "EscExit": 15, "F2Exit": 16, "ExitNoFocusable": 17, - "ExitNoFocusableShift": 18 + "ExitNoFocusableShift": 18, + "MouseEnter": 19, + "MouseLeave": 20 }; OSF.SharedConstants = { "NotificationConversationIdSuffix": '_ntf' @@ -1151,6 +1222,10 @@ Microsoft.Office.WebExtension.Parameters = { Status: "status", PlatformType: "platformType", HostType: "hostType", + ForceConsent: "forceConsent", + ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + Reserved: "reserved", Xml: "xml", Namespace: "namespace", Prefix: "prefix", @@ -1182,7 +1257,10 @@ Microsoft.Office.WebExtension.Parameters = { MessageToParent: "messageToParent", DisplayInIframe: "displayInIframe", MessageContent: "messageContent", - AppCommandInvocationCompletedData: "appCommandInvocationCompletedData" + HideTitle: "hideTitle", + UseDeviceIndependentPixels: "useDeviceIndependentPixels", + AppCommandInvocationCompletedData: "appCommandInvocationCompletedData", + Base64: "base64" }; OSF.OUtil.setNamespace("DDA", OSF); OSF.DDA.DocumentMode = { @@ -1238,6 +1316,9 @@ OSF.DDA.MethodDispId = { dispidExecuteRichApiRequestMethod: 93, dispidAppCommandInvocationCompletedMethod: 94, dispidCloseContainerMethod: 97, + dispidGetAccessTokenMethod: 98, + dispidOpenBrowserWindow: 102, + dispidCreateDocumentMethod: 105, dispidGetSelectedTaskMethod: 110, dispidGetSelectedResourceMethod: 111, dispidGetTaskMethod: 112, @@ -1288,9 +1369,16 @@ OSF.DDA.EventDispId = { dispidDialogMessageReceivedEvent: 10, dispidDialogNotificationShownInAddinEvent: 11, dispidDialogParentMessageReceivedEvent: 12, + dispidObjectDeletedEvent: 13, + dispidObjectSelectionChangedEvent: 14, + dispidObjectDataChangedEvent: 15, + dispidContentControlAddedEvent: 16, dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, dispidAppCommandInvokedEvent: 39, dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, dispidTaskSelectionChangedEvent: 56, dispidResourceSelectionChangedEvent: 57, dispidViewSelectionChangedEvent: 58, @@ -1376,6 +1464,8 @@ OSF.DDA.ErrorCodeManager = (function () { ooeBrowserAPINotSupported: 5009, ooeInvalidParam: 5010, ooeRequestTimeout: 5011, + ooeInvalidOrTimedOutSession: 5012, + ooeInvalidApiArguments: 5013, ooeTooManyIncompleteRequests: 5100, ooeRequestTokenUnavailable: 5101, ooeActivityLimitReached: 5102, @@ -1411,7 +1501,18 @@ OSF.DDA.ErrorCodeManager = (function () { ooeEndUserAllow: 12008, ooeEndUserIgnore: 12009, ooeNotUILessDialog: 12010, - ooeCrossZone: 12011 + ooeCrossZone: 12011, + ooeNotSSOAgave: 13000, + ooeSSOUserNotSignedIn: 13001, + ooeSSOUserAborted: 13002, + ooeSSOUnsupportedUserIdentity: 13003, + ooeSSOInvalidResourceUrl: 13004, + ooeSSOInvalidGrant: 13005, + ooeSSOClientError: 13006, + ooeSSOServerError: 13007, + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009, + ooeSSOConnectionLost: 13010 }, initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported] = { name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotSupported }; @@ -1465,9 +1566,11 @@ OSF.DDA.ErrorCodeManager = (function () { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange] = { name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported] = { name: stringNS.L_APINotSupported, message: stringNS.L_BrowserAPINotSupported }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTimeout }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession] = { name: stringNS.L_InvalidOrTimedOutSession, message: stringNS.L_InvalidOrTimedOutSessionMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests] = { name: stringNS.L_APICallFailed, message: stringNS.L_TooManyIncompleteRequests }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable] = { name: stringNS.L_APICallFailed, message: stringNS.L_RequestTokenUnavailable }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached] = { name: stringNS.L_APICallFailed, message: stringNS.L_ActivityLimitReached }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments] = { name: stringNS.L_APICallFailed, message: stringNS.L_InvalidApiArgumentsMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound] = { name: stringNS.L_InvalidNode, message: stringNS.L_CustomXmlNodeNotFound }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError] = { name: stringNS.L_CustomXmlError, message: stringNS.L_CustomXmlError }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota] = { name: stringNS.L_CustomXmlExceedQuotaName, message: stringNS.L_CustomXmlExceedQuotaMessage }; @@ -1498,6 +1601,17 @@ OSF.DDA.ErrorCodeManager = (function () { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogRequireHTTPS }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_UserClickIgnore }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone] = { name: stringNS.L_DisplayDialogError, message: stringNS.L_NewWindowCrossZoneErrorString }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave] = { name: stringNS.L_APINotSupported, message: stringNS.L_InvalidSSOAddinMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn] = { name: stringNS.L_UserNotSignedIn, message: stringNS.L_UserNotSignedIn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted] = { name: stringNS.L_UserAborted, message: stringNS.L_UserAbortedMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity] = { name: stringNS.L_UnsupportedUserIdentity, message: stringNS.L_UnsupportedUserIdentityMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl] = { name: stringNS.L_InvalidResourceUrl, message: stringNS.L_InvalidResourceUrlMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant] = { name: stringNS.L_InvalidGrant, message: stringNS.L_InvalidGrantMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError] = { name: stringNS.L_SSOClientError, message: stringNS.L_SSOClientErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError] = { name: stringNS.L_SSOServerError, message: stringNS.L_SSOServerErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken] = { name: stringNS.L_AddinIsAlreadyRequestingToken, message: stringNS.L_AddinIsAlreadyRequestingTokenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory] = { name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost] = { name: stringNS.L_SSOConnectionLostError, message: stringNS.L_SSOConnectionLostErrorMessage }; } }; })(); @@ -1505,6 +1619,12 @@ var OfficeExt; (function (OfficeExt) { var Requirement; (function (Requirement) { + var RequirementVersion = (function () { + function RequirementVersion() { + } + return RequirementVersion; + })(); + Requirement.RequirementVersion = RequirementVersion; var RequirementMatrix = (function () { function RequirementMatrix(_setMap) { this.isSetSupported = function _isSetSupported(name, minVersion) { @@ -1518,11 +1638,44 @@ var OfficeExt; var sets = setSupportArray._sets; if (sets.hasOwnProperty(name.toLowerCase())) { var setMaxVersion = sets[name.toLowerCase()]; - return setMaxVersion > 0 && setMaxVersion >= minVersion; + try { + var setMaxVersionNum = this._getVersion(setMaxVersion); + minVersion = minVersion + ""; + var minVersionNum = this._getVersion(minVersion); + if (setMaxVersionNum.major > 0 && setMaxVersionNum.major > minVersionNum.major) { + return true; + } + if (setMaxVersionNum.minor > 0 && + setMaxVersionNum.minor > 0 && + setMaxVersionNum.major == minVersionNum.major && + setMaxVersionNum.minor >= minVersionNum.minor) { + return true; + } + } + catch (e) { + return false; + } + } + return false; + }; + this._getVersion = function (version) { + var temp = version.split("."); + var major = 0; + var minor = 0; + if (temp.length < 2 && isNaN(Number(version))) { + throw "version format incorrect"; } else { - return false; + major = Number(temp[0]); + if (temp.length >= 2) { + minor = Number(temp[1]); + } + if (isNaN(major) || isNaN(minor)) { + throw "version format incorrect"; + } } + var result = { "minor": minor, "major": major }; + return result; }; this._setMap = _setMap; this.isSetSupported = this.isSetSupported.bind(this); @@ -1981,6 +2134,7 @@ var OfficeExt; web: Microsoft.Office.WebExtension.PlatformType.OfficeOnline, winrt: Microsoft.Office.WebExtension.PlatformType.Universal, win32: Microsoft.Office.WebExtension.PlatformType.PC, + mac: Microsoft.Office.WebExtension.PlatformType.Mac, ios: Microsoft.Office.WebExtension.PlatformType.iOS, android: Microsoft.Office.WebExtension.PlatformType.Android }; @@ -2154,6 +2308,16 @@ OSF.DDA.Context = function OSF_DDA_Context(officeAppContext, document, license, value: officeAppContext.ui }); } + if (officeAppContext.auth) { + OSF.OUtil.defineEnumerableProperty(this, "auth", { + value: officeAppContext.auth + }); + } + if (officeAppContext.application) { + OSF.OUtil.defineEnumerableProperty(this, "application", { + value: officeAppContext.application + }); + } if (officeAppContext.get_isDialog()) { var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); OSF.OUtil.defineEnumerableProperty(this, "requirements", { @@ -2196,6 +2360,8 @@ OSF.DDA.OutlookContext = function OSF_DDA_OutlookContext(appContext, settings, l }; OSF.OUtil.extend(OSF.DDA.OutlookContext, OSF.DDA.Context); OSF.DDA.OutlookAppOm = function OSF_DDA_OutlookAppOm(appContext, window, appReady) { }; +OSF.DDA.Application = function OSF_DDA_Application(officeAppContext) { +}; OSF.DDA.Document = function OSF_DDA_Document(officeAppContext, settings) { var mode; switch (officeAppContext.get_clientMode()) { @@ -2928,9 +3094,12 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod "ClearFormatsAsync": did.dispidClearFormatsMethod, "SetTableOptionsAsync": did.dispidSetTableOptionsMethod, "SetFormatsAsync": did.dispidSetFormatsMethod, + "GetAccessTokenAsync": did.dispidGetAccessTokenMethod, "ExecuteRichApiRequestAsync": did.dispidExecuteRichApiRequestMethod, "AppCommandInvocationCompletedAsync": did.dispidAppCommandInvocationCompletedMethod, "CloseContainerAsync": did.dispidCloseContainerMethod, + "OpenBrowserWindow": did.dispidOpenBrowserWindow, + "CreateDocumentAsync": did.dispidCreateDocumentMethod, "AddDataPartAsync": did.dispidAddDataPartMethod, "GetDataPartByIdAsync": did.dispidGetDataPartByIdMethod, "GetDataPartsByNameSpaceAsync": did.dispidGetDataPartsByNamespaceMethod, @@ -2970,13 +3139,13 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod } jsom = OSF.DDA.SyncMethodNames; did = OSF.DDA.MethodDispId; - var asyncMethodMap = { + var syncMethodMap = { "MessageParent": did.dispidMessageParentMethod, "SendMessage": did.dispidSendMessageMethod }; - for (var method in asyncMethodMap) { + for (var method in syncMethodMap) { if (jsom[method]) { - dispIdMap[jsom[method].id] = asyncMethodMap[method]; + dispIdMap[jsom[method].id] = syncMethodMap[method]; } } jsom = Microsoft.Office.WebExtension.EventType; @@ -2992,7 +3161,14 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod "AppCommandInvoked": did.dispidAppCommandInvokedEvent, "DialogMessageReceived": did.dispidDialogMessageReceivedEvent, "DialogParentMessageReceived": did.dispidDialogParentMessageReceivedEvent, + "ObjectDeleted": did.dispidObjectDeletedEvent, + "ObjectSelectionChanged": did.dispidObjectSelectionChangedEvent, + "ObjectDataChanged": did.dispidObjectDataChangedEvent, + "ContentControlAdded": did.dispidContentControlAddedEvent, + "RichApiMessage": did.dispidRichApiMessageEvent, "ItemChanged": did.dispidOlkItemSelectedChangedEvent, + "RecipientsChanged": did.dispidOlkRecipientsChangedEvent, + "AppointmentTimeChanged": did.dispidOlkAppointmentTimeChangedEvent, "TaskSelectionChanged": did.dispidTaskSelectionChangedEvent, "ResourceSelectionChanged": did.dispidResourceSelectionChangedEvent, "ViewSelectionChanged": did.dispidViewSelectionChangedEvent, @@ -3005,6 +3181,12 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod dispIdMap[jsom[event]] = eventMap[event]; } } + function IsObjectEvent(dispId) { + return (dispId == OSF.DDA.EventDispId.dispidObjectDeletedEvent || + dispId == OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent || + dispId == OSF.DDA.EventDispId.dispidObjectDataChangedEvent || + dispId == OSF.DDA.EventDispId.dispidContentControlAddedEvent); + } function onException(ex, asyncMethodCall, suppliedArgs, callArgs) { if (typeof ex == "number") { if (!callArgs) { @@ -3030,11 +3212,13 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod window.Excel._RedirectV1APIs = true; } if (window.Excel && window.Excel._RedirectV1APIs && (richApiInExcelMethodSubstitution = window.Excel._V1APIMap[methodName])) { + var preprocessedCallArgs = OSF.OUtil.shallowCopy(callArgs); + delete preprocessedCallArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; if (richApiInExcelMethodSubstitution.preprocess) { - callArgs = richApiInExcelMethodSubstitution.preprocess(callArgs); + preprocessedCallArgs = richApiInExcelMethodSubstitution.preprocess(preprocessedCallArgs); } var ctx = new window.Excel.RequestContext(); - var result = richApiInExcelMethodSubstitution.call(ctx, callArgs); + var result = richApiInExcelMethodSubstitution.call(ctx, preprocessedCallArgs); ctx.sync() .then(function () { var response = result.value; @@ -3042,7 +3226,7 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod delete response["status"]; delete response["@odata.type"]; if (richApiInExcelMethodSubstitution.postprocess) { - response = richApiInExcelMethodSubstitution.postprocess(response, callArgs); + response = richApiInExcelMethodSubstitution.postprocess(response, preprocessedCallArgs); } if (status != 0) { response = OSF.DDA.ErrorCodeManager.getErrorArgs(status); @@ -3060,6 +3244,7 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod else { hostCallArgs = callArgs; } + var startTime = (new Date()).getTime(); delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ "dispId": dispId, "hostCallArgs": hostCallArgs, @@ -3080,6 +3265,9 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod } var payload = asyncMethodCall.processResponse(status, responseArgs, caller, callArgs); OSF.DDA.issueAsyncResult(callArgs, status, payload); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(dispId, hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); + } } }); } @@ -3091,9 +3279,11 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod this[OSF.DDA.DispIdHost.Methods.AddEventHandler] = function OSF_DDA_DispIdHost_Facade$AddEventHandler(suppliedArguments, eventDispatch, caller, isPopupWindow) { var callArgs; var eventType, handler; + var isObjectEvent = false; function onEnsureRegistration(status) { if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { - var added = eventDispatch.addEventHandler(eventType, handler); + var added = !isObjectEvent ? eventDispatch.addEventHandler(eventType, handler) : + eventDispatch.addObjectEventHandler(eventType, callArgs[Microsoft.Office.WebExtension.Parameters.Id], handler); if (!added) { status = OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed; } @@ -3113,19 +3303,25 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); return; } - if (eventDispatch.getEventHandlerCount(eventType) == 0) { - var dispId = dispIdMap[eventType]; + var dispId = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId); + var targetId = (isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId) : eventDispatch.getEventHandlerCount(eventType); + if (count == 0) { var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; invoker({ "eventType": eventType, "dispId": dispId, - "targetId": caller.id || "", + "targetId": targetId, "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, "onComplete": onEnsureRegistration, "onEvent": function handleEvent(hostArgs) { var args = parameterMap.fromHost(dispId, hostArgs); - eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType, caller, args)); + if (!isObjectEvent) + eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType, caller, args)); + else + eventDispatch.fireObjectEvent(targetId, OSF.DDA.OMFactory.manufactureEventArgs(eventType, targetId, args)); } }); } @@ -3140,6 +3336,7 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod this[OSF.DDA.DispIdHost.Methods.RemoveEventHandler] = function OSF_DDA_DispIdHost_Facade$RemoveEventHandler(suppliedArguments, eventDispatch, caller) { var callArgs; var eventType, handler; + var isObjectEvent = false; function onEnsureRegistration(status) { var error; if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { @@ -3152,22 +3349,25 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + var dispId = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId); + var targetId = (isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); var status, removeSuccess; if (handler === null) { - removeSuccess = eventDispatch.clearEventHandlers(eventType); + removeSuccess = isObjectEvent ? eventDispatch.clearObjectEventHandlers(eventType, targetId) : eventDispatch.clearEventHandlers(eventType); status = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; } else { - removeSuccess = eventDispatch.removeEventHandler(eventType, handler); + removeSuccess = isObjectEvent ? eventDispatch.removeObjectEventHandler(eventType, targetId, handler) : eventDispatch.removeEventHandler(eventType, handler); status = removeSuccess ? OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess : OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist; } - if (removeSuccess && eventDispatch.getEventHandlerCount(eventType) == 0) { - var dispId = dispIdMap[eventType]; + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId) : eventDispatch.getEventHandlerCount(eventType); + if (removeSuccess && count == 0) { var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; invoker({ "eventType": eventType, "dispId": dispId, - "targetId": caller.id || "", + "targetId": targetId, "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, "onComplete": onEnsureRegistration @@ -3935,7 +4135,6 @@ OSF.DDA.SafeArray.Delegate.executeAsync = function OSF_DDA_SafeArray_Delegate$Ex if (args.onCalling) { args.onCalling(); } - var startTime = (new Date()).getTime(); OSF.ClientHostController.execute(args.dispId, toArray(args.hostCallArgs), function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode) { var result = hostResponseArgs.toArray(); var status = result[OSF.DDA.SafeArray.Response.Status]; @@ -3982,9 +4181,6 @@ OSF.DDA.SafeArray.Delegate.executeAsync = function OSF_DDA_SafeArray_Delegate$Ex } args.onComplete(status, payload); } - if (OSF.AppTelemetry) { - OSF.AppTelemetry.onMethodDone(args.dispId, args.hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); - } return true; }); } @@ -4100,6 +4296,13 @@ OSF.InitializationHelper.prototype.prepareApiSurface = function OSF_Initializati } } } + if (OSF.DDA.OpenBrowser) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.OpenBrowserWindow]); + } + if (OSF.DDA.Auth) { + appContext.auth = new OSF.DDA.Auth(); + OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth, [OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]); + } OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(appContext, appContext.doc, license, null, getOfficeThemeHandler)); var getDelegateMethods, parameterMap; getDelegateMethods = OSF.DDA.DispIdHost.getClientDelegateMethods; @@ -4824,7 +5027,7 @@ var OSFAriaLogger; function AriaLogger() { } AriaLogger.prototype.getAriaCDNLocation = function () { - return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath() + "/ariatelemetry/aria-web-telemetry-2.8.0.min.js"); + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath() + "/ariatelemetry/aria-web-telemetry.js"); }; AriaLogger.getInstance = function () { if (AriaLogger.AriaLoggerObj === undefined) { @@ -4841,13 +5044,10 @@ var OSFAriaLogger; try { if (!this.ALogger) { var OfficeExtensibilityTenantID = "db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; - var configuration = new microsoft.applications.telemetry.LogConfiguration(); - configuration.enableAutoUserSession = true; - microsoft.applications.telemetry.LogManager.initialize(OfficeExtensibilityTenantID, configuration); - this.ALogger = new microsoft.applications.telemetry.Logger(); + this.ALogger = AWTLogManager.initialize(OfficeExtensibilityTenantID); } - var eventProperties = new microsoft.applications.telemetry.EventProperties(); - eventProperties.name = "Office.Extensibility.OfficeJS." + tableName; + var eventProperties = new AWTEventProperties(); + eventProperties.setName("Office.Extensibility.OfficeJS." + tableName); for (var key in telemetryData) { if (key.toLowerCase() !== "table") { eventProperties.setProperty(key, telemetryData[key]); @@ -4880,6 +5080,7 @@ var OSFAppTelemetry; var sessionId = OSF.OUtil.Guid.generateNewGuid(); var osfControlAppCorrelationId = ""; var omexDomainRegex = new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"); + OSFAppTelemetry.enableTelemetry = true; ; var AppInfo = (function () { function AppInfo() { @@ -4963,17 +5164,19 @@ var OSFAppTelemetry; function AppLogger() { } AppLogger.prototype.LogData = function (data) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, data.SerializeRow(), OSF.Logger.SendFlag.none); - OSFAriaLogger.AriaLogger.getInstance().logData(data); + try { + OSFAriaLogger.AriaLogger.getInstance().logData(data); + } + catch (e) { + } }; AppLogger.prototype.LogRawData = function (log) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, log, OSF.Logger.SendFlag.none); try { OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)); } @@ -5013,7 +5216,7 @@ var OSFAppTelemetry; } appInfo.message = context.get_hostCustomMessage(); appInfo.officeJSVersion = OSF.ConstantNames.FileVersion; - appInfo.hostJSVersion = "16.0.7819.1000"; + appInfo.hostJSVersion = "16.0.8916.1000"; if (context._wacHostEnvironment) { appInfo.wacHostEnvironment = context._wacHostEnvironment; } @@ -6013,11 +6216,18 @@ OSF.DDA.AsyncMethodCalls.define({ Microsoft.Office.WebExtension.EventType = {}; OSF.EventDispatch = function OSF_EventDispatch(eventTypes) { this._eventHandlers = {}; + this._objectEventHandlers = {}; this._queuedEventsArgs = {}; - for (var entry in eventTypes) { - var eventType = eventTypes[entry]; - this._eventHandlers[eventType] = []; - this._queuedEventsArgs[eventType] = []; + if (eventTypes != null) { + for (var i = 0; i < eventTypes.length; i++) { + var eventType = eventTypes[i]; + var isObjectEvent = (eventType == "objectDeleted" || eventType == "objectSelectionChanged" || eventType == "objectDataChanged" || eventType == "contentControlAdded"); + if (!isObjectEvent) + this._eventHandlers[eventType] = []; + else + this._objectEventHandlers[eventType] = {}; + this._queuedEventsArgs[eventType] = []; + } } }; OSF.EventDispatch.prototype = { @@ -6025,23 +6235,37 @@ OSF.EventDispatch.prototype = { var events = []; for (var eventName in this._eventHandlers) events.push(eventName); + for (var eventName in this._objectEventHandlers) + events.push(eventName); return events; }, supportsEvent: function OSF_EventDispatch$supportsEvent(event) { - var isSupported = false; for (var eventName in this._eventHandlers) { - if (event == eventName) { - isSupported = true; - break; - } + if (event == eventName) + return true; + } + for (var eventName in this._objectEventHandlers) { + if (event == eventName) + return true; } - return isSupported; + return false; }, hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) { var handlers = this._eventHandlers[eventType]; if (handlers && handlers.length > 0) { - for (var h in handlers) { - if (handlers[h] === handler) + for (var i = 0; i < handlers.length; i++) { + if (handlers[i] === handler) + return true; + } + } + return false; + }, + hasObjectEventHandler: function OSF_EventDispatch$hasObjectEventHandler(eventType, objectId, handler) { + var handlers = this._objectEventHandlers[eventType]; + if (handlers != null) { + var _handlers = handlers[objectId]; + for (var i = 0; _handlers != null && i < _handlers.length; i++) { + if (_handlers[i] === handler) return true; } } @@ -6060,6 +6284,19 @@ OSF.EventDispatch.prototype = { return false; } }, + addObjectEventHandler: function OSF_EventDispatch$addObjectEventHandler(eventType, objectId, handler) { + if (typeof handler != "function") { + return false; + } + var handlers = this._objectEventHandlers[eventType]; + if (handlers && !this.hasObjectEventHandler(eventType, objectId, handler)) { + if (handlers[objectId] == null) + handlers[objectId] = []; + handlers[objectId].push(handler); + return true; + } + return false; + }, addEventHandlerAndFireQueuedEvent: function OSF_EventDispatch$addEventHandlerAndFireQueuedEvent(eventType, handler) { var handlers = this._eventHandlers[eventType]; var isFirstHandler = handlers.length == 0; @@ -6081,6 +6318,19 @@ OSF.EventDispatch.prototype = { } return false; }, + removeObjectEventHandler: function OSF_EventDispatch$removeObjectEventHandler(eventType, objectId, handler) { + var handlers = this._objectEventHandlers[eventType]; + if (handlers != null) { + var _handlers = handlers[objectId]; + for (var i = 0; _handlers != null && i < _handlers.length; i++) { + if (_handlers[i] === handler) { + _handlers.splice(i, 1); + return true; + } + } + } + return false; + }, clearEventHandlers: function OSF_EventDispatch$clearEventHandlers(eventType) { if (typeof this._eventHandlers[eventType] != "undefined" && this._eventHandlers[eventType].length > 0) { this._eventHandlers[eventType] = []; @@ -6088,23 +6338,51 @@ OSF.EventDispatch.prototype = { } return false; }, + clearObjectEventHandlers: function OSF_EventDispatch$clearObjectEventHandlers(eventType, objectId) { + if (this._objectEventHandlers[eventType] != null && this._objectEventHandlers[eventType][objectId] != null) { + this._objectEventHandlers[eventType][objectId] = []; + return true; + } + return false; + }, getEventHandlerCount: function OSF_EventDispatch$getEventHandlerCount(eventType) { return this._eventHandlers[eventType] != undefined ? this._eventHandlers[eventType].length : -1; }, + getObjectEventHandlerCount: function OSF_EventDispatch$getObjectEventHandlerCount(eventType, objectId) { + if (this._objectEventHandlers[eventType] == null || this._objectEventHandlers[eventType][objectId] == null) + return 0; + return this._objectEventHandlers[eventType][objectId].length; + }, fireEvent: function OSF_EventDispatch$fireEvent(eventArgs) { if (eventArgs.type == undefined) return false; var eventType = eventArgs.type; if (eventType && this._eventHandlers[eventType]) { var eventHandlers = this._eventHandlers[eventType]; - for (var handler in eventHandlers) - eventHandlers[handler](eventArgs); + for (var i = 0; i < eventHandlers.length; i++) { + eventHandlers[i](eventArgs); + } return true; } else { return false; } }, + fireObjectEvent: function OSF_EventDispatch$fireObjectEvent(objectId, eventArgs) { + if (eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if (eventType && this._objectEventHandlers[eventType]) { + var eventHandlers = this._objectEventHandlers[eventType]; + var _handlers = eventHandlers[objectId]; + if (_handlers != null) { + for (var i = 0; i < _handlers.length; i++) + _handlers[i](eventArgs); + return true; + } + } + return false; + }, fireOrQueueEvent: function OSF_EventDispatch$fireOrQueueEvent(eventArgs) { var eventType = eventArgs.type; if (eventType && this._eventHandlers[eventType]) { @@ -6174,6 +6452,15 @@ OSF.DDA.OMFactory.manufactureEventArgs = function OSF_DDA_OMFactory$manufactureE case Microsoft.Office.WebExtension.EventType.AppCommandInvoked: args = OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(eventProperties); break; + case Microsoft.Office.WebExtension.EventType.ObjectDeleted: + case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged: + case Microsoft.Office.WebExtension.EventType.ObjectDataChanged: + case Microsoft.Office.WebExtension.EventType.ContentControlAdded: + args = new OSF.DDA.ObjectEventArgs(eventType, eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); + break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args = new OSF.DDA.RichApiMessageEventArgs(eventType, eventProperties); + break; case Microsoft.Office.WebExtension.EventType.DataNodeInserted: args = new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); break; @@ -6199,10 +6486,28 @@ OSF.DDA.OMFactory.manufactureEventArgs = function OSF_DDA_OMFactory$manufactureE args = new OSF.DDA.DialogParentEventArgs(eventProperties); break; case Microsoft.Office.WebExtension.EventType.ItemChanged: - if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlookwebapp") { + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { args = new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); target.initialize(args["initialData"]); - target.setCurrentItemNumber(args["itemNumber"].itemNumber); + if (OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "win32" || OSF._OfficeAppFactory.getHostInfo()["hostPlatform"] == "mac") { + target.setCurrentItemNumber(args["itemNumber"].itemNumber); + } + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook") { + args = new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); } else { throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); @@ -6382,6 +6687,20 @@ OSF.DDA.AsyncMethodCalls.define({ "types": ["boolean"], "defaultValue": false } + }, + { + name: Microsoft.Office.WebExtension.Parameters.HideTitle, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels, + value: { + "types": ["boolean"], + "defaultValue": false + } } ], privateStateCallbacks: [], @@ -6419,13 +6738,13 @@ OSF.DDA.AsyncMethodCalls.define({ if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] <= 0) { callArgs[Microsoft.Office.WebExtension.Parameters.Width] = 1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Width] = 99; } if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] <= 0) { callArgs[Microsoft.Office.WebExtension.Parameters.Height] = 1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Height] = 99; } if (!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) { @@ -6983,52 +7302,10 @@ OSF.DDA.SettingsManager = { DateJSONPrefix: "Date(", DataJSONSuffix: ")", serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) { - var ret = {}; - for (var key in settingsCollection) { - var value = settingsCollection[key]; - try { - if (JSON) { - value = JSON.stringify(value, function dateReplacer(k, v) { - return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix + this[k].getTime() + OSF.DDA.SettingsManager.DataJSONSuffix : v; - }); - } - else { - value = Sys.Serialization.JavaScriptSerializer.serialize(value); - } - ret[key] = value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.serializeSettings(settingsCollection); }, deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) { - var ret = {}; - serializedSettings = serializedSettings || {}; - for (var key in serializedSettings) { - var value = serializedSettings[key]; - try { - if (JSON) { - value = JSON.parse(value, function dateReviver(k, v) { - var d; - if (typeof v === 'string' && v && v.length > 6 && v.slice(0, 5) === OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1) === OSF.DDA.SettingsManager.DataJSONSuffix) { - d = new Date(parseInt(v.slice(5, -1))); - if (d) { - return d; - } - } - return v; - }); - } - else { - value = Sys.Serialization.JavaScriptSerializer.deserialize(value, true); - } - ret[key] = value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.deserializeSettings(serializedSettings); } }; OSF.DDA.Settings = function OSF_DDA_Settings(settings) { @@ -7563,7 +7840,53 @@ OSF.DDA.DocumentSelectionChangedEventArgs = function OSF_DDA_DocumentSelectionCh } }); }; +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectDeleted: "objectDeleted" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectSelectionChanged: "objectSelectionChanged" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectDataChanged: "objectDataChanged" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ContentControlAdded: "contentControlAdded" }); +OSF.DDA.ObjectEventArgs = function OSF_DDA_ObjectEventArgs(eventType, object) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { value: eventType }, + "object": { value: object } + }); +}; OSF.DDA.SafeArray.Delegate.ParameterMap.define({ type: OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent }); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectDeletedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectDataChangedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidContentControlAddedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); OSF.DDA.SafeArray.Delegate.ParameterMap.define({ type: OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor, fromHost: [ @@ -7878,6 +8201,127 @@ var OfficeExt; AppCommand.registerDdaFacade = registerDdaFacade; })(AppCommand = OfficeExt.AppCommand || (OfficeExt.AppCommand = {})); })(OfficeExt || (OfficeExt = {})); +OSF.DDA.AsyncMethodNames.addNames({ GetAccessTokenAsync: "getAccessTokenAsync" }); +OSF.DDA.Auth = function OSF_DDA_Auth() { +}; +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetAccessTokenAsync, + requiredArguments: [], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.ForceConsent, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, + value: { + "types": ["string"], + "defaultValue": "" + } + } + ], + onSucceeded: function (dataDescriptor, caller, callArgs) { + var data = dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + return data; + } +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetAccessTokenMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.ForceConsent, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, value: 2 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.AsyncMethodNames.addNames({ + ExecuteRichApiRequestAsync: "executeRichApiRequestAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync, + requiredArguments: [ + { + name: Microsoft.Office.WebExtension.Parameters.Data, + types: ["object"] + } + ], + supportedOptions: [] +}); +OSF.OUtil.setNamespace("RichApi", OSF.DDA); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidExecuteRichApiRequestMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.AsyncMethodNames.addNames({ + OpenBrowserWindow: "openBrowserWindow" +}); +OSF.DDA.OpenBrowser = function OSF_DDA_OpenBrowser() { +}; +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.OpenBrowserWindow, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Url, + "types": ["string"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.Reserved, + value: { + "types": ["number"], + "defaultValue": 0 + } + } + ], + privateStateCallbacks: [] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidOpenBrowserWindow, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Reserved, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Url, value: 1 } + ] +}); +OSF.DDA.AsyncMethodNames.addNames({ + CreateDocumentAsync: "createDocumentAsync" +}); +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.CreateDocumentAsync, + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.Base64, + value: { + "types": ["string"], + "defaultValue": "" + } + } + ], + privateStateCallbacks: [] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidCreateDocumentMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Base64, value: 0 } + ] +}); OSF.DDA.PowerPointDocument = function OSF_DDA_PowerPointDocument(officeAppContext, settings) { OSF.DDA.PowerPointDocument.uber.constructor.call(this, officeAppContext, settings); OSF.DDA.DispIdHost.addAsyncMethods(this, [ @@ -7902,6 +8346,7 @@ OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize = fun OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM = function OSF_InitializationHelper$loadAppSpecificScriptAndCreateOM(appContext, appReady, basePath) { OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM); appContext.doc = new OSF.DDA.PowerPointDocument(appContext, this._initializeSettings(true)); + OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi, [OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]); appReady(); }; OSF.InitializationHelper.prototype.prepareApiSurface = function OSF_InitializationHelper$PowerPointWin32_prepareApiSurface(appContext) { @@ -7912,6 +8357,16 @@ OSF.InitializationHelper.prototype.prepareApiSurface = function OSF_Initializati else { appContext.ui = new OSF.DDA.UI.ParentUI(); } + if (OSF.DDA.OpenBrowser) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.OpenBrowserWindow]); + } + if (OSF.DDA.Auth) { + appContext.auth = new OSF.DDA.Auth(); + OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth, [OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]); + } + appContext.application = new OSF.DDA.Application(appContext); + OSF.DDA.DispIdHost.addAsyncMethods(appContext.application, [OSF.DDA.AsyncMethodNames.CreateDocumentAsync]); + OSF.OUtil.finalizeProperties(appContext.application); OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(appContext, appContext.doc, license, null, OSF.DDA.OfficeTheme.getOfficeTheme)); OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.DispIdHost.getClientDelegateMethods, OSF.DDA.SafeArray.Delegate.ParameterMap)); var themeHandler = new OSF.DDA.Theming.InternalThemeHandler(); diff --git a/node_modules/@microsoft/office-js/dist/powerpoint-win32-16.01.js b/node_modules/@microsoft/office-js/dist/powerpoint-win32-16.01.js index ca306ee..3da13a2 100644 --- a/node_modules/@microsoft/office-js/dist/powerpoint-win32-16.01.js +++ b/node_modules/@microsoft/office-js/dist/powerpoint-win32-16.01.js @@ -1,5 +1,5 @@ /* PowerPoint specific API library */ -/* Version: 16.0.7819.1000 */ +/* Version: 16.0.8916.1000 */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ @@ -9,4 +9,4 @@ Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419. */ -var __extends=this&&this.__extends||function(b,a){for(var c in a)if(a.hasOwnProperty(c))b[c]=a[c];function d(){this.constructor=b}b.prototype=a===null?Object.create(a):(d.prototype=a.prototype,new d)},OfficeExt;(function(b){var a=function(){var a=true;function b(){}b.prototype.isMsAjaxLoaded=function(){var b="function",c="undefined";if(typeof Sys!==c&&typeof Type!==c&&Sys.StringBuilder&&typeof Sys.StringBuilder===b&&Type.registerNamespace&&typeof Type.registerNamespace===b&&Type.registerClass&&typeof Type.registerClass===b&&typeof Function._validateParams===b&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===b)return a;else return false};b.prototype.loadMsAjaxFull=function(b){var a=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(a,b)};Object.defineProperty(b.prototype,"msAjaxError",{"get":function(){var a=this;if(a._msAjaxError==null&&a.isMsAjaxLoaded())a._msAjaxError=Error;return a._msAjaxError},"set":function(a){this._msAjaxError=a},enumerable:a,configurable:a});Object.defineProperty(b.prototype,"msAjaxString",{"get":function(){var a=this;if(a._msAjaxString==null&&a.isMsAjaxLoaded())a._msAjaxString=String;return a._msAjaxString},"set":function(a){this._msAjaxString=a},enumerable:a,configurable:a});Object.defineProperty(b.prototype,"msAjaxDebug",{"get":function(){var a=this;if(a._msAjaxDebug==null&&a.isMsAjaxLoaded())a._msAjaxDebug=Sys.Debug;return a._msAjaxDebug},"set":function(a){this._msAjaxDebug=a},enumerable:a,configurable:a});return b}();b.MicrosoftAjaxFactory=a})(OfficeExt||(OfficeExt={}));var OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory,OSF=OSF||{},OfficeExt;(function(b){var a=function(){function a(a){this._internalStorage=a}a.prototype.getItem=function(a){try{return this._internalStorage&&this._internalStorage.getItem(a)}catch(b){return null}};a.prototype.setItem=function(b,a){try{this._internalStorage&&this._internalStorage.setItem(b,a)}catch(c){}};a.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(a){}};a.prototype.removeItem=function(a){try{this._internalStorage&&this._internalStorage.removeItem(a)}catch(b){}};a.prototype.getKeysWithPrefix=function(d){var b=[];try{for(var e=this._internalStorage&&this._internalStorage.length||0,a=0;a0)b.push(a);else a.tabIndex===0&&c.push(a);else c.push(a)}b=b.sort(function(d,c){var a=d.tabIndex-c.tabIndex;if(a===0)a=b.indexOf(d)-b.indexOf(c);return a});return [].concat(b,c)}return {set_entropy:function(a){if(typeof a=="string")for(var b=0;b1?f[f.length-1]:a;if(k&&b!=a){if(b.indexOf(u)>=0)b=b.split(u)[0];b=decodeURIComponent(b)}var c=p();if(!i&&c){var e=window.name.indexOf(j);if(e>d){var g=window.name.indexOf(";",e);if(g==d)g=window.name.length;var h=window.name.substring(e,g);if(b)c.setItem(h,b);else b=c.getItem(h)}}return b},getConversationId:function(){var c=window.location.search,b=a;if(c){var d=c.indexOf("&");b=d>0?c.substring(1,d):c.substr(1);if(b&&b.charAt(b.length-1)==="="){b=b.substring(0,b.length-1);if(b)b=decodeURIComponent(b)}}return b},getInfoItems:function(b){var a=b.split("$");if(typeof a[1]==h)a=b.split("|");if(typeof a[1]==h)a=b.split("%7C");return a},getXdmFieldValue:function(e,d){var b="",c=OSF.OUtil.parseXdmInfo(d);if(c){var a=OSF.OUtil.getInfoItems(c);if(a!=undefined&&a.length>=3)switch(e){case OSF.XdmFieldName.ConversationUrl:b=a[2];break;case OSF.XdmFieldName.AppId:b=a[1]}}return b},validateParamObject:function(f,e){var a=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:c},{name:"expectedProperties",type:Object,mayBeNull:c},{name:"callback",type:Function,mayBeNull:b}]);if(a)throw a;for(var d in e){a=Function._validateParameter(f[d],e[d],d);if(a)throw a}},writeProfilerMark:function(a){if(window.msWriteProfilerMark){window.msWriteProfilerMark(a);OsfMsAjaxFactory.msAjaxDebug.trace(a)}},outputDebug:function(a){typeof OsfMsAjaxFactory!==h&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(a)},defineNondefaultProperty:function(e,f,a,c){a=a||{};for(var g in c){var d=c[g];if(a[d]==undefined)a[d]=b}Object.defineProperty(e,f,a);return e},defineNondefaultProperties:function(c,a,d){a=a||{};for(var b in a)OSF.OUtil.defineNondefaultProperty(c,b,a[b],d);return c},defineEnumerableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[e])},defineEnumerableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[e])},defineMutableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[k,e,l])},defineMutableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[k,e,l])},finalizeProperties:function(e,d){d=d||{};for(var g=Object.getOwnPropertyNames(e),i=g.length,f=0;f>8;f=g&255;b[a++]=d>>2;b[a++]=(d&3)<<4|e>>4;b[a++]=(e&15)<<2|f>>6;b[a++]=f&63;if(!isNaN(g)){d=g>>8;e=i&255;f=i>>8;b[a++]=d>>2;b[a++]=(d&3)<<4|e>>4;b[a++]=(e&15)<<2|f>>6;b[a++]=f&63}if(isNaN(g))b[a-1]=64;else if(isNaN(i)){b[a-2]=64;b[a-1]=64}for(var k=0;k0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(b){if(b==a)return a;else if(Array.isArray(b)){for(var e=[],d=0;dc)return d;else if(a===0&&b)return d;else if(a===c-1&&!b)return d;if(b)return a-1;else return a+1};e=t(e);h=j?e.length-1:0;if(e.length===0)return a;while(!i&&h>=0&&hc)return d;else if(a===0&&b)return d;else if(a===c-1&&!b)return d;if(b)return a-1;else return a+1};f=t(f);k=n(f,o);e=j(f.length,k,m);if(e<0)return a;while(!i&&e>=0&&e0;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[d%16];d=Math.floor(d/16)}for(;b<32;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[Math.floor(Math.random()*16)]}return c}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(y,u,p,n,r,v,q,t,x,j,w,l,k,m,h,g,f,e,i,c,d,s,o,b){var a=this;a._id=y;a._appName=u;a._appVersion=p;a._appUILocale=n;a._dataLocale=r;a._docUrl=v;a._clientMode=q;a._settings=t;a._reason=x;a._osfControlType=j;a._eToken=w;a._correlationId=l;a._appInstanceId=k;a._touchEnabled=m;a._commerceAllowed=h;a._appMinorVersion=g;a._requirementMatrix=f;a._hostCustomMessage=e;a._hostFullVersion=i;a._isDialog=false;a._clientWindowHeight=c;a._clientWindowWidth=d;a._addinName=s;a._appDomains=o;a._dialogRequirementMatrix=b;a.get_id=function(){return this._id};a.get_appName=function(){return this._appName};a.get_appVersion=function(){return this._appVersion};a.get_appUILocale=function(){return this._appUILocale};a.get_dataLocale=function(){return this._dataLocale};a.get_docUrl=function(){return this._docUrl};a.get_clientMode=function(){return this._clientMode};a.get_bindings=function(){return this._bindings};a.get_settings=function(){return this._settings};a.get_reason=function(){return this._reason};a.get_osfControlType=function(){return this._osfControlType};a.get_eToken=function(){return this._eToken};a.get_correlationId=function(){return this._correlationId};a.get_appInstanceId=function(){return this._appInstanceId};a.get_touchEnabled=function(){return this._touchEnabled};a.get_commerceAllowed=function(){return this._commerceAllowed};a.get_appMinorVersion=function(){return this._appMinorVersion};a.get_requirementMatrix=function(){return this._requirementMatrix};a.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};a.get_hostCustomMessage=function(){return this._hostCustomMessage};a.get_hostFullVersion=function(){return this._hostFullVersion};a.get_isDialog=function(){return this._isDialog};a.get_clientWindowHeight=function(){return this._clientWindowHeight};a.get_clientWindowWidth=function(){return this._clientWindowWidth};a.get_addinName=function(){return this._addinName};a.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(b,a){if(a==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||a==Microsoft.Office.WebExtension.EventType.BindingDataChanged||a==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||a==Microsoft.Office.WebExtension.EventType.DataNodeInserted||a==Microsoft.Office.WebExtension.EventType.DataNodeReplaced)return b+"_"+a;else return a};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidActivationStatusChangedEvent:32,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var a={};return {getErrorArgs:function(c){var b=a[c];if(!b)b=a[this.errorCodes.ooeInternalError];else{if(!b.name)b.name=a[this.errorCodes.ooeInternalError].name;if(!b.message)b.message=a[this.errorCodes.ooeInternalError].message}return b},addErrorMessage:function(c,b){a[c]=b},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11000,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12000,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011},initializeErrorMessages:function(b){a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:b.L_DataReadError,message:b.L_GetSelectionNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotMatchBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:b.L_DataReadError,message:b.L_InvalidGetRowColumnCounts};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:b.L_DataReadError,message:b.L_SelectionNotSupportCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:b.L_DataReadError,message:b.L_InvalidGetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:b.L_DataReadError,message:b.L_NonUniformPartialGetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:b.L_DataReadError,message:b.L_GetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:b.L_DataReadError,message:b.L_FileTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:b.L_DataReadError,message:b.L_GetDataParametersConflict};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:b.L_DataReadError,message:b.L_InvalidGetColumns};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:b.L_DataReadError,message:b.L_InvalidGetRows};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:b.L_DataReadError,message:b.L_InvalidReadForBlankRow};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:b.L_DataWriteError,message:b.L_UnsupportedDataObject};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:b.L_DataWriteError,message:b.L_CannotWriteToSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:b.L_DataWriteError,message:b.L_DataNotMatchSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:b.L_DataWriteError,message:b.L_OverwriteWorksheetData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:b.L_DataWriteError,message:b.L_DataNotMatchBindingSize};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:b.L_DataWriteError,message:b.L_InvalidSetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:b.L_InvalidFormat,message:b.L_InvalidDataFormat};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:b.L_DataWriteError,message:b.L_SetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:b.L_DataWriteError,message:b.L_NonUniformPartialSetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:b.L_DataWriteError,message:b.L_InvalidSetColumns};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:b.L_DataWriteError,message:b.L_InvalidSetRows};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:b.L_DataWriteError,message:b.L_SetDataParametersConflict};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:b.L_BindingCreationError,message:b.L_SelectionCannotBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:b.L_InvalidBindingError,message:b.L_BindingNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:b.L_BindingCreationError,message:b.L_BindingToMultipleSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidSelectionForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnThisBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:b.L_BindingCreationError,message:b.L_NamedItemNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:b.L_BindingCreationError,message:b.L_MultipleNamedItemFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidNamedItemForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:b.L_InvalidBinding,message:b.L_UnknownBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnMatrixData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:b.L_InvalidBinding,message:b.L_InvalidColumnsForBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:b.L_ReadSettingsError,message:b.L_SettingNameNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:b.L_SaveSettingsError,message:b.L_SettingsCannotSave};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:b.L_SettingsStaleError,message:b.L_SettingsAreStale};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:b.L_HostError,message:b.L_OperationNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:b.L_InternalError,message:b.L_InternalErrorDescription};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:b.L_PermissionDenied,message:b.L_DocumentReadOnly};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:b.L_EventRegistrationError,message:b.L_EventHandlerNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:b.L_InvalidAPICall,message:b.L_InvalidApiCallInContext};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:b.L_ShuttingDown,message:b.L_ShuttingDown};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:b.L_UnsupportedEnumeration,message:b.L_UnsupportedEnumerationMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:b.L_APINotSupported,message:b.L_BrowserAPINotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:b.L_APICallFailed,message:b.L_RequestTimeout};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:b.L_APICallFailed,message:b.L_TooManyIncompleteRequests};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:b.L_APICallFailed,message:b.L_RequestTokenUnavailable};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:b.L_APICallFailed,message:b.L_ActivityLimitReached};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:b.L_InvalidNode,message:b.L_CustomXmlNodeNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:b.L_CustomXmlError,message:b.L_CustomXmlError};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:b.L_CustomXmlExceedQuotaName,message:b.L_CustomXmlExceedQuotaMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:b.L_CustomXmlOutOfDateName,message:b.L_CustomXmlOutOfDateMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:b.L_CannotNavigateTo,message:b.L_CannotNavigateTo};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:b.L_SpecifiedIdNotExist,message:b.L_SpecifiedIdNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:b.L_NavOutOfBound,message:b.L_NavOutOfBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:b.L_DataWriteReminder,message:b.L_CellDataAmountBeyondLimits};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:b.L_MissingParameter,message:b.L_ElementMissing};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:b.L_InvalidValue,message:b.L_InvalidCellsValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:b.L_InvalidValue,message:b.L_InvalidTableOptionValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:b.L_InvalidValue,message:b.L_InvalidFormatValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_RowIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_ColIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:b.L_OutOfRange,message:b.L_FormatValueOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:b.L_FormattingReminder,message:b.L_CellFormatAmountBeyondLimits};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:b.L_MemoryLimit,message:b.L_CloseFileBeforeRetrieve};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:b.L_NetworkProblem,message:b.L_NetworkProblemRetrieveFile};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:b.L_InvalidValue,message:b.L_SliceSizeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:b.L_DisplayDialogError,message:b.L_DialogAlreadyOpened};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:b.L_DisplayDialogError,message:b.L_NetworkProblem};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:b.L_DialogNavigateError,message:b.L_DialogInvalidScheme};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:b.L_DisplayDialogError,message:b.L_DialogAddressNotTrusted};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:b.L_DisplayDialogError,message:b.L_DialogRequireHTTPS};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:b.L_DisplayDialogError,message:b.L_UserClickIgnore};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:b.L_DisplayDialogError,message:b.L_NewWindowCrossZoneErrorString}}}}();var OfficeExt;(function(a){var b;(function(b){var a=1.1,d=function(){function a(b){var a=this;a.isSetSupported=function(b,a){if(b==undefined)return false;if(a==undefined)a=0;var e=this._setMap,d=e._sets;if(d.hasOwnProperty(b.toLowerCase())){var c=d[b.toLowerCase()];return c>0&&c>=a}else return false};a._setMap=b;a.isSetSupported=a.isSetSupported.bind(a)}return a}();b.RequirementMatrix=d;var c=function(){function a(a){this._addSetMap=function(a){for(var b in a)this._sets[b]=a[b]};this._sets=a}return a}();b.DefaultSetRequirement=c;var x=function(c){__extends(b,c);function b(){c.call(this,{dialogapi:a})}return b}(c);b.DefaultDialogSetRequirement=x;var f=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,excelapi:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a})}return b}(c);b.ExcelClientDefaultSetRequirement=f;var k=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({imagecoercion:a})}return b}(f);b.ExcelClientV1DefaultSetRequirement=k;var l=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.3})}return a}(c);b.OutlookClientDefaultSetRequirement=l;var h=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,compressedfile:a,customxmlparts:a,documentevents:a,file:a,htmlcoercion:a,matrixbindings:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,textfile:a,wordapi:a})}return b}(c);b.WordClientDefaultSetRequirement=h;var p=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:a})}return b}(h);b.WordClientV1DefaultSetRequirement=p;var e=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,compressedfile:a,documentevents:a,file:a,pdffile:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.PowerpointClientDefaultSetRequirement=e;var j=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({imagecoercion:a})}return b}(e);b.PowerpointClientV1DefaultSetRequirement=j;var o=function(c){__extends(b,c);function b(){c.call(this,{selection:a,textcoercion:a})}return b}(c);b.ProjectClientDefaultSetRequirement=o;var u=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,file:a})}return b}(c);b.ExcelWebDefaultSetRequirement=u;var w=function(c){__extends(b,c);function b(){c.call(this,{compressedfile:a,documentevents:a,file:a,imagecoercion:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablecoercion:a,textcoercion:a,textfile:a})}return b}(c);b.WordWebDefaultSetRequirement=w;var n=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,settings:a})}return b}(c);b.PowerpointWebDefaultSetRequirement=n;var g=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.3})}return a}(c);b.OutlookWebDefaultSetRequirement=g;var v=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,documentevents:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.SwayWebDefaultSetRequirement=v;var r=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,partialtablebindings:a,settings:a,tablebindings:a,tablecoercion:a})}return b}(c);b.AccessWebDefaultSetRequirement=r;var t=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a})}return b}(c);b.ExcelIOSDefaultSetRequirement=t;var i=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,compressedfile:a,customxmlparts:a,documentevents:a,file:a,htmlcoercion:a,matrixbindings:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,textfile:a})}return b}(c);b.WordIOSDefaultSetRequirement=i;var s=function(b){__extends(a,b);function a(){b.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return a}(i);b.WordIOSV1DefaultSetRequirement=s;var m=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,compressedfile:a,documentevents:a,file:a,pdffile:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.PowerpointIOSDefaultSetRequirement=m;var q=function(c){__extends(b,c);function b(){c.call(this,{mailbox:a})}return b}(c);b.OutlookIOSDefaultSetRequirement=q;var y=function(){var b="undefined";function a(){}a.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)};a.getDefaultRequirementMatrix=function(f){this.initializeDefaultSetMatrix();var e=undefined,g=f.get_requirementMatrix();if(g!=undefined&&g.length>0&&typeof JSON!==b){var i=JSON.parse(f.get_requirementMatrix().toLowerCase());e=new d(new c(i))}else{var h=a.getClientFullVersionString(f);if(a.DefaultSetArrayMatrix!=undefined&&a.DefaultSetArrayMatrix[h]!=undefined)e=new d(a.DefaultSetArrayMatrix[h]);else e=new d(new c({}))}return e};a.getDefaultDialogRequirementMatrix=function(f){var a=undefined,e=f.get_dialogRequirementMatrix();if(e!=undefined&&e.length>0&&typeof JSON!==b){var g=JSON.parse(f.get_requirementMatrix().toLowerCase());a=new d(new c(g))}else a=new d(new x);return a};a.getClientFullVersionString=function(a){var d=a.get_appMinorVersion(),e="",b="",c=a.get_appName(),f=c==1024||c==4096||c==8192||c==65536;if(f&&a.get_appVersion()==1)if(c==4096&&d>=15)b="16.00.01";else b="16.00";else if(a.get_appName()==64)b=a.get_appVersion();else{if(d<10)e="0"+d;else e=""+d;b=a.get_appVersion()+"."+e}return a.get_appName()+"-"+b};a.initializeDefaultSetMatrix=function(){a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1600]=new f;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1600]=new h;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1600]=new e;a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1601]=new k;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1601]=new p;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1601]=new j;a.DefaultSetArrayMatrix[a.Outlook_RCLIENT_1600]=new l;a.DefaultSetArrayMatrix[a.Excel_WAC_1600]=new u;a.DefaultSetArrayMatrix[a.Word_WAC_1600]=new w;a.DefaultSetArrayMatrix[a.Outlook_WAC_1600]=new g;a.DefaultSetArrayMatrix[a.Outlook_WAC_1601]=new g;a.DefaultSetArrayMatrix[a.Project_RCLIENT_1600]=new o;a.DefaultSetArrayMatrix[a.Access_WAC_1600]=new r;a.DefaultSetArrayMatrix[a.PowerPoint_WAC_1600]=new n;a.DefaultSetArrayMatrix[a.Excel_IOS_1600]=new t;a.DefaultSetArrayMatrix[a.SWAY_WAC_1600]=new v;a.DefaultSetArrayMatrix[a.Word_IOS_1600]=new i;a.DefaultSetArrayMatrix[a.Word_IOS_16001]=new s;a.DefaultSetArrayMatrix[a.PowerPoint_IOS_1600]=new m;a.DefaultSetArrayMatrix[a.Outlook_IOS_1600]=new q};a.Excel_RCLIENT_1600="1-16.00";a.Excel_RCLIENT_1601="1-16.01";a.Word_RCLIENT_1600="2-16.00";a.Word_RCLIENT_1601="2-16.01";a.PowerPoint_RCLIENT_1600="4-16.00";a.PowerPoint_RCLIENT_1601="4-16.01";a.Outlook_RCLIENT_1600="8-16.00";a.Excel_WAC_1600="16-16.00";a.Word_WAC_1600="32-16.00";a.Outlook_WAC_1600="64-16.00";a.Outlook_WAC_1601="64-16.01";a.Project_RCLIENT_1600="128-16.00";a.Access_WAC_1600="256-16.00";a.PowerPoint_WAC_1600="512-16.00";a.Excel_IOS_1600="1024-16.00";a.SWAY_WAC_1600="2048-16.00";a.Word_IOS_1600="4096-16.00";a.Word_IOS_16001="4096-16.00.01";a.PowerPoint_IOS_1600="8192-16.00";a.Outlook_IOS_1600="65536-16.00";a.DefaultSetArrayMatrix={};return a}();b.RequirementsMatrixFactory=y})(b=a.Requirement||(a.Requirement={}))})(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda();var OfficeExt;(function(a){var b;(function(a){var b=function(){function a(){var a=this;a.getDiagnostics=function(b){var a={host:this.getHost(),version:b||this.getDefaultVersion(),platform:this.getPlatform()};return a};a.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};a.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};a.hostInfo=OSF._OfficeAppFactory.getHostInfo();a.getHost=a.getHost.bind(a);a.getPlatform=a.getPlatform.bind(a);a.getDiagnostics=a.getDiagnostics.bind(a)}a.prototype.capitalizeFirstLetter=function(a){if(a)return a[0].toUpperCase()+a.slice(1).toLowerCase();return a};a.getInstance=function(){if(a.hostObj===undefined)a.hostObj=new a;return a.hostObj};a.prototype.getPlatform=function(){var a=this;if(a.hostInfo.hostPlatform){var b=a.hostInfo.hostPlatform.toLowerCase();if(a.platformRemappings[b])return a.platformRemappings[b]}return null};a.prototype.getHost=function(){var a=this;if(a.hostInfo.hostType){var b=a.hostInfo.hostType.toLowerCase();if(a.camelCaseMappings[b])return a.camelCaseMappings[b];b=a.capitalizeFirstLetter(a.hostInfo.hostType);if(Microsoft.Office.WebExtension.HostType[b])return Microsoft.Office.WebExtension.HostType[b]}return null};a.prototype.getDefaultVersion=function(){if(this.getHost())return "16.0.0000.0000";return null};return a}();a.Host=b})(b=a.HostName||(a.HostName={}))})(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var b,a=false;return {enableShortcut:function(){if(!a){if(window.Office)b=window.Office;else OSF.OUtil.setNamespace("Office",window);window.Office=Microsoft.Office.WebExtension;a=true}},disableShortcut:function(){if(a){if(b)window.Office=b;else OSF.OUtil.unsetNamespace("Office",window);a=false}}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(a){if(a)OSF.NamespaceManager.enableShortcut();else OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(a,b){var c;if(a&&typeof a=="string"){var d=a.indexOf("#");if(d!=-1){var h=a.substring(0,d),g=a.substring(d+1);switch(h){case "binding":case "bindings":if(g)c=new OSF.DDA.BindingPromise(g)}}}if(!c){if(b){var e=typeof b;if(e=="function"){var f={};f[Microsoft.Office.WebExtension.Parameters.Callback]=b;OSF.DDA.issueAsyncResult(f,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,e)}}else{c.onFail=b;return c}};OSF.DDA.Context=function(a,g,h,c,d){var f="requirements",b=this;OSF.OUtil.defineEnumerableProperties(b,{contentLanguage:{value:a.get_dataLocale()},displayLanguage:{value:a.get_appUILocale()},touchEnabled:{value:a.get_touchEnabled()},commerceAllowed:{value:a.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(a.get_hostFullVersion())}});h&&OSF.OUtil.defineEnumerableProperty(b,"license",{value:h});a.ui&&OSF.OUtil.defineEnumerableProperty(b,"ui",{value:a.ui});if(a.get_isDialog()){var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,f,{value:e})}else{g&&OSF.OUtil.defineEnumerableProperty(b,"document",{value:g});if(c){var i=c.displayName||"appOM";delete c.displayName;OSF.OUtil.defineEnumerableProperty(b,i,{value:c})}d&&OSF.OUtil.defineEnumerableProperty(b,"officeTheme",{"get":function(){return d()}});var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,f,{value:e})}};OSF.DDA.OutlookContext=function(c,a,d,e,b){OSF.DDA.OutlookContext.uber.constructor.call(this,c,null,d,e,b);a&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:a})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(b,c){var a;switch(b.get_clientMode()){case OSF.ClientMode.ReadOnly:a=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:a=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}c&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:c});OSF.OUtil.defineMutableProperties(this,{mode:{value:a},url:{value:b.get_docUrl()}})};OSF.DDA.JsomDocument=function(d,b,e){var a=this;OSF.DDA.JsomDocument.uber.constructor.call(a,d,e);b&&OSF.OUtil.defineEnumerableProperty(a,"bindings",{"get":function(){return b}});var c=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(a,[c.GetSelectedDataAsync,c.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(a,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{"get":function(){var a;if(OSF&&OSF._OfficeAppFactory)a=OSF._OfficeAppFactory.getContext();return a}});OSF.DDA.License=function(a){OSF.OUtil.defineEnumerableProperty(this,"value",{value:a})};OSF.DDA.ApiMethodCall=function(c,f,e,g,h){var a=this,d=c.length,b=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,h)});a.verifyArguments=function(d,f){for(var e in d){var a=d[e],c=f[e];if(a["enum"])switch(typeof c){case "string":if(OSF.OUtil.listContainsValue(a["enum"],c))break;case "undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw b()}if(a["types"])if(!OSF.OUtil.listContainsValue(a["types"],typeof c))throw b()}};a.extractRequiredArguments=function(g,l,j){if(g.lengthc+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var d,f,i=h.length-1;i>=c;i--){var g=h[i];switch(typeof g){case "object":if(d)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else d=g;break;case a:if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else f=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}d=b.fillOptions(d,j,l,k);if(f)if(d[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else d[Microsoft.Office.WebExtension.Parameters.Callback]=f;b.verifyArguments(e,d);return d}this.verifyAndExtractCall=function(e,c,a){var d=b.extractRequiredArguments(e,c,a),g=h(e,d,c,a),f=b.constructCallArgs(d,g,c,a);return f};this.processResponse=function(c,b,e,d){var a;if(c==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)if(f)a=f(b,e,d);else a=b;else if(g)a=g(c,b);else a=OSF.DDA.ErrorCodeManager.getErrorArgs(c);return a};this.getCallArgs=function(g){for(var b,d,f=g.length-1;f>=c;f--){var e=g[f];switch(typeof e){case "object":b=e;break;case a:d=e}}b=b||{};if(d)b[Microsoft.Office.WebExtension.Parameters.Callback]=d;return b}};OSF.DDA.AsyncMethodCallFactory=function(){return {manufacture:function(a){var c=a.supportedOptions?OSF.OUtil.createObject(a.supportedOptions):[],b=a.privateStateCallbacks?OSF.OUtil.createObject(a.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(a.requiredArguments||[],c,b,a.onSucceeded,a.onFailed,a.checkCallArgs,a.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(a){OSF.DDA.AsyncMethodCalls[a.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(a)};OSF.DDA.Error=function(c,a,b){OSF.OUtil.defineEnumerableProperties(this,{name:{value:c},message:{value:a},code:{value:b}})};OSF.DDA.AsyncResult=function(b,a){OSF.OUtil.defineEnumerableProperties(this,{value:{value:b[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:a?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});b[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:b[OSF.DDA.AsyncResultEnum.Properties.Context]});a&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(a[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(d,f,a){var e=d[Microsoft.Office.WebExtension.Parameters.Callback];if(e){var c={};c[OSF.DDA.AsyncResultEnum.Properties.Context]=d[Microsoft.Office.WebExtension.Parameters.AsyncContext];var b;if(f==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)c[OSF.DDA.AsyncResultEnum.Properties.Value]=a;else{b={};a=a||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);b[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=f||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=a.name||a;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=a.message||a}e(new OSF.DDA.AsyncResult(c,b))}};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(b){for(var a in b){var c={};OSF.OUtil.defineEnumerableProperties(c,{id:{value:a},displayName:{value:b[a]}});OSF.DDA.SyncMethodNames[a]=c}};OSF.DDA.SyncMethodCall=function(b,c,f,g,h){var d=b.length,a=new OSF.DDA.ApiMethodCall(b,c,f,g,h);function e(e,h,j,i){if(e.length>d+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var b,k,f=e.length-1;f>=d;f--){var g=e[f];switch(typeof g){case "object":if(b)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else b=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}b=a.fillOptions(b,h,j,i);a.verifyArguments(c,b);return b}this.verifyAndExtractCall=function(f,c,b){var d=a.extractRequiredArguments(f,c,b),h=e(f,d,c,b),g=a.constructCallArgs(d,h,c,b);return g}};OSF.DDA.SyncMethodCallFactory=function(){return {manufacture:function(a){var b=a.supportedOptions?OSF.OUtil.createObject(a.supportedOptions):[];return new OSF.DDA.SyncMethodCall(a.requiredArguments||[],b,a.privateStateCallbacks,a.checkCallArgs,a.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(a){OSF.DDA.SyncMethodCalls[a.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(a)};OSF.DDA.ListType=function(){var a={};return {setListType:function(c,b){a[c]=b},isListType:function(b){return OSF.OUtil.listContainsKey(a,b)},getDescriptor:function(b){return a[b]}}}();OSF.DDA.HostParameterMap=function(b,c){var j="fromHost",a=this,i="toHost",e=j,l="sourceData",g="self",d={};d[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(a){if(a!=null&&a.rows!==undefined){var b={};b[OSF.DDA.TableDataProperties.TableRows]=a.rows;b[OSF.DDA.TableDataProperties.TableHeaders]=a.headers;a=b}return a},fromHost:function(a){return a}};d[Microsoft.Office.WebExtension.Parameters.SampleData]=d[Microsoft.Office.WebExtension.Parameters.Data];function f(j,i){var m=j?{}:undefined;for(var h in j){var g=j[h],a;if(OSF.DDA.ListType.isListType(h)){a=[];for(var n in g)a.push(f(g[n],i))}else if(OSF.OUtil.listContainsKey(d,h))a=d[h][i](g);else if(i==e&&b.preserveNesting(h))a=f(g,i);else{var k=c[h];if(k){var l=k[i];if(l){a=l[g];if(a===undefined)a=g}}else a=g}m[h]=a}return m}function k(j,h){var e;for(var a in h){var d;if(b.isComplexType(a))d=k(j,c[a][i]);else d=j[a];if(d!=undefined){if(!e)e={};var f=h[a];if(f==g)f=a;e[f]=b.pack(a,d)}}return e}function h(j,n,f){if(!f)f={};for(var a in n){var k=n[a],d;if(k==g)d=j;else if(k==l){f[a]=j.toArray();continue}else d=j[k];if(d===null||d===undefined)f[a]=undefined;else{d=b.unpack(a,d);var i;if(b.isComplexType(a)){i=c[a][e];if(b.preserveNesting(a))f[a]=h(d,i);else h(d,i,f)}else if(OSF.DDA.ListType.isListType(a)){i={};var p=OSF.DDA.ListType.getDescriptor(a);i[p]=g;var m=new Array(d.length);for(var o in d)m[o]=h(d[o],i);f[a]=m}else f[a]=d}}return f}function m(l,e,a){var d=c[l][a],b;if(a=="toHost"){var i=f(e,a);b=k(i,d)}else if(a==j){var g=h(e,d);b=f(g,a)}return b}if(!c)c={};a.addMapping=function(l,h){var a,d;if(h.map){a=h.map;d={};for(var j in a){var k=a[j];if(k==g)k=j;d[k]=j}}else{a=h.toHost;d=h.fromHost}var b=c[l];if(b){var f=b[i];for(var n in f)a[n]=f[n];f=b[e];for(var m in f)d[m]=f[m]}else b=c[l]={};b[i]=a;b[e]=d};a.toHost=function(b,a){return m(b,a,i)};a.fromHost=function(a,b){return m(a,b,e)};a.self=g;a.sourceData=l;a.addComplexType=function(a){b.addComplexType(a)};a.getDynamicType=function(a){return b.getDynamicType(a)};a.setDynamicType=function(c,a){b.setDynamicType(c,a)};a.dynamicTypes=d;a.doMapValues=function(a,b){return f(a,b)}};OSF.DDA.SpecialProcessor=function(c,b){var a=this;a.addComplexType=function(a){c.push(a)};a.getDynamicType=function(a){return b[a]};a.setDynamicType=function(c,a){b[c]=a};a.isComplexType=function(a){return OSF.OUtil.listContainsValue(c,a)};a.isDynamicType=function(a){return OSF.OUtil.listContainsKey(b,a)};a.preserveNesting=function(b){var a=[];OSF.DDA.PropertyDescriptors&&a.push(OSF.DDA.PropertyDescriptors.Subset);if(OSF.DDA.DataNodeEventProperties)a=a.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]);return OSF.OUtil.listContainsValue(a,b)};a.pack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].toHost(d);else a=d;return a};a.unpack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].fromHost(d);else a=d;return a}};OSF.DDA.getDecoratedParameterMap=function(d,c){var a=new OSF.DDA.HostParameterMap(d),f=a.self;function b(a){var c=null;if(a){c={};for(var d=a.length,b=0;b0){for(var d=[],c=0;c=f)break;c=Function._validateParameter(i[d],h,j);if(c){c.popStackFrame();return c}}return a};if(!Function._validateParameterCount)Function._validateParameterCount=function(m,f,l){var b,e,c=f.length,g=m.length;if(gc){e=d;for(b=0;b0&&b.push(c)}}}catch(i){}return b}var c=[],b={};b[Microsoft.Office.WebExtension.Parameters.Data]=function(){var c=0,b=1;return {toHost:function(a){if(OSF.DDA.TableDataProperties&&typeof a!="string"&&a[OSF.DDA.TableDataProperties.TableRows]!==undefined){var d=[];d[c]=a[OSF.DDA.TableDataProperties.TableRows];d[b]=a[OSF.DDA.TableDataProperties.TableHeaders];a=d}return a},fromHost:function(f){var e;if(f.toArray){var g=f.dimensions();if(g===2)e=a(f);else{var d=f.toArray();if(d.length===2&&(d[0]!=null&&d[0].toArray||d[1]!=null&&d[1].toArray)){e={};e[OSF.DDA.TableDataProperties.TableRows]=a(d[c]);e[OSF.DDA.TableDataProperties.TableHeaders]=a(d[b])}else e=d}}else e=f;return e}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,c,b);this.unpack=function(c,a){var d;if(this.isComplexType(c)||OSF.DDA.ListType.isListType(c)){var e=(a||typeof a==="unknown")&&a.toArray;d=e?a.toArray():a||{}}else if(this.isDynamicType(c))d=b[c].fromHost(a);else d=a;return d}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(a){function c(a){var b=a;if(OSF.OUtil.isArray(a))for(var f=b.length,d=0;d2){c=[];for(var g=1;g40){a=OSF.OUtil.Guid.generateNewGuid();b.setValue(b.clientIDKey,a)}return a};a.prototype.saveLog=function(d,e){var b=this,a=b.getValue(b.logIdSetKey);a=(a&&a.length>0?a+";":c)+d;b.setValue(b.logIdSetKey,a);b.setValue(d,e)};a.prototype.enumerateLog=function(c,e){var a=this,d=a.getValue(a.logIdSetKey);if(d){var f=d.split(";");for(var h in f){var b=f[h],g=a.getValue(b);if(g){c&&c(b,g);e&&a.remove(b)}}e&&a.remove(a.logIdSetKey)}};a.prototype.getValue=function(d){var a=OSF.OUtil.getLocalStorage(),b=c;if(a)b=a.getItem(d);return b};a.prototype.setValue=function(c,b){var a=OSF.OUtil.getLocalStorage();a&&a.setItem(c,b)};a.prototype.remove=function(b){var a=OSF.OUtil.getLocalStorage();if(a)try{a.removeItem(b)}catch(c){}};return a}(),h=function(){function a(){}a.prototype.LogData=function(a){if(!OSF.Logger)return;OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,a.SerializeRow(),OSF.Logger.SendFlag.none);OSFAriaLogger.AriaLogger.getInstance().logData(a)};a.prototype.LogRawData=function(a){if(!OSF.Logger)return;OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,a,OSF.Logger.SendFlag.none);try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(a))}catch(b){}};return a}();function e(a){if(a)a=a.replace(/[{}]/g,c).toLowerCase();return a||c}function w(f){if(!OSF.Logger)return;if(a)return;a=new y;if(f.get_hostFullVersion())a.hostVersion=f.get_hostFullVersion();else a.hostVersion=f.get_appVersion();a.appId=f.get_id();a.host=f.get_appName();a.browser=window.navigator.userAgent;a.correlationId=e(f.get_correlationId());a.clientId=(new k).getClientId();a.appInstanceId=f.get_appInstanceId();if(a.appInstanceId)a.appInstanceId=a.appInstanceId.replace(/[{}]/g,c).toLowerCase();a.message=f.get_hostCustomMessage();a.officeJSVersion=OSF.ConstantNames.FileVersion;a.hostJSVersion="16.0.7819.1000";if(f._wacHostEnvironment)a.wacHostEnvironment=f._wacHostEnvironment;if(f._isFromWacAutomation!==undefined&&f._isFromWacAutomation!==b)a.isFromWacAutomation=f._isFromWacAutomation.toString().toLowerCase();var i=f.get_docUrl();a.docUrl=o.test(i)?i:c;var h=location.href;if(h)h=h.split("?")[0].split("#")[0];a.appURL=h;(function(i,a){var e,h,d;a.assetId=c;a.userId=c;try{e=decodeURIComponent(i);h=new DOMParser;d=h.parseFromString(e,"text/xml");var f=d.getElementsByTagName("t")[0].attributes.getNamedItem("cid"),g=d.getElementsByTagName("t")[0].attributes.getNamedItem("oid");if(f&&f.nodeValue)a.userId=f.nodeValue;else if(g&&g.nodeValue)a.userId=g.nodeValue;a.assetId=d.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(j){}finally{e=b;d=b;h=b}})(f.get_eToken(),a);(function(){var k=new Date,c=b,h=0,j=false,e=function(){if(document.hasFocus()){if(c==b)c=new Date}else if(c){h+=Math.abs((new Date).getTime()-c.getTime());c=b}},a=[];a.push(new g("focus",e));a.push(new g("blur",e));a.push(new g("focusout",e));a.push(new g("focusin",e));var i=function(){for(var e=0;e0)for(var d in a)if(a[d]===c)return true;return false},addEventHandler:function(b,a){if(typeof a!="function")return false;var c=this._eventHandlers[b];if(c&&!this.hasEventHandler(b,a)){c.push(a);return true}else return false},addEventHandlerAndFireQueuedEvent:function(a,e){var d=this._eventHandlers[a],c=d.length==0,b=this.addEventHandler(a,e);c&&b&&this.fireQueuedEvent(a);return b},removeEventHandler:function(c,d){var a=this._eventHandlers[c];if(a&&a.length>0)for(var b=0;b0){this._eventHandlers[a]=[];return true}return false},getEventHandlerCount:function(a){return this._eventHandlers[a]!=undefined?this._eventHandlers[a].length:-1},fireEvent:function(a){if(a.type==undefined)return false;var b=a.type;if(b&&this._eventHandlers[b]){var c=this._eventHandlers[b];for(var d in c)c[d](a);return true}else return false},fireOrQueueEvent:function(c){var b=this,a=c.type;if(a&&b._eventHandlers[a]){var d=b._eventHandlers[a],e=b._queuedEventsArgs[a];if(d.length==0)e.push(c);else b.fireEvent(c);return true}else return false},fireQueuedEvent:function(a){if(a&&this._eventHandlers[a]){var b=this._eventHandlers[a],c=this._queuedEventsArgs[a];if(b.length>0){var d=b[0];while(c.length>0){var e=c.shift();d(e)}return true}}return false},clearQueuedEvent:function(a){if(a&&this._eventHandlers[a]){var b=this._queuedEventsArgs[a];if(b)this._queuedEventsArgs[a]=[]}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(e,c,b){var f="hostType",d=this,a;switch(e){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:a=new OSF.DDA.DocumentSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:a=new OSF.DDA.BindingSelectionChangedEventArgs(d.manufactureBinding(b,c.document),b[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:a=new OSF.DDA.BindingDataChangedEventArgs(d.manufactureBinding(b,c.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:a=new OSF.DDA.SettingsChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:a=new OSF.DDA.ActiveViewChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:a=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:a=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:a=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(b);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:a=new OSF.DDA.NodeInsertedEventArgs(d.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NewNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:a=new OSF.DDA.NodeReplacedEventArgs(d.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.OldNode]),d.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NewNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:a=new OSF.DDA.NodeDeletedEventArgs(d.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.OldNode]),d.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:a=new OSF.DDA.TaskSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:a=new OSF.DDA.ResourceSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:a=new OSF.DDA.ViewSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:a=new OSF.DDA.DialogEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:a=new OSF.DDA.DialogParentEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]=="outlook"||OSF._OfficeAppFactory.getHostInfo()[f]=="outlookwebapp"){a=new OSF.DDA.OlkItemSelectedChangedEventArgs(b);c.initialize(a["initialData"]);c.setCurrentItemNumber(a["itemNumber"].itemNumber)}else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e))}return a};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:false,isWindowDialog:false};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var c=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),b=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,a=this;!a[b]&&OSF.OUtil.defineEnumerableProperty(a,b,{value:function(){var b=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];b(arguments,c,a)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(d){var b=OSF.DDA.SyncMethodNames.MessageParent.displayName,a=this;!a[b]&&OSF.OUtil.defineEnumerableProperty(a,b,{value:function(){var b=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return b(arguments,a)}});var c=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;!a[c]&&typeof OSF.DialogParentMessageEventDispatch!="undefined"&&OSF.DDA.DispIdHost.addEventSupport(a,OSF.DialogParentMessageEventDispatch,d);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(a){if(a[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived)OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:a[OSF.DDA.PropertyDescriptors.MessageContent]}});else OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:a[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:a[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:true}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:false}}],privateStateCallbacks:[],onSucceeded:function(c){var g=c[Microsoft.Office.WebExtension.Parameters.Id],b=c[Microsoft.Office.WebExtension.Parameters.Data],a=new OSF.DialogHandler,d=OSF.DDA.AsyncMethodNames.CloseAsync.displayName;OSF.OUtil.defineEnumerableProperty(a,d,{value:function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];c(arguments,g,b,a)}});var f=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;OSF.OUtil.defineEnumerableProperty(a,f,{value:function(){var d=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],c=d.verifyAndExtractCall(arguments,a,b),e=c[Microsoft.Office.WebExtension.Parameters.EventType],f=c[Microsoft.Office.WebExtension.Parameters.Handler];return b.addEventHandlerAndFireQueuedEvent(e,f)}});var e=OSF.DDA.SyncMethodNames.SendMessage.displayName;OSF.OUtil.defineEnumerableProperty(a,e,{value:function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return c(arguments,b,a)}});return a},checkCallArgs:function(a){if(a[Microsoft.Office.WebExtension.Parameters.Width]<=0)a[Microsoft.Office.WebExtension.Parameters.Width]=1;if(a[Microsoft.Office.WebExtension.Parameters.Width]>100)a[Microsoft.Office.WebExtension.Parameters.Width]=99;if(a[Microsoft.Office.WebExtension.Parameters.Height]<=0)a[Microsoft.Office.WebExtension.Parameters.Height]=1;if(a[Microsoft.Office.WebExtension.Parameters.Height]>100)a[Microsoft.Office.WebExtension.Parameters.Height]=99;if(!a[Microsoft.Office.WebExtension.Parameters.RequireHTTPs])a[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=true;return a}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(a){try{a.onCalling&&a.onCalling();var c=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true,a);OSF.ClientHostController.openDialog(a.dispId,a.targetId,function(c,b){a.onEvent&&a.onEvent(b);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(a.dispId)},c)}catch(b){OSF.DDA.SafeArray.Delegate._onException(b,a)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(a){a.onCalling&&a.onCalling();var c=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false,a);try{OSF.ClientHostController.closeDialog(a.dispId,a.targetId,c)}catch(b){OSF.DDA.SafeArray.Delegate._onException(b,a)}};OSF.DDA.SafeArray.Delegate.messageParent=function(a){try{a.onCalling&&a.onCalling();var d=(new Date).getTime(),b=OSF.ClientHostController.messageParent(a.hostCallArgs);a.onReceiving&&a.onReceiving();OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(a.dispId,a.hostCallArgs,Math.abs((new Date).getTime()-d),b);return b}catch(c){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(c)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:true});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:true});OSF.DDA.SafeArray.Delegate.sendMessage=function(a){try{a.onCalling&&a.onCalling();var d=(new Date).getTime(),c=OSF.ClientHostController.sendMessage(a.hostCallArgs);a.onReceiving&&a.onReceiving();return c}catch(b){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(b)}};OSF.OUtil.redefineList(Microsoft.Office.WebExtension.CoercionType,{Text:"text"});OSF.OUtil.redefineList(Microsoft.Office.WebExtension.ValueFormat,{Unformatted:"unformatted"});OSF.OUtil.redefineList(Microsoft.Office.WebExtension.FilterType,{All:"all"});OSF.OUtil.redefineList(Microsoft.Office.WebExtension.GoToType,{Slide:"slide",Index:"index"});delete Microsoft.Office.WebExtension.BindingType;delete Microsoft.Office.WebExtension.select;OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.CoercionType,toHost:[{name:Microsoft.Office.WebExtension.CoercionType.Text,value:0},{name:Microsoft.Office.WebExtension.CoercionType.Matrix,value:1},{name:Microsoft.Office.WebExtension.CoercionType.Table,value:2}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType,{SlideRange:"slideRange"});OSF.DDA.SlideProperties={Id:0,Title:1,Index:2};OSF.DDA.Slide=function(c,b,a){OSF.OUtil.defineEnumerableProperties(this,{id:{value:c},title:{value:b},index:{value:a}})};OSF.DDA.SlideRange=function(a){OSF.OUtil.defineEnumerableProperties(this,{slides:{value:a}})};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureSlideRange=function(h){var c=null,a=c;if(JSON)a=JSON.parse(h);else a=Sys.Serialization.JavaScriptSerializer.deserialize(h);if(a==c)return c;var e=0;for(var k in OSF.DDA.SlideProperties)if(OSF.DDA.SlideProperties.hasOwnProperty(k))e++;for(var f=[],d=true,b=0;b4*1024*1024)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return b},onSucceeded:function(a,c,b){return new OSF.DDA.File(a[OSF.DDA.FileProperties.Handle],a[OSF.DDA.FileProperties.FileSize],b[Microsoft.Office.WebExtension.Parameters.SliceSize])}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(b,a){return a[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(b,a){return a[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(a,d,c){var b=a[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(b<0||b>=d.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;a[OSF.DDA.FileSliceOffset]=parseInt((b*c[OSF.DDA.FileProperties.SliceSize]).toString());return a},onSucceeded:function(a,d,c){var b={};OSF.OUtil.defineEnumerableProperties(b,{data:{value:a[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:c[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:a[OSF.DDA.FileProperties.SliceSize]}});return b}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(b,a){return a[OSF.DDA.FileProperties.Handle]}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileProperties.FileSize,value:1}],isComplexType:true});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0},{name:OSF.DDA.FileProperties.SliceSize,value:1}],isComplexType:true});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:0},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:5},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:6}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:0}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileSliceOffset,value:1},{name:OSF.DDA.FileProperties.SliceSize,value:2}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0}]});OSF.DDA.AsyncMethodNames.addNames({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync"});(function(){var c=false,b="boolean",a="number";function d(b,d,c){var a=b[Microsoft.Office.WebExtension.Parameters.Data];if(OSF.DDA.TableDataProperties&&a&&(a[OSF.DDA.TableDataProperties.TableRows]!=undefined||a[OSF.DDA.TableDataProperties.TableHeaders]!=undefined))a=OSF.DDA.OMFactory.manufactureTableData(a);a=OSF.DDA.DataCoercion.coerceData(a,c[Microsoft.Office.WebExtension.Parameters.CoercionType]);return a==undefined?null:a}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,"enum":Microsoft.Office.WebExtension.CoercionType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}}],privateStateCallbacks:[],onSucceeded:d});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object",a,b]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(a){return OSF.DDA.DataCoercion.determineCoercionType(a[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:[a,b],defaultValue:c}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:[a,b],defaultValue:c}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[a,b],defaultValue:c}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[a,b],defaultValue:c}}],privateStateCallbacks:[]})})();OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:1},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:2},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:3},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:4},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:5}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:0},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:1},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:2},{name:Microsoft.Office.WebExtension.GoToType.Index,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:0},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:1},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:1},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:2}]});OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",RefreshingSettings:"refreshingSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(b){var d={};for(var c in b){var a=b[c];try{if(JSON)a=JSON.stringify(a,function(a,b){return OSF.OUtil.isDate(this[a])?OSF.DDA.SettingsManager.DateJSONPrefix+this[a].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix:b});else a=Sys.Serialization.JavaScriptSerializer.serialize(a);d[c]=a}catch(e){}}return d},deserializeSettings:function(b){var d={};b=b||{};for(var c in b){var a=b[c];try{if(JSON)a=JSON.parse(a,function(c,a){var b;if(typeof a==="string"&&a&&a.length>6&&a.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&a.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix){b=new Date(parseInt(a.slice(5,-1)));if(b)return b}return a});else a=Sys.Serialization.JavaScriptSerializer.deserialize(a,true);d[c]=a}catch(e){}}return d}};OSF.DDA.Settings=function(a){var b="name";a=a||{};var c=function(d){var b=OSF.OUtil.getSessionStorage();if(b){var a=OSF.DDA.SettingsManager.serializeSettings(d),c=JSON?JSON.stringify(a):Sys.Serialization.JavaScriptSerializer.serialize(a);b.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),c)}};OSF.OUtil.defineEnumerableProperties(this,{"get":{value:function(e){var d=Function._validateParams(arguments,[{name:b,type:String,mayBeNull:false}]);if(d)throw d;var c=a[e];return typeof c==="undefined"?null:c}},"set":{value:function(f,e){var d=Function._validateParams(arguments,[{name:b,type:String,mayBeNull:false},{name:"value",mayBeNull:true}]);if(d)throw d;a[f]=e;c(a)}},remove:{value:function(e){var d=Function._validateParams(arguments,[{name:b,type:String,mayBeNull:false}]);if(d)throw d;delete a[e];c(a)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],a)};OSF.DDA.RefreshableSettings=function(a){OSF.DDA.RefreshableSettings.uber.constructor.call(this,a);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],a);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:a}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(b,a){return a}}],onSucceeded:function(d,a,e){var f=d[OSF.DDA.SettingsManager.SerializedSettings],c=OSF.DDA.SettingsManager.deserializeSettings(f),g=e[OSF.DDA.SettingsManager.RefreshingSettings];for(var b in g)a.remove(b);for(var b in c)a.set(b,c[b]);return a}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:true}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(b,a){return OSF.DDA.SettingsManager.serializeSettings(a)}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});OSF.DDA.AsyncMethodNames.addNames({GetOfficeThemeAsync:"getOfficeThemeAsync",GetDocumentThemeAsync:"getDocumentThemeAsync"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{OfficeThemeChanged:"officeThemeChanged",DocumentThemeChanged:"documentThemeChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.Parameters,{DocumentTheme:"documentTheme",OfficeTheme:"officeTheme"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DocumentThemeChangedEvent:"DocumentThemeChangedEvent",OfficeThemeChangedEvent:"OfficeThemeChangedEvent"});OSF.OUtil.setNamespace("Theming",OSF.DDA);OSF.DDA.Theming.OfficeThemeEnum={PrimaryFontColor:"primaryFontColor",PrimaryBackgroundColor:"primaryBackgroundColor",SecondaryFontColor:"secondaryFontColor",SecondaryBackgroundColor:"secondaryBackgroundColor"};OSF.DDA.Theming.DocumentThemeEnum={PrimaryFontColor:"primaryFontColor",PrimaryBackgroundColor:"primaryBackgroundColor",SecondaryFontColor:"secondaryFontColor",SecondaryBackgroundColor:"secondaryBackgroundColor",Accent1:"accent1",Accent2:"accent2",Accent3:"accent3",Accent4:"accent4",Accent5:"accent5",Accent6:"accent6",Hyperlink:"hyperlink",FollowedHyperlink:"followedHyperlink",HeaderLatinFont:"headerLatinFont",HeaderEastAsianFont:"headerEastAsianFont",HeaderScriptFont:"headerScriptFont",HeaderLocalizedFont:"headerLocalizedFont",BodyLatinFont:"bodyLatinFont",BodyEastAsianFont:"bodyEastAsianFont",BodyScriptFont:"bodyScriptFont",BodyLocalizedFont:"bodyLocalizedFont"};OSF.DDA.Theming.ConvertToDocumentTheme=function(f){var b=false,a=true;for(var d=[{name:"primaryFontColor",needToConvertToHex:a},{name:"primaryBackgroundColor",needToConvertToHex:a},{name:"secondaryFontColor",needToConvertToHex:a},{name:"secondaryBackgroundColor",needToConvertToHex:a},{name:"accent1",needToConvertToHex:a},{name:"accent2",needToConvertToHex:a},{name:"accent3",needToConvertToHex:a},{name:"accent4",needToConvertToHex:a},{name:"accent5",needToConvertToHex:a},{name:"accent6",needToConvertToHex:a},{name:"hyperlink",needToConvertToHex:a},{name:"followedHyperlink",needToConvertToHex:a},{name:"headerLatinFont",needToConvertToHex:b},{name:"headerEastAsianFont",needToConvertToHex:b},{name:"headerScriptFont",needToConvertToHex:b},{name:"headerLocalizedFont",needToConvertToHex:b},{name:"bodyLatinFont",needToConvertToHex:b},{name:"bodyEastAsianFont",needToConvertToHex:b},{name:"bodyScriptFont",needToConvertToHex:b},{name:"bodyLocalizedFont",needToConvertToHex:b}],e={},c=0;c0)b.push(a);else a.tabIndex===0&&c.push(a);else c.push(a)}b=b.sort(function(d,c){var a=d.tabIndex-c.tabIndex;if(a===0)a=b.indexOf(d)-b.indexOf(c);return a});return [].concat(b,c)}return {set_entropy:function(a){if(typeof a=="string")for(var b=0;b6&&a.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&a.slice(c)===OSF.DDA.SettingsManager.DataJSONSuffix){b=new Date(parseInt(a.slice(5,c)));if(b)return b}return a});else a=Sys.Serialization.JavaScriptSerializer.deserialize(a,b);f[e]=a}catch(g){}}return f},loadScript:function(f,g,h){if(f&&g){var k=window.document,c=s[f];if(!c){var e=k.createElement("script");e.type="text/javascript";c={loaded:d,pendingCallbacks:[g],timer:a};s[f]=c;var i=function(){if(c.timer!=a){clearTimeout(c.timer);delete c.timer}c.loaded=b;for(var e=c.pendingCallbacks.length,d=0;d1?f[f.length-1]:a;if(k&&b!=a){if(b.indexOf(v)>=0)b=b.split(v)[0];b=decodeURIComponent(b)}var d=q();if(!i&&d){var e=window.name.indexOf(j);if(e>c){var g=window.name.indexOf(";",e);if(g==c)g=window.name.length;var h=window.name.substring(e,g);if(b)d.setItem(h,b);else b=d.getItem(h)}}return b},getConversationId:function(){var c=window.location.search,b=a;if(c){var d=c.indexOf("&");b=d>0?c.substring(1,d):c.substr(1);if(b&&b.charAt(b.length-1)==="="){b=b.substring(0,b.length-1);if(b)b=decodeURIComponent(b)}}return b},getInfoItems:function(b){var a=b.split("$");if(typeof a[1]==i)a=b.split("|");if(typeof a[1]==i)a=b.split("%7C");return a},getXdmFieldValue:function(f,d){var b=e,c=OSF.OUtil.parseXdmInfo(d);if(c){var a=OSF.OUtil.getInfoItems(c);if(a!=undefined&&a.length>=3)switch(f){case OSF.XdmFieldName.ConversationUrl:b=a[2];break;case OSF.XdmFieldName.AppId:b=a[1]}}return b},validateParamObject:function(f,e){var a=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:d},{name:"expectedProperties",type:Object,mayBeNull:d},{name:"callback",type:Function,mayBeNull:b}]);if(a)throw a;for(var c in e){a=Function._validateParameter(f[c],e[c],c);if(a)throw a}},writeProfilerMark:function(a){if(window.msWriteProfilerMark){window.msWriteProfilerMark(a);OsfMsAjaxFactory.msAjaxDebug.trace(a)}},outputDebug:function(a){typeof OsfMsAjaxFactory!==i&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(a)},defineNondefaultProperty:function(e,f,a,c){a=a||{};for(var g in c){var d=c[g];if(a[d]==undefined)a[d]=b}Object.defineProperty(e,f,a);return e},defineNondefaultProperties:function(c,a,d){a=a||{};for(var b in a)OSF.OUtil.defineNondefaultProperty(c,b,a[b],d);return c},defineEnumerableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[f])},defineEnumerableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[f])},defineMutableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[m,f,n])},defineMutableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[m,f,n])},finalizeProperties:function(e,c){c=c||{};for(var g=Object.getOwnPropertyNames(e),i=g.length,f=0;f>8;g=h&255;b[a++]=d>>2;b[a++]=(d&3)<<4|f>>4;b[a++]=(f&15)<<2|g>>6;b[a++]=g&63;if(!isNaN(h)){d=h>>8;f=j&255;g=j>>8;b[a++]=d>>2;b[a++]=(d&3)<<4|f>>4;b[a++]=(f&15)<<2|g>>6;b[a++]=g&63}if(isNaN(h))b[a-1]=64;else if(isNaN(j)){b[a-2]=64;b[a-1]=64}for(var l=0;l0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(b){if(b==a)return a;else if(!(b instanceof Object))return b;else if(Array.isArray(b)){for(var e=[],d=0;dd)return c;else if(a===0&&b)return c;else if(a===d-1&&!b)return c;if(b)return a-1;else return a+1};e=u(e);g=j?e.length-1:0;if(e.length===0)return a;while(!i&&g>=0&&gd)return c;else if(a===0&&b)return c;else if(a===d-1&&!b)return c;if(b)return a-1;else return a+1};f=u(f);k=n(f,o);e=j(f.length,k,m);if(e<0)return a;while(!i&&e>=0&&e0;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[d%16];d=Math.floor(d/16)}for(;b<32;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[Math.floor(Math.random()*16)]}return c}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3};OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611,WordAndroid:8388613,PowerpointAndroid:8388614};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(y,u,p,n,r,v,q,t,x,j,w,l,k,m,h,g,f,e,i,c,d,s,o,b){var a=this;a._id=y;a._appName=u;a._appVersion=p;a._appUILocale=n;a._dataLocale=r;a._docUrl=v;a._clientMode=q;a._settings=t;a._reason=x;a._osfControlType=j;a._eToken=w;a._correlationId=l;a._appInstanceId=k;a._touchEnabled=m;a._commerceAllowed=h;a._appMinorVersion=g;a._requirementMatrix=f;a._hostCustomMessage=e;a._hostFullVersion=i;a._isDialog=false;a._clientWindowHeight=c;a._clientWindowWidth=d;a._addinName=s;a._appDomains=o;a._dialogRequirementMatrix=b;a.get_id=function(){return this._id};a.get_appName=function(){return this._appName};a.get_appVersion=function(){return this._appVersion};a.get_appUILocale=function(){return this._appUILocale};a.get_dataLocale=function(){return this._dataLocale};a.get_docUrl=function(){return this._docUrl};a.get_clientMode=function(){return this._clientMode};a.get_bindings=function(){return this._bindings};a.get_settings=function(){return this._settings};a.get_reason=function(){return this._reason};a.get_osfControlType=function(){return this._osfControlType};a.get_eToken=function(){return this._eToken};a.get_correlationId=function(){return this._correlationId};a.get_appInstanceId=function(){return this._appInstanceId};a.get_touchEnabled=function(){return this._touchEnabled};a.get_commerceAllowed=function(){return this._commerceAllowed};a.get_appMinorVersion=function(){return this._appMinorVersion};a.get_requirementMatrix=function(){return this._requirementMatrix};a.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};a.get_hostCustomMessage=function(){return this._hostCustomMessage};a.get_hostFullVersion=function(){return this._hostFullVersion};a.get_isDialog=function(){return this._isDialog};a.get_clientWindowHeight=function(){return this._clientWindowHeight};a.get_clientWindowWidth=function(){return this._clientWindowWidth};a.get_addinName=function(){return this._addinName};a.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",Reserved:"reserved",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData",Base64:"base64"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(b,a){if(a==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||a==Microsoft.Office.WebExtension.EventType.BindingDataChanged||a==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||a==Microsoft.Office.WebExtension.EventType.DataNodeInserted||a==Microsoft.Office.WebExtension.EventType.DataNodeReplaced)return b+"_"+a;else return a};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidOpenBrowserWindow:102,dispidCreateDocumentMethod:105,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var a={};return {getErrorArgs:function(c){var b=a[c];if(!b)b=a[this.errorCodes.ooeInternalError];else{if(!b.name)b.name=a[this.errorCodes.ooeInternalError].name;if(!b.message)b.message=a[this.errorCodes.ooeInternalError].message}return b},addErrorMessage:function(c,b){a[c]=b},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11000,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12000,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13000,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010},initializeErrorMessages:function(b){a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:b.L_DataReadError,message:b.L_GetSelectionNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotMatchBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:b.L_DataReadError,message:b.L_InvalidGetRowColumnCounts};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:b.L_DataReadError,message:b.L_SelectionNotSupportCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:b.L_DataReadError,message:b.L_InvalidGetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:b.L_DataReadError,message:b.L_NonUniformPartialGetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:b.L_DataReadError,message:b.L_GetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:b.L_DataReadError,message:b.L_FileTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:b.L_DataReadError,message:b.L_GetDataParametersConflict};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:b.L_DataReadError,message:b.L_InvalidGetColumns};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:b.L_DataReadError,message:b.L_InvalidGetRows};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:b.L_DataReadError,message:b.L_InvalidReadForBlankRow};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:b.L_DataWriteError,message:b.L_UnsupportedDataObject};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:b.L_DataWriteError,message:b.L_CannotWriteToSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:b.L_DataWriteError,message:b.L_DataNotMatchSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:b.L_DataWriteError,message:b.L_OverwriteWorksheetData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:b.L_DataWriteError,message:b.L_DataNotMatchBindingSize};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:b.L_DataWriteError,message:b.L_InvalidSetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:b.L_InvalidFormat,message:b.L_InvalidDataFormat};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:b.L_DataWriteError,message:b.L_SetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:b.L_DataWriteError,message:b.L_NonUniformPartialSetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:b.L_DataWriteError,message:b.L_InvalidSetColumns};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:b.L_DataWriteError,message:b.L_InvalidSetRows};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:b.L_DataWriteError,message:b.L_SetDataParametersConflict};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:b.L_BindingCreationError,message:b.L_SelectionCannotBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:b.L_InvalidBindingError,message:b.L_BindingNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:b.L_BindingCreationError,message:b.L_BindingToMultipleSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidSelectionForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnThisBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:b.L_BindingCreationError,message:b.L_NamedItemNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:b.L_BindingCreationError,message:b.L_MultipleNamedItemFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidNamedItemForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:b.L_InvalidBinding,message:b.L_UnknownBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnMatrixData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:b.L_InvalidBinding,message:b.L_InvalidColumnsForBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:b.L_ReadSettingsError,message:b.L_SettingNameNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:b.L_SaveSettingsError,message:b.L_SettingsCannotSave};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:b.L_SettingsStaleError,message:b.L_SettingsAreStale};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:b.L_HostError,message:b.L_OperationNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:b.L_InternalError,message:b.L_InternalErrorDescription};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:b.L_PermissionDenied,message:b.L_DocumentReadOnly};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:b.L_EventRegistrationError,message:b.L_EventHandlerNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:b.L_InvalidAPICall,message:b.L_InvalidApiCallInContext};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:b.L_ShuttingDown,message:b.L_ShuttingDown};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:b.L_UnsupportedEnumeration,message:b.L_UnsupportedEnumerationMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:b.L_APINotSupported,message:b.L_BrowserAPINotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:b.L_APICallFailed,message:b.L_RequestTimeout};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:b.L_InvalidOrTimedOutSession,message:b.L_InvalidOrTimedOutSessionMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:b.L_APICallFailed,message:b.L_TooManyIncompleteRequests};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:b.L_APICallFailed,message:b.L_RequestTokenUnavailable};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:b.L_APICallFailed,message:b.L_ActivityLimitReached};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:b.L_APICallFailed,message:b.L_InvalidApiArgumentsMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:b.L_InvalidNode,message:b.L_CustomXmlNodeNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:b.L_CustomXmlError,message:b.L_CustomXmlError};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:b.L_CustomXmlExceedQuotaName,message:b.L_CustomXmlExceedQuotaMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:b.L_CustomXmlOutOfDateName,message:b.L_CustomXmlOutOfDateMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:b.L_CannotNavigateTo,message:b.L_CannotNavigateTo};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:b.L_SpecifiedIdNotExist,message:b.L_SpecifiedIdNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:b.L_NavOutOfBound,message:b.L_NavOutOfBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:b.L_DataWriteReminder,message:b.L_CellDataAmountBeyondLimits};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:b.L_MissingParameter,message:b.L_ElementMissing};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:b.L_InvalidValue,message:b.L_InvalidCellsValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:b.L_InvalidValue,message:b.L_InvalidTableOptionValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:b.L_InvalidValue,message:b.L_InvalidFormatValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_RowIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_ColIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:b.L_OutOfRange,message:b.L_FormatValueOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:b.L_FormattingReminder,message:b.L_CellFormatAmountBeyondLimits};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:b.L_MemoryLimit,message:b.L_CloseFileBeforeRetrieve};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:b.L_NetworkProblem,message:b.L_NetworkProblemRetrieveFile};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:b.L_InvalidValue,message:b.L_SliceSizeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:b.L_DisplayDialogError,message:b.L_DialogAlreadyOpened};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:b.L_DisplayDialogError,message:b.L_NetworkProblem};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:b.L_DialogNavigateError,message:b.L_DialogInvalidScheme};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:b.L_DisplayDialogError,message:b.L_DialogAddressNotTrusted};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:b.L_DisplayDialogError,message:b.L_DialogRequireHTTPS};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:b.L_DisplayDialogError,message:b.L_UserClickIgnore};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:b.L_DisplayDialogError,message:b.L_NewWindowCrossZoneErrorString};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:b.L_APINotSupported,message:b.L_InvalidSSOAddinMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:b.L_UserNotSignedIn,message:b.L_UserNotSignedIn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:b.L_UserAborted,message:b.L_UserAbortedMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:b.L_UnsupportedUserIdentity,message:b.L_UnsupportedUserIdentityMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:b.L_InvalidResourceUrl,message:b.L_InvalidResourceUrlMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:b.L_InvalidGrant,message:b.L_InvalidGrantMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:b.L_SSOClientError,message:b.L_SSOClientErrorMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:b.L_SSOServerError,message:b.L_SSOServerErrorMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:b.L_AddinIsAlreadyRequestingToken,message:b.L_AddinIsAlreadyRequestingTokenMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:b.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:b.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:b.L_SSOConnectionLostError,message:b.L_SSOConnectionLostErrorMessage}}}}();var OfficeExt;(function(a){var b;(function(b){var a=1.1,z=function(){function a(){}return a}();b.RequirementVersion=z;var d=function(){function a(b){var a=this;a.isSetSupported=function(d,b){if(d==undefined)return false;if(b==undefined)b=0;var f=this._setMap,e=f._sets;if(e.hasOwnProperty(d.toLowerCase())){var g=e[d.toLowerCase()];try{var a=this._getVersion(g);b=b+"";var c=this._getVersion(b);if(a.major>0&&a.major>c.major)return true;if(a.minor>0&&a.minor>0&&a.major==c.major&&a.minor>=c.minor)return true}catch(h){return false}}return false};a._getVersion=function(e){var a="version format incorrect",b=e.split("."),c=0,d=0;if(b.length<2&&isNaN(Number(e)))throw a;else{c=Number(b[0]);if(b.length>=2)d=Number(b[1]);if(isNaN(c)||isNaN(d))throw a}var f={minor:d,major:c};return f};a._setMap=b;a.isSetSupported=a.isSetSupported.bind(a)}return a}();b.RequirementMatrix=d;var c=function(){function a(a){this._addSetMap=function(a){for(var b in a)this._sets[b]=a[b]};this._sets=a}return a}();b.DefaultSetRequirement=c;var x=function(c){__extends(b,c);function b(){c.call(this,{dialogapi:a})}return b}(c);b.DefaultDialogSetRequirement=x;var f=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,excelapi:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a})}return b}(c);b.ExcelClientDefaultSetRequirement=f;var k=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({imagecoercion:a})}return b}(f);b.ExcelClientV1DefaultSetRequirement=k;var l=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.3})}return a}(c);b.OutlookClientDefaultSetRequirement=l;var h=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,compressedfile:a,customxmlparts:a,documentevents:a,file:a,htmlcoercion:a,matrixbindings:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,textfile:a,wordapi:a})}return b}(c);b.WordClientDefaultSetRequirement=h;var p=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:a})}return b}(h);b.WordClientV1DefaultSetRequirement=p;var e=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,compressedfile:a,documentevents:a,file:a,pdffile:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.PowerpointClientDefaultSetRequirement=e;var j=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({imagecoercion:a})}return b}(e);b.PowerpointClientV1DefaultSetRequirement=j;var o=function(c){__extends(b,c);function b(){c.call(this,{selection:a,textcoercion:a})}return b}(c);b.ProjectClientDefaultSetRequirement=o;var u=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,file:a})}return b}(c);b.ExcelWebDefaultSetRequirement=u;var w=function(c){__extends(b,c);function b(){c.call(this,{compressedfile:a,documentevents:a,file:a,imagecoercion:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablecoercion:a,textcoercion:a,textfile:a})}return b}(c);b.WordWebDefaultSetRequirement=w;var n=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,settings:a})}return b}(c);b.PowerpointWebDefaultSetRequirement=n;var g=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.3})}return a}(c);b.OutlookWebDefaultSetRequirement=g;var v=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,documentevents:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.SwayWebDefaultSetRequirement=v;var r=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,partialtablebindings:a,settings:a,tablebindings:a,tablecoercion:a})}return b}(c);b.AccessWebDefaultSetRequirement=r;var t=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a})}return b}(c);b.ExcelIOSDefaultSetRequirement=t;var i=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,compressedfile:a,customxmlparts:a,documentevents:a,file:a,htmlcoercion:a,matrixbindings:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,textfile:a})}return b}(c);b.WordIOSDefaultSetRequirement=i;var s=function(b){__extends(a,b);function a(){b.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return a}(i);b.WordIOSV1DefaultSetRequirement=s;var m=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,compressedfile:a,documentevents:a,file:a,pdffile:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.PowerpointIOSDefaultSetRequirement=m;var q=function(c){__extends(b,c);function b(){c.call(this,{mailbox:a})}return b}(c);b.OutlookIOSDefaultSetRequirement=q;var y=function(){var b="undefined";function a(){}a.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)};a.getDefaultRequirementMatrix=function(f){this.initializeDefaultSetMatrix();var e=undefined,g=f.get_requirementMatrix();if(g!=undefined&&g.length>0&&typeof JSON!==b){var i=JSON.parse(f.get_requirementMatrix().toLowerCase());e=new d(new c(i))}else{var h=a.getClientFullVersionString(f);if(a.DefaultSetArrayMatrix!=undefined&&a.DefaultSetArrayMatrix[h]!=undefined)e=new d(a.DefaultSetArrayMatrix[h]);else e=new d(new c({}))}return e};a.getDefaultDialogRequirementMatrix=function(f){var a=undefined,e=f.get_dialogRequirementMatrix();if(e!=undefined&&e.length>0&&typeof JSON!==b){var g=JSON.parse(f.get_requirementMatrix().toLowerCase());a=new d(new c(g))}else a=new d(new x);return a};a.getClientFullVersionString=function(a){var d=a.get_appMinorVersion(),e="",b="",c=a.get_appName(),f=c==1024||c==4096||c==8192||c==65536;if(f&&a.get_appVersion()==1)if(c==4096&&d>=15)b="16.00.01";else b="16.00";else if(a.get_appName()==64)b=a.get_appVersion();else{if(d<10)e="0"+d;else e=""+d;b=a.get_appVersion()+"."+e}return a.get_appName()+"-"+b};a.initializeDefaultSetMatrix=function(){a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1600]=new f;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1600]=new h;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1600]=new e;a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1601]=new k;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1601]=new p;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1601]=new j;a.DefaultSetArrayMatrix[a.Outlook_RCLIENT_1600]=new l;a.DefaultSetArrayMatrix[a.Excel_WAC_1600]=new u;a.DefaultSetArrayMatrix[a.Word_WAC_1600]=new w;a.DefaultSetArrayMatrix[a.Outlook_WAC_1600]=new g;a.DefaultSetArrayMatrix[a.Outlook_WAC_1601]=new g;a.DefaultSetArrayMatrix[a.Project_RCLIENT_1600]=new o;a.DefaultSetArrayMatrix[a.Access_WAC_1600]=new r;a.DefaultSetArrayMatrix[a.PowerPoint_WAC_1600]=new n;a.DefaultSetArrayMatrix[a.Excel_IOS_1600]=new t;a.DefaultSetArrayMatrix[a.SWAY_WAC_1600]=new v;a.DefaultSetArrayMatrix[a.Word_IOS_1600]=new i;a.DefaultSetArrayMatrix[a.Word_IOS_16001]=new s;a.DefaultSetArrayMatrix[a.PowerPoint_IOS_1600]=new m;a.DefaultSetArrayMatrix[a.Outlook_IOS_1600]=new q};a.Excel_RCLIENT_1600="1-16.00";a.Excel_RCLIENT_1601="1-16.01";a.Word_RCLIENT_1600="2-16.00";a.Word_RCLIENT_1601="2-16.01";a.PowerPoint_RCLIENT_1600="4-16.00";a.PowerPoint_RCLIENT_1601="4-16.01";a.Outlook_RCLIENT_1600="8-16.00";a.Excel_WAC_1600="16-16.00";a.Word_WAC_1600="32-16.00";a.Outlook_WAC_1600="64-16.00";a.Outlook_WAC_1601="64-16.01";a.Project_RCLIENT_1600="128-16.00";a.Access_WAC_1600="256-16.00";a.PowerPoint_WAC_1600="512-16.00";a.Excel_IOS_1600="1024-16.00";a.SWAY_WAC_1600="2048-16.00";a.Word_IOS_1600="4096-16.00";a.Word_IOS_16001="4096-16.00.01";a.PowerPoint_IOS_1600="8192-16.00";a.Outlook_IOS_1600="65536-16.00";a.DefaultSetArrayMatrix={};return a}();b.RequirementsMatrixFactory=y})(b=a.Requirement||(a.Requirement={}))})(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda();var OfficeExt;(function(a){var b;(function(a){var b=function(){function a(){var a=this;a.getDiagnostics=function(b){var a={host:this.getHost(),version:b||this.getDefaultVersion(),platform:this.getPlatform()};return a};a.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};a.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};a.hostInfo=OSF._OfficeAppFactory.getHostInfo();a.getHost=a.getHost.bind(a);a.getPlatform=a.getPlatform.bind(a);a.getDiagnostics=a.getDiagnostics.bind(a)}a.prototype.capitalizeFirstLetter=function(a){if(a)return a[0].toUpperCase()+a.slice(1).toLowerCase();return a};a.getInstance=function(){if(a.hostObj===undefined)a.hostObj=new a;return a.hostObj};a.prototype.getPlatform=function(){var a=this;if(a.hostInfo.hostPlatform){var b=a.hostInfo.hostPlatform.toLowerCase();if(a.platformRemappings[b])return a.platformRemappings[b]}return null};a.prototype.getHost=function(){var a=this;if(a.hostInfo.hostType){var b=a.hostInfo.hostType.toLowerCase();if(a.camelCaseMappings[b])return a.camelCaseMappings[b];b=a.capitalizeFirstLetter(a.hostInfo.hostType);if(Microsoft.Office.WebExtension.HostType[b])return Microsoft.Office.WebExtension.HostType[b]}return null};a.prototype.getDefaultVersion=function(){if(this.getHost())return "16.0.0000.0000";return null};return a}();a.Host=b})(b=a.HostName||(a.HostName={}))})(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var b,a=false;return {enableShortcut:function(){if(!a){if(window.Office)b=window.Office;else OSF.OUtil.setNamespace("Office",window);window.Office=Microsoft.Office.WebExtension;a=true}},disableShortcut:function(){if(a){if(b)window.Office=b;else OSF.OUtil.unsetNamespace("Office",window);a=false}}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(a){if(a)OSF.NamespaceManager.enableShortcut();else OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(a,b){var c;if(a&&typeof a=="string"){var d=a.indexOf("#");if(d!=-1){var h=a.substring(0,d),g=a.substring(d+1);switch(h){case "binding":case "bindings":if(g)c=new OSF.DDA.BindingPromise(g)}}}if(!c){if(b){var e=typeof b;if(e=="function"){var f={};f[Microsoft.Office.WebExtension.Parameters.Callback]=b;OSF.DDA.issueAsyncResult(f,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,e)}}else{c.onFail=b;return c}};OSF.DDA.Context=function(a,g,h,c,d){var f="requirements",b=this;OSF.OUtil.defineEnumerableProperties(b,{contentLanguage:{value:a.get_dataLocale()},displayLanguage:{value:a.get_appUILocale()},touchEnabled:{value:a.get_touchEnabled()},commerceAllowed:{value:a.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(a.get_hostFullVersion())}});h&&OSF.OUtil.defineEnumerableProperty(b,"license",{value:h});a.ui&&OSF.OUtil.defineEnumerableProperty(b,"ui",{value:a.ui});a.auth&&OSF.OUtil.defineEnumerableProperty(b,"auth",{value:a.auth});a.application&&OSF.OUtil.defineEnumerableProperty(b,"application",{value:a.application});if(a.get_isDialog()){var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,f,{value:e})}else{g&&OSF.OUtil.defineEnumerableProperty(b,"document",{value:g});if(c){var i=c.displayName||"appOM";delete c.displayName;OSF.OUtil.defineEnumerableProperty(b,i,{value:c})}d&&OSF.OUtil.defineEnumerableProperty(b,"officeTheme",{"get":function(){return d()}});var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,f,{value:e})}};OSF.DDA.OutlookContext=function(c,a,d,e,b){OSF.DDA.OutlookContext.uber.constructor.call(this,c,null,d,e,b);a&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:a})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Application=function(){};OSF.DDA.Document=function(b,c){var a;switch(b.get_clientMode()){case OSF.ClientMode.ReadOnly:a=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:a=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}c&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:c});OSF.OUtil.defineMutableProperties(this,{mode:{value:a},url:{value:b.get_docUrl()}})};OSF.DDA.JsomDocument=function(d,b,e){var a=this;OSF.DDA.JsomDocument.uber.constructor.call(a,d,e);b&&OSF.OUtil.defineEnumerableProperty(a,"bindings",{"get":function(){return b}});var c=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(a,[c.GetSelectedDataAsync,c.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(a,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{"get":function(){var a;if(OSF&&OSF._OfficeAppFactory)a=OSF._OfficeAppFactory.getContext();return a}});OSF.DDA.License=function(a){OSF.OUtil.defineEnumerableProperty(this,"value",{value:a})};OSF.DDA.ApiMethodCall=function(c,f,e,g,h){var a=this,d=c.length,b=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,h)});a.verifyArguments=function(d,f){for(var e in d){var a=d[e],c=f[e];if(a["enum"])switch(typeof c){case "string":if(OSF.OUtil.listContainsValue(a["enum"],c))break;case "undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw b()}if(a["types"])if(!OSF.OUtil.listContainsValue(a["types"],typeof c))throw b()}};a.extractRequiredArguments=function(g,l,j){if(g.lengthc+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var d,f,i=h.length-1;i>=c;i--){var g=h[i];switch(typeof g){case "object":if(d)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else d=g;break;case a:if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else f=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}d=b.fillOptions(d,j,l,k);if(f)if(d[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else d[Microsoft.Office.WebExtension.Parameters.Callback]=f;b.verifyArguments(e,d);return d}this.verifyAndExtractCall=function(e,c,a){var d=b.extractRequiredArguments(e,c,a),g=h(e,d,c,a),f=b.constructCallArgs(d,g,c,a);return f};this.processResponse=function(c,b,e,d){var a;if(c==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)if(f)a=f(b,e,d);else a=b;else if(g)a=g(c,b);else a=OSF.DDA.ErrorCodeManager.getErrorArgs(c);return a};this.getCallArgs=function(g){for(var b,d,f=g.length-1;f>=c;f--){var e=g[f];switch(typeof e){case "object":b=e;break;case a:d=e}}b=b||{};if(d)b[Microsoft.Office.WebExtension.Parameters.Callback]=d;return b}};OSF.DDA.AsyncMethodCallFactory=function(){return {manufacture:function(a){var c=a.supportedOptions?OSF.OUtil.createObject(a.supportedOptions):[],b=a.privateStateCallbacks?OSF.OUtil.createObject(a.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(a.requiredArguments||[],c,b,a.onSucceeded,a.onFailed,a.checkCallArgs,a.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(a){OSF.DDA.AsyncMethodCalls[a.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(a)};OSF.DDA.Error=function(c,a,b){OSF.OUtil.defineEnumerableProperties(this,{name:{value:c},message:{value:a},code:{value:b}})};OSF.DDA.AsyncResult=function(b,a){OSF.OUtil.defineEnumerableProperties(this,{value:{value:b[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:a?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});b[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:b[OSF.DDA.AsyncResultEnum.Properties.Context]});a&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(a[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(d,f,a){var e=d[Microsoft.Office.WebExtension.Parameters.Callback];if(e){var c={};c[OSF.DDA.AsyncResultEnum.Properties.Context]=d[Microsoft.Office.WebExtension.Parameters.AsyncContext];var b;if(f==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)c[OSF.DDA.AsyncResultEnum.Properties.Value]=a;else{b={};a=a||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);b[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=f||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=a.name||a;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=a.message||a}e(new OSF.DDA.AsyncResult(c,b))}};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(b){for(var a in b){var c={};OSF.OUtil.defineEnumerableProperties(c,{id:{value:a},displayName:{value:b[a]}});OSF.DDA.SyncMethodNames[a]=c}};OSF.DDA.SyncMethodCall=function(b,c,f,g,h){var d=b.length,a=new OSF.DDA.ApiMethodCall(b,c,f,g,h);function e(e,h,j,i){if(e.length>d+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var b,k,f=e.length-1;f>=d;f--){var g=e[f];switch(typeof g){case "object":if(b)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else b=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}b=a.fillOptions(b,h,j,i);a.verifyArguments(c,b);return b}this.verifyAndExtractCall=function(f,c,b){var d=a.extractRequiredArguments(f,c,b),h=e(f,d,c,b),g=a.constructCallArgs(d,h,c,b);return g}};OSF.DDA.SyncMethodCallFactory=function(){return {manufacture:function(a){var b=a.supportedOptions?OSF.OUtil.createObject(a.supportedOptions):[];return new OSF.DDA.SyncMethodCall(a.requiredArguments||[],b,a.privateStateCallbacks,a.checkCallArgs,a.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(a){OSF.DDA.SyncMethodCalls[a.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(a)};OSF.DDA.ListType=function(){var a={};return {setListType:function(c,b){a[c]=b},isListType:function(b){return OSF.OUtil.listContainsKey(a,b)},getDescriptor:function(b){return a[b]}}}();OSF.DDA.HostParameterMap=function(b,c){var j="fromHost",a=this,i="toHost",e=j,l="sourceData",g="self",d={};d[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(a){if(a!=null&&a.rows!==undefined){var b={};b[OSF.DDA.TableDataProperties.TableRows]=a.rows;b[OSF.DDA.TableDataProperties.TableHeaders]=a.headers;a=b}return a},fromHost:function(a){return a}};d[Microsoft.Office.WebExtension.Parameters.SampleData]=d[Microsoft.Office.WebExtension.Parameters.Data];function f(j,i){var m=j?{}:undefined;for(var h in j){var g=j[h],a;if(OSF.DDA.ListType.isListType(h)){a=[];for(var n in g)a.push(f(g[n],i))}else if(OSF.OUtil.listContainsKey(d,h))a=d[h][i](g);else if(i==e&&b.preserveNesting(h))a=f(g,i);else{var k=c[h];if(k){var l=k[i];if(l){a=l[g];if(a===undefined)a=g}}else a=g}m[h]=a}return m}function k(j,h){var e;for(var a in h){var d;if(b.isComplexType(a))d=k(j,c[a][i]);else d=j[a];if(d!=undefined){if(!e)e={};var f=h[a];if(f==g)f=a;e[f]=b.pack(a,d)}}return e}function h(j,n,f){if(!f)f={};for(var a in n){var k=n[a],d;if(k==g)d=j;else if(k==l){f[a]=j.toArray();continue}else d=j[k];if(d===null||d===undefined)f[a]=undefined;else{d=b.unpack(a,d);var i;if(b.isComplexType(a)){i=c[a][e];if(b.preserveNesting(a))f[a]=h(d,i);else h(d,i,f)}else if(OSF.DDA.ListType.isListType(a)){i={};var p=OSF.DDA.ListType.getDescriptor(a);i[p]=g;var m=new Array(d.length);for(var o in d)m[o]=h(d[o],i);f[a]=m}else f[a]=d}}return f}function m(l,e,a){var d=c[l][a],b;if(a=="toHost"){var i=f(e,a);b=k(i,d)}else if(a==j){var g=h(e,d);b=f(g,a)}return b}if(!c)c={};a.addMapping=function(l,h){var a,d;if(h.map){a=h.map;d={};for(var j in a){var k=a[j];if(k==g)k=j;d[k]=j}}else{a=h.toHost;d=h.fromHost}var b=c[l];if(b){var f=b[i];for(var n in f)a[n]=f[n];f=b[e];for(var m in f)d[m]=f[m]}else b=c[l]={};b[i]=a;b[e]=d};a.toHost=function(b,a){return m(b,a,i)};a.fromHost=function(a,b){return m(a,b,e)};a.self=g;a.sourceData=l;a.addComplexType=function(a){b.addComplexType(a)};a.getDynamicType=function(a){return b.getDynamicType(a)};a.setDynamicType=function(c,a){b.setDynamicType(c,a)};a.dynamicTypes=d;a.doMapValues=function(a,b){return f(a,b)}};OSF.DDA.SpecialProcessor=function(c,b){var a=this;a.addComplexType=function(a){c.push(a)};a.getDynamicType=function(a){return b[a]};a.setDynamicType=function(c,a){b[c]=a};a.isComplexType=function(a){return OSF.OUtil.listContainsValue(c,a)};a.isDynamicType=function(a){return OSF.OUtil.listContainsKey(b,a)};a.preserveNesting=function(b){var a=[];OSF.DDA.PropertyDescriptors&&a.push(OSF.DDA.PropertyDescriptors.Subset);if(OSF.DDA.DataNodeEventProperties)a=a.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]);return OSF.OUtil.listContainsValue(a,b)};a.pack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].toHost(d);else a=d;return a};a.unpack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].fromHost(d);else a=d;return a}};OSF.DDA.getDecoratedParameterMap=function(d,c){var a=new OSF.DDA.HostParameterMap(d),f=a.self;function b(a){var c=null;if(a){c={};for(var d=a.length,b=0;b0){for(var d=[],c=0;c=f)break;c=Function._validateParameter(i[d],h,j);if(c){c.popStackFrame();return c}}return a};if(!Function._validateParameterCount)Function._validateParameterCount=function(m,f,l){var b,e,c=f.length,g=m.length;if(gc){e=d;for(b=0;b0&&b.push(c)}}}catch(i){}return b}var c=[],b={};b[Microsoft.Office.WebExtension.Parameters.Data]=function(){var c=0,b=1;return {toHost:function(a){if(OSF.DDA.TableDataProperties&&typeof a!="string"&&a[OSF.DDA.TableDataProperties.TableRows]!==undefined){var d=[];d[c]=a[OSF.DDA.TableDataProperties.TableRows];d[b]=a[OSF.DDA.TableDataProperties.TableHeaders];a=d}return a},fromHost:function(f){var e;if(f.toArray){var g=f.dimensions();if(g===2)e=a(f);else{var d=f.toArray();if(d.length===2&&(d[0]!=null&&d[0].toArray||d[1]!=null&&d[1].toArray)){e={};e[OSF.DDA.TableDataProperties.TableRows]=a(d[c]);e[OSF.DDA.TableDataProperties.TableHeaders]=a(d[b])}else e=d}}else e=f;return e}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,c,b);this.unpack=function(c,a){var d;if(this.isComplexType(c)||OSF.DDA.ListType.isListType(c)){var e=(a||typeof a==="unknown")&&a.toArray;d=e?a.toArray():a||{}}else if(this.isDynamicType(c))d=b[c].fromHost(a);else d=a;return d}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(a){function c(a){var b=a;if(OSF.OUtil.isArray(a))for(var f=b.length,d=0;d2){c=[];for(var f=1;f40){a=OSF.OUtil.Guid.generateNewGuid();b.setValue(b.clientIDKey,a)}return a};a.prototype.saveLog=function(d,e){var b=this,a=b.getValue(b.logIdSetKey);a=(a&&a.length>0?a+";":c)+d;b.setValue(b.logIdSetKey,a);b.setValue(d,e)};a.prototype.enumerateLog=function(c,e){var a=this,d=a.getValue(a.logIdSetKey);if(d){var f=d.split(";");for(var h in f){var b=f[h],g=a.getValue(b);if(g){c&&c(b,g);e&&a.remove(b)}}e&&a.remove(a.logIdSetKey)}};a.prototype.getValue=function(d){var a=OSF.OUtil.getLocalStorage(),b=c;if(a)b=a.getItem(d);return b};a.prototype.setValue=function(c,b){var a=OSF.OUtil.getLocalStorage();a&&a.setItem(c,b)};a.prototype.remove=function(b){var a=OSF.OUtil.getLocalStorage();if(a)try{a.removeItem(b)}catch(c){}};return a}(),i=function(){function a(){}a.prototype.LogData=function(a){if(!OSF.Logger||!d.enableTelemetry)return;try{OSFAriaLogger.AriaLogger.getInstance().logData(a)}catch(b){}};a.prototype.LogRawData=function(a){if(!OSF.Logger||!d.enableTelemetry)return;try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(a))}catch(b){}};return a}();function f(a){if(a)a=a.replace(/[{}]/g,c).toLowerCase();return a||c}function x(g){if(!OSF.Logger)return;if(a)return;a=new z;if(g.get_hostFullVersion())a.hostVersion=g.get_hostFullVersion();else a.hostVersion=g.get_appVersion();a.appId=g.get_id();a.host=g.get_appName();a.browser=window.navigator.userAgent;a.correlationId=f(g.get_correlationId());a.clientId=(new l).getClientId();a.appInstanceId=g.get_appInstanceId();if(a.appInstanceId)a.appInstanceId=a.appInstanceId.replace(/[{}]/g,c).toLowerCase();a.message=g.get_hostCustomMessage();a.officeJSVersion=OSF.ConstantNames.FileVersion;a.hostJSVersion="16.0.8916.1000";if(g._wacHostEnvironment)a.wacHostEnvironment=g._wacHostEnvironment;if(g._isFromWacAutomation!==undefined&&g._isFromWacAutomation!==b)a.isFromWacAutomation=g._isFromWacAutomation.toString().toLowerCase();var j=g.get_docUrl();a.docUrl=p.test(j)?j:c;var i=location.href;if(i)i=i.split("?")[0].split("#")[0];a.appURL=i;(function(i,a){var e,h,d;a.assetId=c;a.userId=c;try{e=decodeURIComponent(i);h=new DOMParser;d=h.parseFromString(e,"text/xml");var f=d.getElementsByTagName("t")[0].attributes.getNamedItem("cid"),g=d.getElementsByTagName("t")[0].attributes.getNamedItem("oid");if(f&&f.nodeValue)a.userId=f.nodeValue;else if(g&&g.nodeValue)a.userId=g.nodeValue;a.assetId=d.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(j){}finally{e=b;d=b;h=b}})(g.get_eToken(),a);(function(){var l=new Date,c=b,i=0,k=false,f=function(){if(document.hasFocus()){if(c==b)c=new Date}else if(c){i+=Math.abs((new Date).getTime()-c.getTime());c=b}},a=[];a.push(new h("focus",f));a.push(new h("blur",f));a.push(new h("focusout",f));a.push(new h("focusin",f));var j=function(){for(var f=0;f0)for(var b=0;b0)for(var b=0;b0){this._eventHandlers[a]=[];return true}return false},clearObjectEventHandlers:function(a,b){if(this._objectEventHandlers[a]!=null&&this._objectEventHandlers[a][b]!=null){this._objectEventHandlers[a][b]=[];return true}return false},getEventHandlerCount:function(a){return this._eventHandlers[a]!=undefined?this._eventHandlers[a].length:-1},getObjectEventHandlerCount:function(a,b){if(this._objectEventHandlers[a]==null||this._objectEventHandlers[a][b]==null)return 0;return this._objectEventHandlers[a][b].length},fireEvent:function(a){if(a.type==undefined)return false;var b=a.type;if(b&&this._eventHandlers[b]){for(var d=this._eventHandlers[b],c=0;c0){var d=b[0];while(c.length>0){var e=c.shift();d(e)}return true}}return false},clearQueuedEvent:function(a){if(a&&this._eventHandlers[a]){var b=this._queuedEventsArgs[a];if(b)this._queuedEventsArgs[a]=[]}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(d,c,b){var h="hostPlatform",g="outlook",f="hostType",e=this,a;switch(d){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:a=new OSF.DDA.DocumentSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:a=new OSF.DDA.BindingSelectionChangedEventArgs(e.manufactureBinding(b,c.document),b[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:a=new OSF.DDA.BindingDataChangedEventArgs(e.manufactureBinding(b,c.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:a=new OSF.DDA.SettingsChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:a=new OSF.DDA.ActiveViewChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:a=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:a=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:a=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(b);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:a=new OSF.DDA.ObjectEventArgs(d,b[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:a=new OSF.DDA.RichApiMessageEventArgs(d,b);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:a=new OSF.DDA.NodeInsertedEventArgs(e.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NewNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:a=new OSF.DDA.NodeReplacedEventArgs(e.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.OldNode]),e.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NewNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:a=new OSF.DDA.NodeDeletedEventArgs(e.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.OldNode]),e.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:a=new OSF.DDA.TaskSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:a=new OSF.DDA.ResourceSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:a=new OSF.DDA.ViewSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:a=new OSF.DDA.DialogEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:a=new OSF.DDA.DialogParentEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]==g){a=new OSF.DDA.OlkItemSelectedChangedEventArgs(b);c.initialize(a["initialData"]);(OSF._OfficeAppFactory.getHostInfo()[h]=="win32"||OSF._OfficeAppFactory.getHostInfo()[h]=="mac")&&c.setCurrentItemNumber(a["itemNumber"].itemNumber)}else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,d));break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]==g)a=new OSF.DDA.OlkRecipientsChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,d));break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]==g)a=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,d));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,d))}return a};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:false,isWindowDialog:false};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var c=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),b=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,a=this;!a[b]&&OSF.OUtil.defineEnumerableProperty(a,b,{value:function(){var b=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];b(arguments,c,a)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(d){var b=OSF.DDA.SyncMethodNames.MessageParent.displayName,a=this;!a[b]&&OSF.OUtil.defineEnumerableProperty(a,b,{value:function(){var b=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return b(arguments,a)}});var c=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;!a[c]&&typeof OSF.DialogParentMessageEventDispatch!="undefined"&&OSF.DDA.DispIdHost.addEventSupport(a,OSF.DialogParentMessageEventDispatch,d);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(a){if(a[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived)OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:a[OSF.DDA.PropertyDescriptors.MessageContent]}});else OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:a[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:a[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:true}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:false}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:false}},{name:Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels,value:{types:["boolean"],defaultValue:false}}],privateStateCallbacks:[],onSucceeded:function(c){var g=c[Microsoft.Office.WebExtension.Parameters.Id],b=c[Microsoft.Office.WebExtension.Parameters.Data],a=new OSF.DialogHandler,d=OSF.DDA.AsyncMethodNames.CloseAsync.displayName;OSF.OUtil.defineEnumerableProperty(a,d,{value:function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];c(arguments,g,b,a)}});var f=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;OSF.OUtil.defineEnumerableProperty(a,f,{value:function(){var d=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],c=d.verifyAndExtractCall(arguments,a,b),e=c[Microsoft.Office.WebExtension.Parameters.EventType],f=c[Microsoft.Office.WebExtension.Parameters.Handler];return b.addEventHandlerAndFireQueuedEvent(e,f)}});var e=OSF.DDA.SyncMethodNames.SendMessage.displayName;OSF.OUtil.defineEnumerableProperty(a,e,{value:function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return c(arguments,b,a)}});return a},checkCallArgs:function(a){if(a[Microsoft.Office.WebExtension.Parameters.Width]<=0)a[Microsoft.Office.WebExtension.Parameters.Width]=1;if(!a[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&a[Microsoft.Office.WebExtension.Parameters.Width]>100)a[Microsoft.Office.WebExtension.Parameters.Width]=99;if(a[Microsoft.Office.WebExtension.Parameters.Height]<=0)a[Microsoft.Office.WebExtension.Parameters.Height]=1;if(!a[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&a[Microsoft.Office.WebExtension.Parameters.Height]>100)a[Microsoft.Office.WebExtension.Parameters.Height]=99;if(!a[Microsoft.Office.WebExtension.Parameters.RequireHTTPs])a[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=true;return a}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(a){try{a.onCalling&&a.onCalling();var c=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true,a);OSF.ClientHostController.openDialog(a.dispId,a.targetId,function(c,b){a.onEvent&&a.onEvent(b);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(a.dispId)},c)}catch(b){OSF.DDA.SafeArray.Delegate._onException(b,a)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(a){a.onCalling&&a.onCalling();var c=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false,a);try{OSF.ClientHostController.closeDialog(a.dispId,a.targetId,c)}catch(b){OSF.DDA.SafeArray.Delegate._onException(b,a)}};OSF.DDA.SafeArray.Delegate.messageParent=function(a){try{a.onCalling&&a.onCalling();var d=(new Date).getTime(),b=OSF.ClientHostController.messageParent(a.hostCallArgs);a.onReceiving&&a.onReceiving();OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(a.dispId,a.hostCallArgs,Math.abs((new Date).getTime()-d),b);return b}catch(c){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(c)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:true});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:true});OSF.DDA.SafeArray.Delegate.sendMessage=function(a){try{a.onCalling&&a.onCalling();var d=(new Date).getTime(),c=OSF.ClientHostController.sendMessage(a.hostCallArgs);a.onReceiving&&a.onReceiving();return c}catch(b){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(b)}};OSF.OUtil.redefineList(Microsoft.Office.WebExtension.CoercionType,{Text:"text"});OSF.OUtil.redefineList(Microsoft.Office.WebExtension.ValueFormat,{Unformatted:"unformatted"});OSF.OUtil.redefineList(Microsoft.Office.WebExtension.FilterType,{All:"all"});OSF.OUtil.redefineList(Microsoft.Office.WebExtension.GoToType,{Slide:"slide",Index:"index"});delete Microsoft.Office.WebExtension.BindingType;delete Microsoft.Office.WebExtension.select;OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.CoercionType,toHost:[{name:Microsoft.Office.WebExtension.CoercionType.Text,value:0},{name:Microsoft.Office.WebExtension.CoercionType.Matrix,value:1},{name:Microsoft.Office.WebExtension.CoercionType.Table,value:2}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType,{SlideRange:"slideRange"});OSF.DDA.SlideProperties={Id:0,Title:1,Index:2};OSF.DDA.Slide=function(c,b,a){OSF.OUtil.defineEnumerableProperties(this,{id:{value:c},title:{value:b},index:{value:a}})};OSF.DDA.SlideRange=function(a){OSF.OUtil.defineEnumerableProperties(this,{slides:{value:a}})};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureSlideRange=function(h){var c=null,a=c;if(JSON)a=JSON.parse(h);else a=Sys.Serialization.JavaScriptSerializer.deserialize(h);if(a==c)return c;var e=0;for(var k in OSF.DDA.SlideProperties)if(OSF.DDA.SlideProperties.hasOwnProperty(k))e++;for(var f=[],d=true,b=0;b4*1024*1024)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return b},onSucceeded:function(a,c,b){return new OSF.DDA.File(a[OSF.DDA.FileProperties.Handle],a[OSF.DDA.FileProperties.FileSize],b[Microsoft.Office.WebExtension.Parameters.SliceSize])}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(b,a){return a[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(b,a){return a[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(a,d,c){var b=a[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(b<0||b>=d.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;a[OSF.DDA.FileSliceOffset]=parseInt((b*c[OSF.DDA.FileProperties.SliceSize]).toString());return a},onSucceeded:function(a,d,c){var b={};OSF.OUtil.defineEnumerableProperties(b,{data:{value:a[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:c[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:a[OSF.DDA.FileProperties.SliceSize]}});return b}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(b,a){return a[OSF.DDA.FileProperties.Handle]}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileProperties.FileSize,value:1}],isComplexType:true});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0},{name:OSF.DDA.FileProperties.SliceSize,value:1}],isComplexType:true});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:0},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:5},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:6}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:0}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileSliceOffset,value:1},{name:OSF.DDA.FileProperties.SliceSize,value:2}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0}]});OSF.DDA.AsyncMethodNames.addNames({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync"});(function(){var c=false,b="boolean",a="number";function d(b,d,c){var a=b[Microsoft.Office.WebExtension.Parameters.Data];if(OSF.DDA.TableDataProperties&&a&&(a[OSF.DDA.TableDataProperties.TableRows]!=undefined||a[OSF.DDA.TableDataProperties.TableHeaders]!=undefined))a=OSF.DDA.OMFactory.manufactureTableData(a);a=OSF.DDA.DataCoercion.coerceData(a,c[Microsoft.Office.WebExtension.Parameters.CoercionType]);return a==undefined?null:a}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,"enum":Microsoft.Office.WebExtension.CoercionType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}}],privateStateCallbacks:[],onSucceeded:d});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object",a,b]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(a){return OSF.DDA.DataCoercion.determineCoercionType(a[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:[a,b],defaultValue:c}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:[a,b],defaultValue:c}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[a,b],defaultValue:c}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[a,b],defaultValue:c}}],privateStateCallbacks:[]})})();OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:1},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:2},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:3},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:4},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:5}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:0},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:1},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:2},{name:Microsoft.Office.WebExtension.GoToType.Index,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:0},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:1},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:1},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:2}]});OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",RefreshingSettings:"refreshingSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(a){return OSF.OUtil.serializeSettings(a)},deserializeSettings:function(a){return OSF.OUtil.deserializeSettings(a)}};OSF.DDA.Settings=function(a){var b="name";a=a||{};var c=function(d){var b=OSF.OUtil.getSessionStorage();if(b){var a=OSF.DDA.SettingsManager.serializeSettings(d),c=JSON?JSON.stringify(a):Sys.Serialization.JavaScriptSerializer.serialize(a);b.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),c)}};OSF.OUtil.defineEnumerableProperties(this,{"get":{value:function(e){var d=Function._validateParams(arguments,[{name:b,type:String,mayBeNull:false}]);if(d)throw d;var c=a[e];return typeof c==="undefined"?null:c}},"set":{value:function(f,e){var d=Function._validateParams(arguments,[{name:b,type:String,mayBeNull:false},{name:"value",mayBeNull:true}]);if(d)throw d;a[f]=e;c(a)}},remove:{value:function(e){var d=Function._validateParams(arguments,[{name:b,type:String,mayBeNull:false}]);if(d)throw d;delete a[e];c(a)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],a)};OSF.DDA.RefreshableSettings=function(a){OSF.DDA.RefreshableSettings.uber.constructor.call(this,a);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],a);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:a}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(b,a){return a}}],onSucceeded:function(d,a,e){var f=d[OSF.DDA.SettingsManager.SerializedSettings],c=OSF.DDA.SettingsManager.deserializeSettings(f),g=e[OSF.DDA.SettingsManager.RefreshingSettings];for(var b in g)a.remove(b);for(var b in c)a.set(b,c[b]);return a}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:true}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(b,a){return OSF.DDA.SettingsManager.serializeSettings(a)}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});OSF.DDA.AsyncMethodNames.addNames({GetOfficeThemeAsync:"getOfficeThemeAsync",GetDocumentThemeAsync:"getDocumentThemeAsync"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{OfficeThemeChanged:"officeThemeChanged",DocumentThemeChanged:"documentThemeChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.Parameters,{DocumentTheme:"documentTheme",OfficeTheme:"officeTheme"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DocumentThemeChangedEvent:"DocumentThemeChangedEvent",OfficeThemeChangedEvent:"OfficeThemeChangedEvent"});OSF.OUtil.setNamespace("Theming",OSF.DDA);OSF.DDA.Theming.OfficeThemeEnum={PrimaryFontColor:"primaryFontColor",PrimaryBackgroundColor:"primaryBackgroundColor",SecondaryFontColor:"secondaryFontColor",SecondaryBackgroundColor:"secondaryBackgroundColor"};OSF.DDA.Theming.DocumentThemeEnum={PrimaryFontColor:"primaryFontColor",PrimaryBackgroundColor:"primaryBackgroundColor",SecondaryFontColor:"secondaryFontColor",SecondaryBackgroundColor:"secondaryBackgroundColor",Accent1:"accent1",Accent2:"accent2",Accent3:"accent3",Accent4:"accent4",Accent5:"accent5",Accent6:"accent6",Hyperlink:"hyperlink",FollowedHyperlink:"followedHyperlink",HeaderLatinFont:"headerLatinFont",HeaderEastAsianFont:"headerEastAsianFont",HeaderScriptFont:"headerScriptFont",HeaderLocalizedFont:"headerLocalizedFont",BodyLatinFont:"bodyLatinFont",BodyEastAsianFont:"bodyEastAsianFont",BodyScriptFont:"bodyScriptFont",BodyLocalizedFont:"bodyLocalizedFont"};OSF.DDA.Theming.ConvertToDocumentTheme=function(f){var b=false,a=true;for(var d=[{name:"primaryFontColor",needToConvertToHex:a},{name:"primaryBackgroundColor",needToConvertToHex:a},{name:"secondaryFontColor",needToConvertToHex:a},{name:"secondaryBackgroundColor",needToConvertToHex:a},{name:"accent1",needToConvertToHex:a},{name:"accent2",needToConvertToHex:a},{name:"accent3",needToConvertToHex:a},{name:"accent4",needToConvertToHex:a},{name:"accent5",needToConvertToHex:a},{name:"accent6",needToConvertToHex:a},{name:"hyperlink",needToConvertToHex:a},{name:"followedHyperlink",needToConvertToHex:a},{name:"headerLatinFont",needToConvertToHex:b},{name:"headerEastAsianFont",needToConvertToHex:b},{name:"headerScriptFont",needToConvertToHex:b},{name:"headerLocalizedFont",needToConvertToHex:b},{name:"bodyLatinFont",needToConvertToHex:b},{name:"bodyEastAsianFont",needToConvertToHex:b},{name:"bodyScriptFont",needToConvertToHex:b},{name:"bodyLocalizedFont",needToConvertToHex:b}],e={},c=0;c 0 && setMaxVersion >= minVersion; + try { + var setMaxVersionNum = this._getVersion(setMaxVersion); + minVersion = minVersion + ""; + var minVersionNum = this._getVersion(minVersion); + if (setMaxVersionNum.major > 0 && setMaxVersionNum.major > minVersionNum.major) { + return true; + } + if (setMaxVersionNum.minor > 0 && + setMaxVersionNum.minor > 0 && + setMaxVersionNum.major == minVersionNum.major && + setMaxVersionNum.minor >= minVersionNum.minor) { + return true; + } + } + catch (e) { + return false; + } + } + return false; + }; + this._getVersion = function (version) { + var temp = version.split("."); + var major = 0; + var minor = 0; + if (temp.length < 2 && isNaN(Number(version))) { + throw "version format incorrect"; } else { - return false; + major = Number(temp[0]); + if (temp.length >= 2) { + minor = Number(temp[1]); + } + if (isNaN(major) || isNaN(minor)) { + throw "version format incorrect"; + } } + var result = { "minor": minor, "major": major }; + return result; }; this._setMap = _setMap; this.isSetSupported = this.isSetSupported.bind(this); @@ -1981,6 +2071,7 @@ var OfficeExt; web: Microsoft.Office.WebExtension.PlatformType.OfficeOnline, winrt: Microsoft.Office.WebExtension.PlatformType.Universal, win32: Microsoft.Office.WebExtension.PlatformType.PC, + mac: Microsoft.Office.WebExtension.PlatformType.Mac, ios: Microsoft.Office.WebExtension.PlatformType.iOS, android: Microsoft.Office.WebExtension.PlatformType.Android }; @@ -2154,6 +2245,11 @@ OSF.DDA.Context = function OSF_DDA_Context(officeAppContext, document, license, value: officeAppContext.ui }); } + if (officeAppContext.auth) { + OSF.OUtil.defineEnumerableProperty(this, "auth", { + value: officeAppContext.auth + }); + } if (officeAppContext.get_isDialog()) { var requirements = OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); OSF.OUtil.defineEnumerableProperty(this, "requirements", { @@ -2928,6 +3024,7 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod "ClearFormatsAsync": did.dispidClearFormatsMethod, "SetTableOptionsAsync": did.dispidSetTableOptionsMethod, "SetFormatsAsync": did.dispidSetFormatsMethod, + "GetAccessTokenAsync": did.dispidGetAccessTokenMethod, "ExecuteRichApiRequestAsync": did.dispidExecuteRichApiRequestMethod, "AppCommandInvocationCompletedAsync": did.dispidAppCommandInvocationCompletedMethod, "CloseContainerAsync": did.dispidCloseContainerMethod, @@ -2992,7 +3089,14 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod "AppCommandInvoked": did.dispidAppCommandInvokedEvent, "DialogMessageReceived": did.dispidDialogMessageReceivedEvent, "DialogParentMessageReceived": did.dispidDialogParentMessageReceivedEvent, + "ObjectDeleted": did.dispidObjectDeletedEvent, + "ObjectSelectionChanged": did.dispidObjectSelectionChangedEvent, + "ObjectDataChanged": did.dispidObjectDataChangedEvent, + "ContentControlAdded": did.dispidContentControlAddedEvent, + "RichApiMessage": did.dispidRichApiMessageEvent, "ItemChanged": did.dispidOlkItemSelectedChangedEvent, + "RecipientsChanged": did.dispidOlkRecipientsChangedEvent, + "AppointmentTimeChanged": did.dispidOlkAppointmentTimeChangedEvent, "TaskSelectionChanged": did.dispidTaskSelectionChangedEvent, "ResourceSelectionChanged": did.dispidResourceSelectionChangedEvent, "ViewSelectionChanged": did.dispidViewSelectionChangedEvent, @@ -3005,6 +3109,12 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod dispIdMap[jsom[event]] = eventMap[event]; } } + function IsObjectEvent(dispId) { + return (dispId == OSF.DDA.EventDispId.dispidObjectDeletedEvent || + dispId == OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent || + dispId == OSF.DDA.EventDispId.dispidObjectDataChangedEvent || + dispId == OSF.DDA.EventDispId.dispidContentControlAddedEvent); + } function onException(ex, asyncMethodCall, suppliedArgs, callArgs) { if (typeof ex == "number") { if (!callArgs) { @@ -3030,11 +3140,13 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod window.Excel._RedirectV1APIs = true; } if (window.Excel && window.Excel._RedirectV1APIs && (richApiInExcelMethodSubstitution = window.Excel._V1APIMap[methodName])) { + var preprocessedCallArgs = OSF.OUtil.shallowCopy(callArgs); + delete preprocessedCallArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; if (richApiInExcelMethodSubstitution.preprocess) { - callArgs = richApiInExcelMethodSubstitution.preprocess(callArgs); + preprocessedCallArgs = richApiInExcelMethodSubstitution.preprocess(preprocessedCallArgs); } var ctx = new window.Excel.RequestContext(); - var result = richApiInExcelMethodSubstitution.call(ctx, callArgs); + var result = richApiInExcelMethodSubstitution.call(ctx, preprocessedCallArgs); ctx.sync() .then(function () { var response = result.value; @@ -3042,7 +3154,7 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod delete response["status"]; delete response["@odata.type"]; if (richApiInExcelMethodSubstitution.postprocess) { - response = richApiInExcelMethodSubstitution.postprocess(response, callArgs); + response = richApiInExcelMethodSubstitution.postprocess(response, preprocessedCallArgs); } if (status != 0) { response = OSF.DDA.ErrorCodeManager.getErrorArgs(status); @@ -3060,6 +3172,7 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod else { hostCallArgs = callArgs; } + var startTime = (new Date()).getTime(); delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ "dispId": dispId, "hostCallArgs": hostCallArgs, @@ -3080,6 +3193,9 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod } var payload = asyncMethodCall.processResponse(status, responseArgs, caller, callArgs); OSF.DDA.issueAsyncResult(callArgs, status, payload); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(dispId, hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); + } } }); } @@ -3091,9 +3207,11 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod this[OSF.DDA.DispIdHost.Methods.AddEventHandler] = function OSF_DDA_DispIdHost_Facade$AddEventHandler(suppliedArguments, eventDispatch, caller, isPopupWindow) { var callArgs; var eventType, handler; + var isObjectEvent = false; function onEnsureRegistration(status) { if (status == OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { - var added = eventDispatch.addEventHandler(eventType, handler); + var added = !isObjectEvent ? eventDispatch.addEventHandler(eventType, handler) : + eventDispatch.addObjectEventHandler(eventType, callArgs[Microsoft.Office.WebExtension.Parameters.Id], handler); if (!added) { status = OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed; } @@ -3113,19 +3231,25 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); return; } - if (eventDispatch.getEventHandlerCount(eventType) == 0) { - var dispId = dispIdMap[eventType]; + var dispId = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId); + var targetId = (isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId) : eventDispatch.getEventHandlerCount(eventType); + if (count == 0) { var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; invoker({ "eventType": eventType, "dispId": dispId, - "targetId": caller.id || "", + "targetId": targetId, "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, "onComplete": onEnsureRegistration, "onEvent": function handleEvent(hostArgs) { var args = parameterMap.fromHost(dispId, hostArgs); - eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType, caller, args)); + if (!isObjectEvent) + eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType, caller, args)); + else + eventDispatch.fireObjectEvent(targetId, OSF.DDA.OMFactory.manufactureEventArgs(eventType, targetId, args)); } }); } @@ -3140,6 +3264,7 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod this[OSF.DDA.DispIdHost.Methods.RemoveEventHandler] = function OSF_DDA_DispIdHost_Facade$RemoveEventHandler(suppliedArguments, eventDispatch, caller) { var callArgs; var eventType, handler; + var isObjectEvent = false; function onEnsureRegistration(status) { var error; if (status != OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { @@ -3152,22 +3277,25 @@ OSF.DDA.DispIdHost.Facade = function OSF_DDA_DispIdHost_Facade(getDelegateMethod callArgs = asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); eventType = callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; handler = callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + var dispId = dispIdMap[eventType]; + isObjectEvent = IsObjectEvent(dispId); + var targetId = (isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); var status, removeSuccess; if (handler === null) { - removeSuccess = eventDispatch.clearEventHandlers(eventType); + removeSuccess = isObjectEvent ? eventDispatch.clearObjectEventHandlers(eventType, targetId) : eventDispatch.clearEventHandlers(eventType); status = OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; } else { - removeSuccess = eventDispatch.removeEventHandler(eventType, handler); + removeSuccess = isObjectEvent ? eventDispatch.removeObjectEventHandler(eventType, targetId, handler) : eventDispatch.removeEventHandler(eventType, handler); status = removeSuccess ? OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess : OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist; } - if (removeSuccess && eventDispatch.getEventHandlerCount(eventType) == 0) { - var dispId = dispIdMap[eventType]; + var count = isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId) : eventDispatch.getEventHandlerCount(eventType); + if (removeSuccess && count == 0) { var invoker = getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; invoker({ "eventType": eventType, "dispId": dispId, - "targetId": caller.id || "", + "targetId": targetId, "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, "onComplete": onEnsureRegistration @@ -3935,7 +4063,6 @@ OSF.DDA.SafeArray.Delegate.executeAsync = function OSF_DDA_SafeArray_Delegate$Ex if (args.onCalling) { args.onCalling(); } - var startTime = (new Date()).getTime(); OSF.ClientHostController.execute(args.dispId, toArray(args.hostCallArgs), function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode) { var result = hostResponseArgs.toArray(); var status = result[OSF.DDA.SafeArray.Response.Status]; @@ -3982,9 +4109,6 @@ OSF.DDA.SafeArray.Delegate.executeAsync = function OSF_DDA_SafeArray_Delegate$Ex } args.onComplete(status, payload); } - if (OSF.AppTelemetry) { - OSF.AppTelemetry.onMethodDone(args.dispId, args.hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); - } return true; }); } @@ -4100,6 +4224,10 @@ OSF.InitializationHelper.prototype.prepareApiSurface = function OSF_Initializati } } } + if (OSF.DDA.Auth) { + appContext.auth = new OSF.DDA.Auth(); + OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth, [OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]); + } OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(appContext, appContext.doc, license, null, getOfficeThemeHandler)); var getDelegateMethods, parameterMap; getDelegateMethods = OSF.DDA.DispIdHost.getClientDelegateMethods; @@ -4824,7 +4952,7 @@ var OSFAriaLogger; function AriaLogger() { } AriaLogger.prototype.getAriaCDNLocation = function () { - return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath() + "/ariatelemetry/aria-web-telemetry-2.8.0.min.js"); + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath() + "/ariatelemetry/aria-web-telemetry.js"); }; AriaLogger.getInstance = function () { if (AriaLogger.AriaLoggerObj === undefined) { @@ -4841,13 +4969,10 @@ var OSFAriaLogger; try { if (!this.ALogger) { var OfficeExtensibilityTenantID = "db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; - var configuration = new microsoft.applications.telemetry.LogConfiguration(); - configuration.enableAutoUserSession = true; - microsoft.applications.telemetry.LogManager.initialize(OfficeExtensibilityTenantID, configuration); - this.ALogger = new microsoft.applications.telemetry.Logger(); + this.ALogger = AWTLogManager.initialize(OfficeExtensibilityTenantID); } - var eventProperties = new microsoft.applications.telemetry.EventProperties(); - eventProperties.name = "Office.Extensibility.OfficeJS." + tableName; + var eventProperties = new AWTEventProperties(); + eventProperties.setName("Office.Extensibility.OfficeJS." + tableName); for (var key in telemetryData) { if (key.toLowerCase() !== "table") { eventProperties.setProperty(key, telemetryData[key]); @@ -4880,6 +5005,7 @@ var OSFAppTelemetry; var sessionId = OSF.OUtil.Guid.generateNewGuid(); var osfControlAppCorrelationId = ""; var omexDomainRegex = new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"); + OSFAppTelemetry.enableTelemetry = true; ; var AppInfo = (function () { function AppInfo() { @@ -4963,17 +5089,19 @@ var OSFAppTelemetry; function AppLogger() { } AppLogger.prototype.LogData = function (data) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, data.SerializeRow(), OSF.Logger.SendFlag.none); - OSFAriaLogger.AriaLogger.getInstance().logData(data); + try { + OSFAriaLogger.AriaLogger.getInstance().logData(data); + } + catch (e) { + } }; AppLogger.prototype.LogRawData = function (log) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, log, OSF.Logger.SendFlag.none); try { OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)); } @@ -5013,7 +5141,7 @@ var OSFAppTelemetry; } appInfo.message = context.get_hostCustomMessage(); appInfo.officeJSVersion = OSF.ConstantNames.FileVersion; - appInfo.hostJSVersion = "16.0.7819.1000"; + appInfo.hostJSVersion = "16.0.8616.1000"; if (context._wacHostEnvironment) { appInfo.wacHostEnvironment = context._wacHostEnvironment; } @@ -5242,10 +5370,15 @@ var OSFAppTelemetry; Microsoft.Office.WebExtension.EventType = {}; OSF.EventDispatch = function OSF_EventDispatch(eventTypes) { this._eventHandlers = {}; + this._objectEventHandlers = {}; this._queuedEventsArgs = {}; for (var entry in eventTypes) { var eventType = eventTypes[entry]; - this._eventHandlers[eventType] = []; + var isObjectEvent = (eventType == "objectDeleted" || eventType == "objectSelectionChanged" || eventType == "objectDataChanged" || eventType == "contentControlAdded"); + if (!isObjectEvent) + this._eventHandlers[eventType] = []; + else + this._objectEventHandlers[eventType] = {}; this._queuedEventsArgs[eventType] = []; } }; @@ -5254,17 +5387,20 @@ OSF.EventDispatch.prototype = { var events = []; for (var eventName in this._eventHandlers) events.push(eventName); + for (var eventName in this._objectEventHandlers) + events.push(eventName); return events; }, supportsEvent: function OSF_EventDispatch$supportsEvent(event) { - var isSupported = false; for (var eventName in this._eventHandlers) { - if (event == eventName) { - isSupported = true; - break; - } + if (event == eventName) + return true; + } + for (var eventName in this._objectEventHandlers) { + if (event == eventName) + return true; } - return isSupported; + return false; }, hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) { var handlers = this._eventHandlers[eventType]; @@ -5276,6 +5412,17 @@ OSF.EventDispatch.prototype = { } return false; }, + hasObjectEventHandler: function OSF_EventDispatch$hasObjectEventHandler(eventType, objectId, handler) { + var handlers = this._objectEventHandlers[eventType]; + if (handlers != null) { + var _handlers = handlers[objectId]; + for (var i = 0; _handlers != null && i < _handlers.length; i++) { + if (_handlers[i] === handler) + return true; + } + } + return false; + }, addEventHandler: function OSF_EventDispatch$addEventHandler(eventType, handler) { if (typeof handler != "function") { return false; @@ -5289,6 +5436,19 @@ OSF.EventDispatch.prototype = { return false; } }, + addObjectEventHandler: function OSF_EventDispatch$addObjectEventHandler(eventType, objectId, handler) { + if (typeof handler != "function") { + return false; + } + var handlers = this._objectEventHandlers[eventType]; + if (handlers && !this.hasObjectEventHandler(eventType, objectId, handler)) { + if (handlers[objectId] == null) + handlers[objectId] = []; + handlers[objectId].push(handler); + return true; + } + return false; + }, addEventHandlerAndFireQueuedEvent: function OSF_EventDispatch$addEventHandlerAndFireQueuedEvent(eventType, handler) { var handlers = this._eventHandlers[eventType]; var isFirstHandler = handlers.length == 0; @@ -5310,6 +5470,19 @@ OSF.EventDispatch.prototype = { } return false; }, + removeObjectEventHandler: function OSF_EventDispatch$removeObjectEventHandler(eventType, objectId, handler) { + var handlers = this._objectEventHandlers[eventType]; + if (handlers != null) { + var _handlers = handlers[objectId]; + for (var i = 0; _handlers != null && i < _handlers.length; i++) { + if (_handlers[i] === handler) { + _handlers.splice(i, 1); + return true; + } + } + } + return false; + }, clearEventHandlers: function OSF_EventDispatch$clearEventHandlers(eventType) { if (typeof this._eventHandlers[eventType] != "undefined" && this._eventHandlers[eventType].length > 0) { this._eventHandlers[eventType] = []; @@ -5317,9 +5490,21 @@ OSF.EventDispatch.prototype = { } return false; }, + clearObjectEventHandlers: function OSF_EventDispatch$clearObjectEventHandlers(eventType, objectId) { + if (this._objectEventHandlers[eventType] != null && this._objectEventHandlers[eventType][objectId] != null) { + this._objectEventHandlers[eventType][objectId] = []; + return true; + } + return false; + }, getEventHandlerCount: function OSF_EventDispatch$getEventHandlerCount(eventType) { return this._eventHandlers[eventType] != undefined ? this._eventHandlers[eventType].length : -1; }, + getObjectEventHandlerCount: function OSF_EventDispatch$getObjectEventHandlerCount(eventType, objectId) { + if (this._objectEventHandlers[eventType] == null || this._objectEventHandlers[eventType][objectId] == null) + return 0; + return this._objectEventHandlers[eventType][objectId].length; + }, fireEvent: function OSF_EventDispatch$fireEvent(eventArgs) { if (eventArgs.type == undefined) return false; @@ -5334,6 +5519,21 @@ OSF.EventDispatch.prototype = { return false; } }, + fireObjectEvent: function OSF_EventDispatch$fireObjectEvent(objectId, eventArgs) { + if (eventArgs.type == undefined) + return false; + var eventType = eventArgs.type; + if (eventType && this._objectEventHandlers[eventType]) { + var eventHandlers = this._objectEventHandlers[eventType]; + var _handlers = eventHandlers[objectId]; + if (_handlers != null) { + for (var i = 0; i < _handlers.length; i++) + _handlers[i](eventArgs); + return true; + } + } + return false; + }, fireOrQueueEvent: function OSF_EventDispatch$fireOrQueueEvent(eventArgs) { var eventType = eventArgs.type; if (eventType && this._eventHandlers[eventType]) { @@ -5403,6 +5603,15 @@ OSF.DDA.OMFactory.manufactureEventArgs = function OSF_DDA_OMFactory$manufactureE case Microsoft.Office.WebExtension.EventType.AppCommandInvoked: args = OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(eventProperties); break; + case Microsoft.Office.WebExtension.EventType.ObjectDeleted: + case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged: + case Microsoft.Office.WebExtension.EventType.ObjectDataChanged: + case Microsoft.Office.WebExtension.EventType.ContentControlAdded: + args = new OSF.DDA.ObjectEventArgs(eventType, eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); + break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args = new OSF.DDA.RichApiMessageEventArgs(eventType, eventProperties); + break; case Microsoft.Office.WebExtension.EventType.DataNodeInserted: args = new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); break; @@ -5437,6 +5646,22 @@ OSF.DDA.OMFactory.manufactureEventArgs = function OSF_DDA_OMFactory$manufactureE throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); } break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlookwebapp") { + args = new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"] == "outlookwebapp") { + args = new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; default: throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); } @@ -5799,6 +6024,13 @@ OSF.DDA.AsyncMethodCalls.define({ "types": ["boolean"], "defaultValue": false } + }, + { + name: Microsoft.Office.WebExtension.Parameters.HideTitle, + value: { + "types": ["boolean"], + "defaultValue": false + } } ], privateStateCallbacks: [], diff --git a/node_modules/@microsoft/office-js/dist/project-win32-16.01.js b/node_modules/@microsoft/office-js/dist/project-win32-16.01.js index 5883143..e7d1b84 100644 --- a/node_modules/@microsoft/office-js/dist/project-win32-16.01.js +++ b/node_modules/@microsoft/office-js/dist/project-win32-16.01.js @@ -1,5 +1,5 @@ /* Project specific JavaScript API library */ -/* Version: 16.0.7819.1000 */ +/* Version: 16.0.8616.1000 */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ @@ -9,4 +9,4 @@ Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419. */ -var __extends=this&&this.__extends||function(b,a){for(var c in a)if(a.hasOwnProperty(c))b[c]=a[c];function d(){this.constructor=b}b.prototype=a===null?Object.create(a):(d.prototype=a.prototype,new d)},OfficeExt;(function(b){var a=function(){var a=true;function b(){}b.prototype.isMsAjaxLoaded=function(){var b="function",c="undefined";if(typeof Sys!==c&&typeof Type!==c&&Sys.StringBuilder&&typeof Sys.StringBuilder===b&&Type.registerNamespace&&typeof Type.registerNamespace===b&&Type.registerClass&&typeof Type.registerClass===b&&typeof Function._validateParams===b&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===b)return a;else return false};b.prototype.loadMsAjaxFull=function(b){var a=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(a,b)};Object.defineProperty(b.prototype,"msAjaxError",{"get":function(){var a=this;if(a._msAjaxError==null&&a.isMsAjaxLoaded())a._msAjaxError=Error;return a._msAjaxError},"set":function(a){this._msAjaxError=a},enumerable:a,configurable:a});Object.defineProperty(b.prototype,"msAjaxString",{"get":function(){var a=this;if(a._msAjaxString==null&&a.isMsAjaxLoaded())a._msAjaxString=String;return a._msAjaxString},"set":function(a){this._msAjaxString=a},enumerable:a,configurable:a});Object.defineProperty(b.prototype,"msAjaxDebug",{"get":function(){var a=this;if(a._msAjaxDebug==null&&a.isMsAjaxLoaded())a._msAjaxDebug=Sys.Debug;return a._msAjaxDebug},"set":function(a){this._msAjaxDebug=a},enumerable:a,configurable:a});return b}();b.MicrosoftAjaxFactory=a})(OfficeExt||(OfficeExt={}));var OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory,OSF=OSF||{},OfficeExt;(function(b){var a=function(){function a(a){this._internalStorage=a}a.prototype.getItem=function(a){try{return this._internalStorage&&this._internalStorage.getItem(a)}catch(b){return null}};a.prototype.setItem=function(b,a){try{this._internalStorage&&this._internalStorage.setItem(b,a)}catch(c){}};a.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(a){}};a.prototype.removeItem=function(a){try{this._internalStorage&&this._internalStorage.removeItem(a)}catch(b){}};a.prototype.getKeysWithPrefix=function(d){var b=[];try{for(var e=this._internalStorage&&this._internalStorage.length||0,a=0;a0)b.push(a);else a.tabIndex===0&&c.push(a);else c.push(a)}b=b.sort(function(d,c){var a=d.tabIndex-c.tabIndex;if(a===0)a=b.indexOf(d)-b.indexOf(c);return a});return [].concat(b,c)}return {set_entropy:function(a){if(typeof a=="string")for(var b=0;b1?f[f.length-1]:a;if(k&&b!=a){if(b.indexOf(u)>=0)b=b.split(u)[0];b=decodeURIComponent(b)}var c=p();if(!i&&c){var e=window.name.indexOf(j);if(e>d){var g=window.name.indexOf(";",e);if(g==d)g=window.name.length;var h=window.name.substring(e,g);if(b)c.setItem(h,b);else b=c.getItem(h)}}return b},getConversationId:function(){var c=window.location.search,b=a;if(c){var d=c.indexOf("&");b=d>0?c.substring(1,d):c.substr(1);if(b&&b.charAt(b.length-1)==="="){b=b.substring(0,b.length-1);if(b)b=decodeURIComponent(b)}}return b},getInfoItems:function(b){var a=b.split("$");if(typeof a[1]==h)a=b.split("|");if(typeof a[1]==h)a=b.split("%7C");return a},getXdmFieldValue:function(e,d){var b="",c=OSF.OUtil.parseXdmInfo(d);if(c){var a=OSF.OUtil.getInfoItems(c);if(a!=undefined&&a.length>=3)switch(e){case OSF.XdmFieldName.ConversationUrl:b=a[2];break;case OSF.XdmFieldName.AppId:b=a[1]}}return b},validateParamObject:function(f,e){var a=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:c},{name:"expectedProperties",type:Object,mayBeNull:c},{name:"callback",type:Function,mayBeNull:b}]);if(a)throw a;for(var d in e){a=Function._validateParameter(f[d],e[d],d);if(a)throw a}},writeProfilerMark:function(a){if(window.msWriteProfilerMark){window.msWriteProfilerMark(a);OsfMsAjaxFactory.msAjaxDebug.trace(a)}},outputDebug:function(a){typeof OsfMsAjaxFactory!==h&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(a)},defineNondefaultProperty:function(e,f,a,c){a=a||{};for(var g in c){var d=c[g];if(a[d]==undefined)a[d]=b}Object.defineProperty(e,f,a);return e},defineNondefaultProperties:function(c,a,d){a=a||{};for(var b in a)OSF.OUtil.defineNondefaultProperty(c,b,a[b],d);return c},defineEnumerableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[e])},defineEnumerableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[e])},defineMutableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[k,e,l])},defineMutableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[k,e,l])},finalizeProperties:function(e,d){d=d||{};for(var g=Object.getOwnPropertyNames(e),i=g.length,f=0;f>8;f=g&255;b[a++]=d>>2;b[a++]=(d&3)<<4|e>>4;b[a++]=(e&15)<<2|f>>6;b[a++]=f&63;if(!isNaN(g)){d=g>>8;e=i&255;f=i>>8;b[a++]=d>>2;b[a++]=(d&3)<<4|e>>4;b[a++]=(e&15)<<2|f>>6;b[a++]=f&63}if(isNaN(g))b[a-1]=64;else if(isNaN(i)){b[a-2]=64;b[a-1]=64}for(var k=0;k0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(b){if(b==a)return a;else if(Array.isArray(b)){for(var e=[],d=0;dc)return d;else if(a===0&&b)return d;else if(a===c-1&&!b)return d;if(b)return a-1;else return a+1};e=t(e);h=j?e.length-1:0;if(e.length===0)return a;while(!i&&h>=0&&hc)return d;else if(a===0&&b)return d;else if(a===c-1&&!b)return d;if(b)return a-1;else return a+1};f=t(f);k=n(f,o);e=j(f.length,k,m);if(e<0)return a;while(!i&&e>=0&&e0;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[d%16];d=Math.floor(d/16)}for(;b<32;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[Math.floor(Math.random()*16)]}return c}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(y,u,p,n,r,v,q,t,x,j,w,l,k,m,h,g,f,e,i,c,d,s,o,b){var a=this;a._id=y;a._appName=u;a._appVersion=p;a._appUILocale=n;a._dataLocale=r;a._docUrl=v;a._clientMode=q;a._settings=t;a._reason=x;a._osfControlType=j;a._eToken=w;a._correlationId=l;a._appInstanceId=k;a._touchEnabled=m;a._commerceAllowed=h;a._appMinorVersion=g;a._requirementMatrix=f;a._hostCustomMessage=e;a._hostFullVersion=i;a._isDialog=false;a._clientWindowHeight=c;a._clientWindowWidth=d;a._addinName=s;a._appDomains=o;a._dialogRequirementMatrix=b;a.get_id=function(){return this._id};a.get_appName=function(){return this._appName};a.get_appVersion=function(){return this._appVersion};a.get_appUILocale=function(){return this._appUILocale};a.get_dataLocale=function(){return this._dataLocale};a.get_docUrl=function(){return this._docUrl};a.get_clientMode=function(){return this._clientMode};a.get_bindings=function(){return this._bindings};a.get_settings=function(){return this._settings};a.get_reason=function(){return this._reason};a.get_osfControlType=function(){return this._osfControlType};a.get_eToken=function(){return this._eToken};a.get_correlationId=function(){return this._correlationId};a.get_appInstanceId=function(){return this._appInstanceId};a.get_touchEnabled=function(){return this._touchEnabled};a.get_commerceAllowed=function(){return this._commerceAllowed};a.get_appMinorVersion=function(){return this._appMinorVersion};a.get_requirementMatrix=function(){return this._requirementMatrix};a.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};a.get_hostCustomMessage=function(){return this._hostCustomMessage};a.get_hostFullVersion=function(){return this._hostFullVersion};a.get_isDialog=function(){return this._isDialog};a.get_clientWindowHeight=function(){return this._clientWindowHeight};a.get_clientWindowWidth=function(){return this._clientWindowWidth};a.get_addinName=function(){return this._addinName};a.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(b,a){if(a==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||a==Microsoft.Office.WebExtension.EventType.BindingDataChanged||a==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||a==Microsoft.Office.WebExtension.EventType.DataNodeInserted||a==Microsoft.Office.WebExtension.EventType.DataNodeReplaced)return b+"_"+a;else return a};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidActivationStatusChangedEvent:32,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var a={};return {getErrorArgs:function(c){var b=a[c];if(!b)b=a[this.errorCodes.ooeInternalError];else{if(!b.name)b.name=a[this.errorCodes.ooeInternalError].name;if(!b.message)b.message=a[this.errorCodes.ooeInternalError].message}return b},addErrorMessage:function(c,b){a[c]=b},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11000,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12000,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011},initializeErrorMessages:function(b){a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:b.L_DataReadError,message:b.L_GetSelectionNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotMatchBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:b.L_DataReadError,message:b.L_InvalidGetRowColumnCounts};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:b.L_DataReadError,message:b.L_SelectionNotSupportCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:b.L_DataReadError,message:b.L_InvalidGetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:b.L_DataReadError,message:b.L_NonUniformPartialGetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:b.L_DataReadError,message:b.L_GetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:b.L_DataReadError,message:b.L_FileTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:b.L_DataReadError,message:b.L_GetDataParametersConflict};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:b.L_DataReadError,message:b.L_InvalidGetColumns};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:b.L_DataReadError,message:b.L_InvalidGetRows};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:b.L_DataReadError,message:b.L_InvalidReadForBlankRow};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:b.L_DataWriteError,message:b.L_UnsupportedDataObject};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:b.L_DataWriteError,message:b.L_CannotWriteToSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:b.L_DataWriteError,message:b.L_DataNotMatchSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:b.L_DataWriteError,message:b.L_OverwriteWorksheetData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:b.L_DataWriteError,message:b.L_DataNotMatchBindingSize};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:b.L_DataWriteError,message:b.L_InvalidSetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:b.L_InvalidFormat,message:b.L_InvalidDataFormat};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:b.L_DataWriteError,message:b.L_SetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:b.L_DataWriteError,message:b.L_NonUniformPartialSetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:b.L_DataWriteError,message:b.L_InvalidSetColumns};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:b.L_DataWriteError,message:b.L_InvalidSetRows};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:b.L_DataWriteError,message:b.L_SetDataParametersConflict};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:b.L_BindingCreationError,message:b.L_SelectionCannotBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:b.L_InvalidBindingError,message:b.L_BindingNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:b.L_BindingCreationError,message:b.L_BindingToMultipleSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidSelectionForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnThisBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:b.L_BindingCreationError,message:b.L_NamedItemNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:b.L_BindingCreationError,message:b.L_MultipleNamedItemFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidNamedItemForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:b.L_InvalidBinding,message:b.L_UnknownBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnMatrixData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:b.L_InvalidBinding,message:b.L_InvalidColumnsForBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:b.L_ReadSettingsError,message:b.L_SettingNameNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:b.L_SaveSettingsError,message:b.L_SettingsCannotSave};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:b.L_SettingsStaleError,message:b.L_SettingsAreStale};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:b.L_HostError,message:b.L_OperationNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:b.L_InternalError,message:b.L_InternalErrorDescription};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:b.L_PermissionDenied,message:b.L_DocumentReadOnly};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:b.L_EventRegistrationError,message:b.L_EventHandlerNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:b.L_InvalidAPICall,message:b.L_InvalidApiCallInContext};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:b.L_ShuttingDown,message:b.L_ShuttingDown};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:b.L_UnsupportedEnumeration,message:b.L_UnsupportedEnumerationMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:b.L_APINotSupported,message:b.L_BrowserAPINotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:b.L_APICallFailed,message:b.L_RequestTimeout};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:b.L_APICallFailed,message:b.L_TooManyIncompleteRequests};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:b.L_APICallFailed,message:b.L_RequestTokenUnavailable};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:b.L_APICallFailed,message:b.L_ActivityLimitReached};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:b.L_InvalidNode,message:b.L_CustomXmlNodeNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:b.L_CustomXmlError,message:b.L_CustomXmlError};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:b.L_CustomXmlExceedQuotaName,message:b.L_CustomXmlExceedQuotaMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:b.L_CustomXmlOutOfDateName,message:b.L_CustomXmlOutOfDateMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:b.L_CannotNavigateTo,message:b.L_CannotNavigateTo};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:b.L_SpecifiedIdNotExist,message:b.L_SpecifiedIdNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:b.L_NavOutOfBound,message:b.L_NavOutOfBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:b.L_DataWriteReminder,message:b.L_CellDataAmountBeyondLimits};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:b.L_MissingParameter,message:b.L_ElementMissing};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:b.L_InvalidValue,message:b.L_InvalidCellsValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:b.L_InvalidValue,message:b.L_InvalidTableOptionValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:b.L_InvalidValue,message:b.L_InvalidFormatValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_RowIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_ColIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:b.L_OutOfRange,message:b.L_FormatValueOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:b.L_FormattingReminder,message:b.L_CellFormatAmountBeyondLimits};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:b.L_MemoryLimit,message:b.L_CloseFileBeforeRetrieve};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:b.L_NetworkProblem,message:b.L_NetworkProblemRetrieveFile};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:b.L_InvalidValue,message:b.L_SliceSizeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:b.L_DisplayDialogError,message:b.L_DialogAlreadyOpened};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:b.L_DisplayDialogError,message:b.L_NetworkProblem};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:b.L_DialogNavigateError,message:b.L_DialogInvalidScheme};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:b.L_DisplayDialogError,message:b.L_DialogAddressNotTrusted};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:b.L_DisplayDialogError,message:b.L_DialogRequireHTTPS};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:b.L_DisplayDialogError,message:b.L_UserClickIgnore};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:b.L_DisplayDialogError,message:b.L_NewWindowCrossZoneErrorString}}}}();var OfficeExt;(function(a){var b;(function(b){var a=1.1,d=function(){function a(b){var a=this;a.isSetSupported=function(b,a){if(b==undefined)return false;if(a==undefined)a=0;var e=this._setMap,d=e._sets;if(d.hasOwnProperty(b.toLowerCase())){var c=d[b.toLowerCase()];return c>0&&c>=a}else return false};a._setMap=b;a.isSetSupported=a.isSetSupported.bind(a)}return a}();b.RequirementMatrix=d;var c=function(){function a(a){this._addSetMap=function(a){for(var b in a)this._sets[b]=a[b]};this._sets=a}return a}();b.DefaultSetRequirement=c;var x=function(c){__extends(b,c);function b(){c.call(this,{dialogapi:a})}return b}(c);b.DefaultDialogSetRequirement=x;var f=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,excelapi:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a})}return b}(c);b.ExcelClientDefaultSetRequirement=f;var k=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({imagecoercion:a})}return b}(f);b.ExcelClientV1DefaultSetRequirement=k;var l=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.3})}return a}(c);b.OutlookClientDefaultSetRequirement=l;var h=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,compressedfile:a,customxmlparts:a,documentevents:a,file:a,htmlcoercion:a,matrixbindings:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,textfile:a,wordapi:a})}return b}(c);b.WordClientDefaultSetRequirement=h;var p=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:a})}return b}(h);b.WordClientV1DefaultSetRequirement=p;var e=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,compressedfile:a,documentevents:a,file:a,pdffile:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.PowerpointClientDefaultSetRequirement=e;var j=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({imagecoercion:a})}return b}(e);b.PowerpointClientV1DefaultSetRequirement=j;var o=function(c){__extends(b,c);function b(){c.call(this,{selection:a,textcoercion:a})}return b}(c);b.ProjectClientDefaultSetRequirement=o;var u=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,file:a})}return b}(c);b.ExcelWebDefaultSetRequirement=u;var w=function(c){__extends(b,c);function b(){c.call(this,{compressedfile:a,documentevents:a,file:a,imagecoercion:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablecoercion:a,textcoercion:a,textfile:a})}return b}(c);b.WordWebDefaultSetRequirement=w;var n=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,settings:a})}return b}(c);b.PowerpointWebDefaultSetRequirement=n;var g=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.3})}return a}(c);b.OutlookWebDefaultSetRequirement=g;var v=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,documentevents:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.SwayWebDefaultSetRequirement=v;var r=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,partialtablebindings:a,settings:a,tablebindings:a,tablecoercion:a})}return b}(c);b.AccessWebDefaultSetRequirement=r;var t=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a})}return b}(c);b.ExcelIOSDefaultSetRequirement=t;var i=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,compressedfile:a,customxmlparts:a,documentevents:a,file:a,htmlcoercion:a,matrixbindings:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,textfile:a})}return b}(c);b.WordIOSDefaultSetRequirement=i;var s=function(b){__extends(a,b);function a(){b.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return a}(i);b.WordIOSV1DefaultSetRequirement=s;var m=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,compressedfile:a,documentevents:a,file:a,pdffile:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.PowerpointIOSDefaultSetRequirement=m;var q=function(c){__extends(b,c);function b(){c.call(this,{mailbox:a})}return b}(c);b.OutlookIOSDefaultSetRequirement=q;var y=function(){var b="undefined";function a(){}a.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)};a.getDefaultRequirementMatrix=function(f){this.initializeDefaultSetMatrix();var e=undefined,g=f.get_requirementMatrix();if(g!=undefined&&g.length>0&&typeof JSON!==b){var i=JSON.parse(f.get_requirementMatrix().toLowerCase());e=new d(new c(i))}else{var h=a.getClientFullVersionString(f);if(a.DefaultSetArrayMatrix!=undefined&&a.DefaultSetArrayMatrix[h]!=undefined)e=new d(a.DefaultSetArrayMatrix[h]);else e=new d(new c({}))}return e};a.getDefaultDialogRequirementMatrix=function(f){var a=undefined,e=f.get_dialogRequirementMatrix();if(e!=undefined&&e.length>0&&typeof JSON!==b){var g=JSON.parse(f.get_requirementMatrix().toLowerCase());a=new d(new c(g))}else a=new d(new x);return a};a.getClientFullVersionString=function(a){var d=a.get_appMinorVersion(),e="",b="",c=a.get_appName(),f=c==1024||c==4096||c==8192||c==65536;if(f&&a.get_appVersion()==1)if(c==4096&&d>=15)b="16.00.01";else b="16.00";else if(a.get_appName()==64)b=a.get_appVersion();else{if(d<10)e="0"+d;else e=""+d;b=a.get_appVersion()+"."+e}return a.get_appName()+"-"+b};a.initializeDefaultSetMatrix=function(){a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1600]=new f;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1600]=new h;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1600]=new e;a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1601]=new k;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1601]=new p;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1601]=new j;a.DefaultSetArrayMatrix[a.Outlook_RCLIENT_1600]=new l;a.DefaultSetArrayMatrix[a.Excel_WAC_1600]=new u;a.DefaultSetArrayMatrix[a.Word_WAC_1600]=new w;a.DefaultSetArrayMatrix[a.Outlook_WAC_1600]=new g;a.DefaultSetArrayMatrix[a.Outlook_WAC_1601]=new g;a.DefaultSetArrayMatrix[a.Project_RCLIENT_1600]=new o;a.DefaultSetArrayMatrix[a.Access_WAC_1600]=new r;a.DefaultSetArrayMatrix[a.PowerPoint_WAC_1600]=new n;a.DefaultSetArrayMatrix[a.Excel_IOS_1600]=new t;a.DefaultSetArrayMatrix[a.SWAY_WAC_1600]=new v;a.DefaultSetArrayMatrix[a.Word_IOS_1600]=new i;a.DefaultSetArrayMatrix[a.Word_IOS_16001]=new s;a.DefaultSetArrayMatrix[a.PowerPoint_IOS_1600]=new m;a.DefaultSetArrayMatrix[a.Outlook_IOS_1600]=new q};a.Excel_RCLIENT_1600="1-16.00";a.Excel_RCLIENT_1601="1-16.01";a.Word_RCLIENT_1600="2-16.00";a.Word_RCLIENT_1601="2-16.01";a.PowerPoint_RCLIENT_1600="4-16.00";a.PowerPoint_RCLIENT_1601="4-16.01";a.Outlook_RCLIENT_1600="8-16.00";a.Excel_WAC_1600="16-16.00";a.Word_WAC_1600="32-16.00";a.Outlook_WAC_1600="64-16.00";a.Outlook_WAC_1601="64-16.01";a.Project_RCLIENT_1600="128-16.00";a.Access_WAC_1600="256-16.00";a.PowerPoint_WAC_1600="512-16.00";a.Excel_IOS_1600="1024-16.00";a.SWAY_WAC_1600="2048-16.00";a.Word_IOS_1600="4096-16.00";a.Word_IOS_16001="4096-16.00.01";a.PowerPoint_IOS_1600="8192-16.00";a.Outlook_IOS_1600="65536-16.00";a.DefaultSetArrayMatrix={};return a}();b.RequirementsMatrixFactory=y})(b=a.Requirement||(a.Requirement={}))})(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda();var OfficeExt;(function(a){var b;(function(a){var b=function(){function a(){var a=this;a.getDiagnostics=function(b){var a={host:this.getHost(),version:b||this.getDefaultVersion(),platform:this.getPlatform()};return a};a.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};a.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};a.hostInfo=OSF._OfficeAppFactory.getHostInfo();a.getHost=a.getHost.bind(a);a.getPlatform=a.getPlatform.bind(a);a.getDiagnostics=a.getDiagnostics.bind(a)}a.prototype.capitalizeFirstLetter=function(a){if(a)return a[0].toUpperCase()+a.slice(1).toLowerCase();return a};a.getInstance=function(){if(a.hostObj===undefined)a.hostObj=new a;return a.hostObj};a.prototype.getPlatform=function(){var a=this;if(a.hostInfo.hostPlatform){var b=a.hostInfo.hostPlatform.toLowerCase();if(a.platformRemappings[b])return a.platformRemappings[b]}return null};a.prototype.getHost=function(){var a=this;if(a.hostInfo.hostType){var b=a.hostInfo.hostType.toLowerCase();if(a.camelCaseMappings[b])return a.camelCaseMappings[b];b=a.capitalizeFirstLetter(a.hostInfo.hostType);if(Microsoft.Office.WebExtension.HostType[b])return Microsoft.Office.WebExtension.HostType[b]}return null};a.prototype.getDefaultVersion=function(){if(this.getHost())return "16.0.0000.0000";return null};return a}();a.Host=b})(b=a.HostName||(a.HostName={}))})(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var b,a=false;return {enableShortcut:function(){if(!a){if(window.Office)b=window.Office;else OSF.OUtil.setNamespace("Office",window);window.Office=Microsoft.Office.WebExtension;a=true}},disableShortcut:function(){if(a){if(b)window.Office=b;else OSF.OUtil.unsetNamespace("Office",window);a=false}}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(a){if(a)OSF.NamespaceManager.enableShortcut();else OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(a,b){var c;if(a&&typeof a=="string"){var d=a.indexOf("#");if(d!=-1){var h=a.substring(0,d),g=a.substring(d+1);switch(h){case "binding":case "bindings":if(g)c=new OSF.DDA.BindingPromise(g)}}}if(!c){if(b){var e=typeof b;if(e=="function"){var f={};f[Microsoft.Office.WebExtension.Parameters.Callback]=b;OSF.DDA.issueAsyncResult(f,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,e)}}else{c.onFail=b;return c}};OSF.DDA.Context=function(a,g,h,c,d){var f="requirements",b=this;OSF.OUtil.defineEnumerableProperties(b,{contentLanguage:{value:a.get_dataLocale()},displayLanguage:{value:a.get_appUILocale()},touchEnabled:{value:a.get_touchEnabled()},commerceAllowed:{value:a.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(a.get_hostFullVersion())}});h&&OSF.OUtil.defineEnumerableProperty(b,"license",{value:h});a.ui&&OSF.OUtil.defineEnumerableProperty(b,"ui",{value:a.ui});if(a.get_isDialog()){var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,f,{value:e})}else{g&&OSF.OUtil.defineEnumerableProperty(b,"document",{value:g});if(c){var i=c.displayName||"appOM";delete c.displayName;OSF.OUtil.defineEnumerableProperty(b,i,{value:c})}d&&OSF.OUtil.defineEnumerableProperty(b,"officeTheme",{"get":function(){return d()}});var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,f,{value:e})}};OSF.DDA.OutlookContext=function(c,a,d,e,b){OSF.DDA.OutlookContext.uber.constructor.call(this,c,null,d,e,b);a&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:a})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(b,c){var a;switch(b.get_clientMode()){case OSF.ClientMode.ReadOnly:a=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:a=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}c&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:c});OSF.OUtil.defineMutableProperties(this,{mode:{value:a},url:{value:b.get_docUrl()}})};OSF.DDA.JsomDocument=function(d,b,e){var a=this;OSF.DDA.JsomDocument.uber.constructor.call(a,d,e);b&&OSF.OUtil.defineEnumerableProperty(a,"bindings",{"get":function(){return b}});var c=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(a,[c.GetSelectedDataAsync,c.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(a,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{"get":function(){var a;if(OSF&&OSF._OfficeAppFactory)a=OSF._OfficeAppFactory.getContext();return a}});OSF.DDA.License=function(a){OSF.OUtil.defineEnumerableProperty(this,"value",{value:a})};OSF.DDA.ApiMethodCall=function(c,f,e,g,h){var a=this,d=c.length,b=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,h)});a.verifyArguments=function(d,f){for(var e in d){var a=d[e],c=f[e];if(a["enum"])switch(typeof c){case "string":if(OSF.OUtil.listContainsValue(a["enum"],c))break;case "undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw b()}if(a["types"])if(!OSF.OUtil.listContainsValue(a["types"],typeof c))throw b()}};a.extractRequiredArguments=function(g,l,j){if(g.lengthc+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var d,f,i=h.length-1;i>=c;i--){var g=h[i];switch(typeof g){case "object":if(d)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else d=g;break;case a:if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else f=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}d=b.fillOptions(d,j,l,k);if(f)if(d[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else d[Microsoft.Office.WebExtension.Parameters.Callback]=f;b.verifyArguments(e,d);return d}this.verifyAndExtractCall=function(e,c,a){var d=b.extractRequiredArguments(e,c,a),g=h(e,d,c,a),f=b.constructCallArgs(d,g,c,a);return f};this.processResponse=function(c,b,e,d){var a;if(c==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)if(f)a=f(b,e,d);else a=b;else if(g)a=g(c,b);else a=OSF.DDA.ErrorCodeManager.getErrorArgs(c);return a};this.getCallArgs=function(g){for(var b,d,f=g.length-1;f>=c;f--){var e=g[f];switch(typeof e){case "object":b=e;break;case a:d=e}}b=b||{};if(d)b[Microsoft.Office.WebExtension.Parameters.Callback]=d;return b}};OSF.DDA.AsyncMethodCallFactory=function(){return {manufacture:function(a){var c=a.supportedOptions?OSF.OUtil.createObject(a.supportedOptions):[],b=a.privateStateCallbacks?OSF.OUtil.createObject(a.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(a.requiredArguments||[],c,b,a.onSucceeded,a.onFailed,a.checkCallArgs,a.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(a){OSF.DDA.AsyncMethodCalls[a.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(a)};OSF.DDA.Error=function(c,a,b){OSF.OUtil.defineEnumerableProperties(this,{name:{value:c},message:{value:a},code:{value:b}})};OSF.DDA.AsyncResult=function(b,a){OSF.OUtil.defineEnumerableProperties(this,{value:{value:b[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:a?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});b[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:b[OSF.DDA.AsyncResultEnum.Properties.Context]});a&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(a[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(d,f,a){var e=d[Microsoft.Office.WebExtension.Parameters.Callback];if(e){var c={};c[OSF.DDA.AsyncResultEnum.Properties.Context]=d[Microsoft.Office.WebExtension.Parameters.AsyncContext];var b;if(f==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)c[OSF.DDA.AsyncResultEnum.Properties.Value]=a;else{b={};a=a||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);b[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=f||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=a.name||a;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=a.message||a}e(new OSF.DDA.AsyncResult(c,b))}};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(b){for(var a in b){var c={};OSF.OUtil.defineEnumerableProperties(c,{id:{value:a},displayName:{value:b[a]}});OSF.DDA.SyncMethodNames[a]=c}};OSF.DDA.SyncMethodCall=function(b,c,f,g,h){var d=b.length,a=new OSF.DDA.ApiMethodCall(b,c,f,g,h);function e(e,h,j,i){if(e.length>d+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var b,k,f=e.length-1;f>=d;f--){var g=e[f];switch(typeof g){case "object":if(b)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else b=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}b=a.fillOptions(b,h,j,i);a.verifyArguments(c,b);return b}this.verifyAndExtractCall=function(f,c,b){var d=a.extractRequiredArguments(f,c,b),h=e(f,d,c,b),g=a.constructCallArgs(d,h,c,b);return g}};OSF.DDA.SyncMethodCallFactory=function(){return {manufacture:function(a){var b=a.supportedOptions?OSF.OUtil.createObject(a.supportedOptions):[];return new OSF.DDA.SyncMethodCall(a.requiredArguments||[],b,a.privateStateCallbacks,a.checkCallArgs,a.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(a){OSF.DDA.SyncMethodCalls[a.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(a)};OSF.DDA.ListType=function(){var a={};return {setListType:function(c,b){a[c]=b},isListType:function(b){return OSF.OUtil.listContainsKey(a,b)},getDescriptor:function(b){return a[b]}}}();OSF.DDA.HostParameterMap=function(b,c){var j="fromHost",a=this,i="toHost",e=j,l="sourceData",g="self",d={};d[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(a){if(a!=null&&a.rows!==undefined){var b={};b[OSF.DDA.TableDataProperties.TableRows]=a.rows;b[OSF.DDA.TableDataProperties.TableHeaders]=a.headers;a=b}return a},fromHost:function(a){return a}};d[Microsoft.Office.WebExtension.Parameters.SampleData]=d[Microsoft.Office.WebExtension.Parameters.Data];function f(j,i){var m=j?{}:undefined;for(var h in j){var g=j[h],a;if(OSF.DDA.ListType.isListType(h)){a=[];for(var n in g)a.push(f(g[n],i))}else if(OSF.OUtil.listContainsKey(d,h))a=d[h][i](g);else if(i==e&&b.preserveNesting(h))a=f(g,i);else{var k=c[h];if(k){var l=k[i];if(l){a=l[g];if(a===undefined)a=g}}else a=g}m[h]=a}return m}function k(j,h){var e;for(var a in h){var d;if(b.isComplexType(a))d=k(j,c[a][i]);else d=j[a];if(d!=undefined){if(!e)e={};var f=h[a];if(f==g)f=a;e[f]=b.pack(a,d)}}return e}function h(j,n,f){if(!f)f={};for(var a in n){var k=n[a],d;if(k==g)d=j;else if(k==l){f[a]=j.toArray();continue}else d=j[k];if(d===null||d===undefined)f[a]=undefined;else{d=b.unpack(a,d);var i;if(b.isComplexType(a)){i=c[a][e];if(b.preserveNesting(a))f[a]=h(d,i);else h(d,i,f)}else if(OSF.DDA.ListType.isListType(a)){i={};var p=OSF.DDA.ListType.getDescriptor(a);i[p]=g;var m=new Array(d.length);for(var o in d)m[o]=h(d[o],i);f[a]=m}else f[a]=d}}return f}function m(l,e,a){var d=c[l][a],b;if(a=="toHost"){var i=f(e,a);b=k(i,d)}else if(a==j){var g=h(e,d);b=f(g,a)}return b}if(!c)c={};a.addMapping=function(l,h){var a,d;if(h.map){a=h.map;d={};for(var j in a){var k=a[j];if(k==g)k=j;d[k]=j}}else{a=h.toHost;d=h.fromHost}var b=c[l];if(b){var f=b[i];for(var n in f)a[n]=f[n];f=b[e];for(var m in f)d[m]=f[m]}else b=c[l]={};b[i]=a;b[e]=d};a.toHost=function(b,a){return m(b,a,i)};a.fromHost=function(a,b){return m(a,b,e)};a.self=g;a.sourceData=l;a.addComplexType=function(a){b.addComplexType(a)};a.getDynamicType=function(a){return b.getDynamicType(a)};a.setDynamicType=function(c,a){b.setDynamicType(c,a)};a.dynamicTypes=d;a.doMapValues=function(a,b){return f(a,b)}};OSF.DDA.SpecialProcessor=function(c,b){var a=this;a.addComplexType=function(a){c.push(a)};a.getDynamicType=function(a){return b[a]};a.setDynamicType=function(c,a){b[c]=a};a.isComplexType=function(a){return OSF.OUtil.listContainsValue(c,a)};a.isDynamicType=function(a){return OSF.OUtil.listContainsKey(b,a)};a.preserveNesting=function(b){var a=[];OSF.DDA.PropertyDescriptors&&a.push(OSF.DDA.PropertyDescriptors.Subset);if(OSF.DDA.DataNodeEventProperties)a=a.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]);return OSF.OUtil.listContainsValue(a,b)};a.pack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].toHost(d);else a=d;return a};a.unpack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].fromHost(d);else a=d;return a}};OSF.DDA.getDecoratedParameterMap=function(d,c){var a=new OSF.DDA.HostParameterMap(d),f=a.self;function b(a){var c=null;if(a){c={};for(var d=a.length,b=0;b0){for(var d=[],c=0;c=f)break;c=Function._validateParameter(i[d],h,j);if(c){c.popStackFrame();return c}}return a};if(!Function._validateParameterCount)Function._validateParameterCount=function(m,f,l){var b,e,c=f.length,g=m.length;if(gc){e=d;for(b=0;b0&&b.push(c)}}}catch(i){}return b}var c=[],b={};b[Microsoft.Office.WebExtension.Parameters.Data]=function(){var c=0,b=1;return {toHost:function(a){if(OSF.DDA.TableDataProperties&&typeof a!="string"&&a[OSF.DDA.TableDataProperties.TableRows]!==undefined){var d=[];d[c]=a[OSF.DDA.TableDataProperties.TableRows];d[b]=a[OSF.DDA.TableDataProperties.TableHeaders];a=d}return a},fromHost:function(f){var e;if(f.toArray){var g=f.dimensions();if(g===2)e=a(f);else{var d=f.toArray();if(d.length===2&&(d[0]!=null&&d[0].toArray||d[1]!=null&&d[1].toArray)){e={};e[OSF.DDA.TableDataProperties.TableRows]=a(d[c]);e[OSF.DDA.TableDataProperties.TableHeaders]=a(d[b])}else e=d}}else e=f;return e}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,c,b);this.unpack=function(c,a){var d;if(this.isComplexType(c)||OSF.DDA.ListType.isListType(c)){var e=(a||typeof a==="unknown")&&a.toArray;d=e?a.toArray():a||{}}else if(this.isDynamicType(c))d=b[c].fromHost(a);else d=a;return d}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(a){function c(a){var b=a;if(OSF.OUtil.isArray(a))for(var f=b.length,d=0;d2){c=[];for(var g=1;g40){a=OSF.OUtil.Guid.generateNewGuid();b.setValue(b.clientIDKey,a)}return a};a.prototype.saveLog=function(d,e){var b=this,a=b.getValue(b.logIdSetKey);a=(a&&a.length>0?a+";":c)+d;b.setValue(b.logIdSetKey,a);b.setValue(d,e)};a.prototype.enumerateLog=function(c,e){var a=this,d=a.getValue(a.logIdSetKey);if(d){var f=d.split(";");for(var h in f){var b=f[h],g=a.getValue(b);if(g){c&&c(b,g);e&&a.remove(b)}}e&&a.remove(a.logIdSetKey)}};a.prototype.getValue=function(d){var a=OSF.OUtil.getLocalStorage(),b=c;if(a)b=a.getItem(d);return b};a.prototype.setValue=function(c,b){var a=OSF.OUtil.getLocalStorage();a&&a.setItem(c,b)};a.prototype.remove=function(b){var a=OSF.OUtil.getLocalStorage();if(a)try{a.removeItem(b)}catch(c){}};return a}(),h=function(){function a(){}a.prototype.LogData=function(a){if(!OSF.Logger)return;OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,a.SerializeRow(),OSF.Logger.SendFlag.none);OSFAriaLogger.AriaLogger.getInstance().logData(a)};a.prototype.LogRawData=function(a){if(!OSF.Logger)return;OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,a,OSF.Logger.SendFlag.none);try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(a))}catch(b){}};return a}();function e(a){if(a)a=a.replace(/[{}]/g,c).toLowerCase();return a||c}function w(f){if(!OSF.Logger)return;if(a)return;a=new y;if(f.get_hostFullVersion())a.hostVersion=f.get_hostFullVersion();else a.hostVersion=f.get_appVersion();a.appId=f.get_id();a.host=f.get_appName();a.browser=window.navigator.userAgent;a.correlationId=e(f.get_correlationId());a.clientId=(new k).getClientId();a.appInstanceId=f.get_appInstanceId();if(a.appInstanceId)a.appInstanceId=a.appInstanceId.replace(/[{}]/g,c).toLowerCase();a.message=f.get_hostCustomMessage();a.officeJSVersion=OSF.ConstantNames.FileVersion;a.hostJSVersion="16.0.7819.1000";if(f._wacHostEnvironment)a.wacHostEnvironment=f._wacHostEnvironment;if(f._isFromWacAutomation!==undefined&&f._isFromWacAutomation!==b)a.isFromWacAutomation=f._isFromWacAutomation.toString().toLowerCase();var i=f.get_docUrl();a.docUrl=o.test(i)?i:c;var h=location.href;if(h)h=h.split("?")[0].split("#")[0];a.appURL=h;(function(i,a){var e,h,d;a.assetId=c;a.userId=c;try{e=decodeURIComponent(i);h=new DOMParser;d=h.parseFromString(e,"text/xml");var f=d.getElementsByTagName("t")[0].attributes.getNamedItem("cid"),g=d.getElementsByTagName("t")[0].attributes.getNamedItem("oid");if(f&&f.nodeValue)a.userId=f.nodeValue;else if(g&&g.nodeValue)a.userId=g.nodeValue;a.assetId=d.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(j){}finally{e=b;d=b;h=b}})(f.get_eToken(),a);(function(){var k=new Date,c=b,h=0,j=false,e=function(){if(document.hasFocus()){if(c==b)c=new Date}else if(c){h+=Math.abs((new Date).getTime()-c.getTime());c=b}},a=[];a.push(new g("focus",e));a.push(new g("blur",e));a.push(new g("focusout",e));a.push(new g("focusin",e));var i=function(){for(var e=0;e0)for(var d in a)if(a[d]===c)return true;return false},addEventHandler:function(b,a){if(typeof a!="function")return false;var c=this._eventHandlers[b];if(c&&!this.hasEventHandler(b,a)){c.push(a);return true}else return false},addEventHandlerAndFireQueuedEvent:function(a,e){var d=this._eventHandlers[a],c=d.length==0,b=this.addEventHandler(a,e);c&&b&&this.fireQueuedEvent(a);return b},removeEventHandler:function(c,d){var a=this._eventHandlers[c];if(a&&a.length>0)for(var b=0;b0){this._eventHandlers[a]=[];return true}return false},getEventHandlerCount:function(a){return this._eventHandlers[a]!=undefined?this._eventHandlers[a].length:-1},fireEvent:function(a){if(a.type==undefined)return false;var b=a.type;if(b&&this._eventHandlers[b]){var c=this._eventHandlers[b];for(var d in c)c[d](a);return true}else return false},fireOrQueueEvent:function(c){var b=this,a=c.type;if(a&&b._eventHandlers[a]){var d=b._eventHandlers[a],e=b._queuedEventsArgs[a];if(d.length==0)e.push(c);else b.fireEvent(c);return true}else return false},fireQueuedEvent:function(a){if(a&&this._eventHandlers[a]){var b=this._eventHandlers[a],c=this._queuedEventsArgs[a];if(b.length>0){var d=b[0];while(c.length>0){var e=c.shift();d(e)}return true}}return false},clearQueuedEvent:function(a){if(a&&this._eventHandlers[a]){var b=this._queuedEventsArgs[a];if(b)this._queuedEventsArgs[a]=[]}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(e,c,b){var f="hostType",d=this,a;switch(e){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:a=new OSF.DDA.DocumentSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:a=new OSF.DDA.BindingSelectionChangedEventArgs(d.manufactureBinding(b,c.document),b[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:a=new OSF.DDA.BindingDataChangedEventArgs(d.manufactureBinding(b,c.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:a=new OSF.DDA.SettingsChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:a=new OSF.DDA.ActiveViewChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:a=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:a=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:a=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(b);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:a=new OSF.DDA.NodeInsertedEventArgs(d.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NewNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:a=new OSF.DDA.NodeReplacedEventArgs(d.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.OldNode]),d.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NewNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:a=new OSF.DDA.NodeDeletedEventArgs(d.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.OldNode]),d.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:a=new OSF.DDA.TaskSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:a=new OSF.DDA.ResourceSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:a=new OSF.DDA.ViewSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:a=new OSF.DDA.DialogEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:a=new OSF.DDA.DialogParentEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]=="outlook"||OSF._OfficeAppFactory.getHostInfo()[f]=="outlookwebapp"){a=new OSF.DDA.OlkItemSelectedChangedEventArgs(b);c.initialize(a["initialData"]);c.setCurrentItemNumber(a["itemNumber"].itemNumber)}else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e))}return a};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});Microsoft.Office.WebExtension.TableData=function(b,a){function c(a){if(a==null||a==undefined)return null;try{for(var b=OSF.DDA.DataCoercion.findArrayDimensionality(a,2);b<2;b++)a=[a];return a}catch(c){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{"get":function(){return a},"set":function(b){a=c(b)}},rows:{"get":function(){return b},"set":function(a){b=a==null||OSF.OUtil.isArray(a)&&a.length==0?[]:c(a)}}});this.headers=a;this.rows=b};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(a){return new Microsoft.Office.WebExtension.TableData(a[OSF.DDA.TableDataProperties.TableRows],a[OSF.DDA.TableDataProperties.TableHeaders])};Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var a=null;return {findArrayDimensionality:function(c){if(OSF.OUtil.isArray(c)){for(var b=0,a=0;a100)a[Microsoft.Office.WebExtension.Parameters.Width]=99;if(a[Microsoft.Office.WebExtension.Parameters.Height]<=0)a[Microsoft.Office.WebExtension.Parameters.Height]=1;if(a[Microsoft.Office.WebExtension.Parameters.Height]>100)a[Microsoft.Office.WebExtension.Parameters.Height]=99;if(!a[Microsoft.Office.WebExtension.Parameters.RequireHTTPs])a[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=true;return a}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(a){try{a.onCalling&&a.onCalling();var c=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true,a);OSF.ClientHostController.openDialog(a.dispId,a.targetId,function(c,b){a.onEvent&&a.onEvent(b);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(a.dispId)},c)}catch(b){OSF.DDA.SafeArray.Delegate._onException(b,a)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(a){a.onCalling&&a.onCalling();var c=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false,a);try{OSF.ClientHostController.closeDialog(a.dispId,a.targetId,c)}catch(b){OSF.DDA.SafeArray.Delegate._onException(b,a)}};OSF.DDA.SafeArray.Delegate.messageParent=function(a){try{a.onCalling&&a.onCalling();var d=(new Date).getTime(),b=OSF.ClientHostController.messageParent(a.hostCallArgs);a.onReceiving&&a.onReceiving();OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(a.dispId,a.hostCallArgs,Math.abs((new Date).getTime()-d),b);return b}catch(c){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(c)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:true});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:true});OSF.DDA.SafeArray.Delegate.sendMessage=function(a){try{a.onCalling&&a.onCalling();var d=(new Date).getTime(),c=OSF.ClientHostController.sendMessage(a.hostCallArgs);a.onReceiving&&a.onReceiving();return c}catch(b){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(b)}};Microsoft.Office.WebExtension.ProjectViewTypes={Gantt:1,NetworkDiagram:2,TaskDiagram:3,TaskForm:4,TaskSheet:5,ResourceForm:6,ResourceSheet:7,ResourceGraph:8,TeamPlanner:9,TaskDetails:10,TaskNameForm:11,ResourceNames:12,Calendar:13,TaskUsage:14,ResourceUsage:15,Timeline:16,Drawing:18,ResourcePlan:19};OSF.OUtil.redefineList(Microsoft.Office.WebExtension.CoercionType,{Text:"text"});OSF.OUtil.redefineList(Microsoft.Office.WebExtension.ValueFormat,{Unformatted:"unformatted"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{TaskSelectionChanged:"taskSelectionChanged",ResourceSelectionChanged:"resourceSelectionChanged",ViewSelectionChanged:"viewSelectionChanged"});OSF.DDA.AsyncMethodNames.addNames({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync"});(function(){var c=false,b="boolean",a="number";function d(b,d,c){var a=b[Microsoft.Office.WebExtension.Parameters.Data];if(OSF.DDA.TableDataProperties&&a&&(a[OSF.DDA.TableDataProperties.TableRows]!=undefined||a[OSF.DDA.TableDataProperties.TableHeaders]!=undefined))a=OSF.DDA.OMFactory.manufactureTableData(a);a=OSF.DDA.DataCoercion.coerceData(a,c[Microsoft.Office.WebExtension.Parameters.CoercionType]);return a==undefined?null:a}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,"enum":Microsoft.Office.WebExtension.CoercionType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}}],privateStateCallbacks:[],onSucceeded:d});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object",a,b]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(a){return OSF.DDA.DataCoercion.determineCoercionType(a[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:[a,b],defaultValue:c}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:[a,b],defaultValue:c}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[a,b],defaultValue:c}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[a,b],defaultValue:c}}],privateStateCallbacks:[]})})();OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:1},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:2},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:3},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:4},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:5}]});OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",RefreshingSettings:"refreshingSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(b){var d={};for(var c in b){var a=b[c];try{if(JSON)a=JSON.stringify(a,function(a,b){return OSF.OUtil.isDate(this[a])?OSF.DDA.SettingsManager.DateJSONPrefix+this[a].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix:b});else a=Sys.Serialization.JavaScriptSerializer.serialize(a);d[c]=a}catch(e){}}return d},deserializeSettings:function(b){var d={};b=b||{};for(var c in b){var a=b[c];try{if(JSON)a=JSON.parse(a,function(c,a){var b;if(typeof a==="string"&&a&&a.length>6&&a.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&a.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix){b=new Date(parseInt(a.slice(5,-1)));if(b)return b}return a});else a=Sys.Serialization.JavaScriptSerializer.deserialize(a,true);d[c]=a}catch(e){}}return d}};OSF.DDA.Settings=function(a){var b="name";a=a||{};var c=function(d){var b=OSF.OUtil.getSessionStorage();if(b){var a=OSF.DDA.SettingsManager.serializeSettings(d),c=JSON?JSON.stringify(a):Sys.Serialization.JavaScriptSerializer.serialize(a);b.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),c)}};OSF.OUtil.defineEnumerableProperties(this,{"get":{value:function(e){var d=Function._validateParams(arguments,[{name:b,type:String,mayBeNull:false}]);if(d)throw d;var c=a[e];return typeof c==="undefined"?null:c}},"set":{value:function(f,e){var d=Function._validateParams(arguments,[{name:b,type:String,mayBeNull:false},{name:"value",mayBeNull:true}]);if(d)throw d;a[f]=e;c(a)}},remove:{value:function(e){var d=Function._validateParams(arguments,[{name:b,type:String,mayBeNull:false}]);if(d)throw d;delete a[e];c(a)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],a)};OSF.DDA.RefreshableSettings=function(a){OSF.DDA.RefreshableSettings.uber.constructor.call(this,a);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],a);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:a}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(b,a){return a}}],onSucceeded:function(d,a,e){var f=d[OSF.DDA.SettingsManager.SerializedSettings],c=OSF.DDA.SettingsManager.deserializeSettings(f),g=e[OSF.DDA.SettingsManager.RefreshingSettings];for(var b in g)a.remove(b);for(var b in c)a.set(b,c[b]);return a}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:true}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(b,a){return OSF.DDA.SettingsManager.serializeSettings(a)}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.CoercionType,toHost:[{name:Microsoft.Office.WebExtension.CoercionType.Text,value:0},{name:Microsoft.Office.WebExtension.CoercionType.Matrix,value:1},{name:Microsoft.Office.WebExtension.CoercionType.Table,value:2}]});Microsoft.Office.WebExtension.ProjectTaskFields={ActualCost:0,ActualDuration:1,ActualFinish:2,ActualOvertimeCost:3,ActualOvertimeWork:4,ActualStart:5,ActualWork:6,Text1:7,Text10:8,Finish10:9,Start10:10,Text11:11,Text12:12,Text13:13,Text14:14,Text15:15,Text16:16,Text17:17,Text18:18,Text19:19,Finish1:20,Start1:21,Text2:22,Text20:23,Text21:24,Text22:25,Text23:26,Text24:27,Text25:28,Text26:29,Text27:30,Text28:31,Text29:32,Finish2:33,Start2:34,Text3:35,Text30:36,Finish3:37,Start3:38,Text4:39,Finish4:40,Start4:41,Text5:42,Finish5:43,Start5:44,Text6:45,Finish6:46,Start6:47,Text7:48,Finish7:49,Start7:50,Text8:51,Finish8:52,Start8:53,Text9:54,Finish9:55,Start9:56,Baseline10BudgetCost:57,Baseline10BudgetWork:58,Baseline10Cost:59,Baseline10Duration:60,Baseline10Finish:61,Baseline10FixedCost:62,Baseline10FixedCostAccrual:63,Baseline10Start:64,Baseline10Work:65,Baseline1BudgetCost:66,Baseline1BudgetWork:67,Baseline1Cost:68,Baseline1Duration:69,Baseline1Finish:70,Baseline1FixedCost:71,Baseline1FixedCostAccrual:72,Baseline1Start:73,Baseline1Work:74,Baseline2BudgetCost:75,Baseline2BudgetWork:76,Baseline2Cost:77,Baseline2Duration:78,Baseline2Finish:79,Baseline2FixedCost:80,Baseline2FixedCostAccrual:81,Baseline2Start:82,Baseline2Work:83,Baseline3BudgetCost:84,Baseline3BudgetWork:85,Baseline3Cost:86,Baseline3Duration:87,Baseline3Finish:88,Baseline3FixedCost:89,Baseline3FixedCostAccrual:90,Basline3Start:91,Baseline3Work:92,Baseline4BudgetCost:93,Baseline4BudgetWork:94,Baseline4Cost:95,Baseline4Duration:96,Baseline4Finish:97,Baseline4FixedCost:98,Baseline4FixedCostAccrual:99,Baseline4Start:100,Baseline4Work:101,Baseline5BudgetCost:102,Baseline5BudgetWork:103,Baseline5Cost:104,Baseline5Duration:105,Baseline5Finish:106,Baseline5FixedCost:107,Baseline5FixedCostAccrual:108,Baseline5Start:109,Baseline5Work:110,Baseline6BudgetCost:111,Baseline6BudgetWork:112,Baseline6Cost:113,Baseline6Duration:114,Baseline6Finish:115,Baseline6FixedCost:116,Baseline6FixedCostAccrual:117,Baseline6Start:118,Baseline6Work:119,Baseline7BudgetCost:120,Baseline7BudgetWork:121,Baseline7Cost:122,Baseline7Duration:123,Baseline7Finish:124,Baseline7FixedCost:125,Baseline7FixedCostAccrual:126,Baseline7Start:127,Baseline7Work:128,Baseline8BudgetCost:129,Baseline8BudgetWork:130,Baseline8Cost:131,Baseline8Duration:132,Baseline8Finish:133,Baseline8FixedCost:134,Baseline8FixedCostAccrual:135,Baseline8Start:136,Baseline8Work:137,Baseline9BudgetCost:138,Baseline9BudgetWork:139,Baseline9Cost:140,Baseline9Duration:141,Baseline9Finish:142,Baseline9FixedCost:143,Baseline9FixedCostAccrual:144,Baseline9Start:145,Baseline9Work:146,BaselineBudgetCost:147,BaselineBudgetWork:148,BaselineCost:149,BaselineDuration:150,BaselineFinish:151,BaselineFixedCost:152,BaselineFixedCostAccrual:153,BaselineStart:154,BaselineWork:155,BudgetCost:156,BudgetWork:157,TaskCalendarGUID:158,ConstraintDate:159,ConstraintType:160,Cost1:161,Cost10:162,Cost2:163,Cost3:164,Cost4:165,Cost5:166,Cost6:167,Cost7:168,Cost8:169,Cost9:170,Date1:171,Date10:172,Date2:173,Date3:174,Date4:175,Date5:176,Date6:177,Date7:178,Date8:179,Date9:180,Deadline:181,Duration1:182,Duration10:183,Duration2:184,Duration3:185,Duration4:186,Duration5:187,Duration6:188,Duration7:189,Duration8:190,Duration9:191,Duration:192,EarnedValueMethod:193,FinishSlack:194,FixedCost:195,FixedCostAccrual:196,Flag10:197,Flag1:198,Flag11:199,Flag12:200,Flag13:201,Flag14:202,Flag15:203,Flag16:204,Flag17:205,Flag18:206,Flag19:207,Flag2:208,Flag20:209,Flag3:210,Flag4:211,Flag5:212,Flag6:213,Flag7:214,Flag8:215,Flag9:216,FreeSlack:217,HasRollupSubTasks:218,ID:219,Name:220,Notes:221,Number1:222,Number10:223,Number11:224,Number12:225,Number13:226,Number14:227,Number15:228,Number16:229,Number17:230,Number18:231,Number19:232,Number2:233,Number20:234,Number3:235,Number4:236,Number5:237,Number6:238,Number7:239,Number8:240,Number9:241,ScheduledDuration:242,ScheduledFinish:243,ScheduledStart:244,OutlineLevel:245,OvertimeCost:246,OvertimeWork:247,PercentComplete:248,PercentWorkComplete:249,Predecessors:250,PreleveledFinish:251,PreleveledStart:252,Priority:253,Active:254,Critical:255,Milestone:256,Overallocated:257,IsRollup:258,Summary:259,RegularWork:260,RemainingCost:261,RemainingDuration:262,RemainingOvertimeCost:263,RemainingWork:264,ResourceNames:265,ResourceNames_deprecated:266,Cost:267,Finish:268,Start:269,Work:270,StartSlack:271,Status:272,Successors:273,StatusManager:274,TotalSlack:275,TaskGUID:276,Type:277,WBS:278,WBSPREDECESSORS:279,WBSSUCCESSORS:280,WSSID:281,FreeformDuration:282,FreeformFinish:283,FreeformStart:284};Microsoft.Office.WebExtension.ProjectResourceFields={Accrual:0,ActualCost:1,ActualOvertimeCost:2,ActualOvertimeWork:3,ActualOvertimeWorkProtected:4,ActualWork:5,ActualWorkProtected:6,BaseCalendar:7,Baseline10BudgetCost:8,Baseline10BudgetWork:9,Baseline10Cost:10,Baseline10Work:11,Baseline1BudgetCost:12,Baseline1BudgetWork:13,Baseline1Cost:14,Baseline1Work:15,Baseline2BudgetCost:16,Baseline2BudgetWork:17,Baseline2Cost:18,Baseline2Work:19,Baseline3BudgetCost:20,Baseline3BudgetWork:21,Baseline3Cost:22,Baseline3Work:23,Baseline4BudgetCost:24,Baseline4BudgetWork:25,Baseline4Cost:26,Baseline4Work:27,Baseline5BudgetCost:28,Baseline5BudgetWork:29,Baseline5Cost:30,Baseline5Work:31,Baseline6BudgetCost:32,Baseline6BudgetWork:33,Baseline6Cost:34,Baseline6Work:35,Baseline7BudgetCost:36,Baseline7BudgetWork:37,Baseline7Cost:38,Baseline7Work:39,Baseline8BudgetCost:40,Baseline8BudgetWork:41,Baseline8Cost:42,Baseline8Work:43,Baseline9BudgetCost:44,Baseline9BudgetWork:45,Baseline9Cost:46,Baseline9Work:47,BaselineBudgetCost:48,BaselineBudgetWork:49,BaselineCost:50,BaselineWork:51,BudgetCost:52,BudgetWork:53,ResourceCalendarGUID:54,Code:55,Cost1:56,Cost10:57,Cost2:58,Cost3:59,Cost4:60,Cost5:61,Cost6:62,Cost7:63,Cost8:64,Cost9:65,ResourceCreationDate:66,Date1:67,Date10:68,Date2:69,Date3:70,Date4:71,Date5:72,Date6:73,Date7:74,Date8:75,Date9:76,Duration1:77,Duration10:78,Duration2:79,Duration3:80,Duration4:81,Duration5:82,Duration6:83,Duration7:84,Duration8:85,Duration9:86,Email:87,End:88,Finish1:89,Finish10:90,Finish2:91,Finish3:92,Finish4:93,Finish5:94,Finish6:95,Finish7:96,Finish8:97,Finish9:98,Flag10:99,Flag1:100,Flag11:101,Flag12:102,Flag13:103,Flag14:104,Flag15:105,Flag16:106,Flag17:107,Flag18:108,Flag19:109,Flag2:110,Flag20:111,Flag3:112,Flag4:113,Flag5:114,Flag6:115,Flag7:116,Flag8:117,Flag9:118,Group:119,Units:120,Name:121,Notes:122,Number1:123,Number10:124,Number11:125,Number12:126,Number13:127,Number14:128,Number15:129,Number16:130,Number17:131,Number18:132,Number19:133,Number2:134,Number20:135,Number3:136,Number4:137,Number5:138,Number6:139,Number7:140,Number8:141,Number9:142,OvertimeCost:143,OvertimeRate:144,OvertimeWork:145,PercentWorkComplete:146,CostPerUse:147,Generic:148,OverAllocated:149,RegularWork:150,RemainingCost:151,RemainingOvertimeCost:152,RemainingOvertimeWork:153,RemainingWork:154,ResourceGUID:155,Cost:156,Work:157,Start:158,Start1:159,Start10:160,Start2:161,Start3:162,Start4:163,Start5:164,Start6:165,Start7:166,Start8:167,Start9:168,StandardRate:169,Text1:170,Text10:171,Text11:172,Text12:173,Text13:174,Text14:175,Text15:176,Text16:177,Text17:178,Text18:179,Text19:180,Text2:181,Text20:182,Text21:183,Text22:184,Text23:185,Text24:186,Text25:187,Text26:188,Text27:189,Text28:190,Text29:191,Text3:192,Text30:193,Text4:194,Text5:195,Text6:196,Text7:197,Text8:198,Text9:199};Microsoft.Office.WebExtension.ProjectProjectFields={CurrencyDigits:0,CurrencySymbol:1,CurrencySymbolPosition:2,DurationUnits:3,GUID:4,Finish:5,Start:6,ReadOnly:7,VERSION:8,WorkUnits:9,ProjectServerUrl:10,WSSUrl:11,WSSList:12,Name:13,CurrentUser:14};OSF.DDA.ProjectDocument=function(b){OSF.DDA.ProjectDocument.uber.constructor.call(this,b);var a=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[a.GetSelectedDataAsync,a.GetSelectedTask,a.GetTask,a.GetTaskField,a.GetWSSUrl,a.GetSelectedResource,a.GetResourceField,a.GetProjectField,a.GetSelectedView,a.GetTaskByIndex,a.GetResourceByIndex,a.SetTaskField,a.SetResourceField,a.GetMaxTaskIndex,a.GetMaxResourceIndex,a.CreateTask]);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.TaskSelectionChanged,Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged,Microsoft.Office.WebExtension.EventType.ViewSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.ProjectDocument,OSF.DDA.Document);OSF.DDA.TaskSelectionChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.TaskSelectionChanged},document:{value:a}})};OSF.DDA.ResourceSelectionChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged},document:{value:a}})};OSF.DDA.ViewSelectionChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.ViewSelectionChanged},document:{value:a}})};OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(a,b){OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM);a.doc=new OSF.DDA.ProjectDocument(a,this._initializeSettings(false));b()};OSF.DDA.AsyncMethodNames.addNames({GetSelectedTask:"getSelectedTaskAsync",GetTask:"getTaskAsync",GetWSSUrl:"getWSSUrlAsync",GetTaskField:"getTaskFieldAsync",GetSelectedResource:"getSelectedResourceAsync",GetResourceField:"getResourceFieldAsync",GetProjectField:"getProjectFieldAsync",GetSelectedView:"getSelectedViewAsync",GetTaskByIndex:"getTaskByIndexAsync",GetResourceByIndex:"getResourceByIndexAsync",SetTaskField:"setTaskFieldAsync",SetResourceField:"setResourceFieldAsync",GetMaxTaskIndex:"getMaxTaskIndexAsync",GetMaxResourceIndex:"getMaxResourceIndexAsync",CreateTask:"createTaskAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedTask,onSucceeded:function(a){return a[Microsoft.Office.WebExtension.Parameters.TaskId]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetTaskByIndex,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TaskIndex,types:["number"]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(a){return a[Microsoft.Office.WebExtension.Parameters.TaskId]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetTask,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TaskId,types:["string"]}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetTaskField,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TaskId,types:["string"]},{name:Microsoft.Office.WebExtension.Parameters.FieldId,types:["number"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.GetRawValue,value:{types:["boolean"],defaultValue:false}},{name:Microsoft.Office.WebExtension.Parameters.CustomFieldId,value:{types:["string"],calculate:function(){return ""}}}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetResourceField,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ResourceId,types:["string"]},{name:Microsoft.Office.WebExtension.Parameters.FieldId,types:["number"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.GetRawValue,value:{types:["boolean"],defaultValue:false}},{name:Microsoft.Office.WebExtension.Parameters.CustomFieldId,value:{types:["string"],calculate:function(){return ""}}}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetProjectField,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FieldId,types:["number"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.GetRawValue,value:{types:["boolean"],defaultValue:false}}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedResource,onSucceeded:function(a){return a[Microsoft.Office.WebExtension.Parameters.ResourceId]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetResourceByIndex,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ResourceIndex,types:["number"]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(a){return a[Microsoft.Office.WebExtension.Parameters.ResourceId]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetWSSUrl});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedView});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetTaskField,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TaskId,types:["string"]},{name:Microsoft.Office.WebExtension.Parameters.FieldId,types:["number"]},{name:Microsoft.Office.WebExtension.Parameters.FieldValue,types:["object","string","number","boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CustomFieldId,value:{types:["string"],calculate:function(){return ""}}}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetResourceField,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ResourceId,types:["string"]},{name:Microsoft.Office.WebExtension.Parameters.FieldId,types:["number"]},{name:Microsoft.Office.WebExtension.Parameters.FieldValue,types:["object","string","number","boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CustomFieldId,value:{types:["string"],calculate:function(){return ""}}}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetMaxTaskIndex,onSucceeded:function(a){return a[Microsoft.Office.WebExtension.Parameters.TaskIndex]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetMaxResourceIndex,onSucceeded:function(a){return a[Microsoft.Office.WebExtension.Parameters.ResourceIndex]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CreateTask,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.TaskIndex,value:{types:["number"],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ItemName,value:{types:["string"],calculate:function(){return ""}}}],privateStateCallbacks:[],onSucceeded:function(a){return a[Microsoft.Office.WebExtension.Parameters.TaskId]}});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedTaskMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.TaskId,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetTaskByIndexMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.TaskId,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.TaskIndex,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetTaskMethod,fromHost:[{name:"taskName",value:0},{name:"wssTaskId",value:1},{name:"resourceNames",value:2}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.TaskId,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetTaskFieldMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.FieldValue,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.TaskId,value:0},{name:Microsoft.Office.WebExtension.Parameters.FieldId,value:1},{name:Microsoft.Office.WebExtension.Parameters.GetRawValue,value:2},{name:Microsoft.Office.WebExtension.Parameters.CustomFieldId,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetWSSUrlMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.ServerUrl,value:0},{name:Microsoft.Office.WebExtension.Parameters.ListName,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedResourceMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.ResourceId,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetResourceByIndexMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.ResourceId,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.ResourceIndex,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetResourceFieldMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.FieldValue,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.ResourceId,value:0},{name:Microsoft.Office.WebExtension.Parameters.FieldId,value:1},{name:Microsoft.Office.WebExtension.Parameters.GetRawValue,value:2},{name:Microsoft.Office.WebExtension.Parameters.CustomFieldId,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetProjectFieldMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.FieldValue,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.FieldId,value:0},{name:Microsoft.Office.WebExtension.Parameters.GetRawValue,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedViewMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.ViewType,value:0},{name:Microsoft.Office.WebExtension.Parameters.ViewName,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetTaskFieldMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.TaskId,value:0},{name:Microsoft.Office.WebExtension.Parameters.FieldId,value:1},{name:Microsoft.Office.WebExtension.Parameters.FieldValue,value:2},{name:Microsoft.Office.WebExtension.Parameters.CustomFieldId,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetResourceFieldMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.ResourceId,value:0},{name:Microsoft.Office.WebExtension.Parameters.FieldId,value:1},{name:Microsoft.Office.WebExtension.Parameters.FieldValue,value:2},{name:Microsoft.Office.WebExtension.Parameters.CustomFieldId,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetMaxTaskIndexMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.TaskIndex,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetMaxResourceIndexMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.ResourceIndex,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidCreateTaskMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.TaskId,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.TaskIndex,value:0},{name:Microsoft.Office.WebExtension.Parameters.ItemName,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidTaskSelectionChangedEvent});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidResourceSelectionChangedEvent});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidViewSelectionChangedEvent}) \ No newline at end of file +var __extends=this&&this.__extends||function(b,a){for(var c in a)if(a.hasOwnProperty(c))b[c]=a[c];function d(){this.constructor=b}b.prototype=a===null?Object.create(a):(d.prototype=a.prototype,new d)},OfficeExt;(function(b){var a=function(){var a=true;function b(){}b.prototype.isMsAjaxLoaded=function(){var b="function",c="undefined";if(typeof Sys!==c&&typeof Type!==c&&Sys.StringBuilder&&typeof Sys.StringBuilder===b&&Type.registerNamespace&&typeof Type.registerNamespace===b&&Type.registerClass&&typeof Type.registerClass===b&&typeof Function._validateParams===b&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===b)return a;else return false};b.prototype.loadMsAjaxFull=function(b){var a=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(a,b)};Object.defineProperty(b.prototype,"msAjaxError",{"get":function(){var a=this;if(a._msAjaxError==null&&a.isMsAjaxLoaded())a._msAjaxError=Error;return a._msAjaxError},"set":function(a){this._msAjaxError=a},enumerable:a,configurable:a});Object.defineProperty(b.prototype,"msAjaxString",{"get":function(){var a=this;if(a._msAjaxString==null&&a.isMsAjaxLoaded())a._msAjaxString=String;return a._msAjaxString},"set":function(a){this._msAjaxString=a},enumerable:a,configurable:a});Object.defineProperty(b.prototype,"msAjaxDebug",{"get":function(){var a=this;if(a._msAjaxDebug==null&&a.isMsAjaxLoaded())a._msAjaxDebug=Sys.Debug;return a._msAjaxDebug},"set":function(a){this._msAjaxDebug=a},enumerable:a,configurable:a});return b}();b.MicrosoftAjaxFactory=a})(OfficeExt||(OfficeExt={}));var OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory,OSF=OSF||{},OfficeExt;(function(b){var a=function(){function a(a){this._internalStorage=a}a.prototype.getItem=function(a){try{return this._internalStorage&&this._internalStorage.getItem(a)}catch(b){return null}};a.prototype.setItem=function(b,a){try{this._internalStorage&&this._internalStorage.setItem(b,a)}catch(c){}};a.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(a){}};a.prototype.removeItem=function(a){try{this._internalStorage&&this._internalStorage.removeItem(a)}catch(b){}};a.prototype.getKeysWithPrefix=function(d){var b=[];try{for(var e=this._internalStorage&&this._internalStorage.length||0,a=0;a0)b.push(a);else a.tabIndex===0&&c.push(a);else c.push(a)}b=b.sort(function(d,c){var a=d.tabIndex-c.tabIndex;if(a===0)a=b.indexOf(d)-b.indexOf(c);return a});return [].concat(b,c)}return {set_entropy:function(a){if(typeof a=="string")for(var b=0;b1?f[f.length-1]:a;if(k&&b!=a){if(b.indexOf(v)>=0)b=b.split(v)[0];b=decodeURIComponent(b)}var c=q();if(!i&&c){var e=window.name.indexOf(j);if(e>d){var g=window.name.indexOf(";",e);if(g==d)g=window.name.length;var h=window.name.substring(e,g);if(b)c.setItem(h,b);else b=c.getItem(h)}}return b},getConversationId:function(){var c=window.location.search,b=a;if(c){var d=c.indexOf("&");b=d>0?c.substring(1,d):c.substr(1);if(b&&b.charAt(b.length-1)==="="){b=b.substring(0,b.length-1);if(b)b=decodeURIComponent(b)}}return b},getInfoItems:function(b){var a=b.split("$");if(typeof a[1]==i)a=b.split("|");if(typeof a[1]==i)a=b.split("%7C");return a},getXdmFieldValue:function(f,d){var b=e,c=OSF.OUtil.parseXdmInfo(d);if(c){var a=OSF.OUtil.getInfoItems(c);if(a!=undefined&&a.length>=3)switch(f){case OSF.XdmFieldName.ConversationUrl:b=a[2];break;case OSF.XdmFieldName.AppId:b=a[1]}}return b},validateParamObject:function(f,e){var a=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:c},{name:"expectedProperties",type:Object,mayBeNull:c},{name:"callback",type:Function,mayBeNull:b}]);if(a)throw a;for(var d in e){a=Function._validateParameter(f[d],e[d],d);if(a)throw a}},writeProfilerMark:function(a){if(window.msWriteProfilerMark){window.msWriteProfilerMark(a);OsfMsAjaxFactory.msAjaxDebug.trace(a)}},outputDebug:function(a){typeof OsfMsAjaxFactory!==i&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(a)},defineNondefaultProperty:function(e,f,a,c){a=a||{};for(var g in c){var d=c[g];if(a[d]==undefined)a[d]=b}Object.defineProperty(e,f,a);return e},defineNondefaultProperties:function(c,a,d){a=a||{};for(var b in a)OSF.OUtil.defineNondefaultProperty(c,b,a[b],d);return c},defineEnumerableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[f])},defineEnumerableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[f])},defineMutableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[m,f,n])},defineMutableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[m,f,n])},finalizeProperties:function(e,d){d=d||{};for(var g=Object.getOwnPropertyNames(e),i=g.length,f=0;f>8;g=h&255;b[a++]=d>>2;b[a++]=(d&3)<<4|f>>4;b[a++]=(f&15)<<2|g>>6;b[a++]=g&63;if(!isNaN(h)){d=h>>8;f=j&255;g=j>>8;b[a++]=d>>2;b[a++]=(d&3)<<4|f>>4;b[a++]=(f&15)<<2|g>>6;b[a++]=g&63}if(isNaN(h))b[a-1]=64;else if(isNaN(j)){b[a-2]=64;b[a-1]=64}for(var l=0;l0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(b){if(b==a)return a;else if(!(b instanceof Object))return b;else if(Array.isArray(b)){for(var e=[],d=0;dc)return d;else if(a===0&&b)return d;else if(a===c-1&&!b)return d;if(b)return a-1;else return a+1};e=u(e);g=j?e.length-1:0;if(e.length===0)return a;while(!i&&g>=0&&gc)return d;else if(a===0&&b)return d;else if(a===c-1&&!b)return d;if(b)return a-1;else return a+1};f=u(f);k=n(f,o);e=j(f.length,k,m);if(e<0)return a;while(!i&&e>=0&&e0;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[d%16];d=Math.floor(d/16)}for(;b<32;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[Math.floor(Math.random()*16)]}return c}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(y,u,p,n,r,v,q,t,x,j,w,l,k,m,h,g,f,e,i,c,d,s,o,b){var a=this;a._id=y;a._appName=u;a._appVersion=p;a._appUILocale=n;a._dataLocale=r;a._docUrl=v;a._clientMode=q;a._settings=t;a._reason=x;a._osfControlType=j;a._eToken=w;a._correlationId=l;a._appInstanceId=k;a._touchEnabled=m;a._commerceAllowed=h;a._appMinorVersion=g;a._requirementMatrix=f;a._hostCustomMessage=e;a._hostFullVersion=i;a._isDialog=false;a._clientWindowHeight=c;a._clientWindowWidth=d;a._addinName=s;a._appDomains=o;a._dialogRequirementMatrix=b;a.get_id=function(){return this._id};a.get_appName=function(){return this._appName};a.get_appVersion=function(){return this._appVersion};a.get_appUILocale=function(){return this._appUILocale};a.get_dataLocale=function(){return this._dataLocale};a.get_docUrl=function(){return this._docUrl};a.get_clientMode=function(){return this._clientMode};a.get_bindings=function(){return this._bindings};a.get_settings=function(){return this._settings};a.get_reason=function(){return this._reason};a.get_osfControlType=function(){return this._osfControlType};a.get_eToken=function(){return this._eToken};a.get_correlationId=function(){return this._correlationId};a.get_appInstanceId=function(){return this._appInstanceId};a.get_touchEnabled=function(){return this._touchEnabled};a.get_commerceAllowed=function(){return this._commerceAllowed};a.get_appMinorVersion=function(){return this._appMinorVersion};a.get_requirementMatrix=function(){return this._requirementMatrix};a.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};a.get_hostCustomMessage=function(){return this._hostCustomMessage};a.get_hostFullVersion=function(){return this._hostFullVersion};a.get_isDialog=function(){return this._isDialog};a.get_clientWindowHeight=function(){return this._clientWindowHeight};a.get_clientWindowWidth=function(){return this._clientWindowWidth};a.get_addinName=function(){return this._addinName};a.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(b,a){if(a==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||a==Microsoft.Office.WebExtension.EventType.BindingDataChanged||a==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||a==Microsoft.Office.WebExtension.EventType.DataNodeInserted||a==Microsoft.Office.WebExtension.EventType.DataNodeReplaced)return b+"_"+a;else return a};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var a={};return {getErrorArgs:function(c){var b=a[c];if(!b)b=a[this.errorCodes.ooeInternalError];else{if(!b.name)b.name=a[this.errorCodes.ooeInternalError].name;if(!b.message)b.message=a[this.errorCodes.ooeInternalError].message}return b},addErrorMessage:function(c,b){a[c]=b},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11000,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12000,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13000,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009},initializeErrorMessages:function(b){a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:b.L_DataReadError,message:b.L_GetSelectionNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotMatchBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:b.L_DataReadError,message:b.L_InvalidGetRowColumnCounts};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:b.L_DataReadError,message:b.L_SelectionNotSupportCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:b.L_DataReadError,message:b.L_InvalidGetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:b.L_DataReadError,message:b.L_NonUniformPartialGetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:b.L_DataReadError,message:b.L_GetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:b.L_DataReadError,message:b.L_FileTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:b.L_DataReadError,message:b.L_GetDataParametersConflict};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:b.L_DataReadError,message:b.L_InvalidGetColumns};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:b.L_DataReadError,message:b.L_InvalidGetRows};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:b.L_DataReadError,message:b.L_InvalidReadForBlankRow};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:b.L_DataWriteError,message:b.L_UnsupportedDataObject};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:b.L_DataWriteError,message:b.L_CannotWriteToSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:b.L_DataWriteError,message:b.L_DataNotMatchSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:b.L_DataWriteError,message:b.L_OverwriteWorksheetData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:b.L_DataWriteError,message:b.L_DataNotMatchBindingSize};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:b.L_DataWriteError,message:b.L_InvalidSetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:b.L_InvalidFormat,message:b.L_InvalidDataFormat};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:b.L_DataWriteError,message:b.L_SetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:b.L_DataWriteError,message:b.L_NonUniformPartialSetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:b.L_DataWriteError,message:b.L_InvalidSetColumns};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:b.L_DataWriteError,message:b.L_InvalidSetRows};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:b.L_DataWriteError,message:b.L_SetDataParametersConflict};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:b.L_BindingCreationError,message:b.L_SelectionCannotBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:b.L_InvalidBindingError,message:b.L_BindingNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:b.L_BindingCreationError,message:b.L_BindingToMultipleSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidSelectionForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnThisBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:b.L_BindingCreationError,message:b.L_NamedItemNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:b.L_BindingCreationError,message:b.L_MultipleNamedItemFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidNamedItemForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:b.L_InvalidBinding,message:b.L_UnknownBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnMatrixData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:b.L_InvalidBinding,message:b.L_InvalidColumnsForBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:b.L_ReadSettingsError,message:b.L_SettingNameNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:b.L_SaveSettingsError,message:b.L_SettingsCannotSave};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:b.L_SettingsStaleError,message:b.L_SettingsAreStale};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:b.L_HostError,message:b.L_OperationNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:b.L_InternalError,message:b.L_InternalErrorDescription};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:b.L_PermissionDenied,message:b.L_DocumentReadOnly};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:b.L_EventRegistrationError,message:b.L_EventHandlerNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:b.L_InvalidAPICall,message:b.L_InvalidApiCallInContext};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:b.L_ShuttingDown,message:b.L_ShuttingDown};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:b.L_UnsupportedEnumeration,message:b.L_UnsupportedEnumerationMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:b.L_APINotSupported,message:b.L_BrowserAPINotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:b.L_APICallFailed,message:b.L_RequestTimeout};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:b.L_InvalidOrTimedOutSession,message:b.L_InvalidOrTimedOutSessionMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:b.L_APICallFailed,message:b.L_TooManyIncompleteRequests};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:b.L_APICallFailed,message:b.L_RequestTokenUnavailable};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:b.L_APICallFailed,message:b.L_ActivityLimitReached};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:b.L_APICallFailed,message:b.L_InvalidApiArgumentsMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:b.L_InvalidNode,message:b.L_CustomXmlNodeNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:b.L_CustomXmlError,message:b.L_CustomXmlError};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:b.L_CustomXmlExceedQuotaName,message:b.L_CustomXmlExceedQuotaMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:b.L_CustomXmlOutOfDateName,message:b.L_CustomXmlOutOfDateMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:b.L_CannotNavigateTo,message:b.L_CannotNavigateTo};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:b.L_SpecifiedIdNotExist,message:b.L_SpecifiedIdNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:b.L_NavOutOfBound,message:b.L_NavOutOfBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:b.L_DataWriteReminder,message:b.L_CellDataAmountBeyondLimits};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:b.L_MissingParameter,message:b.L_ElementMissing};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:b.L_InvalidValue,message:b.L_InvalidCellsValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:b.L_InvalidValue,message:b.L_InvalidTableOptionValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:b.L_InvalidValue,message:b.L_InvalidFormatValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_RowIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_ColIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:b.L_OutOfRange,message:b.L_FormatValueOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:b.L_FormattingReminder,message:b.L_CellFormatAmountBeyondLimits};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:b.L_MemoryLimit,message:b.L_CloseFileBeforeRetrieve};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:b.L_NetworkProblem,message:b.L_NetworkProblemRetrieveFile};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:b.L_InvalidValue,message:b.L_SliceSizeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:b.L_DisplayDialogError,message:b.L_DialogAlreadyOpened};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:b.L_DisplayDialogError,message:b.L_NetworkProblem};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:b.L_DialogNavigateError,message:b.L_DialogInvalidScheme};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:b.L_DisplayDialogError,message:b.L_DialogAddressNotTrusted};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:b.L_DisplayDialogError,message:b.L_DialogRequireHTTPS};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:b.L_DisplayDialogError,message:b.L_UserClickIgnore};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:b.L_DisplayDialogError,message:b.L_NewWindowCrossZoneErrorString};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:b.L_APINotSupported,message:b.L_InvalidSSOAddinMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:b.L_UserNotSignedIn,message:b.L_UserNotSignedIn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:b.L_UserAborted,message:b.L_UserAbortedMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:b.L_UnsupportedUserIdentity,message:b.L_UnsupportedUserIdentityMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:b.L_InvalidResourceUrl,message:b.L_InvalidResourceUrlMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:b.L_InvalidGrant,message:b.L_InvalidGrantMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:b.L_SSOClientError,message:b.L_SSOClientErrorMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:b.L_SSOServerError,message:b.L_SSOServerErrorMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:b.L_AddinIsAlreadyRequestingToken,message:b.L_AddinIsAlreadyRequestingTokenMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:b.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:b.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage}}}}();var OfficeExt;(function(a){var b;(function(b){var a=1.1,z=function(){function a(){}return a}();b.RequirementVersion=z;var d=function(){function a(b){var a=this;a.isSetSupported=function(d,b){if(d==undefined)return false;if(b==undefined)b=0;var f=this._setMap,e=f._sets;if(e.hasOwnProperty(d.toLowerCase())){var g=e[d.toLowerCase()];try{var a=this._getVersion(g);b=b+"";var c=this._getVersion(b);if(a.major>0&&a.major>c.major)return true;if(a.minor>0&&a.minor>0&&a.major==c.major&&a.minor>=c.minor)return true}catch(h){return false}}return false};a._getVersion=function(e){var a="version format incorrect",b=e.split("."),c=0,d=0;if(b.length<2&&isNaN(Number(e)))throw a;else{c=Number(b[0]);if(b.length>=2)d=Number(b[1]);if(isNaN(c)||isNaN(d))throw a}var f={minor:d,major:c};return f};a._setMap=b;a.isSetSupported=a.isSetSupported.bind(a)}return a}();b.RequirementMatrix=d;var c=function(){function a(a){this._addSetMap=function(a){for(var b in a)this._sets[b]=a[b]};this._sets=a}return a}();b.DefaultSetRequirement=c;var x=function(c){__extends(b,c);function b(){c.call(this,{dialogapi:a})}return b}(c);b.DefaultDialogSetRequirement=x;var f=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,excelapi:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a})}return b}(c);b.ExcelClientDefaultSetRequirement=f;var k=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({imagecoercion:a})}return b}(f);b.ExcelClientV1DefaultSetRequirement=k;var l=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.3})}return a}(c);b.OutlookClientDefaultSetRequirement=l;var h=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,compressedfile:a,customxmlparts:a,documentevents:a,file:a,htmlcoercion:a,matrixbindings:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,textfile:a,wordapi:a})}return b}(c);b.WordClientDefaultSetRequirement=h;var p=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:a})}return b}(h);b.WordClientV1DefaultSetRequirement=p;var e=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,compressedfile:a,documentevents:a,file:a,pdffile:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.PowerpointClientDefaultSetRequirement=e;var j=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({imagecoercion:a})}return b}(e);b.PowerpointClientV1DefaultSetRequirement=j;var o=function(c){__extends(b,c);function b(){c.call(this,{selection:a,textcoercion:a})}return b}(c);b.ProjectClientDefaultSetRequirement=o;var u=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,file:a})}return b}(c);b.ExcelWebDefaultSetRequirement=u;var w=function(c){__extends(b,c);function b(){c.call(this,{compressedfile:a,documentevents:a,file:a,imagecoercion:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablecoercion:a,textcoercion:a,textfile:a})}return b}(c);b.WordWebDefaultSetRequirement=w;var n=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,settings:a})}return b}(c);b.PowerpointWebDefaultSetRequirement=n;var g=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.3})}return a}(c);b.OutlookWebDefaultSetRequirement=g;var v=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,documentevents:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.SwayWebDefaultSetRequirement=v;var r=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,partialtablebindings:a,settings:a,tablebindings:a,tablecoercion:a})}return b}(c);b.AccessWebDefaultSetRequirement=r;var t=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a})}return b}(c);b.ExcelIOSDefaultSetRequirement=t;var i=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,compressedfile:a,customxmlparts:a,documentevents:a,file:a,htmlcoercion:a,matrixbindings:a,matrixcoercion:a,ooxmlcoercion:a,pdffile:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,textfile:a})}return b}(c);b.WordIOSDefaultSetRequirement=i;var s=function(b){__extends(a,b);function a(){b.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return a}(i);b.WordIOSV1DefaultSetRequirement=s;var m=function(c){__extends(b,c);function b(){c.call(this,{activeview:a,compressedfile:a,documentevents:a,file:a,pdffile:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.PowerpointIOSDefaultSetRequirement=m;var q=function(c){__extends(b,c);function b(){c.call(this,{mailbox:a})}return b}(c);b.OutlookIOSDefaultSetRequirement=q;var y=function(){var b="undefined";function a(){}a.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)};a.getDefaultRequirementMatrix=function(f){this.initializeDefaultSetMatrix();var e=undefined,g=f.get_requirementMatrix();if(g!=undefined&&g.length>0&&typeof JSON!==b){var i=JSON.parse(f.get_requirementMatrix().toLowerCase());e=new d(new c(i))}else{var h=a.getClientFullVersionString(f);if(a.DefaultSetArrayMatrix!=undefined&&a.DefaultSetArrayMatrix[h]!=undefined)e=new d(a.DefaultSetArrayMatrix[h]);else e=new d(new c({}))}return e};a.getDefaultDialogRequirementMatrix=function(f){var a=undefined,e=f.get_dialogRequirementMatrix();if(e!=undefined&&e.length>0&&typeof JSON!==b){var g=JSON.parse(f.get_requirementMatrix().toLowerCase());a=new d(new c(g))}else a=new d(new x);return a};a.getClientFullVersionString=function(a){var d=a.get_appMinorVersion(),e="",b="",c=a.get_appName(),f=c==1024||c==4096||c==8192||c==65536;if(f&&a.get_appVersion()==1)if(c==4096&&d>=15)b="16.00.01";else b="16.00";else if(a.get_appName()==64)b=a.get_appVersion();else{if(d<10)e="0"+d;else e=""+d;b=a.get_appVersion()+"."+e}return a.get_appName()+"-"+b};a.initializeDefaultSetMatrix=function(){a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1600]=new f;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1600]=new h;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1600]=new e;a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1601]=new k;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1601]=new p;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1601]=new j;a.DefaultSetArrayMatrix[a.Outlook_RCLIENT_1600]=new l;a.DefaultSetArrayMatrix[a.Excel_WAC_1600]=new u;a.DefaultSetArrayMatrix[a.Word_WAC_1600]=new w;a.DefaultSetArrayMatrix[a.Outlook_WAC_1600]=new g;a.DefaultSetArrayMatrix[a.Outlook_WAC_1601]=new g;a.DefaultSetArrayMatrix[a.Project_RCLIENT_1600]=new o;a.DefaultSetArrayMatrix[a.Access_WAC_1600]=new r;a.DefaultSetArrayMatrix[a.PowerPoint_WAC_1600]=new n;a.DefaultSetArrayMatrix[a.Excel_IOS_1600]=new t;a.DefaultSetArrayMatrix[a.SWAY_WAC_1600]=new v;a.DefaultSetArrayMatrix[a.Word_IOS_1600]=new i;a.DefaultSetArrayMatrix[a.Word_IOS_16001]=new s;a.DefaultSetArrayMatrix[a.PowerPoint_IOS_1600]=new m;a.DefaultSetArrayMatrix[a.Outlook_IOS_1600]=new q};a.Excel_RCLIENT_1600="1-16.00";a.Excel_RCLIENT_1601="1-16.01";a.Word_RCLIENT_1600="2-16.00";a.Word_RCLIENT_1601="2-16.01";a.PowerPoint_RCLIENT_1600="4-16.00";a.PowerPoint_RCLIENT_1601="4-16.01";a.Outlook_RCLIENT_1600="8-16.00";a.Excel_WAC_1600="16-16.00";a.Word_WAC_1600="32-16.00";a.Outlook_WAC_1600="64-16.00";a.Outlook_WAC_1601="64-16.01";a.Project_RCLIENT_1600="128-16.00";a.Access_WAC_1600="256-16.00";a.PowerPoint_WAC_1600="512-16.00";a.Excel_IOS_1600="1024-16.00";a.SWAY_WAC_1600="2048-16.00";a.Word_IOS_1600="4096-16.00";a.Word_IOS_16001="4096-16.00.01";a.PowerPoint_IOS_1600="8192-16.00";a.Outlook_IOS_1600="65536-16.00";a.DefaultSetArrayMatrix={};return a}();b.RequirementsMatrixFactory=y})(b=a.Requirement||(a.Requirement={}))})(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda();var OfficeExt;(function(a){var b;(function(a){var b=function(){function a(){var a=this;a.getDiagnostics=function(b){var a={host:this.getHost(),version:b||this.getDefaultVersion(),platform:this.getPlatform()};return a};a.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};a.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};a.hostInfo=OSF._OfficeAppFactory.getHostInfo();a.getHost=a.getHost.bind(a);a.getPlatform=a.getPlatform.bind(a);a.getDiagnostics=a.getDiagnostics.bind(a)}a.prototype.capitalizeFirstLetter=function(a){if(a)return a[0].toUpperCase()+a.slice(1).toLowerCase();return a};a.getInstance=function(){if(a.hostObj===undefined)a.hostObj=new a;return a.hostObj};a.prototype.getPlatform=function(){var a=this;if(a.hostInfo.hostPlatform){var b=a.hostInfo.hostPlatform.toLowerCase();if(a.platformRemappings[b])return a.platformRemappings[b]}return null};a.prototype.getHost=function(){var a=this;if(a.hostInfo.hostType){var b=a.hostInfo.hostType.toLowerCase();if(a.camelCaseMappings[b])return a.camelCaseMappings[b];b=a.capitalizeFirstLetter(a.hostInfo.hostType);if(Microsoft.Office.WebExtension.HostType[b])return Microsoft.Office.WebExtension.HostType[b]}return null};a.prototype.getDefaultVersion=function(){if(this.getHost())return "16.0.0000.0000";return null};return a}();a.Host=b})(b=a.HostName||(a.HostName={}))})(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var b,a=false;return {enableShortcut:function(){if(!a){if(window.Office)b=window.Office;else OSF.OUtil.setNamespace("Office",window);window.Office=Microsoft.Office.WebExtension;a=true}},disableShortcut:function(){if(a){if(b)window.Office=b;else OSF.OUtil.unsetNamespace("Office",window);a=false}}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(a){if(a)OSF.NamespaceManager.enableShortcut();else OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(a,b){var c;if(a&&typeof a=="string"){var d=a.indexOf("#");if(d!=-1){var h=a.substring(0,d),g=a.substring(d+1);switch(h){case "binding":case "bindings":if(g)c=new OSF.DDA.BindingPromise(g)}}}if(!c){if(b){var e=typeof b;if(e=="function"){var f={};f[Microsoft.Office.WebExtension.Parameters.Callback]=b;OSF.DDA.issueAsyncResult(f,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,e)}}else{c.onFail=b;return c}};OSF.DDA.Context=function(a,g,h,c,d){var f="requirements",b=this;OSF.OUtil.defineEnumerableProperties(b,{contentLanguage:{value:a.get_dataLocale()},displayLanguage:{value:a.get_appUILocale()},touchEnabled:{value:a.get_touchEnabled()},commerceAllowed:{value:a.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(a.get_hostFullVersion())}});h&&OSF.OUtil.defineEnumerableProperty(b,"license",{value:h});a.ui&&OSF.OUtil.defineEnumerableProperty(b,"ui",{value:a.ui});a.auth&&OSF.OUtil.defineEnumerableProperty(b,"auth",{value:a.auth});if(a.get_isDialog()){var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,f,{value:e})}else{g&&OSF.OUtil.defineEnumerableProperty(b,"document",{value:g});if(c){var i=c.displayName||"appOM";delete c.displayName;OSF.OUtil.defineEnumerableProperty(b,i,{value:c})}d&&OSF.OUtil.defineEnumerableProperty(b,"officeTheme",{"get":function(){return d()}});var e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,f,{value:e})}};OSF.DDA.OutlookContext=function(c,a,d,e,b){OSF.DDA.OutlookContext.uber.constructor.call(this,c,null,d,e,b);a&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:a})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(b,c){var a;switch(b.get_clientMode()){case OSF.ClientMode.ReadOnly:a=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:a=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}c&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:c});OSF.OUtil.defineMutableProperties(this,{mode:{value:a},url:{value:b.get_docUrl()}})};OSF.DDA.JsomDocument=function(d,b,e){var a=this;OSF.DDA.JsomDocument.uber.constructor.call(a,d,e);b&&OSF.OUtil.defineEnumerableProperty(a,"bindings",{"get":function(){return b}});var c=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(a,[c.GetSelectedDataAsync,c.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(a,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{"get":function(){var a;if(OSF&&OSF._OfficeAppFactory)a=OSF._OfficeAppFactory.getContext();return a}});OSF.DDA.License=function(a){OSF.OUtil.defineEnumerableProperty(this,"value",{value:a})};OSF.DDA.ApiMethodCall=function(c,f,e,g,h){var a=this,d=c.length,b=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,h)});a.verifyArguments=function(d,f){for(var e in d){var a=d[e],c=f[e];if(a["enum"])switch(typeof c){case "string":if(OSF.OUtil.listContainsValue(a["enum"],c))break;case "undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw b()}if(a["types"])if(!OSF.OUtil.listContainsValue(a["types"],typeof c))throw b()}};a.extractRequiredArguments=function(g,l,j){if(g.lengthc+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var d,f,i=h.length-1;i>=c;i--){var g=h[i];switch(typeof g){case "object":if(d)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else d=g;break;case a:if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else f=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}d=b.fillOptions(d,j,l,k);if(f)if(d[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else d[Microsoft.Office.WebExtension.Parameters.Callback]=f;b.verifyArguments(e,d);return d}this.verifyAndExtractCall=function(e,c,a){var d=b.extractRequiredArguments(e,c,a),g=h(e,d,c,a),f=b.constructCallArgs(d,g,c,a);return f};this.processResponse=function(c,b,e,d){var a;if(c==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)if(f)a=f(b,e,d);else a=b;else if(g)a=g(c,b);else a=OSF.DDA.ErrorCodeManager.getErrorArgs(c);return a};this.getCallArgs=function(g){for(var b,d,f=g.length-1;f>=c;f--){var e=g[f];switch(typeof e){case "object":b=e;break;case a:d=e}}b=b||{};if(d)b[Microsoft.Office.WebExtension.Parameters.Callback]=d;return b}};OSF.DDA.AsyncMethodCallFactory=function(){return {manufacture:function(a){var c=a.supportedOptions?OSF.OUtil.createObject(a.supportedOptions):[],b=a.privateStateCallbacks?OSF.OUtil.createObject(a.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(a.requiredArguments||[],c,b,a.onSucceeded,a.onFailed,a.checkCallArgs,a.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(a){OSF.DDA.AsyncMethodCalls[a.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(a)};OSF.DDA.Error=function(c,a,b){OSF.OUtil.defineEnumerableProperties(this,{name:{value:c},message:{value:a},code:{value:b}})};OSF.DDA.AsyncResult=function(b,a){OSF.OUtil.defineEnumerableProperties(this,{value:{value:b[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:a?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});b[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:b[OSF.DDA.AsyncResultEnum.Properties.Context]});a&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(a[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(d,f,a){var e=d[Microsoft.Office.WebExtension.Parameters.Callback];if(e){var c={};c[OSF.DDA.AsyncResultEnum.Properties.Context]=d[Microsoft.Office.WebExtension.Parameters.AsyncContext];var b;if(f==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)c[OSF.DDA.AsyncResultEnum.Properties.Value]=a;else{b={};a=a||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);b[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=f||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=a.name||a;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=a.message||a}e(new OSF.DDA.AsyncResult(c,b))}};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(b){for(var a in b){var c={};OSF.OUtil.defineEnumerableProperties(c,{id:{value:a},displayName:{value:b[a]}});OSF.DDA.SyncMethodNames[a]=c}};OSF.DDA.SyncMethodCall=function(b,c,f,g,h){var d=b.length,a=new OSF.DDA.ApiMethodCall(b,c,f,g,h);function e(e,h,j,i){if(e.length>d+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var b,k,f=e.length-1;f>=d;f--){var g=e[f];switch(typeof g){case "object":if(b)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else b=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}b=a.fillOptions(b,h,j,i);a.verifyArguments(c,b);return b}this.verifyAndExtractCall=function(f,c,b){var d=a.extractRequiredArguments(f,c,b),h=e(f,d,c,b),g=a.constructCallArgs(d,h,c,b);return g}};OSF.DDA.SyncMethodCallFactory=function(){return {manufacture:function(a){var b=a.supportedOptions?OSF.OUtil.createObject(a.supportedOptions):[];return new OSF.DDA.SyncMethodCall(a.requiredArguments||[],b,a.privateStateCallbacks,a.checkCallArgs,a.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(a){OSF.DDA.SyncMethodCalls[a.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(a)};OSF.DDA.ListType=function(){var a={};return {setListType:function(c,b){a[c]=b},isListType:function(b){return OSF.OUtil.listContainsKey(a,b)},getDescriptor:function(b){return a[b]}}}();OSF.DDA.HostParameterMap=function(b,c){var j="fromHost",a=this,i="toHost",e=j,l="sourceData",g="self",d={};d[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(a){if(a!=null&&a.rows!==undefined){var b={};b[OSF.DDA.TableDataProperties.TableRows]=a.rows;b[OSF.DDA.TableDataProperties.TableHeaders]=a.headers;a=b}return a},fromHost:function(a){return a}};d[Microsoft.Office.WebExtension.Parameters.SampleData]=d[Microsoft.Office.WebExtension.Parameters.Data];function f(j,i){var m=j?{}:undefined;for(var h in j){var g=j[h],a;if(OSF.DDA.ListType.isListType(h)){a=[];for(var n in g)a.push(f(g[n],i))}else if(OSF.OUtil.listContainsKey(d,h))a=d[h][i](g);else if(i==e&&b.preserveNesting(h))a=f(g,i);else{var k=c[h];if(k){var l=k[i];if(l){a=l[g];if(a===undefined)a=g}}else a=g}m[h]=a}return m}function k(j,h){var e;for(var a in h){var d;if(b.isComplexType(a))d=k(j,c[a][i]);else d=j[a];if(d!=undefined){if(!e)e={};var f=h[a];if(f==g)f=a;e[f]=b.pack(a,d)}}return e}function h(j,n,f){if(!f)f={};for(var a in n){var k=n[a],d;if(k==g)d=j;else if(k==l){f[a]=j.toArray();continue}else d=j[k];if(d===null||d===undefined)f[a]=undefined;else{d=b.unpack(a,d);var i;if(b.isComplexType(a)){i=c[a][e];if(b.preserveNesting(a))f[a]=h(d,i);else h(d,i,f)}else if(OSF.DDA.ListType.isListType(a)){i={};var p=OSF.DDA.ListType.getDescriptor(a);i[p]=g;var m=new Array(d.length);for(var o in d)m[o]=h(d[o],i);f[a]=m}else f[a]=d}}return f}function m(l,e,a){var d=c[l][a],b;if(a=="toHost"){var i=f(e,a);b=k(i,d)}else if(a==j){var g=h(e,d);b=f(g,a)}return b}if(!c)c={};a.addMapping=function(l,h){var a,d;if(h.map){a=h.map;d={};for(var j in a){var k=a[j];if(k==g)k=j;d[k]=j}}else{a=h.toHost;d=h.fromHost}var b=c[l];if(b){var f=b[i];for(var n in f)a[n]=f[n];f=b[e];for(var m in f)d[m]=f[m]}else b=c[l]={};b[i]=a;b[e]=d};a.toHost=function(b,a){return m(b,a,i)};a.fromHost=function(a,b){return m(a,b,e)};a.self=g;a.sourceData=l;a.addComplexType=function(a){b.addComplexType(a)};a.getDynamicType=function(a){return b.getDynamicType(a)};a.setDynamicType=function(c,a){b.setDynamicType(c,a)};a.dynamicTypes=d;a.doMapValues=function(a,b){return f(a,b)}};OSF.DDA.SpecialProcessor=function(c,b){var a=this;a.addComplexType=function(a){c.push(a)};a.getDynamicType=function(a){return b[a]};a.setDynamicType=function(c,a){b[c]=a};a.isComplexType=function(a){return OSF.OUtil.listContainsValue(c,a)};a.isDynamicType=function(a){return OSF.OUtil.listContainsKey(b,a)};a.preserveNesting=function(b){var a=[];OSF.DDA.PropertyDescriptors&&a.push(OSF.DDA.PropertyDescriptors.Subset);if(OSF.DDA.DataNodeEventProperties)a=a.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]);return OSF.OUtil.listContainsValue(a,b)};a.pack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].toHost(d);else a=d;return a};a.unpack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].fromHost(d);else a=d;return a}};OSF.DDA.getDecoratedParameterMap=function(d,c){var a=new OSF.DDA.HostParameterMap(d),f=a.self;function b(a){var c=null;if(a){c={};for(var d=a.length,b=0;b0){for(var d=[],c=0;c=f)break;c=Function._validateParameter(i[d],h,j);if(c){c.popStackFrame();return c}}return a};if(!Function._validateParameterCount)Function._validateParameterCount=function(m,f,l){var b,e,c=f.length,g=m.length;if(gc){e=d;for(b=0;b0&&b.push(c)}}}catch(i){}return b}var c=[],b={};b[Microsoft.Office.WebExtension.Parameters.Data]=function(){var c=0,b=1;return {toHost:function(a){if(OSF.DDA.TableDataProperties&&typeof a!="string"&&a[OSF.DDA.TableDataProperties.TableRows]!==undefined){var d=[];d[c]=a[OSF.DDA.TableDataProperties.TableRows];d[b]=a[OSF.DDA.TableDataProperties.TableHeaders];a=d}return a},fromHost:function(f){var e;if(f.toArray){var g=f.dimensions();if(g===2)e=a(f);else{var d=f.toArray();if(d.length===2&&(d[0]!=null&&d[0].toArray||d[1]!=null&&d[1].toArray)){e={};e[OSF.DDA.TableDataProperties.TableRows]=a(d[c]);e[OSF.DDA.TableDataProperties.TableHeaders]=a(d[b])}else e=d}}else e=f;return e}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,c,b);this.unpack=function(c,a){var d;if(this.isComplexType(c)||OSF.DDA.ListType.isListType(c)){var e=(a||typeof a==="unknown")&&a.toArray;d=e?a.toArray():a||{}}else if(this.isDynamicType(c))d=b[c].fromHost(a);else d=a;return d}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(a){function c(a){var b=a;if(OSF.OUtil.isArray(a))for(var f=b.length,d=0;d2){c=[];for(var f=1;f40){a=OSF.OUtil.Guid.generateNewGuid();b.setValue(b.clientIDKey,a)}return a};a.prototype.saveLog=function(d,e){var b=this,a=b.getValue(b.logIdSetKey);a=(a&&a.length>0?a+";":c)+d;b.setValue(b.logIdSetKey,a);b.setValue(d,e)};a.prototype.enumerateLog=function(c,e){var a=this,d=a.getValue(a.logIdSetKey);if(d){var f=d.split(";");for(var h in f){var b=f[h],g=a.getValue(b);if(g){c&&c(b,g);e&&a.remove(b)}}e&&a.remove(a.logIdSetKey)}};a.prototype.getValue=function(d){var a=OSF.OUtil.getLocalStorage(),b=c;if(a)b=a.getItem(d);return b};a.prototype.setValue=function(c,b){var a=OSF.OUtil.getLocalStorage();a&&a.setItem(c,b)};a.prototype.remove=function(b){var a=OSF.OUtil.getLocalStorage();if(a)try{a.removeItem(b)}catch(c){}};return a}(),i=function(){function a(){}a.prototype.LogData=function(a){if(!OSF.Logger||!d.enableTelemetry)return;try{OSFAriaLogger.AriaLogger.getInstance().logData(a)}catch(b){}};a.prototype.LogRawData=function(a){if(!OSF.Logger||!d.enableTelemetry)return;try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(a))}catch(b){}};return a}();function f(a){if(a)a=a.replace(/[{}]/g,c).toLowerCase();return a||c}function x(g){if(!OSF.Logger)return;if(a)return;a=new z;if(g.get_hostFullVersion())a.hostVersion=g.get_hostFullVersion();else a.hostVersion=g.get_appVersion();a.appId=g.get_id();a.host=g.get_appName();a.browser=window.navigator.userAgent;a.correlationId=f(g.get_correlationId());a.clientId=(new l).getClientId();a.appInstanceId=g.get_appInstanceId();if(a.appInstanceId)a.appInstanceId=a.appInstanceId.replace(/[{}]/g,c).toLowerCase();a.message=g.get_hostCustomMessage();a.officeJSVersion=OSF.ConstantNames.FileVersion;a.hostJSVersion="16.0.8616.1000";if(g._wacHostEnvironment)a.wacHostEnvironment=g._wacHostEnvironment;if(g._isFromWacAutomation!==undefined&&g._isFromWacAutomation!==b)a.isFromWacAutomation=g._isFromWacAutomation.toString().toLowerCase();var j=g.get_docUrl();a.docUrl=p.test(j)?j:c;var i=location.href;if(i)i=i.split("?")[0].split("#")[0];a.appURL=i;(function(i,a){var e,h,d;a.assetId=c;a.userId=c;try{e=decodeURIComponent(i);h=new DOMParser;d=h.parseFromString(e,"text/xml");var f=d.getElementsByTagName("t")[0].attributes.getNamedItem("cid"),g=d.getElementsByTagName("t")[0].attributes.getNamedItem("oid");if(f&&f.nodeValue)a.userId=f.nodeValue;else if(g&&g.nodeValue)a.userId=g.nodeValue;a.assetId=d.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(j){}finally{e=b;d=b;h=b}})(g.get_eToken(),a);(function(){var l=new Date,c=b,i=0,k=false,f=function(){if(document.hasFocus()){if(c==b)c=new Date}else if(c){i+=Math.abs((new Date).getTime()-c.getTime());c=b}},a=[];a.push(new h("focus",f));a.push(new h("blur",f));a.push(new h("focusout",f));a.push(new h("focusin",f));var j=function(){for(var f=0;f0)for(var d in a)if(a[d]===c)return true;return false},hasObjectEventHandler:function(d,e,f){var c=this._objectEventHandlers[d];if(c!=null)for(var a=c[e],b=0;a!=null&&b0)for(var b=0;b0){this._eventHandlers[a]=[];return true}return false},clearObjectEventHandlers:function(a,b){if(this._objectEventHandlers[a]!=null&&this._objectEventHandlers[a][b]!=null){this._objectEventHandlers[a][b]=[];return true}return false},getEventHandlerCount:function(a){return this._eventHandlers[a]!=undefined?this._eventHandlers[a].length:-1},getObjectEventHandlerCount:function(a,b){if(this._objectEventHandlers[a]==null||this._objectEventHandlers[a][b]==null)return 0;return this._objectEventHandlers[a][b].length},fireEvent:function(a){if(a.type==undefined)return false;var b=a.type;if(b&&this._eventHandlers[b]){var c=this._eventHandlers[b];for(var d in c)c[d](a);return true}else return false},fireObjectEvent:function(f,a){if(a.type==undefined)return false;var b=a.type;if(b&&this._objectEventHandlers[b]){var e=this._objectEventHandlers[b],c=e[f];if(c!=null){for(var d=0;d0){var d=b[0];while(c.length>0){var e=c.shift();d(e)}return true}}return false},clearQueuedEvent:function(a){if(a&&this._eventHandlers[a]){var b=this._queuedEventsArgs[a];if(b)this._queuedEventsArgs[a]=[]}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(d,c,b){var h="outlookwebapp",g="outlook",f="hostType",e=this,a;switch(d){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:a=new OSF.DDA.DocumentSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:a=new OSF.DDA.BindingSelectionChangedEventArgs(e.manufactureBinding(b,c.document),b[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:a=new OSF.DDA.BindingDataChangedEventArgs(e.manufactureBinding(b,c.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:a=new OSF.DDA.SettingsChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:a=new OSF.DDA.ActiveViewChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:a=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:a=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:a=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(b);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:a=new OSF.DDA.ObjectEventArgs(d,b[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:a=new OSF.DDA.RichApiMessageEventArgs(d,b);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:a=new OSF.DDA.NodeInsertedEventArgs(e.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NewNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:a=new OSF.DDA.NodeReplacedEventArgs(e.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.OldNode]),e.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NewNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:a=new OSF.DDA.NodeDeletedEventArgs(e.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.OldNode]),e.manufactureDataNode(b[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),b[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:a=new OSF.DDA.TaskSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:a=new OSF.DDA.ResourceSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:a=new OSF.DDA.ViewSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:a=new OSF.DDA.DialogEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:a=new OSF.DDA.DialogParentEventArgs(b);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]==g||OSF._OfficeAppFactory.getHostInfo()[f]==h){a=new OSF.DDA.OlkItemSelectedChangedEventArgs(b);c.initialize(a["initialData"]);c.setCurrentItemNumber(a["itemNumber"].itemNumber)}else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,d));break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]==g||OSF._OfficeAppFactory.getHostInfo()[f]==h)a=new OSF.DDA.OlkRecipientsChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,d));break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]==g||OSF._OfficeAppFactory.getHostInfo()[f]==h)a=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(b);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,d));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,d))}return a};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});Microsoft.Office.WebExtension.TableData=function(b,a){function c(a){if(a==null||a==undefined)return null;try{for(var b=OSF.DDA.DataCoercion.findArrayDimensionality(a,2);b<2;b++)a=[a];return a}catch(c){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{"get":function(){return a},"set":function(b){a=c(b)}},rows:{"get":function(){return b},"set":function(a){b=a==null||OSF.OUtil.isArray(a)&&a.length==0?[]:c(a)}}});this.headers=a;this.rows=b};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(a){return new Microsoft.Office.WebExtension.TableData(a[OSF.DDA.TableDataProperties.TableRows],a[OSF.DDA.TableDataProperties.TableHeaders])};Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var a=null;return {findArrayDimensionality:function(c){if(OSF.OUtil.isArray(c)){for(var b=0,a=0;a100)a[Microsoft.Office.WebExtension.Parameters.Width]=99;if(a[Microsoft.Office.WebExtension.Parameters.Height]<=0)a[Microsoft.Office.WebExtension.Parameters.Height]=1;if(a[Microsoft.Office.WebExtension.Parameters.Height]>100)a[Microsoft.Office.WebExtension.Parameters.Height]=99;if(!a[Microsoft.Office.WebExtension.Parameters.RequireHTTPs])a[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=true;return a}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(a){try{a.onCalling&&a.onCalling();var c=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true,a);OSF.ClientHostController.openDialog(a.dispId,a.targetId,function(c,b){a.onEvent&&a.onEvent(b);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(a.dispId)},c)}catch(b){OSF.DDA.SafeArray.Delegate._onException(b,a)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(a){a.onCalling&&a.onCalling();var c=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false,a);try{OSF.ClientHostController.closeDialog(a.dispId,a.targetId,c)}catch(b){OSF.DDA.SafeArray.Delegate._onException(b,a)}};OSF.DDA.SafeArray.Delegate.messageParent=function(a){try{a.onCalling&&a.onCalling();var d=(new Date).getTime(),b=OSF.ClientHostController.messageParent(a.hostCallArgs);a.onReceiving&&a.onReceiving();OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(a.dispId,a.hostCallArgs,Math.abs((new Date).getTime()-d),b);return b}catch(c){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(c)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:true});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:true});OSF.DDA.SafeArray.Delegate.sendMessage=function(a){try{a.onCalling&&a.onCalling();var d=(new Date).getTime(),c=OSF.ClientHostController.sendMessage(a.hostCallArgs);a.onReceiving&&a.onReceiving();return c}catch(b){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(b)}};Microsoft.Office.WebExtension.ProjectViewTypes={Gantt:1,NetworkDiagram:2,TaskDiagram:3,TaskForm:4,TaskSheet:5,ResourceForm:6,ResourceSheet:7,ResourceGraph:8,TeamPlanner:9,TaskDetails:10,TaskNameForm:11,ResourceNames:12,Calendar:13,TaskUsage:14,ResourceUsage:15,Timeline:16,Drawing:18,ResourcePlan:19};OSF.OUtil.redefineList(Microsoft.Office.WebExtension.CoercionType,{Text:"text"});OSF.OUtil.redefineList(Microsoft.Office.WebExtension.ValueFormat,{Unformatted:"unformatted"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{TaskSelectionChanged:"taskSelectionChanged",ResourceSelectionChanged:"resourceSelectionChanged",ViewSelectionChanged:"viewSelectionChanged"});OSF.DDA.AsyncMethodNames.addNames({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync"});(function(){var c=false,b="boolean",a="number";function d(b,d,c){var a=b[Microsoft.Office.WebExtension.Parameters.Data];if(OSF.DDA.TableDataProperties&&a&&(a[OSF.DDA.TableDataProperties.TableRows]!=undefined||a[OSF.DDA.TableDataProperties.TableHeaders]!=undefined))a=OSF.DDA.OMFactory.manufactureTableData(a);a=OSF.DDA.DataCoercion.coerceData(a,c[Microsoft.Office.WebExtension.Parameters.CoercionType]);return a==undefined?null:a}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,"enum":Microsoft.Office.WebExtension.CoercionType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}}],privateStateCallbacks:[],onSucceeded:d});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object",a,b]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(a){return OSF.DDA.DataCoercion.determineCoercionType(a[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:[a,b],defaultValue:c}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:[a,b],defaultValue:c}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[a,b],defaultValue:c}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[a,b],defaultValue:c}}],privateStateCallbacks:[]})})();OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:1},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:2},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:3},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:4},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:5}]});OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",RefreshingSettings:"refreshingSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(b){var d={};for(var c in b){var a=b[c];try{if(JSON)a=JSON.stringify(a,function(a,b){return OSF.OUtil.isDate(this[a])?OSF.DDA.SettingsManager.DateJSONPrefix+this[a].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix:b});else a=Sys.Serialization.JavaScriptSerializer.serialize(a);d[c]=a}catch(e){}}return d},deserializeSettings:function(b){var d={};b=b||{};for(var c in b){var a=b[c];try{if(JSON)a=JSON.parse(a,function(c,a){var b;if(typeof a==="string"&&a&&a.length>6&&a.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&a.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix){b=new Date(parseInt(a.slice(5,-1)));if(b)return b}return a});else a=Sys.Serialization.JavaScriptSerializer.deserialize(a,true);d[c]=a}catch(e){}}return d}};OSF.DDA.Settings=function(a){var b="name";a=a||{};var c=function(d){var b=OSF.OUtil.getSessionStorage();if(b){var a=OSF.DDA.SettingsManager.serializeSettings(d),c=JSON?JSON.stringify(a):Sys.Serialization.JavaScriptSerializer.serialize(a);b.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),c)}};OSF.OUtil.defineEnumerableProperties(this,{"get":{value:function(e){var d=Function._validateParams(arguments,[{name:b,type:String,mayBeNull:false}]);if(d)throw d;var c=a[e];return typeof c==="undefined"?null:c}},"set":{value:function(f,e){var d=Function._validateParams(arguments,[{name:b,type:String,mayBeNull:false},{name:"value",mayBeNull:true}]);if(d)throw d;a[f]=e;c(a)}},remove:{value:function(e){var d=Function._validateParams(arguments,[{name:b,type:String,mayBeNull:false}]);if(d)throw d;delete a[e];c(a)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],a)};OSF.DDA.RefreshableSettings=function(a){OSF.DDA.RefreshableSettings.uber.constructor.call(this,a);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],a);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:a}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(b,a){return a}}],onSucceeded:function(d,a,e){var f=d[OSF.DDA.SettingsManager.SerializedSettings],c=OSF.DDA.SettingsManager.deserializeSettings(f),g=e[OSF.DDA.SettingsManager.RefreshingSettings];for(var b in g)a.remove(b);for(var b in c)a.set(b,c[b]);return a}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:true}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(b,a){return OSF.DDA.SettingsManager.serializeSettings(a)}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.CoercionType,toHost:[{name:Microsoft.Office.WebExtension.CoercionType.Text,value:0},{name:Microsoft.Office.WebExtension.CoercionType.Matrix,value:1},{name:Microsoft.Office.WebExtension.CoercionType.Table,value:2}]});Microsoft.Office.WebExtension.ProjectTaskFields={ActualCost:0,ActualDuration:1,ActualFinish:2,ActualOvertimeCost:3,ActualOvertimeWork:4,ActualStart:5,ActualWork:6,Text1:7,Text10:8,Finish10:9,Start10:10,Text11:11,Text12:12,Text13:13,Text14:14,Text15:15,Text16:16,Text17:17,Text18:18,Text19:19,Finish1:20,Start1:21,Text2:22,Text20:23,Text21:24,Text22:25,Text23:26,Text24:27,Text25:28,Text26:29,Text27:30,Text28:31,Text29:32,Finish2:33,Start2:34,Text3:35,Text30:36,Finish3:37,Start3:38,Text4:39,Finish4:40,Start4:41,Text5:42,Finish5:43,Start5:44,Text6:45,Finish6:46,Start6:47,Text7:48,Finish7:49,Start7:50,Text8:51,Finish8:52,Start8:53,Text9:54,Finish9:55,Start9:56,Baseline10BudgetCost:57,Baseline10BudgetWork:58,Baseline10Cost:59,Baseline10Duration:60,Baseline10Finish:61,Baseline10FixedCost:62,Baseline10FixedCostAccrual:63,Baseline10Start:64,Baseline10Work:65,Baseline1BudgetCost:66,Baseline1BudgetWork:67,Baseline1Cost:68,Baseline1Duration:69,Baseline1Finish:70,Baseline1FixedCost:71,Baseline1FixedCostAccrual:72,Baseline1Start:73,Baseline1Work:74,Baseline2BudgetCost:75,Baseline2BudgetWork:76,Baseline2Cost:77,Baseline2Duration:78,Baseline2Finish:79,Baseline2FixedCost:80,Baseline2FixedCostAccrual:81,Baseline2Start:82,Baseline2Work:83,Baseline3BudgetCost:84,Baseline3BudgetWork:85,Baseline3Cost:86,Baseline3Duration:87,Baseline3Finish:88,Baseline3FixedCost:89,Baseline3FixedCostAccrual:90,Basline3Start:91,Baseline3Work:92,Baseline4BudgetCost:93,Baseline4BudgetWork:94,Baseline4Cost:95,Baseline4Duration:96,Baseline4Finish:97,Baseline4FixedCost:98,Baseline4FixedCostAccrual:99,Baseline4Start:100,Baseline4Work:101,Baseline5BudgetCost:102,Baseline5BudgetWork:103,Baseline5Cost:104,Baseline5Duration:105,Baseline5Finish:106,Baseline5FixedCost:107,Baseline5FixedCostAccrual:108,Baseline5Start:109,Baseline5Work:110,Baseline6BudgetCost:111,Baseline6BudgetWork:112,Baseline6Cost:113,Baseline6Duration:114,Baseline6Finish:115,Baseline6FixedCost:116,Baseline6FixedCostAccrual:117,Baseline6Start:118,Baseline6Work:119,Baseline7BudgetCost:120,Baseline7BudgetWork:121,Baseline7Cost:122,Baseline7Duration:123,Baseline7Finish:124,Baseline7FixedCost:125,Baseline7FixedCostAccrual:126,Baseline7Start:127,Baseline7Work:128,Baseline8BudgetCost:129,Baseline8BudgetWork:130,Baseline8Cost:131,Baseline8Duration:132,Baseline8Finish:133,Baseline8FixedCost:134,Baseline8FixedCostAccrual:135,Baseline8Start:136,Baseline8Work:137,Baseline9BudgetCost:138,Baseline9BudgetWork:139,Baseline9Cost:140,Baseline9Duration:141,Baseline9Finish:142,Baseline9FixedCost:143,Baseline9FixedCostAccrual:144,Baseline9Start:145,Baseline9Work:146,BaselineBudgetCost:147,BaselineBudgetWork:148,BaselineCost:149,BaselineDuration:150,BaselineFinish:151,BaselineFixedCost:152,BaselineFixedCostAccrual:153,BaselineStart:154,BaselineWork:155,BudgetCost:156,BudgetWork:157,TaskCalendarGUID:158,ConstraintDate:159,ConstraintType:160,Cost1:161,Cost10:162,Cost2:163,Cost3:164,Cost4:165,Cost5:166,Cost6:167,Cost7:168,Cost8:169,Cost9:170,Date1:171,Date10:172,Date2:173,Date3:174,Date4:175,Date5:176,Date6:177,Date7:178,Date8:179,Date9:180,Deadline:181,Duration1:182,Duration10:183,Duration2:184,Duration3:185,Duration4:186,Duration5:187,Duration6:188,Duration7:189,Duration8:190,Duration9:191,Duration:192,EarnedValueMethod:193,FinishSlack:194,FixedCost:195,FixedCostAccrual:196,Flag10:197,Flag1:198,Flag11:199,Flag12:200,Flag13:201,Flag14:202,Flag15:203,Flag16:204,Flag17:205,Flag18:206,Flag19:207,Flag2:208,Flag20:209,Flag3:210,Flag4:211,Flag5:212,Flag6:213,Flag7:214,Flag8:215,Flag9:216,FreeSlack:217,HasRollupSubTasks:218,ID:219,Name:220,Notes:221,Number1:222,Number10:223,Number11:224,Number12:225,Number13:226,Number14:227,Number15:228,Number16:229,Number17:230,Number18:231,Number19:232,Number2:233,Number20:234,Number3:235,Number4:236,Number5:237,Number6:238,Number7:239,Number8:240,Number9:241,ScheduledDuration:242,ScheduledFinish:243,ScheduledStart:244,OutlineLevel:245,OvertimeCost:246,OvertimeWork:247,PercentComplete:248,PercentWorkComplete:249,Predecessors:250,PreleveledFinish:251,PreleveledStart:252,Priority:253,Active:254,Critical:255,Milestone:256,Overallocated:257,IsRollup:258,Summary:259,RegularWork:260,RemainingCost:261,RemainingDuration:262,RemainingOvertimeCost:263,RemainingWork:264,ResourceNames:265,ResourceNames_deprecated:266,Cost:267,Finish:268,Start:269,Work:270,StartSlack:271,Status:272,Successors:273,StatusManager:274,TotalSlack:275,TaskGUID:276,Type:277,WBS:278,WBSPREDECESSORS:279,WBSSUCCESSORS:280,WSSID:281,FreeformDuration:282,FreeformFinish:283,FreeformStart:284};Microsoft.Office.WebExtension.ProjectResourceFields={Accrual:0,ActualCost:1,ActualOvertimeCost:2,ActualOvertimeWork:3,ActualOvertimeWorkProtected:4,ActualWork:5,ActualWorkProtected:6,BaseCalendar:7,Baseline10BudgetCost:8,Baseline10BudgetWork:9,Baseline10Cost:10,Baseline10Work:11,Baseline1BudgetCost:12,Baseline1BudgetWork:13,Baseline1Cost:14,Baseline1Work:15,Baseline2BudgetCost:16,Baseline2BudgetWork:17,Baseline2Cost:18,Baseline2Work:19,Baseline3BudgetCost:20,Baseline3BudgetWork:21,Baseline3Cost:22,Baseline3Work:23,Baseline4BudgetCost:24,Baseline4BudgetWork:25,Baseline4Cost:26,Baseline4Work:27,Baseline5BudgetCost:28,Baseline5BudgetWork:29,Baseline5Cost:30,Baseline5Work:31,Baseline6BudgetCost:32,Baseline6BudgetWork:33,Baseline6Cost:34,Baseline6Work:35,Baseline7BudgetCost:36,Baseline7BudgetWork:37,Baseline7Cost:38,Baseline7Work:39,Baseline8BudgetCost:40,Baseline8BudgetWork:41,Baseline8Cost:42,Baseline8Work:43,Baseline9BudgetCost:44,Baseline9BudgetWork:45,Baseline9Cost:46,Baseline9Work:47,BaselineBudgetCost:48,BaselineBudgetWork:49,BaselineCost:50,BaselineWork:51,BudgetCost:52,BudgetWork:53,ResourceCalendarGUID:54,Code:55,Cost1:56,Cost10:57,Cost2:58,Cost3:59,Cost4:60,Cost5:61,Cost6:62,Cost7:63,Cost8:64,Cost9:65,ResourceCreationDate:66,Date1:67,Date10:68,Date2:69,Date3:70,Date4:71,Date5:72,Date6:73,Date7:74,Date8:75,Date9:76,Duration1:77,Duration10:78,Duration2:79,Duration3:80,Duration4:81,Duration5:82,Duration6:83,Duration7:84,Duration8:85,Duration9:86,Email:87,End:88,Finish1:89,Finish10:90,Finish2:91,Finish3:92,Finish4:93,Finish5:94,Finish6:95,Finish7:96,Finish8:97,Finish9:98,Flag10:99,Flag1:100,Flag11:101,Flag12:102,Flag13:103,Flag14:104,Flag15:105,Flag16:106,Flag17:107,Flag18:108,Flag19:109,Flag2:110,Flag20:111,Flag3:112,Flag4:113,Flag5:114,Flag6:115,Flag7:116,Flag8:117,Flag9:118,Group:119,Units:120,Name:121,Notes:122,Number1:123,Number10:124,Number11:125,Number12:126,Number13:127,Number14:128,Number15:129,Number16:130,Number17:131,Number18:132,Number19:133,Number2:134,Number20:135,Number3:136,Number4:137,Number5:138,Number6:139,Number7:140,Number8:141,Number9:142,OvertimeCost:143,OvertimeRate:144,OvertimeWork:145,PercentWorkComplete:146,CostPerUse:147,Generic:148,OverAllocated:149,RegularWork:150,RemainingCost:151,RemainingOvertimeCost:152,RemainingOvertimeWork:153,RemainingWork:154,ResourceGUID:155,Cost:156,Work:157,Start:158,Start1:159,Start10:160,Start2:161,Start3:162,Start4:163,Start5:164,Start6:165,Start7:166,Start8:167,Start9:168,StandardRate:169,Text1:170,Text10:171,Text11:172,Text12:173,Text13:174,Text14:175,Text15:176,Text16:177,Text17:178,Text18:179,Text19:180,Text2:181,Text20:182,Text21:183,Text22:184,Text23:185,Text24:186,Text25:187,Text26:188,Text27:189,Text28:190,Text29:191,Text3:192,Text30:193,Text4:194,Text5:195,Text6:196,Text7:197,Text8:198,Text9:199};Microsoft.Office.WebExtension.ProjectProjectFields={CurrencyDigits:0,CurrencySymbol:1,CurrencySymbolPosition:2,DurationUnits:3,GUID:4,Finish:5,Start:6,ReadOnly:7,VERSION:8,WorkUnits:9,ProjectServerUrl:10,WSSUrl:11,WSSList:12,Name:13,CurrentUser:14};OSF.DDA.ProjectDocument=function(b){OSF.DDA.ProjectDocument.uber.constructor.call(this,b);var a=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[a.GetSelectedDataAsync,a.GetSelectedTask,a.GetTask,a.GetTaskField,a.GetWSSUrl,a.GetSelectedResource,a.GetResourceField,a.GetProjectField,a.GetSelectedView,a.GetTaskByIndex,a.GetResourceByIndex,a.SetTaskField,a.SetResourceField,a.GetMaxTaskIndex,a.GetMaxResourceIndex,a.CreateTask]);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.TaskSelectionChanged,Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged,Microsoft.Office.WebExtension.EventType.ViewSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.ProjectDocument,OSF.DDA.Document);OSF.DDA.TaskSelectionChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.TaskSelectionChanged},document:{value:a}})};OSF.DDA.ResourceSelectionChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged},document:{value:a}})};OSF.DDA.ViewSelectionChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.ViewSelectionChanged},document:{value:a}})};OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(a,b){OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM);a.doc=new OSF.DDA.ProjectDocument(a,this._initializeSettings(false));b()};OSF.DDA.AsyncMethodNames.addNames({GetSelectedTask:"getSelectedTaskAsync",GetTask:"getTaskAsync",GetWSSUrl:"getWSSUrlAsync",GetTaskField:"getTaskFieldAsync",GetSelectedResource:"getSelectedResourceAsync",GetResourceField:"getResourceFieldAsync",GetProjectField:"getProjectFieldAsync",GetSelectedView:"getSelectedViewAsync",GetTaskByIndex:"getTaskByIndexAsync",GetResourceByIndex:"getResourceByIndexAsync",SetTaskField:"setTaskFieldAsync",SetResourceField:"setResourceFieldAsync",GetMaxTaskIndex:"getMaxTaskIndexAsync",GetMaxResourceIndex:"getMaxResourceIndexAsync",CreateTask:"createTaskAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedTask,onSucceeded:function(a){return a[Microsoft.Office.WebExtension.Parameters.TaskId]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetTaskByIndex,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TaskIndex,types:["number"]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(a){return a[Microsoft.Office.WebExtension.Parameters.TaskId]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetTask,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TaskId,types:["string"]}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetTaskField,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TaskId,types:["string"]},{name:Microsoft.Office.WebExtension.Parameters.FieldId,types:["number"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.GetRawValue,value:{types:["boolean"],defaultValue:false}},{name:Microsoft.Office.WebExtension.Parameters.CustomFieldId,value:{types:["string"],calculate:function(){return ""}}}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetResourceField,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ResourceId,types:["string"]},{name:Microsoft.Office.WebExtension.Parameters.FieldId,types:["number"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.GetRawValue,value:{types:["boolean"],defaultValue:false}},{name:Microsoft.Office.WebExtension.Parameters.CustomFieldId,value:{types:["string"],calculate:function(){return ""}}}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetProjectField,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FieldId,types:["number"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.GetRawValue,value:{types:["boolean"],defaultValue:false}}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedResource,onSucceeded:function(a){return a[Microsoft.Office.WebExtension.Parameters.ResourceId]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetResourceByIndex,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ResourceIndex,types:["number"]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(a){return a[Microsoft.Office.WebExtension.Parameters.ResourceId]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetWSSUrl});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedView});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetTaskField,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TaskId,types:["string"]},{name:Microsoft.Office.WebExtension.Parameters.FieldId,types:["number"]},{name:Microsoft.Office.WebExtension.Parameters.FieldValue,types:["object","string","number","boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CustomFieldId,value:{types:["string"],calculate:function(){return ""}}}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetResourceField,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ResourceId,types:["string"]},{name:Microsoft.Office.WebExtension.Parameters.FieldId,types:["number"]},{name:Microsoft.Office.WebExtension.Parameters.FieldValue,types:["object","string","number","boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CustomFieldId,value:{types:["string"],calculate:function(){return ""}}}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetMaxTaskIndex,onSucceeded:function(a){return a[Microsoft.Office.WebExtension.Parameters.TaskIndex]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetMaxResourceIndex,onSucceeded:function(a){return a[Microsoft.Office.WebExtension.Parameters.ResourceIndex]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CreateTask,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.TaskIndex,value:{types:["number"],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ItemName,value:{types:["string"],calculate:function(){return ""}}}],privateStateCallbacks:[],onSucceeded:function(a){return a[Microsoft.Office.WebExtension.Parameters.TaskId]}});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedTaskMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.TaskId,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetTaskByIndexMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.TaskId,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.TaskIndex,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetTaskMethod,fromHost:[{name:"taskName",value:0},{name:"wssTaskId",value:1},{name:"resourceNames",value:2}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.TaskId,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetTaskFieldMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.FieldValue,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.TaskId,value:0},{name:Microsoft.Office.WebExtension.Parameters.FieldId,value:1},{name:Microsoft.Office.WebExtension.Parameters.GetRawValue,value:2},{name:Microsoft.Office.WebExtension.Parameters.CustomFieldId,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetWSSUrlMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.ServerUrl,value:0},{name:Microsoft.Office.WebExtension.Parameters.ListName,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedResourceMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.ResourceId,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetResourceByIndexMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.ResourceId,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.ResourceIndex,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetResourceFieldMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.FieldValue,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.ResourceId,value:0},{name:Microsoft.Office.WebExtension.Parameters.FieldId,value:1},{name:Microsoft.Office.WebExtension.Parameters.GetRawValue,value:2},{name:Microsoft.Office.WebExtension.Parameters.CustomFieldId,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetProjectFieldMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.FieldValue,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.FieldId,value:0},{name:Microsoft.Office.WebExtension.Parameters.GetRawValue,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedViewMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.ViewType,value:0},{name:Microsoft.Office.WebExtension.Parameters.ViewName,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetTaskFieldMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.TaskId,value:0},{name:Microsoft.Office.WebExtension.Parameters.FieldId,value:1},{name:Microsoft.Office.WebExtension.Parameters.FieldValue,value:2},{name:Microsoft.Office.WebExtension.Parameters.CustomFieldId,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetResourceFieldMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.ResourceId,value:0},{name:Microsoft.Office.WebExtension.Parameters.FieldId,value:1},{name:Microsoft.Office.WebExtension.Parameters.FieldValue,value:2},{name:Microsoft.Office.WebExtension.Parameters.CustomFieldId,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetMaxTaskIndexMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.TaskIndex,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetMaxResourceIndexMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.ResourceIndex,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidCreateTaskMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.TaskId,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.TaskIndex,value:0},{name:Microsoft.Office.WebExtension.Parameters.ItemName,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidTaskSelectionChangedEvent});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidResourceSelectionChangedEvent});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidViewSelectionChangedEvent}) \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/pt-br/office_strings.debug.js b/node_modules/@microsoft/office-js/dist/pt-br/office_strings.debug.js index c565cd4..08c1166 100644 --- a/node_modules/@microsoft/office-js/dist/pt-br/office_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/pt-br/office_strings.debug.js @@ -1,179 +1,190 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("Strings"); Strings.OfficeOM = function() { }; Strings.OfficeOM.registerClass("Strings.OfficeOM"); -Strings.OfficeOM.L_EventHandlerRemovalFailed = "Falha ao remover o manipulador de eventos."; -Strings.OfficeOM.L_ConnectionFailureWithStatus = "A solicitação falhou com código de status {0}."; -Strings.OfficeOM.L_UnsupportedDataObject = "Não há suporte para o tipo de objeto de dados fornecido."; -Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "O tipo de coerção especificado não é compatível com este tipo de associação."; -Strings.OfficeOM.L_InvalidGrantMessage = "Concessão ausente para este suplemento."; -Strings.OfficeOM.L_DataNotMatchSelection = "O objeto de dados fornecido não é compatível com a forma ou as dimensões da seleção atual."; -Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Parâmetros de coordenadas não podem ser usados com a Tabela de tipo de coerção quando a tabela contém células mescladas."; -Strings.OfficeOM.L_InvalidNamedItemForBindingType = "O tipo de vinculação especificada não é compatível com o item nomeado fornecido."; -Strings.OfficeOM.L_InvalidSSOAddinMessage = "Não há suporte para a API de identidade deste suplemento."; -Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "O XPath limita a seleção a 1024 itens."; -Strings.OfficeOM.L_SettingsStaleError = "Erro de configurações obsoletos"; -Strings.OfficeOM.L_InvalidValue = "Valor Inválido"; -Strings.OfficeOM.L_ConnectionFailureWithDetails = "A solicitação falhou com código de status {0}, código de erro {1} e a seguinte mensagem de erro: {2}"; -Strings.OfficeOM.L_GetDataIsTooLarge = "O conjunto de dados solicitado é muito grande."; -Strings.OfficeOM.L_InvalidSetStartRowColumn = "Os valores startRow ou startColumn especificados são inválidos."; -Strings.OfficeOM.L_ElementMissing = "Não foi possível formatar a célula da tabela, pois faltam alguns valores de parâmetro. Verifique outra vez os parâmetros e tente novamente."; -Strings.OfficeOM.L_MissingParameter = "Parâmetro Ausente"; -Strings.OfficeOM.L_SettingsCannotSave = "Não foi possível salvar as configurações."; -Strings.OfficeOM.L_SSOServerErrorMessage = "Ocorreu um erro inesperado no servidor."; -Strings.OfficeOM.L_SelectionCannotBound = "Não é possível ligar à seleção atual."; -Strings.OfficeOM.L_InvalidSetRows = "As linhas especificadas são inválidas."; -Strings.OfficeOM.L_InvalidBinding = "Associação Inválida"; -Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Limite de Seleção Atingido"; +Strings.OfficeOM.L_CustomFunctionImplementationMissing = "A propriedade com este nome no Excel.CustomFunctions que representa a definição da função deve conter uma propriedade 'call' que implementa a função."; +Strings.OfficeOM.L_InvalidCellsValue = "Um ou mais parâmetros de célula têm valores que não são permitidos. Verifique outra vez os valores e tente novamente."; +Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "O conteúdo selecionado precisa estar em formato de tabela. Formate os dados como uma tabela e tente novamente."; +Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Chame closeAsync no arquivo atual antes de recuperar outro."; +Strings.OfficeOM.L_UserClickIgnore = "O usuário optou por ignorar a caixa de diálogo."; Strings.OfficeOM.L_OsfControlTypeNotSupported = "O tipo OsfControl não tem suporte."; -Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Observação: é recomendável que os conjuntos de formatação definidos por uma chamada de API de formatação não ultrapassem 100."; -Strings.OfficeOM.L_SelectionNotSupportCoercionType = "A seleção atual não tem suporte para o tipo de coerção especificado."; Strings.OfficeOM.L_UnsupportedUserIdentity = "Não há suporte para o tipo de identidade do usuário."; -Strings.OfficeOM.L_NoCapability = "Você não tem permissões suficientes para esta ação."; -Strings.OfficeOM.L_UserAbortedMessage = "O usuário não consentiu as permissões do suplemento."; -Strings.OfficeOM.L_SaveSettingsError = "Salvar erro de configurações"; -Strings.OfficeOM.L_DataNotMatchCoercionType = "O tipo do objeto de dados especificado não é compatível com a seleção atual."; +Strings.OfficeOM.L_ReadSettingsError = "Erro de leitura de configurações"; Strings.OfficeOM.L_IndexOutOfRange = "Ãndice fora do intervalo."; -Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "O conteúdo selecionado precisa estar em formato de tabela. Formate os dados como uma tabela e tente novamente."; -Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Os valores rowCount e columnCount especificados são inválidos."; -Strings.OfficeOM.L_RedundantCallbackSpecification = "O retorno de chamada não pode ser especificado na lista de argumentos e no objeto opcional."; -Strings.OfficeOM.L_NewWindowCrossZone = "As configurações de segurança do navegador nos impedem de criar uma caixa de diálogo. Tente outro navegador ou {0} para que '{1}' e o domínio mostrado na barra de endereço estejam na mesma zona de segurança."; -Strings.OfficeOM.L_InvalidArgument = "O argumento '{0}' não funciona nesta situação, está ausente ou não está no formato correto."; -Strings.OfficeOM.L_InvalidApiCallInContext = "Chamada de API inválida no contexto atual."; -Strings.OfficeOM.L_CustomXmlOutOfDateName = "Dados Desatualizados"; -Strings.OfficeOM.L_APINotSupported = "API sem Suporte"; -Strings.OfficeOM.L_InvalidDataObject = "Objeto de dados inválido"; -Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Chame closeAsync no arquivo atual antes de recuperar outro."; +Strings.OfficeOM.L_FormatValueOutOfRange = "O valor está fora do intervalo permitido."; +Strings.OfficeOM.L_InvalidFormat = "Erro de formato inválido"; +Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "O aplicativo {0} não existe. Microsoft.Office.WebExtension.Initialize(reason) não é chamado."; +Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Faça uma seleção."; +Strings.OfficeOM.L_ConnectionFailureWithDetails = "A solicitação falhou com código de status {0}, código de erro {1} e a seguinte mensagem de erro: {2}"; +Strings.OfficeOM.L_APICallFailed = "Falha na Chamada à API"; +Strings.OfficeOM.L_NoCapability = "Você não tem permissões suficientes para esta ação."; +Strings.OfficeOM.L_PropertyNotLoaded = "A propriedade '{0}' não está disponível. Antes de ler o valor da propriedade, chame o método de carregamento no objeto contentor e chame \"context.sync()\" no contexto de solicitação associada."; +Strings.OfficeOM.L_InvalidReadForBlankRow = "A linha especificada está em branco."; +Strings.OfficeOM.L_FunctionCallFailed = "Falha na chamada de função {0}, código de erro: {1}."; +Strings.OfficeOM.L_DialogOK = "OK"; +Strings.OfficeOM.L_InvalidSetStartRowColumn = "Os valores startRow ou startColumn especificados são inválidos."; Strings.OfficeOM.L_NotSupportedEventType = "Não há suporte para o tipo de evento especificado {0}."; -Strings.OfficeOM.L_DialogAlreadyOpened = "A operação falhou porque este suplemento já possui uma caixa de diálogo ativa."; -Strings.OfficeOM.L_InternalErrorDescription = "Ocorreu um erro interno."; -Strings.OfficeOM.L_InvalidResourceUrlMessage = "A URL do recurso indicada no manifesto é inválida."; -Strings.OfficeOM.L_GetSelectionNotSupported = "A seleção atual não tem suporte."; -Strings.OfficeOM.L_RunMustReturnPromise = 'A função de lote passada para o método ".run" não retornou uma promessa. A função deve retornar uma promessa para que todos os objetos rastreados automaticamente possam ser liberados na conclusão da operação em lote. Normalmente, você deve retornar uma promessa enviando a resposta de "context.sync()".'; -Strings.OfficeOM.L_BindingCreationError = "Erro de criação de ligação"; -Strings.OfficeOM.L_TooManyIncompleteRequests = "Aguarde até que a chamada anterior for concluída."; -Strings.OfficeOM.L_DataNotMatchBindingType = "O objeto de dados especificado não é compatível com o tipo de ligação."; -Strings.OfficeOM.L_InvalidGetColumns = "As colunas especificadas são inválidas."; +Strings.OfficeOM.L_InvalidOperationInCellEditMode = "O Excel está em modo de edição de célula. Saia do modo de edição pressionando ENTER ou TAB ou selecionando outra célula e tente novamente."; +Strings.OfficeOM.L_InvalidSSOAddinMessage = "Não há suporte para a API de identidade deste suplemento."; +Strings.OfficeOM.L_NewWindowCrossZone = "As configurações de segurança do navegador nos impedem de criar uma caixa de diálogo. Tente outro navegador ou {0} para que '{1}' e o domínio mostrado na barra de endereço estejam na mesma zona de segurança."; Strings.OfficeOM.L_InvalidColumnsForBinding = "As colunas especificadas são inválidas."; +Strings.OfficeOM.L_InvalidAPICall = "Chamada de API inválida"; +Strings.OfficeOM.L_OverwriteWorksheetData = "A operação definida falhou porque o objeto de dados fornecido irá sobrescrever ou deslocar os dados."; +Strings.OfficeOM.L_ActivityLimitReached = "O limite de atividade foi atingido."; +Strings.OfficeOM.L_UnsupportedEnumerationMessage = "A enumeração não tem suporte no aplicativo host atual."; +Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "Sua sessão do Office Online expirou ou é inválida. Para continuar, atualize a página."; +Strings.OfficeOM.L_InvalidSetRows = "As linhas especificadas são inválidas."; +Strings.OfficeOM.L_InternalErrorDescription = "Ocorreu um erro interno."; +Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Permitir"; +Strings.OfficeOM.L_CustomFunctionNameContainsBadChars = "O nome da função pode conter apenas letras, dígitos, sublinhados e pontos."; +Strings.OfficeOM.L_GetDataIsTooLarge = "O conjunto de dados solicitado é muito grande."; +Strings.OfficeOM.L_CoercionTypeNotSupported = "O tipo de coerção especificado não tem suporte."; +Strings.OfficeOM.L_InvalidValue = "Valor Inválido"; +Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Os valores rowCount e columnCount especificados são inválidos."; +Strings.OfficeOM.L_ConnectionFailureWithStatus = "A solicitação falhou com código de status {0}."; +Strings.OfficeOM.L_RequestTokenUnavailable = "Esta API foi limitada para reduzir a frequência de chamada."; Strings.OfficeOM.L_CallbackNotAFunction = "O retorno de chamada deve ser do tipo função, era do tipo {0}."; -Strings.OfficeOM.L_BadSelectorString = "A cadeia de caracteres passada para o seletor está formatada incorretamente ou não tem suporte."; -Strings.OfficeOM.L_BindingNotExist = "A ligação especificada não existe."; -Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Os dados estão desatualizados. Recupere o objeto novamente."; -Strings.OfficeOM.L_DialogAddressNotTrusted = "O domínio da URL não está incluído no elemento AppDomains no manifesto."; -Strings.OfficeOM.L_RowIndexOutOfRange = "O valor de índice de linha está fora do intervalo permitido. Use um valor (0 ou superior) que seja menor do que o número de linhas."; -Strings.OfficeOM.L_NamedItemNotFound = "O item nomeado não existe."; -Strings.OfficeOM.L_OutOfRange = "Fora do Intervalo"; -Strings.OfficeOM.L_InValidOptionalArgument = "argumento opcional inválido"; -Strings.OfficeOM.L_MemoryLimit = "Limite de Memória Excedido"; -Strings.OfficeOM.L_DialogOK = "OK"; -Strings.OfficeOM.L_TooManyOptionalObjects = "vários objetos opcionais na lista de parâmetros"; -Strings.OfficeOM.L_EventHandlerAdditionFailed = "Falha ao adicionar o manipulador de eventos."; -Strings.OfficeOM.L_InvalidDataFormat = "O formato do objeto de dados especificado é inválido."; -Strings.OfficeOM.L_InvalidReadForBlankRow = "A linha especificada está em branco."; -Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = "Altera a propriedade '{0}' que não pode ser aplicada por meio de um método \"object.set\"."; -Strings.OfficeOM.L_SSOClientErrorMessage = "Ocorreu um erro inesperado no cliente."; -Strings.OfficeOM.L_InvalidBindingOperation = "Operação de Associação Inválida"; -Strings.OfficeOM.L_CustomXmlNodeNotFound = "O nó especificado não foi encontrado."; Strings.OfficeOM.L_CannotWriteToSelection = "Não é possível gravar na seleção atual."; -Strings.OfficeOM.L_DataWriteReminder = "Lembrete de Gravação de Dados"; -Strings.OfficeOM.L_InvalidCoercion = "Tipo inválido de coerção"; -Strings.OfficeOM.L_MissingRequiredArguments = "alguns argumentos necessários ausentes"; -Strings.OfficeOM.L_Timeout = "Tempo limite da operação atingido."; -Strings.OfficeOM.L_SSOClientError = "Ocorreu um erro na solicitação de autenticação do Office."; -Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Não há suporte para o tipo de identidade do usuário."; -Strings.OfficeOM.L_GetDataParametersConflict = "Os parâmetros especificados estão em conflito."; -Strings.OfficeOM.L_ValueNotLoaded = 'O valor do objeto do resultado ainda não foi carregado. Antes de ler a propriedade value, chamada "context.sync()" no contexto de solicitação associada.'; -Strings.OfficeOM.L_PermissionDenied = "Permissão negada"; -Strings.OfficeOM.L_OperationNotSupported = "A operação não é suportada."; -Strings.OfficeOM.L_PropertyDoesNotExist = "Propriedade '{0}' não existe no objeto."; -Strings.OfficeOM.L_OverwriteWorksheetData = "A operação definida falhou porque o objeto de dados fornecido irá sobrescrever ou deslocar os dados."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "A operação falhou porque este suplemento já está solicitando um token de acesso."; -Strings.OfficeOM.L_TooManyOptionalFunction = "várias funções opcionais na lista de parâmetros"; -Strings.OfficeOM.L_FunctionCallFailed = "Falha na chamada de função {0}, código de erro: {1}."; -Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "Tentativa de definir a propriedade somente leitura '{0}'."; -Strings.OfficeOM.L_NetworkProblem = "Problema de Rede"; -Strings.OfficeOM.L_TooManyArguments = "muitos argumentos"; -Strings.OfficeOM.L_UnsupportedEnumeration = "Enumeração sem Suporte"; -Strings.OfficeOM.L_RequestTimeout = "A chamada demorou muito tempo para executar."; Strings.OfficeOM.L_InvalidGetStartRowColumn = "Os valores startRow ou startColumn especificados são inválidos."; -Strings.OfficeOM.L_DataStale = "Dados Não Atuais"; -Strings.OfficeOM.L_InvalidBindingError = "Erro de Associação Inválida"; -Strings.OfficeOM.L_SetDataIsTooLarge = "O objeto de dados especificado é muito grande."; -Strings.OfficeOM.L_InvalidNode = "Nó Inválido"; -Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Faça uma seleção."; -Strings.OfficeOM.L_InvalidGetRows = "As linhas especificadas são inválidas."; -Strings.OfficeOM.L_SliceSizeNotSupported = "O tamanho da fatia especificado não tem suporte."; +Strings.OfficeOM.L_DisplayDialogError = "Exibir Erro do Diálogo"; +Strings.OfficeOM.L_SSOServerErrorMessage = "Ocorreu um erro inesperado no servidor."; +Strings.OfficeOM.L_SelectionCannotBound = "Não é possível ligar à seleção atual."; +Strings.OfficeOM.L_ApiNotFoundDetails = "O método ou a propriedade {0} é parte do conjunto de requisitos da {1} que não está disponível em sua versão do {2}."; +Strings.OfficeOM.L_UnsupportedDataObject = "Não há suporte para o tipo de objeto de dados fornecido."; +Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "As restrições do navegador nos impediram de criar a caixa de diálogo. O domínio da caixa de diálogo e o domínio do host do suplemento não estão na mesma zona de segurança."; +Strings.OfficeOM.L_InternalError = "Erro interno"; Strings.OfficeOM.L_InvalidParameters = "A função {0} possui parâmetros inválidos."; -Strings.OfficeOM.L_ShowWindowDialogNotification = "O {0} deseja exibir uma nova janela."; -Strings.OfficeOM.L_InvalidAPICall = "Chamada de API inválida"; -Strings.OfficeOM.L_DataWriteError = "Erro de gravação de dados"; -Strings.OfficeOM.L_InvalidTableOptionValue = "Um ou mais parâmetros tableOptions tem valores que não são permitidos. Verifique outra vez os valores e tente novamente."; +Strings.OfficeOM.L_DialogAddressNotTrusted = "O domínio da URL não está incluído no elemento AppDomains no manifesto."; +Strings.OfficeOM.L_FormattingReminder = "Lembrete de Formatação"; +Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "Tentativa de definir a propriedade somente leitura '{0}'."; +Strings.OfficeOM.L_RequestTimeout = "A chamada demorou muito tempo para executar."; Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Operação sem suporte neste tipo de associação."; -Strings.OfficeOM.L_SettingsAreStale = "As configurações não puderam ser salvas porque não são atuais."; -Strings.OfficeOM.L_UserClickIgnore = "O usuário optou por ignorar a caixa de diálogo."; +Strings.OfficeOM.L_NetworkProblem = "Problema de Rede"; +Strings.OfficeOM.L_EventRegistrationError = "Erro de registro de eventos"; +Strings.OfficeOM.L_SetDataIsTooLarge = "O objeto de dados especificado é muito grande."; +Strings.OfficeOM.L_OutOfRange = "Fora do Intervalo"; +Strings.OfficeOM.L_CustomXmlNodeNotFound = "O nó especificado não foi encontrado."; Strings.OfficeOM.L_InvalidGrant = "Faltando pré-autorização."; -Strings.OfficeOM.L_InvalidSelectionForBindingType = "Não é possível criar uma ligação com a seleção atual e o tipo de ligação especificada."; -Strings.OfficeOM.L_HostError = "Erro de host"; -Strings.OfficeOM.L_UserAborted = "O usuário anulou a solicitação de consentimento."; -Strings.OfficeOM.L_SSOServerError = "Ocorreu um erro no provedor de autenticação."; -Strings.OfficeOM.L_UnsupportedEnumerationMessage = "A enumeração não tem suporte no aplicativo host atual."; -Strings.OfficeOM.L_InvalidArgumentGeneric = "Os argumentos passados para a função não funcionam com essa situação, estão ausentes ou não estão no formato correto."; +Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Parâmetros de coordenadas não podem ser usados com a Tabela de tipo de coerção quando a tabela contém células mescladas."; +Strings.OfficeOM.L_InvalidArgument = "O argumento '{0}' não funciona nesta situação, está ausente ou não está no formato correto."; +Strings.OfficeOM.L_MissingRequiredArguments = "alguns argumentos necessários ausentes"; +Strings.OfficeOM.L_CannotNavigateTo = "O objeto está localizado em um local onde a navegação não é suportada."; +Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Os dados estão desatualizados. Recupere o objeto novamente."; +Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Observação: é recomendável que o número de células em uma tabela não ultrapasse 20.000 células."; +Strings.OfficeOM.L_InvalidBindingError = "Erro de Associação Inválida"; +Strings.OfficeOM.L_InitializeNotReady = "O Office.js ainda não está totalmente carregado. Tente novamente mais tarde ou verifique se você adicionou seu código de inicialização na função Office.initialize."; +Strings.OfficeOM.L_InvalidResourceUrlMessage = "A URL do recurso indicada no manifesto é inválida."; +Strings.OfficeOM.L_TooManyIncompleteRequests = "Aguarde até que a chamada anterior for concluída."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "O suplemento já está solicitando um token de acesso."; +Strings.OfficeOM.L_ColIndexOutOfRange = "O valor de índice de coluna está fora do intervalo permitido. Use um valor (0 ou superior) que seja menor do que o número de colunas."; +Strings.OfficeOM.L_InvalidDataFormat = "O formato do objeto de dados especificado é inválido."; +Strings.OfficeOM.L_DialogNavigateError = "Erro de Navegação do Diálogo"; +Strings.OfficeOM.L_CustomXmlOutOfDateName = "Dados Desatualizados"; Strings.OfficeOM.L_InvalidOrTimedOutSession = "Sessão Inválida ou com Tempo Limite Excedido"; -Strings.OfficeOM.L_FileTypeNotSupported = "O tipo de arquivo especificado não tem suporte."; +Strings.OfficeOM.L_DialogAlreadyOpened = "A operação falhou porque este suplemento já possui uma caixa de diálogo ativa."; +Strings.OfficeOM.L_InvalidFormatValue = "Um ou mais parâmetros de formato têm valores que não são permitidos. Verifique outra vez os valores e tente novamente."; +Strings.OfficeOM.L_NotSupported = "Função {0} não é suportada."; +Strings.OfficeOM.L_PermissionDenied = "Permissão negada"; +Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Não há suporte para o tipo de identidade do usuário."; +Strings.OfficeOM.L_MultipleNamedItemFound = "Foram encontrados vários objetos com o mesmo nome."; +Strings.OfficeOM.L_NamedItemNotFound = "O item nomeado não existe."; +Strings.OfficeOM.L_CustomFunctionNameCannotSplit = "O nome da função deve conter um namespace não vazio e um nome curto não vazio."; +Strings.OfficeOM.L_InvalidResourceUrl = "A URL do recurso do aplicativo fornecida é inválida."; +Strings.OfficeOM.L_SettingsStaleError = "Erro de configurações obsoletos"; +Strings.OfficeOM.L_ElementMissing = "Não foi possível formatar a célula da tabela, pois faltam alguns valores de parâmetro. Verifique outra vez os parâmetros e tente novamente."; +Strings.OfficeOM.L_InvalidSelectionForBindingType = "Não é possível criar uma ligação com a seleção atual e o tipo de ligação especificada."; +Strings.OfficeOM.L_CustomXmlError = "Erro no XML personalizado."; +Strings.OfficeOM.L_SSOConnectionLostError = "A connection was lost during the sign in process."; +Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Limite de Seleção Atingido"; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory = "Este suplemento não dá suporte ao consentimento do usuário."; Strings.OfficeOM.L_InvalidObjectPath = 'O caminho do objeto \'{0}\' não está funcionando para o que você está tentando fazer. Se você estiver usando o objeto em várias chamadas de "context.sync" e fora da execução sequencial de um lote ".run", use os métodos "context.trackedObjects.add()" e "context.trackedObjects.remove()" para gerenciar o tempo de vida do objeto.'; Strings.OfficeOM.L_DataNotMatchBindingSize = "O objeto de dados fornecido não corresponde ao tamanho da seleção atual."; -Strings.OfficeOM.L_DialogInvalidScheme = "Não há suporte para o esquema de URL. Use HTTPS."; -Strings.OfficeOM.L_NotSupportedBindingType = "Não há suporte para o tipo de ligação especificado {0}."; +Strings.OfficeOM.L_InvalidCoercion = "Tipo inválido de coerção"; +Strings.OfficeOM.L_InvalidNode = "Nó Inválido"; +Strings.OfficeOM.L_InvalidBindingOperation = "Operação de Associação Inválida"; +Strings.OfficeOM.L_InvalidGetRows = "As linhas especificadas são inválidas."; Strings.OfficeOM.L_DialogRequireHTTPS = "Não há suporte para o protocolo HTTP. Use HTTPS"; -Strings.OfficeOM.L_UserNotSignedIn = "Nenhum usuário está conectado ao Office."; +Strings.OfficeOM.L_BindingNotExist = "A ligação especificada não existe."; +Strings.OfficeOM.L_InvalidTableOptionValue = "Um ou mais parâmetros tableOptions tem valores que não são permitidos. Verifique outra vez os valores e tente novamente."; Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Um problema de rede impediu a recuperação do arquivo."; -Strings.OfficeOM.L_SpecifiedIdNotExist = "A ID especificada não existe."; -Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Parâmetros de coordenadas não podem ser usados com a Tabela de tipo de coerção quando a tabela contém células mescladas."; -Strings.OfficeOM.L_MultipleNamedItemFound = "Foram encontrados vários objetos com o mesmo nome."; -Strings.OfficeOM.L_EventRegistrationError = "Erro de registro de eventos"; +Strings.OfficeOM.L_UserNotSignedIn = "Nenhum usuário está conectado ao Office."; +Strings.OfficeOM.L_NotSupportedBindingType = "Não há suporte para o tipo de ligação especificado {0}."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "A operação falhou porque este suplemento já está solicitando um token de acesso."; +Strings.OfficeOM.L_GetSelectionNotSupported = "A seleção atual não tem suporte."; +Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "O XPath limita a seleção a 1024 itens."; +Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = "Altera a propriedade '{0}' que não pode ser aplicada por meio de um método \"object.set\"."; +Strings.OfficeOM.L_SettingsCannotSave = "Não foi possível salvar as configurações."; Strings.OfficeOM.L_NotImplemented = "A função {0} não está implementada."; -Strings.OfficeOM.L_BindingToMultipleSelection = "Não há suporte para várias seleções não contíguas."; -Strings.OfficeOM.L_EventHandlerNotExist = "O manipulador de eventos especificado não foi encontrado para esta associação."; -Strings.OfficeOM.L_AppNameNotExist = "O Nome de Suplemento de {0} não existe."; -Strings.OfficeOM.L_InvalidCellsValue = "Um ou mais parâmetros de célula têm valores que não são permitidos. Verifique outra vez os valores e tente novamente."; -Strings.OfficeOM.L_InternalError = "Erro interno"; -Strings.OfficeOM.L_InvalidRequestContext = "Não é possível usar o objeto em contextos de solicitação diferentes."; +Strings.OfficeOM.L_TooManyOptionalObjects = "vários objetos opcionais na lista de parâmetros"; +Strings.OfficeOM.L_DataReadError = "Erro de leitura de dados"; +Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Parâmetros de coordenadas não podem ser usados com a Tabela de tipo de coerção quando a tabela contém células mescladas."; +Strings.OfficeOM.L_SelectionNotSupportCoercionType = "A seleção atual não tem suporte para o tipo de coerção especificado."; +Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "configure o seu navegador"; +Strings.OfficeOM.L_DataWriteError = "Erro de gravação de dados"; +Strings.OfficeOM.L_CannotRegisterEvent = "Não é possível registrar o manipulador de eventos."; +Strings.OfficeOM.L_HostError = "Erro de host"; +Strings.OfficeOM.L_EventHandlerAdditionFailed = "Falha ao adicionar o manipulador de eventos."; Strings.OfficeOM.L_DocumentReadOnly = "A operação solicitada não é permitida no modo de documento atual."; -Strings.OfficeOM.L_APICallFailed = "Falha na Chamada à API"; -Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Permitir"; -Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "O suplemento já está solicitando um token de acesso."; +Strings.OfficeOM.L_UnknownBindingType = "Não há suporte para o tipo de vinculação."; +Strings.OfficeOM.L_DataNotMatchSelection = "O objeto de dados fornecido não é compatível com a forma ou as dimensões da seleção atual."; +Strings.OfficeOM.L_DialogInvalidScheme = "Não há suporte para o esquema de URL. Use HTTPS."; +Strings.OfficeOM.L_ValueNotLoaded = 'O valor do objeto do resultado ainda não foi carregado. Antes de ler a propriedade value, chamada "context.sync()" no contexto de solicitação associada.'; +Strings.OfficeOM.L_DataWriteReminder = "Lembrete de Gravação de Dados"; +Strings.OfficeOM.L_SettingsAreStale = "As configurações não puderam ser salvas porque não são atuais."; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage = "A operação falhou porque este suplemento não dá suporte ao consentimento do usuário nesta categoria"; +Strings.OfficeOM.L_DataStale = "Dados Não Atuais"; +Strings.OfficeOM.L_InvalidGetColumns = "As colunas especificadas são inválidas."; +Strings.OfficeOM.L_SpecifiedIdNotExist = "A ID especificada não existe."; +Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Observação: é recomendável que os conjuntos de formatação definidos por uma chamada de API de formatação não ultrapassem 100."; +Strings.OfficeOM.L_InvalidRequestContext = "Não é possível usar o objeto em contextos de solicitação diferentes."; +Strings.OfficeOM.L_BindingCreationError = "Erro de criação de ligação"; +Strings.OfficeOM.L_SSOServerError = "Ocorreu um erro no provedor de autenticação."; +Strings.OfficeOM.L_RedundantCallbackSpecification = "O retorno de chamada não pode ser especificado na lista de argumentos e no objeto opcional."; +Strings.OfficeOM.L_CustomFunctionDefinitionMissing = "Uma propriedade com este nome que representa a definição da função deve existir em Excel.CustomFunctions."; +Strings.OfficeOM.L_APINotSupported = "API sem Suporte"; +Strings.OfficeOM.L_BadSelectorString = "A cadeia de caracteres passada para o seletor está formatada incorretamente ou não tem suporte."; +Strings.OfficeOM.L_SaveSettingsError = "Salvar erro de configurações"; +Strings.OfficeOM.L_EventHandlerRemovalFailed = "Falha ao remover o manipulador de eventos."; +Strings.OfficeOM.L_InvalidGrantMessage = "Concessão ausente para este suplemento."; +Strings.OfficeOM.L_ShowWindowDialogNotification = "O {0} deseja exibir uma nova janela."; +Strings.OfficeOM.L_UnsupportedEnumeration = "Enumeração sem Suporte"; +Strings.OfficeOM.L_MemoryLimit = "Limite de Memória Excedido"; +Strings.OfficeOM.L_SSOConnectionLostErrorMessage = "A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones."; +Strings.OfficeOM.L_InvalidApiCallInContext = "Chamada de API inválida no contexto atual."; +Strings.OfficeOM.L_TooManyArguments = "muitos argumentos"; +Strings.OfficeOM.L_AppNameNotExist = "O Nome de Suplemento de {0} não existe."; +Strings.OfficeOM.L_MissingParameter = "Parâmetro Ausente"; +Strings.OfficeOM.L_InvalidBinding = "Associação Inválida"; Strings.OfficeOM.L_ShuttingDown = "Falha na operação porque os dados não são atuais no servidor."; -Strings.OfficeOM.L_NotSupported = "Função {0} não é suportada."; -Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "Sua sessão do Office Online expirou ou é inválida. Para continuar, atualize a página."; -Strings.OfficeOM.L_InvalidFormat = "Erro de formato inválido"; -Strings.OfficeOM.L_ActivityLimitReached = "O limite de atividade foi atingido."; +Strings.OfficeOM.L_RunMustReturnPromise = 'A função de lote passada para o método ".run" não retornou uma promessa. A função deve retornar uma promessa para que todos os objetos rastreados automaticamente possam ser liberados na conclusão da operação em lote. Normalmente, você deve retornar uma promessa enviando a resposta de "context.sync()".'; +Strings.OfficeOM.L_BindingToMultipleSelection = "Não há suporte para várias seleções não contíguas."; +Strings.OfficeOM.L_FileTypeNotSupported = "O tipo de arquivo especificado não tem suporte."; +Strings.OfficeOM.L_TooManyOptionalFunction = "várias funções opcionais na lista de parâmetros"; +Strings.OfficeOM.L_RowIndexOutOfRange = "O valor de índice de linha está fora do intervalo permitido. Use um valor (0 ou superior) que seja menor do que o número de linhas."; +Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Argumentos de entrada inválidos."; +Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Ignorar"; +Strings.OfficeOM.L_InValidOptionalArgument = "argumento opcional inválido"; +Strings.OfficeOM.L_InvalidNamedItemForBindingType = "O tipo de vinculação especificada não é compatível com o item nomeado fornecido."; +Strings.OfficeOM.L_OperationNotSupported = "A operação não é suportada."; +Strings.OfficeOM.L_Timeout = "Tempo limite da operação atingido."; +Strings.OfficeOM.L_SSOClientErrorMessage = "Ocorreu um erro inesperado no cliente."; +Strings.OfficeOM.L_SSOClientError = "Ocorreu um erro na solicitação de autenticação do Office."; +Strings.OfficeOM.L_GetDataParametersConflict = "Os parâmetros especificados estão em conflito."; +Strings.OfficeOM.L_EventHandlerNotExist = "O manipulador de eventos especificado não foi encontrado para esta associação."; +Strings.OfficeOM.L_DataNotMatchCoercionType = "O tipo do objeto de dados especificado não é compatível com a seleção atual."; Strings.OfficeOM.L_InvalidSetColumns = "As colunas especificadas são inválidas."; +Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "O tipo de coerção especificado não é compatível com este tipo de associação."; +Strings.OfficeOM.L_SettingNameNotExist = "O nome de configuração especificado não existe."; +Strings.OfficeOM.L_BrowserAPINotSupported = "Este navegador não oferece suporte para a API solicitada."; +Strings.OfficeOM.L_DataNotMatchBindingType = "O objeto de dados especificado não é compatível com o tipo de ligação."; +Strings.OfficeOM.L_SliceSizeNotSupported = "O tamanho da fatia especificado não tem suporte."; +Strings.OfficeOM.L_PropertyDoesNotExist = "Propriedade '{0}' não existe no objeto."; +Strings.OfficeOM.L_UserAborted = "O usuário anulou a solicitação de consentimento."; Strings.OfficeOM.L_NavOutOfBound = "A operação falhou porque o índice está fora do intervalo."; +Strings.OfficeOM.L_InvalidDataObject = "Objeto de dados inválido"; +Strings.OfficeOM.L_InvalidArgumentGeneric = "Os argumentos passados para a função não funcionam com essa situação, estão ausentes ou não estão no formato correto."; Strings.OfficeOM.L_SetDataParametersConflict = "Os parâmetros especificados estão em conflito."; -Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Observação: é recomendável que o número de células em uma tabela não ultrapasse 20.000 células."; -Strings.OfficeOM.L_DisplayDialogError = "Exibir Erro do Diálogo"; -Strings.OfficeOM.L_DataReadError = "Erro de leitura de dados"; -Strings.OfficeOM.L_CoercionTypeNotSupported = "O tipo de coerção especificado não tem suporte."; -Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "configure o seu navegador"; -Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Ignorar"; -Strings.OfficeOM.L_CannotRegisterEvent = "Não é possível registrar o manipulador de eventos."; -Strings.OfficeOM.L_RequestTokenUnavailable = "Esta API foi limitada para reduzir a frequência de chamada."; -Strings.OfficeOM.L_InvalidFormatValue = "Um ou mais parâmetros de formato têm valores que não são permitidos. Verifique outra vez os valores e tente novamente."; -Strings.OfficeOM.L_FormatValueOutOfRange = "O valor está fora do intervalo permitido."; -Strings.OfficeOM.L_ColIndexOutOfRange = "O valor de índice de coluna está fora do intervalo permitido. Use um valor (0 ou superior) que seja menor do que o número de colunas."; -Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "O aplicativo {0} não existe. Microsoft.Office.WebExtension.Initialize(reason) não é chamado."; -Strings.OfficeOM.L_FormattingReminder = "Lembrete de Formatação"; -Strings.OfficeOM.L_InvalidResourceUrl = "A URL do recurso do aplicativo fornecida é inválida."; -Strings.OfficeOM.L_DialogNavigateError = "Erro de Navegação do Diálogo"; -Strings.OfficeOM.L_ReadSettingsError = "Erro de leitura de configurações"; -Strings.OfficeOM.L_CustomXmlError = "Erro no XML personalizado."; -Strings.OfficeOM.L_CannotNavigateTo = "O objeto está localizado em um local onde a navegação não é suportada."; -Strings.OfficeOM.L_BrowserAPINotSupported = "Este navegador não oferece suporte para a API solicitada."; -Strings.OfficeOM.L_SettingNameNotExist = "O nome de configuração especificado não existe."; -Strings.OfficeOM.L_InitializeNotReady = "O Office.js ainda não está totalmente carregado. Tente novamente mais tarde ou verifique se você adicionou seu código de inicialização na função Office.initialize."; -Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Argumentos de entrada inválidos."; -Strings.OfficeOM.L_UnknownBindingType = "Não há suporte para o tipo de vinculação."; -Strings.OfficeOM.L_PropertyNotLoaded = "A propriedade '{0}' não está disponível. Antes de ler o valor da propriedade, chame o método de carregamento no objeto contentor e chame \"context.sync()\" no contexto de solicitação associada."; -Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "As restrições do navegador nos impediram de criar a caixa de diálogo. O domínio da caixa de diálogo e o domínio do host do suplemento não estão na mesma zona de segurança." +Strings.OfficeOM.L_UserAbortedMessage = "O usuário não consentiu as permissões do suplemento." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/pt-br/office_strings.js b/node_modules/@microsoft/office-js/dist/pt-br/office_strings.js index 86e8595..1b6aa34 100644 --- a/node_modules/@microsoft/office-js/dist/pt-br/office_strings.js +++ b/node_modules/@microsoft/office-js/dist/pt-br/office_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_EventHandlerRemovalFailed="Falha ao remover o manipulador de eventos.";Strings.OfficeOM.L_ConnectionFailureWithStatus="A solicitação falhou com código de status {0}.";Strings.OfficeOM.L_UnsupportedDataObject="Não há suporte para o tipo de objeto de dados fornecido.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="O tipo de coerção especificado não é compatível com este tipo de associação.";Strings.OfficeOM.L_InvalidGrantMessage="Concessão ausente para este suplemento.";Strings.OfficeOM.L_DataNotMatchSelection="O objeto de dados fornecido não é compatível com a forma ou as dimensões da seleção atual.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Parâmetros de coordenadas não podem ser usados com a Tabela de tipo de coerção quando a tabela contém células mescladas.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="O tipo de vinculação especificada não é compatível com o item nomeado fornecido.";Strings.OfficeOM.L_InvalidSSOAddinMessage="Não há suporte para a API de identidade deste suplemento.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="O XPath limita a seleção a 1024 itens.";Strings.OfficeOM.L_SettingsStaleError="Erro de configurações obsoletos";Strings.OfficeOM.L_InvalidValue="Valor Inválido";Strings.OfficeOM.L_ConnectionFailureWithDetails="A solicitação falhou com código de status {0}, código de erro {1} e a seguinte mensagem de erro: {2}";Strings.OfficeOM.L_GetDataIsTooLarge="O conjunto de dados solicitado é muito grande.";Strings.OfficeOM.L_InvalidSetStartRowColumn="Os valores startRow ou startColumn especificados são inválidos.";Strings.OfficeOM.L_ElementMissing="Não foi possível formatar a célula da tabela, pois faltam alguns valores de parâmetro. Verifique outra vez os parâmetros e tente novamente.";Strings.OfficeOM.L_MissingParameter="Parâmetro Ausente";Strings.OfficeOM.L_SettingsCannotSave="Não foi possível salvar as configurações.";Strings.OfficeOM.L_SSOServerErrorMessage="Ocorreu um erro inesperado no servidor.";Strings.OfficeOM.L_SelectionCannotBound="Não é possível ligar à seleção atual.";Strings.OfficeOM.L_InvalidSetRows="As linhas especificadas são inválidas.";Strings.OfficeOM.L_InvalidBinding="Associação Inválida";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Limite de Seleção Atingido";Strings.OfficeOM.L_OsfControlTypeNotSupported="O tipo OsfControl não tem suporte.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Observação: é recomendável que os conjuntos de formatação definidos por uma chamada de API de formatação não ultrapassem 100.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="A seleção atual não tem suporte para o tipo de coerção especificado.";Strings.OfficeOM.L_UnsupportedUserIdentity="Não há suporte para o tipo de identidade do usuário.";Strings.OfficeOM.L_NoCapability="Você não tem permissões suficientes para esta ação.";Strings.OfficeOM.L_UserAbortedMessage="O usuário não consentiu as permissões do suplemento.";Strings.OfficeOM.L_SaveSettingsError="Salvar erro de configurações";Strings.OfficeOM.L_DataNotMatchCoercionType="O tipo do objeto de dados especificado não é compatível com a seleção atual.";Strings.OfficeOM.L_IndexOutOfRange="Ãndice fora do intervalo.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="O conteúdo selecionado precisa estar em formato de tabela. Formate os dados como uma tabela e tente novamente.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Os valores rowCount e columnCount especificados são inválidos.";Strings.OfficeOM.L_RedundantCallbackSpecification="O retorno de chamada não pode ser especificado na lista de argumentos e no objeto opcional.";Strings.OfficeOM.L_NewWindowCrossZone="As configurações de segurança do navegador nos impedem de criar uma caixa de diálogo. Tente outro navegador ou {0} para que '{1}' e o domínio mostrado na barra de endereço estejam na mesma zona de segurança.";Strings.OfficeOM.L_InvalidArgument="O argumento '{0}' não funciona nesta situação, está ausente ou não está no formato correto.";Strings.OfficeOM.L_InvalidApiCallInContext="Chamada de API inválida no contexto atual.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Dados Desatualizados";Strings.OfficeOM.L_APINotSupported="API sem Suporte";Strings.OfficeOM.L_InvalidDataObject="Objeto de dados inválido";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Chame closeAsync no arquivo atual antes de recuperar outro.";Strings.OfficeOM.L_NotSupportedEventType="Não há suporte para o tipo de evento especificado {0}.";Strings.OfficeOM.L_DialogAlreadyOpened="A operação falhou porque este suplemento já possui uma caixa de diálogo ativa.";Strings.OfficeOM.L_InternalErrorDescription="Ocorreu um erro interno.";Strings.OfficeOM.L_InvalidResourceUrlMessage="A URL do recurso indicada no manifesto é inválida.";Strings.OfficeOM.L_GetSelectionNotSupported="A seleção atual não tem suporte.";Strings.OfficeOM.L_RunMustReturnPromise='A função de lote passada para o método ".run" não retornou uma promessa. A função deve retornar uma promessa para que todos os objetos rastreados automaticamente possam ser liberados na conclusão da operação em lote. Normalmente, você deve retornar uma promessa enviando a resposta de "context.sync()".';Strings.OfficeOM.L_BindingCreationError="Erro de criação de ligação";Strings.OfficeOM.L_TooManyIncompleteRequests="Aguarde até que a chamada anterior for concluída.";Strings.OfficeOM.L_DataNotMatchBindingType="O objeto de dados especificado não é compatível com o tipo de ligação.";Strings.OfficeOM.L_InvalidGetColumns="As colunas especificadas são inválidas.";Strings.OfficeOM.L_InvalidColumnsForBinding="As colunas especificadas são inválidas.";Strings.OfficeOM.L_CallbackNotAFunction="O retorno de chamada deve ser do tipo função, era do tipo {0}.";Strings.OfficeOM.L_BadSelectorString="A cadeia de caracteres passada para o seletor está formatada incorretamente ou não tem suporte.";Strings.OfficeOM.L_BindingNotExist="A ligação especificada não existe.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Os dados estão desatualizados. Recupere o objeto novamente.";Strings.OfficeOM.L_DialogAddressNotTrusted="O domínio da URL não está incluído no elemento AppDomains no manifesto.";Strings.OfficeOM.L_RowIndexOutOfRange="O valor de índice de linha está fora do intervalo permitido. Use um valor (0 ou superior) que seja menor do que o número de linhas.";Strings.OfficeOM.L_NamedItemNotFound="O item nomeado não existe.";Strings.OfficeOM.L_OutOfRange="Fora do Intervalo";Strings.OfficeOM.L_InValidOptionalArgument="argumento opcional inválido";Strings.OfficeOM.L_MemoryLimit="Limite de Memória Excedido";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_TooManyOptionalObjects="vários objetos opcionais na lista de parâmetros";Strings.OfficeOM.L_EventHandlerAdditionFailed="Falha ao adicionar o manipulador de eventos.";Strings.OfficeOM.L_InvalidDataFormat="O formato do objeto de dados especificado é inválido.";Strings.OfficeOM.L_InvalidReadForBlankRow="A linha especificada está em branco.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="Altera a propriedade '{0}' que não pode ser aplicada por meio de um método \"object.set\".";Strings.OfficeOM.L_SSOClientErrorMessage="Ocorreu um erro inesperado no cliente.";Strings.OfficeOM.L_InvalidBindingOperation="Operação de Associação Inválida";Strings.OfficeOM.L_CustomXmlNodeNotFound="O nó especificado não foi encontrado.";Strings.OfficeOM.L_CannotWriteToSelection="Não é possível gravar na seleção atual.";Strings.OfficeOM.L_DataWriteReminder="Lembrete de Gravação de Dados";Strings.OfficeOM.L_InvalidCoercion="Tipo inválido de coerção";Strings.OfficeOM.L_MissingRequiredArguments="alguns argumentos necessários ausentes";Strings.OfficeOM.L_Timeout="Tempo limite da operação atingido.";Strings.OfficeOM.L_SSOClientError="Ocorreu um erro na solicitação de autenticação do Office.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Não há suporte para o tipo de identidade do usuário.";Strings.OfficeOM.L_GetDataParametersConflict="Os parâmetros especificados estão em conflito.";Strings.OfficeOM.L_ValueNotLoaded='O valor do objeto do resultado ainda não foi carregado. Antes de ler a propriedade value, chamada "context.sync()" no contexto de solicitação associada.';Strings.OfficeOM.L_PermissionDenied="Permissão negada";Strings.OfficeOM.L_OperationNotSupported="A operação não é suportada.";Strings.OfficeOM.L_PropertyDoesNotExist="Propriedade '{0}' não existe no objeto.";Strings.OfficeOM.L_OverwriteWorksheetData="A operação definida falhou porque o objeto de dados fornecido irá sobrescrever ou deslocar os dados.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="A operação falhou porque este suplemento já está solicitando um token de acesso.";Strings.OfficeOM.L_TooManyOptionalFunction="várias funções opcionais na lista de parâmetros";Strings.OfficeOM.L_FunctionCallFailed="Falha na chamada de função {0}, código de erro: {1}.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="Tentativa de definir a propriedade somente leitura '{0}'.";Strings.OfficeOM.L_NetworkProblem="Problema de Rede";Strings.OfficeOM.L_TooManyArguments="muitos argumentos";Strings.OfficeOM.L_UnsupportedEnumeration="Enumeração sem Suporte";Strings.OfficeOM.L_RequestTimeout="A chamada demorou muito tempo para executar.";Strings.OfficeOM.L_InvalidGetStartRowColumn="Os valores startRow ou startColumn especificados são inválidos.";Strings.OfficeOM.L_DataStale="Dados Não Atuais";Strings.OfficeOM.L_InvalidBindingError="Erro de Associação Inválida";Strings.OfficeOM.L_SetDataIsTooLarge="O objeto de dados especificado é muito grande.";Strings.OfficeOM.L_InvalidNode="Nó Inválido";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Faça uma seleção.";Strings.OfficeOM.L_InvalidGetRows="As linhas especificadas são inválidas.";Strings.OfficeOM.L_SliceSizeNotSupported="O tamanho da fatia especificado não tem suporte.";Strings.OfficeOM.L_InvalidParameters="A função {0} possui parâmetros inválidos.";Strings.OfficeOM.L_ShowWindowDialogNotification="O {0} deseja exibir uma nova janela.";Strings.OfficeOM.L_InvalidAPICall="Chamada de API inválida";Strings.OfficeOM.L_DataWriteError="Erro de gravação de dados";Strings.OfficeOM.L_InvalidTableOptionValue="Um ou mais parâmetros tableOptions tem valores que não são permitidos. Verifique outra vez os valores e tente novamente.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Operação sem suporte neste tipo de associação.";Strings.OfficeOM.L_SettingsAreStale="As configurações não puderam ser salvas porque não são atuais.";Strings.OfficeOM.L_UserClickIgnore="O usuário optou por ignorar a caixa de diálogo.";Strings.OfficeOM.L_InvalidGrant="Faltando pré-autorização.";Strings.OfficeOM.L_InvalidSelectionForBindingType="Não é possível criar uma ligação com a seleção atual e o tipo de ligação especificada.";Strings.OfficeOM.L_HostError="Erro de host";Strings.OfficeOM.L_UserAborted="O usuário anulou a solicitação de consentimento.";Strings.OfficeOM.L_SSOServerError="Ocorreu um erro no provedor de autenticação.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="A enumeração não tem suporte no aplicativo host atual.";Strings.OfficeOM.L_InvalidArgumentGeneric="Os argumentos passados para a função não funcionam com essa situação, estão ausentes ou não estão no formato correto.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Sessão Inválida ou com Tempo Limite Excedido";Strings.OfficeOM.L_FileTypeNotSupported="O tipo de arquivo especificado não tem suporte.";Strings.OfficeOM.L_InvalidObjectPath='O caminho do objeto \'{0}\' não está funcionando para o que você está tentando fazer. Se você estiver usando o objeto em várias chamadas de "context.sync" e fora da execução sequencial de um lote ".run", use os métodos "context.trackedObjects.add()" e "context.trackedObjects.remove()" para gerenciar o tempo de vida do objeto.';Strings.OfficeOM.L_DataNotMatchBindingSize="O objeto de dados fornecido não corresponde ao tamanho da seleção atual.";Strings.OfficeOM.L_DialogInvalidScheme="Não há suporte para o esquema de URL. Use HTTPS.";Strings.OfficeOM.L_NotSupportedBindingType="Não há suporte para o tipo de ligação especificado {0}.";Strings.OfficeOM.L_DialogRequireHTTPS="Não há suporte para o protocolo HTTP. Use HTTPS";Strings.OfficeOM.L_UserNotSignedIn="Nenhum usuário está conectado ao Office.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Um problema de rede impediu a recuperação do arquivo.";Strings.OfficeOM.L_SpecifiedIdNotExist="A ID especificada não existe.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Parâmetros de coordenadas não podem ser usados com a Tabela de tipo de coerção quando a tabela contém células mescladas.";Strings.OfficeOM.L_MultipleNamedItemFound="Foram encontrados vários objetos com o mesmo nome.";Strings.OfficeOM.L_EventRegistrationError="Erro de registro de eventos";Strings.OfficeOM.L_NotImplemented="A função {0} não está implementada.";Strings.OfficeOM.L_BindingToMultipleSelection="Não há suporte para várias seleções não contíguas.";Strings.OfficeOM.L_EventHandlerNotExist="O manipulador de eventos especificado não foi encontrado para esta associação.";Strings.OfficeOM.L_AppNameNotExist="O Nome de Suplemento de {0} não existe.";Strings.OfficeOM.L_InvalidCellsValue="Um ou mais parâmetros de célula têm valores que não são permitidos. Verifique outra vez os valores e tente novamente.";Strings.OfficeOM.L_InternalError="Erro interno";Strings.OfficeOM.L_InvalidRequestContext="Não é possível usar o objeto em contextos de solicitação diferentes.";Strings.OfficeOM.L_DocumentReadOnly="A operação solicitada não é permitida no modo de documento atual.";Strings.OfficeOM.L_APICallFailed="Falha na Chamada à API";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Permitir";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="O suplemento já está solicitando um token de acesso.";Strings.OfficeOM.L_ShuttingDown="Falha na operação porque os dados não são atuais no servidor.";Strings.OfficeOM.L_NotSupported="Função {0} não é suportada.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="Sua sessão do Office Online expirou ou é inválida. Para continuar, atualize a página.";Strings.OfficeOM.L_InvalidFormat="Erro de formato inválido";Strings.OfficeOM.L_ActivityLimitReached="O limite de atividade foi atingido.";Strings.OfficeOM.L_InvalidSetColumns="As colunas especificadas são inválidas.";Strings.OfficeOM.L_NavOutOfBound="A operação falhou porque o índice está fora do intervalo.";Strings.OfficeOM.L_SetDataParametersConflict="Os parâmetros especificados estão em conflito.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Observação: é recomendável que o número de células em uma tabela não ultrapasse 20.000 células.";Strings.OfficeOM.L_DisplayDialogError="Exibir Erro do Diálogo";Strings.OfficeOM.L_DataReadError="Erro de leitura de dados";Strings.OfficeOM.L_CoercionTypeNotSupported="O tipo de coerção especificado não tem suporte.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="configure o seu navegador";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Ignorar";Strings.OfficeOM.L_CannotRegisterEvent="Não é possível registrar o manipulador de eventos.";Strings.OfficeOM.L_RequestTokenUnavailable="Esta API foi limitada para reduzir a frequência de chamada.";Strings.OfficeOM.L_InvalidFormatValue="Um ou mais parâmetros de formato têm valores que não são permitidos. Verifique outra vez os valores e tente novamente.";Strings.OfficeOM.L_FormatValueOutOfRange="O valor está fora do intervalo permitido.";Strings.OfficeOM.L_ColIndexOutOfRange="O valor de índice de coluna está fora do intervalo permitido. Use um valor (0 ou superior) que seja menor do que o número de colunas.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="O aplicativo {0} não existe. Microsoft.Office.WebExtension.Initialize(reason) não é chamado.";Strings.OfficeOM.L_FormattingReminder="Lembrete de Formatação";Strings.OfficeOM.L_InvalidResourceUrl="A URL do recurso do aplicativo fornecida é inválida.";Strings.OfficeOM.L_DialogNavigateError="Erro de Navegação do Diálogo";Strings.OfficeOM.L_ReadSettingsError="Erro de leitura de configurações";Strings.OfficeOM.L_CustomXmlError="Erro no XML personalizado.";Strings.OfficeOM.L_CannotNavigateTo="O objeto está localizado em um local onde a navegação não é suportada.";Strings.OfficeOM.L_BrowserAPINotSupported="Este navegador não oferece suporte para a API solicitada.";Strings.OfficeOM.L_SettingNameNotExist="O nome de configuração especificado não existe.";Strings.OfficeOM.L_InitializeNotReady="O Office.js ainda não está totalmente carregado. Tente novamente mais tarde ou verifique se você adicionou seu código de inicialização na função Office.initialize.";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Argumentos de entrada inválidos.";Strings.OfficeOM.L_UnknownBindingType="Não há suporte para o tipo de vinculação.";Strings.OfficeOM.L_PropertyNotLoaded="A propriedade '{0}' não está disponível. Antes de ler o valor da propriedade, chame o método de carregamento no objeto contentor e chame \"context.sync()\" no contexto de solicitação associada.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="As restrições do navegador nos impediram de criar a caixa de diálogo. O domínio da caixa de diálogo e o domínio do host do suplemento não estão na mesma zona de segurança." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_CustomFunctionImplementationMissing="A propriedade com este nome no Excel.CustomFunctions que representa a definição da função deve conter uma propriedade 'call' que implementa a função.";Strings.OfficeOM.L_InvalidCellsValue="Um ou mais parâmetros de célula têm valores que não são permitidos. Verifique outra vez os valores e tente novamente.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="O conteúdo selecionado precisa estar em formato de tabela. Formate os dados como uma tabela e tente novamente.";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Chame closeAsync no arquivo atual antes de recuperar outro.";Strings.OfficeOM.L_UserClickIgnore="O usuário optou por ignorar a caixa de diálogo.";Strings.OfficeOM.L_OsfControlTypeNotSupported="O tipo OsfControl não tem suporte.";Strings.OfficeOM.L_UnsupportedUserIdentity="Não há suporte para o tipo de identidade do usuário.";Strings.OfficeOM.L_ReadSettingsError="Erro de leitura de configurações";Strings.OfficeOM.L_IndexOutOfRange="Ãndice fora do intervalo.";Strings.OfficeOM.L_FormatValueOutOfRange="O valor está fora do intervalo permitido.";Strings.OfficeOM.L_InvalidFormat="Erro de formato inválido";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="O aplicativo {0} não existe. Microsoft.Office.WebExtension.Initialize(reason) não é chamado.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Faça uma seleção.";Strings.OfficeOM.L_ConnectionFailureWithDetails="A solicitação falhou com código de status {0}, código de erro {1} e a seguinte mensagem de erro: {2}";Strings.OfficeOM.L_APICallFailed="Falha na Chamada à API";Strings.OfficeOM.L_NoCapability="Você não tem permissões suficientes para esta ação.";Strings.OfficeOM.L_PropertyNotLoaded="A propriedade '{0}' não está disponível. Antes de ler o valor da propriedade, chame o método de carregamento no objeto contentor e chame \"context.sync()\" no contexto de solicitação associada.";Strings.OfficeOM.L_InvalidReadForBlankRow="A linha especificada está em branco.";Strings.OfficeOM.L_FunctionCallFailed="Falha na chamada de função {0}, código de erro: {1}.";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_InvalidSetStartRowColumn="Os valores startRow ou startColumn especificados são inválidos.";Strings.OfficeOM.L_NotSupportedEventType="Não há suporte para o tipo de evento especificado {0}.";Strings.OfficeOM.L_InvalidOperationInCellEditMode="O Excel está em modo de edição de célula. Saia do modo de edição pressionando ENTER ou TAB ou selecionando outra célula e tente novamente.";Strings.OfficeOM.L_InvalidSSOAddinMessage="Não há suporte para a API de identidade deste suplemento.";Strings.OfficeOM.L_NewWindowCrossZone="As configurações de segurança do navegador nos impedem de criar uma caixa de diálogo. Tente outro navegador ou {0} para que '{1}' e o domínio mostrado na barra de endereço estejam na mesma zona de segurança.";Strings.OfficeOM.L_InvalidColumnsForBinding="As colunas especificadas são inválidas.";Strings.OfficeOM.L_InvalidAPICall="Chamada de API inválida";Strings.OfficeOM.L_OverwriteWorksheetData="A operação definida falhou porque o objeto de dados fornecido irá sobrescrever ou deslocar os dados.";Strings.OfficeOM.L_ActivityLimitReached="O limite de atividade foi atingido.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="A enumeração não tem suporte no aplicativo host atual.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="Sua sessão do Office Online expirou ou é inválida. Para continuar, atualize a página.";Strings.OfficeOM.L_InvalidSetRows="As linhas especificadas são inválidas.";Strings.OfficeOM.L_InternalErrorDescription="Ocorreu um erro interno.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Permitir";Strings.OfficeOM.L_CustomFunctionNameContainsBadChars="O nome da função pode conter apenas letras, dígitos, sublinhados e pontos.";Strings.OfficeOM.L_GetDataIsTooLarge="O conjunto de dados solicitado é muito grande.";Strings.OfficeOM.L_CoercionTypeNotSupported="O tipo de coerção especificado não tem suporte.";Strings.OfficeOM.L_InvalidValue="Valor Inválido";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Os valores rowCount e columnCount especificados são inválidos.";Strings.OfficeOM.L_ConnectionFailureWithStatus="A solicitação falhou com código de status {0}.";Strings.OfficeOM.L_RequestTokenUnavailable="Esta API foi limitada para reduzir a frequência de chamada.";Strings.OfficeOM.L_CallbackNotAFunction="O retorno de chamada deve ser do tipo função, era do tipo {0}.";Strings.OfficeOM.L_CannotWriteToSelection="Não é possível gravar na seleção atual.";Strings.OfficeOM.L_InvalidGetStartRowColumn="Os valores startRow ou startColumn especificados são inválidos.";Strings.OfficeOM.L_DisplayDialogError="Exibir Erro do Diálogo";Strings.OfficeOM.L_SSOServerErrorMessage="Ocorreu um erro inesperado no servidor.";Strings.OfficeOM.L_SelectionCannotBound="Não é possível ligar à seleção atual.";Strings.OfficeOM.L_ApiNotFoundDetails="O método ou a propriedade {0} é parte do conjunto de requisitos da {1} que não está disponível em sua versão do {2}.";Strings.OfficeOM.L_UnsupportedDataObject="Não há suporte para o tipo de objeto de dados fornecido.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="As restrições do navegador nos impediram de criar a caixa de diálogo. O domínio da caixa de diálogo e o domínio do host do suplemento não estão na mesma zona de segurança.";Strings.OfficeOM.L_InternalError="Erro interno";Strings.OfficeOM.L_InvalidParameters="A função {0} possui parâmetros inválidos.";Strings.OfficeOM.L_DialogAddressNotTrusted="O domínio da URL não está incluído no elemento AppDomains no manifesto.";Strings.OfficeOM.L_FormattingReminder="Lembrete de Formatação";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="Tentativa de definir a propriedade somente leitura '{0}'.";Strings.OfficeOM.L_RequestTimeout="A chamada demorou muito tempo para executar.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Operação sem suporte neste tipo de associação.";Strings.OfficeOM.L_NetworkProblem="Problema de Rede";Strings.OfficeOM.L_EventRegistrationError="Erro de registro de eventos";Strings.OfficeOM.L_SetDataIsTooLarge="O objeto de dados especificado é muito grande.";Strings.OfficeOM.L_OutOfRange="Fora do Intervalo";Strings.OfficeOM.L_CustomXmlNodeNotFound="O nó especificado não foi encontrado.";Strings.OfficeOM.L_InvalidGrant="Faltando pré-autorização.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Parâmetros de coordenadas não podem ser usados com a Tabela de tipo de coerção quando a tabela contém células mescladas.";Strings.OfficeOM.L_InvalidArgument="O argumento '{0}' não funciona nesta situação, está ausente ou não está no formato correto.";Strings.OfficeOM.L_MissingRequiredArguments="alguns argumentos necessários ausentes";Strings.OfficeOM.L_CannotNavigateTo="O objeto está localizado em um local onde a navegação não é suportada.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Os dados estão desatualizados. Recupere o objeto novamente.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Observação: é recomendável que o número de células em uma tabela não ultrapasse 20.000 células.";Strings.OfficeOM.L_InvalidBindingError="Erro de Associação Inválida";Strings.OfficeOM.L_InitializeNotReady="O Office.js ainda não está totalmente carregado. Tente novamente mais tarde ou verifique se você adicionou seu código de inicialização na função Office.initialize.";Strings.OfficeOM.L_InvalidResourceUrlMessage="A URL do recurso indicada no manifesto é inválida.";Strings.OfficeOM.L_TooManyIncompleteRequests="Aguarde até que a chamada anterior for concluída.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="O suplemento já está solicitando um token de acesso.";Strings.OfficeOM.L_ColIndexOutOfRange="O valor de índice de coluna está fora do intervalo permitido. Use um valor (0 ou superior) que seja menor do que o número de colunas.";Strings.OfficeOM.L_InvalidDataFormat="O formato do objeto de dados especificado é inválido.";Strings.OfficeOM.L_DialogNavigateError="Erro de Navegação do Diálogo";Strings.OfficeOM.L_CustomXmlOutOfDateName="Dados Desatualizados";Strings.OfficeOM.L_InvalidOrTimedOutSession="Sessão Inválida ou com Tempo Limite Excedido";Strings.OfficeOM.L_DialogAlreadyOpened="A operação falhou porque este suplemento já possui uma caixa de diálogo ativa.";Strings.OfficeOM.L_InvalidFormatValue="Um ou mais parâmetros de formato têm valores que não são permitidos. Verifique outra vez os valores e tente novamente.";Strings.OfficeOM.L_NotSupported="Função {0} não é suportada.";Strings.OfficeOM.L_PermissionDenied="Permissão negada";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Não há suporte para o tipo de identidade do usuário.";Strings.OfficeOM.L_MultipleNamedItemFound="Foram encontrados vários objetos com o mesmo nome.";Strings.OfficeOM.L_NamedItemNotFound="O item nomeado não existe.";Strings.OfficeOM.L_CustomFunctionNameCannotSplit="O nome da função deve conter um namespace não vazio e um nome curto não vazio.";Strings.OfficeOM.L_InvalidResourceUrl="A URL do recurso do aplicativo fornecida é inválida.";Strings.OfficeOM.L_SettingsStaleError="Erro de configurações obsoletos";Strings.OfficeOM.L_ElementMissing="Não foi possível formatar a célula da tabela, pois faltam alguns valores de parâmetro. Verifique outra vez os parâmetros e tente novamente.";Strings.OfficeOM.L_InvalidSelectionForBindingType="Não é possível criar uma ligação com a seleção atual e o tipo de ligação especificada.";Strings.OfficeOM.L_CustomXmlError="Erro no XML personalizado.";Strings.OfficeOM.L_SSOConnectionLostError="A connection was lost during the sign in process.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Limite de Seleção Atingido";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory="Este suplemento não dá suporte ao consentimento do usuário.";Strings.OfficeOM.L_InvalidObjectPath='O caminho do objeto \'{0}\' não está funcionando para o que você está tentando fazer. Se você estiver usando o objeto em várias chamadas de "context.sync" e fora da execução sequencial de um lote ".run", use os métodos "context.trackedObjects.add()" e "context.trackedObjects.remove()" para gerenciar o tempo de vida do objeto.';Strings.OfficeOM.L_DataNotMatchBindingSize="O objeto de dados fornecido não corresponde ao tamanho da seleção atual.";Strings.OfficeOM.L_InvalidCoercion="Tipo inválido de coerção";Strings.OfficeOM.L_InvalidNode="Nó Inválido";Strings.OfficeOM.L_InvalidBindingOperation="Operação de Associação Inválida";Strings.OfficeOM.L_InvalidGetRows="As linhas especificadas são inválidas.";Strings.OfficeOM.L_DialogRequireHTTPS="Não há suporte para o protocolo HTTP. Use HTTPS";Strings.OfficeOM.L_BindingNotExist="A ligação especificada não existe.";Strings.OfficeOM.L_InvalidTableOptionValue="Um ou mais parâmetros tableOptions tem valores que não são permitidos. Verifique outra vez os valores e tente novamente.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Um problema de rede impediu a recuperação do arquivo.";Strings.OfficeOM.L_UserNotSignedIn="Nenhum usuário está conectado ao Office.";Strings.OfficeOM.L_NotSupportedBindingType="Não há suporte para o tipo de ligação especificado {0}.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="A operação falhou porque este suplemento já está solicitando um token de acesso.";Strings.OfficeOM.L_GetSelectionNotSupported="A seleção atual não tem suporte.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="O XPath limita a seleção a 1024 itens.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="Altera a propriedade '{0}' que não pode ser aplicada por meio de um método \"object.set\".";Strings.OfficeOM.L_SettingsCannotSave="Não foi possível salvar as configurações.";Strings.OfficeOM.L_NotImplemented="A função {0} não está implementada.";Strings.OfficeOM.L_TooManyOptionalObjects="vários objetos opcionais na lista de parâmetros";Strings.OfficeOM.L_DataReadError="Erro de leitura de dados";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Parâmetros de coordenadas não podem ser usados com a Tabela de tipo de coerção quando a tabela contém células mescladas.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="A seleção atual não tem suporte para o tipo de coerção especificado.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="configure o seu navegador";Strings.OfficeOM.L_DataWriteError="Erro de gravação de dados";Strings.OfficeOM.L_CannotRegisterEvent="Não é possível registrar o manipulador de eventos.";Strings.OfficeOM.L_HostError="Erro de host";Strings.OfficeOM.L_EventHandlerAdditionFailed="Falha ao adicionar o manipulador de eventos.";Strings.OfficeOM.L_DocumentReadOnly="A operação solicitada não é permitida no modo de documento atual.";Strings.OfficeOM.L_UnknownBindingType="Não há suporte para o tipo de vinculação.";Strings.OfficeOM.L_DataNotMatchSelection="O objeto de dados fornecido não é compatível com a forma ou as dimensões da seleção atual.";Strings.OfficeOM.L_DialogInvalidScheme="Não há suporte para o esquema de URL. Use HTTPS.";Strings.OfficeOM.L_ValueNotLoaded='O valor do objeto do resultado ainda não foi carregado. Antes de ler a propriedade value, chamada "context.sync()" no contexto de solicitação associada.';Strings.OfficeOM.L_DataWriteReminder="Lembrete de Gravação de Dados";Strings.OfficeOM.L_SettingsAreStale="As configurações não puderam ser salvas porque não são atuais.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage="A operação falhou porque este suplemento não dá suporte ao consentimento do usuário nesta categoria";Strings.OfficeOM.L_DataStale="Dados Não Atuais";Strings.OfficeOM.L_InvalidGetColumns="As colunas especificadas são inválidas.";Strings.OfficeOM.L_SpecifiedIdNotExist="A ID especificada não existe.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Observação: é recomendável que os conjuntos de formatação definidos por uma chamada de API de formatação não ultrapassem 100.";Strings.OfficeOM.L_InvalidRequestContext="Não é possível usar o objeto em contextos de solicitação diferentes.";Strings.OfficeOM.L_BindingCreationError="Erro de criação de ligação";Strings.OfficeOM.L_SSOServerError="Ocorreu um erro no provedor de autenticação.";Strings.OfficeOM.L_RedundantCallbackSpecification="O retorno de chamada não pode ser especificado na lista de argumentos e no objeto opcional.";Strings.OfficeOM.L_CustomFunctionDefinitionMissing="Uma propriedade com este nome que representa a definição da função deve existir em Excel.CustomFunctions.";Strings.OfficeOM.L_APINotSupported="API sem Suporte";Strings.OfficeOM.L_BadSelectorString="A cadeia de caracteres passada para o seletor está formatada incorretamente ou não tem suporte.";Strings.OfficeOM.L_SaveSettingsError="Salvar erro de configurações";Strings.OfficeOM.L_EventHandlerRemovalFailed="Falha ao remover o manipulador de eventos.";Strings.OfficeOM.L_InvalidGrantMessage="Concessão ausente para este suplemento.";Strings.OfficeOM.L_ShowWindowDialogNotification="O {0} deseja exibir uma nova janela.";Strings.OfficeOM.L_UnsupportedEnumeration="Enumeração sem Suporte";Strings.OfficeOM.L_MemoryLimit="Limite de Memória Excedido";Strings.OfficeOM.L_SSOConnectionLostErrorMessage="A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones.";Strings.OfficeOM.L_InvalidApiCallInContext="Chamada de API inválida no contexto atual.";Strings.OfficeOM.L_TooManyArguments="muitos argumentos";Strings.OfficeOM.L_AppNameNotExist="O Nome de Suplemento de {0} não existe.";Strings.OfficeOM.L_MissingParameter="Parâmetro Ausente";Strings.OfficeOM.L_InvalidBinding="Associação Inválida";Strings.OfficeOM.L_ShuttingDown="Falha na operação porque os dados não são atuais no servidor.";Strings.OfficeOM.L_RunMustReturnPromise='A função de lote passada para o método ".run" não retornou uma promessa. A função deve retornar uma promessa para que todos os objetos rastreados automaticamente possam ser liberados na conclusão da operação em lote. Normalmente, você deve retornar uma promessa enviando a resposta de "context.sync()".';Strings.OfficeOM.L_BindingToMultipleSelection="Não há suporte para várias seleções não contíguas.";Strings.OfficeOM.L_FileTypeNotSupported="O tipo de arquivo especificado não tem suporte.";Strings.OfficeOM.L_TooManyOptionalFunction="várias funções opcionais na lista de parâmetros";Strings.OfficeOM.L_RowIndexOutOfRange="O valor de índice de linha está fora do intervalo permitido. Use um valor (0 ou superior) que seja menor do que o número de linhas.";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Argumentos de entrada inválidos.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Ignorar";Strings.OfficeOM.L_InValidOptionalArgument="argumento opcional inválido";Strings.OfficeOM.L_InvalidNamedItemForBindingType="O tipo de vinculação especificada não é compatível com o item nomeado fornecido.";Strings.OfficeOM.L_OperationNotSupported="A operação não é suportada.";Strings.OfficeOM.L_Timeout="Tempo limite da operação atingido.";Strings.OfficeOM.L_SSOClientErrorMessage="Ocorreu um erro inesperado no cliente.";Strings.OfficeOM.L_SSOClientError="Ocorreu um erro na solicitação de autenticação do Office.";Strings.OfficeOM.L_GetDataParametersConflict="Os parâmetros especificados estão em conflito.";Strings.OfficeOM.L_EventHandlerNotExist="O manipulador de eventos especificado não foi encontrado para esta associação.";Strings.OfficeOM.L_DataNotMatchCoercionType="O tipo do objeto de dados especificado não é compatível com a seleção atual.";Strings.OfficeOM.L_InvalidSetColumns="As colunas especificadas são inválidas.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="O tipo de coerção especificado não é compatível com este tipo de associação.";Strings.OfficeOM.L_SettingNameNotExist="O nome de configuração especificado não existe.";Strings.OfficeOM.L_BrowserAPINotSupported="Este navegador não oferece suporte para a API solicitada.";Strings.OfficeOM.L_DataNotMatchBindingType="O objeto de dados especificado não é compatível com o tipo de ligação.";Strings.OfficeOM.L_SliceSizeNotSupported="O tamanho da fatia especificado não tem suporte.";Strings.OfficeOM.L_PropertyDoesNotExist="Propriedade '{0}' não existe no objeto.";Strings.OfficeOM.L_UserAborted="O usuário anulou a solicitação de consentimento.";Strings.OfficeOM.L_NavOutOfBound="A operação falhou porque o índice está fora do intervalo.";Strings.OfficeOM.L_InvalidDataObject="Objeto de dados inválido";Strings.OfficeOM.L_InvalidArgumentGeneric="Os argumentos passados para a função não funcionam com essa situação, estão ausentes ou não estão no formato correto.";Strings.OfficeOM.L_SetDataParametersConflict="Os parâmetros especificados estão em conflito.";Strings.OfficeOM.L_UserAbortedMessage="O usuário não consentiu as permissões do suplemento." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/pt-br/outlook_strings.debug.js b/node_modules/@microsoft/office-js/dist/pt-br/outlook_strings.debug.js index 07eb47c..ee5bf7c 100644 --- a/node_modules/@microsoft/office-js/dist/pt-br/outlook_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/pt-br/outlook_strings.debug.js @@ -1,34 +1,35 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("_u"); _u.ExtensibilityStrings = function() { }; _u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings"); -_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Não foi possível adicionar o anexo, pois ele é muito grande."; +_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "A permissão elevada é necessária para acessar membros protegidos da API JavaScript para Office."; _u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "O anexo não pode ser excluído do item."; -_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Anexos não podem ser adicionados, pois a mensagem já possui o número máximo de anexos"; -_u.ExtensibilityStrings.l_InvalidDate_Text = "A entrada não é resolvida como uma data válida."; +_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "O usuário removeu o anexo antes de o carregamento ser concluído."; +_u.ExtensibilityStrings.l_InternalProtocolError_Text = "Erro de protocolo interno: '{0}'."; +_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "O item selecionado foi alterado."; _u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "A ID do anexo era inválida."; +_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "O número total de destinatários no campo não pode exceder {0}."; +_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Erro de Anexo"; +_u.ExtensibilityStrings.l_InvalidEventDates_Text = "A data de término ocorre antes da data de início."; _u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "A limpeza de HTML falhou."; -_u.ExtensibilityStrings.l_InvalidEndTime_Text = "A hora de término não pode ser anterior à hora de início."; -_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Os parâmetros definidos não correspondem ao formato esperado."; -_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "O anexo não pode ser excluído, pois não foi possível encontrar o anexo com o índice de anexo."; -_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "O usuário alterou a posição do cursor durante a inserção dos dados."; +_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Anexos não podem ser adicionados, pois a mensagem já possui o número máximo de anexos"; +_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Não foi possível adicionar o anexo, pois ele é muito grande."; +_u.ExtensibilityStrings.l_InternalFormatError_Text = "Houve um erro de formato interno."; +_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Não foram fornecidos destinatários válidos."; +_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Um ou mais endereços de email fornecidos são muito longos."; +_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "A permissão elevada é necessária para chamar o método: '{0}'."; +_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "A solicitação excede o limite de tamanho de 1 MB. Modifique sua solicitação EWS."; +_u.ExtensibilityStrings.l_InvalidDate_Text = "A entrada não é resolvida como uma data válida."; +_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "O anexo não pode ser adicionado ao item."; _u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Um ou mais dos nomes de exibição fornecidos são muito longos."; -_u.ExtensibilityStrings.l_InternalProtocolError_Text = "Erro de protocolo interno: '{0}'."; -_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "O número total de destinatários no campo não pode exceder {0}."; _u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Anexos não podem ser adicionados enquanto o encaminhamento ou resposta completa estiver sendo recuperada do servidor."; -_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "O anexo não pode ser adicionado ao item."; _u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Erro de Gravação de Dados"; -_u.ExtensibilityStrings.l_InvalidEventDates_Text = "A data de término ocorre antes da data de início."; -_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Não foram fornecidos destinatários válidos."; -_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "O usuário removeu o anexo antes de o carregamento ser concluído."; -_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "O item selecionado foi alterado."; -_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Erro de Anexo"; -_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "A permissão elevada é necessária para acessar membros protegidos da API JavaScript para Office."; -_u.ExtensibilityStrings.l_InternalFormatError_Text = "Houve um erro de formato interno."; +_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Os parâmetros definidos não correspondem ao formato esperado."; +_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "O anexo não pode ser excluído, pois não foi possível encontrar o anexo com o índice de anexo."; +_u.ExtensibilityStrings.l_InvalidEndTime_Text = "A hora de término não pode ser anterior à hora de início."; +_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "O usuário alterou a posição do cursor durante a inserção dos dados."; _u.ExtensibilityStrings.l_OffsetNotfound_Text = "Não foi encontrado um deslocamento para este carimbo de data/hora."; -_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "O caminho do anexo era inválido."; -_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "A solicitação excede o limite de tamanho de 1 MB. Modifique sua solicitação EWS."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "A permissão elevada é necessária para chamar o método: '{0}'."; -_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Um ou mais endereços de email fornecidos são muito longos." +_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "O caminho do anexo era inválido." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/pt-br/outlook_strings.js b/node_modules/@microsoft/office-js/dist/pt-br/outlook_strings.js index 00f6990..4633191 100644 --- a/node_modules/@microsoft/office-js/dist/pt-br/outlook_strings.js +++ b/node_modules/@microsoft/office-js/dist/pt-br/outlook_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Não foi possível adicionar o anexo, pois ele é muito grande.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="O anexo não pode ser excluído do item.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Anexos não podem ser adicionados, pois a mensagem já possui o número máximo de anexos";_u.ExtensibilityStrings.l_InvalidDate_Text="A entrada não é resolvida como uma data válida.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="A ID do anexo era inválida.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="A limpeza de HTML falhou.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="A hora de término não pode ser anterior à hora de início.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Os parâmetros definidos não correspondem ao formato esperado.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="O anexo não pode ser excluído, pois não foi possível encontrar o anexo com o índice de anexo.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="O usuário alterou a posição do cursor durante a inserção dos dados.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Um ou mais dos nomes de exibição fornecidos são muito longos.";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Erro de protocolo interno: '{0}'.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="O número total de destinatários no campo não pode exceder {0}.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Anexos não podem ser adicionados enquanto o encaminhamento ou resposta completa estiver sendo recuperada do servidor.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="O anexo não pode ser adicionado ao item.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Erro de Gravação de Dados";_u.ExtensibilityStrings.l_InvalidEventDates_Text="A data de término ocorre antes da data de início.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Não foram fornecidos destinatários válidos.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="O usuário removeu o anexo antes de o carregamento ser concluído.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="O item selecionado foi alterado.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Erro de Anexo";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="A permissão elevada é necessária para acessar membros protegidos da API JavaScript para Office.";_u.ExtensibilityStrings.l_InternalFormatError_Text="Houve um erro de formato interno.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Não foi encontrado um deslocamento para este carimbo de data/hora.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="O caminho do anexo era inválido.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="A solicitação excede o limite de tamanho de 1 MB. Modifique sua solicitação EWS.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="A permissão elevada é necessária para chamar o método: '{0}'.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Um ou mais endereços de email fornecidos são muito longos." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="A permissão elevada é necessária para acessar membros protegidos da API JavaScript para Office.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="O anexo não pode ser excluído do item.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="O usuário removeu o anexo antes de o carregamento ser concluído.";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Erro de protocolo interno: '{0}'.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="O item selecionado foi alterado.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="A ID do anexo era inválida.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="O número total de destinatários no campo não pode exceder {0}.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Erro de Anexo";_u.ExtensibilityStrings.l_InvalidEventDates_Text="A data de término ocorre antes da data de início.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="A limpeza de HTML falhou.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Anexos não podem ser adicionados, pois a mensagem já possui o número máximo de anexos";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Não foi possível adicionar o anexo, pois ele é muito grande.";_u.ExtensibilityStrings.l_InternalFormatError_Text="Houve um erro de formato interno.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Não foram fornecidos destinatários válidos.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Um ou mais endereços de email fornecidos são muito longos.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="A permissão elevada é necessária para chamar o método: '{0}'.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="A solicitação excede o limite de tamanho de 1 MB. Modifique sua solicitação EWS.";_u.ExtensibilityStrings.l_InvalidDate_Text="A entrada não é resolvida como uma data válida.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="O anexo não pode ser adicionado ao item.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Um ou mais dos nomes de exibição fornecidos são muito longos.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Anexos não podem ser adicionados enquanto o encaminhamento ou resposta completa estiver sendo recuperada do servidor.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Erro de Gravação de Dados";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Os parâmetros definidos não correspondem ao formato esperado.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="O anexo não pode ser excluído, pois não foi possível encontrar o anexo com o índice de anexo.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="A hora de término não pode ser anterior à hora de início.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="O usuário alterou a posição do cursor durante a inserção dos dados.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Não foi encontrado um deslocamento para este carimbo de data/hora.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="O caminho do anexo era inválido." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/pt-pt/office_strings.debug.js b/node_modules/@microsoft/office-js/dist/pt-pt/office_strings.debug.js index c32bbd2..7da9c23 100644 --- a/node_modules/@microsoft/office-js/dist/pt-pt/office_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/pt-pt/office_strings.debug.js @@ -1,179 +1,190 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("Strings"); Strings.OfficeOM = function() { }; Strings.OfficeOM.registerClass("Strings.OfficeOM"); -Strings.OfficeOM.L_InvalidOrTimedOutSession = "Sessão Inválida ou Sessão Cujo Tempo Limite Foi Excedido"; -Strings.OfficeOM.L_RowIndexOutOfRange = "O valor do índice de linhas encontra-se fora do intervalo permitido. Utilize um valor (0 ou superior) que seja inferior ao número de linhas."; -Strings.OfficeOM.L_AppNameNotExist = "O Nome do Suplemento {0} não existe."; -Strings.OfficeOM.L_EventHandlerRemovalFailed = "Não foi possível remover o processador de eventos."; -Strings.OfficeOM.L_DataNotMatchBindingType = "O objeto de dados especificado não é compatível com o tipo de vínculo."; -Strings.OfficeOM.L_CustomXmlOutOfDateName = "Dados Obsoletos"; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage = "A operação falhou porque este suplemento não suporta o consentimento do utilizador nesta categoria"; +Strings.OfficeOM.L_UnsupportedEnumerationMessage = "A enumeração não é suportada na aplicação do anfitrião atual."; +Strings.OfficeOM.L_DataWriteReminder = "Lembrete de Escrita de Dados"; +Strings.OfficeOM.L_TooManyOptionalObjects = "vários objetos opcionais na lista de parâmetros"; +Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Limite de Seleção Atingido"; +Strings.OfficeOM.L_InvalidNamedItemForBindingType = "O tipo de vínculo especificado não é compatível com item nomeado fornecido."; +Strings.OfficeOM.L_BindingNotExist = "O vínculo especificado não existe."; Strings.OfficeOM.L_FileTypeNotSupported = "O tipo de ficheiro especificado não é suportado."; -Strings.OfficeOM.L_PermissionDenied = "Permissão Recusada"; -Strings.OfficeOM.L_UserAbortedMessage = "O utilizador não consentiu as permissões do suplemento."; -Strings.OfficeOM.L_UserClickIgnore = "O utilizador optou por ignorar a caixa de diálogo."; -Strings.OfficeOM.L_RunMustReturnPromise = 'A função de lotes passada para o método ".run" não devolveu uma promessa. A função tem de devolver uma promessa, para que todos os objetos controlados automaticamente possam ser libertados na conclusão da operação de lote. Normalmente, uma promessa é devolvida ao devolver a resposta de "context.sync()".'; -Strings.OfficeOM.L_NetworkProblem = "Problema de Rede"; -Strings.OfficeOM.L_EventRegistrationError = "Erro de Registo de Evento"; -Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Os argumentos de entrada são inválidos."; -Strings.OfficeOM.L_InvalidSelectionForBindingType = "Não é possível criar um vínculo com a seleção atual e o tipo de vínculo especificado."; +Strings.OfficeOM.L_InvalidCellsValue = "Um ou mais parâmetros das células possuem valores que não são permitidos. Verifique os valores e tente novamente."; +Strings.OfficeOM.L_InvalidSetRows = "As linhas especificadas são inválidas."; +Strings.OfficeOM.L_InvalidGrant = "Autorização prévia em falta."; +Strings.OfficeOM.L_SelectionCannotBound = "Não é possível vincular à seleção atual."; Strings.OfficeOM.L_UnsupportedUserIdentity = "O tipo de identidade de utilizador não é suportado."; -Strings.OfficeOM.L_Timeout = "A operação excedeu o tempo limite."; -Strings.OfficeOM.L_InvalidValue = "Valor Inválido"; -Strings.OfficeOM.L_InvalidObjectPath = 'O caminho do objeto "{0}" não está a funcionar para a ação que está a tentar efetuar. Se estiver a utilizar o objeto em múltiplas chamadas de "context.sync" e fora da execução sequencial de um lote ".run", utilize os métodos "context.trackedObjects.add()" e "context.trackedObjects.remove()" para gerir a duração do objeto.'; -Strings.OfficeOM.L_UnknownBindingType = "O tipo de vínculo não é suportado."; -Strings.OfficeOM.L_RedundantCallbackSpecification = "A chamada de retorno não pode ser especificada simultaneamente na lista de argumentos e no objeto opcional."; -Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Os parâmetros coordenados não podem ser usados com Tabelas de tipo coerção quando a tabela contém células unidas."; -Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Nota: sugerimos que os conjuntos de formatação definidos por uma chamada de API de Formatação sejam inferiores a 100."; -Strings.OfficeOM.L_SliceSizeNotSupported = "O tamanho de setor especificado não é suportado."; -Strings.OfficeOM.L_InitializeNotReady = "O Office.js ainda não foi totalmente carregado. Tente novamente mais tarde ou certifique-se de que adiciona o seu código de inicialização na função Office.initialize."; -Strings.OfficeOM.L_DataWriteReminder = "Lembrete de Escrita de Dados"; -Strings.OfficeOM.L_APICallFailed = "Falha na Chamada à API"; -Strings.OfficeOM.L_DialogRequireHTTPS = "O protocolo HTTP não é suportado. Em alternativa, utilize HTTPS"; -Strings.OfficeOM.L_DataNotMatchSelection = "O objeto de dados fornecido não é compatível com a forma ou dimensões da seleção atual."; -Strings.OfficeOM.L_SSOClientErrorMessage = "Ocorreu um erro inesperado no cliente."; -Strings.OfficeOM.L_DialogOK = "OK"; -Strings.OfficeOM.L_TooManyArguments = "demasiados argumentos"; -Strings.OfficeOM.L_InvalidGetStartRowColumn = "Os valores de startRow or startColumn especificados são inválidos."; -Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Ligar ao closeAsync no Ficheiro atual antes de obter outro."; -Strings.OfficeOM.L_APINotSupported = "API Não Suportada"; -Strings.OfficeOM.L_MultipleNamedItemFound = "Foram encontrados vários objetos com o mesmo nome."; +Strings.OfficeOM.L_PropertyDoesNotExist = 'A propriedade "{0}" não existe no objeto.'; +Strings.OfficeOM.L_RequestTokenUnavailable = "Esta API foi limitada para diminuir a frequência de chamadas."; +Strings.OfficeOM.L_SpecifiedIdNotExist = "O ID especificado não existe."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "O suplemento já está a pedir um token de acesso."; Strings.OfficeOM.L_MissingRequiredArguments = "faltam alguns argumentos necessários"; -Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Um problema de rede impediu a obtenção do ficheiro."; -Strings.OfficeOM.L_InvalidNamedItemForBindingType = "O tipo de vínculo especificado não é compatível com item nomeado fornecido."; +Strings.OfficeOM.L_SliceSizeNotSupported = "O tamanho de setor especificado não é suportado."; Strings.OfficeOM.L_UnsupportedEnumeration = "Enumeração Não Suportada"; -Strings.OfficeOM.L_InvalidSSOAddinMessage = "A API de identidade não é suportada para este suplemento."; -Strings.OfficeOM.L_InvalidGetRows = "As linhas especificadas são inválidas."; -Strings.OfficeOM.L_CoercionTypeNotSupported = "O tipo de coerção especificado não é suportado."; -Strings.OfficeOM.L_InvalidResourceUrl = "O URL do recurso de aplicação fornecido é inválido."; -Strings.OfficeOM.L_UserAborted = "O utilizador abortou o pedido de consentimento."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "O suplemento já está a pedir um token de acesso."; -Strings.OfficeOM.L_BindingToMultipleSelection = "As seleções não contíguas não são suportadas."; -Strings.OfficeOM.L_SettingsAreStale = "Não foi possível guardar as definições por estarem obsoletas."; -Strings.OfficeOM.L_InvalidDataObject = "Objeto de Dados Inválido"; -Strings.OfficeOM.L_CustomXmlError = "Erro de XML Personalizado."; -Strings.OfficeOM.L_BrowserAPINotSupported = "Este browser não suporta a API pedida."; -Strings.OfficeOM.L_SettingNameNotExist = "O nome da definição especificada não existe."; -Strings.OfficeOM.L_ActivityLimitReached = "O limite de atividade foi atingido."; +Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Nota: sugerimos que o número de células numa tabela seja inferior a 20.000 células."; +Strings.OfficeOM.L_ShuttingDown = "A operação falhou porque os dados no servidor estão obsoletos."; Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "A sua sessão do Office Online expirou ou é inválida. Para continuar, atualize a página."; -Strings.OfficeOM.L_EventHandlerNotExist = "O processador de eventos especificado não foi encontrado para este enlace."; -Strings.OfficeOM.L_ConnectionFailureWithStatus = "O pedido falhou com o código de estado {0}."; -Strings.OfficeOM.L_InvalidArgument = 'O argumento "{0}" não funciona para esta situação, está em falta ou não está no formato correto.'; -Strings.OfficeOM.L_CallbackNotAFunction = "A chamada de retorno tem de ser do tipo função e era do tipo {0}."; -Strings.OfficeOM.L_MissingParameter = "Parâmetro em Falta"; -Strings.OfficeOM.L_TooManyOptionalObjects = "vários objetos opcionais na lista de parâmetros"; -Strings.OfficeOM.L_CannotWriteToSelection = "Não é possível escrever para a seleção atual."; -Strings.OfficeOM.L_PropertyDoesNotExist = 'A propriedade "{0}" não existe no objeto.'; -Strings.OfficeOM.L_SSOServerErrorMessage = "Ocorreu um erro inesperado no servidor."; -Strings.OfficeOM.L_ColIndexOutOfRange = "O valor do índice de colunas encontra-se fora do intervalo permitido. Utilize um valor (0 ou superior) que seja inferior ao número de colunas."; -Strings.OfficeOM.L_InvalidFormatValue = "Um ou mais parâmetros de formatação possuem valores que não são permitidos. Verifique os valores e tente novamente."; -Strings.OfficeOM.L_ElementMissing = "Não conseguimos formatar a célula da tabela porque alguns valores de parâmetro estão em falta. Verifique os parâmetros e tente novamente."; -Strings.OfficeOM.L_InvalidSetRows = "As linhas especificadas são inválidas."; -Strings.OfficeOM.L_InvalidParameters = "A função {0} tem parâmetros inválidos."; -Strings.OfficeOM.L_IndexOutOfRange = "O índice está fora do intervalo."; -Strings.OfficeOM.L_SettingsStaleError = "Erro Obsoleto de Definições"; +Strings.OfficeOM.L_UserClickIgnore = "O utilizador optou por ignorar a caixa de diálogo."; +Strings.OfficeOM.L_NetworkProblem = "Problema de Rede"; Strings.OfficeOM.L_ShowWindowDialogNotification = "O suplemento {0} quer apresentar uma nova janela."; -Strings.OfficeOM.L_InvalidArgumentGeneric = "Os argumentos fornecidos à função não funcionam para esta situação, estão em falta ou não estão no formato correto."; +Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Faça uma seleção."; +Strings.OfficeOM.L_InvalidNode = "Nó Inválido"; +Strings.OfficeOM.L_BrowserAPINotSupported = "Este browser não suporta a API pedida."; +Strings.OfficeOM.L_InvalidSetColumns = "As colunas especificadas são inválidas."; +Strings.OfficeOM.L_TooManyOptionalFunction = "várias funções opcionais na lista de parâmetros"; +Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Nota: sugerimos que os conjuntos de formatação definidos por uma chamada de API de Formatação sejam inferiores a 100."; +Strings.OfficeOM.L_UserAbortedMessage = "O utilizador não consentiu as permissões do suplemento."; +Strings.OfficeOM.L_AppNameNotExist = "O Nome do Suplemento {0} não existe."; +Strings.OfficeOM.L_CustomFunctionImplementationMissing = 'A propriedade com este nome na classe Excel.CustomFunctions que representa a definição da função tem de conter uma propriedade "call" que implemente a função.'; +Strings.OfficeOM.L_InvalidResourceUrlMessage = "O URL do recurso especificado no manifesto é inválido."; +Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "O tipo de identidade do utilizador não é suportado."; Strings.OfficeOM.L_DialogAlreadyOpened = "A operação falhou porque este suplemento já tem uma caixa de diálogo ativa."; Strings.OfficeOM.L_DialogNavigateError = "Erro de Navegação da Caixa de Diálogo"; -Strings.OfficeOM.L_DataNotMatchCoercionType = "O tipo do objeto de dados especificado não é compatível com a seleção atual."; +Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "A operação não é suportada neste tipo de vínculo."; +Strings.OfficeOM.L_DataWriteError = "Erro de Escrita de Dados"; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory = "Este suplemento não suporta o consentimento do utilizador."; +Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "As restrições do browser impediram-nos de criar a caixa de diálogo. O domínio da caixa de diálogo e o domínio do anfitrião do suplemento não estão na mesma zona de segurança."; +Strings.OfficeOM.L_BindingCreationError = "Erro de Criação de Vínculo"; +Strings.OfficeOM.L_DialogRequireHTTPS = "O protocolo HTTP não é suportado. Em alternativa, utilize HTTPS"; +Strings.OfficeOM.L_OutOfRange = "Fora do Intervalo"; +Strings.OfficeOM.L_InvalidObjectPath = 'O caminho do objeto "{0}" não está a funcionar para a ação que está a tentar efetuar. Se estiver a utilizar o objeto em múltiplas chamadas de "context.sync" e fora da execução sequencial de um lote ".run", utilize os métodos "context.trackedObjects.add()" e "context.trackedObjects.remove()" para gerir a duração do objeto.'; +Strings.OfficeOM.L_SSOConnectionLostErrorMessage = "A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones."; +Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = 'As alterações à propriedade "{0}" não podem ser aplicadas através de um método "object.set".'; +Strings.OfficeOM.L_CannotNavigateTo = "O objeto está localizado num lugar onde a navegação não é suportada."; +Strings.OfficeOM.L_InvalidResourceUrl = "O URL do recurso de aplicação fornecido é inválido."; +Strings.OfficeOM.L_CannotRegisterEvent = "Não é possível registar o processador de eventos."; +Strings.OfficeOM.L_TooManyArguments = "demasiados argumentos"; +Strings.OfficeOM.L_EventHandlerRemovalFailed = "Não foi possível remover o processador de eventos."; +Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Os parâmetros coordenados não podem ser usados com Tabelas de tipo coerção quando a tabela contém células unidas."; +Strings.OfficeOM.L_InvalidValue = "Valor Inválido"; +Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Os argumentos de entrada são inválidos."; +Strings.OfficeOM.L_SettingsCannotSave = "Não foi possível guardar as definições."; +Strings.OfficeOM.L_ApiNotFoundDetails = "O método ou propriedade {0} faz parte do conjunto de requisitos {1}, que não está disponível na sua versão do {2}."; Strings.OfficeOM.L_GetDataIsTooLarge = "O conjunto de dados pedido é grande demais."; -Strings.OfficeOM.L_ReadSettingsError = "Erro ao Ler Definições"; -Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Nota: sugerimos que o número de células numa tabela seja inferior a 20.000 células."; -Strings.OfficeOM.L_DocumentReadOnly = "A operação solicitada não é permitida no modo de documento atual."; -Strings.OfficeOM.L_InvalidBinding = "Vínculo Inválido"; +Strings.OfficeOM.L_NewWindowCrossZone = 'As definições de segurança no seu browser impedem-nos de criar uma caixa de diálogo. Experimente um browser diferente ou {0} para que o "{1}" e o domínio apresentado na barra de endereços estejam na mesma zona de segurança.'; +Strings.OfficeOM.L_DataReadError = "Erro de Leitura de Dados"; +Strings.OfficeOM.L_NoCapability = "Não possui permissões suficientes para efetuar esta ação."; +Strings.OfficeOM.L_InvalidOrTimedOutSession = "Sessão Inválida ou Sessão Cujo Tempo Limite Foi Excedido"; +Strings.OfficeOM.L_InvalidGetStartRowColumn = "Os valores de startRow or startColumn especificados são inválidos."; +Strings.OfficeOM.L_InvalidArgumentGeneric = "Os argumentos fornecidos à função não funcionam para esta situação, estão em falta ou não estão no formato correto."; Strings.OfficeOM.L_MemoryLimit = "Limite de Memória Excedido"; -Strings.OfficeOM.L_SelectionNotSupportCoercionType = "A seleção atual não é compatível com tipo de coerção especificado."; -Strings.OfficeOM.L_HostError = "Erro de Anfitrião"; +Strings.OfficeOM.L_DialogAddressNotTrusted = "O domínio do URL não está incluído no elemento AppDomains no manifesto."; +Strings.OfficeOM.L_DataNotMatchBindingSize = "O objeto de dados fornecido não corresponde ao tamanho da seleção atual."; Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "O tipo de coerção especificado não é compatível com o este tipo de vínculo."; -Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "O conteúdo selecionado tem de estar em formato de tabela. Formate os dados como uma tabela e tente novamente."; -Strings.OfficeOM.L_UserNotSignedIn = "Nenhum utilizador tem sessão iniciada no Office."; -Strings.OfficeOM.L_BindingNotExist = "O vínculo especificado não existe."; -Strings.OfficeOM.L_GetSelectionNotSupported = "A seleção atual não é suportada."; -Strings.OfficeOM.L_InvalidSetStartRowColumn = "Os valores de startRow or startColumn especificados são inválidos."; -Strings.OfficeOM.L_RequestTokenUnavailable = "Esta API foi limitada para diminuir a frequência de chamadas."; -Strings.OfficeOM.L_NotSupportedEventType = "O tipo de evento especificado {0} não é suportado."; -Strings.OfficeOM.L_BadSelectorString = "A cadeia transmitida para o seletor está formatada de forma incorreta ou não é suportada."; -Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Os dados estão desatualizados. Obtenha novamente o objeto."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "A operação falhou porque este suplemento já está a pedir um token de acesso."; +Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "configure o seu browser"; +Strings.OfficeOM.L_CannotWriteToSelection = "Não é possível escrever para a seleção atual."; Strings.OfficeOM.L_FormattingReminder = "Lembrete de Formatação"; +Strings.OfficeOM.L_TooManyIncompleteRequests = "Aguarde até a chamada anterior ser concluída."; +Strings.OfficeOM.L_SettingsStaleError = "Erro Obsoleto de Definições"; Strings.OfficeOM.L_SaveSettingsError = "Erro ao Guardar Definições"; -Strings.OfficeOM.L_BindingCreationError = "Erro de Criação de Vínculo"; -Strings.OfficeOM.L_NavOutOfBound = "A operação falhou porque o índice está fora do intervalo."; -Strings.OfficeOM.L_InvalidGrant = "Autorização prévia em falta."; -Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Permitir"; -Strings.OfficeOM.L_SSOServerError = "Ocorreu um erro no fornecedor de autenticação."; -Strings.OfficeOM.L_DisplayDialogError = "Erro de Apresentação da Caixa de Diálogo"; -Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = 'As alterações à propriedade "{0}" não podem ser aplicadas através de um método "object.set".'; -Strings.OfficeOM.L_InvalidCellsValue = "Um ou mais parâmetros das células possuem valores que não são permitidos. Verifique os valores e tente novamente."; +Strings.OfficeOM.L_ConnectionFailureWithDetails = "O pedido falhou com o código de estado {0}, código de erro {1} e a seguinte mensagem de erro: {2}"; +Strings.OfficeOM.L_SSOConnectionLostError = "A connection was lost during the sign in process."; +Strings.OfficeOM.L_InvalidSSOAddinMessage = "A API de identidade não é suportada para este suplemento."; +Strings.OfficeOM.L_RunMustReturnPromise = 'A função de lotes passada para o método ".run" não devolveu uma promessa. A função tem de devolver uma promessa, para que todos os objetos controlados automaticamente possam ser libertados na conclusão da operação de lote. Normalmente, uma promessa é devolvida ao devolver a resposta de "context.sync()".'; +Strings.OfficeOM.L_NotSupported = "A função {0} não é suportada."; +Strings.OfficeOM.L_InvalidColumnsForBinding = "As colunas especificadas são inválidas."; Strings.OfficeOM.L_InValidOptionalArgument = "argumento opcional inválido"; -Strings.OfficeOM.L_NamedItemNotFound = "O item com nome não existe."; -Strings.OfficeOM.L_SpecifiedIdNotExist = "O ID especificado não existe."; -Strings.OfficeOM.L_DataNotMatchBindingSize = "O objeto de dados fornecido não corresponde ao tamanho da seleção atual."; -Strings.OfficeOM.L_InvalidRequestContext = "Não é possível utilizar o objeto em contextos de pedido diferentes."; -Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Os valores de rowCount e columnCount especificados são inválidos."; -Strings.OfficeOM.L_SetDataParametersConflict = "Os parâmetros especificados estão em conflito."; -Strings.OfficeOM.L_InvalidTableOptionValue = "Um ou mais parâmetros tableOptions possuem valores que não são permitidos. Verifique os valores e tente novamente."; -Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Os parâmetros coordenados não podem ser usados com Tabelas de tipo coerção quando a tabela contém células unidas."; -Strings.OfficeOM.L_SetDataIsTooLarge = "O objeto de dados especificado é grande demais."; -Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Limite de Seleção Atingido"; -Strings.OfficeOM.L_InvalidSetColumns = "As colunas especificadas são inválidas."; +Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Os dados estão desatualizados. Obtenha novamente o objeto."; +Strings.OfficeOM.L_UserNotSignedIn = "Nenhum utilizador tem sessão iniciada no Office."; +Strings.OfficeOM.L_InvalidDataFormat = "O formato do objeto de dados especificado é inválido."; +Strings.OfficeOM.L_InvalidAPICall = "Chamada de API Inválida"; +Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = 'A tentar definir a propriedade só de leitura "{0}".'; +Strings.OfficeOM.L_OverwriteWorksheetData = "A operação definida falhou porque o objeto de dados fornecido irá substituir ou alterar dados."; +Strings.OfficeOM.L_InvalidFormatValue = "Um ou mais parâmetros de formatação possuem valores que não são permitidos. Verifique os valores e tente novamente."; +Strings.OfficeOM.L_PermissionDenied = "Permissão Recusada"; +Strings.OfficeOM.L_UserAborted = "O utilizador abortou o pedido de consentimento."; +Strings.OfficeOM.L_ConnectionFailureWithStatus = "O pedido falhou com o código de estado {0}."; +Strings.OfficeOM.L_CustomXmlNodeNotFound = "O nó especificado não foi encontrado."; +Strings.OfficeOM.L_NotSupportedBindingType = "O tipo de vínculo especificado {0} não é suportado."; +Strings.OfficeOM.L_RedundantCallbackSpecification = "A chamada de retorno não pode ser especificada simultaneamente na lista de argumentos e no objeto opcional."; +Strings.OfficeOM.L_NavOutOfBound = "A operação falhou porque o índice está fora do intervalo."; +Strings.OfficeOM.L_ActivityLimitReached = "O limite de atividade foi atingido."; Strings.OfficeOM.L_OsfControlTypeNotSupported = "Tipo de OsfControl não suportado."; -Strings.OfficeOM.L_DataStale = "Dados Obsoletos"; +Strings.OfficeOM.L_InternalError = "Erro Interno"; +Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Os parâmetros coordenados não podem ser usados com Tabelas de tipo coerção quando a tabela contém células unidas."; Strings.OfficeOM.L_InvalidApiCallInContext = "Chamada de API inválida no contexto atual."; -Strings.OfficeOM.L_NewWindowCrossZone = 'As definições de segurança no seu browser impedem-nos de criar uma caixa de diálogo. Experimente um browser diferente ou {0} para que o "{1}" e o domínio apresentado na barra de endereços estejam na mesma zona de segurança.'; Strings.OfficeOM.L_InternalErrorDescription = "Ocorreu um erro interno."; -Strings.OfficeOM.L_DataWriteError = "Erro de Escrita de Dados"; -Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = 'A tentar definir a propriedade só de leitura "{0}".'; -Strings.OfficeOM.L_SettingsCannotSave = "Não foi possível guardar as definições."; +Strings.OfficeOM.L_CoercionTypeNotSupported = "O tipo de coerção especificado não é suportado."; +Strings.OfficeOM.L_NamedItemNotFound = "O item com nome não existe."; +Strings.OfficeOM.L_InvalidDataObject = "Objeto de Dados Inválido"; +Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "O XPath limita a seleção a 1 024 itens."; +Strings.OfficeOM.L_InvalidRequestContext = "Não é possível utilizar o objeto em contextos de pedido diferentes."; +Strings.OfficeOM.L_InvalidBinding = "Vínculo Inválido"; +Strings.OfficeOM.L_APINotSupported = "API Não Suportada"; +Strings.OfficeOM.L_CustomXmlOutOfDateName = "Dados Obsoletos"; +Strings.OfficeOM.L_DataNotMatchBindingType = "O objeto de dados especificado não é compatível com o tipo de vínculo."; +Strings.OfficeOM.L_MissingParameter = "Parâmetro em Falta"; +Strings.OfficeOM.L_InvalidTableOptionValue = "Um ou mais parâmetros tableOptions possuem valores que não são permitidos. Verifique os valores e tente novamente."; +Strings.OfficeOM.L_MultipleNamedItemFound = "Foram encontrados vários objetos com o mesmo nome."; +Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "O conteúdo selecionado tem de estar em formato de tabela. Formate os dados como uma tabela e tente novamente."; +Strings.OfficeOM.L_RequestTimeout = "A chamada demorou demasiado tempo a ser executada."; +Strings.OfficeOM.L_EventHandlerNotExist = "O processador de eventos especificado não foi encontrado para este vínculo."; +Strings.OfficeOM.L_ElementMissing = "Não conseguimos formatar a célula da tabela porque alguns valores de parâmetro estão em falta. Verifique os parâmetros e tente novamente."; Strings.OfficeOM.L_DialogInvalidScheme = "O esquema de URL não é suportado. Em alternativa, utilize HTTPS."; -Strings.OfficeOM.L_CustomXmlNodeNotFound = "O nó especificado não foi encontrado."; -Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "A operação não é suportada neste tipo de vínculo."; +Strings.OfficeOM.L_FunctionCallFailed = "Chamada de função {0} falhou, código de erro: {1}."; +Strings.OfficeOM.L_InitializeNotReady = "O Office.js ainda não foi totalmente carregado. Tente novamente mais tarde ou certifique-se de que adiciona o seu código de inicialização na função Office.initialize."; +Strings.OfficeOM.L_DialogOK = "OK"; +Strings.OfficeOM.L_SSOClientError = "Ocorreu um erro no pedido de autenticação do Office."; +Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Permitir"; +Strings.OfficeOM.L_SetDataParametersConflict = "Os parâmetros especificados estão em conflito."; +Strings.OfficeOM.L_UnknownBindingType = "O tipo de vínculo não é suportado."; +Strings.OfficeOM.L_CustomFunctionNameCannotSplit = "O nome da função tem de conter um espaço de nomes não vazio e um nome abreviado não vazio."; +Strings.OfficeOM.L_GetDataParametersConflict = "Os parâmetros especificados estão em conflito."; +Strings.OfficeOM.L_InvalidFormat = "Erro de Formato Inválido"; Strings.OfficeOM.L_InvalidGrantMessage = "Não tem permissão para este suplemento."; -Strings.OfficeOM.L_SelectionCannotBound = "Não é possível vincular à seleção atual."; -Strings.OfficeOM.L_ValueNotLoaded = 'O valor do objeto de resultado ainda não foi carregado. Antes de ler a propriedade de valor, faça uma chamada a "context.sync()" no contexto do pedido associado.'; +Strings.OfficeOM.L_SettingsAreStale = "Não foi possível guardar as definições por estarem obsoletas."; +Strings.OfficeOM.L_SetDataIsTooLarge = "O objeto de dados especificado é grande demais."; +Strings.OfficeOM.L_InvalidReadForBlankRow = "A linha especificada está em branco."; +Strings.OfficeOM.L_DataStale = "Dados Obsoletos"; +Strings.OfficeOM.L_CallbackNotAFunction = "A chamada de retorno tem de ser do tipo função e era do tipo {0}."; +Strings.OfficeOM.L_DocumentReadOnly = "A operação solicitada não é permitida no modo de documento atual."; +Strings.OfficeOM.L_InvalidGetColumns = "As colunas especificadas são inválidas."; +Strings.OfficeOM.L_SettingNameNotExist = "O nome da definição especificada não existe."; +Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Os valores de rowCount e columnCount especificados são inválidos."; +Strings.OfficeOM.L_SSOServerError = "Ocorreu um erro no fornecedor de autenticação."; +Strings.OfficeOM.L_Timeout = "A operação excedeu o tempo limite."; +Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Um problema de rede impediu a obtenção do ficheiro."; +Strings.OfficeOM.L_InvalidGetRows = "As linhas especificadas são inválidas."; +Strings.OfficeOM.L_InvalidSelectionForBindingType = "Não é possível criar um vínculo com a seleção atual e o tipo de vínculo especificado."; +Strings.OfficeOM.L_RowIndexOutOfRange = "O valor do índice de linhas encontra-se fora do intervalo permitido. Utilize um valor (0 ou superior) que seja inferior ao número de linhas."; +Strings.OfficeOM.L_NotSupportedEventType = "O tipo de evento especificado {0} não é suportado."; +Strings.OfficeOM.L_BindingToMultipleSelection = "As seleções não contíguas não são suportadas."; +Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Ignorar"; +Strings.OfficeOM.L_SSOServerErrorMessage = "Ocorreu um erro inesperado no servidor."; +Strings.OfficeOM.L_EventRegistrationError = "Erro de Registo de Evento"; +Strings.OfficeOM.L_CustomFunctionDefinitionMissing = "Tem de existir uma propriedade com este nome na classe Excel.CustomFunctions que represente a definição da função."; Strings.OfficeOM.L_EventHandlerAdditionFailed = "Não foi possível adicionar o processador de eventos."; -Strings.OfficeOM.L_InvalidBindingError = "Erro de Vínculo Inválido"; Strings.OfficeOM.L_InvalidCoercion = "Tipo de Coerção Inválido"; -Strings.OfficeOM.L_TooManyIncompleteRequests = "Aguarde até a chamada anterior ser concluída."; -Strings.OfficeOM.L_InvalidGetColumns = "As colunas especificadas são inválidas."; -Strings.OfficeOM.L_ConnectionFailureWithDetails = "O pedido falhou com o código de estado {0}, código de erro {1} e a seguinte mensagem de erro: {2}"; -Strings.OfficeOM.L_PropertyNotLoaded = 'A propriedade "{0}" não está disponível. Antes de ler o valor da propriedade, chame o método de carregamento no objeto contentor e chame "context.sync()" no contexto de pedido associado.'; -Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "A aplicação {0} não existe. O Microsoft.Office.WebExtension.Initialize(reason) não foi chamado."; -Strings.OfficeOM.L_InternalError = "Erro Interno"; -Strings.OfficeOM.L_InvalidAPICall = "Chamada de API Inválida"; -Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "O XPath limita a seleção a 1 024 itens."; -Strings.OfficeOM.L_InvalidReadForBlankRow = "A linha especificada está em branco."; -Strings.OfficeOM.L_CannotRegisterEvent = "Não é possível registar o processador de eventos."; -Strings.OfficeOM.L_UnsupportedEnumerationMessage = "A enumeração não é suportada na aplicação do anfitrião atual."; -Strings.OfficeOM.L_OutOfRange = "Fora do Intervalo"; -Strings.OfficeOM.L_NotSupportedBindingType = "O tipo de enlace especificado {0} não é suportado."; -Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "O tipo de identidade do utilizador não é suportado."; -Strings.OfficeOM.L_NotSupported = "A função {0} não é suportada."; -Strings.OfficeOM.L_InvalidColumnsForBinding = "As colunas especificadas são inválidas."; -Strings.OfficeOM.L_InvalidNode = "Nó Inválido"; -Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Faça uma seleção."; -Strings.OfficeOM.L_GetDataParametersConflict = "Os parâmetros especificados estão em conflito."; -Strings.OfficeOM.L_FunctionCallFailed = "Chamada de função {0} falhou, código de erro: {1}."; -Strings.OfficeOM.L_NoCapability = "Não possui permissões suficientes para efetuar esta ação."; -Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "configure o seu browser"; Strings.OfficeOM.L_OperationNotSupported = "A operação não é suportada."; -Strings.OfficeOM.L_UnsupportedDataObject = "O objeto de dados fornecido não é suportado."; -Strings.OfficeOM.L_InvalidFormat = "Erro de Formato Inválido"; -Strings.OfficeOM.L_InvalidResourceUrlMessage = "O URL do recurso especificado no manifesto é inválido."; -Strings.OfficeOM.L_TooManyOptionalFunction = "várias funções opcionais na lista de parâmetros"; -Strings.OfficeOM.L_DataReadError = "Erro de Leitura de Dados"; -Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "A operação falhou porque este suplemento já está a pedir um token de acesso."; -Strings.OfficeOM.L_SSOClientError = "Ocorreu um erro no pedido de autenticação do Office."; -Strings.OfficeOM.L_InvalidDataFormat = "O formato do objeto de dados especificado é inválido."; -Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "As restrições do browser impediram-nos de criar a caixa de diálogo. O domínio da caixa de diálogo e o domínio do anfitrião do suplemento não estão na mesma zona de segurança."; -Strings.OfficeOM.L_FormatValueOutOfRange = "O valor está fora do intervalo permitido."; +Strings.OfficeOM.L_APICallFailed = "Falha na Chamada à API"; +Strings.OfficeOM.L_PropertyNotLoaded = 'A propriedade "{0}" não está disponível. Antes de ler o valor da propriedade, chame o método de carregamento no objeto contentor e chame "context.sync()" no contexto de pedido associado.'; +Strings.OfficeOM.L_InvalidOperationInCellEditMode = "O Excel está em modo de edição de célula. Saia do modo de edição ao premir Enter ou a Tecla de Tabulação ou ao selecionar outra célula. Em seguida, tente novamente."; +Strings.OfficeOM.L_IndexOutOfRange = "O índice está fora do intervalo."; Strings.OfficeOM.L_InvalidBindingOperation = "Operação de Vínculo Inválido"; -Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Ignorar"; -Strings.OfficeOM.L_RequestTimeout = "A chamada demorou demasiado tempo a ser executada."; -Strings.OfficeOM.L_OverwriteWorksheetData = "A operação definida falhou porque o objeto de dados fornecido irá substituir ou alterar dados."; -Strings.OfficeOM.L_DialogAddressNotTrusted = "O domínio do URL não está incluído no elemento AppDomains no manifesto."; +Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Ligar ao closeAsync no Ficheiro atual antes de obter outro."; +Strings.OfficeOM.L_BadSelectorString = "A cadeia transmitida para o seletor está formatada de forma incorreta ou não é suportada."; +Strings.OfficeOM.L_DataNotMatchCoercionType = "O tipo do objeto de dados especificado não é compatível com a seleção atual."; +Strings.OfficeOM.L_UnsupportedDataObject = "O objeto de dados fornecido não é suportado."; +Strings.OfficeOM.L_CustomFunctionNameContainsBadChars = "O nome da função só pode conter letras, algarismos, carateres de sublinhado e pontos finais."; Strings.OfficeOM.L_NotImplemented = "A função {0} não está implementada."; -Strings.OfficeOM.L_ShuttingDown = "A operação falhou porque os dados no servidor estão obsoletos."; -Strings.OfficeOM.L_CannotNavigateTo = "O objeto está localizado num lugar onde a navegação não é suportada." +Strings.OfficeOM.L_InvalidArgument = 'O argumento "{0}" não funciona para esta situação, está em falta ou não está no formato correto.'; +Strings.OfficeOM.L_InvalidBindingError = "Erro de Vínculo Inválido"; +Strings.OfficeOM.L_DataNotMatchSelection = "O objeto de dados fornecido não é compatível com a forma ou dimensões da seleção atual."; +Strings.OfficeOM.L_SSOClientErrorMessage = "Ocorreu um erro inesperado no cliente."; +Strings.OfficeOM.L_InvalidParameters = "A função {0} tem parâmetros inválidos."; +Strings.OfficeOM.L_CustomXmlError = "Erro de XML Personalizado."; +Strings.OfficeOM.L_ReadSettingsError = "Erro ao Ler Definições"; +Strings.OfficeOM.L_InvalidSetStartRowColumn = "Os valores de startRow or startColumn especificados são inválidos."; +Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "A aplicação {0} não existe. O Microsoft.Office.WebExtension.Initialize(reason) não foi chamado."; +Strings.OfficeOM.L_DisplayDialogError = "Erro de Apresentação da Caixa de Diálogo"; +Strings.OfficeOM.L_FormatValueOutOfRange = "O valor está fora do intervalo permitido."; +Strings.OfficeOM.L_ColIndexOutOfRange = "O valor do índice de colunas encontra-se fora do intervalo permitido. Utilize um valor (0 ou superior) que seja inferior ao número de colunas."; +Strings.OfficeOM.L_SelectionNotSupportCoercionType = "A seleção atual não é compatível com tipo de coerção especificado."; +Strings.OfficeOM.L_HostError = "Erro de Anfitrião"; +Strings.OfficeOM.L_ValueNotLoaded = 'O valor do objeto de resultado ainda não foi carregado. Antes de ler a propriedade de valor, faça uma chamada a "context.sync()" no contexto do pedido associado.'; +Strings.OfficeOM.L_GetSelectionNotSupported = "A seleção atual não é suportada." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/pt-pt/office_strings.js b/node_modules/@microsoft/office-js/dist/pt-pt/office_strings.js index 98f4a67..8896720 100644 --- a/node_modules/@microsoft/office-js/dist/pt-pt/office_strings.js +++ b/node_modules/@microsoft/office-js/dist/pt-pt/office_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_InvalidOrTimedOutSession="Sessão Inválida ou Sessão Cujo Tempo Limite Foi Excedido";Strings.OfficeOM.L_RowIndexOutOfRange="O valor do índice de linhas encontra-se fora do intervalo permitido. Utilize um valor (0 ou superior) que seja inferior ao número de linhas.";Strings.OfficeOM.L_AppNameNotExist="O Nome do Suplemento {0} não existe.";Strings.OfficeOM.L_EventHandlerRemovalFailed="Não foi possível remover o processador de eventos.";Strings.OfficeOM.L_DataNotMatchBindingType="O objeto de dados especificado não é compatível com o tipo de vínculo.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Dados Obsoletos";Strings.OfficeOM.L_FileTypeNotSupported="O tipo de ficheiro especificado não é suportado.";Strings.OfficeOM.L_PermissionDenied="Permissão Recusada";Strings.OfficeOM.L_UserAbortedMessage="O utilizador não consentiu as permissões do suplemento.";Strings.OfficeOM.L_UserClickIgnore="O utilizador optou por ignorar a caixa de diálogo.";Strings.OfficeOM.L_RunMustReturnPromise='A função de lotes passada para o método ".run" não devolveu uma promessa. A função tem de devolver uma promessa, para que todos os objetos controlados automaticamente possam ser libertados na conclusão da operação de lote. Normalmente, uma promessa é devolvida ao devolver a resposta de "context.sync()".';Strings.OfficeOM.L_NetworkProblem="Problema de Rede";Strings.OfficeOM.L_EventRegistrationError="Erro de Registo de Evento";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Os argumentos de entrada são inválidos.";Strings.OfficeOM.L_InvalidSelectionForBindingType="Não é possível criar um vínculo com a seleção atual e o tipo de vínculo especificado.";Strings.OfficeOM.L_UnsupportedUserIdentity="O tipo de identidade de utilizador não é suportado.";Strings.OfficeOM.L_Timeout="A operação excedeu o tempo limite.";Strings.OfficeOM.L_InvalidValue="Valor Inválido";Strings.OfficeOM.L_InvalidObjectPath='O caminho do objeto "{0}" não está a funcionar para a ação que está a tentar efetuar. Se estiver a utilizar o objeto em múltiplas chamadas de "context.sync" e fora da execução sequencial de um lote ".run", utilize os métodos "context.trackedObjects.add()" e "context.trackedObjects.remove()" para gerir a duração do objeto.';Strings.OfficeOM.L_UnknownBindingType="O tipo de vínculo não é suportado.";Strings.OfficeOM.L_RedundantCallbackSpecification="A chamada de retorno não pode ser especificada simultaneamente na lista de argumentos e no objeto opcional.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Os parâmetros coordenados não podem ser usados com Tabelas de tipo coerção quando a tabela contém células unidas.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Nota: sugerimos que os conjuntos de formatação definidos por uma chamada de API de Formatação sejam inferiores a 100.";Strings.OfficeOM.L_SliceSizeNotSupported="O tamanho de setor especificado não é suportado.";Strings.OfficeOM.L_InitializeNotReady="O Office.js ainda não foi totalmente carregado. Tente novamente mais tarde ou certifique-se de que adiciona o seu código de inicialização na função Office.initialize.";Strings.OfficeOM.L_DataWriteReminder="Lembrete de Escrita de Dados";Strings.OfficeOM.L_APICallFailed="Falha na Chamada à API";Strings.OfficeOM.L_DialogRequireHTTPS="O protocolo HTTP não é suportado. Em alternativa, utilize HTTPS";Strings.OfficeOM.L_DataNotMatchSelection="O objeto de dados fornecido não é compatível com a forma ou dimensões da seleção atual.";Strings.OfficeOM.L_SSOClientErrorMessage="Ocorreu um erro inesperado no cliente.";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_TooManyArguments="demasiados argumentos";Strings.OfficeOM.L_InvalidGetStartRowColumn="Os valores de startRow or startColumn especificados são inválidos.";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Ligar ao closeAsync no Ficheiro atual antes de obter outro.";Strings.OfficeOM.L_APINotSupported="API Não Suportada";Strings.OfficeOM.L_MultipleNamedItemFound="Foram encontrados vários objetos com o mesmo nome.";Strings.OfficeOM.L_MissingRequiredArguments="faltam alguns argumentos necessários";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Um problema de rede impediu a obtenção do ficheiro.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="O tipo de vínculo especificado não é compatível com item nomeado fornecido.";Strings.OfficeOM.L_UnsupportedEnumeration="Enumeração Não Suportada";Strings.OfficeOM.L_InvalidSSOAddinMessage="A API de identidade não é suportada para este suplemento.";Strings.OfficeOM.L_InvalidGetRows="As linhas especificadas são inválidas.";Strings.OfficeOM.L_CoercionTypeNotSupported="O tipo de coerção especificado não é suportado.";Strings.OfficeOM.L_InvalidResourceUrl="O URL do recurso de aplicação fornecido é inválido.";Strings.OfficeOM.L_UserAborted="O utilizador abortou o pedido de consentimento.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="O suplemento já está a pedir um token de acesso.";Strings.OfficeOM.L_BindingToMultipleSelection="As seleções não contíguas não são suportadas.";Strings.OfficeOM.L_SettingsAreStale="Não foi possível guardar as definições por estarem obsoletas.";Strings.OfficeOM.L_InvalidDataObject="Objeto de Dados Inválido";Strings.OfficeOM.L_CustomXmlError="Erro de XML Personalizado.";Strings.OfficeOM.L_BrowserAPINotSupported="Este browser não suporta a API pedida.";Strings.OfficeOM.L_SettingNameNotExist="O nome da definição especificada não existe.";Strings.OfficeOM.L_ActivityLimitReached="O limite de atividade foi atingido.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="A sua sessão do Office Online expirou ou é inválida. Para continuar, atualize a página.";Strings.OfficeOM.L_EventHandlerNotExist="O processador de eventos especificado não foi encontrado para este enlace.";Strings.OfficeOM.L_ConnectionFailureWithStatus="O pedido falhou com o código de estado {0}.";Strings.OfficeOM.L_InvalidArgument='O argumento "{0}" não funciona para esta situação, está em falta ou não está no formato correto.';Strings.OfficeOM.L_CallbackNotAFunction="A chamada de retorno tem de ser do tipo função e era do tipo {0}.";Strings.OfficeOM.L_MissingParameter="Parâmetro em Falta";Strings.OfficeOM.L_TooManyOptionalObjects="vários objetos opcionais na lista de parâmetros";Strings.OfficeOM.L_CannotWriteToSelection="Não é possível escrever para a seleção atual.";Strings.OfficeOM.L_PropertyDoesNotExist='A propriedade "{0}" não existe no objeto.';Strings.OfficeOM.L_SSOServerErrorMessage="Ocorreu um erro inesperado no servidor.";Strings.OfficeOM.L_ColIndexOutOfRange="O valor do índice de colunas encontra-se fora do intervalo permitido. Utilize um valor (0 ou superior) que seja inferior ao número de colunas.";Strings.OfficeOM.L_InvalidFormatValue="Um ou mais parâmetros de formatação possuem valores que não são permitidos. Verifique os valores e tente novamente.";Strings.OfficeOM.L_ElementMissing="Não conseguimos formatar a célula da tabela porque alguns valores de parâmetro estão em falta. Verifique os parâmetros e tente novamente.";Strings.OfficeOM.L_InvalidSetRows="As linhas especificadas são inválidas.";Strings.OfficeOM.L_InvalidParameters="A função {0} tem parâmetros inválidos.";Strings.OfficeOM.L_IndexOutOfRange="O índice está fora do intervalo.";Strings.OfficeOM.L_SettingsStaleError="Erro Obsoleto de Definições";Strings.OfficeOM.L_ShowWindowDialogNotification="O suplemento {0} quer apresentar uma nova janela.";Strings.OfficeOM.L_InvalidArgumentGeneric="Os argumentos fornecidos à função não funcionam para esta situação, estão em falta ou não estão no formato correto.";Strings.OfficeOM.L_DialogAlreadyOpened="A operação falhou porque este suplemento já tem uma caixa de diálogo ativa.";Strings.OfficeOM.L_DialogNavigateError="Erro de Navegação da Caixa de Diálogo";Strings.OfficeOM.L_DataNotMatchCoercionType="O tipo do objeto de dados especificado não é compatível com a seleção atual.";Strings.OfficeOM.L_GetDataIsTooLarge="O conjunto de dados pedido é grande demais.";Strings.OfficeOM.L_ReadSettingsError="Erro ao Ler Definições";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Nota: sugerimos que o número de células numa tabela seja inferior a 20.000 células.";Strings.OfficeOM.L_DocumentReadOnly="A operação solicitada não é permitida no modo de documento atual.";Strings.OfficeOM.L_InvalidBinding="Vínculo Inválido";Strings.OfficeOM.L_MemoryLimit="Limite de Memória Excedido";Strings.OfficeOM.L_SelectionNotSupportCoercionType="A seleção atual não é compatível com tipo de coerção especificado.";Strings.OfficeOM.L_HostError="Erro de Anfitrião";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="O tipo de coerção especificado não é compatível com o este tipo de vínculo.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="O conteúdo selecionado tem de estar em formato de tabela. Formate os dados como uma tabela e tente novamente.";Strings.OfficeOM.L_UserNotSignedIn="Nenhum utilizador tem sessão iniciada no Office.";Strings.OfficeOM.L_BindingNotExist="O vínculo especificado não existe.";Strings.OfficeOM.L_GetSelectionNotSupported="A seleção atual não é suportada.";Strings.OfficeOM.L_InvalidSetStartRowColumn="Os valores de startRow or startColumn especificados são inválidos.";Strings.OfficeOM.L_RequestTokenUnavailable="Esta API foi limitada para diminuir a frequência de chamadas.";Strings.OfficeOM.L_NotSupportedEventType="O tipo de evento especificado {0} não é suportado.";Strings.OfficeOM.L_BadSelectorString="A cadeia transmitida para o seletor está formatada de forma incorreta ou não é suportada.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Os dados estão desatualizados. Obtenha novamente o objeto.";Strings.OfficeOM.L_FormattingReminder="Lembrete de Formatação";Strings.OfficeOM.L_SaveSettingsError="Erro ao Guardar Definições";Strings.OfficeOM.L_BindingCreationError="Erro de Criação de Vínculo";Strings.OfficeOM.L_NavOutOfBound="A operação falhou porque o índice está fora do intervalo.";Strings.OfficeOM.L_InvalidGrant="Autorização prévia em falta.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Permitir";Strings.OfficeOM.L_SSOServerError="Ocorreu um erro no fornecedor de autenticação.";Strings.OfficeOM.L_DisplayDialogError="Erro de Apresentação da Caixa de Diálogo";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod='As alterações à propriedade "{0}" não podem ser aplicadas através de um método "object.set".';Strings.OfficeOM.L_InvalidCellsValue="Um ou mais parâmetros das células possuem valores que não são permitidos. Verifique os valores e tente novamente.";Strings.OfficeOM.L_InValidOptionalArgument="argumento opcional inválido";Strings.OfficeOM.L_NamedItemNotFound="O item com nome não existe.";Strings.OfficeOM.L_SpecifiedIdNotExist="O ID especificado não existe.";Strings.OfficeOM.L_DataNotMatchBindingSize="O objeto de dados fornecido não corresponde ao tamanho da seleção atual.";Strings.OfficeOM.L_InvalidRequestContext="Não é possível utilizar o objeto em contextos de pedido diferentes.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Os valores de rowCount e columnCount especificados são inválidos.";Strings.OfficeOM.L_SetDataParametersConflict="Os parâmetros especificados estão em conflito.";Strings.OfficeOM.L_InvalidTableOptionValue="Um ou mais parâmetros tableOptions possuem valores que não são permitidos. Verifique os valores e tente novamente.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Os parâmetros coordenados não podem ser usados com Tabelas de tipo coerção quando a tabela contém células unidas.";Strings.OfficeOM.L_SetDataIsTooLarge="O objeto de dados especificado é grande demais.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Limite de Seleção Atingido";Strings.OfficeOM.L_InvalidSetColumns="As colunas especificadas são inválidas.";Strings.OfficeOM.L_OsfControlTypeNotSupported="Tipo de OsfControl não suportado.";Strings.OfficeOM.L_DataStale="Dados Obsoletos";Strings.OfficeOM.L_InvalidApiCallInContext="Chamada de API inválida no contexto atual.";Strings.OfficeOM.L_NewWindowCrossZone='As definições de segurança no seu browser impedem-nos de criar uma caixa de diálogo. Experimente um browser diferente ou {0} para que o "{1}" e o domínio apresentado na barra de endereços estejam na mesma zona de segurança.';Strings.OfficeOM.L_InternalErrorDescription="Ocorreu um erro interno.";Strings.OfficeOM.L_DataWriteError="Erro de Escrita de Dados";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty='A tentar definir a propriedade só de leitura "{0}".';Strings.OfficeOM.L_SettingsCannotSave="Não foi possível guardar as definições.";Strings.OfficeOM.L_DialogInvalidScheme="O esquema de URL não é suportado. Em alternativa, utilize HTTPS.";Strings.OfficeOM.L_CustomXmlNodeNotFound="O nó especificado não foi encontrado.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="A operação não é suportada neste tipo de vínculo.";Strings.OfficeOM.L_InvalidGrantMessage="Não tem permissão para este suplemento.";Strings.OfficeOM.L_SelectionCannotBound="Não é possível vincular à seleção atual.";Strings.OfficeOM.L_ValueNotLoaded='O valor do objeto de resultado ainda não foi carregado. Antes de ler a propriedade de valor, faça uma chamada a "context.sync()" no contexto do pedido associado.';Strings.OfficeOM.L_EventHandlerAdditionFailed="Não foi possível adicionar o processador de eventos.";Strings.OfficeOM.L_InvalidBindingError="Erro de Vínculo Inválido";Strings.OfficeOM.L_InvalidCoercion="Tipo de Coerção Inválido";Strings.OfficeOM.L_TooManyIncompleteRequests="Aguarde até a chamada anterior ser concluída.";Strings.OfficeOM.L_InvalidGetColumns="As colunas especificadas são inválidas.";Strings.OfficeOM.L_ConnectionFailureWithDetails="O pedido falhou com o código de estado {0}, código de erro {1} e a seguinte mensagem de erro: {2}";Strings.OfficeOM.L_PropertyNotLoaded='A propriedade "{0}" não está disponível. Antes de ler o valor da propriedade, chame o método de carregamento no objeto contentor e chame "context.sync()" no contexto de pedido associado.';Strings.OfficeOM.L_AppNotExistInitializeNotCalled="A aplicação {0} não existe. O Microsoft.Office.WebExtension.Initialize(reason) não foi chamado.";Strings.OfficeOM.L_InternalError="Erro Interno";Strings.OfficeOM.L_InvalidAPICall="Chamada de API Inválida";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="O XPath limita a seleção a 1 024 itens.";Strings.OfficeOM.L_InvalidReadForBlankRow="A linha especificada está em branco.";Strings.OfficeOM.L_CannotRegisterEvent="Não é possível registar o processador de eventos.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="A enumeração não é suportada na aplicação do anfitrião atual.";Strings.OfficeOM.L_OutOfRange="Fora do Intervalo";Strings.OfficeOM.L_NotSupportedBindingType="O tipo de enlace especificado {0} não é suportado.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="O tipo de identidade do utilizador não é suportado.";Strings.OfficeOM.L_NotSupported="A função {0} não é suportada.";Strings.OfficeOM.L_InvalidColumnsForBinding="As colunas especificadas são inválidas.";Strings.OfficeOM.L_InvalidNode="Nó Inválido";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Faça uma seleção.";Strings.OfficeOM.L_GetDataParametersConflict="Os parâmetros especificados estão em conflito.";Strings.OfficeOM.L_FunctionCallFailed="Chamada de função {0} falhou, código de erro: {1}.";Strings.OfficeOM.L_NoCapability="Não possui permissões suficientes para efetuar esta ação.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="configure o seu browser";Strings.OfficeOM.L_OperationNotSupported="A operação não é suportada.";Strings.OfficeOM.L_UnsupportedDataObject="O objeto de dados fornecido não é suportado.";Strings.OfficeOM.L_InvalidFormat="Erro de Formato Inválido";Strings.OfficeOM.L_InvalidResourceUrlMessage="O URL do recurso especificado no manifesto é inválido.";Strings.OfficeOM.L_TooManyOptionalFunction="várias funções opcionais na lista de parâmetros";Strings.OfficeOM.L_DataReadError="Erro de Leitura de Dados";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="A operação falhou porque este suplemento já está a pedir um token de acesso.";Strings.OfficeOM.L_SSOClientError="Ocorreu um erro no pedido de autenticação do Office.";Strings.OfficeOM.L_InvalidDataFormat="O formato do objeto de dados especificado é inválido.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="As restrições do browser impediram-nos de criar a caixa de diálogo. O domínio da caixa de diálogo e o domínio do anfitrião do suplemento não estão na mesma zona de segurança.";Strings.OfficeOM.L_FormatValueOutOfRange="O valor está fora do intervalo permitido.";Strings.OfficeOM.L_InvalidBindingOperation="Operação de Vínculo Inválido";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Ignorar";Strings.OfficeOM.L_RequestTimeout="A chamada demorou demasiado tempo a ser executada.";Strings.OfficeOM.L_OverwriteWorksheetData="A operação definida falhou porque o objeto de dados fornecido irá substituir ou alterar dados.";Strings.OfficeOM.L_DialogAddressNotTrusted="O domínio do URL não está incluído no elemento AppDomains no manifesto.";Strings.OfficeOM.L_NotImplemented="A função {0} não está implementada.";Strings.OfficeOM.L_ShuttingDown="A operação falhou porque os dados no servidor estão obsoletos.";Strings.OfficeOM.L_CannotNavigateTo="O objeto está localizado num lugar onde a navegação não é suportada." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage="A operação falhou porque este suplemento não suporta o consentimento do utilizador nesta categoria";Strings.OfficeOM.L_UnsupportedEnumerationMessage="A enumeração não é suportada na aplicação do anfitrião atual.";Strings.OfficeOM.L_DataWriteReminder="Lembrete de Escrita de Dados";Strings.OfficeOM.L_TooManyOptionalObjects="vários objetos opcionais na lista de parâmetros";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Limite de Seleção Atingido";Strings.OfficeOM.L_InvalidNamedItemForBindingType="O tipo de vínculo especificado não é compatível com item nomeado fornecido.";Strings.OfficeOM.L_BindingNotExist="O vínculo especificado não existe.";Strings.OfficeOM.L_FileTypeNotSupported="O tipo de ficheiro especificado não é suportado.";Strings.OfficeOM.L_InvalidCellsValue="Um ou mais parâmetros das células possuem valores que não são permitidos. Verifique os valores e tente novamente.";Strings.OfficeOM.L_InvalidSetRows="As linhas especificadas são inválidas.";Strings.OfficeOM.L_InvalidGrant="Autorização prévia em falta.";Strings.OfficeOM.L_SelectionCannotBound="Não é possível vincular à seleção atual.";Strings.OfficeOM.L_UnsupportedUserIdentity="O tipo de identidade de utilizador não é suportado.";Strings.OfficeOM.L_PropertyDoesNotExist='A propriedade "{0}" não existe no objeto.';Strings.OfficeOM.L_RequestTokenUnavailable="Esta API foi limitada para diminuir a frequência de chamadas.";Strings.OfficeOM.L_SpecifiedIdNotExist="O ID especificado não existe.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="O suplemento já está a pedir um token de acesso.";Strings.OfficeOM.L_MissingRequiredArguments="faltam alguns argumentos necessários";Strings.OfficeOM.L_SliceSizeNotSupported="O tamanho de setor especificado não é suportado.";Strings.OfficeOM.L_UnsupportedEnumeration="Enumeração Não Suportada";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Nota: sugerimos que o número de células numa tabela seja inferior a 20.000 células.";Strings.OfficeOM.L_ShuttingDown="A operação falhou porque os dados no servidor estão obsoletos.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="A sua sessão do Office Online expirou ou é inválida. Para continuar, atualize a página.";Strings.OfficeOM.L_UserClickIgnore="O utilizador optou por ignorar a caixa de diálogo.";Strings.OfficeOM.L_NetworkProblem="Problema de Rede";Strings.OfficeOM.L_ShowWindowDialogNotification="O suplemento {0} quer apresentar uma nova janela.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Faça uma seleção.";Strings.OfficeOM.L_InvalidNode="Nó Inválido";Strings.OfficeOM.L_BrowserAPINotSupported="Este browser não suporta a API pedida.";Strings.OfficeOM.L_InvalidSetColumns="As colunas especificadas são inválidas.";Strings.OfficeOM.L_TooManyOptionalFunction="várias funções opcionais na lista de parâmetros";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Nota: sugerimos que os conjuntos de formatação definidos por uma chamada de API de Formatação sejam inferiores a 100.";Strings.OfficeOM.L_UserAbortedMessage="O utilizador não consentiu as permissões do suplemento.";Strings.OfficeOM.L_AppNameNotExist="O Nome do Suplemento {0} não existe.";Strings.OfficeOM.L_CustomFunctionImplementationMissing='A propriedade com este nome na classe Excel.CustomFunctions que representa a definição da função tem de conter uma propriedade "call" que implemente a função.';Strings.OfficeOM.L_InvalidResourceUrlMessage="O URL do recurso especificado no manifesto é inválido.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="O tipo de identidade do utilizador não é suportado.";Strings.OfficeOM.L_DialogAlreadyOpened="A operação falhou porque este suplemento já tem uma caixa de diálogo ativa.";Strings.OfficeOM.L_DialogNavigateError="Erro de Navegação da Caixa de Diálogo";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="A operação não é suportada neste tipo de vínculo.";Strings.OfficeOM.L_DataWriteError="Erro de Escrita de Dados";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory="Este suplemento não suporta o consentimento do utilizador.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="As restrições do browser impediram-nos de criar a caixa de diálogo. O domínio da caixa de diálogo e o domínio do anfitrião do suplemento não estão na mesma zona de segurança.";Strings.OfficeOM.L_BindingCreationError="Erro de Criação de Vínculo";Strings.OfficeOM.L_DialogRequireHTTPS="O protocolo HTTP não é suportado. Em alternativa, utilize HTTPS";Strings.OfficeOM.L_OutOfRange="Fora do Intervalo";Strings.OfficeOM.L_InvalidObjectPath='O caminho do objeto "{0}" não está a funcionar para a ação que está a tentar efetuar. Se estiver a utilizar o objeto em múltiplas chamadas de "context.sync" e fora da execução sequencial de um lote ".run", utilize os métodos "context.trackedObjects.add()" e "context.trackedObjects.remove()" para gerir a duração do objeto.';Strings.OfficeOM.L_SSOConnectionLostErrorMessage="A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod='As alterações à propriedade "{0}" não podem ser aplicadas através de um método "object.set".';Strings.OfficeOM.L_CannotNavigateTo="O objeto está localizado num lugar onde a navegação não é suportada.";Strings.OfficeOM.L_InvalidResourceUrl="O URL do recurso de aplicação fornecido é inválido.";Strings.OfficeOM.L_CannotRegisterEvent="Não é possível registar o processador de eventos.";Strings.OfficeOM.L_TooManyArguments="demasiados argumentos";Strings.OfficeOM.L_EventHandlerRemovalFailed="Não foi possível remover o processador de eventos.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Os parâmetros coordenados não podem ser usados com Tabelas de tipo coerção quando a tabela contém células unidas.";Strings.OfficeOM.L_InvalidValue="Valor Inválido";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Os argumentos de entrada são inválidos.";Strings.OfficeOM.L_SettingsCannotSave="Não foi possível guardar as definições.";Strings.OfficeOM.L_ApiNotFoundDetails="O método ou propriedade {0} faz parte do conjunto de requisitos {1}, que não está disponível na sua versão do {2}.";Strings.OfficeOM.L_GetDataIsTooLarge="O conjunto de dados pedido é grande demais.";Strings.OfficeOM.L_NewWindowCrossZone='As definições de segurança no seu browser impedem-nos de criar uma caixa de diálogo. Experimente um browser diferente ou {0} para que o "{1}" e o domínio apresentado na barra de endereços estejam na mesma zona de segurança.';Strings.OfficeOM.L_DataReadError="Erro de Leitura de Dados";Strings.OfficeOM.L_NoCapability="Não possui permissões suficientes para efetuar esta ação.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Sessão Inválida ou Sessão Cujo Tempo Limite Foi Excedido";Strings.OfficeOM.L_InvalidGetStartRowColumn="Os valores de startRow or startColumn especificados são inválidos.";Strings.OfficeOM.L_InvalidArgumentGeneric="Os argumentos fornecidos à função não funcionam para esta situação, estão em falta ou não estão no formato correto.";Strings.OfficeOM.L_MemoryLimit="Limite de Memória Excedido";Strings.OfficeOM.L_DialogAddressNotTrusted="O domínio do URL não está incluído no elemento AppDomains no manifesto.";Strings.OfficeOM.L_DataNotMatchBindingSize="O objeto de dados fornecido não corresponde ao tamanho da seleção atual.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="O tipo de coerção especificado não é compatível com o este tipo de vínculo.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="A operação falhou porque este suplemento já está a pedir um token de acesso.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="configure o seu browser";Strings.OfficeOM.L_CannotWriteToSelection="Não é possível escrever para a seleção atual.";Strings.OfficeOM.L_FormattingReminder="Lembrete de Formatação";Strings.OfficeOM.L_TooManyIncompleteRequests="Aguarde até a chamada anterior ser concluída.";Strings.OfficeOM.L_SettingsStaleError="Erro Obsoleto de Definições";Strings.OfficeOM.L_SaveSettingsError="Erro ao Guardar Definições";Strings.OfficeOM.L_ConnectionFailureWithDetails="O pedido falhou com o código de estado {0}, código de erro {1} e a seguinte mensagem de erro: {2}";Strings.OfficeOM.L_SSOConnectionLostError="A connection was lost during the sign in process.";Strings.OfficeOM.L_InvalidSSOAddinMessage="A API de identidade não é suportada para este suplemento.";Strings.OfficeOM.L_RunMustReturnPromise='A função de lotes passada para o método ".run" não devolveu uma promessa. A função tem de devolver uma promessa, para que todos os objetos controlados automaticamente possam ser libertados na conclusão da operação de lote. Normalmente, uma promessa é devolvida ao devolver a resposta de "context.sync()".';Strings.OfficeOM.L_NotSupported="A função {0} não é suportada.";Strings.OfficeOM.L_InvalidColumnsForBinding="As colunas especificadas são inválidas.";Strings.OfficeOM.L_InValidOptionalArgument="argumento opcional inválido";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Os dados estão desatualizados. Obtenha novamente o objeto.";Strings.OfficeOM.L_UserNotSignedIn="Nenhum utilizador tem sessão iniciada no Office.";Strings.OfficeOM.L_InvalidDataFormat="O formato do objeto de dados especificado é inválido.";Strings.OfficeOM.L_InvalidAPICall="Chamada de API Inválida";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty='A tentar definir a propriedade só de leitura "{0}".';Strings.OfficeOM.L_OverwriteWorksheetData="A operação definida falhou porque o objeto de dados fornecido irá substituir ou alterar dados.";Strings.OfficeOM.L_InvalidFormatValue="Um ou mais parâmetros de formatação possuem valores que não são permitidos. Verifique os valores e tente novamente.";Strings.OfficeOM.L_PermissionDenied="Permissão Recusada";Strings.OfficeOM.L_UserAborted="O utilizador abortou o pedido de consentimento.";Strings.OfficeOM.L_ConnectionFailureWithStatus="O pedido falhou com o código de estado {0}.";Strings.OfficeOM.L_CustomXmlNodeNotFound="O nó especificado não foi encontrado.";Strings.OfficeOM.L_NotSupportedBindingType="O tipo de vínculo especificado {0} não é suportado.";Strings.OfficeOM.L_RedundantCallbackSpecification="A chamada de retorno não pode ser especificada simultaneamente na lista de argumentos e no objeto opcional.";Strings.OfficeOM.L_NavOutOfBound="A operação falhou porque o índice está fora do intervalo.";Strings.OfficeOM.L_ActivityLimitReached="O limite de atividade foi atingido.";Strings.OfficeOM.L_OsfControlTypeNotSupported="Tipo de OsfControl não suportado.";Strings.OfficeOM.L_InternalError="Erro Interno";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Os parâmetros coordenados não podem ser usados com Tabelas de tipo coerção quando a tabela contém células unidas.";Strings.OfficeOM.L_InvalidApiCallInContext="Chamada de API inválida no contexto atual.";Strings.OfficeOM.L_InternalErrorDescription="Ocorreu um erro interno.";Strings.OfficeOM.L_CoercionTypeNotSupported="O tipo de coerção especificado não é suportado.";Strings.OfficeOM.L_NamedItemNotFound="O item com nome não existe.";Strings.OfficeOM.L_InvalidDataObject="Objeto de Dados Inválido";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="O XPath limita a seleção a 1 024 itens.";Strings.OfficeOM.L_InvalidRequestContext="Não é possível utilizar o objeto em contextos de pedido diferentes.";Strings.OfficeOM.L_InvalidBinding="Vínculo Inválido";Strings.OfficeOM.L_APINotSupported="API Não Suportada";Strings.OfficeOM.L_CustomXmlOutOfDateName="Dados Obsoletos";Strings.OfficeOM.L_DataNotMatchBindingType="O objeto de dados especificado não é compatível com o tipo de vínculo.";Strings.OfficeOM.L_MissingParameter="Parâmetro em Falta";Strings.OfficeOM.L_InvalidTableOptionValue="Um ou mais parâmetros tableOptions possuem valores que não são permitidos. Verifique os valores e tente novamente.";Strings.OfficeOM.L_MultipleNamedItemFound="Foram encontrados vários objetos com o mesmo nome.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="O conteúdo selecionado tem de estar em formato de tabela. Formate os dados como uma tabela e tente novamente.";Strings.OfficeOM.L_RequestTimeout="A chamada demorou demasiado tempo a ser executada.";Strings.OfficeOM.L_EventHandlerNotExist="O processador de eventos especificado não foi encontrado para este vínculo.";Strings.OfficeOM.L_ElementMissing="Não conseguimos formatar a célula da tabela porque alguns valores de parâmetro estão em falta. Verifique os parâmetros e tente novamente.";Strings.OfficeOM.L_DialogInvalidScheme="O esquema de URL não é suportado. Em alternativa, utilize HTTPS.";Strings.OfficeOM.L_FunctionCallFailed="Chamada de função {0} falhou, código de erro: {1}.";Strings.OfficeOM.L_InitializeNotReady="O Office.js ainda não foi totalmente carregado. Tente novamente mais tarde ou certifique-se de que adiciona o seu código de inicialização na função Office.initialize.";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_SSOClientError="Ocorreu um erro no pedido de autenticação do Office.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Permitir";Strings.OfficeOM.L_SetDataParametersConflict="Os parâmetros especificados estão em conflito.";Strings.OfficeOM.L_UnknownBindingType="O tipo de vínculo não é suportado.";Strings.OfficeOM.L_CustomFunctionNameCannotSplit="O nome da função tem de conter um espaço de nomes não vazio e um nome abreviado não vazio.";Strings.OfficeOM.L_GetDataParametersConflict="Os parâmetros especificados estão em conflito.";Strings.OfficeOM.L_InvalidFormat="Erro de Formato Inválido";Strings.OfficeOM.L_InvalidGrantMessage="Não tem permissão para este suplemento.";Strings.OfficeOM.L_SettingsAreStale="Não foi possível guardar as definições por estarem obsoletas.";Strings.OfficeOM.L_SetDataIsTooLarge="O objeto de dados especificado é grande demais.";Strings.OfficeOM.L_InvalidReadForBlankRow="A linha especificada está em branco.";Strings.OfficeOM.L_DataStale="Dados Obsoletos";Strings.OfficeOM.L_CallbackNotAFunction="A chamada de retorno tem de ser do tipo função e era do tipo {0}.";Strings.OfficeOM.L_DocumentReadOnly="A operação solicitada não é permitida no modo de documento atual.";Strings.OfficeOM.L_InvalidGetColumns="As colunas especificadas são inválidas.";Strings.OfficeOM.L_SettingNameNotExist="O nome da definição especificada não existe.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Os valores de rowCount e columnCount especificados são inválidos.";Strings.OfficeOM.L_SSOServerError="Ocorreu um erro no fornecedor de autenticação.";Strings.OfficeOM.L_Timeout="A operação excedeu o tempo limite.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Um problema de rede impediu a obtenção do ficheiro.";Strings.OfficeOM.L_InvalidGetRows="As linhas especificadas são inválidas.";Strings.OfficeOM.L_InvalidSelectionForBindingType="Não é possível criar um vínculo com a seleção atual e o tipo de vínculo especificado.";Strings.OfficeOM.L_RowIndexOutOfRange="O valor do índice de linhas encontra-se fora do intervalo permitido. Utilize um valor (0 ou superior) que seja inferior ao número de linhas.";Strings.OfficeOM.L_NotSupportedEventType="O tipo de evento especificado {0} não é suportado.";Strings.OfficeOM.L_BindingToMultipleSelection="As seleções não contíguas não são suportadas.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Ignorar";Strings.OfficeOM.L_SSOServerErrorMessage="Ocorreu um erro inesperado no servidor.";Strings.OfficeOM.L_EventRegistrationError="Erro de Registo de Evento";Strings.OfficeOM.L_CustomFunctionDefinitionMissing="Tem de existir uma propriedade com este nome na classe Excel.CustomFunctions que represente a definição da função.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Não foi possível adicionar o processador de eventos.";Strings.OfficeOM.L_InvalidCoercion="Tipo de Coerção Inválido";Strings.OfficeOM.L_OperationNotSupported="A operação não é suportada.";Strings.OfficeOM.L_APICallFailed="Falha na Chamada à API";Strings.OfficeOM.L_PropertyNotLoaded='A propriedade "{0}" não está disponível. Antes de ler o valor da propriedade, chame o método de carregamento no objeto contentor e chame "context.sync()" no contexto de pedido associado.';Strings.OfficeOM.L_InvalidOperationInCellEditMode="O Excel está em modo de edição de célula. Saia do modo de edição ao premir Enter ou a Tecla de Tabulação ou ao selecionar outra célula. Em seguida, tente novamente.";Strings.OfficeOM.L_IndexOutOfRange="O índice está fora do intervalo.";Strings.OfficeOM.L_InvalidBindingOperation="Operação de Vínculo Inválido";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Ligar ao closeAsync no Ficheiro atual antes de obter outro.";Strings.OfficeOM.L_BadSelectorString="A cadeia transmitida para o seletor está formatada de forma incorreta ou não é suportada.";Strings.OfficeOM.L_DataNotMatchCoercionType="O tipo do objeto de dados especificado não é compatível com a seleção atual.";Strings.OfficeOM.L_UnsupportedDataObject="O objeto de dados fornecido não é suportado.";Strings.OfficeOM.L_CustomFunctionNameContainsBadChars="O nome da função só pode conter letras, algarismos, carateres de sublinhado e pontos finais.";Strings.OfficeOM.L_NotImplemented="A função {0} não está implementada.";Strings.OfficeOM.L_InvalidArgument='O argumento "{0}" não funciona para esta situação, está em falta ou não está no formato correto.';Strings.OfficeOM.L_InvalidBindingError="Erro de Vínculo Inválido";Strings.OfficeOM.L_DataNotMatchSelection="O objeto de dados fornecido não é compatível com a forma ou dimensões da seleção atual.";Strings.OfficeOM.L_SSOClientErrorMessage="Ocorreu um erro inesperado no cliente.";Strings.OfficeOM.L_InvalidParameters="A função {0} tem parâmetros inválidos.";Strings.OfficeOM.L_CustomXmlError="Erro de XML Personalizado.";Strings.OfficeOM.L_ReadSettingsError="Erro ao Ler Definições";Strings.OfficeOM.L_InvalidSetStartRowColumn="Os valores de startRow or startColumn especificados são inválidos.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="A aplicação {0} não existe. O Microsoft.Office.WebExtension.Initialize(reason) não foi chamado.";Strings.OfficeOM.L_DisplayDialogError="Erro de Apresentação da Caixa de Diálogo";Strings.OfficeOM.L_FormatValueOutOfRange="O valor está fora do intervalo permitido.";Strings.OfficeOM.L_ColIndexOutOfRange="O valor do índice de colunas encontra-se fora do intervalo permitido. Utilize um valor (0 ou superior) que seja inferior ao número de colunas.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="A seleção atual não é compatível com tipo de coerção especificado.";Strings.OfficeOM.L_HostError="Erro de Anfitrião";Strings.OfficeOM.L_ValueNotLoaded='O valor do objeto de resultado ainda não foi carregado. Antes de ler a propriedade de valor, faça uma chamada a "context.sync()" no contexto do pedido associado.';Strings.OfficeOM.L_GetSelectionNotSupported="A seleção atual não é suportada." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/pt-pt/outlook_strings.debug.js b/node_modules/@microsoft/office-js/dist/pt-pt/outlook_strings.debug.js index 0a70d93..315c710 100644 --- a/node_modules/@microsoft/office-js/dist/pt-pt/outlook_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/pt-pt/outlook_strings.debug.js @@ -1,34 +1,35 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("_u"); _u.ExtensibilityStrings = function() { }; _u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings"); +_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Erro de Escrita de Dados"; +_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "O utilizador removeu o anexo antes de o carregamento ser concluído."; +_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "O caminho do anexo era inválido."; _u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "São necessárias permissões elevadas para aceder a membros protegidos da API de Java para Office."; _u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Os parâmetros fornecidos não correspondem ao formato esperado."; +_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "O utilizador alterou a posição do cursor enquanto os dados estavam a ser inseridos."; +_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = 'São necessárias permissões elevadas para chamar o método: "{0}".'; +_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Um ou mais dos endereços de e-mail fornecidos são demasiado longos."; +_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Não foram fornecidos destinatários válidos."; +_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "O ID do anexo era inválido."; +_u.ExtensibilityStrings.l_InvalidEventDates_Text = "A data de fim ocorre antes da data de início."; +_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "O pedido excede o limite de tamanho de 1 MB. Modifique o seu pedido EWS."; +_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Erro de Anexo"; _u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "O anexo não pode ser eliminado do item."; -_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Um ou mais dos nomes a apresentar fornecidos são demasiado longos."; +_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Não é possível adicionar anexos porque a mensagem já possui o número máximo de anexos"; +_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "O anexo não pode ser eliminado porque não foi possível encontrar o anexo com o índice de anexos."; _u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Não é possível adicionar o anexo porque é demasiado grande."; -_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Erro de Escrita de Dados"; -_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "O caminho do anexo era inválido."; -_u.ExtensibilityStrings.l_InvalidEventDates_Text = "A data de fim ocorre antes da data de início."; -_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "O utilizador alterou a posição do cursor enquanto os dados estavam a ser inseridos."; +_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Não é possível adicionar anexos enquanto a resposta ou reencaminhamento estiver a ser obtido do servidor."; +_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Um ou mais dos nomes a apresentar fornecidos são demasiado longos."; +_u.ExtensibilityStrings.l_InvalidDate_Text = "Os dados introduzidos não resolvem para uma data válida."; _u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "O item selecionado foi alterado."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = 'São necessárias permissões elevadas para chamar o método: "{0}".'; -_u.ExtensibilityStrings.l_InternalFormatError_Text = "Houve um erro de formato interno."; _u.ExtensibilityStrings.l_InvalidEndTime_Text = "A hora de fim não pode ser anterior à hora de início."; -_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "O ID do anexo era inválido."; _u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Não é possível adicionar o anexo ao item."; -_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Não é possível adicionar anexos porque a mensagem já possui o número máximo de anexos"; _u.ExtensibilityStrings.l_InternalProtocolError_Text = 'Erro de protocolo interno: "{0}".'; -_u.ExtensibilityStrings.l_InvalidDate_Text = "Os dados introduzidos não resolvem para uma data válida."; -_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "O pedido excede o limite de tamanho de 1 MB. Modifique o seu pedido EWS."; _u.ExtensibilityStrings.l_OffsetNotfound_Text = "Não foi possível encontrar um desfasamento para este carimbo de data/hora."; -_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "O utilizador removeu o anexo antes de o carregamento ser concluído."; -_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Não é possível adicionar anexos enquanto a resposta ou reencaminhamento estiver a ser obtido do servidor."; -_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "O anexo não pode ser eliminado porque não foi possível encontrar o anexo com o índice de anexos."; _u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "O número total de destinatários no campo não pode ser superior a {0}."; -_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Não foram fornecidos destinatários válidos."; _u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "A limpeza do HTML falhou."; -_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Um ou mais dos endereços de e-mail fornecidos são demasiado longos."; -_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Erro de Anexo" +_u.ExtensibilityStrings.l_InternalFormatError_Text = "Houve um erro de formato interno." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/pt-pt/outlook_strings.js b/node_modules/@microsoft/office-js/dist/pt-pt/outlook_strings.js index 47f1289..4725078 100644 --- a/node_modules/@microsoft/office-js/dist/pt-pt/outlook_strings.js +++ b/node_modules/@microsoft/office-js/dist/pt-pt/outlook_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="São necessárias permissões elevadas para aceder a membros protegidos da API de Java para Office.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Os parâmetros fornecidos não correspondem ao formato esperado.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="O anexo não pode ser eliminado do item.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Um ou mais dos nomes a apresentar fornecidos são demasiado longos.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Não é possível adicionar o anexo porque é demasiado grande.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Erro de Escrita de Dados";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="O caminho do anexo era inválido.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="A data de fim ocorre antes da data de início.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="O utilizador alterou a posição do cursor enquanto os dados estavam a ser inseridos.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="O item selecionado foi alterado.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text='São necessárias permissões elevadas para chamar o método: "{0}".';_u.ExtensibilityStrings.l_InternalFormatError_Text="Houve um erro de formato interno.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="A hora de fim não pode ser anterior à hora de início.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="O ID do anexo era inválido.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Não é possível adicionar o anexo ao item.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Não é possível adicionar anexos porque a mensagem já possui o número máximo de anexos";_u.ExtensibilityStrings.l_InternalProtocolError_Text='Erro de protocolo interno: "{0}".';_u.ExtensibilityStrings.l_InvalidDate_Text="Os dados introduzidos não resolvem para uma data válida.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="O pedido excede o limite de tamanho de 1 MB. Modifique o seu pedido EWS.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Não foi possível encontrar um desfasamento para este carimbo de data/hora.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="O utilizador removeu o anexo antes de o carregamento ser concluído.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Não é possível adicionar anexos enquanto a resposta ou reencaminhamento estiver a ser obtido do servidor.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="O anexo não pode ser eliminado porque não foi possível encontrar o anexo com o índice de anexos.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="O número total de destinatários no campo não pode ser superior a {0}.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Não foram fornecidos destinatários válidos.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="A limpeza do HTML falhou.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Um ou mais dos endereços de e-mail fornecidos são demasiado longos.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Erro de Anexo" \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Erro de Escrita de Dados";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="O utilizador removeu o anexo antes de o carregamento ser concluído.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="O caminho do anexo era inválido.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="São necessárias permissões elevadas para aceder a membros protegidos da API de Java para Office.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Os parâmetros fornecidos não correspondem ao formato esperado.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="O utilizador alterou a posição do cursor enquanto os dados estavam a ser inseridos.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text='São necessárias permissões elevadas para chamar o método: "{0}".';_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Um ou mais dos endereços de e-mail fornecidos são demasiado longos.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Não foram fornecidos destinatários válidos.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="O ID do anexo era inválido.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="A data de fim ocorre antes da data de início.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="O pedido excede o limite de tamanho de 1 MB. Modifique o seu pedido EWS.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Erro de Anexo";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="O anexo não pode ser eliminado do item.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Não é possível adicionar anexos porque a mensagem já possui o número máximo de anexos";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="O anexo não pode ser eliminado porque não foi possível encontrar o anexo com o índice de anexos.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Não é possível adicionar o anexo porque é demasiado grande.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Não é possível adicionar anexos enquanto a resposta ou reencaminhamento estiver a ser obtido do servidor.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Um ou mais dos nomes a apresentar fornecidos são demasiado longos.";_u.ExtensibilityStrings.l_InvalidDate_Text="Os dados introduzidos não resolvem para uma data válida.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="O item selecionado foi alterado.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="A hora de fim não pode ser anterior à hora de início.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Não é possível adicionar o anexo ao item.";_u.ExtensibilityStrings.l_InternalProtocolError_Text='Erro de protocolo interno: "{0}".';_u.ExtensibilityStrings.l_OffsetNotfound_Text="Não foi possível encontrar um desfasamento para este carimbo de data/hora.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="O número total de destinatários no campo não pode ser superior a {0}.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="A limpeza do HTML falhou.";_u.ExtensibilityStrings.l_InternalFormatError_Text="Houve um erro de formato interno." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/ro-ro/office_strings.debug.js b/node_modules/@microsoft/office-js/dist/ro-ro/office_strings.debug.js index 6e0cbd2..3fa9587 100644 --- a/node_modules/@microsoft/office-js/dist/ro-ro/office_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/ro-ro/office_strings.debug.js @@ -1,179 +1,190 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("Strings"); Strings.OfficeOM = function() { }; Strings.OfficeOM.registerClass("Strings.OfficeOM"); -Strings.OfficeOM.L_PropertyNotLoaded = "Proprietatea „{0}†nu este disponibilă. ÃŽnainte de a citi valoarea proprietății, apelaÈ›i metoda de încărcare pentru obiectul care o conÈ›ine È™i apelaÈ›i „context.sync()†pe contextul de solicitare asociat."; -Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = "Schimbările proprietății „{0}†nu pot fi aplicate printr-o metodă „object.setâ€."; -Strings.OfficeOM.L_NotSupportedEventType = "Tipul de eveniment {0} specificat nu este acceptat."; -Strings.OfficeOM.L_InvalidArgumentGeneric = "Argumentele transmise funcÈ›iei nu funcÈ›ionează pentru această situaÈ›ie, lipsesc sau nu sunt în formatul corect."; -Strings.OfficeOM.L_UserAborted = "Utilizatorul a abandonat solicitarea de consimțământ."; Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Programul de completare solicită deja un token de acces."; -Strings.OfficeOM.L_InvalidSSOAddinMessage = "API-ul de identitate nu este acceptat pentru acest program de completare."; -Strings.OfficeOM.L_InvalidObjectPath = "Calea obiectului „{0}†nu funcÈ›ionează pentru ceea ce încercaÈ›i să faceÈ›i. Dacă utilizaÈ›i obiectul în mai multe apeluri „context.sync†și în afara execuÈ›iei secvenÈ›iale a unui lot „.runâ€, utilizaÈ›i metodele „context.trackedObjects.add()†și „context.trackedObjects.remove()†pentru a gestiona durata de viață a obiectului."; -Strings.OfficeOM.L_InvalidCoercion = "Tipul de coerciÈ›ie nu este valid"; -Strings.OfficeOM.L_InvalidBindingError = "Eroare de legare nevalidă"; Strings.OfficeOM.L_InvalidGrant = "Preautorizarea lipseÈ™te."; -Strings.OfficeOM.L_SettingNameNotExist = "Numele de setare specificat nu există."; -Strings.OfficeOM.L_InvalidRequestContext = "Obiectul nu se poate utiliza în contexte de solicitări diferite."; -Strings.OfficeOM.L_InvalidTableOptionValue = "Unul sau mai mulÈ›i dintre parametrii tableOptions au valori nepermise. ReverificaÈ›i valorile È™i încercaÈ›i din nou."; -Strings.OfficeOM.L_ValueNotLoaded = "Valoarea obiectului rezultat nu a fost încărcată încă. ÃŽnainte de a citi proprietatea valoare, apelaÈ›i „context.sync()†în contextul asociat solicitat."; -Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Vă rugăm să faceÈ›i o selecÈ›ie."; -Strings.OfficeOM.L_FunctionCallFailed = "Apelul {0} la funcÈ›ie nu a reuÈ™it, cod de eroare: {1}."; -Strings.OfficeOM.L_DialogAlreadyOpened = "OperaÈ›iunea nu a reuÈ™it, deoarece acest program de completare are deja un dialog activ."; -Strings.OfficeOM.L_EventRegistrationError = "Eroare de înregistrare eveniment"; -Strings.OfficeOM.L_CoercionTypeNotSupported = "Tipul de impunere specificat nu este acceptat."; +Strings.OfficeOM.L_CustomFunctionNameContainsBadChars = "Numele funcÈ›iei poate conÈ›ine numai litere, cifre, linii de subliniere È™i puncte."; +Strings.OfficeOM.L_SliceSizeNotSupported = "Dimensiunea specificată a sectorului nu este acceptată."; Strings.OfficeOM.L_SettingsCannotSave = "Setările nu s-au putut salva."; -Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "configuraÈ›i browserul"; -Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Tipul de identitate al utilizatorului nu este acceptat."; -Strings.OfficeOM.L_CustomXmlError = "Eroare XML particularizat."; -Strings.OfficeOM.L_NamedItemNotFound = "Elementul denumit nu există."; -Strings.OfficeOM.L_IndexOutOfRange = "Index în afara intervalului."; -Strings.OfficeOM.L_SSOServerErrorMessage = "Eroare neaÈ™teptată pe server."; -Strings.OfficeOM.L_NewWindowCrossZone = "Setările de securitate din browser ne împiedică să creăm o casetă de dialog. ÃŽncercaÈ›i un alt browser, sau {0} astfel încât „{1}†și domeniul indicat în bara de adrese să fie în aceeaÈ™i zonă de securitate."; +Strings.OfficeOM.L_ColIndexOutOfRange = "Valoarea de index a coloanei este în afara intervalului permis. UtilizaÈ›i o valoare (0 sau mai mare) care este mai mică decât numărul de coloane."; Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Notă: se sugerează ca seturile de formatări setate de o apelare de Formatare API să fie mai puÈ›ine de 100."; +Strings.OfficeOM.L_ApiNotFoundDetails = "Metoda sau proprietatea {0} face parte din setul de solicitări {1}, care nu este disponibil în versiunea dvs. de {2}."; +Strings.OfficeOM.L_InvalidFormatValue = "Unul sau mai mulÈ›i dintre parametrii de format au valori nepermise. ReverificaÈ›i valorile È™i încercaÈ›i din nou."; +Strings.OfficeOM.L_SelectionCannotBound = "Nu se poate face legarea la selecÈ›ia curentă."; +Strings.OfficeOM.L_TooManyOptionalFunction = "mai multe funcÈ›ii opÈ›ionale în lista parametrilor"; +Strings.OfficeOM.L_InvalidObjectPath = "Calea obiectului „{0}†nu funcÈ›ionează pentru ceea ce încercaÈ›i să faceÈ›i. Dacă utilizaÈ›i obiectul în mai multe apeluri „context.sync†și în afara execuÈ›iei secvenÈ›iale a unui lot „.runâ€, utilizaÈ›i metodele „context.trackedObjects.add()†și „context.trackedObjects.remove()†pentru a gestiona durata de viață a obiectului."; +Strings.OfficeOM.L_CallbackNotAFunction = "Apelul invers trebuie să fie de tipul funcÈ›ie, a fost de tipul {0}."; +Strings.OfficeOM.L_FormattingReminder = "Se formatează memento-ul"; +Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath limitează selecÈ›ia la 1024 elemente."; Strings.OfficeOM.L_CustomXmlExceedQuotaName = "S-a atins limita de selecÈ›ie"; -Strings.OfficeOM.L_SpecifiedIdNotExist = "ID-ul specificat nu există."; -Strings.OfficeOM.L_ElementMissing = "Nu am putut formata celula de tabel pentru că lipsesc unele valori de parametri. ReverificaÈ›i parametrii È™i încercaÈ›i din nou."; -Strings.OfficeOM.L_InvalidSelectionForBindingType = "O legare nu poate fi creată cu selecÈ›ia curentă È™i tipul de legare specificat."; -Strings.OfficeOM.L_SettingsAreStale = "Setările nu au putut fi salvate pentru că nu sunt actuale."; -Strings.OfficeOM.L_APICallFailed = "Apel API nereuÈ™it"; +Strings.OfficeOM.L_InvalidBindingOperation = "OperaÈ›ia de legare nu este validă"; Strings.OfficeOM.L_InvalidSetRows = "Rândurile specificate nu sunt valide."; -Strings.OfficeOM.L_OsfControlTypeNotSupported = "Tipul OsfControl nu este acceptat."; -Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} doreÈ™te să afiÈ™eze o fereastră nouă."; -Strings.OfficeOM.L_SSOClientError = "Eroare la solicitarea de autentificare din Office."; -Strings.OfficeOM.L_InternalError = "Eroare internă"; -Strings.OfficeOM.L_SelectionCannotBound = "Nu se poate face legarea la selecÈ›ia curentă."; -Strings.OfficeOM.L_InvalidColumnsForBinding = "Coloanele specificate nu sunt valide."; -Strings.OfficeOM.L_NotSupported = "FuncÈ›ia {0} nu este acceptată."; -Strings.OfficeOM.L_BindingCreationError = "Eroare de creare a legării"; -Strings.OfficeOM.L_RunMustReturnPromise = "FuncÈ›ia de procesare pe loturi transmisă metodei „.run†nu a returnat o promisiune. FuncÈ›ia trebuie să returneze o promisiune, pentru a face posibilă eliberarea tuturor obiectelor urmărite automat la finalizarea operaÈ›iunii pe loturi. De obicei, returnaÈ›i o promisiune returnând răspunsul de la „context.sync()â€."; -Strings.OfficeOM.L_ConnectionFailureWithDetails = "Solicitarea nu a reuÈ™it, cu codul de stare {0}, codul de eroare {1} È™i următorul mesaj de eroare: {2}"; -Strings.OfficeOM.L_BrowserAPINotSupported = "Acest browser nu acceptă API solicitat."; -Strings.OfficeOM.L_RedundantCallbackSpecification = "Apelul invers nu poate fi specificat în lista de argumente È™i în obiectul opÈ›ional."; -Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Se permite"; -Strings.OfficeOM.L_MissingParameter = "Parametru lipsă"; +Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Tipul de impunere specificat nu este compatibil cu acest tip de legare."; +Strings.OfficeOM.L_GetSelectionNotSupported = "SelecÈ›ia curentă nu este acceptată."; +Strings.OfficeOM.L_DialogAlreadyOpened = "OperaÈ›iunea nu a reuÈ™it, deoarece acest program de completare are deja un dialog activ."; +Strings.OfficeOM.L_InvalidGrantMessage = "Nu s-au acordat permisiuni pentru acest program de completare."; +Strings.OfficeOM.L_SelectionNotSupportCoercionType = "SelecÈ›ia curentă nu este compatibilă cu tipul de impunere specificat."; +Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Vă rugăm să faceÈ›i o selecÈ›ie."; +Strings.OfficeOM.L_NewWindowCrossZone = "Setările de securitate din browser ne împiedică să creăm o casetă de dialog. ÃŽncercaÈ›i un alt browser, sau {0} astfel încât „{1}†și domeniul indicat în bara de adrese să fie în aceeaÈ™i zonă de securitate."; +Strings.OfficeOM.L_CustomFunctionImplementationMissing = "Proprietatea cu acest nume din Excel.CustomFunctions care reprezintă definiÈ›ia funcÈ›iei trebuie să conÈ›ină o proprietate „callâ€, care implementează funcÈ›ia."; +Strings.OfficeOM.L_ConnectionFailureWithStatus = "Solicitarea nu a reuÈ™it, cu codul de stare {0}."; +Strings.OfficeOM.L_ReadSettingsError = "Eroare de citire a setărilor"; +Strings.OfficeOM.L_BadSelectorString = "Șirul care a trecut în selector este formatat necorespunzător sau nu este acceptat."; Strings.OfficeOM.L_InvalidGetStartRowColumn = "Valorile startRow sau startColumn specificate nu sunt valide."; -Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "AplicaÈ›ia {0} nu există. Nu s-a apelat Microsoft.Office.WebExtension.initialize(motiv)."; -Strings.OfficeOM.L_InvalidDataObject = "Obiect de date nevalid"; -Strings.OfficeOM.L_CannotWriteToSelection = "Nu se poate scrie în selecÈ›ia curentă."; -Strings.OfficeOM.L_AppNameNotExist = "Nu există un nume de program de completare pentru {0}."; -Strings.OfficeOM.L_UnsupportedUserIdentity = "Tipul de identitate al utilizatorului nu este acceptat."; +Strings.OfficeOM.L_RequestTokenUnavailable = "Acest API a fost reglat pentru a încetini frecvenÈ›a de apel."; +Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Parametrii de coordonate nu se pot utiliza cu tipul de coerciÈ›ie tabel când tabelul conÈ›ine celule îmbinate."; +Strings.OfficeOM.L_DialogAddressNotTrusted = "Domeniul adresei URL nu este inclus în elementul AppDomains din manifest."; +Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "Se încearcă setarea proprietății doar în citire „{0}â€."; +Strings.OfficeOM.L_SettingNameNotExist = "Numele de setare specificat nu există."; +Strings.OfficeOM.L_NavOutOfBound = "OperaÈ›iunea nu a reuÈ™it pentru că indexul este în afara intervalului."; +Strings.OfficeOM.L_BindingToMultipleSelection = "SelecÈ›iile neadiacente nu sunt acceptate."; +Strings.OfficeOM.L_MemoryLimit = "Limită de memorie depășită"; Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "OperaÈ›iunea nu a reuÈ™it, deoarece acest program de completare solicită deja un token de acces."; +Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Notă: se sugerează ca numărul de celule dintr-un tabel să fie sub 20.000 de celule."; +Strings.OfficeOM.L_NetworkProblemRetrieveFile = "O problemă de reÈ›ea a împiedicat regăsirea fiÈ™ierului."; +Strings.OfficeOM.L_InvalidRequestContext = "Obiectul nu se poate utiliza în contexte de solicitări diferite."; +Strings.OfficeOM.L_SSOServerError = "Eroare apărută la furnizorul de autentificare."; +Strings.OfficeOM.L_IndexOutOfRange = "Index în afara intervalului."; +Strings.OfficeOM.L_APICallFailed = "Apel API nereuÈ™it"; +Strings.OfficeOM.L_UserClickIgnore = "Utilizatorul a ales să ignore caseta de dialog."; Strings.OfficeOM.L_HostError = "Eroare gazdă"; -Strings.OfficeOM.L_DataNotMatchBindingType = "Obiectul de date specificat nu este compatibil cu tipul de legare."; -Strings.OfficeOM.L_ColIndexOutOfRange = "Valoarea de index a coloanei este în afara intervalului permis. UtilizaÈ›i o valoare (0 sau mai mare) care este mai mică decât numărul de coloane."; -Strings.OfficeOM.L_SSOClientErrorMessage = "Eroare neaÈ™teptată pe client."; +Strings.OfficeOM.L_InvalidNode = "Nod nevalid"; +Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Ignorare"; +Strings.OfficeOM.L_DocumentReadOnly = "OperaÈ›iunea solicitată nu este permisă pe modul curent al documentului."; Strings.OfficeOM.L_InvalidParameters = "FuncÈ›ia {0} are parametri nevalizi."; -Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Tipul specificat de legare nu este compatibil cu elementul denumit furnizat."; -Strings.OfficeOM.L_NetworkProblem = "Problemă de reÈ›ea"; -Strings.OfficeOM.L_DataNotMatchBindingSize = "Obiectul de date furnizat nu corespunde dimensiunii selecÈ›iei curente."; -Strings.OfficeOM.L_NetworkProblemRetrieveFile = "O problemă de reÈ›ea a împiedicat regăsirea fiÈ™ierului."; -Strings.OfficeOM.L_EventHandlerRemovalFailed = "Nu s-a reuÈ™it eliminarea rutinei de tratare a evenimentului."; -Strings.OfficeOM.L_DialogRequireHTTPS = "Protocolul HTTP nu este acceptat. UtilizaÈ›i în schimb HTTPS"; -Strings.OfficeOM.L_InValidOptionalArgument = "argument opÈ›ional incorect"; -Strings.OfficeOM.L_ActivityLimitReached = "S-a atins limita de activitate."; -Strings.OfficeOM.L_CustomXmlOutOfDateName = "Date neactuale"; -Strings.OfficeOM.L_BindingNotExist = "Legarea specificată nu există."; -Strings.OfficeOM.L_InternalErrorDescription = "Eroare internă."; -Strings.OfficeOM.L_CallbackNotAFunction = "Apelul invers trebuie să fie de tipul funcÈ›ie, a fost de tipul {0}."; -Strings.OfficeOM.L_DialogOK = "OK"; -Strings.OfficeOM.L_SettingsStaleError = "Eroare de setări învechite"; +Strings.OfficeOM.L_InvalidDataFormat = "Formatul obiectului de date specificat nu este valid."; +Strings.OfficeOM.L_DialogNavigateError = "Eroare de navigare în dialog"; +Strings.OfficeOM.L_CustomFunctionNameCannotSplit = "Numele funcÈ›iei trebuie să conÈ›ină un spaÈ›iu de nume care nu este gol È™i un nume scurt care nu este gol."; +Strings.OfficeOM.L_InvalidSSOAddinMessage = "API-ul de identitate nu este acceptat pentru acest program de completare."; +Strings.OfficeOM.L_InvalidOrTimedOutSession = "Sesiune nevalidă sau expirată"; +Strings.OfficeOM.L_SettingsAreStale = "Setările nu au putut fi salvate pentru că nu sunt actuale."; +Strings.OfficeOM.L_InvalidBindingError = "Eroare de legare nevalidă"; +Strings.OfficeOM.L_SetDataParametersConflict = "Parametrii specificaÈ›i sunt în conflict."; +Strings.OfficeOM.L_DisplayDialogError = "AfiÈ™are eroare dialog"; +Strings.OfficeOM.L_EventRegistrationError = "Eroare de înregistrare eveniment"; +Strings.OfficeOM.L_InvalidCellsValue = "Unul sau mai mulÈ›i dintre parametrii de celule au valori nepermise. ReverificaÈ›i valorile È™i încercaÈ›i din nou."; +Strings.OfficeOM.L_InvalidGetRows = "Rândurile specificate nu sunt valide."; +Strings.OfficeOM.L_GetDataIsTooLarge = "Setul de date solicitat este prea mare."; +Strings.OfficeOM.L_UnsupportedEnumerationMessage = "Enumerarea nu este acceptată în aplicaÈ›ia gazdă curentă."; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory = "Acest program de completare nu acceptă acordul utilizatorului."; +Strings.OfficeOM.L_DataWriteError = "Eroare de scriere a datelor"; Strings.OfficeOM.L_TooManyArguments = "prea multe argumente"; -Strings.OfficeOM.L_GetDataParametersConflict = "Parametrii specificaÈ›i sunt în conflict."; -Strings.OfficeOM.L_ConnectionFailureWithStatus = "Solicitarea nu a reuÈ™it, cu codul de stare {0}."; -Strings.OfficeOM.L_InvalidApiCallInContext = "Apel API nevalid în contextul curent."; -Strings.OfficeOM.L_NoCapability = "Nu aveÈ›i suficiente permisiuni pentru această acÈ›iune."; -Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Argumente de intrare nevalide."; -Strings.OfficeOM.L_InvalidReadForBlankRow = "Rândul specificat este necompletat."; -Strings.OfficeOM.L_APINotSupported = "API neacceptat"; -Strings.OfficeOM.L_PropertyDoesNotExist = "Proprietatea „{0}†nu există pe obiect."; +Strings.OfficeOM.L_MultipleNamedItemFound = "S-au găsit mai multe obiecte cu acelaÈ™i nume."; Strings.OfficeOM.L_PermissionDenied = "Permisiunea refuzată."; -Strings.OfficeOM.L_TooManyOptionalObjects = "mai multe obiecte opÈ›ionale în lista parametrilor"; -Strings.OfficeOM.L_CustomXmlNodeNotFound = "Nodul specificat nu a fost găsit."; +Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "configuraÈ›i browserul"; +Strings.OfficeOM.L_TooManyIncompleteRequests = "AÈ™teptaÈ›i finalizarea apelului anterior."; +Strings.OfficeOM.L_InvalidArgumentGeneric = "Argumentele transmise funcÈ›iei nu funcÈ›ionează pentru această situaÈ›ie, lipsesc sau nu sunt în formatul corect."; +Strings.OfficeOM.L_BindingCreationError = "Eroare de creare a legării"; +Strings.OfficeOM.L_InvalidReadForBlankRow = "Rândul specificat este necompletat."; +Strings.OfficeOM.L_ConnectionFailureWithDetails = "Solicitarea nu a reuÈ™it, cu codul de stare {0}, codul de eroare {1} È™i următorul mesaj de eroare: {2}"; +Strings.OfficeOM.L_FileTypeNotSupported = "Tipul de fiÈ™ier specificat nu este acceptat."; +Strings.OfficeOM.L_NotSupportedBindingType = "Tipul de legare {0} specificat nu este acceptat."; +Strings.OfficeOM.L_CustomXmlOutOfDateName = "Date neactuale"; +Strings.OfficeOM.L_PropertyNotLoaded = "Proprietatea „{0}†nu este disponibilă. ÃŽnainte de a citi valoarea proprietății, apelaÈ›i metoda de încărcare pentru obiectul care o conÈ›ine È™i apelaÈ›i „context.sync()†pe contextul de solicitare asociat."; +Strings.OfficeOM.L_NotSupported = "FuncÈ›ia {0} nu este acceptată."; +Strings.OfficeOM.L_DataNotMatchBindingSize = "Obiectul de date furnizat nu corespunde dimensiunii selecÈ›iei curente."; Strings.OfficeOM.L_DataStale = "Date neactuale"; -Strings.OfficeOM.L_ShuttingDown = "OperaÈ›ia nu a reuÈ™it pentru că datele de pe server nu sunt actuale."; -Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Parametrii de coordonate nu se pot utiliza cu tipul de coerciÈ›ie tabel când tabelul conÈ›ine celule îmbinate."; -Strings.OfficeOM.L_InvalidBinding = "Legare nevalidă"; -Strings.OfficeOM.L_InvalidFormatValue = "Unul sau mai mulÈ›i dintre parametrii de format au valori nepermise. ReverificaÈ›i valorile È™i încercaÈ›i din nou."; -Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Parametrii de coordonate nu se pot utiliza cu tipul de coerciÈ›ie tabel când tabelul conÈ›ine celule îmbinate."; -Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath limitează selecÈ›ia la 1024 elemente."; -Strings.OfficeOM.L_GetSelectionNotSupported = "SelecÈ›ia curentă nu este acceptată."; +Strings.OfficeOM.L_SSOClientError = "Eroare la solicitarea de autentificare din Office."; +Strings.OfficeOM.L_MissingRequiredArguments = "unele argumente necesare lipsesc"; +Strings.OfficeOM.L_DataNotMatchBindingType = "Obiectul de date specificat nu este compatibil cu tipul de legare."; Strings.OfficeOM.L_SetDataIsTooLarge = "Obiectul de date specificat este prea mare."; -Strings.OfficeOM.L_InvalidFormat = "Eroare de format nevalid"; -Strings.OfficeOM.L_RequestTokenUnavailable = "Acest API a fost reglat pentru a încetini frecvenÈ›a de apel."; -Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "ConÈ›inutul selectat trebuie să fie într-un format de tabel. FormataÈ›i datele ca tabel È™i încercaÈ›i din nou."; -Strings.OfficeOM.L_InvalidGetColumns = "Coloanele specificate nu sunt valide."; -Strings.OfficeOM.L_SelectionNotSupportCoercionType = "SelecÈ›ia curentă nu este compatibilă cu tipul de impunere specificat."; -Strings.OfficeOM.L_InvalidResourceUrlMessage = "URL-ul specificat în manifest este nevalid."; -Strings.OfficeOM.L_InvalidOrTimedOutSession = "Sesiune nevalidă sau expirată"; -Strings.OfficeOM.L_UnsupportedDataObject = "Tipul obiectului de date furnizat nu este acceptat."; -Strings.OfficeOM.L_GetDataIsTooLarge = "Setul de date solicitat este prea mare."; -Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Notă: se sugerează ca numărul de celule dintr-un tabel să fie sub 20.000 de celule."; -Strings.OfficeOM.L_InvalidSetStartRowColumn = "Valorile startRow sau startColumn specificate nu sunt valide."; -Strings.OfficeOM.L_EventHandlerNotExist = "Rutina de tratare a evenimentului specificat nu a fost găsită pentru această legare."; -Strings.OfficeOM.L_Timeout = "OperaÈ›iunea a expirat."; -Strings.OfficeOM.L_FormattingReminder = "Se formatează memento-ul"; -Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "Sesiunea dvs. Office Online a expirat sau nu este validă. Pentru a continua, reîmprospătaÈ›i pagina."; -Strings.OfficeOM.L_UserNotSignedIn = "Niciun utilizator nu este conectat la Office."; -Strings.OfficeOM.L_NotSupportedBindingType = "Tipul de legare {0} specificat nu este acceptat."; -Strings.OfficeOM.L_DataNotMatchSelection = "Obiectul de date furnizat nu este compatibil cu forma sau dimensiunile selecÈ›iei curente."; -Strings.OfficeOM.L_NotImplemented = "FuncÈ›ia {0} nu este implementată."; -Strings.OfficeOM.L_OverwriteWorksheetData = "OperaÈ›ia de setare nu a reuÈ™it pentru că obiectul de date furnizat va suprascrie sau va schimba datele."; -Strings.OfficeOM.L_SetDataParametersConflict = "Parametrii specificaÈ›i sunt în conflict."; -Strings.OfficeOM.L_UnknownBindingType = "Tipul de legare nu este acceptat."; -Strings.OfficeOM.L_InitializeNotReady = "Office.js încă nu s-a încărcat complet. ÃŽncercaÈ›i din nou mai târziu sau asiguraÈ›i-vă că adăugaÈ›i codul de iniÈ›ializare în funcÈ›ia Office.initialize."; +Strings.OfficeOM.L_CustomXmlError = "Eroare XML particularizat."; +Strings.OfficeOM.L_DialogInvalidScheme = "Schema adresei URL nu este acceptată. UtilizaÈ›i în schimb HTTPS."; +Strings.OfficeOM.L_APINotSupported = "API neacceptat"; Strings.OfficeOM.L_RowIndexOutOfRange = "Valoarea de index a rândului este în afara intervalului permis. UtilizaÈ›i o valoare (0 sau mai mare) care este mai mică decât numărul de rânduri."; -Strings.OfficeOM.L_BadSelectorString = "Șirul care a trecut în selector este formatat necorespunzător sau nu este acceptat."; -Strings.OfficeOM.L_TooManyIncompleteRequests = "AÈ™teptaÈ›i finalizarea apelului anterior."; -Strings.OfficeOM.L_DisplayDialogError = "AfiÈ™are eroare dialog"; -Strings.OfficeOM.L_InvalidCellsValue = "Unul sau mai mulÈ›i dintre parametrii de celule au valori nepermise. ReverificaÈ›i valorile È™i încercaÈ›i din nou."; +Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "Sesiunea dvs. Office Online a expirat sau nu este validă. Pentru a continua, reîmprospătaÈ›i pagina."; +Strings.OfficeOM.L_CustomFunctionDefinitionMissing = "O proprietate cu acest nume care reprezintă definiÈ›ia funcÈ›iei trebuie să existe în Excel.CustomFunctions."; +Strings.OfficeOM.L_GetDataParametersConflict = "Parametrii specificaÈ›i sunt în conflict."; +Strings.OfficeOM.L_InvalidOperationInCellEditMode = "Excel este în modul de editare a celulelor. IeÈ™iÈ›i din modul de editare apăsând ENTER sau TAB sau selectând o altă celulă, apoi încercaÈ›i din nou."; +Strings.OfficeOM.L_RequestTimeout = "Executarea apelului a durat prea mult timp."; Strings.OfficeOM.L_InvalidArgument = "Argumentul „{0}†nu funcÈ›ionează pentru această situaÈ›ie, lipseÈ™te sau nu este în formatul corect."; -Strings.OfficeOM.L_DocumentReadOnly = "OperaÈ›iunea solicitată nu este permisă pe modul curent al documentului."; -Strings.OfficeOM.L_DataNotMatchCoercionType = "Tipul de obiect de date specificat nu este compatibil cu selecÈ›ia curentă."; +Strings.OfficeOM.L_BindingNotExist = "Legarea specificată nu există."; +Strings.OfficeOM.L_SaveSettingsError = "Eroare de salvare a setărilor"; +Strings.OfficeOM.L_InvalidSelectionForBindingType = "O legare nu poate fi creată cu selecÈ›ia curentă È™i tipul de legare specificat."; +Strings.OfficeOM.L_InternalError = "Eroare internă"; +Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} doreÈ™te să afiÈ™eze o fereastră nouă."; +Strings.OfficeOM.L_PropertyDoesNotExist = "Proprietatea „{0}†nu există pe obiect."; +Strings.OfficeOM.L_UnsupportedUserIdentity = "Tipul de identitate al utilizatorului nu este acceptat."; +Strings.OfficeOM.L_NoCapability = "Nu aveÈ›i suficiente permisiuni pentru această acÈ›iune."; Strings.OfficeOM.L_InvalidValue = "Valoare nevalidă"; -Strings.OfficeOM.L_CloseFileBeforeRetrieve = "ApelaÈ›i closeAsync pentru fiÈ™ierul curent înainte de a regăsi altul."; -Strings.OfficeOM.L_DialogNavigateError = "Eroare de navigare în dialog"; -Strings.OfficeOM.L_UserAbortedMessage = "Utilizatorul nu a fost de acord cu permisiunile programului de completare."; -Strings.OfficeOM.L_NavOutOfBound = "OperaÈ›iunea nu a reuÈ™it pentru că indexul este în afara intervalului."; -Strings.OfficeOM.L_BindingToMultipleSelection = "SelecÈ›iile neadiacente nu sunt acceptate."; -Strings.OfficeOM.L_InvalidResourceUrl = "URL-ul de resurse furnizat al aplicaÈ›iei este nevalid."; -Strings.OfficeOM.L_MultipleNamedItemFound = "S-au găsit mai multe obiecte cu acelaÈ™i nume."; +Strings.OfficeOM.L_FunctionCallFailed = "Apelul {0} la funcÈ›ie nu a reuÈ™it, cod de eroare: {1}."; +Strings.OfficeOM.L_InvalidFormat = "Eroare de format nevalid"; Strings.OfficeOM.L_DataReadError = "Eroare de citire a datelor"; -Strings.OfficeOM.L_UnsupportedEnumerationMessage = "Enumerarea nu este acceptată în aplicaÈ›ia gazdă curentă."; -Strings.OfficeOM.L_DialogInvalidScheme = "Schema adresei URL nu este acceptată. UtilizaÈ›i în schimb HTTPS."; -Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "Se încearcă setarea proprietății doar în citire „{0}â€."; -Strings.OfficeOM.L_RequestTimeout = "Executarea apelului a durat prea mult timp."; -Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "RestricÈ›iile browserului ne-au împiedicat să creăm caseta de dialog. Domeniul casetei de dialog È™i domeniul gazdei programului de completare nu sunt în aceeaÈ™i zonă de securitate."; -Strings.OfficeOM.L_InvalidNode = "Nod nevalid"; +Strings.OfficeOM.L_FormatValueOutOfRange = "Valoarea este în afara intervalului permis."; +Strings.OfficeOM.L_SSOConnectionLostErrorMessage = "A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones."; +Strings.OfficeOM.L_InvalidAPICall = "Apel API nevalid"; +Strings.OfficeOM.L_RunMustReturnPromise = "FuncÈ›ia de procesare pe loturi transmisă metodei „.run†nu a returnat o promisiune. FuncÈ›ia trebuie să returneze o promisiune, pentru a face posibilă eliberarea tuturor obiectelor urmărite automat la finalizarea operaÈ›iunii pe loturi. De obicei, returnaÈ›i o promisiune returnând răspunsul de la „context.sync()â€."; +Strings.OfficeOM.L_Timeout = "OperaÈ›iunea a expirat."; +Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "ConÈ›inutul selectat trebuie să fie într-un format de tabel. FormataÈ›i datele ca tabel È™i încercaÈ›i din nou."; +Strings.OfficeOM.L_SSOClientErrorMessage = "Eroare neaÈ™teptată pe client."; +Strings.OfficeOM.L_OsfControlTypeNotSupported = "Tipul OsfControl nu este acceptat."; +Strings.OfficeOM.L_NetworkProblem = "Problemă de reÈ›ea"; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage = "OperaÈ›iunea nu a reuÈ™it, deoarece acest program de completare nu acceptă acordul utilizatorului în această categorie"; +Strings.OfficeOM.L_AppNameNotExist = "Nu există un nume de program de completare pentru {0}."; +Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Argumente de intrare nevalide."; +Strings.OfficeOM.L_SSOConnectionLostError = "A connection was lost during the sign in process."; +Strings.OfficeOM.L_ElementMissing = "Nu am putut formata celula de tabel pentru că lipsesc unele valori de parametri. ReverificaÈ›i parametrii È™i încercaÈ›i din nou."; Strings.OfficeOM.L_CannotRegisterEvent = "Rutina de tratare a evenimentelor nu poate fi înregistrată."; -Strings.OfficeOM.L_DataWriteReminder = "Memento de scriere a datelor"; -Strings.OfficeOM.L_OperationNotSupported = "OperaÈ›ie neacceptată."; +Strings.OfficeOM.L_DialogRequireHTTPS = "Protocolul HTTP nu este acceptat. UtilizaÈ›i în schimb HTTPS"; +Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Parametrii de coordonate nu se pot utiliza cu tipul de coerciÈ›ie tabel când tabelul conÈ›ine celule îmbinate."; +Strings.OfficeOM.L_InvalidResourceUrl = "URL-ul de resurse furnizat al aplicaÈ›iei este nevalid."; +Strings.OfficeOM.L_UnknownBindingType = "Tipul de legare nu este acceptat."; Strings.OfficeOM.L_EventHandlerAdditionFailed = "Nu s-a reuÈ™it adăugarea rutinei de tratare a evenimentului."; -Strings.OfficeOM.L_DataWriteError = "Eroare de scriere a datelor"; -Strings.OfficeOM.L_InvalidBindingOperation = "OperaÈ›ia de legare nu este validă"; -Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Tipul de impunere specificat nu este compatibil cu acest tip de legare."; -Strings.OfficeOM.L_UnsupportedEnumeration = "Enumerare neacceptată"; -Strings.OfficeOM.L_MissingRequiredArguments = "unele argumente necesare lipsesc"; -Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Valorile rowCount sau columnCount specificate nu sunt valide."; +Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "OperaÈ›iunea nu este acceptată în acest tip de legare."; +Strings.OfficeOM.L_InvalidDataObject = "Obiect de date nevalid"; +Strings.OfficeOM.L_InvalidColumnsForBinding = "Coloanele specificate nu sunt valide."; +Strings.OfficeOM.L_ValueNotLoaded = "Valoarea obiectului rezultat nu a fost încărcată încă. ÃŽnainte de a citi proprietatea valoare, apelaÈ›i „context.sync()†în contextul asociat solicitat."; +Strings.OfficeOM.L_InvalidTableOptionValue = "Unul sau mai mulÈ›i dintre parametrii tableOptions au valori nepermise. ReverificaÈ›i valorile È™i încercaÈ›i din nou."; +Strings.OfficeOM.L_UserAbortedMessage = "Utilizatorul nu a fost de acord cu permisiunile programului de completare."; +Strings.OfficeOM.L_BrowserAPINotSupported = "Acest browser nu acceptă API solicitat."; +Strings.OfficeOM.L_OperationNotSupported = "OperaÈ›ie neacceptată."; +Strings.OfficeOM.L_InvalidGetColumns = "Coloanele specificate nu sunt valide."; +Strings.OfficeOM.L_NotSupportedEventType = "Tipul de eveniment {0} specificat nu este acceptat."; +Strings.OfficeOM.L_UserNotSignedIn = "Niciun utilizator nu este conectat la Office."; +Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Tipul de identitate al utilizatorului nu este acceptat."; Strings.OfficeOM.L_OutOfRange = "ÃŽn afara intervalului"; -Strings.OfficeOM.L_InvalidAPICall = "Apel API nevalid"; -Strings.OfficeOM.L_TooManyOptionalFunction = "mai multe funcÈ›ii opÈ›ionale în lista parametrilor"; -Strings.OfficeOM.L_InvalidGrantMessage = "Nu s-au acordat permisiuni pentru acest program de completare."; -Strings.OfficeOM.L_SliceSizeNotSupported = "Dimensiunea specificată a sectorului nu este acceptată."; -Strings.OfficeOM.L_UserClickIgnore = "Utilizatorul a ales să ignore caseta de dialog."; -Strings.OfficeOM.L_DialogAddressNotTrusted = "Domeniul adresei URL nu este inclus în elementul AppDomains din manifest."; +Strings.OfficeOM.L_InvalidSetStartRowColumn = "Valorile startRow sau startColumn specificate nu sunt valide."; +Strings.OfficeOM.L_MissingParameter = "Parametru lipsă"; +Strings.OfficeOM.L_CannotWriteToSelection = "Nu se poate scrie în selecÈ›ia curentă."; +Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Se permite"; +Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = "Schimbările proprietății „{0}†nu pot fi aplicate printr-o metodă „object.setâ€."; +Strings.OfficeOM.L_UnsupportedDataObject = "Tipul obiectului de date furnizat nu este acceptat."; +Strings.OfficeOM.L_InvalidApiCallInContext = "Apel API nevalid în contextul curent."; +Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "AplicaÈ›ia {0} nu există. Nu s-a apelat Microsoft.Office.WebExtension.initialize(motiv)."; +Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Tipul specificat de legare nu este compatibil cu elementul denumit furnizat."; +Strings.OfficeOM.L_InvalidResourceUrlMessage = "URL-ul specificat în manifest este nevalid."; +Strings.OfficeOM.L_SpecifiedIdNotExist = "ID-ul specificat nu există."; +Strings.OfficeOM.L_DataWriteReminder = "Memento de scriere a datelor"; +Strings.OfficeOM.L_InValidOptionalArgument = "argument opÈ›ional incorect"; +Strings.OfficeOM.L_CoercionTypeNotSupported = "Tipul de impunere specificat nu este acceptat."; +Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "RestricÈ›iile browserului ne-au împiedicat să creăm caseta de dialog. Domeniul casetei de dialog È™i domeniul gazdei programului de completare nu sunt în aceeaÈ™i zonă de securitate."; +Strings.OfficeOM.L_ActivityLimitReached = "S-a atins limita de activitate."; Strings.OfficeOM.L_InvalidSetColumns = "Coloanele specificate nu sunt valide."; -Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "OperaÈ›iunea nu este acceptată în acest tip de legare."; +Strings.OfficeOM.L_EventHandlerRemovalFailed = "Nu s-a reuÈ™it eliminarea rutinei de tratare a evenimentului."; +Strings.OfficeOM.L_EventHandlerNotExist = "Rutina de tratare a evenimentului specificat nu a fost găsită pentru această legare."; +Strings.OfficeOM.L_RedundantCallbackSpecification = "Apelul invers nu poate fi specificat în lista de argumente È™i în obiectul opÈ›ional."; +Strings.OfficeOM.L_DataNotMatchSelection = "Obiectul de date furnizat nu este compatibil cu forma sau dimensiunile selecÈ›iei curente."; +Strings.OfficeOM.L_DataNotMatchCoercionType = "Tipul de obiect de date specificat nu este compatibil cu selecÈ›ia curentă."; +Strings.OfficeOM.L_NamedItemNotFound = "Elementul denumit nu există."; Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Datele sunt perimate. RegăsiÈ›i obiectul din nou."; +Strings.OfficeOM.L_UserAborted = "Utilizatorul a abandonat solicitarea de consimțământ."; +Strings.OfficeOM.L_NotImplemented = "FuncÈ›ia {0} nu este implementată."; +Strings.OfficeOM.L_InternalErrorDescription = "Eroare internă."; +Strings.OfficeOM.L_SettingsStaleError = "Eroare de setări învechite"; +Strings.OfficeOM.L_InvalidCoercion = "Tipul de coerciÈ›ie nu este valid"; +Strings.OfficeOM.L_CustomXmlNodeNotFound = "Nodul specificat nu a fost găsit."; +Strings.OfficeOM.L_UnsupportedEnumeration = "Enumerare neacceptată"; +Strings.OfficeOM.L_DialogOK = "OK"; Strings.OfficeOM.L_CannotNavigateTo = "Obiectul este situat într-un loc unde nu este acceptată navigarea."; -Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Ignorare"; -Strings.OfficeOM.L_InvalidGetRows = "Rândurile specificate nu sunt valide."; -Strings.OfficeOM.L_MemoryLimit = "Limită de memorie depășită"; -Strings.OfficeOM.L_FileTypeNotSupported = "Tipul de fiÈ™ier specificat nu este acceptat."; -Strings.OfficeOM.L_InvalidDataFormat = "Formatul obiectului de date specificat nu este valid."; -Strings.OfficeOM.L_FormatValueOutOfRange = "Valoarea este în afara intervalului permis."; -Strings.OfficeOM.L_SaveSettingsError = "Eroare de salvare a setărilor"; -Strings.OfficeOM.L_SSOServerError = "Eroare apărută la furnizorul de autentificare."; -Strings.OfficeOM.L_ReadSettingsError = "Eroare de citire a setărilor" +Strings.OfficeOM.L_OverwriteWorksheetData = "OperaÈ›ia de setare nu a reuÈ™it pentru că obiectul de date furnizat va suprascrie sau va schimba datele."; +Strings.OfficeOM.L_SSOServerErrorMessage = "Eroare neaÈ™teptată pe server."; +Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Valorile rowCount sau columnCount specificate nu sunt valide."; +Strings.OfficeOM.L_InitializeNotReady = "Office.js încă nu s-a încărcat complet. ÃŽncercaÈ›i din nou mai târziu sau asiguraÈ›i-vă că adăugaÈ›i codul de iniÈ›ializare în funcÈ›ia Office.initialize."; +Strings.OfficeOM.L_TooManyOptionalObjects = "mai multe obiecte opÈ›ionale în lista parametrilor"; +Strings.OfficeOM.L_CloseFileBeforeRetrieve = "ApelaÈ›i closeAsync pentru fiÈ™ierul curent înainte de a regăsi altul."; +Strings.OfficeOM.L_InvalidBinding = "Legare nevalidă"; +Strings.OfficeOM.L_ShuttingDown = "OperaÈ›ia nu a reuÈ™it pentru că datele de pe server nu sunt actuale." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/ro-ro/office_strings.js b/node_modules/@microsoft/office-js/dist/ro-ro/office_strings.js index cf8094d..67281c6 100644 --- a/node_modules/@microsoft/office-js/dist/ro-ro/office_strings.js +++ b/node_modules/@microsoft/office-js/dist/ro-ro/office_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_PropertyNotLoaded="Proprietatea „{0}†nu este disponibilă. ÃŽnainte de a citi valoarea proprietății, apelaÈ›i metoda de încărcare pentru obiectul care o conÈ›ine È™i apelaÈ›i „context.sync()†pe contextul de solicitare asociat.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="Schimbările proprietății „{0}†nu pot fi aplicate printr-o metodă „object.setâ€.";Strings.OfficeOM.L_NotSupportedEventType="Tipul de eveniment {0} specificat nu este acceptat.";Strings.OfficeOM.L_InvalidArgumentGeneric="Argumentele transmise funcÈ›iei nu funcÈ›ionează pentru această situaÈ›ie, lipsesc sau nu sunt în formatul corect.";Strings.OfficeOM.L_UserAborted="Utilizatorul a abandonat solicitarea de consimțământ.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Programul de completare solicită deja un token de acces.";Strings.OfficeOM.L_InvalidSSOAddinMessage="API-ul de identitate nu este acceptat pentru acest program de completare.";Strings.OfficeOM.L_InvalidObjectPath="Calea obiectului „{0}†nu funcÈ›ionează pentru ceea ce încercaÈ›i să faceÈ›i. Dacă utilizaÈ›i obiectul în mai multe apeluri „context.sync†și în afara execuÈ›iei secvenÈ›iale a unui lot „.runâ€, utilizaÈ›i metodele „context.trackedObjects.add()†și „context.trackedObjects.remove()†pentru a gestiona durata de viață a obiectului.";Strings.OfficeOM.L_InvalidCoercion="Tipul de coerciÈ›ie nu este valid";Strings.OfficeOM.L_InvalidBindingError="Eroare de legare nevalidă";Strings.OfficeOM.L_InvalidGrant="Preautorizarea lipseÈ™te.";Strings.OfficeOM.L_SettingNameNotExist="Numele de setare specificat nu există.";Strings.OfficeOM.L_InvalidRequestContext="Obiectul nu se poate utiliza în contexte de solicitări diferite.";Strings.OfficeOM.L_InvalidTableOptionValue="Unul sau mai mulÈ›i dintre parametrii tableOptions au valori nepermise. ReverificaÈ›i valorile È™i încercaÈ›i din nou.";Strings.OfficeOM.L_ValueNotLoaded="Valoarea obiectului rezultat nu a fost încărcată încă. ÃŽnainte de a citi proprietatea valoare, apelaÈ›i „context.sync()†în contextul asociat solicitat.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Vă rugăm să faceÈ›i o selecÈ›ie.";Strings.OfficeOM.L_FunctionCallFailed="Apelul {0} la funcÈ›ie nu a reuÈ™it, cod de eroare: {1}.";Strings.OfficeOM.L_DialogAlreadyOpened="OperaÈ›iunea nu a reuÈ™it, deoarece acest program de completare are deja un dialog activ.";Strings.OfficeOM.L_EventRegistrationError="Eroare de înregistrare eveniment";Strings.OfficeOM.L_CoercionTypeNotSupported="Tipul de impunere specificat nu este acceptat.";Strings.OfficeOM.L_SettingsCannotSave="Setările nu s-au putut salva.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="configuraÈ›i browserul";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Tipul de identitate al utilizatorului nu este acceptat.";Strings.OfficeOM.L_CustomXmlError="Eroare XML particularizat.";Strings.OfficeOM.L_NamedItemNotFound="Elementul denumit nu există.";Strings.OfficeOM.L_IndexOutOfRange="Index în afara intervalului.";Strings.OfficeOM.L_SSOServerErrorMessage="Eroare neaÈ™teptată pe server.";Strings.OfficeOM.L_NewWindowCrossZone="Setările de securitate din browser ne împiedică să creăm o casetă de dialog. ÃŽncercaÈ›i un alt browser, sau {0} astfel încât „{1}†și domeniul indicat în bara de adrese să fie în aceeaÈ™i zonă de securitate.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Notă: se sugerează ca seturile de formatări setate de o apelare de Formatare API să fie mai puÈ›ine de 100.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="S-a atins limita de selecÈ›ie";Strings.OfficeOM.L_SpecifiedIdNotExist="ID-ul specificat nu există.";Strings.OfficeOM.L_ElementMissing="Nu am putut formata celula de tabel pentru că lipsesc unele valori de parametri. ReverificaÈ›i parametrii È™i încercaÈ›i din nou.";Strings.OfficeOM.L_InvalidSelectionForBindingType="O legare nu poate fi creată cu selecÈ›ia curentă È™i tipul de legare specificat.";Strings.OfficeOM.L_SettingsAreStale="Setările nu au putut fi salvate pentru că nu sunt actuale.";Strings.OfficeOM.L_APICallFailed="Apel API nereuÈ™it";Strings.OfficeOM.L_InvalidSetRows="Rândurile specificate nu sunt valide.";Strings.OfficeOM.L_OsfControlTypeNotSupported="Tipul OsfControl nu este acceptat.";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} doreÈ™te să afiÈ™eze o fereastră nouă.";Strings.OfficeOM.L_SSOClientError="Eroare la solicitarea de autentificare din Office.";Strings.OfficeOM.L_InternalError="Eroare internă";Strings.OfficeOM.L_SelectionCannotBound="Nu se poate face legarea la selecÈ›ia curentă.";Strings.OfficeOM.L_InvalidColumnsForBinding="Coloanele specificate nu sunt valide.";Strings.OfficeOM.L_NotSupported="FuncÈ›ia {0} nu este acceptată.";Strings.OfficeOM.L_BindingCreationError="Eroare de creare a legării";Strings.OfficeOM.L_RunMustReturnPromise="FuncÈ›ia de procesare pe loturi transmisă metodei „.run†nu a returnat o promisiune. FuncÈ›ia trebuie să returneze o promisiune, pentru a face posibilă eliberarea tuturor obiectelor urmărite automat la finalizarea operaÈ›iunii pe loturi. De obicei, returnaÈ›i o promisiune returnând răspunsul de la „context.sync()â€.";Strings.OfficeOM.L_ConnectionFailureWithDetails="Solicitarea nu a reuÈ™it, cu codul de stare {0}, codul de eroare {1} È™i următorul mesaj de eroare: {2}";Strings.OfficeOM.L_BrowserAPINotSupported="Acest browser nu acceptă API solicitat.";Strings.OfficeOM.L_RedundantCallbackSpecification="Apelul invers nu poate fi specificat în lista de argumente È™i în obiectul opÈ›ional.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Se permite";Strings.OfficeOM.L_MissingParameter="Parametru lipsă";Strings.OfficeOM.L_InvalidGetStartRowColumn="Valorile startRow sau startColumn specificate nu sunt valide.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="AplicaÈ›ia {0} nu există. Nu s-a apelat Microsoft.Office.WebExtension.initialize(motiv).";Strings.OfficeOM.L_InvalidDataObject="Obiect de date nevalid";Strings.OfficeOM.L_CannotWriteToSelection="Nu se poate scrie în selecÈ›ia curentă.";Strings.OfficeOM.L_AppNameNotExist="Nu există un nume de program de completare pentru {0}.";Strings.OfficeOM.L_UnsupportedUserIdentity="Tipul de identitate al utilizatorului nu este acceptat.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="OperaÈ›iunea nu a reuÈ™it, deoarece acest program de completare solicită deja un token de acces.";Strings.OfficeOM.L_HostError="Eroare gazdă";Strings.OfficeOM.L_DataNotMatchBindingType="Obiectul de date specificat nu este compatibil cu tipul de legare.";Strings.OfficeOM.L_ColIndexOutOfRange="Valoarea de index a coloanei este în afara intervalului permis. UtilizaÈ›i o valoare (0 sau mai mare) care este mai mică decât numărul de coloane.";Strings.OfficeOM.L_SSOClientErrorMessage="Eroare neaÈ™teptată pe client.";Strings.OfficeOM.L_InvalidParameters="FuncÈ›ia {0} are parametri nevalizi.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Tipul specificat de legare nu este compatibil cu elementul denumit furnizat.";Strings.OfficeOM.L_NetworkProblem="Problemă de reÈ›ea";Strings.OfficeOM.L_DataNotMatchBindingSize="Obiectul de date furnizat nu corespunde dimensiunii selecÈ›iei curente.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="O problemă de reÈ›ea a împiedicat regăsirea fiÈ™ierului.";Strings.OfficeOM.L_EventHandlerRemovalFailed="Nu s-a reuÈ™it eliminarea rutinei de tratare a evenimentului.";Strings.OfficeOM.L_DialogRequireHTTPS="Protocolul HTTP nu este acceptat. UtilizaÈ›i în schimb HTTPS";Strings.OfficeOM.L_InValidOptionalArgument="argument opÈ›ional incorect";Strings.OfficeOM.L_ActivityLimitReached="S-a atins limita de activitate.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Date neactuale";Strings.OfficeOM.L_BindingNotExist="Legarea specificată nu există.";Strings.OfficeOM.L_InternalErrorDescription="Eroare internă.";Strings.OfficeOM.L_CallbackNotAFunction="Apelul invers trebuie să fie de tipul funcÈ›ie, a fost de tipul {0}.";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_SettingsStaleError="Eroare de setări învechite";Strings.OfficeOM.L_TooManyArguments="prea multe argumente";Strings.OfficeOM.L_GetDataParametersConflict="Parametrii specificaÈ›i sunt în conflict.";Strings.OfficeOM.L_ConnectionFailureWithStatus="Solicitarea nu a reuÈ™it, cu codul de stare {0}.";Strings.OfficeOM.L_InvalidApiCallInContext="Apel API nevalid în contextul curent.";Strings.OfficeOM.L_NoCapability="Nu aveÈ›i suficiente permisiuni pentru această acÈ›iune.";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Argumente de intrare nevalide.";Strings.OfficeOM.L_InvalidReadForBlankRow="Rândul specificat este necompletat.";Strings.OfficeOM.L_APINotSupported="API neacceptat";Strings.OfficeOM.L_PropertyDoesNotExist="Proprietatea „{0}†nu există pe obiect.";Strings.OfficeOM.L_PermissionDenied="Permisiunea refuzată.";Strings.OfficeOM.L_TooManyOptionalObjects="mai multe obiecte opÈ›ionale în lista parametrilor";Strings.OfficeOM.L_CustomXmlNodeNotFound="Nodul specificat nu a fost găsit.";Strings.OfficeOM.L_DataStale="Date neactuale";Strings.OfficeOM.L_ShuttingDown="OperaÈ›ia nu a reuÈ™it pentru că datele de pe server nu sunt actuale.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Parametrii de coordonate nu se pot utiliza cu tipul de coerciÈ›ie tabel când tabelul conÈ›ine celule îmbinate.";Strings.OfficeOM.L_InvalidBinding="Legare nevalidă";Strings.OfficeOM.L_InvalidFormatValue="Unul sau mai mulÈ›i dintre parametrii de format au valori nepermise. ReverificaÈ›i valorile È™i încercaÈ›i din nou.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Parametrii de coordonate nu se pot utiliza cu tipul de coerciÈ›ie tabel când tabelul conÈ›ine celule îmbinate.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath limitează selecÈ›ia la 1024 elemente.";Strings.OfficeOM.L_GetSelectionNotSupported="SelecÈ›ia curentă nu este acceptată.";Strings.OfficeOM.L_SetDataIsTooLarge="Obiectul de date specificat este prea mare.";Strings.OfficeOM.L_InvalidFormat="Eroare de format nevalid";Strings.OfficeOM.L_RequestTokenUnavailable="Acest API a fost reglat pentru a încetini frecvenÈ›a de apel.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="ConÈ›inutul selectat trebuie să fie într-un format de tabel. FormataÈ›i datele ca tabel È™i încercaÈ›i din nou.";Strings.OfficeOM.L_InvalidGetColumns="Coloanele specificate nu sunt valide.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="SelecÈ›ia curentă nu este compatibilă cu tipul de impunere specificat.";Strings.OfficeOM.L_InvalidResourceUrlMessage="URL-ul specificat în manifest este nevalid.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Sesiune nevalidă sau expirată";Strings.OfficeOM.L_UnsupportedDataObject="Tipul obiectului de date furnizat nu este acceptat.";Strings.OfficeOM.L_GetDataIsTooLarge="Setul de date solicitat este prea mare.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Notă: se sugerează ca numărul de celule dintr-un tabel să fie sub 20.000 de celule.";Strings.OfficeOM.L_InvalidSetStartRowColumn="Valorile startRow sau startColumn specificate nu sunt valide.";Strings.OfficeOM.L_EventHandlerNotExist="Rutina de tratare a evenimentului specificat nu a fost găsită pentru această legare.";Strings.OfficeOM.L_Timeout="OperaÈ›iunea a expirat.";Strings.OfficeOM.L_FormattingReminder="Se formatează memento-ul";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="Sesiunea dvs. Office Online a expirat sau nu este validă. Pentru a continua, reîmprospătaÈ›i pagina.";Strings.OfficeOM.L_UserNotSignedIn="Niciun utilizator nu este conectat la Office.";Strings.OfficeOM.L_NotSupportedBindingType="Tipul de legare {0} specificat nu este acceptat.";Strings.OfficeOM.L_DataNotMatchSelection="Obiectul de date furnizat nu este compatibil cu forma sau dimensiunile selecÈ›iei curente.";Strings.OfficeOM.L_NotImplemented="FuncÈ›ia {0} nu este implementată.";Strings.OfficeOM.L_OverwriteWorksheetData="OperaÈ›ia de setare nu a reuÈ™it pentru că obiectul de date furnizat va suprascrie sau va schimba datele.";Strings.OfficeOM.L_SetDataParametersConflict="Parametrii specificaÈ›i sunt în conflict.";Strings.OfficeOM.L_UnknownBindingType="Tipul de legare nu este acceptat.";Strings.OfficeOM.L_InitializeNotReady="Office.js încă nu s-a încărcat complet. ÃŽncercaÈ›i din nou mai târziu sau asiguraÈ›i-vă că adăugaÈ›i codul de iniÈ›ializare în funcÈ›ia Office.initialize.";Strings.OfficeOM.L_RowIndexOutOfRange="Valoarea de index a rândului este în afara intervalului permis. UtilizaÈ›i o valoare (0 sau mai mare) care este mai mică decât numărul de rânduri.";Strings.OfficeOM.L_BadSelectorString="Șirul care a trecut în selector este formatat necorespunzător sau nu este acceptat.";Strings.OfficeOM.L_TooManyIncompleteRequests="AÈ™teptaÈ›i finalizarea apelului anterior.";Strings.OfficeOM.L_DisplayDialogError="AfiÈ™are eroare dialog";Strings.OfficeOM.L_InvalidCellsValue="Unul sau mai mulÈ›i dintre parametrii de celule au valori nepermise. ReverificaÈ›i valorile È™i încercaÈ›i din nou.";Strings.OfficeOM.L_InvalidArgument="Argumentul „{0}†nu funcÈ›ionează pentru această situaÈ›ie, lipseÈ™te sau nu este în formatul corect.";Strings.OfficeOM.L_DocumentReadOnly="OperaÈ›iunea solicitată nu este permisă pe modul curent al documentului.";Strings.OfficeOM.L_DataNotMatchCoercionType="Tipul de obiect de date specificat nu este compatibil cu selecÈ›ia curentă.";Strings.OfficeOM.L_InvalidValue="Valoare nevalidă";Strings.OfficeOM.L_CloseFileBeforeRetrieve="ApelaÈ›i closeAsync pentru fiÈ™ierul curent înainte de a regăsi altul.";Strings.OfficeOM.L_DialogNavigateError="Eroare de navigare în dialog";Strings.OfficeOM.L_UserAbortedMessage="Utilizatorul nu a fost de acord cu permisiunile programului de completare.";Strings.OfficeOM.L_NavOutOfBound="OperaÈ›iunea nu a reuÈ™it pentru că indexul este în afara intervalului.";Strings.OfficeOM.L_BindingToMultipleSelection="SelecÈ›iile neadiacente nu sunt acceptate.";Strings.OfficeOM.L_InvalidResourceUrl="URL-ul de resurse furnizat al aplicaÈ›iei este nevalid.";Strings.OfficeOM.L_MultipleNamedItemFound="S-au găsit mai multe obiecte cu acelaÈ™i nume.";Strings.OfficeOM.L_DataReadError="Eroare de citire a datelor";Strings.OfficeOM.L_UnsupportedEnumerationMessage="Enumerarea nu este acceptată în aplicaÈ›ia gazdă curentă.";Strings.OfficeOM.L_DialogInvalidScheme="Schema adresei URL nu este acceptată. UtilizaÈ›i în schimb HTTPS.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="Se încearcă setarea proprietății doar în citire „{0}â€.";Strings.OfficeOM.L_RequestTimeout="Executarea apelului a durat prea mult timp.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="RestricÈ›iile browserului ne-au împiedicat să creăm caseta de dialog. Domeniul casetei de dialog È™i domeniul gazdei programului de completare nu sunt în aceeaÈ™i zonă de securitate.";Strings.OfficeOM.L_InvalidNode="Nod nevalid";Strings.OfficeOM.L_CannotRegisterEvent="Rutina de tratare a evenimentelor nu poate fi înregistrată.";Strings.OfficeOM.L_DataWriteReminder="Memento de scriere a datelor";Strings.OfficeOM.L_OperationNotSupported="OperaÈ›ie neacceptată.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Nu s-a reuÈ™it adăugarea rutinei de tratare a evenimentului.";Strings.OfficeOM.L_DataWriteError="Eroare de scriere a datelor";Strings.OfficeOM.L_InvalidBindingOperation="OperaÈ›ia de legare nu este validă";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Tipul de impunere specificat nu este compatibil cu acest tip de legare.";Strings.OfficeOM.L_UnsupportedEnumeration="Enumerare neacceptată";Strings.OfficeOM.L_MissingRequiredArguments="unele argumente necesare lipsesc";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Valorile rowCount sau columnCount specificate nu sunt valide.";Strings.OfficeOM.L_OutOfRange="ÃŽn afara intervalului";Strings.OfficeOM.L_InvalidAPICall="Apel API nevalid";Strings.OfficeOM.L_TooManyOptionalFunction="mai multe funcÈ›ii opÈ›ionale în lista parametrilor";Strings.OfficeOM.L_InvalidGrantMessage="Nu s-au acordat permisiuni pentru acest program de completare.";Strings.OfficeOM.L_SliceSizeNotSupported="Dimensiunea specificată a sectorului nu este acceptată.";Strings.OfficeOM.L_UserClickIgnore="Utilizatorul a ales să ignore caseta de dialog.";Strings.OfficeOM.L_DialogAddressNotTrusted="Domeniul adresei URL nu este inclus în elementul AppDomains din manifest.";Strings.OfficeOM.L_InvalidSetColumns="Coloanele specificate nu sunt valide.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="OperaÈ›iunea nu este acceptată în acest tip de legare.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Datele sunt perimate. RegăsiÈ›i obiectul din nou.";Strings.OfficeOM.L_CannotNavigateTo="Obiectul este situat într-un loc unde nu este acceptată navigarea.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Ignorare";Strings.OfficeOM.L_InvalidGetRows="Rândurile specificate nu sunt valide.";Strings.OfficeOM.L_MemoryLimit="Limită de memorie depășită";Strings.OfficeOM.L_FileTypeNotSupported="Tipul de fiÈ™ier specificat nu este acceptat.";Strings.OfficeOM.L_InvalidDataFormat="Formatul obiectului de date specificat nu este valid.";Strings.OfficeOM.L_FormatValueOutOfRange="Valoarea este în afara intervalului permis.";Strings.OfficeOM.L_SaveSettingsError="Eroare de salvare a setărilor";Strings.OfficeOM.L_SSOServerError="Eroare apărută la furnizorul de autentificare.";Strings.OfficeOM.L_ReadSettingsError="Eroare de citire a setărilor" \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Programul de completare solicită deja un token de acces.";Strings.OfficeOM.L_InvalidGrant="Preautorizarea lipseÈ™te.";Strings.OfficeOM.L_CustomFunctionNameContainsBadChars="Numele funcÈ›iei poate conÈ›ine numai litere, cifre, linii de subliniere È™i puncte.";Strings.OfficeOM.L_SliceSizeNotSupported="Dimensiunea specificată a sectorului nu este acceptată.";Strings.OfficeOM.L_SettingsCannotSave="Setările nu s-au putut salva.";Strings.OfficeOM.L_ColIndexOutOfRange="Valoarea de index a coloanei este în afara intervalului permis. UtilizaÈ›i o valoare (0 sau mai mare) care este mai mică decât numărul de coloane.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Notă: se sugerează ca seturile de formatări setate de o apelare de Formatare API să fie mai puÈ›ine de 100.";Strings.OfficeOM.L_ApiNotFoundDetails="Metoda sau proprietatea {0} face parte din setul de solicitări {1}, care nu este disponibil în versiunea dvs. de {2}.";Strings.OfficeOM.L_InvalidFormatValue="Unul sau mai mulÈ›i dintre parametrii de format au valori nepermise. ReverificaÈ›i valorile È™i încercaÈ›i din nou.";Strings.OfficeOM.L_SelectionCannotBound="Nu se poate face legarea la selecÈ›ia curentă.";Strings.OfficeOM.L_TooManyOptionalFunction="mai multe funcÈ›ii opÈ›ionale în lista parametrilor";Strings.OfficeOM.L_InvalidObjectPath="Calea obiectului „{0}†nu funcÈ›ionează pentru ceea ce încercaÈ›i să faceÈ›i. Dacă utilizaÈ›i obiectul în mai multe apeluri „context.sync†și în afara execuÈ›iei secvenÈ›iale a unui lot „.runâ€, utilizaÈ›i metodele „context.trackedObjects.add()†și „context.trackedObjects.remove()†pentru a gestiona durata de viață a obiectului.";Strings.OfficeOM.L_CallbackNotAFunction="Apelul invers trebuie să fie de tipul funcÈ›ie, a fost de tipul {0}.";Strings.OfficeOM.L_FormattingReminder="Se formatează memento-ul";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath limitează selecÈ›ia la 1024 elemente.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="S-a atins limita de selecÈ›ie";Strings.OfficeOM.L_InvalidBindingOperation="OperaÈ›ia de legare nu este validă";Strings.OfficeOM.L_InvalidSetRows="Rândurile specificate nu sunt valide.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Tipul de impunere specificat nu este compatibil cu acest tip de legare.";Strings.OfficeOM.L_GetSelectionNotSupported="SelecÈ›ia curentă nu este acceptată.";Strings.OfficeOM.L_DialogAlreadyOpened="OperaÈ›iunea nu a reuÈ™it, deoarece acest program de completare are deja un dialog activ.";Strings.OfficeOM.L_InvalidGrantMessage="Nu s-au acordat permisiuni pentru acest program de completare.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="SelecÈ›ia curentă nu este compatibilă cu tipul de impunere specificat.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Vă rugăm să faceÈ›i o selecÈ›ie.";Strings.OfficeOM.L_NewWindowCrossZone="Setările de securitate din browser ne împiedică să creăm o casetă de dialog. ÃŽncercaÈ›i un alt browser, sau {0} astfel încât „{1}†și domeniul indicat în bara de adrese să fie în aceeaÈ™i zonă de securitate.";Strings.OfficeOM.L_CustomFunctionImplementationMissing="Proprietatea cu acest nume din Excel.CustomFunctions care reprezintă definiÈ›ia funcÈ›iei trebuie să conÈ›ină o proprietate „callâ€, care implementează funcÈ›ia.";Strings.OfficeOM.L_ConnectionFailureWithStatus="Solicitarea nu a reuÈ™it, cu codul de stare {0}.";Strings.OfficeOM.L_ReadSettingsError="Eroare de citire a setărilor";Strings.OfficeOM.L_BadSelectorString="Șirul care a trecut în selector este formatat necorespunzător sau nu este acceptat.";Strings.OfficeOM.L_InvalidGetStartRowColumn="Valorile startRow sau startColumn specificate nu sunt valide.";Strings.OfficeOM.L_RequestTokenUnavailable="Acest API a fost reglat pentru a încetini frecvenÈ›a de apel.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Parametrii de coordonate nu se pot utiliza cu tipul de coerciÈ›ie tabel când tabelul conÈ›ine celule îmbinate.";Strings.OfficeOM.L_DialogAddressNotTrusted="Domeniul adresei URL nu este inclus în elementul AppDomains din manifest.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="Se încearcă setarea proprietății doar în citire „{0}â€.";Strings.OfficeOM.L_SettingNameNotExist="Numele de setare specificat nu există.";Strings.OfficeOM.L_NavOutOfBound="OperaÈ›iunea nu a reuÈ™it pentru că indexul este în afara intervalului.";Strings.OfficeOM.L_BindingToMultipleSelection="SelecÈ›iile neadiacente nu sunt acceptate.";Strings.OfficeOM.L_MemoryLimit="Limită de memorie depășită";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="OperaÈ›iunea nu a reuÈ™it, deoarece acest program de completare solicită deja un token de acces.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Notă: se sugerează ca numărul de celule dintr-un tabel să fie sub 20.000 de celule.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="O problemă de reÈ›ea a împiedicat regăsirea fiÈ™ierului.";Strings.OfficeOM.L_InvalidRequestContext="Obiectul nu se poate utiliza în contexte de solicitări diferite.";Strings.OfficeOM.L_SSOServerError="Eroare apărută la furnizorul de autentificare.";Strings.OfficeOM.L_IndexOutOfRange="Index în afara intervalului.";Strings.OfficeOM.L_APICallFailed="Apel API nereuÈ™it";Strings.OfficeOM.L_UserClickIgnore="Utilizatorul a ales să ignore caseta de dialog.";Strings.OfficeOM.L_HostError="Eroare gazdă";Strings.OfficeOM.L_InvalidNode="Nod nevalid";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Ignorare";Strings.OfficeOM.L_DocumentReadOnly="OperaÈ›iunea solicitată nu este permisă pe modul curent al documentului.";Strings.OfficeOM.L_InvalidParameters="FuncÈ›ia {0} are parametri nevalizi.";Strings.OfficeOM.L_InvalidDataFormat="Formatul obiectului de date specificat nu este valid.";Strings.OfficeOM.L_DialogNavigateError="Eroare de navigare în dialog";Strings.OfficeOM.L_CustomFunctionNameCannotSplit="Numele funcÈ›iei trebuie să conÈ›ină un spaÈ›iu de nume care nu este gol È™i un nume scurt care nu este gol.";Strings.OfficeOM.L_InvalidSSOAddinMessage="API-ul de identitate nu este acceptat pentru acest program de completare.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Sesiune nevalidă sau expirată";Strings.OfficeOM.L_SettingsAreStale="Setările nu au putut fi salvate pentru că nu sunt actuale.";Strings.OfficeOM.L_InvalidBindingError="Eroare de legare nevalidă";Strings.OfficeOM.L_SetDataParametersConflict="Parametrii specificaÈ›i sunt în conflict.";Strings.OfficeOM.L_DisplayDialogError="AfiÈ™are eroare dialog";Strings.OfficeOM.L_EventRegistrationError="Eroare de înregistrare eveniment";Strings.OfficeOM.L_InvalidCellsValue="Unul sau mai mulÈ›i dintre parametrii de celule au valori nepermise. ReverificaÈ›i valorile È™i încercaÈ›i din nou.";Strings.OfficeOM.L_InvalidGetRows="Rândurile specificate nu sunt valide.";Strings.OfficeOM.L_GetDataIsTooLarge="Setul de date solicitat este prea mare.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="Enumerarea nu este acceptată în aplicaÈ›ia gazdă curentă.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory="Acest program de completare nu acceptă acordul utilizatorului.";Strings.OfficeOM.L_DataWriteError="Eroare de scriere a datelor";Strings.OfficeOM.L_TooManyArguments="prea multe argumente";Strings.OfficeOM.L_MultipleNamedItemFound="S-au găsit mai multe obiecte cu acelaÈ™i nume.";Strings.OfficeOM.L_PermissionDenied="Permisiunea refuzată.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="configuraÈ›i browserul";Strings.OfficeOM.L_TooManyIncompleteRequests="AÈ™teptaÈ›i finalizarea apelului anterior.";Strings.OfficeOM.L_InvalidArgumentGeneric="Argumentele transmise funcÈ›iei nu funcÈ›ionează pentru această situaÈ›ie, lipsesc sau nu sunt în formatul corect.";Strings.OfficeOM.L_BindingCreationError="Eroare de creare a legării";Strings.OfficeOM.L_InvalidReadForBlankRow="Rândul specificat este necompletat.";Strings.OfficeOM.L_ConnectionFailureWithDetails="Solicitarea nu a reuÈ™it, cu codul de stare {0}, codul de eroare {1} È™i următorul mesaj de eroare: {2}";Strings.OfficeOM.L_FileTypeNotSupported="Tipul de fiÈ™ier specificat nu este acceptat.";Strings.OfficeOM.L_NotSupportedBindingType="Tipul de legare {0} specificat nu este acceptat.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Date neactuale";Strings.OfficeOM.L_PropertyNotLoaded="Proprietatea „{0}†nu este disponibilă. ÃŽnainte de a citi valoarea proprietății, apelaÈ›i metoda de încărcare pentru obiectul care o conÈ›ine È™i apelaÈ›i „context.sync()†pe contextul de solicitare asociat.";Strings.OfficeOM.L_NotSupported="FuncÈ›ia {0} nu este acceptată.";Strings.OfficeOM.L_DataNotMatchBindingSize="Obiectul de date furnizat nu corespunde dimensiunii selecÈ›iei curente.";Strings.OfficeOM.L_DataStale="Date neactuale";Strings.OfficeOM.L_SSOClientError="Eroare la solicitarea de autentificare din Office.";Strings.OfficeOM.L_MissingRequiredArguments="unele argumente necesare lipsesc";Strings.OfficeOM.L_DataNotMatchBindingType="Obiectul de date specificat nu este compatibil cu tipul de legare.";Strings.OfficeOM.L_SetDataIsTooLarge="Obiectul de date specificat este prea mare.";Strings.OfficeOM.L_CustomXmlError="Eroare XML particularizat.";Strings.OfficeOM.L_DialogInvalidScheme="Schema adresei URL nu este acceptată. UtilizaÈ›i în schimb HTTPS.";Strings.OfficeOM.L_APINotSupported="API neacceptat";Strings.OfficeOM.L_RowIndexOutOfRange="Valoarea de index a rândului este în afara intervalului permis. UtilizaÈ›i o valoare (0 sau mai mare) care este mai mică decât numărul de rânduri.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="Sesiunea dvs. Office Online a expirat sau nu este validă. Pentru a continua, reîmprospătaÈ›i pagina.";Strings.OfficeOM.L_CustomFunctionDefinitionMissing="O proprietate cu acest nume care reprezintă definiÈ›ia funcÈ›iei trebuie să existe în Excel.CustomFunctions.";Strings.OfficeOM.L_GetDataParametersConflict="Parametrii specificaÈ›i sunt în conflict.";Strings.OfficeOM.L_InvalidOperationInCellEditMode="Excel este în modul de editare a celulelor. IeÈ™iÈ›i din modul de editare apăsând ENTER sau TAB sau selectând o altă celulă, apoi încercaÈ›i din nou.";Strings.OfficeOM.L_RequestTimeout="Executarea apelului a durat prea mult timp.";Strings.OfficeOM.L_InvalidArgument="Argumentul „{0}†nu funcÈ›ionează pentru această situaÈ›ie, lipseÈ™te sau nu este în formatul corect.";Strings.OfficeOM.L_BindingNotExist="Legarea specificată nu există.";Strings.OfficeOM.L_SaveSettingsError="Eroare de salvare a setărilor";Strings.OfficeOM.L_InvalidSelectionForBindingType="O legare nu poate fi creată cu selecÈ›ia curentă È™i tipul de legare specificat.";Strings.OfficeOM.L_InternalError="Eroare internă";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} doreÈ™te să afiÈ™eze o fereastră nouă.";Strings.OfficeOM.L_PropertyDoesNotExist="Proprietatea „{0}†nu există pe obiect.";Strings.OfficeOM.L_UnsupportedUserIdentity="Tipul de identitate al utilizatorului nu este acceptat.";Strings.OfficeOM.L_NoCapability="Nu aveÈ›i suficiente permisiuni pentru această acÈ›iune.";Strings.OfficeOM.L_InvalidValue="Valoare nevalidă";Strings.OfficeOM.L_FunctionCallFailed="Apelul {0} la funcÈ›ie nu a reuÈ™it, cod de eroare: {1}.";Strings.OfficeOM.L_InvalidFormat="Eroare de format nevalid";Strings.OfficeOM.L_DataReadError="Eroare de citire a datelor";Strings.OfficeOM.L_FormatValueOutOfRange="Valoarea este în afara intervalului permis.";Strings.OfficeOM.L_SSOConnectionLostErrorMessage="A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones.";Strings.OfficeOM.L_InvalidAPICall="Apel API nevalid";Strings.OfficeOM.L_RunMustReturnPromise="FuncÈ›ia de procesare pe loturi transmisă metodei „.run†nu a returnat o promisiune. FuncÈ›ia trebuie să returneze o promisiune, pentru a face posibilă eliberarea tuturor obiectelor urmărite automat la finalizarea operaÈ›iunii pe loturi. De obicei, returnaÈ›i o promisiune returnând răspunsul de la „context.sync()â€.";Strings.OfficeOM.L_Timeout="OperaÈ›iunea a expirat.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="ConÈ›inutul selectat trebuie să fie într-un format de tabel. FormataÈ›i datele ca tabel È™i încercaÈ›i din nou.";Strings.OfficeOM.L_SSOClientErrorMessage="Eroare neaÈ™teptată pe client.";Strings.OfficeOM.L_OsfControlTypeNotSupported="Tipul OsfControl nu este acceptat.";Strings.OfficeOM.L_NetworkProblem="Problemă de reÈ›ea";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage="OperaÈ›iunea nu a reuÈ™it, deoarece acest program de completare nu acceptă acordul utilizatorului în această categorie";Strings.OfficeOM.L_AppNameNotExist="Nu există un nume de program de completare pentru {0}.";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Argumente de intrare nevalide.";Strings.OfficeOM.L_SSOConnectionLostError="A connection was lost during the sign in process.";Strings.OfficeOM.L_ElementMissing="Nu am putut formata celula de tabel pentru că lipsesc unele valori de parametri. ReverificaÈ›i parametrii È™i încercaÈ›i din nou.";Strings.OfficeOM.L_CannotRegisterEvent="Rutina de tratare a evenimentelor nu poate fi înregistrată.";Strings.OfficeOM.L_DialogRequireHTTPS="Protocolul HTTP nu este acceptat. UtilizaÈ›i în schimb HTTPS";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Parametrii de coordonate nu se pot utiliza cu tipul de coerciÈ›ie tabel când tabelul conÈ›ine celule îmbinate.";Strings.OfficeOM.L_InvalidResourceUrl="URL-ul de resurse furnizat al aplicaÈ›iei este nevalid.";Strings.OfficeOM.L_UnknownBindingType="Tipul de legare nu este acceptat.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Nu s-a reuÈ™it adăugarea rutinei de tratare a evenimentului.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="OperaÈ›iunea nu este acceptată în acest tip de legare.";Strings.OfficeOM.L_InvalidDataObject="Obiect de date nevalid";Strings.OfficeOM.L_InvalidColumnsForBinding="Coloanele specificate nu sunt valide.";Strings.OfficeOM.L_ValueNotLoaded="Valoarea obiectului rezultat nu a fost încărcată încă. ÃŽnainte de a citi proprietatea valoare, apelaÈ›i „context.sync()†în contextul asociat solicitat.";Strings.OfficeOM.L_InvalidTableOptionValue="Unul sau mai mulÈ›i dintre parametrii tableOptions au valori nepermise. ReverificaÈ›i valorile È™i încercaÈ›i din nou.";Strings.OfficeOM.L_UserAbortedMessage="Utilizatorul nu a fost de acord cu permisiunile programului de completare.";Strings.OfficeOM.L_BrowserAPINotSupported="Acest browser nu acceptă API solicitat.";Strings.OfficeOM.L_OperationNotSupported="OperaÈ›ie neacceptată.";Strings.OfficeOM.L_InvalidGetColumns="Coloanele specificate nu sunt valide.";Strings.OfficeOM.L_NotSupportedEventType="Tipul de eveniment {0} specificat nu este acceptat.";Strings.OfficeOM.L_UserNotSignedIn="Niciun utilizator nu este conectat la Office.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Tipul de identitate al utilizatorului nu este acceptat.";Strings.OfficeOM.L_OutOfRange="ÃŽn afara intervalului";Strings.OfficeOM.L_InvalidSetStartRowColumn="Valorile startRow sau startColumn specificate nu sunt valide.";Strings.OfficeOM.L_MissingParameter="Parametru lipsă";Strings.OfficeOM.L_CannotWriteToSelection="Nu se poate scrie în selecÈ›ia curentă.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Se permite";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="Schimbările proprietății „{0}†nu pot fi aplicate printr-o metodă „object.setâ€.";Strings.OfficeOM.L_UnsupportedDataObject="Tipul obiectului de date furnizat nu este acceptat.";Strings.OfficeOM.L_InvalidApiCallInContext="Apel API nevalid în contextul curent.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="AplicaÈ›ia {0} nu există. Nu s-a apelat Microsoft.Office.WebExtension.initialize(motiv).";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Tipul specificat de legare nu este compatibil cu elementul denumit furnizat.";Strings.OfficeOM.L_InvalidResourceUrlMessage="URL-ul specificat în manifest este nevalid.";Strings.OfficeOM.L_SpecifiedIdNotExist="ID-ul specificat nu există.";Strings.OfficeOM.L_DataWriteReminder="Memento de scriere a datelor";Strings.OfficeOM.L_InValidOptionalArgument="argument opÈ›ional incorect";Strings.OfficeOM.L_CoercionTypeNotSupported="Tipul de impunere specificat nu este acceptat.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="RestricÈ›iile browserului ne-au împiedicat să creăm caseta de dialog. Domeniul casetei de dialog È™i domeniul gazdei programului de completare nu sunt în aceeaÈ™i zonă de securitate.";Strings.OfficeOM.L_ActivityLimitReached="S-a atins limita de activitate.";Strings.OfficeOM.L_InvalidSetColumns="Coloanele specificate nu sunt valide.";Strings.OfficeOM.L_EventHandlerRemovalFailed="Nu s-a reuÈ™it eliminarea rutinei de tratare a evenimentului.";Strings.OfficeOM.L_EventHandlerNotExist="Rutina de tratare a evenimentului specificat nu a fost găsită pentru această legare.";Strings.OfficeOM.L_RedundantCallbackSpecification="Apelul invers nu poate fi specificat în lista de argumente È™i în obiectul opÈ›ional.";Strings.OfficeOM.L_DataNotMatchSelection="Obiectul de date furnizat nu este compatibil cu forma sau dimensiunile selecÈ›iei curente.";Strings.OfficeOM.L_DataNotMatchCoercionType="Tipul de obiect de date specificat nu este compatibil cu selecÈ›ia curentă.";Strings.OfficeOM.L_NamedItemNotFound="Elementul denumit nu există.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Datele sunt perimate. RegăsiÈ›i obiectul din nou.";Strings.OfficeOM.L_UserAborted="Utilizatorul a abandonat solicitarea de consimțământ.";Strings.OfficeOM.L_NotImplemented="FuncÈ›ia {0} nu este implementată.";Strings.OfficeOM.L_InternalErrorDescription="Eroare internă.";Strings.OfficeOM.L_SettingsStaleError="Eroare de setări învechite";Strings.OfficeOM.L_InvalidCoercion="Tipul de coerciÈ›ie nu este valid";Strings.OfficeOM.L_CustomXmlNodeNotFound="Nodul specificat nu a fost găsit.";Strings.OfficeOM.L_UnsupportedEnumeration="Enumerare neacceptată";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_CannotNavigateTo="Obiectul este situat într-un loc unde nu este acceptată navigarea.";Strings.OfficeOM.L_OverwriteWorksheetData="OperaÈ›ia de setare nu a reuÈ™it pentru că obiectul de date furnizat va suprascrie sau va schimba datele.";Strings.OfficeOM.L_SSOServerErrorMessage="Eroare neaÈ™teptată pe server.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Valorile rowCount sau columnCount specificate nu sunt valide.";Strings.OfficeOM.L_InitializeNotReady="Office.js încă nu s-a încărcat complet. ÃŽncercaÈ›i din nou mai târziu sau asiguraÈ›i-vă că adăugaÈ›i codul de iniÈ›ializare în funcÈ›ia Office.initialize.";Strings.OfficeOM.L_TooManyOptionalObjects="mai multe obiecte opÈ›ionale în lista parametrilor";Strings.OfficeOM.L_CloseFileBeforeRetrieve="ApelaÈ›i closeAsync pentru fiÈ™ierul curent înainte de a regăsi altul.";Strings.OfficeOM.L_InvalidBinding="Legare nevalidă";Strings.OfficeOM.L_ShuttingDown="OperaÈ›ia nu a reuÈ™it pentru că datele de pe server nu sunt actuale." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/ro-ro/outlook_strings.debug.js b/node_modules/@microsoft/office-js/dist/ro-ro/outlook_strings.debug.js index 904b8cf..909253b 100644 --- a/node_modules/@microsoft/office-js/dist/ro-ro/outlook_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/ro-ro/outlook_strings.debug.js @@ -1,34 +1,35 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("_u"); _u.ExtensibilityStrings = function() { }; _u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings"); -_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "Calea atașării a fost nevalidă."; -_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Atașările nu pot fi adăugate în timp ce răspunsul sau redirecÈ›ionarea completă sunt în curs de regăsire de la server."; _u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "ID-ul atașării a fost nevalid."; -_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "Elementul selectat a fost modificat."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Sunt necesare permisiuni cu drepturi sporite pentru a accesa membrii protejaÈ›i ai JavaScript API for Office."; -_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "AtaÈ™area nu poate fi adăugată la element."; -_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "Utilizatorul a eliminat ataÈ™area înainte de terminarea încărcării."; -_u.ExtensibilityStrings.l_InvalidEndTime_Text = "Ora de sfârÈ™it nu poate fi înaintea orei de începere."; -_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Unul sau mai multe nume de afiÈ™at furnizate sunt prea lungi."; +_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "AtaÈ™area nu poate fi adăugată pentru că este prea mare."; +_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Cererea depășeÈ™te limita de 1 MB. ModificaÈ›i cererea EWS."; +_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "AtaÈ™area nu poate fi È™tearsă din element."; +_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Eroare de ataÈ™are"; +_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Numărul total de destinatari din câmp nu poate depăși {0}."; _u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Atașările nu pot fi adăugate pentru că mesajul are deja numărul maxim de atașări"; -_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Nu a fost furnizat niciun destinatar valid."; +_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Unul sau mai multe nume de afiÈ™at furnizate sunt prea lungi."; _u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "Sunt necesare permisiuni cu drepturi sporite pentru a accesa metoda: „{0}â€"; _u.ExtensibilityStrings.l_InvalidEventDates_Text = "Data de sfârÈ™it are loc înainte de data de început."; -_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Eroare de ataÈ™are"; _u.ExtensibilityStrings.l_InternalProtocolError_Text = "Eroare internă de protocol: „{0}â€."; -_u.ExtensibilityStrings.l_InvalidDate_Text = "Intrarea nu are ca rezultat o dată corectă."; +_u.ExtensibilityStrings.l_InvalidEndTime_Text = "Ora de sfârÈ™it nu poate fi înaintea orei de începere."; +_u.ExtensibilityStrings.l_OffsetNotfound_Text = "Nu s-a găsit un decalaj pentru această marcă de timp."; _u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "Sterilizarea HTML nu a reuÈ™it."; +_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "AtaÈ™area nu poate fi adăugată la element."; +_u.ExtensibilityStrings.l_InvalidDate_Text = "Intrarea nu are ca rezultat o dată corectă."; +_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Sunt necesare permisiuni cu drepturi sporite pentru a accesa membrii protejaÈ›i ai JavaScript API for Office."; +_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "Calea atașării a fost nevalidă."; +_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Eroare de scriere a datelor"; +_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Nu a fost furnizat niciun destinatar valid."; _u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Parametrii furnizaÈ›i nu corespund formatului aÈ™teptat."; _u.ExtensibilityStrings.l_CursorPositionChanged_Text = "Utilizatorul a modificat poziÈ›ia cursorului în timp ce erau inserate datele."; -_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "AtaÈ™area nu poate fi È™tearsă pentru că ataÈ™area cu index de ataÈ™are nu poate fi găsită."; +_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "Utilizatorul a eliminat ataÈ™area înainte de terminarea încărcării."; +_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Atașările nu pot fi adăugate în timp ce răspunsul sau redirecÈ›ionarea completă sunt în curs de regăsire de la server."; _u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Una sau mai multe adrese de e-mail furnizate sunt prea lungi."; -_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Eroare de scriere a datelor"; -_u.ExtensibilityStrings.l_OffsetNotfound_Text = "Nu s-a găsit un decalaj pentru această marcă de timp."; +_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "AtaÈ™area nu poate fi È™tearsă pentru că ataÈ™area cu index de ataÈ™are nu poate fi găsită."; _u.ExtensibilityStrings.l_InternalFormatError_Text = "A apărut o eroare internă de format."; -_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "AtaÈ™area nu poate fi adăugată pentru că este prea mare."; -_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Cererea depășeÈ™te limita de 1 MB. ModificaÈ›i cererea EWS."; -_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "AtaÈ™area nu poate fi È™tearsă din element."; -_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Numărul total de destinatari din câmp nu poate depăși {0}." +_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "Elementul selectat a fost modificat." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/ro-ro/outlook_strings.js b/node_modules/@microsoft/office-js/dist/ro-ro/outlook_strings.js index a204413..d15bc34 100644 --- a/node_modules/@microsoft/office-js/dist/ro-ro/outlook_strings.js +++ b/node_modules/@microsoft/office-js/dist/ro-ro/outlook_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="Calea atașării a fost nevalidă.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Atașările nu pot fi adăugate în timp ce răspunsul sau redirecÈ›ionarea completă sunt în curs de regăsire de la server.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="ID-ul atașării a fost nevalid.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Elementul selectat a fost modificat.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Sunt necesare permisiuni cu drepturi sporite pentru a accesa membrii protejaÈ›i ai JavaScript API for Office.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="AtaÈ™area nu poate fi adăugată la element.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="Utilizatorul a eliminat ataÈ™area înainte de terminarea încărcării.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="Ora de sfârÈ™it nu poate fi înaintea orei de începere.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Unul sau mai multe nume de afiÈ™at furnizate sunt prea lungi.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Atașările nu pot fi adăugate pentru că mesajul are deja numărul maxim de atașări";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Nu a fost furnizat niciun destinatar valid.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Sunt necesare permisiuni cu drepturi sporite pentru a accesa metoda: „{0}â€";_u.ExtensibilityStrings.l_InvalidEventDates_Text="Data de sfârÈ™it are loc înainte de data de început.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Eroare de ataÈ™are";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Eroare internă de protocol: „{0}â€.";_u.ExtensibilityStrings.l_InvalidDate_Text="Intrarea nu are ca rezultat o dată corectă.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="Sterilizarea HTML nu a reuÈ™it.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Parametrii furnizaÈ›i nu corespund formatului aÈ™teptat.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="Utilizatorul a modificat poziÈ›ia cursorului în timp ce erau inserate datele.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="AtaÈ™area nu poate fi È™tearsă pentru că ataÈ™area cu index de ataÈ™are nu poate fi găsită.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Una sau mai multe adrese de e-mail furnizate sunt prea lungi.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Eroare de scriere a datelor";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Nu s-a găsit un decalaj pentru această marcă de timp.";_u.ExtensibilityStrings.l_InternalFormatError_Text="A apărut o eroare internă de format.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="AtaÈ™area nu poate fi adăugată pentru că este prea mare.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Cererea depășeÈ™te limita de 1 MB. ModificaÈ›i cererea EWS.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="AtaÈ™area nu poate fi È™tearsă din element.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Numărul total de destinatari din câmp nu poate depăși {0}." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="ID-ul atașării a fost nevalid.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="AtaÈ™area nu poate fi adăugată pentru că este prea mare.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Cererea depășeÈ™te limita de 1 MB. ModificaÈ›i cererea EWS.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="AtaÈ™area nu poate fi È™tearsă din element.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Eroare de ataÈ™are";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Numărul total de destinatari din câmp nu poate depăși {0}.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Atașările nu pot fi adăugate pentru că mesajul are deja numărul maxim de atașări";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Unul sau mai multe nume de afiÈ™at furnizate sunt prea lungi.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Sunt necesare permisiuni cu drepturi sporite pentru a accesa metoda: „{0}â€";_u.ExtensibilityStrings.l_InvalidEventDates_Text="Data de sfârÈ™it are loc înainte de data de început.";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Eroare internă de protocol: „{0}â€.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="Ora de sfârÈ™it nu poate fi înaintea orei de începere.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Nu s-a găsit un decalaj pentru această marcă de timp.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="Sterilizarea HTML nu a reuÈ™it.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="AtaÈ™area nu poate fi adăugată la element.";_u.ExtensibilityStrings.l_InvalidDate_Text="Intrarea nu are ca rezultat o dată corectă.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Sunt necesare permisiuni cu drepturi sporite pentru a accesa membrii protejaÈ›i ai JavaScript API for Office.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="Calea atașării a fost nevalidă.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Eroare de scriere a datelor";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Nu a fost furnizat niciun destinatar valid.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Parametrii furnizaÈ›i nu corespund formatului aÈ™teptat.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="Utilizatorul a modificat poziÈ›ia cursorului în timp ce erau inserate datele.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="Utilizatorul a eliminat ataÈ™area înainte de terminarea încărcării.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Atașările nu pot fi adăugate în timp ce răspunsul sau redirecÈ›ionarea completă sunt în curs de regăsire de la server.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Una sau mai multe adrese de e-mail furnizate sunt prea lungi.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="AtaÈ™area nu poate fi È™tearsă pentru că ataÈ™area cu index de ataÈ™are nu poate fi găsită.";_u.ExtensibilityStrings.l_InternalFormatError_Text="A apărut o eroare internă de format.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Elementul selectat a fost modificat." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/ru-ru/office_strings.debug.js b/node_modules/@microsoft/office-js/dist/ru-ru/office_strings.debug.js index 4725545..b3a33d3 100644 --- a/node_modules/@microsoft/office-js/dist/ru-ru/office_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/ru-ru/office_strings.debug.js @@ -1,179 +1,190 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("Strings"); Strings.OfficeOM = function() { }; Strings.OfficeOM.registerClass("Strings.OfficeOM"); -Strings.OfficeOM.L_InvalidOrTimedOutSession = "ÐедопуÑтимый ÑÐµÐ°Ð½Ñ Ð¸Ð»Ð¸ иÑтекло Ð²Ñ€ÐµÐ¼Ñ Ð¾Ð¶Ð¸Ð´Ð°Ð½Ð¸Ñ ÑеанÑа"; -Strings.OfficeOM.L_ShowWindowDialogNotification = "ÐадÑтройке {0} необходимо открыть новое окно."; -Strings.OfficeOM.L_CustomXmlError = "Ошибка наÑтраиваемого XML-документа."; -Strings.OfficeOM.L_OperationNotSupported = "Эта Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½Ðµ поддерживаетÑÑ."; -Strings.OfficeOM.L_ActivityLimitReached = "КоличеÑтво дейÑтвий доÑтигло макÑимально допуÑтимого."; -Strings.OfficeOM.L_CustomXmlNodeNotFound = "Указанный узел не найден."; -Strings.OfficeOM.L_BindingToMultipleSelection = "Выделение неÑмежных фрагментов не поддерживаетÑÑ."; -Strings.OfficeOM.L_UserAborted = "Пользователь прервал выполнение запроÑа на ÑоглаÑие."; -Strings.OfficeOM.L_InvalidReadForBlankRow = "Ð£ÐºÐ°Ð·Ð°Ð½Ð½Ð°Ñ Ñтрока пуÑта."; -Strings.OfficeOM.L_CustomXmlOutOfDateName = "Данные уÑтарели"; -Strings.OfficeOM.L_UserAbortedMessage = "Пользователь не дал ÑоглаÑие на Ñ€Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð¸Ñ Ð½Ð°Ð´Ñтройки."; -Strings.OfficeOM.L_FormatValueOutOfRange = "Значение находитÑÑ Ð²Ð½Ðµ допуÑтимого диапазона."; -Strings.OfficeOM.L_TooManyOptionalFunction = "множеÑтво дополнительных функций в ÑпиÑке параметров"; -Strings.OfficeOM.L_UnsupportedDataObject = "Заданный объект данных не поддерживаетÑÑ."; -Strings.OfficeOM.L_HostError = "Ошибка узла"; -Strings.OfficeOM.L_InvalidResourceUrl = "ПредоÑтавлен недопуÑтимый URL-Ð°Ð´Ñ€ÐµÑ Ñ€ÐµÑурÑа приложениÑ."; -Strings.OfficeOM.L_SettingsCannotSave = "Ðе удалоÑÑŒ Ñохранить параметры."; -Strings.OfficeOM.L_DialogAlreadyOpened = "Сбой операции, так как у Ñтой надÑтройки активно диалоговое окно."; -Strings.OfficeOM.L_ReadSettingsError = "Ошибка Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð²"; -Strings.OfficeOM.L_DataWriteError = "Ошибка запиÑи данных"; Strings.OfficeOM.L_InitializeNotReady = "Файл Office.js еще не загружен. Повторите попытку позже или добавьте код инициализации в функцию Office.initialize."; -Strings.OfficeOM.L_CannotRegisterEvent = "Ðе удаетÑÑ Ð·Ð°Ñ€ÐµÐ³Ð¸Ñтрировать обработчик Ñобытий."; -Strings.OfficeOM.L_InvalidBindingOperation = "ÐедопуÑÑ‚Ð¸Ð¼Ð°Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð¿Ñ€Ð¸Ð²Ñзки"; -Strings.OfficeOM.L_InvalidSetColumns = "Указанные Ñтолбцы недопуÑтимы."; -Strings.OfficeOM.L_DataStale = "Данные уÑтарели"; -Strings.OfficeOM.L_InvalidObjectPath = 'Ð’Ñ‹ не можете выполнить Ñто дейÑтвие Ð´Ð»Ñ Ð¿ÑƒÑ‚Ð¸ к объекту "{0}". ЕÑли вы иÑпользуете объект в неÑкольких вызовах "context.sync" и за пределами поÑледовательного Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ð¿Ð°ÐºÐµÑ‚Ð° ".run", управлÑйте Ñроком жизни объекта Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ методов "context.trackedObjects.add()" и "context.trackedObjects.remove()".'; -Strings.OfficeOM.L_UserClickIgnore = "Пользователь решил игнорировать диалоговое окно."; -Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Данные уÑтарели. Получите объект еще раз."; -Strings.OfficeOM.L_InvalidFormat = "Ошибка недопуÑтимого формата"; Strings.OfficeOM.L_InvalidValue = "ÐедопуÑтимое значение"; +Strings.OfficeOM.L_DocumentReadOnly = "Ð—Ð°Ð¿Ñ€Ð¾ÑˆÐµÐ½Ð½Ð°Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½Ðµ допуÑкаетÑÑ Ð² текущем режиме документов."; +Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Указанный тип привÑзки неÑовмеÑтим Ñ Ð·Ð°Ð´Ð°Ð½Ð½Ñ‹Ð¼ именованным Ñлементом."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "ÐадÑтройка уже запрашивает маркер доÑтупа."; +Strings.OfficeOM.L_ValueNotLoaded = "Значение результирующего объекта еще не загружено. Прежде чем Ñчитывать значение ÑвойÑтва, вызовите метод context.sync() в ÑопоÑтавленном контекÑте запроÑа."; +Strings.OfficeOM.L_GetDataIsTooLarge = "Запрошенный набор данных Ñлишком велик."; +Strings.OfficeOM.L_InvalidSetColumns = "Указанные Ñтолбцы недопуÑтимы."; +Strings.OfficeOM.L_ShuttingDown = "Ðе удалоÑÑŒ выполнить операцию, так как данные на Ñервере уÑтарели."; +Strings.OfficeOM.L_NonUniformPartialSetNotSupported = 'ИÑпользование параметров координации Ñ Ñ‚Ð¸Ð¿Ð¾Ð¼ Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð¸Ñ "Таблица" не допуÑкаетÑÑ, еÑли таблица Ñодержит объединенные Ñчейки.'; +Strings.OfficeOM.L_DialogRequireHTTPS = "Протокол HTTP не поддерживаетÑÑ. ИÑпользуйте протокол HTTPS"; +Strings.OfficeOM.L_ConnectionFailureWithDetails = "Сбой запроÑа Ñ ÐºÐ¾Ð´Ð¾Ð¼ ÑоÑтоÑÐ½Ð¸Ñ {0}, кодом ошибки {1}, а также Ñообщением об ошибке: {2}"; Strings.OfficeOM.L_OutOfRange = "Значение вне диапазона"; -Strings.OfficeOM.L_SaveSettingsError = "Ошибка ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð²"; +Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Разрешить"; +Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Сделайте выбор."; +Strings.OfficeOM.L_MultipleNamedItemFound = "Ðайдено неÑколько объектов Ñ Ð¾Ð´Ð¸Ð½Ð°ÐºÐ¾Ð²Ñ‹Ð¼Ð¸ именами."; +Strings.OfficeOM.L_PropertyDoesNotExist = 'СвойÑтво "{0}" не ÑущеÑтвует в объекте.'; +Strings.OfficeOM.L_GetSelectionNotSupported = "Текущий выделенный фрагмент не поддерживаетÑÑ."; +Strings.OfficeOM.L_DataWriteError = "Ошибка запиÑи данных"; +Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "наÑтройте браузер"; +Strings.OfficeOM.L_SetDataParametersConflict = "Указанные параметры конфликтуют."; +Strings.OfficeOM.L_InvalidRequestContext = "Ð’Ñ‹ не можете иÑпользовать объект в разных контекÑтах запроÑов."; +Strings.OfficeOM.L_SetDataIsTooLarge = "Размер указанного объекта данных превышает допуÑтимый."; +Strings.OfficeOM.L_InvalidGrant = "ОтÑутÑтвует Ð¿Ñ€ÐµÐ´Ð²Ð°Ñ€Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð°Ñ Ð°Ð²Ñ‚Ð¾Ñ€Ð¸Ð·Ð°Ñ†Ð¸Ñ."; +Strings.OfficeOM.L_CustomFunctionImplementationMissing = "СвойÑтво Ñ Ñ‚Ð°ÐºÐ¸Ð¼ именем Ð´Ð»Ñ Excel.CustomFunctions, предÑтавлÑющее определение функции, должно Ñодержать ÑвойÑтво call, реализующее Ñту функцию."; +Strings.OfficeOM.L_UserClickIgnore = "Пользователь решил игнорировать диалоговое окно."; +Strings.OfficeOM.L_NotSupported = "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ {0} не поддерживаетÑÑ."; +Strings.OfficeOM.L_UserAbortedMessage = "Пользователь не дал ÑоглаÑие на Ñ€Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð¸Ñ Ð½Ð°Ð´Ñтройки."; Strings.OfficeOM.L_InvalidResourceUrlMessage = "Ð’ манифеÑте указан недопуÑтимый URL-Ð°Ð´Ñ€ÐµÑ Ñ€ÐµÑурÑа."; +Strings.OfficeOM.L_InvalidSelectionForBindingType = "Ðевозможно Ñоздать привÑзку Ð´Ð»Ñ Ñ‚ÐµÐºÑƒÑ‰ÐµÐ³Ð¾ выделенного фрагмента и указанного типа привÑзки."; +Strings.OfficeOM.L_UnknownBindingType = "Тип привÑзки не поддерживаетÑÑ."; Strings.OfficeOM.L_RunMustReturnPromise = "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð¿Ð°ÐºÐµÑ‚Ð½Ð¾Ð¹ обработки, Ð¿ÐµÑ€ÐµÐ´Ð°Ð½Ð½Ð°Ñ Ð² метод .run, не возвратила обещание. Она должна возвратить обещание, чтобы по окончании операции пакетной обработки можно было разблокировать вÑе автоматичеÑки отÑлеживаемые объекты. Обычно, чтобы возвратить обещание, необходимо возвратить отклик из context.sync()."; -Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = 'ВыполнÑетÑÑ Ð½Ð°Ñтройка ÑвойÑтва "{0}", предназначенного только Ð´Ð»Ñ Ñ‡Ñ‚ÐµÐ½Ð¸Ñ.'; -Strings.OfficeOM.L_InvalidTableOptionValue = "Один или неÑколько параметров таблицы имеют недопуÑтимые значениÑ. Проверьте параметры и повторите попытку."; +Strings.OfficeOM.L_SettingsCannotSave = "Ðе удалоÑÑŒ Ñохранить параметры."; +Strings.OfficeOM.L_NotImplemented = "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ {0} не реализована."; +Strings.OfficeOM.L_SelectionCannotBound = "Ðе удаетÑÑ Ð²Ñ‹Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÑŒ привÑзку к выделенному фрагменту."; +Strings.OfficeOM.L_InvalidCoercion = "ÐедопуÑтимый тип приведениÑ"; +Strings.OfficeOM.L_NotSupportedEventType = "Указанный тип ÑÐ¾Ð±Ñ‹Ñ‚Ð¸Ñ {0} не поддерживаетÑÑ."; +Strings.OfficeOM.L_SSOServerError = "Произошла ошибка у поÑтавщика проверки подлинноÑти."; +Strings.OfficeOM.L_InternalErrorDescription = "Произошла внутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ°."; +Strings.OfficeOM.L_ActivityLimitReached = "КоличеÑтво дейÑтвий доÑтигло макÑимально допуÑтимого."; +Strings.OfficeOM.L_SSOConnectionLostErrorMessage = "A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones."; +Strings.OfficeOM.L_EventHandlerNotExist = "Указанный обработчик Ñобытий не найден Ð´Ð»Ñ Ñтой привÑзки."; +Strings.OfficeOM.L_ShowWindowDialogNotification = "ÐадÑтройке {0} необходимо открыть новое окно."; +Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Указанный тип Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð¸Ñ Ð½ÐµÑовмеÑтим Ñ Ñтим типом привÑзки."; +Strings.OfficeOM.L_InvalidNode = "ÐедопуÑтимый узел"; +Strings.OfficeOM.L_SliceSizeNotSupported = "Размер указанного фрагмента не поддерживаетÑÑ."; Strings.OfficeOM.L_InvalidFormatValue = "Один или неÑколько параметров формата имеют недопуÑтимые значениÑ. Проверьте параметры и повторите попытку."; -Strings.OfficeOM.L_InvalidGrant = "ОтÑутÑтвует Ð¿Ñ€ÐµÐ´Ð²Ð°Ñ€Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð°Ñ Ð°Ð²Ñ‚Ð¾Ñ€Ð¸Ð·Ð°Ñ†Ð¸Ñ."; -Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Игнорировать"; -Strings.OfficeOM.L_InvalidArgumentGeneric = "Ðргументы, передаваемые в функцию, не работают в данной Ñитуации, отÑутÑтвуют или имеют неправильный формат."; -Strings.OfficeOM.L_InvalidSetStartRowColumn = "Указано недопуÑтимое значение параметра startRow или startColumn."; -Strings.OfficeOM.L_InvalidSetRows = "Указанные Ñтроки недопуÑтимы."; -Strings.OfficeOM.L_SettingsStaleError = "Ошибка из-за уÑтаревших параметров"; -Strings.OfficeOM.L_RequestTimeout = "Выполнение вызова занÑло Ñлишком много времени."; -Strings.OfficeOM.L_RequestTokenUnavailable = "API отрегулирован Ð´Ð»Ñ ÑÐ½Ð¸Ð¶ÐµÐ½Ð¸Ñ Ñ‡Ð°Ñтоты вызовов."; -Strings.OfficeOM.L_NotSupported = "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ {0} не поддерживаетÑÑ."; -Strings.OfficeOM.L_ElementMissing = "Ðе удалоÑÑŒ отформатировать Ñчейку таблицы, так как отÑутÑтвуют некоторые Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð². Проверьте параметры и повторите попытку."; -Strings.OfficeOM.L_InternalError = "ВнутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ°"; +Strings.OfficeOM.L_UnsupportedDataObject = "Заданный объект данных не поддерживаетÑÑ."; +Strings.OfficeOM.L_DataNotMatchBindingType = "Указанный объект данных неÑовмеÑтим Ñ Ñ‚Ð¸Ð¿Ð¾Ð¼ привÑзки."; +Strings.OfficeOM.L_RedundantCallbackSpecification = "Процедуру обратного вызова невозможно указать одновременно в ÑпиÑке аргументов и в необÑзательном объекте."; +Strings.OfficeOM.L_PermissionDenied = "Отказано в разрешении"; +Strings.OfficeOM.L_CustomXmlOutOfDateName = "Данные уÑтарели"; +Strings.OfficeOM.L_InvalidApiArgumentsMessage = "ÐедопуÑтимые входные аргументы."; +Strings.OfficeOM.L_Timeout = "ИÑтекло Ð²Ñ€ÐµÐ¼Ñ Ð¾Ð¶Ð¸Ð´Ð°Ð½Ð¸Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ð¸."; +Strings.OfficeOM.L_FormatValueOutOfRange = "Значение находитÑÑ Ð²Ð½Ðµ допуÑтимого диапазона."; +Strings.OfficeOM.L_SpecifiedIdNotExist = "Указанный идентификатор не ÑущеÑтвует."; +Strings.OfficeOM.L_TooManyArguments = "Ñлишком много аргументов"; Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Примечание: рекомендуемое количеÑтво Ñчеек в таблице — менее 20 000."; -Strings.OfficeOM.L_DataReadError = "Ошибка Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ…"; -Strings.OfficeOM.L_NotSupportedEventType = "Указанный тип ÑÐ¾Ð±Ñ‹Ñ‚Ð¸Ñ {0} не поддерживаетÑÑ."; -Strings.OfficeOM.L_BadSelectorString = "Строка, Ð¿ÐµÑ€ÐµÐ´Ð°Ð²Ð°ÐµÐ¼Ð°Ñ Ð² облаÑÑ‚ÑŒ выделениÑ, неправильно отформатирована или не поддерживаетÑÑ."; +Strings.OfficeOM.L_DataWriteReminder = "Ðапоминание о запиÑи данных"; +Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Игнорировать"; +Strings.OfficeOM.L_NewWindowCrossZone = 'Параметры безопаÑноÑти браузера не позволили Ñоздать диалоговое окно. ИÑпользуйте другой браузер или {0} так, чтобы домен "{1}" и домен, отображаемый в адреÑной Ñтроке браузера, находилиÑÑŒ в одной зоне безопаÑноÑти.'; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory = "Эта надÑтройка не поддерживает ÑоглаÑие пользователÑ."; +Strings.OfficeOM.L_SettingNameNotExist = "Указанное Ð¸Ð¼Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð° не ÑущеÑтвует."; +Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Выбранное Ñодержимое должно быть предÑтавлено в формате таблицы. Отформатируйте данные как таблицу и повторите попытку."; +Strings.OfficeOM.L_MemoryLimit = "Превышен лимит памÑти"; +Strings.OfficeOM.L_InvalidReadForBlankRow = "Ð£ÐºÐ°Ð·Ð°Ð½Ð½Ð°Ñ Ñтрока пуÑта."; +Strings.OfficeOM.L_DialogNavigateError = "Ошибка навигации диалогового окна"; +Strings.OfficeOM.L_PropertyNotLoaded = 'СвойÑтво "{0}" недоÑтупно. Прежде чем прочеÑÑ‚ÑŒ его значение, вызовите метод загрузки Ð´Ð»Ñ Ñодержащего его объекта и вызовите "context.sync()" Ð´Ð»Ñ ÐºÐ¾Ð½Ñ‚ÐµÐºÑта ÑвÑзанного запроÑа.'; +Strings.OfficeOM.L_UnsupportedEnumeration = "Ðеподдерживаемое перечиÑление"; +Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Примечание: рекомендуемое количеÑтво наборов форматированиÑ, Ñозданных Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ API форматированиÑ, — менее 100."; Strings.OfficeOM.L_ConnectionFailureWithStatus = "Сбой запроÑа Ñ ÐºÐ¾Ð´Ð¾Ð¼ ÑоÑтоÑÐ½Ð¸Ñ {0}."; +Strings.OfficeOM.L_InvalidResourceUrl = "ПредоÑтавлен недопуÑтимый URL-Ð°Ð´Ñ€ÐµÑ Ñ€ÐµÑурÑа приложениÑ."; Strings.OfficeOM.L_APICallFailed = "Сбой вызова API"; -Strings.OfficeOM.L_TooManyOptionalObjects = "множеÑтво дополнительных объектов в ÑпиÑке параметров"; -Strings.OfficeOM.L_PropertyDoesNotExist = 'СвойÑтво "{0}" не ÑущеÑтвует в объекте.'; -Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = 'Вам не удаÑÑ‚ÑÑ Ð¿Ñ€Ð¸Ð¼ÐµÐ½Ð¸Ñ‚ÑŒ изменениÑ, внеÑенные в ÑвойÑтво "{0}", Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ метода object.set.'; -Strings.OfficeOM.L_ColIndexOutOfRange = "Значение индекÑа Ñтолбца находитÑÑ Ð²Ð½Ðµ допуÑтимого диапазона. ИÑпользуйте значение (0 или больше), которое меньше чиÑла Ñтолбцов."; -Strings.OfficeOM.L_ShuttingDown = "Ðе удалоÑÑŒ выполнить операцию, так как данные на Ñервере уÑтарели."; -Strings.OfficeOM.L_InvalidSelectionForBindingType = "Ðевозможно Ñоздать привÑзку Ð´Ð»Ñ Ñ‚ÐµÐºÑƒÑ‰ÐµÐ³Ð¾ выделенного фрагмента и указанного типа привÑзки."; -Strings.OfficeOM.L_DataWriteReminder = "Ðапоминание о запиÑи данных"; -Strings.OfficeOM.L_InvalidApiArgumentsMessage = "ÐедопуÑтимые входные аргументы."; -Strings.OfficeOM.L_DialogOK = "ОК"; -Strings.OfficeOM.L_SetDataIsTooLarge = "Размер указанного объекта данных превышает допуÑтимый."; -Strings.OfficeOM.L_DataNotMatchBindingType = "Указанный объект данных неÑовмеÑтим Ñ Ñ‚Ð¸Ð¿Ð¾Ð¼ привÑзки."; -Strings.OfficeOM.L_RowIndexOutOfRange = "Значение индекÑа Ñтроки находитÑÑ Ð²Ð½Ðµ допуÑтимого диапазона. ИÑпользуйте значение (0 или больше), которое меньше чиÑла Ñтрок."; -Strings.OfficeOM.L_PermissionDenied = "Отказано в разрешении"; -Strings.OfficeOM.L_DisplayDialogError = "Ошибка Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð´Ð¸Ð°Ð»Ð¾Ð³Ð¾Ð²Ð¾Ð³Ð¾ окна"; -Strings.OfficeOM.L_OverwriteWorksheetData = "Ðе удалоÑÑŒ выполнить операцию заданиÑ, так заданный объект данных перезапишет или перемеÑтит данные."; -Strings.OfficeOM.L_NotImplemented = "Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ {0} не реализована."; -Strings.OfficeOM.L_InvalidGetStartRowColumn = "Указано недопуÑтимое значение параметра startRow или startColumn."; -Strings.OfficeOM.L_InvalidArgument = 'Ðргумент "{0}" не работает в данной Ñитуации, отÑутÑтвует или имеет неправильный формат.'; -Strings.OfficeOM.L_DialogRequireHTTPS = "Протокол HTTP не поддерживаетÑÑ. ИÑпользуйте протокол HTTPS"; -Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Тип удоÑÑ‚Ð¾Ð²ÐµÑ€ÐµÐ½Ð¸Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð½Ðµ поддерживаетÑÑ."; -Strings.OfficeOM.L_CannotWriteToSelection = "Ðе удаетÑÑ Ð·Ð°Ð¿Ð¸Ñать данные в текущий выделенный фрагмент."; -Strings.OfficeOM.L_RedundantCallbackSpecification = "Процедуру обратного вызова невозможно указать одновременно в ÑпиÑке аргументов и в необÑзательном объекте."; -Strings.OfficeOM.L_BrowserAPINotSupported = "Браузер не поддерживает запрошенный API."; -Strings.OfficeOM.L_InvalidSSOAddinMessage = "API удоÑтоверений не поддерживаетÑÑ Ð´Ð»Ñ Ñтой надÑтройки."; -Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Выделенный фрагмент неÑовмеÑтим Ñ ÑƒÐºÐ°Ð·Ð°Ð½Ð½Ñ‹Ð¼ типом приведениÑ."; -Strings.OfficeOM.L_EventHandlerAdditionFailed = "Ðе удалоÑÑŒ добавить обработчик Ñобытий."; -Strings.OfficeOM.L_CannotNavigateTo = "Объект находитÑÑ Ð² раÑположении, где не поддерживаетÑÑ Ð½Ð°Ð²Ð¸Ð³Ð°Ñ†Ð¸Ñ."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "ÐадÑтройка уже запрашивает маркер доÑтупа."; -Strings.OfficeOM.L_NonUniformPartialGetNotSupported = 'ИÑпользование параметров координации Ñ Ñ‚Ð¸Ð¿Ð¾Ð¼ Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð¸Ñ "Таблица" не допуÑкаетÑÑ, еÑли таблица Ñодержит объединенные Ñчейки.'; -Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "ИÑтекло Ð²Ñ€ÐµÐ¼Ñ Ð¾Ð¶Ð¸Ð´Ð°Ð½Ð¸Ñ ÑеанÑа Office Online, или он ÑвлÑетÑÑ Ð½ÐµÐ´Ð¾Ð¿ÑƒÑтимым. Чтобы продолжить, обновите Ñтраницу."; -Strings.OfficeOM.L_SSOClientError = "Произошла ошибка в запроÑе на проверку подлинноÑти от Office."; +Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "ÐžÐ³Ñ€Ð°Ð½Ð¸Ñ‡ÐµÐ½Ð¸Ñ Ð±Ñ€Ð°ÑƒÐ·ÐµÑ€Ð° не позволили Ñоздать диалоговое окно. Домен диалогового окна и домен узла надÑтройки находÑÑ‚ÑÑ Ð² разных зонах безопаÑноÑти."; +Strings.OfficeOM.L_NoCapability = "У Ð²Ð°Ñ Ð½ÐµÐ´Ð¾Ñтаточно разрешений Ð´Ð»Ñ Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñтого дейÑтвиÑ."; +Strings.OfficeOM.L_SaveSettingsError = "Ошибка ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð²"; +Strings.OfficeOM.L_MissingRequiredArguments = "отÑутÑтвуют некоторые обÑзательные аргументы"; Strings.OfficeOM.L_BindingNotExist = "Ð£ÐºÐ°Ð·Ð°Ð½Ð½Ð°Ñ Ð¿Ñ€Ð¸Ð²Ñзка не ÑущеÑтвует."; -Strings.OfficeOM.L_CallbackNotAFunction = 'Ðеобходимый тип обратного вызова — "ФункциÑ", но был тип {0}.'; -Strings.OfficeOM.L_GetDataIsTooLarge = "Запрошенный набор данных Ñлишком велик."; -Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "Из-за XPath можно выбрать не более 1024 Ñлементов."; +Strings.OfficeOM.L_CustomFunctionDefinitionMissing = "СвойÑтво Ñ Ñ‚Ð°ÐºÐ¸Ð¼ именем, предÑтавлÑющее определение функции, должно ÑущеÑтвовать Ð´Ð»Ñ Excel.CustomFunctions."; +Strings.OfficeOM.L_SSOClientError = "Произошла ошибка в запроÑе на проверку подлинноÑти от Office."; +Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Указано недопуÑтимое значение параметра rowCount или columnCount."; +Strings.OfficeOM.L_InvalidBindingOperation = "ÐедопуÑÑ‚Ð¸Ð¼Ð°Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð¿Ñ€Ð¸Ð²Ñзки"; Strings.OfficeOM.L_InvalidDataFormat = "Формат указанного объекта данных недопуÑтим."; -Strings.OfficeOM.L_UnsupportedUserIdentity = "Тип удоÑÑ‚Ð¾Ð²ÐµÑ€ÐµÐ½Ð¸Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð½Ðµ поддерживаетÑÑ."; -Strings.OfficeOM.L_InvalidGrantMessage = "ОтÑутÑтвуют Ñ€Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ñтой надÑтройки."; -Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Ðе удалоÑÑŒ извлечь файл из-за ошибки Ñети."; -Strings.OfficeOM.L_FileTypeNotSupported = "Указанный тип файлов не поддерживаетÑÑ."; -Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Указанный тип Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð¸Ñ Ð½ÐµÑовмеÑтим Ñ Ñтим типом привÑзки."; -Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "ÐžÐ¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½Ðµ поддерживаетÑÑ Ð´Ð»Ñ Ñтого типа привÑзки."; -Strings.OfficeOM.L_SSOServerError = "Произошла ошибка у поÑтавщика проверки подлинноÑти."; -Strings.OfficeOM.L_CoercionTypeNotSupported = "Указанный тип Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð¸Ñ Ð½Ðµ поддерживаетÑÑ."; -Strings.OfficeOM.L_InValidOptionalArgument = "недопуÑтимый необÑзательный аргумент"; +Strings.OfficeOM.L_HostError = "Ошибка узла"; +Strings.OfficeOM.L_RequestTimeout = "Выполнение вызова занÑло Ñлишком много времени."; +Strings.OfficeOM.L_RowIndexOutOfRange = "Значение индекÑа Ñтроки находитÑÑ Ð²Ð½Ðµ допуÑтимого диапазона. ИÑпользуйте значение (0 или больше), которое меньше чиÑла Ñтрок."; +Strings.OfficeOM.L_SettingsStaleError = "Ошибка из-за уÑтаревших параметров"; +Strings.OfficeOM.L_InvalidArgumentGeneric = "Ðргументы, передаваемые в функцию, не работают в данной Ñитуации, отÑутÑтвуют или имеют неправильный формат."; +Strings.OfficeOM.L_DataNotMatchCoercionType = "Тип указанного объекта данных неÑовмеÑтим Ñ Ð²Ñ‹Ð´ÐµÐ»ÐµÐ½Ð½Ñ‹Ð¼ фрагментом."; +Strings.OfficeOM.L_InvalidGetColumns = "Указанные Ñтолбцы недопуÑтимы."; +Strings.OfficeOM.L_UserAborted = "Пользователь прервал выполнение запроÑа на ÑоглаÑие."; +Strings.OfficeOM.L_DialogAlreadyOpened = "Сбой операции, так как у Ñтой надÑтройки активно диалоговое окно."; +Strings.OfficeOM.L_InternalError = "ВнутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ°"; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage = "ÐžÐ¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½Ðµ выполнена, поÑкольку Ñта надÑтройка не поддерживает ÑоглаÑие Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð² Ñтой категории"; +Strings.OfficeOM.L_EventHandlerRemovalFailed = "Ðе удалоÑÑŒ удалить обработчик Ñобытий."; Strings.OfficeOM.L_DataNotMatchSelection = "ПредоÑтавленный объект данных неÑовмеÑтим Ñ Ñ„Ð¾Ñ€Ð¼Ð¾Ð¹ или измерениÑми текущего выделенного фрагмента."; -Strings.OfficeOM.L_DialogAddressNotTrusted = "Домен URL-адреÑа не включен в Ñлемент AppDomains в манифеÑте."; +Strings.OfficeOM.L_ApiNotFoundDetails = "Метод или ÑвойÑтво {0} ÑвлÑетÑÑ Ñ‡Ð°Ñтью набора требований {1}, который недоÑтупен в вашей верÑии {2}."; +Strings.OfficeOM.L_InvalidParameters = "У функции {0} недопуÑтимые параметры."; +Strings.OfficeOM.L_NavOutOfBound = "ÐžÐ¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐ¸Ð»Ð°ÑÑŒ Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ¾Ð¹, так как Ð¸Ð½Ð´ÐµÐºÑ Ð½Ð°Ñ…Ð¾Ð´Ð¸Ñ‚ÑÑ Ð²Ð½Ðµ допуÑтимого диапазона."; +Strings.OfficeOM.L_InvalidBindingError = "Ошибка: недопуÑÑ‚Ð¸Ð¼Ð°Ñ Ð¿Ñ€Ð¸Ð²Ñзка"; +Strings.OfficeOM.L_InvalidGetStartRowColumn = "Указано недопуÑтимое значение параметра startRow или startColumn."; +Strings.OfficeOM.L_GetDataParametersConflict = "Указанные параметры конфликтуют."; Strings.OfficeOM.L_DataNotMatchBindingSize = "Заданный объект данных не ÑоответÑтвует размеру выделенного фрагмента."; -Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Примечание: рекомендуемое количеÑтво наборов форматированиÑ, Ñозданных Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ API форматированиÑ, — менее 100."; +Strings.OfficeOM.L_ReadSettingsError = "Ошибка Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð²"; +Strings.OfficeOM.L_FormattingReminder = "Ðапоминание о форматировании"; +Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Вызовите closeAsync Ð´Ð»Ñ Ñ‚ÐµÐºÑƒÑ‰ÐµÐ³Ð¾ файла перед извлечением другого."; +Strings.OfficeOM.L_CustomXmlExceedQuotaName = "ДоÑтигнут предел выбора"; +Strings.OfficeOM.L_RequestTokenUnavailable = "API отрегулирован Ð´Ð»Ñ ÑÐ½Ð¸Ð¶ÐµÐ½Ð¸Ñ Ñ‡Ð°Ñтоты вызовов."; +Strings.OfficeOM.L_BindingCreationError = "Ошибка при Ñоздании привÑзки"; +Strings.OfficeOM.L_InvalidBinding = "ÐедопуÑÑ‚Ð¸Ð¼Ð°Ñ Ð¿Ñ€Ð¸Ð²Ñзка"; +Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = 'Вам не удаÑÑ‚ÑÑ Ð¿Ñ€Ð¸Ð¼ÐµÐ½Ð¸Ñ‚ÑŒ изменениÑ, внеÑенные в ÑвойÑтво "{0}", Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ метода object.set.'; Strings.OfficeOM.L_SSOServerErrorMessage = "Ðа Ñервере произошла Ð½ÐµÐ¿Ñ€ÐµÐ´Ð²Ð¸Ð´ÐµÐ½Ð½Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°."; +Strings.OfficeOM.L_InvalidSSOAddinMessage = "API удоÑтоверений не поддерживаетÑÑ Ð´Ð»Ñ Ñтой надÑтройки."; +Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = 'ВыполнÑетÑÑ Ð½Ð°Ñтройка ÑвойÑтва "{0}", предназначенного только Ð´Ð»Ñ Ñ‡Ñ‚ÐµÐ½Ð¸Ñ.'; Strings.OfficeOM.L_InvalidApiCallInContext = "ÐедопуÑтимый вызов API в текущем контекÑте."; -Strings.OfficeOM.L_InvalidDataObject = "ÐедопуÑтимый объект данных"; -Strings.OfficeOM.L_DialogInvalidScheme = "Схема URL-адреÑа не поддерживаетÑÑ. ИÑпользуйте протокол HTTPS."; -Strings.OfficeOM.L_SetDataParametersConflict = "Указанные параметры конфликтуют."; +Strings.OfficeOM.L_InvalidOperationInCellEditMode = "Excel находитÑÑ Ð² режиме правки Ñчейки. Выйдите из режима правки, нажав клавишу ВВОД или TAB или выбрав другую Ñчейку, а затем попробуйте еще раз."; +Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Ðе удалоÑÑŒ извлечь файл из-за ошибки Ñети."; +Strings.OfficeOM.L_InvalidSetRows = "Указанные Ñтроки недопуÑтимы."; +Strings.OfficeOM.L_FunctionCallFailed = "Ошибка вызова функции {0}, код ошибки: {1}."; +Strings.OfficeOM.L_NotSupportedBindingType = "Указанный тип привÑзки {0} не поддерживаетÑÑ."; +Strings.OfficeOM.L_CoercionTypeNotSupported = "Указанный тип Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð¸Ñ Ð½Ðµ поддерживаетÑÑ."; Strings.OfficeOM.L_UnsupportedEnumerationMessage = "ПеречиÑление не поддерживаетÑÑ Ð² текущем хоÑÑ‚-приложении."; -Strings.OfficeOM.L_InvalidNode = "ÐедопуÑтимый узел"; +Strings.OfficeOM.L_DisplayDialogError = "Ошибка Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð´Ð¸Ð°Ð»Ð¾Ð³Ð¾Ð²Ð¾Ð³Ð¾ окна"; +Strings.OfficeOM.L_CustomXmlError = "Ошибка наÑтраиваемого XML-документа."; +Strings.OfficeOM.L_FileTypeNotSupported = "Указанный тип файлов не поддерживаетÑÑ."; +Strings.OfficeOM.L_ElementMissing = "Ðе удалоÑÑŒ отформатировать Ñчейку таблицы, так как отÑутÑтвуют некоторые Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð². Проверьте параметры и повторите попытку."; +Strings.OfficeOM.L_InValidOptionalArgument = "недопуÑтимый необÑзательный аргумент"; +Strings.OfficeOM.L_CallbackNotAFunction = 'Ðеобходимый тип обратного вызова — "ФункциÑ", но был тип {0}.'; +Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "ИÑтекло Ð²Ñ€ÐµÐ¼Ñ Ð¾Ð¶Ð¸Ð´Ð°Ð½Ð¸Ñ ÑеанÑа Office Online, или он ÑвлÑетÑÑ Ð½ÐµÐ´Ð¾Ð¿ÑƒÑтимым. Чтобы продолжить, обновите Ñтраницу."; +Strings.OfficeOM.L_BadSelectorString = "Строка, Ð¿ÐµÑ€ÐµÐ´Ð°Ð²Ð°ÐµÐ¼Ð°Ñ Ð² облаÑÑ‚ÑŒ выделениÑ, неправильно отформатирована или не поддерживаетÑÑ."; +Strings.OfficeOM.L_InvalidTableOptionValue = "Один или неÑколько параметров таблицы имеют недопуÑтимые значениÑ. Проверьте параметры и повторите попытку."; +Strings.OfficeOM.L_CustomFunctionNameCannotSplit = "Ð˜Ð¼Ñ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ð¸ должно Ñодержать проÑтранÑтво имени и короткое Ð¸Ð¼Ñ (оба должны быть указаны)."; +Strings.OfficeOM.L_NonUniformPartialGetNotSupported = 'ИÑпользование параметров координации Ñ Ñ‚Ð¸Ð¿Ð¾Ð¼ Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð¸Ñ "Таблица" не допуÑкаетÑÑ, еÑли таблица Ñодержит объединенные Ñчейки.'; +Strings.OfficeOM.L_DataStale = "Данные уÑтарели"; Strings.OfficeOM.L_SSOClientErrorMessage = "Ð’ клиенте произошла Ð½ÐµÐ¿Ñ€ÐµÐ´Ð²Ð¸Ð´ÐµÐ½Ð½Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°."; -Strings.OfficeOM.L_EventHandlerRemovalFailed = "Ðе удалоÑÑŒ удалить обработчик Ñобытий."; -Strings.OfficeOM.L_NavOutOfBound = "ÐžÐ¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐ¸Ð»Ð°ÑÑŒ Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ¾Ð¹, так как Ð¸Ð½Ð´ÐµÐºÑ Ð½Ð°Ñ…Ð¾Ð´Ð¸Ñ‚ÑÑ Ð²Ð½Ðµ допуÑтимого диапазона."; -Strings.OfficeOM.L_UserNotSignedIn = "Ðикто из пользователей не вошел в Office."; -Strings.OfficeOM.L_EventHandlerNotExist = "Указанный обработчик Ñобытий не найден Ð´Ð»Ñ Ñтой привÑзки."; -Strings.OfficeOM.L_InvalidGetColumns = "Указанные Ñтолбцы недопуÑтимы."; -Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Сделайте выбор."; -Strings.OfficeOM.L_Timeout = "ИÑтекло Ð²Ñ€ÐµÐ¼Ñ Ð¾Ð¶Ð¸Ð´Ð°Ð½Ð¸Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ð¸."; -Strings.OfficeOM.L_InvalidParameters = "У функции {0} недопуÑтимые параметры."; -Strings.OfficeOM.L_MultipleNamedItemFound = "Ðайдено неÑколько объектов Ñ Ð¾Ð´Ð¸Ð½Ð°ÐºÐ¾Ð²Ñ‹Ð¼Ð¸ именами."; -Strings.OfficeOM.L_TooManyArguments = "Ñлишком много аргументов"; -Strings.OfficeOM.L_CustomXmlExceedQuotaName = "ДоÑтигнут предел выбора"; -Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Вызовите closeAsync Ð´Ð»Ñ Ñ‚ÐµÐºÑƒÑ‰ÐµÐ³Ð¾ файла перед извлечением другого."; -Strings.OfficeOM.L_SettingsAreStale = "Ðе удалоÑÑŒ Ñохранить параметры, так как они уÑтарели."; -Strings.OfficeOM.L_FormattingReminder = "Ðапоминание о форматировании"; -Strings.OfficeOM.L_InvalidBinding = "ÐедопуÑÑ‚Ð¸Ð¼Ð°Ñ Ð¿Ñ€Ð¸Ð²Ñзка"; -Strings.OfficeOM.L_InvalidGetRows = "Указанные Ñтроки недопуÑтимы."; -Strings.OfficeOM.L_InternalErrorDescription = "Произошла внутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ°."; -Strings.OfficeOM.L_ValueNotLoaded = "Значение результирующего объекта еще не загружено. Прежде чем Ñчитывать значение ÑвойÑтва, вызовите метод context.sync() в ÑопоÑтавленном контекÑте запроÑа."; -Strings.OfficeOM.L_DocumentReadOnly = "Ð—Ð°Ð¿Ñ€Ð¾ÑˆÐµÐ½Ð½Ð°Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½Ðµ допуÑкаетÑÑ Ð² текущем режиме документов."; -Strings.OfficeOM.L_NotSupportedBindingType = "Указанный тип привÑзки {0} не поддерживаетÑÑ."; -Strings.OfficeOM.L_FunctionCallFailed = "Ошибка вызова функции {0}, код ошибки: {1}."; -Strings.OfficeOM.L_NetworkProblem = "Ошибка Ñети"; -Strings.OfficeOM.L_SettingNameNotExist = "Указанное Ð¸Ð¼Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð° не ÑущеÑтвует."; -Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Приложение {0} не ÑущеÑтвует. Microsoft.Office.WebExtension.Initialize(Reason) не вызываетÑÑ."; -Strings.OfficeOM.L_DialogNavigateError = "Ошибка навигации диалогового окна"; -Strings.OfficeOM.L_NoCapability = "У Ð²Ð°Ñ Ð½ÐµÐ´Ð¾Ñтаточно разрешений Ð´Ð»Ñ Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñтого дейÑтвиÑ."; -Strings.OfficeOM.L_GetDataParametersConflict = "Указанные параметры конфликтуют."; -Strings.OfficeOM.L_InvalidRequestContext = "Ð’Ñ‹ не можете иÑпользовать объект в разных контекÑтах запроÑов."; -Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Указанный тип привÑзки неÑовмеÑтим Ñ Ð·Ð°Ð´Ð°Ð½Ð½Ñ‹Ð¼ именованным Ñлементом."; -Strings.OfficeOM.L_InvalidBindingError = "Ошибка: недопуÑÑ‚Ð¸Ð¼Ð°Ñ Ð¿Ñ€Ð¸Ð²Ñзка"; -Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Выбранное Ñодержимое должно быть предÑтавлено в формате таблицы. Отформатируйте данные как таблицу и повторите попытку."; -Strings.OfficeOM.L_NonUniformPartialSetNotSupported = 'ИÑпользование параметров координации Ñ Ñ‚Ð¸Ð¿Ð¾Ð¼ Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð¸Ñ "Таблица" не допуÑкаетÑÑ, еÑли таблица Ñодержит объединенные Ñчейки.'; -Strings.OfficeOM.L_InvalidCellsValue = "Один или неÑколько параметров Ñчеек имеют недопуÑтимые значениÑ. Проверьте параметры и повторите попытку."; -Strings.OfficeOM.L_MissingParameter = "ОтÑутÑтвует параметр."; -Strings.OfficeOM.L_InvalidCoercion = "ÐедопуÑтимый тип приведениÑ"; +Strings.OfficeOM.L_APINotSupported = "API не поддерживаетÑÑ"; +Strings.OfficeOM.L_InvalidDataObject = "ÐедопуÑтимый объект данных"; +Strings.OfficeOM.L_TooManyIncompleteRequests = "ДождитеÑÑŒ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð¸Ñ Ð¿Ñ€ÐµÐ´Ñ‹Ð´ÑƒÑ‰ÐµÐ³Ð¾ вызова."; +Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "ÐžÐ¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½Ðµ поддерживаетÑÑ Ð´Ð»Ñ Ñтого типа привÑзки."; +Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Данные уÑтарели. Получите объект еще раз."; +Strings.OfficeOM.L_CannotNavigateTo = "Объект находитÑÑ Ð² раÑположении, где не поддерживаетÑÑ Ð½Ð°Ð²Ð¸Ð³Ð°Ñ†Ð¸Ñ."; +Strings.OfficeOM.L_InvalidAPICall = "ÐедопуÑтимый вызов API"; Strings.OfficeOM.L_OsfControlTypeNotSupported = "Тип OsfControl не поддерживаетÑÑ."; -Strings.OfficeOM.L_UnknownBindingType = "Тип привÑзки не поддерживаетÑÑ."; -Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Разрешить"; Strings.OfficeOM.L_IndexOutOfRange = "Ð˜Ð½Ð´ÐµÐºÑ Ð½Ð°Ñ…Ð¾Ð´Ð¸Ñ‚ÑÑ Ð²Ð½Ðµ диапазона."; -Strings.OfficeOM.L_AppNameNotExist = "Ð˜Ð¼Ñ Ð½Ð°Ð´Ñтройки Ð´Ð»Ñ {0} не ÑущеÑтвует."; -Strings.OfficeOM.L_EventRegistrationError = "Ошибка региÑтрации ÑобытиÑ"; -Strings.OfficeOM.L_APINotSupported = "API не поддерживаетÑÑ"; -Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Ðе удалоÑÑŒ выполнить операцию, поÑкольку Ñта надÑтройка уже запрашивает маркер доÑтупа."; +Strings.OfficeOM.L_DataReadError = "Ошибка Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ…"; +Strings.OfficeOM.L_InvalidGrantMessage = "ОтÑутÑтвуют Ñ€Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ñтой надÑтройки."; +Strings.OfficeOM.L_InvalidFormat = "Ошибка недопуÑтимого формата"; +Strings.OfficeOM.L_SSOConnectionLostError = "A connection was lost during the sign in process."; +Strings.OfficeOM.L_InvalidOrTimedOutSession = "ÐедопуÑтимый ÑÐµÐ°Ð½Ñ Ð¸Ð»Ð¸ иÑтекло Ð²Ñ€ÐµÐ¼Ñ Ð¾Ð¶Ð¸Ð´Ð°Ð½Ð¸Ñ ÑеанÑа"; +Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Выделенный фрагмент неÑовмеÑтим Ñ ÑƒÐºÐ°Ð·Ð°Ð½Ð½Ñ‹Ð¼ типом приведениÑ."; +Strings.OfficeOM.L_ColIndexOutOfRange = "Значение индекÑа Ñтолбца находитÑÑ Ð²Ð½Ðµ допуÑтимого диапазона. ИÑпользуйте значение (0 или больше), которое меньше чиÑла Ñтолбцов."; +Strings.OfficeOM.L_BrowserAPINotSupported = "Браузер не поддерживает запрошенный API."; +Strings.OfficeOM.L_CannotWriteToSelection = "Ðе удаетÑÑ Ð·Ð°Ð¿Ð¸Ñать данные в текущий выделенный фрагмент."; +Strings.OfficeOM.L_CannotRegisterEvent = "Ðе удаетÑÑ Ð·Ð°Ñ€ÐµÐ³Ð¸Ñтрировать обработчик Ñобытий."; +Strings.OfficeOM.L_MissingParameter = "ОтÑутÑтвует параметр."; Strings.OfficeOM.L_NamedItemNotFound = "Именованный Ñлемент не ÑущеÑтвует."; -Strings.OfficeOM.L_DataNotMatchCoercionType = "Тип указанного объекта данных неÑовмеÑтим Ñ Ð²Ñ‹Ð´ÐµÐ»ÐµÐ½Ð½Ñ‹Ð¼ фрагментом."; -Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Указано недопуÑтимое значение параметра rowCount или columnCount."; -Strings.OfficeOM.L_UnsupportedEnumeration = "Ðеподдерживаемое перечиÑление"; -Strings.OfficeOM.L_InvalidAPICall = "ÐедопуÑтимый вызов API"; +Strings.OfficeOM.L_BindingToMultipleSelection = "Выделение неÑмежных фрагментов не поддерживаетÑÑ."; +Strings.OfficeOM.L_OverwriteWorksheetData = "Ðе удалоÑÑŒ выполнить операцию заданиÑ, так заданный объект данных перезапишет или перемеÑтит данные."; Strings.OfficeOM.L_InvalidColumnsForBinding = "Указанные Ñтолбцы недопуÑтимы."; -Strings.OfficeOM.L_SliceSizeNotSupported = "Размер указанного фрагмента не поддерживаетÑÑ."; -Strings.OfficeOM.L_SpecifiedIdNotExist = "Указанный идентификатор не ÑущеÑтвует."; -Strings.OfficeOM.L_GetSelectionNotSupported = "Текущий выделенный фрагмент не поддерживаетÑÑ."; -Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "наÑтройте браузер"; -Strings.OfficeOM.L_BindingCreationError = "Ошибка при Ñоздании привÑзки"; -Strings.OfficeOM.L_MemoryLimit = "Превышен лимит памÑти"; -Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "ÐžÐ³Ñ€Ð°Ð½Ð¸Ñ‡ÐµÐ½Ð¸Ñ Ð±Ñ€Ð°ÑƒÐ·ÐµÑ€Ð° не позволили Ñоздать диалоговое окно. Домен диалогового окна и домен узла надÑтройки находÑÑ‚ÑÑ Ð² разных зонах безопаÑноÑти."; -Strings.OfficeOM.L_PropertyNotLoaded = 'СвойÑтво "{0}" недоÑтупно. Прежде чем прочеÑÑ‚ÑŒ его значение, вызовите метод загрузки Ð´Ð»Ñ Ñодержащего его объекта и вызовите "context.sync()" Ð´Ð»Ñ ÐºÐ¾Ð½Ñ‚ÐµÐºÑта ÑвÑзанного запроÑа.'; -Strings.OfficeOM.L_MissingRequiredArguments = "отÑутÑтвуют некоторые обÑзательные аргументы"; -Strings.OfficeOM.L_NewWindowCrossZone = 'Параметры безопаÑноÑти браузера не позволили Ñоздать диалоговое окно. ИÑпользуйте другой браузер или {0} так, чтобы домен "{1}" и домен, отображаемый в адреÑной Ñтроке браузера, находилиÑÑŒ в одной зоне безопаÑноÑти.'; -Strings.OfficeOM.L_TooManyIncompleteRequests = "ДождитеÑÑŒ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð¸Ñ Ð¿Ñ€ÐµÐ´Ñ‹Ð´ÑƒÑ‰ÐµÐ³Ð¾ вызова."; -Strings.OfficeOM.L_SelectionCannotBound = "Ðе удаетÑÑ Ð²Ñ‹Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÑŒ привÑзку к выделенному фрагменту."; -Strings.OfficeOM.L_ConnectionFailureWithDetails = "Сбой запроÑа Ñ ÐºÐ¾Ð´Ð¾Ð¼ ÑоÑтоÑÐ½Ð¸Ñ {0}, кодом ошибки {1}, а также Ñообщением об ошибке: {2}" +Strings.OfficeOM.L_InvalidArgument = 'Ðргумент "{0}" не работает в данной Ñитуации, отÑутÑтвует или имеет неправильный формат.'; +Strings.OfficeOM.L_InvalidObjectPath = 'Ð’Ñ‹ не можете выполнить Ñто дейÑтвие Ð´Ð»Ñ Ð¿ÑƒÑ‚Ð¸ к объекту "{0}". ЕÑли вы иÑпользуете объект в неÑкольких вызовах "context.sync" и за пределами поÑледовательного Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ð¿Ð°ÐºÐµÑ‚Ð° ".run", управлÑйте Ñроком жизни объекта Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ методов "context.trackedObjects.add()" и "context.trackedObjects.remove()".'; +Strings.OfficeOM.L_SettingsAreStale = "Ðе удалоÑÑŒ Ñохранить параметры, так как они уÑтарели."; +Strings.OfficeOM.L_OperationNotSupported = "Эта Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½Ðµ поддерживаетÑÑ."; +Strings.OfficeOM.L_DialogInvalidScheme = "Схема URL-адреÑа не поддерживаетÑÑ. ИÑпользуйте протокол HTTPS."; +Strings.OfficeOM.L_UserNotSignedIn = "Ðикто из пользователей не вошел в Office."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Ðе удалоÑÑŒ выполнить операцию, поÑкольку Ñта надÑтройка уже запрашивает маркер доÑтупа."; +Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Тип удоÑÑ‚Ð¾Ð²ÐµÑ€ÐµÐ½Ð¸Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð½Ðµ поддерживаетÑÑ."; +Strings.OfficeOM.L_TooManyOptionalObjects = "множеÑтво дополнительных объектов в ÑпиÑке параметров"; +Strings.OfficeOM.L_InvalidCellsValue = "Один или неÑколько параметров Ñчеек имеют недопуÑтимые значениÑ. Проверьте параметры и повторите попытку."; +Strings.OfficeOM.L_DialogAddressNotTrusted = "Домен URL-адреÑа не включен в Ñлемент AppDomains в манифеÑте."; +Strings.OfficeOM.L_CustomFunctionNameContainsBadChars = "Ð˜Ð¼Ñ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ð¸ может Ñодержать только буквы, цифры, Ð¿Ð¾Ð´Ñ‡ÐµÑ€ÐºÐ¸Ð²Ð°Ð½Ð¸Ñ Ð¸ точки."; +Strings.OfficeOM.L_DialogOK = "ОК"; +Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Приложение {0} не ÑущеÑтвует. Microsoft.Office.WebExtension.Initialize(Reason) не вызываетÑÑ."; +Strings.OfficeOM.L_TooManyOptionalFunction = "множеÑтво дополнительных функций в ÑпиÑке параметров"; +Strings.OfficeOM.L_CustomXmlNodeNotFound = "Указанный узел не найден."; +Strings.OfficeOM.L_UnsupportedUserIdentity = "Тип удоÑÑ‚Ð¾Ð²ÐµÑ€ÐµÐ½Ð¸Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð½Ðµ поддерживаетÑÑ."; +Strings.OfficeOM.L_EventRegistrationError = "Ошибка региÑтрации ÑобытиÑ"; +Strings.OfficeOM.L_InvalidSetStartRowColumn = "Указано недопуÑтимое значение параметра startRow или startColumn."; +Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "Из-за XPath можно выбрать не более 1024 Ñлементов."; +Strings.OfficeOM.L_NetworkProblem = "Ошибка Ñети"; +Strings.OfficeOM.L_EventHandlerAdditionFailed = "Ðе удалоÑÑŒ добавить обработчик Ñобытий."; +Strings.OfficeOM.L_AppNameNotExist = "Ð˜Ð¼Ñ Ð½Ð°Ð´Ñтройки Ð´Ð»Ñ {0} не ÑущеÑтвует."; +Strings.OfficeOM.L_InvalidGetRows = "Указанные Ñтроки недопуÑтимы." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/ru-ru/office_strings.js b/node_modules/@microsoft/office-js/dist/ru-ru/office_strings.js index bc78b45..cedb753 100644 --- a/node_modules/@microsoft/office-js/dist/ru-ru/office_strings.js +++ b/node_modules/@microsoft/office-js/dist/ru-ru/office_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_InvalidOrTimedOutSession="ÐедопуÑтимый ÑÐµÐ°Ð½Ñ Ð¸Ð»Ð¸ иÑтекло Ð²Ñ€ÐµÐ¼Ñ Ð¾Ð¶Ð¸Ð´Ð°Ð½Ð¸Ñ ÑеанÑа";Strings.OfficeOM.L_ShowWindowDialogNotification="ÐадÑтройке {0} необходимо открыть новое окно.";Strings.OfficeOM.L_CustomXmlError="Ошибка наÑтраиваемого XML-документа.";Strings.OfficeOM.L_OperationNotSupported="Эта Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½Ðµ поддерживаетÑÑ.";Strings.OfficeOM.L_ActivityLimitReached="КоличеÑтво дейÑтвий доÑтигло макÑимально допуÑтимого.";Strings.OfficeOM.L_CustomXmlNodeNotFound="Указанный узел не найден.";Strings.OfficeOM.L_BindingToMultipleSelection="Выделение неÑмежных фрагментов не поддерживаетÑÑ.";Strings.OfficeOM.L_UserAborted="Пользователь прервал выполнение запроÑа на ÑоглаÑие.";Strings.OfficeOM.L_InvalidReadForBlankRow="Ð£ÐºÐ°Ð·Ð°Ð½Ð½Ð°Ñ Ñтрока пуÑта.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Данные уÑтарели";Strings.OfficeOM.L_UserAbortedMessage="Пользователь не дал ÑоглаÑие на Ñ€Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð¸Ñ Ð½Ð°Ð´Ñтройки.";Strings.OfficeOM.L_FormatValueOutOfRange="Значение находитÑÑ Ð²Ð½Ðµ допуÑтимого диапазона.";Strings.OfficeOM.L_TooManyOptionalFunction="множеÑтво дополнительных функций в ÑпиÑке параметров";Strings.OfficeOM.L_UnsupportedDataObject="Заданный объект данных не поддерживаетÑÑ.";Strings.OfficeOM.L_HostError="Ошибка узла";Strings.OfficeOM.L_InvalidResourceUrl="ПредоÑтавлен недопуÑтимый URL-Ð°Ð´Ñ€ÐµÑ Ñ€ÐµÑурÑа приложениÑ.";Strings.OfficeOM.L_SettingsCannotSave="Ðе удалоÑÑŒ Ñохранить параметры.";Strings.OfficeOM.L_DialogAlreadyOpened="Сбой операции, так как у Ñтой надÑтройки активно диалоговое окно.";Strings.OfficeOM.L_ReadSettingsError="Ошибка Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð²";Strings.OfficeOM.L_DataWriteError="Ошибка запиÑи данных";Strings.OfficeOM.L_InitializeNotReady="Файл Office.js еще не загружен. Повторите попытку позже или добавьте код инициализации в функцию Office.initialize.";Strings.OfficeOM.L_CannotRegisterEvent="Ðе удаетÑÑ Ð·Ð°Ñ€ÐµÐ³Ð¸Ñтрировать обработчик Ñобытий.";Strings.OfficeOM.L_InvalidBindingOperation="ÐедопуÑÑ‚Ð¸Ð¼Ð°Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð¿Ñ€Ð¸Ð²Ñзки";Strings.OfficeOM.L_InvalidSetColumns="Указанные Ñтолбцы недопуÑтимы.";Strings.OfficeOM.L_DataStale="Данные уÑтарели";Strings.OfficeOM.L_InvalidObjectPath='Ð’Ñ‹ не можете выполнить Ñто дейÑтвие Ð´Ð»Ñ Ð¿ÑƒÑ‚Ð¸ к объекту "{0}". ЕÑли вы иÑпользуете объект в неÑкольких вызовах "context.sync" и за пределами поÑледовательного Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ð¿Ð°ÐºÐµÑ‚Ð° ".run", управлÑйте Ñроком жизни объекта Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ методов "context.trackedObjects.add()" и "context.trackedObjects.remove()".';Strings.OfficeOM.L_UserClickIgnore="Пользователь решил игнорировать диалоговое окно.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Данные уÑтарели. Получите объект еще раз.";Strings.OfficeOM.L_InvalidFormat="Ошибка недопуÑтимого формата";Strings.OfficeOM.L_InvalidValue="ÐедопуÑтимое значение";Strings.OfficeOM.L_OutOfRange="Значение вне диапазона";Strings.OfficeOM.L_SaveSettingsError="Ошибка ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð²";Strings.OfficeOM.L_InvalidResourceUrlMessage="Ð’ манифеÑте указан недопуÑтимый URL-Ð°Ð´Ñ€ÐµÑ Ñ€ÐµÑурÑа.";Strings.OfficeOM.L_RunMustReturnPromise="Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð¿Ð°ÐºÐµÑ‚Ð½Ð¾Ð¹ обработки, Ð¿ÐµÑ€ÐµÐ´Ð°Ð½Ð½Ð°Ñ Ð² метод .run, не возвратила обещание. Она должна возвратить обещание, чтобы по окончании операции пакетной обработки можно было разблокировать вÑе автоматичеÑки отÑлеживаемые объекты. Обычно, чтобы возвратить обещание, необходимо возвратить отклик из context.sync().";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty='ВыполнÑетÑÑ Ð½Ð°Ñтройка ÑвойÑтва "{0}", предназначенного только Ð´Ð»Ñ Ñ‡Ñ‚ÐµÐ½Ð¸Ñ.';Strings.OfficeOM.L_InvalidTableOptionValue="Один или неÑколько параметров таблицы имеют недопуÑтимые значениÑ. Проверьте параметры и повторите попытку.";Strings.OfficeOM.L_InvalidFormatValue="Один или неÑколько параметров формата имеют недопуÑтимые значениÑ. Проверьте параметры и повторите попытку.";Strings.OfficeOM.L_InvalidGrant="ОтÑутÑтвует Ð¿Ñ€ÐµÐ´Ð²Ð°Ñ€Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð°Ñ Ð°Ð²Ñ‚Ð¾Ñ€Ð¸Ð·Ð°Ñ†Ð¸Ñ.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Игнорировать";Strings.OfficeOM.L_InvalidArgumentGeneric="Ðргументы, передаваемые в функцию, не работают в данной Ñитуации, отÑутÑтвуют или имеют неправильный формат.";Strings.OfficeOM.L_InvalidSetStartRowColumn="Указано недопуÑтимое значение параметра startRow или startColumn.";Strings.OfficeOM.L_InvalidSetRows="Указанные Ñтроки недопуÑтимы.";Strings.OfficeOM.L_SettingsStaleError="Ошибка из-за уÑтаревших параметров";Strings.OfficeOM.L_RequestTimeout="Выполнение вызова занÑло Ñлишком много времени.";Strings.OfficeOM.L_RequestTokenUnavailable="API отрегулирован Ð´Ð»Ñ ÑÐ½Ð¸Ð¶ÐµÐ½Ð¸Ñ Ñ‡Ð°Ñтоты вызовов.";Strings.OfficeOM.L_NotSupported="Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ {0} не поддерживаетÑÑ.";Strings.OfficeOM.L_ElementMissing="Ðе удалоÑÑŒ отформатировать Ñчейку таблицы, так как отÑутÑтвуют некоторые Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð². Проверьте параметры и повторите попытку.";Strings.OfficeOM.L_InternalError="ВнутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ°";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Примечание: рекомендуемое количеÑтво Ñчеек в таблице — менее 20 000.";Strings.OfficeOM.L_DataReadError="Ошибка Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ…";Strings.OfficeOM.L_NotSupportedEventType="Указанный тип ÑÐ¾Ð±Ñ‹Ñ‚Ð¸Ñ {0} не поддерживаетÑÑ.";Strings.OfficeOM.L_BadSelectorString="Строка, Ð¿ÐµÑ€ÐµÐ´Ð°Ð²Ð°ÐµÐ¼Ð°Ñ Ð² облаÑÑ‚ÑŒ выделениÑ, неправильно отформатирована или не поддерживаетÑÑ.";Strings.OfficeOM.L_ConnectionFailureWithStatus="Сбой запроÑа Ñ ÐºÐ¾Ð´Ð¾Ð¼ ÑоÑтоÑÐ½Ð¸Ñ {0}.";Strings.OfficeOM.L_APICallFailed="Сбой вызова API";Strings.OfficeOM.L_TooManyOptionalObjects="множеÑтво дополнительных объектов в ÑпиÑке параметров";Strings.OfficeOM.L_PropertyDoesNotExist='СвойÑтво "{0}" не ÑущеÑтвует в объекте.';Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod='Вам не удаÑÑ‚ÑÑ Ð¿Ñ€Ð¸Ð¼ÐµÐ½Ð¸Ñ‚ÑŒ изменениÑ, внеÑенные в ÑвойÑтво "{0}", Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ метода object.set.';Strings.OfficeOM.L_ColIndexOutOfRange="Значение индекÑа Ñтолбца находитÑÑ Ð²Ð½Ðµ допуÑтимого диапазона. ИÑпользуйте значение (0 или больше), которое меньше чиÑла Ñтолбцов.";Strings.OfficeOM.L_ShuttingDown="Ðе удалоÑÑŒ выполнить операцию, так как данные на Ñервере уÑтарели.";Strings.OfficeOM.L_InvalidSelectionForBindingType="Ðевозможно Ñоздать привÑзку Ð´Ð»Ñ Ñ‚ÐµÐºÑƒÑ‰ÐµÐ³Ð¾ выделенного фрагмента и указанного типа привÑзки.";Strings.OfficeOM.L_DataWriteReminder="Ðапоминание о запиÑи данных";Strings.OfficeOM.L_InvalidApiArgumentsMessage="ÐедопуÑтимые входные аргументы.";Strings.OfficeOM.L_DialogOK="ОК";Strings.OfficeOM.L_SetDataIsTooLarge="Размер указанного объекта данных превышает допуÑтимый.";Strings.OfficeOM.L_DataNotMatchBindingType="Указанный объект данных неÑовмеÑтим Ñ Ñ‚Ð¸Ð¿Ð¾Ð¼ привÑзки.";Strings.OfficeOM.L_RowIndexOutOfRange="Значение индекÑа Ñтроки находитÑÑ Ð²Ð½Ðµ допуÑтимого диапазона. ИÑпользуйте значение (0 или больше), которое меньше чиÑла Ñтрок.";Strings.OfficeOM.L_PermissionDenied="Отказано в разрешении";Strings.OfficeOM.L_DisplayDialogError="Ошибка Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð´Ð¸Ð°Ð»Ð¾Ð³Ð¾Ð²Ð¾Ð³Ð¾ окна";Strings.OfficeOM.L_OverwriteWorksheetData="Ðе удалоÑÑŒ выполнить операцию заданиÑ, так заданный объект данных перезапишет или перемеÑтит данные.";Strings.OfficeOM.L_NotImplemented="Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ {0} не реализована.";Strings.OfficeOM.L_InvalidGetStartRowColumn="Указано недопуÑтимое значение параметра startRow или startColumn.";Strings.OfficeOM.L_InvalidArgument='Ðргумент "{0}" не работает в данной Ñитуации, отÑутÑтвует или имеет неправильный формат.';Strings.OfficeOM.L_DialogRequireHTTPS="Протокол HTTP не поддерживаетÑÑ. ИÑпользуйте протокол HTTPS";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Тип удоÑÑ‚Ð¾Ð²ÐµÑ€ÐµÐ½Ð¸Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð½Ðµ поддерживаетÑÑ.";Strings.OfficeOM.L_CannotWriteToSelection="Ðе удаетÑÑ Ð·Ð°Ð¿Ð¸Ñать данные в текущий выделенный фрагмент.";Strings.OfficeOM.L_RedundantCallbackSpecification="Процедуру обратного вызова невозможно указать одновременно в ÑпиÑке аргументов и в необÑзательном объекте.";Strings.OfficeOM.L_BrowserAPINotSupported="Браузер не поддерживает запрошенный API.";Strings.OfficeOM.L_InvalidSSOAddinMessage="API удоÑтоверений не поддерживаетÑÑ Ð´Ð»Ñ Ñтой надÑтройки.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Выделенный фрагмент неÑовмеÑтим Ñ ÑƒÐºÐ°Ð·Ð°Ð½Ð½Ñ‹Ð¼ типом приведениÑ.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Ðе удалоÑÑŒ добавить обработчик Ñобытий.";Strings.OfficeOM.L_CannotNavigateTo="Объект находитÑÑ Ð² раÑположении, где не поддерживаетÑÑ Ð½Ð°Ð²Ð¸Ð³Ð°Ñ†Ð¸Ñ.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="ÐадÑтройка уже запрашивает маркер доÑтупа.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported='ИÑпользование параметров координации Ñ Ñ‚Ð¸Ð¿Ð¾Ð¼ Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð¸Ñ "Таблица" не допуÑкаетÑÑ, еÑли таблица Ñодержит объединенные Ñчейки.';Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="ИÑтекло Ð²Ñ€ÐµÐ¼Ñ Ð¾Ð¶Ð¸Ð´Ð°Ð½Ð¸Ñ ÑеанÑа Office Online, или он ÑвлÑетÑÑ Ð½ÐµÐ´Ð¾Ð¿ÑƒÑтимым. Чтобы продолжить, обновите Ñтраницу.";Strings.OfficeOM.L_SSOClientError="Произошла ошибка в запроÑе на проверку подлинноÑти от Office.";Strings.OfficeOM.L_BindingNotExist="Ð£ÐºÐ°Ð·Ð°Ð½Ð½Ð°Ñ Ð¿Ñ€Ð¸Ð²Ñзка не ÑущеÑтвует.";Strings.OfficeOM.L_CallbackNotAFunction='Ðеобходимый тип обратного вызова — "ФункциÑ", но был тип {0}.';Strings.OfficeOM.L_GetDataIsTooLarge="Запрошенный набор данных Ñлишком велик.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="Из-за XPath можно выбрать не более 1024 Ñлементов.";Strings.OfficeOM.L_InvalidDataFormat="Формат указанного объекта данных недопуÑтим.";Strings.OfficeOM.L_UnsupportedUserIdentity="Тип удоÑÑ‚Ð¾Ð²ÐµÑ€ÐµÐ½Ð¸Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð½Ðµ поддерживаетÑÑ.";Strings.OfficeOM.L_InvalidGrantMessage="ОтÑутÑтвуют Ñ€Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ñтой надÑтройки.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Ðе удалоÑÑŒ извлечь файл из-за ошибки Ñети.";Strings.OfficeOM.L_FileTypeNotSupported="Указанный тип файлов не поддерживаетÑÑ.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Указанный тип Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð¸Ñ Ð½ÐµÑовмеÑтим Ñ Ñтим типом привÑзки.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="ÐžÐ¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½Ðµ поддерживаетÑÑ Ð´Ð»Ñ Ñтого типа привÑзки.";Strings.OfficeOM.L_SSOServerError="Произошла ошибка у поÑтавщика проверки подлинноÑти.";Strings.OfficeOM.L_CoercionTypeNotSupported="Указанный тип Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð¸Ñ Ð½Ðµ поддерживаетÑÑ.";Strings.OfficeOM.L_InValidOptionalArgument="недопуÑтимый необÑзательный аргумент";Strings.OfficeOM.L_DataNotMatchSelection="ПредоÑтавленный объект данных неÑовмеÑтим Ñ Ñ„Ð¾Ñ€Ð¼Ð¾Ð¹ или измерениÑми текущего выделенного фрагмента.";Strings.OfficeOM.L_DialogAddressNotTrusted="Домен URL-адреÑа не включен в Ñлемент AppDomains в манифеÑте.";Strings.OfficeOM.L_DataNotMatchBindingSize="Заданный объект данных не ÑоответÑтвует размеру выделенного фрагмента.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Примечание: рекомендуемое количеÑтво наборов форматированиÑ, Ñозданных Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ API форматированиÑ, — менее 100.";Strings.OfficeOM.L_SSOServerErrorMessage="Ðа Ñервере произошла Ð½ÐµÐ¿Ñ€ÐµÐ´Ð²Ð¸Ð´ÐµÐ½Ð½Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°.";Strings.OfficeOM.L_InvalidApiCallInContext="ÐедопуÑтимый вызов API в текущем контекÑте.";Strings.OfficeOM.L_InvalidDataObject="ÐедопуÑтимый объект данных";Strings.OfficeOM.L_DialogInvalidScheme="Схема URL-адреÑа не поддерживаетÑÑ. ИÑпользуйте протокол HTTPS.";Strings.OfficeOM.L_SetDataParametersConflict="Указанные параметры конфликтуют.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="ПеречиÑление не поддерживаетÑÑ Ð² текущем хоÑÑ‚-приложении.";Strings.OfficeOM.L_InvalidNode="ÐедопуÑтимый узел";Strings.OfficeOM.L_SSOClientErrorMessage="Ð’ клиенте произошла Ð½ÐµÐ¿Ñ€ÐµÐ´Ð²Ð¸Ð´ÐµÐ½Ð½Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°.";Strings.OfficeOM.L_EventHandlerRemovalFailed="Ðе удалоÑÑŒ удалить обработчик Ñобытий.";Strings.OfficeOM.L_NavOutOfBound="ÐžÐ¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐ¸Ð»Ð°ÑÑŒ Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ¾Ð¹, так как Ð¸Ð½Ð´ÐµÐºÑ Ð½Ð°Ñ…Ð¾Ð´Ð¸Ñ‚ÑÑ Ð²Ð½Ðµ допуÑтимого диапазона.";Strings.OfficeOM.L_UserNotSignedIn="Ðикто из пользователей не вошел в Office.";Strings.OfficeOM.L_EventHandlerNotExist="Указанный обработчик Ñобытий не найден Ð´Ð»Ñ Ñтой привÑзки.";Strings.OfficeOM.L_InvalidGetColumns="Указанные Ñтолбцы недопуÑтимы.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Сделайте выбор.";Strings.OfficeOM.L_Timeout="ИÑтекло Ð²Ñ€ÐµÐ¼Ñ Ð¾Ð¶Ð¸Ð´Ð°Ð½Ð¸Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ð¸.";Strings.OfficeOM.L_InvalidParameters="У функции {0} недопуÑтимые параметры.";Strings.OfficeOM.L_MultipleNamedItemFound="Ðайдено неÑколько объектов Ñ Ð¾Ð´Ð¸Ð½Ð°ÐºÐ¾Ð²Ñ‹Ð¼Ð¸ именами.";Strings.OfficeOM.L_TooManyArguments="Ñлишком много аргументов";Strings.OfficeOM.L_CustomXmlExceedQuotaName="ДоÑтигнут предел выбора";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Вызовите closeAsync Ð´Ð»Ñ Ñ‚ÐµÐºÑƒÑ‰ÐµÐ³Ð¾ файла перед извлечением другого.";Strings.OfficeOM.L_SettingsAreStale="Ðе удалоÑÑŒ Ñохранить параметры, так как они уÑтарели.";Strings.OfficeOM.L_FormattingReminder="Ðапоминание о форматировании";Strings.OfficeOM.L_InvalidBinding="ÐедопуÑÑ‚Ð¸Ð¼Ð°Ñ Ð¿Ñ€Ð¸Ð²Ñзка";Strings.OfficeOM.L_InvalidGetRows="Указанные Ñтроки недопуÑтимы.";Strings.OfficeOM.L_InternalErrorDescription="Произошла внутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ°.";Strings.OfficeOM.L_ValueNotLoaded="Значение результирующего объекта еще не загружено. Прежде чем Ñчитывать значение ÑвойÑтва, вызовите метод context.sync() в ÑопоÑтавленном контекÑте запроÑа.";Strings.OfficeOM.L_DocumentReadOnly="Ð—Ð°Ð¿Ñ€Ð¾ÑˆÐµÐ½Ð½Ð°Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½Ðµ допуÑкаетÑÑ Ð² текущем режиме документов.";Strings.OfficeOM.L_NotSupportedBindingType="Указанный тип привÑзки {0} не поддерживаетÑÑ.";Strings.OfficeOM.L_FunctionCallFailed="Ошибка вызова функции {0}, код ошибки: {1}.";Strings.OfficeOM.L_NetworkProblem="Ошибка Ñети";Strings.OfficeOM.L_SettingNameNotExist="Указанное Ð¸Ð¼Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð° не ÑущеÑтвует.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Приложение {0} не ÑущеÑтвует. Microsoft.Office.WebExtension.Initialize(Reason) не вызываетÑÑ.";Strings.OfficeOM.L_DialogNavigateError="Ошибка навигации диалогового окна";Strings.OfficeOM.L_NoCapability="У Ð²Ð°Ñ Ð½ÐµÐ´Ð¾Ñтаточно разрешений Ð´Ð»Ñ Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñтого дейÑтвиÑ.";Strings.OfficeOM.L_GetDataParametersConflict="Указанные параметры конфликтуют.";Strings.OfficeOM.L_InvalidRequestContext="Ð’Ñ‹ не можете иÑпользовать объект в разных контекÑтах запроÑов.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Указанный тип привÑзки неÑовмеÑтим Ñ Ð·Ð°Ð´Ð°Ð½Ð½Ñ‹Ð¼ именованным Ñлементом.";Strings.OfficeOM.L_InvalidBindingError="Ошибка: недопуÑÑ‚Ð¸Ð¼Ð°Ñ Ð¿Ñ€Ð¸Ð²Ñзка";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Выбранное Ñодержимое должно быть предÑтавлено в формате таблицы. Отформатируйте данные как таблицу и повторите попытку.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported='ИÑпользование параметров координации Ñ Ñ‚Ð¸Ð¿Ð¾Ð¼ Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð¸Ñ "Таблица" не допуÑкаетÑÑ, еÑли таблица Ñодержит объединенные Ñчейки.';Strings.OfficeOM.L_InvalidCellsValue="Один или неÑколько параметров Ñчеек имеют недопуÑтимые значениÑ. Проверьте параметры и повторите попытку.";Strings.OfficeOM.L_MissingParameter="ОтÑутÑтвует параметр.";Strings.OfficeOM.L_InvalidCoercion="ÐедопуÑтимый тип приведениÑ";Strings.OfficeOM.L_OsfControlTypeNotSupported="Тип OsfControl не поддерживаетÑÑ.";Strings.OfficeOM.L_UnknownBindingType="Тип привÑзки не поддерживаетÑÑ.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Разрешить";Strings.OfficeOM.L_IndexOutOfRange="Ð˜Ð½Ð´ÐµÐºÑ Ð½Ð°Ñ…Ð¾Ð´Ð¸Ñ‚ÑÑ Ð²Ð½Ðµ диапазона.";Strings.OfficeOM.L_AppNameNotExist="Ð˜Ð¼Ñ Ð½Ð°Ð´Ñтройки Ð´Ð»Ñ {0} не ÑущеÑтвует.";Strings.OfficeOM.L_EventRegistrationError="Ошибка региÑтрации ÑобытиÑ";Strings.OfficeOM.L_APINotSupported="API не поддерживаетÑÑ";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Ðе удалоÑÑŒ выполнить операцию, поÑкольку Ñта надÑтройка уже запрашивает маркер доÑтупа.";Strings.OfficeOM.L_NamedItemNotFound="Именованный Ñлемент не ÑущеÑтвует.";Strings.OfficeOM.L_DataNotMatchCoercionType="Тип указанного объекта данных неÑовмеÑтим Ñ Ð²Ñ‹Ð´ÐµÐ»ÐµÐ½Ð½Ñ‹Ð¼ фрагментом.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Указано недопуÑтимое значение параметра rowCount или columnCount.";Strings.OfficeOM.L_UnsupportedEnumeration="Ðеподдерживаемое перечиÑление";Strings.OfficeOM.L_InvalidAPICall="ÐедопуÑтимый вызов API";Strings.OfficeOM.L_InvalidColumnsForBinding="Указанные Ñтолбцы недопуÑтимы.";Strings.OfficeOM.L_SliceSizeNotSupported="Размер указанного фрагмента не поддерживаетÑÑ.";Strings.OfficeOM.L_SpecifiedIdNotExist="Указанный идентификатор не ÑущеÑтвует.";Strings.OfficeOM.L_GetSelectionNotSupported="Текущий выделенный фрагмент не поддерживаетÑÑ.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="наÑтройте браузер";Strings.OfficeOM.L_BindingCreationError="Ошибка при Ñоздании привÑзки";Strings.OfficeOM.L_MemoryLimit="Превышен лимит памÑти";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="ÐžÐ³Ñ€Ð°Ð½Ð¸Ñ‡ÐµÐ½Ð¸Ñ Ð±Ñ€Ð°ÑƒÐ·ÐµÑ€Ð° не позволили Ñоздать диалоговое окно. Домен диалогового окна и домен узла надÑтройки находÑÑ‚ÑÑ Ð² разных зонах безопаÑноÑти.";Strings.OfficeOM.L_PropertyNotLoaded='СвойÑтво "{0}" недоÑтупно. Прежде чем прочеÑÑ‚ÑŒ его значение, вызовите метод загрузки Ð´Ð»Ñ Ñодержащего его объекта и вызовите "context.sync()" Ð´Ð»Ñ ÐºÐ¾Ð½Ñ‚ÐµÐºÑта ÑвÑзанного запроÑа.';Strings.OfficeOM.L_MissingRequiredArguments="отÑутÑтвуют некоторые обÑзательные аргументы";Strings.OfficeOM.L_NewWindowCrossZone='Параметры безопаÑноÑти браузера не позволили Ñоздать диалоговое окно. ИÑпользуйте другой браузер или {0} так, чтобы домен "{1}" и домен, отображаемый в адреÑной Ñтроке браузера, находилиÑÑŒ в одной зоне безопаÑноÑти.';Strings.OfficeOM.L_TooManyIncompleteRequests="ДождитеÑÑŒ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð¸Ñ Ð¿Ñ€ÐµÐ´Ñ‹Ð´ÑƒÑ‰ÐµÐ³Ð¾ вызова.";Strings.OfficeOM.L_SelectionCannotBound="Ðе удаетÑÑ Ð²Ñ‹Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÑŒ привÑзку к выделенному фрагменту.";Strings.OfficeOM.L_ConnectionFailureWithDetails="Сбой запроÑа Ñ ÐºÐ¾Ð´Ð¾Ð¼ ÑоÑтоÑÐ½Ð¸Ñ {0}, кодом ошибки {1}, а также Ñообщением об ошибке: {2}" \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_InitializeNotReady="Файл Office.js еще не загружен. Повторите попытку позже или добавьте код инициализации в функцию Office.initialize.";Strings.OfficeOM.L_InvalidValue="ÐедопуÑтимое значение";Strings.OfficeOM.L_DocumentReadOnly="Ð—Ð°Ð¿Ñ€Ð¾ÑˆÐµÐ½Ð½Ð°Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½Ðµ допуÑкаетÑÑ Ð² текущем режиме документов.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Указанный тип привÑзки неÑовмеÑтим Ñ Ð·Ð°Ð´Ð°Ð½Ð½Ñ‹Ð¼ именованным Ñлементом.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="ÐадÑтройка уже запрашивает маркер доÑтупа.";Strings.OfficeOM.L_ValueNotLoaded="Значение результирующего объекта еще не загружено. Прежде чем Ñчитывать значение ÑвойÑтва, вызовите метод context.sync() в ÑопоÑтавленном контекÑте запроÑа.";Strings.OfficeOM.L_GetDataIsTooLarge="Запрошенный набор данных Ñлишком велик.";Strings.OfficeOM.L_InvalidSetColumns="Указанные Ñтолбцы недопуÑтимы.";Strings.OfficeOM.L_ShuttingDown="Ðе удалоÑÑŒ выполнить операцию, так как данные на Ñервере уÑтарели.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported='ИÑпользование параметров координации Ñ Ñ‚Ð¸Ð¿Ð¾Ð¼ Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð¸Ñ "Таблица" не допуÑкаетÑÑ, еÑли таблица Ñодержит объединенные Ñчейки.';Strings.OfficeOM.L_DialogRequireHTTPS="Протокол HTTP не поддерживаетÑÑ. ИÑпользуйте протокол HTTPS";Strings.OfficeOM.L_ConnectionFailureWithDetails="Сбой запроÑа Ñ ÐºÐ¾Ð´Ð¾Ð¼ ÑоÑтоÑÐ½Ð¸Ñ {0}, кодом ошибки {1}, а также Ñообщением об ошибке: {2}";Strings.OfficeOM.L_OutOfRange="Значение вне диапазона";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Разрешить";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Сделайте выбор.";Strings.OfficeOM.L_MultipleNamedItemFound="Ðайдено неÑколько объектов Ñ Ð¾Ð´Ð¸Ð½Ð°ÐºÐ¾Ð²Ñ‹Ð¼Ð¸ именами.";Strings.OfficeOM.L_PropertyDoesNotExist='СвойÑтво "{0}" не ÑущеÑтвует в объекте.';Strings.OfficeOM.L_GetSelectionNotSupported="Текущий выделенный фрагмент не поддерживаетÑÑ.";Strings.OfficeOM.L_DataWriteError="Ошибка запиÑи данных";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="наÑтройте браузер";Strings.OfficeOM.L_SetDataParametersConflict="Указанные параметры конфликтуют.";Strings.OfficeOM.L_InvalidRequestContext="Ð’Ñ‹ не можете иÑпользовать объект в разных контекÑтах запроÑов.";Strings.OfficeOM.L_SetDataIsTooLarge="Размер указанного объекта данных превышает допуÑтимый.";Strings.OfficeOM.L_InvalidGrant="ОтÑутÑтвует Ð¿Ñ€ÐµÐ´Ð²Ð°Ñ€Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð°Ñ Ð°Ð²Ñ‚Ð¾Ñ€Ð¸Ð·Ð°Ñ†Ð¸Ñ.";Strings.OfficeOM.L_CustomFunctionImplementationMissing="СвойÑтво Ñ Ñ‚Ð°ÐºÐ¸Ð¼ именем Ð´Ð»Ñ Excel.CustomFunctions, предÑтавлÑющее определение функции, должно Ñодержать ÑвойÑтво call, реализующее Ñту функцию.";Strings.OfficeOM.L_UserClickIgnore="Пользователь решил игнорировать диалоговое окно.";Strings.OfficeOM.L_NotSupported="Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ {0} не поддерживаетÑÑ.";Strings.OfficeOM.L_UserAbortedMessage="Пользователь не дал ÑоглаÑие на Ñ€Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð¸Ñ Ð½Ð°Ð´Ñтройки.";Strings.OfficeOM.L_InvalidResourceUrlMessage="Ð’ манифеÑте указан недопуÑтимый URL-Ð°Ð´Ñ€ÐµÑ Ñ€ÐµÑурÑа.";Strings.OfficeOM.L_InvalidSelectionForBindingType="Ðевозможно Ñоздать привÑзку Ð´Ð»Ñ Ñ‚ÐµÐºÑƒÑ‰ÐµÐ³Ð¾ выделенного фрагмента и указанного типа привÑзки.";Strings.OfficeOM.L_UnknownBindingType="Тип привÑзки не поддерживаетÑÑ.";Strings.OfficeOM.L_RunMustReturnPromise="Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ Ð¿Ð°ÐºÐµÑ‚Ð½Ð¾Ð¹ обработки, Ð¿ÐµÑ€ÐµÐ´Ð°Ð½Ð½Ð°Ñ Ð² метод .run, не возвратила обещание. Она должна возвратить обещание, чтобы по окончании операции пакетной обработки можно было разблокировать вÑе автоматичеÑки отÑлеживаемые объекты. Обычно, чтобы возвратить обещание, необходимо возвратить отклик из context.sync().";Strings.OfficeOM.L_SettingsCannotSave="Ðе удалоÑÑŒ Ñохранить параметры.";Strings.OfficeOM.L_NotImplemented="Ð¤ÑƒÐ½ÐºÑ†Ð¸Ñ {0} не реализована.";Strings.OfficeOM.L_SelectionCannotBound="Ðе удаетÑÑ Ð²Ñ‹Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÑŒ привÑзку к выделенному фрагменту.";Strings.OfficeOM.L_InvalidCoercion="ÐедопуÑтимый тип приведениÑ";Strings.OfficeOM.L_NotSupportedEventType="Указанный тип ÑÐ¾Ð±Ñ‹Ñ‚Ð¸Ñ {0} не поддерживаетÑÑ.";Strings.OfficeOM.L_SSOServerError="Произошла ошибка у поÑтавщика проверки подлинноÑти.";Strings.OfficeOM.L_InternalErrorDescription="Произошла внутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ°.";Strings.OfficeOM.L_ActivityLimitReached="КоличеÑтво дейÑтвий доÑтигло макÑимально допуÑтимого.";Strings.OfficeOM.L_SSOConnectionLostErrorMessage="A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones.";Strings.OfficeOM.L_EventHandlerNotExist="Указанный обработчик Ñобытий не найден Ð´Ð»Ñ Ñтой привÑзки.";Strings.OfficeOM.L_ShowWindowDialogNotification="ÐадÑтройке {0} необходимо открыть новое окно.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Указанный тип Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð¸Ñ Ð½ÐµÑовмеÑтим Ñ Ñтим типом привÑзки.";Strings.OfficeOM.L_InvalidNode="ÐедопуÑтимый узел";Strings.OfficeOM.L_SliceSizeNotSupported="Размер указанного фрагмента не поддерживаетÑÑ.";Strings.OfficeOM.L_InvalidFormatValue="Один или неÑколько параметров формата имеют недопуÑтимые значениÑ. Проверьте параметры и повторите попытку.";Strings.OfficeOM.L_UnsupportedDataObject="Заданный объект данных не поддерживаетÑÑ.";Strings.OfficeOM.L_DataNotMatchBindingType="Указанный объект данных неÑовмеÑтим Ñ Ñ‚Ð¸Ð¿Ð¾Ð¼ привÑзки.";Strings.OfficeOM.L_RedundantCallbackSpecification="Процедуру обратного вызова невозможно указать одновременно в ÑпиÑке аргументов и в необÑзательном объекте.";Strings.OfficeOM.L_PermissionDenied="Отказано в разрешении";Strings.OfficeOM.L_CustomXmlOutOfDateName="Данные уÑтарели";Strings.OfficeOM.L_InvalidApiArgumentsMessage="ÐедопуÑтимые входные аргументы.";Strings.OfficeOM.L_Timeout="ИÑтекло Ð²Ñ€ÐµÐ¼Ñ Ð¾Ð¶Ð¸Ð´Ð°Ð½Ð¸Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ð¸.";Strings.OfficeOM.L_FormatValueOutOfRange="Значение находитÑÑ Ð²Ð½Ðµ допуÑтимого диапазона.";Strings.OfficeOM.L_SpecifiedIdNotExist="Указанный идентификатор не ÑущеÑтвует.";Strings.OfficeOM.L_TooManyArguments="Ñлишком много аргументов";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Примечание: рекомендуемое количеÑтво Ñчеек в таблице — менее 20 000.";Strings.OfficeOM.L_DataWriteReminder="Ðапоминание о запиÑи данных";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Игнорировать";Strings.OfficeOM.L_NewWindowCrossZone='Параметры безопаÑноÑти браузера не позволили Ñоздать диалоговое окно. ИÑпользуйте другой браузер или {0} так, чтобы домен "{1}" и домен, отображаемый в адреÑной Ñтроке браузера, находилиÑÑŒ в одной зоне безопаÑноÑти.';Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory="Эта надÑтройка не поддерживает ÑоглаÑие пользователÑ.";Strings.OfficeOM.L_SettingNameNotExist="Указанное Ð¸Ð¼Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð° не ÑущеÑтвует.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Выбранное Ñодержимое должно быть предÑтавлено в формате таблицы. Отформатируйте данные как таблицу и повторите попытку.";Strings.OfficeOM.L_MemoryLimit="Превышен лимит памÑти";Strings.OfficeOM.L_InvalidReadForBlankRow="Ð£ÐºÐ°Ð·Ð°Ð½Ð½Ð°Ñ Ñтрока пуÑта.";Strings.OfficeOM.L_DialogNavigateError="Ошибка навигации диалогового окна";Strings.OfficeOM.L_PropertyNotLoaded='СвойÑтво "{0}" недоÑтупно. Прежде чем прочеÑÑ‚ÑŒ его значение, вызовите метод загрузки Ð´Ð»Ñ Ñодержащего его объекта и вызовите "context.sync()" Ð´Ð»Ñ ÐºÐ¾Ð½Ñ‚ÐµÐºÑта ÑвÑзанного запроÑа.';Strings.OfficeOM.L_UnsupportedEnumeration="Ðеподдерживаемое перечиÑление";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Примечание: рекомендуемое количеÑтво наборов форматированиÑ, Ñозданных Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ API форматированиÑ, — менее 100.";Strings.OfficeOM.L_ConnectionFailureWithStatus="Сбой запроÑа Ñ ÐºÐ¾Ð´Ð¾Ð¼ ÑоÑтоÑÐ½Ð¸Ñ {0}.";Strings.OfficeOM.L_InvalidResourceUrl="ПредоÑтавлен недопуÑтимый URL-Ð°Ð´Ñ€ÐµÑ Ñ€ÐµÑурÑа приложениÑ.";Strings.OfficeOM.L_APICallFailed="Сбой вызова API";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="ÐžÐ³Ñ€Ð°Ð½Ð¸Ñ‡ÐµÐ½Ð¸Ñ Ð±Ñ€Ð°ÑƒÐ·ÐµÑ€Ð° не позволили Ñоздать диалоговое окно. Домен диалогового окна и домен узла надÑтройки находÑÑ‚ÑÑ Ð² разных зонах безопаÑноÑти.";Strings.OfficeOM.L_NoCapability="У Ð²Ð°Ñ Ð½ÐµÐ´Ð¾Ñтаточно разрешений Ð´Ð»Ñ Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ñтого дейÑтвиÑ.";Strings.OfficeOM.L_SaveSettingsError="Ошибка ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð²";Strings.OfficeOM.L_MissingRequiredArguments="отÑутÑтвуют некоторые обÑзательные аргументы";Strings.OfficeOM.L_BindingNotExist="Ð£ÐºÐ°Ð·Ð°Ð½Ð½Ð°Ñ Ð¿Ñ€Ð¸Ð²Ñзка не ÑущеÑтвует.";Strings.OfficeOM.L_CustomFunctionDefinitionMissing="СвойÑтво Ñ Ñ‚Ð°ÐºÐ¸Ð¼ именем, предÑтавлÑющее определение функции, должно ÑущеÑтвовать Ð´Ð»Ñ Excel.CustomFunctions.";Strings.OfficeOM.L_SSOClientError="Произошла ошибка в запроÑе на проверку подлинноÑти от Office.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Указано недопуÑтимое значение параметра rowCount или columnCount.";Strings.OfficeOM.L_InvalidBindingOperation="ÐедопуÑÑ‚Ð¸Ð¼Ð°Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð¿Ñ€Ð¸Ð²Ñзки";Strings.OfficeOM.L_InvalidDataFormat="Формат указанного объекта данных недопуÑтим.";Strings.OfficeOM.L_HostError="Ошибка узла";Strings.OfficeOM.L_RequestTimeout="Выполнение вызова занÑло Ñлишком много времени.";Strings.OfficeOM.L_RowIndexOutOfRange="Значение индекÑа Ñтроки находитÑÑ Ð²Ð½Ðµ допуÑтимого диапазона. ИÑпользуйте значение (0 или больше), которое меньше чиÑла Ñтрок.";Strings.OfficeOM.L_SettingsStaleError="Ошибка из-за уÑтаревших параметров";Strings.OfficeOM.L_InvalidArgumentGeneric="Ðргументы, передаваемые в функцию, не работают в данной Ñитуации, отÑутÑтвуют или имеют неправильный формат.";Strings.OfficeOM.L_DataNotMatchCoercionType="Тип указанного объекта данных неÑовмеÑтим Ñ Ð²Ñ‹Ð´ÐµÐ»ÐµÐ½Ð½Ñ‹Ð¼ фрагментом.";Strings.OfficeOM.L_InvalidGetColumns="Указанные Ñтолбцы недопуÑтимы.";Strings.OfficeOM.L_UserAborted="Пользователь прервал выполнение запроÑа на ÑоглаÑие.";Strings.OfficeOM.L_DialogAlreadyOpened="Сбой операции, так как у Ñтой надÑтройки активно диалоговое окно.";Strings.OfficeOM.L_InternalError="ВнутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ°";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage="ÐžÐ¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½Ðµ выполнена, поÑкольку Ñта надÑтройка не поддерживает ÑоглаÑие Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð² Ñтой категории";Strings.OfficeOM.L_EventHandlerRemovalFailed="Ðе удалоÑÑŒ удалить обработчик Ñобытий.";Strings.OfficeOM.L_DataNotMatchSelection="ПредоÑтавленный объект данных неÑовмеÑтим Ñ Ñ„Ð¾Ñ€Ð¼Ð¾Ð¹ или измерениÑми текущего выделенного фрагмента.";Strings.OfficeOM.L_ApiNotFoundDetails="Метод или ÑвойÑтво {0} ÑвлÑетÑÑ Ñ‡Ð°Ñтью набора требований {1}, который недоÑтупен в вашей верÑии {2}.";Strings.OfficeOM.L_InvalidParameters="У функции {0} недопуÑтимые параметры.";Strings.OfficeOM.L_NavOutOfBound="ÐžÐ¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐ¸Ð»Ð°ÑÑŒ Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ¾Ð¹, так как Ð¸Ð½Ð´ÐµÐºÑ Ð½Ð°Ñ…Ð¾Ð´Ð¸Ñ‚ÑÑ Ð²Ð½Ðµ допуÑтимого диапазона.";Strings.OfficeOM.L_InvalidBindingError="Ошибка: недопуÑÑ‚Ð¸Ð¼Ð°Ñ Ð¿Ñ€Ð¸Ð²Ñзка";Strings.OfficeOM.L_InvalidGetStartRowColumn="Указано недопуÑтимое значение параметра startRow или startColumn.";Strings.OfficeOM.L_GetDataParametersConflict="Указанные параметры конфликтуют.";Strings.OfficeOM.L_DataNotMatchBindingSize="Заданный объект данных не ÑоответÑтвует размеру выделенного фрагмента.";Strings.OfficeOM.L_ReadSettingsError="Ошибка Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð²";Strings.OfficeOM.L_FormattingReminder="Ðапоминание о форматировании";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Вызовите closeAsync Ð´Ð»Ñ Ñ‚ÐµÐºÑƒÑ‰ÐµÐ³Ð¾ файла перед извлечением другого.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="ДоÑтигнут предел выбора";Strings.OfficeOM.L_RequestTokenUnavailable="API отрегулирован Ð´Ð»Ñ ÑÐ½Ð¸Ð¶ÐµÐ½Ð¸Ñ Ñ‡Ð°Ñтоты вызовов.";Strings.OfficeOM.L_BindingCreationError="Ошибка при Ñоздании привÑзки";Strings.OfficeOM.L_InvalidBinding="ÐедопуÑÑ‚Ð¸Ð¼Ð°Ñ Ð¿Ñ€Ð¸Ð²Ñзка";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod='Вам не удаÑÑ‚ÑÑ Ð¿Ñ€Ð¸Ð¼ÐµÐ½Ð¸Ñ‚ÑŒ изменениÑ, внеÑенные в ÑвойÑтво "{0}", Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ метода object.set.';Strings.OfficeOM.L_SSOServerErrorMessage="Ðа Ñервере произошла Ð½ÐµÐ¿Ñ€ÐµÐ´Ð²Ð¸Ð´ÐµÐ½Ð½Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°.";Strings.OfficeOM.L_InvalidSSOAddinMessage="API удоÑтоверений не поддерживаетÑÑ Ð´Ð»Ñ Ñтой надÑтройки.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty='ВыполнÑетÑÑ Ð½Ð°Ñтройка ÑвойÑтва "{0}", предназначенного только Ð´Ð»Ñ Ñ‡Ñ‚ÐµÐ½Ð¸Ñ.';Strings.OfficeOM.L_InvalidApiCallInContext="ÐедопуÑтимый вызов API в текущем контекÑте.";Strings.OfficeOM.L_InvalidOperationInCellEditMode="Excel находитÑÑ Ð² режиме правки Ñчейки. Выйдите из режима правки, нажав клавишу ВВОД или TAB или выбрав другую Ñчейку, а затем попробуйте еще раз.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Ðе удалоÑÑŒ извлечь файл из-за ошибки Ñети.";Strings.OfficeOM.L_InvalidSetRows="Указанные Ñтроки недопуÑтимы.";Strings.OfficeOM.L_FunctionCallFailed="Ошибка вызова функции {0}, код ошибки: {1}.";Strings.OfficeOM.L_NotSupportedBindingType="Указанный тип привÑзки {0} не поддерживаетÑÑ.";Strings.OfficeOM.L_CoercionTypeNotSupported="Указанный тип Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð¸Ñ Ð½Ðµ поддерживаетÑÑ.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="ПеречиÑление не поддерживаетÑÑ Ð² текущем хоÑÑ‚-приложении.";Strings.OfficeOM.L_DisplayDialogError="Ошибка Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð´Ð¸Ð°Ð»Ð¾Ð³Ð¾Ð²Ð¾Ð³Ð¾ окна";Strings.OfficeOM.L_CustomXmlError="Ошибка наÑтраиваемого XML-документа.";Strings.OfficeOM.L_FileTypeNotSupported="Указанный тип файлов не поддерживаетÑÑ.";Strings.OfficeOM.L_ElementMissing="Ðе удалоÑÑŒ отформатировать Ñчейку таблицы, так как отÑутÑтвуют некоторые Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð². Проверьте параметры и повторите попытку.";Strings.OfficeOM.L_InValidOptionalArgument="недопуÑтимый необÑзательный аргумент";Strings.OfficeOM.L_CallbackNotAFunction='Ðеобходимый тип обратного вызова — "ФункциÑ", но был тип {0}.';Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="ИÑтекло Ð²Ñ€ÐµÐ¼Ñ Ð¾Ð¶Ð¸Ð´Ð°Ð½Ð¸Ñ ÑеанÑа Office Online, или он ÑвлÑетÑÑ Ð½ÐµÐ´Ð¾Ð¿ÑƒÑтимым. Чтобы продолжить, обновите Ñтраницу.";Strings.OfficeOM.L_BadSelectorString="Строка, Ð¿ÐµÑ€ÐµÐ´Ð°Ð²Ð°ÐµÐ¼Ð°Ñ Ð² облаÑÑ‚ÑŒ выделениÑ, неправильно отформатирована или не поддерживаетÑÑ.";Strings.OfficeOM.L_InvalidTableOptionValue="Один или неÑколько параметров таблицы имеют недопуÑтимые значениÑ. Проверьте параметры и повторите попытку.";Strings.OfficeOM.L_CustomFunctionNameCannotSplit="Ð˜Ð¼Ñ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ð¸ должно Ñодержать проÑтранÑтво имени и короткое Ð¸Ð¼Ñ (оба должны быть указаны).";Strings.OfficeOM.L_NonUniformPartialGetNotSupported='ИÑпользование параметров координации Ñ Ñ‚Ð¸Ð¿Ð¾Ð¼ Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð¸Ñ "Таблица" не допуÑкаетÑÑ, еÑли таблица Ñодержит объединенные Ñчейки.';Strings.OfficeOM.L_DataStale="Данные уÑтарели";Strings.OfficeOM.L_SSOClientErrorMessage="Ð’ клиенте произошла Ð½ÐµÐ¿Ñ€ÐµÐ´Ð²Ð¸Ð´ÐµÐ½Ð½Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°.";Strings.OfficeOM.L_APINotSupported="API не поддерживаетÑÑ";Strings.OfficeOM.L_InvalidDataObject="ÐедопуÑтимый объект данных";Strings.OfficeOM.L_TooManyIncompleteRequests="ДождитеÑÑŒ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð¸Ñ Ð¿Ñ€ÐµÐ´Ñ‹Ð´ÑƒÑ‰ÐµÐ³Ð¾ вызова.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="ÐžÐ¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½Ðµ поддерживаетÑÑ Ð´Ð»Ñ Ñтого типа привÑзки.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Данные уÑтарели. Получите объект еще раз.";Strings.OfficeOM.L_CannotNavigateTo="Объект находитÑÑ Ð² раÑположении, где не поддерживаетÑÑ Ð½Ð°Ð²Ð¸Ð³Ð°Ñ†Ð¸Ñ.";Strings.OfficeOM.L_InvalidAPICall="ÐедопуÑтимый вызов API";Strings.OfficeOM.L_OsfControlTypeNotSupported="Тип OsfControl не поддерживаетÑÑ.";Strings.OfficeOM.L_IndexOutOfRange="Ð˜Ð½Ð´ÐµÐºÑ Ð½Ð°Ñ…Ð¾Ð´Ð¸Ñ‚ÑÑ Ð²Ð½Ðµ диапазона.";Strings.OfficeOM.L_DataReadError="Ошибка Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ…";Strings.OfficeOM.L_InvalidGrantMessage="ОтÑутÑтвуют Ñ€Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð¸Ñ Ð´Ð»Ñ Ñтой надÑтройки.";Strings.OfficeOM.L_InvalidFormat="Ошибка недопуÑтимого формата";Strings.OfficeOM.L_SSOConnectionLostError="A connection was lost during the sign in process.";Strings.OfficeOM.L_InvalidOrTimedOutSession="ÐедопуÑтимый ÑÐµÐ°Ð½Ñ Ð¸Ð»Ð¸ иÑтекло Ð²Ñ€ÐµÐ¼Ñ Ð¾Ð¶Ð¸Ð´Ð°Ð½Ð¸Ñ ÑеанÑа";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Выделенный фрагмент неÑовмеÑтим Ñ ÑƒÐºÐ°Ð·Ð°Ð½Ð½Ñ‹Ð¼ типом приведениÑ.";Strings.OfficeOM.L_ColIndexOutOfRange="Значение индекÑа Ñтолбца находитÑÑ Ð²Ð½Ðµ допуÑтимого диапазона. ИÑпользуйте значение (0 или больше), которое меньше чиÑла Ñтолбцов.";Strings.OfficeOM.L_BrowserAPINotSupported="Браузер не поддерживает запрошенный API.";Strings.OfficeOM.L_CannotWriteToSelection="Ðе удаетÑÑ Ð·Ð°Ð¿Ð¸Ñать данные в текущий выделенный фрагмент.";Strings.OfficeOM.L_CannotRegisterEvent="Ðе удаетÑÑ Ð·Ð°Ñ€ÐµÐ³Ð¸Ñтрировать обработчик Ñобытий.";Strings.OfficeOM.L_MissingParameter="ОтÑутÑтвует параметр.";Strings.OfficeOM.L_NamedItemNotFound="Именованный Ñлемент не ÑущеÑтвует.";Strings.OfficeOM.L_BindingToMultipleSelection="Выделение неÑмежных фрагментов не поддерживаетÑÑ.";Strings.OfficeOM.L_OverwriteWorksheetData="Ðе удалоÑÑŒ выполнить операцию заданиÑ, так заданный объект данных перезапишет или перемеÑтит данные.";Strings.OfficeOM.L_InvalidColumnsForBinding="Указанные Ñтолбцы недопуÑтимы.";Strings.OfficeOM.L_InvalidArgument='Ðргумент "{0}" не работает в данной Ñитуации, отÑутÑтвует или имеет неправильный формат.';Strings.OfficeOM.L_InvalidObjectPath='Ð’Ñ‹ не можете выполнить Ñто дейÑтвие Ð´Ð»Ñ Ð¿ÑƒÑ‚Ð¸ к объекту "{0}". ЕÑли вы иÑпользуете объект в неÑкольких вызовах "context.sync" и за пределами поÑледовательного Ð²Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ð¿Ð°ÐºÐµÑ‚Ð° ".run", управлÑйте Ñроком жизни объекта Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ методов "context.trackedObjects.add()" и "context.trackedObjects.remove()".';Strings.OfficeOM.L_SettingsAreStale="Ðе удалоÑÑŒ Ñохранить параметры, так как они уÑтарели.";Strings.OfficeOM.L_OperationNotSupported="Эта Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½Ðµ поддерживаетÑÑ.";Strings.OfficeOM.L_DialogInvalidScheme="Схема URL-адреÑа не поддерживаетÑÑ. ИÑпользуйте протокол HTTPS.";Strings.OfficeOM.L_UserNotSignedIn="Ðикто из пользователей не вошел в Office.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Ðе удалоÑÑŒ выполнить операцию, поÑкольку Ñта надÑтройка уже запрашивает маркер доÑтупа.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Тип удоÑÑ‚Ð¾Ð²ÐµÑ€ÐµÐ½Ð¸Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð½Ðµ поддерживаетÑÑ.";Strings.OfficeOM.L_TooManyOptionalObjects="множеÑтво дополнительных объектов в ÑпиÑке параметров";Strings.OfficeOM.L_InvalidCellsValue="Один или неÑколько параметров Ñчеек имеют недопуÑтимые значениÑ. Проверьте параметры и повторите попытку.";Strings.OfficeOM.L_DialogAddressNotTrusted="Домен URL-адреÑа не включен в Ñлемент AppDomains в манифеÑте.";Strings.OfficeOM.L_CustomFunctionNameContainsBadChars="Ð˜Ð¼Ñ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ð¸ может Ñодержать только буквы, цифры, Ð¿Ð¾Ð´Ñ‡ÐµÑ€ÐºÐ¸Ð²Ð°Ð½Ð¸Ñ Ð¸ точки.";Strings.OfficeOM.L_DialogOK="ОК";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Приложение {0} не ÑущеÑтвует. Microsoft.Office.WebExtension.Initialize(Reason) не вызываетÑÑ.";Strings.OfficeOM.L_TooManyOptionalFunction="множеÑтво дополнительных функций в ÑпиÑке параметров";Strings.OfficeOM.L_CustomXmlNodeNotFound="Указанный узел не найден.";Strings.OfficeOM.L_UnsupportedUserIdentity="Тип удоÑÑ‚Ð¾Ð²ÐµÑ€ÐµÐ½Ð¸Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð½Ðµ поддерживаетÑÑ.";Strings.OfficeOM.L_EventRegistrationError="Ошибка региÑтрации ÑобытиÑ";Strings.OfficeOM.L_InvalidSetStartRowColumn="Указано недопуÑтимое значение параметра startRow или startColumn.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="Из-за XPath можно выбрать не более 1024 Ñлементов.";Strings.OfficeOM.L_NetworkProblem="Ошибка Ñети";Strings.OfficeOM.L_EventHandlerAdditionFailed="Ðе удалоÑÑŒ добавить обработчик Ñобытий.";Strings.OfficeOM.L_AppNameNotExist="Ð˜Ð¼Ñ Ð½Ð°Ð´Ñтройки Ð´Ð»Ñ {0} не ÑущеÑтвует.";Strings.OfficeOM.L_InvalidGetRows="Указанные Ñтроки недопуÑтимы." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/ru-ru/outlook_strings.debug.js b/node_modules/@microsoft/office-js/dist/ru-ru/outlook_strings.debug.js index 9130aba..4ad2d7e 100644 --- a/node_modules/@microsoft/office-js/dist/ru-ru/outlook_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/ru-ru/outlook_strings.debug.js @@ -1,34 +1,35 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("_u"); _u.ExtensibilityStrings = function() { }; _u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings"); -_u.ExtensibilityStrings.l_InvalidDate_Text = "Введенные данные не Ñодержат раÑпознаваемую дату."; +_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Ðе удаетÑÑ Ð´Ð¾Ð±Ð°Ð²Ð¸Ñ‚ÑŒ Ñто вложение к Ñлементу."; _u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Одно или неÑколько указанных отображаемых имен имеют Ñлишком большую длину."; -_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Ðевозможно добавить Ñто вложение из-за Ñлишком большого размера."; -_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "ÐедопуÑтимый путь вложениÑ."; -_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Ошибка вложениÑ"; -_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "Пользователь изменил положение курÑора во Ð²Ñ€ÐµÐ¼Ñ Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ…."; -_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Ðевозможно добавить вложениÑ, так как уже доÑтигнуто их макÑимальное чиÑло Ð´Ð»Ñ ÑообщениÑ."; -_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Ошибка запиÑи данных"; +_u.ExtensibilityStrings.l_InternalProtocolError_Text = 'ВнутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ° протокола: "{0}".'; +_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Вложение Ñ Ñ‚Ð°ÐºÐ¸Ð¼ индекÑом не найдено, поÑтому его невозможно удалить."; +_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Ð—Ð°Ð¿Ñ€Ð¾Ñ Ð¿Ñ€ÐµÐ²Ñ‹Ñил ограничение по размеру в 1 МБ. Измените ваш Ð·Ð°Ð¿Ñ€Ð¾Ñ EWS."; +_u.ExtensibilityStrings.l_InvalidEventDates_Text = "Дата Ð¾ÐºÐ¾Ð½Ñ‡Ð°Ð½Ð¸Ñ Ð¿Ñ€ÐµÐ´ÑˆÐµÑтвует дате начала."; _u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Заданные параметры не ÑоответÑтвуют ожидаемому формату."; -_u.ExtensibilityStrings.l_OffsetNotfound_Text = "Ðе удаетÑÑ Ð½Ð°Ð¹Ñ‚Ð¸ Ñмещение Ð´Ð»Ñ Ð´Ð°Ð½Ð½Ð¾Ð¹ метки времени."; _u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "Выбранный Ñлемент изменен."; +_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "Ðе удалоÑÑŒ выполнить очиÑтку HTML."; _u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Ð”Ð»Ñ Ð´Ð¾Ñтупа к защищенным членам JavaScript API Ð´Ð»Ñ Office требуютÑÑ Ð¿Ð¾Ð²Ñ‹ÑˆÐµÐ½Ð½Ñ‹Ðµ привилегии."; -_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Ðе указаны допуÑтимые получатели."; -_u.ExtensibilityStrings.l_InternalProtocolError_Text = 'ВнутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ° протокола: "{0}".'; -_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Общее чиÑло получателей в поле не может превышать {0}."; -_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Ð—Ð°Ð¿Ñ€Ð¾Ñ Ð¿Ñ€ÐµÐ²Ñ‹Ñил ограничение по размеру в 1 МБ. Измените ваш Ð·Ð°Ð¿Ñ€Ð¾Ñ EWS."; -_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Ðевозможно добавить вложениÑ, пока идет получение полного ответа или переадреÑованного ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ñ Ñервера."; _u.ExtensibilityStrings.l_InvalidEndTime_Text = "Ð’Ñ€ÐµÐ¼Ñ Ð¾ÐºÐ¾Ð½Ñ‡Ð°Ð½Ð¸Ñ Ð½Ðµ может предшеÑтвовать времени начала."; +_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Ðевозможно добавить вложениÑ, пока идет получение полного ответа или переадреÑованного ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ñ Ñервера."; +_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Ошибка запиÑи данных"; +_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Один или неÑколько указанных адреÑов Ñлектронной почты имеют Ñлишком большую длину."; +_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Ðевозможно добавить Ñто вложение из-за Ñлишком большого размера."; +_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Ошибка вложениÑ"; +_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Ðе удаетÑÑ ÑƒÐ´Ð°Ð»Ð¸Ñ‚ÑŒ вложение из Ñлемента."; +_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Общее чиÑло получателей в поле не может превышать {0}."; +_u.ExtensibilityStrings.l_InvalidDate_Text = "Введенные данные не Ñодержат раÑпознаваемую дату."; +_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = 'Ð”Ð»Ñ Ð²Ñ‹Ð·Ð¾Ð²Ð° метода "{0}" требуютÑÑ Ð¿Ð¾Ð²Ñ‹ÑˆÐµÐ½Ð½Ñ‹Ðµ привилегии.'; _u.ExtensibilityStrings.l_InternalFormatError_Text = "Произошла внутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ° форматированиÑ."; +_u.ExtensibilityStrings.l_OffsetNotfound_Text = "Ðе удаетÑÑ Ð½Ð°Ð¹Ñ‚Ð¸ Ñмещение Ð´Ð»Ñ Ð´Ð°Ð½Ð½Ð¾Ð¹ метки времени."; +_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Ðе указаны допуÑтимые получатели."; _u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "Пользователь удалил вложение до того, как оно было добавлено."; -_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Ðе удаетÑÑ ÑƒÐ´Ð°Ð»Ð¸Ñ‚ÑŒ вложение из Ñлемента."; -_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Один или неÑколько указанных адреÑов Ñлектронной почты имеют Ñлишком большую длину."; -_u.ExtensibilityStrings.l_InvalidEventDates_Text = "Дата Ð¾ÐºÐ¾Ð½Ñ‡Ð°Ð½Ð¸Ñ Ð¿Ñ€ÐµÐ´ÑˆÐµÑтвует дате начала."; -_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Ðе удаетÑÑ Ð´Ð¾Ð±Ð°Ð²Ð¸Ñ‚ÑŒ Ñто вложение к Ñлементу."; +_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "Пользователь изменил положение курÑора во Ð²Ñ€ÐµÐ¼Ñ Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ…."; +_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "ÐедопуÑтимый путь вложениÑ."; _u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "ÐедопуÑтимый идентификатор вложениÑ."; -_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "Ðе удалоÑÑŒ выполнить очиÑтку HTML."; -_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Вложение Ñ Ñ‚Ð°ÐºÐ¸Ð¼ индекÑом не найдено, поÑтому его невозможно удалить."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = 'Ð”Ð»Ñ Ð²Ñ‹Ð·Ð¾Ð²Ð° метода "{0}" требуютÑÑ Ð¿Ð¾Ð²Ñ‹ÑˆÐµÐ½Ð½Ñ‹Ðµ привилегии.' +_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Ðевозможно добавить вложениÑ, так как уже доÑтигнуто их макÑимальное чиÑло Ð´Ð»Ñ ÑообщениÑ." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/ru-ru/outlook_strings.js b/node_modules/@microsoft/office-js/dist/ru-ru/outlook_strings.js index 6f70efa..37869c0 100644 --- a/node_modules/@microsoft/office-js/dist/ru-ru/outlook_strings.js +++ b/node_modules/@microsoft/office-js/dist/ru-ru/outlook_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_InvalidDate_Text="Введенные данные не Ñодержат раÑпознаваемую дату.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Одно или неÑколько указанных отображаемых имен имеют Ñлишком большую длину.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Ðевозможно добавить Ñто вложение из-за Ñлишком большого размера.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="ÐедопуÑтимый путь вложениÑ.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Ошибка вложениÑ";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="Пользователь изменил положение курÑора во Ð²Ñ€ÐµÐ¼Ñ Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ….";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Ðевозможно добавить вложениÑ, так как уже доÑтигнуто их макÑимальное чиÑло Ð´Ð»Ñ ÑообщениÑ.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Ошибка запиÑи данных";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Заданные параметры не ÑоответÑтвуют ожидаемому формату.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Ðе удаетÑÑ Ð½Ð°Ð¹Ñ‚Ð¸ Ñмещение Ð´Ð»Ñ Ð´Ð°Ð½Ð½Ð¾Ð¹ метки времени.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Выбранный Ñлемент изменен.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Ð”Ð»Ñ Ð´Ð¾Ñтупа к защищенным членам JavaScript API Ð´Ð»Ñ Office требуютÑÑ Ð¿Ð¾Ð²Ñ‹ÑˆÐµÐ½Ð½Ñ‹Ðµ привилегии.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Ðе указаны допуÑтимые получатели.";_u.ExtensibilityStrings.l_InternalProtocolError_Text='ВнутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ° протокола: "{0}".';_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Общее чиÑло получателей в поле не может превышать {0}.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Ð—Ð°Ð¿Ñ€Ð¾Ñ Ð¿Ñ€ÐµÐ²Ñ‹Ñил ограничение по размеру в 1 МБ. Измените ваш Ð·Ð°Ð¿Ñ€Ð¾Ñ EWS.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Ðевозможно добавить вложениÑ, пока идет получение полного ответа или переадреÑованного ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ñ Ñервера.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="Ð’Ñ€ÐµÐ¼Ñ Ð¾ÐºÐ¾Ð½Ñ‡Ð°Ð½Ð¸Ñ Ð½Ðµ может предшеÑтвовать времени начала.";_u.ExtensibilityStrings.l_InternalFormatError_Text="Произошла внутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ° форматированиÑ.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="Пользователь удалил вложение до того, как оно было добавлено.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Ðе удаетÑÑ ÑƒÐ´Ð°Ð»Ð¸Ñ‚ÑŒ вложение из Ñлемента.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Один или неÑколько указанных адреÑов Ñлектронной почты имеют Ñлишком большую длину.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="Дата Ð¾ÐºÐ¾Ð½Ñ‡Ð°Ð½Ð¸Ñ Ð¿Ñ€ÐµÐ´ÑˆÐµÑтвует дате начала.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Ðе удаетÑÑ Ð´Ð¾Ð±Ð°Ð²Ð¸Ñ‚ÑŒ Ñто вложение к Ñлементу.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="ÐедопуÑтимый идентификатор вложениÑ.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="Ðе удалоÑÑŒ выполнить очиÑтку HTML.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Вложение Ñ Ñ‚Ð°ÐºÐ¸Ð¼ индекÑом не найдено, поÑтому его невозможно удалить.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text='Ð”Ð»Ñ Ð²Ñ‹Ð·Ð¾Ð²Ð° метода "{0}" требуютÑÑ Ð¿Ð¾Ð²Ñ‹ÑˆÐµÐ½Ð½Ñ‹Ðµ привилегии.' \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Ðе удаетÑÑ Ð´Ð¾Ð±Ð°Ð²Ð¸Ñ‚ÑŒ Ñто вложение к Ñлементу.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Одно или неÑколько указанных отображаемых имен имеют Ñлишком большую длину.";_u.ExtensibilityStrings.l_InternalProtocolError_Text='ВнутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ° протокола: "{0}".';_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Вложение Ñ Ñ‚Ð°ÐºÐ¸Ð¼ индекÑом не найдено, поÑтому его невозможно удалить.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Ð—Ð°Ð¿Ñ€Ð¾Ñ Ð¿Ñ€ÐµÐ²Ñ‹Ñил ограничение по размеру в 1 МБ. Измените ваш Ð·Ð°Ð¿Ñ€Ð¾Ñ EWS.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="Дата Ð¾ÐºÐ¾Ð½Ñ‡Ð°Ð½Ð¸Ñ Ð¿Ñ€ÐµÐ´ÑˆÐµÑтвует дате начала.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Заданные параметры не ÑоответÑтвуют ожидаемому формату.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Выбранный Ñлемент изменен.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="Ðе удалоÑÑŒ выполнить очиÑтку HTML.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Ð”Ð»Ñ Ð´Ð¾Ñтупа к защищенным членам JavaScript API Ð´Ð»Ñ Office требуютÑÑ Ð¿Ð¾Ð²Ñ‹ÑˆÐµÐ½Ð½Ñ‹Ðµ привилегии.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="Ð’Ñ€ÐµÐ¼Ñ Ð¾ÐºÐ¾Ð½Ñ‡Ð°Ð½Ð¸Ñ Ð½Ðµ может предшеÑтвовать времени начала.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Ðевозможно добавить вложениÑ, пока идет получение полного ответа или переадреÑованного ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ñ Ñервера.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Ошибка запиÑи данных";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Один или неÑколько указанных адреÑов Ñлектронной почты имеют Ñлишком большую длину.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Ðевозможно добавить Ñто вложение из-за Ñлишком большого размера.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Ошибка вложениÑ";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Ðе удаетÑÑ ÑƒÐ´Ð°Ð»Ð¸Ñ‚ÑŒ вложение из Ñлемента.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Общее чиÑло получателей в поле не может превышать {0}.";_u.ExtensibilityStrings.l_InvalidDate_Text="Введенные данные не Ñодержат раÑпознаваемую дату.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text='Ð”Ð»Ñ Ð²Ñ‹Ð·Ð¾Ð²Ð° метода "{0}" требуютÑÑ Ð¿Ð¾Ð²Ñ‹ÑˆÐµÐ½Ð½Ñ‹Ðµ привилегии.';_u.ExtensibilityStrings.l_InternalFormatError_Text="Произошла внутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ° форматированиÑ.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Ðе удаетÑÑ Ð½Ð°Ð¹Ñ‚Ð¸ Ñмещение Ð´Ð»Ñ Ð´Ð°Ð½Ð½Ð¾Ð¹ метки времени.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Ðе указаны допуÑтимые получатели.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="Пользователь удалил вложение до того, как оно было добавлено.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="Пользователь изменил положение курÑора во Ð²Ñ€ÐµÐ¼Ñ Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ….";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="ÐедопуÑтимый путь вложениÑ.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="ÐедопуÑтимый идентификатор вложениÑ.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Ðевозможно добавить вложениÑ, так как уже доÑтигнуто их макÑимальное чиÑло Ð´Ð»Ñ ÑообщениÑ." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/sk-sk/office_strings.debug.js b/node_modules/@microsoft/office-js/dist/sk-sk/office_strings.debug.js index c4af0fa..83cf70a 100644 --- a/node_modules/@microsoft/office-js/dist/sk-sk/office_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/sk-sk/office_strings.debug.js @@ -1,179 +1,190 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("Strings"); Strings.OfficeOM = function() { }; Strings.OfficeOM.registerClass("Strings.OfficeOM"); -Strings.OfficeOM.L_CoercionTypeNotSupported = "Zadaný typ koercie nie je podporovaný."; -Strings.OfficeOM.L_SetDataIsTooLarge = "Zadaný dátový objekt je príliÅ¡ veľký."; -Strings.OfficeOM.L_SSOClientError = "V žiadosti o overenie z balíka Office sa vyskytla chyba."; -Strings.OfficeOM.L_InvalidCellsValue = "Minimálne jeden parameter bunky má hodnotu, ktorá nie je povolená. EÅ¡te raz skontrolujte hodnoty a skúste to znova."; -Strings.OfficeOM.L_DataNotMatchCoercionType = "Typ zadaného dátového objektu nie je kompatibilný s aktuálnym výberom."; +Strings.OfficeOM.L_NotSupported = "Funkcia {0} nie je podporovaná."; +Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} chce zobraziÅ¥ nové okno."; +Strings.OfficeOM.L_ActivityLimitReached = "Dosiahol sa limit aktivít."; +Strings.OfficeOM.L_RequestTimeout = "Volanie sa vykonáva príliÅ¡ dlho."; +Strings.OfficeOM.L_ApiNotFoundDetails = "Metóda alebo vlastnosÅ¥ {0} je súÄasÅ¥ou množiny požiadaviek rozhrania {1}, ktoré nie je k dispozícii vo vaÅ¡ej verzii aplikácie {2}."; +Strings.OfficeOM.L_SaveSettingsError = "Chyba nastavení ukladania"; +Strings.OfficeOM.L_DialogOK = "OK"; +Strings.OfficeOM.L_InvalidNode = "Neplatný uzol"; Strings.OfficeOM.L_InvalidArgumentGeneric = "Argumenty odovzdané funkcii nefungujú v tejto situácii, chýbajú alebo nie sú v správnom formáte."; -Strings.OfficeOM.L_PropertyDoesNotExist = "VlastnosÅ¥ {0} sa v objekte nenachádza."; -Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Zadané hodnoty poÄtu riadkov alebo poÄtu stĺpcov nie sú platné."; -Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "nakonfigurujte prehliadaÄ"; -Strings.OfficeOM.L_FormattingReminder = "Pripomenutie formátovania"; -Strings.OfficeOM.L_SettingNameNotExist = "Zadaný názov nastavenia neexistuje."; Strings.OfficeOM.L_InvalidBindingOperation = "Neplatná operácia väzby"; -Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Parametre súradnice nie je možné použiÅ¥ s typom koercie Tabuľka, keÄ tabuľka obsahuje zlúÄené bunky."; -Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Aktuálny výber nie je kompatibilný so zadaným typom koercie."; -Strings.OfficeOM.L_MultipleNamedItemFound = "NaÅ¡lo sa viacero objektov s rovnakým názvom."; -Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Získaniu súboru zabránil problém so sieÅ¥ou."; -Strings.OfficeOM.L_UnknownBindingType = "Tento typ väzby nie je podporovaný."; -Strings.OfficeOM.L_InternalError = "Vnútorná chyba"; -Strings.OfficeOM.L_RedundantCallbackSpecification = "Spätné volanie nie je možné urÄiÅ¥ ani v zozname argumentov ani vo voliteľnom objekte."; -Strings.OfficeOM.L_SetDataParametersConflict = "Uvedené parametre sú v konflikte."; -Strings.OfficeOM.L_InvalidSetColumns = "Uvedené stĺpce sú neplatné."; -Strings.OfficeOM.L_InvalidBindingError = "Chyba neplatnej väzby"; -Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Operácia nie je v tomto type väzby podporovaná."; -Strings.OfficeOM.L_InvalidAPICall = "Neplatné volanie API"; -Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Poznámka: V tabuľke sa odporúÄa maÅ¥ menej ako 20 000 buniek."; -Strings.OfficeOM.L_NamedItemNotFound = "Pomenovaná položka neexistuje."; +Strings.OfficeOM.L_CannotWriteToSelection = "Do aktuálneho výberu nie je možné vykonaÅ¥ zápis."; +Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "nakonfigurujte prehliadaÄ"; +Strings.OfficeOM.L_CoercionTypeNotSupported = "Zadaný typ koercie nie je podporovaný."; +Strings.OfficeOM.L_DialogAddressNotTrusted = "Doména URL adresy nie je zahrnutá v elemente AppDomains v manifeste."; +Strings.OfficeOM.L_ConnectionFailureWithDetails = "Požiadavka zlyhala s kódom stavu {0}, kódom chyby {1} a nasledujúcim chybovým hlásením: {2}"; Strings.OfficeOM.L_DisplayDialogError = "Chyba zobrazenia dialógového okna"; -Strings.OfficeOM.L_InvalidNode = "Neplatný uzol"; -Strings.OfficeOM.L_APINotSupported = "API nie je podporované"; -Strings.OfficeOM.L_InvalidReadForBlankRow = "Zadaný riadok je prázdny."; -Strings.OfficeOM.L_RequestTimeout = "Volanie sa vykonáva príliÅ¡ dlho."; -Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} chce zobraziÅ¥ nové okno."; -Strings.OfficeOM.L_TooManyIncompleteRequests = "PoÄkajte, kým sa dokonÄí predchádzajúce volanie."; -Strings.OfficeOM.L_InvalidGrantMessage = "Chýba povolenie tohto doplnku."; -Strings.OfficeOM.L_NoCapability = "Nemáte dostatoÄné povolenia na vykonanie tejto akcie."; -Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "PovoliÅ¥"; -Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Zdieľaný obsah musí byÅ¥ vo formáte tabuľky. Údaje naformátujte ako tabuľku a skúste to znova."; -Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Typ identity používateľa nie je podporovaný."; -Strings.OfficeOM.L_InvalidRequestContext = "Objekt sa nedá použiÅ¥ v kontextoch rôznych žiadostí."; -Strings.OfficeOM.L_InvalidSelectionForBindingType = "Nie je možné vytvoriÅ¥ väzbu s aktuálnym výberom a so zadaným typom väzby."; -Strings.OfficeOM.L_InvalidTableOptionValue = "Minimálne jeden parameter tableOptions má hodnotu, ktorá nie je povolená. EÅ¡te raz skontrolujte hodnoty a skúste to znova."; -Strings.OfficeOM.L_InternalErrorDescription = "Vyskytla sa interná chyba."; +Strings.OfficeOM.L_Timeout = "ÄŒasový limit operácie uplynul."; +Strings.OfficeOM.L_ColIndexOutOfRange = "Hodnota indexu stĺpca je mimo povoleného rozsahu. Použite hodnotu (0 alebo vyÅ¡Å¡iu), ktorá je menÅ¡ia ako poÄet stĺpcov."; +Strings.OfficeOM.L_CannotNavigateTo = "Objekt sa nachádza na mieste, kde nie je podporovaná navigácia."; Strings.OfficeOM.L_MemoryLimit = "PrekroÄil sa limit pamäte"; -Strings.OfficeOM.L_MissingParameter = "Chýbajúci parameter"; -Strings.OfficeOM.L_InvalidArgument = "Argument {0} pre túto situáciu nefunguje, chýba alebo nemá správny formát."; -Strings.OfficeOM.L_IndexOutOfRange = "Index mimo rozsahu."; -Strings.OfficeOM.L_InvalidFormatValue = "Minimálne jeden parameter formátu má hodnotu, ktorá nie je povolená. EÅ¡te raz skontrolujte hodnoty a skúste to znova."; -Strings.OfficeOM.L_GetSelectionNotSupported = "Aktuálny výber nie je podporovaný."; -Strings.OfficeOM.L_SSOClientErrorMessage = "V klientovi sa vyskytla neoÄakávaná chyba."; Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Parametre súradnice nie je možné použiÅ¥ s typom koercie Tabuľka, keÄ tabuľka obsahuje zlúÄené bunky."; -Strings.OfficeOM.L_DataWriteError = "Chyba pri zápise údajov"; -Strings.OfficeOM.L_OsfControlTypeNotSupported = "Typ OsfControl nie je podporovaný."; -Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Ignorovanie"; -Strings.OfficeOM.L_ValueNotLoaded = "Hodnota výsledného objektu zatiaľ nebola naÄítaná. Pred Äítaním vlastnosti hodnoty zavolajte príkaz context.sync() pre daný kontext požiadavky."; -Strings.OfficeOM.L_InvalidFormat = "Chyba neplatného formátu"; -Strings.OfficeOM.L_DataWriteReminder = "Pripomenutie zapisovania údajov"; -Strings.OfficeOM.L_InvalidGetRows = "Uvedené riadky sú neplatné."; +Strings.OfficeOM.L_SettingNameNotExist = "Zadaný názov nastavenia neexistuje."; +Strings.OfficeOM.L_DocumentReadOnly = "Požadovaná operácia nie je v aktuálnom režime dokumentu povolená."; +Strings.OfficeOM.L_MultipleNamedItemFound = "NaÅ¡lo sa viacero objektov s rovnakým názvom."; +Strings.OfficeOM.L_UnsupportedEnumerationMessage = "Aktuálna hostiteľská aplikácia nepodporuje enumeráciu."; +Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Dosiahol sa limit výberu"; Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Doplnok si už vyžaduje prístupový token."; -Strings.OfficeOM.L_DataNotMatchBindingType = "Zadaný dátový objekt nie je kompatibilný s typom väzby."; -Strings.OfficeOM.L_FormatValueOutOfRange = "Hodnota je mimo povoleného rozsahu."; -Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "Prebieha pokus o nastavenie vlastnosti {0} urÄenej iba na Äítanie."; -Strings.OfficeOM.L_UserAborted = "Používateľ preruÅ¡il žiadosÅ¥ o súhlas."; -Strings.OfficeOM.L_InvalidResourceUrlMessage = "V manifeste bola zadaná neplatná URL adresa zdroja."; -Strings.OfficeOM.L_SliceSizeNotSupported = "Zadaná veľkosÅ¥ výseku nie je podporovaná."; -Strings.OfficeOM.L_ConnectionFailureWithDetails = "Požiadavka zlyhala s kódom stavu {0}, kódom chyby {1} a nasledujúcim chybovým hlásením: {2}"; -Strings.OfficeOM.L_InvalidSetStartRowColumn = "Zadané hodnoty zaÄiatoÄného riadka alebo zaÄiatoÄného stĺpca nie sú platné."; -Strings.OfficeOM.L_InvalidParameters = "Funkcia {0} má neplatné parametre."; -Strings.OfficeOM.L_EventRegistrationError = "Chyba pri registrácii udalosti"; -Strings.OfficeOM.L_ConnectionFailureWithStatus = "Požiadavka zlyhala s kódom stavu {0}."; -Strings.OfficeOM.L_HostError = "Chyba hostiteľa"; -Strings.OfficeOM.L_AppNameNotExist = "Názov doplnku pre {0} neexistuje."; -Strings.OfficeOM.L_InvalidResourceUrl = "Bola zadaná neplatná URL adresa zdroja aplikácie."; -Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = "Zmeny vlastnosti {0} nemožno použiÅ¥ prostredníctvom metódy object.set."; -Strings.OfficeOM.L_RequestTokenUnavailable = "Toto API bolo obmedzené, aby sa spomalila rýchlosÅ¥ volania."; -Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "PlatnosÅ¥ relácie služby Office Online uplynula alebo je relácia neplatná. Ak chcete pokraÄovaÅ¥, obnovte stránku."; +Strings.OfficeOM.L_InValidOptionalArgument = "neplatný voliteľný argument"; +Strings.OfficeOM.L_UnknownBindingType = "Tento typ väzby nie je podporovaný."; +Strings.OfficeOM.L_ShuttingDown = "Operácia zlyhala, pretože údaje na serveri nie sú aktuálne."; +Strings.OfficeOM.L_SetDataIsTooLarge = "Zadaný dátový objekt je príliÅ¡ veľký."; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage = "Operácia zlyhala, pretože tento doplnok nepodporuje súhlas používateľa v tejto kategórii"; +Strings.OfficeOM.L_CannotRegisterEvent = "Obsluha udalostí sa nedá zaregistrovaÅ¥."; +Strings.OfficeOM.L_DataWriteReminder = "Pripomenutie zapisovania údajov"; +Strings.OfficeOM.L_ValueNotLoaded = "Hodnota výsledného objektu zatiaľ nebola naÄítaná. Pred Äítaním vlastnosti hodnoty zavolajte príkaz context.sync() pre daný kontext požiadavky."; Strings.OfficeOM.L_EventHandlerAdditionFailed = "Obsluhu udalostí sa nepodarilo pridaÅ¥."; +Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Údaje sú neaktuálne. NaÄítaÅ¥ objekt znova."; +Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Vykonajte výber."; +Strings.OfficeOM.L_DataNotMatchCoercionType = "Typ zadaného dátového objektu nie je kompatibilný s aktuálnym výberom."; +Strings.OfficeOM.L_InvalidValue = "Neplatná hodnota"; +Strings.OfficeOM.L_ElementMissing = "Nepodarilo sa nám naformátovaÅ¥ bunku tabuľky, pretože niektoré hodnoty parametra chýbajú. EÅ¡te raz skontrolujte parametre a skúste to znova."; +Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Zadaný typ koercie nie je kompatibilný s týmto typom väzby."; +Strings.OfficeOM.L_CustomFunctionDefinitionMissing = "V Excel.CustomFunctions musí existovaÅ¥ vlastnosÅ¥ s týmto názvom, ktorá predstavuje definíciu funkcie."; +Strings.OfficeOM.L_UnsupportedUserIdentity = "Typ identity používateľa nie je podporovaný."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Operácia zlyhala, pretože tento doplnok si už vyžaduje prístupový token."; +Strings.OfficeOM.L_BindingCreationError = "Chyba pri vytváraní väzby"; +Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Poznámka: V tabuľke sa odporúÄa maÅ¥ menej ako 20 000 buniek."; +Strings.OfficeOM.L_InvalidSetStartRowColumn = "Zadané hodnoty zaÄiatoÄného riadka alebo zaÄiatoÄného stĺpca nie sú platné."; +Strings.OfficeOM.L_InvalidFormat = "Chyba neplatného formátu"; Strings.OfficeOM.L_NotImplemented = "Funkcia {0} nie je implementovaná."; -Strings.OfficeOM.L_Timeout = "ÄŒasový limit operácie uplynul."; +Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "PovoliÅ¥"; +Strings.OfficeOM.L_DataStale = "Neaktuálne údaje"; Strings.OfficeOM.L_UserAbortedMessage = "Používateľ nevyjadril súhlas s povoleniami doplnku."; -Strings.OfficeOM.L_UserClickIgnore = "Používateľ sa rozhodol ignorovaÅ¥ toto dialógové okno."; -Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath obmedzuje výber 1024 položiek."; -Strings.OfficeOM.L_OutOfRange = "Mimo rozsahu"; -Strings.OfficeOM.L_UnsupportedUserIdentity = "Typ identity používateľa nie je podporovaný."; -Strings.OfficeOM.L_CustomXmlOutOfDateName = "Neaktuálne údaje"; +Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Parametre súradnice nie je možné použiÅ¥ s typom koercie Tabuľka, keÄ tabuľka obsahuje zlúÄené bunky."; +Strings.OfficeOM.L_NamedItemNotFound = "Pomenovaná položka neexistuje."; +Strings.OfficeOM.L_InvalidSetColumns = "Uvedené stĺpce sú neplatné."; Strings.OfficeOM.L_InvalidGrant = "Chýba predbežná autorizácia."; -Strings.OfficeOM.L_BindingNotExist = "Zadaná väzba neexistuje."; -Strings.OfficeOM.L_UnsupportedDataObject = "Poskytnutý typ dátového objektu nie je podporovaný."; -Strings.OfficeOM.L_SettingsAreStale = "Nastavenia sa nepodarilo uložiÅ¥, pretože nie sú aktuálne."; -Strings.OfficeOM.L_ShuttingDown = "Operácia zlyhala, pretože údaje na serveri nie sú aktuálne."; -Strings.OfficeOM.L_EventHandlerRemovalFailed = "Obsluhu udalostí sa nepodarilo odstrániÅ¥."; -Strings.OfficeOM.L_InvalidOrTimedOutSession = "Neplatná relácia alebo relácia s uplynutým Äasovým limitom"; -Strings.OfficeOM.L_DialogAlreadyOpened = "Operácia zlyhala, pretože tento doplnok už má aktívne dialógové okno."; +Strings.OfficeOM.L_TooManyOptionalObjects = "viacero voliteľných objektov v zozname parametrov"; +Strings.OfficeOM.L_PermissionDenied = "Povolenie odmietnuté"; Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Neplatné vstupné argumenty."; -Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Obmedzenia prehliadaÄa nám zabránili vo vytvorení dialógového okna. Doména dialógového okna a doména hostiteľa doplnku nie sú v rovnakej zóne zabezpeÄenia."; -Strings.OfficeOM.L_DataNotMatchSelection = "Poskytnutý dátový objekt nie je kompatibilný s tvarom alebo rozmermi aktuálneho výberu."; -Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Poznámka: OdporúÄa sa maÅ¥ menej ako 100 súprav formátovania nastavených volaním formátovania rozhrania API."; -Strings.OfficeOM.L_SelectionCannotBound = "S aktuálnym výberom nie je možné vytvoriÅ¥ väzbu."; Strings.OfficeOM.L_CustomXmlError = "Vlastná chyba XML."; -Strings.OfficeOM.L_GetDataParametersConflict = "Uvedené parametre sú v konflikte."; -Strings.OfficeOM.L_InvalidObjectPath = "Cesta k objektu {0} nefunguje pre to, Äo sa snažíte urobiÅ¥. Ak používate objekt v rámci viacerých volaní funkcie context.sync a mimo sekvenÄného spúšťania dávky .run, na spravovanie životnosti objektu použite metódy context.trackedObjects.add() a context.trackedObjects.remove()."; -Strings.OfficeOM.L_EventHandlerNotExist = "Zadaná obsluha udalostí sa pre túto väzbu nenaÅ¡la."; -Strings.OfficeOM.L_InitializeNotReady = "Office.js sa eÅ¡te úplne nenaÄítal. Skúste to znovu neskôr alebo pridajte funkcii Office.initialize svoj inicializaÄný kód."; Strings.OfficeOM.L_SettingsCannotSave = "Nastavenia sa nepodarilo uložiÅ¥."; -Strings.OfficeOM.L_SpecifiedIdNotExist = "Zadaná identifikácia neexistuje."; -Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Zadaný typ väzby nie je kompatibilný so zadanou pomenovanou položkou."; -Strings.OfficeOM.L_ElementMissing = "Nepodarilo sa nám naformátovaÅ¥ bunku tabuľky, pretože niektoré hodnoty parametra chýbajú. EÅ¡te raz skontrolujte parametre a skúste to znova."; -Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Dosiahol sa limit výberu"; -Strings.OfficeOM.L_DataNotMatchBindingSize = "Poskytnutý dátový objekt nezodpovedá veľkosti aktuálneho výberu."; -Strings.OfficeOM.L_InvalidValue = "Neplatná hodnota"; -Strings.OfficeOM.L_NetworkProblem = "Problém so sieÅ¥ou"; -Strings.OfficeOM.L_OperationNotSupported = "Operácia nie je podporovaná."; -Strings.OfficeOM.L_NotSupported = "Funkcia {0} nie je podporovaná."; -Strings.OfficeOM.L_BadSelectorString = "ReÅ¥azec odovzdaný do selektora je nesprávne naformátovaný alebo nie je podporovaný."; -Strings.OfficeOM.L_UnsupportedEnumerationMessage = "Aktuálna hostiteľská aplikácia nepodporuje enumeráciu."; -Strings.OfficeOM.L_SettingsStaleError = "Chyba zastaraných nastavení"; -Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Vykonajte výber."; -Strings.OfficeOM.L_InvalidGetColumns = "Uvedené stĺpce sú neplatné."; +Strings.OfficeOM.L_UserClickIgnore = "Používateľ sa rozhodol ignorovaÅ¥ toto dialógové okno."; Strings.OfficeOM.L_FileTypeNotSupported = "Zadaný typ súboru nie je podporovaný."; -Strings.OfficeOM.L_TooManyOptionalFunction = "viacero voliteľných funkcií v zozname parametrov"; -Strings.OfficeOM.L_CustomXmlNodeNotFound = "Zadaný uzol sa nenaÅ¡iel."; -Strings.OfficeOM.L_InValidOptionalArgument = "neplatný voliteľný argument"; +Strings.OfficeOM.L_UnsupportedEnumeration = "Nepodporovaná enumerácia"; +Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Operácia nie je v tomto type väzby podporovaná."; +Strings.OfficeOM.L_InvalidOrTimedOutSession = "Neplatná relácia alebo relácia s uplynutým Äasovým limitom"; Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Aplikácia {0} neexistuje. Nevolá sa Microsoft.Office.WebExtension.initialize(reason)."; -Strings.OfficeOM.L_DocumentReadOnly = "Požadovaná operácia nie je v aktuálnom režime dokumentu povolená."; -Strings.OfficeOM.L_InvalidApiCallInContext = "V aktuálnom kontexte je volanie API neplatné."; -Strings.OfficeOM.L_ActivityLimitReached = "Dosiahol sa limit aktivít."; -Strings.OfficeOM.L_ColIndexOutOfRange = "Hodnota indexu stĺpca je mimo povoleného rozsahu. Použite hodnotu (0 alebo vyÅ¡Å¡iu), ktorá je menÅ¡ia ako poÄet stĺpcov."; -Strings.OfficeOM.L_InvalidDataObject = "Neplatný dátový objekt"; -Strings.OfficeOM.L_InvalidSetRows = "Uvedené riadky sú neplatné."; -Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Pred získaním ÄalÅ¡ieho súboru zavolajte closeAsync v aktuálnom súbore."; -Strings.OfficeOM.L_MissingRequiredArguments = "chýba niekoľko požadovaných argumentov"; -Strings.OfficeOM.L_CannotWriteToSelection = "Do aktuálneho výberu nie je možné vykonaÅ¥ zápis."; -Strings.OfficeOM.L_CannotNavigateTo = "Objekt sa nachádza na mieste, kde nie je podporovaná navigácia."; -Strings.OfficeOM.L_SSOServerErrorMessage = "Na serveri sa vyskytla neoÄakávaná chyba."; -Strings.OfficeOM.L_DataStale = "Neaktuálne údaje"; -Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Zadaný typ koercie nie je kompatibilný s týmto typom väzby."; -Strings.OfficeOM.L_InvalidDataFormat = "Formát zadaného dátového objektu nie je platný."; +Strings.OfficeOM.L_InvalidTableOptionValue = "Minimálne jeden parameter tableOptions má hodnotu, ktorá nie je povolená. EÅ¡te raz skontrolujte hodnoty a skúste to znova."; +Strings.OfficeOM.L_BindingNotExist = "Zadaná väzba neexistuje."; +Strings.OfficeOM.L_SSOConnectionLostErrorMessage = "A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones."; +Strings.OfficeOM.L_APINotSupported = "API nie je podporované"; +Strings.OfficeOM.L_RunMustReturnPromise = "Dávková funkcia presunutá do metódy .run nevrátila sľub. Funkcia musí vrátiÅ¥ sľub, aby bolo možné po dokonÄení operácie dávky uvoľniÅ¥ vÅ¡etky automaticky sledované objekty. Sľub zvyÄajne vrátite vrátením odpovede z funkcie context.sync()."; +Strings.OfficeOM.L_InitializeNotReady = "Office.js sa eÅ¡te úplne nenaÄítal. Skúste to znovu neskôr alebo pridajte funkcii Office.initialize svoj inicializaÄný kód."; Strings.OfficeOM.L_InvalidBinding = "Neplatná väzba"; +Strings.OfficeOM.L_NewWindowCrossZone = "Nastavenia zabezpeÄenia vo vaÅ¡om prehliadaÄi nám bránia vo vytvorení dialógového okna. Skúste iný prehliadaÄ alebo {0} tak, aby doména {1} a doména zobrazená na paneli s adresou boli v rovnakej zóne zabezpeÄenia."; +Strings.OfficeOM.L_DataNotMatchSelection = "Poskytnutý dátový objekt nie je kompatibilný s tvarom alebo rozmermi aktuálneho výberu."; +Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Zadané hodnoty poÄtu riadkov alebo poÄtu stĺpcov nie sú platné."; +Strings.OfficeOM.L_InternalErrorDescription = "Vyskytla sa interná chyba."; +Strings.OfficeOM.L_SSOClientError = "V žiadosti o overenie z balíka Office sa vyskytla chyba."; Strings.OfficeOM.L_PropertyNotLoaded = "VlastnosÅ¥ {0} nie je dostupná. Pred Äítaním hodnoty vlastnosti zavolajte metódu naÄítania na objekt, ktorý je súÄasÅ¥ou, a zavolajte funkciu context.sync() v kontexte priradenej žiadosti."; -Strings.OfficeOM.L_OverwriteWorksheetData = "Operácia nastavenia zlyhala, pretože poskytnutý dátový objekt prepíše alebo posunie údaje."; -Strings.OfficeOM.L_RunMustReturnPromise = "Dávková funkcia presunutá do metódy .run nevrátila sľub. Funkcia musí vrátiÅ¥ sľub, aby bolo možné po dokonÄení operácie dávky uvoľniÅ¥ vÅ¡etky automaticky sledované objekty. Sľub zvyÄajne vrátite vrátením odpovede z funkcie context.sync()."; +Strings.OfficeOM.L_AppNameNotExist = "Názov doplnku pre {0} neexistuje."; +Strings.OfficeOM.L_CustomFunctionNameCannotSplit = "Názov funkcie musí obsahovaÅ¥ neprázdny priestor názvov a neprázdny krátky názov."; +Strings.OfficeOM.L_CustomXmlOutOfDateName = "Neaktuálne údaje"; +Strings.OfficeOM.L_MissingParameter = "Chýbajúci parameter"; +Strings.OfficeOM.L_TooManyArguments = "priveľa argumentov"; +Strings.OfficeOM.L_DialogNavigateError = "Chyba navigácie v dialógovom okne"; +Strings.OfficeOM.L_InvalidSelectionForBindingType = "Nie je možné vytvoriÅ¥ väzbu s aktuálnym výberom a so zadaným typom väzby."; +Strings.OfficeOM.L_HostError = "Chyba hostiteľa"; +Strings.OfficeOM.L_InvalidFormatValue = "Minimálne jeden parameter formátu má hodnotu, ktorá nie je povolená. EÅ¡te raz skontrolujte hodnoty a skúste to znova."; Strings.OfficeOM.L_NotSupportedEventType = "Zadaný typ udalosti {0} nie je podporovaný."; -Strings.OfficeOM.L_NewWindowCrossZone = "Nastavenia zabezpeÄenia vo vaÅ¡om prehliadaÄi nám bránia vo vytvorení dialógového okna. Skúste iný prehliadaÄ alebo {0} tak, aby doména {1} a doména zobrazená na paneli s adresou boli v rovnakej zóne zabezpeÄenia."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Operácia zlyhala, pretože tento doplnok si už vyžaduje prístupový token."; -Strings.OfficeOM.L_GetDataIsTooLarge = "Požadovaná množina údajov je príliÅ¡ veľká."; -Strings.OfficeOM.L_APICallFailed = "Volanie API zlyhalo"; -Strings.OfficeOM.L_DialogOK = "OK"; -Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Údaje sú neaktuálne. NaÄítaÅ¥ objekt znova."; -Strings.OfficeOM.L_UnsupportedEnumeration = "Nepodporovaná enumerácia"; +Strings.OfficeOM.L_NoCapability = "Nemáte dostatoÄné povolenia na vykonanie tejto akcie."; +Strings.OfficeOM.L_SettingsAreStale = "Nastavenia sa nepodarilo uložiÅ¥, pretože nie sú aktuálne."; Strings.OfficeOM.L_DialogRequireHTTPS = "Protokol HTTP nie je podporovaný. Použite namiesto toho HTTPS."; +Strings.OfficeOM.L_EventRegistrationError = "Chyba pri registrácii udalosti"; +Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Zdieľaný obsah musí byÅ¥ vo formáte tabuľky. Údaje naformátujte ako tabuľku a skúste to znova."; +Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Pred získaním ÄalÅ¡ieho súboru zavolajte closeAsync v aktuálnom súbore."; +Strings.OfficeOM.L_EventHandlerRemovalFailed = "Obsluhu udalostí sa nepodarilo odstrániÅ¥."; +Strings.OfficeOM.L_InvalidGrantMessage = "Chýba povolenie tohto doplnku."; +Strings.OfficeOM.L_RequestTokenUnavailable = "Toto API bolo obmedzené, aby sa spomalila rýchlosÅ¥ volania."; +Strings.OfficeOM.L_BrowserAPINotSupported = "Tento prehliadaÄ nepodporuje požadované API."; +Strings.OfficeOM.L_UserAborted = "Používateľ preruÅ¡il žiadosÅ¥ o súhlas."; +Strings.OfficeOM.L_InvalidDataObject = "Neplatný dátový objekt"; +Strings.OfficeOM.L_SSOServerError = "V poskytovateľovi overenia sa vyskytla chyba."; +Strings.OfficeOM.L_SSOConnectionLostError = "A connection was lost during the sign in process."; +Strings.OfficeOM.L_RedundantCallbackSpecification = "Spätné volanie nie je možné urÄiÅ¥ ani v zozname argumentov ani vo voliteľnom objekte."; +Strings.OfficeOM.L_UnsupportedDataObject = "Poskytnutý typ dátového objektu nie je podporovaný."; +Strings.OfficeOM.L_TooManyOptionalFunction = "viacero voliteľných funkcií v zozname parametrov"; +Strings.OfficeOM.L_DialogInvalidScheme = "Schéma URL adresy nie je podporovaná. Použite namiesto toho HTTPS."; +Strings.OfficeOM.L_InvalidCellsValue = "Minimálne jeden parameter bunky má hodnotu, ktorá nie je povolená. EÅ¡te raz skontrolujte hodnoty a skúste to znova."; +Strings.OfficeOM.L_SelectionCannotBound = "S aktuálnym výberom nie je možné vytvoriÅ¥ väzbu."; +Strings.OfficeOM.L_InvalidObjectPath = "Cesta k objektu {0} nefunguje pre to, Äo sa snažíte urobiÅ¥. Ak používate objekt v rámci viacerých volaní funkcie context.sync a mimo sekvenÄného spúšťania dávky .run, na spravovanie životnosti objektu použite metódy context.trackedObjects.add() a context.trackedObjects.remove()."; +Strings.OfficeOM.L_SSOServerErrorMessage = "Na serveri sa vyskytla neoÄakávaná chyba."; +Strings.OfficeOM.L_InvalidBindingError = "Chyba neplatnej väzby"; +Strings.OfficeOM.L_BadSelectorString = "ReÅ¥azec odovzdaný do selektora je nesprávne naformátovaný alebo nie je podporovaný."; +Strings.OfficeOM.L_InvalidColumnsForBinding = "Uvedené stĺpce sú neplatné."; +Strings.OfficeOM.L_FormattingReminder = "Pripomenutie formátovania"; +Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Zadaný typ väzby nie je kompatibilný so zadanou pomenovanou položkou."; Strings.OfficeOM.L_InvalidCoercion = "Neplatný typ koercie"; -Strings.OfficeOM.L_SaveSettingsError = "Chyba nastavení ukladania"; Strings.OfficeOM.L_DataReadError = "Chyba pri Äítaní údajov"; -Strings.OfficeOM.L_InvalidGetStartRowColumn = "Zadané hodnoty zaÄiatoÄného riadka alebo zaÄiatoÄného stĺpca nie sú platné."; -Strings.OfficeOM.L_DialogInvalidScheme = "Schéma URL adresy nie je podporovaná. Použite namiesto toho HTTPS."; -Strings.OfficeOM.L_BrowserAPINotSupported = "Tento prehliadaÄ nepodporuje požadované API."; +Strings.OfficeOM.L_SSOClientErrorMessage = "V klientovi sa vyskytla neoÄakávaná chyba."; +Strings.OfficeOM.L_FunctionCallFailed = "Volanie funkcie {0} zlyhalo, kód chyby: {1}."; +Strings.OfficeOM.L_InvalidRequestContext = "Objekt sa nedá použiÅ¥ v kontextoch rôznych žiadostí."; +Strings.OfficeOM.L_DialogAlreadyOpened = "Operácia zlyhala, pretože tento doplnok už má aktívne dialógové okno."; +Strings.OfficeOM.L_PropertyDoesNotExist = "VlastnosÅ¥ {0} sa v objekte nenachádza."; +Strings.OfficeOM.L_DataNotMatchBindingType = "Zadaný dátový objekt nie je kompatibilný s typom väzby."; +Strings.OfficeOM.L_GetDataIsTooLarge = "Požadovaná množina údajov je príliÅ¡ veľká."; +Strings.OfficeOM.L_CustomFunctionImplementationMissing = "VlastnosÅ¥ s týmto názvom v Excel.CustomFunctions, ktorá predstavuje definíciu funkcie, musí obsahovaÅ¥ vlastnosÅ¥ call implementujúcu funkciu."; +Strings.OfficeOM.L_InvalidGetRows = "Uvedené riadky sú neplatné."; +Strings.OfficeOM.L_ReadSettingsError = "Chyba nastavení Äítania"; +Strings.OfficeOM.L_InvalidSetRows = "Uvedené riadky sú neplatné."; +Strings.OfficeOM.L_InvalidGetColumns = "Uvedené stĺpce sú neplatné."; +Strings.OfficeOM.L_CallbackNotAFunction = "Spätné volanie musí byÅ¥ typom funkcie, bolo typom {0}."; +Strings.OfficeOM.L_OperationNotSupported = "Operácia nie je podporovaná."; +Strings.OfficeOM.L_TooManyIncompleteRequests = "PoÄkajte, kým sa dokonÄí predchádzajúce volanie."; Strings.OfficeOM.L_RowIndexOutOfRange = "Hodnota indexu riadka je mimo povoleného rozsahu. Použite hodnotu (0 alebo vyÅ¡Å¡iu), ktorá je menÅ¡ia ako poÄet riadkov."; -Strings.OfficeOM.L_TooManyArguments = "priveľa argumentov"; +Strings.OfficeOM.L_InvalidGetStartRowColumn = "Zadané hodnoty zaÄiatoÄného riadka alebo zaÄiatoÄného stĺpca nie sú platné."; +Strings.OfficeOM.L_NotSupportedBindingType = "Zadaný typ väzby {0} nie je podporovaný."; +Strings.OfficeOM.L_InvalidResourceUrlMessage = "V manifeste bola zadaná neplatná URL adresa zdroja."; +Strings.OfficeOM.L_InvalidParameters = "Funkcia {0} má neplatné parametre."; +Strings.OfficeOM.L_NavOutOfBound = "Operácia zlyhala, pretože index je mimo rozsahu."; +Strings.OfficeOM.L_InvalidResourceUrl = "Bola zadaná neplatná URL adresa zdroja aplikácie."; +Strings.OfficeOM.L_InvalidAPICall = "Neplatné volanie API"; +Strings.OfficeOM.L_APICallFailed = "Volanie API zlyhalo"; +Strings.OfficeOM.L_InvalidOperationInCellEditMode = "Excel je v režime úpravy bunky. UkonÄite režim úprav stlaÄením klávesu ENTER alebo TAB alebo výberom inej bunky, a potom to skúste znova."; +Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Ignorovanie"; +Strings.OfficeOM.L_GetDataParametersConflict = "Uvedené parametre sú v konflikte."; +Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Poznámka: OdporúÄa sa maÅ¥ menej ako 100 súprav formátovania nastavených volaním formátovania rozhrania API."; +Strings.OfficeOM.L_GetSelectionNotSupported = "Aktuálny výber nie je podporovaný."; +Strings.OfficeOM.L_SliceSizeNotSupported = "Zadaná veľkosÅ¥ výseku nie je podporovaná."; +Strings.OfficeOM.L_ConnectionFailureWithStatus = "Požiadavka zlyhala s kódom stavu {0}."; +Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = "Zmeny vlastnosti {0} nemožno použiÅ¥ prostredníctvom metódy object.set."; +Strings.OfficeOM.L_NetworkProblem = "Problém so sieÅ¥ou"; +Strings.OfficeOM.L_InvalidArgument = "Argument {0} pre túto situáciu nefunguje, chýba alebo nemá správny formát."; +Strings.OfficeOM.L_InvalidDataFormat = "Formát zadaného dátového objektu nie je platný."; +Strings.OfficeOM.L_OsfControlTypeNotSupported = "Typ OsfControl nie je podporovaný."; +Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Obmedzenia prehliadaÄa nám zabránili vo vytvorení dialógového okna. Doména dialógového okna a doména hostiteľa doplnku nie sú v rovnakej zóne zabezpeÄenia."; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory = "Tento doplnok nepodporuje súhlas používateľa."; Strings.OfficeOM.L_InvalidSSOAddinMessage = "Pre tento doplnok nie je podporované rozhranie API identity."; +Strings.OfficeOM.L_EventHandlerNotExist = "Zadaná obsluha udalostí sa pre túto väzbu nenaÅ¡la."; +Strings.OfficeOM.L_IndexOutOfRange = "Index mimo rozsahu."; +Strings.OfficeOM.L_OverwriteWorksheetData = "Operácia nastavenia zlyhala, pretože poskytnutý dátový objekt prepíše alebo posunie údaje."; +Strings.OfficeOM.L_InvalidApiCallInContext = "V aktuálnom kontexte je volanie API neplatné."; +Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Aktuálny výber nie je kompatibilný so zadaným typom koercie."; +Strings.OfficeOM.L_CustomXmlNodeNotFound = "Zadaný uzol sa nenaÅ¡iel."; +Strings.OfficeOM.L_InternalError = "Vnútorná chyba"; +Strings.OfficeOM.L_DataNotMatchBindingSize = "Poskytnutý dátový objekt nezodpovedá veľkosti aktuálneho výberu."; +Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Získaniu súboru zabránil problém so sieÅ¥ou."; +Strings.OfficeOM.L_FormatValueOutOfRange = "Hodnota je mimo povoleného rozsahu."; +Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Typ identity používateľa nie je podporovaný."; Strings.OfficeOM.L_UserNotSignedIn = "V Office nie je prihlásený žiaden používateľ."; -Strings.OfficeOM.L_BindingCreationError = "Chyba pri vytváraní väzby"; -Strings.OfficeOM.L_DialogNavigateError = "Chyba navigácie v dialógovom okne"; -Strings.OfficeOM.L_FunctionCallFailed = "Volanie funkcie {0} zlyhalo, kód chyby: {1}."; -Strings.OfficeOM.L_NotSupportedBindingType = "Zadaný typ väzby {0} nie je podporovaný."; +Strings.OfficeOM.L_SettingsStaleError = "Chyba zastaraných nastavení"; +Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "Prebieha pokus o nastavenie vlastnosti {0} urÄenej iba na Äítanie."; +Strings.OfficeOM.L_InvalidReadForBlankRow = "Zadaný riadok je prázdny."; +Strings.OfficeOM.L_SetDataParametersConflict = "Uvedené parametre sú v konflikte."; +Strings.OfficeOM.L_SpecifiedIdNotExist = "Zadaná identifikácia neexistuje."; +Strings.OfficeOM.L_MissingRequiredArguments = "chýba niekoľko požadovaných argumentov"; +Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath obmedzuje výber 1024 položiek."; +Strings.OfficeOM.L_CustomFunctionNameContainsBadChars = "Názov funkcie môže obsahovaÅ¥ iba písmená, Äíslice, znaky podÄiarknutia a bodky."; Strings.OfficeOM.L_BindingToMultipleSelection = "Nesúvislý výber nie je podporovaný."; -Strings.OfficeOM.L_CannotRegisterEvent = "Obsluha udalostí sa nedá zaregistrovaÅ¥."; -Strings.OfficeOM.L_TooManyOptionalObjects = "viacero voliteľných objektov v zozname parametrov"; -Strings.OfficeOM.L_NavOutOfBound = "Operácia zlyhala, pretože index je mimo rozsahu."; -Strings.OfficeOM.L_SSOServerError = "V poskytovateľovi overenia sa vyskytla chyba."; -Strings.OfficeOM.L_DialogAddressNotTrusted = "Doména URL adresy nie je zahrnutá v elemente AppDomains v manifeste."; -Strings.OfficeOM.L_InvalidColumnsForBinding = "Uvedené stĺpce sú neplatné."; -Strings.OfficeOM.L_ReadSettingsError = "Chyba nastavení Äítania"; -Strings.OfficeOM.L_CallbackNotAFunction = "Spätné volanie musí byÅ¥ typom funkcie, bolo typom {0}."; -Strings.OfficeOM.L_PermissionDenied = "Povolenie odmietnuté" +Strings.OfficeOM.L_OutOfRange = "Mimo rozsahu"; +Strings.OfficeOM.L_DataWriteError = "Chyba pri zápise údajov"; +Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "PlatnosÅ¥ relácie služby Office Online uplynula alebo je relácia neplatná. Ak chcete pokraÄovaÅ¥, obnovte stránku." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/sk-sk/office_strings.js b/node_modules/@microsoft/office-js/dist/sk-sk/office_strings.js index 5a6263f..a929fe4 100644 --- a/node_modules/@microsoft/office-js/dist/sk-sk/office_strings.js +++ b/node_modules/@microsoft/office-js/dist/sk-sk/office_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_CoercionTypeNotSupported="Zadaný typ koercie nie je podporovaný.";Strings.OfficeOM.L_SetDataIsTooLarge="Zadaný dátový objekt je príliÅ¡ veľký.";Strings.OfficeOM.L_SSOClientError="V žiadosti o overenie z balíka Office sa vyskytla chyba.";Strings.OfficeOM.L_InvalidCellsValue="Minimálne jeden parameter bunky má hodnotu, ktorá nie je povolená. EÅ¡te raz skontrolujte hodnoty a skúste to znova.";Strings.OfficeOM.L_DataNotMatchCoercionType="Typ zadaného dátového objektu nie je kompatibilný s aktuálnym výberom.";Strings.OfficeOM.L_InvalidArgumentGeneric="Argumenty odovzdané funkcii nefungujú v tejto situácii, chýbajú alebo nie sú v správnom formáte.";Strings.OfficeOM.L_PropertyDoesNotExist="VlastnosÅ¥ {0} sa v objekte nenachádza.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Zadané hodnoty poÄtu riadkov alebo poÄtu stĺpcov nie sú platné.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="nakonfigurujte prehliadaÄ";Strings.OfficeOM.L_FormattingReminder="Pripomenutie formátovania";Strings.OfficeOM.L_SettingNameNotExist="Zadaný názov nastavenia neexistuje.";Strings.OfficeOM.L_InvalidBindingOperation="Neplatná operácia väzby";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Parametre súradnice nie je možné použiÅ¥ s typom koercie Tabuľka, keÄ tabuľka obsahuje zlúÄené bunky.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Aktuálny výber nie je kompatibilný so zadaným typom koercie.";Strings.OfficeOM.L_MultipleNamedItemFound="NaÅ¡lo sa viacero objektov s rovnakým názvom.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Získaniu súboru zabránil problém so sieÅ¥ou.";Strings.OfficeOM.L_UnknownBindingType="Tento typ väzby nie je podporovaný.";Strings.OfficeOM.L_InternalError="Vnútorná chyba";Strings.OfficeOM.L_RedundantCallbackSpecification="Spätné volanie nie je možné urÄiÅ¥ ani v zozname argumentov ani vo voliteľnom objekte.";Strings.OfficeOM.L_SetDataParametersConflict="Uvedené parametre sú v konflikte.";Strings.OfficeOM.L_InvalidSetColumns="Uvedené stĺpce sú neplatné.";Strings.OfficeOM.L_InvalidBindingError="Chyba neplatnej väzby";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Operácia nie je v tomto type väzby podporovaná.";Strings.OfficeOM.L_InvalidAPICall="Neplatné volanie API";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Poznámka: V tabuľke sa odporúÄa maÅ¥ menej ako 20 000 buniek.";Strings.OfficeOM.L_NamedItemNotFound="Pomenovaná položka neexistuje.";Strings.OfficeOM.L_DisplayDialogError="Chyba zobrazenia dialógového okna";Strings.OfficeOM.L_InvalidNode="Neplatný uzol";Strings.OfficeOM.L_APINotSupported="API nie je podporované";Strings.OfficeOM.L_InvalidReadForBlankRow="Zadaný riadok je prázdny.";Strings.OfficeOM.L_RequestTimeout="Volanie sa vykonáva príliÅ¡ dlho.";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} chce zobraziÅ¥ nové okno.";Strings.OfficeOM.L_TooManyIncompleteRequests="PoÄkajte, kým sa dokonÄí predchádzajúce volanie.";Strings.OfficeOM.L_InvalidGrantMessage="Chýba povolenie tohto doplnku.";Strings.OfficeOM.L_NoCapability="Nemáte dostatoÄné povolenia na vykonanie tejto akcie.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="PovoliÅ¥";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Zdieľaný obsah musí byÅ¥ vo formáte tabuľky. Údaje naformátujte ako tabuľku a skúste to znova.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Typ identity používateľa nie je podporovaný.";Strings.OfficeOM.L_InvalidRequestContext="Objekt sa nedá použiÅ¥ v kontextoch rôznych žiadostí.";Strings.OfficeOM.L_InvalidSelectionForBindingType="Nie je možné vytvoriÅ¥ väzbu s aktuálnym výberom a so zadaným typom väzby.";Strings.OfficeOM.L_InvalidTableOptionValue="Minimálne jeden parameter tableOptions má hodnotu, ktorá nie je povolená. EÅ¡te raz skontrolujte hodnoty a skúste to znova.";Strings.OfficeOM.L_InternalErrorDescription="Vyskytla sa interná chyba.";Strings.OfficeOM.L_MemoryLimit="PrekroÄil sa limit pamäte";Strings.OfficeOM.L_MissingParameter="Chýbajúci parameter";Strings.OfficeOM.L_InvalidArgument="Argument {0} pre túto situáciu nefunguje, chýba alebo nemá správny formát.";Strings.OfficeOM.L_IndexOutOfRange="Index mimo rozsahu.";Strings.OfficeOM.L_InvalidFormatValue="Minimálne jeden parameter formátu má hodnotu, ktorá nie je povolená. EÅ¡te raz skontrolujte hodnoty a skúste to znova.";Strings.OfficeOM.L_GetSelectionNotSupported="Aktuálny výber nie je podporovaný.";Strings.OfficeOM.L_SSOClientErrorMessage="V klientovi sa vyskytla neoÄakávaná chyba.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Parametre súradnice nie je možné použiÅ¥ s typom koercie Tabuľka, keÄ tabuľka obsahuje zlúÄené bunky.";Strings.OfficeOM.L_DataWriteError="Chyba pri zápise údajov";Strings.OfficeOM.L_OsfControlTypeNotSupported="Typ OsfControl nie je podporovaný.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Ignorovanie";Strings.OfficeOM.L_ValueNotLoaded="Hodnota výsledného objektu zatiaľ nebola naÄítaná. Pred Äítaním vlastnosti hodnoty zavolajte príkaz context.sync() pre daný kontext požiadavky.";Strings.OfficeOM.L_InvalidFormat="Chyba neplatného formátu";Strings.OfficeOM.L_DataWriteReminder="Pripomenutie zapisovania údajov";Strings.OfficeOM.L_InvalidGetRows="Uvedené riadky sú neplatné.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Doplnok si už vyžaduje prístupový token.";Strings.OfficeOM.L_DataNotMatchBindingType="Zadaný dátový objekt nie je kompatibilný s typom väzby.";Strings.OfficeOM.L_FormatValueOutOfRange="Hodnota je mimo povoleného rozsahu.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="Prebieha pokus o nastavenie vlastnosti {0} urÄenej iba na Äítanie.";Strings.OfficeOM.L_UserAborted="Používateľ preruÅ¡il žiadosÅ¥ o súhlas.";Strings.OfficeOM.L_InvalidResourceUrlMessage="V manifeste bola zadaná neplatná URL adresa zdroja.";Strings.OfficeOM.L_SliceSizeNotSupported="Zadaná veľkosÅ¥ výseku nie je podporovaná.";Strings.OfficeOM.L_ConnectionFailureWithDetails="Požiadavka zlyhala s kódom stavu {0}, kódom chyby {1} a nasledujúcim chybovým hlásením: {2}";Strings.OfficeOM.L_InvalidSetStartRowColumn="Zadané hodnoty zaÄiatoÄného riadka alebo zaÄiatoÄného stĺpca nie sú platné.";Strings.OfficeOM.L_InvalidParameters="Funkcia {0} má neplatné parametre.";Strings.OfficeOM.L_EventRegistrationError="Chyba pri registrácii udalosti";Strings.OfficeOM.L_ConnectionFailureWithStatus="Požiadavka zlyhala s kódom stavu {0}.";Strings.OfficeOM.L_HostError="Chyba hostiteľa";Strings.OfficeOM.L_AppNameNotExist="Názov doplnku pre {0} neexistuje.";Strings.OfficeOM.L_InvalidResourceUrl="Bola zadaná neplatná URL adresa zdroja aplikácie.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="Zmeny vlastnosti {0} nemožno použiÅ¥ prostredníctvom metódy object.set.";Strings.OfficeOM.L_RequestTokenUnavailable="Toto API bolo obmedzené, aby sa spomalila rýchlosÅ¥ volania.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="PlatnosÅ¥ relácie služby Office Online uplynula alebo je relácia neplatná. Ak chcete pokraÄovaÅ¥, obnovte stránku.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Obsluhu udalostí sa nepodarilo pridaÅ¥.";Strings.OfficeOM.L_NotImplemented="Funkcia {0} nie je implementovaná.";Strings.OfficeOM.L_Timeout="ÄŒasový limit operácie uplynul.";Strings.OfficeOM.L_UserAbortedMessage="Používateľ nevyjadril súhlas s povoleniami doplnku.";Strings.OfficeOM.L_UserClickIgnore="Používateľ sa rozhodol ignorovaÅ¥ toto dialógové okno.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath obmedzuje výber 1024 položiek.";Strings.OfficeOM.L_OutOfRange="Mimo rozsahu";Strings.OfficeOM.L_UnsupportedUserIdentity="Typ identity používateľa nie je podporovaný.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Neaktuálne údaje";Strings.OfficeOM.L_InvalidGrant="Chýba predbežná autorizácia.";Strings.OfficeOM.L_BindingNotExist="Zadaná väzba neexistuje.";Strings.OfficeOM.L_UnsupportedDataObject="Poskytnutý typ dátového objektu nie je podporovaný.";Strings.OfficeOM.L_SettingsAreStale="Nastavenia sa nepodarilo uložiÅ¥, pretože nie sú aktuálne.";Strings.OfficeOM.L_ShuttingDown="Operácia zlyhala, pretože údaje na serveri nie sú aktuálne.";Strings.OfficeOM.L_EventHandlerRemovalFailed="Obsluhu udalostí sa nepodarilo odstrániÅ¥.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Neplatná relácia alebo relácia s uplynutým Äasovým limitom";Strings.OfficeOM.L_DialogAlreadyOpened="Operácia zlyhala, pretože tento doplnok už má aktívne dialógové okno.";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Neplatné vstupné argumenty.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Obmedzenia prehliadaÄa nám zabránili vo vytvorení dialógového okna. Doména dialógového okna a doména hostiteľa doplnku nie sú v rovnakej zóne zabezpeÄenia.";Strings.OfficeOM.L_DataNotMatchSelection="Poskytnutý dátový objekt nie je kompatibilný s tvarom alebo rozmermi aktuálneho výberu.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Poznámka: OdporúÄa sa maÅ¥ menej ako 100 súprav formátovania nastavených volaním formátovania rozhrania API.";Strings.OfficeOM.L_SelectionCannotBound="S aktuálnym výberom nie je možné vytvoriÅ¥ väzbu.";Strings.OfficeOM.L_CustomXmlError="Vlastná chyba XML.";Strings.OfficeOM.L_GetDataParametersConflict="Uvedené parametre sú v konflikte.";Strings.OfficeOM.L_InvalidObjectPath="Cesta k objektu {0} nefunguje pre to, Äo sa snažíte urobiÅ¥. Ak používate objekt v rámci viacerých volaní funkcie context.sync a mimo sekvenÄného spúšťania dávky .run, na spravovanie životnosti objektu použite metódy context.trackedObjects.add() a context.trackedObjects.remove().";Strings.OfficeOM.L_EventHandlerNotExist="Zadaná obsluha udalostí sa pre túto väzbu nenaÅ¡la.";Strings.OfficeOM.L_InitializeNotReady="Office.js sa eÅ¡te úplne nenaÄítal. Skúste to znovu neskôr alebo pridajte funkcii Office.initialize svoj inicializaÄný kód.";Strings.OfficeOM.L_SettingsCannotSave="Nastavenia sa nepodarilo uložiÅ¥.";Strings.OfficeOM.L_SpecifiedIdNotExist="Zadaná identifikácia neexistuje.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Zadaný typ väzby nie je kompatibilný so zadanou pomenovanou položkou.";Strings.OfficeOM.L_ElementMissing="Nepodarilo sa nám naformátovaÅ¥ bunku tabuľky, pretože niektoré hodnoty parametra chýbajú. EÅ¡te raz skontrolujte parametre a skúste to znova.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Dosiahol sa limit výberu";Strings.OfficeOM.L_DataNotMatchBindingSize="Poskytnutý dátový objekt nezodpovedá veľkosti aktuálneho výberu.";Strings.OfficeOM.L_InvalidValue="Neplatná hodnota";Strings.OfficeOM.L_NetworkProblem="Problém so sieÅ¥ou";Strings.OfficeOM.L_OperationNotSupported="Operácia nie je podporovaná.";Strings.OfficeOM.L_NotSupported="Funkcia {0} nie je podporovaná.";Strings.OfficeOM.L_BadSelectorString="ReÅ¥azec odovzdaný do selektora je nesprávne naformátovaný alebo nie je podporovaný.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="Aktuálna hostiteľská aplikácia nepodporuje enumeráciu.";Strings.OfficeOM.L_SettingsStaleError="Chyba zastaraných nastavení";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Vykonajte výber.";Strings.OfficeOM.L_InvalidGetColumns="Uvedené stĺpce sú neplatné.";Strings.OfficeOM.L_FileTypeNotSupported="Zadaný typ súboru nie je podporovaný.";Strings.OfficeOM.L_TooManyOptionalFunction="viacero voliteľných funkcií v zozname parametrov";Strings.OfficeOM.L_CustomXmlNodeNotFound="Zadaný uzol sa nenaÅ¡iel.";Strings.OfficeOM.L_InValidOptionalArgument="neplatný voliteľný argument";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Aplikácia {0} neexistuje. Nevolá sa Microsoft.Office.WebExtension.initialize(reason).";Strings.OfficeOM.L_DocumentReadOnly="Požadovaná operácia nie je v aktuálnom režime dokumentu povolená.";Strings.OfficeOM.L_InvalidApiCallInContext="V aktuálnom kontexte je volanie API neplatné.";Strings.OfficeOM.L_ActivityLimitReached="Dosiahol sa limit aktivít.";Strings.OfficeOM.L_ColIndexOutOfRange="Hodnota indexu stĺpca je mimo povoleného rozsahu. Použite hodnotu (0 alebo vyÅ¡Å¡iu), ktorá je menÅ¡ia ako poÄet stĺpcov.";Strings.OfficeOM.L_InvalidDataObject="Neplatný dátový objekt";Strings.OfficeOM.L_InvalidSetRows="Uvedené riadky sú neplatné.";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Pred získaním ÄalÅ¡ieho súboru zavolajte closeAsync v aktuálnom súbore.";Strings.OfficeOM.L_MissingRequiredArguments="chýba niekoľko požadovaných argumentov";Strings.OfficeOM.L_CannotWriteToSelection="Do aktuálneho výberu nie je možné vykonaÅ¥ zápis.";Strings.OfficeOM.L_CannotNavigateTo="Objekt sa nachádza na mieste, kde nie je podporovaná navigácia.";Strings.OfficeOM.L_SSOServerErrorMessage="Na serveri sa vyskytla neoÄakávaná chyba.";Strings.OfficeOM.L_DataStale="Neaktuálne údaje";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Zadaný typ koercie nie je kompatibilný s týmto typom väzby.";Strings.OfficeOM.L_InvalidDataFormat="Formát zadaného dátového objektu nie je platný.";Strings.OfficeOM.L_InvalidBinding="Neplatná väzba";Strings.OfficeOM.L_PropertyNotLoaded="VlastnosÅ¥ {0} nie je dostupná. Pred Äítaním hodnoty vlastnosti zavolajte metódu naÄítania na objekt, ktorý je súÄasÅ¥ou, a zavolajte funkciu context.sync() v kontexte priradenej žiadosti.";Strings.OfficeOM.L_OverwriteWorksheetData="Operácia nastavenia zlyhala, pretože poskytnutý dátový objekt prepíše alebo posunie údaje.";Strings.OfficeOM.L_RunMustReturnPromise="Dávková funkcia presunutá do metódy .run nevrátila sľub. Funkcia musí vrátiÅ¥ sľub, aby bolo možné po dokonÄení operácie dávky uvoľniÅ¥ vÅ¡etky automaticky sledované objekty. Sľub zvyÄajne vrátite vrátením odpovede z funkcie context.sync().";Strings.OfficeOM.L_NotSupportedEventType="Zadaný typ udalosti {0} nie je podporovaný.";Strings.OfficeOM.L_NewWindowCrossZone="Nastavenia zabezpeÄenia vo vaÅ¡om prehliadaÄi nám bránia vo vytvorení dialógového okna. Skúste iný prehliadaÄ alebo {0} tak, aby doména {1} a doména zobrazená na paneli s adresou boli v rovnakej zóne zabezpeÄenia.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Operácia zlyhala, pretože tento doplnok si už vyžaduje prístupový token.";Strings.OfficeOM.L_GetDataIsTooLarge="Požadovaná množina údajov je príliÅ¡ veľká.";Strings.OfficeOM.L_APICallFailed="Volanie API zlyhalo";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Údaje sú neaktuálne. NaÄítaÅ¥ objekt znova.";Strings.OfficeOM.L_UnsupportedEnumeration="Nepodporovaná enumerácia";Strings.OfficeOM.L_DialogRequireHTTPS="Protokol HTTP nie je podporovaný. Použite namiesto toho HTTPS.";Strings.OfficeOM.L_InvalidCoercion="Neplatný typ koercie";Strings.OfficeOM.L_SaveSettingsError="Chyba nastavení ukladania";Strings.OfficeOM.L_DataReadError="Chyba pri Äítaní údajov";Strings.OfficeOM.L_InvalidGetStartRowColumn="Zadané hodnoty zaÄiatoÄného riadka alebo zaÄiatoÄného stĺpca nie sú platné.";Strings.OfficeOM.L_DialogInvalidScheme="Schéma URL adresy nie je podporovaná. Použite namiesto toho HTTPS.";Strings.OfficeOM.L_BrowserAPINotSupported="Tento prehliadaÄ nepodporuje požadované API.";Strings.OfficeOM.L_RowIndexOutOfRange="Hodnota indexu riadka je mimo povoleného rozsahu. Použite hodnotu (0 alebo vyÅ¡Å¡iu), ktorá je menÅ¡ia ako poÄet riadkov.";Strings.OfficeOM.L_TooManyArguments="priveľa argumentov";Strings.OfficeOM.L_InvalidSSOAddinMessage="Pre tento doplnok nie je podporované rozhranie API identity.";Strings.OfficeOM.L_UserNotSignedIn="V Office nie je prihlásený žiaden používateľ.";Strings.OfficeOM.L_BindingCreationError="Chyba pri vytváraní väzby";Strings.OfficeOM.L_DialogNavigateError="Chyba navigácie v dialógovom okne";Strings.OfficeOM.L_FunctionCallFailed="Volanie funkcie {0} zlyhalo, kód chyby: {1}.";Strings.OfficeOM.L_NotSupportedBindingType="Zadaný typ väzby {0} nie je podporovaný.";Strings.OfficeOM.L_BindingToMultipleSelection="Nesúvislý výber nie je podporovaný.";Strings.OfficeOM.L_CannotRegisterEvent="Obsluha udalostí sa nedá zaregistrovaÅ¥.";Strings.OfficeOM.L_TooManyOptionalObjects="viacero voliteľných objektov v zozname parametrov";Strings.OfficeOM.L_NavOutOfBound="Operácia zlyhala, pretože index je mimo rozsahu.";Strings.OfficeOM.L_SSOServerError="V poskytovateľovi overenia sa vyskytla chyba.";Strings.OfficeOM.L_DialogAddressNotTrusted="Doména URL adresy nie je zahrnutá v elemente AppDomains v manifeste.";Strings.OfficeOM.L_InvalidColumnsForBinding="Uvedené stĺpce sú neplatné.";Strings.OfficeOM.L_ReadSettingsError="Chyba nastavení Äítania";Strings.OfficeOM.L_CallbackNotAFunction="Spätné volanie musí byÅ¥ typom funkcie, bolo typom {0}.";Strings.OfficeOM.L_PermissionDenied="Povolenie odmietnuté" \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_NotSupported="Funkcia {0} nie je podporovaná.";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} chce zobraziÅ¥ nové okno.";Strings.OfficeOM.L_ActivityLimitReached="Dosiahol sa limit aktivít.";Strings.OfficeOM.L_RequestTimeout="Volanie sa vykonáva príliÅ¡ dlho.";Strings.OfficeOM.L_ApiNotFoundDetails="Metóda alebo vlastnosÅ¥ {0} je súÄasÅ¥ou množiny požiadaviek rozhrania {1}, ktoré nie je k dispozícii vo vaÅ¡ej verzii aplikácie {2}.";Strings.OfficeOM.L_SaveSettingsError="Chyba nastavení ukladania";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_InvalidNode="Neplatný uzol";Strings.OfficeOM.L_InvalidArgumentGeneric="Argumenty odovzdané funkcii nefungujú v tejto situácii, chýbajú alebo nie sú v správnom formáte.";Strings.OfficeOM.L_InvalidBindingOperation="Neplatná operácia väzby";Strings.OfficeOM.L_CannotWriteToSelection="Do aktuálneho výberu nie je možné vykonaÅ¥ zápis.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="nakonfigurujte prehliadaÄ";Strings.OfficeOM.L_CoercionTypeNotSupported="Zadaný typ koercie nie je podporovaný.";Strings.OfficeOM.L_DialogAddressNotTrusted="Doména URL adresy nie je zahrnutá v elemente AppDomains v manifeste.";Strings.OfficeOM.L_ConnectionFailureWithDetails="Požiadavka zlyhala s kódom stavu {0}, kódom chyby {1} a nasledujúcim chybovým hlásením: {2}";Strings.OfficeOM.L_DisplayDialogError="Chyba zobrazenia dialógového okna";Strings.OfficeOM.L_Timeout="ÄŒasový limit operácie uplynul.";Strings.OfficeOM.L_ColIndexOutOfRange="Hodnota indexu stĺpca je mimo povoleného rozsahu. Použite hodnotu (0 alebo vyÅ¡Å¡iu), ktorá je menÅ¡ia ako poÄet stĺpcov.";Strings.OfficeOM.L_CannotNavigateTo="Objekt sa nachádza na mieste, kde nie je podporovaná navigácia.";Strings.OfficeOM.L_MemoryLimit="PrekroÄil sa limit pamäte";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Parametre súradnice nie je možné použiÅ¥ s typom koercie Tabuľka, keÄ tabuľka obsahuje zlúÄené bunky.";Strings.OfficeOM.L_SettingNameNotExist="Zadaný názov nastavenia neexistuje.";Strings.OfficeOM.L_DocumentReadOnly="Požadovaná operácia nie je v aktuálnom režime dokumentu povolená.";Strings.OfficeOM.L_MultipleNamedItemFound="NaÅ¡lo sa viacero objektov s rovnakým názvom.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="Aktuálna hostiteľská aplikácia nepodporuje enumeráciu.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Dosiahol sa limit výberu";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Doplnok si už vyžaduje prístupový token.";Strings.OfficeOM.L_InValidOptionalArgument="neplatný voliteľný argument";Strings.OfficeOM.L_UnknownBindingType="Tento typ väzby nie je podporovaný.";Strings.OfficeOM.L_ShuttingDown="Operácia zlyhala, pretože údaje na serveri nie sú aktuálne.";Strings.OfficeOM.L_SetDataIsTooLarge="Zadaný dátový objekt je príliÅ¡ veľký.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage="Operácia zlyhala, pretože tento doplnok nepodporuje súhlas používateľa v tejto kategórii";Strings.OfficeOM.L_CannotRegisterEvent="Obsluha udalostí sa nedá zaregistrovaÅ¥.";Strings.OfficeOM.L_DataWriteReminder="Pripomenutie zapisovania údajov";Strings.OfficeOM.L_ValueNotLoaded="Hodnota výsledného objektu zatiaľ nebola naÄítaná. Pred Äítaním vlastnosti hodnoty zavolajte príkaz context.sync() pre daný kontext požiadavky.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Obsluhu udalostí sa nepodarilo pridaÅ¥.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Údaje sú neaktuálne. NaÄítaÅ¥ objekt znova.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Vykonajte výber.";Strings.OfficeOM.L_DataNotMatchCoercionType="Typ zadaného dátového objektu nie je kompatibilný s aktuálnym výberom.";Strings.OfficeOM.L_InvalidValue="Neplatná hodnota";Strings.OfficeOM.L_ElementMissing="Nepodarilo sa nám naformátovaÅ¥ bunku tabuľky, pretože niektoré hodnoty parametra chýbajú. EÅ¡te raz skontrolujte parametre a skúste to znova.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Zadaný typ koercie nie je kompatibilný s týmto typom väzby.";Strings.OfficeOM.L_CustomFunctionDefinitionMissing="V Excel.CustomFunctions musí existovaÅ¥ vlastnosÅ¥ s týmto názvom, ktorá predstavuje definíciu funkcie.";Strings.OfficeOM.L_UnsupportedUserIdentity="Typ identity používateľa nie je podporovaný.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Operácia zlyhala, pretože tento doplnok si už vyžaduje prístupový token.";Strings.OfficeOM.L_BindingCreationError="Chyba pri vytváraní väzby";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Poznámka: V tabuľke sa odporúÄa maÅ¥ menej ako 20 000 buniek.";Strings.OfficeOM.L_InvalidSetStartRowColumn="Zadané hodnoty zaÄiatoÄného riadka alebo zaÄiatoÄného stĺpca nie sú platné.";Strings.OfficeOM.L_InvalidFormat="Chyba neplatného formátu";Strings.OfficeOM.L_NotImplemented="Funkcia {0} nie je implementovaná.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="PovoliÅ¥";Strings.OfficeOM.L_DataStale="Neaktuálne údaje";Strings.OfficeOM.L_UserAbortedMessage="Používateľ nevyjadril súhlas s povoleniami doplnku.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Parametre súradnice nie je možné použiÅ¥ s typom koercie Tabuľka, keÄ tabuľka obsahuje zlúÄené bunky.";Strings.OfficeOM.L_NamedItemNotFound="Pomenovaná položka neexistuje.";Strings.OfficeOM.L_InvalidSetColumns="Uvedené stĺpce sú neplatné.";Strings.OfficeOM.L_InvalidGrant="Chýba predbežná autorizácia.";Strings.OfficeOM.L_TooManyOptionalObjects="viacero voliteľných objektov v zozname parametrov";Strings.OfficeOM.L_PermissionDenied="Povolenie odmietnuté";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Neplatné vstupné argumenty.";Strings.OfficeOM.L_CustomXmlError="Vlastná chyba XML.";Strings.OfficeOM.L_SettingsCannotSave="Nastavenia sa nepodarilo uložiÅ¥.";Strings.OfficeOM.L_UserClickIgnore="Používateľ sa rozhodol ignorovaÅ¥ toto dialógové okno.";Strings.OfficeOM.L_FileTypeNotSupported="Zadaný typ súboru nie je podporovaný.";Strings.OfficeOM.L_UnsupportedEnumeration="Nepodporovaná enumerácia";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Operácia nie je v tomto type väzby podporovaná.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Neplatná relácia alebo relácia s uplynutým Äasovým limitom";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Aplikácia {0} neexistuje. Nevolá sa Microsoft.Office.WebExtension.initialize(reason).";Strings.OfficeOM.L_InvalidTableOptionValue="Minimálne jeden parameter tableOptions má hodnotu, ktorá nie je povolená. EÅ¡te raz skontrolujte hodnoty a skúste to znova.";Strings.OfficeOM.L_BindingNotExist="Zadaná väzba neexistuje.";Strings.OfficeOM.L_SSOConnectionLostErrorMessage="A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones.";Strings.OfficeOM.L_APINotSupported="API nie je podporované";Strings.OfficeOM.L_RunMustReturnPromise="Dávková funkcia presunutá do metódy .run nevrátila sľub. Funkcia musí vrátiÅ¥ sľub, aby bolo možné po dokonÄení operácie dávky uvoľniÅ¥ vÅ¡etky automaticky sledované objekty. Sľub zvyÄajne vrátite vrátením odpovede z funkcie context.sync().";Strings.OfficeOM.L_InitializeNotReady="Office.js sa eÅ¡te úplne nenaÄítal. Skúste to znovu neskôr alebo pridajte funkcii Office.initialize svoj inicializaÄný kód.";Strings.OfficeOM.L_InvalidBinding="Neplatná väzba";Strings.OfficeOM.L_NewWindowCrossZone="Nastavenia zabezpeÄenia vo vaÅ¡om prehliadaÄi nám bránia vo vytvorení dialógového okna. Skúste iný prehliadaÄ alebo {0} tak, aby doména {1} a doména zobrazená na paneli s adresou boli v rovnakej zóne zabezpeÄenia.";Strings.OfficeOM.L_DataNotMatchSelection="Poskytnutý dátový objekt nie je kompatibilný s tvarom alebo rozmermi aktuálneho výberu.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Zadané hodnoty poÄtu riadkov alebo poÄtu stĺpcov nie sú platné.";Strings.OfficeOM.L_InternalErrorDescription="Vyskytla sa interná chyba.";Strings.OfficeOM.L_SSOClientError="V žiadosti o overenie z balíka Office sa vyskytla chyba.";Strings.OfficeOM.L_PropertyNotLoaded="VlastnosÅ¥ {0} nie je dostupná. Pred Äítaním hodnoty vlastnosti zavolajte metódu naÄítania na objekt, ktorý je súÄasÅ¥ou, a zavolajte funkciu context.sync() v kontexte priradenej žiadosti.";Strings.OfficeOM.L_AppNameNotExist="Názov doplnku pre {0} neexistuje.";Strings.OfficeOM.L_CustomFunctionNameCannotSplit="Názov funkcie musí obsahovaÅ¥ neprázdny priestor názvov a neprázdny krátky názov.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Neaktuálne údaje";Strings.OfficeOM.L_MissingParameter="Chýbajúci parameter";Strings.OfficeOM.L_TooManyArguments="priveľa argumentov";Strings.OfficeOM.L_DialogNavigateError="Chyba navigácie v dialógovom okne";Strings.OfficeOM.L_InvalidSelectionForBindingType="Nie je možné vytvoriÅ¥ väzbu s aktuálnym výberom a so zadaným typom väzby.";Strings.OfficeOM.L_HostError="Chyba hostiteľa";Strings.OfficeOM.L_InvalidFormatValue="Minimálne jeden parameter formátu má hodnotu, ktorá nie je povolená. EÅ¡te raz skontrolujte hodnoty a skúste to znova.";Strings.OfficeOM.L_NotSupportedEventType="Zadaný typ udalosti {0} nie je podporovaný.";Strings.OfficeOM.L_NoCapability="Nemáte dostatoÄné povolenia na vykonanie tejto akcie.";Strings.OfficeOM.L_SettingsAreStale="Nastavenia sa nepodarilo uložiÅ¥, pretože nie sú aktuálne.";Strings.OfficeOM.L_DialogRequireHTTPS="Protokol HTTP nie je podporovaný. Použite namiesto toho HTTPS.";Strings.OfficeOM.L_EventRegistrationError="Chyba pri registrácii udalosti";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Zdieľaný obsah musí byÅ¥ vo formáte tabuľky. Údaje naformátujte ako tabuľku a skúste to znova.";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Pred získaním ÄalÅ¡ieho súboru zavolajte closeAsync v aktuálnom súbore.";Strings.OfficeOM.L_EventHandlerRemovalFailed="Obsluhu udalostí sa nepodarilo odstrániÅ¥.";Strings.OfficeOM.L_InvalidGrantMessage="Chýba povolenie tohto doplnku.";Strings.OfficeOM.L_RequestTokenUnavailable="Toto API bolo obmedzené, aby sa spomalila rýchlosÅ¥ volania.";Strings.OfficeOM.L_BrowserAPINotSupported="Tento prehliadaÄ nepodporuje požadované API.";Strings.OfficeOM.L_UserAborted="Používateľ preruÅ¡il žiadosÅ¥ o súhlas.";Strings.OfficeOM.L_InvalidDataObject="Neplatný dátový objekt";Strings.OfficeOM.L_SSOServerError="V poskytovateľovi overenia sa vyskytla chyba.";Strings.OfficeOM.L_SSOConnectionLostError="A connection was lost during the sign in process.";Strings.OfficeOM.L_RedundantCallbackSpecification="Spätné volanie nie je možné urÄiÅ¥ ani v zozname argumentov ani vo voliteľnom objekte.";Strings.OfficeOM.L_UnsupportedDataObject="Poskytnutý typ dátového objektu nie je podporovaný.";Strings.OfficeOM.L_TooManyOptionalFunction="viacero voliteľných funkcií v zozname parametrov";Strings.OfficeOM.L_DialogInvalidScheme="Schéma URL adresy nie je podporovaná. Použite namiesto toho HTTPS.";Strings.OfficeOM.L_InvalidCellsValue="Minimálne jeden parameter bunky má hodnotu, ktorá nie je povolená. EÅ¡te raz skontrolujte hodnoty a skúste to znova.";Strings.OfficeOM.L_SelectionCannotBound="S aktuálnym výberom nie je možné vytvoriÅ¥ väzbu.";Strings.OfficeOM.L_InvalidObjectPath="Cesta k objektu {0} nefunguje pre to, Äo sa snažíte urobiÅ¥. Ak používate objekt v rámci viacerých volaní funkcie context.sync a mimo sekvenÄného spúšťania dávky .run, na spravovanie životnosti objektu použite metódy context.trackedObjects.add() a context.trackedObjects.remove().";Strings.OfficeOM.L_SSOServerErrorMessage="Na serveri sa vyskytla neoÄakávaná chyba.";Strings.OfficeOM.L_InvalidBindingError="Chyba neplatnej väzby";Strings.OfficeOM.L_BadSelectorString="ReÅ¥azec odovzdaný do selektora je nesprávne naformátovaný alebo nie je podporovaný.";Strings.OfficeOM.L_InvalidColumnsForBinding="Uvedené stĺpce sú neplatné.";Strings.OfficeOM.L_FormattingReminder="Pripomenutie formátovania";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Zadaný typ väzby nie je kompatibilný so zadanou pomenovanou položkou.";Strings.OfficeOM.L_InvalidCoercion="Neplatný typ koercie";Strings.OfficeOM.L_DataReadError="Chyba pri Äítaní údajov";Strings.OfficeOM.L_SSOClientErrorMessage="V klientovi sa vyskytla neoÄakávaná chyba.";Strings.OfficeOM.L_FunctionCallFailed="Volanie funkcie {0} zlyhalo, kód chyby: {1}.";Strings.OfficeOM.L_InvalidRequestContext="Objekt sa nedá použiÅ¥ v kontextoch rôznych žiadostí.";Strings.OfficeOM.L_DialogAlreadyOpened="Operácia zlyhala, pretože tento doplnok už má aktívne dialógové okno.";Strings.OfficeOM.L_PropertyDoesNotExist="VlastnosÅ¥ {0} sa v objekte nenachádza.";Strings.OfficeOM.L_DataNotMatchBindingType="Zadaný dátový objekt nie je kompatibilný s typom väzby.";Strings.OfficeOM.L_GetDataIsTooLarge="Požadovaná množina údajov je príliÅ¡ veľká.";Strings.OfficeOM.L_CustomFunctionImplementationMissing="VlastnosÅ¥ s týmto názvom v Excel.CustomFunctions, ktorá predstavuje definíciu funkcie, musí obsahovaÅ¥ vlastnosÅ¥ call implementujúcu funkciu.";Strings.OfficeOM.L_InvalidGetRows="Uvedené riadky sú neplatné.";Strings.OfficeOM.L_ReadSettingsError="Chyba nastavení Äítania";Strings.OfficeOM.L_InvalidSetRows="Uvedené riadky sú neplatné.";Strings.OfficeOM.L_InvalidGetColumns="Uvedené stĺpce sú neplatné.";Strings.OfficeOM.L_CallbackNotAFunction="Spätné volanie musí byÅ¥ typom funkcie, bolo typom {0}.";Strings.OfficeOM.L_OperationNotSupported="Operácia nie je podporovaná.";Strings.OfficeOM.L_TooManyIncompleteRequests="PoÄkajte, kým sa dokonÄí predchádzajúce volanie.";Strings.OfficeOM.L_RowIndexOutOfRange="Hodnota indexu riadka je mimo povoleného rozsahu. Použite hodnotu (0 alebo vyÅ¡Å¡iu), ktorá je menÅ¡ia ako poÄet riadkov.";Strings.OfficeOM.L_InvalidGetStartRowColumn="Zadané hodnoty zaÄiatoÄného riadka alebo zaÄiatoÄného stĺpca nie sú platné.";Strings.OfficeOM.L_NotSupportedBindingType="Zadaný typ väzby {0} nie je podporovaný.";Strings.OfficeOM.L_InvalidResourceUrlMessage="V manifeste bola zadaná neplatná URL adresa zdroja.";Strings.OfficeOM.L_InvalidParameters="Funkcia {0} má neplatné parametre.";Strings.OfficeOM.L_NavOutOfBound="Operácia zlyhala, pretože index je mimo rozsahu.";Strings.OfficeOM.L_InvalidResourceUrl="Bola zadaná neplatná URL adresa zdroja aplikácie.";Strings.OfficeOM.L_InvalidAPICall="Neplatné volanie API";Strings.OfficeOM.L_APICallFailed="Volanie API zlyhalo";Strings.OfficeOM.L_InvalidOperationInCellEditMode="Excel je v režime úpravy bunky. UkonÄite režim úprav stlaÄením klávesu ENTER alebo TAB alebo výberom inej bunky, a potom to skúste znova.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Ignorovanie";Strings.OfficeOM.L_GetDataParametersConflict="Uvedené parametre sú v konflikte.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Poznámka: OdporúÄa sa maÅ¥ menej ako 100 súprav formátovania nastavených volaním formátovania rozhrania API.";Strings.OfficeOM.L_GetSelectionNotSupported="Aktuálny výber nie je podporovaný.";Strings.OfficeOM.L_SliceSizeNotSupported="Zadaná veľkosÅ¥ výseku nie je podporovaná.";Strings.OfficeOM.L_ConnectionFailureWithStatus="Požiadavka zlyhala s kódom stavu {0}.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="Zmeny vlastnosti {0} nemožno použiÅ¥ prostredníctvom metódy object.set.";Strings.OfficeOM.L_NetworkProblem="Problém so sieÅ¥ou";Strings.OfficeOM.L_InvalidArgument="Argument {0} pre túto situáciu nefunguje, chýba alebo nemá správny formát.";Strings.OfficeOM.L_InvalidDataFormat="Formát zadaného dátového objektu nie je platný.";Strings.OfficeOM.L_OsfControlTypeNotSupported="Typ OsfControl nie je podporovaný.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Obmedzenia prehliadaÄa nám zabránili vo vytvorení dialógového okna. Doména dialógového okna a doména hostiteľa doplnku nie sú v rovnakej zóne zabezpeÄenia.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory="Tento doplnok nepodporuje súhlas používateľa.";Strings.OfficeOM.L_InvalidSSOAddinMessage="Pre tento doplnok nie je podporované rozhranie API identity.";Strings.OfficeOM.L_EventHandlerNotExist="Zadaná obsluha udalostí sa pre túto väzbu nenaÅ¡la.";Strings.OfficeOM.L_IndexOutOfRange="Index mimo rozsahu.";Strings.OfficeOM.L_OverwriteWorksheetData="Operácia nastavenia zlyhala, pretože poskytnutý dátový objekt prepíše alebo posunie údaje.";Strings.OfficeOM.L_InvalidApiCallInContext="V aktuálnom kontexte je volanie API neplatné.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Aktuálny výber nie je kompatibilný so zadaným typom koercie.";Strings.OfficeOM.L_CustomXmlNodeNotFound="Zadaný uzol sa nenaÅ¡iel.";Strings.OfficeOM.L_InternalError="Vnútorná chyba";Strings.OfficeOM.L_DataNotMatchBindingSize="Poskytnutý dátový objekt nezodpovedá veľkosti aktuálneho výberu.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Získaniu súboru zabránil problém so sieÅ¥ou.";Strings.OfficeOM.L_FormatValueOutOfRange="Hodnota je mimo povoleného rozsahu.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Typ identity používateľa nie je podporovaný.";Strings.OfficeOM.L_UserNotSignedIn="V Office nie je prihlásený žiaden používateľ.";Strings.OfficeOM.L_SettingsStaleError="Chyba zastaraných nastavení";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="Prebieha pokus o nastavenie vlastnosti {0} urÄenej iba na Äítanie.";Strings.OfficeOM.L_InvalidReadForBlankRow="Zadaný riadok je prázdny.";Strings.OfficeOM.L_SetDataParametersConflict="Uvedené parametre sú v konflikte.";Strings.OfficeOM.L_SpecifiedIdNotExist="Zadaná identifikácia neexistuje.";Strings.OfficeOM.L_MissingRequiredArguments="chýba niekoľko požadovaných argumentov";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath obmedzuje výber 1024 položiek.";Strings.OfficeOM.L_CustomFunctionNameContainsBadChars="Názov funkcie môže obsahovaÅ¥ iba písmená, Äíslice, znaky podÄiarknutia a bodky.";Strings.OfficeOM.L_BindingToMultipleSelection="Nesúvislý výber nie je podporovaný.";Strings.OfficeOM.L_OutOfRange="Mimo rozsahu";Strings.OfficeOM.L_DataWriteError="Chyba pri zápise údajov";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="PlatnosÅ¥ relácie služby Office Online uplynula alebo je relácia neplatná. Ak chcete pokraÄovaÅ¥, obnovte stránku." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/sk-sk/outlook_strings.debug.js b/node_modules/@microsoft/office-js/dist/sk-sk/outlook_strings.debug.js index 283bd2e..f964637 100644 --- a/node_modules/@microsoft/office-js/dist/sk-sk/outlook_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/sk-sk/outlook_strings.debug.js @@ -1,34 +1,35 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("_u"); _u.ExtensibilityStrings = function() { }; _u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings"); -_u.ExtensibilityStrings.l_InvalidEventDates_Text = "Dátum ukonÄenia sa vyskytuje pred dátumom zaÄatia."; -_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "Vybratá položka sa zmenila."; -_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Chyba pri zápise údajov"; -_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Na prístup k chráneným Älenom rozhrania JavaScript API pre Office sa vyžaduje neobmedzené povolenie."; -_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Prílohy sa nadajú pridaÅ¥, pretože správa už obsahuje maximálny poÄet príloh"; _u.ExtensibilityStrings.l_InvalidDate_Text = "Výsledkom vstupu nie je platný dátum."; -_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Príloha sa nedá z položky odstrániÅ¥."; -_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Minimálne jeden zadaný zobrazovaný názov je príliÅ¡ dlhý."; -_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Celkový poÄet príjemcov v poli nemôže presiahnuÅ¥ {0}."; -_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Príloha sa k položke nedá pridaÅ¥."; -_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "Cesta k prílohe bola neplatná."; -_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Minimálne jedna zadaná e-mailová adresa je príliÅ¡ dlhá."; -_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Zadané parametre nezodpovedajú oÄakávanému formátu."; -_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "Používateľ prílohu odstránil pred dokonÄením nahrávania."; _u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Príloha sa nedá pridaÅ¥, pretože je príliÅ¡ veľká."; -_u.ExtensibilityStrings.l_InternalProtocolError_Text = "Interná chyba protokolu: {0}."; +_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Požiadavka prekroÄila maximálnu veľkosÅ¥ 1 MB. Upravte požiadavku EWS."; +_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Neboli zadaní žiadni platní príjemcovia."; +_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "Vybratá položka sa zmenila."; _u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Prílohy sa nedajú pridaÅ¥, keÄ sa celá odpoveÄ alebo preposlaná správa naÄítava zo servera."; +_u.ExtensibilityStrings.l_InternalProtocolError_Text = "Interná chyba protokolu: {0}."; +_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Celkový poÄet príjemcov v poli nemôže presiahnuÅ¥ {0}."; +_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Zadané parametre nezodpovedajú oÄakávanému formátu."; _u.ExtensibilityStrings.l_InternalFormatError_Text = "Vyskytla sa interná chyba formátu."; +_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Chyba prílohy"; +_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Chyba pri zápise údajov"; _u.ExtensibilityStrings.l_OffsetNotfound_Text = "Posun tejto Äasovej známky sa nepodarilo nájsÅ¥."; +_u.ExtensibilityStrings.l_InvalidEventDates_Text = "Dátum ukonÄenia sa vyskytuje pred dátumom zaÄatia."; +_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "Používateľ prílohu odstránil pred dokonÄením nahrávania."; _u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "HTML Äistenie zlyhalo."; -_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Požiadavka prekroÄila maximálnu veľkosÅ¥ 1 MB. Upravte požiadavku EWS."; -_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Príloha sa nedá odstrániÅ¥, pretože príloha s indexom prílohy sa nedá nájsÅ¥."; -_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Neboli zadaní žiadni platní príjemcovia."; -_u.ExtensibilityStrings.l_InvalidEndTime_Text = "ÄŒas ukonÄenia nemôže byÅ¥ pred Äasom zaÄatia."; +_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Na prístup k chráneným Älenom rozhrania JavaScript API pre Office sa vyžaduje neobmedzené povolenie."; +_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "Identifikácia prílohy bola neplatná."; _u.ExtensibilityStrings.l_CursorPositionChanged_Text = "Používateľ zmenil poÄas vkladania údajov pozíciu kurzora."; +_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Minimálne jeden zadaný zobrazovaný názov je príliÅ¡ dlhý."; +_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "Cesta k prílohe bola neplatná."; +_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Príloha sa k položke nedá pridaÅ¥."; +_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Prílohy sa nadajú pridaÅ¥, pretože správa už obsahuje maximálny poÄet príloh"; +_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Príloha sa nedá z položky odstrániÅ¥."; +_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Minimálne jedna zadaná e-mailová adresa je príliÅ¡ dlhá."; +_u.ExtensibilityStrings.l_InvalidEndTime_Text = "ÄŒas ukonÄenia nemôže byÅ¥ pred Äasom zaÄatia."; _u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "Na volanie metódy {0} sa vyžaduje neobmedzené povolenie."; -_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "Identifikácia prílohy bola neplatná."; -_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Chyba prílohy" +_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Príloha sa nedá odstrániÅ¥, pretože príloha s indexom prílohy sa nedá nájsÅ¥." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/sk-sk/outlook_strings.js b/node_modules/@microsoft/office-js/dist/sk-sk/outlook_strings.js index 13ddfc9..9b4b853 100644 --- a/node_modules/@microsoft/office-js/dist/sk-sk/outlook_strings.js +++ b/node_modules/@microsoft/office-js/dist/sk-sk/outlook_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_InvalidEventDates_Text="Dátum ukonÄenia sa vyskytuje pred dátumom zaÄatia.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Vybratá položka sa zmenila.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Chyba pri zápise údajov";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Na prístup k chráneným Älenom rozhrania JavaScript API pre Office sa vyžaduje neobmedzené povolenie.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Prílohy sa nadajú pridaÅ¥, pretože správa už obsahuje maximálny poÄet príloh";_u.ExtensibilityStrings.l_InvalidDate_Text="Výsledkom vstupu nie je platný dátum.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Príloha sa nedá z položky odstrániÅ¥.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Minimálne jeden zadaný zobrazovaný názov je príliÅ¡ dlhý.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Celkový poÄet príjemcov v poli nemôže presiahnuÅ¥ {0}.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Príloha sa k položke nedá pridaÅ¥.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="Cesta k prílohe bola neplatná.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Minimálne jedna zadaná e-mailová adresa je príliÅ¡ dlhá.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Zadané parametre nezodpovedajú oÄakávanému formátu.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="Používateľ prílohu odstránil pred dokonÄením nahrávania.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Príloha sa nedá pridaÅ¥, pretože je príliÅ¡ veľká.";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Interná chyba protokolu: {0}.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Prílohy sa nedajú pridaÅ¥, keÄ sa celá odpoveÄ alebo preposlaná správa naÄítava zo servera.";_u.ExtensibilityStrings.l_InternalFormatError_Text="Vyskytla sa interná chyba formátu.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Posun tejto Äasovej známky sa nepodarilo nájsÅ¥.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="HTML Äistenie zlyhalo.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Požiadavka prekroÄila maximálnu veľkosÅ¥ 1 MB. Upravte požiadavku EWS.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Príloha sa nedá odstrániÅ¥, pretože príloha s indexom prílohy sa nedá nájsÅ¥.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Neboli zadaní žiadni platní príjemcovia.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="ÄŒas ukonÄenia nemôže byÅ¥ pred Äasom zaÄatia.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="Používateľ zmenil poÄas vkladania údajov pozíciu kurzora.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Na volanie metódy {0} sa vyžaduje neobmedzené povolenie.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="Identifikácia prílohy bola neplatná.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Chyba prílohy" \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_InvalidDate_Text="Výsledkom vstupu nie je platný dátum.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Príloha sa nedá pridaÅ¥, pretože je príliÅ¡ veľká.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Požiadavka prekroÄila maximálnu veľkosÅ¥ 1 MB. Upravte požiadavku EWS.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Neboli zadaní žiadni platní príjemcovia.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Vybratá položka sa zmenila.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Prílohy sa nedajú pridaÅ¥, keÄ sa celá odpoveÄ alebo preposlaná správa naÄítava zo servera.";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Interná chyba protokolu: {0}.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Celkový poÄet príjemcov v poli nemôže presiahnuÅ¥ {0}.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Zadané parametre nezodpovedajú oÄakávanému formátu.";_u.ExtensibilityStrings.l_InternalFormatError_Text="Vyskytla sa interná chyba formátu.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Chyba prílohy";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Chyba pri zápise údajov";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Posun tejto Äasovej známky sa nepodarilo nájsÅ¥.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="Dátum ukonÄenia sa vyskytuje pred dátumom zaÄatia.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="Používateľ prílohu odstránil pred dokonÄením nahrávania.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="HTML Äistenie zlyhalo.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Na prístup k chráneným Älenom rozhrania JavaScript API pre Office sa vyžaduje neobmedzené povolenie.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="Identifikácia prílohy bola neplatná.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="Používateľ zmenil poÄas vkladania údajov pozíciu kurzora.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Minimálne jeden zadaný zobrazovaný názov je príliÅ¡ dlhý.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="Cesta k prílohe bola neplatná.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Príloha sa k položke nedá pridaÅ¥.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Prílohy sa nadajú pridaÅ¥, pretože správa už obsahuje maximálny poÄet príloh";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Príloha sa nedá z položky odstrániÅ¥.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Minimálne jedna zadaná e-mailová adresa je príliÅ¡ dlhá.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="ÄŒas ukonÄenia nemôže byÅ¥ pred Äasom zaÄatia.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Na volanie metódy {0} sa vyžaduje neobmedzené povolenie.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Príloha sa nedá odstrániÅ¥, pretože príloha s indexom prílohy sa nedá nájsÅ¥." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/sl-si/office_strings.debug.js b/node_modules/@microsoft/office-js/dist/sl-si/office_strings.debug.js index 44ee1a5..042f69b 100644 --- a/node_modules/@microsoft/office-js/dist/sl-si/office_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/sl-si/office_strings.debug.js @@ -1,179 +1,190 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("Strings"); Strings.OfficeOM = function() { }; Strings.OfficeOM.registerClass("Strings.OfficeOM"); -Strings.OfficeOM.L_OperationNotSupported = "Postopek ni podprt."; -Strings.OfficeOM.L_TooManyIncompleteRequests = "PoÄakajte, da se prejÅ¡nji klic dokonÄa."; -Strings.OfficeOM.L_ShuttingDown = "Postopek ni uspel, ker podatki v strežniku niso ažurni."; -Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Prezri"; -Strings.OfficeOM.L_InvalidAPICall = "Neveljaven klic API"; -Strings.OfficeOM.L_MultipleNamedItemFound = "Najdenih je bilo veÄ predmetov z istim imenom."; -Strings.OfficeOM.L_TooManyArguments = "preveÄ argumentov"; -Strings.OfficeOM.L_InvalidReadForBlankRow = "Navedena vrstica je prazna."; -Strings.OfficeOM.L_OsfControlTypeNotSupported = "Vrsta »OsfControl« ni podprta."; -Strings.OfficeOM.L_SetDataIsTooLarge = "Navedeni podatkovni predmet je prevelik."; +Strings.OfficeOM.L_CallbackNotAFunction = "Povratni klic mora biti vrste funkcija. Bil je vrste {0}."; +Strings.OfficeOM.L_NavOutOfBound = "Postopek ni uspel, ker je kazalo zunaj obsega."; +Strings.OfficeOM.L_TooManyOptionalFunction = "na seznamu parametrov je veÄ izbirnih funkcij"; +Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Vrsta identitete uporabnika ni podprta."; +Strings.OfficeOM.L_UnsupportedUserIdentity = "Vrsta identitete uporabnika ni podprta."; +Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Postopek ni podprt v tej vrsti vezave."; +Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Navedena vrsta prisile ni združljiva s to vrsto vezave."; +Strings.OfficeOM.L_InvalidParameters = "Parametri funkcije {0} so neveljavni."; +Strings.OfficeOM.L_UserNotSignedIn = "Noben uporabnik ni vpisan v Office."; +Strings.OfficeOM.L_InvalidSetColumns = "Navedeni stolpci niso veljavni."; +Strings.OfficeOM.L_InvalidDataFormat = "Oblika navedenega podatkovnega predmeta je neveljavna."; +Strings.OfficeOM.L_NotImplemented = "Funkcija {0} ni izvedena."; +Strings.OfficeOM.L_ElementMissing = "Celice tabele ni mogoÄe oblikovati, ker manjkajo nekatere vrednosti parametrov. Znova preverite parametre in poskusite znova."; +Strings.OfficeOM.L_UserAborted = "Uporabnik je prekinil zahtevo za soglasje."; +Strings.OfficeOM.L_DialogOK = "V redu"; +Strings.OfficeOM.L_SliceSizeNotSupported = "Izbrana velikost rezine ni podrta."; +Strings.OfficeOM.L_InvalidGetRows = "Navedene vrstice niso veljavne."; +Strings.OfficeOM.L_UnsupportedEnumeration = "Nepodprto naÅ¡tevanje"; +Strings.OfficeOM.L_PermissionDenied = "Dovoljenje je zavrnjeno"; +Strings.OfficeOM.L_FormatValueOutOfRange = "Vrednost je zunaj dovoljenega obsega."; +Strings.OfficeOM.L_NetworkProblem = "Težava z omrežjem"; +Strings.OfficeOM.L_DataNotMatchSelection = "Posredovani podatkovni predmet ni združljiv z obliko ali dimenzijami trenutne izbire."; +Strings.OfficeOM.L_OutOfRange = "Zunaj obsega"; +Strings.OfficeOM.L_ReadSettingsError = "Napaka pri branju nastavitev"; +Strings.OfficeOM.L_GetDataIsTooLarge = "Zahtevani nabor podatkov je prevelik."; +Strings.OfficeOM.L_InvalidArgument = "Argument »{0}« ne deluje v tem primeru, manjka ali pa ni pravilne oblike zapisa."; +Strings.OfficeOM.L_EventHandlerAdditionFailed = "Rutine za obravnavo dogodkov ni bilo mogoÄe dodati."; +Strings.OfficeOM.L_InvalidSetStartRowColumn = "Navedeni vrednosti »startRow« ali »startColumn« nista veljavni."; +Strings.OfficeOM.L_Timeout = "ÄŒasovna omejitev postopka je potekla."; +Strings.OfficeOM.L_InvalidBindingOperation = "Neveljaven postopek vezave."; +Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Neveljavni argumenti vnosa"; +Strings.OfficeOM.L_APINotSupported = "Klic API ni podprt"; +Strings.OfficeOM.L_MemoryLimit = "Presežena je omejitev pomnilnika"; +Strings.OfficeOM.L_CustomFunctionNameContainsBadChars = "V imenu funkcije so lahko le Ärke, Å¡tevke, podÄrtaji in pike."; +Strings.OfficeOM.L_SetDataParametersConflict = "Navedeni parametri so v sporu."; Strings.OfficeOM.L_DataNotMatchCoercionType = "Vrsta navedenega podatkovnega predmeta ni združljiva s trenutno izbiro."; Strings.OfficeOM.L_NotSupportedBindingType = "Navedena vrsta vezave {0} ni podprta. "; -Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Izberite želeno možnost."; -Strings.OfficeOM.L_InvalidGrant = "Manjka vnaprejÅ¡nje pooblastilo."; -Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Podatki so zastareli. Znova dobite predmet."; -Strings.OfficeOM.L_InvalidGrantMessage = "Manjka odobritev za ta dodatek."; -Strings.OfficeOM.L_InvalidBinding = "Neveljavna vezava"; +Strings.OfficeOM.L_InvalidValue = "Neveljavna vrednost"; +Strings.OfficeOM.L_SettingsAreStale = "Nastavitev ni mogoÄe shraniti, ker niso ažurne."; +Strings.OfficeOM.L_DocumentReadOnly = "Zahtevan postopek ni dovoljen v trenutnem naÄinu dokumenta."; +Strings.OfficeOM.L_RowIndexOutOfRange = "Vrednost indeksa vrstice je zunaj dovoljenega obsega. Uporabite vrednost (0 ali veÄjo), ki je manjÅ¡a od Å¡tevila vrstic."; +Strings.OfficeOM.L_InvalidObjectPath = "Pot predmeta »{0}« ne deluje za namen, ki ga želite. ÄŒe predmet uporabljate v veÄ klicih »context.sync« in zunaj zaporedne izvedbe paketa ».run«, uporabite medoti »context.trackedObjects.add()« in »context.trackedObjects.remove()« za upravljanje življenjskega cikla predmeta."; +Strings.OfficeOM.L_BindingNotExist = "Navedena vrsta vezave ne obstaja."; +Strings.OfficeOM.L_FunctionCallFailed = "Klic funkcije {0} ni uspel, koda napake: {1}."; +Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Navedeni vrednosti »rowCount« ali »columnCount« nista veljavni."; +Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath omejuje izbor na 1024 elementov."; +Strings.OfficeOM.L_MissingParameter = "ManjkajoÄi parameter"; Strings.OfficeOM.L_BadSelectorString = "Niz, posredovan v izbirnik, ni pravilno oblikovana ali pa ni podprt."; -Strings.OfficeOM.L_DisplayDialogError = "Napaka pri prikazu pogovornega okna"; -Strings.OfficeOM.L_SettingsStaleError = "Napaka zaradi zastarelih nastavitev"; -Strings.OfficeOM.L_SetDataParametersConflict = "Navedeni parametri so v sporu."; -Strings.OfficeOM.L_DialogAlreadyOpened = "Postopek ni uspel, ker ima ta dodatek že aktivno pogovorno okno."; -Strings.OfficeOM.L_CustomXmlNodeNotFound = "Navedenega vozliÅ¡Äa ni bilo mogoÄe najti."; -Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Preden dobite drugo datoteko, pokliÄite closeAsync za trenutno datoteko."; -Strings.OfficeOM.L_SelectionCannotBound = "Na trenutno izbiro ni mogoÄe vezati."; +Strings.OfficeOM.L_InvalidOperationInCellEditMode = "Excel je naÄin za urejanje celice. Zaprite naÄin za urejanje tako, da pritisnete ENTER ali TAB ali pa izberite drugo celico in nato poskusite znova."; +Strings.OfficeOM.L_InvalidGrantMessage = "Manjka odobritev za ta dodatek."; +Strings.OfficeOM.L_InvalidTableOptionValue = "V enem parametru ali veÄ parametrih »tableOptions« so vrednosti, ki niso dovoljene. Znova preverite vrednosti in poskusite znova."; +Strings.OfficeOM.L_SetDataIsTooLarge = "Navedeni podatkovni predmet je prevelik."; +Strings.OfficeOM.L_CustomXmlOutOfDateName = "Podatki niso ažurni"; +Strings.OfficeOM.L_UnsupportedEnumerationMessage = "OÅ¡tevilÄenje ni podprto v trenutnem gostiteljskem programu."; +Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Koordinatnih parametrov ni mogoÄe uporabiti s pretvorbeno tabelo, ko tabela vsebuje spojene celice."; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory = "Dodatek ne podpira privolitve uporabnika."; Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "Poskus nastavitve lastnosti samo za branje »{0}«."; -Strings.OfficeOM.L_InvalidParameters = "Parametri funkcije {0} so neveljavni."; -Strings.OfficeOM.L_SettingsAreStale = "Nastavitev ni mogoÄe shraniti, ker niso ažurne."; -Strings.OfficeOM.L_ValueNotLoaded = "Vrednost predmeta rezultata Å¡e ni bila naložena. Preden preberete lastnost »Value«, v povezanem kontekstu zahteve pokliÄite »context.sync()«."; -Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Navedena vrsta prisile ni združljiva s to vrsto vezave."; -Strings.OfficeOM.L_InvalidSetStartRowColumn = "Navedeni vrednosti »startRow« ali »startColumn« nista veljavni."; +Strings.OfficeOM.L_RequestTokenUnavailable = "Ta API je bil zaduÅ¡en zato, da je bila zmanjÅ¡ana pogostost klicanja."; Strings.OfficeOM.L_InvalidBindingError = "Napaka neveljavne vezave"; -Strings.OfficeOM.L_UnsupportedUserIdentity = "Vrsta identitete uporabnika ni podprta."; -Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Opomba: za nabore oblikovanja, ki jih je nastavil klic vmesnika API za oblikovanje, priporoÄamo, da so pod 100."; -Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Postopek ni podprt v tej vrsti vezave."; -Strings.OfficeOM.L_InvalidObjectPath = "Pot predmeta »{0}« ne deluje za namen, ki ga želite. ÄŒe predmet uporabljate v veÄ klicih »context.sync« in zunaj zaporedne izvedbe paketa ».run«, uporabite medoti »context.trackedObjects.add()« in »context.trackedObjects.remove()« za upravljanje življenjskega cikla predmeta."; -Strings.OfficeOM.L_IndexOutOfRange = "Indeks je zunaj obsega."; -Strings.OfficeOM.L_InternalErrorDescription = "PriÅ¡lo je do notranje napake."; -Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Vrsta identitete uporabnika ni podprta."; -Strings.OfficeOM.L_GetDataIsTooLarge = "Zahtevani nabor podatkov je prevelik."; -Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Izbrana vsebina mora biti v obliki tabele. Oblikujte podatke v obliki tabele in poskusite znova."; -Strings.OfficeOM.L_GetSelectionNotSupported = "Trenutna izbira ni podprta."; -Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Datoteke ni mogoÄe dobiti zaradi napake omrežja."; -Strings.OfficeOM.L_APICallFailed = "Klic API ni uspel"; +Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} želi prikazati novo okno."; +Strings.OfficeOM.L_ShuttingDown = "Postopek ni uspel, ker podatki v strežniku niso ažurni."; +Strings.OfficeOM.L_DataNotMatchBindingType = "Navedeni podatkovni predmet ni združljiv z vrsto vezave."; Strings.OfficeOM.L_EventHandlerRemovalFailed = "Rutine za obravnavo dogodkov ni bilo mogoÄe odstraniti."; -Strings.OfficeOM.L_DataWriteError = "Napaka pri pisanju podatkov"; -Strings.OfficeOM.L_SSOClientErrorMessage = "V odjemalcu je priÅ¡lo do nepriÄakovane napake."; +Strings.OfficeOM.L_DataWriteReminder = "Opomnik za zapis podatkov"; Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = "Sprememb lastnosti »{0}« ni mogoÄe uporabiti z naÄinom predmeta »object.set«."; -Strings.OfficeOM.L_SettingNameNotExist = "Navedeno ime nastavitve ne obstaja."; +Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Program {0} ne obstaja. Microsoft.Office.WebExtension.Inicializiraj(razlog) ni bil klican."; +Strings.OfficeOM.L_GetDataParametersConflict = "Navedeni parametri so v sporu."; +Strings.OfficeOM.L_RunMustReturnPromise = "Paketna funkcija, poslana v metodo ».run«, ni vrnila obljube. Funkcija mora vrniti obljubo, tako da je vse samodejno sledene predmete mogoÄe izstaviti, ko je dokonÄan postopek paketa. ObiÄajno vrnete obljubo tako, da vrnete odgovor iz »context.sync()«."; +Strings.OfficeOM.L_NewWindowCrossZone = "Varnostne nastavitve v brskalniku onemogoÄajo ustvarjanje pogovornega okna. Poskusite uporabiti drug brskalnik ali {0}, tako da bosta »{1}« in domena, prikazana v naslovni vrstici, v istem varnostnem obmoÄju."; +Strings.OfficeOM.L_CustomXmlError = "Napaka XML po meri."; +Strings.OfficeOM.L_TooManyIncompleteRequests = "PoÄakajte, da se prejÅ¡nji klic dokonÄa."; +Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Navedena vrsta vezave ni združljiva s podanim imenovanim elementom."; Strings.OfficeOM.L_InValidOptionalArgument = "neveljaven izbirni argument"; +Strings.OfficeOM.L_AppNameNotExist = "Ime dodatka za {0} ne obstaja."; +Strings.OfficeOM.L_OperationNotSupported = "Postopek ni podprt."; +Strings.OfficeOM.L_InvalidAPICall = "Neveljaven klic API"; +Strings.OfficeOM.L_TooManyOptionalObjects = "na seznamu parametrov je veÄ izbirnih predmetov"; +Strings.OfficeOM.L_RequestTimeout = "Izvedba klica je trajala predolgo."; +Strings.OfficeOM.L_DataStale = "Podatki niso ažurni"; +Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Opomba: Å¡tevilo celic v tabeli naj bo manjÅ¡e od 20.000 celic."; +Strings.OfficeOM.L_InvalidSSOAddinMessage = "API identitete ni podprt za ta datotek."; +Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Podatki so zastareli. Znova dobite predmet."; +Strings.OfficeOM.L_NamedItemNotFound = "Imenovani element ne obstaja."; +Strings.OfficeOM.L_ApiNotFoundDetails = "Metoda ali lastnost {0} je del nabora zahtev {1}, ki ni na voljo za vaÅ¡o razliÄico programa {2}."; +Strings.OfficeOM.L_InvalidOrTimedOutSession = "Neveljavna ali potekla seja"; +Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Postopek ni uspel, ker ta dodatek že zahteva žeton za dostop."; +Strings.OfficeOM.L_SettingsStaleError = "Napaka zaradi zastarelih nastavitev"; +Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Datoteke ni mogoÄe dobiti zaradi napake omrežja."; +Strings.OfficeOM.L_UserAbortedMessage = "Uporabnik se ni strinjal z dovoljenji dodatka."; Strings.OfficeOM.L_InvalidResourceUrlMessage = "V manifestu je naveden neveljaven URL vira."; -Strings.OfficeOM.L_SliceSizeNotSupported = "Izbrana velikost rezine ni podrta."; -Strings.OfficeOM.L_UserNotSignedIn = "Noben uporabnik ni vpisan v Office."; -Strings.OfficeOM.L_FunctionCallFailed = "Klic funkcije {0} ni uspel, koda napake: {1}."; -Strings.OfficeOM.L_InvalidArgument = "Argument »{0}« ne deluje v tem primeru, manjka ali pa ni pravilne oblike zapisa."; +Strings.OfficeOM.L_InvalidBinding = "Neveljavna vezava"; +Strings.OfficeOM.L_SSOConnectionLostErrorMessage = "A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones."; +Strings.OfficeOM.L_InvalidCoercion = "Neveljavna vrsta pretvorbe"; +Strings.OfficeOM.L_SSOClientErrorMessage = "V odjemalcu je priÅ¡lo do nepriÄakovane napake."; +Strings.OfficeOM.L_ConnectionFailureWithStatus = "Zahteva ni uspela s kodo stanja {0}."; +Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Izberite želeno možnost."; +Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Trenutna izbira ni združljiva z navedeno vrsto prisile."; +Strings.OfficeOM.L_MultipleNamedItemFound = "Najdenih je bilo veÄ predmetov z istim imenom."; +Strings.OfficeOM.L_PropertyDoesNotExist = "Lastnost »{0}« ne obstaja v predmetu."; +Strings.OfficeOM.L_DataWriteError = "Napaka pri pisanju podatkov"; +Strings.OfficeOM.L_SSOConnectionLostError = "A connection was lost during the sign in process."; +Strings.OfficeOM.L_FileTypeNotSupported = "Navedena vrsta datoteke ni podprta."; +Strings.OfficeOM.L_CustomXmlNodeNotFound = "Navedenega vozliÅ¡Äa ni bilo mogoÄe najti."; +Strings.OfficeOM.L_NotSupported = "Funkcija {0} ni podprta."; +Strings.OfficeOM.L_ColIndexOutOfRange = "Vrednost indeksa stolpca je zunaj dovoljenega obsega. Uporabite vrednost (0 ali veÄjo), ki je manjÅ¡a od Å¡tevila stolpcev."; +Strings.OfficeOM.L_OsfControlTypeNotSupported = "Vrsta »OsfControl« ni podprta."; +Strings.OfficeOM.L_DataNotMatchBindingSize = "Posredovani podatkovni predmet se ne ujema z velikostjo trenutne izbire."; +Strings.OfficeOM.L_NoCapability = "Nimate ustreznih dovoljenj za izvedbo tega dejanja."; +Strings.OfficeOM.L_DialogRequireHTTPS = "Protokol HTTP ni podprt. Namesto tega uporabite HTTPS"; Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Dovoli"; -Strings.OfficeOM.L_InvalidNode = "Neveljavno vozliÅ¡Äe"; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage = "Postopek ni uspel, ker dodatek v tej kategoriji ne podpira soglasja uporabnika."; +Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Koordinatnih parametrov ni mogoÄe uporabiti s pretvorbeno tabelo, ko tabela vsebuje spojene celice."; +Strings.OfficeOM.L_DialogAlreadyOpened = "Postopek ni uspel, ker ima ta dodatek že aktivno pogovorno okno."; +Strings.OfficeOM.L_InvalidReadForBlankRow = "Navedena vrstica je prazna."; +Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Izbrana vsebina mora biti v obliki tabele. Oblikujte podatke v obliki tabele in poskusite znova."; +Strings.OfficeOM.L_PropertyNotLoaded = "Lastnost »{0}« ni na voljo. Preden preberete vrednost lastnosti, pokliÄite metodo nalaganja v predmetu, ki jo vsebuje, in v kontekstu povezane zahteve pokliÄite »context.sync()«."; +Strings.OfficeOM.L_InvalidSelectionForBindingType = "Vezi ni mogoÄe ustvariti s trenutno izbiro in z navedeno vrsto vezave."; +Strings.OfficeOM.L_InvalidFormat = "Neveljavna napaka pri oblikovanju"; +Strings.OfficeOM.L_APICallFailed = "Klic API ni uspel"; +Strings.OfficeOM.L_DisplayDialogError = "Napaka pri prikazu pogovornega okna"; +Strings.OfficeOM.L_GetSelectionNotSupported = "Trenutna izbira ni podprta."; +Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "konfigurirajte svoj brskalnik"; Strings.OfficeOM.L_DialogInvalidScheme = "Shema URL ni podprta. Namesto tega uporabite HTTPS."; -Strings.OfficeOM.L_MissingRequiredArguments = "Manjka nekaj zahtevanih argumentov"; -Strings.OfficeOM.L_DialogRequireHTTPS = "Protokol HTTP ni podprt. Namesto tega uporabite HTTPS"; -Strings.OfficeOM.L_UserAborted = "Uporabnik je prekinil zahtevo za soglasje."; +Strings.OfficeOM.L_ValueNotLoaded = "Vrednost predmeta rezultata Å¡e ni bila naložena. Preden preberete lastnost »Value«, v povezanem kontekstu zahteve pokliÄite »context.sync()«."; +Strings.OfficeOM.L_InternalError = "Notranja napaka"; +Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Preden dobite drugo datoteko, pokliÄite closeAsync za trenutno datoteko."; +Strings.OfficeOM.L_SSOServerErrorMessage = "V strežniku je priÅ¡lo do nepriÄakovane napake."; Strings.OfficeOM.L_InvalidColumnsForBinding = "Navedeni stolpci niso veljavni."; +Strings.OfficeOM.L_MissingRequiredArguments = "Manjka nekaj zahtevanih argumentov"; +Strings.OfficeOM.L_InvalidNode = "Neveljavno vozliÅ¡Äe"; +Strings.OfficeOM.L_OverwriteWorksheetData = "Nastavljena operacija ni uspela, ker bo posredovani podatkovni predmet prepisal ali premaknil podatke."; +Strings.OfficeOM.L_CannotRegisterEvent = "Rutine za obravnavo dogodkov ni mogoÄe registrirati."; +Strings.OfficeOM.L_UnknownBindingType = "Vrsta vpenjanja ni podprta."; +Strings.OfficeOM.L_CoercionTypeNotSupported = "Navedena vrsta prisile ni podprta."; Strings.OfficeOM.L_DialogAddressNotTrusted = "Domena URL-ja ni vkljuÄena v element AppDomains v manifestu."; -Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Opomba: Å¡tevilo celic v tabeli naj bo manjÅ¡e od 20.000 celic."; -Strings.OfficeOM.L_PropertyDoesNotExist = "Lastnost »{0}« ne obstaja v predmetu."; -Strings.OfficeOM.L_SSOServerErrorMessage = "V strežniku je priÅ¡lo do nepriÄakovane napake."; +Strings.OfficeOM.L_BrowserAPINotSupported = "Ta brskalnik ne podpira zahtevanega API-ja."; +Strings.OfficeOM.L_HostError = "Napaka gostitelja"; +Strings.OfficeOM.L_InvalidRequestContext = "Predmeta ni mogoÄe uporabiti v razliÄnih kontekstih zahteve."; +Strings.OfficeOM.L_SSOClientError = "V Officeovi zahtevi za preverjanje pristnosti je priÅ¡lo do napake."; +Strings.OfficeOM.L_InvalidSetRows = "Navedene vrstice niso veljavne."; +Strings.OfficeOM.L_CustomFunctionImplementationMissing = "Lastnost s tem imenom v lastnosti Excel.CustomFunctions, ki predstavlja definicijo funkcije, mora vsebovati lastnost »call«, ki implementira funkcijo."; +Strings.OfficeOM.L_SettingNameNotExist = "Navedeno ime nastavitve ne obstaja."; +Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Zaradi omejitev brskalnika nismo mogli ustvariti pogovornega okna. Domena pogovornega okna in domena gostitelja dodatka nista v istem varnostnem obmoÄju."; +Strings.OfficeOM.L_InvalidFormatValue = "V enem parametru ali veÄ parametrih »format« so vrednosti, ki niso dovoljene. Znova preverite vrednosti in poskusite znova."; +Strings.OfficeOM.L_EventHandlerNotExist = "Navedene rutine za obravnavo dogodkov ni bilo mogoÄe najti za to vpenjanje."; Strings.OfficeOM.L_UnsupportedDataObject = "Posredovana vrsta podatkovnega predmeta ni podprta."; -Strings.OfficeOM.L_NavOutOfBound = "Postopek ni uspel, ker je kazalo zunaj obsega."; -Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} želi prikazati novo okno."; -Strings.OfficeOM.L_EventRegistrationError = "Napaka pri prijavi na dogodek"; -Strings.OfficeOM.L_RequestTimeout = "Izvedba klica je trajala predolgo."; -Strings.OfficeOM.L_PermissionDenied = "Dovoljenje je zavrnjeno"; -Strings.OfficeOM.L_DialogOK = "V redu"; -Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Koordinatnih parametrov ni mogoÄe uporabiti s pretvorbeno tabelo, ko tabela vsebuje spojene celice."; -Strings.OfficeOM.L_InvalidCoercion = "Neveljavna vrsta pretvorbe"; -Strings.OfficeOM.L_DocumentReadOnly = "Zahtevan postopek ni dovoljen v trenutnem naÄinu dokumenta."; -Strings.OfficeOM.L_EventHandlerAdditionFailed = "Rutine za obravnavo dogodkov ni bilo mogoÄe dodati."; -Strings.OfficeOM.L_InternalError = "Notranja napaka"; -Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Dodatek že zahteva žeton za dostop."; -Strings.OfficeOM.L_DataWriteReminder = "Opomnik za zapis podatkov"; +Strings.OfficeOM.L_IndexOutOfRange = "Indeks je zunaj obsega."; +Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Prezri"; +Strings.OfficeOM.L_InternalErrorDescription = "PriÅ¡lo je do notranje napake."; Strings.OfficeOM.L_BindingToMultipleSelection = "NestiÄni izbori niso podprti."; -Strings.OfficeOM.L_FormattingReminder = "Opomnik za oblikovanje"; +Strings.OfficeOM.L_SettingsCannotSave = "Nastavitev ni bilo mogoÄe shraniti."; +Strings.OfficeOM.L_CannotWriteToSelection = "V trenutno izbiro ni mogoÄe pisati."; +Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Opomba: za nabore oblikovanja, ki jih je nastavil klic vmesnika API za oblikovanje, priporoÄamo, da so pod 100."; Strings.OfficeOM.L_UserClickIgnore = "Uporabnik se je odloÄil prezrti pogovorno okno."; -Strings.OfficeOM.L_ColIndexOutOfRange = "Vrednost indeksa stolpca je zunaj dovoljenega obsega. Uporabite vrednost (0 ali veÄjo), ki je manjÅ¡a od Å¡tevila stolpcev."; -Strings.OfficeOM.L_NotSupported = "Funkcija {0} ni podprta."; -Strings.OfficeOM.L_SSOServerError = "Pri ponudniku preverjanja pristnosti je priÅ¡lo do napake."; +Strings.OfficeOM.L_InvalidGrant = "Manjka vnaprejÅ¡nje pooblastilo."; +Strings.OfficeOM.L_FormattingReminder = "Opomnik za oblikovanje"; Strings.OfficeOM.L_SaveSettingsError = "Napaka pri shranjevanju nastavitev"; -Strings.OfficeOM.L_UnknownBindingType = "Vrsta vpenjanja ni podprta."; -Strings.OfficeOM.L_DataReadError = "Napaka pri branju podatkov"; -Strings.OfficeOM.L_InvalidGetRows = "Navedene vrstice niso veljavne."; -Strings.OfficeOM.L_ConnectionFailureWithStatus = "Zahteva ni uspela s kodo stanja {0}."; -Strings.OfficeOM.L_InvalidSelectionForBindingType = "Vezi ni mogoÄe ustvariti s trenutno izbiro in z navedeno vrsto vezave."; -Strings.OfficeOM.L_CustomXmlError = "Napaka XML po meri."; -Strings.OfficeOM.L_InvalidSetColumns = "Navedeni stolpci niso veljavni."; -Strings.OfficeOM.L_OverwriteWorksheetData = "Nastavljena operacija ni uspela, ker bo posredovani podatkovni predmet prepisal ali premaknil podatke."; -Strings.OfficeOM.L_MissingParameter = "ManjkajoÄi parameter"; -Strings.OfficeOM.L_UnsupportedEnumerationMessage = "OÅ¡tevilÄenje ni podprto v trenutnem gostiteljskem programu."; -Strings.OfficeOM.L_Timeout = "ÄŒasovna omejitev postopka je potekla."; -Strings.OfficeOM.L_ConnectionFailureWithDetails = "Zahteva ni uspela s kodo stanja {0}, kodo napake {1} in s tem sporoÄilom o napaki: {2}"; -Strings.OfficeOM.L_RunMustReturnPromise = "Paketna funkcija, poslana v metodo ».run«, ni vrnila obljube. Funkcija mora vrniti obljubo, tako da je vse samodejno sledene predmete mogoÄe izstaviti, ko je dokonÄan postopek paketa. ObiÄajno vrnete obljubo tako, da vrnete odgovor iz »context.sync()«."; -Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "VaÅ¡a seja storitve Office Online je potekla ali ni veljavna. ÄŒe želite nadaljevati, osvežite stran."; -Strings.OfficeOM.L_DataNotMatchBindingType = "Navedeni podatkovni predmet ni združljiv z vrsto vezave."; -Strings.OfficeOM.L_SpecifiedIdNotExist = "Navedeni ID ne obstaja."; -Strings.OfficeOM.L_TooManyOptionalFunction = "na seznamu parametrov je veÄ izbirnih funkcij"; -Strings.OfficeOM.L_RowIndexOutOfRange = "Vrednost indeksa vrstice je zunaj dovoljenega obsega. Uporabite vrednost (0 ali veÄjo), ki je manjÅ¡a od Å¡tevila vrstic."; -Strings.OfficeOM.L_EventHandlerNotExist = "Navedene rutine za obravnavo dogodkov ni bilo mogoÄe najti za to vpenjanje."; -Strings.OfficeOM.L_TooManyOptionalObjects = "na seznamu parametrov je veÄ izbirnih predmetov"; -Strings.OfficeOM.L_InvalidTableOptionValue = "V enem parametru ali veÄ parametrih »tableOptions« so vrednosti, ki niso dovoljene. Znova preverite vrednosti in poskusite znova."; -Strings.OfficeOM.L_DataNotMatchSelection = "Posredovani podatkovni predmet ni združljiv z obliko ali dimenzijami trenutne izbire."; -Strings.OfficeOM.L_NetworkProblem = "Težava z omrežjem"; -Strings.OfficeOM.L_InvalidSetRows = "Navedene vrstice niso veljavne."; -Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Zaradi omejitev brskalnika nismo mogli ustvariti pogovornega okna. Domena pogovornega okna in domena gostitelja dodatka nista v istem varnostnem obmoÄju."; -Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Program {0} ne obstaja. Microsoft.Office.WebExtension.Inicializiraj(razlog) ni bil klican."; -Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Neveljavni argumenti vnosa"; -Strings.OfficeOM.L_InvalidOrTimedOutSession = "Neveljavna ali potekla seja"; -Strings.OfficeOM.L_OutOfRange = "Zunaj obsega"; +Strings.OfficeOM.L_SSOServerError = "Pri ponudniku preverjanja pristnosti je priÅ¡lo do napake."; +Strings.OfficeOM.L_ActivityLimitReached = "Dosežena je omejitev dejavnosti."; +Strings.OfficeOM.L_InvalidCellsValue = "V enem parametru ali veÄ parametrih »cells« so vrednosti, ki niso dovoljene. Znova preverite vrednosti in poskusite znova."; Strings.OfficeOM.L_InvalidDataObject = "Neveljaven podatkovni predmet"; -Strings.OfficeOM.L_FormatValueOutOfRange = "Vrednost je zunaj dovoljenega obsega."; -Strings.OfficeOM.L_InvalidFormatValue = "V enem parametru ali veÄ parametrih »format« so vrednosti, ki niso dovoljene. Znova preverite vrednosti in poskusite znova."; +Strings.OfficeOM.L_InitializeNotReady = "Office.js se Å¡e ni v celoti naložil. Poskusite znova kasneje ali dodajte svojo inicializacijsko kodo funkciji »Office.initialize«."; Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Dosežena je bila omejitev za izbiro"; +Strings.OfficeOM.L_SpecifiedIdNotExist = "Navedeni ID ne obstaja."; +Strings.OfficeOM.L_InvalidArgumentGeneric = "Argumenti, podani v funkciji, ne delujejo v tem primeru, manjkajo ali pa niso pravilne oblike zapisa."; Strings.OfficeOM.L_RedundantCallbackSpecification = "Povratnega klica ni mogoÄe navesti hkrati v seznamu argumentov in v izbirnem predmetu."; -Strings.OfficeOM.L_CustomXmlOutOfDateName = "Podatki niso ažurni"; -Strings.OfficeOM.L_NoCapability = "Nimate ustreznih dovoljenj za izvedbo tega dejanja."; -Strings.OfficeOM.L_InvalidApiCallInContext = "Neveljaven klic API v trenutnem kontekstu."; -Strings.OfficeOM.L_GetDataParametersConflict = "Navedeni parametri so v sporu."; -Strings.OfficeOM.L_AppNameNotExist = "Ime dodatka za {0} ne obstaja."; -Strings.OfficeOM.L_BrowserAPINotSupported = "Ta brskalnik ne podpira zahtevanega API-ja."; -Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "konfigurirajte svoj brskalnik"; -Strings.OfficeOM.L_CannotNavigateTo = "Predmet je na mestu, kjer krmarjenje ni podprto."; -Strings.OfficeOM.L_NewWindowCrossZone = "Varnostne nastavitve v brskalniku onemogoÄajo ustvarjanje pogovornega okna. Poskusite uporabiti drug brskalnik ali {0}, tako da bosta »{1}« in domena, prikazana v naslovni vrstici, v istem varnostnem obmoÄju."; -Strings.OfficeOM.L_DialogNavigateError = "Napaka pri premikanju po pogovornem oknu"; -Strings.OfficeOM.L_InvalidFormat = "Neveljavna napaka pri oblikovanju"; -Strings.OfficeOM.L_CannotWriteToSelection = "V trenutno izbiro ni mogoÄe pisati."; -Strings.OfficeOM.L_SettingsCannotSave = "Nastavitev ni bilo mogoÄe shraniti."; -Strings.OfficeOM.L_RequestTokenUnavailable = "Ta API je bil zaduÅ¡en zato, da je bila zmanjÅ¡ana pogostost klicanja."; -Strings.OfficeOM.L_BindingCreationError = "Napaka pri ustvarjanju vezave"; -Strings.OfficeOM.L_DataStale = "Podatki niso ažurni"; -Strings.OfficeOM.L_InvalidValue = "Neveljavna vrednost"; -Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Trenutna izbira ni združljiva z navedeno vrsto prisile."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Postopek ni uspel, ker ta dodatek že zahteva žeton za dostop."; -Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Koordinatnih parametrov ni mogoÄe uporabiti s pretvorbeno tabelo, ko tabela vsebuje spojene celice."; -Strings.OfficeOM.L_DataNotMatchBindingSize = "Posredovani podatkovni predmet se ne ujema z velikostjo trenutne izbire."; -Strings.OfficeOM.L_CoercionTypeNotSupported = "Navedena vrsta prisile ni podprta."; -Strings.OfficeOM.L_InitializeNotReady = "Office.js se Å¡e ni v celoti naložil. Poskusite znova kasneje ali dodajte svojo inicializacijsko kodo funkciji »Office.initialize«."; -Strings.OfficeOM.L_APINotSupported = "Klic API ni podprt"; -Strings.OfficeOM.L_CannotRegisterEvent = "Rutine za obravnavo dogodkov ni mogoÄe registrirati."; -Strings.OfficeOM.L_FileTypeNotSupported = "Navedena vrsta datoteke ni podprta."; -Strings.OfficeOM.L_ElementMissing = "Celice tabele ni mogoÄe oblikovati, ker manjkajo nekatere vrednosti parametrov. Znova preverite parametre in poskusite znova."; -Strings.OfficeOM.L_InvalidRequestContext = "Predmeta ni mogoÄe uporabiti v razliÄnih kontekstih zahteve."; -Strings.OfficeOM.L_NotImplemented = "Funkcija {0} ni izvedena."; -Strings.OfficeOM.L_UserAbortedMessage = "Uporabnik se ni strinjal z dovoljenji dodatka."; -Strings.OfficeOM.L_InvalidDataFormat = "Oblika navedenega podatkovnega predmeta je neveljavna."; -Strings.OfficeOM.L_InvalidCellsValue = "V enem parametru ali veÄ parametrih »cells« so vrednosti, ki niso dovoljene. Znova preverite vrednosti in poskusite znova."; -Strings.OfficeOM.L_ActivityLimitReached = "Dosežena je omejitev dejavnosti."; -Strings.OfficeOM.L_MemoryLimit = "Presežena je omejitev pomnilnika"; -Strings.OfficeOM.L_NamedItemNotFound = "Imenovani element ne obstaja."; -Strings.OfficeOM.L_CallbackNotAFunction = "Povratni klic mora biti vrste funkcija. Bil je vrste {0}."; -Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Navedeni vrednosti »rowCount« ali »columnCount« nista veljavni."; -Strings.OfficeOM.L_ReadSettingsError = "Napaka pri branju nastavitev"; +Strings.OfficeOM.L_SelectionCannotBound = "Na trenutno izbiro ni mogoÄe vezati."; +Strings.OfficeOM.L_DataReadError = "Napaka pri branju podatkov"; +Strings.OfficeOM.L_CustomFunctionNameCannotSplit = "V imenu funkcije mora biti neprazen imenski prostor in neprazno kratko ime."; Strings.OfficeOM.L_InvalidGetColumns = "Navedeni stolpci niso veljavni."; -Strings.OfficeOM.L_PropertyNotLoaded = "Lastnost »{0}« ni na voljo. Preden preberete vrednost lastnosti, pokliÄite metodo nalaganja v predmetu, ki jo vsebuje, in v kontekstu povezane zahteve pokliÄite »context.sync()«."; -Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Navedena vrsta vezave ni združljiva s podanim imenovanim elementom."; -Strings.OfficeOM.L_HostError = "Napaka gostitelja"; +Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Dodatek že zahteva žeton za dostop."; +Strings.OfficeOM.L_BindingCreationError = "Napaka pri ustvarjanju vezave"; Strings.OfficeOM.L_InvalidGetStartRowColumn = "Navedeni vrednosti »startRow« ali »startColumn« nista veljavni."; -Strings.OfficeOM.L_InvalidArgumentGeneric = "Argumenti, podani v funkciji, ne delujejo v tem primeru, manjkajo ali pa niso pravilne oblike zapisa."; -Strings.OfficeOM.L_SSOClientError = "V Officeovi zahtevi za preverjanje pristnosti je priÅ¡lo do napake."; -Strings.OfficeOM.L_InvalidResourceUrl = "Vnesen je URL vira neveljavne aplikacije."; -Strings.OfficeOM.L_BindingNotExist = "Navedena vrsta vezave ne obstaja."; -Strings.OfficeOM.L_UnsupportedEnumeration = "Nepodprto naÅ¡tevanje"; -Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath omejuje izbor na 1024 elementov."; -Strings.OfficeOM.L_InvalidBindingOperation = "Neveljaven postopek vezave."; +Strings.OfficeOM.L_ConnectionFailureWithDetails = "Zahteva ni uspela s kodo stanja {0}, kodo napake {1} in s tem sporoÄilom o napaki: {2}"; +Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "VaÅ¡a seja storitve Office Online je potekla ali ni veljavna. ÄŒe želite nadaljevati, osvežite stran."; +Strings.OfficeOM.L_CustomFunctionDefinitionMissing = "Lastnost s tem imenom, ki predstavlja definicijo funkcije, mora obstajati v lastnosti Excel.CustomFunctions."; +Strings.OfficeOM.L_CannotNavigateTo = "Predmet je na mestu, kjer krmarjenje ni podprto."; Strings.OfficeOM.L_NotSupportedEventType = "Navedena vrsta dogodka {0} ni podprta. "; -Strings.OfficeOM.L_InvalidSSOAddinMessage = "API identitete ni podprta za ta datotek." +Strings.OfficeOM.L_TooManyArguments = "preveÄ argumentov"; +Strings.OfficeOM.L_EventRegistrationError = "Napaka pri prijavi na dogodek"; +Strings.OfficeOM.L_InvalidApiCallInContext = "Neveljaven klic API v trenutnem kontekstu."; +Strings.OfficeOM.L_InvalidResourceUrl = "Vnesen je URL vira neveljavne aplikacije."; +Strings.OfficeOM.L_DialogNavigateError = "Napaka pri premikanju po pogovornem oknu" \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/sl-si/office_strings.js b/node_modules/@microsoft/office-js/dist/sl-si/office_strings.js index fd7b0c8..89ea5d7 100644 --- a/node_modules/@microsoft/office-js/dist/sl-si/office_strings.js +++ b/node_modules/@microsoft/office-js/dist/sl-si/office_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_OperationNotSupported="Postopek ni podprt.";Strings.OfficeOM.L_TooManyIncompleteRequests="PoÄakajte, da se prejÅ¡nji klic dokonÄa.";Strings.OfficeOM.L_ShuttingDown="Postopek ni uspel, ker podatki v strežniku niso ažurni.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Prezri";Strings.OfficeOM.L_InvalidAPICall="Neveljaven klic API";Strings.OfficeOM.L_MultipleNamedItemFound="Najdenih je bilo veÄ predmetov z istim imenom.";Strings.OfficeOM.L_TooManyArguments="preveÄ argumentov";Strings.OfficeOM.L_InvalidReadForBlankRow="Navedena vrstica je prazna.";Strings.OfficeOM.L_OsfControlTypeNotSupported="Vrsta »OsfControl« ni podprta.";Strings.OfficeOM.L_SetDataIsTooLarge="Navedeni podatkovni predmet je prevelik.";Strings.OfficeOM.L_DataNotMatchCoercionType="Vrsta navedenega podatkovnega predmeta ni združljiva s trenutno izbiro.";Strings.OfficeOM.L_NotSupportedBindingType="Navedena vrsta vezave {0} ni podprta. ";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Izberite želeno možnost.";Strings.OfficeOM.L_InvalidGrant="Manjka vnaprejÅ¡nje pooblastilo.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Podatki so zastareli. Znova dobite predmet.";Strings.OfficeOM.L_InvalidGrantMessage="Manjka odobritev za ta dodatek.";Strings.OfficeOM.L_InvalidBinding="Neveljavna vezava";Strings.OfficeOM.L_BadSelectorString="Niz, posredovan v izbirnik, ni pravilno oblikovana ali pa ni podprt.";Strings.OfficeOM.L_DisplayDialogError="Napaka pri prikazu pogovornega okna";Strings.OfficeOM.L_SettingsStaleError="Napaka zaradi zastarelih nastavitev";Strings.OfficeOM.L_SetDataParametersConflict="Navedeni parametri so v sporu.";Strings.OfficeOM.L_DialogAlreadyOpened="Postopek ni uspel, ker ima ta dodatek že aktivno pogovorno okno.";Strings.OfficeOM.L_CustomXmlNodeNotFound="Navedenega vozliÅ¡Äa ni bilo mogoÄe najti.";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Preden dobite drugo datoteko, pokliÄite closeAsync za trenutno datoteko.";Strings.OfficeOM.L_SelectionCannotBound="Na trenutno izbiro ni mogoÄe vezati.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="Poskus nastavitve lastnosti samo za branje »{0}«.";Strings.OfficeOM.L_InvalidParameters="Parametri funkcije {0} so neveljavni.";Strings.OfficeOM.L_SettingsAreStale="Nastavitev ni mogoÄe shraniti, ker niso ažurne.";Strings.OfficeOM.L_ValueNotLoaded="Vrednost predmeta rezultata Å¡e ni bila naložena. Preden preberete lastnost »Value«, v povezanem kontekstu zahteve pokliÄite »context.sync()«.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Navedena vrsta prisile ni združljiva s to vrsto vezave.";Strings.OfficeOM.L_InvalidSetStartRowColumn="Navedeni vrednosti »startRow« ali »startColumn« nista veljavni.";Strings.OfficeOM.L_InvalidBindingError="Napaka neveljavne vezave";Strings.OfficeOM.L_UnsupportedUserIdentity="Vrsta identitete uporabnika ni podprta.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Opomba: za nabore oblikovanja, ki jih je nastavil klic vmesnika API za oblikovanje, priporoÄamo, da so pod 100.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Postopek ni podprt v tej vrsti vezave.";Strings.OfficeOM.L_InvalidObjectPath="Pot predmeta »{0}« ne deluje za namen, ki ga želite. ÄŒe predmet uporabljate v veÄ klicih »context.sync« in zunaj zaporedne izvedbe paketa ».run«, uporabite medoti »context.trackedObjects.add()« in »context.trackedObjects.remove()« za upravljanje življenjskega cikla predmeta.";Strings.OfficeOM.L_IndexOutOfRange="Indeks je zunaj obsega.";Strings.OfficeOM.L_InternalErrorDescription="PriÅ¡lo je do notranje napake.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Vrsta identitete uporabnika ni podprta.";Strings.OfficeOM.L_GetDataIsTooLarge="Zahtevani nabor podatkov je prevelik.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Izbrana vsebina mora biti v obliki tabele. Oblikujte podatke v obliki tabele in poskusite znova.";Strings.OfficeOM.L_GetSelectionNotSupported="Trenutna izbira ni podprta.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Datoteke ni mogoÄe dobiti zaradi napake omrežja.";Strings.OfficeOM.L_APICallFailed="Klic API ni uspel";Strings.OfficeOM.L_EventHandlerRemovalFailed="Rutine za obravnavo dogodkov ni bilo mogoÄe odstraniti.";Strings.OfficeOM.L_DataWriteError="Napaka pri pisanju podatkov";Strings.OfficeOM.L_SSOClientErrorMessage="V odjemalcu je priÅ¡lo do nepriÄakovane napake.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="Sprememb lastnosti »{0}« ni mogoÄe uporabiti z naÄinom predmeta »object.set«.";Strings.OfficeOM.L_SettingNameNotExist="Navedeno ime nastavitve ne obstaja.";Strings.OfficeOM.L_InValidOptionalArgument="neveljaven izbirni argument";Strings.OfficeOM.L_InvalidResourceUrlMessage="V manifestu je naveden neveljaven URL vira.";Strings.OfficeOM.L_SliceSizeNotSupported="Izbrana velikost rezine ni podrta.";Strings.OfficeOM.L_UserNotSignedIn="Noben uporabnik ni vpisan v Office.";Strings.OfficeOM.L_FunctionCallFailed="Klic funkcije {0} ni uspel, koda napake: {1}.";Strings.OfficeOM.L_InvalidArgument="Argument »{0}« ne deluje v tem primeru, manjka ali pa ni pravilne oblike zapisa.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Dovoli";Strings.OfficeOM.L_InvalidNode="Neveljavno vozliÅ¡Äe";Strings.OfficeOM.L_DialogInvalidScheme="Shema URL ni podprta. Namesto tega uporabite HTTPS.";Strings.OfficeOM.L_MissingRequiredArguments="Manjka nekaj zahtevanih argumentov";Strings.OfficeOM.L_DialogRequireHTTPS="Protokol HTTP ni podprt. Namesto tega uporabite HTTPS";Strings.OfficeOM.L_UserAborted="Uporabnik je prekinil zahtevo za soglasje.";Strings.OfficeOM.L_InvalidColumnsForBinding="Navedeni stolpci niso veljavni.";Strings.OfficeOM.L_DialogAddressNotTrusted="Domena URL-ja ni vkljuÄena v element AppDomains v manifestu.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Opomba: Å¡tevilo celic v tabeli naj bo manjÅ¡e od 20.000 celic.";Strings.OfficeOM.L_PropertyDoesNotExist="Lastnost »{0}« ne obstaja v predmetu.";Strings.OfficeOM.L_SSOServerErrorMessage="V strežniku je priÅ¡lo do nepriÄakovane napake.";Strings.OfficeOM.L_UnsupportedDataObject="Posredovana vrsta podatkovnega predmeta ni podprta.";Strings.OfficeOM.L_NavOutOfBound="Postopek ni uspel, ker je kazalo zunaj obsega.";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} želi prikazati novo okno.";Strings.OfficeOM.L_EventRegistrationError="Napaka pri prijavi na dogodek";Strings.OfficeOM.L_RequestTimeout="Izvedba klica je trajala predolgo.";Strings.OfficeOM.L_PermissionDenied="Dovoljenje je zavrnjeno";Strings.OfficeOM.L_DialogOK="V redu";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Koordinatnih parametrov ni mogoÄe uporabiti s pretvorbeno tabelo, ko tabela vsebuje spojene celice.";Strings.OfficeOM.L_InvalidCoercion="Neveljavna vrsta pretvorbe";Strings.OfficeOM.L_DocumentReadOnly="Zahtevan postopek ni dovoljen v trenutnem naÄinu dokumenta.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Rutine za obravnavo dogodkov ni bilo mogoÄe dodati.";Strings.OfficeOM.L_InternalError="Notranja napaka";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Dodatek že zahteva žeton za dostop.";Strings.OfficeOM.L_DataWriteReminder="Opomnik za zapis podatkov";Strings.OfficeOM.L_BindingToMultipleSelection="NestiÄni izbori niso podprti.";Strings.OfficeOM.L_FormattingReminder="Opomnik za oblikovanje";Strings.OfficeOM.L_UserClickIgnore="Uporabnik se je odloÄil prezrti pogovorno okno.";Strings.OfficeOM.L_ColIndexOutOfRange="Vrednost indeksa stolpca je zunaj dovoljenega obsega. Uporabite vrednost (0 ali veÄjo), ki je manjÅ¡a od Å¡tevila stolpcev.";Strings.OfficeOM.L_NotSupported="Funkcija {0} ni podprta.";Strings.OfficeOM.L_SSOServerError="Pri ponudniku preverjanja pristnosti je priÅ¡lo do napake.";Strings.OfficeOM.L_SaveSettingsError="Napaka pri shranjevanju nastavitev";Strings.OfficeOM.L_UnknownBindingType="Vrsta vpenjanja ni podprta.";Strings.OfficeOM.L_DataReadError="Napaka pri branju podatkov";Strings.OfficeOM.L_InvalidGetRows="Navedene vrstice niso veljavne.";Strings.OfficeOM.L_ConnectionFailureWithStatus="Zahteva ni uspela s kodo stanja {0}.";Strings.OfficeOM.L_InvalidSelectionForBindingType="Vezi ni mogoÄe ustvariti s trenutno izbiro in z navedeno vrsto vezave.";Strings.OfficeOM.L_CustomXmlError="Napaka XML po meri.";Strings.OfficeOM.L_InvalidSetColumns="Navedeni stolpci niso veljavni.";Strings.OfficeOM.L_OverwriteWorksheetData="Nastavljena operacija ni uspela, ker bo posredovani podatkovni predmet prepisal ali premaknil podatke.";Strings.OfficeOM.L_MissingParameter="ManjkajoÄi parameter";Strings.OfficeOM.L_UnsupportedEnumerationMessage="OÅ¡tevilÄenje ni podprto v trenutnem gostiteljskem programu.";Strings.OfficeOM.L_Timeout="ÄŒasovna omejitev postopka je potekla.";Strings.OfficeOM.L_ConnectionFailureWithDetails="Zahteva ni uspela s kodo stanja {0}, kodo napake {1} in s tem sporoÄilom o napaki: {2}";Strings.OfficeOM.L_RunMustReturnPromise="Paketna funkcija, poslana v metodo ».run«, ni vrnila obljube. Funkcija mora vrniti obljubo, tako da je vse samodejno sledene predmete mogoÄe izstaviti, ko je dokonÄan postopek paketa. ObiÄajno vrnete obljubo tako, da vrnete odgovor iz »context.sync()«.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="VaÅ¡a seja storitve Office Online je potekla ali ni veljavna. ÄŒe želite nadaljevati, osvežite stran.";Strings.OfficeOM.L_DataNotMatchBindingType="Navedeni podatkovni predmet ni združljiv z vrsto vezave.";Strings.OfficeOM.L_SpecifiedIdNotExist="Navedeni ID ne obstaja.";Strings.OfficeOM.L_TooManyOptionalFunction="na seznamu parametrov je veÄ izbirnih funkcij";Strings.OfficeOM.L_RowIndexOutOfRange="Vrednost indeksa vrstice je zunaj dovoljenega obsega. Uporabite vrednost (0 ali veÄjo), ki je manjÅ¡a od Å¡tevila vrstic.";Strings.OfficeOM.L_EventHandlerNotExist="Navedene rutine za obravnavo dogodkov ni bilo mogoÄe najti za to vpenjanje.";Strings.OfficeOM.L_TooManyOptionalObjects="na seznamu parametrov je veÄ izbirnih predmetov";Strings.OfficeOM.L_InvalidTableOptionValue="V enem parametru ali veÄ parametrih »tableOptions« so vrednosti, ki niso dovoljene. Znova preverite vrednosti in poskusite znova.";Strings.OfficeOM.L_DataNotMatchSelection="Posredovani podatkovni predmet ni združljiv z obliko ali dimenzijami trenutne izbire.";Strings.OfficeOM.L_NetworkProblem="Težava z omrežjem";Strings.OfficeOM.L_InvalidSetRows="Navedene vrstice niso veljavne.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Zaradi omejitev brskalnika nismo mogli ustvariti pogovornega okna. Domena pogovornega okna in domena gostitelja dodatka nista v istem varnostnem obmoÄju.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Program {0} ne obstaja. Microsoft.Office.WebExtension.Inicializiraj(razlog) ni bil klican.";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Neveljavni argumenti vnosa";Strings.OfficeOM.L_InvalidOrTimedOutSession="Neveljavna ali potekla seja";Strings.OfficeOM.L_OutOfRange="Zunaj obsega";Strings.OfficeOM.L_InvalidDataObject="Neveljaven podatkovni predmet";Strings.OfficeOM.L_FormatValueOutOfRange="Vrednost je zunaj dovoljenega obsega.";Strings.OfficeOM.L_InvalidFormatValue="V enem parametru ali veÄ parametrih »format« so vrednosti, ki niso dovoljene. Znova preverite vrednosti in poskusite znova.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Dosežena je bila omejitev za izbiro";Strings.OfficeOM.L_RedundantCallbackSpecification="Povratnega klica ni mogoÄe navesti hkrati v seznamu argumentov in v izbirnem predmetu.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Podatki niso ažurni";Strings.OfficeOM.L_NoCapability="Nimate ustreznih dovoljenj za izvedbo tega dejanja.";Strings.OfficeOM.L_InvalidApiCallInContext="Neveljaven klic API v trenutnem kontekstu.";Strings.OfficeOM.L_GetDataParametersConflict="Navedeni parametri so v sporu.";Strings.OfficeOM.L_AppNameNotExist="Ime dodatka za {0} ne obstaja.";Strings.OfficeOM.L_BrowserAPINotSupported="Ta brskalnik ne podpira zahtevanega API-ja.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="konfigurirajte svoj brskalnik";Strings.OfficeOM.L_CannotNavigateTo="Predmet je na mestu, kjer krmarjenje ni podprto.";Strings.OfficeOM.L_NewWindowCrossZone="Varnostne nastavitve v brskalniku onemogoÄajo ustvarjanje pogovornega okna. Poskusite uporabiti drug brskalnik ali {0}, tako da bosta »{1}« in domena, prikazana v naslovni vrstici, v istem varnostnem obmoÄju.";Strings.OfficeOM.L_DialogNavigateError="Napaka pri premikanju po pogovornem oknu";Strings.OfficeOM.L_InvalidFormat="Neveljavna napaka pri oblikovanju";Strings.OfficeOM.L_CannotWriteToSelection="V trenutno izbiro ni mogoÄe pisati.";Strings.OfficeOM.L_SettingsCannotSave="Nastavitev ni bilo mogoÄe shraniti.";Strings.OfficeOM.L_RequestTokenUnavailable="Ta API je bil zaduÅ¡en zato, da je bila zmanjÅ¡ana pogostost klicanja.";Strings.OfficeOM.L_BindingCreationError="Napaka pri ustvarjanju vezave";Strings.OfficeOM.L_DataStale="Podatki niso ažurni";Strings.OfficeOM.L_InvalidValue="Neveljavna vrednost";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Trenutna izbira ni združljiva z navedeno vrsto prisile.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Postopek ni uspel, ker ta dodatek že zahteva žeton za dostop.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Koordinatnih parametrov ni mogoÄe uporabiti s pretvorbeno tabelo, ko tabela vsebuje spojene celice.";Strings.OfficeOM.L_DataNotMatchBindingSize="Posredovani podatkovni predmet se ne ujema z velikostjo trenutne izbire.";Strings.OfficeOM.L_CoercionTypeNotSupported="Navedena vrsta prisile ni podprta.";Strings.OfficeOM.L_InitializeNotReady="Office.js se Å¡e ni v celoti naložil. Poskusite znova kasneje ali dodajte svojo inicializacijsko kodo funkciji »Office.initialize«.";Strings.OfficeOM.L_APINotSupported="Klic API ni podprt";Strings.OfficeOM.L_CannotRegisterEvent="Rutine za obravnavo dogodkov ni mogoÄe registrirati.";Strings.OfficeOM.L_FileTypeNotSupported="Navedena vrsta datoteke ni podprta.";Strings.OfficeOM.L_ElementMissing="Celice tabele ni mogoÄe oblikovati, ker manjkajo nekatere vrednosti parametrov. Znova preverite parametre in poskusite znova.";Strings.OfficeOM.L_InvalidRequestContext="Predmeta ni mogoÄe uporabiti v razliÄnih kontekstih zahteve.";Strings.OfficeOM.L_NotImplemented="Funkcija {0} ni izvedena.";Strings.OfficeOM.L_UserAbortedMessage="Uporabnik se ni strinjal z dovoljenji dodatka.";Strings.OfficeOM.L_InvalidDataFormat="Oblika navedenega podatkovnega predmeta je neveljavna.";Strings.OfficeOM.L_InvalidCellsValue="V enem parametru ali veÄ parametrih »cells« so vrednosti, ki niso dovoljene. Znova preverite vrednosti in poskusite znova.";Strings.OfficeOM.L_ActivityLimitReached="Dosežena je omejitev dejavnosti.";Strings.OfficeOM.L_MemoryLimit="Presežena je omejitev pomnilnika";Strings.OfficeOM.L_NamedItemNotFound="Imenovani element ne obstaja.";Strings.OfficeOM.L_CallbackNotAFunction="Povratni klic mora biti vrste funkcija. Bil je vrste {0}.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Navedeni vrednosti »rowCount« ali »columnCount« nista veljavni.";Strings.OfficeOM.L_ReadSettingsError="Napaka pri branju nastavitev";Strings.OfficeOM.L_InvalidGetColumns="Navedeni stolpci niso veljavni.";Strings.OfficeOM.L_PropertyNotLoaded="Lastnost »{0}« ni na voljo. Preden preberete vrednost lastnosti, pokliÄite metodo nalaganja v predmetu, ki jo vsebuje, in v kontekstu povezane zahteve pokliÄite »context.sync()«.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Navedena vrsta vezave ni združljiva s podanim imenovanim elementom.";Strings.OfficeOM.L_HostError="Napaka gostitelja";Strings.OfficeOM.L_InvalidGetStartRowColumn="Navedeni vrednosti »startRow« ali »startColumn« nista veljavni.";Strings.OfficeOM.L_InvalidArgumentGeneric="Argumenti, podani v funkciji, ne delujejo v tem primeru, manjkajo ali pa niso pravilne oblike zapisa.";Strings.OfficeOM.L_SSOClientError="V Officeovi zahtevi za preverjanje pristnosti je priÅ¡lo do napake.";Strings.OfficeOM.L_InvalidResourceUrl="Vnesen je URL vira neveljavne aplikacije.";Strings.OfficeOM.L_BindingNotExist="Navedena vrsta vezave ne obstaja.";Strings.OfficeOM.L_UnsupportedEnumeration="Nepodprto naÅ¡tevanje";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath omejuje izbor na 1024 elementov.";Strings.OfficeOM.L_InvalidBindingOperation="Neveljaven postopek vezave.";Strings.OfficeOM.L_NotSupportedEventType="Navedena vrsta dogodka {0} ni podprta. ";Strings.OfficeOM.L_InvalidSSOAddinMessage="API identitete ni podprta za ta datotek." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_CallbackNotAFunction="Povratni klic mora biti vrste funkcija. Bil je vrste {0}.";Strings.OfficeOM.L_NavOutOfBound="Postopek ni uspel, ker je kazalo zunaj obsega.";Strings.OfficeOM.L_TooManyOptionalFunction="na seznamu parametrov je veÄ izbirnih funkcij";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Vrsta identitete uporabnika ni podprta.";Strings.OfficeOM.L_UnsupportedUserIdentity="Vrsta identitete uporabnika ni podprta.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Postopek ni podprt v tej vrsti vezave.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Navedena vrsta prisile ni združljiva s to vrsto vezave.";Strings.OfficeOM.L_InvalidParameters="Parametri funkcije {0} so neveljavni.";Strings.OfficeOM.L_UserNotSignedIn="Noben uporabnik ni vpisan v Office.";Strings.OfficeOM.L_InvalidSetColumns="Navedeni stolpci niso veljavni.";Strings.OfficeOM.L_InvalidDataFormat="Oblika navedenega podatkovnega predmeta je neveljavna.";Strings.OfficeOM.L_NotImplemented="Funkcija {0} ni izvedena.";Strings.OfficeOM.L_ElementMissing="Celice tabele ni mogoÄe oblikovati, ker manjkajo nekatere vrednosti parametrov. Znova preverite parametre in poskusite znova.";Strings.OfficeOM.L_UserAborted="Uporabnik je prekinil zahtevo za soglasje.";Strings.OfficeOM.L_DialogOK="V redu";Strings.OfficeOM.L_SliceSizeNotSupported="Izbrana velikost rezine ni podrta.";Strings.OfficeOM.L_InvalidGetRows="Navedene vrstice niso veljavne.";Strings.OfficeOM.L_UnsupportedEnumeration="Nepodprto naÅ¡tevanje";Strings.OfficeOM.L_PermissionDenied="Dovoljenje je zavrnjeno";Strings.OfficeOM.L_FormatValueOutOfRange="Vrednost je zunaj dovoljenega obsega.";Strings.OfficeOM.L_NetworkProblem="Težava z omrežjem";Strings.OfficeOM.L_DataNotMatchSelection="Posredovani podatkovni predmet ni združljiv z obliko ali dimenzijami trenutne izbire.";Strings.OfficeOM.L_OutOfRange="Zunaj obsega";Strings.OfficeOM.L_ReadSettingsError="Napaka pri branju nastavitev";Strings.OfficeOM.L_GetDataIsTooLarge="Zahtevani nabor podatkov je prevelik.";Strings.OfficeOM.L_InvalidArgument="Argument »{0}« ne deluje v tem primeru, manjka ali pa ni pravilne oblike zapisa.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Rutine za obravnavo dogodkov ni bilo mogoÄe dodati.";Strings.OfficeOM.L_InvalidSetStartRowColumn="Navedeni vrednosti »startRow« ali »startColumn« nista veljavni.";Strings.OfficeOM.L_Timeout="ÄŒasovna omejitev postopka je potekla.";Strings.OfficeOM.L_InvalidBindingOperation="Neveljaven postopek vezave.";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Neveljavni argumenti vnosa";Strings.OfficeOM.L_APINotSupported="Klic API ni podprt";Strings.OfficeOM.L_MemoryLimit="Presežena je omejitev pomnilnika";Strings.OfficeOM.L_CustomFunctionNameContainsBadChars="V imenu funkcije so lahko le Ärke, Å¡tevke, podÄrtaji in pike.";Strings.OfficeOM.L_SetDataParametersConflict="Navedeni parametri so v sporu.";Strings.OfficeOM.L_DataNotMatchCoercionType="Vrsta navedenega podatkovnega predmeta ni združljiva s trenutno izbiro.";Strings.OfficeOM.L_NotSupportedBindingType="Navedena vrsta vezave {0} ni podprta. ";Strings.OfficeOM.L_InvalidValue="Neveljavna vrednost";Strings.OfficeOM.L_SettingsAreStale="Nastavitev ni mogoÄe shraniti, ker niso ažurne.";Strings.OfficeOM.L_DocumentReadOnly="Zahtevan postopek ni dovoljen v trenutnem naÄinu dokumenta.";Strings.OfficeOM.L_RowIndexOutOfRange="Vrednost indeksa vrstice je zunaj dovoljenega obsega. Uporabite vrednost (0 ali veÄjo), ki je manjÅ¡a od Å¡tevila vrstic.";Strings.OfficeOM.L_InvalidObjectPath="Pot predmeta »{0}« ne deluje za namen, ki ga želite. ÄŒe predmet uporabljate v veÄ klicih »context.sync« in zunaj zaporedne izvedbe paketa ».run«, uporabite medoti »context.trackedObjects.add()« in »context.trackedObjects.remove()« za upravljanje življenjskega cikla predmeta.";Strings.OfficeOM.L_BindingNotExist="Navedena vrsta vezave ne obstaja.";Strings.OfficeOM.L_FunctionCallFailed="Klic funkcije {0} ni uspel, koda napake: {1}.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Navedeni vrednosti »rowCount« ali »columnCount« nista veljavni.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath omejuje izbor na 1024 elementov.";Strings.OfficeOM.L_MissingParameter="ManjkajoÄi parameter";Strings.OfficeOM.L_BadSelectorString="Niz, posredovan v izbirnik, ni pravilno oblikovana ali pa ni podprt.";Strings.OfficeOM.L_InvalidOperationInCellEditMode="Excel je naÄin za urejanje celice. Zaprite naÄin za urejanje tako, da pritisnete ENTER ali TAB ali pa izberite drugo celico in nato poskusite znova.";Strings.OfficeOM.L_InvalidGrantMessage="Manjka odobritev za ta dodatek.";Strings.OfficeOM.L_InvalidTableOptionValue="V enem parametru ali veÄ parametrih »tableOptions« so vrednosti, ki niso dovoljene. Znova preverite vrednosti in poskusite znova.";Strings.OfficeOM.L_SetDataIsTooLarge="Navedeni podatkovni predmet je prevelik.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Podatki niso ažurni";Strings.OfficeOM.L_UnsupportedEnumerationMessage="OÅ¡tevilÄenje ni podprto v trenutnem gostiteljskem programu.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Koordinatnih parametrov ni mogoÄe uporabiti s pretvorbeno tabelo, ko tabela vsebuje spojene celice.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory="Dodatek ne podpira privolitve uporabnika.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="Poskus nastavitve lastnosti samo za branje »{0}«.";Strings.OfficeOM.L_RequestTokenUnavailable="Ta API je bil zaduÅ¡en zato, da je bila zmanjÅ¡ana pogostost klicanja.";Strings.OfficeOM.L_InvalidBindingError="Napaka neveljavne vezave";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} želi prikazati novo okno.";Strings.OfficeOM.L_ShuttingDown="Postopek ni uspel, ker podatki v strežniku niso ažurni.";Strings.OfficeOM.L_DataNotMatchBindingType="Navedeni podatkovni predmet ni združljiv z vrsto vezave.";Strings.OfficeOM.L_EventHandlerRemovalFailed="Rutine za obravnavo dogodkov ni bilo mogoÄe odstraniti.";Strings.OfficeOM.L_DataWriteReminder="Opomnik za zapis podatkov";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="Sprememb lastnosti »{0}« ni mogoÄe uporabiti z naÄinom predmeta »object.set«.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Program {0} ne obstaja. Microsoft.Office.WebExtension.Inicializiraj(razlog) ni bil klican.";Strings.OfficeOM.L_GetDataParametersConflict="Navedeni parametri so v sporu.";Strings.OfficeOM.L_RunMustReturnPromise="Paketna funkcija, poslana v metodo ».run«, ni vrnila obljube. Funkcija mora vrniti obljubo, tako da je vse samodejno sledene predmete mogoÄe izstaviti, ko je dokonÄan postopek paketa. ObiÄajno vrnete obljubo tako, da vrnete odgovor iz »context.sync()«.";Strings.OfficeOM.L_NewWindowCrossZone="Varnostne nastavitve v brskalniku onemogoÄajo ustvarjanje pogovornega okna. Poskusite uporabiti drug brskalnik ali {0}, tako da bosta »{1}« in domena, prikazana v naslovni vrstici, v istem varnostnem obmoÄju.";Strings.OfficeOM.L_CustomXmlError="Napaka XML po meri.";Strings.OfficeOM.L_TooManyIncompleteRequests="PoÄakajte, da se prejÅ¡nji klic dokonÄa.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Navedena vrsta vezave ni združljiva s podanim imenovanim elementom.";Strings.OfficeOM.L_InValidOptionalArgument="neveljaven izbirni argument";Strings.OfficeOM.L_AppNameNotExist="Ime dodatka za {0} ne obstaja.";Strings.OfficeOM.L_OperationNotSupported="Postopek ni podprt.";Strings.OfficeOM.L_InvalidAPICall="Neveljaven klic API";Strings.OfficeOM.L_TooManyOptionalObjects="na seznamu parametrov je veÄ izbirnih predmetov";Strings.OfficeOM.L_RequestTimeout="Izvedba klica je trajala predolgo.";Strings.OfficeOM.L_DataStale="Podatki niso ažurni";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Opomba: Å¡tevilo celic v tabeli naj bo manjÅ¡e od 20.000 celic.";Strings.OfficeOM.L_InvalidSSOAddinMessage="API identitete ni podprt za ta datotek.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Podatki so zastareli. Znova dobite predmet.";Strings.OfficeOM.L_NamedItemNotFound="Imenovani element ne obstaja.";Strings.OfficeOM.L_ApiNotFoundDetails="Metoda ali lastnost {0} je del nabora zahtev {1}, ki ni na voljo za vaÅ¡o razliÄico programa {2}.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Neveljavna ali potekla seja";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Postopek ni uspel, ker ta dodatek že zahteva žeton za dostop.";Strings.OfficeOM.L_SettingsStaleError="Napaka zaradi zastarelih nastavitev";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Datoteke ni mogoÄe dobiti zaradi napake omrežja.";Strings.OfficeOM.L_UserAbortedMessage="Uporabnik se ni strinjal z dovoljenji dodatka.";Strings.OfficeOM.L_InvalidResourceUrlMessage="V manifestu je naveden neveljaven URL vira.";Strings.OfficeOM.L_InvalidBinding="Neveljavna vezava";Strings.OfficeOM.L_SSOConnectionLostErrorMessage="A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones.";Strings.OfficeOM.L_InvalidCoercion="Neveljavna vrsta pretvorbe";Strings.OfficeOM.L_SSOClientErrorMessage="V odjemalcu je priÅ¡lo do nepriÄakovane napake.";Strings.OfficeOM.L_ConnectionFailureWithStatus="Zahteva ni uspela s kodo stanja {0}.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Izberite želeno možnost.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Trenutna izbira ni združljiva z navedeno vrsto prisile.";Strings.OfficeOM.L_MultipleNamedItemFound="Najdenih je bilo veÄ predmetov z istim imenom.";Strings.OfficeOM.L_PropertyDoesNotExist="Lastnost »{0}« ne obstaja v predmetu.";Strings.OfficeOM.L_DataWriteError="Napaka pri pisanju podatkov";Strings.OfficeOM.L_SSOConnectionLostError="A connection was lost during the sign in process.";Strings.OfficeOM.L_FileTypeNotSupported="Navedena vrsta datoteke ni podprta.";Strings.OfficeOM.L_CustomXmlNodeNotFound="Navedenega vozliÅ¡Äa ni bilo mogoÄe najti.";Strings.OfficeOM.L_NotSupported="Funkcija {0} ni podprta.";Strings.OfficeOM.L_ColIndexOutOfRange="Vrednost indeksa stolpca je zunaj dovoljenega obsega. Uporabite vrednost (0 ali veÄjo), ki je manjÅ¡a od Å¡tevila stolpcev.";Strings.OfficeOM.L_OsfControlTypeNotSupported="Vrsta »OsfControl« ni podprta.";Strings.OfficeOM.L_DataNotMatchBindingSize="Posredovani podatkovni predmet se ne ujema z velikostjo trenutne izbire.";Strings.OfficeOM.L_NoCapability="Nimate ustreznih dovoljenj za izvedbo tega dejanja.";Strings.OfficeOM.L_DialogRequireHTTPS="Protokol HTTP ni podprt. Namesto tega uporabite HTTPS";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Dovoli";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage="Postopek ni uspel, ker dodatek v tej kategoriji ne podpira soglasja uporabnika.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Koordinatnih parametrov ni mogoÄe uporabiti s pretvorbeno tabelo, ko tabela vsebuje spojene celice.";Strings.OfficeOM.L_DialogAlreadyOpened="Postopek ni uspel, ker ima ta dodatek že aktivno pogovorno okno.";Strings.OfficeOM.L_InvalidReadForBlankRow="Navedena vrstica je prazna.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Izbrana vsebina mora biti v obliki tabele. Oblikujte podatke v obliki tabele in poskusite znova.";Strings.OfficeOM.L_PropertyNotLoaded="Lastnost »{0}« ni na voljo. Preden preberete vrednost lastnosti, pokliÄite metodo nalaganja v predmetu, ki jo vsebuje, in v kontekstu povezane zahteve pokliÄite »context.sync()«.";Strings.OfficeOM.L_InvalidSelectionForBindingType="Vezi ni mogoÄe ustvariti s trenutno izbiro in z navedeno vrsto vezave.";Strings.OfficeOM.L_InvalidFormat="Neveljavna napaka pri oblikovanju";Strings.OfficeOM.L_APICallFailed="Klic API ni uspel";Strings.OfficeOM.L_DisplayDialogError="Napaka pri prikazu pogovornega okna";Strings.OfficeOM.L_GetSelectionNotSupported="Trenutna izbira ni podprta.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="konfigurirajte svoj brskalnik";Strings.OfficeOM.L_DialogInvalidScheme="Shema URL ni podprta. Namesto tega uporabite HTTPS.";Strings.OfficeOM.L_ValueNotLoaded="Vrednost predmeta rezultata Å¡e ni bila naložena. Preden preberete lastnost »Value«, v povezanem kontekstu zahteve pokliÄite »context.sync()«.";Strings.OfficeOM.L_InternalError="Notranja napaka";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Preden dobite drugo datoteko, pokliÄite closeAsync za trenutno datoteko.";Strings.OfficeOM.L_SSOServerErrorMessage="V strežniku je priÅ¡lo do nepriÄakovane napake.";Strings.OfficeOM.L_InvalidColumnsForBinding="Navedeni stolpci niso veljavni.";Strings.OfficeOM.L_MissingRequiredArguments="Manjka nekaj zahtevanih argumentov";Strings.OfficeOM.L_InvalidNode="Neveljavno vozliÅ¡Äe";Strings.OfficeOM.L_OverwriteWorksheetData="Nastavljena operacija ni uspela, ker bo posredovani podatkovni predmet prepisal ali premaknil podatke.";Strings.OfficeOM.L_CannotRegisterEvent="Rutine za obravnavo dogodkov ni mogoÄe registrirati.";Strings.OfficeOM.L_UnknownBindingType="Vrsta vpenjanja ni podprta.";Strings.OfficeOM.L_CoercionTypeNotSupported="Navedena vrsta prisile ni podprta.";Strings.OfficeOM.L_DialogAddressNotTrusted="Domena URL-ja ni vkljuÄena v element AppDomains v manifestu.";Strings.OfficeOM.L_BrowserAPINotSupported="Ta brskalnik ne podpira zahtevanega API-ja.";Strings.OfficeOM.L_HostError="Napaka gostitelja";Strings.OfficeOM.L_InvalidRequestContext="Predmeta ni mogoÄe uporabiti v razliÄnih kontekstih zahteve.";Strings.OfficeOM.L_SSOClientError="V Officeovi zahtevi za preverjanje pristnosti je priÅ¡lo do napake.";Strings.OfficeOM.L_InvalidSetRows="Navedene vrstice niso veljavne.";Strings.OfficeOM.L_CustomFunctionImplementationMissing="Lastnost s tem imenom v lastnosti Excel.CustomFunctions, ki predstavlja definicijo funkcije, mora vsebovati lastnost »call«, ki implementira funkcijo.";Strings.OfficeOM.L_SettingNameNotExist="Navedeno ime nastavitve ne obstaja.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Zaradi omejitev brskalnika nismo mogli ustvariti pogovornega okna. Domena pogovornega okna in domena gostitelja dodatka nista v istem varnostnem obmoÄju.";Strings.OfficeOM.L_InvalidFormatValue="V enem parametru ali veÄ parametrih »format« so vrednosti, ki niso dovoljene. Znova preverite vrednosti in poskusite znova.";Strings.OfficeOM.L_EventHandlerNotExist="Navedene rutine za obravnavo dogodkov ni bilo mogoÄe najti za to vpenjanje.";Strings.OfficeOM.L_UnsupportedDataObject="Posredovana vrsta podatkovnega predmeta ni podprta.";Strings.OfficeOM.L_IndexOutOfRange="Indeks je zunaj obsega.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Prezri";Strings.OfficeOM.L_InternalErrorDescription="PriÅ¡lo je do notranje napake.";Strings.OfficeOM.L_BindingToMultipleSelection="NestiÄni izbori niso podprti.";Strings.OfficeOM.L_SettingsCannotSave="Nastavitev ni bilo mogoÄe shraniti.";Strings.OfficeOM.L_CannotWriteToSelection="V trenutno izbiro ni mogoÄe pisati.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Opomba: za nabore oblikovanja, ki jih je nastavil klic vmesnika API za oblikovanje, priporoÄamo, da so pod 100.";Strings.OfficeOM.L_UserClickIgnore="Uporabnik se je odloÄil prezrti pogovorno okno.";Strings.OfficeOM.L_InvalidGrant="Manjka vnaprejÅ¡nje pooblastilo.";Strings.OfficeOM.L_FormattingReminder="Opomnik za oblikovanje";Strings.OfficeOM.L_SaveSettingsError="Napaka pri shranjevanju nastavitev";Strings.OfficeOM.L_SSOServerError="Pri ponudniku preverjanja pristnosti je priÅ¡lo do napake.";Strings.OfficeOM.L_ActivityLimitReached="Dosežena je omejitev dejavnosti.";Strings.OfficeOM.L_InvalidCellsValue="V enem parametru ali veÄ parametrih »cells« so vrednosti, ki niso dovoljene. Znova preverite vrednosti in poskusite znova.";Strings.OfficeOM.L_InvalidDataObject="Neveljaven podatkovni predmet";Strings.OfficeOM.L_InitializeNotReady="Office.js se Å¡e ni v celoti naložil. Poskusite znova kasneje ali dodajte svojo inicializacijsko kodo funkciji »Office.initialize«.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Dosežena je bila omejitev za izbiro";Strings.OfficeOM.L_SpecifiedIdNotExist="Navedeni ID ne obstaja.";Strings.OfficeOM.L_InvalidArgumentGeneric="Argumenti, podani v funkciji, ne delujejo v tem primeru, manjkajo ali pa niso pravilne oblike zapisa.";Strings.OfficeOM.L_RedundantCallbackSpecification="Povratnega klica ni mogoÄe navesti hkrati v seznamu argumentov in v izbirnem predmetu.";Strings.OfficeOM.L_SelectionCannotBound="Na trenutno izbiro ni mogoÄe vezati.";Strings.OfficeOM.L_DataReadError="Napaka pri branju podatkov";Strings.OfficeOM.L_CustomFunctionNameCannotSplit="V imenu funkcije mora biti neprazen imenski prostor in neprazno kratko ime.";Strings.OfficeOM.L_InvalidGetColumns="Navedeni stolpci niso veljavni.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Dodatek že zahteva žeton za dostop.";Strings.OfficeOM.L_BindingCreationError="Napaka pri ustvarjanju vezave";Strings.OfficeOM.L_InvalidGetStartRowColumn="Navedeni vrednosti »startRow« ali »startColumn« nista veljavni.";Strings.OfficeOM.L_ConnectionFailureWithDetails="Zahteva ni uspela s kodo stanja {0}, kodo napake {1} in s tem sporoÄilom o napaki: {2}";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="VaÅ¡a seja storitve Office Online je potekla ali ni veljavna. ÄŒe želite nadaljevati, osvežite stran.";Strings.OfficeOM.L_CustomFunctionDefinitionMissing="Lastnost s tem imenom, ki predstavlja definicijo funkcije, mora obstajati v lastnosti Excel.CustomFunctions.";Strings.OfficeOM.L_CannotNavigateTo="Predmet je na mestu, kjer krmarjenje ni podprto.";Strings.OfficeOM.L_NotSupportedEventType="Navedena vrsta dogodka {0} ni podprta. ";Strings.OfficeOM.L_TooManyArguments="preveÄ argumentov";Strings.OfficeOM.L_EventRegistrationError="Napaka pri prijavi na dogodek";Strings.OfficeOM.L_InvalidApiCallInContext="Neveljaven klic API v trenutnem kontekstu.";Strings.OfficeOM.L_InvalidResourceUrl="Vnesen je URL vira neveljavne aplikacije.";Strings.OfficeOM.L_DialogNavigateError="Napaka pri premikanju po pogovornem oknu" \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/sl-si/outlook_strings.debug.js b/node_modules/@microsoft/office-js/dist/sl-si/outlook_strings.debug.js index 66faac5..830de39 100644 --- a/node_modules/@microsoft/office-js/dist/sl-si/outlook_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/sl-si/outlook_strings.debug.js @@ -1,34 +1,35 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("_u"); _u.ExtensibilityStrings = function() { }; _u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings"); +_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Napaka pri pisanju podatkov"; _u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Eno ali veÄ vnesenih e-poÅ¡tnih naslovov je predolgih."; -_u.ExtensibilityStrings.l_InternalProtocolError_Text = "Notranja napaka protokola: »{0}«."; -_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Skupno Å¡tevilo prejemnikov v polju ne sme biti veÄje od {0}."; -_u.ExtensibilityStrings.l_InvalidDate_Text = "Vnosa ni mogoÄe razreÅ¡iti v veljaven datum."; -_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Priloge ni mogoÄe izbrisati iz elementa."; +_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "ID priloge ni veljaven."; _u.ExtensibilityStrings.l_InternalFormatError_Text = "PriÅ¡lo je do napake notranje oblike zapisa."; -_u.ExtensibilityStrings.l_OffsetNotfound_Text = "Ni mogoÄe najti odmika za Äasovni žig."; -_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Prilog ni mogoÄe dodati, Äe sta iz strežnika dobljena poln odgovor ali posredovano sporoÄilo."; -_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Napaka s prilogo"; -_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Napaka pri pisanju podatkov"; -_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "Kode HTML ni bilo mogoÄe sanirati."; -_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Navedeni parametri se ne ujemajo s priÄakovano obliko zapisa."; +_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Priloge ni mogoÄe izbrisati, ker ni mogoÄe najti priloge z indeksom priloge."; +_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Priloge ni mogoÄe dodati, ker je prevelika."; +_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Priloge ni mogoÄe izbrisati iz elementa."; _u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "Uporabnik je odstranil prilogo, preden je bil postopek prenosa dokonÄan."; +_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "Uporabnik je med postopkom vstavljanja podatkov spremenil položaj kazalca."; _u.ExtensibilityStrings.l_InvalidEndTime_Text = "ÄŒas konca ne more biti pred Äasom zaÄetka."; +_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Skupno Å¡tevilo prejemnikov v polju ne sme biti veÄje od {0}."; +_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Prilog ni mogoÄe dodati, Äe sta iz strežnika dobljena poln odgovor ali posredovano sporoÄilo."; +_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Za dostop do zaÅ¡Äitenih Älanov API skripta JavaScript za Office je zahtevano zviÅ¡ano dovoljenje."; +_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Zahteva presega omejitev velikosti 1 MB. Spremenite zahtevo EWS."; +_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "Kode HTML ni bilo mogoÄe sanirati."; +_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "Zahtevano je zviÅ¡ano dovoljenje za klic naÄina: »{0}«."; +_u.ExtensibilityStrings.l_InternalProtocolError_Text = "Notranja napaka protokola: »{0}«."; +_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "Izbrani element je bil spremenjen."; +_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Napaka s prilogo"; +_u.ExtensibilityStrings.l_InvalidEventDates_Text = "KonÄni datum nastopi pred zaÄetnim datumom."; +_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "Pot priloge ni veljavna."; +_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Prilog ni mogoÄe dodati, ker sporoÄilo že ima najveÄje dovoljeno Å¡tevilo prilog"; _u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Elementu ni mogoÄe dodati priloge."; +_u.ExtensibilityStrings.l_InvalidDate_Text = "Vnosa ni mogoÄe razreÅ¡iti v veljaven datum."; +_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Navedeni parametri se ne ujemajo s priÄakovano obliko zapisa."; _u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Eno ali veÄ vnesenih prikazanih imen je predolgo."; -_u.ExtensibilityStrings.l_InvalidEventDates_Text = "KonÄni datum nastopi pred zaÄetnim datumom."; _u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Ni navedenih veljavnih prejemnikov."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Za dostop do zaÅ¡Äitenih Älanov API skripta JavaScript za Office je zahtevano zviÅ¡ano dovoljenje."; -_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Priloge ni mogoÄe izbrisati, ker ni mogoÄe najti priloge z indeksom priloge."; -_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "Uporabnik je med postopkom vstavljanja podatkov spremenil položaj kazalca."; -_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Priloge ni mogoÄe dodati, ker je prevelika."; -_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Prilog ni mogoÄe dodati, ker sporoÄilo že ima najveÄje dovoljeno Å¡tevilo prilog"; -_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "Izbrani element je bil spremenjen."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "Zahtevano je zviÅ¡ano dovoljenje za klic naÄina: »{0}«."; -_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Zahteva presega omejitev velikosti 1 MB. Spremenite zahtevo EWS."; -_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "ID priloge ni veljaven."; -_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "Pot priloge ni veljavna." +_u.ExtensibilityStrings.l_OffsetNotfound_Text = "Ni mogoÄe najti odmika za Äasovni žig." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/sl-si/outlook_strings.js b/node_modules/@microsoft/office-js/dist/sl-si/outlook_strings.js index fa9ce7a..2757a11 100644 --- a/node_modules/@microsoft/office-js/dist/sl-si/outlook_strings.js +++ b/node_modules/@microsoft/office-js/dist/sl-si/outlook_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Eno ali veÄ vnesenih e-poÅ¡tnih naslovov je predolgih.";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Notranja napaka protokola: »{0}«.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Skupno Å¡tevilo prejemnikov v polju ne sme biti veÄje od {0}.";_u.ExtensibilityStrings.l_InvalidDate_Text="Vnosa ni mogoÄe razreÅ¡iti v veljaven datum.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Priloge ni mogoÄe izbrisati iz elementa.";_u.ExtensibilityStrings.l_InternalFormatError_Text="PriÅ¡lo je do napake notranje oblike zapisa.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Ni mogoÄe najti odmika za Äasovni žig.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Prilog ni mogoÄe dodati, Äe sta iz strežnika dobljena poln odgovor ali posredovano sporoÄilo.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Napaka s prilogo";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Napaka pri pisanju podatkov";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="Kode HTML ni bilo mogoÄe sanirati.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Navedeni parametri se ne ujemajo s priÄakovano obliko zapisa.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="Uporabnik je odstranil prilogo, preden je bil postopek prenosa dokonÄan.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="ÄŒas konca ne more biti pred Äasom zaÄetka.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Elementu ni mogoÄe dodati priloge.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Eno ali veÄ vnesenih prikazanih imen je predolgo.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="KonÄni datum nastopi pred zaÄetnim datumom.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Ni navedenih veljavnih prejemnikov.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Za dostop do zaÅ¡Äitenih Älanov API skripta JavaScript za Office je zahtevano zviÅ¡ano dovoljenje.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Priloge ni mogoÄe izbrisati, ker ni mogoÄe najti priloge z indeksom priloge.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="Uporabnik je med postopkom vstavljanja podatkov spremenil položaj kazalca.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Priloge ni mogoÄe dodati, ker je prevelika.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Prilog ni mogoÄe dodati, ker sporoÄilo že ima najveÄje dovoljeno Å¡tevilo prilog";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Izbrani element je bil spremenjen.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Zahtevano je zviÅ¡ano dovoljenje za klic naÄina: »{0}«.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Zahteva presega omejitev velikosti 1 MB. Spremenite zahtevo EWS.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="ID priloge ni veljaven.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="Pot priloge ni veljavna." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Napaka pri pisanju podatkov";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Eno ali veÄ vnesenih e-poÅ¡tnih naslovov je predolgih.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="ID priloge ni veljaven.";_u.ExtensibilityStrings.l_InternalFormatError_Text="PriÅ¡lo je do napake notranje oblike zapisa.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Priloge ni mogoÄe izbrisati, ker ni mogoÄe najti priloge z indeksom priloge.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Priloge ni mogoÄe dodati, ker je prevelika.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Priloge ni mogoÄe izbrisati iz elementa.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="Uporabnik je odstranil prilogo, preden je bil postopek prenosa dokonÄan.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="Uporabnik je med postopkom vstavljanja podatkov spremenil položaj kazalca.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="ÄŒas konca ne more biti pred Äasom zaÄetka.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Skupno Å¡tevilo prejemnikov v polju ne sme biti veÄje od {0}.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Prilog ni mogoÄe dodati, Äe sta iz strežnika dobljena poln odgovor ali posredovano sporoÄilo.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Za dostop do zaÅ¡Äitenih Älanov API skripta JavaScript za Office je zahtevano zviÅ¡ano dovoljenje.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Zahteva presega omejitev velikosti 1 MB. Spremenite zahtevo EWS.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="Kode HTML ni bilo mogoÄe sanirati.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Zahtevano je zviÅ¡ano dovoljenje za klic naÄina: »{0}«.";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Notranja napaka protokola: »{0}«.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Izbrani element je bil spremenjen.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Napaka s prilogo";_u.ExtensibilityStrings.l_InvalidEventDates_Text="KonÄni datum nastopi pred zaÄetnim datumom.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="Pot priloge ni veljavna.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Prilog ni mogoÄe dodati, ker sporoÄilo že ima najveÄje dovoljeno Å¡tevilo prilog";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Elementu ni mogoÄe dodati priloge.";_u.ExtensibilityStrings.l_InvalidDate_Text="Vnosa ni mogoÄe razreÅ¡iti v veljaven datum.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Navedeni parametri se ne ujemajo s priÄakovano obliko zapisa.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Eno ali veÄ vnesenih prikazanih imen je predolgo.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Ni navedenih veljavnih prejemnikov.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Ni mogoÄe najti odmika za Äasovni žig." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/sr-cyrl-cs/office_strings.debug.js b/node_modules/@microsoft/office-js/dist/sr-cyrl-cs/office_strings.debug.js index 416804c..52a812c 100644 --- a/node_modules/@microsoft/office-js/dist/sr-cyrl-cs/office_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/sr-cyrl-cs/office_strings.debug.js @@ -1,179 +1,190 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("Strings"); Strings.OfficeOM = function() { }; Strings.OfficeOM.registerClass("Strings.OfficeOM"); -Strings.OfficeOM.L_HostError = "Host Error"; -Strings.OfficeOM.L_InternalErrorDescription = "An internal error has occurred."; -Strings.OfficeOM.L_TooManyOptionalObjects = "multiple optional objects in parameter list"; -Strings.OfficeOM.L_ElementMissing = "We couldn't format the table cell because some parameter values are missing. Double-check the parameters and try again."; -Strings.OfficeOM.L_InvalidDataObject = "Invalid Data Object"; -Strings.OfficeOM.L_APICallFailed = "API Call Failed"; -Strings.OfficeOM.L_OverwriteWorksheetData = "The set operation failed because the supplied data object will overwrite or shift data."; -Strings.OfficeOM.L_MissingParameter = "Missing Parameter"; -Strings.OfficeOM.L_UserNotSignedIn = "No user is signed into Office."; -Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "Attempting to set read-only property '{0}'."; Strings.OfficeOM.L_InvalidApiCallInContext = "Invalid API call in the current context."; -Strings.OfficeOM.L_DisplayDialogError = "Display Dialog Error"; -Strings.OfficeOM.L_RedundantCallbackSpecification = "Callback cannot be specified both in argument list and in optional object."; -Strings.OfficeOM.L_SelectionNotSupportCoercionType = "The current selection is not compatible with the specified coercion type."; -Strings.OfficeOM.L_GetDataIsTooLarge = "The requested data set is too large."; -Strings.OfficeOM.L_DataNotMatchCoercionType = "The type of the specified data object is not compatible with the current selection."; +Strings.OfficeOM.L_EventHandlerAdditionFailed = "Failed to add the event handler."; +Strings.OfficeOM.L_InvalidOperationInCellEditMode = "Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again."; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage = "The operation failed because this add-in does not support user consent in this category"; +Strings.OfficeOM.L_InvalidGetRows = "The specified rows are invalid."; +Strings.OfficeOM.L_ActivityLimitReached = "Activity limit has been reached."; +Strings.OfficeOM.L_SaveSettingsError = "Save Settings Error"; Strings.OfficeOM.L_EventRegistrationError = "Event Registration Error"; -Strings.OfficeOM.L_InitializeNotReady = "Office.js has not been fully loaded yet. Please try again later or make sure to add your initialization code on the Office.initialize function."; -Strings.OfficeOM.L_DataWriteError = "Data Write Error"; -Strings.OfficeOM.L_InvalidGrantMessage = "Missing grant for this add-in."; +Strings.OfficeOM.L_InvalidNode = "Invalid Node"; +Strings.OfficeOM.L_UnknownBindingType = "The binding type is not supported."; +Strings.OfficeOM.L_OsfControlTypeNotSupported = "OsfControl type not supported."; +Strings.OfficeOM.L_TooManyOptionalFunction = "multiple optional functions in parameter list"; +Strings.OfficeOM.L_ApiNotFoundDetails = "The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}."; +Strings.OfficeOM.L_BindingNotExist = "The specified binding does not exist."; +Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Coordinate parameters cannot be used with coercion type Table when the table contains merged cells."; +Strings.OfficeOM.L_InvalidGrant = "Preauthorization missing."; +Strings.OfficeOM.L_InvalidOrTimedOutSession = "Invalid Or Timed Out Session"; +Strings.OfficeOM.L_ReadSettingsError = "Read Settings Error"; +Strings.OfficeOM.L_InvalidBindingError = "Invalid Binding Error"; +Strings.OfficeOM.L_CustomFunctionNameCannotSplit = "The function name must contain a non-empty namespace and a non-empty short name."; +Strings.OfficeOM.L_InvalidBinding = "Invalid Binding"; +Strings.OfficeOM.L_InvalidRequestContext = "Cannot use the object across different request contexts."; +Strings.OfficeOM.L_APINotSupported = "API Not Supported"; +Strings.OfficeOM.L_InvalidGetColumns = "The specified columns are invalid."; +Strings.OfficeOM.L_SettingsAreStale = "Settings could not be saved because they are not current."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "The operation failed because this add-in is already requesting an access token."; +Strings.OfficeOM.L_SSOServerErrorMessage = "An unexpected error occurred on the server."; +Strings.OfficeOM.L_InvalidReadForBlankRow = "The specified row is blank."; +Strings.OfficeOM.L_MissingRequiredArguments = "missing some required arguments"; +Strings.OfficeOM.L_RequestTokenUnavailable = "This API has been throttled to slow the call frequency."; +Strings.OfficeOM.L_DataNotMatchCoercionType = "The type of the specified data object is not compatible with the current selection."; Strings.OfficeOM.L_FileTypeNotSupported = "The specified file type is not supported."; -Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "The data is out of date. Retrieve the object again."; Strings.OfficeOM.L_AppNameNotExist = "Add-in Name for {0} doesn't exist."; -Strings.OfficeOM.L_EventHandlerAdditionFailed = "Failed to add the event handler."; -Strings.OfficeOM.L_OperationNotSupported = "The operation is not supported."; -Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Call closeAsync on the current File before retrieving another."; -Strings.OfficeOM.L_GetSelectionNotSupported = "The current selection is not supported."; -Strings.OfficeOM.L_TooManyIncompleteRequests = "Wait until the previous call completes."; -Strings.OfficeOM.L_UnsupportedUserIdentity = "User identity type is not supported."; -Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Application {0} does not exist. Microsoft.Office.WebExtension.initialize(reason) is not called."; -Strings.OfficeOM.L_SliceSizeNotSupported = "The specified slice size is not supported."; -Strings.OfficeOM.L_PropertyNotLoaded = "The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context."; -Strings.OfficeOM.L_InvalidSetRows = "The specified rows are invalid."; -Strings.OfficeOM.L_InvalidNode = "Invalid Node"; -Strings.OfficeOM.L_SSOClientError = "Error occurred in the authentication request from Office."; -Strings.OfficeOM.L_SettingsCannotSave = "The settings could not be saved."; -Strings.OfficeOM.L_NamedItemNotFound = "The named item does not exist."; -Strings.OfficeOM.L_MultipleNamedItemFound = "Multiple objects with the same name were found."; -Strings.OfficeOM.L_InvalidArgumentGeneric = "The argument(s) passed into the function don't work for this situation, are missing, or aren't in the right format."; -Strings.OfficeOM.L_OutOfRange = "Out of Range"; -Strings.OfficeOM.L_DialogInvalidScheme = "The URL scheme is not supported. Use HTTPS instead."; -Strings.OfficeOM.L_InValidOptionalArgument = "invalid optional argument"; -Strings.OfficeOM.L_UserAbortedMessage = "The user did not consent the add-in permissions."; Strings.OfficeOM.L_ValueNotLoaded = 'The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.'; -Strings.OfficeOM.L_TooManyArguments = "too many arguments"; -Strings.OfficeOM.L_ConnectionFailureWithDetails = "The request failed with status code of {0}, error code {1} and the following error message: {2}"; -Strings.OfficeOM.L_SaveSettingsError = "Save Settings Error"; -Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Browser restrictions prevented us from creating the dialog box. The domain of dialog box and the domain of the add-in host are not in the same security zone."; +Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Operation is not supported on this binding type."; +Strings.OfficeOM.L_BindingToMultipleSelection = "Noncontiguous selections are not supported."; Strings.OfficeOM.L_RowIndexOutOfRange = "The row index value is out of the allowed range. Use a value (0 or higher) that's less than the number of rows."; -Strings.OfficeOM.L_UnsupportedEnumeration = "Unsupported Enumeration"; -Strings.OfficeOM.L_BindingCreationError = "Binding Creation Error"; -Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Ignore"; -Strings.OfficeOM.L_CoercionTypeNotSupported = "The specified coercion type is not supported."; -Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Coordinate parameters cannot be used with coercion type Table when the table contains merged cells."; -Strings.OfficeOM.L_FunctionCallFailed = "Function {0} call failed, error code: {1}."; -Strings.OfficeOM.L_InvalidObjectPath = 'The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.'; -Strings.OfficeOM.L_InvalidParameters = "Function {0} has invalid parameters."; -Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = "Changes to property '{0}' cannot be applied through an \"object.set\" method."; -Strings.OfficeOM.L_DataWriteReminder = "Data Write Reminder"; -Strings.OfficeOM.L_RunMustReturnPromise = 'The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".'; +Strings.OfficeOM.L_SSOConnectionLostErrorMessage = "A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones."; +Strings.OfficeOM.L_TooManyOptionalObjects = "multiple optional objects in parameter list"; +Strings.OfficeOM.L_SettingsStaleError = "Settings Stale Error"; +Strings.OfficeOM.L_CustomXmlNodeNotFound = "The specified node was not found."; +Strings.OfficeOM.L_ElementMissing = "We couldn't format the table cell because some parameter values are missing. Double-check the parameters and try again."; +Strings.OfficeOM.L_InvalidSetColumns = "The specified columns are invalid."; +Strings.OfficeOM.L_DialogInvalidScheme = "The URL scheme is not supported. Use HTTPS instead."; Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Invalid input arguments."; -Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Note: The number of cells in a table is suggested to be below 20,000 cells."; -Strings.OfficeOM.L_DataNotMatchBindingSize = "The supplied data object does not match the size of the current selection."; -Strings.OfficeOM.L_SetDataParametersConflict = "The specified parameters conflict."; -Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "The identity type of the user is not supported."; -Strings.OfficeOM.L_DialogAlreadyOpened = "The operation failed because this add-in already has an active dialog."; -Strings.OfficeOM.L_CannotWriteToSelection = "Cannot write to the current selection."; +Strings.OfficeOM.L_InValidOptionalArgument = "invalid optional argument"; +Strings.OfficeOM.L_DocumentReadOnly = "The requested operation is not allowed on the current document mode."; +Strings.OfficeOM.L_CoercionTypeNotSupported = "The specified coercion type is not supported."; +Strings.OfficeOM.L_SliceSizeNotSupported = "The specified slice size is not supported."; +Strings.OfficeOM.L_InvalidValue = "Invalid Value"; +Strings.OfficeOM.L_InvalidColumnsForBinding = "The specified columns are invalid."; +Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Call closeAsync on the current File before retrieving another."; +Strings.OfficeOM.L_IndexOutOfRange = "Index out of range."; +Strings.OfficeOM.L_SettingsCannotSave = "The settings could not be saved."; +Strings.OfficeOM.L_SelectionNotSupportCoercionType = "The current selection is not compatible with the specified coercion type."; +Strings.OfficeOM.L_FormatValueOutOfRange = "The value is out of the allowed range."; +Strings.OfficeOM.L_Timeout = "The operation has timed out."; +Strings.OfficeOM.L_GetDataIsTooLarge = "The requested data set is too large."; +Strings.OfficeOM.L_DataNotMatchBindingType = "The specified data object is not compatible with the binding type."; +Strings.OfficeOM.L_TooManyArguments = "too many arguments"; +Strings.OfficeOM.L_InvalidGrantMessage = "Missing grant for this add-in."; +Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "Your Office Online session has expired or is invalid. To continue, refresh the page."; +Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Please make a selection."; +Strings.OfficeOM.L_SetDataIsTooLarge = "The specified data object is too large."; +Strings.OfficeOM.L_ConnectionFailureWithStatus = "The request failed with status code of {0}."; +Strings.OfficeOM.L_GetDataParametersConflict = "The specified parameters conflict."; +Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Application {0} does not exist. Microsoft.Office.WebExtension.initialize(reason) is not called."; +Strings.OfficeOM.L_HostError = "Host Error"; +Strings.OfficeOM.L_SSOServerError = "Error occurred in the authentication provider."; +Strings.OfficeOM.L_SpecifiedIdNotExist = "The specified ID does not exist."; +Strings.OfficeOM.L_NotImplemented = "Function {0} is not implemented."; +Strings.OfficeOM.L_InvalidSelectionForBindingType = "A binding cannot be created with the current selection and the specified binding type."; +Strings.OfficeOM.L_TooManyIncompleteRequests = "Wait until the previous call completes."; +Strings.OfficeOM.L_SelectionCannotBound = "Cannot bind to the current selection."; +Strings.OfficeOM.L_DialogNavigateError = "Dialog Navigation Error"; +Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Selection Limit Reached"; Strings.OfficeOM.L_CannotRegisterEvent = "The event handler cannot be registered."; -Strings.OfficeOM.L_ShuttingDown = "Operation failed because the data is not current on the server."; -Strings.OfficeOM.L_DialogOK = "OK"; -Strings.OfficeOM.L_UnsupportedDataObject = "The supplied data object type is not supported."; Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "The specified coercion type is not compatible with this binding type."; -Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "Your Office Online session has expired or is invalid. To continue, refresh the page."; -Strings.OfficeOM.L_MemoryLimit = "Memory Limit Exceeded"; -Strings.OfficeOM.L_InvalidValue = "Invalid Value"; -Strings.OfficeOM.L_InvalidSetColumns = "The specified columns are invalid."; +Strings.OfficeOM.L_NotSupportedEventType = "The specified event type {0} is not supported."; +Strings.OfficeOM.L_ColIndexOutOfRange = "The column index value is out of the allowed range. Use a value (0 or higher) that's less than the number of columns."; +Strings.OfficeOM.L_DataNotMatchSelection = "The supplied data object is not compatible with the shape or dimensions of the current selection."; +Strings.OfficeOM.L_SettingNameNotExist = "The specified setting name does not exist."; +Strings.OfficeOM.L_InvalidParameters = "Function {0} has invalid parameters."; +Strings.OfficeOM.L_InvalidDataObject = "Invalid Data Object"; +Strings.OfficeOM.L_InvalidGetStartRowColumn = "The specified startRow or startColumn values are invalid."; +Strings.OfficeOM.L_FunctionCallFailed = "Function {0} call failed, error code: {1}."; +Strings.OfficeOM.L_UnsupportedDataObject = "The supplied data object type is not supported."; +Strings.OfficeOM.L_SSOConnectionLostError = "A connection was lost during the sign in process."; +Strings.OfficeOM.L_BrowserAPINotSupported = "This browser does not support the requested API."; +Strings.OfficeOM.L_NavOutOfBound = "The operation failed because the index is out of range."; +Strings.OfficeOM.L_BadSelectorString = "The string passed into the selector is improperly formatted or unsupported."; +Strings.OfficeOM.L_NewWindowCrossZone = "The security settings in your browser prevent us from creating a dialog box. Try a different browser, or {0} so that '{1}' and the domain shown in your address bar are in the same security zone."; +Strings.OfficeOM.L_UserNotSignedIn = "No user is signed into Office."; +Strings.OfficeOM.L_InvalidCoercion = "Invalid Coercion Type"; Strings.OfficeOM.L_InvalidAPICall = "Invalid API Call"; +Strings.OfficeOM.L_OperationNotSupported = "The operation is not supported."; Strings.OfficeOM.L_InvalidTableOptionValue = "One or more of the tableOptions parameters have values that aren't allowed. Double-check the values and try again."; -Strings.OfficeOM.L_Timeout = "The operation has timed out."; +Strings.OfficeOM.L_InvalidSetRows = "The specified rows are invalid."; +Strings.OfficeOM.L_ShuttingDown = "Operation failed because the data is not current on the server."; +Strings.OfficeOM.L_DataStale = "Data Not Current"; +Strings.OfficeOM.L_InvalidDataFormat = "The format of the specified data object is invalid."; +Strings.OfficeOM.L_NamedItemNotFound = "The named item does not exist."; +Strings.OfficeOM.L_EventHandlerNotExist = "The specified event handler was not found for this binding."; +Strings.OfficeOM.L_CustomFunctionDefinitionMissing = "A property with this name that represents the function's definition must exist on Excel.CustomFunctions."; +Strings.OfficeOM.L_GetSelectionNotSupported = "The current selection is not supported."; +Strings.OfficeOM.L_MissingParameter = "Missing Parameter"; +Strings.OfficeOM.L_OutOfRange = "Out of Range"; +Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "The identity type of the user is not supported."; Strings.OfficeOM.L_InvalidSSOAddinMessage = "The identity API is not supported for this add-in."; -Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Selection Limit Reached"; -Strings.OfficeOM.L_InvalidFormat = "Invalid Format Error"; -Strings.OfficeOM.L_BindingNotExist = "The specified binding does not exist."; -Strings.OfficeOM.L_DialogRequireHTTPS = "The HTTP protocol is not supported. Use HTTPS instead"; -Strings.OfficeOM.L_NavOutOfBound = "The operation failed because the index is out of range."; -Strings.OfficeOM.L_CustomXmlNodeNotFound = "The specified node was not found."; +Strings.OfficeOM.L_InternalErrorDescription = "An internal error has occurred."; +Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "The data is out of date. Retrieve the object again."; +Strings.OfficeOM.L_InvalidArgument = "The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format."; Strings.OfficeOM.L_NotSupportedBindingType = "The specified binding type {0} is not supported."; -Strings.OfficeOM.L_InvalidResourceUrlMessage = "Invalid resource Url specified in the manifest."; -Strings.OfficeOM.L_InvalidCellsValue = "One or more of the cells parameters have values that aren't allowed. Double-check the values and try again."; -Strings.OfficeOM.L_InvalidSetStartRowColumn = "The specified startRow or startColumn values are invalid."; -Strings.OfficeOM.L_NewWindowCrossZone = "The security settings in your browser prevent us from creating a dialog box. Try a different browser, or {0} so that '{1}' and the domain shown in your address bar are in the same security zone."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "The operation failed because this add-in is already requesting an access token."; +Strings.OfficeOM.L_SSOClientErrorMessage = "An unexpected error occurred in the client."; +Strings.OfficeOM.L_InvalidObjectPath = 'The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.'; +Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "Attempting to set read-only property '{0}'."; +Strings.OfficeOM.L_UnsupportedEnumeration = "Unsupported Enumeration"; +Strings.OfficeOM.L_CustomXmlError = "Custom XML Error."; +Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Coordinate parameters cannot be used with coercion type Table when the table contains merged cells."; Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath limits selection to 1024 items."; -Strings.OfficeOM.L_InvalidArgument = "The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format."; +Strings.OfficeOM.L_InvalidResourceUrl = "Invalid application resource Url provided."; Strings.OfficeOM.L_FormattingReminder = "Formatting Reminder"; -Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Please make a selection."; -Strings.OfficeOM.L_NetworkProblem = "Network Problem"; -Strings.OfficeOM.L_InvalidCoercion = "Invalid Coercion Type"; -Strings.OfficeOM.L_SetDataIsTooLarge = "The specified data object is too large."; -Strings.OfficeOM.L_InvalidGetStartRowColumn = "The specified startRow or startColumn values are invalid."; -Strings.OfficeOM.L_MissingRequiredArguments = "missing some required arguments"; -Strings.OfficeOM.L_DataStale = "Data Not Current"; -Strings.OfficeOM.L_InvalidGrant = "Preauthorization missing."; -Strings.OfficeOM.L_InvalidBindingOperation = "Invalid Binding Operation"; -Strings.OfficeOM.L_DialogAddressNotTrusted = "The domain of the URL is not included in the AppDomains element in the manifest."; +Strings.OfficeOM.L_CustomFunctionImplementationMissing = "The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function."; +Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Browser restrictions prevented us from creating the dialog box. The domain of dialog box and the domain of the add-in host are not in the same security zone."; +Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Note: The number of cells in a table is suggested to be below 20,000 cells."; +Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Selected content needs to be in table format. Format the data as a table and try again."; +Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Allow"; +Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Note: The formatting sets set by a Formatting API call is suggested to be below 100."; Strings.OfficeOM.L_NoCapability = "You don't have sufficient permissions for this action."; -Strings.OfficeOM.L_InvalidDataFormat = "The format of the specified data object is invalid."; +Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = "Changes to property '{0}' cannot be applied through an \"object.set\" method."; +Strings.OfficeOM.L_BindingCreationError = "Binding Creation Error"; +Strings.OfficeOM.L_InitializeNotReady = "Office.js has not been fully loaded yet. Please try again later or make sure to add your initialization code on the Office.initialize function."; Strings.OfficeOM.L_RequestTimeout = "The call took too long to execute."; +Strings.OfficeOM.L_SetDataParametersConflict = "The specified parameters conflict."; +Strings.OfficeOM.L_InvalidBindingOperation = "Invalid Binding Operation"; +Strings.OfficeOM.L_DataNotMatchBindingSize = "The supplied data object does not match the size of the current selection."; +Strings.OfficeOM.L_RedundantCallbackSpecification = "Callback cannot be specified both in argument list and in optional object."; +Strings.OfficeOM.L_MemoryLimit = "Memory Limit Exceeded"; +Strings.OfficeOM.L_UnsupportedEnumerationMessage = "The enumeration isn't supported in the current host application."; +Strings.OfficeOM.L_PropertyDoesNotExist = "Property '{0}' does not exist on the object."; +Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "configure your browser"; +Strings.OfficeOM.L_DialogOK = "OK"; +Strings.OfficeOM.L_DialogAlreadyOpened = "The operation failed because this add-in already has an active dialog."; +Strings.OfficeOM.L_InternalError = "Internal Error"; +Strings.OfficeOM.L_CallbackNotAFunction = "Callback must be of type function, was of type {0}."; +Strings.OfficeOM.L_DialogRequireHTTPS = "The HTTP protocol is not supported. Use HTTPS instead"; +Strings.OfficeOM.L_OverwriteWorksheetData = "The set operation failed because the supplied data object will overwrite or shift data."; +Strings.OfficeOM.L_InvalidSetStartRowColumn = "The specified startRow or startColumn values are invalid."; Strings.OfficeOM.L_UserClickIgnore = "The user chose to ignore the dialog box."; -Strings.OfficeOM.L_DataReadError = "Data Read Error"; -Strings.OfficeOM.L_InvalidFormatValue = "One or more of the format parameters have values that aren't allowed. Double-check the values and try again."; -Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} wants to display a new window."; -Strings.OfficeOM.L_InvalidRequestContext = "Cannot use the object across different request contexts."; -Strings.OfficeOM.L_NetworkProblemRetrieveFile = "A network problem has prevented retrieval of the file."; -Strings.OfficeOM.L_OsfControlTypeNotSupported = "OsfControl type not supported."; -Strings.OfficeOM.L_SpecifiedIdNotExist = "The specified ID does not exist."; -Strings.OfficeOM.L_CannotNavigateTo = "The object is located in a place where navigation is not supported."; -Strings.OfficeOM.L_InvalidGetRows = "The specified rows are invalid."; -Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Operation is not supported on this binding type."; -Strings.OfficeOM.L_TooManyOptionalFunction = "multiple optional functions in parameter list"; +Strings.OfficeOM.L_DataWriteReminder = "Data Write Reminder"; +Strings.OfficeOM.L_CannotWriteToSelection = "Cannot write to the current selection."; Strings.OfficeOM.L_CustomXmlOutOfDateName = "Data Not Current"; -Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Note: The formatting sets set by a Formatting API call is suggested to be below 100."; -Strings.OfficeOM.L_NotSupported = "Function {0} is not supported."; -Strings.OfficeOM.L_DataNotMatchBindingType = "The specified data object is not compatible with the binding type."; -Strings.OfficeOM.L_IndexOutOfRange = "Index out of range."; -Strings.OfficeOM.L_UnknownBindingType = "The binding type is not supported."; -Strings.OfficeOM.L_NotSupportedEventType = "The specified event type {0} is not supported."; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory = "This add-in does not support user consent."; +Strings.OfficeOM.L_MultipleNamedItemFound = "Multiple objects with the same name were found."; +Strings.OfficeOM.L_UnsupportedUserIdentity = "User identity type is not supported."; +Strings.OfficeOM.L_DataWriteError = "Data Write Error"; +Strings.OfficeOM.L_ConnectionFailureWithDetails = "The request failed with status code of {0}, error code {1} and the following error message: {2}"; Strings.OfficeOM.L_InvalidNamedItemForBindingType = "The specified binding type is not compatible with the supplied named item."; -Strings.OfficeOM.L_PermissionDenied = "Permission Denied"; -Strings.OfficeOM.L_InvalidBinding = "Invalid Binding"; -Strings.OfficeOM.L_InvalidSelectionForBindingType = "A binding cannot be created with the current selection and the specified binding type."; -Strings.OfficeOM.L_InternalError = "Internal Error"; -Strings.OfficeOM.L_UnsupportedEnumerationMessage = "The enumeration isn't supported in the current host application."; -Strings.OfficeOM.L_SSOServerError = "Error occurred in the authentication provider."; -Strings.OfficeOM.L_SettingNameNotExist = "The specified setting name does not exist."; -Strings.OfficeOM.L_InvalidGetColumns = "The specified columns are invalid."; -Strings.OfficeOM.L_InvalidColumnsForBinding = "The specified columns are invalid."; -Strings.OfficeOM.L_GetDataParametersConflict = "The specified parameters conflict."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Add-in is already requesting an access token."; -Strings.OfficeOM.L_BrowserAPINotSupported = "This browser does not support the requested API."; -Strings.OfficeOM.L_InvalidResourceUrl = "Invalid application resource Url provided."; -Strings.OfficeOM.L_APINotSupported = "API Not Supported"; -Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Allow"; -Strings.OfficeOM.L_SettingsAreStale = "Settings could not be saved because they are not current."; +Strings.OfficeOM.L_RunMustReturnPromise = 'The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".'; +Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} wants to display a new window."; Strings.OfficeOM.L_UserAborted = "User aborted the consent request."; -Strings.OfficeOM.L_BadSelectorString = "The string passed into the selector is improperly formatted or unsupported."; -Strings.OfficeOM.L_SSOServerErrorMessage = "An unexpected error occurred on the server."; -Strings.OfficeOM.L_DialogNavigateError = "Dialog Navigation Error"; -Strings.OfficeOM.L_DataNotMatchSelection = "The supplied data object is not compatible with the shape or dimensions of the current selection."; -Strings.OfficeOM.L_CustomXmlError = "Custom XML Error."; -Strings.OfficeOM.L_ActivityLimitReached = "Activity limit has been reached."; -Strings.OfficeOM.L_InvalidBindingError = "Invalid Binding Error"; -Strings.OfficeOM.L_ConnectionFailureWithStatus = "The request failed with status code of {0}."; -Strings.OfficeOM.L_PropertyDoesNotExist = "Property '{0}' does not exist on the object."; -Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Coordinate parameters cannot be used with coercion type Table when the table contains merged cells."; -Strings.OfficeOM.L_SettingsStaleError = "Settings Stale Error"; -Strings.OfficeOM.L_DocumentReadOnly = "The requested operation is not allowed on the current document mode."; -Strings.OfficeOM.L_SelectionCannotBound = "Cannot bind to the current selection."; -Strings.OfficeOM.L_ColIndexOutOfRange = "The column index value is out of the allowed range. Use a value (0 or higher) that's less than the number of columns."; -Strings.OfficeOM.L_InvalidReadForBlankRow = "The specified row is blank."; -Strings.OfficeOM.L_NotImplemented = "Function {0} is not implemented."; -Strings.OfficeOM.L_RequestTokenUnavailable = "This API has been throttled to slow the call frequency."; -Strings.OfficeOM.L_FormatValueOutOfRange = "The value is out of the allowed range."; +Strings.OfficeOM.L_DataReadError = "Data Read Error"; +Strings.OfficeOM.L_DisplayDialogError = "Display Dialog Error"; +Strings.OfficeOM.L_CannotNavigateTo = "The object is located in a place where navigation is not supported."; +Strings.OfficeOM.L_SSOClientError = "Error occurred in the authentication request from Office."; +Strings.OfficeOM.L_NetworkProblemRetrieveFile = "A network problem has prevented retrieval of the file."; +Strings.OfficeOM.L_InvalidArgumentGeneric = "The argument(s) passed into the function don't work for this situation, are missing, or aren't in the right format."; Strings.OfficeOM.L_InvalidGetRowColumnCounts = "The specified rowCount or columnCount values are invalid."; +Strings.OfficeOM.L_PropertyNotLoaded = "The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context."; +Strings.OfficeOM.L_PermissionDenied = "Permission Denied"; +Strings.OfficeOM.L_InvalidFormatValue = "One or more of the format parameters have values that aren't allowed. Double-check the values and try again."; +Strings.OfficeOM.L_InvalidCellsValue = "One or more of the cells parameters have values that aren't allowed. Double-check the values and try again."; +Strings.OfficeOM.L_DialogAddressNotTrusted = "The domain of the URL is not included in the AppDomains element in the manifest."; +Strings.OfficeOM.L_InvalidResourceUrlMessage = "Invalid resource Url specified in the manifest."; +Strings.OfficeOM.L_APICallFailed = "API Call Failed"; +Strings.OfficeOM.L_NetworkProblem = "Network Problem"; +Strings.OfficeOM.L_UserAbortedMessage = "The user did not consent the add-in permissions."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Add-in is already requesting an access token."; +Strings.OfficeOM.L_NotSupported = "Function {0} is not supported."; +Strings.OfficeOM.L_InvalidFormat = "Invalid Format Error"; Strings.OfficeOM.L_EventHandlerRemovalFailed = "Failed to remove the event handler."; -Strings.OfficeOM.L_EventHandlerNotExist = "The specified event handler was not found for this binding."; -Strings.OfficeOM.L_BindingToMultipleSelection = "Noncontiguous selections are not supported."; -Strings.OfficeOM.L_ReadSettingsError = "Read Settings Error"; -Strings.OfficeOM.L_InvalidOrTimedOutSession = "Invalid Or Timed Out Session"; -Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "configure your browser"; -Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Selected content needs to be in table format. Format the data as a table and try again."; -Strings.OfficeOM.L_SSOClientErrorMessage = "An unexpected error occurred in the client."; -Strings.OfficeOM.L_CallbackNotAFunction = "Callback must be of type function, was of type {0}." +Strings.OfficeOM.L_CustomFunctionNameContainsBadChars = "The function name may only contain letters, digits, underscores, and periods."; +Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Ignore" \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/sr-cyrl-cs/office_strings.js b/node_modules/@microsoft/office-js/dist/sr-cyrl-cs/office_strings.js index f531eda..8c95aee 100644 --- a/node_modules/@microsoft/office-js/dist/sr-cyrl-cs/office_strings.js +++ b/node_modules/@microsoft/office-js/dist/sr-cyrl-cs/office_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_HostError="Host Error";Strings.OfficeOM.L_InternalErrorDescription="An internal error has occurred.";Strings.OfficeOM.L_TooManyOptionalObjects="multiple optional objects in parameter list";Strings.OfficeOM.L_ElementMissing="We couldn't format the table cell because some parameter values are missing. Double-check the parameters and try again.";Strings.OfficeOM.L_InvalidDataObject="Invalid Data Object";Strings.OfficeOM.L_APICallFailed="API Call Failed";Strings.OfficeOM.L_OverwriteWorksheetData="The set operation failed because the supplied data object will overwrite or shift data.";Strings.OfficeOM.L_MissingParameter="Missing Parameter";Strings.OfficeOM.L_UserNotSignedIn="No user is signed into Office.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="Attempting to set read-only property '{0}'.";Strings.OfficeOM.L_InvalidApiCallInContext="Invalid API call in the current context.";Strings.OfficeOM.L_DisplayDialogError="Display Dialog Error";Strings.OfficeOM.L_RedundantCallbackSpecification="Callback cannot be specified both in argument list and in optional object.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="The current selection is not compatible with the specified coercion type.";Strings.OfficeOM.L_GetDataIsTooLarge="The requested data set is too large.";Strings.OfficeOM.L_DataNotMatchCoercionType="The type of the specified data object is not compatible with the current selection.";Strings.OfficeOM.L_EventRegistrationError="Event Registration Error";Strings.OfficeOM.L_InitializeNotReady="Office.js has not been fully loaded yet. Please try again later or make sure to add your initialization code on the Office.initialize function.";Strings.OfficeOM.L_DataWriteError="Data Write Error";Strings.OfficeOM.L_InvalidGrantMessage="Missing grant for this add-in.";Strings.OfficeOM.L_FileTypeNotSupported="The specified file type is not supported.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="The data is out of date. Retrieve the object again.";Strings.OfficeOM.L_AppNameNotExist="Add-in Name for {0} doesn't exist.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Failed to add the event handler.";Strings.OfficeOM.L_OperationNotSupported="The operation is not supported.";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Call closeAsync on the current File before retrieving another.";Strings.OfficeOM.L_GetSelectionNotSupported="The current selection is not supported.";Strings.OfficeOM.L_TooManyIncompleteRequests="Wait until the previous call completes.";Strings.OfficeOM.L_UnsupportedUserIdentity="User identity type is not supported.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Application {0} does not exist. Microsoft.Office.WebExtension.initialize(reason) is not called.";Strings.OfficeOM.L_SliceSizeNotSupported="The specified slice size is not supported.";Strings.OfficeOM.L_PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.";Strings.OfficeOM.L_InvalidSetRows="The specified rows are invalid.";Strings.OfficeOM.L_InvalidNode="Invalid Node";Strings.OfficeOM.L_SSOClientError="Error occurred in the authentication request from Office.";Strings.OfficeOM.L_SettingsCannotSave="The settings could not be saved.";Strings.OfficeOM.L_NamedItemNotFound="The named item does not exist.";Strings.OfficeOM.L_MultipleNamedItemFound="Multiple objects with the same name were found.";Strings.OfficeOM.L_InvalidArgumentGeneric="The argument(s) passed into the function don't work for this situation, are missing, or aren't in the right format.";Strings.OfficeOM.L_OutOfRange="Out of Range";Strings.OfficeOM.L_DialogInvalidScheme="The URL scheme is not supported. Use HTTPS instead.";Strings.OfficeOM.L_InValidOptionalArgument="invalid optional argument";Strings.OfficeOM.L_UserAbortedMessage="The user did not consent the add-in permissions.";Strings.OfficeOM.L_ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.';Strings.OfficeOM.L_TooManyArguments="too many arguments";Strings.OfficeOM.L_ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}";Strings.OfficeOM.L_SaveSettingsError="Save Settings Error";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Browser restrictions prevented us from creating the dialog box. The domain of dialog box and the domain of the add-in host are not in the same security zone.";Strings.OfficeOM.L_RowIndexOutOfRange="The row index value is out of the allowed range. Use a value (0 or higher) that's less than the number of rows.";Strings.OfficeOM.L_UnsupportedEnumeration="Unsupported Enumeration";Strings.OfficeOM.L_BindingCreationError="Binding Creation Error";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Ignore";Strings.OfficeOM.L_CoercionTypeNotSupported="The specified coercion type is not supported.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Coordinate parameters cannot be used with coercion type Table when the table contains merged cells.";Strings.OfficeOM.L_FunctionCallFailed="Function {0} call failed, error code: {1}.";Strings.OfficeOM.L_InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.';Strings.OfficeOM.L_InvalidParameters="Function {0} has invalid parameters.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="Changes to property '{0}' cannot be applied through an \"object.set\" method.";Strings.OfficeOM.L_DataWriteReminder="Data Write Reminder";Strings.OfficeOM.L_RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".';Strings.OfficeOM.L_InvalidApiArgumentsMessage="Invalid input arguments.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Note: The number of cells in a table is suggested to be below 20,000 cells.";Strings.OfficeOM.L_DataNotMatchBindingSize="The supplied data object does not match the size of the current selection.";Strings.OfficeOM.L_SetDataParametersConflict="The specified parameters conflict.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="The identity type of the user is not supported.";Strings.OfficeOM.L_DialogAlreadyOpened="The operation failed because this add-in already has an active dialog.";Strings.OfficeOM.L_CannotWriteToSelection="Cannot write to the current selection.";Strings.OfficeOM.L_CannotRegisterEvent="The event handler cannot be registered.";Strings.OfficeOM.L_ShuttingDown="Operation failed because the data is not current on the server.";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_UnsupportedDataObject="The supplied data object type is not supported.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="The specified coercion type is not compatible with this binding type.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.";Strings.OfficeOM.L_MemoryLimit="Memory Limit Exceeded";Strings.OfficeOM.L_InvalidValue="Invalid Value";Strings.OfficeOM.L_InvalidSetColumns="The specified columns are invalid.";Strings.OfficeOM.L_InvalidAPICall="Invalid API Call";Strings.OfficeOM.L_InvalidTableOptionValue="One or more of the tableOptions parameters have values that aren't allowed. Double-check the values and try again.";Strings.OfficeOM.L_Timeout="The operation has timed out.";Strings.OfficeOM.L_InvalidSSOAddinMessage="The identity API is not supported for this add-in.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Selection Limit Reached";Strings.OfficeOM.L_InvalidFormat="Invalid Format Error";Strings.OfficeOM.L_BindingNotExist="The specified binding does not exist.";Strings.OfficeOM.L_DialogRequireHTTPS="The HTTP protocol is not supported. Use HTTPS instead";Strings.OfficeOM.L_NavOutOfBound="The operation failed because the index is out of range.";Strings.OfficeOM.L_CustomXmlNodeNotFound="The specified node was not found.";Strings.OfficeOM.L_NotSupportedBindingType="The specified binding type {0} is not supported.";Strings.OfficeOM.L_InvalidResourceUrlMessage="Invalid resource Url specified in the manifest.";Strings.OfficeOM.L_InvalidCellsValue="One or more of the cells parameters have values that aren't allowed. Double-check the values and try again.";Strings.OfficeOM.L_InvalidSetStartRowColumn="The specified startRow or startColumn values are invalid.";Strings.OfficeOM.L_NewWindowCrossZone="The security settings in your browser prevent us from creating a dialog box. Try a different browser, or {0} so that '{1}' and the domain shown in your address bar are in the same security zone.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="The operation failed because this add-in is already requesting an access token.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath limits selection to 1024 items.";Strings.OfficeOM.L_InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.";Strings.OfficeOM.L_FormattingReminder="Formatting Reminder";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Please make a selection.";Strings.OfficeOM.L_NetworkProblem="Network Problem";Strings.OfficeOM.L_InvalidCoercion="Invalid Coercion Type";Strings.OfficeOM.L_SetDataIsTooLarge="The specified data object is too large.";Strings.OfficeOM.L_InvalidGetStartRowColumn="The specified startRow or startColumn values are invalid.";Strings.OfficeOM.L_MissingRequiredArguments="missing some required arguments";Strings.OfficeOM.L_DataStale="Data Not Current";Strings.OfficeOM.L_InvalidGrant="Preauthorization missing.";Strings.OfficeOM.L_InvalidBindingOperation="Invalid Binding Operation";Strings.OfficeOM.L_DialogAddressNotTrusted="The domain of the URL is not included in the AppDomains element in the manifest.";Strings.OfficeOM.L_NoCapability="You don't have sufficient permissions for this action.";Strings.OfficeOM.L_InvalidDataFormat="The format of the specified data object is invalid.";Strings.OfficeOM.L_RequestTimeout="The call took too long to execute.";Strings.OfficeOM.L_UserClickIgnore="The user chose to ignore the dialog box.";Strings.OfficeOM.L_DataReadError="Data Read Error";Strings.OfficeOM.L_InvalidFormatValue="One or more of the format parameters have values that aren't allowed. Double-check the values and try again.";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} wants to display a new window.";Strings.OfficeOM.L_InvalidRequestContext="Cannot use the object across different request contexts.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="A network problem has prevented retrieval of the file.";Strings.OfficeOM.L_OsfControlTypeNotSupported="OsfControl type not supported.";Strings.OfficeOM.L_SpecifiedIdNotExist="The specified ID does not exist.";Strings.OfficeOM.L_CannotNavigateTo="The object is located in a place where navigation is not supported.";Strings.OfficeOM.L_InvalidGetRows="The specified rows are invalid.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Operation is not supported on this binding type.";Strings.OfficeOM.L_TooManyOptionalFunction="multiple optional functions in parameter list";Strings.OfficeOM.L_CustomXmlOutOfDateName="Data Not Current";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Note: The formatting sets set by a Formatting API call is suggested to be below 100.";Strings.OfficeOM.L_NotSupported="Function {0} is not supported.";Strings.OfficeOM.L_DataNotMatchBindingType="The specified data object is not compatible with the binding type.";Strings.OfficeOM.L_IndexOutOfRange="Index out of range.";Strings.OfficeOM.L_UnknownBindingType="The binding type is not supported.";Strings.OfficeOM.L_NotSupportedEventType="The specified event type {0} is not supported.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="The specified binding type is not compatible with the supplied named item.";Strings.OfficeOM.L_PermissionDenied="Permission Denied";Strings.OfficeOM.L_InvalidBinding="Invalid Binding";Strings.OfficeOM.L_InvalidSelectionForBindingType="A binding cannot be created with the current selection and the specified binding type.";Strings.OfficeOM.L_InternalError="Internal Error";Strings.OfficeOM.L_UnsupportedEnumerationMessage="The enumeration isn't supported in the current host application.";Strings.OfficeOM.L_SSOServerError="Error occurred in the authentication provider.";Strings.OfficeOM.L_SettingNameNotExist="The specified setting name does not exist.";Strings.OfficeOM.L_InvalidGetColumns="The specified columns are invalid.";Strings.OfficeOM.L_InvalidColumnsForBinding="The specified columns are invalid.";Strings.OfficeOM.L_GetDataParametersConflict="The specified parameters conflict.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Add-in is already requesting an access token.";Strings.OfficeOM.L_BrowserAPINotSupported="This browser does not support the requested API.";Strings.OfficeOM.L_InvalidResourceUrl="Invalid application resource Url provided.";Strings.OfficeOM.L_APINotSupported="API Not Supported";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Allow";Strings.OfficeOM.L_SettingsAreStale="Settings could not be saved because they are not current.";Strings.OfficeOM.L_UserAborted="User aborted the consent request.";Strings.OfficeOM.L_BadSelectorString="The string passed into the selector is improperly formatted or unsupported.";Strings.OfficeOM.L_SSOServerErrorMessage="An unexpected error occurred on the server.";Strings.OfficeOM.L_DialogNavigateError="Dialog Navigation Error";Strings.OfficeOM.L_DataNotMatchSelection="The supplied data object is not compatible with the shape or dimensions of the current selection.";Strings.OfficeOM.L_CustomXmlError="Custom XML Error.";Strings.OfficeOM.L_ActivityLimitReached="Activity limit has been reached.";Strings.OfficeOM.L_InvalidBindingError="Invalid Binding Error";Strings.OfficeOM.L_ConnectionFailureWithStatus="The request failed with status code of {0}.";Strings.OfficeOM.L_PropertyDoesNotExist="Property '{0}' does not exist on the object.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Coordinate parameters cannot be used with coercion type Table when the table contains merged cells.";Strings.OfficeOM.L_SettingsStaleError="Settings Stale Error";Strings.OfficeOM.L_DocumentReadOnly="The requested operation is not allowed on the current document mode.";Strings.OfficeOM.L_SelectionCannotBound="Cannot bind to the current selection.";Strings.OfficeOM.L_ColIndexOutOfRange="The column index value is out of the allowed range. Use a value (0 or higher) that's less than the number of columns.";Strings.OfficeOM.L_InvalidReadForBlankRow="The specified row is blank.";Strings.OfficeOM.L_NotImplemented="Function {0} is not implemented.";Strings.OfficeOM.L_RequestTokenUnavailable="This API has been throttled to slow the call frequency.";Strings.OfficeOM.L_FormatValueOutOfRange="The value is out of the allowed range.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="The specified rowCount or columnCount values are invalid.";Strings.OfficeOM.L_EventHandlerRemovalFailed="Failed to remove the event handler.";Strings.OfficeOM.L_EventHandlerNotExist="The specified event handler was not found for this binding.";Strings.OfficeOM.L_BindingToMultipleSelection="Noncontiguous selections are not supported.";Strings.OfficeOM.L_ReadSettingsError="Read Settings Error";Strings.OfficeOM.L_InvalidOrTimedOutSession="Invalid Or Timed Out Session";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="configure your browser";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Selected content needs to be in table format. Format the data as a table and try again.";Strings.OfficeOM.L_SSOClientErrorMessage="An unexpected error occurred in the client.";Strings.OfficeOM.L_CallbackNotAFunction="Callback must be of type function, was of type {0}." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_InvalidApiCallInContext="Invalid API call in the current context.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Failed to add the event handler.";Strings.OfficeOM.L_InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage="The operation failed because this add-in does not support user consent in this category";Strings.OfficeOM.L_InvalidGetRows="The specified rows are invalid.";Strings.OfficeOM.L_ActivityLimitReached="Activity limit has been reached.";Strings.OfficeOM.L_SaveSettingsError="Save Settings Error";Strings.OfficeOM.L_EventRegistrationError="Event Registration Error";Strings.OfficeOM.L_InvalidNode="Invalid Node";Strings.OfficeOM.L_UnknownBindingType="The binding type is not supported.";Strings.OfficeOM.L_OsfControlTypeNotSupported="OsfControl type not supported.";Strings.OfficeOM.L_TooManyOptionalFunction="multiple optional functions in parameter list";Strings.OfficeOM.L_ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.";Strings.OfficeOM.L_BindingNotExist="The specified binding does not exist.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Coordinate parameters cannot be used with coercion type Table when the table contains merged cells.";Strings.OfficeOM.L_InvalidGrant="Preauthorization missing.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Invalid Or Timed Out Session";Strings.OfficeOM.L_ReadSettingsError="Read Settings Error";Strings.OfficeOM.L_InvalidBindingError="Invalid Binding Error";Strings.OfficeOM.L_CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name.";Strings.OfficeOM.L_InvalidBinding="Invalid Binding";Strings.OfficeOM.L_InvalidRequestContext="Cannot use the object across different request contexts.";Strings.OfficeOM.L_APINotSupported="API Not Supported";Strings.OfficeOM.L_InvalidGetColumns="The specified columns are invalid.";Strings.OfficeOM.L_SettingsAreStale="Settings could not be saved because they are not current.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="The operation failed because this add-in is already requesting an access token.";Strings.OfficeOM.L_SSOServerErrorMessage="An unexpected error occurred on the server.";Strings.OfficeOM.L_InvalidReadForBlankRow="The specified row is blank.";Strings.OfficeOM.L_MissingRequiredArguments="missing some required arguments";Strings.OfficeOM.L_RequestTokenUnavailable="This API has been throttled to slow the call frequency.";Strings.OfficeOM.L_DataNotMatchCoercionType="The type of the specified data object is not compatible with the current selection.";Strings.OfficeOM.L_FileTypeNotSupported="The specified file type is not supported.";Strings.OfficeOM.L_AppNameNotExist="Add-in Name for {0} doesn't exist.";Strings.OfficeOM.L_ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.';Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Operation is not supported on this binding type.";Strings.OfficeOM.L_BindingToMultipleSelection="Noncontiguous selections are not supported.";Strings.OfficeOM.L_RowIndexOutOfRange="The row index value is out of the allowed range. Use a value (0 or higher) that's less than the number of rows.";Strings.OfficeOM.L_SSOConnectionLostErrorMessage="A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones.";Strings.OfficeOM.L_TooManyOptionalObjects="multiple optional objects in parameter list";Strings.OfficeOM.L_SettingsStaleError="Settings Stale Error";Strings.OfficeOM.L_CustomXmlNodeNotFound="The specified node was not found.";Strings.OfficeOM.L_ElementMissing="We couldn't format the table cell because some parameter values are missing. Double-check the parameters and try again.";Strings.OfficeOM.L_InvalidSetColumns="The specified columns are invalid.";Strings.OfficeOM.L_DialogInvalidScheme="The URL scheme is not supported. Use HTTPS instead.";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Invalid input arguments.";Strings.OfficeOM.L_InValidOptionalArgument="invalid optional argument";Strings.OfficeOM.L_DocumentReadOnly="The requested operation is not allowed on the current document mode.";Strings.OfficeOM.L_CoercionTypeNotSupported="The specified coercion type is not supported.";Strings.OfficeOM.L_SliceSizeNotSupported="The specified slice size is not supported.";Strings.OfficeOM.L_InvalidValue="Invalid Value";Strings.OfficeOM.L_InvalidColumnsForBinding="The specified columns are invalid.";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Call closeAsync on the current File before retrieving another.";Strings.OfficeOM.L_IndexOutOfRange="Index out of range.";Strings.OfficeOM.L_SettingsCannotSave="The settings could not be saved.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="The current selection is not compatible with the specified coercion type.";Strings.OfficeOM.L_FormatValueOutOfRange="The value is out of the allowed range.";Strings.OfficeOM.L_Timeout="The operation has timed out.";Strings.OfficeOM.L_GetDataIsTooLarge="The requested data set is too large.";Strings.OfficeOM.L_DataNotMatchBindingType="The specified data object is not compatible with the binding type.";Strings.OfficeOM.L_TooManyArguments="too many arguments";Strings.OfficeOM.L_InvalidGrantMessage="Missing grant for this add-in.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Please make a selection.";Strings.OfficeOM.L_SetDataIsTooLarge="The specified data object is too large.";Strings.OfficeOM.L_ConnectionFailureWithStatus="The request failed with status code of {0}.";Strings.OfficeOM.L_GetDataParametersConflict="The specified parameters conflict.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Application {0} does not exist. Microsoft.Office.WebExtension.initialize(reason) is not called.";Strings.OfficeOM.L_HostError="Host Error";Strings.OfficeOM.L_SSOServerError="Error occurred in the authentication provider.";Strings.OfficeOM.L_SpecifiedIdNotExist="The specified ID does not exist.";Strings.OfficeOM.L_NotImplemented="Function {0} is not implemented.";Strings.OfficeOM.L_InvalidSelectionForBindingType="A binding cannot be created with the current selection and the specified binding type.";Strings.OfficeOM.L_TooManyIncompleteRequests="Wait until the previous call completes.";Strings.OfficeOM.L_SelectionCannotBound="Cannot bind to the current selection.";Strings.OfficeOM.L_DialogNavigateError="Dialog Navigation Error";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Selection Limit Reached";Strings.OfficeOM.L_CannotRegisterEvent="The event handler cannot be registered.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="The specified coercion type is not compatible with this binding type.";Strings.OfficeOM.L_NotSupportedEventType="The specified event type {0} is not supported.";Strings.OfficeOM.L_ColIndexOutOfRange="The column index value is out of the allowed range. Use a value (0 or higher) that's less than the number of columns.";Strings.OfficeOM.L_DataNotMatchSelection="The supplied data object is not compatible with the shape or dimensions of the current selection.";Strings.OfficeOM.L_SettingNameNotExist="The specified setting name does not exist.";Strings.OfficeOM.L_InvalidParameters="Function {0} has invalid parameters.";Strings.OfficeOM.L_InvalidDataObject="Invalid Data Object";Strings.OfficeOM.L_InvalidGetStartRowColumn="The specified startRow or startColumn values are invalid.";Strings.OfficeOM.L_FunctionCallFailed="Function {0} call failed, error code: {1}.";Strings.OfficeOM.L_UnsupportedDataObject="The supplied data object type is not supported.";Strings.OfficeOM.L_SSOConnectionLostError="A connection was lost during the sign in process.";Strings.OfficeOM.L_BrowserAPINotSupported="This browser does not support the requested API.";Strings.OfficeOM.L_NavOutOfBound="The operation failed because the index is out of range.";Strings.OfficeOM.L_BadSelectorString="The string passed into the selector is improperly formatted or unsupported.";Strings.OfficeOM.L_NewWindowCrossZone="The security settings in your browser prevent us from creating a dialog box. Try a different browser, or {0} so that '{1}' and the domain shown in your address bar are in the same security zone.";Strings.OfficeOM.L_UserNotSignedIn="No user is signed into Office.";Strings.OfficeOM.L_InvalidCoercion="Invalid Coercion Type";Strings.OfficeOM.L_InvalidAPICall="Invalid API Call";Strings.OfficeOM.L_OperationNotSupported="The operation is not supported.";Strings.OfficeOM.L_InvalidTableOptionValue="One or more of the tableOptions parameters have values that aren't allowed. Double-check the values and try again.";Strings.OfficeOM.L_InvalidSetRows="The specified rows are invalid.";Strings.OfficeOM.L_ShuttingDown="Operation failed because the data is not current on the server.";Strings.OfficeOM.L_DataStale="Data Not Current";Strings.OfficeOM.L_InvalidDataFormat="The format of the specified data object is invalid.";Strings.OfficeOM.L_NamedItemNotFound="The named item does not exist.";Strings.OfficeOM.L_EventHandlerNotExist="The specified event handler was not found for this binding.";Strings.OfficeOM.L_CustomFunctionDefinitionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions.";Strings.OfficeOM.L_GetSelectionNotSupported="The current selection is not supported.";Strings.OfficeOM.L_MissingParameter="Missing Parameter";Strings.OfficeOM.L_OutOfRange="Out of Range";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="The identity type of the user is not supported.";Strings.OfficeOM.L_InvalidSSOAddinMessage="The identity API is not supported for this add-in.";Strings.OfficeOM.L_InternalErrorDescription="An internal error has occurred.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="The data is out of date. Retrieve the object again.";Strings.OfficeOM.L_InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.";Strings.OfficeOM.L_NotSupportedBindingType="The specified binding type {0} is not supported.";Strings.OfficeOM.L_SSOClientErrorMessage="An unexpected error occurred in the client.";Strings.OfficeOM.L_InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.';Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="Attempting to set read-only property '{0}'.";Strings.OfficeOM.L_UnsupportedEnumeration="Unsupported Enumeration";Strings.OfficeOM.L_CustomXmlError="Custom XML Error.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Coordinate parameters cannot be used with coercion type Table when the table contains merged cells.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath limits selection to 1024 items.";Strings.OfficeOM.L_InvalidResourceUrl="Invalid application resource Url provided.";Strings.OfficeOM.L_FormattingReminder="Formatting Reminder";Strings.OfficeOM.L_CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Browser restrictions prevented us from creating the dialog box. The domain of dialog box and the domain of the add-in host are not in the same security zone.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Note: The number of cells in a table is suggested to be below 20,000 cells.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Selected content needs to be in table format. Format the data as a table and try again.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Allow";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Note: The formatting sets set by a Formatting API call is suggested to be below 100.";Strings.OfficeOM.L_NoCapability="You don't have sufficient permissions for this action.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="Changes to property '{0}' cannot be applied through an \"object.set\" method.";Strings.OfficeOM.L_BindingCreationError="Binding Creation Error";Strings.OfficeOM.L_InitializeNotReady="Office.js has not been fully loaded yet. Please try again later or make sure to add your initialization code on the Office.initialize function.";Strings.OfficeOM.L_RequestTimeout="The call took too long to execute.";Strings.OfficeOM.L_SetDataParametersConflict="The specified parameters conflict.";Strings.OfficeOM.L_InvalidBindingOperation="Invalid Binding Operation";Strings.OfficeOM.L_DataNotMatchBindingSize="The supplied data object does not match the size of the current selection.";Strings.OfficeOM.L_RedundantCallbackSpecification="Callback cannot be specified both in argument list and in optional object.";Strings.OfficeOM.L_MemoryLimit="Memory Limit Exceeded";Strings.OfficeOM.L_UnsupportedEnumerationMessage="The enumeration isn't supported in the current host application.";Strings.OfficeOM.L_PropertyDoesNotExist="Property '{0}' does not exist on the object.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="configure your browser";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_DialogAlreadyOpened="The operation failed because this add-in already has an active dialog.";Strings.OfficeOM.L_InternalError="Internal Error";Strings.OfficeOM.L_CallbackNotAFunction="Callback must be of type function, was of type {0}.";Strings.OfficeOM.L_DialogRequireHTTPS="The HTTP protocol is not supported. Use HTTPS instead";Strings.OfficeOM.L_OverwriteWorksheetData="The set operation failed because the supplied data object will overwrite or shift data.";Strings.OfficeOM.L_InvalidSetStartRowColumn="The specified startRow or startColumn values are invalid.";Strings.OfficeOM.L_UserClickIgnore="The user chose to ignore the dialog box.";Strings.OfficeOM.L_DataWriteReminder="Data Write Reminder";Strings.OfficeOM.L_CannotWriteToSelection="Cannot write to the current selection.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Data Not Current";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory="This add-in does not support user consent.";Strings.OfficeOM.L_MultipleNamedItemFound="Multiple objects with the same name were found.";Strings.OfficeOM.L_UnsupportedUserIdentity="User identity type is not supported.";Strings.OfficeOM.L_DataWriteError="Data Write Error";Strings.OfficeOM.L_ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}";Strings.OfficeOM.L_InvalidNamedItemForBindingType="The specified binding type is not compatible with the supplied named item.";Strings.OfficeOM.L_RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".';Strings.OfficeOM.L_ShowWindowDialogNotification="{0} wants to display a new window.";Strings.OfficeOM.L_UserAborted="User aborted the consent request.";Strings.OfficeOM.L_DataReadError="Data Read Error";Strings.OfficeOM.L_DisplayDialogError="Display Dialog Error";Strings.OfficeOM.L_CannotNavigateTo="The object is located in a place where navigation is not supported.";Strings.OfficeOM.L_SSOClientError="Error occurred in the authentication request from Office.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="A network problem has prevented retrieval of the file.";Strings.OfficeOM.L_InvalidArgumentGeneric="The argument(s) passed into the function don't work for this situation, are missing, or aren't in the right format.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="The specified rowCount or columnCount values are invalid.";Strings.OfficeOM.L_PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.";Strings.OfficeOM.L_PermissionDenied="Permission Denied";Strings.OfficeOM.L_InvalidFormatValue="One or more of the format parameters have values that aren't allowed. Double-check the values and try again.";Strings.OfficeOM.L_InvalidCellsValue="One or more of the cells parameters have values that aren't allowed. Double-check the values and try again.";Strings.OfficeOM.L_DialogAddressNotTrusted="The domain of the URL is not included in the AppDomains element in the manifest.";Strings.OfficeOM.L_InvalidResourceUrlMessage="Invalid resource Url specified in the manifest.";Strings.OfficeOM.L_APICallFailed="API Call Failed";Strings.OfficeOM.L_NetworkProblem="Network Problem";Strings.OfficeOM.L_UserAbortedMessage="The user did not consent the add-in permissions.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Add-in is already requesting an access token.";Strings.OfficeOM.L_NotSupported="Function {0} is not supported.";Strings.OfficeOM.L_InvalidFormat="Invalid Format Error";Strings.OfficeOM.L_EventHandlerRemovalFailed="Failed to remove the event handler.";Strings.OfficeOM.L_CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Ignore" \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/sr-cyrl-cs/outlook_strings.debug.js b/node_modules/@microsoft/office-js/dist/sr-cyrl-cs/outlook_strings.debug.js index 9e7b967..4745bd3 100644 --- a/node_modules/@microsoft/office-js/dist/sr-cyrl-cs/outlook_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/sr-cyrl-cs/outlook_strings.debug.js @@ -1,34 +1,35 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("_u"); _u.ExtensibilityStrings = function() { }; _u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings"); +_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "The user changed the position of the cursor while the data was being inserted."; _u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "The HTML santization has failed."; -_u.ExtensibilityStrings.l_OffsetNotfound_Text = "An offset for this time stamp couldn't be found."; -_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "The selected item has been changed."; -_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "The given parameters do not match the expected format."; -_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "One or more of the display names provided is too long."; -_u.ExtensibilityStrings.l_InvalidEventDates_Text = "The end date occurs before the start date."; -_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "The attachment cannot be added to the item."; -_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "The request exceeds the 1 MB size limit. Please modify your EWS request."; -_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "The attachment cannot be added because it is too big."; +_u.ExtensibilityStrings.l_InvalidEndTime_Text = "The end time cannot be before the start time."; +_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "No valid recipients were provided."; +_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "The attachment cannot be deleted from the item."; +_u.ExtensibilityStrings.l_InvalidDate_Text = "The input doesn't resolve to a valid date."; _u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Attachments cannot be added while the full reply or forward is being retrieved from the server."; +_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "The given parameters do not match the expected format."; +_u.ExtensibilityStrings.l_OffsetNotfound_Text = "An offset for this time stamp couldn't be found."; +_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "The attachment cannot be deleted because attachment with the attachment index cannot be found."; +_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "The attachment path was invalid."; +_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "The user removed the attachment before upload has completed."; +_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Attachments cannot be added because the message already has the maximum number of attachments"; _u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "The attachment ID was invalid."; _u.ExtensibilityStrings.l_InternalFormatError_Text = "There was an internal format error."; -_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Attachments cannot be added because the message already has the maximum number of attachments"; +_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "The attachment cannot be added because it is too big."; +_u.ExtensibilityStrings.l_InvalidEventDates_Text = "The end date occurs before the start date."; +_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Data Write Error"; +_u.ExtensibilityStrings.l_InternalProtocolError_Text = "Internal protocol error: '{0}'."; +_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "The request exceeds the 1 MB size limit. Please modify your EWS request."; _u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Elevated permission is required to access protected members of the JavaScript API for Office."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "Elevated permission is required to call the method: '{0}'."; -_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "The user changed the position of the cursor while the data was being inserted."; +_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "The attachment cannot be added to the item."; +_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "The total number of recipients in the field can't exceed {0}."; _u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "One or more of the email addresses provided is too long."; -_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "The attachment cannot be deleted because attachment with the attachment index cannot be found."; +_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "Elevated permission is required to call the method: '{0}'."; +_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "One or more of the display names provided is too long."; _u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Attachment Error"; -_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "The attachment cannot be deleted from the item."; -_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "No valid recipients were provided."; -_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "The total number of recipients in the field can't exceed {0}."; -_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Data Write Error"; -_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "The user removed the attachment before upload has completed."; -_u.ExtensibilityStrings.l_InternalProtocolError_Text = "Internal protocol error: '{0}'."; -_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "The attachment path was invalid."; -_u.ExtensibilityStrings.l_InvalidEndTime_Text = "The end time cannot be before the start time."; -_u.ExtensibilityStrings.l_InvalidDate_Text = "The input doesn't resolve to a valid date." +_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "The selected item has been changed." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/sr-cyrl-cs/outlook_strings.js b/node_modules/@microsoft/office-js/dist/sr-cyrl-cs/outlook_strings.js index c92ec01..8ca2954 100644 --- a/node_modules/@microsoft/office-js/dist/sr-cyrl-cs/outlook_strings.js +++ b/node_modules/@microsoft/office-js/dist/sr-cyrl-cs/outlook_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="The HTML santization has failed.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="An offset for this time stamp couldn't be found.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="The selected item has been changed.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="The given parameters do not match the expected format.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="One or more of the display names provided is too long.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="The end date occurs before the start date.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="The attachment cannot be added to the item.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="The request exceeds the 1 MB size limit. Please modify your EWS request.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="The attachment cannot be added because it is too big.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Attachments cannot be added while the full reply or forward is being retrieved from the server.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="The attachment ID was invalid.";_u.ExtensibilityStrings.l_InternalFormatError_Text="There was an internal format error.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Attachments cannot be added because the message already has the maximum number of attachments";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Elevated permission is required to access protected members of the JavaScript API for Office.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Elevated permission is required to call the method: '{0}'.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="The user changed the position of the cursor while the data was being inserted.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="One or more of the email addresses provided is too long.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="The attachment cannot be deleted because attachment with the attachment index cannot be found.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Attachment Error";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="The attachment cannot be deleted from the item.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="No valid recipients were provided.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="The total number of recipients in the field can't exceed {0}.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Data Write Error";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="The user removed the attachment before upload has completed.";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Internal protocol error: '{0}'.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="The attachment path was invalid.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="The end time cannot be before the start time.";_u.ExtensibilityStrings.l_InvalidDate_Text="The input doesn't resolve to a valid date." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_CursorPositionChanged_Text="The user changed the position of the cursor while the data was being inserted.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="The HTML santization has failed.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="The end time cannot be before the start time.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="No valid recipients were provided.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="The attachment cannot be deleted from the item.";_u.ExtensibilityStrings.l_InvalidDate_Text="The input doesn't resolve to a valid date.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Attachments cannot be added while the full reply or forward is being retrieved from the server.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="The given parameters do not match the expected format.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="An offset for this time stamp couldn't be found.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="The attachment cannot be deleted because attachment with the attachment index cannot be found.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="The attachment path was invalid.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="The user removed the attachment before upload has completed.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Attachments cannot be added because the message already has the maximum number of attachments";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="The attachment ID was invalid.";_u.ExtensibilityStrings.l_InternalFormatError_Text="There was an internal format error.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="The attachment cannot be added because it is too big.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="The end date occurs before the start date.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Data Write Error";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Internal protocol error: '{0}'.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="The request exceeds the 1 MB size limit. Please modify your EWS request.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Elevated permission is required to access protected members of the JavaScript API for Office.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="The attachment cannot be added to the item.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="The total number of recipients in the field can't exceed {0}.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="One or more of the email addresses provided is too long.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Elevated permission is required to call the method: '{0}'.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="One or more of the display names provided is too long.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Attachment Error";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="The selected item has been changed." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/sr-cyrl-rs/office_strings.debug.js b/node_modules/@microsoft/office-js/dist/sr-cyrl-rs/office_strings.debug.js index d50d2dc..43ebf98 100644 --- a/node_modules/@microsoft/office-js/dist/sr-cyrl-rs/office_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/sr-cyrl-rs/office_strings.debug.js @@ -1,179 +1,190 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("Strings"); Strings.OfficeOM = function() { }; Strings.OfficeOM.registerClass("Strings.OfficeOM"); -Strings.OfficeOM.L_DialogAddressNotTrusted = "Домен URL адреÑе није уврштен у елементу AppDomains у манифеÑту"; -Strings.OfficeOM.L_InvalidValue = "Ðеважећа вредноÑÑ‚"; -Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Ðаведени тип промене није компатибилан Ñа овим типом повезивања."; -Strings.OfficeOM.L_EventHandlerAdditionFailed = "Ðије уÑпело додавање рутине за руковање."; -Strings.OfficeOM.L_UserAbortedMessage = "КориÑник није прихватио дозволе за програмÑки додатак."; -Strings.OfficeOM.L_UnsupportedDataObject = "Дати тип објекта података није подржан."; -Strings.OfficeOM.L_SettingsAreStale = "Ðије могуће Ñачувати поÑтавке јер ниÑу актуелне."; -Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Дозволи"; -Strings.OfficeOM.L_OsfControlTypeNotSupported = "Тип OsfControl није подржан."; +Strings.OfficeOM.L_SSOConnectionLostError = "A connection was lost during the sign in process."; +Strings.OfficeOM.L_SSOClientError = "Дошло је до грешке у захтеву за потврду идентитета из ÑиÑтема Office."; +Strings.OfficeOM.L_DataStale = "Подаци ниÑу актуелни"; +Strings.OfficeOM.L_GetDataIsTooLarge = "Захтевани Ñкуп података је превелик."; +Strings.OfficeOM.L_DataNotMatchCoercionType = "Тип наведеног објекта података није компатибилан Ñа тренутним избором."; +Strings.OfficeOM.L_CoercionTypeNotSupported = "Ðаведени тип промене није подржан."; +Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Ðпликација {0} не поÑтоји. Microsoft.Office.WebExtension.initialize(разлог) није позван."; +Strings.OfficeOM.L_DataNotMatchBindingSize = "Ðаведени објекат података не одговара величини тренутног избора."; +Strings.OfficeOM.L_FormattingReminder = "ПодÑетник за обликовање"; +Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Подаци Ñу заÑтарели. Преузмите објекат поново."; Strings.OfficeOM.L_NavOutOfBound = "Операција није уÑпела јер је Ð¸Ð½Ð´ÐµÐºÑ Ð¸Ð·Ð²Ð°Ð½ опÑега."; -Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Изабрани Ñадржај мора да буде у облику табеле. Обликујте податке као табелу и покушајте поново."; -Strings.OfficeOM.L_FormatValueOutOfRange = "ВредноÑÑ‚ је изван дозвољеног опÑега."; -Strings.OfficeOM.L_UserClickIgnore = "КориÑник је одабрао да занемари дијалог."; -Strings.OfficeOM.L_InvalidGetRows = "Ðаведени редови Ñу неважећи."; -Strings.OfficeOM.L_UnsupportedEnumerationMessage = "Ðабрајање није подржано у тренутној хоÑÑ‚ апликацији."; Strings.OfficeOM.L_BadSelectorString = "ÐиÑка проÑлеђена у бирач неиÑправно је обликована или није подржана."; -Strings.OfficeOM.L_DataStale = "Подаци ниÑу актуелни"; -Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Ðргументи неважећег уноÑа."; -Strings.OfficeOM.L_Timeout = "Операција је иÑтекла."; -Strings.OfficeOM.L_NotSupportedEventType = "Ðаведени тип догађаја {0} није подржан."; -Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Ðије могуће кориÑтити параметре координате Ñа типом промене Табела када табела Ñадржи обједињене ћелије."; +Strings.OfficeOM.L_NetworkProblem = "Проблем Ñа мрежом"; +Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Позови closeAsync на тренутној датотеци пре преузимања неке друге."; +Strings.OfficeOM.L_InvalidNode = "Ðеважећи чвор"; +Strings.OfficeOM.L_InitializeNotReady = "Office.js још није потпуно учитан. Покушајте поново каÑније или проверите да ли Ñте додали кôд за покретање у функцију Office.initialize."; +Strings.OfficeOM.L_BindingCreationError = "Грешка при креирању повезивања"; +Strings.OfficeOM.L_SelectionCannotBound = "Ðије могуће повезивање Ñа тренутним избором."; +Strings.OfficeOM.L_UnsupportedUserIdentity = "Тип идентитета кориÑника није подржан."; +Strings.OfficeOM.L_InvalidBindingOperation = "Операција неважећег повезивања"; +Strings.OfficeOM.L_ReadSettingsError = "Грешка при читању поÑтавки"; +Strings.OfficeOM.L_BrowserAPINotSupported = "Овај прегледач не подржава захтевани API."; +Strings.OfficeOM.L_SSOConnectionLostErrorMessage = "A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones."; +Strings.OfficeOM.L_InvalidGrant = "Пред-ауторизација недоÑтаје."; +Strings.OfficeOM.L_InvalidSetColumns = "Ðаведене колоне Ñу неважеће."; +Strings.OfficeOM.L_DataNotMatchSelection = "Дати објекат података није компатибилан Ñа обликом или димензијама тренутног избора."; +Strings.OfficeOM.L_InvalidGetStartRowColumn = "Ðаведене вредноÑти за почетни ред или почетну колону ниÑу важеће."; +Strings.OfficeOM.L_FileTypeNotSupported = "Ðаведени тип датотеке није подржан."; +Strings.OfficeOM.L_UserClickIgnore = "КориÑник је одабрао да занемари дијалог."; +Strings.OfficeOM.L_UserAborted = "КориÑник је обуÑтавио захтев за одобрење."; +Strings.OfficeOM.L_DialogRequireHTTPS = "HTTP протокол није подржан. КориÑтите HTTPS"; +Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Операција није подржана на овом типу повезивања."; +Strings.OfficeOM.L_InvalidOperationInCellEditMode = "Excel је у режиму уређивања ћелија. Изађите из режима уређивања тако што ћете притиÑнути ENTER или TAB одноÑно изабрати другу ћелију, а затим покушајте поново."; Strings.OfficeOM.L_ConnectionFailureWithStatus = "Захтев није уÑпео уз ÑтатуÑни кôд {0}."; -Strings.OfficeOM.L_InvalidOrTimedOutSession = "Ðеважећа или иÑтекла ÑеÑија"; -Strings.OfficeOM.L_CustomXmlOutOfDateName = "Подаци ниÑу актуелни"; -Strings.OfficeOM.L_NotSupported = "Функција {0} није подржана."; -Strings.OfficeOM.L_PropertyNotLoaded = "СвојÑтво „{0}“ није доÑтупно. Пре читања вредноÑти ÑвојÑтва, позовите метод учитавања на Ñадржаном објекту и позовите „context.sync()“ на повезаном контекÑту захтева."; +Strings.OfficeOM.L_InvalidRequestContext = "Ðије могуће кориÑтити објекат у више различитих контекÑта захтева."; +Strings.OfficeOM.L_HostError = "Грешка у хоÑту"; +Strings.OfficeOM.L_DialogInvalidScheme = "URL шема није подржана. КориÑтите HTTPS."; +Strings.OfficeOM.L_CannotWriteToSelection = "Ðије могуће пиÑати у тренутни избор."; +Strings.OfficeOM.L_InvalidBinding = "Ðеважеће повезивање"; +Strings.OfficeOM.L_GetSelectionNotSupported = "Тренутни избор није подржан."; Strings.OfficeOM.L_MissingParameter = "Параметар недоÑтаје"; -Strings.OfficeOM.L_InvalidFormat = "Грешка неважећег формата"; -Strings.OfficeOM.L_OutOfRange = "Изван опÑега"; -Strings.OfficeOM.L_UnsupportedEnumeration = "Ðабрајање није подржано"; -Strings.OfficeOM.L_InvalidTableOptionValue = "Ðеки параметри опција табеле имају вредноÑти које ниÑу дозвољене. Двапут проверите вредноÑти и покушајте поново."; -Strings.OfficeOM.L_FunctionCallFailed = "Ðије уÑпело позивање {0} функције, кôд грешке: {1}."; -Strings.OfficeOM.L_NamedItemNotFound = "Именована Ñтавка не поÑтоји."; -Strings.OfficeOM.L_ValueNotLoaded = "ВредноÑÑ‚ објекта резултата још није учитана. Пре читања ÑвојÑтва вредноÑти, позовите „context.sync()“ на повезаном контекÑту захтева."; -Strings.OfficeOM.L_IndexOutOfRange = "Ð˜Ð½Ð´ÐµÐºÑ Ñ˜Ðµ ван опÑега."; +Strings.OfficeOM.L_UnsupportedEnumerationMessage = "Ðабрајање није подржано у тренутној хоÑÑ‚ апликацији."; +Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "Ваша Office Online ÑеÑија је иÑтекла или је неважећа. ОÑвежите Ñтраницу да биÑте наÑтавили."; +Strings.OfficeOM.L_Timeout = "Операција је иÑтекла."; Strings.OfficeOM.L_PermissionDenied = "Дозвола је одбијена"; -Strings.OfficeOM.L_SaveSettingsError = "Грешка при чувању поÑтавки"; -Strings.OfficeOM.L_NewWindowCrossZone = "БезбедноÑне поÑтавке у прегледачу Ñпречавају Ð½Ð°Ñ Ð´Ð° креирамо дијалог. Покушајте Ñа другим прегледачем или {0} како би „{1}“ и домен приказан на траци адреÑа били у иÑтој безбедноÑној зони."; -Strings.OfficeOM.L_BindingToMultipleSelection = "ÐеÑуÑедни избори ниÑу подржани."; -Strings.OfficeOM.L_ElementMissing = "ÐиÑмо могли да обликујемо ћелију табеле зато што неке вредноÑти параметара недоÑтају. Двапут проверите параметре и покушајте поново."; -Strings.OfficeOM.L_DialogAlreadyOpened = "Операција није уÑпела зато што овај програмÑки додатак већ има активан дијалог."; -Strings.OfficeOM.L_FormattingReminder = "ПодÑетник за обликовање"; -Strings.OfficeOM.L_InternalErrorDescription = "Дошло је до унутрашње грешке."; -Strings.OfficeOM.L_SettingNameNotExist = "Ðаведено име поÑтавке не поÑтоји."; -Strings.OfficeOM.L_TooManyIncompleteRequests = "Сачекајте да Ñе претходни позив доврши."; -Strings.OfficeOM.L_CannotWriteToSelection = "Ðије могуће пиÑати у тренутни избор."; -Strings.OfficeOM.L_InvalidReadForBlankRow = "Ðаведени ред је празан."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "ПрограмÑки додатак већ захтева токен за приÑтуп."; -Strings.OfficeOM.L_DataWriteError = "Грешка при пиÑању података"; -Strings.OfficeOM.L_DocumentReadOnly = "Захтевана операција није дозвољена у тренутном режиму документа."; -Strings.OfficeOM.L_DialogNavigateError = "Грешка приликом навигације у дијалогу"; -Strings.OfficeOM.L_EventRegistrationError = "Грешка при региÑтрацији догађаја"; -Strings.OfficeOM.L_InvalidArgument = "Ðргумент „{0}“ не функционише у овој Ñитуацији, недоÑтаје или није у одговарајућем формату."; -Strings.OfficeOM.L_APINotSupported = "API није подржан"; -Strings.OfficeOM.L_NotSupportedBindingType = "Ðаведени тип повезивања {0} није подржан."; -Strings.OfficeOM.L_BindingCreationError = "Грешка при креирању повезивања"; -Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Ðаведене вредноÑти за број редова или број колона ниÑу важеће."; -Strings.OfficeOM.L_OperationNotSupported = "Операција није подржана."; -Strings.OfficeOM.L_CallbackNotAFunction = "Повратни позив мора да буде типа функције, био је типа {0}."; -Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Позови closeAsync на тренутној датотеци пре преузимања неке друге."; -Strings.OfficeOM.L_DialogRequireHTTPS = "HTTP протокол није подржан. КориÑтите HTTPS"; -Strings.OfficeOM.L_CannotRegisterEvent = "Ðије могуће региÑтровати руковалац догађајем."; -Strings.OfficeOM.L_TooManyArguments = "превише аргумената"; -Strings.OfficeOM.L_UserNotSignedIn = "Ðиједан кориÑник није пријављен у Оffice."; -Strings.OfficeOM.L_CustomXmlNodeNotFound = "Ðаведени чвор није пронађен."; -Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Подаци Ñу заÑтарели. Преузмите објекат поново."; -Strings.OfficeOM.L_InvalidSelectionForBindingType = "Ðије могуће креирати повезивање Ñа тренутном Ñелекцијом и наведеним типом повезивања."; -Strings.OfficeOM.L_PropertyDoesNotExist = "СвојÑтво „{0}“ не поÑтоји у објекту."; -Strings.OfficeOM.L_InvalidCoercion = "Ðеважећи тип промене"; -Strings.OfficeOM.L_SettingsStaleError = "Грешка заÑтарелих поÑтавки"; Strings.OfficeOM.L_SSOServerErrorMessage = "Дошло је до неочекиване грешке на Ñерверу."; -Strings.OfficeOM.L_InvalidBinding = "Ðеважеће повезивање"; +Strings.OfficeOM.L_SaveSettingsError = "Грешка при чувању поÑтавки"; +Strings.OfficeOM.L_MemoryLimit = "Премашено је ограничење меморије"; +Strings.OfficeOM.L_TooManyOptionalFunction = "више опционалних функција на лиÑти параметара"; +Strings.OfficeOM.L_ColIndexOutOfRange = "ВредноÑÑ‚ индекÑа колоне је изван дозвољеног опÑега. КориÑтите вредноÑÑ‚ (0 или већу) која је мања од броја колона."; Strings.OfficeOM.L_OverwriteWorksheetData = "Операција поÑтављања није уÑпела јер ће наведени објекат Ñа подацима заменити или померити податке."; -Strings.OfficeOM.L_GetDataIsTooLarge = "Захтевани Ñкуп података је превелик."; -Strings.OfficeOM.L_HostError = "Грешка у хоÑту"; -Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Тип идентитета кориÑника није подржан."; -Strings.OfficeOM.L_InvalidBindingError = "Грешка неважећег повезивања"; -Strings.OfficeOM.L_InvalidGetStartRowColumn = "Ðаведене вредноÑти за почетни ред или почетну колону ниÑу важеће."; -Strings.OfficeOM.L_DataWriteReminder = "ПодÑетник за пиÑање података"; -Strings.OfficeOM.L_InvalidParameters = "Функција {0} има неважеће параметре."; -Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Ðаведени тип повезивања није компатибилан Ñа наведеном именованом Ñтавком."; -Strings.OfficeOM.L_AppNameNotExist = "Име програмÑког додатка за {0} не поÑтоји."; -Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Ограничења прегледача Ñпречила Ñу Ð½Ð°Ñ Ð´Ð° креирамо дијалог. Домен дијалога и домен хоÑта програмÑког додатка ниÑу у иÑтој безбедноÑној зони."; -Strings.OfficeOM.L_GetDataParametersConflict = "Ðаведени параметри ниÑу уÑаглашени."; -Strings.OfficeOM.L_InvalidFormatValue = "Ðеки параметри формата имају вредноÑти које ниÑу дозвољене. Двапут проверите вредноÑти и покушајте поново."; -Strings.OfficeOM.L_ShuttingDown = "Операција није уÑпела јер подаци на Ñерверу ниÑу актуелни."; -Strings.OfficeOM.L_BindingNotExist = "Ðаведено повезивање не поÑтоји."; -Strings.OfficeOM.L_APICallFailed = "API позив није уÑпео"; -Strings.OfficeOM.L_InvalidObjectPath = "Путања објекта „{0}“ не функционише за оно што покушавате да урадите. Ðко објекат кориÑтите у више „context.sync“ позива и изван Ñеквенцијалног извршавања групе „.run“, кориÑтите методе „context.trackedObjects.add()“ и „context.trackedObjects.remove()“ да биÑте управљали трајањем објекта."; -Strings.OfficeOM.L_InvalidSetStartRowColumn = "Ðаведене вредноÑти за почетни ред или почетну колону ниÑу важеће."; -Strings.OfficeOM.L_SelectionCannotBound = "Ðије могуће повезивање Ñа тренутним избором."; -Strings.OfficeOM.L_InvalidArgumentGeneric = "Ðргументи проÑлеђени у функцију не функционишу у овој Ñитуацији, недоÑтају или ниÑу у одговарајућем формату."; -Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Ðпликација {0} не поÑтоји. Microsoft.Office.WebExtension.initialize(разлог) није позван."; -Strings.OfficeOM.L_InvalidRequestContext = "Ðије могуће кориÑтити објекат у више различитих контекÑта захтева."; -Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Проблем Ñа мрежом је Ñпречио преузимање датотеке."; -Strings.OfficeOM.L_DataNotMatchBindingSize = "Ðаведени објекат података не одговара величини тренутног избора."; -Strings.OfficeOM.L_CustomXmlExceedQuotaName = "ДоÑтигнуто је ограничење избора"; -Strings.OfficeOM.L_SSOServerError = "Дошло је до грешке у добављачу уÑлуге потврде идентитета."; -Strings.OfficeOM.L_InvalidDataFormat = "Формат наведеног објекта података је неважећи."; -Strings.OfficeOM.L_InvalidBindingOperation = "Операција неважећег повезивања"; +Strings.OfficeOM.L_ApiNotFoundDetails = "Метод или ÑвојÑтво {0} предÑтавља део Ñкупа захтева {1}, који није доÑтупан у вашој верзији апликације {2}."; Strings.OfficeOM.L_RunMustReturnPromise = "Функција групиÑања проÑлеђена методу „.run“ није вратила обећање. Функција мора да врати обећање како би Ñви аутоматÑки праћени објекти могли да Ñе објаве по довршетку операције групиÑања. Обећање Ñе обично враћа тако што вратите одговор позива „context.sync()“."; -Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = "Ðије могуће применити промене ÑвојÑтва „{0}“ путем метода „object.set“."; -Strings.OfficeOM.L_BrowserAPINotSupported = "Овај прегледач не подржава захтевани API."; -Strings.OfficeOM.L_UnsupportedUserIdentity = "Тип идентитета кориÑника није подржан."; -Strings.OfficeOM.L_ActivityLimitReached = "ДоÑтигнуто је ограничење активноÑти."; -Strings.OfficeOM.L_DisplayDialogError = "Грешка у приказу дијалога"; -Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Тренутни избор није компатибилан Ñа наведеним типом промене."; +Strings.OfficeOM.L_FormatValueOutOfRange = "ВредноÑÑ‚ је изван дозвољеног опÑега."; +Strings.OfficeOM.L_OperationNotSupported = "Операција није подржана."; +Strings.OfficeOM.L_RedundantCallbackSpecification = "Повратни позив не може да Ñе наведе и на лиÑти аргумената и у опционалном објекту."; Strings.OfficeOM.L_SliceSizeNotSupported = "Ðаведена величина иÑечка није подржана."; -Strings.OfficeOM.L_DialogInvalidScheme = "URL шема није подржана. КориÑтите HTTPS."; +Strings.OfficeOM.L_InvalidBindingError = "Грешка неважећег повезивања"; +Strings.OfficeOM.L_InvalidReadForBlankRow = "Ðаведени ред је празан."; +Strings.OfficeOM.L_DialogAlreadyOpened = "Операција није уÑпела зато што овај програмÑки додатак већ има активан дијалог."; +Strings.OfficeOM.L_InvalidSSOAddinMessage = "API идентитета није подржан за овај програмÑки додатак."; +Strings.OfficeOM.L_CustomFunctionNameCannotSplit = "Име функције мора да Ñадржи проÑтор за име који није празан и кратко име које није празно."; +Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Проблем Ñа мрежом је Ñпречио преузимање датотеке."; +Strings.OfficeOM.L_InvalidObjectPath = "Путања објекта „{0}“ не функционише за оно што покушавате да урадите. Ðко објекат кориÑтите у више „context.sync“ позива и изван Ñеквенцијалног извршавања групе „.run“, кориÑтите методе „context.trackedObjects.add()“ и „context.trackedObjects.remove()“ да биÑте управљали трајањем објекта."; +Strings.OfficeOM.L_ConnectionFailureWithDetails = "Захтев није уÑпео уз ÑтатуÑни кôд {0}, кôд грешке {1} и Ñледећу поруку о грешци: {2}"; +Strings.OfficeOM.L_InvalidGetColumns = "Ðаведене колоне Ñу неважеће."; Strings.OfficeOM.L_SetDataParametersConflict = "Ðаведени параметри ниÑу уÑаглашени."; +Strings.OfficeOM.L_InvalidSetRows = "Ðаведени редови Ñу неважећи."; +Strings.OfficeOM.L_DataNotMatchBindingType = "Ðаведени објекат података није компатибалан Ñа овим типом повезивања."; +Strings.OfficeOM.L_InvalidDataFormat = "Формат наведеног објекта података је неважећи."; +Strings.OfficeOM.L_GetDataParametersConflict = "Ðаведени параметри ниÑу уÑаглашени."; +Strings.OfficeOM.L_InvalidFormatValue = "Ðеки параметри формата имају вредноÑти које ниÑу дозвољене. Двапут проверите вредноÑти и покушајте поново."; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage = "Операција није уÑпела зато што овај програмÑки додатак не подржава приÑтанак кориÑника у овој категорији"; +Strings.OfficeOM.L_AppNameNotExist = "Име програмÑког додатка за {0} не поÑтоји."; +Strings.OfficeOM.L_PropertyNotLoaded = "СвојÑтво „{0}“ није доÑтупно. Пре читања вредноÑти ÑвојÑтва, позовите метод учитавања на Ñадржаном објекту и позовите „context.sync()“ на повезаном контекÑту захтева."; +Strings.OfficeOM.L_FunctionCallFailed = "Ðије уÑпело позивање {0} функције, кôд грешке: {1}."; +Strings.OfficeOM.L_InvalidAPICall = "Ðеважећи API позив"; +Strings.OfficeOM.L_NewWindowCrossZone = "БезбедноÑне поÑтавке у прегледачу Ñпречавају Ð½Ð°Ñ Ð´Ð° креирамо дијалог. Покушајте Ñа другим прегледачем или {0} како би „{1}“ и домен приказан на траци адреÑа били у иÑтој безбедноÑној зони."; Strings.OfficeOM.L_MultipleNamedItemFound = "Пронађено је више објеката Ñа иÑтим именом."; +Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath ограничава избор на 1024 Ñтавке."; +Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Тренутни избор није компатибилан Ñа наведеним типом промене."; +Strings.OfficeOM.L_InvalidApiCallInContext = "Ðеважећи API позив у тренутном контекÑту."; +Strings.OfficeOM.L_MissingRequiredArguments = "недоÑтају неки захтевани аргументи"; +Strings.OfficeOM.L_EventHandlerAdditionFailed = "Ðије уÑпело додавање рутине за руковање."; +Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Ðаведени тип промене није компатибилан Ñа овим типом повезивања."; +Strings.OfficeOM.L_InvalidValue = "Ðеважећа вредноÑÑ‚"; +Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Ðије могуће кориÑтити параметре координате Ñа типом промене Табела када табела Ñадржи обједињене ћелије."; +Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Изабрани Ñадржај мора да буде у облику табеле. Обликујте податке као табелу и покушајте поново."; Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Занемари"; -Strings.OfficeOM.L_InvalidCellsValue = "Ðеки параметри ћелија имају вредноÑти које ниÑу дозвољене. Двапут проверите вредноÑти и покушајте поново."; -Strings.OfficeOM.L_InvalidGrant = "Пред-ауторизација недоÑтаје."; -Strings.OfficeOM.L_InvalidResourceUrl = "Обезбеђена је неважећа URL адреÑа реÑурÑа апликације."; -Strings.OfficeOM.L_InvalidGrantMessage = "ÐедоÑтаје одобрење за овај програмÑки додатак."; -Strings.OfficeOM.L_TooManyOptionalFunction = "више опционалних функција на лиÑти параметара"; +Strings.OfficeOM.L_BindingNotExist = "Ðаведено повезивање не поÑтоји."; +Strings.OfficeOM.L_EventHandlerNotExist = "Ðаведена рутина за руковање догађајем није пронађена за ово повезивање."; +Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Ðаправите избор."; +Strings.OfficeOM.L_SSOClientErrorMessage = "Дошло је до неочекиване грешке у клијенту."; Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Ðапомена: Предложено је да број ћелија у табели буде иÑпод 20.000."; -Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "Покушава Ñе поÑтављање ÑвојÑтва Ñамо за читање „{0}“."; -Strings.OfficeOM.L_InvalidDataObject = "Ðеважећи објекат Ñа подацима"; +Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = "Ðије могуће применити промене ÑвојÑтва „{0}“ путем метода „object.set“."; +Strings.OfficeOM.L_CustomXmlError = "Грешка у прилагођеном XML-у."; +Strings.OfficeOM.L_DisplayDialogError = "Грешка у приказу дијалога"; +Strings.OfficeOM.L_CustomXmlOutOfDateName = "Подаци ниÑу актуелни"; +Strings.OfficeOM.L_ActivityLimitReached = "ДоÑтигнуто је ограничење активноÑти."; +Strings.OfficeOM.L_DataWriteReminder = "ПодÑетник за пиÑање података"; +Strings.OfficeOM.L_InternalErrorDescription = "Дошло је до унутрашње грешке."; +Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Тип идентитета кориÑника није подржан."; +Strings.OfficeOM.L_SetDataIsTooLarge = "Ðаведени објекат података је превелик."; +Strings.OfficeOM.L_TooManyIncompleteRequests = "Сачекајте да Ñе претходни позив доврши."; +Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Ðргументи неважећег уноÑа."; +Strings.OfficeOM.L_NotSupportedEventType = "Ðаведени тип догађаја {0} није подржан."; +Strings.OfficeOM.L_InvalidGetRows = "Ðаведени редови Ñу неважећи."; +Strings.OfficeOM.L_NotSupportedBindingType = "Ðаведени тип повезивања {0} није подржан."; +Strings.OfficeOM.L_InvalidSetStartRowColumn = "Ðаведене вредноÑти за почетни ред или почетну колону ниÑу важеће."; +Strings.OfficeOM.L_InvalidCoercion = "Ðеважећи тип промене"; +Strings.OfficeOM.L_UnsupportedDataObject = "Дати тип објекта података није подржан."; +Strings.OfficeOM.L_DocumentReadOnly = "Захтевана операција није дозвољена у тренутном режиму документа."; +Strings.OfficeOM.L_InvalidFormat = "Грешка неважећег формата"; +Strings.OfficeOM.L_CustomFunctionImplementationMissing = "СвојÑтво Ñа овим именом које предÑтавља дефиницију функције у оквиру Excel.CustomFunctions мора да Ñадржи ÑвојÑтво „call“ које примењује функцију."; Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Ðије могуће кориÑтити параметре координате Ñа типом промене Табела када табела Ñадржи обједињене ћелије."; -Strings.OfficeOM.L_EventHandlerRemovalFailed = "Ðије уÑпело уклањање рутине за руковање."; -Strings.OfficeOM.L_InitializeNotReady = "Office.js још није потпуно учитан. Покушајте поново каÑније или проверите да ли Ñте додали кôд за покретање у функцију Office.initialize."; -Strings.OfficeOM.L_DataNotMatchCoercionType = "Тип наведеног објекта података није компатибилан Ñа тренутним избором."; -Strings.OfficeOM.L_DataReadError = "Грешка при читању података"; -Strings.OfficeOM.L_TooManyOptionalObjects = "више опционалних објеката на лиÑти параметара"; -Strings.OfficeOM.L_DialogOK = "У реду"; -Strings.OfficeOM.L_SSOClientErrorMessage = "Дошло је до неочекиване грешке у клијенту."; -Strings.OfficeOM.L_MemoryLimit = "Премашено је ограничење меморије"; -Strings.OfficeOM.L_InvalidApiCallInContext = "Ðеважећи API позив у тренутном контекÑту."; -Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} жели да Ñе приказује у новом прозору."; +Strings.OfficeOM.L_InvalidTableOptionValue = "Ðеки параметри опција табеле имају вредноÑти које ниÑу дозвољене. Двапут проверите вредноÑти и покушајте поново."; +Strings.OfficeOM.L_UnsupportedEnumeration = "Ðабрајање није подржано"; +Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Ðаведене вредноÑти за број редова или број колона ниÑу важеће."; +Strings.OfficeOM.L_InvalidDataObject = "Ðеважећи објекат Ñа подацима"; +Strings.OfficeOM.L_CustomXmlExceedQuotaName = "ДоÑтигнуто је ограничење избора"; +Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Ðапомена: Предложено је да Ñкупови обликовања које је поÑтавио позив API обликовања буду иÑпод 100."; +Strings.OfficeOM.L_PropertyDoesNotExist = "СвојÑтво „{0}“ не поÑтоји у објекту."; +Strings.OfficeOM.L_APINotSupported = "API није подржан"; +Strings.OfficeOM.L_UserNotSignedIn = "Ðиједан кориÑник није пријављен у Оffice."; Strings.OfficeOM.L_InvalidColumnsForBinding = "Ðаведене колоне Ñу неважеће."; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory = "Овај програмÑки додатак не подржава приÑтанак кориÑника."; +Strings.OfficeOM.L_InvalidOrTimedOutSession = "Ðеважећа или иÑтекла ÑеÑија"; +Strings.OfficeOM.L_SSOServerError = "Дошло је до грешке у добављачу уÑлуге потврде идентитета."; +Strings.OfficeOM.L_BindingToMultipleSelection = "ÐеÑуÑедни избори ниÑу подржани."; +Strings.OfficeOM.L_InvalidGrantMessage = "ÐедоÑтаје одобрење за овај програмÑки додатак."; +Strings.OfficeOM.L_UserAbortedMessage = "КориÑник није прихватио дозволе за програмÑки додатак."; +Strings.OfficeOM.L_InvalidResourceUrl = "Обезбеђена је неважећа URL адреÑа реÑурÑа апликације."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "ПрограмÑки додатак већ захтева токен за приÑтуп."; +Strings.OfficeOM.L_RequestTimeout = "Извршавање позива је предуго трајало."; +Strings.OfficeOM.L_SettingsAreStale = "Ðије могуће Ñачувати поÑтавке јер ниÑу актуелне."; +Strings.OfficeOM.L_ShuttingDown = "Операција није уÑпела јер подаци на Ñерверу ниÑу актуелни."; +Strings.OfficeOM.L_IndexOutOfRange = "Ð˜Ð½Ð´ÐµÐºÑ Ñ˜Ðµ ван опÑега."; +Strings.OfficeOM.L_CustomXmlNodeNotFound = "Ðаведени чвор није пронађен."; +Strings.OfficeOM.L_InternalError = "Унутрашња грешка"; +Strings.OfficeOM.L_ValueNotLoaded = "ВредноÑÑ‚ објекта резултата још није учитана. Пре читања ÑвојÑтва вредноÑти, позовите „context.sync()“ на повезаном контекÑту захтева."; +Strings.OfficeOM.L_OsfControlTypeNotSupported = "Тип OsfControl није подржан."; +Strings.OfficeOM.L_InvalidArgument = "Ðргумент „{0}“ не функционише у овој Ñитуацији, недоÑтаје или није у одговарајућем формату."; +Strings.OfficeOM.L_DialogNavigateError = "Грешка приликом навигације у дијалогу"; +Strings.OfficeOM.L_APICallFailed = "API позив није уÑпео"; Strings.OfficeOM.L_CannotNavigateTo = "Објекат Ñе налази на меÑту на којем навигација није подржана."; -Strings.OfficeOM.L_FileTypeNotSupported = "Ðаведени тип датотеке није подржан."; +Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} жели да Ñе приказује у новом прозору."; +Strings.OfficeOM.L_SettingsCannotSave = "Ðије могуће Ñачувати поÑтавке."; Strings.OfficeOM.L_InValidOptionalArgument = "неважећи опционални аргумент"; -Strings.OfficeOM.L_SSOClientError = "Дошло је до грешке у захтеву за потврду идентитета из ÑиÑтема Office."; -Strings.OfficeOM.L_InvalidSSOAddinMessage = "API идентитета није подржан за овај програмÑки додатак."; -Strings.OfficeOM.L_DataNotMatchBindingType = "Ðаведени објекат података није компатибалан Ñа овим типом повезивања."; -Strings.OfficeOM.L_RedundantCallbackSpecification = "Повратни позив не може да Ñе наведе и на лиÑти аргумената и у опционалном објекту."; +Strings.OfficeOM.L_NotSupported = "Функција {0} није подржана."; +Strings.OfficeOM.L_CallbackNotAFunction = "Повратни позив мора да буде типа функције, био је типа {0}."; +Strings.OfficeOM.L_ElementMissing = "ÐиÑмо могли да обликујемо ћелију табеле зато што неке вредноÑти параметара недоÑтају. Двапут проверите параметре и покушајте поново."; +Strings.OfficeOM.L_DataWriteError = "Грешка при пиÑању података"; Strings.OfficeOM.L_NoCapability = "Ðемате довољно дозвола за ову радњу."; +Strings.OfficeOM.L_CustomFunctionDefinitionMissing = "СвојÑтво Ñа овим именом које предÑтавља дефиницију функције мора да поÑтоји у оквиру Excel.CustomFunctions."; +Strings.OfficeOM.L_NotImplemented = "Функција {0} није примењена."; +Strings.OfficeOM.L_DialogAddressNotTrusted = "Домен URL адреÑе није уврштен у елементу AppDomains у манифеÑту"; +Strings.OfficeOM.L_SettingsStaleError = "Грешка заÑтарелих поÑтавки"; +Strings.OfficeOM.L_CustomFunctionNameContainsBadChars = "Име функције може да Ñадржи Ñамо Ñлова, цифре, подвлаке и тачке."; Strings.OfficeOM.L_SpecifiedIdNotExist = "Ðаведени ID не поÑтоји."; -Strings.OfficeOM.L_InvalidSetColumns = "Ðаведене колоне Ñу неважеће."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Операција није уÑпела зато што овај програмÑки додатак већ захтева токен за приÑтуп."; -Strings.OfficeOM.L_EventHandlerNotExist = "Ðаведена рутина за руковање догађајем није пронађена за ово повезивање."; -Strings.OfficeOM.L_GetSelectionNotSupported = "Тренутни избор није подржан."; -Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "Ваша Office Online ÑеÑија је иÑтекла или је неважећа. ОÑвежите Ñтраницу да биÑте наÑтавили."; -Strings.OfficeOM.L_InvalidAPICall = "Ðеважећи API позив"; Strings.OfficeOM.L_RequestTokenUnavailable = "Овај API је ограничен да би Ñе уÑпорила учеÑталоÑÑ‚ позива."; -Strings.OfficeOM.L_SettingsCannotSave = "Ðије могуће Ñачувати поÑтавке."; -Strings.OfficeOM.L_UserAborted = "КориÑник је обуÑтавио захтев за одобрење."; -Strings.OfficeOM.L_InternalError = "Унутрашња грешка"; -Strings.OfficeOM.L_ReadSettingsError = "Грешка при читању поÑтавки"; -Strings.OfficeOM.L_InvalidNode = "Ðеважећи чвор"; +Strings.OfficeOM.L_InvalidCellsValue = "Ðеки параметри ћелија имају вредноÑти које ниÑу дозвољене. Двапут проверите вредноÑти и покушајте поново."; +Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "Покушава Ñе поÑтављање ÑвојÑтва Ñамо за читање „{0}“."; +Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Дозволи"; +Strings.OfficeOM.L_EventHandlerRemovalFailed = "Ðије уÑпело уклањање рутине за руковање."; +Strings.OfficeOM.L_InvalidSelectionForBindingType = "Ðије могуће креирати повезивање Ñа тренутном Ñелекцијом и наведеним типом повезивања."; +Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Ограничења прегледача Ñпречила Ñу Ð½Ð°Ñ Ð´Ð° креирамо дијалог. Домен дијалога и домен хоÑта програмÑког додатка ниÑу у иÑтој безбедноÑној зони."; +Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Ðаведени тип повезивања није компатибилан Ñа наведеном именованом Ñтавком."; Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "конфигуришите прегледач"; -Strings.OfficeOM.L_InvalidSetRows = "Ðаведени редови Ñу неважећи."; -Strings.OfficeOM.L_NetworkProblem = "Проблем Ñа мрежом"; -Strings.OfficeOM.L_SetDataIsTooLarge = "Ðаведени објекат података је превелик."; -Strings.OfficeOM.L_UnknownBindingType = "Тип повезивања није подржан."; -Strings.OfficeOM.L_NotImplemented = "Функција {0} није примењена."; -Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Ðапомена: Предложено је да Ñкупови обликовања које је поÑтавио позив API обликовања буду иÑпод 100."; -Strings.OfficeOM.L_MissingRequiredArguments = "недоÑтају неки захтевани аргументи"; +Strings.OfficeOM.L_DialogOK = "У реду"; +Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Операција није уÑпела зато што овај програмÑки додатак већ захтева токен за приÑтуп."; +Strings.OfficeOM.L_NamedItemNotFound = "Именована Ñтавка не поÑтоји."; +Strings.OfficeOM.L_SettingNameNotExist = "Ðаведено име поÑтавке не поÑтоји."; Strings.OfficeOM.L_RowIndexOutOfRange = "ВредноÑÑ‚ индекÑа реда је изван дозвољеног опÑега. КориÑтите вредноÑÑ‚ (0 или већу) која је мања од броја редова."; -Strings.OfficeOM.L_CoercionTypeNotSupported = "Ðаведени тип промене није подржан."; -Strings.OfficeOM.L_InvalidGetColumns = "Ðаведене колоне Ñу неважеће."; -Strings.OfficeOM.L_RequestTimeout = "Извршавање позива је предуго трајало."; -Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Ðаправите избор."; -Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Операција није подржана на овом типу повезивања."; -Strings.OfficeOM.L_CustomXmlError = "Грешка у прилагођеном XML-у."; -Strings.OfficeOM.L_ConnectionFailureWithDetails = "Захтев није уÑпео уз ÑтатуÑни кôд {0}, кôд грешке {1} и Ñледећу поруку о грешци: {2}"; +Strings.OfficeOM.L_TooManyOptionalObjects = "више опционалних објеката на лиÑти параметара"; +Strings.OfficeOM.L_CannotRegisterEvent = "Ðије могуће региÑтровати руковалац догађајем."; +Strings.OfficeOM.L_TooManyArguments = "превише аргумената"; +Strings.OfficeOM.L_UnknownBindingType = "Тип повезивања није подржан."; +Strings.OfficeOM.L_DataReadError = "Грешка при читању података"; Strings.OfficeOM.L_InvalidResourceUrlMessage = "У манифеÑту је наведена неважећа URL адреÑа реÑурÑа."; -Strings.OfficeOM.L_DataNotMatchSelection = "Дати објекат података није компатибилан Ñа обликом или димензијама тренутног избора."; -Strings.OfficeOM.L_ColIndexOutOfRange = "ВредноÑÑ‚ индекÑа колоне је изван дозвољеног опÑега. КориÑтите вредноÑÑ‚ (0 или већу) која је мања од броја колона."; -Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath ограничава избор на 1024 Ñтавке." +Strings.OfficeOM.L_EventRegistrationError = "Грешка при региÑтрацији догађаја"; +Strings.OfficeOM.L_InvalidArgumentGeneric = "Ðргументи проÑлеђени у функцију не функционишу у овој Ñитуацији, недоÑтају или ниÑу у одговарајућем формату."; +Strings.OfficeOM.L_InvalidParameters = "Функција {0} има неважеће параметре."; +Strings.OfficeOM.L_OutOfRange = "Изван опÑега" \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/sr-cyrl-rs/office_strings.js b/node_modules/@microsoft/office-js/dist/sr-cyrl-rs/office_strings.js index 55727de..7942997 100644 --- a/node_modules/@microsoft/office-js/dist/sr-cyrl-rs/office_strings.js +++ b/node_modules/@microsoft/office-js/dist/sr-cyrl-rs/office_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_DialogAddressNotTrusted="Домен URL адреÑе није уврштен у елементу AppDomains у манифеÑту";Strings.OfficeOM.L_InvalidValue="Ðеважећа вредноÑÑ‚";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Ðаведени тип промене није компатибилан Ñа овим типом повезивања.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Ðије уÑпело додавање рутине за руковање.";Strings.OfficeOM.L_UserAbortedMessage="КориÑник није прихватио дозволе за програмÑки додатак.";Strings.OfficeOM.L_UnsupportedDataObject="Дати тип објекта података није подржан.";Strings.OfficeOM.L_SettingsAreStale="Ðије могуће Ñачувати поÑтавке јер ниÑу актуелне.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Дозволи";Strings.OfficeOM.L_OsfControlTypeNotSupported="Тип OsfControl није подржан.";Strings.OfficeOM.L_NavOutOfBound="Операција није уÑпела јер је Ð¸Ð½Ð´ÐµÐºÑ Ð¸Ð·Ð²Ð°Ð½ опÑега.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Изабрани Ñадржај мора да буде у облику табеле. Обликујте податке као табелу и покушајте поново.";Strings.OfficeOM.L_FormatValueOutOfRange="ВредноÑÑ‚ је изван дозвољеног опÑега.";Strings.OfficeOM.L_UserClickIgnore="КориÑник је одабрао да занемари дијалог.";Strings.OfficeOM.L_InvalidGetRows="Ðаведени редови Ñу неважећи.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="Ðабрајање није подржано у тренутној хоÑÑ‚ апликацији.";Strings.OfficeOM.L_BadSelectorString="ÐиÑка проÑлеђена у бирач неиÑправно је обликована или није подржана.";Strings.OfficeOM.L_DataStale="Подаци ниÑу актуелни";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Ðргументи неважећег уноÑа.";Strings.OfficeOM.L_Timeout="Операција је иÑтекла.";Strings.OfficeOM.L_NotSupportedEventType="Ðаведени тип догађаја {0} није подржан.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Ðије могуће кориÑтити параметре координате Ñа типом промене Табела када табела Ñадржи обједињене ћелије.";Strings.OfficeOM.L_ConnectionFailureWithStatus="Захтев није уÑпео уз ÑтатуÑни кôд {0}.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Ðеважећа или иÑтекла ÑеÑија";Strings.OfficeOM.L_CustomXmlOutOfDateName="Подаци ниÑу актуелни";Strings.OfficeOM.L_NotSupported="Функција {0} није подржана.";Strings.OfficeOM.L_PropertyNotLoaded="СвојÑтво „{0}“ није доÑтупно. Пре читања вредноÑти ÑвојÑтва, позовите метод учитавања на Ñадржаном објекту и позовите „context.sync()“ на повезаном контекÑту захтева.";Strings.OfficeOM.L_MissingParameter="Параметар недоÑтаје";Strings.OfficeOM.L_InvalidFormat="Грешка неважећег формата";Strings.OfficeOM.L_OutOfRange="Изван опÑега";Strings.OfficeOM.L_UnsupportedEnumeration="Ðабрајање није подржано";Strings.OfficeOM.L_InvalidTableOptionValue="Ðеки параметри опција табеле имају вредноÑти које ниÑу дозвољене. Двапут проверите вредноÑти и покушајте поново.";Strings.OfficeOM.L_FunctionCallFailed="Ðије уÑпело позивање {0} функције, кôд грешке: {1}.";Strings.OfficeOM.L_NamedItemNotFound="Именована Ñтавка не поÑтоји.";Strings.OfficeOM.L_ValueNotLoaded="ВредноÑÑ‚ објекта резултата још није учитана. Пре читања ÑвојÑтва вредноÑти, позовите „context.sync()“ на повезаном контекÑту захтева.";Strings.OfficeOM.L_IndexOutOfRange="Ð˜Ð½Ð´ÐµÐºÑ Ñ˜Ðµ ван опÑега.";Strings.OfficeOM.L_PermissionDenied="Дозвола је одбијена";Strings.OfficeOM.L_SaveSettingsError="Грешка при чувању поÑтавки";Strings.OfficeOM.L_NewWindowCrossZone="БезбедноÑне поÑтавке у прегледачу Ñпречавају Ð½Ð°Ñ Ð´Ð° креирамо дијалог. Покушајте Ñа другим прегледачем или {0} како би „{1}“ и домен приказан на траци адреÑа били у иÑтој безбедноÑној зони.";Strings.OfficeOM.L_BindingToMultipleSelection="ÐеÑуÑедни избори ниÑу подржани.";Strings.OfficeOM.L_ElementMissing="ÐиÑмо могли да обликујемо ћелију табеле зато што неке вредноÑти параметара недоÑтају. Двапут проверите параметре и покушајте поново.";Strings.OfficeOM.L_DialogAlreadyOpened="Операција није уÑпела зато што овај програмÑки додатак већ има активан дијалог.";Strings.OfficeOM.L_FormattingReminder="ПодÑетник за обликовање";Strings.OfficeOM.L_InternalErrorDescription="Дошло је до унутрашње грешке.";Strings.OfficeOM.L_SettingNameNotExist="Ðаведено име поÑтавке не поÑтоји.";Strings.OfficeOM.L_TooManyIncompleteRequests="Сачекајте да Ñе претходни позив доврши.";Strings.OfficeOM.L_CannotWriteToSelection="Ðије могуће пиÑати у тренутни избор.";Strings.OfficeOM.L_InvalidReadForBlankRow="Ðаведени ред је празан.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="ПрограмÑки додатак већ захтева токен за приÑтуп.";Strings.OfficeOM.L_DataWriteError="Грешка при пиÑању података";Strings.OfficeOM.L_DocumentReadOnly="Захтевана операција није дозвољена у тренутном режиму документа.";Strings.OfficeOM.L_DialogNavigateError="Грешка приликом навигације у дијалогу";Strings.OfficeOM.L_EventRegistrationError="Грешка при региÑтрацији догађаја";Strings.OfficeOM.L_InvalidArgument="Ðргумент „{0}“ не функционише у овој Ñитуацији, недоÑтаје или није у одговарајућем формату.";Strings.OfficeOM.L_APINotSupported="API није подржан";Strings.OfficeOM.L_NotSupportedBindingType="Ðаведени тип повезивања {0} није подржан.";Strings.OfficeOM.L_BindingCreationError="Грешка при креирању повезивања";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Ðаведене вредноÑти за број редова или број колона ниÑу важеће.";Strings.OfficeOM.L_OperationNotSupported="Операција није подржана.";Strings.OfficeOM.L_CallbackNotAFunction="Повратни позив мора да буде типа функције, био је типа {0}.";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Позови closeAsync на тренутној датотеци пре преузимања неке друге.";Strings.OfficeOM.L_DialogRequireHTTPS="HTTP протокол није подржан. КориÑтите HTTPS";Strings.OfficeOM.L_CannotRegisterEvent="Ðије могуће региÑтровати руковалац догађајем.";Strings.OfficeOM.L_TooManyArguments="превише аргумената";Strings.OfficeOM.L_UserNotSignedIn="Ðиједан кориÑник није пријављен у Оffice.";Strings.OfficeOM.L_CustomXmlNodeNotFound="Ðаведени чвор није пронађен.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Подаци Ñу заÑтарели. Преузмите објекат поново.";Strings.OfficeOM.L_InvalidSelectionForBindingType="Ðије могуће креирати повезивање Ñа тренутном Ñелекцијом и наведеним типом повезивања.";Strings.OfficeOM.L_PropertyDoesNotExist="СвојÑтво „{0}“ не поÑтоји у објекту.";Strings.OfficeOM.L_InvalidCoercion="Ðеважећи тип промене";Strings.OfficeOM.L_SettingsStaleError="Грешка заÑтарелих поÑтавки";Strings.OfficeOM.L_SSOServerErrorMessage="Дошло је до неочекиване грешке на Ñерверу.";Strings.OfficeOM.L_InvalidBinding="Ðеважеће повезивање";Strings.OfficeOM.L_OverwriteWorksheetData="Операција поÑтављања није уÑпела јер ће наведени објекат Ñа подацима заменити или померити податке.";Strings.OfficeOM.L_GetDataIsTooLarge="Захтевани Ñкуп података је превелик.";Strings.OfficeOM.L_HostError="Грешка у хоÑту";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Тип идентитета кориÑника није подржан.";Strings.OfficeOM.L_InvalidBindingError="Грешка неважећег повезивања";Strings.OfficeOM.L_InvalidGetStartRowColumn="Ðаведене вредноÑти за почетни ред или почетну колону ниÑу важеће.";Strings.OfficeOM.L_DataWriteReminder="ПодÑетник за пиÑање података";Strings.OfficeOM.L_InvalidParameters="Функција {0} има неважеће параметре.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Ðаведени тип повезивања није компатибилан Ñа наведеном именованом Ñтавком.";Strings.OfficeOM.L_AppNameNotExist="Име програмÑког додатка за {0} не поÑтоји.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Ограничења прегледача Ñпречила Ñу Ð½Ð°Ñ Ð´Ð° креирамо дијалог. Домен дијалога и домен хоÑта програмÑког додатка ниÑу у иÑтој безбедноÑној зони.";Strings.OfficeOM.L_GetDataParametersConflict="Ðаведени параметри ниÑу уÑаглашени.";Strings.OfficeOM.L_InvalidFormatValue="Ðеки параметри формата имају вредноÑти које ниÑу дозвољене. Двапут проверите вредноÑти и покушајте поново.";Strings.OfficeOM.L_ShuttingDown="Операција није уÑпела јер подаци на Ñерверу ниÑу актуелни.";Strings.OfficeOM.L_BindingNotExist="Ðаведено повезивање не поÑтоји.";Strings.OfficeOM.L_APICallFailed="API позив није уÑпео";Strings.OfficeOM.L_InvalidObjectPath="Путања објекта „{0}“ не функционише за оно што покушавате да урадите. Ðко објекат кориÑтите у више „context.sync“ позива и изван Ñеквенцијалног извршавања групе „.run“, кориÑтите методе „context.trackedObjects.add()“ и „context.trackedObjects.remove()“ да биÑте управљали трајањем објекта.";Strings.OfficeOM.L_InvalidSetStartRowColumn="Ðаведене вредноÑти за почетни ред или почетну колону ниÑу важеће.";Strings.OfficeOM.L_SelectionCannotBound="Ðије могуће повезивање Ñа тренутним избором.";Strings.OfficeOM.L_InvalidArgumentGeneric="Ðргументи проÑлеђени у функцију не функционишу у овој Ñитуацији, недоÑтају или ниÑу у одговарајућем формату.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Ðпликација {0} не поÑтоји. Microsoft.Office.WebExtension.initialize(разлог) није позван.";Strings.OfficeOM.L_InvalidRequestContext="Ðије могуће кориÑтити објекат у више различитих контекÑта захтева.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Проблем Ñа мрежом је Ñпречио преузимање датотеке.";Strings.OfficeOM.L_DataNotMatchBindingSize="Ðаведени објекат података не одговара величини тренутног избора.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="ДоÑтигнуто је ограничење избора";Strings.OfficeOM.L_SSOServerError="Дошло је до грешке у добављачу уÑлуге потврде идентитета.";Strings.OfficeOM.L_InvalidDataFormat="Формат наведеног објекта података је неважећи.";Strings.OfficeOM.L_InvalidBindingOperation="Операција неважећег повезивања";Strings.OfficeOM.L_RunMustReturnPromise="Функција групиÑања проÑлеђена методу „.run“ није вратила обећање. Функција мора да врати обећање како би Ñви аутоматÑки праћени објекти могли да Ñе објаве по довршетку операције групиÑања. Обећање Ñе обично враћа тако што вратите одговор позива „context.sync()“.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="Ðије могуће применити промене ÑвојÑтва „{0}“ путем метода „object.set“.";Strings.OfficeOM.L_BrowserAPINotSupported="Овај прегледач не подржава захтевани API.";Strings.OfficeOM.L_UnsupportedUserIdentity="Тип идентитета кориÑника није подржан.";Strings.OfficeOM.L_ActivityLimitReached="ДоÑтигнуто је ограничење активноÑти.";Strings.OfficeOM.L_DisplayDialogError="Грешка у приказу дијалога";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Тренутни избор није компатибилан Ñа наведеним типом промене.";Strings.OfficeOM.L_SliceSizeNotSupported="Ðаведена величина иÑечка није подржана.";Strings.OfficeOM.L_DialogInvalidScheme="URL шема није подржана. КориÑтите HTTPS.";Strings.OfficeOM.L_SetDataParametersConflict="Ðаведени параметри ниÑу уÑаглашени.";Strings.OfficeOM.L_MultipleNamedItemFound="Пронађено је више објеката Ñа иÑтим именом.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Занемари";Strings.OfficeOM.L_InvalidCellsValue="Ðеки параметри ћелија имају вредноÑти које ниÑу дозвољене. Двапут проверите вредноÑти и покушајте поново.";Strings.OfficeOM.L_InvalidGrant="Пред-ауторизација недоÑтаје.";Strings.OfficeOM.L_InvalidResourceUrl="Обезбеђена је неважећа URL адреÑа реÑурÑа апликације.";Strings.OfficeOM.L_InvalidGrantMessage="ÐедоÑтаје одобрење за овај програмÑки додатак.";Strings.OfficeOM.L_TooManyOptionalFunction="више опционалних функција на лиÑти параметара";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Ðапомена: Предложено је да број ћелија у табели буде иÑпод 20.000.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="Покушава Ñе поÑтављање ÑвојÑтва Ñамо за читање „{0}“.";Strings.OfficeOM.L_InvalidDataObject="Ðеважећи објекат Ñа подацима";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Ðије могуће кориÑтити параметре координате Ñа типом промене Табела када табела Ñадржи обједињене ћелије.";Strings.OfficeOM.L_EventHandlerRemovalFailed="Ðије уÑпело уклањање рутине за руковање.";Strings.OfficeOM.L_InitializeNotReady="Office.js још није потпуно учитан. Покушајте поново каÑније или проверите да ли Ñте додали кôд за покретање у функцију Office.initialize.";Strings.OfficeOM.L_DataNotMatchCoercionType="Тип наведеног објекта података није компатибилан Ñа тренутним избором.";Strings.OfficeOM.L_DataReadError="Грешка при читању података";Strings.OfficeOM.L_TooManyOptionalObjects="више опционалних објеката на лиÑти параметара";Strings.OfficeOM.L_DialogOK="У реду";Strings.OfficeOM.L_SSOClientErrorMessage="Дошло је до неочекиване грешке у клијенту.";Strings.OfficeOM.L_MemoryLimit="Премашено је ограничење меморије";Strings.OfficeOM.L_InvalidApiCallInContext="Ðеважећи API позив у тренутном контекÑту.";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} жели да Ñе приказује у новом прозору.";Strings.OfficeOM.L_InvalidColumnsForBinding="Ðаведене колоне Ñу неважеће.";Strings.OfficeOM.L_CannotNavigateTo="Објекат Ñе налази на меÑту на којем навигација није подржана.";Strings.OfficeOM.L_FileTypeNotSupported="Ðаведени тип датотеке није подржан.";Strings.OfficeOM.L_InValidOptionalArgument="неважећи опционални аргумент";Strings.OfficeOM.L_SSOClientError="Дошло је до грешке у захтеву за потврду идентитета из ÑиÑтема Office.";Strings.OfficeOM.L_InvalidSSOAddinMessage="API идентитета није подржан за овај програмÑки додатак.";Strings.OfficeOM.L_DataNotMatchBindingType="Ðаведени објекат података није компатибалан Ñа овим типом повезивања.";Strings.OfficeOM.L_RedundantCallbackSpecification="Повратни позив не може да Ñе наведе и на лиÑти аргумената и у опционалном објекту.";Strings.OfficeOM.L_NoCapability="Ðемате довољно дозвола за ову радњу.";Strings.OfficeOM.L_SpecifiedIdNotExist="Ðаведени ID не поÑтоји.";Strings.OfficeOM.L_InvalidSetColumns="Ðаведене колоне Ñу неважеће.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Операција није уÑпела зато што овај програмÑки додатак већ захтева токен за приÑтуп.";Strings.OfficeOM.L_EventHandlerNotExist="Ðаведена рутина за руковање догађајем није пронађена за ово повезивање.";Strings.OfficeOM.L_GetSelectionNotSupported="Тренутни избор није подржан.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="Ваша Office Online ÑеÑија је иÑтекла или је неважећа. ОÑвежите Ñтраницу да биÑте наÑтавили.";Strings.OfficeOM.L_InvalidAPICall="Ðеважећи API позив";Strings.OfficeOM.L_RequestTokenUnavailable="Овај API је ограничен да би Ñе уÑпорила учеÑталоÑÑ‚ позива.";Strings.OfficeOM.L_SettingsCannotSave="Ðије могуће Ñачувати поÑтавке.";Strings.OfficeOM.L_UserAborted="КориÑник је обуÑтавио захтев за одобрење.";Strings.OfficeOM.L_InternalError="Унутрашња грешка";Strings.OfficeOM.L_ReadSettingsError="Грешка при читању поÑтавки";Strings.OfficeOM.L_InvalidNode="Ðеважећи чвор";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="конфигуришите прегледач";Strings.OfficeOM.L_InvalidSetRows="Ðаведени редови Ñу неважећи.";Strings.OfficeOM.L_NetworkProblem="Проблем Ñа мрежом";Strings.OfficeOM.L_SetDataIsTooLarge="Ðаведени објекат података је превелик.";Strings.OfficeOM.L_UnknownBindingType="Тип повезивања није подржан.";Strings.OfficeOM.L_NotImplemented="Функција {0} није примењена.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Ðапомена: Предложено је да Ñкупови обликовања које је поÑтавио позив API обликовања буду иÑпод 100.";Strings.OfficeOM.L_MissingRequiredArguments="недоÑтају неки захтевани аргументи";Strings.OfficeOM.L_RowIndexOutOfRange="ВредноÑÑ‚ индекÑа реда је изван дозвољеног опÑега. КориÑтите вредноÑÑ‚ (0 или већу) која је мања од броја редова.";Strings.OfficeOM.L_CoercionTypeNotSupported="Ðаведени тип промене није подржан.";Strings.OfficeOM.L_InvalidGetColumns="Ðаведене колоне Ñу неважеће.";Strings.OfficeOM.L_RequestTimeout="Извршавање позива је предуго трајало.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Ðаправите избор.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Операција није подржана на овом типу повезивања.";Strings.OfficeOM.L_CustomXmlError="Грешка у прилагођеном XML-у.";Strings.OfficeOM.L_ConnectionFailureWithDetails="Захтев није уÑпео уз ÑтатуÑни кôд {0}, кôд грешке {1} и Ñледећу поруку о грешци: {2}";Strings.OfficeOM.L_InvalidResourceUrlMessage="У манифеÑту је наведена неважећа URL адреÑа реÑурÑа.";Strings.OfficeOM.L_DataNotMatchSelection="Дати објекат података није компатибилан Ñа обликом или димензијама тренутног избора.";Strings.OfficeOM.L_ColIndexOutOfRange="ВредноÑÑ‚ индекÑа колоне је изван дозвољеног опÑега. КориÑтите вредноÑÑ‚ (0 или већу) која је мања од броја колона.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath ограничава избор на 1024 Ñтавке." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_SSOConnectionLostError="A connection was lost during the sign in process.";Strings.OfficeOM.L_SSOClientError="Дошло је до грешке у захтеву за потврду идентитета из ÑиÑтема Office.";Strings.OfficeOM.L_DataStale="Подаци ниÑу актуелни";Strings.OfficeOM.L_GetDataIsTooLarge="Захтевани Ñкуп података је превелик.";Strings.OfficeOM.L_DataNotMatchCoercionType="Тип наведеног објекта података није компатибилан Ñа тренутним избором.";Strings.OfficeOM.L_CoercionTypeNotSupported="Ðаведени тип промене није подржан.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Ðпликација {0} не поÑтоји. Microsoft.Office.WebExtension.initialize(разлог) није позван.";Strings.OfficeOM.L_DataNotMatchBindingSize="Ðаведени објекат података не одговара величини тренутног избора.";Strings.OfficeOM.L_FormattingReminder="ПодÑетник за обликовање";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Подаци Ñу заÑтарели. Преузмите објекат поново.";Strings.OfficeOM.L_NavOutOfBound="Операција није уÑпела јер је Ð¸Ð½Ð´ÐµÐºÑ Ð¸Ð·Ð²Ð°Ð½ опÑега.";Strings.OfficeOM.L_BadSelectorString="ÐиÑка проÑлеђена у бирач неиÑправно је обликована или није подржана.";Strings.OfficeOM.L_NetworkProblem="Проблем Ñа мрежом";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Позови closeAsync на тренутној датотеци пре преузимања неке друге.";Strings.OfficeOM.L_InvalidNode="Ðеважећи чвор";Strings.OfficeOM.L_InitializeNotReady="Office.js још није потпуно учитан. Покушајте поново каÑније или проверите да ли Ñте додали кôд за покретање у функцију Office.initialize.";Strings.OfficeOM.L_BindingCreationError="Грешка при креирању повезивања";Strings.OfficeOM.L_SelectionCannotBound="Ðије могуће повезивање Ñа тренутним избором.";Strings.OfficeOM.L_UnsupportedUserIdentity="Тип идентитета кориÑника није подржан.";Strings.OfficeOM.L_InvalidBindingOperation="Операција неважећег повезивања";Strings.OfficeOM.L_ReadSettingsError="Грешка при читању поÑтавки";Strings.OfficeOM.L_BrowserAPINotSupported="Овај прегледач не подржава захтевани API.";Strings.OfficeOM.L_SSOConnectionLostErrorMessage="A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones.";Strings.OfficeOM.L_InvalidGrant="Пред-ауторизација недоÑтаје.";Strings.OfficeOM.L_InvalidSetColumns="Ðаведене колоне Ñу неважеће.";Strings.OfficeOM.L_DataNotMatchSelection="Дати објекат података није компатибилан Ñа обликом или димензијама тренутног избора.";Strings.OfficeOM.L_InvalidGetStartRowColumn="Ðаведене вредноÑти за почетни ред или почетну колону ниÑу важеће.";Strings.OfficeOM.L_FileTypeNotSupported="Ðаведени тип датотеке није подржан.";Strings.OfficeOM.L_UserClickIgnore="КориÑник је одабрао да занемари дијалог.";Strings.OfficeOM.L_UserAborted="КориÑник је обуÑтавио захтев за одобрење.";Strings.OfficeOM.L_DialogRequireHTTPS="HTTP протокол није подржан. КориÑтите HTTPS";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Операција није подржана на овом типу повезивања.";Strings.OfficeOM.L_InvalidOperationInCellEditMode="Excel је у режиму уређивања ћелија. Изађите из режима уређивања тако што ћете притиÑнути ENTER или TAB одноÑно изабрати другу ћелију, а затим покушајте поново.";Strings.OfficeOM.L_ConnectionFailureWithStatus="Захтев није уÑпео уз ÑтатуÑни кôд {0}.";Strings.OfficeOM.L_InvalidRequestContext="Ðије могуће кориÑтити објекат у више различитих контекÑта захтева.";Strings.OfficeOM.L_HostError="Грешка у хоÑту";Strings.OfficeOM.L_DialogInvalidScheme="URL шема није подржана. КориÑтите HTTPS.";Strings.OfficeOM.L_CannotWriteToSelection="Ðије могуће пиÑати у тренутни избор.";Strings.OfficeOM.L_InvalidBinding="Ðеважеће повезивање";Strings.OfficeOM.L_GetSelectionNotSupported="Тренутни избор није подржан.";Strings.OfficeOM.L_MissingParameter="Параметар недоÑтаје";Strings.OfficeOM.L_UnsupportedEnumerationMessage="Ðабрајање није подржано у тренутној хоÑÑ‚ апликацији.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="Ваша Office Online ÑеÑија је иÑтекла или је неважећа. ОÑвежите Ñтраницу да биÑте наÑтавили.";Strings.OfficeOM.L_Timeout="Операција је иÑтекла.";Strings.OfficeOM.L_PermissionDenied="Дозвола је одбијена";Strings.OfficeOM.L_SSOServerErrorMessage="Дошло је до неочекиване грешке на Ñерверу.";Strings.OfficeOM.L_SaveSettingsError="Грешка при чувању поÑтавки";Strings.OfficeOM.L_MemoryLimit="Премашено је ограничење меморије";Strings.OfficeOM.L_TooManyOptionalFunction="више опционалних функција на лиÑти параметара";Strings.OfficeOM.L_ColIndexOutOfRange="ВредноÑÑ‚ индекÑа колоне је изван дозвољеног опÑега. КориÑтите вредноÑÑ‚ (0 или већу) која је мања од броја колона.";Strings.OfficeOM.L_OverwriteWorksheetData="Операција поÑтављања није уÑпела јер ће наведени објекат Ñа подацима заменити или померити податке.";Strings.OfficeOM.L_ApiNotFoundDetails="Метод или ÑвојÑтво {0} предÑтавља део Ñкупа захтева {1}, који није доÑтупан у вашој верзији апликације {2}.";Strings.OfficeOM.L_RunMustReturnPromise="Функција групиÑања проÑлеђена методу „.run“ није вратила обећање. Функција мора да врати обећање како би Ñви аутоматÑки праћени објекти могли да Ñе објаве по довршетку операције групиÑања. Обећање Ñе обично враћа тако што вратите одговор позива „context.sync()“.";Strings.OfficeOM.L_FormatValueOutOfRange="ВредноÑÑ‚ је изван дозвољеног опÑега.";Strings.OfficeOM.L_OperationNotSupported="Операција није подржана.";Strings.OfficeOM.L_RedundantCallbackSpecification="Повратни позив не може да Ñе наведе и на лиÑти аргумената и у опционалном објекту.";Strings.OfficeOM.L_SliceSizeNotSupported="Ðаведена величина иÑечка није подржана.";Strings.OfficeOM.L_InvalidBindingError="Грешка неважећег повезивања";Strings.OfficeOM.L_InvalidReadForBlankRow="Ðаведени ред је празан.";Strings.OfficeOM.L_DialogAlreadyOpened="Операција није уÑпела зато што овај програмÑки додатак већ има активан дијалог.";Strings.OfficeOM.L_InvalidSSOAddinMessage="API идентитета није подржан за овај програмÑки додатак.";Strings.OfficeOM.L_CustomFunctionNameCannotSplit="Име функције мора да Ñадржи проÑтор за име који није празан и кратко име које није празно.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Проблем Ñа мрежом је Ñпречио преузимање датотеке.";Strings.OfficeOM.L_InvalidObjectPath="Путања објекта „{0}“ не функционише за оно што покушавате да урадите. Ðко објекат кориÑтите у више „context.sync“ позива и изван Ñеквенцијалног извршавања групе „.run“, кориÑтите методе „context.trackedObjects.add()“ и „context.trackedObjects.remove()“ да биÑте управљали трајањем објекта.";Strings.OfficeOM.L_ConnectionFailureWithDetails="Захтев није уÑпео уз ÑтатуÑни кôд {0}, кôд грешке {1} и Ñледећу поруку о грешци: {2}";Strings.OfficeOM.L_InvalidGetColumns="Ðаведене колоне Ñу неважеће.";Strings.OfficeOM.L_SetDataParametersConflict="Ðаведени параметри ниÑу уÑаглашени.";Strings.OfficeOM.L_InvalidSetRows="Ðаведени редови Ñу неважећи.";Strings.OfficeOM.L_DataNotMatchBindingType="Ðаведени објекат података није компатибалан Ñа овим типом повезивања.";Strings.OfficeOM.L_InvalidDataFormat="Формат наведеног објекта података је неважећи.";Strings.OfficeOM.L_GetDataParametersConflict="Ðаведени параметри ниÑу уÑаглашени.";Strings.OfficeOM.L_InvalidFormatValue="Ðеки параметри формата имају вредноÑти које ниÑу дозвољене. Двапут проверите вредноÑти и покушајте поново.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage="Операција није уÑпела зато што овај програмÑки додатак не подржава приÑтанак кориÑника у овој категорији";Strings.OfficeOM.L_AppNameNotExist="Име програмÑког додатка за {0} не поÑтоји.";Strings.OfficeOM.L_PropertyNotLoaded="СвојÑтво „{0}“ није доÑтупно. Пре читања вредноÑти ÑвојÑтва, позовите метод учитавања на Ñадржаном објекту и позовите „context.sync()“ на повезаном контекÑту захтева.";Strings.OfficeOM.L_FunctionCallFailed="Ðије уÑпело позивање {0} функције, кôд грешке: {1}.";Strings.OfficeOM.L_InvalidAPICall="Ðеважећи API позив";Strings.OfficeOM.L_NewWindowCrossZone="БезбедноÑне поÑтавке у прегледачу Ñпречавају Ð½Ð°Ñ Ð´Ð° креирамо дијалог. Покушајте Ñа другим прегледачем или {0} како би „{1}“ и домен приказан на траци адреÑа били у иÑтој безбедноÑној зони.";Strings.OfficeOM.L_MultipleNamedItemFound="Пронађено је више објеката Ñа иÑтим именом.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath ограничава избор на 1024 Ñтавке.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Тренутни избор није компатибилан Ñа наведеним типом промене.";Strings.OfficeOM.L_InvalidApiCallInContext="Ðеважећи API позив у тренутном контекÑту.";Strings.OfficeOM.L_MissingRequiredArguments="недоÑтају неки захтевани аргументи";Strings.OfficeOM.L_EventHandlerAdditionFailed="Ðије уÑпело додавање рутине за руковање.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Ðаведени тип промене није компатибилан Ñа овим типом повезивања.";Strings.OfficeOM.L_InvalidValue="Ðеважећа вредноÑÑ‚";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Ðије могуће кориÑтити параметре координате Ñа типом промене Табела када табела Ñадржи обједињене ћелије.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Изабрани Ñадржај мора да буде у облику табеле. Обликујте податке као табелу и покушајте поново.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Занемари";Strings.OfficeOM.L_BindingNotExist="Ðаведено повезивање не поÑтоји.";Strings.OfficeOM.L_EventHandlerNotExist="Ðаведена рутина за руковање догађајем није пронађена за ово повезивање.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Ðаправите избор.";Strings.OfficeOM.L_SSOClientErrorMessage="Дошло је до неочекиване грешке у клијенту.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Ðапомена: Предложено је да број ћелија у табели буде иÑпод 20.000.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="Ðије могуће применити промене ÑвојÑтва „{0}“ путем метода „object.set“.";Strings.OfficeOM.L_CustomXmlError="Грешка у прилагођеном XML-у.";Strings.OfficeOM.L_DisplayDialogError="Грешка у приказу дијалога";Strings.OfficeOM.L_CustomXmlOutOfDateName="Подаци ниÑу актуелни";Strings.OfficeOM.L_ActivityLimitReached="ДоÑтигнуто је ограничење активноÑти.";Strings.OfficeOM.L_DataWriteReminder="ПодÑетник за пиÑање података";Strings.OfficeOM.L_InternalErrorDescription="Дошло је до унутрашње грешке.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Тип идентитета кориÑника није подржан.";Strings.OfficeOM.L_SetDataIsTooLarge="Ðаведени објекат података је превелик.";Strings.OfficeOM.L_TooManyIncompleteRequests="Сачекајте да Ñе претходни позив доврши.";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Ðргументи неважећег уноÑа.";Strings.OfficeOM.L_NotSupportedEventType="Ðаведени тип догађаја {0} није подржан.";Strings.OfficeOM.L_InvalidGetRows="Ðаведени редови Ñу неважећи.";Strings.OfficeOM.L_NotSupportedBindingType="Ðаведени тип повезивања {0} није подржан.";Strings.OfficeOM.L_InvalidSetStartRowColumn="Ðаведене вредноÑти за почетни ред или почетну колону ниÑу важеће.";Strings.OfficeOM.L_InvalidCoercion="Ðеважећи тип промене";Strings.OfficeOM.L_UnsupportedDataObject="Дати тип објекта података није подржан.";Strings.OfficeOM.L_DocumentReadOnly="Захтевана операција није дозвољена у тренутном режиму документа.";Strings.OfficeOM.L_InvalidFormat="Грешка неважећег формата";Strings.OfficeOM.L_CustomFunctionImplementationMissing="СвојÑтво Ñа овим именом које предÑтавља дефиницију функције у оквиру Excel.CustomFunctions мора да Ñадржи ÑвојÑтво „call“ које примењује функцију.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Ðије могуће кориÑтити параметре координате Ñа типом промене Табела када табела Ñадржи обједињене ћелије.";Strings.OfficeOM.L_InvalidTableOptionValue="Ðеки параметри опција табеле имају вредноÑти које ниÑу дозвољене. Двапут проверите вредноÑти и покушајте поново.";Strings.OfficeOM.L_UnsupportedEnumeration="Ðабрајање није подржано";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Ðаведене вредноÑти за број редова или број колона ниÑу важеће.";Strings.OfficeOM.L_InvalidDataObject="Ðеважећи објекат Ñа подацима";Strings.OfficeOM.L_CustomXmlExceedQuotaName="ДоÑтигнуто је ограничење избора";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Ðапомена: Предложено је да Ñкупови обликовања које је поÑтавио позив API обликовања буду иÑпод 100.";Strings.OfficeOM.L_PropertyDoesNotExist="СвојÑтво „{0}“ не поÑтоји у објекту.";Strings.OfficeOM.L_APINotSupported="API није подржан";Strings.OfficeOM.L_UserNotSignedIn="Ðиједан кориÑник није пријављен у Оffice.";Strings.OfficeOM.L_InvalidColumnsForBinding="Ðаведене колоне Ñу неважеће.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory="Овај програмÑки додатак не подржава приÑтанак кориÑника.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Ðеважећа или иÑтекла ÑеÑија";Strings.OfficeOM.L_SSOServerError="Дошло је до грешке у добављачу уÑлуге потврде идентитета.";Strings.OfficeOM.L_BindingToMultipleSelection="ÐеÑуÑедни избори ниÑу подржани.";Strings.OfficeOM.L_InvalidGrantMessage="ÐедоÑтаје одобрење за овај програмÑки додатак.";Strings.OfficeOM.L_UserAbortedMessage="КориÑник није прихватио дозволе за програмÑки додатак.";Strings.OfficeOM.L_InvalidResourceUrl="Обезбеђена је неважећа URL адреÑа реÑурÑа апликације.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="ПрограмÑки додатак већ захтева токен за приÑтуп.";Strings.OfficeOM.L_RequestTimeout="Извршавање позива је предуго трајало.";Strings.OfficeOM.L_SettingsAreStale="Ðије могуће Ñачувати поÑтавке јер ниÑу актуелне.";Strings.OfficeOM.L_ShuttingDown="Операција није уÑпела јер подаци на Ñерверу ниÑу актуелни.";Strings.OfficeOM.L_IndexOutOfRange="Ð˜Ð½Ð´ÐµÐºÑ Ñ˜Ðµ ван опÑега.";Strings.OfficeOM.L_CustomXmlNodeNotFound="Ðаведени чвор није пронађен.";Strings.OfficeOM.L_InternalError="Унутрашња грешка";Strings.OfficeOM.L_ValueNotLoaded="ВредноÑÑ‚ објекта резултата још није учитана. Пре читања ÑвојÑтва вредноÑти, позовите „context.sync()“ на повезаном контекÑту захтева.";Strings.OfficeOM.L_OsfControlTypeNotSupported="Тип OsfControl није подржан.";Strings.OfficeOM.L_InvalidArgument="Ðргумент „{0}“ не функционише у овој Ñитуацији, недоÑтаје или није у одговарајућем формату.";Strings.OfficeOM.L_DialogNavigateError="Грешка приликом навигације у дијалогу";Strings.OfficeOM.L_APICallFailed="API позив није уÑпео";Strings.OfficeOM.L_CannotNavigateTo="Објекат Ñе налази на меÑту на којем навигација није подржана.";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} жели да Ñе приказује у новом прозору.";Strings.OfficeOM.L_SettingsCannotSave="Ðије могуће Ñачувати поÑтавке.";Strings.OfficeOM.L_InValidOptionalArgument="неважећи опционални аргумент";Strings.OfficeOM.L_NotSupported="Функција {0} није подржана.";Strings.OfficeOM.L_CallbackNotAFunction="Повратни позив мора да буде типа функције, био је типа {0}.";Strings.OfficeOM.L_ElementMissing="ÐиÑмо могли да обликујемо ћелију табеле зато што неке вредноÑти параметара недоÑтају. Двапут проверите параметре и покушајте поново.";Strings.OfficeOM.L_DataWriteError="Грешка при пиÑању података";Strings.OfficeOM.L_NoCapability="Ðемате довољно дозвола за ову радњу.";Strings.OfficeOM.L_CustomFunctionDefinitionMissing="СвојÑтво Ñа овим именом које предÑтавља дефиницију функције мора да поÑтоји у оквиру Excel.CustomFunctions.";Strings.OfficeOM.L_NotImplemented="Функција {0} није примењена.";Strings.OfficeOM.L_DialogAddressNotTrusted="Домен URL адреÑе није уврштен у елементу AppDomains у манифеÑту";Strings.OfficeOM.L_SettingsStaleError="Грешка заÑтарелих поÑтавки";Strings.OfficeOM.L_CustomFunctionNameContainsBadChars="Име функције може да Ñадржи Ñамо Ñлова, цифре, подвлаке и тачке.";Strings.OfficeOM.L_SpecifiedIdNotExist="Ðаведени ID не поÑтоји.";Strings.OfficeOM.L_RequestTokenUnavailable="Овај API је ограничен да би Ñе уÑпорила учеÑталоÑÑ‚ позива.";Strings.OfficeOM.L_InvalidCellsValue="Ðеки параметри ћелија имају вредноÑти које ниÑу дозвољене. Двапут проверите вредноÑти и покушајте поново.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="Покушава Ñе поÑтављање ÑвојÑтва Ñамо за читање „{0}“.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Дозволи";Strings.OfficeOM.L_EventHandlerRemovalFailed="Ðије уÑпело уклањање рутине за руковање.";Strings.OfficeOM.L_InvalidSelectionForBindingType="Ðије могуће креирати повезивање Ñа тренутном Ñелекцијом и наведеним типом повезивања.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Ограничења прегледача Ñпречила Ñу Ð½Ð°Ñ Ð´Ð° креирамо дијалог. Домен дијалога и домен хоÑта програмÑког додатка ниÑу у иÑтој безбедноÑној зони.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Ðаведени тип повезивања није компатибилан Ñа наведеном именованом Ñтавком.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="конфигуришите прегледач";Strings.OfficeOM.L_DialogOK="У реду";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Операција није уÑпела зато што овај програмÑки додатак већ захтева токен за приÑтуп.";Strings.OfficeOM.L_NamedItemNotFound="Именована Ñтавка не поÑтоји.";Strings.OfficeOM.L_SettingNameNotExist="Ðаведено име поÑтавке не поÑтоји.";Strings.OfficeOM.L_RowIndexOutOfRange="ВредноÑÑ‚ индекÑа реда је изван дозвољеног опÑега. КориÑтите вредноÑÑ‚ (0 или већу) која је мања од броја редова.";Strings.OfficeOM.L_TooManyOptionalObjects="више опционалних објеката на лиÑти параметара";Strings.OfficeOM.L_CannotRegisterEvent="Ðије могуће региÑтровати руковалац догађајем.";Strings.OfficeOM.L_TooManyArguments="превише аргумената";Strings.OfficeOM.L_UnknownBindingType="Тип повезивања није подржан.";Strings.OfficeOM.L_DataReadError="Грешка при читању података";Strings.OfficeOM.L_InvalidResourceUrlMessage="У манифеÑту је наведена неважећа URL адреÑа реÑурÑа.";Strings.OfficeOM.L_EventRegistrationError="Грешка при региÑтрацији догађаја";Strings.OfficeOM.L_InvalidArgumentGeneric="Ðргументи проÑлеђени у функцију не функционишу у овој Ñитуацији, недоÑтају или ниÑу у одговарајућем формату.";Strings.OfficeOM.L_InvalidParameters="Функција {0} има неважеће параметре.";Strings.OfficeOM.L_OutOfRange="Изван опÑега" \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/sr-cyrl-rs/outlook_strings.debug.js b/node_modules/@microsoft/office-js/dist/sr-cyrl-rs/outlook_strings.debug.js index 95f5d21..dc7a467 100644 --- a/node_modules/@microsoft/office-js/dist/sr-cyrl-rs/outlook_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/sr-cyrl-rs/outlook_strings.debug.js @@ -1,34 +1,35 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("_u"); _u.ExtensibilityStrings = function() { }; _u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings"); -_u.ExtensibilityStrings.l_InvalidEndTime_Text = "Време завршетка не може да буде пре времена почетка."; -_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "КориÑник је променио позицију курÑора док Ñу Ñе подаци уметали."; +_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Ðеке од пружених е-адреÑа Ñу предугачке."; +_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "ID прилога је неважећи."; +_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Ðије могуће додати прилог Ñтавци."; +_u.ExtensibilityStrings.l_InvalidDate_Text = "Ð£Ð½Ð¾Ñ Ñе не разрешава на важећи датум."; +_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "Изабрана Ñтавка је промењена."; _u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Ðије могуће додати прилоге јер порука већ има макÑималан број прилога"; -_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "КориÑник је уклонио прилог пре довршавања отпремања."; -_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Дати параметри Ñе не подударају Ñа очекиваним форматом."; +_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Ðије могуће избриÑати прилог јер није могуће пронаћи прилог Ñа индекÑом прилога."; +_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "Уклањање HTML-а није уÑпело."; +_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "Путања прилога је неважећа."; +_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Пуна дозвола је потребна за приÑтуп заштићеним члановима апликације JavaScript API за Office."; _u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Укупан број прималаца у пољу не може да премаши {0}."; -_u.ExtensibilityStrings.l_InternalFormatError_Text = "Дошло је до унутрашње грешке формата."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "Пуна дозвола је потребна за позивање овог метода : '{0}'."; _u.ExtensibilityStrings.l_OffsetNotfound_Text = "Ðије могуће пронаћи помак за ову временÑку ознаку."; -_u.ExtensibilityStrings.l_InternalProtocolError_Text = "Интерна грешка протокола: '{0}'."; -_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Грешка у прилогу"; -_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Захтев премашује ограничење величине од 1 MB. Измените EWS захтев."; -_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "ID прилога је неважећи."; -_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Ðије могуће избриÑати прилог јер није могуће пронаћи прилог Ñа индекÑом прилога."; _u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Ðије могуће додати прилог јер је превелик."; -_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "Путања прилога је неважећа."; -_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Ðеке од пружених е-адреÑа Ñу предугачке."; _u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Грешка при пиÑању података"; -_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "ÐиÑу пружени важећи примаоци."; -_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Ðије могуће избриÑати прилог из Ñтавке."; -_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Ðије могуће додати прилог Ñтавци."; +_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Дати параметри Ñе не подударају Ñа очекиваним форматом."; _u.ExtensibilityStrings.l_InvalidEventDates_Text = "Датум завршетка је пре датума почетка."; +_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "КориÑник је променио позицију курÑора док Ñу Ñе подаци уметали."; +_u.ExtensibilityStrings.l_InvalidEndTime_Text = "Време завршетка не може да буде пре времена почетка."; +_u.ExtensibilityStrings.l_InternalProtocolError_Text = "Интерна грешка протокола: '{0}'."; +_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Захтев премашује ограничење величине од 1 MB. Измените EWS захтев."; _u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Ðије могуће додати прилоге док Ñе потпуни одговор или проÑлеђивање преузимају Ñа Ñервера."; -_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "Уклањање HTML-а није уÑпело."; +_u.ExtensibilityStrings.l_InternalFormatError_Text = "Дошло је до унутрашње грешке формата."; +_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Грешка у прилогу"; +_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "Пуна дозвола је потребна за позивање овог метода : '{0}'."; +_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "КориÑник је уклонио прилог пре довршавања отпремања."; +_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "ÐиÑу пружени важећи примаоци."; _u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Ðека од пружених имена за приказ Ñу предугачка."; -_u.ExtensibilityStrings.l_InvalidDate_Text = "Ð£Ð½Ð¾Ñ Ñе не разрешава на важећи датум."; -_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "Изабрана Ñтавка је промењена."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Пуна дозвола је потребна за приÑтуп заштићеним члановима апликације JavaScript API за Office." +_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Ðије могуће избриÑати прилог из Ñтавке." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/sr-cyrl-rs/outlook_strings.js b/node_modules/@microsoft/office-js/dist/sr-cyrl-rs/outlook_strings.js index f9094f0..647330f 100644 --- a/node_modules/@microsoft/office-js/dist/sr-cyrl-rs/outlook_strings.js +++ b/node_modules/@microsoft/office-js/dist/sr-cyrl-rs/outlook_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_InvalidEndTime_Text="Време завршетка не може да буде пре времена почетка.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="КориÑник је променио позицију курÑора док Ñу Ñе подаци уметали.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Ðије могуће додати прилоге јер порука већ има макÑималан број прилога";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="КориÑник је уклонио прилог пре довршавања отпремања.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Дати параметри Ñе не подударају Ñа очекиваним форматом.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Укупан број прималаца у пољу не може да премаши {0}.";_u.ExtensibilityStrings.l_InternalFormatError_Text="Дошло је до унутрашње грешке формата.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Пуна дозвола је потребна за позивање овог метода : '{0}'.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Ðије могуће пронаћи помак за ову временÑку ознаку.";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Интерна грешка протокола: '{0}'.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Грешка у прилогу";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Захтев премашује ограничење величине од 1 MB. Измените EWS захтев.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="ID прилога је неважећи.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Ðије могуће избриÑати прилог јер није могуће пронаћи прилог Ñа индекÑом прилога.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Ðије могуће додати прилог јер је превелик.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="Путања прилога је неважећа.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Ðеке од пружених е-адреÑа Ñу предугачке.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Грешка при пиÑању података";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="ÐиÑу пружени важећи примаоци.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Ðије могуће избриÑати прилог из Ñтавке.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Ðије могуће додати прилог Ñтавци.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="Датум завршетка је пре датума почетка.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Ðије могуће додати прилоге док Ñе потпуни одговор или проÑлеђивање преузимају Ñа Ñервера.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="Уклањање HTML-а није уÑпело.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Ðека од пружених имена за приказ Ñу предугачка.";_u.ExtensibilityStrings.l_InvalidDate_Text="Ð£Ð½Ð¾Ñ Ñе не разрешава на важећи датум.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Изабрана Ñтавка је промењена.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Пуна дозвола је потребна за приÑтуп заштићеним члановима апликације JavaScript API за Office." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Ðеке од пружених е-адреÑа Ñу предугачке.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="ID прилога је неважећи.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Ðије могуће додати прилог Ñтавци.";_u.ExtensibilityStrings.l_InvalidDate_Text="Ð£Ð½Ð¾Ñ Ñе не разрешава на важећи датум.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Изабрана Ñтавка је промењена.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Ðије могуће додати прилоге јер порука већ има макÑималан број прилога";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Ðије могуће избриÑати прилог јер није могуће пронаћи прилог Ñа индекÑом прилога.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="Уклањање HTML-а није уÑпело.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="Путања прилога је неважећа.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Пуна дозвола је потребна за приÑтуп заштићеним члановима апликације JavaScript API за Office.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Укупан број прималаца у пољу не може да премаши {0}.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Ðије могуће пронаћи помак за ову временÑку ознаку.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Ðије могуће додати прилог јер је превелик.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Грешка при пиÑању података";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Дати параметри Ñе не подударају Ñа очекиваним форматом.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="Датум завршетка је пре датума почетка.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="КориÑник је променио позицију курÑора док Ñу Ñе подаци уметали.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="Време завршетка не може да буде пре времена почетка.";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Интерна грешка протокола: '{0}'.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Захтев премашује ограничење величине од 1 MB. Измените EWS захтев.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Ðије могуће додати прилоге док Ñе потпуни одговор или проÑлеђивање преузимају Ñа Ñервера.";_u.ExtensibilityStrings.l_InternalFormatError_Text="Дошло је до унутрашње грешке формата.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Грешка у прилогу";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Пуна дозвола је потребна за позивање овог метода : '{0}'.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="КориÑник је уклонио прилог пре довршавања отпремања.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="ÐиÑу пружени важећи примаоци.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Ðека од пружених имена за приказ Ñу предугачка.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Ðије могуће избриÑати прилог из Ñтавке." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/sr-latn-cs/office_strings.debug.js b/node_modules/@microsoft/office-js/dist/sr-latn-cs/office_strings.debug.js index 456e003..715bb8e 100644 --- a/node_modules/@microsoft/office-js/dist/sr-latn-cs/office_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/sr-latn-cs/office_strings.debug.js @@ -1,179 +1,190 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("Strings"); Strings.OfficeOM = function() { }; Strings.OfficeOM.registerClass("Strings.OfficeOM"); -Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} wants to display a new window."; -Strings.OfficeOM.L_GetDataParametersConflict = "Navedeni parametri su neusaglaÅ¡eni."; -Strings.OfficeOM.L_DialogOK = "OK"; -Strings.OfficeOM.L_MissingParameter = "Parametar nedostaje"; -Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Browser restrictions prevented us from creating the dialog box. The domain of dialog box and the domain of the add-in host are not in the same security zone."; -Strings.OfficeOM.L_UserClickIgnore = "The user chose to ignore the dialog box."; -Strings.OfficeOM.L_InvalidGrantMessage = "Missing grant for this add-in."; -Strings.OfficeOM.L_CustomXmlOutOfDateName = "Data Not Current"; -Strings.OfficeOM.L_UserNotSignedIn = "No user is signed into Office."; -Strings.OfficeOM.L_ConnectionFailureWithDetails = "The request failed with status code of {0}, error code {1} and the following error message: {2}"; -Strings.OfficeOM.L_DataNotMatchCoercionType = "Tip navedenog objekta podataka nije kompatibilan sa trenutnom selekcijom."; -Strings.OfficeOM.L_ValueNotLoaded = 'The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.'; -Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Navedeni tip promene nije kompatibilan sa ovim tipom povezivanja."; -Strings.OfficeOM.L_GetDataIsTooLarge = "Zahtevani skup podataka je prevelik."; -Strings.OfficeOM.L_RequestTokenUnavailable = "This API has been throttled to slow the call frequency."; +Strings.OfficeOM.L_CustomFunctionNameContainsBadChars = "The function name may only contain letters, digits, underscores, and periods."; +Strings.OfficeOM.L_InvalidOperationInCellEditMode = "Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again."; +Strings.OfficeOM.L_NotImplemented = "Funkcija {0} nije primenjena."; +Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "Your Office Online session has expired or is invalid. To continue, refresh the page."; +Strings.OfficeOM.L_InValidOptionalArgument = "nevažeći opcionalni argument"; +Strings.OfficeOM.L_InvalidSetStartRowColumn = "Navedene vrednosti za poÄetni red ili poÄetnu kolonu nisu važeće."; +Strings.OfficeOM.L_CoercionTypeNotSupported = "Navedeni tip promene nije podržan."; +Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = "Changes to property '{0}' cannot be applied through an \"object.set\" method."; +Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Potrebo je da izabrani sadržaj bude u formatu tabele. Oblikujte podatke u vidu tabele i probajte ponovo."; +Strings.OfficeOM.L_UserAborted = "User aborted the consent request."; +Strings.OfficeOM.L_SetDataParametersConflict = "Navedeni parametri su neusaglaÅ¡eni."; Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "configure your browser"; -Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "The operation failed because this add-in is already requesting an access token."; -Strings.OfficeOM.L_ElementMissing = "Nismo mogli da oblikujemo ćeliju tabele zato Å¡to nedostaju neke vrednosti parametara. Proverite parametre joÅ¡ jednom i probajte ponovo."; -Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath limits selection to 1024 items."; -Strings.OfficeOM.L_NamedItemNotFound = "Imenovana stavka ne postoji."; -Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Selection Limit Reached"; +Strings.OfficeOM.L_NetworkProblem = "Network Problem"; +Strings.OfficeOM.L_APICallFailed = "API Call Failed"; +Strings.OfficeOM.L_CannotNavigateTo = "Objekat se nalazi na lokaciji na kojoj navigacija nije podržana."; +Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Note: The formatting sets set by a Formatting API call is suggested to be below 100."; +Strings.OfficeOM.L_ConnectionFailureWithDetails = "The request failed with status code of {0}, error code {1} and the following error message: {2}"; Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "The data is out of date. Retrieve the object again."; -Strings.OfficeOM.L_RunMustReturnPromise = 'The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".'; -Strings.OfficeOM.L_InvalidBindingOperation = "Operacija nevažećeg povezivanja"; -Strings.OfficeOM.L_InvalidOrTimedOutSession = "Invalid Or Timed Out Session"; -Strings.OfficeOM.L_InvalidGetRows = "Navedeni redovi su nevažeći."; +Strings.OfficeOM.L_DialogRequireHTTPS = "The HTTP protocol is not supported. Use HTTPS instead"; +Strings.OfficeOM.L_UnsupportedDataObject = "Navedeni tip objekta podataka nije podržan."; +Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Navedeni tip promene nije kompatibilan sa ovim tipom povezivanja."; +Strings.OfficeOM.L_SetDataIsTooLarge = "Navedeni objekat podataka je prevelik."; +Strings.OfficeOM.L_TooManyOptionalFunction = "viÅ¡estruke opcionalne funkcije na listi parametara"; +Strings.OfficeOM.L_InitializeNotReady = "Office.js joÅ¡ uvek nije potpuno uÄitan. PokuÅ¡ajte ponovo kasnije ili postarajte se da dodate vaÅ¡ kôd za pokretanje na vaÅ¡ Office.initialize function."; +Strings.OfficeOM.L_SettingsAreStale = "Nije bilo moguće saÄuvati postavke jer nisu u toku."; +Strings.OfficeOM.L_MissingRequiredArguments = "nedostaju neki neophodni argumenti"; +Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Browser restrictions prevented us from creating the dialog box. The domain of dialog box and the domain of the add-in host are not in the same security zone."; +Strings.OfficeOM.L_InvalidBindingError = "GreÅ¡ka nevažećeg povezivanja"; +Strings.OfficeOM.L_GetSelectionNotSupported = "Trenutna selekcija nije podržana."; +Strings.OfficeOM.L_CustomXmlError = "GreÅ¡ka u prilagoÄ‘enim XML."; Strings.OfficeOM.L_NotSupportedEventType = "Navedeni tip dogaÄ‘aja {0} nije podržan."; -Strings.OfficeOM.L_SliceSizeNotSupported = "The specified slice size is not supported."; -Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Nije moguće koristiti parametre za koordinaciju sa tabelom tipa promene kada tabela sadrži objedinjene ćelije."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Add-in is already requesting an access token."; -Strings.OfficeOM.L_OverwriteWorksheetData = "Operacija postavljanja nije uspela zato Å¡to će navedeni objekat podataka zameniti ili premestiti podatke."; -Strings.OfficeOM.L_InvalidResourceUrlMessage = "Invalid resource Url specified in the manifest."; -Strings.OfficeOM.L_SetDataParametersConflict = "Navedeni parametri su neusaglaÅ¡eni."; -Strings.OfficeOM.L_RequestTimeout = "The call took too long to execute."; -Strings.OfficeOM.L_NoCapability = "Nemate dovoljno dozvola za ovu radnju."; -Strings.OfficeOM.L_RowIndexOutOfRange = "Vrednost indeksa reda je izvan dozvoljenog opsega. Koristite vrednost (0 ili veću) koja je manja od broja redova."; -Strings.OfficeOM.L_APICallFailed = "API Call Failed"; +Strings.OfficeOM.L_ConnectionFailureWithStatus = "The request failed with status code of {0}."; +Strings.OfficeOM.L_GetDataIsTooLarge = "Zahtevani skup podataka je prevelik."; +Strings.OfficeOM.L_PermissionDenied = "Dozvola je odbijena"; Strings.OfficeOM.L_InvalidRequestContext = "Cannot use the object across different request contexts."; -Strings.OfficeOM.L_InvalidBindingError = "GreÅ¡ka nevažećeg povezivanja"; -Strings.OfficeOM.L_DataNotMatchBindingSize = "Navedeni objekat podataka ne podudara se sa veliÄinom trenutne selekcije."; -Strings.OfficeOM.L_CallbackNotAFunction = "Povratni poziv mora biti funkcija tipa, bila je tipa {0}."; -Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Note: The formatting sets set by a Formatting API call is suggested to be below 100."; +Strings.OfficeOM.L_EventHandlerAdditionFailed = "Dodavanje rukovaoca dogaÄ‘ajem nije uspelo."; +Strings.OfficeOM.L_FileTypeNotSupported = "Navedeni tip datoteke nije podržan."; +Strings.OfficeOM.L_Timeout = "The operation has timed out."; +Strings.OfficeOM.L_DataWriteError = "GreÅ¡ka u pisanju podataka"; +Strings.OfficeOM.L_FormatValueOutOfRange = "Vrednost je izvan dozvoljenog opsega."; Strings.OfficeOM.L_InvalidSetRows = "Navedeni redovi su nevažeći."; -Strings.OfficeOM.L_OsfControlTypeNotSupported = "OsfControl tip nije podržan."; -Strings.OfficeOM.L_DialogInvalidScheme = "The URL scheme is not supported. Use HTTPS instead."; -Strings.OfficeOM.L_SSOServerError = "Error occurred in the authentication provider."; -Strings.OfficeOM.L_InValidOptionalArgument = "nevažeći opcionalni argument"; -Strings.OfficeOM.L_InvalidColumnsForBinding = "Navedene kolone su nevažeće."; -Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Operacija nije podržana na ovom tipu povezivanja."; -Strings.OfficeOM.L_ReadSettingsError = "GreÅ¡ka u postavkama Äitanja"; -Strings.OfficeOM.L_TooManyOptionalObjects = "viÅ¡estruki opcionalni objekti na listi parametara"; -Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = "Changes to property '{0}' cannot be applied through an \"object.set\" method."; -Strings.OfficeOM.L_EventHandlerRemovalFailed = "Uklanjanje rukovaoca dogaÄ‘ajem nije uspelo."; -Strings.OfficeOM.L_GetSelectionNotSupported = "Trenutna selekcija nije podržana."; -Strings.OfficeOM.L_UserAborted = "User aborted the consent request."; -Strings.OfficeOM.L_InvalidFormat = "GreÅ¡ka nevažećeg formata"; -Strings.OfficeOM.L_OperationNotSupported = "Operacija nije podržana."; -Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Allow"; -Strings.OfficeOM.L_DataNotMatchBindingType = "Navedeni objekat podataka nije kompatibilan sa tipom povezivanja."; +Strings.OfficeOM.L_RunMustReturnPromise = 'The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".'; +Strings.OfficeOM.L_DataNotMatchCoercionType = "Tip navedenog objekta podataka nije kompatibilan sa trenutnom selekcijom."; +Strings.OfficeOM.L_SliceSizeNotSupported = "The specified slice size is not supported."; +Strings.OfficeOM.L_InvalidAPICall = "Nevažeći API poziv"; +Strings.OfficeOM.L_DataReadError = "GreÅ¡ka u Äitanju podataka"; +Strings.OfficeOM.L_DialogNavigateError = "Dialog Navigation Error"; +Strings.OfficeOM.L_InvalidFormatValue = "Neki parametri formata imaju vrednosti koje nisu dozvoljene. Proverite vrednosti joÅ¡ jednom i probajte ponovo."; Strings.OfficeOM.L_InvalidParameters = "Funkcija {0} ima nevažeće parametre."; -Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "Your Office Online session has expired or is invalid. To continue, refresh the page."; -Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Ignore"; +Strings.OfficeOM.L_ReadSettingsError = "GreÅ¡ka u postavkama Äitanja"; +Strings.OfficeOM.L_NotSupported = "Funkcija {0} nije podržana."; +Strings.OfficeOM.L_NotSupportedBindingType = "Navedeni tip povezivanja {0} nije podržan."; +Strings.OfficeOM.L_InvalidGetRows = "Navedeni redovi su nevažeći."; Strings.OfficeOM.L_DataWriteReminder = "Data Write Reminder"; -Strings.OfficeOM.L_InvalidArgument = "The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format."; -Strings.OfficeOM.L_SaveSettingsError = "GreÅ¡ka pri Äuvanju postavki"; -Strings.OfficeOM.L_InvalidSetStartRowColumn = "Navedene vrednosti za poÄetni red ili poÄetnu kolonu nisu važeće."; -Strings.OfficeOM.L_InvalidArgumentGeneric = "The argument(s) passed into the function don't work for this situation, are missing, or aren't in the right format."; -Strings.OfficeOM.L_InvalidResourceUrl = "Invalid application resource Url provided."; -Strings.OfficeOM.L_DataNotMatchSelection = "Navedeni objekat podataka nije kompatibilan sa oblikom ili dimenzijama trenutne selekcije."; -Strings.OfficeOM.L_TooManyOptionalFunction = "viÅ¡estruke opcionalne funkcije na listi parametara"; +Strings.OfficeOM.L_RowIndexOutOfRange = "Vrednost indeksa reda je izvan dozvoljenog opsega. Koristite vrednost (0 ili veću) koja je manja od broja redova."; +Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Selection Limit Reached"; Strings.OfficeOM.L_InvalidGetColumns = "Navedene kolone su nevažeće."; -Strings.OfficeOM.L_CoercionTypeNotSupported = "Navedeni tip promene nije podržan."; -Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Navedeni tip povezivanja nije kompatibilan sa navedenom imenovanom stavkom."; -Strings.OfficeOM.L_BrowserAPINotSupported = "This browser does not support the requested API."; -Strings.OfficeOM.L_DataStale = "Podaci nisu u toku"; -Strings.OfficeOM.L_DocumentReadOnly = "Zahtevana operacija nije dozvoljena u trenutnom režimu dokumenta."; -Strings.OfficeOM.L_NotSupportedBindingType = "Navedeni tip povezivanja {0} nije podržan."; -Strings.OfficeOM.L_BindingCreationError = "GreÅ¡ka u stvaranju povezivanja"; -Strings.OfficeOM.L_UnknownBindingType = "Tip povezivanja nije podržan."; -Strings.OfficeOM.L_DialogAddressNotTrusted = "The domain of the URL is not included in the AppDomains element in the manifest."; -Strings.OfficeOM.L_FormatValueOutOfRange = "Vrednost je izvan dozvoljenog opsega."; -Strings.OfficeOM.L_APINotSupported = "API Not Supported"; -Strings.OfficeOM.L_CannotWriteToSelection = "Upisivanje u trenutnu selekciju nije moguće."; -Strings.OfficeOM.L_SettingsStaleError = "GreÅ¡ka usled zastarelih postavki"; -Strings.OfficeOM.L_InvalidBinding = "Nevažeće povezivanje"; -Strings.OfficeOM.L_BadSelectorString = "Niska koja je prosleÄ‘ena u biraÄ nije u ispravnom formatu ili nije podržan."; -Strings.OfficeOM.L_DialogNavigateError = "Dialog Navigation Error"; -Strings.OfficeOM.L_SSOServerErrorMessage = "An unexpected error occurred on the server."; -Strings.OfficeOM.L_IndexOutOfRange = "Indeks je izvan opsega."; -Strings.OfficeOM.L_InvalidNode = "Nevažeći Ävor"; -Strings.OfficeOM.L_UserAbortedMessage = "The user did not consent the add-in permissions."; -Strings.OfficeOM.L_ColIndexOutOfRange = "Vrednost indeksa kolone je izvan dozvoljenog opsega. Koristite vrednost (0 ili veću) koja je manja od broja kolona."; -Strings.OfficeOM.L_InvalidReadForBlankRow = "The specified row is blank."; -Strings.OfficeOM.L_InitializeNotReady = "Office.js joÅ¡ uvek nije potpuno uÄitan. PokuÅ¡ajte ponovo kasnije ili postarajte se da dodate vaÅ¡ kôd za pokretanje na vaÅ¡ Office.initialize function."; -Strings.OfficeOM.L_BindingNotExist = "Navedeno povezivanje ne postoji."; -Strings.OfficeOM.L_NotSupported = "Funkcija {0} nije podržana."; -Strings.OfficeOM.L_InvalidGrant = "Preauthorization missing."; Strings.OfficeOM.L_SettingsCannotSave = "Nije bilo moguće saÄuvati postavke."; +Strings.OfficeOM.L_SpecifiedIdNotExist = "Navedeni ID ne postoji."; +Strings.OfficeOM.L_UserNotSignedIn = "No user is signed into Office."; Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Trenutna selekcija nije kompatibilna sa navedenim tipom promene."; -Strings.OfficeOM.L_SettingNameNotExist = "Navedeno ime postavke ne postoji."; -Strings.OfficeOM.L_InvalidAPICall = "Nevažeći API poziv"; -Strings.OfficeOM.L_DisplayDialogError = "Display Dialog Error"; -Strings.OfficeOM.L_CustomXmlNodeNotFound = "Nije pronaÄ‘en navedeni Ävor."; -Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "Attempting to set read-only property '{0}'."; +Strings.OfficeOM.L_InvalidResourceUrlMessage = "Invalid resource Url specified in the manifest."; +Strings.OfficeOM.L_UserAbortedMessage = "The user did not consent the add-in permissions."; +Strings.OfficeOM.L_FunctionCallFailed = "Poziv funkcije {0} nije uspeo, kod greÅ¡ke: {1}."; Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Napravite selekciju."; -Strings.OfficeOM.L_EventHandlerAdditionFailed = "Dodavanje rukovaoca dogaÄ‘ajem nije uspelo."; -Strings.OfficeOM.L_HostError = "GreÅ¡ka hosta"; -Strings.OfficeOM.L_TooManyIncompleteRequests = "Wait until the previous call completes."; -Strings.OfficeOM.L_SSOClientError = "Error occurred in the authentication request from Office."; -Strings.OfficeOM.L_OutOfRange = "Izvan opsega"; -Strings.OfficeOM.L_DataWriteError = "GreÅ¡ka u pisanju podataka"; -Strings.OfficeOM.L_InternalErrorDescription = "DoÅ¡lo je do unutraÅ¡nje greÅ¡ke."; -Strings.OfficeOM.L_InvalidFormatValue = "Neki parametri formata imaju vrednosti koje nisu dozvoljene. Proverite vrednosti joÅ¡ jednom i probajte ponovo."; -Strings.OfficeOM.L_RedundantCallbackSpecification = "Povratni poziv ne može biti naveden i u listi argumenata i u opcionalnom objektu."; -Strings.OfficeOM.L_SpecifiedIdNotExist = "Navedeni ID ne postoji."; -Strings.OfficeOM.L_MultipleNamedItemFound = "PronaÄ‘eno je viÅ¡e objekata sa istim imenom."; -Strings.OfficeOM.L_MemoryLimit = "Memory Limit Exceeded"; Strings.OfficeOM.L_InvalidValue = "Nevažeća vrednost"; -Strings.OfficeOM.L_FileTypeNotSupported = "Navedeni tip datoteke nije podržan."; -Strings.OfficeOM.L_InvalidApiCallInContext = "Nevažeći API poziv u trenutnom kontekstu."; -Strings.OfficeOM.L_NotImplemented = "Funkcija {0} nije primenjena."; -Strings.OfficeOM.L_AppNameNotExist = "AppName za {0} ne postoji."; -Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Note: The number of cells in a table is suggested to be below 20,000 cells."; -Strings.OfficeOM.L_MissingRequiredArguments = "nedostaju neki neophodni argumenti"; -Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Navedene vrednosti za broj redova ili broj kolona nisu važeće."; -Strings.OfficeOM.L_InvalidGetStartRowColumn = "Navedene vrednosti za poÄetni red ili poÄetnu kolonu nisu važeće."; -Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Nije moguće koristiti parametre za koordinaciju sa tabelom tipa promene kada tabela sadrži objedinjene ćelije."; -Strings.OfficeOM.L_CannotRegisterEvent = "The event handler cannot be registered."; -Strings.OfficeOM.L_InvalidObjectPath = 'The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.'; +Strings.OfficeOM.L_NoCapability = "Nemate dovoljno dozvola za ovu radnju."; +Strings.OfficeOM.L_EventRegistrationError = "GreÅ¡ka pri registraciji dogaÄ‘aja"; Strings.OfficeOM.L_PropertyNotLoaded = "The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context."; -Strings.OfficeOM.L_InvalidCoercion = "Nevažeći tip promene"; -Strings.OfficeOM.L_NetworkProblemRetrieveFile = "A network problem has prevented retrieval of the file."; +Strings.OfficeOM.L_FormattingReminder = "Formatting Reminder"; +Strings.OfficeOM.L_InvalidGrantMessage = "Missing grant for this add-in."; +Strings.OfficeOM.L_InvalidGetStartRowColumn = "Navedene vrednosti za poÄetni red ili poÄetnu kolonu nisu važeće."; +Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Note: The number of cells in a table is suggested to be below 20,000 cells."; +Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath limits selection to 1024 items."; +Strings.OfficeOM.L_UnsupportedEnumerationMessage = "Nabrajanje nije podržano u trenutnoj aplikaciji hosta."; +Strings.OfficeOM.L_InvalidFormat = "GreÅ¡ka nevažećeg formata"; +Strings.OfficeOM.L_BindingNotExist = "Navedeno povezivanje ne postoji."; +Strings.OfficeOM.L_DataNotMatchSelection = "Navedeni objekat podataka nije kompatibilan sa oblikom ili dimenzijama trenutne selekcije."; +Strings.OfficeOM.L_DialogAddressNotTrusted = "The domain of the URL is not included in the AppDomains element in the manifest."; +Strings.OfficeOM.L_SettingsStaleError = "GreÅ¡ka usled zastarelih postavki"; +Strings.OfficeOM.L_ColIndexOutOfRange = "Vrednost indeksa kolone je izvan dozvoljenog opsega. Koristite vrednost (0 ili veću) koja je manja od broja kolona."; +Strings.OfficeOM.L_InvalidBindingOperation = "Operacija nevažećeg povezivanja"; Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "The identity type of the user is not supported."; -Strings.OfficeOM.L_UnsupportedUserIdentity = "User identity type is not supported."; -Strings.OfficeOM.L_DialogRequireHTTPS = "The HTTP protocol is not supported. Use HTTPS instead"; +Strings.OfficeOM.L_MultipleNamedItemFound = "PronaÄ‘eno je viÅ¡e objekata sa istim imenom."; +Strings.OfficeOM.L_InvalidApiCallInContext = "Nevažeći API poziv u trenutnom kontekstu."; +Strings.OfficeOM.L_TooManyOptionalObjects = "viÅ¡estruki opcionalni objekti na listi parametara"; +Strings.OfficeOM.L_CustomFunctionNameCannotSplit = "The function name must contain a non-empty namespace and a non-empty short name."; +Strings.OfficeOM.L_GetDataParametersConflict = "Navedeni parametri su neusaglaÅ¡eni."; +Strings.OfficeOM.L_BrowserAPINotSupported = "This browser does not support the requested API."; +Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Operacija nije podržana na ovom tipu povezivanja."; +Strings.OfficeOM.L_SSOServerError = "Error occurred in the authentication provider."; +Strings.OfficeOM.L_NamedItemNotFound = "Imenovana stavka ne postoji."; +Strings.OfficeOM.L_DataNotMatchBindingSize = "Navedeni objekat podataka ne podudara se sa veliÄinom trenutne selekcije."; +Strings.OfficeOM.L_InternalErrorDescription = "DoÅ¡lo je do unutraÅ¡nje greÅ¡ke."; Strings.OfficeOM.L_ShuttingDown = "Operacija nije uspela zato Å¡to podaci na serveru nisu u toku."; -Strings.OfficeOM.L_NewWindowCrossZone = "The security settings in your browser prevent us from creating a dialog box. Try a different browser, or {0} so that '{1}' and the domain shown in your address bar are in the same security zone."; -Strings.OfficeOM.L_PropertyDoesNotExist = "Property '{0}' does not exist on the object."; -Strings.OfficeOM.L_SelectionCannotBound = "Nije moguće izvrÅ¡iti povezivanje sa trenutnom selekcijom."; -Strings.OfficeOM.L_InvalidCellsValue = "Neki parametri ćelije imaju vrednosti koje nisu dozvoljene. Proverite vrednosti joÅ¡ jednom i probajte ponovo."; -Strings.OfficeOM.L_ConnectionFailureWithStatus = "The request failed with status code of {0}."; -Strings.OfficeOM.L_ActivityLimitReached = "Activity limit has been reached."; -Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Invalid input arguments."; +Strings.OfficeOM.L_SSOConnectionLostErrorMessage = "A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones."; Strings.OfficeOM.L_InvalidSSOAddinMessage = "The identity API is not supported for this add-in."; +Strings.OfficeOM.L_InvalidBinding = "Nevažeće povezivanje"; +Strings.OfficeOM.L_SettingNameNotExist = "Navedeno ime postavke ne postoji."; +Strings.OfficeOM.L_SSOClientErrorMessage = "An unexpected error occurred in the client."; +Strings.OfficeOM.L_DataStale = "Podaci nisu u toku"; +Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Call closeAsync on the current File before retrieving another."; +Strings.OfficeOM.L_CallbackNotAFunction = "Povratni poziv mora biti funkcija tipa, bila je tipa {0}."; +Strings.OfficeOM.L_MissingParameter = "Parametar nedostaje"; +Strings.OfficeOM.L_UnsupportedUserIdentity = "User identity type is not supported."; +Strings.OfficeOM.L_SelectionCannotBound = "Nije moguće izvrÅ¡iti povezivanje sa trenutnom selekcijom."; +Strings.OfficeOM.L_ElementMissing = "Nismo mogli da oblikujemo ćeliju tabele zato Å¡to nedostaju neke vrednosti parametara. Proverite parametre joÅ¡ jednom i probajte ponovo."; +Strings.OfficeOM.L_EventHandlerRemovalFailed = "Uklanjanje rukovaoca dogaÄ‘ajem nije uspelo."; +Strings.OfficeOM.L_SSOConnectionLostError = "A connection was lost during the sign in process."; +Strings.OfficeOM.L_EventHandlerNotExist = "Navedeni tip dogaÄ‘aja nije podržan na ovom objektu."; +Strings.OfficeOM.L_InvalidObjectPath = 'The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.'; +Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "Attempting to set read-only property '{0}'."; +Strings.OfficeOM.L_OperationNotSupported = "Operacija nije podržana."; +Strings.OfficeOM.L_SSOClientError = "Error occurred in the authentication request from Office."; +Strings.OfficeOM.L_ValueNotLoaded = 'The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.'; Strings.OfficeOM.L_InternalError = "UnutraÅ¡nja greÅ¡ka"; -Strings.OfficeOM.L_UnsupportedEnumeration = "Nepodržano nabrajanje"; -Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Potrebo je da izabrani sadržaj bude u formatu tabele. Oblikujte podatke u vidu tabele i probajte ponovo."; +Strings.OfficeOM.L_OsfControlTypeNotSupported = "OsfControl tip nije podržan."; +Strings.OfficeOM.L_ApiNotFoundDetails = "The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}."; +Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} wants to display a new window."; +Strings.OfficeOM.L_InvalidGrant = "Preauthorization missing."; +Strings.OfficeOM.L_DocumentReadOnly = "Zahtevana operacija nije dozvoljena u trenutnom režimu dokumenta."; +Strings.OfficeOM.L_InvalidArgument = "The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format."; Strings.OfficeOM.L_InvalidSelectionForBindingType = "Nije moguće kreirati povezivanje sa trenutnom selekcijom i navedenim tipom povezivanja."; -Strings.OfficeOM.L_UnsupportedDataObject = "Navedeni tip objekta podataka nije podržan."; -Strings.OfficeOM.L_Timeout = "The operation has timed out."; -Strings.OfficeOM.L_FunctionCallFailed = "Poziv funkcije {0} nije uspeo, kod greÅ¡ke: {1}."; -Strings.OfficeOM.L_InvalidDataObject = "Nevažeći objekat podataka"; -Strings.OfficeOM.L_SSOClientErrorMessage = "An unexpected error occurred in the client."; +Strings.OfficeOM.L_BindingToMultipleSelection = "Nekontinuirane selekcije nisu podržane."; +Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Aplikacija {0} ne postoji. Microsoft.Office.WebExtension.initialize(razlog) nije pozvan."; +Strings.OfficeOM.L_SSOServerErrorMessage = "An unexpected error occurred on the server."; Strings.OfficeOM.L_InvalidTableOptionValue = "Neki tableOptions parametri imaju vrednosti koje nisu dozvoljene. Proverite vrednosti joÅ¡ jednom i probajte ponovo."; -Strings.OfficeOM.L_InvalidSetColumns = "Navedene kolone su nevažeće."; -Strings.OfficeOM.L_CustomXmlError = "GreÅ¡ka u prilagoÄ‘enim XML."; +Strings.OfficeOM.L_AppNameNotExist = "AppName za {0} ne postoji."; +Strings.OfficeOM.L_InvalidDataObject = "Nevažeći objekat podataka"; +Strings.OfficeOM.L_CustomFunctionImplementationMissing = "The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function."; +Strings.OfficeOM.L_RequestTokenUnavailable = "This API has been throttled to slow the call frequency."; +Strings.OfficeOM.L_UnknownBindingType = "Tip povezivanja nije podržan."; +Strings.OfficeOM.L_DialogAlreadyOpened = "The operation failed because this add-in already has an active dialog."; +Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Invalid input arguments."; +Strings.OfficeOM.L_HostError = "GreÅ¡ka hosta"; +Strings.OfficeOM.L_CustomXmlOutOfDateName = "Data Not Current"; +Strings.OfficeOM.L_MemoryLimit = "Memory Limit Exceeded"; +Strings.OfficeOM.L_DialogOK = "OK"; +Strings.OfficeOM.L_UserClickIgnore = "The user chose to ignore the dialog box."; +Strings.OfficeOM.L_ActivityLimitReached = "Activity limit has been reached."; +Strings.OfficeOM.L_NetworkProblemRetrieveFile = "A network problem has prevented retrieval of the file."; +Strings.OfficeOM.L_InvalidNode = "Nevažeći Ävor"; +Strings.OfficeOM.L_IndexOutOfRange = "Indeks je izvan opsega."; +Strings.OfficeOM.L_CannotWriteToSelection = "Upisivanje u trenutnu selekciju nije moguće."; Strings.OfficeOM.L_NavOutOfBound = "Operacija nije uspela zato Å¡to je indeks van opsega."; +Strings.OfficeOM.L_RedundantCallbackSpecification = "Povratni poziv ne može biti naveden i u listi argumenata i u opcionalnom objektu."; +Strings.OfficeOM.L_RequestTimeout = "The call took too long to execute."; +Strings.OfficeOM.L_CustomXmlNodeNotFound = "Nije pronaÄ‘en navedeni Ävor."; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage = "The operation failed because this add-in does not support user consent in this category"; +Strings.OfficeOM.L_DialogInvalidScheme = "The URL scheme is not supported. Use HTTPS instead."; +Strings.OfficeOM.L_CustomFunctionDefinitionMissing = "A property with this name that represents the function's definition must exist on Excel.CustomFunctions."; Strings.OfficeOM.L_TooManyArguments = "previÅ¡e argumenata"; -Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Call closeAsync on the current File before retrieving another."; -Strings.OfficeOM.L_SettingsAreStale = "Nije bilo moguće saÄuvati postavke jer nisu u toku."; -Strings.OfficeOM.L_FormattingReminder = "Formatting Reminder"; -Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Aplikacija {0} ne postoji. Microsoft.Office.WebExtension.initialize(razlog) nije pozvan."; -Strings.OfficeOM.L_NetworkProblem = "Network Problem"; -Strings.OfficeOM.L_DialogAlreadyOpened = "The operation failed because this add-in already has an active dialog."; -Strings.OfficeOM.L_PermissionDenied = "Dozvola je odbijena"; -Strings.OfficeOM.L_EventRegistrationError = "GreÅ¡ka pri registraciji dogaÄ‘aja"; -Strings.OfficeOM.L_SetDataIsTooLarge = "Navedeni objekat podataka je prevelik."; -Strings.OfficeOM.L_DataReadError = "GreÅ¡ka u Äitanju podataka"; -Strings.OfficeOM.L_BindingToMultipleSelection = "Nekontinuirane selekcije nisu podržane."; +Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Allow"; +Strings.OfficeOM.L_BadSelectorString = "Niska koja je prosleÄ‘ena u biraÄ nije u ispravnom formatu ili nije podržan."; +Strings.OfficeOM.L_PropertyDoesNotExist = "Property '{0}' does not exist on the object."; +Strings.OfficeOM.L_InvalidResourceUrl = "Invalid application resource Url provided."; +Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Nije moguće koristiti parametre za koordinaciju sa tabelom tipa promene kada tabela sadrži objedinjene ćelije."; +Strings.OfficeOM.L_NewWindowCrossZone = "The security settings in your browser prevent us from creating a dialog box. Try a different browser, or {0} so that '{1}' and the domain shown in your address bar are in the same security zone."; +Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Nije moguće koristiti parametre za koordinaciju sa tabelom tipa promene kada tabela sadrži objedinjene ćelije."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "The operation failed because this add-in is already requesting an access token."; +Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Navedene vrednosti za broj redova ili broj kolona nisu važeće."; +Strings.OfficeOM.L_OverwriteWorksheetData = "Operacija postavljanja nije uspela zato Å¡to će navedeni objekat podataka zameniti ili premestiti podatke."; +Strings.OfficeOM.L_APINotSupported = "API Not Supported"; +Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Navedeni tip povezivanja nije kompatibilan sa navedenom imenovanom stavkom."; +Strings.OfficeOM.L_InvalidSetColumns = "Navedene kolone su nevažeće."; +Strings.OfficeOM.L_TooManyIncompleteRequests = "Wait until the previous call completes."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Add-in is already requesting an access token."; +Strings.OfficeOM.L_InvalidColumnsForBinding = "Navedene kolone su nevažeće."; +Strings.OfficeOM.L_OutOfRange = "Izvan opsega"; +Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Ignore"; +Strings.OfficeOM.L_DataNotMatchBindingType = "Navedeni objekat podataka nije kompatibilan sa tipom povezivanja."; +Strings.OfficeOM.L_DisplayDialogError = "Display Dialog Error"; +Strings.OfficeOM.L_SaveSettingsError = "GreÅ¡ka pri Äuvanju postavki"; +Strings.OfficeOM.L_InvalidCoercion = "Nevažeći tip promene"; Strings.OfficeOM.L_InvalidDataFormat = "Format navedenog objekta podataka nije važeći."; -Strings.OfficeOM.L_UnsupportedEnumerationMessage = "Nabrajanje nije podržano u trenutnoj aplikaciji hosta."; -Strings.OfficeOM.L_EventHandlerNotExist = "Navedeni tip dogaÄ‘aja nije podržan na ovom objektu."; -Strings.OfficeOM.L_CannotNavigateTo = "Objekat se nalazi na lokaciji na kojoj navigacija nije podržana." +Strings.OfficeOM.L_InvalidOrTimedOutSession = "Invalid Or Timed Out Session"; +Strings.OfficeOM.L_InvalidArgumentGeneric = "The argument(s) passed into the function don't work for this situation, are missing, or aren't in the right format."; +Strings.OfficeOM.L_InvalidReadForBlankRow = "The specified row is blank."; +Strings.OfficeOM.L_CannotRegisterEvent = "The event handler cannot be registered."; +Strings.OfficeOM.L_UnsupportedEnumeration = "Nepodržano nabrajanje"; +Strings.OfficeOM.L_BindingCreationError = "GreÅ¡ka u stvaranju povezivanja"; +Strings.OfficeOM.L_InvalidCellsValue = "Neki parametri ćelije imaju vrednosti koje nisu dozvoljene. Proverite vrednosti joÅ¡ jednom i probajte ponovo."; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory = "This add-in does not support user consent." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/sr-latn-cs/office_strings.js b/node_modules/@microsoft/office-js/dist/sr-latn-cs/office_strings.js index 7158a50..012f65f 100644 --- a/node_modules/@microsoft/office-js/dist/sr-latn-cs/office_strings.js +++ b/node_modules/@microsoft/office-js/dist/sr-latn-cs/office_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_ShowWindowDialogNotification="{0} wants to display a new window.";Strings.OfficeOM.L_GetDataParametersConflict="Navedeni parametri su neusaglaÅ¡eni.";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_MissingParameter="Parametar nedostaje";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Browser restrictions prevented us from creating the dialog box. The domain of dialog box and the domain of the add-in host are not in the same security zone.";Strings.OfficeOM.L_UserClickIgnore="The user chose to ignore the dialog box.";Strings.OfficeOM.L_InvalidGrantMessage="Missing grant for this add-in.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Data Not Current";Strings.OfficeOM.L_UserNotSignedIn="No user is signed into Office.";Strings.OfficeOM.L_ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}";Strings.OfficeOM.L_DataNotMatchCoercionType="Tip navedenog objekta podataka nije kompatibilan sa trenutnom selekcijom.";Strings.OfficeOM.L_ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.';Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Navedeni tip promene nije kompatibilan sa ovim tipom povezivanja.";Strings.OfficeOM.L_GetDataIsTooLarge="Zahtevani skup podataka je prevelik.";Strings.OfficeOM.L_RequestTokenUnavailable="This API has been throttled to slow the call frequency.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="configure your browser";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="The operation failed because this add-in is already requesting an access token.";Strings.OfficeOM.L_ElementMissing="Nismo mogli da oblikujemo ćeliju tabele zato Å¡to nedostaju neke vrednosti parametara. Proverite parametre joÅ¡ jednom i probajte ponovo.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath limits selection to 1024 items.";Strings.OfficeOM.L_NamedItemNotFound="Imenovana stavka ne postoji.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Selection Limit Reached";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="The data is out of date. Retrieve the object again.";Strings.OfficeOM.L_RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".';Strings.OfficeOM.L_InvalidBindingOperation="Operacija nevažećeg povezivanja";Strings.OfficeOM.L_InvalidOrTimedOutSession="Invalid Or Timed Out Session";Strings.OfficeOM.L_InvalidGetRows="Navedeni redovi su nevažeći.";Strings.OfficeOM.L_NotSupportedEventType="Navedeni tip dogaÄ‘aja {0} nije podržan.";Strings.OfficeOM.L_SliceSizeNotSupported="The specified slice size is not supported.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Nije moguće koristiti parametre za koordinaciju sa tabelom tipa promene kada tabela sadrži objedinjene ćelije.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Add-in is already requesting an access token.";Strings.OfficeOM.L_OverwriteWorksheetData="Operacija postavljanja nije uspela zato Å¡to će navedeni objekat podataka zameniti ili premestiti podatke.";Strings.OfficeOM.L_InvalidResourceUrlMessage="Invalid resource Url specified in the manifest.";Strings.OfficeOM.L_SetDataParametersConflict="Navedeni parametri su neusaglaÅ¡eni.";Strings.OfficeOM.L_RequestTimeout="The call took too long to execute.";Strings.OfficeOM.L_NoCapability="Nemate dovoljno dozvola za ovu radnju.";Strings.OfficeOM.L_RowIndexOutOfRange="Vrednost indeksa reda je izvan dozvoljenog opsega. Koristite vrednost (0 ili veću) koja je manja od broja redova.";Strings.OfficeOM.L_APICallFailed="API Call Failed";Strings.OfficeOM.L_InvalidRequestContext="Cannot use the object across different request contexts.";Strings.OfficeOM.L_InvalidBindingError="GreÅ¡ka nevažećeg povezivanja";Strings.OfficeOM.L_DataNotMatchBindingSize="Navedeni objekat podataka ne podudara se sa veliÄinom trenutne selekcije.";Strings.OfficeOM.L_CallbackNotAFunction="Povratni poziv mora biti funkcija tipa, bila je tipa {0}.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Note: The formatting sets set by a Formatting API call is suggested to be below 100.";Strings.OfficeOM.L_InvalidSetRows="Navedeni redovi su nevažeći.";Strings.OfficeOM.L_OsfControlTypeNotSupported="OsfControl tip nije podržan.";Strings.OfficeOM.L_DialogInvalidScheme="The URL scheme is not supported. Use HTTPS instead.";Strings.OfficeOM.L_SSOServerError="Error occurred in the authentication provider.";Strings.OfficeOM.L_InValidOptionalArgument="nevažeći opcionalni argument";Strings.OfficeOM.L_InvalidColumnsForBinding="Navedene kolone su nevažeće.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Operacija nije podržana na ovom tipu povezivanja.";Strings.OfficeOM.L_ReadSettingsError="GreÅ¡ka u postavkama Äitanja";Strings.OfficeOM.L_TooManyOptionalObjects="viÅ¡estruki opcionalni objekti na listi parametara";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="Changes to property '{0}' cannot be applied through an \"object.set\" method.";Strings.OfficeOM.L_EventHandlerRemovalFailed="Uklanjanje rukovaoca dogaÄ‘ajem nije uspelo.";Strings.OfficeOM.L_GetSelectionNotSupported="Trenutna selekcija nije podržana.";Strings.OfficeOM.L_UserAborted="User aborted the consent request.";Strings.OfficeOM.L_InvalidFormat="GreÅ¡ka nevažećeg formata";Strings.OfficeOM.L_OperationNotSupported="Operacija nije podržana.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Allow";Strings.OfficeOM.L_DataNotMatchBindingType="Navedeni objekat podataka nije kompatibilan sa tipom povezivanja.";Strings.OfficeOM.L_InvalidParameters="Funkcija {0} ima nevažeće parametre.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Ignore";Strings.OfficeOM.L_DataWriteReminder="Data Write Reminder";Strings.OfficeOM.L_InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.";Strings.OfficeOM.L_SaveSettingsError="GreÅ¡ka pri Äuvanju postavki";Strings.OfficeOM.L_InvalidSetStartRowColumn="Navedene vrednosti za poÄetni red ili poÄetnu kolonu nisu važeće.";Strings.OfficeOM.L_InvalidArgumentGeneric="The argument(s) passed into the function don't work for this situation, are missing, or aren't in the right format.";Strings.OfficeOM.L_InvalidResourceUrl="Invalid application resource Url provided.";Strings.OfficeOM.L_DataNotMatchSelection="Navedeni objekat podataka nije kompatibilan sa oblikom ili dimenzijama trenutne selekcije.";Strings.OfficeOM.L_TooManyOptionalFunction="viÅ¡estruke opcionalne funkcije na listi parametara";Strings.OfficeOM.L_InvalidGetColumns="Navedene kolone su nevažeće.";Strings.OfficeOM.L_CoercionTypeNotSupported="Navedeni tip promene nije podržan.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Navedeni tip povezivanja nije kompatibilan sa navedenom imenovanom stavkom.";Strings.OfficeOM.L_BrowserAPINotSupported="This browser does not support the requested API.";Strings.OfficeOM.L_DataStale="Podaci nisu u toku";Strings.OfficeOM.L_DocumentReadOnly="Zahtevana operacija nije dozvoljena u trenutnom režimu dokumenta.";Strings.OfficeOM.L_NotSupportedBindingType="Navedeni tip povezivanja {0} nije podržan.";Strings.OfficeOM.L_BindingCreationError="GreÅ¡ka u stvaranju povezivanja";Strings.OfficeOM.L_UnknownBindingType="Tip povezivanja nije podržan.";Strings.OfficeOM.L_DialogAddressNotTrusted="The domain of the URL is not included in the AppDomains element in the manifest.";Strings.OfficeOM.L_FormatValueOutOfRange="Vrednost je izvan dozvoljenog opsega.";Strings.OfficeOM.L_APINotSupported="API Not Supported";Strings.OfficeOM.L_CannotWriteToSelection="Upisivanje u trenutnu selekciju nije moguće.";Strings.OfficeOM.L_SettingsStaleError="GreÅ¡ka usled zastarelih postavki";Strings.OfficeOM.L_InvalidBinding="Nevažeće povezivanje";Strings.OfficeOM.L_BadSelectorString="Niska koja je prosleÄ‘ena u biraÄ nije u ispravnom formatu ili nije podržan.";Strings.OfficeOM.L_DialogNavigateError="Dialog Navigation Error";Strings.OfficeOM.L_SSOServerErrorMessage="An unexpected error occurred on the server.";Strings.OfficeOM.L_IndexOutOfRange="Indeks je izvan opsega.";Strings.OfficeOM.L_InvalidNode="Nevažeći Ävor";Strings.OfficeOM.L_UserAbortedMessage="The user did not consent the add-in permissions.";Strings.OfficeOM.L_ColIndexOutOfRange="Vrednost indeksa kolone je izvan dozvoljenog opsega. Koristite vrednost (0 ili veću) koja je manja od broja kolona.";Strings.OfficeOM.L_InvalidReadForBlankRow="The specified row is blank.";Strings.OfficeOM.L_InitializeNotReady="Office.js joÅ¡ uvek nije potpuno uÄitan. PokuÅ¡ajte ponovo kasnije ili postarajte se da dodate vaÅ¡ kôd za pokretanje na vaÅ¡ Office.initialize function.";Strings.OfficeOM.L_BindingNotExist="Navedeno povezivanje ne postoji.";Strings.OfficeOM.L_NotSupported="Funkcija {0} nije podržana.";Strings.OfficeOM.L_InvalidGrant="Preauthorization missing.";Strings.OfficeOM.L_SettingsCannotSave="Nije bilo moguće saÄuvati postavke.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Trenutna selekcija nije kompatibilna sa navedenim tipom promene.";Strings.OfficeOM.L_SettingNameNotExist="Navedeno ime postavke ne postoji.";Strings.OfficeOM.L_InvalidAPICall="Nevažeći API poziv";Strings.OfficeOM.L_DisplayDialogError="Display Dialog Error";Strings.OfficeOM.L_CustomXmlNodeNotFound="Nije pronaÄ‘en navedeni Ävor.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="Attempting to set read-only property '{0}'.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Napravite selekciju.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Dodavanje rukovaoca dogaÄ‘ajem nije uspelo.";Strings.OfficeOM.L_HostError="GreÅ¡ka hosta";Strings.OfficeOM.L_TooManyIncompleteRequests="Wait until the previous call completes.";Strings.OfficeOM.L_SSOClientError="Error occurred in the authentication request from Office.";Strings.OfficeOM.L_OutOfRange="Izvan opsega";Strings.OfficeOM.L_DataWriteError="GreÅ¡ka u pisanju podataka";Strings.OfficeOM.L_InternalErrorDescription="DoÅ¡lo je do unutraÅ¡nje greÅ¡ke.";Strings.OfficeOM.L_InvalidFormatValue="Neki parametri formata imaju vrednosti koje nisu dozvoljene. Proverite vrednosti joÅ¡ jednom i probajte ponovo.";Strings.OfficeOM.L_RedundantCallbackSpecification="Povratni poziv ne može biti naveden i u listi argumenata i u opcionalnom objektu.";Strings.OfficeOM.L_SpecifiedIdNotExist="Navedeni ID ne postoji.";Strings.OfficeOM.L_MultipleNamedItemFound="PronaÄ‘eno je viÅ¡e objekata sa istim imenom.";Strings.OfficeOM.L_MemoryLimit="Memory Limit Exceeded";Strings.OfficeOM.L_InvalidValue="Nevažeća vrednost";Strings.OfficeOM.L_FileTypeNotSupported="Navedeni tip datoteke nije podržan.";Strings.OfficeOM.L_InvalidApiCallInContext="Nevažeći API poziv u trenutnom kontekstu.";Strings.OfficeOM.L_NotImplemented="Funkcija {0} nije primenjena.";Strings.OfficeOM.L_AppNameNotExist="AppName za {0} ne postoji.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Note: The number of cells in a table is suggested to be below 20,000 cells.";Strings.OfficeOM.L_MissingRequiredArguments="nedostaju neki neophodni argumenti";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Navedene vrednosti za broj redova ili broj kolona nisu važeće.";Strings.OfficeOM.L_InvalidGetStartRowColumn="Navedene vrednosti za poÄetni red ili poÄetnu kolonu nisu važeće.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Nije moguće koristiti parametre za koordinaciju sa tabelom tipa promene kada tabela sadrži objedinjene ćelije.";Strings.OfficeOM.L_CannotRegisterEvent="The event handler cannot be registered.";Strings.OfficeOM.L_InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.';Strings.OfficeOM.L_PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.";Strings.OfficeOM.L_InvalidCoercion="Nevažeći tip promene";Strings.OfficeOM.L_NetworkProblemRetrieveFile="A network problem has prevented retrieval of the file.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="The identity type of the user is not supported.";Strings.OfficeOM.L_UnsupportedUserIdentity="User identity type is not supported.";Strings.OfficeOM.L_DialogRequireHTTPS="The HTTP protocol is not supported. Use HTTPS instead";Strings.OfficeOM.L_ShuttingDown="Operacija nije uspela zato Å¡to podaci na serveru nisu u toku.";Strings.OfficeOM.L_NewWindowCrossZone="The security settings in your browser prevent us from creating a dialog box. Try a different browser, or {0} so that '{1}' and the domain shown in your address bar are in the same security zone.";Strings.OfficeOM.L_PropertyDoesNotExist="Property '{0}' does not exist on the object.";Strings.OfficeOM.L_SelectionCannotBound="Nije moguće izvrÅ¡iti povezivanje sa trenutnom selekcijom.";Strings.OfficeOM.L_InvalidCellsValue="Neki parametri ćelije imaju vrednosti koje nisu dozvoljene. Proverite vrednosti joÅ¡ jednom i probajte ponovo.";Strings.OfficeOM.L_ConnectionFailureWithStatus="The request failed with status code of {0}.";Strings.OfficeOM.L_ActivityLimitReached="Activity limit has been reached.";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Invalid input arguments.";Strings.OfficeOM.L_InvalidSSOAddinMessage="The identity API is not supported for this add-in.";Strings.OfficeOM.L_InternalError="UnutraÅ¡nja greÅ¡ka";Strings.OfficeOM.L_UnsupportedEnumeration="Nepodržano nabrajanje";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Potrebo je da izabrani sadržaj bude u formatu tabele. Oblikujte podatke u vidu tabele i probajte ponovo.";Strings.OfficeOM.L_InvalidSelectionForBindingType="Nije moguće kreirati povezivanje sa trenutnom selekcijom i navedenim tipom povezivanja.";Strings.OfficeOM.L_UnsupportedDataObject="Navedeni tip objekta podataka nije podržan.";Strings.OfficeOM.L_Timeout="The operation has timed out.";Strings.OfficeOM.L_FunctionCallFailed="Poziv funkcije {0} nije uspeo, kod greÅ¡ke: {1}.";Strings.OfficeOM.L_InvalidDataObject="Nevažeći objekat podataka";Strings.OfficeOM.L_SSOClientErrorMessage="An unexpected error occurred in the client.";Strings.OfficeOM.L_InvalidTableOptionValue="Neki tableOptions parametri imaju vrednosti koje nisu dozvoljene. Proverite vrednosti joÅ¡ jednom i probajte ponovo.";Strings.OfficeOM.L_InvalidSetColumns="Navedene kolone su nevažeće.";Strings.OfficeOM.L_CustomXmlError="GreÅ¡ka u prilagoÄ‘enim XML.";Strings.OfficeOM.L_NavOutOfBound="Operacija nije uspela zato Å¡to je indeks van opsega.";Strings.OfficeOM.L_TooManyArguments="previÅ¡e argumenata";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Call closeAsync on the current File before retrieving another.";Strings.OfficeOM.L_SettingsAreStale="Nije bilo moguće saÄuvati postavke jer nisu u toku.";Strings.OfficeOM.L_FormattingReminder="Formatting Reminder";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Aplikacija {0} ne postoji. Microsoft.Office.WebExtension.initialize(razlog) nije pozvan.";Strings.OfficeOM.L_NetworkProblem="Network Problem";Strings.OfficeOM.L_DialogAlreadyOpened="The operation failed because this add-in already has an active dialog.";Strings.OfficeOM.L_PermissionDenied="Dozvola je odbijena";Strings.OfficeOM.L_EventRegistrationError="GreÅ¡ka pri registraciji dogaÄ‘aja";Strings.OfficeOM.L_SetDataIsTooLarge="Navedeni objekat podataka je prevelik.";Strings.OfficeOM.L_DataReadError="GreÅ¡ka u Äitanju podataka";Strings.OfficeOM.L_BindingToMultipleSelection="Nekontinuirane selekcije nisu podržane.";Strings.OfficeOM.L_InvalidDataFormat="Format navedenog objekta podataka nije važeći.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="Nabrajanje nije podržano u trenutnoj aplikaciji hosta.";Strings.OfficeOM.L_EventHandlerNotExist="Navedeni tip dogaÄ‘aja nije podržan na ovom objektu.";Strings.OfficeOM.L_CannotNavigateTo="Objekat se nalazi na lokaciji na kojoj navigacija nije podržana." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods.";Strings.OfficeOM.L_InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.";Strings.OfficeOM.L_NotImplemented="Funkcija {0} nije primenjena.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.";Strings.OfficeOM.L_InValidOptionalArgument="nevažeći opcionalni argument";Strings.OfficeOM.L_InvalidSetStartRowColumn="Navedene vrednosti za poÄetni red ili poÄetnu kolonu nisu važeće.";Strings.OfficeOM.L_CoercionTypeNotSupported="Navedeni tip promene nije podržan.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="Changes to property '{0}' cannot be applied through an \"object.set\" method.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Potrebo je da izabrani sadržaj bude u formatu tabele. Oblikujte podatke u vidu tabele i probajte ponovo.";Strings.OfficeOM.L_UserAborted="User aborted the consent request.";Strings.OfficeOM.L_SetDataParametersConflict="Navedeni parametri su neusaglaÅ¡eni.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="configure your browser";Strings.OfficeOM.L_NetworkProblem="Network Problem";Strings.OfficeOM.L_APICallFailed="API Call Failed";Strings.OfficeOM.L_CannotNavigateTo="Objekat se nalazi na lokaciji na kojoj navigacija nije podržana.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Note: The formatting sets set by a Formatting API call is suggested to be below 100.";Strings.OfficeOM.L_ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="The data is out of date. Retrieve the object again.";Strings.OfficeOM.L_DialogRequireHTTPS="The HTTP protocol is not supported. Use HTTPS instead";Strings.OfficeOM.L_UnsupportedDataObject="Navedeni tip objekta podataka nije podržan.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Navedeni tip promene nije kompatibilan sa ovim tipom povezivanja.";Strings.OfficeOM.L_SetDataIsTooLarge="Navedeni objekat podataka je prevelik.";Strings.OfficeOM.L_TooManyOptionalFunction="viÅ¡estruke opcionalne funkcije na listi parametara";Strings.OfficeOM.L_InitializeNotReady="Office.js joÅ¡ uvek nije potpuno uÄitan. PokuÅ¡ajte ponovo kasnije ili postarajte se da dodate vaÅ¡ kôd za pokretanje na vaÅ¡ Office.initialize function.";Strings.OfficeOM.L_SettingsAreStale="Nije bilo moguće saÄuvati postavke jer nisu u toku.";Strings.OfficeOM.L_MissingRequiredArguments="nedostaju neki neophodni argumenti";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Browser restrictions prevented us from creating the dialog box. The domain of dialog box and the domain of the add-in host are not in the same security zone.";Strings.OfficeOM.L_InvalidBindingError="GreÅ¡ka nevažećeg povezivanja";Strings.OfficeOM.L_GetSelectionNotSupported="Trenutna selekcija nije podržana.";Strings.OfficeOM.L_CustomXmlError="GreÅ¡ka u prilagoÄ‘enim XML.";Strings.OfficeOM.L_NotSupportedEventType="Navedeni tip dogaÄ‘aja {0} nije podržan.";Strings.OfficeOM.L_ConnectionFailureWithStatus="The request failed with status code of {0}.";Strings.OfficeOM.L_GetDataIsTooLarge="Zahtevani skup podataka je prevelik.";Strings.OfficeOM.L_PermissionDenied="Dozvola je odbijena";Strings.OfficeOM.L_InvalidRequestContext="Cannot use the object across different request contexts.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Dodavanje rukovaoca dogaÄ‘ajem nije uspelo.";Strings.OfficeOM.L_FileTypeNotSupported="Navedeni tip datoteke nije podržan.";Strings.OfficeOM.L_Timeout="The operation has timed out.";Strings.OfficeOM.L_DataWriteError="GreÅ¡ka u pisanju podataka";Strings.OfficeOM.L_FormatValueOutOfRange="Vrednost je izvan dozvoljenog opsega.";Strings.OfficeOM.L_InvalidSetRows="Navedeni redovi su nevažeći.";Strings.OfficeOM.L_RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".';Strings.OfficeOM.L_DataNotMatchCoercionType="Tip navedenog objekta podataka nije kompatibilan sa trenutnom selekcijom.";Strings.OfficeOM.L_SliceSizeNotSupported="The specified slice size is not supported.";Strings.OfficeOM.L_InvalidAPICall="Nevažeći API poziv";Strings.OfficeOM.L_DataReadError="GreÅ¡ka u Äitanju podataka";Strings.OfficeOM.L_DialogNavigateError="Dialog Navigation Error";Strings.OfficeOM.L_InvalidFormatValue="Neki parametri formata imaju vrednosti koje nisu dozvoljene. Proverite vrednosti joÅ¡ jednom i probajte ponovo.";Strings.OfficeOM.L_InvalidParameters="Funkcija {0} ima nevažeće parametre.";Strings.OfficeOM.L_ReadSettingsError="GreÅ¡ka u postavkama Äitanja";Strings.OfficeOM.L_NotSupported="Funkcija {0} nije podržana.";Strings.OfficeOM.L_NotSupportedBindingType="Navedeni tip povezivanja {0} nije podržan.";Strings.OfficeOM.L_InvalidGetRows="Navedeni redovi su nevažeći.";Strings.OfficeOM.L_DataWriteReminder="Data Write Reminder";Strings.OfficeOM.L_RowIndexOutOfRange="Vrednost indeksa reda je izvan dozvoljenog opsega. Koristite vrednost (0 ili veću) koja je manja od broja redova.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Selection Limit Reached";Strings.OfficeOM.L_InvalidGetColumns="Navedene kolone su nevažeće.";Strings.OfficeOM.L_SettingsCannotSave="Nije bilo moguće saÄuvati postavke.";Strings.OfficeOM.L_SpecifiedIdNotExist="Navedeni ID ne postoji.";Strings.OfficeOM.L_UserNotSignedIn="No user is signed into Office.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Trenutna selekcija nije kompatibilna sa navedenim tipom promene.";Strings.OfficeOM.L_InvalidResourceUrlMessage="Invalid resource Url specified in the manifest.";Strings.OfficeOM.L_UserAbortedMessage="The user did not consent the add-in permissions.";Strings.OfficeOM.L_FunctionCallFailed="Poziv funkcije {0} nije uspeo, kod greÅ¡ke: {1}.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Napravite selekciju.";Strings.OfficeOM.L_InvalidValue="Nevažeća vrednost";Strings.OfficeOM.L_NoCapability="Nemate dovoljno dozvola za ovu radnju.";Strings.OfficeOM.L_EventRegistrationError="GreÅ¡ka pri registraciji dogaÄ‘aja";Strings.OfficeOM.L_PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.";Strings.OfficeOM.L_FormattingReminder="Formatting Reminder";Strings.OfficeOM.L_InvalidGrantMessage="Missing grant for this add-in.";Strings.OfficeOM.L_InvalidGetStartRowColumn="Navedene vrednosti za poÄetni red ili poÄetnu kolonu nisu važeće.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Note: The number of cells in a table is suggested to be below 20,000 cells.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath limits selection to 1024 items.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="Nabrajanje nije podržano u trenutnoj aplikaciji hosta.";Strings.OfficeOM.L_InvalidFormat="GreÅ¡ka nevažećeg formata";Strings.OfficeOM.L_BindingNotExist="Navedeno povezivanje ne postoji.";Strings.OfficeOM.L_DataNotMatchSelection="Navedeni objekat podataka nije kompatibilan sa oblikom ili dimenzijama trenutne selekcije.";Strings.OfficeOM.L_DialogAddressNotTrusted="The domain of the URL is not included in the AppDomains element in the manifest.";Strings.OfficeOM.L_SettingsStaleError="GreÅ¡ka usled zastarelih postavki";Strings.OfficeOM.L_ColIndexOutOfRange="Vrednost indeksa kolone je izvan dozvoljenog opsega. Koristite vrednost (0 ili veću) koja je manja od broja kolona.";Strings.OfficeOM.L_InvalidBindingOperation="Operacija nevažećeg povezivanja";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="The identity type of the user is not supported.";Strings.OfficeOM.L_MultipleNamedItemFound="PronaÄ‘eno je viÅ¡e objekata sa istim imenom.";Strings.OfficeOM.L_InvalidApiCallInContext="Nevažeći API poziv u trenutnom kontekstu.";Strings.OfficeOM.L_TooManyOptionalObjects="viÅ¡estruki opcionalni objekti na listi parametara";Strings.OfficeOM.L_CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name.";Strings.OfficeOM.L_GetDataParametersConflict="Navedeni parametri su neusaglaÅ¡eni.";Strings.OfficeOM.L_BrowserAPINotSupported="This browser does not support the requested API.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Operacija nije podržana na ovom tipu povezivanja.";Strings.OfficeOM.L_SSOServerError="Error occurred in the authentication provider.";Strings.OfficeOM.L_NamedItemNotFound="Imenovana stavka ne postoji.";Strings.OfficeOM.L_DataNotMatchBindingSize="Navedeni objekat podataka ne podudara se sa veliÄinom trenutne selekcije.";Strings.OfficeOM.L_InternalErrorDescription="DoÅ¡lo je do unutraÅ¡nje greÅ¡ke.";Strings.OfficeOM.L_ShuttingDown="Operacija nije uspela zato Å¡to podaci na serveru nisu u toku.";Strings.OfficeOM.L_SSOConnectionLostErrorMessage="A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones.";Strings.OfficeOM.L_InvalidSSOAddinMessage="The identity API is not supported for this add-in.";Strings.OfficeOM.L_InvalidBinding="Nevažeće povezivanje";Strings.OfficeOM.L_SettingNameNotExist="Navedeno ime postavke ne postoji.";Strings.OfficeOM.L_SSOClientErrorMessage="An unexpected error occurred in the client.";Strings.OfficeOM.L_DataStale="Podaci nisu u toku";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Call closeAsync on the current File before retrieving another.";Strings.OfficeOM.L_CallbackNotAFunction="Povratni poziv mora biti funkcija tipa, bila je tipa {0}.";Strings.OfficeOM.L_MissingParameter="Parametar nedostaje";Strings.OfficeOM.L_UnsupportedUserIdentity="User identity type is not supported.";Strings.OfficeOM.L_SelectionCannotBound="Nije moguće izvrÅ¡iti povezivanje sa trenutnom selekcijom.";Strings.OfficeOM.L_ElementMissing="Nismo mogli da oblikujemo ćeliju tabele zato Å¡to nedostaju neke vrednosti parametara. Proverite parametre joÅ¡ jednom i probajte ponovo.";Strings.OfficeOM.L_EventHandlerRemovalFailed="Uklanjanje rukovaoca dogaÄ‘ajem nije uspelo.";Strings.OfficeOM.L_SSOConnectionLostError="A connection was lost during the sign in process.";Strings.OfficeOM.L_EventHandlerNotExist="Navedeni tip dogaÄ‘aja nije podržan na ovom objektu.";Strings.OfficeOM.L_InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.';Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="Attempting to set read-only property '{0}'.";Strings.OfficeOM.L_OperationNotSupported="Operacija nije podržana.";Strings.OfficeOM.L_SSOClientError="Error occurred in the authentication request from Office.";Strings.OfficeOM.L_ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.';Strings.OfficeOM.L_InternalError="UnutraÅ¡nja greÅ¡ka";Strings.OfficeOM.L_OsfControlTypeNotSupported="OsfControl tip nije podržan.";Strings.OfficeOM.L_ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} wants to display a new window.";Strings.OfficeOM.L_InvalidGrant="Preauthorization missing.";Strings.OfficeOM.L_DocumentReadOnly="Zahtevana operacija nije dozvoljena u trenutnom režimu dokumenta.";Strings.OfficeOM.L_InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.";Strings.OfficeOM.L_InvalidSelectionForBindingType="Nije moguće kreirati povezivanje sa trenutnom selekcijom i navedenim tipom povezivanja.";Strings.OfficeOM.L_BindingToMultipleSelection="Nekontinuirane selekcije nisu podržane.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Aplikacija {0} ne postoji. Microsoft.Office.WebExtension.initialize(razlog) nije pozvan.";Strings.OfficeOM.L_SSOServerErrorMessage="An unexpected error occurred on the server.";Strings.OfficeOM.L_InvalidTableOptionValue="Neki tableOptions parametri imaju vrednosti koje nisu dozvoljene. Proverite vrednosti joÅ¡ jednom i probajte ponovo.";Strings.OfficeOM.L_AppNameNotExist="AppName za {0} ne postoji.";Strings.OfficeOM.L_InvalidDataObject="Nevažeći objekat podataka";Strings.OfficeOM.L_CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.";Strings.OfficeOM.L_RequestTokenUnavailable="This API has been throttled to slow the call frequency.";Strings.OfficeOM.L_UnknownBindingType="Tip povezivanja nije podržan.";Strings.OfficeOM.L_DialogAlreadyOpened="The operation failed because this add-in already has an active dialog.";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Invalid input arguments.";Strings.OfficeOM.L_HostError="GreÅ¡ka hosta";Strings.OfficeOM.L_CustomXmlOutOfDateName="Data Not Current";Strings.OfficeOM.L_MemoryLimit="Memory Limit Exceeded";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_UserClickIgnore="The user chose to ignore the dialog box.";Strings.OfficeOM.L_ActivityLimitReached="Activity limit has been reached.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="A network problem has prevented retrieval of the file.";Strings.OfficeOM.L_InvalidNode="Nevažeći Ävor";Strings.OfficeOM.L_IndexOutOfRange="Indeks je izvan opsega.";Strings.OfficeOM.L_CannotWriteToSelection="Upisivanje u trenutnu selekciju nije moguće.";Strings.OfficeOM.L_NavOutOfBound="Operacija nije uspela zato Å¡to je indeks van opsega.";Strings.OfficeOM.L_RedundantCallbackSpecification="Povratni poziv ne može biti naveden i u listi argumenata i u opcionalnom objektu.";Strings.OfficeOM.L_RequestTimeout="The call took too long to execute.";Strings.OfficeOM.L_CustomXmlNodeNotFound="Nije pronaÄ‘en navedeni Ävor.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage="The operation failed because this add-in does not support user consent in this category";Strings.OfficeOM.L_DialogInvalidScheme="The URL scheme is not supported. Use HTTPS instead.";Strings.OfficeOM.L_CustomFunctionDefinitionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions.";Strings.OfficeOM.L_TooManyArguments="previÅ¡e argumenata";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Allow";Strings.OfficeOM.L_BadSelectorString="Niska koja je prosleÄ‘ena u biraÄ nije u ispravnom formatu ili nije podržan.";Strings.OfficeOM.L_PropertyDoesNotExist="Property '{0}' does not exist on the object.";Strings.OfficeOM.L_InvalidResourceUrl="Invalid application resource Url provided.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Nije moguće koristiti parametre za koordinaciju sa tabelom tipa promene kada tabela sadrži objedinjene ćelije.";Strings.OfficeOM.L_NewWindowCrossZone="The security settings in your browser prevent us from creating a dialog box. Try a different browser, or {0} so that '{1}' and the domain shown in your address bar are in the same security zone.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Nije moguće koristiti parametre za koordinaciju sa tabelom tipa promene kada tabela sadrži objedinjene ćelije.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="The operation failed because this add-in is already requesting an access token.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Navedene vrednosti za broj redova ili broj kolona nisu važeće.";Strings.OfficeOM.L_OverwriteWorksheetData="Operacija postavljanja nije uspela zato Å¡to će navedeni objekat podataka zameniti ili premestiti podatke.";Strings.OfficeOM.L_APINotSupported="API Not Supported";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Navedeni tip povezivanja nije kompatibilan sa navedenom imenovanom stavkom.";Strings.OfficeOM.L_InvalidSetColumns="Navedene kolone su nevažeće.";Strings.OfficeOM.L_TooManyIncompleteRequests="Wait until the previous call completes.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Add-in is already requesting an access token.";Strings.OfficeOM.L_InvalidColumnsForBinding="Navedene kolone su nevažeće.";Strings.OfficeOM.L_OutOfRange="Izvan opsega";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Ignore";Strings.OfficeOM.L_DataNotMatchBindingType="Navedeni objekat podataka nije kompatibilan sa tipom povezivanja.";Strings.OfficeOM.L_DisplayDialogError="Display Dialog Error";Strings.OfficeOM.L_SaveSettingsError="GreÅ¡ka pri Äuvanju postavki";Strings.OfficeOM.L_InvalidCoercion="Nevažeći tip promene";Strings.OfficeOM.L_InvalidDataFormat="Format navedenog objekta podataka nije važeći.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Invalid Or Timed Out Session";Strings.OfficeOM.L_InvalidArgumentGeneric="The argument(s) passed into the function don't work for this situation, are missing, or aren't in the right format.";Strings.OfficeOM.L_InvalidReadForBlankRow="The specified row is blank.";Strings.OfficeOM.L_CannotRegisterEvent="The event handler cannot be registered.";Strings.OfficeOM.L_UnsupportedEnumeration="Nepodržano nabrajanje";Strings.OfficeOM.L_BindingCreationError="GreÅ¡ka u stvaranju povezivanja";Strings.OfficeOM.L_InvalidCellsValue="Neki parametri ćelije imaju vrednosti koje nisu dozvoljene. Proverite vrednosti joÅ¡ jednom i probajte ponovo.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory="This add-in does not support user consent." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/sr-latn-cs/outlook_strings.debug.js b/node_modules/@microsoft/office-js/dist/sr-latn-cs/outlook_strings.debug.js index aa8ea7d..53f0c8e 100644 --- a/node_modules/@microsoft/office-js/dist/sr-latn-cs/outlook_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/sr-latn-cs/outlook_strings.debug.js @@ -1,34 +1,35 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("_u"); _u.ExtensibilityStrings = function() { }; _u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings"); -_u.ExtensibilityStrings.l_InvalidEndTime_Text = "Vreme zavrÅ¡etka ne može biti pre vremena poÄetka."; +_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "Putanja priloga je nevažeća."; +_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Nisu dati važeći primaoci."; +_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "ID priloga je nevažeći."; +_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Nije moguće dodati prilog zato Å¡to je prevelik."; _u.ExtensibilityStrings.l_OffsetNotfound_Text = "Nije moguće pronaći pomak za ovu vremensku oznaku."; -_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "GreÅ¡ka u prilogu"; +_u.ExtensibilityStrings.l_InvalidDate_Text = "Unos se ne razreÅ¡ava na važeći datum."; +_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "HTML Äišćenje nije uspelo."; _u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Dati parametri ne odgovaraju oÄekivanom formatu."; -_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Ukupan broj primalaca u polju ne sme da premaÅ¡i {0}."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "Puna dozvola je potrebna za pozivanje ovog metoda: '{0}'."; +_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Nije moguće izbrisati prilog iz stavke."; _u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Neka od datih imena za prikaz su predugaÄka."; -_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Nije moguće dodati priloge dok se pun odgovor preuzima sa servera."; -_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "ID priloga je nevažeći."; -_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "Korisnik je promenio poziciju kursora dok je trajalo umetanje podataka."; -_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "HTML Äišćenje nije uspelo."; -_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Neke od datih e-adresa su predugaÄke."; -_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Nije moguće izbrisati prilog zato Å¡to nije moguće naći prilog sa indeksom priloga."; -_u.ExtensibilityStrings.l_InvalidEventDates_Text = "Datum zavrÅ¡etka je pre datuma poÄetka."; -_u.ExtensibilityStrings.l_InvalidDate_Text = "Unos se ne razreÅ¡ava na važeći datum."; -_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Nisu dati važeći primaoci."; -_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "The selected item has been changed."; -_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "GreÅ¡ka u pisanju podataka"; +_u.ExtensibilityStrings.l_InvalidEndTime_Text = "Vreme zavrÅ¡etka ne može biti pre vremena poÄetka."; _u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "Korisnik je uklonio prilog pre nego Å¡to je otpremanje dovrÅ¡eno."; +_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Nije moguće dodati priloge zato Å¡to poruka već ima maksimalan broj priloga"; +_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Nije moguće dodati prilog stavci."; +_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Nije moguće izbrisati prilog zato Å¡to nije moguće naći prilog sa indeksom priloga."; +_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "Puna dozvola je potrebna za pozivanje ovog metoda: '{0}'."; +_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Neke od datih e-adresa su predugaÄke."; +_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Nije moguće dodati priloge dok se pun odgovor preuzima sa servera."; _u.ExtensibilityStrings.l_InternalFormatError_Text = "DoÅ¡lo je do interne greÅ¡ke u formatiranju."; +_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "Korisnik je promenio poziciju kursora dok je trajalo umetanje podataka."; +_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "GreÅ¡ka u prilogu"; +_u.ExtensibilityStrings.l_InternalProtocolError_Text = "Interna greÅ¡ka protokola: '{0}'."; _u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Zahtev premaÅ¡uje ograniÄenje veliÄine od 1 MB. Izmenite EWS zahtev."; -_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Nije moguće dodati prilog zato Å¡to je prevelik."; -_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Nije moguće dodati priloge zato Å¡to poruka već ima maksimalan broj priloga"; +_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "GreÅ¡ka u pisanju podataka"; +_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "The selected item has been changed."; +_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Ukupan broj primalaca u polju ne sme da premaÅ¡i {0}."; _u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Puna dozvola je potrebna za pristup zaÅ¡tićenim Älanovima aplikacije JavaScript API za Office."; -_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "Putanja priloga je nevažeća."; -_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Nije moguće izbrisati prilog iz stavke."; -_u.ExtensibilityStrings.l_InternalProtocolError_Text = "Interna greÅ¡ka protokola: '{0}'."; -_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Nije moguće dodati prilog stavci." +_u.ExtensibilityStrings.l_InvalidEventDates_Text = "Datum zavrÅ¡etka je pre datuma poÄetka." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/sr-latn-cs/outlook_strings.js b/node_modules/@microsoft/office-js/dist/sr-latn-cs/outlook_strings.js index 72ac8fb..0db129e 100644 --- a/node_modules/@microsoft/office-js/dist/sr-latn-cs/outlook_strings.js +++ b/node_modules/@microsoft/office-js/dist/sr-latn-cs/outlook_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_InvalidEndTime_Text="Vreme zavrÅ¡etka ne može biti pre vremena poÄetka.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Nije moguće pronaći pomak za ovu vremensku oznaku.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="GreÅ¡ka u prilogu";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Dati parametri ne odgovaraju oÄekivanom formatu.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Ukupan broj primalaca u polju ne sme da premaÅ¡i {0}.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Puna dozvola je potrebna za pozivanje ovog metoda: '{0}'.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Neka od datih imena za prikaz su predugaÄka.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Nije moguće dodati priloge dok se pun odgovor preuzima sa servera.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="ID priloga je nevažeći.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="Korisnik je promenio poziciju kursora dok je trajalo umetanje podataka.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="HTML Äišćenje nije uspelo.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Neke od datih e-adresa su predugaÄke.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Nije moguće izbrisati prilog zato Å¡to nije moguće naći prilog sa indeksom priloga.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="Datum zavrÅ¡etka je pre datuma poÄetka.";_u.ExtensibilityStrings.l_InvalidDate_Text="Unos se ne razreÅ¡ava na važeći datum.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Nisu dati važeći primaoci.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="The selected item has been changed.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="GreÅ¡ka u pisanju podataka";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="Korisnik je uklonio prilog pre nego Å¡to je otpremanje dovrÅ¡eno.";_u.ExtensibilityStrings.l_InternalFormatError_Text="DoÅ¡lo je do interne greÅ¡ke u formatiranju.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Zahtev premaÅ¡uje ograniÄenje veliÄine od 1 MB. Izmenite EWS zahtev.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Nije moguće dodati prilog zato Å¡to je prevelik.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Nije moguće dodati priloge zato Å¡to poruka već ima maksimalan broj priloga";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Puna dozvola je potrebna za pristup zaÅ¡tićenim Älanovima aplikacije JavaScript API za Office.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="Putanja priloga je nevažeća.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Nije moguće izbrisati prilog iz stavke.";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Interna greÅ¡ka protokola: '{0}'.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Nije moguće dodati prilog stavci." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="Putanja priloga je nevažeća.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Nisu dati važeći primaoci.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="ID priloga je nevažeći.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Nije moguće dodati prilog zato Å¡to je prevelik.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Nije moguće pronaći pomak za ovu vremensku oznaku.";_u.ExtensibilityStrings.l_InvalidDate_Text="Unos se ne razreÅ¡ava na važeći datum.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="HTML Äišćenje nije uspelo.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Dati parametri ne odgovaraju oÄekivanom formatu.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Nije moguće izbrisati prilog iz stavke.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Neka od datih imena za prikaz su predugaÄka.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="Vreme zavrÅ¡etka ne može biti pre vremena poÄetka.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="Korisnik je uklonio prilog pre nego Å¡to je otpremanje dovrÅ¡eno.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Nije moguće dodati priloge zato Å¡to poruka već ima maksimalan broj priloga";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Nije moguće dodati prilog stavci.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Nije moguće izbrisati prilog zato Å¡to nije moguće naći prilog sa indeksom priloga.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Puna dozvola je potrebna za pozivanje ovog metoda: '{0}'.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Neke od datih e-adresa su predugaÄke.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Nije moguće dodati priloge dok se pun odgovor preuzima sa servera.";_u.ExtensibilityStrings.l_InternalFormatError_Text="DoÅ¡lo je do interne greÅ¡ke u formatiranju.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="Korisnik je promenio poziciju kursora dok je trajalo umetanje podataka.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="GreÅ¡ka u prilogu";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Interna greÅ¡ka protokola: '{0}'.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Zahtev premaÅ¡uje ograniÄenje veliÄine od 1 MB. Izmenite EWS zahtev.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="GreÅ¡ka u pisanju podataka";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="The selected item has been changed.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Ukupan broj primalaca u polju ne sme da premaÅ¡i {0}.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Puna dozvola je potrebna za pristup zaÅ¡tićenim Älanovima aplikacije JavaScript API za Office.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="Datum zavrÅ¡etka je pre datuma poÄetka." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/sr-latn-rs/office_strings.debug.js b/node_modules/@microsoft/office-js/dist/sr-latn-rs/office_strings.debug.js index 91adf70..e13b0e1 100644 --- a/node_modules/@microsoft/office-js/dist/sr-latn-rs/office_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/sr-latn-rs/office_strings.debug.js @@ -1,179 +1,190 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("Strings"); Strings.OfficeOM = function() { }; Strings.OfficeOM.registerClass("Strings.OfficeOM"); -Strings.OfficeOM.L_EventHandlerRemovalFailed = "Uklanjanje rukovaoca dogaÄ‘ajem nije uspelo."; -Strings.OfficeOM.L_InvalidGrant = "Pred-autorizacija nedostaje."; +Strings.OfficeOM.L_NotSupportedEventType = "Navedeni tip dogaÄ‘aja {0} nije podržan."; +Strings.OfficeOM.L_TooManyOptionalObjects = "viÅ¡estruki opcionalni objekti na listi parametara"; +Strings.OfficeOM.L_DataNotMatchBindingSize = "Navedeni objekat podataka ne podudara se sa veliÄinom trenutne selekcije."; +Strings.OfficeOM.L_SSOClientErrorMessage = "DoÅ¡lo je do neoÄekivane greÅ¡ke u klijentu."; +Strings.OfficeOM.L_DialogInvalidScheme = "URL Å¡ema nije podržana. Koristite HTTPS."; +Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Nije moguće koristiti parametre za koordinaciju sa tabelom tipa promene kada tabela sadrži objedinjene ćelije."; +Strings.OfficeOM.L_InvalidObjectPath = "Putanja objekta „{0}“ ne funkcioniÅ¡e za ono Å¡to pokuÅ¡avate da uradite. Ako objekat koristite u viÅ¡e „context.sync“ poziva i izvan sekvencijalnog izvrÅ¡avanja grupe „.run“, koristite metode „context.trackedObjects.add()“ i „context.trackedObjects.remove()“ da biste upravljali trajanjem objekta."; +Strings.OfficeOM.L_FormatValueOutOfRange = "Vrednost je izvan dozvoljenog opsega."; +Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Dostignuto je ograniÄenje izbora"; +Strings.OfficeOM.L_InvalidOperationInCellEditMode = "Excel je u režimu ureÄ‘ivanja ćelija. IzaÄ‘ite iz režima ureÄ‘ivanja tako Å¡to ćete pritisnuti ENTER ili TAB odnosno izabrati drugu ćeliju, a zatim pokuÅ¡ajte ponovo."; +Strings.OfficeOM.L_ConnectionFailureWithStatus = "Zahtev nije uspeo uz statusni kôd {0}."; +Strings.OfficeOM.L_InvalidFormatValue = "Neki parametri formata imaju vrednosti koje nisu dozvoljene. Proverite vrednosti joÅ¡ jednom i probajte ponovo."; +Strings.OfficeOM.L_UserAborted = "Korisnik je obustavio zahtev za odobrenje."; Strings.OfficeOM.L_RequestTimeout = "IzvrÅ¡avanje poziva je predugo trajalo."; +Strings.OfficeOM.L_CustomFunctionNameContainsBadChars = "Ime funkcije može da sadrži samo slova, cifre, podvlake i taÄke."; +Strings.OfficeOM.L_SpecifiedIdNotExist = "Navedeni ID ne postoji."; +Strings.OfficeOM.L_InvalidDataObject = "Nevažeći objekat podataka"; +Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Navedeni tip povezivanja nije kompatibilan sa navedenom imenovanom stavkom."; +Strings.OfficeOM.L_DataNotMatchBindingType = "Navedeni objekat podataka nije kompatibilan sa tipom povezivanja."; +Strings.OfficeOM.L_CustomXmlError = "GreÅ¡ka u prilagoÄ‘enim XML."; +Strings.OfficeOM.L_InvalidFormat = "GreÅ¡ka nevažećeg formata"; Strings.OfficeOM.L_InvalidGetRows = "Navedeni redovi su nevažeći."; -Strings.OfficeOM.L_SliceSizeNotSupported = "Navedena veliÄina iseÄka nije podržana."; -Strings.OfficeOM.L_SSOClientErrorMessage = "DoÅ¡lo je do neoÄekivane greÅ¡ke u klijentu."; -Strings.OfficeOM.L_SaveSettingsError = "GreÅ¡ka pri Äuvanju postavki"; +Strings.OfficeOM.L_AppNameNotExist = "Ime programskog dodatka za {0} ne postoji."; +Strings.OfficeOM.L_EventHandlerAdditionFailed = "Dodavanje rukovaoca dogaÄ‘ajem nije uspelo."; Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Mrežni problem je spreÄio preuzimanje datoteke."; -Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "VaÅ¡a Office Online sesija je istekla ili je nevažeća. Osvežite stranicu da biste nastavili."; +Strings.OfficeOM.L_CannotRegisterEvent = "Nije moguće registrovati rukovalac dogaÄ‘ajem."; +Strings.OfficeOM.L_InvalidResourceUrl = "ObezbeÄ‘ena je nevažeća URL adresa resursa aplikacije."; +Strings.OfficeOM.L_MissingRequiredArguments = "nedostaju neki neophodni argumenti"; +Strings.OfficeOM.L_InvalidColumnsForBinding = "Navedene kolone su nevažeće."; +Strings.OfficeOM.L_FormattingReminder = "Podsetnik za oblikovanje"; +Strings.OfficeOM.L_DisplayDialogError = "GreÅ¡ka u prikazu dijaloga"; +Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Zanemari"; +Strings.OfficeOM.L_CallbackNotAFunction = "Povratni poziv mora biti funkcija tipa, bila je tipa {0}."; Strings.OfficeOM.L_InvalidGetColumns = "Navedene kolone su nevažeće."; -Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "konfiguriÅ¡ite pregledaÄ"; -Strings.OfficeOM.L_InvalidBinding = "Nevažeće povezivanje"; -Strings.OfficeOM.L_NotSupportedBindingType = "Navedeni tip povezivanja {0} nije podržan."; +Strings.OfficeOM.L_UnsupportedUserIdentity = "Tip identiteta korisnika nije podržan."; +Strings.OfficeOM.L_InvalidTableOptionValue = "Neki tableOptions parametri imaju vrednosti koje nisu dozvoljene. Proverite vrednosti joÅ¡ jednom i probajte ponovo."; +Strings.OfficeOM.L_NotSupported = "Funkcija {0} nije podržana."; +Strings.OfficeOM.L_InvalidCoercion = "Nevažeći tip promene"; +Strings.OfficeOM.L_ColIndexOutOfRange = "Vrednost indeksa kolone je izvan dozvoljenog opsega. Koristite vrednost (0 ili veću) koja je manja od broja kolona."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Operacija nije uspela zato Å¡to ovaj programski dodatak već zahteva token za pristup."; +Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "VaÅ¡a Office Online sesija je istekla ili je nevažeća. Osvežite stranicu da biste nastavili."; +Strings.OfficeOM.L_InvalidSSOAddinMessage = "API identiteta nije podržan za ovaj programski dodatak."; +Strings.OfficeOM.L_TooManyArguments = "previÅ¡e argumenata"; +Strings.OfficeOM.L_InvalidResourceUrlMessage = "U manifestu je navedena nevažeća URL adresa resursa."; Strings.OfficeOM.L_CustomXmlOutOfDateName = "Podaci nisu aktuelni"; -Strings.OfficeOM.L_InvalidArgument = "Argument „{0}“ ne funkcioniÅ¡e u ovoj situaciji, nedostaje ili nije u odgovarajućem formatu."; -Strings.OfficeOM.L_RequestTokenUnavailable = "Ovaj API je ograniÄen da bi se usporila uÄestalost poziva."; -Strings.OfficeOM.L_EventRegistrationError = "GreÅ¡ka pri registraciji dogaÄ‘aja"; +Strings.OfficeOM.L_CannotNavigateTo = "Objekat se nalazi na lokaciji na kojoj navigacija nije podržana."; +Strings.OfficeOM.L_UserAbortedMessage = "Korisnik nije prihvatio dozvole za programski dodatak."; +Strings.OfficeOM.L_DialogOK = "U redu"; +Strings.OfficeOM.L_SSOServerError = "DoÅ¡lo je do greÅ¡ke u dobavljaÄu usluge potvrde identiteta."; +Strings.OfficeOM.L_RedundantCallbackSpecification = "Povratni poziv ne može biti naveden i u listi argumenata i u opcionalnom objektu."; +Strings.OfficeOM.L_InvalidDataFormat = "Format navedenog objekta podataka nije važeći."; +Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Trenutna selekcija nije kompatibilna sa navedenim tipom promene."; Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Napravite selekciju."; -Strings.OfficeOM.L_MultipleNamedItemFound = "PronaÄ‘eno je viÅ¡e objekata sa istim imenom."; -Strings.OfficeOM.L_TooManyOptionalFunction = "viÅ¡estruke opcionalne funkcije na listi parametara"; -Strings.OfficeOM.L_DataWriteReminder = "Podsetnik za pisanje podataka"; Strings.OfficeOM.L_DataStale = "Podaci nisu u toku"; -Strings.OfficeOM.L_UnknownBindingType = "Tip povezivanja nije podržan."; -Strings.OfficeOM.L_DocumentReadOnly = "Zahtevana operacija nije dozvoljena u trenutnom režimu dokumenta."; -Strings.OfficeOM.L_BindingToMultipleSelection = "Nekontinuirane selekcije nisu podržane."; -Strings.OfficeOM.L_APICallFailed = "API poziv nije uspeo"; -Strings.OfficeOM.L_OperationNotSupported = "Operacija nije podržana."; -Strings.OfficeOM.L_InvalidParameters = "Funkcija {0} ima nevažeće parametre."; -Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Potrebo je da izabrani sadržaj bude u formatu tabele. Oblikujte podatke u vidu tabele i probajte ponovo."; -Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Argumenti nevažećeg unosa."; -Strings.OfficeOM.L_DialogAlreadyOpened = "Operacija nije uspela zato Å¡to ovaj programski dodatak već ima aktivan dijalog."; -Strings.OfficeOM.L_DataWriteError = "GreÅ¡ka u pisanju podataka"; +Strings.OfficeOM.L_CustomFunctionNameCannotSplit = "Ime funkcije mora da sadrži prostor za ime koji nije prazan i kratko ime koje nije prazno."; +Strings.OfficeOM.L_TooManyOptionalFunction = "viÅ¡estruke opcionalne funkcije na listi parametara"; +Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Podaci su zastareli. Preuzmite objekat ponovo."; +Strings.OfficeOM.L_UserNotSignedIn = "Nijedan korisnik nije prijavljen u Office."; +Strings.OfficeOM.L_InvalidOrTimedOutSession = "Nevažeća ili istekla sesija"; +Strings.OfficeOM.L_InvalidGrantMessage = "Nedostaje odobrenje za ovaj programski dodatak."; +Strings.OfficeOM.L_SettingNameNotExist = "Navedeno ime postavke ne postoji."; +Strings.OfficeOM.L_GetDataIsTooLarge = "Zahtevani skup podataka je prevelik."; +Strings.OfficeOM.L_DataNotMatchCoercionType = "Tip navedenog objekta podataka nije kompatibilan sa trenutnom selekcijom."; +Strings.OfficeOM.L_NotSupportedBindingType = "Navedeni tip povezivanja {0} nije podržan."; +Strings.OfficeOM.L_APINotSupported = "API nije podržan"; +Strings.OfficeOM.L_InvalidSelectionForBindingType = "Nije moguće kreirati povezivanje sa trenutnom selekcijom i navedenim tipom povezivanja."; Strings.OfficeOM.L_BrowserAPINotSupported = "Ovaj pregledaÄ ne podržava zahtevani API."; -Strings.OfficeOM.L_InvalidObjectPath = "Putanja objekta „{0}“ ne funkcioniÅ¡e za ono Å¡to pokuÅ¡avate da uradite. Ako objekat koristite u viÅ¡e „context.sync“ poziva i izvan sekvencijalnog izvrÅ¡avanja grupe „.run“, koristite metode „context.trackedObjects.add()“ i „context.trackedObjects.remove()“ da biste upravljali trajanjem objekta."; -Strings.OfficeOM.L_FileTypeNotSupported = "Navedeni tip datoteke nije podržan."; -Strings.OfficeOM.L_MemoryLimit = "PremaÅ¡eno je ograniÄenje memorije"; -Strings.OfficeOM.L_InvalidFormat = "GreÅ¡ka nevažećeg formata"; -Strings.OfficeOM.L_SelectionCannotBound = "Nije moguće izvrÅ¡iti povezivanje sa trenutnom selekcijom."; -Strings.OfficeOM.L_InvalidSetRows = "Navedeni redovi su nevažeći."; -Strings.OfficeOM.L_NotSupported = "Funkcija {0} nije podržana."; -Strings.OfficeOM.L_NamedItemNotFound = "Imenovana stavka ne postoji."; Strings.OfficeOM.L_MissingParameter = "Parametar nedostaje"; -Strings.OfficeOM.L_SSOServerError = "DoÅ¡lo je do greÅ¡ke u dobavljaÄu usluge potvrde identiteta."; -Strings.OfficeOM.L_SSOClientError = "DoÅ¡lo je do greÅ¡ke u zahtevu za potvrdu identiteta iz sistema Office."; -Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "OgraniÄenja pregledaÄa spreÄila su nas da kreiramo dijalog. Domen dijaloga i domen hosta programskog dodatka nisu u istoj bezbednosnoj zoni."; -Strings.OfficeOM.L_InvalidAPICall = "Nevažeći API poziv"; -Strings.OfficeOM.L_UserAborted = "Korisnik je obustavio zahtev za odobrenje."; -Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Podaci su zastareli. Preuzmite objekat ponovo."; +Strings.OfficeOM.L_InvalidSetColumns = "Navedene kolone su nevažeće."; +Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "PokuÅ¡ava se postavljanje svojstva samo za Äitanje „{0}“."; +Strings.OfficeOM.L_NewWindowCrossZone = "Bezbednosne postavke u pregledaÄu spreÄavaju nas da kreiramo dijalog. PokuÅ¡ajte sa drugim pregledaÄem ili {0} kako bi „{1}“ i domen prikazan na traci adresa bili u istoj bezbednosnoj zoni."; +Strings.OfficeOM.L_SSOServerErrorMessage = "DoÅ¡lo je do neoÄekivane greÅ¡ke na serveru."; +Strings.OfficeOM.L_SliceSizeNotSupported = "Navedena veliÄina iseÄka nije podržana."; Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Napomena: Predloženo je da skupovi oblikovanja koje je postavio poziv API oblikovanja budu ispod 100."; -Strings.OfficeOM.L_DialogOK = "U redu"; -Strings.OfficeOM.L_DialogAddressNotTrusted = "Domen URL adrese nije uvrÅ¡ten u elementu AppDomains u manifestu"; -Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath ograniÄava izbor na 1024 stavke."; -Strings.OfficeOM.L_MissingRequiredArguments = "nedostaju neki neophodni argumenti"; -Strings.OfficeOM.L_InvalidDataFormat = "Format navedenog objekta podataka nije važeći."; -Strings.OfficeOM.L_ShuttingDown = "Operacija nije uspela zato Å¡to podaci na serveru nisu u toku."; -Strings.OfficeOM.L_InvalidReadForBlankRow = "Navedeni red je prazan."; -Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Dozvoli"; -Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Zanemari"; -Strings.OfficeOM.L_APINotSupported = "API nije podržan"; -Strings.OfficeOM.L_FormattingReminder = "Podsetnik za oblikovanje"; +Strings.OfficeOM.L_APICallFailed = "API poziv nije uspeo"; +Strings.OfficeOM.L_SSOConnectionLostError = "A connection was lost during the sign in process."; +Strings.OfficeOM.L_RequestTokenUnavailable = "Ovaj API je ograniÄen da bi se usporila uÄestalost poziva."; +Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = "Nije moguće primeniti promene svojstva „{0}“ putem metoda „object.set“."; Strings.OfficeOM.L_FunctionCallFailed = "Poziv funkcije {0} nije uspeo, kod greÅ¡ke: {1}."; -Strings.OfficeOM.L_RedundantCallbackSpecification = "Povratni poziv ne može biti naveden i u listi argumenata i u opcionalnom objektu."; -Strings.OfficeOM.L_UnsupportedDataObject = "Navedeni tip objekta podataka nije podržan."; -Strings.OfficeOM.L_OsfControlTypeNotSupported = "OsfControl tip nije podržan."; -Strings.OfficeOM.L_InvalidBindingOperation = "Operacija nevažećeg povezivanja"; -Strings.OfficeOM.L_CannotNavigateTo = "Objekat se nalazi na lokaciji na kojoj navigacija nije podržana."; -Strings.OfficeOM.L_DisplayDialogError = "GreÅ¡ka u prikazu dijaloga"; +Strings.OfficeOM.L_BindingCreationError = "GreÅ¡ka u stvaranju povezivanja"; +Strings.OfficeOM.L_ApiNotFoundDetails = "Metod ili svojstvo {0} predstavlja deo skupa zahteva {1}, koji nije dostupan u vaÅ¡oj verziji aplikacije {2}."; +Strings.OfficeOM.L_BindingNotExist = "Navedeno povezivanje ne postoji."; +Strings.OfficeOM.L_Timeout = "Operacija je istekla."; +Strings.OfficeOM.L_SettingsCannotSave = "Nije bilo moguće saÄuvati postavke."; +Strings.OfficeOM.L_InvalidGrant = "Pred-autorizacija nedostaje."; +Strings.OfficeOM.L_EventHandlerNotExist = "Navedeni rukovalac dogaÄ‘aja nije pronaÄ‘en za ovo povezivanje."; +Strings.OfficeOM.L_PropertyDoesNotExist = "Svojstvo „{0}“ ne postoji u objektu."; +Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Aplikacija {0} ne postoji. Microsoft.Office.WebExtension.initialize(razlog) nije pozvan."; +Strings.OfficeOM.L_MemoryLimit = "PremaÅ¡eno je ograniÄenje memorije"; +Strings.OfficeOM.L_DataWriteReminder = "Podsetnik za pisanje podataka"; +Strings.OfficeOM.L_SettingsAreStale = "Nije moguće saÄuvati postavke jer nisu u toku."; +Strings.OfficeOM.L_TooManyIncompleteRequests = "SaÄekajte da se prethodni poziv dovrÅ¡i."; +Strings.OfficeOM.L_BadSelectorString = "Niska koja je prosleÄ‘ena u biraÄ nije u ispravnom formatu ili nije podržan."; +Strings.OfficeOM.L_FileTypeNotSupported = "Navedeni tip datoteke nije podržan."; +Strings.OfficeOM.L_SettingsStaleError = "GreÅ¡ka usled zastarelih postavki"; +Strings.OfficeOM.L_InvalidAPICall = "Nevažeći API poziv"; +Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Argumenti nevažećeg unosa."; +Strings.OfficeOM.L_BindingToMultipleSelection = "Nekontinuirane selekcije nisu podržane."; +Strings.OfficeOM.L_OutOfRange = "Izvan opsega"; +Strings.OfficeOM.L_SetDataParametersConflict = "Navedeni parametri su neusaglaÅ¡eni."; +Strings.OfficeOM.L_HostError = "GreÅ¡ka hosta"; Strings.OfficeOM.L_InvalidBindingError = "GreÅ¡ka nevažećeg povezivanja"; -Strings.OfficeOM.L_CustomXmlNodeNotFound = "Nije pronaÄ‘en navedeni Ävor."; -Strings.OfficeOM.L_DialogInvalidScheme = "URL Å¡ema nije podržana. Koristite HTTPS."; -Strings.OfficeOM.L_OverwriteWorksheetData = "Operacija postavljanja nije uspela zato Å¡to će navedeni objekat podataka zameniti ili premestiti podatke."; +Strings.OfficeOM.L_UserClickIgnore = "Korisnik je odabrao da zanemari dijalog."; +Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Potrebo je da izabrani sadržaj bude u formatu tabele. Oblikujte podatke u vidu tabele i probajte ponovo."; +Strings.OfficeOM.L_CoercionTypeNotSupported = "Navedeni tip promene nije podržan."; +Strings.OfficeOM.L_RunMustReturnPromise = "Paketna funkcija prosleÄ‘ena metodu „.run“ nije vratila obećanje. Funkcija mora da vrati obećanje kako bi automatski praćeni objekti mogli da se objave po dovrÅ¡etku paketne operacije. Obećanje se obiÄno vraća tako Å¡to se vrati odgovor iz poziva „context.sync()“."; +Strings.OfficeOM.L_UnsupportedEnumeration = "Nepodržano nabrajanje"; +Strings.OfficeOM.L_InitializeNotReady = "Office.js joÅ¡ uvek nije potpuno uÄitan. PokuÅ¡ajte ponovo kasnije ili postarajte se da dodate vaÅ¡ kôd za pokretanje na vaÅ¡ Office.initialize function."; +Strings.OfficeOM.L_DialogAddressNotTrusted = "Domen URL adrese nije uvrÅ¡ten u elementu AppDomains u manifestu"; +Strings.OfficeOM.L_InvalidValue = "Nevažeća vrednost"; +Strings.OfficeOM.L_ActivityLimitReached = "Dostignuto je ograniÄenje aktivnosti."; +Strings.OfficeOM.L_OsfControlTypeNotSupported = "OsfControl tip nije podržan."; +Strings.OfficeOM.L_InvalidApiCallInContext = "Nevažeći API poziv u trenutnom kontekstu."; +Strings.OfficeOM.L_InvalidSetRows = "Navedeni redovi su nevažeći."; +Strings.OfficeOM.L_UnsupportedEnumerationMessage = "Nabrajanje nije podržano u trenutnoj aplikaciji hosta."; +Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Navedeni tip promene nije kompatibilan sa ovim tipom povezivanja."; +Strings.OfficeOM.L_UnknownBindingType = "Tip povezivanja nije podržan."; +Strings.OfficeOM.L_UnsupportedDataObject = "Navedeni tip objekta podataka nije podržan."; +Strings.OfficeOM.L_InValidOptionalArgument = "nevažeći opcionalni argument"; +Strings.OfficeOM.L_CustomFunctionDefinitionMissing = "Svojstvo sa ovim imenom koje predstavlja definiciju funkcije mora da postoji u okviru Excel.CustomFunctions."; Strings.OfficeOM.L_PropertyNotLoaded = "Svojstvo „{0}“ nije dostupno. Pre Äitanja vrednosti svojstva, pozovite metod uÄitavanja na sadržanom objektu i pozovite „context.sync()“ na povezanom kontekstu zahteva."; -Strings.OfficeOM.L_NetworkProblem = "Problem sa mrežom"; +Strings.OfficeOM.L_DataWriteError = "GreÅ¡ka u pisanju podataka"; +Strings.OfficeOM.L_InvalidParameters = "Funkcija {0} ima nevažeće parametre."; Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Pozovite closeAsync na trenutnoj datoteci pre preuzimanja druge."; -Strings.OfficeOM.L_UserAbortedMessage = "Korisnik nije prihvatio dozvole za programski dodatak."; -Strings.OfficeOM.L_CustomXmlError = "GreÅ¡ka u prilagoÄ‘enim XML."; -Strings.OfficeOM.L_InvalidDataObject = "Nevažeći objekat podataka"; -Strings.OfficeOM.L_InvalidSetColumns = "Navedene kolone su nevažeće."; -Strings.OfficeOM.L_InValidOptionalArgument = "nevažeći opcionalni argument"; -Strings.OfficeOM.L_InvalidGrantMessage = "Nedostaje odobrenje za ovaj programski dodatak."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Operacija nije uspela zato Å¡to ovaj programski dodatak već zahteva token za pristup."; -Strings.OfficeOM.L_NewWindowCrossZone = "Bezbednosne postavke u pregledaÄu spreÄavaju nas da kreiramo dijalog. PokuÅ¡ajte sa drugim pregledaÄem ili {0} kako bi „{1}“ i domen prikazan na traci adresa bili u istoj bezbednosnoj zoni."; -Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Navedene vrednosti za broj redova ili broj kolona nisu važeće."; -Strings.OfficeOM.L_NotSupportedEventType = "Navedeni tip dogaÄ‘aja {0} nije podržan."; -Strings.OfficeOM.L_InvalidSSOAddinMessage = "API identiteta nije podržan za ovaj programski dodatak."; -Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Operacija nije podržana na ovom tipu povezivanja."; -Strings.OfficeOM.L_SetDataIsTooLarge = "Navedeni objekat podataka je prevelik."; -Strings.OfficeOM.L_EventHandlerNotExist = "Navedeni rukovalac dogaÄ‘aja nije pronaÄ‘en za ovo povezivanje."; -Strings.OfficeOM.L_ConnectionFailureWithStatus = "Zahtev nije uspeo uz statusni kôd {0}."; -Strings.OfficeOM.L_ColIndexOutOfRange = "Vrednost indeksa kolone je izvan dozvoljenog opsega. Koristite vrednost (0 ili veću) koja je manja od broja kolona."; +Strings.OfficeOM.L_CustomFunctionImplementationMissing = "Svojstvo sa ovim imenom koje predstavlja definiciju funkcije u okviru Excel.CustomFunctions mora da sadrži svojstvo „call“ koje primenjuje funkciju."; Strings.OfficeOM.L_GetDataParametersConflict = "Navedeni parametri su neusaglaÅ¡eni."; -Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Aplikacija {0} ne postoji. Microsoft.Office.WebExtension.initialize(razlog) nije pozvan."; -Strings.OfficeOM.L_UserNotSignedIn = "Nijedan korisnik nije prijavljen u Office."; -Strings.OfficeOM.L_ValueNotLoaded = "Vrednost objekta rezultata joÅ¡ nije uÄitana. Pre Äitanja svojstva vrednosti, pozovite „context.sync()“ na povezanom kontekstu zahteva."; -Strings.OfficeOM.L_RowIndexOutOfRange = "Vrednost indeksa reda je izvan dozvoljenog opsega. Koristite vrednost (0 ili veću) koja je manja od broja redova."; -Strings.OfficeOM.L_BindingNotExist = "Navedeno povezivanje ne postoji."; -Strings.OfficeOM.L_InvalidApiCallInContext = "Nevažeći API poziv u trenutnom kontekstu."; -Strings.OfficeOM.L_SettingNameNotExist = "Navedeno ime postavke ne postoji."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Programski dodatak već zahteva token za pristup."; -Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} želi da se prikazuje u novom prozoru."; -Strings.OfficeOM.L_DataNotMatchCoercionType = "Tip navedenog objekta podataka nije kompatibilan sa trenutnom selekcijom."; -Strings.OfficeOM.L_UnsupportedEnumeration = "Nepodržano nabrajanje"; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory = "Ovaj programski dodatak ne podržava pristanak korisnika."; +Strings.OfficeOM.L_DataNotMatchSelection = "Navedeni objekat podataka nije kompatibilan sa oblikom ili dimenzijama trenutne selekcije."; +Strings.OfficeOM.L_SSOClientError = "DoÅ¡lo je do greÅ¡ke u zahtevu za potvrdu identiteta iz sistema Office."; +Strings.OfficeOM.L_GetSelectionNotSupported = "Trenutna selekcija nije podržana."; +Strings.OfficeOM.L_MultipleNamedItemFound = "PronaÄ‘eno je viÅ¡e objekata sa istim imenom."; +Strings.OfficeOM.L_SaveSettingsError = "GreÅ¡ka pri Äuvanju postavki"; +Strings.OfficeOM.L_OverwriteWorksheetData = "Operacija postavljanja nije uspela zato Å¡to će navedeni objekat podataka zameniti ili premestiti podatke."; +Strings.OfficeOM.L_OperationNotSupported = "Operacija nije podržana."; +Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "OgraniÄenja pregledaÄa spreÄila su nas da kreiramo dijalog. Domen dijaloga i domen hosta programskog dodatka nisu u istoj bezbednosnoj zoni."; +Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Operacija nije podržana na ovom tipu povezivanja."; +Strings.OfficeOM.L_SSOConnectionLostErrorMessage = "A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones."; Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Napomena: Predloženo je da broj ćelija u tabeli bude ispod 20.000."; -Strings.OfficeOM.L_SettingsCannotSave = "Nije bilo moguće saÄuvati postavke."; -Strings.OfficeOM.L_IndexOutOfRange = "Indeks je izvan opsega."; -Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = "Nije moguće primeniti promene svojstva „{0}“ putem metoda „object.set“."; -Strings.OfficeOM.L_CoercionTypeNotSupported = "Navedeni tip promene nije podržan."; Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Nije moguće koristiti parametre za koordinaciju sa tabelom tipa promene kada tabela sadrži objedinjene ćelije."; -Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "PokuÅ¡ava se postavljanje svojstva samo za Äitanje „{0}“."; -Strings.OfficeOM.L_ReadSettingsError = "GreÅ¡ka u postavkama Äitanja"; -Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Navedeni tip promene nije kompatibilan sa ovim tipom povezivanja."; -Strings.OfficeOM.L_DialogRequireHTTPS = "HTTP protokol nije podržan. Koristite HTTPS"; -Strings.OfficeOM.L_TooManyArguments = "previÅ¡e argumenata"; -Strings.OfficeOM.L_BadSelectorString = "Niska koja je prosleÄ‘ena u biraÄ nije u ispravnom formatu ili nije podržan."; -Strings.OfficeOM.L_HostError = "GreÅ¡ka hosta"; -Strings.OfficeOM.L_InvalidColumnsForBinding = "Navedene kolone su nevažeće."; -Strings.OfficeOM.L_InvalidSelectionForBindingType = "Nije moguće kreirati povezivanje sa trenutnom selekcijom i navedenim tipom povezivanja."; +Strings.OfficeOM.L_NoCapability = "Nemate dovoljno dozvola za ovu radnju."; +Strings.OfficeOM.L_DialogAlreadyOpened = "Operacija nije uspela zato Å¡to ovaj programski dodatak već ima aktivan dijalog."; +Strings.OfficeOM.L_InvalidReadForBlankRow = "Navedeni red je prazan."; Strings.OfficeOM.L_CannotWriteToSelection = "Upisivanje u trenutnu selekciju nije moguće."; -Strings.OfficeOM.L_DataNotMatchSelection = "Navedeni objekat podataka nije kompatibilan sa oblikom ili dimenzijama trenutne selekcije."; -Strings.OfficeOM.L_InvalidRequestContext = "Nije moguće koristiti objekat u viÅ¡e razliÄitih konteksta zahteva."; -Strings.OfficeOM.L_PermissionDenied = "Dozvola je odbijena"; -Strings.OfficeOM.L_DataNotMatchBindingType = "Navedeni objekat podataka nije kompatibilan sa tipom povezivanja."; -Strings.OfficeOM.L_InvalidArgumentGeneric = "Argumenti prosleÄ‘eni u funkciju ne funkcioniÅ¡u u ovoj situaciji, nedostaju ili nisu u odgovarajućem formatu."; -Strings.OfficeOM.L_TooManyOptionalObjects = "viÅ¡estruki opcionalni objekti na listi parametara"; -Strings.OfficeOM.L_NotImplemented = "Funkcija {0} nije primenjena."; -Strings.OfficeOM.L_InvalidResourceUrlMessage = "U manifestu je navedena nevažeća URL adresa resursa."; -Strings.OfficeOM.L_InitializeNotReady = "Office.js joÅ¡ uvek nije potpuno uÄitan. PokuÅ¡ajte ponovo kasnije ili postarajte se da dodate vaÅ¡ kôd za pokretanje na vaÅ¡ Office.initialize function."; -Strings.OfficeOM.L_DataNotMatchBindingSize = "Navedeni objekat podataka ne podudara se sa veliÄinom trenutne selekcije."; -Strings.OfficeOM.L_SettingsStaleError = "GreÅ¡ka usled zastarelih postavki"; -Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Navedeni tip povezivanja nije kompatibilan sa navedenom imenovanom stavkom."; -Strings.OfficeOM.L_GetDataIsTooLarge = "Zahtevani skup podataka je prevelik."; -Strings.OfficeOM.L_InvalidValue = "Nevažeća vrednost"; +Strings.OfficeOM.L_RowIndexOutOfRange = "Vrednost indeksa reda je izvan dozvoljenog opsega. Koristite vrednost (0 ili veću) koja je manja od broja redova."; +Strings.OfficeOM.L_ConnectionFailureWithDetails = "Zahtev nije uspeo uz statusni kôd {0}, kôd greÅ¡ke {1} i sledeću poruku o greÅ¡ci: {2}"; +Strings.OfficeOM.L_DialogNavigateError = "GreÅ¡ka prilikom navigacije u dijalogu"; Strings.OfficeOM.L_NavOutOfBound = "Operacija nije uspela zato Å¡to je indeks izvan opsega."; -Strings.OfficeOM.L_SetDataParametersConflict = "Navedeni parametri su neusaglaÅ¡eni."; -Strings.OfficeOM.L_ElementMissing = "Nismo mogli da oblikujemo ćeliju tabele zato Å¡to nedostaju neke vrednosti parametara. Proverite parametre joÅ¡ jednom i probajte ponovo."; -Strings.OfficeOM.L_TooManyIncompleteRequests = "SaÄekajte da se prethodni poziv dovrÅ¡i."; -Strings.OfficeOM.L_RunMustReturnPromise = "Paketna funkcija prosleÄ‘ena metodu „.run“ nije vratila obećanje. Funkcija mora da vrati obećanje kako bi automatski praćeni objekti mogli da se objave po dovrÅ¡etku paketne operacije. Obećanje se obiÄno vraća tako Å¡to se vrati odgovor iz poziva „context.sync()“."; -Strings.OfficeOM.L_UnsupportedEnumerationMessage = "Nabrajanje nije podržano u trenutnoj aplikaciji hosta."; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage = "Operacija nije uspela zato Å¡to ovaj programski dodatak ne podržava pristanak korisnika u ovoj kategoriji"; Strings.OfficeOM.L_DataReadError = "GreÅ¡ka u Äitanju podataka"; -Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Nije moguće koristiti parametre za koordinaciju sa tabelom tipa promene kada tabela sadrži objedinjene ćelije."; -Strings.OfficeOM.L_CallbackNotAFunction = "Povratni poziv mora biti funkcija tipa, bila je tipa {0}."; -Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Trenutna selekcija nije kompatibilna sa navedenim tipom promene."; -Strings.OfficeOM.L_CannotRegisterEvent = "Nije moguće registrovati rukovalac dogaÄ‘ajem."; -Strings.OfficeOM.L_DialogNavigateError = "GreÅ¡ka prilikom navigacije u dijalogu"; -Strings.OfficeOM.L_SSOServerErrorMessage = "DoÅ¡lo je do neoÄekivane greÅ¡ke na serveru."; -Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Dostignuto je ograniÄenje izbora"; -Strings.OfficeOM.L_InternalError = "UnutraÅ¡nja greÅ¡ka"; -Strings.OfficeOM.L_InvalidCoercion = "Nevažeći tip promene"; +Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Programski dodatak već zahteva token za pristup."; +Strings.OfficeOM.L_InvalidArgument = "Argument „{0}“ ne funkcioniÅ¡e u ovoj situaciji, nedostaje ili nije u odgovarajućem formatu."; +Strings.OfficeOM.L_EventRegistrationError = "GreÅ¡ka pri registraciji dogaÄ‘aja"; +Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} želi da se prikazuje u novom prozoru."; +Strings.OfficeOM.L_NotImplemented = "Funkcija {0} nije primenjena."; +Strings.OfficeOM.L_ReadSettingsError = "GreÅ¡ka u postavkama Äitanja"; +Strings.OfficeOM.L_SelectionCannotBound = "Nije moguće izvrÅ¡iti povezivanje sa trenutnom selekcijom."; Strings.OfficeOM.L_InvalidCellsValue = "Neki parametri ćelije imaju vrednosti koje nisu dozvoljene. Proverite vrednosti joÅ¡ jednom i probajte ponovo."; -Strings.OfficeOM.L_Timeout = "Operacija je istekla."; -Strings.OfficeOM.L_InvalidNode = "Nevažeći Ävor"; -Strings.OfficeOM.L_ActivityLimitReached = "Dostignuto je ograniÄenje aktivnosti."; -Strings.OfficeOM.L_GetSelectionNotSupported = "Trenutna selekcija nije podržana."; -Strings.OfficeOM.L_InvalidOrTimedOutSession = "Nevažeća ili istekla sesija"; -Strings.OfficeOM.L_AppNameNotExist = "Ime programskog dodatka za {0} ne postoji."; -Strings.OfficeOM.L_PropertyDoesNotExist = "Svojstvo „{0}“ ne postoji u objektu."; -Strings.OfficeOM.L_InvalidTableOptionValue = "Neki tableOptions parametri imaju vrednosti koje nisu dozvoljene. Proverite vrednosti joÅ¡ jednom i probajte ponovo."; -Strings.OfficeOM.L_EventHandlerAdditionFailed = "Dodavanje rukovaoca dogaÄ‘ajem nije uspelo."; -Strings.OfficeOM.L_OutOfRange = "Izvan opsega"; -Strings.OfficeOM.L_BindingCreationError = "GreÅ¡ka u stvaranju povezivanja"; -Strings.OfficeOM.L_InvalidSetStartRowColumn = "Navedene vrednosti za poÄetni red ili poÄetnu kolonu nisu važeće."; -Strings.OfficeOM.L_FormatValueOutOfRange = "Vrednost je izvan dozvoljenog opsega."; -Strings.OfficeOM.L_InvalidResourceUrl = "ObezbeÄ‘ena je nevažeća URL adresa resursa aplikacije."; -Strings.OfficeOM.L_ConnectionFailureWithDetails = "Zahtev nije uspeo uz statusni kôd {0}, kôd greÅ¡ke {1} i sledeću poruku o greÅ¡ci: {2}"; +Strings.OfficeOM.L_InternalError = "UnutraÅ¡nja greÅ¡ka"; +Strings.OfficeOM.L_SetDataIsTooLarge = "Navedeni objekat podataka je prevelik."; Strings.OfficeOM.L_InternalErrorDescription = "DoÅ¡lo je do unutraÅ¡nje greÅ¡ke."; -Strings.OfficeOM.L_NoCapability = "Nemate dovoljno dozvola za ovu radnju."; +Strings.OfficeOM.L_ElementMissing = "Nismo mogli da oblikujemo ćeliju tabele zato Å¡to nedostaju neke vrednosti parametara. Proverite parametre joÅ¡ jednom i probajte ponovo."; Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Tip identiteta korisnika nije podržan."; -Strings.OfficeOM.L_SpecifiedIdNotExist = "Navedeni ID ne postoji."; -Strings.OfficeOM.L_UserClickIgnore = "Korisnik je odabrao da zanemari dijalog."; -Strings.OfficeOM.L_UnsupportedUserIdentity = "Tip identiteta korisnika nije podržan."; -Strings.OfficeOM.L_SettingsAreStale = "Nije moguće saÄuvati postavke jer nisu u toku."; -Strings.OfficeOM.L_InvalidFormatValue = "Neki parametri formata imaju vrednosti koje nisu dozvoljene. Proverite vrednosti joÅ¡ jednom i probajte ponovo."; -Strings.OfficeOM.L_InvalidGetStartRowColumn = "Navedene vrednosti za poÄetni red ili poÄetnu kolonu nisu važeće." +Strings.OfficeOM.L_IndexOutOfRange = "Indeks je izvan opsega."; +Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath ograniÄava izbor na 1024 stavke."; +Strings.OfficeOM.L_DocumentReadOnly = "Zahtevana operacija nije dozvoljena u trenutnom režimu dokumenta."; +Strings.OfficeOM.L_NamedItemNotFound = "Imenovana stavka ne postoji."; +Strings.OfficeOM.L_InvalidNode = "Nevažeći Ävor"; +Strings.OfficeOM.L_ShuttingDown = "Operacija nije uspela zato Å¡to podaci na serveru nisu u toku."; +Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "konfiguriÅ¡ite pregledaÄ"; +Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Dozvoli"; +Strings.OfficeOM.L_InvalidRequestContext = "Nije moguće koristiti objekat u viÅ¡e razliÄitih konteksta zahteva."; +Strings.OfficeOM.L_EventHandlerRemovalFailed = "Uklanjanje rukovaoca dogaÄ‘ajem nije uspelo."; +Strings.OfficeOM.L_InvalidGetStartRowColumn = "Navedene vrednosti za poÄetni red ili poÄetnu kolonu nisu važeće."; +Strings.OfficeOM.L_DialogRequireHTTPS = "HTTP protokol nije podržan. Koristite HTTPS"; +Strings.OfficeOM.L_InvalidArgumentGeneric = "Argumenti prosleÄ‘eni u funkciju ne funkcioniÅ¡u u ovoj situaciji, nedostaju ili nisu u odgovarajućem formatu."; +Strings.OfficeOM.L_InvalidSetStartRowColumn = "Navedene vrednosti za poÄetni red ili poÄetnu kolonu nisu važeće."; +Strings.OfficeOM.L_ValueNotLoaded = "Vrednost objekta rezultata joÅ¡ nije uÄitana. Pre Äitanja svojstva vrednosti, pozovite „context.sync()“ na povezanom kontekstu zahteva."; +Strings.OfficeOM.L_NetworkProblem = "Problem sa mrežom"; +Strings.OfficeOM.L_InvalidBinding = "Nevažeće povezivanje"; +Strings.OfficeOM.L_PermissionDenied = "Dozvola je odbijena"; +Strings.OfficeOM.L_InvalidBindingOperation = "Operacija nevažećeg povezivanja"; +Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Navedene vrednosti za broj redova ili broj kolona nisu važeće."; +Strings.OfficeOM.L_CustomXmlNodeNotFound = "Nije pronaÄ‘en navedeni Ävor." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/sr-latn-rs/office_strings.js b/node_modules/@microsoft/office-js/dist/sr-latn-rs/office_strings.js index eed0e59..d88fe56 100644 --- a/node_modules/@microsoft/office-js/dist/sr-latn-rs/office_strings.js +++ b/node_modules/@microsoft/office-js/dist/sr-latn-rs/office_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_EventHandlerRemovalFailed="Uklanjanje rukovaoca dogaÄ‘ajem nije uspelo.";Strings.OfficeOM.L_InvalidGrant="Pred-autorizacija nedostaje.";Strings.OfficeOM.L_RequestTimeout="IzvrÅ¡avanje poziva je predugo trajalo.";Strings.OfficeOM.L_InvalidGetRows="Navedeni redovi su nevažeći.";Strings.OfficeOM.L_SliceSizeNotSupported="Navedena veliÄina iseÄka nije podržana.";Strings.OfficeOM.L_SSOClientErrorMessage="DoÅ¡lo je do neoÄekivane greÅ¡ke u klijentu.";Strings.OfficeOM.L_SaveSettingsError="GreÅ¡ka pri Äuvanju postavki";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Mrežni problem je spreÄio preuzimanje datoteke.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="VaÅ¡a Office Online sesija je istekla ili je nevažeća. Osvežite stranicu da biste nastavili.";Strings.OfficeOM.L_InvalidGetColumns="Navedene kolone su nevažeće.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="konfiguriÅ¡ite pregledaÄ";Strings.OfficeOM.L_InvalidBinding="Nevažeće povezivanje";Strings.OfficeOM.L_NotSupportedBindingType="Navedeni tip povezivanja {0} nije podržan.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Podaci nisu aktuelni";Strings.OfficeOM.L_InvalidArgument="Argument „{0}“ ne funkcioniÅ¡e u ovoj situaciji, nedostaje ili nije u odgovarajućem formatu.";Strings.OfficeOM.L_RequestTokenUnavailable="Ovaj API je ograniÄen da bi se usporila uÄestalost poziva.";Strings.OfficeOM.L_EventRegistrationError="GreÅ¡ka pri registraciji dogaÄ‘aja";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Napravite selekciju.";Strings.OfficeOM.L_MultipleNamedItemFound="PronaÄ‘eno je viÅ¡e objekata sa istim imenom.";Strings.OfficeOM.L_TooManyOptionalFunction="viÅ¡estruke opcionalne funkcije na listi parametara";Strings.OfficeOM.L_DataWriteReminder="Podsetnik za pisanje podataka";Strings.OfficeOM.L_DataStale="Podaci nisu u toku";Strings.OfficeOM.L_UnknownBindingType="Tip povezivanja nije podržan.";Strings.OfficeOM.L_DocumentReadOnly="Zahtevana operacija nije dozvoljena u trenutnom režimu dokumenta.";Strings.OfficeOM.L_BindingToMultipleSelection="Nekontinuirane selekcije nisu podržane.";Strings.OfficeOM.L_APICallFailed="API poziv nije uspeo";Strings.OfficeOM.L_OperationNotSupported="Operacija nije podržana.";Strings.OfficeOM.L_InvalidParameters="Funkcija {0} ima nevažeće parametre.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Potrebo je da izabrani sadržaj bude u formatu tabele. Oblikujte podatke u vidu tabele i probajte ponovo.";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Argumenti nevažećeg unosa.";Strings.OfficeOM.L_DialogAlreadyOpened="Operacija nije uspela zato Å¡to ovaj programski dodatak već ima aktivan dijalog.";Strings.OfficeOM.L_DataWriteError="GreÅ¡ka u pisanju podataka";Strings.OfficeOM.L_BrowserAPINotSupported="Ovaj pregledaÄ ne podržava zahtevani API.";Strings.OfficeOM.L_InvalidObjectPath="Putanja objekta „{0}“ ne funkcioniÅ¡e za ono Å¡to pokuÅ¡avate da uradite. Ako objekat koristite u viÅ¡e „context.sync“ poziva i izvan sekvencijalnog izvrÅ¡avanja grupe „.run“, koristite metode „context.trackedObjects.add()“ i „context.trackedObjects.remove()“ da biste upravljali trajanjem objekta.";Strings.OfficeOM.L_FileTypeNotSupported="Navedeni tip datoteke nije podržan.";Strings.OfficeOM.L_MemoryLimit="PremaÅ¡eno je ograniÄenje memorije";Strings.OfficeOM.L_InvalidFormat="GreÅ¡ka nevažećeg formata";Strings.OfficeOM.L_SelectionCannotBound="Nije moguće izvrÅ¡iti povezivanje sa trenutnom selekcijom.";Strings.OfficeOM.L_InvalidSetRows="Navedeni redovi su nevažeći.";Strings.OfficeOM.L_NotSupported="Funkcija {0} nije podržana.";Strings.OfficeOM.L_NamedItemNotFound="Imenovana stavka ne postoji.";Strings.OfficeOM.L_MissingParameter="Parametar nedostaje";Strings.OfficeOM.L_SSOServerError="DoÅ¡lo je do greÅ¡ke u dobavljaÄu usluge potvrde identiteta.";Strings.OfficeOM.L_SSOClientError="DoÅ¡lo je do greÅ¡ke u zahtevu za potvrdu identiteta iz sistema Office.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="OgraniÄenja pregledaÄa spreÄila su nas da kreiramo dijalog. Domen dijaloga i domen hosta programskog dodatka nisu u istoj bezbednosnoj zoni.";Strings.OfficeOM.L_InvalidAPICall="Nevažeći API poziv";Strings.OfficeOM.L_UserAborted="Korisnik je obustavio zahtev za odobrenje.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Podaci su zastareli. Preuzmite objekat ponovo.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Napomena: Predloženo je da skupovi oblikovanja koje je postavio poziv API oblikovanja budu ispod 100.";Strings.OfficeOM.L_DialogOK="U redu";Strings.OfficeOM.L_DialogAddressNotTrusted="Domen URL adrese nije uvrÅ¡ten u elementu AppDomains u manifestu";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath ograniÄava izbor na 1024 stavke.";Strings.OfficeOM.L_MissingRequiredArguments="nedostaju neki neophodni argumenti";Strings.OfficeOM.L_InvalidDataFormat="Format navedenog objekta podataka nije važeći.";Strings.OfficeOM.L_ShuttingDown="Operacija nije uspela zato Å¡to podaci na serveru nisu u toku.";Strings.OfficeOM.L_InvalidReadForBlankRow="Navedeni red je prazan.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Dozvoli";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Zanemari";Strings.OfficeOM.L_APINotSupported="API nije podržan";Strings.OfficeOM.L_FormattingReminder="Podsetnik za oblikovanje";Strings.OfficeOM.L_FunctionCallFailed="Poziv funkcije {0} nije uspeo, kod greÅ¡ke: {1}.";Strings.OfficeOM.L_RedundantCallbackSpecification="Povratni poziv ne može biti naveden i u listi argumenata i u opcionalnom objektu.";Strings.OfficeOM.L_UnsupportedDataObject="Navedeni tip objekta podataka nije podržan.";Strings.OfficeOM.L_OsfControlTypeNotSupported="OsfControl tip nije podržan.";Strings.OfficeOM.L_InvalidBindingOperation="Operacija nevažećeg povezivanja";Strings.OfficeOM.L_CannotNavigateTo="Objekat se nalazi na lokaciji na kojoj navigacija nije podržana.";Strings.OfficeOM.L_DisplayDialogError="GreÅ¡ka u prikazu dijaloga";Strings.OfficeOM.L_InvalidBindingError="GreÅ¡ka nevažećeg povezivanja";Strings.OfficeOM.L_CustomXmlNodeNotFound="Nije pronaÄ‘en navedeni Ävor.";Strings.OfficeOM.L_DialogInvalidScheme="URL Å¡ema nije podržana. Koristite HTTPS.";Strings.OfficeOM.L_OverwriteWorksheetData="Operacija postavljanja nije uspela zato Å¡to će navedeni objekat podataka zameniti ili premestiti podatke.";Strings.OfficeOM.L_PropertyNotLoaded="Svojstvo „{0}“ nije dostupno. Pre Äitanja vrednosti svojstva, pozovite metod uÄitavanja na sadržanom objektu i pozovite „context.sync()“ na povezanom kontekstu zahteva.";Strings.OfficeOM.L_NetworkProblem="Problem sa mrežom";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Pozovite closeAsync na trenutnoj datoteci pre preuzimanja druge.";Strings.OfficeOM.L_UserAbortedMessage="Korisnik nije prihvatio dozvole za programski dodatak.";Strings.OfficeOM.L_CustomXmlError="GreÅ¡ka u prilagoÄ‘enim XML.";Strings.OfficeOM.L_InvalidDataObject="Nevažeći objekat podataka";Strings.OfficeOM.L_InvalidSetColumns="Navedene kolone su nevažeće.";Strings.OfficeOM.L_InValidOptionalArgument="nevažeći opcionalni argument";Strings.OfficeOM.L_InvalidGrantMessage="Nedostaje odobrenje za ovaj programski dodatak.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Operacija nije uspela zato Å¡to ovaj programski dodatak već zahteva token za pristup.";Strings.OfficeOM.L_NewWindowCrossZone="Bezbednosne postavke u pregledaÄu spreÄavaju nas da kreiramo dijalog. PokuÅ¡ajte sa drugim pregledaÄem ili {0} kako bi „{1}“ i domen prikazan na traci adresa bili u istoj bezbednosnoj zoni.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Navedene vrednosti za broj redova ili broj kolona nisu važeće.";Strings.OfficeOM.L_NotSupportedEventType="Navedeni tip dogaÄ‘aja {0} nije podržan.";Strings.OfficeOM.L_InvalidSSOAddinMessage="API identiteta nije podržan za ovaj programski dodatak.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Operacija nije podržana na ovom tipu povezivanja.";Strings.OfficeOM.L_SetDataIsTooLarge="Navedeni objekat podataka je prevelik.";Strings.OfficeOM.L_EventHandlerNotExist="Navedeni rukovalac dogaÄ‘aja nije pronaÄ‘en za ovo povezivanje.";Strings.OfficeOM.L_ConnectionFailureWithStatus="Zahtev nije uspeo uz statusni kôd {0}.";Strings.OfficeOM.L_ColIndexOutOfRange="Vrednost indeksa kolone je izvan dozvoljenog opsega. Koristite vrednost (0 ili veću) koja je manja od broja kolona.";Strings.OfficeOM.L_GetDataParametersConflict="Navedeni parametri su neusaglaÅ¡eni.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Aplikacija {0} ne postoji. Microsoft.Office.WebExtension.initialize(razlog) nije pozvan.";Strings.OfficeOM.L_UserNotSignedIn="Nijedan korisnik nije prijavljen u Office.";Strings.OfficeOM.L_ValueNotLoaded="Vrednost objekta rezultata joÅ¡ nije uÄitana. Pre Äitanja svojstva vrednosti, pozovite „context.sync()“ na povezanom kontekstu zahteva.";Strings.OfficeOM.L_RowIndexOutOfRange="Vrednost indeksa reda je izvan dozvoljenog opsega. Koristite vrednost (0 ili veću) koja je manja od broja redova.";Strings.OfficeOM.L_BindingNotExist="Navedeno povezivanje ne postoji.";Strings.OfficeOM.L_InvalidApiCallInContext="Nevažeći API poziv u trenutnom kontekstu.";Strings.OfficeOM.L_SettingNameNotExist="Navedeno ime postavke ne postoji.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Programski dodatak već zahteva token za pristup.";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} želi da se prikazuje u novom prozoru.";Strings.OfficeOM.L_DataNotMatchCoercionType="Tip navedenog objekta podataka nije kompatibilan sa trenutnom selekcijom.";Strings.OfficeOM.L_UnsupportedEnumeration="Nepodržano nabrajanje";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Napomena: Predloženo je da broj ćelija u tabeli bude ispod 20.000.";Strings.OfficeOM.L_SettingsCannotSave="Nije bilo moguće saÄuvati postavke.";Strings.OfficeOM.L_IndexOutOfRange="Indeks je izvan opsega.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="Nije moguće primeniti promene svojstva „{0}“ putem metoda „object.set“.";Strings.OfficeOM.L_CoercionTypeNotSupported="Navedeni tip promene nije podržan.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Nije moguće koristiti parametre za koordinaciju sa tabelom tipa promene kada tabela sadrži objedinjene ćelije.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="PokuÅ¡ava se postavljanje svojstva samo za Äitanje „{0}“.";Strings.OfficeOM.L_ReadSettingsError="GreÅ¡ka u postavkama Äitanja";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Navedeni tip promene nije kompatibilan sa ovim tipom povezivanja.";Strings.OfficeOM.L_DialogRequireHTTPS="HTTP protokol nije podržan. Koristite HTTPS";Strings.OfficeOM.L_TooManyArguments="previÅ¡e argumenata";Strings.OfficeOM.L_BadSelectorString="Niska koja je prosleÄ‘ena u biraÄ nije u ispravnom formatu ili nije podržan.";Strings.OfficeOM.L_HostError="GreÅ¡ka hosta";Strings.OfficeOM.L_InvalidColumnsForBinding="Navedene kolone su nevažeće.";Strings.OfficeOM.L_InvalidSelectionForBindingType="Nije moguće kreirati povezivanje sa trenutnom selekcijom i navedenim tipom povezivanja.";Strings.OfficeOM.L_CannotWriteToSelection="Upisivanje u trenutnu selekciju nije moguće.";Strings.OfficeOM.L_DataNotMatchSelection="Navedeni objekat podataka nije kompatibilan sa oblikom ili dimenzijama trenutne selekcije.";Strings.OfficeOM.L_InvalidRequestContext="Nije moguće koristiti objekat u viÅ¡e razliÄitih konteksta zahteva.";Strings.OfficeOM.L_PermissionDenied="Dozvola je odbijena";Strings.OfficeOM.L_DataNotMatchBindingType="Navedeni objekat podataka nije kompatibilan sa tipom povezivanja.";Strings.OfficeOM.L_InvalidArgumentGeneric="Argumenti prosleÄ‘eni u funkciju ne funkcioniÅ¡u u ovoj situaciji, nedostaju ili nisu u odgovarajućem formatu.";Strings.OfficeOM.L_TooManyOptionalObjects="viÅ¡estruki opcionalni objekti na listi parametara";Strings.OfficeOM.L_NotImplemented="Funkcija {0} nije primenjena.";Strings.OfficeOM.L_InvalidResourceUrlMessage="U manifestu je navedena nevažeća URL adresa resursa.";Strings.OfficeOM.L_InitializeNotReady="Office.js joÅ¡ uvek nije potpuno uÄitan. PokuÅ¡ajte ponovo kasnije ili postarajte se da dodate vaÅ¡ kôd za pokretanje na vaÅ¡ Office.initialize function.";Strings.OfficeOM.L_DataNotMatchBindingSize="Navedeni objekat podataka ne podudara se sa veliÄinom trenutne selekcije.";Strings.OfficeOM.L_SettingsStaleError="GreÅ¡ka usled zastarelih postavki";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Navedeni tip povezivanja nije kompatibilan sa navedenom imenovanom stavkom.";Strings.OfficeOM.L_GetDataIsTooLarge="Zahtevani skup podataka je prevelik.";Strings.OfficeOM.L_InvalidValue="Nevažeća vrednost";Strings.OfficeOM.L_NavOutOfBound="Operacija nije uspela zato Å¡to je indeks izvan opsega.";Strings.OfficeOM.L_SetDataParametersConflict="Navedeni parametri su neusaglaÅ¡eni.";Strings.OfficeOM.L_ElementMissing="Nismo mogli da oblikujemo ćeliju tabele zato Å¡to nedostaju neke vrednosti parametara. Proverite parametre joÅ¡ jednom i probajte ponovo.";Strings.OfficeOM.L_TooManyIncompleteRequests="SaÄekajte da se prethodni poziv dovrÅ¡i.";Strings.OfficeOM.L_RunMustReturnPromise="Paketna funkcija prosleÄ‘ena metodu „.run“ nije vratila obećanje. Funkcija mora da vrati obećanje kako bi automatski praćeni objekti mogli da se objave po dovrÅ¡etku paketne operacije. Obećanje se obiÄno vraća tako Å¡to se vrati odgovor iz poziva „context.sync()“.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="Nabrajanje nije podržano u trenutnoj aplikaciji hosta.";Strings.OfficeOM.L_DataReadError="GreÅ¡ka u Äitanju podataka";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Nije moguće koristiti parametre za koordinaciju sa tabelom tipa promene kada tabela sadrži objedinjene ćelije.";Strings.OfficeOM.L_CallbackNotAFunction="Povratni poziv mora biti funkcija tipa, bila je tipa {0}.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Trenutna selekcija nije kompatibilna sa navedenim tipom promene.";Strings.OfficeOM.L_CannotRegisterEvent="Nije moguće registrovati rukovalac dogaÄ‘ajem.";Strings.OfficeOM.L_DialogNavigateError="GreÅ¡ka prilikom navigacije u dijalogu";Strings.OfficeOM.L_SSOServerErrorMessage="DoÅ¡lo je do neoÄekivane greÅ¡ke na serveru.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Dostignuto je ograniÄenje izbora";Strings.OfficeOM.L_InternalError="UnutraÅ¡nja greÅ¡ka";Strings.OfficeOM.L_InvalidCoercion="Nevažeći tip promene";Strings.OfficeOM.L_InvalidCellsValue="Neki parametri ćelije imaju vrednosti koje nisu dozvoljene. Proverite vrednosti joÅ¡ jednom i probajte ponovo.";Strings.OfficeOM.L_Timeout="Operacija je istekla.";Strings.OfficeOM.L_InvalidNode="Nevažeći Ävor";Strings.OfficeOM.L_ActivityLimitReached="Dostignuto je ograniÄenje aktivnosti.";Strings.OfficeOM.L_GetSelectionNotSupported="Trenutna selekcija nije podržana.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Nevažeća ili istekla sesija";Strings.OfficeOM.L_AppNameNotExist="Ime programskog dodatka za {0} ne postoji.";Strings.OfficeOM.L_PropertyDoesNotExist="Svojstvo „{0}“ ne postoji u objektu.";Strings.OfficeOM.L_InvalidTableOptionValue="Neki tableOptions parametri imaju vrednosti koje nisu dozvoljene. Proverite vrednosti joÅ¡ jednom i probajte ponovo.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Dodavanje rukovaoca dogaÄ‘ajem nije uspelo.";Strings.OfficeOM.L_OutOfRange="Izvan opsega";Strings.OfficeOM.L_BindingCreationError="GreÅ¡ka u stvaranju povezivanja";Strings.OfficeOM.L_InvalidSetStartRowColumn="Navedene vrednosti za poÄetni red ili poÄetnu kolonu nisu važeće.";Strings.OfficeOM.L_FormatValueOutOfRange="Vrednost je izvan dozvoljenog opsega.";Strings.OfficeOM.L_InvalidResourceUrl="ObezbeÄ‘ena je nevažeća URL adresa resursa aplikacije.";Strings.OfficeOM.L_ConnectionFailureWithDetails="Zahtev nije uspeo uz statusni kôd {0}, kôd greÅ¡ke {1} i sledeću poruku o greÅ¡ci: {2}";Strings.OfficeOM.L_InternalErrorDescription="DoÅ¡lo je do unutraÅ¡nje greÅ¡ke.";Strings.OfficeOM.L_NoCapability="Nemate dovoljno dozvola za ovu radnju.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Tip identiteta korisnika nije podržan.";Strings.OfficeOM.L_SpecifiedIdNotExist="Navedeni ID ne postoji.";Strings.OfficeOM.L_UserClickIgnore="Korisnik je odabrao da zanemari dijalog.";Strings.OfficeOM.L_UnsupportedUserIdentity="Tip identiteta korisnika nije podržan.";Strings.OfficeOM.L_SettingsAreStale="Nije moguće saÄuvati postavke jer nisu u toku.";Strings.OfficeOM.L_InvalidFormatValue="Neki parametri formata imaju vrednosti koje nisu dozvoljene. Proverite vrednosti joÅ¡ jednom i probajte ponovo.";Strings.OfficeOM.L_InvalidGetStartRowColumn="Navedene vrednosti za poÄetni red ili poÄetnu kolonu nisu važeće." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_NotSupportedEventType="Navedeni tip dogaÄ‘aja {0} nije podržan.";Strings.OfficeOM.L_TooManyOptionalObjects="viÅ¡estruki opcionalni objekti na listi parametara";Strings.OfficeOM.L_DataNotMatchBindingSize="Navedeni objekat podataka ne podudara se sa veliÄinom trenutne selekcije.";Strings.OfficeOM.L_SSOClientErrorMessage="DoÅ¡lo je do neoÄekivane greÅ¡ke u klijentu.";Strings.OfficeOM.L_DialogInvalidScheme="URL Å¡ema nije podržana. Koristite HTTPS.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Nije moguće koristiti parametre za koordinaciju sa tabelom tipa promene kada tabela sadrži objedinjene ćelije.";Strings.OfficeOM.L_InvalidObjectPath="Putanja objekta „{0}“ ne funkcioniÅ¡e za ono Å¡to pokuÅ¡avate da uradite. Ako objekat koristite u viÅ¡e „context.sync“ poziva i izvan sekvencijalnog izvrÅ¡avanja grupe „.run“, koristite metode „context.trackedObjects.add()“ i „context.trackedObjects.remove()“ da biste upravljali trajanjem objekta.";Strings.OfficeOM.L_FormatValueOutOfRange="Vrednost je izvan dozvoljenog opsega.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Dostignuto je ograniÄenje izbora";Strings.OfficeOM.L_InvalidOperationInCellEditMode="Excel je u režimu ureÄ‘ivanja ćelija. IzaÄ‘ite iz režima ureÄ‘ivanja tako Å¡to ćete pritisnuti ENTER ili TAB odnosno izabrati drugu ćeliju, a zatim pokuÅ¡ajte ponovo.";Strings.OfficeOM.L_ConnectionFailureWithStatus="Zahtev nije uspeo uz statusni kôd {0}.";Strings.OfficeOM.L_InvalidFormatValue="Neki parametri formata imaju vrednosti koje nisu dozvoljene. Proverite vrednosti joÅ¡ jednom i probajte ponovo.";Strings.OfficeOM.L_UserAborted="Korisnik je obustavio zahtev za odobrenje.";Strings.OfficeOM.L_RequestTimeout="IzvrÅ¡avanje poziva je predugo trajalo.";Strings.OfficeOM.L_CustomFunctionNameContainsBadChars="Ime funkcije može da sadrži samo slova, cifre, podvlake i taÄke.";Strings.OfficeOM.L_SpecifiedIdNotExist="Navedeni ID ne postoji.";Strings.OfficeOM.L_InvalidDataObject="Nevažeći objekat podataka";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Navedeni tip povezivanja nije kompatibilan sa navedenom imenovanom stavkom.";Strings.OfficeOM.L_DataNotMatchBindingType="Navedeni objekat podataka nije kompatibilan sa tipom povezivanja.";Strings.OfficeOM.L_CustomXmlError="GreÅ¡ka u prilagoÄ‘enim XML.";Strings.OfficeOM.L_InvalidFormat="GreÅ¡ka nevažećeg formata";Strings.OfficeOM.L_InvalidGetRows="Navedeni redovi su nevažeći.";Strings.OfficeOM.L_AppNameNotExist="Ime programskog dodatka za {0} ne postoji.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Dodavanje rukovaoca dogaÄ‘ajem nije uspelo.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Mrežni problem je spreÄio preuzimanje datoteke.";Strings.OfficeOM.L_CannotRegisterEvent="Nije moguće registrovati rukovalac dogaÄ‘ajem.";Strings.OfficeOM.L_InvalidResourceUrl="ObezbeÄ‘ena je nevažeća URL adresa resursa aplikacije.";Strings.OfficeOM.L_MissingRequiredArguments="nedostaju neki neophodni argumenti";Strings.OfficeOM.L_InvalidColumnsForBinding="Navedene kolone su nevažeće.";Strings.OfficeOM.L_FormattingReminder="Podsetnik za oblikovanje";Strings.OfficeOM.L_DisplayDialogError="GreÅ¡ka u prikazu dijaloga";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Zanemari";Strings.OfficeOM.L_CallbackNotAFunction="Povratni poziv mora biti funkcija tipa, bila je tipa {0}.";Strings.OfficeOM.L_InvalidGetColumns="Navedene kolone su nevažeće.";Strings.OfficeOM.L_UnsupportedUserIdentity="Tip identiteta korisnika nije podržan.";Strings.OfficeOM.L_InvalidTableOptionValue="Neki tableOptions parametri imaju vrednosti koje nisu dozvoljene. Proverite vrednosti joÅ¡ jednom i probajte ponovo.";Strings.OfficeOM.L_NotSupported="Funkcija {0} nije podržana.";Strings.OfficeOM.L_InvalidCoercion="Nevažeći tip promene";Strings.OfficeOM.L_ColIndexOutOfRange="Vrednost indeksa kolone je izvan dozvoljenog opsega. Koristite vrednost (0 ili veću) koja je manja od broja kolona.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Operacija nije uspela zato Å¡to ovaj programski dodatak već zahteva token za pristup.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="VaÅ¡a Office Online sesija je istekla ili je nevažeća. Osvežite stranicu da biste nastavili.";Strings.OfficeOM.L_InvalidSSOAddinMessage="API identiteta nije podržan za ovaj programski dodatak.";Strings.OfficeOM.L_TooManyArguments="previÅ¡e argumenata";Strings.OfficeOM.L_InvalidResourceUrlMessage="U manifestu je navedena nevažeća URL adresa resursa.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Podaci nisu aktuelni";Strings.OfficeOM.L_CannotNavigateTo="Objekat se nalazi na lokaciji na kojoj navigacija nije podržana.";Strings.OfficeOM.L_UserAbortedMessage="Korisnik nije prihvatio dozvole za programski dodatak.";Strings.OfficeOM.L_DialogOK="U redu";Strings.OfficeOM.L_SSOServerError="DoÅ¡lo je do greÅ¡ke u dobavljaÄu usluge potvrde identiteta.";Strings.OfficeOM.L_RedundantCallbackSpecification="Povratni poziv ne može biti naveden i u listi argumenata i u opcionalnom objektu.";Strings.OfficeOM.L_InvalidDataFormat="Format navedenog objekta podataka nije važeći.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Trenutna selekcija nije kompatibilna sa navedenim tipom promene.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Napravite selekciju.";Strings.OfficeOM.L_DataStale="Podaci nisu u toku";Strings.OfficeOM.L_CustomFunctionNameCannotSplit="Ime funkcije mora da sadrži prostor za ime koji nije prazan i kratko ime koje nije prazno.";Strings.OfficeOM.L_TooManyOptionalFunction="viÅ¡estruke opcionalne funkcije na listi parametara";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Podaci su zastareli. Preuzmite objekat ponovo.";Strings.OfficeOM.L_UserNotSignedIn="Nijedan korisnik nije prijavljen u Office.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Nevažeća ili istekla sesija";Strings.OfficeOM.L_InvalidGrantMessage="Nedostaje odobrenje za ovaj programski dodatak.";Strings.OfficeOM.L_SettingNameNotExist="Navedeno ime postavke ne postoji.";Strings.OfficeOM.L_GetDataIsTooLarge="Zahtevani skup podataka je prevelik.";Strings.OfficeOM.L_DataNotMatchCoercionType="Tip navedenog objekta podataka nije kompatibilan sa trenutnom selekcijom.";Strings.OfficeOM.L_NotSupportedBindingType="Navedeni tip povezivanja {0} nije podržan.";Strings.OfficeOM.L_APINotSupported="API nije podržan";Strings.OfficeOM.L_InvalidSelectionForBindingType="Nije moguće kreirati povezivanje sa trenutnom selekcijom i navedenim tipom povezivanja.";Strings.OfficeOM.L_BrowserAPINotSupported="Ovaj pregledaÄ ne podržava zahtevani API.";Strings.OfficeOM.L_MissingParameter="Parametar nedostaje";Strings.OfficeOM.L_InvalidSetColumns="Navedene kolone su nevažeće.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="PokuÅ¡ava se postavljanje svojstva samo za Äitanje „{0}“.";Strings.OfficeOM.L_NewWindowCrossZone="Bezbednosne postavke u pregledaÄu spreÄavaju nas da kreiramo dijalog. PokuÅ¡ajte sa drugim pregledaÄem ili {0} kako bi „{1}“ i domen prikazan na traci adresa bili u istoj bezbednosnoj zoni.";Strings.OfficeOM.L_SSOServerErrorMessage="DoÅ¡lo je do neoÄekivane greÅ¡ke na serveru.";Strings.OfficeOM.L_SliceSizeNotSupported="Navedena veliÄina iseÄka nije podržana.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Napomena: Predloženo je da skupovi oblikovanja koje je postavio poziv API oblikovanja budu ispod 100.";Strings.OfficeOM.L_APICallFailed="API poziv nije uspeo";Strings.OfficeOM.L_SSOConnectionLostError="A connection was lost during the sign in process.";Strings.OfficeOM.L_RequestTokenUnavailable="Ovaj API je ograniÄen da bi se usporila uÄestalost poziva.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="Nije moguće primeniti promene svojstva „{0}“ putem metoda „object.set“.";Strings.OfficeOM.L_FunctionCallFailed="Poziv funkcije {0} nije uspeo, kod greÅ¡ke: {1}.";Strings.OfficeOM.L_BindingCreationError="GreÅ¡ka u stvaranju povezivanja";Strings.OfficeOM.L_ApiNotFoundDetails="Metod ili svojstvo {0} predstavlja deo skupa zahteva {1}, koji nije dostupan u vaÅ¡oj verziji aplikacije {2}.";Strings.OfficeOM.L_BindingNotExist="Navedeno povezivanje ne postoji.";Strings.OfficeOM.L_Timeout="Operacija je istekla.";Strings.OfficeOM.L_SettingsCannotSave="Nije bilo moguće saÄuvati postavke.";Strings.OfficeOM.L_InvalidGrant="Pred-autorizacija nedostaje.";Strings.OfficeOM.L_EventHandlerNotExist="Navedeni rukovalac dogaÄ‘aja nije pronaÄ‘en za ovo povezivanje.";Strings.OfficeOM.L_PropertyDoesNotExist="Svojstvo „{0}“ ne postoji u objektu.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Aplikacija {0} ne postoji. Microsoft.Office.WebExtension.initialize(razlog) nije pozvan.";Strings.OfficeOM.L_MemoryLimit="PremaÅ¡eno je ograniÄenje memorije";Strings.OfficeOM.L_DataWriteReminder="Podsetnik za pisanje podataka";Strings.OfficeOM.L_SettingsAreStale="Nije moguće saÄuvati postavke jer nisu u toku.";Strings.OfficeOM.L_TooManyIncompleteRequests="SaÄekajte da se prethodni poziv dovrÅ¡i.";Strings.OfficeOM.L_BadSelectorString="Niska koja je prosleÄ‘ena u biraÄ nije u ispravnom formatu ili nije podržan.";Strings.OfficeOM.L_FileTypeNotSupported="Navedeni tip datoteke nije podržan.";Strings.OfficeOM.L_SettingsStaleError="GreÅ¡ka usled zastarelih postavki";Strings.OfficeOM.L_InvalidAPICall="Nevažeći API poziv";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Argumenti nevažećeg unosa.";Strings.OfficeOM.L_BindingToMultipleSelection="Nekontinuirane selekcije nisu podržane.";Strings.OfficeOM.L_OutOfRange="Izvan opsega";Strings.OfficeOM.L_SetDataParametersConflict="Navedeni parametri su neusaglaÅ¡eni.";Strings.OfficeOM.L_HostError="GreÅ¡ka hosta";Strings.OfficeOM.L_InvalidBindingError="GreÅ¡ka nevažećeg povezivanja";Strings.OfficeOM.L_UserClickIgnore="Korisnik je odabrao da zanemari dijalog.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Potrebo je da izabrani sadržaj bude u formatu tabele. Oblikujte podatke u vidu tabele i probajte ponovo.";Strings.OfficeOM.L_CoercionTypeNotSupported="Navedeni tip promene nije podržan.";Strings.OfficeOM.L_RunMustReturnPromise="Paketna funkcija prosleÄ‘ena metodu „.run“ nije vratila obećanje. Funkcija mora da vrati obećanje kako bi automatski praćeni objekti mogli da se objave po dovrÅ¡etku paketne operacije. Obećanje se obiÄno vraća tako Å¡to se vrati odgovor iz poziva „context.sync()“.";Strings.OfficeOM.L_UnsupportedEnumeration="Nepodržano nabrajanje";Strings.OfficeOM.L_InitializeNotReady="Office.js joÅ¡ uvek nije potpuno uÄitan. PokuÅ¡ajte ponovo kasnije ili postarajte se da dodate vaÅ¡ kôd za pokretanje na vaÅ¡ Office.initialize function.";Strings.OfficeOM.L_DialogAddressNotTrusted="Domen URL adrese nije uvrÅ¡ten u elementu AppDomains u manifestu";Strings.OfficeOM.L_InvalidValue="Nevažeća vrednost";Strings.OfficeOM.L_ActivityLimitReached="Dostignuto je ograniÄenje aktivnosti.";Strings.OfficeOM.L_OsfControlTypeNotSupported="OsfControl tip nije podržan.";Strings.OfficeOM.L_InvalidApiCallInContext="Nevažeći API poziv u trenutnom kontekstu.";Strings.OfficeOM.L_InvalidSetRows="Navedeni redovi su nevažeći.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="Nabrajanje nije podržano u trenutnoj aplikaciji hosta.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Navedeni tip promene nije kompatibilan sa ovim tipom povezivanja.";Strings.OfficeOM.L_UnknownBindingType="Tip povezivanja nije podržan.";Strings.OfficeOM.L_UnsupportedDataObject="Navedeni tip objekta podataka nije podržan.";Strings.OfficeOM.L_InValidOptionalArgument="nevažeći opcionalni argument";Strings.OfficeOM.L_CustomFunctionDefinitionMissing="Svojstvo sa ovim imenom koje predstavlja definiciju funkcije mora da postoji u okviru Excel.CustomFunctions.";Strings.OfficeOM.L_PropertyNotLoaded="Svojstvo „{0}“ nije dostupno. Pre Äitanja vrednosti svojstva, pozovite metod uÄitavanja na sadržanom objektu i pozovite „context.sync()“ na povezanom kontekstu zahteva.";Strings.OfficeOM.L_DataWriteError="GreÅ¡ka u pisanju podataka";Strings.OfficeOM.L_InvalidParameters="Funkcija {0} ima nevažeće parametre.";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Pozovite closeAsync na trenutnoj datoteci pre preuzimanja druge.";Strings.OfficeOM.L_CustomFunctionImplementationMissing="Svojstvo sa ovim imenom koje predstavlja definiciju funkcije u okviru Excel.CustomFunctions mora da sadrži svojstvo „call“ koje primenjuje funkciju.";Strings.OfficeOM.L_GetDataParametersConflict="Navedeni parametri su neusaglaÅ¡eni.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory="Ovaj programski dodatak ne podržava pristanak korisnika.";Strings.OfficeOM.L_DataNotMatchSelection="Navedeni objekat podataka nije kompatibilan sa oblikom ili dimenzijama trenutne selekcije.";Strings.OfficeOM.L_SSOClientError="DoÅ¡lo je do greÅ¡ke u zahtevu za potvrdu identiteta iz sistema Office.";Strings.OfficeOM.L_GetSelectionNotSupported="Trenutna selekcija nije podržana.";Strings.OfficeOM.L_MultipleNamedItemFound="PronaÄ‘eno je viÅ¡e objekata sa istim imenom.";Strings.OfficeOM.L_SaveSettingsError="GreÅ¡ka pri Äuvanju postavki";Strings.OfficeOM.L_OverwriteWorksheetData="Operacija postavljanja nije uspela zato Å¡to će navedeni objekat podataka zameniti ili premestiti podatke.";Strings.OfficeOM.L_OperationNotSupported="Operacija nije podržana.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="OgraniÄenja pregledaÄa spreÄila su nas da kreiramo dijalog. Domen dijaloga i domen hosta programskog dodatka nisu u istoj bezbednosnoj zoni.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Operacija nije podržana na ovom tipu povezivanja.";Strings.OfficeOM.L_SSOConnectionLostErrorMessage="A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Napomena: Predloženo je da broj ćelija u tabeli bude ispod 20.000.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Nije moguće koristiti parametre za koordinaciju sa tabelom tipa promene kada tabela sadrži objedinjene ćelije.";Strings.OfficeOM.L_NoCapability="Nemate dovoljno dozvola za ovu radnju.";Strings.OfficeOM.L_DialogAlreadyOpened="Operacija nije uspela zato Å¡to ovaj programski dodatak već ima aktivan dijalog.";Strings.OfficeOM.L_InvalidReadForBlankRow="Navedeni red je prazan.";Strings.OfficeOM.L_CannotWriteToSelection="Upisivanje u trenutnu selekciju nije moguće.";Strings.OfficeOM.L_RowIndexOutOfRange="Vrednost indeksa reda je izvan dozvoljenog opsega. Koristite vrednost (0 ili veću) koja je manja od broja redova.";Strings.OfficeOM.L_ConnectionFailureWithDetails="Zahtev nije uspeo uz statusni kôd {0}, kôd greÅ¡ke {1} i sledeću poruku o greÅ¡ci: {2}";Strings.OfficeOM.L_DialogNavigateError="GreÅ¡ka prilikom navigacije u dijalogu";Strings.OfficeOM.L_NavOutOfBound="Operacija nije uspela zato Å¡to je indeks izvan opsega.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage="Operacija nije uspela zato Å¡to ovaj programski dodatak ne podržava pristanak korisnika u ovoj kategoriji";Strings.OfficeOM.L_DataReadError="GreÅ¡ka u Äitanju podataka";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Programski dodatak već zahteva token za pristup.";Strings.OfficeOM.L_InvalidArgument="Argument „{0}“ ne funkcioniÅ¡e u ovoj situaciji, nedostaje ili nije u odgovarajućem formatu.";Strings.OfficeOM.L_EventRegistrationError="GreÅ¡ka pri registraciji dogaÄ‘aja";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} želi da se prikazuje u novom prozoru.";Strings.OfficeOM.L_NotImplemented="Funkcija {0} nije primenjena.";Strings.OfficeOM.L_ReadSettingsError="GreÅ¡ka u postavkama Äitanja";Strings.OfficeOM.L_SelectionCannotBound="Nije moguće izvrÅ¡iti povezivanje sa trenutnom selekcijom.";Strings.OfficeOM.L_InvalidCellsValue="Neki parametri ćelije imaju vrednosti koje nisu dozvoljene. Proverite vrednosti joÅ¡ jednom i probajte ponovo.";Strings.OfficeOM.L_InternalError="UnutraÅ¡nja greÅ¡ka";Strings.OfficeOM.L_SetDataIsTooLarge="Navedeni objekat podataka je prevelik.";Strings.OfficeOM.L_InternalErrorDescription="DoÅ¡lo je do unutraÅ¡nje greÅ¡ke.";Strings.OfficeOM.L_ElementMissing="Nismo mogli da oblikujemo ćeliju tabele zato Å¡to nedostaju neke vrednosti parametara. Proverite parametre joÅ¡ jednom i probajte ponovo.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Tip identiteta korisnika nije podržan.";Strings.OfficeOM.L_IndexOutOfRange="Indeks je izvan opsega.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath ograniÄava izbor na 1024 stavke.";Strings.OfficeOM.L_DocumentReadOnly="Zahtevana operacija nije dozvoljena u trenutnom režimu dokumenta.";Strings.OfficeOM.L_NamedItemNotFound="Imenovana stavka ne postoji.";Strings.OfficeOM.L_InvalidNode="Nevažeći Ävor";Strings.OfficeOM.L_ShuttingDown="Operacija nije uspela zato Å¡to podaci na serveru nisu u toku.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="konfiguriÅ¡ite pregledaÄ";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Dozvoli";Strings.OfficeOM.L_InvalidRequestContext="Nije moguće koristiti objekat u viÅ¡e razliÄitih konteksta zahteva.";Strings.OfficeOM.L_EventHandlerRemovalFailed="Uklanjanje rukovaoca dogaÄ‘ajem nije uspelo.";Strings.OfficeOM.L_InvalidGetStartRowColumn="Navedene vrednosti za poÄetni red ili poÄetnu kolonu nisu važeće.";Strings.OfficeOM.L_DialogRequireHTTPS="HTTP protokol nije podržan. Koristite HTTPS";Strings.OfficeOM.L_InvalidArgumentGeneric="Argumenti prosleÄ‘eni u funkciju ne funkcioniÅ¡u u ovoj situaciji, nedostaju ili nisu u odgovarajućem formatu.";Strings.OfficeOM.L_InvalidSetStartRowColumn="Navedene vrednosti za poÄetni red ili poÄetnu kolonu nisu važeće.";Strings.OfficeOM.L_ValueNotLoaded="Vrednost objekta rezultata joÅ¡ nije uÄitana. Pre Äitanja svojstva vrednosti, pozovite „context.sync()“ na povezanom kontekstu zahteva.";Strings.OfficeOM.L_NetworkProblem="Problem sa mrežom";Strings.OfficeOM.L_InvalidBinding="Nevažeće povezivanje";Strings.OfficeOM.L_PermissionDenied="Dozvola je odbijena";Strings.OfficeOM.L_InvalidBindingOperation="Operacija nevažećeg povezivanja";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Navedene vrednosti za broj redova ili broj kolona nisu važeće.";Strings.OfficeOM.L_CustomXmlNodeNotFound="Nije pronaÄ‘en navedeni Ävor." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/sr-latn-rs/outlook_strings.debug.js b/node_modules/@microsoft/office-js/dist/sr-latn-rs/outlook_strings.debug.js index f774bee..e290840 100644 --- a/node_modules/@microsoft/office-js/dist/sr-latn-rs/outlook_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/sr-latn-rs/outlook_strings.debug.js @@ -1,34 +1,35 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("_u"); _u.ExtensibilityStrings = function() { }; _u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings"); -_u.ExtensibilityStrings.l_InternalProtocolError_Text = "Interna greÅ¡ka protokola: '{0}'."; -_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Nije moguće izbrisati prilog zato Å¡to nije moguće naći prilog sa indeksom priloga."; -_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Neka od datih imena za prikaz su predugaÄka."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Puna dozvola je potrebna za pristup zaÅ¡tićenim Älanovima aplikacije JavaScript API za Office."; _u.ExtensibilityStrings.l_InvalidEventDates_Text = "Datum zavrÅ¡etka je pre datuma poÄetka."; +_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "Putanja priloga je nevažeća."; +_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Nije moguće dodati prilog zato Å¡to je prevelik."; +_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "GreÅ¡ka u prilogu"; +_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Nije moguće dodati priloge dok se pun odgovor preuzima sa servera."; +_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "Izabrana stavka je promenjena."; +_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "HTML Äišćenje nije uspelo."; _u.ExtensibilityStrings.l_DataWriteErrorName_Text = "GreÅ¡ka u pisanju podataka"; -_u.ExtensibilityStrings.l_InternalFormatError_Text = "DoÅ¡lo je do interne greÅ¡ke u formatiranju."; +_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Zahtev premaÅ¡uje ograniÄenje veliÄine od 1 MB. Izmenite EWS zahtev."; +_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "Puna dozvola je potrebna za pozivanje ovog metoda: '{0}'."; _u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "ID priloga je nevažeći."; -_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Ukupan broj primalaca u polju ne sme da premaÅ¡i {0}."; -_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Nije moguće dodati prilog stavci."; _u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "Korisnik je uklonio prilog pre nego Å¡to je otpremanje dovrÅ¡eno."; -_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Dati parametri ne odgovaraju oÄekivanom formatu."; -_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "HTML Äišćenje nije uspelo."; -_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Nisu dati važeći primaoci."; -_u.ExtensibilityStrings.l_OffsetNotfound_Text = "Nije moguće pronaći pomak za ovu vremensku oznaku."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "Puna dozvola je potrebna za pozivanje ovog metoda: '{0}'."; +_u.ExtensibilityStrings.l_InternalFormatError_Text = "DoÅ¡lo je do interne greÅ¡ke u formatiranju."; _u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Neke od datih e-adresa su predugaÄke."; -_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Nije moguće dodati priloge dok se pun odgovor preuzima sa servera."; -_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "Putanja priloga je nevažeća."; -_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Nije moguće izbrisati prilog iz stavke."; +_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Nije moguće izbrisati prilog zato Å¡to nije moguće naći prilog sa indeksom priloga."; +_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Nije moguće dodati prilog stavci."; +_u.ExtensibilityStrings.l_OffsetNotfound_Text = "Nije moguće pronaći pomak za ovu vremensku oznaku."; +_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Ukupan broj primalaca u polju ne sme da premaÅ¡i {0}."; +_u.ExtensibilityStrings.l_InternalProtocolError_Text = "Interna greÅ¡ka protokola: '{0}'."; +_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Neka od datih imena za prikaz su predugaÄka."; +_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Nije moguće dodati priloge zato Å¡to poruka već ima maksimalan broj priloga"; _u.ExtensibilityStrings.l_CursorPositionChanged_Text = "Korisnik je promenio poziciju kursora dok je trajalo umetanje podataka."; +_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Dati parametri ne odgovaraju oÄekivanom formatu."; +_u.ExtensibilityStrings.l_InvalidDate_Text = "Unos se ne razreÅ¡ava na važeći datum."; _u.ExtensibilityStrings.l_InvalidEndTime_Text = "Vreme zavrÅ¡etka ne može biti pre vremena poÄetka."; -_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "Izabrana stavka je promenjena."; -_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Zahtev premaÅ¡uje ograniÄenje veliÄine od 1 MB. Izmenite EWS zahtev."; -_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Nije moguće dodati priloge zato Å¡to poruka već ima maksimalan broj priloga"; -_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Nije moguće dodati prilog zato Å¡to je prevelik."; -_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "GreÅ¡ka u prilogu"; -_u.ExtensibilityStrings.l_InvalidDate_Text = "Unos se ne razreÅ¡ava na važeći datum." +_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Nije moguće izbrisati prilog iz stavke."; +_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Puna dozvola je potrebna za pristup zaÅ¡tićenim Älanovima aplikacije JavaScript API za Office."; +_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Nisu dati važeći primaoci." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/sr-latn-rs/outlook_strings.js b/node_modules/@microsoft/office-js/dist/sr-latn-rs/outlook_strings.js index 2c28527..7f57239 100644 --- a/node_modules/@microsoft/office-js/dist/sr-latn-rs/outlook_strings.js +++ b/node_modules/@microsoft/office-js/dist/sr-latn-rs/outlook_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_InternalProtocolError_Text="Interna greÅ¡ka protokola: '{0}'.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Nije moguće izbrisati prilog zato Å¡to nije moguće naći prilog sa indeksom priloga.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Neka od datih imena za prikaz su predugaÄka.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Puna dozvola je potrebna za pristup zaÅ¡tićenim Älanovima aplikacije JavaScript API za Office.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="Datum zavrÅ¡etka je pre datuma poÄetka.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="GreÅ¡ka u pisanju podataka";_u.ExtensibilityStrings.l_InternalFormatError_Text="DoÅ¡lo je do interne greÅ¡ke u formatiranju.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="ID priloga je nevažeći.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Ukupan broj primalaca u polju ne sme da premaÅ¡i {0}.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Nije moguće dodati prilog stavci.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="Korisnik je uklonio prilog pre nego Å¡to je otpremanje dovrÅ¡eno.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Dati parametri ne odgovaraju oÄekivanom formatu.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="HTML Äišćenje nije uspelo.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Nisu dati važeći primaoci.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Nije moguće pronaći pomak za ovu vremensku oznaku.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Puna dozvola je potrebna za pozivanje ovog metoda: '{0}'.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Neke od datih e-adresa su predugaÄke.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Nije moguće dodati priloge dok se pun odgovor preuzima sa servera.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="Putanja priloga je nevažeća.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Nije moguće izbrisati prilog iz stavke.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="Korisnik je promenio poziciju kursora dok je trajalo umetanje podataka.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="Vreme zavrÅ¡etka ne može biti pre vremena poÄetka.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Izabrana stavka je promenjena.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Zahtev premaÅ¡uje ograniÄenje veliÄine od 1 MB. Izmenite EWS zahtev.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Nije moguće dodati priloge zato Å¡to poruka već ima maksimalan broj priloga";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Nije moguće dodati prilog zato Å¡to je prevelik.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="GreÅ¡ka u prilogu";_u.ExtensibilityStrings.l_InvalidDate_Text="Unos se ne razreÅ¡ava na važeći datum." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_InvalidEventDates_Text="Datum zavrÅ¡etka je pre datuma poÄetka.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="Putanja priloga je nevažeća.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Nije moguće dodati prilog zato Å¡to je prevelik.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="GreÅ¡ka u prilogu";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Nije moguće dodati priloge dok se pun odgovor preuzima sa servera.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Izabrana stavka je promenjena.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="HTML Äišćenje nije uspelo.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="GreÅ¡ka u pisanju podataka";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Zahtev premaÅ¡uje ograniÄenje veliÄine od 1 MB. Izmenite EWS zahtev.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Puna dozvola je potrebna za pozivanje ovog metoda: '{0}'.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="ID priloga je nevažeći.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="Korisnik je uklonio prilog pre nego Å¡to je otpremanje dovrÅ¡eno.";_u.ExtensibilityStrings.l_InternalFormatError_Text="DoÅ¡lo je do interne greÅ¡ke u formatiranju.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Neke od datih e-adresa su predugaÄke.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Nije moguće izbrisati prilog zato Å¡to nije moguće naći prilog sa indeksom priloga.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Nije moguće dodati prilog stavci.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Nije moguće pronaći pomak za ovu vremensku oznaku.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Ukupan broj primalaca u polju ne sme da premaÅ¡i {0}.";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Interna greÅ¡ka protokola: '{0}'.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Neka od datih imena za prikaz su predugaÄka.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Nije moguće dodati priloge zato Å¡to poruka već ima maksimalan broj priloga";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="Korisnik je promenio poziciju kursora dok je trajalo umetanje podataka.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Dati parametri ne odgovaraju oÄekivanom formatu.";_u.ExtensibilityStrings.l_InvalidDate_Text="Unos se ne razreÅ¡ava na važeći datum.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="Vreme zavrÅ¡etka ne može biti pre vremena poÄetka.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Nije moguće izbrisati prilog iz stavke.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Puna dozvola je potrebna za pristup zaÅ¡tićenim Älanovima aplikacije JavaScript API za Office.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Nisu dati važeći primaoci." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/sv-se/office_strings.debug.js b/node_modules/@microsoft/office-js/dist/sv-se/office_strings.debug.js index 397a877..c75db47 100644 --- a/node_modules/@microsoft/office-js/dist/sv-se/office_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/sv-se/office_strings.debug.js @@ -1,179 +1,190 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("Strings"); Strings.OfficeOM = function() { }; Strings.OfficeOM.registerClass("Strings.OfficeOM"); -Strings.OfficeOM.L_NotSupportedEventType = "Den angivna händelsetypen {0} kan inte användas."; -Strings.OfficeOM.L_CustomXmlOutOfDateName = "Data är inte aktuella"; -Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Valt innehÃ¥ll mÃ¥ste vara i tabellformat. Formatera data som en tabell och försök igen."; -Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = "Ändringar av egenskapen {0} kan inte användas frÃ¥n en object.set-metod."; -Strings.OfficeOM.L_SSOServerErrorMessage = "Ett oväntat fel uppstod pÃ¥ servern."; -Strings.OfficeOM.L_BrowserAPINotSupported = "Den begärda API:n stöds inte i den här webbläsaren."; -Strings.OfficeOM.L_InvalidOrTimedOutSession = "Sessionen är ogiltig eller har upphört"; -Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Den angivna bindningstypen är inte kompatibel med det angivna namngivna objektet."; -Strings.OfficeOM.L_SettingNameNotExist = "Det angivna inställningsnamnet finns inte."; -Strings.OfficeOM.L_InvalidBindingError = "Fel med ogiltig bindning"; -Strings.OfficeOM.L_OverwriteWorksheetData = "Den angivna Ã¥tgärden misslyckades eftersom det angivna dataobjektet skriver över eller flyttar data."; -Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Obs! Det bör inte finnas fler än 20 000 celler i en tabell."; -Strings.OfficeOM.L_FormatValueOutOfRange = "Värdet ligger utanför det tillÃ¥tna intervallet."; -Strings.OfficeOM.L_ShuttingDown = "Ã…tgärden misslyckades eftersom data är inaktuella pÃ¥ servern."; -Strings.OfficeOM.L_RedundantCallbackSpecification = "Motringning kan inte anges i bÃ¥de argumentlistan och valfria objekt."; -Strings.OfficeOM.L_FileTypeNotSupported = "Den angivna filtypen stöds inte."; -Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Obs! De formateringsuppsättningar som anges av ett anrop av formaterings-API:t bör vara under 100."; -Strings.OfficeOM.L_CallbackNotAFunction = "Motringning mÃ¥ste vara av typen funktion, men var av typen {0}."; -Strings.OfficeOM.L_DataNotMatchBindingType = "Det angivna dataobjektet är inte kompatibelt med bindningstypen."; -Strings.OfficeOM.L_UserNotSignedIn = "Ingen användare är inloggad i Office."; -Strings.OfficeOM.L_DataNotMatchBindingSize = "Det angivna dataobjektet matchar inte storleken pÃ¥ den aktuella markeringen."; -Strings.OfficeOM.L_MissingRequiredArguments = "saknar vissa obligatoriska argument"; -Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "konfigurera webbläsaren"; -Strings.OfficeOM.L_BindingCreationError = "Fel inträffade när bindningen skapades"; -Strings.OfficeOM.L_InvalidApiCallInContext = "Ogiltigt API-anrop i den aktuella kontexten."; -Strings.OfficeOM.L_ActivityLimitReached = "Aktivitetsgränsen har nÃ¥tts."; -Strings.OfficeOM.L_DataWriteError = "Dataskrivningsfel"; Strings.OfficeOM.L_DialogInvalidScheme = "URL-schemat stöds inte. Använd HTTPS i stället."; -Strings.OfficeOM.L_NotSupported = "Funktionen {0} stöds inte."; -Strings.OfficeOM.L_NewWindowCrossZone = "Säkerhetsinställningarna i din webbläsare hindrar oss frÃ¥n att skapa en dialogruta. Försök med en annan webbläsare eller {0} sÃ¥ att {1} och den domän som visas i adressfältet är i samma säkerhetszon."; -Strings.OfficeOM.L_TooManyArguments = "för mÃ¥nga argument"; -Strings.OfficeOM.L_OsfControlTypeNotSupported = "OsfControl-typen stöds inte."; -Strings.OfficeOM.L_APINotSupported = "API:n stöds inte"; Strings.OfficeOM.L_DisplayDialogError = "Fel i dialogrutevisning"; -Strings.OfficeOM.L_InvalidBinding = "Ogiltig bindning"; -Strings.OfficeOM.L_InvalidAPICall = "Ogiltigt API-anrop"; -Strings.OfficeOM.L_FunctionCallFailed = "Funktionsanropet {0} misslyckades, felkod: {1}."; -Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} vill visa ett nytt fönster."; -Strings.OfficeOM.L_InvalidArgumentGeneric = "Den eller de argument som överfördes till funktionen fungerar inte i den här situationen, saknas eller är inte i rätt format."; -Strings.OfficeOM.L_InvalidTableOptionValue = "Ett eller flera av tabellAlternativens parameterar har värden som inte är tillÃ¥tna. Kontrollera värdena och försök igen."; -Strings.OfficeOM.L_NotSupportedBindingType = "Den angivna bindningstypen {0} kan inte användas."; -Strings.OfficeOM.L_InvalidResourceUrl = "Ogiltig programresurs-URL har angetts."; -Strings.OfficeOM.L_InvalidResourceUrlMessage = "Ogiltig resurs-URL har angetts i manifestet."; -Strings.OfficeOM.L_UserAbortedMessage = "Användaren har inte godkänt behörigheterna för tillägget."; -Strings.OfficeOM.L_TooManyOptionalFunction = "flera valfria funktioner i parameterlistan"; -Strings.OfficeOM.L_PropertyNotLoaded = 'Egenskapen {0} är inte tillgänglig. Innan du läser egenskapens värde anropar du inläsningsmetoden för det innehÃ¥llande objektet och anropar "context.sync()" för den associerade begärankontexten.'; +Strings.OfficeOM.L_MissingParameter = "Parameter saknas"; Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Koordinatparametrar kan inte användas med konverteringstypen Tabell när tabellen innehÃ¥ller sammanfogade celler."; -Strings.OfficeOM.L_OutOfRange = "Utanför intervallet"; +Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Den angivna konverteringstypen är inte kompatibel med den här bindningstypen."; +Strings.OfficeOM.L_ApiNotFoundDetails = "Metoden eller egenskapen {0} är en del av kravuppsättningen för {1}, som inte är tillgängligt i din version av {2}."; +Strings.OfficeOM.L_FileTypeNotSupported = "Den angivna filtypen stöds inte."; +Strings.OfficeOM.L_InternalErrorDescription = "Ett internt fel har uppstÃ¥tt."; +Strings.OfficeOM.L_RedundantCallbackSpecification = "Motringning kan inte anges i bÃ¥de argumentlistan och valfria objekt."; +Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Programmet {0} finns inte. Microsoft.Office.WebExtension.initialize(reason) har inte anropats."; +Strings.OfficeOM.L_InvalidColumnsForBinding = "De angivna kolumnerna är ogiltiga."; Strings.OfficeOM.L_MemoryLimit = "Minnesbegränsningen överskreds"; -Strings.OfficeOM.L_EventHandlerNotExist = "Den angivna händelsehanteraren kan inte användas för den här bindningen."; -Strings.OfficeOM.L_SelectionCannotBound = "Det gÃ¥r inte att binda till den aktuella markeringen."; +Strings.OfficeOM.L_InvalidArgumentGeneric = "Den eller de argument som överfördes till funktionen fungerar inte i den här situationen, saknas eller är inte i rätt format."; +Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Ogiltiga indataargument."; +Strings.OfficeOM.L_InvalidAPICall = "Ogiltigt API-anrop"; +Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "Din Office Online-session har upphört eller är ogiltig. Uppdatera sidan om du vill fortsätta."; +Strings.OfficeOM.L_Timeout = "Ã…tgärden överskred tidsgränsen."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Tillägget begär redan en Ã¥tkomsttoken."; +Strings.OfficeOM.L_AppNameNotExist = "Det finns inget tilläggsnamn för {0}."; Strings.OfficeOM.L_SaveSettingsError = "Fel när inställningar sparades"; +Strings.OfficeOM.L_DataStale = "Data är inte aktuella"; +Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "TillÃ¥t"; +Strings.OfficeOM.L_InvalidBindingError = "Fel med ogiltig bindning"; +Strings.OfficeOM.L_EventHandlerRemovalFailed = "Det gick inte att ta bort händelsehanteraren."; +Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Ã…tgärden stöds inte för den här bindningstypen."; +Strings.OfficeOM.L_GetDataIsTooLarge = "Den begärda datauppsättningen är för stor."; +Strings.OfficeOM.L_EventRegistrationError = "Fel vid händelseregistrering"; +Strings.OfficeOM.L_UserClickIgnore = "Användaren valde att ignorera dialogrutan."; +Strings.OfficeOM.L_DialogOK = "OK"; +Strings.OfficeOM.L_RowIndexOutOfRange = "Värdet för radindex ligger utanför det tillÃ¥tna intervallet. Använd ett värde (0 eller högre) som är mindre än antalet rader."; +Strings.OfficeOM.L_HostError = "Värdfel"; +Strings.OfficeOM.L_CoercionTypeNotSupported = "Den angivna konverteringstypen kan inte användas."; +Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Ignorera"; +Strings.OfficeOM.L_SSOConnectionLostErrorMessage = "A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones."; +Strings.OfficeOM.L_TooManyOptionalFunction = "flera valfria funktioner i parameterlistan"; +Strings.OfficeOM.L_InvalidArgument = "Argumentet {0} fungerar inte för den här situationen, saknas eller har felaktigt format."; +Strings.OfficeOM.L_CustomFunctionNameCannotSplit = "Funktionsnamnet mÃ¥ste innehÃ¥lla ett icke-tomt namnomrÃ¥de och ett icke-tomt kortnamn."; +Strings.OfficeOM.L_SSOServerError = "Fel uppstod i autentiseringsprovidern."; +Strings.OfficeOM.L_SSOConnectionLostError = "A connection was lost during the sign in process."; +Strings.OfficeOM.L_PropertyNotLoaded = 'Egenskapen {0} är inte tillgänglig. Innan du läser egenskapens värde anropar du inläsningsmetoden för det innehÃ¥llande objektet och anropar "context.sync()" för den associerade begärankontexten.'; +Strings.OfficeOM.L_RequestTimeout = "Det tog för lÃ¥ng tid att köra samtalet."; +Strings.OfficeOM.L_GetSelectionNotSupported = "Den aktuella markeringen stöds inte."; +Strings.OfficeOM.L_OsfControlTypeNotSupported = "OsfControl-typen stöds inte."; +Strings.OfficeOM.L_InvalidDataFormat = "Det angivna dataobjektets format är ogiltigt."; +Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Markeringsgränsen har uppnÃ¥tts"; +Strings.OfficeOM.L_UserNotSignedIn = "Ingen användare är inloggad i Office."; +Strings.OfficeOM.L_APINotSupported = "API:n stöds inte"; +Strings.OfficeOM.L_InvalidGetRowColumnCounts = "De angivna värdena för rowCount eller columnCount är ogiltiga."; +Strings.OfficeOM.L_InvalidGetRows = "De angivna raderna är ogiltiga."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Ã…tgärden misslyckades eftersom tillägget redan begär en Ã¥tkomsttoken."; Strings.OfficeOM.L_DocumentReadOnly = "Den begärda Ã¥tgärden tillÃ¥ts inte för det aktuella dokumentläget."; -Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Den aktuella markeringen är inte kompatibel med den angivna konverteringstypen."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Tillägget begär redan en Ã¥tkomsttoken."; -Strings.OfficeOM.L_RunMustReturnPromise = 'Batchfunktionen som har överförts till metoden ".run" returnerade inte ett löfte. Funktionen mÃ¥ste returnera ett löfte sÃ¥ att automatiskt spÃ¥rade objekt kan frisläppas när batchen slutförs. Normalt returnerar du ett löfte genom att returnera svaret frÃ¥n "context.sync()".'; -Strings.OfficeOM.L_InvalidReadForBlankRow = "Den angivna raden är tom."; +Strings.OfficeOM.L_CallbackNotAFunction = "Motringning mÃ¥ste vara av typen funktion, men var av typen {0}."; +Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} vill visa ett nytt fönster."; +Strings.OfficeOM.L_OperationNotSupported = "Ã…tgärden stöds inte."; +Strings.OfficeOM.L_BindingToMultipleSelection = "Icke sammanhängande markeringar kan inte användas."; +Strings.OfficeOM.L_SelectionCannotBound = "Det gÃ¥r inte att binda till den aktuella markeringen."; +Strings.OfficeOM.L_UnknownBindingType = "Bindningstypen kan inte användas."; +Strings.OfficeOM.L_UnsupportedUserIdentity = "Användarens identitetstyp stöds inte."; +Strings.OfficeOM.L_DataNotMatchSelection = "Det angivna dataobjektet är inte kompatibelt med den aktuella markeringens form och mÃ¥tt."; +Strings.OfficeOM.L_InvalidFormatValue = "En eller flera av formatparametrarna har värden som inte är tillÃ¥tna. Kontrollera värdena och försök igen."; Strings.OfficeOM.L_EventHandlerAdditionFailed = "Det gick inte att lägga till händelsehanteraren."; -Strings.OfficeOM.L_InvalidValue = "Ogiltigt värde"; -Strings.OfficeOM.L_CustomXmlError = "Anpassat XML-fel."; -Strings.OfficeOM.L_DataReadError = "Dataläsningsfel"; -Strings.OfficeOM.L_MissingParameter = "Parameter saknas"; -Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Webbläsarbegränsningar hindrade oss frÃ¥n att skapa dialogrutan. Dialogrutans domän och domänen för tilläggsvärden är inte i samma säkerhetszon."; -Strings.OfficeOM.L_InvalidGetRowColumnCounts = "De angivna värdena för rowCount eller columnCount är ogiltiga."; -Strings.OfficeOM.L_SSOClientErrorMessage = "Ett oväntat fel uppstod i klienten."; -Strings.OfficeOM.L_MultipleNamedItemFound = "Det finns flera objekt med samma namn."; -Strings.OfficeOM.L_InvalidRequestContext = "Det gÃ¥r inte att använda objektet i flera olika begärankontexter."; -Strings.OfficeOM.L_GetSelectionNotSupported = "Den aktuella markeringen stöds inte."; -Strings.OfficeOM.L_NetworkProblem = "Nätverksproblem"; -Strings.OfficeOM.L_TooManyOptionalObjects = "flera valfria objekt i parameterlistan"; -Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Data är inaktuella. Hämta objektet igen."; -Strings.OfficeOM.L_NotImplemented = "Funktionen {0} är inte implementerad."; -Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Ignorera"; -Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Ett nätverksproblem förhindrade hämtningen av filen."; -Strings.OfficeOM.L_RowIndexOutOfRange = "Värdet för radindex ligger utanför det tillÃ¥tna intervallet. Använd ett värde (0 eller högre) som är mindre än antalet rader."; -Strings.OfficeOM.L_DataStale = "Data är inte aktuella"; -Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Programmet {0} finns inte. Microsoft.Office.WebExtension.initialize(reason) har inte anropats."; -Strings.OfficeOM.L_InValidOptionalArgument = "ogiltigt argument som tillval"; +Strings.OfficeOM.L_ColIndexOutOfRange = "Värdet för kolumnindex ligger utanför det tillÃ¥tna intervallet. Använd ett värde (0 eller högre) som är mindre än antalet kolumner."; +Strings.OfficeOM.L_InvalidParameters = "Funktionen {0} har ogiltiga parametrar."; Strings.OfficeOM.L_InvalidGrant = "Förauktorisering saknas."; -Strings.OfficeOM.L_IndexOutOfRange = "Index är utanför intervallet."; +Strings.OfficeOM.L_ShuttingDown = "Ã…tgärden misslyckades eftersom data är inaktuella pÃ¥ servern."; +Strings.OfficeOM.L_CustomXmlOutOfDateName = "Data är inte aktuella"; +Strings.OfficeOM.L_DataNotMatchBindingType = "Det angivna dataobjektet är inte kompatibelt med bindningstypen."; +Strings.OfficeOM.L_InvalidTableOptionValue = "Ett eller flera av tabellAlternativens parameterar har värden som inte är tillÃ¥tna. Kontrollera värdena och försök igen."; +Strings.OfficeOM.L_DialogAlreadyOpened = "Ã…tgärden misslyckades eftersom tillägget redan har en aktiv dialogruta."; +Strings.OfficeOM.L_InternalError = "Internt fel"; +Strings.OfficeOM.L_RequestTokenUnavailable = "Den här API:n har begränsats för att sänka samtalsfrekvensen."; +Strings.OfficeOM.L_MissingRequiredArguments = "saknar vissa obligatoriska argument"; +Strings.OfficeOM.L_CustomFunctionNameContainsBadChars = "Funktionsnamnet fÃ¥r bara innehÃ¥lla bokstäver, siffror, understreck och punkter."; +Strings.OfficeOM.L_NotSupported = "Funktionen {0} stöds inte."; +Strings.OfficeOM.L_NotImplemented = "Funktionen {0} är inte implementerad."; +Strings.OfficeOM.L_CustomFunctionImplementationMissing = "Egenskapen med det här namnet för Excel.CustomFunctions som representerar funktionens definition mÃ¥ste innehÃ¥lla en anropsegenskap som implementerar funktionen."; +Strings.OfficeOM.L_UserAborted = "Användaren avbröt begäran om godkännande."; +Strings.OfficeOM.L_PermissionDenied = "Ã…tkomst nekad"; +Strings.OfficeOM.L_DataNotMatchBindingSize = "Det angivna dataobjektet matchar inte storleken pÃ¥ den aktuella markeringen."; Strings.OfficeOM.L_InvalidBindingOperation = "Ogiltig Ã¥tgärd för bindning"; -Strings.OfficeOM.L_DataWriteReminder = "PÃ¥minnelse om dataskrivning"; -Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Anropa closeAsync pÃ¥ den aktuella filen innan du hämtar en annan."; -Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "Din Office Online-session har upphört eller är ogiltig. Uppdatera sidan om du vill fortsätta."; -Strings.OfficeOM.L_UnsupportedEnumeration = "Uppräkning stöds inte"; -Strings.OfficeOM.L_InvalidGrantMessage = "Behörighet saknas för detta tillägg."; -Strings.OfficeOM.L_EventHandlerRemovalFailed = "Det gick inte att ta bort händelsehanteraren."; -Strings.OfficeOM.L_NamedItemNotFound = "Det namngivna objektet finns inte."; -Strings.OfficeOM.L_SetDataParametersConflict = "De angivna parametrarna är i konflikt."; -Strings.OfficeOM.L_UserClickIgnore = "Användaren valde att ignorera dialogrutan."; -Strings.OfficeOM.L_InvalidSetStartRowColumn = "De angivna värdena för startRow eller startColumn är ogiltiga."; -Strings.OfficeOM.L_InvalidDataObject = "Ogiltigt dataobjekt"; Strings.OfficeOM.L_SettingsAreStale = "Det gick inte att spara inställningarna eftersom de är inaktuella."; -Strings.OfficeOM.L_SettingsStaleError = "Fel med inaktuella inställningar"; -Strings.OfficeOM.L_CannotWriteToSelection = "Det gÃ¥r inte att skriva till den aktuella markeringen."; -Strings.OfficeOM.L_InvalidFormatValue = "En eller flera av formatparametrarna har värden som inte är tillÃ¥tna. Kontrollera värdena och försök igen."; -Strings.OfficeOM.L_InvalidSSOAddinMessage = "Identitets-API stöds inte för detta tillägg."; -Strings.OfficeOM.L_GetDataIsTooLarge = "Den begärda datauppsättningen är för stor."; -Strings.OfficeOM.L_FormattingReminder = "FormateringspÃ¥minnelse"; +Strings.OfficeOM.L_NotSupportedEventType = "Den angivna händelsetypen {0} kan inte användas."; +Strings.OfficeOM.L_NetworkProblem = "Nätverksproblem"; +Strings.OfficeOM.L_SSOServerErrorMessage = "Ett oväntat fel uppstod pÃ¥ servern."; +Strings.OfficeOM.L_SSOClientError = "Fel uppstod i autentiseringsbegäran frÃ¥n Office."; +Strings.OfficeOM.L_SpecifiedIdNotExist = "Det angivna ID:t finns inte."; +Strings.OfficeOM.L_SettingsCannotSave = "Inställningarna kunde inte sparas."; Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "Försöker att konfigurera den skrivskyddade egenskapen {0}."; -Strings.OfficeOM.L_InvalidCoercion = "Ogiltig typkonvertering"; -Strings.OfficeOM.L_InternalErrorDescription = "Ett internt fel har uppstÃ¥tt."; -Strings.OfficeOM.L_UnsupportedEnumerationMessage = "Den här uppräkningen stöds inte i det aktuella värdprogrammet."; +Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Den angivna bindningstypen är inte kompatibel med det angivna namngivna objektet."; +Strings.OfficeOM.L_OverwriteWorksheetData = "Den angivna Ã¥tgärden misslyckades eftersom det angivna dataobjektet skriver över eller flyttar data."; Strings.OfficeOM.L_InvalidGetStartRowColumn = "De angivna värdena för startRow eller startColumn är ogiltiga."; +Strings.OfficeOM.L_InvalidOperationInCellEditMode = "Excel är i cellredigeringsläge. Avsluta redigeringsläget genom att trycka pÃ¥ RETUR eller TABB eller genom att markera en annan cell och sedan försöka igen."; +Strings.OfficeOM.L_NamedItemNotFound = "Det namngivna objektet finns inte."; +Strings.OfficeOM.L_DialogAddressNotTrusted = "URL-adressens domän ingÃ¥r inte i AppDomains-elementet i manifestet."; +Strings.OfficeOM.L_InvalidNode = "Ogiltig nod"; +Strings.OfficeOM.L_ConnectionFailureWithDetails = "Begäran misslyckades med statuskod {0}, felkod {1} och följande felmeddelande: {2}"; +Strings.OfficeOM.L_InvalidDataObject = "Ogiltigt dataobjekt"; +Strings.OfficeOM.L_CannotRegisterEvent = "Det gÃ¥r inte att registrera händelsehanteraren."; +Strings.OfficeOM.L_SliceSizeNotSupported = "Den angivna segmentstorleken stöds inte."; +Strings.OfficeOM.L_InvalidCellsValue = "En eller flera av cellens parametrar har värden som inte är tillÃ¥tna. Kontrollera värdena och försök igen."; +Strings.OfficeOM.L_TooManyArguments = "för mÃ¥nga argument"; +Strings.OfficeOM.L_SSOClientErrorMessage = "Ett oväntat fel uppstod i klienten."; +Strings.OfficeOM.L_InvalidCoercion = "Ogiltig typkonvertering"; +Strings.OfficeOM.L_CannotNavigateTo = "Objektet finns pÃ¥ en plats där navigering inte stöds."; +Strings.OfficeOM.L_TooManyIncompleteRequests = "Vänta tills det föregÃ¥ende samtalet har avslutats."; Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Användarens identitetstyp stöds inte."; -Strings.OfficeOM.L_ConnectionFailureWithStatus = "Begäran misslyckades med statuskod {0}."; -Strings.OfficeOM.L_BadSelectorString = "Strängen som skickades in i väljaren är felaktigt formaterad eller stöds inte."; -Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Koordinatparametrar kan inte användas med konverteringstypen Tabell när tabellen innehÃ¥ller sammanfogade celler."; -Strings.OfficeOM.L_BindingToMultipleSelection = "Icke sammanhängande markeringar kan inte användas."; -Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Gör ett val."; -Strings.OfficeOM.L_NavOutOfBound = "Ã…tgärden misslyckades eftersom indexet ligger utanför intervallet."; +Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Obs! Det bör inte finnas fler än 20 000 celler i en tabell."; +Strings.OfficeOM.L_SettingNameNotExist = "Det angivna inställningsnamnet finns inte."; +Strings.OfficeOM.L_GetDataParametersConflict = "De angivna parametrarna är i konflikt."; +Strings.OfficeOM.L_SetDataIsTooLarge = "Det angivna dataobjektet är för stort."; Strings.OfficeOM.L_InvalidSetRows = "De angivna raderna är ogiltiga."; -Strings.OfficeOM.L_InvalidColumnsForBinding = "De angivna kolumnerna är ogiltiga."; -Strings.OfficeOM.L_InvalidNode = "Ogiltig nod"; -Strings.OfficeOM.L_PermissionDenied = "Ã…tkomst nekad"; +Strings.OfficeOM.L_InvalidSSOAddinMessage = "Identitets-API stöds inte för detta tillägg."; +Strings.OfficeOM.L_InvalidGetColumns = "De angivna kolumnerna är ogiltiga."; +Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Gör ett val."; +Strings.OfficeOM.L_ValueNotLoaded = 'Värdet för ett resultatobjekt har inte lästs in ännu. Anropa "context.sync()" i den associerade begärandekontexten innan du läser värdeegenskapen.'; +Strings.OfficeOM.L_ActivityLimitReached = "Aktivitetsgränsen har nÃ¥tts."; +Strings.OfficeOM.L_NewWindowCrossZone = "Säkerhetsinställningarna i din webbläsare hindrar oss frÃ¥n att skapa en dialogruta. Försök med en annan webbläsare eller {0} sÃ¥ att {1} och den domän som visas i adressfältet är i samma säkerhetszon."; +Strings.OfficeOM.L_RunMustReturnPromise = 'Batchfunktionen som har överförts till metoden ".run" returnerade inte ett löfte. Funktionen mÃ¥ste returnera ett löfte sÃ¥ att automatiskt spÃ¥rade objekt kan frisläppas när batchen slutförs. Normalt returnerar du ett löfte genom att returnera svaret frÃ¥n "context.sync()".'; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage = "Ã…tgärden misslyckades eftersom tillägget inte stöder användarmedgivande i den här kategorin"; Strings.OfficeOM.L_InvalidFormat = "Ogiltigt formatfel"; -Strings.OfficeOM.L_NoCapability = "Du har inte tillräcklig behörighet för den här Ã¥tgärden."; -Strings.OfficeOM.L_DataNotMatchCoercionType = "Det angivna dataobjektets typ är inte kompatibel med den aktuella markeringen."; -Strings.OfficeOM.L_SpecifiedIdNotExist = "Det angivna ID:t finns inte."; +Strings.OfficeOM.L_FormattingReminder = "FormateringspÃ¥minnelse"; +Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath begränsar urvalet till 1024 artiklar."; +Strings.OfficeOM.L_FunctionCallFailed = "Funktionsanropet {0} misslyckades, felkod: {1}."; +Strings.OfficeOM.L_UnsupportedEnumerationMessage = "Den här uppräkningen stöds inte i det aktuella värdprogrammet."; +Strings.OfficeOM.L_TooManyOptionalObjects = "flera valfria objekt i parameterlistan"; Strings.OfficeOM.L_DialogRequireHTTPS = "HTTP-protokollet stöds inte. Använd HTTPS i stället"; -Strings.OfficeOM.L_RequestTokenUnavailable = "Den här API:n har begränsats för att sänka samtalsfrekvensen."; -Strings.OfficeOM.L_DialogOK = "OK"; -Strings.OfficeOM.L_SettingsCannotSave = "Inställningarna kunde inte sparas."; -Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Ã…tgärden stöds inte för den här bindningstypen."; -Strings.OfficeOM.L_ElementMissing = "Det gick inte att formatera tabellcellen eftersom vissa parametrar saknas. Kontrollera parametrarna och försök igen."; +Strings.OfficeOM.L_InvalidResourceUrl = "Ogiltig programresurs-URL har angetts."; +Strings.OfficeOM.L_BadSelectorString = "Strängen som skickades in i väljaren är felaktigt formaterad eller stöds inte."; +Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = "Ändringar av egenskapen {0} kan inte användas frÃ¥n en object.set-metod."; +Strings.OfficeOM.L_CannotWriteToSelection = "Det gÃ¥r inte att skriva till den aktuella markeringen."; +Strings.OfficeOM.L_MultipleNamedItemFound = "Det finns flera objekt med samma namn."; +Strings.OfficeOM.L_CustomXmlNodeNotFound = "Den angivna noden hittades inte."; +Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Ett nätverksproblem förhindrade hämtningen av filen."; +Strings.OfficeOM.L_UserAbortedMessage = "Användaren har inte godkänt behörigheterna för tillägget."; +Strings.OfficeOM.L_EventHandlerNotExist = "Den angivna händelsehanteraren kan inte användas för den här bindningen."; +Strings.OfficeOM.L_DataNotMatchCoercionType = "Det angivna dataobjektets typ är inte kompatibel med den aktuella markeringen."; +Strings.OfficeOM.L_InvalidResourceUrlMessage = "Ogiltig resurs-URL har angetts i manifestet."; Strings.OfficeOM.L_InvalidObjectPath = 'Objektsökvägen {0} fungerar inte för det du försöker göra. Om du använder objektet i flera "context.sync"-anrop och utanför den sekventiella körningen av en ".run"-batch använder du metoderna "context.trackedObjects.add()" och "context.trackedObjects.remove()" för att hantera objektets livstid.'; -Strings.OfficeOM.L_SliceSizeNotSupported = "Den angivna segmentstorleken stöds inte."; -Strings.OfficeOM.L_InternalError = "Internt fel"; -Strings.OfficeOM.L_UserAborted = "Användaren avbröt begäran om godkännande."; +Strings.OfficeOM.L_BrowserAPINotSupported = "Den begärda API:n stöds inte i den här webbläsaren."; Strings.OfficeOM.L_InvalidSetColumns = "De angivna kolumnerna är ogiltiga."; +Strings.OfficeOM.L_UnsupportedDataObject = "Den angivna dataobjekttypen kan inte användas."; +Strings.OfficeOM.L_ConnectionFailureWithStatus = "Begäran misslyckades med statuskod {0}."; +Strings.OfficeOM.L_DataWriteError = "Dataskrivningsfel"; +Strings.OfficeOM.L_NotSupportedBindingType = "Den angivna bindningstypen {0} kan inte användas."; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory = "Det här tillägget stöder inte användarmedgivande."; Strings.OfficeOM.L_InitializeNotReady = "Office.js har inte lästs in helt ännu. Försök igen senare eller lägg till din initieringskod för funktionen Office.initialize."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Ã…tgärden misslyckades eftersom tillägget redan begär en Ã¥tkomsttoken."; -Strings.OfficeOM.L_GetDataParametersConflict = "De angivna parametrarna är i konflikt."; -Strings.OfficeOM.L_DialogAddressNotTrusted = "URL-adressens domän ingÃ¥r inte i AppDomains-elementet i manifestet."; -Strings.OfficeOM.L_TooManyIncompleteRequests = "Vänta tills det föregÃ¥ende samtalet har avslutats."; -Strings.OfficeOM.L_OperationNotSupported = "Ã…tgärden stöds inte."; -Strings.OfficeOM.L_InvalidGetColumns = "De angivna kolumnerna är ogiltiga."; +Strings.OfficeOM.L_CustomXmlError = "Anpassat XML-fel."; +Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "konfigurera webbläsaren"; +Strings.OfficeOM.L_InValidOptionalArgument = "ogiltigt argument som tillval"; +Strings.OfficeOM.L_InvalidApiCallInContext = "Ogiltigt API-anrop i den aktuella kontexten."; +Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Valt innehÃ¥ll mÃ¥ste vara i tabellformat. Formatera data som en tabell och försök igen."; +Strings.OfficeOM.L_APICallFailed = "API-anropet misslyckades"; +Strings.OfficeOM.L_InvalidBinding = "Ogiltig bindning"; +Strings.OfficeOM.L_InvalidReadForBlankRow = "Den angivna raden är tom."; +Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Obs! De formateringsuppsättningar som anges av ett anrop av formaterings-API:t bör vara under 100."; Strings.OfficeOM.L_BindingNotExist = "Den angivna bindningen finns inte."; -Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Ogiltiga indataargument."; -Strings.OfficeOM.L_UnsupportedUserIdentity = "Användarens identitetstyp stöds inte."; -Strings.OfficeOM.L_ValueNotLoaded = 'Värdet för ett resultatobjekt har inte lästs in ännu. Anropa "context.sync()" i den associerade begärandekontexten innan du läser värdeegenskapen.'; -Strings.OfficeOM.L_CustomXmlNodeNotFound = "Den angivna noden hittades inte."; +Strings.OfficeOM.L_FormatValueOutOfRange = "Värdet ligger utanför det tillÃ¥tna intervallet."; +Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Koordinatparametrar kan inte användas med konverteringstypen Tabell när tabellen innehÃ¥ller sammanfogade celler."; +Strings.OfficeOM.L_DataWriteReminder = "PÃ¥minnelse om dataskrivning"; +Strings.OfficeOM.L_IndexOutOfRange = "Index är utanför intervallet."; +Strings.OfficeOM.L_ElementMissing = "Det gick inte att formatera tabellcellen eftersom vissa parametrar saknas. Kontrollera parametrarna och försök igen."; +Strings.OfficeOM.L_DataReadError = "Dataläsningsfel"; +Strings.OfficeOM.L_InvalidOrTimedOutSession = "Sessionen är ogiltig eller har upphört"; +Strings.OfficeOM.L_InvalidGrantMessage = "Behörighet saknas för detta tillägg."; Strings.OfficeOM.L_PropertyDoesNotExist = "Egenskapen {0} finns inte i objektet."; -Strings.OfficeOM.L_DialogNavigateError = "Fel i dialogrutenavigering"; -Strings.OfficeOM.L_InvalidGetRows = "De angivna raderna är ogiltiga."; -Strings.OfficeOM.L_RequestTimeout = "Det tog för lÃ¥ng tid att köra samtalet."; -Strings.OfficeOM.L_HostError = "Värdfel"; -Strings.OfficeOM.L_ColIndexOutOfRange = "Värdet för kolumnindex ligger utanför det tillÃ¥tna intervallet. Använd ett värde (0 eller högre) som är mindre än antalet kolumner."; -Strings.OfficeOM.L_CoercionTypeNotSupported = "Den angivna konverteringstypen kan inte användas."; -Strings.OfficeOM.L_DataNotMatchSelection = "Det angivna dataobjektet är inte kompatibelt med den aktuella markeringens form och mÃ¥tt."; -Strings.OfficeOM.L_InvalidArgument = "Argumentet {0} fungerar inte för den här situationen, saknas eller har felaktigt format."; -Strings.OfficeOM.L_APICallFailed = "API-anropet misslyckades"; -Strings.OfficeOM.L_DialogAlreadyOpened = "Ã…tgärden misslyckades eftersom tillägget redan har en aktiv dialogruta."; -Strings.OfficeOM.L_UnknownBindingType = "Bindningstypen kan inte användas."; -Strings.OfficeOM.L_CannotRegisterEvent = "Det gÃ¥r inte att registrera händelsehanteraren."; Strings.OfficeOM.L_InvalidSelectionForBindingType = "En bindning kan inte skapas med den aktuella markeringen och den angivna bindningstypen."; -Strings.OfficeOM.L_EventRegistrationError = "Fel vid händelseregistrering"; -Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "TillÃ¥t"; -Strings.OfficeOM.L_UnsupportedDataObject = "Den angivna dataobjekttypen kan inte användas."; -Strings.OfficeOM.L_AppNameNotExist = "Det finns inget tilläggsnamn för {0}."; -Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Den angivna konverteringstypen är inte kompatibel med den här bindningstypen."; +Strings.OfficeOM.L_NavOutOfBound = "Ã…tgärden misslyckades eftersom indexet ligger utanför intervallet."; Strings.OfficeOM.L_ReadSettingsError = "Fel när inställningar lästes"; -Strings.OfficeOM.L_CannotNavigateTo = "Objektet finns pÃ¥ en plats där navigering inte stöds."; -Strings.OfficeOM.L_Timeout = "Ã…tgärden överskred tidsgränsen."; -Strings.OfficeOM.L_ConnectionFailureWithDetails = "Begäran misslyckades med statuskod {0}, felkod {1} och följande felmeddelande: {2}"; -Strings.OfficeOM.L_SetDataIsTooLarge = "Det angivna dataobjektet är för stort."; -Strings.OfficeOM.L_SSOClientError = "Fel uppstod i autentiseringsbegäran frÃ¥n Office."; -Strings.OfficeOM.L_InvalidDataFormat = "Det angivna dataobjektets format är ogiltigt."; -Strings.OfficeOM.L_InvalidCellsValue = "En eller flera av cellens parametrar har värden som inte är tillÃ¥tna. Kontrollera värdena och försök igen."; -Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath begränsar urvalet till 1024 artiklar."; -Strings.OfficeOM.L_SSOServerError = "Fel uppstod i autentiseringsprovidern."; -Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Markeringsgränsen har uppnÃ¥tts"; -Strings.OfficeOM.L_InvalidParameters = "Funktionen {0} har ogiltiga parametrar." +Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Webbläsarbegränsningar hindrade oss frÃ¥n att skapa dialogrutan. Dialogrutans domän och domänen för tilläggsvärden är inte i samma säkerhetszon."; +Strings.OfficeOM.L_OutOfRange = "Utanför intervallet"; +Strings.OfficeOM.L_NoCapability = "Du har inte tillräcklig behörighet för den här Ã¥tgärden."; +Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Data är inaktuella. Hämta objektet igen."; +Strings.OfficeOM.L_CustomFunctionDefinitionMissing = "En egenskap med det här namnet som representerar funktionens definition mÃ¥ste finns för Excel.CustomFunctions."; +Strings.OfficeOM.L_InvalidValue = "Ogiltigt värde"; +Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Den aktuella markeringen är inte kompatibel med den angivna konverteringstypen."; +Strings.OfficeOM.L_InvalidSetStartRowColumn = "De angivna värdena för startRow eller startColumn är ogiltiga."; +Strings.OfficeOM.L_SetDataParametersConflict = "De angivna parametrarna är i konflikt."; +Strings.OfficeOM.L_SettingsStaleError = "Fel med inaktuella inställningar"; +Strings.OfficeOM.L_BindingCreationError = "Fel inträffade när bindningen skapades"; +Strings.OfficeOM.L_DialogNavigateError = "Fel i dialogrutenavigering"; +Strings.OfficeOM.L_InvalidRequestContext = "Det gÃ¥r inte att använda objektet i flera olika begärankontexter."; +Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Anropa closeAsync pÃ¥ den aktuella filen innan du hämtar en annan."; +Strings.OfficeOM.L_UnsupportedEnumeration = "Uppräkning stöds inte" \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/sv-se/office_strings.js b/node_modules/@microsoft/office-js/dist/sv-se/office_strings.js index e0de947..8840a74 100644 --- a/node_modules/@microsoft/office-js/dist/sv-se/office_strings.js +++ b/node_modules/@microsoft/office-js/dist/sv-se/office_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_NotSupportedEventType="Den angivna händelsetypen {0} kan inte användas.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Data är inte aktuella";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Valt innehÃ¥ll mÃ¥ste vara i tabellformat. Formatera data som en tabell och försök igen.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="Ändringar av egenskapen {0} kan inte användas frÃ¥n en object.set-metod.";Strings.OfficeOM.L_SSOServerErrorMessage="Ett oväntat fel uppstod pÃ¥ servern.";Strings.OfficeOM.L_BrowserAPINotSupported="Den begärda API:n stöds inte i den här webbläsaren.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Sessionen är ogiltig eller har upphört";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Den angivna bindningstypen är inte kompatibel med det angivna namngivna objektet.";Strings.OfficeOM.L_SettingNameNotExist="Det angivna inställningsnamnet finns inte.";Strings.OfficeOM.L_InvalidBindingError="Fel med ogiltig bindning";Strings.OfficeOM.L_OverwriteWorksheetData="Den angivna Ã¥tgärden misslyckades eftersom det angivna dataobjektet skriver över eller flyttar data.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Obs! Det bör inte finnas fler än 20 000 celler i en tabell.";Strings.OfficeOM.L_FormatValueOutOfRange="Värdet ligger utanför det tillÃ¥tna intervallet.";Strings.OfficeOM.L_ShuttingDown="Ã…tgärden misslyckades eftersom data är inaktuella pÃ¥ servern.";Strings.OfficeOM.L_RedundantCallbackSpecification="Motringning kan inte anges i bÃ¥de argumentlistan och valfria objekt.";Strings.OfficeOM.L_FileTypeNotSupported="Den angivna filtypen stöds inte.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Obs! De formateringsuppsättningar som anges av ett anrop av formaterings-API:t bör vara under 100.";Strings.OfficeOM.L_CallbackNotAFunction="Motringning mÃ¥ste vara av typen funktion, men var av typen {0}.";Strings.OfficeOM.L_DataNotMatchBindingType="Det angivna dataobjektet är inte kompatibelt med bindningstypen.";Strings.OfficeOM.L_UserNotSignedIn="Ingen användare är inloggad i Office.";Strings.OfficeOM.L_DataNotMatchBindingSize="Det angivna dataobjektet matchar inte storleken pÃ¥ den aktuella markeringen.";Strings.OfficeOM.L_MissingRequiredArguments="saknar vissa obligatoriska argument";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="konfigurera webbläsaren";Strings.OfficeOM.L_BindingCreationError="Fel inträffade när bindningen skapades";Strings.OfficeOM.L_InvalidApiCallInContext="Ogiltigt API-anrop i den aktuella kontexten.";Strings.OfficeOM.L_ActivityLimitReached="Aktivitetsgränsen har nÃ¥tts.";Strings.OfficeOM.L_DataWriteError="Dataskrivningsfel";Strings.OfficeOM.L_DialogInvalidScheme="URL-schemat stöds inte. Använd HTTPS i stället.";Strings.OfficeOM.L_NotSupported="Funktionen {0} stöds inte.";Strings.OfficeOM.L_NewWindowCrossZone="Säkerhetsinställningarna i din webbläsare hindrar oss frÃ¥n att skapa en dialogruta. Försök med en annan webbläsare eller {0} sÃ¥ att {1} och den domän som visas i adressfältet är i samma säkerhetszon.";Strings.OfficeOM.L_TooManyArguments="för mÃ¥nga argument";Strings.OfficeOM.L_OsfControlTypeNotSupported="OsfControl-typen stöds inte.";Strings.OfficeOM.L_APINotSupported="API:n stöds inte";Strings.OfficeOM.L_DisplayDialogError="Fel i dialogrutevisning";Strings.OfficeOM.L_InvalidBinding="Ogiltig bindning";Strings.OfficeOM.L_InvalidAPICall="Ogiltigt API-anrop";Strings.OfficeOM.L_FunctionCallFailed="Funktionsanropet {0} misslyckades, felkod: {1}.";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} vill visa ett nytt fönster.";Strings.OfficeOM.L_InvalidArgumentGeneric="Den eller de argument som överfördes till funktionen fungerar inte i den här situationen, saknas eller är inte i rätt format.";Strings.OfficeOM.L_InvalidTableOptionValue="Ett eller flera av tabellAlternativens parameterar har värden som inte är tillÃ¥tna. Kontrollera värdena och försök igen.";Strings.OfficeOM.L_NotSupportedBindingType="Den angivna bindningstypen {0} kan inte användas.";Strings.OfficeOM.L_InvalidResourceUrl="Ogiltig programresurs-URL har angetts.";Strings.OfficeOM.L_InvalidResourceUrlMessage="Ogiltig resurs-URL har angetts i manifestet.";Strings.OfficeOM.L_UserAbortedMessage="Användaren har inte godkänt behörigheterna för tillägget.";Strings.OfficeOM.L_TooManyOptionalFunction="flera valfria funktioner i parameterlistan";Strings.OfficeOM.L_PropertyNotLoaded='Egenskapen {0} är inte tillgänglig. Innan du läser egenskapens värde anropar du inläsningsmetoden för det innehÃ¥llande objektet och anropar "context.sync()" för den associerade begärankontexten.';Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Koordinatparametrar kan inte användas med konverteringstypen Tabell när tabellen innehÃ¥ller sammanfogade celler.";Strings.OfficeOM.L_OutOfRange="Utanför intervallet";Strings.OfficeOM.L_MemoryLimit="Minnesbegränsningen överskreds";Strings.OfficeOM.L_EventHandlerNotExist="Den angivna händelsehanteraren kan inte användas för den här bindningen.";Strings.OfficeOM.L_SelectionCannotBound="Det gÃ¥r inte att binda till den aktuella markeringen.";Strings.OfficeOM.L_SaveSettingsError="Fel när inställningar sparades";Strings.OfficeOM.L_DocumentReadOnly="Den begärda Ã¥tgärden tillÃ¥ts inte för det aktuella dokumentläget.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Den aktuella markeringen är inte kompatibel med den angivna konverteringstypen.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Tillägget begär redan en Ã¥tkomsttoken.";Strings.OfficeOM.L_RunMustReturnPromise='Batchfunktionen som har överförts till metoden ".run" returnerade inte ett löfte. Funktionen mÃ¥ste returnera ett löfte sÃ¥ att automatiskt spÃ¥rade objekt kan frisläppas när batchen slutförs. Normalt returnerar du ett löfte genom att returnera svaret frÃ¥n "context.sync()".';Strings.OfficeOM.L_InvalidReadForBlankRow="Den angivna raden är tom.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Det gick inte att lägga till händelsehanteraren.";Strings.OfficeOM.L_InvalidValue="Ogiltigt värde";Strings.OfficeOM.L_CustomXmlError="Anpassat XML-fel.";Strings.OfficeOM.L_DataReadError="Dataläsningsfel";Strings.OfficeOM.L_MissingParameter="Parameter saknas";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Webbläsarbegränsningar hindrade oss frÃ¥n att skapa dialogrutan. Dialogrutans domän och domänen för tilläggsvärden är inte i samma säkerhetszon.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="De angivna värdena för rowCount eller columnCount är ogiltiga.";Strings.OfficeOM.L_SSOClientErrorMessage="Ett oväntat fel uppstod i klienten.";Strings.OfficeOM.L_MultipleNamedItemFound="Det finns flera objekt med samma namn.";Strings.OfficeOM.L_InvalidRequestContext="Det gÃ¥r inte att använda objektet i flera olika begärankontexter.";Strings.OfficeOM.L_GetSelectionNotSupported="Den aktuella markeringen stöds inte.";Strings.OfficeOM.L_NetworkProblem="Nätverksproblem";Strings.OfficeOM.L_TooManyOptionalObjects="flera valfria objekt i parameterlistan";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Data är inaktuella. Hämta objektet igen.";Strings.OfficeOM.L_NotImplemented="Funktionen {0} är inte implementerad.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Ignorera";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Ett nätverksproblem förhindrade hämtningen av filen.";Strings.OfficeOM.L_RowIndexOutOfRange="Värdet för radindex ligger utanför det tillÃ¥tna intervallet. Använd ett värde (0 eller högre) som är mindre än antalet rader.";Strings.OfficeOM.L_DataStale="Data är inte aktuella";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Programmet {0} finns inte. Microsoft.Office.WebExtension.initialize(reason) har inte anropats.";Strings.OfficeOM.L_InValidOptionalArgument="ogiltigt argument som tillval";Strings.OfficeOM.L_InvalidGrant="Förauktorisering saknas.";Strings.OfficeOM.L_IndexOutOfRange="Index är utanför intervallet.";Strings.OfficeOM.L_InvalidBindingOperation="Ogiltig Ã¥tgärd för bindning";Strings.OfficeOM.L_DataWriteReminder="PÃ¥minnelse om dataskrivning";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Anropa closeAsync pÃ¥ den aktuella filen innan du hämtar en annan.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="Din Office Online-session har upphört eller är ogiltig. Uppdatera sidan om du vill fortsätta.";Strings.OfficeOM.L_UnsupportedEnumeration="Uppräkning stöds inte";Strings.OfficeOM.L_InvalidGrantMessage="Behörighet saknas för detta tillägg.";Strings.OfficeOM.L_EventHandlerRemovalFailed="Det gick inte att ta bort händelsehanteraren.";Strings.OfficeOM.L_NamedItemNotFound="Det namngivna objektet finns inte.";Strings.OfficeOM.L_SetDataParametersConflict="De angivna parametrarna är i konflikt.";Strings.OfficeOM.L_UserClickIgnore="Användaren valde att ignorera dialogrutan.";Strings.OfficeOM.L_InvalidSetStartRowColumn="De angivna värdena för startRow eller startColumn är ogiltiga.";Strings.OfficeOM.L_InvalidDataObject="Ogiltigt dataobjekt";Strings.OfficeOM.L_SettingsAreStale="Det gick inte att spara inställningarna eftersom de är inaktuella.";Strings.OfficeOM.L_SettingsStaleError="Fel med inaktuella inställningar";Strings.OfficeOM.L_CannotWriteToSelection="Det gÃ¥r inte att skriva till den aktuella markeringen.";Strings.OfficeOM.L_InvalidFormatValue="En eller flera av formatparametrarna har värden som inte är tillÃ¥tna. Kontrollera värdena och försök igen.";Strings.OfficeOM.L_InvalidSSOAddinMessage="Identitets-API stöds inte för detta tillägg.";Strings.OfficeOM.L_GetDataIsTooLarge="Den begärda datauppsättningen är för stor.";Strings.OfficeOM.L_FormattingReminder="FormateringspÃ¥minnelse";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="Försöker att konfigurera den skrivskyddade egenskapen {0}.";Strings.OfficeOM.L_InvalidCoercion="Ogiltig typkonvertering";Strings.OfficeOM.L_InternalErrorDescription="Ett internt fel har uppstÃ¥tt.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="Den här uppräkningen stöds inte i det aktuella värdprogrammet.";Strings.OfficeOM.L_InvalidGetStartRowColumn="De angivna värdena för startRow eller startColumn är ogiltiga.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Användarens identitetstyp stöds inte.";Strings.OfficeOM.L_ConnectionFailureWithStatus="Begäran misslyckades med statuskod {0}.";Strings.OfficeOM.L_BadSelectorString="Strängen som skickades in i väljaren är felaktigt formaterad eller stöds inte.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Koordinatparametrar kan inte användas med konverteringstypen Tabell när tabellen innehÃ¥ller sammanfogade celler.";Strings.OfficeOM.L_BindingToMultipleSelection="Icke sammanhängande markeringar kan inte användas.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Gör ett val.";Strings.OfficeOM.L_NavOutOfBound="Ã…tgärden misslyckades eftersom indexet ligger utanför intervallet.";Strings.OfficeOM.L_InvalidSetRows="De angivna raderna är ogiltiga.";Strings.OfficeOM.L_InvalidColumnsForBinding="De angivna kolumnerna är ogiltiga.";Strings.OfficeOM.L_InvalidNode="Ogiltig nod";Strings.OfficeOM.L_PermissionDenied="Ã…tkomst nekad";Strings.OfficeOM.L_InvalidFormat="Ogiltigt formatfel";Strings.OfficeOM.L_NoCapability="Du har inte tillräcklig behörighet för den här Ã¥tgärden.";Strings.OfficeOM.L_DataNotMatchCoercionType="Det angivna dataobjektets typ är inte kompatibel med den aktuella markeringen.";Strings.OfficeOM.L_SpecifiedIdNotExist="Det angivna ID:t finns inte.";Strings.OfficeOM.L_DialogRequireHTTPS="HTTP-protokollet stöds inte. Använd HTTPS i stället";Strings.OfficeOM.L_RequestTokenUnavailable="Den här API:n har begränsats för att sänka samtalsfrekvensen.";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_SettingsCannotSave="Inställningarna kunde inte sparas.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Ã…tgärden stöds inte för den här bindningstypen.";Strings.OfficeOM.L_ElementMissing="Det gick inte att formatera tabellcellen eftersom vissa parametrar saknas. Kontrollera parametrarna och försök igen.";Strings.OfficeOM.L_InvalidObjectPath='Objektsökvägen {0} fungerar inte för det du försöker göra. Om du använder objektet i flera "context.sync"-anrop och utanför den sekventiella körningen av en ".run"-batch använder du metoderna "context.trackedObjects.add()" och "context.trackedObjects.remove()" för att hantera objektets livstid.';Strings.OfficeOM.L_SliceSizeNotSupported="Den angivna segmentstorleken stöds inte.";Strings.OfficeOM.L_InternalError="Internt fel";Strings.OfficeOM.L_UserAborted="Användaren avbröt begäran om godkännande.";Strings.OfficeOM.L_InvalidSetColumns="De angivna kolumnerna är ogiltiga.";Strings.OfficeOM.L_InitializeNotReady="Office.js har inte lästs in helt ännu. Försök igen senare eller lägg till din initieringskod för funktionen Office.initialize.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Ã…tgärden misslyckades eftersom tillägget redan begär en Ã¥tkomsttoken.";Strings.OfficeOM.L_GetDataParametersConflict="De angivna parametrarna är i konflikt.";Strings.OfficeOM.L_DialogAddressNotTrusted="URL-adressens domän ingÃ¥r inte i AppDomains-elementet i manifestet.";Strings.OfficeOM.L_TooManyIncompleteRequests="Vänta tills det föregÃ¥ende samtalet har avslutats.";Strings.OfficeOM.L_OperationNotSupported="Ã…tgärden stöds inte.";Strings.OfficeOM.L_InvalidGetColumns="De angivna kolumnerna är ogiltiga.";Strings.OfficeOM.L_BindingNotExist="Den angivna bindningen finns inte.";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Ogiltiga indataargument.";Strings.OfficeOM.L_UnsupportedUserIdentity="Användarens identitetstyp stöds inte.";Strings.OfficeOM.L_ValueNotLoaded='Värdet för ett resultatobjekt har inte lästs in ännu. Anropa "context.sync()" i den associerade begärandekontexten innan du läser värdeegenskapen.';Strings.OfficeOM.L_CustomXmlNodeNotFound="Den angivna noden hittades inte.";Strings.OfficeOM.L_PropertyDoesNotExist="Egenskapen {0} finns inte i objektet.";Strings.OfficeOM.L_DialogNavigateError="Fel i dialogrutenavigering";Strings.OfficeOM.L_InvalidGetRows="De angivna raderna är ogiltiga.";Strings.OfficeOM.L_RequestTimeout="Det tog för lÃ¥ng tid att köra samtalet.";Strings.OfficeOM.L_HostError="Värdfel";Strings.OfficeOM.L_ColIndexOutOfRange="Värdet för kolumnindex ligger utanför det tillÃ¥tna intervallet. Använd ett värde (0 eller högre) som är mindre än antalet kolumner.";Strings.OfficeOM.L_CoercionTypeNotSupported="Den angivna konverteringstypen kan inte användas.";Strings.OfficeOM.L_DataNotMatchSelection="Det angivna dataobjektet är inte kompatibelt med den aktuella markeringens form och mÃ¥tt.";Strings.OfficeOM.L_InvalidArgument="Argumentet {0} fungerar inte för den här situationen, saknas eller har felaktigt format.";Strings.OfficeOM.L_APICallFailed="API-anropet misslyckades";Strings.OfficeOM.L_DialogAlreadyOpened="Ã…tgärden misslyckades eftersom tillägget redan har en aktiv dialogruta.";Strings.OfficeOM.L_UnknownBindingType="Bindningstypen kan inte användas.";Strings.OfficeOM.L_CannotRegisterEvent="Det gÃ¥r inte att registrera händelsehanteraren.";Strings.OfficeOM.L_InvalidSelectionForBindingType="En bindning kan inte skapas med den aktuella markeringen och den angivna bindningstypen.";Strings.OfficeOM.L_EventRegistrationError="Fel vid händelseregistrering";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="TillÃ¥t";Strings.OfficeOM.L_UnsupportedDataObject="Den angivna dataobjekttypen kan inte användas.";Strings.OfficeOM.L_AppNameNotExist="Det finns inget tilläggsnamn för {0}.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Den angivna konverteringstypen är inte kompatibel med den här bindningstypen.";Strings.OfficeOM.L_ReadSettingsError="Fel när inställningar lästes";Strings.OfficeOM.L_CannotNavigateTo="Objektet finns pÃ¥ en plats där navigering inte stöds.";Strings.OfficeOM.L_Timeout="Ã…tgärden överskred tidsgränsen.";Strings.OfficeOM.L_ConnectionFailureWithDetails="Begäran misslyckades med statuskod {0}, felkod {1} och följande felmeddelande: {2}";Strings.OfficeOM.L_SetDataIsTooLarge="Det angivna dataobjektet är för stort.";Strings.OfficeOM.L_SSOClientError="Fel uppstod i autentiseringsbegäran frÃ¥n Office.";Strings.OfficeOM.L_InvalidDataFormat="Det angivna dataobjektets format är ogiltigt.";Strings.OfficeOM.L_InvalidCellsValue="En eller flera av cellens parametrar har värden som inte är tillÃ¥tna. Kontrollera värdena och försök igen.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath begränsar urvalet till 1024 artiklar.";Strings.OfficeOM.L_SSOServerError="Fel uppstod i autentiseringsprovidern.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Markeringsgränsen har uppnÃ¥tts";Strings.OfficeOM.L_InvalidParameters="Funktionen {0} har ogiltiga parametrar." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_DialogInvalidScheme="URL-schemat stöds inte. Använd HTTPS i stället.";Strings.OfficeOM.L_DisplayDialogError="Fel i dialogrutevisning";Strings.OfficeOM.L_MissingParameter="Parameter saknas";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Koordinatparametrar kan inte användas med konverteringstypen Tabell när tabellen innehÃ¥ller sammanfogade celler.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Den angivna konverteringstypen är inte kompatibel med den här bindningstypen.";Strings.OfficeOM.L_ApiNotFoundDetails="Metoden eller egenskapen {0} är en del av kravuppsättningen för {1}, som inte är tillgängligt i din version av {2}.";Strings.OfficeOM.L_FileTypeNotSupported="Den angivna filtypen stöds inte.";Strings.OfficeOM.L_InternalErrorDescription="Ett internt fel har uppstÃ¥tt.";Strings.OfficeOM.L_RedundantCallbackSpecification="Motringning kan inte anges i bÃ¥de argumentlistan och valfria objekt.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Programmet {0} finns inte. Microsoft.Office.WebExtension.initialize(reason) har inte anropats.";Strings.OfficeOM.L_InvalidColumnsForBinding="De angivna kolumnerna är ogiltiga.";Strings.OfficeOM.L_MemoryLimit="Minnesbegränsningen överskreds";Strings.OfficeOM.L_InvalidArgumentGeneric="Den eller de argument som överfördes till funktionen fungerar inte i den här situationen, saknas eller är inte i rätt format.";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Ogiltiga indataargument.";Strings.OfficeOM.L_InvalidAPICall="Ogiltigt API-anrop";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="Din Office Online-session har upphört eller är ogiltig. Uppdatera sidan om du vill fortsätta.";Strings.OfficeOM.L_Timeout="Ã…tgärden överskred tidsgränsen.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Tillägget begär redan en Ã¥tkomsttoken.";Strings.OfficeOM.L_AppNameNotExist="Det finns inget tilläggsnamn för {0}.";Strings.OfficeOM.L_SaveSettingsError="Fel när inställningar sparades";Strings.OfficeOM.L_DataStale="Data är inte aktuella";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="TillÃ¥t";Strings.OfficeOM.L_InvalidBindingError="Fel med ogiltig bindning";Strings.OfficeOM.L_EventHandlerRemovalFailed="Det gick inte att ta bort händelsehanteraren.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Ã…tgärden stöds inte för den här bindningstypen.";Strings.OfficeOM.L_GetDataIsTooLarge="Den begärda datauppsättningen är för stor.";Strings.OfficeOM.L_EventRegistrationError="Fel vid händelseregistrering";Strings.OfficeOM.L_UserClickIgnore="Användaren valde att ignorera dialogrutan.";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_RowIndexOutOfRange="Värdet för radindex ligger utanför det tillÃ¥tna intervallet. Använd ett värde (0 eller högre) som är mindre än antalet rader.";Strings.OfficeOM.L_HostError="Värdfel";Strings.OfficeOM.L_CoercionTypeNotSupported="Den angivna konverteringstypen kan inte användas.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Ignorera";Strings.OfficeOM.L_SSOConnectionLostErrorMessage="A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones.";Strings.OfficeOM.L_TooManyOptionalFunction="flera valfria funktioner i parameterlistan";Strings.OfficeOM.L_InvalidArgument="Argumentet {0} fungerar inte för den här situationen, saknas eller har felaktigt format.";Strings.OfficeOM.L_CustomFunctionNameCannotSplit="Funktionsnamnet mÃ¥ste innehÃ¥lla ett icke-tomt namnomrÃ¥de och ett icke-tomt kortnamn.";Strings.OfficeOM.L_SSOServerError="Fel uppstod i autentiseringsprovidern.";Strings.OfficeOM.L_SSOConnectionLostError="A connection was lost during the sign in process.";Strings.OfficeOM.L_PropertyNotLoaded='Egenskapen {0} är inte tillgänglig. Innan du läser egenskapens värde anropar du inläsningsmetoden för det innehÃ¥llande objektet och anropar "context.sync()" för den associerade begärankontexten.';Strings.OfficeOM.L_RequestTimeout="Det tog för lÃ¥ng tid att köra samtalet.";Strings.OfficeOM.L_GetSelectionNotSupported="Den aktuella markeringen stöds inte.";Strings.OfficeOM.L_OsfControlTypeNotSupported="OsfControl-typen stöds inte.";Strings.OfficeOM.L_InvalidDataFormat="Det angivna dataobjektets format är ogiltigt.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Markeringsgränsen har uppnÃ¥tts";Strings.OfficeOM.L_UserNotSignedIn="Ingen användare är inloggad i Office.";Strings.OfficeOM.L_APINotSupported="API:n stöds inte";Strings.OfficeOM.L_InvalidGetRowColumnCounts="De angivna värdena för rowCount eller columnCount är ogiltiga.";Strings.OfficeOM.L_InvalidGetRows="De angivna raderna är ogiltiga.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Ã…tgärden misslyckades eftersom tillägget redan begär en Ã¥tkomsttoken.";Strings.OfficeOM.L_DocumentReadOnly="Den begärda Ã¥tgärden tillÃ¥ts inte för det aktuella dokumentläget.";Strings.OfficeOM.L_CallbackNotAFunction="Motringning mÃ¥ste vara av typen funktion, men var av typen {0}.";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} vill visa ett nytt fönster.";Strings.OfficeOM.L_OperationNotSupported="Ã…tgärden stöds inte.";Strings.OfficeOM.L_BindingToMultipleSelection="Icke sammanhängande markeringar kan inte användas.";Strings.OfficeOM.L_SelectionCannotBound="Det gÃ¥r inte att binda till den aktuella markeringen.";Strings.OfficeOM.L_UnknownBindingType="Bindningstypen kan inte användas.";Strings.OfficeOM.L_UnsupportedUserIdentity="Användarens identitetstyp stöds inte.";Strings.OfficeOM.L_DataNotMatchSelection="Det angivna dataobjektet är inte kompatibelt med den aktuella markeringens form och mÃ¥tt.";Strings.OfficeOM.L_InvalidFormatValue="En eller flera av formatparametrarna har värden som inte är tillÃ¥tna. Kontrollera värdena och försök igen.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Det gick inte att lägga till händelsehanteraren.";Strings.OfficeOM.L_ColIndexOutOfRange="Värdet för kolumnindex ligger utanför det tillÃ¥tna intervallet. Använd ett värde (0 eller högre) som är mindre än antalet kolumner.";Strings.OfficeOM.L_InvalidParameters="Funktionen {0} har ogiltiga parametrar.";Strings.OfficeOM.L_InvalidGrant="Förauktorisering saknas.";Strings.OfficeOM.L_ShuttingDown="Ã…tgärden misslyckades eftersom data är inaktuella pÃ¥ servern.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Data är inte aktuella";Strings.OfficeOM.L_DataNotMatchBindingType="Det angivna dataobjektet är inte kompatibelt med bindningstypen.";Strings.OfficeOM.L_InvalidTableOptionValue="Ett eller flera av tabellAlternativens parameterar har värden som inte är tillÃ¥tna. Kontrollera värdena och försök igen.";Strings.OfficeOM.L_DialogAlreadyOpened="Ã…tgärden misslyckades eftersom tillägget redan har en aktiv dialogruta.";Strings.OfficeOM.L_InternalError="Internt fel";Strings.OfficeOM.L_RequestTokenUnavailable="Den här API:n har begränsats för att sänka samtalsfrekvensen.";Strings.OfficeOM.L_MissingRequiredArguments="saknar vissa obligatoriska argument";Strings.OfficeOM.L_CustomFunctionNameContainsBadChars="Funktionsnamnet fÃ¥r bara innehÃ¥lla bokstäver, siffror, understreck och punkter.";Strings.OfficeOM.L_NotSupported="Funktionen {0} stöds inte.";Strings.OfficeOM.L_NotImplemented="Funktionen {0} är inte implementerad.";Strings.OfficeOM.L_CustomFunctionImplementationMissing="Egenskapen med det här namnet för Excel.CustomFunctions som representerar funktionens definition mÃ¥ste innehÃ¥lla en anropsegenskap som implementerar funktionen.";Strings.OfficeOM.L_UserAborted="Användaren avbröt begäran om godkännande.";Strings.OfficeOM.L_PermissionDenied="Ã…tkomst nekad";Strings.OfficeOM.L_DataNotMatchBindingSize="Det angivna dataobjektet matchar inte storleken pÃ¥ den aktuella markeringen.";Strings.OfficeOM.L_InvalidBindingOperation="Ogiltig Ã¥tgärd för bindning";Strings.OfficeOM.L_SettingsAreStale="Det gick inte att spara inställningarna eftersom de är inaktuella.";Strings.OfficeOM.L_NotSupportedEventType="Den angivna händelsetypen {0} kan inte användas.";Strings.OfficeOM.L_NetworkProblem="Nätverksproblem";Strings.OfficeOM.L_SSOServerErrorMessage="Ett oväntat fel uppstod pÃ¥ servern.";Strings.OfficeOM.L_SSOClientError="Fel uppstod i autentiseringsbegäran frÃ¥n Office.";Strings.OfficeOM.L_SpecifiedIdNotExist="Det angivna ID:t finns inte.";Strings.OfficeOM.L_SettingsCannotSave="Inställningarna kunde inte sparas.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="Försöker att konfigurera den skrivskyddade egenskapen {0}.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Den angivna bindningstypen är inte kompatibel med det angivna namngivna objektet.";Strings.OfficeOM.L_OverwriteWorksheetData="Den angivna Ã¥tgärden misslyckades eftersom det angivna dataobjektet skriver över eller flyttar data.";Strings.OfficeOM.L_InvalidGetStartRowColumn="De angivna värdena för startRow eller startColumn är ogiltiga.";Strings.OfficeOM.L_InvalidOperationInCellEditMode="Excel är i cellredigeringsläge. Avsluta redigeringsläget genom att trycka pÃ¥ RETUR eller TABB eller genom att markera en annan cell och sedan försöka igen.";Strings.OfficeOM.L_NamedItemNotFound="Det namngivna objektet finns inte.";Strings.OfficeOM.L_DialogAddressNotTrusted="URL-adressens domän ingÃ¥r inte i AppDomains-elementet i manifestet.";Strings.OfficeOM.L_InvalidNode="Ogiltig nod";Strings.OfficeOM.L_ConnectionFailureWithDetails="Begäran misslyckades med statuskod {0}, felkod {1} och följande felmeddelande: {2}";Strings.OfficeOM.L_InvalidDataObject="Ogiltigt dataobjekt";Strings.OfficeOM.L_CannotRegisterEvent="Det gÃ¥r inte att registrera händelsehanteraren.";Strings.OfficeOM.L_SliceSizeNotSupported="Den angivna segmentstorleken stöds inte.";Strings.OfficeOM.L_InvalidCellsValue="En eller flera av cellens parametrar har värden som inte är tillÃ¥tna. Kontrollera värdena och försök igen.";Strings.OfficeOM.L_TooManyArguments="för mÃ¥nga argument";Strings.OfficeOM.L_SSOClientErrorMessage="Ett oväntat fel uppstod i klienten.";Strings.OfficeOM.L_InvalidCoercion="Ogiltig typkonvertering";Strings.OfficeOM.L_CannotNavigateTo="Objektet finns pÃ¥ en plats där navigering inte stöds.";Strings.OfficeOM.L_TooManyIncompleteRequests="Vänta tills det föregÃ¥ende samtalet har avslutats.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Användarens identitetstyp stöds inte.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Obs! Det bör inte finnas fler än 20 000 celler i en tabell.";Strings.OfficeOM.L_SettingNameNotExist="Det angivna inställningsnamnet finns inte.";Strings.OfficeOM.L_GetDataParametersConflict="De angivna parametrarna är i konflikt.";Strings.OfficeOM.L_SetDataIsTooLarge="Det angivna dataobjektet är för stort.";Strings.OfficeOM.L_InvalidSetRows="De angivna raderna är ogiltiga.";Strings.OfficeOM.L_InvalidSSOAddinMessage="Identitets-API stöds inte för detta tillägg.";Strings.OfficeOM.L_InvalidGetColumns="De angivna kolumnerna är ogiltiga.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Gör ett val.";Strings.OfficeOM.L_ValueNotLoaded='Värdet för ett resultatobjekt har inte lästs in ännu. Anropa "context.sync()" i den associerade begärandekontexten innan du läser värdeegenskapen.';Strings.OfficeOM.L_ActivityLimitReached="Aktivitetsgränsen har nÃ¥tts.";Strings.OfficeOM.L_NewWindowCrossZone="Säkerhetsinställningarna i din webbläsare hindrar oss frÃ¥n att skapa en dialogruta. Försök med en annan webbläsare eller {0} sÃ¥ att {1} och den domän som visas i adressfältet är i samma säkerhetszon.";Strings.OfficeOM.L_RunMustReturnPromise='Batchfunktionen som har överförts till metoden ".run" returnerade inte ett löfte. Funktionen mÃ¥ste returnera ett löfte sÃ¥ att automatiskt spÃ¥rade objekt kan frisläppas när batchen slutförs. Normalt returnerar du ett löfte genom att returnera svaret frÃ¥n "context.sync()".';Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage="Ã…tgärden misslyckades eftersom tillägget inte stöder användarmedgivande i den här kategorin";Strings.OfficeOM.L_InvalidFormat="Ogiltigt formatfel";Strings.OfficeOM.L_FormattingReminder="FormateringspÃ¥minnelse";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath begränsar urvalet till 1024 artiklar.";Strings.OfficeOM.L_FunctionCallFailed="Funktionsanropet {0} misslyckades, felkod: {1}.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="Den här uppräkningen stöds inte i det aktuella värdprogrammet.";Strings.OfficeOM.L_TooManyOptionalObjects="flera valfria objekt i parameterlistan";Strings.OfficeOM.L_DialogRequireHTTPS="HTTP-protokollet stöds inte. Använd HTTPS i stället";Strings.OfficeOM.L_InvalidResourceUrl="Ogiltig programresurs-URL har angetts.";Strings.OfficeOM.L_BadSelectorString="Strängen som skickades in i väljaren är felaktigt formaterad eller stöds inte.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="Ändringar av egenskapen {0} kan inte användas frÃ¥n en object.set-metod.";Strings.OfficeOM.L_CannotWriteToSelection="Det gÃ¥r inte att skriva till den aktuella markeringen.";Strings.OfficeOM.L_MultipleNamedItemFound="Det finns flera objekt med samma namn.";Strings.OfficeOM.L_CustomXmlNodeNotFound="Den angivna noden hittades inte.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Ett nätverksproblem förhindrade hämtningen av filen.";Strings.OfficeOM.L_UserAbortedMessage="Användaren har inte godkänt behörigheterna för tillägget.";Strings.OfficeOM.L_EventHandlerNotExist="Den angivna händelsehanteraren kan inte användas för den här bindningen.";Strings.OfficeOM.L_DataNotMatchCoercionType="Det angivna dataobjektets typ är inte kompatibel med den aktuella markeringen.";Strings.OfficeOM.L_InvalidResourceUrlMessage="Ogiltig resurs-URL har angetts i manifestet.";Strings.OfficeOM.L_InvalidObjectPath='Objektsökvägen {0} fungerar inte för det du försöker göra. Om du använder objektet i flera "context.sync"-anrop och utanför den sekventiella körningen av en ".run"-batch använder du metoderna "context.trackedObjects.add()" och "context.trackedObjects.remove()" för att hantera objektets livstid.';Strings.OfficeOM.L_BrowserAPINotSupported="Den begärda API:n stöds inte i den här webbläsaren.";Strings.OfficeOM.L_InvalidSetColumns="De angivna kolumnerna är ogiltiga.";Strings.OfficeOM.L_UnsupportedDataObject="Den angivna dataobjekttypen kan inte användas.";Strings.OfficeOM.L_ConnectionFailureWithStatus="Begäran misslyckades med statuskod {0}.";Strings.OfficeOM.L_DataWriteError="Dataskrivningsfel";Strings.OfficeOM.L_NotSupportedBindingType="Den angivna bindningstypen {0} kan inte användas.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory="Det här tillägget stöder inte användarmedgivande.";Strings.OfficeOM.L_InitializeNotReady="Office.js har inte lästs in helt ännu. Försök igen senare eller lägg till din initieringskod för funktionen Office.initialize.";Strings.OfficeOM.L_CustomXmlError="Anpassat XML-fel.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="konfigurera webbläsaren";Strings.OfficeOM.L_InValidOptionalArgument="ogiltigt argument som tillval";Strings.OfficeOM.L_InvalidApiCallInContext="Ogiltigt API-anrop i den aktuella kontexten.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Valt innehÃ¥ll mÃ¥ste vara i tabellformat. Formatera data som en tabell och försök igen.";Strings.OfficeOM.L_APICallFailed="API-anropet misslyckades";Strings.OfficeOM.L_InvalidBinding="Ogiltig bindning";Strings.OfficeOM.L_InvalidReadForBlankRow="Den angivna raden är tom.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Obs! De formateringsuppsättningar som anges av ett anrop av formaterings-API:t bör vara under 100.";Strings.OfficeOM.L_BindingNotExist="Den angivna bindningen finns inte.";Strings.OfficeOM.L_FormatValueOutOfRange="Värdet ligger utanför det tillÃ¥tna intervallet.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Koordinatparametrar kan inte användas med konverteringstypen Tabell när tabellen innehÃ¥ller sammanfogade celler.";Strings.OfficeOM.L_DataWriteReminder="PÃ¥minnelse om dataskrivning";Strings.OfficeOM.L_IndexOutOfRange="Index är utanför intervallet.";Strings.OfficeOM.L_ElementMissing="Det gick inte att formatera tabellcellen eftersom vissa parametrar saknas. Kontrollera parametrarna och försök igen.";Strings.OfficeOM.L_DataReadError="Dataläsningsfel";Strings.OfficeOM.L_InvalidOrTimedOutSession="Sessionen är ogiltig eller har upphört";Strings.OfficeOM.L_InvalidGrantMessage="Behörighet saknas för detta tillägg.";Strings.OfficeOM.L_PropertyDoesNotExist="Egenskapen {0} finns inte i objektet.";Strings.OfficeOM.L_InvalidSelectionForBindingType="En bindning kan inte skapas med den aktuella markeringen och den angivna bindningstypen.";Strings.OfficeOM.L_NavOutOfBound="Ã…tgärden misslyckades eftersom indexet ligger utanför intervallet.";Strings.OfficeOM.L_ReadSettingsError="Fel när inställningar lästes";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Webbläsarbegränsningar hindrade oss frÃ¥n att skapa dialogrutan. Dialogrutans domän och domänen för tilläggsvärden är inte i samma säkerhetszon.";Strings.OfficeOM.L_OutOfRange="Utanför intervallet";Strings.OfficeOM.L_NoCapability="Du har inte tillräcklig behörighet för den här Ã¥tgärden.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Data är inaktuella. Hämta objektet igen.";Strings.OfficeOM.L_CustomFunctionDefinitionMissing="En egenskap med det här namnet som representerar funktionens definition mÃ¥ste finns för Excel.CustomFunctions.";Strings.OfficeOM.L_InvalidValue="Ogiltigt värde";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Den aktuella markeringen är inte kompatibel med den angivna konverteringstypen.";Strings.OfficeOM.L_InvalidSetStartRowColumn="De angivna värdena för startRow eller startColumn är ogiltiga.";Strings.OfficeOM.L_SetDataParametersConflict="De angivna parametrarna är i konflikt.";Strings.OfficeOM.L_SettingsStaleError="Fel med inaktuella inställningar";Strings.OfficeOM.L_BindingCreationError="Fel inträffade när bindningen skapades";Strings.OfficeOM.L_DialogNavigateError="Fel i dialogrutenavigering";Strings.OfficeOM.L_InvalidRequestContext="Det gÃ¥r inte att använda objektet i flera olika begärankontexter.";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Anropa closeAsync pÃ¥ den aktuella filen innan du hämtar en annan.";Strings.OfficeOM.L_UnsupportedEnumeration="Uppräkning stöds inte" \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/sv-se/outlook_strings.debug.js b/node_modules/@microsoft/office-js/dist/sv-se/outlook_strings.debug.js index 8814fe2..67e1c54 100644 --- a/node_modules/@microsoft/office-js/dist/sv-se/outlook_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/sv-se/outlook_strings.debug.js @@ -1,34 +1,35 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("_u"); _u.ExtensibilityStrings = function() { }; _u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings"); -_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "En eller flera av de angivna e-postadresserna är för lÃ¥nga."; -_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Ett eller flera av de angivna visningsnamnen är för lÃ¥nga."; -_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "HTML-rensningen misslyckades."; +_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Det gÃ¥r inte att ta bort den bifogade filen frÃ¥n objektet."; +_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "De givna parametrarna matchar inte förväntat format."; +_u.ExtensibilityStrings.l_InternalProtocolError_Text = "Internt protokollfel: {0}."; _u.ExtensibilityStrings.l_OffsetNotfound_Text = "Ingen förskjutning hittades för den här tidsstämpeln."; +_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "Det markerade objektet har ändrats."; +_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Det gÃ¥r inte att bifoga filen till objektet."; +_u.ExtensibilityStrings.l_InvalidEndTime_Text = "Sluttiden kan inte vara före starttiden."; +_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Det gÃ¥r inte att bifoga filer under tiden som hela svaret eller vidarebefordran hämtas frÃ¥n servern."; +_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Det gÃ¥r inte att ta bort den bifogade filen, eftersom det inte gÃ¥r att hitta nÃ¥gon bifogad fil med det indexet."; +_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "ID:t för bifogad fil är ogiltigt."; _u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Det gÃ¥r inte att bifoga filer, eftersom meddelandet redan har högsta möjliga antal bifogade filer"; -_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Dataskrivningsfel"; _u.ExtensibilityStrings.l_InvalidDate_Text = "Indata omvandlas inte till ett giltigt datum."; -_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Storleken pÃ¥ begäran överskrider gränsen pÃ¥ 1 MB. Ändra din EWS-begäran."; -_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "Sökvägen för bifogad fil är ogiltig."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "Förhöjd behörighet krävs för att anropa metoden: {0}."; -_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Det gÃ¥r inte att bifoga filer under tiden som hela svaret eller vidarebefordran hämtas frÃ¥n servern."; -_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "Användaren tog bort den bifogade filen innan uppladdningen slutfördes."; _u.ExtensibilityStrings.l_CursorPositionChanged_Text = "Användaren ändrade markörens läge under tiden som data infogades."; -_u.ExtensibilityStrings.l_InvalidEndTime_Text = "Sluttiden kan inte vara före starttiden."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Förhöjd behörighet krävs för Ã¥tkomst till skyddade medlemmar av JavaScript API:n för Office."; -_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Det totala antalet mottagare i fältet fÃ¥r inte överstiga {0}."; -_u.ExtensibilityStrings.l_InternalProtocolError_Text = "Internt protokollfel: {0}."; -_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "ID:t för bifogad fil är ogiltigt."; -_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "Det markerade objektet har ändrats."; -_u.ExtensibilityStrings.l_InternalFormatError_Text = "Ett internt formatfel uppstod."; -_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Det gÃ¥r inte att ta bort den bifogade filen frÃ¥n objektet."; +_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "Användaren tog bort den bifogade filen innan uppladdningen slutfördes."; _u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Det gÃ¥r inte att bifoga filen eftersom den är för stor."; +_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "Sökvägen för bifogad fil är ogiltig."; +_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "En eller flera av de angivna e-postadresserna är för lÃ¥nga."; +_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Inga giltiga mottagare angavs."; _u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Fel i bifogad fil"; -_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "De givna parametrarna matchar inte förväntat format."; +_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Det totala antalet mottagare i fältet fÃ¥r inte överstiga {0}."; +_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Storleken pÃ¥ begäran överskrider gränsen pÃ¥ 1 MB. Ändra din EWS-begäran."; _u.ExtensibilityStrings.l_InvalidEventDates_Text = "Slutdatumet infaller före startdatumet."; -_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Det gÃ¥r inte att bifoga filen till objektet."; -_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Det gÃ¥r inte att ta bort den bifogade filen, eftersom det inte gÃ¥r att hitta nÃ¥gon bifogad fil med det indexet."; -_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Inga giltiga mottagare angavs." +_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "Förhöjd behörighet krävs för att anropa metoden: {0}."; +_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Förhöjd behörighet krävs för Ã¥tkomst till skyddade medlemmar av JavaScript API:n för Office."; +_u.ExtensibilityStrings.l_InternalFormatError_Text = "Ett internt formatfel uppstod."; +_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Ett eller flera av de angivna visningsnamnen är för lÃ¥nga."; +_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Dataskrivningsfel"; +_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "HTML-rensningen misslyckades." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/sv-se/outlook_strings.js b/node_modules/@microsoft/office-js/dist/sv-se/outlook_strings.js index 3859875..3911a9f 100644 --- a/node_modules/@microsoft/office-js/dist/sv-se/outlook_strings.js +++ b/node_modules/@microsoft/office-js/dist/sv-se/outlook_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="En eller flera av de angivna e-postadresserna är för lÃ¥nga.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Ett eller flera av de angivna visningsnamnen är för lÃ¥nga.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="HTML-rensningen misslyckades.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Ingen förskjutning hittades för den här tidsstämpeln.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Det gÃ¥r inte att bifoga filer, eftersom meddelandet redan har högsta möjliga antal bifogade filer";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Dataskrivningsfel";_u.ExtensibilityStrings.l_InvalidDate_Text="Indata omvandlas inte till ett giltigt datum.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Storleken pÃ¥ begäran överskrider gränsen pÃ¥ 1 MB. Ändra din EWS-begäran.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="Sökvägen för bifogad fil är ogiltig.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Förhöjd behörighet krävs för att anropa metoden: {0}.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Det gÃ¥r inte att bifoga filer under tiden som hela svaret eller vidarebefordran hämtas frÃ¥n servern.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="Användaren tog bort den bifogade filen innan uppladdningen slutfördes.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="Användaren ändrade markörens läge under tiden som data infogades.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="Sluttiden kan inte vara före starttiden.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Förhöjd behörighet krävs för Ã¥tkomst till skyddade medlemmar av JavaScript API:n för Office.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Det totala antalet mottagare i fältet fÃ¥r inte överstiga {0}.";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Internt protokollfel: {0}.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="ID:t för bifogad fil är ogiltigt.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Det markerade objektet har ändrats.";_u.ExtensibilityStrings.l_InternalFormatError_Text="Ett internt formatfel uppstod.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Det gÃ¥r inte att ta bort den bifogade filen frÃ¥n objektet.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Det gÃ¥r inte att bifoga filen eftersom den är för stor.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Fel i bifogad fil";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="De givna parametrarna matchar inte förväntat format.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="Slutdatumet infaller före startdatumet.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Det gÃ¥r inte att bifoga filen till objektet.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Det gÃ¥r inte att ta bort den bifogade filen, eftersom det inte gÃ¥r att hitta nÃ¥gon bifogad fil med det indexet.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Inga giltiga mottagare angavs." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Det gÃ¥r inte att ta bort den bifogade filen frÃ¥n objektet.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="De givna parametrarna matchar inte förväntat format.";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Internt protokollfel: {0}.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Ingen förskjutning hittades för den här tidsstämpeln.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Det markerade objektet har ändrats.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Det gÃ¥r inte att bifoga filen till objektet.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="Sluttiden kan inte vara före starttiden.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Det gÃ¥r inte att bifoga filer under tiden som hela svaret eller vidarebefordran hämtas frÃ¥n servern.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Det gÃ¥r inte att ta bort den bifogade filen, eftersom det inte gÃ¥r att hitta nÃ¥gon bifogad fil med det indexet.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="ID:t för bifogad fil är ogiltigt.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Det gÃ¥r inte att bifoga filer, eftersom meddelandet redan har högsta möjliga antal bifogade filer";_u.ExtensibilityStrings.l_InvalidDate_Text="Indata omvandlas inte till ett giltigt datum.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="Användaren ändrade markörens läge under tiden som data infogades.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="Användaren tog bort den bifogade filen innan uppladdningen slutfördes.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Det gÃ¥r inte att bifoga filen eftersom den är för stor.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="Sökvägen för bifogad fil är ogiltig.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="En eller flera av de angivna e-postadresserna är för lÃ¥nga.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Inga giltiga mottagare angavs.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Fel i bifogad fil";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Det totala antalet mottagare i fältet fÃ¥r inte överstiga {0}.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Storleken pÃ¥ begäran överskrider gränsen pÃ¥ 1 MB. Ändra din EWS-begäran.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="Slutdatumet infaller före startdatumet.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Förhöjd behörighet krävs för att anropa metoden: {0}.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Förhöjd behörighet krävs för Ã¥tkomst till skyddade medlemmar av JavaScript API:n för Office.";_u.ExtensibilityStrings.l_InternalFormatError_Text="Ett internt formatfel uppstod.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Ett eller flera av de angivna visningsnamnen är för lÃ¥nga.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Dataskrivningsfel";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="HTML-rensningen misslyckades." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/th-th/office_strings.debug.js b/node_modules/@microsoft/office-js/dist/th-th/office_strings.debug.js index 37a233a..78e3479 100644 --- a/node_modules/@microsoft/office-js/dist/th-th/office_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/th-th/office_strings.debug.js @@ -1,179 +1,190 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("Strings"); Strings.OfficeOM = function() { }; Strings.OfficeOM.registerClass("Strings.OfficeOM"); +Strings.OfficeOM.L_APICallFailed = "à¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸ API ล้มเหลว"; +Strings.OfficeOM.L_DataWriteReminder = "ตัวเตือนà¸à¸²à¸£à¹€à¸‚ียนข้อมูล"; +Strings.OfficeOM.L_FormatValueOutOfRange = "ค่าอยู่นอà¸à¸Šà¹ˆà¸§à¸‡à¸—ี่อนุà¸à¸²à¸• "; +Strings.OfficeOM.L_OperationNotSupported = "ไม่สนับสนุนà¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸™à¸µà¹‰"; +Strings.OfficeOM.L_NetworkProblem = "ปัà¸à¸«à¸²à¹€à¸„รือข่าย"; +Strings.OfficeOM.L_PropertyDoesNotExist = "คุณสมบัติ '{0}' ไม่มีในวัตถุ "; +Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "โปรดเลือà¸"; +Strings.OfficeOM.L_NotSupportedEventType = "ไม่สนับสนุนชนิดเหตุà¸à¸²à¸£à¸“์ที่ระบุ {0}"; +Strings.OfficeOM.L_UnsupportedDataObject = "ชนิดวัตถุข้อมูลที่ให้มาไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™"; +Strings.OfficeOM.L_CustomFunctionNameCannotSplit = "ชื่อฟังà¸à¹Œà¸Šà¸±à¸™à¸•à¹‰à¸­à¸‡à¸›à¸£à¸°à¸à¸­à¸šà¸”้วยเนมสเปซไม่ว่างเปล่าà¹à¸¥à¸°à¸Šà¸·à¹ˆà¸­à¸¢à¹ˆà¸­à¹„ม่ว่างเปล่า"; +Strings.OfficeOM.L_UnsupportedEnumeration = "à¸à¸²à¸£à¹à¸ˆà¸‡à¸™à¸±à¸šà¸—ี่ไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™"; +Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "ชนิดà¸à¸²à¸£à¸šà¸±à¸‡à¸„ับใช้ที่ระบุเข้าà¸à¸±à¸™à¹„ม่ได้à¸à¸±à¸šà¸Šà¸™à¸´à¸”à¸à¸²à¸£à¸œà¸¹à¸à¸™à¸µà¹‰"; +Strings.OfficeOM.L_RequestTimeout = "à¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸à¹ƒà¸Šà¹‰à¹€à¸§à¸¥à¸²à¸™à¸²à¸™à¹€à¸à¸´à¸™à¹„ปในà¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£"; +Strings.OfficeOM.L_IndexOutOfRange = "ดัชนีไม่อยู่ในช่วง"; +Strings.OfficeOM.L_SettingsCannotSave = "ไม่สามารถบันทึà¸à¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าได้"; +Strings.OfficeOM.L_NamedItemNotFound = "ไม่มีรายà¸à¸²à¸£à¸—ี่มีชื่ออยู่"; +Strings.OfficeOM.L_ConnectionFailureWithDetails = "คำขอล้มเหลวโดยมีรหัสสถานะ {0} รหัสข้อผิดพลาด {1} à¹à¸¥à¸°à¸‚้อความà¹à¸ªà¸”งข้อผิดพลาดต่อไปนี้: {2}"; +Strings.OfficeOM.L_ColIndexOutOfRange = "ค่าดัชนีคอลัมน์อยู่นอà¸à¸Šà¹ˆà¸§à¸‡à¸—ี่อนุà¸à¸²à¸• ใช้ค่า (0 หรือมาà¸à¸à¸§à¹ˆà¸²) ที่มีค่าน้อยà¸à¸§à¹ˆà¸²à¸ˆà¸³à¸™à¸§à¸™à¸„อลัมน์"; +Strings.OfficeOM.L_CustomFunctionDefinitionMissing = "คุณสมบัติที่มีชื่อนี้ซึ่งà¹à¸ªà¸”งถึงคำนิยามของฟังà¸à¹Œà¸Šà¸±à¸™à¸•à¹‰à¸­à¸‡à¸¡à¸µà¸­à¸¢à¸¹à¹ˆà¹ƒà¸™ Excel.CustomFunctions"; +Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "เซสชันของ Office Online ของคุณหมดอายุหรือไม่ถูà¸à¸•à¹‰à¸­à¸‡ เมื่อต้องà¸à¸²à¸£à¸—ำต่อไป ให้รีเฟรชหน้า"; +Strings.OfficeOM.L_InvalidBinding = "à¸à¸²à¸£à¸œà¸¹à¸à¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡"; +Strings.OfficeOM.L_InvalidBindingError = "ข้อผิดพลาดของà¸à¸²à¸£à¸œà¸¹à¸à¸—ี่ไม่ถูà¸à¸•à¹‰à¸­à¸‡"; +Strings.OfficeOM.L_InvalidTableOptionValue = "พารามิเตอร์ของตัวเลือà¸à¸•à¸²à¸£à¸²à¸‡à¸­à¸¢à¹ˆà¸²à¸‡à¸™à¹‰à¸­à¸¢à¸«à¸™à¸¶à¹ˆà¸‡à¸£à¸²à¸¢à¸à¸²à¸£à¸¡à¸µà¸„่าที่ไม่ได้รับอนุà¸à¸²à¸• ตรวจสอบค่าใหม่à¹à¸¥à¹‰à¸§à¸¥à¸­à¸‡à¸­à¸µà¸à¸„รั้ง"; +Strings.OfficeOM.L_FormattingReminder = "ตัวเตือนà¸à¸²à¸£à¸ˆà¸±à¸”รูปà¹à¸šà¸š"; +Strings.OfficeOM.L_UserAbortedMessage = "ผู้ใช้ไม่ยินยอมในสิทธิ์ Add-in"; +Strings.OfficeOM.L_InvalidCellsValue = "พารามิเตอร์ของเซลล์อย่างน้อยหนึ่งรายà¸à¸²à¸£à¸¡à¸µà¸„่าที่ไม่ได้รับอนุà¸à¸²à¸• ตรวจสอบค่าใหม่à¹à¸¥à¹‰à¸§à¸¥à¸­à¸‡à¸­à¸µà¸à¸„รั้ง"; +Strings.OfficeOM.L_MissingParameter = "พารามิเตอร์สูà¸à¸«à¸²à¸¢"; Strings.OfficeOM.L_InValidOptionalArgument = "อาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¸—างเลือà¸à¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡"; +Strings.OfficeOM.L_GetDataParametersConflict = "พารามิเตอร์ที่ระบุขัดà¹à¸¢à¹‰à¸‡à¸à¸±à¸™"; +Strings.OfficeOM.L_CustomXmlNodeNotFound = "ไม่พบโหนดที่ระบุ"; +Strings.OfficeOM.L_FunctionCallFailed = "à¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸à¸Ÿà¸±à¸‡à¸à¹Œà¸Šà¸±à¸™ {0} ล้มเหลว รหัสข้อผิดพลาด: {1}"; Strings.OfficeOM.L_RunMustReturnPromise = 'ฟังà¸à¹Œà¸Šà¸±à¸™à¸Šà¸¸à¸”คำสั่งที่ส่งไปที่เมธอด ".run" ไม่ได้ส่ง Promise à¸à¸¥à¸±à¸šà¸¡à¸² ฟังà¸à¹Œà¸Šà¸±à¸™à¸•à¹‰à¸­à¸‡à¸ªà¹ˆà¸‡ Promise à¸à¸¥à¸±à¸šà¸¡à¸²à¹€à¸žà¸·à¹ˆà¸­à¹ƒà¸«à¹‰à¸ªà¸²à¸¡à¸²à¸£à¸–ปล่อยวัตถุใดๆ ที่มีà¸à¸²à¸£à¸•à¸´à¸”ตามอัตโนมัติได้เมื่อดำเนินà¸à¸²à¸£à¸Šà¸¸à¸”คำสั่งสำเร็จ โดยปà¸à¸•à¸´à¹à¸¥à¹‰à¸§ คุณจะส่งคืน Promise ด้วยà¸à¸²à¸£à¸ªà¹ˆà¸‡à¸à¸²à¸£à¸•à¸­à¸šà¸à¸¥à¸±à¸šà¸ˆà¸²à¸ "context.sync()"'; -Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "ไม่สามารถใช้พารามิเตอร์พิà¸à¸±à¸”à¸à¸±à¸šà¸Šà¸™à¸´à¸”à¸à¸²à¸£à¸šà¸±à¸‡à¸„ับใช้ตารางได้ เมื่อตารางนั้นมีเซลล์ที่ถูà¸à¸œà¸ªà¸²à¸™"; -Strings.OfficeOM.L_ColIndexOutOfRange = "ค่าดัชนีคอลัมน์อยู่นอà¸à¸Šà¹ˆà¸§à¸‡à¸—ี่อนุà¸à¸²à¸• ใช้ค่า (0 หรือมาà¸à¸à¸§à¹ˆà¸²) ที่มีค่าน้อยà¸à¸§à¹ˆà¸²à¸ˆà¸³à¸™à¸§à¸™à¸„อลัมน์"; +Strings.OfficeOM.L_InvalidSetStartRowColumn = "ค่าของ startRow หรือ startColumn ที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡"; +Strings.OfficeOM.L_InvalidBindingOperation = "à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸œà¸¹à¸à¸—ี่ไม่ถูà¸à¸•à¹‰à¸­à¸‡"; +Strings.OfficeOM.L_Timeout = "à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸«à¸¡à¸”เวลา "; +Strings.OfficeOM.L_NotSupported = "ไม่สนับสนุนฟังà¸à¹Œà¸Šà¸±à¸™ {0}"; +Strings.OfficeOM.L_SettingNameNotExist = "ไม่มีชื่อà¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าที่ระบุ"; +Strings.OfficeOM.L_InvalidOrTimedOutSession = "เซสชันไม่ถูà¸à¸•à¹‰à¸­à¸‡à¸«à¸£à¸·à¸­à¸«à¸¡à¸”เวลา"; +Strings.OfficeOM.L_TooManyArguments = "มีอาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¸¡à¸²à¸à¹€à¸à¸´à¸™à¹„ป"; +Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸¥à¹‰à¸¡à¹€à¸«à¸¥à¸§à¹€à¸™à¸·à¹ˆà¸­à¸‡à¸ˆà¸²à¸ Add-in นี้ร้องขอโทเค็นà¸à¸²à¸£à¹€à¸‚้าถึงอยู่à¸à¹ˆà¸­à¸™à¹à¸¥à¹‰à¸§"; +Strings.OfficeOM.L_BindingCreationError = "à¸à¸²à¸£à¸ªà¸£à¹‰à¸²à¸‡à¸à¸²à¸£à¸œà¸¹à¸à¸œà¸´à¸”พลาด"; +Strings.OfficeOM.L_TooManyOptionalFunction = "ฟังà¸à¹Œà¸Šà¸±à¸™à¸—างเลือà¸à¸«à¸¥à¸²à¸¢à¸Ÿà¸±à¸‡à¸à¹Œà¸Šà¸±à¸™à¹ƒà¸™à¸£à¸²à¸¢à¸à¸²à¸£à¸žà¸²à¸£à¸²à¸¡à¸´à¹€à¸•à¸­à¸£à¹Œ"; +Strings.OfficeOM.L_SSOClientErrorMessage = "มีข้อผิดพลาดที่ไม่คาดคิดเà¸à¸´à¸”ขึ้นในไคลเอ็นต์"; +Strings.OfficeOM.L_InvalidAPICall = "à¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸ API ไม่ถูà¸à¸•à¹‰à¸­à¸‡"; +Strings.OfficeOM.L_ValueNotLoaded = 'ยังไม่ได้โหลดค่าของออบเจ็à¸à¸•à¹Œà¸œà¸¥à¸¥à¸±à¸žà¸˜à¹Œ à¸à¹ˆà¸­à¸™à¸—ี่จะอ่านค่าคุณสมบัติ ให้เรียภ"context.sync()" ในบริบทคำขอที่เà¸à¸µà¹ˆà¸¢à¸§à¸‚้อง'; +Strings.OfficeOM.L_PermissionDenied = "สิทธิ์ถูà¸à¸›à¸à¸´à¹€à¸ªà¸˜"; +Strings.OfficeOM.L_InvalidSSOAddinMessage = "ไม่มีสนับสนุน API ของข้อมูลเฉพาะตัวสำหรับ Add-in นี้"; +Strings.OfficeOM.L_SSOServerError = "มีข้อผิดพลาดเà¸à¸´à¸”ขึ้นในผู้ให้บริà¸à¸²à¸£à¸à¸²à¸£à¸£à¸±à¸šà¸£à¸­à¸‡à¸„วามถูà¸à¸•à¹‰à¸­à¸‡"; +Strings.OfficeOM.L_SettingsStaleError = "à¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าเดิมผิดพลาด"; +Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "ชนิดข้อมูลประจำตัวของผู้ใช้ไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™"; +Strings.OfficeOM.L_CustomXmlOutOfDateName = "ข้อมูลไม่เป็นปัจจุบัน"; Strings.OfficeOM.L_AppNameNotExist = "ชื่อ Add-in สำหรับ {0} ไม่มีอยู่"; +Strings.OfficeOM.L_BadSelectorString = "สตริงที่ส่งผ่านไปยังตัวเลือà¸à¹„ด้รับà¸à¸²à¸£à¸ˆà¸±à¸”รูปà¹à¸šà¸šà¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡ หรือไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™"; +Strings.OfficeOM.L_NoCapability = "คุณไม่มีสิทธิ์เพียงพอสำหรับà¸à¸²à¸£à¸à¸£à¸°à¸—ำนี้"; +Strings.OfficeOM.L_InvalidApiArgumentsMessage = "อาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¸›à¹‰à¸­à¸™à¹€à¸‚้าไม่ถูà¸à¸•à¹‰à¸­à¸‡"; +Strings.OfficeOM.L_SelectionCannotBound = "ไม่สามารถผูà¸à¸à¸±à¸šà¸ªà¹ˆà¸§à¸™à¸—ี่เลือà¸à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™"; +Strings.OfficeOM.L_SetDataParametersConflict = "พารามิเตอร์ที่ระบุขัดà¹à¸¢à¹‰à¸‡à¸à¸±à¸™"; +Strings.OfficeOM.L_InvalidGetStartRowColumn = "ค่าของ startRow หรือ startColumn ที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡"; +Strings.OfficeOM.L_CannotWriteToSelection = "ไม่สามารถเขียนไปยังส่วนที่เลือà¸à¹ƒà¸™à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™à¹„ด้"; +Strings.OfficeOM.L_InvalidCoercion = "ชนิดของà¸à¸²à¸£à¸šà¸±à¸‡à¸„ับใช้ไม่ถูà¸à¸•à¹‰à¸­à¸‡"; +Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "เนื้อหาที่เลือà¸à¸•à¹‰à¸­à¸‡à¸­à¸¢à¸¹à¹ˆà¹ƒà¸™à¸£à¸¹à¸›à¹à¸šà¸šà¸•à¸²à¸£à¸²à¸‡ จัดรูปà¹à¸šà¸šà¸‚้อมูลเป็นตารางà¹à¸¥à¹‰à¸§à¸¥à¸­à¸‡à¸­à¸µà¸à¸„รั้ง"; +Strings.OfficeOM.L_InvalidReadForBlankRow = "à¹à¸–วที่ระบุว่างเปล่า"; +Strings.OfficeOM.L_DataNotMatchBindingType = "วัตถุข้อมูลที่ระบุไม่เข้าà¸à¸±à¸™à¸à¸±à¸šà¸Šà¸™à¸´à¸”à¸à¸²à¸£à¸œà¸¹à¸"; Strings.OfficeOM.L_EventHandlerNotExist = "ไม่พบตัวจัดà¸à¸²à¸£à¹€à¸«à¸•à¸¸à¸à¸²à¸£à¸“์ที่ระบุสำหรับà¸à¸²à¸£à¸œà¸¹à¸à¸™à¸µà¹‰"; -Strings.OfficeOM.L_InvalidParameters = "ฟังà¸à¹Œà¸Šà¸±à¸™ {0} มีพารามิเตอร์ที่ไม่ถูà¸à¸•à¹‰à¸­à¸‡"; -Strings.OfficeOM.L_FileTypeNotSupported = "ชนิดของไฟล์ที่ระบุไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™"; -Strings.OfficeOM.L_InvalidFormatValue = "พารามิเตอร์ของรูปà¹à¸šà¸šà¸­à¸¢à¹ˆà¸²à¸‡à¸™à¹‰à¸­à¸¢à¸«à¸™à¸¶à¹ˆà¸‡à¸£à¸²à¸¢à¸à¸²à¸£à¸¡à¸µà¸„่าที่ไม่ได้รับอนุà¸à¸²à¸• ตรวจสอบค่าใหม่à¹à¸¥à¹‰à¸§à¸¥à¸­à¸‡à¸­à¸µà¸à¸„รั้ง"; -Strings.OfficeOM.L_SetDataIsTooLarge = "วัตถุข้อมูลที่ระบุมีขนาดใหà¸à¹ˆà¹€à¸à¸´à¸™à¹„ป"; +Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} ต้องà¸à¸²à¸£à¹à¸ªà¸”งหน้าต่างใหม่"; +Strings.OfficeOM.L_ConnectionFailureWithStatus = "คำขอล้มเหลวโดยมีรหัสสถานะ {0}"; +Strings.OfficeOM.L_RowIndexOutOfRange = "ค่าดัชนีà¹à¸–วอยู่นอà¸à¸Šà¹ˆà¸§à¸‡à¸—ี่อนุà¸à¸²à¸• ใช้ค่า (0 หรือมาà¸à¸à¸§à¹ˆà¸²) ที่มีค่าน้อยà¸à¸§à¹ˆà¸²à¸ˆà¸³à¸™à¸§à¸™à¹à¸–ว"; +Strings.OfficeOM.L_SSOConnectionLostErrorMessage = "A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones."; +Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "ละเว้น"; +Strings.OfficeOM.L_DataReadError = "à¸à¸²à¸£à¸­à¹ˆà¸²à¸™à¸‚้อมูลผิดพลาด"; +Strings.OfficeOM.L_TooManyOptionalObjects = "วัตถุทางเลือà¸à¸«à¸¥à¸²à¸¢à¸§à¸±à¸•à¸–ุในรายà¸à¸²à¸£à¸žà¸²à¸£à¸²à¸¡à¸´à¹€à¸•à¸­à¸£à¹Œ"; +Strings.OfficeOM.L_InvalidResourceUrl = "มี Url ของทรัพยาà¸à¸£à¹à¸­à¸›à¸žà¸¥à¸´à¹€à¸„ชันไม่ถูà¸à¸•à¹‰à¸­à¸‡"; Strings.OfficeOM.L_InvalidApiCallInContext = "à¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸ API ในบริบทปัจจุบันไม่ถูà¸à¸•à¹‰à¸­à¸‡"; +Strings.OfficeOM.L_APINotSupported = "API ไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™"; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory = "Add-in นี้ไม่สนับสนุนความยินยอมของผู้ใช้"; +Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "à¸à¸³à¸¥à¸±à¸‡à¸žà¸¢à¸²à¸¢à¸²à¸¡à¸•à¸±à¹‰à¸‡à¸„่าคุณสมบัติà¹à¸šà¸šà¸­à¹ˆà¸²à¸™à¸­à¸¢à¹ˆà¸²à¸‡à¹€à¸”ียว '{0}'"; +Strings.OfficeOM.L_InvalidArgumentGeneric = "อาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¸ªà¹ˆà¸‡à¸œà¹ˆà¸²à¸™à¹„ปยังฟังà¸à¹Œà¸Šà¸±à¸™à¹„ม่สามารถใช้à¸à¸±à¸šà¸ªà¸–านà¸à¸²à¸£à¸“์นี้ อาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¸«à¸²à¸¢à¹„ป หรืออาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¹„ม่ได้อยู่ในรูปà¹à¸šà¸šà¸—ี่ถูà¸à¸•à¹‰à¸­à¸‡"; +Strings.OfficeOM.L_ActivityLimitReached = "ถึงขีดจำà¸à¸±à¸”ของà¸à¸´à¸ˆà¸à¸£à¸£à¸¡à¹à¸¥à¹‰à¸§"; Strings.OfficeOM.L_DataNotMatchBindingSize = "วัตถุข้อมูลที่ให้มามีขนาดไม่ตรงà¸à¸±à¸™à¸à¸±à¸šà¸ªà¹ˆà¸§à¸™à¸—ี่เลือà¸à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™"; -Strings.OfficeOM.L_SettingsCannotSave = "ไม่สามารถบันทึà¸à¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าได้"; -Strings.OfficeOM.L_SliceSizeNotSupported = "ขนาดของชิ้นที่ระบุไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™"; -Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "ชนิดà¸à¸²à¸£à¸œà¸¹à¸à¸™à¸µà¹‰à¹„ม่สนับสนุนาà¸à¸£à¸”ำเนินà¸à¸²à¸£à¸™à¸µà¹‰"; -Strings.OfficeOM.L_PropertyDoesNotExist = "คุณสมบัติ '{0}' ไม่มีในวัตถุ "; -Strings.OfficeOM.L_SetDataParametersConflict = "พารามิเตอร์ที่ระบุขัดà¹à¸¢à¹‰à¸‡à¸à¸±à¸™"; -Strings.OfficeOM.L_TooManyIncompleteRequests = "รอจนà¸à¸§à¹ˆà¸²à¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸à¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸²à¸ˆà¸°à¹€à¸ªà¸£à¹‡à¸ˆà¸ªà¸¡à¸šà¸¹à¸£à¸“์"; -Strings.OfficeOM.L_InvalidGetColumns = "คอลัมน์ที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡"; Strings.OfficeOM.L_UnknownBindingType = "ไม่สนับสนุนชนิดà¸à¸²à¸£à¸œà¸¹à¸à¸™à¸µà¹‰"; -Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "อนุà¸à¸²à¸•"; +Strings.OfficeOM.L_InvalidGetRows = "à¹à¸–วที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡"; +Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath จำà¸à¸±à¸”สิ่งที่เลือà¸à¹„ด้ไว้ที่ 1024 รายà¸à¸²à¸£"; +Strings.OfficeOM.L_InternalError = "ข้อผิดพลาดภายใน"; +Strings.OfficeOM.L_InvalidObjectPath = 'เส้นทางวัตถุ \'{0}\' ใช้งานไม่ได้à¸à¸±à¸šà¸ªà¸´à¹ˆà¸‡à¸—ี่คุณพยายามดำเนินà¸à¸²à¸£ ถ้าคุณà¸à¸³à¸¥à¸±à¸‡à¹ƒà¸Šà¹‰à¸§à¸±à¸•à¸–ุà¸à¸±à¸šà¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸ "context.sync" หลายครั้งà¹à¸¥à¸°à¸ à¸²à¸¢à¸™à¸­à¸à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸Šà¸¸à¸”คำสั่ง ".run" à¹à¸šà¸šà¸•à¹ˆà¸­à¹€à¸™à¸·à¹ˆà¸­à¸‡ โปรดใช้เมธอด "context.trackedObjects.add()" à¹à¸¥à¸° "context.trackedObjects.remove()" เพื่อจัดà¸à¸²à¸£à¸§à¸‡à¸ˆà¸£à¸à¸²à¸£à¸—ำงานของวัตถุ'; +Strings.OfficeOM.L_InvalidGetRowColumnCounts = "ค่าของ rowCount หรือ columnCount ที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡"; +Strings.OfficeOM.L_InvalidParameters = "ฟังà¸à¹Œà¸Šà¸±à¸™ {0} มีพารามิเตอร์ที่ไม่ถูà¸à¸•à¹‰à¸­à¸‡"; +Strings.OfficeOM.L_SSOServerErrorMessage = "มีข้อผิดพลาดเà¸à¸´à¸”ขึ้นบนเซิร์ฟเวอร์"; Strings.OfficeOM.L_InvalidDataFormat = "รูปà¹à¸šà¸šà¸‚องวัตถุข้อมูลที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡"; -Strings.OfficeOM.L_SettingsStaleError = "à¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าเดิมผิดพลาด"; -Strings.OfficeOM.L_DocumentReadOnly = "ไม่อนุà¸à¸²à¸•à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸—ี่ร้องขอในโหมดเอà¸à¸ªà¸²à¸£à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™"; -Strings.OfficeOM.L_APINotSupported = "API ไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™"; -Strings.OfficeOM.L_ElementMissing = "เราไม่สามารถจัดรูปà¹à¸šà¸šà¹€à¸‹à¸¥à¸¥à¹Œà¸•à¸²à¸£à¸²à¸‡à¹„ด้ เนื่องจาà¸à¸„่าพารามิเตอร์บางค่าหายไป ตรวจสอบพารามิเตอร์ใหม่à¹à¸¥à¹‰à¸§à¸¥à¸­à¸‡à¸­à¸µà¸à¸„รั้ง"; -Strings.OfficeOM.L_FormatValueOutOfRange = "ค่าอยู่นอà¸à¸Šà¹ˆà¸§à¸‡à¸—ี่อนุà¸à¸²à¸• "; -Strings.OfficeOM.L_CallbackNotAFunction = "à¸à¸²à¸£à¸•à¸´à¸”ต่อà¸à¸¥à¸±à¸šà¸—ี่ต้องเป็นของฟังà¸à¹Œà¸Šà¸±à¸™à¸Šà¸™à¸´à¸” à¸à¸¥à¸±à¸šà¹€à¸›à¹‡à¸™à¸‚อง {0} ของชนิด"; -Strings.OfficeOM.L_InvalidResourceUrlMessage = "Url ของทรัพยาà¸à¸£à¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡à¸—ี่ระบุไว้ในรายà¸à¸²à¸£"; +Strings.OfficeOM.L_SpecifiedIdNotExist = "ไม่มี ID ที่ระบุ"; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage = "à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸¥à¹‰à¸¡à¹€à¸«à¸¥à¸§à¹€à¸™à¸·à¹ˆà¸­à¸‡à¸ˆà¸²à¸ Add-in นี้ไม่สนับสนุนความยินยอมจาà¸à¸œà¸¹à¹‰à¹ƒà¸Šà¹‰à¹ƒà¸™à¸›à¸£à¸°à¹€à¸ à¸—นี้"; +Strings.OfficeOM.L_MissingRequiredArguments = "อาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¸—ี่จำเป็นบางอย่างหายไป"; +Strings.OfficeOM.L_InvalidGetColumns = "คอลัมน์ที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡"; +Strings.OfficeOM.L_UnsupportedUserIdentity = "ชนิดข้อมูลประจำตัวของผู้ใช้ไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™"; +Strings.OfficeOM.L_NavOutOfBound = "à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸¥à¹‰à¸¡à¹€à¸«à¸¥à¸§à¹€à¸™à¸·à¹ˆà¸­à¸‡à¸ˆà¸²à¸à¸”ัชนีอยู่นอà¸à¸Šà¹ˆà¸§à¸‡"; +Strings.OfficeOM.L_RedundantCallbackSpecification = "ไม่สามารถระบุà¸à¸²à¸£à¸•à¸´à¸”ต่อà¸à¸¥à¸±à¸šà¸—ั้งในรายà¸à¸²à¸£à¸­à¸²à¸£à¹Œà¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¹à¸¥à¸°à¹ƒà¸™à¸§à¸±à¸•à¸–ุทางเลือà¸"; +Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Add-in ร้องขอโทเค็นà¸à¸²à¸£à¹€à¸‚้าถึงอยู่à¸à¹ˆà¸­à¸™à¹à¸¥à¹‰à¸§"; Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "ข้อจำà¸à¸±à¸”ของเบราว์เซอร์ไม่อนุà¸à¸²à¸•à¹ƒà¸«à¹‰à¸ªà¸£à¹‰à¸²à¸‡à¸à¸¥à¹ˆà¸­à¸‡à¹‚ต้ตอบ โดเมนของà¸à¸¥à¹ˆà¸­à¸‡à¹‚ต้ตอบà¹à¸¥à¸°à¹‚ดเมนของโฮสต์ Add-in ไม่ได้อยู่ในโซนความปลอดภัยเดียวà¸à¸±à¸™"; -Strings.OfficeOM.L_DataNotMatchSelection = "วัตถุข้อมูลที่ให้มาเข้าà¸à¸±à¸™à¹„ม่ได้à¸à¸±à¸šà¸£à¸¹à¸›à¸£à¹ˆà¸²à¸‡à¸«à¸£à¸·à¸­à¸¡à¸´à¸•à¸´à¸‚องà¸à¸²à¸£à¹€à¸¥à¸·à¸­à¸à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™"; -Strings.OfficeOM.L_InvalidCoercion = "ชนิดของà¸à¸²à¸£à¸šà¸±à¸‡à¸„ับใช้ไม่ถูà¸à¸•à¹‰à¸­à¸‡"; -Strings.OfficeOM.L_InvalidGetRowColumnCounts = "ค่าของ rowCount หรือ columnCount ที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡"; -Strings.OfficeOM.L_DialogOK = "ตà¸à¸¥à¸‡"; +Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "ชนิดà¸à¸²à¸£à¸œà¸¹à¸à¸™à¸µà¹‰à¹„ม่สนับสนุนาà¸à¸£à¸”ำเนินà¸à¸²à¸£à¸™à¸µà¹‰"; Strings.OfficeOM.L_EventHandlerAdditionFailed = "ไม่สามารถเพิ่มตัวจัดà¸à¸²à¸£à¹€à¸«à¸•à¸¸à¸à¸²à¸£à¸“์ได้"; -Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "ชนิดà¸à¸²à¸£à¸šà¸±à¸‡à¸„ับใช้ที่ระบุเข้าà¸à¸±à¸™à¹„ม่ได้à¸à¸±à¸šà¸Šà¸™à¸´à¸”à¸à¸²à¸£à¸œà¸¹à¸à¸™à¸µà¹‰"; -Strings.OfficeOM.L_InvalidResourceUrl = "มี Url ของทรัพยาà¸à¸£à¹à¸­à¸›à¸žà¸¥à¸´à¹€à¸„ชันไม่ถูà¸à¸•à¹‰à¸­à¸‡"; -Strings.OfficeOM.L_IndexOutOfRange = "ดัชนีไม่อยู่ในช่วง"; +Strings.OfficeOM.L_ElementMissing = "เราไม่สามารถจัดรูปà¹à¸šà¸šà¹€à¸‹à¸¥à¸¥à¹Œà¸•à¸²à¸£à¸²à¸‡à¹„ด้ เนื่องจาà¸à¸„่าพารามิเตอร์บางค่าหายไป ตรวจสอบพารามิเตอร์ใหม่à¹à¸¥à¹‰à¸§à¸¥à¸­à¸‡à¸­à¸µà¸à¸„รั้ง"; +Strings.OfficeOM.L_CoercionTypeNotSupported = "ชนิดà¸à¸²à¸£à¸šà¸±à¸‡à¸„ับใช้ที่ระบุไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™"; +Strings.OfficeOM.L_CustomXmlExceedQuotaName = "ถึงขีดจำà¸à¸±à¸”ของสิ่งที่เลือà¸"; +Strings.OfficeOM.L_MemoryLimit = "เà¸à¸´à¸™à¸‚ีดจำà¸à¸±à¸”ของหน่วยความจำ"; +Strings.OfficeOM.L_ReadSettingsError = "à¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าà¸à¸²à¸£à¸­à¹ˆà¸²à¸™à¸œà¸´à¸”พลาด"; +Strings.OfficeOM.L_OutOfRange = "ไม่อยู่ในช่วงที่à¸à¸³à¸«à¸™à¸”"; +Strings.OfficeOM.L_InvalidFormatValue = "พารามิเตอร์ของรูปà¹à¸šà¸šà¸­à¸¢à¹ˆà¸²à¸‡à¸™à¹‰à¸­à¸¢à¸«à¸™à¸¶à¹ˆà¸‡à¸£à¸²à¸¢à¸à¸²à¸£à¸¡à¸µà¸„่าที่ไม่ได้รับอนุà¸à¸²à¸• ตรวจสอบค่าใหม่à¹à¸¥à¹‰à¸§à¸¥à¸­à¸‡à¸­à¸µà¸à¸„รั้ง"; +Strings.OfficeOM.L_BindingToMultipleSelection = "ไม่สนับสนุนส่วนที่เลือà¸à¹à¸šà¸šà¹„ม่ติดà¸à¸±à¸™"; +Strings.OfficeOM.L_SSOClientError = "มีข้อผิดพลาดเà¸à¸´à¸”ขึ้นในà¸à¸²à¸£à¸£à¹‰à¸­à¸‡à¸‚อà¸à¸²à¸£à¸£à¸±à¸šà¸£à¸­à¸‡à¸„วามถูà¸à¸•à¹‰à¸­à¸‡à¸ˆà¸²à¸ Office"; +Strings.OfficeOM.L_InvalidOperationInCellEditMode = "Excel อยู่ในโหมดà¸à¸²à¸£à¹à¸à¹‰à¹„ขเซลล์ โปรดออà¸à¸ˆà¸²à¸à¹‚หมดà¹à¸à¹‰à¹„ข โดยà¸à¸” ENTER หรือ TAB หรือเลือà¸à¹€à¸‹à¸¥à¸¥à¹Œà¸­à¸·à¹ˆà¸™ à¹à¸¥à¹‰à¸§à¸¥à¸­à¸‡à¸­à¸µà¸à¸„รั้ง"; +Strings.OfficeOM.L_DialogOK = "ตà¸à¸¥à¸‡"; +Strings.OfficeOM.L_DataStale = "ข้อมูลไม่เป็นปัจจุบัน"; +Strings.OfficeOM.L_InvalidArgument = "อาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œ '{0}' ใช้งานไม่ได้ในสถานà¸à¸²à¸£à¸“์นี้ หายไป หรือไม่ใช่รูปà¹à¸šà¸šà¸—ี่ถูà¸à¸•à¹‰à¸­à¸‡"; +Strings.OfficeOM.L_NotSupportedBindingType = "ไม่สนับสนุนชนิดà¸à¸²à¸£à¸œà¸¹à¸à¸—ี่ระบุ {0}"; +Strings.OfficeOM.L_InvalidFormat = "ข้อผิดพลาดรูปà¹à¸šà¸šà¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡"; +Strings.OfficeOM.L_PropertyNotLoaded = "คุณสมบัติ '{0}' ไม่พร้อมใช้งาน à¸à¹ˆà¸­à¸™à¸­à¹ˆà¸²à¸™à¸„่าคุณสมบัติ เรียà¸à¹€à¸¡à¸˜à¸­à¸”โหลดจาà¸à¸§à¸±à¸•à¸–ุที่มีà¹à¸¥à¸°à¹€à¸£à¸µà¸¢à¸ \"context.sync()\" ในบริบทà¸à¸²à¸£à¸£à¹‰à¸­à¸‡à¸‚อที่เà¸à¸µà¹ˆà¸¢à¸§à¸‚้อง"; +Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "ไม่สามารถใช้พารามิเตอร์พิà¸à¸±à¸”à¸à¸±à¸šà¸Šà¸™à¸´à¸”à¸à¸²à¸£à¸šà¸±à¸‡à¸„ับใช้ตารางได้ เมื่อตารางนั้นมีเซลล์ที่ถูà¸à¸œà¸ªà¸²à¸™"; +Strings.OfficeOM.L_NotImplemented = "ฟังà¸à¹Œà¸Šà¸±à¸™ {0} ยังไม่ถูà¸à¸™à¸³à¸¡à¸²à¹ƒà¸Šà¹‰à¸‡à¸²à¸™"; +Strings.OfficeOM.L_CellDataAmountBeyondLimits = "หมายเหตุ: จำนวนของเซลล์ในตารางควรจะต่ำà¸à¸§à¹ˆà¸² 20,000 เซลล์"; +Strings.OfficeOM.L_EventHandlerRemovalFailed = "ไม่สามารถเอาตัวจัดà¸à¸²à¸£à¹€à¸«à¸•à¸¸à¸à¸²à¸£à¸“์ออà¸à¹„ด้"; +Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = "ไม่สามารถเปลี่ยนคุณสมบัติเป็น '{0}' โดยใช้วิธีà¸à¸²à¸£ \"object.set\" ได้"; +Strings.OfficeOM.L_InvalidGrantMessage = "à¸à¸²à¸£à¹ƒà¸«à¹‰à¸ªà¸´à¸—ธิ์ขาดหายไปสำหรับ Add-in นี้"; Strings.OfficeOM.L_CloseFileBeforeRetrieve = "เรียภcloseAsync บนไฟล์ปัจจุบันà¸à¹ˆà¸­à¸™à¸—ี่จะเรียà¸à¹ƒà¸Šà¹‰à¹„ฟล์อื่น"; +Strings.OfficeOM.L_InvalidNamedItemForBindingType = "ชนิดà¸à¸²à¸£à¸œà¸¹à¸à¸—ี่ระบุเข้าà¸à¸±à¸™à¹„ม่ได้à¸à¸±à¸šà¸£à¸²à¸¢à¸à¸²à¸£à¸—ี่มีชื่อที่ให้มา"; +Strings.OfficeOM.L_InvalidSelectionForBindingType = "ไม่สามารถสร้างà¸à¸²à¸£à¸œà¸¹à¸à¸à¸±à¸šà¸à¸²à¸£à¹€à¸¥à¸·à¸­à¸à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™à¹à¸¥à¸°à¸Šà¸™à¸´à¸”à¸à¸²à¸£à¸œà¸¹à¸à¸—ี่ระบุได้"; +Strings.OfficeOM.L_CustomXmlError = "ข้อผิดพลาด XML à¹à¸šà¸šà¸à¸³à¸«à¸™à¸”เอง"; Strings.OfficeOM.L_CannotRegisterEvent = "ไม่สามารถลงทะเบียนตัวจัดà¸à¸²à¸£à¹€à¸«à¸•à¸¸à¸à¸²à¸£à¸“์ได้"; -Strings.OfficeOM.L_DataNotMatchCoercionType = "ชนิดวัตถุข้อมูลที่ระบุเข้าà¸à¸±à¸™à¹„ม่ได้à¸à¸±à¸šà¸ªà¹ˆà¸§à¸™à¸—ี่เลือà¸à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™"; -Strings.OfficeOM.L_InvalidColumnsForBinding = "คอลัมน์ที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡"; -Strings.OfficeOM.L_EventHandlerRemovalFailed = "ไม่สามารถเอาตัวจัดà¸à¸²à¸£à¹€à¸«à¸•à¸¸à¸à¸²à¸£à¸“์ออà¸à¹„ด้"; -Strings.OfficeOM.L_APICallFailed = "à¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸ API ล้มเหลว"; +Strings.OfficeOM.L_DocumentReadOnly = "ไม่อนุà¸à¸²à¸•à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸—ี่ร้องขอในโหมดเอà¸à¸ªà¸²à¸£à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™"; +Strings.OfficeOM.L_FileTypeNotSupported = "ชนิดของไฟล์ที่ระบุไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™"; +Strings.OfficeOM.L_InvalidNode = "โหนดไม่ถูà¸à¸•à¹‰à¸­à¸‡"; +Strings.OfficeOM.L_HostError = "โฮสต์ผิดพลาด"; +Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "ไม่มีà¹à¸­à¸›à¸žà¸¥à¸´à¹€à¸„ชัน {0} Microsoft.Office.WebExtension.initialize(reason) ไม่ถูà¸à¹€à¸£à¸µà¸¢à¸"; +Strings.OfficeOM.L_EventRegistrationError = "à¸à¸²à¸£à¸¥à¸‡à¸—ะเบียนเหตุà¸à¸²à¸£à¸“์ผิดพลาด"; Strings.OfficeOM.L_InvalidGrant = "à¸à¸²à¸£à¸­à¸™à¸¸à¸¡à¸±à¸•à¸´à¸¥à¹ˆà¸§à¸‡à¸«à¸™à¹‰à¸²à¸‚าดไป"; +Strings.OfficeOM.L_UserClickIgnore = "ผู้ใช้เลือà¸à¸—ี่จะละเว้นà¸à¸²à¸£à¸à¸¥à¹ˆà¸­à¸‡à¹‚ต้ตอบ"; +Strings.OfficeOM.L_OverwriteWorksheetData = "à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸‚องชุดล้มเหลว เนื่องจาà¸à¸§à¸±à¸•à¸–ุข้อมูลที่ให้มาจะเขียนทับหรือเลื่อนข้อมูล"; +Strings.OfficeOM.L_SaveSettingsError = "à¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าà¸à¸²à¸£à¸šà¸±à¸™à¸—ึà¸à¸œà¸´à¸”พลาด"; +Strings.OfficeOM.L_SettingsAreStale = "ไม่สามารถบันทึà¸à¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าได้เพราะไม่เป็นข้อมูลปัจจุบัน"; +Strings.OfficeOM.L_InvalidDataObject = "วัตถุข้อมูลไม่ถูà¸à¸•à¹‰à¸­à¸‡"; +Strings.OfficeOM.L_SSOConnectionLostError = "A connection was lost during the sign in process."; Strings.OfficeOM.L_DialogNavigateError = "ข้อผิดพลาดà¸à¸²à¸£à¸™à¸³à¸—างà¸à¸¥à¹ˆà¸­à¸‡à¹‚ต้ตอบ"; -Strings.OfficeOM.L_UnsupportedEnumeration = "à¸à¸²à¸£à¹à¸ˆà¸‡à¸™à¸±à¸šà¸—ี่ไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™"; -Strings.OfficeOM.L_NavOutOfBound = "à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸¥à¹‰à¸¡à¹€à¸«à¸¥à¸§à¹€à¸™à¸·à¹ˆà¸­à¸‡à¸ˆà¸²à¸à¸”ัชนีอยู่นอà¸à¸Šà¹ˆà¸§à¸‡"; -Strings.OfficeOM.L_InvalidTableOptionValue = "พารามิเตอร์ของตัวเลือà¸à¸•à¸²à¸£à¸²à¸‡à¸­à¸¢à¹ˆà¸²à¸‡à¸™à¹‰à¸­à¸¢à¸«à¸™à¸¶à¹ˆà¸‡à¸£à¸²à¸¢à¸à¸²à¸£à¸¡à¸µà¸„่าที่ไม่ได้รับอนุà¸à¸²à¸• ตรวจสอบค่าใหม่à¹à¸¥à¹‰à¸§à¸¥à¸­à¸‡à¸­à¸µà¸à¸„รั้ง"; -Strings.OfficeOM.L_InitializeNotReady = "ยังไม่ได้โหลด Office.js à¹à¸šà¸šà¹€à¸•à¹‡à¸¡ โปรดลองอีà¸à¸„รั้งในภายหลัง หรือตรวจสอบให้à¹à¸™à¹ˆà¹ƒà¸ˆà¸§à¹ˆà¸²à¹„ด้เพิ่มโค้ดà¸à¸²à¸£à¹€à¸•à¸£à¸µà¸¢à¸¡à¹ƒà¸Šà¹‰à¸‡à¸²à¸™à¸‚องคุณบนฟังà¸à¹Œà¸Šà¸±à¸™ Office.initialize "; -Strings.OfficeOM.L_DataNotMatchBindingType = "วัตถุข้อมูลที่ระบุไม่เข้าà¸à¸±à¸™à¸à¸±à¸šà¸Šà¸™à¸´à¸”à¸à¸²à¸£à¸œà¸¹à¸"; -Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Add-in ร้องขอโทเค็นà¸à¸²à¸£à¹€à¸‚้าถึงอยู่à¸à¹ˆà¸­à¸™à¹à¸¥à¹‰à¸§"; -Strings.OfficeOM.L_CannotNavigateTo = "วัตถุอยู่ในตำà¹à¸«à¸™à¹ˆà¸‡à¸—ี่ไม่สนับสนุนà¸à¸²à¸£à¸™à¸³à¸—าง"; -Strings.OfficeOM.L_EventRegistrationError = "à¸à¸²à¸£à¸¥à¸‡à¸—ะเบียนเหตุà¸à¸²à¸£à¸“์ผิดพลาด"; -Strings.OfficeOM.L_InvalidOrTimedOutSession = "เซสชันไม่ถูà¸à¸•à¹‰à¸­à¸‡à¸«à¸£à¸·à¸­à¸«à¸¡à¸”เวลา"; -Strings.OfficeOM.L_BindingCreationError = "à¸à¸²à¸£à¸ªà¸£à¹‰à¸²à¸‡à¸à¸²à¸£à¸œà¸¹à¸à¸œà¸´à¸”พลาด"; -Strings.OfficeOM.L_ConnectionFailureWithStatus = "คำขอล้มเหลวโดยมีรหัสสถานะ {0}"; -Strings.OfficeOM.L_InvalidSetStartRowColumn = "ค่าของ startRow หรือ startColumn ที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡"; -Strings.OfficeOM.L_HostError = "โฮสต์ผิดพลาด"; -Strings.OfficeOM.L_MemoryLimit = "เà¸à¸´à¸™à¸‚ีดจำà¸à¸±à¸”ของหน่วยความจำ"; -Strings.OfficeOM.L_DataWriteReminder = "ตัวเตือนà¸à¸²à¸£à¹€à¸‚ียนข้อมูล"; -Strings.OfficeOM.L_FunctionCallFailed = "à¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸à¸Ÿà¸±à¸‡à¸à¹Œà¸Šà¸±à¸™ {0} ล้มเหลว รหัสข้อผิดพลาด: {1}"; -Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "ชนิดข้อมูลประจำตัวของผู้ใช้ไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™"; +Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "อนุà¸à¸²à¸•"; +Strings.OfficeOM.L_SliceSizeNotSupported = "ขนาดของชิ้นที่ระบุไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™"; +Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "หมายเหตุ: ชุดà¸à¸²à¸£à¸ˆà¸±à¸”รูปà¹à¸šà¸šà¸—ี่ถูà¸à¸•à¸±à¹‰à¸‡à¸„่าโดยà¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸ API à¸à¸²à¸£à¸ˆà¸±à¸”รูปà¹à¸šà¸šà¸„วรจะต่ำà¸à¸§à¹ˆà¸² 100"; +Strings.OfficeOM.L_NetworkProblemRetrieveFile = "ปัà¸à¸«à¸²à¹€à¸„รือข่ายป้องà¸à¸±à¸™à¹„ม่ให้เรียà¸à¹ƒà¸Šà¹‰à¹„ฟล์"; +Strings.OfficeOM.L_InvalidColumnsForBinding = "คอลัมน์ที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡"; +Strings.OfficeOM.L_DialogAlreadyOpened = "à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸¥à¹‰à¸¡à¹€à¸«à¸¥à¸§à¹€à¸™à¸·à¹ˆà¸­à¸‡à¸ˆà¸²à¸ Add-in นี้มีà¸à¸¥à¹ˆà¸­à¸‡à¹‚ต้ตอบที่ใช้งานอยู่เรียบร้อยà¹à¸¥à¹‰à¸§"; +Strings.OfficeOM.L_SelectionNotSupportCoercionType = "ส่วนที่เลือà¸à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™à¸™à¸µà¹‰à¹€à¸‚้าà¸à¸±à¸™à¹„ม่ได้à¸à¸±à¸šà¸Šà¸™à¸´à¸”à¸à¸²à¸£à¸šà¸±à¸‡à¸„ับใช้ที่ระบุ"; +Strings.OfficeOM.L_CustomFunctionNameContainsBadChars = "ชื่อฟังà¸à¹Œà¸Šà¸±à¸™à¸­à¸²à¸ˆà¸›à¸£à¸°à¸à¸­à¸šà¸”้วยตัวอัà¸à¸©à¸£ ตัวเลข ขีดล่าง à¹à¸¥à¸°à¸¡à¸«à¸±à¸žà¸ à¸²à¸„เท่านั้น"; +Strings.OfficeOM.L_OsfControlTypeNotSupported = "ไม่สนับสนุนชนิดของ OsfControl"; Strings.OfficeOM.L_UserAborted = "ผู้ใช้ยà¸à¹€à¸¥à¸´à¸à¸à¸²à¸£à¸£à¹‰à¸­à¸‡à¸‚อความยินยอม"; -Strings.OfficeOM.L_NotImplemented = "ฟังà¸à¹Œà¸Šà¸±à¸™ {0} ยังไม่ถูà¸à¸™à¸³à¸¡à¸²à¹ƒà¸Šà¹‰à¸‡à¸²à¸™"; -Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} ต้องà¸à¸²à¸£à¹à¸ªà¸”งหน้าต่างใหม่"; -Strings.OfficeOM.L_InvalidCellsValue = "พารามิเตอร์ของเซลล์อย่างน้อยหนึ่งรายà¸à¸²à¸£à¸¡à¸µà¸„่าที่ไม่ได้รับอนุà¸à¸²à¸• ตรวจสอบค่าใหม่à¹à¸¥à¹‰à¸§à¸¥à¸­à¸‡à¸­à¸µà¸à¸„รั้ง"; -Strings.OfficeOM.L_InvalidBindingError = "ข้อผิดพลาดของà¸à¸²à¸£à¸œà¸¹à¸à¸—ี่ไม่ถูà¸à¸•à¹‰à¸­à¸‡"; -Strings.OfficeOM.L_SelectionCannotBound = "ไม่สามารถผูà¸à¸à¸±à¸šà¸ªà¹ˆà¸§à¸™à¸—ี่เลือà¸à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™"; -Strings.OfficeOM.L_CannotWriteToSelection = "ไม่สามารถเขียนไปยังส่วนที่เลือà¸à¹ƒà¸™à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™à¹„ด้"; -Strings.OfficeOM.L_InternalErrorDescription = "มีข้อผิดพลาดภายในเà¸à¸´à¸”ขึ้น"; -Strings.OfficeOM.L_PropertyNotLoaded = "คุณสมบัติ '{0}' ไม่พร้อมใช้งาน à¸à¹ˆà¸­à¸™à¸­à¹ˆà¸²à¸™à¸„่าคุณสมบัติ เรียà¸à¹€à¸¡à¸˜à¸­à¸”โหลดจาà¸à¸§à¸±à¸•à¸–ุที่มีà¹à¸¥à¸°à¹€à¸£à¸µà¸¢à¸ \"context.sync()\" ในบริบทà¸à¸²à¸£à¸£à¹‰à¸­à¸‡à¸‚อที่เà¸à¸µà¹ˆà¸¢à¸§à¸‚้อง"; -Strings.OfficeOM.L_InternalError = "ข้อผิดพลาดภายใน"; -Strings.OfficeOM.L_InvalidSetColumns = "คอลัมน์ที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡"; +Strings.OfficeOM.L_ShuttingDown = "à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸¥à¹‰à¸¡à¹€à¸«à¸¥à¸§à¹€à¸žà¸£à¸²à¸°à¸‚้อมูลไม่เป็นข้อมูลปัจจุบันบนเซิร์ฟเวอร์"; +Strings.OfficeOM.L_CallbackNotAFunction = "à¸à¸²à¸£à¸•à¸´à¸”ต่อà¸à¸¥à¸±à¸šà¸—ี่ต้องเป็นของฟังà¸à¹Œà¸Šà¸±à¸™à¸Šà¸™à¸´à¸” à¸à¸¥à¸±à¸šà¹€à¸›à¹‡à¸™à¸‚อง {0} ของชนิด"; +Strings.OfficeOM.L_TooManyIncompleteRequests = "รอจนà¸à¸§à¹ˆà¸²à¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸à¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸²à¸ˆà¸°à¹€à¸ªà¸£à¹‡à¸ˆà¸ªà¸¡à¸šà¸¹à¸£à¸“์"; +Strings.OfficeOM.L_InvalidResourceUrlMessage = "Url ของทรัพยาà¸à¸£à¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡à¸—ี่ระบุไว้ในรายà¸à¸²à¸£"; +Strings.OfficeOM.L_InvalidValue = "ค่าไม่ถูà¸à¸•à¹‰à¸­à¸‡"; +Strings.OfficeOM.L_SetDataIsTooLarge = "วัตถุข้อมูลที่ระบุมีขนาดใหà¸à¹ˆà¹€à¸à¸´à¸™à¹„ป"; +Strings.OfficeOM.L_ApiNotFoundDetails = "เมธอดหรือคุณสมบัติ {0} เป็นส่วนหนึ่งของชุดความต้องà¸à¸²à¸£ {1} ซึ่งไม่มีอยู่ใน {2} เวอร์ชันที่คุณใช้"; +Strings.OfficeOM.L_InvalidSetRows = "à¹à¸–วที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡"; +Strings.OfficeOM.L_UnsupportedEnumerationMessage = "à¸à¸²à¸£à¹à¸ˆà¸‡à¸™à¸±à¸šà¹„ม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™à¹ƒà¸™à¹à¸­à¸›à¸žà¸¥à¸´à¹€à¸„ชันที่เป็นโฮสต์ในปัจจุบัน"; +Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "ข้อมูลล้าสมัยà¹à¸¥à¹‰à¸§ โปรดดึงวัตถุอีà¸à¸„รั้ง"; +Strings.OfficeOM.L_DataNotMatchCoercionType = "ชนิดวัตถุข้อมูลที่ระบุเข้าà¸à¸±à¸™à¹„ม่ได้à¸à¸±à¸šà¸ªà¹ˆà¸§à¸™à¸—ี่เลือà¸à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™"; Strings.OfficeOM.L_GetSelectionNotSupported = "ส่วนที่เลือà¸à¹ƒà¸™à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™à¹„ม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™"; -Strings.OfficeOM.L_MissingRequiredArguments = "อาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¸—ี่จำเป็นบางอย่างหายไป"; -Strings.OfficeOM.L_InvalidReadForBlankRow = "à¹à¸–วที่ระบุว่างเปล่า"; -Strings.OfficeOM.L_DialogRequireHTTPS = "ไม่สนับสนุนโพรโทคอล HTTP โปรดใช้ HTTPS à¹à¸—น"; -Strings.OfficeOM.L_NotSupportedEventType = "ไม่สนับสนุนชนิดเหตุà¸à¸²à¸£à¸“์ที่ระบุ {0}"; -Strings.OfficeOM.L_InvalidAPICall = "à¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸ API ไม่ถูà¸à¸•à¹‰à¸­à¸‡"; -Strings.OfficeOM.L_InvalidArgument = "อาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œ '{0}' ใช้งานไม่ได้ในสถานà¸à¸²à¸£à¸“์นี้ หายไป หรือไม่ใช่รูปà¹à¸šà¸šà¸—ี่ถูà¸à¸•à¹‰à¸­à¸‡"; +Strings.OfficeOM.L_RequestTokenUnavailable = "API นี้ถูà¸à¸„วบคุมให้ใช้ปริมาณความถี่ในà¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸à¸Šà¹‰à¸²à¸¥à¸‡"; +Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "ไม่สามารถใช้พารามิเตอร์พิà¸à¸±à¸”à¸à¸±à¸šà¸Šà¸™à¸´à¸”à¸à¸²à¸£à¸šà¸±à¸‡à¸„ับใช้ตารางได้ เมื่อตารางนั้นมีเซลล์ที่ถูà¸à¸œà¸ªà¸²à¸™"; +Strings.OfficeOM.L_DataNotMatchSelection = "วัตถุข้อมูลที่ให้มาเข้าà¸à¸±à¸™à¹„ม่ได้à¸à¸±à¸šà¸£à¸¹à¸›à¸£à¹ˆà¸²à¸‡à¸«à¸£à¸·à¸­à¸¡à¸´à¸•à¸´à¸‚องà¸à¸²à¸£à¹€à¸¥à¸·à¸­à¸à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™"; Strings.OfficeOM.L_DataWriteError = "à¸à¸²à¸£à¹€à¸‚ียนข้อมูลผิดพลาด"; -Strings.OfficeOM.L_BindingToMultipleSelection = "ไม่สนับสนุนส่วนที่เลือà¸à¹à¸šà¸šà¹„ม่ติดà¸à¸±à¸™"; -Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "à¸à¸³à¸«à¸™à¸”ค่าเบราว์เซอร์ของคุณ"; -Strings.OfficeOM.L_RedundantCallbackSpecification = "ไม่สามารถระบุà¸à¸²à¸£à¸•à¸´à¸”ต่อà¸à¸¥à¸±à¸šà¸—ั้งในรายà¸à¸²à¸£à¸­à¸²à¸£à¹Œà¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¹à¸¥à¸°à¹ƒà¸™à¸§à¸±à¸•à¸–ุทางเลือà¸"; -Strings.OfficeOM.L_CustomXmlOutOfDateName = "ข้อมูลไม่เป็นปัจจุบัน"; Strings.OfficeOM.L_DialogAddressNotTrusted = "โดเมนของ URL ไม่ได้รวมอยู่ในองค์ประà¸à¸­à¸š AppDomains ในไฟล์à¸à¸³à¸à¸±à¸š"; -Strings.OfficeOM.L_SSOServerErrorMessage = "มีข้อผิดพลาดเà¸à¸´à¸”ขึ้นบนเซิร์ฟเวอร์"; -Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath จำà¸à¸±à¸”สิ่งที่เลือà¸à¹„ด้ไว้ที่ 1024 รายà¸à¸²à¸£"; -Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "ไม่มีà¹à¸­à¸›à¸žà¸¥à¸´à¹€à¸„ชัน {0} Microsoft.Office.WebExtension.initialize(reason) ไม่ถูà¸à¹€à¸£à¸µà¸¢à¸"; -Strings.OfficeOM.L_CustomXmlNodeNotFound = "ไม่พบโหนดที่ระบุ"; -Strings.OfficeOM.L_SSOServerError = "มีข้อผิดพลาดเà¸à¸´à¸”ขึ้นในผู้ให้บริà¸à¸²à¸£à¸à¸²à¸£à¸£à¸±à¸šà¸£à¸­à¸‡à¸„วามถูà¸à¸•à¹‰à¸­à¸‡"; -Strings.OfficeOM.L_SelectionNotSupportCoercionType = "ส่วนที่เลือà¸à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™à¸™à¸µà¹‰à¹€à¸‚้าà¸à¸±à¸™à¹„ม่ได้à¸à¸±à¸šà¸Šà¸™à¸´à¸”à¸à¸²à¸£à¸šà¸±à¸‡à¸„ับใช้ที่ระบุ"; -Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "เซสชันของ Office Online ของคุณหมดอายุหรือไม่ถูà¸à¸•à¹‰à¸­à¸‡ เมื่อต้องà¸à¸²à¸£à¸—ำต่อไป ให้รีเฟรชหน้า"; -Strings.OfficeOM.L_CellDataAmountBeyondLimits = "หมายเหตุ: จำนวนของเซลล์ในตารางควรจะต่ำà¸à¸§à¹ˆà¸² 20,000 เซลล์"; -Strings.OfficeOM.L_BadSelectorString = "สตริงที่ส่งผ่านไปยังตัวเลือà¸à¹„ด้รับà¸à¸²à¸£à¸ˆà¸±à¸”รูปà¹à¸šà¸šà¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡ หรือไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™"; -Strings.OfficeOM.L_InvalidDataObject = "วัตถุข้อมูลไม่ถูà¸à¸•à¹‰à¸­à¸‡"; -Strings.OfficeOM.L_InvalidBinding = "à¸à¸²à¸£à¸œà¸¹à¸à¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡"; -Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "ละเว้น"; -Strings.OfficeOM.L_NoCapability = "คุณไม่มีสิทธิ์เพียงพอสำหรับà¸à¸²à¸£à¸à¸£à¸°à¸—ำนี้"; -Strings.OfficeOM.L_InvalidObjectPath = 'เส้นทางวัตถุ \'{0}\' ใช้งานไม่ได้à¸à¸±à¸šà¸ªà¸´à¹ˆà¸‡à¸—ี่คุณพยายามดำเนินà¸à¸²à¸£ ถ้าคุณà¸à¸³à¸¥à¸±à¸‡à¹ƒà¸Šà¹‰à¸§à¸±à¸•à¸–ุà¸à¸±à¸šà¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸ "context.sync" หลายครั้งà¹à¸¥à¸°à¸ à¸²à¸¢à¸™à¸­à¸à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸Šà¸¸à¸”คำสั่ง ".run" à¹à¸šà¸šà¸•à¹ˆà¸­à¹€à¸™à¸·à¹ˆà¸­à¸‡ โปรดใช้เมธอด "context.trackedObjects.add()" à¹à¸¥à¸° "context.trackedObjects.remove()" เพื่อจัดà¸à¸²à¸£à¸§à¸‡à¸ˆà¸£à¸à¸²à¸£à¸—ำงานของวัตถุ'; -Strings.OfficeOM.L_RequestTokenUnavailable = "API นี้ถูà¸à¸„วบคุมให้ใช้ปริมาณความถี่ในà¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸à¸Šà¹‰à¸²à¸¥à¸‡"; -Strings.OfficeOM.L_BrowserAPINotSupported = "เบราว์เซอร์นี้ไม่สนับสนุน API ที่ร้องขอ"; -Strings.OfficeOM.L_InvalidNamedItemForBindingType = "ชนิดà¸à¸²à¸£à¸œà¸¹à¸à¸—ี่ระบุเข้าà¸à¸±à¸™à¹„ม่ได้à¸à¸±à¸šà¸£à¸²à¸¢à¸à¸²à¸£à¸—ี่มีชื่อที่ให้มา"; Strings.OfficeOM.L_GetDataIsTooLarge = "ชุดข้อมูลที่ร้องขอมีขนาดใหà¸à¹ˆà¹€à¸à¸´à¸™à¹„ป"; +Strings.OfficeOM.L_InitializeNotReady = "ยังไม่ได้โหลด Office.js à¹à¸šà¸šà¹€à¸•à¹‡à¸¡ โปรดลองอีà¸à¸„รั้งในภายหลัง หรือตรวจสอบให้à¹à¸™à¹ˆà¹ƒà¸ˆà¸§à¹ˆà¸²à¹„ด้เพิ่มโค้ดà¸à¸²à¸£à¹€à¸•à¸£à¸µà¸¢à¸¡à¹ƒà¸Šà¹‰à¸‡à¸²à¸™à¸‚องคุณบนฟังà¸à¹Œà¸Šà¸±à¸™ Office.initialize "; Strings.OfficeOM.L_DialogInvalidScheme = "ไม่สนับสนุนà¹à¸šà¸šà¹à¸œà¸™ URL โปรดใช้ HTTPS à¹à¸—น"; -Strings.OfficeOM.L_DialogAlreadyOpened = "à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸¥à¹‰à¸¡à¹€à¸«à¸¥à¸§à¹€à¸™à¸·à¹ˆà¸­à¸‡à¸ˆà¸²à¸ Add-in นี้มีà¸à¸¥à¹ˆà¸­à¸‡à¹‚ต้ตอบที่ใช้งานอยู่เรียบร้อยà¹à¸¥à¹‰à¸§"; -Strings.OfficeOM.L_InvalidSelectionForBindingType = "ไม่สามารถสร้างà¸à¸²à¸£à¸œà¸¹à¸à¸à¸±à¸šà¸à¸²à¸£à¹€à¸¥à¸·à¸­à¸à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™à¹à¸¥à¸°à¸Šà¸™à¸´à¸”à¸à¸²à¸£à¸œà¸¹à¸à¸—ี่ระบุได้"; -Strings.OfficeOM.L_RowIndexOutOfRange = "ค่าดัชนีà¹à¸–วอยู่นอà¸à¸Šà¹ˆà¸§à¸‡à¸—ี่อนุà¸à¸²à¸• ใช้ค่า (0 หรือมาà¸à¸à¸§à¹ˆà¸²) ที่มีค่าน้อยà¸à¸§à¹ˆà¸²à¸ˆà¸³à¸™à¸§à¸™à¹à¸–ว"; -Strings.OfficeOM.L_InvalidGetRows = "à¹à¸–วที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡"; -Strings.OfficeOM.L_InvalidApiArgumentsMessage = "อาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¸›à¹‰à¸­à¸™à¹€à¸‚้าไม่ถูà¸à¸•à¹‰à¸­à¸‡"; -Strings.OfficeOM.L_NetworkProblem = "ปัà¸à¸«à¸²à¹€à¸„รือข่าย"; -Strings.OfficeOM.L_NetworkProblemRetrieveFile = "ปัà¸à¸«à¸²à¹€à¸„รือข่ายป้องà¸à¸±à¸™à¹„ม่ให้เรียà¸à¹ƒà¸Šà¹‰à¹„ฟล์"; -Strings.OfficeOM.L_SettingsAreStale = "ไม่สามารถบันทึà¸à¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าได้เพราะไม่เป็นข้อมูลปัจจุบัน"; -Strings.OfficeOM.L_ValueNotLoaded = 'ยังไม่ได้โหลดค่าของออบเจ็à¸à¸•à¹Œà¸œà¸¥à¸¥à¸±à¸žà¸˜à¹Œ à¸à¹ˆà¸­à¸™à¸—ี่จะอ่านค่าคุณสมบัติ ให้เรียภ"context.sync()" ในบริบทคำขอที่เà¸à¸µà¹ˆà¸¢à¸§à¸‚้อง'; -Strings.OfficeOM.L_OsfControlTypeNotSupported = "ไม่สนับสนุนชนิดของ OsfControl"; -Strings.OfficeOM.L_UnsupportedEnumerationMessage = "à¸à¸²à¸£à¹à¸ˆà¸‡à¸™à¸±à¸šà¹„ม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™à¹ƒà¸™à¹à¸­à¸›à¸žà¸¥à¸´à¹€à¸„ชันที่เป็นโฮสต์ในปัจจุบัน"; +Strings.OfficeOM.L_DialogRequireHTTPS = "ไม่สนับสนุนโพรโทคอล HTTP โปรดใช้ HTTPS à¹à¸—น"; Strings.OfficeOM.L_DisplayDialogError = "à¹à¸ªà¸”งข้อผิดพลาดà¸à¸¥à¹ˆà¸­à¸‡à¹‚ต้ตอบ"; -Strings.OfficeOM.L_UserAbortedMessage = "ผู้ใช้ไม่ยินยอมในสิทธิ์ Add-in"; -Strings.OfficeOM.L_SSOClientError = "มีข้อผิดพลาดเà¸à¸´à¸”ขึ้นในà¸à¸²à¸£à¸£à¹‰à¸­à¸‡à¸‚อà¸à¸²à¸£à¸£à¸±à¸šà¸£à¸­à¸‡à¸„วามถูà¸à¸•à¹‰à¸­à¸‡à¸ˆà¸²à¸ Office"; -Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = "ไม่สามารถเปลี่ยนคุณสมบัติเป็น '{0}' โดยใช้วิธีà¸à¸²à¸£ \"object.set\" ได้"; +Strings.OfficeOM.L_InternalErrorDescription = "มีข้อผิดพลาดภายในเà¸à¸´à¸”ขึ้น"; +Strings.OfficeOM.L_CannotNavigateTo = "วัตถุอยู่ในตำà¹à¸«à¸™à¹ˆà¸‡à¸—ี่ไม่สนับสนุนà¸à¸²à¸£à¸™à¸³à¸—าง"; +Strings.OfficeOM.L_InvalidRequestContext = "ไม่สามารถใช้วัตถุà¸à¸±à¸šà¸šà¸£à¸´à¸šà¸—à¸à¸²à¸£à¸£à¹‰à¸­à¸‡à¸‚ออื่นๆ"; +Strings.OfficeOM.L_CustomFunctionImplementationMissing = "คุณสมบัติที่มีชื่อนี้ใน Excel.CustomFunctions ที่à¹à¸ªà¸”งคำนิยามของฟังà¸à¹Œà¸Šà¸±à¸™à¸•à¹‰à¸­à¸‡à¸›à¸£à¸°à¸à¸­à¸šà¸”้วยคุณสมบัติ 'เรียà¸à¹ƒà¸Šà¹‰' ที่ประมวลผลฟังà¸à¹Œà¸Šà¸±à¸™"; +Strings.OfficeOM.L_UserNotSignedIn = "ไม่มีผู้ใช้ลงชื่อเข้าใช้ Office"; +Strings.OfficeOM.L_InvalidSetColumns = "คอลัมน์ที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡"; Strings.OfficeOM.L_NewWindowCrossZone = 'à¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าความปลอดภัยในเบราว์เซอร์ของคุณป้องà¸à¸±à¸™à¹„ม่ให้เราสร้างà¸à¸¥à¹ˆà¸­à¸‡à¹‚ต้ตอบ ลองเบราว์เซอร์อื่น หรือ {0} เพื่อให้ "{1}" à¹à¸¥à¸°à¹‚ดเมนที่à¹à¸ªà¸”งในà¹à¸–บที่อยู่ของคุณอยู่ในโซนความปลอดภัยเดียวà¸à¸±à¸™'; -Strings.OfficeOM.L_InvalidFormat = "ข้อผิดพลาดรูปà¹à¸šà¸šà¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡"; -Strings.OfficeOM.L_NotSupportedBindingType = "ไม่สนับสนุนชนิดà¸à¸²à¸£à¸œà¸¹à¸à¸—ี่ระบุ {0}"; -Strings.OfficeOM.L_InvalidSSOAddinMessage = "ไม่มีสนับสนุน API ของข้อมูลเฉพาะตัวสำหรับ Add-in นี้"; Strings.OfficeOM.L_BindingNotExist = "à¸à¸²à¸£à¸£à¸§à¸¡à¸—ี่ระบุไม่มีอยู่"; -Strings.OfficeOM.L_SpecifiedIdNotExist = "ไม่มี ID ที่ระบุ"; -Strings.OfficeOM.L_PermissionDenied = "สิทธิ์ถูà¸à¸›à¸à¸´à¹€à¸ªà¸˜"; -Strings.OfficeOM.L_InvalidGetStartRowColumn = "ค่าของ startRow หรือ startColumn ที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡"; -Strings.OfficeOM.L_FormattingReminder = "ตัวเตือนà¸à¸²à¸£à¸ˆà¸±à¸”รูปà¹à¸šà¸š"; -Strings.OfficeOM.L_TooManyOptionalObjects = "วัตถุทางเลือà¸à¸«à¸¥à¸²à¸¢à¸§à¸±à¸•à¸–ุในรายà¸à¸²à¸£à¸žà¸²à¸£à¸²à¸¡à¸´à¹€à¸•à¸­à¸£à¹Œ"; -Strings.OfficeOM.L_OperationNotSupported = "ไม่สนับสนุนà¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸™à¸µà¹‰"; -Strings.OfficeOM.L_DataStale = "ข้อมูลไม่เป็นปัจจุบัน"; -Strings.OfficeOM.L_ActivityLimitReached = "ถึงขีดจำà¸à¸±à¸”ของà¸à¸´à¸ˆà¸à¸£à¸£à¸¡à¹à¸¥à¹‰à¸§"; -Strings.OfficeOM.L_NotSupported = "ไม่สนับสนุนฟังà¸à¹Œà¸Šà¸±à¸™ {0}"; -Strings.OfficeOM.L_CustomXmlExceedQuotaName = "ถึงขีดจำà¸à¸±à¸”ของสิ่งที่เลือà¸"; -Strings.OfficeOM.L_ReadSettingsError = "à¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าà¸à¸²à¸£à¸­à¹ˆà¸²à¸™à¸œà¸´à¸”พลาด"; -Strings.OfficeOM.L_InvalidBindingOperation = "à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸œà¸¹à¸à¸—ี่ไม่ถูà¸à¸•à¹‰à¸­à¸‡"; -Strings.OfficeOM.L_NamedItemNotFound = "ไม่มีรายà¸à¸²à¸£à¸—ี่มีชื่ออยู่"; -Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "เนื้อหาที่เลือà¸à¸•à¹‰à¸­à¸‡à¸­à¸¢à¸¹à¹ˆà¹ƒà¸™à¸£à¸¹à¸›à¹à¸šà¸šà¸•à¸²à¸£à¸²à¸‡ จัดรูปà¹à¸šà¸šà¸‚้อมูลเป็นตารางà¹à¸¥à¹‰à¸§à¸¥à¸­à¸‡à¸­à¸µà¸à¸„รั้ง"; -Strings.OfficeOM.L_UserNotSignedIn = "ไม่มีผู้ใช้ลงชื่อเข้าใช้ Office"; -Strings.OfficeOM.L_InvalidRequestContext = "ไม่สามารถใช้วัตถุà¸à¸±à¸šà¸šà¸£à¸´à¸šà¸—à¸à¸²à¸£à¸£à¹‰à¸­à¸‡à¸‚ออื่นๆ"; -Strings.OfficeOM.L_GetDataParametersConflict = "พารามิเตอร์ที่ระบุขัดà¹à¸¢à¹‰à¸‡à¸à¸±à¸™"; -Strings.OfficeOM.L_CustomXmlError = "ข้อผิดพลาด XML à¹à¸šà¸šà¸à¸³à¸«à¸™à¸”เอง"; -Strings.OfficeOM.L_OverwriteWorksheetData = "à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸‚องชุดล้มเหลว เนื่องจาà¸à¸§à¸±à¸•à¸–ุข้อมูลที่ให้มาจะเขียนทับหรือเลื่อนข้อมูล"; -Strings.OfficeOM.L_RequestTimeout = "à¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸à¹ƒà¸Šà¹‰à¹€à¸§à¸¥à¸²à¸™à¸²à¸™à¹€à¸à¸´à¸™à¹„ปในà¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£"; -Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸¥à¹‰à¸¡à¹€à¸«à¸¥à¸§à¹€à¸™à¸·à¹ˆà¸­à¸‡à¸ˆà¸²à¸ Add-in นี้ร้องขอโทเค็นà¸à¸²à¸£à¹€à¸‚้าถึงอยู่à¸à¹ˆà¸­à¸™à¹à¸¥à¹‰à¸§"; -Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "โปรดเลือà¸"; -Strings.OfficeOM.L_DataReadError = "à¸à¸²à¸£à¸­à¹ˆà¸²à¸™à¸‚้อมูลผิดพลาด"; -Strings.OfficeOM.L_TooManyOptionalFunction = "ฟังà¸à¹Œà¸Šà¸±à¸™à¸—างเลือà¸à¸«à¸¥à¸²à¸¢à¸Ÿà¸±à¸‡à¸à¹Œà¸Šà¸±à¸™à¹ƒà¸™à¸£à¸²à¸¢à¸à¸²à¸£à¸žà¸²à¸£à¸²à¸¡à¸´à¹€à¸•à¸­à¸£à¹Œ"; -Strings.OfficeOM.L_InvalidArgumentGeneric = "อาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¸ªà¹ˆà¸‡à¸œà¹ˆà¸²à¸™à¹„ปยังฟังà¸à¹Œà¸Šà¸±à¸™à¹„ม่สามารถใช้à¸à¸±à¸šà¸ªà¸–านà¸à¸²à¸£à¸“์นี้ อาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¸«à¸²à¸¢à¹„ป หรืออาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¹„ม่ได้อยู่ในรูปà¹à¸šà¸šà¸—ี่ถูà¸à¸•à¹‰à¸­à¸‡"; -Strings.OfficeOM.L_UserClickIgnore = "ผู้ใช้เลือà¸à¸—ี่จะละเว้นà¸à¸²à¸£à¸à¸¥à¹ˆà¸­à¸‡à¹‚ต้ตอบ"; -Strings.OfficeOM.L_UnsupportedDataObject = "ชนิดวัตถุข้อมูลที่ให้มาไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™"; -Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "à¸à¸³à¸¥à¸±à¸‡à¸žà¸¢à¸²à¸¢à¸²à¸¡à¸•à¸±à¹‰à¸‡à¸„่าคุณสมบัติà¹à¸šà¸šà¸­à¹ˆà¸²à¸™à¸­à¸¢à¹ˆà¸²à¸‡à¹€à¸”ียว '{0}'"; -Strings.OfficeOM.L_TooManyArguments = "มีอาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¸¡à¸²à¸à¹€à¸à¸´à¸™à¹„ป"; -Strings.OfficeOM.L_OutOfRange = "ไม่อยู่ในช่วงที่à¸à¸³à¸«à¸™à¸”"; -Strings.OfficeOM.L_SaveSettingsError = "à¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าà¸à¸²à¸£à¸šà¸±à¸™à¸—ึà¸à¸œà¸´à¸”พลาด"; -Strings.OfficeOM.L_ShuttingDown = "à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸¥à¹‰à¸¡à¹€à¸«à¸¥à¸§à¹€à¸žà¸£à¸²à¸°à¸‚้อมูลไม่เป็นข้อมูลปัจจุบันบนเซิร์ฟเวอร์"; -Strings.OfficeOM.L_MissingParameter = "พารามิเตอร์สูà¸à¸«à¸²à¸¢"; -Strings.OfficeOM.L_InvalidSetRows = "à¹à¸–วที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡"; -Strings.OfficeOM.L_Timeout = "à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸«à¸¡à¸”เวลา "; -Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "หมายเหตุ: ชุดà¸à¸²à¸£à¸ˆà¸±à¸”รูปà¹à¸šà¸šà¸—ี่ถูà¸à¸•à¸±à¹‰à¸‡à¸„่าโดยà¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸ API à¸à¸²à¸£à¸ˆà¸±à¸”รูปà¹à¸šà¸šà¸„วรจะต่ำà¸à¸§à¹ˆà¸² 100"; -Strings.OfficeOM.L_CoercionTypeNotSupported = "ชนิดà¸à¸²à¸£à¸šà¸±à¸‡à¸„ับใช้ที่ระบุไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™"; -Strings.OfficeOM.L_InvalidNode = "โหนดไม่ถูà¸à¸•à¹‰à¸­à¸‡"; -Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "ข้อมูลล้าสมัยà¹à¸¥à¹‰à¸§ โปรดดึงวัตถุอีà¸à¸„รั้ง"; -Strings.OfficeOM.L_UnsupportedUserIdentity = "ชนิดข้อมูลประจำตัวของผู้ใช้ไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™"; -Strings.OfficeOM.L_InvalidGrantMessage = "à¸à¸²à¸£à¹ƒà¸«à¹‰à¸ªà¸´à¸—ธิ์ขาดหายไปสำหรับ Add-in นี้"; -Strings.OfficeOM.L_SettingNameNotExist = "ไม่มีชื่อà¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าที่ระบุ"; -Strings.OfficeOM.L_ConnectionFailureWithDetails = "คำขอล้มเหลวโดยมีรหัสสถานะ {0} รหัสข้อผิดพลาด {1} à¹à¸¥à¸°à¸‚้อความà¹à¸ªà¸”งข้อผิดพลาดต่อไปนี้: {2}"; -Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "ไม่สามารถใช้พารามิเตอร์พิà¸à¸±à¸”à¸à¸±à¸šà¸Šà¸™à¸´à¸”à¸à¸²à¸£à¸šà¸±à¸‡à¸„ับใช้ตารางได้ เมื่อตารางนั้นมีเซลล์ที่ถูà¸à¸œà¸ªà¸²à¸™"; -Strings.OfficeOM.L_InvalidValue = "ค่าไม่ถูà¸à¸•à¹‰à¸­à¸‡"; -Strings.OfficeOM.L_SSOClientErrorMessage = "มีข้อผิดพลาดที่ไม่คาดคิดเà¸à¸´à¸”ขึ้นในไคลเอ็นต์"; -Strings.OfficeOM.L_MultipleNamedItemFound = "พบหลายวัตถุที่มีชื่อเดียวà¸à¸±à¸™" +Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "à¸à¸³à¸«à¸™à¸”ค่าเบราว์เซอร์ของคุณ"; +Strings.OfficeOM.L_BrowserAPINotSupported = "เบราว์เซอร์นี้ไม่สนับสนุน API ที่ร้องขอ"; +Strings.OfficeOM.L_MultipleNamedItemFound = "พบหลายวัตถุที่มีชื่อเดียวà¸à¸±à¸™" \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/th-th/office_strings.js b/node_modules/@microsoft/office-js/dist/th-th/office_strings.js index 7b21ce7..93eb82d 100644 --- a/node_modules/@microsoft/office-js/dist/th-th/office_strings.js +++ b/node_modules/@microsoft/office-js/dist/th-th/office_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_InValidOptionalArgument="อาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¸—างเลือà¸à¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_RunMustReturnPromise='ฟังà¸à¹Œà¸Šà¸±à¸™à¸Šà¸¸à¸”คำสั่งที่ส่งไปที่เมธอด ".run" ไม่ได้ส่ง Promise à¸à¸¥à¸±à¸šà¸¡à¸² ฟังà¸à¹Œà¸Šà¸±à¸™à¸•à¹‰à¸­à¸‡à¸ªà¹ˆà¸‡ Promise à¸à¸¥à¸±à¸šà¸¡à¸²à¹€à¸žà¸·à¹ˆà¸­à¹ƒà¸«à¹‰à¸ªà¸²à¸¡à¸²à¸£à¸–ปล่อยวัตถุใดๆ ที่มีà¸à¸²à¸£à¸•à¸´à¸”ตามอัตโนมัติได้เมื่อดำเนินà¸à¸²à¸£à¸Šà¸¸à¸”คำสั่งสำเร็จ โดยปà¸à¸•à¸´à¹à¸¥à¹‰à¸§ คุณจะส่งคืน Promise ด้วยà¸à¸²à¸£à¸ªà¹ˆà¸‡à¸à¸²à¸£à¸•à¸­à¸šà¸à¸¥à¸±à¸šà¸ˆà¸²à¸ "context.sync()"';Strings.OfficeOM.L_NonUniformPartialGetNotSupported="ไม่สามารถใช้พารามิเตอร์พิà¸à¸±à¸”à¸à¸±à¸šà¸Šà¸™à¸´à¸”à¸à¸²à¸£à¸šà¸±à¸‡à¸„ับใช้ตารางได้ เมื่อตารางนั้นมีเซลล์ที่ถูà¸à¸œà¸ªà¸²à¸™";Strings.OfficeOM.L_ColIndexOutOfRange="ค่าดัชนีคอลัมน์อยู่นอà¸à¸Šà¹ˆà¸§à¸‡à¸—ี่อนุà¸à¸²à¸• ใช้ค่า (0 หรือมาà¸à¸à¸§à¹ˆà¸²) ที่มีค่าน้อยà¸à¸§à¹ˆà¸²à¸ˆà¸³à¸™à¸§à¸™à¸„อลัมน์";Strings.OfficeOM.L_AppNameNotExist="ชื่อ Add-in สำหรับ {0} ไม่มีอยู่";Strings.OfficeOM.L_EventHandlerNotExist="ไม่พบตัวจัดà¸à¸²à¸£à¹€à¸«à¸•à¸¸à¸à¸²à¸£à¸“์ที่ระบุสำหรับà¸à¸²à¸£à¸œà¸¹à¸à¸™à¸µà¹‰";Strings.OfficeOM.L_InvalidParameters="ฟังà¸à¹Œà¸Šà¸±à¸™ {0} มีพารามิเตอร์ที่ไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_FileTypeNotSupported="ชนิดของไฟล์ที่ระบุไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™";Strings.OfficeOM.L_InvalidFormatValue="พารามิเตอร์ของรูปà¹à¸šà¸šà¸­à¸¢à¹ˆà¸²à¸‡à¸™à¹‰à¸­à¸¢à¸«à¸™à¸¶à¹ˆà¸‡à¸£à¸²à¸¢à¸à¸²à¸£à¸¡à¸µà¸„่าที่ไม่ได้รับอนุà¸à¸²à¸• ตรวจสอบค่าใหม่à¹à¸¥à¹‰à¸§à¸¥à¸­à¸‡à¸­à¸µà¸à¸„รั้ง";Strings.OfficeOM.L_SetDataIsTooLarge="วัตถุข้อมูลที่ระบุมีขนาดใหà¸à¹ˆà¹€à¸à¸´à¸™à¹„ป";Strings.OfficeOM.L_InvalidApiCallInContext="à¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸ API ในบริบทปัจจุบันไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_DataNotMatchBindingSize="วัตถุข้อมูลที่ให้มามีขนาดไม่ตรงà¸à¸±à¸™à¸à¸±à¸šà¸ªà¹ˆà¸§à¸™à¸—ี่เลือà¸à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™";Strings.OfficeOM.L_SettingsCannotSave="ไม่สามารถบันทึà¸à¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าได้";Strings.OfficeOM.L_SliceSizeNotSupported="ขนาดของชิ้นที่ระบุไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="ชนิดà¸à¸²à¸£à¸œà¸¹à¸à¸™à¸µà¹‰à¹„ม่สนับสนุนาà¸à¸£à¸”ำเนินà¸à¸²à¸£à¸™à¸µà¹‰";Strings.OfficeOM.L_PropertyDoesNotExist="คุณสมบัติ '{0}' ไม่มีในวัตถุ ";Strings.OfficeOM.L_SetDataParametersConflict="พารามิเตอร์ที่ระบุขัดà¹à¸¢à¹‰à¸‡à¸à¸±à¸™";Strings.OfficeOM.L_TooManyIncompleteRequests="รอจนà¸à¸§à¹ˆà¸²à¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸à¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸²à¸ˆà¸°à¹€à¸ªà¸£à¹‡à¸ˆà¸ªà¸¡à¸šà¸¹à¸£à¸“์";Strings.OfficeOM.L_InvalidGetColumns="คอลัมน์ที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_UnknownBindingType="ไม่สนับสนุนชนิดà¸à¸²à¸£à¸œà¸¹à¸à¸™à¸µà¹‰";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="อนุà¸à¸²à¸•";Strings.OfficeOM.L_InvalidDataFormat="รูปà¹à¸šà¸šà¸‚องวัตถุข้อมูลที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_SettingsStaleError="à¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าเดิมผิดพลาด";Strings.OfficeOM.L_DocumentReadOnly="ไม่อนุà¸à¸²à¸•à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸—ี่ร้องขอในโหมดเอà¸à¸ªà¸²à¸£à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™";Strings.OfficeOM.L_APINotSupported="API ไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™";Strings.OfficeOM.L_ElementMissing="เราไม่สามารถจัดรูปà¹à¸šà¸šà¹€à¸‹à¸¥à¸¥à¹Œà¸•à¸²à¸£à¸²à¸‡à¹„ด้ เนื่องจาà¸à¸„่าพารามิเตอร์บางค่าหายไป ตรวจสอบพารามิเตอร์ใหม่à¹à¸¥à¹‰à¸§à¸¥à¸­à¸‡à¸­à¸µà¸à¸„รั้ง";Strings.OfficeOM.L_FormatValueOutOfRange="ค่าอยู่นอà¸à¸Šà¹ˆà¸§à¸‡à¸—ี่อนุà¸à¸²à¸• ";Strings.OfficeOM.L_CallbackNotAFunction="à¸à¸²à¸£à¸•à¸´à¸”ต่อà¸à¸¥à¸±à¸šà¸—ี่ต้องเป็นของฟังà¸à¹Œà¸Šà¸±à¸™à¸Šà¸™à¸´à¸” à¸à¸¥à¸±à¸šà¹€à¸›à¹‡à¸™à¸‚อง {0} ของชนิด";Strings.OfficeOM.L_InvalidResourceUrlMessage="Url ของทรัพยาà¸à¸£à¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡à¸—ี่ระบุไว้ในรายà¸à¸²à¸£";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="ข้อจำà¸à¸±à¸”ของเบราว์เซอร์ไม่อนุà¸à¸²à¸•à¹ƒà¸«à¹‰à¸ªà¸£à¹‰à¸²à¸‡à¸à¸¥à¹ˆà¸­à¸‡à¹‚ต้ตอบ โดเมนของà¸à¸¥à¹ˆà¸­à¸‡à¹‚ต้ตอบà¹à¸¥à¸°à¹‚ดเมนของโฮสต์ Add-in ไม่ได้อยู่ในโซนความปลอดภัยเดียวà¸à¸±à¸™";Strings.OfficeOM.L_DataNotMatchSelection="วัตถุข้อมูลที่ให้มาเข้าà¸à¸±à¸™à¹„ม่ได้à¸à¸±à¸šà¸£à¸¹à¸›à¸£à¹ˆà¸²à¸‡à¸«à¸£à¸·à¸­à¸¡à¸´à¸•à¸´à¸‚องà¸à¸²à¸£à¹€à¸¥à¸·à¸­à¸à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™";Strings.OfficeOM.L_InvalidCoercion="ชนิดของà¸à¸²à¸£à¸šà¸±à¸‡à¸„ับใช้ไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_InvalidGetRowColumnCounts="ค่าของ rowCount หรือ columnCount ที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_DialogOK="ตà¸à¸¥à¸‡";Strings.OfficeOM.L_EventHandlerAdditionFailed="ไม่สามารถเพิ่มตัวจัดà¸à¸²à¸£à¹€à¸«à¸•à¸¸à¸à¸²à¸£à¸“์ได้";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="ชนิดà¸à¸²à¸£à¸šà¸±à¸‡à¸„ับใช้ที่ระบุเข้าà¸à¸±à¸™à¹„ม่ได้à¸à¸±à¸šà¸Šà¸™à¸´à¸”à¸à¸²à¸£à¸œà¸¹à¸à¸™à¸µà¹‰";Strings.OfficeOM.L_InvalidResourceUrl="มี Url ของทรัพยาà¸à¸£à¹à¸­à¸›à¸žà¸¥à¸´à¹€à¸„ชันไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_IndexOutOfRange="ดัชนีไม่อยู่ในช่วง";Strings.OfficeOM.L_CloseFileBeforeRetrieve="เรียภcloseAsync บนไฟล์ปัจจุบันà¸à¹ˆà¸­à¸™à¸—ี่จะเรียà¸à¹ƒà¸Šà¹‰à¹„ฟล์อื่น";Strings.OfficeOM.L_CannotRegisterEvent="ไม่สามารถลงทะเบียนตัวจัดà¸à¸²à¸£à¹€à¸«à¸•à¸¸à¸à¸²à¸£à¸“์ได้";Strings.OfficeOM.L_DataNotMatchCoercionType="ชนิดวัตถุข้อมูลที่ระบุเข้าà¸à¸±à¸™à¹„ม่ได้à¸à¸±à¸šà¸ªà¹ˆà¸§à¸™à¸—ี่เลือà¸à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™";Strings.OfficeOM.L_InvalidColumnsForBinding="คอลัมน์ที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_EventHandlerRemovalFailed="ไม่สามารถเอาตัวจัดà¸à¸²à¸£à¹€à¸«à¸•à¸¸à¸à¸²à¸£à¸“์ออà¸à¹„ด้";Strings.OfficeOM.L_APICallFailed="à¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸ API ล้มเหลว";Strings.OfficeOM.L_InvalidGrant="à¸à¸²à¸£à¸­à¸™à¸¸à¸¡à¸±à¸•à¸´à¸¥à¹ˆà¸§à¸‡à¸«à¸™à¹‰à¸²à¸‚าดไป";Strings.OfficeOM.L_DialogNavigateError="ข้อผิดพลาดà¸à¸²à¸£à¸™à¸³à¸—างà¸à¸¥à¹ˆà¸­à¸‡à¹‚ต้ตอบ";Strings.OfficeOM.L_UnsupportedEnumeration="à¸à¸²à¸£à¹à¸ˆà¸‡à¸™à¸±à¸šà¸—ี่ไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™";Strings.OfficeOM.L_NavOutOfBound="à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸¥à¹‰à¸¡à¹€à¸«à¸¥à¸§à¹€à¸™à¸·à¹ˆà¸­à¸‡à¸ˆà¸²à¸à¸”ัชนีอยู่นอà¸à¸Šà¹ˆà¸§à¸‡";Strings.OfficeOM.L_InvalidTableOptionValue="พารามิเตอร์ของตัวเลือà¸à¸•à¸²à¸£à¸²à¸‡à¸­à¸¢à¹ˆà¸²à¸‡à¸™à¹‰à¸­à¸¢à¸«à¸™à¸¶à¹ˆà¸‡à¸£à¸²à¸¢à¸à¸²à¸£à¸¡à¸µà¸„่าที่ไม่ได้รับอนุà¸à¸²à¸• ตรวจสอบค่าใหม่à¹à¸¥à¹‰à¸§à¸¥à¸­à¸‡à¸­à¸µà¸à¸„รั้ง";Strings.OfficeOM.L_InitializeNotReady="ยังไม่ได้โหลด Office.js à¹à¸šà¸šà¹€à¸•à¹‡à¸¡ โปรดลองอีà¸à¸„รั้งในภายหลัง หรือตรวจสอบให้à¹à¸™à¹ˆà¹ƒà¸ˆà¸§à¹ˆà¸²à¹„ด้เพิ่มโค้ดà¸à¸²à¸£à¹€à¸•à¸£à¸µà¸¢à¸¡à¹ƒà¸Šà¹‰à¸‡à¸²à¸™à¸‚องคุณบนฟังà¸à¹Œà¸Šà¸±à¸™ Office.initialize ";Strings.OfficeOM.L_DataNotMatchBindingType="วัตถุข้อมูลที่ระบุไม่เข้าà¸à¸±à¸™à¸à¸±à¸šà¸Šà¸™à¸´à¸”à¸à¸²à¸£à¸œà¸¹à¸";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Add-in ร้องขอโทเค็นà¸à¸²à¸£à¹€à¸‚้าถึงอยู่à¸à¹ˆà¸­à¸™à¹à¸¥à¹‰à¸§";Strings.OfficeOM.L_CannotNavigateTo="วัตถุอยู่ในตำà¹à¸«à¸™à¹ˆà¸‡à¸—ี่ไม่สนับสนุนà¸à¸²à¸£à¸™à¸³à¸—าง";Strings.OfficeOM.L_EventRegistrationError="à¸à¸²à¸£à¸¥à¸‡à¸—ะเบียนเหตุà¸à¸²à¸£à¸“์ผิดพลาด";Strings.OfficeOM.L_InvalidOrTimedOutSession="เซสชันไม่ถูà¸à¸•à¹‰à¸­à¸‡à¸«à¸£à¸·à¸­à¸«à¸¡à¸”เวลา";Strings.OfficeOM.L_BindingCreationError="à¸à¸²à¸£à¸ªà¸£à¹‰à¸²à¸‡à¸à¸²à¸£à¸œà¸¹à¸à¸œà¸´à¸”พลาด";Strings.OfficeOM.L_ConnectionFailureWithStatus="คำขอล้มเหลวโดยมีรหัสสถานะ {0}";Strings.OfficeOM.L_InvalidSetStartRowColumn="ค่าของ startRow หรือ startColumn ที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_HostError="โฮสต์ผิดพลาด";Strings.OfficeOM.L_MemoryLimit="เà¸à¸´à¸™à¸‚ีดจำà¸à¸±à¸”ของหน่วยความจำ";Strings.OfficeOM.L_DataWriteReminder="ตัวเตือนà¸à¸²à¸£à¹€à¸‚ียนข้อมูล";Strings.OfficeOM.L_FunctionCallFailed="à¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸à¸Ÿà¸±à¸‡à¸à¹Œà¸Šà¸±à¸™ {0} ล้มเหลว รหัสข้อผิดพลาด: {1}";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="ชนิดข้อมูลประจำตัวของผู้ใช้ไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™";Strings.OfficeOM.L_UserAborted="ผู้ใช้ยà¸à¹€à¸¥à¸´à¸à¸à¸²à¸£à¸£à¹‰à¸­à¸‡à¸‚อความยินยอม";Strings.OfficeOM.L_NotImplemented="ฟังà¸à¹Œà¸Šà¸±à¸™ {0} ยังไม่ถูà¸à¸™à¸³à¸¡à¸²à¹ƒà¸Šà¹‰à¸‡à¸²à¸™";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} ต้องà¸à¸²à¸£à¹à¸ªà¸”งหน้าต่างใหม่";Strings.OfficeOM.L_InvalidCellsValue="พารามิเตอร์ของเซลล์อย่างน้อยหนึ่งรายà¸à¸²à¸£à¸¡à¸µà¸„่าที่ไม่ได้รับอนุà¸à¸²à¸• ตรวจสอบค่าใหม่à¹à¸¥à¹‰à¸§à¸¥à¸­à¸‡à¸­à¸µà¸à¸„รั้ง";Strings.OfficeOM.L_InvalidBindingError="ข้อผิดพลาดของà¸à¸²à¸£à¸œà¸¹à¸à¸—ี่ไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_SelectionCannotBound="ไม่สามารถผูà¸à¸à¸±à¸šà¸ªà¹ˆà¸§à¸™à¸—ี่เลือà¸à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™";Strings.OfficeOM.L_CannotWriteToSelection="ไม่สามารถเขียนไปยังส่วนที่เลือà¸à¹ƒà¸™à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™à¹„ด้";Strings.OfficeOM.L_InternalErrorDescription="มีข้อผิดพลาดภายในเà¸à¸´à¸”ขึ้น";Strings.OfficeOM.L_PropertyNotLoaded="คุณสมบัติ '{0}' ไม่พร้อมใช้งาน à¸à¹ˆà¸­à¸™à¸­à¹ˆà¸²à¸™à¸„่าคุณสมบัติ เรียà¸à¹€à¸¡à¸˜à¸­à¸”โหลดจาà¸à¸§à¸±à¸•à¸–ุที่มีà¹à¸¥à¸°à¹€à¸£à¸µà¸¢à¸ \"context.sync()\" ในบริบทà¸à¸²à¸£à¸£à¹‰à¸­à¸‡à¸‚อที่เà¸à¸µà¹ˆà¸¢à¸§à¸‚้อง";Strings.OfficeOM.L_InternalError="ข้อผิดพลาดภายใน";Strings.OfficeOM.L_InvalidSetColumns="คอลัมน์ที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_GetSelectionNotSupported="ส่วนที่เลือà¸à¹ƒà¸™à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™à¹„ม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™";Strings.OfficeOM.L_MissingRequiredArguments="อาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¸—ี่จำเป็นบางอย่างหายไป";Strings.OfficeOM.L_InvalidReadForBlankRow="à¹à¸–วที่ระบุว่างเปล่า";Strings.OfficeOM.L_DialogRequireHTTPS="ไม่สนับสนุนโพรโทคอล HTTP โปรดใช้ HTTPS à¹à¸—น";Strings.OfficeOM.L_NotSupportedEventType="ไม่สนับสนุนชนิดเหตุà¸à¸²à¸£à¸“์ที่ระบุ {0}";Strings.OfficeOM.L_InvalidAPICall="à¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸ API ไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_InvalidArgument="อาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œ '{0}' ใช้งานไม่ได้ในสถานà¸à¸²à¸£à¸“์นี้ หายไป หรือไม่ใช่รูปà¹à¸šà¸šà¸—ี่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_DataWriteError="à¸à¸²à¸£à¹€à¸‚ียนข้อมูลผิดพลาด";Strings.OfficeOM.L_BindingToMultipleSelection="ไม่สนับสนุนส่วนที่เลือà¸à¹à¸šà¸šà¹„ม่ติดà¸à¸±à¸™";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="à¸à¸³à¸«à¸™à¸”ค่าเบราว์เซอร์ของคุณ";Strings.OfficeOM.L_RedundantCallbackSpecification="ไม่สามารถระบุà¸à¸²à¸£à¸•à¸´à¸”ต่อà¸à¸¥à¸±à¸šà¸—ั้งในรายà¸à¸²à¸£à¸­à¸²à¸£à¹Œà¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¹à¸¥à¸°à¹ƒà¸™à¸§à¸±à¸•à¸–ุทางเลือà¸";Strings.OfficeOM.L_CustomXmlOutOfDateName="ข้อมูลไม่เป็นปัจจุบัน";Strings.OfficeOM.L_DialogAddressNotTrusted="โดเมนของ URL ไม่ได้รวมอยู่ในองค์ประà¸à¸­à¸š AppDomains ในไฟล์à¸à¸³à¸à¸±à¸š";Strings.OfficeOM.L_SSOServerErrorMessage="มีข้อผิดพลาดเà¸à¸´à¸”ขึ้นบนเซิร์ฟเวอร์";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath จำà¸à¸±à¸”สิ่งที่เลือà¸à¹„ด้ไว้ที่ 1024 รายà¸à¸²à¸£";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="ไม่มีà¹à¸­à¸›à¸žà¸¥à¸´à¹€à¸„ชัน {0} Microsoft.Office.WebExtension.initialize(reason) ไม่ถูà¸à¹€à¸£à¸µà¸¢à¸";Strings.OfficeOM.L_CustomXmlNodeNotFound="ไม่พบโหนดที่ระบุ";Strings.OfficeOM.L_SSOServerError="มีข้อผิดพลาดเà¸à¸´à¸”ขึ้นในผู้ให้บริà¸à¸²à¸£à¸à¸²à¸£à¸£à¸±à¸šà¸£à¸­à¸‡à¸„วามถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_SelectionNotSupportCoercionType="ส่วนที่เลือà¸à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™à¸™à¸µà¹‰à¹€à¸‚้าà¸à¸±à¸™à¹„ม่ได้à¸à¸±à¸šà¸Šà¸™à¸´à¸”à¸à¸²à¸£à¸šà¸±à¸‡à¸„ับใช้ที่ระบุ";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="เซสชันของ Office Online ของคุณหมดอายุหรือไม่ถูà¸à¸•à¹‰à¸­à¸‡ เมื่อต้องà¸à¸²à¸£à¸—ำต่อไป ให้รีเฟรชหน้า";Strings.OfficeOM.L_CellDataAmountBeyondLimits="หมายเหตุ: จำนวนของเซลล์ในตารางควรจะต่ำà¸à¸§à¹ˆà¸² 20,000 เซลล์";Strings.OfficeOM.L_BadSelectorString="สตริงที่ส่งผ่านไปยังตัวเลือà¸à¹„ด้รับà¸à¸²à¸£à¸ˆà¸±à¸”รูปà¹à¸šà¸šà¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡ หรือไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™";Strings.OfficeOM.L_InvalidDataObject="วัตถุข้อมูลไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_InvalidBinding="à¸à¸²à¸£à¸œà¸¹à¸à¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="ละเว้น";Strings.OfficeOM.L_NoCapability="คุณไม่มีสิทธิ์เพียงพอสำหรับà¸à¸²à¸£à¸à¸£à¸°à¸—ำนี้";Strings.OfficeOM.L_InvalidObjectPath='เส้นทางวัตถุ \'{0}\' ใช้งานไม่ได้à¸à¸±à¸šà¸ªà¸´à¹ˆà¸‡à¸—ี่คุณพยายามดำเนินà¸à¸²à¸£ ถ้าคุณà¸à¸³à¸¥à¸±à¸‡à¹ƒà¸Šà¹‰à¸§à¸±à¸•à¸–ุà¸à¸±à¸šà¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸ "context.sync" หลายครั้งà¹à¸¥à¸°à¸ à¸²à¸¢à¸™à¸­à¸à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸Šà¸¸à¸”คำสั่ง ".run" à¹à¸šà¸šà¸•à¹ˆà¸­à¹€à¸™à¸·à¹ˆà¸­à¸‡ โปรดใช้เมธอด "context.trackedObjects.add()" à¹à¸¥à¸° "context.trackedObjects.remove()" เพื่อจัดà¸à¸²à¸£à¸§à¸‡à¸ˆà¸£à¸à¸²à¸£à¸—ำงานของวัตถุ';Strings.OfficeOM.L_RequestTokenUnavailable="API นี้ถูà¸à¸„วบคุมให้ใช้ปริมาณความถี่ในà¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸à¸Šà¹‰à¸²à¸¥à¸‡";Strings.OfficeOM.L_BrowserAPINotSupported="เบราว์เซอร์นี้ไม่สนับสนุน API ที่ร้องขอ";Strings.OfficeOM.L_InvalidNamedItemForBindingType="ชนิดà¸à¸²à¸£à¸œà¸¹à¸à¸—ี่ระบุเข้าà¸à¸±à¸™à¹„ม่ได้à¸à¸±à¸šà¸£à¸²à¸¢à¸à¸²à¸£à¸—ี่มีชื่อที่ให้มา";Strings.OfficeOM.L_GetDataIsTooLarge="ชุดข้อมูลที่ร้องขอมีขนาดใหà¸à¹ˆà¹€à¸à¸´à¸™à¹„ป";Strings.OfficeOM.L_DialogInvalidScheme="ไม่สนับสนุนà¹à¸šà¸šà¹à¸œà¸™ URL โปรดใช้ HTTPS à¹à¸—น";Strings.OfficeOM.L_DialogAlreadyOpened="à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸¥à¹‰à¸¡à¹€à¸«à¸¥à¸§à¹€à¸™à¸·à¹ˆà¸­à¸‡à¸ˆà¸²à¸ Add-in นี้มีà¸à¸¥à¹ˆà¸­à¸‡à¹‚ต้ตอบที่ใช้งานอยู่เรียบร้อยà¹à¸¥à¹‰à¸§";Strings.OfficeOM.L_InvalidSelectionForBindingType="ไม่สามารถสร้างà¸à¸²à¸£à¸œà¸¹à¸à¸à¸±à¸šà¸à¸²à¸£à¹€à¸¥à¸·à¸­à¸à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™à¹à¸¥à¸°à¸Šà¸™à¸´à¸”à¸à¸²à¸£à¸œà¸¹à¸à¸—ี่ระบุได้";Strings.OfficeOM.L_RowIndexOutOfRange="ค่าดัชนีà¹à¸–วอยู่นอà¸à¸Šà¹ˆà¸§à¸‡à¸—ี่อนุà¸à¸²à¸• ใช้ค่า (0 หรือมาà¸à¸à¸§à¹ˆà¸²) ที่มีค่าน้อยà¸à¸§à¹ˆà¸²à¸ˆà¸³à¸™à¸§à¸™à¹à¸–ว";Strings.OfficeOM.L_InvalidGetRows="à¹à¸–วที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_InvalidApiArgumentsMessage="อาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¸›à¹‰à¸­à¸™à¹€à¸‚้าไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_NetworkProblem="ปัà¸à¸«à¸²à¹€à¸„รือข่าย";Strings.OfficeOM.L_NetworkProblemRetrieveFile="ปัà¸à¸«à¸²à¹€à¸„รือข่ายป้องà¸à¸±à¸™à¹„ม่ให้เรียà¸à¹ƒà¸Šà¹‰à¹„ฟล์";Strings.OfficeOM.L_SettingsAreStale="ไม่สามารถบันทึà¸à¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าได้เพราะไม่เป็นข้อมูลปัจจุบัน";Strings.OfficeOM.L_ValueNotLoaded='ยังไม่ได้โหลดค่าของออบเจ็à¸à¸•à¹Œà¸œà¸¥à¸¥à¸±à¸žà¸˜à¹Œ à¸à¹ˆà¸­à¸™à¸—ี่จะอ่านค่าคุณสมบัติ ให้เรียภ"context.sync()" ในบริบทคำขอที่เà¸à¸µà¹ˆà¸¢à¸§à¸‚้อง';Strings.OfficeOM.L_OsfControlTypeNotSupported="ไม่สนับสนุนชนิดของ OsfControl";Strings.OfficeOM.L_UnsupportedEnumerationMessage="à¸à¸²à¸£à¹à¸ˆà¸‡à¸™à¸±à¸šà¹„ม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™à¹ƒà¸™à¹à¸­à¸›à¸žà¸¥à¸´à¹€à¸„ชันที่เป็นโฮสต์ในปัจจุบัน";Strings.OfficeOM.L_DisplayDialogError="à¹à¸ªà¸”งข้อผิดพลาดà¸à¸¥à¹ˆà¸­à¸‡à¹‚ต้ตอบ";Strings.OfficeOM.L_UserAbortedMessage="ผู้ใช้ไม่ยินยอมในสิทธิ์ Add-in";Strings.OfficeOM.L_SSOClientError="มีข้อผิดพลาดเà¸à¸´à¸”ขึ้นในà¸à¸²à¸£à¸£à¹‰à¸­à¸‡à¸‚อà¸à¸²à¸£à¸£à¸±à¸šà¸£à¸­à¸‡à¸„วามถูà¸à¸•à¹‰à¸­à¸‡à¸ˆà¸²à¸ Office";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="ไม่สามารถเปลี่ยนคุณสมบัติเป็น '{0}' โดยใช้วิธีà¸à¸²à¸£ \"object.set\" ได้";Strings.OfficeOM.L_NewWindowCrossZone='à¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าความปลอดภัยในเบราว์เซอร์ของคุณป้องà¸à¸±à¸™à¹„ม่ให้เราสร้างà¸à¸¥à¹ˆà¸­à¸‡à¹‚ต้ตอบ ลองเบราว์เซอร์อื่น หรือ {0} เพื่อให้ "{1}" à¹à¸¥à¸°à¹‚ดเมนที่à¹à¸ªà¸”งในà¹à¸–บที่อยู่ของคุณอยู่ในโซนความปลอดภัยเดียวà¸à¸±à¸™';Strings.OfficeOM.L_InvalidFormat="ข้อผิดพลาดรูปà¹à¸šà¸šà¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_NotSupportedBindingType="ไม่สนับสนุนชนิดà¸à¸²à¸£à¸œà¸¹à¸à¸—ี่ระบุ {0}";Strings.OfficeOM.L_InvalidSSOAddinMessage="ไม่มีสนับสนุน API ของข้อมูลเฉพาะตัวสำหรับ Add-in นี้";Strings.OfficeOM.L_BindingNotExist="à¸à¸²à¸£à¸£à¸§à¸¡à¸—ี่ระบุไม่มีอยู่";Strings.OfficeOM.L_SpecifiedIdNotExist="ไม่มี ID ที่ระบุ";Strings.OfficeOM.L_PermissionDenied="สิทธิ์ถูà¸à¸›à¸à¸´à¹€à¸ªà¸˜";Strings.OfficeOM.L_InvalidGetStartRowColumn="ค่าของ startRow หรือ startColumn ที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_FormattingReminder="ตัวเตือนà¸à¸²à¸£à¸ˆà¸±à¸”รูปà¹à¸šà¸š";Strings.OfficeOM.L_TooManyOptionalObjects="วัตถุทางเลือà¸à¸«à¸¥à¸²à¸¢à¸§à¸±à¸•à¸–ุในรายà¸à¸²à¸£à¸žà¸²à¸£à¸²à¸¡à¸´à¹€à¸•à¸­à¸£à¹Œ";Strings.OfficeOM.L_OperationNotSupported="ไม่สนับสนุนà¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸™à¸µà¹‰";Strings.OfficeOM.L_DataStale="ข้อมูลไม่เป็นปัจจุบัน";Strings.OfficeOM.L_ActivityLimitReached="ถึงขีดจำà¸à¸±à¸”ของà¸à¸´à¸ˆà¸à¸£à¸£à¸¡à¹à¸¥à¹‰à¸§";Strings.OfficeOM.L_NotSupported="ไม่สนับสนุนฟังà¸à¹Œà¸Šà¸±à¸™ {0}";Strings.OfficeOM.L_CustomXmlExceedQuotaName="ถึงขีดจำà¸à¸±à¸”ของสิ่งที่เลือà¸";Strings.OfficeOM.L_ReadSettingsError="à¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าà¸à¸²à¸£à¸­à¹ˆà¸²à¸™à¸œà¸´à¸”พลาด";Strings.OfficeOM.L_InvalidBindingOperation="à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸œà¸¹à¸à¸—ี่ไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_NamedItemNotFound="ไม่มีรายà¸à¸²à¸£à¸—ี่มีชื่ออยู่";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="เนื้อหาที่เลือà¸à¸•à¹‰à¸­à¸‡à¸­à¸¢à¸¹à¹ˆà¹ƒà¸™à¸£à¸¹à¸›à¹à¸šà¸šà¸•à¸²à¸£à¸²à¸‡ จัดรูปà¹à¸šà¸šà¸‚้อมูลเป็นตารางà¹à¸¥à¹‰à¸§à¸¥à¸­à¸‡à¸­à¸µà¸à¸„รั้ง";Strings.OfficeOM.L_UserNotSignedIn="ไม่มีผู้ใช้ลงชื่อเข้าใช้ Office";Strings.OfficeOM.L_InvalidRequestContext="ไม่สามารถใช้วัตถุà¸à¸±à¸šà¸šà¸£à¸´à¸šà¸—à¸à¸²à¸£à¸£à¹‰à¸­à¸‡à¸‚ออื่นๆ";Strings.OfficeOM.L_GetDataParametersConflict="พารามิเตอร์ที่ระบุขัดà¹à¸¢à¹‰à¸‡à¸à¸±à¸™";Strings.OfficeOM.L_CustomXmlError="ข้อผิดพลาด XML à¹à¸šà¸šà¸à¸³à¸«à¸™à¸”เอง";Strings.OfficeOM.L_OverwriteWorksheetData="à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸‚องชุดล้มเหลว เนื่องจาà¸à¸§à¸±à¸•à¸–ุข้อมูลที่ให้มาจะเขียนทับหรือเลื่อนข้อมูล";Strings.OfficeOM.L_RequestTimeout="à¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸à¹ƒà¸Šà¹‰à¹€à¸§à¸¥à¸²à¸™à¸²à¸™à¹€à¸à¸´à¸™à¹„ปในà¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸¥à¹‰à¸¡à¹€à¸«à¸¥à¸§à¹€à¸™à¸·à¹ˆà¸­à¸‡à¸ˆà¸²à¸ Add-in นี้ร้องขอโทเค็นà¸à¸²à¸£à¹€à¸‚้าถึงอยู่à¸à¹ˆà¸­à¸™à¹à¸¥à¹‰à¸§";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="โปรดเลือà¸";Strings.OfficeOM.L_DataReadError="à¸à¸²à¸£à¸­à¹ˆà¸²à¸™à¸‚้อมูลผิดพลาด";Strings.OfficeOM.L_TooManyOptionalFunction="ฟังà¸à¹Œà¸Šà¸±à¸™à¸—างเลือà¸à¸«à¸¥à¸²à¸¢à¸Ÿà¸±à¸‡à¸à¹Œà¸Šà¸±à¸™à¹ƒà¸™à¸£à¸²à¸¢à¸à¸²à¸£à¸žà¸²à¸£à¸²à¸¡à¸´à¹€à¸•à¸­à¸£à¹Œ";Strings.OfficeOM.L_InvalidArgumentGeneric="อาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¸ªà¹ˆà¸‡à¸œà¹ˆà¸²à¸™à¹„ปยังฟังà¸à¹Œà¸Šà¸±à¸™à¹„ม่สามารถใช้à¸à¸±à¸šà¸ªà¸–านà¸à¸²à¸£à¸“์นี้ อาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¸«à¸²à¸¢à¹„ป หรืออาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¹„ม่ได้อยู่ในรูปà¹à¸šà¸šà¸—ี่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_UserClickIgnore="ผู้ใช้เลือà¸à¸—ี่จะละเว้นà¸à¸²à¸£à¸à¸¥à¹ˆà¸­à¸‡à¹‚ต้ตอบ";Strings.OfficeOM.L_UnsupportedDataObject="ชนิดวัตถุข้อมูลที่ให้มาไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="à¸à¸³à¸¥à¸±à¸‡à¸žà¸¢à¸²à¸¢à¸²à¸¡à¸•à¸±à¹‰à¸‡à¸„่าคุณสมบัติà¹à¸šà¸šà¸­à¹ˆà¸²à¸™à¸­à¸¢à¹ˆà¸²à¸‡à¹€à¸”ียว '{0}'";Strings.OfficeOM.L_TooManyArguments="มีอาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¸¡à¸²à¸à¹€à¸à¸´à¸™à¹„ป";Strings.OfficeOM.L_OutOfRange="ไม่อยู่ในช่วงที่à¸à¸³à¸«à¸™à¸”";Strings.OfficeOM.L_SaveSettingsError="à¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าà¸à¸²à¸£à¸šà¸±à¸™à¸—ึà¸à¸œà¸´à¸”พลาด";Strings.OfficeOM.L_ShuttingDown="à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸¥à¹‰à¸¡à¹€à¸«à¸¥à¸§à¹€à¸žà¸£à¸²à¸°à¸‚้อมูลไม่เป็นข้อมูลปัจจุบันบนเซิร์ฟเวอร์";Strings.OfficeOM.L_MissingParameter="พารามิเตอร์สูà¸à¸«à¸²à¸¢";Strings.OfficeOM.L_InvalidSetRows="à¹à¸–วที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_Timeout="à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸«à¸¡à¸”เวลา ";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="หมายเหตุ: ชุดà¸à¸²à¸£à¸ˆà¸±à¸”รูปà¹à¸šà¸šà¸—ี่ถูà¸à¸•à¸±à¹‰à¸‡à¸„่าโดยà¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸ API à¸à¸²à¸£à¸ˆà¸±à¸”รูปà¹à¸šà¸šà¸„วรจะต่ำà¸à¸§à¹ˆà¸² 100";Strings.OfficeOM.L_CoercionTypeNotSupported="ชนิดà¸à¸²à¸£à¸šà¸±à¸‡à¸„ับใช้ที่ระบุไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™";Strings.OfficeOM.L_InvalidNode="โหนดไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="ข้อมูลล้าสมัยà¹à¸¥à¹‰à¸§ โปรดดึงวัตถุอีà¸à¸„รั้ง";Strings.OfficeOM.L_UnsupportedUserIdentity="ชนิดข้อมูลประจำตัวของผู้ใช้ไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™";Strings.OfficeOM.L_InvalidGrantMessage="à¸à¸²à¸£à¹ƒà¸«à¹‰à¸ªà¸´à¸—ธิ์ขาดหายไปสำหรับ Add-in นี้";Strings.OfficeOM.L_SettingNameNotExist="ไม่มีชื่อà¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าที่ระบุ";Strings.OfficeOM.L_ConnectionFailureWithDetails="คำขอล้มเหลวโดยมีรหัสสถานะ {0} รหัสข้อผิดพลาด {1} à¹à¸¥à¸°à¸‚้อความà¹à¸ªà¸”งข้อผิดพลาดต่อไปนี้: {2}";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="ไม่สามารถใช้พารามิเตอร์พิà¸à¸±à¸”à¸à¸±à¸šà¸Šà¸™à¸´à¸”à¸à¸²à¸£à¸šà¸±à¸‡à¸„ับใช้ตารางได้ เมื่อตารางนั้นมีเซลล์ที่ถูà¸à¸œà¸ªà¸²à¸™";Strings.OfficeOM.L_InvalidValue="ค่าไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_SSOClientErrorMessage="มีข้อผิดพลาดที่ไม่คาดคิดเà¸à¸´à¸”ขึ้นในไคลเอ็นต์";Strings.OfficeOM.L_MultipleNamedItemFound="พบหลายวัตถุที่มีชื่อเดียวà¸à¸±à¸™" \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_APICallFailed="à¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸ API ล้มเหลว";Strings.OfficeOM.L_DataWriteReminder="ตัวเตือนà¸à¸²à¸£à¹€à¸‚ียนข้อมูล";Strings.OfficeOM.L_FormatValueOutOfRange="ค่าอยู่นอà¸à¸Šà¹ˆà¸§à¸‡à¸—ี่อนุà¸à¸²à¸• ";Strings.OfficeOM.L_OperationNotSupported="ไม่สนับสนุนà¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸™à¸µà¹‰";Strings.OfficeOM.L_NetworkProblem="ปัà¸à¸«à¸²à¹€à¸„รือข่าย";Strings.OfficeOM.L_PropertyDoesNotExist="คุณสมบัติ '{0}' ไม่มีในวัตถุ ";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="โปรดเลือà¸";Strings.OfficeOM.L_NotSupportedEventType="ไม่สนับสนุนชนิดเหตุà¸à¸²à¸£à¸“์ที่ระบุ {0}";Strings.OfficeOM.L_UnsupportedDataObject="ชนิดวัตถุข้อมูลที่ให้มาไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™";Strings.OfficeOM.L_CustomFunctionNameCannotSplit="ชื่อฟังà¸à¹Œà¸Šà¸±à¸™à¸•à¹‰à¸­à¸‡à¸›à¸£à¸°à¸à¸­à¸šà¸”้วยเนมสเปซไม่ว่างเปล่าà¹à¸¥à¸°à¸Šà¸·à¹ˆà¸­à¸¢à¹ˆà¸­à¹„ม่ว่างเปล่า";Strings.OfficeOM.L_UnsupportedEnumeration="à¸à¸²à¸£à¹à¸ˆà¸‡à¸™à¸±à¸šà¸—ี่ไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="ชนิดà¸à¸²à¸£à¸šà¸±à¸‡à¸„ับใช้ที่ระบุเข้าà¸à¸±à¸™à¹„ม่ได้à¸à¸±à¸šà¸Šà¸™à¸´à¸”à¸à¸²à¸£à¸œà¸¹à¸à¸™à¸µà¹‰";Strings.OfficeOM.L_RequestTimeout="à¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸à¹ƒà¸Šà¹‰à¹€à¸§à¸¥à¸²à¸™à¸²à¸™à¹€à¸à¸´à¸™à¹„ปในà¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£";Strings.OfficeOM.L_IndexOutOfRange="ดัชนีไม่อยู่ในช่วง";Strings.OfficeOM.L_SettingsCannotSave="ไม่สามารถบันทึà¸à¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าได้";Strings.OfficeOM.L_NamedItemNotFound="ไม่มีรายà¸à¸²à¸£à¸—ี่มีชื่ออยู่";Strings.OfficeOM.L_ConnectionFailureWithDetails="คำขอล้มเหลวโดยมีรหัสสถานะ {0} รหัสข้อผิดพลาด {1} à¹à¸¥à¸°à¸‚้อความà¹à¸ªà¸”งข้อผิดพลาดต่อไปนี้: {2}";Strings.OfficeOM.L_ColIndexOutOfRange="ค่าดัชนีคอลัมน์อยู่นอà¸à¸Šà¹ˆà¸§à¸‡à¸—ี่อนุà¸à¸²à¸• ใช้ค่า (0 หรือมาà¸à¸à¸§à¹ˆà¸²) ที่มีค่าน้อยà¸à¸§à¹ˆà¸²à¸ˆà¸³à¸™à¸§à¸™à¸„อลัมน์";Strings.OfficeOM.L_CustomFunctionDefinitionMissing="คุณสมบัติที่มีชื่อนี้ซึ่งà¹à¸ªà¸”งถึงคำนิยามของฟังà¸à¹Œà¸Šà¸±à¸™à¸•à¹‰à¸­à¸‡à¸¡à¸µà¸­à¸¢à¸¹à¹ˆà¹ƒà¸™ Excel.CustomFunctions";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="เซสชันของ Office Online ของคุณหมดอายุหรือไม่ถูà¸à¸•à¹‰à¸­à¸‡ เมื่อต้องà¸à¸²à¸£à¸—ำต่อไป ให้รีเฟรชหน้า";Strings.OfficeOM.L_InvalidBinding="à¸à¸²à¸£à¸œà¸¹à¸à¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_InvalidBindingError="ข้อผิดพลาดของà¸à¸²à¸£à¸œà¸¹à¸à¸—ี่ไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_InvalidTableOptionValue="พารามิเตอร์ของตัวเลือà¸à¸•à¸²à¸£à¸²à¸‡à¸­à¸¢à¹ˆà¸²à¸‡à¸™à¹‰à¸­à¸¢à¸«à¸™à¸¶à¹ˆà¸‡à¸£à¸²à¸¢à¸à¸²à¸£à¸¡à¸µà¸„่าที่ไม่ได้รับอนุà¸à¸²à¸• ตรวจสอบค่าใหม่à¹à¸¥à¹‰à¸§à¸¥à¸­à¸‡à¸­à¸µà¸à¸„รั้ง";Strings.OfficeOM.L_FormattingReminder="ตัวเตือนà¸à¸²à¸£à¸ˆà¸±à¸”รูปà¹à¸šà¸š";Strings.OfficeOM.L_UserAbortedMessage="ผู้ใช้ไม่ยินยอมในสิทธิ์ Add-in";Strings.OfficeOM.L_InvalidCellsValue="พารามิเตอร์ของเซลล์อย่างน้อยหนึ่งรายà¸à¸²à¸£à¸¡à¸µà¸„่าที่ไม่ได้รับอนุà¸à¸²à¸• ตรวจสอบค่าใหม่à¹à¸¥à¹‰à¸§à¸¥à¸­à¸‡à¸­à¸µà¸à¸„รั้ง";Strings.OfficeOM.L_MissingParameter="พารามิเตอร์สูà¸à¸«à¸²à¸¢";Strings.OfficeOM.L_InValidOptionalArgument="อาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¸—างเลือà¸à¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_GetDataParametersConflict="พารามิเตอร์ที่ระบุขัดà¹à¸¢à¹‰à¸‡à¸à¸±à¸™";Strings.OfficeOM.L_CustomXmlNodeNotFound="ไม่พบโหนดที่ระบุ";Strings.OfficeOM.L_FunctionCallFailed="à¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸à¸Ÿà¸±à¸‡à¸à¹Œà¸Šà¸±à¸™ {0} ล้มเหลว รหัสข้อผิดพลาด: {1}";Strings.OfficeOM.L_RunMustReturnPromise='ฟังà¸à¹Œà¸Šà¸±à¸™à¸Šà¸¸à¸”คำสั่งที่ส่งไปที่เมธอด ".run" ไม่ได้ส่ง Promise à¸à¸¥à¸±à¸šà¸¡à¸² ฟังà¸à¹Œà¸Šà¸±à¸™à¸•à¹‰à¸­à¸‡à¸ªà¹ˆà¸‡ Promise à¸à¸¥à¸±à¸šà¸¡à¸²à¹€à¸žà¸·à¹ˆà¸­à¹ƒà¸«à¹‰à¸ªà¸²à¸¡à¸²à¸£à¸–ปล่อยวัตถุใดๆ ที่มีà¸à¸²à¸£à¸•à¸´à¸”ตามอัตโนมัติได้เมื่อดำเนินà¸à¸²à¸£à¸Šà¸¸à¸”คำสั่งสำเร็จ โดยปà¸à¸•à¸´à¹à¸¥à¹‰à¸§ คุณจะส่งคืน Promise ด้วยà¸à¸²à¸£à¸ªà¹ˆà¸‡à¸à¸²à¸£à¸•à¸­à¸šà¸à¸¥à¸±à¸šà¸ˆà¸²à¸ "context.sync()"';Strings.OfficeOM.L_InvalidSetStartRowColumn="ค่าของ startRow หรือ startColumn ที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_InvalidBindingOperation="à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸œà¸¹à¸à¸—ี่ไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_Timeout="à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸«à¸¡à¸”เวลา ";Strings.OfficeOM.L_NotSupported="ไม่สนับสนุนฟังà¸à¹Œà¸Šà¸±à¸™ {0}";Strings.OfficeOM.L_SettingNameNotExist="ไม่มีชื่อà¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าที่ระบุ";Strings.OfficeOM.L_InvalidOrTimedOutSession="เซสชันไม่ถูà¸à¸•à¹‰à¸­à¸‡à¸«à¸£à¸·à¸­à¸«à¸¡à¸”เวลา";Strings.OfficeOM.L_TooManyArguments="มีอาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¸¡à¸²à¸à¹€à¸à¸´à¸™à¹„ป";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸¥à¹‰à¸¡à¹€à¸«à¸¥à¸§à¹€à¸™à¸·à¹ˆà¸­à¸‡à¸ˆà¸²à¸ Add-in นี้ร้องขอโทเค็นà¸à¸²à¸£à¹€à¸‚้าถึงอยู่à¸à¹ˆà¸­à¸™à¹à¸¥à¹‰à¸§";Strings.OfficeOM.L_BindingCreationError="à¸à¸²à¸£à¸ªà¸£à¹‰à¸²à¸‡à¸à¸²à¸£à¸œà¸¹à¸à¸œà¸´à¸”พลาด";Strings.OfficeOM.L_TooManyOptionalFunction="ฟังà¸à¹Œà¸Šà¸±à¸™à¸—างเลือà¸à¸«à¸¥à¸²à¸¢à¸Ÿà¸±à¸‡à¸à¹Œà¸Šà¸±à¸™à¹ƒà¸™à¸£à¸²à¸¢à¸à¸²à¸£à¸žà¸²à¸£à¸²à¸¡à¸´à¹€à¸•à¸­à¸£à¹Œ";Strings.OfficeOM.L_SSOClientErrorMessage="มีข้อผิดพลาดที่ไม่คาดคิดเà¸à¸´à¸”ขึ้นในไคลเอ็นต์";Strings.OfficeOM.L_InvalidAPICall="à¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸ API ไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_ValueNotLoaded='ยังไม่ได้โหลดค่าของออบเจ็à¸à¸•à¹Œà¸œà¸¥à¸¥à¸±à¸žà¸˜à¹Œ à¸à¹ˆà¸­à¸™à¸—ี่จะอ่านค่าคุณสมบัติ ให้เรียภ"context.sync()" ในบริบทคำขอที่เà¸à¸µà¹ˆà¸¢à¸§à¸‚้อง';Strings.OfficeOM.L_PermissionDenied="สิทธิ์ถูà¸à¸›à¸à¸´à¹€à¸ªà¸˜";Strings.OfficeOM.L_InvalidSSOAddinMessage="ไม่มีสนับสนุน API ของข้อมูลเฉพาะตัวสำหรับ Add-in นี้";Strings.OfficeOM.L_SSOServerError="มีข้อผิดพลาดเà¸à¸´à¸”ขึ้นในผู้ให้บริà¸à¸²à¸£à¸à¸²à¸£à¸£à¸±à¸šà¸£à¸­à¸‡à¸„วามถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_SettingsStaleError="à¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าเดิมผิดพลาด";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="ชนิดข้อมูลประจำตัวของผู้ใช้ไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™";Strings.OfficeOM.L_CustomXmlOutOfDateName="ข้อมูลไม่เป็นปัจจุบัน";Strings.OfficeOM.L_AppNameNotExist="ชื่อ Add-in สำหรับ {0} ไม่มีอยู่";Strings.OfficeOM.L_BadSelectorString="สตริงที่ส่งผ่านไปยังตัวเลือà¸à¹„ด้รับà¸à¸²à¸£à¸ˆà¸±à¸”รูปà¹à¸šà¸šà¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡ หรือไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™";Strings.OfficeOM.L_NoCapability="คุณไม่มีสิทธิ์เพียงพอสำหรับà¸à¸²à¸£à¸à¸£à¸°à¸—ำนี้";Strings.OfficeOM.L_InvalidApiArgumentsMessage="อาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¸›à¹‰à¸­à¸™à¹€à¸‚้าไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_SelectionCannotBound="ไม่สามารถผูà¸à¸à¸±à¸šà¸ªà¹ˆà¸§à¸™à¸—ี่เลือà¸à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™";Strings.OfficeOM.L_SetDataParametersConflict="พารามิเตอร์ที่ระบุขัดà¹à¸¢à¹‰à¸‡à¸à¸±à¸™";Strings.OfficeOM.L_InvalidGetStartRowColumn="ค่าของ startRow หรือ startColumn ที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_CannotWriteToSelection="ไม่สามารถเขียนไปยังส่วนที่เลือà¸à¹ƒà¸™à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™à¹„ด้";Strings.OfficeOM.L_InvalidCoercion="ชนิดของà¸à¸²à¸£à¸šà¸±à¸‡à¸„ับใช้ไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="เนื้อหาที่เลือà¸à¸•à¹‰à¸­à¸‡à¸­à¸¢à¸¹à¹ˆà¹ƒà¸™à¸£à¸¹à¸›à¹à¸šà¸šà¸•à¸²à¸£à¸²à¸‡ จัดรูปà¹à¸šà¸šà¸‚้อมูลเป็นตารางà¹à¸¥à¹‰à¸§à¸¥à¸­à¸‡à¸­à¸µà¸à¸„รั้ง";Strings.OfficeOM.L_InvalidReadForBlankRow="à¹à¸–วที่ระบุว่างเปล่า";Strings.OfficeOM.L_DataNotMatchBindingType="วัตถุข้อมูลที่ระบุไม่เข้าà¸à¸±à¸™à¸à¸±à¸šà¸Šà¸™à¸´à¸”à¸à¸²à¸£à¸œà¸¹à¸";Strings.OfficeOM.L_EventHandlerNotExist="ไม่พบตัวจัดà¸à¸²à¸£à¹€à¸«à¸•à¸¸à¸à¸²à¸£à¸“์ที่ระบุสำหรับà¸à¸²à¸£à¸œà¸¹à¸à¸™à¸µà¹‰";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} ต้องà¸à¸²à¸£à¹à¸ªà¸”งหน้าต่างใหม่";Strings.OfficeOM.L_ConnectionFailureWithStatus="คำขอล้มเหลวโดยมีรหัสสถานะ {0}";Strings.OfficeOM.L_RowIndexOutOfRange="ค่าดัชนีà¹à¸–วอยู่นอà¸à¸Šà¹ˆà¸§à¸‡à¸—ี่อนุà¸à¸²à¸• ใช้ค่า (0 หรือมาà¸à¸à¸§à¹ˆà¸²) ที่มีค่าน้อยà¸à¸§à¹ˆà¸²à¸ˆà¸³à¸™à¸§à¸™à¹à¸–ว";Strings.OfficeOM.L_SSOConnectionLostErrorMessage="A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="ละเว้น";Strings.OfficeOM.L_DataReadError="à¸à¸²à¸£à¸­à¹ˆà¸²à¸™à¸‚้อมูลผิดพลาด";Strings.OfficeOM.L_TooManyOptionalObjects="วัตถุทางเลือà¸à¸«à¸¥à¸²à¸¢à¸§à¸±à¸•à¸–ุในรายà¸à¸²à¸£à¸žà¸²à¸£à¸²à¸¡à¸´à¹€à¸•à¸­à¸£à¹Œ";Strings.OfficeOM.L_InvalidResourceUrl="มี Url ของทรัพยาà¸à¸£à¹à¸­à¸›à¸žà¸¥à¸´à¹€à¸„ชันไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_InvalidApiCallInContext="à¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸ API ในบริบทปัจจุบันไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_APINotSupported="API ไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory="Add-in นี้ไม่สนับสนุนความยินยอมของผู้ใช้";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="à¸à¸³à¸¥à¸±à¸‡à¸žà¸¢à¸²à¸¢à¸²à¸¡à¸•à¸±à¹‰à¸‡à¸„่าคุณสมบัติà¹à¸šà¸šà¸­à¹ˆà¸²à¸™à¸­à¸¢à¹ˆà¸²à¸‡à¹€à¸”ียว '{0}'";Strings.OfficeOM.L_InvalidArgumentGeneric="อาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¸ªà¹ˆà¸‡à¸œà¹ˆà¸²à¸™à¹„ปยังฟังà¸à¹Œà¸Šà¸±à¸™à¹„ม่สามารถใช้à¸à¸±à¸šà¸ªà¸–านà¸à¸²à¸£à¸“์นี้ อาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¸«à¸²à¸¢à¹„ป หรืออาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¹„ม่ได้อยู่ในรูปà¹à¸šà¸šà¸—ี่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_ActivityLimitReached="ถึงขีดจำà¸à¸±à¸”ของà¸à¸´à¸ˆà¸à¸£à¸£à¸¡à¹à¸¥à¹‰à¸§";Strings.OfficeOM.L_DataNotMatchBindingSize="วัตถุข้อมูลที่ให้มามีขนาดไม่ตรงà¸à¸±à¸™à¸à¸±à¸šà¸ªà¹ˆà¸§à¸™à¸—ี่เลือà¸à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™";Strings.OfficeOM.L_UnknownBindingType="ไม่สนับสนุนชนิดà¸à¸²à¸£à¸œà¸¹à¸à¸™à¸µà¹‰";Strings.OfficeOM.L_InvalidGetRows="à¹à¸–วที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath จำà¸à¸±à¸”สิ่งที่เลือà¸à¹„ด้ไว้ที่ 1024 รายà¸à¸²à¸£";Strings.OfficeOM.L_InternalError="ข้อผิดพลาดภายใน";Strings.OfficeOM.L_InvalidObjectPath='เส้นทางวัตถุ \'{0}\' ใช้งานไม่ได้à¸à¸±à¸šà¸ªà¸´à¹ˆà¸‡à¸—ี่คุณพยายามดำเนินà¸à¸²à¸£ ถ้าคุณà¸à¸³à¸¥à¸±à¸‡à¹ƒà¸Šà¹‰à¸§à¸±à¸•à¸–ุà¸à¸±à¸šà¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸ "context.sync" หลายครั้งà¹à¸¥à¸°à¸ à¸²à¸¢à¸™à¸­à¸à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸Šà¸¸à¸”คำสั่ง ".run" à¹à¸šà¸šà¸•à¹ˆà¸­à¹€à¸™à¸·à¹ˆà¸­à¸‡ โปรดใช้เมธอด "context.trackedObjects.add()" à¹à¸¥à¸° "context.trackedObjects.remove()" เพื่อจัดà¸à¸²à¸£à¸§à¸‡à¸ˆà¸£à¸à¸²à¸£à¸—ำงานของวัตถุ';Strings.OfficeOM.L_InvalidGetRowColumnCounts="ค่าของ rowCount หรือ columnCount ที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_InvalidParameters="ฟังà¸à¹Œà¸Šà¸±à¸™ {0} มีพารามิเตอร์ที่ไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_SSOServerErrorMessage="มีข้อผิดพลาดเà¸à¸´à¸”ขึ้นบนเซิร์ฟเวอร์";Strings.OfficeOM.L_InvalidDataFormat="รูปà¹à¸šà¸šà¸‚องวัตถุข้อมูลที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_SpecifiedIdNotExist="ไม่มี ID ที่ระบุ";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage="à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸¥à¹‰à¸¡à¹€à¸«à¸¥à¸§à¹€à¸™à¸·à¹ˆà¸­à¸‡à¸ˆà¸²à¸ Add-in นี้ไม่สนับสนุนความยินยอมจาà¸à¸œà¸¹à¹‰à¹ƒà¸Šà¹‰à¹ƒà¸™à¸›à¸£à¸°à¹€à¸ à¸—นี้";Strings.OfficeOM.L_MissingRequiredArguments="อาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¸—ี่จำเป็นบางอย่างหายไป";Strings.OfficeOM.L_InvalidGetColumns="คอลัมน์ที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_UnsupportedUserIdentity="ชนิดข้อมูลประจำตัวของผู้ใช้ไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™";Strings.OfficeOM.L_NavOutOfBound="à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸¥à¹‰à¸¡à¹€à¸«à¸¥à¸§à¹€à¸™à¸·à¹ˆà¸­à¸‡à¸ˆà¸²à¸à¸”ัชนีอยู่นอà¸à¸Šà¹ˆà¸§à¸‡";Strings.OfficeOM.L_RedundantCallbackSpecification="ไม่สามารถระบุà¸à¸²à¸£à¸•à¸´à¸”ต่อà¸à¸¥à¸±à¸šà¸—ั้งในรายà¸à¸²à¸£à¸­à¸²à¸£à¹Œà¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œà¹à¸¥à¸°à¹ƒà¸™à¸§à¸±à¸•à¸–ุทางเลือà¸";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Add-in ร้องขอโทเค็นà¸à¸²à¸£à¹€à¸‚้าถึงอยู่à¸à¹ˆà¸­à¸™à¹à¸¥à¹‰à¸§";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="ข้อจำà¸à¸±à¸”ของเบราว์เซอร์ไม่อนุà¸à¸²à¸•à¹ƒà¸«à¹‰à¸ªà¸£à¹‰à¸²à¸‡à¸à¸¥à¹ˆà¸­à¸‡à¹‚ต้ตอบ โดเมนของà¸à¸¥à¹ˆà¸­à¸‡à¹‚ต้ตอบà¹à¸¥à¸°à¹‚ดเมนของโฮสต์ Add-in ไม่ได้อยู่ในโซนความปลอดภัยเดียวà¸à¸±à¸™";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="ชนิดà¸à¸²à¸£à¸œà¸¹à¸à¸™à¸µà¹‰à¹„ม่สนับสนุนาà¸à¸£à¸”ำเนินà¸à¸²à¸£à¸™à¸µà¹‰";Strings.OfficeOM.L_EventHandlerAdditionFailed="ไม่สามารถเพิ่มตัวจัดà¸à¸²à¸£à¹€à¸«à¸•à¸¸à¸à¸²à¸£à¸“์ได้";Strings.OfficeOM.L_ElementMissing="เราไม่สามารถจัดรูปà¹à¸šà¸šà¹€à¸‹à¸¥à¸¥à¹Œà¸•à¸²à¸£à¸²à¸‡à¹„ด้ เนื่องจาà¸à¸„่าพารามิเตอร์บางค่าหายไป ตรวจสอบพารามิเตอร์ใหม่à¹à¸¥à¹‰à¸§à¸¥à¸­à¸‡à¸­à¸µà¸à¸„รั้ง";Strings.OfficeOM.L_CoercionTypeNotSupported="ชนิดà¸à¸²à¸£à¸šà¸±à¸‡à¸„ับใช้ที่ระบุไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™";Strings.OfficeOM.L_CustomXmlExceedQuotaName="ถึงขีดจำà¸à¸±à¸”ของสิ่งที่เลือà¸";Strings.OfficeOM.L_MemoryLimit="เà¸à¸´à¸™à¸‚ีดจำà¸à¸±à¸”ของหน่วยความจำ";Strings.OfficeOM.L_ReadSettingsError="à¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าà¸à¸²à¸£à¸­à¹ˆà¸²à¸™à¸œà¸´à¸”พลาด";Strings.OfficeOM.L_OutOfRange="ไม่อยู่ในช่วงที่à¸à¸³à¸«à¸™à¸”";Strings.OfficeOM.L_InvalidFormatValue="พารามิเตอร์ของรูปà¹à¸šà¸šà¸­à¸¢à¹ˆà¸²à¸‡à¸™à¹‰à¸­à¸¢à¸«à¸™à¸¶à¹ˆà¸‡à¸£à¸²à¸¢à¸à¸²à¸£à¸¡à¸µà¸„่าที่ไม่ได้รับอนุà¸à¸²à¸• ตรวจสอบค่าใหม่à¹à¸¥à¹‰à¸§à¸¥à¸­à¸‡à¸­à¸µà¸à¸„รั้ง";Strings.OfficeOM.L_BindingToMultipleSelection="ไม่สนับสนุนส่วนที่เลือà¸à¹à¸šà¸šà¹„ม่ติดà¸à¸±à¸™";Strings.OfficeOM.L_SSOClientError="มีข้อผิดพลาดเà¸à¸´à¸”ขึ้นในà¸à¸²à¸£à¸£à¹‰à¸­à¸‡à¸‚อà¸à¸²à¸£à¸£à¸±à¸šà¸£à¸­à¸‡à¸„วามถูà¸à¸•à¹‰à¸­à¸‡à¸ˆà¸²à¸ Office";Strings.OfficeOM.L_InvalidOperationInCellEditMode="Excel อยู่ในโหมดà¸à¸²à¸£à¹à¸à¹‰à¹„ขเซลล์ โปรดออà¸à¸ˆà¸²à¸à¹‚หมดà¹à¸à¹‰à¹„ข โดยà¸à¸” ENTER หรือ TAB หรือเลือà¸à¹€à¸‹à¸¥à¸¥à¹Œà¸­à¸·à¹ˆà¸™ à¹à¸¥à¹‰à¸§à¸¥à¸­à¸‡à¸­à¸µà¸à¸„รั้ง";Strings.OfficeOM.L_DialogOK="ตà¸à¸¥à¸‡";Strings.OfficeOM.L_DataStale="ข้อมูลไม่เป็นปัจจุบัน";Strings.OfficeOM.L_InvalidArgument="อาร์à¸à¸´à¸§à¹€à¸¡à¸™à¸•à¹Œ '{0}' ใช้งานไม่ได้ในสถานà¸à¸²à¸£à¸“์นี้ หายไป หรือไม่ใช่รูปà¹à¸šà¸šà¸—ี่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_NotSupportedBindingType="ไม่สนับสนุนชนิดà¸à¸²à¸£à¸œà¸¹à¸à¸—ี่ระบุ {0}";Strings.OfficeOM.L_InvalidFormat="ข้อผิดพลาดรูปà¹à¸šà¸šà¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_PropertyNotLoaded="คุณสมบัติ '{0}' ไม่พร้อมใช้งาน à¸à¹ˆà¸­à¸™à¸­à¹ˆà¸²à¸™à¸„่าคุณสมบัติ เรียà¸à¹€à¸¡à¸˜à¸­à¸”โหลดจาà¸à¸§à¸±à¸•à¸–ุที่มีà¹à¸¥à¸°à¹€à¸£à¸µà¸¢à¸ \"context.sync()\" ในบริบทà¸à¸²à¸£à¸£à¹‰à¸­à¸‡à¸‚อที่เà¸à¸µà¹ˆà¸¢à¸§à¸‚้อง";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="ไม่สามารถใช้พารามิเตอร์พิà¸à¸±à¸”à¸à¸±à¸šà¸Šà¸™à¸´à¸”à¸à¸²à¸£à¸šà¸±à¸‡à¸„ับใช้ตารางได้ เมื่อตารางนั้นมีเซลล์ที่ถูà¸à¸œà¸ªà¸²à¸™";Strings.OfficeOM.L_NotImplemented="ฟังà¸à¹Œà¸Šà¸±à¸™ {0} ยังไม่ถูà¸à¸™à¸³à¸¡à¸²à¹ƒà¸Šà¹‰à¸‡à¸²à¸™";Strings.OfficeOM.L_CellDataAmountBeyondLimits="หมายเหตุ: จำนวนของเซลล์ในตารางควรจะต่ำà¸à¸§à¹ˆà¸² 20,000 เซลล์";Strings.OfficeOM.L_EventHandlerRemovalFailed="ไม่สามารถเอาตัวจัดà¸à¸²à¸£à¹€à¸«à¸•à¸¸à¸à¸²à¸£à¸“์ออà¸à¹„ด้";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="ไม่สามารถเปลี่ยนคุณสมบัติเป็น '{0}' โดยใช้วิธีà¸à¸²à¸£ \"object.set\" ได้";Strings.OfficeOM.L_InvalidGrantMessage="à¸à¸²à¸£à¹ƒà¸«à¹‰à¸ªà¸´à¸—ธิ์ขาดหายไปสำหรับ Add-in นี้";Strings.OfficeOM.L_CloseFileBeforeRetrieve="เรียภcloseAsync บนไฟล์ปัจจุบันà¸à¹ˆà¸­à¸™à¸—ี่จะเรียà¸à¹ƒà¸Šà¹‰à¹„ฟล์อื่น";Strings.OfficeOM.L_InvalidNamedItemForBindingType="ชนิดà¸à¸²à¸£à¸œà¸¹à¸à¸—ี่ระบุเข้าà¸à¸±à¸™à¹„ม่ได้à¸à¸±à¸šà¸£à¸²à¸¢à¸à¸²à¸£à¸—ี่มีชื่อที่ให้มา";Strings.OfficeOM.L_InvalidSelectionForBindingType="ไม่สามารถสร้างà¸à¸²à¸£à¸œà¸¹à¸à¸à¸±à¸šà¸à¸²à¸£à¹€à¸¥à¸·à¸­à¸à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™à¹à¸¥à¸°à¸Šà¸™à¸´à¸”à¸à¸²à¸£à¸œà¸¹à¸à¸—ี่ระบุได้";Strings.OfficeOM.L_CustomXmlError="ข้อผิดพลาด XML à¹à¸šà¸šà¸à¸³à¸«à¸™à¸”เอง";Strings.OfficeOM.L_CannotRegisterEvent="ไม่สามารถลงทะเบียนตัวจัดà¸à¸²à¸£à¹€à¸«à¸•à¸¸à¸à¸²à¸£à¸“์ได้";Strings.OfficeOM.L_DocumentReadOnly="ไม่อนุà¸à¸²à¸•à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸—ี่ร้องขอในโหมดเอà¸à¸ªà¸²à¸£à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™";Strings.OfficeOM.L_FileTypeNotSupported="ชนิดของไฟล์ที่ระบุไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™";Strings.OfficeOM.L_InvalidNode="โหนดไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_HostError="โฮสต์ผิดพลาด";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="ไม่มีà¹à¸­à¸›à¸žà¸¥à¸´à¹€à¸„ชัน {0} Microsoft.Office.WebExtension.initialize(reason) ไม่ถูà¸à¹€à¸£à¸µà¸¢à¸";Strings.OfficeOM.L_EventRegistrationError="à¸à¸²à¸£à¸¥à¸‡à¸—ะเบียนเหตุà¸à¸²à¸£à¸“์ผิดพลาด";Strings.OfficeOM.L_InvalidGrant="à¸à¸²à¸£à¸­à¸™à¸¸à¸¡à¸±à¸•à¸´à¸¥à¹ˆà¸§à¸‡à¸«à¸™à¹‰à¸²à¸‚าดไป";Strings.OfficeOM.L_UserClickIgnore="ผู้ใช้เลือà¸à¸—ี่จะละเว้นà¸à¸²à¸£à¸à¸¥à¹ˆà¸­à¸‡à¹‚ต้ตอบ";Strings.OfficeOM.L_OverwriteWorksheetData="à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸‚องชุดล้มเหลว เนื่องจาà¸à¸§à¸±à¸•à¸–ุข้อมูลที่ให้มาจะเขียนทับหรือเลื่อนข้อมูล";Strings.OfficeOM.L_SaveSettingsError="à¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าà¸à¸²à¸£à¸šà¸±à¸™à¸—ึà¸à¸œà¸´à¸”พลาด";Strings.OfficeOM.L_SettingsAreStale="ไม่สามารถบันทึà¸à¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าได้เพราะไม่เป็นข้อมูลปัจจุบัน";Strings.OfficeOM.L_InvalidDataObject="วัตถุข้อมูลไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_SSOConnectionLostError="A connection was lost during the sign in process.";Strings.OfficeOM.L_DialogNavigateError="ข้อผิดพลาดà¸à¸²à¸£à¸™à¸³à¸—างà¸à¸¥à¹ˆà¸­à¸‡à¹‚ต้ตอบ";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="อนุà¸à¸²à¸•";Strings.OfficeOM.L_SliceSizeNotSupported="ขนาดของชิ้นที่ระบุไม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="หมายเหตุ: ชุดà¸à¸²à¸£à¸ˆà¸±à¸”รูปà¹à¸šà¸šà¸—ี่ถูà¸à¸•à¸±à¹‰à¸‡à¸„่าโดยà¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸ API à¸à¸²à¸£à¸ˆà¸±à¸”รูปà¹à¸šà¸šà¸„วรจะต่ำà¸à¸§à¹ˆà¸² 100";Strings.OfficeOM.L_NetworkProblemRetrieveFile="ปัà¸à¸«à¸²à¹€à¸„รือข่ายป้องà¸à¸±à¸™à¹„ม่ให้เรียà¸à¹ƒà¸Šà¹‰à¹„ฟล์";Strings.OfficeOM.L_InvalidColumnsForBinding="คอลัมน์ที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_DialogAlreadyOpened="à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸¥à¹‰à¸¡à¹€à¸«à¸¥à¸§à¹€à¸™à¸·à¹ˆà¸­à¸‡à¸ˆà¸²à¸ Add-in นี้มีà¸à¸¥à¹ˆà¸­à¸‡à¹‚ต้ตอบที่ใช้งานอยู่เรียบร้อยà¹à¸¥à¹‰à¸§";Strings.OfficeOM.L_SelectionNotSupportCoercionType="ส่วนที่เลือà¸à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™à¸™à¸µà¹‰à¹€à¸‚้าà¸à¸±à¸™à¹„ม่ได้à¸à¸±à¸šà¸Šà¸™à¸´à¸”à¸à¸²à¸£à¸šà¸±à¸‡à¸„ับใช้ที่ระบุ";Strings.OfficeOM.L_CustomFunctionNameContainsBadChars="ชื่อฟังà¸à¹Œà¸Šà¸±à¸™à¸­à¸²à¸ˆà¸›à¸£à¸°à¸à¸­à¸šà¸”้วยตัวอัà¸à¸©à¸£ ตัวเลข ขีดล่าง à¹à¸¥à¸°à¸¡à¸«à¸±à¸žà¸ à¸²à¸„เท่านั้น";Strings.OfficeOM.L_OsfControlTypeNotSupported="ไม่สนับสนุนชนิดของ OsfControl";Strings.OfficeOM.L_UserAborted="ผู้ใช้ยà¸à¹€à¸¥à¸´à¸à¸à¸²à¸£à¸£à¹‰à¸­à¸‡à¸‚อความยินยอม";Strings.OfficeOM.L_ShuttingDown="à¸à¸²à¸£à¸”ำเนินà¸à¸²à¸£à¸¥à¹‰à¸¡à¹€à¸«à¸¥à¸§à¹€à¸žà¸£à¸²à¸°à¸‚้อมูลไม่เป็นข้อมูลปัจจุบันบนเซิร์ฟเวอร์";Strings.OfficeOM.L_CallbackNotAFunction="à¸à¸²à¸£à¸•à¸´à¸”ต่อà¸à¸¥à¸±à¸šà¸—ี่ต้องเป็นของฟังà¸à¹Œà¸Šà¸±à¸™à¸Šà¸™à¸´à¸” à¸à¸¥à¸±à¸šà¹€à¸›à¹‡à¸™à¸‚อง {0} ของชนิด";Strings.OfficeOM.L_TooManyIncompleteRequests="รอจนà¸à¸§à¹ˆà¸²à¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸à¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸²à¸ˆà¸°à¹€à¸ªà¸£à¹‡à¸ˆà¸ªà¸¡à¸šà¸¹à¸£à¸“์";Strings.OfficeOM.L_InvalidResourceUrlMessage="Url ของทรัพยาà¸à¸£à¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡à¸—ี่ระบุไว้ในรายà¸à¸²à¸£";Strings.OfficeOM.L_InvalidValue="ค่าไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_SetDataIsTooLarge="วัตถุข้อมูลที่ระบุมีขนาดใหà¸à¹ˆà¹€à¸à¸´à¸™à¹„ป";Strings.OfficeOM.L_ApiNotFoundDetails="เมธอดหรือคุณสมบัติ {0} เป็นส่วนหนึ่งของชุดความต้องà¸à¸²à¸£ {1} ซึ่งไม่มีอยู่ใน {2} เวอร์ชันที่คุณใช้";Strings.OfficeOM.L_InvalidSetRows="à¹à¸–วที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_UnsupportedEnumerationMessage="à¸à¸²à¸£à¹à¸ˆà¸‡à¸™à¸±à¸šà¹„ม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™à¹ƒà¸™à¹à¸­à¸›à¸žà¸¥à¸´à¹€à¸„ชันที่เป็นโฮสต์ในปัจจุบัน";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="ข้อมูลล้าสมัยà¹à¸¥à¹‰à¸§ โปรดดึงวัตถุอีà¸à¸„รั้ง";Strings.OfficeOM.L_DataNotMatchCoercionType="ชนิดวัตถุข้อมูลที่ระบุเข้าà¸à¸±à¸™à¹„ม่ได้à¸à¸±à¸šà¸ªà¹ˆà¸§à¸™à¸—ี่เลือà¸à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™";Strings.OfficeOM.L_GetSelectionNotSupported="ส่วนที่เลือà¸à¹ƒà¸™à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™à¹„ม่ได้รับà¸à¸²à¸£à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™";Strings.OfficeOM.L_RequestTokenUnavailable="API นี้ถูà¸à¸„วบคุมให้ใช้ปริมาณความถี่ในà¸à¸²à¸£à¹€à¸£à¸µà¸¢à¸à¸Šà¹‰à¸²à¸¥à¸‡";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="ไม่สามารถใช้พารามิเตอร์พิà¸à¸±à¸”à¸à¸±à¸šà¸Šà¸™à¸´à¸”à¸à¸²à¸£à¸šà¸±à¸‡à¸„ับใช้ตารางได้ เมื่อตารางนั้นมีเซลล์ที่ถูà¸à¸œà¸ªà¸²à¸™";Strings.OfficeOM.L_DataNotMatchSelection="วัตถุข้อมูลที่ให้มาเข้าà¸à¸±à¸™à¹„ม่ได้à¸à¸±à¸šà¸£à¸¹à¸›à¸£à¹ˆà¸²à¸‡à¸«à¸£à¸·à¸­à¸¡à¸´à¸•à¸´à¸‚องà¸à¸²à¸£à¹€à¸¥à¸·à¸­à¸à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™";Strings.OfficeOM.L_DataWriteError="à¸à¸²à¸£à¹€à¸‚ียนข้อมูลผิดพลาด";Strings.OfficeOM.L_DialogAddressNotTrusted="โดเมนของ URL ไม่ได้รวมอยู่ในองค์ประà¸à¸­à¸š AppDomains ในไฟล์à¸à¸³à¸à¸±à¸š";Strings.OfficeOM.L_GetDataIsTooLarge="ชุดข้อมูลที่ร้องขอมีขนาดใหà¸à¹ˆà¹€à¸à¸´à¸™à¹„ป";Strings.OfficeOM.L_InitializeNotReady="ยังไม่ได้โหลด Office.js à¹à¸šà¸šà¹€à¸•à¹‡à¸¡ โปรดลองอีà¸à¸„รั้งในภายหลัง หรือตรวจสอบให้à¹à¸™à¹ˆà¹ƒà¸ˆà¸§à¹ˆà¸²à¹„ด้เพิ่มโค้ดà¸à¸²à¸£à¹€à¸•à¸£à¸µà¸¢à¸¡à¹ƒà¸Šà¹‰à¸‡à¸²à¸™à¸‚องคุณบนฟังà¸à¹Œà¸Šà¸±à¸™ Office.initialize ";Strings.OfficeOM.L_DialogInvalidScheme="ไม่สนับสนุนà¹à¸šà¸šà¹à¸œà¸™ URL โปรดใช้ HTTPS à¹à¸—น";Strings.OfficeOM.L_DialogRequireHTTPS="ไม่สนับสนุนโพรโทคอล HTTP โปรดใช้ HTTPS à¹à¸—น";Strings.OfficeOM.L_DisplayDialogError="à¹à¸ªà¸”งข้อผิดพลาดà¸à¸¥à¹ˆà¸­à¸‡à¹‚ต้ตอบ";Strings.OfficeOM.L_InternalErrorDescription="มีข้อผิดพลาดภายในเà¸à¸´à¸”ขึ้น";Strings.OfficeOM.L_CannotNavigateTo="วัตถุอยู่ในตำà¹à¸«à¸™à¹ˆà¸‡à¸—ี่ไม่สนับสนุนà¸à¸²à¸£à¸™à¸³à¸—าง";Strings.OfficeOM.L_InvalidRequestContext="ไม่สามารถใช้วัตถุà¸à¸±à¸šà¸šà¸£à¸´à¸šà¸—à¸à¸²à¸£à¸£à¹‰à¸­à¸‡à¸‚ออื่นๆ";Strings.OfficeOM.L_CustomFunctionImplementationMissing="คุณสมบัติที่มีชื่อนี้ใน Excel.CustomFunctions ที่à¹à¸ªà¸”งคำนิยามของฟังà¸à¹Œà¸Šà¸±à¸™à¸•à¹‰à¸­à¸‡à¸›à¸£à¸°à¸à¸­à¸šà¸”้วยคุณสมบัติ 'เรียà¸à¹ƒà¸Šà¹‰' ที่ประมวลผลฟังà¸à¹Œà¸Šà¸±à¸™";Strings.OfficeOM.L_UserNotSignedIn="ไม่มีผู้ใช้ลงชื่อเข้าใช้ Office";Strings.OfficeOM.L_InvalidSetColumns="คอลัมน์ที่ระบุไม่ถูà¸à¸•à¹‰à¸­à¸‡";Strings.OfficeOM.L_NewWindowCrossZone='à¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าความปลอดภัยในเบราว์เซอร์ของคุณป้องà¸à¸±à¸™à¹„ม่ให้เราสร้างà¸à¸¥à¹ˆà¸­à¸‡à¹‚ต้ตอบ ลองเบราว์เซอร์อื่น หรือ {0} เพื่อให้ "{1}" à¹à¸¥à¸°à¹‚ดเมนที่à¹à¸ªà¸”งในà¹à¸–บที่อยู่ของคุณอยู่ในโซนความปลอดภัยเดียวà¸à¸±à¸™';Strings.OfficeOM.L_BindingNotExist="à¸à¸²à¸£à¸£à¸§à¸¡à¸—ี่ระบุไม่มีอยู่";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="à¸à¸³à¸«à¸™à¸”ค่าเบราว์เซอร์ของคุณ";Strings.OfficeOM.L_BrowserAPINotSupported="เบราว์เซอร์นี้ไม่สนับสนุน API ที่ร้องขอ";Strings.OfficeOM.L_MultipleNamedItemFound="พบหลายวัตถุที่มีชื่อเดียวà¸à¸±à¸™" \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/th-th/outlook_strings.debug.js b/node_modules/@microsoft/office-js/dist/th-th/outlook_strings.debug.js index 4dc7753..acedd42 100644 --- a/node_modules/@microsoft/office-js/dist/th-th/outlook_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/th-th/outlook_strings.debug.js @@ -1,34 +1,35 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("_u"); _u.ExtensibilityStrings = function() { }; _u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings"); -_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "ผู้ใช้ลบสิ่งที่à¹à¸™à¸šà¸¡à¸²à¸à¹ˆà¸­à¸™à¸à¸²à¸£à¸­à¸±à¸›à¹‚หลดจะเสร็จสมบูรณ์"; -_u.ExtensibilityStrings.l_InternalProtocolError_Text = "ข้อผิดพลาดของโพรโทคอลภายใน: '{0}'"; -_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "ไม่สามารถเพิ่มสิ่งที่à¹à¸™à¸šà¸¡à¸²à¹„ด้ เนื่องจาà¸à¸‚้อความมีจำนวนสิ่งที่à¹à¸™à¸šà¸¡à¸²à¸–ึงขีดจำà¸à¸±à¸”สูงสุดà¹à¸¥à¹‰à¸§"; _u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "จำเป็นต้องมีสิทธิ์ที่ปรับให้สูงขึ้นเพื่อเรียà¸à¹ƒà¸Šà¹‰à¹€à¸¡à¸˜à¸­à¸”: '{0}'"; -_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "ชื่อที่ใช้à¹à¸ªà¸”งที่ให้มาอย่างน้อยหนึ่งรายà¸à¸²à¸£à¸¢à¸²à¸§à¸¡à¸²à¸à¹€à¸à¸´à¸™à¹„ป"; -_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "ไม่สามารถเพิ่มสิ่งที่à¹à¸™à¸šà¸¡à¸²à¹„ด้ขณะà¸à¸³à¸¥à¸±à¸‡à¹€à¸£à¸µà¸¢à¸à¹ƒà¸Šà¹‰à¸à¸²à¸£à¸•à¸­à¸šà¸à¸¥à¸±à¸šà¸«à¸£à¸·à¸­à¸à¸²à¸£à¸ªà¹ˆà¸‡à¸•à¹ˆà¸­à¹€à¸•à¹‡à¸¡à¸£à¸¹à¸›à¹à¸šà¸šà¸ˆà¸²à¸à¹€à¸‹à¸´à¸£à¹Œà¸Ÿà¹€à¸§à¸­à¸£à¹Œ"; +_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "ID สิ่งที่à¹à¸™à¸šà¸¡à¸²à¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡"; _u.ExtensibilityStrings.l_InvalidEndTime_Text = "เวลาสิ้นสุดไม่สามารถเà¸à¸´à¸”ขึ้นà¸à¹ˆà¸­à¸™à¹€à¸§à¸¥à¸²à¹€à¸£à¸´à¹ˆà¸¡à¸•à¹‰à¸™à¹„ด้"; -_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "ขนาดà¸à¸²à¸£à¸£à¹‰à¸­à¸‡à¸‚อเà¸à¸´à¸™à¸‚ีดจำà¸à¸±à¸”ที่ 1 เมà¸à¸°à¹„บต์ โปรดปรับเปลี่ยนà¸à¸²à¸£à¸£à¹‰à¸­à¸‡à¸‚อ EWS ของคุณ"; -_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "à¸à¸²à¸£à¹€à¸‚ียนข้อมูลผิดพลาด"; _u.ExtensibilityStrings.l_AttachmentErrorName_Text = "ข้อผิดพลาดสิ่งที่à¹à¸™à¸šà¸¡à¸²"; -_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "à¸à¸²à¸£à¸£à¸±à¸à¸©à¸²à¹ƒà¸«à¹‰ HTML ปลอดภัยล้มเหลว"; -_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "จำเป็นต้องมีสิทธิ์ที่ปรับให้สูงขึ้นเพื่อเข้าถึงสมาชิà¸à¸‚อง JavaScript API ที่ได้รับà¸à¸²à¸£à¸›à¹‰à¸­à¸‡à¸à¸±à¸™à¸ªà¸³à¸«à¸£à¸±à¸š Office"; -_u.ExtensibilityStrings.l_InvalidEventDates_Text = "วันที่สิ้นสุดเà¸à¸´à¸”ขึ้นà¸à¹ˆà¸­à¸™à¸§à¸±à¸™à¸—ี่เริ่มต้น"; -_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "พารามิเตอร์ที่à¸à¸³à¸«à¸™à¸”ไม่ตรงà¸à¸±à¸šà¸£à¸¹à¸›à¹à¸šà¸šà¸—ี่ต้องà¸à¸²à¸£"; -_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "ID สิ่งที่à¹à¸™à¸šà¸¡à¸²à¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡"; _u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "ไม่สามารถลบสิ่งที่à¹à¸™à¸šà¸¡à¸²à¸­à¸­à¸à¸ˆà¸²à¸à¸£à¸²à¸¢à¸à¸²à¸£à¹„ด้"; -_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "ไม่สามารถเพิ่มสิ่งที่à¹à¸™à¸šà¸¡à¸²à¹„ด้เนื่องจาà¸à¸¡à¸µà¸‚นาดใหà¸à¹ˆà¹€à¸à¸´à¸™à¹„ป"; -_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "จำนวนผู้รับทั้งหมดในเขตข้อมูลต้องไม่เà¸à¸´à¸™ {0} รายà¸à¸²à¸£"; +_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "à¸à¸²à¸£à¹€à¸‚ียนข้อมูลผิดพลาด"; +_u.ExtensibilityStrings.l_OffsetNotfound_Text = "ไม่พบออฟเซตสำหรับà¸à¸²à¸£à¸›à¸£à¸°à¸—ับเวลานี้"; +_u.ExtensibilityStrings.l_InternalFormatError_Text = "มีข้อผิดพลาดรูปà¹à¸šà¸šà¸ à¸²à¸¢à¹ƒà¸™"; +_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "ชื่อที่ใช้à¹à¸ªà¸”งที่ให้มาอย่างน้อยหนึ่งรายà¸à¸²à¸£à¸¢à¸²à¸§à¸¡à¸²à¸à¹€à¸à¸´à¸™à¹„ป"; +_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "ไม่สามารถเพิ่มสิ่งที่à¹à¸™à¸šà¸¡à¸²à¹„ด้ เนื่องจาà¸à¸‚้อความมีจำนวนสิ่งที่à¹à¸™à¸šà¸¡à¸²à¸–ึงขีดจำà¸à¸±à¸”สูงสุดà¹à¸¥à¹‰à¸§"; _u.ExtensibilityStrings.l_InvalidDate_Text = "ค่าป้อนเข้าไม่ได้à¹à¸à¹‰à¹„ขเป็นวันที่ถูà¸à¸•à¹‰à¸­à¸‡"; _u.ExtensibilityStrings.l_CursorPositionChanged_Text = "ผู้ใช้เปลี่ยนตำà¹à¸«à¸™à¹ˆà¸‡à¸‚องเคอร์เซอร์ขณะที่à¸à¸³à¸¥à¸±à¸‡à¹à¸—รà¸à¸‚้อมูล"; -_u.ExtensibilityStrings.l_InternalFormatError_Text = "มีข้อผิดพลาดรูปà¹à¸šà¸šà¸ à¸²à¸¢à¹ƒà¸™"; -_u.ExtensibilityStrings.l_OffsetNotfound_Text = "ไม่พบออฟเซตสำหรับà¸à¸²à¸£à¸›à¸£à¸°à¸—ับเวลานี้"; -_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "รายà¸à¸²à¸£à¸—ี่เลือà¸à¸¡à¸µà¸à¸²à¸£à¹€à¸›à¸¥à¸µà¹ˆà¸¢à¸™à¹à¸›à¸¥à¸‡"; -_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "เส้นทางสิ่งที่à¹à¸™à¸šà¸¡à¸²à¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡"; +_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "จำเป็นต้องมีสิทธิ์ที่ปรับให้สูงขึ้นเพื่อเข้าถึงสมาชิà¸à¸‚อง JavaScript API ที่ได้รับà¸à¸²à¸£à¸›à¹‰à¸­à¸‡à¸à¸±à¸™à¸ªà¸³à¸«à¸£à¸±à¸š Office"; +_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "ที่อยู่อีเมลที่ให้มาอย่างน้อยหนึ่งรายà¸à¸²à¸£à¸¢à¸²à¸§à¸¡à¸²à¸à¹€à¸à¸´à¸™à¹„ป"; _u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "ไม่สามารถลบสิ่งที่à¹à¸™à¸šà¸¡à¸²à¹„ด้เนื่องจาà¸à¹„ม่พบสิ่งที่à¹à¸™à¸šà¸¡à¸²à¸—ี่มีดัชนีสิ่งที่à¹à¸™à¸šà¸¡à¸²à¸™à¸µà¹‰"; +_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "ขนาดà¸à¸²à¸£à¸£à¹‰à¸­à¸‡à¸‚อเà¸à¸´à¸™à¸‚ีดจำà¸à¸±à¸”ที่ 1 เมà¸à¸°à¹„บต์ โปรดปรับเปลี่ยนà¸à¸²à¸£à¸£à¹‰à¸­à¸‡à¸‚อ EWS ของคุณ"; +_u.ExtensibilityStrings.l_InvalidEventDates_Text = "วันที่สิ้นสุดเà¸à¸´à¸”ขึ้นà¸à¹ˆà¸­à¸™à¸§à¸±à¸™à¸—ี่เริ่มต้น"; _u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "ไม่ได้ให้ผู้รับที่ถูà¸à¸•à¹‰à¸­à¸‡"; -_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "ที่อยู่อีเมลที่ให้มาอย่างน้อยหนึ่งรายà¸à¸²à¸£à¸¢à¸²à¸§à¸¡à¸²à¸à¹€à¸à¸´à¸™à¹„ป"; -_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "ไม่สามารถเพิ่มสิ่งที่à¹à¸™à¸šà¸¡à¸²à¸¥à¸‡à¹ƒà¸™à¸£à¸²à¸¢à¸à¸²à¸£à¹„ด้" +_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "เส้นทางสิ่งที่à¹à¸™à¸šà¸¡à¸²à¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡"; +_u.ExtensibilityStrings.l_InternalProtocolError_Text = "ข้อผิดพลาดของโพรโทคอลภายใน: '{0}'"; +_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "ไม่สามารถเพิ่มสิ่งที่à¹à¸™à¸šà¸¡à¸²à¹„ด้ขณะà¸à¸³à¸¥à¸±à¸‡à¹€à¸£à¸µà¸¢à¸à¹ƒà¸Šà¹‰à¸à¸²à¸£à¸•à¸­à¸šà¸à¸¥à¸±à¸šà¸«à¸£à¸·à¸­à¸à¸²à¸£à¸ªà¹ˆà¸‡à¸•à¹ˆà¸­à¹€à¸•à¹‡à¸¡à¸£à¸¹à¸›à¹à¸šà¸šà¸ˆà¸²à¸à¹€à¸‹à¸´à¸£à¹Œà¸Ÿà¹€à¸§à¸­à¸£à¹Œ"; +_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "พารามิเตอร์ที่à¸à¸³à¸«à¸™à¸”ไม่ตรงà¸à¸±à¸šà¸£à¸¹à¸›à¹à¸šà¸šà¸—ี่ต้องà¸à¸²à¸£"; +_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "รายà¸à¸²à¸£à¸—ี่เลือà¸à¸¡à¸µà¸à¸²à¸£à¹€à¸›à¸¥à¸µà¹ˆà¸¢à¸™à¹à¸›à¸¥à¸‡"; +_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "ไม่สามารถเพิ่มสิ่งที่à¹à¸™à¸šà¸¡à¸²à¹„ด้เนื่องจาà¸à¸¡à¸µà¸‚นาดใหà¸à¹ˆà¹€à¸à¸´à¸™à¹„ป"; +_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "ผู้ใช้ลบสิ่งที่à¹à¸™à¸šà¸¡à¸²à¸à¹ˆà¸­à¸™à¸à¸²à¸£à¸­à¸±à¸›à¹‚หลดจะเสร็จสมบูรณ์"; +_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "ไม่สามารถเพิ่มสิ่งที่à¹à¸™à¸šà¸¡à¸²à¸¥à¸‡à¹ƒà¸™à¸£à¸²à¸¢à¸à¸²à¸£à¹„ด้"; +_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "จำนวนผู้รับทั้งหมดในเขตข้อมูลต้องไม่เà¸à¸´à¸™ {0} รายà¸à¸²à¸£"; +_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "à¸à¸²à¸£à¸£à¸±à¸à¸©à¸²à¹ƒà¸«à¹‰ HTML ปลอดภัยล้มเหลว" \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/th-th/outlook_strings.js b/node_modules/@microsoft/office-js/dist/th-th/outlook_strings.js index 2316431..3e0a693 100644 --- a/node_modules/@microsoft/office-js/dist/th-th/outlook_strings.js +++ b/node_modules/@microsoft/office-js/dist/th-th/outlook_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="ผู้ใช้ลบสิ่งที่à¹à¸™à¸šà¸¡à¸²à¸à¹ˆà¸­à¸™à¸à¸²à¸£à¸­à¸±à¸›à¹‚หลดจะเสร็จสมบูรณ์";_u.ExtensibilityStrings.l_InternalProtocolError_Text="ข้อผิดพลาดของโพรโทคอลภายใน: '{0}'";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="ไม่สามารถเพิ่มสิ่งที่à¹à¸™à¸šà¸¡à¸²à¹„ด้ เนื่องจาà¸à¸‚้อความมีจำนวนสิ่งที่à¹à¸™à¸šà¸¡à¸²à¸–ึงขีดจำà¸à¸±à¸”สูงสุดà¹à¸¥à¹‰à¸§";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="จำเป็นต้องมีสิทธิ์ที่ปรับให้สูงขึ้นเพื่อเรียà¸à¹ƒà¸Šà¹‰à¹€à¸¡à¸˜à¸­à¸”: '{0}'";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="ชื่อที่ใช้à¹à¸ªà¸”งที่ให้มาอย่างน้อยหนึ่งรายà¸à¸²à¸£à¸¢à¸²à¸§à¸¡à¸²à¸à¹€à¸à¸´à¸™à¹„ป";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="ไม่สามารถเพิ่มสิ่งที่à¹à¸™à¸šà¸¡à¸²à¹„ด้ขณะà¸à¸³à¸¥à¸±à¸‡à¹€à¸£à¸µà¸¢à¸à¹ƒà¸Šà¹‰à¸à¸²à¸£à¸•à¸­à¸šà¸à¸¥à¸±à¸šà¸«à¸£à¸·à¸­à¸à¸²à¸£à¸ªà¹ˆà¸‡à¸•à¹ˆà¸­à¹€à¸•à¹‡à¸¡à¸£à¸¹à¸›à¹à¸šà¸šà¸ˆà¸²à¸à¹€à¸‹à¸´à¸£à¹Œà¸Ÿà¹€à¸§à¸­à¸£à¹Œ";_u.ExtensibilityStrings.l_InvalidEndTime_Text="เวลาสิ้นสุดไม่สามารถเà¸à¸´à¸”ขึ้นà¸à¹ˆà¸­à¸™à¹€à¸§à¸¥à¸²à¹€à¸£à¸´à¹ˆà¸¡à¸•à¹‰à¸™à¹„ด้";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="ขนาดà¸à¸²à¸£à¸£à¹‰à¸­à¸‡à¸‚อเà¸à¸´à¸™à¸‚ีดจำà¸à¸±à¸”ที่ 1 เมà¸à¸°à¹„บต์ โปรดปรับเปลี่ยนà¸à¸²à¸£à¸£à¹‰à¸­à¸‡à¸‚อ EWS ของคุณ";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="à¸à¸²à¸£à¹€à¸‚ียนข้อมูลผิดพลาด";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="ข้อผิดพลาดสิ่งที่à¹à¸™à¸šà¸¡à¸²";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="à¸à¸²à¸£à¸£à¸±à¸à¸©à¸²à¹ƒà¸«à¹‰ HTML ปลอดภัยล้มเหลว";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="จำเป็นต้องมีสิทธิ์ที่ปรับให้สูงขึ้นเพื่อเข้าถึงสมาชิà¸à¸‚อง JavaScript API ที่ได้รับà¸à¸²à¸£à¸›à¹‰à¸­à¸‡à¸à¸±à¸™à¸ªà¸³à¸«à¸£à¸±à¸š Office";_u.ExtensibilityStrings.l_InvalidEventDates_Text="วันที่สิ้นสุดเà¸à¸´à¸”ขึ้นà¸à¹ˆà¸­à¸™à¸§à¸±à¸™à¸—ี่เริ่มต้น";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="พารามิเตอร์ที่à¸à¸³à¸«à¸™à¸”ไม่ตรงà¸à¸±à¸šà¸£à¸¹à¸›à¹à¸šà¸šà¸—ี่ต้องà¸à¸²à¸£";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="ID สิ่งที่à¹à¸™à¸šà¸¡à¸²à¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="ไม่สามารถลบสิ่งที่à¹à¸™à¸šà¸¡à¸²à¸­à¸­à¸à¸ˆà¸²à¸à¸£à¸²à¸¢à¸à¸²à¸£à¹„ด้";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="ไม่สามารถเพิ่มสิ่งที่à¹à¸™à¸šà¸¡à¸²à¹„ด้เนื่องจาà¸à¸¡à¸µà¸‚นาดใหà¸à¹ˆà¹€à¸à¸´à¸™à¹„ป";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="จำนวนผู้รับทั้งหมดในเขตข้อมูลต้องไม่เà¸à¸´à¸™ {0} รายà¸à¸²à¸£";_u.ExtensibilityStrings.l_InvalidDate_Text="ค่าป้อนเข้าไม่ได้à¹à¸à¹‰à¹„ขเป็นวันที่ถูà¸à¸•à¹‰à¸­à¸‡";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="ผู้ใช้เปลี่ยนตำà¹à¸«à¸™à¹ˆà¸‡à¸‚องเคอร์เซอร์ขณะที่à¸à¸³à¸¥à¸±à¸‡à¹à¸—รà¸à¸‚้อมูล";_u.ExtensibilityStrings.l_InternalFormatError_Text="มีข้อผิดพลาดรูปà¹à¸šà¸šà¸ à¸²à¸¢à¹ƒà¸™";_u.ExtensibilityStrings.l_OffsetNotfound_Text="ไม่พบออฟเซตสำหรับà¸à¸²à¸£à¸›à¸£à¸°à¸—ับเวลานี้";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="รายà¸à¸²à¸£à¸—ี่เลือà¸à¸¡à¸µà¸à¸²à¸£à¹€à¸›à¸¥à¸µà¹ˆà¸¢à¸™à¹à¸›à¸¥à¸‡";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="เส้นทางสิ่งที่à¹à¸™à¸šà¸¡à¸²à¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="ไม่สามารถลบสิ่งที่à¹à¸™à¸šà¸¡à¸²à¹„ด้เนื่องจาà¸à¹„ม่พบสิ่งที่à¹à¸™à¸šà¸¡à¸²à¸—ี่มีดัชนีสิ่งที่à¹à¸™à¸šà¸¡à¸²à¸™à¸µà¹‰";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="ไม่ได้ให้ผู้รับที่ถูà¸à¸•à¹‰à¸­à¸‡";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="ที่อยู่อีเมลที่ให้มาอย่างน้อยหนึ่งรายà¸à¸²à¸£à¸¢à¸²à¸§à¸¡à¸²à¸à¹€à¸à¸´à¸™à¹„ป";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="ไม่สามารถเพิ่มสิ่งที่à¹à¸™à¸šà¸¡à¸²à¸¥à¸‡à¹ƒà¸™à¸£à¸²à¸¢à¸à¸²à¸£à¹„ด้" \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="จำเป็นต้องมีสิทธิ์ที่ปรับให้สูงขึ้นเพื่อเรียà¸à¹ƒà¸Šà¹‰à¹€à¸¡à¸˜à¸­à¸”: '{0}'";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="ID สิ่งที่à¹à¸™à¸šà¸¡à¸²à¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡";_u.ExtensibilityStrings.l_InvalidEndTime_Text="เวลาสิ้นสุดไม่สามารถเà¸à¸´à¸”ขึ้นà¸à¹ˆà¸­à¸™à¹€à¸§à¸¥à¸²à¹€à¸£à¸´à¹ˆà¸¡à¸•à¹‰à¸™à¹„ด้";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="ข้อผิดพลาดสิ่งที่à¹à¸™à¸šà¸¡à¸²";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="ไม่สามารถลบสิ่งที่à¹à¸™à¸šà¸¡à¸²à¸­à¸­à¸à¸ˆà¸²à¸à¸£à¸²à¸¢à¸à¸²à¸£à¹„ด้";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="à¸à¸²à¸£à¹€à¸‚ียนข้อมูลผิดพลาด";_u.ExtensibilityStrings.l_OffsetNotfound_Text="ไม่พบออฟเซตสำหรับà¸à¸²à¸£à¸›à¸£à¸°à¸—ับเวลานี้";_u.ExtensibilityStrings.l_InternalFormatError_Text="มีข้อผิดพลาดรูปà¹à¸šà¸šà¸ à¸²à¸¢à¹ƒà¸™";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="ชื่อที่ใช้à¹à¸ªà¸”งที่ให้มาอย่างน้อยหนึ่งรายà¸à¸²à¸£à¸¢à¸²à¸§à¸¡à¸²à¸à¹€à¸à¸´à¸™à¹„ป";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="ไม่สามารถเพิ่มสิ่งที่à¹à¸™à¸šà¸¡à¸²à¹„ด้ เนื่องจาà¸à¸‚้อความมีจำนวนสิ่งที่à¹à¸™à¸šà¸¡à¸²à¸–ึงขีดจำà¸à¸±à¸”สูงสุดà¹à¸¥à¹‰à¸§";_u.ExtensibilityStrings.l_InvalidDate_Text="ค่าป้อนเข้าไม่ได้à¹à¸à¹‰à¹„ขเป็นวันที่ถูà¸à¸•à¹‰à¸­à¸‡";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="ผู้ใช้เปลี่ยนตำà¹à¸«à¸™à¹ˆà¸‡à¸‚องเคอร์เซอร์ขณะที่à¸à¸³à¸¥à¸±à¸‡à¹à¸—รà¸à¸‚้อมูล";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="จำเป็นต้องมีสิทธิ์ที่ปรับให้สูงขึ้นเพื่อเข้าถึงสมาชิà¸à¸‚อง JavaScript API ที่ได้รับà¸à¸²à¸£à¸›à¹‰à¸­à¸‡à¸à¸±à¸™à¸ªà¸³à¸«à¸£à¸±à¸š Office";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="ที่อยู่อีเมลที่ให้มาอย่างน้อยหนึ่งรายà¸à¸²à¸£à¸¢à¸²à¸§à¸¡à¸²à¸à¹€à¸à¸´à¸™à¹„ป";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="ไม่สามารถลบสิ่งที่à¹à¸™à¸šà¸¡à¸²à¹„ด้เนื่องจาà¸à¹„ม่พบสิ่งที่à¹à¸™à¸šà¸¡à¸²à¸—ี่มีดัชนีสิ่งที่à¹à¸™à¸šà¸¡à¸²à¸™à¸µà¹‰";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="ขนาดà¸à¸²à¸£à¸£à¹‰à¸­à¸‡à¸‚อเà¸à¸´à¸™à¸‚ีดจำà¸à¸±à¸”ที่ 1 เมà¸à¸°à¹„บต์ โปรดปรับเปลี่ยนà¸à¸²à¸£à¸£à¹‰à¸­à¸‡à¸‚อ EWS ของคุณ";_u.ExtensibilityStrings.l_InvalidEventDates_Text="วันที่สิ้นสุดเà¸à¸´à¸”ขึ้นà¸à¹ˆà¸­à¸™à¸§à¸±à¸™à¸—ี่เริ่มต้น";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="ไม่ได้ให้ผู้รับที่ถูà¸à¸•à¹‰à¸­à¸‡";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="เส้นทางสิ่งที่à¹à¸™à¸šà¸¡à¸²à¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡";_u.ExtensibilityStrings.l_InternalProtocolError_Text="ข้อผิดพลาดของโพรโทคอลภายใน: '{0}'";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="ไม่สามารถเพิ่มสิ่งที่à¹à¸™à¸šà¸¡à¸²à¹„ด้ขณะà¸à¸³à¸¥à¸±à¸‡à¹€à¸£à¸µà¸¢à¸à¹ƒà¸Šà¹‰à¸à¸²à¸£à¸•à¸­à¸šà¸à¸¥à¸±à¸šà¸«à¸£à¸·à¸­à¸à¸²à¸£à¸ªà¹ˆà¸‡à¸•à¹ˆà¸­à¹€à¸•à¹‡à¸¡à¸£à¸¹à¸›à¹à¸šà¸šà¸ˆà¸²à¸à¹€à¸‹à¸´à¸£à¹Œà¸Ÿà¹€à¸§à¸­à¸£à¹Œ";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="พารามิเตอร์ที่à¸à¸³à¸«à¸™à¸”ไม่ตรงà¸à¸±à¸šà¸£à¸¹à¸›à¹à¸šà¸šà¸—ี่ต้องà¸à¸²à¸£";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="รายà¸à¸²à¸£à¸—ี่เลือà¸à¸¡à¸µà¸à¸²à¸£à¹€à¸›à¸¥à¸µà¹ˆà¸¢à¸™à¹à¸›à¸¥à¸‡";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="ไม่สามารถเพิ่มสิ่งที่à¹à¸™à¸šà¸¡à¸²à¹„ด้เนื่องจาà¸à¸¡à¸µà¸‚นาดใหà¸à¹ˆà¹€à¸à¸´à¸™à¹„ป";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="ผู้ใช้ลบสิ่งที่à¹à¸™à¸šà¸¡à¸²à¸à¹ˆà¸­à¸™à¸à¸²à¸£à¸­à¸±à¸›à¹‚หลดจะเสร็จสมบูรณ์";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="ไม่สามารถเพิ่มสิ่งที่à¹à¸™à¸šà¸¡à¸²à¸¥à¸‡à¹ƒà¸™à¸£à¸²à¸¢à¸à¸²à¸£à¹„ด้";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="จำนวนผู้รับทั้งหมดในเขตข้อมูลต้องไม่เà¸à¸´à¸™ {0} รายà¸à¸²à¸£";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="à¸à¸²à¸£à¸£à¸±à¸à¸©à¸²à¹ƒà¸«à¹‰ HTML ปลอดภัยล้มเหลว" \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/tr-tr/office_strings.debug.js b/node_modules/@microsoft/office-js/dist/tr-tr/office_strings.debug.js index e34bfc9..d07f4e1 100644 --- a/node_modules/@microsoft/office-js/dist/tr-tr/office_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/tr-tr/office_strings.debug.js @@ -1,179 +1,190 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("Strings"); Strings.OfficeOM = function() { }; Strings.OfficeOM.registerClass("Strings.OfficeOM"); -Strings.OfficeOM.L_InvalidGetColumns = "Belirtilen sütunlar geçersiz."; +Strings.OfficeOM.L_SSOServerError = "Kimlik doÄŸrulaması saÄŸlayıcısında bir hata oluÅŸtu."; +Strings.OfficeOM.L_SettingsStaleError = "Eski Ayar Hatası"; +Strings.OfficeOM.L_CustomXmlNodeNotFound = "Belirtilen düğüm bulunamadı."; +Strings.OfficeOM.L_InvalidResourceUrl = "Geçersiz uygulama kaynağı URL'si saÄŸlandı."; +Strings.OfficeOM.L_InvalidResourceUrlMessage = "Bildirimde geçersiz kaynak URL'si belirtildi."; +Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Belirtilen zorlama türü bu baÄŸlama türüyle uyumlu deÄŸil."; +Strings.OfficeOM.L_EventHandlerRemovalFailed = "Olay iÅŸleyicisi kaldırılamadı."; +Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath, seçimi 1024 öğeyle sınırlar."; +Strings.OfficeOM.L_MissingParameter = "Eksik Parametre"; +Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Veriler güncel deÄŸil. Nesneyi yeniden alın."; +Strings.OfficeOM.L_InvalidValue = "Geçersiz DeÄŸer"; +Strings.OfficeOM.L_RedundantCallbackSpecification = "Geri arama, hem deÄŸiÅŸken listesinde hem de isteÄŸe baÄŸlı nesnede belirtilemiyor."; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory = "Bu eklenti, kullanıcı onayını desteklemiyor."; +Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Lütfen seçim yapın."; +Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Tablo birleÅŸtirilmiÅŸ hücreler içerdiÄŸinde koordinasyon parametreleri, zorlama türü Tablo ile kullanılamaz."; +Strings.OfficeOM.L_FormattingReminder = "Biçimlendirme Anımsatıcısı"; +Strings.OfficeOM.L_OperationNotSupported = "Ä°ÅŸlem desteklenmiyor."; +Strings.OfficeOM.L_UserNotSignedIn = "Office oturumu açmış kullanıcı yok."; +Strings.OfficeOM.L_OutOfRange = "Aralık Dışında"; +Strings.OfficeOM.L_InvalidGrant = "Ön onay yok."; +Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Belirtilen baÄŸlama türü saÄŸlanan adlandırılmış öğe ile uyumlu deÄŸil."; +Strings.OfficeOM.L_GetDataIsTooLarge = "Ä°stenen veri kümesi çok büyük."; +Strings.OfficeOM.L_InvalidSetRows = "Belirtilen satırlar geçersiz."; Strings.OfficeOM.L_InvalidOrTimedOutSession = "Geçersiz veya Zaman Aşımına UÄŸramış Oturum"; -Strings.OfficeOM.L_InvalidBinding = "Geçersiz BaÄŸlama"; -Strings.OfficeOM.L_SSOClientError = "Office'ten gelen kimlik doÄŸrulaması isteÄŸinde bir hata oluÅŸtu."; +Strings.OfficeOM.L_SSOConnectionLostError = "A connection was lost during the sign in process."; +Strings.OfficeOM.L_BadSelectorString = "Seçiciye iletilen dize yanlış biçimlendirilmiÅŸ veya desteklenmiyor."; +Strings.OfficeOM.L_SettingsCannotSave = "Ayarlar kaydedilemedi."; +Strings.OfficeOM.L_APICallFailed = "API ÇaÄŸrısı BaÅŸarısız Oldu"; +Strings.OfficeOM.L_DataWriteError = "Veri Yazma Hatası"; +Strings.OfficeOM.L_GetDataParametersConflict = "Belirtilen parametreler çakışıyor."; +Strings.OfficeOM.L_CustomFunctionImplementationMissing = "Ä°ÅŸlevin tanımını gösteren ve bu adı taşıyan Excel.CustomFunctions üzerindeki özelliÄŸin iÅŸlevi uygulayabilmesi için 'çaÄŸrı' özelliÄŸi içermesi gerekir."; +Strings.OfficeOM.L_InvalidAPICall = "Geçersiz API ÇaÄŸrısı"; Strings.OfficeOM.L_InvalidBindingOperation = "Geçersiz BaÄŸlama Ä°ÅŸlemi"; -Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "{0} uygulaması mevcut deÄŸil. Microsoft.Office.WebExtension.initialize(reason) çaÄŸrılamadı."; -Strings.OfficeOM.L_UnsupportedUserIdentity = "Kullanıcı kimliÄŸi türü desteklenmiyor."; -Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Tarayıcı kısıtlamaları, iletiÅŸim kutusunu oluÅŸturmamızı engelledi. Ä°letiÅŸim kutusu ile eklenti ana bilgisayarının etki alanı, aynı güvenlik bölgesinde deÄŸil."; -Strings.OfficeOM.L_SettingNameNotExist = "Belirtilen ayar adı mevcut deÄŸil."; -Strings.OfficeOM.L_DocumentReadOnly = "Geçerli belge modunda istenen iÅŸleme izin verilmiyor."; -Strings.OfficeOM.L_FileTypeNotSupported = "Belirtilen dosya türü desteklenmiyor."; -Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Bir aÄŸ sorunu nedeniyle dosya alınamadı."; -Strings.OfficeOM.L_InvalidRequestContext = "Nesne farklı istek baÄŸlamlarında kullanılamıyor."; -Strings.OfficeOM.L_InvalidFormatValue = "Bir veya daha fazla biçim parametresi izin verilmeyen deÄŸerler içeriyor. DeÄŸerleri bir daha kontrol edin ve yeniden deneyin."; -Strings.OfficeOM.L_InvalidGetStartRowColumn = "Belirtilen satırBaÅŸlat veya sütunBaÅŸlat deÄŸerleri geçersiz."; +Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Tablo birleÅŸtirilmiÅŸ hücreler içerdiÄŸinde koordinasyon parametreleri, zorlama türü Tablo ile kullanılamaz."; +Strings.OfficeOM.L_NotSupportedBindingType = "Belirtilen baÄŸlama türü {0} desteklenmiyor."; +Strings.OfficeOM.L_InvalidGetRows = "Belirtilen satırlar geçersiz."; +Strings.OfficeOM.L_InvalidArgument = "'{0}' bağımsız deÄŸiÅŸkeni bu durum için geçerli deÄŸil, eksik veya doÄŸru biçimde deÄŸil."; +Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "Office Online oturumunuzun süresi doldu veya oturum geçersiz. Devam etmek için sayfayı yenileyin."; +Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Seçili içeriÄŸin tablo biçiminde olması gerekir. Verileri tablo olarak biçimlendirin ve yeniden deneyin."; +Strings.OfficeOM.L_DataNotMatchBindingType = "Belirtilen veri nesnesi baÄŸlama türü ile uyumlu deÄŸil."; +Strings.OfficeOM.L_InvalidNode = "Geçersiz Düğüm"; Strings.OfficeOM.L_APINotSupported = "API Desteklenmiyor"; -Strings.OfficeOM.L_InvalidBindingError = "Geçersiz BaÄŸlama Hatası"; -Strings.OfficeOM.L_InvalidSetRows = "Belirtilen satırlar geçersiz."; -Strings.OfficeOM.L_NewWindowCrossZone = "Tarayıcınızdaki güvenlik ayarları, bir iletiÅŸim kutusu oluÅŸturmamızı engelliyor. Farklı bir tarayıcı deneyin veya '{1}' ile adres çubuÄŸunuzdaki etki alanının aynı güvenlik bölgesinde olması için {0}."; -Strings.OfficeOM.L_MultipleNamedItemFound = "Aynı ada sahip birden çok nesne bulundu."; -Strings.OfficeOM.L_DialogAlreadyOpened = "Bu eklentide zaten etkin bir iletiÅŸim kutusu olduÄŸundan iÅŸlem baÅŸarısız oldu."; -Strings.OfficeOM.L_GetSelectionNotSupported = "Geçerli seçim desteklenmiyor."; -Strings.OfficeOM.L_InvalidColumnsForBinding = "Belirtilen sütunlar geçersiz."; -Strings.OfficeOM.L_DialogOK = "Tamam"; -Strings.OfficeOM.L_DataWriteError = "Veri Yazma Hatası"; -Strings.OfficeOM.L_ValueNotLoaded = 'Sonuç nesnesinin deÄŸeri henüz yüklenmedi. DeÄŸer özelliÄŸini okumadan önce iliÅŸkili istek baÄŸlamında "context.sync()" öğesini çağırın.'; -Strings.OfficeOM.L_IndexOutOfRange = "Dizin aralık dışında."; +Strings.OfficeOM.L_DataNotMatchBindingSize = "SaÄŸlanan veri nesnesi geçerli seçim boyutuyla eÅŸleÅŸmiyor."; +Strings.OfficeOM.L_CannotNavigateTo = "Nesne, gezinmenin desteklenmediÄŸi bir yerde bulunuyor."; Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = "'{0}' özelliÄŸine yapılan deÄŸiÅŸiklikler \"object.set\" metoduyla uygulanamaz."; +Strings.OfficeOM.L_BindingNotExist = "Belirtilen baÄŸlama mevcut deÄŸil."; +Strings.OfficeOM.L_SSOClientErrorMessage = "Ä°stemcide beklenmeyen bir hata oluÅŸtu."; +Strings.OfficeOM.L_ElementMissing = "Bazı parametre deÄŸerleri eksik olduÄŸu için tablo hücresini biçimlendiremedik. Parametreleri bir daha kontrol edin ve yeniden deneyin."; +Strings.OfficeOM.L_InvalidCellsValue = "Bir veya daha fazla hücre parametresi izin verilmeyen deÄŸerler içeriyor. DeÄŸerleri bir daha kontrol edin ve yeniden deneyin."; +Strings.OfficeOM.L_SelectionCannotBound = "Geçerli seçime baÄŸlanılamıyor."; +Strings.OfficeOM.L_NotSupported = "{0} iÅŸlevi desteklenmiyor."; +Strings.OfficeOM.L_TooManyOptionalObjects = "parametre listesinde birden fazla isteÄŸe baÄŸlı nesne"; +Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Bir aÄŸ sorunu nedeniyle dosya alınamadı."; +Strings.OfficeOM.L_UserClickIgnore = "Kullanıcı iletiÅŸim kutusunu yoksaymayı seçti."; +Strings.OfficeOM.L_InvalidApiCallInContext = "Geçerli baÄŸlamda geçersiz API çaÄŸrısı."; +Strings.OfficeOM.L_CustomFunctionNameCannotSplit = "Ä°ÅŸlev adı, boÅŸ olmayan bir ad alanı ve boÅŸ olmayan bir kısa ad içermelidir."; +Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Not: Biçimlendirme API'si çaÄŸrısı tarafından ayarlanan biçimlendirme kümelerinin 100'ün altında olması önerilir."; +Strings.OfficeOM.L_SSOConnectionLostErrorMessage = "A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones."; +Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Seçim Sınırına Ulaşıldı"; Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Kullanıcının kimlik türü desteklenmiyor."; -Strings.OfficeOM.L_NoCapability = "Bu eylem için yeterli izne sahip deÄŸilsiniz."; -Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Ä°ÅŸlem bu baÄŸlama türünde desteklenmiyor."; -Strings.OfficeOM.L_InternalErrorDescription = "Dahili bir hata oluÅŸtu."; -Strings.OfficeOM.L_InvalidArgument = "'{0}' bağımsız deÄŸiÅŸkeni bu durum için geçerli deÄŸil, eksik veya doÄŸru biçimde deÄŸil."; -Strings.OfficeOM.L_OsfControlTypeNotSupported = "OsfControl türü desteklenmiyor."; -Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} yeni bir pencere görüntülemek istiyor."; -Strings.OfficeOM.L_BadSelectorString = "Seçiciye iletilen dize yanlış biçimlendirilmiÅŸ veya desteklenmiyor."; -Strings.OfficeOM.L_InvalidTableOptionValue = "Bir veya daha fazla tableOptions parametresi izin verilmeyen deÄŸerler içeriyor. DeÄŸerleri bir daha kontrol edin ve yeniden deneyin."; -Strings.OfficeOM.L_SetDataParametersConflict = "Belirtilen parametreler çakışıyor."; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage = "Bu eklentinin, bu kategoride kullanıcı onayını desteklememesi nedeniyle iÅŸlem baÅŸarısız oldu."; +Strings.OfficeOM.L_EventRegistrationError = "Olay Kayıt Hatası"; +Strings.OfficeOM.L_SSOClientError = "Office'ten gelen kimlik doÄŸrulaması isteÄŸinde bir hata oluÅŸtu."; +Strings.OfficeOM.L_DialogRequireHTTPS = "HTTP protokolü desteklenmiyor. Bunun yerine HTTPS kullanın"; +Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "{0} uygulaması mevcut deÄŸil. Microsoft.Office.WebExtension.initialize(reason) çaÄŸrılamadı."; +Strings.OfficeOM.L_SettingsAreStale = "Ayarlar güncel olmadığından kaydedilemedi."; +Strings.OfficeOM.L_DialogInvalidScheme = "URL düzeni desteklenmiyor. Bunun yerine HTTPS kullanın."; +Strings.OfficeOM.L_InvalidOperationInCellEditMode = "Excel, hücre düzenleme modunda. Lütfen ENTER veya SEKME tuÅŸuna basarak ya da baÅŸka bir hücreyi seçerek düzenleme modundan çıkın ve sonra yeniden deneyin."; Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Yoksay"; -Strings.OfficeOM.L_BrowserAPINotSupported = "Bu tarayıcı istenen API'yi desteklemiyor."; -Strings.OfficeOM.L_InvalidArgumentGeneric = "Ä°ÅŸleve eklenen bağımsız deÄŸiÅŸkenler, eksik, bu duruma uygun deÄŸil veya doÄŸru biçimde deÄŸil."; -Strings.OfficeOM.L_ElementMissing = "Bazı parametre deÄŸerleri eksik olduÄŸu için tablo hücresini biçimlendiremedik. Parametreleri bir daha kontrol edin ve yeniden deneyin."; -Strings.OfficeOM.L_SSOServerErrorMessage = "Sunucuda beklenmeyen bir hata oluÅŸtu."; -Strings.OfficeOM.L_PropertyDoesNotExist = "'{0}' özelliÄŸi nesnede yok."; -Strings.OfficeOM.L_DisplayDialogError = "Ä°letiÅŸim Kutusu Hatasını Görüntüle"; -Strings.OfficeOM.L_InvalidDataFormat = "Belirtilen veri nesnesi biçimi geçerli deÄŸil."; -Strings.OfficeOM.L_PermissionDenied = "Ä°zin Reddedildi"; -Strings.OfficeOM.L_InvalidObjectPath = '\'{0}\' nesne yolu yapmak istediÄŸiniz iÅŸlem için kullanılamaz. Nesneyi birden çok "context.sync" çaÄŸrısında ve ".run" toplu iÅŸleminin sıralı yürütülmesi dışında kullanıyorsanız, nesnenin yaÅŸam süresini yönetirken lütfen "context.trackedObjects.add()" ve "context.trackedObjects.remove()" yöntemlerini kullanın.'; -Strings.OfficeOM.L_GetDataIsTooLarge = "Ä°stenen veri kümesi çok büyük."; -Strings.OfficeOM.L_InvalidNode = "Geçersiz Düğüm"; -Strings.OfficeOM.L_RowIndexOutOfRange = "Satır dizini deÄŸeri izin verilen aralığın dışında. Satır sayısından az bir deÄŸer (0 veya daha yüksek) kullanın."; -Strings.OfficeOM.L_InvalidSetColumns = "Belirtilen sütunlar geçersiz."; -Strings.OfficeOM.L_NotSupportedEventType = "Belirtilen olay türü {0} desteklenmiyor."; -Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "Salt okunur olan '{0}' özelliÄŸi ayarlanmaya çalışılıyor."; -Strings.OfficeOM.L_UserAborted = "Kullanıcı, onay isteÄŸini iptal etti."; -Strings.OfficeOM.L_CloseFileBeforeRetrieve = "BaÅŸka dosya almadan mevcut dosyada closeAsync çaÄŸrısı yapın."; +Strings.OfficeOM.L_CustomFunctionDefinitionMissing = "Ä°ÅŸlevin tanımını gösteren ve bu adı taşıyan bir özelliÄŸin Excel.CustomFunctions üzerinde bulunması gerekir."; +Strings.OfficeOM.L_SettingNameNotExist = "Belirtilen ayar adı mevcut deÄŸil."; +Strings.OfficeOM.L_InternalErrorDescription = "Dahili bir hata oluÅŸtu."; +Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Ä°zin Ver"; +Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Tarayıcı kısıtlamaları, iletiÅŸim kutusunu oluÅŸturmamızı engelledi. Ä°letiÅŸim kutusu ile eklenti ana bilgisayarının etki alanı, aynı güvenlik bölgesinde deÄŸil."; +Strings.OfficeOM.L_BindingCreationError = "BaÄŸlama OluÅŸturma Hatası"; +Strings.OfficeOM.L_NoCapability = "Bu eylem için yeterli izne sahip deÄŸilsiniz."; +Strings.OfficeOM.L_DocumentReadOnly = "Geçerli belge modunda istenen iÅŸleme izin verilmiyor."; +Strings.OfficeOM.L_DataWriteReminder = "Veri Yazma Anımsatıcısı"; Strings.OfficeOM.L_FormatValueOutOfRange = "DeÄŸer izin verilen aralığın dışında."; -Strings.OfficeOM.L_ReadSettingsError = "Ayarları Oku Hatası"; -Strings.OfficeOM.L_InvalidGrant = "Ön onay yok."; -Strings.OfficeOM.L_RedundantCallbackSpecification = "Geri arama, hem deÄŸiÅŸken listesinde hem de isteÄŸe baÄŸlı nesnede belirtilemiyor."; -Strings.OfficeOM.L_FunctionCallFailed = "{0} iÅŸlev çaÄŸrısı baÅŸarısız oldu, hata kodu: {1}."; -Strings.OfficeOM.L_CustomXmlOutOfDateName = "Veriler Güncel DeÄŸil"; -Strings.OfficeOM.L_NavOutOfBound = "Dizin aralık dışında olduÄŸundan iÅŸlem baÅŸarısız oldu."; -Strings.OfficeOM.L_InvalidValue = "Geçersiz DeÄŸer"; -Strings.OfficeOM.L_EventHandlerRemovalFailed = "Olay iÅŸleyicisi kaldırılamadı."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Add-in is already requesting an access token."; -Strings.OfficeOM.L_InvalidSelectionForBindingType = "BaÄŸlama, geçerli seçim ve belirtilen baÄŸlama türüyle oluÅŸturulamıyor."; -Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Not: Biçimlendirme API'si çaÄŸrısı tarafından ayarlanan biçimlendirme kümelerinin 100'ün altında olması önerilir."; -Strings.OfficeOM.L_InvalidGrantMessage = "Bu eklenti için izin verilmedi."; Strings.OfficeOM.L_UnknownBindingType = "BaÄŸlama türü desteklenmiyor."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Eklenti zaten bir eriÅŸim belirteci istiyor."; +Strings.OfficeOM.L_InvalidArgumentGeneric = "Ä°ÅŸleve eklenen bağımsız deÄŸiÅŸkenler, eksik, bu duruma uygun deÄŸil veya doÄŸru biçimde deÄŸil."; +Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} yeni bir pencere görüntülemek istiyor."; +Strings.OfficeOM.L_FunctionCallFailed = "{0} iÅŸlev çaÄŸrısı baÅŸarısız oldu, hata kodu: {1}."; Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Belirtilen satırSayısı veya sütunSayısı deÄŸerleri geçersiz."; -Strings.OfficeOM.L_SettingsAreStale = "Ayarlar güncel olmadığından kaydedilemedi."; -Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Not: Tablodaki hücre sayısının 20.000'in altında olması önerilir."; -Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Ä°zin Ver"; -Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Tablo birleÅŸtirilmiÅŸ hücreler içerdiÄŸinde koordinasyon parametreleri, zorlama türü Tablo ile kullanılamaz."; -Strings.OfficeOM.L_InvalidDataObject = "Geçersiz Veri Nesnesi"; -Strings.OfficeOM.L_InvalidCoercion = "Geçersiz Zorlama Türü"; -Strings.OfficeOM.L_UnsupportedEnumeration = "Desteklenmeyen Listeleme"; -Strings.OfficeOM.L_FormattingReminder = "Biçimlendirme Anımsatıcısı"; -Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath, seçimi 1024 öğeyle sınırlar."; -Strings.OfficeOM.L_OperationNotSupported = "Ä°ÅŸlem desteklenmiyor."; -Strings.OfficeOM.L_GetDataParametersConflict = "Belirtilen parametreler çakışıyor."; -Strings.OfficeOM.L_SettingsCannotSave = "Ayarlar kaydedilemedi."; -Strings.OfficeOM.L_BindingNotExist = "Belirtilen baÄŸlama mevcut deÄŸil."; -Strings.OfficeOM.L_DataReadError = "Veri Okuma Hatası"; -Strings.OfficeOM.L_CallbackNotAFunction = "{0} türünde olan geri arama, iÅŸlev türünde olmalıdır."; -Strings.OfficeOM.L_NamedItemNotFound = "Adlandırılmış öğe mevcut deÄŸil."; +Strings.OfficeOM.L_DialogOK = "Tamam"; Strings.OfficeOM.L_DialogNavigateError = "Ä°letiÅŸim Kutusu Gezinti Hatası"; -Strings.OfficeOM.L_UserClickIgnore = "Kullanıcı iletiÅŸim kutusunu yoksaymayı seçti."; -Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "Office Online oturumunuzun süresi doldu veya oturum geçersiz. Devam etmek için sayfayı yenileyin."; -Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Veriler güncel deÄŸil. Nesneyi yeniden alın."; -Strings.OfficeOM.L_SSOClientErrorMessage = "Ä°stemcide beklenmeyen bir hata oluÅŸtu."; +Strings.OfficeOM.L_AppNameNotExist = "{0} için Eklenti Adı yok."; +Strings.OfficeOM.L_CustomXmlOutOfDateName = "Veriler Güncel DeÄŸil"; +Strings.OfficeOM.L_SaveSettingsError = "Ayarları Kaydet Hatası"; +Strings.OfficeOM.L_SetDataParametersConflict = "Belirtilen parametreler çakışıyor."; +Strings.OfficeOM.L_CustomXmlError = "Özel XML Hatası."; Strings.OfficeOM.L_TooManyOptionalFunction = "parametre listesinde birden fazla isteÄŸe baÄŸlı nesne"; +Strings.OfficeOM.L_ConnectionFailureWithDetails = "Ä°stek, {0} durum kodu, {1} hata kodu ve {2} hata iletisiyle baÅŸarısız oldu."; +Strings.OfficeOM.L_InValidOptionalArgument = "geçersiz isteÄŸe baÄŸlı bağımsız deÄŸiÅŸken"; +Strings.OfficeOM.L_InvalidTableOptionValue = "Bir veya daha fazla tableOptions parametresi izin verilmeyen deÄŸerler içeriyor. DeÄŸerleri bir daha kontrol edin ve yeniden deneyin."; +Strings.OfficeOM.L_InvalidSetColumns = "Belirtilen sütunlar geçersiz."; +Strings.OfficeOM.L_InitializeNotReady = "Office.js henüz tam olarak yüklenmedi. Lütfen daha sonra tekrar deneyin veya Office.initialize iÅŸlevine baÅŸlatma kodunuzu eklediÄŸinizden emin olun."; +Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Not: Tablodaki hücre sayısının 20.000'in altında olması önerilir."; +Strings.OfficeOM.L_CloseFileBeforeRetrieve = "BaÅŸka dosya almadan mevcut dosyada closeAsync çaÄŸrısı yapın."; +Strings.OfficeOM.L_CoercionTypeNotSupported = "Belirtilen zorlama türü desteklenmiyor."; +Strings.OfficeOM.L_UnsupportedEnumeration = "Desteklenmeyen Listeleme"; +Strings.OfficeOM.L_MemoryLimit = "Bellek Sınırı Aşıldı"; +Strings.OfficeOM.L_SSOServerErrorMessage = "Sunucuda beklenmeyen bir hata oluÅŸtu."; +Strings.OfficeOM.L_DataNotMatchCoercionType = "Belirtilen veri nesnesi türü geçerli seçimle uyumlu deÄŸil."; Strings.OfficeOM.L_DataNotMatchSelection = "SaÄŸlanan veri nesnesi geçerli seçimin ÅŸekil ve boyutlarıyla uyumlu deÄŸil."; -Strings.OfficeOM.L_DialogInvalidScheme = "URL düzeni desteklenmiyor. Bunun yerine HTTPS kullanın."; -Strings.OfficeOM.L_OverwriteWorksheetData = "SaÄŸlanan veri nesnesi verilerin üzerine yazılacağından veya veriler deÄŸiÅŸeceÄŸinden ayarlama iÅŸlemi baÅŸarısız oldu."; -Strings.OfficeOM.L_NetworkProblem = "AÄŸ Sorunu"; +Strings.OfficeOM.L_InvalidFormatValue = "Bir veya daha fazla biçim parametresi izin verilmeyen deÄŸerler içeriyor. DeÄŸerleri bir daha kontrol edin ve yeniden deneyin."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Eklenti zaten bir eriÅŸim belirteci istediÄŸinden iÅŸlem baÅŸarısız oldu."; +Strings.OfficeOM.L_ValueNotLoaded = 'Sonuç nesnesinin deÄŸeri henüz yüklenmedi. DeÄŸer özelliÄŸini okumadan önce iliÅŸkili istek baÄŸlamında "context.sync()" öğesini çağırın.'; Strings.OfficeOM.L_ActivityLimitReached = "Etkinlik sınırına ulaşıldı."; -Strings.OfficeOM.L_DataNotMatchBindingType = "Belirtilen veri nesnesi baÄŸlama türü ile uyumlu deÄŸil."; -Strings.OfficeOM.L_InvalidParameters = "{0} iÅŸlevi geçersiz parametrelere sahip."; -Strings.OfficeOM.L_NotSupported = "{0} iÅŸlevi desteklenmiyor."; -Strings.OfficeOM.L_DataNotMatchCoercionType = "Belirtilen veri nesnesi türü geçerli seçimle uyumlu deÄŸil."; -Strings.OfficeOM.L_DataStale = "Veriler Güncel DeÄŸil"; -Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Seçili içeriÄŸin tablo biçiminde olması gerekir. Verileri tablo olarak biçimlendirin ve yeniden deneyin."; -Strings.OfficeOM.L_ColIndexOutOfRange = "Sütun dizini deÄŸeri izin verilen aralığın dışında. Sütun sayısından az bir deÄŸer (0 veya daha yüksek) kullanın."; -Strings.OfficeOM.L_InvalidAPICall = "Geçersiz API ÇaÄŸrısı"; +Strings.OfficeOM.L_InvalidGrantMessage = "Bu eklenti için izin verilmedi."; +Strings.OfficeOM.L_InvalidCoercion = "Geçersiz Zorlama Türü"; +Strings.OfficeOM.L_IndexOutOfRange = "Dizin aralık dışında."; +Strings.OfficeOM.L_TooManyArguments = "çok fazla bağımsız deÄŸiÅŸken"; +Strings.OfficeOM.L_OverwriteWorksheetData = "SaÄŸlanan veri nesnesi verilerin üzerine yazılacağından veya veriler deÄŸiÅŸeceÄŸinden ayarlama iÅŸlemi baÅŸarısız oldu."; +Strings.OfficeOM.L_UnsupportedDataObject = "SaÄŸlanan veri nesnesi türü desteklenmiyor."; +Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "tarayıcınızı yapılandırın"; +Strings.OfficeOM.L_InvalidRequestContext = "Nesne farklı istek baÄŸlamlarında kullanılamıyor."; +Strings.OfficeOM.L_InternalError = "İç Hata"; +Strings.OfficeOM.L_SpecifiedIdNotExist = "Belirtilen kimlik yok."; +Strings.OfficeOM.L_InvalidReadForBlankRow = "Belirtilen satır boÅŸ."; +Strings.OfficeOM.L_CannotWriteToSelection = "Geçerli seçime yazılamıyor."; Strings.OfficeOM.L_MissingRequiredArguments = "gerekli olan bazı bağımsız deÄŸiÅŸkenler eksik"; -Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Belirtilen zorlama türü bu baÄŸlama türüyle uyumlu deÄŸil."; +Strings.OfficeOM.L_InvalidDataObject = "Geçersiz Veri Nesnesi"; +Strings.OfficeOM.L_RequestTokenUnavailable = "API, çaÄŸrı sıkılığını yavaÅŸlatmak amacıyla kısıtlandı."; +Strings.OfficeOM.L_NewWindowCrossZone = "Tarayıcınızdaki güvenlik ayarları, bir iletiÅŸim kutusu oluÅŸturmamızı engelliyor. Farklı bir tarayıcı deneyin veya '{1}' ile adres çubuÄŸunuzdaki etki alanının aynı güvenlik bölgesinde olması için {0}."; +Strings.OfficeOM.L_UserAborted = "Kullanıcı, onay isteÄŸini iptal etti."; +Strings.OfficeOM.L_DisplayDialogError = "Ä°letiÅŸim Kutusu Hatasını Görüntüle"; +Strings.OfficeOM.L_InvalidColumnsForBinding = "Belirtilen sütunlar geçersiz."; +Strings.OfficeOM.L_SetDataIsTooLarge = "Belirtilen veri nesnesi çok büyük."; +Strings.OfficeOM.L_NotSupportedEventType = "Belirtilen olay türü {0} desteklenmiyor."; +Strings.OfficeOM.L_InvalidParameters = "{0} iÅŸlevi geçersiz parametrelere sahip."; Strings.OfficeOM.L_RunMustReturnPromise = '".Run" yöntemine geçirilen toplu iÅŸlem iÅŸlevi bir promise döndürmedi. Toplu iÅŸlem tamamlandığında otomatik olarak izlenen nesnelerin serbest bırakılabilmesi için iÅŸlevin bir promise döndürmesi gerekiyor. Bir promise döndürmek için genellikle "context.sync()" yönteminden yanıt döndürülür.'; Strings.OfficeOM.L_NotImplemented = "{0} iÅŸlevi uygulanmadı."; -Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Tablo birleÅŸtirilmiÅŸ hücreler içerdiÄŸinde koordinasyon parametreleri, zorlama türü Tablo ile kullanılamaz."; -Strings.OfficeOM.L_InvalidApiCallInContext = "Geçerli baÄŸlamda geçersiz API çaÄŸrısı."; -Strings.OfficeOM.L_UserAbortedMessage = "Kullanıcı, eklenti izinlerini onaylamadı."; -Strings.OfficeOM.L_SelectionCannotBound = "Geçerli seçime baÄŸlanılamıyor."; -Strings.OfficeOM.L_CannotWriteToSelection = "Geçerli seçime yazılamıyor."; -Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "tarayıcınızı yapılandırın"; -Strings.OfficeOM.L_CannotNavigateTo = "Nesne, gezinmenin desteklenmediÄŸi bir yerde bulunuyor."; -Strings.OfficeOM.L_InvalidFormat = "Geçersiz Biçim Hatası"; -Strings.OfficeOM.L_CustomXmlNodeNotFound = "Belirtilen düğüm bulunamadı."; -Strings.OfficeOM.L_OutOfRange = "Aralık Dışında"; -Strings.OfficeOM.L_UnsupportedDataObject = "SaÄŸlanan veri nesnesi türü desteklenmiyor."; +Strings.OfficeOM.L_DataStale = "Veriler Güncel DeÄŸil"; +Strings.OfficeOM.L_InvalidGetColumns = "Belirtilen sütunlar geçersiz."; +Strings.OfficeOM.L_InvalidDataFormat = "Belirtilen veri nesnesi biçimi geçerli deÄŸil."; +Strings.OfficeOM.L_UnsupportedUserIdentity = "Kullanıcı kimliÄŸi türü desteklenmiyor."; +Strings.OfficeOM.L_PropertyDoesNotExist = "'{0}' özelliÄŸi nesnede yok."; +Strings.OfficeOM.L_GetSelectionNotSupported = "Geçerli seçim desteklenmiyor."; +Strings.OfficeOM.L_DialogAlreadyOpened = "Bu eklentide zaten etkin bir iletiÅŸim kutusu olduÄŸundan iÅŸlem baÅŸarısız oldu."; +Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Ä°ÅŸlem bu baÄŸlama türünde desteklenmiyor."; +Strings.OfficeOM.L_CustomFunctionNameContainsBadChars = "Ä°ÅŸlev adı yalnızca harf, rakam, alt çizgi ve nokta içerebilir."; +Strings.OfficeOM.L_InvalidApiArgumentsMessage = "GiriÅŸ bağımsız deÄŸiÅŸkenleri geçersiz."; Strings.OfficeOM.L_BindingToMultipleSelection = "BitiÅŸik olmayan seçimler desteklenmiyor."; -Strings.OfficeOM.L_CannotRegisterEvent = "Olay iÅŸleyicisi kaydedilemiyor."; Strings.OfficeOM.L_RequestTimeout = "ÇaÄŸrı yürütme çok uzun sürdü."; -Strings.OfficeOM.L_DialogRequireHTTPS = "HTTP protokolü desteklenmiyor. Bunun yerine HTTPS kullanın"; -Strings.OfficeOM.L_SaveSettingsError = "Ayarları Kaydet Hatası"; -Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Belirtilen baÄŸlama türü saÄŸlanan adlandırılmış öğe ile uyumlu deÄŸil."; -Strings.OfficeOM.L_APICallFailed = "API ÇaÄŸrısı BaÅŸarısız Oldu"; -Strings.OfficeOM.L_Timeout = "Ä°ÅŸlem zaman aşımına uÄŸradı."; -Strings.OfficeOM.L_InternalError = "İç Hata"; -Strings.OfficeOM.L_ConnectionFailureWithStatus = "Ä°stek, {0} durum koduyla baÅŸarısız oldu."; -Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Lütfen seçim yapın."; -Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Seçim Sınırına Ulaşıldı"; -Strings.OfficeOM.L_EventHandlerNotExist = "Belirtilen olay türü bu baÄŸlama üzerinde desteklenmiyor."; +Strings.OfficeOM.L_HostError = "Ana Bilgisayar Hatası"; +Strings.OfficeOM.L_FileTypeNotSupported = "Belirtilen dosya türü desteklenmiyor."; +Strings.OfficeOM.L_InvalidBinding = "Geçersiz BaÄŸlama"; +Strings.OfficeOM.L_NetworkProblem = "AÄŸ Sorunu"; +Strings.OfficeOM.L_InvalidSetStartRowColumn = "Belirtilen satırBaÅŸlat veya sütunBaÅŸlat deÄŸerleri geçersiz."; +Strings.OfficeOM.L_InvalidObjectPath = '\'{0}\' nesne yolu yapmak istediÄŸiniz iÅŸlem için kullanılamaz. Nesneyi birden çok "context.sync" çaÄŸrısında ve ".run" toplu iÅŸleminin sıralı yürütülmesi dışında kullanıyorsanız, nesnenin yaÅŸam süresini yönetirken lütfen "context.trackedObjects.add()" ve "context.trackedObjects.remove()" yöntemlerini kullanın.'; Strings.OfficeOM.L_DialogAddressNotTrusted = "URL'nin etki alanı, bildirimdeki AppDomains öğesine eklenmemiÅŸ."; -Strings.OfficeOM.L_SetDataIsTooLarge = "Belirtilen veri nesnesi çok büyük."; -Strings.OfficeOM.L_EventRegistrationError = "Olay Kayıt Hatası"; +Strings.OfficeOM.L_InvalidSSOAddinMessage = "Bu eklenti için kimlik API'si desteklenmiyor."; +Strings.OfficeOM.L_OsfControlTypeNotSupported = "OsfControl türü desteklenmiyor."; +Strings.OfficeOM.L_InvalidGetStartRowColumn = "Belirtilen satırBaÅŸlat veya sütunBaÅŸlat deÄŸerleri geçersiz."; +Strings.OfficeOM.L_InvalidSelectionForBindingType = "BaÄŸlama, geçerli seçim ve belirtilen baÄŸlama türüyle oluÅŸturulamıyor."; +Strings.OfficeOM.L_CallbackNotAFunction = "{0} türünde olan geri arama, iÅŸlev türünde olmalıdır."; Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Geçerli seçim belirtilen zorlama türüyle uyumlu deÄŸil."; -Strings.OfficeOM.L_EventHandlerAdditionFailed = "Olay iÅŸleyicisi eklenemedi."; -Strings.OfficeOM.L_InValidOptionalArgument = "geçersiz isteÄŸe baÄŸlı bağımsız deÄŸiÅŸken"; -Strings.OfficeOM.L_AppNameNotExist = "{0} için Eklenti Adı yok."; -Strings.OfficeOM.L_MissingParameter = "Eksik Parametre"; -Strings.OfficeOM.L_HostError = "Ana Bilgisayar Hatası"; -Strings.OfficeOM.L_InvalidApiArgumentsMessage = "GiriÅŸ bağımsız deÄŸiÅŸkenleri geçersiz."; -Strings.OfficeOM.L_CoercionTypeNotSupported = "Belirtilen zorlama türü desteklenmiyor."; -Strings.OfficeOM.L_InvalidResourceUrlMessage = "Bildirimde geçersiz kaynak URL'si belirtildi."; -Strings.OfficeOM.L_InvalidGetRows = "Belirtilen satırlar geçersiz."; -Strings.OfficeOM.L_ConnectionFailureWithDetails = "Ä°stek, {0} durum kodu, {1} hata kodu ve {2} hata iletisiyle baÅŸarısız oldu."; -Strings.OfficeOM.L_TooManyOptionalObjects = "parametre listesinde birden fazla isteÄŸe baÄŸlı nesne"; -Strings.OfficeOM.L_UserNotSignedIn = "Office oturumu açmış kullanıcı yok."; -Strings.OfficeOM.L_ShuttingDown = "Sunucudaki veriler güncel olmadığından, iÅŸlem baÅŸarısız oldu."; -Strings.OfficeOM.L_CustomXmlError = "Özel XML Hatası."; -Strings.OfficeOM.L_SettingsStaleError = "Eski Ayar Hatası"; -Strings.OfficeOM.L_SpecifiedIdNotExist = "Belirtilen kimlik yok."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "The operation failed because this add-in is already requesting an access token."; +Strings.OfficeOM.L_DataReadError = "Veri Okuma Hatası"; Strings.OfficeOM.L_TooManyIncompleteRequests = "Önceki çaÄŸrı tamamlanana kadar bekleyin."; -Strings.OfficeOM.L_RequestTokenUnavailable = "API, çaÄŸrı sıkılığını yavaÅŸlatmak amacıyla kısıtlandı."; -Strings.OfficeOM.L_MemoryLimit = "Bellek Sınırı Aşıldı"; -Strings.OfficeOM.L_SSOServerError = "Kimlik doÄŸrulaması saÄŸlayıcısında bir hata oluÅŸtu."; -Strings.OfficeOM.L_InvalidCellsValue = "Bir veya daha fazla hücre parametresi izin verilmeyen deÄŸerler içeriyor. DeÄŸerleri bir daha kontrol edin ve yeniden deneyin."; -Strings.OfficeOM.L_PropertyNotLoaded = "'{0}' özelliÄŸi kullanılamıyor. Özellik deÄŸerini okumadan önce kapsayıcı nesnede load yöntemini ve iliÅŸkili istek baÄŸlamında \"context.sync()\" yöntemini çağırın."; -Strings.OfficeOM.L_InvalidSSOAddinMessage = "Bu eklenti için kimlik API'si desteklenmiyor."; +Strings.OfficeOM.L_ShuttingDown = "Sunucudaki veriler güncel olmadığından, iÅŸlem baÅŸarısız oldu."; +Strings.OfficeOM.L_UserAbortedMessage = "Kullanıcı, eklenti izinlerini onaylamadı."; +Strings.OfficeOM.L_CannotRegisterEvent = "Olay iÅŸleyicisi kaydedilemiyor."; +Strings.OfficeOM.L_ConnectionFailureWithStatus = "Ä°stek, {0} durum koduyla baÅŸarısız oldu."; +Strings.OfficeOM.L_InvalidFormat = "Geçersiz Biçim Hatası"; +Strings.OfficeOM.L_RowIndexOutOfRange = "Satır dizini deÄŸeri izin verilen aralığın dışında. Satır sayısından az bir deÄŸer (0 veya daha yüksek) kullanın."; +Strings.OfficeOM.L_ApiNotFoundDetails = "{0} yöntemi veya özelliÄŸi, {2} sürümünüzde kullanılamayan {1} gereksinim kümesinin bir parçasıdır."; +Strings.OfficeOM.L_EventHandlerAdditionFailed = "Olay iÅŸleyicisi eklenemedi."; +Strings.OfficeOM.L_MultipleNamedItemFound = "Aynı ada sahip birden çok nesne bulundu."; +Strings.OfficeOM.L_Timeout = "Ä°ÅŸlem zaman aşımına uÄŸradı."; +Strings.OfficeOM.L_ReadSettingsError = "Ayarları Oku Hatası"; +Strings.OfficeOM.L_PermissionDenied = "Ä°zin Reddedildi"; +Strings.OfficeOM.L_NamedItemNotFound = "Adlandırılmış öğe mevcut deÄŸil."; +Strings.OfficeOM.L_InvalidBindingError = "Geçersiz BaÄŸlama Hatası"; Strings.OfficeOM.L_SliceSizeNotSupported = "Belirtilen dilim boyutu desteklenmiyor."; -Strings.OfficeOM.L_DataWriteReminder = "Veri Yazma Anımsatıcısı"; +Strings.OfficeOM.L_ColIndexOutOfRange = "Sütun dizini deÄŸeri izin verilen aralığın dışında. Sütun sayısından az bir deÄŸer (0 veya daha yüksek) kullanın."; Strings.OfficeOM.L_UnsupportedEnumerationMessage = "Sabit listesi geçerli ana bilgisayar uygulamasında desteklenmiyor."; -Strings.OfficeOM.L_InvalidSetStartRowColumn = "Belirtilen satırBaÅŸlat veya sütunBaÅŸlat deÄŸerleri geçersiz."; -Strings.OfficeOM.L_InvalidReadForBlankRow = "Belirtilen satır boÅŸ."; -Strings.OfficeOM.L_DataNotMatchBindingSize = "SaÄŸlanan veri nesnesi geçerli seçim boyutuyla eÅŸleÅŸmiyor."; -Strings.OfficeOM.L_NotSupportedBindingType = "Belirtilen baÄŸlama türü {0} desteklenmiyor."; -Strings.OfficeOM.L_TooManyArguments = "çok fazla bağımsız deÄŸiÅŸken"; -Strings.OfficeOM.L_InvalidResourceUrl = "Geçersiz uygulama kaynağı URL'si saÄŸlandı."; -Strings.OfficeOM.L_InitializeNotReady = "Office.js henüz tam olarak yüklenmedi. Lütfen daha sonra tekrar deneyin veya Office.initialize iÅŸlevine baÅŸlatma kodunuzu eklediÄŸinizden emin olun."; -Strings.OfficeOM.L_BindingCreationError = "BaÄŸlama OluÅŸturma Hatası" +Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "Salt okunur olan '{0}' özelliÄŸi ayarlanmaya çalışılıyor."; +Strings.OfficeOM.L_NavOutOfBound = "Dizin aralık dışında olduÄŸundan iÅŸlem baÅŸarısız oldu."; +Strings.OfficeOM.L_BrowserAPINotSupported = "Bu tarayıcı istenen API'yi desteklemiyor."; +Strings.OfficeOM.L_PropertyNotLoaded = "'{0}' özelliÄŸi kullanılamıyor. Özellik deÄŸerini okumadan önce kapsayıcı nesnede load yöntemini ve iliÅŸkili istek baÄŸlamında \"context.sync()\" yöntemini çağırın."; +Strings.OfficeOM.L_EventHandlerNotExist = "Belirtilen olay türü bu baÄŸlama üzerinde desteklenmiyor." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/tr-tr/office_strings.js b/node_modules/@microsoft/office-js/dist/tr-tr/office_strings.js index a4df9cc..9dafb57 100644 --- a/node_modules/@microsoft/office-js/dist/tr-tr/office_strings.js +++ b/node_modules/@microsoft/office-js/dist/tr-tr/office_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_InvalidGetColumns="Belirtilen sütunlar geçersiz.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Geçersiz veya Zaman Aşımına UÄŸramış Oturum";Strings.OfficeOM.L_InvalidBinding="Geçersiz BaÄŸlama";Strings.OfficeOM.L_SSOClientError="Office'ten gelen kimlik doÄŸrulaması isteÄŸinde bir hata oluÅŸtu.";Strings.OfficeOM.L_InvalidBindingOperation="Geçersiz BaÄŸlama Ä°ÅŸlemi";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="{0} uygulaması mevcut deÄŸil. Microsoft.Office.WebExtension.initialize(reason) çaÄŸrılamadı.";Strings.OfficeOM.L_UnsupportedUserIdentity="Kullanıcı kimliÄŸi türü desteklenmiyor.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Tarayıcı kısıtlamaları, iletiÅŸim kutusunu oluÅŸturmamızı engelledi. Ä°letiÅŸim kutusu ile eklenti ana bilgisayarının etki alanı, aynı güvenlik bölgesinde deÄŸil.";Strings.OfficeOM.L_SettingNameNotExist="Belirtilen ayar adı mevcut deÄŸil.";Strings.OfficeOM.L_DocumentReadOnly="Geçerli belge modunda istenen iÅŸleme izin verilmiyor.";Strings.OfficeOM.L_FileTypeNotSupported="Belirtilen dosya türü desteklenmiyor.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Bir aÄŸ sorunu nedeniyle dosya alınamadı.";Strings.OfficeOM.L_InvalidRequestContext="Nesne farklı istek baÄŸlamlarında kullanılamıyor.";Strings.OfficeOM.L_InvalidFormatValue="Bir veya daha fazla biçim parametresi izin verilmeyen deÄŸerler içeriyor. DeÄŸerleri bir daha kontrol edin ve yeniden deneyin.";Strings.OfficeOM.L_InvalidGetStartRowColumn="Belirtilen satırBaÅŸlat veya sütunBaÅŸlat deÄŸerleri geçersiz.";Strings.OfficeOM.L_APINotSupported="API Desteklenmiyor";Strings.OfficeOM.L_InvalidBindingError="Geçersiz BaÄŸlama Hatası";Strings.OfficeOM.L_InvalidSetRows="Belirtilen satırlar geçersiz.";Strings.OfficeOM.L_NewWindowCrossZone="Tarayıcınızdaki güvenlik ayarları, bir iletiÅŸim kutusu oluÅŸturmamızı engelliyor. Farklı bir tarayıcı deneyin veya '{1}' ile adres çubuÄŸunuzdaki etki alanının aynı güvenlik bölgesinde olması için {0}.";Strings.OfficeOM.L_MultipleNamedItemFound="Aynı ada sahip birden çok nesne bulundu.";Strings.OfficeOM.L_DialogAlreadyOpened="Bu eklentide zaten etkin bir iletiÅŸim kutusu olduÄŸundan iÅŸlem baÅŸarısız oldu.";Strings.OfficeOM.L_GetSelectionNotSupported="Geçerli seçim desteklenmiyor.";Strings.OfficeOM.L_InvalidColumnsForBinding="Belirtilen sütunlar geçersiz.";Strings.OfficeOM.L_DialogOK="Tamam";Strings.OfficeOM.L_DataWriteError="Veri Yazma Hatası";Strings.OfficeOM.L_ValueNotLoaded='Sonuç nesnesinin deÄŸeri henüz yüklenmedi. DeÄŸer özelliÄŸini okumadan önce iliÅŸkili istek baÄŸlamında "context.sync()" öğesini çağırın.';Strings.OfficeOM.L_IndexOutOfRange="Dizin aralık dışında.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="'{0}' özelliÄŸine yapılan deÄŸiÅŸiklikler \"object.set\" metoduyla uygulanamaz.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Kullanıcının kimlik türü desteklenmiyor.";Strings.OfficeOM.L_NoCapability="Bu eylem için yeterli izne sahip deÄŸilsiniz.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Ä°ÅŸlem bu baÄŸlama türünde desteklenmiyor.";Strings.OfficeOM.L_InternalErrorDescription="Dahili bir hata oluÅŸtu.";Strings.OfficeOM.L_InvalidArgument="'{0}' bağımsız deÄŸiÅŸkeni bu durum için geçerli deÄŸil, eksik veya doÄŸru biçimde deÄŸil.";Strings.OfficeOM.L_OsfControlTypeNotSupported="OsfControl türü desteklenmiyor.";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} yeni bir pencere görüntülemek istiyor.";Strings.OfficeOM.L_BadSelectorString="Seçiciye iletilen dize yanlış biçimlendirilmiÅŸ veya desteklenmiyor.";Strings.OfficeOM.L_InvalidTableOptionValue="Bir veya daha fazla tableOptions parametresi izin verilmeyen deÄŸerler içeriyor. DeÄŸerleri bir daha kontrol edin ve yeniden deneyin.";Strings.OfficeOM.L_SetDataParametersConflict="Belirtilen parametreler çakışıyor.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Yoksay";Strings.OfficeOM.L_BrowserAPINotSupported="Bu tarayıcı istenen API'yi desteklemiyor.";Strings.OfficeOM.L_InvalidArgumentGeneric="Ä°ÅŸleve eklenen bağımsız deÄŸiÅŸkenler, eksik, bu duruma uygun deÄŸil veya doÄŸru biçimde deÄŸil.";Strings.OfficeOM.L_ElementMissing="Bazı parametre deÄŸerleri eksik olduÄŸu için tablo hücresini biçimlendiremedik. Parametreleri bir daha kontrol edin ve yeniden deneyin.";Strings.OfficeOM.L_SSOServerErrorMessage="Sunucuda beklenmeyen bir hata oluÅŸtu.";Strings.OfficeOM.L_PropertyDoesNotExist="'{0}' özelliÄŸi nesnede yok.";Strings.OfficeOM.L_DisplayDialogError="Ä°letiÅŸim Kutusu Hatasını Görüntüle";Strings.OfficeOM.L_InvalidDataFormat="Belirtilen veri nesnesi biçimi geçerli deÄŸil.";Strings.OfficeOM.L_PermissionDenied="Ä°zin Reddedildi";Strings.OfficeOM.L_InvalidObjectPath='\'{0}\' nesne yolu yapmak istediÄŸiniz iÅŸlem için kullanılamaz. Nesneyi birden çok "context.sync" çaÄŸrısında ve ".run" toplu iÅŸleminin sıralı yürütülmesi dışında kullanıyorsanız, nesnenin yaÅŸam süresini yönetirken lütfen "context.trackedObjects.add()" ve "context.trackedObjects.remove()" yöntemlerini kullanın.';Strings.OfficeOM.L_GetDataIsTooLarge="Ä°stenen veri kümesi çok büyük.";Strings.OfficeOM.L_InvalidNode="Geçersiz Düğüm";Strings.OfficeOM.L_RowIndexOutOfRange="Satır dizini deÄŸeri izin verilen aralığın dışında. Satır sayısından az bir deÄŸer (0 veya daha yüksek) kullanın.";Strings.OfficeOM.L_InvalidSetColumns="Belirtilen sütunlar geçersiz.";Strings.OfficeOM.L_NotSupportedEventType="Belirtilen olay türü {0} desteklenmiyor.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="Salt okunur olan '{0}' özelliÄŸi ayarlanmaya çalışılıyor.";Strings.OfficeOM.L_UserAborted="Kullanıcı, onay isteÄŸini iptal etti.";Strings.OfficeOM.L_CloseFileBeforeRetrieve="BaÅŸka dosya almadan mevcut dosyada closeAsync çaÄŸrısı yapın.";Strings.OfficeOM.L_FormatValueOutOfRange="DeÄŸer izin verilen aralığın dışında.";Strings.OfficeOM.L_ReadSettingsError="Ayarları Oku Hatası";Strings.OfficeOM.L_InvalidGrant="Ön onay yok.";Strings.OfficeOM.L_RedundantCallbackSpecification="Geri arama, hem deÄŸiÅŸken listesinde hem de isteÄŸe baÄŸlı nesnede belirtilemiyor.";Strings.OfficeOM.L_FunctionCallFailed="{0} iÅŸlev çaÄŸrısı baÅŸarısız oldu, hata kodu: {1}.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Veriler Güncel DeÄŸil";Strings.OfficeOM.L_NavOutOfBound="Dizin aralık dışında olduÄŸundan iÅŸlem baÅŸarısız oldu.";Strings.OfficeOM.L_InvalidValue="Geçersiz DeÄŸer";Strings.OfficeOM.L_EventHandlerRemovalFailed="Olay iÅŸleyicisi kaldırılamadı.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Add-in is already requesting an access token.";Strings.OfficeOM.L_InvalidSelectionForBindingType="BaÄŸlama, geçerli seçim ve belirtilen baÄŸlama türüyle oluÅŸturulamıyor.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Not: Biçimlendirme API'si çaÄŸrısı tarafından ayarlanan biçimlendirme kümelerinin 100'ün altında olması önerilir.";Strings.OfficeOM.L_InvalidGrantMessage="Bu eklenti için izin verilmedi.";Strings.OfficeOM.L_UnknownBindingType="BaÄŸlama türü desteklenmiyor.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Belirtilen satırSayısı veya sütunSayısı deÄŸerleri geçersiz.";Strings.OfficeOM.L_SettingsAreStale="Ayarlar güncel olmadığından kaydedilemedi.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Not: Tablodaki hücre sayısının 20.000'in altında olması önerilir.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Ä°zin Ver";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Tablo birleÅŸtirilmiÅŸ hücreler içerdiÄŸinde koordinasyon parametreleri, zorlama türü Tablo ile kullanılamaz.";Strings.OfficeOM.L_InvalidDataObject="Geçersiz Veri Nesnesi";Strings.OfficeOM.L_InvalidCoercion="Geçersiz Zorlama Türü";Strings.OfficeOM.L_UnsupportedEnumeration="Desteklenmeyen Listeleme";Strings.OfficeOM.L_FormattingReminder="Biçimlendirme Anımsatıcısı";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath, seçimi 1024 öğeyle sınırlar.";Strings.OfficeOM.L_OperationNotSupported="Ä°ÅŸlem desteklenmiyor.";Strings.OfficeOM.L_GetDataParametersConflict="Belirtilen parametreler çakışıyor.";Strings.OfficeOM.L_SettingsCannotSave="Ayarlar kaydedilemedi.";Strings.OfficeOM.L_BindingNotExist="Belirtilen baÄŸlama mevcut deÄŸil.";Strings.OfficeOM.L_DataReadError="Veri Okuma Hatası";Strings.OfficeOM.L_CallbackNotAFunction="{0} türünde olan geri arama, iÅŸlev türünde olmalıdır.";Strings.OfficeOM.L_NamedItemNotFound="Adlandırılmış öğe mevcut deÄŸil.";Strings.OfficeOM.L_DialogNavigateError="Ä°letiÅŸim Kutusu Gezinti Hatası";Strings.OfficeOM.L_UserClickIgnore="Kullanıcı iletiÅŸim kutusunu yoksaymayı seçti.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="Office Online oturumunuzun süresi doldu veya oturum geçersiz. Devam etmek için sayfayı yenileyin.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Veriler güncel deÄŸil. Nesneyi yeniden alın.";Strings.OfficeOM.L_SSOClientErrorMessage="Ä°stemcide beklenmeyen bir hata oluÅŸtu.";Strings.OfficeOM.L_TooManyOptionalFunction="parametre listesinde birden fazla isteÄŸe baÄŸlı nesne";Strings.OfficeOM.L_DataNotMatchSelection="SaÄŸlanan veri nesnesi geçerli seçimin ÅŸekil ve boyutlarıyla uyumlu deÄŸil.";Strings.OfficeOM.L_DialogInvalidScheme="URL düzeni desteklenmiyor. Bunun yerine HTTPS kullanın.";Strings.OfficeOM.L_OverwriteWorksheetData="SaÄŸlanan veri nesnesi verilerin üzerine yazılacağından veya veriler deÄŸiÅŸeceÄŸinden ayarlama iÅŸlemi baÅŸarısız oldu.";Strings.OfficeOM.L_NetworkProblem="AÄŸ Sorunu";Strings.OfficeOM.L_ActivityLimitReached="Etkinlik sınırına ulaşıldı.";Strings.OfficeOM.L_DataNotMatchBindingType="Belirtilen veri nesnesi baÄŸlama türü ile uyumlu deÄŸil.";Strings.OfficeOM.L_InvalidParameters="{0} iÅŸlevi geçersiz parametrelere sahip.";Strings.OfficeOM.L_NotSupported="{0} iÅŸlevi desteklenmiyor.";Strings.OfficeOM.L_DataNotMatchCoercionType="Belirtilen veri nesnesi türü geçerli seçimle uyumlu deÄŸil.";Strings.OfficeOM.L_DataStale="Veriler Güncel DeÄŸil";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Seçili içeriÄŸin tablo biçiminde olması gerekir. Verileri tablo olarak biçimlendirin ve yeniden deneyin.";Strings.OfficeOM.L_ColIndexOutOfRange="Sütun dizini deÄŸeri izin verilen aralığın dışında. Sütun sayısından az bir deÄŸer (0 veya daha yüksek) kullanın.";Strings.OfficeOM.L_InvalidAPICall="Geçersiz API ÇaÄŸrısı";Strings.OfficeOM.L_MissingRequiredArguments="gerekli olan bazı bağımsız deÄŸiÅŸkenler eksik";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Belirtilen zorlama türü bu baÄŸlama türüyle uyumlu deÄŸil.";Strings.OfficeOM.L_RunMustReturnPromise='".Run" yöntemine geçirilen toplu iÅŸlem iÅŸlevi bir promise döndürmedi. Toplu iÅŸlem tamamlandığında otomatik olarak izlenen nesnelerin serbest bırakılabilmesi için iÅŸlevin bir promise döndürmesi gerekiyor. Bir promise döndürmek için genellikle "context.sync()" yönteminden yanıt döndürülür.';Strings.OfficeOM.L_NotImplemented="{0} iÅŸlevi uygulanmadı.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Tablo birleÅŸtirilmiÅŸ hücreler içerdiÄŸinde koordinasyon parametreleri, zorlama türü Tablo ile kullanılamaz.";Strings.OfficeOM.L_InvalidApiCallInContext="Geçerli baÄŸlamda geçersiz API çaÄŸrısı.";Strings.OfficeOM.L_UserAbortedMessage="Kullanıcı, eklenti izinlerini onaylamadı.";Strings.OfficeOM.L_SelectionCannotBound="Geçerli seçime baÄŸlanılamıyor.";Strings.OfficeOM.L_CannotWriteToSelection="Geçerli seçime yazılamıyor.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="tarayıcınızı yapılandırın";Strings.OfficeOM.L_CannotNavigateTo="Nesne, gezinmenin desteklenmediÄŸi bir yerde bulunuyor.";Strings.OfficeOM.L_InvalidFormat="Geçersiz Biçim Hatası";Strings.OfficeOM.L_CustomXmlNodeNotFound="Belirtilen düğüm bulunamadı.";Strings.OfficeOM.L_OutOfRange="Aralık Dışında";Strings.OfficeOM.L_UnsupportedDataObject="SaÄŸlanan veri nesnesi türü desteklenmiyor.";Strings.OfficeOM.L_BindingToMultipleSelection="BitiÅŸik olmayan seçimler desteklenmiyor.";Strings.OfficeOM.L_CannotRegisterEvent="Olay iÅŸleyicisi kaydedilemiyor.";Strings.OfficeOM.L_RequestTimeout="ÇaÄŸrı yürütme çok uzun sürdü.";Strings.OfficeOM.L_DialogRequireHTTPS="HTTP protokolü desteklenmiyor. Bunun yerine HTTPS kullanın";Strings.OfficeOM.L_SaveSettingsError="Ayarları Kaydet Hatası";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Belirtilen baÄŸlama türü saÄŸlanan adlandırılmış öğe ile uyumlu deÄŸil.";Strings.OfficeOM.L_APICallFailed="API ÇaÄŸrısı BaÅŸarısız Oldu";Strings.OfficeOM.L_Timeout="Ä°ÅŸlem zaman aşımına uÄŸradı.";Strings.OfficeOM.L_InternalError="İç Hata";Strings.OfficeOM.L_ConnectionFailureWithStatus="Ä°stek, {0} durum koduyla baÅŸarısız oldu.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Lütfen seçim yapın.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Seçim Sınırına Ulaşıldı";Strings.OfficeOM.L_EventHandlerNotExist="Belirtilen olay türü bu baÄŸlama üzerinde desteklenmiyor.";Strings.OfficeOM.L_DialogAddressNotTrusted="URL'nin etki alanı, bildirimdeki AppDomains öğesine eklenmemiÅŸ.";Strings.OfficeOM.L_SetDataIsTooLarge="Belirtilen veri nesnesi çok büyük.";Strings.OfficeOM.L_EventRegistrationError="Olay Kayıt Hatası";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Geçerli seçim belirtilen zorlama türüyle uyumlu deÄŸil.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Olay iÅŸleyicisi eklenemedi.";Strings.OfficeOM.L_InValidOptionalArgument="geçersiz isteÄŸe baÄŸlı bağımsız deÄŸiÅŸken";Strings.OfficeOM.L_AppNameNotExist="{0} için Eklenti Adı yok.";Strings.OfficeOM.L_MissingParameter="Eksik Parametre";Strings.OfficeOM.L_HostError="Ana Bilgisayar Hatası";Strings.OfficeOM.L_InvalidApiArgumentsMessage="GiriÅŸ bağımsız deÄŸiÅŸkenleri geçersiz.";Strings.OfficeOM.L_CoercionTypeNotSupported="Belirtilen zorlama türü desteklenmiyor.";Strings.OfficeOM.L_InvalidResourceUrlMessage="Bildirimde geçersiz kaynak URL'si belirtildi.";Strings.OfficeOM.L_InvalidGetRows="Belirtilen satırlar geçersiz.";Strings.OfficeOM.L_ConnectionFailureWithDetails="Ä°stek, {0} durum kodu, {1} hata kodu ve {2} hata iletisiyle baÅŸarısız oldu.";Strings.OfficeOM.L_TooManyOptionalObjects="parametre listesinde birden fazla isteÄŸe baÄŸlı nesne";Strings.OfficeOM.L_UserNotSignedIn="Office oturumu açmış kullanıcı yok.";Strings.OfficeOM.L_ShuttingDown="Sunucudaki veriler güncel olmadığından, iÅŸlem baÅŸarısız oldu.";Strings.OfficeOM.L_CustomXmlError="Özel XML Hatası.";Strings.OfficeOM.L_SettingsStaleError="Eski Ayar Hatası";Strings.OfficeOM.L_SpecifiedIdNotExist="Belirtilen kimlik yok.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="The operation failed because this add-in is already requesting an access token.";Strings.OfficeOM.L_TooManyIncompleteRequests="Önceki çaÄŸrı tamamlanana kadar bekleyin.";Strings.OfficeOM.L_RequestTokenUnavailable="API, çaÄŸrı sıkılığını yavaÅŸlatmak amacıyla kısıtlandı.";Strings.OfficeOM.L_MemoryLimit="Bellek Sınırı Aşıldı";Strings.OfficeOM.L_SSOServerError="Kimlik doÄŸrulaması saÄŸlayıcısında bir hata oluÅŸtu.";Strings.OfficeOM.L_InvalidCellsValue="Bir veya daha fazla hücre parametresi izin verilmeyen deÄŸerler içeriyor. DeÄŸerleri bir daha kontrol edin ve yeniden deneyin.";Strings.OfficeOM.L_PropertyNotLoaded="'{0}' özelliÄŸi kullanılamıyor. Özellik deÄŸerini okumadan önce kapsayıcı nesnede load yöntemini ve iliÅŸkili istek baÄŸlamında \"context.sync()\" yöntemini çağırın.";Strings.OfficeOM.L_InvalidSSOAddinMessage="Bu eklenti için kimlik API'si desteklenmiyor.";Strings.OfficeOM.L_SliceSizeNotSupported="Belirtilen dilim boyutu desteklenmiyor.";Strings.OfficeOM.L_DataWriteReminder="Veri Yazma Anımsatıcısı";Strings.OfficeOM.L_UnsupportedEnumerationMessage="Sabit listesi geçerli ana bilgisayar uygulamasında desteklenmiyor.";Strings.OfficeOM.L_InvalidSetStartRowColumn="Belirtilen satırBaÅŸlat veya sütunBaÅŸlat deÄŸerleri geçersiz.";Strings.OfficeOM.L_InvalidReadForBlankRow="Belirtilen satır boÅŸ.";Strings.OfficeOM.L_DataNotMatchBindingSize="SaÄŸlanan veri nesnesi geçerli seçim boyutuyla eÅŸleÅŸmiyor.";Strings.OfficeOM.L_NotSupportedBindingType="Belirtilen baÄŸlama türü {0} desteklenmiyor.";Strings.OfficeOM.L_TooManyArguments="çok fazla bağımsız deÄŸiÅŸken";Strings.OfficeOM.L_InvalidResourceUrl="Geçersiz uygulama kaynağı URL'si saÄŸlandı.";Strings.OfficeOM.L_InitializeNotReady="Office.js henüz tam olarak yüklenmedi. Lütfen daha sonra tekrar deneyin veya Office.initialize iÅŸlevine baÅŸlatma kodunuzu eklediÄŸinizden emin olun.";Strings.OfficeOM.L_BindingCreationError="BaÄŸlama OluÅŸturma Hatası" \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_SSOServerError="Kimlik doÄŸrulaması saÄŸlayıcısında bir hata oluÅŸtu.";Strings.OfficeOM.L_SettingsStaleError="Eski Ayar Hatası";Strings.OfficeOM.L_CustomXmlNodeNotFound="Belirtilen düğüm bulunamadı.";Strings.OfficeOM.L_InvalidResourceUrl="Geçersiz uygulama kaynağı URL'si saÄŸlandı.";Strings.OfficeOM.L_InvalidResourceUrlMessage="Bildirimde geçersiz kaynak URL'si belirtildi.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Belirtilen zorlama türü bu baÄŸlama türüyle uyumlu deÄŸil.";Strings.OfficeOM.L_EventHandlerRemovalFailed="Olay iÅŸleyicisi kaldırılamadı.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath, seçimi 1024 öğeyle sınırlar.";Strings.OfficeOM.L_MissingParameter="Eksik Parametre";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Veriler güncel deÄŸil. Nesneyi yeniden alın.";Strings.OfficeOM.L_InvalidValue="Geçersiz DeÄŸer";Strings.OfficeOM.L_RedundantCallbackSpecification="Geri arama, hem deÄŸiÅŸken listesinde hem de isteÄŸe baÄŸlı nesnede belirtilemiyor.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory="Bu eklenti, kullanıcı onayını desteklemiyor.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Lütfen seçim yapın.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Tablo birleÅŸtirilmiÅŸ hücreler içerdiÄŸinde koordinasyon parametreleri, zorlama türü Tablo ile kullanılamaz.";Strings.OfficeOM.L_FormattingReminder="Biçimlendirme Anımsatıcısı";Strings.OfficeOM.L_OperationNotSupported="Ä°ÅŸlem desteklenmiyor.";Strings.OfficeOM.L_UserNotSignedIn="Office oturumu açmış kullanıcı yok.";Strings.OfficeOM.L_OutOfRange="Aralık Dışında";Strings.OfficeOM.L_InvalidGrant="Ön onay yok.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Belirtilen baÄŸlama türü saÄŸlanan adlandırılmış öğe ile uyumlu deÄŸil.";Strings.OfficeOM.L_GetDataIsTooLarge="Ä°stenen veri kümesi çok büyük.";Strings.OfficeOM.L_InvalidSetRows="Belirtilen satırlar geçersiz.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Geçersiz veya Zaman Aşımına UÄŸramış Oturum";Strings.OfficeOM.L_SSOConnectionLostError="A connection was lost during the sign in process.";Strings.OfficeOM.L_BadSelectorString="Seçiciye iletilen dize yanlış biçimlendirilmiÅŸ veya desteklenmiyor.";Strings.OfficeOM.L_SettingsCannotSave="Ayarlar kaydedilemedi.";Strings.OfficeOM.L_APICallFailed="API ÇaÄŸrısı BaÅŸarısız Oldu";Strings.OfficeOM.L_DataWriteError="Veri Yazma Hatası";Strings.OfficeOM.L_GetDataParametersConflict="Belirtilen parametreler çakışıyor.";Strings.OfficeOM.L_CustomFunctionImplementationMissing="Ä°ÅŸlevin tanımını gösteren ve bu adı taşıyan Excel.CustomFunctions üzerindeki özelliÄŸin iÅŸlevi uygulayabilmesi için 'çaÄŸrı' özelliÄŸi içermesi gerekir.";Strings.OfficeOM.L_InvalidAPICall="Geçersiz API ÇaÄŸrısı";Strings.OfficeOM.L_InvalidBindingOperation="Geçersiz BaÄŸlama Ä°ÅŸlemi";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Tablo birleÅŸtirilmiÅŸ hücreler içerdiÄŸinde koordinasyon parametreleri, zorlama türü Tablo ile kullanılamaz.";Strings.OfficeOM.L_NotSupportedBindingType="Belirtilen baÄŸlama türü {0} desteklenmiyor.";Strings.OfficeOM.L_InvalidGetRows="Belirtilen satırlar geçersiz.";Strings.OfficeOM.L_InvalidArgument="'{0}' bağımsız deÄŸiÅŸkeni bu durum için geçerli deÄŸil, eksik veya doÄŸru biçimde deÄŸil.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="Office Online oturumunuzun süresi doldu veya oturum geçersiz. Devam etmek için sayfayı yenileyin.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Seçili içeriÄŸin tablo biçiminde olması gerekir. Verileri tablo olarak biçimlendirin ve yeniden deneyin.";Strings.OfficeOM.L_DataNotMatchBindingType="Belirtilen veri nesnesi baÄŸlama türü ile uyumlu deÄŸil.";Strings.OfficeOM.L_InvalidNode="Geçersiz Düğüm";Strings.OfficeOM.L_APINotSupported="API Desteklenmiyor";Strings.OfficeOM.L_DataNotMatchBindingSize="SaÄŸlanan veri nesnesi geçerli seçim boyutuyla eÅŸleÅŸmiyor.";Strings.OfficeOM.L_CannotNavigateTo="Nesne, gezinmenin desteklenmediÄŸi bir yerde bulunuyor.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="'{0}' özelliÄŸine yapılan deÄŸiÅŸiklikler \"object.set\" metoduyla uygulanamaz.";Strings.OfficeOM.L_BindingNotExist="Belirtilen baÄŸlama mevcut deÄŸil.";Strings.OfficeOM.L_SSOClientErrorMessage="Ä°stemcide beklenmeyen bir hata oluÅŸtu.";Strings.OfficeOM.L_ElementMissing="Bazı parametre deÄŸerleri eksik olduÄŸu için tablo hücresini biçimlendiremedik. Parametreleri bir daha kontrol edin ve yeniden deneyin.";Strings.OfficeOM.L_InvalidCellsValue="Bir veya daha fazla hücre parametresi izin verilmeyen deÄŸerler içeriyor. DeÄŸerleri bir daha kontrol edin ve yeniden deneyin.";Strings.OfficeOM.L_SelectionCannotBound="Geçerli seçime baÄŸlanılamıyor.";Strings.OfficeOM.L_NotSupported="{0} iÅŸlevi desteklenmiyor.";Strings.OfficeOM.L_TooManyOptionalObjects="parametre listesinde birden fazla isteÄŸe baÄŸlı nesne";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Bir aÄŸ sorunu nedeniyle dosya alınamadı.";Strings.OfficeOM.L_UserClickIgnore="Kullanıcı iletiÅŸim kutusunu yoksaymayı seçti.";Strings.OfficeOM.L_InvalidApiCallInContext="Geçerli baÄŸlamda geçersiz API çaÄŸrısı.";Strings.OfficeOM.L_CustomFunctionNameCannotSplit="Ä°ÅŸlev adı, boÅŸ olmayan bir ad alanı ve boÅŸ olmayan bir kısa ad içermelidir.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Not: Biçimlendirme API'si çaÄŸrısı tarafından ayarlanan biçimlendirme kümelerinin 100'ün altında olması önerilir.";Strings.OfficeOM.L_SSOConnectionLostErrorMessage="A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Seçim Sınırına Ulaşıldı";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Kullanıcının kimlik türü desteklenmiyor.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage="Bu eklentinin, bu kategoride kullanıcı onayını desteklememesi nedeniyle iÅŸlem baÅŸarısız oldu.";Strings.OfficeOM.L_EventRegistrationError="Olay Kayıt Hatası";Strings.OfficeOM.L_SSOClientError="Office'ten gelen kimlik doÄŸrulaması isteÄŸinde bir hata oluÅŸtu.";Strings.OfficeOM.L_DialogRequireHTTPS="HTTP protokolü desteklenmiyor. Bunun yerine HTTPS kullanın";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="{0} uygulaması mevcut deÄŸil. Microsoft.Office.WebExtension.initialize(reason) çaÄŸrılamadı.";Strings.OfficeOM.L_SettingsAreStale="Ayarlar güncel olmadığından kaydedilemedi.";Strings.OfficeOM.L_DialogInvalidScheme="URL düzeni desteklenmiyor. Bunun yerine HTTPS kullanın.";Strings.OfficeOM.L_InvalidOperationInCellEditMode="Excel, hücre düzenleme modunda. Lütfen ENTER veya SEKME tuÅŸuna basarak ya da baÅŸka bir hücreyi seçerek düzenleme modundan çıkın ve sonra yeniden deneyin.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Yoksay";Strings.OfficeOM.L_CustomFunctionDefinitionMissing="Ä°ÅŸlevin tanımını gösteren ve bu adı taşıyan bir özelliÄŸin Excel.CustomFunctions üzerinde bulunması gerekir.";Strings.OfficeOM.L_SettingNameNotExist="Belirtilen ayar adı mevcut deÄŸil.";Strings.OfficeOM.L_InternalErrorDescription="Dahili bir hata oluÅŸtu.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Ä°zin Ver";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Tarayıcı kısıtlamaları, iletiÅŸim kutusunu oluÅŸturmamızı engelledi. Ä°letiÅŸim kutusu ile eklenti ana bilgisayarının etki alanı, aynı güvenlik bölgesinde deÄŸil.";Strings.OfficeOM.L_BindingCreationError="BaÄŸlama OluÅŸturma Hatası";Strings.OfficeOM.L_NoCapability="Bu eylem için yeterli izne sahip deÄŸilsiniz.";Strings.OfficeOM.L_DocumentReadOnly="Geçerli belge modunda istenen iÅŸleme izin verilmiyor.";Strings.OfficeOM.L_DataWriteReminder="Veri Yazma Anımsatıcısı";Strings.OfficeOM.L_FormatValueOutOfRange="DeÄŸer izin verilen aralığın dışında.";Strings.OfficeOM.L_UnknownBindingType="BaÄŸlama türü desteklenmiyor.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Eklenti zaten bir eriÅŸim belirteci istiyor.";Strings.OfficeOM.L_InvalidArgumentGeneric="Ä°ÅŸleve eklenen bağımsız deÄŸiÅŸkenler, eksik, bu duruma uygun deÄŸil veya doÄŸru biçimde deÄŸil.";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} yeni bir pencere görüntülemek istiyor.";Strings.OfficeOM.L_FunctionCallFailed="{0} iÅŸlev çaÄŸrısı baÅŸarısız oldu, hata kodu: {1}.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Belirtilen satırSayısı veya sütunSayısı deÄŸerleri geçersiz.";Strings.OfficeOM.L_DialogOK="Tamam";Strings.OfficeOM.L_DialogNavigateError="Ä°letiÅŸim Kutusu Gezinti Hatası";Strings.OfficeOM.L_AppNameNotExist="{0} için Eklenti Adı yok.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Veriler Güncel DeÄŸil";Strings.OfficeOM.L_SaveSettingsError="Ayarları Kaydet Hatası";Strings.OfficeOM.L_SetDataParametersConflict="Belirtilen parametreler çakışıyor.";Strings.OfficeOM.L_CustomXmlError="Özel XML Hatası.";Strings.OfficeOM.L_TooManyOptionalFunction="parametre listesinde birden fazla isteÄŸe baÄŸlı nesne";Strings.OfficeOM.L_ConnectionFailureWithDetails="Ä°stek, {0} durum kodu, {1} hata kodu ve {2} hata iletisiyle baÅŸarısız oldu.";Strings.OfficeOM.L_InValidOptionalArgument="geçersiz isteÄŸe baÄŸlı bağımsız deÄŸiÅŸken";Strings.OfficeOM.L_InvalidTableOptionValue="Bir veya daha fazla tableOptions parametresi izin verilmeyen deÄŸerler içeriyor. DeÄŸerleri bir daha kontrol edin ve yeniden deneyin.";Strings.OfficeOM.L_InvalidSetColumns="Belirtilen sütunlar geçersiz.";Strings.OfficeOM.L_InitializeNotReady="Office.js henüz tam olarak yüklenmedi. Lütfen daha sonra tekrar deneyin veya Office.initialize iÅŸlevine baÅŸlatma kodunuzu eklediÄŸinizden emin olun.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Not: Tablodaki hücre sayısının 20.000'in altında olması önerilir.";Strings.OfficeOM.L_CloseFileBeforeRetrieve="BaÅŸka dosya almadan mevcut dosyada closeAsync çaÄŸrısı yapın.";Strings.OfficeOM.L_CoercionTypeNotSupported="Belirtilen zorlama türü desteklenmiyor.";Strings.OfficeOM.L_UnsupportedEnumeration="Desteklenmeyen Listeleme";Strings.OfficeOM.L_MemoryLimit="Bellek Sınırı Aşıldı";Strings.OfficeOM.L_SSOServerErrorMessage="Sunucuda beklenmeyen bir hata oluÅŸtu.";Strings.OfficeOM.L_DataNotMatchCoercionType="Belirtilen veri nesnesi türü geçerli seçimle uyumlu deÄŸil.";Strings.OfficeOM.L_DataNotMatchSelection="SaÄŸlanan veri nesnesi geçerli seçimin ÅŸekil ve boyutlarıyla uyumlu deÄŸil.";Strings.OfficeOM.L_InvalidFormatValue="Bir veya daha fazla biçim parametresi izin verilmeyen deÄŸerler içeriyor. DeÄŸerleri bir daha kontrol edin ve yeniden deneyin.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Eklenti zaten bir eriÅŸim belirteci istediÄŸinden iÅŸlem baÅŸarısız oldu.";Strings.OfficeOM.L_ValueNotLoaded='Sonuç nesnesinin deÄŸeri henüz yüklenmedi. DeÄŸer özelliÄŸini okumadan önce iliÅŸkili istek baÄŸlamında "context.sync()" öğesini çağırın.';Strings.OfficeOM.L_ActivityLimitReached="Etkinlik sınırına ulaşıldı.";Strings.OfficeOM.L_InvalidGrantMessage="Bu eklenti için izin verilmedi.";Strings.OfficeOM.L_InvalidCoercion="Geçersiz Zorlama Türü";Strings.OfficeOM.L_IndexOutOfRange="Dizin aralık dışında.";Strings.OfficeOM.L_TooManyArguments="çok fazla bağımsız deÄŸiÅŸken";Strings.OfficeOM.L_OverwriteWorksheetData="SaÄŸlanan veri nesnesi verilerin üzerine yazılacağından veya veriler deÄŸiÅŸeceÄŸinden ayarlama iÅŸlemi baÅŸarısız oldu.";Strings.OfficeOM.L_UnsupportedDataObject="SaÄŸlanan veri nesnesi türü desteklenmiyor.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="tarayıcınızı yapılandırın";Strings.OfficeOM.L_InvalidRequestContext="Nesne farklı istek baÄŸlamlarında kullanılamıyor.";Strings.OfficeOM.L_InternalError="İç Hata";Strings.OfficeOM.L_SpecifiedIdNotExist="Belirtilen kimlik yok.";Strings.OfficeOM.L_InvalidReadForBlankRow="Belirtilen satır boÅŸ.";Strings.OfficeOM.L_CannotWriteToSelection="Geçerli seçime yazılamıyor.";Strings.OfficeOM.L_MissingRequiredArguments="gerekli olan bazı bağımsız deÄŸiÅŸkenler eksik";Strings.OfficeOM.L_InvalidDataObject="Geçersiz Veri Nesnesi";Strings.OfficeOM.L_RequestTokenUnavailable="API, çaÄŸrı sıkılığını yavaÅŸlatmak amacıyla kısıtlandı.";Strings.OfficeOM.L_NewWindowCrossZone="Tarayıcınızdaki güvenlik ayarları, bir iletiÅŸim kutusu oluÅŸturmamızı engelliyor. Farklı bir tarayıcı deneyin veya '{1}' ile adres çubuÄŸunuzdaki etki alanının aynı güvenlik bölgesinde olması için {0}.";Strings.OfficeOM.L_UserAborted="Kullanıcı, onay isteÄŸini iptal etti.";Strings.OfficeOM.L_DisplayDialogError="Ä°letiÅŸim Kutusu Hatasını Görüntüle";Strings.OfficeOM.L_InvalidColumnsForBinding="Belirtilen sütunlar geçersiz.";Strings.OfficeOM.L_SetDataIsTooLarge="Belirtilen veri nesnesi çok büyük.";Strings.OfficeOM.L_NotSupportedEventType="Belirtilen olay türü {0} desteklenmiyor.";Strings.OfficeOM.L_InvalidParameters="{0} iÅŸlevi geçersiz parametrelere sahip.";Strings.OfficeOM.L_RunMustReturnPromise='".Run" yöntemine geçirilen toplu iÅŸlem iÅŸlevi bir promise döndürmedi. Toplu iÅŸlem tamamlandığında otomatik olarak izlenen nesnelerin serbest bırakılabilmesi için iÅŸlevin bir promise döndürmesi gerekiyor. Bir promise döndürmek için genellikle "context.sync()" yönteminden yanıt döndürülür.';Strings.OfficeOM.L_NotImplemented="{0} iÅŸlevi uygulanmadı.";Strings.OfficeOM.L_DataStale="Veriler Güncel DeÄŸil";Strings.OfficeOM.L_InvalidGetColumns="Belirtilen sütunlar geçersiz.";Strings.OfficeOM.L_InvalidDataFormat="Belirtilen veri nesnesi biçimi geçerli deÄŸil.";Strings.OfficeOM.L_UnsupportedUserIdentity="Kullanıcı kimliÄŸi türü desteklenmiyor.";Strings.OfficeOM.L_PropertyDoesNotExist="'{0}' özelliÄŸi nesnede yok.";Strings.OfficeOM.L_GetSelectionNotSupported="Geçerli seçim desteklenmiyor.";Strings.OfficeOM.L_DialogAlreadyOpened="Bu eklentide zaten etkin bir iletiÅŸim kutusu olduÄŸundan iÅŸlem baÅŸarısız oldu.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Ä°ÅŸlem bu baÄŸlama türünde desteklenmiyor.";Strings.OfficeOM.L_CustomFunctionNameContainsBadChars="Ä°ÅŸlev adı yalnızca harf, rakam, alt çizgi ve nokta içerebilir.";Strings.OfficeOM.L_InvalidApiArgumentsMessage="GiriÅŸ bağımsız deÄŸiÅŸkenleri geçersiz.";Strings.OfficeOM.L_BindingToMultipleSelection="BitiÅŸik olmayan seçimler desteklenmiyor.";Strings.OfficeOM.L_RequestTimeout="ÇaÄŸrı yürütme çok uzun sürdü.";Strings.OfficeOM.L_HostError="Ana Bilgisayar Hatası";Strings.OfficeOM.L_FileTypeNotSupported="Belirtilen dosya türü desteklenmiyor.";Strings.OfficeOM.L_InvalidBinding="Geçersiz BaÄŸlama";Strings.OfficeOM.L_NetworkProblem="AÄŸ Sorunu";Strings.OfficeOM.L_InvalidSetStartRowColumn="Belirtilen satırBaÅŸlat veya sütunBaÅŸlat deÄŸerleri geçersiz.";Strings.OfficeOM.L_InvalidObjectPath='\'{0}\' nesne yolu yapmak istediÄŸiniz iÅŸlem için kullanılamaz. Nesneyi birden çok "context.sync" çaÄŸrısında ve ".run" toplu iÅŸleminin sıralı yürütülmesi dışında kullanıyorsanız, nesnenin yaÅŸam süresini yönetirken lütfen "context.trackedObjects.add()" ve "context.trackedObjects.remove()" yöntemlerini kullanın.';Strings.OfficeOM.L_DialogAddressNotTrusted="URL'nin etki alanı, bildirimdeki AppDomains öğesine eklenmemiÅŸ.";Strings.OfficeOM.L_InvalidSSOAddinMessage="Bu eklenti için kimlik API'si desteklenmiyor.";Strings.OfficeOM.L_OsfControlTypeNotSupported="OsfControl türü desteklenmiyor.";Strings.OfficeOM.L_InvalidGetStartRowColumn="Belirtilen satırBaÅŸlat veya sütunBaÅŸlat deÄŸerleri geçersiz.";Strings.OfficeOM.L_InvalidSelectionForBindingType="BaÄŸlama, geçerli seçim ve belirtilen baÄŸlama türüyle oluÅŸturulamıyor.";Strings.OfficeOM.L_CallbackNotAFunction="{0} türünde olan geri arama, iÅŸlev türünde olmalıdır.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Geçerli seçim belirtilen zorlama türüyle uyumlu deÄŸil.";Strings.OfficeOM.L_DataReadError="Veri Okuma Hatası";Strings.OfficeOM.L_TooManyIncompleteRequests="Önceki çaÄŸrı tamamlanana kadar bekleyin.";Strings.OfficeOM.L_ShuttingDown="Sunucudaki veriler güncel olmadığından, iÅŸlem baÅŸarısız oldu.";Strings.OfficeOM.L_UserAbortedMessage="Kullanıcı, eklenti izinlerini onaylamadı.";Strings.OfficeOM.L_CannotRegisterEvent="Olay iÅŸleyicisi kaydedilemiyor.";Strings.OfficeOM.L_ConnectionFailureWithStatus="Ä°stek, {0} durum koduyla baÅŸarısız oldu.";Strings.OfficeOM.L_InvalidFormat="Geçersiz Biçim Hatası";Strings.OfficeOM.L_RowIndexOutOfRange="Satır dizini deÄŸeri izin verilen aralığın dışında. Satır sayısından az bir deÄŸer (0 veya daha yüksek) kullanın.";Strings.OfficeOM.L_ApiNotFoundDetails="{0} yöntemi veya özelliÄŸi, {2} sürümünüzde kullanılamayan {1} gereksinim kümesinin bir parçasıdır.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Olay iÅŸleyicisi eklenemedi.";Strings.OfficeOM.L_MultipleNamedItemFound="Aynı ada sahip birden çok nesne bulundu.";Strings.OfficeOM.L_Timeout="Ä°ÅŸlem zaman aşımına uÄŸradı.";Strings.OfficeOM.L_ReadSettingsError="Ayarları Oku Hatası";Strings.OfficeOM.L_PermissionDenied="Ä°zin Reddedildi";Strings.OfficeOM.L_NamedItemNotFound="Adlandırılmış öğe mevcut deÄŸil.";Strings.OfficeOM.L_InvalidBindingError="Geçersiz BaÄŸlama Hatası";Strings.OfficeOM.L_SliceSizeNotSupported="Belirtilen dilim boyutu desteklenmiyor.";Strings.OfficeOM.L_ColIndexOutOfRange="Sütun dizini deÄŸeri izin verilen aralığın dışında. Sütun sayısından az bir deÄŸer (0 veya daha yüksek) kullanın.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="Sabit listesi geçerli ana bilgisayar uygulamasında desteklenmiyor.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="Salt okunur olan '{0}' özelliÄŸi ayarlanmaya çalışılıyor.";Strings.OfficeOM.L_NavOutOfBound="Dizin aralık dışında olduÄŸundan iÅŸlem baÅŸarısız oldu.";Strings.OfficeOM.L_BrowserAPINotSupported="Bu tarayıcı istenen API'yi desteklemiyor.";Strings.OfficeOM.L_PropertyNotLoaded="'{0}' özelliÄŸi kullanılamıyor. Özellik deÄŸerini okumadan önce kapsayıcı nesnede load yöntemini ve iliÅŸkili istek baÄŸlamında \"context.sync()\" yöntemini çağırın.";Strings.OfficeOM.L_EventHandlerNotExist="Belirtilen olay türü bu baÄŸlama üzerinde desteklenmiyor." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/tr-tr/outlook_strings.debug.js b/node_modules/@microsoft/office-js/dist/tr-tr/outlook_strings.debug.js index e0a316d..f5bf94f 100644 --- a/node_modules/@microsoft/office-js/dist/tr-tr/outlook_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/tr-tr/outlook_strings.debug.js @@ -1,34 +1,35 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("_u"); _u.ExtensibilityStrings = function() { }; _u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings"); +_u.ExtensibilityStrings.l_InternalFormatError_Text = "Dahili biçim hatası oluÅŸtu."; _u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "SaÄŸlanan bir veya daha fazla e-posta adresi çok uzun."; -_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Ä°letide izin verilen en fazla ek sayısına ulaşıldığı için ek eklenemez"; -_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Ä°stek, 1 MB'lık boyut sınırını aşıyor. Lütfen EWS isteÄŸinizi deÄŸiÅŸtirin."; -_u.ExtensibilityStrings.l_InternalProtocolError_Text = "İç protokol hatası: '{0}'."; -_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "Kullanıcı, veriler eklenirken imlecin yerini deÄŸiÅŸtirdi."; -_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Veri Yazma Hatası"; -_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "Ek kimliÄŸi geçersiz."; -_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Sunucudan tam yanıt veya ilet metni alınırken ek eklenemez."; -_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "Seçili öğe deÄŸiÅŸtirilmiÅŸ."; -_u.ExtensibilityStrings.l_InvalidEndTime_Text = "BitiÅŸ saati baÅŸlangıç saatinden önce olamaz."; -_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "HTML temizlemesi baÅŸarısız oldu."; +_u.ExtensibilityStrings.l_InvalidEventDates_Text = "BitiÅŸ tarihi baÅŸlangıç tarihinden önce girilmiÅŸ."; +_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Öğeye ek eklenemiyor."; _u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Ek dizini bulunamadığı için ek silinemiyor."; -_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "Kullanıcı yükleme tamamlanmadan önce eki kaldırdı."; +_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "HTML temizlemesi baÅŸarısız oldu."; +_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "Kullanıcı, veriler eklenirken imlecin yerini deÄŸiÅŸtirdi."; +_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Ek öğeden silinemiyor."; _u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "Åžu yöntemi çağırmak için yükseltilmiÅŸ izin gerekir: '{0}'."; -_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Ek Hatası"; +_u.ExtensibilityStrings.l_InvalidEndTime_Text = "BitiÅŸ saati baÅŸlangıç saatinden önce olamaz."; _u.ExtensibilityStrings.l_InvalidDate_Text = "GiriÅŸ, geçerli bir tarihe çözümlenemiyor."; +_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "Ek yolu geçersiz."; _u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Office için JavaScript API'sinin korumalı üyelerine eriÅŸmek amacıyla yükseltilmiÅŸ izinler gerekir:."; -_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Alana eklenen toplam alıcı sayısı {0} deÄŸerinden fazla olamaz."; -_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Ek çok büyük olduÄŸu için eklenemiyor."; -_u.ExtensibilityStrings.l_InvalidEventDates_Text = "BitiÅŸ tarihi baÅŸlangıç tarihinden önce girilmiÅŸ."; -_u.ExtensibilityStrings.l_InternalFormatError_Text = "Dahili biçim hatası oluÅŸtu."; -_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Belirtilen parametreler beklenen biçimle eÅŸleÅŸmiyor."; -_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Öğeye ek eklenemiyor."; -_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Ek öğeden silinemiyor."; +_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "Kullanıcı yükleme tamamlanmadan önce eki kaldırdı."; _u.ExtensibilityStrings.l_OffsetNotfound_Text = "Bu zaman damgası için bir uzaklık bulunamadı."; _u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "SaÄŸlanan bir veya daha fazla sayıda görünen ad çok uzun."; +_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Alana eklenen toplam alıcı sayısı {0} deÄŸerinden fazla olamaz."; +_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "Seçili öğe deÄŸiÅŸtirilmiÅŸ."; +_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Belirtilen parametreler beklenen biçimle eÅŸleÅŸmiyor."; +_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Ä°letide izin verilen en fazla ek sayısına ulaşıldığı için ek eklenemez"; +_u.ExtensibilityStrings.l_InternalProtocolError_Text = "İç protokol hatası: '{0}'."; _u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Geçerli alıcı bilgisi saÄŸlanmadı."; -_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "Ek yolu geçersiz." +_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Veri Yazma Hatası"; +_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Ek Hatası"; +_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Ä°stek, 1 MB'lık boyut sınırını aşıyor. Lütfen EWS isteÄŸinizi deÄŸiÅŸtirin."; +_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Sunucudan tam yanıt veya ilet metni alınırken ek eklenemez."; +_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Ek çok büyük olduÄŸu için eklenemiyor."; +_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "Ek kimliÄŸi geçersiz." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/tr-tr/outlook_strings.js b/node_modules/@microsoft/office-js/dist/tr-tr/outlook_strings.js index 1cbdd5e..a2fe4b1 100644 --- a/node_modules/@microsoft/office-js/dist/tr-tr/outlook_strings.js +++ b/node_modules/@microsoft/office-js/dist/tr-tr/outlook_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="SaÄŸlanan bir veya daha fazla e-posta adresi çok uzun.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Ä°letide izin verilen en fazla ek sayısına ulaşıldığı için ek eklenemez";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Ä°stek, 1 MB'lık boyut sınırını aşıyor. Lütfen EWS isteÄŸinizi deÄŸiÅŸtirin.";_u.ExtensibilityStrings.l_InternalProtocolError_Text="İç protokol hatası: '{0}'.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="Kullanıcı, veriler eklenirken imlecin yerini deÄŸiÅŸtirdi.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Veri Yazma Hatası";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="Ek kimliÄŸi geçersiz.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Sunucudan tam yanıt veya ilet metni alınırken ek eklenemez.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Seçili öğe deÄŸiÅŸtirilmiÅŸ.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="BitiÅŸ saati baÅŸlangıç saatinden önce olamaz.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="HTML temizlemesi baÅŸarısız oldu.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Ek dizini bulunamadığı için ek silinemiyor.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="Kullanıcı yükleme tamamlanmadan önce eki kaldırdı.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Åžu yöntemi çağırmak için yükseltilmiÅŸ izin gerekir: '{0}'.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Ek Hatası";_u.ExtensibilityStrings.l_InvalidDate_Text="GiriÅŸ, geçerli bir tarihe çözümlenemiyor.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Office için JavaScript API'sinin korumalı üyelerine eriÅŸmek amacıyla yükseltilmiÅŸ izinler gerekir:.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Alana eklenen toplam alıcı sayısı {0} deÄŸerinden fazla olamaz.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Ek çok büyük olduÄŸu için eklenemiyor.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="BitiÅŸ tarihi baÅŸlangıç tarihinden önce girilmiÅŸ.";_u.ExtensibilityStrings.l_InternalFormatError_Text="Dahili biçim hatası oluÅŸtu.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Belirtilen parametreler beklenen biçimle eÅŸleÅŸmiyor.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Öğeye ek eklenemiyor.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Ek öğeden silinemiyor.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Bu zaman damgası için bir uzaklık bulunamadı.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="SaÄŸlanan bir veya daha fazla sayıda görünen ad çok uzun.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Geçerli alıcı bilgisi saÄŸlanmadı.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="Ek yolu geçersiz." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_InternalFormatError_Text="Dahili biçim hatası oluÅŸtu.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="SaÄŸlanan bir veya daha fazla e-posta adresi çok uzun.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="BitiÅŸ tarihi baÅŸlangıç tarihinden önce girilmiÅŸ.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Öğeye ek eklenemiyor.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Ek dizini bulunamadığı için ek silinemiyor.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="HTML temizlemesi baÅŸarısız oldu.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="Kullanıcı, veriler eklenirken imlecin yerini deÄŸiÅŸtirdi.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Ek öğeden silinemiyor.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Åžu yöntemi çağırmak için yükseltilmiÅŸ izin gerekir: '{0}'.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="BitiÅŸ saati baÅŸlangıç saatinden önce olamaz.";_u.ExtensibilityStrings.l_InvalidDate_Text="GiriÅŸ, geçerli bir tarihe çözümlenemiyor.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="Ek yolu geçersiz.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Office için JavaScript API'sinin korumalı üyelerine eriÅŸmek amacıyla yükseltilmiÅŸ izinler gerekir:.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="Kullanıcı yükleme tamamlanmadan önce eki kaldırdı.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Bu zaman damgası için bir uzaklık bulunamadı.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="SaÄŸlanan bir veya daha fazla sayıda görünen ad çok uzun.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Alana eklenen toplam alıcı sayısı {0} deÄŸerinden fazla olamaz.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Seçili öğe deÄŸiÅŸtirilmiÅŸ.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Belirtilen parametreler beklenen biçimle eÅŸleÅŸmiyor.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Ä°letide izin verilen en fazla ek sayısına ulaşıldığı için ek eklenemez";_u.ExtensibilityStrings.l_InternalProtocolError_Text="İç protokol hatası: '{0}'.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Geçerli alıcı bilgisi saÄŸlanmadı.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Veri Yazma Hatası";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Ek Hatası";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Ä°stek, 1 MB'lık boyut sınırını aşıyor. Lütfen EWS isteÄŸinizi deÄŸiÅŸtirin.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Sunucudan tam yanıt veya ilet metni alınırken ek eklenemez.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Ek çok büyük olduÄŸu için eklenemiyor.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="Ek kimliÄŸi geçersiz." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/uk-ua/office_strings.debug.js b/node_modules/@microsoft/office-js/dist/uk-ua/office_strings.debug.js index 17470ac..c20ca35 100644 --- a/node_modules/@microsoft/office-js/dist/uk-ua/office_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/uk-ua/office_strings.debug.js @@ -1,179 +1,190 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("Strings"); Strings.OfficeOM = function() { }; Strings.OfficeOM.registerClass("Strings.OfficeOM"); -Strings.OfficeOM.L_DataNotMatchCoercionType = "Тип указаного об’єкта даних неÑуміÑний із поточним виділеннÑм."; -Strings.OfficeOM.L_InvalidReadForBlankRow = "Указаний Ñ€Ñдок порожній."; -Strings.OfficeOM.L_NotSupported = "Ð¤ÑƒÐ½ÐºÑ†Ñ–Ñ {0} не підтримуєтьÑÑ."; -Strings.OfficeOM.L_TooManyOptionalObjects = "у ÑпиÑку параметрів кілька необов’Ñзкових об’єктів"; -Strings.OfficeOM.L_AppNameNotExist = "Ðазва надбудови Ð´Ð»Ñ {0} не Ñ–Ñнує."; -Strings.OfficeOM.L_InvalidResourceUrl = "Указано неприпуÑтиму URL-адреÑу реÑурÑу програми."; -Strings.OfficeOM.L_UnsupportedEnumeration = "Ðепідтримуване переліченнÑ"; -Strings.OfficeOM.L_DialogNavigateError = "Помилка переходу діалогового вікна"; -Strings.OfficeOM.L_UserAborted = "КориÑтувач перервав запит на згоду."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Ðадбудова вже запитує маркер доÑтупу."; -Strings.OfficeOM.L_DisplayDialogError = "Помилка Ð²Ñ–Ð´Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð½Ñ Ð´Ñ–Ð°Ð»Ð¾Ð³Ð¾Ð²Ð¾Ð³Ð¾ вікна"; -Strings.OfficeOM.L_InvalidResourceUrlMessage = "У маніфеÑÑ‚Ñ– вказано неприпуÑтиму URL-адреÑу реÑурÑу."; -Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Параметри координати не підлÑгають викориÑтанню з таблицею типу приведеннÑ, коли вона міÑтить злиті клітинки."; -Strings.OfficeOM.L_InvalidRequestContext = "Ðе можна викориÑтовувати цей об’єкт у різних контекÑтах запитів."; -Strings.OfficeOM.L_OperationNotSupported = "ÐžÐ¿ÐµÑ€Ð°Ñ†Ñ–Ñ Ð½Ðµ підтримуєтьÑÑ."; -Strings.OfficeOM.L_BrowserAPINotSupported = "Цей браузер не підтримує запитаний API."; -Strings.OfficeOM.L_InvalidCellsValue = "Принаймні один параметр клітинок має неприпуÑтиме значеннÑ. Перевірте Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ– Ñпробуйте ще раз."; -Strings.OfficeOM.L_PropertyNotLoaded = 'ВлаÑтивіÑÑ‚ÑŒ "{0}" недоÑтупна. Перш ніж прочитати Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ–, викличте метод Ð·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶ÐµÐ½Ð½Ñ (load) Ð´Ð»Ñ Ð¾Ð±â€™Ñ”ÐºÑ‚Ð°, що Ñ—Ñ— міÑтить, Ñ– викличте функцію "context.sync()" Ð´Ð»Ñ ÐºÐ¾Ð½Ñ‚ÐµÐºÑту пов’Ñзаного запиту.'; -Strings.OfficeOM.L_EventHandlerAdditionFailed = "Ðе вдалоÑÑ Ð´Ð¾Ð´Ð°Ñ‚Ð¸ обробник подій."; -Strings.OfficeOM.L_UnknownBindingType = "Тип зв’ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ðµ підтримуєтьÑÑ."; -Strings.OfficeOM.L_InvalidParameters = "Ð¤ÑƒÐ½ÐºÑ†Ñ–Ñ {0} має неприпуÑтимі параметри."; -Strings.OfficeOM.L_TooManyArguments = "забагато аргументів"; -Strings.OfficeOM.L_APICallFailed = "Ðе вдалоÑÑ Ð·Ð´Ñ–Ð¹Ñнити виклик API"; -Strings.OfficeOM.L_InvalidBinding = "ÐеприпуÑтиме зв’ÑзуваннÑ"; -Strings.OfficeOM.L_FunctionCallFailed = "Ðе вдалоÑÑ Ð²Ð¸ÐºÐ»Ð¸ÐºÐ°Ñ‚Ð¸ функцію {0}. Код помилки: {1}."; -Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = 'Триває Ñпроба налаштувати доÑтупну тільки Ð´Ð»Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð²Ð»Ð°ÑтивіÑÑ‚ÑŒ "{0}".'; -Strings.OfficeOM.L_DialogAlreadyOpened = "Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ операцію, тому що Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— надбудови активовано діалогове вікно."; -Strings.OfficeOM.L_DataWriteError = "Помилка запиÑÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ…"; -Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "ПропуÑтити"; -Strings.OfficeOM.L_InvalidGetStartRowColumn = "Указані Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ startRow або startColumn неприпуÑтимі."; -Strings.OfficeOM.L_UnsupportedDataObject = "Ðаданий тип об’єкта даних не підтримуєтьÑÑ."; -Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Указаний тип зв’ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ Ð½ÐµÑуміÑний із наданим іменованим елементом."; -Strings.OfficeOM.L_InvalidFormatValue = "Принаймні один параметр формату має неприпуÑтиме значеннÑ. Перевірте Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ– Ñпробуйте ще раз."; -Strings.OfficeOM.L_RunMustReturnPromise = 'Пакетна функціÑ, передана методу ".run", не повернула зобов’ÑзаннÑ. Ð¦Ñ Ñ„ÑƒÐ½ÐºÑ†Ñ–Ñ Ð¼Ð°Ñ” повернути зобов’ÑзаннÑ, щоб уÑÑ– автоматично відÑтежувані об’єкти можна було вивільнити в момент Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð¾Ð±Ñ€Ð¾Ð±ÐºÐ¸ пакета. Зазвичай зобов’ÑÐ·Ð°Ð½Ð½Ñ â€“ це відповідь, Ñку повернула Ñ„ÑƒÐ½ÐºÑ†Ñ–Ñ "context.sync()".'; -Strings.OfficeOM.L_RedundantCallbackSpecification = "Зворотній виклик не можна вказати одночаÑно у ÑпиÑку аргументів Ñ– Ñк додатковий об’єкт."; -Strings.OfficeOM.L_InternalError = "Ð’Ð½ÑƒÑ‚Ñ€Ñ–ÑˆÐ½Ñ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ°"; -Strings.OfficeOM.L_DataReadError = "Помилка Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ…"; -Strings.OfficeOM.L_GetDataIsTooLarge = "Запитаний набір даних завеликий."; -Strings.OfficeOM.L_SelectionCannotBound = "Ðе вдалоÑÑ Ð·Ð²â€™Ñзати з поточним виділеннÑм."; -Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Примітка: рекомендована кількіÑÑ‚ÑŒ наборів форматуваннÑ, Ñтворених за допомогою виклику API форматуваннÑ, – не більше 100."; -Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Указаний тип Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð½ÐµÑуміÑний з указаним типом зв’ÑзуваннÑ."; -Strings.OfficeOM.L_NotSupportedEventType = "Указаний тип події {0} не підтримуєтьÑÑ."; -Strings.OfficeOM.L_SSOClientError = "СталаÑÑ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ° під Ñ‡Ð°Ñ Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ Ð·Ð°Ð¿Ð¸Ñ‚Ñƒ автентифікації з Office."; Strings.OfficeOM.L_ReadSettingsError = "Помилка Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð½Ð°Ñтройок"; -Strings.OfficeOM.L_FormatValueOutOfRange = "Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿ÐµÑ€ÐµÐ±ÑƒÐ²Ð°Ñ” за межами припуÑтимого діапазону."; -Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Указані Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ rowCount або columnCount неприпуÑтимі."; -Strings.OfficeOM.L_DataNotMatchSelection = "Ðаданий об’єкт даних неÑуміÑний із фігурою або розмірами поточного виділеннÑ."; -Strings.OfficeOM.L_NamedItemNotFound = "Іменований елемент не Ñ–Ñнує."; -Strings.OfficeOM.L_InvalidTableOptionValue = "Принаймні один параметр tableOptions має неприпуÑтиме значеннÑ. Перевірте Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ– Ñпробуйте ще раз."; -Strings.OfficeOM.L_InvalidApiCallInContext = "ÐеприпуÑтимий виклик API Ð´Ð»Ñ Ð¿Ð¾Ñ‚Ð¾Ñ‡Ð½Ð¾Ð³Ð¾ контекÑту."; -Strings.OfficeOM.L_SettingsStaleError = "Помилка заÑтарілих наÑтройок"; -Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "ÐžÐ¿ÐµÑ€Ð°Ñ†Ñ–Ñ Ð½Ðµ підтримуєтьÑÑ Ñ†Ð¸Ð¼ типом зв’ÑзуваннÑ."; +Strings.OfficeOM.L_CannotRegisterEvent = "Ðе вдалоÑÑ Ð·Ð°Ñ€ÐµÑ”Ñтрувати обробник подій."; +Strings.OfficeOM.L_DialogInvalidScheme = "Ð¦Ñ URL-Ñхема не підтримуєтьÑÑ. ЗаміÑÑ‚ÑŒ неї Ñлід викориÑтовувати HTTPS."; +Strings.OfficeOM.L_MemoryLimit = "Перевищено Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ Ð¿Ð°Ð¼â€™ÑÑ‚Ñ–"; +Strings.OfficeOM.L_SSOServerErrorMessage = "СталаÑÑ Ð½ÐµÐ¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð° помилка на Ñервері."; Strings.OfficeOM.L_InvalidGetColumns = "Указані Ñтовпці неприпуÑтимі."; -Strings.OfficeOM.L_CustomXmlOutOfDateName = "Дані заÑтаріли"; -Strings.OfficeOM.L_TooManyIncompleteRequests = "ДочекайтеÑÑ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð¿Ð¾Ð¿ÐµÑ€ÐµÐ´Ð½ÑŒÐ¾Ð³Ð¾ виклику."; -Strings.OfficeOM.L_InvalidArgument = 'Ðргумент "{0}" відÑутній, має неправильний формат, або його не можна викориÑтовувати в цій Ñитуації.'; -Strings.OfficeOM.L_ElementMissing = "Ðе вдалоÑÑ Ð²Ñ–Ð´Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚ÑƒÐ²Ð°Ñ‚Ð¸ клітинку таблиці, оÑкільки відÑутні деÑкі Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ñ–Ð². Перевірте параметри та Ñпробуйте ще раз."; -Strings.OfficeOM.L_ShowWindowDialogNotification = "Ðадбудові {0} потрібно відкрити нове вікно."; -Strings.OfficeOM.L_FormattingReminder = "ÐÐ°Ð³Ð°Ð´ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¾ форматуваннÑ"; -Strings.OfficeOM.L_InvalidSSOAddinMessage = "Ð†Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ API ідентичноÑÑ‚Ñ– не підтримуєтьÑÑ Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— надбудови."; -Strings.OfficeOM.L_NavOutOfBound = "Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ операцію, оÑкільки Ñ–Ð½Ð´ÐµÐºÑ Ð¿Ð¾Ð·Ð° межами діапазону."; -Strings.OfficeOM.L_DataNotMatchBindingSize = "Ðаданий об’єкт даних не відповідає розміру поточного виділеннÑ."; -Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "налаштуйте Ñвій браузер"; -Strings.OfficeOM.L_InvalidSetColumns = "Указані Ñтовпці неприпуÑтимі."; -Strings.OfficeOM.L_DataStale = "Дані заÑтаріли"; -Strings.OfficeOM.L_InvalidGrant = "ВідÑутні попередні відомоÑÑ‚Ñ– авторизації."; -Strings.OfficeOM.L_SSOClientErrorMessage = "СталаÑÑ Ð½ÐµÐ¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð° помилка в клієнті."; -Strings.OfficeOM.L_UserClickIgnore = "КориÑтувач вирішив пропуÑтити діалогове вікно."; -Strings.OfficeOM.L_InValidOptionalArgument = "неприпуÑтимий необов’Ñзковий аргумент"; -Strings.OfficeOM.L_CoercionTypeNotSupported = "Указаний тип Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð½Ðµ підтримуєтьÑÑ."; -Strings.OfficeOM.L_NoCapability = "У Ð²Ð°Ñ Ð½ÐµÐ´Ð¾Ñтатньо дозволів Ð´Ð»Ñ Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ Ñ†Ñ–Ñ”Ñ— дії."; -Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Ці дані заÑтарілі. Отримайте об’єкт ще раз."; -Strings.OfficeOM.L_CustomXmlError = "Помилка наÑтроюваного XML."; -Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Вибраний вміÑÑ‚ має бути у форматі таблиці. Відформатуйте дані Ñк таблицю та повторіть Ñпробу."; -Strings.OfficeOM.L_SetDataParametersConflict = "Указані параметри конфліктують."; -Strings.OfficeOM.L_InvalidGrantMessage = "Ð”Ð»Ñ Ñ†Ñ–Ñ”Ñ— надбудови не надано дозволи."; -Strings.OfficeOM.L_RequestTimeout = "Виклик тривав занадто довго, тому не вдалоÑÑ Ð¹Ð¾Ð³Ð¾ виконати."; +Strings.OfficeOM.L_DataReadError = "Помилка Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ…"; +Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Вибрано макÑимальну кількіÑÑ‚ÑŒ елементів"; Strings.OfficeOM.L_MissingParameter = "ВідÑутній параметр"; -Strings.OfficeOM.L_BindingCreationError = "Помилка ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð·Ð²â€™ÑзуваннÑ"; +Strings.OfficeOM.L_InitializeNotReady = "Office.js ще не повніÑÑ‚ÑŽ завантажено. Повторіть Ñпробу пізніше або переконайтеÑÑ, що ви додали код ініціалізації до функції Office.initialize."; +Strings.OfficeOM.L_CustomFunctionNameCannotSplit = "Ð†Ð¼â€™Ñ Ñ„ÑƒÐ½ÐºÑ†Ñ–Ñ— має міÑтити непуÑтий проÑÑ‚Ñ–Ñ€ імен Ñ– непуÑте коротке ім’Ñ."; +Strings.OfficeOM.L_MultipleNamedItemFound = "Знайдено кілька об’єктів з однаковим іменем."; +Strings.OfficeOM.L_FunctionCallFailed = "Ðе вдалоÑÑ Ð²Ð¸ÐºÐ»Ð¸ÐºÐ°Ñ‚Ð¸ функцію {0}. Код помилки: {1}."; +Strings.OfficeOM.L_SettingsAreStale = "Ðе вдалоÑÑ Ð·Ð±ÐµÑ€ÐµÐ³Ñ‚Ð¸ наÑтройки, тому що вони заÑтаріли."; +Strings.OfficeOM.L_RequestTimeout = "Виклик тривав занадто довго, тому не вдалоÑÑ Ð¹Ð¾Ð³Ð¾ виконати."; +Strings.OfficeOM.L_InvalidBinding = "ÐеприпуÑтиме зв’ÑзуваннÑ"; +Strings.OfficeOM.L_InvalidParameters = "Ð¤ÑƒÐ½ÐºÑ†Ñ–Ñ {0} має неприпуÑтимі параметри."; Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Тип ідентичноÑÑ‚Ñ– кориÑтувача не підтримуєтьÑÑ."; -Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Параметри координати не підлÑгають викориÑтанню з таблицею типу приведеннÑ, коли вона міÑтить злиті клітинки."; -Strings.OfficeOM.L_NewWindowCrossZone = 'Ðе вдалоÑÑ Ñтворити діалогове вікно через параметри безпеки вашого браузера. СкориÑтайтеÑÑŒ іншим браузером, або {0} так, щоб домен "{1}" Ñ– домен, Ñкий відображаєтьÑÑ Ð² адреÑному Ñ€Ñдку, перебували в одній зоні безпеки.'; -Strings.OfficeOM.L_InvalidApiArgumentsMessage = "ÐеприпуÑтимі вхідні аргументи."; -Strings.OfficeOM.L_BindingToMultipleSelection = "ПереривчаÑÑ‚Ñ– Ð²Ð¸Ð´Ñ–Ð»ÐµÐ½Ð½Ñ Ð½Ðµ підтримуютьÑÑ."; -Strings.OfficeOM.L_NotSupportedBindingType = "Указаний тип зв’ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ {0} не підтримуєтьÑÑ."; -Strings.OfficeOM.L_GetDataParametersConflict = "Указані параметри конфліктують."; -Strings.OfficeOM.L_DataNotMatchBindingType = "Указаний об’єкт даних неÑуміÑний із типом зв’ÑзуваннÑ."; Strings.OfficeOM.L_DialogRequireHTTPS = "Протокол HTTP не підтримуєтьÑÑ. ЗаміÑÑ‚ÑŒ нього Ñлід викориÑтовувати HTTPS."; -Strings.OfficeOM.L_NetworkProblem = "Проблема мережі"; -Strings.OfficeOM.L_CannotWriteToSelection = "Ðе вдалоÑÑ Ð·Ð°Ð¿Ð¸Ñати до поточного виділеннÑ."; -Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = 'Ðе можна заÑтоÑувати зміни влаÑтивоÑÑ‚Ñ– "{0}" за допомогою методу "object.set".'; -Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Виконайте команду closeAsync Ð´Ð»Ñ Ð¿Ð¾Ñ‚Ð¾Ñ‡Ð½Ð¾Ð³Ð¾ файлу, перш ніж отримати наÑтупний."; -Strings.OfficeOM.L_InvalidSetStartRowColumn = "Указані Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ startRow або startColumn неприпуÑтимі."; -Strings.OfficeOM.L_SettingsAreStale = "Ðе вдалоÑÑ Ð·Ð±ÐµÑ€ÐµÐ³Ñ‚Ð¸ наÑтройки, тому що вони заÑтаріли."; -Strings.OfficeOM.L_ActivityLimitReached = "ДоÑÑгнуто Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ Ð½Ð° кількіÑÑ‚ÑŒ дій."; -Strings.OfficeOM.L_InvalidBindingOperation = "ÐеприпуÑтима Ð¾Ð¿ÐµÑ€Ð°Ñ†Ñ–Ñ Ð·Ð²â€™ÑзуваннÑ"; -Strings.OfficeOM.L_SaveSettingsError = "Помилка Ð·Ð±ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ Ð½Ð°Ñтройок"; +Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Ðе вдалоÑÑ Ñтворити діалогове вікно через Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ Ð±Ñ€Ð°ÑƒÐ·ÐµÑ€Ð°. Домен діалогового вікна та домен хоÑта надбудови перебувають у різних зонах безпеки."; +Strings.OfficeOM.L_OverwriteWorksheetData = "Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ операцію вÑтановленнÑ, тому що наданий об’єкт даних перезапише або зÑуне дані."; +Strings.OfficeOM.L_RequestTokenUnavailable = "Цей API наÑтроєно, щоб знизити чаÑтоту викликів."; +Strings.OfficeOM.L_CustomXmlError = "Помилка наÑтроюваного XML."; +Strings.OfficeOM.L_CallbackNotAFunction = "Зворотній виклик має бути функцією, а не {0}."; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage = "Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ операцію, тому що Ñ†Ñ Ð½Ð°Ð´Ð±ÑƒÐ´Ð¾Ð²Ð° не підтримує згоду кориÑтувача в цій категорії"; +Strings.OfficeOM.L_ConnectionFailureWithStatus = "Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ запит. Код Ñтану: {0}."; Strings.OfficeOM.L_InvalidValue = "ÐеприпуÑтиме значеннÑ"; -Strings.OfficeOM.L_ShuttingDown = "Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ операцію, тому що дані на Ñервері заÑтаріли."; -Strings.OfficeOM.L_CannotNavigateTo = "Об’єкт розташовано там, де не підтримуєтьÑÑ Ð½Ð°Ð²Ñ–Ð³Ð°Ñ†Ñ–Ñ."; -Strings.OfficeOM.L_GetSelectionNotSupported = "Поточне Ð²Ð¸Ð´Ñ–Ð»ÐµÐ½Ð½Ñ Ð½Ðµ підтримуєтьÑÑ."; -Strings.OfficeOM.L_MissingRequiredArguments = "відÑутні кілька обов’Ñзкових аргументів"; -Strings.OfficeOM.L_InvalidGetRows = "Указані Ñ€Ñдки неприпуÑтимі."; +Strings.OfficeOM.L_EventHandlerAdditionFailed = "Ðе вдалоÑÑ Ð´Ð¾Ð´Ð°Ñ‚Ð¸ обробник подій."; +Strings.OfficeOM.L_InternalErrorDescription = "СталаÑÑ Ð²Ð½ÑƒÑ‚Ñ€Ñ–ÑˆÐ½Ñ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ°."; +Strings.OfficeOM.L_SelectionCannotBound = "Ðе вдалоÑÑ Ð·Ð²â€™Ñзати з поточним виділеннÑм."; +Strings.OfficeOM.L_InvalidObjectPath = 'ШлÑÑ… до об’єкта "{0}" не підходить Ð´Ð»Ñ Ð´Ñ–Ñ—, Ñку ви намагаєтеÑÑŒ виконати. Якщо ви викориÑтовуєте цей об’єкт у кількох викликах "context.sync" за межами поÑлідовного Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ Ð¿Ð°ÐºÐµÑ‚Ð° ".run", ÑкориÑтайтеÑÑ Ñ„ÑƒÐ½ÐºÑ†Ñ–Ñми "context.trackedObjects.add()" Ñ– "context.trackedObjects.remove()", щоб керувати чаÑом Ð¶Ð¸Ñ‚Ñ‚Ñ Ð¾Ð±â€™Ñ”ÐºÑ‚Ð°.'; +Strings.OfficeOM.L_InvalidNode = "ÐеприпуÑтимий вузол"; +Strings.OfficeOM.L_InvalidSetColumns = "Указані Ñтовпці неприпуÑтимі."; +Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Програма {0} не Ñ–Ñнує. Ðе вдалоÑÑ Ð²Ð¸ÐºÐ»Ð¸ÐºÐ°Ñ‚Ð¸ Ñлужбу Microsoft.Office.WebExtension.initialize(reason)."; +Strings.OfficeOM.L_DataNotMatchBindingSize = "Ðаданий об’єкт даних не відповідає розміру поточного виділеннÑ."; +Strings.OfficeOM.L_InvalidFormat = "Помилка неприпуÑтимого формату"; +Strings.OfficeOM.L_DataWriteReminder = "ÐÐ°Ð³Ð°Ð´ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¾ запиÑÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ…"; +Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Указаний тип зв’ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ Ð½ÐµÑуміÑний із наданим іменованим елементом."; Strings.OfficeOM.L_ConnectionFailureWithDetails = "Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ запит. Код Ñтану: {0}; код помилки: {1}; Ð¿Ð¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ð¿Ñ€Ð¾ помилку: {2}. "; Strings.OfficeOM.L_OutOfRange = "За межами діапазону"; -Strings.OfficeOM.L_TooManyOptionalFunction = "у ÑпиÑку параметрів кілька необов’Ñзкових функцій"; -Strings.OfficeOM.L_InvalidDataObject = "ÐеприпуÑтимий об’єкт даних"; -Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Дозволити"; +Strings.OfficeOM.L_DialogAlreadyOpened = "Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ операцію, тому що Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— надбудови активовано діалогове вікно."; +Strings.OfficeOM.L_NetworkProblem = "Проблема мережі"; +Strings.OfficeOM.L_SaveSettingsError = "Помилка Ð·Ð±ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ Ð½Ð°Ñтройок"; +Strings.OfficeOM.L_MissingRequiredArguments = "відÑутні кілька обов’Ñзкових аргументів"; +Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "Примітка: рекомендована кількіÑÑ‚ÑŒ наборів форматуваннÑ, Ñтворених за допомогою виклику API форматуваннÑ, – не більше 100."; +Strings.OfficeOM.L_CustomXmlNodeNotFound = "Ðе вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ вказаний вузол."; +Strings.OfficeOM.L_InvalidBindingOperation = "ÐеприпуÑтима Ð¾Ð¿ÐµÑ€Ð°Ñ†Ñ–Ñ Ð·Ð²â€™ÑзуваннÑ"; +Strings.OfficeOM.L_InvalidApiCallInContext = "ÐеприпуÑтимий виклик API Ð´Ð»Ñ Ð¿Ð¾Ñ‚Ð¾Ñ‡Ð½Ð¾Ð³Ð¾ контекÑту."; +Strings.OfficeOM.L_InvalidRequestContext = "Ðе можна викориÑтовувати цей об’єкт у різних контекÑтах запитів."; +Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "Параметр XPath дозволÑÑ” вибрати до 1024 елементів."; +Strings.OfficeOM.L_DataStale = "Дані заÑтаріли"; +Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Ðадбудова вже запитує маркер доÑтупу."; +Strings.OfficeOM.L_SSOServerError = "СталаÑÑ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ° поÑтачальника автентифікації."; +Strings.OfficeOM.L_SpecifiedIdNotExist = "Указаний ідентифікатор не Ñ–Ñнує."; +Strings.OfficeOM.L_CustomFunctionNameContainsBadChars = "Ð†Ð¼â€™Ñ Ñ„ÑƒÐ½ÐºÑ†Ñ–Ñ— може міÑтити лише літери, цифри, підкреÑÐ»ÐµÐ½Ð½Ñ Ñ‚Ð° крапки."; +Strings.OfficeOM.L_DialogOK = "OK"; +Strings.OfficeOM.L_CoercionTypeNotSupported = "Указаний тип Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð½Ðµ підтримуєтьÑÑ."; +Strings.OfficeOM.L_PropertyDoesNotExist = 'ВлаÑтивоÑÑ‚Ñ– "{0}" немає в об’єкті.'; Strings.OfficeOM.L_PermissionDenied = "Відмовлено в дозволі"; -Strings.OfficeOM.L_InvalidBindingError = "Помилка неприпуÑтимого зв’ÑзуваннÑ"; -Strings.OfficeOM.L_CannotRegisterEvent = "Ðе вдалоÑÑ Ð·Ð°Ñ€ÐµÑ”Ñтрувати обробник подій."; -Strings.OfficeOM.L_InvalidArgumentGeneric = "Передані функції документи відÑутні, не підходÑÑ‚ÑŒ Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— Ñитуації або мають неправильний формат."; +Strings.OfficeOM.L_ValueNotLoaded = 'Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ€ÐµÐ·ÑƒÐ»ÑŒÑ‚ÑƒÑŽÑ‡Ð¾Ð³Ð¾ об’єкта ще на завантажено. Перш ніж прочитати влаÑтивіÑÑ‚ÑŒ значеннÑ, викличте функцію "context.sync()" Ð´Ð»Ñ ÐºÐ¾Ð½Ñ‚ÐµÐºÑту пов’Ñзаного вміÑту.'; +Strings.OfficeOM.L_InvalidOrTimedOutSession = "Ð¡ÐµÐ°Ð½Ñ Ð½ÐµÐ¿Ñ€Ð¸Ð¿ÑƒÑтимий, або Ñ‡Ð°Ñ Ð¹Ð¾Ð³Ð¾ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐ¸Ð²ÑÑ"; +Strings.OfficeOM.L_UnsupportedEnumerationMessage = "ÐŸÐµÑ€ÐµÐ»Ñ–Ñ‡ÐµÐ½Ð½Ñ Ð½Ðµ підтримуєтьÑÑ Ð² поточній хоÑÑ‚-програмі."; +Strings.OfficeOM.L_DataNotMatchSelection = "Ðаданий об’єкт даних неÑуміÑний із фігурою або розмірами поточного виділеннÑ."; +Strings.OfficeOM.L_RedundantCallbackSpecification = "Зворотній виклик не можна вказати одночаÑно у ÑпиÑку аргументів Ñ– Ñк додатковий об’єкт."; Strings.OfficeOM.L_SliceSizeNotSupported = "Указаний розмір роздільника не підтримуєтьÑÑ."; -Strings.OfficeOM.L_InvalidDataFormat = "ÐеприпуÑтимий формат указаного об’єкта даних."; -Strings.OfficeOM.L_OsfControlTypeNotSupported = "Тип OsfControl не підтримуєтьÑÑ."; -Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "Параметр XPath дозволÑÑ” вибрати до 1024 елементів."; +Strings.OfficeOM.L_CustomFunctionDefinitionMissing = "ВлаÑтивіÑÑ‚ÑŒ із таким іменем, Ñка предÑтавлÑÑ” Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ„ÑƒÐ½ÐºÑ†Ñ–Ñ—, має Ñ–Ñнувати в Excel.CustomFunctions."; +Strings.OfficeOM.L_InvalidGrant = "ВідÑутні попередні відомоÑÑ‚Ñ– авторизації."; +Strings.OfficeOM.L_InvalidGrantMessage = "Ð”Ð»Ñ Ñ†Ñ–Ñ”Ñ— надбудови не надано дозволи."; +Strings.OfficeOM.L_NotSupportedEventType = "Указаний тип події {0} не підтримуєтьÑÑ."; +Strings.OfficeOM.L_CannotWriteToSelection = "Ðе вдалоÑÑ Ð·Ð°Ð¿Ð¸Ñати до поточного виділеннÑ."; +Strings.OfficeOM.L_EventRegistrationError = "Помилка реєÑтрації події"; Strings.OfficeOM.L_ColIndexOutOfRange = "Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ–Ð½Ð´ÐµÐºÑу ÑÑ‚Ð¾Ð²Ð¿Ñ†Ñ Ð¿ÐµÑ€ÐµÐ±ÑƒÐ²Ð°Ñ” за межами припуÑтимого діапазону. Укажіть Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ (0 або більше), менше кількоÑÑ‚Ñ– Ñтовпців."; -Strings.OfficeOM.L_CustomXmlNodeNotFound = "Ðе вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ вказаний вузол."; -Strings.OfficeOM.L_APINotSupported = "API не підтримуєтьÑÑ"; -Strings.OfficeOM.L_InvalidColumnsForBinding = "Указані Ñтовпці неприпуÑтимі."; -Strings.OfficeOM.L_OverwriteWorksheetData = "Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ операцію вÑтановленнÑ, тому що наданий об’єкт даних перезапише або зÑуне дані."; -Strings.OfficeOM.L_DocumentReadOnly = "ОпераціÑ, на Ñку Ñтворено запит, заборонена Ð´Ð»Ñ Ð¿Ð¾Ñ‚Ð¾Ñ‡Ð½Ð¾Ð³Ð¾ режиму документа."; -Strings.OfficeOM.L_UnsupportedEnumerationMessage = "ÐŸÐµÑ€ÐµÐ»Ñ–Ñ‡ÐµÐ½Ð½Ñ Ð½Ðµ підтримуєтьÑÑ Ð² поточній хоÑÑ‚-програмі."; -Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Програма {0} не Ñ–Ñнує. Ðе вдалоÑÑ Ð²Ð¸ÐºÐ»Ð¸ÐºÐ°Ñ‚Ð¸ Ñлужбу Microsoft.Office.WebExtension.initialize(reason)."; -Strings.OfficeOM.L_InternalErrorDescription = "СталаÑÑ Ð²Ð½ÑƒÑ‚Ñ€Ñ–ÑˆÐ½Ñ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ°."; -Strings.OfficeOM.L_UserAbortedMessage = "КориÑтувач не погодивÑÑ Ð· дозволами надбудови."; -Strings.OfficeOM.L_SSOServerError = "СталаÑÑ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ° поÑтачальника автентифікації."; -Strings.OfficeOM.L_Timeout = "Ð§Ð°Ñ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ñ–Ñ— завершивÑÑ."; -Strings.OfficeOM.L_SSOServerErrorMessage = "СталаÑÑ Ð½ÐµÐ¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð° помилка на Ñервері."; -Strings.OfficeOM.L_CallbackNotAFunction = "Зворотній виклик має бути функцією, а не {0}."; +Strings.OfficeOM.L_OsfControlTypeNotSupported = "Тип OsfControl не підтримуєтьÑÑ."; +Strings.OfficeOM.L_CustomFunctionImplementationMissing = 'ВлаÑтивіÑÑ‚ÑŒ із таким іменем в Excel.CustomFunctions, Ñка предÑтавлÑÑ” Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ„ÑƒÐ½ÐºÑ†Ñ–Ñ—, має міÑтити влаÑтивіÑÑ‚ÑŒ "call", що впроваджує функцію.'; Strings.OfficeOM.L_InvalidSelectionForBindingType = "Ðеможливо Ñтворити зв’ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ Ð· поточним виділеннÑм Ñ– вказаним типом."; -Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Примітка: рекомендована кількіÑÑ‚ÑŒ клітинок у таблиці – менше 20 000."; -Strings.OfficeOM.L_InvalidFormat = "Помилка неприпуÑтимого формату"; -Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ цю операцію, тому що Ñ†Ñ Ð½Ð°Ð´Ð±ÑƒÐ´Ð¾Ð²Ð° вже запитує маркер доÑтупу."; -Strings.OfficeOM.L_SettingsCannotSave = "Ðе вдалоÑÑ Ð·Ð±ÐµÑ€ÐµÐ³Ñ‚Ð¸ наÑтройки."; +Strings.OfficeOM.L_InvalidFormatValue = "Принаймні один параметр формату має неприпуÑтиме значеннÑ. Перевірте Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ– Ñпробуйте ще раз."; +Strings.OfficeOM.L_GetDataParametersConflict = "Указані параметри конфліктують."; +Strings.OfficeOM.L_TooManyIncompleteRequests = "ДочекайтеÑÑ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð¿Ð¾Ð¿ÐµÑ€ÐµÐ´Ð½ÑŒÐ¾Ð³Ð¾ виклику."; +Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "налаштуйте Ñвій браузер"; +Strings.OfficeOM.L_BrowserAPINotSupported = "Цей браузер не підтримує запитаний API."; +Strings.OfficeOM.L_InvalidTableOptionValue = "Принаймні один параметр tableOptions має неприпуÑтиме значеннÑ. Перевірте Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ– Ñпробуйте ще раз."; +Strings.OfficeOM.L_CustomXmlOutOfDateName = "Дані заÑтаріли"; +Strings.OfficeOM.L_NoCapability = "У Ð²Ð°Ñ Ð½ÐµÐ´Ð¾Ñтатньо дозволів Ð´Ð»Ñ Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ Ñ†Ñ–Ñ”Ñ— дії."; +Strings.OfficeOM.L_NotSupported = "Ð¤ÑƒÐ½ÐºÑ†Ñ–Ñ {0} не підтримуєтьÑÑ."; +Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Вибраний вміÑÑ‚ має бути у форматі таблиці. Відформатуйте дані Ñк таблицю та повторіть Ñпробу."; +Strings.OfficeOM.L_BindingCreationError = "Помилка ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð·Ð²â€™ÑзуваннÑ"; +Strings.OfficeOM.L_ActivityLimitReached = "ДоÑÑгнуто Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ Ð½Ð° кількіÑÑ‚ÑŒ дій."; Strings.OfficeOM.L_NotImplemented = "Функцію {0} не виконано."; -Strings.OfficeOM.L_FileTypeNotSupported = "Указаний тип файлу не підтримуєтьÑÑ."; -Strings.OfficeOM.L_DialogOK = "OK"; -Strings.OfficeOM.L_MultipleNamedItemFound = "Знайдено кілька об’єктів з однаковим іменем."; -Strings.OfficeOM.L_InvalidCoercion = "ÐеприпуÑтимий тип приведеннÑ"; -Strings.OfficeOM.L_BadSelectorString = "Переданий у Ñелектор Ñ€Ñдок має неприпуÑтимий формат або не підтримуєтьÑÑ."; -Strings.OfficeOM.L_InitializeNotReady = "Office.js ще не повніÑÑ‚ÑŽ завантажено. Повторіть Ñпробу пізніше або переконайтеÑÑ, що ви додали код ініціалізації до функції Office.initialize."; -Strings.OfficeOM.L_InvalidNode = "ÐеприпуÑтимий вузол"; -Strings.OfficeOM.L_PropertyDoesNotExist = 'ВлаÑтивоÑÑ‚Ñ– "{0}" немає в об’єкті.'; -Strings.OfficeOM.L_InvalidObjectPath = 'ШлÑÑ… до об’єкта "{0}" не підходить Ð´Ð»Ñ Ð´Ñ–Ñ—, Ñку ви намагаєтеÑÑŒ виконати. Якщо ви викориÑтовуєте цей об’єкт у кількох викликах "context.sync" за межами поÑлідовного Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ Ð¿Ð°ÐºÐµÑ‚Ð° ".run", ÑкориÑтайтеÑÑ Ñ„ÑƒÐ½ÐºÑ†Ñ–Ñми "context.trackedObjects.add()" Ñ– "context.trackedObjects.remove()", щоб керувати чаÑом Ð¶Ð¸Ñ‚Ñ‚Ñ Ð¾Ð±â€™Ñ”ÐºÑ‚Ð°.'; -Strings.OfficeOM.L_UnsupportedUserIdentity = "Тип ідентичноÑÑ‚Ñ– кориÑтувача не підтримуєтьÑÑ."; -Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "Ð¡ÐµÐ°Ð½Ñ Office Online неприпуÑтимий, або Ñ‡Ð°Ñ Ð¹Ð¾Ð³Ð¾ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐ¸Ð²ÑÑ. Щоб продовжити, оновіть Ñторінку."; +Strings.OfficeOM.L_TooManyArguments = "забагато аргументів"; +Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ цю операцію, тому що Ñ†Ñ Ð½Ð°Ð´Ð±ÑƒÐ´Ð¾Ð²Ð° вже запитує маркер доÑтупу."; +Strings.OfficeOM.L_UserAbortedMessage = "КориÑтувач не погодивÑÑ Ð· дозволами надбудови."; Strings.OfficeOM.L_EventHandlerNotExist = "Вказаний обробник подій не знайдено у цьому зв\\'Ñзуванні."; -Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Вибрано макÑимальну кількіÑÑ‚ÑŒ елементів"; -Strings.OfficeOM.L_RequestTokenUnavailable = "Цей API наÑтроєно, щоб знизити чаÑтоту викликів."; +Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Указані Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ rowCount або columnCount неприпуÑтимі."; +Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "Ð¡ÐµÐ°Ð½Ñ Office Online неприпуÑтимий, або Ñ‡Ð°Ñ Ð¹Ð¾Ð³Ð¾ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐ¸Ð²ÑÑ. Щоб продовжити, оновіть Ñторінку."; +Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Дозволити"; +Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = 'Ðе можна заÑтоÑувати зміни влаÑтивоÑÑ‚Ñ– "{0}" за допомогою методу "object.set".'; +Strings.OfficeOM.L_BindingToMultipleSelection = "ПереривчаÑÑ‚Ñ– Ð²Ð¸Ð´Ñ–Ð»ÐµÐ½Ð½Ñ Ð½Ðµ підтримуютьÑÑ."; +Strings.OfficeOM.L_DialogNavigateError = "Помилка переходу діалогового вікна"; +Strings.OfficeOM.L_AppNameNotExist = "Ðазва надбудови Ð´Ð»Ñ {0} не Ñ–Ñнує."; +Strings.OfficeOM.L_NewWindowCrossZone = 'Ðе вдалоÑÑ Ñтворити діалогове вікно через параметри безпеки вашого браузера. СкориÑтайтеÑÑŒ іншим браузером, або {0} так, щоб домен "{1}" Ñ– домен, Ñкий відображаєтьÑÑ Ð² адреÑному Ñ€Ñдку, перебували в одній зоні безпеки.'; +Strings.OfficeOM.L_DocumentReadOnly = "ОпераціÑ, на Ñку Ñтворено запит, заборонена Ð´Ð»Ñ Ð¿Ð¾Ñ‚Ð¾Ñ‡Ð½Ð¾Ð³Ð¾ режиму документа."; +Strings.OfficeOM.L_InvalidSetRows = "Указані Ñ€Ñдки неприпуÑтимі."; +Strings.OfficeOM.L_UserAborted = "КориÑтувач перервав запит на згоду."; +Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "ÐžÐ¿ÐµÑ€Ð°Ñ†Ñ–Ñ Ð½Ðµ підтримуєтьÑÑ Ñ†Ð¸Ð¼ типом зв’ÑзуваннÑ."; +Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "ПропуÑтити"; +Strings.OfficeOM.L_InvalidGetRows = "Указані Ñ€Ñдки неприпуÑтимі."; +Strings.OfficeOM.L_NotSupportedBindingType = "Указаний тип зв’ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ {0} не підтримуєтьÑÑ."; Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Зробіть вибір."; -Strings.OfficeOM.L_RowIndexOutOfRange = "Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ–Ð½Ð´ÐµÐºÑу Ñ€Ñдка перебуває за межами припуÑтимого діапазону. Укажіть Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ (0 або більше), менше кількоÑÑ‚Ñ– Ñ€Ñдків."; +Strings.OfficeOM.L_InternalError = "Ð’Ð½ÑƒÑ‚Ñ€Ñ–ÑˆÐ½Ñ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ°"; +Strings.OfficeOM.L_InValidOptionalArgument = "неприпуÑтимий необов’Ñзковий аргумент"; +Strings.OfficeOM.L_InvalidReadForBlankRow = "Указаний Ñ€Ñдок порожній."; +Strings.OfficeOM.L_FileTypeNotSupported = "Указаний тип файлу не підтримуєтьÑÑ."; +Strings.OfficeOM.L_InvalidResourceUrl = "Указано неприпуÑтиму URL-адреÑу реÑурÑу програми."; +Strings.OfficeOM.L_GetSelectionNotSupported = "Поточне Ð²Ð¸Ð´Ñ–Ð»ÐµÐ½Ð½Ñ Ð½Ðµ підтримуєтьÑÑ."; +Strings.OfficeOM.L_InvalidSetStartRowColumn = "Указані Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ startRow або startColumn неприпуÑтимі."; +Strings.OfficeOM.L_SSOClientError = "СталаÑÑ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ° під Ñ‡Ð°Ñ Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ Ð·Ð°Ð¿Ð¸Ñ‚Ñƒ автентифікації з Office."; +Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Указаний тип Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð½ÐµÑуміÑний з указаним типом зв’ÑзуваннÑ."; +Strings.OfficeOM.L_TooManyOptionalFunction = "у ÑпиÑку параметрів кілька необов’Ñзкових функцій"; +Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Ці дані заÑтарілі. Отримайте об’єкт ще раз."; Strings.OfficeOM.L_IndexOutOfRange = "Ð†Ð½Ð´ÐµÐºÑ Ð¿ÐµÑ€ÐµÐ±ÑƒÐ²Ð°Ñ” за межами діапазону."; -Strings.OfficeOM.L_EventHandlerRemovalFailed = "Ðе вдалоÑÑ Ð²Ð¸Ð´Ð°Ð»Ð¸Ñ‚Ð¸ обробник подій."; -Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Ðе вдалоÑÑ Ñтворити діалогове вікно через Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ Ð±Ñ€Ð°ÑƒÐ·ÐµÑ€Ð°. Домен діалогового вікна та домен хоÑта надбудови перебувають у різних зонах безпеки."; +Strings.OfficeOM.L_NamedItemNotFound = "Іменований елемент не Ñ–Ñнує."; Strings.OfficeOM.L_BindingNotExist = "Указане зв’ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ðµ Ñ–Ñнує."; -Strings.OfficeOM.L_EventRegistrationError = "Помилка реєÑтрації події"; -Strings.OfficeOM.L_SpecifiedIdNotExist = "Указаний ідентифікатор не Ñ–Ñнує."; -Strings.OfficeOM.L_MemoryLimit = "Перевищено Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ Ð¿Ð°Ð¼â€™ÑÑ‚Ñ–"; -Strings.OfficeOM.L_DialogAddressNotTrusted = "Домен цієї URL-адреÑи не включено до елемента AppDomains у маніфеÑÑ‚Ñ–."; -Strings.OfficeOM.L_DataWriteReminder = "ÐÐ°Ð³Ð°Ð´ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¾ запиÑÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ…"; -Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Ðе вдалоÑÑŒ отримати файл через помилку мережі."; -Strings.OfficeOM.L_InvalidSetRows = "Указані Ñ€Ñдки неприпуÑтимі."; -Strings.OfficeOM.L_SettingNameNotExist = "Указана назва параметра не Ñ–Ñнує."; -Strings.OfficeOM.L_ValueNotLoaded = 'Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ€ÐµÐ·ÑƒÐ»ÑŒÑ‚ÑƒÑŽÑ‡Ð¾Ð³Ð¾ об’єкта ще на завантажено. Перш ніж прочитати влаÑтивіÑÑ‚ÑŒ значеннÑ, викличте функцію "context.sync()" Ð´Ð»Ñ ÐºÐ¾Ð½Ñ‚ÐµÐºÑту пов’Ñзаного вміÑту.'; Strings.OfficeOM.L_UserNotSignedIn = "Ðіхто з кориÑтувачів не ввійшов у Ñлужбу Office."; -Strings.OfficeOM.L_HostError = "Помилка хоÑта"; Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Поточне Ð²Ð¸Ð´Ñ–Ð»ÐµÐ½Ð½Ñ Ð½ÐµÑуміÑне з указаним типом приведеннÑ."; -Strings.OfficeOM.L_DialogInvalidScheme = "Ð¦Ñ URL-Ñхема не підтримуєтьÑÑ. ЗаміÑÑ‚ÑŒ неї Ñлід викориÑтовувати HTTPS."; +Strings.OfficeOM.L_InvalidArgumentGeneric = "Передані функції документи відÑутні, не підходÑÑ‚ÑŒ Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— Ñитуації або мають неправильний формат."; +Strings.OfficeOM.L_UnsupportedEnumeration = "Ðепідтримуване переліченнÑ"; +Strings.OfficeOM.L_ApiNotFoundDetails = 'Метод або влаÑтивіÑÑ‚ÑŒ "{0}" належать до набору вимог {1}, недоÑтупного у вашій верÑÑ–Ñ— {2}.'; +Strings.OfficeOM.L_ElementMissing = "Ðе вдалоÑÑ Ð²Ñ–Ð´Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚ÑƒÐ²Ð°Ñ‚Ð¸ клітинку таблиці, оÑкільки відÑутні деÑкі Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ñ–Ð². Перевірте параметри та Ñпробуйте ще раз."; +Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = 'Триває Ñпроба налаштувати доÑтупну тільки Ð´Ð»Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð²Ð»Ð°ÑтивіÑÑ‚ÑŒ "{0}".'; +Strings.OfficeOM.L_ShowWindowDialogNotification = "Ðадбудові {0} потрібно відкрити нове вікно."; +Strings.OfficeOM.L_DataNotMatchBindingType = "Указаний об’єкт даних неÑуміÑний із типом зв’ÑзуваннÑ."; +Strings.OfficeOM.L_InvalidBindingError = "Помилка неприпуÑтимого зв’ÑзуваннÑ"; +Strings.OfficeOM.L_SettingNameNotExist = "Указана назва параметра не Ñ–Ñнує."; +Strings.OfficeOM.L_SettingsStaleError = "Помилка заÑтарілих наÑтройок"; +Strings.OfficeOM.L_ShuttingDown = "Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ операцію, тому що дані на Ñервері заÑтаріли."; +Strings.OfficeOM.L_FormattingReminder = "ÐÐ°Ð³Ð°Ð´ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¾ форматуваннÑ"; Strings.OfficeOM.L_InvalidAPICall = "ÐеприпуÑтимий виклик API"; +Strings.OfficeOM.L_APINotSupported = "API не підтримуєтьÑÑ"; +Strings.OfficeOM.L_DataNotMatchCoercionType = "Тип указаного об’єкта даних неÑуміÑний із поточним виділеннÑм."; +Strings.OfficeOM.L_InvalidGetStartRowColumn = "Указані Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ startRow або startColumn неприпуÑтимі."; +Strings.OfficeOM.L_InvalidSSOAddinMessage = "Ð†Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ API ідентичноÑÑ‚Ñ– не підтримуєтьÑÑ Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— надбудови."; +Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Параметри координати не підлÑгають викориÑтанню з таблицею типу приведеннÑ, коли вона міÑтить злиті клітинки."; +Strings.OfficeOM.L_RunMustReturnPromise = 'Пакетна функціÑ, передана методу ".run", не повернула зобов’ÑзаннÑ. Ð¦Ñ Ñ„ÑƒÐ½ÐºÑ†Ñ–Ñ Ð¼Ð°Ñ” повернути зобов’ÑзаннÑ, щоб уÑÑ– автоматично відÑтежувані об’єкти можна було вивільнити в момент Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð¾Ð±Ñ€Ð¾Ð±ÐºÐ¸ пакета. Зазвичай зобов’ÑÐ·Ð°Ð½Ð½Ñ â€“ це відповідь, Ñку повернула Ñ„ÑƒÐ½ÐºÑ†Ñ–Ñ "context.sync()".'; +Strings.OfficeOM.L_DataWriteError = "Помилка запиÑÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ…"; +Strings.OfficeOM.L_InvalidCellsValue = "Принаймні один параметр клітинок має неприпуÑтиме значеннÑ. Перевірте Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ– Ñпробуйте ще раз."; +Strings.OfficeOM.L_CannotNavigateTo = "Об’єкт розташовано там, де не підтримуєтьÑÑ Ð½Ð°Ð²Ñ–Ð³Ð°Ñ†Ñ–Ñ."; +Strings.OfficeOM.L_InvalidArgument = 'Ðргумент "{0}" відÑутній, має неправильний формат, або його не можна викориÑтовувати в цій Ñитуації.'; Strings.OfficeOM.L_SetDataIsTooLarge = "Указаний об’єкт даних завеликий."; -Strings.OfficeOM.L_InvalidOrTimedOutSession = "Ð¡ÐµÐ°Ð½Ñ Ð½ÐµÐ¿Ñ€Ð¸Ð¿ÑƒÑтимий, або Ñ‡Ð°Ñ Ð¹Ð¾Ð³Ð¾ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐ¸Ð²ÑÑ"; -Strings.OfficeOM.L_ConnectionFailureWithStatus = "Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ запит. Код Ñтану: {0}." +Strings.OfficeOM.L_InvalidDataObject = "ÐеприпуÑтимий об’єкт даних"; +Strings.OfficeOM.L_InvalidColumnsForBinding = "Указані Ñтовпці неприпуÑтимі."; +Strings.OfficeOM.L_OperationNotSupported = "ÐžÐ¿ÐµÑ€Ð°Ñ†Ñ–Ñ Ð½Ðµ підтримуєтьÑÑ."; +Strings.OfficeOM.L_UnsupportedUserIdentity = "Тип ідентичноÑÑ‚Ñ– кориÑтувача не підтримуєтьÑÑ."; +Strings.OfficeOM.L_DisplayDialogError = "Помилка Ð²Ñ–Ð´Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð½Ñ Ð´Ñ–Ð°Ð»Ð¾Ð³Ð¾Ð²Ð¾Ð³Ð¾ вікна"; +Strings.OfficeOM.L_FormatValueOutOfRange = "Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿ÐµÑ€ÐµÐ±ÑƒÐ²Ð°Ñ” за межами припуÑтимого діапазону."; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory = "Ð¦Ñ Ð½Ð°Ð´Ð±ÑƒÐ´Ð¾Ð²Ð° не підтримує згоду кориÑтувача."; +Strings.OfficeOM.L_SSOConnectionLostError = "A connection was lost during the sign in process."; +Strings.OfficeOM.L_SetDataParametersConflict = "Указані параметри конфліктують."; +Strings.OfficeOM.L_InvalidApiArgumentsMessage = "ÐеприпуÑтимі вхідні аргументи."; +Strings.OfficeOM.L_CellDataAmountBeyondLimits = "Примітка: рекомендована кількіÑÑ‚ÑŒ клітинок у таблиці – менше 20 000."; +Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Ðе вдалоÑÑŒ отримати файл через помилку мережі."; +Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Виконайте команду closeAsync Ð´Ð»Ñ Ð¿Ð¾Ñ‚Ð¾Ñ‡Ð½Ð¾Ð³Ð¾ файлу, перш ніж отримати наÑтупний."; +Strings.OfficeOM.L_SSOClientErrorMessage = "СталаÑÑ Ð½ÐµÐ¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð° помилка в клієнті."; +Strings.OfficeOM.L_UnknownBindingType = "Тип зв’ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ðµ підтримуєтьÑÑ."; +Strings.OfficeOM.L_BadSelectorString = "Переданий у Ñелектор Ñ€Ñдок має неприпуÑтимий формат або не підтримуєтьÑÑ."; +Strings.OfficeOM.L_InvalidDataFormat = "ÐеприпуÑтимий формат указаного об’єкта даних."; +Strings.OfficeOM.L_InvalidOperationInCellEditMode = "Ð’ Excel зараз відкрито режим Ñ€ÐµÐ´Ð°Ð³ÑƒÐ²Ð°Ð½Ð½Ñ ÐºÐ»Ñ–Ñ‚Ð¸Ð½Ð¾Ðº. Закрийте цей режим, натиÑнувши клавішу Enter або Tab чи вибравши іншу клітинку, а потім Ñпробуйте ще раз."; +Strings.OfficeOM.L_TooManyOptionalObjects = "у ÑпиÑку параметрів кілька необов’Ñзкових об’єктів"; +Strings.OfficeOM.L_GetDataIsTooLarge = "Запитаний набір даних завеликий."; +Strings.OfficeOM.L_EventHandlerRemovalFailed = "Ðе вдалоÑÑ Ð²Ð¸Ð´Ð°Ð»Ð¸Ñ‚Ð¸ обробник подій."; +Strings.OfficeOM.L_InvalidResourceUrlMessage = "У маніфеÑÑ‚Ñ– вказано неприпуÑтиму URL-адреÑу реÑурÑу."; +Strings.OfficeOM.L_SSOConnectionLostErrorMessage = "A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones."; +Strings.OfficeOM.L_UserClickIgnore = "КориÑтувач вирішив пропуÑтити діалогове вікно."; +Strings.OfficeOM.L_PropertyNotLoaded = 'ВлаÑтивіÑÑ‚ÑŒ "{0}" недоÑтупна. Перш ніж прочитати Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ–, викличте метод Ð·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶ÐµÐ½Ð½Ñ (load) Ð´Ð»Ñ Ð¾Ð±â€™Ñ”ÐºÑ‚Ð°, що Ñ—Ñ— міÑтить, Ñ– викличте функцію "context.sync()" Ð´Ð»Ñ ÐºÐ¾Ð½Ñ‚ÐµÐºÑту пов’Ñзаного запиту.'; +Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Параметри координати не підлÑгають викориÑтанню з таблицею типу приведеннÑ, коли вона міÑтить злиті клітинки."; +Strings.OfficeOM.L_APICallFailed = "Ðе вдалоÑÑ Ð·Ð´Ñ–Ð¹Ñнити виклик API"; +Strings.OfficeOM.L_RowIndexOutOfRange = "Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ–Ð½Ð´ÐµÐºÑу Ñ€Ñдка перебуває за межами припуÑтимого діапазону. Укажіть Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ (0 або більше), менше кількоÑÑ‚Ñ– Ñ€Ñдків."; +Strings.OfficeOM.L_InvalidCoercion = "ÐеприпуÑтимий тип приведеннÑ"; +Strings.OfficeOM.L_HostError = "Помилка хоÑта"; +Strings.OfficeOM.L_DialogAddressNotTrusted = "Домен цієї URL-адреÑи не включено до елемента AppDomains у маніфеÑÑ‚Ñ–."; +Strings.OfficeOM.L_NavOutOfBound = "Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ операцію, оÑкільки Ñ–Ð½Ð´ÐµÐºÑ Ð¿Ð¾Ð·Ð° межами діапазону."; +Strings.OfficeOM.L_SettingsCannotSave = "Ðе вдалоÑÑ Ð·Ð±ÐµÑ€ÐµÐ³Ñ‚Ð¸ наÑтройки."; +Strings.OfficeOM.L_Timeout = "Ð§Ð°Ñ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ñ–Ñ— завершивÑÑ."; +Strings.OfficeOM.L_UnsupportedDataObject = "Ðаданий тип об’єкта даних не підтримуєтьÑÑ." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/uk-ua/office_strings.js b/node_modules/@microsoft/office-js/dist/uk-ua/office_strings.js index cad7f9b..2bac550 100644 --- a/node_modules/@microsoft/office-js/dist/uk-ua/office_strings.js +++ b/node_modules/@microsoft/office-js/dist/uk-ua/office_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_DataNotMatchCoercionType="Тип указаного об’єкта даних неÑуміÑний із поточним виділеннÑм.";Strings.OfficeOM.L_InvalidReadForBlankRow="Указаний Ñ€Ñдок порожній.";Strings.OfficeOM.L_NotSupported="Ð¤ÑƒÐ½ÐºÑ†Ñ–Ñ {0} не підтримуєтьÑÑ.";Strings.OfficeOM.L_TooManyOptionalObjects="у ÑпиÑку параметрів кілька необов’Ñзкових об’єктів";Strings.OfficeOM.L_AppNameNotExist="Ðазва надбудови Ð´Ð»Ñ {0} не Ñ–Ñнує.";Strings.OfficeOM.L_InvalidResourceUrl="Указано неприпуÑтиму URL-адреÑу реÑурÑу програми.";Strings.OfficeOM.L_UnsupportedEnumeration="Ðепідтримуване переліченнÑ";Strings.OfficeOM.L_DialogNavigateError="Помилка переходу діалогового вікна";Strings.OfficeOM.L_UserAborted="КориÑтувач перервав запит на згоду.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Ðадбудова вже запитує маркер доÑтупу.";Strings.OfficeOM.L_DisplayDialogError="Помилка Ð²Ñ–Ð´Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð½Ñ Ð´Ñ–Ð°Ð»Ð¾Ð³Ð¾Ð²Ð¾Ð³Ð¾ вікна";Strings.OfficeOM.L_InvalidResourceUrlMessage="У маніфеÑÑ‚Ñ– вказано неприпуÑтиму URL-адреÑу реÑурÑу.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Параметри координати не підлÑгають викориÑтанню з таблицею типу приведеннÑ, коли вона міÑтить злиті клітинки.";Strings.OfficeOM.L_InvalidRequestContext="Ðе можна викориÑтовувати цей об’єкт у різних контекÑтах запитів.";Strings.OfficeOM.L_OperationNotSupported="ÐžÐ¿ÐµÑ€Ð°Ñ†Ñ–Ñ Ð½Ðµ підтримуєтьÑÑ.";Strings.OfficeOM.L_BrowserAPINotSupported="Цей браузер не підтримує запитаний API.";Strings.OfficeOM.L_InvalidCellsValue="Принаймні один параметр клітинок має неприпуÑтиме значеннÑ. Перевірте Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ– Ñпробуйте ще раз.";Strings.OfficeOM.L_PropertyNotLoaded='ВлаÑтивіÑÑ‚ÑŒ "{0}" недоÑтупна. Перш ніж прочитати Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ–, викличте метод Ð·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶ÐµÐ½Ð½Ñ (load) Ð´Ð»Ñ Ð¾Ð±â€™Ñ”ÐºÑ‚Ð°, що Ñ—Ñ— міÑтить, Ñ– викличте функцію "context.sync()" Ð´Ð»Ñ ÐºÐ¾Ð½Ñ‚ÐµÐºÑту пов’Ñзаного запиту.';Strings.OfficeOM.L_EventHandlerAdditionFailed="Ðе вдалоÑÑ Ð´Ð¾Ð´Ð°Ñ‚Ð¸ обробник подій.";Strings.OfficeOM.L_UnknownBindingType="Тип зв’ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ðµ підтримуєтьÑÑ.";Strings.OfficeOM.L_InvalidParameters="Ð¤ÑƒÐ½ÐºÑ†Ñ–Ñ {0} має неприпуÑтимі параметри.";Strings.OfficeOM.L_TooManyArguments="забагато аргументів";Strings.OfficeOM.L_APICallFailed="Ðе вдалоÑÑ Ð·Ð´Ñ–Ð¹Ñнити виклик API";Strings.OfficeOM.L_InvalidBinding="ÐеприпуÑтиме зв’ÑзуваннÑ";Strings.OfficeOM.L_FunctionCallFailed="Ðе вдалоÑÑ Ð²Ð¸ÐºÐ»Ð¸ÐºÐ°Ñ‚Ð¸ функцію {0}. Код помилки: {1}.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty='Триває Ñпроба налаштувати доÑтупну тільки Ð´Ð»Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð²Ð»Ð°ÑтивіÑÑ‚ÑŒ "{0}".';Strings.OfficeOM.L_DialogAlreadyOpened="Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ операцію, тому що Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— надбудови активовано діалогове вікно.";Strings.OfficeOM.L_DataWriteError="Помилка запиÑÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ…";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="ПропуÑтити";Strings.OfficeOM.L_InvalidGetStartRowColumn="Указані Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ startRow або startColumn неприпуÑтимі.";Strings.OfficeOM.L_UnsupportedDataObject="Ðаданий тип об’єкта даних не підтримуєтьÑÑ.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Указаний тип зв’ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ Ð½ÐµÑуміÑний із наданим іменованим елементом.";Strings.OfficeOM.L_InvalidFormatValue="Принаймні один параметр формату має неприпуÑтиме значеннÑ. Перевірте Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ– Ñпробуйте ще раз.";Strings.OfficeOM.L_RunMustReturnPromise='Пакетна функціÑ, передана методу ".run", не повернула зобов’ÑзаннÑ. Ð¦Ñ Ñ„ÑƒÐ½ÐºÑ†Ñ–Ñ Ð¼Ð°Ñ” повернути зобов’ÑзаннÑ, щоб уÑÑ– автоматично відÑтежувані об’єкти можна було вивільнити в момент Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð¾Ð±Ñ€Ð¾Ð±ÐºÐ¸ пакета. Зазвичай зобов’ÑÐ·Ð°Ð½Ð½Ñ â€“ це відповідь, Ñку повернула Ñ„ÑƒÐ½ÐºÑ†Ñ–Ñ "context.sync()".';Strings.OfficeOM.L_RedundantCallbackSpecification="Зворотній виклик не можна вказати одночаÑно у ÑпиÑку аргументів Ñ– Ñк додатковий об’єкт.";Strings.OfficeOM.L_InternalError="Ð’Ð½ÑƒÑ‚Ñ€Ñ–ÑˆÐ½Ñ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ°";Strings.OfficeOM.L_DataReadError="Помилка Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ…";Strings.OfficeOM.L_GetDataIsTooLarge="Запитаний набір даних завеликий.";Strings.OfficeOM.L_SelectionCannotBound="Ðе вдалоÑÑ Ð·Ð²â€™Ñзати з поточним виділеннÑм.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Примітка: рекомендована кількіÑÑ‚ÑŒ наборів форматуваннÑ, Ñтворених за допомогою виклику API форматуваннÑ, – не більше 100.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Указаний тип Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð½ÐµÑуміÑний з указаним типом зв’ÑзуваннÑ.";Strings.OfficeOM.L_NotSupportedEventType="Указаний тип події {0} не підтримуєтьÑÑ.";Strings.OfficeOM.L_SSOClientError="СталаÑÑ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ° під Ñ‡Ð°Ñ Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ Ð·Ð°Ð¿Ð¸Ñ‚Ñƒ автентифікації з Office.";Strings.OfficeOM.L_ReadSettingsError="Помилка Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð½Ð°Ñтройок";Strings.OfficeOM.L_FormatValueOutOfRange="Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿ÐµÑ€ÐµÐ±ÑƒÐ²Ð°Ñ” за межами припуÑтимого діапазону.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Указані Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ rowCount або columnCount неприпуÑтимі.";Strings.OfficeOM.L_DataNotMatchSelection="Ðаданий об’єкт даних неÑуміÑний із фігурою або розмірами поточного виділеннÑ.";Strings.OfficeOM.L_NamedItemNotFound="Іменований елемент не Ñ–Ñнує.";Strings.OfficeOM.L_InvalidTableOptionValue="Принаймні один параметр tableOptions має неприпуÑтиме значеннÑ. Перевірте Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ– Ñпробуйте ще раз.";Strings.OfficeOM.L_InvalidApiCallInContext="ÐеприпуÑтимий виклик API Ð´Ð»Ñ Ð¿Ð¾Ñ‚Ð¾Ñ‡Ð½Ð¾Ð³Ð¾ контекÑту.";Strings.OfficeOM.L_SettingsStaleError="Помилка заÑтарілих наÑтройок";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="ÐžÐ¿ÐµÑ€Ð°Ñ†Ñ–Ñ Ð½Ðµ підтримуєтьÑÑ Ñ†Ð¸Ð¼ типом зв’ÑзуваннÑ.";Strings.OfficeOM.L_InvalidGetColumns="Указані Ñтовпці неприпуÑтимі.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Дані заÑтаріли";Strings.OfficeOM.L_TooManyIncompleteRequests="ДочекайтеÑÑ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð¿Ð¾Ð¿ÐµÑ€ÐµÐ´Ð½ÑŒÐ¾Ð³Ð¾ виклику.";Strings.OfficeOM.L_InvalidArgument='Ðргумент "{0}" відÑутній, має неправильний формат, або його не можна викориÑтовувати в цій Ñитуації.';Strings.OfficeOM.L_ElementMissing="Ðе вдалоÑÑ Ð²Ñ–Ð´Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚ÑƒÐ²Ð°Ñ‚Ð¸ клітинку таблиці, оÑкільки відÑутні деÑкі Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ñ–Ð². Перевірте параметри та Ñпробуйте ще раз.";Strings.OfficeOM.L_ShowWindowDialogNotification="Ðадбудові {0} потрібно відкрити нове вікно.";Strings.OfficeOM.L_FormattingReminder="ÐÐ°Ð³Ð°Ð´ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¾ форматуваннÑ";Strings.OfficeOM.L_InvalidSSOAddinMessage="Ð†Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ API ідентичноÑÑ‚Ñ– не підтримуєтьÑÑ Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— надбудови.";Strings.OfficeOM.L_NavOutOfBound="Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ операцію, оÑкільки Ñ–Ð½Ð´ÐµÐºÑ Ð¿Ð¾Ð·Ð° межами діапазону.";Strings.OfficeOM.L_DataNotMatchBindingSize="Ðаданий об’єкт даних не відповідає розміру поточного виділеннÑ.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="налаштуйте Ñвій браузер";Strings.OfficeOM.L_InvalidSetColumns="Указані Ñтовпці неприпуÑтимі.";Strings.OfficeOM.L_DataStale="Дані заÑтаріли";Strings.OfficeOM.L_InvalidGrant="ВідÑутні попередні відомоÑÑ‚Ñ– авторизації.";Strings.OfficeOM.L_SSOClientErrorMessage="СталаÑÑ Ð½ÐµÐ¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð° помилка в клієнті.";Strings.OfficeOM.L_UserClickIgnore="КориÑтувач вирішив пропуÑтити діалогове вікно.";Strings.OfficeOM.L_InValidOptionalArgument="неприпуÑтимий необов’Ñзковий аргумент";Strings.OfficeOM.L_CoercionTypeNotSupported="Указаний тип Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð½Ðµ підтримуєтьÑÑ.";Strings.OfficeOM.L_NoCapability="У Ð²Ð°Ñ Ð½ÐµÐ´Ð¾Ñтатньо дозволів Ð´Ð»Ñ Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ Ñ†Ñ–Ñ”Ñ— дії.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Ці дані заÑтарілі. Отримайте об’єкт ще раз.";Strings.OfficeOM.L_CustomXmlError="Помилка наÑтроюваного XML.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Вибраний вміÑÑ‚ має бути у форматі таблиці. Відформатуйте дані Ñк таблицю та повторіть Ñпробу.";Strings.OfficeOM.L_SetDataParametersConflict="Указані параметри конфліктують.";Strings.OfficeOM.L_InvalidGrantMessage="Ð”Ð»Ñ Ñ†Ñ–Ñ”Ñ— надбудови не надано дозволи.";Strings.OfficeOM.L_RequestTimeout="Виклик тривав занадто довго, тому не вдалоÑÑ Ð¹Ð¾Ð³Ð¾ виконати.";Strings.OfficeOM.L_MissingParameter="ВідÑутній параметр";Strings.OfficeOM.L_BindingCreationError="Помилка ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð·Ð²â€™ÑзуваннÑ";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Тип ідентичноÑÑ‚Ñ– кориÑтувача не підтримуєтьÑÑ.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Параметри координати не підлÑгають викориÑтанню з таблицею типу приведеннÑ, коли вона міÑтить злиті клітинки.";Strings.OfficeOM.L_NewWindowCrossZone='Ðе вдалоÑÑ Ñтворити діалогове вікно через параметри безпеки вашого браузера. СкориÑтайтеÑÑŒ іншим браузером, або {0} так, щоб домен "{1}" Ñ– домен, Ñкий відображаєтьÑÑ Ð² адреÑному Ñ€Ñдку, перебували в одній зоні безпеки.';Strings.OfficeOM.L_InvalidApiArgumentsMessage="ÐеприпуÑтимі вхідні аргументи.";Strings.OfficeOM.L_BindingToMultipleSelection="ПереривчаÑÑ‚Ñ– Ð²Ð¸Ð´Ñ–Ð»ÐµÐ½Ð½Ñ Ð½Ðµ підтримуютьÑÑ.";Strings.OfficeOM.L_NotSupportedBindingType="Указаний тип зв’ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ {0} не підтримуєтьÑÑ.";Strings.OfficeOM.L_GetDataParametersConflict="Указані параметри конфліктують.";Strings.OfficeOM.L_DataNotMatchBindingType="Указаний об’єкт даних неÑуміÑний із типом зв’ÑзуваннÑ.";Strings.OfficeOM.L_DialogRequireHTTPS="Протокол HTTP не підтримуєтьÑÑ. ЗаміÑÑ‚ÑŒ нього Ñлід викориÑтовувати HTTPS.";Strings.OfficeOM.L_NetworkProblem="Проблема мережі";Strings.OfficeOM.L_CannotWriteToSelection="Ðе вдалоÑÑ Ð·Ð°Ð¿Ð¸Ñати до поточного виділеннÑ.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod='Ðе можна заÑтоÑувати зміни влаÑтивоÑÑ‚Ñ– "{0}" за допомогою методу "object.set".';Strings.OfficeOM.L_CloseFileBeforeRetrieve="Виконайте команду closeAsync Ð´Ð»Ñ Ð¿Ð¾Ñ‚Ð¾Ñ‡Ð½Ð¾Ð³Ð¾ файлу, перш ніж отримати наÑтупний.";Strings.OfficeOM.L_InvalidSetStartRowColumn="Указані Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ startRow або startColumn неприпуÑтимі.";Strings.OfficeOM.L_SettingsAreStale="Ðе вдалоÑÑ Ð·Ð±ÐµÑ€ÐµÐ³Ñ‚Ð¸ наÑтройки, тому що вони заÑтаріли.";Strings.OfficeOM.L_ActivityLimitReached="ДоÑÑгнуто Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ Ð½Ð° кількіÑÑ‚ÑŒ дій.";Strings.OfficeOM.L_InvalidBindingOperation="ÐеприпуÑтима Ð¾Ð¿ÐµÑ€Ð°Ñ†Ñ–Ñ Ð·Ð²â€™ÑзуваннÑ";Strings.OfficeOM.L_SaveSettingsError="Помилка Ð·Ð±ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ Ð½Ð°Ñтройок";Strings.OfficeOM.L_InvalidValue="ÐеприпуÑтиме значеннÑ";Strings.OfficeOM.L_ShuttingDown="Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ операцію, тому що дані на Ñервері заÑтаріли.";Strings.OfficeOM.L_CannotNavigateTo="Об’єкт розташовано там, де не підтримуєтьÑÑ Ð½Ð°Ð²Ñ–Ð³Ð°Ñ†Ñ–Ñ.";Strings.OfficeOM.L_GetSelectionNotSupported="Поточне Ð²Ð¸Ð´Ñ–Ð»ÐµÐ½Ð½Ñ Ð½Ðµ підтримуєтьÑÑ.";Strings.OfficeOM.L_MissingRequiredArguments="відÑутні кілька обов’Ñзкових аргументів";Strings.OfficeOM.L_InvalidGetRows="Указані Ñ€Ñдки неприпуÑтимі.";Strings.OfficeOM.L_ConnectionFailureWithDetails="Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ запит. Код Ñтану: {0}; код помилки: {1}; Ð¿Ð¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ð¿Ñ€Ð¾ помилку: {2}. ";Strings.OfficeOM.L_OutOfRange="За межами діапазону";Strings.OfficeOM.L_TooManyOptionalFunction="у ÑпиÑку параметрів кілька необов’Ñзкових функцій";Strings.OfficeOM.L_InvalidDataObject="ÐеприпуÑтимий об’єкт даних";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Дозволити";Strings.OfficeOM.L_PermissionDenied="Відмовлено в дозволі";Strings.OfficeOM.L_InvalidBindingError="Помилка неприпуÑтимого зв’ÑзуваннÑ";Strings.OfficeOM.L_CannotRegisterEvent="Ðе вдалоÑÑ Ð·Ð°Ñ€ÐµÑ”Ñтрувати обробник подій.";Strings.OfficeOM.L_InvalidArgumentGeneric="Передані функції документи відÑутні, не підходÑÑ‚ÑŒ Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— Ñитуації або мають неправильний формат.";Strings.OfficeOM.L_SliceSizeNotSupported="Указаний розмір роздільника не підтримуєтьÑÑ.";Strings.OfficeOM.L_InvalidDataFormat="ÐеприпуÑтимий формат указаного об’єкта даних.";Strings.OfficeOM.L_OsfControlTypeNotSupported="Тип OsfControl не підтримуєтьÑÑ.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="Параметр XPath дозволÑÑ” вибрати до 1024 елементів.";Strings.OfficeOM.L_ColIndexOutOfRange="Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ–Ð½Ð´ÐµÐºÑу ÑÑ‚Ð¾Ð²Ð¿Ñ†Ñ Ð¿ÐµÑ€ÐµÐ±ÑƒÐ²Ð°Ñ” за межами припуÑтимого діапазону. Укажіть Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ (0 або більше), менше кількоÑÑ‚Ñ– Ñтовпців.";Strings.OfficeOM.L_CustomXmlNodeNotFound="Ðе вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ вказаний вузол.";Strings.OfficeOM.L_APINotSupported="API не підтримуєтьÑÑ";Strings.OfficeOM.L_InvalidColumnsForBinding="Указані Ñтовпці неприпуÑтимі.";Strings.OfficeOM.L_OverwriteWorksheetData="Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ операцію вÑтановленнÑ, тому що наданий об’єкт даних перезапише або зÑуне дані.";Strings.OfficeOM.L_DocumentReadOnly="ОпераціÑ, на Ñку Ñтворено запит, заборонена Ð´Ð»Ñ Ð¿Ð¾Ñ‚Ð¾Ñ‡Ð½Ð¾Ð³Ð¾ режиму документа.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="ÐŸÐµÑ€ÐµÐ»Ñ–Ñ‡ÐµÐ½Ð½Ñ Ð½Ðµ підтримуєтьÑÑ Ð² поточній хоÑÑ‚-програмі.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Програма {0} не Ñ–Ñнує. Ðе вдалоÑÑ Ð²Ð¸ÐºÐ»Ð¸ÐºÐ°Ñ‚Ð¸ Ñлужбу Microsoft.Office.WebExtension.initialize(reason).";Strings.OfficeOM.L_InternalErrorDescription="СталаÑÑ Ð²Ð½ÑƒÑ‚Ñ€Ñ–ÑˆÐ½Ñ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ°.";Strings.OfficeOM.L_UserAbortedMessage="КориÑтувач не погодивÑÑ Ð· дозволами надбудови.";Strings.OfficeOM.L_SSOServerError="СталаÑÑ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ° поÑтачальника автентифікації.";Strings.OfficeOM.L_Timeout="Ð§Ð°Ñ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ñ–Ñ— завершивÑÑ.";Strings.OfficeOM.L_SSOServerErrorMessage="СталаÑÑ Ð½ÐµÐ¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð° помилка на Ñервері.";Strings.OfficeOM.L_CallbackNotAFunction="Зворотній виклик має бути функцією, а не {0}.";Strings.OfficeOM.L_InvalidSelectionForBindingType="Ðеможливо Ñтворити зв’ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ Ð· поточним виділеннÑм Ñ– вказаним типом.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Примітка: рекомендована кількіÑÑ‚ÑŒ клітинок у таблиці – менше 20 000.";Strings.OfficeOM.L_InvalidFormat="Помилка неприпуÑтимого формату";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ цю операцію, тому що Ñ†Ñ Ð½Ð°Ð´Ð±ÑƒÐ´Ð¾Ð²Ð° вже запитує маркер доÑтупу.";Strings.OfficeOM.L_SettingsCannotSave="Ðе вдалоÑÑ Ð·Ð±ÐµÑ€ÐµÐ³Ñ‚Ð¸ наÑтройки.";Strings.OfficeOM.L_NotImplemented="Функцію {0} не виконано.";Strings.OfficeOM.L_FileTypeNotSupported="Указаний тип файлу не підтримуєтьÑÑ.";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_MultipleNamedItemFound="Знайдено кілька об’єктів з однаковим іменем.";Strings.OfficeOM.L_InvalidCoercion="ÐеприпуÑтимий тип приведеннÑ";Strings.OfficeOM.L_BadSelectorString="Переданий у Ñелектор Ñ€Ñдок має неприпуÑтимий формат або не підтримуєтьÑÑ.";Strings.OfficeOM.L_InitializeNotReady="Office.js ще не повніÑÑ‚ÑŽ завантажено. Повторіть Ñпробу пізніше або переконайтеÑÑ, що ви додали код ініціалізації до функції Office.initialize.";Strings.OfficeOM.L_InvalidNode="ÐеприпуÑтимий вузол";Strings.OfficeOM.L_PropertyDoesNotExist='ВлаÑтивоÑÑ‚Ñ– "{0}" немає в об’єкті.';Strings.OfficeOM.L_InvalidObjectPath='ШлÑÑ… до об’єкта "{0}" не підходить Ð´Ð»Ñ Ð´Ñ–Ñ—, Ñку ви намагаєтеÑÑŒ виконати. Якщо ви викориÑтовуєте цей об’єкт у кількох викликах "context.sync" за межами поÑлідовного Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ Ð¿Ð°ÐºÐµÑ‚Ð° ".run", ÑкориÑтайтеÑÑ Ñ„ÑƒÐ½ÐºÑ†Ñ–Ñми "context.trackedObjects.add()" Ñ– "context.trackedObjects.remove()", щоб керувати чаÑом Ð¶Ð¸Ñ‚Ñ‚Ñ Ð¾Ð±â€™Ñ”ÐºÑ‚Ð°.';Strings.OfficeOM.L_UnsupportedUserIdentity="Тип ідентичноÑÑ‚Ñ– кориÑтувача не підтримуєтьÑÑ.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="Ð¡ÐµÐ°Ð½Ñ Office Online неприпуÑтимий, або Ñ‡Ð°Ñ Ð¹Ð¾Ð³Ð¾ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐ¸Ð²ÑÑ. Щоб продовжити, оновіть Ñторінку.";Strings.OfficeOM.L_EventHandlerNotExist="Вказаний обробник подій не знайдено у цьому зв\\'Ñзуванні.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Вибрано макÑимальну кількіÑÑ‚ÑŒ елементів";Strings.OfficeOM.L_RequestTokenUnavailable="Цей API наÑтроєно, щоб знизити чаÑтоту викликів.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Зробіть вибір.";Strings.OfficeOM.L_RowIndexOutOfRange="Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ–Ð½Ð´ÐµÐºÑу Ñ€Ñдка перебуває за межами припуÑтимого діапазону. Укажіть Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ (0 або більше), менше кількоÑÑ‚Ñ– Ñ€Ñдків.";Strings.OfficeOM.L_IndexOutOfRange="Ð†Ð½Ð´ÐµÐºÑ Ð¿ÐµÑ€ÐµÐ±ÑƒÐ²Ð°Ñ” за межами діапазону.";Strings.OfficeOM.L_EventHandlerRemovalFailed="Ðе вдалоÑÑ Ð²Ð¸Ð´Ð°Ð»Ð¸Ñ‚Ð¸ обробник подій.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Ðе вдалоÑÑ Ñтворити діалогове вікно через Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ Ð±Ñ€Ð°ÑƒÐ·ÐµÑ€Ð°. Домен діалогового вікна та домен хоÑта надбудови перебувають у різних зонах безпеки.";Strings.OfficeOM.L_BindingNotExist="Указане зв’ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ðµ Ñ–Ñнує.";Strings.OfficeOM.L_EventRegistrationError="Помилка реєÑтрації події";Strings.OfficeOM.L_SpecifiedIdNotExist="Указаний ідентифікатор не Ñ–Ñнує.";Strings.OfficeOM.L_MemoryLimit="Перевищено Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ Ð¿Ð°Ð¼â€™ÑÑ‚Ñ–";Strings.OfficeOM.L_DialogAddressNotTrusted="Домен цієї URL-адреÑи не включено до елемента AppDomains у маніфеÑÑ‚Ñ–.";Strings.OfficeOM.L_DataWriteReminder="ÐÐ°Ð³Ð°Ð´ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¾ запиÑÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ…";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Ðе вдалоÑÑŒ отримати файл через помилку мережі.";Strings.OfficeOM.L_InvalidSetRows="Указані Ñ€Ñдки неприпуÑтимі.";Strings.OfficeOM.L_SettingNameNotExist="Указана назва параметра не Ñ–Ñнує.";Strings.OfficeOM.L_ValueNotLoaded='Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ€ÐµÐ·ÑƒÐ»ÑŒÑ‚ÑƒÑŽÑ‡Ð¾Ð³Ð¾ об’єкта ще на завантажено. Перш ніж прочитати влаÑтивіÑÑ‚ÑŒ значеннÑ, викличте функцію "context.sync()" Ð´Ð»Ñ ÐºÐ¾Ð½Ñ‚ÐµÐºÑту пов’Ñзаного вміÑту.';Strings.OfficeOM.L_UserNotSignedIn="Ðіхто з кориÑтувачів не ввійшов у Ñлужбу Office.";Strings.OfficeOM.L_HostError="Помилка хоÑта";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Поточне Ð²Ð¸Ð´Ñ–Ð»ÐµÐ½Ð½Ñ Ð½ÐµÑуміÑне з указаним типом приведеннÑ.";Strings.OfficeOM.L_DialogInvalidScheme="Ð¦Ñ URL-Ñхема не підтримуєтьÑÑ. ЗаміÑÑ‚ÑŒ неї Ñлід викориÑтовувати HTTPS.";Strings.OfficeOM.L_InvalidAPICall="ÐеприпуÑтимий виклик API";Strings.OfficeOM.L_SetDataIsTooLarge="Указаний об’єкт даних завеликий.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Ð¡ÐµÐ°Ð½Ñ Ð½ÐµÐ¿Ñ€Ð¸Ð¿ÑƒÑтимий, або Ñ‡Ð°Ñ Ð¹Ð¾Ð³Ð¾ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐ¸Ð²ÑÑ";Strings.OfficeOM.L_ConnectionFailureWithStatus="Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ запит. Код Ñтану: {0}." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_ReadSettingsError="Помилка Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð½Ð°Ñтройок";Strings.OfficeOM.L_CannotRegisterEvent="Ðе вдалоÑÑ Ð·Ð°Ñ€ÐµÑ”Ñтрувати обробник подій.";Strings.OfficeOM.L_DialogInvalidScheme="Ð¦Ñ URL-Ñхема не підтримуєтьÑÑ. ЗаміÑÑ‚ÑŒ неї Ñлід викориÑтовувати HTTPS.";Strings.OfficeOM.L_MemoryLimit="Перевищено Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ Ð¿Ð°Ð¼â€™ÑÑ‚Ñ–";Strings.OfficeOM.L_SSOServerErrorMessage="СталаÑÑ Ð½ÐµÐ¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð° помилка на Ñервері.";Strings.OfficeOM.L_InvalidGetColumns="Указані Ñтовпці неприпуÑтимі.";Strings.OfficeOM.L_DataReadError="Помилка Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ…";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Вибрано макÑимальну кількіÑÑ‚ÑŒ елементів";Strings.OfficeOM.L_MissingParameter="ВідÑутній параметр";Strings.OfficeOM.L_InitializeNotReady="Office.js ще не повніÑÑ‚ÑŽ завантажено. Повторіть Ñпробу пізніше або переконайтеÑÑ, що ви додали код ініціалізації до функції Office.initialize.";Strings.OfficeOM.L_CustomFunctionNameCannotSplit="Ð†Ð¼â€™Ñ Ñ„ÑƒÐ½ÐºÑ†Ñ–Ñ— має міÑтити непуÑтий проÑÑ‚Ñ–Ñ€ імен Ñ– непуÑте коротке ім’Ñ.";Strings.OfficeOM.L_MultipleNamedItemFound="Знайдено кілька об’єктів з однаковим іменем.";Strings.OfficeOM.L_FunctionCallFailed="Ðе вдалоÑÑ Ð²Ð¸ÐºÐ»Ð¸ÐºÐ°Ñ‚Ð¸ функцію {0}. Код помилки: {1}.";Strings.OfficeOM.L_SettingsAreStale="Ðе вдалоÑÑ Ð·Ð±ÐµÑ€ÐµÐ³Ñ‚Ð¸ наÑтройки, тому що вони заÑтаріли.";Strings.OfficeOM.L_RequestTimeout="Виклик тривав занадто довго, тому не вдалоÑÑ Ð¹Ð¾Ð³Ð¾ виконати.";Strings.OfficeOM.L_InvalidBinding="ÐеприпуÑтиме зв’ÑзуваннÑ";Strings.OfficeOM.L_InvalidParameters="Ð¤ÑƒÐ½ÐºÑ†Ñ–Ñ {0} має неприпуÑтимі параметри.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Тип ідентичноÑÑ‚Ñ– кориÑтувача не підтримуєтьÑÑ.";Strings.OfficeOM.L_DialogRequireHTTPS="Протокол HTTP не підтримуєтьÑÑ. ЗаміÑÑ‚ÑŒ нього Ñлід викориÑтовувати HTTPS.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Ðе вдалоÑÑ Ñтворити діалогове вікно через Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ Ð±Ñ€Ð°ÑƒÐ·ÐµÑ€Ð°. Домен діалогового вікна та домен хоÑта надбудови перебувають у різних зонах безпеки.";Strings.OfficeOM.L_OverwriteWorksheetData="Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ операцію вÑтановленнÑ, тому що наданий об’єкт даних перезапише або зÑуне дані.";Strings.OfficeOM.L_RequestTokenUnavailable="Цей API наÑтроєно, щоб знизити чаÑтоту викликів.";Strings.OfficeOM.L_CustomXmlError="Помилка наÑтроюваного XML.";Strings.OfficeOM.L_CallbackNotAFunction="Зворотній виклик має бути функцією, а не {0}.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage="Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ операцію, тому що Ñ†Ñ Ð½Ð°Ð´Ð±ÑƒÐ´Ð¾Ð²Ð° не підтримує згоду кориÑтувача в цій категорії";Strings.OfficeOM.L_ConnectionFailureWithStatus="Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ запит. Код Ñтану: {0}.";Strings.OfficeOM.L_InvalidValue="ÐеприпуÑтиме значеннÑ";Strings.OfficeOM.L_EventHandlerAdditionFailed="Ðе вдалоÑÑ Ð´Ð¾Ð´Ð°Ñ‚Ð¸ обробник подій.";Strings.OfficeOM.L_InternalErrorDescription="СталаÑÑ Ð²Ð½ÑƒÑ‚Ñ€Ñ–ÑˆÐ½Ñ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ°.";Strings.OfficeOM.L_SelectionCannotBound="Ðе вдалоÑÑ Ð·Ð²â€™Ñзати з поточним виділеннÑм.";Strings.OfficeOM.L_InvalidObjectPath='ШлÑÑ… до об’єкта "{0}" не підходить Ð´Ð»Ñ Ð´Ñ–Ñ—, Ñку ви намагаєтеÑÑŒ виконати. Якщо ви викориÑтовуєте цей об’єкт у кількох викликах "context.sync" за межами поÑлідовного Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ Ð¿Ð°ÐºÐµÑ‚Ð° ".run", ÑкориÑтайтеÑÑ Ñ„ÑƒÐ½ÐºÑ†Ñ–Ñми "context.trackedObjects.add()" Ñ– "context.trackedObjects.remove()", щоб керувати чаÑом Ð¶Ð¸Ñ‚Ñ‚Ñ Ð¾Ð±â€™Ñ”ÐºÑ‚Ð°.';Strings.OfficeOM.L_InvalidNode="ÐеприпуÑтимий вузол";Strings.OfficeOM.L_InvalidSetColumns="Указані Ñтовпці неприпуÑтимі.";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Програма {0} не Ñ–Ñнує. Ðе вдалоÑÑ Ð²Ð¸ÐºÐ»Ð¸ÐºÐ°Ñ‚Ð¸ Ñлужбу Microsoft.Office.WebExtension.initialize(reason).";Strings.OfficeOM.L_DataNotMatchBindingSize="Ðаданий об’єкт даних не відповідає розміру поточного виділеннÑ.";Strings.OfficeOM.L_InvalidFormat="Помилка неприпуÑтимого формату";Strings.OfficeOM.L_DataWriteReminder="ÐÐ°Ð³Ð°Ð´ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¾ запиÑÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ…";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Указаний тип зв’ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ Ð½ÐµÑуміÑний із наданим іменованим елементом.";Strings.OfficeOM.L_ConnectionFailureWithDetails="Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ запит. Код Ñтану: {0}; код помилки: {1}; Ð¿Ð¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ð¿Ñ€Ð¾ помилку: {2}. ";Strings.OfficeOM.L_OutOfRange="За межами діапазону";Strings.OfficeOM.L_DialogAlreadyOpened="Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ операцію, тому що Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— надбудови активовано діалогове вікно.";Strings.OfficeOM.L_NetworkProblem="Проблема мережі";Strings.OfficeOM.L_SaveSettingsError="Помилка Ð·Ð±ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ Ð½Ð°Ñтройок";Strings.OfficeOM.L_MissingRequiredArguments="відÑутні кілька обов’Ñзкових аргументів";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="Примітка: рекомендована кількіÑÑ‚ÑŒ наборів форматуваннÑ, Ñтворених за допомогою виклику API форматуваннÑ, – не більше 100.";Strings.OfficeOM.L_CustomXmlNodeNotFound="Ðе вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ вказаний вузол.";Strings.OfficeOM.L_InvalidBindingOperation="ÐеприпуÑтима Ð¾Ð¿ÐµÑ€Ð°Ñ†Ñ–Ñ Ð·Ð²â€™ÑзуваннÑ";Strings.OfficeOM.L_InvalidApiCallInContext="ÐеприпуÑтимий виклик API Ð´Ð»Ñ Ð¿Ð¾Ñ‚Ð¾Ñ‡Ð½Ð¾Ð³Ð¾ контекÑту.";Strings.OfficeOM.L_InvalidRequestContext="Ðе можна викориÑтовувати цей об’єкт у різних контекÑтах запитів.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="Параметр XPath дозволÑÑ” вибрати до 1024 елементів.";Strings.OfficeOM.L_DataStale="Дані заÑтаріли";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Ðадбудова вже запитує маркер доÑтупу.";Strings.OfficeOM.L_SSOServerError="СталаÑÑ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ° поÑтачальника автентифікації.";Strings.OfficeOM.L_SpecifiedIdNotExist="Указаний ідентифікатор не Ñ–Ñнує.";Strings.OfficeOM.L_CustomFunctionNameContainsBadChars="Ð†Ð¼â€™Ñ Ñ„ÑƒÐ½ÐºÑ†Ñ–Ñ— може міÑтити лише літери, цифри, підкреÑÐ»ÐµÐ½Ð½Ñ Ñ‚Ð° крапки.";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_CoercionTypeNotSupported="Указаний тип Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð½Ðµ підтримуєтьÑÑ.";Strings.OfficeOM.L_PropertyDoesNotExist='ВлаÑтивоÑÑ‚Ñ– "{0}" немає в об’єкті.';Strings.OfficeOM.L_PermissionDenied="Відмовлено в дозволі";Strings.OfficeOM.L_ValueNotLoaded='Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ€ÐµÐ·ÑƒÐ»ÑŒÑ‚ÑƒÑŽÑ‡Ð¾Ð³Ð¾ об’єкта ще на завантажено. Перш ніж прочитати влаÑтивіÑÑ‚ÑŒ значеннÑ, викличте функцію "context.sync()" Ð´Ð»Ñ ÐºÐ¾Ð½Ñ‚ÐµÐºÑту пов’Ñзаного вміÑту.';Strings.OfficeOM.L_InvalidOrTimedOutSession="Ð¡ÐµÐ°Ð½Ñ Ð½ÐµÐ¿Ñ€Ð¸Ð¿ÑƒÑтимий, або Ñ‡Ð°Ñ Ð¹Ð¾Ð³Ð¾ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐ¸Ð²ÑÑ";Strings.OfficeOM.L_UnsupportedEnumerationMessage="ÐŸÐµÑ€ÐµÐ»Ñ–Ñ‡ÐµÐ½Ð½Ñ Ð½Ðµ підтримуєтьÑÑ Ð² поточній хоÑÑ‚-програмі.";Strings.OfficeOM.L_DataNotMatchSelection="Ðаданий об’єкт даних неÑуміÑний із фігурою або розмірами поточного виділеннÑ.";Strings.OfficeOM.L_RedundantCallbackSpecification="Зворотній виклик не можна вказати одночаÑно у ÑпиÑку аргументів Ñ– Ñк додатковий об’єкт.";Strings.OfficeOM.L_SliceSizeNotSupported="Указаний розмір роздільника не підтримуєтьÑÑ.";Strings.OfficeOM.L_CustomFunctionDefinitionMissing="ВлаÑтивіÑÑ‚ÑŒ із таким іменем, Ñка предÑтавлÑÑ” Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ„ÑƒÐ½ÐºÑ†Ñ–Ñ—, має Ñ–Ñнувати в Excel.CustomFunctions.";Strings.OfficeOM.L_InvalidGrant="ВідÑутні попередні відомоÑÑ‚Ñ– авторизації.";Strings.OfficeOM.L_InvalidGrantMessage="Ð”Ð»Ñ Ñ†Ñ–Ñ”Ñ— надбудови не надано дозволи.";Strings.OfficeOM.L_NotSupportedEventType="Указаний тип події {0} не підтримуєтьÑÑ.";Strings.OfficeOM.L_CannotWriteToSelection="Ðе вдалоÑÑ Ð·Ð°Ð¿Ð¸Ñати до поточного виділеннÑ.";Strings.OfficeOM.L_EventRegistrationError="Помилка реєÑтрації події";Strings.OfficeOM.L_ColIndexOutOfRange="Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ–Ð½Ð´ÐµÐºÑу ÑÑ‚Ð¾Ð²Ð¿Ñ†Ñ Ð¿ÐµÑ€ÐµÐ±ÑƒÐ²Ð°Ñ” за межами припуÑтимого діапазону. Укажіть Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ (0 або більше), менше кількоÑÑ‚Ñ– Ñтовпців.";Strings.OfficeOM.L_OsfControlTypeNotSupported="Тип OsfControl не підтримуєтьÑÑ.";Strings.OfficeOM.L_CustomFunctionImplementationMissing='ВлаÑтивіÑÑ‚ÑŒ із таким іменем в Excel.CustomFunctions, Ñка предÑтавлÑÑ” Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ„ÑƒÐ½ÐºÑ†Ñ–Ñ—, має міÑтити влаÑтивіÑÑ‚ÑŒ "call", що впроваджує функцію.';Strings.OfficeOM.L_InvalidSelectionForBindingType="Ðеможливо Ñтворити зв’ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ Ð· поточним виділеннÑм Ñ– вказаним типом.";Strings.OfficeOM.L_InvalidFormatValue="Принаймні один параметр формату має неприпуÑтиме значеннÑ. Перевірте Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ– Ñпробуйте ще раз.";Strings.OfficeOM.L_GetDataParametersConflict="Указані параметри конфліктують.";Strings.OfficeOM.L_TooManyIncompleteRequests="ДочекайтеÑÑ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð¿Ð¾Ð¿ÐµÑ€ÐµÐ´Ð½ÑŒÐ¾Ð³Ð¾ виклику.";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="налаштуйте Ñвій браузер";Strings.OfficeOM.L_BrowserAPINotSupported="Цей браузер не підтримує запитаний API.";Strings.OfficeOM.L_InvalidTableOptionValue="Принаймні один параметр tableOptions має неприпуÑтиме значеннÑ. Перевірте Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ– Ñпробуйте ще раз.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Дані заÑтаріли";Strings.OfficeOM.L_NoCapability="У Ð²Ð°Ñ Ð½ÐµÐ´Ð¾Ñтатньо дозволів Ð´Ð»Ñ Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ Ñ†Ñ–Ñ”Ñ— дії.";Strings.OfficeOM.L_NotSupported="Ð¤ÑƒÐ½ÐºÑ†Ñ–Ñ {0} не підтримуєтьÑÑ.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Вибраний вміÑÑ‚ має бути у форматі таблиці. Відформатуйте дані Ñк таблицю та повторіть Ñпробу.";Strings.OfficeOM.L_BindingCreationError="Помилка ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð·Ð²â€™ÑзуваннÑ";Strings.OfficeOM.L_ActivityLimitReached="ДоÑÑгнуто Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ Ð½Ð° кількіÑÑ‚ÑŒ дій.";Strings.OfficeOM.L_NotImplemented="Функцію {0} не виконано.";Strings.OfficeOM.L_TooManyArguments="забагато аргументів";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ цю операцію, тому що Ñ†Ñ Ð½Ð°Ð´Ð±ÑƒÐ´Ð¾Ð²Ð° вже запитує маркер доÑтупу.";Strings.OfficeOM.L_UserAbortedMessage="КориÑтувач не погодивÑÑ Ð· дозволами надбудови.";Strings.OfficeOM.L_EventHandlerNotExist="Вказаний обробник подій не знайдено у цьому зв\\'Ñзуванні.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Указані Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ rowCount або columnCount неприпуÑтимі.";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="Ð¡ÐµÐ°Ð½Ñ Office Online неприпуÑтимий, або Ñ‡Ð°Ñ Ð¹Ð¾Ð³Ð¾ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐ¸Ð²ÑÑ. Щоб продовжити, оновіть Ñторінку.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Дозволити";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod='Ðе можна заÑтоÑувати зміни влаÑтивоÑÑ‚Ñ– "{0}" за допомогою методу "object.set".';Strings.OfficeOM.L_BindingToMultipleSelection="ПереривчаÑÑ‚Ñ– Ð²Ð¸Ð´Ñ–Ð»ÐµÐ½Ð½Ñ Ð½Ðµ підтримуютьÑÑ.";Strings.OfficeOM.L_DialogNavigateError="Помилка переходу діалогового вікна";Strings.OfficeOM.L_AppNameNotExist="Ðазва надбудови Ð´Ð»Ñ {0} не Ñ–Ñнує.";Strings.OfficeOM.L_NewWindowCrossZone='Ðе вдалоÑÑ Ñтворити діалогове вікно через параметри безпеки вашого браузера. СкориÑтайтеÑÑŒ іншим браузером, або {0} так, щоб домен "{1}" Ñ– домен, Ñкий відображаєтьÑÑ Ð² адреÑному Ñ€Ñдку, перебували в одній зоні безпеки.';Strings.OfficeOM.L_DocumentReadOnly="ОпераціÑ, на Ñку Ñтворено запит, заборонена Ð´Ð»Ñ Ð¿Ð¾Ñ‚Ð¾Ñ‡Ð½Ð¾Ð³Ð¾ режиму документа.";Strings.OfficeOM.L_InvalidSetRows="Указані Ñ€Ñдки неприпуÑтимі.";Strings.OfficeOM.L_UserAborted="КориÑтувач перервав запит на згоду.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="ÐžÐ¿ÐµÑ€Ð°Ñ†Ñ–Ñ Ð½Ðµ підтримуєтьÑÑ Ñ†Ð¸Ð¼ типом зв’ÑзуваннÑ.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="ПропуÑтити";Strings.OfficeOM.L_InvalidGetRows="Указані Ñ€Ñдки неприпуÑтимі.";Strings.OfficeOM.L_NotSupportedBindingType="Указаний тип зв’ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ {0} не підтримуєтьÑÑ.";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Зробіть вибір.";Strings.OfficeOM.L_InternalError="Ð’Ð½ÑƒÑ‚Ñ€Ñ–ÑˆÐ½Ñ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ°";Strings.OfficeOM.L_InValidOptionalArgument="неприпуÑтимий необов’Ñзковий аргумент";Strings.OfficeOM.L_InvalidReadForBlankRow="Указаний Ñ€Ñдок порожній.";Strings.OfficeOM.L_FileTypeNotSupported="Указаний тип файлу не підтримуєтьÑÑ.";Strings.OfficeOM.L_InvalidResourceUrl="Указано неприпуÑтиму URL-адреÑу реÑурÑу програми.";Strings.OfficeOM.L_GetSelectionNotSupported="Поточне Ð²Ð¸Ð´Ñ–Ð»ÐµÐ½Ð½Ñ Ð½Ðµ підтримуєтьÑÑ.";Strings.OfficeOM.L_InvalidSetStartRowColumn="Указані Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ startRow або startColumn неприпуÑтимі.";Strings.OfficeOM.L_SSOClientError="СталаÑÑ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ° під Ñ‡Ð°Ñ Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ Ð·Ð°Ð¿Ð¸Ñ‚Ñƒ автентифікації з Office.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Указаний тип Ð¿Ñ€Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð½ÐµÑуміÑний з указаним типом зв’ÑзуваннÑ.";Strings.OfficeOM.L_TooManyOptionalFunction="у ÑпиÑку параметрів кілька необов’Ñзкових функцій";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Ці дані заÑтарілі. Отримайте об’єкт ще раз.";Strings.OfficeOM.L_IndexOutOfRange="Ð†Ð½Ð´ÐµÐºÑ Ð¿ÐµÑ€ÐµÐ±ÑƒÐ²Ð°Ñ” за межами діапазону.";Strings.OfficeOM.L_NamedItemNotFound="Іменований елемент не Ñ–Ñнує.";Strings.OfficeOM.L_BindingNotExist="Указане зв’ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ðµ Ñ–Ñнує.";Strings.OfficeOM.L_UserNotSignedIn="Ðіхто з кориÑтувачів не ввійшов у Ñлужбу Office.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Поточне Ð²Ð¸Ð´Ñ–Ð»ÐµÐ½Ð½Ñ Ð½ÐµÑуміÑне з указаним типом приведеннÑ.";Strings.OfficeOM.L_InvalidArgumentGeneric="Передані функції документи відÑутні, не підходÑÑ‚ÑŒ Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— Ñитуації або мають неправильний формат.";Strings.OfficeOM.L_UnsupportedEnumeration="Ðепідтримуване переліченнÑ";Strings.OfficeOM.L_ApiNotFoundDetails='Метод або влаÑтивіÑÑ‚ÑŒ "{0}" належать до набору вимог {1}, недоÑтупного у вашій верÑÑ–Ñ— {2}.';Strings.OfficeOM.L_ElementMissing="Ðе вдалоÑÑ Ð²Ñ–Ð´Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚ÑƒÐ²Ð°Ñ‚Ð¸ клітинку таблиці, оÑкільки відÑутні деÑкі Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ñ–Ð². Перевірте параметри та Ñпробуйте ще раз.";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty='Триває Ñпроба налаштувати доÑтупну тільки Ð´Ð»Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð²Ð»Ð°ÑтивіÑÑ‚ÑŒ "{0}".';Strings.OfficeOM.L_ShowWindowDialogNotification="Ðадбудові {0} потрібно відкрити нове вікно.";Strings.OfficeOM.L_DataNotMatchBindingType="Указаний об’єкт даних неÑуміÑний із типом зв’ÑзуваннÑ.";Strings.OfficeOM.L_InvalidBindingError="Помилка неприпуÑтимого зв’ÑзуваннÑ";Strings.OfficeOM.L_SettingNameNotExist="Указана назва параметра не Ñ–Ñнує.";Strings.OfficeOM.L_SettingsStaleError="Помилка заÑтарілих наÑтройок";Strings.OfficeOM.L_ShuttingDown="Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ операцію, тому що дані на Ñервері заÑтаріли.";Strings.OfficeOM.L_FormattingReminder="ÐÐ°Ð³Ð°Ð´ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¾ форматуваннÑ";Strings.OfficeOM.L_InvalidAPICall="ÐеприпуÑтимий виклик API";Strings.OfficeOM.L_APINotSupported="API не підтримуєтьÑÑ";Strings.OfficeOM.L_DataNotMatchCoercionType="Тип указаного об’єкта даних неÑуміÑний із поточним виділеннÑм.";Strings.OfficeOM.L_InvalidGetStartRowColumn="Указані Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ startRow або startColumn неприпуÑтимі.";Strings.OfficeOM.L_InvalidSSOAddinMessage="Ð†Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ API ідентичноÑÑ‚Ñ– не підтримуєтьÑÑ Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— надбудови.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Параметри координати не підлÑгають викориÑтанню з таблицею типу приведеннÑ, коли вона міÑтить злиті клітинки.";Strings.OfficeOM.L_RunMustReturnPromise='Пакетна функціÑ, передана методу ".run", не повернула зобов’ÑзаннÑ. Ð¦Ñ Ñ„ÑƒÐ½ÐºÑ†Ñ–Ñ Ð¼Ð°Ñ” повернути зобов’ÑзаннÑ, щоб уÑÑ– автоматично відÑтежувані об’єкти можна було вивільнити в момент Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð¾Ð±Ñ€Ð¾Ð±ÐºÐ¸ пакета. Зазвичай зобов’ÑÐ·Ð°Ð½Ð½Ñ â€“ це відповідь, Ñку повернула Ñ„ÑƒÐ½ÐºÑ†Ñ–Ñ "context.sync()".';Strings.OfficeOM.L_DataWriteError="Помилка запиÑÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ…";Strings.OfficeOM.L_InvalidCellsValue="Принаймні один параметр клітинок має неприпуÑтиме значеннÑ. Перевірте Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ– Ñпробуйте ще раз.";Strings.OfficeOM.L_CannotNavigateTo="Об’єкт розташовано там, де не підтримуєтьÑÑ Ð½Ð°Ð²Ñ–Ð³Ð°Ñ†Ñ–Ñ.";Strings.OfficeOM.L_InvalidArgument='Ðргумент "{0}" відÑутній, має неправильний формат, або його не можна викориÑтовувати в цій Ñитуації.';Strings.OfficeOM.L_SetDataIsTooLarge="Указаний об’єкт даних завеликий.";Strings.OfficeOM.L_InvalidDataObject="ÐеприпуÑтимий об’єкт даних";Strings.OfficeOM.L_InvalidColumnsForBinding="Указані Ñтовпці неприпуÑтимі.";Strings.OfficeOM.L_OperationNotSupported="ÐžÐ¿ÐµÑ€Ð°Ñ†Ñ–Ñ Ð½Ðµ підтримуєтьÑÑ.";Strings.OfficeOM.L_UnsupportedUserIdentity="Тип ідентичноÑÑ‚Ñ– кориÑтувача не підтримуєтьÑÑ.";Strings.OfficeOM.L_DisplayDialogError="Помилка Ð²Ñ–Ð´Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð½Ñ Ð´Ñ–Ð°Ð»Ð¾Ð³Ð¾Ð²Ð¾Ð³Ð¾ вікна";Strings.OfficeOM.L_FormatValueOutOfRange="Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿ÐµÑ€ÐµÐ±ÑƒÐ²Ð°Ñ” за межами припуÑтимого діапазону.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory="Ð¦Ñ Ð½Ð°Ð´Ð±ÑƒÐ´Ð¾Ð²Ð° не підтримує згоду кориÑтувача.";Strings.OfficeOM.L_SSOConnectionLostError="A connection was lost during the sign in process.";Strings.OfficeOM.L_SetDataParametersConflict="Указані параметри конфліктують.";Strings.OfficeOM.L_InvalidApiArgumentsMessage="ÐеприпуÑтимі вхідні аргументи.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="Примітка: рекомендована кількіÑÑ‚ÑŒ клітинок у таблиці – менше 20 000.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Ðе вдалоÑÑŒ отримати файл через помилку мережі.";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Виконайте команду closeAsync Ð´Ð»Ñ Ð¿Ð¾Ñ‚Ð¾Ñ‡Ð½Ð¾Ð³Ð¾ файлу, перш ніж отримати наÑтупний.";Strings.OfficeOM.L_SSOClientErrorMessage="СталаÑÑ Ð½ÐµÐ¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð° помилка в клієнті.";Strings.OfficeOM.L_UnknownBindingType="Тип зв’ÑÐ·ÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ðµ підтримуєтьÑÑ.";Strings.OfficeOM.L_BadSelectorString="Переданий у Ñелектор Ñ€Ñдок має неприпуÑтимий формат або не підтримуєтьÑÑ.";Strings.OfficeOM.L_InvalidDataFormat="ÐеприпуÑтимий формат указаного об’єкта даних.";Strings.OfficeOM.L_InvalidOperationInCellEditMode="Ð’ Excel зараз відкрито режим Ñ€ÐµÐ´Ð°Ð³ÑƒÐ²Ð°Ð½Ð½Ñ ÐºÐ»Ñ–Ñ‚Ð¸Ð½Ð¾Ðº. Закрийте цей режим, натиÑнувши клавішу Enter або Tab чи вибравши іншу клітинку, а потім Ñпробуйте ще раз.";Strings.OfficeOM.L_TooManyOptionalObjects="у ÑпиÑку параметрів кілька необов’Ñзкових об’єктів";Strings.OfficeOM.L_GetDataIsTooLarge="Запитаний набір даних завеликий.";Strings.OfficeOM.L_EventHandlerRemovalFailed="Ðе вдалоÑÑ Ð²Ð¸Ð´Ð°Ð»Ð¸Ñ‚Ð¸ обробник подій.";Strings.OfficeOM.L_InvalidResourceUrlMessage="У маніфеÑÑ‚Ñ– вказано неприпуÑтиму URL-адреÑу реÑурÑу.";Strings.OfficeOM.L_SSOConnectionLostErrorMessage="A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones.";Strings.OfficeOM.L_UserClickIgnore="КориÑтувач вирішив пропуÑтити діалогове вікно.";Strings.OfficeOM.L_PropertyNotLoaded='ВлаÑтивіÑÑ‚ÑŒ "{0}" недоÑтупна. Перш ніж прочитати Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²Ð»Ð°ÑтивоÑÑ‚Ñ–, викличте метод Ð·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶ÐµÐ½Ð½Ñ (load) Ð´Ð»Ñ Ð¾Ð±â€™Ñ”ÐºÑ‚Ð°, що Ñ—Ñ— міÑтить, Ñ– викличте функцію "context.sync()" Ð´Ð»Ñ ÐºÐ¾Ð½Ñ‚ÐµÐºÑту пов’Ñзаного запиту.';Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Параметри координати не підлÑгають викориÑтанню з таблицею типу приведеннÑ, коли вона міÑтить злиті клітинки.";Strings.OfficeOM.L_APICallFailed="Ðе вдалоÑÑ Ð·Ð´Ñ–Ð¹Ñнити виклик API";Strings.OfficeOM.L_RowIndexOutOfRange="Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ–Ð½Ð´ÐµÐºÑу Ñ€Ñдка перебуває за межами припуÑтимого діапазону. Укажіть Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ (0 або більше), менше кількоÑÑ‚Ñ– Ñ€Ñдків.";Strings.OfficeOM.L_InvalidCoercion="ÐеприпуÑтимий тип приведеннÑ";Strings.OfficeOM.L_HostError="Помилка хоÑта";Strings.OfficeOM.L_DialogAddressNotTrusted="Домен цієї URL-адреÑи не включено до елемента AppDomains у маніфеÑÑ‚Ñ–.";Strings.OfficeOM.L_NavOutOfBound="Ðе вдалоÑÑ Ð²Ð¸ÐºÐ¾Ð½Ð°Ñ‚Ð¸ операцію, оÑкільки Ñ–Ð½Ð´ÐµÐºÑ Ð¿Ð¾Ð·Ð° межами діапазону.";Strings.OfficeOM.L_SettingsCannotSave="Ðе вдалоÑÑ Ð·Ð±ÐµÑ€ÐµÐ³Ñ‚Ð¸ наÑтройки.";Strings.OfficeOM.L_Timeout="Ð§Ð°Ñ Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ñ–Ñ— завершивÑÑ.";Strings.OfficeOM.L_UnsupportedDataObject="Ðаданий тип об’єкта даних не підтримуєтьÑÑ." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/uk-ua/outlook_strings.debug.js b/node_modules/@microsoft/office-js/dist/uk-ua/outlook_strings.debug.js index 2db9f21..c0171bb 100644 --- a/node_modules/@microsoft/office-js/dist/uk-ua/outlook_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/uk-ua/outlook_strings.debug.js @@ -1,34 +1,35 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("_u"); _u.ExtensibilityStrings = function() { }; _u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings"); +_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Загальна кількіÑÑ‚ÑŒ одержувачів у полі не має перевищувати {0}."; +_u.ExtensibilityStrings.l_OffsetNotfound_Text = "Ð—Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— позначки чаÑу не знайдено."; +_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "КориÑтувач видалив Ð²ÐºÐ»Ð°Ð´ÐµÐ½Ð½Ñ Ð´Ð¾ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð¿ÐµÑ€ÐµÐ´Ð°Ð²Ð°Ð½Ð½Ñ."; _u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Указані параметри не відповідають припуÑтимому формату."; +_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Ðе вказано жодного припуÑтимого одержувача."; +_u.ExtensibilityStrings.l_InternalFormatError_Text = "СталаÑÑ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ°, пов’Ñзана із внутрішнім форматом."; +_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Ð’ÐºÐ»Ð°Ð´ÐµÐ½Ð½Ñ Ð½Ðµ можна видалити з елемента."; +_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Ð’ÐºÐ»Ð°Ð´ÐµÐ½Ð½Ñ Ð½Ðµ можна видалити, оÑкільки Ð²ÐºÐ»Ð°Ð´ÐµÐ½Ð½Ñ Ð· індекÑом не вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸."; +_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "ÐеприпуÑтимий шлÑÑ… до вкладеннÑ."; +_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Розмір запиту перевищує макÑимально дозволений – 1 МБ. Змініть Ñвій запит EWS."; _u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "Вибраний елемент змінено."; -_u.ExtensibilityStrings.l_InvalidEndTime_Text = "Ð§Ð°Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð½Ðµ може передувати чаÑу початку."; +_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Принаймні одна вказана адреÑа електронної пошти задовга."; +_u.ExtensibilityStrings.l_InvalidDate_Text = "Введене Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½Ðµ відповідає припуÑтимій даті."; _u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "ÐеприпуÑтимий ідентифікатор вкладеннÑ."; -_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Ð’ÐºÐ»Ð°Ð´ÐµÐ½Ð½Ñ Ð½Ðµ можна видалити, оÑкільки Ð²ÐºÐ»Ð°Ð´ÐµÐ½Ð½Ñ Ð· індекÑом не вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸."; +_u.ExtensibilityStrings.l_InternalProtocolError_Text = "Помилка внутрішнього протоколу: {0}."; _u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Ð”Ð»Ñ Ð´Ð¾Ñтупу до захищених учаÑників інтерфейÑу API JavaScript Ð´Ð»Ñ Office потрібен дозвіл вищого рівнÑ."; -_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Ð’ÐºÐ»Ð°Ð´ÐµÐ½Ð½Ñ Ð½Ðµ можна видалити з елемента."; -_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "Ðе вказано жодного припуÑтимого одержувача."; -_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "Ðе вдалоÑÑ Ð¾Ñ‡Ð¸Ñтити HTML."; -_u.ExtensibilityStrings.l_OffsetNotfound_Text = "Ð—Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— позначки чаÑу не знайдено."; -_u.ExtensibilityStrings.l_InvalidDate_Text = "Введене Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½Ðµ відповідає припуÑтимій даті."; -_u.ExtensibilityStrings.l_InvalidEventDates_Text = "Дата Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð¿ÐµÑ€ÐµÐ´ÑƒÑ” даті початку."; -_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Принаймні одне вказане коротке Ñ–Ð¼â€™Ñ Ð·Ð°Ð´Ð¾Ð²Ð³Ðµ."; -_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Принаймні одна вказана адреÑа електронної пошти задовга."; +_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Ð’ÐºÐ»Ð°Ð´ÐµÐ½Ð½Ñ Ð½Ðµ можна додати до цього елемента."; _u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Ð’ÐºÐ»Ð°Ð´ÐµÐ½Ð½Ñ Ð½Ðµ можна додавати, коли із Ñервера отримуютьÑÑ Ð¿Ð¾Ð²Ð½Ð° відповідь або переÑлане повідомленнÑ."; -_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Розмір запиту перевищує макÑимально дозволений – 1 МБ. Змініть Ñвій запит EWS."; -_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "ÐеприпуÑтимий шлÑÑ… до вкладеннÑ."; -_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "Ð’ÑтавлÑючи дані, кориÑтувач змінив Ð¿Ð¾Ð»Ð¾Ð¶ÐµÐ½Ð½Ñ ÐºÑƒÑ€Ñору."; +_u.ExtensibilityStrings.l_InvalidEventDates_Text = "Дата Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð¿ÐµÑ€ÐµÐ´ÑƒÑ” даті початку."; +_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "Ðе вдалоÑÑ Ð¾Ñ‡Ð¸Ñтити HTML."; +_u.ExtensibilityStrings.l_InvalidEndTime_Text = "Ð§Ð°Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð½Ðµ може передувати чаÑу початку."; _u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = 'Ð”Ð»Ñ Ð²Ð¸ÐºÐ»Ð¸ÐºÑƒ методу "{0}" потрібен дозвіл вищого рівнÑ.'; -_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Ð’ÐºÐ»Ð°Ð´ÐµÐ½Ð½Ñ Ð½Ðµ можна додати до цього елемента."; -_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Ð’ÐºÐ»Ð°Ð´ÐµÐ½Ð½Ñ Ð½Ðµ можна додати, оÑкільки воно завелике."; -_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Загальна кількіÑÑ‚ÑŒ одержувачів у полі не має перевищувати {0}."; -_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "КориÑтувач видалив Ð²ÐºÐ»Ð°Ð´ÐµÐ½Ð½Ñ Ð´Ð¾ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð¿ÐµÑ€ÐµÐ´Ð°Ð²Ð°Ð½Ð½Ñ."; -_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Помилка вкладеннÑ"; _u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Ð’ÐºÐ»Ð°Ð´ÐµÐ½Ð½Ñ Ð½Ðµ можна додати, оÑкільки Ð¿Ð¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ð²Ð¶Ðµ міÑтить макÑимальну кількіÑÑ‚ÑŒ вкладень"; +_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Помилка вкладеннÑ"; +_u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Принаймні одне вказане коротке Ñ–Ð¼â€™Ñ Ð·Ð°Ð´Ð¾Ð²Ð³Ðµ."; _u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Помилка запиÑÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ…"; -_u.ExtensibilityStrings.l_InternalProtocolError_Text = "Помилка внутрішнього протоколу: {0}."; -_u.ExtensibilityStrings.l_InternalFormatError_Text = "СталаÑÑ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ°, пов’Ñзана із внутрішнім форматом." +_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "Ð’ÑтавлÑючи дані, кориÑтувач змінив Ð¿Ð¾Ð»Ð¾Ð¶ÐµÐ½Ð½Ñ ÐºÑƒÑ€Ñору."; +_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Ð’ÐºÐ»Ð°Ð´ÐµÐ½Ð½Ñ Ð½Ðµ можна додати, оÑкільки воно завелике." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/uk-ua/outlook_strings.js b/node_modules/@microsoft/office-js/dist/uk-ua/outlook_strings.js index 8d4e63a..24b9dc8 100644 --- a/node_modules/@microsoft/office-js/dist/uk-ua/outlook_strings.js +++ b/node_modules/@microsoft/office-js/dist/uk-ua/outlook_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Указані параметри не відповідають припуÑтимому формату.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Вибраний елемент змінено.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="Ð§Ð°Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð½Ðµ може передувати чаÑу початку.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="ÐеприпуÑтимий ідентифікатор вкладеннÑ.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Ð’ÐºÐ»Ð°Ð´ÐµÐ½Ð½Ñ Ð½Ðµ можна видалити, оÑкільки Ð²ÐºÐ»Ð°Ð´ÐµÐ½Ð½Ñ Ð· індекÑом не вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Ð”Ð»Ñ Ð´Ð¾Ñтупу до захищених учаÑників інтерфейÑу API JavaScript Ð´Ð»Ñ Office потрібен дозвіл вищого рівнÑ.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Ð’ÐºÐ»Ð°Ð´ÐµÐ½Ð½Ñ Ð½Ðµ можна видалити з елемента.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Ðе вказано жодного припуÑтимого одержувача.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="Ðе вдалоÑÑ Ð¾Ñ‡Ð¸Ñтити HTML.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Ð—Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— позначки чаÑу не знайдено.";_u.ExtensibilityStrings.l_InvalidDate_Text="Введене Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½Ðµ відповідає припуÑтимій даті.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="Дата Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð¿ÐµÑ€ÐµÐ´ÑƒÑ” даті початку.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Принаймні одне вказане коротке Ñ–Ð¼â€™Ñ Ð·Ð°Ð´Ð¾Ð²Ð³Ðµ.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Принаймні одна вказана адреÑа електронної пошти задовга.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Ð’ÐºÐ»Ð°Ð´ÐµÐ½Ð½Ñ Ð½Ðµ можна додавати, коли із Ñервера отримуютьÑÑ Ð¿Ð¾Ð²Ð½Ð° відповідь або переÑлане повідомленнÑ.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Розмір запиту перевищує макÑимально дозволений – 1 МБ. Змініть Ñвій запит EWS.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="ÐеприпуÑтимий шлÑÑ… до вкладеннÑ.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="Ð’ÑтавлÑючи дані, кориÑтувач змінив Ð¿Ð¾Ð»Ð¾Ð¶ÐµÐ½Ð½Ñ ÐºÑƒÑ€Ñору.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text='Ð”Ð»Ñ Ð²Ð¸ÐºÐ»Ð¸ÐºÑƒ методу "{0}" потрібен дозвіл вищого рівнÑ.';_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Ð’ÐºÐ»Ð°Ð´ÐµÐ½Ð½Ñ Ð½Ðµ можна додати до цього елемента.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Ð’ÐºÐ»Ð°Ð´ÐµÐ½Ð½Ñ Ð½Ðµ можна додати, оÑкільки воно завелике.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Загальна кількіÑÑ‚ÑŒ одержувачів у полі не має перевищувати {0}.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="КориÑтувач видалив Ð²ÐºÐ»Ð°Ð´ÐµÐ½Ð½Ñ Ð´Ð¾ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð¿ÐµÑ€ÐµÐ´Ð°Ð²Ð°Ð½Ð½Ñ.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Помилка вкладеннÑ";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Ð’ÐºÐ»Ð°Ð´ÐµÐ½Ð½Ñ Ð½Ðµ можна додати, оÑкільки Ð¿Ð¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ð²Ð¶Ðµ міÑтить макÑимальну кількіÑÑ‚ÑŒ вкладень";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Помилка запиÑÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ…";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Помилка внутрішнього протоколу: {0}.";_u.ExtensibilityStrings.l_InternalFormatError_Text="СталаÑÑ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ°, пов’Ñзана із внутрішнім форматом." \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Загальна кількіÑÑ‚ÑŒ одержувачів у полі не має перевищувати {0}.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Ð—Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ð´Ð»Ñ Ñ†Ñ–Ñ”Ñ— позначки чаÑу не знайдено.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="КориÑтувач видалив Ð²ÐºÐ»Ð°Ð´ÐµÐ½Ð½Ñ Ð´Ð¾ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð¿ÐµÑ€ÐµÐ´Ð°Ð²Ð°Ð½Ð½Ñ.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Указані параметри не відповідають припуÑтимому формату.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="Ðе вказано жодного припуÑтимого одержувача.";_u.ExtensibilityStrings.l_InternalFormatError_Text="СталаÑÑ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ°, пов’Ñзана із внутрішнім форматом.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Ð’ÐºÐ»Ð°Ð´ÐµÐ½Ð½Ñ Ð½Ðµ можна видалити з елемента.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Ð’ÐºÐ»Ð°Ð´ÐµÐ½Ð½Ñ Ð½Ðµ можна видалити, оÑкільки Ð²ÐºÐ»Ð°Ð´ÐµÐ½Ð½Ñ Ð· індекÑом не вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="ÐеприпуÑтимий шлÑÑ… до вкладеннÑ.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Розмір запиту перевищує макÑимально дозволений – 1 МБ. Змініть Ñвій запит EWS.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Вибраний елемент змінено.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Принаймні одна вказана адреÑа електронної пошти задовга.";_u.ExtensibilityStrings.l_InvalidDate_Text="Введене Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½Ðµ відповідає припуÑтимій даті.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="ÐеприпуÑтимий ідентифікатор вкладеннÑ.";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Помилка внутрішнього протоколу: {0}.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Ð”Ð»Ñ Ð´Ð¾Ñтупу до захищених учаÑників інтерфейÑу API JavaScript Ð´Ð»Ñ Office потрібен дозвіл вищого рівнÑ.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Ð’ÐºÐ»Ð°Ð´ÐµÐ½Ð½Ñ Ð½Ðµ можна додати до цього елемента.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Ð’ÐºÐ»Ð°Ð´ÐµÐ½Ð½Ñ Ð½Ðµ можна додавати, коли із Ñервера отримуютьÑÑ Ð¿Ð¾Ð²Ð½Ð° відповідь або переÑлане повідомленнÑ.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="Дата Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð¿ÐµÑ€ÐµÐ´ÑƒÑ” даті початку.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="Ðе вдалоÑÑ Ð¾Ñ‡Ð¸Ñтити HTML.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="Ð§Ð°Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ Ð½Ðµ може передувати чаÑу початку.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text='Ð”Ð»Ñ Ð²Ð¸ÐºÐ»Ð¸ÐºÑƒ методу "{0}" потрібен дозвіл вищого рівнÑ.';_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Ð’ÐºÐ»Ð°Ð´ÐµÐ½Ð½Ñ Ð½Ðµ можна додати, оÑкільки Ð¿Ð¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ð²Ð¶Ðµ міÑтить макÑимальну кількіÑÑ‚ÑŒ вкладень";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Помилка вкладеннÑ";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Принаймні одне вказане коротке Ñ–Ð¼â€™Ñ Ð·Ð°Ð´Ð¾Ð²Ð³Ðµ.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Помилка запиÑÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ…";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="Ð’ÑтавлÑючи дані, кориÑтувач змінив Ð¿Ð¾Ð»Ð¾Ð¶ÐµÐ½Ð½Ñ ÐºÑƒÑ€Ñору.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Ð’ÐºÐ»Ð°Ð´ÐµÐ½Ð½Ñ Ð½Ðµ можна додати, оÑкільки воно завелике." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/vi-vn/office_strings.debug.js b/node_modules/@microsoft/office-js/dist/vi-vn/office_strings.debug.js index 3290a9f..a690d6e 100644 --- a/node_modules/@microsoft/office-js/dist/vi-vn/office_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/vi-vn/office_strings.debug.js @@ -1,179 +1,190 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("Strings"); Strings.OfficeOM = function() { }; Strings.OfficeOM.registerClass("Strings.OfficeOM"); -Strings.OfficeOM.L_InvalidValue = "Giá trị Không hợp lệ"; -Strings.OfficeOM.L_CustomXmlNodeNotFound = "Không tìm thấy nút đã xác định."; -Strings.OfficeOM.L_MissingRequiredArguments = "thiếu má»™t số đối số bắt buá»™c"; -Strings.OfficeOM.L_InternalErrorDescription = "Äã xuâÌt hiện lỗi nội bộ."; -Strings.OfficeOM.L_CannotRegisterEvent = "Không thể đăng ký quy trình xá»­ lý sá»± kiện."; -Strings.OfficeOM.L_CellDataAmountBeyondLimits = "LÆ°u ý: Số lượng ô trong má»™t bảng được Ä‘á» nghị để dÆ°á»›i 20.000 ô."; -Strings.OfficeOM.L_APINotSupported = "API Không được Há»— trợ"; -Strings.OfficeOM.L_InvalidSetStartRowColumn = "Giá trị startRow hoặc startColumn đã xác định không hợp lệ."; -Strings.OfficeOM.L_PropertyDoesNotExist = "Không tồn tại thuá»™c tính '{0}' trên đối tượng này."; -Strings.OfficeOM.L_SetDataParametersConflict = "Các tham biến đã xác định có xung Ä‘á»™t."; -Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Kiểu ghép nối đã xác định không tÆ°Æ¡ng thích vá»›i mục được đặt tên đã cung cấp."; -Strings.OfficeOM.L_InvalidArgumentGeneric = "(Các) tham đối được Ä‘Æ°a vào hàm không có phù hợp trong tình huống này, bị thiếu hoặc không ở định dạng đúng."; -Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Sá»± cố mạng đã không cho truy xuất tệp."; -Strings.OfficeOM.L_InvalidDataFormat = "Äịnh dạng của đối tượng dữ liệu đã xác định không hợp lệ."; -Strings.OfficeOM.L_AppNameNotExist = "Tên Bổ trợ cho {0} không tồn tại."; -Strings.OfficeOM.L_SSOServerErrorMessage = "Äã xảy ra lá»—i ngoài dá»± kiến trên máy chủ."; -Strings.OfficeOM.L_BrowserAPINotSupported = "Trình duyệt này không há»— trợ API được yêu cầu."; -Strings.OfficeOM.L_ShuttingDown = "Thao tác bị lá»—i vì dữ liệu không phải là má»›i nhất trên máy chủ."; -Strings.OfficeOM.L_RunMustReturnPromise = 'Hàm lô chuyển qua phÆ°Æ¡ng pháp ".run" không trả vá» má»™t lá»i hứa. Hàm phải trả vá» má»™t lá»i hứa, để có thể công bố má»i đối tượng được tá»± Ä‘á»™ng theo dõi khi hoàn tất hoạt Ä‘á»™ng lô. Thông thÆ°á»ng, bạn sẽ trả vá» má»™t lá»i hứa bằng cách trả vá» phản hồi từ "context.sync()".'; -Strings.OfficeOM.L_CustomXmlError = "Lá»—i XML Tùy chỉnh."; -Strings.OfficeOM.L_InvalidGrantMessage = "Ứng dụng này bị cấp thiếu quyá»n."; -Strings.OfficeOM.L_NotImplemented = "Hàm {0} chÆ°a được triển khai."; -Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Äã đạt Giá»›i hạn vá» Vùng chá»n"; -Strings.OfficeOM.L_InvalidGetStartRowColumn = "Giá trị startRow hoặc startColumn đã xác định không hợp lệ."; -Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "LÆ°u ý: Bá»™ định dạng do lệnh gá»i Äịnh dạng API thiết lập được Ä‘á» nghị để dÆ°á»›i 100."; -Strings.OfficeOM.L_FormattingReminder = "Äịnh dạng Lá»i nhắc"; -Strings.OfficeOM.L_SettingsCannotSave = "Không thể lÆ°u thiết đặt."; -Strings.OfficeOM.L_TooManyOptionalFunction = "nhiá»u chức năng tùy chá»n trong danh sách tham số"; -Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "đặt cấu hình trình duyệt của bạn"; -Strings.OfficeOM.L_DataNotMatchCoercionType = "Kiểu đối tượng dữ liệu đã xác định không tÆ°Æ¡ng thích vá»›i lá»±a chá»n hiện tại."; -Strings.OfficeOM.L_InvalidApiCallInContext = "Lệnh gá»i API không hợp lệ trong ngữ cảnh hiện tại."; -Strings.OfficeOM.L_FunctionCallFailed = "Lệnh gá»i hàm {0} không thành công, mã lá»—i: {1}."; -Strings.OfficeOM.L_GetDataIsTooLarge = "Bá»™ dữ liệu được yêu cầu quá lá»›n."; -Strings.OfficeOM.L_NotSupportedEventType = "Không há»— trợ kiểu sá»± kiện {0} đã xác định."; +Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Kiểu ép buá»™c đã xác định không tÆ°Æ¡ng thích vá»›i kiểu ghép nối này."; Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod = "Không thể áp dụng thay đổi vá»›i thuá»™c tính '{0}' thông qua phÆ°Æ¡ng pháp \"object.set\"."; -Strings.OfficeOM.L_ColIndexOutOfRange = "Giá trị chỉ mục cá»™t nằm ngoài phạm vi cho phép. Hãy sá»­ dụng má»™t giá trị (0 hoặc cao hÆ¡n) và bé hÆ¡n số lượng cá»™t."; -Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Gá»i closeAsync trên Tệp hiện tại trÆ°á»›c khi truy xuất tệp khác."; -Strings.OfficeOM.L_SSOServerError = "Äã xảy ra lá»—i trong nhà cung cấp xác thá»±c."; -Strings.OfficeOM.L_OsfControlTypeNotSupported = "Kiểu OsfControl không được há»— trợ."; -Strings.OfficeOM.L_EventHandlerNotExist = "Không tìm thấy bá»™ xá»­ lý biến cố xác định cho gắn kết này."; -Strings.OfficeOM.L_DataStale = "Dữ liệu Không Cập nhật"; -Strings.OfficeOM.L_InternalError = "Lỗi Nội bộ"; -Strings.OfficeOM.L_BindingCreationError = "Lá»—i Tạo Ghép nối"; -Strings.OfficeOM.L_ConnectionFailureWithStatus = "Yêu cầu không thành công vá»›i mã trạng thái {0}."; -Strings.OfficeOM.L_InvalidBindingOperation = "Thao tác Ghép nối Không hợp lệ"; -Strings.OfficeOM.L_EventHandlerRemovalFailed = "Không thể loại bá» trình xá»­ lý sá»± kiện."; +Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Ứng dụng {0} không tồn tại. Microsoft.Office.WebExtension.initialize(reason) không được gá»i."; +Strings.OfficeOM.L_UserAborted = "NgÆ°á»i dùng đã hủy bá» yêu cầu cấp phép."; +Strings.OfficeOM.L_InvalidDataFormat = "Äịnh dạng của đối tượng dữ liệu đã xác định không hợp lệ."; +Strings.OfficeOM.L_ReadSettingsError = "Lá»—i Thiết đặt Äá»c"; +Strings.OfficeOM.L_DisplayDialogError = "Lá»—i Hiển thị Há»™p thoại"; +Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Thao tác không được há»— trợ trên kiểu ghép nối này."; +Strings.OfficeOM.L_InternalErrorDescription = "Äã xuâÌt hiện lỗi nội bộ."; Strings.OfficeOM.L_UserClickIgnore = "NgÆ°á»i dùng đã chá»n bá» qua há»™p thoại."; -Strings.OfficeOM.L_OutOfRange = "Ngoài Phạm vi"; -Strings.OfficeOM.L_TooManyIncompleteRequests = "ChỠđến khi cuá»™c gá»i trÆ°á»›c hoàn tất."; -Strings.OfficeOM.L_InitializeNotReady = "Office.js chÆ°a được tải hết. Vui lòng thá»­ lại sau hoặc đảm bảo thêm mã khởi tạo vào hàm Office.initialize."; -Strings.OfficeOM.L_NamedItemNotFound = "Mục được đặt tên không tồn tại."; -Strings.OfficeOM.L_MemoryLimit = "Vượt quá Giá»›i hạn Bá»™ nhá»›"; -Strings.OfficeOM.L_InvalidNode = "Nút Không hợp lệ"; -Strings.OfficeOM.L_CannotNavigateTo = "Äối tượng nằm ở vị trí không há»— trợ dẫn hÆ°á»›ng."; -Strings.OfficeOM.L_GetDataParametersConflict = "Các tham biến đã xác định có xung Ä‘á»™t."; -Strings.OfficeOM.L_NavOutOfBound = "Thao tác thất bại do chỉ mục nằm ngoài phạm vi."; -Strings.OfficeOM.L_NotSupported = "Hàm {0} không được há»— trợ."; -Strings.OfficeOM.L_DataWriteError = "Lá»—i Ghi Dữ liệu"; -Strings.OfficeOM.L_DialogAddressNotTrusted = "Phần tá»­ AppDomains trong tệp kê khai không chứa miá»n của URL."; -Strings.OfficeOM.L_RequestTimeout = "Cuá»™c gá»i mất quá lâu để thá»±c hiện."; -Strings.OfficeOM.L_CannotWriteToSelection = "Không thể ghi vào lá»±a chá»n hiện tại."; -Strings.OfficeOM.L_ValueNotLoaded = 'ChÆ°a tải giá trị của đối tượng kết quả. TrÆ°á»›c khi Ä‘á»c thuá»™c tính giá trị, hãy gá»i "context.sync()" trong ngữ cảnh yêu cầu có liên quan.'; -Strings.OfficeOM.L_UnsupportedEnumerationMessage = "Liệt kê không được há»— trợ trong ứng dụng máy chủ hiện tại."; -Strings.OfficeOM.L_InvalidSelectionForBindingType = "Không thể tạo ghép nối vá»›i lá»±a chá»n hiện tại và kiểu ghép nối đã xác định."; -Strings.OfficeOM.L_InvalidResourceUrlMessage = "Äã chỉ định Url tài nguyên không hợp lệ trong tệp kê khai."; -Strings.OfficeOM.L_InvalidSetColumns = "Các cá»™t đã xác định không hợp lệ."; -Strings.OfficeOM.L_PropertyNotLoaded = "Thuá»™c tính '{0}' không khả dụng. TrÆ°á»›c khi Ä‘á»c giá trị thuá»™c tính, hãy gá»i phÆ°Æ¡ng pháp tải cho đối tượng chứa và gá»i \"context.sync()\" cho ngữ cảnh yêu cầu được liên kết."; -Strings.OfficeOM.L_SetDataIsTooLarge = "Äối tượng dữ liệu đã xác định quá lá»›n."; -Strings.OfficeOM.L_InvalidSSOAddinMessage = "Không há»— trợ API nhận dạng cho phần bổ trợ này."; -Strings.OfficeOM.L_MissingParameter = "Thiếu Tham số"; -Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "Phiên Office Online của bạn đã hết hạn hoặc không hợp lệ. Äể tiếp tục, hãy làm má»›i trang."; -Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Các hạn chế trình duyệt đã ngăn chúng tôi tạo há»™p thoại. Miá»n của há»™p thoại và miá»n của máy chủ phần bổ trợ Ä‘ang không cùng nằm trong má»™t khu vá»±c bảo mật."; -Strings.OfficeOM.L_InvalidRequestContext = "Không thể sá»­ dụng đối tượng cho các ngữ cảnh yêu cầu khác nhau."; -Strings.OfficeOM.L_BadSelectorString = "Chuá»—i được chuyển vào công cụ chá»n không được định dạng đúng hoặc không được há»— trợ."; -Strings.OfficeOM.L_SettingsStaleError = "Lá»—i Thiết đặt CÅ©"; -Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Vui lòng chá»n."; Strings.OfficeOM.L_InvalidGetColumns = "Các cá»™t đã xác định không hợp lệ."; -Strings.OfficeOM.L_InvalidBinding = "Ghép nối Không hợp lệ"; +Strings.OfficeOM.L_DialogAlreadyOpened = "Hoạt Ä‘á»™ng không thành công vì phần bổ trợ này đã có má»™t há»™p thoại hiện hoạt."; +Strings.OfficeOM.L_SSOConnectionLostErrorMessage = "A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones."; Strings.OfficeOM.L_OperationNotSupportedOnMatrixData = "Ná»™i dung được chá»n phải ở định dạng bảng. Hãy định dạng dữ liệu dÆ°á»›i dạng bảng và thá»­ lại."; -Strings.OfficeOM.L_BindingNotExist = "Kết ghép đã xác định không tồn tại."; -Strings.OfficeOM.L_CoercionTypeNotMatchBinding = "Kiểu ép buá»™c đã xác định không tÆ°Æ¡ng thích vá»›i kiểu ghép nối này."; -Strings.OfficeOM.L_DialogRequireHTTPS = "Không há»— trợ giao thức HTTP. Sá»­ dụng HTTPS thay thế"; -Strings.OfficeOM.L_TooManyOptionalObjects = "nhiá»u đối tượng tùy chá»n trong danh sách tham số"; -Strings.OfficeOM.L_UserAborted = "NgÆ°á»i dùng đã hủy bá» yêu cầu cấp phép."; -Strings.OfficeOM.L_InvalidResourceUrl = "Äã cung cấp Url tài nguyên ứng dụng không hợp lệ."; -Strings.OfficeOM.L_InvalidObjectPath = 'ÄÆ°á»ng dẫn đối tượng \'{0}\' không phù hợp vá»›i thao tác bạn Ä‘ang cố gắng thá»±c hiện. Nếu bạn Ä‘ang sá»­ dụng đối tượng trên nhiá»u cuá»™c gá»i "context.sync" và không thuá»™c phạm vi thá»±c thi chuá»—i của lô ".run", vui lòng sá»­ dụng các phÆ°Æ¡ng pháp "context.trackedObjects.add()" và "context.trackedObjects.remove()" để quản lý thá»i hạn của đối tượng.'; -Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Giá trị rowCount hoặc columnCount đã xác định không hợp lệ."; -Strings.OfficeOM.L_NoCapability = "Bạn không có đủ quyá»n cho hành Ä‘á»™ng này."; -Strings.OfficeOM.L_UnsupportedUserIdentity = "Loại nhận dạng ngÆ°á»i dùng không được há»— trợ."; -Strings.OfficeOM.L_InvalidTableOptionValue = "Má»™t hoặc nhiá»u tham số tableOption có chứa giá trị không được phép. Hãy kiểm tra kép các giá trị rồi thá»­ lại."; -Strings.OfficeOM.L_NetworkProblem = "Vấn Ä‘á» vá» Mạng"; -Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "Äang tìm cách đặt thuá»™c tính chỉ Ä‘á»c '{0}'."; -Strings.OfficeOM.L_NewWindowCrossZone = "Thiết đặt bảo mật trong trình duyệt của bạn ngăn không cho chúng tôi tạo há»™p thoại. Hãy thá»­ dùng má»™t trình duyệt khác hoặc {0} để '{1}' và miá»n được hiển thị trong thanh địa chỉ của bạn có thể nằm trong cùng má»™t khu vá»±c bảo mật."; -Strings.OfficeOM.L_SliceSizeNotSupported = "Kích thÆ°á»›c lát cắt đã chỉ định không được há»— trợ."; -Strings.OfficeOM.L_SettingNameNotExist = "Tên thiết đặt đã xác định không tồn tại."; -Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Không thể dùng thông số tá»a Ä‘á»™ vá»›i Bảng kiểu ép buá»™c khi bảng chứa các ô được kết hợp."; +Strings.OfficeOM.L_TooManyIncompleteRequests = "ChỠđến khi cuá»™c gá»i trÆ°á»›c hoàn tất."; +Strings.OfficeOM.L_SSOServerError = "Äã xảy ra lá»—i trong nhà cung cấp xác thá»±c."; Strings.OfficeOM.L_RowIndexOutOfRange = "Giá trị chỉ mục dòng nằm ngoài phạm vi cho phép. Hãy sá»­ dụng má»™t giá trị (0 hoặc cao hÆ¡n) và nhá» hÆ¡n số lượng hàng."; -Strings.OfficeOM.L_InvalidGrant = "Thiếu cấp phép trÆ°á»›c."; -Strings.OfficeOM.L_ActivityLimitReached = "Äã đạt giá»›i hạn hoạt Ä‘á»™ng."; +Strings.OfficeOM.L_InvalidArgument = "Tham đối '{0}' không phù hợp vá»›i tình huống này, bị thiếu hoặc không có định dạng phù hợp."; +Strings.OfficeOM.L_TooManyArguments = "quá nhiá»u đối số"; Strings.OfficeOM.L_InvalidFormatValue = "Má»™t hoặc nhiá»u tham số định dạng có chứa giá trị không được phép. Hãy kiểm tra kép các giá trị rồi thá»­ lại."; +Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Bá» qua"; Strings.OfficeOM.L_InvalidColumnsForBinding = "Các cá»™t đã xác định không hợp lệ."; -Strings.OfficeOM.L_InvalidAPICall = "Lệnh gá»i API Không hợp lệ"; -Strings.OfficeOM.L_InvalidGetRows = "Các hàng đã xác định không hợp lệ."; -Strings.OfficeOM.L_FormatValueOutOfRange = "Giá trị nằm ngoài khoảng cho phép."; -Strings.OfficeOM.L_DataNotMatchBindingSize = "Äối tượng dữ liệu được cung cấp không khá»›p vá»›i kích cỡ của lá»±a chá»n hiện tại."; -Strings.OfficeOM.L_APICallFailed = "Gá»i API Không thành công"; -Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Phần bổ trợ đã Ä‘ang yêu cầu mã thông báo truy nhập."; -Strings.OfficeOM.L_RedundantCallbackSpecification = "Gá»i lại không thể được xác định trong cả danh sách đối số và đối tượng tùy chá»n."; -Strings.OfficeOM.L_InvalidArgument = "Tham đối '{0}' không phù hợp vá»›i tình huống này, bị thiếu hoặc không có định dạng phù hợp."; -Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Hoạt Ä‘á»™ng không thành công vì phần bổ trợ này đã Ä‘ang yêu cầu mã thông báo truy nhập."; -Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath giá»›i hạn lá»±a chá»n tá»›i 1024 mục."; +Strings.OfficeOM.L_OutOfRange = "Ngoài Phạm vi"; +Strings.OfficeOM.L_SSOServerErrorMessage = "Äã xảy ra lá»—i ngoài dá»± kiến trên máy chủ."; +Strings.OfficeOM.L_PropertyDoesNotExist = "Không tồn tại thuá»™c tính '{0}' trên đối tượng này."; Strings.OfficeOM.L_FileTypeNotSupported = "Loại tệp đã chỉ định không được há»— trợ."; -Strings.OfficeOM.L_SSOClientError = "Äã xảy ra lá»—i trong yêu cầu xác thá»±c từ Office."; -Strings.OfficeOM.L_DataReadError = "Lá»—i Äá»c Dữ liệu"; -Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Lá»±a chá»n hiện tại không tÆ°Æ¡ng thích vá»›i kiểu ép buá»™c đã xác định."; -Strings.OfficeOM.L_InvalidReadForBlankRow = "Dòng đã nêu trống."; -Strings.OfficeOM.L_InvalidOrTimedOutSession = "Phiên Không hợp lệ hoặc Äã hết Thá»i gian chá»"; -Strings.OfficeOM.L_DataNotMatchBindingType = "Dữ liệu đã định không tÆ°Æ¡ng thích vá»›i kiểu ghép nối."; -Strings.OfficeOM.L_InvalidBindingError = "Lá»—i Ghép nối Không hợp lệ"; -Strings.OfficeOM.L_SSOClientErrorMessage = "Äã xảy ra lá»—i ngoài dá»± kiến trong máy khách."; -Strings.OfficeOM.L_TooManyArguments = "quá nhiá»u đối số"; +Strings.OfficeOM.L_TooManyOptionalFunction = "nhiá»u chức năng tùy chá»n trong danh sách tham số"; Strings.OfficeOM.L_SelectionCannotBound = "Không thể ghép nối vá»›i lá»±a chá»n hiện tại."; -Strings.OfficeOM.L_UserNotSignedIn = "Không có ngÆ°á»i dùng nào đăng nhập vào Office."; -Strings.OfficeOM.L_InvalidSetRows = "Các hàng đã xác định không hợp lệ."; -Strings.OfficeOM.L_ReadSettingsError = "Lá»—i Thiết đặt Äá»c"; -Strings.OfficeOM.L_CallbackNotAFunction = "Gá»i lại phải là chức năng kiểu, thuá»™c kiểu {0}."; Strings.OfficeOM.L_EventHandlerAdditionFailed = "Không thể thêm trình xá»­ lý sá»± kiện."; -Strings.OfficeOM.L_CustomXmlOutOfDateName = "Dữ liệu Không Hiện hành"; -Strings.OfficeOM.L_InvalidCoercion = "Kiểu Ép buá»™c Không hợp lệ"; -Strings.OfficeOM.L_DataNotMatchSelection = "Äối tượng dữ liệu được cung cấp không tÆ°Æ¡ng thích vá»›i hình dạng hoặc kích thÆ°á»›c của lá»±a chá»n hiện tại."; -Strings.OfficeOM.L_UnsupportedDataObject = "Kiểu đối tượng dữ liệu được cung cấp không được há»— trợ."; -Strings.OfficeOM.L_BindingToMultipleSelection = "Không há»— trợ lá»±a chá»n không liá»n nhau."; -Strings.OfficeOM.L_SettingsAreStale = "Không thể lÆ°u thiết đặt vì chúng không phải là má»›i nhất."; -Strings.OfficeOM.L_EventRegistrationError = "Lá»—i Äăng ký Sá»± kiện"; -Strings.OfficeOM.L_HostError = "Lá»—i Máy chủ"; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory = "Phần bổ trợ này không há»— trợ sá»± chấp thuận của ngÆ°á»i dùng."; +Strings.OfficeOM.L_DialogOK = "OK"; +Strings.OfficeOM.L_InvalidNode = "Nút Không hợp lệ"; +Strings.OfficeOM.L_CustomFunctionNameCannotSplit = "Tên hàm phải chứa không gian tên không trống và tên ngắn không trống."; +Strings.OfficeOM.L_CustomXmlNodeNotFound = "Không tìm thấy nút đã xác định."; +Strings.OfficeOM.L_UnsupportedEnumerationMessage = "Liệt kê không được há»— trợ trong ứng dụng máy chủ hiện tại."; +Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} muốn hiển thị má»™t cá»­a sổ má»›i."; +Strings.OfficeOM.L_InvalidApiCallInContext = "Lệnh gá»i API không hợp lệ trong ngữ cảnh hiện tại."; Strings.OfficeOM.L_InvalidDataObject = "Äối tượng Dữ liệu Không hợp lệ"; -Strings.OfficeOM.L_MultipleNamedItemFound = "Äã tìm thấy nhiá»u đối tượng có cùng tên."; -Strings.OfficeOM.L_InvalidParameters = "Hàm {0} có các tham số không hợp lệ."; +Strings.OfficeOM.L_FormatValueOutOfRange = "Giá trị nằm ngoài khoảng cho phép."; +Strings.OfficeOM.L_CustomFunctionDefinitionMissing = "Thuá»™c tính có tên này đại diện cho định nghÄ©a của hàm phải tồn tại trong Excel.CustomFunctions."; +Strings.OfficeOM.L_APICallFailed = "Gá»i API Không thành công"; +Strings.OfficeOM.L_BindingNotExist = "Kết ghép đã xác định không tồn tại."; +Strings.OfficeOM.L_DialogRequireHTTPS = "Không há»— trợ giao thức HTTP. Sá»­ dụng HTTPS thay thế"; +Strings.OfficeOM.L_InvalidOperationInCellEditMode = "Excel Ä‘ang ở chế Ä‘á»™ chỉnh sá»­a ô. Vui lòng thoát chế Ä‘á»™ chỉnh sá»­a bằng cách nhấn ENTER hoặc TAB hay chá»n má»™t ô khác, rồi thá»­ lại."; +Strings.OfficeOM.L_CallbackNotAFunction = "Gá»i lại phải là chức năng kiểu, thuá»™c kiểu {0}."; +Strings.OfficeOM.L_SpecifiedIdNotExist = "ID đã xác định không tồn tại."; +Strings.OfficeOM.L_NamedItemNotFound = "Mục được đặt tên không tồn tại."; +Strings.OfficeOM.L_CannotRegisterEvent = "Không thể đăng ký quy trình xá»­ lý sá»± kiện."; +Strings.OfficeOM.L_TooManyOptionalObjects = "nhiá»u đối tượng tùy chá»n trong danh sách tham số"; +Strings.OfficeOM.L_CellDataAmountBeyondLimits = "LÆ°u ý: Số lượng ô trong má»™t bảng được Ä‘á» nghị để dÆ°á»›i 20.000 ô."; +Strings.OfficeOM.L_NewWindowCrossZone = "Thiết đặt bảo mật trong trình duyệt của bạn ngăn không cho chúng tôi tạo há»™p thoại. Hãy thá»­ dùng má»™t trình duyệt khác hoặc {0} để '{1}' và miá»n được hiển thị trong thanh địa chỉ của bạn có thể nằm trong cùng má»™t khu vá»±c bảo mật."; Strings.OfficeOM.L_OperationNotSupported = "Thao taÌc không Ä‘Æ°Æ¡Ì£c hỗ trÆ¡Ì£."; -Strings.OfficeOM.L_DisplayDialogError = "Lá»—i Hiển thị Há»™p thoại"; -Strings.OfficeOM.L_ElementMissing = "Chúng tôi không thể định dạng ô bảng bởi vì má»™t vài giá trị tham số bị thiếu. Hãy kiểm tra kép các tham số rồi thá»­ lại."; -Strings.OfficeOM.L_UnknownBindingType = "Kiểu ghép nối không được há»— trợ."; -Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Tham đối đầu vào không hợp lệ."; -Strings.OfficeOM.L_DialogOK = "OK"; -Strings.OfficeOM.L_OverwriteWorksheetData = "Thao tác được đặt bị lá»—i vì đối tượng dữ liệu được cung cấp sẽ ghi đè hoặc thay đổi dữ liệu."; -Strings.OfficeOM.L_CoercionTypeNotSupported = "Kiểu ép buá»™c đã xác định không được há»— trợ."; -Strings.OfficeOM.L_GetSelectionNotSupported = "Lá»±a chá»n hiện tại không được há»— trợ."; +Strings.OfficeOM.L_NonUniformPartialGetNotSupported = "Không thể dùng thông số tá»a Ä‘á»™ vá»›i Bảng kiểu ép buá»™c khi bảng chứa các ô được kết hợp."; +Strings.OfficeOM.L_SetDataParametersConflict = "Các tham biến đã xác định có xung Ä‘á»™t."; Strings.OfficeOM.L_NotSupportedBindingType = "Không há»— trợ kiểu ghép nối {0} đã xác định."; -Strings.OfficeOM.L_DialogInvalidScheme = "Không há»— trợ lược đồ URL. Sá»­ dụng HTTPS thay thế."; +Strings.OfficeOM.L_MultipleNamedItemFound = "Äã tìm thấy nhiá»u đối tượng có cùng tên."; +Strings.OfficeOM.L_RequestTimeout = "Cuá»™c gá»i mất quá lâu để thá»±c hiện."; +Strings.OfficeOM.L_NewWindowCrossZoneErrorString = "Các hạn chế trình duyệt đã ngăn chúng tôi tạo há»™p thoại. Miá»n của há»™p thoại và miá»n của máy chủ phần bổ trợ Ä‘ang không cùng nằm trong má»™t khu vá»±c bảo mật."; +Strings.OfficeOM.L_InvalidNamedItemForBindingType = "Kiểu ghép nối đã xác định không tÆ°Æ¡ng thích vá»›i mục được đặt tên đã cung cấp."; +Strings.OfficeOM.L_IndexOutOfRange = "Chỉ mục ngoài phạm vi."; +Strings.OfficeOM.L_NotSupported = "Hàm {0} không được há»— trợ."; +Strings.OfficeOM.L_InvalidOrTimedOutSession = "Phiên Không hợp lệ hoặc Äã hết Thá»i gian chá»"; +Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage = "Thao tác không thành công do phần bổ trợ này không há»— trợ sá»± chấp thuận của ngÆ°á»i dùng trong danh mục này"; +Strings.OfficeOM.L_EventHandlerRemovalFailed = "Không thể loại bá» trình xá»­ lý sá»± kiện."; +Strings.OfficeOM.L_InvalidBindingOperation = "Thao tác Ghép nối Không hợp lệ"; +Strings.OfficeOM.L_InvalidBinding = "Ghép nối Không hợp lệ"; +Strings.OfficeOM.L_AppNameNotExist = "Tên Bổ trợ cho {0} không tồn tại."; +Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Dữ liệu đã lá»—i thá»i. Truy xuất lại đối tượng."; +Strings.OfficeOM.L_UserNotSignedIn = "Không có ngÆ°á»i dùng nào đăng nhập vào Office."; +Strings.OfficeOM.L_DataNotMatchCoercionType = "Kiểu đối tượng dữ liệu đã xác định không tÆ°Æ¡ng thích vá»›i lá»±a chá»n hiện tại."; Strings.OfficeOM.L_SaveSettingsError = "Lá»—i Thiết đặt LÆ°u"; -Strings.OfficeOM.L_AppNotExistInitializeNotCalled = "Ứng dụng {0} không tồn tại. Microsoft.Office.WebExtension.initialize(reason) không được gá»i."; +Strings.OfficeOM.L_AddBindingFromPromptDefaultText = "Vui lòng chá»n."; +Strings.OfficeOM.L_UnsupportedDataObject = "Kiểu đối tượng dữ liệu được cung cấp không được há»— trợ."; +Strings.OfficeOM.L_RedundantCallbackSpecification = "Gá»i lại không thể được xác định trong cả danh sách đối số và đối tượng tùy chá»n."; +Strings.OfficeOM.L_InvalidSetRows = "Các hàng đã xác định không hợp lệ."; +Strings.OfficeOM.L_InvalidParameters = "Hàm {0} có các tham số không hợp lệ."; +Strings.OfficeOM.L_AddinIsAlreadyRequestingToken = "Phần bổ trợ đã Ä‘ang yêu cầu mã thông báo truy nhập."; +Strings.OfficeOM.L_GetDataIsTooLarge = "Bá»™ dữ liệu được yêu cầu quá lá»›n."; +Strings.OfficeOM.L_NotImplemented = "Hàm {0} chÆ°a được triển khai."; Strings.OfficeOM.L_UnsupportedUserIdentityMessage = "Không há»— trợ loại nhận dạng của ngÆ°á»i dùng này."; +Strings.OfficeOM.L_NetworkProblem = "Vấn Ä‘á» vá» Mạng"; +Strings.OfficeOM.L_InvalidBindingError = "Lá»—i Ghép nối Không hợp lệ"; +Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty = "Äang tìm cách đặt thuá»™c tính chỉ Ä‘á»c '{0}'."; +Strings.OfficeOM.L_SelectionNotSupportCoercionType = "Lá»±a chá»n hiện tại không tÆ°Æ¡ng thích vá»›i kiểu ép buá»™c đã xác định."; +Strings.OfficeOM.L_RequestTokenUnavailable = "API này đã được giá»›i hạn để làm chậm tần số cuá»™c gá»i."; +Strings.OfficeOM.L_CloseFileBeforeRetrieve = "Gá»i closeAsync trên Tệp hiện tại trÆ°á»›c khi truy xuất tệp khác."; +Strings.OfficeOM.L_PermissionDenied = "Từ chối Quyá»n"; +Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage = "Hoạt Ä‘á»™ng không thành công vì phần bổ trợ này đã Ä‘ang yêu cầu mã thông báo truy nhập."; +Strings.OfficeOM.L_ConnectionFailureWithStatus = "Yêu cầu không thành công vá»›i mã trạng thái {0}."; +Strings.OfficeOM.L_CoercionTypeNotSupported = "Kiểu ép buá»™c đã xác định không được há»— trợ."; +Strings.OfficeOM.L_InvalidResourceUrlMessage = "Äã chỉ định Url tài nguyên không hợp lệ trong tệp kê khai."; +Strings.OfficeOM.L_MissingRequiredArguments = "thiếu má»™t số đối số bắt buá»™c"; +Strings.OfficeOM.L_InvalidGrant = "Thiếu cấp phép trÆ°á»›c."; Strings.OfficeOM.L_InvalidFormat = "Lá»—i Äịnh dạng Không hợp lệ"; -Strings.OfficeOM.L_SpecifiedIdNotExist = "ID đã xác định không tồn tại."; -Strings.OfficeOM.L_ShowWindowDialogNotification = "{0} muốn hiển thị má»™t cá»­a sổ má»›i."; -Strings.OfficeOM.L_ConnectionFailureWithDetails = "Yêu cầu không thành công vá»›i mã trạng thái {0}, mã lá»—i {1} và thông báo lá»—i sau: {2}"; +Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage = "Phiên Office Online của bạn đã hết hạn hoặc không hợp lệ. Äể tiếp tục, hãy làm má»›i trang."; +Strings.OfficeOM.L_InitializeNotReady = "Office.js chÆ°a được tải hết. Vui lòng thá»­ lại sau hoặc đảm bảo thêm mã khởi tạo vào hàm Office.initialize."; +Strings.OfficeOM.L_UnknownBindingType = "Kiểu ghép nối không được há»— trợ."; +Strings.OfficeOM.L_DataWriteReminder = "Lá»i nhắc Viết Dữ liệu"; +Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink = "đặt cấu hình trình duyệt của bạn"; +Strings.OfficeOM.L_InvalidGrantMessage = "Ứng dụng này bị cấp thiếu quyá»n."; +Strings.OfficeOM.L_DataNotMatchBindingType = "Dữ liệu đã định không tÆ°Æ¡ng thích vá»›i kiểu ghép nối."; +Strings.OfficeOM.L_BindingCreationError = "Lá»—i Tạo Ghép nối"; +Strings.OfficeOM.L_OsfControlTypeNotSupported = "Kiểu OsfControl không được há»— trợ."; +Strings.OfficeOM.L_CannotNavigateTo = "Äối tượng nằm ở vị trí không há»— trợ dẫn hÆ°á»›ng."; Strings.OfficeOM.L_InValidOptionalArgument = "đối số tùy chá»n không hợp lệ"; +Strings.OfficeOM.L_ShuttingDown = "Thao tác bị lá»—i vì dữ liệu không phải là má»›i nhất trên máy chủ."; +Strings.OfficeOM.L_InvalidAPICall = "Lệnh gá»i API Không hợp lệ"; +Strings.OfficeOM.L_CustomXmlOutOfDateName = "Dữ liệu Không Hiện hành"; +Strings.OfficeOM.L_DataNotMatchBindingSize = "Äối tượng dữ liệu được cung cấp không khá»›p vá»›i kích cỡ của lá»±a chá»n hiện tại."; +Strings.OfficeOM.L_HostError = "Lá»—i Máy chủ"; +Strings.OfficeOM.L_MemoryLimit = "Vượt quá Giá»›i hạn Bá»™ nhá»›"; +Strings.OfficeOM.L_InvalidResourceUrl = "Äã cung cấp Url tài nguyên ứng dụng không hợp lệ."; +Strings.OfficeOM.L_EventRegistrationError = "Lá»—i Äăng ký Sá»± kiện"; +Strings.OfficeOM.L_SliceSizeNotSupported = "Kích thÆ°á»›c lát cắt đã chỉ định không được há»— trợ."; +Strings.OfficeOM.L_InvalidValue = "Giá trị Không hợp lệ"; +Strings.OfficeOM.L_DialogInvalidScheme = "Không há»— trợ lược đồ URL. Sá»­ dụng HTTPS thay thế."; +Strings.OfficeOM.L_InvalidRequestContext = "Không thể sá»­ dụng đối tượng cho các ngữ cảnh yêu cầu khác nhau."; +Strings.OfficeOM.L_CellFormatAmountBeyondLimits = "LÆ°u ý: Bá»™ định dạng do lệnh gá»i Äịnh dạng API thiết lập được Ä‘á» nghị để dÆ°á»›i 100."; +Strings.OfficeOM.L_CustomFunctionNameContainsBadChars = "Tên hàm chỉ có thể chứa chữ cái, chữ số, gạch dÆ°á»›i và dấu chấm."; +Strings.OfficeOM.L_FunctionCallFailed = "Lệnh gá»i hàm {0} không thành công, mã lá»—i: {1}."; +Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Không thể dùng thông số tá»a Ä‘á»™ vá»›i Bảng kiểu ép buá»™c khi bảng chứa các ô được kết hợp."; +Strings.OfficeOM.L_ConnectionFailureWithDetails = "Yêu cầu không thành công vá»›i mã trạng thái {0}, mã lá»—i {1} và thông báo lá»—i sau: {2}"; +Strings.OfficeOM.L_InvalidSetColumns = "Các cá»™t đã xác định không hợp lệ."; +Strings.OfficeOM.L_InvalidApiArgumentsMessage = "Tham đối đầu vào không hợp lệ."; +Strings.OfficeOM.L_InvalidSelectionForBindingType = "Không thể tạo ghép nối vá»›i lá»±a chá»n hiện tại và kiểu ghép nối đã xác định."; +Strings.OfficeOM.L_EventHandlerNotExist = "Không tìm thấy bá»™ xá»­ lý biến cố xác định cho gắn kết này."; +Strings.OfficeOM.L_InvalidSSOAddinMessage = "Không há»— trợ API nhận dạng cho phần bổ trợ này."; +Strings.OfficeOM.L_BadSelectorString = "Chuá»—i được chuyển vào công cụ chá»n không được định dạng đúng hoặc không được há»— trợ."; +Strings.OfficeOM.L_DocumentReadOnly = "Không cho phép thao tác yêu cầu ở chế Ä‘á»™ tài liệu hiện tại."; +Strings.OfficeOM.L_CustomXmlError = "Lá»—i XML Tùy chỉnh."; +Strings.OfficeOM.L_ApiNotFoundDetails = "PhÆ°Æ¡ng pháp hoặc thuá»™c tính {0} là má»™t phần trong tập hợp yêu cầu {1}, đối tượng này không có sẵn trong phiên bản {2} của bạn."; Strings.OfficeOM.L_ShowWindowDialogNotificationAllow = "Cho phép"; +Strings.OfficeOM.L_InvalidTableOptionValue = "Má»™t hoặc nhiá»u tham số tableOption có chứa giá trị không được phép. Hãy kiểm tra kép các giá trị rồi thá»­ lại."; +Strings.OfficeOM.L_SettingsCannotSave = "Không thể lÆ°u thiết đặt."; +Strings.OfficeOM.L_UnsupportedUserIdentity = "Loại nhận dạng ngÆ°á»i dùng không được há»— trợ."; +Strings.OfficeOM.L_DataStale = "Dữ liệu Không Cập nhật"; +Strings.OfficeOM.L_NotSupportedEventType = "Không há»— trợ kiểu sá»± kiện {0} đã xác định."; +Strings.OfficeOM.L_NetworkProblemRetrieveFile = "Sá»± cố mạng đã không cho truy xuất tệp."; +Strings.OfficeOM.L_MissingParameter = "Thiếu Tham số"; +Strings.OfficeOM.L_CustomFunctionImplementationMissing = "Thuá»™c tính có tên này trong Excel.CustomFunctions đại diện cho định nghÄ©a của chức năng phải chứa thuá»™c tính 'gá»i' có tác dụng thá»±c thi hàm."; +Strings.OfficeOM.L_ValueNotLoaded = 'ChÆ°a tải giá trị của đối tượng kết quả. TrÆ°á»›c khi Ä‘á»c thuá»™c tính giá trị, hãy gá»i "context.sync()" trong ngữ cảnh yêu cầu có liên quan.'; +Strings.OfficeOM.L_SettingNameNotExist = "Tên thiết đặt đã xác định không tồn tại."; +Strings.OfficeOM.L_InvalidCellsValue = "Má»™t hoặc nhiá»u tham số ô có chứa giá trị không được phép. Hãy kiểm tra kép các giá trị rồi thá»­ lại."; +Strings.OfficeOM.L_DataNotMatchSelection = "Äối tượng dữ liệu được cung cấp không tÆ°Æ¡ng thích vá»›i hình dạng hoặc kích thÆ°á»›c của lá»±a chá»n hiện tại."; +Strings.OfficeOM.L_PropertyNotLoaded = "Thuá»™c tính '{0}' không khả dụng. TrÆ°á»›c khi Ä‘á»c giá trị thuá»™c tính, hãy gá»i phÆ°Æ¡ng pháp tải cho đối tượng chứa và gá»i \"context.sync()\" cho ngữ cảnh yêu cầu được liên kết."; Strings.OfficeOM.L_DialogNavigateError = "Lá»—i Äiá»u hÆ°á»›ng Há»™p thoại"; -Strings.OfficeOM.L_DocumentReadOnly = "Không cho phép thao tác yêu cầu ở chế Ä‘á»™ tài liệu hiện tại."; +Strings.OfficeOM.L_NavOutOfBound = "Thao tác thất bại do chỉ mục nằm ngoài phạm vi."; +Strings.OfficeOM.L_ColIndexOutOfRange = "Giá trị chỉ mục cá»™t nằm ngoài phạm vi cho phép. Hãy sá»­ dụng má»™t giá trị (0 hoặc cao hÆ¡n) và bé hÆ¡n số lượng cá»™t."; +Strings.OfficeOM.L_DataWriteError = "Lá»—i Ghi Dữ liệu"; +Strings.OfficeOM.L_OverwriteWorksheetData = "Thao tác được đặt bị lá»—i vì đối tượng dữ liệu được cung cấp sẽ ghi đè hoặc thay đổi dữ liệu."; +Strings.OfficeOM.L_CustomXmlExceedQuotaMessage = "XPath giá»›i hạn lá»±a chá»n tá»›i 1024 mục."; +Strings.OfficeOM.L_DialogAddressNotTrusted = "Phần tá»­ AppDomains trong tệp kê khai không chứa miá»n của URL."; +Strings.OfficeOM.L_GetDataParametersConflict = "Các tham biến đã xác định có xung Ä‘á»™t."; +Strings.OfficeOM.L_RunMustReturnPromise = 'Hàm lô chuyển qua phÆ°Æ¡ng pháp ".run" không trả vá» má»™t lá»i hứa. Hàm phải trả vá» má»™t lá»i hứa, để có thể công bố má»i đối tượng được tá»± Ä‘á»™ng theo dõi khi hoàn tất hoạt Ä‘á»™ng lô. Thông thÆ°á»ng, bạn sẽ trả vá» má»™t lá»i hứa bằng cách trả vá» phản hồi từ "context.sync()".'; +Strings.OfficeOM.L_ElementMissing = "Chúng tôi không thể định dạng ô bảng bởi vì má»™t vài giá trị tham số bị thiếu. Hãy kiểm tra kép các tham số rồi thá»­ lại."; +Strings.OfficeOM.L_BindingToMultipleSelection = "Không há»— trợ lá»±a chá»n không liá»n nhau."; Strings.OfficeOM.L_UserAbortedMessage = "NgÆ°á»i dùng đã không chấp thuận quyá»n của phần bổ trợ."; -Strings.OfficeOM.L_DialogAlreadyOpened = "Hoạt Ä‘á»™ng không thành công vì phần bổ trợ này đã có má»™t há»™p thoại hiện hoạt."; -Strings.OfficeOM.L_RequestTokenUnavailable = "API này đã được giá»›i hạn để làm chậm tần số cuá»™c gá»i."; -Strings.OfficeOM.L_IndexOutOfRange = "Chỉ mục ngoài phạm vi."; -Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore = "Bá» qua"; +Strings.OfficeOM.L_GetSelectionNotSupported = "Lá»±a chá»n hiện tại không được há»— trợ."; +Strings.OfficeOM.L_InternalError = "Lỗi Nội bộ"; +Strings.OfficeOM.L_InvalidGetStartRowColumn = "Giá trị startRow hoặc startColumn đã xác định không hợp lệ."; +Strings.OfficeOM.L_FormattingReminder = "Äịnh dạng Lá»i nhắc"; +Strings.OfficeOM.L_ActivityLimitReached = "Äã đạt giá»›i hạn hoạt Ä‘á»™ng."; +Strings.OfficeOM.L_SettingsStaleError = "Lá»—i Thiết đặt CÅ©"; +Strings.OfficeOM.L_InvalidGetRows = "Các hàng đã xác định không hợp lệ."; +Strings.OfficeOM.L_NoCapability = "Bạn không có đủ quyá»n cho hành Ä‘á»™ng này."; +Strings.OfficeOM.L_CannotWriteToSelection = "Không thể ghi vào lá»±a chá»n hiện tại."; +Strings.OfficeOM.L_SSOClientErrorMessage = "Äã xảy ra lá»—i ngoài dá»± kiến trong máy khách."; +Strings.OfficeOM.L_BrowserAPINotSupported = "Trình duyệt này không há»— trợ API được yêu cầu."; Strings.OfficeOM.L_Timeout = "Hoạt Ä‘á»™ng đã hết thá»i gian chá»."; -Strings.OfficeOM.L_PermissionDenied = "Từ chối Quyá»n"; -Strings.OfficeOM.L_InvalidCellsValue = "Má»™t hoặc nhiá»u tham số ô có chứa giá trị không được phép. Hãy kiểm tra kép các giá trị rồi thá»­ lại."; -Strings.OfficeOM.L_CustomXmlOutOfDateMessage = "Dữ liệu đã lá»—i thá»i. Truy xuất lại đối tượng."; -Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType = "Thao tác không được há»— trợ trên kiểu ghép nối này."; -Strings.OfficeOM.L_NonUniformPartialSetNotSupported = "Không thể dùng thông số tá»a Ä‘á»™ vá»›i Bảng kiểu ép buá»™c khi bảng chứa các ô được kết hợp."; +Strings.OfficeOM.L_SettingsAreStale = "Không thể lÆ°u thiết đặt vì chúng không phải là má»›i nhất."; +Strings.OfficeOM.L_APINotSupported = "API Không được Há»— trợ"; +Strings.OfficeOM.L_InvalidCoercion = "Kiểu Ép buá»™c Không hợp lệ"; +Strings.OfficeOM.L_SSOClientError = "Äã xảy ra lá»—i trong yêu cầu xác thá»±c từ Office."; Strings.OfficeOM.L_UnsupportedEnumeration = "Liệt kê Không được há»— trợ"; -Strings.OfficeOM.L_DataWriteReminder = "Lá»i nhắc Viết Dữ liệu" +Strings.OfficeOM.L_InvalidArgumentGeneric = "(Các) tham đối được Ä‘Æ°a vào hàm không có phù hợp trong tình huống này, bị thiếu hoặc không ở định dạng đúng."; +Strings.OfficeOM.L_SetDataIsTooLarge = "Äối tượng dữ liệu đã xác định quá lá»›n."; +Strings.OfficeOM.L_InvalidReadForBlankRow = "Dòng đã nêu trống."; +Strings.OfficeOM.L_InvalidGetRowColumnCounts = "Giá trị rowCount hoặc columnCount đã xác định không hợp lệ."; +Strings.OfficeOM.L_InvalidObjectPath = 'ÄÆ°á»ng dẫn đối tượng \'{0}\' không phù hợp vá»›i thao tác bạn Ä‘ang cố gắng thá»±c hiện. Nếu bạn Ä‘ang sá»­ dụng đối tượng trên nhiá»u cuá»™c gá»i "context.sync" và không thuá»™c phạm vi thá»±c thi chuá»—i của lô ".run", vui lòng sá»­ dụng các phÆ°Æ¡ng pháp "context.trackedObjects.add()" và "context.trackedObjects.remove()" để quản lý thá»i hạn của đối tượng.'; +Strings.OfficeOM.L_DataReadError = "Lá»—i Äá»c Dữ liệu"; +Strings.OfficeOM.L_InvalidSetStartRowColumn = "Giá trị startRow hoặc startColumn đã xác định không hợp lệ."; +Strings.OfficeOM.L_CustomXmlExceedQuotaName = "Äã đạt Giá»›i hạn vá» Vùng chá»n"; +Strings.OfficeOM.L_SSOConnectionLostError = "A connection was lost during the sign in process." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/vi-vn/office_strings.js b/node_modules/@microsoft/office-js/dist/vi-vn/office_strings.js index 93fd826..10be67c 100644 --- a/node_modules/@microsoft/office-js/dist/vi-vn/office_strings.js +++ b/node_modules/@microsoft/office-js/dist/vi-vn/office_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_InvalidValue="Giá trị Không hợp lệ";Strings.OfficeOM.L_CustomXmlNodeNotFound="Không tìm thấy nút đã xác định.";Strings.OfficeOM.L_MissingRequiredArguments="thiếu má»™t số đối số bắt buá»™c";Strings.OfficeOM.L_InternalErrorDescription="Äã xuâÌt hiện lỗi nội bộ.";Strings.OfficeOM.L_CannotRegisterEvent="Không thể đăng ký quy trình xá»­ lý sá»± kiện.";Strings.OfficeOM.L_CellDataAmountBeyondLimits="LÆ°u ý: Số lượng ô trong má»™t bảng được Ä‘á» nghị để dÆ°á»›i 20.000 ô.";Strings.OfficeOM.L_APINotSupported="API Không được Há»— trợ";Strings.OfficeOM.L_InvalidSetStartRowColumn="Giá trị startRow hoặc startColumn đã xác định không hợp lệ.";Strings.OfficeOM.L_PropertyDoesNotExist="Không tồn tại thuá»™c tính '{0}' trên đối tượng này.";Strings.OfficeOM.L_SetDataParametersConflict="Các tham biến đã xác định có xung Ä‘á»™t.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Kiểu ghép nối đã xác định không tÆ°Æ¡ng thích vá»›i mục được đặt tên đã cung cấp.";Strings.OfficeOM.L_InvalidArgumentGeneric="(Các) tham đối được Ä‘Æ°a vào hàm không có phù hợp trong tình huống này, bị thiếu hoặc không ở định dạng đúng.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Sá»± cố mạng đã không cho truy xuất tệp.";Strings.OfficeOM.L_InvalidDataFormat="Äịnh dạng của đối tượng dữ liệu đã xác định không hợp lệ.";Strings.OfficeOM.L_AppNameNotExist="Tên Bổ trợ cho {0} không tồn tại.";Strings.OfficeOM.L_SSOServerErrorMessage="Äã xảy ra lá»—i ngoài dá»± kiến trên máy chủ.";Strings.OfficeOM.L_BrowserAPINotSupported="Trình duyệt này không há»— trợ API được yêu cầu.";Strings.OfficeOM.L_ShuttingDown="Thao tác bị lá»—i vì dữ liệu không phải là má»›i nhất trên máy chủ.";Strings.OfficeOM.L_RunMustReturnPromise='Hàm lô chuyển qua phÆ°Æ¡ng pháp ".run" không trả vá» má»™t lá»i hứa. Hàm phải trả vá» má»™t lá»i hứa, để có thể công bố má»i đối tượng được tá»± Ä‘á»™ng theo dõi khi hoàn tất hoạt Ä‘á»™ng lô. Thông thÆ°á»ng, bạn sẽ trả vá» má»™t lá»i hứa bằng cách trả vá» phản hồi từ "context.sync()".';Strings.OfficeOM.L_CustomXmlError="Lá»—i XML Tùy chỉnh.";Strings.OfficeOM.L_InvalidGrantMessage="Ứng dụng này bị cấp thiếu quyá»n.";Strings.OfficeOM.L_NotImplemented="Hàm {0} chÆ°a được triển khai.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Äã đạt Giá»›i hạn vá» Vùng chá»n";Strings.OfficeOM.L_InvalidGetStartRowColumn="Giá trị startRow hoặc startColumn đã xác định không hợp lệ.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="LÆ°u ý: Bá»™ định dạng do lệnh gá»i Äịnh dạng API thiết lập được Ä‘á» nghị để dÆ°á»›i 100.";Strings.OfficeOM.L_FormattingReminder="Äịnh dạng Lá»i nhắc";Strings.OfficeOM.L_SettingsCannotSave="Không thể lÆ°u thiết đặt.";Strings.OfficeOM.L_TooManyOptionalFunction="nhiá»u chức năng tùy chá»n trong danh sách tham số";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="đặt cấu hình trình duyệt của bạn";Strings.OfficeOM.L_DataNotMatchCoercionType="Kiểu đối tượng dữ liệu đã xác định không tÆ°Æ¡ng thích vá»›i lá»±a chá»n hiện tại.";Strings.OfficeOM.L_InvalidApiCallInContext="Lệnh gá»i API không hợp lệ trong ngữ cảnh hiện tại.";Strings.OfficeOM.L_FunctionCallFailed="Lệnh gá»i hàm {0} không thành công, mã lá»—i: {1}.";Strings.OfficeOM.L_GetDataIsTooLarge="Bá»™ dữ liệu được yêu cầu quá lá»›n.";Strings.OfficeOM.L_NotSupportedEventType="Không há»— trợ kiểu sá»± kiện {0} đã xác định.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="Không thể áp dụng thay đổi vá»›i thuá»™c tính '{0}' thông qua phÆ°Æ¡ng pháp \"object.set\".";Strings.OfficeOM.L_ColIndexOutOfRange="Giá trị chỉ mục cá»™t nằm ngoài phạm vi cho phép. Hãy sá»­ dụng má»™t giá trị (0 hoặc cao hÆ¡n) và bé hÆ¡n số lượng cá»™t.";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Gá»i closeAsync trên Tệp hiện tại trÆ°á»›c khi truy xuất tệp khác.";Strings.OfficeOM.L_SSOServerError="Äã xảy ra lá»—i trong nhà cung cấp xác thá»±c.";Strings.OfficeOM.L_OsfControlTypeNotSupported="Kiểu OsfControl không được há»— trợ.";Strings.OfficeOM.L_EventHandlerNotExist="Không tìm thấy bá»™ xá»­ lý biến cố xác định cho gắn kết này.";Strings.OfficeOM.L_DataStale="Dữ liệu Không Cập nhật";Strings.OfficeOM.L_InternalError="Lỗi Nội bộ";Strings.OfficeOM.L_BindingCreationError="Lá»—i Tạo Ghép nối";Strings.OfficeOM.L_ConnectionFailureWithStatus="Yêu cầu không thành công vá»›i mã trạng thái {0}.";Strings.OfficeOM.L_InvalidBindingOperation="Thao tác Ghép nối Không hợp lệ";Strings.OfficeOM.L_EventHandlerRemovalFailed="Không thể loại bá» trình xá»­ lý sá»± kiện.";Strings.OfficeOM.L_UserClickIgnore="NgÆ°á»i dùng đã chá»n bá» qua há»™p thoại.";Strings.OfficeOM.L_OutOfRange="Ngoài Phạm vi";Strings.OfficeOM.L_TooManyIncompleteRequests="ChỠđến khi cuá»™c gá»i trÆ°á»›c hoàn tất.";Strings.OfficeOM.L_InitializeNotReady="Office.js chÆ°a được tải hết. Vui lòng thá»­ lại sau hoặc đảm bảo thêm mã khởi tạo vào hàm Office.initialize.";Strings.OfficeOM.L_NamedItemNotFound="Mục được đặt tên không tồn tại.";Strings.OfficeOM.L_MemoryLimit="Vượt quá Giá»›i hạn Bá»™ nhá»›";Strings.OfficeOM.L_InvalidNode="Nút Không hợp lệ";Strings.OfficeOM.L_CannotNavigateTo="Äối tượng nằm ở vị trí không há»— trợ dẫn hÆ°á»›ng.";Strings.OfficeOM.L_GetDataParametersConflict="Các tham biến đã xác định có xung Ä‘á»™t.";Strings.OfficeOM.L_NavOutOfBound="Thao tác thất bại do chỉ mục nằm ngoài phạm vi.";Strings.OfficeOM.L_NotSupported="Hàm {0} không được há»— trợ.";Strings.OfficeOM.L_DataWriteError="Lá»—i Ghi Dữ liệu";Strings.OfficeOM.L_DialogAddressNotTrusted="Phần tá»­ AppDomains trong tệp kê khai không chứa miá»n của URL.";Strings.OfficeOM.L_RequestTimeout="Cuá»™c gá»i mất quá lâu để thá»±c hiện.";Strings.OfficeOM.L_CannotWriteToSelection="Không thể ghi vào lá»±a chá»n hiện tại.";Strings.OfficeOM.L_ValueNotLoaded='ChÆ°a tải giá trị của đối tượng kết quả. TrÆ°á»›c khi Ä‘á»c thuá»™c tính giá trị, hãy gá»i "context.sync()" trong ngữ cảnh yêu cầu có liên quan.';Strings.OfficeOM.L_UnsupportedEnumerationMessage="Liệt kê không được há»— trợ trong ứng dụng máy chủ hiện tại.";Strings.OfficeOM.L_InvalidSelectionForBindingType="Không thể tạo ghép nối vá»›i lá»±a chá»n hiện tại và kiểu ghép nối đã xác định.";Strings.OfficeOM.L_InvalidResourceUrlMessage="Äã chỉ định Url tài nguyên không hợp lệ trong tệp kê khai.";Strings.OfficeOM.L_InvalidSetColumns="Các cá»™t đã xác định không hợp lệ.";Strings.OfficeOM.L_PropertyNotLoaded="Thuá»™c tính '{0}' không khả dụng. TrÆ°á»›c khi Ä‘á»c giá trị thuá»™c tính, hãy gá»i phÆ°Æ¡ng pháp tải cho đối tượng chứa và gá»i \"context.sync()\" cho ngữ cảnh yêu cầu được liên kết.";Strings.OfficeOM.L_SetDataIsTooLarge="Äối tượng dữ liệu đã xác định quá lá»›n.";Strings.OfficeOM.L_InvalidSSOAddinMessage="Không há»— trợ API nhận dạng cho phần bổ trợ này.";Strings.OfficeOM.L_MissingParameter="Thiếu Tham số";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="Phiên Office Online của bạn đã hết hạn hoặc không hợp lệ. Äể tiếp tục, hãy làm má»›i trang.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Các hạn chế trình duyệt đã ngăn chúng tôi tạo há»™p thoại. Miá»n của há»™p thoại và miá»n của máy chủ phần bổ trợ Ä‘ang không cùng nằm trong má»™t khu vá»±c bảo mật.";Strings.OfficeOM.L_InvalidRequestContext="Không thể sá»­ dụng đối tượng cho các ngữ cảnh yêu cầu khác nhau.";Strings.OfficeOM.L_BadSelectorString="Chuá»—i được chuyển vào công cụ chá»n không được định dạng đúng hoặc không được há»— trợ.";Strings.OfficeOM.L_SettingsStaleError="Lá»—i Thiết đặt CÅ©";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Vui lòng chá»n.";Strings.OfficeOM.L_InvalidGetColumns="Các cá»™t đã xác định không hợp lệ.";Strings.OfficeOM.L_InvalidBinding="Ghép nối Không hợp lệ";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Ná»™i dung được chá»n phải ở định dạng bảng. Hãy định dạng dữ liệu dÆ°á»›i dạng bảng và thá»­ lại.";Strings.OfficeOM.L_BindingNotExist="Kết ghép đã xác định không tồn tại.";Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Kiểu ép buá»™c đã xác định không tÆ°Æ¡ng thích vá»›i kiểu ghép nối này.";Strings.OfficeOM.L_DialogRequireHTTPS="Không há»— trợ giao thức HTTP. Sá»­ dụng HTTPS thay thế";Strings.OfficeOM.L_TooManyOptionalObjects="nhiá»u đối tượng tùy chá»n trong danh sách tham số";Strings.OfficeOM.L_UserAborted="NgÆ°á»i dùng đã hủy bá» yêu cầu cấp phép.";Strings.OfficeOM.L_InvalidResourceUrl="Äã cung cấp Url tài nguyên ứng dụng không hợp lệ.";Strings.OfficeOM.L_InvalidObjectPath='ÄÆ°á»ng dẫn đối tượng \'{0}\' không phù hợp vá»›i thao tác bạn Ä‘ang cố gắng thá»±c hiện. Nếu bạn Ä‘ang sá»­ dụng đối tượng trên nhiá»u cuá»™c gá»i "context.sync" và không thuá»™c phạm vi thá»±c thi chuá»—i của lô ".run", vui lòng sá»­ dụng các phÆ°Æ¡ng pháp "context.trackedObjects.add()" và "context.trackedObjects.remove()" để quản lý thá»i hạn của đối tượng.';Strings.OfficeOM.L_InvalidGetRowColumnCounts="Giá trị rowCount hoặc columnCount đã xác định không hợp lệ.";Strings.OfficeOM.L_NoCapability="Bạn không có đủ quyá»n cho hành Ä‘á»™ng này.";Strings.OfficeOM.L_UnsupportedUserIdentity="Loại nhận dạng ngÆ°á»i dùng không được há»— trợ.";Strings.OfficeOM.L_InvalidTableOptionValue="Má»™t hoặc nhiá»u tham số tableOption có chứa giá trị không được phép. Hãy kiểm tra kép các giá trị rồi thá»­ lại.";Strings.OfficeOM.L_NetworkProblem="Vấn Ä‘á» vá» Mạng";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="Äang tìm cách đặt thuá»™c tính chỉ Ä‘á»c '{0}'.";Strings.OfficeOM.L_NewWindowCrossZone="Thiết đặt bảo mật trong trình duyệt của bạn ngăn không cho chúng tôi tạo há»™p thoại. Hãy thá»­ dùng má»™t trình duyệt khác hoặc {0} để '{1}' và miá»n được hiển thị trong thanh địa chỉ của bạn có thể nằm trong cùng má»™t khu vá»±c bảo mật.";Strings.OfficeOM.L_SliceSizeNotSupported="Kích thÆ°á»›c lát cắt đã chỉ định không được há»— trợ.";Strings.OfficeOM.L_SettingNameNotExist="Tên thiết đặt đã xác định không tồn tại.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Không thể dùng thông số tá»a Ä‘á»™ vá»›i Bảng kiểu ép buá»™c khi bảng chứa các ô được kết hợp.";Strings.OfficeOM.L_RowIndexOutOfRange="Giá trị chỉ mục dòng nằm ngoài phạm vi cho phép. Hãy sá»­ dụng má»™t giá trị (0 hoặc cao hÆ¡n) và nhá» hÆ¡n số lượng hàng.";Strings.OfficeOM.L_InvalidGrant="Thiếu cấp phép trÆ°á»›c.";Strings.OfficeOM.L_ActivityLimitReached="Äã đạt giá»›i hạn hoạt Ä‘á»™ng.";Strings.OfficeOM.L_InvalidFormatValue="Má»™t hoặc nhiá»u tham số định dạng có chứa giá trị không được phép. Hãy kiểm tra kép các giá trị rồi thá»­ lại.";Strings.OfficeOM.L_InvalidColumnsForBinding="Các cá»™t đã xác định không hợp lệ.";Strings.OfficeOM.L_InvalidAPICall="Lệnh gá»i API Không hợp lệ";Strings.OfficeOM.L_InvalidGetRows="Các hàng đã xác định không hợp lệ.";Strings.OfficeOM.L_FormatValueOutOfRange="Giá trị nằm ngoài khoảng cho phép.";Strings.OfficeOM.L_DataNotMatchBindingSize="Äối tượng dữ liệu được cung cấp không khá»›p vá»›i kích cỡ của lá»±a chá»n hiện tại.";Strings.OfficeOM.L_APICallFailed="Gá»i API Không thành công";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Phần bổ trợ đã Ä‘ang yêu cầu mã thông báo truy nhập.";Strings.OfficeOM.L_RedundantCallbackSpecification="Gá»i lại không thể được xác định trong cả danh sách đối số và đối tượng tùy chá»n.";Strings.OfficeOM.L_InvalidArgument="Tham đối '{0}' không phù hợp vá»›i tình huống này, bị thiếu hoặc không có định dạng phù hợp.";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Hoạt Ä‘á»™ng không thành công vì phần bổ trợ này đã Ä‘ang yêu cầu mã thông báo truy nhập.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath giá»›i hạn lá»±a chá»n tá»›i 1024 mục.";Strings.OfficeOM.L_FileTypeNotSupported="Loại tệp đã chỉ định không được há»— trợ.";Strings.OfficeOM.L_SSOClientError="Äã xảy ra lá»—i trong yêu cầu xác thá»±c từ Office.";Strings.OfficeOM.L_DataReadError="Lá»—i Äá»c Dữ liệu";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Lá»±a chá»n hiện tại không tÆ°Æ¡ng thích vá»›i kiểu ép buá»™c đã xác định.";Strings.OfficeOM.L_InvalidReadForBlankRow="Dòng đã nêu trống.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Phiên Không hợp lệ hoặc Äã hết Thá»i gian chá»";Strings.OfficeOM.L_DataNotMatchBindingType="Dữ liệu đã định không tÆ°Æ¡ng thích vá»›i kiểu ghép nối.";Strings.OfficeOM.L_InvalidBindingError="Lá»—i Ghép nối Không hợp lệ";Strings.OfficeOM.L_SSOClientErrorMessage="Äã xảy ra lá»—i ngoài dá»± kiến trong máy khách.";Strings.OfficeOM.L_TooManyArguments="quá nhiá»u đối số";Strings.OfficeOM.L_SelectionCannotBound="Không thể ghép nối vá»›i lá»±a chá»n hiện tại.";Strings.OfficeOM.L_UserNotSignedIn="Không có ngÆ°á»i dùng nào đăng nhập vào Office.";Strings.OfficeOM.L_InvalidSetRows="Các hàng đã xác định không hợp lệ.";Strings.OfficeOM.L_ReadSettingsError="Lá»—i Thiết đặt Äá»c";Strings.OfficeOM.L_CallbackNotAFunction="Gá»i lại phải là chức năng kiểu, thuá»™c kiểu {0}.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Không thể thêm trình xá»­ lý sá»± kiện.";Strings.OfficeOM.L_CustomXmlOutOfDateName="Dữ liệu Không Hiện hành";Strings.OfficeOM.L_InvalidCoercion="Kiểu Ép buá»™c Không hợp lệ";Strings.OfficeOM.L_DataNotMatchSelection="Äối tượng dữ liệu được cung cấp không tÆ°Æ¡ng thích vá»›i hình dạng hoặc kích thÆ°á»›c của lá»±a chá»n hiện tại.";Strings.OfficeOM.L_UnsupportedDataObject="Kiểu đối tượng dữ liệu được cung cấp không được há»— trợ.";Strings.OfficeOM.L_BindingToMultipleSelection="Không há»— trợ lá»±a chá»n không liá»n nhau.";Strings.OfficeOM.L_SettingsAreStale="Không thể lÆ°u thiết đặt vì chúng không phải là má»›i nhất.";Strings.OfficeOM.L_EventRegistrationError="Lá»—i Äăng ký Sá»± kiện";Strings.OfficeOM.L_HostError="Lá»—i Máy chủ";Strings.OfficeOM.L_InvalidDataObject="Äối tượng Dữ liệu Không hợp lệ";Strings.OfficeOM.L_MultipleNamedItemFound="Äã tìm thấy nhiá»u đối tượng có cùng tên.";Strings.OfficeOM.L_InvalidParameters="Hàm {0} có các tham số không hợp lệ.";Strings.OfficeOM.L_OperationNotSupported="Thao taÌc không Ä‘Æ°Æ¡Ì£c hỗ trÆ¡Ì£.";Strings.OfficeOM.L_DisplayDialogError="Lá»—i Hiển thị Há»™p thoại";Strings.OfficeOM.L_ElementMissing="Chúng tôi không thể định dạng ô bảng bởi vì má»™t vài giá trị tham số bị thiếu. Hãy kiểm tra kép các tham số rồi thá»­ lại.";Strings.OfficeOM.L_UnknownBindingType="Kiểu ghép nối không được há»— trợ.";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Tham đối đầu vào không hợp lệ.";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_OverwriteWorksheetData="Thao tác được đặt bị lá»—i vì đối tượng dữ liệu được cung cấp sẽ ghi đè hoặc thay đổi dữ liệu.";Strings.OfficeOM.L_CoercionTypeNotSupported="Kiểu ép buá»™c đã xác định không được há»— trợ.";Strings.OfficeOM.L_GetSelectionNotSupported="Lá»±a chá»n hiện tại không được há»— trợ.";Strings.OfficeOM.L_NotSupportedBindingType="Không há»— trợ kiểu ghép nối {0} đã xác định.";Strings.OfficeOM.L_DialogInvalidScheme="Không há»— trợ lược đồ URL. Sá»­ dụng HTTPS thay thế.";Strings.OfficeOM.L_SaveSettingsError="Lá»—i Thiết đặt LÆ°u";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Ứng dụng {0} không tồn tại. Microsoft.Office.WebExtension.initialize(reason) không được gá»i.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Không há»— trợ loại nhận dạng của ngÆ°á»i dùng này.";Strings.OfficeOM.L_InvalidFormat="Lá»—i Äịnh dạng Không hợp lệ";Strings.OfficeOM.L_SpecifiedIdNotExist="ID đã xác định không tồn tại.";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} muốn hiển thị má»™t cá»­a sổ má»›i.";Strings.OfficeOM.L_ConnectionFailureWithDetails="Yêu cầu không thành công vá»›i mã trạng thái {0}, mã lá»—i {1} và thông báo lá»—i sau: {2}";Strings.OfficeOM.L_InValidOptionalArgument="đối số tùy chá»n không hợp lệ";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Cho phép";Strings.OfficeOM.L_DialogNavigateError="Lá»—i Äiá»u hÆ°á»›ng Há»™p thoại";Strings.OfficeOM.L_DocumentReadOnly="Không cho phép thao tác yêu cầu ở chế Ä‘á»™ tài liệu hiện tại.";Strings.OfficeOM.L_UserAbortedMessage="NgÆ°á»i dùng đã không chấp thuận quyá»n của phần bổ trợ.";Strings.OfficeOM.L_DialogAlreadyOpened="Hoạt Ä‘á»™ng không thành công vì phần bổ trợ này đã có má»™t há»™p thoại hiện hoạt.";Strings.OfficeOM.L_RequestTokenUnavailable="API này đã được giá»›i hạn để làm chậm tần số cuá»™c gá»i.";Strings.OfficeOM.L_IndexOutOfRange="Chỉ mục ngoài phạm vi.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Bá» qua";Strings.OfficeOM.L_Timeout="Hoạt Ä‘á»™ng đã hết thá»i gian chá».";Strings.OfficeOM.L_PermissionDenied="Từ chối Quyá»n";Strings.OfficeOM.L_InvalidCellsValue="Má»™t hoặc nhiá»u tham số ô có chứa giá trị không được phép. Hãy kiểm tra kép các giá trị rồi thá»­ lại.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Dữ liệu đã lá»—i thá»i. Truy xuất lại đối tượng.";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Thao tác không được há»— trợ trên kiểu ghép nối này.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Không thể dùng thông số tá»a Ä‘á»™ vá»›i Bảng kiểu ép buá»™c khi bảng chứa các ô được kết hợp.";Strings.OfficeOM.L_UnsupportedEnumeration="Liệt kê Không được há»— trợ";Strings.OfficeOM.L_DataWriteReminder="Lá»i nhắc Viết Dữ liệu" \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_CoercionTypeNotMatchBinding="Kiểu ép buá»™c đã xác định không tÆ°Æ¡ng thích vá»›i kiểu ghép nối này.";Strings.OfficeOM.L_CannotApplyPropertyThroughSetMethod="Không thể áp dụng thay đổi vá»›i thuá»™c tính '{0}' thông qua phÆ°Æ¡ng pháp \"object.set\".";Strings.OfficeOM.L_AppNotExistInitializeNotCalled="Ứng dụng {0} không tồn tại. Microsoft.Office.WebExtension.initialize(reason) không được gá»i.";Strings.OfficeOM.L_UserAborted="NgÆ°á»i dùng đã hủy bá» yêu cầu cấp phép.";Strings.OfficeOM.L_InvalidDataFormat="Äịnh dạng của đối tượng dữ liệu đã xác định không hợp lệ.";Strings.OfficeOM.L_ReadSettingsError="Lá»—i Thiết đặt Äá»c";Strings.OfficeOM.L_DisplayDialogError="Lá»—i Hiển thị Há»™p thoại";Strings.OfficeOM.L_OperationNotSupportedOnThisBindingType="Thao tác không được há»— trợ trên kiểu ghép nối này.";Strings.OfficeOM.L_InternalErrorDescription="Äã xuâÌt hiện lỗi nội bộ.";Strings.OfficeOM.L_UserClickIgnore="NgÆ°á»i dùng đã chá»n bá» qua há»™p thoại.";Strings.OfficeOM.L_InvalidGetColumns="Các cá»™t đã xác định không hợp lệ.";Strings.OfficeOM.L_DialogAlreadyOpened="Hoạt Ä‘á»™ng không thành công vì phần bổ trợ này đã có má»™t há»™p thoại hiện hoạt.";Strings.OfficeOM.L_SSOConnectionLostErrorMessage="A connection was lost during the sign in process, and the user may not be signed in. This was likely due to the user's browser configuration settings, such as security zones.";Strings.OfficeOM.L_OperationNotSupportedOnMatrixData="Ná»™i dung được chá»n phải ở định dạng bảng. Hãy định dạng dữ liệu dÆ°á»›i dạng bảng và thá»­ lại.";Strings.OfficeOM.L_TooManyIncompleteRequests="ChỠđến khi cuá»™c gá»i trÆ°á»›c hoàn tất.";Strings.OfficeOM.L_SSOServerError="Äã xảy ra lá»—i trong nhà cung cấp xác thá»±c.";Strings.OfficeOM.L_RowIndexOutOfRange="Giá trị chỉ mục dòng nằm ngoài phạm vi cho phép. Hãy sá»­ dụng má»™t giá trị (0 hoặc cao hÆ¡n) và nhá» hÆ¡n số lượng hàng.";Strings.OfficeOM.L_InvalidArgument="Tham đối '{0}' không phù hợp vá»›i tình huống này, bị thiếu hoặc không có định dạng phù hợp.";Strings.OfficeOM.L_TooManyArguments="quá nhiá»u đối số";Strings.OfficeOM.L_InvalidFormatValue="Má»™t hoặc nhiá»u tham số định dạng có chứa giá trị không được phép. Hãy kiểm tra kép các giá trị rồi thá»­ lại.";Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore="Bá» qua";Strings.OfficeOM.L_InvalidColumnsForBinding="Các cá»™t đã xác định không hợp lệ.";Strings.OfficeOM.L_OutOfRange="Ngoài Phạm vi";Strings.OfficeOM.L_SSOServerErrorMessage="Äã xảy ra lá»—i ngoài dá»± kiến trên máy chủ.";Strings.OfficeOM.L_PropertyDoesNotExist="Không tồn tại thuá»™c tính '{0}' trên đối tượng này.";Strings.OfficeOM.L_FileTypeNotSupported="Loại tệp đã chỉ định không được há»— trợ.";Strings.OfficeOM.L_TooManyOptionalFunction="nhiá»u chức năng tùy chá»n trong danh sách tham số";Strings.OfficeOM.L_SelectionCannotBound="Không thể ghép nối vá»›i lá»±a chá»n hiện tại.";Strings.OfficeOM.L_EventHandlerAdditionFailed="Không thể thêm trình xá»­ lý sá»± kiện.";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategory="Phần bổ trợ này không há»— trợ sá»± chấp thuận của ngÆ°á»i dùng.";Strings.OfficeOM.L_DialogOK="OK";Strings.OfficeOM.L_InvalidNode="Nút Không hợp lệ";Strings.OfficeOM.L_CustomFunctionNameCannotSplit="Tên hàm phải chứa không gian tên không trống và tên ngắn không trống.";Strings.OfficeOM.L_CustomXmlNodeNotFound="Không tìm thấy nút đã xác định.";Strings.OfficeOM.L_UnsupportedEnumerationMessage="Liệt kê không được há»— trợ trong ứng dụng máy chủ hiện tại.";Strings.OfficeOM.L_ShowWindowDialogNotification="{0} muốn hiển thị má»™t cá»­a sổ má»›i.";Strings.OfficeOM.L_InvalidApiCallInContext="Lệnh gá»i API không hợp lệ trong ngữ cảnh hiện tại.";Strings.OfficeOM.L_InvalidDataObject="Äối tượng Dữ liệu Không hợp lệ";Strings.OfficeOM.L_FormatValueOutOfRange="Giá trị nằm ngoài khoảng cho phép.";Strings.OfficeOM.L_CustomFunctionDefinitionMissing="Thuá»™c tính có tên này đại diện cho định nghÄ©a của hàm phải tồn tại trong Excel.CustomFunctions.";Strings.OfficeOM.L_APICallFailed="Gá»i API Không thành công";Strings.OfficeOM.L_BindingNotExist="Kết ghép đã xác định không tồn tại.";Strings.OfficeOM.L_DialogRequireHTTPS="Không há»— trợ giao thức HTTP. Sá»­ dụng HTTPS thay thế";Strings.OfficeOM.L_InvalidOperationInCellEditMode="Excel Ä‘ang ở chế Ä‘á»™ chỉnh sá»­a ô. Vui lòng thoát chế Ä‘á»™ chỉnh sá»­a bằng cách nhấn ENTER hoặc TAB hay chá»n má»™t ô khác, rồi thá»­ lại.";Strings.OfficeOM.L_CallbackNotAFunction="Gá»i lại phải là chức năng kiểu, thuá»™c kiểu {0}.";Strings.OfficeOM.L_SpecifiedIdNotExist="ID đã xác định không tồn tại.";Strings.OfficeOM.L_NamedItemNotFound="Mục được đặt tên không tồn tại.";Strings.OfficeOM.L_CannotRegisterEvent="Không thể đăng ký quy trình xá»­ lý sá»± kiện.";Strings.OfficeOM.L_TooManyOptionalObjects="nhiá»u đối tượng tùy chá»n trong danh sách tham số";Strings.OfficeOM.L_CellDataAmountBeyondLimits="LÆ°u ý: Số lượng ô trong má»™t bảng được Ä‘á» nghị để dÆ°á»›i 20.000 ô.";Strings.OfficeOM.L_NewWindowCrossZone="Thiết đặt bảo mật trong trình duyệt của bạn ngăn không cho chúng tôi tạo há»™p thoại. Hãy thá»­ dùng má»™t trình duyệt khác hoặc {0} để '{1}' và miá»n được hiển thị trong thanh địa chỉ của bạn có thể nằm trong cùng má»™t khu vá»±c bảo mật.";Strings.OfficeOM.L_OperationNotSupported="Thao taÌc không Ä‘Æ°Æ¡Ì£c hỗ trÆ¡Ì£.";Strings.OfficeOM.L_NonUniformPartialGetNotSupported="Không thể dùng thông số tá»a Ä‘á»™ vá»›i Bảng kiểu ép buá»™c khi bảng chứa các ô được kết hợp.";Strings.OfficeOM.L_SetDataParametersConflict="Các tham biến đã xác định có xung Ä‘á»™t.";Strings.OfficeOM.L_NotSupportedBindingType="Không há»— trợ kiểu ghép nối {0} đã xác định.";Strings.OfficeOM.L_MultipleNamedItemFound="Äã tìm thấy nhiá»u đối tượng có cùng tên.";Strings.OfficeOM.L_RequestTimeout="Cuá»™c gá»i mất quá lâu để thá»±c hiện.";Strings.OfficeOM.L_NewWindowCrossZoneErrorString="Các hạn chế trình duyệt đã ngăn chúng tôi tạo há»™p thoại. Miá»n của há»™p thoại và miá»n của máy chủ phần bổ trợ Ä‘ang không cùng nằm trong má»™t khu vá»±c bảo mật.";Strings.OfficeOM.L_InvalidNamedItemForBindingType="Kiểu ghép nối đã xác định không tÆ°Æ¡ng thích vá»›i mục được đặt tên đã cung cấp.";Strings.OfficeOM.L_IndexOutOfRange="Chỉ mục ngoài phạm vi.";Strings.OfficeOM.L_NotSupported="Hàm {0} không được há»— trợ.";Strings.OfficeOM.L_InvalidOrTimedOutSession="Phiên Không hợp lệ hoặc Äã hết Thá»i gian chá»";Strings.OfficeOM.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage="Thao tác không thành công do phần bổ trợ này không há»— trợ sá»± chấp thuận của ngÆ°á»i dùng trong danh mục này";Strings.OfficeOM.L_EventHandlerRemovalFailed="Không thể loại bá» trình xá»­ lý sá»± kiện.";Strings.OfficeOM.L_InvalidBindingOperation="Thao tác Ghép nối Không hợp lệ";Strings.OfficeOM.L_InvalidBinding="Ghép nối Không hợp lệ";Strings.OfficeOM.L_AppNameNotExist="Tên Bổ trợ cho {0} không tồn tại.";Strings.OfficeOM.L_CustomXmlOutOfDateMessage="Dữ liệu đã lá»—i thá»i. Truy xuất lại đối tượng.";Strings.OfficeOM.L_UserNotSignedIn="Không có ngÆ°á»i dùng nào đăng nhập vào Office.";Strings.OfficeOM.L_DataNotMatchCoercionType="Kiểu đối tượng dữ liệu đã xác định không tÆ°Æ¡ng thích vá»›i lá»±a chá»n hiện tại.";Strings.OfficeOM.L_SaveSettingsError="Lá»—i Thiết đặt LÆ°u";Strings.OfficeOM.L_AddBindingFromPromptDefaultText="Vui lòng chá»n.";Strings.OfficeOM.L_UnsupportedDataObject="Kiểu đối tượng dữ liệu được cung cấp không được há»— trợ.";Strings.OfficeOM.L_RedundantCallbackSpecification="Gá»i lại không thể được xác định trong cả danh sách đối số và đối tượng tùy chá»n.";Strings.OfficeOM.L_InvalidSetRows="Các hàng đã xác định không hợp lệ.";Strings.OfficeOM.L_InvalidParameters="Hàm {0} có các tham số không hợp lệ.";Strings.OfficeOM.L_AddinIsAlreadyRequestingToken="Phần bổ trợ đã Ä‘ang yêu cầu mã thông báo truy nhập.";Strings.OfficeOM.L_GetDataIsTooLarge="Bá»™ dữ liệu được yêu cầu quá lá»›n.";Strings.OfficeOM.L_NotImplemented="Hàm {0} chÆ°a được triển khai.";Strings.OfficeOM.L_UnsupportedUserIdentityMessage="Không há»— trợ loại nhận dạng của ngÆ°á»i dùng này.";Strings.OfficeOM.L_NetworkProblem="Vấn Ä‘á» vá» Mạng";Strings.OfficeOM.L_InvalidBindingError="Lá»—i Ghép nối Không hợp lệ";Strings.OfficeOM.L_AttemptingToSetReadOnlyProperty="Äang tìm cách đặt thuá»™c tính chỉ Ä‘á»c '{0}'.";Strings.OfficeOM.L_SelectionNotSupportCoercionType="Lá»±a chá»n hiện tại không tÆ°Æ¡ng thích vá»›i kiểu ép buá»™c đã xác định.";Strings.OfficeOM.L_RequestTokenUnavailable="API này đã được giá»›i hạn để làm chậm tần số cuá»™c gá»i.";Strings.OfficeOM.L_CloseFileBeforeRetrieve="Gá»i closeAsync trên Tệp hiện tại trÆ°á»›c khi truy xuất tệp khác.";Strings.OfficeOM.L_PermissionDenied="Từ chối Quyá»n";Strings.OfficeOM.L_AddinIsAlreadyRequestingTokenMessage="Hoạt Ä‘á»™ng không thành công vì phần bổ trợ này đã Ä‘ang yêu cầu mã thông báo truy nhập.";Strings.OfficeOM.L_ConnectionFailureWithStatus="Yêu cầu không thành công vá»›i mã trạng thái {0}.";Strings.OfficeOM.L_CoercionTypeNotSupported="Kiểu ép buá»™c đã xác định không được há»— trợ.";Strings.OfficeOM.L_InvalidResourceUrlMessage="Äã chỉ định Url tài nguyên không hợp lệ trong tệp kê khai.";Strings.OfficeOM.L_MissingRequiredArguments="thiếu má»™t số đối số bắt buá»™c";Strings.OfficeOM.L_InvalidGrant="Thiếu cấp phép trÆ°á»›c.";Strings.OfficeOM.L_InvalidFormat="Lá»—i Äịnh dạng Không hợp lệ";Strings.OfficeOM.L_InvalidOrTimedOutSessionMessage="Phiên Office Online của bạn đã hết hạn hoặc không hợp lệ. Äể tiếp tục, hãy làm má»›i trang.";Strings.OfficeOM.L_InitializeNotReady="Office.js chÆ°a được tải hết. Vui lòng thá»­ lại sau hoặc đảm bảo thêm mã khởi tạo vào hàm Office.initialize.";Strings.OfficeOM.L_UnknownBindingType="Kiểu ghép nối không được há»— trợ.";Strings.OfficeOM.L_DataWriteReminder="Lá»i nhắc Viết Dữ liệu";Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink="đặt cấu hình trình duyệt của bạn";Strings.OfficeOM.L_InvalidGrantMessage="Ứng dụng này bị cấp thiếu quyá»n.";Strings.OfficeOM.L_DataNotMatchBindingType="Dữ liệu đã định không tÆ°Æ¡ng thích vá»›i kiểu ghép nối.";Strings.OfficeOM.L_BindingCreationError="Lá»—i Tạo Ghép nối";Strings.OfficeOM.L_OsfControlTypeNotSupported="Kiểu OsfControl không được há»— trợ.";Strings.OfficeOM.L_CannotNavigateTo="Äối tượng nằm ở vị trí không há»— trợ dẫn hÆ°á»›ng.";Strings.OfficeOM.L_InValidOptionalArgument="đối số tùy chá»n không hợp lệ";Strings.OfficeOM.L_ShuttingDown="Thao tác bị lá»—i vì dữ liệu không phải là má»›i nhất trên máy chủ.";Strings.OfficeOM.L_InvalidAPICall="Lệnh gá»i API Không hợp lệ";Strings.OfficeOM.L_CustomXmlOutOfDateName="Dữ liệu Không Hiện hành";Strings.OfficeOM.L_DataNotMatchBindingSize="Äối tượng dữ liệu được cung cấp không khá»›p vá»›i kích cỡ của lá»±a chá»n hiện tại.";Strings.OfficeOM.L_HostError="Lá»—i Máy chủ";Strings.OfficeOM.L_MemoryLimit="Vượt quá Giá»›i hạn Bá»™ nhá»›";Strings.OfficeOM.L_InvalidResourceUrl="Äã cung cấp Url tài nguyên ứng dụng không hợp lệ.";Strings.OfficeOM.L_EventRegistrationError="Lá»—i Äăng ký Sá»± kiện";Strings.OfficeOM.L_SliceSizeNotSupported="Kích thÆ°á»›c lát cắt đã chỉ định không được há»— trợ.";Strings.OfficeOM.L_InvalidValue="Giá trị Không hợp lệ";Strings.OfficeOM.L_DialogInvalidScheme="Không há»— trợ lược đồ URL. Sá»­ dụng HTTPS thay thế.";Strings.OfficeOM.L_InvalidRequestContext="Không thể sá»­ dụng đối tượng cho các ngữ cảnh yêu cầu khác nhau.";Strings.OfficeOM.L_CellFormatAmountBeyondLimits="LÆ°u ý: Bá»™ định dạng do lệnh gá»i Äịnh dạng API thiết lập được Ä‘á» nghị để dÆ°á»›i 100.";Strings.OfficeOM.L_CustomFunctionNameContainsBadChars="Tên hàm chỉ có thể chứa chữ cái, chữ số, gạch dÆ°á»›i và dấu chấm.";Strings.OfficeOM.L_FunctionCallFailed="Lệnh gá»i hàm {0} không thành công, mã lá»—i: {1}.";Strings.OfficeOM.L_NonUniformPartialSetNotSupported="Không thể dùng thông số tá»a Ä‘á»™ vá»›i Bảng kiểu ép buá»™c khi bảng chứa các ô được kết hợp.";Strings.OfficeOM.L_ConnectionFailureWithDetails="Yêu cầu không thành công vá»›i mã trạng thái {0}, mã lá»—i {1} và thông báo lá»—i sau: {2}";Strings.OfficeOM.L_InvalidSetColumns="Các cá»™t đã xác định không hợp lệ.";Strings.OfficeOM.L_InvalidApiArgumentsMessage="Tham đối đầu vào không hợp lệ.";Strings.OfficeOM.L_InvalidSelectionForBindingType="Không thể tạo ghép nối vá»›i lá»±a chá»n hiện tại và kiểu ghép nối đã xác định.";Strings.OfficeOM.L_EventHandlerNotExist="Không tìm thấy bá»™ xá»­ lý biến cố xác định cho gắn kết này.";Strings.OfficeOM.L_InvalidSSOAddinMessage="Không há»— trợ API nhận dạng cho phần bổ trợ này.";Strings.OfficeOM.L_BadSelectorString="Chuá»—i được chuyển vào công cụ chá»n không được định dạng đúng hoặc không được há»— trợ.";Strings.OfficeOM.L_DocumentReadOnly="Không cho phép thao tác yêu cầu ở chế Ä‘á»™ tài liệu hiện tại.";Strings.OfficeOM.L_CustomXmlError="Lá»—i XML Tùy chỉnh.";Strings.OfficeOM.L_ApiNotFoundDetails="PhÆ°Æ¡ng pháp hoặc thuá»™c tính {0} là má»™t phần trong tập hợp yêu cầu {1}, đối tượng này không có sẵn trong phiên bản {2} của bạn.";Strings.OfficeOM.L_ShowWindowDialogNotificationAllow="Cho phép";Strings.OfficeOM.L_InvalidTableOptionValue="Má»™t hoặc nhiá»u tham số tableOption có chứa giá trị không được phép. Hãy kiểm tra kép các giá trị rồi thá»­ lại.";Strings.OfficeOM.L_SettingsCannotSave="Không thể lÆ°u thiết đặt.";Strings.OfficeOM.L_UnsupportedUserIdentity="Loại nhận dạng ngÆ°á»i dùng không được há»— trợ.";Strings.OfficeOM.L_DataStale="Dữ liệu Không Cập nhật";Strings.OfficeOM.L_NotSupportedEventType="Không há»— trợ kiểu sá»± kiện {0} đã xác định.";Strings.OfficeOM.L_NetworkProblemRetrieveFile="Sá»± cố mạng đã không cho truy xuất tệp.";Strings.OfficeOM.L_MissingParameter="Thiếu Tham số";Strings.OfficeOM.L_CustomFunctionImplementationMissing="Thuá»™c tính có tên này trong Excel.CustomFunctions đại diện cho định nghÄ©a của chức năng phải chứa thuá»™c tính 'gá»i' có tác dụng thá»±c thi hàm.";Strings.OfficeOM.L_ValueNotLoaded='ChÆ°a tải giá trị của đối tượng kết quả. TrÆ°á»›c khi Ä‘á»c thuá»™c tính giá trị, hãy gá»i "context.sync()" trong ngữ cảnh yêu cầu có liên quan.';Strings.OfficeOM.L_SettingNameNotExist="Tên thiết đặt đã xác định không tồn tại.";Strings.OfficeOM.L_InvalidCellsValue="Má»™t hoặc nhiá»u tham số ô có chứa giá trị không được phép. Hãy kiểm tra kép các giá trị rồi thá»­ lại.";Strings.OfficeOM.L_DataNotMatchSelection="Äối tượng dữ liệu được cung cấp không tÆ°Æ¡ng thích vá»›i hình dạng hoặc kích thÆ°á»›c của lá»±a chá»n hiện tại.";Strings.OfficeOM.L_PropertyNotLoaded="Thuá»™c tính '{0}' không khả dụng. TrÆ°á»›c khi Ä‘á»c giá trị thuá»™c tính, hãy gá»i phÆ°Æ¡ng pháp tải cho đối tượng chứa và gá»i \"context.sync()\" cho ngữ cảnh yêu cầu được liên kết.";Strings.OfficeOM.L_DialogNavigateError="Lá»—i Äiá»u hÆ°á»›ng Há»™p thoại";Strings.OfficeOM.L_NavOutOfBound="Thao tác thất bại do chỉ mục nằm ngoài phạm vi.";Strings.OfficeOM.L_ColIndexOutOfRange="Giá trị chỉ mục cá»™t nằm ngoài phạm vi cho phép. Hãy sá»­ dụng má»™t giá trị (0 hoặc cao hÆ¡n) và bé hÆ¡n số lượng cá»™t.";Strings.OfficeOM.L_DataWriteError="Lá»—i Ghi Dữ liệu";Strings.OfficeOM.L_OverwriteWorksheetData="Thao tác được đặt bị lá»—i vì đối tượng dữ liệu được cung cấp sẽ ghi đè hoặc thay đổi dữ liệu.";Strings.OfficeOM.L_CustomXmlExceedQuotaMessage="XPath giá»›i hạn lá»±a chá»n tá»›i 1024 mục.";Strings.OfficeOM.L_DialogAddressNotTrusted="Phần tá»­ AppDomains trong tệp kê khai không chứa miá»n của URL.";Strings.OfficeOM.L_GetDataParametersConflict="Các tham biến đã xác định có xung Ä‘á»™t.";Strings.OfficeOM.L_RunMustReturnPromise='Hàm lô chuyển qua phÆ°Æ¡ng pháp ".run" không trả vá» má»™t lá»i hứa. Hàm phải trả vá» má»™t lá»i hứa, để có thể công bố má»i đối tượng được tá»± Ä‘á»™ng theo dõi khi hoàn tất hoạt Ä‘á»™ng lô. Thông thÆ°á»ng, bạn sẽ trả vá» má»™t lá»i hứa bằng cách trả vá» phản hồi từ "context.sync()".';Strings.OfficeOM.L_ElementMissing="Chúng tôi không thể định dạng ô bảng bởi vì má»™t vài giá trị tham số bị thiếu. Hãy kiểm tra kép các tham số rồi thá»­ lại.";Strings.OfficeOM.L_BindingToMultipleSelection="Không há»— trợ lá»±a chá»n không liá»n nhau.";Strings.OfficeOM.L_UserAbortedMessage="NgÆ°á»i dùng đã không chấp thuận quyá»n của phần bổ trợ.";Strings.OfficeOM.L_GetSelectionNotSupported="Lá»±a chá»n hiện tại không được há»— trợ.";Strings.OfficeOM.L_InternalError="Lỗi Nội bộ";Strings.OfficeOM.L_InvalidGetStartRowColumn="Giá trị startRow hoặc startColumn đã xác định không hợp lệ.";Strings.OfficeOM.L_FormattingReminder="Äịnh dạng Lá»i nhắc";Strings.OfficeOM.L_ActivityLimitReached="Äã đạt giá»›i hạn hoạt Ä‘á»™ng.";Strings.OfficeOM.L_SettingsStaleError="Lá»—i Thiết đặt CÅ©";Strings.OfficeOM.L_InvalidGetRows="Các hàng đã xác định không hợp lệ.";Strings.OfficeOM.L_NoCapability="Bạn không có đủ quyá»n cho hành Ä‘á»™ng này.";Strings.OfficeOM.L_CannotWriteToSelection="Không thể ghi vào lá»±a chá»n hiện tại.";Strings.OfficeOM.L_SSOClientErrorMessage="Äã xảy ra lá»—i ngoài dá»± kiến trong máy khách.";Strings.OfficeOM.L_BrowserAPINotSupported="Trình duyệt này không há»— trợ API được yêu cầu.";Strings.OfficeOM.L_Timeout="Hoạt Ä‘á»™ng đã hết thá»i gian chá».";Strings.OfficeOM.L_SettingsAreStale="Không thể lÆ°u thiết đặt vì chúng không phải là má»›i nhất.";Strings.OfficeOM.L_APINotSupported="API Không được Há»— trợ";Strings.OfficeOM.L_InvalidCoercion="Kiểu Ép buá»™c Không hợp lệ";Strings.OfficeOM.L_SSOClientError="Äã xảy ra lá»—i trong yêu cầu xác thá»±c từ Office.";Strings.OfficeOM.L_UnsupportedEnumeration="Liệt kê Không được há»— trợ";Strings.OfficeOM.L_InvalidArgumentGeneric="(Các) tham đối được Ä‘Æ°a vào hàm không có phù hợp trong tình huống này, bị thiếu hoặc không ở định dạng đúng.";Strings.OfficeOM.L_SetDataIsTooLarge="Äối tượng dữ liệu đã xác định quá lá»›n.";Strings.OfficeOM.L_InvalidReadForBlankRow="Dòng đã nêu trống.";Strings.OfficeOM.L_InvalidGetRowColumnCounts="Giá trị rowCount hoặc columnCount đã xác định không hợp lệ.";Strings.OfficeOM.L_InvalidObjectPath='ÄÆ°á»ng dẫn đối tượng \'{0}\' không phù hợp vá»›i thao tác bạn Ä‘ang cố gắng thá»±c hiện. Nếu bạn Ä‘ang sá»­ dụng đối tượng trên nhiá»u cuá»™c gá»i "context.sync" và không thuá»™c phạm vi thá»±c thi chuá»—i của lô ".run", vui lòng sá»­ dụng các phÆ°Æ¡ng pháp "context.trackedObjects.add()" và "context.trackedObjects.remove()" để quản lý thá»i hạn của đối tượng.';Strings.OfficeOM.L_DataReadError="Lá»—i Äá»c Dữ liệu";Strings.OfficeOM.L_InvalidSetStartRowColumn="Giá trị startRow hoặc startColumn đã xác định không hợp lệ.";Strings.OfficeOM.L_CustomXmlExceedQuotaName="Äã đạt Giá»›i hạn vá» Vùng chá»n";Strings.OfficeOM.L_SSOConnectionLostError="A connection was lost during the sign in process." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/vi-vn/outlook_strings.debug.js b/node_modules/@microsoft/office-js/dist/vi-vn/outlook_strings.debug.js index eaaa5df..c768399 100644 --- a/node_modules/@microsoft/office-js/dist/vi-vn/outlook_strings.debug.js +++ b/node_modules/@microsoft/office-js/dist/vi-vn/outlook_strings.debug.js @@ -1,34 +1,35 @@ - +/* Version: 16.0.8825.1000 */ + Type.registerNamespace("_u"); _u.ExtensibilityStrings = function() { }; _u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings"); _u.ExtensibilityStrings.l_DisplayNameTooLong_Text = "Má»™t hoặc nhiá»u tên hiển thị được cung cấp quá dài."; -_u.ExtensibilityStrings.l_OffsetNotfound_Text = "Không tiÌ€m thâÌy phần bù cho tem thá»i gian naÌ€y."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Yêu cầu coÌ mÆ°Ìc quyá»n cao để coÌ thể truy nhập các phần tử Ä‘Æ°Æ¡Ì£c bảo vệ của JavaScript API cho Office."; +_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "ID phần đính kèm không hợp lệ."; +_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "ChÆ°a có thông tin vá» ngÆ°á»i nhận hợp lệ."; +_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Không thể thêm phần đính kèm do quá lá»›n."; +_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Không thể xóa phần đính kèm do không tìm thấy phần đính kèm có chỉ mục đính kèm."; _u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text = "Không thể thêm phần đính kèm trong lúc Ä‘ang truy xuất trả lá»i đầy đủ hoặc chuyển tiếp từ máy chủ."; +_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Má»™t hoặc nhiá»u địa chỉ email được cung cấp quá dài."; +_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Yêu cầu vượt quá giá»›i hạn kích thÆ°á»›c 1 MB. Vui lòng thay đổi yêu cầu EWS."; +_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text = "Yêu cầu coÌ mÆ°Ìc quyá»n cao để coÌ thể truy nhập các phần tử Ä‘Æ°Æ¡Ì£c bảo vệ của JavaScript API cho Office."; +_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Tổng số ngÆ°á»i nhận trong trÆ°á»ng không thể vượt quá {0}."; _u.ExtensibilityStrings.l_InvalidDate_Text = "Äầu vào không giải quyết vaÌ€o má»™t ngày hÆ¡Ì£p lệ."; -_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "Làm sạch HTML đã thất bại."; -_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "NgÆ°á»i dùng đã thay đổi vị trí của con trá» chuá»™t trong lúc chèn dữ liệu."; -_u.ExtensibilityStrings.l_InvalidEndTime_Text = "Thá»i gian kết thúc không thể trÆ°á»›c khi thá»i gian bắt đầu."; -_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "NgÆ°á»i dùng đã loại bá» phần đính kèm trÆ°á»›c khi tải lên hoàn tất."; -_u.ExtensibilityStrings.l_InvalidEventDates_Text = "Ngày kết thúc xảy ra trÆ°á»›c ngày bắt đầu."; -_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Lá»—i Phần đính kèm"; +_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Lá»—i Ghi Dữ liệu"; +_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Các thông số đã cung cấp không phù hợp vá»›i các định dạng dá»± kiến."; +_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Không thể xóa phần đính kèm ra khá»i mục."; +_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "Yêu cầu coÌ mÆ°Ìc quyền caÌo để coÌ thể gá»i phÆ°Æ¡ng pháp: '{0}'."; +_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Không thể thêm phần đính kèm vào mục."; +_u.ExtensibilityStrings.l_OffsetNotfound_Text = "Không tiÌ€m thâÌy phần bù cho tem thá»i gian naÌ€y."; _u.ExtensibilityStrings.l_InvalidAttachmentPath_Text = "ÄÆ°á»ng dẫn phần đính kèm không hợp lệ."; _u.ExtensibilityStrings.l_InternalFormatError_Text = "Äã có lá»—i định dạng ná»™i bá»™."; -_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text = "Yêu cầu coÌ mÆ°Ìc quyền caÌo để coÌ thể gá»i phÆ°Æ¡ng pháp: '{0}'."; -_u.ExtensibilityStrings.l_InternalProtocolError_Text = "Lá»—i giao thÆ°Ìc ná»™i bá»™: '{0}'."; -_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text = "Không thể xóa phần đính kèm ra khá»i mục."; -_u.ExtensibilityStrings.l_EmailAddressTooLong_Text = "Má»™t hoặc nhiá»u địa chỉ email được cung cấp quá dài."; -_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text = "Không thể xóa phần đính kèm do không tìm thấy phần đính kèm có chỉ mục đính kèm."; -_u.ExtensibilityStrings.l_InvalidAttachmentId_Text = "ID phần đính kèm không hợp lệ."; -_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text = "Tổng số ngÆ°á»i nhận trong trÆ°á»ng không thể vượt quá {0}."; +_u.ExtensibilityStrings.l_InvalidEndTime_Text = "Thá»i gian kết thúc không thể trÆ°á»›c khi thá»i gian bắt đầu."; +_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text = "Làm sạch HTML đã thất bại."; _u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text = "Mục được chá»n đã bị thay đổi."; -_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text = "ChÆ°a có thông tin vá» ngÆ°á»i nhận hợp lệ."; -_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text = "Không thể thêm phần đính kèm vào mục."; -_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text = "Các thông số đã cung cấp không phù hợp vá»›i các định dạng dá»± kiến."; -_u.ExtensibilityStrings.l_DataWriteErrorName_Text = "Lá»—i Ghi Dữ liệu"; -_u.ExtensibilityStrings.l_EwsRequestOversized_Text = "Yêu cầu vượt quá giá»›i hạn kích thÆ°á»›c 1 MB. Vui lòng thay đổi yêu cầu EWS."; -_u.ExtensibilityStrings.l_AttachmentExceededSize_Text = "Không thể thêm phần đính kèm do quá lá»›n."; -_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Không thể thêm phần đính kèm do thÆ° đã đạt lượng tệp đính kèm tối Ä‘a" +_u.ExtensibilityStrings.l_AttachmentErrorName_Text = "Lá»—i Phần đính kèm"; +_u.ExtensibilityStrings.l_CursorPositionChanged_Text = "NgÆ°á»i dùng đã thay đổi vị trí của con trá» chuá»™t trong lúc chèn dữ liệu."; +_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text = "Không thể thêm phần đính kèm do thÆ° đã đạt lượng tệp đính kèm tối Ä‘a"; +_u.ExtensibilityStrings.l_InternalProtocolError_Text = "Lá»—i giao thÆ°Ìc ná»™i bá»™: '{0}'."; +_u.ExtensibilityStrings.l_InvalidEventDates_Text = "Ngày kết thúc xảy ra trÆ°á»›c ngày bắt đầu."; +_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text = "NgÆ°á»i dùng đã loại bá» phần đính kèm trÆ°á»›c khi tải lên hoàn tất." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/vi-vn/outlook_strings.js b/node_modules/@microsoft/office-js/dist/vi-vn/outlook_strings.js index 75023b0..f96d47d 100644 --- a/node_modules/@microsoft/office-js/dist/vi-vn/outlook_strings.js +++ b/node_modules/@microsoft/office-js/dist/vi-vn/outlook_strings.js @@ -1 +1,3 @@ -Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Má»™t hoặc nhiá»u tên hiển thị được cung cấp quá dài.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Không tiÌ€m thâÌy phần bù cho tem thá»i gian naÌ€y.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Yêu cầu coÌ mÆ°Ìc quyá»n cao để coÌ thể truy nhập các phần tử Ä‘Æ°Æ¡Ì£c bảo vệ của JavaScript API cho Office.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Không thể thêm phần đính kèm trong lúc Ä‘ang truy xuất trả lá»i đầy đủ hoặc chuyển tiếp từ máy chủ.";_u.ExtensibilityStrings.l_InvalidDate_Text="Äầu vào không giải quyết vaÌ€o má»™t ngày hÆ¡Ì£p lệ.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="Làm sạch HTML đã thất bại.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="NgÆ°á»i dùng đã thay đổi vị trí của con trá» chuá»™t trong lúc chèn dữ liệu.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="Thá»i gian kết thúc không thể trÆ°á»›c khi thá»i gian bắt đầu.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="NgÆ°á»i dùng đã loại bá» phần đính kèm trÆ°á»›c khi tải lên hoàn tất.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="Ngày kết thúc xảy ra trÆ°á»›c ngày bắt đầu.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Lá»—i Phần đính kèm";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="ÄÆ°á»ng dẫn phần đính kèm không hợp lệ.";_u.ExtensibilityStrings.l_InternalFormatError_Text="Äã có lá»—i định dạng ná»™i bá»™.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Yêu cầu coÌ mÆ°Ìc quyền caÌo để coÌ thể gá»i phÆ°Æ¡ng pháp: '{0}'.";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Lá»—i giao thÆ°Ìc ná»™i bá»™: '{0}'.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Không thể xóa phần đính kèm ra khá»i mục.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Má»™t hoặc nhiá»u địa chỉ email được cung cấp quá dài.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Không thể xóa phần đính kèm do không tìm thấy phần đính kèm có chỉ mục đính kèm.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="ID phần đính kèm không hợp lệ.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Tổng số ngÆ°á»i nhận trong trÆ°á»ng không thể vượt quá {0}.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Mục được chá»n đã bị thay đổi.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="ChÆ°a có thông tin vá» ngÆ°á»i nhận hợp lệ.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Không thể thêm phần đính kèm vào mục.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Các thông số đã cung cấp không phù hợp vá»›i các định dạng dá»± kiến.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Lá»—i Ghi Dữ liệu";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Yêu cầu vượt quá giá»›i hạn kích thÆ°á»›c 1 MB. Vui lòng thay đổi yêu cầu EWS.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Không thể thêm phần đính kèm do quá lá»›n.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Không thể thêm phần đính kèm do thÆ° đã đạt lượng tệp đính kèm tối Ä‘a" \ No newline at end of file +/* Version: 16.0.8825.1000 */ + +Type.registerNamespace("_u");_u.ExtensibilityStrings=function(){};_u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="Má»™t hoặc nhiá»u tên hiển thị được cung cấp quá dài.";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="ID phần đính kèm không hợp lệ.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="ChÆ°a có thông tin vá» ngÆ°á»i nhận hợp lệ.";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="Không thể thêm phần đính kèm do quá lá»›n.";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="Không thể xóa phần đính kèm do không tìm thấy phần đính kèm có chỉ mục đính kèm.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Không thể thêm phần đính kèm trong lúc Ä‘ang truy xuất trả lá»i đầy đủ hoặc chuyển tiếp từ máy chủ.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="Má»™t hoặc nhiá»u địa chỉ email được cung cấp quá dài.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="Yêu cầu vượt quá giá»›i hạn kích thÆ°á»›c 1 MB. Vui lòng thay đổi yêu cầu EWS.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Yêu cầu coÌ mÆ°Ìc quyá»n cao để coÌ thể truy nhập các phần tử Ä‘Æ°Æ¡Ì£c bảo vệ của JavaScript API cho Office.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="Tổng số ngÆ°á»i nhận trong trÆ°á»ng không thể vượt quá {0}.";_u.ExtensibilityStrings.l_InvalidDate_Text="Äầu vào không giải quyết vaÌ€o má»™t ngày hÆ¡Ì£p lệ.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Lá»—i Ghi Dữ liệu";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="Các thông số đã cung cấp không phù hợp vá»›i các định dạng dá»± kiến.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="Không thể xóa phần đính kèm ra khá»i mục.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Yêu cầu coÌ mÆ°Ìc quyền caÌo để coÌ thể gá»i phÆ°Æ¡ng pháp: '{0}'.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="Không thể thêm phần đính kèm vào mục.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="Không tiÌ€m thâÌy phần bù cho tem thá»i gian naÌ€y.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="ÄÆ°á»ng dẫn phần đính kèm không hợp lệ.";_u.ExtensibilityStrings.l_InternalFormatError_Text="Äã có lá»—i định dạng ná»™i bá»™.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="Thá»i gian kết thúc không thể trÆ°á»›c khi thá»i gian bắt đầu.";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="Làm sạch HTML đã thất bại.";_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="Mục được chá»n đã bị thay đổi.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Lá»—i Phần đính kèm";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="NgÆ°á»i dùng đã thay đổi vị trí của con trá» chuá»™t trong lúc chèn dữ liệu.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Không thể thêm phần đính kèm do thÆ° đã đạt lượng tệp đính kèm tối Ä‘a";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Lá»—i giao thÆ°Ìc ná»™i bá»™: '{0}'.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="Ngày kết thúc xảy ra trÆ°á»›c ngày bắt đầu.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="NgÆ°á»i dùng đã loại bá» phần đính kèm trÆ°á»›c khi tải lên hoàn tất." \ No newline at end of file diff --git a/node_modules/@microsoft/office-js/dist/word-ios-16.00.debug.js b/node_modules/@microsoft/office-js/dist/word-ios-16.00.debug.js index 7018086..15bcd43 100644 --- a/node_modules/@microsoft/office-js/dist/word-ios-16.00.debug.js +++ b/node_modules/@microsoft/office-js/dist/word-ios-16.00.debug.js @@ -1,7 +1,7 @@ /* Word iOS-specific API library */ -/* Version: 16.0.8117.3000 */ +/* Version: 16.0.8904.3000 */ -/* Office.js Version: 16.0.8118.1000 */ +/* Office.js Version: 16.0.8916.1000 */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ @@ -257,6 +257,54 @@ OSF.OUtil=(function () { delete parent[name]; } }, + serializeSettings: function OSF_OUtil$serializeSettings(settingsCollection) { + var ret={}; + for (var key in settingsCollection) { + var value=settingsCollection[key]; + try { + if (JSON) { + value=JSON.stringify(value, function dateReplacer(k, v) { + return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix+this[k].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix : v; + }); + } + else { + value=Sys.Serialization.JavaScriptSerializer.serialize(value); + } + ret[key]=value; + } + catch (ex) { + } + } + return ret; + }, + deserializeSettings: function OSF_OUtil$deserializeSettings(serializedSettings) { + var ret={}; + serializedSettings=serializedSettings || {}; + for (var key in serializedSettings) { + var value=serializedSettings[key]; + try { + if (JSON) { + value=JSON.parse(value, function dateReviver(k, v) { + var d; + if (typeof v==='string' && v && v.length > 6 && v.slice(0, 5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) { + d=new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + } + else { + value=Sys.Serialization.JavaScriptSerializer.deserialize(value, true); + } + ret[key]=value; + } + catch (ex) { + } + } + return ret; + }, loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) { if (url && callback) { var doc=window.document; @@ -837,6 +885,14 @@ OSF.OUtil=(function () { } } }, + removeClass: function OSF_OUtil$removeClass(elmt, val) { + if (OSF.OUtil.hasClass(elmt, val)) { + var className=elmt.getAttribute(_classN); + var reg=new RegExp('(\\s|^)'+val+'(\\s|$)'); + className=className.replace(reg, ''); + elmt.setAttribute(_classN, className); + } + }, hasClass: function OSF_OUtil$hasClass(elmt, clsName) { var className=elmt.getAttribute(_classN); return className && className.match(new RegExp('(\\s|^)'+clsName+'(\\s|$)')); @@ -973,6 +1029,12 @@ OSF.OUtil.Guid=(function () { })(); window.OSF=OSF; OSF.OUtil.setNamespace("OSF", window); +OSF.MessageIDs={ + "FetchBundleUrl": 0, + "LoadReactBundle": 1, + "LoadBundleSuccess": 2, + "LoadBundleError": 3 +}; OSF.AppName={ Unsupported: 0, Excel: 1, @@ -1000,7 +1062,10 @@ OSF.AppName={ OutlookAndroid: 4194304, OneNoteWinRT: 8388608, ExcelAndroid: 8388609, - VisioWebApp: 8388610 + VisioWebApp: 8388610, + OneNoteIOS: 8388611, + WordAndroid: 8388613, + PowerpointAndroid: 8388614 }; OSF.InternalPerfMarker={ DataCoercionBegin: "Agave.HostCall.CoerceDataStart", @@ -1030,7 +1095,9 @@ OSF.AgaveHostAction={ "EscExit": 15, "F2Exit": 16, "ExitNoFocusable": 17, - "ExitNoFocusableShift": 18 + "ExitNoFocusableShift": 18, + "MouseEnter": 19, + "MouseLeave": 20 }; OSF.SharedConstants={ "NotificationConversationIdSuffix": '_ntf' @@ -1166,6 +1233,8 @@ Microsoft.Office.WebExtension.Parameters={ HostType: "hostType", ForceConsent: "forceConsent", ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + Reserved: "reserved", Xml: "xml", Namespace: "namespace", Prefix: "prefix", @@ -1198,7 +1267,9 @@ Microsoft.Office.WebExtension.Parameters={ DisplayInIframe: "displayInIframe", MessageContent: "messageContent", HideTitle: "hideTitle", - AppCommandInvocationCompletedData: "appCommandInvocationCompletedData" + UseDeviceIndependentPixels: "useDeviceIndependentPixels", + AppCommandInvocationCompletedData: "appCommandInvocationCompletedData", + Base64: "base64" }; OSF.OUtil.setNamespace("DDA", OSF); OSF.DDA.DocumentMode={ @@ -1255,6 +1326,8 @@ OSF.DDA.MethodDispId={ dispidAppCommandInvocationCompletedMethod: 94, dispidCloseContainerMethod: 97, dispidGetAccessTokenMethod: 98, + dispidOpenBrowserWindow: 102, + dispidCreateDocumentMethod: 105, dispidGetSelectedTaskMethod: 110, dispidGetSelectedResourceMethod: 111, dispidGetTaskMethod: 112, @@ -1310,8 +1383,11 @@ OSF.DDA.EventDispId={ dispidObjectDataChangedEvent: 15, dispidContentControlAddedEvent: 16, dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, dispidAppCommandInvokedEvent: 39, dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, dispidTaskSelectionChangedEvent: 56, dispidResourceSelectionChangedEvent: 57, dispidViewSelectionChangedEvent: 58, @@ -1443,7 +1519,9 @@ OSF.DDA.ErrorCodeManager=(function () { ooeSSOInvalidGrant: 13005, ooeSSOClientError: 13006, ooeSSOServerError: 13007, - ooeAddinIsAlreadyRequestingToken: 13008 + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009, + ooeSSOConnectionLost: 13010 }, initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={ name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotSupported }; @@ -1541,6 +1619,8 @@ OSF.DDA.ErrorCodeManager=(function () { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={ name: stringNS.L_SSOClientError, message: stringNS.L_SSOClientErrorMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={ name: stringNS.L_SSOServerError, message: stringNS.L_SSOServerErrorMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={ name: stringNS.L_AddinIsAlreadyRequestingToken, message: stringNS.L_AddinIsAlreadyRequestingTokenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={ name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={ name: stringNS.L_SSOConnectionLostError, message: stringNS.L_SSOConnectionLostErrorMessage }; } }; })(); @@ -2242,6 +2322,11 @@ OSF.DDA.Context=function OSF_DDA_Context(officeAppContext, document, license, ap value: officeAppContext.auth }); } + if (officeAppContext.application) { + OSF.OUtil.defineEnumerableProperty(this, "application", { + value: officeAppContext.application + }); + } if (officeAppContext.get_isDialog()) { var requirements=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); OSF.OUtil.defineEnumerableProperty(this, "requirements", { @@ -2284,6 +2369,8 @@ OSF.DDA.OutlookContext=function OSF_DDA_OutlookContext(appContext, settings, lic }; OSF.OUtil.extend(OSF.DDA.OutlookContext, OSF.DDA.Context); OSF.DDA.OutlookAppOm=function OSF_DDA_OutlookAppOm(appContext, window, appReady) { }; +OSF.DDA.Application=function OSF_DDA_Application(officeAppContext) { +}; OSF.DDA.Document=function OSF_DDA_Document(officeAppContext, settings) { var mode; switch (officeAppContext.get_clientMode()) { @@ -3020,6 +3107,8 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, "ExecuteRichApiRequestAsync": did.dispidExecuteRichApiRequestMethod, "AppCommandInvocationCompletedAsync": did.dispidAppCommandInvocationCompletedMethod, "CloseContainerAsync": did.dispidCloseContainerMethod, + "OpenBrowserWindow": did.dispidOpenBrowserWindow, + "CreateDocumentAsync": did.dispidCreateDocumentMethod, "AddDataPartAsync": did.dispidAddDataPartMethod, "GetDataPartByIdAsync": did.dispidGetDataPartByIdMethod, "GetDataPartsByNameSpaceAsync": did.dispidGetDataPartsByNamespaceMethod, @@ -3059,13 +3148,13 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, } jsom=OSF.DDA.SyncMethodNames; did=OSF.DDA.MethodDispId; - var asyncMethodMap={ + var syncMethodMap={ "MessageParent": did.dispidMessageParentMethod, "SendMessage": did.dispidSendMessageMethod }; - for (var method in asyncMethodMap) { + for (var method in syncMethodMap) { if (jsom[method]) { - dispIdMap[jsom[method].id]=asyncMethodMap[method]; + dispIdMap[jsom[method].id]=syncMethodMap[method]; } } jsom=Microsoft.Office.WebExtension.EventType; @@ -3085,7 +3174,10 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, "ObjectSelectionChanged": did.dispidObjectSelectionChangedEvent, "ObjectDataChanged": did.dispidObjectDataChangedEvent, "ContentControlAdded": did.dispidContentControlAddedEvent, + "RichApiMessage": did.dispidRichApiMessageEvent, "ItemChanged": did.dispidOlkItemSelectedChangedEvent, + "RecipientsChanged": did.dispidOlkRecipientsChangedEvent, + "AppointmentTimeChanged": did.dispidOlkAppointmentTimeChangedEvent, "TaskSelectionChanged": did.dispidTaskSelectionChangedEvent, "ResourceSelectionChanged": did.dispidResourceSelectionChangedEvent, "ViewSelectionChanged": did.dispidViewSelectionChangedEvent, @@ -3161,6 +3253,7 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, else { hostCallArgs=callArgs; } + var startTime=(new Date()).getTime(); delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ "dispId": dispId, "hostCallArgs": hostCallArgs, @@ -3181,6 +3274,9 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, } var payload=asyncMethodCall.processResponse(status, responseArgs, caller, callArgs); OSF.DDA.issueAsyncResult(callArgs, status, payload); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(dispId, hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); + } } }); } @@ -4048,7 +4144,6 @@ OSF.DDA.SafeArray.Delegate.executeAsync=function OSF_DDA_SafeArray_Delegate$Exec if (args.onCalling) { args.onCalling(); } - var startTime=(new Date()).getTime(); OSF.ClientHostController.execute(args.dispId, toArray(args.hostCallArgs), function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode) { var result=hostResponseArgs.toArray(); var status=result[OSF.DDA.SafeArray.Response.Status]; @@ -4095,9 +4190,6 @@ OSF.DDA.SafeArray.Delegate.executeAsync=function OSF_DDA_SafeArray_Delegate$Exec } args.onComplete(status, payload); } - if (OSF.AppTelemetry) { - OSF.AppTelemetry.onMethodDone(args.dispId, args.hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); - } return true; }); } @@ -4213,6 +4305,9 @@ OSF.InitializationHelper.prototype.prepareApiSurface=function OSF_Initialization } } } + if (OSF.DDA.OpenBrowser) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.OpenBrowserWindow]); + } if (OSF.DDA.Auth) { appContext.auth=new OSF.DDA.Auth(); OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth, [OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]); @@ -4503,6 +4598,7 @@ var OSFWebkit; MethodId[MethodId["UnregisterEvent"]=3]="UnregisterEvent"; MethodId[MethodId["WriteSettings"]=4]="WriteSettings"; MethodId[MethodId["GetContext"]=5]="GetContext"; + MethodId[MethodId["SendMessage"]=6]="SendMessage"; })(OSFWebkit.MethodId || (OSFWebkit.MethodId={})); var MethodId=OSFWebkit.MethodId; var WebkitHostController=(function () { @@ -4645,6 +4741,11 @@ var OSFWebkit; } }; WebkitHostController.prototype.sendMessage=function (params) { + var message=params[Microsoft.Office.WebExtension.Parameters.MessageContent]; + if (!isNaN(parseFloat(message)) && isFinite(message)) { + message=message.toString(); + } + this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName, OSF.Webkit.MethodId.SendMessage, message, null); }; return WebkitHostController; })(); @@ -5237,7 +5338,7 @@ var OSFAriaLogger; function AriaLogger() { } AriaLogger.prototype.getAriaCDNLocation=function () { - return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry-2.8.0.min.js"); + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry.js"); }; AriaLogger.getInstance=function () { if (AriaLogger.AriaLoggerObj===undefined) { @@ -5254,13 +5355,10 @@ var OSFAriaLogger; try { if (!this.ALogger) { var OfficeExtensibilityTenantID="db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; - var configuration=new microsoft.applications.telemetry.LogConfiguration(); - configuration.enableAutoUserSession=true; - microsoft.applications.telemetry.LogManager.initialize(OfficeExtensibilityTenantID, configuration); - this.ALogger=new microsoft.applications.telemetry.Logger(); + this.ALogger=AWTLogManager.initialize(OfficeExtensibilityTenantID); } - var eventProperties=new microsoft.applications.telemetry.EventProperties(); - eventProperties.name="Office.Extensibility.OfficeJS."+tableName; + var eventProperties=new AWTEventProperties(); + eventProperties.setName("Office.Extensibility.OfficeJS."+tableName); for (var key in telemetryData) { if (key.toLowerCase() !=="table") { eventProperties.setProperty(key, telemetryData[key]); @@ -5293,6 +5391,7 @@ var OSFAppTelemetry; var sessionId=OSF.OUtil.Guid.generateNewGuid(); var osfControlAppCorrelationId=""; var omexDomainRegex=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"); + OSFAppTelemetry.enableTelemetry=true; ; var AppInfo=(function () { function AppInfo() { @@ -5376,17 +5475,19 @@ var OSFAppTelemetry; function AppLogger() { } AppLogger.prototype.LogData=function (data) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, data.SerializeRow(), OSF.Logger.SendFlag.none); - OSFAriaLogger.AriaLogger.getInstance().logData(data); + try { + OSFAriaLogger.AriaLogger.getInstance().logData(data); + } + catch (e) { + } }; AppLogger.prototype.LogRawData=function (log) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, log, OSF.Logger.SendFlag.none); try { OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)); } @@ -5426,7 +5527,7 @@ var OSFAppTelemetry; } appInfo.message=context.get_hostCustomMessage(); appInfo.officeJSVersion=OSF.ConstantNames.FileVersion; - appInfo.hostJSVersion="16.0.8118.1000"; + appInfo.hostJSVersion="16.0.8916.1000"; if (context._wacHostEnvironment) { appInfo.wacHostEnvironment=context._wacHostEnvironment; } @@ -5778,14 +5879,16 @@ OSF.EventDispatch=function OSF_EventDispatch(eventTypes) { this._eventHandlers={}; this._objectEventHandlers={}; this._queuedEventsArgs={}; - for (var entry in eventTypes) { - var eventType=eventTypes[entry]; - var isObjectEvent=(eventType=="objectDeleted" || eventType=="objectSelectionChanged" || eventType=="objectDataChanged" || eventType=="contentControlAdded"); - if (!isObjectEvent) - this._eventHandlers[eventType]=[]; - else - this._objectEventHandlers[eventType]={}; - this._queuedEventsArgs[eventType]=[]; + if (eventTypes !=null) { + for (var i=0; i < eventTypes.length; i++) { + var eventType=eventTypes[i]; + var isObjectEvent=(eventType=="objectDeleted" || eventType=="objectSelectionChanged" || eventType=="objectDataChanged" || eventType=="contentControlAdded"); + if (!isObjectEvent) + this._eventHandlers[eventType]=[]; + else + this._objectEventHandlers[eventType]={}; + this._queuedEventsArgs[eventType]=[]; + } } }; OSF.EventDispatch.prototype={ @@ -5811,8 +5914,8 @@ OSF.EventDispatch.prototype={ hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) { var handlers=this._eventHandlers[eventType]; if (handlers && handlers.length > 0) { - for (var h in handlers) { - if (handlers[h]===handler) + for (var i=0; i < handlers.length; i++) { + if (handlers[i]===handler) return true; } } @@ -5917,8 +6020,9 @@ OSF.EventDispatch.prototype={ var eventType=eventArgs.type; if (eventType && this._eventHandlers[eventType]) { var eventHandlers=this._eventHandlers[eventType]; - for (var handler in eventHandlers) - eventHandlers[handler](eventArgs); + for (var i=0; i < eventHandlers.length; i++) { + eventHandlers[i](eventArgs); + } return true; } else { @@ -6015,6 +6119,9 @@ OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEve case Microsoft.Office.WebExtension.EventType.ContentControlAdded: args=new OSF.DDA.ObjectEventArgs(eventType, eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args=new OSF.DDA.RichApiMessageEventArgs(eventType, eventProperties); + break; case Microsoft.Office.WebExtension.EventType.DataNodeInserted: args=new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); break; @@ -6040,10 +6147,28 @@ OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEve args=new OSF.DDA.DialogParentEventArgs(eventProperties); break; case Microsoft.Office.WebExtension.EventType.ItemChanged: - if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlookwebapp") { + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { args=new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); target.initialize(args["initialData"]); - target.setCurrentItemNumber(args["itemNumber"].itemNumber); + if (OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]=="win32" || OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]=="mac") { + target.setCurrentItemNumber(args["itemNumber"].itemNumber); + } + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { + args=new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { + args=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); } else { throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); @@ -6230,6 +6355,13 @@ OSF.DDA.AsyncMethodCalls.define({ "types": ["boolean"], "defaultValue": false } + }, + { + name: Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels, + value: { + "types": ["boolean"], + "defaultValue": false + } } ], privateStateCallbacks: [], @@ -6267,13 +6399,13 @@ OSF.DDA.AsyncMethodCalls.define({ if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] <=0) { callArgs[Microsoft.Office.WebExtension.Parameters.Width]=1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Width]=99; } if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] <=0) { callArgs[Microsoft.Office.WebExtension.Parameters.Height]=1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Height]=99; } if (!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) { @@ -6658,52 +6790,10 @@ OSF.DDA.SettingsManager={ DateJSONPrefix: "Date(", DataJSONSuffix: ")", serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) { - var ret={}; - for (var key in settingsCollection) { - var value=settingsCollection[key]; - try { - if (JSON) { - value=JSON.stringify(value, function dateReplacer(k, v) { - return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix+this[k].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix : v; - }); - } - else { - value=Sys.Serialization.JavaScriptSerializer.serialize(value); - } - ret[key]=value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.serializeSettings(settingsCollection); }, deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) { - var ret={}; - serializedSettings=serializedSettings || {}; - for (var key in serializedSettings) { - var value=serializedSettings[key]; - try { - if (JSON) { - value=JSON.parse(value, function dateReviver(k, v) { - var d; - if (typeof v==='string' && v && v.length > 6 && v.slice(0, 5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) { - d=new Date(parseInt(v.slice(5, -1))); - if (d) { - return d; - } - } - return v; - }); - } - else { - value=Sys.Serialization.JavaScriptSerializer.deserialize(value, true); - } - ret[key]=value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.deserializeSettings(serializedSettings); } }; OSF.DDA.Settings=function OSF_DDA_Settings(settings) { @@ -7892,7 +7982,10 @@ OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { DataNodeDeleted: "nodeDeleted", DataNodeInserted: "nodeInserted", - DataNodeReplaced: "nodeReplaced" + DataNodeReplaced: "nodeReplaced", + NodeDeleted: "nodeDeleted", + NodeInserted: "nodeInserted", + NodeReplaced: "nodeReplaced" }); OSF.DDA.CustomXmlParts=function OSF_DDA_CustomXmlParts() { this._eventDispatches=[]; @@ -8543,6 +8636,51 @@ OSF.DDA.SafeArray.Delegate.ParameterMap.define({ { name: Microsoft.Office.WebExtension.CoercionType.Image, value: 8 } ] }); +OSF.DDA.AsyncMethodNames.addNames({ GetAccessTokenAsync: "getAccessTokenAsync" }); +OSF.DDA.Auth=function OSF_DDA_Auth() { +}; +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetAccessTokenAsync, + requiredArguments: [], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.ForceConsent, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, + value: { + "types": ["string"], + "defaultValue": "" + } + } + ], + onSucceeded: function (dataDescriptor, caller, callArgs) { + var data=dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + return data; + } +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetAccessTokenMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.ForceConsent, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, value: 2 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); OSF.DDA.WordDocument=function OSF_DDA_WordDocument(officeAppContext, settings) { OSF.DDA.WordDocument.uber.constructor.call(this, officeAppContext, new OSF.DDA.BindingFacade(this), settings); OSF.DDA.DispIdHost.addAsyncMethods(this, [ @@ -8571,9 +8709,10 @@ var __extends=(this && this.__extends) || function (d, b) { var OfficeExtension; (function (OfficeExtension) { var Action=(function () { - function Action(actionInfo, isWriteOperation) { + function Action(actionInfo, isWriteOperation, isRestrictedResourceAccess) { this.m_actionInfo=actionInfo; this.m_isWriteOperation=isWriteOperation; + this.m_isRestrictedResourceAccess=isRestrictedResourceAccess; } Object.defineProperty(Action.prototype, "actionInfo", { get: function () { @@ -8589,12 +8728,30 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(Action.prototype, "isRestrictedResourceAccess", { + get: function () { + return this.m_isRestrictedResourceAccess; + }, + enumerable: true, + configurable: true + }); return Action; }()); OfficeExtension.Action=Action; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + var TraceMarkerActionResultHandler=(function () { + function TraceMarkerActionResultHandler(callback) { + this.m_callback=callback; + } + TraceMarkerActionResultHandler.prototype._handleResult=function (value) { + if (this.m_callback) { + this.m_callback(); + } + }; + return TraceMarkerActionResultHandler; + }()); var ActionFactory=(function () { function ActionFactory() { } @@ -8610,13 +8767,17 @@ var OfficeExtension; var args=[value]; var referencedArgumentObjectPaths=OfficeExtension.Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); OfficeExtension.Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); - var ret=new OfficeExtension.Action(actionInfo, true); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + context._pendingRequest.ensureInstantiateObjectPaths(referencedArgumentObjectPaths); + var ret=new OfficeExtension.Action(actionInfo, true, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); context._pendingRequest.addReferencedObjectPaths(referencedArgumentObjectPaths); + ret.referencedObjectPath=parent._objectPath; + ret.referencedArgumentObjectPaths=referencedArgumentObjectPaths; return ret; }; - ActionFactory.createMethodAction=function (context, parent, methodName, operationType, args) { + ActionFactory.createMethodAction=function (context, parent, methodName, operationType, args, isRestrictedResourceAccess) { OfficeExtension.Utility.validateObjectPath(parent); var actionInfo={ Id: context._nextId(), @@ -8627,15 +8788,20 @@ var OfficeExtension; }; var referencedArgumentObjectPaths=OfficeExtension.Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); OfficeExtension.Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + context._pendingRequest.ensureInstantiateObjectPaths(referencedArgumentObjectPaths); var isWriteOperation=operationType !=1; - var ret=new OfficeExtension.Action(actionInfo, isWriteOperation); + var ret=new OfficeExtension.Action(actionInfo, isWriteOperation, isRestrictedResourceAccess); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); context._pendingRequest.addReferencedObjectPaths(referencedArgumentObjectPaths); + ret.referencedObjectPath=parent._objectPath; + ret.referencedArgumentObjectPaths=referencedArgumentObjectPaths; return ret; }; ActionFactory.createQueryAction=function (context, parent, queryOption) { OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); var actionInfo={ Id: context._nextId(), ActionType: 2, @@ -8643,13 +8809,15 @@ var OfficeExtension; ObjectPathId: parent._objectPath.objectPathInfo.Id, }; actionInfo.QueryInfo=queryOption; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; return ret; }; ActionFactory.createRecursiveQueryAction=function (context, parent, query) { OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); var actionInfo={ Id: context._nextId(), ActionType: 6, @@ -8657,23 +8825,59 @@ var OfficeExtension; ObjectPathId: parent._objectPath.objectPathInfo.Id, RecursiveQueryInfo: query }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; + return ret; + }; + ActionFactory.createQueryAsJsonAction=function (context, parent, queryOption) { + OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + var actionInfo={ + Id: context._nextId(), + ActionType: 7, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + }; + actionInfo.QueryInfo=queryOption; + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; + return ret; + }; + ActionFactory.createEnsureUnchangedAction=function (context, parent, objectState) { + OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + var actionInfo={ + Id: context._nextId(), + ActionType: 8, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }; + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; return ret; }; ActionFactory.createInstantiateAction=function (context, obj) { OfficeExtension.Utility.validateObjectPath(obj); + context._pendingRequest.ensureInstantiateObjectPath(obj._objectPath.parentObjectPath); + context._pendingRequest.ensureInstantiateObjectPaths(obj._objectPath.argumentObjectPaths); var actionInfo={ Id: context._nextId(), ActionType: 1, Name: "", ObjectPathId: obj._objectPath.objectPathInfo.Id }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(obj._objectPath); context._pendingRequest.addActionResultHandler(ret, new OfficeExtension.InstantiateActionResultHandler(obj)); + ret.referencedObjectPath=obj._objectPath; return ret; }; ActionFactory.createTraceAction=function (context, message, addTraceMessage) { @@ -8683,13 +8887,17 @@ var OfficeExtension; Name: "Trace", ObjectPathId: 0 }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); if (addTraceMessage) { context._pendingRequest.addTrace(actionInfo.Id, message); } return ret; }; + ActionFactory.createTraceMarkerForCallback=function (context, callback) { + var action=ActionFactory.createTraceAction(context, null, false); + context._pendingRequest.addActionResultHandler(action, new TraceMarkerActionResultHandler(callback)); + }; return ActionFactory; }()); OfficeExtension.ActionFactory=ActionFactory; @@ -8767,6 +8975,7 @@ var OfficeExtension; }; ClientObject.prototype._recursivelySet=function (input, options, scalarWriteablePropertyNames, objectPropertyNames, notAllowedToBeSetPropertyNames) { var isClientObject=(input instanceof ClientObject); + var originalInput=input; if (isClientObject) { if (Object.getPrototypeOf(this)===Object.getPrototypeOf(input)) { input=JSON.parse(JSON.stringify(input)); @@ -8783,31 +8992,38 @@ var OfficeExtension; for (var i=0; i < scalarWriteablePropertyNames.length; i++) { prop=scalarWriteablePropertyNames[i]; if (input.hasOwnProperty(prop)) { - this[prop]=input[prop]; + if (typeof input[prop] !=="undefined") { + this[prop]=input[prop]; + } } } for (var i=0; i < objectPropertyNames.length; i++) { prop=objectPropertyNames[i]; if (input.hasOwnProperty(prop)) { - this[prop].set(input[prop], options); + if (typeof input[prop] !=="undefined") { + var dataToPassToSet=isClientObject ? originalInput[prop] : input[prop]; + this[prop].set(dataToPassToSet, options); + } } } + var throwOnReadOnly=!isClientObject; + if (options && !OfficeExtension.Utility.isNullOrUndefined(throwOnReadOnly)) { + throwOnReadOnly=options.throwOnReadOnly; + } for (var i=0; i < notAllowedToBeSetPropertyNames.length; i++) { prop=notAllowedToBeSetPropertyNames[i]; if (input.hasOwnProperty(prop)) { - throw new OfficeExtension._Internal.RuntimeError({ - code: OfficeExtension.ErrorCodes.invalidArgument, - message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), - debugInfo: { - errorLocation: prop - } - }); + if (typeof input[prop] !=="undefined" && throwOnReadOnly) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.invalidArgument, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), + debugInfo: { + errorLocation: prop + } + }); + } } } - var throwOnReadOnly=!isClientObject; - if (options && !OfficeExtension.Utility.isNullOrUndefined(throwOnReadOnly)) { - throwOnReadOnly=options.throwOnReadOnly; - } for (prop in input) { if (scalarWriteablePropertyNames.indexOf(prop) < 0 && objectPropertyNames.indexOf(prop) < 0) { var propertyDescriptor=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this), prop); @@ -8855,12 +9071,14 @@ var OfficeExtension; this.m_actions=[]; this.m_actionResultHandler={}; this.m_referencedObjectPaths={}; + this.m_instantiatedObjectPaths={}; this.m_flags=0; this.m_traceInfos={}; this.m_pendingProcessEventHandlers=[]; this.m_pendingEventHandlerActions={}; this.m_responseTraceIds={}; this.m_responseTraceMessages=[]; + this.m_preSyncPromises=[]; } Object.defineProperty(ClientRequest.prototype, "flags", { get: function () { @@ -8906,7 +9124,13 @@ var OfficeExtension; if (action.isWriteOperation) { this.m_flags=this.m_flags | 1; } + if (action.isRestrictedResourceAccess) { + this.m_flags=this.m_flags | 2; + } this.m_actions.push(action); + if (action.actionInfo.ActionType==1) { + this.m_instantiatedObjectPaths[action.actionInfo.ObjectPathId]=action; + } }; Object.defineProperty(ClientRequest.prototype, "hasActions", { get: function () { @@ -8915,9 +9139,39 @@ var OfficeExtension; enumerable: true, configurable: true }); + ClientRequest.prototype._getLastAction=function () { + return this.m_actions[this.m_actions.length - 1]; + }; ClientRequest.prototype.addTrace=function (actionId, message) { this.m_traceInfos[actionId]=message; }; + ClientRequest.prototype.ensureInstantiateObjectPath=function (objectPath) { + if (objectPath) { + if (this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + this.ensureInstantiateObjectPath(objectPath.parentObjectPath); + this.ensureInstantiateObjectPaths(objectPath.argumentObjectPaths); + if (!this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + var actionInfo={ + Id: this.m_context._nextId(), + ActionType: 1, + Name: "", + ObjectPathId: objectPath.objectPathInfo.Id + }; + var instantiateAction=new OfficeExtension.Action(actionInfo, false, false); + instantiateAction.referencedObjectPath=objectPath; + this.addAction(instantiateAction); + } + } + }; + ClientRequest.prototype.ensureInstantiateObjectPaths=function (objectPaths) { + if (objectPaths) { + for (var i=0; i < objectPaths.length; i++) { + this.ensureInstantiateObjectPath(objectPaths[i]); + } + } + }; ClientRequest.prototype.addReferencedObjectPath=function (objectPath) { if (this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]) { return; @@ -8935,6 +9189,9 @@ var OfficeExtension; if (objectPath.isWriteOperation) { this.m_flags=this.m_flags | 1; } + if (objectPath.isRestrictedResourceAccess) { + this.m_flags=this.m_flags | 2; + } this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]=objectPath; if (objectPath.objectPathInfo.ObjectPathType==3) { this.addReferencedObjectPaths(objectPath.argumentObjectPaths); @@ -8953,6 +9210,9 @@ var OfficeExtension; this.m_actionResultHandler[action.actionInfo.Id]=resultHandler; }; ClientRequest.prototype.buildRequestMessageBody=function () { + if (OfficeExtension._internalConfig.enableEarlyDispose) { + ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } var objectPaths={}; for (var i in this.m_referencedObjectPaths) { objectPaths[i]=this.m_referencedObjectPaths[i].objectPathInfo; @@ -9003,12 +9263,95 @@ var OfficeExtension; ClientRequest.prototype._getPendingEventHandlerActions=function (eventHandlers) { return this.m_pendingEventHandlerActions[eventHandlers._id]; }; + ClientRequest.prototype._addPreSyncPromise=function (value) { + this.m_preSyncPromises.push(value); + }; + Object.defineProperty(ClientRequest.prototype, "_preSyncPromises", { + get: function () { + return this.m_preSyncPromises; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_actions", { + get: function () { + return this.m_actions; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_objectPaths", { + get: function () { + return this.m_referencedObjectPaths; + }, + enumerable: true, + configurable: true + }); + ClientRequest._updateLastUsedActionIdOfObjectPathId=function (lastUsedActionIdOfObjectPathId, objectPath, actionId) { + while (objectPath) { + if (lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]) { + return; + } + lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]=actionId; + var argumentObjectPaths=objectPath.argumentObjectPaths; + if (argumentObjectPaths) { + var argumentObjectPathsLength=argumentObjectPaths.length; + for (var i=0; i < argumentObjectPathsLength; i++) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, argumentObjectPaths[i], actionId); + } + } + objectPath=objectPath.parentObjectPath; + } + }; + ClientRequest._calculateLastUsedObjectPathIds=function (actions) { + var lastUsedActionIdOfObjectPathId={}; + var actionsLength=actions.length; + for (var index=actionsLength - 1; index >=0; --index) { + var action=actions[index]; + var actionId=action.actionInfo.Id; + if (action.referencedObjectPath) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, action.referencedObjectPath, actionId); + } + var referencedObjectPaths=action.referencedArgumentObjectPaths; + if (referencedObjectPaths) { + var referencedObjectPathsLength=referencedObjectPaths.length; + for (var refIndex=0; refIndex < referencedObjectPathsLength; refIndex++) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, referencedObjectPaths[refIndex], actionId); + } + } + } + var lastUsedObjectPathIdsOfAction={}; + for (var key in lastUsedActionIdOfObjectPathId) { + var actionId=lastUsedActionIdOfObjectPathId[key]; + var objectPathIds=lastUsedObjectPathIdsOfAction[actionId]; + if (!objectPathIds) { + objectPathIds=[]; + lastUsedObjectPathIdsOfAction[actionId]=objectPathIds; + } + objectPathIds.push(parseInt(key)); + } + for (var index=0; index < actionsLength; index++) { + var action=actions[index]; + var lastUsedObjectPathIds=lastUsedObjectPathIdsOfAction[action.actionInfo.Id]; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + action.actionInfo.L=lastUsedObjectPathIds; + } + else if (action.actionInfo.L) { + delete action.actionInfo.L; + } + } + }; return ClientRequest; }()); OfficeExtension.ClientRequest=ClientRequest; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + OfficeExtension._internalConfig={ + showDisposeInfoInDebugInfo: false, + enableEarlyDispose: true, + alwaysPolyfillClientObjectRetrieveMethod: false + }; var SessionBase=(function () { function SessionBase() { } @@ -9102,6 +9445,15 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(ClientRequestContext.prototype, "debugInfo", { + get: function () { + var prettyPrinter=new OfficeExtension.RequestPrettyPrinter(this._rootObjectPropertyName, this._pendingRequest._objectPaths, this._pendingRequest._actions, OfficeExtension._internalConfig.showDisposeInfoInDebugInfo); + var statements=prettyPrinter.process(); + return { pendingStatements: statements }; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ClientRequestContext.prototype, "trackedObjects", { get: function () { if (!this.m_trackedObjects) { @@ -9121,11 +9473,76 @@ var OfficeExtension; }); ClientRequestContext.prototype.load=function (clientObj, option) { OfficeExtension.Utility.validateContext(this, clientObj); - var queryOption=ClientRequestContext.parseQueryOption(option); + var queryOption=ClientRequestContext._parseQueryOption(option); var action=OfficeExtension.ActionFactory.createQueryAction(this, clientObj, queryOption); this._pendingRequest.addActionResultHandler(action, clientObj); }; - ClientRequestContext.parseQueryOption=function (option) { + ClientRequestContext.isLoadOption=function (loadOption) { + if (!OfficeExtension.Utility.isUndefined(loadOption.select) && (typeof (loadOption.select)==="string" || Array.isArray(loadOption.select))) + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.expand) && (typeof (loadOption.expand)==="string" || Array.isArray(loadOption.expand))) + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.top) && typeof (loadOption.top)==="number") + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.skip) && typeof (loadOption.skip)==="number") + return true; + for (var i in loadOption) { + return false; + } + return true; + }; + ClientRequestContext.parseStrictLoadOption=function (option) { + var ret={ Select: [] }; + ClientRequestContext.parseStrictLoadOptionHelper(ret, "", "option", option); + return ret; + }; + ClientRequestContext.combineQueryPath=function (pathPrefix, key, separator) { + if (pathPrefix.length===0) { + return key; + } + else { + return pathPrefix+separator+key; + } + }; + ClientRequestContext.parseStrictLoadOptionHelper=function (queryInfo, pathPrefix, argPrefix, option) { + for (var key in option) { + var value=option[key]; + if (key==="$all") { + if (typeof (value) !=="boolean") { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + if (value) { + queryInfo.Select.push(ClientRequestContext.combineQueryPath(pathPrefix, "*", "/")); + } + } + else if (key==="$top") { + if (typeof (value) !=="number" || pathPrefix.length > 0) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + queryInfo.Top=value; + } + else if (key==="$skip") { + if (typeof (value) !=="number" || pathPrefix.length > 0) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + queryInfo.Skip=value; + } + else { + if (typeof (value)==="boolean") { + if (value) { + queryInfo.Select.push(ClientRequestContext.combineQueryPath(pathPrefix, key, "/")); + } + } + else if (typeof (value)==="object") { + ClientRequestContext.parseStrictLoadOptionHelper(queryInfo, ClientRequestContext.combineQueryPath(pathPrefix, key, "/"), ClientRequestContext.combineQueryPath(argPrefix, key, "."), value); + } + else { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + } + } + }; + ClientRequestContext._parseQueryOption=function (option) { var queryOption={}; if (typeof (option)=="string") { var select=option; @@ -9134,41 +9551,46 @@ var OfficeExtension; else if (Array.isArray(option)) { queryOption.Select=option; } - else if (typeof (option)=="object") { + else if (typeof (option)==="object") { var loadOption=option; - if (typeof (loadOption.select)=="string") { - queryOption.Select=OfficeExtension.Utility._parseSelectExpand(loadOption.select); - } - else if (Array.isArray(loadOption.select)) { - queryOption.Select=loadOption.select; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.select)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.select"); - } - if (typeof (loadOption.expand)=="string") { - queryOption.Expand=OfficeExtension.Utility._parseSelectExpand(loadOption.expand); - } - else if (Array.isArray(loadOption.expand)) { - queryOption.Expand=loadOption.expand; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.expand)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.expand"); - } - if (typeof (loadOption.top)=="number") { - queryOption.Top=loadOption.top; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.top)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.top"); - } - if (typeof (loadOption.skip)=="number") { - queryOption.Skip=loadOption.skip; + if (ClientRequestContext.isLoadOption(loadOption)) { + if (typeof (loadOption.select)=="string") { + queryOption.Select=OfficeExtension.Utility._parseSelectExpand(loadOption.select); + } + else if (Array.isArray(loadOption.select)) { + queryOption.Select=loadOption.select; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.select)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.select"); + } + if (typeof (loadOption.expand)=="string") { + queryOption.Expand=OfficeExtension.Utility._parseSelectExpand(loadOption.expand); + } + else if (Array.isArray(loadOption.expand)) { + queryOption.Expand=loadOption.expand; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.expand)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.expand"); + } + if (typeof (loadOption.top)==="number") { + queryOption.Top=loadOption.top; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.top)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.top"); + } + if (typeof (loadOption.skip)==="number") { + queryOption.Skip=loadOption.skip; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.skip)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.skip"); + } } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.skip)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.skip"); + else { + queryOption=ClientRequestContext.parseStrictLoadOption(option); } } else if (!OfficeExtension.Utility.isNullOrUndefined(option)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option"); + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option"); } return queryOption; }; @@ -9178,7 +9600,7 @@ var OfficeExtension; } var quries={}; for (var key in options) { - quries[key]=ClientRequestContext.parseQueryOption(options[key]); + quries[key]=ClientRequestContext._parseQueryOption(options[key]); } var action=OfficeExtension.ActionFactory.createRecursiveQueryAction(this, clientObj, { Queries: quries, MaxDepth: maxDepth }); this._pendingRequest.addActionResultHandler(action, clientObj); @@ -9186,6 +9608,8 @@ var OfficeExtension; ClientRequestContext.prototype.trace=function (message) { OfficeExtension.ActionFactory.createTraceAction(this, message, true); }; + ClientRequestContext.prototype._processOfficeJsErrorResponse=function (officeJsErrorCode, response) { + }; ClientRequestContext.prototype.syncPrivateMain=function () { var _this=this; return OfficeExtension.Utility._createPromiseFromResult(null) @@ -9213,13 +9637,14 @@ var OfficeExtension; } }) .then(function () { - return _this.syncPrivate(); + var req=_this._pendingRequest; + _this.m_pendingRequest=null; + return _this.processPreSyncPromises(req) + .then(function () { return _this.syncPrivate(req); }); }); }; - ClientRequestContext.prototype.syncPrivate=function () { + ClientRequestContext.prototype.syncPrivate=function (req) { var _this=this; - var req=this._pendingRequest; - this.m_pendingRequest=null; if (!req.hasActions) { return this.processPendingEventHandlers(req); } @@ -9227,7 +9652,7 @@ var OfficeExtension; var requestFlags=req.flags; if (!this._requestExecutor) { if (OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)) { - this._requestExecutor=new OfficeExtension.OfficeJsRequestExecutor(); + this._requestExecutor=new OfficeExtension.OfficeJsRequestExecutor(this); } else { this._requestExecutor=new OfficeExtension.HttpRequestExecutor(); @@ -9245,8 +9670,10 @@ var OfficeExtension; req.invalidatePendingInvalidObjectPaths(); var errorFromResponse=null; var errorFromProcessEventHandlers=null; + this._lastSyncStart=performance.now(); return requestExecutor.executeAsync(this._customData, requestFlags, requestExecutorRequestMessage) .then(function (response) { + _this._lastSyncEnd=performance.now(); errorFromResponse=_this.processRequestExecutorResponseMessage(req, response); return _this.processPendingEventHandlers(req) .catch(function (ex) { @@ -9293,7 +9720,13 @@ var OfficeExtension; req._setResponseTraceIds(response.Body.TraceIds); } var traceMessages=req._responseTraceMessages; + var errorStatementInfo=null; if (response.Body) { + if (response.Body.Error && + response.Body.Error.ActionIndex >=0) { + var prettyPrinter=new OfficeExtension.RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions); + errorStatementInfo=prettyPrinter.processForDebugStatementInfo(response.Body.Error.ActionIndex); + } var actionResults=null; if (response.Body.Results) { actionResults=response.Body.Results; @@ -9319,13 +9752,18 @@ var OfficeExtension; }); } else if (response.Body && response.Body.Error) { + var debugInfo={ + errorLocation: response.Body.Error.Location + }; + if (errorStatementInfo) { + debugInfo.statement=errorStatementInfo.statement; + debugInfo.surroundingStatements=errorStatementInfo.surroundingStatements; + } return new OfficeExtension._Internal.RuntimeError({ code: response.Body.Error.Code, message: response.Body.Error.Message, traceMessages: traceMessages, - debugInfo: { - errorLocation: response.Body.Error.Location - } + debugInfo: debugInfo }); } return null; @@ -9341,6 +9779,17 @@ var OfficeExtension; ClientRequestContext.prototype.createProcessOneEventHandlersFunc=function (eventHandlers, req) { return function () { return eventHandlers._processRegistration(req); }; }; + ClientRequestContext.prototype.processPreSyncPromises=function (req) { + var ret=OfficeExtension.Utility._createPromiseFromResult(null); + for (var i=0; i < req._preSyncPromises.length; i++) { + var p=req._preSyncPromises[i]; + ret=ret.then(this.createProcessOneProSyncFunc(p)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneProSyncFunc=function (p) { + return function () { return p; }; + }; ClientRequestContext.prototype.sync=function (passThroughValue) { return this.syncPrivateMain().then(function () { return passThroughValue; }); }; @@ -9379,9 +9828,15 @@ var OfficeExtension; batch=receivedRunArgs[argOffset+0]; } else if (receivedRunArgs.length==argOffset+2) { - if (receivedRunArgs[argOffset+0] instanceof OfficeExtension.ClientObject) { + if (OfficeExtension.Utility.isNullOrUndefined(receivedRunArgs[argOffset+0])) { + ctxRetriever=ctxInitializer; + } + else if (receivedRunArgs[argOffset+0] instanceof OfficeExtension.ClientObject) { ctxRetriever=function () { return receivedRunArgs[argOffset+0].context; }; } + else if (receivedRunArgs[argOffset+0] instanceof ClientRequestContext) { + ctxRetriever=function () { return receivedRunArgs[argOffset+0]; }; + } else if (Array.isArray(receivedRunArgs[argOffset+0])) { var array=receivedRunArgs[argOffset+0]; if (array.length==0) { @@ -9547,6 +10002,79 @@ var OfficeExtension; return ClientResult; }()); OfficeExtension.ClientResult=ClientResult; + var RetrieveResult=(function () { + function RetrieveResult(m_proxy, m_shouldPolyfill) { + this.m_proxy=m_proxy; + this.m_shouldPolyfill=m_shouldPolyfill; + } + Object.defineProperty(RetrieveResult.prototype, "proxy", { + get: function () { + return this.m_proxy; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RetrieveResult.prototype, "data", { + get: function () { + if (!this.m_isLoaded) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.valueNotLoaded, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: "retrieveResult.data" + } + }); + } + return this.m_data; + }, + enumerable: true, + configurable: true + }); + RetrieveResult.prototype._handleResult=function (value) { + this.m_isLoaded=true; + if (typeof (value)==="object" && value && value._IsNull) { + this.m_data=null; + return; + } + if (this.m_shouldPolyfill) { + this.m_data=this.changePropertyNameToCamelLowerCase(value); + } + else { + this.m_data=value; + } + }; + RetrieveResult.prototype.changePropertyNameToCamelLowerCase=function (value) { + var charCodeUnderscore=95; + if (Array.isArray(value)) { + var ret=[]; + for (var i=0; i < value.length; i++) { + ret.push(this.changePropertyNameToCamelLowerCase(value[i])); + } + return ret; + } + else if (typeof (value)==="object" && value !==null) { + var ret={}; + for (var key in value) { + var propValue=value[key]; + if (key==="_Items") { + ret={}; + ret["items"]=this.changePropertyNameToCamelLowerCase(propValue); + break; + } + else if (key.charCodeAt(0) !==charCodeUnderscore) { + var propName=OfficeExtension.Utility._toCamelLowerCase(key); + ret[propName]=this.changePropertyNameToCamelLowerCase(propValue); + } + } + return ret; + } + else { + return value; + } + }; + return RetrieveResult; + }()); + OfficeExtension.RetrieveResult=RetrieveResult; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { @@ -9568,6 +10096,9 @@ var OfficeExtension; Constants.sourceLibHeader="SdkVersion"; Constants.embeddingPageOrigin="EmbeddingPageOrigin"; Constants.embeddingPageSessionInfo="EmbeddingPageSessionInfo"; + Constants.eventMessageCategory=65536; + Constants.eventWorkbookId="Workbook"; + Constants.eventSourceRemote="Remote"; return Constants; }()); OfficeExtension.Constants=Constants; @@ -9898,7 +10429,7 @@ var OfficeExtension; debugInfo[key]=partialDebugInfo[key]; } if (this.innerError) { - if (this.innerError instanceof OfficeExtension.Error) { + if (this.innerError instanceof OfficeExtension._Internal.RuntimeError) { debugInfo.innerError=this.innerError.debugInfo; } else { @@ -9983,6 +10514,20 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(EventHandlers.prototype, "_context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_callback", { + get: function () { + return this.m_callback; + }, + enumerable: true, + configurable: true + }); EventHandlers.prototype.add=function (handler) { var action=OfficeExtension.ActionFactory.createTraceAction(this.m_context, null, false); this.m_context._pendingRequest._addPendingEventHandlerAction(this, { id: action.actionInfo.Id, handler: handler, operation: 0 }); @@ -10076,6 +10621,13 @@ var OfficeExtension; this.m_allHandlers=handlers; this.m_handler=handler; } + Object.defineProperty(EventHandlerResult.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); EventHandlerResult.prototype.remove=function () { if (this.m_allHandlers && this.m_handler) { this.m_allHandlers.remove(this.m_handler); @@ -10110,6 +10662,8 @@ var OfficeExtension; return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged, handler, callback); }); case 1: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.settings.addHandlerAsync(Office.EventType.SettingsChanged, handler, callback); }); + case 5: + return OfficeExtension.Utility.promisify(function (callback) { return OSF.DDA.RichApi.richApiMessageManager.addHandlerAsync("richApiMessage", handler, callback); }); case 13: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.ObjectDeleted, handler, { id: targetId }, callback); }); case 14: @@ -10138,6 +10692,8 @@ var OfficeExtension; return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.DocumentSelectionChanged, { handler: handler }, callback); }); case 1: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.settings.removeHandlerAsync(Office.EventType.SettingsChanged, { handler: handler }, callback); }); + case 5: + return OfficeExtension.Utility.promisify(function (callback) { return OSF.DDA.RichApi.richApiMessageManager.removeHandlerAsync("richApiMessage", { handler: handler }, callback); }); case 13: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDeleted, { id: targetId, handler: handler }, callback); }); case 14: @@ -10208,6 +10764,139 @@ var OfficeExtension; OfficeExtension.EventRegistration=EventRegistration; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var GenericEventRegistration=(function () { + function GenericEventRegistration() { + this.m_eventRegistration=new OfficeExtension.EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)); + this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this); + } + GenericEventRegistration.prototype.ready=function () { + var _this=this; + if (!this.m_ready) { + if (GenericEventRegistration._testReadyImpl) { + this.m_ready=GenericEventRegistration._testReadyImpl() + .then(function () { + _this.m_isReady=true; + }); + } + else { + this.m_ready=OfficeExtension._Internal.officeJsEventRegistration.register(5, "", this.m_richApiMessageHandler) + .then(function () { + _this.m_isReady=true; + }); + } + } + return this.m_ready; + }; + Object.defineProperty(GenericEventRegistration.prototype, "isReady", { + get: function () { + return this.m_isReady; + }, + enumerable: true, + configurable: true + }); + GenericEventRegistration.prototype.register=function (eventId, targetId, handler) { + var _this=this; + return this.ready() + .then(function () { return _this.m_eventRegistration.register(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype.unregister=function (eventId, targetId, handler) { + var _this=this; + return this.ready() + .then(function () { return _this.m_eventRegistration.unregister(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype._registerEventImpl=function (eventId, targetId) { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._unregisterEventImpl=function (eventId, targetId) { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._handleRichApiMessage=function (msg) { + if (msg && msg.entries) { + for (var entryIndex=0; entryIndex < msg.entries.length; entryIndex++) { + var entry=msg.entries[entryIndex]; + if (entry.messageCategory==OfficeExtension.Constants.eventMessageCategory) { + if (OfficeExtension.Utility._logEnabled) { + OfficeExtension.Utility.log(JSON.stringify(entry)); + } + var funcs=this.m_eventRegistration.getHandlers(entry.messageType, entry.targetId); + if (funcs.length > 0) { + var arg=JSON.parse(entry.message); + if (entry.isRemoteOverride) { + arg.source=OfficeExtension.Constants.eventSourceRemote; + } + for (var i=0; i < funcs.length; i++) { + funcs[i](arg); + } + } + } + } + } + }; + GenericEventRegistration.getGenericEventRegistration=function () { + if (!GenericEventRegistration.s_genericEventRegistration) { + GenericEventRegistration.s_genericEventRegistration=new GenericEventRegistration(); + } + return GenericEventRegistration.s_genericEventRegistration; + }; + GenericEventRegistration.richApiMessageEventCategory=65536; + return GenericEventRegistration; + }()); + function _testSetRichApiMessageReadyImpl(impl) { + GenericEventRegistration._testReadyImpl=impl; + } + OfficeExtension._testSetRichApiMessageReadyImpl=_testSetRichApiMessageReadyImpl; + function _testTriggerRichApiMessageEvent(msg) { + GenericEventRegistration.getGenericEventRegistration()._handleRichApiMessage(msg); + } + OfficeExtension._testTriggerRichApiMessageEvent=_testTriggerRichApiMessageEvent; + var GenericEventHandlers=(function (_super) { + __extends(GenericEventHandlers, _super); + function GenericEventHandlers(context, parentObject, name, eventInfo) { + _super.call(this, context, parentObject, name, eventInfo); + this.m_genericEventInfo=eventInfo; + } + GenericEventHandlers.prototype.add=function (handler) { + var _this=this; + if ((this._handlers.length==0) && this.m_genericEventInfo.registerFunc) { + this.m_genericEventInfo.registerFunc(); + } + if (!GenericEventRegistration.getGenericEventRegistration().isReady) { + this._context._pendingRequest._addPreSyncPromise(GenericEventRegistration.getGenericEventRegistration().ready()); + } + OfficeExtension.ActionFactory.createTraceMarkerForCallback(this._context, function () { + _this._handlers.push(handler); + if (_this._handlers.length==1) { + GenericEventRegistration.getGenericEventRegistration().register(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + return new OfficeExtension.EventHandlerResult(this._context, this, handler); + }; + GenericEventHandlers.prototype.remove=function (handler) { + var _this=this; + if ((this._handlers.length==1) && this.m_genericEventInfo.unregisterFunc) { + this.m_genericEventInfo.unregisterFunc(); + } + OfficeExtension.ActionFactory.createTraceMarkerForCallback(this._context, function () { + var handlers=_this._handlers; + for (var index=handlers.length - 1; index >=0; index--) { + if (handlers[index]===handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length==0) { + GenericEventRegistration.getGenericEventRegistration().unregister(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + }; + GenericEventHandlers.prototype.removeAll=function () { + }; + return GenericEventHandlers; + }(OfficeExtension.EventHandlers)); + OfficeExtension.GenericEventHandlers=GenericEventHandlers; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var HttpRequestExecutor=(function () { function HttpRequestExecutor() { @@ -10259,15 +10948,6 @@ var OfficeExtension; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { - var _Internal; - (function (_Internal) { - _Internal.OfficeRequire=function () { - if (typeof (require) !=="undefined") { - return require; - } - return null; - }(); - })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); var HttpUtility=(function () { function HttpUtility() { } @@ -10275,7 +10955,7 @@ var OfficeExtension; HttpUtility.s_customSendRequestFunc=func; }; HttpUtility.xhrSendRequestFunc=function (request) { - return new _Internal.OfficePromise(function (resolve, reject) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { var xhr=new XMLHttpRequest(); xhr.open(request.method, request.url); xhr.onload=function () { @@ -10287,7 +10967,7 @@ var OfficeExtension; resolve(resp); }; xhr.onerror=function () { - reject(new _Internal.RuntimeError({ + reject(new OfficeExtension._Internal.RuntimeError({ code: OfficeExtension.ErrorCodes.connectionFailure, message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.connectionFailureWithStatus, xhr.statusText) })); @@ -10300,34 +10980,11 @@ var OfficeExtension; xhr.send(request.body); }); }; - HttpUtility.nodejsRequestModuleSendRequestFunc=function (requestInfo) { - HttpUtility.logRequest(requestInfo); - var fetch=_Internal.OfficeRequire(HttpUtility.NodeJsRequestModuleName); - return fetch(requestInfo.url, { method: requestInfo.method, headers: requestInfo.headers, body: requestInfo.body }) - .then(function (resp) { - return resp.text() - .then(function (body) { - var statusCode=resp.status; - var headers={}; - resp.headers.forEach(function (value, name) { - headers[name]=value; - }); - var ret={ statusCode: statusCode, headers: headers, body: body }; - HttpUtility.logResponse(ret); - return ret; - }); - }); - }; HttpUtility.sendRequest=function (request) { HttpUtility.validateAndNormalizeRequest(request); var func=HttpUtility.s_customSendRequestFunc; if (!func) { - if (typeof (window)==="undefined" || typeof (XMLHttpRequest)==="undefined") { - func=HttpUtility.nodejsRequestModuleSendRequestFunc; - } - else { - func=HttpUtility.xhrSendRequestFunc; - } + func=HttpUtility.xhrSendRequestFunc; } return func(request); }; @@ -10343,7 +11000,7 @@ var OfficeExtension; HttpUtility.officeJsSendLocalDocumentRequestFunc=function (request) { request=OfficeExtension.Utility._validateLocalDocumentRequest(request); var requestSafeArray=OfficeExtension.Utility._buildRequestMessageSafeArray(request); - return new _Internal.OfficePromise(function (resolve, reject) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { OSF.DDA.RichApi.executeRichApiRequestAsync(requestSafeArray, function (asyncResult) { var response; if (asyncResult.status=="succeeded") { @@ -10363,7 +11020,7 @@ var OfficeExtension; }; HttpUtility.validateAndNormalizeRequest=function (request) { if (OfficeExtension.Utility.isNullOrUndefined(request)) { - throw _Internal.RuntimeError._createInvalidArgError({ + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError({ argumentName: "request" }); } @@ -10400,7 +11057,6 @@ var OfficeExtension; } } }; - HttpUtility.NodeJsRequestModuleName="node-fetch"; HttpUtility._logBody=false; return HttpUtility; }()); @@ -10424,6 +11080,146 @@ var OfficeExtension; ; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var HostBridgeRequestExecutor=(function () { + function HostBridgeRequestExecutor(session) { + this.m_session=session; + } + HostBridgeRequestExecutor.prototype.executeAsync=function (customData, requestFlags, requestMessage) { + var httpRequestInfo={ + url: OfficeExtension.Constants.processQuery, + method: "POST", + headers: requestMessage.Headers, + body: requestMessage.Body + }; + var message={ + id: HostBridgeSession.nextId(), + type: 1, + flags: requestFlags, + message: httpRequestInfo + }; + OfficeExtension.Utility.log(JSON.stringify(message)); + return this.m_session.sendMessageToHost(message) + .then(function (nativeBridgeResponse) { + OfficeExtension.Utility.log("Received response: "+JSON.stringify(nativeBridgeResponse)); + var responseInfo=nativeBridgeResponse.message; + var response; + if (responseInfo.statusCode===200) { + response={ ErrorCode: null, ErrorMessage: null, Headers: responseInfo.headers, Body: responseInfo.body }; + } + else { + OfficeExtension.Utility.log("Error Response:"+responseInfo.body); + var error=OfficeExtension.Utility._parseErrorResponse(responseInfo); + response={ + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null + }; + } + return response; + }); + }; + return HostBridgeRequestExecutor; + }()); + var HostBridgeSession=(function (_super) { + __extends(HostBridgeSession, _super); + function HostBridgeSession(bridge) { + var _this=this; + _super.call(this); + this.m_promiseResolver={}; + this.m_bridge=bridge; + this.m_bridge.onMessageFromHost=function (msg) { + _this.onMessageFromHost(msg); + }; + } + HostBridgeSession.prototype._resolveRequestUrlAndHeaderInfo=function () { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + HostBridgeSession.prototype._createRequestExecutorOrNull=function () { + OfficeExtension.Utility.log("NativeBridgeSession::CreateRequestExecutor"); + return new HostBridgeRequestExecutor(this); + }; + Object.defineProperty(HostBridgeSession.prototype, "eventRegistration", { + get: function () { + return OfficeExtension._Internal.officeJsEventRegistration; + }, + enumerable: true, + configurable: true + }); + HostBridgeSession.init=function (bridge) { + if (bridge && typeof (bridge)==="object") { + var session=new HostBridgeSession(bridge); + OfficeExtension.ClientRequestContext._overrideSession=session; + OfficeExtension.HttpUtility.setCustomSendLocalDocumentRequestFunc(function (request) { + var bridgeMessage={ + id: HostBridgeSession.nextId(), + type: 1, + flags: 0, + message: request + }; + return session.sendMessageToHost(bridgeMessage) + .then(function (bridgeResponse) { + var responseInfo=bridgeResponse.message; + return responseInfo; + }); + }); + } + }; + HostBridgeSession.prototype.sendMessageToHost=function (message) { + var _this=this; + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + var ret=new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { + _this.m_promiseResolver[message.id]=resolve; + }); + return ret; + }; + HostBridgeSession.prototype.onMessageFromHost=function (messageText) { + if (messageText==="test") { + if (HostBridgeTest._testFunc) { + HostBridgeTest._testFunc(); + } + } + else { + var message=JSON.parse(messageText); + if (typeof (message.id)==="number") { + var resolve=this.m_promiseResolver[message.id]; + if (resolve) { + resolve(message); + } + delete this.m_promiseResolver[message.id]; + } + } + }; + HostBridgeSession.nextId=function () { + return HostBridgeSession.s_nextId++; + }; + HostBridgeSession.s_nextId=1; + return HostBridgeSession; + }(OfficeExtension.SessionBase)); + var HostBridge=(function () { + function HostBridge() { + } + HostBridge.init=function (bridge) { + HostBridgeSession.init(bridge); + }; + return HostBridge; + }()); + OfficeExtension.HostBridge=HostBridge; + if (typeof (_richApiNativeBridge)==="object" && _richApiNativeBridge) { + HostBridge.init(_richApiNativeBridge); + } + var HostBridgeTest=(function () { + function HostBridgeTest() { + } + HostBridgeTest.setTestFunc=function (func) { + HostBridgeTest._testFunc=func; + }; + return HostBridgeTest; + }()); + OfficeExtension.HostBridgeTest=HostBridgeTest; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var ObjectPath=(function () { function ObjectPath(objectPathInfo, parentObjectPath, isCollection, isInvalidAfterRequest) { @@ -10451,6 +11247,16 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(ObjectPath.prototype, "isRestrictedResourceAccess", { + get: function () { + return this.m_isRestrictedResourceAccess; + }, + set: function (value) { + this.m_isRestrictedResourceAccess=value; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ObjectPath.prototype, "isCollection", { get: function () { return this.m_isCollection; @@ -10537,6 +11343,7 @@ var OfficeExtension; this.m_objectPathInfo.ObjectPathType=6; this.m_objectPathInfo.Name=referenceId; this.m_objectPathInfo.ArgumentInfo={}; + delete this.m_objectPathInfo.ParentObjectPathId; this.m_parentObjectPath=null; this.m_argumentObjectPaths=null; return; @@ -10551,15 +11358,15 @@ var OfficeExtension; if (!OfficeExtension.Utility.isNullOrUndefined(id)) { this.m_isInvalidAfterRequest=false; this.m_isValid=true; - if (parentIsCollection) { - this.m_objectPathInfo.ObjectPathType=5; - this.m_objectPathInfo.Name=""; - } - else { + if (!OfficeExtension.Utility.isNullOrEmptyString(getByIdMethodName)) { this.m_objectPathInfo.ObjectPathType=3; this.m_objectPathInfo.Name=getByIdMethodName; this.m_getByIdMethodName=null; } + else { + this.m_objectPathInfo.ObjectPathType=5; + this.m_objectPathInfo.Name=""; + } this.isWriteOperation=false; this.m_objectPathInfo.ArgumentInfo={}; this.m_objectPathInfo.ArgumentInfo.Arguments=[id]; @@ -10594,18 +11401,22 @@ var OfficeExtension; var objectPathInfo={ Id: context._nextId(), ObjectPathType: 1, Name: "" }; return new OfficeExtension.ObjectPath(objectPathInfo, null, false, false); }; - ObjectPathFactory.createNewObjectObjectPath=function (context, typeName, isCollection) { + ObjectPathFactory.createNewObjectObjectPath=function (context, typeName, isCollection, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 2, Name: typeName }; - return new OfficeExtension.ObjectPath(objectPathInfo, null, isCollection, false); + var ret=new OfficeExtension.ObjectPath(objectPathInfo, null, isCollection, false); + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; }; - ObjectPathFactory.createPropertyObjectPath=function (context, parent, propertyName, isCollection, isInvalidAfterRequest) { + ObjectPathFactory.createPropertyObjectPath=function (context, parent, propertyName, isCollection, isInvalidAfterRequest, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 4, Name: propertyName, ParentObjectPathId: parent._objectPath.objectPathInfo.Id, }; - return new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest); + var ret=new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest); + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; }; ObjectPathFactory.createIndexerObjectPath=function (context, parent, args) { var objectPathInfo={ @@ -10629,7 +11440,7 @@ var OfficeExtension; objectPathInfo.ArgumentInfo.Arguments=args; return new OfficeExtension.ObjectPath(objectPathInfo, parentObjectPath, false, false); }; - ObjectPathFactory.createMethodObjectPath=function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName) { + ObjectPathFactory.createMethodObjectPath=function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 3, @@ -10642,6 +11453,7 @@ var OfficeExtension; ret.argumentObjectPaths=argumentObjectPaths; ret.isWriteOperation=(operationType !=1); ret.getByIdMethodName=getByIdMethodName; + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; return ret; }; ObjectPathFactory.createReferenceIdObjectPath=function (context, referenceId) { @@ -10703,9 +11515,11 @@ var OfficeExtension; var OfficeExtension; (function (OfficeExtension) { var OfficeJsRequestExecutor=(function () { - function OfficeJsRequestExecutor() { + function OfficeJsRequestExecutor(context) { + this.m_context=context; } OfficeJsRequestExecutor.prototype.executeAsync=function (customData, requestFlags, requestMessage) { + var _this=this; var messageSafearray=OfficeExtension.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, OfficeJsRequestExecutor.SourceLibHeaderValue); return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { OSF.DDA.RichApi.executeRichApiRequestAsync(messageSafearray, function (result) { @@ -10717,6 +11531,7 @@ var OfficeExtension; } else { response=OfficeExtension.RichApiMessageUtility.buildResponseOnError(result.error.code, result.error.message); + _this.m_context._processOfficeJsErrorResponse(result.error.code, response); } resolve(response); }); @@ -10729,6 +11544,12 @@ var OfficeExtension; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + var _Internal; + (function (_Internal) { + _Internal.OfficeRequire=function () { + return null; + }(); + })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); var _Internal; (function (_Internal) { var PromiseImpl; @@ -10832,17 +11653,6 @@ var OfficeExtension; } lib$es6$promise$asap$$len=0; } - function lib$es6$promise$asap$$attemptVertex() { - try { - var r=require; - var vertx=r('vertx'); - lib$es6$promise$asap$$vertxNext=vertx.runOnLoop || vertx.runOnContext; - return lib$es6$promise$asap$$useVertxTimer(); - } - catch (e) { - return lib$es6$promise$asap$$useSetTimeout(); - } - } var lib$es6$promise$asap$$scheduleFlush; if (lib$es6$promise$asap$$isNode) { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useNextTick(); @@ -10853,9 +11663,6 @@ var OfficeExtension; else if (lib$es6$promise$asap$$isWorker) { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useMessageChannel(); } - else if (lib$es6$promise$asap$$browserWindow===undefined && typeof require==='function') { - lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$attemptVertex(); - } else { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useSetTimeout(); } @@ -11373,6 +12180,305 @@ var OfficeExtension; OfficeExtension.TrackedObjects=TrackedObjects; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var RequestPrettyPrinter=(function () { + function RequestPrettyPrinter(globalObjName, referencedObjectPaths, actions, showDispose) { + if (!globalObjName) { + globalObjName="root"; + } + this.m_globalObjName=globalObjName; + this.m_referencedObjectPaths=referencedObjectPaths; + this.m_actions=actions; + this.m_statements=[]; + this.m_variableNameForObjectPathMap={}; + this.m_variableNameToObjectPathMap={}; + this.m_declaredObjectPathMap={}; + this.m_showDispose=showDispose; + } + RequestPrettyPrinter.prototype.process=function () { + if (this.m_showDispose) { + OfficeExtension.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + for (var i=0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + } + return this.m_statements; + }; + RequestPrettyPrinter.prototype.processForDebugStatementInfo=function (actionIndex) { + if (this.m_showDispose) { + OfficeExtension.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + var surroundingCount=5; + this.m_statements=[]; + var oneStatement=""; + var statementIndex=-1; + for (var i=0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + if (actionIndex==i) { + statementIndex=this.m_statements.length - 1; + } + if (statementIndex >=0 && this.m_statements.length > statementIndex+surroundingCount+1) { + break; + } + } + if (statementIndex < 0) { + return null; + } + var startIndex=statementIndex - surroundingCount; + if (startIndex < 0) { + startIndex=0; + } + var endIndex=statementIndex+1+surroundingCount; + if (endIndex > this.m_statements.length) { + endIndex=this.m_statements.length; + } + var surroundingStatements=[]; + if (startIndex !=0) { + surroundingStatements.push("..."); + } + for (var i_1=startIndex; i_1 < statementIndex; i_1++) { + surroundingStatements.push(this.m_statements[i_1]); + } + surroundingStatements.push("// >>>>>"); + surroundingStatements.push(this.m_statements[statementIndex]); + surroundingStatements.push("// <<<<<"); + for (var i_2=statementIndex+1; i_2 < endIndex; i_2++) { + surroundingStatements.push(this.m_statements[i_2]); + } + if (endIndex < this.m_statements.length) { + surroundingStatements.push("..."); + } + return { + statement: this.m_statements[statementIndex], + surroundingStatements: surroundingStatements + }; + }; + RequestPrettyPrinter.prototype.processOneAction=function (action) { + var actionInfo=action.actionInfo; + switch (actionInfo.ActionType) { + case 1: + this.processInstantiateAction(action); + break; + case 3: + this.processMethodAction(action); + break; + case 2: + this.processQueryAction(action); + break; + case 7: + this.processQueryAsJsonAction(action); + break; + case 6: + this.processRecursiveQueryAction(action); + break; + case 4: + this.processSetPropertyAction(action); + break; + case 5: + this.processTraceAction(action); + break; + case 8: + this.processEnsureUnchangedAction(action); + break; + } + }; + RequestPrettyPrinter.prototype.processInstantiateAction=function (action) { + var objId=action.actionInfo.ObjectPathId; + var objPath=this.m_referencedObjectPaths[objId]; + var varName=this.getObjVarName(objId); + if (!this.m_declaredObjectPathMap[objId]) { + var statement="var "+varName+"="+this.buildObjectPathExpressionWithParent(objPath)+";"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + this.m_declaredObjectPathMap[objId]=varName; + } + else { + var statement="// Instantiate {"+varName+"}"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + } + }; + RequestPrettyPrinter.prototype.processMethodAction=function (action) { + var methodName=action.actionInfo.Name; + if (methodName==="_KeepReference") { + methodName="track"; + } + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+"."+OfficeExtension.Utility._toCamelLowerCase(methodName)+"("+this.buildArgumentsExpression(action.actionInfo.ArgumentInfo)+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAction=function (action) { + var queryExp=this.buildQueryExpression(action); + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".load("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAsJsonAction=function (action) { + var queryExp=this.buildQueryExpression(action); + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".loadJson("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processRecursiveQueryAction=function (action) { + var queryExp=""; + if (action.actionInfo.RecursiveQueryInfo) { + queryExp=JSON.stringify(action.actionInfo.RecursiveQueryInfo); + } + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".loadRecursive("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processSetPropertyAction=function (action) { + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+"."+OfficeExtension.Utility._toCamelLowerCase(action.actionInfo.Name)+"="+this.buildArgumentsExpression(action.actionInfo.ArgumentInfo)+";"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processTraceAction=function (action) { + var statement="context.trace();"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processEnsureUnchangedAction=function (action) { + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".ensureUnchanged("+JSON.stringify(action.actionInfo.ObjectState)+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.appendDisposeCommentIfRelevant=function (statement, action) { + var _this=this; + if (this.m_showDispose) { + var lastUsedObjectPathIds=action.actionInfo.L; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + var objectNamesToDispose=lastUsedObjectPathIds.map(function (item) { return _this.getObjVarName(item); }).join(", "); + return statement+" // And then dispose {"+objectNamesToDispose+"}"; + } + } + return statement; + }; + RequestPrettyPrinter.prototype.buildQueryExpression=function (action) { + if (action.actionInfo.QueryInfo) { + var option={}; + option.select=action.actionInfo.QueryInfo.Select; + option.expand=action.actionInfo.QueryInfo.Expand; + option.skip=action.actionInfo.QueryInfo.Skip; + option.top=action.actionInfo.QueryInfo.Top; + if (typeof (option.top)==="undefined" && typeof (option.skip)==="undefined" && typeof (option.expand)==="undefined") { + if (typeof (option.select)==="undefined") { + return ""; + } + else { + return JSON.stringify(option.select); + } + } + else { + return JSON.stringify(option); + } + } + return ""; + }; + RequestPrettyPrinter.prototype.buildObjectPathExpressionWithParent=function (objPath) { + var hasParent=objPath.objectPathInfo.ObjectPathType==5 || + objPath.objectPathInfo.ObjectPathType==3 || + objPath.objectPathInfo.ObjectPathType==4; + if (hasParent && objPath.objectPathInfo.ParentObjectPathId) { + return this.getObjVarName(objPath.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(objPath); + } + return this.buildObjectPathExpression(objPath); + }; + RequestPrettyPrinter.prototype.buildObjectPathExpression=function (objPath) { + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + return "context."+this.m_globalObjName; + case 5: + return "getItem("+this.buildArgumentsExpression(objPath.objectPathInfo.ArgumentInfo)+")"; + case 3: + return OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name)+"("+this.buildArgumentsExpression(objPath.objectPathInfo.ArgumentInfo)+")"; + case 2: + return objPath.objectPathInfo.Name+".newObject()"; + case 7: + return "null"; + case 4: + return OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + case 6: + return "context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(objPath.objectPathInfo.Name)+")"; + } + }; + RequestPrettyPrinter.prototype.buildArgumentsExpression=function (args) { + var ret=""; + if (!args.Arguments) { + return ret; + } + for (var i=0; i < args.Arguments.length; i++) { + if (i > 0) { + ret=ret+", "; + } + ret=ret+this.buildArgumentLiteral(args.Arguments[i], args.ReferencedObjectPathIds ? args.ReferencedObjectPathIds[i] : null); + } + if (ret==="undefined") { + ret=""; + } + return ret; + }; + RequestPrettyPrinter.prototype.buildArgumentLiteral=function (value, objectPathId) { + if (typeof value=="number" && value===objectPathId) { + return this.getObjVarName(objectPathId); + } + else { + return JSON.stringify(value); + } + }; + RequestPrettyPrinter.prototype.getObjVarNameBase=function (objectPathId) { + var ret="v"; + var objPath=this.m_referencedObjectPaths[objectPathId]; + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + ret=this.m_globalObjName; + break; + case 4: + ret=OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + break; + case 3: + var methodName=objPath.objectPathInfo.Name; + if (methodName.length > 3 && methodName.substr(0, 3)==="Get") { + methodName=methodName.substr(3); + } + ret=OfficeExtension.Utility._toCamelLowerCase(methodName); + break; + case 5: + var parentName=this.getObjVarNameBase(objPath.objectPathInfo.ParentObjectPathId); + if (parentName.charAt(parentName.length - 1)==="s") { + ret=parentName.substr(0, parentName.length - 1); + } + else { + ret=parentName+"Item"; + } + break; + } + return ret; + }; + RequestPrettyPrinter.prototype.getObjVarName=function (objectPathId) { + if (this.m_variableNameForObjectPathMap[objectPathId]) { + return this.m_variableNameForObjectPathMap[objectPathId]; + } + var ret=this.getObjVarNameBase(objectPathId); + if (!this.m_variableNameToObjectPathMap[ret]) { + this.m_variableNameForObjectPathMap[objectPathId]=ret; + this.m_variableNameToObjectPathMap[ret]=objectPathId; + return ret; + } + var i=1; + while (this.m_variableNameToObjectPathMap[ret+i.toString()]) { + i++; + } + ret=ret+i.toString(); + this.m_variableNameForObjectPathMap[objectPathId]=ret; + this.m_variableNameToObjectPathMap[ret]=objectPathId; + return ret; + }; + return RequestPrettyPrinter; + }()); + OfficeExtension.RequestPrettyPrinter=RequestPrettyPrinter; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var ResourceStrings=(function () { function ResourceStrings() { @@ -11393,6 +12499,14 @@ var OfficeExtension; ResourceStrings.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod"; ResourceStrings.valueNotLoaded="ValueNotLoaded"; ResourceStrings.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage"; + ResourceStrings.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"; + ResourceStrings.customFunctionDefintionMissing="CustomFunctionDefintionMissing"; + ResourceStrings.customFunctionImplementationMissing="CustomFunctionImplementationMissing"; + ResourceStrings.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars"; + ResourceStrings.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit"; + ResourceStrings.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch"; + ResourceStrings.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing"; + ResourceStrings.apiNotFoundDetails="ApiNotFoundDetails"; return ResourceStrings; }()); OfficeExtension.ResourceStrings=ResourceStrings; @@ -11412,7 +12526,15 @@ var OfficeExtension; ResourceStringValues.RunMustReturnPromise="The batch function passed to the \".run\" method didn't return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from \"context.sync()\"."; ResourceStringValues.Timeout="The operation has timed out."; ResourceStringValues.ValueNotLoaded="The value of the result object has not been loaded yet. Before reading the value property, call \"context.sync()\" on the associated request context."; - ResourceStringValues.invalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page."; + ResourceStringValues.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page."; + ResourceStringValues.InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again."; + ResourceStringValues.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions."; + ResourceStringValues.CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function."; + ResourceStringValues.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods."; + ResourceStringValues.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name."; + ResourceStringValues.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it."; + ResourceStringValues.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable."; + ResourceStringValues.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}."; return ResourceStringValues; }()); OfficeExtension.ResourceStringValues=ResourceStringValues; @@ -11706,6 +12828,34 @@ var OfficeExtension; }; Utility.load=function (clientObj, option) { clientObj.context.load(clientObj, option); + return clientObj; + }; + Utility.loadAndSync=function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj.context.sync().then(function () { return clientObj; }); + }; + Utility.retrieve=function (clientObj, option) { + var shouldPolyfill=OfficeExtension._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + if (typeof (window) !=="undefined" && window.Office && window.Office.context && window.Office.context.requirements) { + shouldPolyfill=!window.Office.context.requirements.isSetSupported("RichApiRuntime", "1.1"); + } + } + var result=new OfficeExtension.RetrieveResult(clientObj, shouldPolyfill); + var queryOption=OfficeExtension.ClientRequestContext._parseQueryOption(option); + var action; + if (shouldPolyfill) { + action=OfficeExtension.ActionFactory.createQueryAction(clientObj.context, clientObj, queryOption); + } + else { + action=OfficeExtension.ActionFactory.createQueryAsJsonAction(clientObj.context, clientObj, queryOption); + } + clientObj.context._pendingRequest.addActionResultHandler(action, result); + return result; + }; + Utility.retrieveAndSync=function (clientObj, option) { + var result=Utility.retrieve(clientObj, option); + return clientObj.context.sync().then(function () { return result; }); }; Utility._parseSelectExpand=function (select) { var args=[]; @@ -11726,11 +12876,32 @@ var OfficeExtension; return '*'; } var itemsSlashLength=6; - if (propertyNameLower.substr(0, itemsSlashLength)==="items/") { + var isItemsSlashOrItemsDot=propertyNameLower.substr(0, itemsSlashLength)==="items/" || + propertyNameLower.substr(0, itemsSlashLength)==="items."; + if (isItemsSlashOrItemsDot) { propertyName=propertyName.substr(itemsSlashLength); } - return propertyName.replace(new RegExp("\/items\/", "gi"), "/"); + return propertyName.replace(new RegExp("[\/\.]items[\/\.]", "gi"), "/"); + } + }; + Utility.toJson=function (clientObj, scalarProperties, navigationProperties, collectionItemsIfAny) { + var result={}; + for (var prop in scalarProperties) { + var value=scalarProperties[prop]; + if (typeof value !=="undefined") { + result[prop]=value; + } + } + for (var prop in navigationProperties) { + var value=navigationProperties[prop]; + if (typeof value !=="undefined") { + result[prop]=value.toJSON(); + } + } + if (collectionItemsIfAny) { + result["items"]=collectionItemsIfAny.map(function (item) { return item.toJSON(); }); } + return result; }; Utility.throwError=function (resourceId, arg, errorLocation) { throw new OfficeExtension._Internal.RuntimeError({ @@ -11792,6 +12963,21 @@ var OfficeExtension; }); } }; + Utility.throwIfApiNotSupported=function (apiFullName, apiSetName, apiSetVersion, hostName) { + if (!Utility._doApiNotSupportedCheck) { + return; + } + if (typeof (window) !=="undefined" && window.Office && window.Office.context) { + if (!window.Office.context.requirements.isSetSupported(apiSetName, apiSetVersion)) { + var message=Utility._getResourceString(OfficeExtension.ResourceStrings.apiNotFoundDetails, [apiFullName, apiSetName+" "+apiSetVersion, hostName]); + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.apiNotFound, + message: message, + debugInfo: { errorLocation: apiFullName } + }); + } + } + }; Utility.getObjectPathExpression=function (objectPath) { var ret=""; while (objectPath) { @@ -11941,7 +13127,10 @@ var OfficeExtension; }; Utility._parseErrorResponse=function (responseInfo) { var errorObj=null; - if (!Utility.isNullOrEmptyString(responseInfo.body)) { + if (Utility.isPlainJsonObject(responseInfo.body)) { + errorObj=responseInfo.body; + } + else if (!Utility.isNullOrEmptyString(responseInfo.body)) { var errorResponseBody=Utility.trim(responseInfo.body); try { errorObj=JSON.parse(errorResponseBody); @@ -11971,8 +13160,24 @@ var OfficeExtension; } } }; + Utility._toCamelLowerCase=function (name) { + if (Utility.isNullOrEmptyString(name)) { + return name; + } + var index=0; + while (index < name.length && name.charCodeAt(index) >=65 && name.charCodeAt(index) <=90) { + index++; + } + if (index < name.length) { + return name.substr(0, index).toLowerCase()+name.substr(index); + } + else { + return name.toLowerCase(); + } + }; Utility._logEnabled=false; Utility._synchronousCleanup=false; + Utility._doApiNotSupportedCheck=false; Utility.s_underscoreCharCode="_".charCodeAt(0); return Utility; }()); @@ -11984,6 +13189,243 @@ var __extends=(this && this.__extends) || function (d, b) { function __() { this.constructor=d; } d.prototype=b===null ? Object.create(b) : (__.prototype=b.prototype, new __()); }; +var OfficeCore; +(function (OfficeCore) { + var _hostName="OfficeCore"; + var _defaultApiSetName="ExperimentApi"; + var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; + var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; + var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; + var _createNewObjectObjectPath=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath; + var _createChildItemObjectPathUsingIndexer=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer; + var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; + var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; + var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; + var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined=OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; + var _load=OfficeExtension.Utility.load; + var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; + var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; + var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var FlightingService=(function (_super) { + __extends(FlightingService, _super); + function FlightingService() { + _super.apply(this, arguments); + } + Object.defineProperty(FlightingService.prototype, "_className", { + get: function () { + return "FlightingService"; + }, + enumerable: true, + configurable: true + }); + FlightingService.prototype.getClientSessionId=function () { + var action=_createMethodAction(this.context, this, "GetClientSessionId", 1, []); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + FlightingService.prototype.getDeferredFlights=function () { + var action=_createMethodAction(this.context, this, "GetDeferredFlights", 1, []); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + FlightingService.prototype.getFeature=function (featureName, type, defaultValue, possibleValues) { + return new OfficeCore.ABType(this.context, _createMethodObjectPath(this.context, this, "GetFeature", 1, [featureName, type, defaultValue, possibleValues], false, false, null)); + }; + FlightingService.prototype.getFeatureGate=function (featureName, scope) { + return new OfficeCore.ABType(this.context, _createMethodObjectPath(this.context, this, "GetFeatureGate", 1, [featureName, scope], false, false, null)); + }; + FlightingService.prototype.resetOverride=function (featureName) { + _createMethodAction(this.context, this, "ResetOverride", 0, [featureName]); + }; + FlightingService.prototype.setOverride=function (featureName, type, value) { + _createMethodAction(this.context, this, "SetOverride", 0, [featureName, type, value]); + }; + FlightingService.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + FlightingService.newObject=function (context) { + var ret=new OfficeCore.FlightingService(context, _createNewObjectObjectPath(context, "Microsoft.Experiment.FlightingService", false)); + return ret; + }; + FlightingService.prototype.toJSON=function () { + return {}; + }; + return FlightingService; + }(OfficeExtension.ClientObject)); + OfficeCore.FlightingService=FlightingService; + var ABType=(function (_super) { + __extends(ABType, _super); + function ABType() { + _super.apply(this, arguments); + } + Object.defineProperty(ABType.prototype, "_className", { + get: function () { + return "ABType"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ABType.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this.m_value, "ABType", this._isNull); + return this.m_value; + }, + enumerable: true, + configurable: true + }); + ABType.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Value"])) { + this.m_value=obj["Value"]; + } + }; + ABType.prototype.load=function (option) { + _load(this, option); + return this; + }; + ABType.prototype.toJSON=function () { + return { + "value": this.m_value + }; + }; + return ABType; + }(OfficeExtension.ClientObject)); + OfficeCore.ABType=ABType; + var FeatureType; + (function (FeatureType) { + FeatureType.boolean="Boolean"; + FeatureType.integer="Integer"; + FeatureType.string="String"; + })(FeatureType=OfficeCore.FeatureType || (OfficeCore.FeatureType={})); + var ExperimentErrorCodes; + (function (ExperimentErrorCodes) { + ExperimentErrorCodes.generalException="GeneralException"; + })(ExperimentErrorCodes=OfficeCore.ExperimentErrorCodes || (OfficeCore.ExperimentErrorCodes={})); +})(OfficeCore || (OfficeCore={})); +var OfficeCore; +(function (OfficeCore) { + var RequestContext=(function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + _super.call(this, url); + } + Object.defineProperty(RequestContext.prototype, "flighting", { + get: function () { + return this.flightingService; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "telemetry", { + get: function () { + if (!this.m_telemetry) { + this.m_telemetry=OfficeCore.TelemetryService.newObject(this); + } + return this.m_telemetry; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "flightingService", { + get: function () { + if (!this.m_flightingService) { + this.m_flightingService=OfficeCore.FlightingService.newObject(this); + } + return this.m_flightingService; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeExtension.ClientRequestContext)); + OfficeCore.RequestContext=RequestContext; +})(OfficeCore || (OfficeCore={})); +var OfficeCore; +(function (OfficeCore) { + var _hostName="OfficeCore"; + var _defaultApiSetName="TelemetryApi"; + var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; + var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; + var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; + var _createNewObjectObjectPath=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath; + var _createChildItemObjectPathUsingIndexer=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer; + var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; + var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; + var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; + var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined=OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; + var _load=OfficeExtension.Utility.load; + var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; + var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; + var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var _typeTelemetryService="TelemetryService"; + var TelemetryService=(function (_super) { + __extends(TelemetryService, _super); + function TelemetryService() { + _super.apply(this, arguments); + } + Object.defineProperty(TelemetryService.prototype, "_className", { + get: function () { + return "TelemetryService"; + }, + enumerable: true, + configurable: true + }); + TelemetryService.prototype.sendTelemetryEvent=function (telemetryProperties, eventName, eventContract, eventFlags, value) { + _createMethodAction(this.context, this, "SendTelemetryEvent", 1, [telemetryProperties, eventName, eventContract, eventFlags, value], false); + }; + TelemetryService.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + TelemetryService.newObject=function (context) { + var ret=new OfficeCore.TelemetryService(context, _createNewObjectObjectPath(context, "Microsoft.Telemetry.TelemetryService", false, false)); + return ret; + }; + TelemetryService.prototype.toJSON=function () { + return {}; + }; + return TelemetryService; + }(OfficeExtension.ClientObject)); + OfficeCore.TelemetryService=TelemetryService; + var TelemetryErrorCodes; + (function (TelemetryErrorCodes) { + TelemetryErrorCodes.generalException="GeneralException"; + })(TelemetryErrorCodes=OfficeCore.TelemetryErrorCodes || (OfficeCore.TelemetryErrorCodes={})); +})(OfficeCore || (OfficeCore={})); + +var __extends=(this && this.__extends) || (function () { + var extendStatics=Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__=b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p]=b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor=d; } + d.prototype=b===null ? Object.create(b) : (__.prototype=b.prototype, new __()); + }; +})(); var Word; (function (Word) { function _normalizeSearchOptions(context, searchOptions) { @@ -12004,6 +13446,8 @@ var Word; } return newSearchOptions; } + var _hostName="Word"; + var _defaultApiSetName="WordApi"; var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; @@ -12012,19 +13456,59 @@ var Word; var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createEnsureUnchangedAction=OfficeExtension.ActionFactory.createEnsureUnchangedAction; var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; var _isUndefined=OfficeExtension.Utility.isUndefined; var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; var _load=OfficeExtension.Utility.load; + var _loadAndSync=OfficeExtension.Utility.loadAndSync; + var _retrieve=OfficeExtension.Utility.retrieve; + var _retrieveAndSync=OfficeExtension.Utility.retrieveAndSync; + var _toJson=OfficeExtension.Utility.toJson; var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var _typeApplication="Application"; + var Application=(function (_super) { + __extends(Application, _super); + function Application() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Application.prototype, "_className", { + get: function () { + return "Application"; + }, + enumerable: true, + configurable: true + }); + Application.prototype.createDocument=function (base64File) { + return new Word.DocumentCreated(this.context, _createMethodObjectPath(this.context, this, "CreateDocument", 1, [base64File], false, false, null, false)); + }; + Application.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + Application.newObject=function (context) { + var ret=new Word.Application(context, _createNewObjectObjectPath(context, "Microsoft.WordServices.Application", false, false)); + return ret; + }; + Application.prototype.toJSON=function () { + return _toJson(this, {}, {}); + }; + return Application; + }(OfficeExtension.ClientObject)); + Word.Application=Application; + var _typeBody="Body"; var Body=(function (_super) { __extends(Body, _super); function Body() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Body.prototype, "_className", { get: function () { @@ -12035,131 +13519,138 @@ var Word; }); Object.defineProperty(Body.prototype, "contentControls", { get: function () { - if (!this.m_contentControls) { - this.m_contentControls=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false)); + if (!this._C) { + this._C=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false, false)); } - return this.m_contentControls; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._F) { + this._F=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "inlinePictures", { get: function () { - if (!this.m_inlinePictures) { - this.m_inlinePictures=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false)); + if (!this._I) { + this._I=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false, false)); } - return this.m_inlinePictures; + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "lists", { get: function () { - if (!this.m_lists) { - this.m_lists=new Word.ListCollection(this.context, _createPropertyObjectPath(this.context, this, "Lists", true, false)); + _throwIfApiNotSupported("Body.lists", _defaultApiSetName, "1.3", _hostName); + if (!this._L) { + this._L=new Word.ListCollection(this.context, _createPropertyObjectPath(this.context, this, "Lists", true, false, false)); } - return this.m_lists; + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._P) { + this._P=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "parentBody", { get: function () { - if (!this.m_parentBody) { - this.m_parentBody=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false)); + _throwIfApiNotSupported("Body.parentBody", _defaultApiSetName, "1.3", _hostName); + if (!this._Pa) { + this._Pa=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false, false)); } - return this.m_parentBody; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "parentBodyOrNullObject", { get: function () { - if (!this.m_parentBodyOrNullObject) { - this.m_parentBodyOrNullObject=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBodyOrNullObject", false, false)); + _throwIfApiNotSupported("Body.parentBodyOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Par) { + this._Par=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBodyOrNullObject", false, false, false)); } - return this.m_parentBodyOrNullObject; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "parentContentControl", { get: function () { - if (!this.m_parentContentControl) { - this.m_parentContentControl=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false)); + if (!this._Pare) { + this._Pare=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false, false)); } - return this.m_parentContentControl; + return this._Pare; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "parentContentControlOrNullObject", { get: function () { - if (!this.m_parentContentControlOrNullObject) { - this.m_parentContentControlOrNullObject=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false)); + _throwIfApiNotSupported("Body.parentContentControlOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Paren) { + this._Paren=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false, false)); } - return this.m_parentContentControlOrNullObject; + return this._Paren; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "parentSection", { get: function () { - if (!this.m_parentSection) { - this.m_parentSection=new Word.Section(this.context, _createPropertyObjectPath(this.context, this, "ParentSection", false, false)); + _throwIfApiNotSupported("Body.parentSection", _defaultApiSetName, "1.3", _hostName); + if (!this._Parent) { + this._Parent=new Word.Section(this.context, _createPropertyObjectPath(this.context, this, "ParentSection", false, false, false)); } - return this.m_parentSection; + return this._Parent; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "parentSectionOrNullObject", { get: function () { - if (!this.m_parentSectionOrNullObject) { - this.m_parentSectionOrNullObject=new Word.Section(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionOrNullObject", false, false)); + _throwIfApiNotSupported("Body.parentSectionOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ParentS) { + this._ParentS=new Word.Section(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionOrNullObject", false, false, false)); } - return this.m_parentSectionOrNullObject; + return this._ParentS; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "tables", { get: function () { - if (!this.m_tables) { - this.m_tables=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false)); + _throwIfApiNotSupported("Body.tables", _defaultApiSetName, "1.3", _hostName); + if (!this._T) { + this._T=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false, false)); } - return this.m_tables; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "Body", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._S, _typeBody, this._isNull); + return this._S; }, set: function (value) { - this.m_style=value; + this._S=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -12167,11 +13658,12 @@ var Word; }); Object.defineProperty(Body.prototype, "styleBuiltIn", { get: function () { - _throwIfNotLoaded("styleBuiltIn", this.m_styleBuiltIn, "Body", this._isNull); - return this.m_styleBuiltIn; + _throwIfNotLoaded("styleBuiltIn", this._St, _typeBody, this._isNull); + _throwIfApiNotSupported("Body.styleBuiltIn", _defaultApiSetName, "1.3", _hostName); + return this._St; }, set: function (value) { - this.m_styleBuiltIn=value; + this._St=value; _createSetPropertyAction(this.context, this, "StyleBuiltIn", value); }, enumerable: true, @@ -12179,41 +13671,31 @@ var Word; }); Object.defineProperty(Body.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "Body", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._Te, _typeBody, this._isNull); + return this._Te; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "Body", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._Ty, _typeBody, this._isNull); + _throwIfApiNotSupported("Body.type", _defaultApiSetName, "1.3", _hostName); + return this._Ty; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Body", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeBody, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Body.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["style", "styleBuiltIn"], ["font"], [ - "contentControls", - "inlinePictures", - "lists", - "paragraphs", - "parentBody", - "parentBodyOrNullObject", - "parentContentControl", - "parentContentControlOrNullObject", - "parentSection", - "parentSectionOrNullObject", - "tables", "contentControls", "inlinePictures", "lists", @@ -12228,59 +13710,62 @@ var Word; ]); }; Body.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; Body.prototype.getHtml=function () { - var action=_createMethodAction(this.context, this, "GetHtml", 1, []); + var action=_createMethodAction(this.context, this, "GetHtml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Body.prototype.getOoxml=function () { - var action=_createMethodAction(this.context, this, "GetOoxml", 1, []); + var action=_createMethodAction(this.context, this, "GetOoxml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Body.prototype.getRange=function (rangeLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null)); + _throwIfApiNotSupported("Body.getRange", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null, false)); }; Body.prototype.insertBreak=function (breakType, insertLocation) { - _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation]); + _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation], false); }; Body.prototype.insertContentControl=function () { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null)); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null, false)); }; Body.prototype.insertFileFromBase64=function (base64File, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null, false)); }; Body.prototype.insertHtml=function (html, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null, false)); }; Body.prototype.insertInlinePictureFromBase64=function (base64EncodedImage, insertLocation) { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null)); + _throwIfApiNotSupported("Body.insertInlinePictureFromBase64", _defaultApiSetName, "1.2", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null, false)); }; Body.prototype.insertOoxml=function (ooxml, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null, false)); }; Body.prototype.insertParagraph=function (paragraphText, insertLocation) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null, false)); }; Body.prototype.insertTable=function (rowCount, columnCount, insertLocation, values) { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null)); + _throwIfApiNotSupported("Body.insertTable", _defaultApiSetName, "1.3", _hostName); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null, false)); }; Body.prototype.insertText=function (text, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null, false)); }; Body.prototype.search=function (searchText, searchOptions) { searchOptions=_normalizeSearchOptions(this.context, searchOptions); - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null)); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null, false)); }; Body.prototype.select=function (selectionMode) { - _createMethodAction(this.context, this, "Select", 1, [selectionMode]); + _createMethodAction(this.context, this, "Select", 1, [selectionMode], false); }; Body.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Body.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12289,25 +13774,33 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._S=obj["Style"]; } if (!_isUndefined(obj["StyleBuiltIn"])) { - this.m_styleBuiltIn=obj["StyleBuiltIn"]; + this._St=obj["StyleBuiltIn"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._Te=obj["Text"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._Ty=obj["Type"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["contentControls", "ContentControls", "font", "Font", "inlinePictures", "InlinePictures", "lists", "Lists", "paragraphs", "Paragraphs", "parentBody", "ParentBody", "parentBodyOrNullObject", "ParentBodyOrNullObject", "parentContentControl", "ParentContentControl", "parentContentControlOrNullObject", "ParentContentControlOrNullObject", "parentSection", "ParentSection", "parentSectionOrNullObject", "ParentSectionOrNullObject", "tables", "Tables"]); }; Body.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Body.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Body.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Body.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; Body.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -12315,7 +13808,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; Body.prototype.track=function () { @@ -12327,21 +13820,32 @@ var Word; return this; }; Body.prototype.toJSON=function () { - return { - "font": this.m_font, - "style": this.m_style, - "styleBuiltIn": this.m_styleBuiltIn, - "text": this.m_text, - "type": this.m_type - }; + return _toJson(this, { + "style": this._S, + "styleBuiltIn": this._St, + "text": this._Te, + "type": this._Ty, + }, { + "contentControls": this._C, + "font": this._F, + "inlinePictures": this._I, + "lists": this._L, + "paragraphs": this._P, + "tables": this._T, + }); + }; + Body.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Body; }(OfficeExtension.ClientObject)); Word.Body=Body; + var _typeContentControl="ContentControl"; var ContentControl=(function (_super) { __extends(ContentControl, _super); function ContentControl() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ContentControl.prototype, "_className", { get: function () { @@ -12352,141 +13856,149 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "contentControls", { get: function () { - if (!this.m_contentControls) { - this.m_contentControls=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false)); + if (!this._Con) { + this._Con=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false, false)); } - return this.m_contentControls; + return this._Con; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._F) { + this._F=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "inlinePictures", { get: function () { - if (!this.m_inlinePictures) { - this.m_inlinePictures=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false)); + if (!this._In) { + this._In=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false, false)); } - return this.m_inlinePictures; + return this._In; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "lists", { get: function () { - if (!this.m_lists) { - this.m_lists=new Word.ListCollection(this.context, _createPropertyObjectPath(this.context, this, "Lists", true, false)); + _throwIfApiNotSupported("ContentControl.lists", _defaultApiSetName, "1.3", _hostName); + if (!this._L) { + this._L=new Word.ListCollection(this.context, _createPropertyObjectPath(this.context, this, "Lists", true, false, false)); } - return this.m_lists; + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._P) { + this._P=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "parentBody", { get: function () { - if (!this.m_parentBody) { - this.m_parentBody=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false)); + _throwIfApiNotSupported("ContentControl.parentBody", _defaultApiSetName, "1.3", _hostName); + if (!this._Pa) { + this._Pa=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false, false)); } - return this.m_parentBody; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "parentContentControl", { get: function () { - if (!this.m_parentContentControl) { - this.m_parentContentControl=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false)); + if (!this._Par) { + this._Par=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false, false)); } - return this.m_parentContentControl; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "parentContentControlOrNullObject", { get: function () { - if (!this.m_parentContentControlOrNullObject) { - this.m_parentContentControlOrNullObject=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false)); + _throwIfApiNotSupported("ContentControl.parentContentControlOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Pare) { + this._Pare=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false, false)); } - return this.m_parentContentControlOrNullObject; + return this._Pare; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + _throwIfApiNotSupported("ContentControl.parentTable", _defaultApiSetName, "1.3", _hostName); + if (!this._Paren) { + this._Paren=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._Paren; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "parentTableCell", { get: function () { - if (!this.m_parentTableCell) { - this.m_parentTableCell=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false)); + _throwIfApiNotSupported("ContentControl.parentTableCell", _defaultApiSetName, "1.3", _hostName); + if (!this._Parent) { + this._Parent=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false, false)); } - return this.m_parentTableCell; + return this._Parent; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "parentTableCellOrNullObject", { get: function () { - if (!this.m_parentTableCellOrNullObject) { - this.m_parentTableCellOrNullObject=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false)); + _throwIfApiNotSupported("ContentControl.parentTableCellOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ParentT) { + this._ParentT=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false, false)); } - return this.m_parentTableCellOrNullObject; + return this._ParentT; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "parentTableOrNullObject", { get: function () { - if (!this.m_parentTableOrNullObject) { - this.m_parentTableOrNullObject=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false)); + _throwIfApiNotSupported("ContentControl.parentTableOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ParentTa) { + this._ParentTa=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false, false)); } - return this.m_parentTableOrNullObject; + return this._ParentTa; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "tables", { get: function () { - if (!this.m_tables) { - this.m_tables=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false)); + _throwIfApiNotSupported("ContentControl.tables", _defaultApiSetName, "1.3", _hostName); + if (!this._T) { + this._T=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false, false)); } - return this.m_tables; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "appearance", { get: function () { - _throwIfNotLoaded("appearance", this.m_appearance, "ContentControl", this._isNull); - return this.m_appearance; + _throwIfNotLoaded("appearance", this._A, _typeContentControl, this._isNull); + return this._A; }, set: function (value) { - this.m_appearance=value; + this._A=value; _createSetPropertyAction(this.context, this, "Appearance", value); }, enumerable: true, @@ -12494,11 +14006,11 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "cannotDelete", { get: function () { - _throwIfNotLoaded("cannotDelete", this.m_cannotDelete, "ContentControl", this._isNull); - return this.m_cannotDelete; + _throwIfNotLoaded("cannotDelete", this._C, _typeContentControl, this._isNull); + return this._C; }, set: function (value) { - this.m_cannotDelete=value; + this._C=value; _createSetPropertyAction(this.context, this, "CannotDelete", value); }, enumerable: true, @@ -12506,11 +14018,11 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "cannotEdit", { get: function () { - _throwIfNotLoaded("cannotEdit", this.m_cannotEdit, "ContentControl", this._isNull); - return this.m_cannotEdit; + _throwIfNotLoaded("cannotEdit", this._Ca, _typeContentControl, this._isNull); + return this._Ca; }, set: function (value) { - this.m_cannotEdit=value; + this._Ca=value; _createSetPropertyAction(this.context, this, "CannotEdit", value); }, enumerable: true, @@ -12518,11 +14030,11 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "ContentControl", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._Co, _typeContentControl, this._isNull); + return this._Co; }, set: function (value) { - this.m_color=value; + this._Co=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -12530,19 +14042,19 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "ContentControl", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeContentControl, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "placeholderText", { get: function () { - _throwIfNotLoaded("placeholderText", this.m_placeholderText, "ContentControl", this._isNull); - return this.m_placeholderText; + _throwIfNotLoaded("placeholderText", this._Pl, _typeContentControl, this._isNull); + return this._Pl; }, set: function (value) { - this.m_placeholderText=value; + this._Pl=value; _createSetPropertyAction(this.context, this, "PlaceholderText", value); }, enumerable: true, @@ -12550,11 +14062,11 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "removeWhenEdited", { get: function () { - _throwIfNotLoaded("removeWhenEdited", this.m_removeWhenEdited, "ContentControl", this._isNull); - return this.m_removeWhenEdited; + _throwIfNotLoaded("removeWhenEdited", this._R, _typeContentControl, this._isNull); + return this._R; }, set: function (value) { - this.m_removeWhenEdited=value; + this._R=value; _createSetPropertyAction(this.context, this, "RemoveWhenEdited", value); }, enumerable: true, @@ -12562,11 +14074,11 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "ContentControl", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._S, _typeContentControl, this._isNull); + return this._S; }, set: function (value) { - this.m_style=value; + this._S=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -12574,11 +14086,12 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "styleBuiltIn", { get: function () { - _throwIfNotLoaded("styleBuiltIn", this.m_styleBuiltIn, "ContentControl", this._isNull); - return this.m_styleBuiltIn; + _throwIfNotLoaded("styleBuiltIn", this._St, _typeContentControl, this._isNull); + _throwIfApiNotSupported("ContentControl.styleBuiltIn", _defaultApiSetName, "1.3", _hostName); + return this._St; }, set: function (value) { - this.m_styleBuiltIn=value; + this._St=value; _createSetPropertyAction(this.context, this, "StyleBuiltIn", value); }, enumerable: true, @@ -12586,19 +14099,20 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "subtype", { get: function () { - _throwIfNotLoaded("subtype", this.m_subtype, "ContentControl", this._isNull); - return this.m_subtype; + _throwIfNotLoaded("subtype", this._Su, _typeContentControl, this._isNull); + _throwIfApiNotSupported("ContentControl.subtype", _defaultApiSetName, "1.3", _hostName); + return this._Su; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "tag", { get: function () { - _throwIfNotLoaded("tag", this.m_tag, "ContentControl", this._isNull); - return this.m_tag; + _throwIfNotLoaded("tag", this._Ta, _typeContentControl, this._isNull); + return this._Ta; }, set: function (value) { - this.m_tag=value; + this._Ta=value; _createSetPropertyAction(this.context, this, "Tag", value); }, enumerable: true, @@ -12606,19 +14120,19 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "ContentControl", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._Te, _typeContentControl, this._isNull); + return this._Te; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "title", { get: function () { - _throwIfNotLoaded("title", this.m_title, "ContentControl", this._isNull); - return this.m_title; + _throwIfNotLoaded("title", this._Ti, _typeContentControl, this._isNull); + return this._Ti; }, set: function (value) { - this.m_title=value; + this._Ti=value; _createSetPropertyAction(this.context, this, "Title", value); }, enumerable: true, @@ -12626,34 +14140,22 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "ContentControl", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._Ty, _typeContentControl, this._isNull); + return this._Ty; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "ContentControl", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeContentControl, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); ContentControl.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["title", "tag", "placeholderText", "appearance", "color", "removeWhenEdited", "cannotDelete", "cannotEdit", "style", "styleBuiltIn"], ["font"], [ - "contentControls", - "inlinePictures", - "lists", - "paragraphs", - "parentBody", - "parentContentControl", - "parentContentControlOrNullObject", - "parentTable", - "parentTableCell", - "parentTableCellOrNullObject", - "parentTableOrNullObject", - "tables", "contentControls", "inlinePictures", "lists", @@ -12669,65 +14171,70 @@ var Word; ]); }; ContentControl.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; ContentControl.prototype.delete=function (keepContent) { - _createMethodAction(this.context, this, "Delete", 0, [keepContent]); + _createMethodAction(this.context, this, "Delete", 0, [keepContent], false); }; ContentControl.prototype.getHtml=function () { - var action=_createMethodAction(this.context, this, "GetHtml", 1, []); + var action=_createMethodAction(this.context, this, "GetHtml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; ContentControl.prototype.getOoxml=function () { - var action=_createMethodAction(this.context, this, "GetOoxml", 1, []); + var action=_createMethodAction(this.context, this, "GetOoxml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; ContentControl.prototype.getRange=function (rangeLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null)); + _throwIfApiNotSupported("ContentControl.getRange", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null, false)); }; ContentControl.prototype.getTextRanges=function (endingMarks, trimSpacing) { - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetTextRanges", 1, [endingMarks, trimSpacing], true, false, null)); + _throwIfApiNotSupported("ContentControl.getTextRanges", _defaultApiSetName, "1.3", _hostName); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetTextRanges", 1, [endingMarks, trimSpacing], true, false, null, false)); }; ContentControl.prototype.insertBreak=function (breakType, insertLocation) { - _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation]); + _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation], false); }; ContentControl.prototype.insertFileFromBase64=function (base64File, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null, false)); }; ContentControl.prototype.insertHtml=function (html, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null, false)); }; ContentControl.prototype.insertInlinePictureFromBase64=function (base64EncodedImage, insertLocation) { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null)); + _throwIfApiNotSupported("ContentControl.insertInlinePictureFromBase64", _defaultApiSetName, "1.2", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null, false)); }; ContentControl.prototype.insertOoxml=function (ooxml, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null, false)); }; ContentControl.prototype.insertParagraph=function (paragraphText, insertLocation) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null, false)); }; ContentControl.prototype.insertTable=function (rowCount, columnCount, insertLocation, values) { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null)); + _throwIfApiNotSupported("ContentControl.insertTable", _defaultApiSetName, "1.3", _hostName); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null, false)); }; ContentControl.prototype.insertText=function (text, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null, false)); }; ContentControl.prototype.search=function (searchText, searchOptions) { searchOptions=_normalizeSearchOptions(this.context, searchOptions); - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null)); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null, false)); }; ContentControl.prototype.select=function (selectionMode) { - _createMethodAction(this.context, this, "Select", 1, [selectionMode]); + _createMethodAction(this.context, this, "Select", 1, [selectionMode], false); }; ContentControl.prototype.split=function (delimiters, multiParagraphs, trimDelimiters, trimSpacing) { - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Split", 1, [delimiters, multiParagraphs, trimDelimiters, trimSpacing], true, false, null)); + _throwIfApiNotSupported("ContentControl.split", _defaultApiSetName, "1.3", _hostName); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Split", 1, [delimiters, multiParagraphs, trimDelimiters, trimSpacing], true, false, null, false)); }; ContentControl.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; ContentControl.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12736,55 +14243,63 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Appearance"])) { - this.m_appearance=obj["Appearance"]; + this._A=obj["Appearance"]; } if (!_isUndefined(obj["CannotDelete"])) { - this.m_cannotDelete=obj["CannotDelete"]; + this._C=obj["CannotDelete"]; } if (!_isUndefined(obj["CannotEdit"])) { - this.m_cannotEdit=obj["CannotEdit"]; + this._Ca=obj["CannotEdit"]; } if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._Co=obj["Color"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["PlaceholderText"])) { - this.m_placeholderText=obj["PlaceholderText"]; + this._Pl=obj["PlaceholderText"]; } if (!_isUndefined(obj["RemoveWhenEdited"])) { - this.m_removeWhenEdited=obj["RemoveWhenEdited"]; + this._R=obj["RemoveWhenEdited"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._S=obj["Style"]; } if (!_isUndefined(obj["StyleBuiltIn"])) { - this.m_styleBuiltIn=obj["StyleBuiltIn"]; + this._St=obj["StyleBuiltIn"]; } if (!_isUndefined(obj["Subtype"])) { - this.m_subtype=obj["Subtype"]; + this._Su=obj["Subtype"]; } if (!_isUndefined(obj["Tag"])) { - this.m_tag=obj["Tag"]; + this._Ta=obj["Tag"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._Te=obj["Text"]; } if (!_isUndefined(obj["Title"])) { - this.m_title=obj["Title"]; + this._Ti=obj["Title"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._Ty=obj["Type"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["contentControls", "ContentControls", "font", "Font", "inlinePictures", "InlinePictures", "lists", "Lists", "paragraphs", "Paragraphs", "parentBody", "ParentBody", "parentContentControl", "ParentContentControl", "parentContentControlOrNullObject", "ParentContentControlOrNullObject", "parentTable", "ParentTable", "parentTableCell", "ParentTableCell", "parentTableCellOrNullObject", "ParentTableCellOrNullObject", "parentTableOrNullObject", "ParentTableOrNullObject", "tables", "Tables"]); }; ContentControl.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ContentControl.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ContentControl.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ContentControl.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; ContentControl.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -12792,10 +14307,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; ContentControl.prototype.track=function () { @@ -12807,31 +14322,42 @@ var Word; return this; }; ContentControl.prototype.toJSON=function () { - return { - "appearance": this.m_appearance, - "cannotDelete": this.m_cannotDelete, - "cannotEdit": this.m_cannotEdit, - "color": this.m_color, - "font": this.m_font, - "id": this.m_id, - "placeholderText": this.m_placeholderText, - "removeWhenEdited": this.m_removeWhenEdited, - "style": this.m_style, - "styleBuiltIn": this.m_styleBuiltIn, - "subtype": this.m_subtype, - "tag": this.m_tag, - "text": this.m_text, - "title": this.m_title, - "type": this.m_type - }; + return _toJson(this, { + "appearance": this._A, + "cannotDelete": this._C, + "cannotEdit": this._Ca, + "color": this._Co, + "id": this._I, + "placeholderText": this._Pl, + "removeWhenEdited": this._R, + "style": this._S, + "styleBuiltIn": this._St, + "subtype": this._Su, + "tag": this._Ta, + "text": this._Te, + "title": this._Ti, + "type": this._Ty, + }, { + "contentControls": this._Con, + "font": this._F, + "inlinePictures": this._In, + "lists": this._L, + "paragraphs": this._P, + "tables": this._T, + }); + }; + ContentControl.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ContentControl; }(OfficeExtension.ClientObject)); Word.ContentControl=ContentControl; + var _typeContentControlCollection="ContentControlCollection"; var ContentControlCollection=(function (_super) { __extends(ContentControlCollection, _super); function ContentControlCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ContentControlCollection.prototype, "_className", { get: function () { @@ -12842,7 +14368,7 @@ var Word; }); Object.defineProperty(ContentControlCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ContentControlCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeContentControlCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -12850,38 +14376,42 @@ var Word; }); Object.defineProperty(ContentControlCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "ContentControlCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeContentControlCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); ContentControlCollection.prototype.getById=function (id) { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetById", 1, [id], false, false, null)); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetById", 1, [id], false, false, null, false)); }; ContentControlCollection.prototype.getByIdOrNullObject=function (id) { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetByIdOrNullObject", 1, [id], false, false, null)); + _throwIfApiNotSupported("ContentControlCollection.getByIdOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetByIdOrNullObject", 1, [id], false, false, null, false)); }; ContentControlCollection.prototype.getByTag=function (tag) { - return new Word.ContentControlCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTag", 1, [tag], true, false, null)); + return new Word.ContentControlCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTag", 1, [tag], true, false, null, false)); }; ContentControlCollection.prototype.getByTitle=function (title) { - return new Word.ContentControlCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTitle", 1, [title], true, false, null)); + return new Word.ContentControlCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTitle", 1, [title], true, false, null, false)); }; ContentControlCollection.prototype.getByTypes=function (types) { - return new Word.ContentControlCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTypes", 1, [types], true, false, null)); + _throwIfApiNotSupported("ContentControlCollection.getByTypes", _defaultApiSetName, "1.3", _hostName); + return new Word.ContentControlCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTypes", 1, [types], true, false, null, false)); }; ContentControlCollection.prototype.getFirst=function () { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + _throwIfApiNotSupported("ContentControlCollection.getFirst", _defaultApiSetName, "1.3", _hostName); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; ContentControlCollection.prototype.getFirstOrNullObject=function () { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("ContentControlCollection.getFirstOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; ContentControlCollection.prototype.getItem=function (index) { return new Word.ContentControl(this.context, _createIndexerObjectPath(this.context, this, [index])); }; ContentControlCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; ContentControlCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12890,7 +14420,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -12903,8 +14433,16 @@ var Word; } }; ContentControlCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ContentControlCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ContentControlCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ContentControlCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; ContentControlCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -12912,7 +14450,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; ContentControlCollection.prototype.track=function () { @@ -12924,15 +14462,16 @@ var Word; return this; }; ContentControlCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return ContentControlCollection; }(OfficeExtension.ClientObject)); Word.ContentControlCollection=ContentControlCollection; + var _typeCustomProperty="CustomProperty"; var CustomProperty=(function (_super) { __extends(CustomProperty, _super); function CustomProperty() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CustomProperty.prototype, "_className", { get: function () { @@ -12943,15 +14482,15 @@ var Word; }); Object.defineProperty(CustomProperty.prototype, "key", { get: function () { - _throwIfNotLoaded("key", this.m_key, "CustomProperty", this._isNull); - return this.m_key; + _throwIfNotLoaded("key", this._K, _typeCustomProperty, this._isNull); + return this._K; }, enumerable: true, configurable: true }); Object.defineProperty(CustomProperty.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "CustomProperty", this._isNull); + _throwIfNotLoaded("type", this.m_type, _typeCustomProperty, this._isNull); return this.m_type; }, enumerable: true, @@ -12964,7 +14503,7 @@ var Word; _throwIfNotLoaded("value", this.m_value, "CustomProperty", this._isNull); return new Date(this.m_value); } - _throwIfNotLoaded("value", this.m_value, "CustomProperty", this._isNull); + _throwIfNotLoaded("value", this.m_value, _typeCustomProperty, this._isNull); return this.m_value; }, set: function (value) { @@ -12976,16 +14515,16 @@ var Word; }); Object.defineProperty(CustomProperty.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "CustomProperty", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeCustomProperty, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(CustomProperty.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "CustomProperty", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeCustomProperty, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -12994,10 +14533,10 @@ var Word; this._recursivelySet(properties, options, ["value"], [], []); }; CustomProperty.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; CustomProperty.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; CustomProperty.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13006,7 +14545,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Key"])) { - this.m_key=obj["Key"]; + this._K=obj["Key"]; } if (!_isUndefined(obj["Type"])) { this.m_type=obj["Type"]; @@ -13015,15 +14554,23 @@ var Word; this.m_value=obj["Value"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } }; CustomProperty.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CustomProperty.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + CustomProperty.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CustomProperty.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; CustomProperty.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -13031,10 +14578,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; CustomProperty.prototype.track=function () { @@ -13046,19 +14593,24 @@ var Word; return this; }; CustomProperty.prototype.toJSON=function () { - return { - "key": this.m_key, + return _toJson(this, { + "key": this._K, "type": this.m_type, - "value": this.m_value - }; + "value": this.m_value, + }, {}); + }; + CustomProperty.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return CustomProperty; }(OfficeExtension.ClientObject)); Word.CustomProperty=CustomProperty; + var _typeCustomPropertyCollection="CustomPropertyCollection"; var CustomPropertyCollection=(function (_super) { __extends(CustomPropertyCollection, _super); function CustomPropertyCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CustomPropertyCollection.prototype, "_className", { get: function () { @@ -13069,7 +14621,7 @@ var Word; }); Object.defineProperty(CustomPropertyCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "CustomPropertyCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeCustomPropertyCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -13077,20 +14629,20 @@ var Word; }); Object.defineProperty(CustomPropertyCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "CustomPropertyCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeCustomPropertyCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); CustomPropertyCollection.prototype.add=function (key, value) { - return new Word.CustomProperty(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [key, value], false, true, null)); + return new Word.CustomProperty(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [key, value], false, true, null, false)); }; CustomPropertyCollection.prototype.deleteAll=function () { - _createMethodAction(this.context, this, "DeleteAll", 0, []); + _createMethodAction(this.context, this, "DeleteAll", 0, [], false); }; CustomPropertyCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -13099,10 +14651,10 @@ var Word; return new Word.CustomProperty(this.context, _createIndexerObjectPath(this.context, this, [key])); }; CustomPropertyCollection.prototype.getItemOrNullObject=function (key) { - return new Word.CustomProperty(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null)); + return new Word.CustomProperty(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null, false)); }; CustomPropertyCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; CustomPropertyCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13111,7 +14663,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -13124,8 +14676,16 @@ var Word; } }; CustomPropertyCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CustomPropertyCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + CustomPropertyCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CustomPropertyCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; CustomPropertyCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -13133,7 +14693,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; CustomPropertyCollection.prototype.track=function () { @@ -13145,15 +14705,16 @@ var Word; return this; }; CustomPropertyCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return CustomPropertyCollection; }(OfficeExtension.ClientObject)); Word.CustomPropertyCollection=CustomPropertyCollection; + var _typeDocument="Document"; var Document=(function (_super) { __extends(Document, _super); function Document() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Document.prototype, "_className", { get: function () { @@ -13164,55 +14725,56 @@ var Word; }); Object.defineProperty(Document.prototype, "body", { get: function () { - if (!this.m_body) { - this.m_body=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "Body", false, false)); + if (!this._B) { + this._B=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "Body", false, false, false)); } - return this.m_body; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(Document.prototype, "contentControls", { get: function () { - if (!this.m_contentControls) { - this.m_contentControls=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false)); + if (!this._C) { + this._C=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false, false)); } - return this.m_contentControls; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Document.prototype, "properties", { get: function () { - if (!this.m_properties) { - this.m_properties=new Word.DocumentProperties(this.context, _createPropertyObjectPath(this.context, this, "Properties", false, false)); + _throwIfApiNotSupported("Document.properties", _defaultApiSetName, "1.3", _hostName); + if (!this._P) { + this._P=new Word.DocumentProperties(this.context, _createPropertyObjectPath(this.context, this, "Properties", false, false, false)); } - return this.m_properties; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Document.prototype, "sections", { get: function () { - if (!this.m_sections) { - this.m_sections=new Word.SectionCollection(this.context, _createPropertyObjectPath(this.context, this, "Sections", true, false)); + if (!this._Se) { + this._Se=new Word.SectionCollection(this.context, _createPropertyObjectPath(this.context, this, "Sections", true, false, false)); } - return this.m_sections; + return this._Se; }, enumerable: true, configurable: true }); Object.defineProperty(Document.prototype, "saved", { get: function () { - _throwIfNotLoaded("saved", this.m_saved, "Document", this._isNull); - return this.m_saved; + _throwIfNotLoaded("saved", this._S, _typeDocument, this._isNull); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(Document.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Document", this._isNull); + _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, _typeDocument, this._isNull); return this.m__ReferenceId; }, enumerable: true, @@ -13220,38 +14782,52 @@ var Word; }); Document.prototype.set=function (properties, options) { this._recursivelySet(properties, options, [], ["body", "properties"], [ - "contentControls", - "sections", "contentControls", "sections" ]); }; + Document.prototype.getMetadata=function (propertyGUID) { + var action=_createMethodAction(this.context, this, "GetMetadata", 1, [propertyGUID], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; Document.prototype.getSelection=function () { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetSelection", 1, [], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetSelection", 1, [], false, true, null, false)); + }; + Document.prototype.open=function () { + _throwIfApiNotSupported("Document.open", _defaultApiSetName, "1.3", _hostName); + _createMethodAction(this.context, this, "Open", 1, [], false); }; Document.prototype.save=function () { - _createMethodAction(this.context, this, "Save", 0, []); + _createMethodAction(this.context, this, "Save", 0, [], false); + }; + Document.prototype.setMetadata=function (propertyGUID, propertyValue) { + _createMethodAction(this.context, this, "SetMetadata", 0, [propertyGUID, propertyValue], false); + }; + Document.prototype.setMetadataOnTile=function (tileID, propertyGUID, propertyValue) { + _createMethodAction(this.context, this, "SetMetadataOnTile", 0, [tileID, propertyGUID, propertyValue], false); }; Document.prototype._GetObjectByReferenceId=function (referenceId) { - var action=_createMethodAction(this.context, this, "_GetObjectByReferenceId", 1, [referenceId]); + var action=_createMethodAction(this.context, this, "_GetObjectByReferenceId", 1, [referenceId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Document.prototype._GetObjectTypeNameByReferenceId=function (referenceId) { - var action=_createMethodAction(this.context, this, "_GetObjectTypeNameByReferenceId", 1, [referenceId]); + var action=_createMethodAction(this.context, this, "_GetObjectTypeNameByReferenceId", 1, [referenceId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Document.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Document.prototype._RemoveAllReferences=function () { - _createMethodAction(this.context, this, "_RemoveAllReferences", 1, []); + _createMethodAction(this.context, this, "_RemoveAllReferences", 1, [], false); }; Document.prototype._RemoveReference=function (referenceId) { - _createMethodAction(this.context, this, "_RemoveReference", 1, [referenceId]); + _createMethodAction(this.context, this, "_RemoveReference", 1, [referenceId], false); }; Document.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13260,7 +14836,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Saved"])) { - this.m_saved=obj["Saved"]; + this._S=obj["Saved"]; } if (!_isUndefined(obj["_ReferenceId"])) { this.m__ReferenceId=obj["_ReferenceId"]; @@ -13268,8 +14844,16 @@ var Word; _handleNavigationPropertyResults(this, obj, ["body", "Body", "contentControls", "ContentControls", "properties", "Properties", "sections", "Sections"]); }; Document.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Document.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Document.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Document.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; Document.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -13289,19 +14873,177 @@ var Word; return this; }; Document.prototype.toJSON=function () { - return { - "body": this.m_body, - "properties": this.m_properties, - "saved": this.m_saved - }; + return _toJson(this, { + "saved": this._S, + }, { + "body": this._B, + "contentControls": this._C, + "properties": this._P, + "sections": this._Se, + }); + }; + Document.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Document; }(OfficeExtension.ClientObject)); Word.Document=Document; + var _typeDocumentCreated="DocumentCreated"; + var DocumentCreated=(function (_super) { + __extends(DocumentCreated, _super); + function DocumentCreated() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(DocumentCreated.prototype, "_className", { + get: function () { + return "DocumentCreated"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentCreated.prototype, "body", { + get: function () { + _throwIfApiNotSupported("DocumentCreated.body", "WordApiHiddenDocument", "1.3", _hostName); + if (!this._B) { + this._B=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "Body", false, false, false)); + } + return this._B; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentCreated.prototype, "contentControls", { + get: function () { + _throwIfApiNotSupported("DocumentCreated.contentControls", "WordApiHiddenDocument", "1.3", _hostName); + if (!this._C) { + this._C=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false, false)); + } + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentCreated.prototype, "properties", { + get: function () { + _throwIfApiNotSupported("DocumentCreated.properties", "WordApiHiddenDocument", "1.3", _hostName); + if (!this._P) { + this._P=new Word.DocumentProperties(this.context, _createPropertyObjectPath(this.context, this, "Properties", false, false, false)); + } + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentCreated.prototype, "sections", { + get: function () { + _throwIfApiNotSupported("DocumentCreated.sections", "WordApiHiddenDocument", "1.3", _hostName); + if (!this._Se) { + this._Se=new Word.SectionCollection(this.context, _createPropertyObjectPath(this.context, this, "Sections", true, false, false)); + } + return this._Se; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentCreated.prototype, "saved", { + get: function () { + _throwIfNotLoaded("saved", this._S, _typeDocumentCreated, this._isNull); + _throwIfApiNotSupported("DocumentCreated.saved", "WordApiHiddenDocument", "1.3", _hostName); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentCreated.prototype, "_ReferenceId", { + get: function () { + _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, _typeDocumentCreated, this._isNull); + return this.m__ReferenceId; + }, + enumerable: true, + configurable: true + }); + DocumentCreated.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, [], ["body", "properties"], [ + "contentControls", + "sections" + ]); + }; + DocumentCreated.prototype.open=function () { + _createMethodAction(this.context, this, "Open", 1, [], false); + }; + DocumentCreated.prototype.save=function () { + _throwIfApiNotSupported("DocumentCreated.save", "WordApiHiddenDocument", "1.3", _hostName); + _createMethodAction(this.context, this, "Save", 0, [], false); + }; + DocumentCreated.prototype._KeepReference=function () { + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); + }; + DocumentCreated.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Saved"])) { + this._S=obj["Saved"]; + } + if (!_isUndefined(obj["_ReferenceId"])) { + this.m__ReferenceId=obj["_ReferenceId"]; + } + _handleNavigationPropertyResults(this, obj, ["body", "Body", "contentControls", "ContentControls", "properties", "Properties", "sections", "Sections"]); + }; + DocumentCreated.prototype.load=function (option) { + return _load(this, option); + }; + DocumentCreated.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + DocumentCreated.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + DocumentCreated.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + DocumentCreated.prototype._handleIdResult=function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["_ReferenceId"])) { + this.m__ReferenceId=value["_ReferenceId"]; + } + }; + DocumentCreated.prototype.track=function () { + this.context.trackedObjects.add(this); + return this; + }; + DocumentCreated.prototype.untrack=function () { + this.context.trackedObjects.remove(this); + return this; + }; + DocumentCreated.prototype.toJSON=function () { + return _toJson(this, { + "saved": this._S, + }, { + "body": this._B, + "contentControls": this._C, + "properties": this._P, + "sections": this._Se, + }); + }; + DocumentCreated.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return DocumentCreated; + }(OfficeExtension.ClientObject)); + Word.DocumentCreated=DocumentCreated; + var _typeDocumentProperties="DocumentProperties"; var DocumentProperties=(function (_super) { __extends(DocumentProperties, _super); function DocumentProperties() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(DocumentProperties.prototype, "_className", { get: function () { @@ -13312,29 +15054,29 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "customProperties", { get: function () { - if (!this.m_customProperties) { - this.m_customProperties=new Word.CustomPropertyCollection(this.context, _createPropertyObjectPath(this.context, this, "CustomProperties", true, false)); + if (!this._Cu) { + this._Cu=new Word.CustomPropertyCollection(this.context, _createPropertyObjectPath(this.context, this, "CustomProperties", true, false, false)); } - return this.m_customProperties; + return this._Cu; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "applicationName", { get: function () { - _throwIfNotLoaded("applicationName", this.m_applicationName, "DocumentProperties", this._isNull); - return this.m_applicationName; + _throwIfNotLoaded("applicationName", this._A, _typeDocumentProperties, this._isNull); + return this._A; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "author", { get: function () { - _throwIfNotLoaded("author", this.m_author, "DocumentProperties", this._isNull); - return this.m_author; + _throwIfNotLoaded("author", this._Au, _typeDocumentProperties, this._isNull); + return this._Au; }, set: function (value) { - this.m_author=value; + this._Au=value; _createSetPropertyAction(this.context, this, "Author", value); }, enumerable: true, @@ -13342,11 +15084,11 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "category", { get: function () { - _throwIfNotLoaded("category", this.m_category, "DocumentProperties", this._isNull); - return this.m_category; + _throwIfNotLoaded("category", this._C, _typeDocumentProperties, this._isNull); + return this._C; }, set: function (value) { - this.m_category=value; + this._C=value; _createSetPropertyAction(this.context, this, "Category", value); }, enumerable: true, @@ -13354,11 +15096,11 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "comments", { get: function () { - _throwIfNotLoaded("comments", this.m_comments, "DocumentProperties", this._isNull); - return this.m_comments; + _throwIfNotLoaded("comments", this._Co, _typeDocumentProperties, this._isNull); + return this._Co; }, set: function (value) { - this.m_comments=value; + this._Co=value; _createSetPropertyAction(this.context, this, "Comments", value); }, enumerable: true, @@ -13366,11 +15108,11 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "company", { get: function () { - _throwIfNotLoaded("company", this.m_company, "DocumentProperties", this._isNull); - return this.m_company; + _throwIfNotLoaded("company", this._Com, _typeDocumentProperties, this._isNull); + return this._Com; }, set: function (value) { - this.m_company=value; + this._Com=value; _createSetPropertyAction(this.context, this, "Company", value); }, enumerable: true, @@ -13378,19 +15120,19 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "creationDate", { get: function () { - _throwIfNotLoaded("creationDate", this.m_creationDate, "DocumentProperties", this._isNull); - return this.m_creationDate; + _throwIfNotLoaded("creationDate", this._Cr, _typeDocumentProperties, this._isNull); + return this._Cr; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "format", { get: function () { - _throwIfNotLoaded("format", this.m_format, "DocumentProperties", this._isNull); - return this.m_format; + _throwIfNotLoaded("format", this._F, _typeDocumentProperties, this._isNull); + return this._F; }, set: function (value) { - this.m_format=value; + this._F=value; _createSetPropertyAction(this.context, this, "Format", value); }, enumerable: true, @@ -13398,11 +15140,11 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "keywords", { get: function () { - _throwIfNotLoaded("keywords", this.m_keywords, "DocumentProperties", this._isNull); - return this.m_keywords; + _throwIfNotLoaded("keywords", this._K, _typeDocumentProperties, this._isNull); + return this._K; }, set: function (value) { - this.m_keywords=value; + this._K=value; _createSetPropertyAction(this.context, this, "Keywords", value); }, enumerable: true, @@ -13410,35 +15152,35 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "lastAuthor", { get: function () { - _throwIfNotLoaded("lastAuthor", this.m_lastAuthor, "DocumentProperties", this._isNull); - return this.m_lastAuthor; + _throwIfNotLoaded("lastAuthor", this._L, _typeDocumentProperties, this._isNull); + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "lastPrintDate", { get: function () { - _throwIfNotLoaded("lastPrintDate", this.m_lastPrintDate, "DocumentProperties", this._isNull); - return this.m_lastPrintDate; + _throwIfNotLoaded("lastPrintDate", this._La, _typeDocumentProperties, this._isNull); + return this._La; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "lastSaveTime", { get: function () { - _throwIfNotLoaded("lastSaveTime", this.m_lastSaveTime, "DocumentProperties", this._isNull); - return this.m_lastSaveTime; + _throwIfNotLoaded("lastSaveTime", this._Las, _typeDocumentProperties, this._isNull); + return this._Las; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "manager", { get: function () { - _throwIfNotLoaded("manager", this.m_manager, "DocumentProperties", this._isNull); - return this.m_manager; + _throwIfNotLoaded("manager", this._M, _typeDocumentProperties, this._isNull); + return this._M; }, set: function (value) { - this.m_manager=value; + this._M=value; _createSetPropertyAction(this.context, this, "Manager", value); }, enumerable: true, @@ -13446,27 +15188,27 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "revisionNumber", { get: function () { - _throwIfNotLoaded("revisionNumber", this.m_revisionNumber, "DocumentProperties", this._isNull); - return this.m_revisionNumber; + _throwIfNotLoaded("revisionNumber", this._R, _typeDocumentProperties, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "security", { get: function () { - _throwIfNotLoaded("security", this.m_security, "DocumentProperties", this._isNull); - return this.m_security; + _throwIfNotLoaded("security", this._S, _typeDocumentProperties, this._isNull); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "subject", { get: function () { - _throwIfNotLoaded("subject", this.m_subject, "DocumentProperties", this._isNull); - return this.m_subject; + _throwIfNotLoaded("subject", this._Su, _typeDocumentProperties, this._isNull); + return this._Su; }, set: function (value) { - this.m_subject=value; + this._Su=value; _createSetPropertyAction(this.context, this, "Subject", value); }, enumerable: true, @@ -13474,19 +15216,19 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "template", { get: function () { - _throwIfNotLoaded("template", this.m_template, "DocumentProperties", this._isNull); - return this.m_template; + _throwIfNotLoaded("template", this._T, _typeDocumentProperties, this._isNull); + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "title", { get: function () { - _throwIfNotLoaded("title", this.m_title, "DocumentProperties", this._isNull); - return this.m_title; + _throwIfNotLoaded("title", this._Ti, _typeDocumentProperties, this._isNull); + return this._Ti; }, set: function (value) { - this.m_title=value; + this._Ti=value; _createSetPropertyAction(this.context, this, "Title", value); }, enumerable: true, @@ -13494,20 +15236,19 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "DocumentProperties", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeDocumentProperties, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); DocumentProperties.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["title", "subject", "author", "keywords", "comments", "category", "format", "manager", "company"], [], [ - "customProperties", "customProperties" ]); }; DocumentProperties.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; DocumentProperties.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13516,64 +15257,72 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["ApplicationName"])) { - this.m_applicationName=obj["ApplicationName"]; + this._A=obj["ApplicationName"]; } if (!_isUndefined(obj["Author"])) { - this.m_author=obj["Author"]; + this._Au=obj["Author"]; } if (!_isUndefined(obj["Category"])) { - this.m_category=obj["Category"]; + this._C=obj["Category"]; } if (!_isUndefined(obj["Comments"])) { - this.m_comments=obj["Comments"]; + this._Co=obj["Comments"]; } if (!_isUndefined(obj["Company"])) { - this.m_company=obj["Company"]; + this._Com=obj["Company"]; } if (!_isUndefined(obj["CreationDate"])) { - this.m_creationDate=_adjustToDateTime(obj["CreationDate"]); + this._Cr=_adjustToDateTime(obj["CreationDate"]); } if (!_isUndefined(obj["Format"])) { - this.m_format=obj["Format"]; + this._F=obj["Format"]; } if (!_isUndefined(obj["Keywords"])) { - this.m_keywords=obj["Keywords"]; + this._K=obj["Keywords"]; } if (!_isUndefined(obj["LastAuthor"])) { - this.m_lastAuthor=obj["LastAuthor"]; + this._L=obj["LastAuthor"]; } if (!_isUndefined(obj["LastPrintDate"])) { - this.m_lastPrintDate=_adjustToDateTime(obj["LastPrintDate"]); + this._La=_adjustToDateTime(obj["LastPrintDate"]); } if (!_isUndefined(obj["LastSaveTime"])) { - this.m_lastSaveTime=_adjustToDateTime(obj["LastSaveTime"]); + this._Las=_adjustToDateTime(obj["LastSaveTime"]); } if (!_isUndefined(obj["Manager"])) { - this.m_manager=obj["Manager"]; + this._M=obj["Manager"]; } if (!_isUndefined(obj["RevisionNumber"])) { - this.m_revisionNumber=obj["RevisionNumber"]; + this._R=obj["RevisionNumber"]; } if (!_isUndefined(obj["Security"])) { - this.m_security=obj["Security"]; + this._S=obj["Security"]; } if (!_isUndefined(obj["Subject"])) { - this.m_subject=obj["Subject"]; + this._Su=obj["Subject"]; } if (!_isUndefined(obj["Template"])) { - this.m_template=obj["Template"]; + this._T=obj["Template"]; } if (!_isUndefined(obj["Title"])) { - this.m_title=obj["Title"]; + this._Ti=obj["Title"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["customProperties", "CustomProperties"]); }; DocumentProperties.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + DocumentProperties.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + DocumentProperties.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + DocumentProperties.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; DocumentProperties.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -13581,7 +15330,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; DocumentProperties.prototype.track=function () { @@ -13593,33 +15342,40 @@ var Word; return this; }; DocumentProperties.prototype.toJSON=function () { - return { - "applicationName": this.m_applicationName, - "author": this.m_author, - "category": this.m_category, - "comments": this.m_comments, - "company": this.m_company, - "creationDate": this.m_creationDate, - "format": this.m_format, - "keywords": this.m_keywords, - "lastAuthor": this.m_lastAuthor, - "lastPrintDate": this.m_lastPrintDate, - "lastSaveTime": this.m_lastSaveTime, - "manager": this.m_manager, - "revisionNumber": this.m_revisionNumber, - "security": this.m_security, - "subject": this.m_subject, - "template": this.m_template, - "title": this.m_title - }; + return _toJson(this, { + "applicationName": this._A, + "author": this._Au, + "category": this._C, + "comments": this._Co, + "company": this._Com, + "creationDate": this._Cr, + "format": this._F, + "keywords": this._K, + "lastAuthor": this._L, + "lastPrintDate": this._La, + "lastSaveTime": this._Las, + "manager": this._M, + "revisionNumber": this._R, + "security": this._S, + "subject": this._Su, + "template": this._T, + "title": this._Ti, + }, { + "customProperties": this._Cu, + }); + }; + DocumentProperties.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return DocumentProperties; }(OfficeExtension.ClientObject)); Word.DocumentProperties=DocumentProperties; + var _typeFont="Font"; var Font=(function (_super) { __extends(Font, _super); function Font() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Font.prototype, "_className", { get: function () { @@ -13630,11 +15386,11 @@ var Word; }); Object.defineProperty(Font.prototype, "bold", { get: function () { - _throwIfNotLoaded("bold", this.m_bold, "Font", this._isNull); - return this.m_bold; + _throwIfNotLoaded("bold", this._B, _typeFont, this._isNull); + return this._B; }, set: function (value) { - this.m_bold=value; + this._B=value; _createSetPropertyAction(this.context, this, "Bold", value); }, enumerable: true, @@ -13642,11 +15398,11 @@ var Word; }); Object.defineProperty(Font.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "Font", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeFont, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -13654,11 +15410,11 @@ var Word; }); Object.defineProperty(Font.prototype, "doubleStrikeThrough", { get: function () { - _throwIfNotLoaded("doubleStrikeThrough", this.m_doubleStrikeThrough, "Font", this._isNull); - return this.m_doubleStrikeThrough; + _throwIfNotLoaded("doubleStrikeThrough", this._D, _typeFont, this._isNull); + return this._D; }, set: function (value) { - this.m_doubleStrikeThrough=value; + this._D=value; _createSetPropertyAction(this.context, this, "DoubleStrikeThrough", value); }, enumerable: true, @@ -13666,11 +15422,11 @@ var Word; }); Object.defineProperty(Font.prototype, "highlightColor", { get: function () { - _throwIfNotLoaded("highlightColor", this.m_highlightColor, "Font", this._isNull); - return this.m_highlightColor; + _throwIfNotLoaded("highlightColor", this._H, _typeFont, this._isNull); + return this._H; }, set: function (value) { - this.m_highlightColor=value; + this._H=value; _createSetPropertyAction(this.context, this, "HighlightColor", value); }, enumerable: true, @@ -13678,11 +15434,11 @@ var Word; }); Object.defineProperty(Font.prototype, "italic", { get: function () { - _throwIfNotLoaded("italic", this.m_italic, "Font", this._isNull); - return this.m_italic; + _throwIfNotLoaded("italic", this._I, _typeFont, this._isNull); + return this._I; }, set: function (value) { - this.m_italic=value; + this._I=value; _createSetPropertyAction(this.context, this, "Italic", value); }, enumerable: true, @@ -13690,11 +15446,11 @@ var Word; }); Object.defineProperty(Font.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "Font", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeFont, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -13702,11 +15458,11 @@ var Word; }); Object.defineProperty(Font.prototype, "size", { get: function () { - _throwIfNotLoaded("size", this.m_size, "Font", this._isNull); - return this.m_size; + _throwIfNotLoaded("size", this._S, _typeFont, this._isNull); + return this._S; }, set: function (value) { - this.m_size=value; + this._S=value; _createSetPropertyAction(this.context, this, "Size", value); }, enumerable: true, @@ -13714,11 +15470,11 @@ var Word; }); Object.defineProperty(Font.prototype, "strikeThrough", { get: function () { - _throwIfNotLoaded("strikeThrough", this.m_strikeThrough, "Font", this._isNull); - return this.m_strikeThrough; + _throwIfNotLoaded("strikeThrough", this._St, _typeFont, this._isNull); + return this._St; }, set: function (value) { - this.m_strikeThrough=value; + this._St=value; _createSetPropertyAction(this.context, this, "StrikeThrough", value); }, enumerable: true, @@ -13726,11 +15482,11 @@ var Word; }); Object.defineProperty(Font.prototype, "subscript", { get: function () { - _throwIfNotLoaded("subscript", this.m_subscript, "Font", this._isNull); - return this.m_subscript; + _throwIfNotLoaded("subscript", this._Su, _typeFont, this._isNull); + return this._Su; }, set: function (value) { - this.m_subscript=value; + this._Su=value; _createSetPropertyAction(this.context, this, "Subscript", value); }, enumerable: true, @@ -13738,11 +15494,11 @@ var Word; }); Object.defineProperty(Font.prototype, "superscript", { get: function () { - _throwIfNotLoaded("superscript", this.m_superscript, "Font", this._isNull); - return this.m_superscript; + _throwIfNotLoaded("superscript", this._Sup, _typeFont, this._isNull); + return this._Sup; }, set: function (value) { - this.m_superscript=value; + this._Sup=value; _createSetPropertyAction(this.context, this, "Superscript", value); }, enumerable: true, @@ -13750,11 +15506,11 @@ var Word; }); Object.defineProperty(Font.prototype, "underline", { get: function () { - _throwIfNotLoaded("underline", this.m_underline, "Font", this._isNull); - return this.m_underline; + _throwIfNotLoaded("underline", this._U, _typeFont, this._isNull); + return this._U; }, set: function (value) { - this.m_underline=value; + this._U=value; _createSetPropertyAction(this.context, this, "Underline", value); }, enumerable: true, @@ -13762,8 +15518,8 @@ var Word; }); Object.defineProperty(Font.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Font", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeFont, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -13772,7 +15528,7 @@ var Word; this._recursivelySet(properties, options, ["name", "size", "bold", "italic", "color", "underline", "subscript", "superscript", "strikeThrough", "doubleStrikeThrough", "highlightColor"], [], []); }; Font.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Font.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13781,45 +15537,53 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Bold"])) { - this.m_bold=obj["Bold"]; + this._B=obj["Bold"]; } if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["DoubleStrikeThrough"])) { - this.m_doubleStrikeThrough=obj["DoubleStrikeThrough"]; + this._D=obj["DoubleStrikeThrough"]; } if (!_isUndefined(obj["HighlightColor"])) { - this.m_highlightColor=obj["HighlightColor"]; + this._H=obj["HighlightColor"]; } if (!_isUndefined(obj["Italic"])) { - this.m_italic=obj["Italic"]; + this._I=obj["Italic"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Size"])) { - this.m_size=obj["Size"]; + this._S=obj["Size"]; } if (!_isUndefined(obj["StrikeThrough"])) { - this.m_strikeThrough=obj["StrikeThrough"]; + this._St=obj["StrikeThrough"]; } if (!_isUndefined(obj["Subscript"])) { - this.m_subscript=obj["Subscript"]; + this._Su=obj["Subscript"]; } if (!_isUndefined(obj["Superscript"])) { - this.m_superscript=obj["Superscript"]; + this._Sup=obj["Superscript"]; } if (!_isUndefined(obj["Underline"])) { - this.m_underline=obj["Underline"]; + this._U=obj["Underline"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } }; Font.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Font.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Font.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Font.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; Font.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -13827,7 +15591,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; Font.prototype.track=function () { @@ -13839,27 +15603,32 @@ var Word; return this; }; Font.prototype.toJSON=function () { - return { - "bold": this.m_bold, - "color": this.m_color, - "doubleStrikeThrough": this.m_doubleStrikeThrough, - "highlightColor": this.m_highlightColor, - "italic": this.m_italic, - "name": this.m_name, - "size": this.m_size, - "strikeThrough": this.m_strikeThrough, - "subscript": this.m_subscript, - "superscript": this.m_superscript, - "underline": this.m_underline - }; + return _toJson(this, { + "bold": this._B, + "color": this._C, + "doubleStrikeThrough": this._D, + "highlightColor": this._H, + "italic": this._I, + "name": this._N, + "size": this._S, + "strikeThrough": this._St, + "subscript": this._Su, + "superscript": this._Sup, + "underline": this._U, + }, {}); + }; + Font.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Font; }(OfficeExtension.ClientObject)); Word.Font=Font; + var _typeInlinePicture="InlinePicture"; var InlinePicture=(function (_super) { __extends(InlinePicture, _super); function InlinePicture() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(InlinePicture.prototype, "_className", { get: function () { @@ -13870,81 +15639,87 @@ var Word; }); Object.defineProperty(InlinePicture.prototype, "paragraph", { get: function () { - if (!this.m_paragraph) { - this.m_paragraph=new Word.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false)); + _throwIfApiNotSupported("InlinePicture.paragraph", _defaultApiSetName, "1.2", _hostName); + if (!this._P) { + this._P=new Word.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false, false)); } - return this.m_paragraph; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "parentContentControl", { get: function () { - if (!this.m_parentContentControl) { - this.m_parentContentControl=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false)); + if (!this._Pa) { + this._Pa=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false, false)); } - return this.m_parentContentControl; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "parentContentControlOrNullObject", { get: function () { - if (!this.m_parentContentControlOrNullObject) { - this.m_parentContentControlOrNullObject=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false)); + _throwIfApiNotSupported("InlinePicture.parentContentControlOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Par) { + this._Par=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false, false)); } - return this.m_parentContentControlOrNullObject; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + _throwIfApiNotSupported("InlinePicture.parentTable", _defaultApiSetName, "1.3", _hostName); + if (!this._Pare) { + this._Pare=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._Pare; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "parentTableCell", { get: function () { - if (!this.m_parentTableCell) { - this.m_parentTableCell=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false)); + _throwIfApiNotSupported("InlinePicture.parentTableCell", _defaultApiSetName, "1.3", _hostName); + if (!this._Paren) { + this._Paren=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false, false)); } - return this.m_parentTableCell; + return this._Paren; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "parentTableCellOrNullObject", { get: function () { - if (!this.m_parentTableCellOrNullObject) { - this.m_parentTableCellOrNullObject=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false)); + _throwIfApiNotSupported("InlinePicture.parentTableCellOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Parent) { + this._Parent=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false, false)); } - return this.m_parentTableCellOrNullObject; + return this._Parent; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "parentTableOrNullObject", { get: function () { - if (!this.m_parentTableOrNullObject) { - this.m_parentTableOrNullObject=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false)); + _throwIfApiNotSupported("InlinePicture.parentTableOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ParentT) { + this._ParentT=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false, false)); } - return this.m_parentTableOrNullObject; + return this._ParentT; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "altTextDescription", { get: function () { - _throwIfNotLoaded("altTextDescription", this.m_altTextDescription, "InlinePicture", this._isNull); - return this.m_altTextDescription; + _throwIfNotLoaded("altTextDescription", this._A, _typeInlinePicture, this._isNull); + return this._A; }, set: function (value) { - this.m_altTextDescription=value; + this._A=value; _createSetPropertyAction(this.context, this, "AltTextDescription", value); }, enumerable: true, @@ -13952,11 +15727,11 @@ var Word; }); Object.defineProperty(InlinePicture.prototype, "altTextTitle", { get: function () { - _throwIfNotLoaded("altTextTitle", this.m_altTextTitle, "InlinePicture", this._isNull); - return this.m_altTextTitle; + _throwIfNotLoaded("altTextTitle", this._Al, _typeInlinePicture, this._isNull); + return this._Al; }, set: function (value) { - this.m_altTextTitle=value; + this._Al=value; _createSetPropertyAction(this.context, this, "AltTextTitle", value); }, enumerable: true, @@ -13964,11 +15739,11 @@ var Word; }); Object.defineProperty(InlinePicture.prototype, "height", { get: function () { - _throwIfNotLoaded("height", this.m_height, "InlinePicture", this._isNull); - return this.m_height; + _throwIfNotLoaded("height", this._H, _typeInlinePicture, this._isNull); + return this._H; }, set: function (value) { - this.m_height=value; + this._H=value; _createSetPropertyAction(this.context, this, "Height", value); }, enumerable: true, @@ -13976,11 +15751,11 @@ var Word; }); Object.defineProperty(InlinePicture.prototype, "hyperlink", { get: function () { - _throwIfNotLoaded("hyperlink", this.m_hyperlink, "InlinePicture", this._isNull); - return this.m_hyperlink; + _throwIfNotLoaded("hyperlink", this._Hy, _typeInlinePicture, this._isNull); + return this._Hy; }, set: function (value) { - this.m_hyperlink=value; + this._Hy=value; _createSetPropertyAction(this.context, this, "Hyperlink", value); }, enumerable: true, @@ -13988,11 +15763,11 @@ var Word; }); Object.defineProperty(InlinePicture.prototype, "lockAspectRatio", { get: function () { - _throwIfNotLoaded("lockAspectRatio", this.m_lockAspectRatio, "InlinePicture", this._isNull); - return this.m_lockAspectRatio; + _throwIfNotLoaded("lockAspectRatio", this._L, _typeInlinePicture, this._isNull); + return this._L; }, set: function (value) { - this.m_lockAspectRatio=value; + this._L=value; _createSetPropertyAction(this.context, this, "LockAspectRatio", value); }, enumerable: true, @@ -14000,11 +15775,11 @@ var Word; }); Object.defineProperty(InlinePicture.prototype, "width", { get: function () { - _throwIfNotLoaded("width", this.m_width, "InlinePicture", this._isNull); - return this.m_width; + _throwIfNotLoaded("width", this._W, _typeInlinePicture, this._isNull); + return this._W; }, set: function (value) { - this.m_width=value; + this._W=value; _createSetPropertyAction(this.context, this, "Width", value); }, enumerable: true, @@ -14012,29 +15787,22 @@ var Word; }); Object.defineProperty(InlinePicture.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "InlinePicture", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeInlinePicture, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InlinePicture", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInlinePicture, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InlinePicture.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["altTextDescription", "altTextTitle", "height", "hyperlink", "lockAspectRatio", "width"], [], [ - "paragraph", - "parentContentControl", - "parentContentControlOrNullObject", - "parentTable", - "parentTableCell", - "parentTableCellOrNullObject", - "parentTableOrNullObject", "paragraph", "parentContentControl", "parentContentControlOrNullObject", @@ -14045,52 +15813,64 @@ var Word; ]); }; InlinePicture.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _throwIfApiNotSupported("InlinePicture.delete", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; InlinePicture.prototype.getBase64ImageSrc=function () { - var action=_createMethodAction(this.context, this, "GetBase64ImageSrc", 1, []); + var action=_createMethodAction(this.context, this, "GetBase64ImageSrc", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; InlinePicture.prototype.getNext=function () { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null)); + _throwIfApiNotSupported("InlinePicture.getNext", _defaultApiSetName, "1.3", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null, false)); }; InlinePicture.prototype.getNextOrNullObject=function () { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("InlinePicture.getNextOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null, false)); }; InlinePicture.prototype.getRange=function (rangeLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null)); + _throwIfApiNotSupported("InlinePicture.getRange", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null, false)); }; InlinePicture.prototype.insertBreak=function (breakType, insertLocation) { - _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation]); + _throwIfApiNotSupported("InlinePicture.insertBreak", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation], false); }; InlinePicture.prototype.insertContentControl=function () { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null)); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null, false)); }; InlinePicture.prototype.insertFileFromBase64=function (base64File, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null)); + _throwIfApiNotSupported("InlinePicture.insertFileFromBase64", _defaultApiSetName, "1.2", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null, false)); }; InlinePicture.prototype.insertHtml=function (html, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null)); + _throwIfApiNotSupported("InlinePicture.insertHtml", _defaultApiSetName, "1.2", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null, false)); }; InlinePicture.prototype.insertInlinePictureFromBase64=function (base64EncodedImage, insertLocation) { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null)); + _throwIfApiNotSupported("InlinePicture.insertInlinePictureFromBase64", _defaultApiSetName, "1.2", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null, false)); }; InlinePicture.prototype.insertOoxml=function (ooxml, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null)); + _throwIfApiNotSupported("InlinePicture.insertOoxml", _defaultApiSetName, "1.2", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null, false)); }; InlinePicture.prototype.insertParagraph=function (paragraphText, insertLocation) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null)); + _throwIfApiNotSupported("InlinePicture.insertParagraph", _defaultApiSetName, "1.2", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null, false)); }; InlinePicture.prototype.insertText=function (text, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null)); + _throwIfApiNotSupported("InlinePicture.insertText", _defaultApiSetName, "1.2", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null, false)); }; InlinePicture.prototype.select=function (selectionMode) { - _createMethodAction(this.context, this, "Select", 1, [selectionMode]); + _throwIfApiNotSupported("InlinePicture.select", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "Select", 1, [selectionMode], false); }; InlinePicture.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InlinePicture.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14099,34 +15879,42 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["AltTextDescription"])) { - this.m_altTextDescription=obj["AltTextDescription"]; + this._A=obj["AltTextDescription"]; } if (!_isUndefined(obj["AltTextTitle"])) { - this.m_altTextTitle=obj["AltTextTitle"]; + this._Al=obj["AltTextTitle"]; } if (!_isUndefined(obj["Height"])) { - this.m_height=obj["Height"]; + this._H=obj["Height"]; } if (!_isUndefined(obj["Hyperlink"])) { - this.m_hyperlink=obj["Hyperlink"]; + this._Hy=obj["Hyperlink"]; } if (!_isUndefined(obj["LockAspectRatio"])) { - this.m_lockAspectRatio=obj["LockAspectRatio"]; + this._L=obj["LockAspectRatio"]; } if (!_isUndefined(obj["Width"])) { - this.m_width=obj["Width"]; + this._W=obj["Width"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["paragraph", "Paragraph", "parentContentControl", "ParentContentControl", "parentContentControlOrNullObject", "ParentContentControlOrNullObject", "parentTable", "ParentTable", "parentTableCell", "ParentTableCell", "parentTableCellOrNullObject", "ParentTableCellOrNullObject", "parentTableOrNullObject", "ParentTableOrNullObject"]); }; InlinePicture.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + InlinePicture.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + InlinePicture.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + InlinePicture.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; InlinePicture.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -14134,10 +15922,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; InlinePicture.prototype.track=function () { @@ -14149,22 +15937,27 @@ var Word; return this; }; InlinePicture.prototype.toJSON=function () { - return { - "altTextDescription": this.m_altTextDescription, - "altTextTitle": this.m_altTextTitle, - "height": this.m_height, - "hyperlink": this.m_hyperlink, - "lockAspectRatio": this.m_lockAspectRatio, - "width": this.m_width - }; + return _toJson(this, { + "altTextDescription": this._A, + "altTextTitle": this._Al, + "height": this._H, + "hyperlink": this._Hy, + "lockAspectRatio": this._L, + "width": this._W, + }, {}); + }; + InlinePicture.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return InlinePicture; }(OfficeExtension.ClientObject)); Word.InlinePicture=InlinePicture; + var _typeInlinePictureCollection="InlinePictureCollection"; var InlinePictureCollection=(function (_super) { __extends(InlinePictureCollection, _super); function InlinePictureCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(InlinePictureCollection.prototype, "_className", { get: function () { @@ -14175,7 +15968,7 @@ var Word; }); Object.defineProperty(InlinePictureCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "InlinePictureCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeInlinePictureCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14183,23 +15976,25 @@ var Word; }); Object.defineProperty(InlinePictureCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InlinePictureCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInlinePictureCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InlinePictureCollection.prototype.getFirst=function () { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + _throwIfApiNotSupported("InlinePictureCollection.getFirst", _defaultApiSetName, "1.3", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; InlinePictureCollection.prototype.getFirstOrNullObject=function () { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("InlinePictureCollection.getFirstOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; InlinePictureCollection.prototype._GetItem=function (index) { return new Word.InlinePicture(this.context, _createIndexerObjectPath(this.context, this, [index])); }; InlinePictureCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InlinePictureCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14208,7 +16003,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14220,9 +16015,17 @@ var Word; } } }; - InlinePictureCollection.prototype.load=function (option) { - _load(this, option); - return this; + InlinePictureCollection.prototype.load=function (option) { + return _load(this, option); + }; + InlinePictureCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + InlinePictureCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + InlinePictureCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; InlinePictureCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -14230,7 +16033,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; InlinePictureCollection.prototype.track=function () { @@ -14242,15 +16045,16 @@ var Word; return this; }; InlinePictureCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return InlinePictureCollection; }(OfficeExtension.ClientObject)); Word.InlinePictureCollection=InlinePictureCollection; + var _typeList="List"; var List=(function (_super) { __extends(List, _super); function List() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(List.prototype, "_className", { get: function () { @@ -14261,75 +16065,75 @@ var Word; }); Object.defineProperty(List.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._P) { + this._P=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(List.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "List", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeList, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(List.prototype, "levelExistences", { get: function () { - _throwIfNotLoaded("levelExistences", this.m_levelExistences, "List", this._isNull); - return this.m_levelExistences; + _throwIfNotLoaded("levelExistences", this._L, _typeList, this._isNull); + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(List.prototype, "levelTypes", { get: function () { - _throwIfNotLoaded("levelTypes", this.m_levelTypes, "List", this._isNull); - return this.m_levelTypes; + _throwIfNotLoaded("levelTypes", this._Le, _typeList, this._isNull); + return this._Le; }, enumerable: true, configurable: true }); Object.defineProperty(List.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "List", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeList, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); List.prototype.getLevelParagraphs=function (level) { - return new Word.ParagraphCollection(this.context, _createMethodObjectPath(this.context, this, "GetLevelParagraphs", 1, [level], true, false, null)); + return new Word.ParagraphCollection(this.context, _createMethodObjectPath(this.context, this, "GetLevelParagraphs", 1, [level], true, false, null, false)); }; List.prototype.getLevelString=function (level) { - var action=_createMethodAction(this.context, this, "GetLevelString", 1, [level]); + var action=_createMethodAction(this.context, this, "GetLevelString", 1, [level], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; List.prototype.insertParagraph=function (paragraphText, insertLocation) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null, false)); }; List.prototype.setLevelAlignment=function (level, alignment) { - _createMethodAction(this.context, this, "SetLevelAlignment", 0, [level, alignment]); + _createMethodAction(this.context, this, "SetLevelAlignment", 0, [level, alignment], false); }; List.prototype.setLevelBullet=function (level, listBullet, charCode, fontName) { - _createMethodAction(this.context, this, "SetLevelBullet", 0, [level, listBullet, charCode, fontName]); + _createMethodAction(this.context, this, "SetLevelBullet", 0, [level, listBullet, charCode, fontName], false); }; List.prototype.setLevelIndents=function (level, textIndent, bulletNumberPictureIndent) { - _createMethodAction(this.context, this, "SetLevelIndents", 0, [level, textIndent, bulletNumberPictureIndent]); + _createMethodAction(this.context, this, "SetLevelIndents", 0, [level, textIndent, bulletNumberPictureIndent], false); }; List.prototype.setLevelNumbering=function (level, listNumbering, formatString) { - _createMethodAction(this.context, this, "SetLevelNumbering", 0, [level, listNumbering, formatString]); + _createMethodAction(this.context, this, "SetLevelNumbering", 0, [level, listNumbering, formatString], false); }; List.prototype.setLevelStartingNumber=function (level, startingNumber) { - _createMethodAction(this.context, this, "SetLevelStartingNumber", 0, [level, startingNumber]); + _createMethodAction(this.context, this, "SetLevelStartingNumber", 0, [level, startingNumber], false); }; List.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; List.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14338,22 +16142,30 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["LevelExistences"])) { - this.m_levelExistences=obj["LevelExistences"]; + this._L=obj["LevelExistences"]; } if (!_isUndefined(obj["LevelTypes"])) { - this.m_levelTypes=obj["LevelTypes"]; + this._Le=obj["LevelTypes"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["paragraphs", "Paragraphs"]); }; List.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + List.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + List.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + List.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; List.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -14361,10 +16173,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; List.prototype.track=function () { @@ -14376,19 +16188,26 @@ var Word; return this; }; List.prototype.toJSON=function () { - return { - "id": this.m_id, - "levelExistences": this.m_levelExistences, - "levelTypes": this.m_levelTypes - }; + return _toJson(this, { + "id": this._I, + "levelExistences": this._L, + "levelTypes": this._Le, + }, { + "paragraphs": this._P, + }); + }; + List.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return List; }(OfficeExtension.ClientObject)); Word.List=List; + var _typeListCollection="ListCollection"; var ListCollection=(function (_super) { __extends(ListCollection, _super); function ListCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ListCollection.prototype, "_className", { get: function () { @@ -14399,7 +16218,7 @@ var Word; }); Object.defineProperty(ListCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ListCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeListCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14407,29 +16226,29 @@ var Word; }); Object.defineProperty(ListCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "ListCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeListCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); ListCollection.prototype.getById=function (id) { - return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetById", 1, [id], false, false, null)); + return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetById", 1, [id], false, false, null, false)); }; ListCollection.prototype.getByIdOrNullObject=function (id) { - return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetByIdOrNullObject", 1, [id], false, false, null)); + return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetByIdOrNullObject", 1, [id], false, false, null, false)); }; ListCollection.prototype.getFirst=function () { - return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; ListCollection.prototype.getFirstOrNullObject=function () { - return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; ListCollection.prototype.getItem=function (index) { return new Word.List(this.context, _createIndexerObjectPath(this.context, this, [index])); }; ListCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; ListCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14438,7 +16257,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14451,8 +16270,16 @@ var Word; } }; ListCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ListCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ListCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ListCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; ListCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -14460,7 +16287,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; ListCollection.prototype.track=function () { @@ -14472,15 +16299,16 @@ var Word; return this; }; ListCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return ListCollection; }(OfficeExtension.ClientObject)); Word.ListCollection=ListCollection; + var _typeListItem="ListItem"; var ListItem=(function (_super) { __extends(ListItem, _super); function ListItem() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ListItem.prototype, "_className", { get: function () { @@ -14491,11 +16319,11 @@ var Word; }); Object.defineProperty(ListItem.prototype, "level", { get: function () { - _throwIfNotLoaded("level", this.m_level, "ListItem", this._isNull); - return this.m_level; + _throwIfNotLoaded("level", this._L, _typeListItem, this._isNull); + return this._L; }, set: function (value) { - this.m_level=value; + this._L=value; _createSetPropertyAction(this.context, this, "Level", value); }, enumerable: true, @@ -14503,24 +16331,24 @@ var Word; }); Object.defineProperty(ListItem.prototype, "listString", { get: function () { - _throwIfNotLoaded("listString", this.m_listString, "ListItem", this._isNull); - return this.m_listString; + _throwIfNotLoaded("listString", this._Li, _typeListItem, this._isNull); + return this._Li; }, enumerable: true, configurable: true }); Object.defineProperty(ListItem.prototype, "siblingIndex", { get: function () { - _throwIfNotLoaded("siblingIndex", this.m_siblingIndex, "ListItem", this._isNull); - return this.m_siblingIndex; + _throwIfNotLoaded("siblingIndex", this._S, _typeListItem, this._isNull); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(ListItem.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "ListItem", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeListItem, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -14529,16 +16357,16 @@ var Word; this._recursivelySet(properties, options, ["level"], [], []); }; ListItem.prototype.getAncestor=function (parentOnly) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetAncestor", 1, [parentOnly], false, false, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetAncestor", 1, [parentOnly], false, false, null, false)); }; ListItem.prototype.getAncestorOrNullObject=function (parentOnly) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetAncestorOrNullObject", 1, [parentOnly], false, false, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetAncestorOrNullObject", 1, [parentOnly], false, false, null, false)); }; ListItem.prototype.getDescendants=function (directChildrenOnly) { - return new Word.ParagraphCollection(this.context, _createMethodObjectPath(this.context, this, "GetDescendants", 1, [directChildrenOnly], true, false, null)); + return new Word.ParagraphCollection(this.context, _createMethodObjectPath(this.context, this, "GetDescendants", 1, [directChildrenOnly], true, false, null, false)); }; ListItem.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; ListItem.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14547,21 +16375,29 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Level"])) { - this.m_level=obj["Level"]; + this._L=obj["Level"]; } if (!_isUndefined(obj["ListString"])) { - this.m_listString=obj["ListString"]; + this._Li=obj["ListString"]; } if (!_isUndefined(obj["SiblingIndex"])) { - this.m_siblingIndex=obj["SiblingIndex"]; + this._S=obj["SiblingIndex"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } }; ListItem.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ListItem.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ListItem.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ListItem.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; ListItem.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -14569,7 +16405,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; ListItem.prototype.track=function () { @@ -14581,19 +16417,24 @@ var Word; return this; }; ListItem.prototype.toJSON=function () { - return { - "level": this.m_level, - "listString": this.m_listString, - "siblingIndex": this.m_siblingIndex - }; + return _toJson(this, { + "level": this._L, + "listString": this._Li, + "siblingIndex": this._S, + }, {}); + }; + ListItem.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ListItem; }(OfficeExtension.ClientObject)); Word.ListItem=ListItem; + var _typeParagraph="Paragraph"; var Paragraph=(function (_super) { __extends(Paragraph, _super); function Paragraph() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Paragraph.prototype, "_className", { get: function () { @@ -14604,151 +16445,161 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "contentControls", { get: function () { - if (!this.m_contentControls) { - this.m_contentControls=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false)); + if (!this._C) { + this._C=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false, false)); } - return this.m_contentControls; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "inlinePictures", { get: function () { - if (!this.m_inlinePictures) { - this.m_inlinePictures=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false)); + if (!this._I) { + this._I=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false, false)); } - return this.m_inlinePictures; + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "list", { get: function () { - if (!this.m_list) { - this.m_list=new Word.List(this.context, _createPropertyObjectPath(this.context, this, "List", false, false)); + _throwIfApiNotSupported("Paragraph.list", _defaultApiSetName, "1.3", _hostName); + if (!this._Lis) { + this._Lis=new Word.List(this.context, _createPropertyObjectPath(this.context, this, "List", false, false, false)); } - return this.m_list; + return this._Lis; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "listItem", { get: function () { - if (!this.m_listItem) { - this.m_listItem=new Word.ListItem(this.context, _createPropertyObjectPath(this.context, this, "ListItem", false, false)); + _throwIfApiNotSupported("Paragraph.listItem", _defaultApiSetName, "1.3", _hostName); + if (!this._List) { + this._List=new Word.ListItem(this.context, _createPropertyObjectPath(this.context, this, "ListItem", false, false, false)); } - return this.m_listItem; + return this._List; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "listItemOrNullObject", { get: function () { - if (!this.m_listItemOrNullObject) { - this.m_listItemOrNullObject=new Word.ListItem(this.context, _createPropertyObjectPath(this.context, this, "ListItemOrNullObject", false, false)); + _throwIfApiNotSupported("Paragraph.listItemOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ListI) { + this._ListI=new Word.ListItem(this.context, _createPropertyObjectPath(this.context, this, "ListItemOrNullObject", false, false, false)); } - return this.m_listItemOrNullObject; + return this._ListI; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "listOrNullObject", { get: function () { - if (!this.m_listOrNullObject) { - this.m_listOrNullObject=new Word.List(this.context, _createPropertyObjectPath(this.context, this, "ListOrNullObject", false, false)); + _throwIfApiNotSupported("Paragraph.listOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ListO) { + this._ListO=new Word.List(this.context, _createPropertyObjectPath(this.context, this, "ListOrNullObject", false, false, false)); } - return this.m_listOrNullObject; + return this._ListO; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentBody", { get: function () { - if (!this.m_parentBody) { - this.m_parentBody=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false)); + _throwIfApiNotSupported("Paragraph.parentBody", _defaultApiSetName, "1.3", _hostName); + if (!this._P) { + this._P=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false, false)); } - return this.m_parentBody; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentContentControl", { get: function () { - if (!this.m_parentContentControl) { - this.m_parentContentControl=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false)); + if (!this._Pa) { + this._Pa=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false, false)); } - return this.m_parentContentControl; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentContentControlOrNullObject", { get: function () { - if (!this.m_parentContentControlOrNullObject) { - this.m_parentContentControlOrNullObject=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false)); + _throwIfApiNotSupported("Paragraph.parentContentControlOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Par) { + this._Par=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false, false)); } - return this.m_parentContentControlOrNullObject; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + _throwIfApiNotSupported("Paragraph.parentTable", _defaultApiSetName, "1.3", _hostName); + if (!this._Pare) { + this._Pare=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._Pare; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentTableCell", { get: function () { - if (!this.m_parentTableCell) { - this.m_parentTableCell=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false)); + _throwIfApiNotSupported("Paragraph.parentTableCell", _defaultApiSetName, "1.3", _hostName); + if (!this._Paren) { + this._Paren=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false, false)); } - return this.m_parentTableCell; + return this._Paren; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentTableCellOrNullObject", { get: function () { - if (!this.m_parentTableCellOrNullObject) { - this.m_parentTableCellOrNullObject=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false)); + _throwIfApiNotSupported("Paragraph.parentTableCellOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Parent) { + this._Parent=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false, false)); } - return this.m_parentTableCellOrNullObject; + return this._Parent; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentTableOrNullObject", { get: function () { - if (!this.m_parentTableOrNullObject) { - this.m_parentTableOrNullObject=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false)); + _throwIfApiNotSupported("Paragraph.parentTableOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ParentT) { + this._ParentT=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false, false)); } - return this.m_parentTableOrNullObject; + return this._ParentT; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "alignment", { get: function () { - _throwIfNotLoaded("alignment", this.m_alignment, "Paragraph", this._isNull); - return this.m_alignment; + _throwIfNotLoaded("alignment", this._A, _typeParagraph, this._isNull); + return this._A; }, set: function (value) { - this.m_alignment=value; + this._A=value; _createSetPropertyAction(this.context, this, "Alignment", value); }, enumerable: true, @@ -14756,11 +16607,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "firstLineIndent", { get: function () { - _throwIfNotLoaded("firstLineIndent", this.m_firstLineIndent, "Paragraph", this._isNull); - return this.m_firstLineIndent; + _throwIfNotLoaded("firstLineIndent", this._F, _typeParagraph, this._isNull); + return this._F; }, set: function (value) { - this.m_firstLineIndent=value; + this._F=value; _createSetPropertyAction(this.context, this, "FirstLineIndent", value); }, enumerable: true, @@ -14768,27 +16619,29 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "isLastParagraph", { get: function () { - _throwIfNotLoaded("isLastParagraph", this.m_isLastParagraph, "Paragraph", this._isNull); - return this.m_isLastParagraph; + _throwIfNotLoaded("isLastParagraph", this._Is, _typeParagraph, this._isNull); + _throwIfApiNotSupported("Paragraph.isLastParagraph", _defaultApiSetName, "1.3", _hostName); + return this._Is; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "isListItem", { get: function () { - _throwIfNotLoaded("isListItem", this.m_isListItem, "Paragraph", this._isNull); - return this.m_isListItem; + _throwIfNotLoaded("isListItem", this._IsL, _typeParagraph, this._isNull); + _throwIfApiNotSupported("Paragraph.isListItem", _defaultApiSetName, "1.3", _hostName); + return this._IsL; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "leftIndent", { get: function () { - _throwIfNotLoaded("leftIndent", this.m_leftIndent, "Paragraph", this._isNull); - return this.m_leftIndent; + _throwIfNotLoaded("leftIndent", this._L, _typeParagraph, this._isNull); + return this._L; }, set: function (value) { - this.m_leftIndent=value; + this._L=value; _createSetPropertyAction(this.context, this, "LeftIndent", value); }, enumerable: true, @@ -14796,11 +16649,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "lineSpacing", { get: function () { - _throwIfNotLoaded("lineSpacing", this.m_lineSpacing, "Paragraph", this._isNull); - return this.m_lineSpacing; + _throwIfNotLoaded("lineSpacing", this._Li, _typeParagraph, this._isNull); + return this._Li; }, set: function (value) { - this.m_lineSpacing=value; + this._Li=value; _createSetPropertyAction(this.context, this, "LineSpacing", value); }, enumerable: true, @@ -14808,11 +16661,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "lineUnitAfter", { get: function () { - _throwIfNotLoaded("lineUnitAfter", this.m_lineUnitAfter, "Paragraph", this._isNull); - return this.m_lineUnitAfter; + _throwIfNotLoaded("lineUnitAfter", this._Lin, _typeParagraph, this._isNull); + return this._Lin; }, set: function (value) { - this.m_lineUnitAfter=value; + this._Lin=value; _createSetPropertyAction(this.context, this, "LineUnitAfter", value); }, enumerable: true, @@ -14820,11 +16673,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "lineUnitBefore", { get: function () { - _throwIfNotLoaded("lineUnitBefore", this.m_lineUnitBefore, "Paragraph", this._isNull); - return this.m_lineUnitBefore; + _throwIfNotLoaded("lineUnitBefore", this._Line, _typeParagraph, this._isNull); + return this._Line; }, set: function (value) { - this.m_lineUnitBefore=value; + this._Line=value; _createSetPropertyAction(this.context, this, "LineUnitBefore", value); }, enumerable: true, @@ -14832,11 +16685,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "outlineLevel", { get: function () { - _throwIfNotLoaded("outlineLevel", this.m_outlineLevel, "Paragraph", this._isNull); - return this.m_outlineLevel; + _throwIfNotLoaded("outlineLevel", this._O, _typeParagraph, this._isNull); + return this._O; }, set: function (value) { - this.m_outlineLevel=value; + this._O=value; _createSetPropertyAction(this.context, this, "OutlineLevel", value); }, enumerable: true, @@ -14844,11 +16697,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "rightIndent", { get: function () { - _throwIfNotLoaded("rightIndent", this.m_rightIndent, "Paragraph", this._isNull); - return this.m_rightIndent; + _throwIfNotLoaded("rightIndent", this._R, _typeParagraph, this._isNull); + return this._R; }, set: function (value) { - this.m_rightIndent=value; + this._R=value; _createSetPropertyAction(this.context, this, "RightIndent", value); }, enumerable: true, @@ -14856,11 +16709,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "spaceAfter", { get: function () { - _throwIfNotLoaded("spaceAfter", this.m_spaceAfter, "Paragraph", this._isNull); - return this.m_spaceAfter; + _throwIfNotLoaded("spaceAfter", this._S, _typeParagraph, this._isNull); + return this._S; }, set: function (value) { - this.m_spaceAfter=value; + this._S=value; _createSetPropertyAction(this.context, this, "SpaceAfter", value); }, enumerable: true, @@ -14868,11 +16721,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "spaceBefore", { get: function () { - _throwIfNotLoaded("spaceBefore", this.m_spaceBefore, "Paragraph", this._isNull); - return this.m_spaceBefore; + _throwIfNotLoaded("spaceBefore", this._Sp, _typeParagraph, this._isNull); + return this._Sp; }, set: function (value) { - this.m_spaceBefore=value; + this._Sp=value; _createSetPropertyAction(this.context, this, "SpaceBefore", value); }, enumerable: true, @@ -14880,11 +16733,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "Paragraph", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._St, _typeParagraph, this._isNull); + return this._St; }, set: function (value) { - this.m_style=value; + this._St=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -14892,11 +16745,12 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "styleBuiltIn", { get: function () { - _throwIfNotLoaded("styleBuiltIn", this.m_styleBuiltIn, "Paragraph", this._isNull); - return this.m_styleBuiltIn; + _throwIfNotLoaded("styleBuiltIn", this._Sty, _typeParagraph, this._isNull); + _throwIfApiNotSupported("Paragraph.styleBuiltIn", _defaultApiSetName, "1.3", _hostName); + return this._Sty; }, set: function (value) { - this.m_styleBuiltIn=value; + this._Sty=value; _createSetPropertyAction(this.context, this, "StyleBuiltIn", value); }, enumerable: true, @@ -14904,49 +16758,39 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "tableNestingLevel", { get: function () { - _throwIfNotLoaded("tableNestingLevel", this.m_tableNestingLevel, "Paragraph", this._isNull); - return this.m_tableNestingLevel; + _throwIfNotLoaded("tableNestingLevel", this._T, _typeParagraph, this._isNull); + _throwIfApiNotSupported("Paragraph.tableNestingLevel", _defaultApiSetName, "1.3", _hostName); + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "Paragraph", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._Te, _typeParagraph, this._isNull); + return this._Te; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "Paragraph", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeParagraph, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Paragraph", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeParagraph, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Paragraph.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["style", "alignment", "firstLineIndent", "leftIndent", "rightIndent", "lineSpacing", "outlineLevel", "spaceBefore", "spaceAfter", "lineUnitBefore", "lineUnitAfter", "styleBuiltIn"], ["font", "listItem", "listItemOrNullObject"], [ - "contentControls", - "inlinePictures", - "list", - "listOrNullObject", - "parentBody", - "parentContentControl", - "parentContentControlOrNullObject", - "parentTable", - "parentTableCell", - "parentTableCellOrNullObject", - "parentTableOrNullObject", "contentControls", "inlinePictures", "list", @@ -14961,89 +16805,109 @@ var Word; ]); }; Paragraph.prototype.attachToList=function (listId, level) { - return new Word.List(this.context, _createMethodObjectPath(this.context, this, "AttachToList", 0, [listId, level], false, false, null)); + _throwIfApiNotSupported("Paragraph.attachToList", _defaultApiSetName, "1.3", _hostName); + return new Word.List(this.context, _createMethodObjectPath(this.context, this, "AttachToList", 0, [listId, level], false, false, null, false)); }; Paragraph.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; Paragraph.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Paragraph.prototype.detachFromList=function () { - _createMethodAction(this.context, this, "DetachFromList", 0, []); + _throwIfApiNotSupported("Paragraph.detachFromList", _defaultApiSetName, "1.3", _hostName); + _createMethodAction(this.context, this, "DetachFromList", 0, [], false); }; Paragraph.prototype.getHtml=function () { - var action=_createMethodAction(this.context, this, "GetHtml", 1, []); + var action=_createMethodAction(this.context, this, "GetHtml", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Paragraph.prototype.getMetadata=function (propertyGUID) { + var action=_createMethodAction(this.context, this, "GetMetadata", 1, [propertyGUID], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Paragraph.prototype.getNext=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null)); + _throwIfApiNotSupported("Paragraph.getNext", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null, false)); }; Paragraph.prototype.getNextOrNullObject=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("Paragraph.getNextOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null, false)); }; Paragraph.prototype.getOoxml=function () { - var action=_createMethodAction(this.context, this, "GetOoxml", 1, []); + var action=_createMethodAction(this.context, this, "GetOoxml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Paragraph.prototype.getPrevious=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetPrevious", 1, [], false, false, null)); + _throwIfApiNotSupported("Paragraph.getPrevious", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetPrevious", 1, [], false, false, null, false)); }; Paragraph.prototype.getPreviousOrNullObject=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetPreviousOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("Paragraph.getPreviousOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetPreviousOrNullObject", 1, [], false, false, null, false)); }; Paragraph.prototype.getRange=function (rangeLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null)); + _throwIfApiNotSupported("Paragraph.getRange", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null, false)); }; Paragraph.prototype.getTextRanges=function (endingMarks, trimSpacing) { - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetTextRanges", 1, [endingMarks, trimSpacing], true, false, null)); + _throwIfApiNotSupported("Paragraph.getTextRanges", _defaultApiSetName, "1.3", _hostName); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetTextRanges", 1, [endingMarks, trimSpacing], true, false, null, false)); }; Paragraph.prototype.insertBreak=function (breakType, insertLocation) { - _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation]); + _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation], false); }; Paragraph.prototype.insertContentControl=function () { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null)); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null, false)); }; Paragraph.prototype.insertFileFromBase64=function (base64File, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null, false)); }; Paragraph.prototype.insertHtml=function (html, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null, false)); }; Paragraph.prototype.insertInlinePictureFromBase64=function (base64EncodedImage, insertLocation) { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null)); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null, false)); }; Paragraph.prototype.insertOoxml=function (ooxml, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null, false)); }; Paragraph.prototype.insertParagraph=function (paragraphText, insertLocation) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null, false)); }; Paragraph.prototype.insertTable=function (rowCount, columnCount, insertLocation, values) { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null)); + _throwIfApiNotSupported("Paragraph.insertTable", _defaultApiSetName, "1.3", _hostName); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null, false)); }; Paragraph.prototype.insertText=function (text, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null, false)); }; Paragraph.prototype.search=function (searchText, searchOptions) { searchOptions=_normalizeSearchOptions(this.context, searchOptions); - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null)); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null, false)); }; Paragraph.prototype.select=function (selectionMode) { - _createMethodAction(this.context, this, "Select", 1, [selectionMode]); + _createMethodAction(this.context, this, "Select", 1, [selectionMode], false); + }; + Paragraph.prototype.setMetadata=function (propertyGUID, propertyValue) { + _createMethodAction(this.context, this, "SetMetadata", 0, [propertyGUID, propertyValue], false); }; Paragraph.prototype.split=function (delimiters, trimDelimiters, trimSpacing) { - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Split", 1, [delimiters, trimDelimiters, trimSpacing], true, false, null)); + _throwIfApiNotSupported("Paragraph.split", _defaultApiSetName, "1.3", _hostName); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Split", 1, [delimiters, trimDelimiters, trimSpacing], true, false, null, false)); }; Paragraph.prototype.startNewList=function () { - return new Word.List(this.context, _createMethodObjectPath(this.context, this, "StartNewList", 0, [], false, false, null)); + _throwIfApiNotSupported("Paragraph.startNewList", _defaultApiSetName, "1.3", _hostName); + return new Word.List(this.context, _createMethodObjectPath(this.context, this, "StartNewList", 0, [], false, false, null, false)); }; Paragraph.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Paragraph.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15052,64 +16916,72 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Alignment"])) { - this.m_alignment=obj["Alignment"]; + this._A=obj["Alignment"]; } if (!_isUndefined(obj["FirstLineIndent"])) { - this.m_firstLineIndent=obj["FirstLineIndent"]; + this._F=obj["FirstLineIndent"]; } if (!_isUndefined(obj["IsLastParagraph"])) { - this.m_isLastParagraph=obj["IsLastParagraph"]; + this._Is=obj["IsLastParagraph"]; } if (!_isUndefined(obj["IsListItem"])) { - this.m_isListItem=obj["IsListItem"]; + this._IsL=obj["IsListItem"]; } if (!_isUndefined(obj["LeftIndent"])) { - this.m_leftIndent=obj["LeftIndent"]; + this._L=obj["LeftIndent"]; } if (!_isUndefined(obj["LineSpacing"])) { - this.m_lineSpacing=obj["LineSpacing"]; + this._Li=obj["LineSpacing"]; } if (!_isUndefined(obj["LineUnitAfter"])) { - this.m_lineUnitAfter=obj["LineUnitAfter"]; + this._Lin=obj["LineUnitAfter"]; } if (!_isUndefined(obj["LineUnitBefore"])) { - this.m_lineUnitBefore=obj["LineUnitBefore"]; + this._Line=obj["LineUnitBefore"]; } if (!_isUndefined(obj["OutlineLevel"])) { - this.m_outlineLevel=obj["OutlineLevel"]; + this._O=obj["OutlineLevel"]; } if (!_isUndefined(obj["RightIndent"])) { - this.m_rightIndent=obj["RightIndent"]; + this._R=obj["RightIndent"]; } if (!_isUndefined(obj["SpaceAfter"])) { - this.m_spaceAfter=obj["SpaceAfter"]; + this._S=obj["SpaceAfter"]; } if (!_isUndefined(obj["SpaceBefore"])) { - this.m_spaceBefore=obj["SpaceBefore"]; + this._Sp=obj["SpaceBefore"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._St=obj["Style"]; } if (!_isUndefined(obj["StyleBuiltIn"])) { - this.m_styleBuiltIn=obj["StyleBuiltIn"]; + this._Sty=obj["StyleBuiltIn"]; } if (!_isUndefined(obj["TableNestingLevel"])) { - this.m_tableNestingLevel=obj["TableNestingLevel"]; + this._T=obj["TableNestingLevel"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._Te=obj["Text"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["contentControls", "ContentControls", "font", "Font", "inlinePictures", "InlinePictures", "list", "List", "listItem", "ListItem", "listItemOrNullObject", "ListItemOrNullObject", "listOrNullObject", "ListOrNullObject", "parentBody", "ParentBody", "parentContentControl", "ParentContentControl", "parentContentControlOrNullObject", "ParentContentControlOrNullObject", "parentTable", "ParentTable", "parentTableCell", "ParentTableCell", "parentTableCellOrNullObject", "ParentTableCellOrNullObject", "parentTableOrNullObject", "ParentTableOrNullObject"]); }; Paragraph.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Paragraph.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Paragraph.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Paragraph.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; Paragraph.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -15117,10 +16989,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; Paragraph.prototype.track=function () { @@ -15132,35 +17004,42 @@ var Word; return this; }; Paragraph.prototype.toJSON=function () { - return { - "alignment": this.m_alignment, - "firstLineIndent": this.m_firstLineIndent, - "font": this.m_font, - "isLastParagraph": this.m_isLastParagraph, - "isListItem": this.m_isListItem, - "leftIndent": this.m_leftIndent, - "lineSpacing": this.m_lineSpacing, - "lineUnitAfter": this.m_lineUnitAfter, - "lineUnitBefore": this.m_lineUnitBefore, - "listItem": this.m_listItem, - "listItemOrNullObject": this.m_listItemOrNullObject, - "outlineLevel": this.m_outlineLevel, - "rightIndent": this.m_rightIndent, - "spaceAfter": this.m_spaceAfter, - "spaceBefore": this.m_spaceBefore, - "style": this.m_style, - "styleBuiltIn": this.m_styleBuiltIn, - "tableNestingLevel": this.m_tableNestingLevel, - "text": this.m_text - }; + return _toJson(this, { + "alignment": this._A, + "firstLineIndent": this._F, + "isLastParagraph": this._Is, + "isListItem": this._IsL, + "leftIndent": this._L, + "lineSpacing": this._Li, + "lineUnitAfter": this._Lin, + "lineUnitBefore": this._Line, + "outlineLevel": this._O, + "rightIndent": this._R, + "spaceAfter": this._S, + "spaceBefore": this._Sp, + "style": this._St, + "styleBuiltIn": this._Sty, + "tableNestingLevel": this._T, + "text": this._Te, + }, { + "font": this._Fo, + "inlinePictures": this._I, + "listItem": this._List, + "listItemOrNullObject": this._ListI, + }); + }; + Paragraph.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Paragraph; }(OfficeExtension.ClientObject)); Word.Paragraph=Paragraph; + var _typeParagraphCollection="ParagraphCollection"; var ParagraphCollection=(function (_super) { __extends(ParagraphCollection, _super); function ParagraphCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ParagraphCollection.prototype, "_className", { get: function () { @@ -15171,7 +17050,7 @@ var Word; }); Object.defineProperty(ParagraphCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ParagraphCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeParagraphCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15179,29 +17058,33 @@ var Word; }); Object.defineProperty(ParagraphCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "ParagraphCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeParagraphCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); ParagraphCollection.prototype.getFirst=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + _throwIfApiNotSupported("ParagraphCollection.getFirst", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; ParagraphCollection.prototype.getFirstOrNullObject=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("ParagraphCollection.getFirstOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; ParagraphCollection.prototype.getLast=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetLast", 1, [], false, false, null)); + _throwIfApiNotSupported("ParagraphCollection.getLast", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetLast", 1, [], false, false, null, false)); }; ParagraphCollection.prototype.getLastOrNullObject=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetLastOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("ParagraphCollection.getLastOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetLastOrNullObject", 1, [], false, false, null, false)); }; ParagraphCollection.prototype._GetItem=function (index) { return new Word.Paragraph(this.context, _createIndexerObjectPath(this.context, this, [index])); }; ParagraphCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; ParagraphCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15210,7 +17093,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15223,8 +17106,16 @@ var Word; } }; ParagraphCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ParagraphCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ParagraphCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ParagraphCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; ParagraphCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -15232,7 +17123,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; ParagraphCollection.prototype.track=function () { @@ -15244,15 +17135,16 @@ var Word; return this; }; ParagraphCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return ParagraphCollection; }(OfficeExtension.ClientObject)); Word.ParagraphCollection=ParagraphCollection; + var _typeRange="Range"; var Range=(function (_super) { __extends(Range, _super); function Range() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Range.prototype, "_className", { get: function () { @@ -15263,141 +17155,151 @@ var Word; }); Object.defineProperty(Range.prototype, "contentControls", { get: function () { - if (!this.m_contentControls) { - this.m_contentControls=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false)); + if (!this._C) { + this._C=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false, false)); } - return this.m_contentControls; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._F) { + this._F=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "inlinePictures", { get: function () { - if (!this.m_inlinePictures) { - this.m_inlinePictures=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false)); + _throwIfApiNotSupported("Range.inlinePictures", _defaultApiSetName, "1.2", _hostName); + if (!this._I) { + this._I=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false, false)); } - return this.m_inlinePictures; + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "lists", { get: function () { - if (!this.m_lists) { - this.m_lists=new Word.ListCollection(this.context, _createPropertyObjectPath(this.context, this, "Lists", true, false)); + _throwIfApiNotSupported("Range.lists", _defaultApiSetName, "1.3", _hostName); + if (!this._L) { + this._L=new Word.ListCollection(this.context, _createPropertyObjectPath(this.context, this, "Lists", true, false, false)); } - return this.m_lists; + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._P) { + this._P=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "parentBody", { get: function () { - if (!this.m_parentBody) { - this.m_parentBody=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false)); + _throwIfApiNotSupported("Range.parentBody", _defaultApiSetName, "1.3", _hostName); + if (!this._Pa) { + this._Pa=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false, false)); } - return this.m_parentBody; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "parentContentControl", { get: function () { - if (!this.m_parentContentControl) { - this.m_parentContentControl=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false)); + if (!this._Par) { + this._Par=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false, false)); } - return this.m_parentContentControl; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "parentContentControlOrNullObject", { get: function () { - if (!this.m_parentContentControlOrNullObject) { - this.m_parentContentControlOrNullObject=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false)); + _throwIfApiNotSupported("Range.parentContentControlOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Pare) { + this._Pare=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false, false)); } - return this.m_parentContentControlOrNullObject; + return this._Pare; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + _throwIfApiNotSupported("Range.parentTable", _defaultApiSetName, "1.3", _hostName); + if (!this._Paren) { + this._Paren=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._Paren; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "parentTableCell", { get: function () { - if (!this.m_parentTableCell) { - this.m_parentTableCell=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false)); + _throwIfApiNotSupported("Range.parentTableCell", _defaultApiSetName, "1.3", _hostName); + if (!this._Parent) { + this._Parent=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false, false)); } - return this.m_parentTableCell; + return this._Parent; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "parentTableCellOrNullObject", { get: function () { - if (!this.m_parentTableCellOrNullObject) { - this.m_parentTableCellOrNullObject=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false)); + _throwIfApiNotSupported("Range.parentTableCellOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ParentT) { + this._ParentT=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false, false)); } - return this.m_parentTableCellOrNullObject; + return this._ParentT; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "parentTableOrNullObject", { get: function () { - if (!this.m_parentTableOrNullObject) { - this.m_parentTableOrNullObject=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false)); + _throwIfApiNotSupported("Range.parentTableOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ParentTa) { + this._ParentTa=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false, false)); } - return this.m_parentTableOrNullObject; + return this._ParentTa; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "tables", { get: function () { - if (!this.m_tables) { - this.m_tables=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false)); + _throwIfApiNotSupported("Range.tables", _defaultApiSetName, "1.3", _hostName); + if (!this._T) { + this._T=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false, false)); } - return this.m_tables; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "hyperlink", { get: function () { - _throwIfNotLoaded("hyperlink", this.m_hyperlink, "Range", this._isNull); - return this.m_hyperlink; + _throwIfNotLoaded("hyperlink", this._H, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.hyperlink", _defaultApiSetName, "1.3", _hostName); + return this._H; }, set: function (value) { - this.m_hyperlink=value; + this._H=value; _createSetPropertyAction(this.context, this, "Hyperlink", value); }, enumerable: true, @@ -15405,19 +17307,20 @@ var Word; }); Object.defineProperty(Range.prototype, "isEmpty", { get: function () { - _throwIfNotLoaded("isEmpty", this.m_isEmpty, "Range", this._isNull); - return this.m_isEmpty; + _throwIfNotLoaded("isEmpty", this._Is, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.isEmpty", _defaultApiSetName, "1.3", _hostName); + return this._Is; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "Range", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._S, _typeRange, this._isNull); + return this._S; }, set: function (value) { - this.m_style=value; + this._S=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -15425,11 +17328,12 @@ var Word; }); Object.defineProperty(Range.prototype, "styleBuiltIn", { get: function () { - _throwIfNotLoaded("styleBuiltIn", this.m_styleBuiltIn, "Range", this._isNull); - return this.m_styleBuiltIn; + _throwIfNotLoaded("styleBuiltIn", this._St, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.styleBuiltIn", _defaultApiSetName, "1.3", _hostName); + return this._St; }, set: function (value) { - this.m_styleBuiltIn=value; + this._St=value; _createSetPropertyAction(this.context, this, "StyleBuiltIn", value); }, enumerable: true, @@ -15437,42 +17341,30 @@ var Word; }); Object.defineProperty(Range.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "Range", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._Te, _typeRange, this._isNull); + return this._Te; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "Range", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeRange, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Range", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeRange, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Range.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["style", "hyperlink", "styleBuiltIn"], ["font"], [ - "contentControls", - "inlinePictures", - "lists", - "paragraphs", - "parentBody", - "parentContentControl", - "parentContentControlOrNullObject", - "parentTable", - "parentTableCell", - "parentTableCellOrNullObject", - "parentTableOrNullObject", - "tables", "contentControls", "inlinePictures", "lists", @@ -15488,95 +17380,108 @@ var Word; ]); }; Range.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; Range.prototype.compareLocationWith=function (range) { - var action=_createMethodAction(this.context, this, "CompareLocationWith", 1, [range]); + _throwIfApiNotSupported("Range.compareLocationWith", _defaultApiSetName, "1.3", _hostName); + var action=_createMethodAction(this.context, this, "CompareLocationWith", 1, [range], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Range.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Range.prototype.expandTo=function (range) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "ExpandTo", 0, [range], false, false, null)); + _throwIfApiNotSupported("Range.expandTo", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "ExpandTo", 0, [range], false, false, null, false)); }; Range.prototype.expandToOrNullObject=function (range) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "ExpandToOrNullObject", 0, [range], false, false, null)); + _throwIfApiNotSupported("Range.expandToOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "ExpandToOrNullObject", 0, [range], false, false, null, false)); }; Range.prototype.getHtml=function () { - var action=_createMethodAction(this.context, this, "GetHtml", 1, []); + var action=_createMethodAction(this.context, this, "GetHtml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Range.prototype.getHyperlinkRanges=function () { - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetHyperlinkRanges", 1, [], true, false, null)); + _throwIfApiNotSupported("Range.getHyperlinkRanges", _defaultApiSetName, "1.3", _hostName); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetHyperlinkRanges", 1, [], true, false, null, false)); }; Range.prototype.getNextTextRange=function (endingMarks, trimSpacing) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetNextTextRange", 1, [endingMarks, trimSpacing], false, false, null)); + _throwIfApiNotSupported("Range.getNextTextRange", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetNextTextRange", 1, [endingMarks, trimSpacing], false, false, null, false)); }; Range.prototype.getNextTextRangeOrNullObject=function (endingMarks, trimSpacing) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetNextTextRangeOrNullObject", 1, [endingMarks, trimSpacing], false, false, null)); + _throwIfApiNotSupported("Range.getNextTextRangeOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetNextTextRangeOrNullObject", 1, [endingMarks, trimSpacing], false, false, null, false)); }; Range.prototype.getOoxml=function () { - var action=_createMethodAction(this.context, this, "GetOoxml", 1, []); + var action=_createMethodAction(this.context, this, "GetOoxml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Range.prototype.getRange=function (rangeLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null)); + _throwIfApiNotSupported("Range.getRange", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null, false)); }; Range.prototype.getTextRanges=function (endingMarks, trimSpacing) { - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetTextRanges", 1, [endingMarks, trimSpacing], true, false, null)); + _throwIfApiNotSupported("Range.getTextRanges", _defaultApiSetName, "1.3", _hostName); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetTextRanges", 1, [endingMarks, trimSpacing], true, false, null, false)); }; Range.prototype.insertBreak=function (breakType, insertLocation) { - _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation]); + _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation], false); }; Range.prototype.insertContentControl=function () { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null)); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null, false)); }; Range.prototype.insertFileFromBase64=function (base64File, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null, false)); }; Range.prototype.insertHtml=function (html, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null, false)); }; Range.prototype.insertInlinePictureFromBase64=function (base64EncodedImage, insertLocation) { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null)); + _throwIfApiNotSupported("Range.insertInlinePictureFromBase64", _defaultApiSetName, "1.2", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null, false)); }; Range.prototype.insertOoxml=function (ooxml, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null, false)); }; Range.prototype.insertParagraph=function (paragraphText, insertLocation) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null, false)); }; Range.prototype.insertTable=function (rowCount, columnCount, insertLocation, values) { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null)); + _throwIfApiNotSupported("Range.insertTable", _defaultApiSetName, "1.3", _hostName); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null, false)); }; Range.prototype.insertText=function (text, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null, false)); }; Range.prototype.intersectWith=function (range) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "IntersectWith", 0, [range], false, false, null)); + _throwIfApiNotSupported("Range.intersectWith", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "IntersectWith", 0, [range], false, false, null, false)); }; Range.prototype.intersectWithOrNullObject=function (range) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "IntersectWithOrNullObject", 0, [range], false, false, null)); + _throwIfApiNotSupported("Range.intersectWithOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "IntersectWithOrNullObject", 0, [range], false, false, null, false)); }; Range.prototype.search=function (searchText, searchOptions) { searchOptions=_normalizeSearchOptions(this.context, searchOptions); - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null)); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null, false)); }; Range.prototype.select=function (selectionMode) { - _createMethodAction(this.context, this, "Select", 1, [selectionMode]); + _createMethodAction(this.context, this, "Select", 1, [selectionMode], false); }; Range.prototype.split=function (delimiters, multiParagraphs, trimDelimiters, trimSpacing) { - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Split", 1, [delimiters, multiParagraphs, trimDelimiters, trimSpacing], true, false, null)); + _throwIfApiNotSupported("Range.split", _defaultApiSetName, "1.3", _hostName); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Split", 1, [delimiters, multiParagraphs, trimDelimiters, trimSpacing], true, false, null, false)); }; Range.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Range.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15585,31 +17490,39 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Hyperlink"])) { - this.m_hyperlink=obj["Hyperlink"]; + this._H=obj["Hyperlink"]; } if (!_isUndefined(obj["IsEmpty"])) { - this.m_isEmpty=obj["IsEmpty"]; + this._Is=obj["IsEmpty"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._S=obj["Style"]; } if (!_isUndefined(obj["StyleBuiltIn"])) { - this.m_styleBuiltIn=obj["StyleBuiltIn"]; + this._St=obj["StyleBuiltIn"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._Te=obj["Text"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["contentControls", "ContentControls", "font", "Font", "inlinePictures", "InlinePictures", "lists", "Lists", "paragraphs", "Paragraphs", "parentBody", "ParentBody", "parentContentControl", "ParentContentControl", "parentContentControlOrNullObject", "ParentContentControlOrNullObject", "parentTable", "ParentTable", "parentTableCell", "ParentTableCell", "parentTableCellOrNullObject", "ParentTableCellOrNullObject", "parentTableOrNullObject", "ParentTableOrNullObject", "tables", "Tables"]); }; Range.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Range.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Range.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Range.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; Range.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -15617,10 +17530,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; Range.prototype.track=function () { @@ -15632,22 +17545,29 @@ var Word; return this; }; Range.prototype.toJSON=function () { - return { - "font": this.m_font, - "hyperlink": this.m_hyperlink, - "isEmpty": this.m_isEmpty, - "style": this.m_style, - "styleBuiltIn": this.m_styleBuiltIn, - "text": this.m_text - }; + return _toJson(this, { + "hyperlink": this._H, + "isEmpty": this._Is, + "style": this._S, + "styleBuiltIn": this._St, + "text": this._Te, + }, { + "font": this._F, + "inlinePictures": this._I, + }); + }; + Range.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Range; }(OfficeExtension.ClientObject)); Word.Range=Range; + var _typeRangeCollection="RangeCollection"; var RangeCollection=(function (_super) { __extends(RangeCollection, _super); function RangeCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeCollection.prototype, "_className", { get: function () { @@ -15658,7 +17578,7 @@ var Word; }); Object.defineProperty(RangeCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "RangeCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeRangeCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15666,23 +17586,25 @@ var Word; }); Object.defineProperty(RangeCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "RangeCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeRangeCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); RangeCollection.prototype.getFirst=function () { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + _throwIfApiNotSupported("RangeCollection.getFirst", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; RangeCollection.prototype.getFirstOrNullObject=function () { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("RangeCollection.getFirstOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; RangeCollection.prototype._GetItem=function (index) { return new Word.Range(this.context, _createIndexerObjectPath(this.context, this, [index])); }; RangeCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; RangeCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15691,7 +17613,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15704,8 +17626,16 @@ var Word; } }; RangeCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + RangeCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; RangeCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -15713,7 +17643,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; RangeCollection.prototype.track=function () { @@ -15725,15 +17655,16 @@ var Word; return this; }; RangeCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return RangeCollection; }(OfficeExtension.ClientObject)); Word.RangeCollection=RangeCollection; + var _typeSearchOptions="SearchOptions"; var SearchOptions=(function (_super) { __extends(SearchOptions, _super); function SearchOptions() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(SearchOptions.prototype, "_className", { get: function () { @@ -15756,11 +17687,11 @@ var Word; }); Object.defineProperty(SearchOptions.prototype, "ignorePunct", { get: function () { - _throwIfNotLoaded("ignorePunct", this.m_ignorePunct, "SearchOptions", this._isNull); - return this.m_ignorePunct; + _throwIfNotLoaded("ignorePunct", this._I, _typeSearchOptions, this._isNull); + return this._I; }, set: function (value) { - this.m_ignorePunct=value; + this._I=value; _createSetPropertyAction(this.context, this, "IgnorePunct", value); }, enumerable: true, @@ -15768,11 +17699,11 @@ var Word; }); Object.defineProperty(SearchOptions.prototype, "ignoreSpace", { get: function () { - _throwIfNotLoaded("ignoreSpace", this.m_ignoreSpace, "SearchOptions", this._isNull); - return this.m_ignoreSpace; + _throwIfNotLoaded("ignoreSpace", this._Ig, _typeSearchOptions, this._isNull); + return this._Ig; }, set: function (value) { - this.m_ignoreSpace=value; + this._Ig=value; _createSetPropertyAction(this.context, this, "IgnoreSpace", value); }, enumerable: true, @@ -15780,11 +17711,11 @@ var Word; }); Object.defineProperty(SearchOptions.prototype, "matchCase", { get: function () { - _throwIfNotLoaded("matchCase", this.m_matchCase, "SearchOptions", this._isNull); - return this.m_matchCase; + _throwIfNotLoaded("matchCase", this._M, _typeSearchOptions, this._isNull); + return this._M; }, set: function (value) { - this.m_matchCase=value; + this._M=value; _createSetPropertyAction(this.context, this, "MatchCase", value); }, enumerable: true, @@ -15792,11 +17723,11 @@ var Word; }); Object.defineProperty(SearchOptions.prototype, "matchPrefix", { get: function () { - _throwIfNotLoaded("matchPrefix", this.m_matchPrefix, "SearchOptions", this._isNull); - return this.m_matchPrefix; + _throwIfNotLoaded("matchPrefix", this._Ma, _typeSearchOptions, this._isNull); + return this._Ma; }, set: function (value) { - this.m_matchPrefix=value; + this._Ma=value; _createSetPropertyAction(this.context, this, "MatchPrefix", value); }, enumerable: true, @@ -15804,11 +17735,11 @@ var Word; }); Object.defineProperty(SearchOptions.prototype, "matchSuffix", { get: function () { - _throwIfNotLoaded("matchSuffix", this.m_matchSuffix, "SearchOptions", this._isNull); - return this.m_matchSuffix; + _throwIfNotLoaded("matchSuffix", this._Mat, _typeSearchOptions, this._isNull); + return this._Mat; }, set: function (value) { - this.m_matchSuffix=value; + this._Mat=value; _createSetPropertyAction(this.context, this, "MatchSuffix", value); }, enumerable: true, @@ -15816,11 +17747,11 @@ var Word; }); Object.defineProperty(SearchOptions.prototype, "matchWholeWord", { get: function () { - _throwIfNotLoaded("matchWholeWord", this.m_matchWholeWord, "SearchOptions", this._isNull); - return this.m_matchWholeWord; + _throwIfNotLoaded("matchWholeWord", this._Matc, _typeSearchOptions, this._isNull); + return this._Matc; }, set: function (value) { - this.m_matchWholeWord=value; + this._Matc=value; _createSetPropertyAction(this.context, this, "MatchWholeWord", value); }, enumerable: true, @@ -15828,7 +17759,7 @@ var Word; }); Object.defineProperty(SearchOptions.prototype, "matchWildcards", { get: function () { - _throwIfNotLoaded("matchWildcards", this.m_matchWildcards, "SearchOptions", this._isNull); + _throwIfNotLoaded("matchWildcards", this.m_matchWildcards, _typeSearchOptions, this._isNull); return this.m_matchWildcards; }, set: function (value) { @@ -15848,53 +17779,66 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["IgnorePunct"])) { - this.m_ignorePunct=obj["IgnorePunct"]; + this._I=obj["IgnorePunct"]; } if (!_isUndefined(obj["IgnoreSpace"])) { - this.m_ignoreSpace=obj["IgnoreSpace"]; + this._Ig=obj["IgnoreSpace"]; } if (!_isUndefined(obj["MatchCase"])) { - this.m_matchCase=obj["MatchCase"]; + this._M=obj["MatchCase"]; } if (!_isUndefined(obj["MatchPrefix"])) { - this.m_matchPrefix=obj["MatchPrefix"]; + this._Ma=obj["MatchPrefix"]; } if (!_isUndefined(obj["MatchSuffix"])) { - this.m_matchSuffix=obj["MatchSuffix"]; + this._Mat=obj["MatchSuffix"]; } if (!_isUndefined(obj["MatchWholeWord"])) { - this.m_matchWholeWord=obj["MatchWholeWord"]; + this._Matc=obj["MatchWholeWord"]; } if (!_isUndefined(obj["MatchWildcards"])) { this.m_matchWildcards=obj["MatchWildcards"]; } }; SearchOptions.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + SearchOptions.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + SearchOptions.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + SearchOptions.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; SearchOptions.newObject=function (context) { - var ret=new Word.SearchOptions(context, _createNewObjectObjectPath(context, "Microsoft.WordServices.SearchOptions", false)); + var ret=new Word.SearchOptions(context, _createNewObjectObjectPath(context, "Microsoft.WordServices.SearchOptions", false, false)); return ret; }; SearchOptions.prototype.toJSON=function () { - return { - "ignorePunct": this.m_ignorePunct, - "ignoreSpace": this.m_ignoreSpace, - "matchCase": this.m_matchCase, - "matchPrefix": this.m_matchPrefix, - "matchSuffix": this.m_matchSuffix, - "matchWholeWord": this.m_matchWholeWord, - "matchWildcards": this.m_matchWildcards - }; + return _toJson(this, { + "ignorePunct": this._I, + "ignoreSpace": this._Ig, + "matchCase": this._M, + "matchPrefix": this._Ma, + "matchSuffix": this._Mat, + "matchWholeWord": this._Matc, + "matchWildcards": this.m_matchWildcards, + }, {}); + }; + SearchOptions.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return SearchOptions; }(OfficeExtension.ClientObject)); Word.SearchOptions=SearchOptions; + var _typeSection="Section"; var Section=(function (_super) { __extends(Section, _super); function Section() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Section.prototype, "_className", { get: function () { @@ -15905,26 +17849,26 @@ var Word; }); Object.defineProperty(Section.prototype, "body", { get: function () { - if (!this.m_body) { - this.m_body=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "Body", false, false)); + if (!this._B) { + this._B=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "Body", false, false, false)); } - return this.m_body; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "Section", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeSection, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Section", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeSection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -15933,19 +17877,21 @@ var Word; this._recursivelySet(properties, options, [], ["body"], []); }; Section.prototype.getFooter=function (type) { - return new Word.Body(this.context, _createMethodObjectPath(this.context, this, "GetFooter", 1, [type], false, true, null)); + return new Word.Body(this.context, _createMethodObjectPath(this.context, this, "GetFooter", 1, [type], false, true, null, false)); }; Section.prototype.getHeader=function (type) { - return new Word.Body(this.context, _createMethodObjectPath(this.context, this, "GetHeader", 1, [type], false, true, null)); + return new Word.Body(this.context, _createMethodObjectPath(this.context, this, "GetHeader", 1, [type], false, true, null, false)); }; Section.prototype.getNext=function () { - return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null)); + _throwIfApiNotSupported("Section.getNext", _defaultApiSetName, "1.3", _hostName); + return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null, false)); }; Section.prototype.getNextOrNullObject=function () { - return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("Section.getNextOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null, false)); }; Section.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Section.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15954,16 +17900,24 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["body", "Body"]); }; Section.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Section.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Section.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Section.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; Section.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -15971,10 +17925,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; Section.prototype.track=function () { @@ -15986,17 +17940,22 @@ var Word; return this; }; Section.prototype.toJSON=function () { - return { - "body": this.m_body - }; + return _toJson(this, {}, { + "body": this._B, + }); + }; + Section.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Section; }(OfficeExtension.ClientObject)); Word.Section=Section; + var _typeSectionCollection="SectionCollection"; var SectionCollection=(function (_super) { __extends(SectionCollection, _super); function SectionCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(SectionCollection.prototype, "_className", { get: function () { @@ -16007,7 +17966,7 @@ var Word; }); Object.defineProperty(SectionCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "SectionCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeSectionCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -16015,23 +17974,25 @@ var Word; }); Object.defineProperty(SectionCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "SectionCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeSectionCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); SectionCollection.prototype.getFirst=function () { - return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + _throwIfApiNotSupported("SectionCollection.getFirst", _defaultApiSetName, "1.3", _hostName); + return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; SectionCollection.prototype.getFirstOrNullObject=function () { - return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("SectionCollection.getFirstOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; SectionCollection.prototype._GetItem=function (index) { return new Word.Section(this.context, _createIndexerObjectPath(this.context, this, [index])); }; SectionCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; SectionCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16040,7 +18001,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -16053,8 +18014,16 @@ var Word; } }; SectionCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + SectionCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + SectionCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + SectionCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; SectionCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -16062,7 +18031,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; SectionCollection.prototype.track=function () { @@ -16074,15 +18043,16 @@ var Word; return this; }; SectionCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return SectionCollection; }(OfficeExtension.ClientObject)); Word.SectionCollection=SectionCollection; + var _typeTable="Table"; var Table=(function (_super) { __extends(Table, _super); function Table() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Table.prototype, "_className", { get: function () { @@ -16093,111 +18063,111 @@ var Word; }); Object.defineProperty(Table.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._F) { + this._F=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "parentBody", { get: function () { - if (!this.m_parentBody) { - this.m_parentBody=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false)); + if (!this._P) { + this._P=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false, false)); } - return this.m_parentBody; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "parentContentControl", { get: function () { - if (!this.m_parentContentControl) { - this.m_parentContentControl=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false)); + if (!this._Pa) { + this._Pa=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false, false)); } - return this.m_parentContentControl; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "parentContentControlOrNullObject", { get: function () { - if (!this.m_parentContentControlOrNullObject) { - this.m_parentContentControlOrNullObject=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false)); + if (!this._Par) { + this._Par=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false, false)); } - return this.m_parentContentControlOrNullObject; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + if (!this._Pare) { + this._Pare=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._Pare; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "parentTableCell", { get: function () { - if (!this.m_parentTableCell) { - this.m_parentTableCell=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false)); + if (!this._Paren) { + this._Paren=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false, false)); } - return this.m_parentTableCell; + return this._Paren; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "parentTableCellOrNullObject", { get: function () { - if (!this.m_parentTableCellOrNullObject) { - this.m_parentTableCellOrNullObject=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false)); + if (!this._Parent) { + this._Parent=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false, false)); } - return this.m_parentTableCellOrNullObject; + return this._Parent; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "parentTableOrNullObject", { get: function () { - if (!this.m_parentTableOrNullObject) { - this.m_parentTableOrNullObject=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false)); + if (!this._ParentT) { + this._ParentT=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false, false)); } - return this.m_parentTableOrNullObject; + return this._ParentT; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "rows", { get: function () { - if (!this.m_rows) { - this.m_rows=new Word.TableRowCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false)); + if (!this._Ro) { + this._Ro=new Word.TableRowCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false, false)); } - return this.m_rows; + return this._Ro; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "tables", { get: function () { - if (!this.m_tables) { - this.m_tables=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false)); + if (!this._T) { + this._T=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false, false)); } - return this.m_tables; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "alignment", { get: function () { - _throwIfNotLoaded("alignment", this.m_alignment, "Table", this._isNull); - return this.m_alignment; + _throwIfNotLoaded("alignment", this._A, _typeTable, this._isNull); + return this._A; }, set: function (value) { - this.m_alignment=value; + this._A=value; _createSetPropertyAction(this.context, this, "Alignment", value); }, enumerable: true, @@ -16205,11 +18175,11 @@ var Word; }); Object.defineProperty(Table.prototype, "headerRowCount", { get: function () { - _throwIfNotLoaded("headerRowCount", this.m_headerRowCount, "Table", this._isNull); - return this.m_headerRowCount; + _throwIfNotLoaded("headerRowCount", this._H, _typeTable, this._isNull); + return this._H; }, set: function (value) { - this.m_headerRowCount=value; + this._H=value; _createSetPropertyAction(this.context, this, "HeaderRowCount", value); }, enumerable: true, @@ -16217,11 +18187,11 @@ var Word; }); Object.defineProperty(Table.prototype, "horizontalAlignment", { get: function () { - _throwIfNotLoaded("horizontalAlignment", this.m_horizontalAlignment, "Table", this._isNull); - return this.m_horizontalAlignment; + _throwIfNotLoaded("horizontalAlignment", this._Ho, _typeTable, this._isNull); + return this._Ho; }, set: function (value) { - this.m_horizontalAlignment=value; + this._Ho=value; _createSetPropertyAction(this.context, this, "HorizontalAlignment", value); }, enumerable: true, @@ -16229,35 +18199,35 @@ var Word; }); Object.defineProperty(Table.prototype, "isUniform", { get: function () { - _throwIfNotLoaded("isUniform", this.m_isUniform, "Table", this._isNull); - return this.m_isUniform; + _throwIfNotLoaded("isUniform", this._I, _typeTable, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "nestingLevel", { get: function () { - _throwIfNotLoaded("nestingLevel", this.m_nestingLevel, "Table", this._isNull); - return this.m_nestingLevel; + _throwIfNotLoaded("nestingLevel", this._N, _typeTable, this._isNull); + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "rowCount", { get: function () { - _throwIfNotLoaded("rowCount", this.m_rowCount, "Table", this._isNull); - return this.m_rowCount; + _throwIfNotLoaded("rowCount", this._R, _typeTable, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "shadingColor", { get: function () { - _throwIfNotLoaded("shadingColor", this.m_shadingColor, "Table", this._isNull); - return this.m_shadingColor; + _throwIfNotLoaded("shadingColor", this._S, _typeTable, this._isNull); + return this._S; }, set: function (value) { - this.m_shadingColor=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShadingColor", value); }, enumerable: true, @@ -16265,11 +18235,11 @@ var Word; }); Object.defineProperty(Table.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "Table", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._St, _typeTable, this._isNull); + return this._St; }, set: function (value) { - this.m_style=value; + this._St=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -16277,11 +18247,11 @@ var Word; }); Object.defineProperty(Table.prototype, "styleBandedColumns", { get: function () { - _throwIfNotLoaded("styleBandedColumns", this.m_styleBandedColumns, "Table", this._isNull); - return this.m_styleBandedColumns; + _throwIfNotLoaded("styleBandedColumns", this._Sty, _typeTable, this._isNull); + return this._Sty; }, set: function (value) { - this.m_styleBandedColumns=value; + this._Sty=value; _createSetPropertyAction(this.context, this, "StyleBandedColumns", value); }, enumerable: true, @@ -16289,11 +18259,11 @@ var Word; }); Object.defineProperty(Table.prototype, "styleBandedRows", { get: function () { - _throwIfNotLoaded("styleBandedRows", this.m_styleBandedRows, "Table", this._isNull); - return this.m_styleBandedRows; + _throwIfNotLoaded("styleBandedRows", this._Styl, _typeTable, this._isNull); + return this._Styl; }, set: function (value) { - this.m_styleBandedRows=value; + this._Styl=value; _createSetPropertyAction(this.context, this, "StyleBandedRows", value); }, enumerable: true, @@ -16301,11 +18271,11 @@ var Word; }); Object.defineProperty(Table.prototype, "styleBuiltIn", { get: function () { - _throwIfNotLoaded("styleBuiltIn", this.m_styleBuiltIn, "Table", this._isNull); - return this.m_styleBuiltIn; + _throwIfNotLoaded("styleBuiltIn", this._Style, _typeTable, this._isNull); + return this._Style; }, set: function (value) { - this.m_styleBuiltIn=value; + this._Style=value; _createSetPropertyAction(this.context, this, "StyleBuiltIn", value); }, enumerable: true, @@ -16313,11 +18283,11 @@ var Word; }); Object.defineProperty(Table.prototype, "styleFirstColumn", { get: function () { - _throwIfNotLoaded("styleFirstColumn", this.m_styleFirstColumn, "Table", this._isNull); - return this.m_styleFirstColumn; + _throwIfNotLoaded("styleFirstColumn", this._StyleF, _typeTable, this._isNull); + return this._StyleF; }, set: function (value) { - this.m_styleFirstColumn=value; + this._StyleF=value; _createSetPropertyAction(this.context, this, "StyleFirstColumn", value); }, enumerable: true, @@ -16325,11 +18295,11 @@ var Word; }); Object.defineProperty(Table.prototype, "styleLastColumn", { get: function () { - _throwIfNotLoaded("styleLastColumn", this.m_styleLastColumn, "Table", this._isNull); - return this.m_styleLastColumn; + _throwIfNotLoaded("styleLastColumn", this._StyleL, _typeTable, this._isNull); + return this._StyleL; }, set: function (value) { - this.m_styleLastColumn=value; + this._StyleL=value; _createSetPropertyAction(this.context, this, "StyleLastColumn", value); }, enumerable: true, @@ -16337,11 +18307,11 @@ var Word; }); Object.defineProperty(Table.prototype, "styleTotalRow", { get: function () { - _throwIfNotLoaded("styleTotalRow", this.m_styleTotalRow, "Table", this._isNull); - return this.m_styleTotalRow; + _throwIfNotLoaded("styleTotalRow", this._StyleT, _typeTable, this._isNull); + return this._StyleT; }, set: function (value) { - this.m_styleTotalRow=value; + this._StyleT=value; _createSetPropertyAction(this.context, this, "StyleTotalRow", value); }, enumerable: true, @@ -16349,11 +18319,11 @@ var Word; }); Object.defineProperty(Table.prototype, "values", { get: function () { - _throwIfNotLoaded("values", this.m_values, "Table", this._isNull); - return this.m_values; + _throwIfNotLoaded("values", this._V, _typeTable, this._isNull); + return this._V; }, set: function (value) { - this.m_values=value; + this._V=value; _createSetPropertyAction(this.context, this, "Values", value); }, enumerable: true, @@ -16361,11 +18331,11 @@ var Word; }); Object.defineProperty(Table.prototype, "verticalAlignment", { get: function () { - _throwIfNotLoaded("verticalAlignment", this.m_verticalAlignment, "Table", this._isNull); - return this.m_verticalAlignment; + _throwIfNotLoaded("verticalAlignment", this._Ve, _typeTable, this._isNull); + return this._Ve; }, set: function (value) { - this.m_verticalAlignment=value; + this._Ve=value; _createSetPropertyAction(this.context, this, "VerticalAlignment", value); }, enumerable: true, @@ -16373,11 +18343,11 @@ var Word; }); Object.defineProperty(Table.prototype, "width", { get: function () { - _throwIfNotLoaded("width", this.m_width, "Table", this._isNull); - return this.m_width; + _throwIfNotLoaded("width", this._W, _typeTable, this._isNull); + return this._W; }, set: function (value) { - this.m_width=value; + this._W=value; _createSetPropertyAction(this.context, this, "Width", value); }, enumerable: true, @@ -16385,31 +18355,22 @@ var Word; }); Object.defineProperty(Table.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "Table", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeTable, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Table", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTable, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Table.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["values", "style", "headerRowCount", "styleTotalRow", "styleFirstColumn", "styleLastColumn", "styleBandedRows", "styleBandedColumns", "shadingColor", "horizontalAlignment", "verticalAlignment", "width", "styleBuiltIn", "alignment"], ["font"], [ - "parentBody", - "parentContentControl", - "parentContentControlOrNullObject", - "parentTable", - "parentTableCell", - "parentTableCellOrNullObject", - "parentTableOrNullObject", - "rows", - "tables", "parentBody", "parentContentControl", "parentContentControlOrNullObject", @@ -16422,86 +18383,86 @@ var Word; ]); }; Table.prototype.addColumns=function (insertLocation, columnCount, values) { - _createMethodAction(this.context, this, "AddColumns", 0, [insertLocation, columnCount, values]); + _createMethodAction(this.context, this, "AddColumns", 0, [insertLocation, columnCount, values], false); }; Table.prototype.addRows=function (insertLocation, rowCount, values) { - return new Word.TableRowCollection(this.context, _createMethodObjectPath(this.context, this, "AddRows", 0, [insertLocation, rowCount, values], true, false, null)); + return new Word.TableRowCollection(this.context, _createMethodObjectPath(this.context, this, "AddRows", 0, [insertLocation, rowCount, values], true, false, null, false)); }; Table.prototype.autoFitWindow=function () { - _createMethodAction(this.context, this, "AutoFitWindow", 0, []); + _createMethodAction(this.context, this, "AutoFitWindow", 0, [], false); }; Table.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; Table.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Table.prototype.deleteColumns=function (columnIndex, columnCount) { - _createMethodAction(this.context, this, "DeleteColumns", 0, [columnIndex, columnCount]); + _createMethodAction(this.context, this, "DeleteColumns", 0, [columnIndex, columnCount], false); }; Table.prototype.deleteRows=function (rowIndex, rowCount) { - _createMethodAction(this.context, this, "DeleteRows", 0, [rowIndex, rowCount]); + _createMethodAction(this.context, this, "DeleteRows", 0, [rowIndex, rowCount], false); }; Table.prototype.distributeColumns=function () { - _createMethodAction(this.context, this, "DistributeColumns", 0, []); + _createMethodAction(this.context, this, "DistributeColumns", 0, [], false); }; Table.prototype.getBorder=function (borderLocation) { - return new Word.TableBorder(this.context, _createMethodObjectPath(this.context, this, "GetBorder", 1, [borderLocation], false, false, null)); + return new Word.TableBorder(this.context, _createMethodObjectPath(this.context, this, "GetBorder", 1, [borderLocation], false, false, null, false)); }; Table.prototype.getCell=function (rowIndex, cellIndex) { - return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [rowIndex, cellIndex], false, false, null)); + return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [rowIndex, cellIndex], false, false, null, false)); }; Table.prototype.getCellOrNullObject=function (rowIndex, cellIndex) { - return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetCellOrNullObject", 1, [rowIndex, cellIndex], false, false, null)); + return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetCellOrNullObject", 1, [rowIndex, cellIndex], false, false, null, false)); }; Table.prototype.getCellPadding=function (cellPaddingLocation) { - var action=_createMethodAction(this.context, this, "GetCellPadding", 1, [cellPaddingLocation]); + var action=_createMethodAction(this.context, this, "GetCellPadding", 1, [cellPaddingLocation], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Table.prototype.getNext=function () { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null)); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null, false)); }; Table.prototype.getNextOrNullObject=function () { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null)); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null, false)); }; Table.prototype.getParagraphAfter=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphAfter", 1, [], false, false, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphAfter", 1, [], false, false, null, false)); }; Table.prototype.getParagraphAfterOrNullObject=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphAfterOrNullObject", 1, [], false, false, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphAfterOrNullObject", 1, [], false, false, null, false)); }; Table.prototype.getParagraphBefore=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphBefore", 1, [], false, false, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphBefore", 1, [], false, false, null, false)); }; Table.prototype.getParagraphBeforeOrNullObject=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphBeforeOrNullObject", 1, [], false, false, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphBeforeOrNullObject", 1, [], false, false, null, false)); }; Table.prototype.getRange=function (rangeLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null, false)); }; Table.prototype.insertContentControl=function () { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null)); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null, false)); }; Table.prototype.insertParagraph=function (paragraphText, insertLocation) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null, false)); }; Table.prototype.insertTable=function (rowCount, columnCount, insertLocation, values) { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null)); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null, false)); }; Table.prototype.search=function (searchText, searchOptions) { searchOptions=_normalizeSearchOptions(this.context, searchOptions); - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null)); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null, false)); }; Table.prototype.select=function (selectionMode) { - _createMethodAction(this.context, this, "Select", 1, [selectionMode]); + _createMethodAction(this.context, this, "Select", 1, [selectionMode], false); }; Table.prototype.setCellPadding=function (cellPaddingLocation, cellPadding) { - _createMethodAction(this.context, this, "SetCellPadding", 0, [cellPaddingLocation, cellPadding]); + _createMethodAction(this.context, this, "SetCellPadding", 0, [cellPaddingLocation, cellPadding], false); }; Table.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Table.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16510,67 +18471,75 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Alignment"])) { - this.m_alignment=obj["Alignment"]; + this._A=obj["Alignment"]; } if (!_isUndefined(obj["HeaderRowCount"])) { - this.m_headerRowCount=obj["HeaderRowCount"]; + this._H=obj["HeaderRowCount"]; } if (!_isUndefined(obj["HorizontalAlignment"])) { - this.m_horizontalAlignment=obj["HorizontalAlignment"]; + this._Ho=obj["HorizontalAlignment"]; } if (!_isUndefined(obj["IsUniform"])) { - this.m_isUniform=obj["IsUniform"]; + this._I=obj["IsUniform"]; } if (!_isUndefined(obj["NestingLevel"])) { - this.m_nestingLevel=obj["NestingLevel"]; + this._N=obj["NestingLevel"]; } if (!_isUndefined(obj["RowCount"])) { - this.m_rowCount=obj["RowCount"]; + this._R=obj["RowCount"]; } if (!_isUndefined(obj["ShadingColor"])) { - this.m_shadingColor=obj["ShadingColor"]; + this._S=obj["ShadingColor"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._St=obj["Style"]; } if (!_isUndefined(obj["StyleBandedColumns"])) { - this.m_styleBandedColumns=obj["StyleBandedColumns"]; + this._Sty=obj["StyleBandedColumns"]; } if (!_isUndefined(obj["StyleBandedRows"])) { - this.m_styleBandedRows=obj["StyleBandedRows"]; + this._Styl=obj["StyleBandedRows"]; } if (!_isUndefined(obj["StyleBuiltIn"])) { - this.m_styleBuiltIn=obj["StyleBuiltIn"]; + this._Style=obj["StyleBuiltIn"]; } if (!_isUndefined(obj["StyleFirstColumn"])) { - this.m_styleFirstColumn=obj["StyleFirstColumn"]; + this._StyleF=obj["StyleFirstColumn"]; } if (!_isUndefined(obj["StyleLastColumn"])) { - this.m_styleLastColumn=obj["StyleLastColumn"]; + this._StyleL=obj["StyleLastColumn"]; } if (!_isUndefined(obj["StyleTotalRow"])) { - this.m_styleTotalRow=obj["StyleTotalRow"]; + this._StyleT=obj["StyleTotalRow"]; } if (!_isUndefined(obj["Values"])) { - this.m_values=obj["Values"]; + this._V=obj["Values"]; } if (!_isUndefined(obj["VerticalAlignment"])) { - this.m_verticalAlignment=obj["VerticalAlignment"]; + this._Ve=obj["VerticalAlignment"]; } if (!_isUndefined(obj["Width"])) { - this.m_width=obj["Width"]; + this._W=obj["Width"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["font", "Font", "parentBody", "ParentBody", "parentContentControl", "ParentContentControl", "parentContentControlOrNullObject", "ParentContentControlOrNullObject", "parentTable", "ParentTable", "parentTableCell", "ParentTableCell", "parentTableCellOrNullObject", "ParentTableCellOrNullObject", "parentTableOrNullObject", "ParentTableOrNullObject", "rows", "Rows", "tables", "Tables"]); }; Table.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Table.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Table.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Table.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; Table.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -16578,10 +18547,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; Table.prototype.track=function () { @@ -16593,34 +18562,42 @@ var Word; return this; }; Table.prototype.toJSON=function () { - return { - "alignment": this.m_alignment, - "font": this.m_font, - "headerRowCount": this.m_headerRowCount, - "horizontalAlignment": this.m_horizontalAlignment, - "isUniform": this.m_isUniform, - "nestingLevel": this.m_nestingLevel, - "rowCount": this.m_rowCount, - "shadingColor": this.m_shadingColor, - "style": this.m_style, - "styleBandedColumns": this.m_styleBandedColumns, - "styleBandedRows": this.m_styleBandedRows, - "styleBuiltIn": this.m_styleBuiltIn, - "styleFirstColumn": this.m_styleFirstColumn, - "styleLastColumn": this.m_styleLastColumn, - "styleTotalRow": this.m_styleTotalRow, - "values": this.m_values, - "verticalAlignment": this.m_verticalAlignment, - "width": this.m_width - }; + return _toJson(this, { + "alignment": this._A, + "headerRowCount": this._H, + "horizontalAlignment": this._Ho, + "isUniform": this._I, + "nestingLevel": this._N, + "rowCount": this._R, + "shadingColor": this._S, + "style": this._St, + "styleBandedColumns": this._Sty, + "styleBandedRows": this._Styl, + "styleBuiltIn": this._Style, + "styleFirstColumn": this._StyleF, + "styleLastColumn": this._StyleL, + "styleTotalRow": this._StyleT, + "values": this._V, + "verticalAlignment": this._Ve, + "width": this._W, + }, { + "font": this._F, + "rows": this._Ro, + "tables": this._T, + }); + }; + Table.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Table; }(OfficeExtension.ClientObject)); Word.Table=Table; + var _typeTableCollection="TableCollection"; var TableCollection=(function (_super) { __extends(TableCollection, _super); function TableCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableCollection.prototype, "_className", { get: function () { @@ -16631,7 +18608,7 @@ var Word; }); Object.defineProperty(TableCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -16639,23 +18616,23 @@ var Word; }); Object.defineProperty(TableCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); TableCollection.prototype.getFirst=function () { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; TableCollection.prototype.getFirstOrNullObject=function () { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; TableCollection.prototype._GetItem=function (index) { return new Word.Table(this.context, _createIndexerObjectPath(this.context, this, [index])); }; TableCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16664,7 +18641,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -16677,8 +18654,16 @@ var Word; } }; TableCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TableCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; TableCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -16686,7 +18671,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; TableCollection.prototype.track=function () { @@ -16698,15 +18683,16 @@ var Word; return this; }; TableCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return TableCollection; }(OfficeExtension.ClientObject)); Word.TableCollection=TableCollection; + var _typeTableRow="TableRow"; var TableRow=(function (_super) { __extends(TableRow, _super); function TableRow() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableRow.prototype, "_className", { get: function () { @@ -16717,49 +18703,49 @@ var Word; }); Object.defineProperty(TableRow.prototype, "cells", { get: function () { - if (!this.m_cells) { - this.m_cells=new Word.TableCellCollection(this.context, _createPropertyObjectPath(this.context, this, "Cells", true, false)); + if (!this._Ce) { + this._Ce=new Word.TableCellCollection(this.context, _createPropertyObjectPath(this.context, this, "Cells", true, false, false)); } - return this.m_cells; + return this._Ce; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._F) { + this._F=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + if (!this._P) { + this._P=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "cellCount", { get: function () { - _throwIfNotLoaded("cellCount", this.m_cellCount, "TableRow", this._isNull); - return this.m_cellCount; + _throwIfNotLoaded("cellCount", this._C, _typeTableRow, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "horizontalAlignment", { get: function () { - _throwIfNotLoaded("horizontalAlignment", this.m_horizontalAlignment, "TableRow", this._isNull); - return this.m_horizontalAlignment; + _throwIfNotLoaded("horizontalAlignment", this._H, _typeTableRow, this._isNull); + return this._H; }, set: function (value) { - this.m_horizontalAlignment=value; + this._H=value; _createSetPropertyAction(this.context, this, "HorizontalAlignment", value); }, enumerable: true, @@ -16767,19 +18753,19 @@ var Word; }); Object.defineProperty(TableRow.prototype, "isHeader", { get: function () { - _throwIfNotLoaded("isHeader", this.m_isHeader, "TableRow", this._isNull); - return this.m_isHeader; + _throwIfNotLoaded("isHeader", this._I, _typeTableRow, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "preferredHeight", { get: function () { - _throwIfNotLoaded("preferredHeight", this.m_preferredHeight, "TableRow", this._isNull); - return this.m_preferredHeight; + _throwIfNotLoaded("preferredHeight", this._Pr, _typeTableRow, this._isNull); + return this._Pr; }, set: function (value) { - this.m_preferredHeight=value; + this._Pr=value; _createSetPropertyAction(this.context, this, "PreferredHeight", value); }, enumerable: true, @@ -16787,19 +18773,19 @@ var Word; }); Object.defineProperty(TableRow.prototype, "rowIndex", { get: function () { - _throwIfNotLoaded("rowIndex", this.m_rowIndex, "TableRow", this._isNull); - return this.m_rowIndex; + _throwIfNotLoaded("rowIndex", this._R, _typeTableRow, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "shadingColor", { get: function () { - _throwIfNotLoaded("shadingColor", this.m_shadingColor, "TableRow", this._isNull); - return this.m_shadingColor; + _throwIfNotLoaded("shadingColor", this._S, _typeTableRow, this._isNull); + return this._S; }, set: function (value) { - this.m_shadingColor=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShadingColor", value); }, enumerable: true, @@ -16807,11 +18793,11 @@ var Word; }); Object.defineProperty(TableRow.prototype, "values", { get: function () { - _throwIfNotLoaded("values", this.m_values, "TableRow", this._isNull); - return this.m_values; + _throwIfNotLoaded("values", this._V, _typeTableRow, this._isNull); + return this._V; }, set: function (value) { - this.m_values=value; + this._V=value; _createSetPropertyAction(this.context, this, "Values", value); }, enumerable: true, @@ -16819,11 +18805,11 @@ var Word; }); Object.defineProperty(TableRow.prototype, "verticalAlignment", { get: function () { - _throwIfNotLoaded("verticalAlignment", this.m_verticalAlignment, "TableRow", this._isNull); - return this.m_verticalAlignment; + _throwIfNotLoaded("verticalAlignment", this._Ve, _typeTableRow, this._isNull); + return this._Ve; }, set: function (value) { - this.m_verticalAlignment=value; + this._Ve=value; _createSetPropertyAction(this.context, this, "VerticalAlignment", value); }, enumerable: true, @@ -16831,64 +18817,62 @@ var Word; }); Object.defineProperty(TableRow.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "TableRow", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeTableRow, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableRow", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableRow, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); TableRow.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["values", "shadingColor", "horizontalAlignment", "verticalAlignment", "preferredHeight"], ["font"], [ - "cells", - "parentTable", "cells", "parentTable" ]); }; TableRow.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; TableRow.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; TableRow.prototype.getBorder=function (borderLocation) { - return new Word.TableBorder(this.context, _createMethodObjectPath(this.context, this, "GetBorder", 1, [borderLocation], false, false, null)); + return new Word.TableBorder(this.context, _createMethodObjectPath(this.context, this, "GetBorder", 1, [borderLocation], false, false, null, false)); }; TableRow.prototype.getCellPadding=function (cellPaddingLocation) { - var action=_createMethodAction(this.context, this, "GetCellPadding", 1, [cellPaddingLocation]); + var action=_createMethodAction(this.context, this, "GetCellPadding", 1, [cellPaddingLocation], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; TableRow.prototype.getNext=function () { - return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null)); + return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null, false)); }; TableRow.prototype.getNextOrNullObject=function () { - return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null)); + return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null, false)); }; TableRow.prototype.insertRows=function (insertLocation, rowCount, values) { - return new Word.TableRowCollection(this.context, _createMethodObjectPath(this.context, this, "InsertRows", 1, [insertLocation, rowCount, values], true, false, null)); + return new Word.TableRowCollection(this.context, _createMethodObjectPath(this.context, this, "InsertRows", 1, [insertLocation, rowCount, values], true, false, null, false)); }; TableRow.prototype.search=function (searchText, searchOptions) { searchOptions=_normalizeSearchOptions(this.context, searchOptions); - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null)); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null, false)); }; TableRow.prototype.select=function (selectionMode) { - _createMethodAction(this.context, this, "Select", 1, [selectionMode]); + _createMethodAction(this.context, this, "Select", 1, [selectionMode], false); }; TableRow.prototype.setCellPadding=function (cellPaddingLocation, cellPadding) { - _createMethodAction(this.context, this, "SetCellPadding", 0, [cellPaddingLocation, cellPadding]); + _createMethodAction(this.context, this, "SetCellPadding", 0, [cellPaddingLocation, cellPadding], false); }; TableRow.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableRow.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16897,40 +18881,48 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["CellCount"])) { - this.m_cellCount=obj["CellCount"]; + this._C=obj["CellCount"]; } if (!_isUndefined(obj["HorizontalAlignment"])) { - this.m_horizontalAlignment=obj["HorizontalAlignment"]; + this._H=obj["HorizontalAlignment"]; } if (!_isUndefined(obj["IsHeader"])) { - this.m_isHeader=obj["IsHeader"]; + this._I=obj["IsHeader"]; } if (!_isUndefined(obj["PreferredHeight"])) { - this.m_preferredHeight=obj["PreferredHeight"]; + this._Pr=obj["PreferredHeight"]; } if (!_isUndefined(obj["RowIndex"])) { - this.m_rowIndex=obj["RowIndex"]; + this._R=obj["RowIndex"]; } if (!_isUndefined(obj["ShadingColor"])) { - this.m_shadingColor=obj["ShadingColor"]; + this._S=obj["ShadingColor"]; } if (!_isUndefined(obj["Values"])) { - this.m_values=obj["Values"]; + this._V=obj["Values"]; } if (!_isUndefined(obj["VerticalAlignment"])) { - this.m_verticalAlignment=obj["VerticalAlignment"]; + this._Ve=obj["VerticalAlignment"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["cells", "Cells", "font", "Font", "parentTable", "ParentTable"]); }; TableRow.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableRow.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TableRow.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableRow.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; TableRow.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -16938,10 +18930,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; TableRow.prototype.track=function () { @@ -16953,25 +18945,32 @@ var Word; return this; }; TableRow.prototype.toJSON=function () { - return { - "cellCount": this.m_cellCount, - "font": this.m_font, - "horizontalAlignment": this.m_horizontalAlignment, - "isHeader": this.m_isHeader, - "preferredHeight": this.m_preferredHeight, - "rowIndex": this.m_rowIndex, - "shadingColor": this.m_shadingColor, - "values": this.m_values, - "verticalAlignment": this.m_verticalAlignment - }; + return _toJson(this, { + "cellCount": this._C, + "horizontalAlignment": this._H, + "isHeader": this._I, + "preferredHeight": this._Pr, + "rowIndex": this._R, + "shadingColor": this._S, + "values": this._V, + "verticalAlignment": this._Ve, + }, { + "cells": this._Ce, + "font": this._F, + }); + }; + TableRow.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TableRow; }(OfficeExtension.ClientObject)); Word.TableRow=TableRow; + var _typeTableRowCollection="TableRowCollection"; var TableRowCollection=(function (_super) { __extends(TableRowCollection, _super); function TableRowCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableRowCollection.prototype, "_className", { get: function () { @@ -16982,7 +18981,7 @@ var Word; }); Object.defineProperty(TableRowCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableRowCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableRowCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -16990,23 +18989,23 @@ var Word; }); Object.defineProperty(TableRowCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableRowCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableRowCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); TableRowCollection.prototype.getFirst=function () { - return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; TableRowCollection.prototype.getFirstOrNullObject=function () { - return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; TableRowCollection.prototype._GetItem=function (index) { return new Word.TableRow(this.context, _createIndexerObjectPath(this.context, this, [index])); }; TableRowCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableRowCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17015,7 +19014,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -17028,8 +19027,16 @@ var Word; } }; TableRowCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableRowCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TableRowCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableRowCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; TableRowCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -17037,7 +19044,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; TableRowCollection.prototype.track=function () { @@ -17049,15 +19056,16 @@ var Word; return this; }; TableRowCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return TableRowCollection; }(OfficeExtension.ClientObject)); Word.TableRowCollection=TableRowCollection; + var _typeTableCell="TableCell"; var TableCell=(function (_super) { __extends(TableCell, _super); function TableCell() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableCell.prototype, "_className", { get: function () { @@ -17068,49 +19076,49 @@ var Word; }); Object.defineProperty(TableCell.prototype, "body", { get: function () { - if (!this.m_body) { - this.m_body=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "Body", false, false)); + if (!this._B) { + this._B=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "Body", false, false, false)); } - return this.m_body; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "parentRow", { get: function () { - if (!this.m_parentRow) { - this.m_parentRow=new Word.TableRow(this.context, _createPropertyObjectPath(this.context, this, "ParentRow", false, false)); + if (!this._P) { + this._P=new Word.TableRow(this.context, _createPropertyObjectPath(this.context, this, "ParentRow", false, false, false)); } - return this.m_parentRow; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + if (!this._Pa) { + this._Pa=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "cellIndex", { get: function () { - _throwIfNotLoaded("cellIndex", this.m_cellIndex, "TableCell", this._isNull); - return this.m_cellIndex; + _throwIfNotLoaded("cellIndex", this._C, _typeTableCell, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "columnWidth", { get: function () { - _throwIfNotLoaded("columnWidth", this.m_columnWidth, "TableCell", this._isNull); - return this.m_columnWidth; + _throwIfNotLoaded("columnWidth", this._Co, _typeTableCell, this._isNull); + return this._Co; }, set: function (value) { - this.m_columnWidth=value; + this._Co=value; _createSetPropertyAction(this.context, this, "ColumnWidth", value); }, enumerable: true, @@ -17118,11 +19126,11 @@ var Word; }); Object.defineProperty(TableCell.prototype, "horizontalAlignment", { get: function () { - _throwIfNotLoaded("horizontalAlignment", this.m_horizontalAlignment, "TableCell", this._isNull); - return this.m_horizontalAlignment; + _throwIfNotLoaded("horizontalAlignment", this._H, _typeTableCell, this._isNull); + return this._H; }, set: function (value) { - this.m_horizontalAlignment=value; + this._H=value; _createSetPropertyAction(this.context, this, "HorizontalAlignment", value); }, enumerable: true, @@ -17130,19 +19138,19 @@ var Word; }); Object.defineProperty(TableCell.prototype, "rowIndex", { get: function () { - _throwIfNotLoaded("rowIndex", this.m_rowIndex, "TableCell", this._isNull); - return this.m_rowIndex; + _throwIfNotLoaded("rowIndex", this._R, _typeTableCell, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "shadingColor", { get: function () { - _throwIfNotLoaded("shadingColor", this.m_shadingColor, "TableCell", this._isNull); - return this.m_shadingColor; + _throwIfNotLoaded("shadingColor", this._S, _typeTableCell, this._isNull); + return this._S; }, set: function (value) { - this.m_shadingColor=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShadingColor", value); }, enumerable: true, @@ -17150,11 +19158,11 @@ var Word; }); Object.defineProperty(TableCell.prototype, "value", { get: function () { - _throwIfNotLoaded("value", this.m_value, "TableCell", this._isNull); - return this.m_value; + _throwIfNotLoaded("value", this._V, _typeTableCell, this._isNull); + return this._V; }, set: function (value) { - this.m_value=value; + this._V=value; _createSetPropertyAction(this.context, this, "Value", value); }, enumerable: true, @@ -17162,11 +19170,11 @@ var Word; }); Object.defineProperty(TableCell.prototype, "verticalAlignment", { get: function () { - _throwIfNotLoaded("verticalAlignment", this.m_verticalAlignment, "TableCell", this._isNull); - return this.m_verticalAlignment; + _throwIfNotLoaded("verticalAlignment", this._Ve, _typeTableCell, this._isNull); + return this._Ve; }, set: function (value) { - this.m_verticalAlignment=value; + this._Ve=value; _createSetPropertyAction(this.context, this, "VerticalAlignment", value); }, enumerable: true, @@ -17174,68 +19182,66 @@ var Word; }); Object.defineProperty(TableCell.prototype, "width", { get: function () { - _throwIfNotLoaded("width", this.m_width, "TableCell", this._isNull); - return this.m_width; + _throwIfNotLoaded("width", this._W, _typeTableCell, this._isNull); + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "TableCell", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeTableCell, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableCell", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableCell, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); TableCell.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["value", "shadingColor", "horizontalAlignment", "verticalAlignment", "columnWidth"], ["body"], [ - "parentRow", - "parentTable", "parentRow", "parentTable" ]); }; TableCell.prototype.deleteColumn=function () { - _createMethodAction(this.context, this, "DeleteColumn", 0, []); + _createMethodAction(this.context, this, "DeleteColumn", 0, [], false); }; TableCell.prototype.deleteRow=function () { - _createMethodAction(this.context, this, "DeleteRow", 0, []); + _createMethodAction(this.context, this, "DeleteRow", 0, [], false); }; TableCell.prototype.getBorder=function (borderLocation) { - return new Word.TableBorder(this.context, _createMethodObjectPath(this.context, this, "GetBorder", 1, [borderLocation], false, false, null)); + return new Word.TableBorder(this.context, _createMethodObjectPath(this.context, this, "GetBorder", 1, [borderLocation], false, false, null, false)); }; TableCell.prototype.getCellPadding=function (cellPaddingLocation) { - var action=_createMethodAction(this.context, this, "GetCellPadding", 1, [cellPaddingLocation]); + var action=_createMethodAction(this.context, this, "GetCellPadding", 1, [cellPaddingLocation], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; TableCell.prototype.getNext=function () { - return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null)); + return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null, false)); }; TableCell.prototype.getNextOrNullObject=function () { - return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null)); + return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null, false)); }; TableCell.prototype.insertColumns=function (insertLocation, columnCount, values) { - _createMethodAction(this.context, this, "InsertColumns", 0, [insertLocation, columnCount, values]); + _createMethodAction(this.context, this, "InsertColumns", 0, [insertLocation, columnCount, values], false); }; TableCell.prototype.insertRows=function (insertLocation, rowCount, values) { - return new Word.TableRowCollection(this.context, _createMethodObjectPath(this.context, this, "InsertRows", 0, [insertLocation, rowCount, values], true, false, null)); + return new Word.TableRowCollection(this.context, _createMethodObjectPath(this.context, this, "InsertRows", 0, [insertLocation, rowCount, values], true, false, null, false)); }; TableCell.prototype.setCellPadding=function (cellPaddingLocation, cellPadding) { - _createMethodAction(this.context, this, "SetCellPadding", 0, [cellPaddingLocation, cellPadding]); + _createMethodAction(this.context, this, "SetCellPadding", 0, [cellPaddingLocation, cellPadding], false); }; TableCell.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableCell.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17244,40 +19250,48 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["CellIndex"])) { - this.m_cellIndex=obj["CellIndex"]; + this._C=obj["CellIndex"]; } if (!_isUndefined(obj["ColumnWidth"])) { - this.m_columnWidth=obj["ColumnWidth"]; + this._Co=obj["ColumnWidth"]; } if (!_isUndefined(obj["HorizontalAlignment"])) { - this.m_horizontalAlignment=obj["HorizontalAlignment"]; + this._H=obj["HorizontalAlignment"]; } if (!_isUndefined(obj["RowIndex"])) { - this.m_rowIndex=obj["RowIndex"]; + this._R=obj["RowIndex"]; } if (!_isUndefined(obj["ShadingColor"])) { - this.m_shadingColor=obj["ShadingColor"]; + this._S=obj["ShadingColor"]; } if (!_isUndefined(obj["Value"])) { - this.m_value=obj["Value"]; + this._V=obj["Value"]; } if (!_isUndefined(obj["VerticalAlignment"])) { - this.m_verticalAlignment=obj["VerticalAlignment"]; + this._Ve=obj["VerticalAlignment"]; } if (!_isUndefined(obj["Width"])) { - this.m_width=obj["Width"]; + this._W=obj["Width"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["body", "Body", "parentRow", "ParentRow", "parentTable", "ParentTable"]); }; TableCell.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableCell.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TableCell.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableCell.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; TableCell.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -17285,10 +19299,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; TableCell.prototype.track=function () { @@ -17300,25 +19314,31 @@ var Word; return this; }; TableCell.prototype.toJSON=function () { - return { - "body": this.m_body, - "cellIndex": this.m_cellIndex, - "columnWidth": this.m_columnWidth, - "horizontalAlignment": this.m_horizontalAlignment, - "rowIndex": this.m_rowIndex, - "shadingColor": this.m_shadingColor, - "value": this.m_value, - "verticalAlignment": this.m_verticalAlignment, - "width": this.m_width - }; + return _toJson(this, { + "cellIndex": this._C, + "columnWidth": this._Co, + "horizontalAlignment": this._H, + "rowIndex": this._R, + "shadingColor": this._S, + "value": this._V, + "verticalAlignment": this._Ve, + "width": this._W, + }, { + "body": this._B, + }); + }; + TableCell.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TableCell; }(OfficeExtension.ClientObject)); Word.TableCell=TableCell; + var _typeTableCellCollection="TableCellCollection"; var TableCellCollection=(function (_super) { __extends(TableCellCollection, _super); function TableCellCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableCellCollection.prototype, "_className", { get: function () { @@ -17329,7 +19349,7 @@ var Word; }); Object.defineProperty(TableCellCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableCellCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableCellCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -17337,23 +19357,23 @@ var Word; }); Object.defineProperty(TableCellCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableCellCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableCellCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); TableCellCollection.prototype.getFirst=function () { - return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; TableCellCollection.prototype.getFirstOrNullObject=function () { - return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; TableCellCollection.prototype._GetItem=function (index) { return new Word.TableCell(this.context, _createIndexerObjectPath(this.context, this, [index])); }; TableCellCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableCellCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17362,7 +19382,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -17375,8 +19395,16 @@ var Word; } }; TableCellCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableCellCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TableCellCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableCellCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; TableCellCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -17384,7 +19412,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; TableCellCollection.prototype.track=function () { @@ -17396,15 +19424,16 @@ var Word; return this; }; TableCellCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return TableCellCollection; }(OfficeExtension.ClientObject)); Word.TableCellCollection=TableCellCollection; + var _typeTableBorder="TableBorder"; var TableBorder=(function (_super) { __extends(TableBorder, _super); function TableBorder() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableBorder.prototype, "_className", { get: function () { @@ -17415,11 +19444,11 @@ var Word; }); Object.defineProperty(TableBorder.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "TableBorder", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeTableBorder, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -17427,11 +19456,11 @@ var Word; }); Object.defineProperty(TableBorder.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "TableBorder", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._T, _typeTableBorder, this._isNull); + return this._T; }, set: function (value) { - this.m_type=value; + this._T=value; _createSetPropertyAction(this.context, this, "Type", value); }, enumerable: true, @@ -17439,11 +19468,11 @@ var Word; }); Object.defineProperty(TableBorder.prototype, "width", { get: function () { - _throwIfNotLoaded("width", this.m_width, "TableBorder", this._isNull); - return this.m_width; + _throwIfNotLoaded("width", this._W, _typeTableBorder, this._isNull); + return this._W; }, set: function (value) { - this.m_width=value; + this._W=value; _createSetPropertyAction(this.context, this, "Width", value); }, enumerable: true, @@ -17451,8 +19480,8 @@ var Word; }); Object.defineProperty(TableBorder.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableBorder", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableBorder, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -17461,7 +19490,7 @@ var Word; this._recursivelySet(properties, options, ["color", "type", "width"], [], []); }; TableBorder.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableBorder.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17470,21 +19499,29 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._T=obj["Type"]; } if (!_isUndefined(obj["Width"])) { - this.m_width=obj["Width"]; + this._W=obj["Width"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } }; TableBorder.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableBorder.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TableBorder.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableBorder.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; TableBorder.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -17492,7 +19529,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; TableBorder.prototype.track=function () { @@ -17504,11 +19541,15 @@ var Word; return this; }; TableBorder.prototype.toJSON=function () { - return { - "color": this.m_color, - "type": this.m_type, - "width": this.m_width - }; + return _toJson(this, { + "color": this._C, + "type": this._T, + "width": this._W, + }, {}); + }; + TableBorder.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TableBorder; }(OfficeExtension.ClientObject)); @@ -17904,9 +19945,10 @@ var Word; var RequestContext=(function (_super) { __extends(RequestContext, _super); function RequestContext(url) { - _super.call(this, url); - this.m_document=new Word.Document(this, OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(this)); - this._rootObject=this.m_document; + var _this=_super.call(this, url) || this; + _this.m_document=new Word.Document(_this, OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(_this)); + _this._rootObject=_this.m_document; + return _this; } Object.defineProperty(RequestContext.prototype, "document", { get: function () { @@ -17916,7 +19958,7 @@ var Word; configurable: true }); return RequestContext; - }(OfficeExtension.ClientRequestContext)); + }(OfficeCore.RequestContext)); Word.RequestContext=RequestContext; function run(arg1, arg2) { return OfficeExtension.ClientRequestContext._runBatch("Word.run", arguments, function () { return new Word.RequestContext(); }); @@ -17924,4 +19966,6 @@ var Word; Word.run=run; })(Word || (Word={})); +OfficeExtension.Utility._doApiNotSupportedCheck=true; + diff --git a/node_modules/@microsoft/office-js/dist/word-ios-16.00.js b/node_modules/@microsoft/office-js/dist/word-ios-16.00.js index ad3b304..a7f3a77 100644 --- a/node_modules/@microsoft/office-js/dist/word-ios-16.00.js +++ b/node_modules/@microsoft/office-js/dist/word-ios-16.00.js @@ -1,7 +1,7 @@ /* Word iOS-specific API library */ -/* Version: 16.0.8117.3000 */ +/* Version: 16.0.8904.3000 */ -/* Office.js Version: 16.0.8118.1000 */ +/* Office.js Version: 16.0.8916.1000 */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ @@ -18,4 +18,4 @@ * @version 2.3.0 */ -var __extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},OsfMsAjaxFactory,OfficeExt,OSF,OSFWebkit,OSFLog,Logger,OSFAriaLogger,OSFAppTelemetry,OfficeExtension,Word;(function(n){var t=function(){function t(){}var n=!0;return t.prototype.isMsAjaxLoaded=function(){var t="function",i="undefined";return typeof Sys!==i&&typeof Type!==i&&Sys.StringBuilder&&typeof Sys.StringBuilder===t&&Type.registerNamespace&&typeof Type.registerNamespace===t&&Type.registerClass&&typeof Type.registerClass===t&&typeof Function._validateParams===t&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===t?n:!1},t.prototype.loadMsAjaxFull=function(n){var t=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,n)},Object.defineProperty(t.prototype,"msAjaxError",{get:function(){var n=this;return n._msAjaxError==null&&n.isMsAjaxLoaded()&&(n._msAjaxError=Error),n._msAjaxError},set:function(n){this._msAjaxError=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxString",{get:function(){var n=this;return n._msAjaxString==null&&n.isMsAjaxLoaded()&&(n._msAjaxString=String),n._msAjaxString},set:function(n){this._msAjaxString=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxDebug",{get:function(){var n=this;return n._msAjaxDebug==null&&n.isMsAjaxLoaded()&&(n._msAjaxDebug=Sys.Debug),n._msAjaxDebug},set:function(n){this._msAjaxDebug=n},enumerable:n,configurable:n}),t}();n.MicrosoftAjaxFactory=t})(OfficeExt||(OfficeExt={}));OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory;OSF=OSF||{},function(n){var t=function(){function n(n){this._internalStorage=n}return n.prototype.getItem=function(n){try{return this._internalStorage&&this._internalStorage.getItem(n)}catch(t){return null}},n.prototype.setItem=function(n,t){try{this._internalStorage&&this._internalStorage.setItem(n,t)}catch(i){}},n.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(n){}},n.prototype.removeItem=function(n){try{this._internalStorage&&this._internalStorage.removeItem(n)}catch(t){}},n.prototype.getKeysWithPrefix=function(n){var r=[],u,t,i;try{for(u=this._internalStorage&&this._internalStorage.length||0,t=0;t0?i.push(t):t.tabIndex===0&&r.push(t):r.push(t);return i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;return r===0&&(r=i.indexOf(n)-i.indexOf(t)),r}),[].concat(i,r)}var f="focus",e="on",b="configurable",k="writable",o="enumerable",s="undefined",i=!0,t=!1,c=2147483647,n=null,r=-1,l=r,d="&_xdm_Info=",g="&_serializer_version=",nt="_xdm_",ut="_serializer_version=",a="#",tt="&",h="class",v={},ft=3e4,y=n,p=n,u=(new Date).getTime();return{set_entropy:function(n){var t,r,i;if(typeof n=="string")for(t=0;t1?l[l.length-1]:n,s,h,c,a;return u&&o!=n&&(o.indexOf(tt)>=0&&(o=o.split(tt)[0]),o=decodeURIComponent(o)),s=w(),!f&&s&&(h=window.name.indexOf(i),h>r&&(c=window.name.indexOf(";",h),c==r&&(c=window.name.length),a=window.name.substring(h,c),o?s.setItem(a,o):o=s.getItem(a))),o},getConversationId:function(){var i=window.location.search,t=n,r;return i&&(r=i.indexOf("&"),t=r>0?i.substring(1,r):i.substr(1),t&&t.charAt(t.length-1)==="="&&(t=t.substring(0,t.length-1),t&&(t=decodeURIComponent(t)))),t},getInfoItems:function(n){var t=n.split("$");return typeof t[1]==s&&(t=n.split("|")),typeof t[1]==s&&(t=n.split("%7C")),t},getXdmFieldValue:function(n,t){var r="",u=OSF.OUtil.parseXdmInfo(t),i;if(u&&(i=OSF.OUtil.getInfoItems(u),i!=undefined&&i.length>=3))switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]),f;if(u)throw u;for(f in r)if(u=Function._validateParameter(n[f],r[f],f),u)throw u;},writeProfilerMark:function(n){window.msWriteProfilerMark&&(window.msWriteProfilerMark(n),OsfMsAjaxFactory.msAjaxDebug.trace(n))},outputDebug:function(n){typeof OsfMsAjaxFactory!==s&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){var e,f;r=r||{};for(e in u)f=u[e],r[f]==undefined&&(r[f]=i);return Object.defineProperty(n,t,r),n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[o])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[o])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[k,o,b])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[k,o,b])},finalizeProperties:function(n,r){var e,u;r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8,f=e&255,i[t++]=r>>2,i[t++]=(r&3)<<4|u>>4,i[t++]=(u&15)<<2|f>>6,i[t++]=f&63,isNaN(e)||(r=e>>8,u=s&255,f=s>>8,i[t++]=r>>2,i[t++]=(r&3)<<4|u>>4,i[t++]=(u&15)<<2|f>>6,i[t++]=f&63),isNaN(e)?i[t-1]=64:isNaN(s)&&(i[t-2]=64,i[t-1]=64),h=0;h0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){var u,i,f,r;if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(u=[],i=0;in)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=rt(u),o=e?u.length-1:0,u.length===0)return n;while(!h&&o>=0&&on)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=rt(u),l=y(u,e),s=v(u.length,l,o),s<0)return n;while(!c&&s>=0&&s0;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[r%16],r=Math.floor(r/16);for(;t<32;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[Math.floor(Math.random()*16)];return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];return i?(i.name||(i.name=n[this.errorCodes.ooeInternalError].name),i.message||(i.message=n[this.errorCodes.ooeInternalError].message)):i=n[this.errorCodes.ooeInternalError],i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage}}}}(),function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}(),r,i,h,u,c,l,f,a,e,v,y,p,w,b,o,k,d,g,s,nt,tt,it,rt;n.RequirementVersion=ut;r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){var f,u,e,i,r;if(n==undefined)return!1;if(t==undefined&&(t=0),f=this._setMap,u=f._sets,u.hasOwnProperty(n.toLowerCase())){e=u[n.toLowerCase()];try{if((i=this._getVersion(e),t=t+"",r=this._getVersion(t),i.major>0&&i.major>r.major)||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),i=0,r=0;if(t.length<2&&isNaN(Number(n)))throw u;else if(i=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(i)||isNaN(r))throw u;return{minor:r,major:i}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;h=function(n){function i(){n.call(this,{dialogapi:t})}return __extends(i,n),i}(i);n.DefaultDialogSetRequirement=h;u=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelClientDefaultSetRequirement=u;c=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(u);n.ExcelClientV1DefaultSetRequirement=c;l=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookClientDefaultSetRequirement=l;f=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return __extends(i,n),i}(i);n.WordClientDefaultSetRequirement=f;a=function(n){function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return __extends(i,n),i}(f);n.WordClientV1DefaultSetRequirement=a;e=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointClientDefaultSetRequirement=e;v=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(e);n.PowerpointClientV1DefaultSetRequirement=v;y=function(n){function i(){n.call(this,{selection:t,textcoercion:t})}return __extends(i,n),i}(i);n.ProjectClientDefaultSetRequirement=y;p=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return __extends(i,n),i}(i);n.ExcelWebDefaultSetRequirement=p;w=function(n){function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordWebDefaultSetRequirement=w;b=function(n){function i(){n.call(this,{activeview:t,settings:t})}return __extends(i,n),i}(i);n.PowerpointWebDefaultSetRequirement=b;o=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookWebDefaultSetRequirement=o;k=function(n){function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.SwayWebDefaultSetRequirement=k;d=function(n){function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return __extends(i,n),i}(i);n.AccessWebDefaultSetRequirement=d;g=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelIOSDefaultSetRequirement=g;s=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordIOSDefaultSetRequirement=s;nt=function(n){function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return __extends(t,n),t}(s);n.WordIOSV1DefaultSetRequirement=nt;tt=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointIOSDefaultSetRequirement=tt;it=function(n){function i(){n.call(this,{mailbox:t})}return __extends(i,n),i}(i);n.OutlookIOSDefaultSetRequirement=it;rt=function(){function n(){}var t="undefined";return n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},n.getDefaultRequirementMatrix=function(u){var f,e,s,o;return this.initializeDefaultSetMatrix(),f=undefined,e=u.get_requirementMatrix(),e!=undefined&&e.length>0&&typeof JSON!==t?(s=JSON.parse(u.get_requirementMatrix().toLowerCase()),f=new r(new i(s))):(o=n.getClientFullVersionString(u),f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[o]!=undefined?new r(n.DefaultSetArrayMatrix[o]):new r(new i({}))),f},n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix(),e;return f!=undefined&&f.length>0&&typeof JSON!==t?(e=JSON.parse(n.get_requirementMatrix().toLowerCase()),u=new r(new i(e))):u=new r(new h),u},n.getClientFullVersionString=function(n){var i=n.get_appMinorVersion(),u="",r="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;return f&&n.get_appVersion()==1?r=t==4096&&i>=15?"16.00.01":"16.00":n.get_appName()==64?r=n.get_appVersion():(u=i<10?"0"+i:""+i,r=n.get_appVersion()+"."+u),n.get_appName()+"-"+r},n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new c;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new v;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new l;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new w;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new b;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new g;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new k;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new nt;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new tt;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new it},n.Excel_RCLIENT_1600="1-16.00",n.Excel_RCLIENT_1601="1-16.01",n.Word_RCLIENT_1600="2-16.00",n.Word_RCLIENT_1601="2-16.01",n.PowerPoint_RCLIENT_1600="4-16.00",n.PowerPoint_RCLIENT_1601="4-16.01",n.Outlook_RCLIENT_1600="8-16.00",n.Excel_WAC_1600="16-16.00",n.Word_WAC_1600="32-16.00",n.Outlook_WAC_1600="64-16.00",n.Outlook_WAC_1601="64-16.01",n.Project_RCLIENT_1600="128-16.00",n.Access_WAC_1600="256-16.00",n.PowerPoint_WAC_1600="512-16.00",n.Excel_IOS_1600="1024-16.00",n.SWAY_WAC_1600="2048-16.00",n.Word_IOS_1600="4096-16.00",n.Word_IOS_16001="4096-16.00.01",n.PowerPoint_IOS_1600="8192-16.00",n.Outlook_IOS_1600="65536-16.00",n.DefaultSetArrayMatrix={},n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))}(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}return n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n},n.getInstance=function(){return n.hostObj===undefined&&(n.hostObj=new n),n.hostObj},n.prototype.getPlatform=function(){var n=this,t;return n.hostInfo.hostPlatform&&(t=n.hostInfo.hostPlatform.toLowerCase(),n.platformRemappings[t])?n.platformRemappings[t]:null},n.prototype.getHost=function(){var n=this,t;if(n.hostInfo.hostType){if(t=n.hostInfo.hostType.toLowerCase(),n.camelCaseMappings[t])return n.camelCaseMappings[t];if(t=n.capitalizeFirstLetter(n.hostInfo.hostType),Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null},n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null},n}();n.Host=t})(t=n.HostName||(n.HostName={}))}(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){n||(window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,n=!0)},disableShortcut:function(){n&&(t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window),n=!1)}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i,r,o,u,f,e;if(n&&typeof n=="string"&&(r=n.indexOf("#"),r!=-1)){o=n.substring(0,r);u=n.substring(r+1);switch(o){case"binding":case"bindings":u&&(i=new OSF.DDA.BindingPromise(u))}}if(i)return i.onFail=t,i;else if(t)if(f=typeof t,f=="function")e={},e[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(e,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext));else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f);};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this,s,e;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.auth&&OSF.OUtil.defineEnumerableProperty(f,"auth",{value:n.auth});n.get_isDialog()?(e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e})):(t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t}),r&&(s=r.displayName||"appOM",delete r.displayName,OSF.OUtil.defineEnumerableProperty(f,s,{value:r})),u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}}),e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e}))};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this,u;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;return OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext()),n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,e=n.length,o=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){var u,i,r;for(u in n){if(i=n[u],r=t[u],i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw o();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw o();}};f.extractRequiredArguments=function(t,i,r){var f,u,h,s,c,l;if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(c=n.length-1;c>=s;c--){l=n[c];switch(typeof l){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=l;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}if(f=o.fillOptions(f,i,r,u),e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;return o.verifyArguments(t,f),f}var h="function",s=n.length,o=new OSF.DDA.ApiMethodCall(n,t,i,f,e);this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),u=c(n,r,t,i);return o.constructCallArgs(r,u,t,i)};this.processResponse=function(n,t,i,f){return n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n)};this.getCallArgs=function(n){for(var t,u,r,i=n.length-1;i>=s;i--){r=n[i];switch(typeof r){case"object":t=r;break;case h:u=r}}return t=t||{},u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u),t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],i=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],t,i,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback],u,r;f&&(u={},u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?u[OSF.DDA.AsyncResultEnum.Properties.Value]=i:(r={},i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i),f(new OSF.DDA.AsyncResult(u,r)))};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.SyncMethodNames[t]=i};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){function o(n,i,r,u){var o,c,s,h;if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(s=n.length-1;s>=e;s--){h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}return o=f.fillOptions(o,i,r,u),f.verifyArguments(t,o),o}var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),u=o(n,r,t,i);return f.constructCallArgs(r,u,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){function e(i,f){var a=i?{}:undefined,s,h,o,v,c,l;for(s in i){if(h=i[s],OSF.DDA.ListType.isListType(s)){o=[];for(v in h)o.push(e(h[v],f))}else OSF.OUtil.listContainsKey(r,s)?o=r[s][f](h):f==u&&n.preserveNesting(s)?o=e(h,f):(c=t[s],c?(l=c[f],l&&(o=l[h],o===undefined&&(o=h))):o=h);a[s]=o}return a}function l(i,r){var e,u,h,s;for(u in r)h=n.isComplexType(u)?l(i,t[u][o]):i[u],h!=undefined&&(e||(e={}),s=r[u],s==f&&(s=u),e[s]=n.pack(u,h));return e}function s(i,r,e){var o,a,h,l,p,v,y;e||(e={});for(o in r){if(a=r[o],a==f)h=i;else if(a==c){e[o]=i.toArray();continue}else h=i[a];if(h===null||h===undefined)e[o]=undefined;else if(h=n.unpack(o,h),n.isComplexType(o))l=t[o][u],n.preserveNesting(o)?e[o]=s(h,l):s(h,l,e);else if(OSF.DDA.ListType.isListType(o)){l={};p=OSF.DDA.ListType.getDescriptor(o);l[p]=f;v=new Array(h.length);for(y in h)v[y]=s(h[y],l);e[o]=v}else e[o]=h}return e}function a(n,i,r){var f=t[n][r],u,o,c;return r=="toHost"?(o=e(i,r),u=l(o,f)):r==h&&(c=s(i,f),u=e(c,r)),u}var h="fromHost",i=this,o="toHost",u=h,c="sourceData",f="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];t||(t={});i.addMapping=function(n,i){var e,h,c,l,r,s,a,v;if(i.map){e=i.map;h={};for(c in e)l=e[c],l==f&&(l=c),h[l]=c}else e=i.toHost,h=i.fromHost;if(r=t[n],r){s=r[o];for(a in s)e[a]=s[a];s=r[u];for(v in s)h[v]=s[v]}else r=t[n]={};r[o]=e;r[u]=h};i.toHost=function(n,t){return a(n,t,o)};i.fromHost=function(n,t){return a(n,t,u)};i.self=f;i.sourceData=c;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){return this.isDynamicType(n)?t[n].toHost(i):i};i.unpack=function(n,i){return this.isDynamicType(n)?t[n].fromHost(i):i}};OSF.DDA.getDecoratedParameterMap=function(n,t){function r(n){var i=null,r,t;if(n)for(i={},r=n.length,t=0;t0){for(r=[],i=0;i=s)break;if(f=Function._validateParameter(n[e],o,h),f)return f.popStackFrame(),f}return t}),Function._validateParameterCount||(Function._validateParameterCount=function(n,r,u){var f,s,e=r.length,h=n.length,c,l,a;if(he)for(s=i,f=0;f0&&t.push(u)}}catch(s){}return t}var i=[],t={};t[Microsoft.Office.WebExtension.Parameters.Data]=function(){var t=0,i=1;return{toHost:function(n){if(OSF.DDA.TableDataProperties&&typeof n!="string"&&n[OSF.DDA.TableDataProperties.TableRows]!==undefined){var r=[];r[t]=n[OSF.DDA.TableDataProperties.TableRows];r[i]=n[OSF.DDA.TableDataProperties.TableHeaders];n=r}return n},fromHost:function(r){var f,e,u;return r.toArray?(e=r.dimensions(),e===2?f=n(r):(u=r.toArray(),u.length===2&&(u[0]!=null&&u[0].toArray||u[1]!=null&&u[1].toArray)?(f={},f[OSF.DDA.TableDataProperties.TableRows]=n(u[t]),f[OSF.DDA.TableDataProperties.TableHeaders]=n(u[i])):f=u)):f=r,f}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,i,t);this.unpack=function(n,i){var r,u;return this.isComplexType(n)||OSF.DDA.ListType.isListType(n)?(u=(i||typeof i=="unknown")&&i.toArray,r=u?i.toArray():i||{}):r=this.isDynamicType(n)?t[n].fromHost(i):i,r}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(n){function t(n){var i=n,f,r,u;if(OSF.OUtil.isArray(n))for(f=i.length,r=0;r2)for(u=[],o=1;o=n.MESSAGE_TIME_DELTA?(h(),e.lastMessageTimestamp=o):(e.lastMessageTimestamp+=n.MESSAGE_TIME_DELTA,setTimeout(function(){h()},e.lastMessageTimestamp-o)),s},n.prototype.generateCorrelationId=function(){return++this.callingIndex,this.conversationId+this.callingIndex},n.getCurrentTimeMS=function(){return(new Date).getTime()},n.MESSAGE_TIME_DELTA=10,n}();n.WebkitScriptMessaging=i})(t=n.ScriptMessaging||(n.ScriptMessaging={}))}(OSFWebkit||(OSFWebkit={}));OSF.ScriptMessaging=OSFWebkit.ScriptMessaging,function(n){var i,r,t;n.MessageHandlerName="Agave";n.PopupMessageHandlerName="WefPopupHandler",function(n){var t="HostFullVersion",i="HostCustomMessage",r="RequirementMatrix",u="CommerceAllowed",f="TouchEnabled",e="InstanceId",o="CorrelationId",s="APISetVersion",h="SolutionToken",c="ControlIntegrationLevel",l="ActivationMode",a="DocumentUrl",v="BindingCount",y="AppDataLocale",p="APPUILocale",w="AppCapabilities",b="APIVersionSequence",k="RevisionVersion",d="MinorVersion",g="MajorVersion",nt="SolutionReferenceId",tt="Settings";n[n[tt]=0]=tt;n[n[nt]=1]=nt;n[n.AppType=2]="AppType";n[n[g]=3]=g;n[n[d]=4]=d;n[n[k]=5]=k;n[n[b]=6]=b;n[n[w]=7]=w;n[n[p]=8]=p;n[n[y]=9]=y;n[n[v]=10]=v;n[n[a]=11]=a;n[n[l]=12]=l;n[n[c]=13]=c;n[n[h]=14]=h;n[n[s]=15]=s;n[n[o]=16]=o;n[n[e]=17]=e;n[n[f]=18]=f;n[n[u]=19]=u;n[n[r]=20]=r;n[n[i]=21]=i;n[n[t]=22]=t}(n.AppContextProperties||(n.AppContextProperties={}));i=n.AppContextProperties,function(n){var t="GetContext",i="WriteSettings",r="UnregisterEvent",u="RegisterEvent";n[n.Execute=1]="Execute";n[n[u]=2]=u;n[n[r]=3]=r;n[n[i]=4]=i;n[n[t]=5]=t}(n.MethodId||(n.MethodId={}));r=n.MethodId;t=function(){function t(n){this.hostScriptProxy=n}var r="message",i=null;return t.prototype.execute=function(t,r,u){var f=r,e,o;f==i&&(f=[]);e={id:t,apiArgs:f};o=function(t){var e,f,r;if(u){if(e=[],OSF.OUtil.isArray(t))for(f=0;f=2&&(i=t[0],u=t[1]);r&&r(u,new n.WebkitSafeArray(i))},e=function(t){if(u)return u(new n.WebkitSafeArray(t))};this.hostScriptProxy.registerEvent(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.RegisterEvent,t,i,f,e)},t.prototype.unregisterEvent=function(t,i,r){var u=function(t){return r(new n.WebkitSafeArray(t))};this.hostScriptProxy.unregisterEvent(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.UnregisterEvent,t,i,u)},t.prototype.messageParent=function(n){var t=n[Microsoft.Office.WebExtension.Parameters.MessageToParent],i={dialogMessage:{messageType:OSF.DialogMessageType.DialogMessageReceived,messageContent:t}};window.opener.postMessage(JSON.stringify(i),window.location.origin)},t.prototype.openDialog=function(n,u,f,e){function c(t){if(t.origin==window.location.origin)try{var i=JSON.parse(t.data);i.dialogMessage&&f(n,[OSF.DialogMessageType.DialogMessageReceived,i.dialogMessage.messageContent])}catch(r){OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handlered. Message:"+t.data)}}function k(){try{(t.popup==i||t.popup.closed)&&(window.clearInterval(t.interval),window.removeEventListener(r,c),t.NotifyError=i,t.popup=i,f(n,[OSF.DialogMessageType.DialogClosed]))}catch(u){OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed.")}}var l,o,h,y;if(t.popup&&!t.popup.closed){e(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened);return}l="action=displayDialog";t.OpenDialogCallback=undefined;var a="#",s=JSON.parse(u),v=s.url;if(v){o=v.split(a);h="?";o[0].indexOf("?")>-1&&(h="&");var p=screen.width*s.width/100,w=screen.height*s.height/100,b="width="+p+", height="+w;o[0]=o[0].concat(h).concat(l);y=o.join(a);t.popup=window.open(y,"",b);t.OpenDialogCallback=function(i){if(i==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){window.addEventListener(r,c);this.messageEventListener=c;t.interval=window.setInterval(k,1e3);function u(t){f(n,[t])}t.NotifyError=u}e(i)}}},t.prototype.closeDialog=function(n,u,f){t.popup?(t.interval&&window.clearInterval(t.interval),t.popup.close(),t.popup=i,window.removeEventListener(r,this.messageEventListener),t.NotifyError=i,f(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)):f(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)},t.prototype.sendMessage=function(){},t}();n.WebkitHostController=t}(OSFWebkit||(OSFWebkit={}));OSF.Webkit=OSFWebkit;OSF.ClientHostController=new OSFWebkit.WebkitHostController(OSF.ScriptMessaging.GetScriptMessenger());OSF.DDA.ClientSettingsManager={getSettingsExecuteMethod:function(n){return function(t){var i,r,u=function(n,i){t.onReceiving&&t.onReceiving();t.onComplete&&t.onComplete(n,i)};try{n(t.hostCallArgs,t.onCalling,u)}catch(f){i=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;r={name:Strings.OfficeOM.L_InternalError,message:f};u(i,r)}}},read:function(n,t){var u=[],f=[],i,r;n&&n();i=OSF._OfficeAppFactory.getInitializationHelper();r=function(n){t&&t(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,n.get_settings())};i.getAppContext(null,r)},write:function(n,t,i,r){var u={},e=[],o=[],f,s;for(f in n)e.push(f),o.push(n[f]);u.keys=e;u.values=o;i&&i();s=function(n){r&&r(n[0],null)};OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.WriteSettings,u,s)}};OSF.InitializationHelper.prototype.initializeSettings=function(n,t){var i=n.get_settings();return this.deserializeSettings(i,t)};OSF.InitializationHelper.prototype.getAppContext=function(n,t){var r=function(n){for(var f,i=OSF.Webkit.AppContextProperties,h=n[i.AppType],e=n[i.Settings],o={},s=e[0],c=e[1],r=0;r40)&&(n=OSF.OUtil.Guid.generateNewGuid(),t.setValue(t.clientIDKey,n)),n},n.prototype.saveLog=function(n,t){var i=this,u=i.getValue(i.logIdSetKey);u=(u&&u.length>0?u+";":r)+n;i.setValue(i.logIdSetKey,u);i.setValue(n,t)},n.prototype.enumerateLog=function(n,t){var i=this,e=i.getValue(i.logIdSetKey),u,o,r,f;if(e){u=e.split(";");for(o in u)r=u[o],f=i.getValue(r),f&&(n&&n(r,f),t&&i.remove(r));t&&i.remove(i.logIdSetKey)}},n.prototype.getValue=function(n){var t=OSF.OUtil.getLocalStorage(),i=r;return t&&(i=t.getItem(n)),i},n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)},n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}},n}(),o=function(){function n(){}return n.prototype.LogData=function(n){OSF.Logger&&(OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n.SerializeRow(),OSF.Logger.SendFlag.none),OSFAriaLogger.AriaLogger.getInstance().logData(n))},n.prototype.LogRawData=function(n){if(OSF.Logger){OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n,OSF.Logger.SendFlag.none);try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(n))}catch(t){}}},n}();n.initialize=v;n.onAppActivated=y;n.onScriptDone=p;n.onCallDone=w;n.onMethodDone=b;n.onPropertyDone=k;n.onEventDone=d;n.onRegisterDone=g;n.onAppClosed=nt;n.setOsfControlAppCorrelationId=tt;n.doAppInitializationLogging=c;n.logAppCommonMessage=it;n.logAppException=rt;OSF.AppTelemetry=n}(OSFAppTelemetry||(OSFAppTelemetry={}));Microsoft.Office.WebExtension.FileType={Text:"text",Compressed:"compressed",Pdf:"pdf"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FileProperties:"FileProperties",FileSliceProperties:"FileSliceProperties"});OSF.DDA.FileProperties={Handle:"FileHandle",FileSize:"FileSize",SliceSize:Microsoft.Office.WebExtension.Parameters.SliceSize};OSF.DDA.File=function(n,t,i){var r,u;OSF.OUtil.defineEnumerableProperties(this,{size:{value:t},sliceCount:{value:Math.ceil(t/i)}});r={};r[OSF.DDA.FileProperties.Handle]=n;r[OSF.DDA.FileProperties.SliceSize]=i;u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.GetDocumentCopyChunkAsync,u.ReleaseDocumentCopyAsync],r)};OSF.DDA.FileSliceOffset="fileSliceoffset";OSF.DDA.AsyncMethodNames.addNames({GetDocumentCopyAsync:"getFileAsync",GetDocumentCopyChunkAsync:"getSliceAsync",ReleaseDocumentCopyAsync:"closeAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FileType,"enum":Microsoft.Office.WebExtension.FileType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:{types:["number"],defaultValue:65536}}],checkCallArgs:function(n){var t=n[Microsoft.Office.WebExtension.Parameters.SliceSize];if(t<=0||t>4194304)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return n},onSucceeded:function(n,t,i){return new OSF.DDA.File(n[OSF.DDA.FileProperties.Handle],n[OSF.DDA.FileProperties.FileSize],i[Microsoft.Office.WebExtension.Parameters.SliceSize])}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(n,t){return t[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(r<0||r>=t.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;return n[OSF.DDA.FileSliceOffset]=parseInt((r*i[OSF.DDA.FileProperties.SliceSize]).toString()),n},onSucceeded:function(n,t,i){var r={};return OSF.OUtil.defineEnumerableProperties(r,{data:{value:n[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:i[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:n[OSF.DDA.FileProperties.SliceSize]}}),r}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FileType,{Text:"text",Pdf:"pdf"});Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(n){var i=this,r,t,u;i._eventHandlers={};i._objectEventHandlers={};i._queuedEventsArgs={};for(r in n)t=n[r],u=t=="objectDeleted"||t=="objectSelectionChanged"||t=="objectDataChanged"||t=="contentControlAdded",u?i._objectEventHandlers[t]={}:i._eventHandlers[t]=[],i._queuedEventsArgs[t]=[]};OSF.EventDispatch.prototype={getSupportedEvents:function(){var n=[];for(var t in this._eventHandlers)n.push(t);for(t in this._objectEventHandlers)n.push(t);return n},supportsEvent:function(n){for(var t in this._eventHandlers)if(n==t)return!0;for(t in this._objectEventHandlers)if(n==t)return!0;return!1},hasEventHandler:function(n,t){var i=this._eventHandlers[n],r;if(i&&i.length>0)for(r in i)if(i[r]===t)return!0;return!1},hasObjectEventHandler:function(n,t,i){var f=this._objectEventHandlers[n],r,u;if(f!=null)for(r=f[t],u=0;r!=null&&u0)for(r=0;r0?(this._eventHandlers[n]=[],!0):!1},clearObjectEventHandlers:function(n,t){return this._objectEventHandlers[n]!=null&&this._objectEventHandlers[n][t]!=null?(this._objectEventHandlers[n][t]=[],!0):!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},getObjectEventHandlerCount:function(n,t){return this._objectEventHandlers[n]==null||this._objectEventHandlers[n][t]==null?0:this._objectEventHandlers[n][t].length},fireEvent:function(n){var t,i,r;if(n.type==undefined)return!1;if(t=n.type,t&&this._eventHandlers[t]){i=this._eventHandlers[t];for(r in i)i[r](n);return!0}else return!1},fireObjectEvent:function(n,t){var i,f,r,u;if(t.type==undefined)return!1;if(i=t.type,i&&this._objectEventHandlers[i]&&(f=this._objectEventHandlers[i],r=f[n],r!=null)){for(u=0;u0)){for(r=t[0];i.length>0;)u=i.shift(),r(u);return!0}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var f="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(n,i[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]=="outlook"||OSF._OfficeAppFactory.getHostInfo()[f]=="outlookwebapp")r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i),t.initialize(r.initialData),t.setCurrentItemNumber(r.itemNumber.itemNumber);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var i=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),t=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];t(arguments,i,n)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(n){var i=OSF.DDA.SyncMethodNames.MessageParent.displayName,t=this,r;t[i]||OSF.OUtil.defineEnumerableProperty(t,i,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return n(arguments,t)}});r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;t[r]||typeof OSF.DialogParentMessageEventDispatch=="undefined"||OSF.DDA.DispIdHost.addEventSupport(t,OSF.DialogParentMessageEventDispatch,n);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(n){n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:n[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}}],privateStateCallbacks:[],onSucceeded:function(n){var f=n[Microsoft.Office.WebExtension.Parameters.Id],i=n[Microsoft.Office.WebExtension.Parameters.Data],t=new OSF.DialogHandler,e=OSF.DDA.AsyncMethodNames.CloseAsync.displayName,r,u;return OSF.OUtil.defineEnumerableProperty(t,e,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];n(arguments,f,i,t)}}),r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName,OSF.OUtil.defineEnumerableProperty(t,r,{value:function(){var r=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],n=r.verifyAndExtractCall(arguments,t,i),u=n[Microsoft.Office.WebExtension.Parameters.EventType],f=n[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(u,f)}}),u=OSF.DDA.SyncMethodNames.SendMessage.displayName,OSF.OUtil.defineEnumerableProperty(t,u,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return n(arguments,i,t)}}),t},checkCallArgs:function(n){return n[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Width]=1),n[Microsoft.Office.WebExtension.Parameters.Width]>100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99),n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1),n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99),n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(n){try{n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,n);OSF.ClientHostController.openDialog(n.dispId,n.targetId,function(t,i){n.onEvent&&n.onEvent(i);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(n){n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,n);try{OSF.ClientHostController.closeDialog(n.dispId,n.targetId,t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.messageParent=function(n){try{n.onCalling&&n.onCalling();var i=(new Date).getTime(),t=OSF.ClientHostController.messageParent(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs((new Date).getTime()-i),t),t}catch(r){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(r)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.sendMessage=function(n){try{n.onCalling&&n.onCalling();var r=(new Date).getTime(),t=OSF.ClientHostController.sendMessage(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),t}catch(i){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(i)}};OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(n){OSF.OUtil.defineEnumerableProperties(this,{url:{value:n[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(n){return new Microsoft.Office.WebExtension.FileProperties(n)}});Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"};Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"};Microsoft.Office.WebExtension.Index={First:"first",Last:"last",Next:"next",Previous:"previous"};OSF.DDA.AsyncMethodNames.addNames({GoToByIdAsync:"goToByIdAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GoToByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string","number"]},{name:Microsoft.Office.WebExtension.Parameters.GoToType,"enum":Microsoft.Office.WebExtension.GoToType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:{"enum":Microsoft.Office.WebExtension.SelectionMode,defaultValue:Microsoft.Office.WebExtension.SelectionMode.Default}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:0},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:1},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:2},{name:Microsoft.Office.WebExtension.GoToType.Index,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:0},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:1},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:1},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileProperties.FileSize,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0},{name:OSF.DDA.FileProperties.SliceSize,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:0},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:5},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:6}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:0}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileSliceOffset,value:1},{name:OSF.DDA.FileProperties.SliceSize,value:2}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0}]});OSF.DDA.AsyncMethodNames.addNames({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync"}),function(){function r(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&r&&(r[OSF.DDA.TableDataProperties.TableRows]!=undefined||r[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(r=OSF.DDA.OMFactory.manufactureTableData(r)),r=OSF.DDA.DataCoercion.coerceData(r,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),r==undefined?null:r}var i=!1,n="boolean",t="number";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,"enum":Microsoft.Office.WebExtension.CoercionType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}}],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object",t,n]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[t,n],defaultValue:i}}],privateStateCallbacks:[]})}();OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:1},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:2},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:3},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:4},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:5}]});OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",RefreshingSettings:"refreshingSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(n){var r={},i,t;for(i in n){t=n[i];try{t=JSON?JSON.stringify(t,function(n,t){return OSF.OUtil.isDate(this[n])?OSF.DDA.SettingsManager.DateJSONPrefix+this[n].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix:t}):Sys.Serialization.JavaScriptSerializer.serialize(t);r[i]=t}catch(u){}}return r},deserializeSettings:function(n){var r={},i,t;n=n||{};for(i in n){t=n[i];try{t=JSON?JSON.parse(t,function(n,t){var i;return typeof t=="string"&&t&&t.length>6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix&&(i=new Date(parseInt(t.slice(5,-1))),i)?i:t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,!0);r[i]=t}catch(u){}}return r}};OSF.DDA.Settings=function(n){var t="name",i;n=n||{};i=function(n){var i=OSF.OUtil.getSessionStorage(),t,r;i&&(t=OSF.DDA.SettingsManager.serializeSettings(n),r=JSON?JSON.stringify(t):Sys.Serialization.JavaScriptSerializer.serialize(t),i.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),r))};OSF.OUtil.defineEnumerableProperties(this,{get:{value:function(i){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]),r;if(u)throw u;return r=n[i],typeof r=="undefined"?null:r}},set:{value:function(r,u){var f=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1},{name:"value",mayBeNull:!0}]);if(f)throw f;n[r]=u;i(n)}},remove:{value:function(r){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]);if(u)throw u;delete n[r];i(n)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],n)};OSF.DDA.RefreshableSettings=function(n){OSF.DDA.RefreshableSettings.uber.constructor.call(this,n);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],n);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:n}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(n,t){return t}}],onSucceeded:function(n,t,i){var f=n[OSF.DDA.SettingsManager.SerializedSettings],u=OSF.DDA.SettingsManager.deserializeSettings(f),e=i[OSF.DDA.SettingsManager.RefreshingSettings];for(var r in e)t.remove(r);for(r in u)t.set(r,u[r]);return t}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(n,t){return OSF.DDA.SettingsManager.serializeSettings(t)}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});Microsoft.Office.WebExtension.BindingType={Table:"table",Text:"text",Matrix:"matrix"};OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType};OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{BindingList:"BindingList"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{Subset:"subset",BindingProperties:"BindingProperties"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList,OSF.DDA.PropertyDescriptors.BindingProperties);OSF.DDA.BindingPromise=function(n,t){this._id=n;OSF.OUtil.defineEnumerableProperty(this,"onFail",{get:function(){return t},set:function(n){var i=typeof n;if(i!="undefined"&&i!="function")throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,i);t=n}})};OSF.DDA.BindingPromise.prototype={_fetch:function(n){var t=this,i;return t.binding?n&&n(t.binding):t._binding||(i=t,Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(t._id,function(t){t.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded?(OSF.OUtil.defineEnumerableProperty(i,"binding",{value:t.value}),n&&n(i.binding)):i.onFail&&i.onFail(t)})),t},getDataAsync:function(){var n=arguments;return this._fetch(function(t){t.getDataAsync.apply(t,n)}),this},setDataAsync:function(){var n=arguments;return this._fetch(function(t){t.setDataAsync.apply(t,n)}),this},addHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.addHandlerAsync.apply(t,n)}),this},removeHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.removeHandlerAsync.apply(t,n)}),this}};OSF.DDA.BindingFacade=function(n){this._eventDispatches=[];OSF.OUtil.defineEnumerableProperty(this,"document",{value:n});var t=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[t.AddFromSelectionAsync,t.AddFromNamedItemAsync,t.GetAllAsync,t.GetByIdAsync,t.ReleaseByIdAsync])};OSF.DDA.UnknownBinding=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}})};OSF.DDA.Binding=function(n,t){var r,u,i,f;OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}});r=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[r.GetDataAsync,r.SetDataAsync]);u=Microsoft.Office.WebExtension.EventType;i=t.bindings._eventDispatches;i[n]||(i[n]=new OSF.EventDispatch([u.BindingSelectionChanged,u.BindingDataChanged]));f=i[n];OSF.DDA.DispIdHost.addEventSupport(this,f)};OSF.DDA.generateBindingId=function(){return"UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+(new Date).getTime()};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureBinding=function(n,t){var r=n[OSF.DDA.BindingProperties.Id],u=n[OSF.DDA.BindingProperties.RowCount],f=n[OSF.DDA.BindingProperties.ColumnCount],s=n[OSF.DDA.BindingProperties.HasHeaders],i,e,o;switch(n[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:i=new OSF.DDA.TextBinding(r,t);break;case Microsoft.Office.WebExtension.BindingType.Matrix:i=new OSF.DDA.MatrixBinding(r,t,u,f);break;case Microsoft.Office.WebExtension.BindingType.Table:e=function(){return OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument};o=e()&&OSF.DDA.ExcelTableBinding?OSF.DDA.ExcelTableBinding:OSF.DDA.TableBinding;i=new o(r,t,u,f,s);break;default:i=new OSF.DDA.UnknownBinding(r,t)}return i};OSF.DDA.AsyncMethodNames.addNames({AddFromSelectionAsync:"addFromSelectionAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:"getByIdAsync",ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync"}),function(){function u(n){return OSF.DDA.OMFactory.manufactureBinding(n,Microsoft.Office.WebExtension.context.document)}function f(n){return n.id}function e(n,t,i){var u=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&u&&(u[OSF.DDA.TableDataProperties.TableRows]!=undefined||u[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(u=OSF.DDA.OMFactory.manufactureTableData(u)),u=OSF.DDA.DataCoercion.coerceData(u,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),u==undefined?r:u}var t="number",i="object",n="string",r=null;OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:[n]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return!0}}],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.BindingList],u)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n,t,i){var r=i[Microsoft.Office.WebExtension.Parameters.Id];delete t._eventDispatches[r]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n,t){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&n[Microsoft.Office.WebExtension.Parameters.RowCount]==0&&n[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn],delete n[Microsoft.Office.WebExtension.Parameters.RowCount],delete n[Microsoft.Office.WebExtension.Parameters.ColumnCount]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]||n[Microsoft.Office.WebExtension.Parameters.RowCount]||n[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[n,i,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}]})}();OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.MatrixBinding=function(n,t,i,r){OSF.DDA.MatrixBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Matrix},rowCount:{value:i?i:0},columnCount:{value:r?r:0}})};OSF.OUtil.extend(OSF.DDA.MatrixBinding,OSF.DDA.Binding);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.BindingProperties,fromHost:[{name:OSF.DDA.BindingProperties.Id,value:0},{name:OSF.DDA.BindingProperties.Type,value:1},{name:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,value:2}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.BindingType,toHost:[{name:Microsoft.Office.WebExtension.BindingType.Text,value:0},{name:Microsoft.Office.WebExtension.BindingType.Matrix,value:1},{name:Microsoft.Office.WebExtension.BindingType.Table,value:2}],invertible:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,value:0},{name:Microsoft.Office.WebExtension.Parameters.Id,value:1},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:2},{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseBindingMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAllBindingsMethod,fromHost:[{name:OSF.DDA.ListDescriptors.BindingList,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:2},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:3},{name:OSF.DDA.PropertyDescriptors.Subset,value:4}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.Data,value:2},{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,fromHost:[{name:OSF.DDA.BindingProperties.RowCount,value:0},{name:OSF.DDA.BindingProperties.ColumnCount,value:1},{name:OSF.DDA.BindingProperties.HasHeaders,value:2}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.Subset,toHost:[{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:0},{name:OSF.DDA.SafeArray.UniqueArguments.Run,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Offset,toHost:[{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:0},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Run,toHost:[{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:0},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddColumnsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearAllRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});Microsoft.Office.WebExtension.TableData=function(n,t){function i(n){if(n==null||n==undefined)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(n,2);t<2;t++)n=[n];return n}catch(i){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(n){t=i(n)}},rows:{get:function(){return n},set:function(t){n=t==null||OSF.OUtil.isArray(t)&&t.length==0?[]:i(t)}}});this.headers=t;this.rows=n};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(n){return new Microsoft.Office.WebExtension.TableData(n[OSF.DDA.TableDataProperties.TableRows],n[OSF.DDA.TableDataProperties.TableHeaders])};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{TableDataProperties:"TableDataProperties"});OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};OSF.DDA.TableBinding=function(n,t,i,r,u){OSF.DDA.TableBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:i?i:0},columnCount:{value:r?r:0},hasHeaders:{value:u?u:!1}});var f=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[f.AddRowsAsync,f.AddColumnsAsync,f.DeleteAllDataValuesAsync])};OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync"}),function(){function n(n){return n.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]})}();OSF.DDA.TextBinding=function(n,t){OSF.DDA.TextBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperty(this,"type",{value:Microsoft.Office.WebExtension.BindingType.Text})};OSF.OUtil.extend(OSF.DDA.TextBinding,OSF.DDA.Binding);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"});OSF.DDA.DocumentSelectionChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:n}})};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDeleted:"objectDeleted"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectSelectionChanged:"objectSelectionChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDataChanged:"objectDataChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ContentControlAdded:"contentControlAdded"});OSF.DDA.ObjectEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:n},object:{value:t}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDeletedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDataChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidContentControlAddedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{BindingSelectionChanged:"bindingSelectionChanged",BindingDataChanged:"bindingDataChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{BindingSelectionChangedEvent:"BindingSelectionChangedEvent"});OSF.DDA.BindingSelectionChangedEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingSelectionChanged},binding:{value:n}});for(var i in t)OSF.OUtil.defineEnumerableProperty(this,i,{value:t[i]})};OSF.DDA.BindingDataChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingDataChanged},binding:{value:n}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:0},{name:OSF.DDA.PropertyDescriptors.Subset,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingDataChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var n=null;return{findArrayDimensionality:function(n){if(OSF.OUtil.isArray(n)){for(var t=0,i=0;i0},enumerable:!0,configurable:!0}),t.prototype.addTrace=function(n,t){this.m_traceInfos[n]=t},t.prototype.addReferencedObjectPath=function(t){if(!this.m_referencedObjectPaths[t.objectPathInfo.Id]){if(!t.isValid)throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidObjectPath,message:n.Utility._getResourceString(n.ResourceStrings.invalidObjectPath,n.Utility.getObjectPathExpression(t)),debugInfo:{errorLocation:n.Utility.getObjectPathExpression(t)}});while(t)t.isWriteOperation&&(this.m_flags=this.m_flags|1),this.m_referencedObjectPaths[t.objectPathInfo.Id]=t,t.objectPathInfo.ObjectPathType==3&&this.addReferencedObjectPaths(t.argumentObjectPaths),t=t.parentObjectPath}},t.prototype.addReferencedObjectPaths=function(n){if(n)for(var t=0;t0&&(typeof r[0]=="string"||i.isRequestUrlAndHeaderInfo(r[0])||i.isRequestUrlAndHeaderInfoResolver(r[0]))&&(y=r[0],h=1),r.length==h+1)a=u,v=r[h+0];else if(r.length==h+2){if(r[h+0]instanceof n.ClientObject)a=function(){return r[h+0].context};else if(Array.isArray(r[h+0])){if(c=r[h+0],c.length==0)return i.createErrorPromise(t);for(l=0;l0){var n=c._onRunFinishedNotifiers.shift();n()}if(a)return l;else throw l;})},i.prototype._nextId=function(){return++this.m_nextId},i}();n.ClientRequestContext=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_type=n}return Object.defineProperty(t.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){(this.m_isLoaded=!0,typeof t=="object"&&t&&t._IsNull)||(this.m_value=this.m_type===1?n.Utility.adjustToDateTime(t):t)},t}();n.ClientResult=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.flags="flags",n.getItemAt="GetItemAt",n.id="Id",n.idPrivate="_Id",n.index="_Index",n.items="_Items",n.iterativeExecutor="IterativeExecutor",n.localDocument="http://document.localhost/",n.localDocumentApiPrefix="http://document.localhost/_api/",n.processQuery="ProcessQuery",n.referenceId="_ReferenceId",n.isTracked="_IsTracked",n.sourceLibHeader="SdkVersion",n.embeddingPageOrigin="EmbeddingPageOrigin",n.embeddingPageSessionInfo="EmbeddingPageSessionInfo",n}();n.Constants=t}(OfficeExtension||(OfficeExtension={})),function(n){var u=1,r={invokeRequestModifier:function(n){return n.DdaMethod.Version=u,n},invokeResponseModifier:function(n){return u=n.Version,n.Error&&(n.error={},n.error.Code=n.Error),n}},i,t,f,e;(function(n){n[n.Success=0]="Success";n[n.Timeout=1]="Timeout";n[n.InternalError=5001]="InternalError"})(i||(i={})),function(n){n.SendingId="sId";n.RespondingId="rId";n.CommandKey="command";n.SessionInfoKey="sessionInfo";n.ParamsKey="params";n.ApiReadyCommand="apiready";n.ExecuteMethodCommand="executeMethod";n.GetAppContextCommand="getAppContext";n.RegisterEventCommand="registerEvent";n.UnregisterEventCommand="unregisterEvent";n.FireEventCommand="fireEvent"}(t||(t={}));f=function(u){function f(n,t){u.call(this);this.m_chosenWindow=null;this.m_chosenOrigin=null;this.m_enabled=!0;this.m_onMessageHandler=this._onMessage.bind(this);this.m_callbackList={};this.m_id=0;this.m_timeoutId=-1;this.m_appContext=null;this.m_url=n;this.m_options=t;this.m_options||(this.m_options={sessionKey:Math.random().toString()});this.m_options.sessionKey||(this.m_options.sessionKey=Math.random().toString());this.m_options.container||(this.m_options.container=document.body);this.m_options.timeoutInMilliseconds||(this.m_options.timeoutInMilliseconds=6e4);this.m_options.height||(this.m_options.height="400px");this.m_options.width||(this.m_options.width="100%")}return __extends(f,u),f.prototype._getIFrameSrc=function(){var u=window.location.protocol+"//"+window.location.host,i=n.Constants.embeddingPageOrigin+"="+encodeURIComponent(u)+"&"+n.Constants.embeddingPageSessionInfo+"="+encodeURIComponent(this.m_options.sessionKey),r=!1,t;return this.m_url.toLowerCase().indexOf("/_layouts/preauth.aspx")>0&&(r=!0),t=document.createElement("a"),t.href=this.m_url,r?t.hash=t.hash.length===0||t.hash==="#"?"#"+i:t.hash+"&"+i:t.search=t.search.length===0||t.search==="?"?"?"+i:t.search+"&"+i,t.href},f.prototype.init=function(){var t=this,i;return window.addEventListener("message",this.m_onMessageHandler),i=this._getIFrameSrc(),new n._Internal.OfficePromise(function(r,u){var f=document.createElement("iframe");t.m_options.id&&(f.id=t.m_options.id);f.style.height=t.m_options.height;f.style.width=t.m_options.width;f.src=i;t.m_options.container.appendChild(f);t.m_timeoutId=setTimeout(function(){t.close();var i=n.Utility.createRuntimeError(n.ErrorCodes.timeout,n.Utility._getResourceString(n.ResourceStrings.timeout),"EmbeddedSession.init");u(i)},t.m_options.timeoutInMilliseconds);t.m_promiseResolver=r})},f.prototype._invoke=function(n,t,u){if(!this.m_enabled){t(i.InternalError,null);return}r.invokeRequestModifier&&(u=r.invokeRequestModifier(u));this._sendMessageWithCallback(this.m_id++,n,u,function(n){r.invokeResponseModifier&&(n=r.invokeResponseModifier(n));var u=n.Error;delete n.Error;t(u||i.Success,n)})},f.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler);window.clearTimeout(this.m_timeoutId);this.m_enabled=!1},Object.defineProperty(f.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),f.prototype._createRequestExecutorOrNull=function(){return new e(this)},f.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},f.prototype._registerEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.RegisterEventCommand,{EventId:i,TargetId:r},function(){n(null)})})},f.prototype._unregisterEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.UnregisterEventCommand,{EventId:i,TargetId:r},function(){n()})})},f.prototype._onMessage=function(n){var u=this,i,e,r,o,s;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===n.source&&this.m_chosenOrigin===n.origin)){if(i=n.data,i&&i[t.CommandKey]===t.ApiReadyCommand){!this.m_chosenWindow&&this._isValidDescendant(n.source)&&i[t.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=n.source,this.m_chosenOrigin=n.origin,this._sendMessageWithCallback(this.m_id++,t.GetAppContextCommand,null,function(n){u._setupContext(n);window.clearTimeout(u.m_timeoutId);u.m_promiseResolver()}));return}if(i&&i[t.CommandKey]===t.FireEventCommand){var f=i[t.ParamsKey],h=f.EventId,c=f.TargetId,l=f.Data;if(this.m_sessionEventManager)for(e=this.m_sessionEventManager.getHandlers(h,c),r=0;r=0;o--)if(r[o]===e[i].handler){r.splice(o,1);break}break;case 2:r=[];break}}return s&&(!this.m_registered&&r.length>0?u=u.then(function(){return f.m_eventInfo.registerFunc(f.m_callback)}).then(function(){return f.m_registered=!0}):this.m_registered&&r.length==0&&(u=u.then(function(){return f.m_eventInfo.unregisterFunc(f.m_callback)}).catch(function(t){n.Utility.log("Error when unregister event: "+JSON.stringify(t))}).then(function(){return f.m_registered=!1})),u=u.then(function(){return f.m_handlers=r})),u},t.prototype.fireEvent=function(t){for(var u,f,r=[],i=0;i=0;e--)if(f[e]===u){f.splice(e,1);break}return f.length===0?this.m_unregisterEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i}();n.EventRegistration=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var s=JSON.stringify(u.Body),f=u.Url,e,o;if(f.charAt(f.length-1)!="/"&&(f=f+"/"),f=f+n.Constants.processQuery,f=f+"?"+n.Constants.flags+"="+r.toString(),e={method:"POST",url:f,headers:{},body:s},e.headers[n.Constants.sourceLibHeader]=t.SourceLibHeaderValue,e.headers["CONTENT-TYPE"]="application/json",u.Headers)for(o in u.Headers)e.headers[o]=u.Headers[o];return n.HttpUtility.sendRequest(e).then(function(t){var i,r;return t.statusCode===200?i={ErrorCode:null,ErrorMessage:null,Headers:t.headers,Body:JSON.parse(t.body)}:(n.Utility.log("Error Response:"+t.body),r=n.Utility._parseErrorResponse(t),i={ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:t.headers,Body:null}),i})},t.SourceLibHeaderValue="officejs-rest",t}();n.HttpRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){n.OfficeRequire=function(){return typeof require!="undefined"?require:null}()})(t=n._Internal||(n._Internal={}));i=function(){function i(){}return i.setCustomSendRequestFunc=function(n){i.s_customSendRequestFunc=n},i.xhrSendRequestFunc=function(i){return new t.OfficePromise(function(r,u){var f=new XMLHttpRequest,e;if(f.open(i.method,i.url),f.onload=function(){var t={statusCode:f.status,headers:n.Utility._parseHttpResponseHeaders(f.getAllResponseHeaders()),body:f.responseText};r(t)},f.onerror=function(){u(new t.RuntimeError({code:n.ErrorCodes.connectionFailure,message:n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,f.statusText)}))},i.headers)for(e in i.headers)f.setRequestHeader(e,i.headers[e]);f.send(i.body)})},i.nodejsRequestModuleSendRequestFunc=function(n){i.logRequest(n);var r=t.OfficeRequire(i.NodeJsRequestModuleName);return r(n.url,{method:n.method,headers:n.headers,body:n.body}).then(function(n){return n.text().then(function(t){var f=n.status,u={},r;return n.headers.forEach(function(n,t){u[t]=n}),r={statusCode:f,headers:u,body:t},i.logResponse(r),r})})},i.sendRequest=function(n){i.validateAndNormalizeRequest(n);var t=i.s_customSendRequestFunc;return t||(t=typeof window=="undefined"||typeof XMLHttpRequest=="undefined"?i.nodejsRequestModuleSendRequestFunc:i.xhrSendRequestFunc),t(n)},i.setCustomSendLocalDocumentRequestFunc=function(n){i.s_customSendLocalDocumentRequestFunc=n},i.sendLocalDocumentRequest=function(n){i.validateAndNormalizeRequest(n);var t;return t=i.s_customSendLocalDocumentRequestFunc||i.officeJsSendLocalDocumentRequestFunc,t(n)},i.officeJsSendLocalDocumentRequestFunc=function(i){i=n.Utility._validateLocalDocumentRequest(i);var r=n.Utility._buildRequestMessageSafeArray(i);return new t.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(r,function(i){var r;r=i.status=="succeeded"?{statusCode:n.RichApiMessageUtility.getResponseStatusCode(i),headers:n.RichApiMessageUtility.getResponseHeaders(i),body:n.RichApiMessageUtility.getResponseBody(i)}:n.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(i.error.code,i.error.message);n.Utility.log(JSON.stringify(r));t(r)})})},i.validateAndNormalizeRequest=function(i){if(n.Utility.isNullOrUndefined(i))throw t.RuntimeError._createInvalidArgError({argumentName:"request"});n.Utility.isNullOrEmptyString(i.method)&&(i.method="GET");i.method=i.method.toUpperCase()},i.logRequest=function(t){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Request---"),n.Utility.log(t.method+" "+t.url),t.headers)for(var r in t.headers)n.Utility.log(r+": "+t.headers[r]);i._logBody&&n.Utility.log(t.body)}},i.logResponse=function(t){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Response---"),n.Utility.log(""+t.statusCode),t.headers)for(var r in t.headers)n.Utility.log(r+": "+t.headers[r]);i._logBody&&n.Utility.log(t.body)}},i.NodeJsRequestModuleName="node-fetch",i._logBody=!1,i}();n.HttpUtility=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_clientObject=n}return n.prototype._handleResult=function(n){this.m_clientObject._handleIdResult(n)},n}();n.InstantiateActionResultHandler=t}(OfficeExtension||(OfficeExtension={})),function(n){}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){this.m_objectPathInfo=n;this.m_parentObjectPath=t;this.m_isWriteOperation=!1;this.m_isCollection=i;this.m_isInvalidAfterRequest=r;this.m_isValid=!0}return Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},set:function(n){this.m_isWriteOperation=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(n){this.m_argumentObjectPaths=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(n){this.m_isValid=n;!n&&this.m_objectPathInfo.ObjectPathType===6&&this.m_savedObjectPathInfo&&(t.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(n){this.m_getByIdMethodName=n},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null},t.prototype.updateUsingObjectData=function(i){var o=i[n.Constants.referenceId],u,f,e,r;if(!n.Utility.isNullOrEmptyString(o)){this.m_savedObjectPathInfo||this.isInvalidAfterRequest||!t.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)||(u={},t.copyObjectPathInfo(this.m_objectPathInfo,u),this.m_savedObjectPathInfo={pathInfo:u,parent:this.m_parentObjectPath});this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=o;this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null;return}if(f=this.parentObjectPath&&this.parentObjectPath.isCollection,e=this.getByIdMethodName,(f||!n.Utility.isNullOrEmptyString(e))&&(r=i[n.Constants.id],n.Utility.isNullOrUndefined(r)&&(r=i[n.Constants.idPrivate]),!n.Utility.isNullOrUndefined(r))){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;f?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=e,this.m_getByIdMethodName=null);this.isWriteOperation=!1;this.m_objectPathInfo.ArgumentInfo={};this.m_objectPathInfo.ArgumentInfo.Arguments=[r];this.m_argumentObjectPaths=null;return}},t.isRestorableObjectPath=function(n){return n===1||n===5||n===3||n===4},t.copyObjectPathInfo=function(n,t){t.Id=n.Id;t.ArgumentInfo=n.ArgumentInfo;t.Name=n.Name;t.ObjectPathType=n.ObjectPathType;t.ParentObjectPathId=n.ParentObjectPathId},t}();n.ObjectPath=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createGlobalObjectObjectPath=function(t){var i={Id:t._nextId(),ObjectPathType:1,Name:""};return new n.ObjectPath(i,null,!1,!1)},t.createNewObjectObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:2,Name:i};return new n.ObjectPath(u,null,r,!1)},t.createPropertyObjectPath=function(t,i,r,u,f){var e={Id:t._nextId(),ObjectPathType:4,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id};return new n.ObjectPath(e,i._objectPath,u,f)},t.createIndexerObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i._objectPath,!1,!1)},t.createIndexerObjectPathUsingParentPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i,!1,!1)},t.createMethodObjectPath=function(t,i,r,u,f,e,o,s){var c={Id:t._nextId(),ObjectPathType:3,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},l=n.Utility.setMethodArguments(t,c.ArgumentInfo,f),h=new n.ObjectPath(c,i._objectPath,e,o);return h.argumentObjectPaths=l,h.isWriteOperation=u!=1,h.getByIdMethodName=s,h},t.createReferenceIdObjectPath=function(t,i){var r={Id:t._nextId(),ObjectPathType:6,Name:i,ArgumentInfo:{}};return new n.ObjectPath(r,null,!1,!1)},t.createChildItemObjectPathUsingIndexerOrGetItemAt=function(i,r,u,f,e){var o=f[n.Constants.id];return n.Utility.isNullOrUndefined(o)&&(o=f[n.Constants.idPrivate]),i&&!n.Utility.isNullOrUndefined(o)?t.createChildItemObjectPathUsingIndexer(r,u,f):t.createChildItemObjectPathUsingGetItemAt(r,u,f,e)},t.createChildItemObjectPathUsingIndexer=function(t,i,r){var f=r[n.Constants.id],u;return n.Utility.isNullOrUndefined(f)&&(f=r[n.Constants.idPrivate]),u=u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u.ArgumentInfo.Arguments=[f],new n.ObjectPath(u,i._objectPath,!1,!1)},t.createChildItemObjectPathUsingGetItemAt=function(t,i,r,u){var e=r[n.Constants.index],f;return e&&(u=e),f={Id:t._nextId(),ObjectPathType:3,Name:n.Constants.getItemAt,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f.ArgumentInfo.Arguments=[u],new n.ObjectPath(f,i._objectPath,!1,!1)},t}();n.ObjectPathFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var f=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n._Internal.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(f,function(i){n.Utility.log("Response:");n.Utility.log(JSON.stringify(i));var r;r=i.status=="succeeded"?n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBody(i),n.RichApiMessageUtility.getResponseHeaders(i)):n.RichApiMessageUtility.buildResponseOnError(i.error.code,i.error.message);t(r)})})},t.SourceLibHeaderValue="officejs",t}();n.OfficeJsRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){var t;(function(t){function i(){return function(){"use strict";function wt(n){return typeof n=="function"||typeof n=="object"&&n!==null}function b(n){return typeof n=="function"}function bt(n){return typeof n=="object"&&n!==null}function kt(n){k=n}function dt(n){f=n}function ti(){var t=process.nextTick,n=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&n[1]==="0"&&n[2]==="10"&&(t=setImmediate),function(){t(c)}}function ii(){return function(){tt(c)}}function ri(){var n=0,i=new ut(c),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function ui(){var n=new MessageChannel;return n.port1.onmessage=c,function(){n.port2.postMessage(0)}}function ft(){return function(){setTimeout(c,1)}}function c(){for(var t,i,n=0;n=0?(n=n.substring(t+5,n.length),n<"14.14393"?!0:!1):!1}function i(){return typeof window=="undefined"&&typeof Promise=="function"?Promise:typeof window!="undefined"&&window.Promise?t()?n.PromiseImpl.Init():window.Promise:n.PromiseImpl.Init()}n.OfficePromise=i()}(t=n._Internal||(n._Internal={}));i=t.OfficePromise;n.Promise=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this._autoCleanupList={};this.m_context=n}return t.prototype.add=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._addCommon(n,!0)}):this._addCommon(n,!0)},t.prototype._autoAdd=function(n){this._addCommon(n,!1);this._autoCleanupList[n._objectPath.objectPathInfo.Id]=n},t.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(t,i){var r=this.m_context._autoCleanup&&!t[n.Constants.isTracked]&&t!==this.m_context._rootObject&&i&&!n.Utility.isNullOrEmptyString(i[n.Constants.referenceId]);r&&(this._autoCleanupList[t._objectPath.objectPathInfo.Id]=t,t[n.Constants.isTracked]=!0)},t.prototype._addCommon=function(t,i){if(t[n.Constants.isTracked]){i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id];return}var r=t[n.Constants.referenceId];n.Utility.isNullOrEmptyString(r)&&t._KeepReference&&(t._KeepReference(),n.ActionFactory.createInstantiateAction(this.m_context,t),i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id],t[n.Constants.isTracked]=!0)},t.prototype.remove=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._removeCommon(n)}):this._removeCommon(n)},t.prototype._removeCommon=function(t){var r=t[n.Constants.referenceId],i;n.Utility.isNullOrEmptyString(r)||(i=this.m_context._rootObject,i._RemoveReference&&i._RemoveReference(r),delete t[n.Constants.isTracked])},t.prototype._retrieveAndClearAutoCleanupList=function(){var n=this._autoCleanupList;return this._autoCleanupList={},n},t}();n.TrackedObjects=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.cannotRegisterEvent="CannotRegisterEvent",n.connectionFailureWithStatus="ConnectionFailureWithStatus",n.connectionFailureWithDetails="ConnectionFailureWithDetails",n.invalidObjectPath="InvalidObjectPath",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.invalidArgumentGeneric="InvalidArgumentGeneric",n.propertyNotLoaded="PropertyNotLoaded",n.runMustReturnPromise="RunMustReturnPromise",n.timeout="Timeout",n.propertyDoesNotExist="PropertyDoesNotExist",n.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",n.moreInfoInnerError="MoreInfoInnerError",n.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",n.valueNotLoaded="ValueNotLoaded",n.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage",n}();n.ResourceStrings=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.CannotRegisterEvent="The event handler cannot be registered.",n.ConnectionFailureWithStatus="The request failed with status code of {0}.",n.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}",n.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",n.InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',n.InvalidRequestContext="Cannot use the object across different request contexts.",n.PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",n.RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',n.Timeout="The operation has timed out.",n.ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.',n.invalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.",n}();n.ResourceStringValues=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.buildMessageArrayForIRequestExecutor=function(i,r,u,f){var o=JSON.stringify(u.Body),e;return n.Utility.log("Request:"),n.Utility.log(o),e={},e[n.Constants.sourceLibHeader]=f,t.buildRequestMessageSafeArray(i,r,"POST","ProcessQuery",e,o)},t.buildResponseOnSuccess=function(n,t){var i={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return i.Body=JSON.parse(n),i.Headers=t,i},t.buildResponseOnError=function(i,r){var u={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return u.ErrorCode=n.ErrorCodes.generalException,u.ErrorMessage=r,i==t.OfficeJsErrorCode_ooeNoCapability?u.ErrorCode=n.ErrorCodes.accessDenied:i==t.OfficeJsErrorCode_ooeActivityLimitReached?u.ErrorCode=n.ErrorCodes.activityLimitReached:i==t.OfficeJsErrorCode_ooeInvalidOrTimedOutSession&&(u.ErrorCode=n.ErrorCodes.invalidOrTimedOutSession,u.ErrorMessage=n.Utility._getResourceString(n.ResourceStrings.invalidOrTimedOutSessionMessage)),u},t.buildHttpResponseFromOfficeJsError=function(i,r){var f=500,u={};return u.error={},u.error.code=n.ErrorCodes.generalException,u.error.message=r,i===t.OfficeJsErrorCode_ooeNoCapability?(f=403,u.error.code=n.ErrorCodes.accessDenied):i===t.OfficeJsErrorCode_ooeActivityLimitReached&&(f=429,u.error.code=n.ErrorCodes.activityLimitReached),{statusCode:f,headers:{},body:JSON.stringify(u)}},t.buildRequestMessageSafeArray=function(n,t,i,r,u,f){var e=[],o;if(u)for(o in u)e.push(o),e.push(u[o]);var s=0,h="",c="",l="";return[n,i,r,e,f,s,t,h,c,l]},t.getResponseBody=function(n){return t.getResponseBodyFromSafeArray(n.value.data)},t.getResponseHeaders=function(n){return t.getResponseHeadersFromSafeArray(n.value.data)},t.getResponseBodyFromSafeArray=function(n){var t=n[2],i;return typeof t=="string"?t:(i=t,i.join(""))},t.getResponseHeadersFromSafeArray=function(n){var i=n[1],r,t;if(!i)return null;for(r={},t=0;t0&&f.push(i);return f},t.throwError=function(i,r,u){throw new n._Internal.RuntimeError({code:i,message:t._getResourceString(i,r),debugInfo:u?{errorLocation:u}:undefined});},t.createRuntimeError=function(t,i,r){return new n._Internal.RuntimeError({code:t,message:i,debugInfo:{errorLocation:r}})},t._getResourceString=function(i,r){var u,e,f,o;return typeof window!="undefined"&&window.Strings&&window.Strings.OfficeOM&&(e="L_"+i,f=window.Strings.OfficeOM[e],f&&(u=f)),u||(u=n.ResourceStringValues[i]),u||(u=i),t.isNullOrUndefined(r)||(Array.isArray(r)?(o=r,u=t._formatString(u,o)):u=u.replace("{0}",r)),u},t._formatString=function(t,i){return t.replace(/\{\d\}/g,function(t){var r=parseInt(t.substr(1,t.length-2));if(r0?".":"")+i;break;case 3:i=t.normalizeName(n.objectPathInfo.Name)+"()"+(i.length>0?".":"")+i;break;case 4:i=t.normalizeName(n.objectPathInfo.Name)+(i.length>0?".":"")+i;break;case 5:i="getItem()"+(i.length>0?".":"")+i;break;case 6:i="_reference()"+(i.length>0?".":"")+i;break}n=n.parentObjectPath}return i},t._createPromiseFromResult=function(t){return new n._Internal.OfficePromise(function(n,i){n(t)})},t._createTimeoutPromise=function(t){return new n._Internal.OfficePromise(function(n,i){setTimeout(function(){n(null)},t)})},t.promisify=function(t){return new n._Internal.OfficePromise(function(n,i){var r=function(t){t.status=="failed"?i(t.error):n(t.value)};t(r)})},t._addActionResultHandler=function(n,t,i){n.context._pendingRequest.addActionResultHandler(t,i)},t._handleNavigationPropertyResults=function(n,i,r){for(var u=0;u0},t._getLocalDocumentUrlPrefixLength=function(n){for(var i=["http://document.localhost","https://document.localhost","//document.localhost"],r=n.toLowerCase().trim(),t=0;t0))for(s=i.url.substr(f+1),e=s.split("&"),u=0;u0&&(f=i.substr(0,u),e=i.substr(u+1),f=t.trim(f),e=t.trim(e),s[f.toUpperCase()]=e));return s},t._parseErrorResponse=function(i){var r=null,f,e,u;if(!t.isNullOrEmptyString(i.body)){f=t.trim(i.body);try{r=JSON.parse(f)}catch(o){t.log("Error when parse "+f)}}return!t.isNullOrUndefined(r)&&typeof r=="object"&&r.error?(u=r.error.code,e=t._getResourceString(n.ResourceStrings.connectionFailureWithDetails,[i.statusCode.toString(),r.error.code,r.error.message])):e=t._getResourceString(n.ResourceStrings.connectionFailureWithStatus,i.statusCode.toString()),t.isNullOrEmptyString(u)&&(u=n.ErrorCodes.connectionFailure),{errorCode:u,errorMessage:e}},t._copyHeaders=function(n,t){if(n&&t)for(var i in n)t[i]=n[i]},t._logEnabled=!1,t._synchronousCleanup=!1,t.s_underscoreCharCode="_".charCodeAt(0),t}();n.Utility=t}(OfficeExtension||(OfficeExtension={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){function y(t,i){var u,r;if(OfficeExtension.Utility.isNullOrUndefined(i))return null;if(typeof i!="object"&&OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument,"searchOptions"),i instanceof n.SearchOptions)return i;u=n.SearchOptions.newObject(t);for(r in i)i.hasOwnProperty(r)&&(u[r]=i[r]);return u}var e=OfficeExtension.ObjectPathFactory.createPropertyObjectPath,r=OfficeExtension.ObjectPathFactory.createMethodObjectPath,a=OfficeExtension.ObjectPathFactory.createIndexerObjectPath,ni=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath,rr=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer,ur=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt,v=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt,f=OfficeExtension.ActionFactory.createMethodAction,u=OfficeExtension.ActionFactory.createSetPropertyAction,o=OfficeExtension.Utility.isNullOrUndefined,t=OfficeExtension.Utility.isUndefined,i=OfficeExtension.Utility.throwIfNotLoaded,s=OfficeExtension.Utility.load,h=OfficeExtension.Utility.fixObjectPathIfNecessary,c=OfficeExtension.Utility._addActionResultHandler,l=OfficeExtension.Utility._handleNavigationPropertyResults,p=OfficeExtension.Utility.adjustToDateTime,ti=function(a){function v(){a.apply(this,arguments)}return __extends(v,a),Object.defineProperty(v.prototype,"_className",{get:function(){return"Body"},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"contentControls",{get:function(){return this.m_contentControls||(this.m_contentControls=new n.ContentControlCollection(this.context,e(this.context,this,"ContentControls",!0,!1))),this.m_contentControls},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"font",{get:function(){return this.m_font||(this.m_font=new n.Font(this.context,e(this.context,this,"Font",!1,!1))),this.m_font},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"inlinePictures",{get:function(){return this.m_inlinePictures||(this.m_inlinePictures=new n.InlinePictureCollection(this.context,e(this.context,this,"InlinePictures",!0,!1))),this.m_inlinePictures},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"lists",{get:function(){return this.m_lists||(this.m_lists=new n.ListCollection(this.context,e(this.context,this,"Lists",!0,!1))),this.m_lists},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"paragraphs",{get:function(){return this.m_paragraphs||(this.m_paragraphs=new n.ParagraphCollection(this.context,e(this.context,this,"Paragraphs",!0,!1))),this.m_paragraphs},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentBody",{get:function(){return this.m_parentBody||(this.m_parentBody=new n.Body(this.context,e(this.context,this,"ParentBody",!1,!1))),this.m_parentBody},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentBodyOrNullObject",{get:function(){return this.m_parentBodyOrNullObject||(this.m_parentBodyOrNullObject=new n.Body(this.context,e(this.context,this,"ParentBodyOrNullObject",!1,!1))),this.m_parentBodyOrNullObject},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentContentControl",{get:function(){return this.m_parentContentControl||(this.m_parentContentControl=new n.ContentControl(this.context,e(this.context,this,"ParentContentControl",!1,!1))),this.m_parentContentControl},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentContentControlOrNullObject",{get:function(){return this.m_parentContentControlOrNullObject||(this.m_parentContentControlOrNullObject=new n.ContentControl(this.context,e(this.context,this,"ParentContentControlOrNullObject",!1,!1))),this.m_parentContentControlOrNullObject},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentSection",{get:function(){return this.m_parentSection||(this.m_parentSection=new n.Section(this.context,e(this.context,this,"ParentSection",!1,!1))),this.m_parentSection},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentSectionOrNullObject",{get:function(){return this.m_parentSectionOrNullObject||(this.m_parentSectionOrNullObject=new n.Section(this.context,e(this.context,this,"ParentSectionOrNullObject",!1,!1))),this.m_parentSectionOrNullObject},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"tables",{get:function(){return this.m_tables||(this.m_tables=new n.TableCollection(this.context,e(this.context,this,"Tables",!0,!1))),this.m_tables},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"style",{get:function(){return i("style",this.m_style,"Body",this._isNull),this.m_style},set:function(n){this.m_style=n;u(this.context,this,"Style",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"styleBuiltIn",{get:function(){return i("styleBuiltIn",this.m_styleBuiltIn,"Body",this._isNull),this.m_styleBuiltIn},set:function(n){this.m_styleBuiltIn=n;u(this.context,this,"StyleBuiltIn",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"text",{get:function(){return i("text",this.m_text,"Body",this._isNull),this.m_text},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"type",{get:function(){return i("type",this.m_type,"Body",this._isNull),this.m_type},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"Body",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),v.prototype.set=function(n,t){this._recursivelySet(n,t,["style","styleBuiltIn"],["font"],["contentControls","inlinePictures","lists","paragraphs","parentBody","parentBodyOrNullObject","parentContentControl","parentContentControlOrNullObject","parentSection","parentSectionOrNullObject","tables","contentControls","inlinePictures","lists","paragraphs","parentBody","parentBodyOrNullObject","parentContentControl","parentContentControlOrNullObject","parentSection","parentSectionOrNullObject","tables"])},v.prototype.clear=function(){f(this.context,this,"Clear",0,[])},v.prototype.getHtml=function(){var t=f(this.context,this,"GetHtml",1,[]),n=new OfficeExtension.ClientResult;return c(this,t,n),n},v.prototype.getOoxml=function(){var t=f(this.context,this,"GetOoxml",1,[]),n=new OfficeExtension.ClientResult;return c(this,t,n),n},v.prototype.getRange=function(t){return new n.Range(this.context,r(this.context,this,"GetRange",1,[t],!1,!1,null))},v.prototype.insertBreak=function(n,t){f(this.context,this,"InsertBreak",0,[n,t])},v.prototype.insertContentControl=function(){return new n.ContentControl(this.context,r(this.context,this,"InsertContentControl",0,[],!1,!0,null))},v.prototype.insertFileFromBase64=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertFileFromBase64",0,[t,i],!1,!0,null))},v.prototype.insertHtml=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertHtml",0,[t,i],!1,!0,null))},v.prototype.insertInlinePictureFromBase64=function(t,i){return new n.InlinePicture(this.context,r(this.context,this,"InsertInlinePictureFromBase64",0,[t,i],!1,!0,null))},v.prototype.insertOoxml=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertOoxml",0,[t,i],!1,!0,null))},v.prototype.insertParagraph=function(t,i){return new n.Paragraph(this.context,r(this.context,this,"InsertParagraph",0,[t,i],!1,!0,null))},v.prototype.insertTable=function(t,i,u,f){return new n.Table(this.context,r(this.context,this,"InsertTable",0,[t,i,u,f],!1,!0,null))},v.prototype.insertText=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertText",0,[t,i],!1,!0,null))},v.prototype.search=function(t,i){return i=y(this.context,i),new n.RangeCollection(this.context,r(this.context,this,"Search",1,[t,i],!0,!1,null))},v.prototype.select=function(n){f(this.context,this,"Select",1,[n])},v.prototype._KeepReference=function(){f(this.context,this,"_KeepReference",1,[])},v.prototype._handleResult=function(n){if(a.prototype._handleResult.call(this,n),!o(n)){var i=n;h(this,i);t(i.Style)||(this.m_style=i.Style);t(i.StyleBuiltIn)||(this.m_styleBuiltIn=i.StyleBuiltIn);t(i.Text)||(this.m_text=i.Text);t(i.Type)||(this.m_type=i.Type);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);l(this,i,["contentControls","ContentControls","font","Font","inlinePictures","InlinePictures","lists","Lists","paragraphs","Paragraphs","parentBody","ParentBody","parentBodyOrNullObject","ParentBodyOrNullObject","parentContentControl","ParentContentControl","parentContentControlOrNullObject","ParentContentControlOrNullObject","parentSection","ParentSection","parentSectionOrNullObject","ParentSectionOrNullObject","tables","Tables"])}},v.prototype.load=function(n){return s(this,n),this},v.prototype._handleIdResult=function(n){(a.prototype._handleIdResult.call(this,n),o(n))||t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId)},v.prototype.track=function(){return this.context.trackedObjects.add(this),this},v.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},v.prototype.toJSON=function(){return{font:this.m_font,style:this.m_style,styleBuiltIn:this.m_styleBuiltIn,text:this.m_text,type:this.m_type}},v}(OfficeExtension.ClientObject),w,b,k,d,g,nt,tt,it,rt,ut,ft,et,ot,st,ht,ct,lt,at,vt,yt,pt,wt,bt,kt,dt,gt,ii,ri,ui,fi,ei,oi,si,hi,ci,li,ai,vi,yi,pi,wi,bi,ki,di,gi,nr,tr,ir;n.Body=ti;w=function(a){function v(){a.apply(this,arguments)}return __extends(v,a),Object.defineProperty(v.prototype,"_className",{get:function(){return"ContentControl"},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"contentControls",{get:function(){return this.m_contentControls||(this.m_contentControls=new n.ContentControlCollection(this.context,e(this.context,this,"ContentControls",!0,!1))),this.m_contentControls},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"font",{get:function(){return this.m_font||(this.m_font=new n.Font(this.context,e(this.context,this,"Font",!1,!1))),this.m_font},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"inlinePictures",{get:function(){return this.m_inlinePictures||(this.m_inlinePictures=new n.InlinePictureCollection(this.context,e(this.context,this,"InlinePictures",!0,!1))),this.m_inlinePictures},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"lists",{get:function(){return this.m_lists||(this.m_lists=new n.ListCollection(this.context,e(this.context,this,"Lists",!0,!1))),this.m_lists},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"paragraphs",{get:function(){return this.m_paragraphs||(this.m_paragraphs=new n.ParagraphCollection(this.context,e(this.context,this,"Paragraphs",!0,!1))),this.m_paragraphs},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentBody",{get:function(){return this.m_parentBody||(this.m_parentBody=new n.Body(this.context,e(this.context,this,"ParentBody",!1,!1))),this.m_parentBody},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentContentControl",{get:function(){return this.m_parentContentControl||(this.m_parentContentControl=new n.ContentControl(this.context,e(this.context,this,"ParentContentControl",!1,!1))),this.m_parentContentControl},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentContentControlOrNullObject",{get:function(){return this.m_parentContentControlOrNullObject||(this.m_parentContentControlOrNullObject=new n.ContentControl(this.context,e(this.context,this,"ParentContentControlOrNullObject",!1,!1))),this.m_parentContentControlOrNullObject},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentTable",{get:function(){return this.m_parentTable||(this.m_parentTable=new n.Table(this.context,e(this.context,this,"ParentTable",!1,!1))),this.m_parentTable},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentTableCell",{get:function(){return this.m_parentTableCell||(this.m_parentTableCell=new n.TableCell(this.context,e(this.context,this,"ParentTableCell",!1,!1))),this.m_parentTableCell},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentTableCellOrNullObject",{get:function(){return this.m_parentTableCellOrNullObject||(this.m_parentTableCellOrNullObject=new n.TableCell(this.context,e(this.context,this,"ParentTableCellOrNullObject",!1,!1))),this.m_parentTableCellOrNullObject},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentTableOrNullObject",{get:function(){return this.m_parentTableOrNullObject||(this.m_parentTableOrNullObject=new n.Table(this.context,e(this.context,this,"ParentTableOrNullObject",!1,!1))),this.m_parentTableOrNullObject},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"tables",{get:function(){return this.m_tables||(this.m_tables=new n.TableCollection(this.context,e(this.context,this,"Tables",!0,!1))),this.m_tables},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"appearance",{get:function(){return i("appearance",this.m_appearance,"ContentControl",this._isNull),this.m_appearance},set:function(n){this.m_appearance=n;u(this.context,this,"Appearance",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"cannotDelete",{get:function(){return i("cannotDelete",this.m_cannotDelete,"ContentControl",this._isNull),this.m_cannotDelete},set:function(n){this.m_cannotDelete=n;u(this.context,this,"CannotDelete",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"cannotEdit",{get:function(){return i("cannotEdit",this.m_cannotEdit,"ContentControl",this._isNull),this.m_cannotEdit},set:function(n){this.m_cannotEdit=n;u(this.context,this,"CannotEdit",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"color",{get:function(){return i("color",this.m_color,"ContentControl",this._isNull),this.m_color},set:function(n){this.m_color=n;u(this.context,this,"Color",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"id",{get:function(){return i("id",this.m_id,"ContentControl",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"placeholderText",{get:function(){return i("placeholderText",this.m_placeholderText,"ContentControl",this._isNull),this.m_placeholderText},set:function(n){this.m_placeholderText=n;u(this.context,this,"PlaceholderText",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"removeWhenEdited",{get:function(){return i("removeWhenEdited",this.m_removeWhenEdited,"ContentControl",this._isNull),this.m_removeWhenEdited},set:function(n){this.m_removeWhenEdited=n;u(this.context,this,"RemoveWhenEdited",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"style",{get:function(){return i("style",this.m_style,"ContentControl",this._isNull),this.m_style},set:function(n){this.m_style=n;u(this.context,this,"Style",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"styleBuiltIn",{get:function(){return i("styleBuiltIn",this.m_styleBuiltIn,"ContentControl",this._isNull),this.m_styleBuiltIn},set:function(n){this.m_styleBuiltIn=n;u(this.context,this,"StyleBuiltIn",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"subtype",{get:function(){return i("subtype",this.m_subtype,"ContentControl",this._isNull),this.m_subtype},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"tag",{get:function(){return i("tag",this.m_tag,"ContentControl",this._isNull),this.m_tag},set:function(n){this.m_tag=n;u(this.context,this,"Tag",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"text",{get:function(){return i("text",this.m_text,"ContentControl",this._isNull),this.m_text},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"title",{get:function(){return i("title",this.m_title,"ContentControl",this._isNull),this.m_title},set:function(n){this.m_title=n;u(this.context,this,"Title",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"type",{get:function(){return i("type",this.m_type,"ContentControl",this._isNull),this.m_type},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"ContentControl",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),v.prototype.set=function(n,t){this._recursivelySet(n,t,["title","tag","placeholderText","appearance","color","removeWhenEdited","cannotDelete","cannotEdit","style","styleBuiltIn"],["font"],["contentControls","inlinePictures","lists","paragraphs","parentBody","parentContentControl","parentContentControlOrNullObject","parentTable","parentTableCell","parentTableCellOrNullObject","parentTableOrNullObject","tables","contentControls","inlinePictures","lists","paragraphs","parentBody","parentContentControl","parentContentControlOrNullObject","parentTable","parentTableCell","parentTableCellOrNullObject","parentTableOrNullObject","tables"])},v.prototype.clear=function(){f(this.context,this,"Clear",0,[])},v.prototype.delete=function(n){f(this.context,this,"Delete",0,[n])},v.prototype.getHtml=function(){var t=f(this.context,this,"GetHtml",1,[]),n=new OfficeExtension.ClientResult;return c(this,t,n),n},v.prototype.getOoxml=function(){var t=f(this.context,this,"GetOoxml",1,[]),n=new OfficeExtension.ClientResult;return c(this,t,n),n},v.prototype.getRange=function(t){return new n.Range(this.context,r(this.context,this,"GetRange",1,[t],!1,!1,null))},v.prototype.getTextRanges=function(t,i){return new n.RangeCollection(this.context,r(this.context,this,"GetTextRanges",1,[t,i],!0,!1,null))},v.prototype.insertBreak=function(n,t){f(this.context,this,"InsertBreak",0,[n,t])},v.prototype.insertFileFromBase64=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertFileFromBase64",0,[t,i],!1,!0,null))},v.prototype.insertHtml=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertHtml",0,[t,i],!1,!0,null))},v.prototype.insertInlinePictureFromBase64=function(t,i){return new n.InlinePicture(this.context,r(this.context,this,"InsertInlinePictureFromBase64",0,[t,i],!1,!0,null))},v.prototype.insertOoxml=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertOoxml",0,[t,i],!1,!0,null))},v.prototype.insertParagraph=function(t,i){return new n.Paragraph(this.context,r(this.context,this,"InsertParagraph",0,[t,i],!1,!0,null))},v.prototype.insertTable=function(t,i,u,f){return new n.Table(this.context,r(this.context,this,"InsertTable",0,[t,i,u,f],!1,!0,null))},v.prototype.insertText=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertText",0,[t,i],!1,!0,null))},v.prototype.search=function(t,i){return i=y(this.context,i),new n.RangeCollection(this.context,r(this.context,this,"Search",1,[t,i],!0,!1,null))},v.prototype.select=function(n){f(this.context,this,"Select",1,[n])},v.prototype.split=function(t,i,u,f){return new n.RangeCollection(this.context,r(this.context,this,"Split",1,[t,i,u,f],!0,!1,null))},v.prototype._KeepReference=function(){f(this.context,this,"_KeepReference",1,[])},v.prototype._handleResult=function(n){if(a.prototype._handleResult.call(this,n),!o(n)){var i=n;h(this,i);t(i.Appearance)||(this.m_appearance=i.Appearance);t(i.CannotDelete)||(this.m_cannotDelete=i.CannotDelete);t(i.CannotEdit)||(this.m_cannotEdit=i.CannotEdit);t(i.Color)||(this.m_color=i.Color);t(i.Id)||(this.m_id=i.Id);t(i.PlaceholderText)||(this.m_placeholderText=i.PlaceholderText);t(i.RemoveWhenEdited)||(this.m_removeWhenEdited=i.RemoveWhenEdited);t(i.Style)||(this.m_style=i.Style);t(i.StyleBuiltIn)||(this.m_styleBuiltIn=i.StyleBuiltIn);t(i.Subtype)||(this.m_subtype=i.Subtype);t(i.Tag)||(this.m_tag=i.Tag);t(i.Text)||(this.m_text=i.Text);t(i.Title)||(this.m_title=i.Title);t(i.Type)||(this.m_type=i.Type);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);l(this,i,["contentControls","ContentControls","font","Font","inlinePictures","InlinePictures","lists","Lists","paragraphs","Paragraphs","parentBody","ParentBody","parentContentControl","ParentContentControl","parentContentControlOrNullObject","ParentContentControlOrNullObject","parentTable","ParentTable","parentTableCell","ParentTableCell","parentTableCellOrNullObject","ParentTableCellOrNullObject","parentTableOrNullObject","ParentTableOrNullObject","tables","Tables"])}},v.prototype.load=function(n){return s(this,n),this},v.prototype._handleIdResult=function(n){(a.prototype._handleIdResult.call(this,n),o(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},v.prototype.track=function(){return this.context.trackedObjects.add(this),this},v.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},v.prototype.toJSON=function(){return{appearance:this.m_appearance,cannotDelete:this.m_cannotDelete,cannotEdit:this.m_cannotEdit,color:this.m_color,font:this.m_font,id:this.m_id,placeholderText:this.m_placeholderText,removeWhenEdited:this.m_removeWhenEdited,style:this.m_style,styleBuiltIn:this.m_styleBuiltIn,subtype:this.m_subtype,tag:this.m_tag,text:this.m_text,title:this.m_title,type:this.m_type}},v}(OfficeExtension.ClientObject);n.ContentControl=w;b=function(u){function e(){u.apply(this,arguments)}return __extends(e,u),Object.defineProperty(e.prototype,"_className",{get:function(){return"ContentControlCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return i("items",this.m__items,"ContentControlCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"ContentControlCollection",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),e.prototype.getById=function(t){return new n.ContentControl(this.context,r(this.context,this,"GetById",1,[t],!1,!1,null))},e.prototype.getByIdOrNullObject=function(t){return new n.ContentControl(this.context,r(this.context,this,"GetByIdOrNullObject",1,[t],!1,!1,null))},e.prototype.getByTag=function(t){return new n.ContentControlCollection(this.context,r(this.context,this,"GetByTag",1,[t],!0,!1,null))},e.prototype.getByTitle=function(t){return new n.ContentControlCollection(this.context,r(this.context,this,"GetByTitle",1,[t],!0,!1,null))},e.prototype.getByTypes=function(t){return new n.ContentControlCollection(this.context,r(this.context,this,"GetByTypes",1,[t],!0,!1,null))},e.prototype.getFirst=function(){return new n.ContentControl(this.context,r(this.context,this,"GetFirst",1,[],!1,!1,null))},e.prototype.getFirstOrNullObject=function(){return new n.ContentControl(this.context,r(this.context,this,"GetFirstOrNullObject",1,[],!1,!1,null))},e.prototype.getItem=function(t){return new n.ContentControl(this.context,a(this.context,this,[t]))},e.prototype._KeepReference=function(){f(this.context,this,"_KeepReference",1,[])},e.prototype._handleResult=function(i){var r,e,f,s;if((u.prototype._handleResult.call(this,i),!o(i))&&(r=i,h(this,r),t(r._ReferenceId)||(this.m__ReferenceId=r._ReferenceId),!o(r[OfficeExtension.Constants.items])))for(this.m__items=[],e=r[OfficeExtension.Constants.items],f=0;f0?i.push(t):t.tabIndex===0&&r.push(t):r.push(t);return i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;return r===0&&(r=i.indexOf(n)-i.indexOf(t)),r}),[].concat(i,r)}var o="focus",s="on",k="configurable",d="writable",h="enumerable",u="",c="undefined",t=!1,i=!0,l=2147483647,n=null,r=-1,a=r,g="&_xdm_Info=",nt="&_serializer_version=",tt="_xdm_",ft="_serializer_version=",v="#",it="&",f="class",y={},et=3e4,p=n,w=n,e=(new Date).getTime();return{set_entropy:function(n){var t,r,i;if(typeof n=="string")for(t=0;t6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(r)===OSF.DDA.SettingsManager.DataJSONSuffix&&(i=new Date(parseInt(t.slice(5,r))),i)?i:t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,i);f[u]=t}catch(e){}}return f},loadScript:function(r,u,f){var s,e,o,h,c;r&&u&&(s=window.document,e=y[r],e?e.loaded?u():e.pendingCallbacks.push(u):(o=s.createElement("script"),o.type="text/javascript",e={loaded:t,pendingCallbacks:[u],timer:n},y[r]=e,h=function(){var r,t,u;for(e.timer!=n&&(clearTimeout(e.timer),delete e.timer),e.loaded=i,r=e.pendingCallbacks.length,t=0;t1?l[l.length-1]:n,s,h,c,a;return u&&o!=n&&(o.indexOf(it)>=0&&(o=o.split(it)[0]),o=decodeURIComponent(o)),s=b(),!f&&s&&(h=window.name.indexOf(i),h>r&&(c=window.name.indexOf(";",h),c==r&&(c=window.name.length),a=window.name.substring(h,c),o?s.setItem(a,o):o=s.getItem(a))),o},getConversationId:function(){var i=window.location.search,t=n,r;return i&&(r=i.indexOf("&"),t=r>0?i.substring(1,r):i.substr(1),t&&t.charAt(t.length-1)==="="&&(t=t.substring(0,t.length-1),t&&(t=decodeURIComponent(t)))),t},getInfoItems:function(n){var t=n.split("$");return typeof t[1]==c&&(t=n.split("|")),typeof t[1]==c&&(t=n.split("%7C")),t},getXdmFieldValue:function(n,t){var r=u,f=OSF.OUtil.parseXdmInfo(t),i;if(f&&(i=OSF.OUtil.getInfoItems(f),i!=undefined&&i.length>=3))switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]),f;if(u)throw u;for(f in r)if(u=Function._validateParameter(n[f],r[f],f),u)throw u;},writeProfilerMark:function(n){window.msWriteProfilerMark&&(window.msWriteProfilerMark(n),OsfMsAjaxFactory.msAjaxDebug.trace(n))},outputDebug:function(n){typeof OsfMsAjaxFactory!==c&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){var e,f;r=r||{};for(e in u)f=u[e],r[f]==undefined&&(r[f]=i);return Object.defineProperty(n,t,r),n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[h])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[h])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[d,h,k])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[d,h,k])},finalizeProperties:function(n,r){var e,u;r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8,e=o&255,i[t++]=r>>2,i[t++]=(r&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63,isNaN(o)||(r=o>>8,f=h&255,e=h>>8,i[t++]=r>>2,i[t++]=(r&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63),isNaN(o)?i[t-1]=64:isNaN(h)&&(i[t-2]=64,i[t-1]=64),c=0;c0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){var u,i,f,r;if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(u=[],i=0;in)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=ut(u),e=f?u.length-1:0,u.length===0)return n;while(!h&&e>=0&&en)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=ut(u),l=y(u,f),s=v(u.length,l,e),s<0)return n;while(!c&&s>=0&&s0;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[r%16],r=Math.floor(r/16);for(;t<32;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[Math.floor(Math.random()*16)];return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3};OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611,WordAndroid:8388613,PowerpointAndroid:8388614};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",Reserved:"reserved",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData",Base64:"base64"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidOpenBrowserWindow:102,dispidCreateDocumentMethod:105,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];return i?(i.name||(i.name=n[this.errorCodes.ooeInternalError].name),i.message||(i.message=n[this.errorCodes.ooeInternalError].message)):i=n[this.errorCodes.ooeInternalError],i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:t.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:t.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:t.L_SSOConnectionLostError,message:t.L_SSOConnectionLostErrorMessage}}}}(),function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}(),r,i,h,u,c,l,f,a,e,v,y,p,w,b,o,k,d,g,s,nt,tt,it,rt;n.RequirementVersion=ut;r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){var f,u,e,i,r;if(n==undefined)return!1;if(t==undefined&&(t=0),f=this._setMap,u=f._sets,u.hasOwnProperty(n.toLowerCase())){e=u[n.toLowerCase()];try{if((i=this._getVersion(e),t=t+"",r=this._getVersion(t),i.major>0&&i.major>r.major)||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),i=0,r=0;if(t.length<2&&isNaN(Number(n)))throw u;else if(i=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(i)||isNaN(r))throw u;return{minor:r,major:i}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;h=function(n){function i(){n.call(this,{dialogapi:t})}return __extends(i,n),i}(i);n.DefaultDialogSetRequirement=h;u=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelClientDefaultSetRequirement=u;c=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(u);n.ExcelClientV1DefaultSetRequirement=c;l=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookClientDefaultSetRequirement=l;f=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return __extends(i,n),i}(i);n.WordClientDefaultSetRequirement=f;a=function(n){function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return __extends(i,n),i}(f);n.WordClientV1DefaultSetRequirement=a;e=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointClientDefaultSetRequirement=e;v=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(e);n.PowerpointClientV1DefaultSetRequirement=v;y=function(n){function i(){n.call(this,{selection:t,textcoercion:t})}return __extends(i,n),i}(i);n.ProjectClientDefaultSetRequirement=y;p=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return __extends(i,n),i}(i);n.ExcelWebDefaultSetRequirement=p;w=function(n){function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordWebDefaultSetRequirement=w;b=function(n){function i(){n.call(this,{activeview:t,settings:t})}return __extends(i,n),i}(i);n.PowerpointWebDefaultSetRequirement=b;o=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookWebDefaultSetRequirement=o;k=function(n){function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.SwayWebDefaultSetRequirement=k;d=function(n){function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return __extends(i,n),i}(i);n.AccessWebDefaultSetRequirement=d;g=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelIOSDefaultSetRequirement=g;s=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordIOSDefaultSetRequirement=s;nt=function(n){function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return __extends(t,n),t}(s);n.WordIOSV1DefaultSetRequirement=nt;tt=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointIOSDefaultSetRequirement=tt;it=function(n){function i(){n.call(this,{mailbox:t})}return __extends(i,n),i}(i);n.OutlookIOSDefaultSetRequirement=it;rt=function(){function n(){}var t="undefined";return n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},n.getDefaultRequirementMatrix=function(u){var f,e,s,o;return this.initializeDefaultSetMatrix(),f=undefined,e=u.get_requirementMatrix(),e!=undefined&&e.length>0&&typeof JSON!==t?(s=JSON.parse(u.get_requirementMatrix().toLowerCase()),f=new r(new i(s))):(o=n.getClientFullVersionString(u),f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[o]!=undefined?new r(n.DefaultSetArrayMatrix[o]):new r(new i({}))),f},n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix(),e;return f!=undefined&&f.length>0&&typeof JSON!==t?(e=JSON.parse(n.get_requirementMatrix().toLowerCase()),u=new r(new i(e))):u=new r(new h),u},n.getClientFullVersionString=function(n){var i=n.get_appMinorVersion(),u="",r="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;return f&&n.get_appVersion()==1?r=t==4096&&i>=15?"16.00.01":"16.00":n.get_appName()==64?r=n.get_appVersion():(u=i<10?"0"+i:""+i,r=n.get_appVersion()+"."+u),n.get_appName()+"-"+r},n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new c;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new v;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new l;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new w;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new b;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new g;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new k;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new nt;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new tt;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new it},n.Excel_RCLIENT_1600="1-16.00",n.Excel_RCLIENT_1601="1-16.01",n.Word_RCLIENT_1600="2-16.00",n.Word_RCLIENT_1601="2-16.01",n.PowerPoint_RCLIENT_1600="4-16.00",n.PowerPoint_RCLIENT_1601="4-16.01",n.Outlook_RCLIENT_1600="8-16.00",n.Excel_WAC_1600="16-16.00",n.Word_WAC_1600="32-16.00",n.Outlook_WAC_1600="64-16.00",n.Outlook_WAC_1601="64-16.01",n.Project_RCLIENT_1600="128-16.00",n.Access_WAC_1600="256-16.00",n.PowerPoint_WAC_1600="512-16.00",n.Excel_IOS_1600="1024-16.00",n.SWAY_WAC_1600="2048-16.00",n.Word_IOS_1600="4096-16.00",n.Word_IOS_16001="4096-16.00.01",n.PowerPoint_IOS_1600="8192-16.00",n.Outlook_IOS_1600="65536-16.00",n.DefaultSetArrayMatrix={},n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))}(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}return n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n},n.getInstance=function(){return n.hostObj===undefined&&(n.hostObj=new n),n.hostObj},n.prototype.getPlatform=function(){var n=this,t;return n.hostInfo.hostPlatform&&(t=n.hostInfo.hostPlatform.toLowerCase(),n.platformRemappings[t])?n.platformRemappings[t]:null},n.prototype.getHost=function(){var n=this,t;if(n.hostInfo.hostType){if(t=n.hostInfo.hostType.toLowerCase(),n.camelCaseMappings[t])return n.camelCaseMappings[t];if(t=n.capitalizeFirstLetter(n.hostInfo.hostType),Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null},n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null},n}();n.Host=t})(t=n.HostName||(n.HostName={}))}(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){n||(window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,n=!0)},disableShortcut:function(){n&&(t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window),n=!1)}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i,r,o,u,f,e;if(n&&typeof n=="string"&&(r=n.indexOf("#"),r!=-1)){o=n.substring(0,r);u=n.substring(r+1);switch(o){case"binding":case"bindings":u&&(i=new OSF.DDA.BindingPromise(u))}}if(i)return i.onFail=t,i;else if(t)if(f=typeof t,f=="function")e={},e[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(e,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext));else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f);};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this,s,e;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.auth&&OSF.OUtil.defineEnumerableProperty(f,"auth",{value:n.auth});n.application&&OSF.OUtil.defineEnumerableProperty(f,"application",{value:n.application});n.get_isDialog()?(e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e})):(t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t}),r&&(s=r.displayName||"appOM",delete r.displayName,OSF.OUtil.defineEnumerableProperty(f,s,{value:r})),u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}}),e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e}))};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Application=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this,u;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;return OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext()),n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,e=n.length,o=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){var u,i,r;for(u in n){if(i=n[u],r=t[u],i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw o();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw o();}};f.extractRequiredArguments=function(t,i,r){var f,u,h,s,c,l;if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(c=n.length-1;c>=s;c--){l=n[c];switch(typeof l){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=l;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}if(f=o.fillOptions(f,i,r,u),e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;return o.verifyArguments(t,f),f}var h="function",s=n.length,o=new OSF.DDA.ApiMethodCall(n,t,i,f,e);this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),u=c(n,r,t,i);return o.constructCallArgs(r,u,t,i)};this.processResponse=function(n,t,i,f){return n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n)};this.getCallArgs=function(n){for(var t,u,r,i=n.length-1;i>=s;i--){r=n[i];switch(typeof r){case"object":t=r;break;case h:u=r}}return t=t||{},u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u),t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],i=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],t,i,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback],u,r;f&&(u={},u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?u[OSF.DDA.AsyncResultEnum.Properties.Value]=i:(r={},i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i),f(new OSF.DDA.AsyncResult(u,r)))};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.SyncMethodNames[t]=i};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){function o(n,i,r,u){var o,c,s,h;if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(s=n.length-1;s>=e;s--){h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}return o=f.fillOptions(o,i,r,u),f.verifyArguments(t,o),o}var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),u=o(n,r,t,i);return f.constructCallArgs(r,u,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){function e(i,f){var a=i?{}:undefined,s,h,o,v,c,l;for(s in i){if(h=i[s],OSF.DDA.ListType.isListType(s)){o=[];for(v in h)o.push(e(h[v],f))}else OSF.OUtil.listContainsKey(r,s)?o=r[s][f](h):f==u&&n.preserveNesting(s)?o=e(h,f):(c=t[s],c?(l=c[f],l&&(o=l[h],o===undefined&&(o=h))):o=h);a[s]=o}return a}function l(i,r){var e,u,h,s;for(u in r)h=n.isComplexType(u)?l(i,t[u][o]):i[u],h!=undefined&&(e||(e={}),s=r[u],s==f&&(s=u),e[s]=n.pack(u,h));return e}function s(i,r,e){var o,a,h,l,p,v,y;e||(e={});for(o in r){if(a=r[o],a==f)h=i;else if(a==c){e[o]=i.toArray();continue}else h=i[a];if(h===null||h===undefined)e[o]=undefined;else if(h=n.unpack(o,h),n.isComplexType(o))l=t[o][u],n.preserveNesting(o)?e[o]=s(h,l):s(h,l,e);else if(OSF.DDA.ListType.isListType(o)){l={};p=OSF.DDA.ListType.getDescriptor(o);l[p]=f;v=new Array(h.length);for(y in h)v[y]=s(h[y],l);e[o]=v}else e[o]=h}return e}function a(n,i,r){var f=t[n][r],u,o,c;return r=="toHost"?(o=e(i,r),u=l(o,f)):r==h&&(c=s(i,f),u=e(c,r)),u}var h="fromHost",i=this,o="toHost",u=h,c="sourceData",f="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];t||(t={});i.addMapping=function(n,i){var e,h,c,l,r,s,a,v;if(i.map){e=i.map;h={};for(c in e)l=e[c],l==f&&(l=c),h[l]=c}else e=i.toHost,h=i.fromHost;if(r=t[n],r){s=r[o];for(a in s)e[a]=s[a];s=r[u];for(v in s)h[v]=s[v]}else r=t[n]={};r[o]=e;r[u]=h};i.toHost=function(n,t){return a(n,t,o)};i.fromHost=function(n,t){return a(n,t,u)};i.self=f;i.sourceData=c;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){return this.isDynamicType(n)?t[n].toHost(i):i};i.unpack=function(n,i){return this.isDynamicType(n)?t[n].fromHost(i):i}};OSF.DDA.getDecoratedParameterMap=function(n,t){function r(n){var i=null,r,t;if(n)for(i={},r=n.length,t=0;t0){for(r=[],i=0;i=s)break;if(f=Function._validateParameter(n[e],o,h),f)return f.popStackFrame(),f}return t}),Function._validateParameterCount||(Function._validateParameterCount=function(n,r,u){var f,s,e=r.length,h=n.length,c,l,a;if(he)for(s=i,f=0;f0&&t.push(u)}}catch(s){}return t}var i=[],t={};t[Microsoft.Office.WebExtension.Parameters.Data]=function(){var t=0,i=1;return{toHost:function(n){if(OSF.DDA.TableDataProperties&&typeof n!="string"&&n[OSF.DDA.TableDataProperties.TableRows]!==undefined){var r=[];r[t]=n[OSF.DDA.TableDataProperties.TableRows];r[i]=n[OSF.DDA.TableDataProperties.TableHeaders];n=r}return n},fromHost:function(r){var f,e,u;return r.toArray?(e=r.dimensions(),e===2?f=n(r):(u=r.toArray(),u.length===2&&(u[0]!=null&&u[0].toArray||u[1]!=null&&u[1].toArray)?(f={},f[OSF.DDA.TableDataProperties.TableRows]=n(u[t]),f[OSF.DDA.TableDataProperties.TableHeaders]=n(u[i])):f=u)):f=r,f}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,i,t);this.unpack=function(n,i){var r,u;return this.isComplexType(n)||OSF.DDA.ListType.isListType(n)?(u=(i||typeof i=="unknown")&&i.toArray,r=u?i.toArray():i||{}):r=this.isDynamicType(n)?t[n].fromHost(i):i,r}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(n){function t(n){var i=n,f,r,u;if(OSF.OUtil.isArray(n))for(f=i.length,r=0;r2)for(r=[],f=1;f=n.MESSAGE_TIME_DELTA?(h(),e.lastMessageTimestamp=o):(e.lastMessageTimestamp+=n.MESSAGE_TIME_DELTA,setTimeout(function(){h()},e.lastMessageTimestamp-o)),s},n.prototype.generateCorrelationId=function(){return++this.callingIndex,this.conversationId+this.callingIndex},n.getCurrentTimeMS=function(){return(new Date).getTime()},n.MESSAGE_TIME_DELTA=10,n}();n.WebkitScriptMessaging=i})(t=n.ScriptMessaging||(n.ScriptMessaging={}))}(OSFWebkit||(OSFWebkit={}));OSF.ScriptMessaging=OSFWebkit.ScriptMessaging,function(n){var i,r,t;n.MessageHandlerName="Agave";n.PopupMessageHandlerName="WefPopupHandler",function(n){var t="HostFullVersion",i="HostCustomMessage",r="RequirementMatrix",u="CommerceAllowed",f="TouchEnabled",e="InstanceId",o="CorrelationId",s="APISetVersion",h="SolutionToken",c="ControlIntegrationLevel",l="ActivationMode",a="DocumentUrl",v="BindingCount",y="AppDataLocale",p="APPUILocale",w="AppCapabilities",b="APIVersionSequence",k="RevisionVersion",d="MinorVersion",g="MajorVersion",nt="SolutionReferenceId",tt="Settings";n[n[tt]=0]=tt;n[n[nt]=1]=nt;n[n.AppType=2]="AppType";n[n[g]=3]=g;n[n[d]=4]=d;n[n[k]=5]=k;n[n[b]=6]=b;n[n[w]=7]=w;n[n[p]=8]=p;n[n[y]=9]=y;n[n[v]=10]=v;n[n[a]=11]=a;n[n[l]=12]=l;n[n[c]=13]=c;n[n[h]=14]=h;n[n[s]=15]=s;n[n[o]=16]=o;n[n[e]=17]=e;n[n[f]=18]=f;n[n[u]=19]=u;n[n[r]=20]=r;n[n[i]=21]=i;n[n[t]=22]=t}(n.AppContextProperties||(n.AppContextProperties={}));i=n.AppContextProperties,function(n){var t="SendMessage",i="GetContext",r="WriteSettings",u="UnregisterEvent",f="RegisterEvent";n[n.Execute=1]="Execute";n[n[f]=2]=f;n[n[u]=3]=u;n[n[r]=4]=r;n[n[i]=5]=i;n[n[t]=6]=t}(n.MethodId||(n.MethodId={}));r=n.MethodId;t=function(){function t(n){this.hostScriptProxy=n}var r="message",i=null;return t.prototype.execute=function(t,r,u){var f=r,e,o;f==i&&(f=[]);e={id:t,apiArgs:f};o=function(t){var e,f,r;if(u){if(e=[],OSF.OUtil.isArray(t))for(f=0;f=2&&(i=t[0],u=t[1]);r&&r(u,new n.WebkitSafeArray(i))},e=function(t){if(u)return u(new n.WebkitSafeArray(t))};this.hostScriptProxy.registerEvent(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.RegisterEvent,t,i,f,e)},t.prototype.unregisterEvent=function(t,i,r){var u=function(t){return r(new n.WebkitSafeArray(t))};this.hostScriptProxy.unregisterEvent(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.UnregisterEvent,t,i,u)},t.prototype.messageParent=function(n){var t=n[Microsoft.Office.WebExtension.Parameters.MessageToParent],i={dialogMessage:{messageType:OSF.DialogMessageType.DialogMessageReceived,messageContent:t}};window.opener.postMessage(JSON.stringify(i),window.location.origin)},t.prototype.openDialog=function(n,u,f,e){function c(t){if(t.origin==window.location.origin)try{var i=JSON.parse(t.data);i.dialogMessage&&f(n,[OSF.DialogMessageType.DialogMessageReceived,i.dialogMessage.messageContent])}catch(r){OsfMsAjaxFactory.msAjaxDebug.trace("messages received cannot be handlered. Message:"+t.data)}}function k(){try{(t.popup==i||t.popup.closed)&&(window.clearInterval(t.interval),window.removeEventListener(r,c),t.NotifyError=i,t.popup=i,f(n,[OSF.DialogMessageType.DialogClosed]))}catch(u){OsfMsAjaxFactory.msAjaxDebug.trace("Error happened when popup window closed.")}}var l,o,h,y;if(t.popup&&!t.popup.closed){e(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened);return}l="action=displayDialog";t.OpenDialogCallback=undefined;var a="#",s=JSON.parse(u),v=s.url;if(v){o=v.split(a);h="?";o[0].indexOf("?")>-1&&(h="&");var p=screen.width*s.width/100,w=screen.height*s.height/100,b="width="+p+", height="+w;o[0]=o[0].concat(h).concat(l);y=o.join(a);t.popup=window.open(y,"",b);t.OpenDialogCallback=function(i){if(i==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){window.addEventListener(r,c);this.messageEventListener=c;t.interval=window.setInterval(k,1e3);function u(t){f(n,[t])}t.NotifyError=u}e(i)}}},t.prototype.closeDialog=function(n,u,f){t.popup?(t.interval&&window.clearInterval(t.interval),t.popup.close(),t.popup=i,window.removeEventListener(r,this.messageEventListener),t.NotifyError=i,f(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)):f(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)},t.prototype.sendMessage=function(n){var t=n[Microsoft.Office.WebExtension.Parameters.MessageContent];!isNaN(parseFloat(t))&&isFinite(t)&&(t=t.toString());this.hostScriptProxy.invokeMethod(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.SendMessage,t,i)},t}();n.WebkitHostController=t}(OSFWebkit||(OSFWebkit={}));OSF.Webkit=OSFWebkit;OSF.ClientHostController=new OSFWebkit.WebkitHostController(OSF.ScriptMessaging.GetScriptMessenger());OSF.DDA.ClientSettingsManager={getSettingsExecuteMethod:function(n){return function(t){var i,r,u=function(n,i){t.onReceiving&&t.onReceiving();t.onComplete&&t.onComplete(n,i)};try{n(t.hostCallArgs,t.onCalling,u)}catch(f){i=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;r={name:Strings.OfficeOM.L_InternalError,message:f};u(i,r)}}},read:function(n,t){var u=[],f=[],i,r;n&&n();i=OSF._OfficeAppFactory.getInitializationHelper();r=function(n){t&&t(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,n.get_settings())};i.getAppContext(null,r)},write:function(n,t,i,r){var u={},e=[],o=[],f,s;for(f in n)e.push(f),o.push(n[f]);u.keys=e;u.values=o;i&&i();s=function(n){r&&r(n[0],null)};OSF.ScriptMessaging.GetScriptMessenger().invokeMethod(OSF.Webkit.MessageHandlerName,OSF.Webkit.MethodId.WriteSettings,u,s)}};OSF.InitializationHelper.prototype.initializeSettings=function(n,t){var i=n.get_settings();return this.deserializeSettings(i,t)};OSF.InitializationHelper.prototype.getAppContext=function(n,t){var r=function(n){for(var f,i=OSF.Webkit.AppContextProperties,h=n[i.AppType],e=n[i.Settings],o={},s=e[0],c=e[1],r=0;r40)&&(n=OSF.OUtil.Guid.generateNewGuid(),t.setValue(t.clientIDKey,n)),n},n.prototype.saveLog=function(n,t){var i=this,u=i.getValue(i.logIdSetKey);u=(u&&u.length>0?u+";":r)+n;i.setValue(i.logIdSetKey,u);i.setValue(n,t)},n.prototype.enumerateLog=function(n,t){var i=this,e=i.getValue(i.logIdSetKey),u,o,r,f;if(e){u=e.split(";");for(o in u)r=u[o],f=i.getValue(r),f&&(n&&n(r,f),t&&i.remove(r));t&&i.remove(i.logIdSetKey)}},n.prototype.getValue=function(n){var t=OSF.OUtil.getLocalStorage(),i=r;return t&&(i=t.getItem(n)),i},n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)},n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}},n}(),o=function(){function t(){}return t.prototype.LogData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(t)}catch(i){}},t.prototype.LogRawData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(t))}catch(i){}},t}();n.initialize=y;n.onAppActivated=p;n.onScriptDone=w;n.onCallDone=b;n.onMethodDone=k;n.onPropertyDone=d;n.onEventDone=g;n.onRegisterDone=nt;n.onAppClosed=tt;n.setOsfControlAppCorrelationId=it;n.doAppInitializationLogging=l;n.logAppCommonMessage=rt;n.logAppException=ut;OSF.AppTelemetry=n}(OSFAppTelemetry||(OSFAppTelemetry={}));Microsoft.Office.WebExtension.FileType={Text:"text",Compressed:"compressed",Pdf:"pdf"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FileProperties:"FileProperties",FileSliceProperties:"FileSliceProperties"});OSF.DDA.FileProperties={Handle:"FileHandle",FileSize:"FileSize",SliceSize:Microsoft.Office.WebExtension.Parameters.SliceSize};OSF.DDA.File=function(n,t,i){var r,u;OSF.OUtil.defineEnumerableProperties(this,{size:{value:t},sliceCount:{value:Math.ceil(t/i)}});r={};r[OSF.DDA.FileProperties.Handle]=n;r[OSF.DDA.FileProperties.SliceSize]=i;u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.GetDocumentCopyChunkAsync,u.ReleaseDocumentCopyAsync],r)};OSF.DDA.FileSliceOffset="fileSliceoffset";OSF.DDA.AsyncMethodNames.addNames({GetDocumentCopyAsync:"getFileAsync",GetDocumentCopyChunkAsync:"getSliceAsync",ReleaseDocumentCopyAsync:"closeAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FileType,"enum":Microsoft.Office.WebExtension.FileType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:{types:["number"],defaultValue:65536}}],checkCallArgs:function(n){var t=n[Microsoft.Office.WebExtension.Parameters.SliceSize];if(t<=0||t>4194304)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return n},onSucceeded:function(n,t,i){return new OSF.DDA.File(n[OSF.DDA.FileProperties.Handle],n[OSF.DDA.FileProperties.FileSize],i[Microsoft.Office.WebExtension.Parameters.SliceSize])}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(n,t){return t[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(r<0||r>=t.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;return n[OSF.DDA.FileSliceOffset]=parseInt((r*i[OSF.DDA.FileProperties.SliceSize]).toString()),n},onSucceeded:function(n,t,i){var r={};return OSF.OUtil.defineEnumerableProperties(r,{data:{value:n[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:i[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:n[OSF.DDA.FileProperties.SliceSize]}}),r}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FileType,{Text:"text",Pdf:"pdf"});Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(n){var i=this,r,t,u;if(i._eventHandlers={},i._objectEventHandlers={},i._queuedEventsArgs={},n!=null)for(r=0;r0)for(r=0;r0)for(r=0;r0?(this._eventHandlers[n]=[],!0):!1},clearObjectEventHandlers:function(n,t){return this._objectEventHandlers[n]!=null&&this._objectEventHandlers[n][t]!=null?(this._objectEventHandlers[n][t]=[],!0):!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},getObjectEventHandlerCount:function(n,t){return this._objectEventHandlers[n]==null||this._objectEventHandlers[n][t]==null?0:this._objectEventHandlers[n][t].length},fireEvent:function(n){var t,r,i;if(n.type==undefined)return!1;if(t=n.type,t&&this._eventHandlers[t]){for(r=this._eventHandlers[t],i=0;i0)){for(r=t[0];i.length>0;)u=i.shift(),r(u);return!0}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var o="hostPlatform",f="outlook",e="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(n,i[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:r=new OSF.DDA.RichApiMessageEventArgs(n,i);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i),t.initialize(r.initialData),(OSF._OfficeAppFactory.getHostInfo()[o]=="win32"||OSF._OfficeAppFactory.getHostInfo()[o]=="mac")&&t.setCurrentItemNumber(r.itemNumber.itemNumber);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkRecipientsChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var i=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),t=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];t(arguments,i,n)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(n){var i=OSF.DDA.SyncMethodNames.MessageParent.displayName,t=this,r;t[i]||OSF.OUtil.defineEnumerableProperty(t,i,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return n(arguments,t)}});r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;t[r]||typeof OSF.DialogParentMessageEventDispatch=="undefined"||OSF.DDA.DispIdHost.addEventSupport(t,OSF.DialogParentMessageEventDispatch,n);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(n){n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:n[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels,value:{types:["boolean"],defaultValue:!1}}],privateStateCallbacks:[],onSucceeded:function(n){var f=n[Microsoft.Office.WebExtension.Parameters.Id],i=n[Microsoft.Office.WebExtension.Parameters.Data],t=new OSF.DialogHandler,e=OSF.DDA.AsyncMethodNames.CloseAsync.displayName,r,u;return OSF.OUtil.defineEnumerableProperty(t,e,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];n(arguments,f,i,t)}}),r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName,OSF.OUtil.defineEnumerableProperty(t,r,{value:function(){var r=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],n=r.verifyAndExtractCall(arguments,t,i),u=n[Microsoft.Office.WebExtension.Parameters.EventType],f=n[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(u,f)}}),u=OSF.DDA.SyncMethodNames.SendMessage.displayName,OSF.OUtil.defineEnumerableProperty(t,u,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return n(arguments,i,t)}}),t},checkCallArgs:function(n){return n[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Width]=1),!n[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&n[Microsoft.Office.WebExtension.Parameters.Width]>100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99),n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1),!n[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99),n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(n){try{n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,n);OSF.ClientHostController.openDialog(n.dispId,n.targetId,function(t,i){n.onEvent&&n.onEvent(i);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(n){n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,n);try{OSF.ClientHostController.closeDialog(n.dispId,n.targetId,t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.messageParent=function(n){try{n.onCalling&&n.onCalling();var i=(new Date).getTime(),t=OSF.ClientHostController.messageParent(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs((new Date).getTime()-i),t),t}catch(r){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(r)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.sendMessage=function(n){try{n.onCalling&&n.onCalling();var r=(new Date).getTime(),t=OSF.ClientHostController.sendMessage(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),t}catch(i){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(i)}};OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(n){OSF.OUtil.defineEnumerableProperties(this,{url:{value:n[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(n){return new Microsoft.Office.WebExtension.FileProperties(n)}});Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"};Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"};Microsoft.Office.WebExtension.Index={First:"first",Last:"last",Next:"next",Previous:"previous"};OSF.DDA.AsyncMethodNames.addNames({GoToByIdAsync:"goToByIdAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GoToByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string","number"]},{name:Microsoft.Office.WebExtension.Parameters.GoToType,"enum":Microsoft.Office.WebExtension.GoToType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:{"enum":Microsoft.Office.WebExtension.SelectionMode,defaultValue:Microsoft.Office.WebExtension.SelectionMode.Default}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:0},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:1},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:2},{name:Microsoft.Office.WebExtension.GoToType.Index,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:0},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:1},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:1},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileProperties.FileSize,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0},{name:OSF.DDA.FileProperties.SliceSize,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:0},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:5},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:6}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:0}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileSliceOffset,value:1},{name:OSF.DDA.FileProperties.SliceSize,value:2}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0}]});OSF.DDA.AsyncMethodNames.addNames({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync"}),function(){function r(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&r&&(r[OSF.DDA.TableDataProperties.TableRows]!=undefined||r[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(r=OSF.DDA.OMFactory.manufactureTableData(r)),r=OSF.DDA.DataCoercion.coerceData(r,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),r==undefined?null:r}var i=!1,n="boolean",t="number";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,"enum":Microsoft.Office.WebExtension.CoercionType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}}],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object",t,n]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[t,n],defaultValue:i}}],privateStateCallbacks:[]})}();OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:1},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:2},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:3},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:4},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:5}]});OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",RefreshingSettings:"refreshingSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(n){return OSF.OUtil.serializeSettings(n)},deserializeSettings:function(n){return OSF.OUtil.deserializeSettings(n)}};OSF.DDA.Settings=function(n){var t="name",i;n=n||{};i=function(n){var i=OSF.OUtil.getSessionStorage(),t,r;i&&(t=OSF.DDA.SettingsManager.serializeSettings(n),r=JSON?JSON.stringify(t):Sys.Serialization.JavaScriptSerializer.serialize(t),i.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),r))};OSF.OUtil.defineEnumerableProperties(this,{get:{value:function(i){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]),r;if(u)throw u;return r=n[i],typeof r=="undefined"?null:r}},set:{value:function(r,u){var f=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1},{name:"value",mayBeNull:!0}]);if(f)throw f;n[r]=u;i(n)}},remove:{value:function(r){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]);if(u)throw u;delete n[r];i(n)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],n)};OSF.DDA.RefreshableSettings=function(n){OSF.DDA.RefreshableSettings.uber.constructor.call(this,n);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],n);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:n}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(n,t){return t}}],onSucceeded:function(n,t,i){var f=n[OSF.DDA.SettingsManager.SerializedSettings],u=OSF.DDA.SettingsManager.deserializeSettings(f),e=i[OSF.DDA.SettingsManager.RefreshingSettings];for(var r in e)t.remove(r);for(r in u)t.set(r,u[r]);return t}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(n,t){return OSF.DDA.SettingsManager.serializeSettings(t)}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});Microsoft.Office.WebExtension.BindingType={Table:"table",Text:"text",Matrix:"matrix"};OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType};OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{BindingList:"BindingList"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{Subset:"subset",BindingProperties:"BindingProperties"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList,OSF.DDA.PropertyDescriptors.BindingProperties);OSF.DDA.BindingPromise=function(n,t){this._id=n;OSF.OUtil.defineEnumerableProperty(this,"onFail",{get:function(){return t},set:function(n){var i=typeof n;if(i!="undefined"&&i!="function")throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,i);t=n}})};OSF.DDA.BindingPromise.prototype={_fetch:function(n){var t=this,i;return t.binding?n&&n(t.binding):t._binding||(i=t,Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(t._id,function(t){t.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded?(OSF.OUtil.defineEnumerableProperty(i,"binding",{value:t.value}),n&&n(i.binding)):i.onFail&&i.onFail(t)})),t},getDataAsync:function(){var n=arguments;return this._fetch(function(t){t.getDataAsync.apply(t,n)}),this},setDataAsync:function(){var n=arguments;return this._fetch(function(t){t.setDataAsync.apply(t,n)}),this},addHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.addHandlerAsync.apply(t,n)}),this},removeHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.removeHandlerAsync.apply(t,n)}),this}};OSF.DDA.BindingFacade=function(n){this._eventDispatches=[];OSF.OUtil.defineEnumerableProperty(this,"document",{value:n});var t=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[t.AddFromSelectionAsync,t.AddFromNamedItemAsync,t.GetAllAsync,t.GetByIdAsync,t.ReleaseByIdAsync])};OSF.DDA.UnknownBinding=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}})};OSF.DDA.Binding=function(n,t){var r,u,i,f;OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}});r=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[r.GetDataAsync,r.SetDataAsync]);u=Microsoft.Office.WebExtension.EventType;i=t.bindings._eventDispatches;i[n]||(i[n]=new OSF.EventDispatch([u.BindingSelectionChanged,u.BindingDataChanged]));f=i[n];OSF.DDA.DispIdHost.addEventSupport(this,f)};OSF.DDA.generateBindingId=function(){return"UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+(new Date).getTime()};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureBinding=function(n,t){var r=n[OSF.DDA.BindingProperties.Id],u=n[OSF.DDA.BindingProperties.RowCount],f=n[OSF.DDA.BindingProperties.ColumnCount],s=n[OSF.DDA.BindingProperties.HasHeaders],i,e,o;switch(n[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:i=new OSF.DDA.TextBinding(r,t);break;case Microsoft.Office.WebExtension.BindingType.Matrix:i=new OSF.DDA.MatrixBinding(r,t,u,f);break;case Microsoft.Office.WebExtension.BindingType.Table:e=function(){return OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument};o=e()&&OSF.DDA.ExcelTableBinding?OSF.DDA.ExcelTableBinding:OSF.DDA.TableBinding;i=new o(r,t,u,f,s);break;default:i=new OSF.DDA.UnknownBinding(r,t)}return i};OSF.DDA.AsyncMethodNames.addNames({AddFromSelectionAsync:"addFromSelectionAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:"getByIdAsync",ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync"}),function(){function u(n){return OSF.DDA.OMFactory.manufactureBinding(n,Microsoft.Office.WebExtension.context.document)}function f(n){return n.id}function e(n,t,i){var u=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&u&&(u[OSF.DDA.TableDataProperties.TableRows]!=undefined||u[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(u=OSF.DDA.OMFactory.manufactureTableData(u)),u=OSF.DDA.DataCoercion.coerceData(u,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),u==undefined?r:u}var t="number",i="object",n="string",r=null;OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:[n]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return!0}}],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.BindingList],u)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n,t,i){var r=i[Microsoft.Office.WebExtension.Parameters.Id];delete t._eventDispatches[r]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n,t){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&n[Microsoft.Office.WebExtension.Parameters.RowCount]==0&&n[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn],delete n[Microsoft.Office.WebExtension.Parameters.RowCount],delete n[Microsoft.Office.WebExtension.Parameters.ColumnCount]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]||n[Microsoft.Office.WebExtension.Parameters.RowCount]||n[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[n,i,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}]})}();OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.MatrixBinding=function(n,t,i,r){OSF.DDA.MatrixBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Matrix},rowCount:{value:i?i:0},columnCount:{value:r?r:0}})};OSF.OUtil.extend(OSF.DDA.MatrixBinding,OSF.DDA.Binding);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.BindingProperties,fromHost:[{name:OSF.DDA.BindingProperties.Id,value:0},{name:OSF.DDA.BindingProperties.Type,value:1},{name:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,value:2}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.BindingType,toHost:[{name:Microsoft.Office.WebExtension.BindingType.Text,value:0},{name:Microsoft.Office.WebExtension.BindingType.Matrix,value:1},{name:Microsoft.Office.WebExtension.BindingType.Table,value:2}],invertible:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,value:0},{name:Microsoft.Office.WebExtension.Parameters.Id,value:1},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:2},{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseBindingMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAllBindingsMethod,fromHost:[{name:OSF.DDA.ListDescriptors.BindingList,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:2},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:3},{name:OSF.DDA.PropertyDescriptors.Subset,value:4}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.Data,value:2},{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,fromHost:[{name:OSF.DDA.BindingProperties.RowCount,value:0},{name:OSF.DDA.BindingProperties.ColumnCount,value:1},{name:OSF.DDA.BindingProperties.HasHeaders,value:2}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.Subset,toHost:[{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:0},{name:OSF.DDA.SafeArray.UniqueArguments.Run,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Offset,toHost:[{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:0},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Run,toHost:[{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:0},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddColumnsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearAllRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});Microsoft.Office.WebExtension.TableData=function(n,t){function i(n){if(n==null||n==undefined)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(n,2);t<2;t++)n=[n];return n}catch(i){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(n){t=i(n)}},rows:{get:function(){return n},set:function(t){n=t==null||OSF.OUtil.isArray(t)&&t.length==0?[]:i(t)}}});this.headers=t;this.rows=n};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(n){return new Microsoft.Office.WebExtension.TableData(n[OSF.DDA.TableDataProperties.TableRows],n[OSF.DDA.TableDataProperties.TableHeaders])};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{TableDataProperties:"TableDataProperties"});OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};OSF.DDA.TableBinding=function(n,t,i,r,u){OSF.DDA.TableBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:i?i:0},columnCount:{value:r?r:0},hasHeaders:{value:u?u:!1}});var f=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[f.AddRowsAsync,f.AddColumnsAsync,f.DeleteAllDataValuesAsync])};OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync"}),function(){function n(n){return n.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]})}();OSF.DDA.TextBinding=function(n,t){OSF.DDA.TextBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperty(this,"type",{value:Microsoft.Office.WebExtension.BindingType.Text})};OSF.OUtil.extend(OSF.DDA.TextBinding,OSF.DDA.Binding);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"});OSF.DDA.DocumentSelectionChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:n}})};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDeleted:"objectDeleted"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectSelectionChanged:"objectSelectionChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDataChanged:"objectDataChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ContentControlAdded:"contentControlAdded"});OSF.DDA.ObjectEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:n},object:{value:t}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDeletedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDataChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidContentControlAddedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{BindingSelectionChanged:"bindingSelectionChanged",BindingDataChanged:"bindingDataChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{BindingSelectionChangedEvent:"BindingSelectionChangedEvent"});OSF.DDA.BindingSelectionChangedEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingSelectionChanged},binding:{value:n}});for(var i in t)OSF.OUtil.defineEnumerableProperty(this,i,{value:t[i]})};OSF.DDA.BindingDataChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingDataChanged},binding:{value:n}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:0},{name:OSF.DDA.PropertyDescriptors.Subset,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingDataChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var n=null;return{findArrayDimensionality:function(n){if(OSF.OUtil.isArray(n)){for(var t=0,i=0;i0},enumerable:!0,configurable:!0}),t.prototype._getLastAction=function(){return this.m_actions[this.m_actions.length-1]},t.prototype.addTrace=function(n,t){this.m_traceInfos[n]=t},t.prototype.ensureInstantiateObjectPath=function(t){if(t){if(this.m_instantiatedObjectPaths[t.objectPathInfo.Id])return;if(this.ensureInstantiateObjectPath(t.parentObjectPath),this.ensureInstantiateObjectPaths(t.argumentObjectPaths),!this.m_instantiatedObjectPaths[t.objectPathInfo.Id]){var r={Id:this.m_context._nextId(),ActionType:1,Name:"",ObjectPathId:t.objectPathInfo.Id},i=new n.Action(r,!1,!1);i.referencedObjectPath=t;this.addAction(i)}}},t.prototype.ensureInstantiateObjectPaths=function(n){if(n)for(var t=0;t=0;--r)if(i=n[r],u=i.actionInfo.Id,i.referencedObjectPath&&t._updateLastUsedActionIdOfObjectPathId(e,i.referencedObjectPath,u),o=i.referencedArgumentObjectPaths,o)for(v=o.length,s=0;s0?i.actionInfo.L=c:i.actionInfo.L&&delete i.actionInfo.L},t}();n.ClientRequest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;n._internalConfig={showDisposeInfoInDebugInfo:!1,enableEarlyDispose:!0,alwaysPolyfillClientObjectRetrieveMethod:!1};t=function(){function t(){}return t.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},t.prototype._createRequestExecutorOrNull=function(){return null},Object.defineProperty(t.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),t}();n.SessionBase=t;i=function(){function i(r){if(this.m_customRequestHeaders={},this._onRunFinishedNotifiers=[],this.m_nextId=0,i._overrideSession)this.m_requestUrlAndHeaderInfoResolver=i._overrideSession;else if((n.Utility.isNullOrUndefined(r)||typeof r=="string"&&r.length===0)&&(r=i.defaultRequestUrlAndHeaders,r||(r={url:n.Constants.localDocument,headers:{}})),typeof r=="string")this.m_requestUrlAndHeaderInfo={url:r,headers:{}};else if(i.isRequestUrlAndHeaderInfoResolver(r))this.m_requestUrlAndHeaderInfoResolver=r;else if(i.isRequestUrlAndHeaderInfo(r)){var u=r;this.m_requestUrlAndHeaderInfo={url:u.url,headers:{}};n.Utility._copyHeaders(u.headers,this.m_requestUrlAndHeaderInfo.headers)}else throw n._Internal.RuntimeError._createInvalidArgError("url");this.m_requestUrlAndHeaderInfoResolver instanceof t&&(this.m_session=this.m_requestUrlAndHeaderInfoResolver);this._processingResult=!1;this._customData=n.Constants.iterativeExecutor;this.sync=this.sync.bind(this)}return Object.defineProperty(i.prototype,"session",{get:function(){return this.m_session},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"eventRegistration",{get:function(){return this.m_session?this.m_session.eventRegistration:n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_url",{get:function(){return this.m_requestUrlAndHeaderInfo?this.m_requestUrlAndHeaderInfo.url:null},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_pendingRequest",{get:function(){return this.m_pendingRequest==null&&(this.m_pendingRequest=new n.ClientRequest(this)),this.m_pendingRequest},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"debugInfo",{get:function(){var t=new n.RequestPrettyPrinter(this._rootObjectPropertyName,this._pendingRequest._objectPaths,this._pendingRequest._actions,n._internalConfig.showDisposeInfoInDebugInfo),i=t.process();return{pendingStatements:i}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"trackedObjects",{get:function(){return this.m_trackedObjects||(this.m_trackedObjects=new n.TrackedObjects(this)),this.m_trackedObjects},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"requestHeaders",{get:function(){return this.m_customRequestHeaders},enumerable:!0,configurable:!0}),i.prototype.load=function(t,r){n.Utility.validateContext(this,t);var u=i._parseQueryOption(r),f=n.ActionFactory.createQueryAction(this,t,u);this._pendingRequest.addActionResultHandler(f,t)},i.isLoadOption=function(t){if(!n.Utility.isUndefined(t.select)&&(typeof t.select=="string"||Array.isArray(t.select))||!n.Utility.isUndefined(t.expand)&&(typeof t.expand=="string"||Array.isArray(t.expand))||!n.Utility.isUndefined(t.top)&&typeof t.top=="number"||!n.Utility.isUndefined(t.skip)&&typeof t.skip=="number")return!0;for(var i in t)return!1;return!0},i.parseStrictLoadOption=function(n){var t={Select:[]};return i.parseStrictLoadOptionHelper(t,"","option",n),t},i.combineQueryPath=function(n,t,i){return n.length===0?t:n+i+t},i.parseStrictLoadOptionHelper=function(t,r,u,f){var e,o;for(e in f)if(o=f[e],e==="$all"){if(typeof o!="boolean")throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));o&&t.Select.push(i.combineQueryPath(r,"*","/"))}else if(e==="$top"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));t.Top=o}else if(e==="$skip"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));t.Skip=o}else if(typeof o=="boolean")o&&t.Select.push(i.combineQueryPath(r,e,"/"));else if(typeof o=="object")i.parseStrictLoadOptionHelper(t,i.combineQueryPath(r,e,"/"),i.combineQueryPath(u,e,"."),o);else throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));},i._parseQueryOption=function(t){var u={},f,r;if(typeof t=="string")f=t,u.Select=n.Utility._parseSelectExpand(f);else if(Array.isArray(t))u.Select=t;else if(typeof t=="object")if(r=t,i.isLoadOption(r)){if(typeof r.select=="string")u.Select=n.Utility._parseSelectExpand(r.select);else if(Array.isArray(r.select))u.Select=r.select;else if(!n.Utility.isNullOrUndefined(r.select))throw n._Internal.RuntimeError._createInvalidArgError("option.select");if(typeof r.expand=="string")u.Expand=n.Utility._parseSelectExpand(r.expand);else if(Array.isArray(r.expand))u.Expand=r.expand;else if(!n.Utility.isNullOrUndefined(r.expand))throw n._Internal.RuntimeError._createInvalidArgError("option.expand");if(typeof r.top=="number")u.Top=r.top;else if(!n.Utility.isNullOrUndefined(r.top))throw n._Internal.RuntimeError._createInvalidArgError("option.top");if(typeof r.skip=="number")u.Skip=r.skip;else if(!n.Utility.isNullOrUndefined(r.skip))throw n._Internal.RuntimeError._createInvalidArgError("option.skip");}else u=i.parseStrictLoadOption(t);else if(!n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError("option");return u},i.prototype.loadRecursive=function(t,r,u){var f,e,o;if(!n.Utility.isPlainJsonObject(r))throw n._Internal.RuntimeError._createInvalidArgError("options");f={};for(e in r)f[e]=i._parseQueryOption(r[e]);o=n.ActionFactory.createRecursiveQueryAction(this,t,{Queries:f,MaxDepth:u});this._pendingRequest.addActionResultHandler(o,t)},i.prototype.trace=function(t){n.ActionFactory.createTraceAction(this,t,!0)},i.prototype._processOfficeJsErrorResponse=function(n,t){},i.prototype.syncPrivateMain=function(){var t=this;return n.Utility._createPromiseFromResult(null).then(function(){if(!t.m_requestUrlAndHeaderInfo)return t.m_requestUrlAndHeaderInfoResolver._resolveRequestUrlAndHeaderInfo().then(function(i){if(t.m_requestUrlAndHeaderInfo=i,t.m_requestUrlAndHeaderInfo||(t.m_requestUrlAndHeaderInfo={url:n.Constants.localDocument,headers:{}}),n.Utility.isNullOrEmptyString(t.m_requestUrlAndHeaderInfo.url)&&(t.m_requestUrlAndHeaderInfo.url=n.Constants.localDocument),t.m_requestUrlAndHeaderInfo.headers||(t.m_requestUrlAndHeaderInfo.headers={}),typeof t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull=="function"){var r=t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull();r&&(t._requestExecutor=r)}})}).then(function(){var n=t._pendingRequest;return t.m_pendingRequest=null,t.processPreSyncPromises(n).then(function(){return t.syncPrivate(n)})})},i.prototype.syncPrivate=function(t){var f=this,e,o,s,u,h,r,i;return t.hasActions?(e=t.buildRequestMessageBody(),o=t.flags,this._requestExecutor||(this._requestExecutor=n.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)?new n.OfficeJsRequestExecutor(this):new n.HttpRequestExecutor),s=this._requestExecutor,u={},n.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,u),n.Utility._copyHeaders(this.m_customRequestHeaders,u),h={Url:this.m_requestUrlAndHeaderInfo.url,Headers:u,Body:e},t.invalidatePendingInvalidObjectPaths(),r=null,i=null,this._lastSyncStart=performance.now(),s.executeAsync(this._customData,o,h).then(function(u){return f._lastSyncEnd=performance.now(),r=f.processRequestExecutorResponseMessage(t,u),f.processPendingEventHandlers(t).catch(function(t){n.Utility.log("Error in processPendingEventHandlers");n.Utility.log(JSON.stringify(t));i=t})}).then(function(){var u,f;if(r){n.Utility.log("Throw error from response: "+JSON.stringify(r));throw r;}if(i){n.Utility.log("Throw error from ProcessEventHandler: "+JSON.stringify(i));u=null;i instanceof n._Internal.RuntimeError?(u=i,u.traceMessages=t._responseTraceMessages):(f=null,f=typeof i=="string"?i:i.message,n.Utility.isNullOrEmptyString(f)&&(f=n.Utility._getResourceString(n.ResourceStrings.cannotRegisterEvent)),u=new n._Internal.RuntimeError({code:n.ErrorCodes.cannotRegisterEvent,message:f,traceMessages:t._responseTraceMessages}));throw u;}})):this.processPendingEventHandlers(t)},i.prototype.processRequestExecutorResponseMessage=function(t,i){var e,r,o,u,f;if(i.Body&&i.Body.TraceIds&&t._setResponseTraceIds(i.Body.TraceIds),e=t._responseTraceMessages,r=null,i.Body&&(i.Body.Error&&i.Body.Error.ActionIndex>=0&&(o=new n.RequestPrettyPrinter(this._rootObjectPropertyName,t._objectPaths,t._actions),r=o.processForDebugStatementInfo(i.Body.Error.ActionIndex)),u=null,i.Body.Results?u=i.Body.Results:i.Body.ProcessedResults&&i.Body.ProcessedResults.Results&&(u=i.Body.ProcessedResults.Results),u)){this._processingResult=!0;try{t.processResponse(u)}finally{this._processingResult=!1}}if(n.Utility.isNullOrEmptyString(i.ErrorCode)){if(i.Body&&i.Body.Error)return f={errorLocation:i.Body.Error.Location},r&&(f.statement=r.statement,f.surroundingStatements=r.surroundingStatements),new n._Internal.RuntimeError({code:i.Body.Error.Code,message:i.Body.Error.Message,traceMessages:e,debugInfo:f})}else return new n._Internal.RuntimeError({code:i.ErrorCode,message:i.ErrorMessage,traceMessages:e});return null},i.prototype.processPendingEventHandlers=function(t){for(var u,i=n.Utility._createPromiseFromResult(null),r=0;r0&&(typeof r[0]=="string"||i.isRequestUrlAndHeaderInfo(r[0])||i.isRequestUrlAndHeaderInfoResolver(r[0]))&&(y=r[0],h=1),r.length==h+1)l=u,v=r[h+0];else if(r.length==h+2){if(n.Utility.isNullOrUndefined(r[h+0]))l=u;else if(r[h+0]instanceof n.ClientObject)l=function(){return r[h+0].context};else if(r[h+0]instanceof i)l=function(){return r[h+0]};else if(Array.isArray(r[h+0])){if(c=r[h+0],c.length==0)return i.createErrorPromise(t);for(a=0;a0){var n=c._onRunFinishedNotifiers.shift();n()}if(a)return l;else throw l;})},i.prototype._nextId=function(){return++this.m_nextId},i}();n.ClientRequestContext=i}(OfficeExtension||(OfficeExtension={})),function(n){var i=function(){function t(n){this.m_type=n}return Object.defineProperty(t.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){(this.m_isLoaded=!0,typeof t=="object"&&t&&t._IsNull)||(this.m_value=this.m_type===1?n.Utility.adjustToDateTime(t):t)},t}(),t;n.ClientResult=i;t=function(){function t(n,t){this.m_proxy=n;this.m_shouldPolyfill=t}return Object.defineProperty(t.prototype,"proxy",{get:function(){return this.m_proxy},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"retrieveResult.data"}});return this.m_data},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(n){if(this.m_isLoaded=!0,typeof n=="object"&&n&&n._IsNull){this.m_data=null;return}this.m_data=this.m_shouldPolyfill?this.changePropertyNameToCamelLowerCase(n):n},t.prototype.changePropertyNameToCamelLowerCase=function(t){var o=95,u,i,r,f,e;if(Array.isArray(t)){for(i=[],u=0;u0&&(r=!0),t=document.createElement("a"),t.href=this.m_url,r?t.hash=t.hash.length===0||t.hash==="#"?"#"+i:t.hash+"&"+i:t.search=t.search.length===0||t.search==="?"?"?"+i:t.search+"&"+i,t.href},f.prototype.init=function(){var t=this,i;return window.addEventListener("message",this.m_onMessageHandler),i=this._getIFrameSrc(),new n._Internal.OfficePromise(function(r,u){var f=document.createElement("iframe");t.m_options.id&&(f.id=t.m_options.id);f.style.height=t.m_options.height;f.style.width=t.m_options.width;f.src=i;t.m_options.container.appendChild(f);t.m_timeoutId=setTimeout(function(){t.close();var i=n.Utility.createRuntimeError(n.ErrorCodes.timeout,n.Utility._getResourceString(n.ResourceStrings.timeout),"EmbeddedSession.init");u(i)},t.m_options.timeoutInMilliseconds);t.m_promiseResolver=r})},f.prototype._invoke=function(n,t,u){if(!this.m_enabled){t(i.InternalError,null);return}r.invokeRequestModifier&&(u=r.invokeRequestModifier(u));this._sendMessageWithCallback(this.m_id++,n,u,function(n){r.invokeResponseModifier&&(n=r.invokeResponseModifier(n));var u=n.Error;delete n.Error;t(u||i.Success,n)})},f.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler);window.clearTimeout(this.m_timeoutId);this.m_enabled=!1},Object.defineProperty(f.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),f.prototype._createRequestExecutorOrNull=function(){return new e(this)},f.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},f.prototype._registerEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.RegisterEventCommand,{EventId:i,TargetId:r},function(){n(null)})})},f.prototype._unregisterEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.UnregisterEventCommand,{EventId:i,TargetId:r},function(){n()})})},f.prototype._onMessage=function(n){var u=this,i,e,r,o,s;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===n.source&&this.m_chosenOrigin===n.origin)){if(i=n.data,i&&i[t.CommandKey]===t.ApiReadyCommand){!this.m_chosenWindow&&this._isValidDescendant(n.source)&&i[t.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=n.source,this.m_chosenOrigin=n.origin,this._sendMessageWithCallback(this.m_id++,t.GetAppContextCommand,null,function(n){u._setupContext(n);window.clearTimeout(u.m_timeoutId);u.m_promiseResolver()}));return}if(i&&i[t.CommandKey]===t.FireEventCommand){var f=i[t.ParamsKey],h=f.EventId,c=f.TargetId,l=f.Data;if(this.m_sessionEventManager)for(e=this.m_sessionEventManager.getHandlers(h,c),r=0;r=0;o--)if(r[o]===e[i].handler){r.splice(o,1);break}break;case 2:r=[];break}}return s&&(!this.m_registered&&r.length>0?u=u.then(function(){return f.m_eventInfo.registerFunc(f.m_callback)}).then(function(){return f.m_registered=!0}):this.m_registered&&r.length==0&&(u=u.then(function(){return f.m_eventInfo.unregisterFunc(f.m_callback)}).catch(function(t){n.Utility.log("Error when unregister event: "+JSON.stringify(t))}).then(function(){return f.m_registered=!1})),u=u.then(function(){return f.m_handlers=r})),u},t.prototype.fireEvent=function(t){for(var u,f,r=[],i=0;i=0;e--)if(f[e]===u){f.splice(e,1);break}return f.length===0?this.m_unregisterEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i}();n.EventRegistration=i}(OfficeExtension||(OfficeExtension={})),function(n){function r(n){t._testReadyImpl=n}function u(n){t.getGenericEventRegistration()._handleRichApiMessage(n)}var t=function(){function t(){this.m_eventRegistration=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this));this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this)}return t.prototype.ready=function(){var i=this;return this.m_ready||(this.m_ready=t._testReadyImpl?t._testReadyImpl().then(function(){i.m_isReady=!0}):n._Internal.officeJsEventRegistration.register(5,"",this.m_richApiMessageHandler).then(function(){i.m_isReady=!0})),this.m_ready},Object.defineProperty(t.prototype,"isReady",{get:function(){return this.m_isReady},enumerable:!0,configurable:!0}),t.prototype.register=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.register(n,t,i)})},t.prototype.unregister=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.unregister(n,t,i)})},t.prototype._registerEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._unregisterEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._handleRichApiMessage=function(t){var r,i,u,e,f;if(t&&t.entries)for(r=0;r0))for(e=JSON.parse(i.message),i.isRemoteOverride&&(e.source=n.Constants.eventSourceRemote),f=0;f=0;u--)if(n[u]===i){n.splice(u,1);break}n.length==0&&t.getGenericEventRegistration().unregister(r.m_genericEventInfo.eventType,r.m_genericEventInfo.getTargetIdFunc(),r._callback)})},r.prototype.removeAll=function(){},r}(n.EventHandlers);n.GenericEventHandlers=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var s=JSON.stringify(u.Body),f=u.Url,e,o;if(f.charAt(f.length-1)!="/"&&(f=f+"/"),f=f+n.Constants.processQuery,f=f+"?"+n.Constants.flags+"="+r.toString(),e={method:"POST",url:f,headers:{},body:s},e.headers[n.Constants.sourceLibHeader]=t.SourceLibHeaderValue,e.headers["CONTENT-TYPE"]="application/json",u.Headers)for(o in u.Headers)e.headers[o]=u.Headers[o];return n.HttpUtility.sendRequest(e).then(function(t){var i,r;return t.statusCode===200?i={ErrorCode:null,ErrorMessage:null,Headers:t.headers,Body:JSON.parse(t.body)}:(n.Utility.log("Error Response:"+t.body),r=n.Utility._parseErrorResponse(t),i={ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:t.headers,Body:null}),i})},t.SourceLibHeaderValue="officejs-rest",t}();n.HttpRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.setCustomSendRequestFunc=function(n){t.s_customSendRequestFunc=n},t.xhrSendRequestFunc=function(t){return new n._Internal.OfficePromise(function(i,r){var u=new XMLHttpRequest,f;if(u.open(t.method,t.url),u.onload=function(){var t={statusCode:u.status,headers:n.Utility._parseHttpResponseHeaders(u.getAllResponseHeaders()),body:u.responseText};i(t)},u.onerror=function(){r(new n._Internal.RuntimeError({code:n.ErrorCodes.connectionFailure,message:n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,u.statusText)}))},t.headers)for(f in t.headers)u.setRequestHeader(f,t.headers[f]);u.send(t.body)})},t.sendRequest=function(n){t.validateAndNormalizeRequest(n);var i=t.s_customSendRequestFunc;return i||(i=t.xhrSendRequestFunc),i(n)},t.setCustomSendLocalDocumentRequestFunc=function(n){t.s_customSendLocalDocumentRequestFunc=n},t.sendLocalDocumentRequest=function(n){t.validateAndNormalizeRequest(n);var i;return i=t.s_customSendLocalDocumentRequestFunc||t.officeJsSendLocalDocumentRequestFunc,i(n)},t.officeJsSendLocalDocumentRequestFunc=function(t){t=n.Utility._validateLocalDocumentRequest(t);var i=n.Utility._buildRequestMessageSafeArray(t);return new n._Internal.OfficePromise(function(t,r){OSF.DDA.RichApi.executeRichApiRequestAsync(i,function(i){var r;r=i.status=="succeeded"?{statusCode:n.RichApiMessageUtility.getResponseStatusCode(i),headers:n.RichApiMessageUtility.getResponseHeaders(i),body:n.RichApiMessageUtility.getResponseBody(i)}:n.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(i.error.code,i.error.message);n.Utility.log(JSON.stringify(r));t(r)})})},t.validateAndNormalizeRequest=function(t){if(n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"request"});n.Utility.isNullOrEmptyString(t.method)&&(t.method="GET");t.method=t.method.toUpperCase()},t.logRequest=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Request---"),n.Utility.log(i.method+" "+i.url),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t.logResponse=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Response---"),n.Utility.log(""+i.statusCode),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t._logBody=!1,t}();n.HttpUtility=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_clientObject=n}return n.prototype._handleResult=function(n){this.m_clientObject._handleIdResult(n)},n}();n.InstantiateActionResultHandler=t}(OfficeExtension||(OfficeExtension={})),function(n){}(OfficeExtension||(OfficeExtension={})),function(n){var u=function(){function t(n){this.m_session=n}return t.prototype.executeAsync=function(t,r,u){var e={url:n.Constants.processQuery,method:"POST",headers:u.Headers,body:u.Body},f={id:i.nextId(),type:1,flags:r,message:e};return n.Utility.log(JSON.stringify(f)),this.m_session.sendMessageToHost(f).then(function(t){var i,r,u;return n.Utility.log("Received response: "+JSON.stringify(t)),i=t.message,i.statusCode===200?r={ErrorCode:null,ErrorMessage:null,Headers:i.headers,Body:i.body}:(n.Utility.log("Error Response:"+i.body),u=n.Utility._parseErrorResponse(i),r={ErrorCode:u.errorCode,ErrorMessage:u.errorMessage,Headers:i.headers,Body:null}),r})},t}(),i=function(i){function r(n){var t=this;i.call(this);this.m_promiseResolver={};this.m_bridge=n;this.m_bridge.onMessageFromHost=function(n){t.onMessageFromHost(n)}}return __extends(r,i),r.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},r.prototype._createRequestExecutorOrNull=function(){return n.Utility.log("NativeBridgeSession::CreateRequestExecutor"),new u(this)},Object.defineProperty(r.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),r.init=function(t){if(t&&typeof t=="object"){var i=new r(t);n.ClientRequestContext._overrideSession=i;n.HttpUtility.setCustomSendLocalDocumentRequestFunc(function(n){var t={id:r.nextId(),type:1,flags:0,message:n};return i.sendMessageToHost(t).then(function(n){return n.message})})}},r.prototype.sendMessageToHost=function(t){var i=this;return this.m_bridge.sendMessageToHost(JSON.stringify(t)),new n._Internal.OfficePromise(function(n,r){i.m_promiseResolver[t.id]=n})},r.prototype.onMessageFromHost=function(n){var i,r;n==="test"?t._testFunc&&t._testFunc():(i=JSON.parse(n),typeof i.id=="number"&&(r=this.m_promiseResolver[i.id],r&&r(i),delete this.m_promiseResolver[i.id]))},r.nextId=function(){return r.s_nextId++},r.s_nextId=1,r}(n.SessionBase),r=function(){function n(){}return n.init=function(n){i.init(n)},n}(),t;n.HostBridge=r;typeof _richApiNativeBridge=="object"&&_richApiNativeBridge&&r.init(_richApiNativeBridge);t=function(){function n(){}return n.setTestFunc=function(t){n._testFunc=t},n}();n.HostBridgeTest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){this.m_objectPathInfo=n;this.m_parentObjectPath=t;this.m_isWriteOperation=!1;this.m_isCollection=i;this.m_isInvalidAfterRequest=r;this.m_isValid=!0}return Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},set:function(n){this.m_isWriteOperation=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRestrictedResourceAccess",{get:function(){return this.m_isRestrictedResourceAccess},set:function(n){this.m_isRestrictedResourceAccess=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(n){this.m_argumentObjectPaths=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(n){this.m_isValid=n;!n&&this.m_objectPathInfo.ObjectPathType===6&&this.m_savedObjectPathInfo&&(t.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(n){this.m_getByIdMethodName=n},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null},t.prototype.updateUsingObjectData=function(i){var e=i[n.Constants.referenceId],f,o,u,r;if(!n.Utility.isNullOrEmptyString(e)){this.m_savedObjectPathInfo||this.isInvalidAfterRequest||!t.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)||(f={},t.copyObjectPathInfo(this.m_objectPathInfo,f),this.m_savedObjectPathInfo={pathInfo:f,parent:this.m_parentObjectPath});this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=e;this.m_objectPathInfo.ArgumentInfo={};delete this.m_objectPathInfo.ParentObjectPathId;this.m_parentObjectPath=null;this.m_argumentObjectPaths=null;return}if(o=this.parentObjectPath&&this.parentObjectPath.isCollection,u=this.getByIdMethodName,(o||!n.Utility.isNullOrEmptyString(u))&&(r=i[n.Constants.id],n.Utility.isNullOrUndefined(r)&&(r=i[n.Constants.idPrivate]),!n.Utility.isNullOrUndefined(r))){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;n.Utility.isNullOrEmptyString(u)?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=u,this.m_getByIdMethodName=null);this.isWriteOperation=!1;this.m_objectPathInfo.ArgumentInfo={};this.m_objectPathInfo.ArgumentInfo.Arguments=[r];this.m_argumentObjectPaths=null;return}},t.isRestorableObjectPath=function(n){return n===1||n===5||n===3||n===4},t.copyObjectPathInfo=function(n,t){t.Id=n.Id;t.ArgumentInfo=n.ArgumentInfo;t.Name=n.Name;t.ObjectPathType=n.ObjectPathType;t.ParentObjectPathId=n.ParentObjectPathId},t}();n.ObjectPath=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createGlobalObjectObjectPath=function(t){var i={Id:t._nextId(),ObjectPathType:1,Name:""};return new n.ObjectPath(i,null,!1,!1)},t.createNewObjectObjectPath=function(t,i,r,u){var e={Id:t._nextId(),ObjectPathType:2,Name:i},f=new n.ObjectPath(e,null,r,!1);return f.isRestrictedResourceAccess=u,f},t.createPropertyObjectPath=function(t,i,r,u,f,e){var s={Id:t._nextId(),ObjectPathType:4,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id},o=new n.ObjectPath(s,i._objectPath,u,f);return o.isRestrictedResourceAccess=e,o},t.createIndexerObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i._objectPath,!1,!1)},t.createIndexerObjectPathUsingParentPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i,!1,!1)},t.createMethodObjectPath=function(t,i,r,u,f,e,o,s,h){var l={Id:t._nextId(),ObjectPathType:3,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},a=n.Utility.setMethodArguments(t,l.ArgumentInfo,f),c=new n.ObjectPath(l,i._objectPath,e,o);return c.argumentObjectPaths=a,c.isWriteOperation=u!=1,c.getByIdMethodName=s,c.isRestrictedResourceAccess=h,c},t.createReferenceIdObjectPath=function(t,i){var r={Id:t._nextId(),ObjectPathType:6,Name:i,ArgumentInfo:{}};return new n.ObjectPath(r,null,!1,!1)},t.createChildItemObjectPathUsingIndexerOrGetItemAt=function(i,r,u,f,e){var o=f[n.Constants.id];return n.Utility.isNullOrUndefined(o)&&(o=f[n.Constants.idPrivate]),i&&!n.Utility.isNullOrUndefined(o)?t.createChildItemObjectPathUsingIndexer(r,u,f):t.createChildItemObjectPathUsingGetItemAt(r,u,f,e)},t.createChildItemObjectPathUsingIndexer=function(t,i,r){var f=r[n.Constants.id],u;return n.Utility.isNullOrUndefined(f)&&(f=r[n.Constants.idPrivate]),u=u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u.ArgumentInfo.Arguments=[f],new n.ObjectPath(u,i._objectPath,!1,!1)},t.createChildItemObjectPathUsingGetItemAt=function(t,i,r,u){var e=r[n.Constants.index],f;return e&&(u=e),f={Id:t._nextId(),ObjectPathType:3,Name:n.Constants.getItemAt,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f.ArgumentInfo.Arguments=[u],new n.ObjectPath(f,i._objectPath,!1,!1)},t}();n.ObjectPathFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_context=n}return t.prototype.executeAsync=function(i,r,u){var f=this,e=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n._Internal.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(e,function(i){n.Utility.log("Response:");n.Utility.log(JSON.stringify(i));var r;i.status=="succeeded"?r=n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBody(i),n.RichApiMessageUtility.getResponseHeaders(i)):(r=n.RichApiMessageUtility.buildResponseOnError(i.error.code,i.error.message),f.m_context._processOfficeJsErrorResponse(i.error.code,r));t(r)})})},t.SourceLibHeaderValue="officejs",t}();n.OfficeJsRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){n.OfficeRequire=function(){return null}()})(t=n._Internal||(n._Internal={})),function(n){var t;(function(t){function i(){return function(){"use strict";function vt(n){return typeof n=="function"||typeof n=="object"&&n!==null}function b(n){return typeof n=="function"}function yt(n){return typeof n=="object"&&n!==null}function wt(n){k=n}function bt(n){f=n}function ni(){var t=process.nextTick,n=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&n[1]==="0"&&n[2]==="10"&&(t=setImmediate),function(){t(c)}}function tr(){return function(){pt(c)}}function ti(){var n=0,i=new it(c),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function ii(){var n=new MessageChannel;return n.port1.onmessage=c,function(){n.port2.postMessage(0)}}function ri(){return function(){setTimeout(c,1)}}function c(){for(var t,i,n=0;n=0?(n=n.substring(t+5,n.length),n<"14.14393"?!0:!1):!1}function i(){return typeof window=="undefined"&&typeof Promise=="function"?Promise:typeof window!="undefined"&&window.Promise?t()?n.PromiseImpl.Init():window.Promise:n.PromiseImpl.Init()}n.OfficePromise=i()}(t=n._Internal||(n._Internal={}));i=t.OfficePromise;n.Promise=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this._autoCleanupList={};this.m_context=n}return t.prototype.add=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._addCommon(n,!0)}):this._addCommon(n,!0)},t.prototype._autoAdd=function(n){this._addCommon(n,!1);this._autoCleanupList[n._objectPath.objectPathInfo.Id]=n},t.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(t,i){var r=this.m_context._autoCleanup&&!t[n.Constants.isTracked]&&t!==this.m_context._rootObject&&i&&!n.Utility.isNullOrEmptyString(i[n.Constants.referenceId]);r&&(this._autoCleanupList[t._objectPath.objectPathInfo.Id]=t,t[n.Constants.isTracked]=!0)},t.prototype._addCommon=function(t,i){if(t[n.Constants.isTracked]){i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id];return}var r=t[n.Constants.referenceId];n.Utility.isNullOrEmptyString(r)&&t._KeepReference&&(t._KeepReference(),n.ActionFactory.createInstantiateAction(this.m_context,t),i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id],t[n.Constants.isTracked]=!0)},t.prototype.remove=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._removeCommon(n)}):this._removeCommon(n)},t.prototype._removeCommon=function(t){var r=t[n.Constants.referenceId],i;n.Utility.isNullOrEmptyString(r)||(i=this.m_context._rootObject,i._RemoveReference&&i._RemoveReference(r),delete t[n.Constants.isTracked])},t.prototype._retrieveAndClearAutoCleanupList=function(){var n=this._autoCleanupList;return this._autoCleanupList={},n},t}();n.TrackedObjects=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){n||(n="root");this.m_globalObjName=n;this.m_referencedObjectPaths=t;this.m_actions=i;this.m_statements=[];this.m_variableNameForObjectPathMap={};this.m_variableNameToObjectPathMap={};this.m_declaredObjectPathMap={};this.m_showDispose=r}return t.prototype.process=function(){this.m_showDispose&&n.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions);for(var t=0;t=0&&this.m_statements.length>i+o+1)break;if(i<0)return null;for(f=i-o,f<0&&(f=0),e=i+1+o,e>this.m_statements.length&&(e=this.m_statements.length),r=[],f!=0&&r.push("..."),s=f;s>>>>"),r.push(this.m_statements[i]),r.push("// <<<<<"),h=i+1;h0)?(r=i.map(function(n){return u.getObjVarName(n)}).join(", "),n+" // And then dispose {"+r+"}"):n},t.prototype.buildQueryExpression=function(n){if(n.actionInfo.QueryInfo){var t={};return t.select=n.actionInfo.QueryInfo.Select,t.expand=n.actionInfo.QueryInfo.Expand,t.skip=n.actionInfo.QueryInfo.Skip,t.top=n.actionInfo.QueryInfo.Top,typeof t.top=="undefined"&&typeof t.skip=="undefined"&&typeof t.expand=="undefined"?typeof t.select=="undefined"?"":JSON.stringify(t.select):JSON.stringify(t)}return""},t.prototype.buildObjectPathExpressionWithParent=function(n){var t=n.objectPathInfo.ObjectPathType==5||n.objectPathInfo.ObjectPathType==3||n.objectPathInfo.ObjectPathType==4;return t&&n.objectPathInfo.ParentObjectPathId?this.getObjVarName(n.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(n):this.buildObjectPathExpression(n)},t.prototype.buildObjectPathExpression=function(t){switch(t.objectPathInfo.ObjectPathType){case 1:return"context."+this.m_globalObjName;case 5:return"getItem("+this.buildArgumentsExpression(t.objectPathInfo.ArgumentInfo)+")";case 3:return n.Utility._toCamelLowerCase(t.objectPathInfo.Name)+"("+this.buildArgumentsExpression(t.objectPathInfo.ArgumentInfo)+")";case 2:return t.objectPathInfo.Name+".newObject()";case 7:return"null";case 4:return n.Utility._toCamelLowerCase(t.objectPathInfo.Name);case 6:return"context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(t.objectPathInfo.Name)+")"}},t.prototype.buildArgumentsExpression=function(n){var t="",i;if(!n.Arguments)return t;for(i=0;i0&&(t=t+", "),t=t+this.buildArgumentLiteral(n.Arguments[i],n.ReferencedObjectPathIds?n.ReferencedObjectPathIds[i]:null);return t==="undefined"&&(t=""),t},t.prototype.buildArgumentLiteral=function(n,t){return typeof n=="number"&&n===t?this.getObjVarName(t):JSON.stringify(n)},t.prototype.getObjVarNameBase=function(t){var u="v",f=this.m_referencedObjectPaths[t],i,r;switch(f.objectPathInfo.ObjectPathType){case 1:u=this.m_globalObjName;break;case 4:u=n.Utility._toCamelLowerCase(f.objectPathInfo.Name);break;case 3:i=f.objectPathInfo.Name;i.length>3&&i.substr(0,3)==="Get"&&(i=i.substr(3));u=n.Utility._toCamelLowerCase(i);break;case 5:r=this.getObjVarNameBase(f.objectPathInfo.ParentObjectPathId);u=r.charAt(r.length-1)==="s"?r.substr(0,r.length-1):r+"Item";break}return u},t.prototype.getObjVarName=function(n){var t,i;if(this.m_variableNameForObjectPathMap[n])return this.m_variableNameForObjectPathMap[n];if(t=this.getObjVarNameBase(n),!this.m_variableNameToObjectPathMap[t])return this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t;for(i=1;this.m_variableNameToObjectPathMap[t+i.toString()];)i++;return t=t+i.toString(),this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t},t}();n.RequestPrettyPrinter=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.cannotRegisterEvent="CannotRegisterEvent",n.connectionFailureWithStatus="ConnectionFailureWithStatus",n.connectionFailureWithDetails="ConnectionFailureWithDetails",n.invalidObjectPath="InvalidObjectPath",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.invalidArgumentGeneric="InvalidArgumentGeneric",n.propertyNotLoaded="PropertyNotLoaded",n.runMustReturnPromise="RunMustReturnPromise",n.timeout="Timeout",n.propertyDoesNotExist="PropertyDoesNotExist",n.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",n.moreInfoInnerError="MoreInfoInnerError",n.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",n.valueNotLoaded="ValueNotLoaded",n.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage",n.invalidOperationInCellEditMode="InvalidOperationInCellEditMode",n.customFunctionDefintionMissing="CustomFunctionDefintionMissing",n.customFunctionImplementationMissing="CustomFunctionImplementationMissing",n.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars",n.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit",n.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch",n.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing",n.apiNotFoundDetails="ApiNotFoundDetails",n}();n.ResourceStrings=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.CannotRegisterEvent="The event handler cannot be registered.",n.ConnectionFailureWithStatus="The request failed with status code of {0}.",n.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}",n.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",n.InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',n.InvalidRequestContext="Cannot use the object across different request contexts.",n.PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",n.RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',n.Timeout="The operation has timed out.",n.ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.',n.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.",n.InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.",n.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions.",n.CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.",n.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods.",n.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name.",n.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.",n.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.",n.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.",n}();n.ResourceStringValues=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.buildMessageArrayForIRequestExecutor=function(i,r,u,f){var o=JSON.stringify(u.Body),e;return n.Utility.log("Request:"),n.Utility.log(o),e={},e[n.Constants.sourceLibHeader]=f,t.buildRequestMessageSafeArray(i,r,"POST","ProcessQuery",e,o)},t.buildResponseOnSuccess=function(n,t){var i={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return i.Body=JSON.parse(n),i.Headers=t,i},t.buildResponseOnError=function(i,r){var u={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return u.ErrorCode=n.ErrorCodes.generalException,u.ErrorMessage=r,i==t.OfficeJsErrorCode_ooeNoCapability?u.ErrorCode=n.ErrorCodes.accessDenied:i==t.OfficeJsErrorCode_ooeActivityLimitReached?u.ErrorCode=n.ErrorCodes.activityLimitReached:i==t.OfficeJsErrorCode_ooeInvalidOrTimedOutSession&&(u.ErrorCode=n.ErrorCodes.invalidOrTimedOutSession,u.ErrorMessage=n.Utility._getResourceString(n.ResourceStrings.invalidOrTimedOutSessionMessage)),u},t.buildHttpResponseFromOfficeJsError=function(i,r){var f=500,u={};return u.error={},u.error.code=n.ErrorCodes.generalException,u.error.message=r,i===t.OfficeJsErrorCode_ooeNoCapability?(f=403,u.error.code=n.ErrorCodes.accessDenied):i===t.OfficeJsErrorCode_ooeActivityLimitReached&&(f=429,u.error.code=n.ErrorCodes.activityLimitReached),{statusCode:f,headers:{},body:JSON.stringify(u)}},t.buildRequestMessageSafeArray=function(n,t,i,r,u,f){var e=[],o;if(u)for(o in u)e.push(o),e.push(u[o]);var s=0,h="",c="",l="";return[n,i,r,e,f,s,t,h,c,l]},t.getResponseBody=function(n){return t.getResponseBodyFromSafeArray(n.value.data)},t.getResponseHeaders=function(n){return t.getResponseHeadersFromSafeArray(n.value.data)},t.getResponseBodyFromSafeArray=function(n){var t=n[2],i;return typeof t=="string"?t:(i=t,i.join(""))},t.getResponseHeadersFromSafeArray=function(n){var i=n[1],r,t;if(!i)return null;for(r={},t=0;t0&&f.push(i);return f},t.toJson=function(n,t,i,r){var e={},u,f;for(u in t)f=t[u],typeof f!="undefined"&&(e[u]=f);for(u in i)f=i[u],typeof f!="undefined"&&(e[u]=f.toJSON());return r&&(e.items=r.map(function(n){return n.toJSON()})),e},t.throwError=function(i,r,u){throw new n._Internal.RuntimeError({code:i,message:t._getResourceString(i,r),debugInfo:u?{errorLocation:u}:undefined});},t.createRuntimeError=function(t,i,r){return new n._Internal.RuntimeError({code:t,message:i,debugInfo:{errorLocation:r}})},t._getResourceString=function(i,r){var u,e,f,o;return typeof window!="undefined"&&window.Strings&&window.Strings.OfficeOM&&(e="L_"+i,f=window.Strings.OfficeOM[e],f&&(u=f)),u||(u=n.ResourceStringValues[i]),u||(u=i),t.isNullOrUndefined(r)||(Array.isArray(r)?(o=r,u=t._formatString(u,o)):u=u.replace("{0}",r)),u},t._formatString=function(t,i){return t.replace(/\{\d\}/g,function(t){var r=parseInt(t.substr(1,t.length-2));if(r0?".":"")+i;break;case 3:i=t.normalizeName(n.objectPathInfo.Name)+"()"+(i.length>0?".":"")+i;break;case 4:i=t.normalizeName(n.objectPathInfo.Name)+(i.length>0?".":"")+i;break;case 5:i="getItem()"+(i.length>0?".":"")+i;break;case 6:i="_reference()"+(i.length>0?".":"")+i;break}n=n.parentObjectPath}return i},t._createPromiseFromResult=function(t){return new n._Internal.OfficePromise(function(n,i){n(t)})},t._createTimeoutPromise=function(t){return new n._Internal.OfficePromise(function(n,i){setTimeout(function(){n(null)},t)})},t.promisify=function(t){return new n._Internal.OfficePromise(function(n,i){var r=function(t){t.status=="failed"?i(t.error):n(t.value)};t(r)})},t._addActionResultHandler=function(n,t,i){n.context._pendingRequest.addActionResultHandler(t,i)},t._handleNavigationPropertyResults=function(n,i,r){for(var u=0;u0},t._getLocalDocumentUrlPrefixLength=function(n){for(var i=["http://document.localhost","https://document.localhost","//document.localhost"],r=n.toLowerCase().trim(),t=0;t0))for(s=i.url.substr(f+1),e=s.split("&"),u=0;u0&&(f=i.substr(0,u),e=i.substr(u+1),f=t.trim(f),e=t.trim(e),s[f.toUpperCase()]=e));return s},t._parseErrorResponse=function(i){var r=null,f,e,u;if(t.isPlainJsonObject(i.body))r=i.body;else if(!t.isNullOrEmptyString(i.body)){f=t.trim(i.body);try{r=JSON.parse(f)}catch(o){t.log("Error when parse "+f)}}return!t.isNullOrUndefined(r)&&typeof r=="object"&&r.error?(u=r.error.code,e=t._getResourceString(n.ResourceStrings.connectionFailureWithDetails,[i.statusCode.toString(),r.error.code,r.error.message])):e=t._getResourceString(n.ResourceStrings.connectionFailureWithStatus,i.statusCode.toString()),t.isNullOrEmptyString(u)&&(u=n.ErrorCodes.connectionFailure),{errorCode:u,errorMessage:e}},t._copyHeaders=function(n,t){if(n&&t)for(var i in n)t[i]=n[i]},t._toCamelLowerCase=function(n){if(t.isNullOrEmptyString(n))return n;for(var i=0;i=65&&n.charCodeAt(i)<=90;)i++;return i 6 && v.slice(0, 5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) { + d=new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + } + else { + value=Sys.Serialization.JavaScriptSerializer.deserialize(value, true); + } + ret[key]=value; + } + catch (ex) { + } + } + return ret; + }, loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) { if (url && callback) { var doc=window.document; @@ -837,6 +885,14 @@ OSF.OUtil=(function () { } } }, + removeClass: function OSF_OUtil$removeClass(elmt, val) { + if (OSF.OUtil.hasClass(elmt, val)) { + var className=elmt.getAttribute(_classN); + var reg=new RegExp('(\\s|^)'+val+'(\\s|$)'); + className=className.replace(reg, ''); + elmt.setAttribute(_classN, className); + } + }, hasClass: function OSF_OUtil$hasClass(elmt, clsName) { var className=elmt.getAttribute(_classN); return className && className.match(new RegExp('(\\s|^)'+clsName+'(\\s|$)')); @@ -973,6 +1029,12 @@ OSF.OUtil.Guid=(function () { })(); window.OSF=OSF; OSF.OUtil.setNamespace("OSF", window); +OSF.MessageIDs={ + "FetchBundleUrl": 0, + "LoadReactBundle": 1, + "LoadBundleSuccess": 2, + "LoadBundleError": 3 +}; OSF.AppName={ Unsupported: 0, Excel: 1, @@ -1000,7 +1062,10 @@ OSF.AppName={ OutlookAndroid: 4194304, OneNoteWinRT: 8388608, ExcelAndroid: 8388609, - VisioWebApp: 8388610 + VisioWebApp: 8388610, + OneNoteIOS: 8388611, + WordAndroid: 8388613, + PowerpointAndroid: 8388614 }; OSF.InternalPerfMarker={ DataCoercionBegin: "Agave.HostCall.CoerceDataStart", @@ -1030,7 +1095,9 @@ OSF.AgaveHostAction={ "EscExit": 15, "F2Exit": 16, "ExitNoFocusable": 17, - "ExitNoFocusableShift": 18 + "ExitNoFocusableShift": 18, + "MouseEnter": 19, + "MouseLeave": 20 }; OSF.SharedConstants={ "NotificationConversationIdSuffix": '_ntf' @@ -1166,6 +1233,8 @@ Microsoft.Office.WebExtension.Parameters={ HostType: "hostType", ForceConsent: "forceConsent", ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + Reserved: "reserved", Xml: "xml", Namespace: "namespace", Prefix: "prefix", @@ -1198,7 +1267,9 @@ Microsoft.Office.WebExtension.Parameters={ DisplayInIframe: "displayInIframe", MessageContent: "messageContent", HideTitle: "hideTitle", - AppCommandInvocationCompletedData: "appCommandInvocationCompletedData" + UseDeviceIndependentPixels: "useDeviceIndependentPixels", + AppCommandInvocationCompletedData: "appCommandInvocationCompletedData", + Base64: "base64" }; OSF.OUtil.setNamespace("DDA", OSF); OSF.DDA.DocumentMode={ @@ -1255,6 +1326,8 @@ OSF.DDA.MethodDispId={ dispidAppCommandInvocationCompletedMethod: 94, dispidCloseContainerMethod: 97, dispidGetAccessTokenMethod: 98, + dispidOpenBrowserWindow: 102, + dispidCreateDocumentMethod: 105, dispidGetSelectedTaskMethod: 110, dispidGetSelectedResourceMethod: 111, dispidGetTaskMethod: 112, @@ -1310,8 +1383,11 @@ OSF.DDA.EventDispId={ dispidObjectDataChangedEvent: 15, dispidContentControlAddedEvent: 16, dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, dispidAppCommandInvokedEvent: 39, dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, dispidTaskSelectionChangedEvent: 56, dispidResourceSelectionChangedEvent: 57, dispidViewSelectionChangedEvent: 58, @@ -1443,7 +1519,9 @@ OSF.DDA.ErrorCodeManager=(function () { ooeSSOInvalidGrant: 13005, ooeSSOClientError: 13006, ooeSSOServerError: 13007, - ooeAddinIsAlreadyRequestingToken: 13008 + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009, + ooeSSOConnectionLost: 13010 }, initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={ name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotSupported }; @@ -1541,6 +1619,8 @@ OSF.DDA.ErrorCodeManager=(function () { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={ name: stringNS.L_SSOClientError, message: stringNS.L_SSOClientErrorMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={ name: stringNS.L_SSOServerError, message: stringNS.L_SSOServerErrorMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={ name: stringNS.L_AddinIsAlreadyRequestingToken, message: stringNS.L_AddinIsAlreadyRequestingTokenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={ name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={ name: stringNS.L_SSOConnectionLostError, message: stringNS.L_SSOConnectionLostErrorMessage }; } }; })(); @@ -2242,6 +2322,11 @@ OSF.DDA.Context=function OSF_DDA_Context(officeAppContext, document, license, ap value: officeAppContext.auth }); } + if (officeAppContext.application) { + OSF.OUtil.defineEnumerableProperty(this, "application", { + value: officeAppContext.application + }); + } if (officeAppContext.get_isDialog()) { var requirements=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); OSF.OUtil.defineEnumerableProperty(this, "requirements", { @@ -2284,6 +2369,8 @@ OSF.DDA.OutlookContext=function OSF_DDA_OutlookContext(appContext, settings, lic }; OSF.OUtil.extend(OSF.DDA.OutlookContext, OSF.DDA.Context); OSF.DDA.OutlookAppOm=function OSF_DDA_OutlookAppOm(appContext, window, appReady) { }; +OSF.DDA.Application=function OSF_DDA_Application(officeAppContext) { +}; OSF.DDA.Document=function OSF_DDA_Document(officeAppContext, settings) { var mode; switch (officeAppContext.get_clientMode()) { @@ -3020,6 +3107,8 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, "ExecuteRichApiRequestAsync": did.dispidExecuteRichApiRequestMethod, "AppCommandInvocationCompletedAsync": did.dispidAppCommandInvocationCompletedMethod, "CloseContainerAsync": did.dispidCloseContainerMethod, + "OpenBrowserWindow": did.dispidOpenBrowserWindow, + "CreateDocumentAsync": did.dispidCreateDocumentMethod, "AddDataPartAsync": did.dispidAddDataPartMethod, "GetDataPartByIdAsync": did.dispidGetDataPartByIdMethod, "GetDataPartsByNameSpaceAsync": did.dispidGetDataPartsByNamespaceMethod, @@ -3059,13 +3148,13 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, } jsom=OSF.DDA.SyncMethodNames; did=OSF.DDA.MethodDispId; - var asyncMethodMap={ + var syncMethodMap={ "MessageParent": did.dispidMessageParentMethod, "SendMessage": did.dispidSendMessageMethod }; - for (var method in asyncMethodMap) { + for (var method in syncMethodMap) { if (jsom[method]) { - dispIdMap[jsom[method].id]=asyncMethodMap[method]; + dispIdMap[jsom[method].id]=syncMethodMap[method]; } } jsom=Microsoft.Office.WebExtension.EventType; @@ -3085,7 +3174,10 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, "ObjectSelectionChanged": did.dispidObjectSelectionChangedEvent, "ObjectDataChanged": did.dispidObjectDataChangedEvent, "ContentControlAdded": did.dispidContentControlAddedEvent, + "RichApiMessage": did.dispidRichApiMessageEvent, "ItemChanged": did.dispidOlkItemSelectedChangedEvent, + "RecipientsChanged": did.dispidOlkRecipientsChangedEvent, + "AppointmentTimeChanged": did.dispidOlkAppointmentTimeChangedEvent, "TaskSelectionChanged": did.dispidTaskSelectionChangedEvent, "ResourceSelectionChanged": did.dispidResourceSelectionChangedEvent, "ViewSelectionChanged": did.dispidViewSelectionChangedEvent, @@ -3161,6 +3253,7 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, else { hostCallArgs=callArgs; } + var startTime=(new Date()).getTime(); delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ "dispId": dispId, "hostCallArgs": hostCallArgs, @@ -3181,6 +3274,9 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, } var payload=asyncMethodCall.processResponse(status, responseArgs, caller, callArgs); OSF.DDA.issueAsyncResult(callArgs, status, payload); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(dispId, hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); + } } }); } @@ -4048,7 +4144,6 @@ OSF.DDA.SafeArray.Delegate.executeAsync=function OSF_DDA_SafeArray_Delegate$Exec if (args.onCalling) { args.onCalling(); } - var startTime=(new Date()).getTime(); OSF.ClientHostController.execute(args.dispId, toArray(args.hostCallArgs), function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode) { var result=hostResponseArgs.toArray(); var status=result[OSF.DDA.SafeArray.Response.Status]; @@ -4095,9 +4190,6 @@ OSF.DDA.SafeArray.Delegate.executeAsync=function OSF_DDA_SafeArray_Delegate$Exec } args.onComplete(status, payload); } - if (OSF.AppTelemetry) { - OSF.AppTelemetry.onMethodDone(args.dispId, args.hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); - } return true; }); } @@ -4213,6 +4305,9 @@ OSF.InitializationHelper.prototype.prepareApiSurface=function OSF_Initialization } } } + if (OSF.DDA.OpenBrowser) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.OpenBrowserWindow]); + } if (OSF.DDA.Auth) { appContext.auth=new OSF.DDA.Auth(); OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth, [OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]); @@ -5011,7 +5106,7 @@ var OSFAriaLogger; function AriaLogger() { } AriaLogger.prototype.getAriaCDNLocation=function () { - return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry-2.8.0.min.js"); + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry.js"); }; AriaLogger.getInstance=function () { if (AriaLogger.AriaLoggerObj===undefined) { @@ -5028,13 +5123,10 @@ var OSFAriaLogger; try { if (!this.ALogger) { var OfficeExtensibilityTenantID="db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; - var configuration=new microsoft.applications.telemetry.LogConfiguration(); - configuration.enableAutoUserSession=true; - microsoft.applications.telemetry.LogManager.initialize(OfficeExtensibilityTenantID, configuration); - this.ALogger=new microsoft.applications.telemetry.Logger(); + this.ALogger=AWTLogManager.initialize(OfficeExtensibilityTenantID); } - var eventProperties=new microsoft.applications.telemetry.EventProperties(); - eventProperties.name="Office.Extensibility.OfficeJS."+tableName; + var eventProperties=new AWTEventProperties(); + eventProperties.setName("Office.Extensibility.OfficeJS."+tableName); for (var key in telemetryData) { if (key.toLowerCase() !=="table") { eventProperties.setProperty(key, telemetryData[key]); @@ -5067,6 +5159,7 @@ var OSFAppTelemetry; var sessionId=OSF.OUtil.Guid.generateNewGuid(); var osfControlAppCorrelationId=""; var omexDomainRegex=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"); + OSFAppTelemetry.enableTelemetry=true; ; var AppInfo=(function () { function AppInfo() { @@ -5150,17 +5243,19 @@ var OSFAppTelemetry; function AppLogger() { } AppLogger.prototype.LogData=function (data) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, data.SerializeRow(), OSF.Logger.SendFlag.none); - OSFAriaLogger.AriaLogger.getInstance().logData(data); + try { + OSFAriaLogger.AriaLogger.getInstance().logData(data); + } + catch (e) { + } }; AppLogger.prototype.LogRawData=function (log) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, log, OSF.Logger.SendFlag.none); try { OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)); } @@ -5200,7 +5295,7 @@ var OSFAppTelemetry; } appInfo.message=context.get_hostCustomMessage(); appInfo.officeJSVersion=OSF.ConstantNames.FileVersion; - appInfo.hostJSVersion="16.0.8118.1000"; + appInfo.hostJSVersion="16.0.8916.1000"; if (context._wacHostEnvironment) { appInfo.wacHostEnvironment=context._wacHostEnvironment; } @@ -5431,14 +5526,16 @@ OSF.EventDispatch=function OSF_EventDispatch(eventTypes) { this._eventHandlers={}; this._objectEventHandlers={}; this._queuedEventsArgs={}; - for (var entry in eventTypes) { - var eventType=eventTypes[entry]; - var isObjectEvent=(eventType=="objectDeleted" || eventType=="objectSelectionChanged" || eventType=="objectDataChanged" || eventType=="contentControlAdded"); - if (!isObjectEvent) - this._eventHandlers[eventType]=[]; - else - this._objectEventHandlers[eventType]={}; - this._queuedEventsArgs[eventType]=[]; + if (eventTypes !=null) { + for (var i=0; i < eventTypes.length; i++) { + var eventType=eventTypes[i]; + var isObjectEvent=(eventType=="objectDeleted" || eventType=="objectSelectionChanged" || eventType=="objectDataChanged" || eventType=="contentControlAdded"); + if (!isObjectEvent) + this._eventHandlers[eventType]=[]; + else + this._objectEventHandlers[eventType]={}; + this._queuedEventsArgs[eventType]=[]; + } } }; OSF.EventDispatch.prototype={ @@ -5464,8 +5561,8 @@ OSF.EventDispatch.prototype={ hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) { var handlers=this._eventHandlers[eventType]; if (handlers && handlers.length > 0) { - for (var h in handlers) { - if (handlers[h]===handler) + for (var i=0; i < handlers.length; i++) { + if (handlers[i]===handler) return true; } } @@ -5570,8 +5667,9 @@ OSF.EventDispatch.prototype={ var eventType=eventArgs.type; if (eventType && this._eventHandlers[eventType]) { var eventHandlers=this._eventHandlers[eventType]; - for (var handler in eventHandlers) - eventHandlers[handler](eventArgs); + for (var i=0; i < eventHandlers.length; i++) { + eventHandlers[i](eventArgs); + } return true; } else { @@ -5668,6 +5766,9 @@ OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEve case Microsoft.Office.WebExtension.EventType.ContentControlAdded: args=new OSF.DDA.ObjectEventArgs(eventType, eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args=new OSF.DDA.RichApiMessageEventArgs(eventType, eventProperties); + break; case Microsoft.Office.WebExtension.EventType.DataNodeInserted: args=new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); break; @@ -5693,10 +5794,28 @@ OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEve args=new OSF.DDA.DialogParentEventArgs(eventProperties); break; case Microsoft.Office.WebExtension.EventType.ItemChanged: - if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlookwebapp") { + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { args=new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); target.initialize(args["initialData"]); - target.setCurrentItemNumber(args["itemNumber"].itemNumber); + if (OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]=="win32" || OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]=="mac") { + target.setCurrentItemNumber(args["itemNumber"].itemNumber); + } + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { + args=new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { + args=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); } else { throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); @@ -5883,6 +6002,13 @@ OSF.DDA.AsyncMethodCalls.define({ "types": ["boolean"], "defaultValue": false } + }, + { + name: Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels, + value: { + "types": ["boolean"], + "defaultValue": false + } } ], privateStateCallbacks: [], @@ -5920,13 +6046,13 @@ OSF.DDA.AsyncMethodCalls.define({ if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] <=0) { callArgs[Microsoft.Office.WebExtension.Parameters.Width]=1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Width]=99; } if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] <=0) { callArgs[Microsoft.Office.WebExtension.Parameters.Height]=1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Height]=99; } if (!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) { @@ -6432,52 +6558,10 @@ OSF.DDA.SettingsManager={ DateJSONPrefix: "Date(", DataJSONSuffix: ")", serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) { - var ret={}; - for (var key in settingsCollection) { - var value=settingsCollection[key]; - try { - if (JSON) { - value=JSON.stringify(value, function dateReplacer(k, v) { - return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix+this[k].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix : v; - }); - } - else { - value=Sys.Serialization.JavaScriptSerializer.serialize(value); - } - ret[key]=value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.serializeSettings(settingsCollection); }, deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) { - var ret={}; - serializedSettings=serializedSettings || {}; - for (var key in serializedSettings) { - var value=serializedSettings[key]; - try { - if (JSON) { - value=JSON.parse(value, function dateReviver(k, v) { - var d; - if (typeof v==='string' && v && v.length > 6 && v.slice(0, 5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) { - d=new Date(parseInt(v.slice(5, -1))); - if (d) { - return d; - } - } - return v; - }); - } - else { - value=Sys.Serialization.JavaScriptSerializer.deserialize(value, true); - } - ret[key]=value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.deserializeSettings(serializedSettings); } }; OSF.DDA.Settings=function OSF_DDA_Settings(settings) { @@ -7666,7 +7750,10 @@ OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { DataNodeDeleted: "nodeDeleted", DataNodeInserted: "nodeInserted", - DataNodeReplaced: "nodeReplaced" + DataNodeReplaced: "nodeReplaced", + NodeDeleted: "nodeDeleted", + NodeInserted: "nodeInserted", + NodeReplaced: "nodeReplaced" }); OSF.DDA.CustomXmlParts=function OSF_DDA_CustomXmlParts() { this._eventDispatches=[]; @@ -8554,6 +8641,51 @@ var OfficeExt; AppCommand.registerDdaFacade=registerDdaFacade; })(AppCommand=OfficeExt.AppCommand || (OfficeExt.AppCommand={})); })(OfficeExt || (OfficeExt={})); +OSF.DDA.AsyncMethodNames.addNames({ GetAccessTokenAsync: "getAccessTokenAsync" }); +OSF.DDA.Auth=function OSF_DDA_Auth() { +}; +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetAccessTokenAsync, + requiredArguments: [], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.ForceConsent, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, + value: { + "types": ["string"], + "defaultValue": "" + } + } + ], + onSucceeded: function (dataDescriptor, caller, callArgs) { + var data=dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + return data; + } +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetAccessTokenMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.ForceConsent, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, value: 2 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); OSF.DDA.WordDocument=function OSF_DDA_WordDocument(officeAppContext, settings) { OSF.DDA.WordDocument.uber.constructor.call(this, officeAppContext, new OSF.DDA.BindingFacade(this), settings); OSF.DDA.DispIdHost.addAsyncMethods(this, [ @@ -8586,9 +8718,10 @@ var __extends=(this && this.__extends) || function (d, b) { var OfficeExtension; (function (OfficeExtension) { var Action=(function () { - function Action(actionInfo, isWriteOperation) { + function Action(actionInfo, isWriteOperation, isRestrictedResourceAccess) { this.m_actionInfo=actionInfo; this.m_isWriteOperation=isWriteOperation; + this.m_isRestrictedResourceAccess=isRestrictedResourceAccess; } Object.defineProperty(Action.prototype, "actionInfo", { get: function () { @@ -8604,12 +8737,30 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(Action.prototype, "isRestrictedResourceAccess", { + get: function () { + return this.m_isRestrictedResourceAccess; + }, + enumerable: true, + configurable: true + }); return Action; }()); OfficeExtension.Action=Action; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + var TraceMarkerActionResultHandler=(function () { + function TraceMarkerActionResultHandler(callback) { + this.m_callback=callback; + } + TraceMarkerActionResultHandler.prototype._handleResult=function (value) { + if (this.m_callback) { + this.m_callback(); + } + }; + return TraceMarkerActionResultHandler; + }()); var ActionFactory=(function () { function ActionFactory() { } @@ -8625,13 +8776,17 @@ var OfficeExtension; var args=[value]; var referencedArgumentObjectPaths=OfficeExtension.Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); OfficeExtension.Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); - var ret=new OfficeExtension.Action(actionInfo, true); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + context._pendingRequest.ensureInstantiateObjectPaths(referencedArgumentObjectPaths); + var ret=new OfficeExtension.Action(actionInfo, true, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); context._pendingRequest.addReferencedObjectPaths(referencedArgumentObjectPaths); + ret.referencedObjectPath=parent._objectPath; + ret.referencedArgumentObjectPaths=referencedArgumentObjectPaths; return ret; }; - ActionFactory.createMethodAction=function (context, parent, methodName, operationType, args) { + ActionFactory.createMethodAction=function (context, parent, methodName, operationType, args, isRestrictedResourceAccess) { OfficeExtension.Utility.validateObjectPath(parent); var actionInfo={ Id: context._nextId(), @@ -8642,15 +8797,20 @@ var OfficeExtension; }; var referencedArgumentObjectPaths=OfficeExtension.Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); OfficeExtension.Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + context._pendingRequest.ensureInstantiateObjectPaths(referencedArgumentObjectPaths); var isWriteOperation=operationType !=1; - var ret=new OfficeExtension.Action(actionInfo, isWriteOperation); + var ret=new OfficeExtension.Action(actionInfo, isWriteOperation, isRestrictedResourceAccess); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); context._pendingRequest.addReferencedObjectPaths(referencedArgumentObjectPaths); + ret.referencedObjectPath=parent._objectPath; + ret.referencedArgumentObjectPaths=referencedArgumentObjectPaths; return ret; }; ActionFactory.createQueryAction=function (context, parent, queryOption) { OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); var actionInfo={ Id: context._nextId(), ActionType: 2, @@ -8658,13 +8818,15 @@ var OfficeExtension; ObjectPathId: parent._objectPath.objectPathInfo.Id, }; actionInfo.QueryInfo=queryOption; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; return ret; }; ActionFactory.createRecursiveQueryAction=function (context, parent, query) { OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); var actionInfo={ Id: context._nextId(), ActionType: 6, @@ -8672,23 +8834,59 @@ var OfficeExtension; ObjectPathId: parent._objectPath.objectPathInfo.Id, RecursiveQueryInfo: query }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; + return ret; + }; + ActionFactory.createQueryAsJsonAction=function (context, parent, queryOption) { + OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + var actionInfo={ + Id: context._nextId(), + ActionType: 7, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + }; + actionInfo.QueryInfo=queryOption; + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; + return ret; + }; + ActionFactory.createEnsureUnchangedAction=function (context, parent, objectState) { + OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + var actionInfo={ + Id: context._nextId(), + ActionType: 8, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }; + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; return ret; }; ActionFactory.createInstantiateAction=function (context, obj) { OfficeExtension.Utility.validateObjectPath(obj); + context._pendingRequest.ensureInstantiateObjectPath(obj._objectPath.parentObjectPath); + context._pendingRequest.ensureInstantiateObjectPaths(obj._objectPath.argumentObjectPaths); var actionInfo={ Id: context._nextId(), ActionType: 1, Name: "", ObjectPathId: obj._objectPath.objectPathInfo.Id }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(obj._objectPath); context._pendingRequest.addActionResultHandler(ret, new OfficeExtension.InstantiateActionResultHandler(obj)); + ret.referencedObjectPath=obj._objectPath; return ret; }; ActionFactory.createTraceAction=function (context, message, addTraceMessage) { @@ -8698,13 +8896,17 @@ var OfficeExtension; Name: "Trace", ObjectPathId: 0 }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); if (addTraceMessage) { context._pendingRequest.addTrace(actionInfo.Id, message); } return ret; }; + ActionFactory.createTraceMarkerForCallback=function (context, callback) { + var action=ActionFactory.createTraceAction(context, null, false); + context._pendingRequest.addActionResultHandler(action, new TraceMarkerActionResultHandler(callback)); + }; return ActionFactory; }()); OfficeExtension.ActionFactory=ActionFactory; @@ -8782,6 +8984,7 @@ var OfficeExtension; }; ClientObject.prototype._recursivelySet=function (input, options, scalarWriteablePropertyNames, objectPropertyNames, notAllowedToBeSetPropertyNames) { var isClientObject=(input instanceof ClientObject); + var originalInput=input; if (isClientObject) { if (Object.getPrototypeOf(this)===Object.getPrototypeOf(input)) { input=JSON.parse(JSON.stringify(input)); @@ -8798,31 +9001,38 @@ var OfficeExtension; for (var i=0; i < scalarWriteablePropertyNames.length; i++) { prop=scalarWriteablePropertyNames[i]; if (input.hasOwnProperty(prop)) { - this[prop]=input[prop]; + if (typeof input[prop] !=="undefined") { + this[prop]=input[prop]; + } } } for (var i=0; i < objectPropertyNames.length; i++) { prop=objectPropertyNames[i]; if (input.hasOwnProperty(prop)) { - this[prop].set(input[prop], options); + if (typeof input[prop] !=="undefined") { + var dataToPassToSet=isClientObject ? originalInput[prop] : input[prop]; + this[prop].set(dataToPassToSet, options); + } } } + var throwOnReadOnly=!isClientObject; + if (options && !OfficeExtension.Utility.isNullOrUndefined(throwOnReadOnly)) { + throwOnReadOnly=options.throwOnReadOnly; + } for (var i=0; i < notAllowedToBeSetPropertyNames.length; i++) { prop=notAllowedToBeSetPropertyNames[i]; if (input.hasOwnProperty(prop)) { - throw new OfficeExtension._Internal.RuntimeError({ - code: OfficeExtension.ErrorCodes.invalidArgument, - message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), - debugInfo: { - errorLocation: prop - } - }); + if (typeof input[prop] !=="undefined" && throwOnReadOnly) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.invalidArgument, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), + debugInfo: { + errorLocation: prop + } + }); + } } } - var throwOnReadOnly=!isClientObject; - if (options && !OfficeExtension.Utility.isNullOrUndefined(throwOnReadOnly)) { - throwOnReadOnly=options.throwOnReadOnly; - } for (prop in input) { if (scalarWriteablePropertyNames.indexOf(prop) < 0 && objectPropertyNames.indexOf(prop) < 0) { var propertyDescriptor=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this), prop); @@ -8870,12 +9080,14 @@ var OfficeExtension; this.m_actions=[]; this.m_actionResultHandler={}; this.m_referencedObjectPaths={}; + this.m_instantiatedObjectPaths={}; this.m_flags=0; this.m_traceInfos={}; this.m_pendingProcessEventHandlers=[]; this.m_pendingEventHandlerActions={}; this.m_responseTraceIds={}; this.m_responseTraceMessages=[]; + this.m_preSyncPromises=[]; } Object.defineProperty(ClientRequest.prototype, "flags", { get: function () { @@ -8921,7 +9133,13 @@ var OfficeExtension; if (action.isWriteOperation) { this.m_flags=this.m_flags | 1; } + if (action.isRestrictedResourceAccess) { + this.m_flags=this.m_flags | 2; + } this.m_actions.push(action); + if (action.actionInfo.ActionType==1) { + this.m_instantiatedObjectPaths[action.actionInfo.ObjectPathId]=action; + } }; Object.defineProperty(ClientRequest.prototype, "hasActions", { get: function () { @@ -8930,9 +9148,39 @@ var OfficeExtension; enumerable: true, configurable: true }); + ClientRequest.prototype._getLastAction=function () { + return this.m_actions[this.m_actions.length - 1]; + }; ClientRequest.prototype.addTrace=function (actionId, message) { this.m_traceInfos[actionId]=message; }; + ClientRequest.prototype.ensureInstantiateObjectPath=function (objectPath) { + if (objectPath) { + if (this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + this.ensureInstantiateObjectPath(objectPath.parentObjectPath); + this.ensureInstantiateObjectPaths(objectPath.argumentObjectPaths); + if (!this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + var actionInfo={ + Id: this.m_context._nextId(), + ActionType: 1, + Name: "", + ObjectPathId: objectPath.objectPathInfo.Id + }; + var instantiateAction=new OfficeExtension.Action(actionInfo, false, false); + instantiateAction.referencedObjectPath=objectPath; + this.addAction(instantiateAction); + } + } + }; + ClientRequest.prototype.ensureInstantiateObjectPaths=function (objectPaths) { + if (objectPaths) { + for (var i=0; i < objectPaths.length; i++) { + this.ensureInstantiateObjectPath(objectPaths[i]); + } + } + }; ClientRequest.prototype.addReferencedObjectPath=function (objectPath) { if (this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]) { return; @@ -8950,6 +9198,9 @@ var OfficeExtension; if (objectPath.isWriteOperation) { this.m_flags=this.m_flags | 1; } + if (objectPath.isRestrictedResourceAccess) { + this.m_flags=this.m_flags | 2; + } this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]=objectPath; if (objectPath.objectPathInfo.ObjectPathType==3) { this.addReferencedObjectPaths(objectPath.argumentObjectPaths); @@ -8968,6 +9219,9 @@ var OfficeExtension; this.m_actionResultHandler[action.actionInfo.Id]=resultHandler; }; ClientRequest.prototype.buildRequestMessageBody=function () { + if (OfficeExtension._internalConfig.enableEarlyDispose) { + ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } var objectPaths={}; for (var i in this.m_referencedObjectPaths) { objectPaths[i]=this.m_referencedObjectPaths[i].objectPathInfo; @@ -9018,12 +9272,95 @@ var OfficeExtension; ClientRequest.prototype._getPendingEventHandlerActions=function (eventHandlers) { return this.m_pendingEventHandlerActions[eventHandlers._id]; }; + ClientRequest.prototype._addPreSyncPromise=function (value) { + this.m_preSyncPromises.push(value); + }; + Object.defineProperty(ClientRequest.prototype, "_preSyncPromises", { + get: function () { + return this.m_preSyncPromises; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_actions", { + get: function () { + return this.m_actions; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_objectPaths", { + get: function () { + return this.m_referencedObjectPaths; + }, + enumerable: true, + configurable: true + }); + ClientRequest._updateLastUsedActionIdOfObjectPathId=function (lastUsedActionIdOfObjectPathId, objectPath, actionId) { + while (objectPath) { + if (lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]) { + return; + } + lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]=actionId; + var argumentObjectPaths=objectPath.argumentObjectPaths; + if (argumentObjectPaths) { + var argumentObjectPathsLength=argumentObjectPaths.length; + for (var i=0; i < argumentObjectPathsLength; i++) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, argumentObjectPaths[i], actionId); + } + } + objectPath=objectPath.parentObjectPath; + } + }; + ClientRequest._calculateLastUsedObjectPathIds=function (actions) { + var lastUsedActionIdOfObjectPathId={}; + var actionsLength=actions.length; + for (var index=actionsLength - 1; index >=0; --index) { + var action=actions[index]; + var actionId=action.actionInfo.Id; + if (action.referencedObjectPath) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, action.referencedObjectPath, actionId); + } + var referencedObjectPaths=action.referencedArgumentObjectPaths; + if (referencedObjectPaths) { + var referencedObjectPathsLength=referencedObjectPaths.length; + for (var refIndex=0; refIndex < referencedObjectPathsLength; refIndex++) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, referencedObjectPaths[refIndex], actionId); + } + } + } + var lastUsedObjectPathIdsOfAction={}; + for (var key in lastUsedActionIdOfObjectPathId) { + var actionId=lastUsedActionIdOfObjectPathId[key]; + var objectPathIds=lastUsedObjectPathIdsOfAction[actionId]; + if (!objectPathIds) { + objectPathIds=[]; + lastUsedObjectPathIdsOfAction[actionId]=objectPathIds; + } + objectPathIds.push(parseInt(key)); + } + for (var index=0; index < actionsLength; index++) { + var action=actions[index]; + var lastUsedObjectPathIds=lastUsedObjectPathIdsOfAction[action.actionInfo.Id]; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + action.actionInfo.L=lastUsedObjectPathIds; + } + else if (action.actionInfo.L) { + delete action.actionInfo.L; + } + } + }; return ClientRequest; }()); OfficeExtension.ClientRequest=ClientRequest; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + OfficeExtension._internalConfig={ + showDisposeInfoInDebugInfo: false, + enableEarlyDispose: true, + alwaysPolyfillClientObjectRetrieveMethod: false + }; var SessionBase=(function () { function SessionBase() { } @@ -9117,6 +9454,15 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(ClientRequestContext.prototype, "debugInfo", { + get: function () { + var prettyPrinter=new OfficeExtension.RequestPrettyPrinter(this._rootObjectPropertyName, this._pendingRequest._objectPaths, this._pendingRequest._actions, OfficeExtension._internalConfig.showDisposeInfoInDebugInfo); + var statements=prettyPrinter.process(); + return { pendingStatements: statements }; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ClientRequestContext.prototype, "trackedObjects", { get: function () { if (!this.m_trackedObjects) { @@ -9136,11 +9482,76 @@ var OfficeExtension; }); ClientRequestContext.prototype.load=function (clientObj, option) { OfficeExtension.Utility.validateContext(this, clientObj); - var queryOption=ClientRequestContext.parseQueryOption(option); + var queryOption=ClientRequestContext._parseQueryOption(option); var action=OfficeExtension.ActionFactory.createQueryAction(this, clientObj, queryOption); this._pendingRequest.addActionResultHandler(action, clientObj); }; - ClientRequestContext.parseQueryOption=function (option) { + ClientRequestContext.isLoadOption=function (loadOption) { + if (!OfficeExtension.Utility.isUndefined(loadOption.select) && (typeof (loadOption.select)==="string" || Array.isArray(loadOption.select))) + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.expand) && (typeof (loadOption.expand)==="string" || Array.isArray(loadOption.expand))) + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.top) && typeof (loadOption.top)==="number") + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.skip) && typeof (loadOption.skip)==="number") + return true; + for (var i in loadOption) { + return false; + } + return true; + }; + ClientRequestContext.parseStrictLoadOption=function (option) { + var ret={ Select: [] }; + ClientRequestContext.parseStrictLoadOptionHelper(ret, "", "option", option); + return ret; + }; + ClientRequestContext.combineQueryPath=function (pathPrefix, key, separator) { + if (pathPrefix.length===0) { + return key; + } + else { + return pathPrefix+separator+key; + } + }; + ClientRequestContext.parseStrictLoadOptionHelper=function (queryInfo, pathPrefix, argPrefix, option) { + for (var key in option) { + var value=option[key]; + if (key==="$all") { + if (typeof (value) !=="boolean") { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + if (value) { + queryInfo.Select.push(ClientRequestContext.combineQueryPath(pathPrefix, "*", "/")); + } + } + else if (key==="$top") { + if (typeof (value) !=="number" || pathPrefix.length > 0) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + queryInfo.Top=value; + } + else if (key==="$skip") { + if (typeof (value) !=="number" || pathPrefix.length > 0) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + queryInfo.Skip=value; + } + else { + if (typeof (value)==="boolean") { + if (value) { + queryInfo.Select.push(ClientRequestContext.combineQueryPath(pathPrefix, key, "/")); + } + } + else if (typeof (value)==="object") { + ClientRequestContext.parseStrictLoadOptionHelper(queryInfo, ClientRequestContext.combineQueryPath(pathPrefix, key, "/"), ClientRequestContext.combineQueryPath(argPrefix, key, "."), value); + } + else { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + } + } + }; + ClientRequestContext._parseQueryOption=function (option) { var queryOption={}; if (typeof (option)=="string") { var select=option; @@ -9149,41 +9560,46 @@ var OfficeExtension; else if (Array.isArray(option)) { queryOption.Select=option; } - else if (typeof (option)=="object") { + else if (typeof (option)==="object") { var loadOption=option; - if (typeof (loadOption.select)=="string") { - queryOption.Select=OfficeExtension.Utility._parseSelectExpand(loadOption.select); - } - else if (Array.isArray(loadOption.select)) { - queryOption.Select=loadOption.select; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.select)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.select"); - } - if (typeof (loadOption.expand)=="string") { - queryOption.Expand=OfficeExtension.Utility._parseSelectExpand(loadOption.expand); - } - else if (Array.isArray(loadOption.expand)) { - queryOption.Expand=loadOption.expand; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.expand)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.expand"); - } - if (typeof (loadOption.top)=="number") { - queryOption.Top=loadOption.top; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.top)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.top"); - } - if (typeof (loadOption.skip)=="number") { - queryOption.Skip=loadOption.skip; + if (ClientRequestContext.isLoadOption(loadOption)) { + if (typeof (loadOption.select)=="string") { + queryOption.Select=OfficeExtension.Utility._parseSelectExpand(loadOption.select); + } + else if (Array.isArray(loadOption.select)) { + queryOption.Select=loadOption.select; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.select)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.select"); + } + if (typeof (loadOption.expand)=="string") { + queryOption.Expand=OfficeExtension.Utility._parseSelectExpand(loadOption.expand); + } + else if (Array.isArray(loadOption.expand)) { + queryOption.Expand=loadOption.expand; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.expand)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.expand"); + } + if (typeof (loadOption.top)==="number") { + queryOption.Top=loadOption.top; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.top)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.top"); + } + if (typeof (loadOption.skip)==="number") { + queryOption.Skip=loadOption.skip; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.skip)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.skip"); + } } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.skip)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.skip"); + else { + queryOption=ClientRequestContext.parseStrictLoadOption(option); } } else if (!OfficeExtension.Utility.isNullOrUndefined(option)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option"); + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option"); } return queryOption; }; @@ -9193,7 +9609,7 @@ var OfficeExtension; } var quries={}; for (var key in options) { - quries[key]=ClientRequestContext.parseQueryOption(options[key]); + quries[key]=ClientRequestContext._parseQueryOption(options[key]); } var action=OfficeExtension.ActionFactory.createRecursiveQueryAction(this, clientObj, { Queries: quries, MaxDepth: maxDepth }); this._pendingRequest.addActionResultHandler(action, clientObj); @@ -9201,6 +9617,8 @@ var OfficeExtension; ClientRequestContext.prototype.trace=function (message) { OfficeExtension.ActionFactory.createTraceAction(this, message, true); }; + ClientRequestContext.prototype._processOfficeJsErrorResponse=function (officeJsErrorCode, response) { + }; ClientRequestContext.prototype.syncPrivateMain=function () { var _this=this; return OfficeExtension.Utility._createPromiseFromResult(null) @@ -9228,13 +9646,14 @@ var OfficeExtension; } }) .then(function () { - return _this.syncPrivate(); + var req=_this._pendingRequest; + _this.m_pendingRequest=null; + return _this.processPreSyncPromises(req) + .then(function () { return _this.syncPrivate(req); }); }); }; - ClientRequestContext.prototype.syncPrivate=function () { + ClientRequestContext.prototype.syncPrivate=function (req) { var _this=this; - var req=this._pendingRequest; - this.m_pendingRequest=null; if (!req.hasActions) { return this.processPendingEventHandlers(req); } @@ -9242,7 +9661,7 @@ var OfficeExtension; var requestFlags=req.flags; if (!this._requestExecutor) { if (OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)) { - this._requestExecutor=new OfficeExtension.OfficeJsRequestExecutor(); + this._requestExecutor=new OfficeExtension.OfficeJsRequestExecutor(this); } else { this._requestExecutor=new OfficeExtension.HttpRequestExecutor(); @@ -9260,8 +9679,10 @@ var OfficeExtension; req.invalidatePendingInvalidObjectPaths(); var errorFromResponse=null; var errorFromProcessEventHandlers=null; + this._lastSyncStart=performance.now(); return requestExecutor.executeAsync(this._customData, requestFlags, requestExecutorRequestMessage) .then(function (response) { + _this._lastSyncEnd=performance.now(); errorFromResponse=_this.processRequestExecutorResponseMessage(req, response); return _this.processPendingEventHandlers(req) .catch(function (ex) { @@ -9308,7 +9729,13 @@ var OfficeExtension; req._setResponseTraceIds(response.Body.TraceIds); } var traceMessages=req._responseTraceMessages; + var errorStatementInfo=null; if (response.Body) { + if (response.Body.Error && + response.Body.Error.ActionIndex >=0) { + var prettyPrinter=new OfficeExtension.RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions); + errorStatementInfo=prettyPrinter.processForDebugStatementInfo(response.Body.Error.ActionIndex); + } var actionResults=null; if (response.Body.Results) { actionResults=response.Body.Results; @@ -9334,13 +9761,18 @@ var OfficeExtension; }); } else if (response.Body && response.Body.Error) { + var debugInfo={ + errorLocation: response.Body.Error.Location + }; + if (errorStatementInfo) { + debugInfo.statement=errorStatementInfo.statement; + debugInfo.surroundingStatements=errorStatementInfo.surroundingStatements; + } return new OfficeExtension._Internal.RuntimeError({ code: response.Body.Error.Code, message: response.Body.Error.Message, traceMessages: traceMessages, - debugInfo: { - errorLocation: response.Body.Error.Location - } + debugInfo: debugInfo }); } return null; @@ -9356,6 +9788,17 @@ var OfficeExtension; ClientRequestContext.prototype.createProcessOneEventHandlersFunc=function (eventHandlers, req) { return function () { return eventHandlers._processRegistration(req); }; }; + ClientRequestContext.prototype.processPreSyncPromises=function (req) { + var ret=OfficeExtension.Utility._createPromiseFromResult(null); + for (var i=0; i < req._preSyncPromises.length; i++) { + var p=req._preSyncPromises[i]; + ret=ret.then(this.createProcessOneProSyncFunc(p)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneProSyncFunc=function (p) { + return function () { return p; }; + }; ClientRequestContext.prototype.sync=function (passThroughValue) { return this.syncPrivateMain().then(function () { return passThroughValue; }); }; @@ -9394,9 +9837,15 @@ var OfficeExtension; batch=receivedRunArgs[argOffset+0]; } else if (receivedRunArgs.length==argOffset+2) { - if (receivedRunArgs[argOffset+0] instanceof OfficeExtension.ClientObject) { + if (OfficeExtension.Utility.isNullOrUndefined(receivedRunArgs[argOffset+0])) { + ctxRetriever=ctxInitializer; + } + else if (receivedRunArgs[argOffset+0] instanceof OfficeExtension.ClientObject) { ctxRetriever=function () { return receivedRunArgs[argOffset+0].context; }; } + else if (receivedRunArgs[argOffset+0] instanceof ClientRequestContext) { + ctxRetriever=function () { return receivedRunArgs[argOffset+0]; }; + } else if (Array.isArray(receivedRunArgs[argOffset+0])) { var array=receivedRunArgs[argOffset+0]; if (array.length==0) { @@ -9562,6 +10011,79 @@ var OfficeExtension; return ClientResult; }()); OfficeExtension.ClientResult=ClientResult; + var RetrieveResult=(function () { + function RetrieveResult(m_proxy, m_shouldPolyfill) { + this.m_proxy=m_proxy; + this.m_shouldPolyfill=m_shouldPolyfill; + } + Object.defineProperty(RetrieveResult.prototype, "proxy", { + get: function () { + return this.m_proxy; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RetrieveResult.prototype, "data", { + get: function () { + if (!this.m_isLoaded) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.valueNotLoaded, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: "retrieveResult.data" + } + }); + } + return this.m_data; + }, + enumerable: true, + configurable: true + }); + RetrieveResult.prototype._handleResult=function (value) { + this.m_isLoaded=true; + if (typeof (value)==="object" && value && value._IsNull) { + this.m_data=null; + return; + } + if (this.m_shouldPolyfill) { + this.m_data=this.changePropertyNameToCamelLowerCase(value); + } + else { + this.m_data=value; + } + }; + RetrieveResult.prototype.changePropertyNameToCamelLowerCase=function (value) { + var charCodeUnderscore=95; + if (Array.isArray(value)) { + var ret=[]; + for (var i=0; i < value.length; i++) { + ret.push(this.changePropertyNameToCamelLowerCase(value[i])); + } + return ret; + } + else if (typeof (value)==="object" && value !==null) { + var ret={}; + for (var key in value) { + var propValue=value[key]; + if (key==="_Items") { + ret={}; + ret["items"]=this.changePropertyNameToCamelLowerCase(propValue); + break; + } + else if (key.charCodeAt(0) !==charCodeUnderscore) { + var propName=OfficeExtension.Utility._toCamelLowerCase(key); + ret[propName]=this.changePropertyNameToCamelLowerCase(propValue); + } + } + return ret; + } + else { + return value; + } + }; + return RetrieveResult; + }()); + OfficeExtension.RetrieveResult=RetrieveResult; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { @@ -9583,6 +10105,9 @@ var OfficeExtension; Constants.sourceLibHeader="SdkVersion"; Constants.embeddingPageOrigin="EmbeddingPageOrigin"; Constants.embeddingPageSessionInfo="EmbeddingPageSessionInfo"; + Constants.eventMessageCategory=65536; + Constants.eventWorkbookId="Workbook"; + Constants.eventSourceRemote="Remote"; return Constants; }()); OfficeExtension.Constants=Constants; @@ -9913,7 +10438,7 @@ var OfficeExtension; debugInfo[key]=partialDebugInfo[key]; } if (this.innerError) { - if (this.innerError instanceof OfficeExtension.Error) { + if (this.innerError instanceof OfficeExtension._Internal.RuntimeError) { debugInfo.innerError=this.innerError.debugInfo; } else { @@ -9998,6 +10523,20 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(EventHandlers.prototype, "_context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_callback", { + get: function () { + return this.m_callback; + }, + enumerable: true, + configurable: true + }); EventHandlers.prototype.add=function (handler) { var action=OfficeExtension.ActionFactory.createTraceAction(this.m_context, null, false); this.m_context._pendingRequest._addPendingEventHandlerAction(this, { id: action.actionInfo.Id, handler: handler, operation: 0 }); @@ -10091,6 +10630,13 @@ var OfficeExtension; this.m_allHandlers=handlers; this.m_handler=handler; } + Object.defineProperty(EventHandlerResult.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); EventHandlerResult.prototype.remove=function () { if (this.m_allHandlers && this.m_handler) { this.m_allHandlers.remove(this.m_handler); @@ -10125,6 +10671,8 @@ var OfficeExtension; return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged, handler, callback); }); case 1: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.settings.addHandlerAsync(Office.EventType.SettingsChanged, handler, callback); }); + case 5: + return OfficeExtension.Utility.promisify(function (callback) { return OSF.DDA.RichApi.richApiMessageManager.addHandlerAsync("richApiMessage", handler, callback); }); case 13: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.ObjectDeleted, handler, { id: targetId }, callback); }); case 14: @@ -10153,6 +10701,8 @@ var OfficeExtension; return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.DocumentSelectionChanged, { handler: handler }, callback); }); case 1: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.settings.removeHandlerAsync(Office.EventType.SettingsChanged, { handler: handler }, callback); }); + case 5: + return OfficeExtension.Utility.promisify(function (callback) { return OSF.DDA.RichApi.richApiMessageManager.removeHandlerAsync("richApiMessage", { handler: handler }, callback); }); case 13: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDeleted, { id: targetId, handler: handler }, callback); }); case 14: @@ -10223,6 +10773,139 @@ var OfficeExtension; OfficeExtension.EventRegistration=EventRegistration; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var GenericEventRegistration=(function () { + function GenericEventRegistration() { + this.m_eventRegistration=new OfficeExtension.EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)); + this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this); + } + GenericEventRegistration.prototype.ready=function () { + var _this=this; + if (!this.m_ready) { + if (GenericEventRegistration._testReadyImpl) { + this.m_ready=GenericEventRegistration._testReadyImpl() + .then(function () { + _this.m_isReady=true; + }); + } + else { + this.m_ready=OfficeExtension._Internal.officeJsEventRegistration.register(5, "", this.m_richApiMessageHandler) + .then(function () { + _this.m_isReady=true; + }); + } + } + return this.m_ready; + }; + Object.defineProperty(GenericEventRegistration.prototype, "isReady", { + get: function () { + return this.m_isReady; + }, + enumerable: true, + configurable: true + }); + GenericEventRegistration.prototype.register=function (eventId, targetId, handler) { + var _this=this; + return this.ready() + .then(function () { return _this.m_eventRegistration.register(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype.unregister=function (eventId, targetId, handler) { + var _this=this; + return this.ready() + .then(function () { return _this.m_eventRegistration.unregister(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype._registerEventImpl=function (eventId, targetId) { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._unregisterEventImpl=function (eventId, targetId) { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._handleRichApiMessage=function (msg) { + if (msg && msg.entries) { + for (var entryIndex=0; entryIndex < msg.entries.length; entryIndex++) { + var entry=msg.entries[entryIndex]; + if (entry.messageCategory==OfficeExtension.Constants.eventMessageCategory) { + if (OfficeExtension.Utility._logEnabled) { + OfficeExtension.Utility.log(JSON.stringify(entry)); + } + var funcs=this.m_eventRegistration.getHandlers(entry.messageType, entry.targetId); + if (funcs.length > 0) { + var arg=JSON.parse(entry.message); + if (entry.isRemoteOverride) { + arg.source=OfficeExtension.Constants.eventSourceRemote; + } + for (var i=0; i < funcs.length; i++) { + funcs[i](arg); + } + } + } + } + } + }; + GenericEventRegistration.getGenericEventRegistration=function () { + if (!GenericEventRegistration.s_genericEventRegistration) { + GenericEventRegistration.s_genericEventRegistration=new GenericEventRegistration(); + } + return GenericEventRegistration.s_genericEventRegistration; + }; + GenericEventRegistration.richApiMessageEventCategory=65536; + return GenericEventRegistration; + }()); + function _testSetRichApiMessageReadyImpl(impl) { + GenericEventRegistration._testReadyImpl=impl; + } + OfficeExtension._testSetRichApiMessageReadyImpl=_testSetRichApiMessageReadyImpl; + function _testTriggerRichApiMessageEvent(msg) { + GenericEventRegistration.getGenericEventRegistration()._handleRichApiMessage(msg); + } + OfficeExtension._testTriggerRichApiMessageEvent=_testTriggerRichApiMessageEvent; + var GenericEventHandlers=(function (_super) { + __extends(GenericEventHandlers, _super); + function GenericEventHandlers(context, parentObject, name, eventInfo) { + _super.call(this, context, parentObject, name, eventInfo); + this.m_genericEventInfo=eventInfo; + } + GenericEventHandlers.prototype.add=function (handler) { + var _this=this; + if ((this._handlers.length==0) && this.m_genericEventInfo.registerFunc) { + this.m_genericEventInfo.registerFunc(); + } + if (!GenericEventRegistration.getGenericEventRegistration().isReady) { + this._context._pendingRequest._addPreSyncPromise(GenericEventRegistration.getGenericEventRegistration().ready()); + } + OfficeExtension.ActionFactory.createTraceMarkerForCallback(this._context, function () { + _this._handlers.push(handler); + if (_this._handlers.length==1) { + GenericEventRegistration.getGenericEventRegistration().register(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + return new OfficeExtension.EventHandlerResult(this._context, this, handler); + }; + GenericEventHandlers.prototype.remove=function (handler) { + var _this=this; + if ((this._handlers.length==1) && this.m_genericEventInfo.unregisterFunc) { + this.m_genericEventInfo.unregisterFunc(); + } + OfficeExtension.ActionFactory.createTraceMarkerForCallback(this._context, function () { + var handlers=_this._handlers; + for (var index=handlers.length - 1; index >=0; index--) { + if (handlers[index]===handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length==0) { + GenericEventRegistration.getGenericEventRegistration().unregister(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + }; + GenericEventHandlers.prototype.removeAll=function () { + }; + return GenericEventHandlers; + }(OfficeExtension.EventHandlers)); + OfficeExtension.GenericEventHandlers=GenericEventHandlers; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var HttpRequestExecutor=(function () { function HttpRequestExecutor() { @@ -10274,15 +10957,6 @@ var OfficeExtension; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { - var _Internal; - (function (_Internal) { - _Internal.OfficeRequire=function () { - if (typeof (require) !=="undefined") { - return require; - } - return null; - }(); - })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); var HttpUtility=(function () { function HttpUtility() { } @@ -10290,7 +10964,7 @@ var OfficeExtension; HttpUtility.s_customSendRequestFunc=func; }; HttpUtility.xhrSendRequestFunc=function (request) { - return new _Internal.OfficePromise(function (resolve, reject) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { var xhr=new XMLHttpRequest(); xhr.open(request.method, request.url); xhr.onload=function () { @@ -10302,7 +10976,7 @@ var OfficeExtension; resolve(resp); }; xhr.onerror=function () { - reject(new _Internal.RuntimeError({ + reject(new OfficeExtension._Internal.RuntimeError({ code: OfficeExtension.ErrorCodes.connectionFailure, message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.connectionFailureWithStatus, xhr.statusText) })); @@ -10315,34 +10989,11 @@ var OfficeExtension; xhr.send(request.body); }); }; - HttpUtility.nodejsRequestModuleSendRequestFunc=function (requestInfo) { - HttpUtility.logRequest(requestInfo); - var fetch=_Internal.OfficeRequire(HttpUtility.NodeJsRequestModuleName); - return fetch(requestInfo.url, { method: requestInfo.method, headers: requestInfo.headers, body: requestInfo.body }) - .then(function (resp) { - return resp.text() - .then(function (body) { - var statusCode=resp.status; - var headers={}; - resp.headers.forEach(function (value, name) { - headers[name]=value; - }); - var ret={ statusCode: statusCode, headers: headers, body: body }; - HttpUtility.logResponse(ret); - return ret; - }); - }); - }; HttpUtility.sendRequest=function (request) { HttpUtility.validateAndNormalizeRequest(request); var func=HttpUtility.s_customSendRequestFunc; if (!func) { - if (typeof (window)==="undefined" || typeof (XMLHttpRequest)==="undefined") { - func=HttpUtility.nodejsRequestModuleSendRequestFunc; - } - else { - func=HttpUtility.xhrSendRequestFunc; - } + func=HttpUtility.xhrSendRequestFunc; } return func(request); }; @@ -10358,7 +11009,7 @@ var OfficeExtension; HttpUtility.officeJsSendLocalDocumentRequestFunc=function (request) { request=OfficeExtension.Utility._validateLocalDocumentRequest(request); var requestSafeArray=OfficeExtension.Utility._buildRequestMessageSafeArray(request); - return new _Internal.OfficePromise(function (resolve, reject) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { OSF.DDA.RichApi.executeRichApiRequestAsync(requestSafeArray, function (asyncResult) { var response; if (asyncResult.status=="succeeded") { @@ -10378,7 +11029,7 @@ var OfficeExtension; }; HttpUtility.validateAndNormalizeRequest=function (request) { if (OfficeExtension.Utility.isNullOrUndefined(request)) { - throw _Internal.RuntimeError._createInvalidArgError({ + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError({ argumentName: "request" }); } @@ -10415,7 +11066,6 @@ var OfficeExtension; } } }; - HttpUtility.NodeJsRequestModuleName="node-fetch"; HttpUtility._logBody=false; return HttpUtility; }()); @@ -10439,6 +11089,146 @@ var OfficeExtension; ; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var HostBridgeRequestExecutor=(function () { + function HostBridgeRequestExecutor(session) { + this.m_session=session; + } + HostBridgeRequestExecutor.prototype.executeAsync=function (customData, requestFlags, requestMessage) { + var httpRequestInfo={ + url: OfficeExtension.Constants.processQuery, + method: "POST", + headers: requestMessage.Headers, + body: requestMessage.Body + }; + var message={ + id: HostBridgeSession.nextId(), + type: 1, + flags: requestFlags, + message: httpRequestInfo + }; + OfficeExtension.Utility.log(JSON.stringify(message)); + return this.m_session.sendMessageToHost(message) + .then(function (nativeBridgeResponse) { + OfficeExtension.Utility.log("Received response: "+JSON.stringify(nativeBridgeResponse)); + var responseInfo=nativeBridgeResponse.message; + var response; + if (responseInfo.statusCode===200) { + response={ ErrorCode: null, ErrorMessage: null, Headers: responseInfo.headers, Body: responseInfo.body }; + } + else { + OfficeExtension.Utility.log("Error Response:"+responseInfo.body); + var error=OfficeExtension.Utility._parseErrorResponse(responseInfo); + response={ + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null + }; + } + return response; + }); + }; + return HostBridgeRequestExecutor; + }()); + var HostBridgeSession=(function (_super) { + __extends(HostBridgeSession, _super); + function HostBridgeSession(bridge) { + var _this=this; + _super.call(this); + this.m_promiseResolver={}; + this.m_bridge=bridge; + this.m_bridge.onMessageFromHost=function (msg) { + _this.onMessageFromHost(msg); + }; + } + HostBridgeSession.prototype._resolveRequestUrlAndHeaderInfo=function () { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + HostBridgeSession.prototype._createRequestExecutorOrNull=function () { + OfficeExtension.Utility.log("NativeBridgeSession::CreateRequestExecutor"); + return new HostBridgeRequestExecutor(this); + }; + Object.defineProperty(HostBridgeSession.prototype, "eventRegistration", { + get: function () { + return OfficeExtension._Internal.officeJsEventRegistration; + }, + enumerable: true, + configurable: true + }); + HostBridgeSession.init=function (bridge) { + if (bridge && typeof (bridge)==="object") { + var session=new HostBridgeSession(bridge); + OfficeExtension.ClientRequestContext._overrideSession=session; + OfficeExtension.HttpUtility.setCustomSendLocalDocumentRequestFunc(function (request) { + var bridgeMessage={ + id: HostBridgeSession.nextId(), + type: 1, + flags: 0, + message: request + }; + return session.sendMessageToHost(bridgeMessage) + .then(function (bridgeResponse) { + var responseInfo=bridgeResponse.message; + return responseInfo; + }); + }); + } + }; + HostBridgeSession.prototype.sendMessageToHost=function (message) { + var _this=this; + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + var ret=new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { + _this.m_promiseResolver[message.id]=resolve; + }); + return ret; + }; + HostBridgeSession.prototype.onMessageFromHost=function (messageText) { + if (messageText==="test") { + if (HostBridgeTest._testFunc) { + HostBridgeTest._testFunc(); + } + } + else { + var message=JSON.parse(messageText); + if (typeof (message.id)==="number") { + var resolve=this.m_promiseResolver[message.id]; + if (resolve) { + resolve(message); + } + delete this.m_promiseResolver[message.id]; + } + } + }; + HostBridgeSession.nextId=function () { + return HostBridgeSession.s_nextId++; + }; + HostBridgeSession.s_nextId=1; + return HostBridgeSession; + }(OfficeExtension.SessionBase)); + var HostBridge=(function () { + function HostBridge() { + } + HostBridge.init=function (bridge) { + HostBridgeSession.init(bridge); + }; + return HostBridge; + }()); + OfficeExtension.HostBridge=HostBridge; + if (typeof (_richApiNativeBridge)==="object" && _richApiNativeBridge) { + HostBridge.init(_richApiNativeBridge); + } + var HostBridgeTest=(function () { + function HostBridgeTest() { + } + HostBridgeTest.setTestFunc=function (func) { + HostBridgeTest._testFunc=func; + }; + return HostBridgeTest; + }()); + OfficeExtension.HostBridgeTest=HostBridgeTest; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var ObjectPath=(function () { function ObjectPath(objectPathInfo, parentObjectPath, isCollection, isInvalidAfterRequest) { @@ -10466,6 +11256,16 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(ObjectPath.prototype, "isRestrictedResourceAccess", { + get: function () { + return this.m_isRestrictedResourceAccess; + }, + set: function (value) { + this.m_isRestrictedResourceAccess=value; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ObjectPath.prototype, "isCollection", { get: function () { return this.m_isCollection; @@ -10552,6 +11352,7 @@ var OfficeExtension; this.m_objectPathInfo.ObjectPathType=6; this.m_objectPathInfo.Name=referenceId; this.m_objectPathInfo.ArgumentInfo={}; + delete this.m_objectPathInfo.ParentObjectPathId; this.m_parentObjectPath=null; this.m_argumentObjectPaths=null; return; @@ -10566,15 +11367,15 @@ var OfficeExtension; if (!OfficeExtension.Utility.isNullOrUndefined(id)) { this.m_isInvalidAfterRequest=false; this.m_isValid=true; - if (parentIsCollection) { - this.m_objectPathInfo.ObjectPathType=5; - this.m_objectPathInfo.Name=""; - } - else { + if (!OfficeExtension.Utility.isNullOrEmptyString(getByIdMethodName)) { this.m_objectPathInfo.ObjectPathType=3; this.m_objectPathInfo.Name=getByIdMethodName; this.m_getByIdMethodName=null; } + else { + this.m_objectPathInfo.ObjectPathType=5; + this.m_objectPathInfo.Name=""; + } this.isWriteOperation=false; this.m_objectPathInfo.ArgumentInfo={}; this.m_objectPathInfo.ArgumentInfo.Arguments=[id]; @@ -10609,18 +11410,22 @@ var OfficeExtension; var objectPathInfo={ Id: context._nextId(), ObjectPathType: 1, Name: "" }; return new OfficeExtension.ObjectPath(objectPathInfo, null, false, false); }; - ObjectPathFactory.createNewObjectObjectPath=function (context, typeName, isCollection) { + ObjectPathFactory.createNewObjectObjectPath=function (context, typeName, isCollection, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 2, Name: typeName }; - return new OfficeExtension.ObjectPath(objectPathInfo, null, isCollection, false); + var ret=new OfficeExtension.ObjectPath(objectPathInfo, null, isCollection, false); + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; }; - ObjectPathFactory.createPropertyObjectPath=function (context, parent, propertyName, isCollection, isInvalidAfterRequest) { + ObjectPathFactory.createPropertyObjectPath=function (context, parent, propertyName, isCollection, isInvalidAfterRequest, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 4, Name: propertyName, ParentObjectPathId: parent._objectPath.objectPathInfo.Id, }; - return new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest); + var ret=new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest); + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; }; ObjectPathFactory.createIndexerObjectPath=function (context, parent, args) { var objectPathInfo={ @@ -10644,7 +11449,7 @@ var OfficeExtension; objectPathInfo.ArgumentInfo.Arguments=args; return new OfficeExtension.ObjectPath(objectPathInfo, parentObjectPath, false, false); }; - ObjectPathFactory.createMethodObjectPath=function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName) { + ObjectPathFactory.createMethodObjectPath=function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 3, @@ -10657,6 +11462,7 @@ var OfficeExtension; ret.argumentObjectPaths=argumentObjectPaths; ret.isWriteOperation=(operationType !=1); ret.getByIdMethodName=getByIdMethodName; + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; return ret; }; ObjectPathFactory.createReferenceIdObjectPath=function (context, referenceId) { @@ -10718,9 +11524,11 @@ var OfficeExtension; var OfficeExtension; (function (OfficeExtension) { var OfficeJsRequestExecutor=(function () { - function OfficeJsRequestExecutor() { + function OfficeJsRequestExecutor(context) { + this.m_context=context; } OfficeJsRequestExecutor.prototype.executeAsync=function (customData, requestFlags, requestMessage) { + var _this=this; var messageSafearray=OfficeExtension.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, OfficeJsRequestExecutor.SourceLibHeaderValue); return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { OSF.DDA.RichApi.executeRichApiRequestAsync(messageSafearray, function (result) { @@ -10732,6 +11540,7 @@ var OfficeExtension; } else { response=OfficeExtension.RichApiMessageUtility.buildResponseOnError(result.error.code, result.error.message); + _this.m_context._processOfficeJsErrorResponse(result.error.code, response); } resolve(response); }); @@ -10744,6 +11553,12 @@ var OfficeExtension; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + var _Internal; + (function (_Internal) { + _Internal.OfficeRequire=function () { + return null; + }(); + })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); var _Internal; (function (_Internal) { var PromiseImpl; @@ -10847,17 +11662,6 @@ var OfficeExtension; } lib$es6$promise$asap$$len=0; } - function lib$es6$promise$asap$$attemptVertex() { - try { - var r=require; - var vertx=r('vertx'); - lib$es6$promise$asap$$vertxNext=vertx.runOnLoop || vertx.runOnContext; - return lib$es6$promise$asap$$useVertxTimer(); - } - catch (e) { - return lib$es6$promise$asap$$useSetTimeout(); - } - } var lib$es6$promise$asap$$scheduleFlush; if (lib$es6$promise$asap$$isNode) { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useNextTick(); @@ -10868,9 +11672,6 @@ var OfficeExtension; else if (lib$es6$promise$asap$$isWorker) { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useMessageChannel(); } - else if (lib$es6$promise$asap$$browserWindow===undefined && typeof require==='function') { - lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$attemptVertex(); - } else { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useSetTimeout(); } @@ -11388,6 +12189,305 @@ var OfficeExtension; OfficeExtension.TrackedObjects=TrackedObjects; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var RequestPrettyPrinter=(function () { + function RequestPrettyPrinter(globalObjName, referencedObjectPaths, actions, showDispose) { + if (!globalObjName) { + globalObjName="root"; + } + this.m_globalObjName=globalObjName; + this.m_referencedObjectPaths=referencedObjectPaths; + this.m_actions=actions; + this.m_statements=[]; + this.m_variableNameForObjectPathMap={}; + this.m_variableNameToObjectPathMap={}; + this.m_declaredObjectPathMap={}; + this.m_showDispose=showDispose; + } + RequestPrettyPrinter.prototype.process=function () { + if (this.m_showDispose) { + OfficeExtension.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + for (var i=0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + } + return this.m_statements; + }; + RequestPrettyPrinter.prototype.processForDebugStatementInfo=function (actionIndex) { + if (this.m_showDispose) { + OfficeExtension.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + var surroundingCount=5; + this.m_statements=[]; + var oneStatement=""; + var statementIndex=-1; + for (var i=0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + if (actionIndex==i) { + statementIndex=this.m_statements.length - 1; + } + if (statementIndex >=0 && this.m_statements.length > statementIndex+surroundingCount+1) { + break; + } + } + if (statementIndex < 0) { + return null; + } + var startIndex=statementIndex - surroundingCount; + if (startIndex < 0) { + startIndex=0; + } + var endIndex=statementIndex+1+surroundingCount; + if (endIndex > this.m_statements.length) { + endIndex=this.m_statements.length; + } + var surroundingStatements=[]; + if (startIndex !=0) { + surroundingStatements.push("..."); + } + for (var i_1=startIndex; i_1 < statementIndex; i_1++) { + surroundingStatements.push(this.m_statements[i_1]); + } + surroundingStatements.push("// >>>>>"); + surroundingStatements.push(this.m_statements[statementIndex]); + surroundingStatements.push("// <<<<<"); + for (var i_2=statementIndex+1; i_2 < endIndex; i_2++) { + surroundingStatements.push(this.m_statements[i_2]); + } + if (endIndex < this.m_statements.length) { + surroundingStatements.push("..."); + } + return { + statement: this.m_statements[statementIndex], + surroundingStatements: surroundingStatements + }; + }; + RequestPrettyPrinter.prototype.processOneAction=function (action) { + var actionInfo=action.actionInfo; + switch (actionInfo.ActionType) { + case 1: + this.processInstantiateAction(action); + break; + case 3: + this.processMethodAction(action); + break; + case 2: + this.processQueryAction(action); + break; + case 7: + this.processQueryAsJsonAction(action); + break; + case 6: + this.processRecursiveQueryAction(action); + break; + case 4: + this.processSetPropertyAction(action); + break; + case 5: + this.processTraceAction(action); + break; + case 8: + this.processEnsureUnchangedAction(action); + break; + } + }; + RequestPrettyPrinter.prototype.processInstantiateAction=function (action) { + var objId=action.actionInfo.ObjectPathId; + var objPath=this.m_referencedObjectPaths[objId]; + var varName=this.getObjVarName(objId); + if (!this.m_declaredObjectPathMap[objId]) { + var statement="var "+varName+"="+this.buildObjectPathExpressionWithParent(objPath)+";"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + this.m_declaredObjectPathMap[objId]=varName; + } + else { + var statement="// Instantiate {"+varName+"}"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + } + }; + RequestPrettyPrinter.prototype.processMethodAction=function (action) { + var methodName=action.actionInfo.Name; + if (methodName==="_KeepReference") { + methodName="track"; + } + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+"."+OfficeExtension.Utility._toCamelLowerCase(methodName)+"("+this.buildArgumentsExpression(action.actionInfo.ArgumentInfo)+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAction=function (action) { + var queryExp=this.buildQueryExpression(action); + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".load("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAsJsonAction=function (action) { + var queryExp=this.buildQueryExpression(action); + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".loadJson("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processRecursiveQueryAction=function (action) { + var queryExp=""; + if (action.actionInfo.RecursiveQueryInfo) { + queryExp=JSON.stringify(action.actionInfo.RecursiveQueryInfo); + } + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".loadRecursive("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processSetPropertyAction=function (action) { + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+"."+OfficeExtension.Utility._toCamelLowerCase(action.actionInfo.Name)+"="+this.buildArgumentsExpression(action.actionInfo.ArgumentInfo)+";"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processTraceAction=function (action) { + var statement="context.trace();"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processEnsureUnchangedAction=function (action) { + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".ensureUnchanged("+JSON.stringify(action.actionInfo.ObjectState)+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.appendDisposeCommentIfRelevant=function (statement, action) { + var _this=this; + if (this.m_showDispose) { + var lastUsedObjectPathIds=action.actionInfo.L; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + var objectNamesToDispose=lastUsedObjectPathIds.map(function (item) { return _this.getObjVarName(item); }).join(", "); + return statement+" // And then dispose {"+objectNamesToDispose+"}"; + } + } + return statement; + }; + RequestPrettyPrinter.prototype.buildQueryExpression=function (action) { + if (action.actionInfo.QueryInfo) { + var option={}; + option.select=action.actionInfo.QueryInfo.Select; + option.expand=action.actionInfo.QueryInfo.Expand; + option.skip=action.actionInfo.QueryInfo.Skip; + option.top=action.actionInfo.QueryInfo.Top; + if (typeof (option.top)==="undefined" && typeof (option.skip)==="undefined" && typeof (option.expand)==="undefined") { + if (typeof (option.select)==="undefined") { + return ""; + } + else { + return JSON.stringify(option.select); + } + } + else { + return JSON.stringify(option); + } + } + return ""; + }; + RequestPrettyPrinter.prototype.buildObjectPathExpressionWithParent=function (objPath) { + var hasParent=objPath.objectPathInfo.ObjectPathType==5 || + objPath.objectPathInfo.ObjectPathType==3 || + objPath.objectPathInfo.ObjectPathType==4; + if (hasParent && objPath.objectPathInfo.ParentObjectPathId) { + return this.getObjVarName(objPath.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(objPath); + } + return this.buildObjectPathExpression(objPath); + }; + RequestPrettyPrinter.prototype.buildObjectPathExpression=function (objPath) { + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + return "context."+this.m_globalObjName; + case 5: + return "getItem("+this.buildArgumentsExpression(objPath.objectPathInfo.ArgumentInfo)+")"; + case 3: + return OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name)+"("+this.buildArgumentsExpression(objPath.objectPathInfo.ArgumentInfo)+")"; + case 2: + return objPath.objectPathInfo.Name+".newObject()"; + case 7: + return "null"; + case 4: + return OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + case 6: + return "context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(objPath.objectPathInfo.Name)+")"; + } + }; + RequestPrettyPrinter.prototype.buildArgumentsExpression=function (args) { + var ret=""; + if (!args.Arguments) { + return ret; + } + for (var i=0; i < args.Arguments.length; i++) { + if (i > 0) { + ret=ret+", "; + } + ret=ret+this.buildArgumentLiteral(args.Arguments[i], args.ReferencedObjectPathIds ? args.ReferencedObjectPathIds[i] : null); + } + if (ret==="undefined") { + ret=""; + } + return ret; + }; + RequestPrettyPrinter.prototype.buildArgumentLiteral=function (value, objectPathId) { + if (typeof value=="number" && value===objectPathId) { + return this.getObjVarName(objectPathId); + } + else { + return JSON.stringify(value); + } + }; + RequestPrettyPrinter.prototype.getObjVarNameBase=function (objectPathId) { + var ret="v"; + var objPath=this.m_referencedObjectPaths[objectPathId]; + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + ret=this.m_globalObjName; + break; + case 4: + ret=OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + break; + case 3: + var methodName=objPath.objectPathInfo.Name; + if (methodName.length > 3 && methodName.substr(0, 3)==="Get") { + methodName=methodName.substr(3); + } + ret=OfficeExtension.Utility._toCamelLowerCase(methodName); + break; + case 5: + var parentName=this.getObjVarNameBase(objPath.objectPathInfo.ParentObjectPathId); + if (parentName.charAt(parentName.length - 1)==="s") { + ret=parentName.substr(0, parentName.length - 1); + } + else { + ret=parentName+"Item"; + } + break; + } + return ret; + }; + RequestPrettyPrinter.prototype.getObjVarName=function (objectPathId) { + if (this.m_variableNameForObjectPathMap[objectPathId]) { + return this.m_variableNameForObjectPathMap[objectPathId]; + } + var ret=this.getObjVarNameBase(objectPathId); + if (!this.m_variableNameToObjectPathMap[ret]) { + this.m_variableNameForObjectPathMap[objectPathId]=ret; + this.m_variableNameToObjectPathMap[ret]=objectPathId; + return ret; + } + var i=1; + while (this.m_variableNameToObjectPathMap[ret+i.toString()]) { + i++; + } + ret=ret+i.toString(); + this.m_variableNameForObjectPathMap[objectPathId]=ret; + this.m_variableNameToObjectPathMap[ret]=objectPathId; + return ret; + }; + return RequestPrettyPrinter; + }()); + OfficeExtension.RequestPrettyPrinter=RequestPrettyPrinter; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var ResourceStrings=(function () { function ResourceStrings() { @@ -11408,6 +12508,14 @@ var OfficeExtension; ResourceStrings.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod"; ResourceStrings.valueNotLoaded="ValueNotLoaded"; ResourceStrings.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage"; + ResourceStrings.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"; + ResourceStrings.customFunctionDefintionMissing="CustomFunctionDefintionMissing"; + ResourceStrings.customFunctionImplementationMissing="CustomFunctionImplementationMissing"; + ResourceStrings.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars"; + ResourceStrings.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit"; + ResourceStrings.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch"; + ResourceStrings.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing"; + ResourceStrings.apiNotFoundDetails="ApiNotFoundDetails"; return ResourceStrings; }()); OfficeExtension.ResourceStrings=ResourceStrings; @@ -11427,7 +12535,15 @@ var OfficeExtension; ResourceStringValues.RunMustReturnPromise="The batch function passed to the \".run\" method didn't return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from \"context.sync()\"."; ResourceStringValues.Timeout="The operation has timed out."; ResourceStringValues.ValueNotLoaded="The value of the result object has not been loaded yet. Before reading the value property, call \"context.sync()\" on the associated request context."; - ResourceStringValues.invalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page."; + ResourceStringValues.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page."; + ResourceStringValues.InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again."; + ResourceStringValues.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions."; + ResourceStringValues.CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function."; + ResourceStringValues.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods."; + ResourceStringValues.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name."; + ResourceStringValues.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it."; + ResourceStringValues.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable."; + ResourceStringValues.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}."; return ResourceStringValues; }()); OfficeExtension.ResourceStringValues=ResourceStringValues; @@ -11721,6 +12837,34 @@ var OfficeExtension; }; Utility.load=function (clientObj, option) { clientObj.context.load(clientObj, option); + return clientObj; + }; + Utility.loadAndSync=function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj.context.sync().then(function () { return clientObj; }); + }; + Utility.retrieve=function (clientObj, option) { + var shouldPolyfill=OfficeExtension._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + if (typeof (window) !=="undefined" && window.Office && window.Office.context && window.Office.context.requirements) { + shouldPolyfill=!window.Office.context.requirements.isSetSupported("RichApiRuntime", "1.1"); + } + } + var result=new OfficeExtension.RetrieveResult(clientObj, shouldPolyfill); + var queryOption=OfficeExtension.ClientRequestContext._parseQueryOption(option); + var action; + if (shouldPolyfill) { + action=OfficeExtension.ActionFactory.createQueryAction(clientObj.context, clientObj, queryOption); + } + else { + action=OfficeExtension.ActionFactory.createQueryAsJsonAction(clientObj.context, clientObj, queryOption); + } + clientObj.context._pendingRequest.addActionResultHandler(action, result); + return result; + }; + Utility.retrieveAndSync=function (clientObj, option) { + var result=Utility.retrieve(clientObj, option); + return clientObj.context.sync().then(function () { return result; }); }; Utility._parseSelectExpand=function (select) { var args=[]; @@ -11741,11 +12885,32 @@ var OfficeExtension; return '*'; } var itemsSlashLength=6; - if (propertyNameLower.substr(0, itemsSlashLength)==="items/") { + var isItemsSlashOrItemsDot=propertyNameLower.substr(0, itemsSlashLength)==="items/" || + propertyNameLower.substr(0, itemsSlashLength)==="items."; + if (isItemsSlashOrItemsDot) { propertyName=propertyName.substr(itemsSlashLength); } - return propertyName.replace(new RegExp("\/items\/", "gi"), "/"); + return propertyName.replace(new RegExp("[\/\.]items[\/\.]", "gi"), "/"); + } + }; + Utility.toJson=function (clientObj, scalarProperties, navigationProperties, collectionItemsIfAny) { + var result={}; + for (var prop in scalarProperties) { + var value=scalarProperties[prop]; + if (typeof value !=="undefined") { + result[prop]=value; + } + } + for (var prop in navigationProperties) { + var value=navigationProperties[prop]; + if (typeof value !=="undefined") { + result[prop]=value.toJSON(); + } + } + if (collectionItemsIfAny) { + result["items"]=collectionItemsIfAny.map(function (item) { return item.toJSON(); }); } + return result; }; Utility.throwError=function (resourceId, arg, errorLocation) { throw new OfficeExtension._Internal.RuntimeError({ @@ -11807,6 +12972,21 @@ var OfficeExtension; }); } }; + Utility.throwIfApiNotSupported=function (apiFullName, apiSetName, apiSetVersion, hostName) { + if (!Utility._doApiNotSupportedCheck) { + return; + } + if (typeof (window) !=="undefined" && window.Office && window.Office.context) { + if (!window.Office.context.requirements.isSetSupported(apiSetName, apiSetVersion)) { + var message=Utility._getResourceString(OfficeExtension.ResourceStrings.apiNotFoundDetails, [apiFullName, apiSetName+" "+apiSetVersion, hostName]); + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.apiNotFound, + message: message, + debugInfo: { errorLocation: apiFullName } + }); + } + } + }; Utility.getObjectPathExpression=function (objectPath) { var ret=""; while (objectPath) { @@ -11956,7 +13136,10 @@ var OfficeExtension; }; Utility._parseErrorResponse=function (responseInfo) { var errorObj=null; - if (!Utility.isNullOrEmptyString(responseInfo.body)) { + if (Utility.isPlainJsonObject(responseInfo.body)) { + errorObj=responseInfo.body; + } + else if (!Utility.isNullOrEmptyString(responseInfo.body)) { var errorResponseBody=Utility.trim(responseInfo.body); try { errorObj=JSON.parse(errorResponseBody); @@ -11986,8 +13169,24 @@ var OfficeExtension; } } }; + Utility._toCamelLowerCase=function (name) { + if (Utility.isNullOrEmptyString(name)) { + return name; + } + var index=0; + while (index < name.length && name.charCodeAt(index) >=65 && name.charCodeAt(index) <=90) { + index++; + } + if (index < name.length) { + return name.substr(0, index).toLowerCase()+name.substr(index); + } + else { + return name.toLowerCase(); + } + }; Utility._logEnabled=false; Utility._synchronousCleanup=false; + Utility._doApiNotSupportedCheck=false; Utility.s_underscoreCharCode="_".charCodeAt(0); return Utility; }()); @@ -11999,6 +13198,243 @@ var __extends=(this && this.__extends) || function (d, b) { function __() { this.constructor=d; } d.prototype=b===null ? Object.create(b) : (__.prototype=b.prototype, new __()); }; +var OfficeCore; +(function (OfficeCore) { + var _hostName="OfficeCore"; + var _defaultApiSetName="ExperimentApi"; + var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; + var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; + var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; + var _createNewObjectObjectPath=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath; + var _createChildItemObjectPathUsingIndexer=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer; + var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; + var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; + var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; + var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined=OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; + var _load=OfficeExtension.Utility.load; + var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; + var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; + var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var FlightingService=(function (_super) { + __extends(FlightingService, _super); + function FlightingService() { + _super.apply(this, arguments); + } + Object.defineProperty(FlightingService.prototype, "_className", { + get: function () { + return "FlightingService"; + }, + enumerable: true, + configurable: true + }); + FlightingService.prototype.getClientSessionId=function () { + var action=_createMethodAction(this.context, this, "GetClientSessionId", 1, []); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + FlightingService.prototype.getDeferredFlights=function () { + var action=_createMethodAction(this.context, this, "GetDeferredFlights", 1, []); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + FlightingService.prototype.getFeature=function (featureName, type, defaultValue, possibleValues) { + return new OfficeCore.ABType(this.context, _createMethodObjectPath(this.context, this, "GetFeature", 1, [featureName, type, defaultValue, possibleValues], false, false, null)); + }; + FlightingService.prototype.getFeatureGate=function (featureName, scope) { + return new OfficeCore.ABType(this.context, _createMethodObjectPath(this.context, this, "GetFeatureGate", 1, [featureName, scope], false, false, null)); + }; + FlightingService.prototype.resetOverride=function (featureName) { + _createMethodAction(this.context, this, "ResetOverride", 0, [featureName]); + }; + FlightingService.prototype.setOverride=function (featureName, type, value) { + _createMethodAction(this.context, this, "SetOverride", 0, [featureName, type, value]); + }; + FlightingService.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + FlightingService.newObject=function (context) { + var ret=new OfficeCore.FlightingService(context, _createNewObjectObjectPath(context, "Microsoft.Experiment.FlightingService", false)); + return ret; + }; + FlightingService.prototype.toJSON=function () { + return {}; + }; + return FlightingService; + }(OfficeExtension.ClientObject)); + OfficeCore.FlightingService=FlightingService; + var ABType=(function (_super) { + __extends(ABType, _super); + function ABType() { + _super.apply(this, arguments); + } + Object.defineProperty(ABType.prototype, "_className", { + get: function () { + return "ABType"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ABType.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this.m_value, "ABType", this._isNull); + return this.m_value; + }, + enumerable: true, + configurable: true + }); + ABType.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Value"])) { + this.m_value=obj["Value"]; + } + }; + ABType.prototype.load=function (option) { + _load(this, option); + return this; + }; + ABType.prototype.toJSON=function () { + return { + "value": this.m_value + }; + }; + return ABType; + }(OfficeExtension.ClientObject)); + OfficeCore.ABType=ABType; + var FeatureType; + (function (FeatureType) { + FeatureType.boolean="Boolean"; + FeatureType.integer="Integer"; + FeatureType.string="String"; + })(FeatureType=OfficeCore.FeatureType || (OfficeCore.FeatureType={})); + var ExperimentErrorCodes; + (function (ExperimentErrorCodes) { + ExperimentErrorCodes.generalException="GeneralException"; + })(ExperimentErrorCodes=OfficeCore.ExperimentErrorCodes || (OfficeCore.ExperimentErrorCodes={})); +})(OfficeCore || (OfficeCore={})); +var OfficeCore; +(function (OfficeCore) { + var RequestContext=(function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + _super.call(this, url); + } + Object.defineProperty(RequestContext.prototype, "flighting", { + get: function () { + return this.flightingService; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "telemetry", { + get: function () { + if (!this.m_telemetry) { + this.m_telemetry=OfficeCore.TelemetryService.newObject(this); + } + return this.m_telemetry; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "flightingService", { + get: function () { + if (!this.m_flightingService) { + this.m_flightingService=OfficeCore.FlightingService.newObject(this); + } + return this.m_flightingService; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeExtension.ClientRequestContext)); + OfficeCore.RequestContext=RequestContext; +})(OfficeCore || (OfficeCore={})); +var OfficeCore; +(function (OfficeCore) { + var _hostName="OfficeCore"; + var _defaultApiSetName="TelemetryApi"; + var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; + var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; + var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; + var _createNewObjectObjectPath=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath; + var _createChildItemObjectPathUsingIndexer=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer; + var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; + var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; + var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; + var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined=OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; + var _load=OfficeExtension.Utility.load; + var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; + var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; + var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var _typeTelemetryService="TelemetryService"; + var TelemetryService=(function (_super) { + __extends(TelemetryService, _super); + function TelemetryService() { + _super.apply(this, arguments); + } + Object.defineProperty(TelemetryService.prototype, "_className", { + get: function () { + return "TelemetryService"; + }, + enumerable: true, + configurable: true + }); + TelemetryService.prototype.sendTelemetryEvent=function (telemetryProperties, eventName, eventContract, eventFlags, value) { + _createMethodAction(this.context, this, "SendTelemetryEvent", 1, [telemetryProperties, eventName, eventContract, eventFlags, value], false); + }; + TelemetryService.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + TelemetryService.newObject=function (context) { + var ret=new OfficeCore.TelemetryService(context, _createNewObjectObjectPath(context, "Microsoft.Telemetry.TelemetryService", false, false)); + return ret; + }; + TelemetryService.prototype.toJSON=function () { + return {}; + }; + return TelemetryService; + }(OfficeExtension.ClientObject)); + OfficeCore.TelemetryService=TelemetryService; + var TelemetryErrorCodes; + (function (TelemetryErrorCodes) { + TelemetryErrorCodes.generalException="GeneralException"; + })(TelemetryErrorCodes=OfficeCore.TelemetryErrorCodes || (OfficeCore.TelemetryErrorCodes={})); +})(OfficeCore || (OfficeCore={})); + +var __extends=(this && this.__extends) || (function () { + var extendStatics=Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__=b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p]=b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor=d; } + d.prototype=b===null ? Object.create(b) : (__.prototype=b.prototype, new __()); + }; +})(); var Word; (function (Word) { function _normalizeSearchOptions(context, searchOptions) { @@ -12019,6 +13455,8 @@ var Word; } return newSearchOptions; } + var _hostName="Word"; + var _defaultApiSetName="WordApi"; var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; @@ -12027,19 +13465,59 @@ var Word; var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createEnsureUnchangedAction=OfficeExtension.ActionFactory.createEnsureUnchangedAction; var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; var _isUndefined=OfficeExtension.Utility.isUndefined; var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; var _load=OfficeExtension.Utility.load; + var _loadAndSync=OfficeExtension.Utility.loadAndSync; + var _retrieve=OfficeExtension.Utility.retrieve; + var _retrieveAndSync=OfficeExtension.Utility.retrieveAndSync; + var _toJson=OfficeExtension.Utility.toJson; var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var _typeApplication="Application"; + var Application=(function (_super) { + __extends(Application, _super); + function Application() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Application.prototype, "_className", { + get: function () { + return "Application"; + }, + enumerable: true, + configurable: true + }); + Application.prototype.createDocument=function (base64File) { + return new Word.DocumentCreated(this.context, _createMethodObjectPath(this.context, this, "CreateDocument", 1, [base64File], false, false, null, false)); + }; + Application.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + Application.newObject=function (context) { + var ret=new Word.Application(context, _createNewObjectObjectPath(context, "Microsoft.WordServices.Application", false, false)); + return ret; + }; + Application.prototype.toJSON=function () { + return _toJson(this, {}, {}); + }; + return Application; + }(OfficeExtension.ClientObject)); + Word.Application=Application; + var _typeBody="Body"; var Body=(function (_super) { __extends(Body, _super); function Body() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Body.prototype, "_className", { get: function () { @@ -12050,131 +13528,138 @@ var Word; }); Object.defineProperty(Body.prototype, "contentControls", { get: function () { - if (!this.m_contentControls) { - this.m_contentControls=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false)); + if (!this._C) { + this._C=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false, false)); } - return this.m_contentControls; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._F) { + this._F=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "inlinePictures", { get: function () { - if (!this.m_inlinePictures) { - this.m_inlinePictures=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false)); + if (!this._I) { + this._I=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false, false)); } - return this.m_inlinePictures; + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "lists", { get: function () { - if (!this.m_lists) { - this.m_lists=new Word.ListCollection(this.context, _createPropertyObjectPath(this.context, this, "Lists", true, false)); + _throwIfApiNotSupported("Body.lists", _defaultApiSetName, "1.3", _hostName); + if (!this._L) { + this._L=new Word.ListCollection(this.context, _createPropertyObjectPath(this.context, this, "Lists", true, false, false)); } - return this.m_lists; + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._P) { + this._P=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "parentBody", { get: function () { - if (!this.m_parentBody) { - this.m_parentBody=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false)); + _throwIfApiNotSupported("Body.parentBody", _defaultApiSetName, "1.3", _hostName); + if (!this._Pa) { + this._Pa=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false, false)); } - return this.m_parentBody; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "parentBodyOrNullObject", { get: function () { - if (!this.m_parentBodyOrNullObject) { - this.m_parentBodyOrNullObject=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBodyOrNullObject", false, false)); + _throwIfApiNotSupported("Body.parentBodyOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Par) { + this._Par=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBodyOrNullObject", false, false, false)); } - return this.m_parentBodyOrNullObject; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "parentContentControl", { get: function () { - if (!this.m_parentContentControl) { - this.m_parentContentControl=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false)); + if (!this._Pare) { + this._Pare=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false, false)); } - return this.m_parentContentControl; + return this._Pare; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "parentContentControlOrNullObject", { get: function () { - if (!this.m_parentContentControlOrNullObject) { - this.m_parentContentControlOrNullObject=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false)); + _throwIfApiNotSupported("Body.parentContentControlOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Paren) { + this._Paren=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false, false)); } - return this.m_parentContentControlOrNullObject; + return this._Paren; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "parentSection", { get: function () { - if (!this.m_parentSection) { - this.m_parentSection=new Word.Section(this.context, _createPropertyObjectPath(this.context, this, "ParentSection", false, false)); + _throwIfApiNotSupported("Body.parentSection", _defaultApiSetName, "1.3", _hostName); + if (!this._Parent) { + this._Parent=new Word.Section(this.context, _createPropertyObjectPath(this.context, this, "ParentSection", false, false, false)); } - return this.m_parentSection; + return this._Parent; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "parentSectionOrNullObject", { get: function () { - if (!this.m_parentSectionOrNullObject) { - this.m_parentSectionOrNullObject=new Word.Section(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionOrNullObject", false, false)); + _throwIfApiNotSupported("Body.parentSectionOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ParentS) { + this._ParentS=new Word.Section(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionOrNullObject", false, false, false)); } - return this.m_parentSectionOrNullObject; + return this._ParentS; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "tables", { get: function () { - if (!this.m_tables) { - this.m_tables=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false)); + _throwIfApiNotSupported("Body.tables", _defaultApiSetName, "1.3", _hostName); + if (!this._T) { + this._T=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false, false)); } - return this.m_tables; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "Body", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._S, _typeBody, this._isNull); + return this._S; }, set: function (value) { - this.m_style=value; + this._S=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -12182,11 +13667,12 @@ var Word; }); Object.defineProperty(Body.prototype, "styleBuiltIn", { get: function () { - _throwIfNotLoaded("styleBuiltIn", this.m_styleBuiltIn, "Body", this._isNull); - return this.m_styleBuiltIn; + _throwIfNotLoaded("styleBuiltIn", this._St, _typeBody, this._isNull); + _throwIfApiNotSupported("Body.styleBuiltIn", _defaultApiSetName, "1.3", _hostName); + return this._St; }, set: function (value) { - this.m_styleBuiltIn=value; + this._St=value; _createSetPropertyAction(this.context, this, "StyleBuiltIn", value); }, enumerable: true, @@ -12194,41 +13680,31 @@ var Word; }); Object.defineProperty(Body.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "Body", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._Te, _typeBody, this._isNull); + return this._Te; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "Body", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._Ty, _typeBody, this._isNull); + _throwIfApiNotSupported("Body.type", _defaultApiSetName, "1.3", _hostName); + return this._Ty; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Body", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeBody, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Body.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["style", "styleBuiltIn"], ["font"], [ - "contentControls", - "inlinePictures", - "lists", - "paragraphs", - "parentBody", - "parentBodyOrNullObject", - "parentContentControl", - "parentContentControlOrNullObject", - "parentSection", - "parentSectionOrNullObject", - "tables", "contentControls", "inlinePictures", "lists", @@ -12243,59 +13719,62 @@ var Word; ]); }; Body.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; Body.prototype.getHtml=function () { - var action=_createMethodAction(this.context, this, "GetHtml", 1, []); + var action=_createMethodAction(this.context, this, "GetHtml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Body.prototype.getOoxml=function () { - var action=_createMethodAction(this.context, this, "GetOoxml", 1, []); + var action=_createMethodAction(this.context, this, "GetOoxml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Body.prototype.getRange=function (rangeLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null)); + _throwIfApiNotSupported("Body.getRange", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null, false)); }; Body.prototype.insertBreak=function (breakType, insertLocation) { - _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation]); + _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation], false); }; Body.prototype.insertContentControl=function () { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null)); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null, false)); }; Body.prototype.insertFileFromBase64=function (base64File, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null, false)); }; Body.prototype.insertHtml=function (html, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null, false)); }; Body.prototype.insertInlinePictureFromBase64=function (base64EncodedImage, insertLocation) { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null)); + _throwIfApiNotSupported("Body.insertInlinePictureFromBase64", _defaultApiSetName, "1.2", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null, false)); }; Body.prototype.insertOoxml=function (ooxml, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null, false)); }; Body.prototype.insertParagraph=function (paragraphText, insertLocation) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null, false)); }; Body.prototype.insertTable=function (rowCount, columnCount, insertLocation, values) { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null)); + _throwIfApiNotSupported("Body.insertTable", _defaultApiSetName, "1.3", _hostName); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null, false)); }; Body.prototype.insertText=function (text, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null, false)); }; Body.prototype.search=function (searchText, searchOptions) { searchOptions=_normalizeSearchOptions(this.context, searchOptions); - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null)); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null, false)); }; Body.prototype.select=function (selectionMode) { - _createMethodAction(this.context, this, "Select", 1, [selectionMode]); + _createMethodAction(this.context, this, "Select", 1, [selectionMode], false); }; Body.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Body.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12304,25 +13783,33 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._S=obj["Style"]; } if (!_isUndefined(obj["StyleBuiltIn"])) { - this.m_styleBuiltIn=obj["StyleBuiltIn"]; + this._St=obj["StyleBuiltIn"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._Te=obj["Text"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._Ty=obj["Type"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["contentControls", "ContentControls", "font", "Font", "inlinePictures", "InlinePictures", "lists", "Lists", "paragraphs", "Paragraphs", "parentBody", "ParentBody", "parentBodyOrNullObject", "ParentBodyOrNullObject", "parentContentControl", "ParentContentControl", "parentContentControlOrNullObject", "ParentContentControlOrNullObject", "parentSection", "ParentSection", "parentSectionOrNullObject", "ParentSectionOrNullObject", "tables", "Tables"]); }; Body.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Body.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Body.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Body.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; Body.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -12330,7 +13817,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; Body.prototype.track=function () { @@ -12342,21 +13829,32 @@ var Word; return this; }; Body.prototype.toJSON=function () { - return { - "font": this.m_font, - "style": this.m_style, - "styleBuiltIn": this.m_styleBuiltIn, - "text": this.m_text, - "type": this.m_type - }; + return _toJson(this, { + "style": this._S, + "styleBuiltIn": this._St, + "text": this._Te, + "type": this._Ty, + }, { + "contentControls": this._C, + "font": this._F, + "inlinePictures": this._I, + "lists": this._L, + "paragraphs": this._P, + "tables": this._T, + }); + }; + Body.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Body; }(OfficeExtension.ClientObject)); Word.Body=Body; + var _typeContentControl="ContentControl"; var ContentControl=(function (_super) { __extends(ContentControl, _super); function ContentControl() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ContentControl.prototype, "_className", { get: function () { @@ -12367,141 +13865,149 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "contentControls", { get: function () { - if (!this.m_contentControls) { - this.m_contentControls=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false)); + if (!this._Con) { + this._Con=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false, false)); } - return this.m_contentControls; + return this._Con; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._F) { + this._F=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "inlinePictures", { get: function () { - if (!this.m_inlinePictures) { - this.m_inlinePictures=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false)); + if (!this._In) { + this._In=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false, false)); } - return this.m_inlinePictures; + return this._In; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "lists", { get: function () { - if (!this.m_lists) { - this.m_lists=new Word.ListCollection(this.context, _createPropertyObjectPath(this.context, this, "Lists", true, false)); + _throwIfApiNotSupported("ContentControl.lists", _defaultApiSetName, "1.3", _hostName); + if (!this._L) { + this._L=new Word.ListCollection(this.context, _createPropertyObjectPath(this.context, this, "Lists", true, false, false)); } - return this.m_lists; + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._P) { + this._P=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "parentBody", { get: function () { - if (!this.m_parentBody) { - this.m_parentBody=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false)); + _throwIfApiNotSupported("ContentControl.parentBody", _defaultApiSetName, "1.3", _hostName); + if (!this._Pa) { + this._Pa=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false, false)); } - return this.m_parentBody; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "parentContentControl", { get: function () { - if (!this.m_parentContentControl) { - this.m_parentContentControl=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false)); + if (!this._Par) { + this._Par=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false, false)); } - return this.m_parentContentControl; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "parentContentControlOrNullObject", { get: function () { - if (!this.m_parentContentControlOrNullObject) { - this.m_parentContentControlOrNullObject=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false)); + _throwIfApiNotSupported("ContentControl.parentContentControlOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Pare) { + this._Pare=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false, false)); } - return this.m_parentContentControlOrNullObject; + return this._Pare; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + _throwIfApiNotSupported("ContentControl.parentTable", _defaultApiSetName, "1.3", _hostName); + if (!this._Paren) { + this._Paren=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._Paren; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "parentTableCell", { get: function () { - if (!this.m_parentTableCell) { - this.m_parentTableCell=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false)); + _throwIfApiNotSupported("ContentControl.parentTableCell", _defaultApiSetName, "1.3", _hostName); + if (!this._Parent) { + this._Parent=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false, false)); } - return this.m_parentTableCell; + return this._Parent; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "parentTableCellOrNullObject", { get: function () { - if (!this.m_parentTableCellOrNullObject) { - this.m_parentTableCellOrNullObject=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false)); + _throwIfApiNotSupported("ContentControl.parentTableCellOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ParentT) { + this._ParentT=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false, false)); } - return this.m_parentTableCellOrNullObject; + return this._ParentT; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "parentTableOrNullObject", { get: function () { - if (!this.m_parentTableOrNullObject) { - this.m_parentTableOrNullObject=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false)); + _throwIfApiNotSupported("ContentControl.parentTableOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ParentTa) { + this._ParentTa=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false, false)); } - return this.m_parentTableOrNullObject; + return this._ParentTa; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "tables", { get: function () { - if (!this.m_tables) { - this.m_tables=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false)); + _throwIfApiNotSupported("ContentControl.tables", _defaultApiSetName, "1.3", _hostName); + if (!this._T) { + this._T=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false, false)); } - return this.m_tables; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "appearance", { get: function () { - _throwIfNotLoaded("appearance", this.m_appearance, "ContentControl", this._isNull); - return this.m_appearance; + _throwIfNotLoaded("appearance", this._A, _typeContentControl, this._isNull); + return this._A; }, set: function (value) { - this.m_appearance=value; + this._A=value; _createSetPropertyAction(this.context, this, "Appearance", value); }, enumerable: true, @@ -12509,11 +14015,11 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "cannotDelete", { get: function () { - _throwIfNotLoaded("cannotDelete", this.m_cannotDelete, "ContentControl", this._isNull); - return this.m_cannotDelete; + _throwIfNotLoaded("cannotDelete", this._C, _typeContentControl, this._isNull); + return this._C; }, set: function (value) { - this.m_cannotDelete=value; + this._C=value; _createSetPropertyAction(this.context, this, "CannotDelete", value); }, enumerable: true, @@ -12521,11 +14027,11 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "cannotEdit", { get: function () { - _throwIfNotLoaded("cannotEdit", this.m_cannotEdit, "ContentControl", this._isNull); - return this.m_cannotEdit; + _throwIfNotLoaded("cannotEdit", this._Ca, _typeContentControl, this._isNull); + return this._Ca; }, set: function (value) { - this.m_cannotEdit=value; + this._Ca=value; _createSetPropertyAction(this.context, this, "CannotEdit", value); }, enumerable: true, @@ -12533,11 +14039,11 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "ContentControl", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._Co, _typeContentControl, this._isNull); + return this._Co; }, set: function (value) { - this.m_color=value; + this._Co=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -12545,19 +14051,19 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "ContentControl", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeContentControl, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "placeholderText", { get: function () { - _throwIfNotLoaded("placeholderText", this.m_placeholderText, "ContentControl", this._isNull); - return this.m_placeholderText; + _throwIfNotLoaded("placeholderText", this._Pl, _typeContentControl, this._isNull); + return this._Pl; }, set: function (value) { - this.m_placeholderText=value; + this._Pl=value; _createSetPropertyAction(this.context, this, "PlaceholderText", value); }, enumerable: true, @@ -12565,11 +14071,11 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "removeWhenEdited", { get: function () { - _throwIfNotLoaded("removeWhenEdited", this.m_removeWhenEdited, "ContentControl", this._isNull); - return this.m_removeWhenEdited; + _throwIfNotLoaded("removeWhenEdited", this._R, _typeContentControl, this._isNull); + return this._R; }, set: function (value) { - this.m_removeWhenEdited=value; + this._R=value; _createSetPropertyAction(this.context, this, "RemoveWhenEdited", value); }, enumerable: true, @@ -12577,11 +14083,11 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "ContentControl", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._S, _typeContentControl, this._isNull); + return this._S; }, set: function (value) { - this.m_style=value; + this._S=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -12589,11 +14095,12 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "styleBuiltIn", { get: function () { - _throwIfNotLoaded("styleBuiltIn", this.m_styleBuiltIn, "ContentControl", this._isNull); - return this.m_styleBuiltIn; + _throwIfNotLoaded("styleBuiltIn", this._St, _typeContentControl, this._isNull); + _throwIfApiNotSupported("ContentControl.styleBuiltIn", _defaultApiSetName, "1.3", _hostName); + return this._St; }, set: function (value) { - this.m_styleBuiltIn=value; + this._St=value; _createSetPropertyAction(this.context, this, "StyleBuiltIn", value); }, enumerable: true, @@ -12601,19 +14108,20 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "subtype", { get: function () { - _throwIfNotLoaded("subtype", this.m_subtype, "ContentControl", this._isNull); - return this.m_subtype; + _throwIfNotLoaded("subtype", this._Su, _typeContentControl, this._isNull); + _throwIfApiNotSupported("ContentControl.subtype", _defaultApiSetName, "1.3", _hostName); + return this._Su; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "tag", { get: function () { - _throwIfNotLoaded("tag", this.m_tag, "ContentControl", this._isNull); - return this.m_tag; + _throwIfNotLoaded("tag", this._Ta, _typeContentControl, this._isNull); + return this._Ta; }, set: function (value) { - this.m_tag=value; + this._Ta=value; _createSetPropertyAction(this.context, this, "Tag", value); }, enumerable: true, @@ -12621,19 +14129,19 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "ContentControl", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._Te, _typeContentControl, this._isNull); + return this._Te; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "title", { get: function () { - _throwIfNotLoaded("title", this.m_title, "ContentControl", this._isNull); - return this.m_title; + _throwIfNotLoaded("title", this._Ti, _typeContentControl, this._isNull); + return this._Ti; }, set: function (value) { - this.m_title=value; + this._Ti=value; _createSetPropertyAction(this.context, this, "Title", value); }, enumerable: true, @@ -12641,34 +14149,22 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "ContentControl", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._Ty, _typeContentControl, this._isNull); + return this._Ty; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "ContentControl", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeContentControl, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); ContentControl.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["title", "tag", "placeholderText", "appearance", "color", "removeWhenEdited", "cannotDelete", "cannotEdit", "style", "styleBuiltIn"], ["font"], [ - "contentControls", - "inlinePictures", - "lists", - "paragraphs", - "parentBody", - "parentContentControl", - "parentContentControlOrNullObject", - "parentTable", - "parentTableCell", - "parentTableCellOrNullObject", - "parentTableOrNullObject", - "tables", "contentControls", "inlinePictures", "lists", @@ -12684,65 +14180,70 @@ var Word; ]); }; ContentControl.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; ContentControl.prototype.delete=function (keepContent) { - _createMethodAction(this.context, this, "Delete", 0, [keepContent]); + _createMethodAction(this.context, this, "Delete", 0, [keepContent], false); }; ContentControl.prototype.getHtml=function () { - var action=_createMethodAction(this.context, this, "GetHtml", 1, []); + var action=_createMethodAction(this.context, this, "GetHtml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; ContentControl.prototype.getOoxml=function () { - var action=_createMethodAction(this.context, this, "GetOoxml", 1, []); + var action=_createMethodAction(this.context, this, "GetOoxml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; ContentControl.prototype.getRange=function (rangeLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null)); + _throwIfApiNotSupported("ContentControl.getRange", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null, false)); }; ContentControl.prototype.getTextRanges=function (endingMarks, trimSpacing) { - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetTextRanges", 1, [endingMarks, trimSpacing], true, false, null)); + _throwIfApiNotSupported("ContentControl.getTextRanges", _defaultApiSetName, "1.3", _hostName); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetTextRanges", 1, [endingMarks, trimSpacing], true, false, null, false)); }; ContentControl.prototype.insertBreak=function (breakType, insertLocation) { - _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation]); + _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation], false); }; ContentControl.prototype.insertFileFromBase64=function (base64File, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null, false)); }; ContentControl.prototype.insertHtml=function (html, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null, false)); }; ContentControl.prototype.insertInlinePictureFromBase64=function (base64EncodedImage, insertLocation) { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null)); + _throwIfApiNotSupported("ContentControl.insertInlinePictureFromBase64", _defaultApiSetName, "1.2", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null, false)); }; ContentControl.prototype.insertOoxml=function (ooxml, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null, false)); }; ContentControl.prototype.insertParagraph=function (paragraphText, insertLocation) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null, false)); }; ContentControl.prototype.insertTable=function (rowCount, columnCount, insertLocation, values) { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null)); + _throwIfApiNotSupported("ContentControl.insertTable", _defaultApiSetName, "1.3", _hostName); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null, false)); }; ContentControl.prototype.insertText=function (text, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null, false)); }; ContentControl.prototype.search=function (searchText, searchOptions) { searchOptions=_normalizeSearchOptions(this.context, searchOptions); - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null)); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null, false)); }; ContentControl.prototype.select=function (selectionMode) { - _createMethodAction(this.context, this, "Select", 1, [selectionMode]); + _createMethodAction(this.context, this, "Select", 1, [selectionMode], false); }; ContentControl.prototype.split=function (delimiters, multiParagraphs, trimDelimiters, trimSpacing) { - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Split", 1, [delimiters, multiParagraphs, trimDelimiters, trimSpacing], true, false, null)); + _throwIfApiNotSupported("ContentControl.split", _defaultApiSetName, "1.3", _hostName); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Split", 1, [delimiters, multiParagraphs, trimDelimiters, trimSpacing], true, false, null, false)); }; ContentControl.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; ContentControl.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12751,55 +14252,63 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Appearance"])) { - this.m_appearance=obj["Appearance"]; + this._A=obj["Appearance"]; } if (!_isUndefined(obj["CannotDelete"])) { - this.m_cannotDelete=obj["CannotDelete"]; + this._C=obj["CannotDelete"]; } if (!_isUndefined(obj["CannotEdit"])) { - this.m_cannotEdit=obj["CannotEdit"]; + this._Ca=obj["CannotEdit"]; } if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._Co=obj["Color"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["PlaceholderText"])) { - this.m_placeholderText=obj["PlaceholderText"]; + this._Pl=obj["PlaceholderText"]; } if (!_isUndefined(obj["RemoveWhenEdited"])) { - this.m_removeWhenEdited=obj["RemoveWhenEdited"]; + this._R=obj["RemoveWhenEdited"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._S=obj["Style"]; } if (!_isUndefined(obj["StyleBuiltIn"])) { - this.m_styleBuiltIn=obj["StyleBuiltIn"]; + this._St=obj["StyleBuiltIn"]; } if (!_isUndefined(obj["Subtype"])) { - this.m_subtype=obj["Subtype"]; + this._Su=obj["Subtype"]; } if (!_isUndefined(obj["Tag"])) { - this.m_tag=obj["Tag"]; + this._Ta=obj["Tag"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._Te=obj["Text"]; } if (!_isUndefined(obj["Title"])) { - this.m_title=obj["Title"]; + this._Ti=obj["Title"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._Ty=obj["Type"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["contentControls", "ContentControls", "font", "Font", "inlinePictures", "InlinePictures", "lists", "Lists", "paragraphs", "Paragraphs", "parentBody", "ParentBody", "parentContentControl", "ParentContentControl", "parentContentControlOrNullObject", "ParentContentControlOrNullObject", "parentTable", "ParentTable", "parentTableCell", "ParentTableCell", "parentTableCellOrNullObject", "ParentTableCellOrNullObject", "parentTableOrNullObject", "ParentTableOrNullObject", "tables", "Tables"]); }; ContentControl.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ContentControl.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ContentControl.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ContentControl.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; ContentControl.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -12807,10 +14316,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; ContentControl.prototype.track=function () { @@ -12822,31 +14331,42 @@ var Word; return this; }; ContentControl.prototype.toJSON=function () { - return { - "appearance": this.m_appearance, - "cannotDelete": this.m_cannotDelete, - "cannotEdit": this.m_cannotEdit, - "color": this.m_color, - "font": this.m_font, - "id": this.m_id, - "placeholderText": this.m_placeholderText, - "removeWhenEdited": this.m_removeWhenEdited, - "style": this.m_style, - "styleBuiltIn": this.m_styleBuiltIn, - "subtype": this.m_subtype, - "tag": this.m_tag, - "text": this.m_text, - "title": this.m_title, - "type": this.m_type - }; + return _toJson(this, { + "appearance": this._A, + "cannotDelete": this._C, + "cannotEdit": this._Ca, + "color": this._Co, + "id": this._I, + "placeholderText": this._Pl, + "removeWhenEdited": this._R, + "style": this._S, + "styleBuiltIn": this._St, + "subtype": this._Su, + "tag": this._Ta, + "text": this._Te, + "title": this._Ti, + "type": this._Ty, + }, { + "contentControls": this._Con, + "font": this._F, + "inlinePictures": this._In, + "lists": this._L, + "paragraphs": this._P, + "tables": this._T, + }); + }; + ContentControl.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ContentControl; }(OfficeExtension.ClientObject)); Word.ContentControl=ContentControl; + var _typeContentControlCollection="ContentControlCollection"; var ContentControlCollection=(function (_super) { __extends(ContentControlCollection, _super); function ContentControlCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ContentControlCollection.prototype, "_className", { get: function () { @@ -12857,7 +14377,7 @@ var Word; }); Object.defineProperty(ContentControlCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ContentControlCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeContentControlCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -12865,38 +14385,42 @@ var Word; }); Object.defineProperty(ContentControlCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "ContentControlCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeContentControlCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); ContentControlCollection.prototype.getById=function (id) { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetById", 1, [id], false, false, null)); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetById", 1, [id], false, false, null, false)); }; ContentControlCollection.prototype.getByIdOrNullObject=function (id) { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetByIdOrNullObject", 1, [id], false, false, null)); + _throwIfApiNotSupported("ContentControlCollection.getByIdOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetByIdOrNullObject", 1, [id], false, false, null, false)); }; ContentControlCollection.prototype.getByTag=function (tag) { - return new Word.ContentControlCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTag", 1, [tag], true, false, null)); + return new Word.ContentControlCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTag", 1, [tag], true, false, null, false)); }; ContentControlCollection.prototype.getByTitle=function (title) { - return new Word.ContentControlCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTitle", 1, [title], true, false, null)); + return new Word.ContentControlCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTitle", 1, [title], true, false, null, false)); }; ContentControlCollection.prototype.getByTypes=function (types) { - return new Word.ContentControlCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTypes", 1, [types], true, false, null)); + _throwIfApiNotSupported("ContentControlCollection.getByTypes", _defaultApiSetName, "1.3", _hostName); + return new Word.ContentControlCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTypes", 1, [types], true, false, null, false)); }; ContentControlCollection.prototype.getFirst=function () { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + _throwIfApiNotSupported("ContentControlCollection.getFirst", _defaultApiSetName, "1.3", _hostName); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; ContentControlCollection.prototype.getFirstOrNullObject=function () { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("ContentControlCollection.getFirstOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; ContentControlCollection.prototype.getItem=function (index) { return new Word.ContentControl(this.context, _createIndexerObjectPath(this.context, this, [index])); }; ContentControlCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; ContentControlCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12905,7 +14429,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -12918,8 +14442,16 @@ var Word; } }; ContentControlCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ContentControlCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ContentControlCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ContentControlCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; ContentControlCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -12927,7 +14459,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; ContentControlCollection.prototype.track=function () { @@ -12939,15 +14471,16 @@ var Word; return this; }; ContentControlCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return ContentControlCollection; }(OfficeExtension.ClientObject)); Word.ContentControlCollection=ContentControlCollection; + var _typeCustomProperty="CustomProperty"; var CustomProperty=(function (_super) { __extends(CustomProperty, _super); function CustomProperty() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CustomProperty.prototype, "_className", { get: function () { @@ -12958,15 +14491,15 @@ var Word; }); Object.defineProperty(CustomProperty.prototype, "key", { get: function () { - _throwIfNotLoaded("key", this.m_key, "CustomProperty", this._isNull); - return this.m_key; + _throwIfNotLoaded("key", this._K, _typeCustomProperty, this._isNull); + return this._K; }, enumerable: true, configurable: true }); Object.defineProperty(CustomProperty.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "CustomProperty", this._isNull); + _throwIfNotLoaded("type", this.m_type, _typeCustomProperty, this._isNull); return this.m_type; }, enumerable: true, @@ -12979,7 +14512,7 @@ var Word; _throwIfNotLoaded("value", this.m_value, "CustomProperty", this._isNull); return new Date(this.m_value); } - _throwIfNotLoaded("value", this.m_value, "CustomProperty", this._isNull); + _throwIfNotLoaded("value", this.m_value, _typeCustomProperty, this._isNull); return this.m_value; }, set: function (value) { @@ -12991,16 +14524,16 @@ var Word; }); Object.defineProperty(CustomProperty.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "CustomProperty", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeCustomProperty, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(CustomProperty.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "CustomProperty", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeCustomProperty, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -13009,10 +14542,10 @@ var Word; this._recursivelySet(properties, options, ["value"], [], []); }; CustomProperty.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; CustomProperty.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; CustomProperty.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13021,7 +14554,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Key"])) { - this.m_key=obj["Key"]; + this._K=obj["Key"]; } if (!_isUndefined(obj["Type"])) { this.m_type=obj["Type"]; @@ -13030,15 +14563,23 @@ var Word; this.m_value=obj["Value"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } }; CustomProperty.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CustomProperty.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + CustomProperty.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CustomProperty.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; CustomProperty.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -13046,10 +14587,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; CustomProperty.prototype.track=function () { @@ -13061,19 +14602,24 @@ var Word; return this; }; CustomProperty.prototype.toJSON=function () { - return { - "key": this.m_key, + return _toJson(this, { + "key": this._K, "type": this.m_type, - "value": this.m_value - }; + "value": this.m_value, + }, {}); + }; + CustomProperty.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return CustomProperty; }(OfficeExtension.ClientObject)); Word.CustomProperty=CustomProperty; + var _typeCustomPropertyCollection="CustomPropertyCollection"; var CustomPropertyCollection=(function (_super) { __extends(CustomPropertyCollection, _super); function CustomPropertyCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CustomPropertyCollection.prototype, "_className", { get: function () { @@ -13084,7 +14630,7 @@ var Word; }); Object.defineProperty(CustomPropertyCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "CustomPropertyCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeCustomPropertyCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -13092,20 +14638,20 @@ var Word; }); Object.defineProperty(CustomPropertyCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "CustomPropertyCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeCustomPropertyCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); CustomPropertyCollection.prototype.add=function (key, value) { - return new Word.CustomProperty(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [key, value], false, true, null)); + return new Word.CustomProperty(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [key, value], false, true, null, false)); }; CustomPropertyCollection.prototype.deleteAll=function () { - _createMethodAction(this.context, this, "DeleteAll", 0, []); + _createMethodAction(this.context, this, "DeleteAll", 0, [], false); }; CustomPropertyCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -13114,10 +14660,10 @@ var Word; return new Word.CustomProperty(this.context, _createIndexerObjectPath(this.context, this, [key])); }; CustomPropertyCollection.prototype.getItemOrNullObject=function (key) { - return new Word.CustomProperty(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null)); + return new Word.CustomProperty(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null, false)); }; CustomPropertyCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; CustomPropertyCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13126,7 +14672,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -13139,8 +14685,16 @@ var Word; } }; CustomPropertyCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CustomPropertyCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + CustomPropertyCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CustomPropertyCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; CustomPropertyCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -13148,7 +14702,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; CustomPropertyCollection.prototype.track=function () { @@ -13160,15 +14714,16 @@ var Word; return this; }; CustomPropertyCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return CustomPropertyCollection; }(OfficeExtension.ClientObject)); Word.CustomPropertyCollection=CustomPropertyCollection; + var _typeDocument="Document"; var Document=(function (_super) { __extends(Document, _super); function Document() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Document.prototype, "_className", { get: function () { @@ -13179,55 +14734,56 @@ var Word; }); Object.defineProperty(Document.prototype, "body", { get: function () { - if (!this.m_body) { - this.m_body=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "Body", false, false)); + if (!this._B) { + this._B=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "Body", false, false, false)); } - return this.m_body; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(Document.prototype, "contentControls", { get: function () { - if (!this.m_contentControls) { - this.m_contentControls=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false)); + if (!this._C) { + this._C=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false, false)); } - return this.m_contentControls; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Document.prototype, "properties", { get: function () { - if (!this.m_properties) { - this.m_properties=new Word.DocumentProperties(this.context, _createPropertyObjectPath(this.context, this, "Properties", false, false)); + _throwIfApiNotSupported("Document.properties", _defaultApiSetName, "1.3", _hostName); + if (!this._P) { + this._P=new Word.DocumentProperties(this.context, _createPropertyObjectPath(this.context, this, "Properties", false, false, false)); } - return this.m_properties; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Document.prototype, "sections", { get: function () { - if (!this.m_sections) { - this.m_sections=new Word.SectionCollection(this.context, _createPropertyObjectPath(this.context, this, "Sections", true, false)); + if (!this._Se) { + this._Se=new Word.SectionCollection(this.context, _createPropertyObjectPath(this.context, this, "Sections", true, false, false)); } - return this.m_sections; + return this._Se; }, enumerable: true, configurable: true }); Object.defineProperty(Document.prototype, "saved", { get: function () { - _throwIfNotLoaded("saved", this.m_saved, "Document", this._isNull); - return this.m_saved; + _throwIfNotLoaded("saved", this._S, _typeDocument, this._isNull); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(Document.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Document", this._isNull); + _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, _typeDocument, this._isNull); return this.m__ReferenceId; }, enumerable: true, @@ -13235,38 +14791,52 @@ var Word; }); Document.prototype.set=function (properties, options) { this._recursivelySet(properties, options, [], ["body", "properties"], [ - "contentControls", - "sections", "contentControls", "sections" ]); }; + Document.prototype.getMetadata=function (propertyGUID) { + var action=_createMethodAction(this.context, this, "GetMetadata", 1, [propertyGUID], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; Document.prototype.getSelection=function () { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetSelection", 1, [], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetSelection", 1, [], false, true, null, false)); + }; + Document.prototype.open=function () { + _throwIfApiNotSupported("Document.open", _defaultApiSetName, "1.3", _hostName); + _createMethodAction(this.context, this, "Open", 1, [], false); }; Document.prototype.save=function () { - _createMethodAction(this.context, this, "Save", 0, []); + _createMethodAction(this.context, this, "Save", 0, [], false); + }; + Document.prototype.setMetadata=function (propertyGUID, propertyValue) { + _createMethodAction(this.context, this, "SetMetadata", 0, [propertyGUID, propertyValue], false); + }; + Document.prototype.setMetadataOnTile=function (tileID, propertyGUID, propertyValue) { + _createMethodAction(this.context, this, "SetMetadataOnTile", 0, [tileID, propertyGUID, propertyValue], false); }; Document.prototype._GetObjectByReferenceId=function (referenceId) { - var action=_createMethodAction(this.context, this, "_GetObjectByReferenceId", 1, [referenceId]); + var action=_createMethodAction(this.context, this, "_GetObjectByReferenceId", 1, [referenceId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Document.prototype._GetObjectTypeNameByReferenceId=function (referenceId) { - var action=_createMethodAction(this.context, this, "_GetObjectTypeNameByReferenceId", 1, [referenceId]); + var action=_createMethodAction(this.context, this, "_GetObjectTypeNameByReferenceId", 1, [referenceId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Document.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Document.prototype._RemoveAllReferences=function () { - _createMethodAction(this.context, this, "_RemoveAllReferences", 1, []); + _createMethodAction(this.context, this, "_RemoveAllReferences", 1, [], false); }; Document.prototype._RemoveReference=function (referenceId) { - _createMethodAction(this.context, this, "_RemoveReference", 1, [referenceId]); + _createMethodAction(this.context, this, "_RemoveReference", 1, [referenceId], false); }; Document.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13275,7 +14845,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Saved"])) { - this.m_saved=obj["Saved"]; + this._S=obj["Saved"]; } if (!_isUndefined(obj["_ReferenceId"])) { this.m__ReferenceId=obj["_ReferenceId"]; @@ -13283,8 +14853,16 @@ var Word; _handleNavigationPropertyResults(this, obj, ["body", "Body", "contentControls", "ContentControls", "properties", "Properties", "sections", "Sections"]); }; Document.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Document.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Document.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Document.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; Document.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -13304,19 +14882,177 @@ var Word; return this; }; Document.prototype.toJSON=function () { - return { - "body": this.m_body, - "properties": this.m_properties, - "saved": this.m_saved - }; + return _toJson(this, { + "saved": this._S, + }, { + "body": this._B, + "contentControls": this._C, + "properties": this._P, + "sections": this._Se, + }); + }; + Document.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Document; }(OfficeExtension.ClientObject)); Word.Document=Document; + var _typeDocumentCreated="DocumentCreated"; + var DocumentCreated=(function (_super) { + __extends(DocumentCreated, _super); + function DocumentCreated() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(DocumentCreated.prototype, "_className", { + get: function () { + return "DocumentCreated"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentCreated.prototype, "body", { + get: function () { + _throwIfApiNotSupported("DocumentCreated.body", "WordApiHiddenDocument", "1.3", _hostName); + if (!this._B) { + this._B=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "Body", false, false, false)); + } + return this._B; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentCreated.prototype, "contentControls", { + get: function () { + _throwIfApiNotSupported("DocumentCreated.contentControls", "WordApiHiddenDocument", "1.3", _hostName); + if (!this._C) { + this._C=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false, false)); + } + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentCreated.prototype, "properties", { + get: function () { + _throwIfApiNotSupported("DocumentCreated.properties", "WordApiHiddenDocument", "1.3", _hostName); + if (!this._P) { + this._P=new Word.DocumentProperties(this.context, _createPropertyObjectPath(this.context, this, "Properties", false, false, false)); + } + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentCreated.prototype, "sections", { + get: function () { + _throwIfApiNotSupported("DocumentCreated.sections", "WordApiHiddenDocument", "1.3", _hostName); + if (!this._Se) { + this._Se=new Word.SectionCollection(this.context, _createPropertyObjectPath(this.context, this, "Sections", true, false, false)); + } + return this._Se; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentCreated.prototype, "saved", { + get: function () { + _throwIfNotLoaded("saved", this._S, _typeDocumentCreated, this._isNull); + _throwIfApiNotSupported("DocumentCreated.saved", "WordApiHiddenDocument", "1.3", _hostName); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentCreated.prototype, "_ReferenceId", { + get: function () { + _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, _typeDocumentCreated, this._isNull); + return this.m__ReferenceId; + }, + enumerable: true, + configurable: true + }); + DocumentCreated.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, [], ["body", "properties"], [ + "contentControls", + "sections" + ]); + }; + DocumentCreated.prototype.open=function () { + _createMethodAction(this.context, this, "Open", 1, [], false); + }; + DocumentCreated.prototype.save=function () { + _throwIfApiNotSupported("DocumentCreated.save", "WordApiHiddenDocument", "1.3", _hostName); + _createMethodAction(this.context, this, "Save", 0, [], false); + }; + DocumentCreated.prototype._KeepReference=function () { + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); + }; + DocumentCreated.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Saved"])) { + this._S=obj["Saved"]; + } + if (!_isUndefined(obj["_ReferenceId"])) { + this.m__ReferenceId=obj["_ReferenceId"]; + } + _handleNavigationPropertyResults(this, obj, ["body", "Body", "contentControls", "ContentControls", "properties", "Properties", "sections", "Sections"]); + }; + DocumentCreated.prototype.load=function (option) { + return _load(this, option); + }; + DocumentCreated.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + DocumentCreated.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + DocumentCreated.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + DocumentCreated.prototype._handleIdResult=function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["_ReferenceId"])) { + this.m__ReferenceId=value["_ReferenceId"]; + } + }; + DocumentCreated.prototype.track=function () { + this.context.trackedObjects.add(this); + return this; + }; + DocumentCreated.prototype.untrack=function () { + this.context.trackedObjects.remove(this); + return this; + }; + DocumentCreated.prototype.toJSON=function () { + return _toJson(this, { + "saved": this._S, + }, { + "body": this._B, + "contentControls": this._C, + "properties": this._P, + "sections": this._Se, + }); + }; + DocumentCreated.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return DocumentCreated; + }(OfficeExtension.ClientObject)); + Word.DocumentCreated=DocumentCreated; + var _typeDocumentProperties="DocumentProperties"; var DocumentProperties=(function (_super) { __extends(DocumentProperties, _super); function DocumentProperties() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(DocumentProperties.prototype, "_className", { get: function () { @@ -13327,29 +15063,29 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "customProperties", { get: function () { - if (!this.m_customProperties) { - this.m_customProperties=new Word.CustomPropertyCollection(this.context, _createPropertyObjectPath(this.context, this, "CustomProperties", true, false)); + if (!this._Cu) { + this._Cu=new Word.CustomPropertyCollection(this.context, _createPropertyObjectPath(this.context, this, "CustomProperties", true, false, false)); } - return this.m_customProperties; + return this._Cu; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "applicationName", { get: function () { - _throwIfNotLoaded("applicationName", this.m_applicationName, "DocumentProperties", this._isNull); - return this.m_applicationName; + _throwIfNotLoaded("applicationName", this._A, _typeDocumentProperties, this._isNull); + return this._A; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "author", { get: function () { - _throwIfNotLoaded("author", this.m_author, "DocumentProperties", this._isNull); - return this.m_author; + _throwIfNotLoaded("author", this._Au, _typeDocumentProperties, this._isNull); + return this._Au; }, set: function (value) { - this.m_author=value; + this._Au=value; _createSetPropertyAction(this.context, this, "Author", value); }, enumerable: true, @@ -13357,11 +15093,11 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "category", { get: function () { - _throwIfNotLoaded("category", this.m_category, "DocumentProperties", this._isNull); - return this.m_category; + _throwIfNotLoaded("category", this._C, _typeDocumentProperties, this._isNull); + return this._C; }, set: function (value) { - this.m_category=value; + this._C=value; _createSetPropertyAction(this.context, this, "Category", value); }, enumerable: true, @@ -13369,11 +15105,11 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "comments", { get: function () { - _throwIfNotLoaded("comments", this.m_comments, "DocumentProperties", this._isNull); - return this.m_comments; + _throwIfNotLoaded("comments", this._Co, _typeDocumentProperties, this._isNull); + return this._Co; }, set: function (value) { - this.m_comments=value; + this._Co=value; _createSetPropertyAction(this.context, this, "Comments", value); }, enumerable: true, @@ -13381,11 +15117,11 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "company", { get: function () { - _throwIfNotLoaded("company", this.m_company, "DocumentProperties", this._isNull); - return this.m_company; + _throwIfNotLoaded("company", this._Com, _typeDocumentProperties, this._isNull); + return this._Com; }, set: function (value) { - this.m_company=value; + this._Com=value; _createSetPropertyAction(this.context, this, "Company", value); }, enumerable: true, @@ -13393,19 +15129,19 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "creationDate", { get: function () { - _throwIfNotLoaded("creationDate", this.m_creationDate, "DocumentProperties", this._isNull); - return this.m_creationDate; + _throwIfNotLoaded("creationDate", this._Cr, _typeDocumentProperties, this._isNull); + return this._Cr; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "format", { get: function () { - _throwIfNotLoaded("format", this.m_format, "DocumentProperties", this._isNull); - return this.m_format; + _throwIfNotLoaded("format", this._F, _typeDocumentProperties, this._isNull); + return this._F; }, set: function (value) { - this.m_format=value; + this._F=value; _createSetPropertyAction(this.context, this, "Format", value); }, enumerable: true, @@ -13413,11 +15149,11 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "keywords", { get: function () { - _throwIfNotLoaded("keywords", this.m_keywords, "DocumentProperties", this._isNull); - return this.m_keywords; + _throwIfNotLoaded("keywords", this._K, _typeDocumentProperties, this._isNull); + return this._K; }, set: function (value) { - this.m_keywords=value; + this._K=value; _createSetPropertyAction(this.context, this, "Keywords", value); }, enumerable: true, @@ -13425,35 +15161,35 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "lastAuthor", { get: function () { - _throwIfNotLoaded("lastAuthor", this.m_lastAuthor, "DocumentProperties", this._isNull); - return this.m_lastAuthor; + _throwIfNotLoaded("lastAuthor", this._L, _typeDocumentProperties, this._isNull); + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "lastPrintDate", { get: function () { - _throwIfNotLoaded("lastPrintDate", this.m_lastPrintDate, "DocumentProperties", this._isNull); - return this.m_lastPrintDate; + _throwIfNotLoaded("lastPrintDate", this._La, _typeDocumentProperties, this._isNull); + return this._La; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "lastSaveTime", { get: function () { - _throwIfNotLoaded("lastSaveTime", this.m_lastSaveTime, "DocumentProperties", this._isNull); - return this.m_lastSaveTime; + _throwIfNotLoaded("lastSaveTime", this._Las, _typeDocumentProperties, this._isNull); + return this._Las; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "manager", { get: function () { - _throwIfNotLoaded("manager", this.m_manager, "DocumentProperties", this._isNull); - return this.m_manager; + _throwIfNotLoaded("manager", this._M, _typeDocumentProperties, this._isNull); + return this._M; }, set: function (value) { - this.m_manager=value; + this._M=value; _createSetPropertyAction(this.context, this, "Manager", value); }, enumerable: true, @@ -13461,27 +15197,27 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "revisionNumber", { get: function () { - _throwIfNotLoaded("revisionNumber", this.m_revisionNumber, "DocumentProperties", this._isNull); - return this.m_revisionNumber; + _throwIfNotLoaded("revisionNumber", this._R, _typeDocumentProperties, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "security", { get: function () { - _throwIfNotLoaded("security", this.m_security, "DocumentProperties", this._isNull); - return this.m_security; + _throwIfNotLoaded("security", this._S, _typeDocumentProperties, this._isNull); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "subject", { get: function () { - _throwIfNotLoaded("subject", this.m_subject, "DocumentProperties", this._isNull); - return this.m_subject; + _throwIfNotLoaded("subject", this._Su, _typeDocumentProperties, this._isNull); + return this._Su; }, set: function (value) { - this.m_subject=value; + this._Su=value; _createSetPropertyAction(this.context, this, "Subject", value); }, enumerable: true, @@ -13489,19 +15225,19 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "template", { get: function () { - _throwIfNotLoaded("template", this.m_template, "DocumentProperties", this._isNull); - return this.m_template; + _throwIfNotLoaded("template", this._T, _typeDocumentProperties, this._isNull); + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "title", { get: function () { - _throwIfNotLoaded("title", this.m_title, "DocumentProperties", this._isNull); - return this.m_title; + _throwIfNotLoaded("title", this._Ti, _typeDocumentProperties, this._isNull); + return this._Ti; }, set: function (value) { - this.m_title=value; + this._Ti=value; _createSetPropertyAction(this.context, this, "Title", value); }, enumerable: true, @@ -13509,20 +15245,19 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "DocumentProperties", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeDocumentProperties, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); DocumentProperties.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["title", "subject", "author", "keywords", "comments", "category", "format", "manager", "company"], [], [ - "customProperties", "customProperties" ]); }; DocumentProperties.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; DocumentProperties.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13531,64 +15266,72 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["ApplicationName"])) { - this.m_applicationName=obj["ApplicationName"]; + this._A=obj["ApplicationName"]; } if (!_isUndefined(obj["Author"])) { - this.m_author=obj["Author"]; + this._Au=obj["Author"]; } if (!_isUndefined(obj["Category"])) { - this.m_category=obj["Category"]; + this._C=obj["Category"]; } if (!_isUndefined(obj["Comments"])) { - this.m_comments=obj["Comments"]; + this._Co=obj["Comments"]; } if (!_isUndefined(obj["Company"])) { - this.m_company=obj["Company"]; + this._Com=obj["Company"]; } if (!_isUndefined(obj["CreationDate"])) { - this.m_creationDate=_adjustToDateTime(obj["CreationDate"]); + this._Cr=_adjustToDateTime(obj["CreationDate"]); } if (!_isUndefined(obj["Format"])) { - this.m_format=obj["Format"]; + this._F=obj["Format"]; } if (!_isUndefined(obj["Keywords"])) { - this.m_keywords=obj["Keywords"]; + this._K=obj["Keywords"]; } if (!_isUndefined(obj["LastAuthor"])) { - this.m_lastAuthor=obj["LastAuthor"]; + this._L=obj["LastAuthor"]; } if (!_isUndefined(obj["LastPrintDate"])) { - this.m_lastPrintDate=_adjustToDateTime(obj["LastPrintDate"]); + this._La=_adjustToDateTime(obj["LastPrintDate"]); } if (!_isUndefined(obj["LastSaveTime"])) { - this.m_lastSaveTime=_adjustToDateTime(obj["LastSaveTime"]); + this._Las=_adjustToDateTime(obj["LastSaveTime"]); } if (!_isUndefined(obj["Manager"])) { - this.m_manager=obj["Manager"]; + this._M=obj["Manager"]; } if (!_isUndefined(obj["RevisionNumber"])) { - this.m_revisionNumber=obj["RevisionNumber"]; + this._R=obj["RevisionNumber"]; } if (!_isUndefined(obj["Security"])) { - this.m_security=obj["Security"]; + this._S=obj["Security"]; } if (!_isUndefined(obj["Subject"])) { - this.m_subject=obj["Subject"]; + this._Su=obj["Subject"]; } if (!_isUndefined(obj["Template"])) { - this.m_template=obj["Template"]; + this._T=obj["Template"]; } if (!_isUndefined(obj["Title"])) { - this.m_title=obj["Title"]; + this._Ti=obj["Title"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["customProperties", "CustomProperties"]); }; DocumentProperties.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + DocumentProperties.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + DocumentProperties.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + DocumentProperties.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; DocumentProperties.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -13596,7 +15339,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; DocumentProperties.prototype.track=function () { @@ -13608,33 +15351,40 @@ var Word; return this; }; DocumentProperties.prototype.toJSON=function () { - return { - "applicationName": this.m_applicationName, - "author": this.m_author, - "category": this.m_category, - "comments": this.m_comments, - "company": this.m_company, - "creationDate": this.m_creationDate, - "format": this.m_format, - "keywords": this.m_keywords, - "lastAuthor": this.m_lastAuthor, - "lastPrintDate": this.m_lastPrintDate, - "lastSaveTime": this.m_lastSaveTime, - "manager": this.m_manager, - "revisionNumber": this.m_revisionNumber, - "security": this.m_security, - "subject": this.m_subject, - "template": this.m_template, - "title": this.m_title - }; + return _toJson(this, { + "applicationName": this._A, + "author": this._Au, + "category": this._C, + "comments": this._Co, + "company": this._Com, + "creationDate": this._Cr, + "format": this._F, + "keywords": this._K, + "lastAuthor": this._L, + "lastPrintDate": this._La, + "lastSaveTime": this._Las, + "manager": this._M, + "revisionNumber": this._R, + "security": this._S, + "subject": this._Su, + "template": this._T, + "title": this._Ti, + }, { + "customProperties": this._Cu, + }); + }; + DocumentProperties.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return DocumentProperties; }(OfficeExtension.ClientObject)); Word.DocumentProperties=DocumentProperties; + var _typeFont="Font"; var Font=(function (_super) { __extends(Font, _super); function Font() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Font.prototype, "_className", { get: function () { @@ -13645,11 +15395,11 @@ var Word; }); Object.defineProperty(Font.prototype, "bold", { get: function () { - _throwIfNotLoaded("bold", this.m_bold, "Font", this._isNull); - return this.m_bold; + _throwIfNotLoaded("bold", this._B, _typeFont, this._isNull); + return this._B; }, set: function (value) { - this.m_bold=value; + this._B=value; _createSetPropertyAction(this.context, this, "Bold", value); }, enumerable: true, @@ -13657,11 +15407,11 @@ var Word; }); Object.defineProperty(Font.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "Font", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeFont, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -13669,11 +15419,11 @@ var Word; }); Object.defineProperty(Font.prototype, "doubleStrikeThrough", { get: function () { - _throwIfNotLoaded("doubleStrikeThrough", this.m_doubleStrikeThrough, "Font", this._isNull); - return this.m_doubleStrikeThrough; + _throwIfNotLoaded("doubleStrikeThrough", this._D, _typeFont, this._isNull); + return this._D; }, set: function (value) { - this.m_doubleStrikeThrough=value; + this._D=value; _createSetPropertyAction(this.context, this, "DoubleStrikeThrough", value); }, enumerable: true, @@ -13681,11 +15431,11 @@ var Word; }); Object.defineProperty(Font.prototype, "highlightColor", { get: function () { - _throwIfNotLoaded("highlightColor", this.m_highlightColor, "Font", this._isNull); - return this.m_highlightColor; + _throwIfNotLoaded("highlightColor", this._H, _typeFont, this._isNull); + return this._H; }, set: function (value) { - this.m_highlightColor=value; + this._H=value; _createSetPropertyAction(this.context, this, "HighlightColor", value); }, enumerable: true, @@ -13693,11 +15443,11 @@ var Word; }); Object.defineProperty(Font.prototype, "italic", { get: function () { - _throwIfNotLoaded("italic", this.m_italic, "Font", this._isNull); - return this.m_italic; + _throwIfNotLoaded("italic", this._I, _typeFont, this._isNull); + return this._I; }, set: function (value) { - this.m_italic=value; + this._I=value; _createSetPropertyAction(this.context, this, "Italic", value); }, enumerable: true, @@ -13705,11 +15455,11 @@ var Word; }); Object.defineProperty(Font.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "Font", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeFont, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -13717,11 +15467,11 @@ var Word; }); Object.defineProperty(Font.prototype, "size", { get: function () { - _throwIfNotLoaded("size", this.m_size, "Font", this._isNull); - return this.m_size; + _throwIfNotLoaded("size", this._S, _typeFont, this._isNull); + return this._S; }, set: function (value) { - this.m_size=value; + this._S=value; _createSetPropertyAction(this.context, this, "Size", value); }, enumerable: true, @@ -13729,11 +15479,11 @@ var Word; }); Object.defineProperty(Font.prototype, "strikeThrough", { get: function () { - _throwIfNotLoaded("strikeThrough", this.m_strikeThrough, "Font", this._isNull); - return this.m_strikeThrough; + _throwIfNotLoaded("strikeThrough", this._St, _typeFont, this._isNull); + return this._St; }, set: function (value) { - this.m_strikeThrough=value; + this._St=value; _createSetPropertyAction(this.context, this, "StrikeThrough", value); }, enumerable: true, @@ -13741,11 +15491,11 @@ var Word; }); Object.defineProperty(Font.prototype, "subscript", { get: function () { - _throwIfNotLoaded("subscript", this.m_subscript, "Font", this._isNull); - return this.m_subscript; + _throwIfNotLoaded("subscript", this._Su, _typeFont, this._isNull); + return this._Su; }, set: function (value) { - this.m_subscript=value; + this._Su=value; _createSetPropertyAction(this.context, this, "Subscript", value); }, enumerable: true, @@ -13753,11 +15503,11 @@ var Word; }); Object.defineProperty(Font.prototype, "superscript", { get: function () { - _throwIfNotLoaded("superscript", this.m_superscript, "Font", this._isNull); - return this.m_superscript; + _throwIfNotLoaded("superscript", this._Sup, _typeFont, this._isNull); + return this._Sup; }, set: function (value) { - this.m_superscript=value; + this._Sup=value; _createSetPropertyAction(this.context, this, "Superscript", value); }, enumerable: true, @@ -13765,11 +15515,11 @@ var Word; }); Object.defineProperty(Font.prototype, "underline", { get: function () { - _throwIfNotLoaded("underline", this.m_underline, "Font", this._isNull); - return this.m_underline; + _throwIfNotLoaded("underline", this._U, _typeFont, this._isNull); + return this._U; }, set: function (value) { - this.m_underline=value; + this._U=value; _createSetPropertyAction(this.context, this, "Underline", value); }, enumerable: true, @@ -13777,8 +15527,8 @@ var Word; }); Object.defineProperty(Font.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Font", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeFont, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -13787,7 +15537,7 @@ var Word; this._recursivelySet(properties, options, ["name", "size", "bold", "italic", "color", "underline", "subscript", "superscript", "strikeThrough", "doubleStrikeThrough", "highlightColor"], [], []); }; Font.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Font.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13796,45 +15546,53 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Bold"])) { - this.m_bold=obj["Bold"]; + this._B=obj["Bold"]; } if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["DoubleStrikeThrough"])) { - this.m_doubleStrikeThrough=obj["DoubleStrikeThrough"]; + this._D=obj["DoubleStrikeThrough"]; } if (!_isUndefined(obj["HighlightColor"])) { - this.m_highlightColor=obj["HighlightColor"]; + this._H=obj["HighlightColor"]; } if (!_isUndefined(obj["Italic"])) { - this.m_italic=obj["Italic"]; + this._I=obj["Italic"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Size"])) { - this.m_size=obj["Size"]; + this._S=obj["Size"]; } if (!_isUndefined(obj["StrikeThrough"])) { - this.m_strikeThrough=obj["StrikeThrough"]; + this._St=obj["StrikeThrough"]; } if (!_isUndefined(obj["Subscript"])) { - this.m_subscript=obj["Subscript"]; + this._Su=obj["Subscript"]; } if (!_isUndefined(obj["Superscript"])) { - this.m_superscript=obj["Superscript"]; + this._Sup=obj["Superscript"]; } if (!_isUndefined(obj["Underline"])) { - this.m_underline=obj["Underline"]; + this._U=obj["Underline"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } }; Font.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Font.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Font.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Font.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; Font.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -13842,7 +15600,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; Font.prototype.track=function () { @@ -13854,27 +15612,32 @@ var Word; return this; }; Font.prototype.toJSON=function () { - return { - "bold": this.m_bold, - "color": this.m_color, - "doubleStrikeThrough": this.m_doubleStrikeThrough, - "highlightColor": this.m_highlightColor, - "italic": this.m_italic, - "name": this.m_name, - "size": this.m_size, - "strikeThrough": this.m_strikeThrough, - "subscript": this.m_subscript, - "superscript": this.m_superscript, - "underline": this.m_underline - }; + return _toJson(this, { + "bold": this._B, + "color": this._C, + "doubleStrikeThrough": this._D, + "highlightColor": this._H, + "italic": this._I, + "name": this._N, + "size": this._S, + "strikeThrough": this._St, + "subscript": this._Su, + "superscript": this._Sup, + "underline": this._U, + }, {}); + }; + Font.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Font; }(OfficeExtension.ClientObject)); Word.Font=Font; + var _typeInlinePicture="InlinePicture"; var InlinePicture=(function (_super) { __extends(InlinePicture, _super); function InlinePicture() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(InlinePicture.prototype, "_className", { get: function () { @@ -13885,81 +15648,87 @@ var Word; }); Object.defineProperty(InlinePicture.prototype, "paragraph", { get: function () { - if (!this.m_paragraph) { - this.m_paragraph=new Word.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false)); + _throwIfApiNotSupported("InlinePicture.paragraph", _defaultApiSetName, "1.2", _hostName); + if (!this._P) { + this._P=new Word.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false, false)); } - return this.m_paragraph; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "parentContentControl", { get: function () { - if (!this.m_parentContentControl) { - this.m_parentContentControl=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false)); + if (!this._Pa) { + this._Pa=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false, false)); } - return this.m_parentContentControl; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "parentContentControlOrNullObject", { get: function () { - if (!this.m_parentContentControlOrNullObject) { - this.m_parentContentControlOrNullObject=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false)); + _throwIfApiNotSupported("InlinePicture.parentContentControlOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Par) { + this._Par=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false, false)); } - return this.m_parentContentControlOrNullObject; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + _throwIfApiNotSupported("InlinePicture.parentTable", _defaultApiSetName, "1.3", _hostName); + if (!this._Pare) { + this._Pare=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._Pare; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "parentTableCell", { get: function () { - if (!this.m_parentTableCell) { - this.m_parentTableCell=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false)); + _throwIfApiNotSupported("InlinePicture.parentTableCell", _defaultApiSetName, "1.3", _hostName); + if (!this._Paren) { + this._Paren=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false, false)); } - return this.m_parentTableCell; + return this._Paren; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "parentTableCellOrNullObject", { get: function () { - if (!this.m_parentTableCellOrNullObject) { - this.m_parentTableCellOrNullObject=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false)); + _throwIfApiNotSupported("InlinePicture.parentTableCellOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Parent) { + this._Parent=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false, false)); } - return this.m_parentTableCellOrNullObject; + return this._Parent; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "parentTableOrNullObject", { get: function () { - if (!this.m_parentTableOrNullObject) { - this.m_parentTableOrNullObject=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false)); + _throwIfApiNotSupported("InlinePicture.parentTableOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ParentT) { + this._ParentT=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false, false)); } - return this.m_parentTableOrNullObject; + return this._ParentT; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "altTextDescription", { get: function () { - _throwIfNotLoaded("altTextDescription", this.m_altTextDescription, "InlinePicture", this._isNull); - return this.m_altTextDescription; + _throwIfNotLoaded("altTextDescription", this._A, _typeInlinePicture, this._isNull); + return this._A; }, set: function (value) { - this.m_altTextDescription=value; + this._A=value; _createSetPropertyAction(this.context, this, "AltTextDescription", value); }, enumerable: true, @@ -13967,11 +15736,11 @@ var Word; }); Object.defineProperty(InlinePicture.prototype, "altTextTitle", { get: function () { - _throwIfNotLoaded("altTextTitle", this.m_altTextTitle, "InlinePicture", this._isNull); - return this.m_altTextTitle; + _throwIfNotLoaded("altTextTitle", this._Al, _typeInlinePicture, this._isNull); + return this._Al; }, set: function (value) { - this.m_altTextTitle=value; + this._Al=value; _createSetPropertyAction(this.context, this, "AltTextTitle", value); }, enumerable: true, @@ -13979,11 +15748,11 @@ var Word; }); Object.defineProperty(InlinePicture.prototype, "height", { get: function () { - _throwIfNotLoaded("height", this.m_height, "InlinePicture", this._isNull); - return this.m_height; + _throwIfNotLoaded("height", this._H, _typeInlinePicture, this._isNull); + return this._H; }, set: function (value) { - this.m_height=value; + this._H=value; _createSetPropertyAction(this.context, this, "Height", value); }, enumerable: true, @@ -13991,11 +15760,11 @@ var Word; }); Object.defineProperty(InlinePicture.prototype, "hyperlink", { get: function () { - _throwIfNotLoaded("hyperlink", this.m_hyperlink, "InlinePicture", this._isNull); - return this.m_hyperlink; + _throwIfNotLoaded("hyperlink", this._Hy, _typeInlinePicture, this._isNull); + return this._Hy; }, set: function (value) { - this.m_hyperlink=value; + this._Hy=value; _createSetPropertyAction(this.context, this, "Hyperlink", value); }, enumerable: true, @@ -14003,11 +15772,11 @@ var Word; }); Object.defineProperty(InlinePicture.prototype, "lockAspectRatio", { get: function () { - _throwIfNotLoaded("lockAspectRatio", this.m_lockAspectRatio, "InlinePicture", this._isNull); - return this.m_lockAspectRatio; + _throwIfNotLoaded("lockAspectRatio", this._L, _typeInlinePicture, this._isNull); + return this._L; }, set: function (value) { - this.m_lockAspectRatio=value; + this._L=value; _createSetPropertyAction(this.context, this, "LockAspectRatio", value); }, enumerable: true, @@ -14015,11 +15784,11 @@ var Word; }); Object.defineProperty(InlinePicture.prototype, "width", { get: function () { - _throwIfNotLoaded("width", this.m_width, "InlinePicture", this._isNull); - return this.m_width; + _throwIfNotLoaded("width", this._W, _typeInlinePicture, this._isNull); + return this._W; }, set: function (value) { - this.m_width=value; + this._W=value; _createSetPropertyAction(this.context, this, "Width", value); }, enumerable: true, @@ -14027,29 +15796,22 @@ var Word; }); Object.defineProperty(InlinePicture.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "InlinePicture", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeInlinePicture, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InlinePicture", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInlinePicture, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InlinePicture.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["altTextDescription", "altTextTitle", "height", "hyperlink", "lockAspectRatio", "width"], [], [ - "paragraph", - "parentContentControl", - "parentContentControlOrNullObject", - "parentTable", - "parentTableCell", - "parentTableCellOrNullObject", - "parentTableOrNullObject", "paragraph", "parentContentControl", "parentContentControlOrNullObject", @@ -14060,52 +15822,64 @@ var Word; ]); }; InlinePicture.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _throwIfApiNotSupported("InlinePicture.delete", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; InlinePicture.prototype.getBase64ImageSrc=function () { - var action=_createMethodAction(this.context, this, "GetBase64ImageSrc", 1, []); + var action=_createMethodAction(this.context, this, "GetBase64ImageSrc", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; InlinePicture.prototype.getNext=function () { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null)); + _throwIfApiNotSupported("InlinePicture.getNext", _defaultApiSetName, "1.3", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null, false)); }; InlinePicture.prototype.getNextOrNullObject=function () { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("InlinePicture.getNextOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null, false)); }; InlinePicture.prototype.getRange=function (rangeLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null)); + _throwIfApiNotSupported("InlinePicture.getRange", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null, false)); }; InlinePicture.prototype.insertBreak=function (breakType, insertLocation) { - _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation]); + _throwIfApiNotSupported("InlinePicture.insertBreak", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation], false); }; InlinePicture.prototype.insertContentControl=function () { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null)); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null, false)); }; InlinePicture.prototype.insertFileFromBase64=function (base64File, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null)); + _throwIfApiNotSupported("InlinePicture.insertFileFromBase64", _defaultApiSetName, "1.2", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null, false)); }; InlinePicture.prototype.insertHtml=function (html, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null)); + _throwIfApiNotSupported("InlinePicture.insertHtml", _defaultApiSetName, "1.2", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null, false)); }; InlinePicture.prototype.insertInlinePictureFromBase64=function (base64EncodedImage, insertLocation) { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null)); + _throwIfApiNotSupported("InlinePicture.insertInlinePictureFromBase64", _defaultApiSetName, "1.2", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null, false)); }; InlinePicture.prototype.insertOoxml=function (ooxml, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null)); + _throwIfApiNotSupported("InlinePicture.insertOoxml", _defaultApiSetName, "1.2", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null, false)); }; InlinePicture.prototype.insertParagraph=function (paragraphText, insertLocation) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null)); + _throwIfApiNotSupported("InlinePicture.insertParagraph", _defaultApiSetName, "1.2", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null, false)); }; InlinePicture.prototype.insertText=function (text, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null)); + _throwIfApiNotSupported("InlinePicture.insertText", _defaultApiSetName, "1.2", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null, false)); }; InlinePicture.prototype.select=function (selectionMode) { - _createMethodAction(this.context, this, "Select", 1, [selectionMode]); + _throwIfApiNotSupported("InlinePicture.select", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "Select", 1, [selectionMode], false); }; InlinePicture.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InlinePicture.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14114,34 +15888,42 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["AltTextDescription"])) { - this.m_altTextDescription=obj["AltTextDescription"]; + this._A=obj["AltTextDescription"]; } if (!_isUndefined(obj["AltTextTitle"])) { - this.m_altTextTitle=obj["AltTextTitle"]; + this._Al=obj["AltTextTitle"]; } if (!_isUndefined(obj["Height"])) { - this.m_height=obj["Height"]; + this._H=obj["Height"]; } if (!_isUndefined(obj["Hyperlink"])) { - this.m_hyperlink=obj["Hyperlink"]; + this._Hy=obj["Hyperlink"]; } if (!_isUndefined(obj["LockAspectRatio"])) { - this.m_lockAspectRatio=obj["LockAspectRatio"]; + this._L=obj["LockAspectRatio"]; } if (!_isUndefined(obj["Width"])) { - this.m_width=obj["Width"]; + this._W=obj["Width"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["paragraph", "Paragraph", "parentContentControl", "ParentContentControl", "parentContentControlOrNullObject", "ParentContentControlOrNullObject", "parentTable", "ParentTable", "parentTableCell", "ParentTableCell", "parentTableCellOrNullObject", "ParentTableCellOrNullObject", "parentTableOrNullObject", "ParentTableOrNullObject"]); }; InlinePicture.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + InlinePicture.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + InlinePicture.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + InlinePicture.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; InlinePicture.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -14149,10 +15931,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; InlinePicture.prototype.track=function () { @@ -14164,22 +15946,27 @@ var Word; return this; }; InlinePicture.prototype.toJSON=function () { - return { - "altTextDescription": this.m_altTextDescription, - "altTextTitle": this.m_altTextTitle, - "height": this.m_height, - "hyperlink": this.m_hyperlink, - "lockAspectRatio": this.m_lockAspectRatio, - "width": this.m_width - }; + return _toJson(this, { + "altTextDescription": this._A, + "altTextTitle": this._Al, + "height": this._H, + "hyperlink": this._Hy, + "lockAspectRatio": this._L, + "width": this._W, + }, {}); + }; + InlinePicture.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return InlinePicture; }(OfficeExtension.ClientObject)); Word.InlinePicture=InlinePicture; + var _typeInlinePictureCollection="InlinePictureCollection"; var InlinePictureCollection=(function (_super) { __extends(InlinePictureCollection, _super); function InlinePictureCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(InlinePictureCollection.prototype, "_className", { get: function () { @@ -14190,7 +15977,7 @@ var Word; }); Object.defineProperty(InlinePictureCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "InlinePictureCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeInlinePictureCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14198,23 +15985,25 @@ var Word; }); Object.defineProperty(InlinePictureCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InlinePictureCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInlinePictureCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InlinePictureCollection.prototype.getFirst=function () { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + _throwIfApiNotSupported("InlinePictureCollection.getFirst", _defaultApiSetName, "1.3", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; InlinePictureCollection.prototype.getFirstOrNullObject=function () { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("InlinePictureCollection.getFirstOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; InlinePictureCollection.prototype._GetItem=function (index) { return new Word.InlinePicture(this.context, _createIndexerObjectPath(this.context, this, [index])); }; InlinePictureCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InlinePictureCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14223,7 +16012,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14235,9 +16024,17 @@ var Word; } } }; - InlinePictureCollection.prototype.load=function (option) { - _load(this, option); - return this; + InlinePictureCollection.prototype.load=function (option) { + return _load(this, option); + }; + InlinePictureCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + InlinePictureCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + InlinePictureCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; InlinePictureCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -14245,7 +16042,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; InlinePictureCollection.prototype.track=function () { @@ -14257,15 +16054,16 @@ var Word; return this; }; InlinePictureCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return InlinePictureCollection; }(OfficeExtension.ClientObject)); Word.InlinePictureCollection=InlinePictureCollection; + var _typeList="List"; var List=(function (_super) { __extends(List, _super); function List() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(List.prototype, "_className", { get: function () { @@ -14276,75 +16074,75 @@ var Word; }); Object.defineProperty(List.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._P) { + this._P=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(List.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "List", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeList, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(List.prototype, "levelExistences", { get: function () { - _throwIfNotLoaded("levelExistences", this.m_levelExistences, "List", this._isNull); - return this.m_levelExistences; + _throwIfNotLoaded("levelExistences", this._L, _typeList, this._isNull); + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(List.prototype, "levelTypes", { get: function () { - _throwIfNotLoaded("levelTypes", this.m_levelTypes, "List", this._isNull); - return this.m_levelTypes; + _throwIfNotLoaded("levelTypes", this._Le, _typeList, this._isNull); + return this._Le; }, enumerable: true, configurable: true }); Object.defineProperty(List.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "List", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeList, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); List.prototype.getLevelParagraphs=function (level) { - return new Word.ParagraphCollection(this.context, _createMethodObjectPath(this.context, this, "GetLevelParagraphs", 1, [level], true, false, null)); + return new Word.ParagraphCollection(this.context, _createMethodObjectPath(this.context, this, "GetLevelParagraphs", 1, [level], true, false, null, false)); }; List.prototype.getLevelString=function (level) { - var action=_createMethodAction(this.context, this, "GetLevelString", 1, [level]); + var action=_createMethodAction(this.context, this, "GetLevelString", 1, [level], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; List.prototype.insertParagraph=function (paragraphText, insertLocation) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null, false)); }; List.prototype.setLevelAlignment=function (level, alignment) { - _createMethodAction(this.context, this, "SetLevelAlignment", 0, [level, alignment]); + _createMethodAction(this.context, this, "SetLevelAlignment", 0, [level, alignment], false); }; List.prototype.setLevelBullet=function (level, listBullet, charCode, fontName) { - _createMethodAction(this.context, this, "SetLevelBullet", 0, [level, listBullet, charCode, fontName]); + _createMethodAction(this.context, this, "SetLevelBullet", 0, [level, listBullet, charCode, fontName], false); }; List.prototype.setLevelIndents=function (level, textIndent, bulletNumberPictureIndent) { - _createMethodAction(this.context, this, "SetLevelIndents", 0, [level, textIndent, bulletNumberPictureIndent]); + _createMethodAction(this.context, this, "SetLevelIndents", 0, [level, textIndent, bulletNumberPictureIndent], false); }; List.prototype.setLevelNumbering=function (level, listNumbering, formatString) { - _createMethodAction(this.context, this, "SetLevelNumbering", 0, [level, listNumbering, formatString]); + _createMethodAction(this.context, this, "SetLevelNumbering", 0, [level, listNumbering, formatString], false); }; List.prototype.setLevelStartingNumber=function (level, startingNumber) { - _createMethodAction(this.context, this, "SetLevelStartingNumber", 0, [level, startingNumber]); + _createMethodAction(this.context, this, "SetLevelStartingNumber", 0, [level, startingNumber], false); }; List.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; List.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14353,22 +16151,30 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["LevelExistences"])) { - this.m_levelExistences=obj["LevelExistences"]; + this._L=obj["LevelExistences"]; } if (!_isUndefined(obj["LevelTypes"])) { - this.m_levelTypes=obj["LevelTypes"]; + this._Le=obj["LevelTypes"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["paragraphs", "Paragraphs"]); }; List.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + List.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + List.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + List.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; List.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -14376,10 +16182,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; List.prototype.track=function () { @@ -14391,19 +16197,26 @@ var Word; return this; }; List.prototype.toJSON=function () { - return { - "id": this.m_id, - "levelExistences": this.m_levelExistences, - "levelTypes": this.m_levelTypes - }; + return _toJson(this, { + "id": this._I, + "levelExistences": this._L, + "levelTypes": this._Le, + }, { + "paragraphs": this._P, + }); + }; + List.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return List; }(OfficeExtension.ClientObject)); Word.List=List; + var _typeListCollection="ListCollection"; var ListCollection=(function (_super) { __extends(ListCollection, _super); function ListCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ListCollection.prototype, "_className", { get: function () { @@ -14414,7 +16227,7 @@ var Word; }); Object.defineProperty(ListCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ListCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeListCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14422,29 +16235,29 @@ var Word; }); Object.defineProperty(ListCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "ListCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeListCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); ListCollection.prototype.getById=function (id) { - return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetById", 1, [id], false, false, null)); + return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetById", 1, [id], false, false, null, false)); }; ListCollection.prototype.getByIdOrNullObject=function (id) { - return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetByIdOrNullObject", 1, [id], false, false, null)); + return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetByIdOrNullObject", 1, [id], false, false, null, false)); }; ListCollection.prototype.getFirst=function () { - return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; ListCollection.prototype.getFirstOrNullObject=function () { - return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; ListCollection.prototype.getItem=function (index) { return new Word.List(this.context, _createIndexerObjectPath(this.context, this, [index])); }; ListCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; ListCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14453,7 +16266,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14466,8 +16279,16 @@ var Word; } }; ListCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ListCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ListCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ListCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; ListCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -14475,7 +16296,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; ListCollection.prototype.track=function () { @@ -14487,15 +16308,16 @@ var Word; return this; }; ListCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return ListCollection; }(OfficeExtension.ClientObject)); Word.ListCollection=ListCollection; + var _typeListItem="ListItem"; var ListItem=(function (_super) { __extends(ListItem, _super); function ListItem() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ListItem.prototype, "_className", { get: function () { @@ -14506,11 +16328,11 @@ var Word; }); Object.defineProperty(ListItem.prototype, "level", { get: function () { - _throwIfNotLoaded("level", this.m_level, "ListItem", this._isNull); - return this.m_level; + _throwIfNotLoaded("level", this._L, _typeListItem, this._isNull); + return this._L; }, set: function (value) { - this.m_level=value; + this._L=value; _createSetPropertyAction(this.context, this, "Level", value); }, enumerable: true, @@ -14518,24 +16340,24 @@ var Word; }); Object.defineProperty(ListItem.prototype, "listString", { get: function () { - _throwIfNotLoaded("listString", this.m_listString, "ListItem", this._isNull); - return this.m_listString; + _throwIfNotLoaded("listString", this._Li, _typeListItem, this._isNull); + return this._Li; }, enumerable: true, configurable: true }); Object.defineProperty(ListItem.prototype, "siblingIndex", { get: function () { - _throwIfNotLoaded("siblingIndex", this.m_siblingIndex, "ListItem", this._isNull); - return this.m_siblingIndex; + _throwIfNotLoaded("siblingIndex", this._S, _typeListItem, this._isNull); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(ListItem.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "ListItem", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeListItem, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -14544,16 +16366,16 @@ var Word; this._recursivelySet(properties, options, ["level"], [], []); }; ListItem.prototype.getAncestor=function (parentOnly) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetAncestor", 1, [parentOnly], false, false, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetAncestor", 1, [parentOnly], false, false, null, false)); }; ListItem.prototype.getAncestorOrNullObject=function (parentOnly) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetAncestorOrNullObject", 1, [parentOnly], false, false, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetAncestorOrNullObject", 1, [parentOnly], false, false, null, false)); }; ListItem.prototype.getDescendants=function (directChildrenOnly) { - return new Word.ParagraphCollection(this.context, _createMethodObjectPath(this.context, this, "GetDescendants", 1, [directChildrenOnly], true, false, null)); + return new Word.ParagraphCollection(this.context, _createMethodObjectPath(this.context, this, "GetDescendants", 1, [directChildrenOnly], true, false, null, false)); }; ListItem.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; ListItem.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14562,21 +16384,29 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Level"])) { - this.m_level=obj["Level"]; + this._L=obj["Level"]; } if (!_isUndefined(obj["ListString"])) { - this.m_listString=obj["ListString"]; + this._Li=obj["ListString"]; } if (!_isUndefined(obj["SiblingIndex"])) { - this.m_siblingIndex=obj["SiblingIndex"]; + this._S=obj["SiblingIndex"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } }; ListItem.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ListItem.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ListItem.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ListItem.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; ListItem.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -14584,7 +16414,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; ListItem.prototype.track=function () { @@ -14596,19 +16426,24 @@ var Word; return this; }; ListItem.prototype.toJSON=function () { - return { - "level": this.m_level, - "listString": this.m_listString, - "siblingIndex": this.m_siblingIndex - }; + return _toJson(this, { + "level": this._L, + "listString": this._Li, + "siblingIndex": this._S, + }, {}); + }; + ListItem.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ListItem; }(OfficeExtension.ClientObject)); Word.ListItem=ListItem; + var _typeParagraph="Paragraph"; var Paragraph=(function (_super) { __extends(Paragraph, _super); function Paragraph() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Paragraph.prototype, "_className", { get: function () { @@ -14619,151 +16454,161 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "contentControls", { get: function () { - if (!this.m_contentControls) { - this.m_contentControls=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false)); + if (!this._C) { + this._C=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false, false)); } - return this.m_contentControls; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "inlinePictures", { get: function () { - if (!this.m_inlinePictures) { - this.m_inlinePictures=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false)); + if (!this._I) { + this._I=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false, false)); } - return this.m_inlinePictures; + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "list", { get: function () { - if (!this.m_list) { - this.m_list=new Word.List(this.context, _createPropertyObjectPath(this.context, this, "List", false, false)); + _throwIfApiNotSupported("Paragraph.list", _defaultApiSetName, "1.3", _hostName); + if (!this._Lis) { + this._Lis=new Word.List(this.context, _createPropertyObjectPath(this.context, this, "List", false, false, false)); } - return this.m_list; + return this._Lis; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "listItem", { get: function () { - if (!this.m_listItem) { - this.m_listItem=new Word.ListItem(this.context, _createPropertyObjectPath(this.context, this, "ListItem", false, false)); + _throwIfApiNotSupported("Paragraph.listItem", _defaultApiSetName, "1.3", _hostName); + if (!this._List) { + this._List=new Word.ListItem(this.context, _createPropertyObjectPath(this.context, this, "ListItem", false, false, false)); } - return this.m_listItem; + return this._List; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "listItemOrNullObject", { get: function () { - if (!this.m_listItemOrNullObject) { - this.m_listItemOrNullObject=new Word.ListItem(this.context, _createPropertyObjectPath(this.context, this, "ListItemOrNullObject", false, false)); + _throwIfApiNotSupported("Paragraph.listItemOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ListI) { + this._ListI=new Word.ListItem(this.context, _createPropertyObjectPath(this.context, this, "ListItemOrNullObject", false, false, false)); } - return this.m_listItemOrNullObject; + return this._ListI; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "listOrNullObject", { get: function () { - if (!this.m_listOrNullObject) { - this.m_listOrNullObject=new Word.List(this.context, _createPropertyObjectPath(this.context, this, "ListOrNullObject", false, false)); + _throwIfApiNotSupported("Paragraph.listOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ListO) { + this._ListO=new Word.List(this.context, _createPropertyObjectPath(this.context, this, "ListOrNullObject", false, false, false)); } - return this.m_listOrNullObject; + return this._ListO; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentBody", { get: function () { - if (!this.m_parentBody) { - this.m_parentBody=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false)); + _throwIfApiNotSupported("Paragraph.parentBody", _defaultApiSetName, "1.3", _hostName); + if (!this._P) { + this._P=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false, false)); } - return this.m_parentBody; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentContentControl", { get: function () { - if (!this.m_parentContentControl) { - this.m_parentContentControl=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false)); + if (!this._Pa) { + this._Pa=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false, false)); } - return this.m_parentContentControl; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentContentControlOrNullObject", { get: function () { - if (!this.m_parentContentControlOrNullObject) { - this.m_parentContentControlOrNullObject=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false)); + _throwIfApiNotSupported("Paragraph.parentContentControlOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Par) { + this._Par=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false, false)); } - return this.m_parentContentControlOrNullObject; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + _throwIfApiNotSupported("Paragraph.parentTable", _defaultApiSetName, "1.3", _hostName); + if (!this._Pare) { + this._Pare=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._Pare; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentTableCell", { get: function () { - if (!this.m_parentTableCell) { - this.m_parentTableCell=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false)); + _throwIfApiNotSupported("Paragraph.parentTableCell", _defaultApiSetName, "1.3", _hostName); + if (!this._Paren) { + this._Paren=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false, false)); } - return this.m_parentTableCell; + return this._Paren; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentTableCellOrNullObject", { get: function () { - if (!this.m_parentTableCellOrNullObject) { - this.m_parentTableCellOrNullObject=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false)); + _throwIfApiNotSupported("Paragraph.parentTableCellOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Parent) { + this._Parent=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false, false)); } - return this.m_parentTableCellOrNullObject; + return this._Parent; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentTableOrNullObject", { get: function () { - if (!this.m_parentTableOrNullObject) { - this.m_parentTableOrNullObject=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false)); + _throwIfApiNotSupported("Paragraph.parentTableOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ParentT) { + this._ParentT=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false, false)); } - return this.m_parentTableOrNullObject; + return this._ParentT; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "alignment", { get: function () { - _throwIfNotLoaded("alignment", this.m_alignment, "Paragraph", this._isNull); - return this.m_alignment; + _throwIfNotLoaded("alignment", this._A, _typeParagraph, this._isNull); + return this._A; }, set: function (value) { - this.m_alignment=value; + this._A=value; _createSetPropertyAction(this.context, this, "Alignment", value); }, enumerable: true, @@ -14771,11 +16616,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "firstLineIndent", { get: function () { - _throwIfNotLoaded("firstLineIndent", this.m_firstLineIndent, "Paragraph", this._isNull); - return this.m_firstLineIndent; + _throwIfNotLoaded("firstLineIndent", this._F, _typeParagraph, this._isNull); + return this._F; }, set: function (value) { - this.m_firstLineIndent=value; + this._F=value; _createSetPropertyAction(this.context, this, "FirstLineIndent", value); }, enumerable: true, @@ -14783,27 +16628,29 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "isLastParagraph", { get: function () { - _throwIfNotLoaded("isLastParagraph", this.m_isLastParagraph, "Paragraph", this._isNull); - return this.m_isLastParagraph; + _throwIfNotLoaded("isLastParagraph", this._Is, _typeParagraph, this._isNull); + _throwIfApiNotSupported("Paragraph.isLastParagraph", _defaultApiSetName, "1.3", _hostName); + return this._Is; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "isListItem", { get: function () { - _throwIfNotLoaded("isListItem", this.m_isListItem, "Paragraph", this._isNull); - return this.m_isListItem; + _throwIfNotLoaded("isListItem", this._IsL, _typeParagraph, this._isNull); + _throwIfApiNotSupported("Paragraph.isListItem", _defaultApiSetName, "1.3", _hostName); + return this._IsL; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "leftIndent", { get: function () { - _throwIfNotLoaded("leftIndent", this.m_leftIndent, "Paragraph", this._isNull); - return this.m_leftIndent; + _throwIfNotLoaded("leftIndent", this._L, _typeParagraph, this._isNull); + return this._L; }, set: function (value) { - this.m_leftIndent=value; + this._L=value; _createSetPropertyAction(this.context, this, "LeftIndent", value); }, enumerable: true, @@ -14811,11 +16658,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "lineSpacing", { get: function () { - _throwIfNotLoaded("lineSpacing", this.m_lineSpacing, "Paragraph", this._isNull); - return this.m_lineSpacing; + _throwIfNotLoaded("lineSpacing", this._Li, _typeParagraph, this._isNull); + return this._Li; }, set: function (value) { - this.m_lineSpacing=value; + this._Li=value; _createSetPropertyAction(this.context, this, "LineSpacing", value); }, enumerable: true, @@ -14823,11 +16670,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "lineUnitAfter", { get: function () { - _throwIfNotLoaded("lineUnitAfter", this.m_lineUnitAfter, "Paragraph", this._isNull); - return this.m_lineUnitAfter; + _throwIfNotLoaded("lineUnitAfter", this._Lin, _typeParagraph, this._isNull); + return this._Lin; }, set: function (value) { - this.m_lineUnitAfter=value; + this._Lin=value; _createSetPropertyAction(this.context, this, "LineUnitAfter", value); }, enumerable: true, @@ -14835,11 +16682,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "lineUnitBefore", { get: function () { - _throwIfNotLoaded("lineUnitBefore", this.m_lineUnitBefore, "Paragraph", this._isNull); - return this.m_lineUnitBefore; + _throwIfNotLoaded("lineUnitBefore", this._Line, _typeParagraph, this._isNull); + return this._Line; }, set: function (value) { - this.m_lineUnitBefore=value; + this._Line=value; _createSetPropertyAction(this.context, this, "LineUnitBefore", value); }, enumerable: true, @@ -14847,11 +16694,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "outlineLevel", { get: function () { - _throwIfNotLoaded("outlineLevel", this.m_outlineLevel, "Paragraph", this._isNull); - return this.m_outlineLevel; + _throwIfNotLoaded("outlineLevel", this._O, _typeParagraph, this._isNull); + return this._O; }, set: function (value) { - this.m_outlineLevel=value; + this._O=value; _createSetPropertyAction(this.context, this, "OutlineLevel", value); }, enumerable: true, @@ -14859,11 +16706,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "rightIndent", { get: function () { - _throwIfNotLoaded("rightIndent", this.m_rightIndent, "Paragraph", this._isNull); - return this.m_rightIndent; + _throwIfNotLoaded("rightIndent", this._R, _typeParagraph, this._isNull); + return this._R; }, set: function (value) { - this.m_rightIndent=value; + this._R=value; _createSetPropertyAction(this.context, this, "RightIndent", value); }, enumerable: true, @@ -14871,11 +16718,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "spaceAfter", { get: function () { - _throwIfNotLoaded("spaceAfter", this.m_spaceAfter, "Paragraph", this._isNull); - return this.m_spaceAfter; + _throwIfNotLoaded("spaceAfter", this._S, _typeParagraph, this._isNull); + return this._S; }, set: function (value) { - this.m_spaceAfter=value; + this._S=value; _createSetPropertyAction(this.context, this, "SpaceAfter", value); }, enumerable: true, @@ -14883,11 +16730,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "spaceBefore", { get: function () { - _throwIfNotLoaded("spaceBefore", this.m_spaceBefore, "Paragraph", this._isNull); - return this.m_spaceBefore; + _throwIfNotLoaded("spaceBefore", this._Sp, _typeParagraph, this._isNull); + return this._Sp; }, set: function (value) { - this.m_spaceBefore=value; + this._Sp=value; _createSetPropertyAction(this.context, this, "SpaceBefore", value); }, enumerable: true, @@ -14895,11 +16742,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "Paragraph", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._St, _typeParagraph, this._isNull); + return this._St; }, set: function (value) { - this.m_style=value; + this._St=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -14907,11 +16754,12 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "styleBuiltIn", { get: function () { - _throwIfNotLoaded("styleBuiltIn", this.m_styleBuiltIn, "Paragraph", this._isNull); - return this.m_styleBuiltIn; + _throwIfNotLoaded("styleBuiltIn", this._Sty, _typeParagraph, this._isNull); + _throwIfApiNotSupported("Paragraph.styleBuiltIn", _defaultApiSetName, "1.3", _hostName); + return this._Sty; }, set: function (value) { - this.m_styleBuiltIn=value; + this._Sty=value; _createSetPropertyAction(this.context, this, "StyleBuiltIn", value); }, enumerable: true, @@ -14919,49 +16767,39 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "tableNestingLevel", { get: function () { - _throwIfNotLoaded("tableNestingLevel", this.m_tableNestingLevel, "Paragraph", this._isNull); - return this.m_tableNestingLevel; + _throwIfNotLoaded("tableNestingLevel", this._T, _typeParagraph, this._isNull); + _throwIfApiNotSupported("Paragraph.tableNestingLevel", _defaultApiSetName, "1.3", _hostName); + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "Paragraph", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._Te, _typeParagraph, this._isNull); + return this._Te; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "Paragraph", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeParagraph, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Paragraph", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeParagraph, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Paragraph.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["style", "alignment", "firstLineIndent", "leftIndent", "rightIndent", "lineSpacing", "outlineLevel", "spaceBefore", "spaceAfter", "lineUnitBefore", "lineUnitAfter", "styleBuiltIn"], ["font", "listItem", "listItemOrNullObject"], [ - "contentControls", - "inlinePictures", - "list", - "listOrNullObject", - "parentBody", - "parentContentControl", - "parentContentControlOrNullObject", - "parentTable", - "parentTableCell", - "parentTableCellOrNullObject", - "parentTableOrNullObject", "contentControls", "inlinePictures", "list", @@ -14976,89 +16814,109 @@ var Word; ]); }; Paragraph.prototype.attachToList=function (listId, level) { - return new Word.List(this.context, _createMethodObjectPath(this.context, this, "AttachToList", 0, [listId, level], false, false, null)); + _throwIfApiNotSupported("Paragraph.attachToList", _defaultApiSetName, "1.3", _hostName); + return new Word.List(this.context, _createMethodObjectPath(this.context, this, "AttachToList", 0, [listId, level], false, false, null, false)); }; Paragraph.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; Paragraph.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Paragraph.prototype.detachFromList=function () { - _createMethodAction(this.context, this, "DetachFromList", 0, []); + _throwIfApiNotSupported("Paragraph.detachFromList", _defaultApiSetName, "1.3", _hostName); + _createMethodAction(this.context, this, "DetachFromList", 0, [], false); }; Paragraph.prototype.getHtml=function () { - var action=_createMethodAction(this.context, this, "GetHtml", 1, []); + var action=_createMethodAction(this.context, this, "GetHtml", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Paragraph.prototype.getMetadata=function (propertyGUID) { + var action=_createMethodAction(this.context, this, "GetMetadata", 1, [propertyGUID], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Paragraph.prototype.getNext=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null)); + _throwIfApiNotSupported("Paragraph.getNext", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null, false)); }; Paragraph.prototype.getNextOrNullObject=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("Paragraph.getNextOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null, false)); }; Paragraph.prototype.getOoxml=function () { - var action=_createMethodAction(this.context, this, "GetOoxml", 1, []); + var action=_createMethodAction(this.context, this, "GetOoxml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Paragraph.prototype.getPrevious=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetPrevious", 1, [], false, false, null)); + _throwIfApiNotSupported("Paragraph.getPrevious", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetPrevious", 1, [], false, false, null, false)); }; Paragraph.prototype.getPreviousOrNullObject=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetPreviousOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("Paragraph.getPreviousOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetPreviousOrNullObject", 1, [], false, false, null, false)); }; Paragraph.prototype.getRange=function (rangeLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null)); + _throwIfApiNotSupported("Paragraph.getRange", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null, false)); }; Paragraph.prototype.getTextRanges=function (endingMarks, trimSpacing) { - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetTextRanges", 1, [endingMarks, trimSpacing], true, false, null)); + _throwIfApiNotSupported("Paragraph.getTextRanges", _defaultApiSetName, "1.3", _hostName); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetTextRanges", 1, [endingMarks, trimSpacing], true, false, null, false)); }; Paragraph.prototype.insertBreak=function (breakType, insertLocation) { - _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation]); + _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation], false); }; Paragraph.prototype.insertContentControl=function () { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null)); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null, false)); }; Paragraph.prototype.insertFileFromBase64=function (base64File, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null, false)); }; Paragraph.prototype.insertHtml=function (html, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null, false)); }; Paragraph.prototype.insertInlinePictureFromBase64=function (base64EncodedImage, insertLocation) { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null)); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null, false)); }; Paragraph.prototype.insertOoxml=function (ooxml, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null, false)); }; Paragraph.prototype.insertParagraph=function (paragraphText, insertLocation) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null, false)); }; Paragraph.prototype.insertTable=function (rowCount, columnCount, insertLocation, values) { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null)); + _throwIfApiNotSupported("Paragraph.insertTable", _defaultApiSetName, "1.3", _hostName); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null, false)); }; Paragraph.prototype.insertText=function (text, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null, false)); }; Paragraph.prototype.search=function (searchText, searchOptions) { searchOptions=_normalizeSearchOptions(this.context, searchOptions); - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null)); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null, false)); }; Paragraph.prototype.select=function (selectionMode) { - _createMethodAction(this.context, this, "Select", 1, [selectionMode]); + _createMethodAction(this.context, this, "Select", 1, [selectionMode], false); + }; + Paragraph.prototype.setMetadata=function (propertyGUID, propertyValue) { + _createMethodAction(this.context, this, "SetMetadata", 0, [propertyGUID, propertyValue], false); }; Paragraph.prototype.split=function (delimiters, trimDelimiters, trimSpacing) { - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Split", 1, [delimiters, trimDelimiters, trimSpacing], true, false, null)); + _throwIfApiNotSupported("Paragraph.split", _defaultApiSetName, "1.3", _hostName); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Split", 1, [delimiters, trimDelimiters, trimSpacing], true, false, null, false)); }; Paragraph.prototype.startNewList=function () { - return new Word.List(this.context, _createMethodObjectPath(this.context, this, "StartNewList", 0, [], false, false, null)); + _throwIfApiNotSupported("Paragraph.startNewList", _defaultApiSetName, "1.3", _hostName); + return new Word.List(this.context, _createMethodObjectPath(this.context, this, "StartNewList", 0, [], false, false, null, false)); }; Paragraph.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Paragraph.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15067,64 +16925,72 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Alignment"])) { - this.m_alignment=obj["Alignment"]; + this._A=obj["Alignment"]; } if (!_isUndefined(obj["FirstLineIndent"])) { - this.m_firstLineIndent=obj["FirstLineIndent"]; + this._F=obj["FirstLineIndent"]; } if (!_isUndefined(obj["IsLastParagraph"])) { - this.m_isLastParagraph=obj["IsLastParagraph"]; + this._Is=obj["IsLastParagraph"]; } if (!_isUndefined(obj["IsListItem"])) { - this.m_isListItem=obj["IsListItem"]; + this._IsL=obj["IsListItem"]; } if (!_isUndefined(obj["LeftIndent"])) { - this.m_leftIndent=obj["LeftIndent"]; + this._L=obj["LeftIndent"]; } if (!_isUndefined(obj["LineSpacing"])) { - this.m_lineSpacing=obj["LineSpacing"]; + this._Li=obj["LineSpacing"]; } if (!_isUndefined(obj["LineUnitAfter"])) { - this.m_lineUnitAfter=obj["LineUnitAfter"]; + this._Lin=obj["LineUnitAfter"]; } if (!_isUndefined(obj["LineUnitBefore"])) { - this.m_lineUnitBefore=obj["LineUnitBefore"]; + this._Line=obj["LineUnitBefore"]; } if (!_isUndefined(obj["OutlineLevel"])) { - this.m_outlineLevel=obj["OutlineLevel"]; + this._O=obj["OutlineLevel"]; } if (!_isUndefined(obj["RightIndent"])) { - this.m_rightIndent=obj["RightIndent"]; + this._R=obj["RightIndent"]; } if (!_isUndefined(obj["SpaceAfter"])) { - this.m_spaceAfter=obj["SpaceAfter"]; + this._S=obj["SpaceAfter"]; } if (!_isUndefined(obj["SpaceBefore"])) { - this.m_spaceBefore=obj["SpaceBefore"]; + this._Sp=obj["SpaceBefore"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._St=obj["Style"]; } if (!_isUndefined(obj["StyleBuiltIn"])) { - this.m_styleBuiltIn=obj["StyleBuiltIn"]; + this._Sty=obj["StyleBuiltIn"]; } if (!_isUndefined(obj["TableNestingLevel"])) { - this.m_tableNestingLevel=obj["TableNestingLevel"]; + this._T=obj["TableNestingLevel"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._Te=obj["Text"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["contentControls", "ContentControls", "font", "Font", "inlinePictures", "InlinePictures", "list", "List", "listItem", "ListItem", "listItemOrNullObject", "ListItemOrNullObject", "listOrNullObject", "ListOrNullObject", "parentBody", "ParentBody", "parentContentControl", "ParentContentControl", "parentContentControlOrNullObject", "ParentContentControlOrNullObject", "parentTable", "ParentTable", "parentTableCell", "ParentTableCell", "parentTableCellOrNullObject", "ParentTableCellOrNullObject", "parentTableOrNullObject", "ParentTableOrNullObject"]); }; Paragraph.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Paragraph.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Paragraph.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Paragraph.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; Paragraph.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -15132,10 +16998,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; Paragraph.prototype.track=function () { @@ -15147,35 +17013,42 @@ var Word; return this; }; Paragraph.prototype.toJSON=function () { - return { - "alignment": this.m_alignment, - "firstLineIndent": this.m_firstLineIndent, - "font": this.m_font, - "isLastParagraph": this.m_isLastParagraph, - "isListItem": this.m_isListItem, - "leftIndent": this.m_leftIndent, - "lineSpacing": this.m_lineSpacing, - "lineUnitAfter": this.m_lineUnitAfter, - "lineUnitBefore": this.m_lineUnitBefore, - "listItem": this.m_listItem, - "listItemOrNullObject": this.m_listItemOrNullObject, - "outlineLevel": this.m_outlineLevel, - "rightIndent": this.m_rightIndent, - "spaceAfter": this.m_spaceAfter, - "spaceBefore": this.m_spaceBefore, - "style": this.m_style, - "styleBuiltIn": this.m_styleBuiltIn, - "tableNestingLevel": this.m_tableNestingLevel, - "text": this.m_text - }; + return _toJson(this, { + "alignment": this._A, + "firstLineIndent": this._F, + "isLastParagraph": this._Is, + "isListItem": this._IsL, + "leftIndent": this._L, + "lineSpacing": this._Li, + "lineUnitAfter": this._Lin, + "lineUnitBefore": this._Line, + "outlineLevel": this._O, + "rightIndent": this._R, + "spaceAfter": this._S, + "spaceBefore": this._Sp, + "style": this._St, + "styleBuiltIn": this._Sty, + "tableNestingLevel": this._T, + "text": this._Te, + }, { + "font": this._Fo, + "inlinePictures": this._I, + "listItem": this._List, + "listItemOrNullObject": this._ListI, + }); + }; + Paragraph.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Paragraph; }(OfficeExtension.ClientObject)); Word.Paragraph=Paragraph; + var _typeParagraphCollection="ParagraphCollection"; var ParagraphCollection=(function (_super) { __extends(ParagraphCollection, _super); function ParagraphCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ParagraphCollection.prototype, "_className", { get: function () { @@ -15186,7 +17059,7 @@ var Word; }); Object.defineProperty(ParagraphCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ParagraphCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeParagraphCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15194,29 +17067,33 @@ var Word; }); Object.defineProperty(ParagraphCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "ParagraphCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeParagraphCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); ParagraphCollection.prototype.getFirst=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + _throwIfApiNotSupported("ParagraphCollection.getFirst", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; ParagraphCollection.prototype.getFirstOrNullObject=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("ParagraphCollection.getFirstOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; ParagraphCollection.prototype.getLast=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetLast", 1, [], false, false, null)); + _throwIfApiNotSupported("ParagraphCollection.getLast", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetLast", 1, [], false, false, null, false)); }; ParagraphCollection.prototype.getLastOrNullObject=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetLastOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("ParagraphCollection.getLastOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetLastOrNullObject", 1, [], false, false, null, false)); }; ParagraphCollection.prototype._GetItem=function (index) { return new Word.Paragraph(this.context, _createIndexerObjectPath(this.context, this, [index])); }; ParagraphCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; ParagraphCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15225,7 +17102,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15238,8 +17115,16 @@ var Word; } }; ParagraphCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ParagraphCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ParagraphCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ParagraphCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; ParagraphCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -15247,7 +17132,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; ParagraphCollection.prototype.track=function () { @@ -15259,15 +17144,16 @@ var Word; return this; }; ParagraphCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return ParagraphCollection; }(OfficeExtension.ClientObject)); Word.ParagraphCollection=ParagraphCollection; + var _typeRange="Range"; var Range=(function (_super) { __extends(Range, _super); function Range() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Range.prototype, "_className", { get: function () { @@ -15278,141 +17164,151 @@ var Word; }); Object.defineProperty(Range.prototype, "contentControls", { get: function () { - if (!this.m_contentControls) { - this.m_contentControls=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false)); + if (!this._C) { + this._C=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false, false)); } - return this.m_contentControls; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._F) { + this._F=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "inlinePictures", { get: function () { - if (!this.m_inlinePictures) { - this.m_inlinePictures=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false)); + _throwIfApiNotSupported("Range.inlinePictures", _defaultApiSetName, "1.2", _hostName); + if (!this._I) { + this._I=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false, false)); } - return this.m_inlinePictures; + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "lists", { get: function () { - if (!this.m_lists) { - this.m_lists=new Word.ListCollection(this.context, _createPropertyObjectPath(this.context, this, "Lists", true, false)); + _throwIfApiNotSupported("Range.lists", _defaultApiSetName, "1.3", _hostName); + if (!this._L) { + this._L=new Word.ListCollection(this.context, _createPropertyObjectPath(this.context, this, "Lists", true, false, false)); } - return this.m_lists; + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._P) { + this._P=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "parentBody", { get: function () { - if (!this.m_parentBody) { - this.m_parentBody=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false)); + _throwIfApiNotSupported("Range.parentBody", _defaultApiSetName, "1.3", _hostName); + if (!this._Pa) { + this._Pa=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false, false)); } - return this.m_parentBody; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "parentContentControl", { get: function () { - if (!this.m_parentContentControl) { - this.m_parentContentControl=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false)); + if (!this._Par) { + this._Par=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false, false)); } - return this.m_parentContentControl; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "parentContentControlOrNullObject", { get: function () { - if (!this.m_parentContentControlOrNullObject) { - this.m_parentContentControlOrNullObject=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false)); + _throwIfApiNotSupported("Range.parentContentControlOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Pare) { + this._Pare=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false, false)); } - return this.m_parentContentControlOrNullObject; + return this._Pare; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + _throwIfApiNotSupported("Range.parentTable", _defaultApiSetName, "1.3", _hostName); + if (!this._Paren) { + this._Paren=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._Paren; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "parentTableCell", { get: function () { - if (!this.m_parentTableCell) { - this.m_parentTableCell=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false)); + _throwIfApiNotSupported("Range.parentTableCell", _defaultApiSetName, "1.3", _hostName); + if (!this._Parent) { + this._Parent=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false, false)); } - return this.m_parentTableCell; + return this._Parent; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "parentTableCellOrNullObject", { get: function () { - if (!this.m_parentTableCellOrNullObject) { - this.m_parentTableCellOrNullObject=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false)); + _throwIfApiNotSupported("Range.parentTableCellOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ParentT) { + this._ParentT=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false, false)); } - return this.m_parentTableCellOrNullObject; + return this._ParentT; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "parentTableOrNullObject", { get: function () { - if (!this.m_parentTableOrNullObject) { - this.m_parentTableOrNullObject=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false)); + _throwIfApiNotSupported("Range.parentTableOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ParentTa) { + this._ParentTa=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false, false)); } - return this.m_parentTableOrNullObject; + return this._ParentTa; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "tables", { get: function () { - if (!this.m_tables) { - this.m_tables=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false)); + _throwIfApiNotSupported("Range.tables", _defaultApiSetName, "1.3", _hostName); + if (!this._T) { + this._T=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false, false)); } - return this.m_tables; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "hyperlink", { get: function () { - _throwIfNotLoaded("hyperlink", this.m_hyperlink, "Range", this._isNull); - return this.m_hyperlink; + _throwIfNotLoaded("hyperlink", this._H, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.hyperlink", _defaultApiSetName, "1.3", _hostName); + return this._H; }, set: function (value) { - this.m_hyperlink=value; + this._H=value; _createSetPropertyAction(this.context, this, "Hyperlink", value); }, enumerable: true, @@ -15420,19 +17316,20 @@ var Word; }); Object.defineProperty(Range.prototype, "isEmpty", { get: function () { - _throwIfNotLoaded("isEmpty", this.m_isEmpty, "Range", this._isNull); - return this.m_isEmpty; + _throwIfNotLoaded("isEmpty", this._Is, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.isEmpty", _defaultApiSetName, "1.3", _hostName); + return this._Is; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "Range", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._S, _typeRange, this._isNull); + return this._S; }, set: function (value) { - this.m_style=value; + this._S=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -15440,11 +17337,12 @@ var Word; }); Object.defineProperty(Range.prototype, "styleBuiltIn", { get: function () { - _throwIfNotLoaded("styleBuiltIn", this.m_styleBuiltIn, "Range", this._isNull); - return this.m_styleBuiltIn; + _throwIfNotLoaded("styleBuiltIn", this._St, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.styleBuiltIn", _defaultApiSetName, "1.3", _hostName); + return this._St; }, set: function (value) { - this.m_styleBuiltIn=value; + this._St=value; _createSetPropertyAction(this.context, this, "StyleBuiltIn", value); }, enumerable: true, @@ -15452,42 +17350,30 @@ var Word; }); Object.defineProperty(Range.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "Range", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._Te, _typeRange, this._isNull); + return this._Te; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "Range", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeRange, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Range", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeRange, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Range.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["style", "hyperlink", "styleBuiltIn"], ["font"], [ - "contentControls", - "inlinePictures", - "lists", - "paragraphs", - "parentBody", - "parentContentControl", - "parentContentControlOrNullObject", - "parentTable", - "parentTableCell", - "parentTableCellOrNullObject", - "parentTableOrNullObject", - "tables", "contentControls", "inlinePictures", "lists", @@ -15503,95 +17389,108 @@ var Word; ]); }; Range.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; Range.prototype.compareLocationWith=function (range) { - var action=_createMethodAction(this.context, this, "CompareLocationWith", 1, [range]); + _throwIfApiNotSupported("Range.compareLocationWith", _defaultApiSetName, "1.3", _hostName); + var action=_createMethodAction(this.context, this, "CompareLocationWith", 1, [range], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Range.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Range.prototype.expandTo=function (range) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "ExpandTo", 0, [range], false, false, null)); + _throwIfApiNotSupported("Range.expandTo", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "ExpandTo", 0, [range], false, false, null, false)); }; Range.prototype.expandToOrNullObject=function (range) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "ExpandToOrNullObject", 0, [range], false, false, null)); + _throwIfApiNotSupported("Range.expandToOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "ExpandToOrNullObject", 0, [range], false, false, null, false)); }; Range.prototype.getHtml=function () { - var action=_createMethodAction(this.context, this, "GetHtml", 1, []); + var action=_createMethodAction(this.context, this, "GetHtml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Range.prototype.getHyperlinkRanges=function () { - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetHyperlinkRanges", 1, [], true, false, null)); + _throwIfApiNotSupported("Range.getHyperlinkRanges", _defaultApiSetName, "1.3", _hostName); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetHyperlinkRanges", 1, [], true, false, null, false)); }; Range.prototype.getNextTextRange=function (endingMarks, trimSpacing) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetNextTextRange", 1, [endingMarks, trimSpacing], false, false, null)); + _throwIfApiNotSupported("Range.getNextTextRange", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetNextTextRange", 1, [endingMarks, trimSpacing], false, false, null, false)); }; Range.prototype.getNextTextRangeOrNullObject=function (endingMarks, trimSpacing) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetNextTextRangeOrNullObject", 1, [endingMarks, trimSpacing], false, false, null)); + _throwIfApiNotSupported("Range.getNextTextRangeOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetNextTextRangeOrNullObject", 1, [endingMarks, trimSpacing], false, false, null, false)); }; Range.prototype.getOoxml=function () { - var action=_createMethodAction(this.context, this, "GetOoxml", 1, []); + var action=_createMethodAction(this.context, this, "GetOoxml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Range.prototype.getRange=function (rangeLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null)); + _throwIfApiNotSupported("Range.getRange", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null, false)); }; Range.prototype.getTextRanges=function (endingMarks, trimSpacing) { - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetTextRanges", 1, [endingMarks, trimSpacing], true, false, null)); + _throwIfApiNotSupported("Range.getTextRanges", _defaultApiSetName, "1.3", _hostName); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetTextRanges", 1, [endingMarks, trimSpacing], true, false, null, false)); }; Range.prototype.insertBreak=function (breakType, insertLocation) { - _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation]); + _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation], false); }; Range.prototype.insertContentControl=function () { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null)); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null, false)); }; Range.prototype.insertFileFromBase64=function (base64File, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null, false)); }; Range.prototype.insertHtml=function (html, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null, false)); }; Range.prototype.insertInlinePictureFromBase64=function (base64EncodedImage, insertLocation) { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null)); + _throwIfApiNotSupported("Range.insertInlinePictureFromBase64", _defaultApiSetName, "1.2", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null, false)); }; Range.prototype.insertOoxml=function (ooxml, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null, false)); }; Range.prototype.insertParagraph=function (paragraphText, insertLocation) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null, false)); }; Range.prototype.insertTable=function (rowCount, columnCount, insertLocation, values) { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null)); + _throwIfApiNotSupported("Range.insertTable", _defaultApiSetName, "1.3", _hostName); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null, false)); }; Range.prototype.insertText=function (text, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null, false)); }; Range.prototype.intersectWith=function (range) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "IntersectWith", 0, [range], false, false, null)); + _throwIfApiNotSupported("Range.intersectWith", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "IntersectWith", 0, [range], false, false, null, false)); }; Range.prototype.intersectWithOrNullObject=function (range) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "IntersectWithOrNullObject", 0, [range], false, false, null)); + _throwIfApiNotSupported("Range.intersectWithOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "IntersectWithOrNullObject", 0, [range], false, false, null, false)); }; Range.prototype.search=function (searchText, searchOptions) { searchOptions=_normalizeSearchOptions(this.context, searchOptions); - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null)); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null, false)); }; Range.prototype.select=function (selectionMode) { - _createMethodAction(this.context, this, "Select", 1, [selectionMode]); + _createMethodAction(this.context, this, "Select", 1, [selectionMode], false); }; Range.prototype.split=function (delimiters, multiParagraphs, trimDelimiters, trimSpacing) { - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Split", 1, [delimiters, multiParagraphs, trimDelimiters, trimSpacing], true, false, null)); + _throwIfApiNotSupported("Range.split", _defaultApiSetName, "1.3", _hostName); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Split", 1, [delimiters, multiParagraphs, trimDelimiters, trimSpacing], true, false, null, false)); }; Range.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Range.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15600,31 +17499,39 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Hyperlink"])) { - this.m_hyperlink=obj["Hyperlink"]; + this._H=obj["Hyperlink"]; } if (!_isUndefined(obj["IsEmpty"])) { - this.m_isEmpty=obj["IsEmpty"]; + this._Is=obj["IsEmpty"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._S=obj["Style"]; } if (!_isUndefined(obj["StyleBuiltIn"])) { - this.m_styleBuiltIn=obj["StyleBuiltIn"]; + this._St=obj["StyleBuiltIn"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._Te=obj["Text"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["contentControls", "ContentControls", "font", "Font", "inlinePictures", "InlinePictures", "lists", "Lists", "paragraphs", "Paragraphs", "parentBody", "ParentBody", "parentContentControl", "ParentContentControl", "parentContentControlOrNullObject", "ParentContentControlOrNullObject", "parentTable", "ParentTable", "parentTableCell", "ParentTableCell", "parentTableCellOrNullObject", "ParentTableCellOrNullObject", "parentTableOrNullObject", "ParentTableOrNullObject", "tables", "Tables"]); }; Range.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Range.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Range.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Range.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; Range.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -15632,10 +17539,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; Range.prototype.track=function () { @@ -15647,22 +17554,29 @@ var Word; return this; }; Range.prototype.toJSON=function () { - return { - "font": this.m_font, - "hyperlink": this.m_hyperlink, - "isEmpty": this.m_isEmpty, - "style": this.m_style, - "styleBuiltIn": this.m_styleBuiltIn, - "text": this.m_text - }; + return _toJson(this, { + "hyperlink": this._H, + "isEmpty": this._Is, + "style": this._S, + "styleBuiltIn": this._St, + "text": this._Te, + }, { + "font": this._F, + "inlinePictures": this._I, + }); + }; + Range.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Range; }(OfficeExtension.ClientObject)); Word.Range=Range; + var _typeRangeCollection="RangeCollection"; var RangeCollection=(function (_super) { __extends(RangeCollection, _super); function RangeCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeCollection.prototype, "_className", { get: function () { @@ -15673,7 +17587,7 @@ var Word; }); Object.defineProperty(RangeCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "RangeCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeRangeCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15681,23 +17595,25 @@ var Word; }); Object.defineProperty(RangeCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "RangeCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeRangeCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); RangeCollection.prototype.getFirst=function () { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + _throwIfApiNotSupported("RangeCollection.getFirst", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; RangeCollection.prototype.getFirstOrNullObject=function () { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("RangeCollection.getFirstOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; RangeCollection.prototype._GetItem=function (index) { return new Word.Range(this.context, _createIndexerObjectPath(this.context, this, [index])); }; RangeCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; RangeCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15706,7 +17622,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15719,8 +17635,16 @@ var Word; } }; RangeCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + RangeCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; RangeCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -15728,7 +17652,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; RangeCollection.prototype.track=function () { @@ -15740,15 +17664,16 @@ var Word; return this; }; RangeCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return RangeCollection; }(OfficeExtension.ClientObject)); Word.RangeCollection=RangeCollection; + var _typeSearchOptions="SearchOptions"; var SearchOptions=(function (_super) { __extends(SearchOptions, _super); function SearchOptions() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(SearchOptions.prototype, "_className", { get: function () { @@ -15771,11 +17696,11 @@ var Word; }); Object.defineProperty(SearchOptions.prototype, "ignorePunct", { get: function () { - _throwIfNotLoaded("ignorePunct", this.m_ignorePunct, "SearchOptions", this._isNull); - return this.m_ignorePunct; + _throwIfNotLoaded("ignorePunct", this._I, _typeSearchOptions, this._isNull); + return this._I; }, set: function (value) { - this.m_ignorePunct=value; + this._I=value; _createSetPropertyAction(this.context, this, "IgnorePunct", value); }, enumerable: true, @@ -15783,11 +17708,11 @@ var Word; }); Object.defineProperty(SearchOptions.prototype, "ignoreSpace", { get: function () { - _throwIfNotLoaded("ignoreSpace", this.m_ignoreSpace, "SearchOptions", this._isNull); - return this.m_ignoreSpace; + _throwIfNotLoaded("ignoreSpace", this._Ig, _typeSearchOptions, this._isNull); + return this._Ig; }, set: function (value) { - this.m_ignoreSpace=value; + this._Ig=value; _createSetPropertyAction(this.context, this, "IgnoreSpace", value); }, enumerable: true, @@ -15795,11 +17720,11 @@ var Word; }); Object.defineProperty(SearchOptions.prototype, "matchCase", { get: function () { - _throwIfNotLoaded("matchCase", this.m_matchCase, "SearchOptions", this._isNull); - return this.m_matchCase; + _throwIfNotLoaded("matchCase", this._M, _typeSearchOptions, this._isNull); + return this._M; }, set: function (value) { - this.m_matchCase=value; + this._M=value; _createSetPropertyAction(this.context, this, "MatchCase", value); }, enumerable: true, @@ -15807,11 +17732,11 @@ var Word; }); Object.defineProperty(SearchOptions.prototype, "matchPrefix", { get: function () { - _throwIfNotLoaded("matchPrefix", this.m_matchPrefix, "SearchOptions", this._isNull); - return this.m_matchPrefix; + _throwIfNotLoaded("matchPrefix", this._Ma, _typeSearchOptions, this._isNull); + return this._Ma; }, set: function (value) { - this.m_matchPrefix=value; + this._Ma=value; _createSetPropertyAction(this.context, this, "MatchPrefix", value); }, enumerable: true, @@ -15819,11 +17744,11 @@ var Word; }); Object.defineProperty(SearchOptions.prototype, "matchSuffix", { get: function () { - _throwIfNotLoaded("matchSuffix", this.m_matchSuffix, "SearchOptions", this._isNull); - return this.m_matchSuffix; + _throwIfNotLoaded("matchSuffix", this._Mat, _typeSearchOptions, this._isNull); + return this._Mat; }, set: function (value) { - this.m_matchSuffix=value; + this._Mat=value; _createSetPropertyAction(this.context, this, "MatchSuffix", value); }, enumerable: true, @@ -15831,11 +17756,11 @@ var Word; }); Object.defineProperty(SearchOptions.prototype, "matchWholeWord", { get: function () { - _throwIfNotLoaded("matchWholeWord", this.m_matchWholeWord, "SearchOptions", this._isNull); - return this.m_matchWholeWord; + _throwIfNotLoaded("matchWholeWord", this._Matc, _typeSearchOptions, this._isNull); + return this._Matc; }, set: function (value) { - this.m_matchWholeWord=value; + this._Matc=value; _createSetPropertyAction(this.context, this, "MatchWholeWord", value); }, enumerable: true, @@ -15843,7 +17768,7 @@ var Word; }); Object.defineProperty(SearchOptions.prototype, "matchWildcards", { get: function () { - _throwIfNotLoaded("matchWildcards", this.m_matchWildcards, "SearchOptions", this._isNull); + _throwIfNotLoaded("matchWildcards", this.m_matchWildcards, _typeSearchOptions, this._isNull); return this.m_matchWildcards; }, set: function (value) { @@ -15863,53 +17788,66 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["IgnorePunct"])) { - this.m_ignorePunct=obj["IgnorePunct"]; + this._I=obj["IgnorePunct"]; } if (!_isUndefined(obj["IgnoreSpace"])) { - this.m_ignoreSpace=obj["IgnoreSpace"]; + this._Ig=obj["IgnoreSpace"]; } if (!_isUndefined(obj["MatchCase"])) { - this.m_matchCase=obj["MatchCase"]; + this._M=obj["MatchCase"]; } if (!_isUndefined(obj["MatchPrefix"])) { - this.m_matchPrefix=obj["MatchPrefix"]; + this._Ma=obj["MatchPrefix"]; } if (!_isUndefined(obj["MatchSuffix"])) { - this.m_matchSuffix=obj["MatchSuffix"]; + this._Mat=obj["MatchSuffix"]; } if (!_isUndefined(obj["MatchWholeWord"])) { - this.m_matchWholeWord=obj["MatchWholeWord"]; + this._Matc=obj["MatchWholeWord"]; } if (!_isUndefined(obj["MatchWildcards"])) { this.m_matchWildcards=obj["MatchWildcards"]; } }; SearchOptions.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + SearchOptions.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + SearchOptions.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + SearchOptions.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; SearchOptions.newObject=function (context) { - var ret=new Word.SearchOptions(context, _createNewObjectObjectPath(context, "Microsoft.WordServices.SearchOptions", false)); + var ret=new Word.SearchOptions(context, _createNewObjectObjectPath(context, "Microsoft.WordServices.SearchOptions", false, false)); return ret; }; SearchOptions.prototype.toJSON=function () { - return { - "ignorePunct": this.m_ignorePunct, - "ignoreSpace": this.m_ignoreSpace, - "matchCase": this.m_matchCase, - "matchPrefix": this.m_matchPrefix, - "matchSuffix": this.m_matchSuffix, - "matchWholeWord": this.m_matchWholeWord, - "matchWildcards": this.m_matchWildcards - }; + return _toJson(this, { + "ignorePunct": this._I, + "ignoreSpace": this._Ig, + "matchCase": this._M, + "matchPrefix": this._Ma, + "matchSuffix": this._Mat, + "matchWholeWord": this._Matc, + "matchWildcards": this.m_matchWildcards, + }, {}); + }; + SearchOptions.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return SearchOptions; }(OfficeExtension.ClientObject)); Word.SearchOptions=SearchOptions; + var _typeSection="Section"; var Section=(function (_super) { __extends(Section, _super); function Section() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Section.prototype, "_className", { get: function () { @@ -15920,26 +17858,26 @@ var Word; }); Object.defineProperty(Section.prototype, "body", { get: function () { - if (!this.m_body) { - this.m_body=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "Body", false, false)); + if (!this._B) { + this._B=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "Body", false, false, false)); } - return this.m_body; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "Section", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeSection, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Section", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeSection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -15948,19 +17886,21 @@ var Word; this._recursivelySet(properties, options, [], ["body"], []); }; Section.prototype.getFooter=function (type) { - return new Word.Body(this.context, _createMethodObjectPath(this.context, this, "GetFooter", 1, [type], false, true, null)); + return new Word.Body(this.context, _createMethodObjectPath(this.context, this, "GetFooter", 1, [type], false, true, null, false)); }; Section.prototype.getHeader=function (type) { - return new Word.Body(this.context, _createMethodObjectPath(this.context, this, "GetHeader", 1, [type], false, true, null)); + return new Word.Body(this.context, _createMethodObjectPath(this.context, this, "GetHeader", 1, [type], false, true, null, false)); }; Section.prototype.getNext=function () { - return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null)); + _throwIfApiNotSupported("Section.getNext", _defaultApiSetName, "1.3", _hostName); + return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null, false)); }; Section.prototype.getNextOrNullObject=function () { - return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("Section.getNextOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null, false)); }; Section.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Section.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15969,16 +17909,24 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["body", "Body"]); }; Section.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Section.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Section.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Section.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; Section.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -15986,10 +17934,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; Section.prototype.track=function () { @@ -16001,17 +17949,22 @@ var Word; return this; }; Section.prototype.toJSON=function () { - return { - "body": this.m_body - }; + return _toJson(this, {}, { + "body": this._B, + }); + }; + Section.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Section; }(OfficeExtension.ClientObject)); Word.Section=Section; + var _typeSectionCollection="SectionCollection"; var SectionCollection=(function (_super) { __extends(SectionCollection, _super); function SectionCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(SectionCollection.prototype, "_className", { get: function () { @@ -16022,7 +17975,7 @@ var Word; }); Object.defineProperty(SectionCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "SectionCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeSectionCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -16030,23 +17983,25 @@ var Word; }); Object.defineProperty(SectionCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "SectionCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeSectionCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); SectionCollection.prototype.getFirst=function () { - return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + _throwIfApiNotSupported("SectionCollection.getFirst", _defaultApiSetName, "1.3", _hostName); + return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; SectionCollection.prototype.getFirstOrNullObject=function () { - return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("SectionCollection.getFirstOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; SectionCollection.prototype._GetItem=function (index) { return new Word.Section(this.context, _createIndexerObjectPath(this.context, this, [index])); }; SectionCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; SectionCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16055,7 +18010,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -16068,8 +18023,16 @@ var Word; } }; SectionCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + SectionCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + SectionCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + SectionCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; SectionCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -16077,7 +18040,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; SectionCollection.prototype.track=function () { @@ -16089,15 +18052,16 @@ var Word; return this; }; SectionCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return SectionCollection; }(OfficeExtension.ClientObject)); Word.SectionCollection=SectionCollection; + var _typeTable="Table"; var Table=(function (_super) { __extends(Table, _super); function Table() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Table.prototype, "_className", { get: function () { @@ -16108,111 +18072,111 @@ var Word; }); Object.defineProperty(Table.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._F) { + this._F=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "parentBody", { get: function () { - if (!this.m_parentBody) { - this.m_parentBody=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false)); + if (!this._P) { + this._P=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false, false)); } - return this.m_parentBody; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "parentContentControl", { get: function () { - if (!this.m_parentContentControl) { - this.m_parentContentControl=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false)); + if (!this._Pa) { + this._Pa=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false, false)); } - return this.m_parentContentControl; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "parentContentControlOrNullObject", { get: function () { - if (!this.m_parentContentControlOrNullObject) { - this.m_parentContentControlOrNullObject=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false)); + if (!this._Par) { + this._Par=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false, false)); } - return this.m_parentContentControlOrNullObject; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + if (!this._Pare) { + this._Pare=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._Pare; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "parentTableCell", { get: function () { - if (!this.m_parentTableCell) { - this.m_parentTableCell=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false)); + if (!this._Paren) { + this._Paren=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false, false)); } - return this.m_parentTableCell; + return this._Paren; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "parentTableCellOrNullObject", { get: function () { - if (!this.m_parentTableCellOrNullObject) { - this.m_parentTableCellOrNullObject=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false)); + if (!this._Parent) { + this._Parent=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false, false)); } - return this.m_parentTableCellOrNullObject; + return this._Parent; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "parentTableOrNullObject", { get: function () { - if (!this.m_parentTableOrNullObject) { - this.m_parentTableOrNullObject=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false)); + if (!this._ParentT) { + this._ParentT=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false, false)); } - return this.m_parentTableOrNullObject; + return this._ParentT; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "rows", { get: function () { - if (!this.m_rows) { - this.m_rows=new Word.TableRowCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false)); + if (!this._Ro) { + this._Ro=new Word.TableRowCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false, false)); } - return this.m_rows; + return this._Ro; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "tables", { get: function () { - if (!this.m_tables) { - this.m_tables=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false)); + if (!this._T) { + this._T=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false, false)); } - return this.m_tables; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "alignment", { get: function () { - _throwIfNotLoaded("alignment", this.m_alignment, "Table", this._isNull); - return this.m_alignment; + _throwIfNotLoaded("alignment", this._A, _typeTable, this._isNull); + return this._A; }, set: function (value) { - this.m_alignment=value; + this._A=value; _createSetPropertyAction(this.context, this, "Alignment", value); }, enumerable: true, @@ -16220,11 +18184,11 @@ var Word; }); Object.defineProperty(Table.prototype, "headerRowCount", { get: function () { - _throwIfNotLoaded("headerRowCount", this.m_headerRowCount, "Table", this._isNull); - return this.m_headerRowCount; + _throwIfNotLoaded("headerRowCount", this._H, _typeTable, this._isNull); + return this._H; }, set: function (value) { - this.m_headerRowCount=value; + this._H=value; _createSetPropertyAction(this.context, this, "HeaderRowCount", value); }, enumerable: true, @@ -16232,11 +18196,11 @@ var Word; }); Object.defineProperty(Table.prototype, "horizontalAlignment", { get: function () { - _throwIfNotLoaded("horizontalAlignment", this.m_horizontalAlignment, "Table", this._isNull); - return this.m_horizontalAlignment; + _throwIfNotLoaded("horizontalAlignment", this._Ho, _typeTable, this._isNull); + return this._Ho; }, set: function (value) { - this.m_horizontalAlignment=value; + this._Ho=value; _createSetPropertyAction(this.context, this, "HorizontalAlignment", value); }, enumerable: true, @@ -16244,35 +18208,35 @@ var Word; }); Object.defineProperty(Table.prototype, "isUniform", { get: function () { - _throwIfNotLoaded("isUniform", this.m_isUniform, "Table", this._isNull); - return this.m_isUniform; + _throwIfNotLoaded("isUniform", this._I, _typeTable, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "nestingLevel", { get: function () { - _throwIfNotLoaded("nestingLevel", this.m_nestingLevel, "Table", this._isNull); - return this.m_nestingLevel; + _throwIfNotLoaded("nestingLevel", this._N, _typeTable, this._isNull); + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "rowCount", { get: function () { - _throwIfNotLoaded("rowCount", this.m_rowCount, "Table", this._isNull); - return this.m_rowCount; + _throwIfNotLoaded("rowCount", this._R, _typeTable, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "shadingColor", { get: function () { - _throwIfNotLoaded("shadingColor", this.m_shadingColor, "Table", this._isNull); - return this.m_shadingColor; + _throwIfNotLoaded("shadingColor", this._S, _typeTable, this._isNull); + return this._S; }, set: function (value) { - this.m_shadingColor=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShadingColor", value); }, enumerable: true, @@ -16280,11 +18244,11 @@ var Word; }); Object.defineProperty(Table.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "Table", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._St, _typeTable, this._isNull); + return this._St; }, set: function (value) { - this.m_style=value; + this._St=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -16292,11 +18256,11 @@ var Word; }); Object.defineProperty(Table.prototype, "styleBandedColumns", { get: function () { - _throwIfNotLoaded("styleBandedColumns", this.m_styleBandedColumns, "Table", this._isNull); - return this.m_styleBandedColumns; + _throwIfNotLoaded("styleBandedColumns", this._Sty, _typeTable, this._isNull); + return this._Sty; }, set: function (value) { - this.m_styleBandedColumns=value; + this._Sty=value; _createSetPropertyAction(this.context, this, "StyleBandedColumns", value); }, enumerable: true, @@ -16304,11 +18268,11 @@ var Word; }); Object.defineProperty(Table.prototype, "styleBandedRows", { get: function () { - _throwIfNotLoaded("styleBandedRows", this.m_styleBandedRows, "Table", this._isNull); - return this.m_styleBandedRows; + _throwIfNotLoaded("styleBandedRows", this._Styl, _typeTable, this._isNull); + return this._Styl; }, set: function (value) { - this.m_styleBandedRows=value; + this._Styl=value; _createSetPropertyAction(this.context, this, "StyleBandedRows", value); }, enumerable: true, @@ -16316,11 +18280,11 @@ var Word; }); Object.defineProperty(Table.prototype, "styleBuiltIn", { get: function () { - _throwIfNotLoaded("styleBuiltIn", this.m_styleBuiltIn, "Table", this._isNull); - return this.m_styleBuiltIn; + _throwIfNotLoaded("styleBuiltIn", this._Style, _typeTable, this._isNull); + return this._Style; }, set: function (value) { - this.m_styleBuiltIn=value; + this._Style=value; _createSetPropertyAction(this.context, this, "StyleBuiltIn", value); }, enumerable: true, @@ -16328,11 +18292,11 @@ var Word; }); Object.defineProperty(Table.prototype, "styleFirstColumn", { get: function () { - _throwIfNotLoaded("styleFirstColumn", this.m_styleFirstColumn, "Table", this._isNull); - return this.m_styleFirstColumn; + _throwIfNotLoaded("styleFirstColumn", this._StyleF, _typeTable, this._isNull); + return this._StyleF; }, set: function (value) { - this.m_styleFirstColumn=value; + this._StyleF=value; _createSetPropertyAction(this.context, this, "StyleFirstColumn", value); }, enumerable: true, @@ -16340,11 +18304,11 @@ var Word; }); Object.defineProperty(Table.prototype, "styleLastColumn", { get: function () { - _throwIfNotLoaded("styleLastColumn", this.m_styleLastColumn, "Table", this._isNull); - return this.m_styleLastColumn; + _throwIfNotLoaded("styleLastColumn", this._StyleL, _typeTable, this._isNull); + return this._StyleL; }, set: function (value) { - this.m_styleLastColumn=value; + this._StyleL=value; _createSetPropertyAction(this.context, this, "StyleLastColumn", value); }, enumerable: true, @@ -16352,11 +18316,11 @@ var Word; }); Object.defineProperty(Table.prototype, "styleTotalRow", { get: function () { - _throwIfNotLoaded("styleTotalRow", this.m_styleTotalRow, "Table", this._isNull); - return this.m_styleTotalRow; + _throwIfNotLoaded("styleTotalRow", this._StyleT, _typeTable, this._isNull); + return this._StyleT; }, set: function (value) { - this.m_styleTotalRow=value; + this._StyleT=value; _createSetPropertyAction(this.context, this, "StyleTotalRow", value); }, enumerable: true, @@ -16364,11 +18328,11 @@ var Word; }); Object.defineProperty(Table.prototype, "values", { get: function () { - _throwIfNotLoaded("values", this.m_values, "Table", this._isNull); - return this.m_values; + _throwIfNotLoaded("values", this._V, _typeTable, this._isNull); + return this._V; }, set: function (value) { - this.m_values=value; + this._V=value; _createSetPropertyAction(this.context, this, "Values", value); }, enumerable: true, @@ -16376,11 +18340,11 @@ var Word; }); Object.defineProperty(Table.prototype, "verticalAlignment", { get: function () { - _throwIfNotLoaded("verticalAlignment", this.m_verticalAlignment, "Table", this._isNull); - return this.m_verticalAlignment; + _throwIfNotLoaded("verticalAlignment", this._Ve, _typeTable, this._isNull); + return this._Ve; }, set: function (value) { - this.m_verticalAlignment=value; + this._Ve=value; _createSetPropertyAction(this.context, this, "VerticalAlignment", value); }, enumerable: true, @@ -16388,11 +18352,11 @@ var Word; }); Object.defineProperty(Table.prototype, "width", { get: function () { - _throwIfNotLoaded("width", this.m_width, "Table", this._isNull); - return this.m_width; + _throwIfNotLoaded("width", this._W, _typeTable, this._isNull); + return this._W; }, set: function (value) { - this.m_width=value; + this._W=value; _createSetPropertyAction(this.context, this, "Width", value); }, enumerable: true, @@ -16400,31 +18364,22 @@ var Word; }); Object.defineProperty(Table.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "Table", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeTable, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Table", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTable, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Table.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["values", "style", "headerRowCount", "styleTotalRow", "styleFirstColumn", "styleLastColumn", "styleBandedRows", "styleBandedColumns", "shadingColor", "horizontalAlignment", "verticalAlignment", "width", "styleBuiltIn", "alignment"], ["font"], [ - "parentBody", - "parentContentControl", - "parentContentControlOrNullObject", - "parentTable", - "parentTableCell", - "parentTableCellOrNullObject", - "parentTableOrNullObject", - "rows", - "tables", "parentBody", "parentContentControl", "parentContentControlOrNullObject", @@ -16437,86 +18392,86 @@ var Word; ]); }; Table.prototype.addColumns=function (insertLocation, columnCount, values) { - _createMethodAction(this.context, this, "AddColumns", 0, [insertLocation, columnCount, values]); + _createMethodAction(this.context, this, "AddColumns", 0, [insertLocation, columnCount, values], false); }; Table.prototype.addRows=function (insertLocation, rowCount, values) { - return new Word.TableRowCollection(this.context, _createMethodObjectPath(this.context, this, "AddRows", 0, [insertLocation, rowCount, values], true, false, null)); + return new Word.TableRowCollection(this.context, _createMethodObjectPath(this.context, this, "AddRows", 0, [insertLocation, rowCount, values], true, false, null, false)); }; Table.prototype.autoFitWindow=function () { - _createMethodAction(this.context, this, "AutoFitWindow", 0, []); + _createMethodAction(this.context, this, "AutoFitWindow", 0, [], false); }; Table.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; Table.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Table.prototype.deleteColumns=function (columnIndex, columnCount) { - _createMethodAction(this.context, this, "DeleteColumns", 0, [columnIndex, columnCount]); + _createMethodAction(this.context, this, "DeleteColumns", 0, [columnIndex, columnCount], false); }; Table.prototype.deleteRows=function (rowIndex, rowCount) { - _createMethodAction(this.context, this, "DeleteRows", 0, [rowIndex, rowCount]); + _createMethodAction(this.context, this, "DeleteRows", 0, [rowIndex, rowCount], false); }; Table.prototype.distributeColumns=function () { - _createMethodAction(this.context, this, "DistributeColumns", 0, []); + _createMethodAction(this.context, this, "DistributeColumns", 0, [], false); }; Table.prototype.getBorder=function (borderLocation) { - return new Word.TableBorder(this.context, _createMethodObjectPath(this.context, this, "GetBorder", 1, [borderLocation], false, false, null)); + return new Word.TableBorder(this.context, _createMethodObjectPath(this.context, this, "GetBorder", 1, [borderLocation], false, false, null, false)); }; Table.prototype.getCell=function (rowIndex, cellIndex) { - return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [rowIndex, cellIndex], false, false, null)); + return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [rowIndex, cellIndex], false, false, null, false)); }; Table.prototype.getCellOrNullObject=function (rowIndex, cellIndex) { - return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetCellOrNullObject", 1, [rowIndex, cellIndex], false, false, null)); + return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetCellOrNullObject", 1, [rowIndex, cellIndex], false, false, null, false)); }; Table.prototype.getCellPadding=function (cellPaddingLocation) { - var action=_createMethodAction(this.context, this, "GetCellPadding", 1, [cellPaddingLocation]); + var action=_createMethodAction(this.context, this, "GetCellPadding", 1, [cellPaddingLocation], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Table.prototype.getNext=function () { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null)); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null, false)); }; Table.prototype.getNextOrNullObject=function () { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null)); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null, false)); }; Table.prototype.getParagraphAfter=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphAfter", 1, [], false, false, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphAfter", 1, [], false, false, null, false)); }; Table.prototype.getParagraphAfterOrNullObject=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphAfterOrNullObject", 1, [], false, false, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphAfterOrNullObject", 1, [], false, false, null, false)); }; Table.prototype.getParagraphBefore=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphBefore", 1, [], false, false, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphBefore", 1, [], false, false, null, false)); }; Table.prototype.getParagraphBeforeOrNullObject=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphBeforeOrNullObject", 1, [], false, false, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphBeforeOrNullObject", 1, [], false, false, null, false)); }; Table.prototype.getRange=function (rangeLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null, false)); }; Table.prototype.insertContentControl=function () { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null)); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null, false)); }; Table.prototype.insertParagraph=function (paragraphText, insertLocation) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null, false)); }; Table.prototype.insertTable=function (rowCount, columnCount, insertLocation, values) { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null)); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null, false)); }; Table.prototype.search=function (searchText, searchOptions) { searchOptions=_normalizeSearchOptions(this.context, searchOptions); - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null)); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null, false)); }; Table.prototype.select=function (selectionMode) { - _createMethodAction(this.context, this, "Select", 1, [selectionMode]); + _createMethodAction(this.context, this, "Select", 1, [selectionMode], false); }; Table.prototype.setCellPadding=function (cellPaddingLocation, cellPadding) { - _createMethodAction(this.context, this, "SetCellPadding", 0, [cellPaddingLocation, cellPadding]); + _createMethodAction(this.context, this, "SetCellPadding", 0, [cellPaddingLocation, cellPadding], false); }; Table.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Table.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16525,67 +18480,75 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Alignment"])) { - this.m_alignment=obj["Alignment"]; + this._A=obj["Alignment"]; } if (!_isUndefined(obj["HeaderRowCount"])) { - this.m_headerRowCount=obj["HeaderRowCount"]; + this._H=obj["HeaderRowCount"]; } if (!_isUndefined(obj["HorizontalAlignment"])) { - this.m_horizontalAlignment=obj["HorizontalAlignment"]; + this._Ho=obj["HorizontalAlignment"]; } if (!_isUndefined(obj["IsUniform"])) { - this.m_isUniform=obj["IsUniform"]; + this._I=obj["IsUniform"]; } if (!_isUndefined(obj["NestingLevel"])) { - this.m_nestingLevel=obj["NestingLevel"]; + this._N=obj["NestingLevel"]; } if (!_isUndefined(obj["RowCount"])) { - this.m_rowCount=obj["RowCount"]; + this._R=obj["RowCount"]; } if (!_isUndefined(obj["ShadingColor"])) { - this.m_shadingColor=obj["ShadingColor"]; + this._S=obj["ShadingColor"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._St=obj["Style"]; } if (!_isUndefined(obj["StyleBandedColumns"])) { - this.m_styleBandedColumns=obj["StyleBandedColumns"]; + this._Sty=obj["StyleBandedColumns"]; } if (!_isUndefined(obj["StyleBandedRows"])) { - this.m_styleBandedRows=obj["StyleBandedRows"]; + this._Styl=obj["StyleBandedRows"]; } if (!_isUndefined(obj["StyleBuiltIn"])) { - this.m_styleBuiltIn=obj["StyleBuiltIn"]; + this._Style=obj["StyleBuiltIn"]; } if (!_isUndefined(obj["StyleFirstColumn"])) { - this.m_styleFirstColumn=obj["StyleFirstColumn"]; + this._StyleF=obj["StyleFirstColumn"]; } if (!_isUndefined(obj["StyleLastColumn"])) { - this.m_styleLastColumn=obj["StyleLastColumn"]; + this._StyleL=obj["StyleLastColumn"]; } if (!_isUndefined(obj["StyleTotalRow"])) { - this.m_styleTotalRow=obj["StyleTotalRow"]; + this._StyleT=obj["StyleTotalRow"]; } if (!_isUndefined(obj["Values"])) { - this.m_values=obj["Values"]; + this._V=obj["Values"]; } if (!_isUndefined(obj["VerticalAlignment"])) { - this.m_verticalAlignment=obj["VerticalAlignment"]; + this._Ve=obj["VerticalAlignment"]; } if (!_isUndefined(obj["Width"])) { - this.m_width=obj["Width"]; + this._W=obj["Width"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["font", "Font", "parentBody", "ParentBody", "parentContentControl", "ParentContentControl", "parentContentControlOrNullObject", "ParentContentControlOrNullObject", "parentTable", "ParentTable", "parentTableCell", "ParentTableCell", "parentTableCellOrNullObject", "ParentTableCellOrNullObject", "parentTableOrNullObject", "ParentTableOrNullObject", "rows", "Rows", "tables", "Tables"]); }; Table.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Table.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Table.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Table.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; Table.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -16593,10 +18556,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; Table.prototype.track=function () { @@ -16608,34 +18571,42 @@ var Word; return this; }; Table.prototype.toJSON=function () { - return { - "alignment": this.m_alignment, - "font": this.m_font, - "headerRowCount": this.m_headerRowCount, - "horizontalAlignment": this.m_horizontalAlignment, - "isUniform": this.m_isUniform, - "nestingLevel": this.m_nestingLevel, - "rowCount": this.m_rowCount, - "shadingColor": this.m_shadingColor, - "style": this.m_style, - "styleBandedColumns": this.m_styleBandedColumns, - "styleBandedRows": this.m_styleBandedRows, - "styleBuiltIn": this.m_styleBuiltIn, - "styleFirstColumn": this.m_styleFirstColumn, - "styleLastColumn": this.m_styleLastColumn, - "styleTotalRow": this.m_styleTotalRow, - "values": this.m_values, - "verticalAlignment": this.m_verticalAlignment, - "width": this.m_width - }; + return _toJson(this, { + "alignment": this._A, + "headerRowCount": this._H, + "horizontalAlignment": this._Ho, + "isUniform": this._I, + "nestingLevel": this._N, + "rowCount": this._R, + "shadingColor": this._S, + "style": this._St, + "styleBandedColumns": this._Sty, + "styleBandedRows": this._Styl, + "styleBuiltIn": this._Style, + "styleFirstColumn": this._StyleF, + "styleLastColumn": this._StyleL, + "styleTotalRow": this._StyleT, + "values": this._V, + "verticalAlignment": this._Ve, + "width": this._W, + }, { + "font": this._F, + "rows": this._Ro, + "tables": this._T, + }); + }; + Table.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Table; }(OfficeExtension.ClientObject)); Word.Table=Table; + var _typeTableCollection="TableCollection"; var TableCollection=(function (_super) { __extends(TableCollection, _super); function TableCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableCollection.prototype, "_className", { get: function () { @@ -16646,7 +18617,7 @@ var Word; }); Object.defineProperty(TableCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -16654,23 +18625,23 @@ var Word; }); Object.defineProperty(TableCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); TableCollection.prototype.getFirst=function () { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; TableCollection.prototype.getFirstOrNullObject=function () { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; TableCollection.prototype._GetItem=function (index) { return new Word.Table(this.context, _createIndexerObjectPath(this.context, this, [index])); }; TableCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16679,7 +18650,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -16692,8 +18663,16 @@ var Word; } }; TableCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TableCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; TableCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -16701,7 +18680,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; TableCollection.prototype.track=function () { @@ -16713,15 +18692,16 @@ var Word; return this; }; TableCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return TableCollection; }(OfficeExtension.ClientObject)); Word.TableCollection=TableCollection; + var _typeTableRow="TableRow"; var TableRow=(function (_super) { __extends(TableRow, _super); function TableRow() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableRow.prototype, "_className", { get: function () { @@ -16732,49 +18712,49 @@ var Word; }); Object.defineProperty(TableRow.prototype, "cells", { get: function () { - if (!this.m_cells) { - this.m_cells=new Word.TableCellCollection(this.context, _createPropertyObjectPath(this.context, this, "Cells", true, false)); + if (!this._Ce) { + this._Ce=new Word.TableCellCollection(this.context, _createPropertyObjectPath(this.context, this, "Cells", true, false, false)); } - return this.m_cells; + return this._Ce; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._F) { + this._F=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + if (!this._P) { + this._P=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "cellCount", { get: function () { - _throwIfNotLoaded("cellCount", this.m_cellCount, "TableRow", this._isNull); - return this.m_cellCount; + _throwIfNotLoaded("cellCount", this._C, _typeTableRow, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "horizontalAlignment", { get: function () { - _throwIfNotLoaded("horizontalAlignment", this.m_horizontalAlignment, "TableRow", this._isNull); - return this.m_horizontalAlignment; + _throwIfNotLoaded("horizontalAlignment", this._H, _typeTableRow, this._isNull); + return this._H; }, set: function (value) { - this.m_horizontalAlignment=value; + this._H=value; _createSetPropertyAction(this.context, this, "HorizontalAlignment", value); }, enumerable: true, @@ -16782,19 +18762,19 @@ var Word; }); Object.defineProperty(TableRow.prototype, "isHeader", { get: function () { - _throwIfNotLoaded("isHeader", this.m_isHeader, "TableRow", this._isNull); - return this.m_isHeader; + _throwIfNotLoaded("isHeader", this._I, _typeTableRow, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "preferredHeight", { get: function () { - _throwIfNotLoaded("preferredHeight", this.m_preferredHeight, "TableRow", this._isNull); - return this.m_preferredHeight; + _throwIfNotLoaded("preferredHeight", this._Pr, _typeTableRow, this._isNull); + return this._Pr; }, set: function (value) { - this.m_preferredHeight=value; + this._Pr=value; _createSetPropertyAction(this.context, this, "PreferredHeight", value); }, enumerable: true, @@ -16802,19 +18782,19 @@ var Word; }); Object.defineProperty(TableRow.prototype, "rowIndex", { get: function () { - _throwIfNotLoaded("rowIndex", this.m_rowIndex, "TableRow", this._isNull); - return this.m_rowIndex; + _throwIfNotLoaded("rowIndex", this._R, _typeTableRow, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "shadingColor", { get: function () { - _throwIfNotLoaded("shadingColor", this.m_shadingColor, "TableRow", this._isNull); - return this.m_shadingColor; + _throwIfNotLoaded("shadingColor", this._S, _typeTableRow, this._isNull); + return this._S; }, set: function (value) { - this.m_shadingColor=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShadingColor", value); }, enumerable: true, @@ -16822,11 +18802,11 @@ var Word; }); Object.defineProperty(TableRow.prototype, "values", { get: function () { - _throwIfNotLoaded("values", this.m_values, "TableRow", this._isNull); - return this.m_values; + _throwIfNotLoaded("values", this._V, _typeTableRow, this._isNull); + return this._V; }, set: function (value) { - this.m_values=value; + this._V=value; _createSetPropertyAction(this.context, this, "Values", value); }, enumerable: true, @@ -16834,11 +18814,11 @@ var Word; }); Object.defineProperty(TableRow.prototype, "verticalAlignment", { get: function () { - _throwIfNotLoaded("verticalAlignment", this.m_verticalAlignment, "TableRow", this._isNull); - return this.m_verticalAlignment; + _throwIfNotLoaded("verticalAlignment", this._Ve, _typeTableRow, this._isNull); + return this._Ve; }, set: function (value) { - this.m_verticalAlignment=value; + this._Ve=value; _createSetPropertyAction(this.context, this, "VerticalAlignment", value); }, enumerable: true, @@ -16846,64 +18826,62 @@ var Word; }); Object.defineProperty(TableRow.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "TableRow", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeTableRow, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableRow", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableRow, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); TableRow.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["values", "shadingColor", "horizontalAlignment", "verticalAlignment", "preferredHeight"], ["font"], [ - "cells", - "parentTable", "cells", "parentTable" ]); }; TableRow.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; TableRow.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; TableRow.prototype.getBorder=function (borderLocation) { - return new Word.TableBorder(this.context, _createMethodObjectPath(this.context, this, "GetBorder", 1, [borderLocation], false, false, null)); + return new Word.TableBorder(this.context, _createMethodObjectPath(this.context, this, "GetBorder", 1, [borderLocation], false, false, null, false)); }; TableRow.prototype.getCellPadding=function (cellPaddingLocation) { - var action=_createMethodAction(this.context, this, "GetCellPadding", 1, [cellPaddingLocation]); + var action=_createMethodAction(this.context, this, "GetCellPadding", 1, [cellPaddingLocation], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; TableRow.prototype.getNext=function () { - return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null)); + return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null, false)); }; TableRow.prototype.getNextOrNullObject=function () { - return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null)); + return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null, false)); }; TableRow.prototype.insertRows=function (insertLocation, rowCount, values) { - return new Word.TableRowCollection(this.context, _createMethodObjectPath(this.context, this, "InsertRows", 1, [insertLocation, rowCount, values], true, false, null)); + return new Word.TableRowCollection(this.context, _createMethodObjectPath(this.context, this, "InsertRows", 1, [insertLocation, rowCount, values], true, false, null, false)); }; TableRow.prototype.search=function (searchText, searchOptions) { searchOptions=_normalizeSearchOptions(this.context, searchOptions); - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null)); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null, false)); }; TableRow.prototype.select=function (selectionMode) { - _createMethodAction(this.context, this, "Select", 1, [selectionMode]); + _createMethodAction(this.context, this, "Select", 1, [selectionMode], false); }; TableRow.prototype.setCellPadding=function (cellPaddingLocation, cellPadding) { - _createMethodAction(this.context, this, "SetCellPadding", 0, [cellPaddingLocation, cellPadding]); + _createMethodAction(this.context, this, "SetCellPadding", 0, [cellPaddingLocation, cellPadding], false); }; TableRow.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableRow.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16912,40 +18890,48 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["CellCount"])) { - this.m_cellCount=obj["CellCount"]; + this._C=obj["CellCount"]; } if (!_isUndefined(obj["HorizontalAlignment"])) { - this.m_horizontalAlignment=obj["HorizontalAlignment"]; + this._H=obj["HorizontalAlignment"]; } if (!_isUndefined(obj["IsHeader"])) { - this.m_isHeader=obj["IsHeader"]; + this._I=obj["IsHeader"]; } if (!_isUndefined(obj["PreferredHeight"])) { - this.m_preferredHeight=obj["PreferredHeight"]; + this._Pr=obj["PreferredHeight"]; } if (!_isUndefined(obj["RowIndex"])) { - this.m_rowIndex=obj["RowIndex"]; + this._R=obj["RowIndex"]; } if (!_isUndefined(obj["ShadingColor"])) { - this.m_shadingColor=obj["ShadingColor"]; + this._S=obj["ShadingColor"]; } if (!_isUndefined(obj["Values"])) { - this.m_values=obj["Values"]; + this._V=obj["Values"]; } if (!_isUndefined(obj["VerticalAlignment"])) { - this.m_verticalAlignment=obj["VerticalAlignment"]; + this._Ve=obj["VerticalAlignment"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["cells", "Cells", "font", "Font", "parentTable", "ParentTable"]); }; TableRow.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableRow.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TableRow.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableRow.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; TableRow.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -16953,10 +18939,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; TableRow.prototype.track=function () { @@ -16968,25 +18954,32 @@ var Word; return this; }; TableRow.prototype.toJSON=function () { - return { - "cellCount": this.m_cellCount, - "font": this.m_font, - "horizontalAlignment": this.m_horizontalAlignment, - "isHeader": this.m_isHeader, - "preferredHeight": this.m_preferredHeight, - "rowIndex": this.m_rowIndex, - "shadingColor": this.m_shadingColor, - "values": this.m_values, - "verticalAlignment": this.m_verticalAlignment - }; + return _toJson(this, { + "cellCount": this._C, + "horizontalAlignment": this._H, + "isHeader": this._I, + "preferredHeight": this._Pr, + "rowIndex": this._R, + "shadingColor": this._S, + "values": this._V, + "verticalAlignment": this._Ve, + }, { + "cells": this._Ce, + "font": this._F, + }); + }; + TableRow.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TableRow; }(OfficeExtension.ClientObject)); Word.TableRow=TableRow; + var _typeTableRowCollection="TableRowCollection"; var TableRowCollection=(function (_super) { __extends(TableRowCollection, _super); function TableRowCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableRowCollection.prototype, "_className", { get: function () { @@ -16997,7 +18990,7 @@ var Word; }); Object.defineProperty(TableRowCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableRowCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableRowCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -17005,23 +18998,23 @@ var Word; }); Object.defineProperty(TableRowCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableRowCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableRowCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); TableRowCollection.prototype.getFirst=function () { - return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; TableRowCollection.prototype.getFirstOrNullObject=function () { - return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; TableRowCollection.prototype._GetItem=function (index) { return new Word.TableRow(this.context, _createIndexerObjectPath(this.context, this, [index])); }; TableRowCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableRowCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17030,7 +19023,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -17043,8 +19036,16 @@ var Word; } }; TableRowCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableRowCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TableRowCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableRowCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; TableRowCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -17052,7 +19053,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; TableRowCollection.prototype.track=function () { @@ -17064,15 +19065,16 @@ var Word; return this; }; TableRowCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return TableRowCollection; }(OfficeExtension.ClientObject)); Word.TableRowCollection=TableRowCollection; + var _typeTableCell="TableCell"; var TableCell=(function (_super) { __extends(TableCell, _super); function TableCell() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableCell.prototype, "_className", { get: function () { @@ -17083,49 +19085,49 @@ var Word; }); Object.defineProperty(TableCell.prototype, "body", { get: function () { - if (!this.m_body) { - this.m_body=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "Body", false, false)); + if (!this._B) { + this._B=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "Body", false, false, false)); } - return this.m_body; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "parentRow", { get: function () { - if (!this.m_parentRow) { - this.m_parentRow=new Word.TableRow(this.context, _createPropertyObjectPath(this.context, this, "ParentRow", false, false)); + if (!this._P) { + this._P=new Word.TableRow(this.context, _createPropertyObjectPath(this.context, this, "ParentRow", false, false, false)); } - return this.m_parentRow; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + if (!this._Pa) { + this._Pa=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "cellIndex", { get: function () { - _throwIfNotLoaded("cellIndex", this.m_cellIndex, "TableCell", this._isNull); - return this.m_cellIndex; + _throwIfNotLoaded("cellIndex", this._C, _typeTableCell, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "columnWidth", { get: function () { - _throwIfNotLoaded("columnWidth", this.m_columnWidth, "TableCell", this._isNull); - return this.m_columnWidth; + _throwIfNotLoaded("columnWidth", this._Co, _typeTableCell, this._isNull); + return this._Co; }, set: function (value) { - this.m_columnWidth=value; + this._Co=value; _createSetPropertyAction(this.context, this, "ColumnWidth", value); }, enumerable: true, @@ -17133,11 +19135,11 @@ var Word; }); Object.defineProperty(TableCell.prototype, "horizontalAlignment", { get: function () { - _throwIfNotLoaded("horizontalAlignment", this.m_horizontalAlignment, "TableCell", this._isNull); - return this.m_horizontalAlignment; + _throwIfNotLoaded("horizontalAlignment", this._H, _typeTableCell, this._isNull); + return this._H; }, set: function (value) { - this.m_horizontalAlignment=value; + this._H=value; _createSetPropertyAction(this.context, this, "HorizontalAlignment", value); }, enumerable: true, @@ -17145,19 +19147,19 @@ var Word; }); Object.defineProperty(TableCell.prototype, "rowIndex", { get: function () { - _throwIfNotLoaded("rowIndex", this.m_rowIndex, "TableCell", this._isNull); - return this.m_rowIndex; + _throwIfNotLoaded("rowIndex", this._R, _typeTableCell, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "shadingColor", { get: function () { - _throwIfNotLoaded("shadingColor", this.m_shadingColor, "TableCell", this._isNull); - return this.m_shadingColor; + _throwIfNotLoaded("shadingColor", this._S, _typeTableCell, this._isNull); + return this._S; }, set: function (value) { - this.m_shadingColor=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShadingColor", value); }, enumerable: true, @@ -17165,11 +19167,11 @@ var Word; }); Object.defineProperty(TableCell.prototype, "value", { get: function () { - _throwIfNotLoaded("value", this.m_value, "TableCell", this._isNull); - return this.m_value; + _throwIfNotLoaded("value", this._V, _typeTableCell, this._isNull); + return this._V; }, set: function (value) { - this.m_value=value; + this._V=value; _createSetPropertyAction(this.context, this, "Value", value); }, enumerable: true, @@ -17177,11 +19179,11 @@ var Word; }); Object.defineProperty(TableCell.prototype, "verticalAlignment", { get: function () { - _throwIfNotLoaded("verticalAlignment", this.m_verticalAlignment, "TableCell", this._isNull); - return this.m_verticalAlignment; + _throwIfNotLoaded("verticalAlignment", this._Ve, _typeTableCell, this._isNull); + return this._Ve; }, set: function (value) { - this.m_verticalAlignment=value; + this._Ve=value; _createSetPropertyAction(this.context, this, "VerticalAlignment", value); }, enumerable: true, @@ -17189,68 +19191,66 @@ var Word; }); Object.defineProperty(TableCell.prototype, "width", { get: function () { - _throwIfNotLoaded("width", this.m_width, "TableCell", this._isNull); - return this.m_width; + _throwIfNotLoaded("width", this._W, _typeTableCell, this._isNull); + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "TableCell", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeTableCell, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableCell", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableCell, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); TableCell.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["value", "shadingColor", "horizontalAlignment", "verticalAlignment", "columnWidth"], ["body"], [ - "parentRow", - "parentTable", "parentRow", "parentTable" ]); }; TableCell.prototype.deleteColumn=function () { - _createMethodAction(this.context, this, "DeleteColumn", 0, []); + _createMethodAction(this.context, this, "DeleteColumn", 0, [], false); }; TableCell.prototype.deleteRow=function () { - _createMethodAction(this.context, this, "DeleteRow", 0, []); + _createMethodAction(this.context, this, "DeleteRow", 0, [], false); }; TableCell.prototype.getBorder=function (borderLocation) { - return new Word.TableBorder(this.context, _createMethodObjectPath(this.context, this, "GetBorder", 1, [borderLocation], false, false, null)); + return new Word.TableBorder(this.context, _createMethodObjectPath(this.context, this, "GetBorder", 1, [borderLocation], false, false, null, false)); }; TableCell.prototype.getCellPadding=function (cellPaddingLocation) { - var action=_createMethodAction(this.context, this, "GetCellPadding", 1, [cellPaddingLocation]); + var action=_createMethodAction(this.context, this, "GetCellPadding", 1, [cellPaddingLocation], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; TableCell.prototype.getNext=function () { - return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null)); + return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null, false)); }; TableCell.prototype.getNextOrNullObject=function () { - return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null)); + return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null, false)); }; TableCell.prototype.insertColumns=function (insertLocation, columnCount, values) { - _createMethodAction(this.context, this, "InsertColumns", 0, [insertLocation, columnCount, values]); + _createMethodAction(this.context, this, "InsertColumns", 0, [insertLocation, columnCount, values], false); }; TableCell.prototype.insertRows=function (insertLocation, rowCount, values) { - return new Word.TableRowCollection(this.context, _createMethodObjectPath(this.context, this, "InsertRows", 0, [insertLocation, rowCount, values], true, false, null)); + return new Word.TableRowCollection(this.context, _createMethodObjectPath(this.context, this, "InsertRows", 0, [insertLocation, rowCount, values], true, false, null, false)); }; TableCell.prototype.setCellPadding=function (cellPaddingLocation, cellPadding) { - _createMethodAction(this.context, this, "SetCellPadding", 0, [cellPaddingLocation, cellPadding]); + _createMethodAction(this.context, this, "SetCellPadding", 0, [cellPaddingLocation, cellPadding], false); }; TableCell.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableCell.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17259,40 +19259,48 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["CellIndex"])) { - this.m_cellIndex=obj["CellIndex"]; + this._C=obj["CellIndex"]; } if (!_isUndefined(obj["ColumnWidth"])) { - this.m_columnWidth=obj["ColumnWidth"]; + this._Co=obj["ColumnWidth"]; } if (!_isUndefined(obj["HorizontalAlignment"])) { - this.m_horizontalAlignment=obj["HorizontalAlignment"]; + this._H=obj["HorizontalAlignment"]; } if (!_isUndefined(obj["RowIndex"])) { - this.m_rowIndex=obj["RowIndex"]; + this._R=obj["RowIndex"]; } if (!_isUndefined(obj["ShadingColor"])) { - this.m_shadingColor=obj["ShadingColor"]; + this._S=obj["ShadingColor"]; } if (!_isUndefined(obj["Value"])) { - this.m_value=obj["Value"]; + this._V=obj["Value"]; } if (!_isUndefined(obj["VerticalAlignment"])) { - this.m_verticalAlignment=obj["VerticalAlignment"]; + this._Ve=obj["VerticalAlignment"]; } if (!_isUndefined(obj["Width"])) { - this.m_width=obj["Width"]; + this._W=obj["Width"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["body", "Body", "parentRow", "ParentRow", "parentTable", "ParentTable"]); }; TableCell.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableCell.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TableCell.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableCell.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; TableCell.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -17300,10 +19308,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; TableCell.prototype.track=function () { @@ -17315,25 +19323,31 @@ var Word; return this; }; TableCell.prototype.toJSON=function () { - return { - "body": this.m_body, - "cellIndex": this.m_cellIndex, - "columnWidth": this.m_columnWidth, - "horizontalAlignment": this.m_horizontalAlignment, - "rowIndex": this.m_rowIndex, - "shadingColor": this.m_shadingColor, - "value": this.m_value, - "verticalAlignment": this.m_verticalAlignment, - "width": this.m_width - }; + return _toJson(this, { + "cellIndex": this._C, + "columnWidth": this._Co, + "horizontalAlignment": this._H, + "rowIndex": this._R, + "shadingColor": this._S, + "value": this._V, + "verticalAlignment": this._Ve, + "width": this._W, + }, { + "body": this._B, + }); + }; + TableCell.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TableCell; }(OfficeExtension.ClientObject)); Word.TableCell=TableCell; + var _typeTableCellCollection="TableCellCollection"; var TableCellCollection=(function (_super) { __extends(TableCellCollection, _super); function TableCellCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableCellCollection.prototype, "_className", { get: function () { @@ -17344,7 +19358,7 @@ var Word; }); Object.defineProperty(TableCellCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableCellCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableCellCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -17352,23 +19366,23 @@ var Word; }); Object.defineProperty(TableCellCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableCellCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableCellCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); TableCellCollection.prototype.getFirst=function () { - return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; TableCellCollection.prototype.getFirstOrNullObject=function () { - return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; TableCellCollection.prototype._GetItem=function (index) { return new Word.TableCell(this.context, _createIndexerObjectPath(this.context, this, [index])); }; TableCellCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableCellCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17377,7 +19391,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -17390,8 +19404,16 @@ var Word; } }; TableCellCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableCellCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TableCellCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableCellCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; TableCellCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -17399,7 +19421,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; TableCellCollection.prototype.track=function () { @@ -17411,15 +19433,16 @@ var Word; return this; }; TableCellCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return TableCellCollection; }(OfficeExtension.ClientObject)); Word.TableCellCollection=TableCellCollection; + var _typeTableBorder="TableBorder"; var TableBorder=(function (_super) { __extends(TableBorder, _super); function TableBorder() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableBorder.prototype, "_className", { get: function () { @@ -17430,11 +19453,11 @@ var Word; }); Object.defineProperty(TableBorder.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "TableBorder", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeTableBorder, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -17442,11 +19465,11 @@ var Word; }); Object.defineProperty(TableBorder.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "TableBorder", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._T, _typeTableBorder, this._isNull); + return this._T; }, set: function (value) { - this.m_type=value; + this._T=value; _createSetPropertyAction(this.context, this, "Type", value); }, enumerable: true, @@ -17454,11 +19477,11 @@ var Word; }); Object.defineProperty(TableBorder.prototype, "width", { get: function () { - _throwIfNotLoaded("width", this.m_width, "TableBorder", this._isNull); - return this.m_width; + _throwIfNotLoaded("width", this._W, _typeTableBorder, this._isNull); + return this._W; }, set: function (value) { - this.m_width=value; + this._W=value; _createSetPropertyAction(this.context, this, "Width", value); }, enumerable: true, @@ -17466,8 +19489,8 @@ var Word; }); Object.defineProperty(TableBorder.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableBorder", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableBorder, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -17476,7 +19499,7 @@ var Word; this._recursivelySet(properties, options, ["color", "type", "width"], [], []); }; TableBorder.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableBorder.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17485,21 +19508,29 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._T=obj["Type"]; } if (!_isUndefined(obj["Width"])) { - this.m_width=obj["Width"]; + this._W=obj["Width"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } }; TableBorder.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableBorder.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TableBorder.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableBorder.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; TableBorder.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -17507,7 +19538,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; TableBorder.prototype.track=function () { @@ -17519,11 +19550,15 @@ var Word; return this; }; TableBorder.prototype.toJSON=function () { - return { - "color": this.m_color, - "type": this.m_type, - "width": this.m_width - }; + return _toJson(this, { + "color": this._C, + "type": this._T, + "width": this._W, + }, {}); + }; + TableBorder.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TableBorder; }(OfficeExtension.ClientObject)); @@ -17919,9 +19954,10 @@ var Word; var RequestContext=(function (_super) { __extends(RequestContext, _super); function RequestContext(url) { - _super.call(this, url); - this.m_document=new Word.Document(this, OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(this)); - this._rootObject=this.m_document; + var _this=_super.call(this, url) || this; + _this.m_document=new Word.Document(_this, OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(_this)); + _this._rootObject=_this.m_document; + return _this; } Object.defineProperty(RequestContext.prototype, "document", { get: function () { @@ -17931,7 +19967,7 @@ var Word; configurable: true }); return RequestContext; - }(OfficeExtension.ClientRequestContext)); + }(OfficeCore.RequestContext)); Word.RequestContext=RequestContext; function run(arg1, arg2) { return OfficeExtension.ClientRequestContext._runBatch("Word.run", arguments, function () { return new Word.RequestContext(); }); @@ -17939,4 +19975,6 @@ var Word; Word.run=run; })(Word || (Word={})); +OfficeExtension.Utility._doApiNotSupportedCheck=true; + diff --git a/node_modules/@microsoft/office-js/dist/word-mac-16.00.js b/node_modules/@microsoft/office-js/dist/word-mac-16.00.js index a311281..8d2d946 100644 --- a/node_modules/@microsoft/office-js/dist/word-mac-16.00.js +++ b/node_modules/@microsoft/office-js/dist/word-mac-16.00.js @@ -1,7 +1,7 @@ /* Word Mac-specific API library */ -/* Version: 16.0.8117.3000 */ +/* Version: 16.0.8904.3000 */ -/* Office.js Version: 16.0.8118.1000 */ +/* Office.js Version: 16.0.8916.1000 */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ @@ -18,4 +18,4 @@ * @version 2.3.0 */ -var __extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},OsfMsAjaxFactory,OSF,OSFLog,Logger,OSFAriaLogger,OSFAppTelemetry,OfficeExt,OfficeExtension,Word;(function(n){var t=function(){function t(){}var n=!0;return t.prototype.isMsAjaxLoaded=function(){var t="function",i="undefined";return typeof Sys!==i&&typeof Type!==i&&Sys.StringBuilder&&typeof Sys.StringBuilder===t&&Type.registerNamespace&&typeof Type.registerNamespace===t&&Type.registerClass&&typeof Type.registerClass===t&&typeof Function._validateParams===t&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===t?n:!1},t.prototype.loadMsAjaxFull=function(n){var t=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,n)},Object.defineProperty(t.prototype,"msAjaxError",{get:function(){var n=this;return n._msAjaxError==null&&n.isMsAjaxLoaded()&&(n._msAjaxError=Error),n._msAjaxError},set:function(n){this._msAjaxError=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxString",{get:function(){var n=this;return n._msAjaxString==null&&n.isMsAjaxLoaded()&&(n._msAjaxString=String),n._msAjaxString},set:function(n){this._msAjaxString=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxDebug",{get:function(){var n=this;return n._msAjaxDebug==null&&n.isMsAjaxLoaded()&&(n._msAjaxDebug=Sys.Debug),n._msAjaxDebug},set:function(n){this._msAjaxDebug=n},enumerable:n,configurable:n}),t}();n.MicrosoftAjaxFactory=t})(OfficeExt||(OfficeExt={}));OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory;OSF=OSF||{},function(n){var t=function(){function n(n){this._internalStorage=n}return n.prototype.getItem=function(n){try{return this._internalStorage&&this._internalStorage.getItem(n)}catch(t){return null}},n.prototype.setItem=function(n,t){try{this._internalStorage&&this._internalStorage.setItem(n,t)}catch(i){}},n.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(n){}},n.prototype.removeItem=function(n){try{this._internalStorage&&this._internalStorage.removeItem(n)}catch(t){}},n.prototype.getKeysWithPrefix=function(n){var r=[],u,t,i;try{for(u=this._internalStorage&&this._internalStorage.length||0,t=0;t0?i.push(t):t.tabIndex===0&&r.push(t):r.push(t);return i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;return r===0&&(r=i.indexOf(n)-i.indexOf(t)),r}),[].concat(i,r)}var f="focus",e="on",b="configurable",k="writable",o="enumerable",s="undefined",i=!0,t=!1,c=2147483647,n=null,r=-1,l=r,d="&_xdm_Info=",g="&_serializer_version=",nt="_xdm_",ut="_serializer_version=",a="#",tt="&",h="class",v={},ft=3e4,y=n,p=n,u=(new Date).getTime();return{set_entropy:function(n){var t,r,i;if(typeof n=="string")for(t=0;t1?l[l.length-1]:n,s,h,c,a;return u&&o!=n&&(o.indexOf(tt)>=0&&(o=o.split(tt)[0]),o=decodeURIComponent(o)),s=w(),!f&&s&&(h=window.name.indexOf(i),h>r&&(c=window.name.indexOf(";",h),c==r&&(c=window.name.length),a=window.name.substring(h,c),o?s.setItem(a,o):o=s.getItem(a))),o},getConversationId:function(){var i=window.location.search,t=n,r;return i&&(r=i.indexOf("&"),t=r>0?i.substring(1,r):i.substr(1),t&&t.charAt(t.length-1)==="="&&(t=t.substring(0,t.length-1),t&&(t=decodeURIComponent(t)))),t},getInfoItems:function(n){var t=n.split("$");return typeof t[1]==s&&(t=n.split("|")),typeof t[1]==s&&(t=n.split("%7C")),t},getXdmFieldValue:function(n,t){var r="",u=OSF.OUtil.parseXdmInfo(t),i;if(u&&(i=OSF.OUtil.getInfoItems(u),i!=undefined&&i.length>=3))switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]),f;if(u)throw u;for(f in r)if(u=Function._validateParameter(n[f],r[f],f),u)throw u;},writeProfilerMark:function(n){window.msWriteProfilerMark&&(window.msWriteProfilerMark(n),OsfMsAjaxFactory.msAjaxDebug.trace(n))},outputDebug:function(n){typeof OsfMsAjaxFactory!==s&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){var e,f;r=r||{};for(e in u)f=u[e],r[f]==undefined&&(r[f]=i);return Object.defineProperty(n,t,r),n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[o])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[o])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[k,o,b])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[k,o,b])},finalizeProperties:function(n,r){var e,u;r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8,f=e&255,i[t++]=r>>2,i[t++]=(r&3)<<4|u>>4,i[t++]=(u&15)<<2|f>>6,i[t++]=f&63,isNaN(e)||(r=e>>8,u=s&255,f=s>>8,i[t++]=r>>2,i[t++]=(r&3)<<4|u>>4,i[t++]=(u&15)<<2|f>>6,i[t++]=f&63),isNaN(e)?i[t-1]=64:isNaN(s)&&(i[t-2]=64,i[t-1]=64),h=0;h0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){var u,i,f,r;if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(u=[],i=0;in)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=rt(u),o=e?u.length-1:0,u.length===0)return n;while(!h&&o>=0&&on)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=rt(u),l=y(u,e),s=v(u.length,l,o),s<0)return n;while(!c&&s>=0&&s0;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[r%16],r=Math.floor(r/16);for(;t<32;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[Math.floor(Math.random()*16)];return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];return i?(i.name||(i.name=n[this.errorCodes.ooeInternalError].name),i.message||(i.message=n[this.errorCodes.ooeInternalError].message)):i=n[this.errorCodes.ooeInternalError],i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage}}}}(),function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}(),r,i,h,u,c,l,f,a,e,v,y,p,w,b,o,k,d,g,s,nt,tt,it,rt;n.RequirementVersion=ut;r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){var f,u,e,i,r;if(n==undefined)return!1;if(t==undefined&&(t=0),f=this._setMap,u=f._sets,u.hasOwnProperty(n.toLowerCase())){e=u[n.toLowerCase()];try{if((i=this._getVersion(e),t=t+"",r=this._getVersion(t),i.major>0&&i.major>r.major)||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),i=0,r=0;if(t.length<2&&isNaN(Number(n)))throw u;else if(i=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(i)||isNaN(r))throw u;return{minor:r,major:i}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;h=function(n){function i(){n.call(this,{dialogapi:t})}return __extends(i,n),i}(i);n.DefaultDialogSetRequirement=h;u=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelClientDefaultSetRequirement=u;c=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(u);n.ExcelClientV1DefaultSetRequirement=c;l=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookClientDefaultSetRequirement=l;f=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return __extends(i,n),i}(i);n.WordClientDefaultSetRequirement=f;a=function(n){function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return __extends(i,n),i}(f);n.WordClientV1DefaultSetRequirement=a;e=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointClientDefaultSetRequirement=e;v=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(e);n.PowerpointClientV1DefaultSetRequirement=v;y=function(n){function i(){n.call(this,{selection:t,textcoercion:t})}return __extends(i,n),i}(i);n.ProjectClientDefaultSetRequirement=y;p=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return __extends(i,n),i}(i);n.ExcelWebDefaultSetRequirement=p;w=function(n){function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordWebDefaultSetRequirement=w;b=function(n){function i(){n.call(this,{activeview:t,settings:t})}return __extends(i,n),i}(i);n.PowerpointWebDefaultSetRequirement=b;o=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookWebDefaultSetRequirement=o;k=function(n){function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.SwayWebDefaultSetRequirement=k;d=function(n){function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return __extends(i,n),i}(i);n.AccessWebDefaultSetRequirement=d;g=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelIOSDefaultSetRequirement=g;s=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordIOSDefaultSetRequirement=s;nt=function(n){function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return __extends(t,n),t}(s);n.WordIOSV1DefaultSetRequirement=nt;tt=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointIOSDefaultSetRequirement=tt;it=function(n){function i(){n.call(this,{mailbox:t})}return __extends(i,n),i}(i);n.OutlookIOSDefaultSetRequirement=it;rt=function(){function n(){}var t="undefined";return n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},n.getDefaultRequirementMatrix=function(u){var f,e,s,o;return this.initializeDefaultSetMatrix(),f=undefined,e=u.get_requirementMatrix(),e!=undefined&&e.length>0&&typeof JSON!==t?(s=JSON.parse(u.get_requirementMatrix().toLowerCase()),f=new r(new i(s))):(o=n.getClientFullVersionString(u),f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[o]!=undefined?new r(n.DefaultSetArrayMatrix[o]):new r(new i({}))),f},n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix(),e;return f!=undefined&&f.length>0&&typeof JSON!==t?(e=JSON.parse(n.get_requirementMatrix().toLowerCase()),u=new r(new i(e))):u=new r(new h),u},n.getClientFullVersionString=function(n){var i=n.get_appMinorVersion(),u="",r="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;return f&&n.get_appVersion()==1?r=t==4096&&i>=15?"16.00.01":"16.00":n.get_appName()==64?r=n.get_appVersion():(u=i<10?"0"+i:""+i,r=n.get_appVersion()+"."+u),n.get_appName()+"-"+r},n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new c;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new v;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new l;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new w;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new b;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new g;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new k;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new nt;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new tt;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new it},n.Excel_RCLIENT_1600="1-16.00",n.Excel_RCLIENT_1601="1-16.01",n.Word_RCLIENT_1600="2-16.00",n.Word_RCLIENT_1601="2-16.01",n.PowerPoint_RCLIENT_1600="4-16.00",n.PowerPoint_RCLIENT_1601="4-16.01",n.Outlook_RCLIENT_1600="8-16.00",n.Excel_WAC_1600="16-16.00",n.Word_WAC_1600="32-16.00",n.Outlook_WAC_1600="64-16.00",n.Outlook_WAC_1601="64-16.01",n.Project_RCLIENT_1600="128-16.00",n.Access_WAC_1600="256-16.00",n.PowerPoint_WAC_1600="512-16.00",n.Excel_IOS_1600="1024-16.00",n.SWAY_WAC_1600="2048-16.00",n.Word_IOS_1600="4096-16.00",n.Word_IOS_16001="4096-16.00.01",n.PowerPoint_IOS_1600="8192-16.00",n.Outlook_IOS_1600="65536-16.00",n.DefaultSetArrayMatrix={},n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))}(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}return n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n},n.getInstance=function(){return n.hostObj===undefined&&(n.hostObj=new n),n.hostObj},n.prototype.getPlatform=function(){var n=this,t;return n.hostInfo.hostPlatform&&(t=n.hostInfo.hostPlatform.toLowerCase(),n.platformRemappings[t])?n.platformRemappings[t]:null},n.prototype.getHost=function(){var n=this,t;if(n.hostInfo.hostType){if(t=n.hostInfo.hostType.toLowerCase(),n.camelCaseMappings[t])return n.camelCaseMappings[t];if(t=n.capitalizeFirstLetter(n.hostInfo.hostType),Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null},n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null},n}();n.Host=t})(t=n.HostName||(n.HostName={}))}(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){n||(window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,n=!0)},disableShortcut:function(){n&&(t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window),n=!1)}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i,r,o,u,f,e;if(n&&typeof n=="string"&&(r=n.indexOf("#"),r!=-1)){o=n.substring(0,r);u=n.substring(r+1);switch(o){case"binding":case"bindings":u&&(i=new OSF.DDA.BindingPromise(u))}}if(i)return i.onFail=t,i;else if(t)if(f=typeof t,f=="function")e={},e[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(e,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext));else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f);};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this,s,e;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.auth&&OSF.OUtil.defineEnumerableProperty(f,"auth",{value:n.auth});n.get_isDialog()?(e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e})):(t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t}),r&&(s=r.displayName||"appOM",delete r.displayName,OSF.OUtil.defineEnumerableProperty(f,s,{value:r})),u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}}),e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e}))};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this,u;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;return OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext()),n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,e=n.length,o=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){var u,i,r;for(u in n){if(i=n[u],r=t[u],i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw o();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw o();}};f.extractRequiredArguments=function(t,i,r){var f,u,h,s,c,l;if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(c=n.length-1;c>=s;c--){l=n[c];switch(typeof l){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=l;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}if(f=o.fillOptions(f,i,r,u),e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;return o.verifyArguments(t,f),f}var h="function",s=n.length,o=new OSF.DDA.ApiMethodCall(n,t,i,f,e);this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),u=c(n,r,t,i);return o.constructCallArgs(r,u,t,i)};this.processResponse=function(n,t,i,f){return n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n)};this.getCallArgs=function(n){for(var t,u,r,i=n.length-1;i>=s;i--){r=n[i];switch(typeof r){case"object":t=r;break;case h:u=r}}return t=t||{},u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u),t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],i=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],t,i,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback],u,r;f&&(u={},u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?u[OSF.DDA.AsyncResultEnum.Properties.Value]=i:(r={},i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i),f(new OSF.DDA.AsyncResult(u,r)))};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.SyncMethodNames[t]=i};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){function o(n,i,r,u){var o,c,s,h;if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(s=n.length-1;s>=e;s--){h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}return o=f.fillOptions(o,i,r,u),f.verifyArguments(t,o),o}var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),u=o(n,r,t,i);return f.constructCallArgs(r,u,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){function e(i,f){var a=i?{}:undefined,s,h,o,v,c,l;for(s in i){if(h=i[s],OSF.DDA.ListType.isListType(s)){o=[];for(v in h)o.push(e(h[v],f))}else OSF.OUtil.listContainsKey(r,s)?o=r[s][f](h):f==u&&n.preserveNesting(s)?o=e(h,f):(c=t[s],c?(l=c[f],l&&(o=l[h],o===undefined&&(o=h))):o=h);a[s]=o}return a}function l(i,r){var e,u,h,s;for(u in r)h=n.isComplexType(u)?l(i,t[u][o]):i[u],h!=undefined&&(e||(e={}),s=r[u],s==f&&(s=u),e[s]=n.pack(u,h));return e}function s(i,r,e){var o,a,h,l,p,v,y;e||(e={});for(o in r){if(a=r[o],a==f)h=i;else if(a==c){e[o]=i.toArray();continue}else h=i[a];if(h===null||h===undefined)e[o]=undefined;else if(h=n.unpack(o,h),n.isComplexType(o))l=t[o][u],n.preserveNesting(o)?e[o]=s(h,l):s(h,l,e);else if(OSF.DDA.ListType.isListType(o)){l={};p=OSF.DDA.ListType.getDescriptor(o);l[p]=f;v=new Array(h.length);for(y in h)v[y]=s(h[y],l);e[o]=v}else e[o]=h}return e}function a(n,i,r){var f=t[n][r],u,o,c;return r=="toHost"?(o=e(i,r),u=l(o,f)):r==h&&(c=s(i,f),u=e(c,r)),u}var h="fromHost",i=this,o="toHost",u=h,c="sourceData",f="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];t||(t={});i.addMapping=function(n,i){var e,h,c,l,r,s,a,v;if(i.map){e=i.map;h={};for(c in e)l=e[c],l==f&&(l=c),h[l]=c}else e=i.toHost,h=i.fromHost;if(r=t[n],r){s=r[o];for(a in s)e[a]=s[a];s=r[u];for(v in s)h[v]=s[v]}else r=t[n]={};r[o]=e;r[u]=h};i.toHost=function(n,t){return a(n,t,o)};i.fromHost=function(n,t){return a(n,t,u)};i.self=f;i.sourceData=c;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){return this.isDynamicType(n)?t[n].toHost(i):i};i.unpack=function(n,i){return this.isDynamicType(n)?t[n].fromHost(i):i}};OSF.DDA.getDecoratedParameterMap=function(n,t){function r(n){var i=null,r,t;if(n)for(i={},r=n.length,t=0;t0){for(r=[],i=0;i=s)break;if(f=Function._validateParameter(n[e],o,h),f)return f.popStackFrame(),f}return t}),Function._validateParameterCount||(Function._validateParameterCount=function(n,r,u){var f,s,e=r.length,h=n.length,c,l,a;if(he)for(s=i,f=0;f0&&t.push(u)}}catch(s){}return t}var i=[],t={};t[Microsoft.Office.WebExtension.Parameters.Data]=function(){var t=0,i=1;return{toHost:function(n){if(OSF.DDA.TableDataProperties&&typeof n!="string"&&n[OSF.DDA.TableDataProperties.TableRows]!==undefined){var r=[];r[t]=n[OSF.DDA.TableDataProperties.TableRows];r[i]=n[OSF.DDA.TableDataProperties.TableHeaders];n=r}return n},fromHost:function(r){var f,e,u;return r.toArray?(e=r.dimensions(),e===2?f=n(r):(u=r.toArray(),u.length===2&&(u[0]!=null&&u[0].toArray||u[1]!=null&&u[1].toArray)?(f={},f[OSF.DDA.TableDataProperties.TableRows]=n(u[t]),f[OSF.DDA.TableDataProperties.TableHeaders]=n(u[i])):f=u)):f=r,f}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,i,t);this.unpack=function(n,i){var r,u;return this.isComplexType(n)||OSF.DDA.ListType.isListType(n)?(u=(i||typeof i=="unknown")&&i.toArray,r=u?i.toArray():i||{}):r=this.isDynamicType(n)?t[n].fromHost(i):i,r}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(n){function t(n){var i=n,f,r,u;if(OSF.OUtil.isArray(n))for(f=i.length,r=0;r2)for(u=[],o=1;o-1&&(o="&");var y=screen.width*e.width/100,p=screen.height*e.height/100,w="width="+y+", height="+p;if(f[0]=f[0].concat(o).concat(h),a=f.join(c),n.popup=window.open(a,"",w),n.popup!=undefined&&window.dialogAPIErrorCode==undefined){window.addEventListener("message",v);n.interval=window.setInterval(b,500);function k(n){r(t,[n])}n.NotifyError=k;u(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}else s=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,window.dialogAPIErrorCode&&(s=window.dialogAPIErrorCode),u(s)}},n.prototype.messageParent=function(n){var t=n[Microsoft.Office.WebExtension.Parameters.MessageToParent],i={dialogMessage:{messageType:OSF.DialogMessageType.DialogMessageReceived,messageContent:t}};window.opener.postMessage(JSON.stringify(i),window.location.origin)},n.prototype.closeDialog=function(t,i,r){n.popup?(n.interval&&window.clearInterval(n.interval),n.popup.close(),n.NotifyError=null,r(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)):r(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)},n.prototype.sendMessage=function(){},n}();n.MacRichClientHostController=t}(OfficeExt||(OfficeExt={}));OSF.ClientHostController=new OfficeExt.MacRichClientHostController,function(n){var t;(function(t){var i=function(){function n(){this._osfOfficeTheme=t;this._osfOfficeThemeTimeStamp=t}var t=null;return n.prototype.getOfficeTheme=function(){var r="GetOfficeThemeInfo",t=this,i;if(OSF.DDA._OsfControlContext){if(t._osfOfficeTheme&&t._osfOfficeThemeTimeStamp&&(new Date).getTime()-t._osfOfficeThemeTimeStamp40)&&(n=OSF.OUtil.Guid.generateNewGuid(),t.setValue(t.clientIDKey,n)),n},n.prototype.saveLog=function(n,t){var i=this,u=i.getValue(i.logIdSetKey);u=(u&&u.length>0?u+";":r)+n;i.setValue(i.logIdSetKey,u);i.setValue(n,t)},n.prototype.enumerateLog=function(n,t){var i=this,e=i.getValue(i.logIdSetKey),u,o,r,f;if(e){u=e.split(";");for(o in u)r=u[o],f=i.getValue(r),f&&(n&&n(r,f),t&&i.remove(r));t&&i.remove(i.logIdSetKey)}},n.prototype.getValue=function(n){var t=OSF.OUtil.getLocalStorage(),i=r;return t&&(i=t.getItem(n)),i},n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)},n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}},n}(),o=function(){function n(){}return n.prototype.LogData=function(n){OSF.Logger&&(OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n.SerializeRow(),OSF.Logger.SendFlag.none),OSFAriaLogger.AriaLogger.getInstance().logData(n))},n.prototype.LogRawData=function(n){if(OSF.Logger){OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n,OSF.Logger.SendFlag.none);try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(n))}catch(t){}}},n}();n.initialize=v;n.onAppActivated=y;n.onScriptDone=p;n.onCallDone=w;n.onMethodDone=b;n.onPropertyDone=k;n.onEventDone=d;n.onRegisterDone=g;n.onAppClosed=nt;n.setOsfControlAppCorrelationId=tt;n.doAppInitializationLogging=c;n.logAppCommonMessage=it;n.logAppException=rt;OSF.AppTelemetry=n}(OSFAppTelemetry||(OSFAppTelemetry={}));Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(n){var i=this,r,t,u;i._eventHandlers={};i._objectEventHandlers={};i._queuedEventsArgs={};for(r in n)t=n[r],u=t=="objectDeleted"||t=="objectSelectionChanged"||t=="objectDataChanged"||t=="contentControlAdded",u?i._objectEventHandlers[t]={}:i._eventHandlers[t]=[],i._queuedEventsArgs[t]=[]};OSF.EventDispatch.prototype={getSupportedEvents:function(){var n=[];for(var t in this._eventHandlers)n.push(t);for(t in this._objectEventHandlers)n.push(t);return n},supportsEvent:function(n){for(var t in this._eventHandlers)if(n==t)return!0;for(t in this._objectEventHandlers)if(n==t)return!0;return!1},hasEventHandler:function(n,t){var i=this._eventHandlers[n],r;if(i&&i.length>0)for(r in i)if(i[r]===t)return!0;return!1},hasObjectEventHandler:function(n,t,i){var f=this._objectEventHandlers[n],r,u;if(f!=null)for(r=f[t],u=0;r!=null&&u0)for(r=0;r0?(this._eventHandlers[n]=[],!0):!1},clearObjectEventHandlers:function(n,t){return this._objectEventHandlers[n]!=null&&this._objectEventHandlers[n][t]!=null?(this._objectEventHandlers[n][t]=[],!0):!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},getObjectEventHandlerCount:function(n,t){return this._objectEventHandlers[n]==null||this._objectEventHandlers[n][t]==null?0:this._objectEventHandlers[n][t].length},fireEvent:function(n){var t,i,r;if(n.type==undefined)return!1;if(t=n.type,t&&this._eventHandlers[t]){i=this._eventHandlers[t];for(r in i)i[r](n);return!0}else return!1},fireObjectEvent:function(n,t){var i,f,r,u;if(t.type==undefined)return!1;if(i=t.type,i&&this._objectEventHandlers[i]&&(f=this._objectEventHandlers[i],r=f[n],r!=null)){for(u=0;u0)){for(r=t[0];i.length>0;)u=i.shift(),r(u);return!0}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var f="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(n,i[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]=="outlook"||OSF._OfficeAppFactory.getHostInfo()[f]=="outlookwebapp")r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i),t.initialize(r.initialData),t.setCurrentItemNumber(r.itemNumber.itemNumber);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var i=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),t=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];t(arguments,i,n)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(n){var i=OSF.DDA.SyncMethodNames.MessageParent.displayName,t=this,r;t[i]||OSF.OUtil.defineEnumerableProperty(t,i,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return n(arguments,t)}});r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;t[r]||typeof OSF.DialogParentMessageEventDispatch=="undefined"||OSF.DDA.DispIdHost.addEventSupport(t,OSF.DialogParentMessageEventDispatch,n);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(n){n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:n[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}}],privateStateCallbacks:[],onSucceeded:function(n){var f=n[Microsoft.Office.WebExtension.Parameters.Id],i=n[Microsoft.Office.WebExtension.Parameters.Data],t=new OSF.DialogHandler,e=OSF.DDA.AsyncMethodNames.CloseAsync.displayName,r,u;return OSF.OUtil.defineEnumerableProperty(t,e,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];n(arguments,f,i,t)}}),r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName,OSF.OUtil.defineEnumerableProperty(t,r,{value:function(){var r=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],n=r.verifyAndExtractCall(arguments,t,i),u=n[Microsoft.Office.WebExtension.Parameters.EventType],f=n[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(u,f)}}),u=OSF.DDA.SyncMethodNames.SendMessage.displayName,OSF.OUtil.defineEnumerableProperty(t,u,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return n(arguments,i,t)}}),t},checkCallArgs:function(n){return n[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Width]=1),n[Microsoft.Office.WebExtension.Parameters.Width]>100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99),n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1),n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99),n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(n){try{n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,n);OSF.ClientHostController.openDialog(n.dispId,n.targetId,function(t,i){n.onEvent&&n.onEvent(i);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(n){n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,n);try{OSF.ClientHostController.closeDialog(n.dispId,n.targetId,t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.messageParent=function(n){try{n.onCalling&&n.onCalling();var i=(new Date).getTime(),t=OSF.ClientHostController.messageParent(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs((new Date).getTime()-i),t),t}catch(r){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(r)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.sendMessage=function(n){try{n.onCalling&&n.onCalling();var r=(new Date).getTime(),t=OSF.ClientHostController.sendMessage(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),t}catch(i){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(i)}};Microsoft.Office.WebExtension.FileType={Text:"text",Compressed:"compressed",Pdf:"pdf"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FileProperties:"FileProperties",FileSliceProperties:"FileSliceProperties"});OSF.DDA.FileProperties={Handle:"FileHandle",FileSize:"FileSize",SliceSize:Microsoft.Office.WebExtension.Parameters.SliceSize};OSF.DDA.File=function(n,t,i){var r,u;OSF.OUtil.defineEnumerableProperties(this,{size:{value:t},sliceCount:{value:Math.ceil(t/i)}});r={};r[OSF.DDA.FileProperties.Handle]=n;r[OSF.DDA.FileProperties.SliceSize]=i;u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.GetDocumentCopyChunkAsync,u.ReleaseDocumentCopyAsync],r)};OSF.DDA.FileSliceOffset="fileSliceoffset";OSF.DDA.AsyncMethodNames.addNames({GetDocumentCopyAsync:"getFileAsync",GetDocumentCopyChunkAsync:"getSliceAsync",ReleaseDocumentCopyAsync:"closeAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FileType,"enum":Microsoft.Office.WebExtension.FileType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:{types:["number"],defaultValue:4194304}}],checkCallArgs:function(n){var t=n[Microsoft.Office.WebExtension.Parameters.SliceSize];if(t<=0||t>4194304)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return n},onSucceeded:function(n,t,i){return new OSF.DDA.File(n[OSF.DDA.FileProperties.Handle],n[OSF.DDA.FileProperties.FileSize],i[Microsoft.Office.WebExtension.Parameters.SliceSize])}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(n,t){return t[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(r<0||r>=t.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;return n[OSF.DDA.FileSliceOffset]=parseInt((r*i[OSF.DDA.FileProperties.SliceSize]).toString()),n},onSucceeded:function(n,t,i){var r={};return OSF.OUtil.defineEnumerableProperties(r,{data:{value:OSF.OUtil.shallowCopy(n[Microsoft.Office.WebExtension.Parameters.Data])},index:{value:i[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:n[OSF.DDA.FileProperties.SliceSize]}}),r}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FileType,{Text:"text",Pdf:"pdf"});OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(n){OSF.OUtil.defineEnumerableProperties(this,{url:{value:n[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(n){return new Microsoft.Office.WebExtension.FileProperties(n)}});Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"};Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"};Microsoft.Office.WebExtension.Index={First:"first",Last:"last",Next:"next",Previous:"previous"};OSF.DDA.AsyncMethodNames.addNames({GoToByIdAsync:"goToByIdAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GoToByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string","number"]},{name:Microsoft.Office.WebExtension.Parameters.GoToType,"enum":Microsoft.Office.WebExtension.GoToType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:{"enum":Microsoft.Office.WebExtension.SelectionMode,defaultValue:Microsoft.Office.WebExtension.SelectionMode.Default}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:0},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:1},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:2},{name:Microsoft.Office.WebExtension.GoToType.Index,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:0},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:1},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:1},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileProperties.FileSize,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0},{name:OSF.DDA.FileProperties.SliceSize,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:0},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:5},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:6}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:0}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileSliceOffset,value:1},{name:OSF.DDA.FileProperties.SliceSize,value:2}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0}]});OSF.DDA.AsyncMethodNames.addNames({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync"}),function(){function r(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&r&&(r[OSF.DDA.TableDataProperties.TableRows]!=undefined||r[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(r=OSF.DDA.OMFactory.manufactureTableData(r)),r=OSF.DDA.DataCoercion.coerceData(r,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),r==undefined?null:r}var i=!1,n="boolean",t="number";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,"enum":Microsoft.Office.WebExtension.CoercionType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}}],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object",t,n]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[t,n],defaultValue:i}}],privateStateCallbacks:[]})}();OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:1},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:2},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:3},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:4},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:5}]});OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",RefreshingSettings:"refreshingSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(n){var r={},i,t;for(i in n){t=n[i];try{t=JSON?JSON.stringify(t,function(n,t){return OSF.OUtil.isDate(this[n])?OSF.DDA.SettingsManager.DateJSONPrefix+this[n].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix:t}):Sys.Serialization.JavaScriptSerializer.serialize(t);r[i]=t}catch(u){}}return r},deserializeSettings:function(n){var r={},i,t;n=n||{};for(i in n){t=n[i];try{t=JSON?JSON.parse(t,function(n,t){var i;return typeof t=="string"&&t&&t.length>6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix&&(i=new Date(parseInt(t.slice(5,-1))),i)?i:t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,!0);r[i]=t}catch(u){}}return r}};OSF.DDA.Settings=function(n){var t="name",i;n=n||{};i=function(n){var i=OSF.OUtil.getSessionStorage(),t,r;i&&(t=OSF.DDA.SettingsManager.serializeSettings(n),r=JSON?JSON.stringify(t):Sys.Serialization.JavaScriptSerializer.serialize(t),i.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),r))};OSF.OUtil.defineEnumerableProperties(this,{get:{value:function(i){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]),r;if(u)throw u;return r=n[i],typeof r=="undefined"?null:r}},set:{value:function(r,u){var f=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1},{name:"value",mayBeNull:!0}]);if(f)throw f;n[r]=u;i(n)}},remove:{value:function(r){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]);if(u)throw u;delete n[r];i(n)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],n)};OSF.DDA.RefreshableSettings=function(n){OSF.DDA.RefreshableSettings.uber.constructor.call(this,n);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],n);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:n}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(n,t){return t}}],onSucceeded:function(n,t,i){var f=n[OSF.DDA.SettingsManager.SerializedSettings],u=OSF.DDA.SettingsManager.deserializeSettings(f),e=i[OSF.DDA.SettingsManager.RefreshingSettings];for(var r in e)t.remove(r);for(r in u)t.set(r,u[r]);return t}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(n,t){return OSF.DDA.SettingsManager.serializeSettings(t)}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});Microsoft.Office.WebExtension.BindingType={Table:"table",Text:"text",Matrix:"matrix"};OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType};OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{BindingList:"BindingList"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{Subset:"subset",BindingProperties:"BindingProperties"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList,OSF.DDA.PropertyDescriptors.BindingProperties);OSF.DDA.BindingPromise=function(n,t){this._id=n;OSF.OUtil.defineEnumerableProperty(this,"onFail",{get:function(){return t},set:function(n){var i=typeof n;if(i!="undefined"&&i!="function")throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,i);t=n}})};OSF.DDA.BindingPromise.prototype={_fetch:function(n){var t=this,i;return t.binding?n&&n(t.binding):t._binding||(i=t,Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(t._id,function(t){t.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded?(OSF.OUtil.defineEnumerableProperty(i,"binding",{value:t.value}),n&&n(i.binding)):i.onFail&&i.onFail(t)})),t},getDataAsync:function(){var n=arguments;return this._fetch(function(t){t.getDataAsync.apply(t,n)}),this},setDataAsync:function(){var n=arguments;return this._fetch(function(t){t.setDataAsync.apply(t,n)}),this},addHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.addHandlerAsync.apply(t,n)}),this},removeHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.removeHandlerAsync.apply(t,n)}),this}};OSF.DDA.BindingFacade=function(n){this._eventDispatches=[];OSF.OUtil.defineEnumerableProperty(this,"document",{value:n});var t=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[t.AddFromSelectionAsync,t.AddFromNamedItemAsync,t.GetAllAsync,t.GetByIdAsync,t.ReleaseByIdAsync])};OSF.DDA.UnknownBinding=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}})};OSF.DDA.Binding=function(n,t){var r,u,i,f;OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}});r=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[r.GetDataAsync,r.SetDataAsync]);u=Microsoft.Office.WebExtension.EventType;i=t.bindings._eventDispatches;i[n]||(i[n]=new OSF.EventDispatch([u.BindingSelectionChanged,u.BindingDataChanged]));f=i[n];OSF.DDA.DispIdHost.addEventSupport(this,f)};OSF.DDA.generateBindingId=function(){return"UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+(new Date).getTime()};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureBinding=function(n,t){var r=n[OSF.DDA.BindingProperties.Id],u=n[OSF.DDA.BindingProperties.RowCount],f=n[OSF.DDA.BindingProperties.ColumnCount],s=n[OSF.DDA.BindingProperties.HasHeaders],i,e,o;switch(n[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:i=new OSF.DDA.TextBinding(r,t);break;case Microsoft.Office.WebExtension.BindingType.Matrix:i=new OSF.DDA.MatrixBinding(r,t,u,f);break;case Microsoft.Office.WebExtension.BindingType.Table:e=function(){return OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument};o=e()&&OSF.DDA.ExcelTableBinding?OSF.DDA.ExcelTableBinding:OSF.DDA.TableBinding;i=new o(r,t,u,f,s);break;default:i=new OSF.DDA.UnknownBinding(r,t)}return i};OSF.DDA.AsyncMethodNames.addNames({AddFromSelectionAsync:"addFromSelectionAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:"getByIdAsync",ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync"}),function(){function u(n){return OSF.DDA.OMFactory.manufactureBinding(n,Microsoft.Office.WebExtension.context.document)}function f(n){return n.id}function e(n,t,i){var u=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&u&&(u[OSF.DDA.TableDataProperties.TableRows]!=undefined||u[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(u=OSF.DDA.OMFactory.manufactureTableData(u)),u=OSF.DDA.DataCoercion.coerceData(u,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),u==undefined?r:u}var t="number",i="object",n="string",r=null;OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:[n]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return!0}}],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.BindingList],u)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n,t,i){var r=i[Microsoft.Office.WebExtension.Parameters.Id];delete t._eventDispatches[r]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n,t){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&n[Microsoft.Office.WebExtension.Parameters.RowCount]==0&&n[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn],delete n[Microsoft.Office.WebExtension.Parameters.RowCount],delete n[Microsoft.Office.WebExtension.Parameters.ColumnCount]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]||n[Microsoft.Office.WebExtension.Parameters.RowCount]||n[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[n,i,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}]})}();OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.MatrixBinding=function(n,t,i,r){OSF.DDA.MatrixBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Matrix},rowCount:{value:i?i:0},columnCount:{value:r?r:0}})};OSF.OUtil.extend(OSF.DDA.MatrixBinding,OSF.DDA.Binding);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.BindingProperties,fromHost:[{name:OSF.DDA.BindingProperties.Id,value:0},{name:OSF.DDA.BindingProperties.Type,value:1},{name:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,value:2}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.BindingType,toHost:[{name:Microsoft.Office.WebExtension.BindingType.Text,value:0},{name:Microsoft.Office.WebExtension.BindingType.Matrix,value:1},{name:Microsoft.Office.WebExtension.BindingType.Table,value:2}],invertible:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,value:0},{name:Microsoft.Office.WebExtension.Parameters.Id,value:1},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:2},{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseBindingMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAllBindingsMethod,fromHost:[{name:OSF.DDA.ListDescriptors.BindingList,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:2},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:3},{name:OSF.DDA.PropertyDescriptors.Subset,value:4}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.Data,value:2},{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,fromHost:[{name:OSF.DDA.BindingProperties.RowCount,value:0},{name:OSF.DDA.BindingProperties.ColumnCount,value:1},{name:OSF.DDA.BindingProperties.HasHeaders,value:2}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.Subset,toHost:[{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:0},{name:OSF.DDA.SafeArray.UniqueArguments.Run,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Offset,toHost:[{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:0},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Run,toHost:[{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:0},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddColumnsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearAllRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});Microsoft.Office.WebExtension.TableData=function(n,t){function i(n){if(n==null||n==undefined)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(n,2);t<2;t++)n=[n];return n}catch(i){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(n){t=i(n)}},rows:{get:function(){return n},set:function(t){n=t==null||OSF.OUtil.isArray(t)&&t.length==0?[]:i(t)}}});this.headers=t;this.rows=n};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(n){return new Microsoft.Office.WebExtension.TableData(n[OSF.DDA.TableDataProperties.TableRows],n[OSF.DDA.TableDataProperties.TableHeaders])};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{TableDataProperties:"TableDataProperties"});OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};OSF.DDA.TableBinding=function(n,t,i,r,u){OSF.DDA.TableBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:i?i:0},columnCount:{value:r?r:0},hasHeaders:{value:u?u:!1}});var f=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[f.AddRowsAsync,f.AddColumnsAsync,f.DeleteAllDataValuesAsync])};OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync"}),function(){function n(n){return n.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]})}();OSF.DDA.TextBinding=function(n,t){OSF.DDA.TextBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperty(this,"type",{value:Microsoft.Office.WebExtension.BindingType.Text})};OSF.OUtil.extend(OSF.DDA.TextBinding,OSF.DDA.Binding);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"});OSF.DDA.DocumentSelectionChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:n}})};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDeleted:"objectDeleted"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectSelectionChanged:"objectSelectionChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDataChanged:"objectDataChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ContentControlAdded:"contentControlAdded"});OSF.DDA.ObjectEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:n},object:{value:t}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDeletedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDataChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidContentControlAddedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{BindingSelectionChanged:"bindingSelectionChanged",BindingDataChanged:"bindingDataChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{BindingSelectionChangedEvent:"BindingSelectionChangedEvent"});OSF.DDA.BindingSelectionChangedEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingSelectionChanged},binding:{value:n}});for(var i in t)OSF.OUtil.defineEnumerableProperty(this,i,{value:t[i]})};OSF.DDA.BindingDataChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingDataChanged},binding:{value:n}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:0},{name:OSF.DDA.PropertyDescriptors.Subset,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingDataChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var n=null;return{findArrayDimensionality:function(n){if(OSF.OUtil.isArray(n)){for(var t=0,i=0;i0},enumerable:!0,configurable:!0}),t.prototype.addTrace=function(n,t){this.m_traceInfos[n]=t},t.prototype.addReferencedObjectPath=function(t){if(!this.m_referencedObjectPaths[t.objectPathInfo.Id]){if(!t.isValid)throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidObjectPath,message:n.Utility._getResourceString(n.ResourceStrings.invalidObjectPath,n.Utility.getObjectPathExpression(t)),debugInfo:{errorLocation:n.Utility.getObjectPathExpression(t)}});while(t)t.isWriteOperation&&(this.m_flags=this.m_flags|1),this.m_referencedObjectPaths[t.objectPathInfo.Id]=t,t.objectPathInfo.ObjectPathType==3&&this.addReferencedObjectPaths(t.argumentObjectPaths),t=t.parentObjectPath}},t.prototype.addReferencedObjectPaths=function(n){if(n)for(var t=0;t0&&(typeof r[0]=="string"||i.isRequestUrlAndHeaderInfo(r[0])||i.isRequestUrlAndHeaderInfoResolver(r[0]))&&(y=r[0],h=1),r.length==h+1)a=u,v=r[h+0];else if(r.length==h+2){if(r[h+0]instanceof n.ClientObject)a=function(){return r[h+0].context};else if(Array.isArray(r[h+0])){if(c=r[h+0],c.length==0)return i.createErrorPromise(t);for(l=0;l0){var n=c._onRunFinishedNotifiers.shift();n()}if(a)return l;else throw l;})},i.prototype._nextId=function(){return++this.m_nextId},i}();n.ClientRequestContext=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_type=n}return Object.defineProperty(t.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){(this.m_isLoaded=!0,typeof t=="object"&&t&&t._IsNull)||(this.m_value=this.m_type===1?n.Utility.adjustToDateTime(t):t)},t}();n.ClientResult=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.flags="flags",n.getItemAt="GetItemAt",n.id="Id",n.idPrivate="_Id",n.index="_Index",n.items="_Items",n.iterativeExecutor="IterativeExecutor",n.localDocument="http://document.localhost/",n.localDocumentApiPrefix="http://document.localhost/_api/",n.processQuery="ProcessQuery",n.referenceId="_ReferenceId",n.isTracked="_IsTracked",n.sourceLibHeader="SdkVersion",n.embeddingPageOrigin="EmbeddingPageOrigin",n.embeddingPageSessionInfo="EmbeddingPageSessionInfo",n}();n.Constants=t}(OfficeExtension||(OfficeExtension={})),function(n){var u=1,r={invokeRequestModifier:function(n){return n.DdaMethod.Version=u,n},invokeResponseModifier:function(n){return u=n.Version,n.Error&&(n.error={},n.error.Code=n.Error),n}},i,t,f,e;(function(n){n[n.Success=0]="Success";n[n.Timeout=1]="Timeout";n[n.InternalError=5001]="InternalError"})(i||(i={})),function(n){n.SendingId="sId";n.RespondingId="rId";n.CommandKey="command";n.SessionInfoKey="sessionInfo";n.ParamsKey="params";n.ApiReadyCommand="apiready";n.ExecuteMethodCommand="executeMethod";n.GetAppContextCommand="getAppContext";n.RegisterEventCommand="registerEvent";n.UnregisterEventCommand="unregisterEvent";n.FireEventCommand="fireEvent"}(t||(t={}));f=function(u){function f(n,t){u.call(this);this.m_chosenWindow=null;this.m_chosenOrigin=null;this.m_enabled=!0;this.m_onMessageHandler=this._onMessage.bind(this);this.m_callbackList={};this.m_id=0;this.m_timeoutId=-1;this.m_appContext=null;this.m_url=n;this.m_options=t;this.m_options||(this.m_options={sessionKey:Math.random().toString()});this.m_options.sessionKey||(this.m_options.sessionKey=Math.random().toString());this.m_options.container||(this.m_options.container=document.body);this.m_options.timeoutInMilliseconds||(this.m_options.timeoutInMilliseconds=6e4);this.m_options.height||(this.m_options.height="400px");this.m_options.width||(this.m_options.width="100%")}return __extends(f,u),f.prototype._getIFrameSrc=function(){var u=window.location.protocol+"//"+window.location.host,i=n.Constants.embeddingPageOrigin+"="+encodeURIComponent(u)+"&"+n.Constants.embeddingPageSessionInfo+"="+encodeURIComponent(this.m_options.sessionKey),r=!1,t;return this.m_url.toLowerCase().indexOf("/_layouts/preauth.aspx")>0&&(r=!0),t=document.createElement("a"),t.href=this.m_url,r?t.hash=t.hash.length===0||t.hash==="#"?"#"+i:t.hash+"&"+i:t.search=t.search.length===0||t.search==="?"?"?"+i:t.search+"&"+i,t.href},f.prototype.init=function(){var t=this,i;return window.addEventListener("message",this.m_onMessageHandler),i=this._getIFrameSrc(),new n._Internal.OfficePromise(function(r,u){var f=document.createElement("iframe");t.m_options.id&&(f.id=t.m_options.id);f.style.height=t.m_options.height;f.style.width=t.m_options.width;f.src=i;t.m_options.container.appendChild(f);t.m_timeoutId=setTimeout(function(){t.close();var i=n.Utility.createRuntimeError(n.ErrorCodes.timeout,n.Utility._getResourceString(n.ResourceStrings.timeout),"EmbeddedSession.init");u(i)},t.m_options.timeoutInMilliseconds);t.m_promiseResolver=r})},f.prototype._invoke=function(n,t,u){if(!this.m_enabled){t(i.InternalError,null);return}r.invokeRequestModifier&&(u=r.invokeRequestModifier(u));this._sendMessageWithCallback(this.m_id++,n,u,function(n){r.invokeResponseModifier&&(n=r.invokeResponseModifier(n));var u=n.Error;delete n.Error;t(u||i.Success,n)})},f.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler);window.clearTimeout(this.m_timeoutId);this.m_enabled=!1},Object.defineProperty(f.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),f.prototype._createRequestExecutorOrNull=function(){return new e(this)},f.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},f.prototype._registerEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.RegisterEventCommand,{EventId:i,TargetId:r},function(){n(null)})})},f.prototype._unregisterEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.UnregisterEventCommand,{EventId:i,TargetId:r},function(){n()})})},f.prototype._onMessage=function(n){var u=this,i,e,r,o,s;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===n.source&&this.m_chosenOrigin===n.origin)){if(i=n.data,i&&i[t.CommandKey]===t.ApiReadyCommand){!this.m_chosenWindow&&this._isValidDescendant(n.source)&&i[t.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=n.source,this.m_chosenOrigin=n.origin,this._sendMessageWithCallback(this.m_id++,t.GetAppContextCommand,null,function(n){u._setupContext(n);window.clearTimeout(u.m_timeoutId);u.m_promiseResolver()}));return}if(i&&i[t.CommandKey]===t.FireEventCommand){var f=i[t.ParamsKey],h=f.EventId,c=f.TargetId,l=f.Data;if(this.m_sessionEventManager)for(e=this.m_sessionEventManager.getHandlers(h,c),r=0;r=0;o--)if(r[o]===e[i].handler){r.splice(o,1);break}break;case 2:r=[];break}}return s&&(!this.m_registered&&r.length>0?u=u.then(function(){return f.m_eventInfo.registerFunc(f.m_callback)}).then(function(){return f.m_registered=!0}):this.m_registered&&r.length==0&&(u=u.then(function(){return f.m_eventInfo.unregisterFunc(f.m_callback)}).catch(function(t){n.Utility.log("Error when unregister event: "+JSON.stringify(t))}).then(function(){return f.m_registered=!1})),u=u.then(function(){return f.m_handlers=r})),u},t.prototype.fireEvent=function(t){for(var u,f,r=[],i=0;i=0;e--)if(f[e]===u){f.splice(e,1);break}return f.length===0?this.m_unregisterEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i}();n.EventRegistration=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var s=JSON.stringify(u.Body),f=u.Url,e,o;if(f.charAt(f.length-1)!="/"&&(f=f+"/"),f=f+n.Constants.processQuery,f=f+"?"+n.Constants.flags+"="+r.toString(),e={method:"POST",url:f,headers:{},body:s},e.headers[n.Constants.sourceLibHeader]=t.SourceLibHeaderValue,e.headers["CONTENT-TYPE"]="application/json",u.Headers)for(o in u.Headers)e.headers[o]=u.Headers[o];return n.HttpUtility.sendRequest(e).then(function(t){var i,r;return t.statusCode===200?i={ErrorCode:null,ErrorMessage:null,Headers:t.headers,Body:JSON.parse(t.body)}:(n.Utility.log("Error Response:"+t.body),r=n.Utility._parseErrorResponse(t),i={ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:t.headers,Body:null}),i})},t.SourceLibHeaderValue="officejs-rest",t}();n.HttpRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){n.OfficeRequire=function(){return typeof require!="undefined"?require:null}()})(t=n._Internal||(n._Internal={}));i=function(){function i(){}return i.setCustomSendRequestFunc=function(n){i.s_customSendRequestFunc=n},i.xhrSendRequestFunc=function(i){return new t.OfficePromise(function(r,u){var f=new XMLHttpRequest,e;if(f.open(i.method,i.url),f.onload=function(){var t={statusCode:f.status,headers:n.Utility._parseHttpResponseHeaders(f.getAllResponseHeaders()),body:f.responseText};r(t)},f.onerror=function(){u(new t.RuntimeError({code:n.ErrorCodes.connectionFailure,message:n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,f.statusText)}))},i.headers)for(e in i.headers)f.setRequestHeader(e,i.headers[e]);f.send(i.body)})},i.nodejsRequestModuleSendRequestFunc=function(n){i.logRequest(n);var r=t.OfficeRequire(i.NodeJsRequestModuleName);return r(n.url,{method:n.method,headers:n.headers,body:n.body}).then(function(n){return n.text().then(function(t){var f=n.status,u={},r;return n.headers.forEach(function(n,t){u[t]=n}),r={statusCode:f,headers:u,body:t},i.logResponse(r),r})})},i.sendRequest=function(n){i.validateAndNormalizeRequest(n);var t=i.s_customSendRequestFunc;return t||(t=typeof window=="undefined"||typeof XMLHttpRequest=="undefined"?i.nodejsRequestModuleSendRequestFunc:i.xhrSendRequestFunc),t(n)},i.setCustomSendLocalDocumentRequestFunc=function(n){i.s_customSendLocalDocumentRequestFunc=n},i.sendLocalDocumentRequest=function(n){i.validateAndNormalizeRequest(n);var t;return t=i.s_customSendLocalDocumentRequestFunc||i.officeJsSendLocalDocumentRequestFunc,t(n)},i.officeJsSendLocalDocumentRequestFunc=function(i){i=n.Utility._validateLocalDocumentRequest(i);var r=n.Utility._buildRequestMessageSafeArray(i);return new t.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(r,function(i){var r;r=i.status=="succeeded"?{statusCode:n.RichApiMessageUtility.getResponseStatusCode(i),headers:n.RichApiMessageUtility.getResponseHeaders(i),body:n.RichApiMessageUtility.getResponseBody(i)}:n.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(i.error.code,i.error.message);n.Utility.log(JSON.stringify(r));t(r)})})},i.validateAndNormalizeRequest=function(i){if(n.Utility.isNullOrUndefined(i))throw t.RuntimeError._createInvalidArgError({argumentName:"request"});n.Utility.isNullOrEmptyString(i.method)&&(i.method="GET");i.method=i.method.toUpperCase()},i.logRequest=function(t){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Request---"),n.Utility.log(t.method+" "+t.url),t.headers)for(var r in t.headers)n.Utility.log(r+": "+t.headers[r]);i._logBody&&n.Utility.log(t.body)}},i.logResponse=function(t){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Response---"),n.Utility.log(""+t.statusCode),t.headers)for(var r in t.headers)n.Utility.log(r+": "+t.headers[r]);i._logBody&&n.Utility.log(t.body)}},i.NodeJsRequestModuleName="node-fetch",i._logBody=!1,i}();n.HttpUtility=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_clientObject=n}return n.prototype._handleResult=function(n){this.m_clientObject._handleIdResult(n)},n}();n.InstantiateActionResultHandler=t}(OfficeExtension||(OfficeExtension={})),function(n){}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){this.m_objectPathInfo=n;this.m_parentObjectPath=t;this.m_isWriteOperation=!1;this.m_isCollection=i;this.m_isInvalidAfterRequest=r;this.m_isValid=!0}return Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},set:function(n){this.m_isWriteOperation=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(n){this.m_argumentObjectPaths=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(n){this.m_isValid=n;!n&&this.m_objectPathInfo.ObjectPathType===6&&this.m_savedObjectPathInfo&&(t.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(n){this.m_getByIdMethodName=n},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null},t.prototype.updateUsingObjectData=function(i){var o=i[n.Constants.referenceId],u,f,e,r;if(!n.Utility.isNullOrEmptyString(o)){this.m_savedObjectPathInfo||this.isInvalidAfterRequest||!t.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)||(u={},t.copyObjectPathInfo(this.m_objectPathInfo,u),this.m_savedObjectPathInfo={pathInfo:u,parent:this.m_parentObjectPath});this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=o;this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null;return}if(f=this.parentObjectPath&&this.parentObjectPath.isCollection,e=this.getByIdMethodName,(f||!n.Utility.isNullOrEmptyString(e))&&(r=i[n.Constants.id],n.Utility.isNullOrUndefined(r)&&(r=i[n.Constants.idPrivate]),!n.Utility.isNullOrUndefined(r))){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;f?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=e,this.m_getByIdMethodName=null);this.isWriteOperation=!1;this.m_objectPathInfo.ArgumentInfo={};this.m_objectPathInfo.ArgumentInfo.Arguments=[r];this.m_argumentObjectPaths=null;return}},t.isRestorableObjectPath=function(n){return n===1||n===5||n===3||n===4},t.copyObjectPathInfo=function(n,t){t.Id=n.Id;t.ArgumentInfo=n.ArgumentInfo;t.Name=n.Name;t.ObjectPathType=n.ObjectPathType;t.ParentObjectPathId=n.ParentObjectPathId},t}();n.ObjectPath=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createGlobalObjectObjectPath=function(t){var i={Id:t._nextId(),ObjectPathType:1,Name:""};return new n.ObjectPath(i,null,!1,!1)},t.createNewObjectObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:2,Name:i};return new n.ObjectPath(u,null,r,!1)},t.createPropertyObjectPath=function(t,i,r,u,f){var e={Id:t._nextId(),ObjectPathType:4,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id};return new n.ObjectPath(e,i._objectPath,u,f)},t.createIndexerObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i._objectPath,!1,!1)},t.createIndexerObjectPathUsingParentPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i,!1,!1)},t.createMethodObjectPath=function(t,i,r,u,f,e,o,s){var c={Id:t._nextId(),ObjectPathType:3,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},l=n.Utility.setMethodArguments(t,c.ArgumentInfo,f),h=new n.ObjectPath(c,i._objectPath,e,o);return h.argumentObjectPaths=l,h.isWriteOperation=u!=1,h.getByIdMethodName=s,h},t.createReferenceIdObjectPath=function(t,i){var r={Id:t._nextId(),ObjectPathType:6,Name:i,ArgumentInfo:{}};return new n.ObjectPath(r,null,!1,!1)},t.createChildItemObjectPathUsingIndexerOrGetItemAt=function(i,r,u,f,e){var o=f[n.Constants.id];return n.Utility.isNullOrUndefined(o)&&(o=f[n.Constants.idPrivate]),i&&!n.Utility.isNullOrUndefined(o)?t.createChildItemObjectPathUsingIndexer(r,u,f):t.createChildItemObjectPathUsingGetItemAt(r,u,f,e)},t.createChildItemObjectPathUsingIndexer=function(t,i,r){var f=r[n.Constants.id],u;return n.Utility.isNullOrUndefined(f)&&(f=r[n.Constants.idPrivate]),u=u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u.ArgumentInfo.Arguments=[f],new n.ObjectPath(u,i._objectPath,!1,!1)},t.createChildItemObjectPathUsingGetItemAt=function(t,i,r,u){var e=r[n.Constants.index],f;return e&&(u=e),f={Id:t._nextId(),ObjectPathType:3,Name:n.Constants.getItemAt,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f.ArgumentInfo.Arguments=[u],new n.ObjectPath(f,i._objectPath,!1,!1)},t}();n.ObjectPathFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var f=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n._Internal.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(f,function(i){n.Utility.log("Response:");n.Utility.log(JSON.stringify(i));var r;r=i.status=="succeeded"?n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBody(i),n.RichApiMessageUtility.getResponseHeaders(i)):n.RichApiMessageUtility.buildResponseOnError(i.error.code,i.error.message);t(r)})})},t.SourceLibHeaderValue="officejs",t}();n.OfficeJsRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){var t;(function(t){function i(){return function(){"use strict";function wt(n){return typeof n=="function"||typeof n=="object"&&n!==null}function b(n){return typeof n=="function"}function bt(n){return typeof n=="object"&&n!==null}function kt(n){k=n}function dt(n){f=n}function ti(){var t=process.nextTick,n=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&n[1]==="0"&&n[2]==="10"&&(t=setImmediate),function(){t(c)}}function ii(){return function(){tt(c)}}function ri(){var n=0,i=new ut(c),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function ui(){var n=new MessageChannel;return n.port1.onmessage=c,function(){n.port2.postMessage(0)}}function ft(){return function(){setTimeout(c,1)}}function c(){for(var t,i,n=0;n=0?(n=n.substring(t+5,n.length),n<"14.14393"?!0:!1):!1}function i(){return typeof window=="undefined"&&typeof Promise=="function"?Promise:typeof window!="undefined"&&window.Promise?t()?n.PromiseImpl.Init():window.Promise:n.PromiseImpl.Init()}n.OfficePromise=i()}(t=n._Internal||(n._Internal={}));i=t.OfficePromise;n.Promise=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this._autoCleanupList={};this.m_context=n}return t.prototype.add=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._addCommon(n,!0)}):this._addCommon(n,!0)},t.prototype._autoAdd=function(n){this._addCommon(n,!1);this._autoCleanupList[n._objectPath.objectPathInfo.Id]=n},t.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(t,i){var r=this.m_context._autoCleanup&&!t[n.Constants.isTracked]&&t!==this.m_context._rootObject&&i&&!n.Utility.isNullOrEmptyString(i[n.Constants.referenceId]);r&&(this._autoCleanupList[t._objectPath.objectPathInfo.Id]=t,t[n.Constants.isTracked]=!0)},t.prototype._addCommon=function(t,i){if(t[n.Constants.isTracked]){i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id];return}var r=t[n.Constants.referenceId];n.Utility.isNullOrEmptyString(r)&&t._KeepReference&&(t._KeepReference(),n.ActionFactory.createInstantiateAction(this.m_context,t),i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id],t[n.Constants.isTracked]=!0)},t.prototype.remove=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._removeCommon(n)}):this._removeCommon(n)},t.prototype._removeCommon=function(t){var r=t[n.Constants.referenceId],i;n.Utility.isNullOrEmptyString(r)||(i=this.m_context._rootObject,i._RemoveReference&&i._RemoveReference(r),delete t[n.Constants.isTracked])},t.prototype._retrieveAndClearAutoCleanupList=function(){var n=this._autoCleanupList;return this._autoCleanupList={},n},t}();n.TrackedObjects=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.cannotRegisterEvent="CannotRegisterEvent",n.connectionFailureWithStatus="ConnectionFailureWithStatus",n.connectionFailureWithDetails="ConnectionFailureWithDetails",n.invalidObjectPath="InvalidObjectPath",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.invalidArgumentGeneric="InvalidArgumentGeneric",n.propertyNotLoaded="PropertyNotLoaded",n.runMustReturnPromise="RunMustReturnPromise",n.timeout="Timeout",n.propertyDoesNotExist="PropertyDoesNotExist",n.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",n.moreInfoInnerError="MoreInfoInnerError",n.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",n.valueNotLoaded="ValueNotLoaded",n.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage",n}();n.ResourceStrings=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.CannotRegisterEvent="The event handler cannot be registered.",n.ConnectionFailureWithStatus="The request failed with status code of {0}.",n.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}",n.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",n.InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',n.InvalidRequestContext="Cannot use the object across different request contexts.",n.PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",n.RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',n.Timeout="The operation has timed out.",n.ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.',n.invalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.",n}();n.ResourceStringValues=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.buildMessageArrayForIRequestExecutor=function(i,r,u,f){var o=JSON.stringify(u.Body),e;return n.Utility.log("Request:"),n.Utility.log(o),e={},e[n.Constants.sourceLibHeader]=f,t.buildRequestMessageSafeArray(i,r,"POST","ProcessQuery",e,o)},t.buildResponseOnSuccess=function(n,t){var i={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return i.Body=JSON.parse(n),i.Headers=t,i},t.buildResponseOnError=function(i,r){var u={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return u.ErrorCode=n.ErrorCodes.generalException,u.ErrorMessage=r,i==t.OfficeJsErrorCode_ooeNoCapability?u.ErrorCode=n.ErrorCodes.accessDenied:i==t.OfficeJsErrorCode_ooeActivityLimitReached?u.ErrorCode=n.ErrorCodes.activityLimitReached:i==t.OfficeJsErrorCode_ooeInvalidOrTimedOutSession&&(u.ErrorCode=n.ErrorCodes.invalidOrTimedOutSession,u.ErrorMessage=n.Utility._getResourceString(n.ResourceStrings.invalidOrTimedOutSessionMessage)),u},t.buildHttpResponseFromOfficeJsError=function(i,r){var f=500,u={};return u.error={},u.error.code=n.ErrorCodes.generalException,u.error.message=r,i===t.OfficeJsErrorCode_ooeNoCapability?(f=403,u.error.code=n.ErrorCodes.accessDenied):i===t.OfficeJsErrorCode_ooeActivityLimitReached&&(f=429,u.error.code=n.ErrorCodes.activityLimitReached),{statusCode:f,headers:{},body:JSON.stringify(u)}},t.buildRequestMessageSafeArray=function(n,t,i,r,u,f){var e=[],o;if(u)for(o in u)e.push(o),e.push(u[o]);var s=0,h="",c="",l="";return[n,i,r,e,f,s,t,h,c,l]},t.getResponseBody=function(n){return t.getResponseBodyFromSafeArray(n.value.data)},t.getResponseHeaders=function(n){return t.getResponseHeadersFromSafeArray(n.value.data)},t.getResponseBodyFromSafeArray=function(n){var t=n[2],i;return typeof t=="string"?t:(i=t,i.join(""))},t.getResponseHeadersFromSafeArray=function(n){var i=n[1],r,t;if(!i)return null;for(r={},t=0;t0&&f.push(i);return f},t.throwError=function(i,r,u){throw new n._Internal.RuntimeError({code:i,message:t._getResourceString(i,r),debugInfo:u?{errorLocation:u}:undefined});},t.createRuntimeError=function(t,i,r){return new n._Internal.RuntimeError({code:t,message:i,debugInfo:{errorLocation:r}})},t._getResourceString=function(i,r){var u,e,f,o;return typeof window!="undefined"&&window.Strings&&window.Strings.OfficeOM&&(e="L_"+i,f=window.Strings.OfficeOM[e],f&&(u=f)),u||(u=n.ResourceStringValues[i]),u||(u=i),t.isNullOrUndefined(r)||(Array.isArray(r)?(o=r,u=t._formatString(u,o)):u=u.replace("{0}",r)),u},t._formatString=function(t,i){return t.replace(/\{\d\}/g,function(t){var r=parseInt(t.substr(1,t.length-2));if(r0?".":"")+i;break;case 3:i=t.normalizeName(n.objectPathInfo.Name)+"()"+(i.length>0?".":"")+i;break;case 4:i=t.normalizeName(n.objectPathInfo.Name)+(i.length>0?".":"")+i;break;case 5:i="getItem()"+(i.length>0?".":"")+i;break;case 6:i="_reference()"+(i.length>0?".":"")+i;break}n=n.parentObjectPath}return i},t._createPromiseFromResult=function(t){return new n._Internal.OfficePromise(function(n,i){n(t)})},t._createTimeoutPromise=function(t){return new n._Internal.OfficePromise(function(n,i){setTimeout(function(){n(null)},t)})},t.promisify=function(t){return new n._Internal.OfficePromise(function(n,i){var r=function(t){t.status=="failed"?i(t.error):n(t.value)};t(r)})},t._addActionResultHandler=function(n,t,i){n.context._pendingRequest.addActionResultHandler(t,i)},t._handleNavigationPropertyResults=function(n,i,r){for(var u=0;u0},t._getLocalDocumentUrlPrefixLength=function(n){for(var i=["http://document.localhost","https://document.localhost","//document.localhost"],r=n.toLowerCase().trim(),t=0;t0))for(s=i.url.substr(f+1),e=s.split("&"),u=0;u0&&(f=i.substr(0,u),e=i.substr(u+1),f=t.trim(f),e=t.trim(e),s[f.toUpperCase()]=e));return s},t._parseErrorResponse=function(i){var r=null,f,e,u;if(!t.isNullOrEmptyString(i.body)){f=t.trim(i.body);try{r=JSON.parse(f)}catch(o){t.log("Error when parse "+f)}}return!t.isNullOrUndefined(r)&&typeof r=="object"&&r.error?(u=r.error.code,e=t._getResourceString(n.ResourceStrings.connectionFailureWithDetails,[i.statusCode.toString(),r.error.code,r.error.message])):e=t._getResourceString(n.ResourceStrings.connectionFailureWithStatus,i.statusCode.toString()),t.isNullOrEmptyString(u)&&(u=n.ErrorCodes.connectionFailure),{errorCode:u,errorMessage:e}},t._copyHeaders=function(n,t){if(n&&t)for(var i in n)t[i]=n[i]},t._logEnabled=!1,t._synchronousCleanup=!1,t.s_underscoreCharCode="_".charCodeAt(0),t}();n.Utility=t}(OfficeExtension||(OfficeExtension={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){function y(t,i){var u,r;if(OfficeExtension.Utility.isNullOrUndefined(i))return null;if(typeof i!="object"&&OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument,"searchOptions"),i instanceof n.SearchOptions)return i;u=n.SearchOptions.newObject(t);for(r in i)i.hasOwnProperty(r)&&(u[r]=i[r]);return u}var e=OfficeExtension.ObjectPathFactory.createPropertyObjectPath,r=OfficeExtension.ObjectPathFactory.createMethodObjectPath,a=OfficeExtension.ObjectPathFactory.createIndexerObjectPath,ni=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath,rr=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer,ur=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt,v=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt,f=OfficeExtension.ActionFactory.createMethodAction,u=OfficeExtension.ActionFactory.createSetPropertyAction,o=OfficeExtension.Utility.isNullOrUndefined,t=OfficeExtension.Utility.isUndefined,i=OfficeExtension.Utility.throwIfNotLoaded,s=OfficeExtension.Utility.load,h=OfficeExtension.Utility.fixObjectPathIfNecessary,c=OfficeExtension.Utility._addActionResultHandler,l=OfficeExtension.Utility._handleNavigationPropertyResults,p=OfficeExtension.Utility.adjustToDateTime,ti=function(a){function v(){a.apply(this,arguments)}return __extends(v,a),Object.defineProperty(v.prototype,"_className",{get:function(){return"Body"},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"contentControls",{get:function(){return this.m_contentControls||(this.m_contentControls=new n.ContentControlCollection(this.context,e(this.context,this,"ContentControls",!0,!1))),this.m_contentControls},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"font",{get:function(){return this.m_font||(this.m_font=new n.Font(this.context,e(this.context,this,"Font",!1,!1))),this.m_font},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"inlinePictures",{get:function(){return this.m_inlinePictures||(this.m_inlinePictures=new n.InlinePictureCollection(this.context,e(this.context,this,"InlinePictures",!0,!1))),this.m_inlinePictures},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"lists",{get:function(){return this.m_lists||(this.m_lists=new n.ListCollection(this.context,e(this.context,this,"Lists",!0,!1))),this.m_lists},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"paragraphs",{get:function(){return this.m_paragraphs||(this.m_paragraphs=new n.ParagraphCollection(this.context,e(this.context,this,"Paragraphs",!0,!1))),this.m_paragraphs},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentBody",{get:function(){return this.m_parentBody||(this.m_parentBody=new n.Body(this.context,e(this.context,this,"ParentBody",!1,!1))),this.m_parentBody},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentBodyOrNullObject",{get:function(){return this.m_parentBodyOrNullObject||(this.m_parentBodyOrNullObject=new n.Body(this.context,e(this.context,this,"ParentBodyOrNullObject",!1,!1))),this.m_parentBodyOrNullObject},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentContentControl",{get:function(){return this.m_parentContentControl||(this.m_parentContentControl=new n.ContentControl(this.context,e(this.context,this,"ParentContentControl",!1,!1))),this.m_parentContentControl},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentContentControlOrNullObject",{get:function(){return this.m_parentContentControlOrNullObject||(this.m_parentContentControlOrNullObject=new n.ContentControl(this.context,e(this.context,this,"ParentContentControlOrNullObject",!1,!1))),this.m_parentContentControlOrNullObject},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentSection",{get:function(){return this.m_parentSection||(this.m_parentSection=new n.Section(this.context,e(this.context,this,"ParentSection",!1,!1))),this.m_parentSection},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentSectionOrNullObject",{get:function(){return this.m_parentSectionOrNullObject||(this.m_parentSectionOrNullObject=new n.Section(this.context,e(this.context,this,"ParentSectionOrNullObject",!1,!1))),this.m_parentSectionOrNullObject},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"tables",{get:function(){return this.m_tables||(this.m_tables=new n.TableCollection(this.context,e(this.context,this,"Tables",!0,!1))),this.m_tables},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"style",{get:function(){return i("style",this.m_style,"Body",this._isNull),this.m_style},set:function(n){this.m_style=n;u(this.context,this,"Style",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"styleBuiltIn",{get:function(){return i("styleBuiltIn",this.m_styleBuiltIn,"Body",this._isNull),this.m_styleBuiltIn},set:function(n){this.m_styleBuiltIn=n;u(this.context,this,"StyleBuiltIn",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"text",{get:function(){return i("text",this.m_text,"Body",this._isNull),this.m_text},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"type",{get:function(){return i("type",this.m_type,"Body",this._isNull),this.m_type},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"Body",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),v.prototype.set=function(n,t){this._recursivelySet(n,t,["style","styleBuiltIn"],["font"],["contentControls","inlinePictures","lists","paragraphs","parentBody","parentBodyOrNullObject","parentContentControl","parentContentControlOrNullObject","parentSection","parentSectionOrNullObject","tables","contentControls","inlinePictures","lists","paragraphs","parentBody","parentBodyOrNullObject","parentContentControl","parentContentControlOrNullObject","parentSection","parentSectionOrNullObject","tables"])},v.prototype.clear=function(){f(this.context,this,"Clear",0,[])},v.prototype.getHtml=function(){var t=f(this.context,this,"GetHtml",1,[]),n=new OfficeExtension.ClientResult;return c(this,t,n),n},v.prototype.getOoxml=function(){var t=f(this.context,this,"GetOoxml",1,[]),n=new OfficeExtension.ClientResult;return c(this,t,n),n},v.prototype.getRange=function(t){return new n.Range(this.context,r(this.context,this,"GetRange",1,[t],!1,!1,null))},v.prototype.insertBreak=function(n,t){f(this.context,this,"InsertBreak",0,[n,t])},v.prototype.insertContentControl=function(){return new n.ContentControl(this.context,r(this.context,this,"InsertContentControl",0,[],!1,!0,null))},v.prototype.insertFileFromBase64=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertFileFromBase64",0,[t,i],!1,!0,null))},v.prototype.insertHtml=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertHtml",0,[t,i],!1,!0,null))},v.prototype.insertInlinePictureFromBase64=function(t,i){return new n.InlinePicture(this.context,r(this.context,this,"InsertInlinePictureFromBase64",0,[t,i],!1,!0,null))},v.prototype.insertOoxml=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertOoxml",0,[t,i],!1,!0,null))},v.prototype.insertParagraph=function(t,i){return new n.Paragraph(this.context,r(this.context,this,"InsertParagraph",0,[t,i],!1,!0,null))},v.prototype.insertTable=function(t,i,u,f){return new n.Table(this.context,r(this.context,this,"InsertTable",0,[t,i,u,f],!1,!0,null))},v.prototype.insertText=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertText",0,[t,i],!1,!0,null))},v.prototype.search=function(t,i){return i=y(this.context,i),new n.RangeCollection(this.context,r(this.context,this,"Search",1,[t,i],!0,!1,null))},v.prototype.select=function(n){f(this.context,this,"Select",1,[n])},v.prototype._KeepReference=function(){f(this.context,this,"_KeepReference",1,[])},v.prototype._handleResult=function(n){if(a.prototype._handleResult.call(this,n),!o(n)){var i=n;h(this,i);t(i.Style)||(this.m_style=i.Style);t(i.StyleBuiltIn)||(this.m_styleBuiltIn=i.StyleBuiltIn);t(i.Text)||(this.m_text=i.Text);t(i.Type)||(this.m_type=i.Type);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);l(this,i,["contentControls","ContentControls","font","Font","inlinePictures","InlinePictures","lists","Lists","paragraphs","Paragraphs","parentBody","ParentBody","parentBodyOrNullObject","ParentBodyOrNullObject","parentContentControl","ParentContentControl","parentContentControlOrNullObject","ParentContentControlOrNullObject","parentSection","ParentSection","parentSectionOrNullObject","ParentSectionOrNullObject","tables","Tables"])}},v.prototype.load=function(n){return s(this,n),this},v.prototype._handleIdResult=function(n){(a.prototype._handleIdResult.call(this,n),o(n))||t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId)},v.prototype.track=function(){return this.context.trackedObjects.add(this),this},v.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},v.prototype.toJSON=function(){return{font:this.m_font,style:this.m_style,styleBuiltIn:this.m_styleBuiltIn,text:this.m_text,type:this.m_type}},v}(OfficeExtension.ClientObject),w,b,k,d,g,nt,tt,it,rt,ut,ft,et,ot,st,ht,ct,lt,at,vt,yt,pt,wt,bt,kt,dt,gt,ii,ri,ui,fi,ei,oi,si,hi,ci,li,ai,vi,yi,pi,wi,bi,ki,di,gi,nr,tr,ir;n.Body=ti;w=function(a){function v(){a.apply(this,arguments)}return __extends(v,a),Object.defineProperty(v.prototype,"_className",{get:function(){return"ContentControl"},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"contentControls",{get:function(){return this.m_contentControls||(this.m_contentControls=new n.ContentControlCollection(this.context,e(this.context,this,"ContentControls",!0,!1))),this.m_contentControls},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"font",{get:function(){return this.m_font||(this.m_font=new n.Font(this.context,e(this.context,this,"Font",!1,!1))),this.m_font},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"inlinePictures",{get:function(){return this.m_inlinePictures||(this.m_inlinePictures=new n.InlinePictureCollection(this.context,e(this.context,this,"InlinePictures",!0,!1))),this.m_inlinePictures},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"lists",{get:function(){return this.m_lists||(this.m_lists=new n.ListCollection(this.context,e(this.context,this,"Lists",!0,!1))),this.m_lists},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"paragraphs",{get:function(){return this.m_paragraphs||(this.m_paragraphs=new n.ParagraphCollection(this.context,e(this.context,this,"Paragraphs",!0,!1))),this.m_paragraphs},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentBody",{get:function(){return this.m_parentBody||(this.m_parentBody=new n.Body(this.context,e(this.context,this,"ParentBody",!1,!1))),this.m_parentBody},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentContentControl",{get:function(){return this.m_parentContentControl||(this.m_parentContentControl=new n.ContentControl(this.context,e(this.context,this,"ParentContentControl",!1,!1))),this.m_parentContentControl},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentContentControlOrNullObject",{get:function(){return this.m_parentContentControlOrNullObject||(this.m_parentContentControlOrNullObject=new n.ContentControl(this.context,e(this.context,this,"ParentContentControlOrNullObject",!1,!1))),this.m_parentContentControlOrNullObject},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentTable",{get:function(){return this.m_parentTable||(this.m_parentTable=new n.Table(this.context,e(this.context,this,"ParentTable",!1,!1))),this.m_parentTable},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentTableCell",{get:function(){return this.m_parentTableCell||(this.m_parentTableCell=new n.TableCell(this.context,e(this.context,this,"ParentTableCell",!1,!1))),this.m_parentTableCell},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentTableCellOrNullObject",{get:function(){return this.m_parentTableCellOrNullObject||(this.m_parentTableCellOrNullObject=new n.TableCell(this.context,e(this.context,this,"ParentTableCellOrNullObject",!1,!1))),this.m_parentTableCellOrNullObject},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentTableOrNullObject",{get:function(){return this.m_parentTableOrNullObject||(this.m_parentTableOrNullObject=new n.Table(this.context,e(this.context,this,"ParentTableOrNullObject",!1,!1))),this.m_parentTableOrNullObject},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"tables",{get:function(){return this.m_tables||(this.m_tables=new n.TableCollection(this.context,e(this.context,this,"Tables",!0,!1))),this.m_tables},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"appearance",{get:function(){return i("appearance",this.m_appearance,"ContentControl",this._isNull),this.m_appearance},set:function(n){this.m_appearance=n;u(this.context,this,"Appearance",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"cannotDelete",{get:function(){return i("cannotDelete",this.m_cannotDelete,"ContentControl",this._isNull),this.m_cannotDelete},set:function(n){this.m_cannotDelete=n;u(this.context,this,"CannotDelete",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"cannotEdit",{get:function(){return i("cannotEdit",this.m_cannotEdit,"ContentControl",this._isNull),this.m_cannotEdit},set:function(n){this.m_cannotEdit=n;u(this.context,this,"CannotEdit",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"color",{get:function(){return i("color",this.m_color,"ContentControl",this._isNull),this.m_color},set:function(n){this.m_color=n;u(this.context,this,"Color",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"id",{get:function(){return i("id",this.m_id,"ContentControl",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"placeholderText",{get:function(){return i("placeholderText",this.m_placeholderText,"ContentControl",this._isNull),this.m_placeholderText},set:function(n){this.m_placeholderText=n;u(this.context,this,"PlaceholderText",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"removeWhenEdited",{get:function(){return i("removeWhenEdited",this.m_removeWhenEdited,"ContentControl",this._isNull),this.m_removeWhenEdited},set:function(n){this.m_removeWhenEdited=n;u(this.context,this,"RemoveWhenEdited",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"style",{get:function(){return i("style",this.m_style,"ContentControl",this._isNull),this.m_style},set:function(n){this.m_style=n;u(this.context,this,"Style",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"styleBuiltIn",{get:function(){return i("styleBuiltIn",this.m_styleBuiltIn,"ContentControl",this._isNull),this.m_styleBuiltIn},set:function(n){this.m_styleBuiltIn=n;u(this.context,this,"StyleBuiltIn",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"subtype",{get:function(){return i("subtype",this.m_subtype,"ContentControl",this._isNull),this.m_subtype},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"tag",{get:function(){return i("tag",this.m_tag,"ContentControl",this._isNull),this.m_tag},set:function(n){this.m_tag=n;u(this.context,this,"Tag",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"text",{get:function(){return i("text",this.m_text,"ContentControl",this._isNull),this.m_text},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"title",{get:function(){return i("title",this.m_title,"ContentControl",this._isNull),this.m_title},set:function(n){this.m_title=n;u(this.context,this,"Title",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"type",{get:function(){return i("type",this.m_type,"ContentControl",this._isNull),this.m_type},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"ContentControl",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),v.prototype.set=function(n,t){this._recursivelySet(n,t,["title","tag","placeholderText","appearance","color","removeWhenEdited","cannotDelete","cannotEdit","style","styleBuiltIn"],["font"],["contentControls","inlinePictures","lists","paragraphs","parentBody","parentContentControl","parentContentControlOrNullObject","parentTable","parentTableCell","parentTableCellOrNullObject","parentTableOrNullObject","tables","contentControls","inlinePictures","lists","paragraphs","parentBody","parentContentControl","parentContentControlOrNullObject","parentTable","parentTableCell","parentTableCellOrNullObject","parentTableOrNullObject","tables"])},v.prototype.clear=function(){f(this.context,this,"Clear",0,[])},v.prototype.delete=function(n){f(this.context,this,"Delete",0,[n])},v.prototype.getHtml=function(){var t=f(this.context,this,"GetHtml",1,[]),n=new OfficeExtension.ClientResult;return c(this,t,n),n},v.prototype.getOoxml=function(){var t=f(this.context,this,"GetOoxml",1,[]),n=new OfficeExtension.ClientResult;return c(this,t,n),n},v.prototype.getRange=function(t){return new n.Range(this.context,r(this.context,this,"GetRange",1,[t],!1,!1,null))},v.prototype.getTextRanges=function(t,i){return new n.RangeCollection(this.context,r(this.context,this,"GetTextRanges",1,[t,i],!0,!1,null))},v.prototype.insertBreak=function(n,t){f(this.context,this,"InsertBreak",0,[n,t])},v.prototype.insertFileFromBase64=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertFileFromBase64",0,[t,i],!1,!0,null))},v.prototype.insertHtml=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertHtml",0,[t,i],!1,!0,null))},v.prototype.insertInlinePictureFromBase64=function(t,i){return new n.InlinePicture(this.context,r(this.context,this,"InsertInlinePictureFromBase64",0,[t,i],!1,!0,null))},v.prototype.insertOoxml=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertOoxml",0,[t,i],!1,!0,null))},v.prototype.insertParagraph=function(t,i){return new n.Paragraph(this.context,r(this.context,this,"InsertParagraph",0,[t,i],!1,!0,null))},v.prototype.insertTable=function(t,i,u,f){return new n.Table(this.context,r(this.context,this,"InsertTable",0,[t,i,u,f],!1,!0,null))},v.prototype.insertText=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertText",0,[t,i],!1,!0,null))},v.prototype.search=function(t,i){return i=y(this.context,i),new n.RangeCollection(this.context,r(this.context,this,"Search",1,[t,i],!0,!1,null))},v.prototype.select=function(n){f(this.context,this,"Select",1,[n])},v.prototype.split=function(t,i,u,f){return new n.RangeCollection(this.context,r(this.context,this,"Split",1,[t,i,u,f],!0,!1,null))},v.prototype._KeepReference=function(){f(this.context,this,"_KeepReference",1,[])},v.prototype._handleResult=function(n){if(a.prototype._handleResult.call(this,n),!o(n)){var i=n;h(this,i);t(i.Appearance)||(this.m_appearance=i.Appearance);t(i.CannotDelete)||(this.m_cannotDelete=i.CannotDelete);t(i.CannotEdit)||(this.m_cannotEdit=i.CannotEdit);t(i.Color)||(this.m_color=i.Color);t(i.Id)||(this.m_id=i.Id);t(i.PlaceholderText)||(this.m_placeholderText=i.PlaceholderText);t(i.RemoveWhenEdited)||(this.m_removeWhenEdited=i.RemoveWhenEdited);t(i.Style)||(this.m_style=i.Style);t(i.StyleBuiltIn)||(this.m_styleBuiltIn=i.StyleBuiltIn);t(i.Subtype)||(this.m_subtype=i.Subtype);t(i.Tag)||(this.m_tag=i.Tag);t(i.Text)||(this.m_text=i.Text);t(i.Title)||(this.m_title=i.Title);t(i.Type)||(this.m_type=i.Type);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);l(this,i,["contentControls","ContentControls","font","Font","inlinePictures","InlinePictures","lists","Lists","paragraphs","Paragraphs","parentBody","ParentBody","parentContentControl","ParentContentControl","parentContentControlOrNullObject","ParentContentControlOrNullObject","parentTable","ParentTable","parentTableCell","ParentTableCell","parentTableCellOrNullObject","ParentTableCellOrNullObject","parentTableOrNullObject","ParentTableOrNullObject","tables","Tables"])}},v.prototype.load=function(n){return s(this,n),this},v.prototype._handleIdResult=function(n){(a.prototype._handleIdResult.call(this,n),o(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},v.prototype.track=function(){return this.context.trackedObjects.add(this),this},v.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},v.prototype.toJSON=function(){return{appearance:this.m_appearance,cannotDelete:this.m_cannotDelete,cannotEdit:this.m_cannotEdit,color:this.m_color,font:this.m_font,id:this.m_id,placeholderText:this.m_placeholderText,removeWhenEdited:this.m_removeWhenEdited,style:this.m_style,styleBuiltIn:this.m_styleBuiltIn,subtype:this.m_subtype,tag:this.m_tag,text:this.m_text,title:this.m_title,type:this.m_type}},v}(OfficeExtension.ClientObject);n.ContentControl=w;b=function(u){function e(){u.apply(this,arguments)}return __extends(e,u),Object.defineProperty(e.prototype,"_className",{get:function(){return"ContentControlCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return i("items",this.m__items,"ContentControlCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"ContentControlCollection",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),e.prototype.getById=function(t){return new n.ContentControl(this.context,r(this.context,this,"GetById",1,[t],!1,!1,null))},e.prototype.getByIdOrNullObject=function(t){return new n.ContentControl(this.context,r(this.context,this,"GetByIdOrNullObject",1,[t],!1,!1,null))},e.prototype.getByTag=function(t){return new n.ContentControlCollection(this.context,r(this.context,this,"GetByTag",1,[t],!0,!1,null))},e.prototype.getByTitle=function(t){return new n.ContentControlCollection(this.context,r(this.context,this,"GetByTitle",1,[t],!0,!1,null))},e.prototype.getByTypes=function(t){return new n.ContentControlCollection(this.context,r(this.context,this,"GetByTypes",1,[t],!0,!1,null))},e.prototype.getFirst=function(){return new n.ContentControl(this.context,r(this.context,this,"GetFirst",1,[],!1,!1,null))},e.prototype.getFirstOrNullObject=function(){return new n.ContentControl(this.context,r(this.context,this,"GetFirstOrNullObject",1,[],!1,!1,null))},e.prototype.getItem=function(t){return new n.ContentControl(this.context,a(this.context,this,[t]))},e.prototype._KeepReference=function(){f(this.context,this,"_KeepReference",1,[])},e.prototype._handleResult=function(i){var r,e,f,s;if((u.prototype._handleResult.call(this,i),!o(i))&&(r=i,h(this,r),t(r._ReferenceId)||(this.m__ReferenceId=r._ReferenceId),!o(r[OfficeExtension.Constants.items])))for(this.m__items=[],e=r[OfficeExtension.Constants.items],f=0;f0?i.push(t):t.tabIndex===0&&r.push(t):r.push(t);return i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;return r===0&&(r=i.indexOf(n)-i.indexOf(t)),r}),[].concat(i,r)}var o="focus",s="on",k="configurable",d="writable",h="enumerable",u="",c="undefined",t=!1,i=!0,l=2147483647,n=null,r=-1,a=r,g="&_xdm_Info=",nt="&_serializer_version=",tt="_xdm_",ft="_serializer_version=",v="#",it="&",f="class",y={},et=3e4,p=n,w=n,e=(new Date).getTime();return{set_entropy:function(n){var t,r,i;if(typeof n=="string")for(t=0;t6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(r)===OSF.DDA.SettingsManager.DataJSONSuffix&&(i=new Date(parseInt(t.slice(5,r))),i)?i:t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,i);f[u]=t}catch(e){}}return f},loadScript:function(r,u,f){var s,e,o,h,c;r&&u&&(s=window.document,e=y[r],e?e.loaded?u():e.pendingCallbacks.push(u):(o=s.createElement("script"),o.type="text/javascript",e={loaded:t,pendingCallbacks:[u],timer:n},y[r]=e,h=function(){var r,t,u;for(e.timer!=n&&(clearTimeout(e.timer),delete e.timer),e.loaded=i,r=e.pendingCallbacks.length,t=0;t1?l[l.length-1]:n,s,h,c,a;return u&&o!=n&&(o.indexOf(it)>=0&&(o=o.split(it)[0]),o=decodeURIComponent(o)),s=b(),!f&&s&&(h=window.name.indexOf(i),h>r&&(c=window.name.indexOf(";",h),c==r&&(c=window.name.length),a=window.name.substring(h,c),o?s.setItem(a,o):o=s.getItem(a))),o},getConversationId:function(){var i=window.location.search,t=n,r;return i&&(r=i.indexOf("&"),t=r>0?i.substring(1,r):i.substr(1),t&&t.charAt(t.length-1)==="="&&(t=t.substring(0,t.length-1),t&&(t=decodeURIComponent(t)))),t},getInfoItems:function(n){var t=n.split("$");return typeof t[1]==c&&(t=n.split("|")),typeof t[1]==c&&(t=n.split("%7C")),t},getXdmFieldValue:function(n,t){var r=u,f=OSF.OUtil.parseXdmInfo(t),i;if(f&&(i=OSF.OUtil.getInfoItems(f),i!=undefined&&i.length>=3))switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]),f;if(u)throw u;for(f in r)if(u=Function._validateParameter(n[f],r[f],f),u)throw u;},writeProfilerMark:function(n){window.msWriteProfilerMark&&(window.msWriteProfilerMark(n),OsfMsAjaxFactory.msAjaxDebug.trace(n))},outputDebug:function(n){typeof OsfMsAjaxFactory!==c&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){var e,f;r=r||{};for(e in u)f=u[e],r[f]==undefined&&(r[f]=i);return Object.defineProperty(n,t,r),n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[h])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[h])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[d,h,k])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[d,h,k])},finalizeProperties:function(n,r){var e,u;r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8,e=o&255,i[t++]=r>>2,i[t++]=(r&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63,isNaN(o)||(r=o>>8,f=h&255,e=h>>8,i[t++]=r>>2,i[t++]=(r&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63),isNaN(o)?i[t-1]=64:isNaN(h)&&(i[t-2]=64,i[t-1]=64),c=0;c0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){var u,i,f,r;if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(u=[],i=0;in)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=ut(u),e=f?u.length-1:0,u.length===0)return n;while(!h&&e>=0&&en)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=ut(u),l=y(u,f),s=v(u.length,l,e),s<0)return n;while(!c&&s>=0&&s0;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[r%16],r=Math.floor(r/16);for(;t<32;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[Math.floor(Math.random()*16)];return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3};OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611,WordAndroid:8388613,PowerpointAndroid:8388614};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",Reserved:"reserved",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData",Base64:"base64"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidOpenBrowserWindow:102,dispidCreateDocumentMethod:105,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];return i?(i.name||(i.name=n[this.errorCodes.ooeInternalError].name),i.message||(i.message=n[this.errorCodes.ooeInternalError].message)):i=n[this.errorCodes.ooeInternalError],i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:t.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:t.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:t.L_SSOConnectionLostError,message:t.L_SSOConnectionLostErrorMessage}}}}(),function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}(),r,i,h,u,c,l,f,a,e,v,y,p,w,b,o,k,d,g,s,nt,tt,it,rt;n.RequirementVersion=ut;r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){var f,u,e,i,r;if(n==undefined)return!1;if(t==undefined&&(t=0),f=this._setMap,u=f._sets,u.hasOwnProperty(n.toLowerCase())){e=u[n.toLowerCase()];try{if((i=this._getVersion(e),t=t+"",r=this._getVersion(t),i.major>0&&i.major>r.major)||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),i=0,r=0;if(t.length<2&&isNaN(Number(n)))throw u;else if(i=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(i)||isNaN(r))throw u;return{minor:r,major:i}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;h=function(n){function i(){n.call(this,{dialogapi:t})}return __extends(i,n),i}(i);n.DefaultDialogSetRequirement=h;u=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelClientDefaultSetRequirement=u;c=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(u);n.ExcelClientV1DefaultSetRequirement=c;l=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookClientDefaultSetRequirement=l;f=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return __extends(i,n),i}(i);n.WordClientDefaultSetRequirement=f;a=function(n){function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return __extends(i,n),i}(f);n.WordClientV1DefaultSetRequirement=a;e=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointClientDefaultSetRequirement=e;v=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(e);n.PowerpointClientV1DefaultSetRequirement=v;y=function(n){function i(){n.call(this,{selection:t,textcoercion:t})}return __extends(i,n),i}(i);n.ProjectClientDefaultSetRequirement=y;p=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return __extends(i,n),i}(i);n.ExcelWebDefaultSetRequirement=p;w=function(n){function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordWebDefaultSetRequirement=w;b=function(n){function i(){n.call(this,{activeview:t,settings:t})}return __extends(i,n),i}(i);n.PowerpointWebDefaultSetRequirement=b;o=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookWebDefaultSetRequirement=o;k=function(n){function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.SwayWebDefaultSetRequirement=k;d=function(n){function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return __extends(i,n),i}(i);n.AccessWebDefaultSetRequirement=d;g=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelIOSDefaultSetRequirement=g;s=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordIOSDefaultSetRequirement=s;nt=function(n){function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return __extends(t,n),t}(s);n.WordIOSV1DefaultSetRequirement=nt;tt=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointIOSDefaultSetRequirement=tt;it=function(n){function i(){n.call(this,{mailbox:t})}return __extends(i,n),i}(i);n.OutlookIOSDefaultSetRequirement=it;rt=function(){function n(){}var t="undefined";return n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},n.getDefaultRequirementMatrix=function(u){var f,e,s,o;return this.initializeDefaultSetMatrix(),f=undefined,e=u.get_requirementMatrix(),e!=undefined&&e.length>0&&typeof JSON!==t?(s=JSON.parse(u.get_requirementMatrix().toLowerCase()),f=new r(new i(s))):(o=n.getClientFullVersionString(u),f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[o]!=undefined?new r(n.DefaultSetArrayMatrix[o]):new r(new i({}))),f},n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix(),e;return f!=undefined&&f.length>0&&typeof JSON!==t?(e=JSON.parse(n.get_requirementMatrix().toLowerCase()),u=new r(new i(e))):u=new r(new h),u},n.getClientFullVersionString=function(n){var i=n.get_appMinorVersion(),u="",r="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;return f&&n.get_appVersion()==1?r=t==4096&&i>=15?"16.00.01":"16.00":n.get_appName()==64?r=n.get_appVersion():(u=i<10?"0"+i:""+i,r=n.get_appVersion()+"."+u),n.get_appName()+"-"+r},n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new c;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new v;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new l;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new w;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new b;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new g;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new k;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new nt;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new tt;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new it},n.Excel_RCLIENT_1600="1-16.00",n.Excel_RCLIENT_1601="1-16.01",n.Word_RCLIENT_1600="2-16.00",n.Word_RCLIENT_1601="2-16.01",n.PowerPoint_RCLIENT_1600="4-16.00",n.PowerPoint_RCLIENT_1601="4-16.01",n.Outlook_RCLIENT_1600="8-16.00",n.Excel_WAC_1600="16-16.00",n.Word_WAC_1600="32-16.00",n.Outlook_WAC_1600="64-16.00",n.Outlook_WAC_1601="64-16.01",n.Project_RCLIENT_1600="128-16.00",n.Access_WAC_1600="256-16.00",n.PowerPoint_WAC_1600="512-16.00",n.Excel_IOS_1600="1024-16.00",n.SWAY_WAC_1600="2048-16.00",n.Word_IOS_1600="4096-16.00",n.Word_IOS_16001="4096-16.00.01",n.PowerPoint_IOS_1600="8192-16.00",n.Outlook_IOS_1600="65536-16.00",n.DefaultSetArrayMatrix={},n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))}(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}return n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n},n.getInstance=function(){return n.hostObj===undefined&&(n.hostObj=new n),n.hostObj},n.prototype.getPlatform=function(){var n=this,t;return n.hostInfo.hostPlatform&&(t=n.hostInfo.hostPlatform.toLowerCase(),n.platformRemappings[t])?n.platformRemappings[t]:null},n.prototype.getHost=function(){var n=this,t;if(n.hostInfo.hostType){if(t=n.hostInfo.hostType.toLowerCase(),n.camelCaseMappings[t])return n.camelCaseMappings[t];if(t=n.capitalizeFirstLetter(n.hostInfo.hostType),Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null},n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null},n}();n.Host=t})(t=n.HostName||(n.HostName={}))}(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){n||(window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,n=!0)},disableShortcut:function(){n&&(t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window),n=!1)}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i,r,o,u,f,e;if(n&&typeof n=="string"&&(r=n.indexOf("#"),r!=-1)){o=n.substring(0,r);u=n.substring(r+1);switch(o){case"binding":case"bindings":u&&(i=new OSF.DDA.BindingPromise(u))}}if(i)return i.onFail=t,i;else if(t)if(f=typeof t,f=="function")e={},e[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(e,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext));else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f);};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this,s,e;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.auth&&OSF.OUtil.defineEnumerableProperty(f,"auth",{value:n.auth});n.application&&OSF.OUtil.defineEnumerableProperty(f,"application",{value:n.application});n.get_isDialog()?(e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e})):(t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t}),r&&(s=r.displayName||"appOM",delete r.displayName,OSF.OUtil.defineEnumerableProperty(f,s,{value:r})),u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}}),e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e}))};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Application=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this,u;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;return OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext()),n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,e=n.length,o=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){var u,i,r;for(u in n){if(i=n[u],r=t[u],i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw o();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw o();}};f.extractRequiredArguments=function(t,i,r){var f,u,h,s,c,l;if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(c=n.length-1;c>=s;c--){l=n[c];switch(typeof l){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=l;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}if(f=o.fillOptions(f,i,r,u),e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;return o.verifyArguments(t,f),f}var h="function",s=n.length,o=new OSF.DDA.ApiMethodCall(n,t,i,f,e);this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),u=c(n,r,t,i);return o.constructCallArgs(r,u,t,i)};this.processResponse=function(n,t,i,f){return n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n)};this.getCallArgs=function(n){for(var t,u,r,i=n.length-1;i>=s;i--){r=n[i];switch(typeof r){case"object":t=r;break;case h:u=r}}return t=t||{},u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u),t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],i=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],t,i,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback],u,r;f&&(u={},u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?u[OSF.DDA.AsyncResultEnum.Properties.Value]=i:(r={},i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i),f(new OSF.DDA.AsyncResult(u,r)))};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.SyncMethodNames[t]=i};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){function o(n,i,r,u){var o,c,s,h;if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(s=n.length-1;s>=e;s--){h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}return o=f.fillOptions(o,i,r,u),f.verifyArguments(t,o),o}var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),u=o(n,r,t,i);return f.constructCallArgs(r,u,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){function e(i,f){var a=i?{}:undefined,s,h,o,v,c,l;for(s in i){if(h=i[s],OSF.DDA.ListType.isListType(s)){o=[];for(v in h)o.push(e(h[v],f))}else OSF.OUtil.listContainsKey(r,s)?o=r[s][f](h):f==u&&n.preserveNesting(s)?o=e(h,f):(c=t[s],c?(l=c[f],l&&(o=l[h],o===undefined&&(o=h))):o=h);a[s]=o}return a}function l(i,r){var e,u,h,s;for(u in r)h=n.isComplexType(u)?l(i,t[u][o]):i[u],h!=undefined&&(e||(e={}),s=r[u],s==f&&(s=u),e[s]=n.pack(u,h));return e}function s(i,r,e){var o,a,h,l,p,v,y;e||(e={});for(o in r){if(a=r[o],a==f)h=i;else if(a==c){e[o]=i.toArray();continue}else h=i[a];if(h===null||h===undefined)e[o]=undefined;else if(h=n.unpack(o,h),n.isComplexType(o))l=t[o][u],n.preserveNesting(o)?e[o]=s(h,l):s(h,l,e);else if(OSF.DDA.ListType.isListType(o)){l={};p=OSF.DDA.ListType.getDescriptor(o);l[p]=f;v=new Array(h.length);for(y in h)v[y]=s(h[y],l);e[o]=v}else e[o]=h}return e}function a(n,i,r){var f=t[n][r],u,o,c;return r=="toHost"?(o=e(i,r),u=l(o,f)):r==h&&(c=s(i,f),u=e(c,r)),u}var h="fromHost",i=this,o="toHost",u=h,c="sourceData",f="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];t||(t={});i.addMapping=function(n,i){var e,h,c,l,r,s,a,v;if(i.map){e=i.map;h={};for(c in e)l=e[c],l==f&&(l=c),h[l]=c}else e=i.toHost,h=i.fromHost;if(r=t[n],r){s=r[o];for(a in s)e[a]=s[a];s=r[u];for(v in s)h[v]=s[v]}else r=t[n]={};r[o]=e;r[u]=h};i.toHost=function(n,t){return a(n,t,o)};i.fromHost=function(n,t){return a(n,t,u)};i.self=f;i.sourceData=c;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){return this.isDynamicType(n)?t[n].toHost(i):i};i.unpack=function(n,i){return this.isDynamicType(n)?t[n].fromHost(i):i}};OSF.DDA.getDecoratedParameterMap=function(n,t){function r(n){var i=null,r,t;if(n)for(i={},r=n.length,t=0;t0){for(r=[],i=0;i=s)break;if(f=Function._validateParameter(n[e],o,h),f)return f.popStackFrame(),f}return t}),Function._validateParameterCount||(Function._validateParameterCount=function(n,r,u){var f,s,e=r.length,h=n.length,c,l,a;if(he)for(s=i,f=0;f0&&t.push(u)}}catch(s){}return t}var i=[],t={};t[Microsoft.Office.WebExtension.Parameters.Data]=function(){var t=0,i=1;return{toHost:function(n){if(OSF.DDA.TableDataProperties&&typeof n!="string"&&n[OSF.DDA.TableDataProperties.TableRows]!==undefined){var r=[];r[t]=n[OSF.DDA.TableDataProperties.TableRows];r[i]=n[OSF.DDA.TableDataProperties.TableHeaders];n=r}return n},fromHost:function(r){var f,e,u;return r.toArray?(e=r.dimensions(),e===2?f=n(r):(u=r.toArray(),u.length===2&&(u[0]!=null&&u[0].toArray||u[1]!=null&&u[1].toArray)?(f={},f[OSF.DDA.TableDataProperties.TableRows]=n(u[t]),f[OSF.DDA.TableDataProperties.TableHeaders]=n(u[i])):f=u)):f=r,f}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,i,t);this.unpack=function(n,i){var r,u;return this.isComplexType(n)||OSF.DDA.ListType.isListType(n)?(u=(i||typeof i=="unknown")&&i.toArray,r=u?i.toArray():i||{}):r=this.isDynamicType(n)?t[n].fromHost(i):i,r}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(n){function t(n){var i=n,f,r,u;if(OSF.OUtil.isArray(n))for(f=i.length,r=0;r2)for(r=[],f=1;f-1&&(o="&");var y=screen.width*e.width/100,p=screen.height*e.height/100,w="width="+y+", height="+p;if(f[0]=f[0].concat(o).concat(h),a=f.join(c),n.popup=window.open(a,"",w),n.popup!=undefined&&window.dialogAPIErrorCode==undefined){window.addEventListener("message",v);n.interval=window.setInterval(b,500);function k(n){r(t,[n])}n.NotifyError=k;u(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}else s=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,window.dialogAPIErrorCode&&(s=window.dialogAPIErrorCode),u(s)}},n.prototype.messageParent=function(n){var t=n[Microsoft.Office.WebExtension.Parameters.MessageToParent],i={dialogMessage:{messageType:OSF.DialogMessageType.DialogMessageReceived,messageContent:t}};window.opener.postMessage(JSON.stringify(i),window.location.origin)},n.prototype.closeDialog=function(t,i,r){n.popup?(n.interval&&window.clearInterval(n.interval),n.popup.close(),n.NotifyError=null,r(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)):r(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)},n.prototype.sendMessage=function(){},n}();n.MacRichClientHostController=t}(OfficeExt||(OfficeExt={}));OSF.ClientHostController=new OfficeExt.MacRichClientHostController,function(n){var t;(function(t){var i=function(){function n(){this._osfOfficeTheme=t;this._osfOfficeThemeTimeStamp=t}var t=null;return n.prototype.getOfficeTheme=function(){var r="GetOfficeThemeInfo",t=this,i;if(OSF.DDA._OsfControlContext){if(t._osfOfficeTheme&&t._osfOfficeThemeTimeStamp&&(new Date).getTime()-t._osfOfficeThemeTimeStamp40)&&(n=OSF.OUtil.Guid.generateNewGuid(),t.setValue(t.clientIDKey,n)),n},n.prototype.saveLog=function(n,t){var i=this,u=i.getValue(i.logIdSetKey);u=(u&&u.length>0?u+";":r)+n;i.setValue(i.logIdSetKey,u);i.setValue(n,t)},n.prototype.enumerateLog=function(n,t){var i=this,e=i.getValue(i.logIdSetKey),u,o,r,f;if(e){u=e.split(";");for(o in u)r=u[o],f=i.getValue(r),f&&(n&&n(r,f),t&&i.remove(r));t&&i.remove(i.logIdSetKey)}},n.prototype.getValue=function(n){var t=OSF.OUtil.getLocalStorage(),i=r;return t&&(i=t.getItem(n)),i},n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)},n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}},n}(),o=function(){function t(){}return t.prototype.LogData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(t)}catch(i){}},t.prototype.LogRawData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(t))}catch(i){}},t}();n.initialize=y;n.onAppActivated=p;n.onScriptDone=w;n.onCallDone=b;n.onMethodDone=k;n.onPropertyDone=d;n.onEventDone=g;n.onRegisterDone=nt;n.onAppClosed=tt;n.setOsfControlAppCorrelationId=it;n.doAppInitializationLogging=l;n.logAppCommonMessage=rt;n.logAppException=ut;OSF.AppTelemetry=n}(OSFAppTelemetry||(OSFAppTelemetry={}));Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(n){var i=this,r,t,u;if(i._eventHandlers={},i._objectEventHandlers={},i._queuedEventsArgs={},n!=null)for(r=0;r0)for(r=0;r0)for(r=0;r0?(this._eventHandlers[n]=[],!0):!1},clearObjectEventHandlers:function(n,t){return this._objectEventHandlers[n]!=null&&this._objectEventHandlers[n][t]!=null?(this._objectEventHandlers[n][t]=[],!0):!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},getObjectEventHandlerCount:function(n,t){return this._objectEventHandlers[n]==null||this._objectEventHandlers[n][t]==null?0:this._objectEventHandlers[n][t].length},fireEvent:function(n){var t,r,i;if(n.type==undefined)return!1;if(t=n.type,t&&this._eventHandlers[t]){for(r=this._eventHandlers[t],i=0;i0)){for(r=t[0];i.length>0;)u=i.shift(),r(u);return!0}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var o="hostPlatform",f="outlook",e="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(n,i[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:r=new OSF.DDA.RichApiMessageEventArgs(n,i);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i),t.initialize(r.initialData),(OSF._OfficeAppFactory.getHostInfo()[o]=="win32"||OSF._OfficeAppFactory.getHostInfo()[o]=="mac")&&t.setCurrentItemNumber(r.itemNumber.itemNumber);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkRecipientsChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var i=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),t=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];t(arguments,i,n)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(n){var i=OSF.DDA.SyncMethodNames.MessageParent.displayName,t=this,r;t[i]||OSF.OUtil.defineEnumerableProperty(t,i,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return n(arguments,t)}});r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;t[r]||typeof OSF.DialogParentMessageEventDispatch=="undefined"||OSF.DDA.DispIdHost.addEventSupport(t,OSF.DialogParentMessageEventDispatch,n);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(n){n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:n[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels,value:{types:["boolean"],defaultValue:!1}}],privateStateCallbacks:[],onSucceeded:function(n){var f=n[Microsoft.Office.WebExtension.Parameters.Id],i=n[Microsoft.Office.WebExtension.Parameters.Data],t=new OSF.DialogHandler,e=OSF.DDA.AsyncMethodNames.CloseAsync.displayName,r,u;return OSF.OUtil.defineEnumerableProperty(t,e,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];n(arguments,f,i,t)}}),r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName,OSF.OUtil.defineEnumerableProperty(t,r,{value:function(){var r=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],n=r.verifyAndExtractCall(arguments,t,i),u=n[Microsoft.Office.WebExtension.Parameters.EventType],f=n[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(u,f)}}),u=OSF.DDA.SyncMethodNames.SendMessage.displayName,OSF.OUtil.defineEnumerableProperty(t,u,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return n(arguments,i,t)}}),t},checkCallArgs:function(n){return n[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Width]=1),!n[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&n[Microsoft.Office.WebExtension.Parameters.Width]>100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99),n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1),!n[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99),n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(n){try{n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,n);OSF.ClientHostController.openDialog(n.dispId,n.targetId,function(t,i){n.onEvent&&n.onEvent(i);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(n){n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,n);try{OSF.ClientHostController.closeDialog(n.dispId,n.targetId,t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.messageParent=function(n){try{n.onCalling&&n.onCalling();var i=(new Date).getTime(),t=OSF.ClientHostController.messageParent(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs((new Date).getTime()-i),t),t}catch(r){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(r)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.sendMessage=function(n){try{n.onCalling&&n.onCalling();var r=(new Date).getTime(),t=OSF.ClientHostController.sendMessage(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),t}catch(i){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(i)}};Microsoft.Office.WebExtension.FileType={Text:"text",Compressed:"compressed",Pdf:"pdf"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FileProperties:"FileProperties",FileSliceProperties:"FileSliceProperties"});OSF.DDA.FileProperties={Handle:"FileHandle",FileSize:"FileSize",SliceSize:Microsoft.Office.WebExtension.Parameters.SliceSize};OSF.DDA.File=function(n,t,i){var r,u;OSF.OUtil.defineEnumerableProperties(this,{size:{value:t},sliceCount:{value:Math.ceil(t/i)}});r={};r[OSF.DDA.FileProperties.Handle]=n;r[OSF.DDA.FileProperties.SliceSize]=i;u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.GetDocumentCopyChunkAsync,u.ReleaseDocumentCopyAsync],r)};OSF.DDA.FileSliceOffset="fileSliceoffset";OSF.DDA.AsyncMethodNames.addNames({GetDocumentCopyAsync:"getFileAsync",GetDocumentCopyChunkAsync:"getSliceAsync",ReleaseDocumentCopyAsync:"closeAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FileType,"enum":Microsoft.Office.WebExtension.FileType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:{types:["number"],defaultValue:4194304}}],checkCallArgs:function(n){var t=n[Microsoft.Office.WebExtension.Parameters.SliceSize];if(t<=0||t>4194304)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return n},onSucceeded:function(n,t,i){return new OSF.DDA.File(n[OSF.DDA.FileProperties.Handle],n[OSF.DDA.FileProperties.FileSize],i[Microsoft.Office.WebExtension.Parameters.SliceSize])}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(n,t){return t[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(r<0||r>=t.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;return n[OSF.DDA.FileSliceOffset]=parseInt((r*i[OSF.DDA.FileProperties.SliceSize]).toString()),n},onSucceeded:function(n,t,i){var r={};return OSF.OUtil.defineEnumerableProperties(r,{data:{value:OSF.OUtil.shallowCopy(n[Microsoft.Office.WebExtension.Parameters.Data])},index:{value:i[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:n[OSF.DDA.FileProperties.SliceSize]}}),r}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FileType,{Text:"text",Pdf:"pdf"});OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(n){OSF.OUtil.defineEnumerableProperties(this,{url:{value:n[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(n){return new Microsoft.Office.WebExtension.FileProperties(n)}});Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"};Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"};Microsoft.Office.WebExtension.Index={First:"first",Last:"last",Next:"next",Previous:"previous"};OSF.DDA.AsyncMethodNames.addNames({GoToByIdAsync:"goToByIdAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GoToByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string","number"]},{name:Microsoft.Office.WebExtension.Parameters.GoToType,"enum":Microsoft.Office.WebExtension.GoToType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:{"enum":Microsoft.Office.WebExtension.SelectionMode,defaultValue:Microsoft.Office.WebExtension.SelectionMode.Default}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:0},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:1},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:2},{name:Microsoft.Office.WebExtension.GoToType.Index,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:0},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:1},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:1},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileProperties.FileSize,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0},{name:OSF.DDA.FileProperties.SliceSize,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:0},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:5},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:6}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:0}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileSliceOffset,value:1},{name:OSF.DDA.FileProperties.SliceSize,value:2}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0}]});OSF.DDA.AsyncMethodNames.addNames({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync"}),function(){function r(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&r&&(r[OSF.DDA.TableDataProperties.TableRows]!=undefined||r[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(r=OSF.DDA.OMFactory.manufactureTableData(r)),r=OSF.DDA.DataCoercion.coerceData(r,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),r==undefined?null:r}var i=!1,n="boolean",t="number";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,"enum":Microsoft.Office.WebExtension.CoercionType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}}],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object",t,n]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[t,n],defaultValue:i}}],privateStateCallbacks:[]})}();OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:1},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:2},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:3},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:4},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:5}]});OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",RefreshingSettings:"refreshingSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(n){return OSF.OUtil.serializeSettings(n)},deserializeSettings:function(n){return OSF.OUtil.deserializeSettings(n)}};OSF.DDA.Settings=function(n){var t="name",i;n=n||{};i=function(n){var i=OSF.OUtil.getSessionStorage(),t,r;i&&(t=OSF.DDA.SettingsManager.serializeSettings(n),r=JSON?JSON.stringify(t):Sys.Serialization.JavaScriptSerializer.serialize(t),i.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),r))};OSF.OUtil.defineEnumerableProperties(this,{get:{value:function(i){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]),r;if(u)throw u;return r=n[i],typeof r=="undefined"?null:r}},set:{value:function(r,u){var f=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1},{name:"value",mayBeNull:!0}]);if(f)throw f;n[r]=u;i(n)}},remove:{value:function(r){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]);if(u)throw u;delete n[r];i(n)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],n)};OSF.DDA.RefreshableSettings=function(n){OSF.DDA.RefreshableSettings.uber.constructor.call(this,n);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],n);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:n}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(n,t){return t}}],onSucceeded:function(n,t,i){var f=n[OSF.DDA.SettingsManager.SerializedSettings],u=OSF.DDA.SettingsManager.deserializeSettings(f),e=i[OSF.DDA.SettingsManager.RefreshingSettings];for(var r in e)t.remove(r);for(r in u)t.set(r,u[r]);return t}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(n,t){return OSF.DDA.SettingsManager.serializeSettings(t)}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});Microsoft.Office.WebExtension.BindingType={Table:"table",Text:"text",Matrix:"matrix"};OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType};OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{BindingList:"BindingList"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{Subset:"subset",BindingProperties:"BindingProperties"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList,OSF.DDA.PropertyDescriptors.BindingProperties);OSF.DDA.BindingPromise=function(n,t){this._id=n;OSF.OUtil.defineEnumerableProperty(this,"onFail",{get:function(){return t},set:function(n){var i=typeof n;if(i!="undefined"&&i!="function")throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,i);t=n}})};OSF.DDA.BindingPromise.prototype={_fetch:function(n){var t=this,i;return t.binding?n&&n(t.binding):t._binding||(i=t,Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(t._id,function(t){t.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded?(OSF.OUtil.defineEnumerableProperty(i,"binding",{value:t.value}),n&&n(i.binding)):i.onFail&&i.onFail(t)})),t},getDataAsync:function(){var n=arguments;return this._fetch(function(t){t.getDataAsync.apply(t,n)}),this},setDataAsync:function(){var n=arguments;return this._fetch(function(t){t.setDataAsync.apply(t,n)}),this},addHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.addHandlerAsync.apply(t,n)}),this},removeHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.removeHandlerAsync.apply(t,n)}),this}};OSF.DDA.BindingFacade=function(n){this._eventDispatches=[];OSF.OUtil.defineEnumerableProperty(this,"document",{value:n});var t=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[t.AddFromSelectionAsync,t.AddFromNamedItemAsync,t.GetAllAsync,t.GetByIdAsync,t.ReleaseByIdAsync])};OSF.DDA.UnknownBinding=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}})};OSF.DDA.Binding=function(n,t){var r,u,i,f;OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}});r=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[r.GetDataAsync,r.SetDataAsync]);u=Microsoft.Office.WebExtension.EventType;i=t.bindings._eventDispatches;i[n]||(i[n]=new OSF.EventDispatch([u.BindingSelectionChanged,u.BindingDataChanged]));f=i[n];OSF.DDA.DispIdHost.addEventSupport(this,f)};OSF.DDA.generateBindingId=function(){return"UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+(new Date).getTime()};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureBinding=function(n,t){var r=n[OSF.DDA.BindingProperties.Id],u=n[OSF.DDA.BindingProperties.RowCount],f=n[OSF.DDA.BindingProperties.ColumnCount],s=n[OSF.DDA.BindingProperties.HasHeaders],i,e,o;switch(n[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:i=new OSF.DDA.TextBinding(r,t);break;case Microsoft.Office.WebExtension.BindingType.Matrix:i=new OSF.DDA.MatrixBinding(r,t,u,f);break;case Microsoft.Office.WebExtension.BindingType.Table:e=function(){return OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument};o=e()&&OSF.DDA.ExcelTableBinding?OSF.DDA.ExcelTableBinding:OSF.DDA.TableBinding;i=new o(r,t,u,f,s);break;default:i=new OSF.DDA.UnknownBinding(r,t)}return i};OSF.DDA.AsyncMethodNames.addNames({AddFromSelectionAsync:"addFromSelectionAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:"getByIdAsync",ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync"}),function(){function u(n){return OSF.DDA.OMFactory.manufactureBinding(n,Microsoft.Office.WebExtension.context.document)}function f(n){return n.id}function e(n,t,i){var u=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&u&&(u[OSF.DDA.TableDataProperties.TableRows]!=undefined||u[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(u=OSF.DDA.OMFactory.manufactureTableData(u)),u=OSF.DDA.DataCoercion.coerceData(u,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),u==undefined?r:u}var t="number",i="object",n="string",r=null;OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:[n]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return!0}}],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.BindingList],u)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n,t,i){var r=i[Microsoft.Office.WebExtension.Parameters.Id];delete t._eventDispatches[r]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n,t){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&n[Microsoft.Office.WebExtension.Parameters.RowCount]==0&&n[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn],delete n[Microsoft.Office.WebExtension.Parameters.RowCount],delete n[Microsoft.Office.WebExtension.Parameters.ColumnCount]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]||n[Microsoft.Office.WebExtension.Parameters.RowCount]||n[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[n,i,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}]})}();OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.MatrixBinding=function(n,t,i,r){OSF.DDA.MatrixBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Matrix},rowCount:{value:i?i:0},columnCount:{value:r?r:0}})};OSF.OUtil.extend(OSF.DDA.MatrixBinding,OSF.DDA.Binding);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.BindingProperties,fromHost:[{name:OSF.DDA.BindingProperties.Id,value:0},{name:OSF.DDA.BindingProperties.Type,value:1},{name:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,value:2}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.BindingType,toHost:[{name:Microsoft.Office.WebExtension.BindingType.Text,value:0},{name:Microsoft.Office.WebExtension.BindingType.Matrix,value:1},{name:Microsoft.Office.WebExtension.BindingType.Table,value:2}],invertible:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,value:0},{name:Microsoft.Office.WebExtension.Parameters.Id,value:1},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:2},{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseBindingMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAllBindingsMethod,fromHost:[{name:OSF.DDA.ListDescriptors.BindingList,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:2},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:3},{name:OSF.DDA.PropertyDescriptors.Subset,value:4}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.Data,value:2},{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,fromHost:[{name:OSF.DDA.BindingProperties.RowCount,value:0},{name:OSF.DDA.BindingProperties.ColumnCount,value:1},{name:OSF.DDA.BindingProperties.HasHeaders,value:2}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.Subset,toHost:[{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:0},{name:OSF.DDA.SafeArray.UniqueArguments.Run,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Offset,toHost:[{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:0},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Run,toHost:[{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:0},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddColumnsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearAllRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});Microsoft.Office.WebExtension.TableData=function(n,t){function i(n){if(n==null||n==undefined)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(n,2);t<2;t++)n=[n];return n}catch(i){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(n){t=i(n)}},rows:{get:function(){return n},set:function(t){n=t==null||OSF.OUtil.isArray(t)&&t.length==0?[]:i(t)}}});this.headers=t;this.rows=n};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(n){return new Microsoft.Office.WebExtension.TableData(n[OSF.DDA.TableDataProperties.TableRows],n[OSF.DDA.TableDataProperties.TableHeaders])};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{TableDataProperties:"TableDataProperties"});OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};OSF.DDA.TableBinding=function(n,t,i,r,u){OSF.DDA.TableBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:i?i:0},columnCount:{value:r?r:0},hasHeaders:{value:u?u:!1}});var f=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[f.AddRowsAsync,f.AddColumnsAsync,f.DeleteAllDataValuesAsync])};OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync"}),function(){function n(n){return n.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]})}();OSF.DDA.TextBinding=function(n,t){OSF.DDA.TextBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperty(this,"type",{value:Microsoft.Office.WebExtension.BindingType.Text})};OSF.OUtil.extend(OSF.DDA.TextBinding,OSF.DDA.Binding);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"});OSF.DDA.DocumentSelectionChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:n}})};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDeleted:"objectDeleted"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectSelectionChanged:"objectSelectionChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDataChanged:"objectDataChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ContentControlAdded:"contentControlAdded"});OSF.DDA.ObjectEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:n},object:{value:t}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDeletedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDataChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidContentControlAddedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{BindingSelectionChanged:"bindingSelectionChanged",BindingDataChanged:"bindingDataChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{BindingSelectionChangedEvent:"BindingSelectionChangedEvent"});OSF.DDA.BindingSelectionChangedEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingSelectionChanged},binding:{value:n}});for(var i in t)OSF.OUtil.defineEnumerableProperty(this,i,{value:t[i]})};OSF.DDA.BindingDataChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingDataChanged},binding:{value:n}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:0},{name:OSF.DDA.PropertyDescriptors.Subset,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingDataChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var n=null;return{findArrayDimensionality:function(n){if(OSF.OUtil.isArray(n)){for(var t=0,i=0;i0},enumerable:!0,configurable:!0}),t.prototype._getLastAction=function(){return this.m_actions[this.m_actions.length-1]},t.prototype.addTrace=function(n,t){this.m_traceInfos[n]=t},t.prototype.ensureInstantiateObjectPath=function(t){if(t){if(this.m_instantiatedObjectPaths[t.objectPathInfo.Id])return;if(this.ensureInstantiateObjectPath(t.parentObjectPath),this.ensureInstantiateObjectPaths(t.argumentObjectPaths),!this.m_instantiatedObjectPaths[t.objectPathInfo.Id]){var r={Id:this.m_context._nextId(),ActionType:1,Name:"",ObjectPathId:t.objectPathInfo.Id},i=new n.Action(r,!1,!1);i.referencedObjectPath=t;this.addAction(i)}}},t.prototype.ensureInstantiateObjectPaths=function(n){if(n)for(var t=0;t=0;--r)if(i=n[r],u=i.actionInfo.Id,i.referencedObjectPath&&t._updateLastUsedActionIdOfObjectPathId(e,i.referencedObjectPath,u),o=i.referencedArgumentObjectPaths,o)for(v=o.length,s=0;s0?i.actionInfo.L=c:i.actionInfo.L&&delete i.actionInfo.L},t}();n.ClientRequest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;n._internalConfig={showDisposeInfoInDebugInfo:!1,enableEarlyDispose:!0,alwaysPolyfillClientObjectRetrieveMethod:!1};t=function(){function t(){}return t.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},t.prototype._createRequestExecutorOrNull=function(){return null},Object.defineProperty(t.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),t}();n.SessionBase=t;i=function(){function i(r){if(this.m_customRequestHeaders={},this._onRunFinishedNotifiers=[],this.m_nextId=0,i._overrideSession)this.m_requestUrlAndHeaderInfoResolver=i._overrideSession;else if((n.Utility.isNullOrUndefined(r)||typeof r=="string"&&r.length===0)&&(r=i.defaultRequestUrlAndHeaders,r||(r={url:n.Constants.localDocument,headers:{}})),typeof r=="string")this.m_requestUrlAndHeaderInfo={url:r,headers:{}};else if(i.isRequestUrlAndHeaderInfoResolver(r))this.m_requestUrlAndHeaderInfoResolver=r;else if(i.isRequestUrlAndHeaderInfo(r)){var u=r;this.m_requestUrlAndHeaderInfo={url:u.url,headers:{}};n.Utility._copyHeaders(u.headers,this.m_requestUrlAndHeaderInfo.headers)}else throw n._Internal.RuntimeError._createInvalidArgError("url");this.m_requestUrlAndHeaderInfoResolver instanceof t&&(this.m_session=this.m_requestUrlAndHeaderInfoResolver);this._processingResult=!1;this._customData=n.Constants.iterativeExecutor;this.sync=this.sync.bind(this)}return Object.defineProperty(i.prototype,"session",{get:function(){return this.m_session},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"eventRegistration",{get:function(){return this.m_session?this.m_session.eventRegistration:n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_url",{get:function(){return this.m_requestUrlAndHeaderInfo?this.m_requestUrlAndHeaderInfo.url:null},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_pendingRequest",{get:function(){return this.m_pendingRequest==null&&(this.m_pendingRequest=new n.ClientRequest(this)),this.m_pendingRequest},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"debugInfo",{get:function(){var t=new n.RequestPrettyPrinter(this._rootObjectPropertyName,this._pendingRequest._objectPaths,this._pendingRequest._actions,n._internalConfig.showDisposeInfoInDebugInfo),i=t.process();return{pendingStatements:i}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"trackedObjects",{get:function(){return this.m_trackedObjects||(this.m_trackedObjects=new n.TrackedObjects(this)),this.m_trackedObjects},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"requestHeaders",{get:function(){return this.m_customRequestHeaders},enumerable:!0,configurable:!0}),i.prototype.load=function(t,r){n.Utility.validateContext(this,t);var u=i._parseQueryOption(r),f=n.ActionFactory.createQueryAction(this,t,u);this._pendingRequest.addActionResultHandler(f,t)},i.isLoadOption=function(t){if(!n.Utility.isUndefined(t.select)&&(typeof t.select=="string"||Array.isArray(t.select))||!n.Utility.isUndefined(t.expand)&&(typeof t.expand=="string"||Array.isArray(t.expand))||!n.Utility.isUndefined(t.top)&&typeof t.top=="number"||!n.Utility.isUndefined(t.skip)&&typeof t.skip=="number")return!0;for(var i in t)return!1;return!0},i.parseStrictLoadOption=function(n){var t={Select:[]};return i.parseStrictLoadOptionHelper(t,"","option",n),t},i.combineQueryPath=function(n,t,i){return n.length===0?t:n+i+t},i.parseStrictLoadOptionHelper=function(t,r,u,f){var e,o;for(e in f)if(o=f[e],e==="$all"){if(typeof o!="boolean")throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));o&&t.Select.push(i.combineQueryPath(r,"*","/"))}else if(e==="$top"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));t.Top=o}else if(e==="$skip"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));t.Skip=o}else if(typeof o=="boolean")o&&t.Select.push(i.combineQueryPath(r,e,"/"));else if(typeof o=="object")i.parseStrictLoadOptionHelper(t,i.combineQueryPath(r,e,"/"),i.combineQueryPath(u,e,"."),o);else throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));},i._parseQueryOption=function(t){var u={},f,r;if(typeof t=="string")f=t,u.Select=n.Utility._parseSelectExpand(f);else if(Array.isArray(t))u.Select=t;else if(typeof t=="object")if(r=t,i.isLoadOption(r)){if(typeof r.select=="string")u.Select=n.Utility._parseSelectExpand(r.select);else if(Array.isArray(r.select))u.Select=r.select;else if(!n.Utility.isNullOrUndefined(r.select))throw n._Internal.RuntimeError._createInvalidArgError("option.select");if(typeof r.expand=="string")u.Expand=n.Utility._parseSelectExpand(r.expand);else if(Array.isArray(r.expand))u.Expand=r.expand;else if(!n.Utility.isNullOrUndefined(r.expand))throw n._Internal.RuntimeError._createInvalidArgError("option.expand");if(typeof r.top=="number")u.Top=r.top;else if(!n.Utility.isNullOrUndefined(r.top))throw n._Internal.RuntimeError._createInvalidArgError("option.top");if(typeof r.skip=="number")u.Skip=r.skip;else if(!n.Utility.isNullOrUndefined(r.skip))throw n._Internal.RuntimeError._createInvalidArgError("option.skip");}else u=i.parseStrictLoadOption(t);else if(!n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError("option");return u},i.prototype.loadRecursive=function(t,r,u){var f,e,o;if(!n.Utility.isPlainJsonObject(r))throw n._Internal.RuntimeError._createInvalidArgError("options");f={};for(e in r)f[e]=i._parseQueryOption(r[e]);o=n.ActionFactory.createRecursiveQueryAction(this,t,{Queries:f,MaxDepth:u});this._pendingRequest.addActionResultHandler(o,t)},i.prototype.trace=function(t){n.ActionFactory.createTraceAction(this,t,!0)},i.prototype._processOfficeJsErrorResponse=function(n,t){},i.prototype.syncPrivateMain=function(){var t=this;return n.Utility._createPromiseFromResult(null).then(function(){if(!t.m_requestUrlAndHeaderInfo)return t.m_requestUrlAndHeaderInfoResolver._resolveRequestUrlAndHeaderInfo().then(function(i){if(t.m_requestUrlAndHeaderInfo=i,t.m_requestUrlAndHeaderInfo||(t.m_requestUrlAndHeaderInfo={url:n.Constants.localDocument,headers:{}}),n.Utility.isNullOrEmptyString(t.m_requestUrlAndHeaderInfo.url)&&(t.m_requestUrlAndHeaderInfo.url=n.Constants.localDocument),t.m_requestUrlAndHeaderInfo.headers||(t.m_requestUrlAndHeaderInfo.headers={}),typeof t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull=="function"){var r=t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull();r&&(t._requestExecutor=r)}})}).then(function(){var n=t._pendingRequest;return t.m_pendingRequest=null,t.processPreSyncPromises(n).then(function(){return t.syncPrivate(n)})})},i.prototype.syncPrivate=function(t){var f=this,e,o,s,u,h,r,i;return t.hasActions?(e=t.buildRequestMessageBody(),o=t.flags,this._requestExecutor||(this._requestExecutor=n.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)?new n.OfficeJsRequestExecutor(this):new n.HttpRequestExecutor),s=this._requestExecutor,u={},n.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,u),n.Utility._copyHeaders(this.m_customRequestHeaders,u),h={Url:this.m_requestUrlAndHeaderInfo.url,Headers:u,Body:e},t.invalidatePendingInvalidObjectPaths(),r=null,i=null,this._lastSyncStart=performance.now(),s.executeAsync(this._customData,o,h).then(function(u){return f._lastSyncEnd=performance.now(),r=f.processRequestExecutorResponseMessage(t,u),f.processPendingEventHandlers(t).catch(function(t){n.Utility.log("Error in processPendingEventHandlers");n.Utility.log(JSON.stringify(t));i=t})}).then(function(){var u,f;if(r){n.Utility.log("Throw error from response: "+JSON.stringify(r));throw r;}if(i){n.Utility.log("Throw error from ProcessEventHandler: "+JSON.stringify(i));u=null;i instanceof n._Internal.RuntimeError?(u=i,u.traceMessages=t._responseTraceMessages):(f=null,f=typeof i=="string"?i:i.message,n.Utility.isNullOrEmptyString(f)&&(f=n.Utility._getResourceString(n.ResourceStrings.cannotRegisterEvent)),u=new n._Internal.RuntimeError({code:n.ErrorCodes.cannotRegisterEvent,message:f,traceMessages:t._responseTraceMessages}));throw u;}})):this.processPendingEventHandlers(t)},i.prototype.processRequestExecutorResponseMessage=function(t,i){var e,r,o,u,f;if(i.Body&&i.Body.TraceIds&&t._setResponseTraceIds(i.Body.TraceIds),e=t._responseTraceMessages,r=null,i.Body&&(i.Body.Error&&i.Body.Error.ActionIndex>=0&&(o=new n.RequestPrettyPrinter(this._rootObjectPropertyName,t._objectPaths,t._actions),r=o.processForDebugStatementInfo(i.Body.Error.ActionIndex)),u=null,i.Body.Results?u=i.Body.Results:i.Body.ProcessedResults&&i.Body.ProcessedResults.Results&&(u=i.Body.ProcessedResults.Results),u)){this._processingResult=!0;try{t.processResponse(u)}finally{this._processingResult=!1}}if(n.Utility.isNullOrEmptyString(i.ErrorCode)){if(i.Body&&i.Body.Error)return f={errorLocation:i.Body.Error.Location},r&&(f.statement=r.statement,f.surroundingStatements=r.surroundingStatements),new n._Internal.RuntimeError({code:i.Body.Error.Code,message:i.Body.Error.Message,traceMessages:e,debugInfo:f})}else return new n._Internal.RuntimeError({code:i.ErrorCode,message:i.ErrorMessage,traceMessages:e});return null},i.prototype.processPendingEventHandlers=function(t){for(var u,i=n.Utility._createPromiseFromResult(null),r=0;r0&&(typeof r[0]=="string"||i.isRequestUrlAndHeaderInfo(r[0])||i.isRequestUrlAndHeaderInfoResolver(r[0]))&&(y=r[0],h=1),r.length==h+1)l=u,v=r[h+0];else if(r.length==h+2){if(n.Utility.isNullOrUndefined(r[h+0]))l=u;else if(r[h+0]instanceof n.ClientObject)l=function(){return r[h+0].context};else if(r[h+0]instanceof i)l=function(){return r[h+0]};else if(Array.isArray(r[h+0])){if(c=r[h+0],c.length==0)return i.createErrorPromise(t);for(a=0;a0){var n=c._onRunFinishedNotifiers.shift();n()}if(a)return l;else throw l;})},i.prototype._nextId=function(){return++this.m_nextId},i}();n.ClientRequestContext=i}(OfficeExtension||(OfficeExtension={})),function(n){var i=function(){function t(n){this.m_type=n}return Object.defineProperty(t.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){(this.m_isLoaded=!0,typeof t=="object"&&t&&t._IsNull)||(this.m_value=this.m_type===1?n.Utility.adjustToDateTime(t):t)},t}(),t;n.ClientResult=i;t=function(){function t(n,t){this.m_proxy=n;this.m_shouldPolyfill=t}return Object.defineProperty(t.prototype,"proxy",{get:function(){return this.m_proxy},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"retrieveResult.data"}});return this.m_data},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(n){if(this.m_isLoaded=!0,typeof n=="object"&&n&&n._IsNull){this.m_data=null;return}this.m_data=this.m_shouldPolyfill?this.changePropertyNameToCamelLowerCase(n):n},t.prototype.changePropertyNameToCamelLowerCase=function(t){var o=95,u,i,r,f,e;if(Array.isArray(t)){for(i=[],u=0;u0&&(r=!0),t=document.createElement("a"),t.href=this.m_url,r?t.hash=t.hash.length===0||t.hash==="#"?"#"+i:t.hash+"&"+i:t.search=t.search.length===0||t.search==="?"?"?"+i:t.search+"&"+i,t.href},f.prototype.init=function(){var t=this,i;return window.addEventListener("message",this.m_onMessageHandler),i=this._getIFrameSrc(),new n._Internal.OfficePromise(function(r,u){var f=document.createElement("iframe");t.m_options.id&&(f.id=t.m_options.id);f.style.height=t.m_options.height;f.style.width=t.m_options.width;f.src=i;t.m_options.container.appendChild(f);t.m_timeoutId=setTimeout(function(){t.close();var i=n.Utility.createRuntimeError(n.ErrorCodes.timeout,n.Utility._getResourceString(n.ResourceStrings.timeout),"EmbeddedSession.init");u(i)},t.m_options.timeoutInMilliseconds);t.m_promiseResolver=r})},f.prototype._invoke=function(n,t,u){if(!this.m_enabled){t(i.InternalError,null);return}r.invokeRequestModifier&&(u=r.invokeRequestModifier(u));this._sendMessageWithCallback(this.m_id++,n,u,function(n){r.invokeResponseModifier&&(n=r.invokeResponseModifier(n));var u=n.Error;delete n.Error;t(u||i.Success,n)})},f.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler);window.clearTimeout(this.m_timeoutId);this.m_enabled=!1},Object.defineProperty(f.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),f.prototype._createRequestExecutorOrNull=function(){return new e(this)},f.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},f.prototype._registerEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.RegisterEventCommand,{EventId:i,TargetId:r},function(){n(null)})})},f.prototype._unregisterEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.UnregisterEventCommand,{EventId:i,TargetId:r},function(){n()})})},f.prototype._onMessage=function(n){var u=this,i,e,r,o,s;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===n.source&&this.m_chosenOrigin===n.origin)){if(i=n.data,i&&i[t.CommandKey]===t.ApiReadyCommand){!this.m_chosenWindow&&this._isValidDescendant(n.source)&&i[t.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=n.source,this.m_chosenOrigin=n.origin,this._sendMessageWithCallback(this.m_id++,t.GetAppContextCommand,null,function(n){u._setupContext(n);window.clearTimeout(u.m_timeoutId);u.m_promiseResolver()}));return}if(i&&i[t.CommandKey]===t.FireEventCommand){var f=i[t.ParamsKey],h=f.EventId,c=f.TargetId,l=f.Data;if(this.m_sessionEventManager)for(e=this.m_sessionEventManager.getHandlers(h,c),r=0;r=0;o--)if(r[o]===e[i].handler){r.splice(o,1);break}break;case 2:r=[];break}}return s&&(!this.m_registered&&r.length>0?u=u.then(function(){return f.m_eventInfo.registerFunc(f.m_callback)}).then(function(){return f.m_registered=!0}):this.m_registered&&r.length==0&&(u=u.then(function(){return f.m_eventInfo.unregisterFunc(f.m_callback)}).catch(function(t){n.Utility.log("Error when unregister event: "+JSON.stringify(t))}).then(function(){return f.m_registered=!1})),u=u.then(function(){return f.m_handlers=r})),u},t.prototype.fireEvent=function(t){for(var u,f,r=[],i=0;i=0;e--)if(f[e]===u){f.splice(e,1);break}return f.length===0?this.m_unregisterEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i}();n.EventRegistration=i}(OfficeExtension||(OfficeExtension={})),function(n){function r(n){t._testReadyImpl=n}function u(n){t.getGenericEventRegistration()._handleRichApiMessage(n)}var t=function(){function t(){this.m_eventRegistration=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this));this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this)}return t.prototype.ready=function(){var i=this;return this.m_ready||(this.m_ready=t._testReadyImpl?t._testReadyImpl().then(function(){i.m_isReady=!0}):n._Internal.officeJsEventRegistration.register(5,"",this.m_richApiMessageHandler).then(function(){i.m_isReady=!0})),this.m_ready},Object.defineProperty(t.prototype,"isReady",{get:function(){return this.m_isReady},enumerable:!0,configurable:!0}),t.prototype.register=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.register(n,t,i)})},t.prototype.unregister=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.unregister(n,t,i)})},t.prototype._registerEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._unregisterEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._handleRichApiMessage=function(t){var r,i,u,e,f;if(t&&t.entries)for(r=0;r0))for(e=JSON.parse(i.message),i.isRemoteOverride&&(e.source=n.Constants.eventSourceRemote),f=0;f=0;u--)if(n[u]===i){n.splice(u,1);break}n.length==0&&t.getGenericEventRegistration().unregister(r.m_genericEventInfo.eventType,r.m_genericEventInfo.getTargetIdFunc(),r._callback)})},r.prototype.removeAll=function(){},r}(n.EventHandlers);n.GenericEventHandlers=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var s=JSON.stringify(u.Body),f=u.Url,e,o;if(f.charAt(f.length-1)!="/"&&(f=f+"/"),f=f+n.Constants.processQuery,f=f+"?"+n.Constants.flags+"="+r.toString(),e={method:"POST",url:f,headers:{},body:s},e.headers[n.Constants.sourceLibHeader]=t.SourceLibHeaderValue,e.headers["CONTENT-TYPE"]="application/json",u.Headers)for(o in u.Headers)e.headers[o]=u.Headers[o];return n.HttpUtility.sendRequest(e).then(function(t){var i,r;return t.statusCode===200?i={ErrorCode:null,ErrorMessage:null,Headers:t.headers,Body:JSON.parse(t.body)}:(n.Utility.log("Error Response:"+t.body),r=n.Utility._parseErrorResponse(t),i={ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:t.headers,Body:null}),i})},t.SourceLibHeaderValue="officejs-rest",t}();n.HttpRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.setCustomSendRequestFunc=function(n){t.s_customSendRequestFunc=n},t.xhrSendRequestFunc=function(t){return new n._Internal.OfficePromise(function(i,r){var u=new XMLHttpRequest,f;if(u.open(t.method,t.url),u.onload=function(){var t={statusCode:u.status,headers:n.Utility._parseHttpResponseHeaders(u.getAllResponseHeaders()),body:u.responseText};i(t)},u.onerror=function(){r(new n._Internal.RuntimeError({code:n.ErrorCodes.connectionFailure,message:n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,u.statusText)}))},t.headers)for(f in t.headers)u.setRequestHeader(f,t.headers[f]);u.send(t.body)})},t.sendRequest=function(n){t.validateAndNormalizeRequest(n);var i=t.s_customSendRequestFunc;return i||(i=t.xhrSendRequestFunc),i(n)},t.setCustomSendLocalDocumentRequestFunc=function(n){t.s_customSendLocalDocumentRequestFunc=n},t.sendLocalDocumentRequest=function(n){t.validateAndNormalizeRequest(n);var i;return i=t.s_customSendLocalDocumentRequestFunc||t.officeJsSendLocalDocumentRequestFunc,i(n)},t.officeJsSendLocalDocumentRequestFunc=function(t){t=n.Utility._validateLocalDocumentRequest(t);var i=n.Utility._buildRequestMessageSafeArray(t);return new n._Internal.OfficePromise(function(t,r){OSF.DDA.RichApi.executeRichApiRequestAsync(i,function(i){var r;r=i.status=="succeeded"?{statusCode:n.RichApiMessageUtility.getResponseStatusCode(i),headers:n.RichApiMessageUtility.getResponseHeaders(i),body:n.RichApiMessageUtility.getResponseBody(i)}:n.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(i.error.code,i.error.message);n.Utility.log(JSON.stringify(r));t(r)})})},t.validateAndNormalizeRequest=function(t){if(n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"request"});n.Utility.isNullOrEmptyString(t.method)&&(t.method="GET");t.method=t.method.toUpperCase()},t.logRequest=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Request---"),n.Utility.log(i.method+" "+i.url),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t.logResponse=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Response---"),n.Utility.log(""+i.statusCode),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t._logBody=!1,t}();n.HttpUtility=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_clientObject=n}return n.prototype._handleResult=function(n){this.m_clientObject._handleIdResult(n)},n}();n.InstantiateActionResultHandler=t}(OfficeExtension||(OfficeExtension={})),function(n){}(OfficeExtension||(OfficeExtension={})),function(n){var u=function(){function t(n){this.m_session=n}return t.prototype.executeAsync=function(t,r,u){var e={url:n.Constants.processQuery,method:"POST",headers:u.Headers,body:u.Body},f={id:i.nextId(),type:1,flags:r,message:e};return n.Utility.log(JSON.stringify(f)),this.m_session.sendMessageToHost(f).then(function(t){var i,r,u;return n.Utility.log("Received response: "+JSON.stringify(t)),i=t.message,i.statusCode===200?r={ErrorCode:null,ErrorMessage:null,Headers:i.headers,Body:i.body}:(n.Utility.log("Error Response:"+i.body),u=n.Utility._parseErrorResponse(i),r={ErrorCode:u.errorCode,ErrorMessage:u.errorMessage,Headers:i.headers,Body:null}),r})},t}(),i=function(i){function r(n){var t=this;i.call(this);this.m_promiseResolver={};this.m_bridge=n;this.m_bridge.onMessageFromHost=function(n){t.onMessageFromHost(n)}}return __extends(r,i),r.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},r.prototype._createRequestExecutorOrNull=function(){return n.Utility.log("NativeBridgeSession::CreateRequestExecutor"),new u(this)},Object.defineProperty(r.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),r.init=function(t){if(t&&typeof t=="object"){var i=new r(t);n.ClientRequestContext._overrideSession=i;n.HttpUtility.setCustomSendLocalDocumentRequestFunc(function(n){var t={id:r.nextId(),type:1,flags:0,message:n};return i.sendMessageToHost(t).then(function(n){return n.message})})}},r.prototype.sendMessageToHost=function(t){var i=this;return this.m_bridge.sendMessageToHost(JSON.stringify(t)),new n._Internal.OfficePromise(function(n,r){i.m_promiseResolver[t.id]=n})},r.prototype.onMessageFromHost=function(n){var i,r;n==="test"?t._testFunc&&t._testFunc():(i=JSON.parse(n),typeof i.id=="number"&&(r=this.m_promiseResolver[i.id],r&&r(i),delete this.m_promiseResolver[i.id]))},r.nextId=function(){return r.s_nextId++},r.s_nextId=1,r}(n.SessionBase),r=function(){function n(){}return n.init=function(n){i.init(n)},n}(),t;n.HostBridge=r;typeof _richApiNativeBridge=="object"&&_richApiNativeBridge&&r.init(_richApiNativeBridge);t=function(){function n(){}return n.setTestFunc=function(t){n._testFunc=t},n}();n.HostBridgeTest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){this.m_objectPathInfo=n;this.m_parentObjectPath=t;this.m_isWriteOperation=!1;this.m_isCollection=i;this.m_isInvalidAfterRequest=r;this.m_isValid=!0}return Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},set:function(n){this.m_isWriteOperation=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRestrictedResourceAccess",{get:function(){return this.m_isRestrictedResourceAccess},set:function(n){this.m_isRestrictedResourceAccess=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(n){this.m_argumentObjectPaths=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(n){this.m_isValid=n;!n&&this.m_objectPathInfo.ObjectPathType===6&&this.m_savedObjectPathInfo&&(t.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(n){this.m_getByIdMethodName=n},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null},t.prototype.updateUsingObjectData=function(i){var e=i[n.Constants.referenceId],f,o,u,r;if(!n.Utility.isNullOrEmptyString(e)){this.m_savedObjectPathInfo||this.isInvalidAfterRequest||!t.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)||(f={},t.copyObjectPathInfo(this.m_objectPathInfo,f),this.m_savedObjectPathInfo={pathInfo:f,parent:this.m_parentObjectPath});this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=e;this.m_objectPathInfo.ArgumentInfo={};delete this.m_objectPathInfo.ParentObjectPathId;this.m_parentObjectPath=null;this.m_argumentObjectPaths=null;return}if(o=this.parentObjectPath&&this.parentObjectPath.isCollection,u=this.getByIdMethodName,(o||!n.Utility.isNullOrEmptyString(u))&&(r=i[n.Constants.id],n.Utility.isNullOrUndefined(r)&&(r=i[n.Constants.idPrivate]),!n.Utility.isNullOrUndefined(r))){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;n.Utility.isNullOrEmptyString(u)?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=u,this.m_getByIdMethodName=null);this.isWriteOperation=!1;this.m_objectPathInfo.ArgumentInfo={};this.m_objectPathInfo.ArgumentInfo.Arguments=[r];this.m_argumentObjectPaths=null;return}},t.isRestorableObjectPath=function(n){return n===1||n===5||n===3||n===4},t.copyObjectPathInfo=function(n,t){t.Id=n.Id;t.ArgumentInfo=n.ArgumentInfo;t.Name=n.Name;t.ObjectPathType=n.ObjectPathType;t.ParentObjectPathId=n.ParentObjectPathId},t}();n.ObjectPath=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createGlobalObjectObjectPath=function(t){var i={Id:t._nextId(),ObjectPathType:1,Name:""};return new n.ObjectPath(i,null,!1,!1)},t.createNewObjectObjectPath=function(t,i,r,u){var e={Id:t._nextId(),ObjectPathType:2,Name:i},f=new n.ObjectPath(e,null,r,!1);return f.isRestrictedResourceAccess=u,f},t.createPropertyObjectPath=function(t,i,r,u,f,e){var s={Id:t._nextId(),ObjectPathType:4,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id},o=new n.ObjectPath(s,i._objectPath,u,f);return o.isRestrictedResourceAccess=e,o},t.createIndexerObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i._objectPath,!1,!1)},t.createIndexerObjectPathUsingParentPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i,!1,!1)},t.createMethodObjectPath=function(t,i,r,u,f,e,o,s,h){var l={Id:t._nextId(),ObjectPathType:3,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},a=n.Utility.setMethodArguments(t,l.ArgumentInfo,f),c=new n.ObjectPath(l,i._objectPath,e,o);return c.argumentObjectPaths=a,c.isWriteOperation=u!=1,c.getByIdMethodName=s,c.isRestrictedResourceAccess=h,c},t.createReferenceIdObjectPath=function(t,i){var r={Id:t._nextId(),ObjectPathType:6,Name:i,ArgumentInfo:{}};return new n.ObjectPath(r,null,!1,!1)},t.createChildItemObjectPathUsingIndexerOrGetItemAt=function(i,r,u,f,e){var o=f[n.Constants.id];return n.Utility.isNullOrUndefined(o)&&(o=f[n.Constants.idPrivate]),i&&!n.Utility.isNullOrUndefined(o)?t.createChildItemObjectPathUsingIndexer(r,u,f):t.createChildItemObjectPathUsingGetItemAt(r,u,f,e)},t.createChildItemObjectPathUsingIndexer=function(t,i,r){var f=r[n.Constants.id],u;return n.Utility.isNullOrUndefined(f)&&(f=r[n.Constants.idPrivate]),u=u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u.ArgumentInfo.Arguments=[f],new n.ObjectPath(u,i._objectPath,!1,!1)},t.createChildItemObjectPathUsingGetItemAt=function(t,i,r,u){var e=r[n.Constants.index],f;return e&&(u=e),f={Id:t._nextId(),ObjectPathType:3,Name:n.Constants.getItemAt,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f.ArgumentInfo.Arguments=[u],new n.ObjectPath(f,i._objectPath,!1,!1)},t}();n.ObjectPathFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_context=n}return t.prototype.executeAsync=function(i,r,u){var f=this,e=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n._Internal.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(e,function(i){n.Utility.log("Response:");n.Utility.log(JSON.stringify(i));var r;i.status=="succeeded"?r=n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBody(i),n.RichApiMessageUtility.getResponseHeaders(i)):(r=n.RichApiMessageUtility.buildResponseOnError(i.error.code,i.error.message),f.m_context._processOfficeJsErrorResponse(i.error.code,r));t(r)})})},t.SourceLibHeaderValue="officejs",t}();n.OfficeJsRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){n.OfficeRequire=function(){return null}()})(t=n._Internal||(n._Internal={})),function(n){var t;(function(t){function i(){return function(){"use strict";function vt(n){return typeof n=="function"||typeof n=="object"&&n!==null}function b(n){return typeof n=="function"}function yt(n){return typeof n=="object"&&n!==null}function wt(n){k=n}function bt(n){f=n}function ni(){var t=process.nextTick,n=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&n[1]==="0"&&n[2]==="10"&&(t=setImmediate),function(){t(c)}}function tr(){return function(){pt(c)}}function ti(){var n=0,i=new it(c),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function ii(){var n=new MessageChannel;return n.port1.onmessage=c,function(){n.port2.postMessage(0)}}function ri(){return function(){setTimeout(c,1)}}function c(){for(var t,i,n=0;n=0?(n=n.substring(t+5,n.length),n<"14.14393"?!0:!1):!1}function i(){return typeof window=="undefined"&&typeof Promise=="function"?Promise:typeof window!="undefined"&&window.Promise?t()?n.PromiseImpl.Init():window.Promise:n.PromiseImpl.Init()}n.OfficePromise=i()}(t=n._Internal||(n._Internal={}));i=t.OfficePromise;n.Promise=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this._autoCleanupList={};this.m_context=n}return t.prototype.add=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._addCommon(n,!0)}):this._addCommon(n,!0)},t.prototype._autoAdd=function(n){this._addCommon(n,!1);this._autoCleanupList[n._objectPath.objectPathInfo.Id]=n},t.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(t,i){var r=this.m_context._autoCleanup&&!t[n.Constants.isTracked]&&t!==this.m_context._rootObject&&i&&!n.Utility.isNullOrEmptyString(i[n.Constants.referenceId]);r&&(this._autoCleanupList[t._objectPath.objectPathInfo.Id]=t,t[n.Constants.isTracked]=!0)},t.prototype._addCommon=function(t,i){if(t[n.Constants.isTracked]){i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id];return}var r=t[n.Constants.referenceId];n.Utility.isNullOrEmptyString(r)&&t._KeepReference&&(t._KeepReference(),n.ActionFactory.createInstantiateAction(this.m_context,t),i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id],t[n.Constants.isTracked]=!0)},t.prototype.remove=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._removeCommon(n)}):this._removeCommon(n)},t.prototype._removeCommon=function(t){var r=t[n.Constants.referenceId],i;n.Utility.isNullOrEmptyString(r)||(i=this.m_context._rootObject,i._RemoveReference&&i._RemoveReference(r),delete t[n.Constants.isTracked])},t.prototype._retrieveAndClearAutoCleanupList=function(){var n=this._autoCleanupList;return this._autoCleanupList={},n},t}();n.TrackedObjects=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){n||(n="root");this.m_globalObjName=n;this.m_referencedObjectPaths=t;this.m_actions=i;this.m_statements=[];this.m_variableNameForObjectPathMap={};this.m_variableNameToObjectPathMap={};this.m_declaredObjectPathMap={};this.m_showDispose=r}return t.prototype.process=function(){this.m_showDispose&&n.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions);for(var t=0;t=0&&this.m_statements.length>i+o+1)break;if(i<0)return null;for(f=i-o,f<0&&(f=0),e=i+1+o,e>this.m_statements.length&&(e=this.m_statements.length),r=[],f!=0&&r.push("..."),s=f;s>>>>"),r.push(this.m_statements[i]),r.push("// <<<<<"),h=i+1;h0)?(r=i.map(function(n){return u.getObjVarName(n)}).join(", "),n+" // And then dispose {"+r+"}"):n},t.prototype.buildQueryExpression=function(n){if(n.actionInfo.QueryInfo){var t={};return t.select=n.actionInfo.QueryInfo.Select,t.expand=n.actionInfo.QueryInfo.Expand,t.skip=n.actionInfo.QueryInfo.Skip,t.top=n.actionInfo.QueryInfo.Top,typeof t.top=="undefined"&&typeof t.skip=="undefined"&&typeof t.expand=="undefined"?typeof t.select=="undefined"?"":JSON.stringify(t.select):JSON.stringify(t)}return""},t.prototype.buildObjectPathExpressionWithParent=function(n){var t=n.objectPathInfo.ObjectPathType==5||n.objectPathInfo.ObjectPathType==3||n.objectPathInfo.ObjectPathType==4;return t&&n.objectPathInfo.ParentObjectPathId?this.getObjVarName(n.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(n):this.buildObjectPathExpression(n)},t.prototype.buildObjectPathExpression=function(t){switch(t.objectPathInfo.ObjectPathType){case 1:return"context."+this.m_globalObjName;case 5:return"getItem("+this.buildArgumentsExpression(t.objectPathInfo.ArgumentInfo)+")";case 3:return n.Utility._toCamelLowerCase(t.objectPathInfo.Name)+"("+this.buildArgumentsExpression(t.objectPathInfo.ArgumentInfo)+")";case 2:return t.objectPathInfo.Name+".newObject()";case 7:return"null";case 4:return n.Utility._toCamelLowerCase(t.objectPathInfo.Name);case 6:return"context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(t.objectPathInfo.Name)+")"}},t.prototype.buildArgumentsExpression=function(n){var t="",i;if(!n.Arguments)return t;for(i=0;i0&&(t=t+", "),t=t+this.buildArgumentLiteral(n.Arguments[i],n.ReferencedObjectPathIds?n.ReferencedObjectPathIds[i]:null);return t==="undefined"&&(t=""),t},t.prototype.buildArgumentLiteral=function(n,t){return typeof n=="number"&&n===t?this.getObjVarName(t):JSON.stringify(n)},t.prototype.getObjVarNameBase=function(t){var u="v",f=this.m_referencedObjectPaths[t],i,r;switch(f.objectPathInfo.ObjectPathType){case 1:u=this.m_globalObjName;break;case 4:u=n.Utility._toCamelLowerCase(f.objectPathInfo.Name);break;case 3:i=f.objectPathInfo.Name;i.length>3&&i.substr(0,3)==="Get"&&(i=i.substr(3));u=n.Utility._toCamelLowerCase(i);break;case 5:r=this.getObjVarNameBase(f.objectPathInfo.ParentObjectPathId);u=r.charAt(r.length-1)==="s"?r.substr(0,r.length-1):r+"Item";break}return u},t.prototype.getObjVarName=function(n){var t,i;if(this.m_variableNameForObjectPathMap[n])return this.m_variableNameForObjectPathMap[n];if(t=this.getObjVarNameBase(n),!this.m_variableNameToObjectPathMap[t])return this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t;for(i=1;this.m_variableNameToObjectPathMap[t+i.toString()];)i++;return t=t+i.toString(),this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t},t}();n.RequestPrettyPrinter=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.cannotRegisterEvent="CannotRegisterEvent",n.connectionFailureWithStatus="ConnectionFailureWithStatus",n.connectionFailureWithDetails="ConnectionFailureWithDetails",n.invalidObjectPath="InvalidObjectPath",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.invalidArgumentGeneric="InvalidArgumentGeneric",n.propertyNotLoaded="PropertyNotLoaded",n.runMustReturnPromise="RunMustReturnPromise",n.timeout="Timeout",n.propertyDoesNotExist="PropertyDoesNotExist",n.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",n.moreInfoInnerError="MoreInfoInnerError",n.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",n.valueNotLoaded="ValueNotLoaded",n.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage",n.invalidOperationInCellEditMode="InvalidOperationInCellEditMode",n.customFunctionDefintionMissing="CustomFunctionDefintionMissing",n.customFunctionImplementationMissing="CustomFunctionImplementationMissing",n.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars",n.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit",n.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch",n.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing",n.apiNotFoundDetails="ApiNotFoundDetails",n}();n.ResourceStrings=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.CannotRegisterEvent="The event handler cannot be registered.",n.ConnectionFailureWithStatus="The request failed with status code of {0}.",n.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}",n.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",n.InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',n.InvalidRequestContext="Cannot use the object across different request contexts.",n.PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",n.RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',n.Timeout="The operation has timed out.",n.ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.',n.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.",n.InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.",n.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions.",n.CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.",n.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods.",n.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name.",n.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.",n.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.",n.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.",n}();n.ResourceStringValues=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.buildMessageArrayForIRequestExecutor=function(i,r,u,f){var o=JSON.stringify(u.Body),e;return n.Utility.log("Request:"),n.Utility.log(o),e={},e[n.Constants.sourceLibHeader]=f,t.buildRequestMessageSafeArray(i,r,"POST","ProcessQuery",e,o)},t.buildResponseOnSuccess=function(n,t){var i={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return i.Body=JSON.parse(n),i.Headers=t,i},t.buildResponseOnError=function(i,r){var u={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return u.ErrorCode=n.ErrorCodes.generalException,u.ErrorMessage=r,i==t.OfficeJsErrorCode_ooeNoCapability?u.ErrorCode=n.ErrorCodes.accessDenied:i==t.OfficeJsErrorCode_ooeActivityLimitReached?u.ErrorCode=n.ErrorCodes.activityLimitReached:i==t.OfficeJsErrorCode_ooeInvalidOrTimedOutSession&&(u.ErrorCode=n.ErrorCodes.invalidOrTimedOutSession,u.ErrorMessage=n.Utility._getResourceString(n.ResourceStrings.invalidOrTimedOutSessionMessage)),u},t.buildHttpResponseFromOfficeJsError=function(i,r){var f=500,u={};return u.error={},u.error.code=n.ErrorCodes.generalException,u.error.message=r,i===t.OfficeJsErrorCode_ooeNoCapability?(f=403,u.error.code=n.ErrorCodes.accessDenied):i===t.OfficeJsErrorCode_ooeActivityLimitReached&&(f=429,u.error.code=n.ErrorCodes.activityLimitReached),{statusCode:f,headers:{},body:JSON.stringify(u)}},t.buildRequestMessageSafeArray=function(n,t,i,r,u,f){var e=[],o;if(u)for(o in u)e.push(o),e.push(u[o]);var s=0,h="",c="",l="";return[n,i,r,e,f,s,t,h,c,l]},t.getResponseBody=function(n){return t.getResponseBodyFromSafeArray(n.value.data)},t.getResponseHeaders=function(n){return t.getResponseHeadersFromSafeArray(n.value.data)},t.getResponseBodyFromSafeArray=function(n){var t=n[2],i;return typeof t=="string"?t:(i=t,i.join(""))},t.getResponseHeadersFromSafeArray=function(n){var i=n[1],r,t;if(!i)return null;for(r={},t=0;t0&&f.push(i);return f},t.toJson=function(n,t,i,r){var e={},u,f;for(u in t)f=t[u],typeof f!="undefined"&&(e[u]=f);for(u in i)f=i[u],typeof f!="undefined"&&(e[u]=f.toJSON());return r&&(e.items=r.map(function(n){return n.toJSON()})),e},t.throwError=function(i,r,u){throw new n._Internal.RuntimeError({code:i,message:t._getResourceString(i,r),debugInfo:u?{errorLocation:u}:undefined});},t.createRuntimeError=function(t,i,r){return new n._Internal.RuntimeError({code:t,message:i,debugInfo:{errorLocation:r}})},t._getResourceString=function(i,r){var u,e,f,o;return typeof window!="undefined"&&window.Strings&&window.Strings.OfficeOM&&(e="L_"+i,f=window.Strings.OfficeOM[e],f&&(u=f)),u||(u=n.ResourceStringValues[i]),u||(u=i),t.isNullOrUndefined(r)||(Array.isArray(r)?(o=r,u=t._formatString(u,o)):u=u.replace("{0}",r)),u},t._formatString=function(t,i){return t.replace(/\{\d\}/g,function(t){var r=parseInt(t.substr(1,t.length-2));if(r0?".":"")+i;break;case 3:i=t.normalizeName(n.objectPathInfo.Name)+"()"+(i.length>0?".":"")+i;break;case 4:i=t.normalizeName(n.objectPathInfo.Name)+(i.length>0?".":"")+i;break;case 5:i="getItem()"+(i.length>0?".":"")+i;break;case 6:i="_reference()"+(i.length>0?".":"")+i;break}n=n.parentObjectPath}return i},t._createPromiseFromResult=function(t){return new n._Internal.OfficePromise(function(n,i){n(t)})},t._createTimeoutPromise=function(t){return new n._Internal.OfficePromise(function(n,i){setTimeout(function(){n(null)},t)})},t.promisify=function(t){return new n._Internal.OfficePromise(function(n,i){var r=function(t){t.status=="failed"?i(t.error):n(t.value)};t(r)})},t._addActionResultHandler=function(n,t,i){n.context._pendingRequest.addActionResultHandler(t,i)},t._handleNavigationPropertyResults=function(n,i,r){for(var u=0;u0},t._getLocalDocumentUrlPrefixLength=function(n){for(var i=["http://document.localhost","https://document.localhost","//document.localhost"],r=n.toLowerCase().trim(),t=0;t0))for(s=i.url.substr(f+1),e=s.split("&"),u=0;u0&&(f=i.substr(0,u),e=i.substr(u+1),f=t.trim(f),e=t.trim(e),s[f.toUpperCase()]=e));return s},t._parseErrorResponse=function(i){var r=null,f,e,u;if(t.isPlainJsonObject(i.body))r=i.body;else if(!t.isNullOrEmptyString(i.body)){f=t.trim(i.body);try{r=JSON.parse(f)}catch(o){t.log("Error when parse "+f)}}return!t.isNullOrUndefined(r)&&typeof r=="object"&&r.error?(u=r.error.code,e=t._getResourceString(n.ResourceStrings.connectionFailureWithDetails,[i.statusCode.toString(),r.error.code,r.error.message])):e=t._getResourceString(n.ResourceStrings.connectionFailureWithStatus,i.statusCode.toString()),t.isNullOrEmptyString(u)&&(u=n.ErrorCodes.connectionFailure),{errorCode:u,errorMessage:e}},t._copyHeaders=function(n,t){if(n&&t)for(var i in n)t[i]=n[i]},t._toCamelLowerCase=function(n){if(t.isNullOrEmptyString(n))return n;for(var i=0;i=65&&n.charCodeAt(i)<=90;)i++;return i 6 && v.slice(0, 5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) { + d=new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + } + else { + value=Sys.Serialization.JavaScriptSerializer.deserialize(value, true); + } + ret[key]=value; + } + catch (ex) { + } + } + return ret; + }, loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) { if (url && callback) { var doc=window.document; @@ -837,6 +885,14 @@ OSF.OUtil=(function () { } } }, + removeClass: function OSF_OUtil$removeClass(elmt, val) { + if (OSF.OUtil.hasClass(elmt, val)) { + var className=elmt.getAttribute(_classN); + var reg=new RegExp('(\\s|^)'+val+'(\\s|$)'); + className=className.replace(reg, ''); + elmt.setAttribute(_classN, className); + } + }, hasClass: function OSF_OUtil$hasClass(elmt, clsName) { var className=elmt.getAttribute(_classN); return className && className.match(new RegExp('(\\s|^)'+clsName+'(\\s|$)')); @@ -973,6 +1029,12 @@ OSF.OUtil.Guid=(function () { })(); window.OSF=OSF; OSF.OUtil.setNamespace("OSF", window); +OSF.MessageIDs={ + "FetchBundleUrl": 0, + "LoadReactBundle": 1, + "LoadBundleSuccess": 2, + "LoadBundleError": 3 +}; OSF.AppName={ Unsupported: 0, Excel: 1, @@ -1001,7 +1063,9 @@ OSF.AppName={ OneNoteWinRT: 8388608, ExcelAndroid: 8388609, VisioWebApp: 8388610, - OneNoteIOS: 8388611 + OneNoteIOS: 8388611, + WordAndroid: 8388613, + PowerpointAndroid: 8388614 }; OSF.InternalPerfMarker={ DataCoercionBegin: "Agave.HostCall.CoerceDataStart", @@ -1031,7 +1095,9 @@ OSF.AgaveHostAction={ "EscExit": 15, "F2Exit": 16, "ExitNoFocusable": 17, - "ExitNoFocusableShift": 18 + "ExitNoFocusableShift": 18, + "MouseEnter": 19, + "MouseLeave": 20 }; OSF.SharedConstants={ "NotificationConversationIdSuffix": '_ntf' @@ -1167,6 +1233,8 @@ Microsoft.Office.WebExtension.Parameters={ HostType: "hostType", ForceConsent: "forceConsent", ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + Reserved: "reserved", Xml: "xml", Namespace: "namespace", Prefix: "prefix", @@ -1199,7 +1267,9 @@ Microsoft.Office.WebExtension.Parameters={ DisplayInIframe: "displayInIframe", MessageContent: "messageContent", HideTitle: "hideTitle", - AppCommandInvocationCompletedData: "appCommandInvocationCompletedData" + UseDeviceIndependentPixels: "useDeviceIndependentPixels", + AppCommandInvocationCompletedData: "appCommandInvocationCompletedData", + Base64: "base64" }; OSF.OUtil.setNamespace("DDA", OSF); OSF.DDA.DocumentMode={ @@ -1256,6 +1326,8 @@ OSF.DDA.MethodDispId={ dispidAppCommandInvocationCompletedMethod: 94, dispidCloseContainerMethod: 97, dispidGetAccessTokenMethod: 98, + dispidOpenBrowserWindow: 102, + dispidCreateDocumentMethod: 105, dispidGetSelectedTaskMethod: 110, dispidGetSelectedResourceMethod: 111, dispidGetTaskMethod: 112, @@ -1311,8 +1383,11 @@ OSF.DDA.EventDispId={ dispidObjectDataChangedEvent: 15, dispidContentControlAddedEvent: 16, dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, dispidAppCommandInvokedEvent: 39, dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, dispidTaskSelectionChangedEvent: 56, dispidResourceSelectionChangedEvent: 57, dispidViewSelectionChangedEvent: 58, @@ -1444,7 +1519,9 @@ OSF.DDA.ErrorCodeManager=(function () { ooeSSOInvalidGrant: 13005, ooeSSOClientError: 13006, ooeSSOServerError: 13007, - ooeAddinIsAlreadyRequestingToken: 13008 + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009, + ooeSSOConnectionLost: 13010 }, initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={ name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotSupported }; @@ -1542,6 +1619,8 @@ OSF.DDA.ErrorCodeManager=(function () { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={ name: stringNS.L_SSOClientError, message: stringNS.L_SSOClientErrorMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={ name: stringNS.L_SSOServerError, message: stringNS.L_SSOServerErrorMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={ name: stringNS.L_AddinIsAlreadyRequestingToken, message: stringNS.L_AddinIsAlreadyRequestingTokenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={ name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={ name: stringNS.L_SSOConnectionLostError, message: stringNS.L_SSOConnectionLostErrorMessage }; } }; })(); @@ -2243,6 +2322,11 @@ OSF.DDA.Context=function OSF_DDA_Context(officeAppContext, document, license, ap value: officeAppContext.auth }); } + if (officeAppContext.application) { + OSF.OUtil.defineEnumerableProperty(this, "application", { + value: officeAppContext.application + }); + } if (officeAppContext.get_isDialog()) { var requirements=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); OSF.OUtil.defineEnumerableProperty(this, "requirements", { @@ -2285,6 +2369,8 @@ OSF.DDA.OutlookContext=function OSF_DDA_OutlookContext(appContext, settings, lic }; OSF.OUtil.extend(OSF.DDA.OutlookContext, OSF.DDA.Context); OSF.DDA.OutlookAppOm=function OSF_DDA_OutlookAppOm(appContext, window, appReady) { }; +OSF.DDA.Application=function OSF_DDA_Application(officeAppContext) { +}; OSF.DDA.Document=function OSF_DDA_Document(officeAppContext, settings) { var mode; switch (officeAppContext.get_clientMode()) { @@ -3021,6 +3107,8 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, "ExecuteRichApiRequestAsync": did.dispidExecuteRichApiRequestMethod, "AppCommandInvocationCompletedAsync": did.dispidAppCommandInvocationCompletedMethod, "CloseContainerAsync": did.dispidCloseContainerMethod, + "OpenBrowserWindow": did.dispidOpenBrowserWindow, + "CreateDocumentAsync": did.dispidCreateDocumentMethod, "AddDataPartAsync": did.dispidAddDataPartMethod, "GetDataPartByIdAsync": did.dispidGetDataPartByIdMethod, "GetDataPartsByNameSpaceAsync": did.dispidGetDataPartsByNamespaceMethod, @@ -3060,13 +3148,13 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, } jsom=OSF.DDA.SyncMethodNames; did=OSF.DDA.MethodDispId; - var asyncMethodMap={ + var syncMethodMap={ "MessageParent": did.dispidMessageParentMethod, "SendMessage": did.dispidSendMessageMethod }; - for (var method in asyncMethodMap) { + for (var method in syncMethodMap) { if (jsom[method]) { - dispIdMap[jsom[method].id]=asyncMethodMap[method]; + dispIdMap[jsom[method].id]=syncMethodMap[method]; } } jsom=Microsoft.Office.WebExtension.EventType; @@ -3086,7 +3174,10 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, "ObjectSelectionChanged": did.dispidObjectSelectionChangedEvent, "ObjectDataChanged": did.dispidObjectDataChangedEvent, "ContentControlAdded": did.dispidContentControlAddedEvent, + "RichApiMessage": did.dispidRichApiMessageEvent, "ItemChanged": did.dispidOlkItemSelectedChangedEvent, + "RecipientsChanged": did.dispidOlkRecipientsChangedEvent, + "AppointmentTimeChanged": did.dispidOlkAppointmentTimeChangedEvent, "TaskSelectionChanged": did.dispidTaskSelectionChangedEvent, "ResourceSelectionChanged": did.dispidResourceSelectionChangedEvent, "ViewSelectionChanged": did.dispidViewSelectionChangedEvent, @@ -3162,6 +3253,7 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, else { hostCallArgs=callArgs; } + var startTime=(new Date()).getTime(); delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ "dispId": dispId, "hostCallArgs": hostCallArgs, @@ -3182,6 +3274,9 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, } var payload=asyncMethodCall.processResponse(status, responseArgs, caller, callArgs); OSF.DDA.issueAsyncResult(callArgs, status, payload); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(dispId, hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); + } } }); } @@ -3475,12 +3570,44 @@ OSF.ShowWindowDialogParameterKeys={ Width: "width", Height: "height", DisplayInIframe: "displayInIframe", - HideTitle: "hideTitle" + HideTitle: "hideTitle", + UseDeviceIndependentPixels: "useDeviceIndependentPixels" }; OSF.HostThemeButtonStyleKeys={ ButtonBorderColor: "buttonBorderColor", ButtonBackgroundColor: "buttonBackgroundColor" }; +OSF.OmexPageParameterKeys={ + AppName: "client", + AppVersion: "cv", + AppUILocale: "ui", + AppDomain: "appDomain", + StoreLocator: "rs", + AssetId: "assetid", + NotificationType: "notificationType", + AppCorrelationId: "corr", + AuthType: "authType" +}; +OSF.AuthType={ + Anonymous: 0, + MSA: 1, + OrgId: 2, + ADAL: 3 +}; +OSF.OmexMessageKeys={ + MessageType: "messageType", + MessageValue: "messageValue" +}; +OSF.OmexRemoveAddinMessageKeys={ + RemoveAddinResultCode: "resultCode", + RemoveAddinResultValue: "resultValue" +}; +OSF.OmexRemoveAddinResultCode={ + Success: 0, + ClientError: 400, + ServerError: 500, + UnknownError: 600 +}; var OfficeExt; (function (OfficeExt) { var WACUtils; @@ -3542,6 +3669,38 @@ var OfficeExt; return url_parser.protocol+"//"+url_parser.host; } WACUtils.getDomainForUrl=getDomainForUrl; + function shouldUseLocalStorageToPassMessage() { + try { + var osList=[ + "Windows NT 6.1", + "Windows NT 6.2", + "Windows NT 6.3" + ]; + var userAgent=window.navigator.userAgent; + for (var i=0, len=osList.length; i < len; i++) { + if (userAgent.indexOf(osList[i]) > -1) { + return isInternetExplorer(); + } + } + return false; + } + catch (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("Error happens in shouldUseLocalStorageToPassMessage: "+e); + return false; + } + } + WACUtils.shouldUseLocalStorageToPassMessage=shouldUseLocalStorageToPassMessage; + function isInternetExplorer() { + try { + var userAgent=window.navigator.userAgent; + return userAgent.indexOf("MSIE ") > -1 || userAgent.indexOf("Trident/") > -1 || userAgent.indexOf("Edge/") > -1; + } + catch (e) { + OsfMsAjaxFactory.msAjaxDebug.trace("Error happens in isInternetExplorer: "+e); + return false; + } + } + WACUtils.isInternetExplorer=isInternetExplorer; })(WACUtils=OfficeExt.WACUtils || (OfficeExt.WACUtils={})); })(OfficeExt || (OfficeExt={})); var OfficeExt; @@ -3924,6 +4083,14 @@ var OfficeExt; OSF.OUtil.setNamespace("Microsoft", window); OSF.OUtil.setNamespace("Office", Microsoft); OSF.OUtil.setNamespace("Common", Microsoft.Office); +Microsoft.Office.Common.InvokeType={ + "async": 0, + "sync": 1, + "asyncRegisterEvent": 2, + "asyncUnregisterEvent": 3, + "syncRegisterEvent": 4, + "syncUnregisterEvent": 5 +}; OSF.SerializerVersion={ MsAjax: 0, Browser: 1 @@ -4859,7 +5026,9 @@ OSF.DDA.WAC.Delegate.executeAsync=function OSF_DDA_WAC_Delegate$executeAsync(arg if (args.onCalling) { args.onCalling(); } - var startTime=(new Date()).getTime(); + if (!OSF.getClientEndPoint()) { + return; + } OSF.getClientEndPoint().invoke("executeMethod", function OSF_DDA_WAC_Delegate$OMFacade$OnResponse(xdmStatus, payload) { if (args.onReceiving) { args.onReceiving(); @@ -4882,9 +5051,6 @@ OSF.DDA.WAC.Delegate.executeAsync=function OSF_DDA_WAC_Delegate$executeAsync(arg if (args.onComplete) { args.onComplete(error, payload); } - if (OSF.AppTelemetry) { - OSF.AppTelemetry.onMethodDone(args.dispId, args.hostCallArgs, Math.abs((new Date()).getTime() - startTime), error); - } }, args.hostCallArgs); }; OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent=function OSF_DDA_WAC_Delegate$GetOnAfterRegisterEvent(register, args) { @@ -4929,6 +5095,9 @@ OSF.DDA.WAC.Delegate.registerEventAsync=function OSF_DDA_WAC_Delegate$RegisterEv if (args.onCalling) { args.onCalling(); } + if (!OSF.getClientEndPoint()) { + return; + } OSF.getClientEndPoint().registerForEvent(OSF.DDA.getXdmEventName(args.targetId, args.eventType), function OSF_DDA_WACOMFacade$OnEvent(payload) { if (args.onEvent) { args.onEvent(payload); @@ -4946,6 +5115,9 @@ OSF.DDA.WAC.Delegate.unregisterEventAsync=function OSF_DDA_WAC_Delegate$Unregist if (args.onCalling) { args.onCalling(); } + if (!OSF.getClientEndPoint()) { + return; + } OSF.getClientEndPoint().unregisterForEvent(OSF.DDA.getXdmEventName(args.targetId, args.eventType), OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(false, args), { "controlId": OSF._OfficeAppFactory.getId(), "eventDispId": args.dispId, @@ -5807,7 +5979,7 @@ var OSFAriaLogger; function AriaLogger() { } AriaLogger.prototype.getAriaCDNLocation=function () { - return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry-2.8.0.min.js"); + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry.js"); }; AriaLogger.getInstance=function () { if (AriaLogger.AriaLoggerObj===undefined) { @@ -5824,13 +5996,10 @@ var OSFAriaLogger; try { if (!this.ALogger) { var OfficeExtensibilityTenantID="db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; - var configuration=new microsoft.applications.telemetry.LogConfiguration(); - configuration.enableAutoUserSession=true; - microsoft.applications.telemetry.LogManager.initialize(OfficeExtensibilityTenantID, configuration); - this.ALogger=new microsoft.applications.telemetry.Logger(); + this.ALogger=AWTLogManager.initialize(OfficeExtensibilityTenantID); } - var eventProperties=new microsoft.applications.telemetry.EventProperties(); - eventProperties.name="Office.Extensibility.OfficeJS."+tableName; + var eventProperties=new AWTEventProperties(); + eventProperties.setName("Office.Extensibility.OfficeJS."+tableName); for (var key in telemetryData) { if (key.toLowerCase() !=="table") { eventProperties.setProperty(key, telemetryData[key]); @@ -5863,6 +6032,7 @@ var OSFAppTelemetry; var sessionId=OSF.OUtil.Guid.generateNewGuid(); var osfControlAppCorrelationId=""; var omexDomainRegex=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"); + OSFAppTelemetry.enableTelemetry=true; ; var AppInfo=(function () { function AppInfo() { @@ -5946,17 +6116,19 @@ var OSFAppTelemetry; function AppLogger() { } AppLogger.prototype.LogData=function (data) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, data.SerializeRow(), OSF.Logger.SendFlag.none); - OSFAriaLogger.AriaLogger.getInstance().logData(data); + try { + OSFAriaLogger.AriaLogger.getInstance().logData(data); + } + catch (e) { + } }; AppLogger.prototype.LogRawData=function (log) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, log, OSF.Logger.SendFlag.none); try { OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)); } @@ -5996,7 +6168,7 @@ var OSFAppTelemetry; } appInfo.message=context.get_hostCustomMessage(); appInfo.officeJSVersion=OSF.ConstantNames.FileVersion; - appInfo.hostJSVersion="16.0.8126.1000"; + appInfo.hostJSVersion="16.0.8916.1000"; if (context._wacHostEnvironment) { appInfo.wacHostEnvironment=context._wacHostEnvironment; } @@ -6417,14 +6589,16 @@ OSF.EventDispatch=function OSF_EventDispatch(eventTypes) { this._eventHandlers={}; this._objectEventHandlers={}; this._queuedEventsArgs={}; - for (var entry in eventTypes) { - var eventType=eventTypes[entry]; - var isObjectEvent=(eventType=="objectDeleted" || eventType=="objectSelectionChanged" || eventType=="objectDataChanged" || eventType=="contentControlAdded"); - if (!isObjectEvent) - this._eventHandlers[eventType]=[]; - else - this._objectEventHandlers[eventType]={}; - this._queuedEventsArgs[eventType]=[]; + if (eventTypes !=null) { + for (var i=0; i < eventTypes.length; i++) { + var eventType=eventTypes[i]; + var isObjectEvent=(eventType=="objectDeleted" || eventType=="objectSelectionChanged" || eventType=="objectDataChanged" || eventType=="contentControlAdded"); + if (!isObjectEvent) + this._eventHandlers[eventType]=[]; + else + this._objectEventHandlers[eventType]={}; + this._queuedEventsArgs[eventType]=[]; + } } }; OSF.EventDispatch.prototype={ @@ -6450,8 +6624,8 @@ OSF.EventDispatch.prototype={ hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) { var handlers=this._eventHandlers[eventType]; if (handlers && handlers.length > 0) { - for (var h in handlers) { - if (handlers[h]===handler) + for (var i=0; i < handlers.length; i++) { + if (handlers[i]===handler) return true; } } @@ -6556,8 +6730,9 @@ OSF.EventDispatch.prototype={ var eventType=eventArgs.type; if (eventType && this._eventHandlers[eventType]) { var eventHandlers=this._eventHandlers[eventType]; - for (var handler in eventHandlers) - eventHandlers[handler](eventArgs); + for (var i=0; i < eventHandlers.length; i++) { + eventHandlers[i](eventArgs); + } return true; } else { @@ -6654,6 +6829,9 @@ OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEve case Microsoft.Office.WebExtension.EventType.ContentControlAdded: args=new OSF.DDA.ObjectEventArgs(eventType, eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args=new OSF.DDA.RichApiMessageEventArgs(eventType, eventProperties); + break; case Microsoft.Office.WebExtension.EventType.DataNodeInserted: args=new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); break; @@ -6679,10 +6857,28 @@ OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEve args=new OSF.DDA.DialogParentEventArgs(eventProperties); break; case Microsoft.Office.WebExtension.EventType.ItemChanged: - if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlookwebapp") { + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { args=new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); target.initialize(args["initialData"]); - target.setCurrentItemNumber(args["itemNumber"].itemNumber); + if (OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]=="win32" || OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]=="mac") { + target.setCurrentItemNumber(args["itemNumber"].itemNumber); + } + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { + args=new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { + args=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); } else { throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); @@ -6766,7 +6962,10 @@ OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { DataNodeDeleted: "nodeDeleted", DataNodeInserted: "nodeInserted", - DataNodeReplaced: "nodeReplaced" + DataNodeReplaced: "nodeReplaced", + NodeDeleted: "nodeDeleted", + NodeInserted: "nodeInserted", + NodeReplaced: "nodeReplaced" }); OSF.DDA.CustomXmlParts=function OSF_DDA_CustomXmlParts() { this._eventDispatches=[]; @@ -7548,52 +7747,10 @@ OSF.DDA.SettingsManager={ DateJSONPrefix: "Date(", DataJSONSuffix: ")", serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) { - var ret={}; - for (var key in settingsCollection) { - var value=settingsCollection[key]; - try { - if (JSON) { - value=JSON.stringify(value, function dateReplacer(k, v) { - return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix+this[k].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix : v; - }); - } - else { - value=Sys.Serialization.JavaScriptSerializer.serialize(value); - } - ret[key]=value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.serializeSettings(settingsCollection); }, deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) { - var ret={}; - serializedSettings=serializedSettings || {}; - for (var key in serializedSettings) { - var value=serializedSettings[key]; - try { - if (JSON) { - value=JSON.parse(value, function dateReviver(k, v) { - var d; - if (typeof v==='string' && v && v.length > 6 && v.slice(0, 5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) { - d=new Date(parseInt(v.slice(5, -1))); - if (d) { - return d; - } - } - return v; - }); - } - else { - value=Sys.Serialization.JavaScriptSerializer.deserialize(value, true); - } - ret[key]=value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.deserializeSettings(serializedSettings); } }; OSF.DDA.Settings=function OSF_DDA_Settings(settings) { @@ -9260,6 +9417,13 @@ OSF.DDA.AsyncMethodCalls.define({ "types": ["boolean"], "defaultValue": false } + }, + { + name: Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels, + value: { + "types": ["boolean"], + "defaultValue": false + } } ], privateStateCallbacks: [], @@ -9297,13 +9461,13 @@ OSF.DDA.AsyncMethodCalls.define({ if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] <=0) { callArgs[Microsoft.Office.WebExtension.Parameters.Width]=1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Width]=99; } if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] <=0) { callArgs[Microsoft.Office.WebExtension.Parameters.Height]=1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Height]=99; } if (!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) { @@ -9487,6 +9651,7 @@ var OfficeExt; var showDialogCallback=null; var hasCrossZoneNotification=false; var checkWindowDialogCloseInterval=-1; + var messageParentKey="messageParentKey"; var hostThemeButtonStyle=null; var commonButtonBorderColor="#ababab"; var commonButtonBackgroundColor="#ffffff"; @@ -9495,6 +9660,7 @@ var OfficeExt; var crossZoneNotificationId="crossZoneNotification"; var configureBrowserLinkId="configureBrowserLink"; var dialogNotificationTextPanelId="dialogNotificationTextPanel"; + var shouldUseLocalStorageToPassMessage=OfficeExt.WACUtils.shouldUseLocalStorageToPassMessage(); var registerDialogNotificationShownArgs={ "dispId": OSF.DDA.EventDispId.dispidDialogNotificationShownInAddinEvent, "eventType": OSF.DDA.Marshaling.DialogNotificationShownEventType.DialogNotificationShown, @@ -9612,7 +9778,12 @@ var OfficeExt; if (windowInstance !=null && !windowInstance.closed) { windowInstance.close(); } - window.removeEventListener("message", receiveMessage); + if (shouldUseLocalStorageToPassMessage) { + window.removeEventListener("storage", storageChangedHandler); + } + else { + window.removeEventListener("message", receiveMessage); + } window.clearInterval(checkWindowDialogCloseInterval); windowInstance=null; callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); @@ -9631,10 +9802,23 @@ var OfficeExt; Dialog.closeDialog=closeDialog; function messageParent(params) { var message=params.hostCallArgs[Microsoft.Office.WebExtension.Parameters.MessageToParent]; - var appDomains=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains; - if (appDomains) { - for (var i=0; i < appDomains.length && appDomains[i].indexOf("://") !==-1; i++) { - window.opener.postMessage(message, appDomains[i]); + if (shouldUseLocalStorageToPassMessage) { + try { + var messageKey=OSF._OfficeAppFactory.getInitializationHelper()._webAppState.id+messageParentKey; + window.localStorage.setItem(messageKey, message); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Error happened during messageParent method:"+e); + } + } + } + else { + var appDomains=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains; + if (appDomains) { + for (var i=0; i < appDomains.length && appDomains[i].indexOf("://") !==-1; i++) { + window.opener.postMessage(message, appDomains[i]); + } } } } @@ -9755,6 +9939,22 @@ var OfficeExt; } } } + function storageChangedHandler(event) { + var messageKey=OSF._OfficeAppFactory.getInitializationHelper()._webAppState.id+messageParentKey; + if (event.key==messageKey) { + try { + var dialogMessageReceivedArgs={}; + dialogMessageReceivedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogMessageReceived; + dialogMessageReceivedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent]=event.newValue; + handler(dialogMessageReceivedArgs); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Error happened during storage changed handler."+e); + } + } + } + } function showDialog(dialogInfo) { var hostInfoObj=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo; var hostInfoVals=[ @@ -9772,8 +9972,8 @@ var OfficeExt; var windowName=JSON.parse(window.name); windowName[OSF.WindowNameItemKeys.HostInfo]=hostInfo; windowName[OSF.WindowNameItemKeys.AppContext]=appContext; - var width=dialogInfo[OSF.ShowWindowDialogParameterKeys.Width] * appContext._clientWindowWidth / 100; - var height=dialogInfo[OSF.ShowWindowDialogParameterKeys.Height] * appContext._clientWindowHeight / 100; + var width=dialogInfo[OSF.ShowWindowDialogParameterKeys.Width] * screen.width / 100; + var height=dialogInfo[OSF.ShowWindowDialogParameterKeys.Height] * screen.height / 100; var left=appContext._clientWindowWidth / 2 - width / 2; var top=appContext._clientWindowHeight / 2 - height / 2; var windowSpecs="width="+width+", height="+height+", left="+left+", top="+top+",channelmode=no,directories=no,fullscreen=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=yes,toolbar=no"; @@ -9785,12 +9985,22 @@ var OfficeExt; showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone); return; } - window.addEventListener("message", receiveMessage); + if (shouldUseLocalStorageToPassMessage) { + window.addEventListener("storage", storageChangedHandler); + } + else { + window.addEventListener("message", receiveMessage); + } function checkWindowClose() { try { if (windowInstance==null || windowInstance.closed) { window.clearInterval(checkWindowDialogCloseInterval); - window.removeEventListener("message", receiveMessage); + if (shouldUseLocalStorageToPassMessage) { + window.removeEventListener("storage", storageChangedHandler); + } + else { + window.removeEventListener("message", receiveMessage); + } var dialogClosedArgs={}; dialogClosedArgs[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogClosed; handler(dialogClosedArgs); @@ -9982,7 +10192,14 @@ OSF.DDA.WAC.Delegate.openDialog=function OSF_DDA_WAC_Delegate$OpenDialog(args) { var callback=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(true, args); function showDialogCallback(status) { var payload={ "Error": status }; - callback(Microsoft.Office.Common.InvokeResultCode.noError, payload); + try { + callback(Microsoft.Office.Common.InvokeResultCode.noError, payload); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Exception happens at showDialogCallback."+e); + } + } } if (OSF.DialogShownStatus.hasDialogShown) { showDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened); @@ -10037,7 +10254,14 @@ OSF.DDA.WAC.Delegate.closeDialog=function OSF_DDA_WAC_Delegate$CloseDialog(args) var callback=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(false, args); function closeDialogCallback(status) { var payload={ "Error": status }; - callback(Microsoft.Office.Common.InvokeResultCode.noError, payload); + try { + callback(Microsoft.Office.Common.InvokeResultCode.noError, payload); + } + catch (e) { + if (OSF.AppTelemetry) { + OSF.AppTelemetry.logAppException("Exception happens at closeDialogCallback."+e); + } + } } if (!OSF.DialogShownStatus.hasDialogShown) { closeDialogCallback(OSF.DDA.ErrorCodeManager.errorCodes.ooeWebDialogClosed); @@ -10080,6 +10304,13 @@ OSF.DDA.AsyncMethodCalls.define({ "types": ["boolean"], "defaultValue": false } + }, + { + name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, + value: { + "types": ["string"], + "defaultValue": "" + } } ], onSucceeded: function (dataDescriptor, caller, callArgs) { @@ -10091,16 +10322,21 @@ OSF.OUtil.setNamespace("Marshaling", OSF.DDA); OSF.OUtil.setNamespace("SingleSignOn", OSF.DDA.Marshaling); OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys={ ForceConsent: "forceConsent", - ForceAddAccount: "forceAddAccount" + ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge" +}; +OSF.DDA.Marshaling.SingleSignOn.AccessTokenResultKeys={ + AccessToken: "accessToken" }; OSF.DDA.WAC.Delegate.ParameterMap.define({ type: OSF.DDA.MethodDispId.dispidGetAccessTokenMethod, toHost: [ { name: Microsoft.Office.WebExtension.Parameters.ForceConsent, value: OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.ForceConsent }, - { name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, value: OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.ForceAddAccount } + { name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, value: OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.ForceAddAccount }, + { name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, value: OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.AuthChallenge } ], fromHost: [ - { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.WAC.Delegate.ParameterMap.self } + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.Marshaling.SingleSignOn.AccessTokenResultKeys.AccessToken } ] }); var OSFWordWAC; @@ -10188,9 +10424,10 @@ var __extends=(this && this.__extends) || function (d, b) { var OfficeExtension; (function (OfficeExtension) { var Action=(function () { - function Action(actionInfo, isWriteOperation) { + function Action(actionInfo, isWriteOperation, isRestrictedResourceAccess) { this.m_actionInfo=actionInfo; this.m_isWriteOperation=isWriteOperation; + this.m_isRestrictedResourceAccess=isRestrictedResourceAccess; } Object.defineProperty(Action.prototype, "actionInfo", { get: function () { @@ -10206,12 +10443,30 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(Action.prototype, "isRestrictedResourceAccess", { + get: function () { + return this.m_isRestrictedResourceAccess; + }, + enumerable: true, + configurable: true + }); return Action; }()); OfficeExtension.Action=Action; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + var TraceMarkerActionResultHandler=(function () { + function TraceMarkerActionResultHandler(callback) { + this.m_callback=callback; + } + TraceMarkerActionResultHandler.prototype._handleResult=function (value) { + if (this.m_callback) { + this.m_callback(); + } + }; + return TraceMarkerActionResultHandler; + }()); var ActionFactory=(function () { function ActionFactory() { } @@ -10227,13 +10482,17 @@ var OfficeExtension; var args=[value]; var referencedArgumentObjectPaths=OfficeExtension.Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); OfficeExtension.Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); - var ret=new OfficeExtension.Action(actionInfo, true); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + context._pendingRequest.ensureInstantiateObjectPaths(referencedArgumentObjectPaths); + var ret=new OfficeExtension.Action(actionInfo, true, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); context._pendingRequest.addReferencedObjectPaths(referencedArgumentObjectPaths); + ret.referencedObjectPath=parent._objectPath; + ret.referencedArgumentObjectPaths=referencedArgumentObjectPaths; return ret; }; - ActionFactory.createMethodAction=function (context, parent, methodName, operationType, args) { + ActionFactory.createMethodAction=function (context, parent, methodName, operationType, args, isRestrictedResourceAccess) { OfficeExtension.Utility.validateObjectPath(parent); var actionInfo={ Id: context._nextId(), @@ -10244,15 +10503,20 @@ var OfficeExtension; }; var referencedArgumentObjectPaths=OfficeExtension.Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); OfficeExtension.Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + context._pendingRequest.ensureInstantiateObjectPaths(referencedArgumentObjectPaths); var isWriteOperation=operationType !=1; - var ret=new OfficeExtension.Action(actionInfo, isWriteOperation); + var ret=new OfficeExtension.Action(actionInfo, isWriteOperation, isRestrictedResourceAccess); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); context._pendingRequest.addReferencedObjectPaths(referencedArgumentObjectPaths); + ret.referencedObjectPath=parent._objectPath; + ret.referencedArgumentObjectPaths=referencedArgumentObjectPaths; return ret; }; ActionFactory.createQueryAction=function (context, parent, queryOption) { OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); var actionInfo={ Id: context._nextId(), ActionType: 2, @@ -10260,13 +10524,15 @@ var OfficeExtension; ObjectPathId: parent._objectPath.objectPathInfo.Id, }; actionInfo.QueryInfo=queryOption; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; return ret; }; ActionFactory.createRecursiveQueryAction=function (context, parent, query) { OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); var actionInfo={ Id: context._nextId(), ActionType: 6, @@ -10274,23 +10540,59 @@ var OfficeExtension; ObjectPathId: parent._objectPath.objectPathInfo.Id, RecursiveQueryInfo: query }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; + return ret; + }; + ActionFactory.createQueryAsJsonAction=function (context, parent, queryOption) { + OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + var actionInfo={ + Id: context._nextId(), + ActionType: 7, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + }; + actionInfo.QueryInfo=queryOption; + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; + return ret; + }; + ActionFactory.createEnsureUnchangedAction=function (context, parent, objectState) { + OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + var actionInfo={ + Id: context._nextId(), + ActionType: 8, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }; + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; return ret; }; ActionFactory.createInstantiateAction=function (context, obj) { OfficeExtension.Utility.validateObjectPath(obj); + context._pendingRequest.ensureInstantiateObjectPath(obj._objectPath.parentObjectPath); + context._pendingRequest.ensureInstantiateObjectPaths(obj._objectPath.argumentObjectPaths); var actionInfo={ Id: context._nextId(), ActionType: 1, Name: "", ObjectPathId: obj._objectPath.objectPathInfo.Id }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(obj._objectPath); context._pendingRequest.addActionResultHandler(ret, new OfficeExtension.InstantiateActionResultHandler(obj)); + ret.referencedObjectPath=obj._objectPath; return ret; }; ActionFactory.createTraceAction=function (context, message, addTraceMessage) { @@ -10300,13 +10602,17 @@ var OfficeExtension; Name: "Trace", ObjectPathId: 0 }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); if (addTraceMessage) { context._pendingRequest.addTrace(actionInfo.Id, message); } return ret; }; + ActionFactory.createTraceMarkerForCallback=function (context, callback) { + var action=ActionFactory.createTraceAction(context, null, false); + context._pendingRequest.addActionResultHandler(action, new TraceMarkerActionResultHandler(callback)); + }; return ActionFactory; }()); OfficeExtension.ActionFactory=ActionFactory; @@ -10384,6 +10690,7 @@ var OfficeExtension; }; ClientObject.prototype._recursivelySet=function (input, options, scalarWriteablePropertyNames, objectPropertyNames, notAllowedToBeSetPropertyNames) { var isClientObject=(input instanceof ClientObject); + var originalInput=input; if (isClientObject) { if (Object.getPrototypeOf(this)===Object.getPrototypeOf(input)) { input=JSON.parse(JSON.stringify(input)); @@ -10400,31 +10707,38 @@ var OfficeExtension; for (var i=0; i < scalarWriteablePropertyNames.length; i++) { prop=scalarWriteablePropertyNames[i]; if (input.hasOwnProperty(prop)) { - this[prop]=input[prop]; + if (typeof input[prop] !=="undefined") { + this[prop]=input[prop]; + } } } for (var i=0; i < objectPropertyNames.length; i++) { prop=objectPropertyNames[i]; if (input.hasOwnProperty(prop)) { - this[prop].set(input[prop], options); + if (typeof input[prop] !=="undefined") { + var dataToPassToSet=isClientObject ? originalInput[prop] : input[prop]; + this[prop].set(dataToPassToSet, options); + } } } + var throwOnReadOnly=!isClientObject; + if (options && !OfficeExtension.Utility.isNullOrUndefined(throwOnReadOnly)) { + throwOnReadOnly=options.throwOnReadOnly; + } for (var i=0; i < notAllowedToBeSetPropertyNames.length; i++) { prop=notAllowedToBeSetPropertyNames[i]; if (input.hasOwnProperty(prop)) { - throw new OfficeExtension._Internal.RuntimeError({ - code: OfficeExtension.ErrorCodes.invalidArgument, - message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), - debugInfo: { - errorLocation: prop - } - }); + if (typeof input[prop] !=="undefined" && throwOnReadOnly) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.invalidArgument, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), + debugInfo: { + errorLocation: prop + } + }); + } } } - var throwOnReadOnly=!isClientObject; - if (options && !OfficeExtension.Utility.isNullOrUndefined(throwOnReadOnly)) { - throwOnReadOnly=options.throwOnReadOnly; - } for (prop in input) { if (scalarWriteablePropertyNames.indexOf(prop) < 0 && objectPropertyNames.indexOf(prop) < 0) { var propertyDescriptor=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this), prop); @@ -10472,12 +10786,14 @@ var OfficeExtension; this.m_actions=[]; this.m_actionResultHandler={}; this.m_referencedObjectPaths={}; + this.m_instantiatedObjectPaths={}; this.m_flags=0; this.m_traceInfos={}; this.m_pendingProcessEventHandlers=[]; this.m_pendingEventHandlerActions={}; this.m_responseTraceIds={}; this.m_responseTraceMessages=[]; + this.m_preSyncPromises=[]; } Object.defineProperty(ClientRequest.prototype, "flags", { get: function () { @@ -10523,7 +10839,13 @@ var OfficeExtension; if (action.isWriteOperation) { this.m_flags=this.m_flags | 1; } + if (action.isRestrictedResourceAccess) { + this.m_flags=this.m_flags | 2; + } this.m_actions.push(action); + if (action.actionInfo.ActionType==1) { + this.m_instantiatedObjectPaths[action.actionInfo.ObjectPathId]=action; + } }; Object.defineProperty(ClientRequest.prototype, "hasActions", { get: function () { @@ -10532,9 +10854,39 @@ var OfficeExtension; enumerable: true, configurable: true }); + ClientRequest.prototype._getLastAction=function () { + return this.m_actions[this.m_actions.length - 1]; + }; ClientRequest.prototype.addTrace=function (actionId, message) { this.m_traceInfos[actionId]=message; }; + ClientRequest.prototype.ensureInstantiateObjectPath=function (objectPath) { + if (objectPath) { + if (this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + this.ensureInstantiateObjectPath(objectPath.parentObjectPath); + this.ensureInstantiateObjectPaths(objectPath.argumentObjectPaths); + if (!this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + var actionInfo={ + Id: this.m_context._nextId(), + ActionType: 1, + Name: "", + ObjectPathId: objectPath.objectPathInfo.Id + }; + var instantiateAction=new OfficeExtension.Action(actionInfo, false, false); + instantiateAction.referencedObjectPath=objectPath; + this.addAction(instantiateAction); + } + } + }; + ClientRequest.prototype.ensureInstantiateObjectPaths=function (objectPaths) { + if (objectPaths) { + for (var i=0; i < objectPaths.length; i++) { + this.ensureInstantiateObjectPath(objectPaths[i]); + } + } + }; ClientRequest.prototype.addReferencedObjectPath=function (objectPath) { if (this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]) { return; @@ -10552,6 +10904,9 @@ var OfficeExtension; if (objectPath.isWriteOperation) { this.m_flags=this.m_flags | 1; } + if (objectPath.isRestrictedResourceAccess) { + this.m_flags=this.m_flags | 2; + } this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]=objectPath; if (objectPath.objectPathInfo.ObjectPathType==3) { this.addReferencedObjectPaths(objectPath.argumentObjectPaths); @@ -10570,6 +10925,9 @@ var OfficeExtension; this.m_actionResultHandler[action.actionInfo.Id]=resultHandler; }; ClientRequest.prototype.buildRequestMessageBody=function () { + if (OfficeExtension._internalConfig.enableEarlyDispose) { + ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } var objectPaths={}; for (var i in this.m_referencedObjectPaths) { objectPaths[i]=this.m_referencedObjectPaths[i].objectPathInfo; @@ -10620,22 +10978,105 @@ var OfficeExtension; ClientRequest.prototype._getPendingEventHandlerActions=function (eventHandlers) { return this.m_pendingEventHandlerActions[eventHandlers._id]; }; - return ClientRequest; - }()); - OfficeExtension.ClientRequest=ClientRequest; -})(OfficeExtension || (OfficeExtension={})); -var OfficeExtension; -(function (OfficeExtension) { - var SessionBase=(function () { - function SessionBase() { - } - SessionBase.prototype._resolveRequestUrlAndHeaderInfo=function () { - return OfficeExtension.Utility._createPromiseFromResult(null); - }; - SessionBase.prototype._createRequestExecutorOrNull=function () { - return null; + ClientRequest.prototype._addPreSyncPromise=function (value) { + this.m_preSyncPromises.push(value); }; - Object.defineProperty(SessionBase.prototype, "eventRegistration", { + Object.defineProperty(ClientRequest.prototype, "_preSyncPromises", { + get: function () { + return this.m_preSyncPromises; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_actions", { + get: function () { + return this.m_actions; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_objectPaths", { + get: function () { + return this.m_referencedObjectPaths; + }, + enumerable: true, + configurable: true + }); + ClientRequest._updateLastUsedActionIdOfObjectPathId=function (lastUsedActionIdOfObjectPathId, objectPath, actionId) { + while (objectPath) { + if (lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]) { + return; + } + lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]=actionId; + var argumentObjectPaths=objectPath.argumentObjectPaths; + if (argumentObjectPaths) { + var argumentObjectPathsLength=argumentObjectPaths.length; + for (var i=0; i < argumentObjectPathsLength; i++) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, argumentObjectPaths[i], actionId); + } + } + objectPath=objectPath.parentObjectPath; + } + }; + ClientRequest._calculateLastUsedObjectPathIds=function (actions) { + var lastUsedActionIdOfObjectPathId={}; + var actionsLength=actions.length; + for (var index=actionsLength - 1; index >=0; --index) { + var action=actions[index]; + var actionId=action.actionInfo.Id; + if (action.referencedObjectPath) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, action.referencedObjectPath, actionId); + } + var referencedObjectPaths=action.referencedArgumentObjectPaths; + if (referencedObjectPaths) { + var referencedObjectPathsLength=referencedObjectPaths.length; + for (var refIndex=0; refIndex < referencedObjectPathsLength; refIndex++) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, referencedObjectPaths[refIndex], actionId); + } + } + } + var lastUsedObjectPathIdsOfAction={}; + for (var key in lastUsedActionIdOfObjectPathId) { + var actionId=lastUsedActionIdOfObjectPathId[key]; + var objectPathIds=lastUsedObjectPathIdsOfAction[actionId]; + if (!objectPathIds) { + objectPathIds=[]; + lastUsedObjectPathIdsOfAction[actionId]=objectPathIds; + } + objectPathIds.push(parseInt(key)); + } + for (var index=0; index < actionsLength; index++) { + var action=actions[index]; + var lastUsedObjectPathIds=lastUsedObjectPathIdsOfAction[action.actionInfo.Id]; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + action.actionInfo.L=lastUsedObjectPathIds; + } + else if (action.actionInfo.L) { + delete action.actionInfo.L; + } + } + }; + return ClientRequest; + }()); + OfficeExtension.ClientRequest=ClientRequest; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + OfficeExtension._internalConfig={ + showDisposeInfoInDebugInfo: false, + enableEarlyDispose: true, + alwaysPolyfillClientObjectRetrieveMethod: false + }; + var SessionBase=(function () { + function SessionBase() { + } + SessionBase.prototype._resolveRequestUrlAndHeaderInfo=function () { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + SessionBase.prototype._createRequestExecutorOrNull=function () { + return null; + }; + Object.defineProperty(SessionBase.prototype, "eventRegistration", { get: function () { return OfficeExtension._Internal.officeJsEventRegistration; }, @@ -10719,6 +11160,15 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(ClientRequestContext.prototype, "debugInfo", { + get: function () { + var prettyPrinter=new OfficeExtension.RequestPrettyPrinter(this._rootObjectPropertyName, this._pendingRequest._objectPaths, this._pendingRequest._actions, OfficeExtension._internalConfig.showDisposeInfoInDebugInfo); + var statements=prettyPrinter.process(); + return { pendingStatements: statements }; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ClientRequestContext.prototype, "trackedObjects", { get: function () { if (!this.m_trackedObjects) { @@ -10738,11 +11188,76 @@ var OfficeExtension; }); ClientRequestContext.prototype.load=function (clientObj, option) { OfficeExtension.Utility.validateContext(this, clientObj); - var queryOption=ClientRequestContext.parseQueryOption(option); + var queryOption=ClientRequestContext._parseQueryOption(option); var action=OfficeExtension.ActionFactory.createQueryAction(this, clientObj, queryOption); this._pendingRequest.addActionResultHandler(action, clientObj); }; - ClientRequestContext.parseQueryOption=function (option) { + ClientRequestContext.isLoadOption=function (loadOption) { + if (!OfficeExtension.Utility.isUndefined(loadOption.select) && (typeof (loadOption.select)==="string" || Array.isArray(loadOption.select))) + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.expand) && (typeof (loadOption.expand)==="string" || Array.isArray(loadOption.expand))) + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.top) && typeof (loadOption.top)==="number") + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.skip) && typeof (loadOption.skip)==="number") + return true; + for (var i in loadOption) { + return false; + } + return true; + }; + ClientRequestContext.parseStrictLoadOption=function (option) { + var ret={ Select: [] }; + ClientRequestContext.parseStrictLoadOptionHelper(ret, "", "option", option); + return ret; + }; + ClientRequestContext.combineQueryPath=function (pathPrefix, key, separator) { + if (pathPrefix.length===0) { + return key; + } + else { + return pathPrefix+separator+key; + } + }; + ClientRequestContext.parseStrictLoadOptionHelper=function (queryInfo, pathPrefix, argPrefix, option) { + for (var key in option) { + var value=option[key]; + if (key==="$all") { + if (typeof (value) !=="boolean") { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + if (value) { + queryInfo.Select.push(ClientRequestContext.combineQueryPath(pathPrefix, "*", "/")); + } + } + else if (key==="$top") { + if (typeof (value) !=="number" || pathPrefix.length > 0) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + queryInfo.Top=value; + } + else if (key==="$skip") { + if (typeof (value) !=="number" || pathPrefix.length > 0) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + queryInfo.Skip=value; + } + else { + if (typeof (value)==="boolean") { + if (value) { + queryInfo.Select.push(ClientRequestContext.combineQueryPath(pathPrefix, key, "/")); + } + } + else if (typeof (value)==="object") { + ClientRequestContext.parseStrictLoadOptionHelper(queryInfo, ClientRequestContext.combineQueryPath(pathPrefix, key, "/"), ClientRequestContext.combineQueryPath(argPrefix, key, "."), value); + } + else { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + } + } + }; + ClientRequestContext._parseQueryOption=function (option) { var queryOption={}; if (typeof (option)=="string") { var select=option; @@ -10751,41 +11266,46 @@ var OfficeExtension; else if (Array.isArray(option)) { queryOption.Select=option; } - else if (typeof (option)=="object") { + else if (typeof (option)==="object") { var loadOption=option; - if (typeof (loadOption.select)=="string") { - queryOption.Select=OfficeExtension.Utility._parseSelectExpand(loadOption.select); - } - else if (Array.isArray(loadOption.select)) { - queryOption.Select=loadOption.select; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.select)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.select"); - } - if (typeof (loadOption.expand)=="string") { - queryOption.Expand=OfficeExtension.Utility._parseSelectExpand(loadOption.expand); - } - else if (Array.isArray(loadOption.expand)) { - queryOption.Expand=loadOption.expand; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.expand)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.expand"); - } - if (typeof (loadOption.top)=="number") { - queryOption.Top=loadOption.top; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.top)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.top"); - } - if (typeof (loadOption.skip)=="number") { - queryOption.Skip=loadOption.skip; + if (ClientRequestContext.isLoadOption(loadOption)) { + if (typeof (loadOption.select)=="string") { + queryOption.Select=OfficeExtension.Utility._parseSelectExpand(loadOption.select); + } + else if (Array.isArray(loadOption.select)) { + queryOption.Select=loadOption.select; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.select)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.select"); + } + if (typeof (loadOption.expand)=="string") { + queryOption.Expand=OfficeExtension.Utility._parseSelectExpand(loadOption.expand); + } + else if (Array.isArray(loadOption.expand)) { + queryOption.Expand=loadOption.expand; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.expand)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.expand"); + } + if (typeof (loadOption.top)==="number") { + queryOption.Top=loadOption.top; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.top)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.top"); + } + if (typeof (loadOption.skip)==="number") { + queryOption.Skip=loadOption.skip; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.skip)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.skip"); + } } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.skip)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.skip"); + else { + queryOption=ClientRequestContext.parseStrictLoadOption(option); } } else if (!OfficeExtension.Utility.isNullOrUndefined(option)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option"); + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option"); } return queryOption; }; @@ -10795,7 +11315,7 @@ var OfficeExtension; } var quries={}; for (var key in options) { - quries[key]=ClientRequestContext.parseQueryOption(options[key]); + quries[key]=ClientRequestContext._parseQueryOption(options[key]); } var action=OfficeExtension.ActionFactory.createRecursiveQueryAction(this, clientObj, { Queries: quries, MaxDepth: maxDepth }); this._pendingRequest.addActionResultHandler(action, clientObj); @@ -10803,6 +11323,8 @@ var OfficeExtension; ClientRequestContext.prototype.trace=function (message) { OfficeExtension.ActionFactory.createTraceAction(this, message, true); }; + ClientRequestContext.prototype._processOfficeJsErrorResponse=function (officeJsErrorCode, response) { + }; ClientRequestContext.prototype.syncPrivateMain=function () { var _this=this; return OfficeExtension.Utility._createPromiseFromResult(null) @@ -10830,13 +11352,14 @@ var OfficeExtension; } }) .then(function () { - return _this.syncPrivate(); + var req=_this._pendingRequest; + _this.m_pendingRequest=null; + return _this.processPreSyncPromises(req) + .then(function () { return _this.syncPrivate(req); }); }); }; - ClientRequestContext.prototype.syncPrivate=function () { + ClientRequestContext.prototype.syncPrivate=function (req) { var _this=this; - var req=this._pendingRequest; - this.m_pendingRequest=null; if (!req.hasActions) { return this.processPendingEventHandlers(req); } @@ -10844,7 +11367,7 @@ var OfficeExtension; var requestFlags=req.flags; if (!this._requestExecutor) { if (OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)) { - this._requestExecutor=new OfficeExtension.OfficeJsRequestExecutor(); + this._requestExecutor=new OfficeExtension.OfficeJsRequestExecutor(this); } else { this._requestExecutor=new OfficeExtension.HttpRequestExecutor(); @@ -10862,8 +11385,10 @@ var OfficeExtension; req.invalidatePendingInvalidObjectPaths(); var errorFromResponse=null; var errorFromProcessEventHandlers=null; + this._lastSyncStart=performance.now(); return requestExecutor.executeAsync(this._customData, requestFlags, requestExecutorRequestMessage) .then(function (response) { + _this._lastSyncEnd=performance.now(); errorFromResponse=_this.processRequestExecutorResponseMessage(req, response); return _this.processPendingEventHandlers(req) .catch(function (ex) { @@ -10910,7 +11435,13 @@ var OfficeExtension; req._setResponseTraceIds(response.Body.TraceIds); } var traceMessages=req._responseTraceMessages; + var errorStatementInfo=null; if (response.Body) { + if (response.Body.Error && + response.Body.Error.ActionIndex >=0) { + var prettyPrinter=new OfficeExtension.RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions); + errorStatementInfo=prettyPrinter.processForDebugStatementInfo(response.Body.Error.ActionIndex); + } var actionResults=null; if (response.Body.Results) { actionResults=response.Body.Results; @@ -10936,13 +11467,18 @@ var OfficeExtension; }); } else if (response.Body && response.Body.Error) { + var debugInfo={ + errorLocation: response.Body.Error.Location + }; + if (errorStatementInfo) { + debugInfo.statement=errorStatementInfo.statement; + debugInfo.surroundingStatements=errorStatementInfo.surroundingStatements; + } return new OfficeExtension._Internal.RuntimeError({ code: response.Body.Error.Code, message: response.Body.Error.Message, traceMessages: traceMessages, - debugInfo: { - errorLocation: response.Body.Error.Location - } + debugInfo: debugInfo }); } return null; @@ -10958,6 +11494,17 @@ var OfficeExtension; ClientRequestContext.prototype.createProcessOneEventHandlersFunc=function (eventHandlers, req) { return function () { return eventHandlers._processRegistration(req); }; }; + ClientRequestContext.prototype.processPreSyncPromises=function (req) { + var ret=OfficeExtension.Utility._createPromiseFromResult(null); + for (var i=0; i < req._preSyncPromises.length; i++) { + var p=req._preSyncPromises[i]; + ret=ret.then(this.createProcessOneProSyncFunc(p)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneProSyncFunc=function (p) { + return function () { return p; }; + }; ClientRequestContext.prototype.sync=function (passThroughValue) { return this.syncPrivateMain().then(function () { return passThroughValue; }); }; @@ -10996,9 +11543,15 @@ var OfficeExtension; batch=receivedRunArgs[argOffset+0]; } else if (receivedRunArgs.length==argOffset+2) { - if (receivedRunArgs[argOffset+0] instanceof OfficeExtension.ClientObject) { + if (OfficeExtension.Utility.isNullOrUndefined(receivedRunArgs[argOffset+0])) { + ctxRetriever=ctxInitializer; + } + else if (receivedRunArgs[argOffset+0] instanceof OfficeExtension.ClientObject) { ctxRetriever=function () { return receivedRunArgs[argOffset+0].context; }; } + else if (receivedRunArgs[argOffset+0] instanceof ClientRequestContext) { + ctxRetriever=function () { return receivedRunArgs[argOffset+0]; }; + } else if (Array.isArray(receivedRunArgs[argOffset+0])) { var array=receivedRunArgs[argOffset+0]; if (array.length==0) { @@ -11164,6 +11717,79 @@ var OfficeExtension; return ClientResult; }()); OfficeExtension.ClientResult=ClientResult; + var RetrieveResult=(function () { + function RetrieveResult(m_proxy, m_shouldPolyfill) { + this.m_proxy=m_proxy; + this.m_shouldPolyfill=m_shouldPolyfill; + } + Object.defineProperty(RetrieveResult.prototype, "proxy", { + get: function () { + return this.m_proxy; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RetrieveResult.prototype, "data", { + get: function () { + if (!this.m_isLoaded) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.valueNotLoaded, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: "retrieveResult.data" + } + }); + } + return this.m_data; + }, + enumerable: true, + configurable: true + }); + RetrieveResult.prototype._handleResult=function (value) { + this.m_isLoaded=true; + if (typeof (value)==="object" && value && value._IsNull) { + this.m_data=null; + return; + } + if (this.m_shouldPolyfill) { + this.m_data=this.changePropertyNameToCamelLowerCase(value); + } + else { + this.m_data=value; + } + }; + RetrieveResult.prototype.changePropertyNameToCamelLowerCase=function (value) { + var charCodeUnderscore=95; + if (Array.isArray(value)) { + var ret=[]; + for (var i=0; i < value.length; i++) { + ret.push(this.changePropertyNameToCamelLowerCase(value[i])); + } + return ret; + } + else if (typeof (value)==="object" && value !==null) { + var ret={}; + for (var key in value) { + var propValue=value[key]; + if (key==="_Items") { + ret={}; + ret["items"]=this.changePropertyNameToCamelLowerCase(propValue); + break; + } + else if (key.charCodeAt(0) !==charCodeUnderscore) { + var propName=OfficeExtension.Utility._toCamelLowerCase(key); + ret[propName]=this.changePropertyNameToCamelLowerCase(propValue); + } + } + return ret; + } + else { + return value; + } + }; + return RetrieveResult; + }()); + OfficeExtension.RetrieveResult=RetrieveResult; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { @@ -11185,6 +11811,9 @@ var OfficeExtension; Constants.sourceLibHeader="SdkVersion"; Constants.embeddingPageOrigin="EmbeddingPageOrigin"; Constants.embeddingPageSessionInfo="EmbeddingPageSessionInfo"; + Constants.eventMessageCategory=65536; + Constants.eventWorkbookId="Workbook"; + Constants.eventSourceRemote="Remote"; return Constants; }()); OfficeExtension.Constants=Constants; @@ -11515,7 +12144,7 @@ var OfficeExtension; debugInfo[key]=partialDebugInfo[key]; } if (this.innerError) { - if (this.innerError instanceof OfficeExtension.Error) { + if (this.innerError instanceof OfficeExtension._Internal.RuntimeError) { debugInfo.innerError=this.innerError.debugInfo; } else { @@ -11600,6 +12229,20 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(EventHandlers.prototype, "_context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_callback", { + get: function () { + return this.m_callback; + }, + enumerable: true, + configurable: true + }); EventHandlers.prototype.add=function (handler) { var action=OfficeExtension.ActionFactory.createTraceAction(this.m_context, null, false); this.m_context._pendingRequest._addPendingEventHandlerAction(this, { id: action.actionInfo.Id, handler: handler, operation: 0 }); @@ -11693,6 +12336,13 @@ var OfficeExtension; this.m_allHandlers=handlers; this.m_handler=handler; } + Object.defineProperty(EventHandlerResult.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); EventHandlerResult.prototype.remove=function () { if (this.m_allHandlers && this.m_handler) { this.m_allHandlers.remove(this.m_handler); @@ -11727,6 +12377,8 @@ var OfficeExtension; return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged, handler, callback); }); case 1: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.settings.addHandlerAsync(Office.EventType.SettingsChanged, handler, callback); }); + case 5: + return OfficeExtension.Utility.promisify(function (callback) { return OSF.DDA.RichApi.richApiMessageManager.addHandlerAsync("richApiMessage", handler, callback); }); case 13: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.ObjectDeleted, handler, { id: targetId }, callback); }); case 14: @@ -11755,6 +12407,8 @@ var OfficeExtension; return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.DocumentSelectionChanged, { handler: handler }, callback); }); case 1: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.settings.removeHandlerAsync(Office.EventType.SettingsChanged, { handler: handler }, callback); }); + case 5: + return OfficeExtension.Utility.promisify(function (callback) { return OSF.DDA.RichApi.richApiMessageManager.removeHandlerAsync("richApiMessage", { handler: handler }, callback); }); case 13: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDeleted, { id: targetId, handler: handler }, callback); }); case 14: @@ -11825,6 +12479,139 @@ var OfficeExtension; OfficeExtension.EventRegistration=EventRegistration; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var GenericEventRegistration=(function () { + function GenericEventRegistration() { + this.m_eventRegistration=new OfficeExtension.EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)); + this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this); + } + GenericEventRegistration.prototype.ready=function () { + var _this=this; + if (!this.m_ready) { + if (GenericEventRegistration._testReadyImpl) { + this.m_ready=GenericEventRegistration._testReadyImpl() + .then(function () { + _this.m_isReady=true; + }); + } + else { + this.m_ready=OfficeExtension._Internal.officeJsEventRegistration.register(5, "", this.m_richApiMessageHandler) + .then(function () { + _this.m_isReady=true; + }); + } + } + return this.m_ready; + }; + Object.defineProperty(GenericEventRegistration.prototype, "isReady", { + get: function () { + return this.m_isReady; + }, + enumerable: true, + configurable: true + }); + GenericEventRegistration.prototype.register=function (eventId, targetId, handler) { + var _this=this; + return this.ready() + .then(function () { return _this.m_eventRegistration.register(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype.unregister=function (eventId, targetId, handler) { + var _this=this; + return this.ready() + .then(function () { return _this.m_eventRegistration.unregister(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype._registerEventImpl=function (eventId, targetId) { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._unregisterEventImpl=function (eventId, targetId) { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._handleRichApiMessage=function (msg) { + if (msg && msg.entries) { + for (var entryIndex=0; entryIndex < msg.entries.length; entryIndex++) { + var entry=msg.entries[entryIndex]; + if (entry.messageCategory==OfficeExtension.Constants.eventMessageCategory) { + if (OfficeExtension.Utility._logEnabled) { + OfficeExtension.Utility.log(JSON.stringify(entry)); + } + var funcs=this.m_eventRegistration.getHandlers(entry.messageType, entry.targetId); + if (funcs.length > 0) { + var arg=JSON.parse(entry.message); + if (entry.isRemoteOverride) { + arg.source=OfficeExtension.Constants.eventSourceRemote; + } + for (var i=0; i < funcs.length; i++) { + funcs[i](arg); + } + } + } + } + } + }; + GenericEventRegistration.getGenericEventRegistration=function () { + if (!GenericEventRegistration.s_genericEventRegistration) { + GenericEventRegistration.s_genericEventRegistration=new GenericEventRegistration(); + } + return GenericEventRegistration.s_genericEventRegistration; + }; + GenericEventRegistration.richApiMessageEventCategory=65536; + return GenericEventRegistration; + }()); + function _testSetRichApiMessageReadyImpl(impl) { + GenericEventRegistration._testReadyImpl=impl; + } + OfficeExtension._testSetRichApiMessageReadyImpl=_testSetRichApiMessageReadyImpl; + function _testTriggerRichApiMessageEvent(msg) { + GenericEventRegistration.getGenericEventRegistration()._handleRichApiMessage(msg); + } + OfficeExtension._testTriggerRichApiMessageEvent=_testTriggerRichApiMessageEvent; + var GenericEventHandlers=(function (_super) { + __extends(GenericEventHandlers, _super); + function GenericEventHandlers(context, parentObject, name, eventInfo) { + _super.call(this, context, parentObject, name, eventInfo); + this.m_genericEventInfo=eventInfo; + } + GenericEventHandlers.prototype.add=function (handler) { + var _this=this; + if ((this._handlers.length==0) && this.m_genericEventInfo.registerFunc) { + this.m_genericEventInfo.registerFunc(); + } + if (!GenericEventRegistration.getGenericEventRegistration().isReady) { + this._context._pendingRequest._addPreSyncPromise(GenericEventRegistration.getGenericEventRegistration().ready()); + } + OfficeExtension.ActionFactory.createTraceMarkerForCallback(this._context, function () { + _this._handlers.push(handler); + if (_this._handlers.length==1) { + GenericEventRegistration.getGenericEventRegistration().register(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + return new OfficeExtension.EventHandlerResult(this._context, this, handler); + }; + GenericEventHandlers.prototype.remove=function (handler) { + var _this=this; + if ((this._handlers.length==1) && this.m_genericEventInfo.unregisterFunc) { + this.m_genericEventInfo.unregisterFunc(); + } + OfficeExtension.ActionFactory.createTraceMarkerForCallback(this._context, function () { + var handlers=_this._handlers; + for (var index=handlers.length - 1; index >=0; index--) { + if (handlers[index]===handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length==0) { + GenericEventRegistration.getGenericEventRegistration().unregister(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + }; + GenericEventHandlers.prototype.removeAll=function () { + }; + return GenericEventHandlers; + }(OfficeExtension.EventHandlers)); + OfficeExtension.GenericEventHandlers=GenericEventHandlers; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var HttpRequestExecutor=(function () { function HttpRequestExecutor() { @@ -11876,15 +12663,6 @@ var OfficeExtension; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { - var _Internal; - (function (_Internal) { - _Internal.OfficeRequire=function () { - if (typeof (require) !=="undefined") { - return require; - } - return null; - }(); - })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); var HttpUtility=(function () { function HttpUtility() { } @@ -11892,7 +12670,7 @@ var OfficeExtension; HttpUtility.s_customSendRequestFunc=func; }; HttpUtility.xhrSendRequestFunc=function (request) { - return new _Internal.OfficePromise(function (resolve, reject) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { var xhr=new XMLHttpRequest(); xhr.open(request.method, request.url); xhr.onload=function () { @@ -11904,7 +12682,7 @@ var OfficeExtension; resolve(resp); }; xhr.onerror=function () { - reject(new _Internal.RuntimeError({ + reject(new OfficeExtension._Internal.RuntimeError({ code: OfficeExtension.ErrorCodes.connectionFailure, message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.connectionFailureWithStatus, xhr.statusText) })); @@ -11917,34 +12695,11 @@ var OfficeExtension; xhr.send(request.body); }); }; - HttpUtility.nodejsRequestModuleSendRequestFunc=function (requestInfo) { - HttpUtility.logRequest(requestInfo); - var fetch=_Internal.OfficeRequire(HttpUtility.NodeJsRequestModuleName); - return fetch(requestInfo.url, { method: requestInfo.method, headers: requestInfo.headers, body: requestInfo.body }) - .then(function (resp) { - return resp.text() - .then(function (body) { - var statusCode=resp.status; - var headers={}; - resp.headers.forEach(function (value, name) { - headers[name]=value; - }); - var ret={ statusCode: statusCode, headers: headers, body: body }; - HttpUtility.logResponse(ret); - return ret; - }); - }); - }; HttpUtility.sendRequest=function (request) { HttpUtility.validateAndNormalizeRequest(request); var func=HttpUtility.s_customSendRequestFunc; if (!func) { - if (typeof (window)==="undefined" || typeof (XMLHttpRequest)==="undefined") { - func=HttpUtility.nodejsRequestModuleSendRequestFunc; - } - else { - func=HttpUtility.xhrSendRequestFunc; - } + func=HttpUtility.xhrSendRequestFunc; } return func(request); }; @@ -11960,7 +12715,7 @@ var OfficeExtension; HttpUtility.officeJsSendLocalDocumentRequestFunc=function (request) { request=OfficeExtension.Utility._validateLocalDocumentRequest(request); var requestSafeArray=OfficeExtension.Utility._buildRequestMessageSafeArray(request); - return new _Internal.OfficePromise(function (resolve, reject) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { OSF.DDA.RichApi.executeRichApiRequestAsync(requestSafeArray, function (asyncResult) { var response; if (asyncResult.status=="succeeded") { @@ -11980,7 +12735,7 @@ var OfficeExtension; }; HttpUtility.validateAndNormalizeRequest=function (request) { if (OfficeExtension.Utility.isNullOrUndefined(request)) { - throw _Internal.RuntimeError._createInvalidArgError({ + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError({ argumentName: "request" }); } @@ -12017,7 +12772,6 @@ var OfficeExtension; } } }; - HttpUtility.NodeJsRequestModuleName="node-fetch"; HttpUtility._logBody=false; return HttpUtility; }()); @@ -12042,13 +12796,153 @@ var OfficeExtension; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { - var ObjectPath=(function () { - function ObjectPath(objectPathInfo, parentObjectPath, isCollection, isInvalidAfterRequest) { - this.m_objectPathInfo=objectPathInfo; - this.m_parentObjectPath=parentObjectPath; - this.m_isWriteOperation=false; - this.m_isCollection=isCollection; - this.m_isInvalidAfterRequest=isInvalidAfterRequest; + var HostBridgeRequestExecutor=(function () { + function HostBridgeRequestExecutor(session) { + this.m_session=session; + } + HostBridgeRequestExecutor.prototype.executeAsync=function (customData, requestFlags, requestMessage) { + var httpRequestInfo={ + url: OfficeExtension.Constants.processQuery, + method: "POST", + headers: requestMessage.Headers, + body: requestMessage.Body + }; + var message={ + id: HostBridgeSession.nextId(), + type: 1, + flags: requestFlags, + message: httpRequestInfo + }; + OfficeExtension.Utility.log(JSON.stringify(message)); + return this.m_session.sendMessageToHost(message) + .then(function (nativeBridgeResponse) { + OfficeExtension.Utility.log("Received response: "+JSON.stringify(nativeBridgeResponse)); + var responseInfo=nativeBridgeResponse.message; + var response; + if (responseInfo.statusCode===200) { + response={ ErrorCode: null, ErrorMessage: null, Headers: responseInfo.headers, Body: responseInfo.body }; + } + else { + OfficeExtension.Utility.log("Error Response:"+responseInfo.body); + var error=OfficeExtension.Utility._parseErrorResponse(responseInfo); + response={ + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null + }; + } + return response; + }); + }; + return HostBridgeRequestExecutor; + }()); + var HostBridgeSession=(function (_super) { + __extends(HostBridgeSession, _super); + function HostBridgeSession(bridge) { + var _this=this; + _super.call(this); + this.m_promiseResolver={}; + this.m_bridge=bridge; + this.m_bridge.onMessageFromHost=function (msg) { + _this.onMessageFromHost(msg); + }; + } + HostBridgeSession.prototype._resolveRequestUrlAndHeaderInfo=function () { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + HostBridgeSession.prototype._createRequestExecutorOrNull=function () { + OfficeExtension.Utility.log("NativeBridgeSession::CreateRequestExecutor"); + return new HostBridgeRequestExecutor(this); + }; + Object.defineProperty(HostBridgeSession.prototype, "eventRegistration", { + get: function () { + return OfficeExtension._Internal.officeJsEventRegistration; + }, + enumerable: true, + configurable: true + }); + HostBridgeSession.init=function (bridge) { + if (bridge && typeof (bridge)==="object") { + var session=new HostBridgeSession(bridge); + OfficeExtension.ClientRequestContext._overrideSession=session; + OfficeExtension.HttpUtility.setCustomSendLocalDocumentRequestFunc(function (request) { + var bridgeMessage={ + id: HostBridgeSession.nextId(), + type: 1, + flags: 0, + message: request + }; + return session.sendMessageToHost(bridgeMessage) + .then(function (bridgeResponse) { + var responseInfo=bridgeResponse.message; + return responseInfo; + }); + }); + } + }; + HostBridgeSession.prototype.sendMessageToHost=function (message) { + var _this=this; + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + var ret=new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { + _this.m_promiseResolver[message.id]=resolve; + }); + return ret; + }; + HostBridgeSession.prototype.onMessageFromHost=function (messageText) { + if (messageText==="test") { + if (HostBridgeTest._testFunc) { + HostBridgeTest._testFunc(); + } + } + else { + var message=JSON.parse(messageText); + if (typeof (message.id)==="number") { + var resolve=this.m_promiseResolver[message.id]; + if (resolve) { + resolve(message); + } + delete this.m_promiseResolver[message.id]; + } + } + }; + HostBridgeSession.nextId=function () { + return HostBridgeSession.s_nextId++; + }; + HostBridgeSession.s_nextId=1; + return HostBridgeSession; + }(OfficeExtension.SessionBase)); + var HostBridge=(function () { + function HostBridge() { + } + HostBridge.init=function (bridge) { + HostBridgeSession.init(bridge); + }; + return HostBridge; + }()); + OfficeExtension.HostBridge=HostBridge; + if (typeof (_richApiNativeBridge)==="object" && _richApiNativeBridge) { + HostBridge.init(_richApiNativeBridge); + } + var HostBridgeTest=(function () { + function HostBridgeTest() { + } + HostBridgeTest.setTestFunc=function (func) { + HostBridgeTest._testFunc=func; + }; + return HostBridgeTest; + }()); + OfficeExtension.HostBridgeTest=HostBridgeTest; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; +(function (OfficeExtension) { + var ObjectPath=(function () { + function ObjectPath(objectPathInfo, parentObjectPath, isCollection, isInvalidAfterRequest) { + this.m_objectPathInfo=objectPathInfo; + this.m_parentObjectPath=parentObjectPath; + this.m_isWriteOperation=false; + this.m_isCollection=isCollection; + this.m_isInvalidAfterRequest=isInvalidAfterRequest; this.m_isValid=true; } Object.defineProperty(ObjectPath.prototype, "objectPathInfo", { @@ -12068,6 +12962,16 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(ObjectPath.prototype, "isRestrictedResourceAccess", { + get: function () { + return this.m_isRestrictedResourceAccess; + }, + set: function (value) { + this.m_isRestrictedResourceAccess=value; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ObjectPath.prototype, "isCollection", { get: function () { return this.m_isCollection; @@ -12154,6 +13058,7 @@ var OfficeExtension; this.m_objectPathInfo.ObjectPathType=6; this.m_objectPathInfo.Name=referenceId; this.m_objectPathInfo.ArgumentInfo={}; + delete this.m_objectPathInfo.ParentObjectPathId; this.m_parentObjectPath=null; this.m_argumentObjectPaths=null; return; @@ -12168,15 +13073,15 @@ var OfficeExtension; if (!OfficeExtension.Utility.isNullOrUndefined(id)) { this.m_isInvalidAfterRequest=false; this.m_isValid=true; - if (parentIsCollection) { - this.m_objectPathInfo.ObjectPathType=5; - this.m_objectPathInfo.Name=""; - } - else { + if (!OfficeExtension.Utility.isNullOrEmptyString(getByIdMethodName)) { this.m_objectPathInfo.ObjectPathType=3; this.m_objectPathInfo.Name=getByIdMethodName; this.m_getByIdMethodName=null; } + else { + this.m_objectPathInfo.ObjectPathType=5; + this.m_objectPathInfo.Name=""; + } this.isWriteOperation=false; this.m_objectPathInfo.ArgumentInfo={}; this.m_objectPathInfo.ArgumentInfo.Arguments=[id]; @@ -12211,18 +13116,22 @@ var OfficeExtension; var objectPathInfo={ Id: context._nextId(), ObjectPathType: 1, Name: "" }; return new OfficeExtension.ObjectPath(objectPathInfo, null, false, false); }; - ObjectPathFactory.createNewObjectObjectPath=function (context, typeName, isCollection) { + ObjectPathFactory.createNewObjectObjectPath=function (context, typeName, isCollection, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 2, Name: typeName }; - return new OfficeExtension.ObjectPath(objectPathInfo, null, isCollection, false); + var ret=new OfficeExtension.ObjectPath(objectPathInfo, null, isCollection, false); + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; }; - ObjectPathFactory.createPropertyObjectPath=function (context, parent, propertyName, isCollection, isInvalidAfterRequest) { + ObjectPathFactory.createPropertyObjectPath=function (context, parent, propertyName, isCollection, isInvalidAfterRequest, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 4, Name: propertyName, ParentObjectPathId: parent._objectPath.objectPathInfo.Id, }; - return new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest); + var ret=new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest); + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; }; ObjectPathFactory.createIndexerObjectPath=function (context, parent, args) { var objectPathInfo={ @@ -12246,7 +13155,7 @@ var OfficeExtension; objectPathInfo.ArgumentInfo.Arguments=args; return new OfficeExtension.ObjectPath(objectPathInfo, parentObjectPath, false, false); }; - ObjectPathFactory.createMethodObjectPath=function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName) { + ObjectPathFactory.createMethodObjectPath=function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 3, @@ -12259,6 +13168,7 @@ var OfficeExtension; ret.argumentObjectPaths=argumentObjectPaths; ret.isWriteOperation=(operationType !=1); ret.getByIdMethodName=getByIdMethodName; + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; return ret; }; ObjectPathFactory.createReferenceIdObjectPath=function (context, referenceId) { @@ -12320,9 +13230,11 @@ var OfficeExtension; var OfficeExtension; (function (OfficeExtension) { var OfficeJsRequestExecutor=(function () { - function OfficeJsRequestExecutor() { + function OfficeJsRequestExecutor(context) { + this.m_context=context; } OfficeJsRequestExecutor.prototype.executeAsync=function (customData, requestFlags, requestMessage) { + var _this=this; var messageSafearray=OfficeExtension.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, OfficeJsRequestExecutor.SourceLibHeaderValue); return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { OSF.DDA.RichApi.executeRichApiRequestAsync(messageSafearray, function (result) { @@ -12334,6 +13246,7 @@ var OfficeExtension; } else { response=OfficeExtension.RichApiMessageUtility.buildResponseOnError(result.error.code, result.error.message); + _this.m_context._processOfficeJsErrorResponse(result.error.code, response); } resolve(response); }); @@ -12346,6 +13259,12 @@ var OfficeExtension; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + var _Internal; + (function (_Internal) { + _Internal.OfficeRequire=function () { + return null; + }(); + })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); var _Internal; (function (_Internal) { var PromiseImpl; @@ -12449,17 +13368,6 @@ var OfficeExtension; } lib$es6$promise$asap$$len=0; } - function lib$es6$promise$asap$$attemptVertex() { - try { - var r=require; - var vertx=r('vertx'); - lib$es6$promise$asap$$vertxNext=vertx.runOnLoop || vertx.runOnContext; - return lib$es6$promise$asap$$useVertxTimer(); - } - catch (e) { - return lib$es6$promise$asap$$useSetTimeout(); - } - } var lib$es6$promise$asap$$scheduleFlush; if (lib$es6$promise$asap$$isNode) { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useNextTick(); @@ -12470,9 +13378,6 @@ var OfficeExtension; else if (lib$es6$promise$asap$$isWorker) { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useMessageChannel(); } - else if (lib$es6$promise$asap$$browserWindow===undefined && typeof require==='function') { - lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$attemptVertex(); - } else { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useSetTimeout(); } @@ -12990,6 +13895,305 @@ var OfficeExtension; OfficeExtension.TrackedObjects=TrackedObjects; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var RequestPrettyPrinter=(function () { + function RequestPrettyPrinter(globalObjName, referencedObjectPaths, actions, showDispose) { + if (!globalObjName) { + globalObjName="root"; + } + this.m_globalObjName=globalObjName; + this.m_referencedObjectPaths=referencedObjectPaths; + this.m_actions=actions; + this.m_statements=[]; + this.m_variableNameForObjectPathMap={}; + this.m_variableNameToObjectPathMap={}; + this.m_declaredObjectPathMap={}; + this.m_showDispose=showDispose; + } + RequestPrettyPrinter.prototype.process=function () { + if (this.m_showDispose) { + OfficeExtension.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + for (var i=0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + } + return this.m_statements; + }; + RequestPrettyPrinter.prototype.processForDebugStatementInfo=function (actionIndex) { + if (this.m_showDispose) { + OfficeExtension.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + var surroundingCount=5; + this.m_statements=[]; + var oneStatement=""; + var statementIndex=-1; + for (var i=0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + if (actionIndex==i) { + statementIndex=this.m_statements.length - 1; + } + if (statementIndex >=0 && this.m_statements.length > statementIndex+surroundingCount+1) { + break; + } + } + if (statementIndex < 0) { + return null; + } + var startIndex=statementIndex - surroundingCount; + if (startIndex < 0) { + startIndex=0; + } + var endIndex=statementIndex+1+surroundingCount; + if (endIndex > this.m_statements.length) { + endIndex=this.m_statements.length; + } + var surroundingStatements=[]; + if (startIndex !=0) { + surroundingStatements.push("..."); + } + for (var i_1=startIndex; i_1 < statementIndex; i_1++) { + surroundingStatements.push(this.m_statements[i_1]); + } + surroundingStatements.push("// >>>>>"); + surroundingStatements.push(this.m_statements[statementIndex]); + surroundingStatements.push("// <<<<<"); + for (var i_2=statementIndex+1; i_2 < endIndex; i_2++) { + surroundingStatements.push(this.m_statements[i_2]); + } + if (endIndex < this.m_statements.length) { + surroundingStatements.push("..."); + } + return { + statement: this.m_statements[statementIndex], + surroundingStatements: surroundingStatements + }; + }; + RequestPrettyPrinter.prototype.processOneAction=function (action) { + var actionInfo=action.actionInfo; + switch (actionInfo.ActionType) { + case 1: + this.processInstantiateAction(action); + break; + case 3: + this.processMethodAction(action); + break; + case 2: + this.processQueryAction(action); + break; + case 7: + this.processQueryAsJsonAction(action); + break; + case 6: + this.processRecursiveQueryAction(action); + break; + case 4: + this.processSetPropertyAction(action); + break; + case 5: + this.processTraceAction(action); + break; + case 8: + this.processEnsureUnchangedAction(action); + break; + } + }; + RequestPrettyPrinter.prototype.processInstantiateAction=function (action) { + var objId=action.actionInfo.ObjectPathId; + var objPath=this.m_referencedObjectPaths[objId]; + var varName=this.getObjVarName(objId); + if (!this.m_declaredObjectPathMap[objId]) { + var statement="var "+varName+"="+this.buildObjectPathExpressionWithParent(objPath)+";"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + this.m_declaredObjectPathMap[objId]=varName; + } + else { + var statement="// Instantiate {"+varName+"}"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + } + }; + RequestPrettyPrinter.prototype.processMethodAction=function (action) { + var methodName=action.actionInfo.Name; + if (methodName==="_KeepReference") { + methodName="track"; + } + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+"."+OfficeExtension.Utility._toCamelLowerCase(methodName)+"("+this.buildArgumentsExpression(action.actionInfo.ArgumentInfo)+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAction=function (action) { + var queryExp=this.buildQueryExpression(action); + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".load("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAsJsonAction=function (action) { + var queryExp=this.buildQueryExpression(action); + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".loadJson("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processRecursiveQueryAction=function (action) { + var queryExp=""; + if (action.actionInfo.RecursiveQueryInfo) { + queryExp=JSON.stringify(action.actionInfo.RecursiveQueryInfo); + } + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".loadRecursive("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processSetPropertyAction=function (action) { + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+"."+OfficeExtension.Utility._toCamelLowerCase(action.actionInfo.Name)+"="+this.buildArgumentsExpression(action.actionInfo.ArgumentInfo)+";"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processTraceAction=function (action) { + var statement="context.trace();"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processEnsureUnchangedAction=function (action) { + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".ensureUnchanged("+JSON.stringify(action.actionInfo.ObjectState)+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.appendDisposeCommentIfRelevant=function (statement, action) { + var _this=this; + if (this.m_showDispose) { + var lastUsedObjectPathIds=action.actionInfo.L; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + var objectNamesToDispose=lastUsedObjectPathIds.map(function (item) { return _this.getObjVarName(item); }).join(", "); + return statement+" // And then dispose {"+objectNamesToDispose+"}"; + } + } + return statement; + }; + RequestPrettyPrinter.prototype.buildQueryExpression=function (action) { + if (action.actionInfo.QueryInfo) { + var option={}; + option.select=action.actionInfo.QueryInfo.Select; + option.expand=action.actionInfo.QueryInfo.Expand; + option.skip=action.actionInfo.QueryInfo.Skip; + option.top=action.actionInfo.QueryInfo.Top; + if (typeof (option.top)==="undefined" && typeof (option.skip)==="undefined" && typeof (option.expand)==="undefined") { + if (typeof (option.select)==="undefined") { + return ""; + } + else { + return JSON.stringify(option.select); + } + } + else { + return JSON.stringify(option); + } + } + return ""; + }; + RequestPrettyPrinter.prototype.buildObjectPathExpressionWithParent=function (objPath) { + var hasParent=objPath.objectPathInfo.ObjectPathType==5 || + objPath.objectPathInfo.ObjectPathType==3 || + objPath.objectPathInfo.ObjectPathType==4; + if (hasParent && objPath.objectPathInfo.ParentObjectPathId) { + return this.getObjVarName(objPath.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(objPath); + } + return this.buildObjectPathExpression(objPath); + }; + RequestPrettyPrinter.prototype.buildObjectPathExpression=function (objPath) { + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + return "context."+this.m_globalObjName; + case 5: + return "getItem("+this.buildArgumentsExpression(objPath.objectPathInfo.ArgumentInfo)+")"; + case 3: + return OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name)+"("+this.buildArgumentsExpression(objPath.objectPathInfo.ArgumentInfo)+")"; + case 2: + return objPath.objectPathInfo.Name+".newObject()"; + case 7: + return "null"; + case 4: + return OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + case 6: + return "context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(objPath.objectPathInfo.Name)+")"; + } + }; + RequestPrettyPrinter.prototype.buildArgumentsExpression=function (args) { + var ret=""; + if (!args.Arguments) { + return ret; + } + for (var i=0; i < args.Arguments.length; i++) { + if (i > 0) { + ret=ret+", "; + } + ret=ret+this.buildArgumentLiteral(args.Arguments[i], args.ReferencedObjectPathIds ? args.ReferencedObjectPathIds[i] : null); + } + if (ret==="undefined") { + ret=""; + } + return ret; + }; + RequestPrettyPrinter.prototype.buildArgumentLiteral=function (value, objectPathId) { + if (typeof value=="number" && value===objectPathId) { + return this.getObjVarName(objectPathId); + } + else { + return JSON.stringify(value); + } + }; + RequestPrettyPrinter.prototype.getObjVarNameBase=function (objectPathId) { + var ret="v"; + var objPath=this.m_referencedObjectPaths[objectPathId]; + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + ret=this.m_globalObjName; + break; + case 4: + ret=OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + break; + case 3: + var methodName=objPath.objectPathInfo.Name; + if (methodName.length > 3 && methodName.substr(0, 3)==="Get") { + methodName=methodName.substr(3); + } + ret=OfficeExtension.Utility._toCamelLowerCase(methodName); + break; + case 5: + var parentName=this.getObjVarNameBase(objPath.objectPathInfo.ParentObjectPathId); + if (parentName.charAt(parentName.length - 1)==="s") { + ret=parentName.substr(0, parentName.length - 1); + } + else { + ret=parentName+"Item"; + } + break; + } + return ret; + }; + RequestPrettyPrinter.prototype.getObjVarName=function (objectPathId) { + if (this.m_variableNameForObjectPathMap[objectPathId]) { + return this.m_variableNameForObjectPathMap[objectPathId]; + } + var ret=this.getObjVarNameBase(objectPathId); + if (!this.m_variableNameToObjectPathMap[ret]) { + this.m_variableNameForObjectPathMap[objectPathId]=ret; + this.m_variableNameToObjectPathMap[ret]=objectPathId; + return ret; + } + var i=1; + while (this.m_variableNameToObjectPathMap[ret+i.toString()]) { + i++; + } + ret=ret+i.toString(); + this.m_variableNameForObjectPathMap[objectPathId]=ret; + this.m_variableNameToObjectPathMap[ret]=objectPathId; + return ret; + }; + return RequestPrettyPrinter; + }()); + OfficeExtension.RequestPrettyPrinter=RequestPrettyPrinter; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var ResourceStrings=(function () { function ResourceStrings() { @@ -13010,6 +14214,14 @@ var OfficeExtension; ResourceStrings.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod"; ResourceStrings.valueNotLoaded="ValueNotLoaded"; ResourceStrings.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage"; + ResourceStrings.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"; + ResourceStrings.customFunctionDefintionMissing="CustomFunctionDefintionMissing"; + ResourceStrings.customFunctionImplementationMissing="CustomFunctionImplementationMissing"; + ResourceStrings.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars"; + ResourceStrings.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit"; + ResourceStrings.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch"; + ResourceStrings.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing"; + ResourceStrings.apiNotFoundDetails="ApiNotFoundDetails"; return ResourceStrings; }()); OfficeExtension.ResourceStrings=ResourceStrings; @@ -13029,7 +14241,15 @@ var OfficeExtension; ResourceStringValues.RunMustReturnPromise="The batch function passed to the \".run\" method didn't return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from \"context.sync()\"."; ResourceStringValues.Timeout="The operation has timed out."; ResourceStringValues.ValueNotLoaded="The value of the result object has not been loaded yet. Before reading the value property, call \"context.sync()\" on the associated request context."; - ResourceStringValues.invalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page."; + ResourceStringValues.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page."; + ResourceStringValues.InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again."; + ResourceStringValues.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions."; + ResourceStringValues.CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function."; + ResourceStringValues.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods."; + ResourceStringValues.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name."; + ResourceStringValues.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it."; + ResourceStringValues.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable."; + ResourceStringValues.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}."; return ResourceStringValues; }()); OfficeExtension.ResourceStringValues=ResourceStringValues; @@ -13323,6 +14543,34 @@ var OfficeExtension; }; Utility.load=function (clientObj, option) { clientObj.context.load(clientObj, option); + return clientObj; + }; + Utility.loadAndSync=function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj.context.sync().then(function () { return clientObj; }); + }; + Utility.retrieve=function (clientObj, option) { + var shouldPolyfill=OfficeExtension._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + if (typeof (window) !=="undefined" && window.Office && window.Office.context && window.Office.context.requirements) { + shouldPolyfill=!window.Office.context.requirements.isSetSupported("RichApiRuntime", "1.1"); + } + } + var result=new OfficeExtension.RetrieveResult(clientObj, shouldPolyfill); + var queryOption=OfficeExtension.ClientRequestContext._parseQueryOption(option); + var action; + if (shouldPolyfill) { + action=OfficeExtension.ActionFactory.createQueryAction(clientObj.context, clientObj, queryOption); + } + else { + action=OfficeExtension.ActionFactory.createQueryAsJsonAction(clientObj.context, clientObj, queryOption); + } + clientObj.context._pendingRequest.addActionResultHandler(action, result); + return result; + }; + Utility.retrieveAndSync=function (clientObj, option) { + var result=Utility.retrieve(clientObj, option); + return clientObj.context.sync().then(function () { return result; }); }; Utility._parseSelectExpand=function (select) { var args=[]; @@ -13343,11 +14591,32 @@ var OfficeExtension; return '*'; } var itemsSlashLength=6; - if (propertyNameLower.substr(0, itemsSlashLength)==="items/") { + var isItemsSlashOrItemsDot=propertyNameLower.substr(0, itemsSlashLength)==="items/" || + propertyNameLower.substr(0, itemsSlashLength)==="items."; + if (isItemsSlashOrItemsDot) { propertyName=propertyName.substr(itemsSlashLength); } - return propertyName.replace(new RegExp("\/items\/", "gi"), "/"); + return propertyName.replace(new RegExp("[\/\.]items[\/\.]", "gi"), "/"); + } + }; + Utility.toJson=function (clientObj, scalarProperties, navigationProperties, collectionItemsIfAny) { + var result={}; + for (var prop in scalarProperties) { + var value=scalarProperties[prop]; + if (typeof value !=="undefined") { + result[prop]=value; + } + } + for (var prop in navigationProperties) { + var value=navigationProperties[prop]; + if (typeof value !=="undefined") { + result[prop]=value.toJSON(); + } } + if (collectionItemsIfAny) { + result["items"]=collectionItemsIfAny.map(function (item) { return item.toJSON(); }); + } + return result; }; Utility.throwError=function (resourceId, arg, errorLocation) { throw new OfficeExtension._Internal.RuntimeError({ @@ -13409,6 +14678,21 @@ var OfficeExtension; }); } }; + Utility.throwIfApiNotSupported=function (apiFullName, apiSetName, apiSetVersion, hostName) { + if (!Utility._doApiNotSupportedCheck) { + return; + } + if (typeof (window) !=="undefined" && window.Office && window.Office.context) { + if (!window.Office.context.requirements.isSetSupported(apiSetName, apiSetVersion)) { + var message=Utility._getResourceString(OfficeExtension.ResourceStrings.apiNotFoundDetails, [apiFullName, apiSetName+" "+apiSetVersion, hostName]); + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.apiNotFound, + message: message, + debugInfo: { errorLocation: apiFullName } + }); + } + } + }; Utility.getObjectPathExpression=function (objectPath) { var ret=""; while (objectPath) { @@ -13558,7 +14842,10 @@ var OfficeExtension; }; Utility._parseErrorResponse=function (responseInfo) { var errorObj=null; - if (!Utility.isNullOrEmptyString(responseInfo.body)) { + if (Utility.isPlainJsonObject(responseInfo.body)) { + errorObj=responseInfo.body; + } + else if (!Utility.isNullOrEmptyString(responseInfo.body)) { var errorResponseBody=Utility.trim(responseInfo.body); try { errorObj=JSON.parse(errorResponseBody); @@ -13588,8 +14875,24 @@ var OfficeExtension; } } }; + Utility._toCamelLowerCase=function (name) { + if (Utility.isNullOrEmptyString(name)) { + return name; + } + var index=0; + while (index < name.length && name.charCodeAt(index) >=65 && name.charCodeAt(index) <=90) { + index++; + } + if (index < name.length) { + return name.substr(0, index).toLowerCase()+name.substr(index); + } + else { + return name.toLowerCase(); + } + }; Utility._logEnabled=false; Utility._synchronousCleanup=false; + Utility._doApiNotSupportedCheck=false; Utility.s_underscoreCharCode="_".charCodeAt(0); return Utility; }()); @@ -13601,6 +14904,243 @@ var __extends=(this && this.__extends) || function (d, b) { function __() { this.constructor=d; } d.prototype=b===null ? Object.create(b) : (__.prototype=b.prototype, new __()); }; +var OfficeCore; +(function (OfficeCore) { + var _hostName="OfficeCore"; + var _defaultApiSetName="ExperimentApi"; + var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; + var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; + var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; + var _createNewObjectObjectPath=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath; + var _createChildItemObjectPathUsingIndexer=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer; + var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; + var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; + var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; + var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined=OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; + var _load=OfficeExtension.Utility.load; + var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; + var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; + var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var FlightingService=(function (_super) { + __extends(FlightingService, _super); + function FlightingService() { + _super.apply(this, arguments); + } + Object.defineProperty(FlightingService.prototype, "_className", { + get: function () { + return "FlightingService"; + }, + enumerable: true, + configurable: true + }); + FlightingService.prototype.getClientSessionId=function () { + var action=_createMethodAction(this.context, this, "GetClientSessionId", 1, []); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + FlightingService.prototype.getDeferredFlights=function () { + var action=_createMethodAction(this.context, this, "GetDeferredFlights", 1, []); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + FlightingService.prototype.getFeature=function (featureName, type, defaultValue, possibleValues) { + return new OfficeCore.ABType(this.context, _createMethodObjectPath(this.context, this, "GetFeature", 1, [featureName, type, defaultValue, possibleValues], false, false, null)); + }; + FlightingService.prototype.getFeatureGate=function (featureName, scope) { + return new OfficeCore.ABType(this.context, _createMethodObjectPath(this.context, this, "GetFeatureGate", 1, [featureName, scope], false, false, null)); + }; + FlightingService.prototype.resetOverride=function (featureName) { + _createMethodAction(this.context, this, "ResetOverride", 0, [featureName]); + }; + FlightingService.prototype.setOverride=function (featureName, type, value) { + _createMethodAction(this.context, this, "SetOverride", 0, [featureName, type, value]); + }; + FlightingService.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + FlightingService.newObject=function (context) { + var ret=new OfficeCore.FlightingService(context, _createNewObjectObjectPath(context, "Microsoft.Experiment.FlightingService", false)); + return ret; + }; + FlightingService.prototype.toJSON=function () { + return {}; + }; + return FlightingService; + }(OfficeExtension.ClientObject)); + OfficeCore.FlightingService=FlightingService; + var ABType=(function (_super) { + __extends(ABType, _super); + function ABType() { + _super.apply(this, arguments); + } + Object.defineProperty(ABType.prototype, "_className", { + get: function () { + return "ABType"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ABType.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this.m_value, "ABType", this._isNull); + return this.m_value; + }, + enumerable: true, + configurable: true + }); + ABType.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Value"])) { + this.m_value=obj["Value"]; + } + }; + ABType.prototype.load=function (option) { + _load(this, option); + return this; + }; + ABType.prototype.toJSON=function () { + return { + "value": this.m_value + }; + }; + return ABType; + }(OfficeExtension.ClientObject)); + OfficeCore.ABType=ABType; + var FeatureType; + (function (FeatureType) { + FeatureType.boolean="Boolean"; + FeatureType.integer="Integer"; + FeatureType.string="String"; + })(FeatureType=OfficeCore.FeatureType || (OfficeCore.FeatureType={})); + var ExperimentErrorCodes; + (function (ExperimentErrorCodes) { + ExperimentErrorCodes.generalException="GeneralException"; + })(ExperimentErrorCodes=OfficeCore.ExperimentErrorCodes || (OfficeCore.ExperimentErrorCodes={})); +})(OfficeCore || (OfficeCore={})); +var OfficeCore; +(function (OfficeCore) { + var RequestContext=(function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + _super.call(this, url); + } + Object.defineProperty(RequestContext.prototype, "flighting", { + get: function () { + return this.flightingService; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "telemetry", { + get: function () { + if (!this.m_telemetry) { + this.m_telemetry=OfficeCore.TelemetryService.newObject(this); + } + return this.m_telemetry; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "flightingService", { + get: function () { + if (!this.m_flightingService) { + this.m_flightingService=OfficeCore.FlightingService.newObject(this); + } + return this.m_flightingService; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeExtension.ClientRequestContext)); + OfficeCore.RequestContext=RequestContext; +})(OfficeCore || (OfficeCore={})); +var OfficeCore; +(function (OfficeCore) { + var _hostName="OfficeCore"; + var _defaultApiSetName="TelemetryApi"; + var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; + var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; + var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; + var _createNewObjectObjectPath=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath; + var _createChildItemObjectPathUsingIndexer=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer; + var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; + var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; + var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; + var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined=OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; + var _load=OfficeExtension.Utility.load; + var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; + var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; + var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var _typeTelemetryService="TelemetryService"; + var TelemetryService=(function (_super) { + __extends(TelemetryService, _super); + function TelemetryService() { + _super.apply(this, arguments); + } + Object.defineProperty(TelemetryService.prototype, "_className", { + get: function () { + return "TelemetryService"; + }, + enumerable: true, + configurable: true + }); + TelemetryService.prototype.sendTelemetryEvent=function (telemetryProperties, eventName, eventContract, eventFlags, value) { + _createMethodAction(this.context, this, "SendTelemetryEvent", 1, [telemetryProperties, eventName, eventContract, eventFlags, value], false); + }; + TelemetryService.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + TelemetryService.newObject=function (context) { + var ret=new OfficeCore.TelemetryService(context, _createNewObjectObjectPath(context, "Microsoft.Telemetry.TelemetryService", false, false)); + return ret; + }; + TelemetryService.prototype.toJSON=function () { + return {}; + }; + return TelemetryService; + }(OfficeExtension.ClientObject)); + OfficeCore.TelemetryService=TelemetryService; + var TelemetryErrorCodes; + (function (TelemetryErrorCodes) { + TelemetryErrorCodes.generalException="GeneralException"; + })(TelemetryErrorCodes=OfficeCore.TelemetryErrorCodes || (OfficeCore.TelemetryErrorCodes={})); +})(OfficeCore || (OfficeCore={})); + +var __extends=(this && this.__extends) || (function () { + var extendStatics=Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__=b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p]=b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor=d; } + d.prototype=b===null ? Object.create(b) : (__.prototype=b.prototype, new __()); + }; +})(); var Word; (function (Word) { function _normalizeSearchOptions(context, searchOptions) { @@ -13621,6 +15161,8 @@ var Word; } return newSearchOptions; } + var _hostName="Word"; + var _defaultApiSetName="WordApi"; var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; @@ -13629,19 +15171,59 @@ var Word; var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createEnsureUnchangedAction=OfficeExtension.ActionFactory.createEnsureUnchangedAction; var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; var _isUndefined=OfficeExtension.Utility.isUndefined; var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; var _load=OfficeExtension.Utility.load; + var _loadAndSync=OfficeExtension.Utility.loadAndSync; + var _retrieve=OfficeExtension.Utility.retrieve; + var _retrieveAndSync=OfficeExtension.Utility.retrieveAndSync; + var _toJson=OfficeExtension.Utility.toJson; var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var _typeApplication="Application"; + var Application=(function (_super) { + __extends(Application, _super); + function Application() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Application.prototype, "_className", { + get: function () { + return "Application"; + }, + enumerable: true, + configurable: true + }); + Application.prototype.createDocument=function (base64File) { + return new Word.DocumentCreated(this.context, _createMethodObjectPath(this.context, this, "CreateDocument", 1, [base64File], false, false, null, false)); + }; + Application.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + Application.newObject=function (context) { + var ret=new Word.Application(context, _createNewObjectObjectPath(context, "Microsoft.WordServices.Application", false, false)); + return ret; + }; + Application.prototype.toJSON=function () { + return _toJson(this, {}, {}); + }; + return Application; + }(OfficeExtension.ClientObject)); + Word.Application=Application; + var _typeBody="Body"; var Body=(function (_super) { __extends(Body, _super); function Body() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Body.prototype, "_className", { get: function () { @@ -13652,131 +15234,138 @@ var Word; }); Object.defineProperty(Body.prototype, "contentControls", { get: function () { - if (!this.m_contentControls) { - this.m_contentControls=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false)); + if (!this._C) { + this._C=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false, false)); } - return this.m_contentControls; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._F) { + this._F=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "inlinePictures", { get: function () { - if (!this.m_inlinePictures) { - this.m_inlinePictures=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false)); + if (!this._I) { + this._I=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false, false)); } - return this.m_inlinePictures; + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "lists", { get: function () { - if (!this.m_lists) { - this.m_lists=new Word.ListCollection(this.context, _createPropertyObjectPath(this.context, this, "Lists", true, false)); + _throwIfApiNotSupported("Body.lists", _defaultApiSetName, "1.3", _hostName); + if (!this._L) { + this._L=new Word.ListCollection(this.context, _createPropertyObjectPath(this.context, this, "Lists", true, false, false)); } - return this.m_lists; + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._P) { + this._P=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "parentBody", { get: function () { - if (!this.m_parentBody) { - this.m_parentBody=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false)); + _throwIfApiNotSupported("Body.parentBody", _defaultApiSetName, "1.3", _hostName); + if (!this._Pa) { + this._Pa=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false, false)); } - return this.m_parentBody; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "parentBodyOrNullObject", { get: function () { - if (!this.m_parentBodyOrNullObject) { - this.m_parentBodyOrNullObject=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBodyOrNullObject", false, false)); + _throwIfApiNotSupported("Body.parentBodyOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Par) { + this._Par=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBodyOrNullObject", false, false, false)); } - return this.m_parentBodyOrNullObject; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "parentContentControl", { get: function () { - if (!this.m_parentContentControl) { - this.m_parentContentControl=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false)); + if (!this._Pare) { + this._Pare=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false, false)); } - return this.m_parentContentControl; + return this._Pare; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "parentContentControlOrNullObject", { get: function () { - if (!this.m_parentContentControlOrNullObject) { - this.m_parentContentControlOrNullObject=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false)); + _throwIfApiNotSupported("Body.parentContentControlOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Paren) { + this._Paren=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false, false)); } - return this.m_parentContentControlOrNullObject; + return this._Paren; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "parentSection", { get: function () { - if (!this.m_parentSection) { - this.m_parentSection=new Word.Section(this.context, _createPropertyObjectPath(this.context, this, "ParentSection", false, false)); + _throwIfApiNotSupported("Body.parentSection", _defaultApiSetName, "1.3", _hostName); + if (!this._Parent) { + this._Parent=new Word.Section(this.context, _createPropertyObjectPath(this.context, this, "ParentSection", false, false, false)); } - return this.m_parentSection; + return this._Parent; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "parentSectionOrNullObject", { get: function () { - if (!this.m_parentSectionOrNullObject) { - this.m_parentSectionOrNullObject=new Word.Section(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionOrNullObject", false, false)); + _throwIfApiNotSupported("Body.parentSectionOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ParentS) { + this._ParentS=new Word.Section(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionOrNullObject", false, false, false)); } - return this.m_parentSectionOrNullObject; + return this._ParentS; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "tables", { get: function () { - if (!this.m_tables) { - this.m_tables=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false)); + _throwIfApiNotSupported("Body.tables", _defaultApiSetName, "1.3", _hostName); + if (!this._T) { + this._T=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false, false)); } - return this.m_tables; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "Body", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._S, _typeBody, this._isNull); + return this._S; }, set: function (value) { - this.m_style=value; + this._S=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -13784,11 +15373,12 @@ var Word; }); Object.defineProperty(Body.prototype, "styleBuiltIn", { get: function () { - _throwIfNotLoaded("styleBuiltIn", this.m_styleBuiltIn, "Body", this._isNull); - return this.m_styleBuiltIn; + _throwIfNotLoaded("styleBuiltIn", this._St, _typeBody, this._isNull); + _throwIfApiNotSupported("Body.styleBuiltIn", _defaultApiSetName, "1.3", _hostName); + return this._St; }, set: function (value) { - this.m_styleBuiltIn=value; + this._St=value; _createSetPropertyAction(this.context, this, "StyleBuiltIn", value); }, enumerable: true, @@ -13796,41 +15386,31 @@ var Word; }); Object.defineProperty(Body.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "Body", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._Te, _typeBody, this._isNull); + return this._Te; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "Body", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._Ty, _typeBody, this._isNull); + _throwIfApiNotSupported("Body.type", _defaultApiSetName, "1.3", _hostName); + return this._Ty; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Body", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeBody, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Body.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["style", "styleBuiltIn"], ["font"], [ - "contentControls", - "inlinePictures", - "lists", - "paragraphs", - "parentBody", - "parentBodyOrNullObject", - "parentContentControl", - "parentContentControlOrNullObject", - "parentSection", - "parentSectionOrNullObject", - "tables", "contentControls", "inlinePictures", "lists", @@ -13845,59 +15425,62 @@ var Word; ]); }; Body.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; Body.prototype.getHtml=function () { - var action=_createMethodAction(this.context, this, "GetHtml", 1, []); + var action=_createMethodAction(this.context, this, "GetHtml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Body.prototype.getOoxml=function () { - var action=_createMethodAction(this.context, this, "GetOoxml", 1, []); + var action=_createMethodAction(this.context, this, "GetOoxml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Body.prototype.getRange=function (rangeLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null)); + _throwIfApiNotSupported("Body.getRange", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null, false)); }; Body.prototype.insertBreak=function (breakType, insertLocation) { - _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation]); + _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation], false); }; Body.prototype.insertContentControl=function () { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null)); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null, false)); }; Body.prototype.insertFileFromBase64=function (base64File, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null, false)); }; Body.prototype.insertHtml=function (html, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null, false)); }; Body.prototype.insertInlinePictureFromBase64=function (base64EncodedImage, insertLocation) { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null)); + _throwIfApiNotSupported("Body.insertInlinePictureFromBase64", _defaultApiSetName, "1.2", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null, false)); }; Body.prototype.insertOoxml=function (ooxml, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null, false)); }; Body.prototype.insertParagraph=function (paragraphText, insertLocation) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null, false)); }; Body.prototype.insertTable=function (rowCount, columnCount, insertLocation, values) { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null)); + _throwIfApiNotSupported("Body.insertTable", _defaultApiSetName, "1.3", _hostName); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null, false)); }; Body.prototype.insertText=function (text, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null, false)); }; Body.prototype.search=function (searchText, searchOptions) { searchOptions=_normalizeSearchOptions(this.context, searchOptions); - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null)); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null, false)); }; Body.prototype.select=function (selectionMode) { - _createMethodAction(this.context, this, "Select", 1, [selectionMode]); + _createMethodAction(this.context, this, "Select", 1, [selectionMode], false); }; Body.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Body.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13906,25 +15489,33 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._S=obj["Style"]; } if (!_isUndefined(obj["StyleBuiltIn"])) { - this.m_styleBuiltIn=obj["StyleBuiltIn"]; + this._St=obj["StyleBuiltIn"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._Te=obj["Text"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._Ty=obj["Type"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["contentControls", "ContentControls", "font", "Font", "inlinePictures", "InlinePictures", "lists", "Lists", "paragraphs", "Paragraphs", "parentBody", "ParentBody", "parentBodyOrNullObject", "ParentBodyOrNullObject", "parentContentControl", "ParentContentControl", "parentContentControlOrNullObject", "ParentContentControlOrNullObject", "parentSection", "ParentSection", "parentSectionOrNullObject", "ParentSectionOrNullObject", "tables", "Tables"]); }; Body.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Body.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Body.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Body.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; Body.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -13932,7 +15523,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; Body.prototype.track=function () { @@ -13944,21 +15535,32 @@ var Word; return this; }; Body.prototype.toJSON=function () { - return { - "font": this.m_font, - "style": this.m_style, - "styleBuiltIn": this.m_styleBuiltIn, - "text": this.m_text, - "type": this.m_type - }; + return _toJson(this, { + "style": this._S, + "styleBuiltIn": this._St, + "text": this._Te, + "type": this._Ty, + }, { + "contentControls": this._C, + "font": this._F, + "inlinePictures": this._I, + "lists": this._L, + "paragraphs": this._P, + "tables": this._T, + }); + }; + Body.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Body; }(OfficeExtension.ClientObject)); Word.Body=Body; + var _typeContentControl="ContentControl"; var ContentControl=(function (_super) { __extends(ContentControl, _super); function ContentControl() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ContentControl.prototype, "_className", { get: function () { @@ -13969,141 +15571,149 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "contentControls", { get: function () { - if (!this.m_contentControls) { - this.m_contentControls=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false)); + if (!this._Con) { + this._Con=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false, false)); } - return this.m_contentControls; + return this._Con; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._F) { + this._F=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "inlinePictures", { get: function () { - if (!this.m_inlinePictures) { - this.m_inlinePictures=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false)); + if (!this._In) { + this._In=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false, false)); } - return this.m_inlinePictures; + return this._In; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "lists", { get: function () { - if (!this.m_lists) { - this.m_lists=new Word.ListCollection(this.context, _createPropertyObjectPath(this.context, this, "Lists", true, false)); + _throwIfApiNotSupported("ContentControl.lists", _defaultApiSetName, "1.3", _hostName); + if (!this._L) { + this._L=new Word.ListCollection(this.context, _createPropertyObjectPath(this.context, this, "Lists", true, false, false)); } - return this.m_lists; + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._P) { + this._P=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "parentBody", { get: function () { - if (!this.m_parentBody) { - this.m_parentBody=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false)); + _throwIfApiNotSupported("ContentControl.parentBody", _defaultApiSetName, "1.3", _hostName); + if (!this._Pa) { + this._Pa=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false, false)); } - return this.m_parentBody; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "parentContentControl", { get: function () { - if (!this.m_parentContentControl) { - this.m_parentContentControl=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false)); + if (!this._Par) { + this._Par=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false, false)); } - return this.m_parentContentControl; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "parentContentControlOrNullObject", { get: function () { - if (!this.m_parentContentControlOrNullObject) { - this.m_parentContentControlOrNullObject=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false)); + _throwIfApiNotSupported("ContentControl.parentContentControlOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Pare) { + this._Pare=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false, false)); } - return this.m_parentContentControlOrNullObject; + return this._Pare; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + _throwIfApiNotSupported("ContentControl.parentTable", _defaultApiSetName, "1.3", _hostName); + if (!this._Paren) { + this._Paren=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._Paren; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "parentTableCell", { get: function () { - if (!this.m_parentTableCell) { - this.m_parentTableCell=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false)); + _throwIfApiNotSupported("ContentControl.parentTableCell", _defaultApiSetName, "1.3", _hostName); + if (!this._Parent) { + this._Parent=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false, false)); } - return this.m_parentTableCell; + return this._Parent; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "parentTableCellOrNullObject", { get: function () { - if (!this.m_parentTableCellOrNullObject) { - this.m_parentTableCellOrNullObject=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false)); + _throwIfApiNotSupported("ContentControl.parentTableCellOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ParentT) { + this._ParentT=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false, false)); } - return this.m_parentTableCellOrNullObject; + return this._ParentT; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "parentTableOrNullObject", { get: function () { - if (!this.m_parentTableOrNullObject) { - this.m_parentTableOrNullObject=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false)); + _throwIfApiNotSupported("ContentControl.parentTableOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ParentTa) { + this._ParentTa=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false, false)); } - return this.m_parentTableOrNullObject; + return this._ParentTa; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "tables", { get: function () { - if (!this.m_tables) { - this.m_tables=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false)); + _throwIfApiNotSupported("ContentControl.tables", _defaultApiSetName, "1.3", _hostName); + if (!this._T) { + this._T=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false, false)); } - return this.m_tables; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "appearance", { get: function () { - _throwIfNotLoaded("appearance", this.m_appearance, "ContentControl", this._isNull); - return this.m_appearance; + _throwIfNotLoaded("appearance", this._A, _typeContentControl, this._isNull); + return this._A; }, set: function (value) { - this.m_appearance=value; + this._A=value; _createSetPropertyAction(this.context, this, "Appearance", value); }, enumerable: true, @@ -14111,11 +15721,11 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "cannotDelete", { get: function () { - _throwIfNotLoaded("cannotDelete", this.m_cannotDelete, "ContentControl", this._isNull); - return this.m_cannotDelete; + _throwIfNotLoaded("cannotDelete", this._C, _typeContentControl, this._isNull); + return this._C; }, set: function (value) { - this.m_cannotDelete=value; + this._C=value; _createSetPropertyAction(this.context, this, "CannotDelete", value); }, enumerable: true, @@ -14123,11 +15733,11 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "cannotEdit", { get: function () { - _throwIfNotLoaded("cannotEdit", this.m_cannotEdit, "ContentControl", this._isNull); - return this.m_cannotEdit; + _throwIfNotLoaded("cannotEdit", this._Ca, _typeContentControl, this._isNull); + return this._Ca; }, set: function (value) { - this.m_cannotEdit=value; + this._Ca=value; _createSetPropertyAction(this.context, this, "CannotEdit", value); }, enumerable: true, @@ -14135,11 +15745,11 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "ContentControl", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._Co, _typeContentControl, this._isNull); + return this._Co; }, set: function (value) { - this.m_color=value; + this._Co=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -14147,19 +15757,19 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "ContentControl", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeContentControl, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "placeholderText", { get: function () { - _throwIfNotLoaded("placeholderText", this.m_placeholderText, "ContentControl", this._isNull); - return this.m_placeholderText; + _throwIfNotLoaded("placeholderText", this._Pl, _typeContentControl, this._isNull); + return this._Pl; }, set: function (value) { - this.m_placeholderText=value; + this._Pl=value; _createSetPropertyAction(this.context, this, "PlaceholderText", value); }, enumerable: true, @@ -14167,11 +15777,11 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "removeWhenEdited", { get: function () { - _throwIfNotLoaded("removeWhenEdited", this.m_removeWhenEdited, "ContentControl", this._isNull); - return this.m_removeWhenEdited; + _throwIfNotLoaded("removeWhenEdited", this._R, _typeContentControl, this._isNull); + return this._R; }, set: function (value) { - this.m_removeWhenEdited=value; + this._R=value; _createSetPropertyAction(this.context, this, "RemoveWhenEdited", value); }, enumerable: true, @@ -14179,11 +15789,11 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "ContentControl", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._S, _typeContentControl, this._isNull); + return this._S; }, set: function (value) { - this.m_style=value; + this._S=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -14191,11 +15801,12 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "styleBuiltIn", { get: function () { - _throwIfNotLoaded("styleBuiltIn", this.m_styleBuiltIn, "ContentControl", this._isNull); - return this.m_styleBuiltIn; + _throwIfNotLoaded("styleBuiltIn", this._St, _typeContentControl, this._isNull); + _throwIfApiNotSupported("ContentControl.styleBuiltIn", _defaultApiSetName, "1.3", _hostName); + return this._St; }, set: function (value) { - this.m_styleBuiltIn=value; + this._St=value; _createSetPropertyAction(this.context, this, "StyleBuiltIn", value); }, enumerable: true, @@ -14203,19 +15814,20 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "subtype", { get: function () { - _throwIfNotLoaded("subtype", this.m_subtype, "ContentControl", this._isNull); - return this.m_subtype; + _throwIfNotLoaded("subtype", this._Su, _typeContentControl, this._isNull); + _throwIfApiNotSupported("ContentControl.subtype", _defaultApiSetName, "1.3", _hostName); + return this._Su; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "tag", { get: function () { - _throwIfNotLoaded("tag", this.m_tag, "ContentControl", this._isNull); - return this.m_tag; + _throwIfNotLoaded("tag", this._Ta, _typeContentControl, this._isNull); + return this._Ta; }, set: function (value) { - this.m_tag=value; + this._Ta=value; _createSetPropertyAction(this.context, this, "Tag", value); }, enumerable: true, @@ -14223,19 +15835,19 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "ContentControl", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._Te, _typeContentControl, this._isNull); + return this._Te; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "title", { get: function () { - _throwIfNotLoaded("title", this.m_title, "ContentControl", this._isNull); - return this.m_title; + _throwIfNotLoaded("title", this._Ti, _typeContentControl, this._isNull); + return this._Ti; }, set: function (value) { - this.m_title=value; + this._Ti=value; _createSetPropertyAction(this.context, this, "Title", value); }, enumerable: true, @@ -14243,34 +15855,22 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "ContentControl", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._Ty, _typeContentControl, this._isNull); + return this._Ty; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "ContentControl", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeContentControl, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); ContentControl.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["title", "tag", "placeholderText", "appearance", "color", "removeWhenEdited", "cannotDelete", "cannotEdit", "style", "styleBuiltIn"], ["font"], [ - "contentControls", - "inlinePictures", - "lists", - "paragraphs", - "parentBody", - "parentContentControl", - "parentContentControlOrNullObject", - "parentTable", - "parentTableCell", - "parentTableCellOrNullObject", - "parentTableOrNullObject", - "tables", "contentControls", "inlinePictures", "lists", @@ -14286,65 +15886,70 @@ var Word; ]); }; ContentControl.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; ContentControl.prototype.delete=function (keepContent) { - _createMethodAction(this.context, this, "Delete", 0, [keepContent]); + _createMethodAction(this.context, this, "Delete", 0, [keepContent], false); }; ContentControl.prototype.getHtml=function () { - var action=_createMethodAction(this.context, this, "GetHtml", 1, []); + var action=_createMethodAction(this.context, this, "GetHtml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; ContentControl.prototype.getOoxml=function () { - var action=_createMethodAction(this.context, this, "GetOoxml", 1, []); + var action=_createMethodAction(this.context, this, "GetOoxml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; ContentControl.prototype.getRange=function (rangeLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null)); + _throwIfApiNotSupported("ContentControl.getRange", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null, false)); }; ContentControl.prototype.getTextRanges=function (endingMarks, trimSpacing) { - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetTextRanges", 1, [endingMarks, trimSpacing], true, false, null)); + _throwIfApiNotSupported("ContentControl.getTextRanges", _defaultApiSetName, "1.3", _hostName); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetTextRanges", 1, [endingMarks, trimSpacing], true, false, null, false)); }; ContentControl.prototype.insertBreak=function (breakType, insertLocation) { - _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation]); + _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation], false); }; ContentControl.prototype.insertFileFromBase64=function (base64File, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null, false)); }; ContentControl.prototype.insertHtml=function (html, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null, false)); }; ContentControl.prototype.insertInlinePictureFromBase64=function (base64EncodedImage, insertLocation) { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null)); + _throwIfApiNotSupported("ContentControl.insertInlinePictureFromBase64", _defaultApiSetName, "1.2", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null, false)); }; ContentControl.prototype.insertOoxml=function (ooxml, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null, false)); }; ContentControl.prototype.insertParagraph=function (paragraphText, insertLocation) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null, false)); }; ContentControl.prototype.insertTable=function (rowCount, columnCount, insertLocation, values) { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null)); + _throwIfApiNotSupported("ContentControl.insertTable", _defaultApiSetName, "1.3", _hostName); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null, false)); }; ContentControl.prototype.insertText=function (text, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null, false)); }; ContentControl.prototype.search=function (searchText, searchOptions) { searchOptions=_normalizeSearchOptions(this.context, searchOptions); - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null)); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null, false)); }; ContentControl.prototype.select=function (selectionMode) { - _createMethodAction(this.context, this, "Select", 1, [selectionMode]); + _createMethodAction(this.context, this, "Select", 1, [selectionMode], false); }; ContentControl.prototype.split=function (delimiters, multiParagraphs, trimDelimiters, trimSpacing) { - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Split", 1, [delimiters, multiParagraphs, trimDelimiters, trimSpacing], true, false, null)); + _throwIfApiNotSupported("ContentControl.split", _defaultApiSetName, "1.3", _hostName); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Split", 1, [delimiters, multiParagraphs, trimDelimiters, trimSpacing], true, false, null, false)); }; ContentControl.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; ContentControl.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14353,55 +15958,63 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Appearance"])) { - this.m_appearance=obj["Appearance"]; + this._A=obj["Appearance"]; } if (!_isUndefined(obj["CannotDelete"])) { - this.m_cannotDelete=obj["CannotDelete"]; + this._C=obj["CannotDelete"]; } if (!_isUndefined(obj["CannotEdit"])) { - this.m_cannotEdit=obj["CannotEdit"]; + this._Ca=obj["CannotEdit"]; } if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._Co=obj["Color"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["PlaceholderText"])) { - this.m_placeholderText=obj["PlaceholderText"]; + this._Pl=obj["PlaceholderText"]; } if (!_isUndefined(obj["RemoveWhenEdited"])) { - this.m_removeWhenEdited=obj["RemoveWhenEdited"]; + this._R=obj["RemoveWhenEdited"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._S=obj["Style"]; } if (!_isUndefined(obj["StyleBuiltIn"])) { - this.m_styleBuiltIn=obj["StyleBuiltIn"]; + this._St=obj["StyleBuiltIn"]; } if (!_isUndefined(obj["Subtype"])) { - this.m_subtype=obj["Subtype"]; + this._Su=obj["Subtype"]; } if (!_isUndefined(obj["Tag"])) { - this.m_tag=obj["Tag"]; + this._Ta=obj["Tag"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._Te=obj["Text"]; } if (!_isUndefined(obj["Title"])) { - this.m_title=obj["Title"]; + this._Ti=obj["Title"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._Ty=obj["Type"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["contentControls", "ContentControls", "font", "Font", "inlinePictures", "InlinePictures", "lists", "Lists", "paragraphs", "Paragraphs", "parentBody", "ParentBody", "parentContentControl", "ParentContentControl", "parentContentControlOrNullObject", "ParentContentControlOrNullObject", "parentTable", "ParentTable", "parentTableCell", "ParentTableCell", "parentTableCellOrNullObject", "ParentTableCellOrNullObject", "parentTableOrNullObject", "ParentTableOrNullObject", "tables", "Tables"]); }; ContentControl.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ContentControl.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ContentControl.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ContentControl.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; ContentControl.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -14409,10 +16022,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; ContentControl.prototype.track=function () { @@ -14424,31 +16037,42 @@ var Word; return this; }; ContentControl.prototype.toJSON=function () { - return { - "appearance": this.m_appearance, - "cannotDelete": this.m_cannotDelete, - "cannotEdit": this.m_cannotEdit, - "color": this.m_color, - "font": this.m_font, - "id": this.m_id, - "placeholderText": this.m_placeholderText, - "removeWhenEdited": this.m_removeWhenEdited, - "style": this.m_style, - "styleBuiltIn": this.m_styleBuiltIn, - "subtype": this.m_subtype, - "tag": this.m_tag, - "text": this.m_text, - "title": this.m_title, - "type": this.m_type - }; + return _toJson(this, { + "appearance": this._A, + "cannotDelete": this._C, + "cannotEdit": this._Ca, + "color": this._Co, + "id": this._I, + "placeholderText": this._Pl, + "removeWhenEdited": this._R, + "style": this._S, + "styleBuiltIn": this._St, + "subtype": this._Su, + "tag": this._Ta, + "text": this._Te, + "title": this._Ti, + "type": this._Ty, + }, { + "contentControls": this._Con, + "font": this._F, + "inlinePictures": this._In, + "lists": this._L, + "paragraphs": this._P, + "tables": this._T, + }); + }; + ContentControl.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ContentControl; }(OfficeExtension.ClientObject)); Word.ContentControl=ContentControl; + var _typeContentControlCollection="ContentControlCollection"; var ContentControlCollection=(function (_super) { __extends(ContentControlCollection, _super); function ContentControlCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ContentControlCollection.prototype, "_className", { get: function () { @@ -14459,7 +16083,7 @@ var Word; }); Object.defineProperty(ContentControlCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ContentControlCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeContentControlCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14467,38 +16091,42 @@ var Word; }); Object.defineProperty(ContentControlCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "ContentControlCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeContentControlCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); ContentControlCollection.prototype.getById=function (id) { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetById", 1, [id], false, false, null)); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetById", 1, [id], false, false, null, false)); }; ContentControlCollection.prototype.getByIdOrNullObject=function (id) { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetByIdOrNullObject", 1, [id], false, false, null)); + _throwIfApiNotSupported("ContentControlCollection.getByIdOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetByIdOrNullObject", 1, [id], false, false, null, false)); }; ContentControlCollection.prototype.getByTag=function (tag) { - return new Word.ContentControlCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTag", 1, [tag], true, false, null)); + return new Word.ContentControlCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTag", 1, [tag], true, false, null, false)); }; ContentControlCollection.prototype.getByTitle=function (title) { - return new Word.ContentControlCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTitle", 1, [title], true, false, null)); + return new Word.ContentControlCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTitle", 1, [title], true, false, null, false)); }; ContentControlCollection.prototype.getByTypes=function (types) { - return new Word.ContentControlCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTypes", 1, [types], true, false, null)); + _throwIfApiNotSupported("ContentControlCollection.getByTypes", _defaultApiSetName, "1.3", _hostName); + return new Word.ContentControlCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTypes", 1, [types], true, false, null, false)); }; ContentControlCollection.prototype.getFirst=function () { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + _throwIfApiNotSupported("ContentControlCollection.getFirst", _defaultApiSetName, "1.3", _hostName); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; ContentControlCollection.prototype.getFirstOrNullObject=function () { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("ContentControlCollection.getFirstOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; ContentControlCollection.prototype.getItem=function (index) { return new Word.ContentControl(this.context, _createIndexerObjectPath(this.context, this, [index])); }; ContentControlCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; ContentControlCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14507,7 +16135,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14520,8 +16148,16 @@ var Word; } }; ContentControlCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ContentControlCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ContentControlCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ContentControlCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; ContentControlCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -14529,7 +16165,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; ContentControlCollection.prototype.track=function () { @@ -14541,15 +16177,16 @@ var Word; return this; }; ContentControlCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return ContentControlCollection; }(OfficeExtension.ClientObject)); Word.ContentControlCollection=ContentControlCollection; + var _typeCustomProperty="CustomProperty"; var CustomProperty=(function (_super) { __extends(CustomProperty, _super); function CustomProperty() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CustomProperty.prototype, "_className", { get: function () { @@ -14560,15 +16197,15 @@ var Word; }); Object.defineProperty(CustomProperty.prototype, "key", { get: function () { - _throwIfNotLoaded("key", this.m_key, "CustomProperty", this._isNull); - return this.m_key; + _throwIfNotLoaded("key", this._K, _typeCustomProperty, this._isNull); + return this._K; }, enumerable: true, configurable: true }); Object.defineProperty(CustomProperty.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "CustomProperty", this._isNull); + _throwIfNotLoaded("type", this.m_type, _typeCustomProperty, this._isNull); return this.m_type; }, enumerable: true, @@ -14581,7 +16218,7 @@ var Word; _throwIfNotLoaded("value", this.m_value, "CustomProperty", this._isNull); return new Date(this.m_value); } - _throwIfNotLoaded("value", this.m_value, "CustomProperty", this._isNull); + _throwIfNotLoaded("value", this.m_value, _typeCustomProperty, this._isNull); return this.m_value; }, set: function (value) { @@ -14593,16 +16230,16 @@ var Word; }); Object.defineProperty(CustomProperty.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "CustomProperty", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeCustomProperty, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(CustomProperty.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "CustomProperty", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeCustomProperty, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -14611,10 +16248,10 @@ var Word; this._recursivelySet(properties, options, ["value"], [], []); }; CustomProperty.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; CustomProperty.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; CustomProperty.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14623,7 +16260,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Key"])) { - this.m_key=obj["Key"]; + this._K=obj["Key"]; } if (!_isUndefined(obj["Type"])) { this.m_type=obj["Type"]; @@ -14632,15 +16269,23 @@ var Word; this.m_value=obj["Value"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } }; CustomProperty.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CustomProperty.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + CustomProperty.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CustomProperty.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; CustomProperty.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -14648,10 +16293,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; CustomProperty.prototype.track=function () { @@ -14663,19 +16308,24 @@ var Word; return this; }; CustomProperty.prototype.toJSON=function () { - return { - "key": this.m_key, + return _toJson(this, { + "key": this._K, "type": this.m_type, - "value": this.m_value - }; + "value": this.m_value, + }, {}); + }; + CustomProperty.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return CustomProperty; }(OfficeExtension.ClientObject)); Word.CustomProperty=CustomProperty; + var _typeCustomPropertyCollection="CustomPropertyCollection"; var CustomPropertyCollection=(function (_super) { __extends(CustomPropertyCollection, _super); function CustomPropertyCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CustomPropertyCollection.prototype, "_className", { get: function () { @@ -14686,7 +16336,7 @@ var Word; }); Object.defineProperty(CustomPropertyCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "CustomPropertyCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeCustomPropertyCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14694,20 +16344,20 @@ var Word; }); Object.defineProperty(CustomPropertyCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "CustomPropertyCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeCustomPropertyCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); CustomPropertyCollection.prototype.add=function (key, value) { - return new Word.CustomProperty(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [key, value], false, true, null)); + return new Word.CustomProperty(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [key, value], false, true, null, false)); }; CustomPropertyCollection.prototype.deleteAll=function () { - _createMethodAction(this.context, this, "DeleteAll", 0, []); + _createMethodAction(this.context, this, "DeleteAll", 0, [], false); }; CustomPropertyCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 1, []); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -14716,10 +16366,10 @@ var Word; return new Word.CustomProperty(this.context, _createIndexerObjectPath(this.context, this, [key])); }; CustomPropertyCollection.prototype.getItemOrNullObject=function (key) { - return new Word.CustomProperty(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null)); + return new Word.CustomProperty(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null, false)); }; CustomPropertyCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; CustomPropertyCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14728,7 +16378,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14741,8 +16391,16 @@ var Word; } }; CustomPropertyCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CustomPropertyCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + CustomPropertyCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CustomPropertyCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; CustomPropertyCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -14750,7 +16408,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; CustomPropertyCollection.prototype.track=function () { @@ -14762,15 +16420,16 @@ var Word; return this; }; CustomPropertyCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return CustomPropertyCollection; }(OfficeExtension.ClientObject)); Word.CustomPropertyCollection=CustomPropertyCollection; + var _typeDocument="Document"; var Document=(function (_super) { __extends(Document, _super); function Document() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Document.prototype, "_className", { get: function () { @@ -14781,55 +16440,56 @@ var Word; }); Object.defineProperty(Document.prototype, "body", { get: function () { - if (!this.m_body) { - this.m_body=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "Body", false, false)); + if (!this._B) { + this._B=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "Body", false, false, false)); } - return this.m_body; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(Document.prototype, "contentControls", { get: function () { - if (!this.m_contentControls) { - this.m_contentControls=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false)); + if (!this._C) { + this._C=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false, false)); } - return this.m_contentControls; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Document.prototype, "properties", { get: function () { - if (!this.m_properties) { - this.m_properties=new Word.DocumentProperties(this.context, _createPropertyObjectPath(this.context, this, "Properties", false, false)); + _throwIfApiNotSupported("Document.properties", _defaultApiSetName, "1.3", _hostName); + if (!this._P) { + this._P=new Word.DocumentProperties(this.context, _createPropertyObjectPath(this.context, this, "Properties", false, false, false)); } - return this.m_properties; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Document.prototype, "sections", { get: function () { - if (!this.m_sections) { - this.m_sections=new Word.SectionCollection(this.context, _createPropertyObjectPath(this.context, this, "Sections", true, false)); + if (!this._Se) { + this._Se=new Word.SectionCollection(this.context, _createPropertyObjectPath(this.context, this, "Sections", true, false, false)); } - return this.m_sections; + return this._Se; }, enumerable: true, configurable: true }); Object.defineProperty(Document.prototype, "saved", { get: function () { - _throwIfNotLoaded("saved", this.m_saved, "Document", this._isNull); - return this.m_saved; + _throwIfNotLoaded("saved", this._S, _typeDocument, this._isNull); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(Document.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Document", this._isNull); + _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, _typeDocument, this._isNull); return this.m__ReferenceId; }, enumerable: true, @@ -14837,38 +16497,52 @@ var Word; }); Document.prototype.set=function (properties, options) { this._recursivelySet(properties, options, [], ["body", "properties"], [ - "contentControls", - "sections", "contentControls", "sections" ]); }; + Document.prototype.getMetadata=function (propertyGUID) { + var action=_createMethodAction(this.context, this, "GetMetadata", 1, [propertyGUID], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; Document.prototype.getSelection=function () { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetSelection", 1, [], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetSelection", 1, [], false, true, null, false)); + }; + Document.prototype.open=function () { + _throwIfApiNotSupported("Document.open", _defaultApiSetName, "1.3", _hostName); + _createMethodAction(this.context, this, "Open", 1, [], false); }; Document.prototype.save=function () { - _createMethodAction(this.context, this, "Save", 0, []); + _createMethodAction(this.context, this, "Save", 0, [], false); + }; + Document.prototype.setMetadata=function (propertyGUID, propertyValue) { + _createMethodAction(this.context, this, "SetMetadata", 0, [propertyGUID, propertyValue], false); + }; + Document.prototype.setMetadataOnTile=function (tileID, propertyGUID, propertyValue) { + _createMethodAction(this.context, this, "SetMetadataOnTile", 0, [tileID, propertyGUID, propertyValue], false); }; Document.prototype._GetObjectByReferenceId=function (referenceId) { - var action=_createMethodAction(this.context, this, "_GetObjectByReferenceId", 1, [referenceId]); + var action=_createMethodAction(this.context, this, "_GetObjectByReferenceId", 1, [referenceId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Document.prototype._GetObjectTypeNameByReferenceId=function (referenceId) { - var action=_createMethodAction(this.context, this, "_GetObjectTypeNameByReferenceId", 1, [referenceId]); + var action=_createMethodAction(this.context, this, "_GetObjectTypeNameByReferenceId", 1, [referenceId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Document.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Document.prototype._RemoveAllReferences=function () { - _createMethodAction(this.context, this, "_RemoveAllReferences", 1, []); + _createMethodAction(this.context, this, "_RemoveAllReferences", 1, [], false); }; Document.prototype._RemoveReference=function (referenceId) { - _createMethodAction(this.context, this, "_RemoveReference", 1, [referenceId]); + _createMethodAction(this.context, this, "_RemoveReference", 1, [referenceId], false); }; Document.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14877,7 +16551,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Saved"])) { - this.m_saved=obj["Saved"]; + this._S=obj["Saved"]; } if (!_isUndefined(obj["_ReferenceId"])) { this.m__ReferenceId=obj["_ReferenceId"]; @@ -14885,8 +16559,16 @@ var Word; _handleNavigationPropertyResults(this, obj, ["body", "Body", "contentControls", "ContentControls", "properties", "Properties", "sections", "Sections"]); }; Document.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Document.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Document.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Document.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; Document.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -14906,19 +16588,177 @@ var Word; return this; }; Document.prototype.toJSON=function () { - return { - "body": this.m_body, - "properties": this.m_properties, - "saved": this.m_saved - }; + return _toJson(this, { + "saved": this._S, + }, { + "body": this._B, + "contentControls": this._C, + "properties": this._P, + "sections": this._Se, + }); + }; + Document.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Document; }(OfficeExtension.ClientObject)); Word.Document=Document; + var _typeDocumentCreated="DocumentCreated"; + var DocumentCreated=(function (_super) { + __extends(DocumentCreated, _super); + function DocumentCreated() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(DocumentCreated.prototype, "_className", { + get: function () { + return "DocumentCreated"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentCreated.prototype, "body", { + get: function () { + _throwIfApiNotSupported("DocumentCreated.body", "WordApiHiddenDocument", "1.3", _hostName); + if (!this._B) { + this._B=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "Body", false, false, false)); + } + return this._B; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentCreated.prototype, "contentControls", { + get: function () { + _throwIfApiNotSupported("DocumentCreated.contentControls", "WordApiHiddenDocument", "1.3", _hostName); + if (!this._C) { + this._C=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false, false)); + } + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentCreated.prototype, "properties", { + get: function () { + _throwIfApiNotSupported("DocumentCreated.properties", "WordApiHiddenDocument", "1.3", _hostName); + if (!this._P) { + this._P=new Word.DocumentProperties(this.context, _createPropertyObjectPath(this.context, this, "Properties", false, false, false)); + } + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentCreated.prototype, "sections", { + get: function () { + _throwIfApiNotSupported("DocumentCreated.sections", "WordApiHiddenDocument", "1.3", _hostName); + if (!this._Se) { + this._Se=new Word.SectionCollection(this.context, _createPropertyObjectPath(this.context, this, "Sections", true, false, false)); + } + return this._Se; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentCreated.prototype, "saved", { + get: function () { + _throwIfNotLoaded("saved", this._S, _typeDocumentCreated, this._isNull); + _throwIfApiNotSupported("DocumentCreated.saved", "WordApiHiddenDocument", "1.3", _hostName); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentCreated.prototype, "_ReferenceId", { + get: function () { + _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, _typeDocumentCreated, this._isNull); + return this.m__ReferenceId; + }, + enumerable: true, + configurable: true + }); + DocumentCreated.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, [], ["body", "properties"], [ + "contentControls", + "sections" + ]); + }; + DocumentCreated.prototype.open=function () { + _createMethodAction(this.context, this, "Open", 1, [], false); + }; + DocumentCreated.prototype.save=function () { + _throwIfApiNotSupported("DocumentCreated.save", "WordApiHiddenDocument", "1.3", _hostName); + _createMethodAction(this.context, this, "Save", 0, [], false); + }; + DocumentCreated.prototype._KeepReference=function () { + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); + }; + DocumentCreated.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Saved"])) { + this._S=obj["Saved"]; + } + if (!_isUndefined(obj["_ReferenceId"])) { + this.m__ReferenceId=obj["_ReferenceId"]; + } + _handleNavigationPropertyResults(this, obj, ["body", "Body", "contentControls", "ContentControls", "properties", "Properties", "sections", "Sections"]); + }; + DocumentCreated.prototype.load=function (option) { + return _load(this, option); + }; + DocumentCreated.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + DocumentCreated.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + DocumentCreated.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + DocumentCreated.prototype._handleIdResult=function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["_ReferenceId"])) { + this.m__ReferenceId=value["_ReferenceId"]; + } + }; + DocumentCreated.prototype.track=function () { + this.context.trackedObjects.add(this); + return this; + }; + DocumentCreated.prototype.untrack=function () { + this.context.trackedObjects.remove(this); + return this; + }; + DocumentCreated.prototype.toJSON=function () { + return _toJson(this, { + "saved": this._S, + }, { + "body": this._B, + "contentControls": this._C, + "properties": this._P, + "sections": this._Se, + }); + }; + DocumentCreated.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return DocumentCreated; + }(OfficeExtension.ClientObject)); + Word.DocumentCreated=DocumentCreated; + var _typeDocumentProperties="DocumentProperties"; var DocumentProperties=(function (_super) { __extends(DocumentProperties, _super); function DocumentProperties() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(DocumentProperties.prototype, "_className", { get: function () { @@ -14929,29 +16769,29 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "customProperties", { get: function () { - if (!this.m_customProperties) { - this.m_customProperties=new Word.CustomPropertyCollection(this.context, _createPropertyObjectPath(this.context, this, "CustomProperties", true, false)); + if (!this._Cu) { + this._Cu=new Word.CustomPropertyCollection(this.context, _createPropertyObjectPath(this.context, this, "CustomProperties", true, false, false)); } - return this.m_customProperties; + return this._Cu; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "applicationName", { get: function () { - _throwIfNotLoaded("applicationName", this.m_applicationName, "DocumentProperties", this._isNull); - return this.m_applicationName; + _throwIfNotLoaded("applicationName", this._A, _typeDocumentProperties, this._isNull); + return this._A; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "author", { get: function () { - _throwIfNotLoaded("author", this.m_author, "DocumentProperties", this._isNull); - return this.m_author; + _throwIfNotLoaded("author", this._Au, _typeDocumentProperties, this._isNull); + return this._Au; }, set: function (value) { - this.m_author=value; + this._Au=value; _createSetPropertyAction(this.context, this, "Author", value); }, enumerable: true, @@ -14959,11 +16799,11 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "category", { get: function () { - _throwIfNotLoaded("category", this.m_category, "DocumentProperties", this._isNull); - return this.m_category; + _throwIfNotLoaded("category", this._C, _typeDocumentProperties, this._isNull); + return this._C; }, set: function (value) { - this.m_category=value; + this._C=value; _createSetPropertyAction(this.context, this, "Category", value); }, enumerable: true, @@ -14971,11 +16811,11 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "comments", { get: function () { - _throwIfNotLoaded("comments", this.m_comments, "DocumentProperties", this._isNull); - return this.m_comments; + _throwIfNotLoaded("comments", this._Co, _typeDocumentProperties, this._isNull); + return this._Co; }, set: function (value) { - this.m_comments=value; + this._Co=value; _createSetPropertyAction(this.context, this, "Comments", value); }, enumerable: true, @@ -14983,11 +16823,11 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "company", { get: function () { - _throwIfNotLoaded("company", this.m_company, "DocumentProperties", this._isNull); - return this.m_company; + _throwIfNotLoaded("company", this._Com, _typeDocumentProperties, this._isNull); + return this._Com; }, set: function (value) { - this.m_company=value; + this._Com=value; _createSetPropertyAction(this.context, this, "Company", value); }, enumerable: true, @@ -14995,19 +16835,19 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "creationDate", { get: function () { - _throwIfNotLoaded("creationDate", this.m_creationDate, "DocumentProperties", this._isNull); - return this.m_creationDate; + _throwIfNotLoaded("creationDate", this._Cr, _typeDocumentProperties, this._isNull); + return this._Cr; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "format", { get: function () { - _throwIfNotLoaded("format", this.m_format, "DocumentProperties", this._isNull); - return this.m_format; + _throwIfNotLoaded("format", this._F, _typeDocumentProperties, this._isNull); + return this._F; }, set: function (value) { - this.m_format=value; + this._F=value; _createSetPropertyAction(this.context, this, "Format", value); }, enumerable: true, @@ -15015,11 +16855,11 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "keywords", { get: function () { - _throwIfNotLoaded("keywords", this.m_keywords, "DocumentProperties", this._isNull); - return this.m_keywords; + _throwIfNotLoaded("keywords", this._K, _typeDocumentProperties, this._isNull); + return this._K; }, set: function (value) { - this.m_keywords=value; + this._K=value; _createSetPropertyAction(this.context, this, "Keywords", value); }, enumerable: true, @@ -15027,35 +16867,35 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "lastAuthor", { get: function () { - _throwIfNotLoaded("lastAuthor", this.m_lastAuthor, "DocumentProperties", this._isNull); - return this.m_lastAuthor; + _throwIfNotLoaded("lastAuthor", this._L, _typeDocumentProperties, this._isNull); + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "lastPrintDate", { get: function () { - _throwIfNotLoaded("lastPrintDate", this.m_lastPrintDate, "DocumentProperties", this._isNull); - return this.m_lastPrintDate; + _throwIfNotLoaded("lastPrintDate", this._La, _typeDocumentProperties, this._isNull); + return this._La; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "lastSaveTime", { get: function () { - _throwIfNotLoaded("lastSaveTime", this.m_lastSaveTime, "DocumentProperties", this._isNull); - return this.m_lastSaveTime; + _throwIfNotLoaded("lastSaveTime", this._Las, _typeDocumentProperties, this._isNull); + return this._Las; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "manager", { get: function () { - _throwIfNotLoaded("manager", this.m_manager, "DocumentProperties", this._isNull); - return this.m_manager; + _throwIfNotLoaded("manager", this._M, _typeDocumentProperties, this._isNull); + return this._M; }, set: function (value) { - this.m_manager=value; + this._M=value; _createSetPropertyAction(this.context, this, "Manager", value); }, enumerable: true, @@ -15063,27 +16903,27 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "revisionNumber", { get: function () { - _throwIfNotLoaded("revisionNumber", this.m_revisionNumber, "DocumentProperties", this._isNull); - return this.m_revisionNumber; + _throwIfNotLoaded("revisionNumber", this._R, _typeDocumentProperties, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "security", { get: function () { - _throwIfNotLoaded("security", this.m_security, "DocumentProperties", this._isNull); - return this.m_security; + _throwIfNotLoaded("security", this._S, _typeDocumentProperties, this._isNull); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "subject", { get: function () { - _throwIfNotLoaded("subject", this.m_subject, "DocumentProperties", this._isNull); - return this.m_subject; + _throwIfNotLoaded("subject", this._Su, _typeDocumentProperties, this._isNull); + return this._Su; }, set: function (value) { - this.m_subject=value; + this._Su=value; _createSetPropertyAction(this.context, this, "Subject", value); }, enumerable: true, @@ -15091,19 +16931,19 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "template", { get: function () { - _throwIfNotLoaded("template", this.m_template, "DocumentProperties", this._isNull); - return this.m_template; + _throwIfNotLoaded("template", this._T, _typeDocumentProperties, this._isNull); + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "title", { get: function () { - _throwIfNotLoaded("title", this.m_title, "DocumentProperties", this._isNull); - return this.m_title; + _throwIfNotLoaded("title", this._Ti, _typeDocumentProperties, this._isNull); + return this._Ti; }, set: function (value) { - this.m_title=value; + this._Ti=value; _createSetPropertyAction(this.context, this, "Title", value); }, enumerable: true, @@ -15111,20 +16951,19 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "DocumentProperties", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeDocumentProperties, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); DocumentProperties.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["title", "subject", "author", "keywords", "comments", "category", "format", "manager", "company"], [], [ - "customProperties", "customProperties" ]); }; DocumentProperties.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; DocumentProperties.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15133,64 +16972,72 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["ApplicationName"])) { - this.m_applicationName=obj["ApplicationName"]; + this._A=obj["ApplicationName"]; } if (!_isUndefined(obj["Author"])) { - this.m_author=obj["Author"]; + this._Au=obj["Author"]; } if (!_isUndefined(obj["Category"])) { - this.m_category=obj["Category"]; + this._C=obj["Category"]; } if (!_isUndefined(obj["Comments"])) { - this.m_comments=obj["Comments"]; + this._Co=obj["Comments"]; } if (!_isUndefined(obj["Company"])) { - this.m_company=obj["Company"]; + this._Com=obj["Company"]; } if (!_isUndefined(obj["CreationDate"])) { - this.m_creationDate=_adjustToDateTime(obj["CreationDate"]); + this._Cr=_adjustToDateTime(obj["CreationDate"]); } if (!_isUndefined(obj["Format"])) { - this.m_format=obj["Format"]; + this._F=obj["Format"]; } if (!_isUndefined(obj["Keywords"])) { - this.m_keywords=obj["Keywords"]; + this._K=obj["Keywords"]; } if (!_isUndefined(obj["LastAuthor"])) { - this.m_lastAuthor=obj["LastAuthor"]; + this._L=obj["LastAuthor"]; } if (!_isUndefined(obj["LastPrintDate"])) { - this.m_lastPrintDate=_adjustToDateTime(obj["LastPrintDate"]); + this._La=_adjustToDateTime(obj["LastPrintDate"]); } if (!_isUndefined(obj["LastSaveTime"])) { - this.m_lastSaveTime=_adjustToDateTime(obj["LastSaveTime"]); + this._Las=_adjustToDateTime(obj["LastSaveTime"]); } if (!_isUndefined(obj["Manager"])) { - this.m_manager=obj["Manager"]; + this._M=obj["Manager"]; } if (!_isUndefined(obj["RevisionNumber"])) { - this.m_revisionNumber=obj["RevisionNumber"]; + this._R=obj["RevisionNumber"]; } if (!_isUndefined(obj["Security"])) { - this.m_security=obj["Security"]; + this._S=obj["Security"]; } if (!_isUndefined(obj["Subject"])) { - this.m_subject=obj["Subject"]; + this._Su=obj["Subject"]; } if (!_isUndefined(obj["Template"])) { - this.m_template=obj["Template"]; + this._T=obj["Template"]; } if (!_isUndefined(obj["Title"])) { - this.m_title=obj["Title"]; + this._Ti=obj["Title"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["customProperties", "CustomProperties"]); }; DocumentProperties.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + DocumentProperties.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + DocumentProperties.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + DocumentProperties.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; DocumentProperties.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -15198,7 +17045,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; DocumentProperties.prototype.track=function () { @@ -15210,33 +17057,40 @@ var Word; return this; }; DocumentProperties.prototype.toJSON=function () { - return { - "applicationName": this.m_applicationName, - "author": this.m_author, - "category": this.m_category, - "comments": this.m_comments, - "company": this.m_company, - "creationDate": this.m_creationDate, - "format": this.m_format, - "keywords": this.m_keywords, - "lastAuthor": this.m_lastAuthor, - "lastPrintDate": this.m_lastPrintDate, - "lastSaveTime": this.m_lastSaveTime, - "manager": this.m_manager, - "revisionNumber": this.m_revisionNumber, - "security": this.m_security, - "subject": this.m_subject, - "template": this.m_template, - "title": this.m_title - }; + return _toJson(this, { + "applicationName": this._A, + "author": this._Au, + "category": this._C, + "comments": this._Co, + "company": this._Com, + "creationDate": this._Cr, + "format": this._F, + "keywords": this._K, + "lastAuthor": this._L, + "lastPrintDate": this._La, + "lastSaveTime": this._Las, + "manager": this._M, + "revisionNumber": this._R, + "security": this._S, + "subject": this._Su, + "template": this._T, + "title": this._Ti, + }, { + "customProperties": this._Cu, + }); + }; + DocumentProperties.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return DocumentProperties; }(OfficeExtension.ClientObject)); Word.DocumentProperties=DocumentProperties; + var _typeFont="Font"; var Font=(function (_super) { __extends(Font, _super); function Font() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Font.prototype, "_className", { get: function () { @@ -15247,11 +17101,11 @@ var Word; }); Object.defineProperty(Font.prototype, "bold", { get: function () { - _throwIfNotLoaded("bold", this.m_bold, "Font", this._isNull); - return this.m_bold; + _throwIfNotLoaded("bold", this._B, _typeFont, this._isNull); + return this._B; }, set: function (value) { - this.m_bold=value; + this._B=value; _createSetPropertyAction(this.context, this, "Bold", value); }, enumerable: true, @@ -15259,11 +17113,11 @@ var Word; }); Object.defineProperty(Font.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "Font", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeFont, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -15271,11 +17125,11 @@ var Word; }); Object.defineProperty(Font.prototype, "doubleStrikeThrough", { get: function () { - _throwIfNotLoaded("doubleStrikeThrough", this.m_doubleStrikeThrough, "Font", this._isNull); - return this.m_doubleStrikeThrough; + _throwIfNotLoaded("doubleStrikeThrough", this._D, _typeFont, this._isNull); + return this._D; }, set: function (value) { - this.m_doubleStrikeThrough=value; + this._D=value; _createSetPropertyAction(this.context, this, "DoubleStrikeThrough", value); }, enumerable: true, @@ -15283,11 +17137,11 @@ var Word; }); Object.defineProperty(Font.prototype, "highlightColor", { get: function () { - _throwIfNotLoaded("highlightColor", this.m_highlightColor, "Font", this._isNull); - return this.m_highlightColor; + _throwIfNotLoaded("highlightColor", this._H, _typeFont, this._isNull); + return this._H; }, set: function (value) { - this.m_highlightColor=value; + this._H=value; _createSetPropertyAction(this.context, this, "HighlightColor", value); }, enumerable: true, @@ -15295,11 +17149,11 @@ var Word; }); Object.defineProperty(Font.prototype, "italic", { get: function () { - _throwIfNotLoaded("italic", this.m_italic, "Font", this._isNull); - return this.m_italic; + _throwIfNotLoaded("italic", this._I, _typeFont, this._isNull); + return this._I; }, set: function (value) { - this.m_italic=value; + this._I=value; _createSetPropertyAction(this.context, this, "Italic", value); }, enumerable: true, @@ -15307,11 +17161,11 @@ var Word; }); Object.defineProperty(Font.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "Font", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeFont, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -15319,11 +17173,11 @@ var Word; }); Object.defineProperty(Font.prototype, "size", { get: function () { - _throwIfNotLoaded("size", this.m_size, "Font", this._isNull); - return this.m_size; + _throwIfNotLoaded("size", this._S, _typeFont, this._isNull); + return this._S; }, set: function (value) { - this.m_size=value; + this._S=value; _createSetPropertyAction(this.context, this, "Size", value); }, enumerable: true, @@ -15331,11 +17185,11 @@ var Word; }); Object.defineProperty(Font.prototype, "strikeThrough", { get: function () { - _throwIfNotLoaded("strikeThrough", this.m_strikeThrough, "Font", this._isNull); - return this.m_strikeThrough; + _throwIfNotLoaded("strikeThrough", this._St, _typeFont, this._isNull); + return this._St; }, set: function (value) { - this.m_strikeThrough=value; + this._St=value; _createSetPropertyAction(this.context, this, "StrikeThrough", value); }, enumerable: true, @@ -15343,11 +17197,11 @@ var Word; }); Object.defineProperty(Font.prototype, "subscript", { get: function () { - _throwIfNotLoaded("subscript", this.m_subscript, "Font", this._isNull); - return this.m_subscript; + _throwIfNotLoaded("subscript", this._Su, _typeFont, this._isNull); + return this._Su; }, set: function (value) { - this.m_subscript=value; + this._Su=value; _createSetPropertyAction(this.context, this, "Subscript", value); }, enumerable: true, @@ -15355,11 +17209,11 @@ var Word; }); Object.defineProperty(Font.prototype, "superscript", { get: function () { - _throwIfNotLoaded("superscript", this.m_superscript, "Font", this._isNull); - return this.m_superscript; + _throwIfNotLoaded("superscript", this._Sup, _typeFont, this._isNull); + return this._Sup; }, set: function (value) { - this.m_superscript=value; + this._Sup=value; _createSetPropertyAction(this.context, this, "Superscript", value); }, enumerable: true, @@ -15367,11 +17221,11 @@ var Word; }); Object.defineProperty(Font.prototype, "underline", { get: function () { - _throwIfNotLoaded("underline", this.m_underline, "Font", this._isNull); - return this.m_underline; + _throwIfNotLoaded("underline", this._U, _typeFont, this._isNull); + return this._U; }, set: function (value) { - this.m_underline=value; + this._U=value; _createSetPropertyAction(this.context, this, "Underline", value); }, enumerable: true, @@ -15379,8 +17233,8 @@ var Word; }); Object.defineProperty(Font.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Font", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeFont, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -15389,7 +17243,7 @@ var Word; this._recursivelySet(properties, options, ["name", "size", "bold", "italic", "color", "underline", "subscript", "superscript", "strikeThrough", "doubleStrikeThrough", "highlightColor"], [], []); }; Font.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Font.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15398,45 +17252,53 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Bold"])) { - this.m_bold=obj["Bold"]; + this._B=obj["Bold"]; } if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["DoubleStrikeThrough"])) { - this.m_doubleStrikeThrough=obj["DoubleStrikeThrough"]; + this._D=obj["DoubleStrikeThrough"]; } if (!_isUndefined(obj["HighlightColor"])) { - this.m_highlightColor=obj["HighlightColor"]; + this._H=obj["HighlightColor"]; } if (!_isUndefined(obj["Italic"])) { - this.m_italic=obj["Italic"]; + this._I=obj["Italic"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Size"])) { - this.m_size=obj["Size"]; + this._S=obj["Size"]; } if (!_isUndefined(obj["StrikeThrough"])) { - this.m_strikeThrough=obj["StrikeThrough"]; + this._St=obj["StrikeThrough"]; } if (!_isUndefined(obj["Subscript"])) { - this.m_subscript=obj["Subscript"]; + this._Su=obj["Subscript"]; } if (!_isUndefined(obj["Superscript"])) { - this.m_superscript=obj["Superscript"]; + this._Sup=obj["Superscript"]; } if (!_isUndefined(obj["Underline"])) { - this.m_underline=obj["Underline"]; + this._U=obj["Underline"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } }; Font.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Font.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Font.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Font.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; Font.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -15444,7 +17306,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; Font.prototype.track=function () { @@ -15456,27 +17318,32 @@ var Word; return this; }; Font.prototype.toJSON=function () { - return { - "bold": this.m_bold, - "color": this.m_color, - "doubleStrikeThrough": this.m_doubleStrikeThrough, - "highlightColor": this.m_highlightColor, - "italic": this.m_italic, - "name": this.m_name, - "size": this.m_size, - "strikeThrough": this.m_strikeThrough, - "subscript": this.m_subscript, - "superscript": this.m_superscript, - "underline": this.m_underline - }; + return _toJson(this, { + "bold": this._B, + "color": this._C, + "doubleStrikeThrough": this._D, + "highlightColor": this._H, + "italic": this._I, + "name": this._N, + "size": this._S, + "strikeThrough": this._St, + "subscript": this._Su, + "superscript": this._Sup, + "underline": this._U, + }, {}); + }; + Font.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Font; }(OfficeExtension.ClientObject)); Word.Font=Font; + var _typeInlinePicture="InlinePicture"; var InlinePicture=(function (_super) { __extends(InlinePicture, _super); function InlinePicture() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(InlinePicture.prototype, "_className", { get: function () { @@ -15487,81 +17354,87 @@ var Word; }); Object.defineProperty(InlinePicture.prototype, "paragraph", { get: function () { - if (!this.m_paragraph) { - this.m_paragraph=new Word.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false)); + _throwIfApiNotSupported("InlinePicture.paragraph", _defaultApiSetName, "1.2", _hostName); + if (!this._P) { + this._P=new Word.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false, false)); } - return this.m_paragraph; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "parentContentControl", { get: function () { - if (!this.m_parentContentControl) { - this.m_parentContentControl=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false)); + if (!this._Pa) { + this._Pa=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false, false)); } - return this.m_parentContentControl; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "parentContentControlOrNullObject", { get: function () { - if (!this.m_parentContentControlOrNullObject) { - this.m_parentContentControlOrNullObject=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false)); + _throwIfApiNotSupported("InlinePicture.parentContentControlOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Par) { + this._Par=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false, false)); } - return this.m_parentContentControlOrNullObject; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + _throwIfApiNotSupported("InlinePicture.parentTable", _defaultApiSetName, "1.3", _hostName); + if (!this._Pare) { + this._Pare=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._Pare; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "parentTableCell", { get: function () { - if (!this.m_parentTableCell) { - this.m_parentTableCell=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false)); + _throwIfApiNotSupported("InlinePicture.parentTableCell", _defaultApiSetName, "1.3", _hostName); + if (!this._Paren) { + this._Paren=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false, false)); } - return this.m_parentTableCell; + return this._Paren; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "parentTableCellOrNullObject", { get: function () { - if (!this.m_parentTableCellOrNullObject) { - this.m_parentTableCellOrNullObject=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false)); + _throwIfApiNotSupported("InlinePicture.parentTableCellOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Parent) { + this._Parent=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false, false)); } - return this.m_parentTableCellOrNullObject; + return this._Parent; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "parentTableOrNullObject", { get: function () { - if (!this.m_parentTableOrNullObject) { - this.m_parentTableOrNullObject=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false)); + _throwIfApiNotSupported("InlinePicture.parentTableOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ParentT) { + this._ParentT=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false, false)); } - return this.m_parentTableOrNullObject; + return this._ParentT; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "altTextDescription", { get: function () { - _throwIfNotLoaded("altTextDescription", this.m_altTextDescription, "InlinePicture", this._isNull); - return this.m_altTextDescription; + _throwIfNotLoaded("altTextDescription", this._A, _typeInlinePicture, this._isNull); + return this._A; }, set: function (value) { - this.m_altTextDescription=value; + this._A=value; _createSetPropertyAction(this.context, this, "AltTextDescription", value); }, enumerable: true, @@ -15569,11 +17442,11 @@ var Word; }); Object.defineProperty(InlinePicture.prototype, "altTextTitle", { get: function () { - _throwIfNotLoaded("altTextTitle", this.m_altTextTitle, "InlinePicture", this._isNull); - return this.m_altTextTitle; + _throwIfNotLoaded("altTextTitle", this._Al, _typeInlinePicture, this._isNull); + return this._Al; }, set: function (value) { - this.m_altTextTitle=value; + this._Al=value; _createSetPropertyAction(this.context, this, "AltTextTitle", value); }, enumerable: true, @@ -15581,11 +17454,11 @@ var Word; }); Object.defineProperty(InlinePicture.prototype, "height", { get: function () { - _throwIfNotLoaded("height", this.m_height, "InlinePicture", this._isNull); - return this.m_height; + _throwIfNotLoaded("height", this._H, _typeInlinePicture, this._isNull); + return this._H; }, set: function (value) { - this.m_height=value; + this._H=value; _createSetPropertyAction(this.context, this, "Height", value); }, enumerable: true, @@ -15593,11 +17466,11 @@ var Word; }); Object.defineProperty(InlinePicture.prototype, "hyperlink", { get: function () { - _throwIfNotLoaded("hyperlink", this.m_hyperlink, "InlinePicture", this._isNull); - return this.m_hyperlink; + _throwIfNotLoaded("hyperlink", this._Hy, _typeInlinePicture, this._isNull); + return this._Hy; }, set: function (value) { - this.m_hyperlink=value; + this._Hy=value; _createSetPropertyAction(this.context, this, "Hyperlink", value); }, enumerable: true, @@ -15605,11 +17478,11 @@ var Word; }); Object.defineProperty(InlinePicture.prototype, "lockAspectRatio", { get: function () { - _throwIfNotLoaded("lockAspectRatio", this.m_lockAspectRatio, "InlinePicture", this._isNull); - return this.m_lockAspectRatio; + _throwIfNotLoaded("lockAspectRatio", this._L, _typeInlinePicture, this._isNull); + return this._L; }, set: function (value) { - this.m_lockAspectRatio=value; + this._L=value; _createSetPropertyAction(this.context, this, "LockAspectRatio", value); }, enumerable: true, @@ -15617,11 +17490,11 @@ var Word; }); Object.defineProperty(InlinePicture.prototype, "width", { get: function () { - _throwIfNotLoaded("width", this.m_width, "InlinePicture", this._isNull); - return this.m_width; + _throwIfNotLoaded("width", this._W, _typeInlinePicture, this._isNull); + return this._W; }, set: function (value) { - this.m_width=value; + this._W=value; _createSetPropertyAction(this.context, this, "Width", value); }, enumerable: true, @@ -15629,29 +17502,22 @@ var Word; }); Object.defineProperty(InlinePicture.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "InlinePicture", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeInlinePicture, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InlinePicture", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInlinePicture, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InlinePicture.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["altTextDescription", "altTextTitle", "height", "hyperlink", "lockAspectRatio", "width"], [], [ - "paragraph", - "parentContentControl", - "parentContentControlOrNullObject", - "parentTable", - "parentTableCell", - "parentTableCellOrNullObject", - "parentTableOrNullObject", "paragraph", "parentContentControl", "parentContentControlOrNullObject", @@ -15662,52 +17528,64 @@ var Word; ]); }; InlinePicture.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _throwIfApiNotSupported("InlinePicture.delete", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; InlinePicture.prototype.getBase64ImageSrc=function () { - var action=_createMethodAction(this.context, this, "GetBase64ImageSrc", 1, []); + var action=_createMethodAction(this.context, this, "GetBase64ImageSrc", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; InlinePicture.prototype.getNext=function () { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null)); + _throwIfApiNotSupported("InlinePicture.getNext", _defaultApiSetName, "1.3", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null, false)); }; InlinePicture.prototype.getNextOrNullObject=function () { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("InlinePicture.getNextOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null, false)); }; InlinePicture.prototype.getRange=function (rangeLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null)); + _throwIfApiNotSupported("InlinePicture.getRange", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null, false)); }; InlinePicture.prototype.insertBreak=function (breakType, insertLocation) { - _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation]); + _throwIfApiNotSupported("InlinePicture.insertBreak", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation], false); }; InlinePicture.prototype.insertContentControl=function () { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null)); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null, false)); }; InlinePicture.prototype.insertFileFromBase64=function (base64File, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null)); + _throwIfApiNotSupported("InlinePicture.insertFileFromBase64", _defaultApiSetName, "1.2", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null, false)); }; InlinePicture.prototype.insertHtml=function (html, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null)); + _throwIfApiNotSupported("InlinePicture.insertHtml", _defaultApiSetName, "1.2", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null, false)); }; InlinePicture.prototype.insertInlinePictureFromBase64=function (base64EncodedImage, insertLocation) { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null)); + _throwIfApiNotSupported("InlinePicture.insertInlinePictureFromBase64", _defaultApiSetName, "1.2", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null, false)); }; InlinePicture.prototype.insertOoxml=function (ooxml, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null)); + _throwIfApiNotSupported("InlinePicture.insertOoxml", _defaultApiSetName, "1.2", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null, false)); }; InlinePicture.prototype.insertParagraph=function (paragraphText, insertLocation) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null)); + _throwIfApiNotSupported("InlinePicture.insertParagraph", _defaultApiSetName, "1.2", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null, false)); }; InlinePicture.prototype.insertText=function (text, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null)); + _throwIfApiNotSupported("InlinePicture.insertText", _defaultApiSetName, "1.2", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null, false)); }; InlinePicture.prototype.select=function (selectionMode) { - _createMethodAction(this.context, this, "Select", 1, [selectionMode]); + _throwIfApiNotSupported("InlinePicture.select", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "Select", 1, [selectionMode], false); }; InlinePicture.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InlinePicture.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15716,34 +17594,42 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["AltTextDescription"])) { - this.m_altTextDescription=obj["AltTextDescription"]; + this._A=obj["AltTextDescription"]; } if (!_isUndefined(obj["AltTextTitle"])) { - this.m_altTextTitle=obj["AltTextTitle"]; + this._Al=obj["AltTextTitle"]; } if (!_isUndefined(obj["Height"])) { - this.m_height=obj["Height"]; + this._H=obj["Height"]; } if (!_isUndefined(obj["Hyperlink"])) { - this.m_hyperlink=obj["Hyperlink"]; + this._Hy=obj["Hyperlink"]; } if (!_isUndefined(obj["LockAspectRatio"])) { - this.m_lockAspectRatio=obj["LockAspectRatio"]; + this._L=obj["LockAspectRatio"]; } if (!_isUndefined(obj["Width"])) { - this.m_width=obj["Width"]; + this._W=obj["Width"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["paragraph", "Paragraph", "parentContentControl", "ParentContentControl", "parentContentControlOrNullObject", "ParentContentControlOrNullObject", "parentTable", "ParentTable", "parentTableCell", "ParentTableCell", "parentTableCellOrNullObject", "ParentTableCellOrNullObject", "parentTableOrNullObject", "ParentTableOrNullObject"]); }; InlinePicture.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + InlinePicture.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + InlinePicture.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + InlinePicture.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; InlinePicture.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -15751,10 +17637,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; InlinePicture.prototype.track=function () { @@ -15766,22 +17652,27 @@ var Word; return this; }; InlinePicture.prototype.toJSON=function () { - return { - "altTextDescription": this.m_altTextDescription, - "altTextTitle": this.m_altTextTitle, - "height": this.m_height, - "hyperlink": this.m_hyperlink, - "lockAspectRatio": this.m_lockAspectRatio, - "width": this.m_width - }; + return _toJson(this, { + "altTextDescription": this._A, + "altTextTitle": this._Al, + "height": this._H, + "hyperlink": this._Hy, + "lockAspectRatio": this._L, + "width": this._W, + }, {}); + }; + InlinePicture.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return InlinePicture; }(OfficeExtension.ClientObject)); Word.InlinePicture=InlinePicture; + var _typeInlinePictureCollection="InlinePictureCollection"; var InlinePictureCollection=(function (_super) { __extends(InlinePictureCollection, _super); function InlinePictureCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(InlinePictureCollection.prototype, "_className", { get: function () { @@ -15792,7 +17683,7 @@ var Word; }); Object.defineProperty(InlinePictureCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "InlinePictureCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeInlinePictureCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15800,23 +17691,25 @@ var Word; }); Object.defineProperty(InlinePictureCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InlinePictureCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInlinePictureCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InlinePictureCollection.prototype.getFirst=function () { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + _throwIfApiNotSupported("InlinePictureCollection.getFirst", _defaultApiSetName, "1.3", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; InlinePictureCollection.prototype.getFirstOrNullObject=function () { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("InlinePictureCollection.getFirstOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; InlinePictureCollection.prototype._GetItem=function (index) { return new Word.InlinePicture(this.context, _createIndexerObjectPath(this.context, this, [index])); }; InlinePictureCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InlinePictureCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15825,7 +17718,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15837,9 +17730,17 @@ var Word; } } }; - InlinePictureCollection.prototype.load=function (option) { - _load(this, option); - return this; + InlinePictureCollection.prototype.load=function (option) { + return _load(this, option); + }; + InlinePictureCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + InlinePictureCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + InlinePictureCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; InlinePictureCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -15847,7 +17748,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; InlinePictureCollection.prototype.track=function () { @@ -15859,15 +17760,16 @@ var Word; return this; }; InlinePictureCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return InlinePictureCollection; }(OfficeExtension.ClientObject)); Word.InlinePictureCollection=InlinePictureCollection; + var _typeList="List"; var List=(function (_super) { __extends(List, _super); function List() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(List.prototype, "_className", { get: function () { @@ -15878,75 +17780,75 @@ var Word; }); Object.defineProperty(List.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._P) { + this._P=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(List.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "List", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeList, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(List.prototype, "levelExistences", { get: function () { - _throwIfNotLoaded("levelExistences", this.m_levelExistences, "List", this._isNull); - return this.m_levelExistences; + _throwIfNotLoaded("levelExistences", this._L, _typeList, this._isNull); + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(List.prototype, "levelTypes", { get: function () { - _throwIfNotLoaded("levelTypes", this.m_levelTypes, "List", this._isNull); - return this.m_levelTypes; + _throwIfNotLoaded("levelTypes", this._Le, _typeList, this._isNull); + return this._Le; }, enumerable: true, configurable: true }); Object.defineProperty(List.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "List", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeList, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); List.prototype.getLevelParagraphs=function (level) { - return new Word.ParagraphCollection(this.context, _createMethodObjectPath(this.context, this, "GetLevelParagraphs", 1, [level], true, false, null)); + return new Word.ParagraphCollection(this.context, _createMethodObjectPath(this.context, this, "GetLevelParagraphs", 1, [level], true, false, null, false)); }; List.prototype.getLevelString=function (level) { - var action=_createMethodAction(this.context, this, "GetLevelString", 1, [level]); + var action=_createMethodAction(this.context, this, "GetLevelString", 1, [level], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; List.prototype.insertParagraph=function (paragraphText, insertLocation) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null, false)); }; List.prototype.setLevelAlignment=function (level, alignment) { - _createMethodAction(this.context, this, "SetLevelAlignment", 0, [level, alignment]); + _createMethodAction(this.context, this, "SetLevelAlignment", 0, [level, alignment], false); }; List.prototype.setLevelBullet=function (level, listBullet, charCode, fontName) { - _createMethodAction(this.context, this, "SetLevelBullet", 0, [level, listBullet, charCode, fontName]); + _createMethodAction(this.context, this, "SetLevelBullet", 0, [level, listBullet, charCode, fontName], false); }; List.prototype.setLevelIndents=function (level, textIndent, bulletNumberPictureIndent) { - _createMethodAction(this.context, this, "SetLevelIndents", 0, [level, textIndent, bulletNumberPictureIndent]); + _createMethodAction(this.context, this, "SetLevelIndents", 0, [level, textIndent, bulletNumberPictureIndent], false); }; List.prototype.setLevelNumbering=function (level, listNumbering, formatString) { - _createMethodAction(this.context, this, "SetLevelNumbering", 0, [level, listNumbering, formatString]); + _createMethodAction(this.context, this, "SetLevelNumbering", 0, [level, listNumbering, formatString], false); }; List.prototype.setLevelStartingNumber=function (level, startingNumber) { - _createMethodAction(this.context, this, "SetLevelStartingNumber", 0, [level, startingNumber]); + _createMethodAction(this.context, this, "SetLevelStartingNumber", 0, [level, startingNumber], false); }; List.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; List.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15955,22 +17857,30 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["LevelExistences"])) { - this.m_levelExistences=obj["LevelExistences"]; + this._L=obj["LevelExistences"]; } if (!_isUndefined(obj["LevelTypes"])) { - this.m_levelTypes=obj["LevelTypes"]; + this._Le=obj["LevelTypes"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["paragraphs", "Paragraphs"]); }; List.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + List.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + List.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + List.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; List.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -15978,10 +17888,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; List.prototype.track=function () { @@ -15993,19 +17903,26 @@ var Word; return this; }; List.prototype.toJSON=function () { - return { - "id": this.m_id, - "levelExistences": this.m_levelExistences, - "levelTypes": this.m_levelTypes - }; + return _toJson(this, { + "id": this._I, + "levelExistences": this._L, + "levelTypes": this._Le, + }, { + "paragraphs": this._P, + }); + }; + List.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return List; }(OfficeExtension.ClientObject)); Word.List=List; + var _typeListCollection="ListCollection"; var ListCollection=(function (_super) { __extends(ListCollection, _super); function ListCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ListCollection.prototype, "_className", { get: function () { @@ -16016,7 +17933,7 @@ var Word; }); Object.defineProperty(ListCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ListCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeListCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -16024,29 +17941,29 @@ var Word; }); Object.defineProperty(ListCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "ListCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeListCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); ListCollection.prototype.getById=function (id) { - return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetById", 1, [id], false, false, null)); + return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetById", 1, [id], false, false, null, false)); }; ListCollection.prototype.getByIdOrNullObject=function (id) { - return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetByIdOrNullObject", 1, [id], false, false, null)); + return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetByIdOrNullObject", 1, [id], false, false, null, false)); }; ListCollection.prototype.getFirst=function () { - return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; ListCollection.prototype.getFirstOrNullObject=function () { - return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; ListCollection.prototype.getItem=function (index) { return new Word.List(this.context, _createIndexerObjectPath(this.context, this, [index])); }; ListCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; ListCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16055,7 +17972,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -16068,8 +17985,16 @@ var Word; } }; ListCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ListCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ListCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ListCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; ListCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -16077,7 +18002,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; ListCollection.prototype.track=function () { @@ -16089,15 +18014,16 @@ var Word; return this; }; ListCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return ListCollection; }(OfficeExtension.ClientObject)); Word.ListCollection=ListCollection; + var _typeListItem="ListItem"; var ListItem=(function (_super) { __extends(ListItem, _super); function ListItem() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ListItem.prototype, "_className", { get: function () { @@ -16108,11 +18034,11 @@ var Word; }); Object.defineProperty(ListItem.prototype, "level", { get: function () { - _throwIfNotLoaded("level", this.m_level, "ListItem", this._isNull); - return this.m_level; + _throwIfNotLoaded("level", this._L, _typeListItem, this._isNull); + return this._L; }, set: function (value) { - this.m_level=value; + this._L=value; _createSetPropertyAction(this.context, this, "Level", value); }, enumerable: true, @@ -16120,24 +18046,24 @@ var Word; }); Object.defineProperty(ListItem.prototype, "listString", { get: function () { - _throwIfNotLoaded("listString", this.m_listString, "ListItem", this._isNull); - return this.m_listString; + _throwIfNotLoaded("listString", this._Li, _typeListItem, this._isNull); + return this._Li; }, enumerable: true, configurable: true }); Object.defineProperty(ListItem.prototype, "siblingIndex", { get: function () { - _throwIfNotLoaded("siblingIndex", this.m_siblingIndex, "ListItem", this._isNull); - return this.m_siblingIndex; + _throwIfNotLoaded("siblingIndex", this._S, _typeListItem, this._isNull); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(ListItem.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "ListItem", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeListItem, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -16146,16 +18072,16 @@ var Word; this._recursivelySet(properties, options, ["level"], [], []); }; ListItem.prototype.getAncestor=function (parentOnly) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetAncestor", 1, [parentOnly], false, false, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetAncestor", 1, [parentOnly], false, false, null, false)); }; ListItem.prototype.getAncestorOrNullObject=function (parentOnly) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetAncestorOrNullObject", 1, [parentOnly], false, false, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetAncestorOrNullObject", 1, [parentOnly], false, false, null, false)); }; ListItem.prototype.getDescendants=function (directChildrenOnly) { - return new Word.ParagraphCollection(this.context, _createMethodObjectPath(this.context, this, "GetDescendants", 1, [directChildrenOnly], true, false, null)); + return new Word.ParagraphCollection(this.context, _createMethodObjectPath(this.context, this, "GetDescendants", 1, [directChildrenOnly], true, false, null, false)); }; ListItem.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; ListItem.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16164,21 +18090,29 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Level"])) { - this.m_level=obj["Level"]; + this._L=obj["Level"]; } if (!_isUndefined(obj["ListString"])) { - this.m_listString=obj["ListString"]; + this._Li=obj["ListString"]; } if (!_isUndefined(obj["SiblingIndex"])) { - this.m_siblingIndex=obj["SiblingIndex"]; + this._S=obj["SiblingIndex"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } }; ListItem.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ListItem.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ListItem.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ListItem.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; ListItem.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -16186,7 +18120,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; ListItem.prototype.track=function () { @@ -16198,19 +18132,24 @@ var Word; return this; }; ListItem.prototype.toJSON=function () { - return { - "level": this.m_level, - "listString": this.m_listString, - "siblingIndex": this.m_siblingIndex - }; + return _toJson(this, { + "level": this._L, + "listString": this._Li, + "siblingIndex": this._S, + }, {}); + }; + ListItem.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ListItem; }(OfficeExtension.ClientObject)); Word.ListItem=ListItem; + var _typeParagraph="Paragraph"; var Paragraph=(function (_super) { __extends(Paragraph, _super); function Paragraph() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Paragraph.prototype, "_className", { get: function () { @@ -16221,151 +18160,161 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "contentControls", { get: function () { - if (!this.m_contentControls) { - this.m_contentControls=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false)); + if (!this._C) { + this._C=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false, false)); } - return this.m_contentControls; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "inlinePictures", { get: function () { - if (!this.m_inlinePictures) { - this.m_inlinePictures=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false)); + if (!this._I) { + this._I=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false, false)); } - return this.m_inlinePictures; + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "list", { get: function () { - if (!this.m_list) { - this.m_list=new Word.List(this.context, _createPropertyObjectPath(this.context, this, "List", false, false)); + _throwIfApiNotSupported("Paragraph.list", _defaultApiSetName, "1.3", _hostName); + if (!this._Lis) { + this._Lis=new Word.List(this.context, _createPropertyObjectPath(this.context, this, "List", false, false, false)); } - return this.m_list; + return this._Lis; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "listItem", { get: function () { - if (!this.m_listItem) { - this.m_listItem=new Word.ListItem(this.context, _createPropertyObjectPath(this.context, this, "ListItem", false, false)); + _throwIfApiNotSupported("Paragraph.listItem", _defaultApiSetName, "1.3", _hostName); + if (!this._List) { + this._List=new Word.ListItem(this.context, _createPropertyObjectPath(this.context, this, "ListItem", false, false, false)); } - return this.m_listItem; + return this._List; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "listItemOrNullObject", { get: function () { - if (!this.m_listItemOrNullObject) { - this.m_listItemOrNullObject=new Word.ListItem(this.context, _createPropertyObjectPath(this.context, this, "ListItemOrNullObject", false, false)); + _throwIfApiNotSupported("Paragraph.listItemOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ListI) { + this._ListI=new Word.ListItem(this.context, _createPropertyObjectPath(this.context, this, "ListItemOrNullObject", false, false, false)); } - return this.m_listItemOrNullObject; + return this._ListI; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "listOrNullObject", { get: function () { - if (!this.m_listOrNullObject) { - this.m_listOrNullObject=new Word.List(this.context, _createPropertyObjectPath(this.context, this, "ListOrNullObject", false, false)); + _throwIfApiNotSupported("Paragraph.listOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ListO) { + this._ListO=new Word.List(this.context, _createPropertyObjectPath(this.context, this, "ListOrNullObject", false, false, false)); } - return this.m_listOrNullObject; + return this._ListO; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentBody", { get: function () { - if (!this.m_parentBody) { - this.m_parentBody=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false)); + _throwIfApiNotSupported("Paragraph.parentBody", _defaultApiSetName, "1.3", _hostName); + if (!this._P) { + this._P=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false, false)); } - return this.m_parentBody; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentContentControl", { get: function () { - if (!this.m_parentContentControl) { - this.m_parentContentControl=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false)); + if (!this._Pa) { + this._Pa=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false, false)); } - return this.m_parentContentControl; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentContentControlOrNullObject", { get: function () { - if (!this.m_parentContentControlOrNullObject) { - this.m_parentContentControlOrNullObject=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false)); + _throwIfApiNotSupported("Paragraph.parentContentControlOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Par) { + this._Par=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false, false)); } - return this.m_parentContentControlOrNullObject; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + _throwIfApiNotSupported("Paragraph.parentTable", _defaultApiSetName, "1.3", _hostName); + if (!this._Pare) { + this._Pare=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._Pare; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentTableCell", { get: function () { - if (!this.m_parentTableCell) { - this.m_parentTableCell=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false)); + _throwIfApiNotSupported("Paragraph.parentTableCell", _defaultApiSetName, "1.3", _hostName); + if (!this._Paren) { + this._Paren=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false, false)); } - return this.m_parentTableCell; + return this._Paren; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentTableCellOrNullObject", { get: function () { - if (!this.m_parentTableCellOrNullObject) { - this.m_parentTableCellOrNullObject=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false)); + _throwIfApiNotSupported("Paragraph.parentTableCellOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Parent) { + this._Parent=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false, false)); } - return this.m_parentTableCellOrNullObject; + return this._Parent; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentTableOrNullObject", { get: function () { - if (!this.m_parentTableOrNullObject) { - this.m_parentTableOrNullObject=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false)); + _throwIfApiNotSupported("Paragraph.parentTableOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ParentT) { + this._ParentT=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false, false)); } - return this.m_parentTableOrNullObject; + return this._ParentT; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "alignment", { get: function () { - _throwIfNotLoaded("alignment", this.m_alignment, "Paragraph", this._isNull); - return this.m_alignment; + _throwIfNotLoaded("alignment", this._A, _typeParagraph, this._isNull); + return this._A; }, set: function (value) { - this.m_alignment=value; + this._A=value; _createSetPropertyAction(this.context, this, "Alignment", value); }, enumerable: true, @@ -16373,11 +18322,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "firstLineIndent", { get: function () { - _throwIfNotLoaded("firstLineIndent", this.m_firstLineIndent, "Paragraph", this._isNull); - return this.m_firstLineIndent; + _throwIfNotLoaded("firstLineIndent", this._F, _typeParagraph, this._isNull); + return this._F; }, set: function (value) { - this.m_firstLineIndent=value; + this._F=value; _createSetPropertyAction(this.context, this, "FirstLineIndent", value); }, enumerable: true, @@ -16385,27 +18334,29 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "isLastParagraph", { get: function () { - _throwIfNotLoaded("isLastParagraph", this.m_isLastParagraph, "Paragraph", this._isNull); - return this.m_isLastParagraph; + _throwIfNotLoaded("isLastParagraph", this._Is, _typeParagraph, this._isNull); + _throwIfApiNotSupported("Paragraph.isLastParagraph", _defaultApiSetName, "1.3", _hostName); + return this._Is; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "isListItem", { get: function () { - _throwIfNotLoaded("isListItem", this.m_isListItem, "Paragraph", this._isNull); - return this.m_isListItem; + _throwIfNotLoaded("isListItem", this._IsL, _typeParagraph, this._isNull); + _throwIfApiNotSupported("Paragraph.isListItem", _defaultApiSetName, "1.3", _hostName); + return this._IsL; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "leftIndent", { get: function () { - _throwIfNotLoaded("leftIndent", this.m_leftIndent, "Paragraph", this._isNull); - return this.m_leftIndent; + _throwIfNotLoaded("leftIndent", this._L, _typeParagraph, this._isNull); + return this._L; }, set: function (value) { - this.m_leftIndent=value; + this._L=value; _createSetPropertyAction(this.context, this, "LeftIndent", value); }, enumerable: true, @@ -16413,11 +18364,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "lineSpacing", { get: function () { - _throwIfNotLoaded("lineSpacing", this.m_lineSpacing, "Paragraph", this._isNull); - return this.m_lineSpacing; + _throwIfNotLoaded("lineSpacing", this._Li, _typeParagraph, this._isNull); + return this._Li; }, set: function (value) { - this.m_lineSpacing=value; + this._Li=value; _createSetPropertyAction(this.context, this, "LineSpacing", value); }, enumerable: true, @@ -16425,11 +18376,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "lineUnitAfter", { get: function () { - _throwIfNotLoaded("lineUnitAfter", this.m_lineUnitAfter, "Paragraph", this._isNull); - return this.m_lineUnitAfter; + _throwIfNotLoaded("lineUnitAfter", this._Lin, _typeParagraph, this._isNull); + return this._Lin; }, set: function (value) { - this.m_lineUnitAfter=value; + this._Lin=value; _createSetPropertyAction(this.context, this, "LineUnitAfter", value); }, enumerable: true, @@ -16437,11 +18388,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "lineUnitBefore", { get: function () { - _throwIfNotLoaded("lineUnitBefore", this.m_lineUnitBefore, "Paragraph", this._isNull); - return this.m_lineUnitBefore; + _throwIfNotLoaded("lineUnitBefore", this._Line, _typeParagraph, this._isNull); + return this._Line; }, set: function (value) { - this.m_lineUnitBefore=value; + this._Line=value; _createSetPropertyAction(this.context, this, "LineUnitBefore", value); }, enumerable: true, @@ -16449,11 +18400,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "outlineLevel", { get: function () { - _throwIfNotLoaded("outlineLevel", this.m_outlineLevel, "Paragraph", this._isNull); - return this.m_outlineLevel; + _throwIfNotLoaded("outlineLevel", this._O, _typeParagraph, this._isNull); + return this._O; }, set: function (value) { - this.m_outlineLevel=value; + this._O=value; _createSetPropertyAction(this.context, this, "OutlineLevel", value); }, enumerable: true, @@ -16461,11 +18412,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "rightIndent", { get: function () { - _throwIfNotLoaded("rightIndent", this.m_rightIndent, "Paragraph", this._isNull); - return this.m_rightIndent; + _throwIfNotLoaded("rightIndent", this._R, _typeParagraph, this._isNull); + return this._R; }, set: function (value) { - this.m_rightIndent=value; + this._R=value; _createSetPropertyAction(this.context, this, "RightIndent", value); }, enumerable: true, @@ -16473,11 +18424,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "spaceAfter", { get: function () { - _throwIfNotLoaded("spaceAfter", this.m_spaceAfter, "Paragraph", this._isNull); - return this.m_spaceAfter; + _throwIfNotLoaded("spaceAfter", this._S, _typeParagraph, this._isNull); + return this._S; }, set: function (value) { - this.m_spaceAfter=value; + this._S=value; _createSetPropertyAction(this.context, this, "SpaceAfter", value); }, enumerable: true, @@ -16485,11 +18436,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "spaceBefore", { get: function () { - _throwIfNotLoaded("spaceBefore", this.m_spaceBefore, "Paragraph", this._isNull); - return this.m_spaceBefore; + _throwIfNotLoaded("spaceBefore", this._Sp, _typeParagraph, this._isNull); + return this._Sp; }, set: function (value) { - this.m_spaceBefore=value; + this._Sp=value; _createSetPropertyAction(this.context, this, "SpaceBefore", value); }, enumerable: true, @@ -16497,11 +18448,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "Paragraph", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._St, _typeParagraph, this._isNull); + return this._St; }, set: function (value) { - this.m_style=value; + this._St=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -16509,11 +18460,12 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "styleBuiltIn", { get: function () { - _throwIfNotLoaded("styleBuiltIn", this.m_styleBuiltIn, "Paragraph", this._isNull); - return this.m_styleBuiltIn; + _throwIfNotLoaded("styleBuiltIn", this._Sty, _typeParagraph, this._isNull); + _throwIfApiNotSupported("Paragraph.styleBuiltIn", _defaultApiSetName, "1.3", _hostName); + return this._Sty; }, set: function (value) { - this.m_styleBuiltIn=value; + this._Sty=value; _createSetPropertyAction(this.context, this, "StyleBuiltIn", value); }, enumerable: true, @@ -16521,49 +18473,39 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "tableNestingLevel", { get: function () { - _throwIfNotLoaded("tableNestingLevel", this.m_tableNestingLevel, "Paragraph", this._isNull); - return this.m_tableNestingLevel; + _throwIfNotLoaded("tableNestingLevel", this._T, _typeParagraph, this._isNull); + _throwIfApiNotSupported("Paragraph.tableNestingLevel", _defaultApiSetName, "1.3", _hostName); + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "Paragraph", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._Te, _typeParagraph, this._isNull); + return this._Te; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "Paragraph", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeParagraph, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Paragraph", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeParagraph, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Paragraph.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["style", "alignment", "firstLineIndent", "leftIndent", "rightIndent", "lineSpacing", "outlineLevel", "spaceBefore", "spaceAfter", "lineUnitBefore", "lineUnitAfter", "styleBuiltIn"], ["font", "listItem", "listItemOrNullObject"], [ - "contentControls", - "inlinePictures", - "list", - "listOrNullObject", - "parentBody", - "parentContentControl", - "parentContentControlOrNullObject", - "parentTable", - "parentTableCell", - "parentTableCellOrNullObject", - "parentTableOrNullObject", "contentControls", "inlinePictures", "list", @@ -16578,89 +18520,109 @@ var Word; ]); }; Paragraph.prototype.attachToList=function (listId, level) { - return new Word.List(this.context, _createMethodObjectPath(this.context, this, "AttachToList", 0, [listId, level], false, false, null)); + _throwIfApiNotSupported("Paragraph.attachToList", _defaultApiSetName, "1.3", _hostName); + return new Word.List(this.context, _createMethodObjectPath(this.context, this, "AttachToList", 0, [listId, level], false, false, null, false)); }; Paragraph.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; Paragraph.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Paragraph.prototype.detachFromList=function () { - _createMethodAction(this.context, this, "DetachFromList", 0, []); + _throwIfApiNotSupported("Paragraph.detachFromList", _defaultApiSetName, "1.3", _hostName); + _createMethodAction(this.context, this, "DetachFromList", 0, [], false); }; Paragraph.prototype.getHtml=function () { - var action=_createMethodAction(this.context, this, "GetHtml", 1, []); + var action=_createMethodAction(this.context, this, "GetHtml", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Paragraph.prototype.getMetadata=function (propertyGUID) { + var action=_createMethodAction(this.context, this, "GetMetadata", 1, [propertyGUID], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Paragraph.prototype.getNext=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null)); + _throwIfApiNotSupported("Paragraph.getNext", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null, false)); }; Paragraph.prototype.getNextOrNullObject=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("Paragraph.getNextOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null, false)); }; Paragraph.prototype.getOoxml=function () { - var action=_createMethodAction(this.context, this, "GetOoxml", 1, []); + var action=_createMethodAction(this.context, this, "GetOoxml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Paragraph.prototype.getPrevious=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetPrevious", 1, [], false, false, null)); + _throwIfApiNotSupported("Paragraph.getPrevious", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetPrevious", 1, [], false, false, null, false)); }; Paragraph.prototype.getPreviousOrNullObject=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetPreviousOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("Paragraph.getPreviousOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetPreviousOrNullObject", 1, [], false, false, null, false)); }; Paragraph.prototype.getRange=function (rangeLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null)); + _throwIfApiNotSupported("Paragraph.getRange", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null, false)); }; Paragraph.prototype.getTextRanges=function (endingMarks, trimSpacing) { - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetTextRanges", 1, [endingMarks, trimSpacing], true, false, null)); + _throwIfApiNotSupported("Paragraph.getTextRanges", _defaultApiSetName, "1.3", _hostName); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetTextRanges", 1, [endingMarks, trimSpacing], true, false, null, false)); }; Paragraph.prototype.insertBreak=function (breakType, insertLocation) { - _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation]); + _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation], false); }; Paragraph.prototype.insertContentControl=function () { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null)); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null, false)); }; Paragraph.prototype.insertFileFromBase64=function (base64File, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null, false)); }; Paragraph.prototype.insertHtml=function (html, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null, false)); }; Paragraph.prototype.insertInlinePictureFromBase64=function (base64EncodedImage, insertLocation) { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null)); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null, false)); }; Paragraph.prototype.insertOoxml=function (ooxml, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null, false)); }; Paragraph.prototype.insertParagraph=function (paragraphText, insertLocation) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null, false)); }; Paragraph.prototype.insertTable=function (rowCount, columnCount, insertLocation, values) { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null)); + _throwIfApiNotSupported("Paragraph.insertTable", _defaultApiSetName, "1.3", _hostName); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null, false)); }; Paragraph.prototype.insertText=function (text, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null, false)); }; Paragraph.prototype.search=function (searchText, searchOptions) { searchOptions=_normalizeSearchOptions(this.context, searchOptions); - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null)); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null, false)); }; Paragraph.prototype.select=function (selectionMode) { - _createMethodAction(this.context, this, "Select", 1, [selectionMode]); + _createMethodAction(this.context, this, "Select", 1, [selectionMode], false); + }; + Paragraph.prototype.setMetadata=function (propertyGUID, propertyValue) { + _createMethodAction(this.context, this, "SetMetadata", 0, [propertyGUID, propertyValue], false); }; Paragraph.prototype.split=function (delimiters, trimDelimiters, trimSpacing) { - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Split", 1, [delimiters, trimDelimiters, trimSpacing], true, false, null)); + _throwIfApiNotSupported("Paragraph.split", _defaultApiSetName, "1.3", _hostName); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Split", 1, [delimiters, trimDelimiters, trimSpacing], true, false, null, false)); }; Paragraph.prototype.startNewList=function () { - return new Word.List(this.context, _createMethodObjectPath(this.context, this, "StartNewList", 0, [], false, false, null)); + _throwIfApiNotSupported("Paragraph.startNewList", _defaultApiSetName, "1.3", _hostName); + return new Word.List(this.context, _createMethodObjectPath(this.context, this, "StartNewList", 0, [], false, false, null, false)); }; Paragraph.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Paragraph.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16669,64 +18631,72 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Alignment"])) { - this.m_alignment=obj["Alignment"]; + this._A=obj["Alignment"]; } if (!_isUndefined(obj["FirstLineIndent"])) { - this.m_firstLineIndent=obj["FirstLineIndent"]; + this._F=obj["FirstLineIndent"]; } if (!_isUndefined(obj["IsLastParagraph"])) { - this.m_isLastParagraph=obj["IsLastParagraph"]; + this._Is=obj["IsLastParagraph"]; } if (!_isUndefined(obj["IsListItem"])) { - this.m_isListItem=obj["IsListItem"]; + this._IsL=obj["IsListItem"]; } if (!_isUndefined(obj["LeftIndent"])) { - this.m_leftIndent=obj["LeftIndent"]; + this._L=obj["LeftIndent"]; } if (!_isUndefined(obj["LineSpacing"])) { - this.m_lineSpacing=obj["LineSpacing"]; + this._Li=obj["LineSpacing"]; } if (!_isUndefined(obj["LineUnitAfter"])) { - this.m_lineUnitAfter=obj["LineUnitAfter"]; + this._Lin=obj["LineUnitAfter"]; } if (!_isUndefined(obj["LineUnitBefore"])) { - this.m_lineUnitBefore=obj["LineUnitBefore"]; + this._Line=obj["LineUnitBefore"]; } if (!_isUndefined(obj["OutlineLevel"])) { - this.m_outlineLevel=obj["OutlineLevel"]; + this._O=obj["OutlineLevel"]; } if (!_isUndefined(obj["RightIndent"])) { - this.m_rightIndent=obj["RightIndent"]; + this._R=obj["RightIndent"]; } if (!_isUndefined(obj["SpaceAfter"])) { - this.m_spaceAfter=obj["SpaceAfter"]; + this._S=obj["SpaceAfter"]; } if (!_isUndefined(obj["SpaceBefore"])) { - this.m_spaceBefore=obj["SpaceBefore"]; + this._Sp=obj["SpaceBefore"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._St=obj["Style"]; } if (!_isUndefined(obj["StyleBuiltIn"])) { - this.m_styleBuiltIn=obj["StyleBuiltIn"]; + this._Sty=obj["StyleBuiltIn"]; } if (!_isUndefined(obj["TableNestingLevel"])) { - this.m_tableNestingLevel=obj["TableNestingLevel"]; + this._T=obj["TableNestingLevel"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._Te=obj["Text"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["contentControls", "ContentControls", "font", "Font", "inlinePictures", "InlinePictures", "list", "List", "listItem", "ListItem", "listItemOrNullObject", "ListItemOrNullObject", "listOrNullObject", "ListOrNullObject", "parentBody", "ParentBody", "parentContentControl", "ParentContentControl", "parentContentControlOrNullObject", "ParentContentControlOrNullObject", "parentTable", "ParentTable", "parentTableCell", "ParentTableCell", "parentTableCellOrNullObject", "ParentTableCellOrNullObject", "parentTableOrNullObject", "ParentTableOrNullObject"]); }; Paragraph.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Paragraph.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Paragraph.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Paragraph.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; Paragraph.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -16734,10 +18704,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; Paragraph.prototype.track=function () { @@ -16749,35 +18719,42 @@ var Word; return this; }; Paragraph.prototype.toJSON=function () { - return { - "alignment": this.m_alignment, - "firstLineIndent": this.m_firstLineIndent, - "font": this.m_font, - "isLastParagraph": this.m_isLastParagraph, - "isListItem": this.m_isListItem, - "leftIndent": this.m_leftIndent, - "lineSpacing": this.m_lineSpacing, - "lineUnitAfter": this.m_lineUnitAfter, - "lineUnitBefore": this.m_lineUnitBefore, - "listItem": this.m_listItem, - "listItemOrNullObject": this.m_listItemOrNullObject, - "outlineLevel": this.m_outlineLevel, - "rightIndent": this.m_rightIndent, - "spaceAfter": this.m_spaceAfter, - "spaceBefore": this.m_spaceBefore, - "style": this.m_style, - "styleBuiltIn": this.m_styleBuiltIn, - "tableNestingLevel": this.m_tableNestingLevel, - "text": this.m_text - }; + return _toJson(this, { + "alignment": this._A, + "firstLineIndent": this._F, + "isLastParagraph": this._Is, + "isListItem": this._IsL, + "leftIndent": this._L, + "lineSpacing": this._Li, + "lineUnitAfter": this._Lin, + "lineUnitBefore": this._Line, + "outlineLevel": this._O, + "rightIndent": this._R, + "spaceAfter": this._S, + "spaceBefore": this._Sp, + "style": this._St, + "styleBuiltIn": this._Sty, + "tableNestingLevel": this._T, + "text": this._Te, + }, { + "font": this._Fo, + "inlinePictures": this._I, + "listItem": this._List, + "listItemOrNullObject": this._ListI, + }); + }; + Paragraph.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Paragraph; }(OfficeExtension.ClientObject)); Word.Paragraph=Paragraph; + var _typeParagraphCollection="ParagraphCollection"; var ParagraphCollection=(function (_super) { __extends(ParagraphCollection, _super); function ParagraphCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ParagraphCollection.prototype, "_className", { get: function () { @@ -16788,7 +18765,7 @@ var Word; }); Object.defineProperty(ParagraphCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ParagraphCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeParagraphCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -16796,29 +18773,33 @@ var Word; }); Object.defineProperty(ParagraphCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "ParagraphCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeParagraphCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); ParagraphCollection.prototype.getFirst=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + _throwIfApiNotSupported("ParagraphCollection.getFirst", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; ParagraphCollection.prototype.getFirstOrNullObject=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("ParagraphCollection.getFirstOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; ParagraphCollection.prototype.getLast=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetLast", 1, [], false, false, null)); + _throwIfApiNotSupported("ParagraphCollection.getLast", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetLast", 1, [], false, false, null, false)); }; ParagraphCollection.prototype.getLastOrNullObject=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetLastOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("ParagraphCollection.getLastOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetLastOrNullObject", 1, [], false, false, null, false)); }; ParagraphCollection.prototype._GetItem=function (index) { return new Word.Paragraph(this.context, _createIndexerObjectPath(this.context, this, [index])); }; ParagraphCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; ParagraphCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16827,7 +18808,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -16840,8 +18821,16 @@ var Word; } }; ParagraphCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ParagraphCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ParagraphCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ParagraphCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; ParagraphCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -16849,7 +18838,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; ParagraphCollection.prototype.track=function () { @@ -16861,15 +18850,16 @@ var Word; return this; }; ParagraphCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return ParagraphCollection; }(OfficeExtension.ClientObject)); Word.ParagraphCollection=ParagraphCollection; + var _typeRange="Range"; var Range=(function (_super) { __extends(Range, _super); function Range() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Range.prototype, "_className", { get: function () { @@ -16880,141 +18870,151 @@ var Word; }); Object.defineProperty(Range.prototype, "contentControls", { get: function () { - if (!this.m_contentControls) { - this.m_contentControls=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false)); + if (!this._C) { + this._C=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false, false)); } - return this.m_contentControls; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._F) { + this._F=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "inlinePictures", { get: function () { - if (!this.m_inlinePictures) { - this.m_inlinePictures=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false)); + _throwIfApiNotSupported("Range.inlinePictures", _defaultApiSetName, "1.2", _hostName); + if (!this._I) { + this._I=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false, false)); } - return this.m_inlinePictures; + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "lists", { get: function () { - if (!this.m_lists) { - this.m_lists=new Word.ListCollection(this.context, _createPropertyObjectPath(this.context, this, "Lists", true, false)); + _throwIfApiNotSupported("Range.lists", _defaultApiSetName, "1.3", _hostName); + if (!this._L) { + this._L=new Word.ListCollection(this.context, _createPropertyObjectPath(this.context, this, "Lists", true, false, false)); } - return this.m_lists; + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._P) { + this._P=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "parentBody", { get: function () { - if (!this.m_parentBody) { - this.m_parentBody=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false)); + _throwIfApiNotSupported("Range.parentBody", _defaultApiSetName, "1.3", _hostName); + if (!this._Pa) { + this._Pa=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false, false)); } - return this.m_parentBody; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "parentContentControl", { get: function () { - if (!this.m_parentContentControl) { - this.m_parentContentControl=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false)); + if (!this._Par) { + this._Par=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false, false)); } - return this.m_parentContentControl; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "parentContentControlOrNullObject", { get: function () { - if (!this.m_parentContentControlOrNullObject) { - this.m_parentContentControlOrNullObject=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false)); + _throwIfApiNotSupported("Range.parentContentControlOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Pare) { + this._Pare=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false, false)); } - return this.m_parentContentControlOrNullObject; + return this._Pare; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + _throwIfApiNotSupported("Range.parentTable", _defaultApiSetName, "1.3", _hostName); + if (!this._Paren) { + this._Paren=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._Paren; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "parentTableCell", { get: function () { - if (!this.m_parentTableCell) { - this.m_parentTableCell=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false)); + _throwIfApiNotSupported("Range.parentTableCell", _defaultApiSetName, "1.3", _hostName); + if (!this._Parent) { + this._Parent=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false, false)); } - return this.m_parentTableCell; + return this._Parent; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "parentTableCellOrNullObject", { get: function () { - if (!this.m_parentTableCellOrNullObject) { - this.m_parentTableCellOrNullObject=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false)); + _throwIfApiNotSupported("Range.parentTableCellOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ParentT) { + this._ParentT=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false, false)); } - return this.m_parentTableCellOrNullObject; + return this._ParentT; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "parentTableOrNullObject", { get: function () { - if (!this.m_parentTableOrNullObject) { - this.m_parentTableOrNullObject=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false)); + _throwIfApiNotSupported("Range.parentTableOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ParentTa) { + this._ParentTa=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false, false)); } - return this.m_parentTableOrNullObject; + return this._ParentTa; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "tables", { get: function () { - if (!this.m_tables) { - this.m_tables=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false)); + _throwIfApiNotSupported("Range.tables", _defaultApiSetName, "1.3", _hostName); + if (!this._T) { + this._T=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false, false)); } - return this.m_tables; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "hyperlink", { get: function () { - _throwIfNotLoaded("hyperlink", this.m_hyperlink, "Range", this._isNull); - return this.m_hyperlink; + _throwIfNotLoaded("hyperlink", this._H, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.hyperlink", _defaultApiSetName, "1.3", _hostName); + return this._H; }, set: function (value) { - this.m_hyperlink=value; + this._H=value; _createSetPropertyAction(this.context, this, "Hyperlink", value); }, enumerable: true, @@ -17022,19 +19022,20 @@ var Word; }); Object.defineProperty(Range.prototype, "isEmpty", { get: function () { - _throwIfNotLoaded("isEmpty", this.m_isEmpty, "Range", this._isNull); - return this.m_isEmpty; + _throwIfNotLoaded("isEmpty", this._Is, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.isEmpty", _defaultApiSetName, "1.3", _hostName); + return this._Is; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "Range", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._S, _typeRange, this._isNull); + return this._S; }, set: function (value) { - this.m_style=value; + this._S=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -17042,11 +19043,12 @@ var Word; }); Object.defineProperty(Range.prototype, "styleBuiltIn", { get: function () { - _throwIfNotLoaded("styleBuiltIn", this.m_styleBuiltIn, "Range", this._isNull); - return this.m_styleBuiltIn; + _throwIfNotLoaded("styleBuiltIn", this._St, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.styleBuiltIn", _defaultApiSetName, "1.3", _hostName); + return this._St; }, set: function (value) { - this.m_styleBuiltIn=value; + this._St=value; _createSetPropertyAction(this.context, this, "StyleBuiltIn", value); }, enumerable: true, @@ -17054,42 +19056,30 @@ var Word; }); Object.defineProperty(Range.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "Range", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._Te, _typeRange, this._isNull); + return this._Te; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "Range", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeRange, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Range", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeRange, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Range.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["style", "hyperlink", "styleBuiltIn"], ["font"], [ - "contentControls", - "inlinePictures", - "lists", - "paragraphs", - "parentBody", - "parentContentControl", - "parentContentControlOrNullObject", - "parentTable", - "parentTableCell", - "parentTableCellOrNullObject", - "parentTableOrNullObject", - "tables", "contentControls", "inlinePictures", "lists", @@ -17105,95 +19095,108 @@ var Word; ]); }; Range.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; Range.prototype.compareLocationWith=function (range) { - var action=_createMethodAction(this.context, this, "CompareLocationWith", 1, [range]); + _throwIfApiNotSupported("Range.compareLocationWith", _defaultApiSetName, "1.3", _hostName); + var action=_createMethodAction(this.context, this, "CompareLocationWith", 1, [range], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Range.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Range.prototype.expandTo=function (range) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "ExpandTo", 0, [range], false, false, null)); + _throwIfApiNotSupported("Range.expandTo", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "ExpandTo", 0, [range], false, false, null, false)); }; Range.prototype.expandToOrNullObject=function (range) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "ExpandToOrNullObject", 0, [range], false, false, null)); + _throwIfApiNotSupported("Range.expandToOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "ExpandToOrNullObject", 0, [range], false, false, null, false)); }; Range.prototype.getHtml=function () { - var action=_createMethodAction(this.context, this, "GetHtml", 1, []); + var action=_createMethodAction(this.context, this, "GetHtml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Range.prototype.getHyperlinkRanges=function () { - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetHyperlinkRanges", 1, [], true, false, null)); + _throwIfApiNotSupported("Range.getHyperlinkRanges", _defaultApiSetName, "1.3", _hostName); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetHyperlinkRanges", 1, [], true, false, null, false)); }; Range.prototype.getNextTextRange=function (endingMarks, trimSpacing) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetNextTextRange", 1, [endingMarks, trimSpacing], false, false, null)); + _throwIfApiNotSupported("Range.getNextTextRange", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetNextTextRange", 1, [endingMarks, trimSpacing], false, false, null, false)); }; Range.prototype.getNextTextRangeOrNullObject=function (endingMarks, trimSpacing) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetNextTextRangeOrNullObject", 1, [endingMarks, trimSpacing], false, false, null)); + _throwIfApiNotSupported("Range.getNextTextRangeOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetNextTextRangeOrNullObject", 1, [endingMarks, trimSpacing], false, false, null, false)); }; Range.prototype.getOoxml=function () { - var action=_createMethodAction(this.context, this, "GetOoxml", 1, []); + var action=_createMethodAction(this.context, this, "GetOoxml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Range.prototype.getRange=function (rangeLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null)); + _throwIfApiNotSupported("Range.getRange", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null, false)); }; Range.prototype.getTextRanges=function (endingMarks, trimSpacing) { - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetTextRanges", 1, [endingMarks, trimSpacing], true, false, null)); + _throwIfApiNotSupported("Range.getTextRanges", _defaultApiSetName, "1.3", _hostName); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetTextRanges", 1, [endingMarks, trimSpacing], true, false, null, false)); }; Range.prototype.insertBreak=function (breakType, insertLocation) { - _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation]); + _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation], false); }; Range.prototype.insertContentControl=function () { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null)); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null, false)); }; Range.prototype.insertFileFromBase64=function (base64File, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null, false)); }; Range.prototype.insertHtml=function (html, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null, false)); }; Range.prototype.insertInlinePictureFromBase64=function (base64EncodedImage, insertLocation) { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null)); + _throwIfApiNotSupported("Range.insertInlinePictureFromBase64", _defaultApiSetName, "1.2", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null, false)); }; Range.prototype.insertOoxml=function (ooxml, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null, false)); }; Range.prototype.insertParagraph=function (paragraphText, insertLocation) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null, false)); }; Range.prototype.insertTable=function (rowCount, columnCount, insertLocation, values) { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null)); + _throwIfApiNotSupported("Range.insertTable", _defaultApiSetName, "1.3", _hostName); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null, false)); }; Range.prototype.insertText=function (text, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null, false)); }; Range.prototype.intersectWith=function (range) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "IntersectWith", 0, [range], false, false, null)); + _throwIfApiNotSupported("Range.intersectWith", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "IntersectWith", 0, [range], false, false, null, false)); }; Range.prototype.intersectWithOrNullObject=function (range) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "IntersectWithOrNullObject", 0, [range], false, false, null)); + _throwIfApiNotSupported("Range.intersectWithOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "IntersectWithOrNullObject", 0, [range], false, false, null, false)); }; Range.prototype.search=function (searchText, searchOptions) { searchOptions=_normalizeSearchOptions(this.context, searchOptions); - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null)); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null, false)); }; Range.prototype.select=function (selectionMode) { - _createMethodAction(this.context, this, "Select", 1, [selectionMode]); + _createMethodAction(this.context, this, "Select", 1, [selectionMode], false); }; Range.prototype.split=function (delimiters, multiParagraphs, trimDelimiters, trimSpacing) { - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Split", 1, [delimiters, multiParagraphs, trimDelimiters, trimSpacing], true, false, null)); + _throwIfApiNotSupported("Range.split", _defaultApiSetName, "1.3", _hostName); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Split", 1, [delimiters, multiParagraphs, trimDelimiters, trimSpacing], true, false, null, false)); }; Range.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Range.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17202,31 +19205,39 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Hyperlink"])) { - this.m_hyperlink=obj["Hyperlink"]; + this._H=obj["Hyperlink"]; } if (!_isUndefined(obj["IsEmpty"])) { - this.m_isEmpty=obj["IsEmpty"]; + this._Is=obj["IsEmpty"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._S=obj["Style"]; } if (!_isUndefined(obj["StyleBuiltIn"])) { - this.m_styleBuiltIn=obj["StyleBuiltIn"]; + this._St=obj["StyleBuiltIn"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._Te=obj["Text"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["contentControls", "ContentControls", "font", "Font", "inlinePictures", "InlinePictures", "lists", "Lists", "paragraphs", "Paragraphs", "parentBody", "ParentBody", "parentContentControl", "ParentContentControl", "parentContentControlOrNullObject", "ParentContentControlOrNullObject", "parentTable", "ParentTable", "parentTableCell", "ParentTableCell", "parentTableCellOrNullObject", "ParentTableCellOrNullObject", "parentTableOrNullObject", "ParentTableOrNullObject", "tables", "Tables"]); }; Range.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Range.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Range.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Range.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; Range.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -17234,10 +19245,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; Range.prototype.track=function () { @@ -17249,22 +19260,29 @@ var Word; return this; }; Range.prototype.toJSON=function () { - return { - "font": this.m_font, - "hyperlink": this.m_hyperlink, - "isEmpty": this.m_isEmpty, - "style": this.m_style, - "styleBuiltIn": this.m_styleBuiltIn, - "text": this.m_text - }; + return _toJson(this, { + "hyperlink": this._H, + "isEmpty": this._Is, + "style": this._S, + "styleBuiltIn": this._St, + "text": this._Te, + }, { + "font": this._F, + "inlinePictures": this._I, + }); + }; + Range.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Range; }(OfficeExtension.ClientObject)); Word.Range=Range; + var _typeRangeCollection="RangeCollection"; var RangeCollection=(function (_super) { __extends(RangeCollection, _super); function RangeCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeCollection.prototype, "_className", { get: function () { @@ -17275,7 +19293,7 @@ var Word; }); Object.defineProperty(RangeCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "RangeCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeRangeCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -17283,23 +19301,25 @@ var Word; }); Object.defineProperty(RangeCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "RangeCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeRangeCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); RangeCollection.prototype.getFirst=function () { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + _throwIfApiNotSupported("RangeCollection.getFirst", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; RangeCollection.prototype.getFirstOrNullObject=function () { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("RangeCollection.getFirstOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; RangeCollection.prototype._GetItem=function (index) { return new Word.Range(this.context, _createIndexerObjectPath(this.context, this, [index])); }; RangeCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; RangeCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17308,7 +19328,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -17321,8 +19341,16 @@ var Word; } }; RangeCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + RangeCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; RangeCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -17330,7 +19358,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; RangeCollection.prototype.track=function () { @@ -17342,15 +19370,16 @@ var Word; return this; }; RangeCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return RangeCollection; }(OfficeExtension.ClientObject)); Word.RangeCollection=RangeCollection; + var _typeSearchOptions="SearchOptions"; var SearchOptions=(function (_super) { __extends(SearchOptions, _super); function SearchOptions() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(SearchOptions.prototype, "_className", { get: function () { @@ -17373,11 +19402,11 @@ var Word; }); Object.defineProperty(SearchOptions.prototype, "ignorePunct", { get: function () { - _throwIfNotLoaded("ignorePunct", this.m_ignorePunct, "SearchOptions", this._isNull); - return this.m_ignorePunct; + _throwIfNotLoaded("ignorePunct", this._I, _typeSearchOptions, this._isNull); + return this._I; }, set: function (value) { - this.m_ignorePunct=value; + this._I=value; _createSetPropertyAction(this.context, this, "IgnorePunct", value); }, enumerable: true, @@ -17385,11 +19414,11 @@ var Word; }); Object.defineProperty(SearchOptions.prototype, "ignoreSpace", { get: function () { - _throwIfNotLoaded("ignoreSpace", this.m_ignoreSpace, "SearchOptions", this._isNull); - return this.m_ignoreSpace; + _throwIfNotLoaded("ignoreSpace", this._Ig, _typeSearchOptions, this._isNull); + return this._Ig; }, set: function (value) { - this.m_ignoreSpace=value; + this._Ig=value; _createSetPropertyAction(this.context, this, "IgnoreSpace", value); }, enumerable: true, @@ -17397,11 +19426,11 @@ var Word; }); Object.defineProperty(SearchOptions.prototype, "matchCase", { get: function () { - _throwIfNotLoaded("matchCase", this.m_matchCase, "SearchOptions", this._isNull); - return this.m_matchCase; + _throwIfNotLoaded("matchCase", this._M, _typeSearchOptions, this._isNull); + return this._M; }, set: function (value) { - this.m_matchCase=value; + this._M=value; _createSetPropertyAction(this.context, this, "MatchCase", value); }, enumerable: true, @@ -17409,11 +19438,11 @@ var Word; }); Object.defineProperty(SearchOptions.prototype, "matchPrefix", { get: function () { - _throwIfNotLoaded("matchPrefix", this.m_matchPrefix, "SearchOptions", this._isNull); - return this.m_matchPrefix; + _throwIfNotLoaded("matchPrefix", this._Ma, _typeSearchOptions, this._isNull); + return this._Ma; }, set: function (value) { - this.m_matchPrefix=value; + this._Ma=value; _createSetPropertyAction(this.context, this, "MatchPrefix", value); }, enumerable: true, @@ -17421,11 +19450,11 @@ var Word; }); Object.defineProperty(SearchOptions.prototype, "matchSuffix", { get: function () { - _throwIfNotLoaded("matchSuffix", this.m_matchSuffix, "SearchOptions", this._isNull); - return this.m_matchSuffix; + _throwIfNotLoaded("matchSuffix", this._Mat, _typeSearchOptions, this._isNull); + return this._Mat; }, set: function (value) { - this.m_matchSuffix=value; + this._Mat=value; _createSetPropertyAction(this.context, this, "MatchSuffix", value); }, enumerable: true, @@ -17433,11 +19462,11 @@ var Word; }); Object.defineProperty(SearchOptions.prototype, "matchWholeWord", { get: function () { - _throwIfNotLoaded("matchWholeWord", this.m_matchWholeWord, "SearchOptions", this._isNull); - return this.m_matchWholeWord; + _throwIfNotLoaded("matchWholeWord", this._Matc, _typeSearchOptions, this._isNull); + return this._Matc; }, set: function (value) { - this.m_matchWholeWord=value; + this._Matc=value; _createSetPropertyAction(this.context, this, "MatchWholeWord", value); }, enumerable: true, @@ -17445,7 +19474,7 @@ var Word; }); Object.defineProperty(SearchOptions.prototype, "matchWildcards", { get: function () { - _throwIfNotLoaded("matchWildcards", this.m_matchWildcards, "SearchOptions", this._isNull); + _throwIfNotLoaded("matchWildcards", this.m_matchWildcards, _typeSearchOptions, this._isNull); return this.m_matchWildcards; }, set: function (value) { @@ -17465,53 +19494,66 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["IgnorePunct"])) { - this.m_ignorePunct=obj["IgnorePunct"]; + this._I=obj["IgnorePunct"]; } if (!_isUndefined(obj["IgnoreSpace"])) { - this.m_ignoreSpace=obj["IgnoreSpace"]; + this._Ig=obj["IgnoreSpace"]; } if (!_isUndefined(obj["MatchCase"])) { - this.m_matchCase=obj["MatchCase"]; + this._M=obj["MatchCase"]; } if (!_isUndefined(obj["MatchPrefix"])) { - this.m_matchPrefix=obj["MatchPrefix"]; + this._Ma=obj["MatchPrefix"]; } if (!_isUndefined(obj["MatchSuffix"])) { - this.m_matchSuffix=obj["MatchSuffix"]; + this._Mat=obj["MatchSuffix"]; } if (!_isUndefined(obj["MatchWholeWord"])) { - this.m_matchWholeWord=obj["MatchWholeWord"]; + this._Matc=obj["MatchWholeWord"]; } if (!_isUndefined(obj["MatchWildcards"])) { this.m_matchWildcards=obj["MatchWildcards"]; } }; SearchOptions.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + SearchOptions.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + SearchOptions.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + SearchOptions.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; SearchOptions.newObject=function (context) { - var ret=new Word.SearchOptions(context, _createNewObjectObjectPath(context, "Microsoft.WordServices.SearchOptions", false)); + var ret=new Word.SearchOptions(context, _createNewObjectObjectPath(context, "Microsoft.WordServices.SearchOptions", false, false)); return ret; }; SearchOptions.prototype.toJSON=function () { - return { - "ignorePunct": this.m_ignorePunct, - "ignoreSpace": this.m_ignoreSpace, - "matchCase": this.m_matchCase, - "matchPrefix": this.m_matchPrefix, - "matchSuffix": this.m_matchSuffix, - "matchWholeWord": this.m_matchWholeWord, - "matchWildcards": this.m_matchWildcards - }; + return _toJson(this, { + "ignorePunct": this._I, + "ignoreSpace": this._Ig, + "matchCase": this._M, + "matchPrefix": this._Ma, + "matchSuffix": this._Mat, + "matchWholeWord": this._Matc, + "matchWildcards": this.m_matchWildcards, + }, {}); + }; + SearchOptions.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return SearchOptions; }(OfficeExtension.ClientObject)); Word.SearchOptions=SearchOptions; + var _typeSection="Section"; var Section=(function (_super) { __extends(Section, _super); function Section() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Section.prototype, "_className", { get: function () { @@ -17522,26 +19564,26 @@ var Word; }); Object.defineProperty(Section.prototype, "body", { get: function () { - if (!this.m_body) { - this.m_body=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "Body", false, false)); + if (!this._B) { + this._B=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "Body", false, false, false)); } - return this.m_body; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "Section", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeSection, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Section", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeSection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -17550,19 +19592,21 @@ var Word; this._recursivelySet(properties, options, [], ["body"], []); }; Section.prototype.getFooter=function (type) { - return new Word.Body(this.context, _createMethodObjectPath(this.context, this, "GetFooter", 1, [type], false, true, null)); + return new Word.Body(this.context, _createMethodObjectPath(this.context, this, "GetFooter", 1, [type], false, true, null, false)); }; Section.prototype.getHeader=function (type) { - return new Word.Body(this.context, _createMethodObjectPath(this.context, this, "GetHeader", 1, [type], false, true, null)); + return new Word.Body(this.context, _createMethodObjectPath(this.context, this, "GetHeader", 1, [type], false, true, null, false)); }; Section.prototype.getNext=function () { - return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null)); + _throwIfApiNotSupported("Section.getNext", _defaultApiSetName, "1.3", _hostName); + return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null, false)); }; Section.prototype.getNextOrNullObject=function () { - return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("Section.getNextOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null, false)); }; Section.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Section.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17571,16 +19615,24 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["body", "Body"]); }; Section.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Section.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Section.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Section.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; Section.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -17588,10 +19640,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; Section.prototype.track=function () { @@ -17603,17 +19655,22 @@ var Word; return this; }; Section.prototype.toJSON=function () { - return { - "body": this.m_body - }; + return _toJson(this, {}, { + "body": this._B, + }); + }; + Section.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Section; }(OfficeExtension.ClientObject)); Word.Section=Section; + var _typeSectionCollection="SectionCollection"; var SectionCollection=(function (_super) { __extends(SectionCollection, _super); function SectionCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(SectionCollection.prototype, "_className", { get: function () { @@ -17624,7 +19681,7 @@ var Word; }); Object.defineProperty(SectionCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "SectionCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeSectionCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -17632,23 +19689,25 @@ var Word; }); Object.defineProperty(SectionCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "SectionCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeSectionCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); SectionCollection.prototype.getFirst=function () { - return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + _throwIfApiNotSupported("SectionCollection.getFirst", _defaultApiSetName, "1.3", _hostName); + return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; SectionCollection.prototype.getFirstOrNullObject=function () { - return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("SectionCollection.getFirstOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; SectionCollection.prototype._GetItem=function (index) { return new Word.Section(this.context, _createIndexerObjectPath(this.context, this, [index])); }; SectionCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; SectionCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17657,7 +19716,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -17670,8 +19729,16 @@ var Word; } }; SectionCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + SectionCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + SectionCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + SectionCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; SectionCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -17679,7 +19746,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; SectionCollection.prototype.track=function () { @@ -17691,15 +19758,16 @@ var Word; return this; }; SectionCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return SectionCollection; }(OfficeExtension.ClientObject)); Word.SectionCollection=SectionCollection; + var _typeTable="Table"; var Table=(function (_super) { __extends(Table, _super); function Table() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Table.prototype, "_className", { get: function () { @@ -17710,111 +19778,111 @@ var Word; }); Object.defineProperty(Table.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._F) { + this._F=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "parentBody", { get: function () { - if (!this.m_parentBody) { - this.m_parentBody=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false)); + if (!this._P) { + this._P=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false, false)); } - return this.m_parentBody; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "parentContentControl", { get: function () { - if (!this.m_parentContentControl) { - this.m_parentContentControl=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false)); + if (!this._Pa) { + this._Pa=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false, false)); } - return this.m_parentContentControl; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "parentContentControlOrNullObject", { get: function () { - if (!this.m_parentContentControlOrNullObject) { - this.m_parentContentControlOrNullObject=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false)); + if (!this._Par) { + this._Par=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false, false)); } - return this.m_parentContentControlOrNullObject; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + if (!this._Pare) { + this._Pare=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._Pare; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "parentTableCell", { get: function () { - if (!this.m_parentTableCell) { - this.m_parentTableCell=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false)); + if (!this._Paren) { + this._Paren=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false, false)); } - return this.m_parentTableCell; + return this._Paren; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "parentTableCellOrNullObject", { get: function () { - if (!this.m_parentTableCellOrNullObject) { - this.m_parentTableCellOrNullObject=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false)); + if (!this._Parent) { + this._Parent=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false, false)); } - return this.m_parentTableCellOrNullObject; + return this._Parent; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "parentTableOrNullObject", { get: function () { - if (!this.m_parentTableOrNullObject) { - this.m_parentTableOrNullObject=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false)); + if (!this._ParentT) { + this._ParentT=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false, false)); } - return this.m_parentTableOrNullObject; + return this._ParentT; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "rows", { get: function () { - if (!this.m_rows) { - this.m_rows=new Word.TableRowCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false)); + if (!this._Ro) { + this._Ro=new Word.TableRowCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false, false)); } - return this.m_rows; + return this._Ro; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "tables", { get: function () { - if (!this.m_tables) { - this.m_tables=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false)); + if (!this._T) { + this._T=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false, false)); } - return this.m_tables; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "alignment", { get: function () { - _throwIfNotLoaded("alignment", this.m_alignment, "Table", this._isNull); - return this.m_alignment; + _throwIfNotLoaded("alignment", this._A, _typeTable, this._isNull); + return this._A; }, set: function (value) { - this.m_alignment=value; + this._A=value; _createSetPropertyAction(this.context, this, "Alignment", value); }, enumerable: true, @@ -17822,11 +19890,11 @@ var Word; }); Object.defineProperty(Table.prototype, "headerRowCount", { get: function () { - _throwIfNotLoaded("headerRowCount", this.m_headerRowCount, "Table", this._isNull); - return this.m_headerRowCount; + _throwIfNotLoaded("headerRowCount", this._H, _typeTable, this._isNull); + return this._H; }, set: function (value) { - this.m_headerRowCount=value; + this._H=value; _createSetPropertyAction(this.context, this, "HeaderRowCount", value); }, enumerable: true, @@ -17834,11 +19902,11 @@ var Word; }); Object.defineProperty(Table.prototype, "horizontalAlignment", { get: function () { - _throwIfNotLoaded("horizontalAlignment", this.m_horizontalAlignment, "Table", this._isNull); - return this.m_horizontalAlignment; + _throwIfNotLoaded("horizontalAlignment", this._Ho, _typeTable, this._isNull); + return this._Ho; }, set: function (value) { - this.m_horizontalAlignment=value; + this._Ho=value; _createSetPropertyAction(this.context, this, "HorizontalAlignment", value); }, enumerable: true, @@ -17846,35 +19914,35 @@ var Word; }); Object.defineProperty(Table.prototype, "isUniform", { get: function () { - _throwIfNotLoaded("isUniform", this.m_isUniform, "Table", this._isNull); - return this.m_isUniform; + _throwIfNotLoaded("isUniform", this._I, _typeTable, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "nestingLevel", { get: function () { - _throwIfNotLoaded("nestingLevel", this.m_nestingLevel, "Table", this._isNull); - return this.m_nestingLevel; + _throwIfNotLoaded("nestingLevel", this._N, _typeTable, this._isNull); + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "rowCount", { get: function () { - _throwIfNotLoaded("rowCount", this.m_rowCount, "Table", this._isNull); - return this.m_rowCount; + _throwIfNotLoaded("rowCount", this._R, _typeTable, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "shadingColor", { get: function () { - _throwIfNotLoaded("shadingColor", this.m_shadingColor, "Table", this._isNull); - return this.m_shadingColor; + _throwIfNotLoaded("shadingColor", this._S, _typeTable, this._isNull); + return this._S; }, set: function (value) { - this.m_shadingColor=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShadingColor", value); }, enumerable: true, @@ -17882,11 +19950,11 @@ var Word; }); Object.defineProperty(Table.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "Table", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._St, _typeTable, this._isNull); + return this._St; }, set: function (value) { - this.m_style=value; + this._St=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -17894,11 +19962,11 @@ var Word; }); Object.defineProperty(Table.prototype, "styleBandedColumns", { get: function () { - _throwIfNotLoaded("styleBandedColumns", this.m_styleBandedColumns, "Table", this._isNull); - return this.m_styleBandedColumns; + _throwIfNotLoaded("styleBandedColumns", this._Sty, _typeTable, this._isNull); + return this._Sty; }, set: function (value) { - this.m_styleBandedColumns=value; + this._Sty=value; _createSetPropertyAction(this.context, this, "StyleBandedColumns", value); }, enumerable: true, @@ -17906,11 +19974,11 @@ var Word; }); Object.defineProperty(Table.prototype, "styleBandedRows", { get: function () { - _throwIfNotLoaded("styleBandedRows", this.m_styleBandedRows, "Table", this._isNull); - return this.m_styleBandedRows; + _throwIfNotLoaded("styleBandedRows", this._Styl, _typeTable, this._isNull); + return this._Styl; }, set: function (value) { - this.m_styleBandedRows=value; + this._Styl=value; _createSetPropertyAction(this.context, this, "StyleBandedRows", value); }, enumerable: true, @@ -17918,11 +19986,11 @@ var Word; }); Object.defineProperty(Table.prototype, "styleBuiltIn", { get: function () { - _throwIfNotLoaded("styleBuiltIn", this.m_styleBuiltIn, "Table", this._isNull); - return this.m_styleBuiltIn; + _throwIfNotLoaded("styleBuiltIn", this._Style, _typeTable, this._isNull); + return this._Style; }, set: function (value) { - this.m_styleBuiltIn=value; + this._Style=value; _createSetPropertyAction(this.context, this, "StyleBuiltIn", value); }, enumerable: true, @@ -17930,11 +19998,11 @@ var Word; }); Object.defineProperty(Table.prototype, "styleFirstColumn", { get: function () { - _throwIfNotLoaded("styleFirstColumn", this.m_styleFirstColumn, "Table", this._isNull); - return this.m_styleFirstColumn; + _throwIfNotLoaded("styleFirstColumn", this._StyleF, _typeTable, this._isNull); + return this._StyleF; }, set: function (value) { - this.m_styleFirstColumn=value; + this._StyleF=value; _createSetPropertyAction(this.context, this, "StyleFirstColumn", value); }, enumerable: true, @@ -17942,11 +20010,11 @@ var Word; }); Object.defineProperty(Table.prototype, "styleLastColumn", { get: function () { - _throwIfNotLoaded("styleLastColumn", this.m_styleLastColumn, "Table", this._isNull); - return this.m_styleLastColumn; + _throwIfNotLoaded("styleLastColumn", this._StyleL, _typeTable, this._isNull); + return this._StyleL; }, set: function (value) { - this.m_styleLastColumn=value; + this._StyleL=value; _createSetPropertyAction(this.context, this, "StyleLastColumn", value); }, enumerable: true, @@ -17954,11 +20022,11 @@ var Word; }); Object.defineProperty(Table.prototype, "styleTotalRow", { get: function () { - _throwIfNotLoaded("styleTotalRow", this.m_styleTotalRow, "Table", this._isNull); - return this.m_styleTotalRow; + _throwIfNotLoaded("styleTotalRow", this._StyleT, _typeTable, this._isNull); + return this._StyleT; }, set: function (value) { - this.m_styleTotalRow=value; + this._StyleT=value; _createSetPropertyAction(this.context, this, "StyleTotalRow", value); }, enumerable: true, @@ -17966,11 +20034,11 @@ var Word; }); Object.defineProperty(Table.prototype, "values", { get: function () { - _throwIfNotLoaded("values", this.m_values, "Table", this._isNull); - return this.m_values; + _throwIfNotLoaded("values", this._V, _typeTable, this._isNull); + return this._V; }, set: function (value) { - this.m_values=value; + this._V=value; _createSetPropertyAction(this.context, this, "Values", value); }, enumerable: true, @@ -17978,11 +20046,11 @@ var Word; }); Object.defineProperty(Table.prototype, "verticalAlignment", { get: function () { - _throwIfNotLoaded("verticalAlignment", this.m_verticalAlignment, "Table", this._isNull); - return this.m_verticalAlignment; + _throwIfNotLoaded("verticalAlignment", this._Ve, _typeTable, this._isNull); + return this._Ve; }, set: function (value) { - this.m_verticalAlignment=value; + this._Ve=value; _createSetPropertyAction(this.context, this, "VerticalAlignment", value); }, enumerable: true, @@ -17990,11 +20058,11 @@ var Word; }); Object.defineProperty(Table.prototype, "width", { get: function () { - _throwIfNotLoaded("width", this.m_width, "Table", this._isNull); - return this.m_width; + _throwIfNotLoaded("width", this._W, _typeTable, this._isNull); + return this._W; }, set: function (value) { - this.m_width=value; + this._W=value; _createSetPropertyAction(this.context, this, "Width", value); }, enumerable: true, @@ -18002,31 +20070,22 @@ var Word; }); Object.defineProperty(Table.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "Table", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeTable, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Table", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTable, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Table.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["values", "style", "headerRowCount", "styleTotalRow", "styleFirstColumn", "styleLastColumn", "styleBandedRows", "styleBandedColumns", "shadingColor", "horizontalAlignment", "verticalAlignment", "width", "styleBuiltIn", "alignment"], ["font"], [ - "parentBody", - "parentContentControl", - "parentContentControlOrNullObject", - "parentTable", - "parentTableCell", - "parentTableCellOrNullObject", - "parentTableOrNullObject", - "rows", - "tables", "parentBody", "parentContentControl", "parentContentControlOrNullObject", @@ -18039,86 +20098,86 @@ var Word; ]); }; Table.prototype.addColumns=function (insertLocation, columnCount, values) { - _createMethodAction(this.context, this, "AddColumns", 0, [insertLocation, columnCount, values]); + _createMethodAction(this.context, this, "AddColumns", 0, [insertLocation, columnCount, values], false); }; Table.prototype.addRows=function (insertLocation, rowCount, values) { - return new Word.TableRowCollection(this.context, _createMethodObjectPath(this.context, this, "AddRows", 0, [insertLocation, rowCount, values], true, false, null)); + return new Word.TableRowCollection(this.context, _createMethodObjectPath(this.context, this, "AddRows", 0, [insertLocation, rowCount, values], true, false, null, false)); }; Table.prototype.autoFitWindow=function () { - _createMethodAction(this.context, this, "AutoFitWindow", 0, []); + _createMethodAction(this.context, this, "AutoFitWindow", 0, [], false); }; Table.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; Table.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Table.prototype.deleteColumns=function (columnIndex, columnCount) { - _createMethodAction(this.context, this, "DeleteColumns", 0, [columnIndex, columnCount]); + _createMethodAction(this.context, this, "DeleteColumns", 0, [columnIndex, columnCount], false); }; Table.prototype.deleteRows=function (rowIndex, rowCount) { - _createMethodAction(this.context, this, "DeleteRows", 0, [rowIndex, rowCount]); + _createMethodAction(this.context, this, "DeleteRows", 0, [rowIndex, rowCount], false); }; Table.prototype.distributeColumns=function () { - _createMethodAction(this.context, this, "DistributeColumns", 0, []); + _createMethodAction(this.context, this, "DistributeColumns", 0, [], false); }; Table.prototype.getBorder=function (borderLocation) { - return new Word.TableBorder(this.context, _createMethodObjectPath(this.context, this, "GetBorder", 1, [borderLocation], false, false, null)); + return new Word.TableBorder(this.context, _createMethodObjectPath(this.context, this, "GetBorder", 1, [borderLocation], false, false, null, false)); }; Table.prototype.getCell=function (rowIndex, cellIndex) { - return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [rowIndex, cellIndex], false, false, null)); + return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [rowIndex, cellIndex], false, false, null, false)); }; Table.prototype.getCellOrNullObject=function (rowIndex, cellIndex) { - return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetCellOrNullObject", 1, [rowIndex, cellIndex], false, false, null)); + return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetCellOrNullObject", 1, [rowIndex, cellIndex], false, false, null, false)); }; Table.prototype.getCellPadding=function (cellPaddingLocation) { - var action=_createMethodAction(this.context, this, "GetCellPadding", 1, [cellPaddingLocation]); + var action=_createMethodAction(this.context, this, "GetCellPadding", 1, [cellPaddingLocation], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Table.prototype.getNext=function () { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null)); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null, false)); }; Table.prototype.getNextOrNullObject=function () { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null)); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null, false)); }; Table.prototype.getParagraphAfter=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphAfter", 1, [], false, false, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphAfter", 1, [], false, false, null, false)); }; Table.prototype.getParagraphAfterOrNullObject=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphAfterOrNullObject", 1, [], false, false, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphAfterOrNullObject", 1, [], false, false, null, false)); }; Table.prototype.getParagraphBefore=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphBefore", 1, [], false, false, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphBefore", 1, [], false, false, null, false)); }; Table.prototype.getParagraphBeforeOrNullObject=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphBeforeOrNullObject", 1, [], false, false, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphBeforeOrNullObject", 1, [], false, false, null, false)); }; Table.prototype.getRange=function (rangeLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null, false)); }; Table.prototype.insertContentControl=function () { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null)); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null, false)); }; Table.prototype.insertParagraph=function (paragraphText, insertLocation) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null, false)); }; Table.prototype.insertTable=function (rowCount, columnCount, insertLocation, values) { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null)); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null, false)); }; Table.prototype.search=function (searchText, searchOptions) { searchOptions=_normalizeSearchOptions(this.context, searchOptions); - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null)); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null, false)); }; Table.prototype.select=function (selectionMode) { - _createMethodAction(this.context, this, "Select", 1, [selectionMode]); + _createMethodAction(this.context, this, "Select", 1, [selectionMode], false); }; Table.prototype.setCellPadding=function (cellPaddingLocation, cellPadding) { - _createMethodAction(this.context, this, "SetCellPadding", 0, [cellPaddingLocation, cellPadding]); + _createMethodAction(this.context, this, "SetCellPadding", 0, [cellPaddingLocation, cellPadding], false); }; Table.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Table.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -18127,67 +20186,75 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Alignment"])) { - this.m_alignment=obj["Alignment"]; + this._A=obj["Alignment"]; } if (!_isUndefined(obj["HeaderRowCount"])) { - this.m_headerRowCount=obj["HeaderRowCount"]; + this._H=obj["HeaderRowCount"]; } if (!_isUndefined(obj["HorizontalAlignment"])) { - this.m_horizontalAlignment=obj["HorizontalAlignment"]; + this._Ho=obj["HorizontalAlignment"]; } if (!_isUndefined(obj["IsUniform"])) { - this.m_isUniform=obj["IsUniform"]; + this._I=obj["IsUniform"]; } if (!_isUndefined(obj["NestingLevel"])) { - this.m_nestingLevel=obj["NestingLevel"]; + this._N=obj["NestingLevel"]; } if (!_isUndefined(obj["RowCount"])) { - this.m_rowCount=obj["RowCount"]; + this._R=obj["RowCount"]; } if (!_isUndefined(obj["ShadingColor"])) { - this.m_shadingColor=obj["ShadingColor"]; + this._S=obj["ShadingColor"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._St=obj["Style"]; } if (!_isUndefined(obj["StyleBandedColumns"])) { - this.m_styleBandedColumns=obj["StyleBandedColumns"]; + this._Sty=obj["StyleBandedColumns"]; } if (!_isUndefined(obj["StyleBandedRows"])) { - this.m_styleBandedRows=obj["StyleBandedRows"]; + this._Styl=obj["StyleBandedRows"]; } if (!_isUndefined(obj["StyleBuiltIn"])) { - this.m_styleBuiltIn=obj["StyleBuiltIn"]; + this._Style=obj["StyleBuiltIn"]; } if (!_isUndefined(obj["StyleFirstColumn"])) { - this.m_styleFirstColumn=obj["StyleFirstColumn"]; + this._StyleF=obj["StyleFirstColumn"]; } if (!_isUndefined(obj["StyleLastColumn"])) { - this.m_styleLastColumn=obj["StyleLastColumn"]; + this._StyleL=obj["StyleLastColumn"]; } if (!_isUndefined(obj["StyleTotalRow"])) { - this.m_styleTotalRow=obj["StyleTotalRow"]; + this._StyleT=obj["StyleTotalRow"]; } if (!_isUndefined(obj["Values"])) { - this.m_values=obj["Values"]; + this._V=obj["Values"]; } if (!_isUndefined(obj["VerticalAlignment"])) { - this.m_verticalAlignment=obj["VerticalAlignment"]; + this._Ve=obj["VerticalAlignment"]; } if (!_isUndefined(obj["Width"])) { - this.m_width=obj["Width"]; + this._W=obj["Width"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["font", "Font", "parentBody", "ParentBody", "parentContentControl", "ParentContentControl", "parentContentControlOrNullObject", "ParentContentControlOrNullObject", "parentTable", "ParentTable", "parentTableCell", "ParentTableCell", "parentTableCellOrNullObject", "ParentTableCellOrNullObject", "parentTableOrNullObject", "ParentTableOrNullObject", "rows", "Rows", "tables", "Tables"]); }; Table.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Table.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Table.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Table.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; Table.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -18195,10 +20262,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; Table.prototype.track=function () { @@ -18210,34 +20277,42 @@ var Word; return this; }; Table.prototype.toJSON=function () { - return { - "alignment": this.m_alignment, - "font": this.m_font, - "headerRowCount": this.m_headerRowCount, - "horizontalAlignment": this.m_horizontalAlignment, - "isUniform": this.m_isUniform, - "nestingLevel": this.m_nestingLevel, - "rowCount": this.m_rowCount, - "shadingColor": this.m_shadingColor, - "style": this.m_style, - "styleBandedColumns": this.m_styleBandedColumns, - "styleBandedRows": this.m_styleBandedRows, - "styleBuiltIn": this.m_styleBuiltIn, - "styleFirstColumn": this.m_styleFirstColumn, - "styleLastColumn": this.m_styleLastColumn, - "styleTotalRow": this.m_styleTotalRow, - "values": this.m_values, - "verticalAlignment": this.m_verticalAlignment, - "width": this.m_width - }; + return _toJson(this, { + "alignment": this._A, + "headerRowCount": this._H, + "horizontalAlignment": this._Ho, + "isUniform": this._I, + "nestingLevel": this._N, + "rowCount": this._R, + "shadingColor": this._S, + "style": this._St, + "styleBandedColumns": this._Sty, + "styleBandedRows": this._Styl, + "styleBuiltIn": this._Style, + "styleFirstColumn": this._StyleF, + "styleLastColumn": this._StyleL, + "styleTotalRow": this._StyleT, + "values": this._V, + "verticalAlignment": this._Ve, + "width": this._W, + }, { + "font": this._F, + "rows": this._Ro, + "tables": this._T, + }); + }; + Table.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Table; }(OfficeExtension.ClientObject)); Word.Table=Table; + var _typeTableCollection="TableCollection"; var TableCollection=(function (_super) { __extends(TableCollection, _super); function TableCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableCollection.prototype, "_className", { get: function () { @@ -18248,7 +20323,7 @@ var Word; }); Object.defineProperty(TableCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -18256,23 +20331,23 @@ var Word; }); Object.defineProperty(TableCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); TableCollection.prototype.getFirst=function () { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; TableCollection.prototype.getFirstOrNullObject=function () { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; TableCollection.prototype._GetItem=function (index) { return new Word.Table(this.context, _createIndexerObjectPath(this.context, this, [index])); }; TableCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -18281,7 +20356,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -18294,8 +20369,16 @@ var Word; } }; TableCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TableCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; TableCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -18303,7 +20386,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; TableCollection.prototype.track=function () { @@ -18315,15 +20398,16 @@ var Word; return this; }; TableCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return TableCollection; }(OfficeExtension.ClientObject)); Word.TableCollection=TableCollection; + var _typeTableRow="TableRow"; var TableRow=(function (_super) { __extends(TableRow, _super); function TableRow() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableRow.prototype, "_className", { get: function () { @@ -18334,49 +20418,49 @@ var Word; }); Object.defineProperty(TableRow.prototype, "cells", { get: function () { - if (!this.m_cells) { - this.m_cells=new Word.TableCellCollection(this.context, _createPropertyObjectPath(this.context, this, "Cells", true, false)); + if (!this._Ce) { + this._Ce=new Word.TableCellCollection(this.context, _createPropertyObjectPath(this.context, this, "Cells", true, false, false)); } - return this.m_cells; + return this._Ce; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._F) { + this._F=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + if (!this._P) { + this._P=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "cellCount", { get: function () { - _throwIfNotLoaded("cellCount", this.m_cellCount, "TableRow", this._isNull); - return this.m_cellCount; + _throwIfNotLoaded("cellCount", this._C, _typeTableRow, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "horizontalAlignment", { get: function () { - _throwIfNotLoaded("horizontalAlignment", this.m_horizontalAlignment, "TableRow", this._isNull); - return this.m_horizontalAlignment; + _throwIfNotLoaded("horizontalAlignment", this._H, _typeTableRow, this._isNull); + return this._H; }, set: function (value) { - this.m_horizontalAlignment=value; + this._H=value; _createSetPropertyAction(this.context, this, "HorizontalAlignment", value); }, enumerable: true, @@ -18384,19 +20468,19 @@ var Word; }); Object.defineProperty(TableRow.prototype, "isHeader", { get: function () { - _throwIfNotLoaded("isHeader", this.m_isHeader, "TableRow", this._isNull); - return this.m_isHeader; + _throwIfNotLoaded("isHeader", this._I, _typeTableRow, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "preferredHeight", { get: function () { - _throwIfNotLoaded("preferredHeight", this.m_preferredHeight, "TableRow", this._isNull); - return this.m_preferredHeight; + _throwIfNotLoaded("preferredHeight", this._Pr, _typeTableRow, this._isNull); + return this._Pr; }, set: function (value) { - this.m_preferredHeight=value; + this._Pr=value; _createSetPropertyAction(this.context, this, "PreferredHeight", value); }, enumerable: true, @@ -18404,19 +20488,19 @@ var Word; }); Object.defineProperty(TableRow.prototype, "rowIndex", { get: function () { - _throwIfNotLoaded("rowIndex", this.m_rowIndex, "TableRow", this._isNull); - return this.m_rowIndex; + _throwIfNotLoaded("rowIndex", this._R, _typeTableRow, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "shadingColor", { get: function () { - _throwIfNotLoaded("shadingColor", this.m_shadingColor, "TableRow", this._isNull); - return this.m_shadingColor; + _throwIfNotLoaded("shadingColor", this._S, _typeTableRow, this._isNull); + return this._S; }, set: function (value) { - this.m_shadingColor=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShadingColor", value); }, enumerable: true, @@ -18424,11 +20508,11 @@ var Word; }); Object.defineProperty(TableRow.prototype, "values", { get: function () { - _throwIfNotLoaded("values", this.m_values, "TableRow", this._isNull); - return this.m_values; + _throwIfNotLoaded("values", this._V, _typeTableRow, this._isNull); + return this._V; }, set: function (value) { - this.m_values=value; + this._V=value; _createSetPropertyAction(this.context, this, "Values", value); }, enumerable: true, @@ -18436,11 +20520,11 @@ var Word; }); Object.defineProperty(TableRow.prototype, "verticalAlignment", { get: function () { - _throwIfNotLoaded("verticalAlignment", this.m_verticalAlignment, "TableRow", this._isNull); - return this.m_verticalAlignment; + _throwIfNotLoaded("verticalAlignment", this._Ve, _typeTableRow, this._isNull); + return this._Ve; }, set: function (value) { - this.m_verticalAlignment=value; + this._Ve=value; _createSetPropertyAction(this.context, this, "VerticalAlignment", value); }, enumerable: true, @@ -18448,64 +20532,62 @@ var Word; }); Object.defineProperty(TableRow.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "TableRow", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeTableRow, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableRow", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableRow, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); TableRow.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["values", "shadingColor", "horizontalAlignment", "verticalAlignment", "preferredHeight"], ["font"], [ - "cells", - "parentTable", "cells", "parentTable" ]); }; TableRow.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; TableRow.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; TableRow.prototype.getBorder=function (borderLocation) { - return new Word.TableBorder(this.context, _createMethodObjectPath(this.context, this, "GetBorder", 1, [borderLocation], false, false, null)); + return new Word.TableBorder(this.context, _createMethodObjectPath(this.context, this, "GetBorder", 1, [borderLocation], false, false, null, false)); }; TableRow.prototype.getCellPadding=function (cellPaddingLocation) { - var action=_createMethodAction(this.context, this, "GetCellPadding", 1, [cellPaddingLocation]); + var action=_createMethodAction(this.context, this, "GetCellPadding", 1, [cellPaddingLocation], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; TableRow.prototype.getNext=function () { - return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null)); + return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null, false)); }; TableRow.prototype.getNextOrNullObject=function () { - return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null)); + return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null, false)); }; TableRow.prototype.insertRows=function (insertLocation, rowCount, values) { - return new Word.TableRowCollection(this.context, _createMethodObjectPath(this.context, this, "InsertRows", 1, [insertLocation, rowCount, values], true, false, null)); + return new Word.TableRowCollection(this.context, _createMethodObjectPath(this.context, this, "InsertRows", 1, [insertLocation, rowCount, values], true, false, null, false)); }; TableRow.prototype.search=function (searchText, searchOptions) { searchOptions=_normalizeSearchOptions(this.context, searchOptions); - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null)); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null, false)); }; TableRow.prototype.select=function (selectionMode) { - _createMethodAction(this.context, this, "Select", 1, [selectionMode]); + _createMethodAction(this.context, this, "Select", 1, [selectionMode], false); }; TableRow.prototype.setCellPadding=function (cellPaddingLocation, cellPadding) { - _createMethodAction(this.context, this, "SetCellPadding", 0, [cellPaddingLocation, cellPadding]); + _createMethodAction(this.context, this, "SetCellPadding", 0, [cellPaddingLocation, cellPadding], false); }; TableRow.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableRow.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -18514,40 +20596,48 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["CellCount"])) { - this.m_cellCount=obj["CellCount"]; + this._C=obj["CellCount"]; } if (!_isUndefined(obj["HorizontalAlignment"])) { - this.m_horizontalAlignment=obj["HorizontalAlignment"]; + this._H=obj["HorizontalAlignment"]; } if (!_isUndefined(obj["IsHeader"])) { - this.m_isHeader=obj["IsHeader"]; + this._I=obj["IsHeader"]; } if (!_isUndefined(obj["PreferredHeight"])) { - this.m_preferredHeight=obj["PreferredHeight"]; + this._Pr=obj["PreferredHeight"]; } if (!_isUndefined(obj["RowIndex"])) { - this.m_rowIndex=obj["RowIndex"]; + this._R=obj["RowIndex"]; } if (!_isUndefined(obj["ShadingColor"])) { - this.m_shadingColor=obj["ShadingColor"]; + this._S=obj["ShadingColor"]; } if (!_isUndefined(obj["Values"])) { - this.m_values=obj["Values"]; + this._V=obj["Values"]; } if (!_isUndefined(obj["VerticalAlignment"])) { - this.m_verticalAlignment=obj["VerticalAlignment"]; + this._Ve=obj["VerticalAlignment"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["cells", "Cells", "font", "Font", "parentTable", "ParentTable"]); }; TableRow.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableRow.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TableRow.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableRow.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; TableRow.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -18555,10 +20645,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; TableRow.prototype.track=function () { @@ -18570,25 +20660,32 @@ var Word; return this; }; TableRow.prototype.toJSON=function () { - return { - "cellCount": this.m_cellCount, - "font": this.m_font, - "horizontalAlignment": this.m_horizontalAlignment, - "isHeader": this.m_isHeader, - "preferredHeight": this.m_preferredHeight, - "rowIndex": this.m_rowIndex, - "shadingColor": this.m_shadingColor, - "values": this.m_values, - "verticalAlignment": this.m_verticalAlignment - }; + return _toJson(this, { + "cellCount": this._C, + "horizontalAlignment": this._H, + "isHeader": this._I, + "preferredHeight": this._Pr, + "rowIndex": this._R, + "shadingColor": this._S, + "values": this._V, + "verticalAlignment": this._Ve, + }, { + "cells": this._Ce, + "font": this._F, + }); + }; + TableRow.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TableRow; }(OfficeExtension.ClientObject)); Word.TableRow=TableRow; + var _typeTableRowCollection="TableRowCollection"; var TableRowCollection=(function (_super) { __extends(TableRowCollection, _super); function TableRowCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableRowCollection.prototype, "_className", { get: function () { @@ -18599,7 +20696,7 @@ var Word; }); Object.defineProperty(TableRowCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableRowCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableRowCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -18607,23 +20704,23 @@ var Word; }); Object.defineProperty(TableRowCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableRowCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableRowCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); TableRowCollection.prototype.getFirst=function () { - return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; TableRowCollection.prototype.getFirstOrNullObject=function () { - return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; TableRowCollection.prototype._GetItem=function (index) { return new Word.TableRow(this.context, _createIndexerObjectPath(this.context, this, [index])); }; TableRowCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableRowCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -18632,7 +20729,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -18645,8 +20742,16 @@ var Word; } }; TableRowCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableRowCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TableRowCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableRowCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; TableRowCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -18654,7 +20759,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; TableRowCollection.prototype.track=function () { @@ -18666,15 +20771,16 @@ var Word; return this; }; TableRowCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return TableRowCollection; }(OfficeExtension.ClientObject)); Word.TableRowCollection=TableRowCollection; + var _typeTableCell="TableCell"; var TableCell=(function (_super) { __extends(TableCell, _super); function TableCell() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableCell.prototype, "_className", { get: function () { @@ -18685,49 +20791,49 @@ var Word; }); Object.defineProperty(TableCell.prototype, "body", { get: function () { - if (!this.m_body) { - this.m_body=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "Body", false, false)); + if (!this._B) { + this._B=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "Body", false, false, false)); } - return this.m_body; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "parentRow", { get: function () { - if (!this.m_parentRow) { - this.m_parentRow=new Word.TableRow(this.context, _createPropertyObjectPath(this.context, this, "ParentRow", false, false)); + if (!this._P) { + this._P=new Word.TableRow(this.context, _createPropertyObjectPath(this.context, this, "ParentRow", false, false, false)); } - return this.m_parentRow; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + if (!this._Pa) { + this._Pa=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "cellIndex", { get: function () { - _throwIfNotLoaded("cellIndex", this.m_cellIndex, "TableCell", this._isNull); - return this.m_cellIndex; + _throwIfNotLoaded("cellIndex", this._C, _typeTableCell, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "columnWidth", { get: function () { - _throwIfNotLoaded("columnWidth", this.m_columnWidth, "TableCell", this._isNull); - return this.m_columnWidth; + _throwIfNotLoaded("columnWidth", this._Co, _typeTableCell, this._isNull); + return this._Co; }, set: function (value) { - this.m_columnWidth=value; + this._Co=value; _createSetPropertyAction(this.context, this, "ColumnWidth", value); }, enumerable: true, @@ -18735,11 +20841,11 @@ var Word; }); Object.defineProperty(TableCell.prototype, "horizontalAlignment", { get: function () { - _throwIfNotLoaded("horizontalAlignment", this.m_horizontalAlignment, "TableCell", this._isNull); - return this.m_horizontalAlignment; + _throwIfNotLoaded("horizontalAlignment", this._H, _typeTableCell, this._isNull); + return this._H; }, set: function (value) { - this.m_horizontalAlignment=value; + this._H=value; _createSetPropertyAction(this.context, this, "HorizontalAlignment", value); }, enumerable: true, @@ -18747,19 +20853,19 @@ var Word; }); Object.defineProperty(TableCell.prototype, "rowIndex", { get: function () { - _throwIfNotLoaded("rowIndex", this.m_rowIndex, "TableCell", this._isNull); - return this.m_rowIndex; + _throwIfNotLoaded("rowIndex", this._R, _typeTableCell, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "shadingColor", { get: function () { - _throwIfNotLoaded("shadingColor", this.m_shadingColor, "TableCell", this._isNull); - return this.m_shadingColor; + _throwIfNotLoaded("shadingColor", this._S, _typeTableCell, this._isNull); + return this._S; }, set: function (value) { - this.m_shadingColor=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShadingColor", value); }, enumerable: true, @@ -18767,11 +20873,11 @@ var Word; }); Object.defineProperty(TableCell.prototype, "value", { get: function () { - _throwIfNotLoaded("value", this.m_value, "TableCell", this._isNull); - return this.m_value; + _throwIfNotLoaded("value", this._V, _typeTableCell, this._isNull); + return this._V; }, set: function (value) { - this.m_value=value; + this._V=value; _createSetPropertyAction(this.context, this, "Value", value); }, enumerable: true, @@ -18779,11 +20885,11 @@ var Word; }); Object.defineProperty(TableCell.prototype, "verticalAlignment", { get: function () { - _throwIfNotLoaded("verticalAlignment", this.m_verticalAlignment, "TableCell", this._isNull); - return this.m_verticalAlignment; + _throwIfNotLoaded("verticalAlignment", this._Ve, _typeTableCell, this._isNull); + return this._Ve; }, set: function (value) { - this.m_verticalAlignment=value; + this._Ve=value; _createSetPropertyAction(this.context, this, "VerticalAlignment", value); }, enumerable: true, @@ -18791,68 +20897,66 @@ var Word; }); Object.defineProperty(TableCell.prototype, "width", { get: function () { - _throwIfNotLoaded("width", this.m_width, "TableCell", this._isNull); - return this.m_width; + _throwIfNotLoaded("width", this._W, _typeTableCell, this._isNull); + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "TableCell", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeTableCell, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableCell", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableCell, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); TableCell.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["value", "shadingColor", "horizontalAlignment", "verticalAlignment", "columnWidth"], ["body"], [ - "parentRow", - "parentTable", "parentRow", "parentTable" ]); }; TableCell.prototype.deleteColumn=function () { - _createMethodAction(this.context, this, "DeleteColumn", 0, []); + _createMethodAction(this.context, this, "DeleteColumn", 0, [], false); }; TableCell.prototype.deleteRow=function () { - _createMethodAction(this.context, this, "DeleteRow", 0, []); + _createMethodAction(this.context, this, "DeleteRow", 0, [], false); }; TableCell.prototype.getBorder=function (borderLocation) { - return new Word.TableBorder(this.context, _createMethodObjectPath(this.context, this, "GetBorder", 1, [borderLocation], false, false, null)); + return new Word.TableBorder(this.context, _createMethodObjectPath(this.context, this, "GetBorder", 1, [borderLocation], false, false, null, false)); }; TableCell.prototype.getCellPadding=function (cellPaddingLocation) { - var action=_createMethodAction(this.context, this, "GetCellPadding", 1, [cellPaddingLocation]); + var action=_createMethodAction(this.context, this, "GetCellPadding", 1, [cellPaddingLocation], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; TableCell.prototype.getNext=function () { - return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null)); + return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null, false)); }; TableCell.prototype.getNextOrNullObject=function () { - return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null)); + return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null, false)); }; TableCell.prototype.insertColumns=function (insertLocation, columnCount, values) { - _createMethodAction(this.context, this, "InsertColumns", 0, [insertLocation, columnCount, values]); + _createMethodAction(this.context, this, "InsertColumns", 0, [insertLocation, columnCount, values], false); }; TableCell.prototype.insertRows=function (insertLocation, rowCount, values) { - return new Word.TableRowCollection(this.context, _createMethodObjectPath(this.context, this, "InsertRows", 0, [insertLocation, rowCount, values], true, false, null)); + return new Word.TableRowCollection(this.context, _createMethodObjectPath(this.context, this, "InsertRows", 0, [insertLocation, rowCount, values], true, false, null, false)); }; TableCell.prototype.setCellPadding=function (cellPaddingLocation, cellPadding) { - _createMethodAction(this.context, this, "SetCellPadding", 0, [cellPaddingLocation, cellPadding]); + _createMethodAction(this.context, this, "SetCellPadding", 0, [cellPaddingLocation, cellPadding], false); }; TableCell.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableCell.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -18861,40 +20965,48 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["CellIndex"])) { - this.m_cellIndex=obj["CellIndex"]; + this._C=obj["CellIndex"]; } if (!_isUndefined(obj["ColumnWidth"])) { - this.m_columnWidth=obj["ColumnWidth"]; + this._Co=obj["ColumnWidth"]; } if (!_isUndefined(obj["HorizontalAlignment"])) { - this.m_horizontalAlignment=obj["HorizontalAlignment"]; + this._H=obj["HorizontalAlignment"]; } if (!_isUndefined(obj["RowIndex"])) { - this.m_rowIndex=obj["RowIndex"]; + this._R=obj["RowIndex"]; } if (!_isUndefined(obj["ShadingColor"])) { - this.m_shadingColor=obj["ShadingColor"]; + this._S=obj["ShadingColor"]; } if (!_isUndefined(obj["Value"])) { - this.m_value=obj["Value"]; + this._V=obj["Value"]; } if (!_isUndefined(obj["VerticalAlignment"])) { - this.m_verticalAlignment=obj["VerticalAlignment"]; + this._Ve=obj["VerticalAlignment"]; } if (!_isUndefined(obj["Width"])) { - this.m_width=obj["Width"]; + this._W=obj["Width"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["body", "Body", "parentRow", "ParentRow", "parentTable", "ParentTable"]); }; TableCell.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableCell.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TableCell.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableCell.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; TableCell.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -18902,10 +21014,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; TableCell.prototype.track=function () { @@ -18917,25 +21029,31 @@ var Word; return this; }; TableCell.prototype.toJSON=function () { - return { - "body": this.m_body, - "cellIndex": this.m_cellIndex, - "columnWidth": this.m_columnWidth, - "horizontalAlignment": this.m_horizontalAlignment, - "rowIndex": this.m_rowIndex, - "shadingColor": this.m_shadingColor, - "value": this.m_value, - "verticalAlignment": this.m_verticalAlignment, - "width": this.m_width - }; + return _toJson(this, { + "cellIndex": this._C, + "columnWidth": this._Co, + "horizontalAlignment": this._H, + "rowIndex": this._R, + "shadingColor": this._S, + "value": this._V, + "verticalAlignment": this._Ve, + "width": this._W, + }, { + "body": this._B, + }); + }; + TableCell.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TableCell; }(OfficeExtension.ClientObject)); Word.TableCell=TableCell; + var _typeTableCellCollection="TableCellCollection"; var TableCellCollection=(function (_super) { __extends(TableCellCollection, _super); function TableCellCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableCellCollection.prototype, "_className", { get: function () { @@ -18946,7 +21064,7 @@ var Word; }); Object.defineProperty(TableCellCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableCellCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableCellCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -18954,23 +21072,23 @@ var Word; }); Object.defineProperty(TableCellCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableCellCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableCellCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); TableCellCollection.prototype.getFirst=function () { - return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; TableCellCollection.prototype.getFirstOrNullObject=function () { - return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; TableCellCollection.prototype._GetItem=function (index) { return new Word.TableCell(this.context, _createIndexerObjectPath(this.context, this, [index])); }; TableCellCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableCellCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -18979,7 +21097,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -18992,8 +21110,16 @@ var Word; } }; TableCellCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableCellCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TableCellCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableCellCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; TableCellCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -19001,7 +21127,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; TableCellCollection.prototype.track=function () { @@ -19013,15 +21139,16 @@ var Word; return this; }; TableCellCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return TableCellCollection; }(OfficeExtension.ClientObject)); Word.TableCellCollection=TableCellCollection; + var _typeTableBorder="TableBorder"; var TableBorder=(function (_super) { __extends(TableBorder, _super); function TableBorder() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableBorder.prototype, "_className", { get: function () { @@ -19032,11 +21159,11 @@ var Word; }); Object.defineProperty(TableBorder.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "TableBorder", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeTableBorder, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -19044,11 +21171,11 @@ var Word; }); Object.defineProperty(TableBorder.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "TableBorder", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._T, _typeTableBorder, this._isNull); + return this._T; }, set: function (value) { - this.m_type=value; + this._T=value; _createSetPropertyAction(this.context, this, "Type", value); }, enumerable: true, @@ -19056,11 +21183,11 @@ var Word; }); Object.defineProperty(TableBorder.prototype, "width", { get: function () { - _throwIfNotLoaded("width", this.m_width, "TableBorder", this._isNull); - return this.m_width; + _throwIfNotLoaded("width", this._W, _typeTableBorder, this._isNull); + return this._W; }, set: function (value) { - this.m_width=value; + this._W=value; _createSetPropertyAction(this.context, this, "Width", value); }, enumerable: true, @@ -19068,8 +21195,8 @@ var Word; }); Object.defineProperty(TableBorder.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableBorder", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableBorder, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -19078,7 +21205,7 @@ var Word; this._recursivelySet(properties, options, ["color", "type", "width"], [], []); }; TableBorder.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableBorder.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -19087,21 +21214,29 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._T=obj["Type"]; } if (!_isUndefined(obj["Width"])) { - this.m_width=obj["Width"]; + this._W=obj["Width"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } }; TableBorder.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableBorder.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TableBorder.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableBorder.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; TableBorder.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -19109,7 +21244,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; TableBorder.prototype.track=function () { @@ -19121,11 +21256,15 @@ var Word; return this; }; TableBorder.prototype.toJSON=function () { - return { - "color": this.m_color, - "type": this.m_type, - "width": this.m_width - }; + return _toJson(this, { + "color": this._C, + "type": this._T, + "width": this._W, + }, {}); + }; + TableBorder.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TableBorder; }(OfficeExtension.ClientObject)); @@ -19521,9 +21660,10 @@ var Word; var RequestContext=(function (_super) { __extends(RequestContext, _super); function RequestContext(url) { - _super.call(this, url); - this.m_document=new Word.Document(this, OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(this)); - this._rootObject=this.m_document; + var _this=_super.call(this, url) || this; + _this.m_document=new Word.Document(_this, OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(_this)); + _this._rootObject=_this.m_document; + return _this; } Object.defineProperty(RequestContext.prototype, "document", { get: function () { @@ -19533,7 +21673,7 @@ var Word; configurable: true }); return RequestContext; - }(OfficeExtension.ClientRequestContext)); + }(OfficeCore.RequestContext)); Word.RequestContext=RequestContext; function run(arg1, arg2) { return OfficeExtension.ClientRequestContext._runBatch("Word.run", arguments, function () { return new Word.RequestContext(); }); @@ -19541,4 +21681,6 @@ var Word; Word.run=run; })(Word || (Word={})); +OfficeExtension.Utility._doApiNotSupportedCheck=true; + diff --git a/node_modules/@microsoft/office-js/dist/word-web-16.00.js b/node_modules/@microsoft/office-js/dist/word-web-16.00.js index 816a413..59222a7 100644 --- a/node_modules/@microsoft/office-js/dist/word-web-16.00.js +++ b/node_modules/@microsoft/office-js/dist/word-web-16.00.js @@ -1,7 +1,7 @@ /* Word Web-specific API library */ -/* Version: 16.0.8117.3000 */ +/* Version: 16.0.8904.3000 */ -/* Office.js Version: 16.0.8126.1000 */ +/* Office.js Version: 16.0.8916.1000 */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ @@ -18,4 +18,4 @@ * @version 2.3.0 */ -var __extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},OsfMsAjaxFactory,OSF,OSFLog,Logger,OSFAriaLogger,OSFAppTelemetry,OSF_DDA_Marshaling_FilePropertiesKeys,OSF_DDA_Marshaling_File_FilePropertiesKeys,OSF_DDA_Marshaling_File_SlicePropertiesKeys,OSF_DDA_Marshaling_File_FileType,OSF_DDA_Marshaling_File_ParameterKeys,OSF_DDA_Marshaling_GoToType,OSF_DDA_Marshaling_SelectionMode,OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys,OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys,OfficeExt,OSFWordWAC,OfficeExtension,Word;(function(n){var t=function(){function t(){}var n=!0;return t.prototype.isMsAjaxLoaded=function(){var t="function",i="undefined";return typeof Sys!==i&&typeof Type!==i&&Sys.StringBuilder&&typeof Sys.StringBuilder===t&&Type.registerNamespace&&typeof Type.registerNamespace===t&&Type.registerClass&&typeof Type.registerClass===t&&typeof Function._validateParams===t&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===t?n:!1},t.prototype.loadMsAjaxFull=function(n){var t=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,n)},Object.defineProperty(t.prototype,"msAjaxError",{get:function(){var n=this;return n._msAjaxError==null&&n.isMsAjaxLoaded()&&(n._msAjaxError=Error),n._msAjaxError},set:function(n){this._msAjaxError=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxString",{get:function(){var n=this;return n._msAjaxString==null&&n.isMsAjaxLoaded()&&(n._msAjaxString=String),n._msAjaxString},set:function(n){this._msAjaxString=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxDebug",{get:function(){var n=this;return n._msAjaxDebug==null&&n.isMsAjaxLoaded()&&(n._msAjaxDebug=Sys.Debug),n._msAjaxDebug},set:function(n){this._msAjaxDebug=n},enumerable:n,configurable:n}),t}();n.MicrosoftAjaxFactory=t})(OfficeExt||(OfficeExt={}));OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory;OSF=OSF||{},function(n){var t=function(){function n(n){this._internalStorage=n}return n.prototype.getItem=function(n){try{return this._internalStorage&&this._internalStorage.getItem(n)}catch(t){return null}},n.prototype.setItem=function(n,t){try{this._internalStorage&&this._internalStorage.setItem(n,t)}catch(i){}},n.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(n){}},n.prototype.removeItem=function(n){try{this._internalStorage&&this._internalStorage.removeItem(n)}catch(t){}},n.prototype.getKeysWithPrefix=function(n){var r=[],u,t,i;try{for(u=this._internalStorage&&this._internalStorage.length||0,t=0;t0?i.push(t):t.tabIndex===0&&r.push(t):r.push(t);return i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;return r===0&&(r=i.indexOf(n)-i.indexOf(t)),r}),[].concat(i,r)}var f="focus",e="on",b="configurable",k="writable",o="enumerable",s="undefined",i=!0,t=!1,c=2147483647,n=null,r=-1,l=r,d="&_xdm_Info=",g="&_serializer_version=",nt="_xdm_",ut="_serializer_version=",a="#",tt="&",h="class",v={},ft=3e4,y=n,p=n,u=(new Date).getTime();return{set_entropy:function(n){var t,r,i;if(typeof n=="string")for(t=0;t1?l[l.length-1]:n,s,h,c,a;return u&&o!=n&&(o.indexOf(tt)>=0&&(o=o.split(tt)[0]),o=decodeURIComponent(o)),s=w(),!f&&s&&(h=window.name.indexOf(i),h>r&&(c=window.name.indexOf(";",h),c==r&&(c=window.name.length),a=window.name.substring(h,c),o?s.setItem(a,o):o=s.getItem(a))),o},getConversationId:function(){var i=window.location.search,t=n,r;return i&&(r=i.indexOf("&"),t=r>0?i.substring(1,r):i.substr(1),t&&t.charAt(t.length-1)==="="&&(t=t.substring(0,t.length-1),t&&(t=decodeURIComponent(t)))),t},getInfoItems:function(n){var t=n.split("$");return typeof t[1]==s&&(t=n.split("|")),typeof t[1]==s&&(t=n.split("%7C")),t},getXdmFieldValue:function(n,t){var r="",u=OSF.OUtil.parseXdmInfo(t),i;if(u&&(i=OSF.OUtil.getInfoItems(u),i!=undefined&&i.length>=3))switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]),f;if(u)throw u;for(f in r)if(u=Function._validateParameter(n[f],r[f],f),u)throw u;},writeProfilerMark:function(n){window.msWriteProfilerMark&&(window.msWriteProfilerMark(n),OsfMsAjaxFactory.msAjaxDebug.trace(n))},outputDebug:function(n){typeof OsfMsAjaxFactory!==s&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){var e,f;r=r||{};for(e in u)f=u[e],r[f]==undefined&&(r[f]=i);return Object.defineProperty(n,t,r),n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[o])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[o])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[k,o,b])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[k,o,b])},finalizeProperties:function(n,r){var e,u;r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8,f=e&255,i[t++]=r>>2,i[t++]=(r&3)<<4|u>>4,i[t++]=(u&15)<<2|f>>6,i[t++]=f&63,isNaN(e)||(r=e>>8,u=s&255,f=s>>8,i[t++]=r>>2,i[t++]=(r&3)<<4|u>>4,i[t++]=(u&15)<<2|f>>6,i[t++]=f&63),isNaN(e)?i[t-1]=64:isNaN(s)&&(i[t-2]=64,i[t-1]=64),h=0;h0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){var u,i,f,r;if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(u=[],i=0;in)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=rt(u),o=e?u.length-1:0,u.length===0)return n;while(!h&&o>=0&&on)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=rt(u),l=y(u,e),s=v(u.length,l,o),s<0)return n;while(!c&&s>=0&&s0;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[r%16],r=Math.floor(r/16);for(;t<32;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[Math.floor(Math.random()*16)];return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];return i?(i.name||(i.name=n[this.errorCodes.ooeInternalError].name),i.message||(i.message=n[this.errorCodes.ooeInternalError].message)):i=n[this.errorCodes.ooeInternalError],i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage}}}}(),function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}(),r,i,h,u,c,l,f,a,e,v,y,p,w,b,o,k,d,g,s,nt,tt,it,rt;n.RequirementVersion=ut;r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){var f,u,e,i,r;if(n==undefined)return!1;if(t==undefined&&(t=0),f=this._setMap,u=f._sets,u.hasOwnProperty(n.toLowerCase())){e=u[n.toLowerCase()];try{if((i=this._getVersion(e),t=t+"",r=this._getVersion(t),i.major>0&&i.major>r.major)||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),i=0,r=0;if(t.length<2&&isNaN(Number(n)))throw u;else if(i=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(i)||isNaN(r))throw u;return{minor:r,major:i}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;h=function(n){function i(){n.call(this,{dialogapi:t})}return __extends(i,n),i}(i);n.DefaultDialogSetRequirement=h;u=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelClientDefaultSetRequirement=u;c=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(u);n.ExcelClientV1DefaultSetRequirement=c;l=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookClientDefaultSetRequirement=l;f=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return __extends(i,n),i}(i);n.WordClientDefaultSetRequirement=f;a=function(n){function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return __extends(i,n),i}(f);n.WordClientV1DefaultSetRequirement=a;e=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointClientDefaultSetRequirement=e;v=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(e);n.PowerpointClientV1DefaultSetRequirement=v;y=function(n){function i(){n.call(this,{selection:t,textcoercion:t})}return __extends(i,n),i}(i);n.ProjectClientDefaultSetRequirement=y;p=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return __extends(i,n),i}(i);n.ExcelWebDefaultSetRequirement=p;w=function(n){function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordWebDefaultSetRequirement=w;b=function(n){function i(){n.call(this,{activeview:t,settings:t})}return __extends(i,n),i}(i);n.PowerpointWebDefaultSetRequirement=b;o=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookWebDefaultSetRequirement=o;k=function(n){function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.SwayWebDefaultSetRequirement=k;d=function(n){function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return __extends(i,n),i}(i);n.AccessWebDefaultSetRequirement=d;g=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelIOSDefaultSetRequirement=g;s=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordIOSDefaultSetRequirement=s;nt=function(n){function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return __extends(t,n),t}(s);n.WordIOSV1DefaultSetRequirement=nt;tt=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointIOSDefaultSetRequirement=tt;it=function(n){function i(){n.call(this,{mailbox:t})}return __extends(i,n),i}(i);n.OutlookIOSDefaultSetRequirement=it;rt=function(){function n(){}var t="undefined";return n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},n.getDefaultRequirementMatrix=function(u){var f,e,s,o;return this.initializeDefaultSetMatrix(),f=undefined,e=u.get_requirementMatrix(),e!=undefined&&e.length>0&&typeof JSON!==t?(s=JSON.parse(u.get_requirementMatrix().toLowerCase()),f=new r(new i(s))):(o=n.getClientFullVersionString(u),f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[o]!=undefined?new r(n.DefaultSetArrayMatrix[o]):new r(new i({}))),f},n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix(),e;return f!=undefined&&f.length>0&&typeof JSON!==t?(e=JSON.parse(n.get_requirementMatrix().toLowerCase()),u=new r(new i(e))):u=new r(new h),u},n.getClientFullVersionString=function(n){var i=n.get_appMinorVersion(),u="",r="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;return f&&n.get_appVersion()==1?r=t==4096&&i>=15?"16.00.01":"16.00":n.get_appName()==64?r=n.get_appVersion():(u=i<10?"0"+i:""+i,r=n.get_appVersion()+"."+u),n.get_appName()+"-"+r},n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new c;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new v;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new l;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new w;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new b;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new g;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new k;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new nt;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new tt;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new it},n.Excel_RCLIENT_1600="1-16.00",n.Excel_RCLIENT_1601="1-16.01",n.Word_RCLIENT_1600="2-16.00",n.Word_RCLIENT_1601="2-16.01",n.PowerPoint_RCLIENT_1600="4-16.00",n.PowerPoint_RCLIENT_1601="4-16.01",n.Outlook_RCLIENT_1600="8-16.00",n.Excel_WAC_1600="16-16.00",n.Word_WAC_1600="32-16.00",n.Outlook_WAC_1600="64-16.00",n.Outlook_WAC_1601="64-16.01",n.Project_RCLIENT_1600="128-16.00",n.Access_WAC_1600="256-16.00",n.PowerPoint_WAC_1600="512-16.00",n.Excel_IOS_1600="1024-16.00",n.SWAY_WAC_1600="2048-16.00",n.Word_IOS_1600="4096-16.00",n.Word_IOS_16001="4096-16.00.01",n.PowerPoint_IOS_1600="8192-16.00",n.Outlook_IOS_1600="65536-16.00",n.DefaultSetArrayMatrix={},n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))}(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}return n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n},n.getInstance=function(){return n.hostObj===undefined&&(n.hostObj=new n),n.hostObj},n.prototype.getPlatform=function(){var n=this,t;return n.hostInfo.hostPlatform&&(t=n.hostInfo.hostPlatform.toLowerCase(),n.platformRemappings[t])?n.platformRemappings[t]:null},n.prototype.getHost=function(){var n=this,t;if(n.hostInfo.hostType){if(t=n.hostInfo.hostType.toLowerCase(),n.camelCaseMappings[t])return n.camelCaseMappings[t];if(t=n.capitalizeFirstLetter(n.hostInfo.hostType),Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null},n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null},n}();n.Host=t})(t=n.HostName||(n.HostName={}))}(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){n||(window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,n=!0)},disableShortcut:function(){n&&(t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window),n=!1)}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i,r,o,u,f,e;if(n&&typeof n=="string"&&(r=n.indexOf("#"),r!=-1)){o=n.substring(0,r);u=n.substring(r+1);switch(o){case"binding":case"bindings":u&&(i=new OSF.DDA.BindingPromise(u))}}if(i)return i.onFail=t,i;else if(t)if(f=typeof t,f=="function")e={},e[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(e,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext));else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f);};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this,s,e;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.auth&&OSF.OUtil.defineEnumerableProperty(f,"auth",{value:n.auth});n.get_isDialog()?(e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e})):(t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t}),r&&(s=r.displayName||"appOM",delete r.displayName,OSF.OUtil.defineEnumerableProperty(f,s,{value:r})),u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}}),e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e}))};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this,u;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;return OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext()),n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,e=n.length,o=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){var u,i,r;for(u in n){if(i=n[u],r=t[u],i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw o();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw o();}};f.extractRequiredArguments=function(t,i,r){var f,u,h,s,c,l;if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(c=n.length-1;c>=s;c--){l=n[c];switch(typeof l){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=l;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}if(f=o.fillOptions(f,i,r,u),e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;return o.verifyArguments(t,f),f}var h="function",s=n.length,o=new OSF.DDA.ApiMethodCall(n,t,i,f,e);this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),u=c(n,r,t,i);return o.constructCallArgs(r,u,t,i)};this.processResponse=function(n,t,i,f){return n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n)};this.getCallArgs=function(n){for(var t,u,r,i=n.length-1;i>=s;i--){r=n[i];switch(typeof r){case"object":t=r;break;case h:u=r}}return t=t||{},u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u),t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],i=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],t,i,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback],u,r;f&&(u={},u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?u[OSF.DDA.AsyncResultEnum.Properties.Value]=i:(r={},i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i),f(new OSF.DDA.AsyncResult(u,r)))};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.SyncMethodNames[t]=i};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){function o(n,i,r,u){var o,c,s,h;if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(s=n.length-1;s>=e;s--){h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}return o=f.fillOptions(o,i,r,u),f.verifyArguments(t,o),o}var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),u=o(n,r,t,i);return f.constructCallArgs(r,u,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){function e(i,f){var a=i?{}:undefined,s,h,o,v,c,l;for(s in i){if(h=i[s],OSF.DDA.ListType.isListType(s)){o=[];for(v in h)o.push(e(h[v],f))}else OSF.OUtil.listContainsKey(r,s)?o=r[s][f](h):f==u&&n.preserveNesting(s)?o=e(h,f):(c=t[s],c?(l=c[f],l&&(o=l[h],o===undefined&&(o=h))):o=h);a[s]=o}return a}function l(i,r){var e,u,h,s;for(u in r)h=n.isComplexType(u)?l(i,t[u][o]):i[u],h!=undefined&&(e||(e={}),s=r[u],s==f&&(s=u),e[s]=n.pack(u,h));return e}function s(i,r,e){var o,a,h,l,p,v,y;e||(e={});for(o in r){if(a=r[o],a==f)h=i;else if(a==c){e[o]=i.toArray();continue}else h=i[a];if(h===null||h===undefined)e[o]=undefined;else if(h=n.unpack(o,h),n.isComplexType(o))l=t[o][u],n.preserveNesting(o)?e[o]=s(h,l):s(h,l,e);else if(OSF.DDA.ListType.isListType(o)){l={};p=OSF.DDA.ListType.getDescriptor(o);l[p]=f;v=new Array(h.length);for(y in h)v[y]=s(h[y],l);e[o]=v}else e[o]=h}return e}function a(n,i,r){var f=t[n][r],u,o,c;return r=="toHost"?(o=e(i,r),u=l(o,f)):r==h&&(c=s(i,f),u=e(c,r)),u}var h="fromHost",i=this,o="toHost",u=h,c="sourceData",f="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];t||(t={});i.addMapping=function(n,i){var e,h,c,l,r,s,a,v;if(i.map){e=i.map;h={};for(c in e)l=e[c],l==f&&(l=c),h[l]=c}else e=i.toHost,h=i.fromHost;if(r=t[n],r){s=r[o];for(a in s)e[a]=s[a];s=r[u];for(v in s)h[v]=s[v]}else r=t[n]={};r[o]=e;r[u]=h};i.toHost=function(n,t){return a(n,t,o)};i.fromHost=function(n,t){return a(n,t,u)};i.self=f;i.sourceData=c;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){return this.isDynamicType(n)?t[n].toHost(i):i};i.unpack=function(n,i){return this.isDynamicType(n)?t[n].fromHost(i):i}};OSF.DDA.getDecoratedParameterMap=function(n,t){function r(n){var i=null,r,t;if(n)for(i={},r=n.length,t=0;t1?i=u+c+t:s.length>0&&(i=u+f+h+t),o?[i,r,o].join(""):i}function e(n){if(!n)return null;var t=document.createElement("a");return t.href=n,t.protocol+"//"+t.host}var t="^https://[a-z0-9-]+.(officeapps.live|officeapps-df.live|partner.officewebapps).com/";n.parseAppContextFromWindowName=i;n.serializeObjectToString=r;n.isHostTrusted=u;n.addHostInfoAsQueryParam=f;n.getDomainForUrl=e})(t=n.WACUtils||(n.WACUtils={}))}(OfficeExt||(OfficeExt={})),function(n){var e="\n",i=!0,t=null,r="undefined",h=function(){function n(){}return n.isInstanceOfType=function(n,u){if(typeof u===r||u===t)return!1;if(u instanceof n)return i;var f=u.constructor;return f&&typeof f=="function"&&f.__typeName&&f.__typeName!=="Object"||(f=Object),!!(f===n)||f.__typeName&&n.__typeName&&f.__typeName===n.__typeName},n}(),o,u,s,f;n.MsAjaxTypeHelper=h;o=function(){function n(){}var i="Parameter name: {0}";return n.create=function(n,t){var i=new Error(n),r;if(i.message=n,t)for(r in t)i[r]=t[r];return i.popStackFrame(),i},n.parameterCount=function(t){var r="Sys.ParameterCountException: "+(t?t:"Parameter count mismatch."),i=n.create(r,{name:"Sys.ParameterCountException"});return i.popStackFrame(),i},n.argument=function(t,r){var o="Sys.ArgumentException: "+(r?r:"Value does not fall within the expected range."),f;return t&&(o+=e+u.format(i,t)),f=n.create(o,{name:"Sys.ArgumentException",paramName:t}),f.popStackFrame(),f},n.argumentNull=function(t,r){var o="Sys.ArgumentNullException: "+(r?r:"Value cannot be null."),f;return t&&(o+=e+u.format(i,t)),f=n.create(o,{name:"Sys.ArgumentNullException",paramName:t}),f.popStackFrame(),f},n.argumentOutOfRange=function(f,o,s){var h="Sys.ArgumentOutOfRangeException: "+(s?s:"Specified argument was out of the range of valid values."),c;return f&&(h+=e+u.format(i,f)),typeof o!==r&&o!==t&&(h+=e+u.format("Actual value was {0}.",o)),c=n.create(h,{name:"Sys.ArgumentOutOfRangeException",paramName:f,actualValue:o}),c.popStackFrame(),c},n.argumentType=function(t,r,f,o){var s="Sys.ArgumentTypeException: ",h;return s+=o?o:r&&f?u.format("Object of type '{0}' cannot be converted to type '{1}'.",r.getName?r.getName():r,f.getName?f.getName():f):"Object cannot be converted to the required type.",t&&(s+=e+u.format(i,t)),h=n.create(s,{name:"Sys.ArgumentTypeException",paramName:t,actualType:r,expectedType:f}),h.popStackFrame(),h},n.argumentUndefined=function(t,r){var o="Sys.ArgumentUndefinedException: "+(r?r:"Value cannot be undefined."),f;return t&&(o+=e+u.format(i,t)),f=n.create(o,{name:"Sys.ArgumentUndefinedException",paramName:t}),f.popStackFrame(),f},n.invalidOperation=function(t){var r="Sys.InvalidOperationException: "+(t?t:"Operation is not valid due to the current state of the object."),i=n.create(r,{name:"Sys.InvalidOperationException"});return i.popStackFrame(),i},n}();n.MsAjaxError=o;u=function(){function n(){}return n.format=function(n){for(var r,i=[],t=1;t0){for(r=[],i=0;i=s)break;if(f=Function._validateParameter(n[e],o,h),f)return f.popStackFrame(),f}return t}),Function._validateParameterCount||(Function._validateParameterCount=function(n,r,u){var f,s,e=r.length,h=n.length,c,l,a;if(he)for(s=i,f=0;f0){var t=h.shift();d(t)}else clearInterval(u),u=n}else OsfMsAjaxFactory.msAjaxDebug.trace(v)}function d(n){o=n.getInvokeBlockingFlag();n.invoke();c=(new Date).getTime()}function ot(){var r,u,s,e,h,o,t;if(f){u=0;s=new Date;for(h in i){r=i[h];for(o in r._callbackList)if(t=r._callbackList[o],e=t.timeout?t.timeout:b,e>=0&&Math.abs(s.getTime()-t.createdOn)>=e)try{t.callback&&t.callback(Microsoft.Office.Common.InvokeResultCode.errorHandlingMethodCallTimedout,n)}finally{delete r._callbackList[o]}else u++}u===0&&(clearInterval(f),f=n)}else OsfMsAjaxFactory.msAjaxDebug.trace(v)}function st(){o=t}function ht(n){if(window.addEventListener)window.addEventListener("message",n,t);else if(navigator.userAgent.indexOf("MSIE")>-1&&window.attachEvent)window.attachEvent("onmessage",n);else{OsfMsAjaxFactory.msAjaxDebug.trace("Browser doesn't support the required API.");throw OsfMsAjaxFactory.msAjaxError.argument("Browser");}}function ct(n,i){var f=t,r,u;return n===e?e:!n||!i||!n.length||!i.length?f:(r=document.createElement("a"),u=document.createElement("a"),r.href=n,u.href=i,f=g(r,u),delete r,u,f)}function l(n,i){var u=t,f,e,r;if(!i||!i.length||!n||!(n instanceof Array)||!n.length)return u;for(f=document.createElement("a"),e=document.createElement("a"),f.href=i,r=0;rp)&&!o?(d(ht),lt=t):u=setInterval(et,p));lt&&ft(ht)}catch(w){s&&s._onHandleRequestError&&s._onHandleRequestError(r,w);nt=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequest;w==tt&&(nt=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied);var pt=new Microsoft.Office.Common.Response(r._actionName,r._conversationId,r._correlationId,nt,Microsoft.Office.Common.ResponseType.forCalling,w),wt=Microsoft.Office.Common.MessagePackager.envelope(pt,f),at=t;try{at=!!(i.source&&i.source.postMessage)}catch(w){}at&&i.source.postMessage(wt,b)}}else if(r._messageType===Microsoft.Office.Common.MessageType.response){if(h=rt(r._conversationId),!h)return;if(h._serializerVersion=f,!ct(h._targetUrl,i.origin))throw"Failed orgin check";if(r._responseType===Microsoft.Office.Common.ResponseType.forCalling){if(v=h._callbackList[r._correlationId],v)try{v.callback&&v.callback(r._errorCode,r._data)}finally{delete h._callbackList[r._correlationId]}}else y=h._eventHandlerList[r._actionName],y!==undefined&&y!==n&&y(r._data)}else return}}function nt(){k||(ht(lt),k=e)}var a="serviceEndPointId",e=!0,v="channel is not ready.",s="conversationId",y="Unknown conversation Id.",t=!1,n=null,h=[],c=n,u=n,p=10,o=t,f=n,tt=2e3,w=65e3,b=w,r={},i={},k=t;return{connect:function(n,t,r,u){var f=i[n];return f||(nt(),f=new Microsoft.Office.Common.ClientEndPoint(n,t,r,u),i[n]=f),f},getClientEndPoint:function(n){var r=Function._validateParams(arguments,[{name:s,type:String,mayBeNull:t}]);if(r)throw r;return i[n]},createServiceEndPoint:function(n){nt();var t=new Microsoft.Office.Common.ServiceEndPoint(n);return r[n]=t,t},getServiceEndPoint:function(n){var i=Function._validateParams(arguments,[{name:a,type:String,mayBeNull:t}]);if(i)throw i;return r[n]},deleteClientEndPoint:function(n){var r=Function._validateParams(arguments,[{name:s,type:String,mayBeNull:t}]);if(r)throw r;delete i[n]},deleteServiceEndPoint:function(n){var i=Function._validateParams(arguments,[{name:a,type:String,mayBeNull:t}]);if(i)throw i;delete r[n]},checkUrlWithAppDomains:function(n,t){return l(n,t)},_setMethodTimeout:function(n){var i=Function._validateParams(arguments,[{name:"methodTimeout",type:Number,mayBeNull:t}]);if(i)throw i;b=n<=0?w:n},_startMethodTimeoutTimer:function(){f||(f=setInterval(ot,tt))}}}();Microsoft.Office.Common.Message=function(n,t,i,r,u){var e=!1,f=this,o=Function._validateParams(arguments,[{name:"messageType",type:Number,mayBeNull:e},{name:"actionName",type:String,mayBeNull:e},{name:"conversationId",type:String,mayBeNull:e},{name:"correlationId",mayBeNull:e},{name:"data",mayBeNull:!0,optional:!0}]);if(o)throw o;f._messageType=n;f._actionName=t;f._conversationId=i;f._correlationId=r;f._origin=window.location.href;f._data=typeof u=="undefined"?null:u};Microsoft.Office.Common.Message.prototype={getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getOrigin:function(){return this._origin},getData:function(){return this._data},getMessageType:function(){return this._messageType}};Microsoft.Office.Common.Request=function(n,t,i,r,u){Microsoft.Office.Common.Request.uber.constructor.call(this,Microsoft.Office.Common.MessageType.request,n,i,r,u);this._actionType=t};OSF.OUtil.extend(Microsoft.Office.Common.Request,Microsoft.Office.Common.Message);Microsoft.Office.Common.Request.prototype.getActionType=function(){return this._actionType};Microsoft.Office.Common.Response=function(n,t,i,r,u,f){Microsoft.Office.Common.Response.uber.constructor.call(this,Microsoft.Office.Common.MessageType.response,n,t,i,f);this._errorCode=r;this._responseType=u};OSF.OUtil.extend(Microsoft.Office.Common.Response,Microsoft.Office.Common.Message);Microsoft.Office.Common.Response.prototype.getErrorCode=function(){return this._errorCode};Microsoft.Office.Common.Response.prototype.getResponseType=function(){return this._responseType};Microsoft.Office.Common.MessagePackager={envelope:function(n){return typeof n=="object"&&(n._serializerVersion=OSF.SerializerVersion.Browser),JSON.stringify(n)},unenvelope:function(n){return JSON.parse(n)}};Microsoft.Office.Common.ResponseSender=function(n,t,i,r,u,f,e){var h=!1,o=this,c=Function._validateParams(arguments,[{name:"requesterWindow",mayBeNull:h},{name:"requesterUrl",type:String,mayBeNull:h},{name:"actionName",type:String,mayBeNull:h},{name:"conversationId",type:String,mayBeNull:h},{name:"correlationId",mayBeNull:h},{name:"responsetype",type:Number,maybeNull:h},{name:"serializerVersion",type:Number,maybeNull:!0,optional:!0}]),s;if(c)throw c;o._requesterWindow=n;o._requesterUrl=t;o._actionName=i;o._conversationId=r;o._correlationId=u;o._invokeResultCode=Microsoft.Office.Common.InvokeResultCode.noError;o._responseType=f;s=o;o._send=function(n){try{var t=new Microsoft.Office.Common.Response(s._actionName,s._conversationId,s._correlationId,s._invokeResultCode,s._responseType,n),i=Microsoft.Office.Common.MessagePackager.envelope(t,e);s._requesterWindow.postMessage(i,s._requesterUrl)}catch(r){OsfMsAjaxFactory.msAjaxDebug.trace("ResponseSender._send error:"+r.message)}}};Microsoft.Office.Common.ResponseSender.prototype={getRequesterWindow:function(){return this._requesterWindow},getRequesterUrl:function(){return this._requesterUrl},getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getSend:function(){return this._send},setResultCode:function(n){this._invokeResultCode=n}};Microsoft.Office.Common.InvokeCompleteCallback=function(n,t,i,r,u,f,e){var s=this,o;Microsoft.Office.Common.InvokeCompleteCallback.uber.constructor.call(s,n,t,i,r,u,Microsoft.Office.Common.ResponseType.forCalling,e);s._postCallbackHandler=f;o=s;s._send=function(n,t){t!=undefined&&(o._invokeResultCode=t);try{var i=new Microsoft.Office.Common.Response(o._actionName,o._conversationId,o._correlationId,o._invokeResultCode,o._responseType,n),r=Microsoft.Office.Common.MessagePackager.envelope(i,e);o._requesterWindow.postMessage(r,o._requesterUrl);o._postCallbackHandler()}catch(u){OsfMsAjaxFactory.msAjaxDebug.trace("InvokeCompleteCallback._send error:"+u.message)}}};OSF.OUtil.extend(Microsoft.Office.Common.InvokeCompleteCallback,Microsoft.Office.Common.ResponseSender);Microsoft.Office.Common.Invoker=function(n,t,i,r,u,f,e){var s=!0,h=!1,o=this,c=Function._validateParams(arguments,[{name:"methodObject",mayBeNull:h},{name:"paramValue",mayBeNull:s},{name:"invokeCompleteCallback",mayBeNull:h},{name:"eventHandlerProxyList",mayBeNull:s},{name:"conversationId",type:String,mayBeNull:h},{name:"eventName",type:String,mayBeNull:h},{name:"serializerVersion",type:Number,mayBeNull:s,optional:s}]);if(c)throw c;o._methodObject=n;o._param=t;o._invokeCompleteCallback=i;o._eventHandlerProxyList=r;o._conversationId=u;o._eventName=f;o._serializerVersion=e};Microsoft.Office.Common.Invoker.prototype={invoke:function(){var n=this,t,i,u,r,f;try{switch(n._methodObject.getInvokeType()){case Microsoft.Office.Common.InvokeType.async:n._methodObject.getMethod()(n._param,n._invokeCompleteCallback.getSend());break;case Microsoft.Office.Common.InvokeType.sync:t=n._methodObject.getMethod()(n._param);n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.syncRegisterEvent:i=n._createEventHandlerProxyObject(n._invokeCompleteCallback);t=n._methodObject.getMethod()(i.getSend(),n._param);n._eventHandlerProxyList[n._conversationId+n._eventName]=i.getSend();n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.syncUnregisterEvent:u=n._eventHandlerProxyList[n._conversationId+n._eventName];t=n._methodObject.getMethod()(u,n._param);delete n._eventHandlerProxyList[n._conversationId+n._eventName];n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.asyncRegisterEvent:r=n._createEventHandlerProxyObject(n._invokeCompleteCallback);n._methodObject.getMethod()(r.getSend(),n._invokeCompleteCallback.getSend(),n._param);n._eventHandlerProxyList[n._callerId+n._eventName]=r.getSend();break;case Microsoft.Office.Common.InvokeType.asyncUnregisterEvent:f=n._eventHandlerProxyList[n._callerId+n._eventName];n._methodObject.getMethod()(f,n._invokeCompleteCallback.getSend(),n._param);delete n._eventHandlerProxyList[n._callerId+n._eventName]}}catch(e){n._invokeCompleteCallback.setResultCode(Microsoft.Office.Common.InvokeResultCode.errorInResponse);n._invokeCompleteCallback.getSend()(e)}},getInvokeBlockingFlag:function(){return this._methodObject.getBlockingFlag()},_createEventHandlerProxyObject:function(n){return new Microsoft.Office.Common.ResponseSender(n.getRequesterWindow(),n.getRequesterUrl(),n.getActionName(),n.getConversationId(),n.getCorrelationId(),Microsoft.Office.Common.ResponseType.forEventing,this._serializerVersion)}};OSF.OUtil.setNamespace("WAC",OSF.DDA);OSF.DDA.WAC.UniqueArguments={Data:"Data",Properties:"Properties",BindingRequest:"DdaBindingsMethod",BindingResponse:"Bindings",SingleBindingResponse:"singleBindingResponse",GetData:"DdaGetBindingData",AddRowsColumns:"DdaAddRowsColumns",SetData:"DdaSetBindingData",ClearFormats:"DdaClearBindingFormats",SetFormats:"DdaSetBindingFormats",SettingsRequest:"DdaSettingsMethod",BindingEventSource:"ddaBinding",ArrayData:"ArrayData"};OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC);OSF.DDA.WAC.Delegate.SpecialProcessor=function(){var n=[OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,OSF.DDA.WAC.UniqueArguments.BindingRequest,OSF.DDA.WAC.UniqueArguments.BindingResponse,OSF.DDA.WAC.UniqueArguments.GetData,OSF.DDA.WAC.UniqueArguments.AddRowsColumns,OSF.DDA.WAC.UniqueArguments.SetData,OSF.DDA.WAC.UniqueArguments.ClearFormats,OSF.DDA.WAC.UniqueArguments.SetFormats,OSF.DDA.WAC.UniqueArguments.SettingsRequest,OSF.DDA.WAC.UniqueArguments.BindingEventSource],t={};OSF.DDA.WAC.Delegate.SpecialProcessor.uber.constructor.call(this,n,t)};OSF.OUtil.extend(OSF.DDA.WAC.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.WAC.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.WAC.Delegate.SpecialProcessor,[]);OSF.OUtil.setNamespace("WAC",OSF.DDA);OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC);OSF.DDA.WAC.getDelegateMethods=function(){var n={};return n[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.WAC.Delegate.executeAsync,n[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.WAC.Delegate.registerEventAsync,n[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.WAC.Delegate.unregisterEventAsync,n[OSF.DDA.DispIdHost.Delegates.OpenDialog]=OSF.DDA.WAC.Delegate.openDialog,n[OSF.DDA.DispIdHost.Delegates.MessageParent]=OSF.DDA.WAC.Delegate.messageParent,n[OSF.DDA.DispIdHost.Delegates.SendMessage]=OSF.DDA.WAC.Delegate.sendMessage,n[OSF.DDA.DispIdHost.Delegates.CloseDialog]=OSF.DDA.WAC.Delegate.closeDialog,n};OSF.DDA.WAC.Delegate.version=1;OSF.DDA.WAC.Delegate.executeAsync=function(n){n.hostCallArgs||(n.hostCallArgs={});n.hostCallArgs.DdaMethod={ControlId:OSF._OfficeAppFactory.getId(),Version:OSF.DDA.WAC.Delegate.version,DispatchId:n.dispId};n.hostCallArgs.__timeout__=-1;n.onCalling&&n.onCalling();var t=(new Date).getTime();OSF.getClientEndPoint().invoke("executeMethod",function(i,r){n.onReceiving&&n.onReceiving();var u;if(i==Microsoft.Office.Common.InvokeResultCode.noError)OSF.DDA.WAC.Delegate.version=r.Version,u=r.Error;else switch(i){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:u=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:u=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}n.onComplete&&n.onComplete(u,r);OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs((new Date).getTime()-t),u)},n.hostCallArgs)};OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent=function(n,t){var i=(new Date).getTime();return function(r,u){t.onReceiving&&t.onReceiving();var f;if(r!=Microsoft.Office.Common.InvokeResultCode.noError)switch(r){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:f=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:f=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}else f=u?u.Error?u.Error:OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess:OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;t.onComplete&&t.onComplete(f);OSF.AppTelemetry&&OSF.AppTelemetry.onRegisterDone(n,t.dispId,Math.abs((new Date).getTime()-i),f)}};OSF.DDA.WAC.Delegate.registerEventAsync=function(n){n.onCalling&&n.onCalling();OSF.getClientEndPoint().registerForEvent(OSF.DDA.getXdmEventName(n.targetId,n.eventType),function(t){n.onEvent&&n.onEvent(t);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!0,n),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:n.dispId,targetId:n.targetId})};OSF.DDA.WAC.Delegate.unregisterEventAsync=function(n){n.onCalling&&n.onCalling();OSF.getClientEndPoint().unregisterForEvent(OSF.DDA.getXdmEventName(n.targetId,n.eventType),OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!1,n),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:n.dispId,targetId:n.targetId})};OSF.OUtil.setNamespace("WebApp",OSF);OSF.WebApp.AddHostInfoAndXdmInfo=function(n){return OSF._OfficeAppFactory.getWindowLocationSearch&&OSF._OfficeAppFactory.getWindowLocationHash?n+OSF._OfficeAppFactory.getWindowLocationSearch()+OSF._OfficeAppFactory.getWindowLocationHash():n};OSF.WebApp._UpdateLinksForHostAndXdmInfo=function(){for(var r,i,t=document.querySelectorAll("a[data-officejs-navigate]"),n=0;n0?n.substr(0,i):null,r=t!==null?t.toLowerCase()==="http"||t.toLowerCase()==="https":!0;return r&&n!="#"&&n!="/"&&n!=""&&n!=OSF._OfficeAppFactory.getWebAppState().webAppUrl};OSF.InitializationHelper=function(n,t,i,r,u){var f=this,e;f._hostInfo=n;f._webAppState=t;f._context=i;f._settings=r;f._hostFacade=u;f._appContext={};f._tabbableElements="a[href]:not([tabindex='-1']),area[href]:not([tabindex='-1']),button:not([disabled]):not([tabindex='-1']),input:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),textarea:not([disabled]):not([tabindex='-1']),*[tabindex]:not([tabindex='-1']),*[contenteditable]:not([disabled]):not([tabindex='-1'])";f._initializeSettings=function(n,t){var r=n.get_settings(),u=OSF.OUtil.getSessionStorage(),i,f;return u&&(i=u.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey()),i?r=JSON.parse(i):(i=JSON.stringify(r),u.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),i))),f=OSF.DDA.SettingsManager.deserializeSettings(r),t?new OSF.DDA.RefreshableSettings(f):new OSF.DDA.Settings(f)};e=function(n){var t=window.open;n.open=function(n,i,r){var u=null,f;try{u=t(n,i,r)}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppCommonMessage("Exception happens at windowOpen."+e)}return u||(f={strUrl:n,strWindowName:i,strWindowFeatures:r},OSF._OfficeAppFactory.getClientEndPoint()&&OSF._OfficeAppFactory.getClientEndPoint().invoke("ContextActivationManager_openWindowInHost",null,f)),u}};e(window)};OSF.InitializationHelper.prototype.saveAndSetDialogInfo=function(n){var u="IsDialog",t=!0,f=function(){var n=OSF.OUtil.parseXdmInfo(t),i;return n?(i=n.split("|"),i[1]):null},i=OSF.OUtil.getSessionStorage(),r;if(i){if(n||(n=OSF.OUtil.parseHostInfoFromWindowName(t,OSF._OfficeAppFactory.getWindowName())),n&&n.indexOf("isDialog")>-1){r=f();r!=null&&i.setItem(r+u,"true");this._hostInfo.isDialog=t;return}this._hostInfo.isDialog=i.getItem(OSF.OUtil.getXdmFieldValue(OSF.XdmFieldName.AppId,!1)+u)!=null?t:!1}};OSF.InitializationHelper.prototype.getAppContext=function(n,t){var i=this,e=i,r=function(n,i){var u,f,c,o,s,r,h;if(i._appName===OSF.AppName.ExcelWebApp){f=i._settings;u={};for(c in f)o=f[c],u[o[0]]=o[1]}else u=i._settings;if(n===0&&i._id!=undefined&&i._appName!=undefined&&i._appVersion!=undefined&&i._appUILocale!=undefined&&i._dataLocale!=undefined&&i._docUrl!=undefined&&i._clientMode!=undefined&&i._settings!=undefined&&i._reason!=undefined){e._appContext=i;var a=i._appInstanceId?i._appInstanceId:i._id,v=!1,y=!0,l=0;i._appMinorVersion!=undefined&&(l=i._appMinorVersion);s=undefined;i._requirementMatrix!=undefined&&(s=i._requirementMatrix);i.eToken=i.eToken?i.eToken:"";r=new OSF.OfficeAppContext(i._id,i._appName,i._appVersion,i._appUILocale,i._dataLocale,i._docUrl,i._clientMode,u,i._reason,i._osfControlType,i._eToken,i._correlationId,a,v,y,l,s,i._hostCustomMessage,i._hostFullVersion,i._clientWindowHeight,i._clientWindowWidth,i._addinName,i._appDomains,i._dialogRequirementMatrix);r._wacHostEnvironment=i._wacHostEnvironment||"0";r._isFromWacAutomation=!!i._isFromWacAutomation;OSF.AppTelemetry&&OSF.AppTelemetry.initialize(r);t(r)}else{h="Function ContextActivationManager_getAppContextAsync call failed. ErrorCode is "+n+", exception: "+i;OSF.AppTelemetry&&OSF.AppTelemetry.logAppException(h);throw h;}},u;try{i._hostInfo.isDialog&&window.opener!=null?(u=OfficeExt.WACUtils.parseAppContextFromWindowName(!1,OSF._OfficeAppFactory.getWindowName()),r(0,u)):i._webAppState.clientEndPoint.invoke("ContextActivationManager_getAppContextAsync",r,i._webAppState.id)}catch(f){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown when trying to invoke getAppContextAsync. Exception:["+f+"]");throw f;}};OSF.InitializationHelper.prototype.setAgaveHostCommunication=function(){var u=null,t=!1,n,r,i,f,e,o;try{if(n=this,r=OSF.OUtil.parseXdmInfoWithGivenFragment(t,OSF._OfficeAppFactory.getWindowLocationHash()),!r&&OSF._OfficeAppFactory.getWindowName&&(r=OSF.OUtil.parseXdmInfoFromWindowName(t,OSF._OfficeAppFactory.getWindowName())),r&&(i=OSF.OUtil.getInfoItems(r),i!=undefined&&i.length>=3&&(n._webAppState.conversationID=i[0],n._webAppState.id=i[1],n._webAppState.webAppUrl=i[2].indexOf(":")>=0?i[2]:decodeURIComponent(i[2]))),n._webAppState.wnd=window.opener!=u?window.opener:window.parent,f=OSF.OUtil.parseSerializerVersionWithGivenFragment(t,OSF._OfficeAppFactory.getWindowLocationHash()),isNaN(f)&&OSF._OfficeAppFactory.getWindowName&&(f=OSF.OUtil.parseSerializerVersionFromWindowName(t,OSF._OfficeAppFactory.getWindowName())),n._webAppState.serializerVersion=f,this._hostInfo.isDialog&&window.opener!=u)return;n._webAppState.clientEndPoint=Microsoft.Office.Common.XdmCommunicationManager.connect(n._webAppState.conversationID,n._webAppState.wnd,n._webAppState.webAppUrl,n._webAppState.serializerVersion);n._webAppState.serviceEndPoint=Microsoft.Office.Common.XdmCommunicationManager.createServiceEndPoint(n._webAppState.id);e=n._webAppState.conversationID+OSF.SharedConstants.NotificationConversationIdSuffix;n._webAppState.serviceEndPoint.registerConversation(e,n._webAppState.webAppUrl);o=function(i){var e="ContextActivationManager_notifyHost",r,f;switch(i){case OSF.AgaveHostAction.Select:n._webAppState.focused=!0;break;case OSF.AgaveHostAction.UnSelect:n._webAppState.focused=t;break;case OSF.AgaveHostAction.TabIn:case OSF.AgaveHostAction.CtrlF6In:window.focus();r=document.querySelectorAll(n._tabbableElements);f=OSF.OUtil.focusToFirstTabbable(r,t);f||(window.blur(),n._webAppState.focused=t,n._webAppState.clientEndPoint.invoke(e,u,[n._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable]));break;case OSF.AgaveHostAction.TabInShift:window.focus();r=document.querySelectorAll(n._tabbableElements);f=OSF.OUtil.focusToFirstTabbable(r,!0);f||(window.blur(),n._webAppState.focused=t,n._webAppState.clientEndPoint.invoke(e,u,[n._webAppState.id,OSF.AgaveHostAction.ExitNoFocusableShift]));break;default:OsfMsAjaxFactory.msAjaxDebug.trace("actionId "+i+" notifyAgave is wrong.")}};n._webAppState.serviceEndPoint.registerMethod("Office_notifyAgave",o,Microsoft.Office.Common.InvokeType.async,t);n.addOrRemoveEventListenersForWindow(!0)}catch(s){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown in setAgaveHostCommunication. Exception:["+s+"]");throw s;}};OSF.InitializationHelper.prototype.addOrRemoveEventListenersForWindow=function(n){var u="keypress",i=null,r="ContextActivationManager_notifyHost",t=this,f=function(){t._webAppState.focused||(t._webAppState.focused=!0);t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.Select])},e=function(){OSF&&(t._webAppState.focused&&(t._webAppState.focused=!1),t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.UnSelect]))},o=function(n){var u,f,e;n.preventDefault=n.preventDefault||function(){n.returnValue=!1};n.keyCode==117&&(n.ctrlKey||n.metaKey)?(u=OSF.AgaveHostAction.CtrlF6Exit,n.shiftKey&&(u=OSF.AgaveHostAction.CtrlF6ExitShift),t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,u])):n.keyCode==9?(n.preventDefault(),f=document.querySelectorAll(t._tabbableElements),e=OSF.OUtil.focusToNextTabbable(f,n.target||n.srcElement,n.shiftKey),e||(t._hostInfo.isDialog?OSF.OUtil.focusToFirstTabbable(f,n.shiftKey):n.shiftKey?t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.TabExitShift]):t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.TabExit]))):n.keyCode==27?(n.preventDefault(),t.dismissDialogNotification&&t.dismissDialogNotification(),t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.EscExit])):n.keyCode==113&&(n.preventDefault(),t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.F2Exit]))},s=function(n){n.keyCode==117&&n.ctrlKey&&(n.preventDefault?n.preventDefault():n.returnValue=!1)};n?(OSF.OUtil.addEventListener(window,"focus",f),OSF.OUtil.addEventListener(window,"blur",e),OSF.OUtil.addEventListener(window,"keydown",o),OSF.OUtil.addEventListener(window,u,s)):(OSF.OUtil.removeEventListener(window,"focus",f),OSF.OUtil.removeEventListener(window,"blur",e),OSF.OUtil.removeEventListener(window,"keydown",o),OSF.OUtil.removeEventListener(window,u,s))};OSF.InitializationHelper.prototype.initWebDialog=function(n){if(n.get_isDialog()){if(OSF.DDA.UI.ChildUI){var t=window.opener!=null;n.ui=new OSF.DDA.UI.ChildUI(t);t&&this.registerMessageReceivedEventForWindowDialog&&this.registerMessageReceivedEventForWindowDialog()}}else OSF.DDA.UI.ParentUI&&(n.ui=new OSF.DDA.UI.ParentUI,OfficeExt.Container&&OSF.DDA.DispIdHost.addAsyncMethods(n.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync]))};OSF.InitializationHelper.prototype.initWebAuth=function(n){OSF.DDA.Auth&&(n.auth=new OSF.DDA.Auth,OSF.DDA.DispIdHost.addAsyncMethods(n.auth,[OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]))};OSF.getClientEndPoint=function(){var n=OSF._OfficeAppFactory.getInitializationHelper();return n._webAppState.clientEndPoint};OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize=function(){var n=this,t,i;n._hostInfo.isDialog&&(window.focus(),t=document.querySelectorAll(n._tabbableElements),i=OSF.OUtil.focusToFirstTabbable(t,!1),i||(window.blur(),n._webAppState.focused=!1,n._webAppState.clientEndPoint&&n._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[n._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable])))};OSF.CommonUI={HostButtonBorderColor:"#a3bde3",HostButtonBackgroundColor:"#d5e1f2"},function(n){var u="ResponseTime",f="Message",i="SessionId",r="CorrelationId",t=!0,e=function(){function n(n){this._table=n;this._fields={}}return Object.defineProperty(n.prototype,"Fields",{get:function(){return this._fields},enumerable:t,configurable:t}),Object.defineProperty(n.prototype,"Table",{get:function(){return this._table},enumerable:t,configurable:t}),n.prototype.SerializeFields=function(){},n.prototype.SetSerializedField=function(n,t){typeof t!="undefined"&&t!==null&&(this._serializedFields[n]=t.toString())},n.prototype.SerializeRow=function(){var n=this;return n._serializedFields={},n.SetSerializedField("Table",n._table),n.SerializeFields(),JSON.stringify(n._serializedFields)},n}(),o,s,h,c,l;n.BaseUsageData=e;o=function(n){function u(){n.call(this,"AppActivated")}var e="IsFromWacAutomation",o="WacHostEnvironment",s="HostJSVersion",h="OfficeJSVersion",c="DocUrl",l="AppSizeHeight",a="AppSizeWidth",v="ClientId",y="HostVersion",p="Host",w="UserId",b="Browser",k="AssetId",d="AppURL",g="AppInstanceId",nt="AppId";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,nt,{get:function(){return this.Fields[nt]},set:function(n){this.Fields[nt]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,g,{get:function(){return this.Fields[g]},set:function(n){this.Fields[g]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,d,{get:function(){return this.Fields[d]},set:function(n){this.Fields[d]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,k,{get:function(){return this.Fields[k]},set:function(n){this.Fields[k]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,b,{get:function(){return this.Fields[b]},set:function(n){this.Fields[b]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,w,{get:function(){return this.Fields[w]},set:function(n){this.Fields[w]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,p,{get:function(){return this.Fields[p]},set:function(n){this.Fields[p]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,y,{get:function(){return this.Fields[y]},set:function(n){this.Fields[y]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,v,{get:function(){return this.Fields[v]},set:function(n){this.Fields[v]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,a,{get:function(){return this.Fields[a]},set:function(n){this.Fields[a]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,l,{get:function(){return this.Fields[l]},set:function(n){this.Fields[l]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,c,{get:function(){return this.Fields[c]},set:function(n){this.Fields[c]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(nt,n.AppId);n.SetSerializedField(g,n.AppInstanceId);n.SetSerializedField(d,n.AppURL);n.SetSerializedField(k,n.AssetId);n.SetSerializedField(b,n.Browser);n.SetSerializedField(w,n.UserId);n.SetSerializedField(p,n.Host);n.SetSerializedField(y,n.HostVersion);n.SetSerializedField(v,n.ClientId);n.SetSerializedField(a,n.AppSizeWidth);n.SetSerializedField(l,n.AppSizeHeight);n.SetSerializedField(f,n.Message);n.SetSerializedField(c,n.DocUrl);n.SetSerializedField(h,n.OfficeJSVersion);n.SetSerializedField(s,n.HostJSVersion);n.SetSerializedField(o,n.WacHostEnvironment);n.SetSerializedField(e,n.IsFromWacAutomation)},u}(e);n.AppActivatedUsageData=o;s=function(n){function f(){n.call(this,"ScriptLoad")}var e="StartTime",o="ScriptId";return __extends(f,n),Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t}),f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(o,n.ScriptId);n.SetSerializedField(e,n.StartTime);n.SetSerializedField(u,n.ResponseTime)},f}(e);n.ScriptLoadUsageData=s;h=function(n){function u(){n.call(this,"AppClosed")}var f="CloseMethod",e="OpenTime",o="AppSizeFinalHeight",s="AppSizeFinalWidth",h="FocusTime";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(h,n.FocusTime);n.SetSerializedField(s,n.AppSizeFinalWidth);n.SetSerializedField(o,n.AppSizeFinalHeight);n.SetSerializedField(e,n.OpenTime);n.SetSerializedField(f,n.CloseMethod)},u}(e);n.AppClosedUsageData=h;c=function(n){function f(){n.call(this,"APIUsage")}var e="ErrorType",o="Parameters",s="APIID",h="APIType";return __extends(f,n),Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(h,n.APIType);n.SetSerializedField(s,n.APIID);n.SetSerializedField(o,n.Parameters);n.SetSerializedField(u,n.ResponseTime);n.SetSerializedField(e,n.ErrorType)},f}(e);n.APIUsageUsageData=c;l=function(n){function u(){n.call(this,"AppInitialization")}var e="SuccessCode";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(e,n.SuccessCode);n.SetSerializedField(f,n.Message)},u}(e);n.AppInitializationUsageData=l}(OSFLog||(OSFLog={})),function(n){"use strict";function u(){OSF.Logger&&OSF.Logger.ulsEndpoint&&OSF.Logger.ulsEndpoint.loadProxyFrame()}function f(n,t,i){if(OSF.Logger&&OSF.Logger.ulsEndpoint){var r={traceLevel:n,message:t,flag:i,internalLog:!0},u=JSON.stringify(r);OSF.Logger.ulsEndpoint.writeLog(u)}}function e(){try{return new t}catch(n){return null}}var i,r,t;(function(n){n[n.info=0]="info";n[n.warning=1]="warning";n[n.error=2]="error"})(n.TraceLevel||(n.TraceLevel={}));i=n.TraceLevel,function(n){n[n.none=0]="none";n[n.flush=1]="flush"}(n.SendFlag||(n.SendFlag={}));r=n.SendFlag;n.allowUploadingData=u;n.sendLog=f;t=function(){function n(){var n=this,t=n;n.proxyFrame=null;n.telemetryEndPoint="https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html";n.buffer=[];n.proxyFrameReady=!1;OSF.OUtil.addEventListener(window,"message",function(n){return t.tellProxyFrameReady(n)});setTimeout(function(){t.loadProxyFrame()},3e3)}return n.prototype.writeLog=function(t){var i=this;i.proxyFrameReady===!0?i.proxyFrame.contentWindow.postMessage(t,n.telemetryOrigin):i.buffer.length<128&&i.buffer.push(t)},n.prototype.loadProxyFrame=function(){var n=this;n.proxyFrame==null&&(n.proxyFrame=document.createElement("iframe"),n.proxyFrame.setAttribute("style","display:none"),n.proxyFrame.setAttribute("src",n.telemetryEndPoint),document.head.appendChild(n.proxyFrame))},n.prototype.tellProxyFrameReady=function(t){var i=this,e=i,r,u,f;if(t.data==="ProxyFrameReadyToLog"){for(i.proxyFrameReady=!0,r=0;r40)&&(n=OSF.OUtil.Guid.generateNewGuid(),t.setValue(t.clientIDKey,n)),n},n.prototype.saveLog=function(n,t){var i=this,u=i.getValue(i.logIdSetKey);u=(u&&u.length>0?u+";":r)+n;i.setValue(i.logIdSetKey,u);i.setValue(n,t)},n.prototype.enumerateLog=function(n,t){var i=this,e=i.getValue(i.logIdSetKey),u,o,r,f;if(e){u=e.split(";");for(o in u)r=u[o],f=i.getValue(r),f&&(n&&n(r,f),t&&i.remove(r));t&&i.remove(i.logIdSetKey)}},n.prototype.getValue=function(n){var t=OSF.OUtil.getLocalStorage(),i=r;return t&&(i=t.getItem(n)),i},n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)},n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}},n}(),o=function(){function n(){}return n.prototype.LogData=function(n){OSF.Logger&&(OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n.SerializeRow(),OSF.Logger.SendFlag.none),OSFAriaLogger.AriaLogger.getInstance().logData(n))},n.prototype.LogRawData=function(n){if(OSF.Logger){OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n,OSF.Logger.SendFlag.none);try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(n))}catch(t){}}},n}();n.initialize=v;n.onAppActivated=y;n.onScriptDone=p;n.onCallDone=w;n.onMethodDone=b;n.onPropertyDone=k;n.onEventDone=d;n.onRegisterDone=g;n.onAppClosed=nt;n.setOsfControlAppCorrelationId=tt;n.doAppInitializationLogging=c;n.logAppCommonMessage=it;n.logAppException=rt;OSF.AppTelemetry=n}(OSFAppTelemetry||(OSFAppTelemetry={}));Microsoft.Office.WebExtension.TableData=function(n,t){function i(n){if(n==null||n==undefined)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(n,2);t<2;t++)n=[n];return n}catch(i){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(n){t=i(n)}},rows:{get:function(){return n},set:function(t){n=t==null||OSF.OUtil.isArray(t)&&t.length==0?[]:i(t)}}});this.headers=t;this.rows=n};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(n){return new Microsoft.Office.WebExtension.TableData(n[OSF.DDA.TableDataProperties.TableRows],n[OSF.DDA.TableDataProperties.TableHeaders])};Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var n=null;return{findArrayDimensionality:function(n){if(OSF.OUtil.isArray(n)){for(var t=0,i=0;i0)for(r in i)if(i[r]===t)return!0;return!1},hasObjectEventHandler:function(n,t,i){var f=this._objectEventHandlers[n],r,u;if(f!=null)for(r=f[t],u=0;r!=null&&u0)for(r=0;r0?(this._eventHandlers[n]=[],!0):!1},clearObjectEventHandlers:function(n,t){return this._objectEventHandlers[n]!=null&&this._objectEventHandlers[n][t]!=null?(this._objectEventHandlers[n][t]=[],!0):!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},getObjectEventHandlerCount:function(n,t){return this._objectEventHandlers[n]==null||this._objectEventHandlers[n][t]==null?0:this._objectEventHandlers[n][t].length},fireEvent:function(n){var t,i,r;if(n.type==undefined)return!1;if(t=n.type,t&&this._eventHandlers[t]){i=this._eventHandlers[t];for(r in i)i[r](n);return!0}else return!1},fireObjectEvent:function(n,t){var i,f,r,u;if(t.type==undefined)return!1;if(i=t.type,i&&this._objectEventHandlers[i]&&(f=this._objectEventHandlers[i],r=f[n],r!=null)){for(u=0;u0)){for(r=t[0];i.length>0;)u=i.shift(),r(u);return!0}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var f="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(n,i[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]=="outlook"||OSF._OfficeAppFactory.getHostInfo()[f]=="outlookwebapp")r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i),t.initialize(r.initialData),t.setCurrentItemNumber(r.itemNumber.itemNumber);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DDA.DataPartProperties={Id:Microsoft.Office.WebExtension.Parameters.Id,BuiltIn:"DataPartBuiltIn"};OSF.DDA.DataNodeProperties={Handle:"DataNodeHandle",BaseName:"DataNodeBaseName",NamespaceUri:"DataNodeNamespaceUri",NodeType:"DataNodeType"};OSF.DDA.DataNodeEventProperties={OldNode:"OldNode",NewNode:"NewNode",NextSiblingNode:"NextSiblingNode",InUndoRedo:"InUndoRedo"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{DataPartProperties:"DataPartProperties",DataNodeProperties:"DataNodeProperties"});OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{DataPartList:"DataPartList",DataNodeList:"DataNodeList"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.DataPartList,OSF.DDA.PropertyDescriptors.DataPartProperties);OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.DataNodeList,OSF.DDA.PropertyDescriptors.DataNodeProperties);OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DataNodeInsertedEvent:"DataNodeInsertedEvent",DataNodeReplacedEvent:"DataNodeReplacedEvent",DataNodeDeletedEvent:"DataNodeDeletedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DataNodeDeleted:"nodeDeleted",DataNodeInserted:"nodeInserted",DataNodeReplaced:"nodeReplaced"});OSF.DDA.CustomXmlParts=function(){this._eventDispatches=[];var n=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[n.AddDataPartAsync,n.GetDataPartByIdAsync,n.GetDataPartsByNameSpaceAsync])};OSF.DDA.CustomXmlPart=function(n,t,i){var u,e,r,f;OSF.OUtil.defineEnumerableProperties(this,{builtIn:{value:i},id:{value:t},namespaceManager:{value:new OSF.DDA.CustomXmlPrefixMappings(t)}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.DeleteDataPartAsync,u.GetPartNodesAsync,u.GetPartXmlAsync]);e=n._eventDispatches;r=e[t];r||(f=Microsoft.Office.WebExtension.EventType,r=new OSF.EventDispatch([f.DataNodeDeleted,f.DataNodeInserted,f.DataNodeReplaced]),e[t]=r);OSF.DDA.DispIdHost.addEventSupport(this,r)};OSF.DDA.CustomXmlPrefixMappings=function(n){var t=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[t.AddDataPartNamespaceAsync,t.GetDataPartNamespaceAsync,t.GetDataPartPrefixAsync],n)};OSF.DDA.CustomXmlNode=function(n,t,i,r){OSF.OUtil.defineEnumerableProperties(this,{baseName:{value:r},namespaceUri:{value:i},nodeType:{value:t}});var u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.GetRelativeNodesAsync,u.GetNodeValueAsync,u.GetNodeXmlAsync,u.SetNodeValueAsync,u.SetNodeXmlAsync,u.GetNodeTextAsync,u.SetNodeTextAsync],n)};OSF.DDA.NodeInsertedEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DataNodeInserted},newNode:{value:n},inUndoRedo:{value:t}})};OSF.DDA.NodeReplacedEventArgs=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DataNodeReplaced},oldNode:{value:n},newNode:{value:t},inUndoRedo:{value:i}})};OSF.DDA.NodeDeletedEventArgs=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DataNodeDeleted},oldNode:{value:n},oldNextSibling:{value:t},inUndoRedo:{value:i}})};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureDataNode=function(n){if(n)return new OSF.DDA.CustomXmlNode(n[OSF.DDA.DataNodeProperties.Handle],n[OSF.DDA.DataNodeProperties.NodeType],n[OSF.DDA.DataNodeProperties.NamespaceUri],n[OSF.DDA.DataNodeProperties.BaseName])};OSF.DDA.OMFactory.manufactureDataPart=function(n,t){return new OSF.DDA.CustomXmlPart(t,n[OSF.DDA.DataPartProperties.Id],n[OSF.DDA.DataPartProperties.BuiltIn])};OSF.DDA.AsyncMethodNames.addNames({AddDataPartAsync:"addAsync",GetDataPartByIdAsync:"getByIdAsync",GetDataPartsByNameSpaceAsync:"getByNamespaceAsync",DeleteDataPartAsync:"deleteAsync",GetPartNodesAsync:"getNodesAsync",GetPartXmlAsync:"getXmlAsync",AddDataPartNamespaceAsync:"addNamespaceAsync",GetDataPartNamespaceAsync:"getNamespaceAsync",GetDataPartPrefixAsync:"getPrefixAsync",GetRelativeNodesAsync:"getNodesAsync",GetNodeValueAsync:"getNodeValueAsync",GetNodeXmlAsync:"getXmlAsync",SetNodeValueAsync:"setNodeValueAsync",SetNodeXmlAsync:"setXmlAsync",GetNodeTextAsync:"getTextAsync",SetNodeTextAsync:"setTextAsync"}),function(){function r(n){return OSF.DDA.OMFactory.manufactureDataPart(n,Microsoft.Office.WebExtension.context.document.customXmlParts)}function e(n){return OSF.DDA.OMFactory.manufactureDataNode(n)}function i(n){var t=n[Microsoft.Office.WebExtension.Parameters.Data];return t==undefined?null:t}function u(n){return n.id}function f(n,t){return t}function t(n,t){return t}var n="string";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddDataPartAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Xml,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartsByNameSpaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.DataPartList],r)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteDataPartAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:u}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetPartNodesAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.XPath,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:u}],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.DataNodeList],e)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetPartXmlAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:u}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddDataPartNamespaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Prefix,types:[n]},{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:f}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartNamespaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Prefix,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:f}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartPrefixAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:f}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetRelativeNodesAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.XPath,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.DataNodeList],e)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetNodeValueAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetNodeXmlAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetNodeValueAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetNodeXmlAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Xml,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetNodeTextAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetNodeTextAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Text,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}]})}();OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.DDA.Marshaling.CustomXmlPartsKeys={Id:"id",Namespace:"namespace",Xml:"xml",XPath:"xpath",Prefix:"prefix"};OSF.DDA.Marshaling.DataPartProperties={Id:"id",BuiltIn:"DataPartBuiltIn"};OSF.DDA.Marshaling.PropertyDescriptors={DataPartProperties:"DataPartProperties",DataNodeProperties:"DataNodeProperties"};OSF.DDA.Marshaling.DataNodeProperties={Handle:"DataNodeHandle",BaseName:"DataNodeBaseName",NamespaceUri:"DataNodeNamespaceUri",NodeType:"DataNodeType"};OSF.DDA.Marshaling.ListDescriptors={DataPartList:"DataPartList",DataNodeList:"DataNodeList"};OSF.DDA.Marshaling.DataNodeEventProperties={OldNode:"OldNode",NewNode:"NewNode",NextSiblingNode:"NextSiblingNode",InUndoRedo:"InUndoRedo"};OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.DataPartProperties,fromHost:[{name:OSF.DDA.DataPartProperties.Id,value:OSF.DDA.Marshaling.DataPartProperties.Id},{name:OSF.DDA.DataPartProperties.BuiltIn,value:OSF.DDA.Marshaling.DataPartProperties.BuiltIn}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.DataNodeProperties,fromHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle},{name:OSF.DDA.DataNodeProperties.BaseName,value:OSF.DDA.Marshaling.DataNodeProperties.BaseName},{name:OSF.DDA.DataNodeProperties.NamespaceUri,value:OSF.DDA.Marshaling.DataNodeProperties.NamespaceUri},{name:OSF.DDA.DataNodeProperties.NodeType,value:OSF.DDA.Marshaling.DataNodeProperties.NodeType}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DataNodeInsertedEvent,fromHost:[{name:OSF.DDA.DataNodeEventProperties.InUndoRedo,value:OSF.DDA.Marshaling.DataNodeEventProperties.InUndoRedo},{name:OSF.DDA.DataNodeEventProperties.NewNode,value:OSF.DDA.Marshaling.DataNodeEventProperties.NewNode}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DataNodeReplacedEvent,fromHost:[{name:OSF.DDA.DataNodeEventProperties.InUndoRedo,value:OSF.DDA.Marshaling.DataNodeEventProperties.InUndoRedo},{name:OSF.DDA.DataNodeEventProperties.OldNode,value:OSF.DDA.Marshaling.DataNodeEventProperties.OldNode},{name:OSF.DDA.DataNodeEventProperties.NewNode,value:OSF.DDA.Marshaling.DataNodeEventProperties.NewNode}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DataNodeDeletedEvent,fromHost:[{name:OSF.DDA.DataNodeEventProperties.InUndoRedo,value:OSF.DDA.Marshaling.DataNodeEventProperties.InUndoRedo},{name:OSF.DDA.DataNodeEventProperties.OldNode,value:OSF.DDA.Marshaling.DataNodeEventProperties.OldNode},{name:OSF.DDA.DataNodeEventProperties.NextSiblingNode,value:OSF.DDA.Marshaling.DataNodeEventProperties.NextSiblingNode}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.DataNodeEventProperties.OldNode,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataNodeProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.DataNodeEventProperties.NewNode,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataNodeProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.DataNodeEventProperties.NextSiblingNode,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataNodeProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddDataPartMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataPartProperties,value:OSF.DDA.Marshaling.PropertyDescriptors.DataPartProperties}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Xml,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Xml}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartByIdMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataPartProperties,value:OSF.DDA.Marshaling.PropertyDescriptors.DataPartProperties}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Id}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartsByNamespaceMethod,fromHost:[{name:OSF.DDA.ListDescriptors.DataPartList,value:OSF.DDA.Marshaling.ListDescriptors.DataPartList}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Namespace}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartXmlMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Id}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartNodesMethod,fromHost:[{name:OSF.DDA.ListDescriptors.DataNodeList,value:OSF.DDA.Marshaling.ListDescriptors.DataNodeList}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Id},{name:Microsoft.Office.WebExtension.Parameters.XPath,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.XPath}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidDeleteDataPartMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Id}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodeValueMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodeXmlMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodeTextMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodesMethod,fromHost:[{name:OSF.DDA.ListDescriptors.DataNodeList,value:OSF.DDA.Marshaling.ListDescriptors.DataNodeList}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle},{name:Microsoft.Office.WebExtension.Parameters.XPath,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.XPath}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetDataNodeValueMethod,toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle},{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetDataNodeXmlMethod,toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle},{name:Microsoft.Office.WebExtension.Parameters.Xml,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Xml}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetDataNodeTextMethod,toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle},{name:Microsoft.Office.WebExtension.Parameters.Text,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Text}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddDataNamespaceMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.DataPartProperties.Id},{name:Microsoft.Office.WebExtension.Parameters.Prefix,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Prefix},{name:Microsoft.Office.WebExtension.Parameters.Namespace,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Namespace}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataUriByPrefixMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.DataPartProperties.Id},{name:Microsoft.Office.WebExtension.Parameters.Prefix,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Prefix}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPrefixByUriMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.DataPartProperties.Id},{name:Microsoft.Office.WebExtension.Parameters.Namespace,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Namespace}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDataNodeAddedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DataNodeInsertedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDataNodeReplacedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DataNodeReplacedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDataNodeDeletedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DataNodeDeletedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.AsyncMethodNames.addNames({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync"}),function(){function r(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&r&&(r[OSF.DDA.TableDataProperties.TableRows]!=undefined||r[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(r=OSF.DDA.OMFactory.manufactureTableData(r)),r=OSF.DDA.DataCoercion.coerceData(r,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),r==undefined?null:r}var i=!1,n="boolean",t="number";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,"enum":Microsoft.Office.WebExtension.CoercionType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}}],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object",t,n]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[t,n],defaultValue:i}}],privateStateCallbacks:[]})}();OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.GetData,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:"BindingId"},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:"CoerceType"},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:"ValueFormat"},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:"FilterType"},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:"Rows"},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:"Columns"},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:"StartRow"},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:"StartCol"},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:"RowCount"},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:"ColCount"}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.SetData,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:"BindingId"},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:"CoerceType"},{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:"Rows"},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:"Columns"},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:"StartRow"},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:"StartCol"},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:"ImageLeft"},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:"ImageTop"},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:"ImageWidth"},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:"ImageHeight"}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.GetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",RefreshingSettings:"refreshingSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(n){var r={},i,t;for(i in n){t=n[i];try{t=JSON?JSON.stringify(t,function(n,t){return OSF.OUtil.isDate(this[n])?OSF.DDA.SettingsManager.DateJSONPrefix+this[n].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix:t}):Sys.Serialization.JavaScriptSerializer.serialize(t);r[i]=t}catch(u){}}return r},deserializeSettings:function(n){var r={},i,t;n=n||{};for(i in n){t=n[i];try{t=JSON?JSON.parse(t,function(n,t){var i;return typeof t=="string"&&t&&t.length>6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix&&(i=new Date(parseInt(t.slice(5,-1))),i)?i:t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,!0);r[i]=t}catch(u){}}return r}};OSF.DDA.Settings=function(n){var t="name",i;n=n||{};i=function(n){var i=OSF.OUtil.getSessionStorage(),t,r;i&&(t=OSF.DDA.SettingsManager.serializeSettings(n),r=JSON?JSON.stringify(t):Sys.Serialization.JavaScriptSerializer.serialize(t),i.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),r))};OSF.OUtil.defineEnumerableProperties(this,{get:{value:function(i){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]),r;if(u)throw u;return r=n[i],typeof r=="undefined"?null:r}},set:{value:function(r,u){var f=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1},{name:"value",mayBeNull:!0}]);if(f)throw f;n[r]=u;i(n)}},remove:{value:function(r){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]);if(u)throw u;delete n[r];i(n)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],n)};OSF.DDA.RefreshableSettings=function(n){OSF.DDA.RefreshableSettings.uber.constructor.call(this,n);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],n);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:n}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(n,t){return t}}],onSucceeded:function(n,t,i){var f=n[OSF.DDA.SettingsManager.SerializedSettings],u=OSF.DDA.SettingsManager.deserializeSettings(f),e=i[OSF.DDA.SettingsManager.RefreshingSettings];for(var r in e)t.remove(r);for(r in u)t.set(r,u[r]);return t}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(n,t){return OSF.DDA.SettingsManager.serializeSettings(t)}}]});OSF.DDA.WAC.SettingsTranslator=function(){var n=0,t=1;return{read:function(i){var u={},f=i.Settings,e,r;for(e in f)r=f[e],u[r[n]]=r[t];return u},write:function(i){var f=[],u,r;for(u in i)r=[],r[n]=u,r[t]=i[u],f.push(r);return f}}}();OSF.DDA.WAC.Delegate.ParameterMap.setDynamicType(OSF.DDA.SettingsManager.SerializedSettings,{toHost:OSF.DDA.WAC.SettingsTranslator.write,fromHost:OSF.DDA.WAC.SettingsTranslator.read});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.SettingsRequest,toHost:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:"OverwriteIfStale"},{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.WAC.UniqueArguments.Properties}],invertible:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.WAC.UniqueArguments.Properties}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SettingsRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"});OSF.DDA.DocumentSelectionChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:n}})};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDeleted:"objectDeleted"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectSelectionChanged:"objectSelectionChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDataChanged:"objectDataChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ContentControlAdded:"contentControlAdded"});OSF.DDA.ObjectEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:n},object:{value:t}})};OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent});OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(n){OSF.OUtil.defineEnumerableProperties(this,{url:{value:n[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(n){return new Microsoft.Office.WebExtension.FileProperties(n)}});OSF.OUtil.setNamespace("Marshaling",OSF.DDA),function(n){var t="Properties";n[n[t]=0]=t;n[n.Url=1]="Url"}(OSF_DDA_Marshaling_FilePropertiesKeys||(OSF_DDA_Marshaling_FilePropertiesKeys={}));OSF.DDA.Marshaling.FilePropertiesKeys=OSF_DDA_Marshaling_FilePropertiesKeys;OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,fromHost:[{name:OSF.DDA.FilePropertiesDescriptor.Url,value:OSF.DDA.Marshaling.FilePropertiesKeys.Url}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:OSF.DDA.Marshaling.FilePropertiesKeys.Properties}]});Microsoft.Office.WebExtension.FileType={Text:"text",Compressed:"compressed",Pdf:"pdf"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FileProperties:"FileProperties",FileSliceProperties:"FileSliceProperties"});OSF.DDA.FileProperties={Handle:"FileHandle",FileSize:"FileSize",SliceSize:Microsoft.Office.WebExtension.Parameters.SliceSize};OSF.DDA.File=function(n,t,i){var r,u;OSF.OUtil.defineEnumerableProperties(this,{size:{value:t},sliceCount:{value:Math.ceil(t/i)}});r={};r[OSF.DDA.FileProperties.Handle]=n;r[OSF.DDA.FileProperties.SliceSize]=i;u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.GetDocumentCopyChunkAsync,u.ReleaseDocumentCopyAsync],r)};OSF.DDA.FileSliceOffset="fileSliceoffset";OSF.DDA.AsyncMethodNames.addNames({GetDocumentCopyAsync:"getFileAsync",GetDocumentCopyChunkAsync:"getSliceAsync",ReleaseDocumentCopyAsync:"closeAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FileType,"enum":Microsoft.Office.WebExtension.FileType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:{types:["number"],defaultValue:4194304}}],checkCallArgs:function(n){var t=n[Microsoft.Office.WebExtension.Parameters.SliceSize];if(t<=0||t>4194304)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return n},onSucceeded:function(n,t,i){return new OSF.DDA.File(n[OSF.DDA.FileProperties.Handle],n[OSF.DDA.FileProperties.FileSize],i[Microsoft.Office.WebExtension.Parameters.SliceSize])}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(n,t){return t[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(r<0||r>=t.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;return n[OSF.DDA.FileSliceOffset]=parseInt((r*i[OSF.DDA.FileProperties.SliceSize]).toString()),n},onSucceeded:function(n,t,i){var r={};return OSF.OUtil.defineEnumerableProperties(r,{data:{value:n[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:i[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:n[OSF.DDA.FileProperties.SliceSize]}}),r}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}}]});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("File",OSF.DDA.Marshaling),function(n){var t="FileSize";n[n.Handle=0]="Handle";n[n[t]=1]=t}(OSF_DDA_Marshaling_File_FilePropertiesKeys||(OSF_DDA_Marshaling_File_FilePropertiesKeys={}));OSF.DDA.Marshaling.File.FilePropertiesKeys=OSF_DDA_Marshaling_File_FilePropertiesKeys,function(n){var t="SliceSize";n[n.Data=0]="Data";n[n[t]=1]=t}(OSF_DDA_Marshaling_File_SlicePropertiesKeys||(OSF_DDA_Marshaling_File_SlicePropertiesKeys={}));OSF.DDA.Marshaling.File.SlicePropertiesKeys=OSF_DDA_Marshaling_File_SlicePropertiesKeys,function(n){var t="Compressed";n[n.Text=0]="Text";n[n[t]=1]=t;n[n.Pdf=2]="Pdf"}(OSF_DDA_Marshaling_File_FileType||(OSF_DDA_Marshaling_File_FileType={}));OSF.DDA.Marshaling.File.FileType=OSF_DDA_Marshaling_File_FileType,function(n){var t="SliceIndex",i="SliceSize",r="FileType";n[n[r]=0]=r;n[n[i]=1]=i;n[n.Handle=2]="Handle";n[n[t]=3]=t}(OSF_DDA_Marshaling_File_ParameterKeys||(OSF_DDA_Marshaling_File_ParameterKeys={}));OSF.DDA.Marshaling.File.ParameterKeys=OSF_DDA_Marshaling_File_ParameterKeys;OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FileProperties);OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FileSliceProperties);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.FilePropertiesKeys.Handle},{name:OSF.DDA.FileProperties.FileSize,value:OSF.DDA.Marshaling.File.FilePropertiesKeys.FileSize}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.Marshaling.File.SlicePropertiesKeys.Data},{name:OSF.DDA.FileProperties.SliceSize,value:OSF.DDA.Marshaling.File.SlicePropertiesKeys.SliceSize}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:OSF.DDA.Marshaling.File.FileType.Text},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:OSF.DDA.Marshaling.File.FileType.Compressed},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:OSF.DDA.Marshaling.File.FileType.Pdf}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:OSF.DDA.Marshaling.File.ParameterKeys.FileType},{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:OSF.DDA.Marshaling.File.ParameterKeys.SliceSize}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.ParameterKeys.Handle},{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,value:OSF.DDA.Marshaling.File.ParameterKeys.SliceIndex}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.ParameterKeys.Handle}]});OSF.DDA.AsyncMethodNames.addNames({ExecuteRichApiRequestAsync:"executeRichApiRequestAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[]});OSF.OUtil.setNamespace("RichApi",OSF.DDA);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidExecuteRichApiRequestMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.ArrayData}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}]});Microsoft.Office.WebExtension.BindingType={Table:"table",Text:"text",Matrix:"matrix"};OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType};OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{BindingList:"BindingList"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{Subset:"subset",BindingProperties:"BindingProperties"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList,OSF.DDA.PropertyDescriptors.BindingProperties);OSF.DDA.BindingPromise=function(n,t){this._id=n;OSF.OUtil.defineEnumerableProperty(this,"onFail",{get:function(){return t},set:function(n){var i=typeof n;if(i!="undefined"&&i!="function")throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,i);t=n}})};OSF.DDA.BindingPromise.prototype={_fetch:function(n){var t=this,i;return t.binding?n&&n(t.binding):t._binding||(i=t,Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(t._id,function(t){t.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded?(OSF.OUtil.defineEnumerableProperty(i,"binding",{value:t.value}),n&&n(i.binding)):i.onFail&&i.onFail(t)})),t},getDataAsync:function(){var n=arguments;return this._fetch(function(t){t.getDataAsync.apply(t,n)}),this},setDataAsync:function(){var n=arguments;return this._fetch(function(t){t.setDataAsync.apply(t,n)}),this},addHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.addHandlerAsync.apply(t,n)}),this},removeHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.removeHandlerAsync.apply(t,n)}),this}};OSF.DDA.BindingFacade=function(n){this._eventDispatches=[];OSF.OUtil.defineEnumerableProperty(this,"document",{value:n});var t=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[t.AddFromSelectionAsync,t.AddFromNamedItemAsync,t.GetAllAsync,t.GetByIdAsync,t.ReleaseByIdAsync])};OSF.DDA.UnknownBinding=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}})};OSF.DDA.Binding=function(n,t){var r,u,i,f;OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}});r=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[r.GetDataAsync,r.SetDataAsync]);u=Microsoft.Office.WebExtension.EventType;i=t.bindings._eventDispatches;i[n]||(i[n]=new OSF.EventDispatch([u.BindingSelectionChanged,u.BindingDataChanged]));f=i[n];OSF.DDA.DispIdHost.addEventSupport(this,f)};OSF.DDA.generateBindingId=function(){return"UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+(new Date).getTime()};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureBinding=function(n,t){var r=n[OSF.DDA.BindingProperties.Id],u=n[OSF.DDA.BindingProperties.RowCount],f=n[OSF.DDA.BindingProperties.ColumnCount],s=n[OSF.DDA.BindingProperties.HasHeaders],i,e,o;switch(n[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:i=new OSF.DDA.TextBinding(r,t);break;case Microsoft.Office.WebExtension.BindingType.Matrix:i=new OSF.DDA.MatrixBinding(r,t,u,f);break;case Microsoft.Office.WebExtension.BindingType.Table:e=function(){return OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument};o=e()&&OSF.DDA.ExcelTableBinding?OSF.DDA.ExcelTableBinding:OSF.DDA.TableBinding;i=new o(r,t,u,f,s);break;default:i=new OSF.DDA.UnknownBinding(r,t)}return i};OSF.DDA.AsyncMethodNames.addNames({AddFromSelectionAsync:"addFromSelectionAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:"getByIdAsync",ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync"}),function(){function u(n){return OSF.DDA.OMFactory.manufactureBinding(n,Microsoft.Office.WebExtension.context.document)}function f(n){return n.id}function e(n,t,i){var u=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&u&&(u[OSF.DDA.TableDataProperties.TableRows]!=undefined||u[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(u=OSF.DDA.OMFactory.manufactureTableData(u)),u=OSF.DDA.DataCoercion.coerceData(u,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),u==undefined?r:u}var t="number",i="object",n="string",r=null;OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:[n]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return!0}}],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.BindingList],u)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n,t,i){var r=i[Microsoft.Office.WebExtension.Parameters.Id];delete t._eventDispatches[r]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n,t){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&n[Microsoft.Office.WebExtension.Parameters.RowCount]==0&&n[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn],delete n[Microsoft.Office.WebExtension.Parameters.RowCount],delete n[Microsoft.Office.WebExtension.Parameters.ColumnCount]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]||n[Microsoft.Office.WebExtension.Parameters.RowCount]||n[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[n,i,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}]})}();OSF.DDA.TextBinding=function(n,t){OSF.DDA.TextBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperty(this,"type",{value:Microsoft.Office.WebExtension.BindingType.Text})};OSF.OUtil.extend(OSF.DDA.TextBinding,OSF.DDA.Binding);OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{TableDataProperties:"TableDataProperties"});OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};OSF.DDA.TableBinding=function(n,t,i,r,u){OSF.DDA.TableBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:i?i:0},columnCount:{value:r?r:0},hasHeaders:{value:u?u:!1}});var f=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[f.AddRowsAsync,f.AddColumnsAsync,f.DeleteAllDataValuesAsync])};OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync"}),function(){function n(n){return n.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]})}();OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.MatrixBinding=function(n,t,i,r){OSF.DDA.MatrixBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Matrix},rowCount:{value:i?i:0},columnCount:{value:r?r:0}})};OSF.OUtil.extend(OSF.DDA.MatrixBinding,OSF.DDA.Binding);OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.BindingProperties);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.BindingRequest,toHost:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,value:"ItemName"},{name:Microsoft.Office.WebExtension.Parameters.Id,value:"BindingId"},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:"BindingType"},{name:Microsoft.Office.WebExtension.Parameters.PromptText,value:"PromptText"},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:"Columns"},{name:Microsoft.Office.WebExtension.Parameters.SampleData,value:"SampleData"},{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:"FailOnCollision"}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.BindingType,toHost:[{name:Microsoft.Office.WebExtension.BindingType.Text,value:2},{name:Microsoft.Office.WebExtension.BindingType.Matrix,value:3},{name:Microsoft.Office.WebExtension.BindingType.Table,value:1}],invertible:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.BindingProperties,fromHost:[{name:OSF.DDA.BindingProperties.Id,value:"Name"},{name:OSF.DDA.BindingProperties.Type,value:"BindingType"},{name:OSF.DDA.BindingProperties.RowCount,value:"RowCount"},{name:OSF.DDA.BindingProperties.ColumnCount,value:"ColCount"},{name:OSF.DDA.BindingProperties.HasHeaders,value:"HasHeaders"}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:0}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod,fromHost:[{name:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod,fromHost:[{name:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseBindingMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingMethod,fromHost:[{name:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAllBindingsMethod,fromHost:[{name:OSF.DDA.ListDescriptors.BindingList,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.GetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{BindingSelectionChanged:"bindingSelectionChanged",BindingDataChanged:"bindingDataChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{BindingSelectionChangedEvent:"BindingSelectionChangedEvent"});OSF.DDA.BindingSelectionChangedEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingSelectionChanged},binding:{value:n}});for(var i in t)OSF.OUtil.defineEnumerableProperty(this,i,{value:t[i]})};OSF.DDA.BindingDataChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingDataChanged},binding:{value:n}})};OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.BindingSelectionChangedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.WAC.UniqueArguments.BindingEventSource},{name:OSF.DDA.PropertyDescriptors.Subset,value:OSF.DDA.PropertyDescriptors.Subset}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingDataChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.WAC.UniqueArguments.BindingEventSource}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddRowsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.AddRowsColumns,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddColumnsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.AddRowsColumns,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearAllRowsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.AddRowsColumns,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:"BindingId"},{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.Subset,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:"StartRow"},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:"StartCol"},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:"RowCount"},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:"ColCount"}]});Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"};Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"};Microsoft.Office.WebExtension.Index={First:"first",Last:"last",Next:"next",Previous:"previous"};OSF.DDA.AsyncMethodNames.addNames({GoToByIdAsync:"goToByIdAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GoToByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string","number"]},{name:Microsoft.Office.WebExtension.Parameters.GoToType,"enum":Microsoft.Office.WebExtension.GoToType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:{"enum":Microsoft.Office.WebExtension.SelectionMode,defaultValue:Microsoft.Office.WebExtension.SelectionMode.Default}}]});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.DDA.Marshaling.NavigationKeys={NavigationRequest:"DdaGoToByIdMethod",Id:"Id",GoToType:"GoToType",SelectionMode:"SelectionMode"},function(n){var t="NamedItem";n[n.Binding=0]="Binding";n[n[t]=1]=t;n[n.Slide=2]="Slide";n[n.Index=3]="Index"}(OSF_DDA_Marshaling_GoToType||(OSF_DDA_Marshaling_GoToType={}));OSF.DDA.Marshaling.GoToType=OSF_DDA_Marshaling_GoToType,function(n){var t="Selected";n[n.Default=0]="Default";n[n[t]=1]=t;n[n.None=2]="None"}(OSF_DDA_Marshaling_SelectionMode||(OSF_DDA_Marshaling_SelectionMode={}));OSF.DDA.Marshaling.SelectionMode=OSF_DDA_Marshaling_SelectionMode;OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.Marshaling.NavigationKeys.NavigationRequest);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.Marshaling.NavigationKeys.NavigationRequest,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.NavigationKeys.Id},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:OSF.DDA.Marshaling.NavigationKeys.GoToType},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:OSF.DDA.Marshaling.NavigationKeys.SelectionMode}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:OSF.DDA.Marshaling.GoToType.Binding},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:OSF.DDA.Marshaling.GoToType.NamedItem},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:OSF.DDA.Marshaling.GoToType.Slide},{name:Microsoft.Office.WebExtension.GoToType.Index,value:OSF.DDA.Marshaling.GoToType.Index}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:OSF.DDA.Marshaling.SelectionMode.Default},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:OSF.DDA.Marshaling.SelectionMode.Selected},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:OSF.DDA.Marshaling.SelectionMode.None}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:OSF.DDA.Marshaling.NavigationKeys.NavigationRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]}),function(n){var t;(function(t){var u=function(){function r(){var n=this,t=n;n._pseudoDocument=u;n._eventDispatch=u;n._processAppCommandInvocation=function(n){var i=t._verifyManifestCallback(n.callbackName),r;if(i.errorCode!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){t._invokeAppCommandCompletedMethod(n.appCommandId,i.errorCode,"");return}r=t._constructEventObjectForCallback(n);r?window.setTimeout(function(){i.callback(r)},0):t._invokeAppCommandCompletedMethod(n.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"")}}var f="object",e="string",u=null;return r.initializeOsfDda=function(){OSF.DDA.AsyncMethodNames.addNames({AppCommandInvocationCompletedAsync:"appCommandInvocationCompletedAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[e]},{name:Microsoft.Office.WebExtension.Parameters.Status,types:["number"]},{name:Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData,types:[e]}]});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{AppCommandInvokedEvent:"AppCommandInvokedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppCommandInvoked:"appCommandInvoked"});OSF.OUtil.setNamespace("AppCommand",OSF.DDA);OSF.DDA.AppCommand.AppCommandInvokedEventArgs=n.AppCommand.AppCommandInvokedEventArgs},r.prototype.initializeAndChangeOnce=function(n){var i=this,r;t.registerDdaFacade();i._pseudoDocument={};OSF.DDA.DispIdHost.addAsyncMethods(i._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync]);i._eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked]);r=function(t){n&&(t.status=="succeeded"?n(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):n(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError))};OSF.DDA.DispIdHost.addEventSupport(i._pseudoDocument,i._eventDispatch);i._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,i._processAppCommandInvocation,r)},r.prototype._verifyManifestCallback=function(n){var s="function",e={callback:u,errorCode:OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback},o;n=n.trim();try{for(var t=n.split("."),i=window,r=0;r100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99),n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1),n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99),n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("Dialog",OSF.DDA.Marshaling);OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys={MessageType:"messageType",MessageContent:"messageContent"};OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys={MessageType:"messageType",MessageContent:"messageContent"};OSF.DDA.Marshaling.MessageParentKeys={MessageToParent:"messageToParent"};OSF.DDA.Marshaling.DialogNotificationShownEventType={DialogNotificationShown:"dialogNotificationShown"};OSF.DDA.Marshaling.SendMessageKeys={MessageContent:"messageContent"},function(n){var t;(function(n){function r(n){switch(n){case t.Excel:case t.Word:case t.PowerPoint:case t.Outlook:return new i;default:return new i}return null}var t={Excel:"excel",Word:"word",PowerPoint:"powerpoint",Outlook:"outlook"},i;n.getDialogCssManager=r;i=function(){function n(){var r="height: 100px",t="font-size: 14px",i="font-family: Segoe UI,Arial,Verdana,sans-serif",u="margin: 20px 14px",f="width: 100%",e="position: absolute",n=this;n.overlayElementCSS=[e,"top: 0","left: 0",f,"height: 100%","background-color: rgba(198, 198, 198, 0.5)","z-index: 99998"];n.dialogNotificationPanelCSS=[f,"height: 190px",e,"z-index: 99999","background-color: rgba(255, 255, 255, 1)","left: 0px","top: 50%","margin-top: -95px"];n.newWindowNotificationTextPanelCSS=[u,i,t,r,"line-height: 100px"];n.newWindowNotificationTextSpanCSS=["display: inline-block","line-height: normal","vertical-align: middle"];n.crossZoneNotificationTextPanelCSS=[u,i,t,r];n.dialogNotificationButtonPanelCSS="margin:0px 9px";n.buttonStyleCSS=["text-align: center","width: 70px","height: 25px",t,i,"margin: 0px 5px","border-width: 1px","border-style: solid"]}var t=";";return n.prototype.getOverlayElementCSS=function(){return this.overlayElementCSS.join(t)},n.prototype.getDialogNotificationPanelCSS=function(){return this.dialogNotificationPanelCSS.join(t)},n.prototype.getNewWindowNotificationTextPanelCSS=function(){return this.newWindowNotificationTextPanelCSS.join(t)},n.prototype.getNewWindowNotificationTextSpanCSS=function(){return this.newWindowNotificationTextSpanCSS.join(t)},n.prototype.getCrossZoneNotificationTextPanelCSS=function(){return this.crossZoneNotificationTextPanelCSS.join(t)},n.prototype.getDialogNotificationButtonPanelCSS=function(){return this.dialogNotificationButtonPanelCSS},n.prototype.getDialogButtonCSS=function(){return this.buttonStyleCSS.join(t)},n}();n.DefaultDialogCSSManager=i})(t=n.WacCommonUICssManager||(n.WacCommonUICssManager={}))}(OfficeExt||(OfficeExt={})),function(n){var t;(function(t){var i;(function(t){function wt(n){var t=n.input;t!=i&&(v={HostButtonBorderColor:t[OSF.HostThemeButtonStyleKeys.ButtonBorderColor],HostButtonBackgroundColor:t[OSF.HostThemeButtonStyleKeys.ButtonBackgroundColor]});n.completed()}function bt(n){OSF._OfficeAppFactory.getInitializationHelper().addOrRemoveEventListenersForWindow(r);n.completed()}function kt(t){try{if(OSF._OfficeAppFactory.getInitializationHelper()._appContext._skipNewWindowNotification){ht(t);return}w=r;var c=r,p=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo,s=n.WacCommonUICssManager.getDialogCssManager(p.hostType),b=OSF.OUtil.formatString(Strings.OfficeOM.L_ShowWindowDialogNotification,OSF._OfficeAppFactory.getInitializationHelper()._appContext._addinName);o=ct(s);document.body.insertBefore(o,document.body.firstChild);f=ui(s,b);f.id=ot;var l=lt(s),i=nt(s,Strings.OfficeOM.L_ShowWindowDialogNotificationAllow),u=nt(s,Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore);l.appendChild(i);l.appendChild(u);f.appendChild(l);document.body.insertBefore(f,document.body.firstChild);i.onclick=function(){ht(t);w||y()};function v(){function n(n){rt();at(n);e(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore)}h.onComplete=n;OSF.DDA.WAC.Delegate.unregisterEventAsync(h)}u.onclick=v;i.addEventListener(a,function(n){n.shiftKey&&n.keyCode==9&&(it(i),tt(u),u.focus(),n.preventDefault(),n.stopPropagation())},r);u.addEventListener(a,function(n){n.shiftKey||n.keyCode!=9?n.keyCode==13&&(c=!0,n.preventDefault(),n.stopPropagation()):(it(u),tt(i),i.focus(),n.preventDefault(),n.stopPropagation())},r);u.addEventListener("keyup",function(n){n.keyCode==13&&c&&(c=r,v(),n.preventDefault(),n.stopPropagation())},r);window.focus();function k(){i.focus()}h.onComplete=k;OSF.DDA.WAC.Delegate.registerEventAsync(h)}catch(d){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at new window dialog."+d);e(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)}}function dt(n){var t,r;try{if(u!=i){if(t=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains,t)for(r=0;r-1?window.close():(t=n.data,r=typeof t,t&&(r=="object"||r==c)&&(r==c&&(t=JSON.parse(t)),u=OSF.DDA.OMFactory.manufactureEventArgs(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived,i,t),OSF.DialogParentMessageEventDispatch.fireEvent(u))))}window.addEventListener(l,n)}function ii(n,t){p=n;e=t}function ri(){try{f&&f.id==ot&&e&&e(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore)}catch(n){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during executing displayDialogAsync callback."+n)}y()}function st(t,i){var s=r,e=n.WacCommonUICssManager.getDialogCssManager(i),h,u;o=ct(e);document.body.insertBefore(o,document.body.firstChild);f=fi(e,t);f.id=pt;h=lt(e);u=nt(e,Strings.OfficeOM.L_DialogOK?Strings.OfficeOM.L_DialogOK:"OK");h.appendChild(u);f.appendChild(h);document.body.insertBefore(f,document.body.firstChild);w=!0;u.onclick=function(){y()};u.addEventListener(a,function(n){n.keyCode==9?(document.getElementById(k).focus(),n.preventDefault(),n.stopPropagation()):n.keyCode==13&&(s=!0,n.preventDefault(),n.stopPropagation())},r);u.addEventListener("keyup",function(n){n.keyCode==13&&s&&(s=r,y(),n.preventDefault(),n.stopPropagation())},r);document.getElementById(k).addEventListener(a,function(n){n.keyCode==9&&(u.focus(),n.preventDefault(),n.stopPropagation())},r);window.focus();u.focus()}function g(n){if(n.source==u)try{var t={};t[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogMessageReceived;t[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent]=n.data;p(t)}catch(i){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during receive message handler."+i)}}function ht(t){function d(){try{if(u==i||u.closed){window.clearInterval(b);window.removeEventListener(l,g);var n={};n[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogClosed;p(n)}}catch(t){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during check or handle window close."+t)}}var r=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo,v=[r.hostType,r.hostPlatform,r.hostSpecificFileVersion,r.hostLocale,r.osfControlAppCorrelationId,"isDialog"],h=v.join("|"),f=OSF._OfficeAppFactory.getInitializationHelper()._appContext,o=t[OSF.ShowWindowDialogParameterKeys.Url],s;o=n.WACUtils.addHostInfoAsQueryParam(o,h);s=JSON.parse(window.name);s[OSF.WindowNameItemKeys.HostInfo]=h;s[OSF.WindowNameItemKeys.AppContext]=f;var c=t[OSF.ShowWindowDialogParameterKeys.Width]*f._clientWindowWidth/100,a=t[OSF.ShowWindowDialogParameterKeys.Height]*f._clientWindowHeight/100,y=f._clientWindowWidth/2-c/2,w=f._clientWindowHeight/2-a/2,k="width="+c+", height="+a+", left="+y+", top="+w+",channelmode=no,directories=no,fullscreen=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=yes,toolbar=no";if(u=window.open(o,n.WACUtils.serializeObjectToString(s),k),u==i){OSF.AppTelemetry.logAppCommonMessage("Encountered cross zone issue in displayDialogAsync api.");rt();st(o,r.hostType);e(OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone);return}window.addEventListener(l,g);b=window.setInterval(d,1e3);e!=i?e(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("showDialogCallback can not be null.")}function nt(n,t){var i=document.createElement("input"),r,u;return i.setAttribute("type","button"),i.style.cssText=n.getDialogButtonCSS(),i.style.borderColor=ft,i.style.backgroundColor=et,i.setAttribute("value",t),r=function(){tt(i)},u=function(){it(i)},i.addEventListener("mouseover",r),i.addEventListener("focus",r),i.addEventListener("mouseout",u),i.addEventListener("focusout",u),i}function tt(n){v!=i?(n.style.borderColor=v.HostButtonBorderColor,n.style.backgroundColor=v.HostButtonBackgroundColor):OSF.CommonUI&&OSF.CommonUI.HostButtonBorderColor&&OSF.CommonUI.HostButtonBackgroundColor?(n.style.borderColor=OSF.CommonUI.HostButtonBorderColor,n.style.backgroundColor=OSF.CommonUI.HostButtonBackgroundColor):n.style.backgroundColor=yt}function it(n){n.style.borderColor=ft;n.style.backgroundColor=et}function y(){function n(n){rt();at(n)}h.onComplete=n;OSF.DDA.WAC.Delegate.unregisterEventAsync(h)}function rt(){f!=i&&(document.body.removeChild(f),f=i);o!=i&&(document.body.removeChild(o),o=i)}function ct(n){var t=document.createElement(s);return t.style.cssText=n.getOverlayElementCSS(),t}function ui(n,t){var r=document.createElement(s),i,u;return r.style.cssText=n.getDialogNotificationPanelCSS(),vt(r),i=document.createElement(s),i.style.cssText=n.getNewWindowNotificationTextPanelCSS(),i.id=d,document.documentElement.getAttribute("dir")=="rtl"?i.style.paddingRight="30px":i.style.paddingLeft="30px",u=document.createElement("span"),u.style.cssText=n.getNewWindowNotificationTextSpanCSS(),u.innerText=t,i.appendChild(u),r.appendChild(i),r}function lt(n){var t=document.createElement(s);return t.style.cssText=n.getDialogNotificationButtonPanelCSS(),t.style.cssFloat=document.documentElement.getAttribute("dir")=="rtl"?"left":"right",t}function at(n){if(n!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){var t=document.querySelectorAll(OSF._OfficeAppFactory.getInitializationHelper()._tabbableElements);OSF.OUtil.focusToFirstTabbable(t,r)}}function fi(t,i){var f=document.createElement(s),u,r,e;return f.style.cssText=t.getDialogNotificationPanelCSS(),vt(f),u=document.createElement(s),u.style.cssText=t.getCrossZoneNotificationTextPanelCSS(),u.id=d,r=document.createElement("a"),r.id=k,r.href="#",r.innerText=Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink,r.setAttribute("onclick","window.open('https://support.microsoft.com/en-us/help/17479/windows-internet-explorer-11-change-security-privacy-settings', '_blank', 'fullscreen=1')"),e=document.createElement("span"),Strings.OfficeOM.L_NewWindowCrossZone&&(e.innerHTML=OSF.OUtil.formatString(Strings.OfficeOM.L_NewWindowCrossZone,r.outerHTML,n.WACUtils.getDomainForUrl(i))),u.appendChild(e),f.appendChild(u),f}function vt(n){n.setAttribute("role","dialog");n.setAttribute("aria-describedby",d)}var s="div",c="string",l="message",a="keydown",r=!1,i=null,u=i,p=i,o=i,f=i,ut="osfDialogInternal:action=closeDialog",e=i,w=r,b=-1,v=i,ft="#ababab",et="#ffffff",yt="#ccc",ot="newWindowNotificaiton",pt="crossZoneNotification",k="configureBrowserLink",d="dialogNotificationTextPanel",h={dispId:OSF.DDA.EventDispId.dispidDialogNotificationShownInAddinEvent,eventType:OSF.DDA.Marshaling.DialogNotificationShownEventType.DialogNotificationShown,onComplete:i};t.setHostThemeButtonStyle=wt;t.removeEventListenersForDialog=bt;t.handleNewWindowDialog=kt;t.closeDialog=dt;t.messageParent=gt;t.sendMessage=ni;t.registerMessageReceivedEvent=ti;t.setHandlerAndShowDialogCallback=ii;t.escDismissDialogNotification=ri;t.showCrossZoneNotification=st})(i=t.Dialog||(t.Dialog={}))})(t=n.AddinNativeAction||(n.AddinNativeAction={}))}(OfficeExt||(OfficeExt={}));OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogMessageReceivedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageType},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageContent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidMessageParentMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,value:OSF.DDA.Marshaling.MessageParentKeys.MessageToParent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSendMessageMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,value:OSF.DDA.Marshaling.SendMessageKeys.MessageContent}]});OSF.DDA.WAC.Delegate.openDialog=function(n){function t(n){var t={Error:n};e(Microsoft.Office.Common.InvokeResultCode.noError,t)}var u="https://",f="http://",r=JSON.parse(n.targetId),e=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!0,n),i;if(OSF.DialogShownStatus.hasDialogShown){t(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened);return}if(i=r[OSF.ShowWindowDialogParameterKeys.Url].toLowerCase(),i==null||!(i.substr(0,u.length)===u)){i.substr(0,f.length)===f?t(OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS):t(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme);return}r[OSF.ShowWindowDialogParameterKeys.DisplayInIframe]?(OSF.DialogShownStatus.isWindowDialog=!1,OSF.DDA.WAC.Delegate.registerEventAsync(n)):(OSF.DialogShownStatus.isWindowDialog=!0,OfficeExt.AddinNativeAction.Dialog.setHandlerAndShowDialogCallback(function(t){n.onEvent&&n.onEvent(t);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t),OfficeExt.AddinNativeAction.Dialog.handleNewWindowDialog(r))};OSF.DDA.WAC.Delegate.messageParent=function(n){window.opener!=null?OfficeExt.AddinNativeAction.Dialog.messageParent(n):OSF.DDA.WAC.Delegate.executeAsync(n)};OSF.DDA.WAC.Delegate.sendMessage=function(n){OSF.DialogShownStatus.hasDialogShown&&(OSF.DialogShownStatus.isWindowDialog?OfficeExt.AddinNativeAction.Dialog.sendMessage(n):OSF.DDA.WAC.Delegate.executeAsync(n))};OSF.DDA.WAC.Delegate.closeDialog=function(n){function t(n){var t={Error:n};i(Microsoft.Office.Common.InvokeResultCode.noError,t)}var i=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!1,n);OSF.DialogShownStatus.hasDialogShown?OSF.DialogShownStatus.isWindowDialog?(n.onCalling&&n.onCalling(),OfficeExt.AddinNativeAction.Dialog.closeDialog(t)):OSF.DDA.WAC.Delegate.unregisterEventAsync(n):t(OSF.DDA.ErrorCodeManager.errorCodes.ooeWebDialogClosed)};OSF.InitializationHelper.prototype.dismissDialogNotification=function(){OfficeExt.AddinNativeAction.Dialog.escDismissDialogNotification()};OSF.InitializationHelper.prototype.registerMessageReceivedEventForWindowDialog=function(){OfficeExt.AddinNativeAction.Dialog.registerMessageReceivedEvent()};OSF.DDA.AsyncMethodNames.addNames({GetAccessTokenAsync:"getAccessTokenAsync"});OSF.DDA.Auth=function(){};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAccessTokenAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ForceConsent,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.ForceAddAccount,value:{types:["boolean"],defaultValue:!1}}],onSucceeded:function(n){return n[Microsoft.Office.WebExtension.Parameters.Data]}});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("SingleSignOn",OSF.DDA.Marshaling);OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys={ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount"};OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAccessTokenMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.ForceConsent,value:OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.ForceConsent},{name:Microsoft.Office.WebExtension.Parameters.ForceAddAccount,value:OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.ForceAddAccount}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]}),function(n){var t=function(){function n(n,t){var i=this;OSF.DDA.WordDocument.uber.constructor.call(i,n,t);OSF.DDA.DispIdHost.addAsyncMethods(i,[OSF.DDA.AsyncMethodNames.GoToByIdAsync,OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,OSF.DDA.AsyncMethodNames.SaveAsync,OSF.DDA.AsyncMethodNames.RefreshAsync]);OSF.DDA.DispIdHost.addEventSupport(i,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]));OSF.DDA.DispIdHost.addEventSupport(i,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.BindingSelectionChanged]));OSF.DDA.DispIdHost.addEventSupport(i,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DataNodeInserted]));OSF.DDA.DispIdHost.addEventSupport(i,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DataNodeReplaced]));OSF.DDA.DispIdHost.addEventSupport(i,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DataNodeDeleted]));OSF.OUtil.defineEnumerableProperty(i,"customXmlParts",{value:new OSF.DDA.CustomXmlParts});OSF.OUtil.defineEnumerableProperty(i,"bindings",{value:new OSF.DDA.BindingFacade(i)});OSF.OUtil.finalizeProperties(i)}return n}();n.WordDocument=t}(OSFWordWAC||(OSFWordWAC={}));OSF.DDA.WordDocument=OSFWordWAC.WordDocument;OSF.OUtil.extend(OSF.DDA.WordDocument,OSF.DDA.Document);OSF.OUtil.redefineList(Microsoft.Office.WebExtension.CoercionType,{Html:"html",Text:"text",Ooxml:"ooxml",Table:"table",Matrix:"matrix",Image:"image"});OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(n,t){OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM);n.doc=new OSF.DDA.WordDocument(n,this._initializeSettings(n,!0));OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi,[OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]);t()};OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize=function(n){var t,i,r;OSF.WebApp._UpdateLinksForHostAndXdmInfo();t=new OSF.DDA.License(n.get_eToken());this.initWebDialog(n);this.initWebAuth(n);OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(n,n.doc,t));!n.get_isDialog()&&OSF.AdditionalPostContextSettingOverride&&OSF.AdditionalPostContextSettingOverride();OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.WAC.getDelegateMethods,OSF.DDA.WAC.Delegate.ParameterMap));i=n.get_reason();Microsoft.Office.WebExtension.initialize(i);r=OfficeExt.AppCommand.AppCommandManager.instance();r.initializeAndChangeOnce()};__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t=function(){function n(n,t){this.m_actionInfo=n;this.m_isWriteOperation=t}return Object.defineProperty(n.prototype,"actionInfo",{get:function(){return this.m_actionInfo},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},enumerable:!0,configurable:!0}),n}();n.Action=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createSetPropertyAction=function(t,i,r,u){var f;n.Utility.validateObjectPath(i);var e={Id:t._nextId(),ActionType:4,Name:r,ObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},s=[u],o=n.Utility.setMethodArguments(t,e.ArgumentInfo,s);return n.Utility.validateReferencedObjectPaths(o),f=new n.Action(e,!0),t._pendingRequest.addAction(f),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addReferencedObjectPaths(o),f},t.createMethodAction=function(t,i,r,u,f){var e,o,h,s;return n.Utility.validateObjectPath(i),e={Id:t._nextId(),ActionType:3,Name:r,ObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},o=n.Utility.setMethodArguments(t,e.ArgumentInfo,f),n.Utility.validateReferencedObjectPaths(o),h=u!=1,s=new n.Action(e,h),t._pendingRequest.addAction(s),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addReferencedObjectPaths(o),s},t.createQueryAction=function(t,i,r){var u,f;return n.Utility.validateObjectPath(i),u={Id:t._nextId(),ActionType:2,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},u.QueryInfo=r,f=new n.Action(u,!1),t._pendingRequest.addAction(f),t._pendingRequest.addReferencedObjectPath(i._objectPath),f},t.createRecursiveQueryAction=function(t,i,r){n.Utility.validateObjectPath(i);var f={Id:t._nextId(),ActionType:6,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id,RecursiveQueryInfo:r},u=new n.Action(f,!1);return t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u},t.createInstantiateAction=function(t,i){n.Utility.validateObjectPath(i);var u={Id:t._nextId(),ActionType:1,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},r=new n.Action(u,!1);return t._pendingRequest.addAction(r),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addActionResultHandler(r,new n.InstantiateActionResultHandler(i)),r},t.createTraceAction=function(t,i,r){var u={Id:t._nextId(),ActionType:5,Name:"Trace",ObjectPathId:0},f=new n.Action(u,!1);return t._pendingRequest.addAction(f),r&&t._pendingRequest.addTrace(u.Id,i),f},t}();n.ActionFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(t,i){n.Utility.checkArgumentNull(t,"context");this.m_context=t;this.m_objectPath=i;this.m_objectPath&&(t._processingResult||(n.ActionFactory.createInstantiateAction(t,this),t._autoCleanup&&this._KeepReference&&t.trackedObjects._autoAdd(this)))}return Object.defineProperty(t.prototype,"context",{get:function(){return this.m_context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_objectPath",{get:function(){return this.m_objectPath},set:function(n){this.m_objectPath=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNull",{get:function(){return n.Utility.throwIfNotLoaded("isNull",this._isNull,null,this._isNull),this._isNull},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNullObject",{get:function(){return n.Utility.throwIfNotLoaded("isNullObject",this._isNull,null,this._isNull),this._isNull},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_isNull",{get:function(){return this.m_isNull},set:function(n){this.m_isNull=n;n&&this.m_objectPath&&this.m_objectPath._updateAsNullObject()},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){this._isNull=n.Utility.isNullOrUndefined(t);this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this,t)},t.prototype._handleIdResult=function(t){this._isNull=n.Utility.isNullOrUndefined(t);n.Utility.fixObjectPathIfNecessary(this,t);this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this,t)},t.prototype._recursivelySet=function(i,r,u,f,e){var l=i instanceof t,o,s,h,c;if(l)if(Object.getPrototypeOf(this)===Object.getPrototypeOf(i))i=JSON.parse(JSON.stringify(i));else throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"properties",errorLocation:this._className+".set"});try{for(s=0;s0},enumerable:!0,configurable:!0}),t.prototype.addTrace=function(n,t){this.m_traceInfos[n]=t},t.prototype.addReferencedObjectPath=function(t){if(!this.m_referencedObjectPaths[t.objectPathInfo.Id]){if(!t.isValid)throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidObjectPath,message:n.Utility._getResourceString(n.ResourceStrings.invalidObjectPath,n.Utility.getObjectPathExpression(t)),debugInfo:{errorLocation:n.Utility.getObjectPathExpression(t)}});while(t)t.isWriteOperation&&(this.m_flags=this.m_flags|1),this.m_referencedObjectPaths[t.objectPathInfo.Id]=t,t.objectPathInfo.ObjectPathType==3&&this.addReferencedObjectPaths(t.argumentObjectPaths),t=t.parentObjectPath}},t.prototype.addReferencedObjectPaths=function(n){if(n)for(var t=0;t0&&(typeof r[0]=="string"||i.isRequestUrlAndHeaderInfo(r[0])||i.isRequestUrlAndHeaderInfoResolver(r[0]))&&(y=r[0],h=1),r.length==h+1)a=u,v=r[h+0];else if(r.length==h+2){if(r[h+0]instanceof n.ClientObject)a=function(){return r[h+0].context};else if(Array.isArray(r[h+0])){if(c=r[h+0],c.length==0)return i.createErrorPromise(t);for(l=0;l0){var n=c._onRunFinishedNotifiers.shift();n()}if(a)return l;else throw l;})},i.prototype._nextId=function(){return++this.m_nextId},i}();n.ClientRequestContext=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_type=n}return Object.defineProperty(t.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){(this.m_isLoaded=!0,typeof t=="object"&&t&&t._IsNull)||(this.m_value=this.m_type===1?n.Utility.adjustToDateTime(t):t)},t}();n.ClientResult=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.flags="flags",n.getItemAt="GetItemAt",n.id="Id",n.idPrivate="_Id",n.index="_Index",n.items="_Items",n.iterativeExecutor="IterativeExecutor",n.localDocument="http://document.localhost/",n.localDocumentApiPrefix="http://document.localhost/_api/",n.processQuery="ProcessQuery",n.referenceId="_ReferenceId",n.isTracked="_IsTracked",n.sourceLibHeader="SdkVersion",n.embeddingPageOrigin="EmbeddingPageOrigin",n.embeddingPageSessionInfo="EmbeddingPageSessionInfo",n}();n.Constants=t}(OfficeExtension||(OfficeExtension={})),function(n){var u=1,r={invokeRequestModifier:function(n){return n.DdaMethod.Version=u,n},invokeResponseModifier:function(n){return u=n.Version,n.Error&&(n.error={},n.error.Code=n.Error),n}},i,t,f,e;(function(n){n[n.Success=0]="Success";n[n.Timeout=1]="Timeout";n[n.InternalError=5001]="InternalError"})(i||(i={})),function(n){n.SendingId="sId";n.RespondingId="rId";n.CommandKey="command";n.SessionInfoKey="sessionInfo";n.ParamsKey="params";n.ApiReadyCommand="apiready";n.ExecuteMethodCommand="executeMethod";n.GetAppContextCommand="getAppContext";n.RegisterEventCommand="registerEvent";n.UnregisterEventCommand="unregisterEvent";n.FireEventCommand="fireEvent"}(t||(t={}));f=function(u){function f(n,t){u.call(this);this.m_chosenWindow=null;this.m_chosenOrigin=null;this.m_enabled=!0;this.m_onMessageHandler=this._onMessage.bind(this);this.m_callbackList={};this.m_id=0;this.m_timeoutId=-1;this.m_appContext=null;this.m_url=n;this.m_options=t;this.m_options||(this.m_options={sessionKey:Math.random().toString()});this.m_options.sessionKey||(this.m_options.sessionKey=Math.random().toString());this.m_options.container||(this.m_options.container=document.body);this.m_options.timeoutInMilliseconds||(this.m_options.timeoutInMilliseconds=6e4);this.m_options.height||(this.m_options.height="400px");this.m_options.width||(this.m_options.width="100%")}return __extends(f,u),f.prototype._getIFrameSrc=function(){var u=window.location.protocol+"//"+window.location.host,i=n.Constants.embeddingPageOrigin+"="+encodeURIComponent(u)+"&"+n.Constants.embeddingPageSessionInfo+"="+encodeURIComponent(this.m_options.sessionKey),r=!1,t;return this.m_url.toLowerCase().indexOf("/_layouts/preauth.aspx")>0&&(r=!0),t=document.createElement("a"),t.href=this.m_url,r?t.hash=t.hash.length===0||t.hash==="#"?"#"+i:t.hash+"&"+i:t.search=t.search.length===0||t.search==="?"?"?"+i:t.search+"&"+i,t.href},f.prototype.init=function(){var t=this,i;return window.addEventListener("message",this.m_onMessageHandler),i=this._getIFrameSrc(),new n._Internal.OfficePromise(function(r,u){var f=document.createElement("iframe");t.m_options.id&&(f.id=t.m_options.id);f.style.height=t.m_options.height;f.style.width=t.m_options.width;f.src=i;t.m_options.container.appendChild(f);t.m_timeoutId=setTimeout(function(){t.close();var i=n.Utility.createRuntimeError(n.ErrorCodes.timeout,n.Utility._getResourceString(n.ResourceStrings.timeout),"EmbeddedSession.init");u(i)},t.m_options.timeoutInMilliseconds);t.m_promiseResolver=r})},f.prototype._invoke=function(n,t,u){if(!this.m_enabled){t(i.InternalError,null);return}r.invokeRequestModifier&&(u=r.invokeRequestModifier(u));this._sendMessageWithCallback(this.m_id++,n,u,function(n){r.invokeResponseModifier&&(n=r.invokeResponseModifier(n));var u=n.Error;delete n.Error;t(u||i.Success,n)})},f.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler);window.clearTimeout(this.m_timeoutId);this.m_enabled=!1},Object.defineProperty(f.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),f.prototype._createRequestExecutorOrNull=function(){return new e(this)},f.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},f.prototype._registerEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.RegisterEventCommand,{EventId:i,TargetId:r},function(){n(null)})})},f.prototype._unregisterEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.UnregisterEventCommand,{EventId:i,TargetId:r},function(){n()})})},f.prototype._onMessage=function(n){var u=this,i,e,r,o,s;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===n.source&&this.m_chosenOrigin===n.origin)){if(i=n.data,i&&i[t.CommandKey]===t.ApiReadyCommand){!this.m_chosenWindow&&this._isValidDescendant(n.source)&&i[t.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=n.source,this.m_chosenOrigin=n.origin,this._sendMessageWithCallback(this.m_id++,t.GetAppContextCommand,null,function(n){u._setupContext(n);window.clearTimeout(u.m_timeoutId);u.m_promiseResolver()}));return}if(i&&i[t.CommandKey]===t.FireEventCommand){var f=i[t.ParamsKey],h=f.EventId,c=f.TargetId,l=f.Data;if(this.m_sessionEventManager)for(e=this.m_sessionEventManager.getHandlers(h,c),r=0;r=0;o--)if(r[o]===e[i].handler){r.splice(o,1);break}break;case 2:r=[];break}}return s&&(!this.m_registered&&r.length>0?u=u.then(function(){return f.m_eventInfo.registerFunc(f.m_callback)}).then(function(){return f.m_registered=!0}):this.m_registered&&r.length==0&&(u=u.then(function(){return f.m_eventInfo.unregisterFunc(f.m_callback)}).catch(function(t){n.Utility.log("Error when unregister event: "+JSON.stringify(t))}).then(function(){return f.m_registered=!1})),u=u.then(function(){return f.m_handlers=r})),u},t.prototype.fireEvent=function(t){for(var u,f,r=[],i=0;i=0;e--)if(f[e]===u){f.splice(e,1);break}return f.length===0?this.m_unregisterEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i}();n.EventRegistration=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var s=JSON.stringify(u.Body),f=u.Url,e,o;if(f.charAt(f.length-1)!="/"&&(f=f+"/"),f=f+n.Constants.processQuery,f=f+"?"+n.Constants.flags+"="+r.toString(),e={method:"POST",url:f,headers:{},body:s},e.headers[n.Constants.sourceLibHeader]=t.SourceLibHeaderValue,e.headers["CONTENT-TYPE"]="application/json",u.Headers)for(o in u.Headers)e.headers[o]=u.Headers[o];return n.HttpUtility.sendRequest(e).then(function(t){var i,r;return t.statusCode===200?i={ErrorCode:null,ErrorMessage:null,Headers:t.headers,Body:JSON.parse(t.body)}:(n.Utility.log("Error Response:"+t.body),r=n.Utility._parseErrorResponse(t),i={ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:t.headers,Body:null}),i})},t.SourceLibHeaderValue="officejs-rest",t}();n.HttpRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){n.OfficeRequire=function(){return typeof require!="undefined"?require:null}()})(t=n._Internal||(n._Internal={}));i=function(){function i(){}return i.setCustomSendRequestFunc=function(n){i.s_customSendRequestFunc=n},i.xhrSendRequestFunc=function(i){return new t.OfficePromise(function(r,u){var f=new XMLHttpRequest,e;if(f.open(i.method,i.url),f.onload=function(){var t={statusCode:f.status,headers:n.Utility._parseHttpResponseHeaders(f.getAllResponseHeaders()),body:f.responseText};r(t)},f.onerror=function(){u(new t.RuntimeError({code:n.ErrorCodes.connectionFailure,message:n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,f.statusText)}))},i.headers)for(e in i.headers)f.setRequestHeader(e,i.headers[e]);f.send(i.body)})},i.nodejsRequestModuleSendRequestFunc=function(n){i.logRequest(n);var r=t.OfficeRequire(i.NodeJsRequestModuleName);return r(n.url,{method:n.method,headers:n.headers,body:n.body}).then(function(n){return n.text().then(function(t){var f=n.status,u={},r;return n.headers.forEach(function(n,t){u[t]=n}),r={statusCode:f,headers:u,body:t},i.logResponse(r),r})})},i.sendRequest=function(n){i.validateAndNormalizeRequest(n);var t=i.s_customSendRequestFunc;return t||(t=typeof window=="undefined"||typeof XMLHttpRequest=="undefined"?i.nodejsRequestModuleSendRequestFunc:i.xhrSendRequestFunc),t(n)},i.setCustomSendLocalDocumentRequestFunc=function(n){i.s_customSendLocalDocumentRequestFunc=n},i.sendLocalDocumentRequest=function(n){i.validateAndNormalizeRequest(n);var t;return t=i.s_customSendLocalDocumentRequestFunc||i.officeJsSendLocalDocumentRequestFunc,t(n)},i.officeJsSendLocalDocumentRequestFunc=function(i){i=n.Utility._validateLocalDocumentRequest(i);var r=n.Utility._buildRequestMessageSafeArray(i);return new t.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(r,function(i){var r;r=i.status=="succeeded"?{statusCode:n.RichApiMessageUtility.getResponseStatusCode(i),headers:n.RichApiMessageUtility.getResponseHeaders(i),body:n.RichApiMessageUtility.getResponseBody(i)}:n.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(i.error.code,i.error.message);n.Utility.log(JSON.stringify(r));t(r)})})},i.validateAndNormalizeRequest=function(i){if(n.Utility.isNullOrUndefined(i))throw t.RuntimeError._createInvalidArgError({argumentName:"request"});n.Utility.isNullOrEmptyString(i.method)&&(i.method="GET");i.method=i.method.toUpperCase()},i.logRequest=function(t){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Request---"),n.Utility.log(t.method+" "+t.url),t.headers)for(var r in t.headers)n.Utility.log(r+": "+t.headers[r]);i._logBody&&n.Utility.log(t.body)}},i.logResponse=function(t){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Response---"),n.Utility.log(""+t.statusCode),t.headers)for(var r in t.headers)n.Utility.log(r+": "+t.headers[r]);i._logBody&&n.Utility.log(t.body)}},i.NodeJsRequestModuleName="node-fetch",i._logBody=!1,i}();n.HttpUtility=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_clientObject=n}return n.prototype._handleResult=function(n){this.m_clientObject._handleIdResult(n)},n}();n.InstantiateActionResultHandler=t}(OfficeExtension||(OfficeExtension={})),function(n){}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){this.m_objectPathInfo=n;this.m_parentObjectPath=t;this.m_isWriteOperation=!1;this.m_isCollection=i;this.m_isInvalidAfterRequest=r;this.m_isValid=!0}return Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},set:function(n){this.m_isWriteOperation=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(n){this.m_argumentObjectPaths=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(n){this.m_isValid=n;!n&&this.m_objectPathInfo.ObjectPathType===6&&this.m_savedObjectPathInfo&&(t.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(n){this.m_getByIdMethodName=n},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null},t.prototype.updateUsingObjectData=function(i){var o=i[n.Constants.referenceId],u,f,e,r;if(!n.Utility.isNullOrEmptyString(o)){this.m_savedObjectPathInfo||this.isInvalidAfterRequest||!t.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)||(u={},t.copyObjectPathInfo(this.m_objectPathInfo,u),this.m_savedObjectPathInfo={pathInfo:u,parent:this.m_parentObjectPath});this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=o;this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null;return}if(f=this.parentObjectPath&&this.parentObjectPath.isCollection,e=this.getByIdMethodName,(f||!n.Utility.isNullOrEmptyString(e))&&(r=i[n.Constants.id],n.Utility.isNullOrUndefined(r)&&(r=i[n.Constants.idPrivate]),!n.Utility.isNullOrUndefined(r))){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;f?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=e,this.m_getByIdMethodName=null);this.isWriteOperation=!1;this.m_objectPathInfo.ArgumentInfo={};this.m_objectPathInfo.ArgumentInfo.Arguments=[r];this.m_argumentObjectPaths=null;return}},t.isRestorableObjectPath=function(n){return n===1||n===5||n===3||n===4},t.copyObjectPathInfo=function(n,t){t.Id=n.Id;t.ArgumentInfo=n.ArgumentInfo;t.Name=n.Name;t.ObjectPathType=n.ObjectPathType;t.ParentObjectPathId=n.ParentObjectPathId},t}();n.ObjectPath=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createGlobalObjectObjectPath=function(t){var i={Id:t._nextId(),ObjectPathType:1,Name:""};return new n.ObjectPath(i,null,!1,!1)},t.createNewObjectObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:2,Name:i};return new n.ObjectPath(u,null,r,!1)},t.createPropertyObjectPath=function(t,i,r,u,f){var e={Id:t._nextId(),ObjectPathType:4,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id};return new n.ObjectPath(e,i._objectPath,u,f)},t.createIndexerObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i._objectPath,!1,!1)},t.createIndexerObjectPathUsingParentPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i,!1,!1)},t.createMethodObjectPath=function(t,i,r,u,f,e,o,s){var c={Id:t._nextId(),ObjectPathType:3,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},l=n.Utility.setMethodArguments(t,c.ArgumentInfo,f),h=new n.ObjectPath(c,i._objectPath,e,o);return h.argumentObjectPaths=l,h.isWriteOperation=u!=1,h.getByIdMethodName=s,h},t.createReferenceIdObjectPath=function(t,i){var r={Id:t._nextId(),ObjectPathType:6,Name:i,ArgumentInfo:{}};return new n.ObjectPath(r,null,!1,!1)},t.createChildItemObjectPathUsingIndexerOrGetItemAt=function(i,r,u,f,e){var o=f[n.Constants.id];return n.Utility.isNullOrUndefined(o)&&(o=f[n.Constants.idPrivate]),i&&!n.Utility.isNullOrUndefined(o)?t.createChildItemObjectPathUsingIndexer(r,u,f):t.createChildItemObjectPathUsingGetItemAt(r,u,f,e)},t.createChildItemObjectPathUsingIndexer=function(t,i,r){var f=r[n.Constants.id],u;return n.Utility.isNullOrUndefined(f)&&(f=r[n.Constants.idPrivate]),u=u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u.ArgumentInfo.Arguments=[f],new n.ObjectPath(u,i._objectPath,!1,!1)},t.createChildItemObjectPathUsingGetItemAt=function(t,i,r,u){var e=r[n.Constants.index],f;return e&&(u=e),f={Id:t._nextId(),ObjectPathType:3,Name:n.Constants.getItemAt,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f.ArgumentInfo.Arguments=[u],new n.ObjectPath(f,i._objectPath,!1,!1)},t}();n.ObjectPathFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var f=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n._Internal.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(f,function(i){n.Utility.log("Response:");n.Utility.log(JSON.stringify(i));var r;r=i.status=="succeeded"?n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBody(i),n.RichApiMessageUtility.getResponseHeaders(i)):n.RichApiMessageUtility.buildResponseOnError(i.error.code,i.error.message);t(r)})})},t.SourceLibHeaderValue="officejs",t}();n.OfficeJsRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){var t;(function(t){function i(){return function(){"use strict";function wt(n){return typeof n=="function"||typeof n=="object"&&n!==null}function b(n){return typeof n=="function"}function bt(n){return typeof n=="object"&&n!==null}function kt(n){k=n}function dt(n){f=n}function ti(){var t=process.nextTick,n=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&n[1]==="0"&&n[2]==="10"&&(t=setImmediate),function(){t(c)}}function ii(){return function(){tt(c)}}function ri(){var n=0,i=new ut(c),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function ui(){var n=new MessageChannel;return n.port1.onmessage=c,function(){n.port2.postMessage(0)}}function ft(){return function(){setTimeout(c,1)}}function c(){for(var t,i,n=0;n=0?(n=n.substring(t+5,n.length),n<"14.14393"?!0:!1):!1}function i(){return typeof window=="undefined"&&typeof Promise=="function"?Promise:typeof window!="undefined"&&window.Promise?t()?n.PromiseImpl.Init():window.Promise:n.PromiseImpl.Init()}n.OfficePromise=i()}(t=n._Internal||(n._Internal={}));i=t.OfficePromise;n.Promise=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this._autoCleanupList={};this.m_context=n}return t.prototype.add=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._addCommon(n,!0)}):this._addCommon(n,!0)},t.prototype._autoAdd=function(n){this._addCommon(n,!1);this._autoCleanupList[n._objectPath.objectPathInfo.Id]=n},t.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(t,i){var r=this.m_context._autoCleanup&&!t[n.Constants.isTracked]&&t!==this.m_context._rootObject&&i&&!n.Utility.isNullOrEmptyString(i[n.Constants.referenceId]);r&&(this._autoCleanupList[t._objectPath.objectPathInfo.Id]=t,t[n.Constants.isTracked]=!0)},t.prototype._addCommon=function(t,i){if(t[n.Constants.isTracked]){i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id];return}var r=t[n.Constants.referenceId];n.Utility.isNullOrEmptyString(r)&&t._KeepReference&&(t._KeepReference(),n.ActionFactory.createInstantiateAction(this.m_context,t),i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id],t[n.Constants.isTracked]=!0)},t.prototype.remove=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._removeCommon(n)}):this._removeCommon(n)},t.prototype._removeCommon=function(t){var r=t[n.Constants.referenceId],i;n.Utility.isNullOrEmptyString(r)||(i=this.m_context._rootObject,i._RemoveReference&&i._RemoveReference(r),delete t[n.Constants.isTracked])},t.prototype._retrieveAndClearAutoCleanupList=function(){var n=this._autoCleanupList;return this._autoCleanupList={},n},t}();n.TrackedObjects=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.cannotRegisterEvent="CannotRegisterEvent",n.connectionFailureWithStatus="ConnectionFailureWithStatus",n.connectionFailureWithDetails="ConnectionFailureWithDetails",n.invalidObjectPath="InvalidObjectPath",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.invalidArgumentGeneric="InvalidArgumentGeneric",n.propertyNotLoaded="PropertyNotLoaded",n.runMustReturnPromise="RunMustReturnPromise",n.timeout="Timeout",n.propertyDoesNotExist="PropertyDoesNotExist",n.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",n.moreInfoInnerError="MoreInfoInnerError",n.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",n.valueNotLoaded="ValueNotLoaded",n.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage",n}();n.ResourceStrings=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.CannotRegisterEvent="The event handler cannot be registered.",n.ConnectionFailureWithStatus="The request failed with status code of {0}.",n.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}",n.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",n.InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',n.InvalidRequestContext="Cannot use the object across different request contexts.",n.PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",n.RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',n.Timeout="The operation has timed out.",n.ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.',n.invalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.",n}();n.ResourceStringValues=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.buildMessageArrayForIRequestExecutor=function(i,r,u,f){var o=JSON.stringify(u.Body),e;return n.Utility.log("Request:"),n.Utility.log(o),e={},e[n.Constants.sourceLibHeader]=f,t.buildRequestMessageSafeArray(i,r,"POST","ProcessQuery",e,o)},t.buildResponseOnSuccess=function(n,t){var i={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return i.Body=JSON.parse(n),i.Headers=t,i},t.buildResponseOnError=function(i,r){var u={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return u.ErrorCode=n.ErrorCodes.generalException,u.ErrorMessage=r,i==t.OfficeJsErrorCode_ooeNoCapability?u.ErrorCode=n.ErrorCodes.accessDenied:i==t.OfficeJsErrorCode_ooeActivityLimitReached?u.ErrorCode=n.ErrorCodes.activityLimitReached:i==t.OfficeJsErrorCode_ooeInvalidOrTimedOutSession&&(u.ErrorCode=n.ErrorCodes.invalidOrTimedOutSession,u.ErrorMessage=n.Utility._getResourceString(n.ResourceStrings.invalidOrTimedOutSessionMessage)),u},t.buildHttpResponseFromOfficeJsError=function(i,r){var f=500,u={};return u.error={},u.error.code=n.ErrorCodes.generalException,u.error.message=r,i===t.OfficeJsErrorCode_ooeNoCapability?(f=403,u.error.code=n.ErrorCodes.accessDenied):i===t.OfficeJsErrorCode_ooeActivityLimitReached&&(f=429,u.error.code=n.ErrorCodes.activityLimitReached),{statusCode:f,headers:{},body:JSON.stringify(u)}},t.buildRequestMessageSafeArray=function(n,t,i,r,u,f){var e=[],o;if(u)for(o in u)e.push(o),e.push(u[o]);var s=0,h="",c="",l="";return[n,i,r,e,f,s,t,h,c,l]},t.getResponseBody=function(n){return t.getResponseBodyFromSafeArray(n.value.data)},t.getResponseHeaders=function(n){return t.getResponseHeadersFromSafeArray(n.value.data)},t.getResponseBodyFromSafeArray=function(n){var t=n[2],i;return typeof t=="string"?t:(i=t,i.join(""))},t.getResponseHeadersFromSafeArray=function(n){var i=n[1],r,t;if(!i)return null;for(r={},t=0;t0&&f.push(i);return f},t.throwError=function(i,r,u){throw new n._Internal.RuntimeError({code:i,message:t._getResourceString(i,r),debugInfo:u?{errorLocation:u}:undefined});},t.createRuntimeError=function(t,i,r){return new n._Internal.RuntimeError({code:t,message:i,debugInfo:{errorLocation:r}})},t._getResourceString=function(i,r){var u,e,f,o;return typeof window!="undefined"&&window.Strings&&window.Strings.OfficeOM&&(e="L_"+i,f=window.Strings.OfficeOM[e],f&&(u=f)),u||(u=n.ResourceStringValues[i]),u||(u=i),t.isNullOrUndefined(r)||(Array.isArray(r)?(o=r,u=t._formatString(u,o)):u=u.replace("{0}",r)),u},t._formatString=function(t,i){return t.replace(/\{\d\}/g,function(t){var r=parseInt(t.substr(1,t.length-2));if(r0?".":"")+i;break;case 3:i=t.normalizeName(n.objectPathInfo.Name)+"()"+(i.length>0?".":"")+i;break;case 4:i=t.normalizeName(n.objectPathInfo.Name)+(i.length>0?".":"")+i;break;case 5:i="getItem()"+(i.length>0?".":"")+i;break;case 6:i="_reference()"+(i.length>0?".":"")+i;break}n=n.parentObjectPath}return i},t._createPromiseFromResult=function(t){return new n._Internal.OfficePromise(function(n,i){n(t)})},t._createTimeoutPromise=function(t){return new n._Internal.OfficePromise(function(n,i){setTimeout(function(){n(null)},t)})},t.promisify=function(t){return new n._Internal.OfficePromise(function(n,i){var r=function(t){t.status=="failed"?i(t.error):n(t.value)};t(r)})},t._addActionResultHandler=function(n,t,i){n.context._pendingRequest.addActionResultHandler(t,i)},t._handleNavigationPropertyResults=function(n,i,r){for(var u=0;u0},t._getLocalDocumentUrlPrefixLength=function(n){for(var i=["http://document.localhost","https://document.localhost","//document.localhost"],r=n.toLowerCase().trim(),t=0;t0))for(s=i.url.substr(f+1),e=s.split("&"),u=0;u0&&(f=i.substr(0,u),e=i.substr(u+1),f=t.trim(f),e=t.trim(e),s[f.toUpperCase()]=e));return s},t._parseErrorResponse=function(i){var r=null,f,e,u;if(!t.isNullOrEmptyString(i.body)){f=t.trim(i.body);try{r=JSON.parse(f)}catch(o){t.log("Error when parse "+f)}}return!t.isNullOrUndefined(r)&&typeof r=="object"&&r.error?(u=r.error.code,e=t._getResourceString(n.ResourceStrings.connectionFailureWithDetails,[i.statusCode.toString(),r.error.code,r.error.message])):e=t._getResourceString(n.ResourceStrings.connectionFailureWithStatus,i.statusCode.toString()),t.isNullOrEmptyString(u)&&(u=n.ErrorCodes.connectionFailure),{errorCode:u,errorMessage:e}},t._copyHeaders=function(n,t){if(n&&t)for(var i in n)t[i]=n[i]},t._logEnabled=!1,t._synchronousCleanup=!1,t.s_underscoreCharCode="_".charCodeAt(0),t}();n.Utility=t}(OfficeExtension||(OfficeExtension={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){function y(t,i){var u,r;if(OfficeExtension.Utility.isNullOrUndefined(i))return null;if(typeof i!="object"&&OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument,"searchOptions"),i instanceof n.SearchOptions)return i;u=n.SearchOptions.newObject(t);for(r in i)i.hasOwnProperty(r)&&(u[r]=i[r]);return u}var e=OfficeExtension.ObjectPathFactory.createPropertyObjectPath,r=OfficeExtension.ObjectPathFactory.createMethodObjectPath,a=OfficeExtension.ObjectPathFactory.createIndexerObjectPath,ni=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath,rr=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer,ur=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt,v=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt,f=OfficeExtension.ActionFactory.createMethodAction,u=OfficeExtension.ActionFactory.createSetPropertyAction,o=OfficeExtension.Utility.isNullOrUndefined,t=OfficeExtension.Utility.isUndefined,i=OfficeExtension.Utility.throwIfNotLoaded,s=OfficeExtension.Utility.load,h=OfficeExtension.Utility.fixObjectPathIfNecessary,c=OfficeExtension.Utility._addActionResultHandler,l=OfficeExtension.Utility._handleNavigationPropertyResults,p=OfficeExtension.Utility.adjustToDateTime,ti=function(a){function v(){a.apply(this,arguments)}return __extends(v,a),Object.defineProperty(v.prototype,"_className",{get:function(){return"Body"},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"contentControls",{get:function(){return this.m_contentControls||(this.m_contentControls=new n.ContentControlCollection(this.context,e(this.context,this,"ContentControls",!0,!1))),this.m_contentControls},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"font",{get:function(){return this.m_font||(this.m_font=new n.Font(this.context,e(this.context,this,"Font",!1,!1))),this.m_font},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"inlinePictures",{get:function(){return this.m_inlinePictures||(this.m_inlinePictures=new n.InlinePictureCollection(this.context,e(this.context,this,"InlinePictures",!0,!1))),this.m_inlinePictures},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"lists",{get:function(){return this.m_lists||(this.m_lists=new n.ListCollection(this.context,e(this.context,this,"Lists",!0,!1))),this.m_lists},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"paragraphs",{get:function(){return this.m_paragraphs||(this.m_paragraphs=new n.ParagraphCollection(this.context,e(this.context,this,"Paragraphs",!0,!1))),this.m_paragraphs},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentBody",{get:function(){return this.m_parentBody||(this.m_parentBody=new n.Body(this.context,e(this.context,this,"ParentBody",!1,!1))),this.m_parentBody},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentBodyOrNullObject",{get:function(){return this.m_parentBodyOrNullObject||(this.m_parentBodyOrNullObject=new n.Body(this.context,e(this.context,this,"ParentBodyOrNullObject",!1,!1))),this.m_parentBodyOrNullObject},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentContentControl",{get:function(){return this.m_parentContentControl||(this.m_parentContentControl=new n.ContentControl(this.context,e(this.context,this,"ParentContentControl",!1,!1))),this.m_parentContentControl},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentContentControlOrNullObject",{get:function(){return this.m_parentContentControlOrNullObject||(this.m_parentContentControlOrNullObject=new n.ContentControl(this.context,e(this.context,this,"ParentContentControlOrNullObject",!1,!1))),this.m_parentContentControlOrNullObject},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentSection",{get:function(){return this.m_parentSection||(this.m_parentSection=new n.Section(this.context,e(this.context,this,"ParentSection",!1,!1))),this.m_parentSection},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentSectionOrNullObject",{get:function(){return this.m_parentSectionOrNullObject||(this.m_parentSectionOrNullObject=new n.Section(this.context,e(this.context,this,"ParentSectionOrNullObject",!1,!1))),this.m_parentSectionOrNullObject},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"tables",{get:function(){return this.m_tables||(this.m_tables=new n.TableCollection(this.context,e(this.context,this,"Tables",!0,!1))),this.m_tables},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"style",{get:function(){return i("style",this.m_style,"Body",this._isNull),this.m_style},set:function(n){this.m_style=n;u(this.context,this,"Style",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"styleBuiltIn",{get:function(){return i("styleBuiltIn",this.m_styleBuiltIn,"Body",this._isNull),this.m_styleBuiltIn},set:function(n){this.m_styleBuiltIn=n;u(this.context,this,"StyleBuiltIn",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"text",{get:function(){return i("text",this.m_text,"Body",this._isNull),this.m_text},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"type",{get:function(){return i("type",this.m_type,"Body",this._isNull),this.m_type},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"Body",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),v.prototype.set=function(n,t){this._recursivelySet(n,t,["style","styleBuiltIn"],["font"],["contentControls","inlinePictures","lists","paragraphs","parentBody","parentBodyOrNullObject","parentContentControl","parentContentControlOrNullObject","parentSection","parentSectionOrNullObject","tables","contentControls","inlinePictures","lists","paragraphs","parentBody","parentBodyOrNullObject","parentContentControl","parentContentControlOrNullObject","parentSection","parentSectionOrNullObject","tables"])},v.prototype.clear=function(){f(this.context,this,"Clear",0,[])},v.prototype.getHtml=function(){var t=f(this.context,this,"GetHtml",1,[]),n=new OfficeExtension.ClientResult;return c(this,t,n),n},v.prototype.getOoxml=function(){var t=f(this.context,this,"GetOoxml",1,[]),n=new OfficeExtension.ClientResult;return c(this,t,n),n},v.prototype.getRange=function(t){return new n.Range(this.context,r(this.context,this,"GetRange",1,[t],!1,!1,null))},v.prototype.insertBreak=function(n,t){f(this.context,this,"InsertBreak",0,[n,t])},v.prototype.insertContentControl=function(){return new n.ContentControl(this.context,r(this.context,this,"InsertContentControl",0,[],!1,!0,null))},v.prototype.insertFileFromBase64=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertFileFromBase64",0,[t,i],!1,!0,null))},v.prototype.insertHtml=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertHtml",0,[t,i],!1,!0,null))},v.prototype.insertInlinePictureFromBase64=function(t,i){return new n.InlinePicture(this.context,r(this.context,this,"InsertInlinePictureFromBase64",0,[t,i],!1,!0,null))},v.prototype.insertOoxml=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertOoxml",0,[t,i],!1,!0,null))},v.prototype.insertParagraph=function(t,i){return new n.Paragraph(this.context,r(this.context,this,"InsertParagraph",0,[t,i],!1,!0,null))},v.prototype.insertTable=function(t,i,u,f){return new n.Table(this.context,r(this.context,this,"InsertTable",0,[t,i,u,f],!1,!0,null))},v.prototype.insertText=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertText",0,[t,i],!1,!0,null))},v.prototype.search=function(t,i){return i=y(this.context,i),new n.RangeCollection(this.context,r(this.context,this,"Search",1,[t,i],!0,!1,null))},v.prototype.select=function(n){f(this.context,this,"Select",1,[n])},v.prototype._KeepReference=function(){f(this.context,this,"_KeepReference",1,[])},v.prototype._handleResult=function(n){if(a.prototype._handleResult.call(this,n),!o(n)){var i=n;h(this,i);t(i.Style)||(this.m_style=i.Style);t(i.StyleBuiltIn)||(this.m_styleBuiltIn=i.StyleBuiltIn);t(i.Text)||(this.m_text=i.Text);t(i.Type)||(this.m_type=i.Type);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);l(this,i,["contentControls","ContentControls","font","Font","inlinePictures","InlinePictures","lists","Lists","paragraphs","Paragraphs","parentBody","ParentBody","parentBodyOrNullObject","ParentBodyOrNullObject","parentContentControl","ParentContentControl","parentContentControlOrNullObject","ParentContentControlOrNullObject","parentSection","ParentSection","parentSectionOrNullObject","ParentSectionOrNullObject","tables","Tables"])}},v.prototype.load=function(n){return s(this,n),this},v.prototype._handleIdResult=function(n){(a.prototype._handleIdResult.call(this,n),o(n))||t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId)},v.prototype.track=function(){return this.context.trackedObjects.add(this),this},v.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},v.prototype.toJSON=function(){return{font:this.m_font,style:this.m_style,styleBuiltIn:this.m_styleBuiltIn,text:this.m_text,type:this.m_type}},v}(OfficeExtension.ClientObject),w,b,k,d,g,nt,tt,it,rt,ut,ft,et,ot,st,ht,ct,lt,at,vt,yt,pt,wt,bt,kt,dt,gt,ii,ri,ui,fi,ei,oi,si,hi,ci,li,ai,vi,yi,pi,wi,bi,ki,di,gi,nr,tr,ir;n.Body=ti;w=function(a){function v(){a.apply(this,arguments)}return __extends(v,a),Object.defineProperty(v.prototype,"_className",{get:function(){return"ContentControl"},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"contentControls",{get:function(){return this.m_contentControls||(this.m_contentControls=new n.ContentControlCollection(this.context,e(this.context,this,"ContentControls",!0,!1))),this.m_contentControls},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"font",{get:function(){return this.m_font||(this.m_font=new n.Font(this.context,e(this.context,this,"Font",!1,!1))),this.m_font},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"inlinePictures",{get:function(){return this.m_inlinePictures||(this.m_inlinePictures=new n.InlinePictureCollection(this.context,e(this.context,this,"InlinePictures",!0,!1))),this.m_inlinePictures},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"lists",{get:function(){return this.m_lists||(this.m_lists=new n.ListCollection(this.context,e(this.context,this,"Lists",!0,!1))),this.m_lists},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"paragraphs",{get:function(){return this.m_paragraphs||(this.m_paragraphs=new n.ParagraphCollection(this.context,e(this.context,this,"Paragraphs",!0,!1))),this.m_paragraphs},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentBody",{get:function(){return this.m_parentBody||(this.m_parentBody=new n.Body(this.context,e(this.context,this,"ParentBody",!1,!1))),this.m_parentBody},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentContentControl",{get:function(){return this.m_parentContentControl||(this.m_parentContentControl=new n.ContentControl(this.context,e(this.context,this,"ParentContentControl",!1,!1))),this.m_parentContentControl},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentContentControlOrNullObject",{get:function(){return this.m_parentContentControlOrNullObject||(this.m_parentContentControlOrNullObject=new n.ContentControl(this.context,e(this.context,this,"ParentContentControlOrNullObject",!1,!1))),this.m_parentContentControlOrNullObject},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentTable",{get:function(){return this.m_parentTable||(this.m_parentTable=new n.Table(this.context,e(this.context,this,"ParentTable",!1,!1))),this.m_parentTable},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentTableCell",{get:function(){return this.m_parentTableCell||(this.m_parentTableCell=new n.TableCell(this.context,e(this.context,this,"ParentTableCell",!1,!1))),this.m_parentTableCell},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentTableCellOrNullObject",{get:function(){return this.m_parentTableCellOrNullObject||(this.m_parentTableCellOrNullObject=new n.TableCell(this.context,e(this.context,this,"ParentTableCellOrNullObject",!1,!1))),this.m_parentTableCellOrNullObject},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentTableOrNullObject",{get:function(){return this.m_parentTableOrNullObject||(this.m_parentTableOrNullObject=new n.Table(this.context,e(this.context,this,"ParentTableOrNullObject",!1,!1))),this.m_parentTableOrNullObject},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"tables",{get:function(){return this.m_tables||(this.m_tables=new n.TableCollection(this.context,e(this.context,this,"Tables",!0,!1))),this.m_tables},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"appearance",{get:function(){return i("appearance",this.m_appearance,"ContentControl",this._isNull),this.m_appearance},set:function(n){this.m_appearance=n;u(this.context,this,"Appearance",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"cannotDelete",{get:function(){return i("cannotDelete",this.m_cannotDelete,"ContentControl",this._isNull),this.m_cannotDelete},set:function(n){this.m_cannotDelete=n;u(this.context,this,"CannotDelete",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"cannotEdit",{get:function(){return i("cannotEdit",this.m_cannotEdit,"ContentControl",this._isNull),this.m_cannotEdit},set:function(n){this.m_cannotEdit=n;u(this.context,this,"CannotEdit",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"color",{get:function(){return i("color",this.m_color,"ContentControl",this._isNull),this.m_color},set:function(n){this.m_color=n;u(this.context,this,"Color",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"id",{get:function(){return i("id",this.m_id,"ContentControl",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"placeholderText",{get:function(){return i("placeholderText",this.m_placeholderText,"ContentControl",this._isNull),this.m_placeholderText},set:function(n){this.m_placeholderText=n;u(this.context,this,"PlaceholderText",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"removeWhenEdited",{get:function(){return i("removeWhenEdited",this.m_removeWhenEdited,"ContentControl",this._isNull),this.m_removeWhenEdited},set:function(n){this.m_removeWhenEdited=n;u(this.context,this,"RemoveWhenEdited",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"style",{get:function(){return i("style",this.m_style,"ContentControl",this._isNull),this.m_style},set:function(n){this.m_style=n;u(this.context,this,"Style",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"styleBuiltIn",{get:function(){return i("styleBuiltIn",this.m_styleBuiltIn,"ContentControl",this._isNull),this.m_styleBuiltIn},set:function(n){this.m_styleBuiltIn=n;u(this.context,this,"StyleBuiltIn",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"subtype",{get:function(){return i("subtype",this.m_subtype,"ContentControl",this._isNull),this.m_subtype},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"tag",{get:function(){return i("tag",this.m_tag,"ContentControl",this._isNull),this.m_tag},set:function(n){this.m_tag=n;u(this.context,this,"Tag",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"text",{get:function(){return i("text",this.m_text,"ContentControl",this._isNull),this.m_text},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"title",{get:function(){return i("title",this.m_title,"ContentControl",this._isNull),this.m_title},set:function(n){this.m_title=n;u(this.context,this,"Title",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"type",{get:function(){return i("type",this.m_type,"ContentControl",this._isNull),this.m_type},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"ContentControl",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),v.prototype.set=function(n,t){this._recursivelySet(n,t,["title","tag","placeholderText","appearance","color","removeWhenEdited","cannotDelete","cannotEdit","style","styleBuiltIn"],["font"],["contentControls","inlinePictures","lists","paragraphs","parentBody","parentContentControl","parentContentControlOrNullObject","parentTable","parentTableCell","parentTableCellOrNullObject","parentTableOrNullObject","tables","contentControls","inlinePictures","lists","paragraphs","parentBody","parentContentControl","parentContentControlOrNullObject","parentTable","parentTableCell","parentTableCellOrNullObject","parentTableOrNullObject","tables"])},v.prototype.clear=function(){f(this.context,this,"Clear",0,[])},v.prototype.delete=function(n){f(this.context,this,"Delete",0,[n])},v.prototype.getHtml=function(){var t=f(this.context,this,"GetHtml",1,[]),n=new OfficeExtension.ClientResult;return c(this,t,n),n},v.prototype.getOoxml=function(){var t=f(this.context,this,"GetOoxml",1,[]),n=new OfficeExtension.ClientResult;return c(this,t,n),n},v.prototype.getRange=function(t){return new n.Range(this.context,r(this.context,this,"GetRange",1,[t],!1,!1,null))},v.prototype.getTextRanges=function(t,i){return new n.RangeCollection(this.context,r(this.context,this,"GetTextRanges",1,[t,i],!0,!1,null))},v.prototype.insertBreak=function(n,t){f(this.context,this,"InsertBreak",0,[n,t])},v.prototype.insertFileFromBase64=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertFileFromBase64",0,[t,i],!1,!0,null))},v.prototype.insertHtml=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertHtml",0,[t,i],!1,!0,null))},v.prototype.insertInlinePictureFromBase64=function(t,i){return new n.InlinePicture(this.context,r(this.context,this,"InsertInlinePictureFromBase64",0,[t,i],!1,!0,null))},v.prototype.insertOoxml=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertOoxml",0,[t,i],!1,!0,null))},v.prototype.insertParagraph=function(t,i){return new n.Paragraph(this.context,r(this.context,this,"InsertParagraph",0,[t,i],!1,!0,null))},v.prototype.insertTable=function(t,i,u,f){return new n.Table(this.context,r(this.context,this,"InsertTable",0,[t,i,u,f],!1,!0,null))},v.prototype.insertText=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertText",0,[t,i],!1,!0,null))},v.prototype.search=function(t,i){return i=y(this.context,i),new n.RangeCollection(this.context,r(this.context,this,"Search",1,[t,i],!0,!1,null))},v.prototype.select=function(n){f(this.context,this,"Select",1,[n])},v.prototype.split=function(t,i,u,f){return new n.RangeCollection(this.context,r(this.context,this,"Split",1,[t,i,u,f],!0,!1,null))},v.prototype._KeepReference=function(){f(this.context,this,"_KeepReference",1,[])},v.prototype._handleResult=function(n){if(a.prototype._handleResult.call(this,n),!o(n)){var i=n;h(this,i);t(i.Appearance)||(this.m_appearance=i.Appearance);t(i.CannotDelete)||(this.m_cannotDelete=i.CannotDelete);t(i.CannotEdit)||(this.m_cannotEdit=i.CannotEdit);t(i.Color)||(this.m_color=i.Color);t(i.Id)||(this.m_id=i.Id);t(i.PlaceholderText)||(this.m_placeholderText=i.PlaceholderText);t(i.RemoveWhenEdited)||(this.m_removeWhenEdited=i.RemoveWhenEdited);t(i.Style)||(this.m_style=i.Style);t(i.StyleBuiltIn)||(this.m_styleBuiltIn=i.StyleBuiltIn);t(i.Subtype)||(this.m_subtype=i.Subtype);t(i.Tag)||(this.m_tag=i.Tag);t(i.Text)||(this.m_text=i.Text);t(i.Title)||(this.m_title=i.Title);t(i.Type)||(this.m_type=i.Type);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);l(this,i,["contentControls","ContentControls","font","Font","inlinePictures","InlinePictures","lists","Lists","paragraphs","Paragraphs","parentBody","ParentBody","parentContentControl","ParentContentControl","parentContentControlOrNullObject","ParentContentControlOrNullObject","parentTable","ParentTable","parentTableCell","ParentTableCell","parentTableCellOrNullObject","ParentTableCellOrNullObject","parentTableOrNullObject","ParentTableOrNullObject","tables","Tables"])}},v.prototype.load=function(n){return s(this,n),this},v.prototype._handleIdResult=function(n){(a.prototype._handleIdResult.call(this,n),o(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},v.prototype.track=function(){return this.context.trackedObjects.add(this),this},v.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},v.prototype.toJSON=function(){return{appearance:this.m_appearance,cannotDelete:this.m_cannotDelete,cannotEdit:this.m_cannotEdit,color:this.m_color,font:this.m_font,id:this.m_id,placeholderText:this.m_placeholderText,removeWhenEdited:this.m_removeWhenEdited,style:this.m_style,styleBuiltIn:this.m_styleBuiltIn,subtype:this.m_subtype,tag:this.m_tag,text:this.m_text,title:this.m_title,type:this.m_type}},v}(OfficeExtension.ClientObject);n.ContentControl=w;b=function(u){function e(){u.apply(this,arguments)}return __extends(e,u),Object.defineProperty(e.prototype,"_className",{get:function(){return"ContentControlCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return i("items",this.m__items,"ContentControlCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"ContentControlCollection",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),e.prototype.getById=function(t){return new n.ContentControl(this.context,r(this.context,this,"GetById",1,[t],!1,!1,null))},e.prototype.getByIdOrNullObject=function(t){return new n.ContentControl(this.context,r(this.context,this,"GetByIdOrNullObject",1,[t],!1,!1,null))},e.prototype.getByTag=function(t){return new n.ContentControlCollection(this.context,r(this.context,this,"GetByTag",1,[t],!0,!1,null))},e.prototype.getByTitle=function(t){return new n.ContentControlCollection(this.context,r(this.context,this,"GetByTitle",1,[t],!0,!1,null))},e.prototype.getByTypes=function(t){return new n.ContentControlCollection(this.context,r(this.context,this,"GetByTypes",1,[t],!0,!1,null))},e.prototype.getFirst=function(){return new n.ContentControl(this.context,r(this.context,this,"GetFirst",1,[],!1,!1,null))},e.prototype.getFirstOrNullObject=function(){return new n.ContentControl(this.context,r(this.context,this,"GetFirstOrNullObject",1,[],!1,!1,null))},e.prototype.getItem=function(t){return new n.ContentControl(this.context,a(this.context,this,[t]))},e.prototype._KeepReference=function(){f(this.context,this,"_KeepReference",1,[])},e.prototype._handleResult=function(i){var r,e,f,s;if((u.prototype._handleResult.call(this,i),!o(i))&&(r=i,h(this,r),t(r._ReferenceId)||(this.m__ReferenceId=r._ReferenceId),!o(r[OfficeExtension.Constants.items])))for(this.m__items=[],e=r[OfficeExtension.Constants.items],f=0;f0?i.push(t):t.tabIndex===0&&r.push(t):r.push(t);return i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;return r===0&&(r=i.indexOf(n)-i.indexOf(t)),r}),[].concat(i,r)}var o="focus",s="on",k="configurable",d="writable",h="enumerable",u="",c="undefined",t=!1,i=!0,l=2147483647,n=null,r=-1,a=r,g="&_xdm_Info=",nt="&_serializer_version=",tt="_xdm_",ft="_serializer_version=",v="#",it="&",f="class",y={},et=3e4,p=n,w=n,e=(new Date).getTime();return{set_entropy:function(n){var t,r,i;if(typeof n=="string")for(t=0;t6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(r)===OSF.DDA.SettingsManager.DataJSONSuffix&&(i=new Date(parseInt(t.slice(5,r))),i)?i:t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,i);f[u]=t}catch(e){}}return f},loadScript:function(r,u,f){var s,e,o,h,c;r&&u&&(s=window.document,e=y[r],e?e.loaded?u():e.pendingCallbacks.push(u):(o=s.createElement("script"),o.type="text/javascript",e={loaded:t,pendingCallbacks:[u],timer:n},y[r]=e,h=function(){var r,t,u;for(e.timer!=n&&(clearTimeout(e.timer),delete e.timer),e.loaded=i,r=e.pendingCallbacks.length,t=0;t1?l[l.length-1]:n,s,h,c,a;return u&&o!=n&&(o.indexOf(it)>=0&&(o=o.split(it)[0]),o=decodeURIComponent(o)),s=b(),!f&&s&&(h=window.name.indexOf(i),h>r&&(c=window.name.indexOf(";",h),c==r&&(c=window.name.length),a=window.name.substring(h,c),o?s.setItem(a,o):o=s.getItem(a))),o},getConversationId:function(){var i=window.location.search,t=n,r;return i&&(r=i.indexOf("&"),t=r>0?i.substring(1,r):i.substr(1),t&&t.charAt(t.length-1)==="="&&(t=t.substring(0,t.length-1),t&&(t=decodeURIComponent(t)))),t},getInfoItems:function(n){var t=n.split("$");return typeof t[1]==c&&(t=n.split("|")),typeof t[1]==c&&(t=n.split("%7C")),t},getXdmFieldValue:function(n,t){var r=u,f=OSF.OUtil.parseXdmInfo(t),i;if(f&&(i=OSF.OUtil.getInfoItems(f),i!=undefined&&i.length>=3))switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]),f;if(u)throw u;for(f in r)if(u=Function._validateParameter(n[f],r[f],f),u)throw u;},writeProfilerMark:function(n){window.msWriteProfilerMark&&(window.msWriteProfilerMark(n),OsfMsAjaxFactory.msAjaxDebug.trace(n))},outputDebug:function(n){typeof OsfMsAjaxFactory!==c&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){var e,f;r=r||{};for(e in u)f=u[e],r[f]==undefined&&(r[f]=i);return Object.defineProperty(n,t,r),n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[h])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[h])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[d,h,k])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[d,h,k])},finalizeProperties:function(n,r){var e,u;r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8,e=o&255,i[t++]=r>>2,i[t++]=(r&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63,isNaN(o)||(r=o>>8,f=h&255,e=h>>8,i[t++]=r>>2,i[t++]=(r&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63),isNaN(o)?i[t-1]=64:isNaN(h)&&(i[t-2]=64,i[t-1]=64),c=0;c0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){var u,i,f,r;if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(u=[],i=0;in)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=ut(u),e=f?u.length-1:0,u.length===0)return n;while(!h&&e>=0&&en)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=ut(u),l=y(u,f),s=v(u.length,l,e),s<0)return n;while(!c&&s>=0&&s0;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[r%16],r=Math.floor(r/16);for(;t<32;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[Math.floor(Math.random()*16)];return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3};OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611,WordAndroid:8388613,PowerpointAndroid:8388614};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",Reserved:"reserved",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData",Base64:"base64"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidOpenBrowserWindow:102,dispidCreateDocumentMethod:105,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];return i?(i.name||(i.name=n[this.errorCodes.ooeInternalError].name),i.message||(i.message=n[this.errorCodes.ooeInternalError].message)):i=n[this.errorCodes.ooeInternalError],i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:t.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:t.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:t.L_SSOConnectionLostError,message:t.L_SSOConnectionLostErrorMessage}}}}(),function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}(),r,i,h,u,c,l,f,a,e,v,y,p,w,b,o,k,d,g,s,nt,tt,it,rt;n.RequirementVersion=ut;r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){var f,u,e,i,r;if(n==undefined)return!1;if(t==undefined&&(t=0),f=this._setMap,u=f._sets,u.hasOwnProperty(n.toLowerCase())){e=u[n.toLowerCase()];try{if((i=this._getVersion(e),t=t+"",r=this._getVersion(t),i.major>0&&i.major>r.major)||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),i=0,r=0;if(t.length<2&&isNaN(Number(n)))throw u;else if(i=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(i)||isNaN(r))throw u;return{minor:r,major:i}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;h=function(n){function i(){n.call(this,{dialogapi:t})}return __extends(i,n),i}(i);n.DefaultDialogSetRequirement=h;u=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelClientDefaultSetRequirement=u;c=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(u);n.ExcelClientV1DefaultSetRequirement=c;l=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookClientDefaultSetRequirement=l;f=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return __extends(i,n),i}(i);n.WordClientDefaultSetRequirement=f;a=function(n){function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return __extends(i,n),i}(f);n.WordClientV1DefaultSetRequirement=a;e=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointClientDefaultSetRequirement=e;v=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(e);n.PowerpointClientV1DefaultSetRequirement=v;y=function(n){function i(){n.call(this,{selection:t,textcoercion:t})}return __extends(i,n),i}(i);n.ProjectClientDefaultSetRequirement=y;p=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return __extends(i,n),i}(i);n.ExcelWebDefaultSetRequirement=p;w=function(n){function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordWebDefaultSetRequirement=w;b=function(n){function i(){n.call(this,{activeview:t,settings:t})}return __extends(i,n),i}(i);n.PowerpointWebDefaultSetRequirement=b;o=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookWebDefaultSetRequirement=o;k=function(n){function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.SwayWebDefaultSetRequirement=k;d=function(n){function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return __extends(i,n),i}(i);n.AccessWebDefaultSetRequirement=d;g=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelIOSDefaultSetRequirement=g;s=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordIOSDefaultSetRequirement=s;nt=function(n){function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return __extends(t,n),t}(s);n.WordIOSV1DefaultSetRequirement=nt;tt=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointIOSDefaultSetRequirement=tt;it=function(n){function i(){n.call(this,{mailbox:t})}return __extends(i,n),i}(i);n.OutlookIOSDefaultSetRequirement=it;rt=function(){function n(){}var t="undefined";return n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},n.getDefaultRequirementMatrix=function(u){var f,e,s,o;return this.initializeDefaultSetMatrix(),f=undefined,e=u.get_requirementMatrix(),e!=undefined&&e.length>0&&typeof JSON!==t?(s=JSON.parse(u.get_requirementMatrix().toLowerCase()),f=new r(new i(s))):(o=n.getClientFullVersionString(u),f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[o]!=undefined?new r(n.DefaultSetArrayMatrix[o]):new r(new i({}))),f},n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix(),e;return f!=undefined&&f.length>0&&typeof JSON!==t?(e=JSON.parse(n.get_requirementMatrix().toLowerCase()),u=new r(new i(e))):u=new r(new h),u},n.getClientFullVersionString=function(n){var i=n.get_appMinorVersion(),u="",r="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;return f&&n.get_appVersion()==1?r=t==4096&&i>=15?"16.00.01":"16.00":n.get_appName()==64?r=n.get_appVersion():(u=i<10?"0"+i:""+i,r=n.get_appVersion()+"."+u),n.get_appName()+"-"+r},n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new c;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new v;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new l;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new w;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new b;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new g;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new k;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new nt;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new tt;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new it},n.Excel_RCLIENT_1600="1-16.00",n.Excel_RCLIENT_1601="1-16.01",n.Word_RCLIENT_1600="2-16.00",n.Word_RCLIENT_1601="2-16.01",n.PowerPoint_RCLIENT_1600="4-16.00",n.PowerPoint_RCLIENT_1601="4-16.01",n.Outlook_RCLIENT_1600="8-16.00",n.Excel_WAC_1600="16-16.00",n.Word_WAC_1600="32-16.00",n.Outlook_WAC_1600="64-16.00",n.Outlook_WAC_1601="64-16.01",n.Project_RCLIENT_1600="128-16.00",n.Access_WAC_1600="256-16.00",n.PowerPoint_WAC_1600="512-16.00",n.Excel_IOS_1600="1024-16.00",n.SWAY_WAC_1600="2048-16.00",n.Word_IOS_1600="4096-16.00",n.Word_IOS_16001="4096-16.00.01",n.PowerPoint_IOS_1600="8192-16.00",n.Outlook_IOS_1600="65536-16.00",n.DefaultSetArrayMatrix={},n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))}(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}return n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n},n.getInstance=function(){return n.hostObj===undefined&&(n.hostObj=new n),n.hostObj},n.prototype.getPlatform=function(){var n=this,t;return n.hostInfo.hostPlatform&&(t=n.hostInfo.hostPlatform.toLowerCase(),n.platformRemappings[t])?n.platformRemappings[t]:null},n.prototype.getHost=function(){var n=this,t;if(n.hostInfo.hostType){if(t=n.hostInfo.hostType.toLowerCase(),n.camelCaseMappings[t])return n.camelCaseMappings[t];if(t=n.capitalizeFirstLetter(n.hostInfo.hostType),Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null},n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null},n}();n.Host=t})(t=n.HostName||(n.HostName={}))}(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){n||(window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,n=!0)},disableShortcut:function(){n&&(t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window),n=!1)}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i,r,o,u,f,e;if(n&&typeof n=="string"&&(r=n.indexOf("#"),r!=-1)){o=n.substring(0,r);u=n.substring(r+1);switch(o){case"binding":case"bindings":u&&(i=new OSF.DDA.BindingPromise(u))}}if(i)return i.onFail=t,i;else if(t)if(f=typeof t,f=="function")e={},e[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(e,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext));else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f);};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this,s,e;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.auth&&OSF.OUtil.defineEnumerableProperty(f,"auth",{value:n.auth});n.application&&OSF.OUtil.defineEnumerableProperty(f,"application",{value:n.application});n.get_isDialog()?(e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e})):(t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t}),r&&(s=r.displayName||"appOM",delete r.displayName,OSF.OUtil.defineEnumerableProperty(f,s,{value:r})),u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}}),e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e}))};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Application=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this,u;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;return OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext()),n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,e=n.length,o=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){var u,i,r;for(u in n){if(i=n[u],r=t[u],i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw o();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw o();}};f.extractRequiredArguments=function(t,i,r){var f,u,h,s,c,l;if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(c=n.length-1;c>=s;c--){l=n[c];switch(typeof l){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=l;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}if(f=o.fillOptions(f,i,r,u),e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;return o.verifyArguments(t,f),f}var h="function",s=n.length,o=new OSF.DDA.ApiMethodCall(n,t,i,f,e);this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),u=c(n,r,t,i);return o.constructCallArgs(r,u,t,i)};this.processResponse=function(n,t,i,f){return n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n)};this.getCallArgs=function(n){for(var t,u,r,i=n.length-1;i>=s;i--){r=n[i];switch(typeof r){case"object":t=r;break;case h:u=r}}return t=t||{},u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u),t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],i=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],t,i,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback],u,r;f&&(u={},u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?u[OSF.DDA.AsyncResultEnum.Properties.Value]=i:(r={},i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i),f(new OSF.DDA.AsyncResult(u,r)))};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.SyncMethodNames[t]=i};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){function o(n,i,r,u){var o,c,s,h;if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(s=n.length-1;s>=e;s--){h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}return o=f.fillOptions(o,i,r,u),f.verifyArguments(t,o),o}var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),u=o(n,r,t,i);return f.constructCallArgs(r,u,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){function e(i,f){var a=i?{}:undefined,s,h,o,v,c,l;for(s in i){if(h=i[s],OSF.DDA.ListType.isListType(s)){o=[];for(v in h)o.push(e(h[v],f))}else OSF.OUtil.listContainsKey(r,s)?o=r[s][f](h):f==u&&n.preserveNesting(s)?o=e(h,f):(c=t[s],c?(l=c[f],l&&(o=l[h],o===undefined&&(o=h))):o=h);a[s]=o}return a}function l(i,r){var e,u,h,s;for(u in r)h=n.isComplexType(u)?l(i,t[u][o]):i[u],h!=undefined&&(e||(e={}),s=r[u],s==f&&(s=u),e[s]=n.pack(u,h));return e}function s(i,r,e){var o,a,h,l,p,v,y;e||(e={});for(o in r){if(a=r[o],a==f)h=i;else if(a==c){e[o]=i.toArray();continue}else h=i[a];if(h===null||h===undefined)e[o]=undefined;else if(h=n.unpack(o,h),n.isComplexType(o))l=t[o][u],n.preserveNesting(o)?e[o]=s(h,l):s(h,l,e);else if(OSF.DDA.ListType.isListType(o)){l={};p=OSF.DDA.ListType.getDescriptor(o);l[p]=f;v=new Array(h.length);for(y in h)v[y]=s(h[y],l);e[o]=v}else e[o]=h}return e}function a(n,i,r){var f=t[n][r],u,o,c;return r=="toHost"?(o=e(i,r),u=l(o,f)):r==h&&(c=s(i,f),u=e(c,r)),u}var h="fromHost",i=this,o="toHost",u=h,c="sourceData",f="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];t||(t={});i.addMapping=function(n,i){var e,h,c,l,r,s,a,v;if(i.map){e=i.map;h={};for(c in e)l=e[c],l==f&&(l=c),h[l]=c}else e=i.toHost,h=i.fromHost;if(r=t[n],r){s=r[o];for(a in s)e[a]=s[a];s=r[u];for(v in s)h[v]=s[v]}else r=t[n]={};r[o]=e;r[u]=h};i.toHost=function(n,t){return a(n,t,o)};i.fromHost=function(n,t){return a(n,t,u)};i.self=f;i.sourceData=c;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){return this.isDynamicType(n)?t[n].toHost(i):i};i.unpack=function(n,i){return this.isDynamicType(n)?t[n].fromHost(i):i}};OSF.DDA.getDecoratedParameterMap=function(n,t){function r(n){var i=null,r,t;if(n)for(i={},r=n.length,t=0;t1?i=u+c+t:s.length>0&&(i=u+f+h+t),o?[i,r,o].join(""):i}function o(n){if(!n)return null;var t=document.createElement("a");return t.href=n,t.protocol+"//"+t.host}function s(){try{for(var i=["Windows NT 6.1","Windows NT 6.2","Windows NT 6.3"],r=window.navigator.userAgent,n=0,u=i.length;n-1)return t();return!1}catch(f){return OsfMsAjaxFactory.msAjaxDebug.trace("Error happens in shouldUseLocalStorageToPassMessage: "+f),!1}}function t(){try{var n=window.navigator.userAgent;return n.indexOf("MSIE ")>-1||n.indexOf("Trident/")>-1||n.indexOf("Edge/")>-1}catch(t){return OsfMsAjaxFactory.msAjaxDebug.trace("Error happens in isInternetExplorer: "+t),!1}}var i="^https://[a-z0-9-]+.(officeapps.live|officeapps-df.live|partner.officewebapps).com/";n.parseAppContextFromWindowName=r;n.serializeObjectToString=u;n.isHostTrusted=f;n.addHostInfoAsQueryParam=e;n.getDomainForUrl=o;n.shouldUseLocalStorageToPassMessage=s;n.isInternetExplorer=t})(t=n.WACUtils||(n.WACUtils={}))}(OfficeExt||(OfficeExt={})),function(n){var e="\n",i=!0,t=null,r="undefined",h=function(){function n(){}return n.isInstanceOfType=function(n,u){if(typeof u===r||u===t)return!1;if(u instanceof n)return i;var f=u.constructor;return f&&typeof f=="function"&&f.__typeName&&f.__typeName!=="Object"||(f=Object),!!(f===n)||f.__typeName&&n.__typeName&&f.__typeName===n.__typeName},n}(),o,u,s,f;n.MsAjaxTypeHelper=h;o=function(){function n(){}var i="Parameter name: {0}";return n.create=function(n,t){var i=new Error(n),r;if(i.message=n,t)for(r in t)i[r]=t[r];return i.popStackFrame(),i},n.parameterCount=function(t){var r="Sys.ParameterCountException: "+(t?t:"Parameter count mismatch."),i=n.create(r,{name:"Sys.ParameterCountException"});return i.popStackFrame(),i},n.argument=function(t,r){var o="Sys.ArgumentException: "+(r?r:"Value does not fall within the expected range."),f;return t&&(o+=e+u.format(i,t)),f=n.create(o,{name:"Sys.ArgumentException",paramName:t}),f.popStackFrame(),f},n.argumentNull=function(t,r){var o="Sys.ArgumentNullException: "+(r?r:"Value cannot be null."),f;return t&&(o+=e+u.format(i,t)),f=n.create(o,{name:"Sys.ArgumentNullException",paramName:t}),f.popStackFrame(),f},n.argumentOutOfRange=function(f,o,s){var h="Sys.ArgumentOutOfRangeException: "+(s?s:"Specified argument was out of the range of valid values."),c;return f&&(h+=e+u.format(i,f)),typeof o!==r&&o!==t&&(h+=e+u.format("Actual value was {0}.",o)),c=n.create(h,{name:"Sys.ArgumentOutOfRangeException",paramName:f,actualValue:o}),c.popStackFrame(),c},n.argumentType=function(t,r,f,o){var s="Sys.ArgumentTypeException: ",h;return s+=o?o:r&&f?u.format("Object of type '{0}' cannot be converted to type '{1}'.",r.getName?r.getName():r,f.getName?f.getName():f):"Object cannot be converted to the required type.",t&&(s+=e+u.format(i,t)),h=n.create(s,{name:"Sys.ArgumentTypeException",paramName:t,actualType:r,expectedType:f}),h.popStackFrame(),h},n.argumentUndefined=function(t,r){var o="Sys.ArgumentUndefinedException: "+(r?r:"Value cannot be undefined."),f;return t&&(o+=e+u.format(i,t)),f=n.create(o,{name:"Sys.ArgumentUndefinedException",paramName:t}),f.popStackFrame(),f},n.invalidOperation=function(t){var r="Sys.InvalidOperationException: "+(t?t:"Operation is not valid due to the current state of the object."),i=n.create(r,{name:"Sys.InvalidOperationException"});return i.popStackFrame(),i},n}();n.MsAjaxError=o;u=function(){function n(){}return n.format=function(n){for(var r,i=[],t=1;t0){for(r=[],i=0;i=s)break;if(f=Function._validateParameter(n[e],o,h),f)return f.popStackFrame(),f}return t}),Function._validateParameterCount||(Function._validateParameterCount=function(n,r,u){var f,s,e=r.length,h=n.length,c,l,a;if(he)for(s=i,f=0;f0){var t=h.shift();d(t)}else clearInterval(u),u=n}else OsfMsAjaxFactory.msAjaxDebug.trace(v)}function d(n){o=n.getInvokeBlockingFlag();n.invoke();c=(new Date).getTime()}function ot(){var r,u,s,e,h,o,t;if(f){u=0;s=new Date;for(h in i){r=i[h];for(o in r._callbackList)if(t=r._callbackList[o],e=t.timeout?t.timeout:b,e>=0&&Math.abs(s.getTime()-t.createdOn)>=e)try{t.callback&&t.callback(Microsoft.Office.Common.InvokeResultCode.errorHandlingMethodCallTimedout,n)}finally{delete r._callbackList[o]}else u++}u===0&&(clearInterval(f),f=n)}else OsfMsAjaxFactory.msAjaxDebug.trace(v)}function st(){o=t}function ht(n){if(window.addEventListener)window.addEventListener("message",n,t);else if(navigator.userAgent.indexOf("MSIE")>-1&&window.attachEvent)window.attachEvent("onmessage",n);else{OsfMsAjaxFactory.msAjaxDebug.trace("Browser doesn't support the required API.");throw OsfMsAjaxFactory.msAjaxError.argument("Browser");}}function ct(n,i){var f=t,r,u;return n===e?e:!n||!i||!n.length||!i.length?f:(r=document.createElement("a"),u=document.createElement("a"),r.href=n,u.href=i,f=g(r,u),delete r,u,f)}function l(n,i){var u=t,f,e,r;if(!i||!i.length||!n||!(n instanceof Array)||!n.length)return u;for(f=document.createElement("a"),e=document.createElement("a"),f.href=i,r=0;rp)&&!o?(d(ht),lt=t):u=setInterval(et,p));lt&&ft(ht)}catch(w){s&&s._onHandleRequestError&&s._onHandleRequestError(r,w);nt=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequest;w==tt&&(nt=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied);var pt=new Microsoft.Office.Common.Response(r._actionName,r._conversationId,r._correlationId,nt,Microsoft.Office.Common.ResponseType.forCalling,w),wt=Microsoft.Office.Common.MessagePackager.envelope(pt,f),at=t;try{at=!!(i.source&&i.source.postMessage)}catch(w){}at&&i.source.postMessage(wt,b)}}else if(r._messageType===Microsoft.Office.Common.MessageType.response){if(h=rt(r._conversationId),!h)return;if(h._serializerVersion=f,!ct(h._targetUrl,i.origin))throw"Failed orgin check";if(r._responseType===Microsoft.Office.Common.ResponseType.forCalling){if(v=h._callbackList[r._correlationId],v)try{v.callback&&v.callback(r._errorCode,r._data)}finally{delete h._callbackList[r._correlationId]}}else y=h._eventHandlerList[r._actionName],y!==undefined&&y!==n&&y(r._data)}else return}}function nt(){k||(ht(lt),k=e)}var a="serviceEndPointId",e=!0,v="channel is not ready.",s="conversationId",y="Unknown conversation Id.",t=!1,n=null,h=[],c=n,u=n,p=10,o=t,f=n,tt=2e3,w=65e3,b=w,r={},i={},k=t;return{connect:function(n,t,r,u){var f=i[n];return f||(nt(),f=new Microsoft.Office.Common.ClientEndPoint(n,t,r,u),i[n]=f),f},getClientEndPoint:function(n){var r=Function._validateParams(arguments,[{name:s,type:String,mayBeNull:t}]);if(r)throw r;return i[n]},createServiceEndPoint:function(n){nt();var t=new Microsoft.Office.Common.ServiceEndPoint(n);return r[n]=t,t},getServiceEndPoint:function(n){var i=Function._validateParams(arguments,[{name:a,type:String,mayBeNull:t}]);if(i)throw i;return r[n]},deleteClientEndPoint:function(n){var r=Function._validateParams(arguments,[{name:s,type:String,mayBeNull:t}]);if(r)throw r;delete i[n]},deleteServiceEndPoint:function(n){var i=Function._validateParams(arguments,[{name:a,type:String,mayBeNull:t}]);if(i)throw i;delete r[n]},checkUrlWithAppDomains:function(n,t){return l(n,t)},_setMethodTimeout:function(n){var i=Function._validateParams(arguments,[{name:"methodTimeout",type:Number,mayBeNull:t}]);if(i)throw i;b=n<=0?w:n},_startMethodTimeoutTimer:function(){f||(f=setInterval(ot,tt))}}}();Microsoft.Office.Common.Message=function(n,t,i,r,u){var e=!1,f=this,o=Function._validateParams(arguments,[{name:"messageType",type:Number,mayBeNull:e},{name:"actionName",type:String,mayBeNull:e},{name:"conversationId",type:String,mayBeNull:e},{name:"correlationId",mayBeNull:e},{name:"data",mayBeNull:!0,optional:!0}]);if(o)throw o;f._messageType=n;f._actionName=t;f._conversationId=i;f._correlationId=r;f._origin=window.location.href;f._data=typeof u=="undefined"?null:u};Microsoft.Office.Common.Message.prototype={getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getOrigin:function(){return this._origin},getData:function(){return this._data},getMessageType:function(){return this._messageType}};Microsoft.Office.Common.Request=function(n,t,i,r,u){Microsoft.Office.Common.Request.uber.constructor.call(this,Microsoft.Office.Common.MessageType.request,n,i,r,u);this._actionType=t};OSF.OUtil.extend(Microsoft.Office.Common.Request,Microsoft.Office.Common.Message);Microsoft.Office.Common.Request.prototype.getActionType=function(){return this._actionType};Microsoft.Office.Common.Response=function(n,t,i,r,u,f){Microsoft.Office.Common.Response.uber.constructor.call(this,Microsoft.Office.Common.MessageType.response,n,t,i,f);this._errorCode=r;this._responseType=u};OSF.OUtil.extend(Microsoft.Office.Common.Response,Microsoft.Office.Common.Message);Microsoft.Office.Common.Response.prototype.getErrorCode=function(){return this._errorCode};Microsoft.Office.Common.Response.prototype.getResponseType=function(){return this._responseType};Microsoft.Office.Common.MessagePackager={envelope:function(n){return typeof n=="object"&&(n._serializerVersion=OSF.SerializerVersion.Browser),JSON.stringify(n)},unenvelope:function(n){return JSON.parse(n)}};Microsoft.Office.Common.ResponseSender=function(n,t,i,r,u,f,e){var h=!1,o=this,c=Function._validateParams(arguments,[{name:"requesterWindow",mayBeNull:h},{name:"requesterUrl",type:String,mayBeNull:h},{name:"actionName",type:String,mayBeNull:h},{name:"conversationId",type:String,mayBeNull:h},{name:"correlationId",mayBeNull:h},{name:"responsetype",type:Number,maybeNull:h},{name:"serializerVersion",type:Number,maybeNull:!0,optional:!0}]),s;if(c)throw c;o._requesterWindow=n;o._requesterUrl=t;o._actionName=i;o._conversationId=r;o._correlationId=u;o._invokeResultCode=Microsoft.Office.Common.InvokeResultCode.noError;o._responseType=f;s=o;o._send=function(n){try{var t=new Microsoft.Office.Common.Response(s._actionName,s._conversationId,s._correlationId,s._invokeResultCode,s._responseType,n),i=Microsoft.Office.Common.MessagePackager.envelope(t,e);s._requesterWindow.postMessage(i,s._requesterUrl)}catch(r){OsfMsAjaxFactory.msAjaxDebug.trace("ResponseSender._send error:"+r.message)}}};Microsoft.Office.Common.ResponseSender.prototype={getRequesterWindow:function(){return this._requesterWindow},getRequesterUrl:function(){return this._requesterUrl},getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getSend:function(){return this._send},setResultCode:function(n){this._invokeResultCode=n}};Microsoft.Office.Common.InvokeCompleteCallback=function(n,t,i,r,u,f,e){var s=this,o;Microsoft.Office.Common.InvokeCompleteCallback.uber.constructor.call(s,n,t,i,r,u,Microsoft.Office.Common.ResponseType.forCalling,e);s._postCallbackHandler=f;o=s;s._send=function(n,t){t!=undefined&&(o._invokeResultCode=t);try{var i=new Microsoft.Office.Common.Response(o._actionName,o._conversationId,o._correlationId,o._invokeResultCode,o._responseType,n),r=Microsoft.Office.Common.MessagePackager.envelope(i,e);o._requesterWindow.postMessage(r,o._requesterUrl);o._postCallbackHandler()}catch(u){OsfMsAjaxFactory.msAjaxDebug.trace("InvokeCompleteCallback._send error:"+u.message)}}};OSF.OUtil.extend(Microsoft.Office.Common.InvokeCompleteCallback,Microsoft.Office.Common.ResponseSender);Microsoft.Office.Common.Invoker=function(n,t,i,r,u,f,e){var s=!0,h=!1,o=this,c=Function._validateParams(arguments,[{name:"methodObject",mayBeNull:h},{name:"paramValue",mayBeNull:s},{name:"invokeCompleteCallback",mayBeNull:h},{name:"eventHandlerProxyList",mayBeNull:s},{name:"conversationId",type:String,mayBeNull:h},{name:"eventName",type:String,mayBeNull:h},{name:"serializerVersion",type:Number,mayBeNull:s,optional:s}]);if(c)throw c;o._methodObject=n;o._param=t;o._invokeCompleteCallback=i;o._eventHandlerProxyList=r;o._conversationId=u;o._eventName=f;o._serializerVersion=e};Microsoft.Office.Common.Invoker.prototype={invoke:function(){var n=this,t,i,u,r,f;try{switch(n._methodObject.getInvokeType()){case Microsoft.Office.Common.InvokeType.async:n._methodObject.getMethod()(n._param,n._invokeCompleteCallback.getSend());break;case Microsoft.Office.Common.InvokeType.sync:t=n._methodObject.getMethod()(n._param);n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.syncRegisterEvent:i=n._createEventHandlerProxyObject(n._invokeCompleteCallback);t=n._methodObject.getMethod()(i.getSend(),n._param);n._eventHandlerProxyList[n._conversationId+n._eventName]=i.getSend();n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.syncUnregisterEvent:u=n._eventHandlerProxyList[n._conversationId+n._eventName];t=n._methodObject.getMethod()(u,n._param);delete n._eventHandlerProxyList[n._conversationId+n._eventName];n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.asyncRegisterEvent:r=n._createEventHandlerProxyObject(n._invokeCompleteCallback);n._methodObject.getMethod()(r.getSend(),n._invokeCompleteCallback.getSend(),n._param);n._eventHandlerProxyList[n._callerId+n._eventName]=r.getSend();break;case Microsoft.Office.Common.InvokeType.asyncUnregisterEvent:f=n._eventHandlerProxyList[n._callerId+n._eventName];n._methodObject.getMethod()(f,n._invokeCompleteCallback.getSend(),n._param);delete n._eventHandlerProxyList[n._callerId+n._eventName]}}catch(e){n._invokeCompleteCallback.setResultCode(Microsoft.Office.Common.InvokeResultCode.errorInResponse);n._invokeCompleteCallback.getSend()(e)}},getInvokeBlockingFlag:function(){return this._methodObject.getBlockingFlag()},_createEventHandlerProxyObject:function(n){return new Microsoft.Office.Common.ResponseSender(n.getRequesterWindow(),n.getRequesterUrl(),n.getActionName(),n.getConversationId(),n.getCorrelationId(),Microsoft.Office.Common.ResponseType.forEventing,this._serializerVersion)}};OSF.OUtil.setNamespace("WAC",OSF.DDA);OSF.DDA.WAC.UniqueArguments={Data:"Data",Properties:"Properties",BindingRequest:"DdaBindingsMethod",BindingResponse:"Bindings",SingleBindingResponse:"singleBindingResponse",GetData:"DdaGetBindingData",AddRowsColumns:"DdaAddRowsColumns",SetData:"DdaSetBindingData",ClearFormats:"DdaClearBindingFormats",SetFormats:"DdaSetBindingFormats",SettingsRequest:"DdaSettingsMethod",BindingEventSource:"ddaBinding",ArrayData:"ArrayData"};OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC);OSF.DDA.WAC.Delegate.SpecialProcessor=function(){var n=[OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,OSF.DDA.WAC.UniqueArguments.BindingRequest,OSF.DDA.WAC.UniqueArguments.BindingResponse,OSF.DDA.WAC.UniqueArguments.GetData,OSF.DDA.WAC.UniqueArguments.AddRowsColumns,OSF.DDA.WAC.UniqueArguments.SetData,OSF.DDA.WAC.UniqueArguments.ClearFormats,OSF.DDA.WAC.UniqueArguments.SetFormats,OSF.DDA.WAC.UniqueArguments.SettingsRequest,OSF.DDA.WAC.UniqueArguments.BindingEventSource],t={};OSF.DDA.WAC.Delegate.SpecialProcessor.uber.constructor.call(this,n,t)};OSF.OUtil.extend(OSF.DDA.WAC.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.WAC.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.WAC.Delegate.SpecialProcessor,[]);OSF.OUtil.setNamespace("WAC",OSF.DDA);OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC);OSF.DDA.WAC.getDelegateMethods=function(){var n={};return n[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.WAC.Delegate.executeAsync,n[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.WAC.Delegate.registerEventAsync,n[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.WAC.Delegate.unregisterEventAsync,n[OSF.DDA.DispIdHost.Delegates.OpenDialog]=OSF.DDA.WAC.Delegate.openDialog,n[OSF.DDA.DispIdHost.Delegates.MessageParent]=OSF.DDA.WAC.Delegate.messageParent,n[OSF.DDA.DispIdHost.Delegates.SendMessage]=OSF.DDA.WAC.Delegate.sendMessage,n[OSF.DDA.DispIdHost.Delegates.CloseDialog]=OSF.DDA.WAC.Delegate.closeDialog,n};OSF.DDA.WAC.Delegate.version=1;OSF.DDA.WAC.Delegate.executeAsync=function(n){(n.hostCallArgs||(n.hostCallArgs={}),n.hostCallArgs.DdaMethod={ControlId:OSF._OfficeAppFactory.getId(),Version:OSF.DDA.WAC.Delegate.version,DispatchId:n.dispId},n.hostCallArgs.__timeout__=-1,n.onCalling&&n.onCalling(),OSF.getClientEndPoint())&&OSF.getClientEndPoint().invoke("executeMethod",function(t,i){n.onReceiving&&n.onReceiving();var r;if(t==Microsoft.Office.Common.InvokeResultCode.noError)OSF.DDA.WAC.Delegate.version=i.Version,r=i.Error;else switch(t){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:r=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:r=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}n.onComplete&&n.onComplete(r,i)},n.hostCallArgs)};OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent=function(n,t){var i=(new Date).getTime();return function(r,u){t.onReceiving&&t.onReceiving();var f;if(r!=Microsoft.Office.Common.InvokeResultCode.noError)switch(r){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:f=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:f=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}else f=u?u.Error?u.Error:OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess:OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;t.onComplete&&t.onComplete(f);OSF.AppTelemetry&&OSF.AppTelemetry.onRegisterDone(n,t.dispId,Math.abs((new Date).getTime()-i),f)}};OSF.DDA.WAC.Delegate.registerEventAsync=function(n){(n.onCalling&&n.onCalling(),OSF.getClientEndPoint())&&OSF.getClientEndPoint().registerForEvent(OSF.DDA.getXdmEventName(n.targetId,n.eventType),function(t){n.onEvent&&n.onEvent(t);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!0,n),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:n.dispId,targetId:n.targetId})};OSF.DDA.WAC.Delegate.unregisterEventAsync=function(n){(n.onCalling&&n.onCalling(),OSF.getClientEndPoint())&&OSF.getClientEndPoint().unregisterForEvent(OSF.DDA.getXdmEventName(n.targetId,n.eventType),OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!1,n),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:n.dispId,targetId:n.targetId})};OSF.OUtil.setNamespace("WebApp",OSF);OSF.WebApp.AddHostInfoAndXdmInfo=function(n){return OSF._OfficeAppFactory.getWindowLocationSearch&&OSF._OfficeAppFactory.getWindowLocationHash?n+OSF._OfficeAppFactory.getWindowLocationSearch()+OSF._OfficeAppFactory.getWindowLocationHash():n};OSF.WebApp._UpdateLinksForHostAndXdmInfo=function(){for(var r,i,t=document.querySelectorAll("a[data-officejs-navigate]"),n=0;n0?n.substr(0,i):null,r=t!==null?t.toLowerCase()==="http"||t.toLowerCase()==="https":!0;return r&&n!="#"&&n!="/"&&n!=""&&n!=OSF._OfficeAppFactory.getWebAppState().webAppUrl};OSF.InitializationHelper=function(n,t,i,r,u){var f=this,e;f._hostInfo=n;f._webAppState=t;f._context=i;f._settings=r;f._hostFacade=u;f._appContext={};f._tabbableElements="a[href]:not([tabindex='-1']),area[href]:not([tabindex='-1']),button:not([disabled]):not([tabindex='-1']),input:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),textarea:not([disabled]):not([tabindex='-1']),*[tabindex]:not([tabindex='-1']),*[contenteditable]:not([disabled]):not([tabindex='-1'])";f._initializeSettings=function(n,t){var r=n.get_settings(),u=OSF.OUtil.getSessionStorage(),i,f;return u&&(i=u.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey()),i?r=JSON.parse(i):(i=JSON.stringify(r),u.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),i))),f=OSF.DDA.SettingsManager.deserializeSettings(r),t?new OSF.DDA.RefreshableSettings(f):new OSF.DDA.Settings(f)};e=function(n){var t=window.open;n.open=function(n,i,r){var u=null,f;try{u=t(n,i,r)}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppCommonMessage("Exception happens at windowOpen."+e)}return u||(f={strUrl:n,strWindowName:i,strWindowFeatures:r},OSF._OfficeAppFactory.getClientEndPoint()&&OSF._OfficeAppFactory.getClientEndPoint().invoke("ContextActivationManager_openWindowInHost",null,f)),u}};e(window)};OSF.InitializationHelper.prototype.saveAndSetDialogInfo=function(n){var u="IsDialog",t=!0,f=function(){var n=OSF.OUtil.parseXdmInfo(t),i;return n?(i=n.split("|"),i[1]):null},i=OSF.OUtil.getSessionStorage(),r;if(i){if(n||(n=OSF.OUtil.parseHostInfoFromWindowName(t,OSF._OfficeAppFactory.getWindowName())),n&&n.indexOf("isDialog")>-1){r=f();r!=null&&i.setItem(r+u,"true");this._hostInfo.isDialog=t;return}this._hostInfo.isDialog=i.getItem(OSF.OUtil.getXdmFieldValue(OSF.XdmFieldName.AppId,!1)+u)!=null?t:!1}};OSF.InitializationHelper.prototype.getAppContext=function(n,t){var i=this,e=i,r=function(n,i){var u,f,c,o,s,r,h;if(i._appName===OSF.AppName.ExcelWebApp){f=i._settings;u={};for(c in f)o=f[c],u[o[0]]=o[1]}else u=i._settings;if(n===0&&i._id!=undefined&&i._appName!=undefined&&i._appVersion!=undefined&&i._appUILocale!=undefined&&i._dataLocale!=undefined&&i._docUrl!=undefined&&i._clientMode!=undefined&&i._settings!=undefined&&i._reason!=undefined){e._appContext=i;var a=i._appInstanceId?i._appInstanceId:i._id,v=!1,y=!0,l=0;i._appMinorVersion!=undefined&&(l=i._appMinorVersion);s=undefined;i._requirementMatrix!=undefined&&(s=i._requirementMatrix);i.eToken=i.eToken?i.eToken:"";r=new OSF.OfficeAppContext(i._id,i._appName,i._appVersion,i._appUILocale,i._dataLocale,i._docUrl,i._clientMode,u,i._reason,i._osfControlType,i._eToken,i._correlationId,a,v,y,l,s,i._hostCustomMessage,i._hostFullVersion,i._clientWindowHeight,i._clientWindowWidth,i._addinName,i._appDomains,i._dialogRequirementMatrix);r._wacHostEnvironment=i._wacHostEnvironment||"0";r._isFromWacAutomation=!!i._isFromWacAutomation;OSF.AppTelemetry&&OSF.AppTelemetry.initialize(r);t(r)}else{h="Function ContextActivationManager_getAppContextAsync call failed. ErrorCode is "+n+", exception: "+i;OSF.AppTelemetry&&OSF.AppTelemetry.logAppException(h);throw h;}},u;try{i._hostInfo.isDialog&&window.opener!=null?(u=OfficeExt.WACUtils.parseAppContextFromWindowName(!1,OSF._OfficeAppFactory.getWindowName()),r(0,u)):i._webAppState.clientEndPoint.invoke("ContextActivationManager_getAppContextAsync",r,i._webAppState.id)}catch(f){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown when trying to invoke getAppContextAsync. Exception:["+f+"]");throw f;}};OSF.InitializationHelper.prototype.setAgaveHostCommunication=function(){var u=null,t=!1,n,r,i,f,e,o;try{if(n=this,r=OSF.OUtil.parseXdmInfoWithGivenFragment(t,OSF._OfficeAppFactory.getWindowLocationHash()),!r&&OSF._OfficeAppFactory.getWindowName&&(r=OSF.OUtil.parseXdmInfoFromWindowName(t,OSF._OfficeAppFactory.getWindowName())),r&&(i=OSF.OUtil.getInfoItems(r),i!=undefined&&i.length>=3&&(n._webAppState.conversationID=i[0],n._webAppState.id=i[1],n._webAppState.webAppUrl=i[2].indexOf(":")>=0?i[2]:decodeURIComponent(i[2]))),n._webAppState.wnd=window.opener!=u?window.opener:window.parent,f=OSF.OUtil.parseSerializerVersionWithGivenFragment(t,OSF._OfficeAppFactory.getWindowLocationHash()),isNaN(f)&&OSF._OfficeAppFactory.getWindowName&&(f=OSF.OUtil.parseSerializerVersionFromWindowName(t,OSF._OfficeAppFactory.getWindowName())),n._webAppState.serializerVersion=f,this._hostInfo.isDialog&&window.opener!=u)return;n._webAppState.clientEndPoint=Microsoft.Office.Common.XdmCommunicationManager.connect(n._webAppState.conversationID,n._webAppState.wnd,n._webAppState.webAppUrl,n._webAppState.serializerVersion);n._webAppState.serviceEndPoint=Microsoft.Office.Common.XdmCommunicationManager.createServiceEndPoint(n._webAppState.id);e=n._webAppState.conversationID+OSF.SharedConstants.NotificationConversationIdSuffix;n._webAppState.serviceEndPoint.registerConversation(e,n._webAppState.webAppUrl);o=function(i){var e="ContextActivationManager_notifyHost",r,f;switch(i){case OSF.AgaveHostAction.Select:n._webAppState.focused=!0;break;case OSF.AgaveHostAction.UnSelect:n._webAppState.focused=t;break;case OSF.AgaveHostAction.TabIn:case OSF.AgaveHostAction.CtrlF6In:window.focus();r=document.querySelectorAll(n._tabbableElements);f=OSF.OUtil.focusToFirstTabbable(r,t);f||(window.blur(),n._webAppState.focused=t,n._webAppState.clientEndPoint.invoke(e,u,[n._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable]));break;case OSF.AgaveHostAction.TabInShift:window.focus();r=document.querySelectorAll(n._tabbableElements);f=OSF.OUtil.focusToFirstTabbable(r,!0);f||(window.blur(),n._webAppState.focused=t,n._webAppState.clientEndPoint.invoke(e,u,[n._webAppState.id,OSF.AgaveHostAction.ExitNoFocusableShift]));break;default:OsfMsAjaxFactory.msAjaxDebug.trace("actionId "+i+" notifyAgave is wrong.")}};n._webAppState.serviceEndPoint.registerMethod("Office_notifyAgave",o,Microsoft.Office.Common.InvokeType.async,t);n.addOrRemoveEventListenersForWindow(!0)}catch(s){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown in setAgaveHostCommunication. Exception:["+s+"]");throw s;}};OSF.InitializationHelper.prototype.addOrRemoveEventListenersForWindow=function(n){var u="keypress",i=null,r="ContextActivationManager_notifyHost",t=this,f=function(){t._webAppState.focused||(t._webAppState.focused=!0);t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.Select])},e=function(){OSF&&(t._webAppState.focused&&(t._webAppState.focused=!1),t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.UnSelect]))},o=function(n){var u,f,e;n.preventDefault=n.preventDefault||function(){n.returnValue=!1};n.keyCode==117&&(n.ctrlKey||n.metaKey)?(u=OSF.AgaveHostAction.CtrlF6Exit,n.shiftKey&&(u=OSF.AgaveHostAction.CtrlF6ExitShift),t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,u])):n.keyCode==9?(n.preventDefault(),f=document.querySelectorAll(t._tabbableElements),e=OSF.OUtil.focusToNextTabbable(f,n.target||n.srcElement,n.shiftKey),e||(t._hostInfo.isDialog?OSF.OUtil.focusToFirstTabbable(f,n.shiftKey):n.shiftKey?t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.TabExitShift]):t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.TabExit]))):n.keyCode==27?(n.preventDefault(),t.dismissDialogNotification&&t.dismissDialogNotification(),t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.EscExit])):n.keyCode==113&&(n.preventDefault(),t._webAppState.clientEndPoint.invoke(r,i,[t._webAppState.id,OSF.AgaveHostAction.F2Exit]))},s=function(n){n.keyCode==117&&n.ctrlKey&&(n.preventDefault?n.preventDefault():n.returnValue=!1)};n?(OSF.OUtil.addEventListener(window,"focus",f),OSF.OUtil.addEventListener(window,"blur",e),OSF.OUtil.addEventListener(window,"keydown",o),OSF.OUtil.addEventListener(window,u,s)):(OSF.OUtil.removeEventListener(window,"focus",f),OSF.OUtil.removeEventListener(window,"blur",e),OSF.OUtil.removeEventListener(window,"keydown",o),OSF.OUtil.removeEventListener(window,u,s))};OSF.InitializationHelper.prototype.initWebDialog=function(n){if(n.get_isDialog()){if(OSF.DDA.UI.ChildUI){var t=window.opener!=null;n.ui=new OSF.DDA.UI.ChildUI(t);t&&this.registerMessageReceivedEventForWindowDialog&&this.registerMessageReceivedEventForWindowDialog()}}else OSF.DDA.UI.ParentUI&&(n.ui=new OSF.DDA.UI.ParentUI,OfficeExt.Container&&OSF.DDA.DispIdHost.addAsyncMethods(n.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync]))};OSF.InitializationHelper.prototype.initWebAuth=function(n){OSF.DDA.Auth&&(n.auth=new OSF.DDA.Auth,OSF.DDA.DispIdHost.addAsyncMethods(n.auth,[OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]))};OSF.getClientEndPoint=function(){var n=OSF._OfficeAppFactory.getInitializationHelper();return n._webAppState.clientEndPoint};OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize=function(){var n=this,t,i;n._hostInfo.isDialog&&(window.focus(),t=document.querySelectorAll(n._tabbableElements),i=OSF.OUtil.focusToFirstTabbable(t,!1),i||(window.blur(),n._webAppState.focused=!1,n._webAppState.clientEndPoint&&n._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[n._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable])))};OSF.CommonUI={HostButtonBorderColor:"#a3bde3",HostButtonBackgroundColor:"#d5e1f2"},function(n){var u="ResponseTime",f="Message",i="SessionId",r="CorrelationId",t=!0,e=function(){function n(n){this._table=n;this._fields={}}return Object.defineProperty(n.prototype,"Fields",{get:function(){return this._fields},enumerable:t,configurable:t}),Object.defineProperty(n.prototype,"Table",{get:function(){return this._table},enumerable:t,configurable:t}),n.prototype.SerializeFields=function(){},n.prototype.SetSerializedField=function(n,t){typeof t!="undefined"&&t!==null&&(this._serializedFields[n]=t.toString())},n.prototype.SerializeRow=function(){var n=this;return n._serializedFields={},n.SetSerializedField("Table",n._table),n.SerializeFields(),JSON.stringify(n._serializedFields)},n}(),o,s,h,c,l;n.BaseUsageData=e;o=function(n){function u(){n.call(this,"AppActivated")}var e="IsFromWacAutomation",o="WacHostEnvironment",s="HostJSVersion",h="OfficeJSVersion",c="DocUrl",l="AppSizeHeight",a="AppSizeWidth",v="ClientId",y="HostVersion",p="Host",w="UserId",b="Browser",k="AssetId",d="AppURL",g="AppInstanceId",nt="AppId";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,nt,{get:function(){return this.Fields[nt]},set:function(n){this.Fields[nt]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,g,{get:function(){return this.Fields[g]},set:function(n){this.Fields[g]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,d,{get:function(){return this.Fields[d]},set:function(n){this.Fields[d]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,k,{get:function(){return this.Fields[k]},set:function(n){this.Fields[k]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,b,{get:function(){return this.Fields[b]},set:function(n){this.Fields[b]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,w,{get:function(){return this.Fields[w]},set:function(n){this.Fields[w]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,p,{get:function(){return this.Fields[p]},set:function(n){this.Fields[p]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,y,{get:function(){return this.Fields[y]},set:function(n){this.Fields[y]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,v,{get:function(){return this.Fields[v]},set:function(n){this.Fields[v]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,a,{get:function(){return this.Fields[a]},set:function(n){this.Fields[a]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,l,{get:function(){return this.Fields[l]},set:function(n){this.Fields[l]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,c,{get:function(){return this.Fields[c]},set:function(n){this.Fields[c]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(nt,n.AppId);n.SetSerializedField(g,n.AppInstanceId);n.SetSerializedField(d,n.AppURL);n.SetSerializedField(k,n.AssetId);n.SetSerializedField(b,n.Browser);n.SetSerializedField(w,n.UserId);n.SetSerializedField(p,n.Host);n.SetSerializedField(y,n.HostVersion);n.SetSerializedField(v,n.ClientId);n.SetSerializedField(a,n.AppSizeWidth);n.SetSerializedField(l,n.AppSizeHeight);n.SetSerializedField(f,n.Message);n.SetSerializedField(c,n.DocUrl);n.SetSerializedField(h,n.OfficeJSVersion);n.SetSerializedField(s,n.HostJSVersion);n.SetSerializedField(o,n.WacHostEnvironment);n.SetSerializedField(e,n.IsFromWacAutomation)},u}(e);n.AppActivatedUsageData=o;s=function(n){function f(){n.call(this,"ScriptLoad")}var e="StartTime",o="ScriptId";return __extends(f,n),Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t}),f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(o,n.ScriptId);n.SetSerializedField(e,n.StartTime);n.SetSerializedField(u,n.ResponseTime)},f}(e);n.ScriptLoadUsageData=s;h=function(n){function u(){n.call(this,"AppClosed")}var f="CloseMethod",e="OpenTime",o="AppSizeFinalHeight",s="AppSizeFinalWidth",h="FocusTime";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(h,n.FocusTime);n.SetSerializedField(s,n.AppSizeFinalWidth);n.SetSerializedField(o,n.AppSizeFinalHeight);n.SetSerializedField(e,n.OpenTime);n.SetSerializedField(f,n.CloseMethod)},u}(e);n.AppClosedUsageData=h;c=function(n){function f(){n.call(this,"APIUsage")}var e="ErrorType",o="Parameters",s="APIID",h="APIType";return __extends(f,n),Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(h,n.APIType);n.SetSerializedField(s,n.APIID);n.SetSerializedField(o,n.Parameters);n.SetSerializedField(u,n.ResponseTime);n.SetSerializedField(e,n.ErrorType)},f}(e);n.APIUsageUsageData=c;l=function(n){function u(){n.call(this,"AppInitialization")}var e="SuccessCode";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(e,n.SuccessCode);n.SetSerializedField(f,n.Message)},u}(e);n.AppInitializationUsageData=l}(OSFLog||(OSFLog={})),function(n){"use strict";function u(){OSF.Logger&&OSF.Logger.ulsEndpoint&&OSF.Logger.ulsEndpoint.loadProxyFrame()}function f(n,t,i){if(OSF.Logger&&OSF.Logger.ulsEndpoint){var r={traceLevel:n,message:t,flag:i,internalLog:!0},u=JSON.stringify(r);OSF.Logger.ulsEndpoint.writeLog(u)}}function e(){try{return new t}catch(n){return null}}var i,r,t;(function(n){n[n.info=0]="info";n[n.warning=1]="warning";n[n.error=2]="error"})(n.TraceLevel||(n.TraceLevel={}));i=n.TraceLevel,function(n){n[n.none=0]="none";n[n.flush=1]="flush"}(n.SendFlag||(n.SendFlag={}));r=n.SendFlag;n.allowUploadingData=u;n.sendLog=f;t=function(){function n(){var n=this,t=n;n.proxyFrame=null;n.telemetryEndPoint="https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html";n.buffer=[];n.proxyFrameReady=!1;OSF.OUtil.addEventListener(window,"message",function(n){return t.tellProxyFrameReady(n)});setTimeout(function(){t.loadProxyFrame()},3e3)}return n.prototype.writeLog=function(t){var i=this;i.proxyFrameReady===!0?i.proxyFrame.contentWindow.postMessage(t,n.telemetryOrigin):i.buffer.length<128&&i.buffer.push(t)},n.prototype.loadProxyFrame=function(){var n=this;n.proxyFrame==null&&(n.proxyFrame=document.createElement("iframe"),n.proxyFrame.setAttribute("style","display:none"),n.proxyFrame.setAttribute("src",n.telemetryEndPoint),document.head.appendChild(n.proxyFrame))},n.prototype.tellProxyFrameReady=function(t){var i=this,e=i,r,u,f;if(t.data==="ProxyFrameReadyToLog"){for(i.proxyFrameReady=!0,r=0;r40)&&(n=OSF.OUtil.Guid.generateNewGuid(),t.setValue(t.clientIDKey,n)),n},n.prototype.saveLog=function(n,t){var i=this,u=i.getValue(i.logIdSetKey);u=(u&&u.length>0?u+";":r)+n;i.setValue(i.logIdSetKey,u);i.setValue(n,t)},n.prototype.enumerateLog=function(n,t){var i=this,e=i.getValue(i.logIdSetKey),u,o,r,f;if(e){u=e.split(";");for(o in u)r=u[o],f=i.getValue(r),f&&(n&&n(r,f),t&&i.remove(r));t&&i.remove(i.logIdSetKey)}},n.prototype.getValue=function(n){var t=OSF.OUtil.getLocalStorage(),i=r;return t&&(i=t.getItem(n)),i},n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)},n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}},n}(),o=function(){function t(){}return t.prototype.LogData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(t)}catch(i){}},t.prototype.LogRawData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(t))}catch(i){}},t}();n.initialize=y;n.onAppActivated=p;n.onScriptDone=w;n.onCallDone=b;n.onMethodDone=k;n.onPropertyDone=d;n.onEventDone=g;n.onRegisterDone=nt;n.onAppClosed=tt;n.setOsfControlAppCorrelationId=it;n.doAppInitializationLogging=l;n.logAppCommonMessage=rt;n.logAppException=ut;OSF.AppTelemetry=n}(OSFAppTelemetry||(OSFAppTelemetry={}));Microsoft.Office.WebExtension.TableData=function(n,t){function i(n){if(n==null||n==undefined)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(n,2);t<2;t++)n=[n];return n}catch(i){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(n){t=i(n)}},rows:{get:function(){return n},set:function(t){n=t==null||OSF.OUtil.isArray(t)&&t.length==0?[]:i(t)}}});this.headers=t;this.rows=n};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(n){return new Microsoft.Office.WebExtension.TableData(n[OSF.DDA.TableDataProperties.TableRows],n[OSF.DDA.TableDataProperties.TableHeaders])};Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var n=null;return{findArrayDimensionality:function(n){if(OSF.OUtil.isArray(n)){for(var t=0,i=0;i0)for(r=0;r0)for(r=0;r0?(this._eventHandlers[n]=[],!0):!1},clearObjectEventHandlers:function(n,t){return this._objectEventHandlers[n]!=null&&this._objectEventHandlers[n][t]!=null?(this._objectEventHandlers[n][t]=[],!0):!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},getObjectEventHandlerCount:function(n,t){return this._objectEventHandlers[n]==null||this._objectEventHandlers[n][t]==null?0:this._objectEventHandlers[n][t].length},fireEvent:function(n){var t,r,i;if(n.type==undefined)return!1;if(t=n.type,t&&this._eventHandlers[t]){for(r=this._eventHandlers[t],i=0;i0)){for(r=t[0];i.length>0;)u=i.shift(),r(u);return!0}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var o="hostPlatform",f="outlook",e="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(n,i[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:r=new OSF.DDA.RichApiMessageEventArgs(n,i);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i),t.initialize(r.initialData),(OSF._OfficeAppFactory.getHostInfo()[o]=="win32"||OSF._OfficeAppFactory.getHostInfo()[o]=="mac")&&t.setCurrentItemNumber(r.itemNumber.itemNumber);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkRecipientsChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DDA.DataPartProperties={Id:Microsoft.Office.WebExtension.Parameters.Id,BuiltIn:"DataPartBuiltIn"};OSF.DDA.DataNodeProperties={Handle:"DataNodeHandle",BaseName:"DataNodeBaseName",NamespaceUri:"DataNodeNamespaceUri",NodeType:"DataNodeType"};OSF.DDA.DataNodeEventProperties={OldNode:"OldNode",NewNode:"NewNode",NextSiblingNode:"NextSiblingNode",InUndoRedo:"InUndoRedo"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{DataPartProperties:"DataPartProperties",DataNodeProperties:"DataNodeProperties"});OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{DataPartList:"DataPartList",DataNodeList:"DataNodeList"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.DataPartList,OSF.DDA.PropertyDescriptors.DataPartProperties);OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.DataNodeList,OSF.DDA.PropertyDescriptors.DataNodeProperties);OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DataNodeInsertedEvent:"DataNodeInsertedEvent",DataNodeReplacedEvent:"DataNodeReplacedEvent",DataNodeDeletedEvent:"DataNodeDeletedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DataNodeDeleted:"nodeDeleted",DataNodeInserted:"nodeInserted",DataNodeReplaced:"nodeReplaced",NodeDeleted:"nodeDeleted",NodeInserted:"nodeInserted",NodeReplaced:"nodeReplaced"});OSF.DDA.CustomXmlParts=function(){this._eventDispatches=[];var n=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[n.AddDataPartAsync,n.GetDataPartByIdAsync,n.GetDataPartsByNameSpaceAsync])};OSF.DDA.CustomXmlPart=function(n,t,i){var u,e,r,f;OSF.OUtil.defineEnumerableProperties(this,{builtIn:{value:i},id:{value:t},namespaceManager:{value:new OSF.DDA.CustomXmlPrefixMappings(t)}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.DeleteDataPartAsync,u.GetPartNodesAsync,u.GetPartXmlAsync]);e=n._eventDispatches;r=e[t];r||(f=Microsoft.Office.WebExtension.EventType,r=new OSF.EventDispatch([f.DataNodeDeleted,f.DataNodeInserted,f.DataNodeReplaced]),e[t]=r);OSF.DDA.DispIdHost.addEventSupport(this,r)};OSF.DDA.CustomXmlPrefixMappings=function(n){var t=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[t.AddDataPartNamespaceAsync,t.GetDataPartNamespaceAsync,t.GetDataPartPrefixAsync],n)};OSF.DDA.CustomXmlNode=function(n,t,i,r){OSF.OUtil.defineEnumerableProperties(this,{baseName:{value:r},namespaceUri:{value:i},nodeType:{value:t}});var u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.GetRelativeNodesAsync,u.GetNodeValueAsync,u.GetNodeXmlAsync,u.SetNodeValueAsync,u.SetNodeXmlAsync,u.GetNodeTextAsync,u.SetNodeTextAsync],n)};OSF.DDA.NodeInsertedEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DataNodeInserted},newNode:{value:n},inUndoRedo:{value:t}})};OSF.DDA.NodeReplacedEventArgs=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DataNodeReplaced},oldNode:{value:n},newNode:{value:t},inUndoRedo:{value:i}})};OSF.DDA.NodeDeletedEventArgs=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DataNodeDeleted},oldNode:{value:n},oldNextSibling:{value:t},inUndoRedo:{value:i}})};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureDataNode=function(n){if(n)return new OSF.DDA.CustomXmlNode(n[OSF.DDA.DataNodeProperties.Handle],n[OSF.DDA.DataNodeProperties.NodeType],n[OSF.DDA.DataNodeProperties.NamespaceUri],n[OSF.DDA.DataNodeProperties.BaseName])};OSF.DDA.OMFactory.manufactureDataPart=function(n,t){return new OSF.DDA.CustomXmlPart(t,n[OSF.DDA.DataPartProperties.Id],n[OSF.DDA.DataPartProperties.BuiltIn])};OSF.DDA.AsyncMethodNames.addNames({AddDataPartAsync:"addAsync",GetDataPartByIdAsync:"getByIdAsync",GetDataPartsByNameSpaceAsync:"getByNamespaceAsync",DeleteDataPartAsync:"deleteAsync",GetPartNodesAsync:"getNodesAsync",GetPartXmlAsync:"getXmlAsync",AddDataPartNamespaceAsync:"addNamespaceAsync",GetDataPartNamespaceAsync:"getNamespaceAsync",GetDataPartPrefixAsync:"getPrefixAsync",GetRelativeNodesAsync:"getNodesAsync",GetNodeValueAsync:"getNodeValueAsync",GetNodeXmlAsync:"getXmlAsync",SetNodeValueAsync:"setNodeValueAsync",SetNodeXmlAsync:"setXmlAsync",GetNodeTextAsync:"getTextAsync",SetNodeTextAsync:"setTextAsync"}),function(){function r(n){return OSF.DDA.OMFactory.manufactureDataPart(n,Microsoft.Office.WebExtension.context.document.customXmlParts)}function e(n){return OSF.DDA.OMFactory.manufactureDataNode(n)}function i(n){var t=n[Microsoft.Office.WebExtension.Parameters.Data];return t==undefined?null:t}function u(n){return n.id}function f(n,t){return t}function t(n,t){return t}var n="string";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddDataPartAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Xml,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartsByNameSpaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.DataPartList],r)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteDataPartAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:u}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetPartNodesAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.XPath,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:u}],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.DataNodeList],e)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetPartXmlAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:u}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddDataPartNamespaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Prefix,types:[n]},{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:f}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartNamespaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Prefix,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:f}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartPrefixAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:f}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetRelativeNodesAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.XPath,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.DataNodeList],e)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetNodeValueAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetNodeXmlAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetNodeValueAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetNodeXmlAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Xml,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetNodeTextAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetNodeTextAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Text,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}]})}();OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.DDA.Marshaling.CustomXmlPartsKeys={Id:"id",Namespace:"namespace",Xml:"xml",XPath:"xpath",Prefix:"prefix"};OSF.DDA.Marshaling.DataPartProperties={Id:"id",BuiltIn:"DataPartBuiltIn"};OSF.DDA.Marshaling.PropertyDescriptors={DataPartProperties:"DataPartProperties",DataNodeProperties:"DataNodeProperties"};OSF.DDA.Marshaling.DataNodeProperties={Handle:"DataNodeHandle",BaseName:"DataNodeBaseName",NamespaceUri:"DataNodeNamespaceUri",NodeType:"DataNodeType"};OSF.DDA.Marshaling.ListDescriptors={DataPartList:"DataPartList",DataNodeList:"DataNodeList"};OSF.DDA.Marshaling.DataNodeEventProperties={OldNode:"OldNode",NewNode:"NewNode",NextSiblingNode:"NextSiblingNode",InUndoRedo:"InUndoRedo"};OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.DataPartProperties,fromHost:[{name:OSF.DDA.DataPartProperties.Id,value:OSF.DDA.Marshaling.DataPartProperties.Id},{name:OSF.DDA.DataPartProperties.BuiltIn,value:OSF.DDA.Marshaling.DataPartProperties.BuiltIn}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.DataNodeProperties,fromHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle},{name:OSF.DDA.DataNodeProperties.BaseName,value:OSF.DDA.Marshaling.DataNodeProperties.BaseName},{name:OSF.DDA.DataNodeProperties.NamespaceUri,value:OSF.DDA.Marshaling.DataNodeProperties.NamespaceUri},{name:OSF.DDA.DataNodeProperties.NodeType,value:OSF.DDA.Marshaling.DataNodeProperties.NodeType}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DataNodeInsertedEvent,fromHost:[{name:OSF.DDA.DataNodeEventProperties.InUndoRedo,value:OSF.DDA.Marshaling.DataNodeEventProperties.InUndoRedo},{name:OSF.DDA.DataNodeEventProperties.NewNode,value:OSF.DDA.Marshaling.DataNodeEventProperties.NewNode}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DataNodeReplacedEvent,fromHost:[{name:OSF.DDA.DataNodeEventProperties.InUndoRedo,value:OSF.DDA.Marshaling.DataNodeEventProperties.InUndoRedo},{name:OSF.DDA.DataNodeEventProperties.OldNode,value:OSF.DDA.Marshaling.DataNodeEventProperties.OldNode},{name:OSF.DDA.DataNodeEventProperties.NewNode,value:OSF.DDA.Marshaling.DataNodeEventProperties.NewNode}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DataNodeDeletedEvent,fromHost:[{name:OSF.DDA.DataNodeEventProperties.InUndoRedo,value:OSF.DDA.Marshaling.DataNodeEventProperties.InUndoRedo},{name:OSF.DDA.DataNodeEventProperties.OldNode,value:OSF.DDA.Marshaling.DataNodeEventProperties.OldNode},{name:OSF.DDA.DataNodeEventProperties.NextSiblingNode,value:OSF.DDA.Marshaling.DataNodeEventProperties.NextSiblingNode}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.DataNodeEventProperties.OldNode,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataNodeProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.DataNodeEventProperties.NewNode,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataNodeProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.DataNodeEventProperties.NextSiblingNode,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataNodeProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddDataPartMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataPartProperties,value:OSF.DDA.Marshaling.PropertyDescriptors.DataPartProperties}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Xml,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Xml}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartByIdMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataPartProperties,value:OSF.DDA.Marshaling.PropertyDescriptors.DataPartProperties}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Id}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartsByNamespaceMethod,fromHost:[{name:OSF.DDA.ListDescriptors.DataPartList,value:OSF.DDA.Marshaling.ListDescriptors.DataPartList}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Namespace}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartXmlMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Id}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartNodesMethod,fromHost:[{name:OSF.DDA.ListDescriptors.DataNodeList,value:OSF.DDA.Marshaling.ListDescriptors.DataNodeList}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Id},{name:Microsoft.Office.WebExtension.Parameters.XPath,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.XPath}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidDeleteDataPartMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Id}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodeValueMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodeXmlMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodeTextMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodesMethod,fromHost:[{name:OSF.DDA.ListDescriptors.DataNodeList,value:OSF.DDA.Marshaling.ListDescriptors.DataNodeList}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle},{name:Microsoft.Office.WebExtension.Parameters.XPath,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.XPath}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetDataNodeValueMethod,toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle},{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetDataNodeXmlMethod,toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle},{name:Microsoft.Office.WebExtension.Parameters.Xml,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Xml}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetDataNodeTextMethod,toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle},{name:Microsoft.Office.WebExtension.Parameters.Text,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Text}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddDataNamespaceMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.DataPartProperties.Id},{name:Microsoft.Office.WebExtension.Parameters.Prefix,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Prefix},{name:Microsoft.Office.WebExtension.Parameters.Namespace,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Namespace}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataUriByPrefixMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.DataPartProperties.Id},{name:Microsoft.Office.WebExtension.Parameters.Prefix,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Prefix}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPrefixByUriMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.DataPartProperties.Id},{name:Microsoft.Office.WebExtension.Parameters.Namespace,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Namespace}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDataNodeAddedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DataNodeInsertedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDataNodeReplacedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DataNodeReplacedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDataNodeDeletedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DataNodeDeletedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.AsyncMethodNames.addNames({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync"}),function(){function r(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&r&&(r[OSF.DDA.TableDataProperties.TableRows]!=undefined||r[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(r=OSF.DDA.OMFactory.manufactureTableData(r)),r=OSF.DDA.DataCoercion.coerceData(r,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),r==undefined?null:r}var i=!1,n="boolean",t="number";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,"enum":Microsoft.Office.WebExtension.CoercionType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}}],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object",t,n]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[t,n],defaultValue:i}}],privateStateCallbacks:[]})}();OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.GetData,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:"BindingId"},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:"CoerceType"},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:"ValueFormat"},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:"FilterType"},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:"Rows"},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:"Columns"},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:"StartRow"},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:"StartCol"},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:"RowCount"},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:"ColCount"}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.SetData,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:"BindingId"},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:"CoerceType"},{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:"Rows"},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:"Columns"},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:"StartRow"},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:"StartCol"},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:"ImageLeft"},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:"ImageTop"},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:"ImageWidth"},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:"ImageHeight"}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.GetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",RefreshingSettings:"refreshingSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(n){return OSF.OUtil.serializeSettings(n)},deserializeSettings:function(n){return OSF.OUtil.deserializeSettings(n)}};OSF.DDA.Settings=function(n){var t="name",i;n=n||{};i=function(n){var i=OSF.OUtil.getSessionStorage(),t,r;i&&(t=OSF.DDA.SettingsManager.serializeSettings(n),r=JSON?JSON.stringify(t):Sys.Serialization.JavaScriptSerializer.serialize(t),i.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),r))};OSF.OUtil.defineEnumerableProperties(this,{get:{value:function(i){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]),r;if(u)throw u;return r=n[i],typeof r=="undefined"?null:r}},set:{value:function(r,u){var f=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1},{name:"value",mayBeNull:!0}]);if(f)throw f;n[r]=u;i(n)}},remove:{value:function(r){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]);if(u)throw u;delete n[r];i(n)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],n)};OSF.DDA.RefreshableSettings=function(n){OSF.DDA.RefreshableSettings.uber.constructor.call(this,n);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],n);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:n}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(n,t){return t}}],onSucceeded:function(n,t,i){var f=n[OSF.DDA.SettingsManager.SerializedSettings],u=OSF.DDA.SettingsManager.deserializeSettings(f),e=i[OSF.DDA.SettingsManager.RefreshingSettings];for(var r in e)t.remove(r);for(r in u)t.set(r,u[r]);return t}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(n,t){return OSF.DDA.SettingsManager.serializeSettings(t)}}]});OSF.DDA.WAC.SettingsTranslator=function(){var n=0,t=1;return{read:function(i){var u={},f=i.Settings,e,r;for(e in f)r=f[e],u[r[n]]=r[t];return u},write:function(i){var f=[],u,r;for(u in i)r=[],r[n]=u,r[t]=i[u],f.push(r);return f}}}();OSF.DDA.WAC.Delegate.ParameterMap.setDynamicType(OSF.DDA.SettingsManager.SerializedSettings,{toHost:OSF.DDA.WAC.SettingsTranslator.write,fromHost:OSF.DDA.WAC.SettingsTranslator.read});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.SettingsRequest,toHost:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:"OverwriteIfStale"},{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.WAC.UniqueArguments.Properties}],invertible:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.WAC.UniqueArguments.Properties}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SettingsRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"});OSF.DDA.DocumentSelectionChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:n}})};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDeleted:"objectDeleted"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectSelectionChanged:"objectSelectionChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDataChanged:"objectDataChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ContentControlAdded:"contentControlAdded"});OSF.DDA.ObjectEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:n},object:{value:t}})};OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent});OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(n){OSF.OUtil.defineEnumerableProperties(this,{url:{value:n[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(n){return new Microsoft.Office.WebExtension.FileProperties(n)}});OSF.OUtil.setNamespace("Marshaling",OSF.DDA),function(n){var t="Properties";n[n[t]=0]=t;n[n.Url=1]="Url"}(OSF_DDA_Marshaling_FilePropertiesKeys||(OSF_DDA_Marshaling_FilePropertiesKeys={}));OSF.DDA.Marshaling.FilePropertiesKeys=OSF_DDA_Marshaling_FilePropertiesKeys;OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,fromHost:[{name:OSF.DDA.FilePropertiesDescriptor.Url,value:OSF.DDA.Marshaling.FilePropertiesKeys.Url}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:OSF.DDA.Marshaling.FilePropertiesKeys.Properties}]});Microsoft.Office.WebExtension.FileType={Text:"text",Compressed:"compressed",Pdf:"pdf"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FileProperties:"FileProperties",FileSliceProperties:"FileSliceProperties"});OSF.DDA.FileProperties={Handle:"FileHandle",FileSize:"FileSize",SliceSize:Microsoft.Office.WebExtension.Parameters.SliceSize};OSF.DDA.File=function(n,t,i){var r,u;OSF.OUtil.defineEnumerableProperties(this,{size:{value:t},sliceCount:{value:Math.ceil(t/i)}});r={};r[OSF.DDA.FileProperties.Handle]=n;r[OSF.DDA.FileProperties.SliceSize]=i;u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.GetDocumentCopyChunkAsync,u.ReleaseDocumentCopyAsync],r)};OSF.DDA.FileSliceOffset="fileSliceoffset";OSF.DDA.AsyncMethodNames.addNames({GetDocumentCopyAsync:"getFileAsync",GetDocumentCopyChunkAsync:"getSliceAsync",ReleaseDocumentCopyAsync:"closeAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FileType,"enum":Microsoft.Office.WebExtension.FileType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:{types:["number"],defaultValue:4194304}}],checkCallArgs:function(n){var t=n[Microsoft.Office.WebExtension.Parameters.SliceSize];if(t<=0||t>4194304)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return n},onSucceeded:function(n,t,i){return new OSF.DDA.File(n[OSF.DDA.FileProperties.Handle],n[OSF.DDA.FileProperties.FileSize],i[Microsoft.Office.WebExtension.Parameters.SliceSize])}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(n,t){return t[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(r<0||r>=t.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;return n[OSF.DDA.FileSliceOffset]=parseInt((r*i[OSF.DDA.FileProperties.SliceSize]).toString()),n},onSucceeded:function(n,t,i){var r={};return OSF.OUtil.defineEnumerableProperties(r,{data:{value:n[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:i[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:n[OSF.DDA.FileProperties.SliceSize]}}),r}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}}]});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("File",OSF.DDA.Marshaling),function(n){var t="FileSize";n[n.Handle=0]="Handle";n[n[t]=1]=t}(OSF_DDA_Marshaling_File_FilePropertiesKeys||(OSF_DDA_Marshaling_File_FilePropertiesKeys={}));OSF.DDA.Marshaling.File.FilePropertiesKeys=OSF_DDA_Marshaling_File_FilePropertiesKeys,function(n){var t="SliceSize";n[n.Data=0]="Data";n[n[t]=1]=t}(OSF_DDA_Marshaling_File_SlicePropertiesKeys||(OSF_DDA_Marshaling_File_SlicePropertiesKeys={}));OSF.DDA.Marshaling.File.SlicePropertiesKeys=OSF_DDA_Marshaling_File_SlicePropertiesKeys,function(n){var t="Compressed";n[n.Text=0]="Text";n[n[t]=1]=t;n[n.Pdf=2]="Pdf"}(OSF_DDA_Marshaling_File_FileType||(OSF_DDA_Marshaling_File_FileType={}));OSF.DDA.Marshaling.File.FileType=OSF_DDA_Marshaling_File_FileType,function(n){var t="SliceIndex",i="SliceSize",r="FileType";n[n[r]=0]=r;n[n[i]=1]=i;n[n.Handle=2]="Handle";n[n[t]=3]=t}(OSF_DDA_Marshaling_File_ParameterKeys||(OSF_DDA_Marshaling_File_ParameterKeys={}));OSF.DDA.Marshaling.File.ParameterKeys=OSF_DDA_Marshaling_File_ParameterKeys;OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FileProperties);OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FileSliceProperties);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.FilePropertiesKeys.Handle},{name:OSF.DDA.FileProperties.FileSize,value:OSF.DDA.Marshaling.File.FilePropertiesKeys.FileSize}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.Marshaling.File.SlicePropertiesKeys.Data},{name:OSF.DDA.FileProperties.SliceSize,value:OSF.DDA.Marshaling.File.SlicePropertiesKeys.SliceSize}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:OSF.DDA.Marshaling.File.FileType.Text},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:OSF.DDA.Marshaling.File.FileType.Compressed},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:OSF.DDA.Marshaling.File.FileType.Pdf}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:OSF.DDA.Marshaling.File.ParameterKeys.FileType},{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:OSF.DDA.Marshaling.File.ParameterKeys.SliceSize}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.ParameterKeys.Handle},{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,value:OSF.DDA.Marshaling.File.ParameterKeys.SliceIndex}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.ParameterKeys.Handle}]});OSF.DDA.AsyncMethodNames.addNames({ExecuteRichApiRequestAsync:"executeRichApiRequestAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[]});OSF.OUtil.setNamespace("RichApi",OSF.DDA);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidExecuteRichApiRequestMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.ArrayData}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}]});Microsoft.Office.WebExtension.BindingType={Table:"table",Text:"text",Matrix:"matrix"};OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType};OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{BindingList:"BindingList"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{Subset:"subset",BindingProperties:"BindingProperties"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList,OSF.DDA.PropertyDescriptors.BindingProperties);OSF.DDA.BindingPromise=function(n,t){this._id=n;OSF.OUtil.defineEnumerableProperty(this,"onFail",{get:function(){return t},set:function(n){var i=typeof n;if(i!="undefined"&&i!="function")throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,i);t=n}})};OSF.DDA.BindingPromise.prototype={_fetch:function(n){var t=this,i;return t.binding?n&&n(t.binding):t._binding||(i=t,Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(t._id,function(t){t.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded?(OSF.OUtil.defineEnumerableProperty(i,"binding",{value:t.value}),n&&n(i.binding)):i.onFail&&i.onFail(t)})),t},getDataAsync:function(){var n=arguments;return this._fetch(function(t){t.getDataAsync.apply(t,n)}),this},setDataAsync:function(){var n=arguments;return this._fetch(function(t){t.setDataAsync.apply(t,n)}),this},addHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.addHandlerAsync.apply(t,n)}),this},removeHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.removeHandlerAsync.apply(t,n)}),this}};OSF.DDA.BindingFacade=function(n){this._eventDispatches=[];OSF.OUtil.defineEnumerableProperty(this,"document",{value:n});var t=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[t.AddFromSelectionAsync,t.AddFromNamedItemAsync,t.GetAllAsync,t.GetByIdAsync,t.ReleaseByIdAsync])};OSF.DDA.UnknownBinding=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}})};OSF.DDA.Binding=function(n,t){var r,u,i,f;OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}});r=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[r.GetDataAsync,r.SetDataAsync]);u=Microsoft.Office.WebExtension.EventType;i=t.bindings._eventDispatches;i[n]||(i[n]=new OSF.EventDispatch([u.BindingSelectionChanged,u.BindingDataChanged]));f=i[n];OSF.DDA.DispIdHost.addEventSupport(this,f)};OSF.DDA.generateBindingId=function(){return"UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+(new Date).getTime()};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureBinding=function(n,t){var r=n[OSF.DDA.BindingProperties.Id],u=n[OSF.DDA.BindingProperties.RowCount],f=n[OSF.DDA.BindingProperties.ColumnCount],s=n[OSF.DDA.BindingProperties.HasHeaders],i,e,o;switch(n[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:i=new OSF.DDA.TextBinding(r,t);break;case Microsoft.Office.WebExtension.BindingType.Matrix:i=new OSF.DDA.MatrixBinding(r,t,u,f);break;case Microsoft.Office.WebExtension.BindingType.Table:e=function(){return OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument};o=e()&&OSF.DDA.ExcelTableBinding?OSF.DDA.ExcelTableBinding:OSF.DDA.TableBinding;i=new o(r,t,u,f,s);break;default:i=new OSF.DDA.UnknownBinding(r,t)}return i};OSF.DDA.AsyncMethodNames.addNames({AddFromSelectionAsync:"addFromSelectionAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:"getByIdAsync",ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync"}),function(){function u(n){return OSF.DDA.OMFactory.manufactureBinding(n,Microsoft.Office.WebExtension.context.document)}function f(n){return n.id}function e(n,t,i){var u=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&u&&(u[OSF.DDA.TableDataProperties.TableRows]!=undefined||u[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(u=OSF.DDA.OMFactory.manufactureTableData(u)),u=OSF.DDA.DataCoercion.coerceData(u,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),u==undefined?r:u}var t="number",i="object",n="string",r=null;OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:[n]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return!0}}],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.BindingList],u)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n,t,i){var r=i[Microsoft.Office.WebExtension.Parameters.Id];delete t._eventDispatches[r]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n,t){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&n[Microsoft.Office.WebExtension.Parameters.RowCount]==0&&n[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn],delete n[Microsoft.Office.WebExtension.Parameters.RowCount],delete n[Microsoft.Office.WebExtension.Parameters.ColumnCount]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]||n[Microsoft.Office.WebExtension.Parameters.RowCount]||n[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[n,i,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}]})}();OSF.DDA.TextBinding=function(n,t){OSF.DDA.TextBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperty(this,"type",{value:Microsoft.Office.WebExtension.BindingType.Text})};OSF.OUtil.extend(OSF.DDA.TextBinding,OSF.DDA.Binding);OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{TableDataProperties:"TableDataProperties"});OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};OSF.DDA.TableBinding=function(n,t,i,r,u){OSF.DDA.TableBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:i?i:0},columnCount:{value:r?r:0},hasHeaders:{value:u?u:!1}});var f=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[f.AddRowsAsync,f.AddColumnsAsync,f.DeleteAllDataValuesAsync])};OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync"}),function(){function n(n){return n.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]})}();OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.MatrixBinding=function(n,t,i,r){OSF.DDA.MatrixBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Matrix},rowCount:{value:i?i:0},columnCount:{value:r?r:0}})};OSF.OUtil.extend(OSF.DDA.MatrixBinding,OSF.DDA.Binding);OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.BindingProperties);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.BindingRequest,toHost:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,value:"ItemName"},{name:Microsoft.Office.WebExtension.Parameters.Id,value:"BindingId"},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:"BindingType"},{name:Microsoft.Office.WebExtension.Parameters.PromptText,value:"PromptText"},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:"Columns"},{name:Microsoft.Office.WebExtension.Parameters.SampleData,value:"SampleData"},{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:"FailOnCollision"}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.BindingType,toHost:[{name:Microsoft.Office.WebExtension.BindingType.Text,value:2},{name:Microsoft.Office.WebExtension.BindingType.Matrix,value:3},{name:Microsoft.Office.WebExtension.BindingType.Table,value:1}],invertible:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.BindingProperties,fromHost:[{name:OSF.DDA.BindingProperties.Id,value:"Name"},{name:OSF.DDA.BindingProperties.Type,value:"BindingType"},{name:OSF.DDA.BindingProperties.RowCount,value:"RowCount"},{name:OSF.DDA.BindingProperties.ColumnCount,value:"ColCount"},{name:OSF.DDA.BindingProperties.HasHeaders,value:"HasHeaders"}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:0}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod,fromHost:[{name:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod,fromHost:[{name:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseBindingMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingMethod,fromHost:[{name:OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAllBindingsMethod,fromHost:[{name:OSF.DDA.ListDescriptors.BindingList,value:OSF.DDA.WAC.UniqueArguments.BindingResponse}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.GetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{BindingSelectionChanged:"bindingSelectionChanged",BindingDataChanged:"bindingDataChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{BindingSelectionChangedEvent:"BindingSelectionChangedEvent"});OSF.DDA.BindingSelectionChangedEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingSelectionChanged},binding:{value:n}});for(var i in t)OSF.OUtil.defineEnumerableProperty(this,i,{value:t[i]})};OSF.DDA.BindingDataChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingDataChanged},binding:{value:n}})};OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.BindingSelectionChangedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.WAC.UniqueArguments.BindingEventSource},{name:OSF.DDA.PropertyDescriptors.Subset,value:OSF.DDA.PropertyDescriptors.Subset}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingDataChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.WAC.UniqueArguments.BindingEventSource}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddRowsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.AddRowsColumns,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddColumnsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.AddRowsColumns,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearAllRowsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.BindingRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.AddRowsColumns,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:"BindingId"},{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.Subset,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:"StartRow"},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:"StartCol"},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:"RowCount"},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:"ColCount"}]});Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"};Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"};Microsoft.Office.WebExtension.Index={First:"first",Last:"last",Next:"next",Previous:"previous"};OSF.DDA.AsyncMethodNames.addNames({GoToByIdAsync:"goToByIdAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GoToByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string","number"]},{name:Microsoft.Office.WebExtension.Parameters.GoToType,"enum":Microsoft.Office.WebExtension.GoToType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:{"enum":Microsoft.Office.WebExtension.SelectionMode,defaultValue:Microsoft.Office.WebExtension.SelectionMode.Default}}]});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.DDA.Marshaling.NavigationKeys={NavigationRequest:"DdaGoToByIdMethod",Id:"Id",GoToType:"GoToType",SelectionMode:"SelectionMode"},function(n){var t="NamedItem";n[n.Binding=0]="Binding";n[n[t]=1]=t;n[n.Slide=2]="Slide";n[n.Index=3]="Index"}(OSF_DDA_Marshaling_GoToType||(OSF_DDA_Marshaling_GoToType={}));OSF.DDA.Marshaling.GoToType=OSF_DDA_Marshaling_GoToType,function(n){var t="Selected";n[n.Default=0]="Default";n[n[t]=1]=t;n[n.None=2]="None"}(OSF_DDA_Marshaling_SelectionMode||(OSF_DDA_Marshaling_SelectionMode={}));OSF.DDA.Marshaling.SelectionMode=OSF_DDA_Marshaling_SelectionMode;OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.Marshaling.NavigationKeys.NavigationRequest);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.Marshaling.NavigationKeys.NavigationRequest,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.NavigationKeys.Id},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:OSF.DDA.Marshaling.NavigationKeys.GoToType},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:OSF.DDA.Marshaling.NavigationKeys.SelectionMode}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:OSF.DDA.Marshaling.GoToType.Binding},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:OSF.DDA.Marshaling.GoToType.NamedItem},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:OSF.DDA.Marshaling.GoToType.Slide},{name:Microsoft.Office.WebExtension.GoToType.Index,value:OSF.DDA.Marshaling.GoToType.Index}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:OSF.DDA.Marshaling.SelectionMode.Default},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:OSF.DDA.Marshaling.SelectionMode.Selected},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:OSF.DDA.Marshaling.SelectionMode.None}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:OSF.DDA.Marshaling.NavigationKeys.NavigationRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]}),function(n){var t;(function(t){var u=function(){function r(){var n=this,t=n;n._pseudoDocument=u;n._eventDispatch=u;n._processAppCommandInvocation=function(n){var i=t._verifyManifestCallback(n.callbackName),r;if(i.errorCode!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){t._invokeAppCommandCompletedMethod(n.appCommandId,i.errorCode,"");return}r=t._constructEventObjectForCallback(n);r?window.setTimeout(function(){i.callback(r)},0):t._invokeAppCommandCompletedMethod(n.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"")}}var f="object",e="string",u=null;return r.initializeOsfDda=function(){OSF.DDA.AsyncMethodNames.addNames({AppCommandInvocationCompletedAsync:"appCommandInvocationCompletedAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[e]},{name:Microsoft.Office.WebExtension.Parameters.Status,types:["number"]},{name:Microsoft.Office.WebExtension.Parameters.AppCommandInvocationCompletedData,types:[e]}]});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{AppCommandInvokedEvent:"AppCommandInvokedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppCommandInvoked:"appCommandInvoked"});OSF.OUtil.setNamespace("AppCommand",OSF.DDA);OSF.DDA.AppCommand.AppCommandInvokedEventArgs=n.AppCommand.AppCommandInvokedEventArgs},r.prototype.initializeAndChangeOnce=function(n){var i=this,r;t.registerDdaFacade();i._pseudoDocument={};OSF.DDA.DispIdHost.addAsyncMethods(i._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync]);i._eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked]);r=function(t){n&&(t.status=="succeeded"?n(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):n(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError))};OSF.DDA.DispIdHost.addEventSupport(i._pseudoDocument,i._eventDispatch);i._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,i._processAppCommandInvocation,r)},r.prototype._verifyManifestCallback=function(n){var s="function",e={callback:u,errorCode:OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback},o;n=n.trim();try{for(var t=n.split("."),i=window,r=0;r100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99),n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1),!n[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99),n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("Dialog",OSF.DDA.Marshaling);OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys={MessageType:"messageType",MessageContent:"messageContent"};OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys={MessageType:"messageType",MessageContent:"messageContent"};OSF.DDA.Marshaling.MessageParentKeys={MessageToParent:"messageToParent"};OSF.DDA.Marshaling.DialogNotificationShownEventType={DialogNotificationShown:"dialogNotificationShown"};OSF.DDA.Marshaling.SendMessageKeys={MessageContent:"messageContent"},function(n){var t;(function(n){function r(n){switch(n){case t.Excel:case t.Word:case t.PowerPoint:case t.Outlook:return new i;default:return new i}return null}var t={Excel:"excel",Word:"word",PowerPoint:"powerpoint",Outlook:"outlook"},i;n.getDialogCssManager=r;i=function(){function n(){var r="height: 100px",t="font-size: 14px",i="font-family: Segoe UI,Arial,Verdana,sans-serif",u="margin: 20px 14px",f="width: 100%",e="position: absolute",n=this;n.overlayElementCSS=[e,"top: 0","left: 0",f,"height: 100%","background-color: rgba(198, 198, 198, 0.5)","z-index: 99998"];n.dialogNotificationPanelCSS=[f,"height: 190px",e,"z-index: 99999","background-color: rgba(255, 255, 255, 1)","left: 0px","top: 50%","margin-top: -95px"];n.newWindowNotificationTextPanelCSS=[u,i,t,r,"line-height: 100px"];n.newWindowNotificationTextSpanCSS=["display: inline-block","line-height: normal","vertical-align: middle"];n.crossZoneNotificationTextPanelCSS=[u,i,t,r];n.dialogNotificationButtonPanelCSS="margin:0px 9px";n.buttonStyleCSS=["text-align: center","width: 70px","height: 25px",t,i,"margin: 0px 5px","border-width: 1px","border-style: solid"]}var t=";";return n.prototype.getOverlayElementCSS=function(){return this.overlayElementCSS.join(t)},n.prototype.getDialogNotificationPanelCSS=function(){return this.dialogNotificationPanelCSS.join(t)},n.prototype.getNewWindowNotificationTextPanelCSS=function(){return this.newWindowNotificationTextPanelCSS.join(t)},n.prototype.getNewWindowNotificationTextSpanCSS=function(){return this.newWindowNotificationTextSpanCSS.join(t)},n.prototype.getCrossZoneNotificationTextPanelCSS=function(){return this.crossZoneNotificationTextPanelCSS.join(t)},n.prototype.getDialogNotificationButtonPanelCSS=function(){return this.dialogNotificationButtonPanelCSS},n.prototype.getDialogButtonCSS=function(){return this.buttonStyleCSS.join(t)},n}();n.DefaultDialogCSSManager=i})(t=n.WacCommonUICssManager||(n.WacCommonUICssManager={}))}(OfficeExt||(OfficeExt={})),function(n){var t;(function(t){var i;(function(t){function gt(n){var t=n.input;t!=i&&(y={HostButtonBorderColor:t[OSF.HostThemeButtonStyleKeys.ButtonBorderColor],HostButtonBackgroundColor:t[OSF.HostThemeButtonStyleKeys.ButtonBackgroundColor]});n.completed()}function ni(n){OSF._OfficeAppFactory.getInitializationHelper().addOrRemoveEventListenersForWindow(r);n.completed()}function ti(t){try{if(OSF._OfficeAppFactory.getInitializationHelper()._appContext._skipNewWindowNotification){vt(t);return}k=r;var c=r,y=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo,s=n.WacCommonUICssManager.getDialogCssManager(y.hostType),p=OSF.OUtil.formatString(Strings.OfficeOM.L_ShowWindowDialogNotification,OSF._OfficeAppFactory.getInitializationHelper()._appContext._addinName);o=yt(s);document.body.insertBefore(o,document.body.firstChild);f=si(s,p);f.id=lt;var l=pt(s),i=rt(s,Strings.OfficeOM.L_ShowWindowDialogNotificationAllow),u=rt(s,Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore);l.appendChild(i);l.appendChild(u);f.appendChild(l);document.body.insertBefore(f,document.body.firstChild);i.onclick=function(){vt(t);k||w()};function v(){function n(n){et();wt(n);e(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore)}h.onComplete=n;OSF.DDA.WAC.Delegate.unregisterEventAsync(h)}u.onclick=v;i.addEventListener(a,function(n){n.shiftKey&&n.keyCode==9&&(ft(i),ut(u),u.focus(),n.preventDefault(),n.stopPropagation())},r);u.addEventListener(a,function(n){n.shiftKey||n.keyCode!=9?n.keyCode==13&&(c=!0,n.preventDefault(),n.stopPropagation()):(ft(u),ut(i),i.focus(),n.preventDefault(),n.stopPropagation())},r);u.addEventListener("keyup",function(n){n.keyCode==13&&c&&(c=r,v(),n.preventDefault(),n.stopPropagation())},r);window.focus();function b(){i.focus()}h.onComplete=b;OSF.DDA.WAC.Delegate.registerEventAsync(h)}catch(d){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at new window dialog."+d);e(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)}}function ii(n){var t,r;try{if(u!=i){if(t=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains,t)for(r=0;r-1?window.close():(t=n.data,r=typeof t,t&&(r=="object"||r==c)&&(r==c&&(t=JSON.parse(t)),u=OSF.DDA.OMFactory.manufactureEventArgs(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived,i,t),OSF.DialogParentMessageEventDispatch.fireEvent(u))))}window.addEventListener(l,n)}function ei(n,t){v=n;e=t}function oi(){try{f&&f.id==lt&&e&&e(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore)}catch(n){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during executing displayDialogAsync callback."+n)}w()}function at(t,i){var s=r,e=n.WacCommonUICssManager.getDialogCssManager(i),h,u;o=yt(e);document.body.insertBefore(o,document.body.firstChild);f=hi(e,t);f.id=dt;h=pt(e);u=rt(e,Strings.OfficeOM.L_DialogOK?Strings.OfficeOM.L_DialogOK:"OK");h.appendChild(u);f.appendChild(h);document.body.insertBefore(f,document.body.firstChild);k=!0;u.onclick=function(){w()};u.addEventListener(a,function(n){n.keyCode==9?(document.getElementById(g).focus(),n.preventDefault(),n.stopPropagation()):n.keyCode==13&&(s=!0,n.preventDefault(),n.stopPropagation())},r);u.addEventListener("keyup",function(n){n.keyCode==13&&s&&(s=r,w(),n.preventDefault(),n.stopPropagation())},r);document.getElementById(g).addEventListener(a,function(n){n.keyCode==9&&(u.focus(),n.preventDefault(),n.stopPropagation())},r);window.focus();u.focus()}function tt(n){if(n.source==u)try{var t={};t[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogMessageReceived;t[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent]=n.data;v(t)}catch(i){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during receive message handler."+i)}}function it(n){var i=OSF._OfficeAppFactory.getInitializationHelper()._webAppState.id+st,t;if(n.key==i)try{t={};t[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogMessageReceived;t[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent]=n.newValue;v(t)}catch(r){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during storage changed handler."+r)}}function vt(t){function nt(){try{if(u==i||u.closed){window.clearInterval(d);p?window.removeEventListener(b,it):window.removeEventListener(l,tt);var n={};n[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogClosed;v(n)}}catch(t){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during check or handle window close."+t)}}var r=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo,y=[r.hostType,r.hostPlatform,r.hostSpecificFileVersion,r.hostLocale,r.osfControlAppCorrelationId,"isDialog"],h=y.join("|"),s=OSF._OfficeAppFactory.getInitializationHelper()._appContext,f=t[OSF.ShowWindowDialogParameterKeys.Url],o;f=n.WACUtils.addHostInfoAsQueryParam(f,h);o=JSON.parse(window.name);o[OSF.WindowNameItemKeys.HostInfo]=h;o[OSF.WindowNameItemKeys.AppContext]=s;var c=t[OSF.ShowWindowDialogParameterKeys.Width]*screen.width/100,a=t[OSF.ShowWindowDialogParameterKeys.Height]*screen.height/100,w=s._clientWindowWidth/2-c/2,k=s._clientWindowHeight/2-a/2,g="width="+c+", height="+a+", left="+w+", top="+k+",channelmode=no,directories=no,fullscreen=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=yes,toolbar=no";if(u=window.open(f,n.WACUtils.serializeObjectToString(o),g),u==i){OSF.AppTelemetry.logAppCommonMessage("Encountered cross zone issue in displayDialogAsync api.");et();at(f,r.hostType);e(OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone);return}p?window.addEventListener(b,it):window.addEventListener(l,tt);d=window.setInterval(nt,1e3);e!=i?e(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("showDialogCallback can not be null.")}function rt(n,t){var i=document.createElement("input"),r,u;return i.setAttribute("type","button"),i.style.cssText=n.getDialogButtonCSS(),i.style.borderColor=ht,i.style.backgroundColor=ct,i.setAttribute("value",t),r=function(){ut(i)},u=function(){ft(i)},i.addEventListener("mouseover",r),i.addEventListener("focus",r),i.addEventListener("mouseout",u),i.addEventListener("focusout",u),i}function ut(n){y!=i?(n.style.borderColor=y.HostButtonBorderColor,n.style.backgroundColor=y.HostButtonBackgroundColor):OSF.CommonUI&&OSF.CommonUI.HostButtonBorderColor&&OSF.CommonUI.HostButtonBackgroundColor?(n.style.borderColor=OSF.CommonUI.HostButtonBorderColor,n.style.backgroundColor=OSF.CommonUI.HostButtonBackgroundColor):n.style.backgroundColor=kt}function ft(n){n.style.borderColor=ht;n.style.backgroundColor=ct}function w(){function n(n){et();wt(n)}h.onComplete=n;OSF.DDA.WAC.Delegate.unregisterEventAsync(h)}function et(){f!=i&&(document.body.removeChild(f),f=i);o!=i&&(document.body.removeChild(o),o=i)}function yt(n){var t=document.createElement(s);return t.style.cssText=n.getOverlayElementCSS(),t}function si(n,t){var r=document.createElement(s),i,u;return r.style.cssText=n.getDialogNotificationPanelCSS(),bt(r),i=document.createElement(s),i.style.cssText=n.getNewWindowNotificationTextPanelCSS(),i.id=nt,document.documentElement.getAttribute("dir")=="rtl"?i.style.paddingRight="30px":i.style.paddingLeft="30px",u=document.createElement("span"),u.style.cssText=n.getNewWindowNotificationTextSpanCSS(),u.innerText=t,i.appendChild(u),r.appendChild(i),r}function pt(n){var t=document.createElement(s);return t.style.cssText=n.getDialogNotificationButtonPanelCSS(),t.style.cssFloat=document.documentElement.getAttribute("dir")=="rtl"?"left":"right",t}function wt(n){if(n!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){var t=document.querySelectorAll(OSF._OfficeAppFactory.getInitializationHelper()._tabbableElements);OSF.OUtil.focusToFirstTabbable(t,r)}}function hi(t,i){var f=document.createElement(s),u,r,e;return f.style.cssText=t.getDialogNotificationPanelCSS(),bt(f),u=document.createElement(s),u.style.cssText=t.getCrossZoneNotificationTextPanelCSS(),u.id=nt,r=document.createElement("a"),r.id=g,r.href="#",r.innerText=Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink,r.setAttribute("onclick","window.open('https://support.microsoft.com/en-us/help/17479/windows-internet-explorer-11-change-security-privacy-settings', '_blank', 'fullscreen=1')"),e=document.createElement("span"),Strings.OfficeOM.L_NewWindowCrossZone&&(e.innerHTML=OSF.OUtil.formatString(Strings.OfficeOM.L_NewWindowCrossZone,r.outerHTML,n.WACUtils.getDomainForUrl(i))),u.appendChild(e),f.appendChild(u),f}function bt(n){n.setAttribute("role","dialog");n.setAttribute("aria-describedby",nt)}var s="div",c="string",l="message",b="storage",a="keydown",r=!1,i=null,u=i,v=i,o=i,f=i,ot="osfDialogInternal:action=closeDialog",e=i,k=r,d=-1,st="messageParentKey",y=i,ht="#ababab",ct="#ffffff",kt="#ccc",lt="newWindowNotificaiton",dt="crossZoneNotification",g="configureBrowserLink",nt="dialogNotificationTextPanel",p=n.WACUtils.shouldUseLocalStorageToPassMessage(),h={dispId:OSF.DDA.EventDispId.dispidDialogNotificationShownInAddinEvent,eventType:OSF.DDA.Marshaling.DialogNotificationShownEventType.DialogNotificationShown,onComplete:i};t.setHostThemeButtonStyle=gt;t.removeEventListenersForDialog=ni;t.handleNewWindowDialog=ti;t.closeDialog=ii;t.messageParent=ri;t.sendMessage=ui;t.registerMessageReceivedEvent=fi;t.setHandlerAndShowDialogCallback=ei;t.escDismissDialogNotification=oi;t.showCrossZoneNotification=at})(i=t.Dialog||(t.Dialog={}))})(t=n.AddinNativeAction||(n.AddinNativeAction={}))}(OfficeExt||(OfficeExt={}));OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogMessageReceivedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageType},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageContent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidMessageParentMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,value:OSF.DDA.Marshaling.MessageParentKeys.MessageToParent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSendMessageMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,value:OSF.DDA.Marshaling.SendMessageKeys.MessageContent}]});OSF.DDA.WAC.Delegate.openDialog=function(n){function t(n){var t={Error:n};try{e(Microsoft.Office.Common.InvokeResultCode.noError,t)}catch(i){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at showDialogCallback."+i)}}var u="https://",f="http://",r=JSON.parse(n.targetId),e=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!0,n),i;if(OSF.DialogShownStatus.hasDialogShown){t(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened);return}if(i=r[OSF.ShowWindowDialogParameterKeys.Url].toLowerCase(),i==null||!(i.substr(0,u.length)===u)){i.substr(0,f.length)===f?t(OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS):t(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme);return}r[OSF.ShowWindowDialogParameterKeys.DisplayInIframe]?(OSF.DialogShownStatus.isWindowDialog=!1,OSF.DDA.WAC.Delegate.registerEventAsync(n)):(OSF.DialogShownStatus.isWindowDialog=!0,OfficeExt.AddinNativeAction.Dialog.setHandlerAndShowDialogCallback(function(t){n.onEvent&&n.onEvent(t);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t),OfficeExt.AddinNativeAction.Dialog.handleNewWindowDialog(r))};OSF.DDA.WAC.Delegate.messageParent=function(n){window.opener!=null?OfficeExt.AddinNativeAction.Dialog.messageParent(n):OSF.DDA.WAC.Delegate.executeAsync(n)};OSF.DDA.WAC.Delegate.sendMessage=function(n){OSF.DialogShownStatus.hasDialogShown&&(OSF.DialogShownStatus.isWindowDialog?OfficeExt.AddinNativeAction.Dialog.sendMessage(n):OSF.DDA.WAC.Delegate.executeAsync(n))};OSF.DDA.WAC.Delegate.closeDialog=function(n){function t(n){var t={Error:n};try{i(Microsoft.Office.Common.InvokeResultCode.noError,t)}catch(r){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at closeDialogCallback."+r)}}var i=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!1,n);OSF.DialogShownStatus.hasDialogShown?OSF.DialogShownStatus.isWindowDialog?(n.onCalling&&n.onCalling(),OfficeExt.AddinNativeAction.Dialog.closeDialog(t)):OSF.DDA.WAC.Delegate.unregisterEventAsync(n):t(OSF.DDA.ErrorCodeManager.errorCodes.ooeWebDialogClosed)};OSF.InitializationHelper.prototype.dismissDialogNotification=function(){OfficeExt.AddinNativeAction.Dialog.escDismissDialogNotification()};OSF.InitializationHelper.prototype.registerMessageReceivedEventForWindowDialog=function(){OfficeExt.AddinNativeAction.Dialog.registerMessageReceivedEvent()};OSF.DDA.AsyncMethodNames.addNames({GetAccessTokenAsync:"getAccessTokenAsync"});OSF.DDA.Auth=function(){};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAccessTokenAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ForceConsent,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.ForceAddAccount,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.AuthChallenge,value:{types:["string"],defaultValue:""}}],onSucceeded:function(n){return n[Microsoft.Office.WebExtension.Parameters.Data]}});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("SingleSignOn",OSF.DDA.Marshaling);OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys={ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge"};OSF.DDA.Marshaling.SingleSignOn.AccessTokenResultKeys={AccessToken:"accessToken"};OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAccessTokenMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.ForceConsent,value:OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.ForceConsent},{name:Microsoft.Office.WebExtension.Parameters.ForceAddAccount,value:OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.ForceAddAccount},{name:Microsoft.Office.WebExtension.Parameters.AuthChallenge,value:OSF.DDA.Marshaling.SingleSignOn.GetAccessTokenKeys.AuthChallenge}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.Marshaling.SingleSignOn.AccessTokenResultKeys.AccessToken}]}),function(n){var t=function(){function n(n,t){var i=this;OSF.DDA.WordDocument.uber.constructor.call(i,n,t);OSF.DDA.DispIdHost.addAsyncMethods(i,[OSF.DDA.AsyncMethodNames.GoToByIdAsync,OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,OSF.DDA.AsyncMethodNames.SaveAsync,OSF.DDA.AsyncMethodNames.RefreshAsync]);OSF.DDA.DispIdHost.addEventSupport(i,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]));OSF.DDA.DispIdHost.addEventSupport(i,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.BindingSelectionChanged]));OSF.DDA.DispIdHost.addEventSupport(i,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DataNodeInserted]));OSF.DDA.DispIdHost.addEventSupport(i,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DataNodeReplaced]));OSF.DDA.DispIdHost.addEventSupport(i,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DataNodeDeleted]));OSF.OUtil.defineEnumerableProperty(i,"customXmlParts",{value:new OSF.DDA.CustomXmlParts});OSF.OUtil.defineEnumerableProperty(i,"bindings",{value:new OSF.DDA.BindingFacade(i)});OSF.OUtil.finalizeProperties(i)}return n}();n.WordDocument=t}(OSFWordWAC||(OSFWordWAC={}));OSF.DDA.WordDocument=OSFWordWAC.WordDocument;OSF.OUtil.extend(OSF.DDA.WordDocument,OSF.DDA.Document);OSF.OUtil.redefineList(Microsoft.Office.WebExtension.CoercionType,{Html:"html",Text:"text",Ooxml:"ooxml",Table:"table",Matrix:"matrix",Image:"image"});OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(n,t){OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM);n.doc=new OSF.DDA.WordDocument(n,this._initializeSettings(n,!0));OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi,[OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]);t()};OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize=function(n){var t,i,r;OSF.WebApp._UpdateLinksForHostAndXdmInfo();t=new OSF.DDA.License(n.get_eToken());this.initWebDialog(n);this.initWebAuth(n);OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(n,n.doc,t));!n.get_isDialog()&&OSF.AdditionalPostContextSettingOverride&&OSF.AdditionalPostContextSettingOverride();OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.WAC.getDelegateMethods,OSF.DDA.WAC.Delegate.ParameterMap));i=n.get_reason();Microsoft.Office.WebExtension.initialize(i);r=OfficeExt.AppCommand.AppCommandManager.instance();r.initializeAndChangeOnce()};__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t=function(){function n(n,t,i){this.m_actionInfo=n;this.m_isWriteOperation=t;this.m_isRestrictedResourceAccess=i}return Object.defineProperty(n.prototype,"actionInfo",{get:function(){return this.m_actionInfo},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isRestrictedResourceAccess",{get:function(){return this.m_isRestrictedResourceAccess},enumerable:!0,configurable:!0}),n}();n.Action=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_callback=n}return n.prototype._handleResult=function(n){this.m_callback&&this.m_callback()},n}(),i=function(){function i(){}return i.createSetPropertyAction=function(t,i,r,u){var f;n.Utility.validateObjectPath(i);var o={Id:t._nextId(),ActionType:4,Name:r,ObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},s=[u],e=n.Utility.setMethodArguments(t,o.ArgumentInfo,s);return n.Utility.validateReferencedObjectPaths(e),t._pendingRequest.ensureInstantiateObjectPath(i._objectPath),t._pendingRequest.ensureInstantiateObjectPaths(e),f=new n.Action(o,!0,!1),t._pendingRequest.addAction(f),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addReferencedObjectPaths(e),f.referencedObjectPath=i._objectPath,f.referencedArgumentObjectPaths=e,f},i.createMethodAction=function(t,i,r,u,f,e){var h,o,c,s;return n.Utility.validateObjectPath(i),h={Id:t._nextId(),ActionType:3,Name:r,ObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},o=n.Utility.setMethodArguments(t,h.ArgumentInfo,f),n.Utility.validateReferencedObjectPaths(o),t._pendingRequest.ensureInstantiateObjectPath(i._objectPath),t._pendingRequest.ensureInstantiateObjectPaths(o),c=u!=1,s=new n.Action(h,c,e),t._pendingRequest.addAction(s),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addReferencedObjectPaths(o),s.referencedObjectPath=i._objectPath,s.referencedArgumentObjectPaths=o,s},i.createQueryAction=function(t,i,r){var f,u;return n.Utility.validateObjectPath(i),t._pendingRequest.ensureInstantiateObjectPath(i._objectPath),f={Id:t._nextId(),ActionType:2,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},f.QueryInfo=r,u=new n.Action(f,!1,!1),t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u.referencedObjectPath=i._objectPath,u},i.createRecursiveQueryAction=function(t,i,r){n.Utility.validateObjectPath(i);t._pendingRequest.ensureInstantiateObjectPath(i._objectPath);var f={Id:t._nextId(),ActionType:6,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id,RecursiveQueryInfo:r},u=new n.Action(f,!1,!1);return t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u.referencedObjectPath=i._objectPath,u},i.createQueryAsJsonAction=function(t,i,r){var f,u;return n.Utility.validateObjectPath(i),t._pendingRequest.ensureInstantiateObjectPath(i._objectPath),f={Id:t._nextId(),ActionType:7,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},f.QueryInfo=r,u=new n.Action(f,!1,!1),t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u.referencedObjectPath=i._objectPath,u},i.createEnsureUnchangedAction=function(t,i,r){n.Utility.validateObjectPath(i);t._pendingRequest.ensureInstantiateObjectPath(i._objectPath);var f={Id:t._nextId(),ActionType:8,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id,ObjectState:r},u=new n.Action(f,!1,!1);return t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u.referencedObjectPath=i._objectPath,u},i.createInstantiateAction=function(t,i){n.Utility.validateObjectPath(i);t._pendingRequest.ensureInstantiateObjectPath(i._objectPath.parentObjectPath);t._pendingRequest.ensureInstantiateObjectPaths(i._objectPath.argumentObjectPaths);var u={Id:t._nextId(),ActionType:1,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},r=new n.Action(u,!1,!1);return t._pendingRequest.addAction(r),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addActionResultHandler(r,new n.InstantiateActionResultHandler(i)),r.referencedObjectPath=i._objectPath,r},i.createTraceAction=function(t,i,r){var u={Id:t._nextId(),ActionType:5,Name:"Trace",ObjectPathId:0},f=new n.Action(u,!1,!1);return t._pendingRequest.addAction(f),r&&t._pendingRequest.addTrace(u.Id,i),f},i.createTraceMarkerForCallback=function(n,r){var u=i.createTraceAction(n,null,!1);n._pendingRequest.addActionResultHandler(u,new t(r))},i}();n.ActionFactory=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(t,i){n.Utility.checkArgumentNull(t,"context");this.m_context=t;this.m_objectPath=i;this.m_objectPath&&(t._processingResult||(n.ActionFactory.createInstantiateAction(t,this),t._autoCleanup&&this._KeepReference&&t.trackedObjects._autoAdd(this)))}return Object.defineProperty(t.prototype,"context",{get:function(){return this.m_context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_objectPath",{get:function(){return this.m_objectPath},set:function(n){this.m_objectPath=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNull",{get:function(){return n.Utility.throwIfNotLoaded("isNull",this._isNull,null,this._isNull),this._isNull},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNullObject",{get:function(){return n.Utility.throwIfNotLoaded("isNullObject",this._isNull,null,this._isNull),this._isNull},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_isNull",{get:function(){return this.m_isNull},set:function(n){this.m_isNull=n;n&&this.m_objectPath&&this.m_objectPath._updateAsNullObject()},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){this._isNull=n.Utility.isNullOrUndefined(t);this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this,t)},t.prototype._handleIdResult=function(t){this._isNull=n.Utility.isNullOrUndefined(t);n.Utility.fixObjectPathIfNecessary(this,t);this.context.trackedObjects._autoTrackIfNecessaryWhenHandleObjectResultValue(this,t)},t.prototype._recursivelySet=function(i,r,u,f,e){var c=i instanceof t,v=i,o,a,h,s,l;if(c)if(Object.getPrototypeOf(this)===Object.getPrototypeOf(i))i=JSON.parse(JSON.stringify(i));else throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"properties",errorLocation:this._className+".set"});try{for(s=0;s0},enumerable:!0,configurable:!0}),t.prototype._getLastAction=function(){return this.m_actions[this.m_actions.length-1]},t.prototype.addTrace=function(n,t){this.m_traceInfos[n]=t},t.prototype.ensureInstantiateObjectPath=function(t){if(t){if(this.m_instantiatedObjectPaths[t.objectPathInfo.Id])return;if(this.ensureInstantiateObjectPath(t.parentObjectPath),this.ensureInstantiateObjectPaths(t.argumentObjectPaths),!this.m_instantiatedObjectPaths[t.objectPathInfo.Id]){var r={Id:this.m_context._nextId(),ActionType:1,Name:"",ObjectPathId:t.objectPathInfo.Id},i=new n.Action(r,!1,!1);i.referencedObjectPath=t;this.addAction(i)}}},t.prototype.ensureInstantiateObjectPaths=function(n){if(n)for(var t=0;t=0;--r)if(i=n[r],u=i.actionInfo.Id,i.referencedObjectPath&&t._updateLastUsedActionIdOfObjectPathId(e,i.referencedObjectPath,u),o=i.referencedArgumentObjectPaths,o)for(v=o.length,s=0;s0?i.actionInfo.L=c:i.actionInfo.L&&delete i.actionInfo.L},t}();n.ClientRequest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;n._internalConfig={showDisposeInfoInDebugInfo:!1,enableEarlyDispose:!0,alwaysPolyfillClientObjectRetrieveMethod:!1};t=function(){function t(){}return t.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},t.prototype._createRequestExecutorOrNull=function(){return null},Object.defineProperty(t.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),t}();n.SessionBase=t;i=function(){function i(r){if(this.m_customRequestHeaders={},this._onRunFinishedNotifiers=[],this.m_nextId=0,i._overrideSession)this.m_requestUrlAndHeaderInfoResolver=i._overrideSession;else if((n.Utility.isNullOrUndefined(r)||typeof r=="string"&&r.length===0)&&(r=i.defaultRequestUrlAndHeaders,r||(r={url:n.Constants.localDocument,headers:{}})),typeof r=="string")this.m_requestUrlAndHeaderInfo={url:r,headers:{}};else if(i.isRequestUrlAndHeaderInfoResolver(r))this.m_requestUrlAndHeaderInfoResolver=r;else if(i.isRequestUrlAndHeaderInfo(r)){var u=r;this.m_requestUrlAndHeaderInfo={url:u.url,headers:{}};n.Utility._copyHeaders(u.headers,this.m_requestUrlAndHeaderInfo.headers)}else throw n._Internal.RuntimeError._createInvalidArgError("url");this.m_requestUrlAndHeaderInfoResolver instanceof t&&(this.m_session=this.m_requestUrlAndHeaderInfoResolver);this._processingResult=!1;this._customData=n.Constants.iterativeExecutor;this.sync=this.sync.bind(this)}return Object.defineProperty(i.prototype,"session",{get:function(){return this.m_session},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"eventRegistration",{get:function(){return this.m_session?this.m_session.eventRegistration:n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_url",{get:function(){return this.m_requestUrlAndHeaderInfo?this.m_requestUrlAndHeaderInfo.url:null},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_pendingRequest",{get:function(){return this.m_pendingRequest==null&&(this.m_pendingRequest=new n.ClientRequest(this)),this.m_pendingRequest},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"debugInfo",{get:function(){var t=new n.RequestPrettyPrinter(this._rootObjectPropertyName,this._pendingRequest._objectPaths,this._pendingRequest._actions,n._internalConfig.showDisposeInfoInDebugInfo),i=t.process();return{pendingStatements:i}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"trackedObjects",{get:function(){return this.m_trackedObjects||(this.m_trackedObjects=new n.TrackedObjects(this)),this.m_trackedObjects},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"requestHeaders",{get:function(){return this.m_customRequestHeaders},enumerable:!0,configurable:!0}),i.prototype.load=function(t,r){n.Utility.validateContext(this,t);var u=i._parseQueryOption(r),f=n.ActionFactory.createQueryAction(this,t,u);this._pendingRequest.addActionResultHandler(f,t)},i.isLoadOption=function(t){if(!n.Utility.isUndefined(t.select)&&(typeof t.select=="string"||Array.isArray(t.select))||!n.Utility.isUndefined(t.expand)&&(typeof t.expand=="string"||Array.isArray(t.expand))||!n.Utility.isUndefined(t.top)&&typeof t.top=="number"||!n.Utility.isUndefined(t.skip)&&typeof t.skip=="number")return!0;for(var i in t)return!1;return!0},i.parseStrictLoadOption=function(n){var t={Select:[]};return i.parseStrictLoadOptionHelper(t,"","option",n),t},i.combineQueryPath=function(n,t,i){return n.length===0?t:n+i+t},i.parseStrictLoadOptionHelper=function(t,r,u,f){var e,o;for(e in f)if(o=f[e],e==="$all"){if(typeof o!="boolean")throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));o&&t.Select.push(i.combineQueryPath(r,"*","/"))}else if(e==="$top"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));t.Top=o}else if(e==="$skip"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));t.Skip=o}else if(typeof o=="boolean")o&&t.Select.push(i.combineQueryPath(r,e,"/"));else if(typeof o=="object")i.parseStrictLoadOptionHelper(t,i.combineQueryPath(r,e,"/"),i.combineQueryPath(u,e,"."),o);else throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));},i._parseQueryOption=function(t){var u={},f,r;if(typeof t=="string")f=t,u.Select=n.Utility._parseSelectExpand(f);else if(Array.isArray(t))u.Select=t;else if(typeof t=="object")if(r=t,i.isLoadOption(r)){if(typeof r.select=="string")u.Select=n.Utility._parseSelectExpand(r.select);else if(Array.isArray(r.select))u.Select=r.select;else if(!n.Utility.isNullOrUndefined(r.select))throw n._Internal.RuntimeError._createInvalidArgError("option.select");if(typeof r.expand=="string")u.Expand=n.Utility._parseSelectExpand(r.expand);else if(Array.isArray(r.expand))u.Expand=r.expand;else if(!n.Utility.isNullOrUndefined(r.expand))throw n._Internal.RuntimeError._createInvalidArgError("option.expand");if(typeof r.top=="number")u.Top=r.top;else if(!n.Utility.isNullOrUndefined(r.top))throw n._Internal.RuntimeError._createInvalidArgError("option.top");if(typeof r.skip=="number")u.Skip=r.skip;else if(!n.Utility.isNullOrUndefined(r.skip))throw n._Internal.RuntimeError._createInvalidArgError("option.skip");}else u=i.parseStrictLoadOption(t);else if(!n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError("option");return u},i.prototype.loadRecursive=function(t,r,u){var f,e,o;if(!n.Utility.isPlainJsonObject(r))throw n._Internal.RuntimeError._createInvalidArgError("options");f={};for(e in r)f[e]=i._parseQueryOption(r[e]);o=n.ActionFactory.createRecursiveQueryAction(this,t,{Queries:f,MaxDepth:u});this._pendingRequest.addActionResultHandler(o,t)},i.prototype.trace=function(t){n.ActionFactory.createTraceAction(this,t,!0)},i.prototype._processOfficeJsErrorResponse=function(n,t){},i.prototype.syncPrivateMain=function(){var t=this;return n.Utility._createPromiseFromResult(null).then(function(){if(!t.m_requestUrlAndHeaderInfo)return t.m_requestUrlAndHeaderInfoResolver._resolveRequestUrlAndHeaderInfo().then(function(i){if(t.m_requestUrlAndHeaderInfo=i,t.m_requestUrlAndHeaderInfo||(t.m_requestUrlAndHeaderInfo={url:n.Constants.localDocument,headers:{}}),n.Utility.isNullOrEmptyString(t.m_requestUrlAndHeaderInfo.url)&&(t.m_requestUrlAndHeaderInfo.url=n.Constants.localDocument),t.m_requestUrlAndHeaderInfo.headers||(t.m_requestUrlAndHeaderInfo.headers={}),typeof t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull=="function"){var r=t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull();r&&(t._requestExecutor=r)}})}).then(function(){var n=t._pendingRequest;return t.m_pendingRequest=null,t.processPreSyncPromises(n).then(function(){return t.syncPrivate(n)})})},i.prototype.syncPrivate=function(t){var f=this,e,o,s,u,h,r,i;return t.hasActions?(e=t.buildRequestMessageBody(),o=t.flags,this._requestExecutor||(this._requestExecutor=n.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)?new n.OfficeJsRequestExecutor(this):new n.HttpRequestExecutor),s=this._requestExecutor,u={},n.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,u),n.Utility._copyHeaders(this.m_customRequestHeaders,u),h={Url:this.m_requestUrlAndHeaderInfo.url,Headers:u,Body:e},t.invalidatePendingInvalidObjectPaths(),r=null,i=null,this._lastSyncStart=performance.now(),s.executeAsync(this._customData,o,h).then(function(u){return f._lastSyncEnd=performance.now(),r=f.processRequestExecutorResponseMessage(t,u),f.processPendingEventHandlers(t).catch(function(t){n.Utility.log("Error in processPendingEventHandlers");n.Utility.log(JSON.stringify(t));i=t})}).then(function(){var u,f;if(r){n.Utility.log("Throw error from response: "+JSON.stringify(r));throw r;}if(i){n.Utility.log("Throw error from ProcessEventHandler: "+JSON.stringify(i));u=null;i instanceof n._Internal.RuntimeError?(u=i,u.traceMessages=t._responseTraceMessages):(f=null,f=typeof i=="string"?i:i.message,n.Utility.isNullOrEmptyString(f)&&(f=n.Utility._getResourceString(n.ResourceStrings.cannotRegisterEvent)),u=new n._Internal.RuntimeError({code:n.ErrorCodes.cannotRegisterEvent,message:f,traceMessages:t._responseTraceMessages}));throw u;}})):this.processPendingEventHandlers(t)},i.prototype.processRequestExecutorResponseMessage=function(t,i){var e,r,o,u,f;if(i.Body&&i.Body.TraceIds&&t._setResponseTraceIds(i.Body.TraceIds),e=t._responseTraceMessages,r=null,i.Body&&(i.Body.Error&&i.Body.Error.ActionIndex>=0&&(o=new n.RequestPrettyPrinter(this._rootObjectPropertyName,t._objectPaths,t._actions),r=o.processForDebugStatementInfo(i.Body.Error.ActionIndex)),u=null,i.Body.Results?u=i.Body.Results:i.Body.ProcessedResults&&i.Body.ProcessedResults.Results&&(u=i.Body.ProcessedResults.Results),u)){this._processingResult=!0;try{t.processResponse(u)}finally{this._processingResult=!1}}if(n.Utility.isNullOrEmptyString(i.ErrorCode)){if(i.Body&&i.Body.Error)return f={errorLocation:i.Body.Error.Location},r&&(f.statement=r.statement,f.surroundingStatements=r.surroundingStatements),new n._Internal.RuntimeError({code:i.Body.Error.Code,message:i.Body.Error.Message,traceMessages:e,debugInfo:f})}else return new n._Internal.RuntimeError({code:i.ErrorCode,message:i.ErrorMessage,traceMessages:e});return null},i.prototype.processPendingEventHandlers=function(t){for(var u,i=n.Utility._createPromiseFromResult(null),r=0;r0&&(typeof r[0]=="string"||i.isRequestUrlAndHeaderInfo(r[0])||i.isRequestUrlAndHeaderInfoResolver(r[0]))&&(y=r[0],h=1),r.length==h+1)l=u,v=r[h+0];else if(r.length==h+2){if(n.Utility.isNullOrUndefined(r[h+0]))l=u;else if(r[h+0]instanceof n.ClientObject)l=function(){return r[h+0].context};else if(r[h+0]instanceof i)l=function(){return r[h+0]};else if(Array.isArray(r[h+0])){if(c=r[h+0],c.length==0)return i.createErrorPromise(t);for(a=0;a0){var n=c._onRunFinishedNotifiers.shift();n()}if(a)return l;else throw l;})},i.prototype._nextId=function(){return++this.m_nextId},i}();n.ClientRequestContext=i}(OfficeExtension||(OfficeExtension={})),function(n){var i=function(){function t(n){this.m_type=n}return Object.defineProperty(t.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){(this.m_isLoaded=!0,typeof t=="object"&&t&&t._IsNull)||(this.m_value=this.m_type===1?n.Utility.adjustToDateTime(t):t)},t}(),t;n.ClientResult=i;t=function(){function t(n,t){this.m_proxy=n;this.m_shouldPolyfill=t}return Object.defineProperty(t.prototype,"proxy",{get:function(){return this.m_proxy},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"retrieveResult.data"}});return this.m_data},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(n){if(this.m_isLoaded=!0,typeof n=="object"&&n&&n._IsNull){this.m_data=null;return}this.m_data=this.m_shouldPolyfill?this.changePropertyNameToCamelLowerCase(n):n},t.prototype.changePropertyNameToCamelLowerCase=function(t){var o=95,u,i,r,f,e;if(Array.isArray(t)){for(i=[],u=0;u0&&(r=!0),t=document.createElement("a"),t.href=this.m_url,r?t.hash=t.hash.length===0||t.hash==="#"?"#"+i:t.hash+"&"+i:t.search=t.search.length===0||t.search==="?"?"?"+i:t.search+"&"+i,t.href},f.prototype.init=function(){var t=this,i;return window.addEventListener("message",this.m_onMessageHandler),i=this._getIFrameSrc(),new n._Internal.OfficePromise(function(r,u){var f=document.createElement("iframe");t.m_options.id&&(f.id=t.m_options.id);f.style.height=t.m_options.height;f.style.width=t.m_options.width;f.src=i;t.m_options.container.appendChild(f);t.m_timeoutId=setTimeout(function(){t.close();var i=n.Utility.createRuntimeError(n.ErrorCodes.timeout,n.Utility._getResourceString(n.ResourceStrings.timeout),"EmbeddedSession.init");u(i)},t.m_options.timeoutInMilliseconds);t.m_promiseResolver=r})},f.prototype._invoke=function(n,t,u){if(!this.m_enabled){t(i.InternalError,null);return}r.invokeRequestModifier&&(u=r.invokeRequestModifier(u));this._sendMessageWithCallback(this.m_id++,n,u,function(n){r.invokeResponseModifier&&(n=r.invokeResponseModifier(n));var u=n.Error;delete n.Error;t(u||i.Success,n)})},f.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler);window.clearTimeout(this.m_timeoutId);this.m_enabled=!1},Object.defineProperty(f.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),f.prototype._createRequestExecutorOrNull=function(){return new e(this)},f.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},f.prototype._registerEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.RegisterEventCommand,{EventId:i,TargetId:r},function(){n(null)})})},f.prototype._unregisterEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.UnregisterEventCommand,{EventId:i,TargetId:r},function(){n()})})},f.prototype._onMessage=function(n){var u=this,i,e,r,o,s;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===n.source&&this.m_chosenOrigin===n.origin)){if(i=n.data,i&&i[t.CommandKey]===t.ApiReadyCommand){!this.m_chosenWindow&&this._isValidDescendant(n.source)&&i[t.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=n.source,this.m_chosenOrigin=n.origin,this._sendMessageWithCallback(this.m_id++,t.GetAppContextCommand,null,function(n){u._setupContext(n);window.clearTimeout(u.m_timeoutId);u.m_promiseResolver()}));return}if(i&&i[t.CommandKey]===t.FireEventCommand){var f=i[t.ParamsKey],h=f.EventId,c=f.TargetId,l=f.Data;if(this.m_sessionEventManager)for(e=this.m_sessionEventManager.getHandlers(h,c),r=0;r=0;o--)if(r[o]===e[i].handler){r.splice(o,1);break}break;case 2:r=[];break}}return s&&(!this.m_registered&&r.length>0?u=u.then(function(){return f.m_eventInfo.registerFunc(f.m_callback)}).then(function(){return f.m_registered=!0}):this.m_registered&&r.length==0&&(u=u.then(function(){return f.m_eventInfo.unregisterFunc(f.m_callback)}).catch(function(t){n.Utility.log("Error when unregister event: "+JSON.stringify(t))}).then(function(){return f.m_registered=!1})),u=u.then(function(){return f.m_handlers=r})),u},t.prototype.fireEvent=function(t){for(var u,f,r=[],i=0;i=0;e--)if(f[e]===u){f.splice(e,1);break}return f.length===0?this.m_unregisterEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i}();n.EventRegistration=i}(OfficeExtension||(OfficeExtension={})),function(n){function r(n){t._testReadyImpl=n}function u(n){t.getGenericEventRegistration()._handleRichApiMessage(n)}var t=function(){function t(){this.m_eventRegistration=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this));this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this)}return t.prototype.ready=function(){var i=this;return this.m_ready||(this.m_ready=t._testReadyImpl?t._testReadyImpl().then(function(){i.m_isReady=!0}):n._Internal.officeJsEventRegistration.register(5,"",this.m_richApiMessageHandler).then(function(){i.m_isReady=!0})),this.m_ready},Object.defineProperty(t.prototype,"isReady",{get:function(){return this.m_isReady},enumerable:!0,configurable:!0}),t.prototype.register=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.register(n,t,i)})},t.prototype.unregister=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.unregister(n,t,i)})},t.prototype._registerEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._unregisterEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._handleRichApiMessage=function(t){var r,i,u,e,f;if(t&&t.entries)for(r=0;r0))for(e=JSON.parse(i.message),i.isRemoteOverride&&(e.source=n.Constants.eventSourceRemote),f=0;f=0;u--)if(n[u]===i){n.splice(u,1);break}n.length==0&&t.getGenericEventRegistration().unregister(r.m_genericEventInfo.eventType,r.m_genericEventInfo.getTargetIdFunc(),r._callback)})},r.prototype.removeAll=function(){},r}(n.EventHandlers);n.GenericEventHandlers=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var s=JSON.stringify(u.Body),f=u.Url,e,o;if(f.charAt(f.length-1)!="/"&&(f=f+"/"),f=f+n.Constants.processQuery,f=f+"?"+n.Constants.flags+"="+r.toString(),e={method:"POST",url:f,headers:{},body:s},e.headers[n.Constants.sourceLibHeader]=t.SourceLibHeaderValue,e.headers["CONTENT-TYPE"]="application/json",u.Headers)for(o in u.Headers)e.headers[o]=u.Headers[o];return n.HttpUtility.sendRequest(e).then(function(t){var i,r;return t.statusCode===200?i={ErrorCode:null,ErrorMessage:null,Headers:t.headers,Body:JSON.parse(t.body)}:(n.Utility.log("Error Response:"+t.body),r=n.Utility._parseErrorResponse(t),i={ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:t.headers,Body:null}),i})},t.SourceLibHeaderValue="officejs-rest",t}();n.HttpRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.setCustomSendRequestFunc=function(n){t.s_customSendRequestFunc=n},t.xhrSendRequestFunc=function(t){return new n._Internal.OfficePromise(function(i,r){var u=new XMLHttpRequest,f;if(u.open(t.method,t.url),u.onload=function(){var t={statusCode:u.status,headers:n.Utility._parseHttpResponseHeaders(u.getAllResponseHeaders()),body:u.responseText};i(t)},u.onerror=function(){r(new n._Internal.RuntimeError({code:n.ErrorCodes.connectionFailure,message:n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,u.statusText)}))},t.headers)for(f in t.headers)u.setRequestHeader(f,t.headers[f]);u.send(t.body)})},t.sendRequest=function(n){t.validateAndNormalizeRequest(n);var i=t.s_customSendRequestFunc;return i||(i=t.xhrSendRequestFunc),i(n)},t.setCustomSendLocalDocumentRequestFunc=function(n){t.s_customSendLocalDocumentRequestFunc=n},t.sendLocalDocumentRequest=function(n){t.validateAndNormalizeRequest(n);var i;return i=t.s_customSendLocalDocumentRequestFunc||t.officeJsSendLocalDocumentRequestFunc,i(n)},t.officeJsSendLocalDocumentRequestFunc=function(t){t=n.Utility._validateLocalDocumentRequest(t);var i=n.Utility._buildRequestMessageSafeArray(t);return new n._Internal.OfficePromise(function(t,r){OSF.DDA.RichApi.executeRichApiRequestAsync(i,function(i){var r;r=i.status=="succeeded"?{statusCode:n.RichApiMessageUtility.getResponseStatusCode(i),headers:n.RichApiMessageUtility.getResponseHeaders(i),body:n.RichApiMessageUtility.getResponseBody(i)}:n.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(i.error.code,i.error.message);n.Utility.log(JSON.stringify(r));t(r)})})},t.validateAndNormalizeRequest=function(t){if(n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"request"});n.Utility.isNullOrEmptyString(t.method)&&(t.method="GET");t.method=t.method.toUpperCase()},t.logRequest=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Request---"),n.Utility.log(i.method+" "+i.url),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t.logResponse=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Response---"),n.Utility.log(""+i.statusCode),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t._logBody=!1,t}();n.HttpUtility=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_clientObject=n}return n.prototype._handleResult=function(n){this.m_clientObject._handleIdResult(n)},n}();n.InstantiateActionResultHandler=t}(OfficeExtension||(OfficeExtension={})),function(n){}(OfficeExtension||(OfficeExtension={})),function(n){var u=function(){function t(n){this.m_session=n}return t.prototype.executeAsync=function(t,r,u){var e={url:n.Constants.processQuery,method:"POST",headers:u.Headers,body:u.Body},f={id:i.nextId(),type:1,flags:r,message:e};return n.Utility.log(JSON.stringify(f)),this.m_session.sendMessageToHost(f).then(function(t){var i,r,u;return n.Utility.log("Received response: "+JSON.stringify(t)),i=t.message,i.statusCode===200?r={ErrorCode:null,ErrorMessage:null,Headers:i.headers,Body:i.body}:(n.Utility.log("Error Response:"+i.body),u=n.Utility._parseErrorResponse(i),r={ErrorCode:u.errorCode,ErrorMessage:u.errorMessage,Headers:i.headers,Body:null}),r})},t}(),i=function(i){function r(n){var t=this;i.call(this);this.m_promiseResolver={};this.m_bridge=n;this.m_bridge.onMessageFromHost=function(n){t.onMessageFromHost(n)}}return __extends(r,i),r.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},r.prototype._createRequestExecutorOrNull=function(){return n.Utility.log("NativeBridgeSession::CreateRequestExecutor"),new u(this)},Object.defineProperty(r.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),r.init=function(t){if(t&&typeof t=="object"){var i=new r(t);n.ClientRequestContext._overrideSession=i;n.HttpUtility.setCustomSendLocalDocumentRequestFunc(function(n){var t={id:r.nextId(),type:1,flags:0,message:n};return i.sendMessageToHost(t).then(function(n){return n.message})})}},r.prototype.sendMessageToHost=function(t){var i=this;return this.m_bridge.sendMessageToHost(JSON.stringify(t)),new n._Internal.OfficePromise(function(n,r){i.m_promiseResolver[t.id]=n})},r.prototype.onMessageFromHost=function(n){var i,r;n==="test"?t._testFunc&&t._testFunc():(i=JSON.parse(n),typeof i.id=="number"&&(r=this.m_promiseResolver[i.id],r&&r(i),delete this.m_promiseResolver[i.id]))},r.nextId=function(){return r.s_nextId++},r.s_nextId=1,r}(n.SessionBase),r=function(){function n(){}return n.init=function(n){i.init(n)},n}(),t;n.HostBridge=r;typeof _richApiNativeBridge=="object"&&_richApiNativeBridge&&r.init(_richApiNativeBridge);t=function(){function n(){}return n.setTestFunc=function(t){n._testFunc=t},n}();n.HostBridgeTest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){this.m_objectPathInfo=n;this.m_parentObjectPath=t;this.m_isWriteOperation=!1;this.m_isCollection=i;this.m_isInvalidAfterRequest=r;this.m_isValid=!0}return Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},set:function(n){this.m_isWriteOperation=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRestrictedResourceAccess",{get:function(){return this.m_isRestrictedResourceAccess},set:function(n){this.m_isRestrictedResourceAccess=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(n){this.m_argumentObjectPaths=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(n){this.m_isValid=n;!n&&this.m_objectPathInfo.ObjectPathType===6&&this.m_savedObjectPathInfo&&(t.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(n){this.m_getByIdMethodName=n},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null},t.prototype.updateUsingObjectData=function(i){var e=i[n.Constants.referenceId],f,o,u,r;if(!n.Utility.isNullOrEmptyString(e)){this.m_savedObjectPathInfo||this.isInvalidAfterRequest||!t.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)||(f={},t.copyObjectPathInfo(this.m_objectPathInfo,f),this.m_savedObjectPathInfo={pathInfo:f,parent:this.m_parentObjectPath});this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=e;this.m_objectPathInfo.ArgumentInfo={};delete this.m_objectPathInfo.ParentObjectPathId;this.m_parentObjectPath=null;this.m_argumentObjectPaths=null;return}if(o=this.parentObjectPath&&this.parentObjectPath.isCollection,u=this.getByIdMethodName,(o||!n.Utility.isNullOrEmptyString(u))&&(r=i[n.Constants.id],n.Utility.isNullOrUndefined(r)&&(r=i[n.Constants.idPrivate]),!n.Utility.isNullOrUndefined(r))){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;n.Utility.isNullOrEmptyString(u)?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=u,this.m_getByIdMethodName=null);this.isWriteOperation=!1;this.m_objectPathInfo.ArgumentInfo={};this.m_objectPathInfo.ArgumentInfo.Arguments=[r];this.m_argumentObjectPaths=null;return}},t.isRestorableObjectPath=function(n){return n===1||n===5||n===3||n===4},t.copyObjectPathInfo=function(n,t){t.Id=n.Id;t.ArgumentInfo=n.ArgumentInfo;t.Name=n.Name;t.ObjectPathType=n.ObjectPathType;t.ParentObjectPathId=n.ParentObjectPathId},t}();n.ObjectPath=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createGlobalObjectObjectPath=function(t){var i={Id:t._nextId(),ObjectPathType:1,Name:""};return new n.ObjectPath(i,null,!1,!1)},t.createNewObjectObjectPath=function(t,i,r,u){var e={Id:t._nextId(),ObjectPathType:2,Name:i},f=new n.ObjectPath(e,null,r,!1);return f.isRestrictedResourceAccess=u,f},t.createPropertyObjectPath=function(t,i,r,u,f,e){var s={Id:t._nextId(),ObjectPathType:4,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id},o=new n.ObjectPath(s,i._objectPath,u,f);return o.isRestrictedResourceAccess=e,o},t.createIndexerObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i._objectPath,!1,!1)},t.createIndexerObjectPathUsingParentPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i,!1,!1)},t.createMethodObjectPath=function(t,i,r,u,f,e,o,s,h){var l={Id:t._nextId(),ObjectPathType:3,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},a=n.Utility.setMethodArguments(t,l.ArgumentInfo,f),c=new n.ObjectPath(l,i._objectPath,e,o);return c.argumentObjectPaths=a,c.isWriteOperation=u!=1,c.getByIdMethodName=s,c.isRestrictedResourceAccess=h,c},t.createReferenceIdObjectPath=function(t,i){var r={Id:t._nextId(),ObjectPathType:6,Name:i,ArgumentInfo:{}};return new n.ObjectPath(r,null,!1,!1)},t.createChildItemObjectPathUsingIndexerOrGetItemAt=function(i,r,u,f,e){var o=f[n.Constants.id];return n.Utility.isNullOrUndefined(o)&&(o=f[n.Constants.idPrivate]),i&&!n.Utility.isNullOrUndefined(o)?t.createChildItemObjectPathUsingIndexer(r,u,f):t.createChildItemObjectPathUsingGetItemAt(r,u,f,e)},t.createChildItemObjectPathUsingIndexer=function(t,i,r){var f=r[n.Constants.id],u;return n.Utility.isNullOrUndefined(f)&&(f=r[n.Constants.idPrivate]),u=u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u.ArgumentInfo.Arguments=[f],new n.ObjectPath(u,i._objectPath,!1,!1)},t.createChildItemObjectPathUsingGetItemAt=function(t,i,r,u){var e=r[n.Constants.index],f;return e&&(u=e),f={Id:t._nextId(),ObjectPathType:3,Name:n.Constants.getItemAt,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f.ArgumentInfo.Arguments=[u],new n.ObjectPath(f,i._objectPath,!1,!1)},t}();n.ObjectPathFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_context=n}return t.prototype.executeAsync=function(i,r,u){var f=this,e=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n._Internal.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(e,function(i){n.Utility.log("Response:");n.Utility.log(JSON.stringify(i));var r;i.status=="succeeded"?r=n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBody(i),n.RichApiMessageUtility.getResponseHeaders(i)):(r=n.RichApiMessageUtility.buildResponseOnError(i.error.code,i.error.message),f.m_context._processOfficeJsErrorResponse(i.error.code,r));t(r)})})},t.SourceLibHeaderValue="officejs",t}();n.OfficeJsRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){n.OfficeRequire=function(){return null}()})(t=n._Internal||(n._Internal={})),function(n){var t;(function(t){function i(){return function(){"use strict";function vt(n){return typeof n=="function"||typeof n=="object"&&n!==null}function b(n){return typeof n=="function"}function yt(n){return typeof n=="object"&&n!==null}function wt(n){k=n}function bt(n){f=n}function ni(){var t=process.nextTick,n=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&n[1]==="0"&&n[2]==="10"&&(t=setImmediate),function(){t(c)}}function tr(){return function(){pt(c)}}function ti(){var n=0,i=new it(c),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function ii(){var n=new MessageChannel;return n.port1.onmessage=c,function(){n.port2.postMessage(0)}}function ri(){return function(){setTimeout(c,1)}}function c(){for(var t,i,n=0;n=0?(n=n.substring(t+5,n.length),n<"14.14393"?!0:!1):!1}function i(){return typeof window=="undefined"&&typeof Promise=="function"?Promise:typeof window!="undefined"&&window.Promise?t()?n.PromiseImpl.Init():window.Promise:n.PromiseImpl.Init()}n.OfficePromise=i()}(t=n._Internal||(n._Internal={}));i=t.OfficePromise;n.Promise=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this._autoCleanupList={};this.m_context=n}return t.prototype.add=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._addCommon(n,!0)}):this._addCommon(n,!0)},t.prototype._autoAdd=function(n){this._addCommon(n,!1);this._autoCleanupList[n._objectPath.objectPathInfo.Id]=n},t.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(t,i){var r=this.m_context._autoCleanup&&!t[n.Constants.isTracked]&&t!==this.m_context._rootObject&&i&&!n.Utility.isNullOrEmptyString(i[n.Constants.referenceId]);r&&(this._autoCleanupList[t._objectPath.objectPathInfo.Id]=t,t[n.Constants.isTracked]=!0)},t.prototype._addCommon=function(t,i){if(t[n.Constants.isTracked]){i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id];return}var r=t[n.Constants.referenceId];n.Utility.isNullOrEmptyString(r)&&t._KeepReference&&(t._KeepReference(),n.ActionFactory.createInstantiateAction(this.m_context,t),i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id],t[n.Constants.isTracked]=!0)},t.prototype.remove=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._removeCommon(n)}):this._removeCommon(n)},t.prototype._removeCommon=function(t){var r=t[n.Constants.referenceId],i;n.Utility.isNullOrEmptyString(r)||(i=this.m_context._rootObject,i._RemoveReference&&i._RemoveReference(r),delete t[n.Constants.isTracked])},t.prototype._retrieveAndClearAutoCleanupList=function(){var n=this._autoCleanupList;return this._autoCleanupList={},n},t}();n.TrackedObjects=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){n||(n="root");this.m_globalObjName=n;this.m_referencedObjectPaths=t;this.m_actions=i;this.m_statements=[];this.m_variableNameForObjectPathMap={};this.m_variableNameToObjectPathMap={};this.m_declaredObjectPathMap={};this.m_showDispose=r}return t.prototype.process=function(){this.m_showDispose&&n.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions);for(var t=0;t=0&&this.m_statements.length>i+o+1)break;if(i<0)return null;for(f=i-o,f<0&&(f=0),e=i+1+o,e>this.m_statements.length&&(e=this.m_statements.length),r=[],f!=0&&r.push("..."),s=f;s>>>>"),r.push(this.m_statements[i]),r.push("// <<<<<"),h=i+1;h0)?(r=i.map(function(n){return u.getObjVarName(n)}).join(", "),n+" // And then dispose {"+r+"}"):n},t.prototype.buildQueryExpression=function(n){if(n.actionInfo.QueryInfo){var t={};return t.select=n.actionInfo.QueryInfo.Select,t.expand=n.actionInfo.QueryInfo.Expand,t.skip=n.actionInfo.QueryInfo.Skip,t.top=n.actionInfo.QueryInfo.Top,typeof t.top=="undefined"&&typeof t.skip=="undefined"&&typeof t.expand=="undefined"?typeof t.select=="undefined"?"":JSON.stringify(t.select):JSON.stringify(t)}return""},t.prototype.buildObjectPathExpressionWithParent=function(n){var t=n.objectPathInfo.ObjectPathType==5||n.objectPathInfo.ObjectPathType==3||n.objectPathInfo.ObjectPathType==4;return t&&n.objectPathInfo.ParentObjectPathId?this.getObjVarName(n.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(n):this.buildObjectPathExpression(n)},t.prototype.buildObjectPathExpression=function(t){switch(t.objectPathInfo.ObjectPathType){case 1:return"context."+this.m_globalObjName;case 5:return"getItem("+this.buildArgumentsExpression(t.objectPathInfo.ArgumentInfo)+")";case 3:return n.Utility._toCamelLowerCase(t.objectPathInfo.Name)+"("+this.buildArgumentsExpression(t.objectPathInfo.ArgumentInfo)+")";case 2:return t.objectPathInfo.Name+".newObject()";case 7:return"null";case 4:return n.Utility._toCamelLowerCase(t.objectPathInfo.Name);case 6:return"context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(t.objectPathInfo.Name)+")"}},t.prototype.buildArgumentsExpression=function(n){var t="",i;if(!n.Arguments)return t;for(i=0;i0&&(t=t+", "),t=t+this.buildArgumentLiteral(n.Arguments[i],n.ReferencedObjectPathIds?n.ReferencedObjectPathIds[i]:null);return t==="undefined"&&(t=""),t},t.prototype.buildArgumentLiteral=function(n,t){return typeof n=="number"&&n===t?this.getObjVarName(t):JSON.stringify(n)},t.prototype.getObjVarNameBase=function(t){var u="v",f=this.m_referencedObjectPaths[t],i,r;switch(f.objectPathInfo.ObjectPathType){case 1:u=this.m_globalObjName;break;case 4:u=n.Utility._toCamelLowerCase(f.objectPathInfo.Name);break;case 3:i=f.objectPathInfo.Name;i.length>3&&i.substr(0,3)==="Get"&&(i=i.substr(3));u=n.Utility._toCamelLowerCase(i);break;case 5:r=this.getObjVarNameBase(f.objectPathInfo.ParentObjectPathId);u=r.charAt(r.length-1)==="s"?r.substr(0,r.length-1):r+"Item";break}return u},t.prototype.getObjVarName=function(n){var t,i;if(this.m_variableNameForObjectPathMap[n])return this.m_variableNameForObjectPathMap[n];if(t=this.getObjVarNameBase(n),!this.m_variableNameToObjectPathMap[t])return this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t;for(i=1;this.m_variableNameToObjectPathMap[t+i.toString()];)i++;return t=t+i.toString(),this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t},t}();n.RequestPrettyPrinter=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.cannotRegisterEvent="CannotRegisterEvent",n.connectionFailureWithStatus="ConnectionFailureWithStatus",n.connectionFailureWithDetails="ConnectionFailureWithDetails",n.invalidObjectPath="InvalidObjectPath",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.invalidArgumentGeneric="InvalidArgumentGeneric",n.propertyNotLoaded="PropertyNotLoaded",n.runMustReturnPromise="RunMustReturnPromise",n.timeout="Timeout",n.propertyDoesNotExist="PropertyDoesNotExist",n.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",n.moreInfoInnerError="MoreInfoInnerError",n.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",n.valueNotLoaded="ValueNotLoaded",n.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage",n.invalidOperationInCellEditMode="InvalidOperationInCellEditMode",n.customFunctionDefintionMissing="CustomFunctionDefintionMissing",n.customFunctionImplementationMissing="CustomFunctionImplementationMissing",n.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars",n.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit",n.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch",n.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing",n.apiNotFoundDetails="ApiNotFoundDetails",n}();n.ResourceStrings=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.CannotRegisterEvent="The event handler cannot be registered.",n.ConnectionFailureWithStatus="The request failed with status code of {0}.",n.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}",n.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",n.InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',n.InvalidRequestContext="Cannot use the object across different request contexts.",n.PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",n.RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',n.Timeout="The operation has timed out.",n.ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.',n.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.",n.InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.",n.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions.",n.CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.",n.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods.",n.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name.",n.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.",n.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.",n.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.",n}();n.ResourceStringValues=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.buildMessageArrayForIRequestExecutor=function(i,r,u,f){var o=JSON.stringify(u.Body),e;return n.Utility.log("Request:"),n.Utility.log(o),e={},e[n.Constants.sourceLibHeader]=f,t.buildRequestMessageSafeArray(i,r,"POST","ProcessQuery",e,o)},t.buildResponseOnSuccess=function(n,t){var i={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return i.Body=JSON.parse(n),i.Headers=t,i},t.buildResponseOnError=function(i,r){var u={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return u.ErrorCode=n.ErrorCodes.generalException,u.ErrorMessage=r,i==t.OfficeJsErrorCode_ooeNoCapability?u.ErrorCode=n.ErrorCodes.accessDenied:i==t.OfficeJsErrorCode_ooeActivityLimitReached?u.ErrorCode=n.ErrorCodes.activityLimitReached:i==t.OfficeJsErrorCode_ooeInvalidOrTimedOutSession&&(u.ErrorCode=n.ErrorCodes.invalidOrTimedOutSession,u.ErrorMessage=n.Utility._getResourceString(n.ResourceStrings.invalidOrTimedOutSessionMessage)),u},t.buildHttpResponseFromOfficeJsError=function(i,r){var f=500,u={};return u.error={},u.error.code=n.ErrorCodes.generalException,u.error.message=r,i===t.OfficeJsErrorCode_ooeNoCapability?(f=403,u.error.code=n.ErrorCodes.accessDenied):i===t.OfficeJsErrorCode_ooeActivityLimitReached&&(f=429,u.error.code=n.ErrorCodes.activityLimitReached),{statusCode:f,headers:{},body:JSON.stringify(u)}},t.buildRequestMessageSafeArray=function(n,t,i,r,u,f){var e=[],o;if(u)for(o in u)e.push(o),e.push(u[o]);var s=0,h="",c="",l="";return[n,i,r,e,f,s,t,h,c,l]},t.getResponseBody=function(n){return t.getResponseBodyFromSafeArray(n.value.data)},t.getResponseHeaders=function(n){return t.getResponseHeadersFromSafeArray(n.value.data)},t.getResponseBodyFromSafeArray=function(n){var t=n[2],i;return typeof t=="string"?t:(i=t,i.join(""))},t.getResponseHeadersFromSafeArray=function(n){var i=n[1],r,t;if(!i)return null;for(r={},t=0;t0&&f.push(i);return f},t.toJson=function(n,t,i,r){var e={},u,f;for(u in t)f=t[u],typeof f!="undefined"&&(e[u]=f);for(u in i)f=i[u],typeof f!="undefined"&&(e[u]=f.toJSON());return r&&(e.items=r.map(function(n){return n.toJSON()})),e},t.throwError=function(i,r,u){throw new n._Internal.RuntimeError({code:i,message:t._getResourceString(i,r),debugInfo:u?{errorLocation:u}:undefined});},t.createRuntimeError=function(t,i,r){return new n._Internal.RuntimeError({code:t,message:i,debugInfo:{errorLocation:r}})},t._getResourceString=function(i,r){var u,e,f,o;return typeof window!="undefined"&&window.Strings&&window.Strings.OfficeOM&&(e="L_"+i,f=window.Strings.OfficeOM[e],f&&(u=f)),u||(u=n.ResourceStringValues[i]),u||(u=i),t.isNullOrUndefined(r)||(Array.isArray(r)?(o=r,u=t._formatString(u,o)):u=u.replace("{0}",r)),u},t._formatString=function(t,i){return t.replace(/\{\d\}/g,function(t){var r=parseInt(t.substr(1,t.length-2));if(r0?".":"")+i;break;case 3:i=t.normalizeName(n.objectPathInfo.Name)+"()"+(i.length>0?".":"")+i;break;case 4:i=t.normalizeName(n.objectPathInfo.Name)+(i.length>0?".":"")+i;break;case 5:i="getItem()"+(i.length>0?".":"")+i;break;case 6:i="_reference()"+(i.length>0?".":"")+i;break}n=n.parentObjectPath}return i},t._createPromiseFromResult=function(t){return new n._Internal.OfficePromise(function(n,i){n(t)})},t._createTimeoutPromise=function(t){return new n._Internal.OfficePromise(function(n,i){setTimeout(function(){n(null)},t)})},t.promisify=function(t){return new n._Internal.OfficePromise(function(n,i){var r=function(t){t.status=="failed"?i(t.error):n(t.value)};t(r)})},t._addActionResultHandler=function(n,t,i){n.context._pendingRequest.addActionResultHandler(t,i)},t._handleNavigationPropertyResults=function(n,i,r){for(var u=0;u0},t._getLocalDocumentUrlPrefixLength=function(n){for(var i=["http://document.localhost","https://document.localhost","//document.localhost"],r=n.toLowerCase().trim(),t=0;t0))for(s=i.url.substr(f+1),e=s.split("&"),u=0;u0&&(f=i.substr(0,u),e=i.substr(u+1),f=t.trim(f),e=t.trim(e),s[f.toUpperCase()]=e));return s},t._parseErrorResponse=function(i){var r=null,f,e,u;if(t.isPlainJsonObject(i.body))r=i.body;else if(!t.isNullOrEmptyString(i.body)){f=t.trim(i.body);try{r=JSON.parse(f)}catch(o){t.log("Error when parse "+f)}}return!t.isNullOrUndefined(r)&&typeof r=="object"&&r.error?(u=r.error.code,e=t._getResourceString(n.ResourceStrings.connectionFailureWithDetails,[i.statusCode.toString(),r.error.code,r.error.message])):e=t._getResourceString(n.ResourceStrings.connectionFailureWithStatus,i.statusCode.toString()),t.isNullOrEmptyString(u)&&(u=n.ErrorCodes.connectionFailure),{errorCode:u,errorMessage:e}},t._copyHeaders=function(n,t){if(n&&t)for(var i in n)t[i]=n[i]},t._toCamelLowerCase=function(n){if(t.isNullOrEmptyString(n))return n;for(var i=0;i=65&&n.charCodeAt(i)<=90;)i++;return i 6 && v.slice(0, 5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) { + d=new Date(parseInt(v.slice(5, -1))); + if (d) { + return d; + } + } + return v; + }); + } + else { + value=Sys.Serialization.JavaScriptSerializer.deserialize(value, true); + } + ret[key]=value; + } + catch (ex) { + } + } + return ret; + }, loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs) { if (url && callback) { var doc=window.document; @@ -837,6 +885,14 @@ OSF.OUtil=(function () { } } }, + removeClass: function OSF_OUtil$removeClass(elmt, val) { + if (OSF.OUtil.hasClass(elmt, val)) { + var className=elmt.getAttribute(_classN); + var reg=new RegExp('(\\s|^)'+val+'(\\s|$)'); + className=className.replace(reg, ''); + elmt.setAttribute(_classN, className); + } + }, hasClass: function OSF_OUtil$hasClass(elmt, clsName) { var className=elmt.getAttribute(_classN); return className && className.match(new RegExp('(\\s|^)'+clsName+'(\\s|$)')); @@ -973,6 +1029,12 @@ OSF.OUtil.Guid=(function () { })(); window.OSF=OSF; OSF.OUtil.setNamespace("OSF", window); +OSF.MessageIDs={ + "FetchBundleUrl": 0, + "LoadReactBundle": 1, + "LoadBundleSuccess": 2, + "LoadBundleError": 3 +}; OSF.AppName={ Unsupported: 0, Excel: 1, @@ -1000,7 +1062,10 @@ OSF.AppName={ OutlookAndroid: 4194304, OneNoteWinRT: 8388608, ExcelAndroid: 8388609, - VisioWebApp: 8388610 + VisioWebApp: 8388610, + OneNoteIOS: 8388611, + WordAndroid: 8388613, + PowerpointAndroid: 8388614 }; OSF.InternalPerfMarker={ DataCoercionBegin: "Agave.HostCall.CoerceDataStart", @@ -1030,7 +1095,9 @@ OSF.AgaveHostAction={ "EscExit": 15, "F2Exit": 16, "ExitNoFocusable": 17, - "ExitNoFocusableShift": 18 + "ExitNoFocusableShift": 18, + "MouseEnter": 19, + "MouseLeave": 20 }; OSF.SharedConstants={ "NotificationConversationIdSuffix": '_ntf' @@ -1164,6 +1231,10 @@ Microsoft.Office.WebExtension.Parameters={ Status: "status", PlatformType: "platformType", HostType: "hostType", + ForceConsent: "forceConsent", + ForceAddAccount: "forceAddAccount", + AuthChallenge: "authChallenge", + Reserved: "reserved", Xml: "xml", Namespace: "namespace", Prefix: "prefix", @@ -1195,7 +1266,10 @@ Microsoft.Office.WebExtension.Parameters={ MessageToParent: "messageToParent", DisplayInIframe: "displayInIframe", MessageContent: "messageContent", - AppCommandInvocationCompletedData: "appCommandInvocationCompletedData" + HideTitle: "hideTitle", + UseDeviceIndependentPixels: "useDeviceIndependentPixels", + AppCommandInvocationCompletedData: "appCommandInvocationCompletedData", + Base64: "base64" }; OSF.OUtil.setNamespace("DDA", OSF); OSF.DDA.DocumentMode={ @@ -1251,6 +1325,9 @@ OSF.DDA.MethodDispId={ dispidExecuteRichApiRequestMethod: 93, dispidAppCommandInvocationCompletedMethod: 94, dispidCloseContainerMethod: 97, + dispidGetAccessTokenMethod: 98, + dispidOpenBrowserWindow: 102, + dispidCreateDocumentMethod: 105, dispidGetSelectedTaskMethod: 110, dispidGetSelectedResourceMethod: 111, dispidGetTaskMethod: 112, @@ -1301,9 +1378,16 @@ OSF.DDA.EventDispId={ dispidDialogMessageReceivedEvent: 10, dispidDialogNotificationShownInAddinEvent: 11, dispidDialogParentMessageReceivedEvent: 12, + dispidObjectDeletedEvent: 13, + dispidObjectSelectionChangedEvent: 14, + dispidObjectDataChangedEvent: 15, + dispidContentControlAddedEvent: 16, dispidActivationStatusChangedEvent: 32, + dispidRichApiMessageEvent: 33, dispidAppCommandInvokedEvent: 39, dispidOlkItemSelectedChangedEvent: 46, + dispidOlkRecipientsChangedEvent: 47, + dispidOlkAppointmentTimeChangedEvent: 48, dispidTaskSelectionChangedEvent: 56, dispidResourceSelectionChangedEvent: 57, dispidViewSelectionChangedEvent: 58, @@ -1389,6 +1473,8 @@ OSF.DDA.ErrorCodeManager=(function () { ooeBrowserAPINotSupported: 5009, ooeInvalidParam: 5010, ooeRequestTimeout: 5011, + ooeInvalidOrTimedOutSession: 5012, + ooeInvalidApiArguments: 5013, ooeTooManyIncompleteRequests: 5100, ooeRequestTokenUnavailable: 5101, ooeActivityLimitReached: 5102, @@ -1424,7 +1510,18 @@ OSF.DDA.ErrorCodeManager=(function () { ooeEndUserAllow: 12008, ooeEndUserIgnore: 12009, ooeNotUILessDialog: 12010, - ooeCrossZone: 12011 + ooeCrossZone: 12011, + ooeNotSSOAgave: 13000, + ooeSSOUserNotSignedIn: 13001, + ooeSSOUserAborted: 13002, + ooeSSOUnsupportedUserIdentity: 13003, + ooeSSOInvalidResourceUrl: 13004, + ooeSSOInvalidGrant: 13005, + ooeSSOClientError: 13006, + ooeSSOServerError: 13007, + ooeAddinIsAlreadyRequestingToken: 13008, + ooeSSOUserConsentNotSupportedByCurrentAddinCategory: 13009, + ooeSSOConnectionLost: 13010 }, initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS) { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={ name: stringNS.L_InvalidCoercion, message: stringNS.L_CoercionTypeNotSupported }; @@ -1478,9 +1575,11 @@ OSF.DDA.ErrorCodeManager=(function () { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={ name: stringNS.L_IndexOutOfRange, message: stringNS.L_IndexOutOfRange }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={ name: stringNS.L_APINotSupported, message: stringNS.L_BrowserAPINotSupported }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={ name: stringNS.L_APICallFailed, message: stringNS.L_RequestTimeout }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={ name: stringNS.L_InvalidOrTimedOutSession, message: stringNS.L_InvalidOrTimedOutSessionMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={ name: stringNS.L_APICallFailed, message: stringNS.L_TooManyIncompleteRequests }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={ name: stringNS.L_APICallFailed, message: stringNS.L_RequestTokenUnavailable }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={ name: stringNS.L_APICallFailed, message: stringNS.L_ActivityLimitReached }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={ name: stringNS.L_APICallFailed, message: stringNS.L_InvalidApiArgumentsMessage }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={ name: stringNS.L_InvalidNode, message: stringNS.L_CustomXmlNodeNotFound }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={ name: stringNS.L_CustomXmlError, message: stringNS.L_CustomXmlError }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={ name: stringNS.L_CustomXmlExceedQuotaName, message: stringNS.L_CustomXmlExceedQuotaMessage }; @@ -1511,6 +1610,17 @@ OSF.DDA.ErrorCodeManager=(function () { _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={ name: stringNS.L_DisplayDialogError, message: stringNS.L_DialogRequireHTTPS }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={ name: stringNS.L_DisplayDialogError, message: stringNS.L_UserClickIgnore }; _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={ name: stringNS.L_DisplayDialogError, message: stringNS.L_NewWindowCrossZoneErrorString }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={ name: stringNS.L_APINotSupported, message: stringNS.L_InvalidSSOAddinMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={ name: stringNS.L_UserNotSignedIn, message: stringNS.L_UserNotSignedIn }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={ name: stringNS.L_UserAborted, message: stringNS.L_UserAbortedMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={ name: stringNS.L_UnsupportedUserIdentity, message: stringNS.L_UnsupportedUserIdentityMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={ name: stringNS.L_InvalidResourceUrl, message: stringNS.L_InvalidResourceUrlMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={ name: stringNS.L_InvalidGrant, message: stringNS.L_InvalidGrantMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={ name: stringNS.L_SSOClientError, message: stringNS.L_SSOClientErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={ name: stringNS.L_SSOServerError, message: stringNS.L_SSOServerErrorMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={ name: stringNS.L_AddinIsAlreadyRequestingToken, message: stringNS.L_AddinIsAlreadyRequestingTokenMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={ name: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategory, message: stringNS.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage }; + _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={ name: stringNS.L_SSOConnectionLostError, message: stringNS.L_SSOConnectionLostErrorMessage }; } }; })(); @@ -2033,6 +2143,7 @@ var OfficeExt; web: Microsoft.Office.WebExtension.PlatformType.OfficeOnline, winrt: Microsoft.Office.WebExtension.PlatformType.Universal, win32: Microsoft.Office.WebExtension.PlatformType.PC, + mac: Microsoft.Office.WebExtension.PlatformType.Mac, ios: Microsoft.Office.WebExtension.PlatformType.iOS, android: Microsoft.Office.WebExtension.PlatformType.Android }; @@ -2206,6 +2317,16 @@ OSF.DDA.Context=function OSF_DDA_Context(officeAppContext, document, license, ap value: officeAppContext.ui }); } + if (officeAppContext.auth) { + OSF.OUtil.defineEnumerableProperty(this, "auth", { + value: officeAppContext.auth + }); + } + if (officeAppContext.application) { + OSF.OUtil.defineEnumerableProperty(this, "application", { + value: officeAppContext.application + }); + } if (officeAppContext.get_isDialog()) { var requirements=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext); OSF.OUtil.defineEnumerableProperty(this, "requirements", { @@ -2248,6 +2369,8 @@ OSF.DDA.OutlookContext=function OSF_DDA_OutlookContext(appContext, settings, lic }; OSF.OUtil.extend(OSF.DDA.OutlookContext, OSF.DDA.Context); OSF.DDA.OutlookAppOm=function OSF_DDA_OutlookAppOm(appContext, window, appReady) { }; +OSF.DDA.Application=function OSF_DDA_Application(officeAppContext) { +}; OSF.DDA.Document=function OSF_DDA_Document(officeAppContext, settings) { var mode; switch (officeAppContext.get_clientMode()) { @@ -2980,9 +3103,12 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, "ClearFormatsAsync": did.dispidClearFormatsMethod, "SetTableOptionsAsync": did.dispidSetTableOptionsMethod, "SetFormatsAsync": did.dispidSetFormatsMethod, + "GetAccessTokenAsync": did.dispidGetAccessTokenMethod, "ExecuteRichApiRequestAsync": did.dispidExecuteRichApiRequestMethod, "AppCommandInvocationCompletedAsync": did.dispidAppCommandInvocationCompletedMethod, "CloseContainerAsync": did.dispidCloseContainerMethod, + "OpenBrowserWindow": did.dispidOpenBrowserWindow, + "CreateDocumentAsync": did.dispidCreateDocumentMethod, "AddDataPartAsync": did.dispidAddDataPartMethod, "GetDataPartByIdAsync": did.dispidGetDataPartByIdMethod, "GetDataPartsByNameSpaceAsync": did.dispidGetDataPartsByNamespaceMethod, @@ -3022,13 +3148,13 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, } jsom=OSF.DDA.SyncMethodNames; did=OSF.DDA.MethodDispId; - var asyncMethodMap={ + var syncMethodMap={ "MessageParent": did.dispidMessageParentMethod, "SendMessage": did.dispidSendMessageMethod }; - for (var method in asyncMethodMap) { + for (var method in syncMethodMap) { if (jsom[method]) { - dispIdMap[jsom[method].id]=asyncMethodMap[method]; + dispIdMap[jsom[method].id]=syncMethodMap[method]; } } jsom=Microsoft.Office.WebExtension.EventType; @@ -3044,7 +3170,14 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, "AppCommandInvoked": did.dispidAppCommandInvokedEvent, "DialogMessageReceived": did.dispidDialogMessageReceivedEvent, "DialogParentMessageReceived": did.dispidDialogParentMessageReceivedEvent, + "ObjectDeleted": did.dispidObjectDeletedEvent, + "ObjectSelectionChanged": did.dispidObjectSelectionChangedEvent, + "ObjectDataChanged": did.dispidObjectDataChangedEvent, + "ContentControlAdded": did.dispidContentControlAddedEvent, + "RichApiMessage": did.dispidRichApiMessageEvent, "ItemChanged": did.dispidOlkItemSelectedChangedEvent, + "RecipientsChanged": did.dispidOlkRecipientsChangedEvent, + "AppointmentTimeChanged": did.dispidOlkAppointmentTimeChangedEvent, "TaskSelectionChanged": did.dispidTaskSelectionChangedEvent, "ResourceSelectionChanged": did.dispidResourceSelectionChangedEvent, "ViewSelectionChanged": did.dispidViewSelectionChangedEvent, @@ -3057,6 +3190,12 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, dispIdMap[jsom[event]]=eventMap[event]; } } + function IsObjectEvent(dispId) { + return (dispId==OSF.DDA.EventDispId.dispidObjectDeletedEvent || + dispId==OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent || + dispId==OSF.DDA.EventDispId.dispidObjectDataChangedEvent || + dispId==OSF.DDA.EventDispId.dispidContentControlAddedEvent); + } function onException(ex, asyncMethodCall, suppliedArgs, callArgs) { if (typeof ex=="number") { if (!callArgs) { @@ -3082,11 +3221,13 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, window.Excel._RedirectV1APIs=true; } if (window.Excel && window.Excel._RedirectV1APIs && (richApiInExcelMethodSubstitution=window.Excel._V1APIMap[methodName])) { + var preprocessedCallArgs=OSF.OUtil.shallowCopy(callArgs); + delete preprocessedCallArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext]; if (richApiInExcelMethodSubstitution.preprocess) { - callArgs=richApiInExcelMethodSubstitution.preprocess(callArgs); + preprocessedCallArgs=richApiInExcelMethodSubstitution.preprocess(preprocessedCallArgs); } var ctx=new window.Excel.RequestContext(); - var result=richApiInExcelMethodSubstitution.call(ctx, callArgs); + var result=richApiInExcelMethodSubstitution.call(ctx, preprocessedCallArgs); ctx.sync() .then(function () { var response=result.value; @@ -3094,7 +3235,7 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, delete response["status"]; delete response["@odata.type"]; if (richApiInExcelMethodSubstitution.postprocess) { - response=richApiInExcelMethodSubstitution.postprocess(response, callArgs); + response=richApiInExcelMethodSubstitution.postprocess(response, preprocessedCallArgs); } if (status !=0) { response=OSF.DDA.ErrorCodeManager.getErrorArgs(status); @@ -3112,6 +3253,7 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, else { hostCallArgs=callArgs; } + var startTime=(new Date()).getTime(); delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({ "dispId": dispId, "hostCallArgs": hostCallArgs, @@ -3132,6 +3274,9 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, } var payload=asyncMethodCall.processResponse(status, responseArgs, caller, callArgs); OSF.DDA.issueAsyncResult(callArgs, status, payload); + if (OSF.AppTelemetry) { + OSF.AppTelemetry.onMethodDone(dispId, hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); + } } }); } @@ -3143,9 +3288,11 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, this[OSF.DDA.DispIdHost.Methods.AddEventHandler]=function OSF_DDA_DispIdHost_Facade$AddEventHandler(suppliedArguments, eventDispatch, caller, isPopupWindow) { var callArgs; var eventType, handler; + var isObjectEvent=false; function onEnsureRegistration(status) { if (status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { - var added=eventDispatch.addEventHandler(eventType, handler); + var added=!isObjectEvent ? eventDispatch.addEventHandler(eventType, handler) : + eventDispatch.addObjectEventHandler(eventType, callArgs[Microsoft.Office.WebExtension.Parameters.Id], handler); if (!added) { status=OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed; } @@ -3165,19 +3312,25 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess); return; } - if (eventDispatch.getEventHandlerCount(eventType)==0) { - var dispId=dispIdMap[eventType]; + var dispId=dispIdMap[eventType]; + isObjectEvent=IsObjectEvent(dispId); + var targetId=(isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); + var count=isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId) : eventDispatch.getEventHandlerCount(eventType); + if (count==0) { var invoker=getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]; invoker({ "eventType": eventType, "dispId": dispId, - "targetId": caller.id || "", + "targetId": targetId, "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, "onComplete": onEnsureRegistration, "onEvent": function handleEvent(hostArgs) { var args=parameterMap.fromHost(dispId, hostArgs); - eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType, caller, args)); + if (!isObjectEvent) + eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType, caller, args)); + else + eventDispatch.fireObjectEvent(targetId, OSF.DDA.OMFactory.manufactureEventArgs(eventType, targetId, args)); } }); } @@ -3192,6 +3345,7 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, this[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]=function OSF_DDA_DispIdHost_Facade$RemoveEventHandler(suppliedArguments, eventDispatch, caller) { var callArgs; var eventType, handler; + var isObjectEvent=false; function onEnsureRegistration(status) { var error; if (status !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess) { @@ -3204,22 +3358,25 @@ OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments, caller, eventDispatch); eventType=callArgs[Microsoft.Office.WebExtension.Parameters.EventType]; handler=callArgs[Microsoft.Office.WebExtension.Parameters.Handler]; + var dispId=dispIdMap[eventType]; + isObjectEvent=IsObjectEvent(dispId); + var targetId=(isObjectEvent ? callArgs[Microsoft.Office.WebExtension.Parameters.Id] : (caller.id || "")); var status, removeSuccess; if (handler===null) { - removeSuccess=eventDispatch.clearEventHandlers(eventType); + removeSuccess=isObjectEvent ? eventDispatch.clearObjectEventHandlers(eventType, targetId) : eventDispatch.clearEventHandlers(eventType); status=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess; } else { - removeSuccess=eventDispatch.removeEventHandler(eventType, handler); + removeSuccess=isObjectEvent ? eventDispatch.removeObjectEventHandler(eventType, targetId, handler) : eventDispatch.removeEventHandler(eventType, handler); status=removeSuccess ? OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess : OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist; } - if (removeSuccess && eventDispatch.getEventHandlerCount(eventType)==0) { - var dispId=dispIdMap[eventType]; + var count=isObjectEvent ? eventDispatch.getObjectEventHandlerCount(eventType, targetId) : eventDispatch.getEventHandlerCount(eventType); + if (removeSuccess && count==0) { var invoker=getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]; invoker({ "eventType": eventType, "dispId": dispId, - "targetId": caller.id || "", + "targetId": targetId, "onCalling": function OSF_DDA_DispIdFacade$Execute_onCalling() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall); }, "onReceiving": function OSF_DDA_DispIdFacade$Execute_onReceiving() { OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse); }, "onComplete": onEnsureRegistration @@ -3987,7 +4144,6 @@ OSF.DDA.SafeArray.Delegate.executeAsync=function OSF_DDA_SafeArray_Delegate$Exec if (args.onCalling) { args.onCalling(); } - var startTime=(new Date()).getTime(); OSF.ClientHostController.execute(args.dispId, toArray(args.hostCallArgs), function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode) { var result=hostResponseArgs.toArray(); var status=result[OSF.DDA.SafeArray.Response.Status]; @@ -4034,9 +4190,6 @@ OSF.DDA.SafeArray.Delegate.executeAsync=function OSF_DDA_SafeArray_Delegate$Exec } args.onComplete(status, payload); } - if (OSF.AppTelemetry) { - OSF.AppTelemetry.onMethodDone(args.dispId, args.hostCallArgs, Math.abs((new Date()).getTime() - startTime), status); - } return true; }); } @@ -4152,6 +4305,13 @@ OSF.InitializationHelper.prototype.prepareApiSurface=function OSF_Initialization } } } + if (OSF.DDA.OpenBrowser) { + OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui, [OSF.DDA.AsyncMethodNames.OpenBrowserWindow]); + } + if (OSF.DDA.Auth) { + appContext.auth=new OSF.DDA.Auth(); + OSF.DDA.DispIdHost.addAsyncMethods(appContext.auth, [OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]); + } OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(appContext, appContext.doc, license, null, getOfficeThemeHandler)); var getDelegateMethods, parameterMap; getDelegateMethods=OSF.DDA.DispIdHost.getClientDelegateMethods; @@ -4876,7 +5036,7 @@ var OSFAriaLogger; function AriaLogger() { } AriaLogger.prototype.getAriaCDNLocation=function () { - return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry-2.8.0.min.js"); + return (OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"/ariatelemetry/aria-web-telemetry.js"); }; AriaLogger.getInstance=function () { if (AriaLogger.AriaLoggerObj===undefined) { @@ -4893,13 +5053,10 @@ var OSFAriaLogger; try { if (!this.ALogger) { var OfficeExtensibilityTenantID="db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439"; - var configuration=new microsoft.applications.telemetry.LogConfiguration(); - configuration.enableAutoUserSession=true; - microsoft.applications.telemetry.LogManager.initialize(OfficeExtensibilityTenantID, configuration); - this.ALogger=new microsoft.applications.telemetry.Logger(); + this.ALogger=AWTLogManager.initialize(OfficeExtensibilityTenantID); } - var eventProperties=new microsoft.applications.telemetry.EventProperties(); - eventProperties.name="Office.Extensibility.OfficeJS."+tableName; + var eventProperties=new AWTEventProperties(); + eventProperties.setName("Office.Extensibility.OfficeJS."+tableName); for (var key in telemetryData) { if (key.toLowerCase() !=="table") { eventProperties.setProperty(key, telemetryData[key]); @@ -4932,6 +5089,7 @@ var OSFAppTelemetry; var sessionId=OSF.OUtil.Guid.generateNewGuid(); var osfControlAppCorrelationId=""; var omexDomainRegex=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/", "i"); + OSFAppTelemetry.enableTelemetry=true; ; var AppInfo=(function () { function AppInfo() { @@ -5015,17 +5173,19 @@ var OSFAppTelemetry; function AppLogger() { } AppLogger.prototype.LogData=function (data) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, data.SerializeRow(), OSF.Logger.SendFlag.none); - OSFAriaLogger.AriaLogger.getInstance().logData(data); + try { + OSFAriaLogger.AriaLogger.getInstance().logData(data); + } + catch (e) { + } }; AppLogger.prototype.LogRawData=function (log) { - if (!OSF.Logger) { + if (!OSF.Logger || !OSFAppTelemetry.enableTelemetry) { return; } - OSF.Logger.sendLog(OSF.Logger.TraceLevel.info, log, OSF.Logger.SendFlag.none); try { OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(log)); } @@ -5065,7 +5225,7 @@ var OSFAppTelemetry; } appInfo.message=context.get_hostCustomMessage(); appInfo.officeJSVersion=OSF.ConstantNames.FileVersion; - appInfo.hostJSVersion="16.0.7916.1000"; + appInfo.hostJSVersion="16.0.8916.1000"; if (context._wacHostEnvironment) { appInfo.wacHostEnvironment=context._wacHostEnvironment; } @@ -5411,11 +5571,18 @@ OSF.DDA.AsyncMethodCalls.define({ Microsoft.Office.WebExtension.EventType={}; OSF.EventDispatch=function OSF_EventDispatch(eventTypes) { this._eventHandlers={}; + this._objectEventHandlers={}; this._queuedEventsArgs={}; - for (var entry in eventTypes) { - var eventType=eventTypes[entry]; - this._eventHandlers[eventType]=[]; - this._queuedEventsArgs[eventType]=[]; + if (eventTypes !=null) { + for (var i=0; i < eventTypes.length; i++) { + var eventType=eventTypes[i]; + var isObjectEvent=(eventType=="objectDeleted" || eventType=="objectSelectionChanged" || eventType=="objectDataChanged" || eventType=="contentControlAdded"); + if (!isObjectEvent) + this._eventHandlers[eventType]=[]; + else + this._objectEventHandlers[eventType]={}; + this._queuedEventsArgs[eventType]=[]; + } } }; OSF.EventDispatch.prototype={ @@ -5423,23 +5590,37 @@ OSF.EventDispatch.prototype={ var events=[]; for (var eventName in this._eventHandlers) events.push(eventName); + for (var eventName in this._objectEventHandlers) + events.push(eventName); return events; }, supportsEvent: function OSF_EventDispatch$supportsEvent(event) { - var isSupported=false; for (var eventName in this._eventHandlers) { - if (event==eventName) { - isSupported=true; - break; - } + if (event==eventName) + return true; } - return isSupported; + for (var eventName in this._objectEventHandlers) { + if (event==eventName) + return true; + } + return false; }, hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler) { var handlers=this._eventHandlers[eventType]; if (handlers && handlers.length > 0) { - for (var h in handlers) { - if (handlers[h]===handler) + for (var i=0; i < handlers.length; i++) { + if (handlers[i]===handler) + return true; + } + } + return false; + }, + hasObjectEventHandler: function OSF_EventDispatch$hasObjectEventHandler(eventType, objectId, handler) { + var handlers=this._objectEventHandlers[eventType]; + if (handlers !=null) { + var _handlers=handlers[objectId]; + for (var i=0; _handlers !=null && i < _handlers.length; i++) { + if (_handlers[i]===handler) return true; } } @@ -5458,6 +5639,19 @@ OSF.EventDispatch.prototype={ return false; } }, + addObjectEventHandler: function OSF_EventDispatch$addObjectEventHandler(eventType, objectId, handler) { + if (typeof handler !="function") { + return false; + } + var handlers=this._objectEventHandlers[eventType]; + if (handlers && !this.hasObjectEventHandler(eventType, objectId, handler)) { + if (handlers[objectId]==null) + handlers[objectId]=[]; + handlers[objectId].push(handler); + return true; + } + return false; + }, addEventHandlerAndFireQueuedEvent: function OSF_EventDispatch$addEventHandlerAndFireQueuedEvent(eventType, handler) { var handlers=this._eventHandlers[eventType]; var isFirstHandler=handlers.length==0; @@ -5479,6 +5673,19 @@ OSF.EventDispatch.prototype={ } return false; }, + removeObjectEventHandler: function OSF_EventDispatch$removeObjectEventHandler(eventType, objectId, handler) { + var handlers=this._objectEventHandlers[eventType]; + if (handlers !=null) { + var _handlers=handlers[objectId]; + for (var i=0; _handlers !=null && i < _handlers.length; i++) { + if (_handlers[i]===handler) { + _handlers.splice(i, 1); + return true; + } + } + } + return false; + }, clearEventHandlers: function OSF_EventDispatch$clearEventHandlers(eventType) { if (typeof this._eventHandlers[eventType] !="undefined" && this._eventHandlers[eventType].length > 0) { this._eventHandlers[eventType]=[]; @@ -5486,23 +5693,51 @@ OSF.EventDispatch.prototype={ } return false; }, + clearObjectEventHandlers: function OSF_EventDispatch$clearObjectEventHandlers(eventType, objectId) { + if (this._objectEventHandlers[eventType] !=null && this._objectEventHandlers[eventType][objectId] !=null) { + this._objectEventHandlers[eventType][objectId]=[]; + return true; + } + return false; + }, getEventHandlerCount: function OSF_EventDispatch$getEventHandlerCount(eventType) { return this._eventHandlers[eventType] !=undefined ? this._eventHandlers[eventType].length : -1; }, + getObjectEventHandlerCount: function OSF_EventDispatch$getObjectEventHandlerCount(eventType, objectId) { + if (this._objectEventHandlers[eventType]==null || this._objectEventHandlers[eventType][objectId]==null) + return 0; + return this._objectEventHandlers[eventType][objectId].length; + }, fireEvent: function OSF_EventDispatch$fireEvent(eventArgs) { if (eventArgs.type==undefined) return false; var eventType=eventArgs.type; if (eventType && this._eventHandlers[eventType]) { var eventHandlers=this._eventHandlers[eventType]; - for (var handler in eventHandlers) - eventHandlers[handler](eventArgs); + for (var i=0; i < eventHandlers.length; i++) { + eventHandlers[i](eventArgs); + } return true; } else { return false; } }, + fireObjectEvent: function OSF_EventDispatch$fireObjectEvent(objectId, eventArgs) { + if (eventArgs.type==undefined) + return false; + var eventType=eventArgs.type; + if (eventType && this._objectEventHandlers[eventType]) { + var eventHandlers=this._objectEventHandlers[eventType]; + var _handlers=eventHandlers[objectId]; + if (_handlers !=null) { + for (var i=0; i < _handlers.length; i++) + _handlers[i](eventArgs); + return true; + } + } + return false; + }, fireOrQueueEvent: function OSF_EventDispatch$fireOrQueueEvent(eventArgs) { var eventType=eventArgs.type; if (eventType && this._eventHandlers[eventType]) { @@ -5572,6 +5807,15 @@ OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEve case Microsoft.Office.WebExtension.EventType.AppCommandInvoked: args=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(eventProperties); break; + case Microsoft.Office.WebExtension.EventType.ObjectDeleted: + case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged: + case Microsoft.Office.WebExtension.EventType.ObjectDataChanged: + case Microsoft.Office.WebExtension.EventType.ContentControlAdded: + args=new OSF.DDA.ObjectEventArgs(eventType, eventProperties[Microsoft.Office.WebExtension.Parameters.Id]); + break; + case Microsoft.Office.WebExtension.EventType.RichApiMessage: + args=new OSF.DDA.RichApiMessageEventArgs(eventType, eventProperties); + break; case Microsoft.Office.WebExtension.EventType.DataNodeInserted: args=new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]), eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]); break; @@ -5597,10 +5841,28 @@ OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEve args=new OSF.DDA.DialogParentEventArgs(eventProperties); break; case Microsoft.Office.WebExtension.EventType.ItemChanged: - if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlookwebapp") { + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { args=new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties); target.initialize(args["initialData"]); - target.setCurrentItemNumber(args["itemNumber"].itemNumber); + if (OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]=="win32" || OSF._OfficeAppFactory.getHostInfo()["hostPlatform"]=="mac") { + target.setCurrentItemNumber(args["itemNumber"].itemNumber); + } + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.RecipientsChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { + args=new OSF.DDA.OlkRecipientsChangedEventArgs(eventProperties); + } + else { + throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); + } + break; + case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged: + if (OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook") { + args=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(eventProperties); } else { throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType, OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType, eventType)); @@ -5780,6 +6042,20 @@ OSF.DDA.AsyncMethodCalls.define({ "types": ["boolean"], "defaultValue": false } + }, + { + name: Microsoft.Office.WebExtension.Parameters.HideTitle, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels, + value: { + "types": ["boolean"], + "defaultValue": false + } } ], privateStateCallbacks: [], @@ -5817,13 +6093,13 @@ OSF.DDA.AsyncMethodCalls.define({ if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] <=0) { callArgs[Microsoft.Office.WebExtension.Parameters.Width]=1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Width]=99; } if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] <=0) { callArgs[Microsoft.Office.WebExtension.Parameters.Height]=1; } - if (callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { + if (!callArgs[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels] && callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100) { callArgs[Microsoft.Office.WebExtension.Parameters.Height]=99; } if (!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]) { @@ -6212,52 +6488,10 @@ OSF.DDA.SettingsManager={ DateJSONPrefix: "Date(", DataJSONSuffix: ")", serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection) { - var ret={}; - for (var key in settingsCollection) { - var value=settingsCollection[key]; - try { - if (JSON) { - value=JSON.stringify(value, function dateReplacer(k, v) { - return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix+this[k].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix : v; - }); - } - else { - value=Sys.Serialization.JavaScriptSerializer.serialize(value); - } - ret[key]=value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.serializeSettings(settingsCollection); }, deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings) { - var ret={}; - serializedSettings=serializedSettings || {}; - for (var key in serializedSettings) { - var value=serializedSettings[key]; - try { - if (JSON) { - value=JSON.parse(value, function dateReviver(k, v) { - var d; - if (typeof v==='string' && v && v.length > 6 && v.slice(0, 5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix) { - d=new Date(parseInt(v.slice(5, -1))); - if (d) { - return d; - } - } - return v; - }); - } - else { - value=Sys.Serialization.JavaScriptSerializer.deserialize(value, true); - } - ret[key]=value; - } - catch (ex) { - } - } - return ret; + return OSF.OUtil.deserializeSettings(serializedSettings); } }; OSF.DDA.Settings=function OSF_DDA_Settings(settings) { @@ -7125,7 +7359,53 @@ OSF.DDA.DocumentSelectionChangedEventArgs=function OSF_DDA_DocumentSelectionChan } }); }; +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectDeleted: "objectDeleted" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectSelectionChanged: "objectSelectionChanged" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ObjectDataChanged: "objectDataChanged" }); +OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { ContentControlAdded: "contentControlAdded" }); +OSF.DDA.ObjectEventArgs=function OSF_DDA_ObjectEventArgs(eventType, object) { + OSF.OUtil.defineEnumerableProperties(this, { + "type": { value: eventType }, + "object": { value: object } + }); +}; OSF.DDA.SafeArray.Delegate.ParameterMap.define({ type: OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent }); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectDeletedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidObjectDataChangedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.EventDispId.dispidContentControlAddedEvent, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: 0 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Id, value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData } + ] +}); OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { BindingSelectionChanged: "bindingSelectionChanged", BindingDataChanged: "bindingDataChanged" @@ -7400,7 +7680,10 @@ OSF.OUtil.augmentList(OSF.DDA.EventDescriptors, { OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType, { DataNodeDeleted: "nodeDeleted", DataNodeInserted: "nodeInserted", - DataNodeReplaced: "nodeReplaced" + DataNodeReplaced: "nodeReplaced", + NodeDeleted: "nodeDeleted", + NodeInserted: "nodeInserted", + NodeReplaced: "nodeReplaced" }); OSF.DDA.CustomXmlParts=function OSF_DDA_CustomXmlParts() { this._eventDispatches=[]; @@ -8288,11 +8571,94 @@ var OfficeExt; AppCommand.registerDdaFacade=registerDdaFacade; })(AppCommand=OfficeExt.AppCommand || (OfficeExt.AppCommand={})); })(OfficeExt || (OfficeExt={})); +OSF.DDA.AsyncMethodNames.addNames({ GetAccessTokenAsync: "getAccessTokenAsync" }); +OSF.DDA.Auth=function OSF_DDA_Auth() { +}; +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.GetAccessTokenAsync, + requiredArguments: [], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.ForceConsent, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, + value: { + "types": ["boolean"], + "defaultValue": false + } + }, + { + name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, + value: { + "types": ["string"], + "defaultValue": "" + } + } + ], + onSucceeded: function (dataDescriptor, caller, callArgs) { + var data=dataDescriptor[Microsoft.Office.WebExtension.Parameters.Data]; + return data; + } +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidGetAccessTokenMethod, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.ForceConsent, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.ForceAddAccount, value: 1 }, + { name: Microsoft.Office.WebExtension.Parameters.AuthChallenge, value: 2 } + ], + fromHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Data, value: OSF.DDA.SafeArray.Delegate.ParameterMap.self } + ] +}); +OSF.DDA.AsyncMethodNames.addNames({ + OpenBrowserWindow: "openBrowserWindow" +}); +OSF.DDA.OpenBrowser=function OSF_DDA_OpenBrowser() { +}; +OSF.DDA.AsyncMethodCalls.define({ + method: OSF.DDA.AsyncMethodNames.OpenBrowserWindow, + requiredArguments: [ + { + "name": Microsoft.Office.WebExtension.Parameters.Url, + "types": ["string"] + } + ], + supportedOptions: [ + { + name: Microsoft.Office.WebExtension.Parameters.Reserved, + value: { + "types": ["number"], + "defaultValue": 0 + } + } + ], + privateStateCallbacks: [] +}); +OSF.DDA.SafeArray.Delegate.ParameterMap.define({ + type: OSF.DDA.MethodDispId.dispidOpenBrowserWindow, + toHost: [ + { name: Microsoft.Office.WebExtension.Parameters.Reserved, value: 0 }, + { name: Microsoft.Office.WebExtension.Parameters.Url, value: 1 } + ] +}); OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize=function OSF_InitializationHelper$prepareRightAfterWebExtensionInitialize() { var appCommandHandler=OfficeExt.AppCommand.AppCommandManager.instance(); appCommandHandler.initializeAndChangeOnce(); }; OSF.DDA.WordDocument=function OSF_DDA_WordDocument(officeAppContext, settings) { + OSF.DDA.DispIdHost.addEventSupport(this, new OSF.EventDispatch([ + Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged, + Microsoft.Office.WebExtension.EventType.ObjectDeleted, + Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged, + Microsoft.Office.WebExtension.EventType.ObjectDataChanged, + Microsoft.Office.WebExtension.EventType.ContentControlAdded, + ])); OSF.DDA.WordDocument.uber.constructor.call(this, officeAppContext, new OSF.DDA.BindingFacade(this), settings); OSF.DDA.DispIdHost.addAsyncMethods(this, [ OSF.DDA.AsyncMethodNames.GoToByIdAsync, @@ -8320,9 +8686,10 @@ var __extends=(this && this.__extends) || function (d, b) { var OfficeExtension; (function (OfficeExtension) { var Action=(function () { - function Action(actionInfo, isWriteOperation) { + function Action(actionInfo, isWriteOperation, isRestrictedResourceAccess) { this.m_actionInfo=actionInfo; this.m_isWriteOperation=isWriteOperation; + this.m_isRestrictedResourceAccess=isRestrictedResourceAccess; } Object.defineProperty(Action.prototype, "actionInfo", { get: function () { @@ -8338,12 +8705,30 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(Action.prototype, "isRestrictedResourceAccess", { + get: function () { + return this.m_isRestrictedResourceAccess; + }, + enumerable: true, + configurable: true + }); return Action; }()); OfficeExtension.Action=Action; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + var TraceMarkerActionResultHandler=(function () { + function TraceMarkerActionResultHandler(callback) { + this.m_callback=callback; + } + TraceMarkerActionResultHandler.prototype._handleResult=function (value) { + if (this.m_callback) { + this.m_callback(); + } + }; + return TraceMarkerActionResultHandler; + }()); var ActionFactory=(function () { function ActionFactory() { } @@ -8359,13 +8744,17 @@ var OfficeExtension; var args=[value]; var referencedArgumentObjectPaths=OfficeExtension.Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); OfficeExtension.Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); - var ret=new OfficeExtension.Action(actionInfo, true); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + context._pendingRequest.ensureInstantiateObjectPaths(referencedArgumentObjectPaths); + var ret=new OfficeExtension.Action(actionInfo, true, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); context._pendingRequest.addReferencedObjectPaths(referencedArgumentObjectPaths); + ret.referencedObjectPath=parent._objectPath; + ret.referencedArgumentObjectPaths=referencedArgumentObjectPaths; return ret; }; - ActionFactory.createMethodAction=function (context, parent, methodName, operationType, args) { + ActionFactory.createMethodAction=function (context, parent, methodName, operationType, args, isRestrictedResourceAccess) { OfficeExtension.Utility.validateObjectPath(parent); var actionInfo={ Id: context._nextId(), @@ -8376,15 +8765,20 @@ var OfficeExtension; }; var referencedArgumentObjectPaths=OfficeExtension.Utility.setMethodArguments(context, actionInfo.ArgumentInfo, args); OfficeExtension.Utility.validateReferencedObjectPaths(referencedArgumentObjectPaths); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + context._pendingRequest.ensureInstantiateObjectPaths(referencedArgumentObjectPaths); var isWriteOperation=operationType !=1; - var ret=new OfficeExtension.Action(actionInfo, isWriteOperation); + var ret=new OfficeExtension.Action(actionInfo, isWriteOperation, isRestrictedResourceAccess); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); context._pendingRequest.addReferencedObjectPaths(referencedArgumentObjectPaths); + ret.referencedObjectPath=parent._objectPath; + ret.referencedArgumentObjectPaths=referencedArgumentObjectPaths; return ret; }; ActionFactory.createQueryAction=function (context, parent, queryOption) { OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); var actionInfo={ Id: context._nextId(), ActionType: 2, @@ -8392,13 +8786,15 @@ var OfficeExtension; ObjectPathId: parent._objectPath.objectPathInfo.Id, }; actionInfo.QueryInfo=queryOption; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; return ret; }; ActionFactory.createRecursiveQueryAction=function (context, parent, query) { OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); var actionInfo={ Id: context._nextId(), ActionType: 6, @@ -8406,23 +8802,59 @@ var OfficeExtension; ObjectPathId: parent._objectPath.objectPathInfo.Id, RecursiveQueryInfo: query }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; + return ret; + }; + ActionFactory.createQueryAsJsonAction=function (context, parent, queryOption) { + OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + var actionInfo={ + Id: context._nextId(), + ActionType: 7, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + }; + actionInfo.QueryInfo=queryOption; + var ret=new OfficeExtension.Action(actionInfo, false, false); + context._pendingRequest.addAction(ret); + context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; + return ret; + }; + ActionFactory.createEnsureUnchangedAction=function (context, parent, objectState) { + OfficeExtension.Utility.validateObjectPath(parent); + context._pendingRequest.ensureInstantiateObjectPath(parent._objectPath); + var actionInfo={ + Id: context._nextId(), + ActionType: 8, + Name: "", + ObjectPathId: parent._objectPath.objectPathInfo.Id, + ObjectState: objectState + }; + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(parent._objectPath); + ret.referencedObjectPath=parent._objectPath; return ret; }; ActionFactory.createInstantiateAction=function (context, obj) { OfficeExtension.Utility.validateObjectPath(obj); + context._pendingRequest.ensureInstantiateObjectPath(obj._objectPath.parentObjectPath); + context._pendingRequest.ensureInstantiateObjectPaths(obj._objectPath.argumentObjectPaths); var actionInfo={ Id: context._nextId(), ActionType: 1, Name: "", ObjectPathId: obj._objectPath.objectPathInfo.Id }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); context._pendingRequest.addReferencedObjectPath(obj._objectPath); context._pendingRequest.addActionResultHandler(ret, new OfficeExtension.InstantiateActionResultHandler(obj)); + ret.referencedObjectPath=obj._objectPath; return ret; }; ActionFactory.createTraceAction=function (context, message, addTraceMessage) { @@ -8432,13 +8864,17 @@ var OfficeExtension; Name: "Trace", ObjectPathId: 0 }; - var ret=new OfficeExtension.Action(actionInfo, false); + var ret=new OfficeExtension.Action(actionInfo, false, false); context._pendingRequest.addAction(ret); if (addTraceMessage) { context._pendingRequest.addTrace(actionInfo.Id, message); } return ret; }; + ActionFactory.createTraceMarkerForCallback=function (context, callback) { + var action=ActionFactory.createTraceAction(context, null, false); + context._pendingRequest.addActionResultHandler(action, new TraceMarkerActionResultHandler(callback)); + }; return ActionFactory; }()); OfficeExtension.ActionFactory=ActionFactory; @@ -8516,6 +8952,7 @@ var OfficeExtension; }; ClientObject.prototype._recursivelySet=function (input, options, scalarWriteablePropertyNames, objectPropertyNames, notAllowedToBeSetPropertyNames) { var isClientObject=(input instanceof ClientObject); + var originalInput=input; if (isClientObject) { if (Object.getPrototypeOf(this)===Object.getPrototypeOf(input)) { input=JSON.parse(JSON.stringify(input)); @@ -8532,31 +8969,38 @@ var OfficeExtension; for (var i=0; i < scalarWriteablePropertyNames.length; i++) { prop=scalarWriteablePropertyNames[i]; if (input.hasOwnProperty(prop)) { - this[prop]=input[prop]; + if (typeof input[prop] !=="undefined") { + this[prop]=input[prop]; + } } } for (var i=0; i < objectPropertyNames.length; i++) { prop=objectPropertyNames[i]; if (input.hasOwnProperty(prop)) { - this[prop].set(input[prop], options); + if (typeof input[prop] !=="undefined") { + var dataToPassToSet=isClientObject ? originalInput[prop] : input[prop]; + this[prop].set(dataToPassToSet, options); + } } } + var throwOnReadOnly=!isClientObject; + if (options && !OfficeExtension.Utility.isNullOrUndefined(throwOnReadOnly)) { + throwOnReadOnly=options.throwOnReadOnly; + } for (var i=0; i < notAllowedToBeSetPropertyNames.length; i++) { prop=notAllowedToBeSetPropertyNames[i]; if (input.hasOwnProperty(prop)) { - throw new OfficeExtension._Internal.RuntimeError({ - code: OfficeExtension.ErrorCodes.invalidArgument, - message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), - debugInfo: { - errorLocation: prop - } - }); + if (typeof input[prop] !=="undefined" && throwOnReadOnly) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.invalidArgument, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.cannotApplyPropertyThroughSetMethod, prop), + debugInfo: { + errorLocation: prop + } + }); + } } } - var throwOnReadOnly=!isClientObject; - if (options && !OfficeExtension.Utility.isNullOrUndefined(throwOnReadOnly)) { - throwOnReadOnly=options.throwOnReadOnly; - } for (prop in input) { if (scalarWriteablePropertyNames.indexOf(prop) < 0 && objectPropertyNames.indexOf(prop) < 0) { var propertyDescriptor=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this), prop); @@ -8604,12 +9048,14 @@ var OfficeExtension; this.m_actions=[]; this.m_actionResultHandler={}; this.m_referencedObjectPaths={}; + this.m_instantiatedObjectPaths={}; this.m_flags=0; this.m_traceInfos={}; this.m_pendingProcessEventHandlers=[]; this.m_pendingEventHandlerActions={}; this.m_responseTraceIds={}; this.m_responseTraceMessages=[]; + this.m_preSyncPromises=[]; } Object.defineProperty(ClientRequest.prototype, "flags", { get: function () { @@ -8655,7 +9101,13 @@ var OfficeExtension; if (action.isWriteOperation) { this.m_flags=this.m_flags | 1; } + if (action.isRestrictedResourceAccess) { + this.m_flags=this.m_flags | 2; + } this.m_actions.push(action); + if (action.actionInfo.ActionType==1) { + this.m_instantiatedObjectPaths[action.actionInfo.ObjectPathId]=action; + } }; Object.defineProperty(ClientRequest.prototype, "hasActions", { get: function () { @@ -8664,9 +9116,39 @@ var OfficeExtension; enumerable: true, configurable: true }); + ClientRequest.prototype._getLastAction=function () { + return this.m_actions[this.m_actions.length - 1]; + }; ClientRequest.prototype.addTrace=function (actionId, message) { this.m_traceInfos[actionId]=message; }; + ClientRequest.prototype.ensureInstantiateObjectPath=function (objectPath) { + if (objectPath) { + if (this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + return; + } + this.ensureInstantiateObjectPath(objectPath.parentObjectPath); + this.ensureInstantiateObjectPaths(objectPath.argumentObjectPaths); + if (!this.m_instantiatedObjectPaths[objectPath.objectPathInfo.Id]) { + var actionInfo={ + Id: this.m_context._nextId(), + ActionType: 1, + Name: "", + ObjectPathId: objectPath.objectPathInfo.Id + }; + var instantiateAction=new OfficeExtension.Action(actionInfo, false, false); + instantiateAction.referencedObjectPath=objectPath; + this.addAction(instantiateAction); + } + } + }; + ClientRequest.prototype.ensureInstantiateObjectPaths=function (objectPaths) { + if (objectPaths) { + for (var i=0; i < objectPaths.length; i++) { + this.ensureInstantiateObjectPath(objectPaths[i]); + } + } + }; ClientRequest.prototype.addReferencedObjectPath=function (objectPath) { if (this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]) { return; @@ -8684,6 +9166,9 @@ var OfficeExtension; if (objectPath.isWriteOperation) { this.m_flags=this.m_flags | 1; } + if (objectPath.isRestrictedResourceAccess) { + this.m_flags=this.m_flags | 2; + } this.m_referencedObjectPaths[objectPath.objectPathInfo.Id]=objectPath; if (objectPath.objectPathInfo.ObjectPathType==3) { this.addReferencedObjectPaths(objectPath.argumentObjectPaths); @@ -8702,6 +9187,9 @@ var OfficeExtension; this.m_actionResultHandler[action.actionInfo.Id]=resultHandler; }; ClientRequest.prototype.buildRequestMessageBody=function () { + if (OfficeExtension._internalConfig.enableEarlyDispose) { + ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } var objectPaths={}; for (var i in this.m_referencedObjectPaths) { objectPaths[i]=this.m_referencedObjectPaths[i].objectPathInfo; @@ -8752,12 +9240,95 @@ var OfficeExtension; ClientRequest.prototype._getPendingEventHandlerActions=function (eventHandlers) { return this.m_pendingEventHandlerActions[eventHandlers._id]; }; + ClientRequest.prototype._addPreSyncPromise=function (value) { + this.m_preSyncPromises.push(value); + }; + Object.defineProperty(ClientRequest.prototype, "_preSyncPromises", { + get: function () { + return this.m_preSyncPromises; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_actions", { + get: function () { + return this.m_actions; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ClientRequest.prototype, "_objectPaths", { + get: function () { + return this.m_referencedObjectPaths; + }, + enumerable: true, + configurable: true + }); + ClientRequest._updateLastUsedActionIdOfObjectPathId=function (lastUsedActionIdOfObjectPathId, objectPath, actionId) { + while (objectPath) { + if (lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]) { + return; + } + lastUsedActionIdOfObjectPathId[objectPath.objectPathInfo.Id]=actionId; + var argumentObjectPaths=objectPath.argumentObjectPaths; + if (argumentObjectPaths) { + var argumentObjectPathsLength=argumentObjectPaths.length; + for (var i=0; i < argumentObjectPathsLength; i++) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, argumentObjectPaths[i], actionId); + } + } + objectPath=objectPath.parentObjectPath; + } + }; + ClientRequest._calculateLastUsedObjectPathIds=function (actions) { + var lastUsedActionIdOfObjectPathId={}; + var actionsLength=actions.length; + for (var index=actionsLength - 1; index >=0; --index) { + var action=actions[index]; + var actionId=action.actionInfo.Id; + if (action.referencedObjectPath) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, action.referencedObjectPath, actionId); + } + var referencedObjectPaths=action.referencedArgumentObjectPaths; + if (referencedObjectPaths) { + var referencedObjectPathsLength=referencedObjectPaths.length; + for (var refIndex=0; refIndex < referencedObjectPathsLength; refIndex++) { + ClientRequest._updateLastUsedActionIdOfObjectPathId(lastUsedActionIdOfObjectPathId, referencedObjectPaths[refIndex], actionId); + } + } + } + var lastUsedObjectPathIdsOfAction={}; + for (var key in lastUsedActionIdOfObjectPathId) { + var actionId=lastUsedActionIdOfObjectPathId[key]; + var objectPathIds=lastUsedObjectPathIdsOfAction[actionId]; + if (!objectPathIds) { + objectPathIds=[]; + lastUsedObjectPathIdsOfAction[actionId]=objectPathIds; + } + objectPathIds.push(parseInt(key)); + } + for (var index=0; index < actionsLength; index++) { + var action=actions[index]; + var lastUsedObjectPathIds=lastUsedObjectPathIdsOfAction[action.actionInfo.Id]; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + action.actionInfo.L=lastUsedObjectPathIds; + } + else if (action.actionInfo.L) { + delete action.actionInfo.L; + } + } + }; return ClientRequest; }()); OfficeExtension.ClientRequest=ClientRequest; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + OfficeExtension._internalConfig={ + showDisposeInfoInDebugInfo: false, + enableEarlyDispose: true, + alwaysPolyfillClientObjectRetrieveMethod: false + }; var SessionBase=(function () { function SessionBase() { } @@ -8851,6 +9422,15 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(ClientRequestContext.prototype, "debugInfo", { + get: function () { + var prettyPrinter=new OfficeExtension.RequestPrettyPrinter(this._rootObjectPropertyName, this._pendingRequest._objectPaths, this._pendingRequest._actions, OfficeExtension._internalConfig.showDisposeInfoInDebugInfo); + var statements=prettyPrinter.process(); + return { pendingStatements: statements }; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ClientRequestContext.prototype, "trackedObjects", { get: function () { if (!this.m_trackedObjects) { @@ -8870,11 +9450,76 @@ var OfficeExtension; }); ClientRequestContext.prototype.load=function (clientObj, option) { OfficeExtension.Utility.validateContext(this, clientObj); - var queryOption=ClientRequestContext.parseQueryOption(option); + var queryOption=ClientRequestContext._parseQueryOption(option); var action=OfficeExtension.ActionFactory.createQueryAction(this, clientObj, queryOption); this._pendingRequest.addActionResultHandler(action, clientObj); }; - ClientRequestContext.parseQueryOption=function (option) { + ClientRequestContext.isLoadOption=function (loadOption) { + if (!OfficeExtension.Utility.isUndefined(loadOption.select) && (typeof (loadOption.select)==="string" || Array.isArray(loadOption.select))) + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.expand) && (typeof (loadOption.expand)==="string" || Array.isArray(loadOption.expand))) + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.top) && typeof (loadOption.top)==="number") + return true; + if (!OfficeExtension.Utility.isUndefined(loadOption.skip) && typeof (loadOption.skip)==="number") + return true; + for (var i in loadOption) { + return false; + } + return true; + }; + ClientRequestContext.parseStrictLoadOption=function (option) { + var ret={ Select: [] }; + ClientRequestContext.parseStrictLoadOptionHelper(ret, "", "option", option); + return ret; + }; + ClientRequestContext.combineQueryPath=function (pathPrefix, key, separator) { + if (pathPrefix.length===0) { + return key; + } + else { + return pathPrefix+separator+key; + } + }; + ClientRequestContext.parseStrictLoadOptionHelper=function (queryInfo, pathPrefix, argPrefix, option) { + for (var key in option) { + var value=option[key]; + if (key==="$all") { + if (typeof (value) !=="boolean") { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + if (value) { + queryInfo.Select.push(ClientRequestContext.combineQueryPath(pathPrefix, "*", "/")); + } + } + else if (key==="$top") { + if (typeof (value) !=="number" || pathPrefix.length > 0) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + queryInfo.Top=value; + } + else if (key==="$skip") { + if (typeof (value) !=="number" || pathPrefix.length > 0) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + queryInfo.Skip=value; + } + else { + if (typeof (value)==="boolean") { + if (value) { + queryInfo.Select.push(ClientRequestContext.combineQueryPath(pathPrefix, key, "/")); + } + } + else if (typeof (value)==="object") { + ClientRequestContext.parseStrictLoadOptionHelper(queryInfo, ClientRequestContext.combineQueryPath(pathPrefix, key, "/"), ClientRequestContext.combineQueryPath(argPrefix, key, "."), value); + } + else { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError(ClientRequestContext.combineQueryPath(argPrefix, key, ".")); + } + } + } + }; + ClientRequestContext._parseQueryOption=function (option) { var queryOption={}; if (typeof (option)=="string") { var select=option; @@ -8883,41 +9528,46 @@ var OfficeExtension; else if (Array.isArray(option)) { queryOption.Select=option; } - else if (typeof (option)=="object") { + else if (typeof (option)==="object") { var loadOption=option; - if (typeof (loadOption.select)=="string") { - queryOption.Select=OfficeExtension.Utility._parseSelectExpand(loadOption.select); - } - else if (Array.isArray(loadOption.select)) { - queryOption.Select=loadOption.select; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.select)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.select"); - } - if (typeof (loadOption.expand)=="string") { - queryOption.Expand=OfficeExtension.Utility._parseSelectExpand(loadOption.expand); - } - else if (Array.isArray(loadOption.expand)) { - queryOption.Expand=loadOption.expand; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.expand)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.expand"); - } - if (typeof (loadOption.top)=="number") { - queryOption.Top=loadOption.top; - } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.top)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.top"); - } - if (typeof (loadOption.skip)=="number") { - queryOption.Skip=loadOption.skip; + if (ClientRequestContext.isLoadOption(loadOption)) { + if (typeof (loadOption.select)=="string") { + queryOption.Select=OfficeExtension.Utility._parseSelectExpand(loadOption.select); + } + else if (Array.isArray(loadOption.select)) { + queryOption.Select=loadOption.select; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.select)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.select"); + } + if (typeof (loadOption.expand)=="string") { + queryOption.Expand=OfficeExtension.Utility._parseSelectExpand(loadOption.expand); + } + else if (Array.isArray(loadOption.expand)) { + queryOption.Expand=loadOption.expand; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.expand)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.expand"); + } + if (typeof (loadOption.top)==="number") { + queryOption.Top=loadOption.top; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.top)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.top"); + } + if (typeof (loadOption.skip)==="number") { + queryOption.Skip=loadOption.skip; + } + else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.skip)) { + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option.skip"); + } } - else if (!OfficeExtension.Utility.isNullOrUndefined(loadOption.skip)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option.skip"); + else { + queryOption=ClientRequestContext.parseStrictLoadOption(option); } } else if (!OfficeExtension.Utility.isNullOrUndefined(option)) { - OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument, "option"); + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError("option"); } return queryOption; }; @@ -8927,7 +9577,7 @@ var OfficeExtension; } var quries={}; for (var key in options) { - quries[key]=ClientRequestContext.parseQueryOption(options[key]); + quries[key]=ClientRequestContext._parseQueryOption(options[key]); } var action=OfficeExtension.ActionFactory.createRecursiveQueryAction(this, clientObj, { Queries: quries, MaxDepth: maxDepth }); this._pendingRequest.addActionResultHandler(action, clientObj); @@ -8935,6 +9585,8 @@ var OfficeExtension; ClientRequestContext.prototype.trace=function (message) { OfficeExtension.ActionFactory.createTraceAction(this, message, true); }; + ClientRequestContext.prototype._processOfficeJsErrorResponse=function (officeJsErrorCode, response) { + }; ClientRequestContext.prototype.syncPrivateMain=function () { var _this=this; return OfficeExtension.Utility._createPromiseFromResult(null) @@ -8962,13 +9614,14 @@ var OfficeExtension; } }) .then(function () { - return _this.syncPrivate(); + var req=_this._pendingRequest; + _this.m_pendingRequest=null; + return _this.processPreSyncPromises(req) + .then(function () { return _this.syncPrivate(req); }); }); }; - ClientRequestContext.prototype.syncPrivate=function () { + ClientRequestContext.prototype.syncPrivate=function (req) { var _this=this; - var req=this._pendingRequest; - this.m_pendingRequest=null; if (!req.hasActions) { return this.processPendingEventHandlers(req); } @@ -8976,7 +9629,7 @@ var OfficeExtension; var requestFlags=req.flags; if (!this._requestExecutor) { if (OfficeExtension.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)) { - this._requestExecutor=new OfficeExtension.OfficeJsRequestExecutor(); + this._requestExecutor=new OfficeExtension.OfficeJsRequestExecutor(this); } else { this._requestExecutor=new OfficeExtension.HttpRequestExecutor(); @@ -8994,8 +9647,10 @@ var OfficeExtension; req.invalidatePendingInvalidObjectPaths(); var errorFromResponse=null; var errorFromProcessEventHandlers=null; + this._lastSyncStart=performance.now(); return requestExecutor.executeAsync(this._customData, requestFlags, requestExecutorRequestMessage) .then(function (response) { + _this._lastSyncEnd=performance.now(); errorFromResponse=_this.processRequestExecutorResponseMessage(req, response); return _this.processPendingEventHandlers(req) .catch(function (ex) { @@ -9042,7 +9697,13 @@ var OfficeExtension; req._setResponseTraceIds(response.Body.TraceIds); } var traceMessages=req._responseTraceMessages; + var errorStatementInfo=null; if (response.Body) { + if (response.Body.Error && + response.Body.Error.ActionIndex >=0) { + var prettyPrinter=new OfficeExtension.RequestPrettyPrinter(this._rootObjectPropertyName, req._objectPaths, req._actions); + errorStatementInfo=prettyPrinter.processForDebugStatementInfo(response.Body.Error.ActionIndex); + } var actionResults=null; if (response.Body.Results) { actionResults=response.Body.Results; @@ -9068,13 +9729,18 @@ var OfficeExtension; }); } else if (response.Body && response.Body.Error) { + var debugInfo={ + errorLocation: response.Body.Error.Location + }; + if (errorStatementInfo) { + debugInfo.statement=errorStatementInfo.statement; + debugInfo.surroundingStatements=errorStatementInfo.surroundingStatements; + } return new OfficeExtension._Internal.RuntimeError({ code: response.Body.Error.Code, message: response.Body.Error.Message, traceMessages: traceMessages, - debugInfo: { - errorLocation: response.Body.Error.Location - } + debugInfo: debugInfo }); } return null; @@ -9090,6 +9756,17 @@ var OfficeExtension; ClientRequestContext.prototype.createProcessOneEventHandlersFunc=function (eventHandlers, req) { return function () { return eventHandlers._processRegistration(req); }; }; + ClientRequestContext.prototype.processPreSyncPromises=function (req) { + var ret=OfficeExtension.Utility._createPromiseFromResult(null); + for (var i=0; i < req._preSyncPromises.length; i++) { + var p=req._preSyncPromises[i]; + ret=ret.then(this.createProcessOneProSyncFunc(p)); + } + return ret; + }; + ClientRequestContext.prototype.createProcessOneProSyncFunc=function (p) { + return function () { return p; }; + }; ClientRequestContext.prototype.sync=function (passThroughValue) { return this.syncPrivateMain().then(function () { return passThroughValue; }); }; @@ -9128,9 +9805,15 @@ var OfficeExtension; batch=receivedRunArgs[argOffset+0]; } else if (receivedRunArgs.length==argOffset+2) { - if (receivedRunArgs[argOffset+0] instanceof OfficeExtension.ClientObject) { + if (OfficeExtension.Utility.isNullOrUndefined(receivedRunArgs[argOffset+0])) { + ctxRetriever=ctxInitializer; + } + else if (receivedRunArgs[argOffset+0] instanceof OfficeExtension.ClientObject) { ctxRetriever=function () { return receivedRunArgs[argOffset+0].context; }; } + else if (receivedRunArgs[argOffset+0] instanceof ClientRequestContext) { + ctxRetriever=function () { return receivedRunArgs[argOffset+0]; }; + } else if (Array.isArray(receivedRunArgs[argOffset+0])) { var array=receivedRunArgs[argOffset+0]; if (array.length==0) { @@ -9296,6 +9979,79 @@ var OfficeExtension; return ClientResult; }()); OfficeExtension.ClientResult=ClientResult; + var RetrieveResult=(function () { + function RetrieveResult(m_proxy, m_shouldPolyfill) { + this.m_proxy=m_proxy; + this.m_shouldPolyfill=m_shouldPolyfill; + } + Object.defineProperty(RetrieveResult.prototype, "proxy", { + get: function () { + return this.m_proxy; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RetrieveResult.prototype, "data", { + get: function () { + if (!this.m_isLoaded) { + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.valueNotLoaded, + message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.valueNotLoaded), + debugInfo: { + errorLocation: "retrieveResult.data" + } + }); + } + return this.m_data; + }, + enumerable: true, + configurable: true + }); + RetrieveResult.prototype._handleResult=function (value) { + this.m_isLoaded=true; + if (typeof (value)==="object" && value && value._IsNull) { + this.m_data=null; + return; + } + if (this.m_shouldPolyfill) { + this.m_data=this.changePropertyNameToCamelLowerCase(value); + } + else { + this.m_data=value; + } + }; + RetrieveResult.prototype.changePropertyNameToCamelLowerCase=function (value) { + var charCodeUnderscore=95; + if (Array.isArray(value)) { + var ret=[]; + for (var i=0; i < value.length; i++) { + ret.push(this.changePropertyNameToCamelLowerCase(value[i])); + } + return ret; + } + else if (typeof (value)==="object" && value !==null) { + var ret={}; + for (var key in value) { + var propValue=value[key]; + if (key==="_Items") { + ret={}; + ret["items"]=this.changePropertyNameToCamelLowerCase(propValue); + break; + } + else if (key.charCodeAt(0) !==charCodeUnderscore) { + var propName=OfficeExtension.Utility._toCamelLowerCase(key); + ret[propName]=this.changePropertyNameToCamelLowerCase(propValue); + } + } + return ret; + } + else { + return value; + } + }; + return RetrieveResult; + }()); + OfficeExtension.RetrieveResult=RetrieveResult; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { @@ -9317,6 +10073,9 @@ var OfficeExtension; Constants.sourceLibHeader="SdkVersion"; Constants.embeddingPageOrigin="EmbeddingPageOrigin"; Constants.embeddingPageSessionInfo="EmbeddingPageSessionInfo"; + Constants.eventMessageCategory=65536; + Constants.eventWorkbookId="Workbook"; + Constants.eventSourceRemote="Remote"; return Constants; }()); OfficeExtension.Constants=Constants; @@ -9647,7 +10406,7 @@ var OfficeExtension; debugInfo[key]=partialDebugInfo[key]; } if (this.innerError) { - if (this.innerError instanceof OfficeExtension.Error) { + if (this.innerError instanceof OfficeExtension._Internal.RuntimeError) { debugInfo.innerError=this.innerError.debugInfo; } else { @@ -9690,6 +10449,7 @@ var OfficeExtension; ErrorCodes.apiNotFound="ApiNotFound"; ErrorCodes.connectionFailure="ConnectionFailure"; ErrorCodes.timeout="Timeout"; + ErrorCodes.invalidOrTimedOutSession="InvalidOrTimedOutSession"; return ErrorCodes; }()); OfficeExtension.ErrorCodes=ErrorCodes; @@ -9731,6 +10491,20 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(EventHandlers.prototype, "_context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(EventHandlers.prototype, "_callback", { + get: function () { + return this.m_callback; + }, + enumerable: true, + configurable: true + }); EventHandlers.prototype.add=function (handler) { var action=OfficeExtension.ActionFactory.createTraceAction(this.m_context, null, false); this.m_context._pendingRequest._addPendingEventHandlerAction(this, { id: action.actionInfo.Id, handler: handler, operation: 0 }); @@ -9824,6 +10598,13 @@ var OfficeExtension; this.m_allHandlers=handlers; this.m_handler=handler; } + Object.defineProperty(EventHandlerResult.prototype, "context", { + get: function () { + return this.m_context; + }, + enumerable: true, + configurable: true + }); EventHandlerResult.prototype.remove=function () { if (this.m_allHandlers && this.m_handler) { this.m_allHandlers.remove(this.m_handler); @@ -9858,6 +10639,16 @@ var OfficeExtension; return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.DocumentSelectionChanged, handler, callback); }); case 1: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.settings.addHandlerAsync(Office.EventType.SettingsChanged, handler, callback); }); + case 5: + return OfficeExtension.Utility.promisify(function (callback) { return OSF.DDA.RichApi.richApiMessageManager.addHandlerAsync("richApiMessage", handler, callback); }); + case 13: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.ObjectDeleted, handler, { id: targetId }, callback); }); + case 14: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.ObjectSelectionChanged, handler, { id: targetId }, callback); }); + case 15: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.ObjectDataChanged, handler, { id: targetId }, callback); }); + case 16: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.addHandlerAsync(Office.EventType.ContentControlAdded, handler, { id: targetId }, callback); }); default: throw _Internal.RuntimeError._createInvalidArgError("eventId"); } @@ -9878,6 +10669,16 @@ var OfficeExtension; return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.DocumentSelectionChanged, { handler: handler }, callback); }); case 1: return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.settings.removeHandlerAsync(Office.EventType.SettingsChanged, { handler: handler }, callback); }); + case 5: + return OfficeExtension.Utility.promisify(function (callback) { return OSF.DDA.RichApi.richApiMessageManager.removeHandlerAsync("richApiMessage", { handler: handler }, callback); }); + case 13: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDeleted, { id: targetId, handler: handler }, callback); }); + case 14: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.ObjectSelectionChanged, { id: targetId, handler: handler }, callback); }); + case 15: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.ObjectDataChanged, { id: targetId, handler: handler }, callback); }); + case 16: + return OfficeExtension.Utility.promisify(function (callback) { return Office.context.document.removeHandlerAsync(Office.EventType.ContentControlAdded, { id: targetId, handler: handler }, callback); }); default: throw _Internal.RuntimeError._createInvalidArgError("eventId"); } @@ -9940,6 +10741,139 @@ var OfficeExtension; OfficeExtension.EventRegistration=EventRegistration; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var GenericEventRegistration=(function () { + function GenericEventRegistration() { + this.m_eventRegistration=new OfficeExtension.EventRegistration(this._registerEventImpl.bind(this), this._unregisterEventImpl.bind(this)); + this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this); + } + GenericEventRegistration.prototype.ready=function () { + var _this=this; + if (!this.m_ready) { + if (GenericEventRegistration._testReadyImpl) { + this.m_ready=GenericEventRegistration._testReadyImpl() + .then(function () { + _this.m_isReady=true; + }); + } + else { + this.m_ready=OfficeExtension._Internal.officeJsEventRegistration.register(5, "", this.m_richApiMessageHandler) + .then(function () { + _this.m_isReady=true; + }); + } + } + return this.m_ready; + }; + Object.defineProperty(GenericEventRegistration.prototype, "isReady", { + get: function () { + return this.m_isReady; + }, + enumerable: true, + configurable: true + }); + GenericEventRegistration.prototype.register=function (eventId, targetId, handler) { + var _this=this; + return this.ready() + .then(function () { return _this.m_eventRegistration.register(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype.unregister=function (eventId, targetId, handler) { + var _this=this; + return this.ready() + .then(function () { return _this.m_eventRegistration.unregister(eventId, targetId, handler); }); + }; + GenericEventRegistration.prototype._registerEventImpl=function (eventId, targetId) { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._unregisterEventImpl=function (eventId, targetId) { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + GenericEventRegistration.prototype._handleRichApiMessage=function (msg) { + if (msg && msg.entries) { + for (var entryIndex=0; entryIndex < msg.entries.length; entryIndex++) { + var entry=msg.entries[entryIndex]; + if (entry.messageCategory==OfficeExtension.Constants.eventMessageCategory) { + if (OfficeExtension.Utility._logEnabled) { + OfficeExtension.Utility.log(JSON.stringify(entry)); + } + var funcs=this.m_eventRegistration.getHandlers(entry.messageType, entry.targetId); + if (funcs.length > 0) { + var arg=JSON.parse(entry.message); + if (entry.isRemoteOverride) { + arg.source=OfficeExtension.Constants.eventSourceRemote; + } + for (var i=0; i < funcs.length; i++) { + funcs[i](arg); + } + } + } + } + } + }; + GenericEventRegistration.getGenericEventRegistration=function () { + if (!GenericEventRegistration.s_genericEventRegistration) { + GenericEventRegistration.s_genericEventRegistration=new GenericEventRegistration(); + } + return GenericEventRegistration.s_genericEventRegistration; + }; + GenericEventRegistration.richApiMessageEventCategory=65536; + return GenericEventRegistration; + }()); + function _testSetRichApiMessageReadyImpl(impl) { + GenericEventRegistration._testReadyImpl=impl; + } + OfficeExtension._testSetRichApiMessageReadyImpl=_testSetRichApiMessageReadyImpl; + function _testTriggerRichApiMessageEvent(msg) { + GenericEventRegistration.getGenericEventRegistration()._handleRichApiMessage(msg); + } + OfficeExtension._testTriggerRichApiMessageEvent=_testTriggerRichApiMessageEvent; + var GenericEventHandlers=(function (_super) { + __extends(GenericEventHandlers, _super); + function GenericEventHandlers(context, parentObject, name, eventInfo) { + _super.call(this, context, parentObject, name, eventInfo); + this.m_genericEventInfo=eventInfo; + } + GenericEventHandlers.prototype.add=function (handler) { + var _this=this; + if ((this._handlers.length==0) && this.m_genericEventInfo.registerFunc) { + this.m_genericEventInfo.registerFunc(); + } + if (!GenericEventRegistration.getGenericEventRegistration().isReady) { + this._context._pendingRequest._addPreSyncPromise(GenericEventRegistration.getGenericEventRegistration().ready()); + } + OfficeExtension.ActionFactory.createTraceMarkerForCallback(this._context, function () { + _this._handlers.push(handler); + if (_this._handlers.length==1) { + GenericEventRegistration.getGenericEventRegistration().register(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + return new OfficeExtension.EventHandlerResult(this._context, this, handler); + }; + GenericEventHandlers.prototype.remove=function (handler) { + var _this=this; + if ((this._handlers.length==1) && this.m_genericEventInfo.unregisterFunc) { + this.m_genericEventInfo.unregisterFunc(); + } + OfficeExtension.ActionFactory.createTraceMarkerForCallback(this._context, function () { + var handlers=_this._handlers; + for (var index=handlers.length - 1; index >=0; index--) { + if (handlers[index]===handler) { + handlers.splice(index, 1); + break; + } + } + if (handlers.length==0) { + GenericEventRegistration.getGenericEventRegistration().unregister(_this.m_genericEventInfo.eventType, _this.m_genericEventInfo.getTargetIdFunc(), _this._callback); + } + }); + }; + GenericEventHandlers.prototype.removeAll=function () { + }; + return GenericEventHandlers; + }(OfficeExtension.EventHandlers)); + OfficeExtension.GenericEventHandlers=GenericEventHandlers; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var HttpRequestExecutor=(function () { function HttpRequestExecutor() { @@ -9991,15 +10925,6 @@ var OfficeExtension; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { - var _Internal; - (function (_Internal) { - _Internal.OfficeRequire=function () { - if (typeof (require) !=="undefined") { - return require; - } - return null; - }(); - })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); var HttpUtility=(function () { function HttpUtility() { } @@ -10007,7 +10932,7 @@ var OfficeExtension; HttpUtility.s_customSendRequestFunc=func; }; HttpUtility.xhrSendRequestFunc=function (request) { - return new _Internal.OfficePromise(function (resolve, reject) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { var xhr=new XMLHttpRequest(); xhr.open(request.method, request.url); xhr.onload=function () { @@ -10019,7 +10944,7 @@ var OfficeExtension; resolve(resp); }; xhr.onerror=function () { - reject(new _Internal.RuntimeError({ + reject(new OfficeExtension._Internal.RuntimeError({ code: OfficeExtension.ErrorCodes.connectionFailure, message: OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.connectionFailureWithStatus, xhr.statusText) })); @@ -10032,34 +10957,11 @@ var OfficeExtension; xhr.send(request.body); }); }; - HttpUtility.nodejsRequestModuleSendRequestFunc=function (requestInfo) { - HttpUtility.logRequest(requestInfo); - var fetch=_Internal.OfficeRequire(HttpUtility.NodeJsRequestModuleName); - return fetch(requestInfo.url, { method: requestInfo.method, headers: requestInfo.headers, body: requestInfo.body }) - .then(function (resp) { - return resp.text() - .then(function (body) { - var statusCode=resp.status; - var headers={}; - resp.headers.forEach(function (value, name) { - headers[name]=value; - }); - var ret={ statusCode: statusCode, headers: headers, body: body }; - HttpUtility.logResponse(ret); - return ret; - }); - }); - }; HttpUtility.sendRequest=function (request) { HttpUtility.validateAndNormalizeRequest(request); var func=HttpUtility.s_customSendRequestFunc; if (!func) { - if (typeof (window)==="undefined" || typeof (XMLHttpRequest)==="undefined") { - func=HttpUtility.nodejsRequestModuleSendRequestFunc; - } - else { - func=HttpUtility.xhrSendRequestFunc; - } + func=HttpUtility.xhrSendRequestFunc; } return func(request); }; @@ -10075,7 +10977,7 @@ var OfficeExtension; HttpUtility.officeJsSendLocalDocumentRequestFunc=function (request) { request=OfficeExtension.Utility._validateLocalDocumentRequest(request); var requestSafeArray=OfficeExtension.Utility._buildRequestMessageSafeArray(request); - return new _Internal.OfficePromise(function (resolve, reject) { + return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { OSF.DDA.RichApi.executeRichApiRequestAsync(requestSafeArray, function (asyncResult) { var response; if (asyncResult.status=="succeeded") { @@ -10095,7 +10997,7 @@ var OfficeExtension; }; HttpUtility.validateAndNormalizeRequest=function (request) { if (OfficeExtension.Utility.isNullOrUndefined(request)) { - throw _Internal.RuntimeError._createInvalidArgError({ + throw OfficeExtension._Internal.RuntimeError._createInvalidArgError({ argumentName: "request" }); } @@ -10132,7 +11034,6 @@ var OfficeExtension; } } }; - HttpUtility.NodeJsRequestModuleName="node-fetch"; HttpUtility._logBody=false; return HttpUtility; }()); @@ -10156,6 +11057,146 @@ var OfficeExtension; ; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var HostBridgeRequestExecutor=(function () { + function HostBridgeRequestExecutor(session) { + this.m_session=session; + } + HostBridgeRequestExecutor.prototype.executeAsync=function (customData, requestFlags, requestMessage) { + var httpRequestInfo={ + url: OfficeExtension.Constants.processQuery, + method: "POST", + headers: requestMessage.Headers, + body: requestMessage.Body + }; + var message={ + id: HostBridgeSession.nextId(), + type: 1, + flags: requestFlags, + message: httpRequestInfo + }; + OfficeExtension.Utility.log(JSON.stringify(message)); + return this.m_session.sendMessageToHost(message) + .then(function (nativeBridgeResponse) { + OfficeExtension.Utility.log("Received response: "+JSON.stringify(nativeBridgeResponse)); + var responseInfo=nativeBridgeResponse.message; + var response; + if (responseInfo.statusCode===200) { + response={ ErrorCode: null, ErrorMessage: null, Headers: responseInfo.headers, Body: responseInfo.body }; + } + else { + OfficeExtension.Utility.log("Error Response:"+responseInfo.body); + var error=OfficeExtension.Utility._parseErrorResponse(responseInfo); + response={ + ErrorCode: error.errorCode, + ErrorMessage: error.errorMessage, + Headers: responseInfo.headers, + Body: null + }; + } + return response; + }); + }; + return HostBridgeRequestExecutor; + }()); + var HostBridgeSession=(function (_super) { + __extends(HostBridgeSession, _super); + function HostBridgeSession(bridge) { + var _this=this; + _super.call(this); + this.m_promiseResolver={}; + this.m_bridge=bridge; + this.m_bridge.onMessageFromHost=function (msg) { + _this.onMessageFromHost(msg); + }; + } + HostBridgeSession.prototype._resolveRequestUrlAndHeaderInfo=function () { + return OfficeExtension.Utility._createPromiseFromResult(null); + }; + HostBridgeSession.prototype._createRequestExecutorOrNull=function () { + OfficeExtension.Utility.log("NativeBridgeSession::CreateRequestExecutor"); + return new HostBridgeRequestExecutor(this); + }; + Object.defineProperty(HostBridgeSession.prototype, "eventRegistration", { + get: function () { + return OfficeExtension._Internal.officeJsEventRegistration; + }, + enumerable: true, + configurable: true + }); + HostBridgeSession.init=function (bridge) { + if (bridge && typeof (bridge)==="object") { + var session=new HostBridgeSession(bridge); + OfficeExtension.ClientRequestContext._overrideSession=session; + OfficeExtension.HttpUtility.setCustomSendLocalDocumentRequestFunc(function (request) { + var bridgeMessage={ + id: HostBridgeSession.nextId(), + type: 1, + flags: 0, + message: request + }; + return session.sendMessageToHost(bridgeMessage) + .then(function (bridgeResponse) { + var responseInfo=bridgeResponse.message; + return responseInfo; + }); + }); + } + }; + HostBridgeSession.prototype.sendMessageToHost=function (message) { + var _this=this; + this.m_bridge.sendMessageToHost(JSON.stringify(message)); + var ret=new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { + _this.m_promiseResolver[message.id]=resolve; + }); + return ret; + }; + HostBridgeSession.prototype.onMessageFromHost=function (messageText) { + if (messageText==="test") { + if (HostBridgeTest._testFunc) { + HostBridgeTest._testFunc(); + } + } + else { + var message=JSON.parse(messageText); + if (typeof (message.id)==="number") { + var resolve=this.m_promiseResolver[message.id]; + if (resolve) { + resolve(message); + } + delete this.m_promiseResolver[message.id]; + } + } + }; + HostBridgeSession.nextId=function () { + return HostBridgeSession.s_nextId++; + }; + HostBridgeSession.s_nextId=1; + return HostBridgeSession; + }(OfficeExtension.SessionBase)); + var HostBridge=(function () { + function HostBridge() { + } + HostBridge.init=function (bridge) { + HostBridgeSession.init(bridge); + }; + return HostBridge; + }()); + OfficeExtension.HostBridge=HostBridge; + if (typeof (_richApiNativeBridge)==="object" && _richApiNativeBridge) { + HostBridge.init(_richApiNativeBridge); + } + var HostBridgeTest=(function () { + function HostBridgeTest() { + } + HostBridgeTest.setTestFunc=function (func) { + HostBridgeTest._testFunc=func; + }; + return HostBridgeTest; + }()); + OfficeExtension.HostBridgeTest=HostBridgeTest; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var ObjectPath=(function () { function ObjectPath(objectPathInfo, parentObjectPath, isCollection, isInvalidAfterRequest) { @@ -10183,6 +11224,16 @@ var OfficeExtension; enumerable: true, configurable: true }); + Object.defineProperty(ObjectPath.prototype, "isRestrictedResourceAccess", { + get: function () { + return this.m_isRestrictedResourceAccess; + }, + set: function (value) { + this.m_isRestrictedResourceAccess=value; + }, + enumerable: true, + configurable: true + }); Object.defineProperty(ObjectPath.prototype, "isCollection", { get: function () { return this.m_isCollection; @@ -10269,6 +11320,7 @@ var OfficeExtension; this.m_objectPathInfo.ObjectPathType=6; this.m_objectPathInfo.Name=referenceId; this.m_objectPathInfo.ArgumentInfo={}; + delete this.m_objectPathInfo.ParentObjectPathId; this.m_parentObjectPath=null; this.m_argumentObjectPaths=null; return; @@ -10283,15 +11335,15 @@ var OfficeExtension; if (!OfficeExtension.Utility.isNullOrUndefined(id)) { this.m_isInvalidAfterRequest=false; this.m_isValid=true; - if (parentIsCollection) { - this.m_objectPathInfo.ObjectPathType=5; - this.m_objectPathInfo.Name=""; - } - else { + if (!OfficeExtension.Utility.isNullOrEmptyString(getByIdMethodName)) { this.m_objectPathInfo.ObjectPathType=3; this.m_objectPathInfo.Name=getByIdMethodName; this.m_getByIdMethodName=null; } + else { + this.m_objectPathInfo.ObjectPathType=5; + this.m_objectPathInfo.Name=""; + } this.isWriteOperation=false; this.m_objectPathInfo.ArgumentInfo={}; this.m_objectPathInfo.ArgumentInfo.Arguments=[id]; @@ -10326,18 +11378,22 @@ var OfficeExtension; var objectPathInfo={ Id: context._nextId(), ObjectPathType: 1, Name: "" }; return new OfficeExtension.ObjectPath(objectPathInfo, null, false, false); }; - ObjectPathFactory.createNewObjectObjectPath=function (context, typeName, isCollection) { + ObjectPathFactory.createNewObjectObjectPath=function (context, typeName, isCollection, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 2, Name: typeName }; - return new OfficeExtension.ObjectPath(objectPathInfo, null, isCollection, false); + var ret=new OfficeExtension.ObjectPath(objectPathInfo, null, isCollection, false); + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; }; - ObjectPathFactory.createPropertyObjectPath=function (context, parent, propertyName, isCollection, isInvalidAfterRequest) { + ObjectPathFactory.createPropertyObjectPath=function (context, parent, propertyName, isCollection, isInvalidAfterRequest, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 4, Name: propertyName, ParentObjectPathId: parent._objectPath.objectPathInfo.Id, }; - return new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest); + var ret=new OfficeExtension.ObjectPath(objectPathInfo, parent._objectPath, isCollection, isInvalidAfterRequest); + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; }; ObjectPathFactory.createIndexerObjectPath=function (context, parent, args) { var objectPathInfo={ @@ -10361,7 +11417,7 @@ var OfficeExtension; objectPathInfo.ArgumentInfo.Arguments=args; return new OfficeExtension.ObjectPath(objectPathInfo, parentObjectPath, false, false); }; - ObjectPathFactory.createMethodObjectPath=function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName) { + ObjectPathFactory.createMethodObjectPath=function (context, parent, methodName, operationType, args, isCollection, isInvalidAfterRequest, getByIdMethodName, isRestrictedResourceAccess) { var objectPathInfo={ Id: context._nextId(), ObjectPathType: 3, @@ -10374,6 +11430,17 @@ var OfficeExtension; ret.argumentObjectPaths=argumentObjectPaths; ret.isWriteOperation=(operationType !=1); ret.getByIdMethodName=getByIdMethodName; + ret.isRestrictedResourceAccess=isRestrictedResourceAccess; + return ret; + }; + ObjectPathFactory.createReferenceIdObjectPath=function (context, referenceId) { + var objectPathInfo={ + Id: context._nextId(), + ObjectPathType: 6, + Name: referenceId, + ArgumentInfo: {} + }; + var ret=new OfficeExtension.ObjectPath(objectPathInfo, null, false, false); return ret; }; ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt=function (hasIndexerMethod, context, parent, childItem, index) { @@ -10425,9 +11492,11 @@ var OfficeExtension; var OfficeExtension; (function (OfficeExtension) { var OfficeJsRequestExecutor=(function () { - function OfficeJsRequestExecutor() { + function OfficeJsRequestExecutor(context) { + this.m_context=context; } OfficeJsRequestExecutor.prototype.executeAsync=function (customData, requestFlags, requestMessage) { + var _this=this; var messageSafearray=OfficeExtension.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(customData, requestFlags, requestMessage, OfficeJsRequestExecutor.SourceLibHeaderValue); return new OfficeExtension._Internal.OfficePromise(function (resolve, reject) { OSF.DDA.RichApi.executeRichApiRequestAsync(messageSafearray, function (result) { @@ -10439,6 +11508,7 @@ var OfficeExtension; } else { response=OfficeExtension.RichApiMessageUtility.buildResponseOnError(result.error.code, result.error.message); + _this.m_context._processOfficeJsErrorResponse(result.error.code, response); } resolve(response); }); @@ -10451,6 +11521,12 @@ var OfficeExtension; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; (function (OfficeExtension) { + var _Internal; + (function (_Internal) { + _Internal.OfficeRequire=function () { + return null; + }(); + })(_Internal=OfficeExtension._Internal || (OfficeExtension._Internal={})); var _Internal; (function (_Internal) { var PromiseImpl; @@ -10554,17 +11630,6 @@ var OfficeExtension; } lib$es6$promise$asap$$len=0; } - function lib$es6$promise$asap$$attemptVertex() { - try { - var r=require; - var vertx=r('vertx'); - lib$es6$promise$asap$$vertxNext=vertx.runOnLoop || vertx.runOnContext; - return lib$es6$promise$asap$$useVertxTimer(); - } - catch (e) { - return lib$es6$promise$asap$$useSetTimeout(); - } - } var lib$es6$promise$asap$$scheduleFlush; if (lib$es6$promise$asap$$isNode) { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useNextTick(); @@ -10575,9 +11640,6 @@ var OfficeExtension; else if (lib$es6$promise$asap$$isWorker) { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useMessageChannel(); } - else if (lib$es6$promise$asap$$browserWindow===undefined && typeof require==='function') { - lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$attemptVertex(); - } else { lib$es6$promise$asap$$scheduleFlush=lib$es6$promise$asap$$useSetTimeout(); } @@ -11095,6 +12157,305 @@ var OfficeExtension; OfficeExtension.TrackedObjects=TrackedObjects; })(OfficeExtension || (OfficeExtension={})); var OfficeExtension; +(function (OfficeExtension) { + var RequestPrettyPrinter=(function () { + function RequestPrettyPrinter(globalObjName, referencedObjectPaths, actions, showDispose) { + if (!globalObjName) { + globalObjName="root"; + } + this.m_globalObjName=globalObjName; + this.m_referencedObjectPaths=referencedObjectPaths; + this.m_actions=actions; + this.m_statements=[]; + this.m_variableNameForObjectPathMap={}; + this.m_variableNameToObjectPathMap={}; + this.m_declaredObjectPathMap={}; + this.m_showDispose=showDispose; + } + RequestPrettyPrinter.prototype.process=function () { + if (this.m_showDispose) { + OfficeExtension.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + for (var i=0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + } + return this.m_statements; + }; + RequestPrettyPrinter.prototype.processForDebugStatementInfo=function (actionIndex) { + if (this.m_showDispose) { + OfficeExtension.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions); + } + var surroundingCount=5; + this.m_statements=[]; + var oneStatement=""; + var statementIndex=-1; + for (var i=0; i < this.m_actions.length; i++) { + this.processOneAction(this.m_actions[i]); + if (actionIndex==i) { + statementIndex=this.m_statements.length - 1; + } + if (statementIndex >=0 && this.m_statements.length > statementIndex+surroundingCount+1) { + break; + } + } + if (statementIndex < 0) { + return null; + } + var startIndex=statementIndex - surroundingCount; + if (startIndex < 0) { + startIndex=0; + } + var endIndex=statementIndex+1+surroundingCount; + if (endIndex > this.m_statements.length) { + endIndex=this.m_statements.length; + } + var surroundingStatements=[]; + if (startIndex !=0) { + surroundingStatements.push("..."); + } + for (var i_1=startIndex; i_1 < statementIndex; i_1++) { + surroundingStatements.push(this.m_statements[i_1]); + } + surroundingStatements.push("// >>>>>"); + surroundingStatements.push(this.m_statements[statementIndex]); + surroundingStatements.push("// <<<<<"); + for (var i_2=statementIndex+1; i_2 < endIndex; i_2++) { + surroundingStatements.push(this.m_statements[i_2]); + } + if (endIndex < this.m_statements.length) { + surroundingStatements.push("..."); + } + return { + statement: this.m_statements[statementIndex], + surroundingStatements: surroundingStatements + }; + }; + RequestPrettyPrinter.prototype.processOneAction=function (action) { + var actionInfo=action.actionInfo; + switch (actionInfo.ActionType) { + case 1: + this.processInstantiateAction(action); + break; + case 3: + this.processMethodAction(action); + break; + case 2: + this.processQueryAction(action); + break; + case 7: + this.processQueryAsJsonAction(action); + break; + case 6: + this.processRecursiveQueryAction(action); + break; + case 4: + this.processSetPropertyAction(action); + break; + case 5: + this.processTraceAction(action); + break; + case 8: + this.processEnsureUnchangedAction(action); + break; + } + }; + RequestPrettyPrinter.prototype.processInstantiateAction=function (action) { + var objId=action.actionInfo.ObjectPathId; + var objPath=this.m_referencedObjectPaths[objId]; + var varName=this.getObjVarName(objId); + if (!this.m_declaredObjectPathMap[objId]) { + var statement="var "+varName+"="+this.buildObjectPathExpressionWithParent(objPath)+";"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + this.m_declaredObjectPathMap[objId]=varName; + } + else { + var statement="// Instantiate {"+varName+"}"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + } + }; + RequestPrettyPrinter.prototype.processMethodAction=function (action) { + var methodName=action.actionInfo.Name; + if (methodName==="_KeepReference") { + methodName="track"; + } + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+"."+OfficeExtension.Utility._toCamelLowerCase(methodName)+"("+this.buildArgumentsExpression(action.actionInfo.ArgumentInfo)+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAction=function (action) { + var queryExp=this.buildQueryExpression(action); + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".load("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processQueryAsJsonAction=function (action) { + var queryExp=this.buildQueryExpression(action); + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".loadJson("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processRecursiveQueryAction=function (action) { + var queryExp=""; + if (action.actionInfo.RecursiveQueryInfo) { + queryExp=JSON.stringify(action.actionInfo.RecursiveQueryInfo); + } + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".loadRecursive("+queryExp+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processSetPropertyAction=function (action) { + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+"."+OfficeExtension.Utility._toCamelLowerCase(action.actionInfo.Name)+"="+this.buildArgumentsExpression(action.actionInfo.ArgumentInfo)+";"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processTraceAction=function (action) { + var statement="context.trace();"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.processEnsureUnchangedAction=function (action) { + var statement=this.getObjVarName(action.actionInfo.ObjectPathId)+".ensureUnchanged("+JSON.stringify(action.actionInfo.ObjectState)+");"; + statement=this.appendDisposeCommentIfRelevant(statement, action); + this.m_statements.push(statement); + }; + RequestPrettyPrinter.prototype.appendDisposeCommentIfRelevant=function (statement, action) { + var _this=this; + if (this.m_showDispose) { + var lastUsedObjectPathIds=action.actionInfo.L; + if (lastUsedObjectPathIds && lastUsedObjectPathIds.length > 0) { + var objectNamesToDispose=lastUsedObjectPathIds.map(function (item) { return _this.getObjVarName(item); }).join(", "); + return statement+" // And then dispose {"+objectNamesToDispose+"}"; + } + } + return statement; + }; + RequestPrettyPrinter.prototype.buildQueryExpression=function (action) { + if (action.actionInfo.QueryInfo) { + var option={}; + option.select=action.actionInfo.QueryInfo.Select; + option.expand=action.actionInfo.QueryInfo.Expand; + option.skip=action.actionInfo.QueryInfo.Skip; + option.top=action.actionInfo.QueryInfo.Top; + if (typeof (option.top)==="undefined" && typeof (option.skip)==="undefined" && typeof (option.expand)==="undefined") { + if (typeof (option.select)==="undefined") { + return ""; + } + else { + return JSON.stringify(option.select); + } + } + else { + return JSON.stringify(option); + } + } + return ""; + }; + RequestPrettyPrinter.prototype.buildObjectPathExpressionWithParent=function (objPath) { + var hasParent=objPath.objectPathInfo.ObjectPathType==5 || + objPath.objectPathInfo.ObjectPathType==3 || + objPath.objectPathInfo.ObjectPathType==4; + if (hasParent && objPath.objectPathInfo.ParentObjectPathId) { + return this.getObjVarName(objPath.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(objPath); + } + return this.buildObjectPathExpression(objPath); + }; + RequestPrettyPrinter.prototype.buildObjectPathExpression=function (objPath) { + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + return "context."+this.m_globalObjName; + case 5: + return "getItem("+this.buildArgumentsExpression(objPath.objectPathInfo.ArgumentInfo)+")"; + case 3: + return OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name)+"("+this.buildArgumentsExpression(objPath.objectPathInfo.ArgumentInfo)+")"; + case 2: + return objPath.objectPathInfo.Name+".newObject()"; + case 7: + return "null"; + case 4: + return OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + case 6: + return "context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(objPath.objectPathInfo.Name)+")"; + } + }; + RequestPrettyPrinter.prototype.buildArgumentsExpression=function (args) { + var ret=""; + if (!args.Arguments) { + return ret; + } + for (var i=0; i < args.Arguments.length; i++) { + if (i > 0) { + ret=ret+", "; + } + ret=ret+this.buildArgumentLiteral(args.Arguments[i], args.ReferencedObjectPathIds ? args.ReferencedObjectPathIds[i] : null); + } + if (ret==="undefined") { + ret=""; + } + return ret; + }; + RequestPrettyPrinter.prototype.buildArgumentLiteral=function (value, objectPathId) { + if (typeof value=="number" && value===objectPathId) { + return this.getObjVarName(objectPathId); + } + else { + return JSON.stringify(value); + } + }; + RequestPrettyPrinter.prototype.getObjVarNameBase=function (objectPathId) { + var ret="v"; + var objPath=this.m_referencedObjectPaths[objectPathId]; + switch (objPath.objectPathInfo.ObjectPathType) { + case 1: + ret=this.m_globalObjName; + break; + case 4: + ret=OfficeExtension.Utility._toCamelLowerCase(objPath.objectPathInfo.Name); + break; + case 3: + var methodName=objPath.objectPathInfo.Name; + if (methodName.length > 3 && methodName.substr(0, 3)==="Get") { + methodName=methodName.substr(3); + } + ret=OfficeExtension.Utility._toCamelLowerCase(methodName); + break; + case 5: + var parentName=this.getObjVarNameBase(objPath.objectPathInfo.ParentObjectPathId); + if (parentName.charAt(parentName.length - 1)==="s") { + ret=parentName.substr(0, parentName.length - 1); + } + else { + ret=parentName+"Item"; + } + break; + } + return ret; + }; + RequestPrettyPrinter.prototype.getObjVarName=function (objectPathId) { + if (this.m_variableNameForObjectPathMap[objectPathId]) { + return this.m_variableNameForObjectPathMap[objectPathId]; + } + var ret=this.getObjVarNameBase(objectPathId); + if (!this.m_variableNameToObjectPathMap[ret]) { + this.m_variableNameForObjectPathMap[objectPathId]=ret; + this.m_variableNameToObjectPathMap[ret]=objectPathId; + return ret; + } + var i=1; + while (this.m_variableNameToObjectPathMap[ret+i.toString()]) { + i++; + } + ret=ret+i.toString(); + this.m_variableNameForObjectPathMap[objectPathId]=ret; + this.m_variableNameToObjectPathMap[ret]=objectPathId; + return ret; + }; + return RequestPrettyPrinter; + }()); + OfficeExtension.RequestPrettyPrinter=RequestPrettyPrinter; +})(OfficeExtension || (OfficeExtension={})); +var OfficeExtension; (function (OfficeExtension) { var ResourceStrings=(function () { function ResourceStrings() { @@ -11114,6 +12475,15 @@ var OfficeExtension; ResourceStrings.moreInfoInnerError="MoreInfoInnerError"; ResourceStrings.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod"; ResourceStrings.valueNotLoaded="ValueNotLoaded"; + ResourceStrings.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage"; + ResourceStrings.invalidOperationInCellEditMode="InvalidOperationInCellEditMode"; + ResourceStrings.customFunctionDefintionMissing="CustomFunctionDefintionMissing"; + ResourceStrings.customFunctionImplementationMissing="CustomFunctionImplementationMissing"; + ResourceStrings.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars"; + ResourceStrings.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit"; + ResourceStrings.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch"; + ResourceStrings.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing"; + ResourceStrings.apiNotFoundDetails="ApiNotFoundDetails"; return ResourceStrings; }()); OfficeExtension.ResourceStrings=ResourceStrings; @@ -11133,6 +12503,15 @@ var OfficeExtension; ResourceStringValues.RunMustReturnPromise="The batch function passed to the \".run\" method didn't return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from \"context.sync()\"."; ResourceStringValues.Timeout="The operation has timed out."; ResourceStringValues.ValueNotLoaded="The value of the result object has not been loaded yet. Before reading the value property, call \"context.sync()\" on the associated request context."; + ResourceStringValues.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page."; + ResourceStringValues.InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again."; + ResourceStringValues.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions."; + ResourceStringValues.CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function."; + ResourceStringValues.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods."; + ResourceStringValues.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name."; + ResourceStringValues.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it."; + ResourceStringValues.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable."; + ResourceStringValues.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}."; return ResourceStringValues; }()); OfficeExtension.ResourceStringValues=ResourceStringValues; @@ -11160,13 +12539,17 @@ var OfficeExtension; RichApiMessageUtility.buildResponseOnError=function (errorCode, message) { var response={ ErrorCode: '', ErrorMessage: '', Headers: null, Body: null }; response.ErrorCode=OfficeExtension.ErrorCodes.generalException; + response.ErrorMessage=message; if (errorCode==RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability) { response.ErrorCode=OfficeExtension.ErrorCodes.accessDenied; } else if (errorCode==RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached) { response.ErrorCode=OfficeExtension.ErrorCodes.activityLimitReached; } - response.ErrorMessage=message; + else if (errorCode==RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidOrTimedOutSession) { + response.ErrorCode=OfficeExtension.ErrorCodes.invalidOrTimedOutSession; + response.ErrorMessage=OfficeExtension.Utility._getResourceString(OfficeExtension.ResourceStrings.invalidOrTimedOutSessionMessage); + } return response; }; RichApiMessageUtility.buildHttpResponseFromOfficeJsError=function (errorCode, message) { @@ -11241,8 +12624,9 @@ var OfficeExtension; RichApiMessageUtility.getResponseStatusCodeFromSafeArray=function (data) { return data[0]; }; - RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability=7000; + RichApiMessageUtility.OfficeJsErrorCode_ooeInvalidOrTimedOutSession=5012; RichApiMessageUtility.OfficeJsErrorCode_ooeActivityLimitReached=5102; + RichApiMessageUtility.OfficeJsErrorCode_ooeNoCapability=7000; return RichApiMessageUtility; }()); OfficeExtension.RichApiMessageUtility=RichApiMessageUtility; @@ -11421,6 +12805,34 @@ var OfficeExtension; }; Utility.load=function (clientObj, option) { clientObj.context.load(clientObj, option); + return clientObj; + }; + Utility.loadAndSync=function (clientObj, option) { + clientObj.context.load(clientObj, option); + return clientObj.context.sync().then(function () { return clientObj; }); + }; + Utility.retrieve=function (clientObj, option) { + var shouldPolyfill=OfficeExtension._internalConfig.alwaysPolyfillClientObjectRetrieveMethod; + if (!shouldPolyfill) { + if (typeof (window) !=="undefined" && window.Office && window.Office.context && window.Office.context.requirements) { + shouldPolyfill=!window.Office.context.requirements.isSetSupported("RichApiRuntime", "1.1"); + } + } + var result=new OfficeExtension.RetrieveResult(clientObj, shouldPolyfill); + var queryOption=OfficeExtension.ClientRequestContext._parseQueryOption(option); + var action; + if (shouldPolyfill) { + action=OfficeExtension.ActionFactory.createQueryAction(clientObj.context, clientObj, queryOption); + } + else { + action=OfficeExtension.ActionFactory.createQueryAsJsonAction(clientObj.context, clientObj, queryOption); + } + clientObj.context._pendingRequest.addActionResultHandler(action, result); + return result; + }; + Utility.retrieveAndSync=function (clientObj, option) { + var result=Utility.retrieve(clientObj, option); + return clientObj.context.sync().then(function () { return result; }); }; Utility._parseSelectExpand=function (select) { var args=[]; @@ -11441,12 +12853,33 @@ var OfficeExtension; return '*'; } var itemsSlashLength=6; - if (propertyNameLower.substr(0, itemsSlashLength)==="items/") { + var isItemsSlashOrItemsDot=propertyNameLower.substr(0, itemsSlashLength)==="items/" || + propertyNameLower.substr(0, itemsSlashLength)==="items."; + if (isItemsSlashOrItemsDot) { propertyName=propertyName.substr(itemsSlashLength); } - return propertyName.replace(new RegExp("\/items\/", "gi"), "/"); + return propertyName.replace(new RegExp("[\/\.]items[\/\.]", "gi"), "/"); } }; + Utility.toJson=function (clientObj, scalarProperties, navigationProperties, collectionItemsIfAny) { + var result={}; + for (var prop in scalarProperties) { + var value=scalarProperties[prop]; + if (typeof value !=="undefined") { + result[prop]=value; + } + } + for (var prop in navigationProperties) { + var value=navigationProperties[prop]; + if (typeof value !=="undefined") { + result[prop]=value.toJSON(); + } + } + if (collectionItemsIfAny) { + result["items"]=collectionItemsIfAny.map(function (item) { return item.toJSON(); }); + } + return result; + }; Utility.throwError=function (resourceId, arg, errorLocation) { throw new OfficeExtension._Internal.RuntimeError({ code: resourceId, @@ -11507,6 +12940,21 @@ var OfficeExtension; }); } }; + Utility.throwIfApiNotSupported=function (apiFullName, apiSetName, apiSetVersion, hostName) { + if (!Utility._doApiNotSupportedCheck) { + return; + } + if (typeof (window) !=="undefined" && window.Office && window.Office.context) { + if (!window.Office.context.requirements.isSetSupported(apiSetName, apiSetVersion)) { + var message=Utility._getResourceString(OfficeExtension.ResourceStrings.apiNotFoundDetails, [apiFullName, apiSetName+" "+apiSetVersion, hostName]); + throw new OfficeExtension._Internal.RuntimeError({ + code: OfficeExtension.ErrorCodes.apiNotFound, + message: message, + debugInfo: { errorLocation: apiFullName } + }); + } + } + }; Utility.getObjectPathExpression=function (objectPath) { var ret=""; while (objectPath) { @@ -11656,7 +13104,10 @@ var OfficeExtension; }; Utility._parseErrorResponse=function (responseInfo) { var errorObj=null; - if (!Utility.isNullOrEmptyString(responseInfo.body)) { + if (Utility.isPlainJsonObject(responseInfo.body)) { + errorObj=responseInfo.body; + } + else if (!Utility.isNullOrEmptyString(responseInfo.body)) { var errorResponseBody=Utility.trim(responseInfo.body); try { errorObj=JSON.parse(errorResponseBody); @@ -11686,8 +13137,24 @@ var OfficeExtension; } } }; + Utility._toCamelLowerCase=function (name) { + if (Utility.isNullOrEmptyString(name)) { + return name; + } + var index=0; + while (index < name.length && name.charCodeAt(index) >=65 && name.charCodeAt(index) <=90) { + index++; + } + if (index < name.length) { + return name.substr(0, index).toLowerCase()+name.substr(index); + } + else { + return name.toLowerCase(); + } + }; Utility._logEnabled=false; Utility._synchronousCleanup=false; + Utility._doApiNotSupportedCheck=false; Utility.s_underscoreCharCode="_".charCodeAt(0); return Utility; }()); @@ -11699,6 +13166,243 @@ var __extends=(this && this.__extends) || function (d, b) { function __() { this.constructor=d; } d.prototype=b===null ? Object.create(b) : (__.prototype=b.prototype, new __()); }; +var OfficeCore; +(function (OfficeCore) { + var _hostName="OfficeCore"; + var _defaultApiSetName="ExperimentApi"; + var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; + var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; + var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; + var _createNewObjectObjectPath=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath; + var _createChildItemObjectPathUsingIndexer=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer; + var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; + var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; + var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; + var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined=OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; + var _load=OfficeExtension.Utility.load; + var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; + var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; + var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var FlightingService=(function (_super) { + __extends(FlightingService, _super); + function FlightingService() { + _super.apply(this, arguments); + } + Object.defineProperty(FlightingService.prototype, "_className", { + get: function () { + return "FlightingService"; + }, + enumerable: true, + configurable: true + }); + FlightingService.prototype.getClientSessionId=function () { + var action=_createMethodAction(this.context, this, "GetClientSessionId", 1, []); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + FlightingService.prototype.getDeferredFlights=function () { + var action=_createMethodAction(this.context, this, "GetDeferredFlights", 1, []); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + FlightingService.prototype.getFeature=function (featureName, type, defaultValue, possibleValues) { + return new OfficeCore.ABType(this.context, _createMethodObjectPath(this.context, this, "GetFeature", 1, [featureName, type, defaultValue, possibleValues], false, false, null)); + }; + FlightingService.prototype.getFeatureGate=function (featureName, scope) { + return new OfficeCore.ABType(this.context, _createMethodObjectPath(this.context, this, "GetFeatureGate", 1, [featureName, scope], false, false, null)); + }; + FlightingService.prototype.resetOverride=function (featureName) { + _createMethodAction(this.context, this, "ResetOverride", 0, [featureName]); + }; + FlightingService.prototype.setOverride=function (featureName, type, value) { + _createMethodAction(this.context, this, "SetOverride", 0, [featureName, type, value]); + }; + FlightingService.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + FlightingService.newObject=function (context) { + var ret=new OfficeCore.FlightingService(context, _createNewObjectObjectPath(context, "Microsoft.Experiment.FlightingService", false)); + return ret; + }; + FlightingService.prototype.toJSON=function () { + return {}; + }; + return FlightingService; + }(OfficeExtension.ClientObject)); + OfficeCore.FlightingService=FlightingService; + var ABType=(function (_super) { + __extends(ABType, _super); + function ABType() { + _super.apply(this, arguments); + } + Object.defineProperty(ABType.prototype, "_className", { + get: function () { + return "ABType"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(ABType.prototype, "value", { + get: function () { + _throwIfNotLoaded("value", this.m_value, "ABType", this._isNull); + return this.m_value; + }, + enumerable: true, + configurable: true + }); + ABType.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Value"])) { + this.m_value=obj["Value"]; + } + }; + ABType.prototype.load=function (option) { + _load(this, option); + return this; + }; + ABType.prototype.toJSON=function () { + return { + "value": this.m_value + }; + }; + return ABType; + }(OfficeExtension.ClientObject)); + OfficeCore.ABType=ABType; + var FeatureType; + (function (FeatureType) { + FeatureType.boolean="Boolean"; + FeatureType.integer="Integer"; + FeatureType.string="String"; + })(FeatureType=OfficeCore.FeatureType || (OfficeCore.FeatureType={})); + var ExperimentErrorCodes; + (function (ExperimentErrorCodes) { + ExperimentErrorCodes.generalException="GeneralException"; + })(ExperimentErrorCodes=OfficeCore.ExperimentErrorCodes || (OfficeCore.ExperimentErrorCodes={})); +})(OfficeCore || (OfficeCore={})); +var OfficeCore; +(function (OfficeCore) { + var RequestContext=(function (_super) { + __extends(RequestContext, _super); + function RequestContext(url) { + _super.call(this, url); + } + Object.defineProperty(RequestContext.prototype, "flighting", { + get: function () { + return this.flightingService; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "telemetry", { + get: function () { + if (!this.m_telemetry) { + this.m_telemetry=OfficeCore.TelemetryService.newObject(this); + } + return this.m_telemetry; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(RequestContext.prototype, "flightingService", { + get: function () { + if (!this.m_flightingService) { + this.m_flightingService=OfficeCore.FlightingService.newObject(this); + } + return this.m_flightingService; + }, + enumerable: true, + configurable: true + }); + return RequestContext; + }(OfficeExtension.ClientRequestContext)); + OfficeCore.RequestContext=RequestContext; +})(OfficeCore || (OfficeCore={})); +var OfficeCore; +(function (OfficeCore) { + var _hostName="OfficeCore"; + var _defaultApiSetName="TelemetryApi"; + var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; + var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; + var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; + var _createNewObjectObjectPath=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath; + var _createChildItemObjectPathUsingIndexer=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer; + var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; + var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; + var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; + var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; + var _isUndefined=OfficeExtension.Utility.isUndefined; + var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; + var _load=OfficeExtension.Utility.load; + var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; + var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; + var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; + var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var _typeTelemetryService="TelemetryService"; + var TelemetryService=(function (_super) { + __extends(TelemetryService, _super); + function TelemetryService() { + _super.apply(this, arguments); + } + Object.defineProperty(TelemetryService.prototype, "_className", { + get: function () { + return "TelemetryService"; + }, + enumerable: true, + configurable: true + }); + TelemetryService.prototype.sendTelemetryEvent=function (telemetryProperties, eventName, eventContract, eventFlags, value) { + _createMethodAction(this.context, this, "SendTelemetryEvent", 1, [telemetryProperties, eventName, eventContract, eventFlags, value], false); + }; + TelemetryService.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + TelemetryService.newObject=function (context) { + var ret=new OfficeCore.TelemetryService(context, _createNewObjectObjectPath(context, "Microsoft.Telemetry.TelemetryService", false, false)); + return ret; + }; + TelemetryService.prototype.toJSON=function () { + return {}; + }; + return TelemetryService; + }(OfficeExtension.ClientObject)); + OfficeCore.TelemetryService=TelemetryService; + var TelemetryErrorCodes; + (function (TelemetryErrorCodes) { + TelemetryErrorCodes.generalException="GeneralException"; + })(TelemetryErrorCodes=OfficeCore.TelemetryErrorCodes || (OfficeCore.TelemetryErrorCodes={})); +})(OfficeCore || (OfficeCore={})); + +var __extends=(this && this.__extends) || (function () { + var extendStatics=Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__=b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p]=b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor=d; } + d.prototype=b===null ? Object.create(b) : (__.prototype=b.prototype, new __()); + }; +})(); var Word; (function (Word) { function _normalizeSearchOptions(context, searchOptions) { @@ -11719,6 +13423,8 @@ var Word; } return newSearchOptions; } + var _hostName="Word"; + var _defaultApiSetName="WordApi"; var _createPropertyObjectPath=OfficeExtension.ObjectPathFactory.createPropertyObjectPath; var _createMethodObjectPath=OfficeExtension.ObjectPathFactory.createMethodObjectPath; var _createIndexerObjectPath=OfficeExtension.ObjectPathFactory.createIndexerObjectPath; @@ -11727,19 +13433,59 @@ var Word; var _createChildItemObjectPathUsingGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt; var _createChildItemObjectPathUsingIndexerOrGetItemAt=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt; var _createMethodAction=OfficeExtension.ActionFactory.createMethodAction; + var _createEnsureUnchangedAction=OfficeExtension.ActionFactory.createEnsureUnchangedAction; var _createSetPropertyAction=OfficeExtension.ActionFactory.createSetPropertyAction; var _isNullOrUndefined=OfficeExtension.Utility.isNullOrUndefined; var _isUndefined=OfficeExtension.Utility.isUndefined; var _throwIfNotLoaded=OfficeExtension.Utility.throwIfNotLoaded; + var _throwIfApiNotSupported=OfficeExtension.Utility.throwIfApiNotSupported; var _load=OfficeExtension.Utility.load; + var _loadAndSync=OfficeExtension.Utility.loadAndSync; + var _retrieve=OfficeExtension.Utility.retrieve; + var _retrieveAndSync=OfficeExtension.Utility.retrieveAndSync; + var _toJson=OfficeExtension.Utility.toJson; var _fixObjectPathIfNecessary=OfficeExtension.Utility.fixObjectPathIfNecessary; var _addActionResultHandler=OfficeExtension.Utility._addActionResultHandler; var _handleNavigationPropertyResults=OfficeExtension.Utility._handleNavigationPropertyResults; var _adjustToDateTime=OfficeExtension.Utility.adjustToDateTime; + var _typeApplication="Application"; + var Application=(function (_super) { + __extends(Application, _super); + function Application() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(Application.prototype, "_className", { + get: function () { + return "Application"; + }, + enumerable: true, + configurable: true + }); + Application.prototype.createDocument=function (base64File) { + return new Word.DocumentCreated(this.context, _createMethodObjectPath(this.context, this, "CreateDocument", 1, [base64File], false, false, null, false)); + }; + Application.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + }; + Application.newObject=function (context) { + var ret=new Word.Application(context, _createNewObjectObjectPath(context, "Microsoft.WordServices.Application", false, false)); + return ret; + }; + Application.prototype.toJSON=function () { + return _toJson(this, {}, {}); + }; + return Application; + }(OfficeExtension.ClientObject)); + Word.Application=Application; + var _typeBody="Body"; var Body=(function (_super) { __extends(Body, _super); function Body() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Body.prototype, "_className", { get: function () { @@ -11750,131 +13496,138 @@ var Word; }); Object.defineProperty(Body.prototype, "contentControls", { get: function () { - if (!this.m_contentControls) { - this.m_contentControls=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false)); + if (!this._C) { + this._C=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false, false)); } - return this.m_contentControls; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._F) { + this._F=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "inlinePictures", { get: function () { - if (!this.m_inlinePictures) { - this.m_inlinePictures=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false)); + if (!this._I) { + this._I=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false, false)); } - return this.m_inlinePictures; + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "lists", { get: function () { - if (!this.m_lists) { - this.m_lists=new Word.ListCollection(this.context, _createPropertyObjectPath(this.context, this, "Lists", true, false)); + _throwIfApiNotSupported("Body.lists", _defaultApiSetName, "1.3", _hostName); + if (!this._L) { + this._L=new Word.ListCollection(this.context, _createPropertyObjectPath(this.context, this, "Lists", true, false, false)); } - return this.m_lists; + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._P) { + this._P=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "parentBody", { get: function () { - if (!this.m_parentBody) { - this.m_parentBody=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false)); + _throwIfApiNotSupported("Body.parentBody", _defaultApiSetName, "1.3", _hostName); + if (!this._Pa) { + this._Pa=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false, false)); } - return this.m_parentBody; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "parentBodyOrNullObject", { get: function () { - if (!this.m_parentBodyOrNullObject) { - this.m_parentBodyOrNullObject=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBodyOrNullObject", false, false)); + _throwIfApiNotSupported("Body.parentBodyOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Par) { + this._Par=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBodyOrNullObject", false, false, false)); } - return this.m_parentBodyOrNullObject; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "parentContentControl", { get: function () { - if (!this.m_parentContentControl) { - this.m_parentContentControl=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false)); + if (!this._Pare) { + this._Pare=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false, false)); } - return this.m_parentContentControl; + return this._Pare; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "parentContentControlOrNullObject", { get: function () { - if (!this.m_parentContentControlOrNullObject) { - this.m_parentContentControlOrNullObject=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false)); + _throwIfApiNotSupported("Body.parentContentControlOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Paren) { + this._Paren=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false, false)); } - return this.m_parentContentControlOrNullObject; + return this._Paren; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "parentSection", { get: function () { - if (!this.m_parentSection) { - this.m_parentSection=new Word.Section(this.context, _createPropertyObjectPath(this.context, this, "ParentSection", false, false)); + _throwIfApiNotSupported("Body.parentSection", _defaultApiSetName, "1.3", _hostName); + if (!this._Parent) { + this._Parent=new Word.Section(this.context, _createPropertyObjectPath(this.context, this, "ParentSection", false, false, false)); } - return this.m_parentSection; + return this._Parent; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "parentSectionOrNullObject", { get: function () { - if (!this.m_parentSectionOrNullObject) { - this.m_parentSectionOrNullObject=new Word.Section(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionOrNullObject", false, false)); + _throwIfApiNotSupported("Body.parentSectionOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ParentS) { + this._ParentS=new Word.Section(this.context, _createPropertyObjectPath(this.context, this, "ParentSectionOrNullObject", false, false, false)); } - return this.m_parentSectionOrNullObject; + return this._ParentS; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "tables", { get: function () { - if (!this.m_tables) { - this.m_tables=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false)); + _throwIfApiNotSupported("Body.tables", _defaultApiSetName, "1.3", _hostName); + if (!this._T) { + this._T=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false, false)); } - return this.m_tables; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "Body", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._S, _typeBody, this._isNull); + return this._S; }, set: function (value) { - this.m_style=value; + this._S=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -11882,11 +13635,12 @@ var Word; }); Object.defineProperty(Body.prototype, "styleBuiltIn", { get: function () { - _throwIfNotLoaded("styleBuiltIn", this.m_styleBuiltIn, "Body", this._isNull); - return this.m_styleBuiltIn; + _throwIfNotLoaded("styleBuiltIn", this._St, _typeBody, this._isNull); + _throwIfApiNotSupported("Body.styleBuiltIn", _defaultApiSetName, "1.3", _hostName); + return this._St; }, set: function (value) { - this.m_styleBuiltIn=value; + this._St=value; _createSetPropertyAction(this.context, this, "StyleBuiltIn", value); }, enumerable: true, @@ -11894,41 +13648,31 @@ var Word; }); Object.defineProperty(Body.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "Body", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._Te, _typeBody, this._isNull); + return this._Te; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "Body", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._Ty, _typeBody, this._isNull); + _throwIfApiNotSupported("Body.type", _defaultApiSetName, "1.3", _hostName); + return this._Ty; }, enumerable: true, configurable: true }); Object.defineProperty(Body.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Body", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeBody, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Body.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["style", "styleBuiltIn"], ["font"], [ - "contentControls", - "inlinePictures", - "lists", - "paragraphs", - "parentBody", - "parentBodyOrNullObject", - "parentContentControl", - "parentContentControlOrNullObject", - "parentSection", - "parentSectionOrNullObject", - "tables", "contentControls", "inlinePictures", "lists", @@ -11943,59 +13687,62 @@ var Word; ]); }; Body.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; Body.prototype.getHtml=function () { - var action=_createMethodAction(this.context, this, "GetHtml", 1, []); + var action=_createMethodAction(this.context, this, "GetHtml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Body.prototype.getOoxml=function () { - var action=_createMethodAction(this.context, this, "GetOoxml", 1, []); + var action=_createMethodAction(this.context, this, "GetOoxml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Body.prototype.getRange=function (rangeLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null)); + _throwIfApiNotSupported("Body.getRange", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null, false)); }; Body.prototype.insertBreak=function (breakType, insertLocation) { - _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation]); + _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation], false); }; Body.prototype.insertContentControl=function () { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null)); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null, false)); }; Body.prototype.insertFileFromBase64=function (base64File, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null, false)); }; Body.prototype.insertHtml=function (html, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null, false)); }; Body.prototype.insertInlinePictureFromBase64=function (base64EncodedImage, insertLocation) { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null)); + _throwIfApiNotSupported("Body.insertInlinePictureFromBase64", _defaultApiSetName, "1.2", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null, false)); }; Body.prototype.insertOoxml=function (ooxml, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null, false)); }; Body.prototype.insertParagraph=function (paragraphText, insertLocation) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null, false)); }; Body.prototype.insertTable=function (rowCount, columnCount, insertLocation, values) { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null)); + _throwIfApiNotSupported("Body.insertTable", _defaultApiSetName, "1.3", _hostName); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null, false)); }; Body.prototype.insertText=function (text, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null, false)); }; Body.prototype.search=function (searchText, searchOptions) { searchOptions=_normalizeSearchOptions(this.context, searchOptions); - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null)); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null, false)); }; Body.prototype.select=function (selectionMode) { - _createMethodAction(this.context, this, "Select", 1, [selectionMode]); + _createMethodAction(this.context, this, "Select", 1, [selectionMode], false); }; Body.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Body.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12004,25 +13751,33 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._S=obj["Style"]; } if (!_isUndefined(obj["StyleBuiltIn"])) { - this.m_styleBuiltIn=obj["StyleBuiltIn"]; + this._St=obj["StyleBuiltIn"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._Te=obj["Text"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._Ty=obj["Type"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["contentControls", "ContentControls", "font", "Font", "inlinePictures", "InlinePictures", "lists", "Lists", "paragraphs", "Paragraphs", "parentBody", "ParentBody", "parentBodyOrNullObject", "ParentBodyOrNullObject", "parentContentControl", "ParentContentControl", "parentContentControlOrNullObject", "ParentContentControlOrNullObject", "parentSection", "ParentSection", "parentSectionOrNullObject", "ParentSectionOrNullObject", "tables", "Tables"]); }; Body.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Body.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Body.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Body.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; Body.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -12030,7 +13785,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; Body.prototype.track=function () { @@ -12042,21 +13797,32 @@ var Word; return this; }; Body.prototype.toJSON=function () { - return { - "font": this.m_font, - "style": this.m_style, - "styleBuiltIn": this.m_styleBuiltIn, - "text": this.m_text, - "type": this.m_type - }; + return _toJson(this, { + "style": this._S, + "styleBuiltIn": this._St, + "text": this._Te, + "type": this._Ty, + }, { + "contentControls": this._C, + "font": this._F, + "inlinePictures": this._I, + "lists": this._L, + "paragraphs": this._P, + "tables": this._T, + }); + }; + Body.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Body; }(OfficeExtension.ClientObject)); Word.Body=Body; + var _typeContentControl="ContentControl"; var ContentControl=(function (_super) { __extends(ContentControl, _super); function ContentControl() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ContentControl.prototype, "_className", { get: function () { @@ -12067,141 +13833,149 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "contentControls", { get: function () { - if (!this.m_contentControls) { - this.m_contentControls=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false)); + if (!this._Con) { + this._Con=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false, false)); } - return this.m_contentControls; + return this._Con; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._F) { + this._F=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "inlinePictures", { get: function () { - if (!this.m_inlinePictures) { - this.m_inlinePictures=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false)); + if (!this._In) { + this._In=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false, false)); } - return this.m_inlinePictures; + return this._In; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "lists", { get: function () { - if (!this.m_lists) { - this.m_lists=new Word.ListCollection(this.context, _createPropertyObjectPath(this.context, this, "Lists", true, false)); + _throwIfApiNotSupported("ContentControl.lists", _defaultApiSetName, "1.3", _hostName); + if (!this._L) { + this._L=new Word.ListCollection(this.context, _createPropertyObjectPath(this.context, this, "Lists", true, false, false)); } - return this.m_lists; + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._P) { + this._P=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "parentBody", { get: function () { - if (!this.m_parentBody) { - this.m_parentBody=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false)); + _throwIfApiNotSupported("ContentControl.parentBody", _defaultApiSetName, "1.3", _hostName); + if (!this._Pa) { + this._Pa=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false, false)); } - return this.m_parentBody; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "parentContentControl", { get: function () { - if (!this.m_parentContentControl) { - this.m_parentContentControl=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false)); + if (!this._Par) { + this._Par=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false, false)); } - return this.m_parentContentControl; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "parentContentControlOrNullObject", { get: function () { - if (!this.m_parentContentControlOrNullObject) { - this.m_parentContentControlOrNullObject=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false)); + _throwIfApiNotSupported("ContentControl.parentContentControlOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Pare) { + this._Pare=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false, false)); } - return this.m_parentContentControlOrNullObject; + return this._Pare; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + _throwIfApiNotSupported("ContentControl.parentTable", _defaultApiSetName, "1.3", _hostName); + if (!this._Paren) { + this._Paren=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._Paren; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "parentTableCell", { get: function () { - if (!this.m_parentTableCell) { - this.m_parentTableCell=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false)); + _throwIfApiNotSupported("ContentControl.parentTableCell", _defaultApiSetName, "1.3", _hostName); + if (!this._Parent) { + this._Parent=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false, false)); } - return this.m_parentTableCell; + return this._Parent; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "parentTableCellOrNullObject", { get: function () { - if (!this.m_parentTableCellOrNullObject) { - this.m_parentTableCellOrNullObject=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false)); + _throwIfApiNotSupported("ContentControl.parentTableCellOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ParentT) { + this._ParentT=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false, false)); } - return this.m_parentTableCellOrNullObject; + return this._ParentT; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "parentTableOrNullObject", { get: function () { - if (!this.m_parentTableOrNullObject) { - this.m_parentTableOrNullObject=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false)); + _throwIfApiNotSupported("ContentControl.parentTableOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ParentTa) { + this._ParentTa=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false, false)); } - return this.m_parentTableOrNullObject; + return this._ParentTa; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "tables", { get: function () { - if (!this.m_tables) { - this.m_tables=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false)); + _throwIfApiNotSupported("ContentControl.tables", _defaultApiSetName, "1.3", _hostName); + if (!this._T) { + this._T=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false, false)); } - return this.m_tables; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "appearance", { get: function () { - _throwIfNotLoaded("appearance", this.m_appearance, "ContentControl", this._isNull); - return this.m_appearance; + _throwIfNotLoaded("appearance", this._A, _typeContentControl, this._isNull); + return this._A; }, set: function (value) { - this.m_appearance=value; + this._A=value; _createSetPropertyAction(this.context, this, "Appearance", value); }, enumerable: true, @@ -12209,11 +13983,11 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "cannotDelete", { get: function () { - _throwIfNotLoaded("cannotDelete", this.m_cannotDelete, "ContentControl", this._isNull); - return this.m_cannotDelete; + _throwIfNotLoaded("cannotDelete", this._C, _typeContentControl, this._isNull); + return this._C; }, set: function (value) { - this.m_cannotDelete=value; + this._C=value; _createSetPropertyAction(this.context, this, "CannotDelete", value); }, enumerable: true, @@ -12221,11 +13995,11 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "cannotEdit", { get: function () { - _throwIfNotLoaded("cannotEdit", this.m_cannotEdit, "ContentControl", this._isNull); - return this.m_cannotEdit; + _throwIfNotLoaded("cannotEdit", this._Ca, _typeContentControl, this._isNull); + return this._Ca; }, set: function (value) { - this.m_cannotEdit=value; + this._Ca=value; _createSetPropertyAction(this.context, this, "CannotEdit", value); }, enumerable: true, @@ -12233,11 +14007,11 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "ContentControl", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._Co, _typeContentControl, this._isNull); + return this._Co; }, set: function (value) { - this.m_color=value; + this._Co=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -12245,19 +14019,19 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "ContentControl", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeContentControl, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "placeholderText", { get: function () { - _throwIfNotLoaded("placeholderText", this.m_placeholderText, "ContentControl", this._isNull); - return this.m_placeholderText; + _throwIfNotLoaded("placeholderText", this._Pl, _typeContentControl, this._isNull); + return this._Pl; }, set: function (value) { - this.m_placeholderText=value; + this._Pl=value; _createSetPropertyAction(this.context, this, "PlaceholderText", value); }, enumerable: true, @@ -12265,11 +14039,11 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "removeWhenEdited", { get: function () { - _throwIfNotLoaded("removeWhenEdited", this.m_removeWhenEdited, "ContentControl", this._isNull); - return this.m_removeWhenEdited; + _throwIfNotLoaded("removeWhenEdited", this._R, _typeContentControl, this._isNull); + return this._R; }, set: function (value) { - this.m_removeWhenEdited=value; + this._R=value; _createSetPropertyAction(this.context, this, "RemoveWhenEdited", value); }, enumerable: true, @@ -12277,11 +14051,11 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "ContentControl", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._S, _typeContentControl, this._isNull); + return this._S; }, set: function (value) { - this.m_style=value; + this._S=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -12289,11 +14063,12 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "styleBuiltIn", { get: function () { - _throwIfNotLoaded("styleBuiltIn", this.m_styleBuiltIn, "ContentControl", this._isNull); - return this.m_styleBuiltIn; + _throwIfNotLoaded("styleBuiltIn", this._St, _typeContentControl, this._isNull); + _throwIfApiNotSupported("ContentControl.styleBuiltIn", _defaultApiSetName, "1.3", _hostName); + return this._St; }, set: function (value) { - this.m_styleBuiltIn=value; + this._St=value; _createSetPropertyAction(this.context, this, "StyleBuiltIn", value); }, enumerable: true, @@ -12301,19 +14076,20 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "subtype", { get: function () { - _throwIfNotLoaded("subtype", this.m_subtype, "ContentControl", this._isNull); - return this.m_subtype; + _throwIfNotLoaded("subtype", this._Su, _typeContentControl, this._isNull); + _throwIfApiNotSupported("ContentControl.subtype", _defaultApiSetName, "1.3", _hostName); + return this._Su; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "tag", { get: function () { - _throwIfNotLoaded("tag", this.m_tag, "ContentControl", this._isNull); - return this.m_tag; + _throwIfNotLoaded("tag", this._Ta, _typeContentControl, this._isNull); + return this._Ta; }, set: function (value) { - this.m_tag=value; + this._Ta=value; _createSetPropertyAction(this.context, this, "Tag", value); }, enumerable: true, @@ -12321,19 +14097,19 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "ContentControl", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._Te, _typeContentControl, this._isNull); + return this._Te; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "title", { get: function () { - _throwIfNotLoaded("title", this.m_title, "ContentControl", this._isNull); - return this.m_title; + _throwIfNotLoaded("title", this._Ti, _typeContentControl, this._isNull); + return this._Ti; }, set: function (value) { - this.m_title=value; + this._Ti=value; _createSetPropertyAction(this.context, this, "Title", value); }, enumerable: true, @@ -12341,34 +14117,22 @@ var Word; }); Object.defineProperty(ContentControl.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "ContentControl", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._Ty, _typeContentControl, this._isNull); + return this._Ty; }, enumerable: true, configurable: true }); Object.defineProperty(ContentControl.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "ContentControl", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeContentControl, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); ContentControl.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["title", "tag", "placeholderText", "appearance", "color", "removeWhenEdited", "cannotDelete", "cannotEdit", "style", "styleBuiltIn"], ["font"], [ - "contentControls", - "inlinePictures", - "lists", - "paragraphs", - "parentBody", - "parentContentControl", - "parentContentControlOrNullObject", - "parentTable", - "parentTableCell", - "parentTableCellOrNullObject", - "parentTableOrNullObject", - "tables", "contentControls", "inlinePictures", "lists", @@ -12384,65 +14148,70 @@ var Word; ]); }; ContentControl.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; ContentControl.prototype.delete=function (keepContent) { - _createMethodAction(this.context, this, "Delete", 0, [keepContent]); + _createMethodAction(this.context, this, "Delete", 0, [keepContent], false); }; ContentControl.prototype.getHtml=function () { - var action=_createMethodAction(this.context, this, "GetHtml", 1, []); + var action=_createMethodAction(this.context, this, "GetHtml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; ContentControl.prototype.getOoxml=function () { - var action=_createMethodAction(this.context, this, "GetOoxml", 1, []); + var action=_createMethodAction(this.context, this, "GetOoxml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; ContentControl.prototype.getRange=function (rangeLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null)); + _throwIfApiNotSupported("ContentControl.getRange", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null, false)); }; ContentControl.prototype.getTextRanges=function (endingMarks, trimSpacing) { - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetTextRanges", 1, [endingMarks, trimSpacing], true, false, null)); + _throwIfApiNotSupported("ContentControl.getTextRanges", _defaultApiSetName, "1.3", _hostName); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetTextRanges", 1, [endingMarks, trimSpacing], true, false, null, false)); }; ContentControl.prototype.insertBreak=function (breakType, insertLocation) { - _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation]); + _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation], false); }; ContentControl.prototype.insertFileFromBase64=function (base64File, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null, false)); }; ContentControl.prototype.insertHtml=function (html, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null, false)); }; ContentControl.prototype.insertInlinePictureFromBase64=function (base64EncodedImage, insertLocation) { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null)); + _throwIfApiNotSupported("ContentControl.insertInlinePictureFromBase64", _defaultApiSetName, "1.2", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null, false)); }; ContentControl.prototype.insertOoxml=function (ooxml, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null, false)); }; ContentControl.prototype.insertParagraph=function (paragraphText, insertLocation) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null, false)); }; ContentControl.prototype.insertTable=function (rowCount, columnCount, insertLocation, values) { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null)); + _throwIfApiNotSupported("ContentControl.insertTable", _defaultApiSetName, "1.3", _hostName); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null, false)); }; ContentControl.prototype.insertText=function (text, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null, false)); }; ContentControl.prototype.search=function (searchText, searchOptions) { searchOptions=_normalizeSearchOptions(this.context, searchOptions); - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null)); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null, false)); }; ContentControl.prototype.select=function (selectionMode) { - _createMethodAction(this.context, this, "Select", 1, [selectionMode]); + _createMethodAction(this.context, this, "Select", 1, [selectionMode], false); }; ContentControl.prototype.split=function (delimiters, multiParagraphs, trimDelimiters, trimSpacing) { - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Split", 1, [delimiters, multiParagraphs, trimDelimiters, trimSpacing], true, false, null)); + _throwIfApiNotSupported("ContentControl.split", _defaultApiSetName, "1.3", _hostName); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Split", 1, [delimiters, multiParagraphs, trimDelimiters, trimSpacing], true, false, null, false)); }; ContentControl.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; ContentControl.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12451,55 +14220,63 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Appearance"])) { - this.m_appearance=obj["Appearance"]; + this._A=obj["Appearance"]; } if (!_isUndefined(obj["CannotDelete"])) { - this.m_cannotDelete=obj["CannotDelete"]; + this._C=obj["CannotDelete"]; } if (!_isUndefined(obj["CannotEdit"])) { - this.m_cannotEdit=obj["CannotEdit"]; + this._Ca=obj["CannotEdit"]; } if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._Co=obj["Color"]; } if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["PlaceholderText"])) { - this.m_placeholderText=obj["PlaceholderText"]; + this._Pl=obj["PlaceholderText"]; } if (!_isUndefined(obj["RemoveWhenEdited"])) { - this.m_removeWhenEdited=obj["RemoveWhenEdited"]; + this._R=obj["RemoveWhenEdited"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._S=obj["Style"]; } if (!_isUndefined(obj["StyleBuiltIn"])) { - this.m_styleBuiltIn=obj["StyleBuiltIn"]; + this._St=obj["StyleBuiltIn"]; } if (!_isUndefined(obj["Subtype"])) { - this.m_subtype=obj["Subtype"]; + this._Su=obj["Subtype"]; } if (!_isUndefined(obj["Tag"])) { - this.m_tag=obj["Tag"]; + this._Ta=obj["Tag"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._Te=obj["Text"]; } if (!_isUndefined(obj["Title"])) { - this.m_title=obj["Title"]; + this._Ti=obj["Title"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._Ty=obj["Type"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["contentControls", "ContentControls", "font", "Font", "inlinePictures", "InlinePictures", "lists", "Lists", "paragraphs", "Paragraphs", "parentBody", "ParentBody", "parentContentControl", "ParentContentControl", "parentContentControlOrNullObject", "ParentContentControlOrNullObject", "parentTable", "ParentTable", "parentTableCell", "ParentTableCell", "parentTableCellOrNullObject", "ParentTableCellOrNullObject", "parentTableOrNullObject", "ParentTableOrNullObject", "tables", "Tables"]); }; ContentControl.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ContentControl.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ContentControl.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ContentControl.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; ContentControl.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -12507,10 +14284,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; ContentControl.prototype.track=function () { @@ -12522,31 +14299,42 @@ var Word; return this; }; ContentControl.prototype.toJSON=function () { - return { - "appearance": this.m_appearance, - "cannotDelete": this.m_cannotDelete, - "cannotEdit": this.m_cannotEdit, - "color": this.m_color, - "font": this.m_font, - "id": this.m_id, - "placeholderText": this.m_placeholderText, - "removeWhenEdited": this.m_removeWhenEdited, - "style": this.m_style, - "styleBuiltIn": this.m_styleBuiltIn, - "subtype": this.m_subtype, - "tag": this.m_tag, - "text": this.m_text, - "title": this.m_title, - "type": this.m_type - }; + return _toJson(this, { + "appearance": this._A, + "cannotDelete": this._C, + "cannotEdit": this._Ca, + "color": this._Co, + "id": this._I, + "placeholderText": this._Pl, + "removeWhenEdited": this._R, + "style": this._S, + "styleBuiltIn": this._St, + "subtype": this._Su, + "tag": this._Ta, + "text": this._Te, + "title": this._Ti, + "type": this._Ty, + }, { + "contentControls": this._Con, + "font": this._F, + "inlinePictures": this._In, + "lists": this._L, + "paragraphs": this._P, + "tables": this._T, + }); + }; + ContentControl.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ContentControl; }(OfficeExtension.ClientObject)); Word.ContentControl=ContentControl; + var _typeContentControlCollection="ContentControlCollection"; var ContentControlCollection=(function (_super) { __extends(ContentControlCollection, _super); function ContentControlCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ContentControlCollection.prototype, "_className", { get: function () { @@ -12557,7 +14345,7 @@ var Word; }); Object.defineProperty(ContentControlCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ContentControlCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeContentControlCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -12565,38 +14353,42 @@ var Word; }); Object.defineProperty(ContentControlCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "ContentControlCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeContentControlCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); ContentControlCollection.prototype.getById=function (id) { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetById", 1, [id], false, false, null)); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetById", 1, [id], false, false, null, false)); }; ContentControlCollection.prototype.getByIdOrNullObject=function (id) { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetByIdOrNullObject", 1, [id], false, false, null)); + _throwIfApiNotSupported("ContentControlCollection.getByIdOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetByIdOrNullObject", 1, [id], false, false, null, false)); }; ContentControlCollection.prototype.getByTag=function (tag) { - return new Word.ContentControlCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTag", 1, [tag], true, false, null)); + return new Word.ContentControlCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTag", 1, [tag], true, false, null, false)); }; ContentControlCollection.prototype.getByTitle=function (title) { - return new Word.ContentControlCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTitle", 1, [title], true, false, null)); + return new Word.ContentControlCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTitle", 1, [title], true, false, null, false)); }; ContentControlCollection.prototype.getByTypes=function (types) { - return new Word.ContentControlCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTypes", 1, [types], true, false, null)); + _throwIfApiNotSupported("ContentControlCollection.getByTypes", _defaultApiSetName, "1.3", _hostName); + return new Word.ContentControlCollection(this.context, _createMethodObjectPath(this.context, this, "GetByTypes", 1, [types], true, false, null, false)); }; ContentControlCollection.prototype.getFirst=function () { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + _throwIfApiNotSupported("ContentControlCollection.getFirst", _defaultApiSetName, "1.3", _hostName); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; ContentControlCollection.prototype.getFirstOrNullObject=function () { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("ContentControlCollection.getFirstOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; ContentControlCollection.prototype.getItem=function (index) { return new Word.ContentControl(this.context, _createIndexerObjectPath(this.context, this, [index])); }; ContentControlCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; ContentControlCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12605,7 +14397,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -12618,8 +14410,16 @@ var Word; } }; ContentControlCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ContentControlCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ContentControlCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ContentControlCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; ContentControlCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -12627,7 +14427,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; ContentControlCollection.prototype.track=function () { @@ -12639,15 +14439,16 @@ var Word; return this; }; ContentControlCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return ContentControlCollection; }(OfficeExtension.ClientObject)); Word.ContentControlCollection=ContentControlCollection; + var _typeCustomProperty="CustomProperty"; var CustomProperty=(function (_super) { __extends(CustomProperty, _super); function CustomProperty() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CustomProperty.prototype, "_className", { get: function () { @@ -12658,15 +14459,15 @@ var Word; }); Object.defineProperty(CustomProperty.prototype, "key", { get: function () { - _throwIfNotLoaded("key", this.m_key, "CustomProperty", this._isNull); - return this.m_key; + _throwIfNotLoaded("key", this._K, _typeCustomProperty, this._isNull); + return this._K; }, enumerable: true, configurable: true }); Object.defineProperty(CustomProperty.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "CustomProperty", this._isNull); + _throwIfNotLoaded("type", this.m_type, _typeCustomProperty, this._isNull); return this.m_type; }, enumerable: true, @@ -12679,7 +14480,7 @@ var Word; _throwIfNotLoaded("value", this.m_value, "CustomProperty", this._isNull); return new Date(this.m_value); } - _throwIfNotLoaded("value", this.m_value, "CustomProperty", this._isNull); + _throwIfNotLoaded("value", this.m_value, _typeCustomProperty, this._isNull); return this.m_value; }, set: function (value) { @@ -12691,16 +14492,16 @@ var Word; }); Object.defineProperty(CustomProperty.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "CustomProperty", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeCustomProperty, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(CustomProperty.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "CustomProperty", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeCustomProperty, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -12709,10 +14510,10 @@ var Word; this._recursivelySet(properties, options, ["value"], [], []); }; CustomProperty.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; CustomProperty.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; CustomProperty.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12721,7 +14522,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Key"])) { - this.m_key=obj["Key"]; + this._K=obj["Key"]; } if (!_isUndefined(obj["Type"])) { this.m_type=obj["Type"]; @@ -12730,15 +14531,23 @@ var Word; this.m_value=obj["Value"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } }; CustomProperty.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CustomProperty.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + CustomProperty.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CustomProperty.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; CustomProperty.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -12746,10 +14555,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; CustomProperty.prototype.track=function () { @@ -12761,19 +14570,24 @@ var Word; return this; }; CustomProperty.prototype.toJSON=function () { - return { - "key": this.m_key, + return _toJson(this, { + "key": this._K, "type": this.m_type, - "value": this.m_value - }; + "value": this.m_value, + }, {}); + }; + CustomProperty.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return CustomProperty; }(OfficeExtension.ClientObject)); Word.CustomProperty=CustomProperty; + var _typeCustomPropertyCollection="CustomPropertyCollection"; var CustomPropertyCollection=(function (_super) { __extends(CustomPropertyCollection, _super); function CustomPropertyCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(CustomPropertyCollection.prototype, "_className", { get: function () { @@ -12784,7 +14598,7 @@ var Word; }); Object.defineProperty(CustomPropertyCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "CustomPropertyCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeCustomPropertyCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -12792,20 +14606,20 @@ var Word; }); Object.defineProperty(CustomPropertyCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "CustomPropertyCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeCustomPropertyCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); CustomPropertyCollection.prototype.add=function (key, value) { - return new Word.CustomProperty(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [key, value], false, true, null)); + return new Word.CustomProperty(this.context, _createMethodObjectPath(this.context, this, "Add", 0, [key, value], false, true, null, false)); }; CustomPropertyCollection.prototype.deleteAll=function () { - _createMethodAction(this.context, this, "DeleteAll", 0, []); + _createMethodAction(this.context, this, "DeleteAll", 0, [], false); }; CustomPropertyCollection.prototype.getCount=function () { - var action=_createMethodAction(this.context, this, "GetCount", 0, []); + var action=_createMethodAction(this.context, this, "GetCount", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; @@ -12814,10 +14628,10 @@ var Word; return new Word.CustomProperty(this.context, _createIndexerObjectPath(this.context, this, [key])); }; CustomPropertyCollection.prototype.getItemOrNullObject=function (key) { - return new Word.CustomProperty(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null)); + return new Word.CustomProperty(this.context, _createMethodObjectPath(this.context, this, "GetItemOrNullObject", 1, [key], false, false, null, false)); }; CustomPropertyCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; CustomPropertyCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12826,7 +14640,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -12839,8 +14653,16 @@ var Word; } }; CustomPropertyCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + CustomPropertyCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + CustomPropertyCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + CustomPropertyCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; CustomPropertyCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -12848,7 +14670,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; CustomPropertyCollection.prototype.track=function () { @@ -12860,15 +14682,16 @@ var Word; return this; }; CustomPropertyCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return CustomPropertyCollection; }(OfficeExtension.ClientObject)); Word.CustomPropertyCollection=CustomPropertyCollection; + var _typeDocument="Document"; var Document=(function (_super) { __extends(Document, _super); function Document() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Document.prototype, "_className", { get: function () { @@ -12879,55 +14702,56 @@ var Word; }); Object.defineProperty(Document.prototype, "body", { get: function () { - if (!this.m_body) { - this.m_body=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "Body", false, false)); + if (!this._B) { + this._B=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "Body", false, false, false)); } - return this.m_body; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(Document.prototype, "contentControls", { get: function () { - if (!this.m_contentControls) { - this.m_contentControls=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false)); + if (!this._C) { + this._C=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false, false)); } - return this.m_contentControls; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Document.prototype, "properties", { get: function () { - if (!this.m_properties) { - this.m_properties=new Word.DocumentProperties(this.context, _createPropertyObjectPath(this.context, this, "Properties", false, false)); + _throwIfApiNotSupported("Document.properties", _defaultApiSetName, "1.3", _hostName); + if (!this._P) { + this._P=new Word.DocumentProperties(this.context, _createPropertyObjectPath(this.context, this, "Properties", false, false, false)); } - return this.m_properties; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Document.prototype, "sections", { get: function () { - if (!this.m_sections) { - this.m_sections=new Word.SectionCollection(this.context, _createPropertyObjectPath(this.context, this, "Sections", true, false)); + if (!this._Se) { + this._Se=new Word.SectionCollection(this.context, _createPropertyObjectPath(this.context, this, "Sections", true, false, false)); } - return this.m_sections; + return this._Se; }, enumerable: true, configurable: true }); Object.defineProperty(Document.prototype, "saved", { get: function () { - _throwIfNotLoaded("saved", this.m_saved, "Document", this._isNull); - return this.m_saved; + _throwIfNotLoaded("saved", this._S, _typeDocument, this._isNull); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(Document.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Document", this._isNull); + _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, _typeDocument, this._isNull); return this.m__ReferenceId; }, enumerable: true, @@ -12935,38 +14759,52 @@ var Word; }); Document.prototype.set=function (properties, options) { this._recursivelySet(properties, options, [], ["body", "properties"], [ - "contentControls", - "sections", "contentControls", "sections" ]); }; + Document.prototype.getMetadata=function (propertyGUID) { + var action=_createMethodAction(this.context, this, "GetMetadata", 1, [propertyGUID], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; Document.prototype.getSelection=function () { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetSelection", 1, [], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetSelection", 1, [], false, true, null, false)); + }; + Document.prototype.open=function () { + _throwIfApiNotSupported("Document.open", _defaultApiSetName, "1.3", _hostName); + _createMethodAction(this.context, this, "Open", 1, [], false); }; Document.prototype.save=function () { - _createMethodAction(this.context, this, "Save", 0, []); + _createMethodAction(this.context, this, "Save", 0, [], false); + }; + Document.prototype.setMetadata=function (propertyGUID, propertyValue) { + _createMethodAction(this.context, this, "SetMetadata", 0, [propertyGUID, propertyValue], false); + }; + Document.prototype.setMetadataOnTile=function (tileID, propertyGUID, propertyValue) { + _createMethodAction(this.context, this, "SetMetadataOnTile", 0, [tileID, propertyGUID, propertyValue], false); }; Document.prototype._GetObjectByReferenceId=function (referenceId) { - var action=_createMethodAction(this.context, this, "_GetObjectByReferenceId", 1, [referenceId]); + var action=_createMethodAction(this.context, this, "_GetObjectByReferenceId", 1, [referenceId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Document.prototype._GetObjectTypeNameByReferenceId=function (referenceId) { - var action=_createMethodAction(this.context, this, "_GetObjectTypeNameByReferenceId", 1, [referenceId]); + var action=_createMethodAction(this.context, this, "_GetObjectTypeNameByReferenceId", 1, [referenceId], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Document.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Document.prototype._RemoveAllReferences=function () { - _createMethodAction(this.context, this, "_RemoveAllReferences", 1, []); + _createMethodAction(this.context, this, "_RemoveAllReferences", 1, [], false); }; Document.prototype._RemoveReference=function (referenceId) { - _createMethodAction(this.context, this, "_RemoveReference", 1, [referenceId]); + _createMethodAction(this.context, this, "_RemoveReference", 1, [referenceId], false); }; Document.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -12975,7 +14813,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Saved"])) { - this.m_saved=obj["Saved"]; + this._S=obj["Saved"]; } if (!_isUndefined(obj["_ReferenceId"])) { this.m__ReferenceId=obj["_ReferenceId"]; @@ -12983,8 +14821,16 @@ var Word; _handleNavigationPropertyResults(this, obj, ["body", "Body", "contentControls", "ContentControls", "properties", "Properties", "sections", "Sections"]); }; Document.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Document.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Document.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Document.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; Document.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -13004,19 +14850,177 @@ var Word; return this; }; Document.prototype.toJSON=function () { - return { - "body": this.m_body, - "properties": this.m_properties, - "saved": this.m_saved - }; + return _toJson(this, { + "saved": this._S, + }, { + "body": this._B, + "contentControls": this._C, + "properties": this._P, + "sections": this._Se, + }); + }; + Document.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Document; }(OfficeExtension.ClientObject)); Word.Document=Document; + var _typeDocumentCreated="DocumentCreated"; + var DocumentCreated=(function (_super) { + __extends(DocumentCreated, _super); + function DocumentCreated() { + return _super !==null && _super.apply(this, arguments) || this; + } + Object.defineProperty(DocumentCreated.prototype, "_className", { + get: function () { + return "DocumentCreated"; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentCreated.prototype, "body", { + get: function () { + _throwIfApiNotSupported("DocumentCreated.body", "WordApiHiddenDocument", "1.3", _hostName); + if (!this._B) { + this._B=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "Body", false, false, false)); + } + return this._B; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentCreated.prototype, "contentControls", { + get: function () { + _throwIfApiNotSupported("DocumentCreated.contentControls", "WordApiHiddenDocument", "1.3", _hostName); + if (!this._C) { + this._C=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false, false)); + } + return this._C; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentCreated.prototype, "properties", { + get: function () { + _throwIfApiNotSupported("DocumentCreated.properties", "WordApiHiddenDocument", "1.3", _hostName); + if (!this._P) { + this._P=new Word.DocumentProperties(this.context, _createPropertyObjectPath(this.context, this, "Properties", false, false, false)); + } + return this._P; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentCreated.prototype, "sections", { + get: function () { + _throwIfApiNotSupported("DocumentCreated.sections", "WordApiHiddenDocument", "1.3", _hostName); + if (!this._Se) { + this._Se=new Word.SectionCollection(this.context, _createPropertyObjectPath(this.context, this, "Sections", true, false, false)); + } + return this._Se; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentCreated.prototype, "saved", { + get: function () { + _throwIfNotLoaded("saved", this._S, _typeDocumentCreated, this._isNull); + _throwIfApiNotSupported("DocumentCreated.saved", "WordApiHiddenDocument", "1.3", _hostName); + return this._S; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(DocumentCreated.prototype, "_ReferenceId", { + get: function () { + _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, _typeDocumentCreated, this._isNull); + return this.m__ReferenceId; + }, + enumerable: true, + configurable: true + }); + DocumentCreated.prototype.set=function (properties, options) { + this._recursivelySet(properties, options, [], ["body", "properties"], [ + "contentControls", + "sections" + ]); + }; + DocumentCreated.prototype.open=function () { + _createMethodAction(this.context, this, "Open", 1, [], false); + }; + DocumentCreated.prototype.save=function () { + _throwIfApiNotSupported("DocumentCreated.save", "WordApiHiddenDocument", "1.3", _hostName); + _createMethodAction(this.context, this, "Save", 0, [], false); + }; + DocumentCreated.prototype._KeepReference=function () { + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); + }; + DocumentCreated.prototype._handleResult=function (value) { + _super.prototype._handleResult.call(this, value); + if (_isNullOrUndefined(value)) + return; + var obj=value; + _fixObjectPathIfNecessary(this, obj); + if (!_isUndefined(obj["Saved"])) { + this._S=obj["Saved"]; + } + if (!_isUndefined(obj["_ReferenceId"])) { + this.m__ReferenceId=obj["_ReferenceId"]; + } + _handleNavigationPropertyResults(this, obj, ["body", "Body", "contentControls", "ContentControls", "properties", "Properties", "sections", "Sections"]); + }; + DocumentCreated.prototype.load=function (option) { + return _load(this, option); + }; + DocumentCreated.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + DocumentCreated.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + DocumentCreated.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); + }; + DocumentCreated.prototype._handleIdResult=function (value) { + _super.prototype._handleIdResult.call(this, value); + if (_isNullOrUndefined(value)) { + return; + } + if (!_isUndefined(value["_ReferenceId"])) { + this.m__ReferenceId=value["_ReferenceId"]; + } + }; + DocumentCreated.prototype.track=function () { + this.context.trackedObjects.add(this); + return this; + }; + DocumentCreated.prototype.untrack=function () { + this.context.trackedObjects.remove(this); + return this; + }; + DocumentCreated.prototype.toJSON=function () { + return _toJson(this, { + "saved": this._S, + }, { + "body": this._B, + "contentControls": this._C, + "properties": this._P, + "sections": this._Se, + }); + }; + DocumentCreated.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; + }; + return DocumentCreated; + }(OfficeExtension.ClientObject)); + Word.DocumentCreated=DocumentCreated; + var _typeDocumentProperties="DocumentProperties"; var DocumentProperties=(function (_super) { __extends(DocumentProperties, _super); function DocumentProperties() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(DocumentProperties.prototype, "_className", { get: function () { @@ -13027,29 +15031,29 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "customProperties", { get: function () { - if (!this.m_customProperties) { - this.m_customProperties=new Word.CustomPropertyCollection(this.context, _createPropertyObjectPath(this.context, this, "CustomProperties", true, false)); + if (!this._Cu) { + this._Cu=new Word.CustomPropertyCollection(this.context, _createPropertyObjectPath(this.context, this, "CustomProperties", true, false, false)); } - return this.m_customProperties; + return this._Cu; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "applicationName", { get: function () { - _throwIfNotLoaded("applicationName", this.m_applicationName, "DocumentProperties", this._isNull); - return this.m_applicationName; + _throwIfNotLoaded("applicationName", this._A, _typeDocumentProperties, this._isNull); + return this._A; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "author", { get: function () { - _throwIfNotLoaded("author", this.m_author, "DocumentProperties", this._isNull); - return this.m_author; + _throwIfNotLoaded("author", this._Au, _typeDocumentProperties, this._isNull); + return this._Au; }, set: function (value) { - this.m_author=value; + this._Au=value; _createSetPropertyAction(this.context, this, "Author", value); }, enumerable: true, @@ -13057,11 +15061,11 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "category", { get: function () { - _throwIfNotLoaded("category", this.m_category, "DocumentProperties", this._isNull); - return this.m_category; + _throwIfNotLoaded("category", this._C, _typeDocumentProperties, this._isNull); + return this._C; }, set: function (value) { - this.m_category=value; + this._C=value; _createSetPropertyAction(this.context, this, "Category", value); }, enumerable: true, @@ -13069,11 +15073,11 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "comments", { get: function () { - _throwIfNotLoaded("comments", this.m_comments, "DocumentProperties", this._isNull); - return this.m_comments; + _throwIfNotLoaded("comments", this._Co, _typeDocumentProperties, this._isNull); + return this._Co; }, set: function (value) { - this.m_comments=value; + this._Co=value; _createSetPropertyAction(this.context, this, "Comments", value); }, enumerable: true, @@ -13081,11 +15085,11 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "company", { get: function () { - _throwIfNotLoaded("company", this.m_company, "DocumentProperties", this._isNull); - return this.m_company; + _throwIfNotLoaded("company", this._Com, _typeDocumentProperties, this._isNull); + return this._Com; }, set: function (value) { - this.m_company=value; + this._Com=value; _createSetPropertyAction(this.context, this, "Company", value); }, enumerable: true, @@ -13093,19 +15097,19 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "creationDate", { get: function () { - _throwIfNotLoaded("creationDate", this.m_creationDate, "DocumentProperties", this._isNull); - return this.m_creationDate; + _throwIfNotLoaded("creationDate", this._Cr, _typeDocumentProperties, this._isNull); + return this._Cr; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "format", { get: function () { - _throwIfNotLoaded("format", this.m_format, "DocumentProperties", this._isNull); - return this.m_format; + _throwIfNotLoaded("format", this._F, _typeDocumentProperties, this._isNull); + return this._F; }, set: function (value) { - this.m_format=value; + this._F=value; _createSetPropertyAction(this.context, this, "Format", value); }, enumerable: true, @@ -13113,11 +15117,11 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "keywords", { get: function () { - _throwIfNotLoaded("keywords", this.m_keywords, "DocumentProperties", this._isNull); - return this.m_keywords; + _throwIfNotLoaded("keywords", this._K, _typeDocumentProperties, this._isNull); + return this._K; }, set: function (value) { - this.m_keywords=value; + this._K=value; _createSetPropertyAction(this.context, this, "Keywords", value); }, enumerable: true, @@ -13125,35 +15129,35 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "lastAuthor", { get: function () { - _throwIfNotLoaded("lastAuthor", this.m_lastAuthor, "DocumentProperties", this._isNull); - return this.m_lastAuthor; + _throwIfNotLoaded("lastAuthor", this._L, _typeDocumentProperties, this._isNull); + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "lastPrintDate", { get: function () { - _throwIfNotLoaded("lastPrintDate", this.m_lastPrintDate, "DocumentProperties", this._isNull); - return this.m_lastPrintDate; + _throwIfNotLoaded("lastPrintDate", this._La, _typeDocumentProperties, this._isNull); + return this._La; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "lastSaveTime", { get: function () { - _throwIfNotLoaded("lastSaveTime", this.m_lastSaveTime, "DocumentProperties", this._isNull); - return this.m_lastSaveTime; + _throwIfNotLoaded("lastSaveTime", this._Las, _typeDocumentProperties, this._isNull); + return this._Las; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "manager", { get: function () { - _throwIfNotLoaded("manager", this.m_manager, "DocumentProperties", this._isNull); - return this.m_manager; + _throwIfNotLoaded("manager", this._M, _typeDocumentProperties, this._isNull); + return this._M; }, set: function (value) { - this.m_manager=value; + this._M=value; _createSetPropertyAction(this.context, this, "Manager", value); }, enumerable: true, @@ -13161,27 +15165,27 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "revisionNumber", { get: function () { - _throwIfNotLoaded("revisionNumber", this.m_revisionNumber, "DocumentProperties", this._isNull); - return this.m_revisionNumber; + _throwIfNotLoaded("revisionNumber", this._R, _typeDocumentProperties, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "security", { get: function () { - _throwIfNotLoaded("security", this.m_security, "DocumentProperties", this._isNull); - return this.m_security; + _throwIfNotLoaded("security", this._S, _typeDocumentProperties, this._isNull); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "subject", { get: function () { - _throwIfNotLoaded("subject", this.m_subject, "DocumentProperties", this._isNull); - return this.m_subject; + _throwIfNotLoaded("subject", this._Su, _typeDocumentProperties, this._isNull); + return this._Su; }, set: function (value) { - this.m_subject=value; + this._Su=value; _createSetPropertyAction(this.context, this, "Subject", value); }, enumerable: true, @@ -13189,19 +15193,19 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "template", { get: function () { - _throwIfNotLoaded("template", this.m_template, "DocumentProperties", this._isNull); - return this.m_template; + _throwIfNotLoaded("template", this._T, _typeDocumentProperties, this._isNull); + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentProperties.prototype, "title", { get: function () { - _throwIfNotLoaded("title", this.m_title, "DocumentProperties", this._isNull); - return this.m_title; + _throwIfNotLoaded("title", this._Ti, _typeDocumentProperties, this._isNull); + return this._Ti; }, set: function (value) { - this.m_title=value; + this._Ti=value; _createSetPropertyAction(this.context, this, "Title", value); }, enumerable: true, @@ -13209,20 +15213,19 @@ var Word; }); Object.defineProperty(DocumentProperties.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "DocumentProperties", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeDocumentProperties, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); DocumentProperties.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["title", "subject", "author", "keywords", "comments", "category", "format", "manager", "company"], [], [ - "customProperties", "customProperties" ]); }; DocumentProperties.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; DocumentProperties.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13231,64 +15234,72 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["ApplicationName"])) { - this.m_applicationName=obj["ApplicationName"]; + this._A=obj["ApplicationName"]; } if (!_isUndefined(obj["Author"])) { - this.m_author=obj["Author"]; + this._Au=obj["Author"]; } if (!_isUndefined(obj["Category"])) { - this.m_category=obj["Category"]; + this._C=obj["Category"]; } if (!_isUndefined(obj["Comments"])) { - this.m_comments=obj["Comments"]; + this._Co=obj["Comments"]; } if (!_isUndefined(obj["Company"])) { - this.m_company=obj["Company"]; + this._Com=obj["Company"]; } if (!_isUndefined(obj["CreationDate"])) { - this.m_creationDate=_adjustToDateTime(obj["CreationDate"]); + this._Cr=_adjustToDateTime(obj["CreationDate"]); } if (!_isUndefined(obj["Format"])) { - this.m_format=obj["Format"]; + this._F=obj["Format"]; } if (!_isUndefined(obj["Keywords"])) { - this.m_keywords=obj["Keywords"]; + this._K=obj["Keywords"]; } if (!_isUndefined(obj["LastAuthor"])) { - this.m_lastAuthor=obj["LastAuthor"]; + this._L=obj["LastAuthor"]; } if (!_isUndefined(obj["LastPrintDate"])) { - this.m_lastPrintDate=_adjustToDateTime(obj["LastPrintDate"]); + this._La=_adjustToDateTime(obj["LastPrintDate"]); } if (!_isUndefined(obj["LastSaveTime"])) { - this.m_lastSaveTime=_adjustToDateTime(obj["LastSaveTime"]); + this._Las=_adjustToDateTime(obj["LastSaveTime"]); } if (!_isUndefined(obj["Manager"])) { - this.m_manager=obj["Manager"]; + this._M=obj["Manager"]; } if (!_isUndefined(obj["RevisionNumber"])) { - this.m_revisionNumber=obj["RevisionNumber"]; + this._R=obj["RevisionNumber"]; } if (!_isUndefined(obj["Security"])) { - this.m_security=obj["Security"]; + this._S=obj["Security"]; } if (!_isUndefined(obj["Subject"])) { - this.m_subject=obj["Subject"]; + this._Su=obj["Subject"]; } if (!_isUndefined(obj["Template"])) { - this.m_template=obj["Template"]; + this._T=obj["Template"]; } if (!_isUndefined(obj["Title"])) { - this.m_title=obj["Title"]; + this._Ti=obj["Title"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["customProperties", "CustomProperties"]); }; DocumentProperties.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + DocumentProperties.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + DocumentProperties.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + DocumentProperties.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; DocumentProperties.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -13296,7 +15307,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; DocumentProperties.prototype.track=function () { @@ -13308,33 +15319,40 @@ var Word; return this; }; DocumentProperties.prototype.toJSON=function () { - return { - "applicationName": this.m_applicationName, - "author": this.m_author, - "category": this.m_category, - "comments": this.m_comments, - "company": this.m_company, - "creationDate": this.m_creationDate, - "format": this.m_format, - "keywords": this.m_keywords, - "lastAuthor": this.m_lastAuthor, - "lastPrintDate": this.m_lastPrintDate, - "lastSaveTime": this.m_lastSaveTime, - "manager": this.m_manager, - "revisionNumber": this.m_revisionNumber, - "security": this.m_security, - "subject": this.m_subject, - "template": this.m_template, - "title": this.m_title - }; + return _toJson(this, { + "applicationName": this._A, + "author": this._Au, + "category": this._C, + "comments": this._Co, + "company": this._Com, + "creationDate": this._Cr, + "format": this._F, + "keywords": this._K, + "lastAuthor": this._L, + "lastPrintDate": this._La, + "lastSaveTime": this._Las, + "manager": this._M, + "revisionNumber": this._R, + "security": this._S, + "subject": this._Su, + "template": this._T, + "title": this._Ti, + }, { + "customProperties": this._Cu, + }); + }; + DocumentProperties.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return DocumentProperties; }(OfficeExtension.ClientObject)); Word.DocumentProperties=DocumentProperties; + var _typeFont="Font"; var Font=(function (_super) { __extends(Font, _super); function Font() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Font.prototype, "_className", { get: function () { @@ -13345,11 +15363,11 @@ var Word; }); Object.defineProperty(Font.prototype, "bold", { get: function () { - _throwIfNotLoaded("bold", this.m_bold, "Font", this._isNull); - return this.m_bold; + _throwIfNotLoaded("bold", this._B, _typeFont, this._isNull); + return this._B; }, set: function (value) { - this.m_bold=value; + this._B=value; _createSetPropertyAction(this.context, this, "Bold", value); }, enumerable: true, @@ -13357,11 +15375,11 @@ var Word; }); Object.defineProperty(Font.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "Font", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeFont, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -13369,11 +15387,11 @@ var Word; }); Object.defineProperty(Font.prototype, "doubleStrikeThrough", { get: function () { - _throwIfNotLoaded("doubleStrikeThrough", this.m_doubleStrikeThrough, "Font", this._isNull); - return this.m_doubleStrikeThrough; + _throwIfNotLoaded("doubleStrikeThrough", this._D, _typeFont, this._isNull); + return this._D; }, set: function (value) { - this.m_doubleStrikeThrough=value; + this._D=value; _createSetPropertyAction(this.context, this, "DoubleStrikeThrough", value); }, enumerable: true, @@ -13381,11 +15399,11 @@ var Word; }); Object.defineProperty(Font.prototype, "highlightColor", { get: function () { - _throwIfNotLoaded("highlightColor", this.m_highlightColor, "Font", this._isNull); - return this.m_highlightColor; + _throwIfNotLoaded("highlightColor", this._H, _typeFont, this._isNull); + return this._H; }, set: function (value) { - this.m_highlightColor=value; + this._H=value; _createSetPropertyAction(this.context, this, "HighlightColor", value); }, enumerable: true, @@ -13393,11 +15411,11 @@ var Word; }); Object.defineProperty(Font.prototype, "italic", { get: function () { - _throwIfNotLoaded("italic", this.m_italic, "Font", this._isNull); - return this.m_italic; + _throwIfNotLoaded("italic", this._I, _typeFont, this._isNull); + return this._I; }, set: function (value) { - this.m_italic=value; + this._I=value; _createSetPropertyAction(this.context, this, "Italic", value); }, enumerable: true, @@ -13405,11 +15423,11 @@ var Word; }); Object.defineProperty(Font.prototype, "name", { get: function () { - _throwIfNotLoaded("name", this.m_name, "Font", this._isNull); - return this.m_name; + _throwIfNotLoaded("name", this._N, _typeFont, this._isNull); + return this._N; }, set: function (value) { - this.m_name=value; + this._N=value; _createSetPropertyAction(this.context, this, "Name", value); }, enumerable: true, @@ -13417,11 +15435,11 @@ var Word; }); Object.defineProperty(Font.prototype, "size", { get: function () { - _throwIfNotLoaded("size", this.m_size, "Font", this._isNull); - return this.m_size; + _throwIfNotLoaded("size", this._S, _typeFont, this._isNull); + return this._S; }, set: function (value) { - this.m_size=value; + this._S=value; _createSetPropertyAction(this.context, this, "Size", value); }, enumerable: true, @@ -13429,11 +15447,11 @@ var Word; }); Object.defineProperty(Font.prototype, "strikeThrough", { get: function () { - _throwIfNotLoaded("strikeThrough", this.m_strikeThrough, "Font", this._isNull); - return this.m_strikeThrough; + _throwIfNotLoaded("strikeThrough", this._St, _typeFont, this._isNull); + return this._St; }, set: function (value) { - this.m_strikeThrough=value; + this._St=value; _createSetPropertyAction(this.context, this, "StrikeThrough", value); }, enumerable: true, @@ -13441,11 +15459,11 @@ var Word; }); Object.defineProperty(Font.prototype, "subscript", { get: function () { - _throwIfNotLoaded("subscript", this.m_subscript, "Font", this._isNull); - return this.m_subscript; + _throwIfNotLoaded("subscript", this._Su, _typeFont, this._isNull); + return this._Su; }, set: function (value) { - this.m_subscript=value; + this._Su=value; _createSetPropertyAction(this.context, this, "Subscript", value); }, enumerable: true, @@ -13453,11 +15471,11 @@ var Word; }); Object.defineProperty(Font.prototype, "superscript", { get: function () { - _throwIfNotLoaded("superscript", this.m_superscript, "Font", this._isNull); - return this.m_superscript; + _throwIfNotLoaded("superscript", this._Sup, _typeFont, this._isNull); + return this._Sup; }, set: function (value) { - this.m_superscript=value; + this._Sup=value; _createSetPropertyAction(this.context, this, "Superscript", value); }, enumerable: true, @@ -13465,11 +15483,11 @@ var Word; }); Object.defineProperty(Font.prototype, "underline", { get: function () { - _throwIfNotLoaded("underline", this.m_underline, "Font", this._isNull); - return this.m_underline; + _throwIfNotLoaded("underline", this._U, _typeFont, this._isNull); + return this._U; }, set: function (value) { - this.m_underline=value; + this._U=value; _createSetPropertyAction(this.context, this, "Underline", value); }, enumerable: true, @@ -13477,8 +15495,8 @@ var Word; }); Object.defineProperty(Font.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Font", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeFont, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -13487,7 +15505,7 @@ var Word; this._recursivelySet(properties, options, ["name", "size", "bold", "italic", "color", "underline", "subscript", "superscript", "strikeThrough", "doubleStrikeThrough", "highlightColor"], [], []); }; Font.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Font.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13496,45 +15514,53 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Bold"])) { - this.m_bold=obj["Bold"]; + this._B=obj["Bold"]; } if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["DoubleStrikeThrough"])) { - this.m_doubleStrikeThrough=obj["DoubleStrikeThrough"]; + this._D=obj["DoubleStrikeThrough"]; } if (!_isUndefined(obj["HighlightColor"])) { - this.m_highlightColor=obj["HighlightColor"]; + this._H=obj["HighlightColor"]; } if (!_isUndefined(obj["Italic"])) { - this.m_italic=obj["Italic"]; + this._I=obj["Italic"]; } if (!_isUndefined(obj["Name"])) { - this.m_name=obj["Name"]; + this._N=obj["Name"]; } if (!_isUndefined(obj["Size"])) { - this.m_size=obj["Size"]; + this._S=obj["Size"]; } if (!_isUndefined(obj["StrikeThrough"])) { - this.m_strikeThrough=obj["StrikeThrough"]; + this._St=obj["StrikeThrough"]; } if (!_isUndefined(obj["Subscript"])) { - this.m_subscript=obj["Subscript"]; + this._Su=obj["Subscript"]; } if (!_isUndefined(obj["Superscript"])) { - this.m_superscript=obj["Superscript"]; + this._Sup=obj["Superscript"]; } if (!_isUndefined(obj["Underline"])) { - this.m_underline=obj["Underline"]; + this._U=obj["Underline"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } }; Font.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Font.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Font.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Font.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; Font.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -13542,7 +15568,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; Font.prototype.track=function () { @@ -13554,27 +15580,32 @@ var Word; return this; }; Font.prototype.toJSON=function () { - return { - "bold": this.m_bold, - "color": this.m_color, - "doubleStrikeThrough": this.m_doubleStrikeThrough, - "highlightColor": this.m_highlightColor, - "italic": this.m_italic, - "name": this.m_name, - "size": this.m_size, - "strikeThrough": this.m_strikeThrough, - "subscript": this.m_subscript, - "superscript": this.m_superscript, - "underline": this.m_underline - }; + return _toJson(this, { + "bold": this._B, + "color": this._C, + "doubleStrikeThrough": this._D, + "highlightColor": this._H, + "italic": this._I, + "name": this._N, + "size": this._S, + "strikeThrough": this._St, + "subscript": this._Su, + "superscript": this._Sup, + "underline": this._U, + }, {}); + }; + Font.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Font; }(OfficeExtension.ClientObject)); Word.Font=Font; + var _typeInlinePicture="InlinePicture"; var InlinePicture=(function (_super) { __extends(InlinePicture, _super); function InlinePicture() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(InlinePicture.prototype, "_className", { get: function () { @@ -13585,81 +15616,87 @@ var Word; }); Object.defineProperty(InlinePicture.prototype, "paragraph", { get: function () { - if (!this.m_paragraph) { - this.m_paragraph=new Word.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false)); + _throwIfApiNotSupported("InlinePicture.paragraph", _defaultApiSetName, "1.2", _hostName); + if (!this._P) { + this._P=new Word.Paragraph(this.context, _createPropertyObjectPath(this.context, this, "Paragraph", false, false, false)); } - return this.m_paragraph; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "parentContentControl", { get: function () { - if (!this.m_parentContentControl) { - this.m_parentContentControl=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false)); + if (!this._Pa) { + this._Pa=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false, false)); } - return this.m_parentContentControl; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "parentContentControlOrNullObject", { get: function () { - if (!this.m_parentContentControlOrNullObject) { - this.m_parentContentControlOrNullObject=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false)); + _throwIfApiNotSupported("InlinePicture.parentContentControlOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Par) { + this._Par=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false, false)); } - return this.m_parentContentControlOrNullObject; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + _throwIfApiNotSupported("InlinePicture.parentTable", _defaultApiSetName, "1.3", _hostName); + if (!this._Pare) { + this._Pare=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._Pare; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "parentTableCell", { get: function () { - if (!this.m_parentTableCell) { - this.m_parentTableCell=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false)); + _throwIfApiNotSupported("InlinePicture.parentTableCell", _defaultApiSetName, "1.3", _hostName); + if (!this._Paren) { + this._Paren=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false, false)); } - return this.m_parentTableCell; + return this._Paren; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "parentTableCellOrNullObject", { get: function () { - if (!this.m_parentTableCellOrNullObject) { - this.m_parentTableCellOrNullObject=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false)); + _throwIfApiNotSupported("InlinePicture.parentTableCellOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Parent) { + this._Parent=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false, false)); } - return this.m_parentTableCellOrNullObject; + return this._Parent; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "parentTableOrNullObject", { get: function () { - if (!this.m_parentTableOrNullObject) { - this.m_parentTableOrNullObject=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false)); + _throwIfApiNotSupported("InlinePicture.parentTableOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ParentT) { + this._ParentT=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false, false)); } - return this.m_parentTableOrNullObject; + return this._ParentT; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "altTextDescription", { get: function () { - _throwIfNotLoaded("altTextDescription", this.m_altTextDescription, "InlinePicture", this._isNull); - return this.m_altTextDescription; + _throwIfNotLoaded("altTextDescription", this._A, _typeInlinePicture, this._isNull); + return this._A; }, set: function (value) { - this.m_altTextDescription=value; + this._A=value; _createSetPropertyAction(this.context, this, "AltTextDescription", value); }, enumerable: true, @@ -13667,11 +15704,11 @@ var Word; }); Object.defineProperty(InlinePicture.prototype, "altTextTitle", { get: function () { - _throwIfNotLoaded("altTextTitle", this.m_altTextTitle, "InlinePicture", this._isNull); - return this.m_altTextTitle; + _throwIfNotLoaded("altTextTitle", this._Al, _typeInlinePicture, this._isNull); + return this._Al; }, set: function (value) { - this.m_altTextTitle=value; + this._Al=value; _createSetPropertyAction(this.context, this, "AltTextTitle", value); }, enumerable: true, @@ -13679,11 +15716,11 @@ var Word; }); Object.defineProperty(InlinePicture.prototype, "height", { get: function () { - _throwIfNotLoaded("height", this.m_height, "InlinePicture", this._isNull); - return this.m_height; + _throwIfNotLoaded("height", this._H, _typeInlinePicture, this._isNull); + return this._H; }, set: function (value) { - this.m_height=value; + this._H=value; _createSetPropertyAction(this.context, this, "Height", value); }, enumerable: true, @@ -13691,11 +15728,11 @@ var Word; }); Object.defineProperty(InlinePicture.prototype, "hyperlink", { get: function () { - _throwIfNotLoaded("hyperlink", this.m_hyperlink, "InlinePicture", this._isNull); - return this.m_hyperlink; + _throwIfNotLoaded("hyperlink", this._Hy, _typeInlinePicture, this._isNull); + return this._Hy; }, set: function (value) { - this.m_hyperlink=value; + this._Hy=value; _createSetPropertyAction(this.context, this, "Hyperlink", value); }, enumerable: true, @@ -13703,11 +15740,11 @@ var Word; }); Object.defineProperty(InlinePicture.prototype, "lockAspectRatio", { get: function () { - _throwIfNotLoaded("lockAspectRatio", this.m_lockAspectRatio, "InlinePicture", this._isNull); - return this.m_lockAspectRatio; + _throwIfNotLoaded("lockAspectRatio", this._L, _typeInlinePicture, this._isNull); + return this._L; }, set: function (value) { - this.m_lockAspectRatio=value; + this._L=value; _createSetPropertyAction(this.context, this, "LockAspectRatio", value); }, enumerable: true, @@ -13715,11 +15752,11 @@ var Word; }); Object.defineProperty(InlinePicture.prototype, "width", { get: function () { - _throwIfNotLoaded("width", this.m_width, "InlinePicture", this._isNull); - return this.m_width; + _throwIfNotLoaded("width", this._W, _typeInlinePicture, this._isNull); + return this._W; }, set: function (value) { - this.m_width=value; + this._W=value; _createSetPropertyAction(this.context, this, "Width", value); }, enumerable: true, @@ -13727,29 +15764,22 @@ var Word; }); Object.defineProperty(InlinePicture.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "InlinePicture", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeInlinePicture, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(InlinePicture.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InlinePicture", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInlinePicture, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InlinePicture.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["altTextDescription", "altTextTitle", "height", "hyperlink", "lockAspectRatio", "width"], [], [ - "paragraph", - "parentContentControl", - "parentContentControlOrNullObject", - "parentTable", - "parentTableCell", - "parentTableCellOrNullObject", - "parentTableOrNullObject", "paragraph", "parentContentControl", "parentContentControlOrNullObject", @@ -13760,52 +15790,64 @@ var Word; ]); }; InlinePicture.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _throwIfApiNotSupported("InlinePicture.delete", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; InlinePicture.prototype.getBase64ImageSrc=function () { - var action=_createMethodAction(this.context, this, "GetBase64ImageSrc", 1, []); + var action=_createMethodAction(this.context, this, "GetBase64ImageSrc", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; InlinePicture.prototype.getNext=function () { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null)); + _throwIfApiNotSupported("InlinePicture.getNext", _defaultApiSetName, "1.3", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null, false)); }; InlinePicture.prototype.getNextOrNullObject=function () { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("InlinePicture.getNextOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null, false)); }; InlinePicture.prototype.getRange=function (rangeLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null)); + _throwIfApiNotSupported("InlinePicture.getRange", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null, false)); }; InlinePicture.prototype.insertBreak=function (breakType, insertLocation) { - _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation]); + _throwIfApiNotSupported("InlinePicture.insertBreak", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation], false); }; InlinePicture.prototype.insertContentControl=function () { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null)); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null, false)); }; InlinePicture.prototype.insertFileFromBase64=function (base64File, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null)); + _throwIfApiNotSupported("InlinePicture.insertFileFromBase64", _defaultApiSetName, "1.2", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null, false)); }; InlinePicture.prototype.insertHtml=function (html, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null)); + _throwIfApiNotSupported("InlinePicture.insertHtml", _defaultApiSetName, "1.2", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null, false)); }; InlinePicture.prototype.insertInlinePictureFromBase64=function (base64EncodedImage, insertLocation) { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null)); + _throwIfApiNotSupported("InlinePicture.insertInlinePictureFromBase64", _defaultApiSetName, "1.2", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null, false)); }; InlinePicture.prototype.insertOoxml=function (ooxml, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null)); + _throwIfApiNotSupported("InlinePicture.insertOoxml", _defaultApiSetName, "1.2", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null, false)); }; InlinePicture.prototype.insertParagraph=function (paragraphText, insertLocation) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null)); + _throwIfApiNotSupported("InlinePicture.insertParagraph", _defaultApiSetName, "1.2", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null, false)); }; InlinePicture.prototype.insertText=function (text, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null)); + _throwIfApiNotSupported("InlinePicture.insertText", _defaultApiSetName, "1.2", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null, false)); }; InlinePicture.prototype.select=function (selectionMode) { - _createMethodAction(this.context, this, "Select", 1, [selectionMode]); + _throwIfApiNotSupported("InlinePicture.select", _defaultApiSetName, "1.2", _hostName); + _createMethodAction(this.context, this, "Select", 1, [selectionMode], false); }; InlinePicture.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InlinePicture.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13814,34 +15856,42 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["AltTextDescription"])) { - this.m_altTextDescription=obj["AltTextDescription"]; + this._A=obj["AltTextDescription"]; } if (!_isUndefined(obj["AltTextTitle"])) { - this.m_altTextTitle=obj["AltTextTitle"]; + this._Al=obj["AltTextTitle"]; } if (!_isUndefined(obj["Height"])) { - this.m_height=obj["Height"]; + this._H=obj["Height"]; } if (!_isUndefined(obj["Hyperlink"])) { - this.m_hyperlink=obj["Hyperlink"]; + this._Hy=obj["Hyperlink"]; } if (!_isUndefined(obj["LockAspectRatio"])) { - this.m_lockAspectRatio=obj["LockAspectRatio"]; + this._L=obj["LockAspectRatio"]; } if (!_isUndefined(obj["Width"])) { - this.m_width=obj["Width"]; + this._W=obj["Width"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["paragraph", "Paragraph", "parentContentControl", "ParentContentControl", "parentContentControlOrNullObject", "ParentContentControlOrNullObject", "parentTable", "ParentTable", "parentTableCell", "ParentTableCell", "parentTableCellOrNullObject", "ParentTableCellOrNullObject", "parentTableOrNullObject", "ParentTableOrNullObject"]); }; InlinePicture.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + InlinePicture.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + InlinePicture.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + InlinePicture.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; InlinePicture.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -13849,10 +15899,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; InlinePicture.prototype.track=function () { @@ -13864,22 +15914,27 @@ var Word; return this; }; InlinePicture.prototype.toJSON=function () { - return { - "altTextDescription": this.m_altTextDescription, - "altTextTitle": this.m_altTextTitle, - "height": this.m_height, - "hyperlink": this.m_hyperlink, - "lockAspectRatio": this.m_lockAspectRatio, - "width": this.m_width - }; + return _toJson(this, { + "altTextDescription": this._A, + "altTextTitle": this._Al, + "height": this._H, + "hyperlink": this._Hy, + "lockAspectRatio": this._L, + "width": this._W, + }, {}); + }; + InlinePicture.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return InlinePicture; }(OfficeExtension.ClientObject)); Word.InlinePicture=InlinePicture; + var _typeInlinePictureCollection="InlinePictureCollection"; var InlinePictureCollection=(function (_super) { __extends(InlinePictureCollection, _super); function InlinePictureCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(InlinePictureCollection.prototype, "_className", { get: function () { @@ -13890,7 +15945,7 @@ var Word; }); Object.defineProperty(InlinePictureCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "InlinePictureCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeInlinePictureCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -13898,23 +15953,25 @@ var Word; }); Object.defineProperty(InlinePictureCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "InlinePictureCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeInlinePictureCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); InlinePictureCollection.prototype.getFirst=function () { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + _throwIfApiNotSupported("InlinePictureCollection.getFirst", _defaultApiSetName, "1.3", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; InlinePictureCollection.prototype.getFirstOrNullObject=function () { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("InlinePictureCollection.getFirstOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; InlinePictureCollection.prototype._GetItem=function (index) { return new Word.InlinePicture(this.context, _createIndexerObjectPath(this.context, this, [index])); }; InlinePictureCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; InlinePictureCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -13923,7 +15980,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -13936,8 +15993,16 @@ var Word; } }; InlinePictureCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + InlinePictureCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + InlinePictureCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + InlinePictureCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; InlinePictureCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -13945,7 +16010,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; InlinePictureCollection.prototype.track=function () { @@ -13957,15 +16022,16 @@ var Word; return this; }; InlinePictureCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return InlinePictureCollection; }(OfficeExtension.ClientObject)); Word.InlinePictureCollection=InlinePictureCollection; + var _typeList="List"; var List=(function (_super) { __extends(List, _super); function List() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(List.prototype, "_className", { get: function () { @@ -13976,75 +16042,75 @@ var Word; }); Object.defineProperty(List.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._P) { + this._P=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(List.prototype, "id", { get: function () { - _throwIfNotLoaded("id", this.m_id, "List", this._isNull); - return this.m_id; + _throwIfNotLoaded("id", this._I, _typeList, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(List.prototype, "levelExistences", { get: function () { - _throwIfNotLoaded("levelExistences", this.m_levelExistences, "List", this._isNull); - return this.m_levelExistences; + _throwIfNotLoaded("levelExistences", this._L, _typeList, this._isNull); + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(List.prototype, "levelTypes", { get: function () { - _throwIfNotLoaded("levelTypes", this.m_levelTypes, "List", this._isNull); - return this.m_levelTypes; + _throwIfNotLoaded("levelTypes", this._Le, _typeList, this._isNull); + return this._Le; }, enumerable: true, configurable: true }); Object.defineProperty(List.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "List", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeList, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); List.prototype.getLevelParagraphs=function (level) { - return new Word.ParagraphCollection(this.context, _createMethodObjectPath(this.context, this, "GetLevelParagraphs", 1, [level], true, false, null)); + return new Word.ParagraphCollection(this.context, _createMethodObjectPath(this.context, this, "GetLevelParagraphs", 1, [level], true, false, null, false)); }; List.prototype.getLevelString=function (level) { - var action=_createMethodAction(this.context, this, "GetLevelString", 1, [level]); + var action=_createMethodAction(this.context, this, "GetLevelString", 1, [level], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; List.prototype.insertParagraph=function (paragraphText, insertLocation) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null, false)); }; List.prototype.setLevelAlignment=function (level, alignment) { - _createMethodAction(this.context, this, "SetLevelAlignment", 0, [level, alignment]); + _createMethodAction(this.context, this, "SetLevelAlignment", 0, [level, alignment], false); }; List.prototype.setLevelBullet=function (level, listBullet, charCode, fontName) { - _createMethodAction(this.context, this, "SetLevelBullet", 0, [level, listBullet, charCode, fontName]); + _createMethodAction(this.context, this, "SetLevelBullet", 0, [level, listBullet, charCode, fontName], false); }; List.prototype.setLevelIndents=function (level, textIndent, bulletNumberPictureIndent) { - _createMethodAction(this.context, this, "SetLevelIndents", 0, [level, textIndent, bulletNumberPictureIndent]); + _createMethodAction(this.context, this, "SetLevelIndents", 0, [level, textIndent, bulletNumberPictureIndent], false); }; List.prototype.setLevelNumbering=function (level, listNumbering, formatString) { - _createMethodAction(this.context, this, "SetLevelNumbering", 0, [level, listNumbering, formatString]); + _createMethodAction(this.context, this, "SetLevelNumbering", 0, [level, listNumbering, formatString], false); }; List.prototype.setLevelStartingNumber=function (level, startingNumber) { - _createMethodAction(this.context, this, "SetLevelStartingNumber", 0, [level, startingNumber]); + _createMethodAction(this.context, this, "SetLevelStartingNumber", 0, [level, startingNumber], false); }; List.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; List.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14053,22 +16119,30 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Id"])) { - this.m_id=obj["Id"]; + this._I=obj["Id"]; } if (!_isUndefined(obj["LevelExistences"])) { - this.m_levelExistences=obj["LevelExistences"]; + this._L=obj["LevelExistences"]; } if (!_isUndefined(obj["LevelTypes"])) { - this.m_levelTypes=obj["LevelTypes"]; + this._Le=obj["LevelTypes"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["paragraphs", "Paragraphs"]); }; List.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + List.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + List.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + List.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; List.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -14076,10 +16150,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["Id"])) { - this.m_id=value["Id"]; + this._I=value["Id"]; } }; List.prototype.track=function () { @@ -14091,19 +16165,26 @@ var Word; return this; }; List.prototype.toJSON=function () { - return { - "id": this.m_id, - "levelExistences": this.m_levelExistences, - "levelTypes": this.m_levelTypes - }; + return _toJson(this, { + "id": this._I, + "levelExistences": this._L, + "levelTypes": this._Le, + }, { + "paragraphs": this._P, + }); + }; + List.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return List; }(OfficeExtension.ClientObject)); Word.List=List; + var _typeListCollection="ListCollection"; var ListCollection=(function (_super) { __extends(ListCollection, _super); function ListCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ListCollection.prototype, "_className", { get: function () { @@ -14114,7 +16195,7 @@ var Word; }); Object.defineProperty(ListCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ListCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeListCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14122,29 +16203,29 @@ var Word; }); Object.defineProperty(ListCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "ListCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeListCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); ListCollection.prototype.getById=function (id) { - return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetById", 1, [id], false, false, null)); + return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetById", 1, [id], false, false, null, false)); }; ListCollection.prototype.getByIdOrNullObject=function (id) { - return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetByIdOrNullObject", 1, [id], false, false, null)); + return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetByIdOrNullObject", 1, [id], false, false, null, false)); }; ListCollection.prototype.getFirst=function () { - return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; ListCollection.prototype.getFirstOrNullObject=function () { - return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + return new Word.List(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; ListCollection.prototype.getItem=function (index) { return new Word.List(this.context, _createIndexerObjectPath(this.context, this, [index])); }; ListCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; ListCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14153,7 +16234,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14166,8 +16247,16 @@ var Word; } }; ListCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ListCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ListCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ListCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; ListCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -14175,7 +16264,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; ListCollection.prototype.track=function () { @@ -14187,15 +16276,16 @@ var Word; return this; }; ListCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return ListCollection; }(OfficeExtension.ClientObject)); Word.ListCollection=ListCollection; + var _typeListItem="ListItem"; var ListItem=(function (_super) { __extends(ListItem, _super); function ListItem() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ListItem.prototype, "_className", { get: function () { @@ -14206,11 +16296,11 @@ var Word; }); Object.defineProperty(ListItem.prototype, "level", { get: function () { - _throwIfNotLoaded("level", this.m_level, "ListItem", this._isNull); - return this.m_level; + _throwIfNotLoaded("level", this._L, _typeListItem, this._isNull); + return this._L; }, set: function (value) { - this.m_level=value; + this._L=value; _createSetPropertyAction(this.context, this, "Level", value); }, enumerable: true, @@ -14218,24 +16308,24 @@ var Word; }); Object.defineProperty(ListItem.prototype, "listString", { get: function () { - _throwIfNotLoaded("listString", this.m_listString, "ListItem", this._isNull); - return this.m_listString; + _throwIfNotLoaded("listString", this._Li, _typeListItem, this._isNull); + return this._Li; }, enumerable: true, configurable: true }); Object.defineProperty(ListItem.prototype, "siblingIndex", { get: function () { - _throwIfNotLoaded("siblingIndex", this.m_siblingIndex, "ListItem", this._isNull); - return this.m_siblingIndex; + _throwIfNotLoaded("siblingIndex", this._S, _typeListItem, this._isNull); + return this._S; }, enumerable: true, configurable: true }); Object.defineProperty(ListItem.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "ListItem", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeListItem, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -14244,16 +16334,16 @@ var Word; this._recursivelySet(properties, options, ["level"], [], []); }; ListItem.prototype.getAncestor=function (parentOnly) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetAncestor", 1, [parentOnly], false, false, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetAncestor", 1, [parentOnly], false, false, null, false)); }; ListItem.prototype.getAncestorOrNullObject=function (parentOnly) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetAncestorOrNullObject", 1, [parentOnly], false, false, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetAncestorOrNullObject", 1, [parentOnly], false, false, null, false)); }; ListItem.prototype.getDescendants=function (directChildrenOnly) { - return new Word.ParagraphCollection(this.context, _createMethodObjectPath(this.context, this, "GetDescendants", 1, [directChildrenOnly], true, false, null)); + return new Word.ParagraphCollection(this.context, _createMethodObjectPath(this.context, this, "GetDescendants", 1, [directChildrenOnly], true, false, null, false)); }; ListItem.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; ListItem.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14262,21 +16352,29 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Level"])) { - this.m_level=obj["Level"]; + this._L=obj["Level"]; } if (!_isUndefined(obj["ListString"])) { - this.m_listString=obj["ListString"]; + this._Li=obj["ListString"]; } if (!_isUndefined(obj["SiblingIndex"])) { - this.m_siblingIndex=obj["SiblingIndex"]; + this._S=obj["SiblingIndex"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } }; ListItem.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ListItem.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ListItem.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ListItem.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; ListItem.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -14284,7 +16382,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; ListItem.prototype.track=function () { @@ -14296,19 +16394,24 @@ var Word; return this; }; ListItem.prototype.toJSON=function () { - return { - "level": this.m_level, - "listString": this.m_listString, - "siblingIndex": this.m_siblingIndex - }; + return _toJson(this, { + "level": this._L, + "listString": this._Li, + "siblingIndex": this._S, + }, {}); + }; + ListItem.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return ListItem; }(OfficeExtension.ClientObject)); Word.ListItem=ListItem; + var _typeParagraph="Paragraph"; var Paragraph=(function (_super) { __extends(Paragraph, _super); function Paragraph() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Paragraph.prototype, "_className", { get: function () { @@ -14319,151 +16422,161 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "contentControls", { get: function () { - if (!this.m_contentControls) { - this.m_contentControls=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false)); + if (!this._C) { + this._C=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false, false)); } - return this.m_contentControls; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._Fo) { + this._Fo=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._Fo; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "inlinePictures", { get: function () { - if (!this.m_inlinePictures) { - this.m_inlinePictures=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false)); + if (!this._I) { + this._I=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false, false)); } - return this.m_inlinePictures; + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "list", { get: function () { - if (!this.m_list) { - this.m_list=new Word.List(this.context, _createPropertyObjectPath(this.context, this, "List", false, false)); + _throwIfApiNotSupported("Paragraph.list", _defaultApiSetName, "1.3", _hostName); + if (!this._Lis) { + this._Lis=new Word.List(this.context, _createPropertyObjectPath(this.context, this, "List", false, false, false)); } - return this.m_list; + return this._Lis; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "listItem", { get: function () { - if (!this.m_listItem) { - this.m_listItem=new Word.ListItem(this.context, _createPropertyObjectPath(this.context, this, "ListItem", false, false)); + _throwIfApiNotSupported("Paragraph.listItem", _defaultApiSetName, "1.3", _hostName); + if (!this._List) { + this._List=new Word.ListItem(this.context, _createPropertyObjectPath(this.context, this, "ListItem", false, false, false)); } - return this.m_listItem; + return this._List; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "listItemOrNullObject", { get: function () { - if (!this.m_listItemOrNullObject) { - this.m_listItemOrNullObject=new Word.ListItem(this.context, _createPropertyObjectPath(this.context, this, "ListItemOrNullObject", false, false)); + _throwIfApiNotSupported("Paragraph.listItemOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ListI) { + this._ListI=new Word.ListItem(this.context, _createPropertyObjectPath(this.context, this, "ListItemOrNullObject", false, false, false)); } - return this.m_listItemOrNullObject; + return this._ListI; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "listOrNullObject", { get: function () { - if (!this.m_listOrNullObject) { - this.m_listOrNullObject=new Word.List(this.context, _createPropertyObjectPath(this.context, this, "ListOrNullObject", false, false)); + _throwIfApiNotSupported("Paragraph.listOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ListO) { + this._ListO=new Word.List(this.context, _createPropertyObjectPath(this.context, this, "ListOrNullObject", false, false, false)); } - return this.m_listOrNullObject; + return this._ListO; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentBody", { get: function () { - if (!this.m_parentBody) { - this.m_parentBody=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false)); + _throwIfApiNotSupported("Paragraph.parentBody", _defaultApiSetName, "1.3", _hostName); + if (!this._P) { + this._P=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false, false)); } - return this.m_parentBody; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentContentControl", { get: function () { - if (!this.m_parentContentControl) { - this.m_parentContentControl=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false)); + if (!this._Pa) { + this._Pa=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false, false)); } - return this.m_parentContentControl; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentContentControlOrNullObject", { get: function () { - if (!this.m_parentContentControlOrNullObject) { - this.m_parentContentControlOrNullObject=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false)); + _throwIfApiNotSupported("Paragraph.parentContentControlOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Par) { + this._Par=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false, false)); } - return this.m_parentContentControlOrNullObject; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + _throwIfApiNotSupported("Paragraph.parentTable", _defaultApiSetName, "1.3", _hostName); + if (!this._Pare) { + this._Pare=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._Pare; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentTableCell", { get: function () { - if (!this.m_parentTableCell) { - this.m_parentTableCell=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false)); + _throwIfApiNotSupported("Paragraph.parentTableCell", _defaultApiSetName, "1.3", _hostName); + if (!this._Paren) { + this._Paren=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false, false)); } - return this.m_parentTableCell; + return this._Paren; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentTableCellOrNullObject", { get: function () { - if (!this.m_parentTableCellOrNullObject) { - this.m_parentTableCellOrNullObject=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false)); + _throwIfApiNotSupported("Paragraph.parentTableCellOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Parent) { + this._Parent=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false, false)); } - return this.m_parentTableCellOrNullObject; + return this._Parent; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "parentTableOrNullObject", { get: function () { - if (!this.m_parentTableOrNullObject) { - this.m_parentTableOrNullObject=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false)); + _throwIfApiNotSupported("Paragraph.parentTableOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ParentT) { + this._ParentT=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false, false)); } - return this.m_parentTableOrNullObject; + return this._ParentT; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "alignment", { get: function () { - _throwIfNotLoaded("alignment", this.m_alignment, "Paragraph", this._isNull); - return this.m_alignment; + _throwIfNotLoaded("alignment", this._A, _typeParagraph, this._isNull); + return this._A; }, set: function (value) { - this.m_alignment=value; + this._A=value; _createSetPropertyAction(this.context, this, "Alignment", value); }, enumerable: true, @@ -14471,11 +16584,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "firstLineIndent", { get: function () { - _throwIfNotLoaded("firstLineIndent", this.m_firstLineIndent, "Paragraph", this._isNull); - return this.m_firstLineIndent; + _throwIfNotLoaded("firstLineIndent", this._F, _typeParagraph, this._isNull); + return this._F; }, set: function (value) { - this.m_firstLineIndent=value; + this._F=value; _createSetPropertyAction(this.context, this, "FirstLineIndent", value); }, enumerable: true, @@ -14483,27 +16596,29 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "isLastParagraph", { get: function () { - _throwIfNotLoaded("isLastParagraph", this.m_isLastParagraph, "Paragraph", this._isNull); - return this.m_isLastParagraph; + _throwIfNotLoaded("isLastParagraph", this._Is, _typeParagraph, this._isNull); + _throwIfApiNotSupported("Paragraph.isLastParagraph", _defaultApiSetName, "1.3", _hostName); + return this._Is; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "isListItem", { get: function () { - _throwIfNotLoaded("isListItem", this.m_isListItem, "Paragraph", this._isNull); - return this.m_isListItem; + _throwIfNotLoaded("isListItem", this._IsL, _typeParagraph, this._isNull); + _throwIfApiNotSupported("Paragraph.isListItem", _defaultApiSetName, "1.3", _hostName); + return this._IsL; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "leftIndent", { get: function () { - _throwIfNotLoaded("leftIndent", this.m_leftIndent, "Paragraph", this._isNull); - return this.m_leftIndent; + _throwIfNotLoaded("leftIndent", this._L, _typeParagraph, this._isNull); + return this._L; }, set: function (value) { - this.m_leftIndent=value; + this._L=value; _createSetPropertyAction(this.context, this, "LeftIndent", value); }, enumerable: true, @@ -14511,11 +16626,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "lineSpacing", { get: function () { - _throwIfNotLoaded("lineSpacing", this.m_lineSpacing, "Paragraph", this._isNull); - return this.m_lineSpacing; + _throwIfNotLoaded("lineSpacing", this._Li, _typeParagraph, this._isNull); + return this._Li; }, set: function (value) { - this.m_lineSpacing=value; + this._Li=value; _createSetPropertyAction(this.context, this, "LineSpacing", value); }, enumerable: true, @@ -14523,11 +16638,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "lineUnitAfter", { get: function () { - _throwIfNotLoaded("lineUnitAfter", this.m_lineUnitAfter, "Paragraph", this._isNull); - return this.m_lineUnitAfter; + _throwIfNotLoaded("lineUnitAfter", this._Lin, _typeParagraph, this._isNull); + return this._Lin; }, set: function (value) { - this.m_lineUnitAfter=value; + this._Lin=value; _createSetPropertyAction(this.context, this, "LineUnitAfter", value); }, enumerable: true, @@ -14535,11 +16650,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "lineUnitBefore", { get: function () { - _throwIfNotLoaded("lineUnitBefore", this.m_lineUnitBefore, "Paragraph", this._isNull); - return this.m_lineUnitBefore; + _throwIfNotLoaded("lineUnitBefore", this._Line, _typeParagraph, this._isNull); + return this._Line; }, set: function (value) { - this.m_lineUnitBefore=value; + this._Line=value; _createSetPropertyAction(this.context, this, "LineUnitBefore", value); }, enumerable: true, @@ -14547,11 +16662,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "outlineLevel", { get: function () { - _throwIfNotLoaded("outlineLevel", this.m_outlineLevel, "Paragraph", this._isNull); - return this.m_outlineLevel; + _throwIfNotLoaded("outlineLevel", this._O, _typeParagraph, this._isNull); + return this._O; }, set: function (value) { - this.m_outlineLevel=value; + this._O=value; _createSetPropertyAction(this.context, this, "OutlineLevel", value); }, enumerable: true, @@ -14559,11 +16674,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "rightIndent", { get: function () { - _throwIfNotLoaded("rightIndent", this.m_rightIndent, "Paragraph", this._isNull); - return this.m_rightIndent; + _throwIfNotLoaded("rightIndent", this._R, _typeParagraph, this._isNull); + return this._R; }, set: function (value) { - this.m_rightIndent=value; + this._R=value; _createSetPropertyAction(this.context, this, "RightIndent", value); }, enumerable: true, @@ -14571,11 +16686,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "spaceAfter", { get: function () { - _throwIfNotLoaded("spaceAfter", this.m_spaceAfter, "Paragraph", this._isNull); - return this.m_spaceAfter; + _throwIfNotLoaded("spaceAfter", this._S, _typeParagraph, this._isNull); + return this._S; }, set: function (value) { - this.m_spaceAfter=value; + this._S=value; _createSetPropertyAction(this.context, this, "SpaceAfter", value); }, enumerable: true, @@ -14583,11 +16698,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "spaceBefore", { get: function () { - _throwIfNotLoaded("spaceBefore", this.m_spaceBefore, "Paragraph", this._isNull); - return this.m_spaceBefore; + _throwIfNotLoaded("spaceBefore", this._Sp, _typeParagraph, this._isNull); + return this._Sp; }, set: function (value) { - this.m_spaceBefore=value; + this._Sp=value; _createSetPropertyAction(this.context, this, "SpaceBefore", value); }, enumerable: true, @@ -14595,11 +16710,11 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "Paragraph", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._St, _typeParagraph, this._isNull); + return this._St; }, set: function (value) { - this.m_style=value; + this._St=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -14607,11 +16722,12 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "styleBuiltIn", { get: function () { - _throwIfNotLoaded("styleBuiltIn", this.m_styleBuiltIn, "Paragraph", this._isNull); - return this.m_styleBuiltIn; + _throwIfNotLoaded("styleBuiltIn", this._Sty, _typeParagraph, this._isNull); + _throwIfApiNotSupported("Paragraph.styleBuiltIn", _defaultApiSetName, "1.3", _hostName); + return this._Sty; }, set: function (value) { - this.m_styleBuiltIn=value; + this._Sty=value; _createSetPropertyAction(this.context, this, "StyleBuiltIn", value); }, enumerable: true, @@ -14619,49 +16735,39 @@ var Word; }); Object.defineProperty(Paragraph.prototype, "tableNestingLevel", { get: function () { - _throwIfNotLoaded("tableNestingLevel", this.m_tableNestingLevel, "Paragraph", this._isNull); - return this.m_tableNestingLevel; + _throwIfNotLoaded("tableNestingLevel", this._T, _typeParagraph, this._isNull); + _throwIfApiNotSupported("Paragraph.tableNestingLevel", _defaultApiSetName, "1.3", _hostName); + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "Paragraph", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._Te, _typeParagraph, this._isNull); + return this._Te; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "Paragraph", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeParagraph, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(Paragraph.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Paragraph", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeParagraph, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Paragraph.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["style", "alignment", "firstLineIndent", "leftIndent", "rightIndent", "lineSpacing", "outlineLevel", "spaceBefore", "spaceAfter", "lineUnitBefore", "lineUnitAfter", "styleBuiltIn"], ["font", "listItem", "listItemOrNullObject"], [ - "contentControls", - "inlinePictures", - "list", - "listOrNullObject", - "parentBody", - "parentContentControl", - "parentContentControlOrNullObject", - "parentTable", - "parentTableCell", - "parentTableCellOrNullObject", - "parentTableOrNullObject", "contentControls", "inlinePictures", "list", @@ -14676,89 +16782,109 @@ var Word; ]); }; Paragraph.prototype.attachToList=function (listId, level) { - return new Word.List(this.context, _createMethodObjectPath(this.context, this, "AttachToList", 0, [listId, level], false, false, null)); + _throwIfApiNotSupported("Paragraph.attachToList", _defaultApiSetName, "1.3", _hostName); + return new Word.List(this.context, _createMethodObjectPath(this.context, this, "AttachToList", 0, [listId, level], false, false, null, false)); }; Paragraph.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; Paragraph.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Paragraph.prototype.detachFromList=function () { - _createMethodAction(this.context, this, "DetachFromList", 0, []); + _throwIfApiNotSupported("Paragraph.detachFromList", _defaultApiSetName, "1.3", _hostName); + _createMethodAction(this.context, this, "DetachFromList", 0, [], false); }; Paragraph.prototype.getHtml=function () { - var action=_createMethodAction(this.context, this, "GetHtml", 1, []); + var action=_createMethodAction(this.context, this, "GetHtml", 1, [], false); + var ret=new OfficeExtension.ClientResult(); + _addActionResultHandler(this, action, ret); + return ret; + }; + Paragraph.prototype.getMetadata=function (propertyGUID) { + var action=_createMethodAction(this.context, this, "GetMetadata", 1, [propertyGUID], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Paragraph.prototype.getNext=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null)); + _throwIfApiNotSupported("Paragraph.getNext", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null, false)); }; Paragraph.prototype.getNextOrNullObject=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("Paragraph.getNextOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null, false)); }; Paragraph.prototype.getOoxml=function () { - var action=_createMethodAction(this.context, this, "GetOoxml", 1, []); + var action=_createMethodAction(this.context, this, "GetOoxml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Paragraph.prototype.getPrevious=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetPrevious", 1, [], false, false, null)); + _throwIfApiNotSupported("Paragraph.getPrevious", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetPrevious", 1, [], false, false, null, false)); }; Paragraph.prototype.getPreviousOrNullObject=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetPreviousOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("Paragraph.getPreviousOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetPreviousOrNullObject", 1, [], false, false, null, false)); }; Paragraph.prototype.getRange=function (rangeLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null)); + _throwIfApiNotSupported("Paragraph.getRange", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null, false)); }; Paragraph.prototype.getTextRanges=function (endingMarks, trimSpacing) { - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetTextRanges", 1, [endingMarks, trimSpacing], true, false, null)); + _throwIfApiNotSupported("Paragraph.getTextRanges", _defaultApiSetName, "1.3", _hostName); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetTextRanges", 1, [endingMarks, trimSpacing], true, false, null, false)); }; Paragraph.prototype.insertBreak=function (breakType, insertLocation) { - _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation]); + _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation], false); }; Paragraph.prototype.insertContentControl=function () { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null)); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null, false)); }; Paragraph.prototype.insertFileFromBase64=function (base64File, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null, false)); }; Paragraph.prototype.insertHtml=function (html, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null, false)); }; Paragraph.prototype.insertInlinePictureFromBase64=function (base64EncodedImage, insertLocation) { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null)); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null, false)); }; Paragraph.prototype.insertOoxml=function (ooxml, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null, false)); }; Paragraph.prototype.insertParagraph=function (paragraphText, insertLocation) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null, false)); }; Paragraph.prototype.insertTable=function (rowCount, columnCount, insertLocation, values) { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null)); + _throwIfApiNotSupported("Paragraph.insertTable", _defaultApiSetName, "1.3", _hostName); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null, false)); }; Paragraph.prototype.insertText=function (text, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null, false)); }; Paragraph.prototype.search=function (searchText, searchOptions) { searchOptions=_normalizeSearchOptions(this.context, searchOptions); - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null)); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null, false)); }; Paragraph.prototype.select=function (selectionMode) { - _createMethodAction(this.context, this, "Select", 1, [selectionMode]); + _createMethodAction(this.context, this, "Select", 1, [selectionMode], false); + }; + Paragraph.prototype.setMetadata=function (propertyGUID, propertyValue) { + _createMethodAction(this.context, this, "SetMetadata", 0, [propertyGUID, propertyValue], false); }; Paragraph.prototype.split=function (delimiters, trimDelimiters, trimSpacing) { - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Split", 1, [delimiters, trimDelimiters, trimSpacing], true, false, null)); + _throwIfApiNotSupported("Paragraph.split", _defaultApiSetName, "1.3", _hostName); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Split", 1, [delimiters, trimDelimiters, trimSpacing], true, false, null, false)); }; Paragraph.prototype.startNewList=function () { - return new Word.List(this.context, _createMethodObjectPath(this.context, this, "StartNewList", 0, [], false, false, null)); + _throwIfApiNotSupported("Paragraph.startNewList", _defaultApiSetName, "1.3", _hostName); + return new Word.List(this.context, _createMethodObjectPath(this.context, this, "StartNewList", 0, [], false, false, null, false)); }; Paragraph.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Paragraph.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14767,64 +16893,72 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Alignment"])) { - this.m_alignment=obj["Alignment"]; + this._A=obj["Alignment"]; } if (!_isUndefined(obj["FirstLineIndent"])) { - this.m_firstLineIndent=obj["FirstLineIndent"]; + this._F=obj["FirstLineIndent"]; } if (!_isUndefined(obj["IsLastParagraph"])) { - this.m_isLastParagraph=obj["IsLastParagraph"]; + this._Is=obj["IsLastParagraph"]; } if (!_isUndefined(obj["IsListItem"])) { - this.m_isListItem=obj["IsListItem"]; + this._IsL=obj["IsListItem"]; } if (!_isUndefined(obj["LeftIndent"])) { - this.m_leftIndent=obj["LeftIndent"]; + this._L=obj["LeftIndent"]; } if (!_isUndefined(obj["LineSpacing"])) { - this.m_lineSpacing=obj["LineSpacing"]; + this._Li=obj["LineSpacing"]; } if (!_isUndefined(obj["LineUnitAfter"])) { - this.m_lineUnitAfter=obj["LineUnitAfter"]; + this._Lin=obj["LineUnitAfter"]; } if (!_isUndefined(obj["LineUnitBefore"])) { - this.m_lineUnitBefore=obj["LineUnitBefore"]; + this._Line=obj["LineUnitBefore"]; } if (!_isUndefined(obj["OutlineLevel"])) { - this.m_outlineLevel=obj["OutlineLevel"]; + this._O=obj["OutlineLevel"]; } if (!_isUndefined(obj["RightIndent"])) { - this.m_rightIndent=obj["RightIndent"]; + this._R=obj["RightIndent"]; } if (!_isUndefined(obj["SpaceAfter"])) { - this.m_spaceAfter=obj["SpaceAfter"]; + this._S=obj["SpaceAfter"]; } if (!_isUndefined(obj["SpaceBefore"])) { - this.m_spaceBefore=obj["SpaceBefore"]; + this._Sp=obj["SpaceBefore"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._St=obj["Style"]; } if (!_isUndefined(obj["StyleBuiltIn"])) { - this.m_styleBuiltIn=obj["StyleBuiltIn"]; + this._Sty=obj["StyleBuiltIn"]; } if (!_isUndefined(obj["TableNestingLevel"])) { - this.m_tableNestingLevel=obj["TableNestingLevel"]; + this._T=obj["TableNestingLevel"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._Te=obj["Text"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["contentControls", "ContentControls", "font", "Font", "inlinePictures", "InlinePictures", "list", "List", "listItem", "ListItem", "listItemOrNullObject", "ListItemOrNullObject", "listOrNullObject", "ListOrNullObject", "parentBody", "ParentBody", "parentContentControl", "ParentContentControl", "parentContentControlOrNullObject", "ParentContentControlOrNullObject", "parentTable", "ParentTable", "parentTableCell", "ParentTableCell", "parentTableCellOrNullObject", "ParentTableCellOrNullObject", "parentTableOrNullObject", "ParentTableOrNullObject"]); }; Paragraph.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Paragraph.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Paragraph.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Paragraph.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; Paragraph.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -14832,10 +16966,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; Paragraph.prototype.track=function () { @@ -14847,35 +16981,42 @@ var Word; return this; }; Paragraph.prototype.toJSON=function () { - return { - "alignment": this.m_alignment, - "firstLineIndent": this.m_firstLineIndent, - "font": this.m_font, - "isLastParagraph": this.m_isLastParagraph, - "isListItem": this.m_isListItem, - "leftIndent": this.m_leftIndent, - "lineSpacing": this.m_lineSpacing, - "lineUnitAfter": this.m_lineUnitAfter, - "lineUnitBefore": this.m_lineUnitBefore, - "listItem": this.m_listItem, - "listItemOrNullObject": this.m_listItemOrNullObject, - "outlineLevel": this.m_outlineLevel, - "rightIndent": this.m_rightIndent, - "spaceAfter": this.m_spaceAfter, - "spaceBefore": this.m_spaceBefore, - "style": this.m_style, - "styleBuiltIn": this.m_styleBuiltIn, - "tableNestingLevel": this.m_tableNestingLevel, - "text": this.m_text - }; + return _toJson(this, { + "alignment": this._A, + "firstLineIndent": this._F, + "isLastParagraph": this._Is, + "isListItem": this._IsL, + "leftIndent": this._L, + "lineSpacing": this._Li, + "lineUnitAfter": this._Lin, + "lineUnitBefore": this._Line, + "outlineLevel": this._O, + "rightIndent": this._R, + "spaceAfter": this._S, + "spaceBefore": this._Sp, + "style": this._St, + "styleBuiltIn": this._Sty, + "tableNestingLevel": this._T, + "text": this._Te, + }, { + "font": this._Fo, + "inlinePictures": this._I, + "listItem": this._List, + "listItemOrNullObject": this._ListI, + }); + }; + Paragraph.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Paragraph; }(OfficeExtension.ClientObject)); Word.Paragraph=Paragraph; + var _typeParagraphCollection="ParagraphCollection"; var ParagraphCollection=(function (_super) { __extends(ParagraphCollection, _super); function ParagraphCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(ParagraphCollection.prototype, "_className", { get: function () { @@ -14886,7 +17027,7 @@ var Word; }); Object.defineProperty(ParagraphCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "ParagraphCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeParagraphCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -14894,29 +17035,33 @@ var Word; }); Object.defineProperty(ParagraphCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "ParagraphCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeParagraphCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); ParagraphCollection.prototype.getFirst=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + _throwIfApiNotSupported("ParagraphCollection.getFirst", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; ParagraphCollection.prototype.getFirstOrNullObject=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("ParagraphCollection.getFirstOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; ParagraphCollection.prototype.getLast=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetLast", 1, [], false, false, null)); + _throwIfApiNotSupported("ParagraphCollection.getLast", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetLast", 1, [], false, false, null, false)); }; ParagraphCollection.prototype.getLastOrNullObject=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetLastOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("ParagraphCollection.getLastOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetLastOrNullObject", 1, [], false, false, null, false)); }; ParagraphCollection.prototype._GetItem=function (index) { return new Word.Paragraph(this.context, _createIndexerObjectPath(this.context, this, [index])); }; ParagraphCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; ParagraphCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -14925,7 +17070,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -14938,8 +17083,16 @@ var Word; } }; ParagraphCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + ParagraphCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + ParagraphCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + ParagraphCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; ParagraphCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -14947,7 +17100,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; ParagraphCollection.prototype.track=function () { @@ -14959,15 +17112,16 @@ var Word; return this; }; ParagraphCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return ParagraphCollection; }(OfficeExtension.ClientObject)); Word.ParagraphCollection=ParagraphCollection; + var _typeRange="Range"; var Range=(function (_super) { __extends(Range, _super); function Range() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Range.prototype, "_className", { get: function () { @@ -14978,141 +17132,151 @@ var Word; }); Object.defineProperty(Range.prototype, "contentControls", { get: function () { - if (!this.m_contentControls) { - this.m_contentControls=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false)); + if (!this._C) { + this._C=new Word.ContentControlCollection(this.context, _createPropertyObjectPath(this.context, this, "ContentControls", true, false, false)); } - return this.m_contentControls; + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._F) { + this._F=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "inlinePictures", { get: function () { - if (!this.m_inlinePictures) { - this.m_inlinePictures=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false)); + _throwIfApiNotSupported("Range.inlinePictures", _defaultApiSetName, "1.2", _hostName); + if (!this._I) { + this._I=new Word.InlinePictureCollection(this.context, _createPropertyObjectPath(this.context, this, "InlinePictures", true, false, false)); } - return this.m_inlinePictures; + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "lists", { get: function () { - if (!this.m_lists) { - this.m_lists=new Word.ListCollection(this.context, _createPropertyObjectPath(this.context, this, "Lists", true, false)); + _throwIfApiNotSupported("Range.lists", _defaultApiSetName, "1.3", _hostName); + if (!this._L) { + this._L=new Word.ListCollection(this.context, _createPropertyObjectPath(this.context, this, "Lists", true, false, false)); } - return this.m_lists; + return this._L; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "paragraphs", { get: function () { - if (!this.m_paragraphs) { - this.m_paragraphs=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false)); + if (!this._P) { + this._P=new Word.ParagraphCollection(this.context, _createPropertyObjectPath(this.context, this, "Paragraphs", true, false, false)); } - return this.m_paragraphs; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "parentBody", { get: function () { - if (!this.m_parentBody) { - this.m_parentBody=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false)); + _throwIfApiNotSupported("Range.parentBody", _defaultApiSetName, "1.3", _hostName); + if (!this._Pa) { + this._Pa=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false, false)); } - return this.m_parentBody; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "parentContentControl", { get: function () { - if (!this.m_parentContentControl) { - this.m_parentContentControl=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false)); + if (!this._Par) { + this._Par=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false, false)); } - return this.m_parentContentControl; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "parentContentControlOrNullObject", { get: function () { - if (!this.m_parentContentControlOrNullObject) { - this.m_parentContentControlOrNullObject=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false)); + _throwIfApiNotSupported("Range.parentContentControlOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._Pare) { + this._Pare=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false, false)); } - return this.m_parentContentControlOrNullObject; + return this._Pare; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + _throwIfApiNotSupported("Range.parentTable", _defaultApiSetName, "1.3", _hostName); + if (!this._Paren) { + this._Paren=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._Paren; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "parentTableCell", { get: function () { - if (!this.m_parentTableCell) { - this.m_parentTableCell=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false)); + _throwIfApiNotSupported("Range.parentTableCell", _defaultApiSetName, "1.3", _hostName); + if (!this._Parent) { + this._Parent=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false, false)); } - return this.m_parentTableCell; + return this._Parent; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "parentTableCellOrNullObject", { get: function () { - if (!this.m_parentTableCellOrNullObject) { - this.m_parentTableCellOrNullObject=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false)); + _throwIfApiNotSupported("Range.parentTableCellOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ParentT) { + this._ParentT=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false, false)); } - return this.m_parentTableCellOrNullObject; + return this._ParentT; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "parentTableOrNullObject", { get: function () { - if (!this.m_parentTableOrNullObject) { - this.m_parentTableOrNullObject=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false)); + _throwIfApiNotSupported("Range.parentTableOrNullObject", _defaultApiSetName, "1.3", _hostName); + if (!this._ParentTa) { + this._ParentTa=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false, false)); } - return this.m_parentTableOrNullObject; + return this._ParentTa; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "tables", { get: function () { - if (!this.m_tables) { - this.m_tables=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false)); + _throwIfApiNotSupported("Range.tables", _defaultApiSetName, "1.3", _hostName); + if (!this._T) { + this._T=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false, false)); } - return this.m_tables; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "hyperlink", { get: function () { - _throwIfNotLoaded("hyperlink", this.m_hyperlink, "Range", this._isNull); - return this.m_hyperlink; + _throwIfNotLoaded("hyperlink", this._H, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.hyperlink", _defaultApiSetName, "1.3", _hostName); + return this._H; }, set: function (value) { - this.m_hyperlink=value; + this._H=value; _createSetPropertyAction(this.context, this, "Hyperlink", value); }, enumerable: true, @@ -15120,19 +17284,20 @@ var Word; }); Object.defineProperty(Range.prototype, "isEmpty", { get: function () { - _throwIfNotLoaded("isEmpty", this.m_isEmpty, "Range", this._isNull); - return this.m_isEmpty; + _throwIfNotLoaded("isEmpty", this._Is, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.isEmpty", _defaultApiSetName, "1.3", _hostName); + return this._Is; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "Range", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._S, _typeRange, this._isNull); + return this._S; }, set: function (value) { - this.m_style=value; + this._S=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -15140,11 +17305,12 @@ var Word; }); Object.defineProperty(Range.prototype, "styleBuiltIn", { get: function () { - _throwIfNotLoaded("styleBuiltIn", this.m_styleBuiltIn, "Range", this._isNull); - return this.m_styleBuiltIn; + _throwIfNotLoaded("styleBuiltIn", this._St, _typeRange, this._isNull); + _throwIfApiNotSupported("Range.styleBuiltIn", _defaultApiSetName, "1.3", _hostName); + return this._St; }, set: function (value) { - this.m_styleBuiltIn=value; + this._St=value; _createSetPropertyAction(this.context, this, "StyleBuiltIn", value); }, enumerable: true, @@ -15152,42 +17318,30 @@ var Word; }); Object.defineProperty(Range.prototype, "text", { get: function () { - _throwIfNotLoaded("text", this.m_text, "Range", this._isNull); - return this.m_text; + _throwIfNotLoaded("text", this._Te, _typeRange, this._isNull); + return this._Te; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "Range", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeRange, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(Range.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Range", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeRange, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Range.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["style", "hyperlink", "styleBuiltIn"], ["font"], [ - "contentControls", - "inlinePictures", - "lists", - "paragraphs", - "parentBody", - "parentContentControl", - "parentContentControlOrNullObject", - "parentTable", - "parentTableCell", - "parentTableCellOrNullObject", - "parentTableOrNullObject", - "tables", "contentControls", "inlinePictures", "lists", @@ -15203,95 +17357,108 @@ var Word; ]); }; Range.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; Range.prototype.compareLocationWith=function (range) { - var action=_createMethodAction(this.context, this, "CompareLocationWith", 1, [range]); + _throwIfApiNotSupported("Range.compareLocationWith", _defaultApiSetName, "1.3", _hostName); + var action=_createMethodAction(this.context, this, "CompareLocationWith", 1, [range], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Range.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Range.prototype.expandTo=function (range) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "ExpandTo", 0, [range], false, false, null)); + _throwIfApiNotSupported("Range.expandTo", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "ExpandTo", 0, [range], false, false, null, false)); }; Range.prototype.expandToOrNullObject=function (range) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "ExpandToOrNullObject", 0, [range], false, false, null)); + _throwIfApiNotSupported("Range.expandToOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "ExpandToOrNullObject", 0, [range], false, false, null, false)); }; Range.prototype.getHtml=function () { - var action=_createMethodAction(this.context, this, "GetHtml", 1, []); + var action=_createMethodAction(this.context, this, "GetHtml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Range.prototype.getHyperlinkRanges=function () { - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetHyperlinkRanges", 1, [], true, false, null)); + _throwIfApiNotSupported("Range.getHyperlinkRanges", _defaultApiSetName, "1.3", _hostName); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetHyperlinkRanges", 1, [], true, false, null, false)); }; Range.prototype.getNextTextRange=function (endingMarks, trimSpacing) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetNextTextRange", 1, [endingMarks, trimSpacing], false, false, null)); + _throwIfApiNotSupported("Range.getNextTextRange", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetNextTextRange", 1, [endingMarks, trimSpacing], false, false, null, false)); }; Range.prototype.getNextTextRangeOrNullObject=function (endingMarks, trimSpacing) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetNextTextRangeOrNullObject", 1, [endingMarks, trimSpacing], false, false, null)); + _throwIfApiNotSupported("Range.getNextTextRangeOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetNextTextRangeOrNullObject", 1, [endingMarks, trimSpacing], false, false, null, false)); }; Range.prototype.getOoxml=function () { - var action=_createMethodAction(this.context, this, "GetOoxml", 1, []); + var action=_createMethodAction(this.context, this, "GetOoxml", 1, [], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Range.prototype.getRange=function (rangeLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null)); + _throwIfApiNotSupported("Range.getRange", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null, false)); }; Range.prototype.getTextRanges=function (endingMarks, trimSpacing) { - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetTextRanges", 1, [endingMarks, trimSpacing], true, false, null)); + _throwIfApiNotSupported("Range.getTextRanges", _defaultApiSetName, "1.3", _hostName); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "GetTextRanges", 1, [endingMarks, trimSpacing], true, false, null, false)); }; Range.prototype.insertBreak=function (breakType, insertLocation) { - _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation]); + _createMethodAction(this.context, this, "InsertBreak", 0, [breakType, insertLocation], false); }; Range.prototype.insertContentControl=function () { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null)); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null, false)); }; Range.prototype.insertFileFromBase64=function (base64File, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertFileFromBase64", 0, [base64File, insertLocation], false, true, null, false)); }; Range.prototype.insertHtml=function (html, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertHtml", 0, [html, insertLocation], false, true, null, false)); }; Range.prototype.insertInlinePictureFromBase64=function (base64EncodedImage, insertLocation) { - return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null)); + _throwIfApiNotSupported("Range.insertInlinePictureFromBase64", _defaultApiSetName, "1.2", _hostName); + return new Word.InlinePicture(this.context, _createMethodObjectPath(this.context, this, "InsertInlinePictureFromBase64", 0, [base64EncodedImage, insertLocation], false, true, null, false)); }; Range.prototype.insertOoxml=function (ooxml, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertOoxml", 0, [ooxml, insertLocation], false, true, null, false)); }; Range.prototype.insertParagraph=function (paragraphText, insertLocation) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null, false)); }; Range.prototype.insertTable=function (rowCount, columnCount, insertLocation, values) { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null)); + _throwIfApiNotSupported("Range.insertTable", _defaultApiSetName, "1.3", _hostName); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null, false)); }; Range.prototype.insertText=function (text, insertLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "InsertText", 0, [text, insertLocation], false, true, null, false)); }; Range.prototype.intersectWith=function (range) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "IntersectWith", 0, [range], false, false, null)); + _throwIfApiNotSupported("Range.intersectWith", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "IntersectWith", 0, [range], false, false, null, false)); }; Range.prototype.intersectWithOrNullObject=function (range) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "IntersectWithOrNullObject", 0, [range], false, false, null)); + _throwIfApiNotSupported("Range.intersectWithOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "IntersectWithOrNullObject", 0, [range], false, false, null, false)); }; Range.prototype.search=function (searchText, searchOptions) { searchOptions=_normalizeSearchOptions(this.context, searchOptions); - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null)); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null, false)); }; Range.prototype.select=function (selectionMode) { - _createMethodAction(this.context, this, "Select", 1, [selectionMode]); + _createMethodAction(this.context, this, "Select", 1, [selectionMode], false); }; Range.prototype.split=function (delimiters, multiParagraphs, trimDelimiters, trimSpacing) { - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Split", 1, [delimiters, multiParagraphs, trimDelimiters, trimSpacing], true, false, null)); + _throwIfApiNotSupported("Range.split", _defaultApiSetName, "1.3", _hostName); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Split", 1, [delimiters, multiParagraphs, trimDelimiters, trimSpacing], true, false, null, false)); }; Range.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Range.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15300,31 +17467,39 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Hyperlink"])) { - this.m_hyperlink=obj["Hyperlink"]; + this._H=obj["Hyperlink"]; } if (!_isUndefined(obj["IsEmpty"])) { - this.m_isEmpty=obj["IsEmpty"]; + this._Is=obj["IsEmpty"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._S=obj["Style"]; } if (!_isUndefined(obj["StyleBuiltIn"])) { - this.m_styleBuiltIn=obj["StyleBuiltIn"]; + this._St=obj["StyleBuiltIn"]; } if (!_isUndefined(obj["Text"])) { - this.m_text=obj["Text"]; + this._Te=obj["Text"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["contentControls", "ContentControls", "font", "Font", "inlinePictures", "InlinePictures", "lists", "Lists", "paragraphs", "Paragraphs", "parentBody", "ParentBody", "parentContentControl", "ParentContentControl", "parentContentControlOrNullObject", "ParentContentControlOrNullObject", "parentTable", "ParentTable", "parentTableCell", "ParentTableCell", "parentTableCellOrNullObject", "ParentTableCellOrNullObject", "parentTableOrNullObject", "ParentTableOrNullObject", "tables", "Tables"]); }; Range.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Range.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Range.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Range.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; Range.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -15332,10 +17507,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; Range.prototype.track=function () { @@ -15347,22 +17522,29 @@ var Word; return this; }; Range.prototype.toJSON=function () { - return { - "font": this.m_font, - "hyperlink": this.m_hyperlink, - "isEmpty": this.m_isEmpty, - "style": this.m_style, - "styleBuiltIn": this.m_styleBuiltIn, - "text": this.m_text - }; + return _toJson(this, { + "hyperlink": this._H, + "isEmpty": this._Is, + "style": this._S, + "styleBuiltIn": this._St, + "text": this._Te, + }, { + "font": this._F, + "inlinePictures": this._I, + }); + }; + Range.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Range; }(OfficeExtension.ClientObject)); Word.Range=Range; + var _typeRangeCollection="RangeCollection"; var RangeCollection=(function (_super) { __extends(RangeCollection, _super); function RangeCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(RangeCollection.prototype, "_className", { get: function () { @@ -15373,7 +17555,7 @@ var Word; }); Object.defineProperty(RangeCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "RangeCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeRangeCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15381,23 +17563,25 @@ var Word; }); Object.defineProperty(RangeCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "RangeCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeRangeCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); RangeCollection.prototype.getFirst=function () { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + _throwIfApiNotSupported("RangeCollection.getFirst", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; RangeCollection.prototype.getFirstOrNullObject=function () { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("RangeCollection.getFirstOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; RangeCollection.prototype._GetItem=function (index) { return new Word.Range(this.context, _createIndexerObjectPath(this.context, this, [index])); }; RangeCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; RangeCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15406,7 +17590,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15419,8 +17603,16 @@ var Word; } }; RangeCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + RangeCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + RangeCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + RangeCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; RangeCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -15428,7 +17620,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; RangeCollection.prototype.track=function () { @@ -15440,15 +17632,16 @@ var Word; return this; }; RangeCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return RangeCollection; }(OfficeExtension.ClientObject)); Word.RangeCollection=RangeCollection; + var _typeSearchOptions="SearchOptions"; var SearchOptions=(function (_super) { __extends(SearchOptions, _super); function SearchOptions() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(SearchOptions.prototype, "_className", { get: function () { @@ -15471,11 +17664,11 @@ var Word; }); Object.defineProperty(SearchOptions.prototype, "ignorePunct", { get: function () { - _throwIfNotLoaded("ignorePunct", this.m_ignorePunct, "SearchOptions", this._isNull); - return this.m_ignorePunct; + _throwIfNotLoaded("ignorePunct", this._I, _typeSearchOptions, this._isNull); + return this._I; }, set: function (value) { - this.m_ignorePunct=value; + this._I=value; _createSetPropertyAction(this.context, this, "IgnorePunct", value); }, enumerable: true, @@ -15483,11 +17676,11 @@ var Word; }); Object.defineProperty(SearchOptions.prototype, "ignoreSpace", { get: function () { - _throwIfNotLoaded("ignoreSpace", this.m_ignoreSpace, "SearchOptions", this._isNull); - return this.m_ignoreSpace; + _throwIfNotLoaded("ignoreSpace", this._Ig, _typeSearchOptions, this._isNull); + return this._Ig; }, set: function (value) { - this.m_ignoreSpace=value; + this._Ig=value; _createSetPropertyAction(this.context, this, "IgnoreSpace", value); }, enumerable: true, @@ -15495,11 +17688,11 @@ var Word; }); Object.defineProperty(SearchOptions.prototype, "matchCase", { get: function () { - _throwIfNotLoaded("matchCase", this.m_matchCase, "SearchOptions", this._isNull); - return this.m_matchCase; + _throwIfNotLoaded("matchCase", this._M, _typeSearchOptions, this._isNull); + return this._M; }, set: function (value) { - this.m_matchCase=value; + this._M=value; _createSetPropertyAction(this.context, this, "MatchCase", value); }, enumerable: true, @@ -15507,11 +17700,11 @@ var Word; }); Object.defineProperty(SearchOptions.prototype, "matchPrefix", { get: function () { - _throwIfNotLoaded("matchPrefix", this.m_matchPrefix, "SearchOptions", this._isNull); - return this.m_matchPrefix; + _throwIfNotLoaded("matchPrefix", this._Ma, _typeSearchOptions, this._isNull); + return this._Ma; }, set: function (value) { - this.m_matchPrefix=value; + this._Ma=value; _createSetPropertyAction(this.context, this, "MatchPrefix", value); }, enumerable: true, @@ -15519,11 +17712,11 @@ var Word; }); Object.defineProperty(SearchOptions.prototype, "matchSuffix", { get: function () { - _throwIfNotLoaded("matchSuffix", this.m_matchSuffix, "SearchOptions", this._isNull); - return this.m_matchSuffix; + _throwIfNotLoaded("matchSuffix", this._Mat, _typeSearchOptions, this._isNull); + return this._Mat; }, set: function (value) { - this.m_matchSuffix=value; + this._Mat=value; _createSetPropertyAction(this.context, this, "MatchSuffix", value); }, enumerable: true, @@ -15531,11 +17724,11 @@ var Word; }); Object.defineProperty(SearchOptions.prototype, "matchWholeWord", { get: function () { - _throwIfNotLoaded("matchWholeWord", this.m_matchWholeWord, "SearchOptions", this._isNull); - return this.m_matchWholeWord; + _throwIfNotLoaded("matchWholeWord", this._Matc, _typeSearchOptions, this._isNull); + return this._Matc; }, set: function (value) { - this.m_matchWholeWord=value; + this._Matc=value; _createSetPropertyAction(this.context, this, "MatchWholeWord", value); }, enumerable: true, @@ -15543,7 +17736,7 @@ var Word; }); Object.defineProperty(SearchOptions.prototype, "matchWildcards", { get: function () { - _throwIfNotLoaded("matchWildcards", this.m_matchWildcards, "SearchOptions", this._isNull); + _throwIfNotLoaded("matchWildcards", this.m_matchWildcards, _typeSearchOptions, this._isNull); return this.m_matchWildcards; }, set: function (value) { @@ -15563,53 +17756,66 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["IgnorePunct"])) { - this.m_ignorePunct=obj["IgnorePunct"]; + this._I=obj["IgnorePunct"]; } if (!_isUndefined(obj["IgnoreSpace"])) { - this.m_ignoreSpace=obj["IgnoreSpace"]; + this._Ig=obj["IgnoreSpace"]; } if (!_isUndefined(obj["MatchCase"])) { - this.m_matchCase=obj["MatchCase"]; + this._M=obj["MatchCase"]; } if (!_isUndefined(obj["MatchPrefix"])) { - this.m_matchPrefix=obj["MatchPrefix"]; + this._Ma=obj["MatchPrefix"]; } if (!_isUndefined(obj["MatchSuffix"])) { - this.m_matchSuffix=obj["MatchSuffix"]; + this._Mat=obj["MatchSuffix"]; } if (!_isUndefined(obj["MatchWholeWord"])) { - this.m_matchWholeWord=obj["MatchWholeWord"]; + this._Matc=obj["MatchWholeWord"]; } if (!_isUndefined(obj["MatchWildcards"])) { this.m_matchWildcards=obj["MatchWildcards"]; } }; SearchOptions.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + SearchOptions.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + SearchOptions.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + SearchOptions.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; SearchOptions.newObject=function (context) { - var ret=new Word.SearchOptions(context, _createNewObjectObjectPath(context, "Microsoft.WordServices.SearchOptions", false)); + var ret=new Word.SearchOptions(context, _createNewObjectObjectPath(context, "Microsoft.WordServices.SearchOptions", false, false)); return ret; }; SearchOptions.prototype.toJSON=function () { - return { - "ignorePunct": this.m_ignorePunct, - "ignoreSpace": this.m_ignoreSpace, - "matchCase": this.m_matchCase, - "matchPrefix": this.m_matchPrefix, - "matchSuffix": this.m_matchSuffix, - "matchWholeWord": this.m_matchWholeWord, - "matchWildcards": this.m_matchWildcards - }; + return _toJson(this, { + "ignorePunct": this._I, + "ignoreSpace": this._Ig, + "matchCase": this._M, + "matchPrefix": this._Ma, + "matchSuffix": this._Mat, + "matchWholeWord": this._Matc, + "matchWildcards": this.m_matchWildcards, + }, {}); + }; + SearchOptions.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return SearchOptions; }(OfficeExtension.ClientObject)); Word.SearchOptions=SearchOptions; + var _typeSection="Section"; var Section=(function (_super) { __extends(Section, _super); function Section() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Section.prototype, "_className", { get: function () { @@ -15620,26 +17826,26 @@ var Word; }); Object.defineProperty(Section.prototype, "body", { get: function () { - if (!this.m_body) { - this.m_body=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "Body", false, false)); + if (!this._B) { + this._B=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "Body", false, false, false)); } - return this.m_body; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "Section", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeSection, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(Section.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Section", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeSection, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -15648,19 +17854,21 @@ var Word; this._recursivelySet(properties, options, [], ["body"], []); }; Section.prototype.getFooter=function (type) { - return new Word.Body(this.context, _createMethodObjectPath(this.context, this, "GetFooter", 1, [type], false, true, null)); + return new Word.Body(this.context, _createMethodObjectPath(this.context, this, "GetFooter", 1, [type], false, true, null, false)); }; Section.prototype.getHeader=function (type) { - return new Word.Body(this.context, _createMethodObjectPath(this.context, this, "GetHeader", 1, [type], false, true, null)); + return new Word.Body(this.context, _createMethodObjectPath(this.context, this, "GetHeader", 1, [type], false, true, null, false)); }; Section.prototype.getNext=function () { - return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null)); + _throwIfApiNotSupported("Section.getNext", _defaultApiSetName, "1.3", _hostName); + return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null, false)); }; Section.prototype.getNextOrNullObject=function () { - return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("Section.getNextOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null, false)); }; Section.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Section.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15669,16 +17877,24 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["body", "Body"]); }; Section.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Section.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Section.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Section.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; Section.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -15686,10 +17902,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; Section.prototype.track=function () { @@ -15701,17 +17917,22 @@ var Word; return this; }; Section.prototype.toJSON=function () { - return { - "body": this.m_body - }; + return _toJson(this, {}, { + "body": this._B, + }); + }; + Section.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Section; }(OfficeExtension.ClientObject)); Word.Section=Section; + var _typeSectionCollection="SectionCollection"; var SectionCollection=(function (_super) { __extends(SectionCollection, _super); function SectionCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(SectionCollection.prototype, "_className", { get: function () { @@ -15722,7 +17943,7 @@ var Word; }); Object.defineProperty(SectionCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "SectionCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeSectionCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -15730,23 +17951,25 @@ var Word; }); Object.defineProperty(SectionCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "SectionCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeSectionCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); SectionCollection.prototype.getFirst=function () { - return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + _throwIfApiNotSupported("SectionCollection.getFirst", _defaultApiSetName, "1.3", _hostName); + return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; SectionCollection.prototype.getFirstOrNullObject=function () { - return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + _throwIfApiNotSupported("SectionCollection.getFirstOrNullObject", _defaultApiSetName, "1.3", _hostName); + return new Word.Section(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; SectionCollection.prototype._GetItem=function (index) { return new Word.Section(this.context, _createIndexerObjectPath(this.context, this, [index])); }; SectionCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; SectionCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -15755,7 +17978,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -15768,8 +17991,16 @@ var Word; } }; SectionCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + SectionCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + SectionCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + SectionCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; SectionCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -15777,7 +18008,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; SectionCollection.prototype.track=function () { @@ -15789,15 +18020,16 @@ var Word; return this; }; SectionCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return SectionCollection; }(OfficeExtension.ClientObject)); Word.SectionCollection=SectionCollection; + var _typeTable="Table"; var Table=(function (_super) { __extends(Table, _super); function Table() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(Table.prototype, "_className", { get: function () { @@ -15808,111 +18040,111 @@ var Word; }); Object.defineProperty(Table.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._F) { + this._F=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "parentBody", { get: function () { - if (!this.m_parentBody) { - this.m_parentBody=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false)); + if (!this._P) { + this._P=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "ParentBody", false, false, false)); } - return this.m_parentBody; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "parentContentControl", { get: function () { - if (!this.m_parentContentControl) { - this.m_parentContentControl=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false)); + if (!this._Pa) { + this._Pa=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControl", false, false, false)); } - return this.m_parentContentControl; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "parentContentControlOrNullObject", { get: function () { - if (!this.m_parentContentControlOrNullObject) { - this.m_parentContentControlOrNullObject=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false)); + if (!this._Par) { + this._Par=new Word.ContentControl(this.context, _createPropertyObjectPath(this.context, this, "ParentContentControlOrNullObject", false, false, false)); } - return this.m_parentContentControlOrNullObject; + return this._Par; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + if (!this._Pare) { + this._Pare=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._Pare; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "parentTableCell", { get: function () { - if (!this.m_parentTableCell) { - this.m_parentTableCell=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false)); + if (!this._Paren) { + this._Paren=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCell", false, false, false)); } - return this.m_parentTableCell; + return this._Paren; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "parentTableCellOrNullObject", { get: function () { - if (!this.m_parentTableCellOrNullObject) { - this.m_parentTableCellOrNullObject=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false)); + if (!this._Parent) { + this._Parent=new Word.TableCell(this.context, _createPropertyObjectPath(this.context, this, "ParentTableCellOrNullObject", false, false, false)); } - return this.m_parentTableCellOrNullObject; + return this._Parent; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "parentTableOrNullObject", { get: function () { - if (!this.m_parentTableOrNullObject) { - this.m_parentTableOrNullObject=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false)); + if (!this._ParentT) { + this._ParentT=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTableOrNullObject", false, false, false)); } - return this.m_parentTableOrNullObject; + return this._ParentT; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "rows", { get: function () { - if (!this.m_rows) { - this.m_rows=new Word.TableRowCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false)); + if (!this._Ro) { + this._Ro=new Word.TableRowCollection(this.context, _createPropertyObjectPath(this.context, this, "Rows", true, false, false)); } - return this.m_rows; + return this._Ro; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "tables", { get: function () { - if (!this.m_tables) { - this.m_tables=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false)); + if (!this._T) { + this._T=new Word.TableCollection(this.context, _createPropertyObjectPath(this.context, this, "Tables", true, false, false)); } - return this.m_tables; + return this._T; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "alignment", { get: function () { - _throwIfNotLoaded("alignment", this.m_alignment, "Table", this._isNull); - return this.m_alignment; + _throwIfNotLoaded("alignment", this._A, _typeTable, this._isNull); + return this._A; }, set: function (value) { - this.m_alignment=value; + this._A=value; _createSetPropertyAction(this.context, this, "Alignment", value); }, enumerable: true, @@ -15920,11 +18152,11 @@ var Word; }); Object.defineProperty(Table.prototype, "headerRowCount", { get: function () { - _throwIfNotLoaded("headerRowCount", this.m_headerRowCount, "Table", this._isNull); - return this.m_headerRowCount; + _throwIfNotLoaded("headerRowCount", this._H, _typeTable, this._isNull); + return this._H; }, set: function (value) { - this.m_headerRowCount=value; + this._H=value; _createSetPropertyAction(this.context, this, "HeaderRowCount", value); }, enumerable: true, @@ -15932,11 +18164,11 @@ var Word; }); Object.defineProperty(Table.prototype, "horizontalAlignment", { get: function () { - _throwIfNotLoaded("horizontalAlignment", this.m_horizontalAlignment, "Table", this._isNull); - return this.m_horizontalAlignment; + _throwIfNotLoaded("horizontalAlignment", this._Ho, _typeTable, this._isNull); + return this._Ho; }, set: function (value) { - this.m_horizontalAlignment=value; + this._Ho=value; _createSetPropertyAction(this.context, this, "HorizontalAlignment", value); }, enumerable: true, @@ -15944,35 +18176,35 @@ var Word; }); Object.defineProperty(Table.prototype, "isUniform", { get: function () { - _throwIfNotLoaded("isUniform", this.m_isUniform, "Table", this._isNull); - return this.m_isUniform; + _throwIfNotLoaded("isUniform", this._I, _typeTable, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "nestingLevel", { get: function () { - _throwIfNotLoaded("nestingLevel", this.m_nestingLevel, "Table", this._isNull); - return this.m_nestingLevel; + _throwIfNotLoaded("nestingLevel", this._N, _typeTable, this._isNull); + return this._N; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "rowCount", { get: function () { - _throwIfNotLoaded("rowCount", this.m_rowCount, "Table", this._isNull); - return this.m_rowCount; + _throwIfNotLoaded("rowCount", this._R, _typeTable, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "shadingColor", { get: function () { - _throwIfNotLoaded("shadingColor", this.m_shadingColor, "Table", this._isNull); - return this.m_shadingColor; + _throwIfNotLoaded("shadingColor", this._S, _typeTable, this._isNull); + return this._S; }, set: function (value) { - this.m_shadingColor=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShadingColor", value); }, enumerable: true, @@ -15980,11 +18212,11 @@ var Word; }); Object.defineProperty(Table.prototype, "style", { get: function () { - _throwIfNotLoaded("style", this.m_style, "Table", this._isNull); - return this.m_style; + _throwIfNotLoaded("style", this._St, _typeTable, this._isNull); + return this._St; }, set: function (value) { - this.m_style=value; + this._St=value; _createSetPropertyAction(this.context, this, "Style", value); }, enumerable: true, @@ -15992,11 +18224,11 @@ var Word; }); Object.defineProperty(Table.prototype, "styleBandedColumns", { get: function () { - _throwIfNotLoaded("styleBandedColumns", this.m_styleBandedColumns, "Table", this._isNull); - return this.m_styleBandedColumns; + _throwIfNotLoaded("styleBandedColumns", this._Sty, _typeTable, this._isNull); + return this._Sty; }, set: function (value) { - this.m_styleBandedColumns=value; + this._Sty=value; _createSetPropertyAction(this.context, this, "StyleBandedColumns", value); }, enumerable: true, @@ -16004,11 +18236,11 @@ var Word; }); Object.defineProperty(Table.prototype, "styleBandedRows", { get: function () { - _throwIfNotLoaded("styleBandedRows", this.m_styleBandedRows, "Table", this._isNull); - return this.m_styleBandedRows; + _throwIfNotLoaded("styleBandedRows", this._Styl, _typeTable, this._isNull); + return this._Styl; }, set: function (value) { - this.m_styleBandedRows=value; + this._Styl=value; _createSetPropertyAction(this.context, this, "StyleBandedRows", value); }, enumerable: true, @@ -16016,11 +18248,11 @@ var Word; }); Object.defineProperty(Table.prototype, "styleBuiltIn", { get: function () { - _throwIfNotLoaded("styleBuiltIn", this.m_styleBuiltIn, "Table", this._isNull); - return this.m_styleBuiltIn; + _throwIfNotLoaded("styleBuiltIn", this._Style, _typeTable, this._isNull); + return this._Style; }, set: function (value) { - this.m_styleBuiltIn=value; + this._Style=value; _createSetPropertyAction(this.context, this, "StyleBuiltIn", value); }, enumerable: true, @@ -16028,11 +18260,11 @@ var Word; }); Object.defineProperty(Table.prototype, "styleFirstColumn", { get: function () { - _throwIfNotLoaded("styleFirstColumn", this.m_styleFirstColumn, "Table", this._isNull); - return this.m_styleFirstColumn; + _throwIfNotLoaded("styleFirstColumn", this._StyleF, _typeTable, this._isNull); + return this._StyleF; }, set: function (value) { - this.m_styleFirstColumn=value; + this._StyleF=value; _createSetPropertyAction(this.context, this, "StyleFirstColumn", value); }, enumerable: true, @@ -16040,11 +18272,11 @@ var Word; }); Object.defineProperty(Table.prototype, "styleLastColumn", { get: function () { - _throwIfNotLoaded("styleLastColumn", this.m_styleLastColumn, "Table", this._isNull); - return this.m_styleLastColumn; + _throwIfNotLoaded("styleLastColumn", this._StyleL, _typeTable, this._isNull); + return this._StyleL; }, set: function (value) { - this.m_styleLastColumn=value; + this._StyleL=value; _createSetPropertyAction(this.context, this, "StyleLastColumn", value); }, enumerable: true, @@ -16052,11 +18284,11 @@ var Word; }); Object.defineProperty(Table.prototype, "styleTotalRow", { get: function () { - _throwIfNotLoaded("styleTotalRow", this.m_styleTotalRow, "Table", this._isNull); - return this.m_styleTotalRow; + _throwIfNotLoaded("styleTotalRow", this._StyleT, _typeTable, this._isNull); + return this._StyleT; }, set: function (value) { - this.m_styleTotalRow=value; + this._StyleT=value; _createSetPropertyAction(this.context, this, "StyleTotalRow", value); }, enumerable: true, @@ -16064,11 +18296,11 @@ var Word; }); Object.defineProperty(Table.prototype, "values", { get: function () { - _throwIfNotLoaded("values", this.m_values, "Table", this._isNull); - return this.m_values; + _throwIfNotLoaded("values", this._V, _typeTable, this._isNull); + return this._V; }, set: function (value) { - this.m_values=value; + this._V=value; _createSetPropertyAction(this.context, this, "Values", value); }, enumerable: true, @@ -16076,11 +18308,11 @@ var Word; }); Object.defineProperty(Table.prototype, "verticalAlignment", { get: function () { - _throwIfNotLoaded("verticalAlignment", this.m_verticalAlignment, "Table", this._isNull); - return this.m_verticalAlignment; + _throwIfNotLoaded("verticalAlignment", this._Ve, _typeTable, this._isNull); + return this._Ve; }, set: function (value) { - this.m_verticalAlignment=value; + this._Ve=value; _createSetPropertyAction(this.context, this, "VerticalAlignment", value); }, enumerable: true, @@ -16088,11 +18320,11 @@ var Word; }); Object.defineProperty(Table.prototype, "width", { get: function () { - _throwIfNotLoaded("width", this.m_width, "Table", this._isNull); - return this.m_width; + _throwIfNotLoaded("width", this._W, _typeTable, this._isNull); + return this._W; }, set: function (value) { - this.m_width=value; + this._W=value; _createSetPropertyAction(this.context, this, "Width", value); }, enumerable: true, @@ -16100,31 +18332,22 @@ var Word; }); Object.defineProperty(Table.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "Table", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeTable, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(Table.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "Table", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTable, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); Table.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["values", "style", "headerRowCount", "styleTotalRow", "styleFirstColumn", "styleLastColumn", "styleBandedRows", "styleBandedColumns", "shadingColor", "horizontalAlignment", "verticalAlignment", "width", "styleBuiltIn", "alignment"], ["font"], [ - "parentBody", - "parentContentControl", - "parentContentControlOrNullObject", - "parentTable", - "parentTableCell", - "parentTableCellOrNullObject", - "parentTableOrNullObject", - "rows", - "tables", "parentBody", "parentContentControl", "parentContentControlOrNullObject", @@ -16137,85 +18360,86 @@ var Word; ]); }; Table.prototype.addColumns=function (insertLocation, columnCount, values) { - _createMethodAction(this.context, this, "AddColumns", 0, [insertLocation, columnCount, values]); + _createMethodAction(this.context, this, "AddColumns", 0, [insertLocation, columnCount, values], false); }; Table.prototype.addRows=function (insertLocation, rowCount, values) { - return new Word.TableRowCollection(this.context, _createMethodObjectPath(this.context, this, "AddRows", 0, [insertLocation, rowCount, values], true, false, null)); + return new Word.TableRowCollection(this.context, _createMethodObjectPath(this.context, this, "AddRows", 0, [insertLocation, rowCount, values], true, false, null, false)); }; Table.prototype.autoFitWindow=function () { - _createMethodAction(this.context, this, "AutoFitWindow", 0, []); + _createMethodAction(this.context, this, "AutoFitWindow", 0, [], false); }; Table.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; Table.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; Table.prototype.deleteColumns=function (columnIndex, columnCount) { - _createMethodAction(this.context, this, "DeleteColumns", 0, [columnIndex, columnCount]); + _createMethodAction(this.context, this, "DeleteColumns", 0, [columnIndex, columnCount], false); }; Table.prototype.deleteRows=function (rowIndex, rowCount) { - _createMethodAction(this.context, this, "DeleteRows", 0, [rowIndex, rowCount]); + _createMethodAction(this.context, this, "DeleteRows", 0, [rowIndex, rowCount], false); }; Table.prototype.distributeColumns=function () { - _createMethodAction(this.context, this, "DistributeColumns", 0, []); + _createMethodAction(this.context, this, "DistributeColumns", 0, [], false); }; Table.prototype.getBorder=function (borderLocation) { - return new Word.TableBorder(this.context, _createMethodObjectPath(this.context, this, "GetBorder", 1, [borderLocation], false, false, null)); + return new Word.TableBorder(this.context, _createMethodObjectPath(this.context, this, "GetBorder", 1, [borderLocation], false, false, null, false)); }; Table.prototype.getCell=function (rowIndex, cellIndex) { - return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [rowIndex, cellIndex], false, false, null)); + return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetCell", 1, [rowIndex, cellIndex], false, false, null, false)); }; Table.prototype.getCellOrNullObject=function (rowIndex, cellIndex) { - return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetCellOrNullObject", 1, [rowIndex, cellIndex], false, false, null)); + return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetCellOrNullObject", 1, [rowIndex, cellIndex], false, false, null, false)); }; Table.prototype.getCellPadding=function (cellPaddingLocation) { - var action=_createMethodAction(this.context, this, "GetCellPadding", 1, [cellPaddingLocation]); + var action=_createMethodAction(this.context, this, "GetCellPadding", 1, [cellPaddingLocation], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; Table.prototype.getNext=function () { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null)); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null, false)); }; Table.prototype.getNextOrNullObject=function () { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null)); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null, false)); }; Table.prototype.getParagraphAfter=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphAfter", 1, [], false, false, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphAfter", 1, [], false, false, null, false)); }; Table.prototype.getParagraphAfterOrNullObject=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphAfterOrNullObject", 1, [], false, false, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphAfterOrNullObject", 1, [], false, false, null, false)); }; Table.prototype.getParagraphBefore=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphBefore", 1, [], false, false, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphBefore", 1, [], false, false, null, false)); }; Table.prototype.getParagraphBeforeOrNullObject=function () { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphBeforeOrNullObject", 1, [], false, false, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "GetParagraphBeforeOrNullObject", 1, [], false, false, null, false)); }; Table.prototype.getRange=function (rangeLocation) { - return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null)); + return new Word.Range(this.context, _createMethodObjectPath(this.context, this, "GetRange", 1, [rangeLocation], false, false, null, false)); }; Table.prototype.insertContentControl=function () { - return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null)); + return new Word.ContentControl(this.context, _createMethodObjectPath(this.context, this, "InsertContentControl", 0, [], false, true, null, false)); }; Table.prototype.insertParagraph=function (paragraphText, insertLocation) { - return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null)); + return new Word.Paragraph(this.context, _createMethodObjectPath(this.context, this, "InsertParagraph", 0, [paragraphText, insertLocation], false, true, null, false)); }; Table.prototype.insertTable=function (rowCount, columnCount, insertLocation, values) { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null)); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "InsertTable", 0, [rowCount, columnCount, insertLocation, values], false, true, null, false)); }; Table.prototype.search=function (searchText, searchOptions) { - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null)); + searchOptions=_normalizeSearchOptions(this.context, searchOptions); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null, false)); }; Table.prototype.select=function (selectionMode) { - _createMethodAction(this.context, this, "Select", 1, [selectionMode]); + _createMethodAction(this.context, this, "Select", 1, [selectionMode], false); }; Table.prototype.setCellPadding=function (cellPaddingLocation, cellPadding) { - _createMethodAction(this.context, this, "SetCellPadding", 0, [cellPaddingLocation, cellPadding]); + _createMethodAction(this.context, this, "SetCellPadding", 0, [cellPaddingLocation, cellPadding], false); }; Table.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; Table.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16224,67 +18448,75 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Alignment"])) { - this.m_alignment=obj["Alignment"]; + this._A=obj["Alignment"]; } if (!_isUndefined(obj["HeaderRowCount"])) { - this.m_headerRowCount=obj["HeaderRowCount"]; + this._H=obj["HeaderRowCount"]; } if (!_isUndefined(obj["HorizontalAlignment"])) { - this.m_horizontalAlignment=obj["HorizontalAlignment"]; + this._Ho=obj["HorizontalAlignment"]; } if (!_isUndefined(obj["IsUniform"])) { - this.m_isUniform=obj["IsUniform"]; + this._I=obj["IsUniform"]; } if (!_isUndefined(obj["NestingLevel"])) { - this.m_nestingLevel=obj["NestingLevel"]; + this._N=obj["NestingLevel"]; } if (!_isUndefined(obj["RowCount"])) { - this.m_rowCount=obj["RowCount"]; + this._R=obj["RowCount"]; } if (!_isUndefined(obj["ShadingColor"])) { - this.m_shadingColor=obj["ShadingColor"]; + this._S=obj["ShadingColor"]; } if (!_isUndefined(obj["Style"])) { - this.m_style=obj["Style"]; + this._St=obj["Style"]; } if (!_isUndefined(obj["StyleBandedColumns"])) { - this.m_styleBandedColumns=obj["StyleBandedColumns"]; + this._Sty=obj["StyleBandedColumns"]; } if (!_isUndefined(obj["StyleBandedRows"])) { - this.m_styleBandedRows=obj["StyleBandedRows"]; + this._Styl=obj["StyleBandedRows"]; } if (!_isUndefined(obj["StyleBuiltIn"])) { - this.m_styleBuiltIn=obj["StyleBuiltIn"]; + this._Style=obj["StyleBuiltIn"]; } if (!_isUndefined(obj["StyleFirstColumn"])) { - this.m_styleFirstColumn=obj["StyleFirstColumn"]; + this._StyleF=obj["StyleFirstColumn"]; } if (!_isUndefined(obj["StyleLastColumn"])) { - this.m_styleLastColumn=obj["StyleLastColumn"]; + this._StyleL=obj["StyleLastColumn"]; } if (!_isUndefined(obj["StyleTotalRow"])) { - this.m_styleTotalRow=obj["StyleTotalRow"]; + this._StyleT=obj["StyleTotalRow"]; } if (!_isUndefined(obj["Values"])) { - this.m_values=obj["Values"]; + this._V=obj["Values"]; } if (!_isUndefined(obj["VerticalAlignment"])) { - this.m_verticalAlignment=obj["VerticalAlignment"]; + this._Ve=obj["VerticalAlignment"]; } if (!_isUndefined(obj["Width"])) { - this.m_width=obj["Width"]; + this._W=obj["Width"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["font", "Font", "parentBody", "ParentBody", "parentContentControl", "ParentContentControl", "parentContentControlOrNullObject", "ParentContentControlOrNullObject", "parentTable", "ParentTable", "parentTableCell", "ParentTableCell", "parentTableCellOrNullObject", "ParentTableCellOrNullObject", "parentTableOrNullObject", "ParentTableOrNullObject", "rows", "Rows", "tables", "Tables"]); }; Table.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + Table.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + Table.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + Table.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; Table.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -16292,10 +18524,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; Table.prototype.track=function () { @@ -16307,34 +18539,42 @@ var Word; return this; }; Table.prototype.toJSON=function () { - return { - "alignment": this.m_alignment, - "font": this.m_font, - "headerRowCount": this.m_headerRowCount, - "horizontalAlignment": this.m_horizontalAlignment, - "isUniform": this.m_isUniform, - "nestingLevel": this.m_nestingLevel, - "rowCount": this.m_rowCount, - "shadingColor": this.m_shadingColor, - "style": this.m_style, - "styleBandedColumns": this.m_styleBandedColumns, - "styleBandedRows": this.m_styleBandedRows, - "styleBuiltIn": this.m_styleBuiltIn, - "styleFirstColumn": this.m_styleFirstColumn, - "styleLastColumn": this.m_styleLastColumn, - "styleTotalRow": this.m_styleTotalRow, - "values": this.m_values, - "verticalAlignment": this.m_verticalAlignment, - "width": this.m_width - }; + return _toJson(this, { + "alignment": this._A, + "headerRowCount": this._H, + "horizontalAlignment": this._Ho, + "isUniform": this._I, + "nestingLevel": this._N, + "rowCount": this._R, + "shadingColor": this._S, + "style": this._St, + "styleBandedColumns": this._Sty, + "styleBandedRows": this._Styl, + "styleBuiltIn": this._Style, + "styleFirstColumn": this._StyleF, + "styleLastColumn": this._StyleL, + "styleTotalRow": this._StyleT, + "values": this._V, + "verticalAlignment": this._Ve, + "width": this._W, + }, { + "font": this._F, + "rows": this._Ro, + "tables": this._T, + }); + }; + Table.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return Table; }(OfficeExtension.ClientObject)); Word.Table=Table; + var _typeTableCollection="TableCollection"; var TableCollection=(function (_super) { __extends(TableCollection, _super); function TableCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableCollection.prototype, "_className", { get: function () { @@ -16345,7 +18585,7 @@ var Word; }); Object.defineProperty(TableCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -16353,23 +18593,23 @@ var Word; }); Object.defineProperty(TableCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); TableCollection.prototype.getFirst=function () { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; TableCollection.prototype.getFirstOrNullObject=function () { - return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + return new Word.Table(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; TableCollection.prototype._GetItem=function (index) { return new Word.Table(this.context, _createIndexerObjectPath(this.context, this, [index])); }; TableCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16378,7 +18618,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -16391,8 +18631,16 @@ var Word; } }; TableCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TableCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; TableCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -16400,7 +18648,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; TableCollection.prototype.track=function () { @@ -16412,15 +18660,16 @@ var Word; return this; }; TableCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return TableCollection; }(OfficeExtension.ClientObject)); Word.TableCollection=TableCollection; + var _typeTableRow="TableRow"; var TableRow=(function (_super) { __extends(TableRow, _super); function TableRow() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableRow.prototype, "_className", { get: function () { @@ -16431,49 +18680,49 @@ var Word; }); Object.defineProperty(TableRow.prototype, "cells", { get: function () { - if (!this.m_cells) { - this.m_cells=new Word.TableCellCollection(this.context, _createPropertyObjectPath(this.context, this, "Cells", true, false)); + if (!this._Ce) { + this._Ce=new Word.TableCellCollection(this.context, _createPropertyObjectPath(this.context, this, "Cells", true, false, false)); } - return this.m_cells; + return this._Ce; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "font", { get: function () { - if (!this.m_font) { - this.m_font=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false)); + if (!this._F) { + this._F=new Word.Font(this.context, _createPropertyObjectPath(this.context, this, "Font", false, false, false)); } - return this.m_font; + return this._F; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + if (!this._P) { + this._P=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "cellCount", { get: function () { - _throwIfNotLoaded("cellCount", this.m_cellCount, "TableRow", this._isNull); - return this.m_cellCount; + _throwIfNotLoaded("cellCount", this._C, _typeTableRow, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "horizontalAlignment", { get: function () { - _throwIfNotLoaded("horizontalAlignment", this.m_horizontalAlignment, "TableRow", this._isNull); - return this.m_horizontalAlignment; + _throwIfNotLoaded("horizontalAlignment", this._H, _typeTableRow, this._isNull); + return this._H; }, set: function (value) { - this.m_horizontalAlignment=value; + this._H=value; _createSetPropertyAction(this.context, this, "HorizontalAlignment", value); }, enumerable: true, @@ -16481,19 +18730,19 @@ var Word; }); Object.defineProperty(TableRow.prototype, "isHeader", { get: function () { - _throwIfNotLoaded("isHeader", this.m_isHeader, "TableRow", this._isNull); - return this.m_isHeader; + _throwIfNotLoaded("isHeader", this._I, _typeTableRow, this._isNull); + return this._I; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "preferredHeight", { get: function () { - _throwIfNotLoaded("preferredHeight", this.m_preferredHeight, "TableRow", this._isNull); - return this.m_preferredHeight; + _throwIfNotLoaded("preferredHeight", this._Pr, _typeTableRow, this._isNull); + return this._Pr; }, set: function (value) { - this.m_preferredHeight=value; + this._Pr=value; _createSetPropertyAction(this.context, this, "PreferredHeight", value); }, enumerable: true, @@ -16501,19 +18750,19 @@ var Word; }); Object.defineProperty(TableRow.prototype, "rowIndex", { get: function () { - _throwIfNotLoaded("rowIndex", this.m_rowIndex, "TableRow", this._isNull); - return this.m_rowIndex; + _throwIfNotLoaded("rowIndex", this._R, _typeTableRow, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "shadingColor", { get: function () { - _throwIfNotLoaded("shadingColor", this.m_shadingColor, "TableRow", this._isNull); - return this.m_shadingColor; + _throwIfNotLoaded("shadingColor", this._S, _typeTableRow, this._isNull); + return this._S; }, set: function (value) { - this.m_shadingColor=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShadingColor", value); }, enumerable: true, @@ -16521,11 +18770,11 @@ var Word; }); Object.defineProperty(TableRow.prototype, "values", { get: function () { - _throwIfNotLoaded("values", this.m_values, "TableRow", this._isNull); - return this.m_values; + _throwIfNotLoaded("values", this._V, _typeTableRow, this._isNull); + return this._V; }, set: function (value) { - this.m_values=value; + this._V=value; _createSetPropertyAction(this.context, this, "Values", value); }, enumerable: true, @@ -16533,11 +18782,11 @@ var Word; }); Object.defineProperty(TableRow.prototype, "verticalAlignment", { get: function () { - _throwIfNotLoaded("verticalAlignment", this.m_verticalAlignment, "TableRow", this._isNull); - return this.m_verticalAlignment; + _throwIfNotLoaded("verticalAlignment", this._Ve, _typeTableRow, this._isNull); + return this._Ve; }, set: function (value) { - this.m_verticalAlignment=value; + this._Ve=value; _createSetPropertyAction(this.context, this, "VerticalAlignment", value); }, enumerable: true, @@ -16545,63 +18794,62 @@ var Word; }); Object.defineProperty(TableRow.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "TableRow", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeTableRow, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(TableRow.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableRow", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableRow, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); TableRow.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["values", "shadingColor", "horizontalAlignment", "verticalAlignment", "preferredHeight"], ["font"], [ - "cells", - "parentTable", "cells", "parentTable" ]); }; TableRow.prototype.clear=function () { - _createMethodAction(this.context, this, "Clear", 0, []); + _createMethodAction(this.context, this, "Clear", 0, [], false); }; TableRow.prototype.delete=function () { - _createMethodAction(this.context, this, "Delete", 0, []); + _createMethodAction(this.context, this, "Delete", 0, [], false); }; TableRow.prototype.getBorder=function (borderLocation) { - return new Word.TableBorder(this.context, _createMethodObjectPath(this.context, this, "GetBorder", 1, [borderLocation], false, false, null)); + return new Word.TableBorder(this.context, _createMethodObjectPath(this.context, this, "GetBorder", 1, [borderLocation], false, false, null, false)); }; TableRow.prototype.getCellPadding=function (cellPaddingLocation) { - var action=_createMethodAction(this.context, this, "GetCellPadding", 1, [cellPaddingLocation]); + var action=_createMethodAction(this.context, this, "GetCellPadding", 1, [cellPaddingLocation], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; TableRow.prototype.getNext=function () { - return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null)); + return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null, false)); }; TableRow.prototype.getNextOrNullObject=function () { - return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null)); + return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null, false)); }; TableRow.prototype.insertRows=function (insertLocation, rowCount, values) { - return new Word.TableRowCollection(this.context, _createMethodObjectPath(this.context, this, "InsertRows", 1, [insertLocation, rowCount, values], true, false, null)); + return new Word.TableRowCollection(this.context, _createMethodObjectPath(this.context, this, "InsertRows", 1, [insertLocation, rowCount, values], true, false, null, false)); }; TableRow.prototype.search=function (searchText, searchOptions) { - return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null)); + searchOptions=_normalizeSearchOptions(this.context, searchOptions); + return new Word.RangeCollection(this.context, _createMethodObjectPath(this.context, this, "Search", 1, [searchText, searchOptions], true, false, null, false)); }; TableRow.prototype.select=function (selectionMode) { - _createMethodAction(this.context, this, "Select", 1, [selectionMode]); + _createMethodAction(this.context, this, "Select", 1, [selectionMode], false); }; TableRow.prototype.setCellPadding=function (cellPaddingLocation, cellPadding) { - _createMethodAction(this.context, this, "SetCellPadding", 0, [cellPaddingLocation, cellPadding]); + _createMethodAction(this.context, this, "SetCellPadding", 0, [cellPaddingLocation, cellPadding], false); }; TableRow.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableRow.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16610,40 +18858,48 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["CellCount"])) { - this.m_cellCount=obj["CellCount"]; + this._C=obj["CellCount"]; } if (!_isUndefined(obj["HorizontalAlignment"])) { - this.m_horizontalAlignment=obj["HorizontalAlignment"]; + this._H=obj["HorizontalAlignment"]; } if (!_isUndefined(obj["IsHeader"])) { - this.m_isHeader=obj["IsHeader"]; + this._I=obj["IsHeader"]; } if (!_isUndefined(obj["PreferredHeight"])) { - this.m_preferredHeight=obj["PreferredHeight"]; + this._Pr=obj["PreferredHeight"]; } if (!_isUndefined(obj["RowIndex"])) { - this.m_rowIndex=obj["RowIndex"]; + this._R=obj["RowIndex"]; } if (!_isUndefined(obj["ShadingColor"])) { - this.m_shadingColor=obj["ShadingColor"]; + this._S=obj["ShadingColor"]; } if (!_isUndefined(obj["Values"])) { - this.m_values=obj["Values"]; + this._V=obj["Values"]; } if (!_isUndefined(obj["VerticalAlignment"])) { - this.m_verticalAlignment=obj["VerticalAlignment"]; + this._Ve=obj["VerticalAlignment"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["cells", "Cells", "font", "Font", "parentTable", "ParentTable"]); }; TableRow.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableRow.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TableRow.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableRow.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; TableRow.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -16651,10 +18907,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; TableRow.prototype.track=function () { @@ -16666,25 +18922,32 @@ var Word; return this; }; TableRow.prototype.toJSON=function () { - return { - "cellCount": this.m_cellCount, - "font": this.m_font, - "horizontalAlignment": this.m_horizontalAlignment, - "isHeader": this.m_isHeader, - "preferredHeight": this.m_preferredHeight, - "rowIndex": this.m_rowIndex, - "shadingColor": this.m_shadingColor, - "values": this.m_values, - "verticalAlignment": this.m_verticalAlignment - }; + return _toJson(this, { + "cellCount": this._C, + "horizontalAlignment": this._H, + "isHeader": this._I, + "preferredHeight": this._Pr, + "rowIndex": this._R, + "shadingColor": this._S, + "values": this._V, + "verticalAlignment": this._Ve, + }, { + "cells": this._Ce, + "font": this._F, + }); + }; + TableRow.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TableRow; }(OfficeExtension.ClientObject)); Word.TableRow=TableRow; + var _typeTableRowCollection="TableRowCollection"; var TableRowCollection=(function (_super) { __extends(TableRowCollection, _super); function TableRowCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableRowCollection.prototype, "_className", { get: function () { @@ -16695,7 +18958,7 @@ var Word; }); Object.defineProperty(TableRowCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableRowCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableRowCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -16703,23 +18966,23 @@ var Word; }); Object.defineProperty(TableRowCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableRowCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableRowCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); TableRowCollection.prototype.getFirst=function () { - return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; TableRowCollection.prototype.getFirstOrNullObject=function () { - return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + return new Word.TableRow(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; TableRowCollection.prototype._GetItem=function (index) { return new Word.TableRow(this.context, _createIndexerObjectPath(this.context, this, [index])); }; TableRowCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableRowCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16728,7 +18991,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -16741,8 +19004,16 @@ var Word; } }; TableRowCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableRowCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TableRowCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableRowCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; TableRowCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -16750,7 +19021,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; TableRowCollection.prototype.track=function () { @@ -16762,15 +19033,16 @@ var Word; return this; }; TableRowCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return TableRowCollection; }(OfficeExtension.ClientObject)); Word.TableRowCollection=TableRowCollection; + var _typeTableCell="TableCell"; var TableCell=(function (_super) { __extends(TableCell, _super); function TableCell() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableCell.prototype, "_className", { get: function () { @@ -16781,49 +19053,49 @@ var Word; }); Object.defineProperty(TableCell.prototype, "body", { get: function () { - if (!this.m_body) { - this.m_body=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "Body", false, false)); + if (!this._B) { + this._B=new Word.Body(this.context, _createPropertyObjectPath(this.context, this, "Body", false, false, false)); } - return this.m_body; + return this._B; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "parentRow", { get: function () { - if (!this.m_parentRow) { - this.m_parentRow=new Word.TableRow(this.context, _createPropertyObjectPath(this.context, this, "ParentRow", false, false)); + if (!this._P) { + this._P=new Word.TableRow(this.context, _createPropertyObjectPath(this.context, this, "ParentRow", false, false, false)); } - return this.m_parentRow; + return this._P; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "parentTable", { get: function () { - if (!this.m_parentTable) { - this.m_parentTable=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false)); + if (!this._Pa) { + this._Pa=new Word.Table(this.context, _createPropertyObjectPath(this.context, this, "ParentTable", false, false, false)); } - return this.m_parentTable; + return this._Pa; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "cellIndex", { get: function () { - _throwIfNotLoaded("cellIndex", this.m_cellIndex, "TableCell", this._isNull); - return this.m_cellIndex; + _throwIfNotLoaded("cellIndex", this._C, _typeTableCell, this._isNull); + return this._C; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "columnWidth", { get: function () { - _throwIfNotLoaded("columnWidth", this.m_columnWidth, "TableCell", this._isNull); - return this.m_columnWidth; + _throwIfNotLoaded("columnWidth", this._Co, _typeTableCell, this._isNull); + return this._Co; }, set: function (value) { - this.m_columnWidth=value; + this._Co=value; _createSetPropertyAction(this.context, this, "ColumnWidth", value); }, enumerable: true, @@ -16831,11 +19103,11 @@ var Word; }); Object.defineProperty(TableCell.prototype, "horizontalAlignment", { get: function () { - _throwIfNotLoaded("horizontalAlignment", this.m_horizontalAlignment, "TableCell", this._isNull); - return this.m_horizontalAlignment; + _throwIfNotLoaded("horizontalAlignment", this._H, _typeTableCell, this._isNull); + return this._H; }, set: function (value) { - this.m_horizontalAlignment=value; + this._H=value; _createSetPropertyAction(this.context, this, "HorizontalAlignment", value); }, enumerable: true, @@ -16843,19 +19115,19 @@ var Word; }); Object.defineProperty(TableCell.prototype, "rowIndex", { get: function () { - _throwIfNotLoaded("rowIndex", this.m_rowIndex, "TableCell", this._isNull); - return this.m_rowIndex; + _throwIfNotLoaded("rowIndex", this._R, _typeTableCell, this._isNull); + return this._R; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "shadingColor", { get: function () { - _throwIfNotLoaded("shadingColor", this.m_shadingColor, "TableCell", this._isNull); - return this.m_shadingColor; + _throwIfNotLoaded("shadingColor", this._S, _typeTableCell, this._isNull); + return this._S; }, set: function (value) { - this.m_shadingColor=value; + this._S=value; _createSetPropertyAction(this.context, this, "ShadingColor", value); }, enumerable: true, @@ -16863,11 +19135,11 @@ var Word; }); Object.defineProperty(TableCell.prototype, "value", { get: function () { - _throwIfNotLoaded("value", this.m_value, "TableCell", this._isNull); - return this.m_value; + _throwIfNotLoaded("value", this._V, _typeTableCell, this._isNull); + return this._V; }, set: function (value) { - this.m_value=value; + this._V=value; _createSetPropertyAction(this.context, this, "Value", value); }, enumerable: true, @@ -16875,11 +19147,11 @@ var Word; }); Object.defineProperty(TableCell.prototype, "verticalAlignment", { get: function () { - _throwIfNotLoaded("verticalAlignment", this.m_verticalAlignment, "TableCell", this._isNull); - return this.m_verticalAlignment; + _throwIfNotLoaded("verticalAlignment", this._Ve, _typeTableCell, this._isNull); + return this._Ve; }, set: function (value) { - this.m_verticalAlignment=value; + this._Ve=value; _createSetPropertyAction(this.context, this, "VerticalAlignment", value); }, enumerable: true, @@ -16887,68 +19159,66 @@ var Word; }); Object.defineProperty(TableCell.prototype, "width", { get: function () { - _throwIfNotLoaded("width", this.m_width, "TableCell", this._isNull); - return this.m_width; + _throwIfNotLoaded("width", this._W, _typeTableCell, this._isNull); + return this._W; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "_Id", { get: function () { - _throwIfNotLoaded("_Id", this.m__Id, "TableCell", this._isNull); - return this.m__Id; + _throwIfNotLoaded("_Id", this.__I, _typeTableCell, this._isNull); + return this.__I; }, enumerable: true, configurable: true }); Object.defineProperty(TableCell.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableCell", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableCell, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); TableCell.prototype.set=function (properties, options) { this._recursivelySet(properties, options, ["value", "shadingColor", "horizontalAlignment", "verticalAlignment", "columnWidth"], ["body"], [ - "parentRow", - "parentTable", "parentRow", "parentTable" ]); }; TableCell.prototype.deleteColumn=function () { - _createMethodAction(this.context, this, "DeleteColumn", 0, []); + _createMethodAction(this.context, this, "DeleteColumn", 0, [], false); }; TableCell.prototype.deleteRow=function () { - _createMethodAction(this.context, this, "DeleteRow", 0, []); + _createMethodAction(this.context, this, "DeleteRow", 0, [], false); }; TableCell.prototype.getBorder=function (borderLocation) { - return new Word.TableBorder(this.context, _createMethodObjectPath(this.context, this, "GetBorder", 1, [borderLocation], false, false, null)); + return new Word.TableBorder(this.context, _createMethodObjectPath(this.context, this, "GetBorder", 1, [borderLocation], false, false, null, false)); }; TableCell.prototype.getCellPadding=function (cellPaddingLocation) { - var action=_createMethodAction(this.context, this, "GetCellPadding", 1, [cellPaddingLocation]); + var action=_createMethodAction(this.context, this, "GetCellPadding", 1, [cellPaddingLocation], false); var ret=new OfficeExtension.ClientResult(); _addActionResultHandler(this, action, ret); return ret; }; TableCell.prototype.getNext=function () { - return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null)); + return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetNext", 1, [], false, false, null, false)); }; TableCell.prototype.getNextOrNullObject=function () { - return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null)); + return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetNextOrNullObject", 1, [], false, false, null, false)); }; TableCell.prototype.insertColumns=function (insertLocation, columnCount, values) { - _createMethodAction(this.context, this, "InsertColumns", 0, [insertLocation, columnCount, values]); + _createMethodAction(this.context, this, "InsertColumns", 0, [insertLocation, columnCount, values], false); }; TableCell.prototype.insertRows=function (insertLocation, rowCount, values) { - return new Word.TableRowCollection(this.context, _createMethodObjectPath(this.context, this, "InsertRows", 0, [insertLocation, rowCount, values], true, false, null)); + return new Word.TableRowCollection(this.context, _createMethodObjectPath(this.context, this, "InsertRows", 0, [insertLocation, rowCount, values], true, false, null, false)); }; TableCell.prototype.setCellPadding=function (cellPaddingLocation, cellPadding) { - _createMethodAction(this.context, this, "SetCellPadding", 0, [cellPaddingLocation, cellPadding]); + _createMethodAction(this.context, this, "SetCellPadding", 0, [cellPaddingLocation, cellPadding], false); }; TableCell.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableCell.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -16957,40 +19227,48 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["CellIndex"])) { - this.m_cellIndex=obj["CellIndex"]; + this._C=obj["CellIndex"]; } if (!_isUndefined(obj["ColumnWidth"])) { - this.m_columnWidth=obj["ColumnWidth"]; + this._Co=obj["ColumnWidth"]; } if (!_isUndefined(obj["HorizontalAlignment"])) { - this.m_horizontalAlignment=obj["HorizontalAlignment"]; + this._H=obj["HorizontalAlignment"]; } if (!_isUndefined(obj["RowIndex"])) { - this.m_rowIndex=obj["RowIndex"]; + this._R=obj["RowIndex"]; } if (!_isUndefined(obj["ShadingColor"])) { - this.m_shadingColor=obj["ShadingColor"]; + this._S=obj["ShadingColor"]; } if (!_isUndefined(obj["Value"])) { - this.m_value=obj["Value"]; + this._V=obj["Value"]; } if (!_isUndefined(obj["VerticalAlignment"])) { - this.m_verticalAlignment=obj["VerticalAlignment"]; + this._Ve=obj["VerticalAlignment"]; } if (!_isUndefined(obj["Width"])) { - this.m_width=obj["Width"]; + this._W=obj["Width"]; } if (!_isUndefined(obj["_Id"])) { - this.m__Id=obj["_Id"]; + this.__I=obj["_Id"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } _handleNavigationPropertyResults(this, obj, ["body", "Body", "parentRow", "ParentRow", "parentTable", "ParentTable"]); }; TableCell.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableCell.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TableCell.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableCell.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; TableCell.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -16998,10 +19276,10 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } if (!_isUndefined(value["_Id"])) { - this.m__Id=value["_Id"]; + this.__I=value["_Id"]; } }; TableCell.prototype.track=function () { @@ -17013,25 +19291,31 @@ var Word; return this; }; TableCell.prototype.toJSON=function () { - return { - "body": this.m_body, - "cellIndex": this.m_cellIndex, - "columnWidth": this.m_columnWidth, - "horizontalAlignment": this.m_horizontalAlignment, - "rowIndex": this.m_rowIndex, - "shadingColor": this.m_shadingColor, - "value": this.m_value, - "verticalAlignment": this.m_verticalAlignment, - "width": this.m_width - }; + return _toJson(this, { + "cellIndex": this._C, + "columnWidth": this._Co, + "horizontalAlignment": this._H, + "rowIndex": this._R, + "shadingColor": this._S, + "value": this._V, + "verticalAlignment": this._Ve, + "width": this._W, + }, { + "body": this._B, + }); + }; + TableCell.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TableCell; }(OfficeExtension.ClientObject)); Word.TableCell=TableCell; + var _typeTableCellCollection="TableCellCollection"; var TableCellCollection=(function (_super) { __extends(TableCellCollection, _super); function TableCellCollection() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableCellCollection.prototype, "_className", { get: function () { @@ -17042,7 +19326,7 @@ var Word; }); Object.defineProperty(TableCellCollection.prototype, "items", { get: function () { - _throwIfNotLoaded("items", this.m__items, "TableCellCollection", this._isNull); + _throwIfNotLoaded("items", this.m__items, _typeTableCellCollection, this._isNull); return this.m__items; }, enumerable: true, @@ -17050,23 +19334,23 @@ var Word; }); Object.defineProperty(TableCellCollection.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableCellCollection", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableCellCollection, this._isNull); + return this.__R; }, enumerable: true, configurable: true }); TableCellCollection.prototype.getFirst=function () { - return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null)); + return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetFirst", 1, [], false, false, null, false)); }; TableCellCollection.prototype.getFirstOrNullObject=function () { - return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null)); + return new Word.TableCell(this.context, _createMethodObjectPath(this.context, this, "GetFirstOrNullObject", 1, [], false, false, null, false)); }; TableCellCollection.prototype._GetItem=function (index) { return new Word.TableCell(this.context, _createIndexerObjectPath(this.context, this, [index])); }; TableCellCollection.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableCellCollection.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17075,7 +19359,7 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } if (!_isNullOrUndefined(obj[OfficeExtension.Constants.items])) { this.m__items=[]; @@ -17088,8 +19372,16 @@ var Word; } }; TableCellCollection.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableCellCollection.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TableCellCollection.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableCellCollection.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; TableCellCollection.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -17097,7 +19389,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; TableCellCollection.prototype.track=function () { @@ -17109,15 +19401,16 @@ var Word; return this; }; TableCellCollection.prototype.toJSON=function () { - return {}; + return _toJson(this, {}, {}, this.m__items); }; return TableCellCollection; }(OfficeExtension.ClientObject)); Word.TableCellCollection=TableCellCollection; + var _typeTableBorder="TableBorder"; var TableBorder=(function (_super) { __extends(TableBorder, _super); function TableBorder() { - _super.apply(this, arguments); + return _super !==null && _super.apply(this, arguments) || this; } Object.defineProperty(TableBorder.prototype, "_className", { get: function () { @@ -17128,11 +19421,11 @@ var Word; }); Object.defineProperty(TableBorder.prototype, "color", { get: function () { - _throwIfNotLoaded("color", this.m_color, "TableBorder", this._isNull); - return this.m_color; + _throwIfNotLoaded("color", this._C, _typeTableBorder, this._isNull); + return this._C; }, set: function (value) { - this.m_color=value; + this._C=value; _createSetPropertyAction(this.context, this, "Color", value); }, enumerable: true, @@ -17140,11 +19433,11 @@ var Word; }); Object.defineProperty(TableBorder.prototype, "type", { get: function () { - _throwIfNotLoaded("type", this.m_type, "TableBorder", this._isNull); - return this.m_type; + _throwIfNotLoaded("type", this._T, _typeTableBorder, this._isNull); + return this._T; }, set: function (value) { - this.m_type=value; + this._T=value; _createSetPropertyAction(this.context, this, "Type", value); }, enumerable: true, @@ -17152,11 +19445,11 @@ var Word; }); Object.defineProperty(TableBorder.prototype, "width", { get: function () { - _throwIfNotLoaded("width", this.m_width, "TableBorder", this._isNull); - return this.m_width; + _throwIfNotLoaded("width", this._W, _typeTableBorder, this._isNull); + return this._W; }, set: function (value) { - this.m_width=value; + this._W=value; _createSetPropertyAction(this.context, this, "Width", value); }, enumerable: true, @@ -17164,8 +19457,8 @@ var Word; }); Object.defineProperty(TableBorder.prototype, "_ReferenceId", { get: function () { - _throwIfNotLoaded("_ReferenceId", this.m__ReferenceId, "TableBorder", this._isNull); - return this.m__ReferenceId; + _throwIfNotLoaded("_ReferenceId", this.__R, _typeTableBorder, this._isNull); + return this.__R; }, enumerable: true, configurable: true @@ -17174,7 +19467,7 @@ var Word; this._recursivelySet(properties, options, ["color", "type", "width"], [], []); }; TableBorder.prototype._KeepReference=function () { - _createMethodAction(this.context, this, "_KeepReference", 1, []); + _createMethodAction(this.context, this, "_KeepReference", 1, [], false); }; TableBorder.prototype._handleResult=function (value) { _super.prototype._handleResult.call(this, value); @@ -17183,21 +19476,29 @@ var Word; var obj=value; _fixObjectPathIfNecessary(this, obj); if (!_isUndefined(obj["Color"])) { - this.m_color=obj["Color"]; + this._C=obj["Color"]; } if (!_isUndefined(obj["Type"])) { - this.m_type=obj["Type"]; + this._T=obj["Type"]; } if (!_isUndefined(obj["Width"])) { - this.m_width=obj["Width"]; + this._W=obj["Width"]; } if (!_isUndefined(obj["_ReferenceId"])) { - this.m__ReferenceId=obj["_ReferenceId"]; + this.__R=obj["_ReferenceId"]; } }; TableBorder.prototype.load=function (option) { - _load(this, option); - return this; + return _load(this, option); + }; + TableBorder.prototype.loadAndSync=function (option) { + return _loadAndSync(this, option); + }; + TableBorder.prototype.retrieve=function (option) { + return _retrieve(this, option); + }; + TableBorder.prototype.retrieveAndSync=function (option) { + return _retrieveAndSync(this, option); }; TableBorder.prototype._handleIdResult=function (value) { _super.prototype._handleIdResult.call(this, value); @@ -17205,7 +19506,7 @@ var Word; return; } if (!_isUndefined(value["_ReferenceId"])) { - this.m__ReferenceId=value["_ReferenceId"]; + this.__R=value["_ReferenceId"]; } }; TableBorder.prototype.track=function () { @@ -17217,11 +19518,15 @@ var Word; return this; }; TableBorder.prototype.toJSON=function () { - return { - "color": this.m_color, - "type": this.m_type, - "width": this.m_width - }; + return _toJson(this, { + "color": this._C, + "type": this._T, + "width": this._W, + }, {}); + }; + TableBorder.prototype.ensureUnchanged=function (data) { + _createEnsureUnchangedAction(this.context, this, data); + return; }; return TableBorder; }(OfficeExtension.ClientObject)); @@ -17617,9 +19922,10 @@ var Word; var RequestContext=(function (_super) { __extends(RequestContext, _super); function RequestContext(url) { - _super.call(this, url); - this.m_document=new Word.Document(this, OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(this)); - this._rootObject=this.m_document; + var _this=_super.call(this, url) || this; + _this.m_document=new Word.Document(_this, OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(_this)); + _this._rootObject=_this.m_document; + return _this; } Object.defineProperty(RequestContext.prototype, "document", { get: function () { @@ -17629,7 +19935,7 @@ var Word; configurable: true }); return RequestContext; - }(OfficeExtension.ClientRequestContext)); + }(OfficeCore.RequestContext)); Word.RequestContext=RequestContext; function run(arg1, arg2) { return OfficeExtension.ClientRequestContext._runBatch("Word.run", arguments, function () { return new Word.RequestContext(); }); @@ -17637,4 +19943,6 @@ var Word; Word.run=run; })(Word || (Word={})); +OfficeExtension.Utility._doApiNotSupportedCheck=true; + diff --git a/node_modules/@microsoft/office-js/dist/word-win32-16.01.js b/node_modules/@microsoft/office-js/dist/word-win32-16.01.js index 2867cd7..e9dbf32 100644 --- a/node_modules/@microsoft/office-js/dist/word-win32-16.01.js +++ b/node_modules/@microsoft/office-js/dist/word-win32-16.01.js @@ -1,7 +1,7 @@ /* Word Desktop-specific API library */ -/* Version: 16.0.7916.3000 */ +/* Version: 16.0.8904.3000 */ -/* Office.js Version: 16.0.7916.1000 */ +/* Office.js Version: 16.0.8916.1000 */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ @@ -18,4 +18,4 @@ * @version 2.3.0 */ -var __extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},OsfMsAjaxFactory,OSF,OSFLog,Logger,OSFAriaLogger,OSFAppTelemetry,OfficeExt,OfficeExtension,Word;(function(n){var t=function(){function t(){}var n=!0;return t.prototype.isMsAjaxLoaded=function(){var t="function",i="undefined";return typeof Sys!==i&&typeof Type!==i&&Sys.StringBuilder&&typeof Sys.StringBuilder===t&&Type.registerNamespace&&typeof Type.registerNamespace===t&&Type.registerClass&&typeof Type.registerClass===t&&typeof Function._validateParams===t&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===t?n:!1},t.prototype.loadMsAjaxFull=function(n){var t=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,n)},Object.defineProperty(t.prototype,"msAjaxError",{get:function(){var n=this;return n._msAjaxError==null&&n.isMsAjaxLoaded()&&(n._msAjaxError=Error),n._msAjaxError},set:function(n){this._msAjaxError=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxString",{get:function(){var n=this;return n._msAjaxString==null&&n.isMsAjaxLoaded()&&(n._msAjaxString=String),n._msAjaxString},set:function(n){this._msAjaxString=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxDebug",{get:function(){var n=this;return n._msAjaxDebug==null&&n.isMsAjaxLoaded()&&(n._msAjaxDebug=Sys.Debug),n._msAjaxDebug},set:function(n){this._msAjaxDebug=n},enumerable:n,configurable:n}),t}();n.MicrosoftAjaxFactory=t})(OfficeExt||(OfficeExt={}));OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory;OSF=OSF||{},function(n){var t=function(){function n(n){this._internalStorage=n}return n.prototype.getItem=function(n){try{return this._internalStorage&&this._internalStorage.getItem(n)}catch(t){return null}},n.prototype.setItem=function(n,t){try{this._internalStorage&&this._internalStorage.setItem(n,t)}catch(i){}},n.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(n){}},n.prototype.removeItem=function(n){try{this._internalStorage&&this._internalStorage.removeItem(n)}catch(t){}},n.prototype.getKeysWithPrefix=function(n){var r=[],u,t,i;try{for(u=this._internalStorage&&this._internalStorage.length||0,t=0;t0?i.push(t):t.tabIndex===0&&r.push(t):r.push(t);return i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;return r===0&&(r=i.indexOf(n)-i.indexOf(t)),r}),[].concat(i,r)}var f="focus",e="on",b="configurable",k="writable",o="enumerable",s="undefined",i=!0,t=!1,c=2147483647,n=null,r=-1,l=r,d="&_xdm_Info=",g="&_serializer_version=",nt="_xdm_",ut="_serializer_version=",a="#",tt="&",h="class",v={},ft=3e4,y=n,p=n,u=(new Date).getTime();return{set_entropy:function(n){var t,r,i;if(typeof n=="string")for(t=0;t1?l[l.length-1]:n,s,h,c,a;return u&&o!=n&&(o.indexOf(tt)>=0&&(o=o.split(tt)[0]),o=decodeURIComponent(o)),s=w(),!f&&s&&(h=window.name.indexOf(i),h>r&&(c=window.name.indexOf(";",h),c==r&&(c=window.name.length),a=window.name.substring(h,c),o?s.setItem(a,o):o=s.getItem(a))),o},getConversationId:function(){var i=window.location.search,t=n,r;return i&&(r=i.indexOf("&"),t=r>0?i.substring(1,r):i.substr(1),t&&t.charAt(t.length-1)==="="&&(t=t.substring(0,t.length-1),t&&(t=decodeURIComponent(t)))),t},getInfoItems:function(n){var t=n.split("$");return typeof t[1]==s&&(t=n.split("|")),typeof t[1]==s&&(t=n.split("%7C")),t},getXdmFieldValue:function(n,t){var r="",u=OSF.OUtil.parseXdmInfo(t),i;if(u&&(i=OSF.OUtil.getInfoItems(u),i!=undefined&&i.length>=3))switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]),f;if(u)throw u;for(f in r)if(u=Function._validateParameter(n[f],r[f],f),u)throw u;},writeProfilerMark:function(n){window.msWriteProfilerMark&&(window.msWriteProfilerMark(n),OsfMsAjaxFactory.msAjaxDebug.trace(n))},outputDebug:function(n){typeof OsfMsAjaxFactory!==s&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){var e,f;r=r||{};for(e in u)f=u[e],r[f]==undefined&&(r[f]=i);return Object.defineProperty(n,t,r),n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[o])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[o])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[k,o,b])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[k,o,b])},finalizeProperties:function(n,r){var e,u;r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8,f=e&255,i[t++]=r>>2,i[t++]=(r&3)<<4|u>>4,i[t++]=(u&15)<<2|f>>6,i[t++]=f&63,isNaN(e)||(r=e>>8,u=s&255,f=s>>8,i[t++]=r>>2,i[t++]=(r&3)<<4|u>>4,i[t++]=(u&15)<<2|f>>6,i[t++]=f&63),isNaN(e)?i[t-1]=64:isNaN(s)&&(i[t-2]=64,i[t-1]=64),h=0;h0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){var u,i,f,r;if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(u=[],i=0;in)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=rt(u),o=e?u.length-1:0,u.length===0)return n;while(!h&&o>=0&&on)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=rt(u),l=y(u,e),s=v(u.length,l,o),s<0)return n;while(!c&&s>=0&&s0;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[r%16],r=Math.floor(r/16);for(;t<32;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[Math.floor(Math.random()*16)];return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidActivationStatusChangedEvent:32,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];return i?(i.name||(i.name=n[this.errorCodes.ooeInternalError].name),i.message||(i.message=n[this.errorCodes.ooeInternalError].message)):i=n[this.errorCodes.ooeInternalError],i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString}}}}(),function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}(),r,i,h,u,c,l,f,a,e,v,y,p,w,b,o,k,d,g,s,nt,tt,it,rt;n.RequirementVersion=ut;r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){var f,u,e,i,r;if(n==undefined)return!1;if(t==undefined&&(t=0),f=this._setMap,u=f._sets,u.hasOwnProperty(n.toLowerCase())){e=u[n.toLowerCase()];try{if((i=this._getVersion(e),t=t+"",r=this._getVersion(t),i.major>0&&i.major>r.major)||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),i=0,r=0;if(t.length<2&&isNaN(Number(n)))throw u;else if(i=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(i)||isNaN(r))throw u;return{minor:r,major:i}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;h=function(n){function i(){n.call(this,{dialogapi:t})}return __extends(i,n),i}(i);n.DefaultDialogSetRequirement=h;u=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelClientDefaultSetRequirement=u;c=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(u);n.ExcelClientV1DefaultSetRequirement=c;l=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookClientDefaultSetRequirement=l;f=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return __extends(i,n),i}(i);n.WordClientDefaultSetRequirement=f;a=function(n){function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return __extends(i,n),i}(f);n.WordClientV1DefaultSetRequirement=a;e=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointClientDefaultSetRequirement=e;v=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(e);n.PowerpointClientV1DefaultSetRequirement=v;y=function(n){function i(){n.call(this,{selection:t,textcoercion:t})}return __extends(i,n),i}(i);n.ProjectClientDefaultSetRequirement=y;p=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return __extends(i,n),i}(i);n.ExcelWebDefaultSetRequirement=p;w=function(n){function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordWebDefaultSetRequirement=w;b=function(n){function i(){n.call(this,{activeview:t,settings:t})}return __extends(i,n),i}(i);n.PowerpointWebDefaultSetRequirement=b;o=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookWebDefaultSetRequirement=o;k=function(n){function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.SwayWebDefaultSetRequirement=k;d=function(n){function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return __extends(i,n),i}(i);n.AccessWebDefaultSetRequirement=d;g=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelIOSDefaultSetRequirement=g;s=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordIOSDefaultSetRequirement=s;nt=function(n){function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return __extends(t,n),t}(s);n.WordIOSV1DefaultSetRequirement=nt;tt=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointIOSDefaultSetRequirement=tt;it=function(n){function i(){n.call(this,{mailbox:t})}return __extends(i,n),i}(i);n.OutlookIOSDefaultSetRequirement=it;rt=function(){function n(){}var t="undefined";return n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},n.getDefaultRequirementMatrix=function(u){var f,e,s,o;return this.initializeDefaultSetMatrix(),f=undefined,e=u.get_requirementMatrix(),e!=undefined&&e.length>0&&typeof JSON!==t?(s=JSON.parse(u.get_requirementMatrix().toLowerCase()),f=new r(new i(s))):(o=n.getClientFullVersionString(u),f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[o]!=undefined?new r(n.DefaultSetArrayMatrix[o]):new r(new i({}))),f},n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix(),e;return f!=undefined&&f.length>0&&typeof JSON!==t?(e=JSON.parse(n.get_requirementMatrix().toLowerCase()),u=new r(new i(e))):u=new r(new h),u},n.getClientFullVersionString=function(n){var i=n.get_appMinorVersion(),u="",r="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;return f&&n.get_appVersion()==1?r=t==4096&&i>=15?"16.00.01":"16.00":n.get_appName()==64?r=n.get_appVersion():(u=i<10?"0"+i:""+i,r=n.get_appVersion()+"."+u),n.get_appName()+"-"+r},n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new c;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new v;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new l;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new w;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new b;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new g;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new k;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new nt;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new tt;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new it},n.Excel_RCLIENT_1600="1-16.00",n.Excel_RCLIENT_1601="1-16.01",n.Word_RCLIENT_1600="2-16.00",n.Word_RCLIENT_1601="2-16.01",n.PowerPoint_RCLIENT_1600="4-16.00",n.PowerPoint_RCLIENT_1601="4-16.01",n.Outlook_RCLIENT_1600="8-16.00",n.Excel_WAC_1600="16-16.00",n.Word_WAC_1600="32-16.00",n.Outlook_WAC_1600="64-16.00",n.Outlook_WAC_1601="64-16.01",n.Project_RCLIENT_1600="128-16.00",n.Access_WAC_1600="256-16.00",n.PowerPoint_WAC_1600="512-16.00",n.Excel_IOS_1600="1024-16.00",n.SWAY_WAC_1600="2048-16.00",n.Word_IOS_1600="4096-16.00",n.Word_IOS_16001="4096-16.00.01",n.PowerPoint_IOS_1600="8192-16.00",n.Outlook_IOS_1600="65536-16.00",n.DefaultSetArrayMatrix={},n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))}(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}return n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n},n.getInstance=function(){return n.hostObj===undefined&&(n.hostObj=new n),n.hostObj},n.prototype.getPlatform=function(){var n=this,t;return n.hostInfo.hostPlatform&&(t=n.hostInfo.hostPlatform.toLowerCase(),n.platformRemappings[t])?n.platformRemappings[t]:null},n.prototype.getHost=function(){var n=this,t;if(n.hostInfo.hostType){if(t=n.hostInfo.hostType.toLowerCase(),n.camelCaseMappings[t])return n.camelCaseMappings[t];if(t=n.capitalizeFirstLetter(n.hostInfo.hostType),Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null},n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null},n}();n.Host=t})(t=n.HostName||(n.HostName={}))}(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){n||(window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,n=!0)},disableShortcut:function(){n&&(t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window),n=!1)}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i,r,o,u,f,e;if(n&&typeof n=="string"&&(r=n.indexOf("#"),r!=-1)){o=n.substring(0,r);u=n.substring(r+1);switch(o){case"binding":case"bindings":u&&(i=new OSF.DDA.BindingPromise(u))}}if(i)return i.onFail=t,i;else if(t)if(f=typeof t,f=="function")e={},e[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(e,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext));else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f);};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this,s,e;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.get_isDialog()?(e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e})):(t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t}),r&&(s=r.displayName||"appOM",delete r.displayName,OSF.OUtil.defineEnumerableProperty(f,s,{value:r})),u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}}),e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e}))};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this,u;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;return OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext()),n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,e=n.length,o=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){var u,i,r;for(u in n){if(i=n[u],r=t[u],i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw o();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw o();}};f.extractRequiredArguments=function(t,i,r){var f,u,h,s,c,l;if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(c=n.length-1;c>=s;c--){l=n[c];switch(typeof l){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=l;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}if(f=o.fillOptions(f,i,r,u),e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;return o.verifyArguments(t,f),f}var h="function",s=n.length,o=new OSF.DDA.ApiMethodCall(n,t,i,f,e);this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),u=c(n,r,t,i);return o.constructCallArgs(r,u,t,i)};this.processResponse=function(n,t,i,f){return n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n)};this.getCallArgs=function(n){for(var t,u,r,i=n.length-1;i>=s;i--){r=n[i];switch(typeof r){case"object":t=r;break;case h:u=r}}return t=t||{},u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u),t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],i=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],t,i,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback],u,r;f&&(u={},u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?u[OSF.DDA.AsyncResultEnum.Properties.Value]=i:(r={},i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i),f(new OSF.DDA.AsyncResult(u,r)))};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.SyncMethodNames[t]=i};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){function o(n,i,r,u){var o,c,s,h;if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(s=n.length-1;s>=e;s--){h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}return o=f.fillOptions(o,i,r,u),f.verifyArguments(t,o),o}var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),u=o(n,r,t,i);return f.constructCallArgs(r,u,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){function e(i,f){var a=i?{}:undefined,s,h,o,v,c,l;for(s in i){if(h=i[s],OSF.DDA.ListType.isListType(s)){o=[];for(v in h)o.push(e(h[v],f))}else OSF.OUtil.listContainsKey(r,s)?o=r[s][f](h):f==u&&n.preserveNesting(s)?o=e(h,f):(c=t[s],c?(l=c[f],l&&(o=l[h],o===undefined&&(o=h))):o=h);a[s]=o}return a}function l(i,r){var e,u,h,s;for(u in r)h=n.isComplexType(u)?l(i,t[u][o]):i[u],h!=undefined&&(e||(e={}),s=r[u],s==f&&(s=u),e[s]=n.pack(u,h));return e}function s(i,r,e){var o,a,h,l,p,v,y;e||(e={});for(o in r){if(a=r[o],a==f)h=i;else if(a==c){e[o]=i.toArray();continue}else h=i[a];if(h===null||h===undefined)e[o]=undefined;else if(h=n.unpack(o,h),n.isComplexType(o))l=t[o][u],n.preserveNesting(o)?e[o]=s(h,l):s(h,l,e);else if(OSF.DDA.ListType.isListType(o)){l={};p=OSF.DDA.ListType.getDescriptor(o);l[p]=f;v=new Array(h.length);for(y in h)v[y]=s(h[y],l);e[o]=v}else e[o]=h}return e}function a(n,i,r){var f=t[n][r],u,o,c;return r=="toHost"?(o=e(i,r),u=l(o,f)):r==h&&(c=s(i,f),u=e(c,r)),u}var h="fromHost",i=this,o="toHost",u=h,c="sourceData",f="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];t||(t={});i.addMapping=function(n,i){var e,h,c,l,r,s,a,v;if(i.map){e=i.map;h={};for(c in e)l=e[c],l==f&&(l=c),h[l]=c}else e=i.toHost,h=i.fromHost;if(r=t[n],r){s=r[o];for(a in s)e[a]=s[a];s=r[u];for(v in s)h[v]=s[v]}else r=t[n]={};r[o]=e;r[u]=h};i.toHost=function(n,t){return a(n,t,o)};i.fromHost=function(n,t){return a(n,t,u)};i.self=f;i.sourceData=c;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){return this.isDynamicType(n)?t[n].toHost(i):i};i.unpack=function(n,i){return this.isDynamicType(n)?t[n].fromHost(i):i}};OSF.DDA.getDecoratedParameterMap=function(n,t){function r(n){var i=null,r,t;if(n)for(i={},r=n.length,t=0;t0){for(r=[],i=0;i=s)break;if(f=Function._validateParameter(n[e],o,h),f)return f.popStackFrame(),f}return t}),Function._validateParameterCount||(Function._validateParameterCount=function(n,r,u){var f,s,e=r.length,h=n.length,c,l,a;if(he)for(s=i,f=0;f0&&t.push(u)}}catch(s){}return t}var i=[],t={};t[Microsoft.Office.WebExtension.Parameters.Data]=function(){var t=0,i=1;return{toHost:function(n){if(OSF.DDA.TableDataProperties&&typeof n!="string"&&n[OSF.DDA.TableDataProperties.TableRows]!==undefined){var r=[];r[t]=n[OSF.DDA.TableDataProperties.TableRows];r[i]=n[OSF.DDA.TableDataProperties.TableHeaders];n=r}return n},fromHost:function(r){var f,e,u;return r.toArray?(e=r.dimensions(),e===2?f=n(r):(u=r.toArray(),u.length===2&&(u[0]!=null&&u[0].toArray||u[1]!=null&&u[1].toArray)?(f={},f[OSF.DDA.TableDataProperties.TableRows]=n(u[t]),f[OSF.DDA.TableDataProperties.TableHeaders]=n(u[i])):f=u)):f=r,f}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,i,t);this.unpack=function(n,i){var r,u;return this.isComplexType(n)||OSF.DDA.ListType.isListType(n)?(u=(i||typeof i=="unknown")&&i.toArray,r=u?i.toArray():i||{}):r=this.isDynamicType(n)?t[n].fromHost(i):i,r}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(n){function t(n){var i=n,f,r,u;if(OSF.OUtil.isArray(n))for(f=i.length,r=0;r2)for(u=[],o=1;o40)&&(n=OSF.OUtil.Guid.generateNewGuid(),t.setValue(t.clientIDKey,n)),n},n.prototype.saveLog=function(n,t){var i=this,u=i.getValue(i.logIdSetKey);u=(u&&u.length>0?u+";":r)+n;i.setValue(i.logIdSetKey,u);i.setValue(n,t)},n.prototype.enumerateLog=function(n,t){var i=this,e=i.getValue(i.logIdSetKey),u,o,r,f;if(e){u=e.split(";");for(o in u)r=u[o],f=i.getValue(r),f&&(n&&n(r,f),t&&i.remove(r));t&&i.remove(i.logIdSetKey)}},n.prototype.getValue=function(n){var t=OSF.OUtil.getLocalStorage(),i=r;return t&&(i=t.getItem(n)),i},n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)},n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}},n}(),o=function(){function n(){}return n.prototype.LogData=function(n){OSF.Logger&&(OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n.SerializeRow(),OSF.Logger.SendFlag.none),OSFAriaLogger.AriaLogger.getInstance().logData(n))},n.prototype.LogRawData=function(n){if(OSF.Logger){OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n,OSF.Logger.SendFlag.none);try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(n))}catch(t){}}},n}();n.initialize=v;n.onAppActivated=y;n.onScriptDone=p;n.onCallDone=w;n.onMethodDone=b;n.onPropertyDone=k;n.onEventDone=d;n.onRegisterDone=g;n.onAppClosed=nt;n.setOsfControlAppCorrelationId=tt;n.doAppInitializationLogging=c;n.logAppCommonMessage=it;n.logAppException=rt;OSF.AppTelemetry=n}(OSFAppTelemetry||(OSFAppTelemetry={}));Microsoft.Office.WebExtension.FileType={Text:"text",Compressed:"compressed",Pdf:"pdf"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FileProperties:"FileProperties",FileSliceProperties:"FileSliceProperties"});OSF.DDA.FileProperties={Handle:"FileHandle",FileSize:"FileSize",SliceSize:Microsoft.Office.WebExtension.Parameters.SliceSize};OSF.DDA.File=function(n,t,i){var r,u;OSF.OUtil.defineEnumerableProperties(this,{size:{value:t},sliceCount:{value:Math.ceil(t/i)}});r={};r[OSF.DDA.FileProperties.Handle]=n;r[OSF.DDA.FileProperties.SliceSize]=i;u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.GetDocumentCopyChunkAsync,u.ReleaseDocumentCopyAsync],r)};OSF.DDA.FileSliceOffset="fileSliceoffset";OSF.DDA.AsyncMethodNames.addNames({GetDocumentCopyAsync:"getFileAsync",GetDocumentCopyChunkAsync:"getSliceAsync",ReleaseDocumentCopyAsync:"closeAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FileType,"enum":Microsoft.Office.WebExtension.FileType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:{types:["number"],defaultValue:4194304}}],checkCallArgs:function(n){var t=n[Microsoft.Office.WebExtension.Parameters.SliceSize];if(t<=0||t>4194304)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return n},onSucceeded:function(n,t,i){return new OSF.DDA.File(n[OSF.DDA.FileProperties.Handle],n[OSF.DDA.FileProperties.FileSize],i[Microsoft.Office.WebExtension.Parameters.SliceSize])}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(n,t){return t[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(r<0||r>=t.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;return n[OSF.DDA.FileSliceOffset]=parseInt((r*i[OSF.DDA.FileProperties.SliceSize]).toString()),n},onSucceeded:function(n,t,i){var r={};return OSF.OUtil.defineEnumerableProperties(r,{data:{value:n[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:i[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:n[OSF.DDA.FileProperties.SliceSize]}}),r}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}}]});Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(n){var t=this,r,i;t._eventHandlers={};t._queuedEventsArgs={};for(r in n)i=n[r],t._eventHandlers[i]=[],t._queuedEventsArgs[i]=[]};OSF.EventDispatch.prototype={getSupportedEvents:function(){var n=[];for(var t in this._eventHandlers)n.push(t);return n},supportsEvent:function(n){var t=!1;for(var i in this._eventHandlers)if(n==i){t=!0;break}return t},hasEventHandler:function(n,t){var i=this._eventHandlers[n],r;if(i&&i.length>0)for(r in i)if(i[r]===t)return!0;return!1},addEventHandler:function(n,t){if(typeof t!="function")return!1;var i=this._eventHandlers[n];return i&&!this.hasEventHandler(n,t)?(i.push(t),!0):!1},addEventHandlerAndFireQueuedEvent:function(n,t){var r=this._eventHandlers[n],u=r.length==0,i=this.addEventHandler(n,t);return u&&i&&this.fireQueuedEvent(n),i},removeEventHandler:function(n,t){var i=this._eventHandlers[n],r;if(i&&i.length>0)for(r=0;r0?(this._eventHandlers[n]=[],!0):!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},fireEvent:function(n){var t,i,r;if(n.type==undefined)return!1;if(t=n.type,t&&this._eventHandlers[t]){i=this._eventHandlers[t];for(r in i)i[r](n);return!0}else return!1},fireOrQueueEvent:function(n){var t=this,i=n.type,r,u;return i&&t._eventHandlers[i]?(r=t._eventHandlers[i],u=t._queuedEventsArgs[i],r.length==0?u.push(n):t.fireEvent(n),!0):!1},fireQueuedEvent:function(n){var t,i,r,u;if(n&&this._eventHandlers[n]&&(t=this._eventHandlers[n],i=this._queuedEventsArgs[n],t.length>0)){for(r=t[0];i.length>0;)u=i.shift(),r(u);return!0}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var f="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]=="outlook"||OSF._OfficeAppFactory.getHostInfo()[f]=="outlookwebapp")r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i),t.initialize(r.initialData),t.setCurrentItemNumber(r.itemNumber.itemNumber);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var i=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),t=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];t(arguments,i,n)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(n){var i=OSF.DDA.SyncMethodNames.MessageParent.displayName,t=this,r;t[i]||OSF.OUtil.defineEnumerableProperty(t,i,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return n(arguments,t)}});r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;t[r]||typeof OSF.DialogParentMessageEventDispatch=="undefined"||OSF.DDA.DispIdHost.addEventSupport(t,OSF.DialogParentMessageEventDispatch,n);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(n){n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:n[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}}],privateStateCallbacks:[],onSucceeded:function(n){var f=n[Microsoft.Office.WebExtension.Parameters.Id],i=n[Microsoft.Office.WebExtension.Parameters.Data],t=new OSF.DialogHandler,e=OSF.DDA.AsyncMethodNames.CloseAsync.displayName,r,u;return OSF.OUtil.defineEnumerableProperty(t,e,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];n(arguments,f,i,t)}}),r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName,OSF.OUtil.defineEnumerableProperty(t,r,{value:function(){var r=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],n=r.verifyAndExtractCall(arguments,t,i),u=n[Microsoft.Office.WebExtension.Parameters.EventType],f=n[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(u,f)}}),u=OSF.DDA.SyncMethodNames.SendMessage.displayName,OSF.OUtil.defineEnumerableProperty(t,u,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return n(arguments,i,t)}}),t},checkCallArgs:function(n){return n[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Width]=1),n[Microsoft.Office.WebExtension.Parameters.Width]>100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99),n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1),n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99),n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(n){try{n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,n);OSF.ClientHostController.openDialog(n.dispId,n.targetId,function(t,i){n.onEvent&&n.onEvent(i);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(n){n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,n);try{OSF.ClientHostController.closeDialog(n.dispId,n.targetId,t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.messageParent=function(n){try{n.onCalling&&n.onCalling();var i=(new Date).getTime(),t=OSF.ClientHostController.messageParent(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs((new Date).getTime()-i),t),t}catch(r){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(r)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.sendMessage=function(n){try{n.onCalling&&n.onCalling();var r=(new Date).getTime(),t=OSF.ClientHostController.sendMessage(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),t}catch(i){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(i)}};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FileType,{Text:"text",Pdf:"pdf"});OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(n){OSF.OUtil.defineEnumerableProperties(this,{url:{value:n[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(n){return new Microsoft.Office.WebExtension.FileProperties(n)}});Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"};Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"};Microsoft.Office.WebExtension.Index={First:"first",Last:"last",Next:"next",Previous:"previous"};OSF.DDA.AsyncMethodNames.addNames({GoToByIdAsync:"goToByIdAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GoToByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string","number"]},{name:Microsoft.Office.WebExtension.Parameters.GoToType,"enum":Microsoft.Office.WebExtension.GoToType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:{"enum":Microsoft.Office.WebExtension.SelectionMode,defaultValue:Microsoft.Office.WebExtension.SelectionMode.Default}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:0},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:1},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:2},{name:Microsoft.Office.WebExtension.GoToType.Index,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:0},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:1},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:1},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileProperties.FileSize,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0},{name:OSF.DDA.FileProperties.SliceSize,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:0},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:5},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:6}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:0}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileSliceOffset,value:1},{name:OSF.DDA.FileProperties.SliceSize,value:2}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0}]});OSF.DDA.AsyncMethodNames.addNames({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync"}),function(){function r(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&r&&(r[OSF.DDA.TableDataProperties.TableRows]!=undefined||r[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(r=OSF.DDA.OMFactory.manufactureTableData(r)),r=OSF.DDA.DataCoercion.coerceData(r,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),r==undefined?null:r}var i=!1,n="boolean",t="number";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,"enum":Microsoft.Office.WebExtension.CoercionType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}}],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object",t,n]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[t,n],defaultValue:i}}],privateStateCallbacks:[]})}();OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:1},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:2},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:3},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:4},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:5}]});OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",RefreshingSettings:"refreshingSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(n){var r={},i,t;for(i in n){t=n[i];try{t=JSON?JSON.stringify(t,function(n,t){return OSF.OUtil.isDate(this[n])?OSF.DDA.SettingsManager.DateJSONPrefix+this[n].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix:t}):Sys.Serialization.JavaScriptSerializer.serialize(t);r[i]=t}catch(u){}}return r},deserializeSettings:function(n){var r={},i,t;n=n||{};for(i in n){t=n[i];try{t=JSON?JSON.parse(t,function(n,t){var i;return typeof t=="string"&&t&&t.length>6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix&&(i=new Date(parseInt(t.slice(5,-1))),i)?i:t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,!0);r[i]=t}catch(u){}}return r}};OSF.DDA.Settings=function(n){var t="name",i;n=n||{};i=function(n){var i=OSF.OUtil.getSessionStorage(),t,r;i&&(t=OSF.DDA.SettingsManager.serializeSettings(n),r=JSON?JSON.stringify(t):Sys.Serialization.JavaScriptSerializer.serialize(t),i.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),r))};OSF.OUtil.defineEnumerableProperties(this,{get:{value:function(i){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]),r;if(u)throw u;return r=n[i],typeof r=="undefined"?null:r}},set:{value:function(r,u){var f=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1},{name:"value",mayBeNull:!0}]);if(f)throw f;n[r]=u;i(n)}},remove:{value:function(r){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]);if(u)throw u;delete n[r];i(n)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],n)};OSF.DDA.RefreshableSettings=function(n){OSF.DDA.RefreshableSettings.uber.constructor.call(this,n);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],n);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:n}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(n,t){return t}}],onSucceeded:function(n,t,i){var f=n[OSF.DDA.SettingsManager.SerializedSettings],u=OSF.DDA.SettingsManager.deserializeSettings(f),e=i[OSF.DDA.SettingsManager.RefreshingSettings];for(var r in e)t.remove(r);for(r in u)t.set(r,u[r]);return t}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(n,t){return OSF.DDA.SettingsManager.serializeSettings(t)}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});Microsoft.Office.WebExtension.BindingType={Table:"table",Text:"text",Matrix:"matrix"};OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType};OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{BindingList:"BindingList"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{Subset:"subset",BindingProperties:"BindingProperties"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList,OSF.DDA.PropertyDescriptors.BindingProperties);OSF.DDA.BindingPromise=function(n,t){this._id=n;OSF.OUtil.defineEnumerableProperty(this,"onFail",{get:function(){return t},set:function(n){var i=typeof n;if(i!="undefined"&&i!="function")throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,i);t=n}})};OSF.DDA.BindingPromise.prototype={_fetch:function(n){var t=this,i;return t.binding?n&&n(t.binding):t._binding||(i=t,Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(t._id,function(t){t.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded?(OSF.OUtil.defineEnumerableProperty(i,"binding",{value:t.value}),n&&n(i.binding)):i.onFail&&i.onFail(t)})),t},getDataAsync:function(){var n=arguments;return this._fetch(function(t){t.getDataAsync.apply(t,n)}),this},setDataAsync:function(){var n=arguments;return this._fetch(function(t){t.setDataAsync.apply(t,n)}),this},addHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.addHandlerAsync.apply(t,n)}),this},removeHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.removeHandlerAsync.apply(t,n)}),this}};OSF.DDA.BindingFacade=function(n){this._eventDispatches=[];OSF.OUtil.defineEnumerableProperty(this,"document",{value:n});var t=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[t.AddFromSelectionAsync,t.AddFromNamedItemAsync,t.GetAllAsync,t.GetByIdAsync,t.ReleaseByIdAsync])};OSF.DDA.UnknownBinding=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}})};OSF.DDA.Binding=function(n,t){var r,u,i,f;OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}});r=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[r.GetDataAsync,r.SetDataAsync]);u=Microsoft.Office.WebExtension.EventType;i=t.bindings._eventDispatches;i[n]||(i[n]=new OSF.EventDispatch([u.BindingSelectionChanged,u.BindingDataChanged]));f=i[n];OSF.DDA.DispIdHost.addEventSupport(this,f)};OSF.DDA.generateBindingId=function(){return"UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+(new Date).getTime()};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureBinding=function(n,t){var r=n[OSF.DDA.BindingProperties.Id],u=n[OSF.DDA.BindingProperties.RowCount],f=n[OSF.DDA.BindingProperties.ColumnCount],s=n[OSF.DDA.BindingProperties.HasHeaders],i,e,o;switch(n[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:i=new OSF.DDA.TextBinding(r,t);break;case Microsoft.Office.WebExtension.BindingType.Matrix:i=new OSF.DDA.MatrixBinding(r,t,u,f);break;case Microsoft.Office.WebExtension.BindingType.Table:e=function(){return OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument};o=e()&&OSF.DDA.ExcelTableBinding?OSF.DDA.ExcelTableBinding:OSF.DDA.TableBinding;i=new o(r,t,u,f,s);break;default:i=new OSF.DDA.UnknownBinding(r,t)}return i};OSF.DDA.AsyncMethodNames.addNames({AddFromSelectionAsync:"addFromSelectionAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:"getByIdAsync",ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync"}),function(){function u(n){return OSF.DDA.OMFactory.manufactureBinding(n,Microsoft.Office.WebExtension.context.document)}function f(n){return n.id}function e(n,t,i){var u=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&u&&(u[OSF.DDA.TableDataProperties.TableRows]!=undefined||u[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(u=OSF.DDA.OMFactory.manufactureTableData(u)),u=OSF.DDA.DataCoercion.coerceData(u,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),u==undefined?r:u}var t="number",i="object",n="string",r=null;OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:[n]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return!0}}],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.BindingList],u)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n,t,i){var r=i[Microsoft.Office.WebExtension.Parameters.Id];delete t._eventDispatches[r]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n,t){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&n[Microsoft.Office.WebExtension.Parameters.RowCount]==0&&n[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn],delete n[Microsoft.Office.WebExtension.Parameters.RowCount],delete n[Microsoft.Office.WebExtension.Parameters.ColumnCount]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]||n[Microsoft.Office.WebExtension.Parameters.RowCount]||n[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[n,i,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}]})}();OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.MatrixBinding=function(n,t,i,r){OSF.DDA.MatrixBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Matrix},rowCount:{value:i?i:0},columnCount:{value:r?r:0}})};OSF.OUtil.extend(OSF.DDA.MatrixBinding,OSF.DDA.Binding);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.BindingProperties,fromHost:[{name:OSF.DDA.BindingProperties.Id,value:0},{name:OSF.DDA.BindingProperties.Type,value:1},{name:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,value:2}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.BindingType,toHost:[{name:Microsoft.Office.WebExtension.BindingType.Text,value:0},{name:Microsoft.Office.WebExtension.BindingType.Matrix,value:1},{name:Microsoft.Office.WebExtension.BindingType.Table,value:2}],invertible:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,value:0},{name:Microsoft.Office.WebExtension.Parameters.Id,value:1},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:2},{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseBindingMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAllBindingsMethod,fromHost:[{name:OSF.DDA.ListDescriptors.BindingList,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:2},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:3},{name:OSF.DDA.PropertyDescriptors.Subset,value:4}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.Data,value:2},{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,fromHost:[{name:OSF.DDA.BindingProperties.RowCount,value:0},{name:OSF.DDA.BindingProperties.ColumnCount,value:1},{name:OSF.DDA.BindingProperties.HasHeaders,value:2}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.Subset,toHost:[{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:0},{name:OSF.DDA.SafeArray.UniqueArguments.Run,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Offset,toHost:[{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:0},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Run,toHost:[{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:0},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddColumnsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearAllRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});Microsoft.Office.WebExtension.TableData=function(n,t){function i(n){if(n==null||n==undefined)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(n,2);t<2;t++)n=[n];return n}catch(i){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(n){t=i(n)}},rows:{get:function(){return n},set:function(t){n=t==null||OSF.OUtil.isArray(t)&&t.length==0?[]:i(t)}}});this.headers=t;this.rows=n};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(n){return new Microsoft.Office.WebExtension.TableData(n[OSF.DDA.TableDataProperties.TableRows],n[OSF.DDA.TableDataProperties.TableHeaders])};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{TableDataProperties:"TableDataProperties"});OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};OSF.DDA.TableBinding=function(n,t,i,r,u){OSF.DDA.TableBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:i?i:0},columnCount:{value:r?r:0},hasHeaders:{value:u?u:!1}});var f=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[f.AddRowsAsync,f.AddColumnsAsync,f.DeleteAllDataValuesAsync])};OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync"}),function(){function n(n){return n.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]})}();OSF.DDA.TextBinding=function(n,t){OSF.DDA.TextBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperty(this,"type",{value:Microsoft.Office.WebExtension.BindingType.Text})};OSF.OUtil.extend(OSF.DDA.TextBinding,OSF.DDA.Binding);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"});OSF.DDA.DocumentSelectionChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:n}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{BindingSelectionChanged:"bindingSelectionChanged",BindingDataChanged:"bindingDataChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{BindingSelectionChangedEvent:"BindingSelectionChangedEvent"});OSF.DDA.BindingSelectionChangedEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingSelectionChanged},binding:{value:n}});for(var i in t)OSF.OUtil.defineEnumerableProperty(this,i,{value:t[i]})};OSF.DDA.BindingDataChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingDataChanged},binding:{value:n}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:0},{name:OSF.DDA.PropertyDescriptors.Subset,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingDataChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var n=null;return{findArrayDimensionality:function(n){if(OSF.OUtil.isArray(n)){for(var t=0,i=0;i0},enumerable:!0,configurable:!0}),t.prototype.addTrace=function(n,t){this.m_traceInfos[n]=t},t.prototype.addReferencedObjectPath=function(t){if(!this.m_referencedObjectPaths[t.objectPathInfo.Id]){if(!t.isValid)throw new n._Internal.RuntimeError({code:n.ErrorCodes.invalidObjectPath,message:n.Utility._getResourceString(n.ResourceStrings.invalidObjectPath,n.Utility.getObjectPathExpression(t)),debugInfo:{errorLocation:n.Utility.getObjectPathExpression(t)}});while(t)t.isWriteOperation&&(this.m_flags=this.m_flags|1),this.m_referencedObjectPaths[t.objectPathInfo.Id]=t,t.objectPathInfo.ObjectPathType==3&&this.addReferencedObjectPaths(t.argumentObjectPaths),t=t.parentObjectPath}},t.prototype.addReferencedObjectPaths=function(n){if(n)for(var t=0;t0&&(typeof r[0]=="string"||i.isRequestUrlAndHeaderInfo(r[0])||i.isRequestUrlAndHeaderInfoResolver(r[0]))&&(y=r[0],h=1),r.length==h+1)a=u,v=r[h+0];else if(r.length==h+2){if(r[h+0]instanceof n.ClientObject)a=function(){return r[h+0].context};else if(Array.isArray(r[h+0])){if(c=r[h+0],c.length==0)return i.createErrorPromise(t);for(l=0;l0){var n=c._onRunFinishedNotifiers.shift();n()}if(a)return l;else throw l;})},i.prototype._nextId=function(){return++this.m_nextId},i}();n.ClientRequestContext=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_type=n}return Object.defineProperty(t.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){(this.m_isLoaded=!0,typeof t=="object"&&t&&t._IsNull)||(this.m_value=this.m_type===1?n.Utility.adjustToDateTime(t):t)},t}();n.ClientResult=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.flags="flags",n.getItemAt="GetItemAt",n.id="Id",n.idPrivate="_Id",n.index="_Index",n.items="_Items",n.iterativeExecutor="IterativeExecutor",n.localDocument="http://document.localhost/",n.localDocumentApiPrefix="http://document.localhost/_api/",n.processQuery="ProcessQuery",n.referenceId="_ReferenceId",n.isTracked="_IsTracked",n.sourceLibHeader="SdkVersion",n.embeddingPageOrigin="EmbeddingPageOrigin",n.embeddingPageSessionInfo="EmbeddingPageSessionInfo",n}();n.Constants=t}(OfficeExtension||(OfficeExtension={})),function(n){var u=1,r={invokeRequestModifier:function(n){return n.DdaMethod.Version=u,n},invokeResponseModifier:function(n){return u=n.Version,n.Error&&(n.error={},n.error.Code=n.Error),n}},i,t,f,e;(function(n){n[n.Success=0]="Success";n[n.Timeout=1]="Timeout";n[n.InternalError=5001]="InternalError"})(i||(i={})),function(n){n.SendingId="sId";n.RespondingId="rId";n.CommandKey="command";n.SessionInfoKey="sessionInfo";n.ParamsKey="params";n.ApiReadyCommand="apiready";n.ExecuteMethodCommand="executeMethod";n.GetAppContextCommand="getAppContext";n.RegisterEventCommand="registerEvent";n.UnregisterEventCommand="unregisterEvent";n.FireEventCommand="fireEvent"}(t||(t={}));f=function(u){function f(n,t){u.call(this);this.m_chosenWindow=null;this.m_chosenOrigin=null;this.m_enabled=!0;this.m_onMessageHandler=this._onMessage.bind(this);this.m_callbackList={};this.m_id=0;this.m_timeoutId=-1;this.m_appContext=null;this.m_url=n;this.m_options=t;this.m_options||(this.m_options={sessionKey:Math.random().toString()});this.m_options.sessionKey||(this.m_options.sessionKey=Math.random().toString());this.m_options.container||(this.m_options.container=document.body);this.m_options.timeoutInMilliseconds||(this.m_options.timeoutInMilliseconds=6e4);this.m_options.height||(this.m_options.height="400px");this.m_options.width||(this.m_options.width="100%")}return __extends(f,u),f.prototype._getIFrameSrc=function(){var u=window.location.protocol+"//"+window.location.host,i=n.Constants.embeddingPageOrigin+"="+encodeURIComponent(u)+"&"+n.Constants.embeddingPageSessionInfo+"="+encodeURIComponent(this.m_options.sessionKey),r=!1,t;return this.m_url.toLowerCase().indexOf("/_layouts/preauth.aspx")>0&&(r=!0),t=document.createElement("a"),t.href=this.m_url,r?t.hash=t.hash.length===0||t.hash==="#"?"#"+i:t.hash+"&"+i:t.search=t.search.length===0||t.search==="?"?"?"+i:t.search+"&"+i,t.href},f.prototype.init=function(){var t=this,i;return window.addEventListener("message",this.m_onMessageHandler),i=this._getIFrameSrc(),new n._Internal.OfficePromise(function(r,u){var f=document.createElement("iframe");t.m_options.id&&(f.id=t.m_options.id);f.style.height=t.m_options.height;f.style.width=t.m_options.width;f.src=i;t.m_options.container.appendChild(f);t.m_timeoutId=setTimeout(function(){t.close();var i=n.Utility.createRuntimeError(n.ErrorCodes.timeout,n.Utility._getResourceString(n.ResourceStrings.timeout),"EmbeddedSession.init");u(i)},t.m_options.timeoutInMilliseconds);t.m_promiseResolver=r})},f.prototype._invoke=function(n,t,u){if(!this.m_enabled){t(i.InternalError,null);return}r.invokeRequestModifier&&(u=r.invokeRequestModifier(u));this._sendMessageWithCallback(this.m_id++,n,u,function(n){r.invokeResponseModifier&&(n=r.invokeResponseModifier(n));var u=n.Error;delete n.Error;t(u||i.Success,n)})},f.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler);window.clearTimeout(this.m_timeoutId);this.m_enabled=!1},Object.defineProperty(f.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),f.prototype._createRequestExecutorOrNull=function(){return new e(this)},f.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},f.prototype._registerEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.RegisterEventCommand,{EventId:i,TargetId:r},function(){n(null)})})},f.prototype._unregisterEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.UnregisterEventCommand,{EventId:i,TargetId:r},function(){n()})})},f.prototype._onMessage=function(n){var u=this,i,e,r,o,s;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===n.source&&this.m_chosenOrigin===n.origin)){if(i=n.data,i&&i[t.CommandKey]===t.ApiReadyCommand){!this.m_chosenWindow&&this._isValidDescendant(n.source)&&i[t.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=n.source,this.m_chosenOrigin=n.origin,this._sendMessageWithCallback(this.m_id++,t.GetAppContextCommand,null,function(n){u._setupContext(n);window.clearTimeout(u.m_timeoutId);u.m_promiseResolver()}));return}if(i&&i[t.CommandKey]===t.FireEventCommand){var f=i[t.ParamsKey],h=f.EventId,c=f.TargetId,l=f.Data;if(this.m_sessionEventManager)for(e=this.m_sessionEventManager.getHandlers(h,c),r=0;r=0;o--)if(r[o]===e[i].handler){r.splice(o,1);break}break;case 2:r=[];break}}return s&&(!this.m_registered&&r.length>0?u=u.then(function(){return f.m_eventInfo.registerFunc(f.m_callback)}).then(function(){return f.m_registered=!0}):this.m_registered&&r.length==0&&(u=u.then(function(){return f.m_eventInfo.unregisterFunc(f.m_callback)}).catch(function(t){n.Utility.log("Error when unregister event: "+JSON.stringify(t))}).then(function(){return f.m_registered=!1})),u=u.then(function(){return f.m_handlers=r})),u},t.prototype.fireEvent=function(t){for(var u,f,r=[],i=0;i=0;e--)if(f[e]===u){f.splice(e,1);break}return f.length===0?this.m_unregisterEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i}();n.EventRegistration=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var s=JSON.stringify(u.Body),f=u.Url,e,o;if(f.charAt(f.length-1)!="/"&&(f=f+"/"),f=f+n.Constants.processQuery,f=f+"?"+n.Constants.flags+"="+r.toString(),e={method:"POST",url:f,headers:{},body:s},e.headers[n.Constants.sourceLibHeader]=t.SourceLibHeaderValue,e.headers["CONTENT-TYPE"]="application/json",u.Headers)for(o in u.Headers)e.headers[o]=u.Headers[o];return n.HttpUtility.sendRequest(e).then(function(t){var i,r;return t.statusCode===200?i={ErrorCode:null,ErrorMessage:null,Headers:t.headers,Body:JSON.parse(t.body)}:(n.Utility.log("Error Response:"+t.body),r=n.Utility._parseErrorResponse(t),i={ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:t.headers,Body:null}),i})},t.SourceLibHeaderValue="officejs-rest",t}();n.HttpRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){n.OfficeRequire=function(){return typeof require!="undefined"?require:null}()})(t=n._Internal||(n._Internal={}));i=function(){function i(){}return i.setCustomSendRequestFunc=function(n){i.s_customSendRequestFunc=n},i.xhrSendRequestFunc=function(i){return new t.OfficePromise(function(r,u){var f=new XMLHttpRequest,e;if(f.open(i.method,i.url),f.onload=function(){var t={statusCode:f.status,headers:n.Utility._parseHttpResponseHeaders(f.getAllResponseHeaders()),body:f.responseText};r(t)},f.onerror=function(){u(new t.RuntimeError({code:n.ErrorCodes.connectionFailure,message:n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,f.statusText)}))},i.headers)for(e in i.headers)f.setRequestHeader(e,i.headers[e]);f.send(i.body)})},i.nodejsRequestModuleSendRequestFunc=function(n){i.logRequest(n);var r=t.OfficeRequire(i.NodeJsRequestModuleName);return r(n.url,{method:n.method,headers:n.headers,body:n.body}).then(function(n){return n.text().then(function(t){var f=n.status,u={},r;return n.headers.forEach(function(n,t){u[t]=n}),r={statusCode:f,headers:u,body:t},i.logResponse(r),r})})},i.sendRequest=function(n){i.validateAndNormalizeRequest(n);var t=i.s_customSendRequestFunc;return t||(t=typeof window=="undefined"||typeof XMLHttpRequest=="undefined"?i.nodejsRequestModuleSendRequestFunc:i.xhrSendRequestFunc),t(n)},i.setCustomSendLocalDocumentRequestFunc=function(n){i.s_customSendLocalDocumentRequestFunc=n},i.sendLocalDocumentRequest=function(n){i.validateAndNormalizeRequest(n);var t;return t=i.s_customSendLocalDocumentRequestFunc||i.officeJsSendLocalDocumentRequestFunc,t(n)},i.officeJsSendLocalDocumentRequestFunc=function(i){i=n.Utility._validateLocalDocumentRequest(i);var r=n.Utility._buildRequestMessageSafeArray(i);return new t.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(r,function(i){var r;r=i.status=="succeeded"?{statusCode:n.RichApiMessageUtility.getResponseStatusCode(i),headers:n.RichApiMessageUtility.getResponseHeaders(i),body:n.RichApiMessageUtility.getResponseBody(i)}:n.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(i.error.code,i.error.message);n.Utility.log(JSON.stringify(r));t(r)})})},i.validateAndNormalizeRequest=function(i){if(n.Utility.isNullOrUndefined(i))throw t.RuntimeError._createInvalidArgError({argumentName:"request"});n.Utility.isNullOrEmptyString(i.method)&&(i.method="GET");i.method=i.method.toUpperCase()},i.logRequest=function(t){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Request---"),n.Utility.log(t.method+" "+t.url),t.headers)for(var r in t.headers)n.Utility.log(r+": "+t.headers[r]);i._logBody&&n.Utility.log(t.body)}},i.logResponse=function(t){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Response---"),n.Utility.log(""+t.statusCode),t.headers)for(var r in t.headers)n.Utility.log(r+": "+t.headers[r]);i._logBody&&n.Utility.log(t.body)}},i.NodeJsRequestModuleName="node-fetch",i._logBody=!1,i}();n.HttpUtility=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_clientObject=n}return n.prototype._handleResult=function(n){this.m_clientObject._handleIdResult(n)},n}();n.InstantiateActionResultHandler=t}(OfficeExtension||(OfficeExtension={})),function(n){}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){this.m_objectPathInfo=n;this.m_parentObjectPath=t;this.m_isWriteOperation=!1;this.m_isCollection=i;this.m_isInvalidAfterRequest=r;this.m_isValid=!0}return Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},set:function(n){this.m_isWriteOperation=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(n){this.m_argumentObjectPaths=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(n){this.m_isValid=n;!n&&this.m_objectPathInfo.ObjectPathType===6&&this.m_savedObjectPathInfo&&(t.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(n){this.m_getByIdMethodName=n},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null},t.prototype.updateUsingObjectData=function(i){var o=i[n.Constants.referenceId],u,f,e,r;if(!n.Utility.isNullOrEmptyString(o)){this.m_savedObjectPathInfo||this.isInvalidAfterRequest||!t.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)||(u={},t.copyObjectPathInfo(this.m_objectPathInfo,u),this.m_savedObjectPathInfo={pathInfo:u,parent:this.m_parentObjectPath});this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=o;this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null;return}if(f=this.parentObjectPath&&this.parentObjectPath.isCollection,e=this.getByIdMethodName,(f||!n.Utility.isNullOrEmptyString(e))&&(r=i[n.Constants.id],n.Utility.isNullOrUndefined(r)&&(r=i[n.Constants.idPrivate]),!n.Utility.isNullOrUndefined(r))){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;f?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=e,this.m_getByIdMethodName=null);this.isWriteOperation=!1;this.m_objectPathInfo.ArgumentInfo={};this.m_objectPathInfo.ArgumentInfo.Arguments=[r];this.m_argumentObjectPaths=null;return}},t.isRestorableObjectPath=function(n){return n===1||n===5||n===3||n===4},t.copyObjectPathInfo=function(n,t){t.Id=n.Id;t.ArgumentInfo=n.ArgumentInfo;t.Name=n.Name;t.ObjectPathType=n.ObjectPathType;t.ParentObjectPathId=n.ParentObjectPathId},t}();n.ObjectPath=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createGlobalObjectObjectPath=function(t){var i={Id:t._nextId(),ObjectPathType:1,Name:""};return new n.ObjectPath(i,null,!1,!1)},t.createNewObjectObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:2,Name:i};return new n.ObjectPath(u,null,r,!1)},t.createPropertyObjectPath=function(t,i,r,u,f){var e={Id:t._nextId(),ObjectPathType:4,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id};return new n.ObjectPath(e,i._objectPath,u,f)},t.createIndexerObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i._objectPath,!1,!1)},t.createIndexerObjectPathUsingParentPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i,!1,!1)},t.createMethodObjectPath=function(t,i,r,u,f,e,o,s){var c={Id:t._nextId(),ObjectPathType:3,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},l=n.Utility.setMethodArguments(t,c.ArgumentInfo,f),h=new n.ObjectPath(c,i._objectPath,e,o);return h.argumentObjectPaths=l,h.isWriteOperation=u!=1,h.getByIdMethodName=s,h},t.createChildItemObjectPathUsingIndexerOrGetItemAt=function(i,r,u,f,e){var o=f[n.Constants.id];return n.Utility.isNullOrUndefined(o)&&(o=f[n.Constants.idPrivate]),i&&!n.Utility.isNullOrUndefined(o)?t.createChildItemObjectPathUsingIndexer(r,u,f):t.createChildItemObjectPathUsingGetItemAt(r,u,f,e)},t.createChildItemObjectPathUsingIndexer=function(t,i,r){var f=r[n.Constants.id],u;return n.Utility.isNullOrUndefined(f)&&(f=r[n.Constants.idPrivate]),u=u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u.ArgumentInfo.Arguments=[f],new n.ObjectPath(u,i._objectPath,!1,!1)},t.createChildItemObjectPathUsingGetItemAt=function(t,i,r,u){var e=r[n.Constants.index],f;return e&&(u=e),f={Id:t._nextId(),ObjectPathType:3,Name:n.Constants.getItemAt,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f.ArgumentInfo.Arguments=[u],new n.ObjectPath(f,i._objectPath,!1,!1)},t}();n.ObjectPathFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var f=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n._Internal.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(f,function(i){n.Utility.log("Response:");n.Utility.log(JSON.stringify(i));var r;r=i.status=="succeeded"?n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBody(i),n.RichApiMessageUtility.getResponseHeaders(i)):n.RichApiMessageUtility.buildResponseOnError(i.error.code,i.error.message);t(r)})})},t.SourceLibHeaderValue="officejs",t}();n.OfficeJsRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){var t;(function(t){function i(){return function(){"use strict";function wt(n){return typeof n=="function"||typeof n=="object"&&n!==null}function b(n){return typeof n=="function"}function bt(n){return typeof n=="object"&&n!==null}function kt(n){k=n}function dt(n){f=n}function ti(){var t=process.nextTick,n=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&n[1]==="0"&&n[2]==="10"&&(t=setImmediate),function(){t(c)}}function ii(){return function(){tt(c)}}function ri(){var n=0,i=new ut(c),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function ui(){var n=new MessageChannel;return n.port1.onmessage=c,function(){n.port2.postMessage(0)}}function ft(){return function(){setTimeout(c,1)}}function c(){for(var t,i,n=0;n=0?(n=n.substring(t+5,n.length),n<"14.14393"?!0:!1):!1}function i(){return typeof window=="undefined"&&typeof Promise=="function"?Promise:typeof window!="undefined"&&window.Promise?t()?n.PromiseImpl.Init():window.Promise:n.PromiseImpl.Init()}n.OfficePromise=i()}(t=n._Internal||(n._Internal={}));i=t.OfficePromise;n.Promise=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this._autoCleanupList={};this.m_context=n}return t.prototype.add=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._addCommon(n,!0)}):this._addCommon(n,!0)},t.prototype._autoAdd=function(n){this._addCommon(n,!1);this._autoCleanupList[n._objectPath.objectPathInfo.Id]=n},t.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(t,i){var r=this.m_context._autoCleanup&&!t[n.Constants.isTracked]&&t!==this.m_context._rootObject&&i&&!n.Utility.isNullOrEmptyString(i[n.Constants.referenceId]);r&&(this._autoCleanupList[t._objectPath.objectPathInfo.Id]=t,t[n.Constants.isTracked]=!0)},t.prototype._addCommon=function(t,i){if(t[n.Constants.isTracked]){i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id];return}var r=t[n.Constants.referenceId];n.Utility.isNullOrEmptyString(r)&&t._KeepReference&&(t._KeepReference(),n.ActionFactory.createInstantiateAction(this.m_context,t),i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id],t[n.Constants.isTracked]=!0)},t.prototype.remove=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._removeCommon(n)}):this._removeCommon(n)},t.prototype._removeCommon=function(t){var r=t[n.Constants.referenceId],i;n.Utility.isNullOrEmptyString(r)||(i=this.m_context._rootObject,i._RemoveReference&&i._RemoveReference(r),delete t[n.Constants.isTracked])},t.prototype._retrieveAndClearAutoCleanupList=function(){var n=this._autoCleanupList;return this._autoCleanupList={},n},t}();n.TrackedObjects=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.cannotRegisterEvent="CannotRegisterEvent",n.connectionFailureWithStatus="ConnectionFailureWithStatus",n.connectionFailureWithDetails="ConnectionFailureWithDetails",n.invalidObjectPath="InvalidObjectPath",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.invalidArgumentGeneric="InvalidArgumentGeneric",n.propertyNotLoaded="PropertyNotLoaded",n.runMustReturnPromise="RunMustReturnPromise",n.timeout="Timeout",n.propertyDoesNotExist="PropertyDoesNotExist",n.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",n.moreInfoInnerError="MoreInfoInnerError",n.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",n.valueNotLoaded="ValueNotLoaded",n}();n.ResourceStrings=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.CannotRegisterEvent="The event handler cannot be registered.",n.ConnectionFailureWithStatus="The request failed with status code of {0}.",n.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}",n.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",n.InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',n.InvalidRequestContext="Cannot use the object across different request contexts.",n.PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",n.RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',n.Timeout="The operation has timed out.",n.ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.',n}();n.ResourceStringValues=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.buildMessageArrayForIRequestExecutor=function(i,r,u,f){var o=JSON.stringify(u.Body),e;return n.Utility.log("Request:"),n.Utility.log(o),e={},e[n.Constants.sourceLibHeader]=f,t.buildRequestMessageSafeArray(i,r,"POST","ProcessQuery",e,o)},t.buildResponseOnSuccess=function(n,t){var i={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return i.Body=JSON.parse(n),i.Headers=t,i},t.buildResponseOnError=function(i,r){var u={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return u.ErrorCode=n.ErrorCodes.generalException,i==t.OfficeJsErrorCode_ooeNoCapability?u.ErrorCode=n.ErrorCodes.accessDenied:i==t.OfficeJsErrorCode_ooeActivityLimitReached&&(u.ErrorCode=n.ErrorCodes.activityLimitReached),u.ErrorMessage=r,u},t.buildHttpResponseFromOfficeJsError=function(i,r){var f=500,u={};return u.error={},u.error.code=n.ErrorCodes.generalException,u.error.message=r,i===t.OfficeJsErrorCode_ooeNoCapability?(f=403,u.error.code=n.ErrorCodes.accessDenied):i===t.OfficeJsErrorCode_ooeActivityLimitReached&&(f=429,u.error.code=n.ErrorCodes.activityLimitReached),{statusCode:f,headers:{},body:JSON.stringify(u)}},t.buildRequestMessageSafeArray=function(n,t,i,r,u,f){var e=[],o;if(u)for(o in u)e.push(o),e.push(u[o]);var s=0,h="",c="",l="";return[n,i,r,e,f,s,t,h,c,l]},t.getResponseBody=function(n){return t.getResponseBodyFromSafeArray(n.value.data)},t.getResponseHeaders=function(n){return t.getResponseHeadersFromSafeArray(n.value.data)},t.getResponseBodyFromSafeArray=function(n){var t=n[2],i;return typeof t=="string"?t:(i=t,i.join(""))},t.getResponseHeadersFromSafeArray=function(n){var i=n[1],r,t;if(!i)return null;for(r={},t=0;t0&&f.push(i);return f},t.throwError=function(i,r,u){throw new n._Internal.RuntimeError({code:i,message:t._getResourceString(i,r),debugInfo:u?{errorLocation:u}:undefined});},t.createRuntimeError=function(t,i,r){return new n._Internal.RuntimeError({code:t,message:i,debugInfo:{errorLocation:r}})},t._getResourceString=function(i,r){var u,e,f,o;return typeof window!="undefined"&&window.Strings&&window.Strings.OfficeOM&&(e="L_"+i,f=window.Strings.OfficeOM[e],f&&(u=f)),u||(u=n.ResourceStringValues[i]),u||(u=i),t.isNullOrUndefined(r)||(Array.isArray(r)?(o=r,u=t._formatString(u,o)):u=u.replace("{0}",r)),u},t._formatString=function(t,i){return t.replace(/\{\d\}/g,function(t){var r=parseInt(t.substr(1,t.length-2));if(r0?".":"")+i;break;case 3:i=t.normalizeName(n.objectPathInfo.Name)+"()"+(i.length>0?".":"")+i;break;case 4:i=t.normalizeName(n.objectPathInfo.Name)+(i.length>0?".":"")+i;break;case 5:i="getItem()"+(i.length>0?".":"")+i;break;case 6:i="_reference()"+(i.length>0?".":"")+i;break}n=n.parentObjectPath}return i},t._createPromiseFromResult=function(t){return new n._Internal.OfficePromise(function(n,i){n(t)})},t._createTimeoutPromise=function(t){return new n._Internal.OfficePromise(function(n,i){setTimeout(function(){n(null)},t)})},t.promisify=function(t){return new n._Internal.OfficePromise(function(n,i){var r=function(t){t.status=="failed"?i(t.error):n(t.value)};t(r)})},t._addActionResultHandler=function(n,t,i){n.context._pendingRequest.addActionResultHandler(t,i)},t._handleNavigationPropertyResults=function(n,i,r){for(var u=0;u0},t._getLocalDocumentUrlPrefixLength=function(n){for(var i=["http://document.localhost","https://document.localhost","//document.localhost"],r=n.toLowerCase().trim(),t=0;t0))for(s=i.url.substr(f+1),e=s.split("&"),u=0;u0&&(f=i.substr(0,u),e=i.substr(u+1),f=t.trim(f),e=t.trim(e),s[f.toUpperCase()]=e));return s},t._parseErrorResponse=function(i){var r=null,f,e,u;if(!t.isNullOrEmptyString(i.body)){f=t.trim(i.body);try{r=JSON.parse(f)}catch(o){t.log("Error when parse "+f)}}return!t.isNullOrUndefined(r)&&typeof r=="object"&&r.error?(u=r.error.code,e=t._getResourceString(n.ResourceStrings.connectionFailureWithDetails,[i.statusCode.toString(),r.error.code,r.error.message])):e=t._getResourceString(n.ResourceStrings.connectionFailureWithStatus,i.statusCode.toString()),t.isNullOrEmptyString(u)&&(u=n.ErrorCodes.connectionFailure),{errorCode:u,errorMessage:e}},t._copyHeaders=function(n,t){if(n&&t)for(var i in n)t[i]=n[i]},t._logEnabled=!1,t._synchronousCleanup=!1,t.s_underscoreCharCode="_".charCodeAt(0),t}();n.Utility=t}(OfficeExtension||(OfficeExtension={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){function y(t,i){var u,r;if(OfficeExtension.Utility.isNullOrUndefined(i))return null;if(typeof i!="object"&&OfficeExtension.Utility.throwError(OfficeExtension.ResourceStrings.invalidArgument,"searchOptions"),i instanceof n.SearchOptions)return i;u=n.SearchOptions.newObject(t);for(r in i)i.hasOwnProperty(r)&&(u[r]=i[r]);return u}var e=OfficeExtension.ObjectPathFactory.createPropertyObjectPath,r=OfficeExtension.ObjectPathFactory.createMethodObjectPath,a=OfficeExtension.ObjectPathFactory.createIndexerObjectPath,ni=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath,rr=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer,ur=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt,v=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt,f=OfficeExtension.ActionFactory.createMethodAction,u=OfficeExtension.ActionFactory.createSetPropertyAction,o=OfficeExtension.Utility.isNullOrUndefined,t=OfficeExtension.Utility.isUndefined,i=OfficeExtension.Utility.throwIfNotLoaded,s=OfficeExtension.Utility.load,h=OfficeExtension.Utility.fixObjectPathIfNecessary,c=OfficeExtension.Utility._addActionResultHandler,l=OfficeExtension.Utility._handleNavigationPropertyResults,p=OfficeExtension.Utility.adjustToDateTime,ti=function(a){function v(){a.apply(this,arguments)}return __extends(v,a),Object.defineProperty(v.prototype,"_className",{get:function(){return"Body"},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"contentControls",{get:function(){return this.m_contentControls||(this.m_contentControls=new n.ContentControlCollection(this.context,e(this.context,this,"ContentControls",!0,!1))),this.m_contentControls},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"font",{get:function(){return this.m_font||(this.m_font=new n.Font(this.context,e(this.context,this,"Font",!1,!1))),this.m_font},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"inlinePictures",{get:function(){return this.m_inlinePictures||(this.m_inlinePictures=new n.InlinePictureCollection(this.context,e(this.context,this,"InlinePictures",!0,!1))),this.m_inlinePictures},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"lists",{get:function(){return this.m_lists||(this.m_lists=new n.ListCollection(this.context,e(this.context,this,"Lists",!0,!1))),this.m_lists},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"paragraphs",{get:function(){return this.m_paragraphs||(this.m_paragraphs=new n.ParagraphCollection(this.context,e(this.context,this,"Paragraphs",!0,!1))),this.m_paragraphs},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentBody",{get:function(){return this.m_parentBody||(this.m_parentBody=new n.Body(this.context,e(this.context,this,"ParentBody",!1,!1))),this.m_parentBody},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentBodyOrNullObject",{get:function(){return this.m_parentBodyOrNullObject||(this.m_parentBodyOrNullObject=new n.Body(this.context,e(this.context,this,"ParentBodyOrNullObject",!1,!1))),this.m_parentBodyOrNullObject},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentContentControl",{get:function(){return this.m_parentContentControl||(this.m_parentContentControl=new n.ContentControl(this.context,e(this.context,this,"ParentContentControl",!1,!1))),this.m_parentContentControl},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentContentControlOrNullObject",{get:function(){return this.m_parentContentControlOrNullObject||(this.m_parentContentControlOrNullObject=new n.ContentControl(this.context,e(this.context,this,"ParentContentControlOrNullObject",!1,!1))),this.m_parentContentControlOrNullObject},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentSection",{get:function(){return this.m_parentSection||(this.m_parentSection=new n.Section(this.context,e(this.context,this,"ParentSection",!1,!1))),this.m_parentSection},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentSectionOrNullObject",{get:function(){return this.m_parentSectionOrNullObject||(this.m_parentSectionOrNullObject=new n.Section(this.context,e(this.context,this,"ParentSectionOrNullObject",!1,!1))),this.m_parentSectionOrNullObject},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"tables",{get:function(){return this.m_tables||(this.m_tables=new n.TableCollection(this.context,e(this.context,this,"Tables",!0,!1))),this.m_tables},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"style",{get:function(){return i("style",this.m_style,"Body",this._isNull),this.m_style},set:function(n){this.m_style=n;u(this.context,this,"Style",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"styleBuiltIn",{get:function(){return i("styleBuiltIn",this.m_styleBuiltIn,"Body",this._isNull),this.m_styleBuiltIn},set:function(n){this.m_styleBuiltIn=n;u(this.context,this,"StyleBuiltIn",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"text",{get:function(){return i("text",this.m_text,"Body",this._isNull),this.m_text},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"type",{get:function(){return i("type",this.m_type,"Body",this._isNull),this.m_type},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"Body",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),v.prototype.set=function(n,t){this._recursivelySet(n,t,["style","styleBuiltIn"],["font"],["contentControls","inlinePictures","lists","paragraphs","parentBody","parentBodyOrNullObject","parentContentControl","parentContentControlOrNullObject","parentSection","parentSectionOrNullObject","tables","contentControls","inlinePictures","lists","paragraphs","parentBody","parentBodyOrNullObject","parentContentControl","parentContentControlOrNullObject","parentSection","parentSectionOrNullObject","tables"])},v.prototype.clear=function(){f(this.context,this,"Clear",0,[])},v.prototype.getHtml=function(){var t=f(this.context,this,"GetHtml",1,[]),n=new OfficeExtension.ClientResult;return c(this,t,n),n},v.prototype.getOoxml=function(){var t=f(this.context,this,"GetOoxml",1,[]),n=new OfficeExtension.ClientResult;return c(this,t,n),n},v.prototype.getRange=function(t){return new n.Range(this.context,r(this.context,this,"GetRange",1,[t],!1,!1,null))},v.prototype.insertBreak=function(n,t){f(this.context,this,"InsertBreak",0,[n,t])},v.prototype.insertContentControl=function(){return new n.ContentControl(this.context,r(this.context,this,"InsertContentControl",0,[],!1,!0,null))},v.prototype.insertFileFromBase64=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertFileFromBase64",0,[t,i],!1,!0,null))},v.prototype.insertHtml=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertHtml",0,[t,i],!1,!0,null))},v.prototype.insertInlinePictureFromBase64=function(t,i){return new n.InlinePicture(this.context,r(this.context,this,"InsertInlinePictureFromBase64",0,[t,i],!1,!0,null))},v.prototype.insertOoxml=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertOoxml",0,[t,i],!1,!0,null))},v.prototype.insertParagraph=function(t,i){return new n.Paragraph(this.context,r(this.context,this,"InsertParagraph",0,[t,i],!1,!0,null))},v.prototype.insertTable=function(t,i,u,f){return new n.Table(this.context,r(this.context,this,"InsertTable",0,[t,i,u,f],!1,!0,null))},v.prototype.insertText=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertText",0,[t,i],!1,!0,null))},v.prototype.search=function(t,i){return i=y(this.context,i),new n.RangeCollection(this.context,r(this.context,this,"Search",1,[t,i],!0,!1,null))},v.prototype.select=function(n){f(this.context,this,"Select",1,[n])},v.prototype._KeepReference=function(){f(this.context,this,"_KeepReference",1,[])},v.prototype._handleResult=function(n){if(a.prototype._handleResult.call(this,n),!o(n)){var i=n;h(this,i);t(i.Style)||(this.m_style=i.Style);t(i.StyleBuiltIn)||(this.m_styleBuiltIn=i.StyleBuiltIn);t(i.Text)||(this.m_text=i.Text);t(i.Type)||(this.m_type=i.Type);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);l(this,i,["contentControls","ContentControls","font","Font","inlinePictures","InlinePictures","lists","Lists","paragraphs","Paragraphs","parentBody","ParentBody","parentBodyOrNullObject","ParentBodyOrNullObject","parentContentControl","ParentContentControl","parentContentControlOrNullObject","ParentContentControlOrNullObject","parentSection","ParentSection","parentSectionOrNullObject","ParentSectionOrNullObject","tables","Tables"])}},v.prototype.load=function(n){return s(this,n),this},v.prototype._handleIdResult=function(n){(a.prototype._handleIdResult.call(this,n),o(n))||t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId)},v.prototype.track=function(){return this.context.trackedObjects.add(this),this},v.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},v.prototype.toJSON=function(){return{font:this.m_font,style:this.m_style,styleBuiltIn:this.m_styleBuiltIn,text:this.m_text,type:this.m_type}},v}(OfficeExtension.ClientObject),w,b,k,d,g,nt,tt,it,rt,ut,ft,et,ot,st,ht,ct,lt,at,vt,yt,pt,wt,bt,kt,dt,gt,ii,ri,ui,fi,ei,oi,si,hi,ci,li,ai,vi,yi,pi,wi,bi,ki,di,gi,nr,tr,ir;n.Body=ti;w=function(a){function v(){a.apply(this,arguments)}return __extends(v,a),Object.defineProperty(v.prototype,"_className",{get:function(){return"ContentControl"},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"contentControls",{get:function(){return this.m_contentControls||(this.m_contentControls=new n.ContentControlCollection(this.context,e(this.context,this,"ContentControls",!0,!1))),this.m_contentControls},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"font",{get:function(){return this.m_font||(this.m_font=new n.Font(this.context,e(this.context,this,"Font",!1,!1))),this.m_font},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"inlinePictures",{get:function(){return this.m_inlinePictures||(this.m_inlinePictures=new n.InlinePictureCollection(this.context,e(this.context,this,"InlinePictures",!0,!1))),this.m_inlinePictures},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"lists",{get:function(){return this.m_lists||(this.m_lists=new n.ListCollection(this.context,e(this.context,this,"Lists",!0,!1))),this.m_lists},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"paragraphs",{get:function(){return this.m_paragraphs||(this.m_paragraphs=new n.ParagraphCollection(this.context,e(this.context,this,"Paragraphs",!0,!1))),this.m_paragraphs},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentBody",{get:function(){return this.m_parentBody||(this.m_parentBody=new n.Body(this.context,e(this.context,this,"ParentBody",!1,!1))),this.m_parentBody},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentContentControl",{get:function(){return this.m_parentContentControl||(this.m_parentContentControl=new n.ContentControl(this.context,e(this.context,this,"ParentContentControl",!1,!1))),this.m_parentContentControl},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentContentControlOrNullObject",{get:function(){return this.m_parentContentControlOrNullObject||(this.m_parentContentControlOrNullObject=new n.ContentControl(this.context,e(this.context,this,"ParentContentControlOrNullObject",!1,!1))),this.m_parentContentControlOrNullObject},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentTable",{get:function(){return this.m_parentTable||(this.m_parentTable=new n.Table(this.context,e(this.context,this,"ParentTable",!1,!1))),this.m_parentTable},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentTableCell",{get:function(){return this.m_parentTableCell||(this.m_parentTableCell=new n.TableCell(this.context,e(this.context,this,"ParentTableCell",!1,!1))),this.m_parentTableCell},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentTableCellOrNullObject",{get:function(){return this.m_parentTableCellOrNullObject||(this.m_parentTableCellOrNullObject=new n.TableCell(this.context,e(this.context,this,"ParentTableCellOrNullObject",!1,!1))),this.m_parentTableCellOrNullObject},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parentTableOrNullObject",{get:function(){return this.m_parentTableOrNullObject||(this.m_parentTableOrNullObject=new n.Table(this.context,e(this.context,this,"ParentTableOrNullObject",!1,!1))),this.m_parentTableOrNullObject},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"tables",{get:function(){return this.m_tables||(this.m_tables=new n.TableCollection(this.context,e(this.context,this,"Tables",!0,!1))),this.m_tables},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"appearance",{get:function(){return i("appearance",this.m_appearance,"ContentControl",this._isNull),this.m_appearance},set:function(n){this.m_appearance=n;u(this.context,this,"Appearance",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"cannotDelete",{get:function(){return i("cannotDelete",this.m_cannotDelete,"ContentControl",this._isNull),this.m_cannotDelete},set:function(n){this.m_cannotDelete=n;u(this.context,this,"CannotDelete",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"cannotEdit",{get:function(){return i("cannotEdit",this.m_cannotEdit,"ContentControl",this._isNull),this.m_cannotEdit},set:function(n){this.m_cannotEdit=n;u(this.context,this,"CannotEdit",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"color",{get:function(){return i("color",this.m_color,"ContentControl",this._isNull),this.m_color},set:function(n){this.m_color=n;u(this.context,this,"Color",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"id",{get:function(){return i("id",this.m_id,"ContentControl",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"placeholderText",{get:function(){return i("placeholderText",this.m_placeholderText,"ContentControl",this._isNull),this.m_placeholderText},set:function(n){this.m_placeholderText=n;u(this.context,this,"PlaceholderText",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"removeWhenEdited",{get:function(){return i("removeWhenEdited",this.m_removeWhenEdited,"ContentControl",this._isNull),this.m_removeWhenEdited},set:function(n){this.m_removeWhenEdited=n;u(this.context,this,"RemoveWhenEdited",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"style",{get:function(){return i("style",this.m_style,"ContentControl",this._isNull),this.m_style},set:function(n){this.m_style=n;u(this.context,this,"Style",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"styleBuiltIn",{get:function(){return i("styleBuiltIn",this.m_styleBuiltIn,"ContentControl",this._isNull),this.m_styleBuiltIn},set:function(n){this.m_styleBuiltIn=n;u(this.context,this,"StyleBuiltIn",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"subtype",{get:function(){return i("subtype",this.m_subtype,"ContentControl",this._isNull),this.m_subtype},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"tag",{get:function(){return i("tag",this.m_tag,"ContentControl",this._isNull),this.m_tag},set:function(n){this.m_tag=n;u(this.context,this,"Tag",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"text",{get:function(){return i("text",this.m_text,"ContentControl",this._isNull),this.m_text},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"title",{get:function(){return i("title",this.m_title,"ContentControl",this._isNull),this.m_title},set:function(n){this.m_title=n;u(this.context,this,"Title",n)},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"type",{get:function(){return i("type",this.m_type,"ContentControl",this._isNull),this.m_type},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"ContentControl",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),v.prototype.set=function(n,t){this._recursivelySet(n,t,["title","tag","placeholderText","appearance","color","removeWhenEdited","cannotDelete","cannotEdit","style","styleBuiltIn"],["font"],["contentControls","inlinePictures","lists","paragraphs","parentBody","parentContentControl","parentContentControlOrNullObject","parentTable","parentTableCell","parentTableCellOrNullObject","parentTableOrNullObject","tables","contentControls","inlinePictures","lists","paragraphs","parentBody","parentContentControl","parentContentControlOrNullObject","parentTable","parentTableCell","parentTableCellOrNullObject","parentTableOrNullObject","tables"])},v.prototype.clear=function(){f(this.context,this,"Clear",0,[])},v.prototype.delete=function(n){f(this.context,this,"Delete",0,[n])},v.prototype.getHtml=function(){var t=f(this.context,this,"GetHtml",1,[]),n=new OfficeExtension.ClientResult;return c(this,t,n),n},v.prototype.getOoxml=function(){var t=f(this.context,this,"GetOoxml",1,[]),n=new OfficeExtension.ClientResult;return c(this,t,n),n},v.prototype.getRange=function(t){return new n.Range(this.context,r(this.context,this,"GetRange",1,[t],!1,!1,null))},v.prototype.getTextRanges=function(t,i){return new n.RangeCollection(this.context,r(this.context,this,"GetTextRanges",1,[t,i],!0,!1,null))},v.prototype.insertBreak=function(n,t){f(this.context,this,"InsertBreak",0,[n,t])},v.prototype.insertFileFromBase64=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertFileFromBase64",0,[t,i],!1,!0,null))},v.prototype.insertHtml=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertHtml",0,[t,i],!1,!0,null))},v.prototype.insertInlinePictureFromBase64=function(t,i){return new n.InlinePicture(this.context,r(this.context,this,"InsertInlinePictureFromBase64",0,[t,i],!1,!0,null))},v.prototype.insertOoxml=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertOoxml",0,[t,i],!1,!0,null))},v.prototype.insertParagraph=function(t,i){return new n.Paragraph(this.context,r(this.context,this,"InsertParagraph",0,[t,i],!1,!0,null))},v.prototype.insertTable=function(t,i,u,f){return new n.Table(this.context,r(this.context,this,"InsertTable",0,[t,i,u,f],!1,!0,null))},v.prototype.insertText=function(t,i){return new n.Range(this.context,r(this.context,this,"InsertText",0,[t,i],!1,!0,null))},v.prototype.search=function(t,i){return i=y(this.context,i),new n.RangeCollection(this.context,r(this.context,this,"Search",1,[t,i],!0,!1,null))},v.prototype.select=function(n){f(this.context,this,"Select",1,[n])},v.prototype.split=function(t,i,u,f){return new n.RangeCollection(this.context,r(this.context,this,"Split",1,[t,i,u,f],!0,!1,null))},v.prototype._KeepReference=function(){f(this.context,this,"_KeepReference",1,[])},v.prototype._handleResult=function(n){if(a.prototype._handleResult.call(this,n),!o(n)){var i=n;h(this,i);t(i.Appearance)||(this.m_appearance=i.Appearance);t(i.CannotDelete)||(this.m_cannotDelete=i.CannotDelete);t(i.CannotEdit)||(this.m_cannotEdit=i.CannotEdit);t(i.Color)||(this.m_color=i.Color);t(i.Id)||(this.m_id=i.Id);t(i.PlaceholderText)||(this.m_placeholderText=i.PlaceholderText);t(i.RemoveWhenEdited)||(this.m_removeWhenEdited=i.RemoveWhenEdited);t(i.Style)||(this.m_style=i.Style);t(i.StyleBuiltIn)||(this.m_styleBuiltIn=i.StyleBuiltIn);t(i.Subtype)||(this.m_subtype=i.Subtype);t(i.Tag)||(this.m_tag=i.Tag);t(i.Text)||(this.m_text=i.Text);t(i.Title)||(this.m_title=i.Title);t(i.Type)||(this.m_type=i.Type);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);l(this,i,["contentControls","ContentControls","font","Font","inlinePictures","InlinePictures","lists","Lists","paragraphs","Paragraphs","parentBody","ParentBody","parentContentControl","ParentContentControl","parentContentControlOrNullObject","ParentContentControlOrNullObject","parentTable","ParentTable","parentTableCell","ParentTableCell","parentTableCellOrNullObject","ParentTableCellOrNullObject","parentTableOrNullObject","ParentTableOrNullObject","tables","Tables"])}},v.prototype.load=function(n){return s(this,n),this},v.prototype._handleIdResult=function(n){(a.prototype._handleIdResult.call(this,n),o(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},v.prototype.track=function(){return this.context.trackedObjects.add(this),this},v.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},v.prototype.toJSON=function(){return{appearance:this.m_appearance,cannotDelete:this.m_cannotDelete,cannotEdit:this.m_cannotEdit,color:this.m_color,font:this.m_font,id:this.m_id,placeholderText:this.m_placeholderText,removeWhenEdited:this.m_removeWhenEdited,style:this.m_style,styleBuiltIn:this.m_styleBuiltIn,subtype:this.m_subtype,tag:this.m_tag,text:this.m_text,title:this.m_title,type:this.m_type}},v}(OfficeExtension.ClientObject);n.ContentControl=w;b=function(u){function e(){u.apply(this,arguments)}return __extends(e,u),Object.defineProperty(e.prototype,"_className",{get:function(){return"ContentControlCollection"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return i("items",this.m__items,"ContentControlCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"ContentControlCollection",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),e.prototype.getById=function(t){return new n.ContentControl(this.context,r(this.context,this,"GetById",1,[t],!1,!1,null))},e.prototype.getByIdOrNullObject=function(t){return new n.ContentControl(this.context,r(this.context,this,"GetByIdOrNullObject",1,[t],!1,!1,null))},e.prototype.getByTag=function(t){return new n.ContentControlCollection(this.context,r(this.context,this,"GetByTag",1,[t],!0,!1,null))},e.prototype.getByTitle=function(t){return new n.ContentControlCollection(this.context,r(this.context,this,"GetByTitle",1,[t],!0,!1,null))},e.prototype.getByTypes=function(t){return new n.ContentControlCollection(this.context,r(this.context,this,"GetByTypes",1,[t],!0,!1,null))},e.prototype.getFirst=function(){return new n.ContentControl(this.context,r(this.context,this,"GetFirst",1,[],!1,!1,null))},e.prototype.getFirstOrNullObject=function(){return new n.ContentControl(this.context,r(this.context,this,"GetFirstOrNullObject",1,[],!1,!1,null))},e.prototype.getItem=function(t){return new n.ContentControl(this.context,a(this.context,this,[t]))},e.prototype._KeepReference=function(){f(this.context,this,"_KeepReference",1,[])},e.prototype._handleResult=function(i){var r,e,f,s;if((u.prototype._handleResult.call(this,i),!o(i))&&(r=i,h(this,r),t(r._ReferenceId)||(this.m__ReferenceId=r._ReferenceId),!o(r[OfficeExtension.Constants.items])))for(this.m__items=[],e=r[OfficeExtension.Constants.items],f=0;f0?i.push(t):t.tabIndex===0&&r.push(t):r.push(t);return i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;return r===0&&(r=i.indexOf(n)-i.indexOf(t)),r}),[].concat(i,r)}var o="focus",s="on",k="configurable",d="writable",h="enumerable",u="",c="undefined",t=!1,i=!0,l=2147483647,n=null,r=-1,a=r,g="&_xdm_Info=",nt="&_serializer_version=",tt="_xdm_",ft="_serializer_version=",v="#",it="&",f="class",y={},et=3e4,p=n,w=n,e=(new Date).getTime();return{set_entropy:function(n){var t,r,i;if(typeof n=="string")for(t=0;t6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(r)===OSF.DDA.SettingsManager.DataJSONSuffix&&(i=new Date(parseInt(t.slice(5,r))),i)?i:t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,i);f[u]=t}catch(e){}}return f},loadScript:function(r,u,f){var s,e,o,h,c;r&&u&&(s=window.document,e=y[r],e?e.loaded?u():e.pendingCallbacks.push(u):(o=s.createElement("script"),o.type="text/javascript",e={loaded:t,pendingCallbacks:[u],timer:n},y[r]=e,h=function(){var r,t,u;for(e.timer!=n&&(clearTimeout(e.timer),delete e.timer),e.loaded=i,r=e.pendingCallbacks.length,t=0;t1?l[l.length-1]:n,s,h,c,a;return u&&o!=n&&(o.indexOf(it)>=0&&(o=o.split(it)[0]),o=decodeURIComponent(o)),s=b(),!f&&s&&(h=window.name.indexOf(i),h>r&&(c=window.name.indexOf(";",h),c==r&&(c=window.name.length),a=window.name.substring(h,c),o?s.setItem(a,o):o=s.getItem(a))),o},getConversationId:function(){var i=window.location.search,t=n,r;return i&&(r=i.indexOf("&"),t=r>0?i.substring(1,r):i.substr(1),t&&t.charAt(t.length-1)==="="&&(t=t.substring(0,t.length-1),t&&(t=decodeURIComponent(t)))),t},getInfoItems:function(n){var t=n.split("$");return typeof t[1]==c&&(t=n.split("|")),typeof t[1]==c&&(t=n.split("%7C")),t},getXdmFieldValue:function(n,t){var r=u,f=OSF.OUtil.parseXdmInfo(t),i;if(f&&(i=OSF.OUtil.getInfoItems(f),i!=undefined&&i.length>=3))switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]),f;if(u)throw u;for(f in r)if(u=Function._validateParameter(n[f],r[f],f),u)throw u;},writeProfilerMark:function(n){window.msWriteProfilerMark&&(window.msWriteProfilerMark(n),OsfMsAjaxFactory.msAjaxDebug.trace(n))},outputDebug:function(n){typeof OsfMsAjaxFactory!==c&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){var e,f;r=r||{};for(e in u)f=u[e],r[f]==undefined&&(r[f]=i);return Object.defineProperty(n,t,r),n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[h])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[h])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[d,h,k])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[d,h,k])},finalizeProperties:function(n,r){var e,u;r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f>8,e=o&255,i[t++]=r>>2,i[t++]=(r&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63,isNaN(o)||(r=o>>8,f=h&255,e=h>>8,i[t++]=r>>2,i[t++]=(r&3)<<4|f>>4,i[t++]=(f&15)<<2|e>>6,i[t++]=e&63),isNaN(o)?i[t-1]=64:isNaN(h)&&(i[t-2]=64,i[t-1]=64),c=0;c0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){var u,i,f,r;if(t==n)return n;else if(t instanceof Object)if(Array.isArray(t)){for(u=[],i=0;in)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=ut(u),e=f?u.length-1:0,u.length===0)return n;while(!h&&e>=0&&en)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=ut(u),l=y(u,f),s=v(u.length,l,e),s<0)return n;while(!c&&s>=0&&s0;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[r%16],r=Math.floor(r/16);for(;t<32;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[Math.floor(Math.random()*16)];return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3};OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610,OneNoteIOS:8388611,WordAndroid:8388613,PowerpointAndroid:8388614};OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18,MouseEnter:19,MouseLeave:20};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Status:"status",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",Reserved:"reserved",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData",Base64:"base64"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};OSF.DDA.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidCloseContainerMethod:97,dispidGetAccessTokenMethod:98,dispidOpenBrowserWindow:102,dispidCreateDocumentMethod:105,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];return i?(i.name||(i.name=n[this.errorCodes.ooeInternalError].name),i.message||(i.message=n[this.errorCodes.ooeInternalError].message)):i=n[this.errorCodes.ooeInternalError],i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:t.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:t.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:t.L_SSOConnectionLostError,message:t.L_SSOConnectionLostErrorMessage}}}}(),function(n){var t;(function(n){var t=1.1,ut=function(){function n(){}return n}(),r,i,h,u,c,l,f,a,e,v,y,p,w,b,o,k,d,g,s,nt,tt,it,rt;n.RequirementVersion=ut;r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){var f,u,e,i,r;if(n==undefined)return!1;if(t==undefined&&(t=0),f=this._setMap,u=f._sets,u.hasOwnProperty(n.toLowerCase())){e=u[n.toLowerCase()];try{if((i=this._getVersion(e),t=t+"",r=this._getVersion(t),i.major>0&&i.major>r.major)||i.minor>0&&i.minor>0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(o){return!1}}return!1};t._getVersion=function(n){var u="version format incorrect",t=n.split("."),i=0,r=0;if(t.length<2&&isNaN(Number(n)))throw u;else if(i=Number(t[0]),t.length>=2&&(r=Number(t[1])),isNaN(i)||isNaN(r))throw u;return{minor:r,major:i}};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}();n.RequirementMatrix=r;i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;h=function(n){function i(){n.call(this,{dialogapi:t})}return __extends(i,n),i}(i);n.DefaultDialogSetRequirement=h;u=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelClientDefaultSetRequirement=u;c=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(u);n.ExcelClientV1DefaultSetRequirement=c;l=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookClientDefaultSetRequirement=l;f=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return __extends(i,n),i}(i);n.WordClientDefaultSetRequirement=f;a=function(n){function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return __extends(i,n),i}(f);n.WordClientV1DefaultSetRequirement=a;e=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointClientDefaultSetRequirement=e;v=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(e);n.PowerpointClientV1DefaultSetRequirement=v;y=function(n){function i(){n.call(this,{selection:t,textcoercion:t})}return __extends(i,n),i}(i);n.ProjectClientDefaultSetRequirement=y;p=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return __extends(i,n),i}(i);n.ExcelWebDefaultSetRequirement=p;w=function(n){function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordWebDefaultSetRequirement=w;b=function(n){function i(){n.call(this,{activeview:t,settings:t})}return __extends(i,n),i}(i);n.PowerpointWebDefaultSetRequirement=b;o=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookWebDefaultSetRequirement=o;k=function(n){function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.SwayWebDefaultSetRequirement=k;d=function(n){function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return __extends(i,n),i}(i);n.AccessWebDefaultSetRequirement=d;g=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelIOSDefaultSetRequirement=g;s=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordIOSDefaultSetRequirement=s;nt=function(n){function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return __extends(t,n),t}(s);n.WordIOSV1DefaultSetRequirement=nt;tt=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointIOSDefaultSetRequirement=tt;it=function(n){function i(){n.call(this,{mailbox:t})}return __extends(i,n),i}(i);n.OutlookIOSDefaultSetRequirement=it;rt=function(){function n(){}var t="undefined";return n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},n.getDefaultRequirementMatrix=function(u){var f,e,s,o;return this.initializeDefaultSetMatrix(),f=undefined,e=u.get_requirementMatrix(),e!=undefined&&e.length>0&&typeof JSON!==t?(s=JSON.parse(u.get_requirementMatrix().toLowerCase()),f=new r(new i(s))):(o=n.getClientFullVersionString(u),f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[o]!=undefined?new r(n.DefaultSetArrayMatrix[o]):new r(new i({}))),f},n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix(),e;return f!=undefined&&f.length>0&&typeof JSON!==t?(e=JSON.parse(n.get_requirementMatrix().toLowerCase()),u=new r(new i(e))):u=new r(new h),u},n.getClientFullVersionString=function(n){var i=n.get_appMinorVersion(),u="",r="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;return f&&n.get_appVersion()==1?r=t==4096&&i>=15?"16.00.01":"16.00":n.get_appName()==64?r=n.get_appVersion():(u=i<10?"0"+i:""+i,r=n.get_appVersion()+"."+u),n.get_appName()+"-"+r},n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new c;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new v;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new l;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new w;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new b;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new g;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new k;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new nt;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new tt;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new it},n.Excel_RCLIENT_1600="1-16.00",n.Excel_RCLIENT_1601="1-16.01",n.Word_RCLIENT_1600="2-16.00",n.Word_RCLIENT_1601="2-16.01",n.PowerPoint_RCLIENT_1600="4-16.00",n.PowerPoint_RCLIENT_1601="4-16.01",n.Outlook_RCLIENT_1600="8-16.00",n.Excel_WAC_1600="16-16.00",n.Word_WAC_1600="32-16.00",n.Outlook_WAC_1600="64-16.00",n.Outlook_WAC_1601="64-16.01",n.Project_RCLIENT_1600="128-16.00",n.Access_WAC_1600="256-16.00",n.PowerPoint_WAC_1600="512-16.00",n.Excel_IOS_1600="1024-16.00",n.SWAY_WAC_1600="2048-16.00",n.Word_IOS_1600="4096-16.00",n.Word_IOS_16001="4096-16.00.01",n.PowerPoint_IOS_1600="8192-16.00",n.Outlook_IOS_1600="65536-16.00",n.DefaultSetArrayMatrix={},n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))}(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda(),function(n){var t;(function(n){var t=function(){function n(){var n=this;n.getDiagnostics=function(n){return{host:this.getHost(),version:n||this.getDefaultVersion(),platform:this.getPlatform()}};n.platformRemappings={web:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,winrt:Microsoft.Office.WebExtension.PlatformType.Universal,win32:Microsoft.Office.WebExtension.PlatformType.PC,mac:Microsoft.Office.WebExtension.PlatformType.Mac,ios:Microsoft.Office.WebExtension.PlatformType.iOS,android:Microsoft.Office.WebExtension.PlatformType.Android};n.camelCaseMappings={powerpoint:Microsoft.Office.WebExtension.HostType.PowerPoint,onenote:Microsoft.Office.WebExtension.HostType.OneNote};n.hostInfo=OSF._OfficeAppFactory.getHostInfo();n.getHost=n.getHost.bind(n);n.getPlatform=n.getPlatform.bind(n);n.getDiagnostics=n.getDiagnostics.bind(n)}return n.prototype.capitalizeFirstLetter=function(n){return n?n[0].toUpperCase()+n.slice(1).toLowerCase():n},n.getInstance=function(){return n.hostObj===undefined&&(n.hostObj=new n),n.hostObj},n.prototype.getPlatform=function(){var n=this,t;return n.hostInfo.hostPlatform&&(t=n.hostInfo.hostPlatform.toLowerCase(),n.platformRemappings[t])?n.platformRemappings[t]:null},n.prototype.getHost=function(){var n=this,t;if(n.hostInfo.hostType){if(t=n.hostInfo.hostType.toLowerCase(),n.camelCaseMappings[t])return n.camelCaseMappings[t];if(t=n.capitalizeFirstLetter(n.hostInfo.hostType),Microsoft.Office.WebExtension.HostType[t])return Microsoft.Office.WebExtension.HostType[t]}return null},n.prototype.getDefaultVersion=function(){return this.getHost()?"16.0.0000.0000":null},n}();n.Host=t})(t=n.HostName||(n.HostName={}))}(OfficeExt||(OfficeExt={}));Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){n||(window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,n=!0)},disableShortcut:function(){n&&(t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window),n=!1)}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i,r,o,u,f,e;if(n&&typeof n=="string"&&(r=n.indexOf("#"),r!=-1)){o=n.substring(0,r);u=n.substring(r+1);switch(o){case"binding":case"bindings":u&&(i=new OSF.DDA.BindingPromise(u))}}if(i)return i.onFail=t,i;else if(t)if(f=typeof t,f=="function")e={},e[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(e,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext));else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f);};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this,s,e;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(n.get_hostFullVersion())}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.auth&&OSF.OUtil.defineEnumerableProperty(f,"auth",{value:n.auth});n.application&&OSF.OUtil.defineEnumerableProperty(f,"application",{value:n.application});n.get_isDialog()?(e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e})):(t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t}),r&&(s=r.displayName||"appOM",delete r.displayName,OSF.OUtil.defineEnumerableProperty(f,s,{value:r})),u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}}),e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e}))};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Application=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this,u;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get:function(){var n;return OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext()),n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,e=n.length,o=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){var u,i,r;for(u in n){if(i=n[u],r=t[u],i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw o();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw o();}};f.extractRequiredArguments=function(t,i,r){var f,u,h,s,c,l;if(t.lengths+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(c=n.length-1;c>=s;c--){l=n[c];switch(typeof l){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=l;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}if(f=o.fillOptions(f,i,r,u),e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;return o.verifyArguments(t,f),f}var h="function",s=n.length,o=new OSF.DDA.ApiMethodCall(n,t,i,f,e);this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),u=c(n,r,t,i);return o.constructCallArgs(r,u,t,i)};this.processResponse=function(n,t,i,f){return n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n)};this.getCallArgs=function(n){for(var t,u,r,i=n.length-1;i>=s;i--){r=n[i];switch(typeof r){case"object":t=r;break;case h:u=r}}return t=t||{},u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u),t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],i=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],t,i,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback],u,r;f&&(u={},u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?u[OSF.DDA.AsyncResultEnum.Properties.Value]=i:(r={},i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i),f(new OSF.DDA.AsyncResult(u,r)))};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.SyncMethodNames[t]=i};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){function o(n,i,r,u){var o,c,s,h;if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(s=n.length-1;s>=e;s--){h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}return o=f.fillOptions(o,i,r,u),f.verifyArguments(t,o),o}var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),u=o(n,r,t,i);return f.constructCallArgs(r,u,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){function e(i,f){var a=i?{}:undefined,s,h,o,v,c,l;for(s in i){if(h=i[s],OSF.DDA.ListType.isListType(s)){o=[];for(v in h)o.push(e(h[v],f))}else OSF.OUtil.listContainsKey(r,s)?o=r[s][f](h):f==u&&n.preserveNesting(s)?o=e(h,f):(c=t[s],c?(l=c[f],l&&(o=l[h],o===undefined&&(o=h))):o=h);a[s]=o}return a}function l(i,r){var e,u,h,s;for(u in r)h=n.isComplexType(u)?l(i,t[u][o]):i[u],h!=undefined&&(e||(e={}),s=r[u],s==f&&(s=u),e[s]=n.pack(u,h));return e}function s(i,r,e){var o,a,h,l,p,v,y;e||(e={});for(o in r){if(a=r[o],a==f)h=i;else if(a==c){e[o]=i.toArray();continue}else h=i[a];if(h===null||h===undefined)e[o]=undefined;else if(h=n.unpack(o,h),n.isComplexType(o))l=t[o][u],n.preserveNesting(o)?e[o]=s(h,l):s(h,l,e);else if(OSF.DDA.ListType.isListType(o)){l={};p=OSF.DDA.ListType.getDescriptor(o);l[p]=f;v=new Array(h.length);for(y in h)v[y]=s(h[y],l);e[o]=v}else e[o]=h}return e}function a(n,i,r){var f=t[n][r],u,o,c;return r=="toHost"?(o=e(i,r),u=l(o,f)):r==h&&(c=s(i,f),u=e(c,r)),u}var h="fromHost",i=this,o="toHost",u=h,c="sourceData",f="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];t||(t={});i.addMapping=function(n,i){var e,h,c,l,r,s,a,v;if(i.map){e=i.map;h={};for(c in e)l=e[c],l==f&&(l=c),h[l]=c}else e=i.toHost,h=i.fromHost;if(r=t[n],r){s=r[o];for(a in s)e[a]=s[a];s=r[u];for(v in s)h[v]=s[v]}else r=t[n]={};r[o]=e;r[u]=h};i.toHost=function(n,t){return a(n,t,o)};i.fromHost=function(n,t){return a(n,t,u)};i.self=f;i.sourceData=c;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){return this.isDynamicType(n)?t[n].toHost(i):i};i.unpack=function(n,i){return this.isDynamicType(n)?t[n].fromHost(i):i}};OSF.DDA.getDecoratedParameterMap=function(n,t){function r(n){var i=null,r,t;if(n)for(i={},r=n.length,t=0;t0){for(r=[],i=0;i=s)break;if(f=Function._validateParameter(n[e],o,h),f)return f.popStackFrame(),f}return t}),Function._validateParameterCount||(Function._validateParameterCount=function(n,r,u){var f,s,e=r.length,h=n.length,c,l,a;if(he)for(s=i,f=0;f0&&t.push(u)}}catch(s){}return t}var i=[],t={};t[Microsoft.Office.WebExtension.Parameters.Data]=function(){var t=0,i=1;return{toHost:function(n){if(OSF.DDA.TableDataProperties&&typeof n!="string"&&n[OSF.DDA.TableDataProperties.TableRows]!==undefined){var r=[];r[t]=n[OSF.DDA.TableDataProperties.TableRows];r[i]=n[OSF.DDA.TableDataProperties.TableHeaders];n=r}return n},fromHost:function(r){var f,e,u;return r.toArray?(e=r.dimensions(),e===2?f=n(r):(u=r.toArray(),u.length===2&&(u[0]!=null&&u[0].toArray||u[1]!=null&&u[1].toArray)?(f={},f[OSF.DDA.TableDataProperties.TableRows]=n(u[t]),f[OSF.DDA.TableDataProperties.TableHeaders]=n(u[i])):f=u)):f=r,f}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,i,t);this.unpack=function(n,i){var r,u;return this.isComplexType(n)||OSF.DDA.ListType.isListType(n)?(u=(i||typeof i=="unknown")&&i.toArray,r=u?i.toArray():i||{}):r=this.isDynamicType(n)?t[n].fromHost(i):i,r}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(n){function t(n){var i=n,f,r,u;if(OSF.OUtil.isArray(n))for(f=i.length,r=0;r2)for(r=[],f=1;f40)&&(n=OSF.OUtil.Guid.generateNewGuid(),t.setValue(t.clientIDKey,n)),n},n.prototype.saveLog=function(n,t){var i=this,u=i.getValue(i.logIdSetKey);u=(u&&u.length>0?u+";":r)+n;i.setValue(i.logIdSetKey,u);i.setValue(n,t)},n.prototype.enumerateLog=function(n,t){var i=this,e=i.getValue(i.logIdSetKey),u,o,r,f;if(e){u=e.split(";");for(o in u)r=u[o],f=i.getValue(r),f&&(n&&n(r,f),t&&i.remove(r));t&&i.remove(i.logIdSetKey)}},n.prototype.getValue=function(n){var t=OSF.OUtil.getLocalStorage(),i=r;return t&&(i=t.getItem(n)),i},n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)},n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}},n}(),o=function(){function t(){}return t.prototype.LogData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(t)}catch(i){}},t.prototype.LogRawData=function(t){if(OSF.Logger&&n.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(t))}catch(i){}},t}();n.initialize=y;n.onAppActivated=p;n.onScriptDone=w;n.onCallDone=b;n.onMethodDone=k;n.onPropertyDone=d;n.onEventDone=g;n.onRegisterDone=nt;n.onAppClosed=tt;n.setOsfControlAppCorrelationId=it;n.doAppInitializationLogging=l;n.logAppCommonMessage=rt;n.logAppException=ut;OSF.AppTelemetry=n}(OSFAppTelemetry||(OSFAppTelemetry={}));Microsoft.Office.WebExtension.FileType={Text:"text",Compressed:"compressed",Pdf:"pdf"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FileProperties:"FileProperties",FileSliceProperties:"FileSliceProperties"});OSF.DDA.FileProperties={Handle:"FileHandle",FileSize:"FileSize",SliceSize:Microsoft.Office.WebExtension.Parameters.SliceSize};OSF.DDA.File=function(n,t,i){var r,u;OSF.OUtil.defineEnumerableProperties(this,{size:{value:t},sliceCount:{value:Math.ceil(t/i)}});r={};r[OSF.DDA.FileProperties.Handle]=n;r[OSF.DDA.FileProperties.SliceSize]=i;u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.GetDocumentCopyChunkAsync,u.ReleaseDocumentCopyAsync],r)};OSF.DDA.FileSliceOffset="fileSliceoffset";OSF.DDA.AsyncMethodNames.addNames({GetDocumentCopyAsync:"getFileAsync",GetDocumentCopyChunkAsync:"getSliceAsync",ReleaseDocumentCopyAsync:"closeAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FileType,"enum":Microsoft.Office.WebExtension.FileType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:{types:["number"],defaultValue:4194304}}],checkCallArgs:function(n){var t=n[Microsoft.Office.WebExtension.Parameters.SliceSize];if(t<=0||t>4194304)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return n},onSucceeded:function(n,t,i){return new OSF.DDA.File(n[OSF.DDA.FileProperties.Handle],n[OSF.DDA.FileProperties.FileSize],i[Microsoft.Office.WebExtension.Parameters.SliceSize])}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(n,t){return t[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(r<0||r>=t.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;return n[OSF.DDA.FileSliceOffset]=parseInt((r*i[OSF.DDA.FileProperties.SliceSize]).toString()),n},onSucceeded:function(n,t,i){var r={};return OSF.OUtil.defineEnumerableProperties(r,{data:{value:n[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:i[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:n[OSF.DDA.FileProperties.SliceSize]}}),r}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}}]});Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(n){var i=this,r,t,u;if(i._eventHandlers={},i._objectEventHandlers={},i._queuedEventsArgs={},n!=null)for(r=0;r0)for(r=0;r0)for(r=0;r0?(this._eventHandlers[n]=[],!0):!1},clearObjectEventHandlers:function(n,t){return this._objectEventHandlers[n]!=null&&this._objectEventHandlers[n][t]!=null?(this._objectEventHandlers[n][t]=[],!0):!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},getObjectEventHandlerCount:function(n,t){return this._objectEventHandlers[n]==null||this._objectEventHandlers[n][t]==null?0:this._objectEventHandlers[n][t].length},fireEvent:function(n){var t,r,i;if(n.type==undefined)return!1;if(t=n.type,t&&this._eventHandlers[t]){for(r=this._eventHandlers[t],i=0;i0)){for(r=t[0];i.length>0;)u=i.shift(),r(u);return!0}return!1},clearQueuedEvent:function(n){if(n&&this._eventHandlers[n]){var t=this._queuedEventsArgs[n];t&&(this._queuedEventsArgs[n]=[])}}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var o="hostPlatform",f="outlook",e="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:r=new OSF.DDA.ObjectEventArgs(n,i[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:r=new OSF.DDA.RichApiMessageEventArgs(n,i);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i),t.initialize(r.initialData),(OSF._OfficeAppFactory.getHostInfo()[o]=="win32"||OSF._OfficeAppFactory.getHostInfo()[o]=="mac")&&t.setCurrentItemNumber(r.itemNumber.itemNumber);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkRecipientsChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if(OSF._OfficeAppFactory.getHostInfo()[e]==f)r=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(i);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var i=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),t=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];t(arguments,i,n)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(n){var i=OSF.DDA.SyncMethodNames.MessageParent.displayName,t=this,r;t[i]||OSF.OUtil.defineEnumerableProperty(t,i,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return n(arguments,t)}});r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;t[r]||typeof OSF.DialogParentMessageEventDispatch=="undefined"||OSF.DDA.DispIdHost.addEventSupport(t,OSF.DialogParentMessageEventDispatch,n);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(n){n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:n[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels,value:{types:["boolean"],defaultValue:!1}}],privateStateCallbacks:[],onSucceeded:function(n){var f=n[Microsoft.Office.WebExtension.Parameters.Id],i=n[Microsoft.Office.WebExtension.Parameters.Data],t=new OSF.DialogHandler,e=OSF.DDA.AsyncMethodNames.CloseAsync.displayName,r,u;return OSF.OUtil.defineEnumerableProperty(t,e,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];n(arguments,f,i,t)}}),r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName,OSF.OUtil.defineEnumerableProperty(t,r,{value:function(){var r=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],n=r.verifyAndExtractCall(arguments,t,i),u=n[Microsoft.Office.WebExtension.Parameters.EventType],f=n[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(u,f)}}),u=OSF.DDA.SyncMethodNames.SendMessage.displayName,OSF.OUtil.defineEnumerableProperty(t,u,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return n(arguments,i,t)}}),t},checkCallArgs:function(n){return n[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Width]=1),!n[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&n[Microsoft.Office.WebExtension.Parameters.Width]>100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99),n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1),!n[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99),n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SafeArray.Delegate.openDialog=function(n){try{n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!0,n);OSF.ClientHostController.openDialog(n.dispId,n.targetId,function(t,i){n.onEvent&&n.onEvent(i);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.closeDialog=function(n){n.onCalling&&n.onCalling();var t=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(!1,n);try{OSF.ClientHostController.closeDialog(n.dispId,n.targetId,t)}catch(i){OSF.DDA.SafeArray.Delegate._onException(i,n)}};OSF.DDA.SafeArray.Delegate.messageParent=function(n){try{n.onCalling&&n.onCalling();var i=(new Date).getTime(),t=OSF.ClientHostController.messageParent(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs((new Date).getTime()-i),t),t}catch(r){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(r)}};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:0},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.sendMessage=function(n){try{n.onCalling&&n.onCalling();var r=(new Date).getTime(),t=OSF.ClientHostController.sendMessage(n.hostCallArgs);return n.onReceiving&&n.onReceiving(),t}catch(i){return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(i)}};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.FileType,{Text:"text",Pdf:"pdf"});OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(n){OSF.OUtil.defineEnumerableProperties(this,{url:{value:n[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(n){return new Microsoft.Office.WebExtension.FileProperties(n)}});Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"};Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"};Microsoft.Office.WebExtension.Index={First:"first",Last:"last",Next:"next",Previous:"previous"};OSF.DDA.AsyncMethodNames.addNames({GoToByIdAsync:"goToByIdAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GoToByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string","number"]},{name:Microsoft.Office.WebExtension.Parameters.GoToType,"enum":Microsoft.Office.WebExtension.GoToType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:{"enum":Microsoft.Office.WebExtension.SelectionMode,defaultValue:Microsoft.Office.WebExtension.SelectionMode.Default}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:0},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:1},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:2},{name:Microsoft.Office.WebExtension.GoToType.Index,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:0},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:1},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:1},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileProperties.FileSize,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0},{name:OSF.DDA.FileProperties.SliceSize,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:0},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:5},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:6}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:0}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileSliceOffset,value:1},{name:OSF.DDA.FileProperties.SliceSize,value:2}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0}]});OSF.DDA.AsyncMethodNames.addNames({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync"}),function(){function r(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&r&&(r[OSF.DDA.TableDataProperties.TableRows]!=undefined||r[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(r=OSF.DDA.OMFactory.manufactureTableData(r)),r=OSF.DDA.DataCoercion.coerceData(r,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),r==undefined?null:r}var i=!1,n="boolean",t="number";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,"enum":Microsoft.Office.WebExtension.CoercionType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}}],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object",t,n]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[t,n],defaultValue:i}}],privateStateCallbacks:[]})}();OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:1},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:2},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:3},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:4},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:5}]});OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",RefreshingSettings:"refreshingSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(n){return OSF.OUtil.serializeSettings(n)},deserializeSettings:function(n){return OSF.OUtil.deserializeSettings(n)}};OSF.DDA.Settings=function(n){var t="name",i;n=n||{};i=function(n){var i=OSF.OUtil.getSessionStorage(),t,r;i&&(t=OSF.DDA.SettingsManager.serializeSettings(n),r=JSON?JSON.stringify(t):Sys.Serialization.JavaScriptSerializer.serialize(t),i.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),r))};OSF.OUtil.defineEnumerableProperties(this,{get:{value:function(i){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]),r;if(u)throw u;return r=n[i],typeof r=="undefined"?null:r}},set:{value:function(r,u){var f=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1},{name:"value",mayBeNull:!0}]);if(f)throw f;n[r]=u;i(n)}},remove:{value:function(r){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]);if(u)throw u;delete n[r];i(n)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],n)};OSF.DDA.RefreshableSettings=function(n){OSF.DDA.RefreshableSettings.uber.constructor.call(this,n);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],n);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:n}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(n,t){return t}}],onSucceeded:function(n,t,i){var f=n[OSF.DDA.SettingsManager.SerializedSettings],u=OSF.DDA.SettingsManager.deserializeSettings(f),e=i[OSF.DDA.SettingsManager.RefreshingSettings];for(var r in e)t.remove(r);for(r in u)t.set(r,u[r]);return t}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(n,t){return OSF.DDA.SettingsManager.serializeSettings(t)}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});Microsoft.Office.WebExtension.BindingType={Table:"table",Text:"text",Matrix:"matrix"};OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType};OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{BindingList:"BindingList"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{Subset:"subset",BindingProperties:"BindingProperties"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList,OSF.DDA.PropertyDescriptors.BindingProperties);OSF.DDA.BindingPromise=function(n,t){this._id=n;OSF.OUtil.defineEnumerableProperty(this,"onFail",{get:function(){return t},set:function(n){var i=typeof n;if(i!="undefined"&&i!="function")throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,i);t=n}})};OSF.DDA.BindingPromise.prototype={_fetch:function(n){var t=this,i;return t.binding?n&&n(t.binding):t._binding||(i=t,Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(t._id,function(t){t.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded?(OSF.OUtil.defineEnumerableProperty(i,"binding",{value:t.value}),n&&n(i.binding)):i.onFail&&i.onFail(t)})),t},getDataAsync:function(){var n=arguments;return this._fetch(function(t){t.getDataAsync.apply(t,n)}),this},setDataAsync:function(){var n=arguments;return this._fetch(function(t){t.setDataAsync.apply(t,n)}),this},addHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.addHandlerAsync.apply(t,n)}),this},removeHandlerAsync:function(){var n=arguments;return this._fetch(function(t){t.removeHandlerAsync.apply(t,n)}),this}};OSF.DDA.BindingFacade=function(n){this._eventDispatches=[];OSF.OUtil.defineEnumerableProperty(this,"document",{value:n});var t=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[t.AddFromSelectionAsync,t.AddFromNamedItemAsync,t.GetAllAsync,t.GetByIdAsync,t.ReleaseByIdAsync])};OSF.DDA.UnknownBinding=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}})};OSF.DDA.Binding=function(n,t){var r,u,i,f;OSF.OUtil.defineEnumerableProperties(this,{document:{value:t},id:{value:n}});r=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[r.GetDataAsync,r.SetDataAsync]);u=Microsoft.Office.WebExtension.EventType;i=t.bindings._eventDispatches;i[n]||(i[n]=new OSF.EventDispatch([u.BindingSelectionChanged,u.BindingDataChanged]));f=i[n];OSF.DDA.DispIdHost.addEventSupport(this,f)};OSF.DDA.generateBindingId=function(){return"UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+(new Date).getTime()};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureBinding=function(n,t){var r=n[OSF.DDA.BindingProperties.Id],u=n[OSF.DDA.BindingProperties.RowCount],f=n[OSF.DDA.BindingProperties.ColumnCount],s=n[OSF.DDA.BindingProperties.HasHeaders],i,e,o;switch(n[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:i=new OSF.DDA.TextBinding(r,t);break;case Microsoft.Office.WebExtension.BindingType.Matrix:i=new OSF.DDA.MatrixBinding(r,t,u,f);break;case Microsoft.Office.WebExtension.BindingType.Table:e=function(){return OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument};o=e()&&OSF.DDA.ExcelTableBinding?OSF.DDA.ExcelTableBinding:OSF.DDA.TableBinding;i=new o(r,t,u,f,s);break;default:i=new OSF.DDA.UnknownBinding(r,t)}return i};OSF.DDA.AsyncMethodNames.addNames({AddFromSelectionAsync:"addFromSelectionAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:"getByIdAsync",ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync"}),function(){function u(n){return OSF.DDA.OMFactory.manufactureBinding(n,Microsoft.Office.WebExtension.context.document)}function f(n){return n.id}function e(n,t,i){var u=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&u&&(u[OSF.DDA.TableDataProperties.TableRows]!=undefined||u[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(u=OSF.DDA.OMFactory.manufactureTableData(u)),u=OSF.DDA.DataCoercion.coerceData(u,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),u==undefined?r:u}var t="number",i="object",n="string",r=null;OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:[n]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[n],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return!0}}],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.BindingList],u)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:u});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n,t,i){var r=i[Microsoft.Office.WebExtension.Parameters.Id];delete t._eventDispatches[r]}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n,t){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&n[Microsoft.Office.WebExtension.Parameters.RowCount]==0&&n[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn],delete n[Microsoft.Office.WebExtension.Parameters.RowCount],delete n[Microsoft.Office.WebExtension.Parameters.ColumnCount]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]||n[Microsoft.Office.WebExtension.Parameters.RowCount]||n[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[n,i,t,"boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:{types:[i,n],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[i],defaultValue:r}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[t],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[t],defaultValue:0}}],checkCallArgs:function(n,t){if(n[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&n[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&(delete n[Microsoft.Office.WebExtension.Parameters.StartRow],delete n[Microsoft.Office.WebExtension.Parameters.StartColumn]),n[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(t.type)&&(n[Microsoft.Office.WebExtension.Parameters.StartRow]||n[Microsoft.Office.WebExtension.Parameters.StartColumn]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return n},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}]})}();OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.MatrixBinding=function(n,t,i,r){OSF.DDA.MatrixBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Matrix},rowCount:{value:i?i:0},columnCount:{value:r?r:0}})};OSF.OUtil.extend(OSF.DDA.MatrixBinding,OSF.DDA.Binding);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.BindingProperties,fromHost:[{name:OSF.DDA.BindingProperties.Id,value:0},{name:OSF.DDA.BindingProperties.Type,value:1},{name:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,value:2}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.BindingType,toHost:[{name:Microsoft.Office.WebExtension.BindingType.Text,value:0},{name:Microsoft.Office.WebExtension.BindingType.Matrix,value:1},{name:Microsoft.Office.WebExtension.BindingType.Table,value:2}],invertible:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromSelectionMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddBindingFromNamedItemMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,value:0},{name:Microsoft.Office.WebExtension.Parameters.Id,value:1},{name:Microsoft.Office.WebExtension.Parameters.BindingType,value:2},{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseBindingMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetAllBindingsMethod,fromHost:[{name:OSF.DDA.ListDescriptors.BindingList,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetBindingDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:2},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:3},{name:OSF.DDA.PropertyDescriptors.Subset,value:4}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetBindingDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:1},{name:Microsoft.Office.WebExtension.Parameters.Data,value:2},{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,fromHost:[{name:OSF.DDA.BindingProperties.RowCount,value:0},{name:OSF.DDA.BindingProperties.ColumnCount,value:1},{name:OSF.DDA.BindingProperties.HasHeaders,value:2}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.Subset,toHost:[{name:OSF.DDA.SafeArray.UniqueArguments.Offset,value:0},{name:OSF.DDA.SafeArray.UniqueArguments.Run,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Offset,toHost:[{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:0},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.SafeArray.UniqueArguments.Run,toHost:[{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:0},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:1}],canonical:!0,isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddColumnsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidClearAllRowsMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}]});Microsoft.Office.WebExtension.TableData=function(n,t){function i(n){if(n==null||n==undefined)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(n,2);t<2;t++)n=[n];return n}catch(i){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(n){t=i(n)}},rows:{get:function(){return n},set:function(t){n=t==null||OSF.OUtil.isArray(t)&&t.length==0?[]:i(t)}}});this.headers=t;this.rows=n};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(n){return new Microsoft.Office.WebExtension.TableData(n[OSF.DDA.TableDataProperties.TableRows],n[OSF.DDA.TableDataProperties.TableHeaders])};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{TableDataProperties:"TableDataProperties"});OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};OSF.DDA.TableBinding=function(n,t,i,r,u){OSF.DDA.TableBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:i?i:0},columnCount:{value:r?r:0},hasHeaders:{value:u?u:!1}});var f=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[f.AddRowsAsync,f.AddColumnsAsync,f.DeleteAllDataValuesAsync])};OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding);OSF.DDA.AsyncMethodNames.addNames({AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync"}),function(){function n(n){return n.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:n}]})}();OSF.DDA.TextBinding=function(n,t){OSF.DDA.TextBinding.uber.constructor.call(this,n,t);OSF.OUtil.defineEnumerableProperty(this,"type",{value:Microsoft.Office.WebExtension.BindingType.Text})};OSF.OUtil.extend(OSF.DDA.TextBinding,OSF.DDA.Binding);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"});OSF.DDA.DocumentSelectionChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:n}})};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDeleted:"objectDeleted"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectSelectionChanged:"objectSelectionChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ObjectDataChanged:"objectDataChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ContentControlAdded:"contentControlAdded"});OSF.DDA.ObjectEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:n},object:{value:t}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDeletedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidObjectDataChangedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidContentControlAddedEvent,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{BindingSelectionChanged:"bindingSelectionChanged",BindingDataChanged:"bindingDataChanged"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{BindingSelectionChangedEvent:"BindingSelectionChangedEvent"});OSF.DDA.BindingSelectionChangedEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingSelectionChanged},binding:{value:n}});for(var i in t)OSF.OUtil.defineEnumerableProperty(this,i,{value:t[i]})};OSF.DDA.BindingDataChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingDataChanged},binding:{value:n}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:0},{name:OSF.DDA.PropertyDescriptors.Subset,value:1}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingSelectionChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidBindingDataChangedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.BindingProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var n=null;return{findArrayDimensionality:function(n){if(OSF.OUtil.isArray(n)){for(var t=0,i=0;i0},enumerable:!0,configurable:!0}),t.prototype._getLastAction=function(){return this.m_actions[this.m_actions.length-1]},t.prototype.addTrace=function(n,t){this.m_traceInfos[n]=t},t.prototype.ensureInstantiateObjectPath=function(t){if(t){if(this.m_instantiatedObjectPaths[t.objectPathInfo.Id])return;if(this.ensureInstantiateObjectPath(t.parentObjectPath),this.ensureInstantiateObjectPaths(t.argumentObjectPaths),!this.m_instantiatedObjectPaths[t.objectPathInfo.Id]){var r={Id:this.m_context._nextId(),ActionType:1,Name:"",ObjectPathId:t.objectPathInfo.Id},i=new n.Action(r,!1,!1);i.referencedObjectPath=t;this.addAction(i)}}},t.prototype.ensureInstantiateObjectPaths=function(n){if(n)for(var t=0;t=0;--r)if(i=n[r],u=i.actionInfo.Id,i.referencedObjectPath&&t._updateLastUsedActionIdOfObjectPathId(e,i.referencedObjectPath,u),o=i.referencedArgumentObjectPaths,o)for(v=o.length,s=0;s0?i.actionInfo.L=c:i.actionInfo.L&&delete i.actionInfo.L},t}();n.ClientRequest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;n._internalConfig={showDisposeInfoInDebugInfo:!1,enableEarlyDispose:!0,alwaysPolyfillClientObjectRetrieveMethod:!1};t=function(){function t(){}return t.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},t.prototype._createRequestExecutorOrNull=function(){return null},Object.defineProperty(t.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),t}();n.SessionBase=t;i=function(){function i(r){if(this.m_customRequestHeaders={},this._onRunFinishedNotifiers=[],this.m_nextId=0,i._overrideSession)this.m_requestUrlAndHeaderInfoResolver=i._overrideSession;else if((n.Utility.isNullOrUndefined(r)||typeof r=="string"&&r.length===0)&&(r=i.defaultRequestUrlAndHeaders,r||(r={url:n.Constants.localDocument,headers:{}})),typeof r=="string")this.m_requestUrlAndHeaderInfo={url:r,headers:{}};else if(i.isRequestUrlAndHeaderInfoResolver(r))this.m_requestUrlAndHeaderInfoResolver=r;else if(i.isRequestUrlAndHeaderInfo(r)){var u=r;this.m_requestUrlAndHeaderInfo={url:u.url,headers:{}};n.Utility._copyHeaders(u.headers,this.m_requestUrlAndHeaderInfo.headers)}else throw n._Internal.RuntimeError._createInvalidArgError("url");this.m_requestUrlAndHeaderInfoResolver instanceof t&&(this.m_session=this.m_requestUrlAndHeaderInfoResolver);this._processingResult=!1;this._customData=n.Constants.iterativeExecutor;this.sync=this.sync.bind(this)}return Object.defineProperty(i.prototype,"session",{get:function(){return this.m_session},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"eventRegistration",{get:function(){return this.m_session?this.m_session.eventRegistration:n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_url",{get:function(){return this.m_requestUrlAndHeaderInfo?this.m_requestUrlAndHeaderInfo.url:null},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_pendingRequest",{get:function(){return this.m_pendingRequest==null&&(this.m_pendingRequest=new n.ClientRequest(this)),this.m_pendingRequest},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"debugInfo",{get:function(){var t=new n.RequestPrettyPrinter(this._rootObjectPropertyName,this._pendingRequest._objectPaths,this._pendingRequest._actions,n._internalConfig.showDisposeInfoInDebugInfo),i=t.process();return{pendingStatements:i}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"trackedObjects",{get:function(){return this.m_trackedObjects||(this.m_trackedObjects=new n.TrackedObjects(this)),this.m_trackedObjects},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"requestHeaders",{get:function(){return this.m_customRequestHeaders},enumerable:!0,configurable:!0}),i.prototype.load=function(t,r){n.Utility.validateContext(this,t);var u=i._parseQueryOption(r),f=n.ActionFactory.createQueryAction(this,t,u);this._pendingRequest.addActionResultHandler(f,t)},i.isLoadOption=function(t){if(!n.Utility.isUndefined(t.select)&&(typeof t.select=="string"||Array.isArray(t.select))||!n.Utility.isUndefined(t.expand)&&(typeof t.expand=="string"||Array.isArray(t.expand))||!n.Utility.isUndefined(t.top)&&typeof t.top=="number"||!n.Utility.isUndefined(t.skip)&&typeof t.skip=="number")return!0;for(var i in t)return!1;return!0},i.parseStrictLoadOption=function(n){var t={Select:[]};return i.parseStrictLoadOptionHelper(t,"","option",n),t},i.combineQueryPath=function(n,t,i){return n.length===0?t:n+i+t},i.parseStrictLoadOptionHelper=function(t,r,u,f){var e,o;for(e in f)if(o=f[e],e==="$all"){if(typeof o!="boolean")throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));o&&t.Select.push(i.combineQueryPath(r,"*","/"))}else if(e==="$top"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));t.Top=o}else if(e==="$skip"){if(typeof o!="number"||r.length>0)throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));t.Skip=o}else if(typeof o=="boolean")o&&t.Select.push(i.combineQueryPath(r,e,"/"));else if(typeof o=="object")i.parseStrictLoadOptionHelper(t,i.combineQueryPath(r,e,"/"),i.combineQueryPath(u,e,"."),o);else throw n._Internal.RuntimeError._createInvalidArgError(i.combineQueryPath(u,e,"."));},i._parseQueryOption=function(t){var u={},f,r;if(typeof t=="string")f=t,u.Select=n.Utility._parseSelectExpand(f);else if(Array.isArray(t))u.Select=t;else if(typeof t=="object")if(r=t,i.isLoadOption(r)){if(typeof r.select=="string")u.Select=n.Utility._parseSelectExpand(r.select);else if(Array.isArray(r.select))u.Select=r.select;else if(!n.Utility.isNullOrUndefined(r.select))throw n._Internal.RuntimeError._createInvalidArgError("option.select");if(typeof r.expand=="string")u.Expand=n.Utility._parseSelectExpand(r.expand);else if(Array.isArray(r.expand))u.Expand=r.expand;else if(!n.Utility.isNullOrUndefined(r.expand))throw n._Internal.RuntimeError._createInvalidArgError("option.expand");if(typeof r.top=="number")u.Top=r.top;else if(!n.Utility.isNullOrUndefined(r.top))throw n._Internal.RuntimeError._createInvalidArgError("option.top");if(typeof r.skip=="number")u.Skip=r.skip;else if(!n.Utility.isNullOrUndefined(r.skip))throw n._Internal.RuntimeError._createInvalidArgError("option.skip");}else u=i.parseStrictLoadOption(t);else if(!n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError("option");return u},i.prototype.loadRecursive=function(t,r,u){var f,e,o;if(!n.Utility.isPlainJsonObject(r))throw n._Internal.RuntimeError._createInvalidArgError("options");f={};for(e in r)f[e]=i._parseQueryOption(r[e]);o=n.ActionFactory.createRecursiveQueryAction(this,t,{Queries:f,MaxDepth:u});this._pendingRequest.addActionResultHandler(o,t)},i.prototype.trace=function(t){n.ActionFactory.createTraceAction(this,t,!0)},i.prototype._processOfficeJsErrorResponse=function(n,t){},i.prototype.syncPrivateMain=function(){var t=this;return n.Utility._createPromiseFromResult(null).then(function(){if(!t.m_requestUrlAndHeaderInfo)return t.m_requestUrlAndHeaderInfoResolver._resolveRequestUrlAndHeaderInfo().then(function(i){if(t.m_requestUrlAndHeaderInfo=i,t.m_requestUrlAndHeaderInfo||(t.m_requestUrlAndHeaderInfo={url:n.Constants.localDocument,headers:{}}),n.Utility.isNullOrEmptyString(t.m_requestUrlAndHeaderInfo.url)&&(t.m_requestUrlAndHeaderInfo.url=n.Constants.localDocument),t.m_requestUrlAndHeaderInfo.headers||(t.m_requestUrlAndHeaderInfo.headers={}),typeof t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull=="function"){var r=t.m_requestUrlAndHeaderInfoResolver._createRequestExecutorOrNull();r&&(t._requestExecutor=r)}})}).then(function(){var n=t._pendingRequest;return t.m_pendingRequest=null,t.processPreSyncPromises(n).then(function(){return t.syncPrivate(n)})})},i.prototype.syncPrivate=function(t){var f=this,e,o,s,u,h,r,i;return t.hasActions?(e=t.buildRequestMessageBody(),o=t.flags,this._requestExecutor||(this._requestExecutor=n.Utility._isLocalDocumentUrl(this.m_requestUrlAndHeaderInfo.url)?new n.OfficeJsRequestExecutor(this):new n.HttpRequestExecutor),s=this._requestExecutor,u={},n.Utility._copyHeaders(this.m_requestUrlAndHeaderInfo.headers,u),n.Utility._copyHeaders(this.m_customRequestHeaders,u),h={Url:this.m_requestUrlAndHeaderInfo.url,Headers:u,Body:e},t.invalidatePendingInvalidObjectPaths(),r=null,i=null,this._lastSyncStart=performance.now(),s.executeAsync(this._customData,o,h).then(function(u){return f._lastSyncEnd=performance.now(),r=f.processRequestExecutorResponseMessage(t,u),f.processPendingEventHandlers(t).catch(function(t){n.Utility.log("Error in processPendingEventHandlers");n.Utility.log(JSON.stringify(t));i=t})}).then(function(){var u,f;if(r){n.Utility.log("Throw error from response: "+JSON.stringify(r));throw r;}if(i){n.Utility.log("Throw error from ProcessEventHandler: "+JSON.stringify(i));u=null;i instanceof n._Internal.RuntimeError?(u=i,u.traceMessages=t._responseTraceMessages):(f=null,f=typeof i=="string"?i:i.message,n.Utility.isNullOrEmptyString(f)&&(f=n.Utility._getResourceString(n.ResourceStrings.cannotRegisterEvent)),u=new n._Internal.RuntimeError({code:n.ErrorCodes.cannotRegisterEvent,message:f,traceMessages:t._responseTraceMessages}));throw u;}})):this.processPendingEventHandlers(t)},i.prototype.processRequestExecutorResponseMessage=function(t,i){var e,r,o,u,f;if(i.Body&&i.Body.TraceIds&&t._setResponseTraceIds(i.Body.TraceIds),e=t._responseTraceMessages,r=null,i.Body&&(i.Body.Error&&i.Body.Error.ActionIndex>=0&&(o=new n.RequestPrettyPrinter(this._rootObjectPropertyName,t._objectPaths,t._actions),r=o.processForDebugStatementInfo(i.Body.Error.ActionIndex)),u=null,i.Body.Results?u=i.Body.Results:i.Body.ProcessedResults&&i.Body.ProcessedResults.Results&&(u=i.Body.ProcessedResults.Results),u)){this._processingResult=!0;try{t.processResponse(u)}finally{this._processingResult=!1}}if(n.Utility.isNullOrEmptyString(i.ErrorCode)){if(i.Body&&i.Body.Error)return f={errorLocation:i.Body.Error.Location},r&&(f.statement=r.statement,f.surroundingStatements=r.surroundingStatements),new n._Internal.RuntimeError({code:i.Body.Error.Code,message:i.Body.Error.Message,traceMessages:e,debugInfo:f})}else return new n._Internal.RuntimeError({code:i.ErrorCode,message:i.ErrorMessage,traceMessages:e});return null},i.prototype.processPendingEventHandlers=function(t){for(var u,i=n.Utility._createPromiseFromResult(null),r=0;r0&&(typeof r[0]=="string"||i.isRequestUrlAndHeaderInfo(r[0])||i.isRequestUrlAndHeaderInfoResolver(r[0]))&&(y=r[0],h=1),r.length==h+1)l=u,v=r[h+0];else if(r.length==h+2){if(n.Utility.isNullOrUndefined(r[h+0]))l=u;else if(r[h+0]instanceof n.ClientObject)l=function(){return r[h+0].context};else if(r[h+0]instanceof i)l=function(){return r[h+0]};else if(Array.isArray(r[h+0])){if(c=r[h+0],c.length==0)return i.createErrorPromise(t);for(a=0;a0){var n=c._onRunFinishedNotifiers.shift();n()}if(a)return l;else throw l;})},i.prototype._nextId=function(){return++this.m_nextId},i}();n.ClientRequestContext=i}(OfficeExtension||(OfficeExtension={})),function(n){var i=function(){function t(n){this.m_type=n}return Object.defineProperty(t.prototype,"value",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"clientResult.value"}});return this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){(this.m_isLoaded=!0,typeof t=="object"&&t&&t._IsNull)||(this.m_value=this.m_type===1?n.Utility.adjustToDateTime(t):t)},t}(),t;n.ClientResult=i;t=function(){function t(n,t){this.m_proxy=n;this.m_shouldPolyfill=t}return Object.defineProperty(t.prototype,"proxy",{get:function(){return this.m_proxy},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){if(!this.m_isLoaded)throw new n._Internal.RuntimeError({code:n.ErrorCodes.valueNotLoaded,message:n.Utility._getResourceString(n.ResourceStrings.valueNotLoaded),debugInfo:{errorLocation:"retrieveResult.data"}});return this.m_data},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(n){if(this.m_isLoaded=!0,typeof n=="object"&&n&&n._IsNull){this.m_data=null;return}this.m_data=this.m_shouldPolyfill?this.changePropertyNameToCamelLowerCase(n):n},t.prototype.changePropertyNameToCamelLowerCase=function(t){var o=95,u,i,r,f,e;if(Array.isArray(t)){for(i=[],u=0;u0&&(r=!0),t=document.createElement("a"),t.href=this.m_url,r?t.hash=t.hash.length===0||t.hash==="#"?"#"+i:t.hash+"&"+i:t.search=t.search.length===0||t.search==="?"?"?"+i:t.search+"&"+i,t.href},f.prototype.init=function(){var t=this,i;return window.addEventListener("message",this.m_onMessageHandler),i=this._getIFrameSrc(),new n._Internal.OfficePromise(function(r,u){var f=document.createElement("iframe");t.m_options.id&&(f.id=t.m_options.id);f.style.height=t.m_options.height;f.style.width=t.m_options.width;f.src=i;t.m_options.container.appendChild(f);t.m_timeoutId=setTimeout(function(){t.close();var i=n.Utility.createRuntimeError(n.ErrorCodes.timeout,n.Utility._getResourceString(n.ResourceStrings.timeout),"EmbeddedSession.init");u(i)},t.m_options.timeoutInMilliseconds);t.m_promiseResolver=r})},f.prototype._invoke=function(n,t,u){if(!this.m_enabled){t(i.InternalError,null);return}r.invokeRequestModifier&&(u=r.invokeRequestModifier(u));this._sendMessageWithCallback(this.m_id++,n,u,function(n){r.invokeResponseModifier&&(n=r.invokeResponseModifier(n));var u=n.Error;delete n.Error;t(u||i.Success,n)})},f.prototype.close=function(){window.removeEventListener("message",this.m_onMessageHandler);window.clearTimeout(this.m_timeoutId);this.m_enabled=!1},Object.defineProperty(f.prototype,"eventRegistration",{get:function(){return this.m_sessionEventManager||(this.m_sessionEventManager=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this))),this.m_sessionEventManager},enumerable:!0,configurable:!0}),f.prototype._createRequestExecutorOrNull=function(){return new e(this)},f.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},f.prototype._registerEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.RegisterEventCommand,{EventId:i,TargetId:r},function(){n(null)})})},f.prototype._unregisterEventImpl=function(i,r){var u=this;return new n._Internal.OfficePromise(function(n,f){u._sendMessageWithCallback(u.m_id++,t.UnregisterEventCommand,{EventId:i,TargetId:r},function(){n()})})},f.prototype._onMessage=function(n){var u=this,i,e,r,o,s;if(this.m_enabled&&(!this.m_chosenWindow||this.m_chosenWindow===n.source&&this.m_chosenOrigin===n.origin)){if(i=n.data,i&&i[t.CommandKey]===t.ApiReadyCommand){!this.m_chosenWindow&&this._isValidDescendant(n.source)&&i[t.SessionInfoKey]===this.m_options.sessionKey&&(this.m_chosenWindow=n.source,this.m_chosenOrigin=n.origin,this._sendMessageWithCallback(this.m_id++,t.GetAppContextCommand,null,function(n){u._setupContext(n);window.clearTimeout(u.m_timeoutId);u.m_promiseResolver()}));return}if(i&&i[t.CommandKey]===t.FireEventCommand){var f=i[t.ParamsKey],h=f.EventId,c=f.TargetId,l=f.Data;if(this.m_sessionEventManager)for(e=this.m_sessionEventManager.getHandlers(h,c),r=0;r=0;o--)if(r[o]===e[i].handler){r.splice(o,1);break}break;case 2:r=[];break}}return s&&(!this.m_registered&&r.length>0?u=u.then(function(){return f.m_eventInfo.registerFunc(f.m_callback)}).then(function(){return f.m_registered=!0}):this.m_registered&&r.length==0&&(u=u.then(function(){return f.m_eventInfo.unregisterFunc(f.m_callback)}).catch(function(t){n.Utility.log("Error when unregister event: "+JSON.stringify(t))}).then(function(){return f.m_registered=!1})),u=u.then(function(){return f.m_handlers=r})),u},t.prototype.fireEvent=function(t){for(var u,f,r=[],i=0;i=0;e--)if(f[e]===u){f.splice(e,1);break}return f.length===0?this.m_unregisterEventImpl(i,r):n.Utility._createPromiseFromResult(null)},i}();n.EventRegistration=i}(OfficeExtension||(OfficeExtension={})),function(n){function r(n){t._testReadyImpl=n}function u(n){t.getGenericEventRegistration()._handleRichApiMessage(n)}var t=function(){function t(){this.m_eventRegistration=new n.EventRegistration(this._registerEventImpl.bind(this),this._unregisterEventImpl.bind(this));this.m_richApiMessageHandler=this._handleRichApiMessage.bind(this)}return t.prototype.ready=function(){var i=this;return this.m_ready||(this.m_ready=t._testReadyImpl?t._testReadyImpl().then(function(){i.m_isReady=!0}):n._Internal.officeJsEventRegistration.register(5,"",this.m_richApiMessageHandler).then(function(){i.m_isReady=!0})),this.m_ready},Object.defineProperty(t.prototype,"isReady",{get:function(){return this.m_isReady},enumerable:!0,configurable:!0}),t.prototype.register=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.register(n,t,i)})},t.prototype.unregister=function(n,t,i){var r=this;return this.ready().then(function(){return r.m_eventRegistration.unregister(n,t,i)})},t.prototype._registerEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._unregisterEventImpl=function(t,i){return n.Utility._createPromiseFromResult(null)},t.prototype._handleRichApiMessage=function(t){var r,i,u,e,f;if(t&&t.entries)for(r=0;r0))for(e=JSON.parse(i.message),i.isRemoteOverride&&(e.source=n.Constants.eventSourceRemote),f=0;f=0;u--)if(n[u]===i){n.splice(u,1);break}n.length==0&&t.getGenericEventRegistration().unregister(r.m_genericEventInfo.eventType,r.m_genericEventInfo.getTargetIdFunc(),r._callback)})},r.prototype.removeAll=function(){},r}(n.EventHandlers);n.GenericEventHandlers=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var s=JSON.stringify(u.Body),f=u.Url,e,o;if(f.charAt(f.length-1)!="/"&&(f=f+"/"),f=f+n.Constants.processQuery,f=f+"?"+n.Constants.flags+"="+r.toString(),e={method:"POST",url:f,headers:{},body:s},e.headers[n.Constants.sourceLibHeader]=t.SourceLibHeaderValue,e.headers["CONTENT-TYPE"]="application/json",u.Headers)for(o in u.Headers)e.headers[o]=u.Headers[o];return n.HttpUtility.sendRequest(e).then(function(t){var i,r;return t.statusCode===200?i={ErrorCode:null,ErrorMessage:null,Headers:t.headers,Body:JSON.parse(t.body)}:(n.Utility.log("Error Response:"+t.body),r=n.Utility._parseErrorResponse(t),i={ErrorCode:r.errorCode,ErrorMessage:r.errorMessage,Headers:t.headers,Body:null}),i})},t.SourceLibHeaderValue="officejs-rest",t}();n.HttpRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.setCustomSendRequestFunc=function(n){t.s_customSendRequestFunc=n},t.xhrSendRequestFunc=function(t){return new n._Internal.OfficePromise(function(i,r){var u=new XMLHttpRequest,f;if(u.open(t.method,t.url),u.onload=function(){var t={statusCode:u.status,headers:n.Utility._parseHttpResponseHeaders(u.getAllResponseHeaders()),body:u.responseText};i(t)},u.onerror=function(){r(new n._Internal.RuntimeError({code:n.ErrorCodes.connectionFailure,message:n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,u.statusText)}))},t.headers)for(f in t.headers)u.setRequestHeader(f,t.headers[f]);u.send(t.body)})},t.sendRequest=function(n){t.validateAndNormalizeRequest(n);var i=t.s_customSendRequestFunc;return i||(i=t.xhrSendRequestFunc),i(n)},t.setCustomSendLocalDocumentRequestFunc=function(n){t.s_customSendLocalDocumentRequestFunc=n},t.sendLocalDocumentRequest=function(n){t.validateAndNormalizeRequest(n);var i;return i=t.s_customSendLocalDocumentRequestFunc||t.officeJsSendLocalDocumentRequestFunc,i(n)},t.officeJsSendLocalDocumentRequestFunc=function(t){t=n.Utility._validateLocalDocumentRequest(t);var i=n.Utility._buildRequestMessageSafeArray(t);return new n._Internal.OfficePromise(function(t,r){OSF.DDA.RichApi.executeRichApiRequestAsync(i,function(i){var r;r=i.status=="succeeded"?{statusCode:n.RichApiMessageUtility.getResponseStatusCode(i),headers:n.RichApiMessageUtility.getResponseHeaders(i),body:n.RichApiMessageUtility.getResponseBody(i)}:n.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(i.error.code,i.error.message);n.Utility.log(JSON.stringify(r));t(r)})})},t.validateAndNormalizeRequest=function(t){if(n.Utility.isNullOrUndefined(t))throw n._Internal.RuntimeError._createInvalidArgError({argumentName:"request"});n.Utility.isNullOrEmptyString(t.method)&&(t.method="GET");t.method=t.method.toUpperCase()},t.logRequest=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Request---"),n.Utility.log(i.method+" "+i.url),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t.logResponse=function(i){if(n.Utility._logEnabled){if(n.Utility.log("---HTTP Response---"),n.Utility.log(""+i.statusCode),i.headers)for(var r in i.headers)n.Utility.log(r+": "+i.headers[r]);t._logBody&&n.Utility.log(i.body)}},t._logBody=!1,t}();n.HttpUtility=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_clientObject=n}return n.prototype._handleResult=function(n){this.m_clientObject._handleIdResult(n)},n}();n.InstantiateActionResultHandler=t}(OfficeExtension||(OfficeExtension={})),function(n){}(OfficeExtension||(OfficeExtension={})),function(n){var u=function(){function t(n){this.m_session=n}return t.prototype.executeAsync=function(t,r,u){var e={url:n.Constants.processQuery,method:"POST",headers:u.Headers,body:u.Body},f={id:i.nextId(),type:1,flags:r,message:e};return n.Utility.log(JSON.stringify(f)),this.m_session.sendMessageToHost(f).then(function(t){var i,r,u;return n.Utility.log("Received response: "+JSON.stringify(t)),i=t.message,i.statusCode===200?r={ErrorCode:null,ErrorMessage:null,Headers:i.headers,Body:i.body}:(n.Utility.log("Error Response:"+i.body),u=n.Utility._parseErrorResponse(i),r={ErrorCode:u.errorCode,ErrorMessage:u.errorMessage,Headers:i.headers,Body:null}),r})},t}(),i=function(i){function r(n){var t=this;i.call(this);this.m_promiseResolver={};this.m_bridge=n;this.m_bridge.onMessageFromHost=function(n){t.onMessageFromHost(n)}}return __extends(r,i),r.prototype._resolveRequestUrlAndHeaderInfo=function(){return n.Utility._createPromiseFromResult(null)},r.prototype._createRequestExecutorOrNull=function(){return n.Utility.log("NativeBridgeSession::CreateRequestExecutor"),new u(this)},Object.defineProperty(r.prototype,"eventRegistration",{get:function(){return n._Internal.officeJsEventRegistration},enumerable:!0,configurable:!0}),r.init=function(t){if(t&&typeof t=="object"){var i=new r(t);n.ClientRequestContext._overrideSession=i;n.HttpUtility.setCustomSendLocalDocumentRequestFunc(function(n){var t={id:r.nextId(),type:1,flags:0,message:n};return i.sendMessageToHost(t).then(function(n){return n.message})})}},r.prototype.sendMessageToHost=function(t){var i=this;return this.m_bridge.sendMessageToHost(JSON.stringify(t)),new n._Internal.OfficePromise(function(n,r){i.m_promiseResolver[t.id]=n})},r.prototype.onMessageFromHost=function(n){var i,r;n==="test"?t._testFunc&&t._testFunc():(i=JSON.parse(n),typeof i.id=="number"&&(r=this.m_promiseResolver[i.id],r&&r(i),delete this.m_promiseResolver[i.id]))},r.nextId=function(){return r.s_nextId++},r.s_nextId=1,r}(n.SessionBase),r=function(){function n(){}return n.init=function(n){i.init(n)},n}(),t;n.HostBridge=r;typeof _richApiNativeBridge=="object"&&_richApiNativeBridge&&r.init(_richApiNativeBridge);t=function(){function n(){}return n.setTestFunc=function(t){n._testFunc=t},n}();n.HostBridgeTest=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){this.m_objectPathInfo=n;this.m_parentObjectPath=t;this.m_isWriteOperation=!1;this.m_isCollection=i;this.m_isInvalidAfterRequest=r;this.m_isValid=!0}return Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},set:function(n){this.m_isWriteOperation=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRestrictedResourceAccess",{get:function(){return this.m_isRestrictedResourceAccess},set:function(n){this.m_isRestrictedResourceAccess=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(n){this.m_argumentObjectPaths=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(n){this.m_isValid=n;!n&&this.m_objectPathInfo.ObjectPathType===6&&this.m_savedObjectPathInfo&&(t.copyObjectPathInfo(this.m_savedObjectPathInfo.pathInfo,this.m_objectPathInfo),this.m_parentObjectPath=this.m_savedObjectPathInfo.parent,this.m_isValid=!0,this.m_savedObjectPathInfo=null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(n){this.m_getByIdMethodName=n},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null},t.prototype.updateUsingObjectData=function(i){var e=i[n.Constants.referenceId],f,o,u,r;if(!n.Utility.isNullOrEmptyString(e)){this.m_savedObjectPathInfo||this.isInvalidAfterRequest||!t.isRestorableObjectPath(this.m_objectPathInfo.ObjectPathType)||(f={},t.copyObjectPathInfo(this.m_objectPathInfo,f),this.m_savedObjectPathInfo={pathInfo:f,parent:this.m_parentObjectPath});this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=e;this.m_objectPathInfo.ArgumentInfo={};delete this.m_objectPathInfo.ParentObjectPathId;this.m_parentObjectPath=null;this.m_argumentObjectPaths=null;return}if(o=this.parentObjectPath&&this.parentObjectPath.isCollection,u=this.getByIdMethodName,(o||!n.Utility.isNullOrEmptyString(u))&&(r=i[n.Constants.id],n.Utility.isNullOrUndefined(r)&&(r=i[n.Constants.idPrivate]),!n.Utility.isNullOrUndefined(r))){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;n.Utility.isNullOrEmptyString(u)?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=u,this.m_getByIdMethodName=null);this.isWriteOperation=!1;this.m_objectPathInfo.ArgumentInfo={};this.m_objectPathInfo.ArgumentInfo.Arguments=[r];this.m_argumentObjectPaths=null;return}},t.isRestorableObjectPath=function(n){return n===1||n===5||n===3||n===4},t.copyObjectPathInfo=function(n,t){t.Id=n.Id;t.ArgumentInfo=n.ArgumentInfo;t.Name=n.Name;t.ObjectPathType=n.ObjectPathType;t.ParentObjectPathId=n.ParentObjectPathId},t}();n.ObjectPath=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createGlobalObjectObjectPath=function(t){var i={Id:t._nextId(),ObjectPathType:1,Name:""};return new n.ObjectPath(i,null,!1,!1)},t.createNewObjectObjectPath=function(t,i,r,u){var e={Id:t._nextId(),ObjectPathType:2,Name:i},f=new n.ObjectPath(e,null,r,!1);return f.isRestrictedResourceAccess=u,f},t.createPropertyObjectPath=function(t,i,r,u,f,e){var s={Id:t._nextId(),ObjectPathType:4,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id},o=new n.ObjectPath(s,i._objectPath,u,f);return o.isRestrictedResourceAccess=e,o},t.createIndexerObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i._objectPath,!1,!1)},t.createIndexerObjectPathUsingParentPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i,!1,!1)},t.createMethodObjectPath=function(t,i,r,u,f,e,o,s,h){var l={Id:t._nextId(),ObjectPathType:3,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},a=n.Utility.setMethodArguments(t,l.ArgumentInfo,f),c=new n.ObjectPath(l,i._objectPath,e,o);return c.argumentObjectPaths=a,c.isWriteOperation=u!=1,c.getByIdMethodName=s,c.isRestrictedResourceAccess=h,c},t.createReferenceIdObjectPath=function(t,i){var r={Id:t._nextId(),ObjectPathType:6,Name:i,ArgumentInfo:{}};return new n.ObjectPath(r,null,!1,!1)},t.createChildItemObjectPathUsingIndexerOrGetItemAt=function(i,r,u,f,e){var o=f[n.Constants.id];return n.Utility.isNullOrUndefined(o)&&(o=f[n.Constants.idPrivate]),i&&!n.Utility.isNullOrUndefined(o)?t.createChildItemObjectPathUsingIndexer(r,u,f):t.createChildItemObjectPathUsingGetItemAt(r,u,f,e)},t.createChildItemObjectPathUsingIndexer=function(t,i,r){var f=r[n.Constants.id],u;return n.Utility.isNullOrUndefined(f)&&(f=r[n.Constants.idPrivate]),u=u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u.ArgumentInfo.Arguments=[f],new n.ObjectPath(u,i._objectPath,!1,!1)},t.createChildItemObjectPathUsingGetItemAt=function(t,i,r,u){var e=r[n.Constants.index],f;return e&&(u=e),f={Id:t._nextId(),ObjectPathType:3,Name:n.Constants.getItemAt,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f.ArgumentInfo.Arguments=[u],new n.ObjectPath(f,i._objectPath,!1,!1)},t}();n.ObjectPathFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_context=n}return t.prototype.executeAsync=function(i,r,u){var f=this,e=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n._Internal.OfficePromise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(e,function(i){n.Utility.log("Response:");n.Utility.log(JSON.stringify(i));var r;i.status=="succeeded"?r=n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBody(i),n.RichApiMessageUtility.getResponseHeaders(i)):(r=n.RichApiMessageUtility.buildResponseOnError(i.error.code,i.error.message),f.m_context._processOfficeJsErrorResponse(i.error.code,r));t(r)})})},t.SourceLibHeaderValue="officejs",t}();n.OfficeJsRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t,i;(function(n){n.OfficeRequire=function(){return null}()})(t=n._Internal||(n._Internal={})),function(n){var t;(function(t){function i(){return function(){"use strict";function vt(n){return typeof n=="function"||typeof n=="object"&&n!==null}function b(n){return typeof n=="function"}function yt(n){return typeof n=="object"&&n!==null}function wt(n){k=n}function bt(n){f=n}function ni(){var t=process.nextTick,n=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&n[1]==="0"&&n[2]==="10"&&(t=setImmediate),function(){t(c)}}function tr(){return function(){pt(c)}}function ti(){var n=0,i=new it(c),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function ii(){var n=new MessageChannel;return n.port1.onmessage=c,function(){n.port2.postMessage(0)}}function ri(){return function(){setTimeout(c,1)}}function c(){for(var t,i,n=0;n=0?(n=n.substring(t+5,n.length),n<"14.14393"?!0:!1):!1}function i(){return typeof window=="undefined"&&typeof Promise=="function"?Promise:typeof window!="undefined"&&window.Promise?t()?n.PromiseImpl.Init():window.Promise:n.PromiseImpl.Init()}n.OfficePromise=i()}(t=n._Internal||(n._Internal={}));i=t.OfficePromise;n.Promise=i}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this._autoCleanupList={};this.m_context=n}return t.prototype.add=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._addCommon(n,!0)}):this._addCommon(n,!0)},t.prototype._autoAdd=function(n){this._addCommon(n,!1);this._autoCleanupList[n._objectPath.objectPathInfo.Id]=n},t.prototype._autoTrackIfNecessaryWhenHandleObjectResultValue=function(t,i){var r=this.m_context._autoCleanup&&!t[n.Constants.isTracked]&&t!==this.m_context._rootObject&&i&&!n.Utility.isNullOrEmptyString(i[n.Constants.referenceId]);r&&(this._autoCleanupList[t._objectPath.objectPathInfo.Id]=t,t[n.Constants.isTracked]=!0)},t.prototype._addCommon=function(t,i){if(t[n.Constants.isTracked]){i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id];return}var r=t[n.Constants.referenceId];n.Utility.isNullOrEmptyString(r)&&t._KeepReference&&(t._KeepReference(),n.ActionFactory.createInstantiateAction(this.m_context,t),i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id],t[n.Constants.isTracked]=!0)},t.prototype.remove=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._removeCommon(n)}):this._removeCommon(n)},t.prototype._removeCommon=function(t){var r=t[n.Constants.referenceId],i;n.Utility.isNullOrEmptyString(r)||(i=this.m_context._rootObject,i._RemoveReference&&i._RemoveReference(r),delete t[n.Constants.isTracked])},t.prototype._retrieveAndClearAutoCleanupList=function(){var n=this._autoCleanupList;return this._autoCleanupList={},n},t}();n.TrackedObjects=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){n||(n="root");this.m_globalObjName=n;this.m_referencedObjectPaths=t;this.m_actions=i;this.m_statements=[];this.m_variableNameForObjectPathMap={};this.m_variableNameToObjectPathMap={};this.m_declaredObjectPathMap={};this.m_showDispose=r}return t.prototype.process=function(){this.m_showDispose&&n.ClientRequest._calculateLastUsedObjectPathIds(this.m_actions);for(var t=0;t=0&&this.m_statements.length>i+o+1)break;if(i<0)return null;for(f=i-o,f<0&&(f=0),e=i+1+o,e>this.m_statements.length&&(e=this.m_statements.length),r=[],f!=0&&r.push("..."),s=f;s>>>>"),r.push(this.m_statements[i]),r.push("// <<<<<"),h=i+1;h0)?(r=i.map(function(n){return u.getObjVarName(n)}).join(", "),n+" // And then dispose {"+r+"}"):n},t.prototype.buildQueryExpression=function(n){if(n.actionInfo.QueryInfo){var t={};return t.select=n.actionInfo.QueryInfo.Select,t.expand=n.actionInfo.QueryInfo.Expand,t.skip=n.actionInfo.QueryInfo.Skip,t.top=n.actionInfo.QueryInfo.Top,typeof t.top=="undefined"&&typeof t.skip=="undefined"&&typeof t.expand=="undefined"?typeof t.select=="undefined"?"":JSON.stringify(t.select):JSON.stringify(t)}return""},t.prototype.buildObjectPathExpressionWithParent=function(n){var t=n.objectPathInfo.ObjectPathType==5||n.objectPathInfo.ObjectPathType==3||n.objectPathInfo.ObjectPathType==4;return t&&n.objectPathInfo.ParentObjectPathId?this.getObjVarName(n.objectPathInfo.ParentObjectPathId)+"."+this.buildObjectPathExpression(n):this.buildObjectPathExpression(n)},t.prototype.buildObjectPathExpression=function(t){switch(t.objectPathInfo.ObjectPathType){case 1:return"context."+this.m_globalObjName;case 5:return"getItem("+this.buildArgumentsExpression(t.objectPathInfo.ArgumentInfo)+")";case 3:return n.Utility._toCamelLowerCase(t.objectPathInfo.Name)+"("+this.buildArgumentsExpression(t.objectPathInfo.ArgumentInfo)+")";case 2:return t.objectPathInfo.Name+".newObject()";case 7:return"null";case 4:return n.Utility._toCamelLowerCase(t.objectPathInfo.Name);case 6:return"context."+this.m_globalObjName+"._getObjectByReferenceId("+JSON.stringify(t.objectPathInfo.Name)+")"}},t.prototype.buildArgumentsExpression=function(n){var t="",i;if(!n.Arguments)return t;for(i=0;i0&&(t=t+", "),t=t+this.buildArgumentLiteral(n.Arguments[i],n.ReferencedObjectPathIds?n.ReferencedObjectPathIds[i]:null);return t==="undefined"&&(t=""),t},t.prototype.buildArgumentLiteral=function(n,t){return typeof n=="number"&&n===t?this.getObjVarName(t):JSON.stringify(n)},t.prototype.getObjVarNameBase=function(t){var u="v",f=this.m_referencedObjectPaths[t],i,r;switch(f.objectPathInfo.ObjectPathType){case 1:u=this.m_globalObjName;break;case 4:u=n.Utility._toCamelLowerCase(f.objectPathInfo.Name);break;case 3:i=f.objectPathInfo.Name;i.length>3&&i.substr(0,3)==="Get"&&(i=i.substr(3));u=n.Utility._toCamelLowerCase(i);break;case 5:r=this.getObjVarNameBase(f.objectPathInfo.ParentObjectPathId);u=r.charAt(r.length-1)==="s"?r.substr(0,r.length-1):r+"Item";break}return u},t.prototype.getObjVarName=function(n){var t,i;if(this.m_variableNameForObjectPathMap[n])return this.m_variableNameForObjectPathMap[n];if(t=this.getObjVarNameBase(n),!this.m_variableNameToObjectPathMap[t])return this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t;for(i=1;this.m_variableNameToObjectPathMap[t+i.toString()];)i++;return t=t+i.toString(),this.m_variableNameForObjectPathMap[n]=t,this.m_variableNameToObjectPathMap[t]=n,t},t}();n.RequestPrettyPrinter=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.cannotRegisterEvent="CannotRegisterEvent",n.connectionFailureWithStatus="ConnectionFailureWithStatus",n.connectionFailureWithDetails="ConnectionFailureWithDetails",n.invalidObjectPath="InvalidObjectPath",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.invalidArgumentGeneric="InvalidArgumentGeneric",n.propertyNotLoaded="PropertyNotLoaded",n.runMustReturnPromise="RunMustReturnPromise",n.timeout="Timeout",n.propertyDoesNotExist="PropertyDoesNotExist",n.attemptingToSetReadOnlyProperty="AttemptingToSetReadOnlyProperty",n.moreInfoInnerError="MoreInfoInnerError",n.cannotApplyPropertyThroughSetMethod="CannotApplyPropertyThroughSetMethod",n.valueNotLoaded="ValueNotLoaded",n.invalidOrTimedOutSessionMessage="InvalidOrTimedOutSessionMessage",n.invalidOperationInCellEditMode="InvalidOperationInCellEditMode",n.customFunctionDefintionMissing="CustomFunctionDefintionMissing",n.customFunctionImplementationMissing="CustomFunctionImplementationMissing",n.customFunctionNameContainsBadChars="CustomFunctionNameContainsBadChars",n.customFunctionNameCannotSplit="CustomFunctionNameCannotSplit",n.customFunctionUnexpectedNumberOfEntriesInResultBatch="CustomFunctionUnexpectedNumberOfEntriesInResultBatch",n.customFunctionCancellationHandlerMissing="CustomFunctionCancellationHandlerMissing",n.apiNotFoundDetails="ApiNotFoundDetails",n}();n.ResourceStrings=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.CannotRegisterEvent="The event handler cannot be registered.",n.ConnectionFailureWithStatus="The request failed with status code of {0}.",n.ConnectionFailureWithDetails="The request failed with status code of {0}, error code {1} and the following error message: {2}",n.InvalidArgument="The argument '{0}' doesn't work for this situation, is missing, or isn't in the right format.",n.InvalidObjectPath='The object path \'{0}\' isn\'t working for what you\'re trying to do. If you\'re using the object across multiple "context.sync" calls and outside the sequential execution of a ".run" batch, please use the "context.trackedObjects.add()" and "context.trackedObjects.remove()" methods to manage the object\'s lifetime.',n.InvalidRequestContext="Cannot use the object across different request contexts.",n.PropertyNotLoaded="The property '{0}' is not available. Before reading the property's value, call the load method on the containing object and call \"context.sync()\" on the associated request context.",n.RunMustReturnPromise='The batch function passed to the ".run" method didn\'t return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from "context.sync()".',n.Timeout="The operation has timed out.",n.ValueNotLoaded='The value of the result object has not been loaded yet. Before reading the value property, call "context.sync()" on the associated request context.',n.InvalidOrTimedOutSessionMessage="Your Office Online session has expired or is invalid. To continue, refresh the page.",n.InvalidOperationInCellEditMode="Excel is in cell-editing mode. Please exit the edit mode by pressing ENTER or TAB or selecting another cell, and then try again.",n.CustomFunctionDefintionMissing="A property with this name that represents the function's definition must exist on Excel.CustomFunctions.",n.CustomFunctionImplementationMissing="The property with this name on Excel.CustomFunctions that represents the function's definition must contain a 'call' property that implements the function.",n.CustomFunctionNameContainsBadChars="The function name may only contain letters, digits, underscores, and periods.",n.CustomFunctionNameCannotSplit="The function name must contain a non-empty namespace and a non-empty short name.",n.CustomFunctionUnexpectedNumberOfEntriesInResultBatch="The batching function returned a number of results that doesn't match the number of parameter value sets that were passed into it.",n.CustomFunctionCancellationHandlerMissing="The cancellation handler onCanceled is missing in the function. The handler must be present as the function is defined as cancelable.",n.ApiNotFoundDetails="The method or property {0} is part of the {1} requirement set, which is not available in your version of {2}.",n}();n.ResourceStringValues=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.buildMessageArrayForIRequestExecutor=function(i,r,u,f){var o=JSON.stringify(u.Body),e;return n.Utility.log("Request:"),n.Utility.log(o),e={},e[n.Constants.sourceLibHeader]=f,t.buildRequestMessageSafeArray(i,r,"POST","ProcessQuery",e,o)},t.buildResponseOnSuccess=function(n,t){var i={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return i.Body=JSON.parse(n),i.Headers=t,i},t.buildResponseOnError=function(i,r){var u={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return u.ErrorCode=n.ErrorCodes.generalException,u.ErrorMessage=r,i==t.OfficeJsErrorCode_ooeNoCapability?u.ErrorCode=n.ErrorCodes.accessDenied:i==t.OfficeJsErrorCode_ooeActivityLimitReached?u.ErrorCode=n.ErrorCodes.activityLimitReached:i==t.OfficeJsErrorCode_ooeInvalidOrTimedOutSession&&(u.ErrorCode=n.ErrorCodes.invalidOrTimedOutSession,u.ErrorMessage=n.Utility._getResourceString(n.ResourceStrings.invalidOrTimedOutSessionMessage)),u},t.buildHttpResponseFromOfficeJsError=function(i,r){var f=500,u={};return u.error={},u.error.code=n.ErrorCodes.generalException,u.error.message=r,i===t.OfficeJsErrorCode_ooeNoCapability?(f=403,u.error.code=n.ErrorCodes.accessDenied):i===t.OfficeJsErrorCode_ooeActivityLimitReached&&(f=429,u.error.code=n.ErrorCodes.activityLimitReached),{statusCode:f,headers:{},body:JSON.stringify(u)}},t.buildRequestMessageSafeArray=function(n,t,i,r,u,f){var e=[],o;if(u)for(o in u)e.push(o),e.push(u[o]);var s=0,h="",c="",l="";return[n,i,r,e,f,s,t,h,c,l]},t.getResponseBody=function(n){return t.getResponseBodyFromSafeArray(n.value.data)},t.getResponseHeaders=function(n){return t.getResponseHeadersFromSafeArray(n.value.data)},t.getResponseBodyFromSafeArray=function(n){var t=n[2],i;return typeof t=="string"?t:(i=t,i.join(""))},t.getResponseHeadersFromSafeArray=function(n){var i=n[1],r,t;if(!i)return null;for(r={},t=0;t0&&f.push(i);return f},t.toJson=function(n,t,i,r){var e={},u,f;for(u in t)f=t[u],typeof f!="undefined"&&(e[u]=f);for(u in i)f=i[u],typeof f!="undefined"&&(e[u]=f.toJSON());return r&&(e.items=r.map(function(n){return n.toJSON()})),e},t.throwError=function(i,r,u){throw new n._Internal.RuntimeError({code:i,message:t._getResourceString(i,r),debugInfo:u?{errorLocation:u}:undefined});},t.createRuntimeError=function(t,i,r){return new n._Internal.RuntimeError({code:t,message:i,debugInfo:{errorLocation:r}})},t._getResourceString=function(i,r){var u,e,f,o;return typeof window!="undefined"&&window.Strings&&window.Strings.OfficeOM&&(e="L_"+i,f=window.Strings.OfficeOM[e],f&&(u=f)),u||(u=n.ResourceStringValues[i]),u||(u=i),t.isNullOrUndefined(r)||(Array.isArray(r)?(o=r,u=t._formatString(u,o)):u=u.replace("{0}",r)),u},t._formatString=function(t,i){return t.replace(/\{\d\}/g,function(t){var r=parseInt(t.substr(1,t.length-2));if(r0?".":"")+i;break;case 3:i=t.normalizeName(n.objectPathInfo.Name)+"()"+(i.length>0?".":"")+i;break;case 4:i=t.normalizeName(n.objectPathInfo.Name)+(i.length>0?".":"")+i;break;case 5:i="getItem()"+(i.length>0?".":"")+i;break;case 6:i="_reference()"+(i.length>0?".":"")+i;break}n=n.parentObjectPath}return i},t._createPromiseFromResult=function(t){return new n._Internal.OfficePromise(function(n,i){n(t)})},t._createTimeoutPromise=function(t){return new n._Internal.OfficePromise(function(n,i){setTimeout(function(){n(null)},t)})},t.promisify=function(t){return new n._Internal.OfficePromise(function(n,i){var r=function(t){t.status=="failed"?i(t.error):n(t.value)};t(r)})},t._addActionResultHandler=function(n,t,i){n.context._pendingRequest.addActionResultHandler(t,i)},t._handleNavigationPropertyResults=function(n,i,r){for(var u=0;u0},t._getLocalDocumentUrlPrefixLength=function(n){for(var i=["http://document.localhost","https://document.localhost","//document.localhost"],r=n.toLowerCase().trim(),t=0;t0))for(s=i.url.substr(f+1),e=s.split("&"),u=0;u0&&(f=i.substr(0,u),e=i.substr(u+1),f=t.trim(f),e=t.trim(e),s[f.toUpperCase()]=e));return s},t._parseErrorResponse=function(i){var r=null,f,e,u;if(t.isPlainJsonObject(i.body))r=i.body;else if(!t.isNullOrEmptyString(i.body)){f=t.trim(i.body);try{r=JSON.parse(f)}catch(o){t.log("Error when parse "+f)}}return!t.isNullOrUndefined(r)&&typeof r=="object"&&r.error?(u=r.error.code,e=t._getResourceString(n.ResourceStrings.connectionFailureWithDetails,[i.statusCode.toString(),r.error.code,r.error.message])):e=t._getResourceString(n.ResourceStrings.connectionFailureWithStatus,i.statusCode.toString()),t.isNullOrEmptyString(u)&&(u=n.ErrorCodes.connectionFailure),{errorCode:u,errorMessage:e}},t._copyHeaders=function(n,t){if(n&&t)for(var i in n)t[i]=n[i]},t._toCamelLowerCase=function(n){if(t.isNullOrEmptyString(n))return n;for(var i=0;i=65&&n.charCodeAt(i)<=90;)i++;return i=6.9.4" }, - "gitHead": "9c17723112eac13d0201ade4f8a035905b97fcc5", + "gitHead": "ae62d13a44437249d2c08a42e94b7862e6b0759e", "homepage": "https://dev.office.com/docs/add-ins/overview/office-add-ins", "keywords": [ "Office Add-ins", @@ -82,6 +113,10 @@ "name": "@microsoft/office-js", "optionalDependencies": {}, "readme": "ERROR: No README data found!", - "scripts": {}, - "version": "1.1.1" + "scripts": { + "build.deploy.script": "tsc -p deployment.script/tsconfig.json", + "deploy": "node deployment.script/deploy.js", + "tslint.deploy.script": "tslint --project deployment.script/tsconfig.json" + }, + "version": "1.1.4" } diff --git a/node_modules/@microsoft/office-js/readme.md b/node_modules/@microsoft/office-js/readme.md index 723f5f8..b1719d4 100644 --- a/node_modules/@microsoft/office-js/readme.md +++ b/node_modules/@microsoft/office-js/readme.md @@ -1,9 +1,12 @@ +[![NPM Deployment Status](https://travis-ci.org/OfficeDev/office-js.svg?branch=release)](https://travis-ci.org/OfficeDev/office-js/builds) + # Office JavaScript APIs The JavaScript API for Office enables you to create web applications that interact with the object models in Office host applications. Your application will reference the office.js library, which is a script loader. The office.js library loads the object models that are applicable to the Office application that is running the add-in. The NPM package for Office.js is a copy of what gets published to the official "evergreen" Office.js CDN, at ****. The NPM also offers alpha and beta versions for faster-cadence beta-testing (relative to the slower-cadence [official BETA endpoint](https://appsforoffice.microsoft.com/lib/beta/hosted/office.js)). +
## Installing @@ -16,6 +19,24 @@ Once installed, the Office.js script reference can be used as +
+ +## IntelliSense definitions + +TypeScript definitions for Office.js are available. + +* For **latest RELEASE version** of Office.js: + * DefinitelyTyped: + * @types: `@types/office-js`. (Acquire as `npm install @types/office-js --save-dev`) +* For **any version** (**including RELEASE**, but also including ALPHA, BETA, etc.): + * Inside of the NPM package, under `dist/office.d.ts` + * In this repo: [dist/office.d.ts](dis/office.d.ts) + +Visual Studio 2017+ can use these same TypeScript definitions, even for regular JavaScript. For JavaScript IntelliSense in earlier versions of Visual Studio, an `office-vsdoc.js` is available alongside the `office.js` file. As long as you have a `Scripts/_references.js` file in your VS project, and as long as you substitute the existing triple-slash reference (`/// `) with the new location (the `-vsdoc` part gets substituted automatically, so use it just as you would in a ` + + +
+ +## Production vs. Beta vs. Private versions + +Office.js versioning is described in detail in . Importantly, there is a large difference between what is in the JS files, versus what are the capabilities of a particular computer (i.e., older or slower-to-update versions of office). + +The NPM package and the repo branches assume the following structure. + +| GitHub branch name | NPM tag name | Description | +| ------------------ |--------------|-------------| +| `release` | `release` (and also `latest`, [a default NPM tag](https://docs.npmjs.com/getting-started/using-tags)) | The latest of the released publicly-available APIs.
This should be identical with what is currently on | +| `beta` | `beta` | Forthcoming APIs, not necessarily ready for public consumption yet (and may still change...), but likely available on [Insider Fast (and maybe Insider Slow) builds](https://products.office.com/office-insider).
This should be identical to what is currently on | +| `release-next` | `release-next` | A forthcoming update the the "release" branch (typically a couple weeks ahead of "release") | +| `beta-next` | `beta-next` | A forthcoming update the the "beta" branch (typically a couple weeks ahead of "beta") | +| `private` | `private` | Any flavor of a release, but deployed for a very specific need (e.g., try out something experimental) or for a specific partner. Unlike the other tags, successive versions of this tag are not necessarily cumulative updates; it is possible to have a `1.1.2-private.1` that has the beta JS, and then a `1.1.2-private.2` that only contains the publicly-available release APIs (with maybe some tweaks) | + + +
+ +## Using a Private or Beta version with [Script Lab](https://aka.ms/script-lab) + +To use a version of the NPM package with [Script Lab](https://aka.ms/script-lab), substitute the CDN reference and the `@types/office-js` reference with the NPM package name and version. [Note: Script Lab uses for resolving the package names, so it's very similar guidance as above]. + +For example, to use a `1.1.2-beta-next.0` version, use the following references: + + @microsoft/office-js@1.1.2-beta-next.0/dist/office.js + @microsoft/office-js@1.1.2-beta-next.0/dist/office.d.ts + + +![Using the NPM package with Script Lab](.github/images/script-lab-substitute-refs.png) + +
## More info diff --git a/node_modules/ajv-keywords/LICENSE b/node_modules/ajv-keywords/LICENSE new file mode 100644 index 0000000..90139aa --- /dev/null +++ b/node_modules/ajv-keywords/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Evgeny Poberezkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/ajv-keywords/README.md b/node_modules/ajv-keywords/README.md new file mode 100644 index 0000000..3ebe06c --- /dev/null +++ b/node_modules/ajv-keywords/README.md @@ -0,0 +1,624 @@ +# ajv-keywords + +Custom JSON-Schema keywords for [Ajv](https://github.com/epoberezkin/ajv) validator + +[![Build Status](https://travis-ci.org/epoberezkin/ajv-keywords.svg?branch=master)](https://travis-ci.org/epoberezkin/ajv-keywords) +[![npm](https://img.shields.io/npm/v/ajv-keywords.svg)](https://www.npmjs.com/package/ajv-keywords) +[![npm downloads](https://img.shields.io/npm/dm/ajv-keywords.svg)](https://www.npmjs.com/package/ajv-keywords) +[![Coverage Status](https://coveralls.io/repos/github/epoberezkin/ajv-keywords/badge.svg?branch=master)](https://coveralls.io/github/epoberezkin/ajv-keywords?branch=master) +[![Greenkeeper badge](https://badges.greenkeeper.io/epoberezkin/ajv-keywords.svg)](https://greenkeeper.io/) +[![Gitter](https://img.shields.io/gitter/room/ajv-validator/ajv.svg)](https://gitter.im/ajv-validator/ajv) + + +## Contents + +- [Install](#install) +- [Usage](#usage) +- [Keywords](#keywords) + - [typeof](#typeof) + - [instanceof](#instanceof) + - [range and exclusiveRange](#range-and-exclusiverange) + - [switch](#switch) + - [select/selectCases/selectDefault](#selectselectcasesselectdefault) (BETA) + - [patternRequired](#patternrequired) + - [prohibited](#prohibited) + - [deepProperties](#deepproperties) + - [deepRequired](#deeprequired) + - [uniqueItemProperties](#uniqueitemproperties) + - [regexp](#regexp) + - [formatMaximum / formatMinimum and formatExclusiveMaximum / formatExclusiveMinimum](#formatmaximum--formatminimum-and-formatexclusivemaximum--formatexclusiveminimum) + - [dynamicDefaults](#dynamicdefaults) +- [License](#license) + + +## Install + +``` +npm install ajv-keywords +``` + + +## Usage + +To add all available keywords: + +```javascript +var Ajv = require('ajv'); +var ajv = new Ajv; +require('ajv-keywords')(ajv); + +ajv.validate({ instanceof: 'RegExp' }, /.*/); // true +ajv.validate({ instanceof: 'RegExp' }, '.*'); // false +``` + +To add a single keyword: + +```javascript +require('ajv-keywords')(ajv, 'instanceof'); +``` + +To add multiple keywords: + +```javascript +require('ajv-keywords')(ajv, ['typeof', 'instanceof']); +``` + +To add a single keyword in browser (to avoid adding unused code): + +```javascript +require('ajv-keywords/keywords/instanceof')(ajv); +``` + + +## Keywords + +### `typeof` + +Based on JavaScript `typeof` operation. + +The value of the keyword should be a string (`"undefined"`, `"string"`, `"number"`, `"object"`, `"function"`, `"boolean"` or `"symbol"`) or array of strings. + +To pass validation the result of `typeof` operation on the value should be equal to the string (or one of the strings in the array). + +``` +ajv.validate({ typeof: 'undefined' }, undefined); // true +ajv.validate({ typeof: 'undefined' }, null); // false +ajv.validate({ typeof: ['undefined', 'object'] }, null); // true +``` + + +### `instanceof` + +Based on JavaScript `instanceof` operation. + +The value of the keyword should be a string (`"Object"`, `"Array"`, `"Function"`, `"Number"`, `"String"`, `"Date"`, `"RegExp"`, `"Promise"` or `"Buffer"`) or array of strings. + +To pass validation the result of `data instanceof ...` operation on the value should be true: + +``` +ajv.validate({ instanceof: 'Array' }, []); // true +ajv.validate({ instanceof: 'Array' }, {}); // false +ajv.validate({ instanceof: ['Array', 'Function'] }, function(){}); // true +``` + +You can add your own constructor function to be recognised by this keyword: + +```javascript +function MyClass() {} +var instanceofDefinition = require('ajv-keywords').get('instanceof').definition; +// or require('ajv-keywords/keywords/instanceof').definition; +instanceofDefinition.CONSTRUCTORS.MyClass = MyClass; + +ajv.validate({ instanceof: 'MyClass' }, new MyClass); // true +``` + + +### `range` and `exclusiveRange` + +Syntax sugar for the combination of minimum and maximum keywords, also fails schema compilation if there are no numbers in the range. + +The value of this keyword must be the array consisting of two numbers, the second must be greater or equal than the first one. + +If the validated value is not a number the validation passes, otherwise to pass validation the value should be greater (or equal) than the first number and smaller (or equal) than the second number in the array. If `exclusiveRange` keyword is present in the same schema and its value is true, the validated value must not be equal to the range boundaries. + +```javascript +var schema = { range: [1, 3] }; +ajv.validate(schema, 1); // true +ajv.validate(schema, 2); // true +ajv.validate(schema, 3); // true +ajv.validate(schema, 0.99); // false +ajv.validate(schema, 3.01); // false + +var schema = { range: [1, 3], exclusiveRange: true }; +ajv.validate(schema, 1.01); // true +ajv.validate(schema, 2); // true +ajv.validate(schema, 2.99); // true +ajv.validate(schema, 1); // false +ajv.validate(schema, 3); // false +``` + + +### `switch` + +This keyword allows to perform advanced conditional validation. + +The value of the keyword is the array of if/then clauses. Each clause is the object with the following properties: + +- `if` (optional) - the value is JSON-schema +- `then` (required) - the value is JSON-schema or boolean +- `continue` (optional) - the value is boolean + +The validation process is dynamic; all clauses are executed sequentially in the following way: + +1. `if`: + 1. `if` property is JSON-schema according to which the data is: + 1. valid => go to step 2. + 2. invalid => go to the NEXT clause, if this was the last clause the validation of `switch` SUCCEEDS. + 2. `if` property is absent => go to step 2. +2. `then`: + 1. `then` property is `true` or it is JSON-schema according to which the data is valid => go to step 3. + 2. `then` property is `false` or it is JSON-schema according to which the data is invalid => the validation of `switch` FAILS. +3. `continue`: + 1. `continue` property is `true` => go to the NEXT clause, if this was the last clause the validation of `switch` SUCCEEDS. + 2. `continue` property is `false` or absent => validation of `switch` SUCCEEDS. + +```javascript +require('ajv-keywords')(ajv, 'switch'); + +var schema = { + type: 'array', + items: { + type: 'integer', + 'switch': [ + { if: { not: { minimum: 1 } }, then: false }, + { if: { maximum: 10 }, then: true }, + { if: { maximum: 100 }, then: { multipleOf: 10 } }, + { if: { maximum: 1000 }, then: { multipleOf: 100 } }, + { then: false } + ] + } +}; + +var validItems = [1, 5, 10, 20, 50, 100, 200, 500, 1000]; + +var invalidItems = [1, 0, 2000, 11, 57, 123, 'foo']; +``` + +__Please note__: this keyword is moved here from Ajv, mainly to preserve backward compatibility. It is unlikely to become a standard. It's preferable to use `if`/`then`/`else` keywords if possible, as they are likely to be added to the standard. The above schema is equivalent to (for example): + +```javascript +{ + type: 'array', + items: { + type: 'integer', + if: { minimum: 1, maximum: 10 }, + then: true, + else: { + if: { maximum: 100 }, + then: { multipleOf: 10 }, + else: { + if: { maximum: 1000 }, + then: { multipleOf: 100 }, + else: false + } + } + } +} +``` + + +### `select`/`selectCases`/`selectDefault` + +These keywords allow to choose the schema to validate the data based on the value of some property in the validated data. + +These keywords must be present in the same schema object (`selectDefault` is optional). + +The value of `select` keyword should be a [$data reference](https://github.com/epoberezkin/ajv/tree/5.0.2-beta.0#data-reference) that points to any primitive JSON type (string, number, boolean or null) in the data that is validated. You can also use a constant of primitive type as the value of this keyword (e.g., for debugging purposes). + +The value of `selectCases` keyword must be an object where each property name is a possible string representation of the value of `select` keyword and each property value is a corresponding schema (from draft-06 it can be boolean) that must be used to validate the data. + +The value of `selectDefault` keyword is a schema (from draft-06 it can be boolean) that must be used to validate the data in case `selectCases` has no key equal to the stringified value of `select` keyword. + +The validation succeeds in one of the following cases: +- the validation of data using selected schema succeeds, +- none of the schemas is selected for validation, +- the value of select is undefined (no property in the data that the data reference points to). + +If `select` value (in data) is not a primitive type the validation fails. + +__Please note__: these keywords require Ajv `$data` option to support [$data reference](https://github.com/epoberezkin/ajv/tree/5.0.2-beta.0#data-reference). + + +```javascript +require('ajv-keywords')(ajv, 'select'); + +var schema = { + type: object, + required: ['kind'], + properties: { + kind: { type: 'string' } + }, + select: { $data: '0/kind' }, + selectCases: { + foo: { + required: ['foo'], + properties: { + kind: {}, + foo: { type: 'string' } + }, + additionalProperties: false + }, + bar: { + required: ['bar'], + properties: { + kind: {}, + bar: { type: 'number' } + }, + additionalProperties: false + } + }, + selectDefault: { + propertyNames: { + not: { enum: ['foo', 'bar'] } + } + } +}; + +var validDataList = [ + { kind: 'foo', foo: 'any' }, + { kind: 'bar', bar: 1 }, + { kind: 'anything_else', not_bar_or_foo: 'any value' } +]; + +var invalidDataList = [ + { kind: 'foo' }, // no propery foo + { kind: 'bar' }, // no propery bar + { kind: 'foo', foo: 'any', another: 'any value' }, // additional property + { kind: 'bar', bar: 1, another: 'any value' }, // additional property + { kind: 'anything_else', foo: 'any' } // property foo not allowed + { kind: 'anything_else', bar: 1 } // property bar not allowed +]; +``` + +__Please note__: the current implementation is BETA. It does not allow using relative URIs in $ref keywords in schemas in `selectCases` and `selectDefault` that point outside of these schemas. The workaround is to use absolute URIs (that can point to any (sub-)schema added to Ajv, including those inside the current root schema where `select` is used). See [tests](https://github.com/epoberezkin/ajv-keywords/blob/v2.0.0/spec/tests/select.json#L314). + + +### `patternRequired` + +This keyword allows to require the presence of properties that match some pattern(s). + +This keyword applies only to objects. If the data is not an object, the validation succeeds. + +The value of this keyword should be an array of strings, each string being a regular expression. For data object to be valid each regular expression in this array should match at least one property name in the data object. + +If the array contains multiple regular expressions, more than one expression can match the same property name. + +```javascript +var schema = { patternRequired: [ 'f.*o', 'b.*r' ] }; + +var validData = { foo: 1, bar: 2 }; +var alsoValidData = { foobar: 3 }; + +var invalidDataList = [ {}, { foo: 1 }, { bar: 2 } ]; +``` + + +### `prohibited` + +This keyword allows to prohibit that any of the properties in the list is present in the object. + +This keyword applies only to objects. If the data is not an object, the validation succeeds. + +The value of this keyword should be an array of strings, each string being a property name. For data object to be valid none of the properties in this array should be present in the object. + +``` +var schema = { prohibited: ['foo', 'bar']}; + +var validData = { baz: 1 }; +var alsoValidData = {}; + +var invalidDataList = [ + { foo: 1 }, + { bar: 2 }, + { foo: 1, bar: 2} +]; +``` + + +### `deepProperties` + +This keyword allows to validate deep properties (identified by JSON pointers). + +This keyword applies only to objects. If the data is not an object, the validation succeeds. + +The value should be an object, where keys are JSON pointers to the data, starting from the current position in data, and the values are JSON schemas. For data object to be valid the value of each JSON pointer should be valid according to the corresponding schema. + +```javascript +var schema = { + type: 'object', + deepProperties: { + "/users/1/role": { "enum": ["admin"] } + } +}; + +var validData = { + users: [ + {}, + { + id: 123, + role: 'admin' + } + ] +}; + +var alsoValidData = { + users: { + "1": { + id: 123, + role: 'admin' + } + } +}; + +var invalidData = { + users: [ + {}, + { + id: 123, + role: 'user' + } + ] +}; + +var alsoInvalidData = { + users: { + "1": { + id: 123, + role: 'user' + } + } +}; +``` + + +### `deepRequired` + +This keyword allows to check that some deep properties (identified by JSON pointers) are available. + +This keyword applies only to objects. If the data is not an object, the validation succeeds. + +The value should be an array of JSON pointers to the data, starting from the current position in data. For data object to be valid each JSON pointer should be some existing part of the data. + +```javascript +var schema = { + type: 'object', + deepRequired: ["/users/1/role"] +}; + +var validData = { + users: [ + {}, + { + id: 123, + role: 'admin' + } + ] +}; + +var invalidData = { + users: [ + {}, + { + id: 123 + } + ] +}; +``` + +See [json-schema-org/json-schema-spec#203](https://github.com/json-schema-org/json-schema-spec/issues/203#issue-197211916) for an example of the equivalent schema without `deepRequired` keyword. + + +### `uniqueItemProperties` + +The keyword allows to check that some properties in array items are unique. + +This keyword applies only to arrays. If the data is not an array, the validation succeeds. + +The value of this keyword must be an array of strings - property names that should have unique values across all items. + +```javascript +var schema = { uniqueItemProperties: [ "id", "name" ] }; + +var validData = [ + { id: 1 }, + { id: 2 }, + { id: 3 } +]; + +var invalidData1 = [ + { id: 1 }, + { id: 1 }, + { id: 3 } +]; + +var invalidData2 = [ + { id: 1, name: "taco" }, + { id: 2, name: "taco" }, // duplicate "name" + { id: 3, name: "salsa" } +]; +``` + +This keyword is contributed by [@blainesch](https://github.com/blainesch). + + +### `regexp` + +This keyword allows to use regular expressions with flags in schemas (the standard `pattern` keyword does not support flags). + +This keyword applies only to strings. If the data is not a string, the validation succeeds. + +The value of this keyword can be either a string (the result of `regexp.toString()`) or an object with the properties `pattern` and `flags` (the same strings that should be passed to RegExp constructor). + +```javascript +var schema = { + type: 'object', + properties: { + foo: { regexp: '/foo/i' }, + bar: { regexp: { pattern: 'bar', flags: 'i' } } + } +}; + +var validData = { + foo: 'Food', + bar: 'Barmen' +}; + +var invalidData = { + foo: 'fog', + bar: 'bad' +}; +``` + + +### `formatMaximum` / `formatMinimum` and `formatExclusiveMaximum` / `formatExclusiveMinimum` + +These keywords allow to define minimum/maximum constraints when the format keyword defines ordering. + +These keywords apply only to strings. If the data is not a string, the validation succeeds. + +The value of keyword `formatMaximum` (`formatMinimum`) should be a string. This value is the maximum (minimum) allowed value for the data to be valid as determined by `format` keyword. + +When this keyword is added, it defines comparison rules for formats `"date"`, `"time"` and `"date-time". Custom formats also can have comparison rules. See [addFormat](https://github.com/epoberezkin/ajv#api-addformat) method. + +The value of keyword `formatExclusiveMaximum` (`formatExclusiveMinimum`) should be a boolean value. These keyword cannot be used without `formatMaximum` (`formatMinimum`). If this keyword value is equal to `true`, the data to be valid should not be equal to the value in `formatMaximum` (`formatMinimum`) keyword. + +```javascript +require('ajv-keywords')(ajv, ['formatMinimum', 'formatMaximum']); + +var schema = { + format: 'date', + formatMinimum: '2016-02-06', + formatMaximum: '2016-12-27', + formatExclusiveMaximum: true +} + +var validDataList = ['2016-02-06', '2016-12-26', 1]; + +var invalidDataList = ['2016-02-05', '2016-12-27', 'abc']; +``` + + +### `dynamicDefaults` + +This keyword allows to assign dynamic defaults to properties, such as timestamps, unique IDs etc. + +This keyword only works if `useDefaults` options is used and not inside `anyOf` keywrods etc., in the same way as [default keyword treated by Ajv](https://github.com/epoberezkin/ajv#assigning-defaults). + +The keyword should be added on the object level. Its value should be an object with each property corresponding to a property name, in the same way as in standard `properties` keyword. The value of each property can be: + +- an identifier of default function (a string) +- an object with properties `func` (an identifier) and `args` (an object with parameters that will be passed to this function during schema compilation - see examples). + +The properties used in `dynamicDefaults` should not be added to `required` keyword (or validation will fail), because unlike `default` this keyword is processed after validation. + +There are several predefined dynamic default functions: + +- `"timestamp"` - current timestamp in milliseconds +- `"datetime"` - current date and time as string (ISO, valid according to `date-time` format) +- `"date"` - current date as string (ISO, valid according to `date` format) +- `"time"` - current time as string (ISO, valid according to `time` format) +- `"random"` - pseudo-random number in [0, 1) interval +- `"randomint"` - pseudo-random integer number. If string is used as a property value, the function will randomly return 0 or 1. If object `{func: 'randomint', max: N}` is used then the default will be an integer number in [0, N) interval. +- `"seq"` - sequential integer number starting from 0. If string is used as a property value, the default sequence will be used. If object `{func: 'seq', name: 'foo'}` is used then the sequence with name `"foo"` will be used. Sequences are global, even if different ajv instances are used. + +```javascript +var schema = { + type: 'object', + dynamicDefaults: { + ts: 'datetime', + r: { func: 'randomint', max: 100 }, + id: { func: 'seq', name: 'id' } + }, + properties: { + ts: { + type: 'string', + format: 'datetime' + }, + r: { + type: 'integer', + minimum: 0, + maximum: 100, + exclusiveMaximum: true + }, + id: { + type: 'integer', + minimum: 0 + } + } +}; + +var data = {}; +ajv.validate(data); // true +data; // { ts: '2016-12-01T22:07:28.829Z', r: 25, id: 0 } + +var data1 = {}; +ajv.validate(data1); // true +data1; // { ts: '2016-12-01T22:07:29.832Z', r: 68, id: 1 } + +ajv.validate(data1); // true +data1; // didn't change, as all properties were defined +``` + +You can add your own dynamic default function to be recognised by this keyword: + +```javascript +var uuid = require('uuid'); + +function uuidV4() { return uuid.v4(); } + +var definition = require('ajv-keywords').get('dynamicDefaults').definition; +// or require('ajv-keywords/keywords/dynamicDefaults').definition; +definition.DEFAULTS.uuid = uuidV4; + +var schema = { + dynamicDefaults: { id: 'uuid' }, + properties: { id: { type: 'string', format: 'uuid' } } +}; + +var data = {}; +ajv.validate(schema, data); // true +data; // { id: 'a1183fbe-697b-4030-9bcc-cfeb282a9150' }; + +var data1 = {}; +ajv.validate(schema, data1); // true +data1; // { id: '5b008de7-1669-467a-a5c6-70fa244d7209' } +``` + +You also can define dynamic default that accepts parameters, e.g. version of uuid: + +```javascript +var uuid = require('uuid'); + +function getUuid(args) { + var version = 'v' + (arvs && args.v || 4); + return function() { + return uuid[version](); + }; +} + +var definition = require('ajv-keywords').get('dynamicDefaults').definition; +definition.DEFAULTS.uuid = getUuid; + +var schema = { + dynamicDefaults: { + id1: 'uuid', // v4 + id2: { func: 'uuid', v: 4 }, // v4 + id3: { func: 'uuid', v: 1 } // v1 + } +}; +``` + + +## License + +[MIT](https://github.com/epoberezkin/ajv-keywords/blob/master/LICENSE) diff --git a/node_modules/ajv-keywords/index.js b/node_modules/ajv-keywords/index.js new file mode 100644 index 0000000..07a8eda --- /dev/null +++ b/node_modules/ajv-keywords/index.js @@ -0,0 +1,35 @@ +'use strict'; + +var KEYWORDS = require('./keywords'); + +module.exports = defineKeywords; + + +/** + * Defines one or several keywords in ajv instance + * @param {Ajv} ajv validator instance + * @param {String|Array|undefined} keyword keyword(s) to define + * @return {Ajv} ajv instance (for chaining) + */ +function defineKeywords(ajv, keyword) { + if (Array.isArray(keyword)) { + for (var i=0; i d2) return 1; + if (d1 < d2) return -1; + if (d1 === d2) return 0; +} + + +function compareTime(t1, t2) { + if (!(t1 && t2)) return; + t1 = t1.match(TIME); + t2 = t2.match(TIME); + if (!(t1 && t2)) return; + t1 = t1[1] + t1[2] + t1[3] + (t1[4]||''); + t2 = t2[1] + t2[2] + t2[3] + (t2[4]||''); + if (t1 > t2) return 1; + if (t1 < t2) return -1; + if (t1 === t2) return 0; +} + + +function compareDateTime(dt1, dt2) { + if (!(dt1 && dt2)) return; + dt1 = dt1.split(DATE_TIME_SEPARATOR); + dt2 = dt2.split(DATE_TIME_SEPARATOR); + var res = compareDate(dt1[0], dt2[0]); + if (res === undefined) return; + return res || compareTime(dt1[1], dt2[1]); +} diff --git a/node_modules/ajv-keywords/keywords/_util.js b/node_modules/ajv-keywords/keywords/_util.js new file mode 100644 index 0000000..eebd07a --- /dev/null +++ b/node_modules/ajv-keywords/keywords/_util.js @@ -0,0 +1,15 @@ +'use strict'; + +module.exports = { + metaSchemaRef: metaSchemaRef +}; + +var META_SCHEMA_ID = 'http://json-schema.org/draft-06/schema'; + +function metaSchemaRef(ajv) { + var defaultMeta = ajv._opts.defaultMeta; + if (typeof defaultMeta == 'string') return { $ref: defaultMeta }; + if (ajv.getSchema(META_SCHEMA_ID)) return { $ref: META_SCHEMA_ID }; + console.warn('meta schema not defined'); + return {}; +} diff --git a/node_modules/ajv-keywords/keywords/deepProperties.js b/node_modules/ajv-keywords/keywords/deepProperties.js new file mode 100644 index 0000000..3dac5fb --- /dev/null +++ b/node_modules/ajv-keywords/keywords/deepProperties.js @@ -0,0 +1,54 @@ +'use strict'; + +var util = require('./_util'); + +module.exports = function defFunc(ajv) { + defFunc.definition = { + type: 'object', + macro: function (schema) { + var schemas = []; + for (var pointer in schema) + schemas.push(getSchema(pointer, schema[pointer])); + return { 'allOf': schemas }; + }, + metaSchema: { + type: 'object', + propertyNames: { + type: 'string', + format: 'json-pointer' + }, + additionalProperties: util.metaSchemaRef(ajv) + } + }; + + ajv.addKeyword('deepProperties', defFunc.definition); + return ajv; +}; + + +function getSchema(jsonPointer, schema) { + var segments = jsonPointer.split('/'); + var rootSchema = {}; + var pointerSchema = rootSchema; + for (var i=1; i' + , $result = 'result' + $lvl; +}} + +{{# def.$data }} + + +{{? $isDataExcl }} + {{ + var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr) + , $exclusive = 'exclusive' + $lvl + , $opExpr = 'op' + $lvl + , $opStr = '\' + ' + $opExpr + ' + \''; + }} + var schemaExcl{{=$lvl}} = {{=$schemaValueExcl}}; + {{ $schemaValueExcl = 'schemaExcl' + $lvl; }} + + if (typeof {{=$schemaValueExcl}} != 'boolean' && {{=$schemaValueExcl}} !== undefined) { + {{=$valid}} = false; + {{ var $errorKeyword = $exclusiveKeyword; }} + {{# def.error:'_formatExclusiveLimit' }} + } + + {{# def.elseIfValid }} + + {{# def.compareFormat }} + var {{=$exclusive}} = {{=$schemaValueExcl}} === true; + + if ({{=$valid}} === undefined) { + {{=$valid}} = {{=$exclusive}} + ? {{=$result}} {{=$op}} 0 + : {{=$result}} {{=$op}}= 0; + } + + if (!{{=$valid}}) var op{{=$lvl}} = {{=$exclusive}} ? '{{=$op}}' : '{{=$op}}='; +{{??}} + {{ + var $exclusive = $schemaExcl === true + , $opStr = $op; /*used in error*/ + if (!$exclusive) $opStr += '='; + var $opExpr = '\'' + $opStr + '\''; /*used in error*/ + }} + + {{# def.compareFormat }} + + if ({{=$valid}} === undefined) + {{=$valid}} = {{=$result}} {{=$op}}{{?!$exclusive}}={{?}} 0; +{{?}} + +{{= $closingBraces }} + +if (!{{=$valid}}) { + {{ var $errorKeyword = $keyword; }} + {{# def.error:'_formatLimit' }} +} diff --git a/node_modules/ajv-keywords/keywords/dot/patternRequired.jst b/node_modules/ajv-keywords/keywords/dot/patternRequired.jst new file mode 100644 index 0000000..6f82f62 --- /dev/null +++ b/node_modules/ajv-keywords/keywords/dot/patternRequired.jst @@ -0,0 +1,33 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} + +{{ + var $key = 'key' + $lvl + , $idx = 'idx' + $lvl + , $matched = 'patternMatched' + $lvl + , $dataProperties = 'dataProperties' + $lvl + , $closingBraces = '' + , $ownProperties = it.opts.ownProperties; +}} + +var {{=$valid}} = true; +{{? $ownProperties }} + var {{=$dataProperties}} = undefined; +{{?}} + +{{~ $schema:$pProperty }} + var {{=$matched}} = false; + {{# def.iterateProperties }} + {{=$matched}} = {{= it.usePattern($pProperty) }}.test({{=$key}}); + if ({{=$matched}}) break; + } + + {{ var $missingPattern = it.util.escapeQuotes($pProperty); }} + if (!{{=$matched}}) { + {{=$valid}} = false; + {{# def.addError:'patternRequired' }} + } {{# def.elseIfValid }} +{{~}} + +{{= $closingBraces }} diff --git a/node_modules/ajv-keywords/keywords/dot/switch.jst b/node_modules/ajv-keywords/keywords/dot/switch.jst new file mode 100644 index 0000000..389678e --- /dev/null +++ b/node_modules/ajv-keywords/keywords/dot/switch.jst @@ -0,0 +1,73 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + + +{{## def.validateIf: + {{# def.setCompositeRule }} + {{ $it.createErrors = false; }} + {{# def._validateSwitchRule:if }} + {{ $it.createErrors = true; }} + {{# def.resetCompositeRule }} + {{=$ifPassed}} = {{=$nextValid}}; +#}} + +{{## def.validateThen: + {{? typeof $sch.then == 'boolean' }} + {{? $sch.then === false }} + {{# def.error:'switch' }} + {{?}} + var {{=$nextValid}} = {{= $sch.then }}; + {{??}} + {{# def._validateSwitchRule:then }} + {{?}} +#}} + +{{## def._validateSwitchRule:_clause: + {{ + $it.schema = $sch._clause; + $it.schemaPath = $schemaPath + '[' + $caseIndex + ']._clause'; + $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/_clause'; + }} + {{# def.insertSubschemaCode }} +#}} + +{{## def.switchCase: + {{? $sch.if && {{# def.nonEmptySchema:$sch.if }} }} + var {{=$errs}} = errors; + {{# def.validateIf }} + if ({{=$ifPassed}}) { + {{# def.validateThen }} + } else { + {{# def.resetErrors }} + } + {{??}} + {{=$ifPassed}} = true; + {{# def.validateThen }} + {{?}} +#}} + + +{{ + var $ifPassed = 'ifPassed' + it.level + , $currentBaseId = $it.baseId + , $shouldContinue; +}} +var {{=$ifPassed}}; + +{{~ $schema:$sch:$caseIndex }} + {{? $caseIndex && !$shouldContinue }} + if (!{{=$ifPassed}}) { + {{ $closingBraces+= '}'; }} + {{?}} + + {{# def.switchCase }} + {{ $shouldContinue = $sch.continue }} +{{~}} + +{{= $closingBraces }} + +var {{=$valid}} = {{=$nextValid}}; + +{{# def.cleanUp }} diff --git a/node_modules/ajv-keywords/keywords/dotjs/README.md b/node_modules/ajv-keywords/keywords/dotjs/README.md new file mode 100644 index 0000000..e2846c8 --- /dev/null +++ b/node_modules/ajv-keywords/keywords/dotjs/README.md @@ -0,0 +1,3 @@ +These files are compiled dot templates from dot folder. + +Do NOT edit them directly, edit the templates and run `npm run build` from main ajv-keywords folder. diff --git a/node_modules/ajv-keywords/keywords/dotjs/_formatLimit.js b/node_modules/ajv-keywords/keywords/dotjs/_formatLimit.js new file mode 100644 index 0000000..fc56e20 --- /dev/null +++ b/node_modules/ajv-keywords/keywords/dotjs/_formatLimit.js @@ -0,0 +1,176 @@ +'use strict'; +module.exports = function generate__formatLimit(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + out += 'var ' + ($valid) + ' = undefined;'; + if (it.opts.format === false) { + out += ' ' + ($valid) + ' = true; '; + return out; + } + var $schemaFormat = it.schema.format, + $isDataFormat = it.opts.$data && $schemaFormat.$data, + $closingBraces = ''; + if ($isDataFormat) { + var $schemaValueFormat = it.util.getData($schemaFormat.$data, $dataLvl, it.dataPathArr), + $format = 'format' + $lvl, + $compare = 'compare' + $lvl; + out += ' var ' + ($format) + ' = formats[' + ($schemaValueFormat) + '] , ' + ($compare) + ' = ' + ($format) + ' && ' + ($format) + '.compare;'; + } else { + var $format = it.formats[$schemaFormat]; + if (!($format && $format.compare)) { + out += ' ' + ($valid) + ' = true; '; + return out; + } + var $compare = 'formats' + it.util.getProperty($schemaFormat) + '.compare'; + } + var $isMax = $keyword == 'formatMaximum', + $exclusiveKeyword = 'formatExclusive' + ($isMax ? 'Maximum' : 'Minimum'), + $schemaExcl = it.schema[$exclusiveKeyword], + $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data, + $op = $isMax ? '<' : '>', + $result = 'result' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if ($isDataExcl) { + var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), + $exclusive = 'exclusive' + $lvl, + $opExpr = 'op' + $lvl, + $opStr = '\' + ' + $opExpr + ' + \''; + out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; + $schemaValueExcl = 'schemaExcl' + $lvl; + out += ' if (typeof ' + ($schemaValueExcl) + ' != \'boolean\' && ' + ($schemaValueExcl) + ' !== undefined) { ' + ($valid) + ' = false; '; + var $errorKeyword = $exclusiveKeyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_formatExclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + $closingBraces += '}'; + out += ' else { '; + } + if ($isData) { + out += ' if (' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'string\') ' + ($valid) + ' = false; else { '; + $closingBraces += '}'; + } + if ($isDataFormat) { + out += ' if (!' + ($compare) + ') ' + ($valid) + ' = true; else { '; + $closingBraces += '}'; + } + out += ' var ' + ($result) + ' = ' + ($compare) + '(' + ($data) + ', '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' ); if (' + ($result) + ' === undefined) ' + ($valid) + ' = false; var ' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true; if (' + ($valid) + ' === undefined) { ' + ($valid) + ' = ' + ($exclusive) + ' ? ' + ($result) + ' ' + ($op) + ' 0 : ' + ($result) + ' ' + ($op) + '= 0; } if (!' + ($valid) + ') var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';'; + } else { + var $exclusive = $schemaExcl === true, + $opStr = $op; + if (!$exclusive) $opStr += '='; + var $opExpr = '\'' + $opStr + '\''; + if ($isData) { + out += ' if (' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'string\') ' + ($valid) + ' = false; else { '; + $closingBraces += '}'; + } + if ($isDataFormat) { + out += ' if (!' + ($compare) + ') ' + ($valid) + ' = true; else { '; + $closingBraces += '}'; + } + out += ' var ' + ($result) + ' = ' + ($compare) + '(' + ($data) + ', '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' ); if (' + ($result) + ' === undefined) ' + ($valid) + ' = false; if (' + ($valid) + ' === undefined) ' + ($valid) + ' = ' + ($result) + ' ' + ($op); + if (!$exclusive) { + out += '='; + } + out += ' 0;'; + } + out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_formatLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , exclusive: ' + ($exclusive) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be ' + ($opStr) + ' "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '}'; + return out; +} diff --git a/node_modules/ajv-keywords/keywords/dotjs/patternRequired.js b/node_modules/ajv-keywords/keywords/dotjs/patternRequired.js new file mode 100644 index 0000000..31bd0b6 --- /dev/null +++ b/node_modules/ajv-keywords/keywords/dotjs/patternRequired.js @@ -0,0 +1,58 @@ +'use strict'; +module.exports = function generate_patternRequired(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $matched = 'patternMatched' + $lvl, + $dataProperties = 'dataProperties' + $lvl, + $closingBraces = '', + $ownProperties = it.opts.ownProperties; + out += 'var ' + ($valid) + ' = true;'; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined;'; + } + var arr1 = $schema; + if (arr1) { + var $pProperty, i1 = -1, + l1 = arr1.length - 1; + while (i1 < l1) { + $pProperty = arr1[i1 += 1]; + out += ' var ' + ($matched) + ' = false; '; + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' ' + ($matched) + ' = ' + (it.usePattern($pProperty)) + '.test(' + ($key) + '); if (' + ($matched) + ') break; } '; + var $missingPattern = it.util.escapeQuotes($pProperty); + out += ' if (!' + ($matched) + ') { ' + ($valid) + ' = false; var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('patternRequired') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingPattern: \'' + ($missingPattern) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should have property matching pattern \\\'' + ($missingPattern) + '\\\'\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; + if ($breakOnError) { + $closingBraces += '}'; + out += ' else { '; + } + } + } + out += '' + ($closingBraces); + return out; +} diff --git a/node_modules/ajv-keywords/keywords/dotjs/switch.js b/node_modules/ajv-keywords/keywords/dotjs/switch.js new file mode 100644 index 0000000..d6de28b --- /dev/null +++ b/node_modules/ajv-keywords/keywords/dotjs/switch.js @@ -0,0 +1,128 @@ +'use strict'; +module.exports = function generate_switch(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $ifPassed = 'ifPassed' + it.level, + $currentBaseId = $it.baseId, + $shouldContinue; + out += 'var ' + ($ifPassed) + ';'; + var arr1 = $schema; + if (arr1) { + var $sch, $caseIndex = -1, + l1 = arr1.length - 1; + while ($caseIndex < l1) { + $sch = arr1[$caseIndex += 1]; + if ($caseIndex && !$shouldContinue) { + out += ' if (!' + ($ifPassed) + ') { '; + $closingBraces += '}'; + } + if ($sch.if && it.util.schemaHasRules($sch.if, it.RULES.all)) { + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.createErrors = false; + $it.schema = $sch.if; + $it.schemaPath = $schemaPath + '[' + $caseIndex + '].if'; + $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/if'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + $it.createErrors = true; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($ifPassed) + ' = ' + ($nextValid) + '; if (' + ($ifPassed) + ') { '; + if (typeof $sch.then == 'boolean') { + if ($sch.then === false) { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('switch') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { caseIndex: ' + ($caseIndex) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should pass "switch" keyword validation\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } + out += ' var ' + ($nextValid) + ' = ' + ($sch.then) + '; '; + } else { + $it.schema = $sch.then; + $it.schemaPath = $schemaPath + '[' + $caseIndex + '].then'; + $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/then'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } } '; + } else { + out += ' ' + ($ifPassed) + ' = true; '; + if (typeof $sch.then == 'boolean') { + if ($sch.then === false) { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('switch') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { caseIndex: ' + ($caseIndex) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should pass "switch" keyword validation\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } + out += ' var ' + ($nextValid) + ' = ' + ($sch.then) + '; '; + } else { + $it.schema = $sch.then; + $it.schemaPath = $schemaPath + '[' + $caseIndex + '].then'; + $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/then'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + } + } + $shouldContinue = $sch.continue + } + } + out += '' + ($closingBraces) + 'var ' + ($valid) + ' = ' + ($nextValid) + '; '; + out = it.util.cleanUpCode(out); + return out; +} diff --git a/node_modules/ajv-keywords/keywords/dynamicDefaults.js b/node_modules/ajv-keywords/keywords/dynamicDefaults.js new file mode 100644 index 0000000..e6766d1 --- /dev/null +++ b/node_modules/ajv-keywords/keywords/dynamicDefaults.js @@ -0,0 +1,68 @@ +'use strict'; + +var sequences = {}; + +var DEFAULTS = { + timestamp: function() { return Date.now(); }, + datetime: function() { return (new Date).toISOString(); }, + date: function() { return (new Date).toISOString().slice(0, 10); }, + time: function() { return (new Date).toISOString().slice(11); }, + random: function() { return Math.random(); }, + randomint: function (args) { + var limit = args && args.max || 2; + return function() { return Math.floor(Math.random() * limit); }; + }, + seq: function (args) { + var name = args && args.name || ''; + sequences[name] = sequences[name] || 0; + return function() { return sequences[name]++; }; + } +}; + +module.exports = function defFunc(ajv) { + defFunc.definition = { + compile: function (schema, parentSchema, it) { + var funcs = {}; + + for (var key in schema) { + var d = schema[key]; + var func = getDefault(typeof d == 'string' ? d : d.func); + funcs[key] = func.length ? func(d.args) : func; + } + + return it.opts.useDefaults && !it.compositeRule + ? assignDefaults + : noop; + + function assignDefaults(data) { + for (var prop in schema) + if (data[prop] === undefined) data[prop] = funcs[prop](); + return true; + } + + function noop() { return true; } + }, + DEFAULTS: DEFAULTS, + metaSchema: { + type: 'object', + additionalProperties: { + type: ['string', 'object'], + additionalProperties: false, + required: ['func', 'args'], + properties: { + func: { type: 'string' }, + args: { type: 'object' } + } + } + } + }; + + ajv.addKeyword('dynamicDefaults', defFunc.definition); + return ajv; + + function getDefault(d) { + var def = DEFAULTS[d]; + if (def) return def; + throw new Error('invalid "dynamicDefaults" keyword property value: ' + d); + } +}; diff --git a/node_modules/ajv-keywords/keywords/formatMaximum.js b/node_modules/ajv-keywords/keywords/formatMaximum.js new file mode 100644 index 0000000..e7daabf --- /dev/null +++ b/node_modules/ajv-keywords/keywords/formatMaximum.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./_formatLimit')('Maximum'); diff --git a/node_modules/ajv-keywords/keywords/formatMinimum.js b/node_modules/ajv-keywords/keywords/formatMinimum.js new file mode 100644 index 0000000..eddd6e4 --- /dev/null +++ b/node_modules/ajv-keywords/keywords/formatMinimum.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./_formatLimit')('Minimum'); diff --git a/node_modules/ajv-keywords/keywords/index.js b/node_modules/ajv-keywords/keywords/index.js new file mode 100644 index 0000000..f1bf4b2 --- /dev/null +++ b/node_modules/ajv-keywords/keywords/index.js @@ -0,0 +1,18 @@ +'use strict'; + +module.exports = { + 'instanceof': require('./instanceof'), + range: require('./range'), + regexp: require('./regexp'), + 'typeof': require('./typeof'), + dynamicDefaults: require('./dynamicDefaults'), + prohibited: require('./prohibited'), + uniqueItemProperties: require('./uniqueItemProperties'), + deepProperties: require('./deepProperties'), + deepRequired: require('./deepRequired'), + formatMinimum: require('./formatMinimum'), + formatMaximum: require('./formatMaximum'), + patternRequired: require('./patternRequired'), + 'switch': require('./switch'), + select: require('./select') +}; diff --git a/node_modules/ajv-keywords/keywords/instanceof.js b/node_modules/ajv-keywords/keywords/instanceof.js new file mode 100644 index 0000000..ea88f5c --- /dev/null +++ b/node_modules/ajv-keywords/keywords/instanceof.js @@ -0,0 +1,58 @@ +'use strict'; + +var CONSTRUCTORS = { + Object: Object, + Array: Array, + Function: Function, + Number: Number, + String: String, + Date: Date, + RegExp: RegExp +}; + +module.exports = function defFunc(ajv) { + /* istanbul ignore else */ + if (typeof Buffer != 'undefined') + CONSTRUCTORS.Buffer = Buffer; + + /* istanbul ignore else */ + if (typeof Promise != 'undefined') + CONSTRUCTORS.Promise = Promise; + + defFunc.definition = { + compile: function (schema) { + if (typeof schema == 'string') { + var Constructor = getConstructor(schema); + return function (data) { + return data instanceof Constructor; + }; + } + + var constructors = schema.map(getConstructor); + return function (data) { + for (var i=0; i max || (exclusive && min == max)) + throw new Error('There are no numbers in range'); + } +}; diff --git a/node_modules/ajv-keywords/keywords/regexp.js b/node_modules/ajv-keywords/keywords/regexp.js new file mode 100644 index 0000000..84efbd6 --- /dev/null +++ b/node_modules/ajv-keywords/keywords/regexp.js @@ -0,0 +1,36 @@ +'use strict'; + +module.exports = function defFunc(ajv) { + defFunc.definition = { + type: 'string', + inline: function (it, keyword, schema) { + return getRegExp() + '.test(data' + (it.dataLevel || '') + ')'; + + function getRegExp() { + try { + if (typeof schema == 'object') + return new RegExp(schema.pattern, schema.flags); + + var rx = schema.match(/^\/(.*)\/([gimy]*)$/); + if (rx) return new RegExp(rx[1], rx[2]); + throw new Error('cannot parse string into RegExp'); + } catch(e) { + console.error('regular expression', schema, 'is invalid'); + throw e; + } + } + }, + metaSchema: { + type: ['string', 'object'], + properties: { + pattern: { type: 'string' }, + flags: { type: 'string' } + }, + required: ['pattern'], + additionalProperties: false + } + }; + + ajv.addKeyword('regexp', defFunc.definition); + return ajv; +}; diff --git a/node_modules/ajv-keywords/keywords/select.js b/node_modules/ajv-keywords/keywords/select.js new file mode 100644 index 0000000..f79c6c7 --- /dev/null +++ b/node_modules/ajv-keywords/keywords/select.js @@ -0,0 +1,79 @@ +'use strict'; + +var util = require('./_util'); + +module.exports = function defFunc(ajv) { + if (!ajv._opts.$data) { + console.warn('keyword select requires $data option'); + return ajv; + } + var metaSchemaRef = util.metaSchemaRef(ajv); + var compiledCaseSchemas = []; + + defFunc.definition = { + validate: function v(schema, data, parentSchema) { + if (parentSchema.selectCases === undefined) + throw new Error('keyword "selectCases" is absent'); + var compiled = getCompiledSchemas(parentSchema, false); + var validate = compiled.cases[schema]; + if (validate === undefined) validate = compiled.default; + if (typeof validate == 'boolean') return validate; + var valid = validate(data); + if (!valid) v.errors = validate.errors; + return valid; + }, + $data: true, + metaSchema: { type: ['string', 'number', 'boolean', 'null'] } + }; + + ajv.addKeyword('select', defFunc.definition); + ajv.addKeyword('selectCases', { + compile: function (schemas, parentSchema) { + var compiled = getCompiledSchemas(parentSchema); + for (var value in schemas) + compiled.cases[value] = compileOrBoolean(schemas[value]); + return function() { return true; }; + }, + valid: true, + metaSchema: { + type: 'object', + additionalProperties: metaSchemaRef + } + }); + ajv.addKeyword('selectDefault', { + compile: function (schema, parentSchema) { + var compiled = getCompiledSchemas(parentSchema); + compiled.default = compileOrBoolean(schema); + return function() { return true; }; + }, + valid: true, + metaSchema: metaSchemaRef + }); + return ajv; + + + function getCompiledSchemas(parentSchema, create) { + var compiled; + compiledCaseSchemas.some(function (c) { + if (c.parentSchema === parentSchema) { + compiled = c; + return true; + } + }); + if (!compiled && create !== false) { + compiled = { + parentSchema: parentSchema, + cases: {}, + default: true + }; + compiledCaseSchemas.push(compiled); + } + return compiled; + } + + function compileOrBoolean(schema) { + return typeof schema == 'boolean' + ? schema + : ajv.compile(schema); + } +}; diff --git a/node_modules/ajv-keywords/keywords/switch.js b/node_modules/ajv-keywords/keywords/switch.js new file mode 100644 index 0000000..5b0f3f8 --- /dev/null +++ b/node_modules/ajv-keywords/keywords/switch.js @@ -0,0 +1,38 @@ +'use strict'; + +var util = require('./_util'); + +module.exports = function defFunc(ajv) { + if (ajv.RULES.keywords.switch && ajv.RULES.keywords.if) return; + + var metaSchemaRef = util.metaSchemaRef(ajv); + + defFunc.definition = { + inline: require('./dotjs/switch'), + statements: true, + errors: 'full', + metaSchema: { + type: 'array', + items: { + required: [ 'then' ], + properties: { + 'if': metaSchemaRef, + 'then': { + anyOf: [ + { type: 'boolean' }, + metaSchemaRef + ] + }, + 'continue': { type: 'boolean' } + }, + additionalProperties: false, + dependencies: { + 'continue': [ 'if' ] + } + } + } + }; + + ajv.addKeyword('switch', defFunc.definition); + return ajv; +}; diff --git a/node_modules/ajv-keywords/keywords/typeof.js b/node_modules/ajv-keywords/keywords/typeof.js new file mode 100644 index 0000000..3a3574d --- /dev/null +++ b/node_modules/ajv-keywords/keywords/typeof.js @@ -0,0 +1,32 @@ +'use strict'; + +var KNOWN_TYPES = ['undefined', 'string', 'number', 'object', 'function', 'boolean', 'symbol']; + +module.exports = function defFunc(ajv) { + defFunc.definition = { + inline: function (it, keyword, schema) { + var data = 'data' + (it.dataLevel || ''); + if (typeof schema == 'string') return 'typeof ' + data + ' == "' + schema + '"'; + schema = 'validate.schema' + it.schemaPath + '.' + keyword; + return schema + '.indexOf(typeof ' + data + ') >= 0'; + }, + metaSchema: { + anyOf: [ + { + type: 'string', + enum: KNOWN_TYPES + }, + { + type: 'array', + items: { + type: 'string', + enum: KNOWN_TYPES + } + } + ] + } + }; + + ajv.addKeyword('typeof', defFunc.definition); + return ajv; +}; diff --git a/node_modules/ajv-keywords/keywords/uniqueItemProperties.js b/node_modules/ajv-keywords/keywords/uniqueItemProperties.js new file mode 100644 index 0000000..2a8e7e8 --- /dev/null +++ b/node_modules/ajv-keywords/keywords/uniqueItemProperties.js @@ -0,0 +1,32 @@ +'use strict'; + +module.exports = function defFunc(ajv) { + defFunc.definition = { + type: 'array', + compile: function(keys, parentSchema, it) { + var equal = it.util.equal; + return function(data) { + if (data.length > 1) { + for (var k=0; k < keys.length; k++) { + var key = keys[k]; + for (var i = data.length; i--;) { + if (typeof data[i] != 'object') continue; + for (var j = i; j--;) { + if (typeof data[j] == 'object' && equal(data[i][key], data[j][key])) + return false; + } + } + } + } + return true; + }; + }, + metaSchema: { + type: 'array', + items: {type: 'string'} + } + }; + + ajv.addKeyword('uniqueItemProperties', defFunc.definition); + return ajv; +}; diff --git a/node_modules/ajv-keywords/package.json b/node_modules/ajv-keywords/package.json new file mode 100644 index 0000000..4549757 --- /dev/null +++ b/node_modules/ajv-keywords/package.json @@ -0,0 +1,114 @@ +{ + "_args": [ + [ + { + "raw": "ajv-keywords@^3.0.0", + "scope": null, + "escapedName": "ajv-keywords", + "name": "ajv-keywords", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\table" + ] + ], + "_from": "ajv-keywords@>=3.0.0 <4.0.0", + "_id": "ajv-keywords@3.1.0", + "_inCache": true, + "_location": "/ajv-keywords", + "_nodeVersion": "7.10.1", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/ajv-keywords-3.1.0.tgz_1517430918912_0.6375202517956495" + }, + "_npmUser": { + "name": "esp", + "email": "e.poberezkin@me.com" + }, + "_npmVersion": "4.2.0", + "_phantomChildren": {}, + "_requested": { + "raw": "ajv-keywords@^3.0.0", + "scope": null, + "escapedName": "ajv-keywords", + "name": "ajv-keywords", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/table" + ], + "_resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.1.0.tgz", + "_shasum": "ac2b27939c543e95d2c06e7f7f5c27be4aa543be", + "_shrinkwrap": null, + "_spec": "ajv-keywords@^3.0.0", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\table", + "author": { + "name": "Evgeny Poberezkin" + }, + "bugs": { + "url": "https://github.com/epoberezkin/ajv-keywords/issues" + }, + "dependencies": {}, + "description": "Custom JSON-Schema keywords for Ajv validator", + "devDependencies": { + "ajv": "^6.0.0", + "ajv-pack": "^0.3.0", + "chai": "^4.0.2", + "coveralls": "^3.0.0", + "dot": "^1.1.1", + "eslint": "^4.9.0", + "glob": "^7.1.1", + "istanbul": "^0.4.3", + "js-beautify": "^1.7.4", + "json-schema-test": "^2.0.0", + "mocha": "^4.0.0", + "pre-commit": "^1.1.3", + "uuid": "^3.0.1" + }, + "directories": {}, + "dist": { + "shasum": "ac2b27939c543e95d2c06e7f7f5c27be4aa543be", + "tarball": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.1.0.tgz" + }, + "files": [ + "index.js", + "keywords" + ], + "gitHead": "5f9eccc2e2b95745f659ef1abf5488f70da496f2", + "homepage": "https://github.com/epoberezkin/ajv-keywords#readme", + "keywords": [ + "JSON-Schema", + "ajv", + "keywords" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "esp", + "email": "e.poberezkin@me.com" + } + ], + "name": "ajv-keywords", + "optionalDependencies": {}, + "peerDependencies": { + "ajv": "^6.0.0" + }, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/epoberezkin/ajv-keywords.git" + }, + "scripts": { + "build": "node node_modules/ajv/scripts/compile-dots.js node_modules/ajv/lib keywords", + "eslint": "eslint index.js keywords/*.js", + "prepublish": "npm run build", + "test": "npm run build && npm run eslint && npm run test-cov", + "test-cov": "istanbul cover -x 'spec/**' node_modules/mocha/bin/_mocha -- spec/*.spec.js -R spec", + "test-spec": "mocha spec/*.spec.js -R spec" + }, + "version": "3.1.0" +} diff --git a/node_modules/ansi-escapes/index.js b/node_modules/ansi-escapes/index.js new file mode 100644 index 0000000..4d47b10 --- /dev/null +++ b/node_modules/ansi-escapes/index.js @@ -0,0 +1,102 @@ +'use strict'; +const x = module.exports; +const ESC = '\u001B['; +const isTerminalApp = process.env.TERM_PROGRAM === 'Apple_Terminal'; + +x.cursorTo = (x, y) => { + if (typeof x !== 'number') { + throw new TypeError('The `x` argument is required'); + } + + if (typeof y !== 'number') { + return ESC + (x + 1) + 'G'; + } + + return ESC + (y + 1) + ';' + (x + 1) + 'H'; +}; + +x.cursorMove = (x, y) => { + if (typeof x !== 'number') { + throw new TypeError('The `x` argument is required'); + } + + let ret = ''; + + if (x < 0) { + ret += ESC + (-x) + 'D'; + } else if (x > 0) { + ret += ESC + x + 'C'; + } + + if (y < 0) { + ret += ESC + (-y) + 'A'; + } else if (y > 0) { + ret += ESC + y + 'B'; + } + + return ret; +}; + +x.cursorUp = count => ESC + (typeof count === 'number' ? count : 1) + 'A'; +x.cursorDown = count => ESC + (typeof count === 'number' ? count : 1) + 'B'; +x.cursorForward = count => ESC + (typeof count === 'number' ? count : 1) + 'C'; +x.cursorBackward = count => ESC + (typeof count === 'number' ? count : 1) + 'D'; + +x.cursorLeft = ESC + 'G'; +x.cursorSavePosition = ESC + (isTerminalApp ? '7' : 's'); +x.cursorRestorePosition = ESC + (isTerminalApp ? '8' : 'u'); +x.cursorGetPosition = ESC + '6n'; +x.cursorNextLine = ESC + 'E'; +x.cursorPrevLine = ESC + 'F'; +x.cursorHide = ESC + '?25l'; +x.cursorShow = ESC + '?25h'; + +x.eraseLines = count => { + let clear = ''; + + for (let i = 0; i < count; i++) { + clear += x.eraseLine + (i < count - 1 ? x.cursorUp() : ''); + } + + if (count) { + clear += x.cursorLeft; + } + + return clear; +}; + +x.eraseEndLine = ESC + 'K'; +x.eraseStartLine = ESC + '1K'; +x.eraseLine = ESC + '2K'; +x.eraseDown = ESC + 'J'; +x.eraseUp = ESC + '1J'; +x.eraseScreen = ESC + '2J'; +x.scrollUp = ESC + 'S'; +x.scrollDown = ESC + 'T'; + +x.clearScreen = '\u001Bc'; +x.beep = '\u0007'; + +x.image = (buf, opts) => { + opts = opts || {}; + + let ret = '\u001B]1337;File=inline=1'; + + if (opts.width) { + ret += `;width=${opts.width}`; + } + + if (opts.height) { + ret += `;height=${opts.height}`; + } + + if (opts.preserveAspectRatio === false) { + ret += ';preserveAspectRatio=0'; + } + + return ret + ':' + buf.toString('base64') + '\u0007'; +}; + +x.iTerm = {}; + +x.iTerm.setCwd = cwd => '\u001B]50;CurrentDir=' + (cwd || process.cwd()) + '\u0007'; diff --git a/node_modules/ansi-escapes/license b/node_modules/ansi-escapes/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/ansi-escapes/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/ansi-escapes/package.json b/node_modules/ansi-escapes/package.json new file mode 100644 index 0000000..86fa286 --- /dev/null +++ b/node_modules/ansi-escapes/package.json @@ -0,0 +1,119 @@ +{ + "_args": [ + [ + { + "raw": "ansi-escapes@^3.0.0", + "scope": null, + "escapedName": "ansi-escapes", + "name": "ansi-escapes", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\inquirer" + ] + ], + "_from": "ansi-escapes@>=3.0.0 <4.0.0", + "_id": "ansi-escapes@3.0.0", + "_inCache": true, + "_location": "/ansi-escapes", + "_nodeVersion": "8.4.0", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/ansi-escapes-3.0.0.tgz_1504607767081_0.4022042681463063" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "5.3.0", + "_phantomChildren": {}, + "_requested": { + "raw": "ansi-escapes@^3.0.0", + "scope": null, + "escapedName": "ansi-escapes", + "name": "ansi-escapes", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/inquirer" + ], + "_resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.0.0.tgz", + "_shasum": "ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92", + "_shrinkwrap": null, + "_spec": "ansi-escapes@^3.0.0", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\inquirer", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/ansi-escapes/issues" + }, + "dependencies": {}, + "description": "ANSI escape codes for manipulating the terminal", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "integrity": "sha512-O/klc27mWNUigtv0F8NJWbLF00OcegQalkqKURWdosW08YZKi4m6CnSUSvIZG1otNJbTWhN01Hhz389DW7mvDQ==", + "shasum": "ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92", + "tarball": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.0.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "caedc6d277c5e7c4d3ecaa31ebe0b8b1c13086fa", + "homepage": "https://github.com/sindresorhus/ansi-escapes#readme", + "keywords": [ + "ansi", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "escapes", + "formatting", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text", + "vt100", + "sequence", + "control", + "code", + "codes", + "cursor", + "iterm", + "iterm2" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "ansi-escapes", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/ansi-escapes.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.0.0" +} diff --git a/node_modules/ansi-escapes/readme.md b/node_modules/ansi-escapes/readme.md new file mode 100644 index 0000000..45490e9 --- /dev/null +++ b/node_modules/ansi-escapes/readme.md @@ -0,0 +1,174 @@ +# ansi-escapes [![Build Status](https://travis-ci.org/sindresorhus/ansi-escapes.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-escapes) + +> [ANSI escape codes](http://www.termsys.demon.co.uk/vtansi.htm) for manipulating the terminal + + +## Install + +``` +$ npm install ansi-escapes +``` + + +## Usage + +```js +const ansiEscapes = require('ansi-escapes'); + +// Moves the cursor two rows up and to the left +process.stdout.write(ansiEscapes.cursorUp(2) + ansiEscapes.cursorLeft); +//=> '\u001B[2A\u001B[1000D' +``` + + +## API + +### cursorTo(x, [y]) + +Set the absolute position of the cursor. `x0` `y0` is the top left of the screen. + +### cursorMove(x, [y]) + +Set the position of the cursor relative to its current position. + +### cursorUp(count) + +Move cursor up a specific amount of rows. Default is `1`. + +### cursorDown(count) + +Move cursor down a specific amount of rows. Default is `1`. + +### cursorForward(count) + +Move cursor forward a specific amount of rows. Default is `1`. + +### cursorBackward(count) + +Move cursor backward a specific amount of rows. Default is `1`. + +### cursorLeft + +Move cursor to the left side. + +### cursorSavePosition + +Save cursor position. + +### cursorRestorePosition + +Restore saved cursor position. + +### cursorGetPosition + +Get cursor position. + +### cursorNextLine + +Move cursor to the next line. + +### cursorPrevLine + +Move cursor to the previous line. + +### cursorHide + +Hide cursor. + +### cursorShow + +Show cursor. + +### eraseLines(count) + +Erase from the current cursor position up the specified amount of rows. + +### eraseEndLine + +Erase from the current cursor position to the end of the current line. + +### eraseStartLine + +Erase from the current cursor position to the start of the current line. + +### eraseLine + +Erase the entire current line. + +### eraseDown + +Erase the screen from the current line down to the bottom of the screen. + +### eraseUp + +Erase the screen from the current line up to the top of the screen. + +### eraseScreen + +Erase the screen and move the cursor the top left position. + +### scrollUp + +Scroll display up one line. + +### scrollDown + +Scroll display down one line. + +### clearScreen + +Clear the terminal screen. + +### beep + +Output a beeping sound. + +### image(input, [options]) + +Display an image. + +*Currently only supported on iTerm2 >=3* + +See [term-img](https://github.com/sindresorhus/term-img) for a higher-level module. + +#### input + +Type: `Buffer` + +Buffer of an image. Usually read in with `fs.readFile()`. + +#### options + +##### width +##### height + +Type: `string` `number` + +The width and height are given as a number followed by a unit, or the word "auto". + +- `N`: N character cells. +- `Npx`: N pixels. +- `N%`: N percent of the session's width or height. +- `auto`: The image's inherent size will be used to determine an appropriate dimension. + +##### preserveAspectRatio + +Type: `boolean`
+Default: `true` + +### iTerm.setCwd([path]) + +Type: `string`
+Default: `process.cwd()` + +[Inform iTerm2](https://www.iterm2.com/documentation-escape-codes.html) of the current directory to help semantic history and enable [Cmd-clicking relative paths](https://coderwall.com/p/b7e82q/quickly-open-files-in-iterm-with-cmd-click). + + +## Related + +- [ansi-styles](https://github.com/chalk/ansi-styles) - ANSI escape codes for styling strings in the terminal + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/argparse/CHANGELOG.md b/node_modules/argparse/CHANGELOG.md new file mode 100644 index 0000000..a43c628 --- /dev/null +++ b/node_modules/argparse/CHANGELOG.md @@ -0,0 +1,185 @@ +1.0.10 / 2018-02-15 +------------------ + +- Use .concat instead of + for arrays, #122. + + +1.0.9 / 2016-09-29 +------------------ + +- Rerelease after 1.0.8 - deps cleanup. + + +1.0.8 / 2016-09-29 +------------------ + +- Maintenance (deps bump, fix node 6.5+ tests, coverage report). + + +1.0.7 / 2016-03-17 +------------------ + +- Teach `addArgument` to accept string arg names. #97, @tomxtobin. + + +1.0.6 / 2016-02-06 +------------------ + +- Maintenance: moved to eslint & updated CS. + + +1.0.5 / 2016-02-05 +------------------ + +- Removed lodash dependency to significantly reduce install size. + Thanks to @mourner. + + +1.0.4 / 2016-01-17 +------------------ + +- Maintenance: lodash update to 4.0.0. + + +1.0.3 / 2015-10-27 +------------------ + +- Fix parse `=` in args: `--examplepath="C:\myfolder\env=x64"`. #84, @CatWithApple. + + +1.0.2 / 2015-03-22 +------------------ + +- Relaxed lodash version dependency. + + +1.0.1 / 2015-02-20 +------------------ + +- Changed dependencies to be compatible with ancient nodejs. + + +1.0.0 / 2015-02-19 +------------------ + +- Maintenance release. +- Replaced `underscore` with `lodash`. +- Bumped version to 1.0.0 to better reflect semver meaning. +- HISTORY.md -> CHANGELOG.md + + +0.1.16 / 2013-12-01 +------------------- + +- Maintenance release. Updated dependencies and docs. + + +0.1.15 / 2013-05-13 +------------------- + +- Fixed #55, @trebor89 + + +0.1.14 / 2013-05-12 +------------------- + +- Fixed #62, @maxtaco + + +0.1.13 / 2013-04-08 +------------------- + +- Added `.npmignore` to reduce package size + + +0.1.12 / 2013-02-10 +------------------- + +- Fixed conflictHandler (#46), @hpaulj + + +0.1.11 / 2013-02-07 +------------------- + +- Multiple bugfixes, @hpaulj +- Added 70+ tests (ported from python), @hpaulj +- Added conflictHandler, @applepicke +- Added fromfilePrefixChar, @hpaulj + + +0.1.10 / 2012-12-30 +------------------- + +- Added [mutual exclusion](http://docs.python.org/dev/library/argparse.html#mutual-exclusion) + support, thanks to @hpaulj +- Fixed options check for `storeConst` & `appendConst` actions, thanks to @hpaulj + + +0.1.9 / 2012-12-27 +------------------ + +- Fixed option dest interferens with other options (issue #23), thanks to @hpaulj +- Fixed default value behavior with `*` positionals, thanks to @hpaulj +- Improve `getDefault()` behavior, thanks to @hpaulj +- Imrove negative argument parsing, thanks to @hpaulj + + +0.1.8 / 2012-12-01 +------------------ + +- Fixed parser parents (issue #19), thanks to @hpaulj +- Fixed negative argument parse (issue #20), thanks to @hpaulj + + +0.1.7 / 2012-10-14 +------------------ + +- Fixed 'choices' argument parse (issue #16) +- Fixed stderr output (issue #15) + + +0.1.6 / 2012-09-09 +------------------ + +- Fixed check for conflict of options (thanks to @tomxtobin) + + +0.1.5 / 2012-09-03 +------------------ + +- Fix parser #setDefaults method (thanks to @tomxtobin) + + +0.1.4 / 2012-07-30 +------------------ + +- Fixed pseudo-argument support (thanks to @CGamesPlay) +- Fixed addHelp default (should be true), if not set (thanks to @benblank) + + +0.1.3 / 2012-06-27 +------------------ + +- Fixed formatter api name: Formatter -> HelpFormatter + + +0.1.2 / 2012-05-29 +------------------ + +- Added basic tests +- Removed excess whitespace in help +- Fixed error reporting, when parcer with subcommands + called with empty arguments + + +0.1.1 / 2012-05-23 +------------------ + +- Fixed line wrapping in help formatter +- Added better error reporting on invalid arguments + + +0.1.0 / 2012-05-16 +------------------ + +- First release. diff --git a/node_modules/argparse/LICENSE b/node_modules/argparse/LICENSE new file mode 100644 index 0000000..1afdae5 --- /dev/null +++ b/node_modules/argparse/LICENSE @@ -0,0 +1,21 @@ +(The MIT License) + +Copyright (C) 2012 by Vitaly Puzrin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/argparse/README.md b/node_modules/argparse/README.md new file mode 100644 index 0000000..7fa6c40 --- /dev/null +++ b/node_modules/argparse/README.md @@ -0,0 +1,257 @@ +argparse +======== + +[![Build Status](https://secure.travis-ci.org/nodeca/argparse.svg?branch=master)](http://travis-ci.org/nodeca/argparse) +[![NPM version](https://img.shields.io/npm/v/argparse.svg)](https://www.npmjs.org/package/argparse) + +CLI arguments parser for node.js. Javascript port of python's +[argparse](http://docs.python.org/dev/library/argparse.html) module +(original version 3.2). That's a full port, except some very rare options, +recorded in issue tracker. + +**NB. Difference with original.** + +- Method names changed to camelCase. See [generated docs](http://nodeca.github.com/argparse/). +- Use `defaultValue` instead of `default`. +- Use `argparse.Const.REMAINDER` instead of `argparse.REMAINDER`, and + similarly for constant values `OPTIONAL`, `ZERO_OR_MORE`, and `ONE_OR_MORE` + (aliases for `nargs` values `'?'`, `'*'`, `'+'`, respectively), and + `SUPPRESS`. + + +Example +======= + +test.js file: + +```javascript +#!/usr/bin/env node +'use strict'; + +var ArgumentParser = require('../lib/argparse').ArgumentParser; +var parser = new ArgumentParser({ + version: '0.0.1', + addHelp:true, + description: 'Argparse example' +}); +parser.addArgument( + [ '-f', '--foo' ], + { + help: 'foo bar' + } +); +parser.addArgument( + [ '-b', '--bar' ], + { + help: 'bar foo' + } +); +parser.addArgument( + '--baz', + { + help: 'baz bar' + } +); +var args = parser.parseArgs(); +console.dir(args); +``` + +Display help: + +``` +$ ./test.js -h +usage: example.js [-h] [-v] [-f FOO] [-b BAR] [--baz BAZ] + +Argparse example + +Optional arguments: + -h, --help Show this help message and exit. + -v, --version Show program's version number and exit. + -f FOO, --foo FOO foo bar + -b BAR, --bar BAR bar foo + --baz BAZ baz bar +``` + +Parse arguments: + +``` +$ ./test.js -f=3 --bar=4 --baz 5 +{ foo: '3', bar: '4', baz: '5' } +``` + +More [examples](https://github.com/nodeca/argparse/tree/master/examples). + + +ArgumentParser objects +====================== + +``` +new ArgumentParser({parameters hash}); +``` + +Creates a new ArgumentParser object. + +**Supported params:** + +- ```description``` - Text to display before the argument help. +- ```epilog``` - Text to display after the argument help. +- ```addHelp``` - Add a -h/–help option to the parser. (default: true) +- ```argumentDefault``` - Set the global default value for arguments. (default: null) +- ```parents``` - A list of ArgumentParser objects whose arguments should also be included. +- ```prefixChars``` - The set of characters that prefix optional arguments. (default: ‘-‘) +- ```formatterClass``` - A class for customizing the help output. +- ```prog``` - The name of the program (default: `path.basename(process.argv[1])`) +- ```usage``` - The string describing the program usage (default: generated) +- ```conflictHandler``` - Usually unnecessary, defines strategy for resolving conflicting optionals. + +**Not supported yet** + +- ```fromfilePrefixChars``` - The set of characters that prefix files from which additional arguments should be read. + + +Details in [original ArgumentParser guide](http://docs.python.org/dev/library/argparse.html#argumentparser-objects) + + +addArgument() method +==================== + +``` +ArgumentParser.addArgument(name or flag or [name] or [flags...], {options}) +``` + +Defines how a single command-line argument should be parsed. + +- ```name or flag or [name] or [flags...]``` - Either a positional name + (e.g., `'foo'`), a single option (e.g., `'-f'` or `'--foo'`), an array + of a single positional name (e.g., `['foo']`), or an array of options + (e.g., `['-f', '--foo']`). + +Options: + +- ```action``` - The basic type of action to be taken when this argument is encountered at the command line. +- ```nargs```- The number of command-line arguments that should be consumed. +- ```constant``` - A constant value required by some action and nargs selections. +- ```defaultValue``` - The value produced if the argument is absent from the command line. +- ```type``` - The type to which the command-line argument should be converted. +- ```choices``` - A container of the allowable values for the argument. +- ```required``` - Whether or not the command-line option may be omitted (optionals only). +- ```help``` - A brief description of what the argument does. +- ```metavar``` - A name for the argument in usage messages. +- ```dest``` - The name of the attribute to be added to the object returned by parseArgs(). + +Details in [original add_argument guide](http://docs.python.org/dev/library/argparse.html#the-add-argument-method) + + +Action (some details) +================ + +ArgumentParser objects associate command-line arguments with actions. +These actions can do just about anything with the command-line arguments associated +with them, though most actions simply add an attribute to the object returned by +parseArgs(). The action keyword argument specifies how the command-line arguments +should be handled. The supported actions are: + +- ```store``` - Just stores the argument’s value. This is the default action. +- ```storeConst``` - Stores value, specified by the const keyword argument. + (Note that the const keyword argument defaults to the rather unhelpful None.) + The 'storeConst' action is most commonly used with optional arguments, that + specify some sort of flag. +- ```storeTrue``` and ```storeFalse``` - Stores values True and False + respectively. These are special cases of 'storeConst'. +- ```append``` - Stores a list, and appends each argument value to the list. + This is useful to allow an option to be specified multiple times. +- ```appendConst``` - Stores a list, and appends value, specified by the + const keyword argument to the list. (Note, that the const keyword argument defaults + is None.) The 'appendConst' action is typically used when multiple arguments need + to store constants to the same list. +- ```count``` - Counts the number of times a keyword argument occurs. For example, + used for increasing verbosity levels. +- ```help``` - Prints a complete help message for all the options in the current + parser and then exits. By default a help action is automatically added to the parser. + See ArgumentParser for details of how the output is created. +- ```version``` - Prints version information and exit. Expects a `version=` + keyword argument in the addArgument() call. + +Details in [original action guide](http://docs.python.org/dev/library/argparse.html#action) + + +Sub-commands +============ + +ArgumentParser.addSubparsers() + +Many programs split their functionality into a number of sub-commands, for +example, the svn program can invoke sub-commands like `svn checkout`, `svn update`, +and `svn commit`. Splitting up functionality this way can be a particularly good +idea when a program performs several different functions which require different +kinds of command-line arguments. `ArgumentParser` supports creation of such +sub-commands with `addSubparsers()` method. The `addSubparsers()` method is +normally called with no arguments and returns an special action object. +This object has a single method `addParser()`, which takes a command name and +any `ArgumentParser` constructor arguments, and returns an `ArgumentParser` object +that can be modified as usual. + +Example: + +sub_commands.js +```javascript +#!/usr/bin/env node +'use strict'; + +var ArgumentParser = require('../lib/argparse').ArgumentParser; +var parser = new ArgumentParser({ + version: '0.0.1', + addHelp:true, + description: 'Argparse examples: sub-commands', +}); + +var subparsers = parser.addSubparsers({ + title:'subcommands', + dest:"subcommand_name" +}); + +var bar = subparsers.addParser('c1', {addHelp:true}); +bar.addArgument( + [ '-f', '--foo' ], + { + action: 'store', + help: 'foo3 bar3' + } +); +var bar = subparsers.addParser( + 'c2', + {aliases:['co'], addHelp:true} +); +bar.addArgument( + [ '-b', '--bar' ], + { + action: 'store', + type: 'int', + help: 'foo3 bar3' + } +); + +var args = parser.parseArgs(); +console.dir(args); + +``` + +Details in [original sub-commands guide](http://docs.python.org/dev/library/argparse.html#sub-commands) + + +Contributors +============ + +- [Eugene Shkuropat](https://github.com/shkuropat) +- [Paul Jacobson](https://github.com/hpaulj) + +[others](https://github.com/nodeca/argparse/graphs/contributors) + +License +======= + +Copyright (c) 2012 [Vitaly Puzrin](https://github.com/puzrin). +Released under the MIT license. See +[LICENSE](https://github.com/nodeca/argparse/blob/master/LICENSE) for details. + + diff --git a/node_modules/argparse/index.js b/node_modules/argparse/index.js new file mode 100644 index 0000000..3bbc143 --- /dev/null +++ b/node_modules/argparse/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./lib/argparse'); diff --git a/node_modules/argparse/lib/action.js b/node_modules/argparse/lib/action.js new file mode 100644 index 0000000..1483c79 --- /dev/null +++ b/node_modules/argparse/lib/action.js @@ -0,0 +1,146 @@ +/** + * class Action + * + * Base class for all actions + * Do not call in your code, use this class only for inherits your own action + * + * Information about how to convert command line strings to Javascript objects. + * Action objects are used by an ArgumentParser to represent the information + * needed to parse a single argument from one or more strings from the command + * line. The keyword arguments to the Action constructor are also all attributes + * of Action instances. + * + * ##### Allowed keywords: + * + * - `store` + * - `storeConstant` + * - `storeTrue` + * - `storeFalse` + * - `append` + * - `appendConstant` + * - `count` + * - `help` + * - `version` + * + * Information about action options see [[Action.new]] + * + * See also [original guide](http://docs.python.org/dev/library/argparse.html#action) + * + **/ + +'use strict'; + + +// Constants +var c = require('./const'); + + +/** + * new Action(options) + * + * Base class for all actions. Used only for inherits + * + * + * ##### Options: + * + * - `optionStrings` A list of command-line option strings for the action. + * - `dest` Attribute to hold the created object(s) + * - `nargs` The number of command-line arguments that should be consumed. + * By default, one argument will be consumed and a single value will be + * produced. + * - `constant` Default value for an action with no value. + * - `defaultValue` The value to be produced if the option is not specified. + * - `type` Cast to 'string'|'int'|'float'|'complex'|function (string). If + * None, 'string'. + * - `choices` The choices available. + * - `required` True if the action must always be specified at the command + * line. + * - `help` The help describing the argument. + * - `metavar` The name to be used for the option's argument with the help + * string. If None, the 'dest' value will be used as the name. + * + * ##### nargs supported values: + * + * - `N` (an integer) consumes N arguments (and produces a list) + * - `?` consumes zero or one arguments + * - `*` consumes zero or more arguments (and produces a list) + * - `+` consumes one or more arguments (and produces a list) + * + * Note: that the difference between the default and nargs=1 is that with the + * default, a single value will be produced, while with nargs=1, a list + * containing a single value will be produced. + **/ +var Action = module.exports = function Action(options) { + options = options || {}; + this.optionStrings = options.optionStrings || []; + this.dest = options.dest; + this.nargs = typeof options.nargs !== 'undefined' ? options.nargs : null; + this.constant = typeof options.constant !== 'undefined' ? options.constant : null; + this.defaultValue = options.defaultValue; + this.type = typeof options.type !== 'undefined' ? options.type : null; + this.choices = typeof options.choices !== 'undefined' ? options.choices : null; + this.required = typeof options.required !== 'undefined' ? options.required : false; + this.help = typeof options.help !== 'undefined' ? options.help : null; + this.metavar = typeof options.metavar !== 'undefined' ? options.metavar : null; + + if (!(this.optionStrings instanceof Array)) { + throw new Error('optionStrings should be an array'); + } + if (typeof this.required !== 'undefined' && typeof this.required !== 'boolean') { + throw new Error('required should be a boolean'); + } +}; + +/** + * Action#getName -> String + * + * Tells action name + **/ +Action.prototype.getName = function () { + if (this.optionStrings.length > 0) { + return this.optionStrings.join('/'); + } else if (this.metavar !== null && this.metavar !== c.SUPPRESS) { + return this.metavar; + } else if (typeof this.dest !== 'undefined' && this.dest !== c.SUPPRESS) { + return this.dest; + } + return null; +}; + +/** + * Action#isOptional -> Boolean + * + * Return true if optional + **/ +Action.prototype.isOptional = function () { + return !this.isPositional(); +}; + +/** + * Action#isPositional -> Boolean + * + * Return true if positional + **/ +Action.prototype.isPositional = function () { + return (this.optionStrings.length === 0); +}; + +/** + * Action#call(parser, namespace, values, optionString) -> Void + * - parser (ArgumentParser): current parser + * - namespace (Namespace): namespace for output data + * - values (Array): parsed values + * - optionString (Array): input option string(not parsed) + * + * Call the action. Should be implemented in inherited classes + * + * ##### Example + * + * ActionCount.prototype.call = function (parser, namespace, values, optionString) { + * namespace.set(this.dest, (namespace[this.dest] || 0) + 1); + * }; + * + **/ +Action.prototype.call = function () { + throw new Error('.call() not defined');// Not Implemented error +}; diff --git a/node_modules/argparse/lib/action/append.js b/node_modules/argparse/lib/action/append.js new file mode 100644 index 0000000..b5da0de --- /dev/null +++ b/node_modules/argparse/lib/action/append.js @@ -0,0 +1,53 @@ +/*:nodoc:* + * class ActionAppend + * + * This action stores a list, and appends each argument value to the list. + * This is useful to allow an option to be specified multiple times. + * This class inherided from [[Action]] + * + **/ + +'use strict'; + +var util = require('util'); + +var Action = require('../action'); + +// Constants +var c = require('../const'); + +/*:nodoc:* + * new ActionAppend(options) + * - options (object): options hash see [[Action.new]] + * + * Note: options.nargs should be optional for constants + * and more then zero for other + **/ +var ActionAppend = module.exports = function ActionAppend(options) { + options = options || {}; + if (this.nargs <= 0) { + throw new Error('nargs for append actions must be > 0; if arg ' + + 'strings are not supplying the value to append, ' + + 'the append const action may be more appropriate'); + } + if (!!this.constant && this.nargs !== c.OPTIONAL) { + throw new Error('nargs must be OPTIONAL to supply const'); + } + Action.call(this, options); +}; +util.inherits(ActionAppend, Action); + +/*:nodoc:* + * ActionAppend#call(parser, namespace, values, optionString) -> Void + * - parser (ArgumentParser): current parser + * - namespace (Namespace): namespace for output data + * - values (Array): parsed values + * - optionString (Array): input option string(not parsed) + * + * Call the action. Save result in namespace object + **/ +ActionAppend.prototype.call = function (parser, namespace, values) { + var items = (namespace[this.dest] || []).slice(); + items.push(values); + namespace.set(this.dest, items); +}; diff --git a/node_modules/argparse/lib/action/append/constant.js b/node_modules/argparse/lib/action/append/constant.js new file mode 100644 index 0000000..313f5d2 --- /dev/null +++ b/node_modules/argparse/lib/action/append/constant.js @@ -0,0 +1,47 @@ +/*:nodoc:* + * class ActionAppendConstant + * + * This stores a list, and appends the value specified by + * the const keyword argument to the list. + * (Note that the const keyword argument defaults to null.) + * The 'appendConst' action is typically useful when multiple + * arguments need to store constants to the same list. + * + * This class inherited from [[Action]] + **/ + +'use strict'; + +var util = require('util'); + +var Action = require('../../action'); + +/*:nodoc:* + * new ActionAppendConstant(options) + * - options (object): options hash see [[Action.new]] + * + **/ +var ActionAppendConstant = module.exports = function ActionAppendConstant(options) { + options = options || {}; + options.nargs = 0; + if (typeof options.constant === 'undefined') { + throw new Error('constant option is required for appendAction'); + } + Action.call(this, options); +}; +util.inherits(ActionAppendConstant, Action); + +/*:nodoc:* + * ActionAppendConstant#call(parser, namespace, values, optionString) -> Void + * - parser (ArgumentParser): current parser + * - namespace (Namespace): namespace for output data + * - values (Array): parsed values + * - optionString (Array): input option string(not parsed) + * + * Call the action. Save result in namespace object + **/ +ActionAppendConstant.prototype.call = function (parser, namespace) { + var items = [].concat(namespace[this.dest] || []); + items.push(this.constant); + namespace.set(this.dest, items); +}; diff --git a/node_modules/argparse/lib/action/count.js b/node_modules/argparse/lib/action/count.js new file mode 100644 index 0000000..d6a5899 --- /dev/null +++ b/node_modules/argparse/lib/action/count.js @@ -0,0 +1,40 @@ +/*:nodoc:* + * class ActionCount + * + * This counts the number of times a keyword argument occurs. + * For example, this is useful for increasing verbosity levels + * + * This class inherided from [[Action]] + * + **/ +'use strict'; + +var util = require('util'); + +var Action = require('../action'); + +/*:nodoc:* + * new ActionCount(options) + * - options (object): options hash see [[Action.new]] + * + **/ +var ActionCount = module.exports = function ActionCount(options) { + options = options || {}; + options.nargs = 0; + + Action.call(this, options); +}; +util.inherits(ActionCount, Action); + +/*:nodoc:* + * ActionCount#call(parser, namespace, values, optionString) -> Void + * - parser (ArgumentParser): current parser + * - namespace (Namespace): namespace for output data + * - values (Array): parsed values + * - optionString (Array): input option string(not parsed) + * + * Call the action. Save result in namespace object + **/ +ActionCount.prototype.call = function (parser, namespace) { + namespace.set(this.dest, (namespace[this.dest] || 0) + 1); +}; diff --git a/node_modules/argparse/lib/action/help.js b/node_modules/argparse/lib/action/help.js new file mode 100644 index 0000000..b40e05a --- /dev/null +++ b/node_modules/argparse/lib/action/help.js @@ -0,0 +1,47 @@ +/*:nodoc:* + * class ActionHelp + * + * Support action for printing help + * This class inherided from [[Action]] + **/ +'use strict'; + +var util = require('util'); + +var Action = require('../action'); + +// Constants +var c = require('../const'); + +/*:nodoc:* + * new ActionHelp(options) + * - options (object): options hash see [[Action.new]] + * + **/ +var ActionHelp = module.exports = function ActionHelp(options) { + options = options || {}; + if (options.defaultValue !== null) { + options.defaultValue = options.defaultValue; + } else { + options.defaultValue = c.SUPPRESS; + } + options.dest = (options.dest !== null ? options.dest : c.SUPPRESS); + options.nargs = 0; + Action.call(this, options); + +}; +util.inherits(ActionHelp, Action); + +/*:nodoc:* + * ActionHelp#call(parser, namespace, values, optionString) + * - parser (ArgumentParser): current parser + * - namespace (Namespace): namespace for output data + * - values (Array): parsed values + * - optionString (Array): input option string(not parsed) + * + * Print help and exit + **/ +ActionHelp.prototype.call = function (parser) { + parser.printHelp(); + parser.exit(); +}; diff --git a/node_modules/argparse/lib/action/store.js b/node_modules/argparse/lib/action/store.js new file mode 100644 index 0000000..283b860 --- /dev/null +++ b/node_modules/argparse/lib/action/store.js @@ -0,0 +1,50 @@ +/*:nodoc:* + * class ActionStore + * + * This action just stores the argument’s value. This is the default action. + * + * This class inherited from [[Action]] + * + **/ +'use strict'; + +var util = require('util'); + +var Action = require('../action'); + +// Constants +var c = require('../const'); + + +/*:nodoc:* + * new ActionStore(options) + * - options (object): options hash see [[Action.new]] + * + **/ +var ActionStore = module.exports = function ActionStore(options) { + options = options || {}; + if (this.nargs <= 0) { + throw new Error('nargs for store actions must be > 0; if you ' + + 'have nothing to store, actions such as store ' + + 'true or store const may be more appropriate'); + + } + if (typeof this.constant !== 'undefined' && this.nargs !== c.OPTIONAL) { + throw new Error('nargs must be OPTIONAL to supply const'); + } + Action.call(this, options); +}; +util.inherits(ActionStore, Action); + +/*:nodoc:* + * ActionStore#call(parser, namespace, values, optionString) -> Void + * - parser (ArgumentParser): current parser + * - namespace (Namespace): namespace for output data + * - values (Array): parsed values + * - optionString (Array): input option string(not parsed) + * + * Call the action. Save result in namespace object + **/ +ActionStore.prototype.call = function (parser, namespace, values) { + namespace.set(this.dest, values); +}; diff --git a/node_modules/argparse/lib/action/store/constant.js b/node_modules/argparse/lib/action/store/constant.js new file mode 100644 index 0000000..23caa89 --- /dev/null +++ b/node_modules/argparse/lib/action/store/constant.js @@ -0,0 +1,43 @@ +/*:nodoc:* + * class ActionStoreConstant + * + * This action stores the value specified by the const keyword argument. + * (Note that the const keyword argument defaults to the rather unhelpful null.) + * The 'store_const' action is most commonly used with optional + * arguments that specify some sort of flag. + * + * This class inherited from [[Action]] + **/ +'use strict'; + +var util = require('util'); + +var Action = require('../../action'); + +/*:nodoc:* + * new ActionStoreConstant(options) + * - options (object): options hash see [[Action.new]] + * + **/ +var ActionStoreConstant = module.exports = function ActionStoreConstant(options) { + options = options || {}; + options.nargs = 0; + if (typeof options.constant === 'undefined') { + throw new Error('constant option is required for storeAction'); + } + Action.call(this, options); +}; +util.inherits(ActionStoreConstant, Action); + +/*:nodoc:* + * ActionStoreConstant#call(parser, namespace, values, optionString) -> Void + * - parser (ArgumentParser): current parser + * - namespace (Namespace): namespace for output data + * - values (Array): parsed values + * - optionString (Array): input option string(not parsed) + * + * Call the action. Save result in namespace object + **/ +ActionStoreConstant.prototype.call = function (parser, namespace) { + namespace.set(this.dest, this.constant); +}; diff --git a/node_modules/argparse/lib/action/store/false.js b/node_modules/argparse/lib/action/store/false.js new file mode 100644 index 0000000..9924f46 --- /dev/null +++ b/node_modules/argparse/lib/action/store/false.js @@ -0,0 +1,27 @@ +/*:nodoc:* + * class ActionStoreFalse + * + * This action store the values False respectively. + * This is special cases of 'storeConst' + * + * This class inherited from [[Action]] + **/ + +'use strict'; + +var util = require('util'); + +var ActionStoreConstant = require('./constant'); + +/*:nodoc:* + * new ActionStoreFalse(options) + * - options (object): hash of options see [[Action.new]] + * + **/ +var ActionStoreFalse = module.exports = function ActionStoreFalse(options) { + options = options || {}; + options.constant = false; + options.defaultValue = options.defaultValue !== null ? options.defaultValue : true; + ActionStoreConstant.call(this, options); +}; +util.inherits(ActionStoreFalse, ActionStoreConstant); diff --git a/node_modules/argparse/lib/action/store/true.js b/node_modules/argparse/lib/action/store/true.js new file mode 100644 index 0000000..9e22f7d --- /dev/null +++ b/node_modules/argparse/lib/action/store/true.js @@ -0,0 +1,26 @@ +/*:nodoc:* + * class ActionStoreTrue + * + * This action store the values True respectively. + * This isspecial cases of 'storeConst' + * + * This class inherited from [[Action]] + **/ +'use strict'; + +var util = require('util'); + +var ActionStoreConstant = require('./constant'); + +/*:nodoc:* + * new ActionStoreTrue(options) + * - options (object): options hash see [[Action.new]] + * + **/ +var ActionStoreTrue = module.exports = function ActionStoreTrue(options) { + options = options || {}; + options.constant = true; + options.defaultValue = options.defaultValue !== null ? options.defaultValue : false; + ActionStoreConstant.call(this, options); +}; +util.inherits(ActionStoreTrue, ActionStoreConstant); diff --git a/node_modules/argparse/lib/action/subparsers.js b/node_modules/argparse/lib/action/subparsers.js new file mode 100644 index 0000000..99dfedd --- /dev/null +++ b/node_modules/argparse/lib/action/subparsers.js @@ -0,0 +1,149 @@ +/** internal + * class ActionSubparsers + * + * Support the creation of such sub-commands with the addSubparsers() + * + * This class inherited from [[Action]] + **/ +'use strict'; + +var util = require('util'); +var format = require('util').format; + + +var Action = require('../action'); + +// Constants +var c = require('../const'); + +// Errors +var argumentErrorHelper = require('../argument/error'); + + +/*:nodoc:* + * new ChoicesPseudoAction(name, help) + * + * Create pseudo action for correct help text + * + **/ +function ChoicesPseudoAction(name, help) { + var options = { + optionStrings: [], + dest: name, + help: help + }; + + Action.call(this, options); +} + +util.inherits(ChoicesPseudoAction, Action); + +/** + * new ActionSubparsers(options) + * - options (object): options hash see [[Action.new]] + * + **/ +function ActionSubparsers(options) { + options = options || {}; + options.dest = options.dest || c.SUPPRESS; + options.nargs = c.PARSER; + + this.debug = (options.debug === true); + + this._progPrefix = options.prog; + this._parserClass = options.parserClass; + this._nameParserMap = {}; + this._choicesActions = []; + + options.choices = this._nameParserMap; + Action.call(this, options); +} + +util.inherits(ActionSubparsers, Action); + +/*:nodoc:* + * ActionSubparsers#addParser(name, options) -> ArgumentParser + * - name (string): sub-command name + * - options (object): see [[ArgumentParser.new]] + * + * Note: + * addParser supports an additional aliases option, + * which allows multiple strings to refer to the same subparser. + * This example, like svn, aliases co as a shorthand for checkout + * + **/ +ActionSubparsers.prototype.addParser = function (name, options) { + var parser; + + var self = this; + + options = options || {}; + + options.debug = (this.debug === true); + + // set program from the existing prefix + if (!options.prog) { + options.prog = this._progPrefix + ' ' + name; + } + + var aliases = options.aliases || []; + + // create a pseudo-action to hold the choice help + if (!!options.help || typeof options.help === 'string') { + var help = options.help; + delete options.help; + + var choiceAction = new ChoicesPseudoAction(name, help); + this._choicesActions.push(choiceAction); + } + + // create the parser and add it to the map + parser = new this._parserClass(options); + this._nameParserMap[name] = parser; + + // make parser available under aliases also + aliases.forEach(function (alias) { + self._nameParserMap[alias] = parser; + }); + + return parser; +}; + +ActionSubparsers.prototype._getSubactions = function () { + return this._choicesActions; +}; + +/*:nodoc:* + * ActionSubparsers#call(parser, namespace, values, optionString) -> Void + * - parser (ArgumentParser): current parser + * - namespace (Namespace): namespace for output data + * - values (Array): parsed values + * - optionString (Array): input option string(not parsed) + * + * Call the action. Parse input aguments + **/ +ActionSubparsers.prototype.call = function (parser, namespace, values) { + var parserName = values[0]; + var argStrings = values.slice(1); + + // set the parser name if requested + if (this.dest !== c.SUPPRESS) { + namespace[this.dest] = parserName; + } + + // select the parser + if (this._nameParserMap[parserName]) { + parser = this._nameParserMap[parserName]; + } else { + throw argumentErrorHelper(format( + 'Unknown parser "%s" (choices: [%s]).', + parserName, + Object.keys(this._nameParserMap).join(', ') + )); + } + + // parse all the remaining options into the namespace + parser.parseArgs(argStrings, namespace); +}; + +module.exports = ActionSubparsers; diff --git a/node_modules/argparse/lib/action/version.js b/node_modules/argparse/lib/action/version.js new file mode 100644 index 0000000..8053328 --- /dev/null +++ b/node_modules/argparse/lib/action/version.js @@ -0,0 +1,47 @@ +/*:nodoc:* + * class ActionVersion + * + * Support action for printing program version + * This class inherited from [[Action]] + **/ +'use strict'; + +var util = require('util'); + +var Action = require('../action'); + +// +// Constants +// +var c = require('../const'); + +/*:nodoc:* + * new ActionVersion(options) + * - options (object): options hash see [[Action.new]] + * + **/ +var ActionVersion = module.exports = function ActionVersion(options) { + options = options || {}; + options.defaultValue = (options.defaultValue ? options.defaultValue : c.SUPPRESS); + options.dest = (options.dest || c.SUPPRESS); + options.nargs = 0; + this.version = options.version; + Action.call(this, options); +}; +util.inherits(ActionVersion, Action); + +/*:nodoc:* + * ActionVersion#call(parser, namespace, values, optionString) -> Void + * - parser (ArgumentParser): current parser + * - namespace (Namespace): namespace for output data + * - values (Array): parsed values + * - optionString (Array): input option string(not parsed) + * + * Print version and exit + **/ +ActionVersion.prototype.call = function (parser) { + var version = this.version || parser.version; + var formatter = parser._getFormatter(); + formatter.addText(version); + parser.exit(0, formatter.formatHelp()); +}; diff --git a/node_modules/argparse/lib/action_container.js b/node_modules/argparse/lib/action_container.js new file mode 100644 index 0000000..6f1237b --- /dev/null +++ b/node_modules/argparse/lib/action_container.js @@ -0,0 +1,482 @@ +/** internal + * class ActionContainer + * + * Action container. Parent for [[ArgumentParser]] and [[ArgumentGroup]] + **/ + +'use strict'; + +var format = require('util').format; + +// Constants +var c = require('./const'); + +var $$ = require('./utils'); + +//Actions +var ActionHelp = require('./action/help'); +var ActionAppend = require('./action/append'); +var ActionAppendConstant = require('./action/append/constant'); +var ActionCount = require('./action/count'); +var ActionStore = require('./action/store'); +var ActionStoreConstant = require('./action/store/constant'); +var ActionStoreTrue = require('./action/store/true'); +var ActionStoreFalse = require('./action/store/false'); +var ActionVersion = require('./action/version'); +var ActionSubparsers = require('./action/subparsers'); + +// Errors +var argumentErrorHelper = require('./argument/error'); + +/** + * new ActionContainer(options) + * + * Action container. Parent for [[ArgumentParser]] and [[ArgumentGroup]] + * + * ##### Options: + * + * - `description` -- A description of what the program does + * - `prefixChars` -- Characters that prefix optional arguments + * - `argumentDefault` -- The default value for all arguments + * - `conflictHandler` -- The conflict handler to use for duplicate arguments + **/ +var ActionContainer = module.exports = function ActionContainer(options) { + options = options || {}; + + this.description = options.description; + this.argumentDefault = options.argumentDefault; + this.prefixChars = options.prefixChars || ''; + this.conflictHandler = options.conflictHandler; + + // set up registries + this._registries = {}; + + // register actions + this.register('action', null, ActionStore); + this.register('action', 'store', ActionStore); + this.register('action', 'storeConst', ActionStoreConstant); + this.register('action', 'storeTrue', ActionStoreTrue); + this.register('action', 'storeFalse', ActionStoreFalse); + this.register('action', 'append', ActionAppend); + this.register('action', 'appendConst', ActionAppendConstant); + this.register('action', 'count', ActionCount); + this.register('action', 'help', ActionHelp); + this.register('action', 'version', ActionVersion); + this.register('action', 'parsers', ActionSubparsers); + + // raise an exception if the conflict handler is invalid + this._getHandler(); + + // action storage + this._actions = []; + this._optionStringActions = {}; + + // groups + this._actionGroups = []; + this._mutuallyExclusiveGroups = []; + + // defaults storage + this._defaults = {}; + + // determines whether an "option" looks like a negative number + // -1, -1.5 -5e+4 + this._regexpNegativeNumber = new RegExp('^[-]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?$'); + + // whether or not there are any optionals that look like negative + // numbers -- uses a list so it can be shared and edited + this._hasNegativeNumberOptionals = []; +}; + +// Groups must be required, then ActionContainer already defined +var ArgumentGroup = require('./argument/group'); +var MutuallyExclusiveGroup = require('./argument/exclusive'); + +// +// Registration methods +// + +/** + * ActionContainer#register(registryName, value, object) -> Void + * - registryName (String) : object type action|type + * - value (string) : keyword + * - object (Object|Function) : handler + * + * Register handlers + **/ +ActionContainer.prototype.register = function (registryName, value, object) { + this._registries[registryName] = this._registries[registryName] || {}; + this._registries[registryName][value] = object; +}; + +ActionContainer.prototype._registryGet = function (registryName, value, defaultValue) { + if (arguments.length < 3) { + defaultValue = null; + } + return this._registries[registryName][value] || defaultValue; +}; + +// +// Namespace default accessor methods +// + +/** + * ActionContainer#setDefaults(options) -> Void + * - options (object):hash of options see [[Action.new]] + * + * Set defaults + **/ +ActionContainer.prototype.setDefaults = function (options) { + options = options || {}; + for (var property in options) { + if ($$.has(options, property)) { + this._defaults[property] = options[property]; + } + } + + // if these defaults match any existing arguments, replace the previous + // default on the object with the new one + this._actions.forEach(function (action) { + if ($$.has(options, action.dest)) { + action.defaultValue = options[action.dest]; + } + }); +}; + +/** + * ActionContainer#getDefault(dest) -> Mixed + * - dest (string): action destination + * + * Return action default value + **/ +ActionContainer.prototype.getDefault = function (dest) { + var result = $$.has(this._defaults, dest) ? this._defaults[dest] : null; + + this._actions.forEach(function (action) { + if (action.dest === dest && $$.has(action, 'defaultValue')) { + result = action.defaultValue; + } + }); + + return result; +}; +// +// Adding argument actions +// + +/** + * ActionContainer#addArgument(args, options) -> Object + * - args (String|Array): argument key, or array of argument keys + * - options (Object): action objects see [[Action.new]] + * + * #### Examples + * - addArgument([ '-f', '--foo' ], { action: 'store', defaultValue: 1, ... }) + * - addArgument([ 'bar' ], { action: 'store', nargs: 1, ... }) + * - addArgument('--baz', { action: 'store', nargs: 1, ... }) + **/ +ActionContainer.prototype.addArgument = function (args, options) { + args = args; + options = options || {}; + + if (typeof args === 'string') { + args = [ args ]; + } + if (!Array.isArray(args)) { + throw new TypeError('addArgument first argument should be a string or an array'); + } + if (typeof options !== 'object' || Array.isArray(options)) { + throw new TypeError('addArgument second argument should be a hash'); + } + + // if no positional args are supplied or only one is supplied and + // it doesn't look like an option string, parse a positional argument + if (!args || args.length === 1 && this.prefixChars.indexOf(args[0][0]) < 0) { + if (args && !!options.dest) { + throw new Error('dest supplied twice for positional argument'); + } + options = this._getPositional(args, options); + + // otherwise, we're adding an optional argument + } else { + options = this._getOptional(args, options); + } + + // if no default was supplied, use the parser-level default + if (typeof options.defaultValue === 'undefined') { + var dest = options.dest; + if ($$.has(this._defaults, dest)) { + options.defaultValue = this._defaults[dest]; + } else if (typeof this.argumentDefault !== 'undefined') { + options.defaultValue = this.argumentDefault; + } + } + + // create the action object, and add it to the parser + var ActionClass = this._popActionClass(options); + if (typeof ActionClass !== 'function') { + throw new Error(format('Unknown action "%s".', ActionClass)); + } + var action = new ActionClass(options); + + // throw an error if the action type is not callable + var typeFunction = this._registryGet('type', action.type, action.type); + if (typeof typeFunction !== 'function') { + throw new Error(format('"%s" is not callable', typeFunction)); + } + + return this._addAction(action); +}; + +/** + * ActionContainer#addArgumentGroup(options) -> ArgumentGroup + * - options (Object): hash of options see [[ArgumentGroup.new]] + * + * Create new arguments groups + **/ +ActionContainer.prototype.addArgumentGroup = function (options) { + var group = new ArgumentGroup(this, options); + this._actionGroups.push(group); + return group; +}; + +/** + * ActionContainer#addMutuallyExclusiveGroup(options) -> ArgumentGroup + * - options (Object): {required: false} + * + * Create new mutual exclusive groups + **/ +ActionContainer.prototype.addMutuallyExclusiveGroup = function (options) { + var group = new MutuallyExclusiveGroup(this, options); + this._mutuallyExclusiveGroups.push(group); + return group; +}; + +ActionContainer.prototype._addAction = function (action) { + var self = this; + + // resolve any conflicts + this._checkConflict(action); + + // add to actions list + this._actions.push(action); + action.container = this; + + // index the action by any option strings it has + action.optionStrings.forEach(function (optionString) { + self._optionStringActions[optionString] = action; + }); + + // set the flag if any option strings look like negative numbers + action.optionStrings.forEach(function (optionString) { + if (optionString.match(self._regexpNegativeNumber)) { + if (!self._hasNegativeNumberOptionals.some(Boolean)) { + self._hasNegativeNumberOptionals.push(true); + } + } + }); + + // return the created action + return action; +}; + +ActionContainer.prototype._removeAction = function (action) { + var actionIndex = this._actions.indexOf(action); + if (actionIndex >= 0) { + this._actions.splice(actionIndex, 1); + } +}; + +ActionContainer.prototype._addContainerActions = function (container) { + // collect groups by titles + var titleGroupMap = {}; + this._actionGroups.forEach(function (group) { + if (titleGroupMap[group.title]) { + throw new Error(format('Cannot merge actions - two groups are named "%s".', group.title)); + } + titleGroupMap[group.title] = group; + }); + + // map each action to its group + var groupMap = {}; + function actionHash(action) { + // unique (hopefully?) string suitable as dictionary key + return action.getName(); + } + container._actionGroups.forEach(function (group) { + // if a group with the title exists, use that, otherwise + // create a new group matching the container's group + if (!titleGroupMap[group.title]) { + titleGroupMap[group.title] = this.addArgumentGroup({ + title: group.title, + description: group.description + }); + } + + // map the actions to their new group + group._groupActions.forEach(function (action) { + groupMap[actionHash(action)] = titleGroupMap[group.title]; + }); + }, this); + + // add container's mutually exclusive groups + // NOTE: if add_mutually_exclusive_group ever gains title= and + // description= then this code will need to be expanded as above + var mutexGroup; + container._mutuallyExclusiveGroups.forEach(function (group) { + mutexGroup = this.addMutuallyExclusiveGroup({ + required: group.required + }); + // map the actions to their new mutex group + group._groupActions.forEach(function (action) { + groupMap[actionHash(action)] = mutexGroup; + }); + }, this); // forEach takes a 'this' argument + + // add all actions to this container or their group + container._actions.forEach(function (action) { + var key = actionHash(action); + if (groupMap[key]) { + groupMap[key]._addAction(action); + } else { + this._addAction(action); + } + }); +}; + +ActionContainer.prototype._getPositional = function (dest, options) { + if (Array.isArray(dest)) { + dest = dest[0]; + } + // make sure required is not specified + if (options.required) { + throw new Error('"required" is an invalid argument for positionals.'); + } + + // mark positional arguments as required if at least one is + // always required + if (options.nargs !== c.OPTIONAL && options.nargs !== c.ZERO_OR_MORE) { + options.required = true; + } + if (options.nargs === c.ZERO_OR_MORE && typeof options.defaultValue === 'undefined') { + options.required = true; + } + + // return the keyword arguments with no option strings + options.dest = dest; + options.optionStrings = []; + return options; +}; + +ActionContainer.prototype._getOptional = function (args, options) { + var prefixChars = this.prefixChars; + var optionStrings = []; + var optionStringsLong = []; + + // determine short and long option strings + args.forEach(function (optionString) { + // error on strings that don't start with an appropriate prefix + if (prefixChars.indexOf(optionString[0]) < 0) { + throw new Error(format('Invalid option string "%s": must start with a "%s".', + optionString, + prefixChars + )); + } + + // strings starting with two prefix characters are long options + optionStrings.push(optionString); + if (optionString.length > 1 && prefixChars.indexOf(optionString[1]) >= 0) { + optionStringsLong.push(optionString); + } + }); + + // infer dest, '--foo-bar' -> 'foo_bar' and '-x' -> 'x' + var dest = options.dest || null; + delete options.dest; + + if (!dest) { + var optionStringDest = optionStringsLong.length ? optionStringsLong[0] : optionStrings[0]; + dest = $$.trimChars(optionStringDest, this.prefixChars); + + if (dest.length === 0) { + throw new Error( + format('dest= is required for options like "%s"', optionStrings.join(', ')) + ); + } + dest = dest.replace(/-/g, '_'); + } + + // return the updated keyword arguments + options.dest = dest; + options.optionStrings = optionStrings; + + return options; +}; + +ActionContainer.prototype._popActionClass = function (options, defaultValue) { + defaultValue = defaultValue || null; + + var action = (options.action || defaultValue); + delete options.action; + + var actionClass = this._registryGet('action', action, action); + return actionClass; +}; + +ActionContainer.prototype._getHandler = function () { + var handlerString = this.conflictHandler; + var handlerFuncName = '_handleConflict' + $$.capitalize(handlerString); + var func = this[handlerFuncName]; + if (typeof func === 'undefined') { + var msg = 'invalid conflict resolution value: ' + handlerString; + throw new Error(msg); + } else { + return func; + } +}; + +ActionContainer.prototype._checkConflict = function (action) { + var optionStringActions = this._optionStringActions; + var conflictOptionals = []; + + // find all options that conflict with this option + // collect pairs, the string, and an existing action that it conflicts with + action.optionStrings.forEach(function (optionString) { + var conflOptional = optionStringActions[optionString]; + if (typeof conflOptional !== 'undefined') { + conflictOptionals.push([ optionString, conflOptional ]); + } + }); + + if (conflictOptionals.length > 0) { + var conflictHandler = this._getHandler(); + conflictHandler.call(this, action, conflictOptionals); + } +}; + +ActionContainer.prototype._handleConflictError = function (action, conflOptionals) { + var conflicts = conflOptionals.map(function (pair) { return pair[0]; }); + conflicts = conflicts.join(', '); + throw argumentErrorHelper( + action, + format('Conflicting option string(s): %s', conflicts) + ); +}; + +ActionContainer.prototype._handleConflictResolve = function (action, conflOptionals) { + // remove all conflicting options + var self = this; + conflOptionals.forEach(function (pair) { + var optionString = pair[0]; + var conflictingAction = pair[1]; + // remove the conflicting option string + var i = conflictingAction.optionStrings.indexOf(optionString); + if (i >= 0) { + conflictingAction.optionStrings.splice(i, 1); + } + delete self._optionStringActions[optionString]; + // if the option now has no option string, remove it from the + // container holding it + if (conflictingAction.optionStrings.length === 0) { + conflictingAction.container._removeAction(conflictingAction); + } + }); +}; diff --git a/node_modules/argparse/lib/argparse.js b/node_modules/argparse/lib/argparse.js new file mode 100644 index 0000000..f2a2c51 --- /dev/null +++ b/node_modules/argparse/lib/argparse.js @@ -0,0 +1,14 @@ +'use strict'; + +module.exports.ArgumentParser = require('./argument_parser.js'); +module.exports.Namespace = require('./namespace'); +module.exports.Action = require('./action'); +module.exports.HelpFormatter = require('./help/formatter.js'); +module.exports.Const = require('./const.js'); + +module.exports.ArgumentDefaultsHelpFormatter = + require('./help/added_formatters.js').ArgumentDefaultsHelpFormatter; +module.exports.RawDescriptionHelpFormatter = + require('./help/added_formatters.js').RawDescriptionHelpFormatter; +module.exports.RawTextHelpFormatter = + require('./help/added_formatters.js').RawTextHelpFormatter; diff --git a/node_modules/argparse/lib/argument/error.js b/node_modules/argparse/lib/argument/error.js new file mode 100644 index 0000000..c8a02a0 --- /dev/null +++ b/node_modules/argparse/lib/argument/error.js @@ -0,0 +1,50 @@ +'use strict'; + + +var format = require('util').format; + + +var ERR_CODE = 'ARGError'; + +/*:nodoc:* + * argumentError(argument, message) -> TypeError + * - argument (Object): action with broken argument + * - message (String): error message + * + * Error format helper. An error from creating or using an argument + * (optional or positional). The string value of this exception + * is the message, augmented with information + * about the argument that caused it. + * + * #####Example + * + * var argumentErrorHelper = require('./argument/error'); + * if (conflictOptionals.length > 0) { + * throw argumentErrorHelper( + * action, + * format('Conflicting option string(s): %s', conflictOptionals.join(', ')) + * ); + * } + * + **/ +module.exports = function (argument, message) { + var argumentName = null; + var errMessage; + var err; + + if (argument.getName) { + argumentName = argument.getName(); + } else { + argumentName = '' + argument; + } + + if (!argumentName) { + errMessage = message; + } else { + errMessage = format('argument "%s": %s', argumentName, message); + } + + err = new TypeError(errMessage); + err.code = ERR_CODE; + return err; +}; diff --git a/node_modules/argparse/lib/argument/exclusive.js b/node_modules/argparse/lib/argument/exclusive.js new file mode 100644 index 0000000..8287e00 --- /dev/null +++ b/node_modules/argparse/lib/argument/exclusive.js @@ -0,0 +1,54 @@ +/** internal + * class MutuallyExclusiveGroup + * + * Group arguments. + * By default, ArgumentParser groups command-line arguments + * into “positional arguments†and “optional arguments†+ * when displaying help messages. When there is a better + * conceptual grouping of arguments than this default one, + * appropriate groups can be created using the addArgumentGroup() method + * + * This class inherited from [[ArgumentContainer]] + **/ +'use strict'; + +var util = require('util'); + +var ArgumentGroup = require('./group'); + +/** + * new MutuallyExclusiveGroup(container, options) + * - container (object): main container + * - options (object): options.required -> true/false + * + * `required` could be an argument itself, but making it a property of + * the options argument is more consistent with the JS adaptation of the Python) + **/ +var MutuallyExclusiveGroup = module.exports = function MutuallyExclusiveGroup(container, options) { + var required; + options = options || {}; + required = options.required || false; + ArgumentGroup.call(this, container); + this.required = required; + +}; +util.inherits(MutuallyExclusiveGroup, ArgumentGroup); + + +MutuallyExclusiveGroup.prototype._addAction = function (action) { + var msg; + if (action.required) { + msg = 'mutually exclusive arguments must be optional'; + throw new Error(msg); + } + action = this._container._addAction(action); + this._groupActions.push(action); + return action; +}; + + +MutuallyExclusiveGroup.prototype._removeAction = function (action) { + this._container._removeAction(action); + this._groupActions.remove(action); +}; + diff --git a/node_modules/argparse/lib/argument/group.js b/node_modules/argparse/lib/argument/group.js new file mode 100644 index 0000000..58b271f --- /dev/null +++ b/node_modules/argparse/lib/argument/group.js @@ -0,0 +1,75 @@ +/** internal + * class ArgumentGroup + * + * Group arguments. + * By default, ArgumentParser groups command-line arguments + * into “positional arguments†and “optional arguments†+ * when displaying help messages. When there is a better + * conceptual grouping of arguments than this default one, + * appropriate groups can be created using the addArgumentGroup() method + * + * This class inherited from [[ArgumentContainer]] + **/ +'use strict'; + +var util = require('util'); + +var ActionContainer = require('../action_container'); + + +/** + * new ArgumentGroup(container, options) + * - container (object): main container + * - options (object): hash of group options + * + * #### options + * - **prefixChars** group name prefix + * - **argumentDefault** default argument value + * - **title** group title + * - **description** group description + * + **/ +var ArgumentGroup = module.exports = function ArgumentGroup(container, options) { + + options = options || {}; + + // add any missing keyword arguments by checking the container + options.conflictHandler = (options.conflictHandler || container.conflictHandler); + options.prefixChars = (options.prefixChars || container.prefixChars); + options.argumentDefault = (options.argumentDefault || container.argumentDefault); + + ActionContainer.call(this, options); + + // group attributes + this.title = options.title; + this._groupActions = []; + + // share most attributes with the container + this._container = container; + this._registries = container._registries; + this._actions = container._actions; + this._optionStringActions = container._optionStringActions; + this._defaults = container._defaults; + this._hasNegativeNumberOptionals = container._hasNegativeNumberOptionals; + this._mutuallyExclusiveGroups = container._mutuallyExclusiveGroups; +}; +util.inherits(ArgumentGroup, ActionContainer); + + +ArgumentGroup.prototype._addAction = function (action) { + // Parent add action + action = ActionContainer.prototype._addAction.call(this, action); + this._groupActions.push(action); + return action; +}; + + +ArgumentGroup.prototype._removeAction = function (action) { + // Parent remove action + ActionContainer.prototype._removeAction.call(this, action); + var actionIndex = this._groupActions.indexOf(action); + if (actionIndex >= 0) { + this._groupActions.splice(actionIndex, 1); + } +}; + diff --git a/node_modules/argparse/lib/argument_parser.js b/node_modules/argparse/lib/argument_parser.js new file mode 100644 index 0000000..bd9a59a --- /dev/null +++ b/node_modules/argparse/lib/argument_parser.js @@ -0,0 +1,1161 @@ +/** + * class ArgumentParser + * + * Object for parsing command line strings into js objects. + * + * Inherited from [[ActionContainer]] + **/ +'use strict'; + +var util = require('util'); +var format = require('util').format; +var Path = require('path'); +var sprintf = require('sprintf-js').sprintf; + +// Constants +var c = require('./const'); + +var $$ = require('./utils'); + +var ActionContainer = require('./action_container'); + +// Errors +var argumentErrorHelper = require('./argument/error'); + +var HelpFormatter = require('./help/formatter'); + +var Namespace = require('./namespace'); + + +/** + * new ArgumentParser(options) + * + * Create a new ArgumentParser object. + * + * ##### Options: + * - `prog` The name of the program (default: Path.basename(process.argv[1])) + * - `usage` A usage message (default: auto-generated from arguments) + * - `description` A description of what the program does + * - `epilog` Text following the argument descriptions + * - `parents` Parsers whose arguments should be copied into this one + * - `formatterClass` HelpFormatter class for printing help messages + * - `prefixChars` Characters that prefix optional arguments + * - `fromfilePrefixChars` Characters that prefix files containing additional arguments + * - `argumentDefault` The default value for all arguments + * - `addHelp` Add a -h/-help option + * - `conflictHandler` Specifies how to handle conflicting argument names + * - `debug` Enable debug mode. Argument errors throw exception in + * debug mode and process.exit in normal. Used for development and + * testing (default: false) + * + * See also [original guide][1] + * + * [1]:http://docs.python.org/dev/library/argparse.html#argumentparser-objects + **/ +function ArgumentParser(options) { + if (!(this instanceof ArgumentParser)) { + return new ArgumentParser(options); + } + var self = this; + options = options || {}; + + options.description = (options.description || null); + options.argumentDefault = (options.argumentDefault || null); + options.prefixChars = (options.prefixChars || '-'); + options.conflictHandler = (options.conflictHandler || 'error'); + ActionContainer.call(this, options); + + options.addHelp = typeof options.addHelp === 'undefined' || !!options.addHelp; + options.parents = options.parents || []; + // default program name + options.prog = (options.prog || Path.basename(process.argv[1])); + this.prog = options.prog; + this.usage = options.usage; + this.epilog = options.epilog; + this.version = options.version; + + this.debug = (options.debug === true); + + this.formatterClass = (options.formatterClass || HelpFormatter); + this.fromfilePrefixChars = options.fromfilePrefixChars || null; + this._positionals = this.addArgumentGroup({ title: 'Positional arguments' }); + this._optionals = this.addArgumentGroup({ title: 'Optional arguments' }); + this._subparsers = null; + + // register types + function FUNCTION_IDENTITY(o) { + return o; + } + this.register('type', 'auto', FUNCTION_IDENTITY); + this.register('type', null, FUNCTION_IDENTITY); + this.register('type', 'int', function (x) { + var result = parseInt(x, 10); + if (isNaN(result)) { + throw new Error(x + ' is not a valid integer.'); + } + return result; + }); + this.register('type', 'float', function (x) { + var result = parseFloat(x); + if (isNaN(result)) { + throw new Error(x + ' is not a valid float.'); + } + return result; + }); + this.register('type', 'string', function (x) { + return '' + x; + }); + + // add help and version arguments if necessary + var defaultPrefix = (this.prefixChars.indexOf('-') > -1) ? '-' : this.prefixChars[0]; + if (options.addHelp) { + this.addArgument( + [ defaultPrefix + 'h', defaultPrefix + defaultPrefix + 'help' ], + { + action: 'help', + defaultValue: c.SUPPRESS, + help: 'Show this help message and exit.' + } + ); + } + if (typeof this.version !== 'undefined') { + this.addArgument( + [ defaultPrefix + 'v', defaultPrefix + defaultPrefix + 'version' ], + { + action: 'version', + version: this.version, + defaultValue: c.SUPPRESS, + help: "Show program's version number and exit." + } + ); + } + + // add parent arguments and defaults + options.parents.forEach(function (parent) { + self._addContainerActions(parent); + if (typeof parent._defaults !== 'undefined') { + for (var defaultKey in parent._defaults) { + if (parent._defaults.hasOwnProperty(defaultKey)) { + self._defaults[defaultKey] = parent._defaults[defaultKey]; + } + } + } + }); +} + +util.inherits(ArgumentParser, ActionContainer); + +/** + * ArgumentParser#addSubparsers(options) -> [[ActionSubparsers]] + * - options (object): hash of options see [[ActionSubparsers.new]] + * + * See also [subcommands][1] + * + * [1]:http://docs.python.org/dev/library/argparse.html#sub-commands + **/ +ArgumentParser.prototype.addSubparsers = function (options) { + if (this._subparsers) { + this.error('Cannot have multiple subparser arguments.'); + } + + options = options || {}; + options.debug = (this.debug === true); + options.optionStrings = []; + options.parserClass = (options.parserClass || ArgumentParser); + + + if (!!options.title || !!options.description) { + + this._subparsers = this.addArgumentGroup({ + title: (options.title || 'subcommands'), + description: options.description + }); + delete options.title; + delete options.description; + + } else { + this._subparsers = this._positionals; + } + + // prog defaults to the usage message of this parser, skipping + // optional arguments and with no "usage:" prefix + if (!options.prog) { + var formatter = this._getFormatter(); + var positionals = this._getPositionalActions(); + var groups = this._mutuallyExclusiveGroups; + formatter.addUsage(this.usage, positionals, groups, ''); + options.prog = formatter.formatHelp().trim(); + } + + // create the parsers action and add it to the positionals list + var ParsersClass = this._popActionClass(options, 'parsers'); + var action = new ParsersClass(options); + this._subparsers._addAction(action); + + // return the created parsers action + return action; +}; + +ArgumentParser.prototype._addAction = function (action) { + if (action.isOptional()) { + this._optionals._addAction(action); + } else { + this._positionals._addAction(action); + } + return action; +}; + +ArgumentParser.prototype._getOptionalActions = function () { + return this._actions.filter(function (action) { + return action.isOptional(); + }); +}; + +ArgumentParser.prototype._getPositionalActions = function () { + return this._actions.filter(function (action) { + return action.isPositional(); + }); +}; + + +/** + * ArgumentParser#parseArgs(args, namespace) -> Namespace|Object + * - args (array): input elements + * - namespace (Namespace|Object): result object + * + * Parsed args and throws error if some arguments are not recognized + * + * See also [original guide][1] + * + * [1]:http://docs.python.org/dev/library/argparse.html#the-parse-args-method + **/ +ArgumentParser.prototype.parseArgs = function (args, namespace) { + var argv; + var result = this.parseKnownArgs(args, namespace); + + args = result[0]; + argv = result[1]; + if (argv && argv.length > 0) { + this.error( + format('Unrecognized arguments: %s.', argv.join(' ')) + ); + } + return args; +}; + +/** + * ArgumentParser#parseKnownArgs(args, namespace) -> array + * - args (array): input options + * - namespace (Namespace|Object): result object + * + * Parse known arguments and return tuple of result object + * and unknown args + * + * See also [original guide][1] + * + * [1]:http://docs.python.org/dev/library/argparse.html#partial-parsing + **/ +ArgumentParser.prototype.parseKnownArgs = function (args, namespace) { + var self = this; + + // args default to the system args + args = args || process.argv.slice(2); + + // default Namespace built from parser defaults + namespace = namespace || new Namespace(); + + self._actions.forEach(function (action) { + if (action.dest !== c.SUPPRESS) { + if (!$$.has(namespace, action.dest)) { + if (action.defaultValue !== c.SUPPRESS) { + var defaultValue = action.defaultValue; + if (typeof action.defaultValue === 'string') { + defaultValue = self._getValue(action, defaultValue); + } + namespace[action.dest] = defaultValue; + } + } + } + }); + + Object.keys(self._defaults).forEach(function (dest) { + namespace[dest] = self._defaults[dest]; + }); + + // parse the arguments and exit if there are any errors + try { + var res = this._parseKnownArgs(args, namespace); + + namespace = res[0]; + args = res[1]; + if ($$.has(namespace, c._UNRECOGNIZED_ARGS_ATTR)) { + args = $$.arrayUnion(args, namespace[c._UNRECOGNIZED_ARGS_ATTR]); + delete namespace[c._UNRECOGNIZED_ARGS_ATTR]; + } + return [ namespace, args ]; + } catch (e) { + this.error(e); + } +}; + +ArgumentParser.prototype._parseKnownArgs = function (argStrings, namespace) { + var self = this; + + var extras = []; + + // replace arg strings that are file references + if (this.fromfilePrefixChars !== null) { + argStrings = this._readArgsFromFiles(argStrings); + } + // map all mutually exclusive arguments to the other arguments + // they can't occur with + // Python has 'conflicts = action_conflicts.setdefault(mutex_action, [])' + // though I can't conceive of a way in which an action could be a member + // of two different mutually exclusive groups. + + function actionHash(action) { + // some sort of hashable key for this action + // action itself cannot be a key in actionConflicts + // I think getName() (join of optionStrings) is unique enough + return action.getName(); + } + + var conflicts, key; + var actionConflicts = {}; + + this._mutuallyExclusiveGroups.forEach(function (mutexGroup) { + mutexGroup._groupActions.forEach(function (mutexAction, i, groupActions) { + key = actionHash(mutexAction); + if (!$$.has(actionConflicts, key)) { + actionConflicts[key] = []; + } + conflicts = actionConflicts[key]; + conflicts.push.apply(conflicts, groupActions.slice(0, i)); + conflicts.push.apply(conflicts, groupActions.slice(i + 1)); + }); + }); + + // find all option indices, and determine the arg_string_pattern + // which has an 'O' if there is an option at an index, + // an 'A' if there is an argument, or a '-' if there is a '--' + var optionStringIndices = {}; + + var argStringPatternParts = []; + + argStrings.forEach(function (argString, argStringIndex) { + if (argString === '--') { + argStringPatternParts.push('-'); + while (argStringIndex < argStrings.length) { + argStringPatternParts.push('A'); + argStringIndex++; + } + } else { + // otherwise, add the arg to the arg strings + // and note the index if it was an option + var pattern; + var optionTuple = self._parseOptional(argString); + if (!optionTuple) { + pattern = 'A'; + } else { + optionStringIndices[argStringIndex] = optionTuple; + pattern = 'O'; + } + argStringPatternParts.push(pattern); + } + }); + var argStringsPattern = argStringPatternParts.join(''); + + var seenActions = []; + var seenNonDefaultActions = []; + + + function takeAction(action, argumentStrings, optionString) { + seenActions.push(action); + var argumentValues = self._getValues(action, argumentStrings); + + // error if this argument is not allowed with other previously + // seen arguments, assuming that actions that use the default + // value don't really count as "present" + if (argumentValues !== action.defaultValue) { + seenNonDefaultActions.push(action); + if (actionConflicts[actionHash(action)]) { + actionConflicts[actionHash(action)].forEach(function (actionConflict) { + if (seenNonDefaultActions.indexOf(actionConflict) >= 0) { + throw argumentErrorHelper( + action, + format('Not allowed with argument "%s".', actionConflict.getName()) + ); + } + }); + } + } + + if (argumentValues !== c.SUPPRESS) { + action.call(self, namespace, argumentValues, optionString); + } + } + + function consumeOptional(startIndex) { + // get the optional identified at this index + var optionTuple = optionStringIndices[startIndex]; + var action = optionTuple[0]; + var optionString = optionTuple[1]; + var explicitArg = optionTuple[2]; + + // identify additional optionals in the same arg string + // (e.g. -xyz is the same as -x -y -z if no args are required) + var actionTuples = []; + + var args, argCount, start, stop; + + for (;;) { + if (!action) { + extras.push(argStrings[startIndex]); + return startIndex + 1; + } + if (explicitArg) { + argCount = self._matchArgument(action, 'A'); + + // if the action is a single-dash option and takes no + // arguments, try to parse more single-dash options out + // of the tail of the option string + var chars = self.prefixChars; + if (argCount === 0 && chars.indexOf(optionString[1]) < 0) { + actionTuples.push([ action, [], optionString ]); + optionString = optionString[0] + explicitArg[0]; + var newExplicitArg = explicitArg.slice(1) || null; + var optionalsMap = self._optionStringActions; + + if (Object.keys(optionalsMap).indexOf(optionString) >= 0) { + action = optionalsMap[optionString]; + explicitArg = newExplicitArg; + } else { + throw argumentErrorHelper(action, sprintf('ignored explicit argument %r', explicitArg)); + } + } else if (argCount === 1) { + // if the action expect exactly one argument, we've + // successfully matched the option; exit the loop + stop = startIndex + 1; + args = [ explicitArg ]; + actionTuples.push([ action, args, optionString ]); + break; + } else { + // error if a double-dash option did not use the + // explicit argument + throw argumentErrorHelper(action, sprintf('ignored explicit argument %r', explicitArg)); + } + } else { + // if there is no explicit argument, try to match the + // optional's string arguments with the following strings + // if successful, exit the loop + + start = startIndex + 1; + var selectedPatterns = argStringsPattern.substr(start); + + argCount = self._matchArgument(action, selectedPatterns); + stop = start + argCount; + + + args = argStrings.slice(start, stop); + + actionTuples.push([ action, args, optionString ]); + break; + } + + } + + // add the Optional to the list and return the index at which + // the Optional's string args stopped + if (actionTuples.length < 1) { + throw new Error('length should be > 0'); + } + for (var i = 0; i < actionTuples.length; i++) { + takeAction.apply(self, actionTuples[i]); + } + return stop; + } + + // the list of Positionals left to be parsed; this is modified + // by consume_positionals() + var positionals = self._getPositionalActions(); + + function consumePositionals(startIndex) { + // match as many Positionals as possible + var selectedPattern = argStringsPattern.substr(startIndex); + var argCounts = self._matchArgumentsPartial(positionals, selectedPattern); + + // slice off the appropriate arg strings for each Positional + // and add the Positional and its args to the list + for (var i = 0; i < positionals.length; i++) { + var action = positionals[i]; + var argCount = argCounts[i]; + if (typeof argCount === 'undefined') { + continue; + } + var args = argStrings.slice(startIndex, startIndex + argCount); + + startIndex += argCount; + takeAction(action, args); + } + + // slice off the Positionals that we just parsed and return the + // index at which the Positionals' string args stopped + positionals = positionals.slice(argCounts.length); + return startIndex; + } + + // consume Positionals and Optionals alternately, until we have + // passed the last option string + var startIndex = 0; + var position; + + var maxOptionStringIndex = -1; + + Object.keys(optionStringIndices).forEach(function (position) { + maxOptionStringIndex = Math.max(maxOptionStringIndex, parseInt(position, 10)); + }); + + var positionalsEndIndex, nextOptionStringIndex; + + while (startIndex <= maxOptionStringIndex) { + // consume any Positionals preceding the next option + nextOptionStringIndex = null; + for (position in optionStringIndices) { + if (!optionStringIndices.hasOwnProperty(position)) { continue; } + + position = parseInt(position, 10); + if (position >= startIndex) { + if (nextOptionStringIndex !== null) { + nextOptionStringIndex = Math.min(nextOptionStringIndex, position); + } else { + nextOptionStringIndex = position; + } + } + } + + if (startIndex !== nextOptionStringIndex) { + positionalsEndIndex = consumePositionals(startIndex); + // only try to parse the next optional if we didn't consume + // the option string during the positionals parsing + if (positionalsEndIndex > startIndex) { + startIndex = positionalsEndIndex; + continue; + } else { + startIndex = positionalsEndIndex; + } + } + + // if we consumed all the positionals we could and we're not + // at the index of an option string, there were extra arguments + if (!optionStringIndices[startIndex]) { + var strings = argStrings.slice(startIndex, nextOptionStringIndex); + extras = extras.concat(strings); + startIndex = nextOptionStringIndex; + } + // consume the next optional and any arguments for it + startIndex = consumeOptional(startIndex); + } + + // consume any positionals following the last Optional + var stopIndex = consumePositionals(startIndex); + + // if we didn't consume all the argument strings, there were extras + extras = extras.concat(argStrings.slice(stopIndex)); + + // if we didn't use all the Positional objects, there were too few + // arg strings supplied. + if (positionals.length > 0) { + self.error('too few arguments'); + } + + // make sure all required actions were present + self._actions.forEach(function (action) { + if (action.required) { + if (seenActions.indexOf(action) < 0) { + self.error(format('Argument "%s" is required', action.getName())); + } + } + }); + + // make sure all required groups have one option present + var actionUsed = false; + self._mutuallyExclusiveGroups.forEach(function (group) { + if (group.required) { + actionUsed = group._groupActions.some(function (action) { + return seenNonDefaultActions.indexOf(action) !== -1; + }); + + // if no actions were used, report the error + if (!actionUsed) { + var names = []; + group._groupActions.forEach(function (action) { + if (action.help !== c.SUPPRESS) { + names.push(action.getName()); + } + }); + names = names.join(' '); + var msg = 'one of the arguments ' + names + ' is required'; + self.error(msg); + } + } + }); + + // return the updated namespace and the extra arguments + return [ namespace, extras ]; +}; + +ArgumentParser.prototype._readArgsFromFiles = function (argStrings) { + // expand arguments referencing files + var self = this; + var fs = require('fs'); + var newArgStrings = []; + argStrings.forEach(function (argString) { + if (self.fromfilePrefixChars.indexOf(argString[0]) < 0) { + // for regular arguments, just add them back into the list + newArgStrings.push(argString); + } else { + // replace arguments referencing files with the file content + try { + var argstrs = []; + var filename = argString.slice(1); + var content = fs.readFileSync(filename, 'utf8'); + content = content.trim().split('\n'); + content.forEach(function (argLine) { + self.convertArgLineToArgs(argLine).forEach(function (arg) { + argstrs.push(arg); + }); + argstrs = self._readArgsFromFiles(argstrs); + }); + newArgStrings.push.apply(newArgStrings, argstrs); + } catch (error) { + return self.error(error.message); + } + } + }); + return newArgStrings; +}; + +ArgumentParser.prototype.convertArgLineToArgs = function (argLine) { + return [ argLine ]; +}; + +ArgumentParser.prototype._matchArgument = function (action, regexpArgStrings) { + + // match the pattern for this action to the arg strings + var regexpNargs = new RegExp('^' + this._getNargsPattern(action)); + var matches = regexpArgStrings.match(regexpNargs); + var message; + + // throw an exception if we weren't able to find a match + if (!matches) { + switch (action.nargs) { + /*eslint-disable no-undefined*/ + case undefined: + case null: + message = 'Expected one argument.'; + break; + case c.OPTIONAL: + message = 'Expected at most one argument.'; + break; + case c.ONE_OR_MORE: + message = 'Expected at least one argument.'; + break; + default: + message = 'Expected %s argument(s)'; + } + + throw argumentErrorHelper( + action, + format(message, action.nargs) + ); + } + // return the number of arguments matched + return matches[1].length; +}; + +ArgumentParser.prototype._matchArgumentsPartial = function (actions, regexpArgStrings) { + // progressively shorten the actions list by slicing off the + // final actions until we find a match + var self = this; + var result = []; + var actionSlice, pattern, matches; + var i, j; + + function getLength(string) { + return string.length; + } + + for (i = actions.length; i > 0; i--) { + pattern = ''; + actionSlice = actions.slice(0, i); + for (j = 0; j < actionSlice.length; j++) { + pattern += self._getNargsPattern(actionSlice[j]); + } + + pattern = new RegExp('^' + pattern); + matches = regexpArgStrings.match(pattern); + + if (matches && matches.length > 0) { + // need only groups + matches = matches.splice(1); + result = result.concat(matches.map(getLength)); + break; + } + } + + // return the list of arg string counts + return result; +}; + +ArgumentParser.prototype._parseOptional = function (argString) { + var action, optionString, argExplicit, optionTuples; + + // if it's an empty string, it was meant to be a positional + if (!argString) { + return null; + } + + // if it doesn't start with a prefix, it was meant to be positional + if (this.prefixChars.indexOf(argString[0]) < 0) { + return null; + } + + // if the option string is present in the parser, return the action + if (this._optionStringActions[argString]) { + return [ this._optionStringActions[argString], argString, null ]; + } + + // if it's just a single character, it was meant to be positional + if (argString.length === 1) { + return null; + } + + // if the option string before the "=" is present, return the action + if (argString.indexOf('=') >= 0) { + optionString = argString.split('=', 1)[0]; + argExplicit = argString.slice(optionString.length + 1); + + if (this._optionStringActions[optionString]) { + action = this._optionStringActions[optionString]; + return [ action, optionString, argExplicit ]; + } + } + + // search through all possible prefixes of the option string + // and all actions in the parser for possible interpretations + optionTuples = this._getOptionTuples(argString); + + // if multiple actions match, the option string was ambiguous + if (optionTuples.length > 1) { + var optionStrings = optionTuples.map(function (optionTuple) { + return optionTuple[1]; + }); + this.error(format( + 'Ambiguous option: "%s" could match %s.', + argString, optionStrings.join(', ') + )); + // if exactly one action matched, this segmentation is good, + // so return the parsed action + } else if (optionTuples.length === 1) { + return optionTuples[0]; + } + + // if it was not found as an option, but it looks like a negative + // number, it was meant to be positional + // unless there are negative-number-like options + if (argString.match(this._regexpNegativeNumber)) { + if (!this._hasNegativeNumberOptionals.some(Boolean)) { + return null; + } + } + // if it contains a space, it was meant to be a positional + if (argString.search(' ') >= 0) { + return null; + } + + // it was meant to be an optional but there is no such option + // in this parser (though it might be a valid option in a subparser) + return [ null, argString, null ]; +}; + +ArgumentParser.prototype._getOptionTuples = function (optionString) { + var result = []; + var chars = this.prefixChars; + var optionPrefix; + var argExplicit; + var action; + var actionOptionString; + + // option strings starting with two prefix characters are only split at + // the '=' + if (chars.indexOf(optionString[0]) >= 0 && chars.indexOf(optionString[1]) >= 0) { + if (optionString.indexOf('=') >= 0) { + var optionStringSplit = optionString.split('=', 1); + + optionPrefix = optionStringSplit[0]; + argExplicit = optionStringSplit[1]; + } else { + optionPrefix = optionString; + argExplicit = null; + } + + for (actionOptionString in this._optionStringActions) { + if (actionOptionString.substr(0, optionPrefix.length) === optionPrefix) { + action = this._optionStringActions[actionOptionString]; + result.push([ action, actionOptionString, argExplicit ]); + } + } + + // single character options can be concatenated with their arguments + // but multiple character options always have to have their argument + // separate + } else if (chars.indexOf(optionString[0]) >= 0 && chars.indexOf(optionString[1]) < 0) { + optionPrefix = optionString; + argExplicit = null; + var optionPrefixShort = optionString.substr(0, 2); + var argExplicitShort = optionString.substr(2); + + for (actionOptionString in this._optionStringActions) { + if (!$$.has(this._optionStringActions, actionOptionString)) continue; + + action = this._optionStringActions[actionOptionString]; + if (actionOptionString === optionPrefixShort) { + result.push([ action, actionOptionString, argExplicitShort ]); + } else if (actionOptionString.substr(0, optionPrefix.length) === optionPrefix) { + result.push([ action, actionOptionString, argExplicit ]); + } + } + + // shouldn't ever get here + } else { + throw new Error(format('Unexpected option string: %s.', optionString)); + } + // return the collected option tuples + return result; +}; + +ArgumentParser.prototype._getNargsPattern = function (action) { + // in all examples below, we have to allow for '--' args + // which are represented as '-' in the pattern + var regexpNargs; + + switch (action.nargs) { + // the default (null) is assumed to be a single argument + case undefined: + case null: + regexpNargs = '(-*A-*)'; + break; + // allow zero or more arguments + case c.OPTIONAL: + regexpNargs = '(-*A?-*)'; + break; + // allow zero or more arguments + case c.ZERO_OR_MORE: + regexpNargs = '(-*[A-]*)'; + break; + // allow one or more arguments + case c.ONE_OR_MORE: + regexpNargs = '(-*A[A-]*)'; + break; + // allow any number of options or arguments + case c.REMAINDER: + regexpNargs = '([-AO]*)'; + break; + // allow one argument followed by any number of options or arguments + case c.PARSER: + regexpNargs = '(-*A[-AO]*)'; + break; + // all others should be integers + default: + regexpNargs = '(-*' + $$.repeat('-*A', action.nargs) + '-*)'; + } + + // if this is an optional action, -- is not allowed + if (action.isOptional()) { + regexpNargs = regexpNargs.replace(/-\*/g, ''); + regexpNargs = regexpNargs.replace(/-/g, ''); + } + + // return the pattern + return regexpNargs; +}; + +// +// Value conversion methods +// + +ArgumentParser.prototype._getValues = function (action, argStrings) { + var self = this; + + // for everything but PARSER args, strip out '--' + if (action.nargs !== c.PARSER && action.nargs !== c.REMAINDER) { + argStrings = argStrings.filter(function (arrayElement) { + return arrayElement !== '--'; + }); + } + + var value, argString; + + // optional argument produces a default when not present + if (argStrings.length === 0 && action.nargs === c.OPTIONAL) { + + value = (action.isOptional()) ? action.constant : action.defaultValue; + + if (typeof (value) === 'string') { + value = this._getValue(action, value); + this._checkValue(action, value); + } + + // when nargs='*' on a positional, if there were no command-line + // args, use the default if it is anything other than None + } else if (argStrings.length === 0 && action.nargs === c.ZERO_OR_MORE && + action.optionStrings.length === 0) { + + value = (action.defaultValue || argStrings); + this._checkValue(action, value); + + // single argument or optional argument produces a single value + } else if (argStrings.length === 1 && + (!action.nargs || action.nargs === c.OPTIONAL)) { + + argString = argStrings[0]; + value = this._getValue(action, argString); + this._checkValue(action, value); + + // REMAINDER arguments convert all values, checking none + } else if (action.nargs === c.REMAINDER) { + value = argStrings.map(function (v) { + return self._getValue(action, v); + }); + + // PARSER arguments convert all values, but check only the first + } else if (action.nargs === c.PARSER) { + value = argStrings.map(function (v) { + return self._getValue(action, v); + }); + this._checkValue(action, value[0]); + + // all other types of nargs produce a list + } else { + value = argStrings.map(function (v) { + return self._getValue(action, v); + }); + value.forEach(function (v) { + self._checkValue(action, v); + }); + } + + // return the converted value + return value; +}; + +ArgumentParser.prototype._getValue = function (action, argString) { + var result; + + var typeFunction = this._registryGet('type', action.type, action.type); + if (typeof typeFunction !== 'function') { + var message = format('%s is not callable', typeFunction); + throw argumentErrorHelper(action, message); + } + + // convert the value to the appropriate type + try { + result = typeFunction(argString); + + // ArgumentTypeErrors indicate errors + // If action.type is not a registered string, it is a function + // Try to deduce its name for inclusion in the error message + // Failing that, include the error message it raised. + } catch (e) { + var name = null; + if (typeof action.type === 'string') { + name = action.type; + } else { + name = action.type.name || action.type.displayName || ''; + } + var msg = format('Invalid %s value: %s', name, argString); + if (name === '') { msg += '\n' + e.message; } + throw argumentErrorHelper(action, msg); + } + // return the converted value + return result; +}; + +ArgumentParser.prototype._checkValue = function (action, value) { + // converted value must be one of the choices (if specified) + var choices = action.choices; + if (choices) { + // choise for argument can by array or string + if ((typeof choices === 'string' || Array.isArray(choices)) && + choices.indexOf(value) !== -1) { + return; + } + // choise for subparsers can by only hash + if (typeof choices === 'object' && !Array.isArray(choices) && choices[value]) { + return; + } + + if (typeof choices === 'string') { + choices = choices.split('').join(', '); + } else if (Array.isArray(choices)) { + choices = choices.join(', '); + } else { + choices = Object.keys(choices).join(', '); + } + var message = format('Invalid choice: %s (choose from [%s])', value, choices); + throw argumentErrorHelper(action, message); + } +}; + +// +// Help formatting methods +// + +/** + * ArgumentParser#formatUsage -> string + * + * Return usage string + * + * See also [original guide][1] + * + * [1]:http://docs.python.org/dev/library/argparse.html#printing-help + **/ +ArgumentParser.prototype.formatUsage = function () { + var formatter = this._getFormatter(); + formatter.addUsage(this.usage, this._actions, this._mutuallyExclusiveGroups); + return formatter.formatHelp(); +}; + +/** + * ArgumentParser#formatHelp -> string + * + * Return help + * + * See also [original guide][1] + * + * [1]:http://docs.python.org/dev/library/argparse.html#printing-help + **/ +ArgumentParser.prototype.formatHelp = function () { + var formatter = this._getFormatter(); + + // usage + formatter.addUsage(this.usage, this._actions, this._mutuallyExclusiveGroups); + + // description + formatter.addText(this.description); + + // positionals, optionals and user-defined groups + this._actionGroups.forEach(function (actionGroup) { + formatter.startSection(actionGroup.title); + formatter.addText(actionGroup.description); + formatter.addArguments(actionGroup._groupActions); + formatter.endSection(); + }); + + // epilog + formatter.addText(this.epilog); + + // determine help from format above + return formatter.formatHelp(); +}; + +ArgumentParser.prototype._getFormatter = function () { + var FormatterClass = this.formatterClass; + var formatter = new FormatterClass({ prog: this.prog }); + return formatter; +}; + +// +// Print functions +// + +/** + * ArgumentParser#printUsage() -> Void + * + * Print usage + * + * See also [original guide][1] + * + * [1]:http://docs.python.org/dev/library/argparse.html#printing-help + **/ +ArgumentParser.prototype.printUsage = function () { + this._printMessage(this.formatUsage()); +}; + +/** + * ArgumentParser#printHelp() -> Void + * + * Print help + * + * See also [original guide][1] + * + * [1]:http://docs.python.org/dev/library/argparse.html#printing-help + **/ +ArgumentParser.prototype.printHelp = function () { + this._printMessage(this.formatHelp()); +}; + +ArgumentParser.prototype._printMessage = function (message, stream) { + if (!stream) { + stream = process.stdout; + } + if (message) { + stream.write('' + message); + } +}; + +// +// Exit functions +// + +/** + * ArgumentParser#exit(status=0, message) -> Void + * - status (int): exit status + * - message (string): message + * + * Print message in stderr/stdout and exit program + **/ +ArgumentParser.prototype.exit = function (status, message) { + if (message) { + if (status === 0) { + this._printMessage(message); + } else { + this._printMessage(message, process.stderr); + } + } + + process.exit(status); +}; + +/** + * ArgumentParser#error(message) -> Void + * - err (Error|string): message + * + * Error method Prints a usage message incorporating the message to stderr and + * exits. If you override this in a subclass, + * it should not return -- it should + * either exit or throw an exception. + * + **/ +ArgumentParser.prototype.error = function (err) { + var message; + if (err instanceof Error) { + if (this.debug === true) { + throw err; + } + message = err.message; + } else { + message = err; + } + var msg = format('%s: error: %s', this.prog, message) + c.EOL; + + if (this.debug === true) { + throw new Error(msg); + } + + this.printUsage(process.stderr); + + return this.exit(2, msg); +}; + +module.exports = ArgumentParser; diff --git a/node_modules/argparse/lib/const.js b/node_modules/argparse/lib/const.js new file mode 100644 index 0000000..b1fd4ce --- /dev/null +++ b/node_modules/argparse/lib/const.js @@ -0,0 +1,21 @@ +// +// Constants +// + +'use strict'; + +module.exports.EOL = '\n'; + +module.exports.SUPPRESS = '==SUPPRESS=='; + +module.exports.OPTIONAL = '?'; + +module.exports.ZERO_OR_MORE = '*'; + +module.exports.ONE_OR_MORE = '+'; + +module.exports.PARSER = 'A...'; + +module.exports.REMAINDER = '...'; + +module.exports._UNRECOGNIZED_ARGS_ATTR = '_unrecognized_args'; diff --git a/node_modules/argparse/lib/help/added_formatters.js b/node_modules/argparse/lib/help/added_formatters.js new file mode 100644 index 0000000..f8e4299 --- /dev/null +++ b/node_modules/argparse/lib/help/added_formatters.js @@ -0,0 +1,87 @@ +'use strict'; + +var util = require('util'); + +// Constants +var c = require('../const'); + +var $$ = require('../utils'); +var HelpFormatter = require('./formatter.js'); + +/** + * new RawDescriptionHelpFormatter(options) + * new ArgumentParser({formatterClass: argparse.RawDescriptionHelpFormatter, ...}) + * + * Help message formatter which adds default values to argument help. + * + * Only the name of this class is considered a public API. All the methods + * provided by the class are considered an implementation detail. + **/ + +function ArgumentDefaultsHelpFormatter(options) { + HelpFormatter.call(this, options); +} + +util.inherits(ArgumentDefaultsHelpFormatter, HelpFormatter); + +ArgumentDefaultsHelpFormatter.prototype._getHelpString = function (action) { + var help = action.help; + if (action.help.indexOf('%(defaultValue)s') === -1) { + if (action.defaultValue !== c.SUPPRESS) { + var defaulting_nargs = [ c.OPTIONAL, c.ZERO_OR_MORE ]; + if (action.isOptional() || (defaulting_nargs.indexOf(action.nargs) >= 0)) { + help += ' (default: %(defaultValue)s)'; + } + } + } + return help; +}; + +module.exports.ArgumentDefaultsHelpFormatter = ArgumentDefaultsHelpFormatter; + +/** + * new RawDescriptionHelpFormatter(options) + * new ArgumentParser({formatterClass: argparse.RawDescriptionHelpFormatter, ...}) + * + * Help message formatter which retains any formatting in descriptions. + * + * Only the name of this class is considered a public API. All the methods + * provided by the class are considered an implementation detail. + **/ + +function RawDescriptionHelpFormatter(options) { + HelpFormatter.call(this, options); +} + +util.inherits(RawDescriptionHelpFormatter, HelpFormatter); + +RawDescriptionHelpFormatter.prototype._fillText = function (text, width, indent) { + var lines = text.split('\n'); + lines = lines.map(function (line) { + return $$.trimEnd(indent + line); + }); + return lines.join('\n'); +}; +module.exports.RawDescriptionHelpFormatter = RawDescriptionHelpFormatter; + +/** + * new RawTextHelpFormatter(options) + * new ArgumentParser({formatterClass: argparse.RawTextHelpFormatter, ...}) + * + * Help message formatter which retains formatting of all help text. + * + * Only the name of this class is considered a public API. All the methods + * provided by the class are considered an implementation detail. + **/ + +function RawTextHelpFormatter(options) { + RawDescriptionHelpFormatter.call(this, options); +} + +util.inherits(RawTextHelpFormatter, RawDescriptionHelpFormatter); + +RawTextHelpFormatter.prototype._splitLines = function (text) { + return text.split('\n'); +}; + +module.exports.RawTextHelpFormatter = RawTextHelpFormatter; diff --git a/node_modules/argparse/lib/help/formatter.js b/node_modules/argparse/lib/help/formatter.js new file mode 100644 index 0000000..29036c1 --- /dev/null +++ b/node_modules/argparse/lib/help/formatter.js @@ -0,0 +1,795 @@ +/** + * class HelpFormatter + * + * Formatter for generating usage messages and argument help strings. Only the + * name of this class is considered a public API. All the methods provided by + * the class are considered an implementation detail. + * + * Do not call in your code, use this class only for inherits your own forvatter + * + * ToDo add [additonal formatters][1] + * + * [1]:http://docs.python.org/dev/library/argparse.html#formatter-class + **/ +'use strict'; + +var sprintf = require('sprintf-js').sprintf; + +// Constants +var c = require('../const'); + +var $$ = require('../utils'); + + +/*:nodoc:* internal + * new Support(parent, heding) + * - parent (object): parent section + * - heading (string): header string + * + **/ +function Section(parent, heading) { + this._parent = parent; + this._heading = heading; + this._items = []; +} + +/*:nodoc:* internal + * Section#addItem(callback) -> Void + * - callback (array): tuple with function and args + * + * Add function for single element + **/ +Section.prototype.addItem = function (callback) { + this._items.push(callback); +}; + +/*:nodoc:* internal + * Section#formatHelp(formatter) -> string + * - formatter (HelpFormatter): current formatter + * + * Form help section string + * + **/ +Section.prototype.formatHelp = function (formatter) { + var itemHelp, heading; + + // format the indented section + if (this._parent) { + formatter._indent(); + } + + itemHelp = this._items.map(function (item) { + var obj, func, args; + + obj = formatter; + func = item[0]; + args = item[1]; + return func.apply(obj, args); + }); + itemHelp = formatter._joinParts(itemHelp); + + if (this._parent) { + formatter._dedent(); + } + + // return nothing if the section was empty + if (!itemHelp) { + return ''; + } + + // add the heading if the section was non-empty + heading = ''; + if (this._heading && this._heading !== c.SUPPRESS) { + var currentIndent = formatter.currentIndent; + heading = $$.repeat(' ', currentIndent) + this._heading + ':' + c.EOL; + } + + // join the section-initialize newline, the heading and the help + return formatter._joinParts([ c.EOL, heading, itemHelp, c.EOL ]); +}; + +/** + * new HelpFormatter(options) + * + * #### Options: + * - `prog`: program name + * - `indentIncriment`: indent step, default value 2 + * - `maxHelpPosition`: max help position, default value = 24 + * - `width`: line width + * + **/ +var HelpFormatter = module.exports = function HelpFormatter(options) { + options = options || {}; + + this._prog = options.prog; + + this._maxHelpPosition = options.maxHelpPosition || 24; + this._width = (options.width || ((process.env.COLUMNS || 80) - 2)); + + this._currentIndent = 0; + this._indentIncriment = options.indentIncriment || 2; + this._level = 0; + this._actionMaxLength = 0; + + this._rootSection = new Section(null); + this._currentSection = this._rootSection; + + this._whitespaceMatcher = new RegExp('\\s+', 'g'); + this._longBreakMatcher = new RegExp(c.EOL + c.EOL + c.EOL + '+', 'g'); +}; + +HelpFormatter.prototype._indent = function () { + this._currentIndent += this._indentIncriment; + this._level += 1; +}; + +HelpFormatter.prototype._dedent = function () { + this._currentIndent -= this._indentIncriment; + this._level -= 1; + if (this._currentIndent < 0) { + throw new Error('Indent decreased below 0.'); + } +}; + +HelpFormatter.prototype._addItem = function (func, args) { + this._currentSection.addItem([ func, args ]); +}; + +// +// Message building methods +// + +/** + * HelpFormatter#startSection(heading) -> Void + * - heading (string): header string + * + * Start new help section + * + * See alse [code example][1] + * + * ##### Example + * + * formatter.startSection(actionGroup.title); + * formatter.addText(actionGroup.description); + * formatter.addArguments(actionGroup._groupActions); + * formatter.endSection(); + * + **/ +HelpFormatter.prototype.startSection = function (heading) { + this._indent(); + var section = new Section(this._currentSection, heading); + var func = section.formatHelp.bind(section); + this._addItem(func, [ this ]); + this._currentSection = section; +}; + +/** + * HelpFormatter#endSection -> Void + * + * End help section + * + * ##### Example + * + * formatter.startSection(actionGroup.title); + * formatter.addText(actionGroup.description); + * formatter.addArguments(actionGroup._groupActions); + * formatter.endSection(); + **/ +HelpFormatter.prototype.endSection = function () { + this._currentSection = this._currentSection._parent; + this._dedent(); +}; + +/** + * HelpFormatter#addText(text) -> Void + * - text (string): plain text + * + * Add plain text into current section + * + * ##### Example + * + * formatter.startSection(actionGroup.title); + * formatter.addText(actionGroup.description); + * formatter.addArguments(actionGroup._groupActions); + * formatter.endSection(); + * + **/ +HelpFormatter.prototype.addText = function (text) { + if (text && text !== c.SUPPRESS) { + this._addItem(this._formatText, [ text ]); + } +}; + +/** + * HelpFormatter#addUsage(usage, actions, groups, prefix) -> Void + * - usage (string): usage text + * - actions (array): actions list + * - groups (array): groups list + * - prefix (string): usage prefix + * + * Add usage data into current section + * + * ##### Example + * + * formatter.addUsage(this.usage, this._actions, []); + * return formatter.formatHelp(); + * + **/ +HelpFormatter.prototype.addUsage = function (usage, actions, groups, prefix) { + if (usage !== c.SUPPRESS) { + this._addItem(this._formatUsage, [ usage, actions, groups, prefix ]); + } +}; + +/** + * HelpFormatter#addArgument(action) -> Void + * - action (object): action + * + * Add argument into current section + * + * Single variant of [[HelpFormatter#addArguments]] + **/ +HelpFormatter.prototype.addArgument = function (action) { + if (action.help !== c.SUPPRESS) { + var self = this; + + // find all invocations + var invocations = [ this._formatActionInvocation(action) ]; + var invocationLength = invocations[0].length; + + var actionLength; + + if (action._getSubactions) { + this._indent(); + action._getSubactions().forEach(function (subaction) { + + var invocationNew = self._formatActionInvocation(subaction); + invocations.push(invocationNew); + invocationLength = Math.max(invocationLength, invocationNew.length); + + }); + this._dedent(); + } + + // update the maximum item length + actionLength = invocationLength + this._currentIndent; + this._actionMaxLength = Math.max(this._actionMaxLength, actionLength); + + // add the item to the list + this._addItem(this._formatAction, [ action ]); + } +}; + +/** + * HelpFormatter#addArguments(actions) -> Void + * - actions (array): actions list + * + * Mass add arguments into current section + * + * ##### Example + * + * formatter.startSection(actionGroup.title); + * formatter.addText(actionGroup.description); + * formatter.addArguments(actionGroup._groupActions); + * formatter.endSection(); + * + **/ +HelpFormatter.prototype.addArguments = function (actions) { + var self = this; + actions.forEach(function (action) { + self.addArgument(action); + }); +}; + +// +// Help-formatting methods +// + +/** + * HelpFormatter#formatHelp -> string + * + * Format help + * + * ##### Example + * + * formatter.addText(this.epilog); + * return formatter.formatHelp(); + * + **/ +HelpFormatter.prototype.formatHelp = function () { + var help = this._rootSection.formatHelp(this); + if (help) { + help = help.replace(this._longBreakMatcher, c.EOL + c.EOL); + help = $$.trimChars(help, c.EOL) + c.EOL; + } + return help; +}; + +HelpFormatter.prototype._joinParts = function (partStrings) { + return partStrings.filter(function (part) { + return (part && part !== c.SUPPRESS); + }).join(''); +}; + +HelpFormatter.prototype._formatUsage = function (usage, actions, groups, prefix) { + if (!prefix && typeof prefix !== 'string') { + prefix = 'usage: '; + } + + actions = actions || []; + groups = groups || []; + + + // if usage is specified, use that + if (usage) { + usage = sprintf(usage, { prog: this._prog }); + + // if no optionals or positionals are available, usage is just prog + } else if (!usage && actions.length === 0) { + usage = this._prog; + + // if optionals and positionals are available, calculate usage + } else if (!usage) { + var prog = this._prog; + var optionals = []; + var positionals = []; + var actionUsage; + var textWidth; + + // split optionals from positionals + actions.forEach(function (action) { + if (action.isOptional()) { + optionals.push(action); + } else { + positionals.push(action); + } + }); + + // build full usage string + actionUsage = this._formatActionsUsage([].concat(optionals, positionals), groups); + usage = [ prog, actionUsage ].join(' '); + + // wrap the usage parts if it's too long + textWidth = this._width - this._currentIndent; + if ((prefix.length + usage.length) > textWidth) { + + // break usage into wrappable parts + var regexpPart = new RegExp('\\(.*?\\)+|\\[.*?\\]+|\\S+', 'g'); + var optionalUsage = this._formatActionsUsage(optionals, groups); + var positionalUsage = this._formatActionsUsage(positionals, groups); + + + var optionalParts = optionalUsage.match(regexpPart); + var positionalParts = positionalUsage.match(regexpPart) || []; + + if (optionalParts.join(' ') !== optionalUsage) { + throw new Error('assert "optionalParts.join(\' \') === optionalUsage"'); + } + if (positionalParts.join(' ') !== positionalUsage) { + throw new Error('assert "positionalParts.join(\' \') === positionalUsage"'); + } + + // helper for wrapping lines + /*eslint-disable func-style*/ // node 0.10 compat + var _getLines = function (parts, indent, prefix) { + var lines = []; + var line = []; + + var lineLength = prefix ? prefix.length - 1 : indent.length - 1; + + parts.forEach(function (part) { + if (lineLength + 1 + part.length > textWidth) { + lines.push(indent + line.join(' ')); + line = []; + lineLength = indent.length - 1; + } + line.push(part); + lineLength += part.length + 1; + }); + + if (line) { + lines.push(indent + line.join(' ')); + } + if (prefix) { + lines[0] = lines[0].substr(indent.length); + } + return lines; + }; + + var lines, indent, parts; + // if prog is short, follow it with optionals or positionals + if (prefix.length + prog.length <= 0.75 * textWidth) { + indent = $$.repeat(' ', (prefix.length + prog.length + 1)); + if (optionalParts) { + lines = [].concat( + _getLines([ prog ].concat(optionalParts), indent, prefix), + _getLines(positionalParts, indent) + ); + } else if (positionalParts) { + lines = _getLines([ prog ].concat(positionalParts), indent, prefix); + } else { + lines = [ prog ]; + } + + // if prog is long, put it on its own line + } else { + indent = $$.repeat(' ', prefix.length); + parts = optionalParts.concat(positionalParts); + lines = _getLines(parts, indent); + if (lines.length > 1) { + lines = [].concat( + _getLines(optionalParts, indent), + _getLines(positionalParts, indent) + ); + } + lines = [ prog ].concat(lines); + } + // join lines into usage + usage = lines.join(c.EOL); + } + } + + // prefix with 'usage:' + return prefix + usage + c.EOL + c.EOL; +}; + +HelpFormatter.prototype._formatActionsUsage = function (actions, groups) { + // find group indices and identify actions in groups + var groupActions = []; + var inserts = []; + var self = this; + + groups.forEach(function (group) { + var end; + var i; + + var start = actions.indexOf(group._groupActions[0]); + if (start >= 0) { + end = start + group._groupActions.length; + + //if (actions.slice(start, end) === group._groupActions) { + if ($$.arrayEqual(actions.slice(start, end), group._groupActions)) { + group._groupActions.forEach(function (action) { + groupActions.push(action); + }); + + if (!group.required) { + if (inserts[start]) { + inserts[start] += ' ['; + } else { + inserts[start] = '['; + } + inserts[end] = ']'; + } else { + if (inserts[start]) { + inserts[start] += ' ('; + } else { + inserts[start] = '('; + } + inserts[end] = ')'; + } + for (i = start + 1; i < end; i += 1) { + inserts[i] = '|'; + } + } + } + }); + + // collect all actions format strings + var parts = []; + + actions.forEach(function (action, actionIndex) { + var part; + var optionString; + var argsDefault; + var argsString; + + // suppressed arguments are marked with None + // remove | separators for suppressed arguments + if (action.help === c.SUPPRESS) { + parts.push(null); + if (inserts[actionIndex] === '|') { + inserts.splice(actionIndex, actionIndex); + } else if (inserts[actionIndex + 1] === '|') { + inserts.splice(actionIndex + 1, actionIndex + 1); + } + + // produce all arg strings + } else if (!action.isOptional()) { + part = self._formatArgs(action, action.dest); + + // if it's in a group, strip the outer [] + if (groupActions.indexOf(action) >= 0) { + if (part[0] === '[' && part[part.length - 1] === ']') { + part = part.slice(1, -1); + } + } + // add the action string to the list + parts.push(part); + + // produce the first way to invoke the option in brackets + } else { + optionString = action.optionStrings[0]; + + // if the Optional doesn't take a value, format is: -s or --long + if (action.nargs === 0) { + part = '' + optionString; + + // if the Optional takes a value, format is: -s ARGS or --long ARGS + } else { + argsDefault = action.dest.toUpperCase(); + argsString = self._formatArgs(action, argsDefault); + part = optionString + ' ' + argsString; + } + // make it look optional if it's not required or in a group + if (!action.required && groupActions.indexOf(action) < 0) { + part = '[' + part + ']'; + } + // add the action string to the list + parts.push(part); + } + }); + + // insert things at the necessary indices + for (var i = inserts.length - 1; i >= 0; --i) { + if (inserts[i] !== null) { + parts.splice(i, 0, inserts[i]); + } + } + + // join all the action items with spaces + var text = parts.filter(function (part) { + return !!part; + }).join(' '); + + // clean up separators for mutually exclusive groups + text = text.replace(/([\[(]) /g, '$1'); // remove spaces + text = text.replace(/ ([\])])/g, '$1'); + text = text.replace(/\[ *\]/g, ''); // remove empty groups + text = text.replace(/\( *\)/g, ''); + text = text.replace(/\(([^|]*)\)/g, '$1'); // remove () from single action groups + + text = text.trim(); + + // return the text + return text; +}; + +HelpFormatter.prototype._formatText = function (text) { + text = sprintf(text, { prog: this._prog }); + var textWidth = this._width - this._currentIndent; + var indentIncriment = $$.repeat(' ', this._currentIndent); + return this._fillText(text, textWidth, indentIncriment) + c.EOL + c.EOL; +}; + +HelpFormatter.prototype._formatAction = function (action) { + var self = this; + + var helpText; + var helpLines; + var parts; + var indentFirst; + + // determine the required width and the entry label + var helpPosition = Math.min(this._actionMaxLength + 2, this._maxHelpPosition); + var helpWidth = this._width - helpPosition; + var actionWidth = helpPosition - this._currentIndent - 2; + var actionHeader = this._formatActionInvocation(action); + + // no help; start on same line and add a final newline + if (!action.help) { + actionHeader = $$.repeat(' ', this._currentIndent) + actionHeader + c.EOL; + + // short action name; start on the same line and pad two spaces + } else if (actionHeader.length <= actionWidth) { + actionHeader = $$.repeat(' ', this._currentIndent) + + actionHeader + + ' ' + + $$.repeat(' ', actionWidth - actionHeader.length); + indentFirst = 0; + + // long action name; start on the next line + } else { + actionHeader = $$.repeat(' ', this._currentIndent) + actionHeader + c.EOL; + indentFirst = helpPosition; + } + + // collect the pieces of the action help + parts = [ actionHeader ]; + + // if there was help for the action, add lines of help text + if (action.help) { + helpText = this._expandHelp(action); + helpLines = this._splitLines(helpText, helpWidth); + parts.push($$.repeat(' ', indentFirst) + helpLines[0] + c.EOL); + helpLines.slice(1).forEach(function (line) { + parts.push($$.repeat(' ', helpPosition) + line + c.EOL); + }); + + // or add a newline if the description doesn't end with one + } else if (actionHeader.charAt(actionHeader.length - 1) !== c.EOL) { + parts.push(c.EOL); + } + // if there are any sub-actions, add their help as well + if (action._getSubactions) { + this._indent(); + action._getSubactions().forEach(function (subaction) { + parts.push(self._formatAction(subaction)); + }); + this._dedent(); + } + // return a single string + return this._joinParts(parts); +}; + +HelpFormatter.prototype._formatActionInvocation = function (action) { + if (!action.isOptional()) { + var format_func = this._metavarFormatter(action, action.dest); + var metavars = format_func(1); + return metavars[0]; + } + + var parts = []; + var argsDefault; + var argsString; + + // if the Optional doesn't take a value, format is: -s, --long + if (action.nargs === 0) { + parts = parts.concat(action.optionStrings); + + // if the Optional takes a value, format is: -s ARGS, --long ARGS + } else { + argsDefault = action.dest.toUpperCase(); + argsString = this._formatArgs(action, argsDefault); + action.optionStrings.forEach(function (optionString) { + parts.push(optionString + ' ' + argsString); + }); + } + return parts.join(', '); +}; + +HelpFormatter.prototype._metavarFormatter = function (action, metavarDefault) { + var result; + + if (action.metavar || action.metavar === '') { + result = action.metavar; + } else if (action.choices) { + var choices = action.choices; + + if (typeof choices === 'string') { + choices = choices.split('').join(', '); + } else if (Array.isArray(choices)) { + choices = choices.join(','); + } else { + choices = Object.keys(choices).join(','); + } + result = '{' + choices + '}'; + } else { + result = metavarDefault; + } + + return function (size) { + if (Array.isArray(result)) { + return result; + } + + var metavars = []; + for (var i = 0; i < size; i += 1) { + metavars.push(result); + } + return metavars; + }; +}; + +HelpFormatter.prototype._formatArgs = function (action, metavarDefault) { + var result; + var metavars; + + var buildMetavar = this._metavarFormatter(action, metavarDefault); + + switch (action.nargs) { + /*eslint-disable no-undefined*/ + case undefined: + case null: + metavars = buildMetavar(1); + result = '' + metavars[0]; + break; + case c.OPTIONAL: + metavars = buildMetavar(1); + result = '[' + metavars[0] + ']'; + break; + case c.ZERO_OR_MORE: + metavars = buildMetavar(2); + result = '[' + metavars[0] + ' [' + metavars[1] + ' ...]]'; + break; + case c.ONE_OR_MORE: + metavars = buildMetavar(2); + result = '' + metavars[0] + ' [' + metavars[1] + ' ...]'; + break; + case c.REMAINDER: + result = '...'; + break; + case c.PARSER: + metavars = buildMetavar(1); + result = metavars[0] + ' ...'; + break; + default: + metavars = buildMetavar(action.nargs); + result = metavars.join(' '); + } + return result; +}; + +HelpFormatter.prototype._expandHelp = function (action) { + var params = { prog: this._prog }; + + Object.keys(action).forEach(function (actionProperty) { + var actionValue = action[actionProperty]; + + if (actionValue !== c.SUPPRESS) { + params[actionProperty] = actionValue; + } + }); + + if (params.choices) { + if (typeof params.choices === 'string') { + params.choices = params.choices.split('').join(', '); + } else if (Array.isArray(params.choices)) { + params.choices = params.choices.join(', '); + } else { + params.choices = Object.keys(params.choices).join(', '); + } + } + + return sprintf(this._getHelpString(action), params); +}; + +HelpFormatter.prototype._splitLines = function (text, width) { + var lines = []; + var delimiters = [ ' ', '.', ',', '!', '?' ]; + var re = new RegExp('[' + delimiters.join('') + '][^' + delimiters.join('') + ']*$'); + + text = text.replace(/[\n\|\t]/g, ' '); + + text = text.trim(); + text = text.replace(this._whitespaceMatcher, ' '); + + // Wraps the single paragraph in text (a string) so every line + // is at most width characters long. + text.split(c.EOL).forEach(function (line) { + if (width >= line.length) { + lines.push(line); + return; + } + + var wrapStart = 0; + var wrapEnd = width; + var delimiterIndex = 0; + while (wrapEnd <= line.length) { + if (wrapEnd !== line.length && delimiters.indexOf(line[wrapEnd] < -1)) { + delimiterIndex = (re.exec(line.substring(wrapStart, wrapEnd)) || {}).index; + wrapEnd = wrapStart + delimiterIndex + 1; + } + lines.push(line.substring(wrapStart, wrapEnd)); + wrapStart = wrapEnd; + wrapEnd += width; + } + if (wrapStart < line.length) { + lines.push(line.substring(wrapStart, wrapEnd)); + } + }); + + return lines; +}; + +HelpFormatter.prototype._fillText = function (text, width, indent) { + var lines = this._splitLines(text, width); + lines = lines.map(function (line) { + return indent + line; + }); + return lines.join(c.EOL); +}; + +HelpFormatter.prototype._getHelpString = function (action) { + return action.help; +}; diff --git a/node_modules/argparse/lib/namespace.js b/node_modules/argparse/lib/namespace.js new file mode 100644 index 0000000..a860de9 --- /dev/null +++ b/node_modules/argparse/lib/namespace.js @@ -0,0 +1,76 @@ +/** + * class Namespace + * + * Simple object for storing attributes. Implements equality by attribute names + * and values, and provides a simple string representation. + * + * See also [original guide][1] + * + * [1]:http://docs.python.org/dev/library/argparse.html#the-namespace-object + **/ +'use strict'; + +var $$ = require('./utils'); + +/** + * new Namespace(options) + * - options(object): predefined propertis for result object + * + **/ +var Namespace = module.exports = function Namespace(options) { + $$.extend(this, options); +}; + +/** + * Namespace#isset(key) -> Boolean + * - key (string|number): property name + * + * Tells whenever `namespace` contains given `key` or not. + **/ +Namespace.prototype.isset = function (key) { + return $$.has(this, key); +}; + +/** + * Namespace#set(key, value) -> self + * -key (string|number|object): propery name + * -value (mixed): new property value + * + * Set the property named key with value. + * If key object then set all key properties to namespace object + **/ +Namespace.prototype.set = function (key, value) { + if (typeof (key) === 'object') { + $$.extend(this, key); + } else { + this[key] = value; + } + return this; +}; + +/** + * Namespace#get(key, defaultValue) -> mixed + * - key (string|number): property name + * - defaultValue (mixed): default value + * + * Return the property key or defaulValue if not set + **/ +Namespace.prototype.get = function (key, defaultValue) { + return !this[key] ? defaultValue : this[key]; +}; + +/** + * Namespace#unset(key, defaultValue) -> mixed + * - key (string|number): property name + * - defaultValue (mixed): default value + * + * Return data[key](and delete it) or defaultValue + **/ +Namespace.prototype.unset = function (key, defaultValue) { + var value = this[key]; + if (value !== null) { + delete this[key]; + return value; + } + return defaultValue; +}; diff --git a/node_modules/argparse/lib/utils.js b/node_modules/argparse/lib/utils.js new file mode 100644 index 0000000..4a9cf3e --- /dev/null +++ b/node_modules/argparse/lib/utils.js @@ -0,0 +1,57 @@ +'use strict'; + +exports.repeat = function (str, num) { + var result = ''; + for (var i = 0; i < num; i++) { result += str; } + return result; +}; + +exports.arrayEqual = function (a, b) { + if (a.length !== b.length) { return false; } + for (var i = 0; i < a.length; i++) { + if (a[i] !== b[i]) { return false; } + } + return true; +}; + +exports.trimChars = function (str, chars) { + var start = 0; + var end = str.length - 1; + while (chars.indexOf(str.charAt(start)) >= 0) { start++; } + while (chars.indexOf(str.charAt(end)) >= 0) { end--; } + return str.slice(start, end + 1); +}; + +exports.capitalize = function (str) { + return str.charAt(0).toUpperCase() + str.slice(1); +}; + +exports.arrayUnion = function () { + var result = []; + for (var i = 0, values = {}; i < arguments.length; i++) { + var arr = arguments[i]; + for (var j = 0; j < arr.length; j++) { + if (!values[arr[j]]) { + values[arr[j]] = true; + result.push(arr[j]); + } + } + } + return result; +}; + +function has(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +exports.has = has; + +exports.extend = function (dest, src) { + for (var i in src) { + if (has(src, i)) { dest[i] = src[i]; } + } +}; + +exports.trimEnd = function (str) { + return str.replace(/\s+$/g, ''); +}; diff --git a/node_modules/argparse/package.json b/node_modules/argparse/package.json new file mode 100644 index 0000000..b6adf44 --- /dev/null +++ b/node_modules/argparse/package.json @@ -0,0 +1,108 @@ +{ + "_args": [ + [ + { + "raw": "argparse@^1.0.7", + "scope": null, + "escapedName": "argparse", + "name": "argparse", + "rawSpec": "^1.0.7", + "spec": ">=1.0.7 <2.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\js-yaml" + ] + ], + "_from": "argparse@>=1.0.7 <2.0.0", + "_id": "argparse@1.0.10", + "_inCache": true, + "_location": "/argparse", + "_nodeVersion": "8.9.1", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/argparse_1.0.10_1518704641025_0.2567322588736727" + }, + "_npmUser": { + "name": "vitaly", + "email": "vitaly@rcdesign.ru" + }, + "_npmVersion": "5.5.1", + "_phantomChildren": {}, + "_requested": { + "raw": "argparse@^1.0.7", + "scope": null, + "escapedName": "argparse", + "name": "argparse", + "rawSpec": "^1.0.7", + "spec": ">=1.0.7 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/js-yaml" + ], + "_resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "_shasum": "bcd6791ea5ae09725e17e5ad988134cd40b3d911", + "_shrinkwrap": null, + "_spec": "argparse@^1.0.7", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\js-yaml", + "bugs": { + "url": "https://github.com/nodeca/argparse/issues" + }, + "contributors": [ + { + "name": "Eugene Shkuropat" + }, + { + "name": "Paul Jacobson" + } + ], + "dependencies": { + "sprintf-js": "~1.0.2" + }, + "description": "Very powerful CLI arguments parser. Native port of argparse - python's options parsing library", + "devDependencies": { + "eslint": "^2.13.1", + "istanbul": "^0.4.5", + "mocha": "^3.1.0", + "ndoc": "^5.0.1" + }, + "directories": {}, + "dist": { + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "shasum": "bcd6791ea5ae09725e17e5ad988134cd40b3d911", + "tarball": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "fileCount": 27, + "unpackedSize": 116446 + }, + "files": [ + "index.js", + "lib/" + ], + "gitHead": "ea45e14bad13b9e4a10af28f11fb7e731079ab72", + "homepage": "https://github.com/nodeca/argparse#readme", + "keywords": [ + "cli", + "parser", + "argparse", + "option", + "args" + ], + "license": "MIT", + "maintainers": [ + { + "name": "vitaly", + "email": "vitaly@rcdesign.ru" + } + ], + "name": "argparse", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/nodeca/argparse.git" + }, + "scripts": { + "test": "make test" + }, + "version": "1.0.10" +} diff --git a/node_modules/array-union/index.js b/node_modules/array-union/index.js new file mode 100644 index 0000000..e33f38a --- /dev/null +++ b/node_modules/array-union/index.js @@ -0,0 +1,6 @@ +'use strict'; +var arrayUniq = require('array-uniq'); + +module.exports = function () { + return arrayUniq([].concat.apply([], arguments)); +}; diff --git a/node_modules/array-union/license b/node_modules/array-union/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/array-union/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/array-union/package.json b/node_modules/array-union/package.json new file mode 100644 index 0000000..7a08908 --- /dev/null +++ b/node_modules/array-union/package.json @@ -0,0 +1,107 @@ +{ + "_args": [ + [ + { + "raw": "array-union@^1.0.1", + "scope": null, + "escapedName": "array-union", + "name": "array-union", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\globby" + ] + ], + "_from": "array-union@>=1.0.1 <2.0.0", + "_id": "array-union@1.0.2", + "_inCache": true, + "_location": "/array-union", + "_nodeVersion": "4.4.2", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/array-union-1.0.2.tgz_1466079411551_0.23353995219804347" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "2.15.0", + "_phantomChildren": {}, + "_requested": { + "raw": "array-union@^1.0.1", + "scope": null, + "escapedName": "array-union", + "name": "array-union", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/globby" + ], + "_resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "_shasum": "9a34410e4f4e3da23dea375be5be70f24778ec39", + "_shrinkwrap": null, + "_spec": "array-union@^1.0.1", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\globby", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/array-union/issues" + }, + "dependencies": { + "array-uniq": "^1.0.1" + }, + "description": "Create an array of unique values, in order, from the input arrays", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "9a34410e4f4e3da23dea375be5be70f24778ec39", + "tarball": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "34e1d6a80baa4eac9723795a0674c14119ace1bd", + "homepage": "https://github.com/sindresorhus/array-union#readme", + "keywords": [ + "array", + "arr", + "set", + "uniq", + "unique", + "duplicate", + "remove", + "union", + "combine", + "merge" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "array-union", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/array-union.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.2" +} diff --git a/node_modules/array-union/readme.md b/node_modules/array-union/readme.md new file mode 100644 index 0000000..ea472dd --- /dev/null +++ b/node_modules/array-union/readme.md @@ -0,0 +1,28 @@ +# array-union [![Build Status](https://travis-ci.org/sindresorhus/array-union.svg?branch=master)](https://travis-ci.org/sindresorhus/array-union) + +> Create an array of unique values, in order, from the input arrays + + +## Install + +``` +$ npm install --save array-union +``` + + +## Usage + +```js +const arrayUnion = require('array-union'); + +arrayUnion([1, 1, 2, 3], [2, 3]); +//=> [1, 2, 3] + +arrayUnion(['foo', 'foo', 'bar'], ['foo']); +//=> ['foo', 'bar'] +``` + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/array-uniq/index.js b/node_modules/array-uniq/index.js new file mode 100644 index 0000000..edd09f8 --- /dev/null +++ b/node_modules/array-uniq/index.js @@ -0,0 +1,62 @@ +'use strict'; + +// there's 3 implementations written in increasing order of efficiency + +// 1 - no Set type is defined +function uniqNoSet(arr) { + var ret = []; + + for (var i = 0; i < arr.length; i++) { + if (ret.indexOf(arr[i]) === -1) { + ret.push(arr[i]); + } + } + + return ret; +} + +// 2 - a simple Set type is defined +function uniqSet(arr) { + var seen = new Set(); + return arr.filter(function (el) { + if (!seen.has(el)) { + seen.add(el); + return true; + } + + return false; + }); +} + +// 3 - a standard Set type is defined and it has a forEach method +function uniqSetWithForEach(arr) { + var ret = []; + + (new Set(arr)).forEach(function (el) { + ret.push(el); + }); + + return ret; +} + +// V8 currently has a broken implementation +// https://github.com/joyent/node/issues/8449 +function doesForEachActuallyWork() { + var ret = false; + + (new Set([true])).forEach(function (el) { + ret = el; + }); + + return ret === true; +} + +if ('Set' in global) { + if (typeof Set.prototype.forEach === 'function' && doesForEachActuallyWork()) { + module.exports = uniqSetWithForEach; + } else { + module.exports = uniqSet; + } +} else { + module.exports = uniqNoSet; +} diff --git a/node_modules/array-uniq/license b/node_modules/array-uniq/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/array-uniq/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/array-uniq/package.json b/node_modules/array-uniq/package.json new file mode 100644 index 0000000..84769a2 --- /dev/null +++ b/node_modules/array-uniq/package.json @@ -0,0 +1,105 @@ +{ + "_args": [ + [ + { + "raw": "array-uniq@^1.0.1", + "scope": null, + "escapedName": "array-uniq", + "name": "array-uniq", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\array-union" + ] + ], + "_from": "array-uniq@>=1.0.1 <2.0.0", + "_id": "array-uniq@1.0.3", + "_inCache": true, + "_location": "/array-uniq", + "_nodeVersion": "4.4.2", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/array-uniq-1.0.3.tgz_1466079716839_0.9139188586268574" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "2.15.0", + "_phantomChildren": {}, + "_requested": { + "raw": "array-uniq@^1.0.1", + "scope": null, + "escapedName": "array-uniq", + "name": "array-uniq", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/array-union" + ], + "_resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "_shasum": "af6ac877a25cc7f74e058894753858dfdb24fdb6", + "_shrinkwrap": null, + "_spec": "array-uniq@^1.0.1", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\array-union", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/array-uniq/issues" + }, + "dependencies": {}, + "description": "Create an array without duplicates", + "devDependencies": { + "ava": "*", + "es6-set": "^0.1.0", + "require-uncached": "^1.0.2", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "af6ac877a25cc7f74e058894753858dfdb24fdb6", + "tarball": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "3b5bf5a90a585b3950284d575f33d09663f6083a", + "homepage": "https://github.com/sindresorhus/array-uniq#readme", + "keywords": [ + "array", + "arr", + "set", + "uniq", + "unique", + "es6", + "duplicate", + "remove" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "array-uniq", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/array-uniq.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.3" +} diff --git a/node_modules/array-uniq/readme.md b/node_modules/array-uniq/readme.md new file mode 100644 index 0000000..f0bd98c --- /dev/null +++ b/node_modules/array-uniq/readme.md @@ -0,0 +1,30 @@ +# array-uniq [![Build Status](https://travis-ci.org/sindresorhus/array-uniq.svg?branch=master)](https://travis-ci.org/sindresorhus/array-uniq) + +> Create an array without duplicates + +It's already pretty fast, but will be much faster when [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) becomes available in V8 (especially with large arrays). + + +## Install + +``` +$ npm install --save array-uniq +``` + + +## Usage + +```js +const arrayUniq = require('array-uniq'); + +arrayUniq([1, 1, 2, 3, 3]); +//=> [1, 2, 3] + +arrayUniq(['foo', 'foo', 'bar', 'foo']); +//=> ['foo', 'bar'] +``` + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/babel-code-frame/.npmignore b/node_modules/babel-code-frame/.npmignore new file mode 100644 index 0000000..47cdd2c --- /dev/null +++ b/node_modules/babel-code-frame/.npmignore @@ -0,0 +1,3 @@ +src +test +node_modules diff --git a/node_modules/babel-code-frame/README.md b/node_modules/babel-code-frame/README.md new file mode 100644 index 0000000..7ef5368 --- /dev/null +++ b/node_modules/babel-code-frame/README.md @@ -0,0 +1,60 @@ +# babel-code-frame + +> Generate errors that contain a code frame that point to source locations. + +## Install + +```sh +npm install --save-dev babel-code-frame +``` + +## Usage + +```js +import codeFrame from 'babel-code-frame'; + +const rawLines = `class Foo { + constructor() +}`; +const lineNumber = 2; +const colNumber = 16; + +const result = codeFrame(rawLines, lineNumber, colNumber, { /* options */ }); + +console.log(result); +``` + +```sh + 1 | class Foo { +> 2 | constructor() + | ^ + 3 | } +``` + +If the column number is not known, you may pass `null` instead. + +## Options + +### `highlightCode` + +`boolean`, defaults to `false`. + +Toggles syntax highlighting the code as JavaScript for terminals. + +### `linesAbove` + +`number`, defaults to `2`. + +Adjust the number of lines to show above the error. + +### `linesBelow` + +`number`, defaults to `3`. + +Adjust the number of lines to show below the error. + +### `forceColor` + +`boolean`, defaults to `false`. + +Enable this to forcibly syntax highlight the code as JavaScript (for non-terminals); overrides `highlightCode`. diff --git a/node_modules/babel-code-frame/lib/index.js b/node_modules/babel-code-frame/lib/index.js new file mode 100644 index 0000000..ff49b90 --- /dev/null +++ b/node_modules/babel-code-frame/lib/index.js @@ -0,0 +1,141 @@ +"use strict"; + +exports.__esModule = true; + +exports.default = function (rawLines, lineNumber, colNumber) { + var opts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + + colNumber = Math.max(colNumber, 0); + + var highlighted = opts.highlightCode && _chalk2.default.supportsColor || opts.forceColor; + var chalk = _chalk2.default; + if (opts.forceColor) { + chalk = new _chalk2.default.constructor({ enabled: true }); + } + var maybeHighlight = function maybeHighlight(chalkFn, string) { + return highlighted ? chalkFn(string) : string; + }; + var defs = getDefs(chalk); + if (highlighted) rawLines = highlight(defs, rawLines); + + var linesAbove = opts.linesAbove || 2; + var linesBelow = opts.linesBelow || 3; + + var lines = rawLines.split(NEWLINE); + var start = Math.max(lineNumber - (linesAbove + 1), 0); + var end = Math.min(lines.length, lineNumber + linesBelow); + + if (!lineNumber && !colNumber) { + start = 0; + end = lines.length; + } + + var numberMaxWidth = String(end).length; + + var frame = lines.slice(start, end).map(function (line, index) { + var number = start + 1 + index; + var paddedNumber = (" " + number).slice(-numberMaxWidth); + var gutter = " " + paddedNumber + " | "; + if (number === lineNumber) { + var markerLine = ""; + if (colNumber) { + var markerSpacing = line.slice(0, colNumber - 1).replace(/[^\t]/g, " "); + markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), markerSpacing, maybeHighlight(defs.marker, "^")].join(""); + } + return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line, markerLine].join(""); + } else { + return " " + maybeHighlight(defs.gutter, gutter) + line; + } + }).join("\n"); + + if (highlighted) { + return chalk.reset(frame); + } else { + return frame; + } +}; + +var _jsTokens = require("js-tokens"); + +var _jsTokens2 = _interopRequireDefault(_jsTokens); + +var _esutils = require("esutils"); + +var _esutils2 = _interopRequireDefault(_esutils); + +var _chalk = require("chalk"); + +var _chalk2 = _interopRequireDefault(_chalk); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getDefs(chalk) { + return { + keyword: chalk.cyan, + capitalized: chalk.yellow, + jsx_tag: chalk.yellow, + punctuator: chalk.yellow, + + number: chalk.magenta, + string: chalk.green, + regex: chalk.magenta, + comment: chalk.grey, + invalid: chalk.white.bgRed.bold, + gutter: chalk.grey, + marker: chalk.red.bold + }; +} + +var NEWLINE = /\r\n|[\n\r\u2028\u2029]/; + +var JSX_TAG = /^[a-z][\w-]*$/i; + +var BRACKET = /^[()\[\]{}]$/; + +function getTokenType(match) { + var _match$slice = match.slice(-2), + offset = _match$slice[0], + text = _match$slice[1]; + + var token = (0, _jsTokens.matchToToken)(match); + + if (token.type === "name") { + if (_esutils2.default.keyword.isReservedWordES6(token.value)) { + return "keyword"; + } + + if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == "=6.22.0 <7.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint" + ] + ], + "_from": "babel-code-frame@>=6.22.0 <7.0.0", + "_id": "babel-code-frame@6.26.0", + "_inCache": true, + "_location": "/babel-code-frame", + "_nodeVersion": "6.9.0", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/babel-code-frame-6.26.0.tgz_1502898849653_0.8458143274765462" + }, + "_npmUser": { + "name": "hzoo", + "email": "hi@henryzoo.com" + }, + "_npmVersion": "4.6.1", + "_phantomChildren": {}, + "_requested": { + "raw": "babel-code-frame@^6.22.0", + "scope": null, + "escapedName": "babel-code-frame", + "name": "babel-code-frame", + "rawSpec": "^6.22.0", + "spec": ">=6.22.0 <7.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "_shasum": "63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b", + "_shrinkwrap": null, + "_spec": "babel-code-frame@^6.22.0", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint", + "author": { + "name": "Sebastian McKenzie", + "email": "sebmck@gmail.com" + }, + "dependencies": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + }, + "description": "Generate errors that contain a code frame that point to source locations.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b", + "tarball": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz" + }, + "homepage": "https://babeljs.io/", + "license": "MIT", + "main": "lib/index.js", + "maintainers": [ + { + "name": "thejameskyle", + "email": "me@thejameskyle.com" + }, + { + "name": "sebmck", + "email": "sebmck@gmail.com" + }, + { + "name": "danez", + "email": "daniel@tschinder.de" + }, + { + "name": "hzoo", + "email": "hi@henryzoo.com" + }, + { + "name": "loganfsmyth", + "email": "loganfsmyth@gmail.com" + } + ], + "name": "babel-code-frame", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "https://github.com/babel/babel/tree/master/packages/babel-code-frame" + }, + "scripts": {}, + "version": "6.26.0" +} diff --git a/node_modules/caller-path/index.js b/node_modules/caller-path/index.js new file mode 100644 index 0000000..b09866d --- /dev/null +++ b/node_modules/caller-path/index.js @@ -0,0 +1,6 @@ +'use strict'; +var callsites = require('callsites'); + +module.exports = function () { + return callsites()[2].getFileName(); +}; diff --git a/node_modules/caller-path/package.json b/node_modules/caller-path/package.json new file mode 100644 index 0000000..c595895 --- /dev/null +++ b/node_modules/caller-path/package.json @@ -0,0 +1,102 @@ +{ + "_args": [ + [ + { + "raw": "caller-path@^0.1.0", + "scope": null, + "escapedName": "caller-path", + "name": "caller-path", + "rawSpec": "^0.1.0", + "spec": ">=0.1.0 <0.2.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\require-uncached" + ] + ], + "_from": "caller-path@>=0.1.0 <0.2.0", + "_id": "caller-path@0.1.0", + "_inCache": true, + "_location": "/caller-path", + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "1.4.6", + "_phantomChildren": {}, + "_requested": { + "raw": "caller-path@^0.1.0", + "scope": null, + "escapedName": "caller-path", + "name": "caller-path", + "rawSpec": "^0.1.0", + "spec": ">=0.1.0 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/require-uncached" + ], + "_resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", + "_shasum": "94085ef63581ecd3daa92444a8fe94e82577751f", + "_shrinkwrap": null, + "_spec": "caller-path@^0.1.0", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\require-uncached", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/caller-path/issues" + }, + "dependencies": { + "callsites": "^0.2.0" + }, + "description": "Get the path of the caller module", + "devDependencies": { + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "94085ef63581ecd3daa92444a8fe94e82577751f", + "tarball": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/caller-path", + "keywords": [ + "caller", + "calling", + "module", + "path", + "parent", + "callsites", + "callsite", + "stacktrace", + "stack", + "trace", + "function", + "file" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "caller-path", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/sindresorhus/caller-path.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "0.1.0" +} diff --git a/node_modules/caller-path/readme.md b/node_modules/caller-path/readme.md new file mode 100644 index 0000000..9393301 --- /dev/null +++ b/node_modules/caller-path/readme.md @@ -0,0 +1,36 @@ +# caller-path [![Build Status](https://travis-ci.org/sindresorhus/caller-path.svg?branch=master)](https://travis-ci.org/sindresorhus/caller-path) + +> Get the path of the caller module + +You can't use [`module.parent`](http://nodejs.org/api/modules.html#modules_module_parent) as modules are cached and it will return the first caller module, not necessarily the current one. + + +## Install + +``` +$ npm install --save caller-path +``` + + +## Usage + +```js +// foo.js +var callerPath = require('caller-path'); + +module.exports = function () { + console.log(callerPath()); + //=> /Users/sindresorhus/dev/unicorn/bar.js +} +``` + +```js +// bar.js +var foo = require('./foo'); +foo(); +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/callsites/index.js b/node_modules/callsites/index.js new file mode 100644 index 0000000..098a251 --- /dev/null +++ b/node_modules/callsites/index.js @@ -0,0 +1,8 @@ +'use strict'; +module.exports = function () { + var _ = Error.prepareStackTrace; + Error.prepareStackTrace = function (_, stack) { return stack }; + var stack = new Error().stack.slice(1); + Error.prepareStackTrace = _; + return stack; +}; diff --git a/node_modules/callsites/package.json b/node_modules/callsites/package.json new file mode 100644 index 0000000..145a045 --- /dev/null +++ b/node_modules/callsites/package.json @@ -0,0 +1,98 @@ +{ + "_args": [ + [ + { + "raw": "callsites@^0.2.0", + "scope": null, + "escapedName": "callsites", + "name": "callsites", + "rawSpec": "^0.2.0", + "spec": ">=0.2.0 <0.3.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\caller-path" + ] + ], + "_from": "callsites@>=0.2.0 <0.3.0", + "_id": "callsites@0.2.0", + "_inCache": true, + "_location": "/callsites", + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "1.4.6", + "_phantomChildren": {}, + "_requested": { + "raw": "callsites@^0.2.0", + "scope": null, + "escapedName": "callsites", + "name": "callsites", + "rawSpec": "^0.2.0", + "spec": ">=0.2.0 <0.3.0", + "type": "range" + }, + "_requiredBy": [ + "/caller-path" + ], + "_resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", + "_shasum": "afab96262910a7f33c19a5775825c69f34e350ca", + "_shrinkwrap": null, + "_spec": "callsites@^0.2.0", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\caller-path", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/callsites/issues" + }, + "dependencies": {}, + "description": "Get callsites from the V8 stack trace API", + "devDependencies": { + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "afab96262910a7f33c19a5775825c69f34e350ca", + "tarball": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/callsites", + "keywords": [ + "callsites", + "callsite", + "v8", + "stacktrace", + "stack", + "trace", + "function", + "file", + "line", + "debug" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "callsites", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/sindresorhus/callsites.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "0.2.0" +} diff --git a/node_modules/callsites/readme.md b/node_modules/callsites/readme.md new file mode 100644 index 0000000..23aaca4 --- /dev/null +++ b/node_modules/callsites/readme.md @@ -0,0 +1,47 @@ +# callsites [![Build Status](https://travis-ci.org/sindresorhus/callsites.svg?branch=master)](https://travis-ci.org/sindresorhus/callsites) + +> Get callsites from the [V8 stack trace API](https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi) + + +## Install + +```sh +$ npm install --save callsites +``` + + +## Usage + +```js +var callsites = require('callsites'); + +function unicorn() { + console.log(callsites()[0].getFileName()); + //=> /Users/sindresorhus/dev/callsites/test.js +} + +unicorn(); +``` + +## API + +Returns an array of callsite objects with the following methods: + +- `getThis`: returns the value of this +- `getTypeName`: returns the type of this as a string. This is the name of the function stored in the constructor field of this, if available, otherwise the object's [[Class]] internal property. +- `getFunction`: returns the current function +- `getFunctionName`: returns the name of the current function, typically its name property. If a name property is not available an attempt will be made to try to infer a name from the function's context. +- `getMethodName`: returns the name of the property of this or one of its prototypes that holds the current function +- `getFileName`: if this function was defined in a script returns the name of the script +- `getLineNumber`: if this function was defined in a script returns the current line number +- `getColumnNumber`: if this function was defined in a script returns the current column number +- `getEvalOrigin`: if this function was created using a call to eval returns a CallSite object representing the location where eval was called +- `isToplevel`: is this a toplevel invocation, that is, is this the global object? +- `isEval`: does this call take place in code defined by a call to eval? +- `isNative`: is this call in native V8 code? +- `isConstructor`: is this a constructor call? + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/chardet/.npmignore b/node_modules/chardet/.npmignore new file mode 100644 index 0000000..0e5b47f --- /dev/null +++ b/node_modules/chardet/.npmignore @@ -0,0 +1,2 @@ +test +scripts diff --git a/node_modules/chardet/.travis.yml b/node_modules/chardet/.travis.yml new file mode 100644 index 0000000..dd338dd --- /dev/null +++ b/node_modules/chardet/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - "4" + - "6" + - "8" diff --git a/node_modules/chardet/LICENSE b/node_modules/chardet/LICENSE new file mode 100644 index 0000000..722e25c --- /dev/null +++ b/node_modules/chardet/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2017 Dmitry Shirokov + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/chardet/README.md b/node_modules/chardet/README.md new file mode 100644 index 0000000..7ca84e3 --- /dev/null +++ b/node_modules/chardet/README.md @@ -0,0 +1,66 @@ + +chardet [![Build Status](https://travis-ci.org/runk/node-chardet.png)](https://travis-ci.org/runk/node-chardet) +===== + +Chardet is a character detection module for NodeJS written in pure Javascript. +Module is based on ICU project http://site.icu-project.org/, which uses character +occurency analysis to determine the most probable encoding. + +## Installation + +``` +npm i chardet +``` + +## Usage + +```javascript +var chardet = require('chardet'); +chardet.detect(new Buffer('hello there!')); +// or +chardet.detectFile('/path/to/file', function(err, encoding) {}); +// or +chardet.detectFileSync('/path/to/file'); +``` + +## Working with large data sets + +Sometimes, when data set is huge and you want to optimize performace (in tradeoff of less accuracy), +you can sample only first N bytes of the buffer: + +```javascript +chardet.detectFile('/path/to/file', { sampleSize: 32 }, function(err, encoding) {}); +``` + +## Supported Encodings: + +* UTF-8 +* UTF-16 LE +* UTF-16 BE +* UTF-32 LE +* UTF-32 BE +* ISO-2022-JP +* ISO-2022-KR +* ISO-2022-CN +* Shift-JIS +* Big5 +* EUC-JP +* EUC-KR +* GB18030 +* ISO-8859-1 +* ISO-8859-2 +* ISO-8859-5 +* ISO-8859-6 +* ISO-8859-7 +* ISO-8859-8 +* ISO-8859-9 +* windows-1250 +* windows-1251 +* windows-1252 +* windows-1253 +* windows-1254 +* windows-1255 +* windows-1256 +* KOI8-R + +Currently only these encodings are supported, more will be added soon. diff --git a/node_modules/chardet/encoding/iso2022.js b/node_modules/chardet/encoding/iso2022.js new file mode 100644 index 0000000..afff88a --- /dev/null +++ b/node_modules/chardet/encoding/iso2022.js @@ -0,0 +1,141 @@ +var util = require('util'), + Match = require ('../match'); + + +/** + * This is a superclass for the individual detectors for + * each of the detectable members of the ISO 2022 family + * of encodings. + */ + +function ISO_2022() {} + +ISO_2022.prototype.match = function(det) { + + /** + * Matching function shared among the 2022 detectors JP, CN and KR + * Counts up the number of legal an unrecognized escape sequences in + * the sample of text, and computes a score based on the total number & + * the proportion that fit the encoding. + * + * + * @param text the byte buffer containing text to analyse + * @param textLen the size of the text in the byte. + * @param escapeSequences the byte escape sequences to test for. + * @return match quality, in the range of 0-100. + */ + + var i, j; + var escN; + var hits = 0; + var misses = 0; + var shifts = 0; + var quality; + + // TODO: refactor me + var text = det.fInputBytes; + var textLen = det.fInputLen; + + scanInput: + for (i = 0; i < textLen; i++) { + if (text[i] == 0x1b) { + checkEscapes: + for (escN = 0; escN < this.escapeSequences.length; escN++) { + var seq = this.escapeSequences[escN]; + + if ((textLen - i) < seq.length) + continue checkEscapes; + + for (j = 1; j < seq.length; j++) + if (seq[j] != text[i + j]) + continue checkEscapes; + + + hits++; + i += seq.length - 1; + continue scanInput; + } + + misses++; + } + + // Shift in/out + if (text[i] == 0x0e || text[i] == 0x0f) + shifts++; + + } + + if (hits == 0) + return null; + + // + // Initial quality is based on relative proportion of recongized vs. + // unrecognized escape sequences. + // All good: quality = 100; + // half or less good: quality = 0; + // linear inbetween. + quality = (100 * hits - 100 * misses) / (hits + misses); + + // Back off quality if there were too few escape sequences seen. + // Include shifts in this computation, so that KR does not get penalized + // for having only a single Escape sequence, but many shifts. + if (hits + shifts < 5) + quality -= (5 - (hits + shifts)) * 10; + + return quality <= 0 ? null : new Match(det, this, quality); +}; + +module.exports.ISO_2022_JP = function() { + this.name = function() { + return 'ISO-2022-JP'; + }; + this.escapeSequences = [ + [ 0x1b, 0x24, 0x28, 0x43 ], // KS X 1001:1992 + [ 0x1b, 0x24, 0x28, 0x44 ], // JIS X 212-1990 + [ 0x1b, 0x24, 0x40 ], // JIS C 6226-1978 + [ 0x1b, 0x24, 0x41 ], // GB 2312-80 + [ 0x1b, 0x24, 0x42 ], // JIS X 208-1983 + [ 0x1b, 0x26, 0x40 ], // JIS X 208 1990, 1997 + [ 0x1b, 0x28, 0x42 ], // ASCII + [ 0x1b, 0x28, 0x48 ], // JIS-Roman + [ 0x1b, 0x28, 0x49 ], // Half-width katakana + [ 0x1b, 0x28, 0x4a ], // JIS-Roman + [ 0x1b, 0x2e, 0x41 ], // ISO 8859-1 + [ 0x1b, 0x2e, 0x46 ] // ISO 8859-7 + ]; +}; +util.inherits(module.exports.ISO_2022_JP, ISO_2022); + + + +module.exports.ISO_2022_KR = function() { + this.name = function() { + return 'ISO-2022-KR'; + }; + this.escapeSequences = [ + [ 0x1b, 0x24, 0x29, 0x43 ] + ]; +}; +util.inherits(module.exports.ISO_2022_KR, ISO_2022); + + + +module.exports.ISO_2022_CN = function() { + this.name = function() { + return 'ISO-2022-CN'; + }; + this.escapeSequences = [ + [ 0x1b, 0x24, 0x29, 0x41 ], // GB 2312-80 + [ 0x1b, 0x24, 0x29, 0x47 ], // CNS 11643-1992 Plane 1 + [ 0x1b, 0x24, 0x2A, 0x48 ], // CNS 11643-1992 Plane 2 + [ 0x1b, 0x24, 0x29, 0x45 ], // ISO-IR-165 + [ 0x1b, 0x24, 0x2B, 0x49 ], // CNS 11643-1992 Plane 3 + [ 0x1b, 0x24, 0x2B, 0x4A ], // CNS 11643-1992 Plane 4 + [ 0x1b, 0x24, 0x2B, 0x4B ], // CNS 11643-1992 Plane 5 + [ 0x1b, 0x24, 0x2B, 0x4C ], // CNS 11643-1992 Plane 6 + [ 0x1b, 0x24, 0x2B, 0x4D ], // CNS 11643-1992 Plane 7 + [ 0x1b, 0x4e ], // SS2 + [ 0x1b, 0x4f ] // SS3 + ]; +}; +util.inherits(module.exports.ISO_2022_CN, ISO_2022); diff --git a/node_modules/chardet/encoding/mbcs.js b/node_modules/chardet/encoding/mbcs.js new file mode 100644 index 0000000..5aa1557 --- /dev/null +++ b/node_modules/chardet/encoding/mbcs.js @@ -0,0 +1,502 @@ +var util = require('util'), + Match = require ('../match'); + +/** + * Binary search implementation (recursive) + */ +function binarySearch(arr, searchValue) { + function find(arr, searchValue, left, right) { + if (right < left) + return -1; + + /* + int mid = mid = (left + right) / 2; + There is a bug in the above line; + Joshua Bloch suggests the following replacement: + */ + var mid = Math.floor((left + right) >>> 1); + if (searchValue > arr[mid]) + return find(arr, searchValue, mid + 1, right); + + if (searchValue < arr[mid]) + return find(arr, searchValue, left, mid - 1); + + return mid; + }; + + return find(arr, searchValue, 0, arr.length - 1); +}; + +// 'Character' iterated character class. +// Recognizers for specific mbcs encodings make their 'characters' available +// by providing a nextChar() function that fills in an instance of iteratedChar +// with the next char from the input. +// The returned characters are not converted to Unicode, but remain as the raw +// bytes (concatenated into an int) from the codepage data. +// +// For Asian charsets, use the raw input rather than the input that has been +// stripped of markup. Detection only considers multi-byte chars, effectively +// stripping markup anyway, and double byte chars do occur in markup too. +// +function IteratedChar() { + + this.charValue = 0; // 1-4 bytes from the raw input data + this.index = 0; + this.nextIndex = 0; + this.error = false; + this.done = false; + + this.reset = function() { + this.charValue = 0; + this.index = -1; + this.nextIndex = 0; + this.error = false; + this.done = false; + }; + + this.nextByte = function(det) { + if (this.nextIndex >= det.fRawLength) { + this.done = true; + return -1; + } + var byteValue = det.fRawInput[this.nextIndex++] & 0x00ff; + return byteValue; + }; +}; + + + +/** + * Asian double or multi-byte - charsets. + * Match is determined mostly by the input data adhering to the + * encoding scheme for the charset, and, optionally, + * frequency-of-occurence of characters. + */ + +function mbcs() {}; + +/** + * Test the match of this charset with the input text data + * which is obtained via the CharsetDetector object. + * + * @param det The CharsetDetector, which contains the input text + * to be checked for being in this charset. + * @return Two values packed into one int (Damn java, anyhow) + * bits 0-7: the match confidence, ranging from 0-100 + * bits 8-15: The match reason, an enum-like value. + */ +mbcs.prototype.match = function(det) { + + var singleByteCharCount = 0, //TODO Do we really need this? + doubleByteCharCount = 0, + commonCharCount = 0, + badCharCount = 0, + totalCharCount = 0, + confidence = 0; + + var iter = new IteratedChar(); + + detectBlock: { + for (iter.reset(); this.nextChar(iter, det);) { + totalCharCount++; + if (iter.error) { + badCharCount++; + } else { + var cv = iter.charValue & 0xFFFFFFFF; + + if (cv <= 0xff) { + singleByteCharCount++; + } else { + doubleByteCharCount++; + if (this.commonChars != null) { + // NOTE: This assumes that there are no 4-byte common chars. + if (binarySearch(this.commonChars, cv) >= 0) { + commonCharCount++; + } + } + } + } + if (badCharCount >= 2 && badCharCount * 5 >= doubleByteCharCount) { + // console.log('its here!') + // Bail out early if the byte data is not matching the encoding scheme. + break detectBlock; + } + } + + if (doubleByteCharCount <= 10 && badCharCount== 0) { + // Not many multi-byte chars. + if (doubleByteCharCount == 0 && totalCharCount < 10) { + // There weren't any multibyte sequences, and there was a low density of non-ASCII single bytes. + // We don't have enough data to have any confidence. + // Statistical analysis of single byte non-ASCII charcters would probably help here. + confidence = 0; + } + else { + // ASCII or ISO file? It's probably not our encoding, + // but is not incompatible with our encoding, so don't give it a zero. + confidence = 10; + } + break detectBlock; + } + + // + // No match if there are too many characters that don't fit the encoding scheme. + // (should we have zero tolerance for these?) + // + if (doubleByteCharCount < 20 * badCharCount) { + confidence = 0; + break detectBlock; + } + + if (this.commonChars == null) { + // We have no statistics on frequently occuring characters. + // Assess confidence purely on having a reasonable number of + // multi-byte characters (the more the better + confidence = 30 + doubleByteCharCount - 20 * badCharCount; + if (confidence > 100) { + confidence = 100; + } + } else { + // + // Frequency of occurence statistics exist. + // + var maxVal = Math.log(parseFloat(doubleByteCharCount) / 4); + var scaleFactor = 90.0 / maxVal; + confidence = Math.floor(Math.log(commonCharCount + 1) * scaleFactor + 10); + confidence = Math.min(confidence, 100); + } + } // end of detectBlock: + + return confidence == 0 ? null : new Match(det, this, confidence); +}; + +/** + * Get the next character (however many bytes it is) from the input data + * Subclasses for specific charset encodings must implement this function + * to get characters according to the rules of their encoding scheme. + * + * This function is not a method of class iteratedChar only because + * that would require a lot of extra derived classes, which is awkward. + * @param it The iteratedChar 'struct' into which the returned char is placed. + * @param det The charset detector, which is needed to get at the input byte data + * being iterated over. + * @return True if a character was returned, false at end of input. + */ + +mbcs.prototype.nextChar = function(iter, det) {}; + + + +/** + * Shift-JIS charset recognizer. + */ +module.exports.sjis = function() { + this.name = function() { + return 'Shift-JIS'; + }; + this.language = function() { + return 'ja'; + }; + + // TODO: This set of data comes from the character frequency- + // of-occurence analysis tool. The data needs to be moved + // into a resource and loaded from there. + this.commonChars = [ + 0x8140, 0x8141, 0x8142, 0x8145, 0x815b, 0x8169, 0x816a, 0x8175, 0x8176, 0x82a0, + 0x82a2, 0x82a4, 0x82a9, 0x82aa, 0x82ab, 0x82ad, 0x82af, 0x82b1, 0x82b3, 0x82b5, + 0x82b7, 0x82bd, 0x82be, 0x82c1, 0x82c4, 0x82c5, 0x82c6, 0x82c8, 0x82c9, 0x82cc, + 0x82cd, 0x82dc, 0x82e0, 0x82e7, 0x82e8, 0x82e9, 0x82ea, 0x82f0, 0x82f1, 0x8341, + 0x8343, 0x834e, 0x834f, 0x8358, 0x835e, 0x8362, 0x8367, 0x8375, 0x8376, 0x8389, + 0x838a, 0x838b, 0x838d, 0x8393, 0x8e96, 0x93fa, 0x95aa + ]; + + this.nextChar = function(iter, det) { + iter.index = iter.nextIndex; + iter.error = false; + + var firstByte; + firstByte = iter.charValue = iter.nextByte(det); + if (firstByte < 0) + return false; + + if (firstByte <= 0x7f || (firstByte > 0xa0 && firstByte <= 0xdf)) + return true; + + var secondByte = iter.nextByte(det); + if (secondByte < 0) + return false; + + iter.charValue = (firstByte << 8) | secondByte; + if (! ((secondByte >= 0x40 && secondByte <= 0x7f) || (secondByte >= 0x80 && secondByte <= 0xff))) { + // Illegal second byte value. + iter.error = true; + } + return true; + }; +}; +util.inherits(module.exports.sjis, mbcs); + + + +/** + * Big5 charset recognizer. + */ +module.exports.big5 = function() { + this.name = function() { + return 'Big5'; + }; + this.language = function() { + return 'zh'; + }; + // TODO: This set of data comes from the character frequency- + // of-occurence analysis tool. The data needs to be moved + // into a resource and loaded from there. + this.commonChars = [ + 0xa140, 0xa141, 0xa142, 0xa143, 0xa147, 0xa149, 0xa175, 0xa176, 0xa440, 0xa446, + 0xa447, 0xa448, 0xa451, 0xa454, 0xa457, 0xa464, 0xa46a, 0xa46c, 0xa477, 0xa4a3, + 0xa4a4, 0xa4a7, 0xa4c1, 0xa4ce, 0xa4d1, 0xa4df, 0xa4e8, 0xa4fd, 0xa540, 0xa548, + 0xa558, 0xa569, 0xa5cd, 0xa5e7, 0xa657, 0xa661, 0xa662, 0xa668, 0xa670, 0xa6a8, + 0xa6b3, 0xa6b9, 0xa6d3, 0xa6db, 0xa6e6, 0xa6f2, 0xa740, 0xa751, 0xa759, 0xa7da, + 0xa8a3, 0xa8a5, 0xa8ad, 0xa8d1, 0xa8d3, 0xa8e4, 0xa8fc, 0xa9c0, 0xa9d2, 0xa9f3, + 0xaa6b, 0xaaba, 0xaabe, 0xaacc, 0xaafc, 0xac47, 0xac4f, 0xacb0, 0xacd2, 0xad59, + 0xaec9, 0xafe0, 0xb0ea, 0xb16f, 0xb2b3, 0xb2c4, 0xb36f, 0xb44c, 0xb44e, 0xb54c, + 0xb5a5, 0xb5bd, 0xb5d0, 0xb5d8, 0xb671, 0xb7ed, 0xb867, 0xb944, 0xbad8, 0xbb44, + 0xbba1, 0xbdd1, 0xc2c4, 0xc3b9, 0xc440, 0xc45f + ]; + this.nextChar = function(iter, det) { + iter.index = iter.nextIndex; + iter.error = false; + + var firstByte = iter.charValue = iter.nextByte(det); + + if (firstByte < 0) + return false; + + // single byte character. + if (firstByte <= 0x7f || firstByte == 0xff) + return true; + + var secondByte = iter.nextByte(det); + + if (secondByte < 0) + return false; + + iter.charValue = (iter.charValue << 8) | secondByte; + + if (secondByte < 0x40 || secondByte == 0x7f || secondByte == 0xff) + iter.error = true; + + return true; + }; +}; +util.inherits(module.exports.big5, mbcs); + + + +/** + * EUC charset recognizers. One abstract class that provides the common function + * for getting the next character according to the EUC encoding scheme, + * and nested derived classes for EUC_KR, EUC_JP, EUC_CN. + * + * Get the next character value for EUC based encodings. + * Character 'value' is simply the raw bytes that make up the character + * packed into an int. + */ +function eucNextChar(iter, det) { + iter.index = iter.nextIndex; + iter.error = false; + var firstByte = 0; + var secondByte = 0; + var thirdByte = 0; + //int fourthByte = 0; + buildChar: { + firstByte = iter.charValue = iter.nextByte(det); + if (firstByte < 0) { + // Ran off the end of the input data + iter.done = true; + break buildChar; + } + if (firstByte <= 0x8d) { + // single byte char + break buildChar; + } + secondByte = iter.nextByte(det); + iter.charValue = (iter.charValue << 8) | secondByte; + if (firstByte >= 0xA1 && firstByte <= 0xfe) { + // Two byte Char + if (secondByte < 0xa1) { + iter.error = true; + } + break buildChar; + } + if (firstByte == 0x8e) { + // Code Set 2. + // In EUC-JP, total char size is 2 bytes, only one byte of actual char value. + // In EUC-TW, total char size is 4 bytes, three bytes contribute to char value. + // We don't know which we've got. + // Treat it like EUC-JP. If the data really was EUC-TW, the following two + // bytes will look like a well formed 2 byte char. + if (secondByte < 0xa1) { + iter.error = true; + } + break buildChar; + } + if (firstByte == 0x8f) { + // Code set 3. + // Three byte total char size, two bytes of actual char value. + thirdByte = iter.nextByte(det); + iter.charValue = (iter.charValue << 8) | thirdByte; + if (thirdByte < 0xa1) { + iter.error = true; + } + } + } + return iter.done == false; +}; + + + +/** + * The charset recognize for EUC-JP. A singleton instance of this class + * is created and kept by the public CharsetDetector class + */ +module.exports.euc_jp = function() { + this.name = function() { + return 'EUC-JP'; + }; + this.language = function() { + return 'ja'; + }; + + // TODO: This set of data comes from the character frequency- + // of-occurence analysis tool. The data needs to be moved + // into a resource and loaded from there. + this.commonChars = [ + 0xa1a1, 0xa1a2, 0xa1a3, 0xa1a6, 0xa1bc, 0xa1ca, 0xa1cb, 0xa1d6, 0xa1d7, 0xa4a2, + 0xa4a4, 0xa4a6, 0xa4a8, 0xa4aa, 0xa4ab, 0xa4ac, 0xa4ad, 0xa4af, 0xa4b1, 0xa4b3, + 0xa4b5, 0xa4b7, 0xa4b9, 0xa4bb, 0xa4bd, 0xa4bf, 0xa4c0, 0xa4c1, 0xa4c3, 0xa4c4, + 0xa4c6, 0xa4c7, 0xa4c8, 0xa4c9, 0xa4ca, 0xa4cb, 0xa4ce, 0xa4cf, 0xa4d0, 0xa4de, + 0xa4df, 0xa4e1, 0xa4e2, 0xa4e4, 0xa4e8, 0xa4e9, 0xa4ea, 0xa4eb, 0xa4ec, 0xa4ef, + 0xa4f2, 0xa4f3, 0xa5a2, 0xa5a3, 0xa5a4, 0xa5a6, 0xa5a7, 0xa5aa, 0xa5ad, 0xa5af, + 0xa5b0, 0xa5b3, 0xa5b5, 0xa5b7, 0xa5b8, 0xa5b9, 0xa5bf, 0xa5c3, 0xa5c6, 0xa5c7, + 0xa5c8, 0xa5c9, 0xa5cb, 0xa5d0, 0xa5d5, 0xa5d6, 0xa5d7, 0xa5de, 0xa5e0, 0xa5e1, + 0xa5e5, 0xa5e9, 0xa5ea, 0xa5eb, 0xa5ec, 0xa5ed, 0xa5f3, 0xb8a9, 0xb9d4, 0xbaee, + 0xbbc8, 0xbef0, 0xbfb7, 0xc4ea, 0xc6fc, 0xc7bd, 0xcab8, 0xcaf3, 0xcbdc, 0xcdd1 + ]; + + this.nextChar = eucNextChar; +}; +util.inherits(module.exports.euc_jp, mbcs); + + + +/** + * The charset recognize for EUC-KR. A singleton instance of this class + * is created and kept by the public CharsetDetector class + */ +module.exports.euc_kr = function() { + this.name = function() { + return 'EUC-KR'; + }; + this.language = function() { + return 'ko'; + }; + + // TODO: This set of data comes from the character frequency- + // of-occurence analysis tool. The data needs to be moved + // into a resource and loaded from there. + this.commonChars = [ + 0xb0a1, 0xb0b3, 0xb0c5, 0xb0cd, 0xb0d4, 0xb0e6, 0xb0ed, 0xb0f8, 0xb0fa, 0xb0fc, + 0xb1b8, 0xb1b9, 0xb1c7, 0xb1d7, 0xb1e2, 0xb3aa, 0xb3bb, 0xb4c2, 0xb4cf, 0xb4d9, + 0xb4eb, 0xb5a5, 0xb5b5, 0xb5bf, 0xb5c7, 0xb5e9, 0xb6f3, 0xb7af, 0xb7c2, 0xb7ce, + 0xb8a6, 0xb8ae, 0xb8b6, 0xb8b8, 0xb8bb, 0xb8e9, 0xb9ab, 0xb9ae, 0xb9cc, 0xb9ce, + 0xb9fd, 0xbab8, 0xbace, 0xbad0, 0xbaf1, 0xbbe7, 0xbbf3, 0xbbfd, 0xbcad, 0xbcba, + 0xbcd2, 0xbcf6, 0xbdba, 0xbdc0, 0xbdc3, 0xbdc5, 0xbec6, 0xbec8, 0xbedf, 0xbeee, + 0xbef8, 0xbefa, 0xbfa1, 0xbfa9, 0xbfc0, 0xbfe4, 0xbfeb, 0xbfec, 0xbff8, 0xc0a7, + 0xc0af, 0xc0b8, 0xc0ba, 0xc0bb, 0xc0bd, 0xc0c7, 0xc0cc, 0xc0ce, 0xc0cf, 0xc0d6, + 0xc0da, 0xc0e5, 0xc0fb, 0xc0fc, 0xc1a4, 0xc1a6, 0xc1b6, 0xc1d6, 0xc1df, 0xc1f6, + 0xc1f8, 0xc4a1, 0xc5cd, 0xc6ae, 0xc7cf, 0xc7d1, 0xc7d2, 0xc7d8, 0xc7e5, 0xc8ad + ]; + + this.nextChar = eucNextChar; +}; +util.inherits(module.exports.euc_kr, mbcs); + + + +/** + * GB-18030 recognizer. Uses simplified Chinese statistics. + */ +module.exports.gb_18030 = function() { + this.name = function() { + return 'GB18030'; + }; + this.language = function() { + return 'zh'; + }; + + /* + * Get the next character value for EUC based encodings. + * Character 'value' is simply the raw bytes that make up the character + * packed into an int. + */ + this.nextChar = function(iter, det) { + iter.index = iter.nextIndex; + iter.error = false; + var firstByte = 0; + var secondByte = 0; + var thirdByte = 0; + var fourthByte = 0; + buildChar: { + firstByte = iter.charValue = iter.nextByte(det); + if (firstByte < 0) { + // Ran off the end of the input data + iter.done = true; + break buildChar; + } + if (firstByte <= 0x80) { + // single byte char + break buildChar; + } + secondByte = iter.nextByte(det); + iter.charValue = (iter.charValue << 8) | secondByte; + if (firstByte >= 0x81 && firstByte <= 0xFE) { + // Two byte Char + if ((secondByte >= 0x40 && secondByte <= 0x7E) || (secondByte >=80 && secondByte <= 0xFE)) { + break buildChar; + } + // Four byte char + if (secondByte >= 0x30 && secondByte <= 0x39) { + thirdByte = iter.nextByte(det); + if (thirdByte >= 0x81 && thirdByte <= 0xFE) { + fourthByte = iter.nextByte(det); + if (fourthByte >= 0x30 && fourthByte <= 0x39) { + iter.charValue = (iter.charValue << 16) | (thirdByte << 8) | fourthByte; + break buildChar; + } + } + } + iter.error = true; + break buildChar; + } + } + return iter.done == false; + }; + + // TODO: This set of data comes from the character frequency- + // of-occurence analysis tool. The data needs to be moved + // into a resource and loaded from there. + this.commonChars = [ + 0xa1a1, 0xa1a2, 0xa1a3, 0xa1a4, 0xa1b0, 0xa1b1, 0xa1f1, 0xa1f3, 0xa3a1, 0xa3ac, + 0xa3ba, 0xb1a8, 0xb1b8, 0xb1be, 0xb2bb, 0xb3c9, 0xb3f6, 0xb4f3, 0xb5bd, 0xb5c4, + 0xb5e3, 0xb6af, 0xb6d4, 0xb6e0, 0xb7a2, 0xb7a8, 0xb7bd, 0xb7d6, 0xb7dd, 0xb8b4, + 0xb8df, 0xb8f6, 0xb9ab, 0xb9c9, 0xb9d8, 0xb9fa, 0xb9fd, 0xbacd, 0xbba7, 0xbbd6, + 0xbbe1, 0xbbfa, 0xbcbc, 0xbcdb, 0xbcfe, 0xbdcc, 0xbecd, 0xbedd, 0xbfb4, 0xbfc6, + 0xbfc9, 0xc0b4, 0xc0ed, 0xc1cb, 0xc2db, 0xc3c7, 0xc4dc, 0xc4ea, 0xc5cc, 0xc6f7, + 0xc7f8, 0xc8ab, 0xc8cb, 0xc8d5, 0xc8e7, 0xc9cf, 0xc9fa, 0xcab1, 0xcab5, 0xcac7, + 0xcad0, 0xcad6, 0xcaf5, 0xcafd, 0xccec, 0xcdf8, 0xceaa, 0xcec4, 0xced2, 0xcee5, + 0xcfb5, 0xcfc2, 0xcfd6, 0xd0c2, 0xd0c5, 0xd0d0, 0xd0d4, 0xd1a7, 0xd2aa, 0xd2b2, + 0xd2b5, 0xd2bb, 0xd2d4, 0xd3c3, 0xd3d0, 0xd3fd, 0xd4c2, 0xd4da, 0xd5e2, 0xd6d0 + ]; +}; +util.inherits(module.exports.gb_18030, mbcs); diff --git a/node_modules/chardet/encoding/sbcs.js b/node_modules/chardet/encoding/sbcs.js new file mode 100644 index 0000000..80d525e --- /dev/null +++ b/node_modules/chardet/encoding/sbcs.js @@ -0,0 +1,907 @@ +var util = require('util'), + Match = require ('../match'); + +/** + * This class recognizes single-byte encodings. Because the encoding scheme is so + * simple, language statistics are used to do the matching. + */ + +function NGramParser(theNgramList, theByteMap) { + var N_GRAM_MASK = 0xFFFFFF; + + this.byteIndex = 0; + this.ngram = 0; + + this.ngramList = theNgramList; + this.byteMap = theByteMap; + + this.ngramCount = 0; + this.hitCount = 0; + + this.spaceChar; + + /* + * Binary search for value in table, which must have exactly 64 entries. + */ + this.search = function(table, value) { + var index = 0; + + if (table[index + 32] <= value) index += 32; + if (table[index + 16] <= value) index += 16; + if (table[index + 8] <= value) index += 8; + if (table[index + 4] <= value) index += 4; + if (table[index + 2] <= value) index += 2; + if (table[index + 1] <= value) index += 1; + if (table[index] > value) index -= 1; + + if (index < 0 || table[index] != value) + return -1; + + return index; + }; + + this.lookup = function(thisNgram) { + this.ngramCount += 1; + if (this.search(this.ngramList, thisNgram) >= 0) { + this.hitCount += 1; + } + }; + + this.addByte = function(b) { + this.ngram = ((this.ngram << 8) + (b & 0xFF)) & N_GRAM_MASK; + this.lookup(this.ngram); + } + + this.nextByte = function(det) { + if (this.byteIndex >= det.fInputLen) + return -1; + + return det.fInputBytes[this.byteIndex++] & 0xFF; + } + + this.parse = function(det, spaceCh) { + var b, ignoreSpace = false; + this.spaceChar = spaceCh; + + while ((b = this.nextByte(det)) >= 0) { + var mb = this.byteMap[b]; + + // TODO: 0x20 might not be a space in all character sets... + if (mb != 0) { + if (!(mb == this.spaceChar && ignoreSpace)) { + this.addByte(mb); + } + + ignoreSpace = (mb == this.spaceChar); + } + } + + // TODO: Is this OK? The buffer could have ended in the middle of a word... + this.addByte(this.spaceChar); + + var rawPercent = this.hitCount / this.ngramCount; + + // TODO - This is a bit of a hack to take care of a case + // were we were getting a confidence of 135... + if (rawPercent > 0.33) + return 98; + + return Math.floor(rawPercent * 300.0); + }; +}; + +function NGramsPlusLang(la, ng) { + this.fLang = la; + this.fNGrams = ng; +}; + +function sbcs() {}; +sbcs.prototype.spaceChar = 0x20; +sbcs.prototype.ngrams = function() {}; +sbcs.prototype.byteMap = function() {}; +sbcs.prototype.match = function(det) { + + var ngrams = this.ngrams(); + var multiple = (Array.isArray(ngrams) && ngrams[0] instanceof NGramsPlusLang); + + if (!multiple) { + var parser = new NGramParser(ngrams, this.byteMap()); + var confidence = parser.parse(det, this.spaceChar); + return confidence <= 0 ? null : new Match(det, this, confidence); + } + + var bestConfidenceSoFar = -1; + var lang = null; + + for (var i = ngrams.length - 1; i >= 0; i--) { + var ngl = ngrams[i]; + + var parser = new NGramParser(ngl.fNGrams, this.byteMap()); + var confidence = parser.parse(det, this.spaceChar); + if (confidence > bestConfidenceSoFar) { + bestConfidenceSoFar = confidence; + lang = ngl.fLang; + } + } + + var name = this.name(det); + return bestConfidenceSoFar <= 0 ? null : new Match(det, this, bestConfidenceSoFar, name, lang); +}; + + +module.exports.ISO_8859_1 = function() { + this.byteMap = function() { + return [ + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, + 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, + 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0xAA, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0xB5, 0x20, 0x20, + 0x20, 0x20, 0xBA, 0x20, 0x20, 0x20, 0x20, 0x20, + 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, + 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, + 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0x20, + 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xDF, + 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, + 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, + 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0x20, + 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF + ]; + }; + + this.ngrams = function() { + return [ + new NGramsPlusLang('da', [ + 0x206166, 0x206174, 0x206465, 0x20656E, 0x206572, 0x20666F, 0x206861, 0x206920, + 0x206D65, 0x206F67, 0x2070E5, 0x207369, 0x207374, 0x207469, 0x207669, 0x616620, + 0x616E20, 0x616E64, 0x617220, 0x617420, 0x646520, 0x64656E, 0x646572, 0x646574, + 0x652073, 0x656420, 0x656465, 0x656E20, 0x656E64, 0x657220, 0x657265, 0x657320, + 0x657420, 0x666F72, 0x676520, 0x67656E, 0x676572, 0x696765, 0x696C20, 0x696E67, + 0x6B6520, 0x6B6B65, 0x6C6572, 0x6C6967, 0x6C6C65, 0x6D6564, 0x6E6465, 0x6E6520, + 0x6E6720, 0x6E6765, 0x6F6720, 0x6F6D20, 0x6F7220, 0x70E520, 0x722064, 0x722065, + 0x722073, 0x726520, 0x737465, 0x742073, 0x746520, 0x746572, 0x74696C, 0x766572 + ]), + new NGramsPlusLang('de', [ + 0x20616E, 0x206175, 0x206265, 0x206461, 0x206465, 0x206469, 0x206569, 0x206765, + 0x206861, 0x20696E, 0x206D69, 0x207363, 0x207365, 0x20756E, 0x207665, 0x20766F, + 0x207765, 0x207A75, 0x626572, 0x636820, 0x636865, 0x636874, 0x646173, 0x64656E, + 0x646572, 0x646965, 0x652064, 0x652073, 0x65696E, 0x656974, 0x656E20, 0x657220, + 0x657320, 0x67656E, 0x68656E, 0x687420, 0x696368, 0x696520, 0x696E20, 0x696E65, + 0x697420, 0x6C6963, 0x6C6C65, 0x6E2061, 0x6E2064, 0x6E2073, 0x6E6420, 0x6E6465, + 0x6E6520, 0x6E6720, 0x6E6765, 0x6E7465, 0x722064, 0x726465, 0x726569, 0x736368, + 0x737465, 0x742064, 0x746520, 0x74656E, 0x746572, 0x756E64, 0x756E67, 0x766572 + ]), + new NGramsPlusLang('en', [ + 0x206120, 0x20616E, 0x206265, 0x20636F, 0x20666F, 0x206861, 0x206865, 0x20696E, + 0x206D61, 0x206F66, 0x207072, 0x207265, 0x207361, 0x207374, 0x207468, 0x20746F, + 0x207768, 0x616964, 0x616C20, 0x616E20, 0x616E64, 0x617320, 0x617420, 0x617465, + 0x617469, 0x642061, 0x642074, 0x652061, 0x652073, 0x652074, 0x656420, 0x656E74, + 0x657220, 0x657320, 0x666F72, 0x686174, 0x686520, 0x686572, 0x696420, 0x696E20, + 0x696E67, 0x696F6E, 0x697320, 0x6E2061, 0x6E2074, 0x6E6420, 0x6E6720, 0x6E7420, + 0x6F6620, 0x6F6E20, 0x6F7220, 0x726520, 0x727320, 0x732061, 0x732074, 0x736169, + 0x737420, 0x742074, 0x746572, 0x746861, 0x746865, 0x74696F, 0x746F20, 0x747320 + ]), + new NGramsPlusLang('es', [ + 0x206120, 0x206361, 0x20636F, 0x206465, 0x20656C, 0x20656E, 0x206573, 0x20696E, + 0x206C61, 0x206C6F, 0x207061, 0x20706F, 0x207072, 0x207175, 0x207265, 0x207365, + 0x20756E, 0x207920, 0x612063, 0x612064, 0x612065, 0x61206C, 0x612070, 0x616369, + 0x61646F, 0x616C20, 0x617220, 0x617320, 0x6369F3, 0x636F6E, 0x646520, 0x64656C, + 0x646F20, 0x652064, 0x652065, 0x65206C, 0x656C20, 0x656E20, 0x656E74, 0x657320, + 0x657374, 0x69656E, 0x69F36E, 0x6C6120, 0x6C6F73, 0x6E2065, 0x6E7465, 0x6F2064, + 0x6F2065, 0x6F6E20, 0x6F7220, 0x6F7320, 0x706172, 0x717565, 0x726120, 0x726573, + 0x732064, 0x732065, 0x732070, 0x736520, 0x746520, 0x746F20, 0x756520, 0xF36E20 + ]), + new NGramsPlusLang('fr', [ + 0x206175, 0x20636F, 0x206461, 0x206465, 0x206475, 0x20656E, 0x206574, 0x206C61, + 0x206C65, 0x207061, 0x20706F, 0x207072, 0x207175, 0x207365, 0x20736F, 0x20756E, + 0x20E020, 0x616E74, 0x617469, 0x636520, 0x636F6E, 0x646520, 0x646573, 0x647520, + 0x652061, 0x652063, 0x652064, 0x652065, 0x65206C, 0x652070, 0x652073, 0x656E20, + 0x656E74, 0x657220, 0x657320, 0x657420, 0x657572, 0x696F6E, 0x697320, 0x697420, + 0x6C6120, 0x6C6520, 0x6C6573, 0x6D656E, 0x6E2064, 0x6E6520, 0x6E7320, 0x6E7420, + 0x6F6E20, 0x6F6E74, 0x6F7572, 0x717565, 0x72206C, 0x726520, 0x732061, 0x732064, + 0x732065, 0x73206C, 0x732070, 0x742064, 0x746520, 0x74696F, 0x756520, 0x757220 + ]), + new NGramsPlusLang('it', [ + 0x20616C, 0x206368, 0x20636F, 0x206465, 0x206469, 0x206520, 0x20696C, 0x20696E, + 0x206C61, 0x207065, 0x207072, 0x20756E, 0x612063, 0x612064, 0x612070, 0x612073, + 0x61746F, 0x636865, 0x636F6E, 0x64656C, 0x646920, 0x652061, 0x652063, 0x652064, + 0x652069, 0x65206C, 0x652070, 0x652073, 0x656C20, 0x656C6C, 0x656E74, 0x657220, + 0x686520, 0x692061, 0x692063, 0x692064, 0x692073, 0x696120, 0x696C20, 0x696E20, + 0x696F6E, 0x6C6120, 0x6C6520, 0x6C6920, 0x6C6C61, 0x6E6520, 0x6E6920, 0x6E6F20, + 0x6E7465, 0x6F2061, 0x6F2064, 0x6F2069, 0x6F2073, 0x6F6E20, 0x6F6E65, 0x706572, + 0x726120, 0x726520, 0x736920, 0x746120, 0x746520, 0x746920, 0x746F20, 0x7A696F + ]), + new NGramsPlusLang('nl', [ + 0x20616C, 0x206265, 0x206461, 0x206465, 0x206469, 0x206565, 0x20656E, 0x206765, + 0x206865, 0x20696E, 0x206D61, 0x206D65, 0x206F70, 0x207465, 0x207661, 0x207665, + 0x20766F, 0x207765, 0x207A69, 0x61616E, 0x616172, 0x616E20, 0x616E64, 0x617220, + 0x617420, 0x636874, 0x646520, 0x64656E, 0x646572, 0x652062, 0x652076, 0x65656E, + 0x656572, 0x656E20, 0x657220, 0x657273, 0x657420, 0x67656E, 0x686574, 0x696520, + 0x696E20, 0x696E67, 0x697320, 0x6E2062, 0x6E2064, 0x6E2065, 0x6E2068, 0x6E206F, + 0x6E2076, 0x6E6465, 0x6E6720, 0x6F6E64, 0x6F6F72, 0x6F7020, 0x6F7220, 0x736368, + 0x737465, 0x742064, 0x746520, 0x74656E, 0x746572, 0x76616E, 0x766572, 0x766F6F + ]), + new NGramsPlusLang('no', [ + 0x206174, 0x206176, 0x206465, 0x20656E, 0x206572, 0x20666F, 0x206861, 0x206920, + 0x206D65, 0x206F67, 0x2070E5, 0x207365, 0x20736B, 0x20736F, 0x207374, 0x207469, + 0x207669, 0x20E520, 0x616E64, 0x617220, 0x617420, 0x646520, 0x64656E, 0x646574, + 0x652073, 0x656420, 0x656E20, 0x656E65, 0x657220, 0x657265, 0x657420, 0x657474, + 0x666F72, 0x67656E, 0x696B6B, 0x696C20, 0x696E67, 0x6B6520, 0x6B6B65, 0x6C6520, + 0x6C6C65, 0x6D6564, 0x6D656E, 0x6E2073, 0x6E6520, 0x6E6720, 0x6E6765, 0x6E6E65, + 0x6F6720, 0x6F6D20, 0x6F7220, 0x70E520, 0x722073, 0x726520, 0x736F6D, 0x737465, + 0x742073, 0x746520, 0x74656E, 0x746572, 0x74696C, 0x747420, 0x747465, 0x766572 + ]), + new NGramsPlusLang('pt', [ + 0x206120, 0x20636F, 0x206461, 0x206465, 0x20646F, 0x206520, 0x206573, 0x206D61, + 0x206E6F, 0x206F20, 0x207061, 0x20706F, 0x207072, 0x207175, 0x207265, 0x207365, + 0x20756D, 0x612061, 0x612063, 0x612064, 0x612070, 0x616465, 0x61646F, 0x616C20, + 0x617220, 0x617261, 0x617320, 0x636F6D, 0x636F6E, 0x646120, 0x646520, 0x646F20, + 0x646F73, 0x652061, 0x652064, 0x656D20, 0x656E74, 0x657320, 0x657374, 0x696120, + 0x696361, 0x6D656E, 0x6E7465, 0x6E746F, 0x6F2061, 0x6F2063, 0x6F2064, 0x6F2065, + 0x6F2070, 0x6F7320, 0x706172, 0x717565, 0x726120, 0x726573, 0x732061, 0x732064, + 0x732065, 0x732070, 0x737461, 0x746520, 0x746F20, 0x756520, 0xE36F20, 0xE7E36F + ]), + new NGramsPlusLang('sv', [ + 0x206174, 0x206176, 0x206465, 0x20656E, 0x2066F6, 0x206861, 0x206920, 0x20696E, + 0x206B6F, 0x206D65, 0x206F63, 0x2070E5, 0x20736B, 0x20736F, 0x207374, 0x207469, + 0x207661, 0x207669, 0x20E472, 0x616465, 0x616E20, 0x616E64, 0x617220, 0x617474, + 0x636820, 0x646520, 0x64656E, 0x646572, 0x646574, 0x656420, 0x656E20, 0x657220, + 0x657420, 0x66F672, 0x67656E, 0x696C6C, 0x696E67, 0x6B6120, 0x6C6C20, 0x6D6564, + 0x6E2073, 0x6E6120, 0x6E6465, 0x6E6720, 0x6E6765, 0x6E696E, 0x6F6368, 0x6F6D20, + 0x6F6E20, 0x70E520, 0x722061, 0x722073, 0x726120, 0x736B61, 0x736F6D, 0x742073, + 0x746120, 0x746520, 0x746572, 0x74696C, 0x747420, 0x766172, 0xE47220, 0xF67220, + ]) + ]; + }; + + this.name = function(det) { + return (det && det.fC1Bytes) ? 'windows-1252' : 'ISO-8859-1'; + }; +}; +util.inherits(module.exports.ISO_8859_1, sbcs); + + +module.exports.ISO_8859_2 = function() { + this.byteMap = function() { + return [ + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, + 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, + 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0xB1, 0x20, 0xB3, 0x20, 0xB5, 0xB6, 0x20, + 0x20, 0xB9, 0xBA, 0xBB, 0xBC, 0x20, 0xBE, 0xBF, + 0x20, 0xB1, 0x20, 0xB3, 0x20, 0xB5, 0xB6, 0xB7, + 0x20, 0xB9, 0xBA, 0xBB, 0xBC, 0x20, 0xBE, 0xBF, + 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, + 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, + 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0x20, + 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xDF, + 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, + 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, + 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0x20, + 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0x20 + ]; + } + + this.ngrams = function() { + return [ + new NGramsPlusLang('cs', [ + 0x206120, 0x206279, 0x20646F, 0x206A65, 0x206E61, 0x206E65, 0x206F20, 0x206F64, + 0x20706F, 0x207072, 0x2070F8, 0x20726F, 0x207365, 0x20736F, 0x207374, 0x20746F, + 0x207620, 0x207679, 0x207A61, 0x612070, 0x636520, 0x636820, 0x652070, 0x652073, + 0x652076, 0x656D20, 0x656EED, 0x686F20, 0x686F64, 0x697374, 0x6A6520, 0x6B7465, + 0x6C6520, 0x6C6920, 0x6E6120, 0x6EE920, 0x6EEC20, 0x6EED20, 0x6F2070, 0x6F646E, + 0x6F6A69, 0x6F7374, 0x6F7520, 0x6F7661, 0x706F64, 0x706F6A, 0x70726F, 0x70F865, + 0x736520, 0x736F75, 0x737461, 0x737469, 0x73746E, 0x746572, 0x746EED, 0x746F20, + 0x752070, 0xBE6520, 0xE16EED, 0xE9686F, 0xED2070, 0xED2073, 0xED6D20, 0xF86564, + ]), + new NGramsPlusLang('hu', [ + 0x206120, 0x20617A, 0x206265, 0x206567, 0x20656C, 0x206665, 0x206861, 0x20686F, + 0x206973, 0x206B65, 0x206B69, 0x206BF6, 0x206C65, 0x206D61, 0x206D65, 0x206D69, + 0x206E65, 0x20737A, 0x207465, 0x20E973, 0x612061, 0x61206B, 0x61206D, 0x612073, + 0x616B20, 0x616E20, 0x617A20, 0x62616E, 0x62656E, 0x656779, 0x656B20, 0x656C20, + 0x656C65, 0x656D20, 0x656E20, 0x657265, 0x657420, 0x657465, 0x657474, 0x677920, + 0x686F67, 0x696E74, 0x697320, 0x6B2061, 0x6BF67A, 0x6D6567, 0x6D696E, 0x6E2061, + 0x6E616B, 0x6E656B, 0x6E656D, 0x6E7420, 0x6F6779, 0x732061, 0x737A65, 0x737A74, + 0x737AE1, 0x73E967, 0x742061, 0x747420, 0x74E173, 0x7A6572, 0xE16E20, 0xE97320, + ]), + new NGramsPlusLang('pl', [ + 0x20637A, 0x20646F, 0x206920, 0x206A65, 0x206B6F, 0x206D61, 0x206D69, 0x206E61, + 0x206E69, 0x206F64, 0x20706F, 0x207072, 0x207369, 0x207720, 0x207769, 0x207779, + 0x207A20, 0x207A61, 0x612070, 0x612077, 0x616E69, 0x636820, 0x637A65, 0x637A79, + 0x646F20, 0x647A69, 0x652070, 0x652073, 0x652077, 0x65207A, 0x65676F, 0x656A20, + 0x656D20, 0x656E69, 0x676F20, 0x696120, 0x696520, 0x69656A, 0x6B6120, 0x6B6920, + 0x6B6965, 0x6D6965, 0x6E6120, 0x6E6961, 0x6E6965, 0x6F2070, 0x6F7761, 0x6F7769, + 0x706F6C, 0x707261, 0x70726F, 0x70727A, 0x727A65, 0x727A79, 0x7369EA, 0x736B69, + 0x737461, 0x776965, 0x796368, 0x796D20, 0x7A6520, 0x7A6965, 0x7A7920, 0xF37720, + ]), + new NGramsPlusLang('ro', [ + 0x206120, 0x206163, 0x206361, 0x206365, 0x20636F, 0x206375, 0x206465, 0x206469, + 0x206C61, 0x206D61, 0x207065, 0x207072, 0x207365, 0x2073E3, 0x20756E, 0x20BA69, + 0x20EE6E, 0x612063, 0x612064, 0x617265, 0x617420, 0x617465, 0x617520, 0x636172, + 0x636F6E, 0x637520, 0x63E320, 0x646520, 0x652061, 0x652063, 0x652064, 0x652070, + 0x652073, 0x656120, 0x656920, 0x656C65, 0x656E74, 0x657374, 0x692061, 0x692063, + 0x692064, 0x692070, 0x696520, 0x696920, 0x696E20, 0x6C6120, 0x6C6520, 0x6C6F72, + 0x6C7569, 0x6E6520, 0x6E7472, 0x6F7220, 0x70656E, 0x726520, 0x726561, 0x727520, + 0x73E320, 0x746520, 0x747275, 0x74E320, 0x756920, 0x756C20, 0xBA6920, 0xEE6E20, + ]) + ]; + }; + + this.name = function(det) { + return (det && det.fC1Bytes) ? 'windows-1250' : 'ISO-8859-2'; + }; +}; +util.inherits(module.exports.ISO_8859_2, sbcs); + + +module.exports.ISO_8859_5 = function() { + this.byteMap = function() { + return [ + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, + 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, + 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, + 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0x20, 0xFE, 0xFF, + 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, + 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF, + 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, + 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, + 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, + 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF, + 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, + 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, + 0x20, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, + 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0x20, 0xFE, 0xFF + ]; + }; + + this.ngrams = function() { + return [ + 0x20D220, 0x20D2DE, 0x20D4DE, 0x20D7D0, 0x20D820, 0x20DAD0, 0x20DADE, 0x20DDD0, + 0x20DDD5, 0x20DED1, 0x20DFDE, 0x20DFE0, 0x20E0D0, 0x20E1DE, 0x20E1E2, 0x20E2DE, + 0x20E7E2, 0x20EDE2, 0xD0DDD8, 0xD0E2EC, 0xD3DE20, 0xD5DBEC, 0xD5DDD8, 0xD5E1E2, + 0xD5E220, 0xD820DF, 0xD8D520, 0xD8D820, 0xD8EF20, 0xDBD5DD, 0xDBD820, 0xDBECDD, + 0xDDD020, 0xDDD520, 0xDDD8D5, 0xDDD8EF, 0xDDDE20, 0xDDDED2, 0xDE20D2, 0xDE20DF, + 0xDE20E1, 0xDED220, 0xDED2D0, 0xDED3DE, 0xDED920, 0xDEDBEC, 0xDEDC20, 0xDEE1E2, + 0xDFDEDB, 0xDFE0D5, 0xDFE0D8, 0xDFE0DE, 0xE0D0D2, 0xE0D5D4, 0xE1E2D0, 0xE1E2D2, + 0xE1E2D8, 0xE1EF20, 0xE2D5DB, 0xE2DE20, 0xE2DEE0, 0xE2EC20, 0xE7E2DE, 0xEBE520 + ]; + }; + + this.name = function(det) { + return 'ISO-8859-5'; + }; + + this.language = function() { + return 'ru'; + }; +}; +util.inherits(module.exports.ISO_8859_5, sbcs); + + +module.exports.ISO_8859_6 = function() { + this.byteMap = function() { + return [ + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, + 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, + 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, + 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, + 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, + 0xD8, 0xD9, 0xDA, 0x20, 0x20, 0x20, 0x20, 0x20, + 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, + 0xE8, 0xE9, 0xEA, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20 + ]; + }; + + this.ngrams = function() { + return [ + 0x20C7E4, 0x20C7E6, 0x20C8C7, 0x20D9E4, 0x20E1EA, 0x20E4E4, 0x20E5E6, 0x20E8C7, + 0xC720C7, 0xC7C120, 0xC7CA20, 0xC7D120, 0xC7E420, 0xC7E4C3, 0xC7E4C7, 0xC7E4C8, + 0xC7E4CA, 0xC7E4CC, 0xC7E4CD, 0xC7E4CF, 0xC7E4D3, 0xC7E4D9, 0xC7E4E2, 0xC7E4E5, + 0xC7E4E8, 0xC7E4EA, 0xC7E520, 0xC7E620, 0xC7E6CA, 0xC820C7, 0xC920C7, 0xC920E1, + 0xC920E4, 0xC920E5, 0xC920E8, 0xCA20C7, 0xCF20C7, 0xCFC920, 0xD120C7, 0xD1C920, + 0xD320C7, 0xD920C7, 0xD9E4E9, 0xE1EA20, 0xE420C7, 0xE4C920, 0xE4E920, 0xE4EA20, + 0xE520C7, 0xE5C720, 0xE5C920, 0xE5E620, 0xE620C7, 0xE720C7, 0xE7C720, 0xE8C7E4, + 0xE8E620, 0xE920C7, 0xEA20C7, 0xEA20E5, 0xEA20E8, 0xEAC920, 0xEAD120, 0xEAE620 + ]; + }; + + this.name = function(det) { + return 'ISO-8859-6'; + }; + + this.language = function() { + return 'ar'; + }; +}; +util.inherits(module.exports.ISO_8859_6, sbcs); + + +module.exports.ISO_8859_7 = function() { + this.byteMap = function() { + return [ + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, + 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, + 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0xA1, 0xA2, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0xDC, 0x20, + 0xDD, 0xDE, 0xDF, 0x20, 0xFC, 0x20, 0xFD, 0xFE, + 0xC0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, + 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, + 0xF0, 0xF1, 0x20, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, + 0xF8, 0xF9, 0xFA, 0xFB, 0xDC, 0xDD, 0xDE, 0xDF, + 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, + 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, + 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, + 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0x20 + ]; + }; + + this.ngrams = function() { + return [ + 0x20E1ED, 0x20E1F0, 0x20E3E9, 0x20E4E9, 0x20E5F0, 0x20E720, 0x20EAE1, 0x20ECE5, + 0x20EDE1, 0x20EF20, 0x20F0E1, 0x20F0EF, 0x20F0F1, 0x20F3F4, 0x20F3F5, 0x20F4E7, + 0x20F4EF, 0xDFE120, 0xE120E1, 0xE120F4, 0xE1E920, 0xE1ED20, 0xE1F0FC, 0xE1F220, + 0xE3E9E1, 0xE5E920, 0xE5F220, 0xE720F4, 0xE7ED20, 0xE7F220, 0xE920F4, 0xE9E120, + 0xE9EADE, 0xE9F220, 0xEAE1E9, 0xEAE1F4, 0xECE520, 0xED20E1, 0xED20E5, 0xED20F0, + 0xEDE120, 0xEFF220, 0xEFF520, 0xF0EFF5, 0xF0F1EF, 0xF0FC20, 0xF220E1, 0xF220E5, + 0xF220EA, 0xF220F0, 0xF220F4, 0xF3E520, 0xF3E720, 0xF3F4EF, 0xF4E120, 0xF4E1E9, + 0xF4E7ED, 0xF4E7F2, 0xF4E9EA, 0xF4EF20, 0xF4EFF5, 0xF4F9ED, 0xF9ED20, 0xFEED20 + ]; + }; + + this.name = function(det) { + return (det && det.fC1Bytes) ? 'windows-1253' : 'ISO-8859-7'; + }; + + this.language = function() { + return 'el'; + }; +}; +util.inherits(module.exports.ISO_8859_7, sbcs); + +module.exports.ISO_8859_8 = function() { + + this.byteMap = function() { + return [ + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, + 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, + 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0xB5, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, + 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, + 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, + 0xF8, 0xF9, 0xFA, 0x20, 0x20, 0x20, 0x20, 0x20 + ]; + }; + + this.ngrams = function() { + return [ + new NGramsPlusLang('he', [ + 0x20E0E5, 0x20E0E7, 0x20E0E9, 0x20E0FA, 0x20E1E9, 0x20E1EE, 0x20E4E0, 0x20E4E5, + 0x20E4E9, 0x20E4EE, 0x20E4F2, 0x20E4F9, 0x20E4FA, 0x20ECE0, 0x20ECE4, 0x20EEE0, + 0x20F2EC, 0x20F9EC, 0xE0FA20, 0xE420E0, 0xE420E1, 0xE420E4, 0xE420EC, 0xE420EE, + 0xE420F9, 0xE4E5E0, 0xE5E020, 0xE5ED20, 0xE5EF20, 0xE5F820, 0xE5FA20, 0xE920E4, + 0xE9E420, 0xE9E5FA, 0xE9E9ED, 0xE9ED20, 0xE9EF20, 0xE9F820, 0xE9FA20, 0xEC20E0, + 0xEC20E4, 0xECE020, 0xECE420, 0xED20E0, 0xED20E1, 0xED20E4, 0xED20EC, 0xED20EE, + 0xED20F9, 0xEEE420, 0xEF20E4, 0xF0E420, 0xF0E920, 0xF0E9ED, 0xF2EC20, 0xF820E4, + 0xF8E9ED, 0xF9EC20, 0xFA20E0, 0xFA20E1, 0xFA20E4, 0xFA20EC, 0xFA20EE, 0xFA20F9, + ]), + new NGramsPlusLang('he', [ + 0x20E0E5, 0x20E0EC, 0x20E4E9, 0x20E4EC, 0x20E4EE, 0x20E4F0, 0x20E9F0, 0x20ECF2, + 0x20ECF9, 0x20EDE5, 0x20EDE9, 0x20EFE5, 0x20EFE9, 0x20F8E5, 0x20F8E9, 0x20FAE0, + 0x20FAE5, 0x20FAE9, 0xE020E4, 0xE020EC, 0xE020ED, 0xE020FA, 0xE0E420, 0xE0E5E4, + 0xE0EC20, 0xE0EE20, 0xE120E4, 0xE120ED, 0xE120FA, 0xE420E4, 0xE420E9, 0xE420EC, + 0xE420ED, 0xE420EF, 0xE420F8, 0xE420FA, 0xE4EC20, 0xE5E020, 0xE5E420, 0xE7E020, + 0xE9E020, 0xE9E120, 0xE9E420, 0xEC20E4, 0xEC20ED, 0xEC20FA, 0xECF220, 0xECF920, + 0xEDE9E9, 0xEDE9F0, 0xEDE9F8, 0xEE20E4, 0xEE20ED, 0xEE20FA, 0xEEE120, 0xEEE420, + 0xF2E420, 0xF920E4, 0xF920ED, 0xF920FA, 0xF9E420, 0xFAE020, 0xFAE420, 0xFAE5E9, + ]) + ]; + }; + + this.name = function(det) { + return (det && det.fC1Bytes) ? 'windows-1255' : 'ISO-8859-8'; + }; + + this.language = function() { + return 'he'; + }; + +}; +util.inherits(module.exports.ISO_8859_8, sbcs); + + +module.exports.ISO_8859_9 = function() { + this.byteMap = function() { + return [ + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, + 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, + 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0xAA, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0xB5, 0x20, 0x20, + 0x20, 0x20, 0xBA, 0x20, 0x20, 0x20, 0x20, 0x20, + 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, + 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, + 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0x20, + 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0x69, 0xFE, 0xDF, + 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, + 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, + 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0x20, + 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF + ]; + }; + + this.ngrams = function() { + return [ + 0x206261, 0x206269, 0x206275, 0x206461, 0x206465, 0x206765, 0x206861, 0x20696C, + 0x206B61, 0x206B6F, 0x206D61, 0x206F6C, 0x207361, 0x207461, 0x207665, 0x207961, + 0x612062, 0x616B20, 0x616C61, 0x616D61, 0x616E20, 0x616EFD, 0x617220, 0x617261, + 0x6172FD, 0x6173FD, 0x617961, 0x626972, 0x646120, 0x646520, 0x646920, 0x652062, + 0x65206B, 0x656469, 0x656E20, 0x657220, 0x657269, 0x657369, 0x696C65, 0x696E20, + 0x696E69, 0x697220, 0x6C616E, 0x6C6172, 0x6C6520, 0x6C6572, 0x6E2061, 0x6E2062, + 0x6E206B, 0x6E6461, 0x6E6465, 0x6E6520, 0x6E6920, 0x6E696E, 0x6EFD20, 0x72696E, + 0x72FD6E, 0x766520, 0x796120, 0x796F72, 0xFD6E20, 0xFD6E64, 0xFD6EFD, 0xFDF0FD + ]; + }; + + this.name = function(det) { + return (det && det.fC1Bytes) ? 'windows-1254' : 'ISO-8859-9'; + }; + + this.language = function() { + return 'tr'; + }; +}; +util.inherits(module.exports.ISO_8859_9, sbcs); + + +module.exports.windows_1251 = function() { + this.byteMap = function() { + return [ + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, + 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, + 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x90, 0x83, 0x20, 0x83, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x9A, 0x20, 0x9C, 0x9D, 0x9E, 0x9F, + 0x90, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x9A, 0x20, 0x9C, 0x9D, 0x9E, 0x9F, + 0x20, 0xA2, 0xA2, 0xBC, 0x20, 0xB4, 0x20, 0x20, + 0xB8, 0x20, 0xBA, 0x20, 0x20, 0x20, 0x20, 0xBF, + 0x20, 0x20, 0xB3, 0xB3, 0xB4, 0xB5, 0x20, 0x20, + 0xB8, 0x20, 0xBA, 0x20, 0xBC, 0xBE, 0xBE, 0xBF, + 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, + 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, + 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, + 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF, + 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, + 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, + 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, + 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF + ]; + }; + + this.ngrams = function() { + return [ + 0x20E220, 0x20E2EE, 0x20E4EE, 0x20E7E0, 0x20E820, 0x20EAE0, 0x20EAEE, 0x20EDE0, + 0x20EDE5, 0x20EEE1, 0x20EFEE, 0x20EFF0, 0x20F0E0, 0x20F1EE, 0x20F1F2, 0x20F2EE, + 0x20F7F2, 0x20FDF2, 0xE0EDE8, 0xE0F2FC, 0xE3EE20, 0xE5EBFC, 0xE5EDE8, 0xE5F1F2, + 0xE5F220, 0xE820EF, 0xE8E520, 0xE8E820, 0xE8FF20, 0xEBE5ED, 0xEBE820, 0xEBFCED, + 0xEDE020, 0xEDE520, 0xEDE8E5, 0xEDE8FF, 0xEDEE20, 0xEDEEE2, 0xEE20E2, 0xEE20EF, + 0xEE20F1, 0xEEE220, 0xEEE2E0, 0xEEE3EE, 0xEEE920, 0xEEEBFC, 0xEEEC20, 0xEEF1F2, + 0xEFEEEB, 0xEFF0E5, 0xEFF0E8, 0xEFF0EE, 0xF0E0E2, 0xF0E5E4, 0xF1F2E0, 0xF1F2E2, + 0xF1F2E8, 0xF1FF20, 0xF2E5EB, 0xF2EE20, 0xF2EEF0, 0xF2FC20, 0xF7F2EE, 0xFBF520 + ]; + }; + + this.name = function(det) { + return 'windows-1251'; + }; + + this.language = function() { + return 'ru'; + }; +}; +util.inherits(module.exports.windows_1251, sbcs); + + +module.exports.windows_1256 = function() { + this.byteMap = function() { + return [ + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, + 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, + 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x81, 0x20, 0x83, 0x20, 0x20, 0x20, 0x20, + 0x88, 0x20, 0x8A, 0x20, 0x9C, 0x8D, 0x8E, 0x8F, + 0x90, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x98, 0x20, 0x9A, 0x20, 0x9C, 0x20, 0x20, 0x9F, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0xAA, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0xB5, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, + 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, + 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0x20, + 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF, + 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, + 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, + 0x20, 0x20, 0x20, 0x20, 0xF4, 0x20, 0x20, 0x20, + 0x20, 0xF9, 0x20, 0xFB, 0xFC, 0x20, 0x20, 0xFF + ]; + }; + + this.ngrams = function() { + return [ + 0x20C7E1, 0x20C7E4, 0x20C8C7, 0x20DAE1, 0x20DDED, 0x20E1E1, 0x20E3E4, 0x20E6C7, + 0xC720C7, 0xC7C120, 0xC7CA20, 0xC7D120, 0xC7E120, 0xC7E1C3, 0xC7E1C7, 0xC7E1C8, + 0xC7E1CA, 0xC7E1CC, 0xC7E1CD, 0xC7E1CF, 0xC7E1D3, 0xC7E1DA, 0xC7E1DE, 0xC7E1E3, + 0xC7E1E6, 0xC7E1ED, 0xC7E320, 0xC7E420, 0xC7E4CA, 0xC820C7, 0xC920C7, 0xC920DD, + 0xC920E1, 0xC920E3, 0xC920E6, 0xCA20C7, 0xCF20C7, 0xCFC920, 0xD120C7, 0xD1C920, + 0xD320C7, 0xDA20C7, 0xDAE1EC, 0xDDED20, 0xE120C7, 0xE1C920, 0xE1EC20, 0xE1ED20, + 0xE320C7, 0xE3C720, 0xE3C920, 0xE3E420, 0xE420C7, 0xE520C7, 0xE5C720, 0xE6C7E1, + 0xE6E420, 0xEC20C7, 0xED20C7, 0xED20E3, 0xED20E6, 0xEDC920, 0xEDD120, 0xEDE420 + ]; + }; + + this.name = function(det) { + return 'windows-1256'; + }; + + this.language = function() { + return 'ar'; + }; +}; +util.inherits(module.exports.windows_1256, sbcs); + + +module.exports.KOI8_R = function() { + this.byteMap = function() { + return [ + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, + 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, + 0x78, 0x79, 0x7A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0xA3, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0xA3, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, + 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, + 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, + 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF, + 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, + 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, + 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, + 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF + ]; + }; + + this.ngrams = function() { + return [ + 0x20C4CF, 0x20C920, 0x20CBC1, 0x20CBCF, 0x20CEC1, 0x20CEC5, 0x20CFC2, 0x20D0CF, + 0x20D0D2, 0x20D2C1, 0x20D3CF, 0x20D3D4, 0x20D4CF, 0x20D720, 0x20D7CF, 0x20DAC1, + 0x20DCD4, 0x20DED4, 0xC1CEC9, 0xC1D4D8, 0xC5CCD8, 0xC5CEC9, 0xC5D3D4, 0xC5D420, + 0xC7CF20, 0xC920D0, 0xC9C520, 0xC9C920, 0xC9D120, 0xCCC5CE, 0xCCC920, 0xCCD8CE, + 0xCEC120, 0xCEC520, 0xCEC9C5, 0xCEC9D1, 0xCECF20, 0xCECFD7, 0xCF20D0, 0xCF20D3, + 0xCF20D7, 0xCFC7CF, 0xCFCA20, 0xCFCCD8, 0xCFCD20, 0xCFD3D4, 0xCFD720, 0xCFD7C1, + 0xD0CFCC, 0xD0D2C5, 0xD0D2C9, 0xD0D2CF, 0xD2C1D7, 0xD2C5C4, 0xD3D120, 0xD3D4C1, + 0xD3D4C9, 0xD3D4D7, 0xD4C5CC, 0xD4CF20, 0xD4CFD2, 0xD4D820, 0xD9C820, 0xDED4CF + ]; + }; + + this.name = function(det) { + return 'KOI8-R'; + }; + + this.language = function() { + return 'ru'; + }; +}; +util.inherits(module.exports.KOI8_R, sbcs); + + +/* +module.exports.ISO_8859_7 = function() { + this.byteMap = function() { + return [ + + ]; + }; + + this.ngrams = function() { + return [ + + ]; + }; + + this.name = function(det) { + if (typeof det == 'undefined') + return 'ISO-8859-7'; + return det.fC1Bytes ? 'windows-1253' : 'ISO-8859-7'; + }; + + this.language = function() { + return 'el'; + }; +}; +util.inherits(module.exports.ISO_8859_7, sbcs); +*/ + diff --git a/node_modules/chardet/encoding/unicode.js b/node_modules/chardet/encoding/unicode.js new file mode 100644 index 0000000..6458d79 --- /dev/null +++ b/node_modules/chardet/encoding/unicode.js @@ -0,0 +1,112 @@ +'use strict'; +var util = require('util'), + Match = require ('../match'); + +/** + * This class matches UTF-16 and UTF-32, both big- and little-endian. The + * BOM will be used if it is present. + */ +module.exports.UTF_16BE = function() { + this.name = function() { + return 'UTF-16BE'; + }; + this.match = function(det) { + var input = det.fRawInput; + + if (input.length >= 2 && ((input[0] & 0xff) == 0xfe && (input[1] & 0xff) == 0xff)) { + return new Match(det, this, 100); // confidence = 100 + } + + // TODO: Do some statistics to check for unsigned UTF-16BE + return null; + }; +}; + +module.exports.UTF_16LE = function() { + this.name = function() { + return 'UTF-16LE'; + }; + this.match = function(det) { + var input = det.fRawInput; + + if (input.length >= 2 && ((input[0] & 0xff) == 0xff && (input[1] & 0xff) == 0xfe)) { + // LE BOM is present. + if (input.length >= 4 && input[2] == 0x00 && input[3] == 0x00) { + // It is probably UTF-32 LE, not UTF-16 + return null; + } + return new Match(det, this, 100); // confidence = 100 + } + + // TODO: Do some statistics to check for unsigned UTF-16LE + return null; + } +}; + +function UTF_32() {}; +UTF_32.prototype.match = function(det) { + var input = det.fRawInput, + limit = (det.fRawLength / 4) * 4, + numValid = 0, + numInvalid = 0, + hasBOM = false, + confidence = 0; + + if (limit == 0) { + return null; + } + + if (this.getChar(input, 0) == 0x0000FEFF) { + hasBOM = true; + } + + for (var i = 0; i < limit; i += 4) { + var ch = this.getChar(input, i); + + if (ch < 0 || ch >= 0x10FFFF || (ch >= 0xD800 && ch <= 0xDFFF)) { + numInvalid += 1; + } else { + numValid += 1; + } + } + + // Cook up some sort of confidence score, based on presence of a BOM + // and the existence of valid and/or invalid multi-byte sequences. + if (hasBOM && numInvalid == 0) { + confidence = 100; + } else if (hasBOM && numValid > numInvalid * 10) { + confidence = 80; + } else if (numValid > 3 && numInvalid == 0) { + confidence = 100; + } else if (numValid > 0 && numInvalid == 0) { + confidence = 80; + } else if (numValid > numInvalid * 10) { + // Probably corrupt UTF-32BE data. Valid sequences aren't likely by chance. + confidence = 25; + } + + // return confidence == 0 ? null : new CharsetMatch(det, this, confidence); + return confidence == 0 ? null : new Match(det, this, confidence); +}; + +module.exports.UTF_32BE = function() { + this.name = function() { + return 'UTF-32BE'; + }; + this.getChar = function(input, index) { + return (input[index + 0] & 0xff) << 24 | (input[index + 1] & 0xff) << 16 | + (input[index + 2] & 0xff) << 8 | (input[index + 3] & 0xff); + }; +}; +util.inherits(module.exports.UTF_32BE, UTF_32); + +module.exports.UTF_32LE = function() { + this.name = function() { + return 'UTF-32LE'; + }; + this.getChar = function(input, index) { + return (input[index + 3] & 0xff) << 24 | (input[index + 2] & 0xff) << 16 | + (input[index + 1] & 0xff) << 8 | (input[index + 0] & 0xff); + }; +}; +util.inherits(module.exports.UTF_32LE, UTF_32); diff --git a/node_modules/chardet/encoding/utf8.js b/node_modules/chardet/encoding/utf8.js new file mode 100644 index 0000000..c996ce2 --- /dev/null +++ b/node_modules/chardet/encoding/utf8.js @@ -0,0 +1,84 @@ + +var Match = require ('../match'); + +/** + * Charset recognizer for UTF-8 + */ +module.exports = function() { + this.name = function() { + return 'UTF-8'; + }; + this.match = function(det) { + + var hasBOM = false, + numValid = 0, + numInvalid = 0, + input = det.fRawInput, + trailBytes = 0, + confidence; + + if (det.fRawLength >= 3 && + (input[0] & 0xff) == 0xef && (input[1] & 0xff) == 0xbb && (input[2] & 0xff) == 0xbf) { + hasBOM = true; + } + + // Scan for multi-byte sequences + for (var i = 0; i < det.fRawLength; i++) { + var b = input[i]; + if ((b & 0x80) == 0) + continue; // ASCII + + // Hi bit on char found. Figure out how long the sequence should be + if ((b & 0x0e0) == 0x0c0) { + trailBytes = 1; + } else if ((b & 0x0f0) == 0x0e0) { + trailBytes = 2; + } else if ((b & 0x0f8) == 0xf0) { + trailBytes = 3; + } else { + numInvalid++; + if (numInvalid > 5) + break; + trailBytes = 0; + } + + // Verify that we've got the right number of trail bytes in the sequence + for (;;) { + i++; + if (i >= det.fRawLength) + break; + + if ((input[i] & 0xc0) != 0x080) { + numInvalid++; + break; + } + if (--trailBytes == 0) { + numValid++; + break; + } + } + } + + // Cook up some sort of confidence score, based on presense of a BOM + // and the existence of valid and/or invalid multi-byte sequences. + confidence = 0; + if (hasBOM && numInvalid == 0) + confidence = 100; + else if (hasBOM && numValid > numInvalid * 10) + confidence = 80; + else if (numValid > 3 && numInvalid == 0) + confidence = 100; + else if (numValid > 0 && numInvalid == 0) + confidence = 80; + else if (numValid == 0 && numInvalid == 0) + // Plain ASCII. + confidence = 10; + else if (numValid > numInvalid * 10) + // Probably corruput utf-8 data. Valid sequences aren't likely by chance. + confidence = 25; + else + return null + + return new Match(det, this, confidence); + }; +}; diff --git a/node_modules/chardet/index.js b/node_modules/chardet/index.js new file mode 100644 index 0000000..e5bcedd --- /dev/null +++ b/node_modules/chardet/index.js @@ -0,0 +1,117 @@ + +var fs = require('fs'); + +var utf8 = require('./encoding/utf8'), + unicode = require('./encoding/unicode'), + mbcs = require('./encoding/mbcs'), + sbcs = require('./encoding/sbcs'), + iso2022 = require('./encoding/iso2022'); + +var self = this; + +var recognisers = [ + new utf8, + new unicode.UTF_16BE, + new unicode.UTF_16LE, + new unicode.UTF_32BE, + new unicode.UTF_32LE, + new mbcs.sjis, + new mbcs.big5, + new mbcs.euc_jp, + new mbcs.euc_kr, + new mbcs.gb_18030, + new iso2022.ISO_2022_JP, + new iso2022.ISO_2022_KR, + new iso2022.ISO_2022_CN, + new sbcs.ISO_8859_1, + new sbcs.ISO_8859_2, + new sbcs.ISO_8859_5, + new sbcs.ISO_8859_6, + new sbcs.ISO_8859_7, + new sbcs.ISO_8859_8, + new sbcs.ISO_8859_9, + new sbcs.windows_1251, + new sbcs.windows_1256, + new sbcs.KOI8_R +]; + +module.exports.detect = function(buffer) { + + // Tally up the byte occurence statistics. + var fByteStats = []; + for (var i = 0; i < 256; i++) + fByteStats[i] = 0; + + for (var i = buffer.length - 1; i >= 0; i--) + fByteStats[buffer[i] & 0x00ff]++; + + var fC1Bytes = false; + for (var i = 0x80; i <= 0x9F; i += 1) { + if (fByteStats[i] != 0) { + fC1Bytes = true; + break; + } + } + + var context = { + fByteStats: fByteStats, + fC1Bytes: fC1Bytes, + fRawInput: buffer, + fRawLength: buffer.length, + fInputBytes: buffer, + fInputLen: buffer.length + }; + + var match = recognisers.map(function(rec) { + return rec.match(context); + }).filter(function(match) { + return !!match; + }).sort(function(a, b) { + return a.confidence - b.confidence; + }).pop(); + + return match ? match.name : null; +}; + +module.exports.detectFile = function(filepath, opts, cb) { + if (typeof opts === 'function') { + cb = opts; + opts = undefined; + } + + var fd; + + var handler = function(err, buffer) { + if (fd) { + fs.closeSync(fd); + } + + if (err) return cb(err, null); + cb(null, self.detect(buffer)); + }; + + if (opts && opts.sampleSize) { + fd = fs.openSync(filepath, 'r'), + sample = new Buffer(opts.sampleSize); + + fs.read(fd, sample, 0, opts.sampleSize, null, function(err) { + handler(err, sample); + }); + return; + } + + fs.readFile(filepath, handler); +}; + +module.exports.detectFileSync = function(filepath, opts) { + if (opts && opts.sampleSize) { + var fd = fs.openSync(filepath, 'r'), + sample = new Buffer(opts.sampleSize); + + fs.readSync(fd, sample, 0, opts.sampleSize); + fs.closeSync(fd); + return self.detect(sample); + } + + return self.detect(fs.readFileSync(filepath)); +}; diff --git a/node_modules/chardet/match.js b/node_modules/chardet/match.js new file mode 100644 index 0000000..d52faa2 --- /dev/null +++ b/node_modules/chardet/match.js @@ -0,0 +1,6 @@ + +module.exports = function(det, rec, confidence, name, lang) { + this.confidence = confidence; + this.name = name || rec.name(det); + this.lang = lang; +}; diff --git a/node_modules/chardet/package.json b/node_modules/chardet/package.json new file mode 100644 index 0000000..0e6cdb3 --- /dev/null +++ b/node_modules/chardet/package.json @@ -0,0 +1,106 @@ +{ + "_args": [ + [ + { + "raw": "chardet@^0.4.0", + "scope": null, + "escapedName": "chardet", + "name": "chardet", + "rawSpec": "^0.4.0", + "spec": ">=0.4.0 <0.5.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\external-editor" + ] + ], + "_from": "chardet@>=0.4.0 <0.5.0", + "_id": "chardet@0.4.2", + "_inCache": true, + "_location": "/chardet", + "_nodeVersion": "7.6.0", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/chardet-0.4.2.tgz_1511730123536_0.8843515114858747" + }, + "_npmUser": { + "name": "runk", + "email": "deadrunk@gmail.com" + }, + "_npmVersion": "4.1.2", + "_phantomChildren": {}, + "_requested": { + "raw": "chardet@^0.4.0", + "scope": null, + "escapedName": "chardet", + "name": "chardet", + "rawSpec": "^0.4.0", + "spec": ">=0.4.0 <0.5.0", + "type": "range" + }, + "_requiredBy": [ + "/external-editor" + ], + "_resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", + "_shasum": "b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2", + "_shrinkwrap": null, + "_spec": "chardet@^0.4.0", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\external-editor", + "author": { + "name": "Dmitry Shirokov", + "email": "deadrunk@gmail.com" + }, + "bugs": { + "url": "http://github.com/runk/node-chardet/issues" + }, + "contributors": [ + { + "name": "@spikying" + } + ], + "dependencies": {}, + "description": "Character detector", + "devDependencies": { + "github-publish-release": "^4.0.0", + "mocha": "^4.0.1" + }, + "directories": { + "test": "test" + }, + "dist": { + "shasum": "b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2", + "tarball": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz" + }, + "engine": { + "node": ">=4" + }, + "gitHead": "06ef1021ea35e1615e1641655cc405b2ba74e0c2", + "homepage": "https://github.com/runk/node-chardet", + "keywords": [ + "encoding", + "character", + "utf8", + "detector", + "chardet", + "icu" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "runk", + "email": "deadrunk@gmail.com" + } + ], + "name": "chardet", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/runk/node-chardet.git" + }, + "scripts": { + "release": "scripts/release", + "test": "mocha -R spec --recursive" + }, + "version": "0.4.2" +} diff --git a/node_modules/chardet/yarn.lock b/node_modules/chardet/yarn.lock new file mode 100644 index 0000000..6c5214b --- /dev/null +++ b/node_modules/chardet/yarn.lock @@ -0,0 +1,364 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +agent-base@2: + version "2.1.1" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-2.1.1.tgz#d6de10d5af6132d5bd692427d46fc538539094c7" + dependencies: + extend "~3.0.0" + semver "~5.0.1" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + +brace-expansion@^1.1.7: + version "1.1.8" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +browser-stdout@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f" + +commander@2.11.0: + version "2.11.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" + +commander@2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" + dependencies: + graceful-readlink ">= 1.0.0" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +debug@2, debug@^2.2.0: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + dependencies: + ms "2.0.0" + +debug@2.6.8: + version "2.6.8" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" + dependencies: + ms "2.0.0" + +debug@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + dependencies: + ms "2.0.0" + +diff@3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9" + +diff@3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.1.tgz#aa8567a6eed03c531fc89d3f711cd0e5259dec75" + +diff@^3.1.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.4.0.tgz#b1d85507daf3964828de54b37d0d73ba67dda56c" + +escape-string-regexp@1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +extend@3, extend@~3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" + +follow-redirects@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-0.0.7.tgz#34b90bab2a911aa347571da90f22bd36ecd8a919" + dependencies: + debug "^2.2.0" + stream-consume "^0.1.0" + +formatio@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/formatio/-/formatio-1.2.0.tgz#f3b2167d9068c4698a8d51f4f760a39a54d818eb" + dependencies: + samsam "1.x" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +github-publish-release@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/github-publish-release/-/github-publish-release-4.0.0.tgz#daa538edad0f5e9d4d831c58dd83b94c1ad0fd35" + dependencies: + github "^1.1.2" + lodash "^4.17.4" + mocha "^3.1.0" + sinon "^2.1.0" + +github@^1.1.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/github/-/github-1.4.0.tgz#60aed8f16ffe381a3ca6dc6dba5bdd64445b7856" + dependencies: + follow-redirects "0.0.7" + https-proxy-agent "^1.0.0" + mime "^1.2.11" + +glob@7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.2" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +"graceful-readlink@>= 1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" + +growl@1.10.3: + version "1.10.3" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.3.tgz#1926ba90cf3edfe2adb4927f5880bc22c66c790f" + +growl@1.9.2: + version "1.9.2" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f" + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + +has-flag@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" + +he@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" + +https-proxy-agent@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz#35f7da6c48ce4ddbfa264891ac593ee5ff8671e6" + dependencies: + agent-base "2" + debug "2" + extend "3" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + +json3@3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" + +lodash._baseassign@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e" + dependencies: + lodash._basecopy "^3.0.0" + lodash.keys "^3.0.0" + +lodash._basecopy@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" + +lodash._basecreate@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz#1bc661614daa7fc311b7d03bf16806a0213cf821" + +lodash._getnative@^3.0.0: + version "3.9.1" + resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" + +lodash._isiterateecall@^3.0.0: + version "3.0.9" + resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" + +lodash.create@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lodash.create/-/lodash.create-3.1.1.tgz#d7f2849f0dbda7e04682bb8cd72ab022461debe7" + dependencies: + lodash._baseassign "^3.0.0" + lodash._basecreate "^3.0.0" + lodash._isiterateecall "^3.0.0" + +lodash.isarguments@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" + +lodash.isarray@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" + +lodash.keys@^3.0.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" + dependencies: + lodash._getnative "^3.0.0" + lodash.isarguments "^3.0.0" + lodash.isarray "^3.0.0" + +lodash@^4.17.4: + version "4.17.4" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" + +lolex@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/lolex/-/lolex-1.6.0.tgz#3a9a0283452a47d7439e72731b9e07d7386e49f6" + +mime@^1.2.11: + version "1.4.1" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" + +minimatch@^3.0.2, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +mkdirp@0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +mocha@^3.1.0: + version "3.5.3" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.5.3.tgz#1e0480fe36d2da5858d1eb6acc38418b26eaa20d" + dependencies: + browser-stdout "1.3.0" + commander "2.9.0" + debug "2.6.8" + diff "3.2.0" + escape-string-regexp "1.0.5" + glob "7.1.1" + growl "1.9.2" + he "1.1.1" + json3 "3.3.2" + lodash.create "3.1.1" + mkdirp "0.5.1" + supports-color "3.1.2" + +mocha@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-4.0.1.tgz#0aee5a95cf69a4618820f5e51fa31717117daf1b" + dependencies: + browser-stdout "1.3.0" + commander "2.11.0" + debug "3.1.0" + diff "3.3.1" + escape-string-regexp "1.0.5" + glob "7.1.2" + growl "1.10.3" + he "1.1.1" + mkdirp "0.5.1" + supports-color "4.4.0" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + +native-promise-only@^0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/native-promise-only/-/native-promise-only-0.8.1.tgz#20a318c30cb45f71fe7adfbf7b21c99c1472ef11" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-to-regexp@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.7.0.tgz#59fde0f435badacba103a84e9d3bc64e96b9937d" + dependencies: + isarray "0.0.1" + +samsam@1.x, samsam@^1.1.3: + version "1.3.0" + resolved "https://registry.yarnpkg.com/samsam/-/samsam-1.3.0.tgz#8d1d9350e25622da30de3e44ba692b5221ab7c50" + +semver@~5.0.1: + version "5.0.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.0.3.tgz#77466de589cd5d3c95f138aa78bc569a3cb5d27a" + +sinon@^2.1.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/sinon/-/sinon-2.4.1.tgz#021fd64b54cb77d9d2fb0d43cdedfae7629c3a36" + dependencies: + diff "^3.1.0" + formatio "1.2.0" + lolex "^1.6.0" + native-promise-only "^0.8.1" + path-to-regexp "^1.7.0" + samsam "^1.1.3" + text-encoding "0.6.4" + type-detect "^4.0.0" + +stream-consume@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/stream-consume/-/stream-consume-0.1.0.tgz#a41ead1a6d6081ceb79f65b061901b6d8f3d1d0f" + +supports-color@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5" + dependencies: + has-flag "^1.0.0" + +supports-color@4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.4.0.tgz#883f7ddabc165142b2a61427f3352ded195d1a3e" + dependencies: + has-flag "^2.0.0" + +text-encoding@0.6.4: + version "0.6.4" + resolved "https://registry.yarnpkg.com/text-encoding/-/text-encoding-0.6.4.tgz#e399a982257a276dae428bb92845cb71bdc26d19" + +type-detect@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.3.tgz#0e3f2670b44099b0b46c284d136a7ef49c74c2ea" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" diff --git a/node_modules/circular-json/.npmignore b/node_modules/circular-json/.npmignore new file mode 100644 index 0000000..8334e08 --- /dev/null +++ b/node_modules/circular-json/.npmignore @@ -0,0 +1,9 @@ +coverage/* +src/* +test/* +template/* +node_modules/* +build/*.amd.js +.travis.yml +Makefile +index.html diff --git a/node_modules/circular-json/LICENSE.txt b/node_modules/circular-json/LICENSE.txt new file mode 100644 index 0000000..e42a04b --- /dev/null +++ b/node_modules/circular-json/LICENSE.txt @@ -0,0 +1,19 @@ +Copyright (C) 2013-2017 by Andrea Giammarchi - @WebReflection + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/circular-json/README.md b/node_modules/circular-json/README.md new file mode 100644 index 0000000..9cc003e --- /dev/null +++ b/node_modules/circular-json/README.md @@ -0,0 +1,135 @@ +CircularJSON +============ + +![Downloads](https://img.shields.io/npm/dm/circular-json.svg) [![Build Status](https://travis-ci.org/WebReflection/circular-json.svg?branch=master)](https://travis-ci.org/WebReflection/circular-json) [![Coverage Status](https://coveralls.io/repos/github/WebReflection/circular-json/badge.svg?branch=master)](https://coveralls.io/github/WebReflection/circular-json?branch=master) [![donate](https://img.shields.io/badge/$-donate-ff69b4.svg?maxAge=2592000&style=flat)](https://github.com/WebReflection/donate) + +Serializes and deserializes otherwise valid JSON objects containing circular references into and from a specialized JSON format. + +- - - + +### A Working Solution To A Common Problem +A usage example: + +```JavaScript +var object = {}; +object.arr = [ + object, object +]; +object.arr.push(object.arr); +object.obj = object; + +var serialized = CircularJSON.stringify(object); +// '{"arr":["~","~","~arr"],"obj":"~"}' +// NOTE: CircularJSON DOES NOT parse JS +// it handles receiver and reviver callbacks + +var unserialized = CircularJSON.parse(serialized); +// { arr: [ [Circular], [Circular] ], +// obj: [Circular] } + +unserialized.obj === unserialized; +unserialized.arr[0] === unserialized; +unserialized.arr.pop() === unserialized.arr; +``` + +A quick summary: + + * uses `~` as a special prefix symbol to denote which parent the reference belongs to (i.e. `~root~child1~child2`) + * reasonably fast in both serialization and deserialization + * compact serialization for easier and slimmer transportation across environments + * [tested and covered](test/circular-json.js) over nasty structures too + * compatible with all JavaScript engines + +Node Installation & Usage +============ + +```bash +npm install --save circular-json +``` + +```javascript +'use strict'; + +var + CircularJSON = require('circular-json'), + obj = { foo: 'bar' }, + str +; + +obj.self = obj; +str = CircularJSON.stringify(obj); +``` + +There are no dependencies. + +Browser Installation & Usage +================ + +* Global: +* AMD: +* CommonJS: + +(generated via [gitstrap](https://github.com/WebReflection/gitstrap)) + +```html + +``` + +```javascript +'use strict'; + +var CircularJSON = window.CircularJSON + , obj = { foo: 'bar' } + , str + ; + +obj.self = obj; +str = CircularJSON.stringify(obj); +``` + +NOTE: Platforms without native JSON (i.e. MSIE <= 8) requires `json3.js` or similar. + +It is also *a bad idea* to `CircularJSON.parse(JSON.stringify(object))` because of those manipulation used in `CircularJSON.stringify()` able to make parsing safe and secure. + +As summary: `CircularJSON.parse(CircularJSON.stringify(object))` is the way to go, same is for `JSON.parse(JSON.stringify(object))`. + +API +=== + +It's the same as native JSON, except the fourth parameter `placeholder`, which circular references to be replaced with `"[Circular]"` (i.e. for logging). + +* CircularJSON.stringify(object, replacer, spacer, placeholder) +* CircularJSON.parse(string, reviver) + +Bear in mind `JSON.parse(CircularJSON.stringify(object))` will work but not produce the expected output. + +Similar Libraries +======= + +### Why Not the [@izs](https://twitter.com/izs) One +The module [json-stringify-safe](https://github.com/isaacs/json-stringify-safe) seems to be for `console.log()` but it's completely pointless for `JSON.parse()`, being latter one unable to retrieve back the initial structure. Here an example: + +```JavaScript +// a logged object with circular references +{ + "circularRef": "[Circular]", + "list": [ + "[Circular]", + "[Circular]" + ] +} +// what do we do with above output ? +``` + +Just type this in your `node` console: `var o = {}; o.a = o; console.log(o);`. The output will be `{ a: [Circular] }` ... good, but that ain't really solving the problem. + +However, if that's all you need, the function used to create that kind of output is probably faster than `CircularJSON` and surely fits in less lines of code. + + +### Why Not {{put random name}} Solution +So here the thing: circular references can be wrong but, if there is a need for them, any attempt to ignore them or remove them can be considered just a failure. + +Not because the method is bad or it's not working, simply because the circular info, the one we needed and used in the first place, is lost! + +In this case, `CircularJSON` does even more than just solve circular and recursions: it maps all same objects so that less memory is used as well on deserialization as less bandwidth too! +It's able to redefine those references back later on so the way we store is the way we retrieve and in a reasonably performant way, also trusting the snappy and native `JSON` methods to iterate. diff --git a/node_modules/circular-json/build/circular-json.js b/node_modules/circular-json/build/circular-json.js new file mode 100644 index 0000000..acf1c25 --- /dev/null +++ b/node_modules/circular-json/build/circular-json.js @@ -0,0 +1,2 @@ +/*! (C) WebReflection Mit Style License */ +var CircularJSON=function(e,t){function l(e,t,o){var u=[],f=[e],l=[e],c=[o?n:"[Circular]"],h=e,p=1,d;return function(e,v){return t&&(v=t.call(this,e,v)),e!==""&&(h!==this&&(d=p-a.call(f,this)-1,p-=d,f.splice(p,f.length),u.splice(p-1,u.length),h=this),typeof v=="object"&&v?(a.call(f,v)<0&&f.push(h=v),p=f.length,d=a.call(l,v),d<0?(d=l.push(v)-1,o?(u.push((""+e).replace(s,r)),c[d]=n+u.join(n)):c[d]=c[0]):v=c[d]):typeof v=="string"&&o&&(v=v.replace(r,i).replace(n,r))),v}}function c(e,t){for(var r=0,i=t.length;r=0.3.1 <0.4.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\flat-cache" + ] + ], + "_from": "circular-json@>=0.3.1 <0.4.0", + "_id": "circular-json@0.3.3", + "_inCache": true, + "_location": "/circular-json", + "_nodeVersion": "8.2.1", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/circular-json-0.3.3.tgz_1500879385194_0.5629333322867751" + }, + "_npmUser": { + "name": "webreflection", + "email": "andrea.giammarchi@gmail.com" + }, + "_npmVersion": "5.3.0", + "_phantomChildren": {}, + "_requested": { + "raw": "circular-json@^0.3.1", + "scope": null, + "escapedName": "circular-json", + "name": "circular-json", + "rawSpec": "^0.3.1", + "spec": ">=0.3.1 <0.4.0", + "type": "range" + }, + "_requiredBy": [ + "/flat-cache" + ], + "_resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", + "_shasum": "815c99ea84f6809529d2f45791bdf82711352d66", + "_shrinkwrap": null, + "_spec": "circular-json@^0.3.1", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\flat-cache", + "author": { + "name": "Andrea Giammarchi", + "url": "http://webreflection.blogspot.com/" + }, + "bugs": { + "url": "https://github.com/WebReflection/circular-json/issues" + }, + "dependencies": {}, + "description": "JSON does not handle circular references. This version does", + "devDependencies": { + "coveralls": "^2.13.0", + "istanbul": "^0.4.5", + "tiny-cdn": "^0.7.0", + "tressa": "^0.3.1" + }, + "directories": {}, + "dist": { + "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", + "shasum": "815c99ea84f6809529d2f45791bdf82711352d66", + "tarball": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz" + }, + "generator": "https://github.com/WebReflection/gitstrap", + "gitHead": "28b3b0440554f81f3c6e7b10f7dcec9af9588756", + "homepage": "https://github.com/WebReflection/circular-json", + "keywords": [ + "JSON", + "circular", + "reference", + "recursive", + "recursion", + "parse", + "stringify" + ], + "license": "MIT", + "main": "./build/circular-json.node.js", + "maintainers": [ + { + "name": "webreflection", + "email": "andrea.giammarchi@gmail.com" + } + ], + "name": "circular-json", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/WebReflection/circular-json.git" + }, + "scripts": { + "coveralls": "cat ./coverage/lcov.info | coveralls", + "test": "istanbul cover test/circular-json.js", + "web": "$(sleep 2 && open http://0.0.0.0:7151/) & tiny-cdn run ./" + }, + "version": "0.3.3" +} diff --git a/node_modules/circular-json/template/license.after b/node_modules/circular-json/template/license.after new file mode 100644 index 0000000..d7365df --- /dev/null +++ b/node_modules/circular-json/template/license.after @@ -0,0 +1,2 @@ + +*/ diff --git a/node_modules/circular-json/template/license.before b/node_modules/circular-json/template/license.before new file mode 100644 index 0000000..bf11147 --- /dev/null +++ b/node_modules/circular-json/template/license.before @@ -0,0 +1 @@ +/*! diff --git a/node_modules/cli-width/.npmignore b/node_modules/cli-width/.npmignore new file mode 100644 index 0000000..2db169c --- /dev/null +++ b/node_modules/cli-width/.npmignore @@ -0,0 +1,3 @@ +test +coverage +CHANGELOG.md diff --git a/node_modules/cli-width/.travis.yml b/node_modules/cli-width/.travis.yml new file mode 100644 index 0000000..7a188cb --- /dev/null +++ b/node_modules/cli-width/.travis.yml @@ -0,0 +1,11 @@ +language: node_js +node_js: + - '0.10' + - '0.11' + - '0.12' + - 'iojs-1' + - 'iojs-2' + - 'iojs-3' + - '4.0' +after_script: + - npm run coveralls diff --git a/node_modules/cli-width/CHANGELOG.md b/node_modules/cli-width/CHANGELOG.md new file mode 100644 index 0000000..c46429b --- /dev/null +++ b/node_modules/cli-width/CHANGELOG.md @@ -0,0 +1,16 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +# [2.2.0](https://github.com/knownasilya/cli-width/compare/v2.1.1...v2.2.0) (2017-08-22) + + +### Features + +* return default if env is 0 ([1833baf](https://github.com/knownasilya/cli-width/commit/1833baf)), closes [#9](https://github.com/knownasilya/cli-width/issues/9) + + + + +## [2.1.1](https://github.com/knownasilya/cli-width/compare/v2.1.0...v2.1.1) (2017-08-22) diff --git a/node_modules/cli-width/LICENSE b/node_modules/cli-width/LICENSE new file mode 100644 index 0000000..173ed31 --- /dev/null +++ b/node_modules/cli-width/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2015, Ilya Radchenko + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/cli-width/README.md b/node_modules/cli-width/README.md new file mode 100644 index 0000000..b7157ea --- /dev/null +++ b/node_modules/cli-width/README.md @@ -0,0 +1,72 @@ +cli-width +========= + +Get stdout window width, with four fallbacks, `tty`, `output.columns`, a custom environment variable and then a default. + +[![npm version](https://badge.fury.io/js/cli-width.svg)](http://badge.fury.io/js/cli-width) +[![Build Status](https://travis-ci.org/knownasilya/cli-width.svg)](https://travis-ci.org/knownasilya/cli-width) +[![Coverage Status](https://coveralls.io/repos/knownasilya/cli-width/badge.svg?branch=master&service=github)](https://coveralls.io/github/knownasilya/cli-width?branch=master) + +## Usage + +``` +npm install --save cli-width +``` + +```js +'use strict'; + +var cliWidth = require('cli-width'); + +cliWidth(); // maybe 204 :) +``` + +You can also set the `CLI_WIDTH` environment variable. + +If none of the methods are supported, and the environment variable isn't set, +the default width value is going to be `0`, that can be changed using the configurable `options`. + +## API + +### cliWidth([options]) + +`cliWidth` can be configured using an `options` parameter, the possible properties are: + +- **defaultWidth**\ Defines a default value to be used if none of the methods are available, defaults to `0` +- **output**\ A stream to be used to read width values from, defaults to `process.stdout` +- **tty**\ TTY module to try to read width from as a fallback, defaults to `require('tty')` + + +### Examples + +Defining both a default width value and a stream output to try to read from: + +```js +var cliWidth = require('cli-width'); +var ttys = require('ttys'); + +cliWidth({ + defaultWidth: 80, + output: ttys.output +}); +``` + +Defines a different tty module to read width from: + +```js +var cliWidth = require('cli-width'); +var ttys = require('ttys'); + +cliWidth({ + tty: ttys +}); +``` + +## Tests + +```bash +npm install +npm test +``` + +Coverage can be generated with `npm run coverage`. diff --git a/node_modules/cli-width/index.js b/node_modules/cli-width/index.js new file mode 100644 index 0000000..de939f3 --- /dev/null +++ b/node_modules/cli-width/index.js @@ -0,0 +1,49 @@ +'use strict'; + +exports = module.exports = cliWidth; + +function normalizeOpts(options) { + var defaultOpts = { + defaultWidth: 0, + output: process.stdout, + tty: require('tty') + }; + + if (!options) { + return defaultOpts; + } else { + Object.keys(defaultOpts).forEach(function (key) { + if (!options[key]) { + options[key] = defaultOpts[key]; + } + }); + + return options; + } +} + +function cliWidth(options) { + var opts = normalizeOpts(options); + + if (opts.output.getWindowSize) { + return opts.output.getWindowSize()[0] || opts.defaultWidth; + } else { + if (opts.tty.getWindowSize) { + return opts.tty.getWindowSize()[1] || opts.defaultWidth; + } else { + if (opts.output.columns) { + return opts.output.columns; + } else { + if (process.env.CLI_WIDTH) { + var width = parseInt(process.env.CLI_WIDTH, 10); + + if (!isNaN(width) && width !== 0) { + return width; + } + } + } + + return opts.defaultWidth; + } + } +}; diff --git a/node_modules/cli-width/package.json b/node_modules/cli-width/package.json new file mode 100644 index 0000000..5655a1c --- /dev/null +++ b/node_modules/cli-width/package.json @@ -0,0 +1,99 @@ +{ + "_args": [ + [ + { + "raw": "cli-width@^2.0.0", + "scope": null, + "escapedName": "cli-width", + "name": "cli-width", + "rawSpec": "^2.0.0", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\inquirer" + ] + ], + "_from": "cli-width@>=2.0.0 <3.0.0", + "_id": "cli-width@2.2.0", + "_inCache": true, + "_location": "/cli-width", + "_nodeVersion": "6.9.4", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/cli-width-2.2.0.tgz_1503409565255_0.3628303287550807" + }, + "_npmUser": { + "name": "knownasilya", + "email": "ilya@burstcreations.com" + }, + "_npmVersion": "4.6.1", + "_phantomChildren": {}, + "_requested": { + "raw": "cli-width@^2.0.0", + "scope": null, + "escapedName": "cli-width", + "name": "cli-width", + "rawSpec": "^2.0.0", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/inquirer" + ], + "_resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "_shasum": "ff19ede8a9a5e579324147b0c11f0fbcbabed639", + "_shrinkwrap": null, + "_spec": "cli-width@^2.0.0", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\inquirer", + "author": { + "name": "Ilya Radchenko", + "email": "ilya@burstcreations.com" + }, + "bugs": { + "url": "https://github.com/knownasilya/cli-width/issues" + }, + "dependencies": {}, + "description": "Get stdout window width, with two fallbacks, tty and then a default.", + "devDependencies": { + "coveralls": "^2.11.4", + "isparta": "^3.0.4", + "rimraf": "^2.4.3", + "standard-version": "^4.2.0", + "tap-spec": "^4.1.0", + "tape": "^3.4.0" + }, + "directories": {}, + "dist": { + "shasum": "ff19ede8a9a5e579324147b0c11f0fbcbabed639", + "tarball": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz" + }, + "gitHead": "176376e902a7d9fde3d82c885978e6d13d6496fc", + "homepage": "https://github.com/knownasilya/cli-width", + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "name": "knownasilya", + "email": "ilya@burstcreations.com" + }, + { + "name": "sboudrias", + "email": "admin@simonboudrias.com" + } + ], + "name": "cli-width", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/knownasilya/cli-width.git" + }, + "scripts": { + "coverage": "isparta cover test/*.js | tspec", + "coveralls": "npm run coverage -s && coveralls < coverage/lcov.info", + "postcoveralls": "rimraf ./coverage", + "release": "standard-version", + "test": "node test | tspec" + }, + "version": "2.2.0" +} diff --git a/node_modules/color-convert/CHANGELOG.md b/node_modules/color-convert/CHANGELOG.md new file mode 100644 index 0000000..0a7bce4 --- /dev/null +++ b/node_modules/color-convert/CHANGELOG.md @@ -0,0 +1,54 @@ +# 1.0.0 - 2016-01-07 + +- Removed: unused speed test +- Added: Automatic routing between previously unsupported conversions +([#27](https://github.com/Qix-/color-convert/pull/27)) +- Removed: `xxx2xxx()` and `xxx2xxxRaw()` functions +([#27](https://github.com/Qix-/color-convert/pull/27)) +- Removed: `convert()` class +([#27](https://github.com/Qix-/color-convert/pull/27)) +- Changed: all functions to lookup dictionary +([#27](https://github.com/Qix-/color-convert/pull/27)) +- Changed: `ansi` to `ansi256` +([#27](https://github.com/Qix-/color-convert/pull/27)) +- Fixed: argument grouping for functions requiring only one argument +([#27](https://github.com/Qix-/color-convert/pull/27)) + +# 0.6.0 - 2015-07-23 + +- Added: methods to handle +[ANSI](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors) 16/256 colors: + - rgb2ansi16 + - rgb2ansi + - hsl2ansi16 + - hsl2ansi + - hsv2ansi16 + - hsv2ansi + - hwb2ansi16 + - hwb2ansi + - cmyk2ansi16 + - cmyk2ansi + - keyword2ansi16 + - keyword2ansi + - ansi162rgb + - ansi162hsl + - ansi162hsv + - ansi162hwb + - ansi162cmyk + - ansi162keyword + - ansi2rgb + - ansi2hsl + - ansi2hsv + - ansi2hwb + - ansi2cmyk + - ansi2keyword +([#18](https://github.com/harthur/color-convert/pull/18)) + +# 0.5.3 - 2015-06-02 + +- Fixed: hsl2hsv does not return `NaN` anymore when using `[0,0,0]` +([#15](https://github.com/harthur/color-convert/issues/15)) + +--- + +Check out commit logs for older releases diff --git a/node_modules/color-convert/LICENSE b/node_modules/color-convert/LICENSE new file mode 100644 index 0000000..5b4c386 --- /dev/null +++ b/node_modules/color-convert/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) 2011-2016 Heather Arthur + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/node_modules/color-convert/README.md b/node_modules/color-convert/README.md new file mode 100644 index 0000000..d4b08fc --- /dev/null +++ b/node_modules/color-convert/README.md @@ -0,0 +1,68 @@ +# color-convert + +[![Build Status](https://travis-ci.org/Qix-/color-convert.svg?branch=master)](https://travis-ci.org/Qix-/color-convert) + +Color-convert is a color conversion library for JavaScript and node. +It converts all ways between `rgb`, `hsl`, `hsv`, `hwb`, `cmyk`, `ansi`, `ansi16`, `hex` strings, and CSS `keyword`s (will round to closest): + +```js +var convert = require('color-convert'); + +convert.rgb.hsl(140, 200, 100); // [96, 48, 59] +convert.keyword.rgb('blue'); // [0, 0, 255] + +var rgbChannels = convert.rgb.channels; // 3 +var cmykChannels = convert.cmyk.channels; // 4 +var ansiChannels = convert.ansi16.channels; // 1 +``` + +# Install + +```console +$ npm install color-convert +``` + +# API + +Simply get the property of the _from_ and _to_ conversion that you're looking for. + +All functions have a rounded and unrounded variant. By default, return values are rounded. To get the unrounded (raw) results, simply tack on `.raw` to the function. + +All 'from' functions have a hidden property called `.channels` that indicates the number of channels the function expects (not including alpha). + +```js +var convert = require('color-convert'); + +// Hex to LAB +convert.hex.lab('DEADBF'); // [ 76, 21, -2 ] +convert.hex.lab.raw('DEADBF'); // [ 75.56213190997677, 20.653827952644754, -2.290532499330533 ] + +// RGB to CMYK +convert.rgb.cmyk(167, 255, 4); // [ 35, 0, 98, 0 ] +convert.rgb.cmyk.raw(167, 255, 4); // [ 34.509803921568626, 0, 98.43137254901961, 0 ] +``` + +### Arrays +All functions that accept multiple arguments also support passing an array. + +Note that this does **not** apply to functions that convert from a color that only requires one value (e.g. `keyword`, `ansi256`, `hex`, etc.) + +```js +var convert = require('color-convert'); + +convert.rgb.hex(123, 45, 67); // '7B2D43' +convert.rgb.hex([123, 45, 67]); // '7B2D43' +``` + +## Routing + +Conversions that don't have an _explicitly_ defined conversion (in [conversions.js](conversions.js)), but can be converted by means of sub-conversions (e.g. XYZ -> **RGB** -> CMYK), are automatically routed together. This allows just about any color model supported by `color-convert` to be converted to any other model, so long as a sub-conversion path exists. This is also true for conversions requiring more than one step in between (e.g. LCH -> **LAB** -> **XYZ** -> **RGB** -> Hex). + +Keep in mind that extensive conversions _may_ result in a loss of precision, and exist only to be complete. For a list of "direct" (single-step) conversions, see [conversions.js](conversions.js). + +# Contribute + +If there is a new model you would like to support, or want to add a direct conversion between two existing models, please send us a pull request. + +# License +Copyright © 2011-2016, Heather Arthur and Josh Junon. Licensed under the [MIT License](LICENSE). diff --git a/node_modules/color-convert/conversions.js b/node_modules/color-convert/conversions.js new file mode 100644 index 0000000..19ca4a9 --- /dev/null +++ b/node_modules/color-convert/conversions.js @@ -0,0 +1,861 @@ +/* MIT license */ +var cssKeywords = require('color-name'); + +// NOTE: conversions should only return primitive values (i.e. arrays, or +// values that give correct `typeof` results). +// do not use box values types (i.e. Number(), String(), etc.) + +var reverseKeywords = {}; +for (var key in cssKeywords) { + if (cssKeywords.hasOwnProperty(key)) { + reverseKeywords[cssKeywords[key]] = key; + } +} + +var convert = module.exports = { + rgb: {channels: 3, labels: 'rgb'}, + hsl: {channels: 3, labels: 'hsl'}, + hsv: {channels: 3, labels: 'hsv'}, + hwb: {channels: 3, labels: 'hwb'}, + cmyk: {channels: 4, labels: 'cmyk'}, + xyz: {channels: 3, labels: 'xyz'}, + lab: {channels: 3, labels: 'lab'}, + lch: {channels: 3, labels: 'lch'}, + hex: {channels: 1, labels: ['hex']}, + keyword: {channels: 1, labels: ['keyword']}, + ansi16: {channels: 1, labels: ['ansi16']}, + ansi256: {channels: 1, labels: ['ansi256']}, + hcg: {channels: 3, labels: ['h', 'c', 'g']}, + apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, + gray: {channels: 1, labels: ['gray']} +}; + +// hide .channels and .labels properties +for (var model in convert) { + if (convert.hasOwnProperty(model)) { + if (!('channels' in convert[model])) { + throw new Error('missing channels property: ' + model); + } + + if (!('labels' in convert[model])) { + throw new Error('missing channel labels property: ' + model); + } + + if (convert[model].labels.length !== convert[model].channels) { + throw new Error('channel and label counts mismatch: ' + model); + } + + var channels = convert[model].channels; + var labels = convert[model].labels; + delete convert[model].channels; + delete convert[model].labels; + Object.defineProperty(convert[model], 'channels', {value: channels}); + Object.defineProperty(convert[model], 'labels', {value: labels}); + } +} + +convert.rgb.hsl = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var min = Math.min(r, g, b); + var max = Math.max(r, g, b); + var delta = max - min; + var h; + var s; + var l; + + if (max === min) { + h = 0; + } else if (r === max) { + h = (g - b) / delta; + } else if (g === max) { + h = 2 + (b - r) / delta; + } else if (b === max) { + h = 4 + (r - g) / delta; + } + + h = Math.min(h * 60, 360); + + if (h < 0) { + h += 360; + } + + l = (min + max) / 2; + + if (max === min) { + s = 0; + } else if (l <= 0.5) { + s = delta / (max + min); + } else { + s = delta / (2 - max - min); + } + + return [h, s * 100, l * 100]; +}; + +convert.rgb.hsv = function (rgb) { + var r = rgb[0]; + var g = rgb[1]; + var b = rgb[2]; + var min = Math.min(r, g, b); + var max = Math.max(r, g, b); + var delta = max - min; + var h; + var s; + var v; + + if (max === 0) { + s = 0; + } else { + s = (delta / max * 1000) / 10; + } + + if (max === min) { + h = 0; + } else if (r === max) { + h = (g - b) / delta; + } else if (g === max) { + h = 2 + (b - r) / delta; + } else if (b === max) { + h = 4 + (r - g) / delta; + } + + h = Math.min(h * 60, 360); + + if (h < 0) { + h += 360; + } + + v = ((max / 255) * 1000) / 10; + + return [h, s, v]; +}; + +convert.rgb.hwb = function (rgb) { + var r = rgb[0]; + var g = rgb[1]; + var b = rgb[2]; + var h = convert.rgb.hsl(rgb)[0]; + var w = 1 / 255 * Math.min(r, Math.min(g, b)); + + b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); + + return [h, w * 100, b * 100]; +}; + +convert.rgb.cmyk = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var c; + var m; + var y; + var k; + + k = Math.min(1 - r, 1 - g, 1 - b); + c = (1 - r - k) / (1 - k) || 0; + m = (1 - g - k) / (1 - k) || 0; + y = (1 - b - k) / (1 - k) || 0; + + return [c * 100, m * 100, y * 100, k * 100]; +}; + +/** + * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance + * */ +function comparativeDistance(x, y) { + return ( + Math.pow(x[0] - y[0], 2) + + Math.pow(x[1] - y[1], 2) + + Math.pow(x[2] - y[2], 2) + ); +} + +convert.rgb.keyword = function (rgb) { + var reversed = reverseKeywords[rgb]; + if (reversed) { + return reversed; + } + + var currentClosestDistance = Infinity; + var currentClosestKeyword; + + for (var keyword in cssKeywords) { + if (cssKeywords.hasOwnProperty(keyword)) { + var value = cssKeywords[keyword]; + + // Compute comparative distance + var distance = comparativeDistance(rgb, value); + + // Check if its less, if so set as closest + if (distance < currentClosestDistance) { + currentClosestDistance = distance; + currentClosestKeyword = keyword; + } + } + } + + return currentClosestKeyword; +}; + +convert.keyword.rgb = function (keyword) { + return cssKeywords[keyword]; +}; + +convert.rgb.xyz = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + + // assume sRGB + r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92); + g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92); + b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92); + + var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); + var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); + var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); + + return [x * 100, y * 100, z * 100]; +}; + +convert.rgb.lab = function (rgb) { + var xyz = convert.rgb.xyz(rgb); + var x = xyz[0]; + var y = xyz[1]; + var z = xyz[2]; + var l; + var a; + var b; + + x /= 95.047; + y /= 100; + z /= 108.883; + + x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); + y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); + z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); + + l = (116 * y) - 16; + a = 500 * (x - y); + b = 200 * (y - z); + + return [l, a, b]; +}; + +convert.hsl.rgb = function (hsl) { + var h = hsl[0] / 360; + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var t1; + var t2; + var t3; + var rgb; + var val; + + if (s === 0) { + val = l * 255; + return [val, val, val]; + } + + if (l < 0.5) { + t2 = l * (1 + s); + } else { + t2 = l + s - l * s; + } + + t1 = 2 * l - t2; + + rgb = [0, 0, 0]; + for (var i = 0; i < 3; i++) { + t3 = h + 1 / 3 * -(i - 1); + if (t3 < 0) { + t3++; + } + if (t3 > 1) { + t3--; + } + + if (6 * t3 < 1) { + val = t1 + (t2 - t1) * 6 * t3; + } else if (2 * t3 < 1) { + val = t2; + } else if (3 * t3 < 2) { + val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; + } else { + val = t1; + } + + rgb[i] = val * 255; + } + + return rgb; +}; + +convert.hsl.hsv = function (hsl) { + var h = hsl[0]; + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var smin = s; + var lmin = Math.max(l, 0.01); + var sv; + var v; + + l *= 2; + s *= (l <= 1) ? l : 2 - l; + smin *= lmin <= 1 ? lmin : 2 - lmin; + v = (l + s) / 2; + sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); + + return [h, sv * 100, v * 100]; +}; + +convert.hsv.rgb = function (hsv) { + var h = hsv[0] / 60; + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var hi = Math.floor(h) % 6; + + var f = h - Math.floor(h); + var p = 255 * v * (1 - s); + var q = 255 * v * (1 - (s * f)); + var t = 255 * v * (1 - (s * (1 - f))); + v *= 255; + + switch (hi) { + case 0: + return [v, t, p]; + case 1: + return [q, v, p]; + case 2: + return [p, v, t]; + case 3: + return [p, q, v]; + case 4: + return [t, p, v]; + case 5: + return [v, p, q]; + } +}; + +convert.hsv.hsl = function (hsv) { + var h = hsv[0]; + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var vmin = Math.max(v, 0.01); + var lmin; + var sl; + var l; + + l = (2 - s) * v; + lmin = (2 - s) * vmin; + sl = s * vmin; + sl /= (lmin <= 1) ? lmin : 2 - lmin; + sl = sl || 0; + l /= 2; + + return [h, sl * 100, l * 100]; +}; + +// http://dev.w3.org/csswg/css-color/#hwb-to-rgb +convert.hwb.rgb = function (hwb) { + var h = hwb[0] / 360; + var wh = hwb[1] / 100; + var bl = hwb[2] / 100; + var ratio = wh + bl; + var i; + var v; + var f; + var n; + + // wh + bl cant be > 1 + if (ratio > 1) { + wh /= ratio; + bl /= ratio; + } + + i = Math.floor(6 * h); + v = 1 - bl; + f = 6 * h - i; + + if ((i & 0x01) !== 0) { + f = 1 - f; + } + + n = wh + f * (v - wh); // linear interpolation + + var r; + var g; + var b; + switch (i) { + default: + case 6: + case 0: r = v; g = n; b = wh; break; + case 1: r = n; g = v; b = wh; break; + case 2: r = wh; g = v; b = n; break; + case 3: r = wh; g = n; b = v; break; + case 4: r = n; g = wh; b = v; break; + case 5: r = v; g = wh; b = n; break; + } + + return [r * 255, g * 255, b * 255]; +}; + +convert.cmyk.rgb = function (cmyk) { + var c = cmyk[0] / 100; + var m = cmyk[1] / 100; + var y = cmyk[2] / 100; + var k = cmyk[3] / 100; + var r; + var g; + var b; + + r = 1 - Math.min(1, c * (1 - k) + k); + g = 1 - Math.min(1, m * (1 - k) + k); + b = 1 - Math.min(1, y * (1 - k) + k); + + return [r * 255, g * 255, b * 255]; +}; + +convert.xyz.rgb = function (xyz) { + var x = xyz[0] / 100; + var y = xyz[1] / 100; + var z = xyz[2] / 100; + var r; + var g; + var b; + + r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); + g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); + b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); + + // assume sRGB + r = r > 0.0031308 + ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055) + : r * 12.92; + + g = g > 0.0031308 + ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055) + : g * 12.92; + + b = b > 0.0031308 + ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055) + : b * 12.92; + + r = Math.min(Math.max(0, r), 1); + g = Math.min(Math.max(0, g), 1); + b = Math.min(Math.max(0, b), 1); + + return [r * 255, g * 255, b * 255]; +}; + +convert.xyz.lab = function (xyz) { + var x = xyz[0]; + var y = xyz[1]; + var z = xyz[2]; + var l; + var a; + var b; + + x /= 95.047; + y /= 100; + z /= 108.883; + + x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); + y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); + z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); + + l = (116 * y) - 16; + a = 500 * (x - y); + b = 200 * (y - z); + + return [l, a, b]; +}; + +convert.lab.xyz = function (lab) { + var l = lab[0]; + var a = lab[1]; + var b = lab[2]; + var x; + var y; + var z; + + y = (l + 16) / 116; + x = a / 500 + y; + z = y - b / 200; + + var y2 = Math.pow(y, 3); + var x2 = Math.pow(x, 3); + var z2 = Math.pow(z, 3); + y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; + x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; + z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; + + x *= 95.047; + y *= 100; + z *= 108.883; + + return [x, y, z]; +}; + +convert.lab.lch = function (lab) { + var l = lab[0]; + var a = lab[1]; + var b = lab[2]; + var hr; + var h; + var c; + + hr = Math.atan2(b, a); + h = hr * 360 / 2 / Math.PI; + + if (h < 0) { + h += 360; + } + + c = Math.sqrt(a * a + b * b); + + return [l, c, h]; +}; + +convert.lch.lab = function (lch) { + var l = lch[0]; + var c = lch[1]; + var h = lch[2]; + var a; + var b; + var hr; + + hr = h / 360 * 2 * Math.PI; + a = c * Math.cos(hr); + b = c * Math.sin(hr); + + return [l, a, b]; +}; + +convert.rgb.ansi16 = function (args) { + var r = args[0]; + var g = args[1]; + var b = args[2]; + var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization + + value = Math.round(value / 50); + + if (value === 0) { + return 30; + } + + var ansi = 30 + + ((Math.round(b / 255) << 2) + | (Math.round(g / 255) << 1) + | Math.round(r / 255)); + + if (value === 2) { + ansi += 60; + } + + return ansi; +}; + +convert.hsv.ansi16 = function (args) { + // optimization here; we already know the value and don't need to get + // it converted for us. + return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); +}; + +convert.rgb.ansi256 = function (args) { + var r = args[0]; + var g = args[1]; + var b = args[2]; + + // we use the extended greyscale palette here, with the exception of + // black and white. normal palette only has 4 greyscale shades. + if (r === g && g === b) { + if (r < 8) { + return 16; + } + + if (r > 248) { + return 231; + } + + return Math.round(((r - 8) / 247) * 24) + 232; + } + + var ansi = 16 + + (36 * Math.round(r / 255 * 5)) + + (6 * Math.round(g / 255 * 5)) + + Math.round(b / 255 * 5); + + return ansi; +}; + +convert.ansi16.rgb = function (args) { + var color = args % 10; + + // handle greyscale + if (color === 0 || color === 7) { + if (args > 50) { + color += 3.5; + } + + color = color / 10.5 * 255; + + return [color, color, color]; + } + + var mult = (~~(args > 50) + 1) * 0.5; + var r = ((color & 1) * mult) * 255; + var g = (((color >> 1) & 1) * mult) * 255; + var b = (((color >> 2) & 1) * mult) * 255; + + return [r, g, b]; +}; + +convert.ansi256.rgb = function (args) { + // handle greyscale + if (args >= 232) { + var c = (args - 232) * 10 + 8; + return [c, c, c]; + } + + args -= 16; + + var rem; + var r = Math.floor(args / 36) / 5 * 255; + var g = Math.floor((rem = args % 36) / 6) / 5 * 255; + var b = (rem % 6) / 5 * 255; + + return [r, g, b]; +}; + +convert.rgb.hex = function (args) { + var integer = ((Math.round(args[0]) & 0xFF) << 16) + + ((Math.round(args[1]) & 0xFF) << 8) + + (Math.round(args[2]) & 0xFF); + + var string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; +}; + +convert.hex.rgb = function (args) { + var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); + if (!match) { + return [0, 0, 0]; + } + + var colorString = match[0]; + + if (match[0].length === 3) { + colorString = colorString.split('').map(function (char) { + return char + char; + }).join(''); + } + + var integer = parseInt(colorString, 16); + var r = (integer >> 16) & 0xFF; + var g = (integer >> 8) & 0xFF; + var b = integer & 0xFF; + + return [r, g, b]; +}; + +convert.rgb.hcg = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var max = Math.max(Math.max(r, g), b); + var min = Math.min(Math.min(r, g), b); + var chroma = (max - min); + var grayscale; + var hue; + + if (chroma < 1) { + grayscale = min / (1 - chroma); + } else { + grayscale = 0; + } + + if (chroma <= 0) { + hue = 0; + } else + if (max === r) { + hue = ((g - b) / chroma) % 6; + } else + if (max === g) { + hue = 2 + (b - r) / chroma; + } else { + hue = 4 + (r - g) / chroma + 4; + } + + hue /= 6; + hue %= 1; + + return [hue * 360, chroma * 100, grayscale * 100]; +}; + +convert.hsl.hcg = function (hsl) { + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var c = 1; + var f = 0; + + if (l < 0.5) { + c = 2.0 * s * l; + } else { + c = 2.0 * s * (1.0 - l); + } + + if (c < 1.0) { + f = (l - 0.5 * c) / (1.0 - c); + } + + return [hsl[0], c * 100, f * 100]; +}; + +convert.hsv.hcg = function (hsv) { + var s = hsv[1] / 100; + var v = hsv[2] / 100; + + var c = s * v; + var f = 0; + + if (c < 1.0) { + f = (v - c) / (1 - c); + } + + return [hsv[0], c * 100, f * 100]; +}; + +convert.hcg.rgb = function (hcg) { + var h = hcg[0] / 360; + var c = hcg[1] / 100; + var g = hcg[2] / 100; + + if (c === 0.0) { + return [g * 255, g * 255, g * 255]; + } + + var pure = [0, 0, 0]; + var hi = (h % 1) * 6; + var v = hi % 1; + var w = 1 - v; + var mg = 0; + + switch (Math.floor(hi)) { + case 0: + pure[0] = 1; pure[1] = v; pure[2] = 0; break; + case 1: + pure[0] = w; pure[1] = 1; pure[2] = 0; break; + case 2: + pure[0] = 0; pure[1] = 1; pure[2] = v; break; + case 3: + pure[0] = 0; pure[1] = w; pure[2] = 1; break; + case 4: + pure[0] = v; pure[1] = 0; pure[2] = 1; break; + default: + pure[0] = 1; pure[1] = 0; pure[2] = w; + } + + mg = (1.0 - c) * g; + + return [ + (c * pure[0] + mg) * 255, + (c * pure[1] + mg) * 255, + (c * pure[2] + mg) * 255 + ]; +}; + +convert.hcg.hsv = function (hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + + var v = c + g * (1.0 - c); + var f = 0; + + if (v > 0.0) { + f = c / v; + } + + return [hcg[0], f * 100, v * 100]; +}; + +convert.hcg.hsl = function (hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + + var l = g * (1.0 - c) + 0.5 * c; + var s = 0; + + if (l > 0.0 && l < 0.5) { + s = c / (2 * l); + } else + if (l >= 0.5 && l < 1.0) { + s = c / (2 * (1 - l)); + } + + return [hcg[0], s * 100, l * 100]; +}; + +convert.hcg.hwb = function (hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + var v = c + g * (1.0 - c); + return [hcg[0], (v - c) * 100, (1 - v) * 100]; +}; + +convert.hwb.hcg = function (hwb) { + var w = hwb[1] / 100; + var b = hwb[2] / 100; + var v = 1 - b; + var c = v - w; + var g = 0; + + if (c < 1) { + g = (v - c) / (1 - c); + } + + return [hwb[0], c * 100, g * 100]; +}; + +convert.apple.rgb = function (apple) { + return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; +}; + +convert.rgb.apple = function (rgb) { + return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; +}; + +convert.gray.rgb = function (args) { + return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; +}; + +convert.gray.hsl = convert.gray.hsv = function (args) { + return [0, 0, args[0]]; +}; + +convert.gray.hwb = function (gray) { + return [0, 100, gray[0]]; +}; + +convert.gray.cmyk = function (gray) { + return [0, 0, 0, gray[0]]; +}; + +convert.gray.lab = function (gray) { + return [gray[0], 0, 0]; +}; + +convert.gray.hex = function (gray) { + var val = Math.round(gray[0] / 100 * 255) & 0xFF; + var integer = (val << 16) + (val << 8) + val; + + var string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; +}; + +convert.rgb.gray = function (rgb) { + var val = (rgb[0] + rgb[1] + rgb[2]) / 3; + return [val / 255 * 100]; +}; diff --git a/node_modules/color-convert/index.js b/node_modules/color-convert/index.js new file mode 100644 index 0000000..e65b5d7 --- /dev/null +++ b/node_modules/color-convert/index.js @@ -0,0 +1,78 @@ +var conversions = require('./conversions'); +var route = require('./route'); + +var convert = {}; + +var models = Object.keys(conversions); + +function wrapRaw(fn) { + var wrappedFn = function (args) { + if (args === undefined || args === null) { + return args; + } + + if (arguments.length > 1) { + args = Array.prototype.slice.call(arguments); + } + + return fn(args); + }; + + // preserve .conversion property if there is one + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +function wrapRounded(fn) { + var wrappedFn = function (args) { + if (args === undefined || args === null) { + return args; + } + + if (arguments.length > 1) { + args = Array.prototype.slice.call(arguments); + } + + var result = fn(args); + + // we're assuming the result is an array here. + // see notice in conversions.js; don't use box types + // in conversion functions. + if (typeof result === 'object') { + for (var len = result.length, i = 0; i < len; i++) { + result[i] = Math.round(result[i]); + } + } + + return result; + }; + + // preserve .conversion property if there is one + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +models.forEach(function (fromModel) { + convert[fromModel] = {}; + + Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); + Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); + + var routes = route(fromModel); + var routeModels = Object.keys(routes); + + routeModels.forEach(function (toModel) { + var fn = routes[toModel]; + + convert[fromModel][toModel] = wrapRounded(fn); + convert[fromModel][toModel].raw = wrapRaw(fn); + }); +}); + +module.exports = convert; diff --git a/node_modules/color-convert/package.json b/node_modules/color-convert/package.json new file mode 100644 index 0000000..90cb311 --- /dev/null +++ b/node_modules/color-convert/package.json @@ -0,0 +1,127 @@ +{ + "_args": [ + [ + { + "raw": "color-convert@^1.9.0", + "scope": null, + "escapedName": "color-convert", + "name": "color-convert", + "rawSpec": "^1.9.0", + "spec": ">=1.9.0 <2.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint\\node_modules\\ansi-styles" + ] + ], + "_from": "color-convert@>=1.9.0 <2.0.0", + "_id": "color-convert@1.9.1", + "_inCache": true, + "_location": "/color-convert", + "_nodeVersion": "9.0.0", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/color-convert-1.9.1.tgz_1510178336068_0.0703919562511146" + }, + "_npmUser": { + "name": "qix", + "email": "i.am.qix@gmail.com" + }, + "_npmVersion": "5.5.1", + "_phantomChildren": {}, + "_requested": { + "raw": "color-convert@^1.9.0", + "scope": null, + "escapedName": "color-convert", + "name": "color-convert", + "rawSpec": "^1.9.0", + "spec": ">=1.9.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/ansi-styles", + "/inquirer/ansi-styles", + "/table/ansi-styles" + ], + "_resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", + "_shasum": "c1261107aeb2f294ebffec9ed9ecad529a6097ed", + "_shrinkwrap": null, + "_spec": "color-convert@^1.9.0", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint\\node_modules\\ansi-styles", + "author": { + "name": "Heather Arthur", + "email": "fayearthur@gmail.com" + }, + "bugs": { + "url": "https://github.com/Qix-/color-convert/issues" + }, + "dependencies": { + "color-name": "^1.1.1" + }, + "description": "Plain color conversion functions", + "devDependencies": { + "chalk": "^1.1.1", + "xo": "^0.11.2" + }, + "directories": {}, + "dist": { + "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", + "shasum": "c1261107aeb2f294ebffec9ed9ecad529a6097ed", + "tarball": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz" + }, + "files": [ + "index.js", + "conversions.js", + "css-keywords.js", + "route.js" + ], + "gitHead": "1df58eff59b30d075513860cf69f8aec4620140d", + "homepage": "https://github.com/Qix-/color-convert#readme", + "keywords": [ + "color", + "colour", + "convert", + "converter", + "conversion", + "rgb", + "hsl", + "hsv", + "hwb", + "cmyk", + "ansi", + "ansi16" + ], + "license": "MIT", + "maintainers": [ + { + "name": "harth", + "email": "fayearthur@gmail.com" + }, + { + "name": "moox", + "email": "m@moox.io" + }, + { + "name": "qix", + "email": "i.am.qix@gmail.com" + } + ], + "name": "color-convert", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/Qix-/color-convert.git" + }, + "scripts": { + "pretest": "xo", + "test": "node test/basic.js" + }, + "version": "1.9.1", + "xo": { + "rules": { + "default-case": 0, + "no-inline-comments": 0, + "operator-linebreak": 0 + } + } +} diff --git a/node_modules/color-convert/route.js b/node_modules/color-convert/route.js new file mode 100644 index 0000000..0a1fdea --- /dev/null +++ b/node_modules/color-convert/route.js @@ -0,0 +1,97 @@ +var conversions = require('./conversions'); + +/* + this function routes a model to all other models. + + all functions that are routed have a property `.conversion` attached + to the returned synthetic function. This property is an array + of strings, each with the steps in between the 'from' and 'to' + color models (inclusive). + + conversions that are not possible simply are not included. +*/ + +function buildGraph() { + var graph = {}; + // https://jsperf.com/object-keys-vs-for-in-with-closure/3 + var models = Object.keys(conversions); + + for (var len = models.length, i = 0; i < len; i++) { + graph[models[i]] = { + // http://jsperf.com/1-vs-infinity + // micro-opt, but this is simple. + distance: -1, + parent: null + }; + } + + return graph; +} + +// https://en.wikipedia.org/wiki/Breadth-first_search +function deriveBFS(fromModel) { + var graph = buildGraph(); + var queue = [fromModel]; // unshift -> queue -> pop + + graph[fromModel].distance = 0; + + while (queue.length) { + var current = queue.pop(); + var adjacents = Object.keys(conversions[current]); + + for (var len = adjacents.length, i = 0; i < len; i++) { + var adjacent = adjacents[i]; + var node = graph[adjacent]; + + if (node.distance === -1) { + node.distance = graph[current].distance + 1; + node.parent = current; + queue.unshift(adjacent); + } + } + } + + return graph; +} + +function link(from, to) { + return function (args) { + return to(from(args)); + }; +} + +function wrapConversion(toModel, graph) { + var path = [graph[toModel].parent, toModel]; + var fn = conversions[graph[toModel].parent][toModel]; + + var cur = graph[toModel].parent; + while (graph[cur].parent) { + path.unshift(graph[cur].parent); + fn = link(conversions[graph[cur].parent][cur], fn); + cur = graph[cur].parent; + } + + fn.conversion = path; + return fn; +} + +module.exports = function (fromModel) { + var graph = deriveBFS(fromModel); + var conversion = {}; + + var models = Object.keys(graph); + for (var len = models.length, i = 0; i < len; i++) { + var toModel = models[i]; + var node = graph[toModel]; + + if (node.parent === null) { + // no possible conversion, or this node is the source model. + continue; + } + + conversion[toModel] = wrapConversion(toModel, graph); + } + + return conversion; +}; + diff --git a/node_modules/color-name/.eslintrc.json b/node_modules/color-name/.eslintrc.json new file mode 100644 index 0000000..c50c250 --- /dev/null +++ b/node_modules/color-name/.eslintrc.json @@ -0,0 +1,43 @@ +{ + "env": { + "browser": true, + "node": true, + "commonjs": true, + "es6": true + }, + "extends": "eslint:recommended", + "rules": { + "strict": 2, + "indent": 0, + "linebreak-style": 0, + "quotes": 0, + "semi": 0, + "no-cond-assign": 1, + "no-constant-condition": 1, + "no-duplicate-case": 1, + "no-empty": 1, + "no-ex-assign": 1, + "no-extra-boolean-cast": 1, + "no-extra-semi": 1, + "no-fallthrough": 1, + "no-func-assign": 1, + "no-global-assign": 1, + "no-implicit-globals": 2, + "no-inner-declarations": ["error", "functions"], + "no-irregular-whitespace": 2, + "no-loop-func": 1, + "no-multi-str": 1, + "no-mixed-spaces-and-tabs": 1, + "no-proto": 1, + "no-sequences": 1, + "no-throw-literal": 1, + "no-unmodified-loop-condition": 1, + "no-useless-call": 1, + "no-void": 1, + "no-with": 2, + "wrap-iife": 1, + "no-redeclare": 1, + "no-unused-vars": ["error", { "vars": "all", "args": "none" }], + "no-sparse-arrays": 1 + } +} diff --git a/node_modules/color-name/.npmignore b/node_modules/color-name/.npmignore new file mode 100644 index 0000000..3854c07 --- /dev/null +++ b/node_modules/color-name/.npmignore @@ -0,0 +1,107 @@ +//this will affect all the git repos +git config --global core.excludesfile ~/.gitignore + + +//update files since .ignore won't if already tracked +git rm --cached + +# Compiled source # +################### +*.com +*.class +*.dll +*.exe +*.o +*.so + +# Packages # +############ +# it's better to unpack these files and commit the raw source +# git has its own built in compression methods +*.7z +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.zip + +# Logs and databases # +###################### +*.log +*.sql +*.sqlite + +# OS generated files # +###################### +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +# Icon? +ehthumbs.db +Thumbs.db +.cache +.project +.settings +.tmproj +*.esproj +nbproject + +# Numerous always-ignore extensions # +##################################### +*.diff +*.err +*.orig +*.rej +*.swn +*.swo +*.swp +*.vi +*~ +*.sass-cache +*.grunt +*.tmp + +# Dreamweaver added files # +########################### +_notes +dwsync.xml + +# Komodo # +########################### +*.komodoproject +.komodotools + +# Node # +##################### +node_modules + +# Bower # +##################### +bower_components + +# Folders to ignore # +##################### +.hg +.svn +.CVS +intermediate +publish +.idea +.graphics +_test +_archive +uploads +tmp + +# Vim files to ignore # +####################### +.VimballRecord +.netrwhist + +bundle.* + +_demo \ No newline at end of file diff --git a/node_modules/color-name/LICENSE b/node_modules/color-name/LICENSE new file mode 100644 index 0000000..4d9802a --- /dev/null +++ b/node_modules/color-name/LICENSE @@ -0,0 +1,8 @@ +The MIT License (MIT) +Copyright (c) 2015 Dmitry Ivanov + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/color-name/README.md b/node_modules/color-name/README.md new file mode 100644 index 0000000..3611a6b --- /dev/null +++ b/node_modules/color-name/README.md @@ -0,0 +1,11 @@ +A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. + +[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) + + +```js +var colors = require('color-name'); +colors.red //[255,0,0] +``` + + diff --git a/node_modules/color-name/index.js b/node_modules/color-name/index.js new file mode 100644 index 0000000..e42aa68 --- /dev/null +++ b/node_modules/color-name/index.js @@ -0,0 +1,152 @@ +'use strict' + +module.exports = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] +}; diff --git a/node_modules/color-name/package.json b/node_modules/color-name/package.json new file mode 100644 index 0000000..4fdbe5b --- /dev/null +++ b/node_modules/color-name/package.json @@ -0,0 +1,90 @@ +{ + "_args": [ + [ + { + "raw": "color-name@^1.1.1", + "scope": null, + "escapedName": "color-name", + "name": "color-name", + "rawSpec": "^1.1.1", + "spec": ">=1.1.1 <2.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\color-convert" + ] + ], + "_from": "color-name@>=1.1.1 <2.0.0", + "_id": "color-name@1.1.3", + "_inCache": true, + "_location": "/color-name", + "_nodeVersion": "8.1.2", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/color-name-1.1.3.tgz_1500157027207_0.5641644957941025" + }, + "_npmUser": { + "name": "dfcreative", + "email": "df.creative@gmail.com" + }, + "_npmVersion": "4.6.1", + "_phantomChildren": {}, + "_requested": { + "raw": "color-name@^1.1.1", + "scope": null, + "escapedName": "color-name", + "name": "color-name", + "rawSpec": "^1.1.1", + "spec": ">=1.1.1 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/color-convert" + ], + "_resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "_shasum": "a7d0558bd89c42f795dd42328f740831ca53bc25", + "_shrinkwrap": null, + "_spec": "color-name@^1.1.1", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\color-convert", + "author": { + "name": "DY", + "email": "dfcreative@gmail.com" + }, + "bugs": { + "url": "https://github.com/dfcreative/color-name/issues" + }, + "dependencies": {}, + "description": "A list of color names and its values", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "a7d0558bd89c42f795dd42328f740831ca53bc25", + "tarball": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" + }, + "gitHead": "cb7d4629b00fe38564f741a0779f6ad84d8007a2", + "homepage": "https://github.com/dfcreative/color-name", + "keywords": [ + "color-name", + "color", + "color-keyword", + "keyword" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "dfcreative", + "email": "df.creative@gmail.com" + } + ], + "name": "color-name", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/dfcreative/color-name.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.1.3" +} diff --git a/node_modules/color-name/test.js b/node_modules/color-name/test.js new file mode 100644 index 0000000..7a08746 --- /dev/null +++ b/node_modules/color-name/test.js @@ -0,0 +1,7 @@ +'use strict' + +var names = require('./'); +var assert = require('assert'); + +assert.deepEqual(names.red, [255,0,0]); +assert.deepEqual(names.aliceblue, [240,248,255]); diff --git a/node_modules/concat-stream/LICENSE b/node_modules/concat-stream/LICENSE new file mode 100644 index 0000000..99c130e --- /dev/null +++ b/node_modules/concat-stream/LICENSE @@ -0,0 +1,24 @@ +The MIT License + +Copyright (c) 2013 Max Ogden + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/concat-stream/index.js b/node_modules/concat-stream/index.js new file mode 100644 index 0000000..b16ad13 --- /dev/null +++ b/node_modules/concat-stream/index.js @@ -0,0 +1,143 @@ +var Writable = require('readable-stream').Writable +var inherits = require('inherits') + +if (typeof Uint8Array === 'undefined') { + var U8 = require('typedarray').Uint8Array +} else { + var U8 = Uint8Array +} + +function ConcatStream(opts, cb) { + if (!(this instanceof ConcatStream)) return new ConcatStream(opts, cb) + + if (typeof opts === 'function') { + cb = opts + opts = {} + } + if (!opts) opts = {} + + var encoding = opts.encoding + var shouldInferEncoding = false + + if (!encoding) { + shouldInferEncoding = true + } else { + encoding = String(encoding).toLowerCase() + if (encoding === 'u8' || encoding === 'uint8') { + encoding = 'uint8array' + } + } + + Writable.call(this, { objectMode: true }) + + this.encoding = encoding + this.shouldInferEncoding = shouldInferEncoding + + if (cb) this.on('finish', function () { cb(this.getBody()) }) + this.body = [] +} + +module.exports = ConcatStream +inherits(ConcatStream, Writable) + +ConcatStream.prototype._write = function(chunk, enc, next) { + this.body.push(chunk) + next() +} + +ConcatStream.prototype.inferEncoding = function (buff) { + var firstBuffer = buff === undefined ? this.body[0] : buff; + if (Buffer.isBuffer(firstBuffer)) return 'buffer' + if (typeof Uint8Array !== 'undefined' && firstBuffer instanceof Uint8Array) return 'uint8array' + if (Array.isArray(firstBuffer)) return 'array' + if (typeof firstBuffer === 'string') return 'string' + if (Object.prototype.toString.call(firstBuffer) === "[object Object]") return 'object' + return 'buffer' +} + +ConcatStream.prototype.getBody = function () { + if (!this.encoding && this.body.length === 0) return [] + if (this.shouldInferEncoding) this.encoding = this.inferEncoding() + if (this.encoding === 'array') return arrayConcat(this.body) + if (this.encoding === 'string') return stringConcat(this.body) + if (this.encoding === 'buffer') return bufferConcat(this.body) + if (this.encoding === 'uint8array') return u8Concat(this.body) + return this.body +} + +var isArray = Array.isArray || function (arr) { + return Object.prototype.toString.call(arr) == '[object Array]' +} + +function isArrayish (arr) { + return /Array\]$/.test(Object.prototype.toString.call(arr)) +} + +function isBufferish (p) { + return typeof p === 'string' || isArrayish(p) || (p && typeof p.subarray === 'function') +} + +function stringConcat (parts) { + var strings = [] + var needsToString = false + for (var i = 0; i < parts.length; i++) { + var p = parts[i] + if (typeof p === 'string') { + strings.push(p) + } else if (Buffer.isBuffer(p)) { + strings.push(p) + } else if (isBufferish(p)) { + strings.push(new Buffer(p)) + } else { + strings.push(new Buffer(String(p))) + } + } + if (Buffer.isBuffer(parts[0])) { + strings = Buffer.concat(strings) + strings = strings.toString('utf8') + } else { + strings = strings.join('') + } + return strings +} + +function bufferConcat (parts) { + var bufs = [] + for (var i = 0; i < parts.length; i++) { + var p = parts[i] + if (Buffer.isBuffer(p)) { + bufs.push(p) + } else if (isBufferish(p)) { + bufs.push(new Buffer(p)) + } else { + bufs.push(new Buffer(String(p))) + } + } + return Buffer.concat(bufs) +} + +function arrayConcat (parts) { + var res = [] + for (var i = 0; i < parts.length; i++) { + res.push.apply(res, parts[i]) + } + return res +} + +function u8Concat (parts) { + var len = 0 + for (var i = 0; i < parts.length; i++) { + if (typeof parts[i] === 'string') { + parts[i] = new Buffer(parts[i]) + } + len += parts[i].length + } + var u8 = new U8(len) + for (var i = 0, offset = 0; i < parts.length; i++) { + var part = parts[i] + for (var j = 0; j < part.length; j++) { + u8[offset++] = part[j] + } + } + return u8 +} diff --git a/node_modules/concat-stream/package.json b/node_modules/concat-stream/package.json new file mode 100644 index 0000000..db14975 --- /dev/null +++ b/node_modules/concat-stream/package.json @@ -0,0 +1,125 @@ +{ + "_args": [ + [ + { + "raw": "concat-stream@^1.6.0", + "scope": null, + "escapedName": "concat-stream", + "name": "concat-stream", + "rawSpec": "^1.6.0", + "spec": ">=1.6.0 <2.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint" + ] + ], + "_from": "concat-stream@>=1.6.0 <2.0.0", + "_id": "concat-stream@1.6.1", + "_inCache": true, + "_location": "/concat-stream", + "_nodeVersion": "9.6.1", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/concat-stream_1.6.1_1519914925223_0.0741109955402166" + }, + "_npmUser": { + "name": "mafintosh", + "email": "mathiasbuus@gmail.com" + }, + "_npmVersion": "5.6.0", + "_phantomChildren": {}, + "_requested": { + "raw": "concat-stream@^1.6.0", + "scope": null, + "escapedName": "concat-stream", + "name": "concat-stream", + "rawSpec": "^1.6.0", + "spec": ">=1.6.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.1.tgz", + "_shasum": "261b8f518301f1d834e36342b9fea095d2620a26", + "_shrinkwrap": null, + "_spec": "concat-stream@^1.6.0", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint", + "author": { + "name": "Max Ogden", + "email": "max@maxogden.com" + }, + "bugs": { + "url": "http://github.com/maxogden/concat-stream/issues" + }, + "dependencies": { + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + }, + "description": "writable stream that concatenates strings or binary data and calls a callback with the result", + "devDependencies": { + "tape": "^4.6.3" + }, + "directories": {}, + "dist": { + "integrity": "sha512-gslSSJx03QKa59cIKqeJO9HQ/WZMotvYJCuaUULrLpjj8oG40kV2Z+gz82pVxlTkOADi4PJxQPPfhl1ELYrrXw==", + "shasum": "261b8f518301f1d834e36342b9fea095d2620a26", + "tarball": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.1.tgz", + "fileCount": 4, + "unpackedSize": 9482 + }, + "engines": [ + "node >= 0.8" + ], + "files": [ + "index.js" + ], + "gitHead": "bb2b8d07a14afa056c0c8f27422426434dbb5734", + "homepage": "https://github.com/maxogden/concat-stream#readme", + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "mafintosh", + "email": "mathiasbuus@gmail.com" + }, + { + "name": "maxogden", + "email": "max@maxogden.com" + } + ], + "name": "concat-stream", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/maxogden/concat-stream.git" + }, + "scripts": { + "test": "tape test/*.js test/server/*.js" + }, + "tags": [ + "stream", + "simple", + "util", + "utility" + ], + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "firefox/17..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "version": "1.6.1" +} diff --git a/node_modules/concat-stream/readme.md b/node_modules/concat-stream/readme.md new file mode 100644 index 0000000..f45e6fc --- /dev/null +++ b/node_modules/concat-stream/readme.md @@ -0,0 +1,102 @@ +# concat-stream + +Writable stream that concatenates all the data from a stream and calls a callback with the result. Use this when you want to collect all the data from a stream into a single buffer. + +[![Build Status](https://travis-ci.org/maxogden/concat-stream.svg?branch=master)](https://travis-ci.org/maxogden/concat-stream) + +[![NPM](https://nodei.co/npm/concat-stream.png)](https://nodei.co/npm/concat-stream/) + +### description + +Streams emit many buffers. If you want to collect all of the buffers, and when the stream ends concatenate all of the buffers together and receive a single buffer then this is the module for you. + +Only use this if you know you can fit all of the output of your stream into a single Buffer (e.g. in RAM). + +There are also `objectMode` streams that emit things other than Buffers, and you can concatenate these too. See below for details. + +## Related + +`concat-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one. + +### examples + +#### Buffers + +```js +var fs = require('fs') +var concat = require('concat-stream') + +var readStream = fs.createReadStream('cat.png') +var concatStream = concat(gotPicture) + +readStream.on('error', handleError) +readStream.pipe(concatStream) + +function gotPicture(imageBuffer) { + // imageBuffer is all of `cat.png` as a node.js Buffer +} + +function handleError(err) { + // handle your error appropriately here, e.g.: + console.error(err) // print the error to STDERR + process.exit(1) // exit program with non-zero exit code +} + +``` + +#### Arrays + +```js +var write = concat(function(data) {}) +write.write([1,2,3]) +write.write([4,5,6]) +write.end() +// data will be [1,2,3,4,5,6] in the above callback +``` + +#### Uint8Arrays + +```js +var write = concat(function(data) {}) +var a = new Uint8Array(3) +a[0] = 97; a[1] = 98; a[2] = 99 +write.write(a) +write.write('!') +write.end(Buffer('!!1')) +``` + +See `test/` for more examples + +# methods + +```js +var concat = require('concat-stream') +``` + +## var writable = concat(opts={}, cb) + +Return a `writable` stream that will fire `cb(data)` with all of the data that +was written to the stream. Data can be written to `writable` as strings, +Buffers, arrays of byte integers, and Uint8Arrays. + +By default `concat-stream` will give you back the same data type as the type of the first buffer written to the stream. Use `opts.encoding` to set what format `data` should be returned as, e.g. if you if you don't want to rely on the built-in type checking or for some other reason. + +* `string` - get a string +* `buffer` - get back a Buffer +* `array` - get an array of byte integers +* `uint8array`, `u8`, `uint8` - get back a Uint8Array +* `object`, get back an array of Objects + +If you don't specify an encoding, and the types can't be inferred (e.g. you write things that aren't in the list above), it will try to convert concat them into a `Buffer`. + +If nothing is written to `writable` then `data` will be an empty array `[]`. + +# error handling + +`concat-stream` does not handle errors for you, so you must handle errors on whatever streams you pipe into `concat-stream`. This is a general rule when programming with node.js streams: always handle errors on each and every stream. Since `concat-stream` is not itself a stream it does not emit errors. + +We recommend using [`end-of-stream`](https://npmjs.org/end-of-stream) or [`pump`](https://npmjs.org/pump) for writing error tolerant stream code. + +# license + +MIT LICENSE diff --git a/node_modules/cross-spawn/CHANGELOG.md b/node_modules/cross-spawn/CHANGELOG.md new file mode 100644 index 0000000..f1298a8 --- /dev/null +++ b/node_modules/cross-spawn/CHANGELOG.md @@ -0,0 +1,6 @@ +## 5.0.0 - 2016-10-30 + +- Add support for `options.shell` +- Improve parsing of shebangs by using [`shebang-command`](https://github.com/kevva/shebang-command) module +- Refactor some code to make it more clear +- Update README caveats diff --git a/node_modules/cross-spawn/LICENSE b/node_modules/cross-spawn/LICENSE new file mode 100644 index 0000000..db5e914 --- /dev/null +++ b/node_modules/cross-spawn/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014 IndigoUnited + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/cross-spawn/README.md b/node_modules/cross-spawn/README.md new file mode 100644 index 0000000..dde730d --- /dev/null +++ b/node_modules/cross-spawn/README.md @@ -0,0 +1,85 @@ +# cross-spawn + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Build status][appveyor-image]][appveyor-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url] + +[npm-url]:https://npmjs.org/package/cross-spawn +[downloads-image]:http://img.shields.io/npm/dm/cross-spawn.svg +[npm-image]:http://img.shields.io/npm/v/cross-spawn.svg +[travis-url]:https://travis-ci.org/IndigoUnited/node-cross-spawn +[travis-image]:http://img.shields.io/travis/IndigoUnited/node-cross-spawn/master.svg +[appveyor-url]:https://ci.appveyor.com/project/satazor/node-cross-spawn +[appveyor-image]:https://img.shields.io/appveyor/ci/satazor/node-cross-spawn/master.svg +[david-dm-url]:https://david-dm.org/IndigoUnited/node-cross-spawn +[david-dm-image]:https://img.shields.io/david/IndigoUnited/node-cross-spawn.svg +[david-dm-dev-url]:https://david-dm.org/IndigoUnited/node-cross-spawn#info=devDependencies +[david-dm-dev-image]:https://img.shields.io/david/dev/IndigoUnited/node-cross-spawn.svg + +A cross platform solution to node's spawn and spawnSync. + + +## Installation + +`$ npm install cross-spawn` + +If you are using `spawnSync` on node 0.10 or older, you will also need to install `spawn-sync`: + +`$ npm install spawn-sync` + + +## Why + +Node has issues when using spawn on Windows: + +- It ignores [PATHEXT](https://github.com/joyent/node/issues/2318) +- It does not support [shebangs](http://pt.wikipedia.org/wiki/Shebang) +- No `options.shell` support on node < v6 +- It does not allow you to run `del` or `dir` + +All these issues are handled correctly by `cross-spawn`. +There are some known modules, such as [win-spawn](https://github.com/ForbesLindesay/win-spawn), that try to solve this but they are either broken or provide faulty escaping of shell arguments. + + +## Usage + +Exactly the same way as node's [`spawn`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options) or [`spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options), so it's a drop in replacement. + + +```js +var spawn = require('cross-spawn'); + +// Spawn NPM asynchronously +var child = spawn('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' }); + +// Spawn NPM synchronously +var results = spawn.sync('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' }); +``` + + +## Caveats + +#### `options.shell` as an alternative to `cross-spawn` + +Starting from node v6, `spawn` has a `shell` option that allows you run commands from within a shell. This new option solves most of the problems that `cross-spawn` attempts to solve, but: + +- It's not supported in node < v6 +- It has no support for shebangs on Windows +- You must manually escape the command and arguments which is very error prone, specially when passing user input + +If you are using the `shell` option to spawn a command in a cross platform way, consider using `cross-spawn` instead. You have been warned. + + +#### Shebangs + +While `cross-spawn` handles shebangs on Windows, its support is limited: e.g.: it doesn't handle arguments after the path, e.g.: `#!/bin/bash -e`. + +Remember to always test your code on Windows! + + +## Tests + +`$ npm test` + + +## License + +Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php). diff --git a/node_modules/cross-spawn/index.js b/node_modules/cross-spawn/index.js new file mode 100644 index 0000000..7814a96 --- /dev/null +++ b/node_modules/cross-spawn/index.js @@ -0,0 +1,59 @@ +'use strict'; + +var cp = require('child_process'); +var parse = require('./lib/parse'); +var enoent = require('./lib/enoent'); + +var cpSpawnSync = cp.spawnSync; + +function spawn(command, args, options) { + var parsed; + var spawned; + + // Parse the arguments + parsed = parse(command, args, options); + + // Spawn the child process + spawned = cp.spawn(parsed.command, parsed.args, parsed.options); + + // Hook into child process "exit" event to emit an error if the command + // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 + enoent.hookChildProcess(spawned, parsed); + + return spawned; +} + +function spawnSync(command, args, options) { + var parsed; + var result; + + if (!cpSpawnSync) { + try { + cpSpawnSync = require('spawn-sync'); // eslint-disable-line global-require + } catch (ex) { + throw new Error( + 'In order to use spawnSync on node 0.10 or older, you must ' + + 'install spawn-sync:\n\n' + + ' npm install spawn-sync --save' + ); + } + } + + // Parse the arguments + parsed = parse(command, args, options); + + // Spawn the child process + result = cpSpawnSync(parsed.command, parsed.args, parsed.options); + + // Analyze if the command does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 + result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); + + return result; +} + +module.exports = spawn; +module.exports.spawn = spawn; +module.exports.sync = spawnSync; + +module.exports._parse = parse; +module.exports._enoent = enoent; diff --git a/node_modules/cross-spawn/lib/enoent.js b/node_modules/cross-spawn/lib/enoent.js new file mode 100644 index 0000000..d0a193a --- /dev/null +++ b/node_modules/cross-spawn/lib/enoent.js @@ -0,0 +1,73 @@ +'use strict'; + +var isWin = process.platform === 'win32'; +var resolveCommand = require('./util/resolveCommand'); + +var isNode10 = process.version.indexOf('v0.10.') === 0; + +function notFoundError(command, syscall) { + var err; + + err = new Error(syscall + ' ' + command + ' ENOENT'); + err.code = err.errno = 'ENOENT'; + err.syscall = syscall + ' ' + command; + + return err; +} + +function hookChildProcess(cp, parsed) { + var originalEmit; + + if (!isWin) { + return; + } + + originalEmit = cp.emit; + cp.emit = function (name, arg1) { + var err; + + // If emitting "exit" event and exit code is 1, we need to check if + // the command exists and emit an "error" instead + // See: https://github.com/IndigoUnited/node-cross-spawn/issues/16 + if (name === 'exit') { + err = verifyENOENT(arg1, parsed, 'spawn'); + + if (err) { + return originalEmit.call(cp, 'error', err); + } + } + + return originalEmit.apply(cp, arguments); + }; +} + +function verifyENOENT(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, 'spawn'); + } + + return null; +} + +function verifyENOENTSync(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, 'spawnSync'); + } + + // If we are in node 10, then we are using spawn-sync; if it exited + // with -1 it probably means that the command does not exist + if (isNode10 && status === -1) { + parsed.file = isWin ? parsed.file : resolveCommand(parsed.original); + + if (!parsed.file) { + return notFoundError(parsed.original, 'spawnSync'); + } + } + + return null; +} + +module.exports.hookChildProcess = hookChildProcess; +module.exports.verifyENOENT = verifyENOENT; +module.exports.verifyENOENTSync = verifyENOENTSync; +module.exports.notFoundError = notFoundError; diff --git a/node_modules/cross-spawn/lib/parse.js b/node_modules/cross-spawn/lib/parse.js new file mode 100644 index 0000000..10a0136 --- /dev/null +++ b/node_modules/cross-spawn/lib/parse.js @@ -0,0 +1,113 @@ +'use strict'; + +var resolveCommand = require('./util/resolveCommand'); +var hasEmptyArgumentBug = require('./util/hasEmptyArgumentBug'); +var escapeArgument = require('./util/escapeArgument'); +var escapeCommand = require('./util/escapeCommand'); +var readShebang = require('./util/readShebang'); + +var isWin = process.platform === 'win32'; +var skipShellRegExp = /\.(?:com|exe)$/i; + +// Supported in Node >= 6 and >= 4.8 +var supportsShellOption = parseInt(process.version.substr(1).split('.')[0], 10) >= 6 || + parseInt(process.version.substr(1).split('.')[0], 10) === 4 && parseInt(process.version.substr(1).split('.')[1], 10) >= 8; + +function parseNonShell(parsed) { + var shebang; + var needsShell; + var applyQuotes; + + if (!isWin) { + return parsed; + } + + // Detect & add support for shebangs + parsed.file = resolveCommand(parsed.command); + parsed.file = parsed.file || resolveCommand(parsed.command, true); + shebang = parsed.file && readShebang(parsed.file); + + if (shebang) { + parsed.args.unshift(parsed.file); + parsed.command = shebang; + needsShell = hasEmptyArgumentBug || !skipShellRegExp.test(resolveCommand(shebang) || resolveCommand(shebang, true)); + } else { + needsShell = hasEmptyArgumentBug || !skipShellRegExp.test(parsed.file); + } + + // If a shell is required, use cmd.exe and take care of escaping everything correctly + if (needsShell) { + // Escape command & arguments + applyQuotes = (parsed.command !== 'echo'); // Do not quote arguments for the special "echo" command + parsed.command = escapeCommand(parsed.command); + parsed.args = parsed.args.map(function (arg) { + return escapeArgument(arg, applyQuotes); + }); + + // Make use of cmd.exe + parsed.args = ['/d', '/s', '/c', '"' + parsed.command + (parsed.args.length ? ' ' + parsed.args.join(' ') : '') + '"']; + parsed.command = process.env.comspec || 'cmd.exe'; + parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped + } + + return parsed; +} + +function parseShell(parsed) { + var shellCommand; + + // If node supports the shell option, there's no need to mimic its behavior + if (supportsShellOption) { + return parsed; + } + + // Mimic node shell option, see: https://github.com/nodejs/node/blob/b9f6a2dc059a1062776133f3d4fd848c4da7d150/lib/child_process.js#L335 + shellCommand = [parsed.command].concat(parsed.args).join(' '); + + if (isWin) { + parsed.command = typeof parsed.options.shell === 'string' ? parsed.options.shell : process.env.comspec || 'cmd.exe'; + parsed.args = ['/d', '/s', '/c', '"' + shellCommand + '"']; + parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped + } else { + if (typeof parsed.options.shell === 'string') { + parsed.command = parsed.options.shell; + } else if (process.platform === 'android') { + parsed.command = '/system/bin/sh'; + } else { + parsed.command = '/bin/sh'; + } + + parsed.args = ['-c', shellCommand]; + } + + return parsed; +} + +// ------------------------------------------------ + +function parse(command, args, options) { + var parsed; + + // Normalize arguments, similar to nodejs + if (args && !Array.isArray(args)) { + options = args; + args = null; + } + + args = args ? args.slice(0) : []; // Clone array to avoid changing the original + options = options || {}; + + // Build our parsed object + parsed = { + command: command, + args: args, + options: options, + file: undefined, + original: command, + }; + + // Delegate further parsing to shell or non-shell + return options.shell ? parseShell(parsed) : parseNonShell(parsed); +} + +module.exports = parse; diff --git a/node_modules/cross-spawn/lib/util/escapeArgument.js b/node_modules/cross-spawn/lib/util/escapeArgument.js new file mode 100644 index 0000000..367263f --- /dev/null +++ b/node_modules/cross-spawn/lib/util/escapeArgument.js @@ -0,0 +1,30 @@ +'use strict'; + +function escapeArgument(arg, quote) { + // Convert to string + arg = '' + arg; + + // If we are not going to quote the argument, + // escape shell metacharacters, including double and single quotes: + if (!quote) { + arg = arg.replace(/([()%!^<>&|;,"'\s])/g, '^$1'); + } else { + // Sequence of backslashes followed by a double quote: + // double up all the backslashes and escape the double quote + arg = arg.replace(/(\\*)"/g, '$1$1\\"'); + + // Sequence of backslashes followed by the end of the string + // (which will become a double quote later): + // double up all the backslashes + arg = arg.replace(/(\\*)$/, '$1$1'); + + // All other backslashes occur literally + + // Quote the whole thing: + arg = '"' + arg + '"'; + } + + return arg; +} + +module.exports = escapeArgument; diff --git a/node_modules/cross-spawn/lib/util/escapeCommand.js b/node_modules/cross-spawn/lib/util/escapeCommand.js new file mode 100644 index 0000000..d9c25b2 --- /dev/null +++ b/node_modules/cross-spawn/lib/util/escapeCommand.js @@ -0,0 +1,12 @@ +'use strict'; + +var escapeArgument = require('./escapeArgument'); + +function escapeCommand(command) { + // Do not escape if this command is not dangerous.. + // We do this so that commands like "echo" or "ifconfig" work + // Quoting them, will make them unaccessible + return /^[a-z0-9_-]+$/i.test(command) ? command : escapeArgument(command, true); +} + +module.exports = escapeCommand; diff --git a/node_modules/cross-spawn/lib/util/hasEmptyArgumentBug.js b/node_modules/cross-spawn/lib/util/hasEmptyArgumentBug.js new file mode 100644 index 0000000..9f2eba6 --- /dev/null +++ b/node_modules/cross-spawn/lib/util/hasEmptyArgumentBug.js @@ -0,0 +1,18 @@ +'use strict'; + +// See: https://github.com/IndigoUnited/node-cross-spawn/pull/34#issuecomment-221623455 +function hasEmptyArgumentBug() { + var nodeVer; + + if (process.platform !== 'win32') { + return false; + } + + nodeVer = process.version.substr(1).split('.').map(function (num) { + return parseInt(num, 10); + }); + + return (nodeVer[0] === 0 && nodeVer[1] < 12); +} + +module.exports = hasEmptyArgumentBug(); diff --git a/node_modules/cross-spawn/lib/util/readShebang.js b/node_modules/cross-spawn/lib/util/readShebang.js new file mode 100644 index 0000000..2cf3541 --- /dev/null +++ b/node_modules/cross-spawn/lib/util/readShebang.js @@ -0,0 +1,37 @@ +'use strict'; + +var fs = require('fs'); +var LRU = require('lru-cache'); +var shebangCommand = require('shebang-command'); + +var shebangCache = new LRU({ max: 50, maxAge: 30 * 1000 }); // Cache just for 30sec + +function readShebang(command) { + var buffer; + var fd; + var shebang; + + // Check if it is in the cache first + if (shebangCache.has(command)) { + return shebangCache.get(command); + } + + // Read the first 150 bytes from the file + buffer = new Buffer(150); + + try { + fd = fs.openSync(command, 'r'); + fs.readSync(fd, buffer, 0, 150, 0); + fs.closeSync(fd); + } catch (e) { /* empty */ } + + // Attempt to extract shebang (null is returned if not a shebang) + shebang = shebangCommand(buffer.toString()); + + // Store the shebang in the cache + shebangCache.set(command, shebang); + + return shebang; +} + +module.exports = readShebang; diff --git a/node_modules/cross-spawn/lib/util/resolveCommand.js b/node_modules/cross-spawn/lib/util/resolveCommand.js new file mode 100644 index 0000000..b7a9490 --- /dev/null +++ b/node_modules/cross-spawn/lib/util/resolveCommand.js @@ -0,0 +1,31 @@ +'use strict'; + +var path = require('path'); +var which = require('which'); +var LRU = require('lru-cache'); + +var commandCache = new LRU({ max: 50, maxAge: 30 * 1000 }); // Cache just for 30sec + +function resolveCommand(command, noExtension) { + var resolved; + + noExtension = !!noExtension; + resolved = commandCache.get(command + '!' + noExtension); + + // Check if its resolved in the cache + if (commandCache.has(command)) { + return commandCache.get(command); + } + + try { + resolved = !noExtension ? + which.sync(command) : + which.sync(command, { pathExt: path.delimiter + (process.env.PATHEXT || '') }); + } catch (e) { /* empty */ } + + commandCache.set(command + '!' + noExtension, resolved); + + return resolved; +} + +module.exports = resolveCommand; diff --git a/node_modules/cross-spawn/package.json b/node_modules/cross-spawn/package.json new file mode 100644 index 0000000..27021c1 --- /dev/null +++ b/node_modules/cross-spawn/package.json @@ -0,0 +1,118 @@ +{ + "_args": [ + [ + { + "raw": "cross-spawn@^5.1.0", + "scope": null, + "escapedName": "cross-spawn", + "name": "cross-spawn", + "rawSpec": "^5.1.0", + "spec": ">=5.1.0 <6.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint" + ] + ], + "_from": "cross-spawn@>=5.1.0 <6.0.0", + "_id": "cross-spawn@5.1.0", + "_inCache": true, + "_location": "/cross-spawn", + "_nodeVersion": "7.0.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/cross-spawn-5.1.0.tgz_1488134324770_0.025160177145153284" + }, + "_npmUser": { + "name": "satazor", + "email": "andremiguelcruz@msn.com" + }, + "_npmVersion": "3.10.8", + "_phantomChildren": {}, + "_requested": { + "raw": "cross-spawn@^5.1.0", + "scope": null, + "escapedName": "cross-spawn", + "name": "cross-spawn", + "rawSpec": "^5.1.0", + "spec": ">=5.1.0 <6.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "_shasum": "e8bd0efee58fcff6f8f94510a0a554bbfa235449", + "_shrinkwrap": null, + "_spec": "cross-spawn@^5.1.0", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint", + "author": { + "name": "IndigoUnited", + "email": "hello@indigounited.com", + "url": "http://indigounited.com" + }, + "bugs": { + "url": "https://github.com/IndigoUnited/node-cross-spawn/issues/" + }, + "dependencies": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "description": "Cross platform child_process#spawn and child_process#spawnSync", + "devDependencies": { + "@satazor/eslint-config": "^3.0.0", + "eslint": "^3.0.0", + "expect.js": "^0.3.0", + "glob": "^7.0.0", + "mkdirp": "^0.5.1", + "mocha": "^3.0.2", + "once": "^1.4.0", + "rimraf": "^2.5.0" + }, + "directories": {}, + "dist": { + "shasum": "e8bd0efee58fcff6f8f94510a0a554bbfa235449", + "tarball": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz" + }, + "files": [ + "index.js", + "lib" + ], + "gitHead": "1da4c09ccf658079849a3d191b16e59bc600e8b4", + "homepage": "https://github.com/IndigoUnited/node-cross-spawn#readme", + "keywords": [ + "spawn", + "spawnSync", + "windows", + "cross", + "platform", + "path", + "ext", + "path-ext", + "path_ext", + "shebang", + "hashbang", + "cmd", + "execute" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "satazor", + "email": "andremiguelcruz@msn.com" + } + ], + "name": "cross-spawn", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/IndigoUnited/node-cross-spawn.git" + }, + "scripts": { + "lint": "eslint '{*.js,lib/**/*.js,test/**/*.js}'", + "test": "node test/prepare && mocha --bail test/test" + }, + "version": "5.1.0" +} diff --git a/node_modules/deep-is/.npmignore b/node_modules/deep-is/.npmignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/node_modules/deep-is/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/node_modules/deep-is/.travis.yml b/node_modules/deep-is/.travis.yml new file mode 100644 index 0000000..d523c5f --- /dev/null +++ b/node_modules/deep-is/.travis.yml @@ -0,0 +1,6 @@ +language: node_js +node_js: + - 0.4 + - 0.6 + - 0.8 + - 0.10 diff --git a/node_modules/deep-is/LICENSE b/node_modules/deep-is/LICENSE new file mode 100644 index 0000000..c38f840 --- /dev/null +++ b/node_modules/deep-is/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2012, 2013 Thorsten Lorenz +Copyright (c) 2012 James Halliday +Copyright (c) 2009 Thomas Robinson <280north.com> + +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/deep-is/README.markdown b/node_modules/deep-is/README.markdown new file mode 100644 index 0000000..eb69a83 --- /dev/null +++ b/node_modules/deep-is/README.markdown @@ -0,0 +1,70 @@ +deep-is +========== + +Node's `assert.deepEqual() algorithm` as a standalone module. Exactly like +[deep-equal](https://github.com/substack/node-deep-equal) except for the fact that `deepEqual(NaN, NaN) === true`. + +This module is around [5 times faster](https://gist.github.com/2790507) +than wrapping `assert.deepEqual()` in a `try/catch`. + +[![browser support](http://ci.testling.com/thlorenz/deep-is.png)](http://ci.testling.com/thlorenz/deep-is) + +[![build status](https://secure.travis-ci.org/thlorenz/deep-is.png)](http://travis-ci.org/thlorenz/deep-is) + +example +======= + +``` js +var equal = require('deep-is'); +console.dir([ + equal( + { a : [ 2, 3 ], b : [ 4 ] }, + { a : [ 2, 3 ], b : [ 4 ] } + ), + equal( + { x : 5, y : [6] }, + { x : 5, y : 6 } + ) +]); +``` + +methods +======= + +var deepIs = require('deep-is') + +deepIs(a, b) +--------------- + +Compare objects `a` and `b`, returning whether they are equal according to a +recursive equality algorithm. + +install +======= + +With [npm](http://npmjs.org) do: + +``` +npm install deep-is +``` + +test +==== + +With [npm](http://npmjs.org) do: + +``` +npm test +``` + +license +======= + +Copyright (c) 2012, 2013 Thorsten Lorenz +Copyright (c) 2012 James Halliday + +Derived largely from node's assert module, which has the copyright statement: + +Copyright (c) 2009 Thomas Robinson <280north.com> + +Released under the MIT license, see LICENSE for details. diff --git a/node_modules/deep-is/example/cmp.js b/node_modules/deep-is/example/cmp.js new file mode 100644 index 0000000..67014b8 --- /dev/null +++ b/node_modules/deep-is/example/cmp.js @@ -0,0 +1,11 @@ +var equal = require('../'); +console.dir([ + equal( + { a : [ 2, 3 ], b : [ 4 ] }, + { a : [ 2, 3 ], b : [ 4 ] } + ), + equal( + { x : 5, y : [6] }, + { x : 5, y : 6 } + ) +]); diff --git a/node_modules/deep-is/index.js b/node_modules/deep-is/index.js new file mode 100644 index 0000000..506fe27 --- /dev/null +++ b/node_modules/deep-is/index.js @@ -0,0 +1,102 @@ +var pSlice = Array.prototype.slice; +var Object_keys = typeof Object.keys === 'function' + ? Object.keys + : function (obj) { + var keys = []; + for (var key in obj) keys.push(key); + return keys; + } +; + +var deepEqual = module.exports = function (actual, expected) { + // enforce Object.is +0 !== -0 + if (actual === 0 && expected === 0) { + return areZerosEqual(actual, expected); + + // 7.1. All identical values are equivalent, as determined by ===. + } else if (actual === expected) { + return true; + + } else if (actual instanceof Date && expected instanceof Date) { + return actual.getTime() === expected.getTime(); + + } else if (isNumberNaN(actual)) { + return isNumberNaN(expected); + + // 7.3. Other pairs that do not both pass typeof value == 'object', + // equivalence is determined by ==. + } else if (typeof actual != 'object' && typeof expected != 'object') { + return actual == expected; + + // 7.4. For all other Object pairs, including Array objects, equivalence is + // determined by having the same number of owned properties (as verified + // with Object.prototype.hasOwnProperty.call), the same set of keys + // (although not necessarily the same order), equivalent values for every + // corresponding key, and an identical 'prototype' property. Note: this + // accounts for both named and indexed properties on Arrays. + } else { + return objEquiv(actual, expected); + } +}; + +function isUndefinedOrNull(value) { + return value === null || value === undefined; +} + +function isArguments(object) { + return Object.prototype.toString.call(object) == '[object Arguments]'; +} + +function isNumberNaN(value) { + // NaN === NaN -> false + return typeof value == 'number' && value !== value; +} + +function areZerosEqual(zeroA, zeroB) { + // (1 / +0|0) -> Infinity, but (1 / -0) -> -Infinity and (Infinity !== -Infinity) + return (1 / zeroA) === (1 / zeroB); +} + +function objEquiv(a, b) { + if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) + return false; + + // an identical 'prototype' property. + if (a.prototype !== b.prototype) return false; + //~~~I've managed to break Object.keys through screwy arguments passing. + // Converting to array solves the problem. + if (isArguments(a)) { + if (!isArguments(b)) { + return false; + } + a = pSlice.call(a); + b = pSlice.call(b); + return deepEqual(a, b); + } + try { + var ka = Object_keys(a), + kb = Object_keys(b), + key, i; + } catch (e) {//happens when one is a string literal and the other isn't + return false; + } + // having the same number of owned properties (keys incorporates + // hasOwnProperty) + if (ka.length != kb.length) + return false; + //the same set of keys (although not necessarily the same order), + ka.sort(); + kb.sort(); + //~~~cheap key test + for (i = ka.length - 1; i >= 0; i--) { + if (ka[i] != kb[i]) + return false; + } + //equivalent values for every corresponding key, and + //~~~possibly expensive deep test + for (i = ka.length - 1; i >= 0; i--) { + key = ka[i]; + if (!deepEqual(a[key], b[key])) return false; + } + return true; +} diff --git a/node_modules/deep-is/package.json b/node_modules/deep-is/package.json new file mode 100644 index 0000000..b274008 --- /dev/null +++ b/node_modules/deep-is/package.json @@ -0,0 +1,120 @@ +{ + "_args": [ + [ + { + "raw": "deep-is@~0.1.3", + "scope": null, + "escapedName": "deep-is", + "name": "deep-is", + "rawSpec": "~0.1.3", + "spec": ">=0.1.3 <0.2.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\optionator" + ] + ], + "_from": "deep-is@>=0.1.3 <0.2.0", + "_id": "deep-is@0.1.3", + "_inCache": true, + "_location": "/deep-is", + "_npmUser": { + "name": "thlorenz", + "email": "thlorenz@gmx.de" + }, + "_npmVersion": "1.4.14", + "_phantomChildren": {}, + "_requested": { + "raw": "deep-is@~0.1.3", + "scope": null, + "escapedName": "deep-is", + "name": "deep-is", + "rawSpec": "~0.1.3", + "spec": ">=0.1.3 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/optionator" + ], + "_resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "_shasum": "b369d6fb5dbc13eecf524f91b070feedc357cf34", + "_shrinkwrap": null, + "_spec": "deep-is@~0.1.3", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\optionator", + "author": { + "name": "Thorsten Lorenz", + "email": "thlorenz@gmx.de", + "url": "http://thlorenz.com" + }, + "bugs": { + "url": "https://github.com/thlorenz/deep-is/issues" + }, + "dependencies": {}, + "description": "node's assert.deepEqual algorithm except for NaN being equal to NaN", + "devDependencies": { + "tape": "~1.0.2" + }, + "directories": { + "lib": ".", + "example": "example", + "test": "test" + }, + "dist": { + "shasum": "b369d6fb5dbc13eecf524f91b070feedc357cf34", + "tarball": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz" + }, + "gitHead": "f126057628423458636dec9df3d621843b9ac55e", + "homepage": "https://github.com/thlorenz/deep-is", + "keywords": [ + "equality", + "equal", + "compare" + ], + "license": { + "type": "MIT", + "url": "https://github.com/thlorenz/deep-is/blob/master/LICENSE" + }, + "main": "index.js", + "maintainers": [ + { + "name": "thlorenz", + "email": "thlorenz@gmx.de" + } + ], + "name": "deep-is", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/thlorenz/deep-is.git" + }, + "scripts": { + "test": "tape test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": { + "ie": [ + 6, + 7, + 8, + 9 + ], + "ff": [ + 3.5, + 10, + 15 + ], + "chrome": [ + 10, + 22 + ], + "safari": [ + 5.1 + ], + "opera": [ + 12 + ] + } + }, + "version": "0.1.3" +} diff --git a/node_modules/deep-is/test/NaN.js b/node_modules/deep-is/test/NaN.js new file mode 100644 index 0000000..ddaa5a7 --- /dev/null +++ b/node_modules/deep-is/test/NaN.js @@ -0,0 +1,16 @@ +var test = require('tape'); +var equal = require('../'); + +test('NaN and 0 values', function (t) { + t.ok(equal(NaN, NaN)); + t.notOk(equal(0, NaN)); + t.ok(equal(0, 0)); + t.notOk(equal(0, 1)); + t.end(); +}); + + +test('nested NaN values', function (t) { + t.ok(equal([ NaN, 1, NaN ], [ NaN, 1, NaN ])); + t.end(); +}); diff --git a/node_modules/deep-is/test/cmp.js b/node_modules/deep-is/test/cmp.js new file mode 100644 index 0000000..3071013 --- /dev/null +++ b/node_modules/deep-is/test/cmp.js @@ -0,0 +1,23 @@ +var test = require('tape'); +var equal = require('../'); + +test('equal', function (t) { + t.ok(equal( + { a : [ 2, 3 ], b : [ 4 ] }, + { a : [ 2, 3 ], b : [ 4 ] } + )); + t.end(); +}); + +test('not equal', function (t) { + t.notOk(equal( + { x : 5, y : [6] }, + { x : 5, y : 6 } + )); + t.end(); +}); + +test('nested nulls', function (t) { + t.ok(equal([ null, null, null ], [ null, null, null ])); + t.end(); +}); diff --git a/node_modules/deep-is/test/neg-vs-pos-0.js b/node_modules/deep-is/test/neg-vs-pos-0.js new file mode 100644 index 0000000..ac26130 --- /dev/null +++ b/node_modules/deep-is/test/neg-vs-pos-0.js @@ -0,0 +1,15 @@ +var test = require('tape'); +var equal = require('../'); + +test('0 values', function (t) { + t.ok(equal( 0, 0), ' 0 === 0'); + t.ok(equal( 0, +0), ' 0 === +0'); + t.ok(equal(+0, +0), '+0 === +0'); + t.ok(equal(-0, -0), '-0 === -0'); + + t.notOk(equal(-0, 0), '-0 !== 0'); + t.notOk(equal(-0, +0), '-0 !== +0'); + + t.end(); +}); + diff --git a/node_modules/del/index.js b/node_modules/del/index.js new file mode 100644 index 0000000..0ceff96 --- /dev/null +++ b/node_modules/del/index.js @@ -0,0 +1,73 @@ +'use strict'; +var path = require('path'); +var globby = require('globby'); +var isPathCwd = require('is-path-cwd'); +var isPathInCwd = require('is-path-in-cwd'); +var objectAssign = require('object-assign'); +var Promise = require('pinkie-promise'); +var pify = require('pify'); +var rimraf = require('rimraf'); + +var rimrafP = pify(rimraf, Promise); + +function safeCheck(file) { + if (isPathCwd(file)) { + throw new Error('Cannot delete the current working directory. Can be overriden with the `force` option.'); + } + + if (!isPathInCwd(file)) { + throw new Error('Cannot delete files/folders outside the current working directory. Can be overriden with the `force` option.'); + } +} + +module.exports = function (patterns, opts) { + opts = objectAssign({}, opts); + + var force = opts.force; + delete opts.force; + + var dryRun = opts.dryRun; + delete opts.dryRun; + + return globby(patterns, opts).then(function (files) { + return Promise.all(files.map(function (file) { + if (!force) { + safeCheck(file); + } + + file = path.resolve(opts.cwd || '', file); + + if (dryRun) { + return Promise.resolve(file); + } + + return rimrafP(file).then(function () { + return file; + }); + })); + }); +}; + +module.exports.sync = function (patterns, opts) { + opts = objectAssign({}, opts); + + var force = opts.force; + delete opts.force; + + var dryRun = opts.dryRun; + delete opts.dryRun; + + return globby.sync(patterns, opts).map(function (file) { + if (!force) { + safeCheck(file); + } + + file = path.resolve(opts.cwd || '', file); + + if (!dryRun) { + rimraf.sync(file); + } + + return file; + }); +}; diff --git a/node_modules/del/license b/node_modules/del/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/del/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/del/package.json b/node_modules/del/package.json new file mode 100644 index 0000000..22260b6 --- /dev/null +++ b/node_modules/del/package.json @@ -0,0 +1,128 @@ +{ + "_args": [ + [ + { + "raw": "del@^2.0.2", + "scope": null, + "escapedName": "del", + "name": "del", + "rawSpec": "^2.0.2", + "spec": ">=2.0.2 <3.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\flat-cache" + ] + ], + "_from": "del@>=2.0.2 <3.0.0", + "_id": "del@2.2.2", + "_inCache": true, + "_location": "/del", + "_nodeVersion": "4.4.5", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/del-2.2.2.tgz_1471046735537_0.4419694794341922" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "2.15.5", + "_phantomChildren": {}, + "_requested": { + "raw": "del@^2.0.2", + "scope": null, + "escapedName": "del", + "name": "del", + "rawSpec": "^2.0.2", + "spec": ">=2.0.2 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/flat-cache" + ], + "_resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", + "_shasum": "c12c981d067846c84bcaf862cff930d907ffd1a8", + "_shrinkwrap": null, + "_spec": "del@^2.0.2", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\flat-cache", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/del/issues" + }, + "dependencies": { + "globby": "^5.0.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "rimraf": "^2.2.8" + }, + "description": "Delete files and folders", + "devDependencies": { + "ava": "*", + "fs-extra": "^0.30.0", + "path-exists": "^2.0.0", + "tempfile": "^1.1.1", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "c12c981d067846c84bcaf862cff930d907ffd1a8", + "tarball": "https://registry.npmjs.org/del/-/del-2.2.2.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "3a97a5ba131055fbf7eb39f5ed47db86a2fd4497", + "homepage": "https://github.com/sindresorhus/del#readme", + "keywords": [ + "delete", + "del", + "remove", + "destroy", + "trash", + "unlink", + "clean", + "cleaning", + "cleanup", + "rm", + "rmrf", + "rimraf", + "rmdir", + "glob", + "gulpfriendly", + "file", + "files", + "folder", + "dir", + "directory", + "fs", + "filesystem" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "del", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/del.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.2.2" +} diff --git a/node_modules/del/readme.md b/node_modules/del/readme.md new file mode 100644 index 0000000..c0c1219 --- /dev/null +++ b/node_modules/del/readme.md @@ -0,0 +1,106 @@ +# del [![Build Status](https://travis-ci.org/sindresorhus/del.svg?branch=master)](https://travis-ci.org/sindresorhus/del) + +> Delete files and folders using [globs](https://github.com/isaacs/minimatch#usage) + +Pretty much [rimraf](https://github.com/isaacs/rimraf) with a Promise API and support for multiple files and globbing. It also protects you against deleting the current working directory and above. + +--- + +

🔥 Want to strengthen your core JavaScript skills and master ES6?
I would personally recommend this awesome ES6 course by Wes Bos.

+ +--- + + +## Install + +``` +$ npm install --save del +``` + + +## Usage + +```js +const del = require('del'); + +del(['tmp/*.js', '!tmp/unicorn.js']).then(paths => { + console.log('Deleted files and folders:\n', paths.join('\n')); +}); +``` + + +## Beware + +The glob pattern `**` matches all children and *the parent*. + +So this won't work: + +```js +del.sync(['public/assets/**', '!public/assets/goat.png']); +``` + +You have to explicitly ignore the parent directories too: + +```js +del.sync(['public/assets/**', '!public/assets', '!public/assets/goat.png']); +``` + +Suggestions on how to improve this welcome! + + +## API + +### del(patterns, [options]) + +Returns a promise for an array of deleted paths. + +### del.sync(patterns, [options]) + +Returns an array of deleted paths. + +#### patterns + +Type: `string`, `array` + +See supported minimatch [patterns](https://github.com/isaacs/minimatch#usage). + +- [Pattern examples with expected matches](https://github.com/sindresorhus/multimatch/blob/master/test.js) +- [Quick globbing pattern overview](https://github.com/sindresorhus/multimatch#globbing-patterns) + +#### options + +Type: `object` + +See the `node-glob` [options](https://github.com/isaacs/node-glob#options). + +##### force + +Type: `boolean` +Default: `false` + +Allow deleting the current working directory and outside. + +##### dryRun + +Type: `boolean` +Default: `false` + +See what would be deleted. + +```js +const del = require('del'); + +del(['tmp/*.js'], {dryRun: true}).then(paths => { + console.log('Files and folders that would be deleted:\n', paths.join('\n')); +}); +``` + + +## CLI + +See [del-cli](https://github.com/sindresorhus/del-cli) for a CLI for this module and [trash-cli](https://github.com/sindresorhus/trash-cli) for a safe version that is suitable for running by hand. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/doctrine/CHANGELOG.md b/node_modules/doctrine/CHANGELOG.md new file mode 100644 index 0000000..57140d0 --- /dev/null +++ b/node_modules/doctrine/CHANGELOG.md @@ -0,0 +1,94 @@ +v2.1.0 - January 6, 2018 + +* 827f314 Update: support node ranges (fixes #89) (#190) (Teddy Katz) + +v2.0.2 - November 25, 2017 + +* 5049ee3 Fix: Remove redundant LICENSE/README names from files (#203) (Kevin Partington) + +v2.0.1 - November 10, 2017 + +* 009f33d Fix: Making sure union type stringification respects compact flag (#199) (Mitermayer Reis) +* 19da935 Use native String.prototype.trim instead of a custom implementation. (#201) (Rouven Weßling) +* e3a011b chore: add mocha.opts to restore custom mocha config (Jason Kurian) +* d888200 chore: adds nyc and a newer version of mocha to accurately report coverage (Jason Kurian) +* 6b210a8 fix: support type expression for @this tag (fixes #181) (#182) (Frédéric Junod) +* 1c4a4c7 fix: Allow array indexes in names (#193) (Tom MacWright) +* 9aed54d Fix incorrect behavior when arrow functions are used as default values (#189) (Gaurab Paul) +* 9efb6ca Upgrade: Use Array.isArray instead of isarray package (#195) (medanat) + +v2.0.0 - November 15, 2016 + +* 7d7c5f1 Breaking: Re-license to Apache 2 (fixes #176) (#178) (Nicholas C. Zakas) +* 5496132 Docs: Update license copyright (Nicholas C. Zakas) + +v1.5.0 - October 13, 2016 + +* e33c6bb Update: Add support for BooleanLiteralType (#173) (Erik Arvidsson) + +v1.4.0 - September 13, 2016 + +* d7426e5 Update: add ability to parse optional properties in typedefs (refs #5) (#174) (ikokostya) + +v1.3.0 - August 22, 2016 + +* 12c7ad9 Update: Add support for numeric and string literal types (fixes #156) (#172) (Andrew Walter) + +v1.2.3 - August 16, 2016 + +* b96a884 Build: Add CI release script (Nicholas C. Zakas) +* 8d9b3c7 Upgrade: Upgrade esutils to v2.0.2 (fixes #170) (#171) (Emeegeemee) + +v1.2.2 - May 19, 2016 + +* ebe0b08 Fix: Support case insensitive tags (fixes #163) (#164) (alberto) +* 8e6d81e Chore: Remove copyright and license from headers (Nicholas C. Zakas) +* 79035c6 Chore: Include jQuery Foundation copyright (Nicholas C. Zakas) +* 06910a7 Fix: Preserve whitespace in default param string values (fixes #157) (Kai Cataldo) + +v1.2.1 - March 29, 2016 + +* 1f54014 Fix: allow hyphens in names (fixes #116) (Kai Cataldo) +* bbee469 Docs: Add issue template (Nicholas C. Zakas) + +v1.2.0 - February 19, 2016 + +* 18136c5 Build: Cleanup build system (Nicholas C. Zakas) +* b082f85 Update: Add support for slash in namepaths (fixes #100) (Ryan Duffy) +* def53a2 Docs: Fix typo in option lineNumbers (Daniel Tschinder) +* e2cbbc5 Update: Bump isarray to v1.0.0 (Shinnosuke Watanabe) +* ae07aa8 Fix: Allow whitespace in optional param with default value (fixes #141) (chris) + +v1.1.0 - January 6, 2016 + +* Build: Switch to Makefile.js (Nicholas C. Zakas) +* New: support name expression for @this tag (fixes #143) (Tim Schaub) +* Build: Update ESLint settings (Nicholas C. Zakas) + +v1.0.0 - December 21, 2015 + +* New: parse caption tags in examples into separate property. (fixes #131) (Tom MacWright) + +v0.7.2 - November 27, 2015 + +* Fix: Line numbers for some tags (fixes #138) Fixing issue where input was not consumed via advance() but was skipped when parsing tags resulting in sometimes incorrect reported lineNumber. (TEHEK) +* Build: Add missing linefix package (Nicholas C. Zakas) + +v0.7.1 - November 13, 2015 + +* Update: Begin switch to Makefile.js (Nicholas C. Zakas) +* Fix: permit return tag without type (fixes #136) (Tom MacWright) +* Fix: package.json homepage field (Bogdan Chadkin) +* Fix: Parse array default syntax. Fixes #133 (Tom MacWright) +* Fix: Last tag always has \n in the description (fixes #87) (Burak Yigit Kaya) +* Docs: Add changelog (Nicholas C. Zakas) + +v0.7.0 - September 21, 2015 + +* Docs: Update README with new info (fixes #127) (Nicholas C. Zakas) +* Fix: Parsing fix for param with arrays and properties (fixes #111) (Gyandeep Singh) +* Build: Add travis build (fixes #123) (Gyandeep Singh) +* Fix: Parsing of parameter name without a type (fixes #120) (Gyandeep Singh) +* New: added preserveWhitespace option (Aleks Totic) +* New: Add "files" entry to only deploy select files (Rob Loach) +* New: Add support and tests for typedefs. Refs #5 (Tom MacWright) diff --git a/node_modules/doctrine/LICENSE b/node_modules/doctrine/LICENSE new file mode 100644 index 0000000..3e8ba72 --- /dev/null +++ b/node_modules/doctrine/LICENSE @@ -0,0 +1,177 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS diff --git a/node_modules/doctrine/LICENSE.closure-compiler b/node_modules/doctrine/LICENSE.closure-compiler new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/node_modules/doctrine/LICENSE.closure-compiler @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/doctrine/LICENSE.esprima b/node_modules/doctrine/LICENSE.esprima new file mode 100644 index 0000000..3e580c3 --- /dev/null +++ b/node_modules/doctrine/LICENSE.esprima @@ -0,0 +1,19 @@ +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/doctrine/README.md b/node_modules/doctrine/README.md new file mode 100644 index 0000000..26fad18 --- /dev/null +++ b/node_modules/doctrine/README.md @@ -0,0 +1,165 @@ +[![NPM version][npm-image]][npm-url] +[![build status][travis-image]][travis-url] +[![Test coverage][coveralls-image]][coveralls-url] +[![Downloads][downloads-image]][downloads-url] +[![Join the chat at https://gitter.im/eslint/doctrine](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/eslint/doctrine?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + +# Doctrine + +Doctrine is a [JSDoc](http://usejsdoc.org) parser that parses documentation comments from JavaScript (you need to pass in the comment, not a whole JavaScript file). + +## Installation + +You can install Doctrine using [npm](https://npmjs.com): + +``` +$ npm install doctrine --save-dev +``` + +Doctrine can also be used in web browsers using [Browserify](http://browserify.org). + +## Usage + +Require doctrine inside of your JavaScript: + +```js +var doctrine = require("doctrine"); +``` + +### parse() + +The primary method is `parse()`, which accepts two arguments: the JSDoc comment to parse and an optional options object. The available options are: + +* `unwrap` - set to `true` to delete the leading `/**`, any `*` that begins a line, and the trailing `*/` from the source text. Default: `false`. +* `tags` - an array of tags to return. When specified, Doctrine returns only tags in this array. For example, if `tags` is `["param"]`, then only `@param` tags will be returned. Default: `null`. +* `recoverable` - set to `true` to keep parsing even when syntax errors occur. Default: `false`. +* `sloppy` - set to `true` to allow optional parameters to be specified in brackets (`@param {string} [foo]`). Default: `false`. +* `lineNumbers` - set to `true` to add `lineNumber` to each node, specifying the line on which the node is found in the source. Default: `false`. +* `range` - set to `true` to add `range` to each node, specifying the start and end index of the node in the original comment. Default: `false`. + +Here's a simple example: + +```js +var ast = doctrine.parse( + [ + "/**", + " * This function comment is parsed by doctrine", + " * @param {{ok:String}} userName", + "*/" + ].join('\n'), { unwrap: true }); +``` + +This example returns the following AST: + + { + "description": "This function comment is parsed by doctrine", + "tags": [ + { + "title": "param", + "description": null, + "type": { + "type": "RecordType", + "fields": [ + { + "type": "FieldType", + "key": "ok", + "value": { + "type": "NameExpression", + "name": "String" + } + } + ] + }, + "name": "userName" + } + ] + } + +See the [demo page](http://eslint.org/doctrine/demo/) more detail. + +## Team + +These folks keep the project moving and are resources for help: + +* Nicholas C. Zakas ([@nzakas](https://github.com/nzakas)) - project lead +* Yusuke Suzuki ([@constellation](https://github.com/constellation)) - reviewer + +## Contributing + +Issues and pull requests will be triaged and responded to as quickly as possible. We operate under the [ESLint Contributor Guidelines](http://eslint.org/docs/developer-guide/contributing), so please be sure to read them before contributing. If you're not sure where to dig in, check out the [issues](https://github.com/eslint/doctrine/issues). + +## Frequently Asked Questions + +### Can I pass a whole JavaScript file to Doctrine? + +No. Doctrine can only parse JSDoc comments, so you'll need to pass just the JSDoc comment to Doctrine in order to work. + + +### License + +#### doctrine + +Copyright JS Foundation and other contributors, https://js.foundation + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +#### esprima + +some of functions is derived from esprima + +Copyright (C) 2012, 2011 [Ariya Hidayat](http://ariya.ofilabs.com/about) + (twitter: [@ariyahidayat](http://twitter.com/ariyahidayat)) and other contributors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +#### closure-compiler + +some of extensions is derived from closure-compiler + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + + +### Where to ask for help? + +Join our [Chatroom](https://gitter.im/eslint/doctrine) + +[npm-image]: https://img.shields.io/npm/v/doctrine.svg?style=flat-square +[npm-url]: https://www.npmjs.com/package/doctrine +[travis-image]: https://img.shields.io/travis/eslint/doctrine/master.svg?style=flat-square +[travis-url]: https://travis-ci.org/eslint/doctrine +[coveralls-image]: https://img.shields.io/coveralls/eslint/doctrine/master.svg?style=flat-square +[coveralls-url]: https://coveralls.io/r/eslint/doctrine?branch=master +[downloads-image]: http://img.shields.io/npm/dm/doctrine.svg?style=flat-square +[downloads-url]: https://www.npmjs.com/package/doctrine diff --git a/node_modules/doctrine/lib/doctrine.js b/node_modules/doctrine/lib/doctrine.js new file mode 100644 index 0000000..1665afe --- /dev/null +++ b/node_modules/doctrine/lib/doctrine.js @@ -0,0 +1,899 @@ +/* + * @fileoverview Main Doctrine object + * @author Yusuke Suzuki + * @author Dan Tao + * @author Andrew Eisenberg + */ + +(function () { + 'use strict'; + + var typed, + utility, + jsdoc, + esutils, + hasOwnProperty; + + esutils = require('esutils'); + typed = require('./typed'); + utility = require('./utility'); + + function sliceSource(source, index, last) { + return source.slice(index, last); + } + + hasOwnProperty = (function () { + var func = Object.prototype.hasOwnProperty; + return function hasOwnProperty(obj, name) { + return func.call(obj, name); + }; + }()); + + function shallowCopy(obj) { + var ret = {}, key; + for (key in obj) { + if (obj.hasOwnProperty(key)) { + ret[key] = obj[key]; + } + } + return ret; + } + + function isASCIIAlphanumeric(ch) { + return (ch >= 0x61 /* 'a' */ && ch <= 0x7A /* 'z' */) || + (ch >= 0x41 /* 'A' */ && ch <= 0x5A /* 'Z' */) || + (ch >= 0x30 /* '0' */ && ch <= 0x39 /* '9' */); + } + + function isParamTitle(title) { + return title === 'param' || title === 'argument' || title === 'arg'; + } + + function isReturnTitle(title) { + return title === 'return' || title === 'returns'; + } + + function isProperty(title) { + return title === 'property' || title === 'prop'; + } + + function isNameParameterRequired(title) { + return isParamTitle(title) || isProperty(title) || + title === 'alias' || title === 'this' || title === 'mixes' || title === 'requires'; + } + + function isAllowedName(title) { + return isNameParameterRequired(title) || title === 'const' || title === 'constant'; + } + + function isAllowedNested(title) { + return isProperty(title) || isParamTitle(title); + } + + function isAllowedOptional(title) { + return isProperty(title) || isParamTitle(title); + } + + function isTypeParameterRequired(title) { + return isParamTitle(title) || isReturnTitle(title) || + title === 'define' || title === 'enum' || + title === 'implements' || title === 'this' || + title === 'type' || title === 'typedef' || isProperty(title); + } + + // Consider deprecation instead using 'isTypeParameterRequired' and 'Rules' declaration to pick when a type is optional/required + // This would require changes to 'parseType' + function isAllowedType(title) { + return isTypeParameterRequired(title) || title === 'throws' || title === 'const' || title === 'constant' || + title === 'namespace' || title === 'member' || title === 'var' || title === 'module' || + title === 'constructor' || title === 'class' || title === 'extends' || title === 'augments' || + title === 'public' || title === 'private' || title === 'protected'; + } + + // A regex character class that contains all whitespace except linebreak characters (\r, \n, \u2028, \u2029) + var WHITESPACE = '[ \\f\\t\\v\\u00a0\\u1680\\u180e\\u2000-\\u200a\\u202f\\u205f\\u3000\\ufeff]'; + + var STAR_MATCHER = '(' + WHITESPACE + '*(?:\\*' + WHITESPACE + '?)?)(.+|[\r\n\u2028\u2029])'; + + function unwrapComment(doc) { + // JSDoc comment is following form + // /** + // * ....... + // */ + + return doc. + // remove /** + replace(/^\/\*\*?/, ''). + // remove */ + replace(/\*\/$/, ''). + // remove ' * ' at the beginning of a line + replace(new RegExp(STAR_MATCHER, 'g'), '$2'). + // remove trailing whitespace + replace(/\s*$/, ''); + } + + /** + * Converts an index in an "unwrapped" JSDoc comment to the corresponding index in the original "wrapped" version + * @param {string} originalSource The original wrapped comment + * @param {number} unwrappedIndex The index of a character in the unwrapped string + * @returns {number} The index of the corresponding character in the original wrapped string + */ + function convertUnwrappedCommentIndex(originalSource, unwrappedIndex) { + var replacedSource = originalSource.replace(/^\/\*\*?/, ''); + var numSkippedChars = 0; + var matcher = new RegExp(STAR_MATCHER, 'g'); + var match; + + while ((match = matcher.exec(replacedSource))) { + numSkippedChars += match[1].length; + + if (match.index + match[0].length > unwrappedIndex + numSkippedChars) { + return unwrappedIndex + numSkippedChars + originalSource.length - replacedSource.length; + } + } + + return originalSource.replace(/\*\/$/, '').replace(/\s*$/, '').length; + } + + // JSDoc Tag Parser + + (function (exports) { + var Rules, + index, + lineNumber, + length, + source, + originalSource, + recoverable, + sloppy, + strict; + + function advance() { + var ch = source.charCodeAt(index); + index += 1; + if (esutils.code.isLineTerminator(ch) && !(ch === 0x0D /* '\r' */ && source.charCodeAt(index) === 0x0A /* '\n' */)) { + lineNumber += 1; + } + return String.fromCharCode(ch); + } + + function scanTitle() { + var title = ''; + // waste '@' + advance(); + + while (index < length && isASCIIAlphanumeric(source.charCodeAt(index))) { + title += advance(); + } + + return title; + } + + function seekContent() { + var ch, waiting, last = index; + + waiting = false; + while (last < length) { + ch = source.charCodeAt(last); + if (esutils.code.isLineTerminator(ch) && !(ch === 0x0D /* '\r' */ && source.charCodeAt(last + 1) === 0x0A /* '\n' */)) { + waiting = true; + } else if (waiting) { + if (ch === 0x40 /* '@' */) { + break; + } + if (!esutils.code.isWhiteSpace(ch)) { + waiting = false; + } + } + last += 1; + } + return last; + } + + // type expression may have nest brace, such as, + // { { ok: string } } + // + // therefore, scanning type expression with balancing braces. + function parseType(title, last, addRange) { + var ch, brace, type, startIndex, direct = false; + + + // search '{' + while (index < last) { + ch = source.charCodeAt(index); + if (esutils.code.isWhiteSpace(ch)) { + advance(); + } else if (ch === 0x7B /* '{' */) { + advance(); + break; + } else { + // this is direct pattern + direct = true; + break; + } + } + + + if (direct) { + return null; + } + + // type expression { is found + brace = 1; + type = ''; + while (index < last) { + ch = source.charCodeAt(index); + if (esutils.code.isLineTerminator(ch)) { + advance(); + } else { + if (ch === 0x7D /* '}' */) { + brace -= 1; + if (brace === 0) { + advance(); + break; + } + } else if (ch === 0x7B /* '{' */) { + brace += 1; + } + if (type === '') { + startIndex = index; + } + type += advance(); + } + } + + if (brace !== 0) { + // braces is not balanced + return utility.throwError('Braces are not balanced'); + } + + if (isAllowedOptional(title)) { + return typed.parseParamType(type, {startIndex: convertIndex(startIndex), range: addRange}); + } + + return typed.parseType(type, {startIndex: convertIndex(startIndex), range: addRange}); + } + + function scanIdentifier(last) { + var identifier; + if (!esutils.code.isIdentifierStartES5(source.charCodeAt(index)) && !source[index].match(/[0-9]/)) { + return null; + } + identifier = advance(); + while (index < last && esutils.code.isIdentifierPartES5(source.charCodeAt(index))) { + identifier += advance(); + } + return identifier; + } + + function skipWhiteSpace(last) { + while (index < last && (esutils.code.isWhiteSpace(source.charCodeAt(index)) || esutils.code.isLineTerminator(source.charCodeAt(index)))) { + advance(); + } + } + + function parseName(last, allowBrackets, allowNestedParams) { + var name = '', + useBrackets, + insideString; + + + skipWhiteSpace(last); + + if (index >= last) { + return null; + } + + if (source.charCodeAt(index) === 0x5B /* '[' */) { + if (allowBrackets) { + useBrackets = true; + name = advance(); + } else { + return null; + } + } + + name += scanIdentifier(last); + + if (allowNestedParams) { + if (source.charCodeAt(index) === 0x3A /* ':' */ && ( + name === 'module' || + name === 'external' || + name === 'event')) { + name += advance(); + name += scanIdentifier(last); + + } + if(source.charCodeAt(index) === 0x5B /* '[' */ && source.charCodeAt(index + 1) === 0x5D /* ']' */){ + name += advance(); + name += advance(); + } + while (source.charCodeAt(index) === 0x2E /* '.' */ || + source.charCodeAt(index) === 0x2F /* '/' */ || + source.charCodeAt(index) === 0x23 /* '#' */ || + source.charCodeAt(index) === 0x2D /* '-' */ || + source.charCodeAt(index) === 0x7E /* '~' */) { + name += advance(); + name += scanIdentifier(last); + } + } + + if (useBrackets) { + skipWhiteSpace(last); + // do we have a default value for this? + if (source.charCodeAt(index) === 0x3D /* '=' */) { + // consume the '='' symbol + name += advance(); + skipWhiteSpace(last); + + var ch; + var bracketDepth = 1; + + // scan in the default value + while (index < last) { + ch = source.charCodeAt(index); + + if (esutils.code.isWhiteSpace(ch)) { + if (!insideString) { + skipWhiteSpace(last); + ch = source.charCodeAt(index); + } + } + + if (ch === 0x27 /* ''' */) { + if (!insideString) { + insideString = '\''; + } else { + if (insideString === '\'') { + insideString = ''; + } + } + } + + if (ch === 0x22 /* '"' */) { + if (!insideString) { + insideString = '"'; + } else { + if (insideString === '"') { + insideString = ''; + } + } + } + + if (ch === 0x5B /* '[' */) { + bracketDepth++; + } else if (ch === 0x5D /* ']' */ && + --bracketDepth === 0) { + break; + } + + name += advance(); + } + } + + skipWhiteSpace(last); + + if (index >= last || source.charCodeAt(index) !== 0x5D /* ']' */) { + // we never found a closing ']' + return null; + } + + // collect the last ']' + name += advance(); + } + + return name; + } + + function skipToTag() { + while (index < length && source.charCodeAt(index) !== 0x40 /* '@' */) { + advance(); + } + if (index >= length) { + return false; + } + utility.assert(source.charCodeAt(index) === 0x40 /* '@' */); + return true; + } + + function convertIndex(rangeIndex) { + if (source === originalSource) { + return rangeIndex; + } + return convertUnwrappedCommentIndex(originalSource, rangeIndex); + } + + function TagParser(options, title) { + this._options = options; + this._title = title.toLowerCase(); + this._tag = { + title: title, + description: null + }; + if (this._options.lineNumbers) { + this._tag.lineNumber = lineNumber; + } + this._first = index - title.length - 1; + this._last = 0; + // space to save special information for title parsers. + this._extra = { }; + } + + // addError(err, ...) + TagParser.prototype.addError = function addError(errorText) { + var args = Array.prototype.slice.call(arguments, 1), + msg = errorText.replace( + /%(\d)/g, + function (whole, index) { + utility.assert(index < args.length, 'Message reference must be in range'); + return args[index]; + } + ); + + if (!this._tag.errors) { + this._tag.errors = []; + } + if (strict) { + utility.throwError(msg); + } + this._tag.errors.push(msg); + return recoverable; + }; + + TagParser.prototype.parseType = function () { + // type required titles + if (isTypeParameterRequired(this._title)) { + try { + this._tag.type = parseType(this._title, this._last, this._options.range); + if (!this._tag.type) { + if (!isParamTitle(this._title) && !isReturnTitle(this._title)) { + if (!this.addError('Missing or invalid tag type')) { + return false; + } + } + } + } catch (error) { + this._tag.type = null; + if (!this.addError(error.message)) { + return false; + } + } + } else if (isAllowedType(this._title)) { + // optional types + try { + this._tag.type = parseType(this._title, this._last, this._options.range); + } catch (e) { + //For optional types, lets drop the thrown error when we hit the end of the file + } + } + return true; + }; + + TagParser.prototype._parseNamePath = function (optional) { + var name; + name = parseName(this._last, sloppy && isAllowedOptional(this._title), true); + if (!name) { + if (!optional) { + if (!this.addError('Missing or invalid tag name')) { + return false; + } + } + } + this._tag.name = name; + return true; + }; + + TagParser.prototype.parseNamePath = function () { + return this._parseNamePath(false); + }; + + TagParser.prototype.parseNamePathOptional = function () { + return this._parseNamePath(true); + }; + + + TagParser.prototype.parseName = function () { + var assign, name; + + // param, property requires name + if (isAllowedName(this._title)) { + this._tag.name = parseName(this._last, sloppy && isAllowedOptional(this._title), isAllowedNested(this._title)); + if (!this._tag.name) { + if (!isNameParameterRequired(this._title)) { + return true; + } + + // it's possible the name has already been parsed but interpreted as a type + // it's also possible this is a sloppy declaration, in which case it will be + // fixed at the end + if (isParamTitle(this._title) && this._tag.type && this._tag.type.name) { + this._extra.name = this._tag.type; + this._tag.name = this._tag.type.name; + this._tag.type = null; + } else { + if (!this.addError('Missing or invalid tag name')) { + return false; + } + } + } else { + name = this._tag.name; + if (name.charAt(0) === '[' && name.charAt(name.length - 1) === ']') { + // extract the default value if there is one + // example: @param {string} [somebody=John Doe] description + assign = name.substring(1, name.length - 1).split('='); + if (assign.length > 1) { + this._tag['default'] = assign.slice(1).join('='); + } + this._tag.name = assign[0]; + + // convert to an optional type + if (this._tag.type && this._tag.type.type !== 'OptionalType') { + this._tag.type = { + type: 'OptionalType', + expression: this._tag.type + }; + } + } + } + } + + + return true; + }; + + TagParser.prototype.parseDescription = function parseDescription() { + var description = sliceSource(source, index, this._last).trim(); + if (description) { + if ((/^-\s+/).test(description)) { + description = description.substring(2); + } + this._tag.description = description; + } + return true; + }; + + TagParser.prototype.parseCaption = function parseDescription() { + var description = sliceSource(source, index, this._last).trim(); + var captionStartTag = ''; + var captionEndTag = ''; + var captionStart = description.indexOf(captionStartTag); + var captionEnd = description.indexOf(captionEndTag); + if (captionStart >= 0 && captionEnd >= 0) { + this._tag.caption = description.substring( + captionStart + captionStartTag.length, captionEnd).trim(); + this._tag.description = description.substring(captionEnd + captionEndTag.length).trim(); + } else { + this._tag.description = description; + } + return true; + }; + + TagParser.prototype.parseKind = function parseKind() { + var kind, kinds; + kinds = { + 'class': true, + 'constant': true, + 'event': true, + 'external': true, + 'file': true, + 'function': true, + 'member': true, + 'mixin': true, + 'module': true, + 'namespace': true, + 'typedef': true + }; + kind = sliceSource(source, index, this._last).trim(); + this._tag.kind = kind; + if (!hasOwnProperty(kinds, kind)) { + if (!this.addError('Invalid kind name \'%0\'', kind)) { + return false; + } + } + return true; + }; + + TagParser.prototype.parseAccess = function parseAccess() { + var access; + access = sliceSource(source, index, this._last).trim(); + this._tag.access = access; + if (access !== 'private' && access !== 'protected' && access !== 'public') { + if (!this.addError('Invalid access name \'%0\'', access)) { + return false; + } + } + return true; + }; + + TagParser.prototype.parseThis = function parseThis() { + // this name may be a name expression (e.g. {foo.bar}), + // an union (e.g. {foo.bar|foo.baz}) or a name path (e.g. foo.bar) + var value = sliceSource(source, index, this._last).trim(); + if (value && value.charAt(0) === '{') { + var gotType = this.parseType(); + if (gotType && this._tag.type.type === 'NameExpression' || this._tag.type.type === 'UnionType') { + this._tag.name = this._tag.type.name; + return true; + } else { + return this.addError('Invalid name for this'); + } + } else { + return this.parseNamePath(); + } + }; + + TagParser.prototype.parseVariation = function parseVariation() { + var variation, text; + text = sliceSource(source, index, this._last).trim(); + variation = parseFloat(text, 10); + this._tag.variation = variation; + if (isNaN(variation)) { + if (!this.addError('Invalid variation \'%0\'', text)) { + return false; + } + } + return true; + }; + + TagParser.prototype.ensureEnd = function () { + var shouldBeEmpty = sliceSource(source, index, this._last).trim(); + if (shouldBeEmpty) { + if (!this.addError('Unknown content \'%0\'', shouldBeEmpty)) { + return false; + } + } + return true; + }; + + TagParser.prototype.epilogue = function epilogue() { + var description; + + description = this._tag.description; + // un-fix potentially sloppy declaration + if (isAllowedOptional(this._title) && !this._tag.type && description && description.charAt(0) === '[') { + this._tag.type = this._extra.name; + if (!this._tag.name) { + this._tag.name = undefined; + } + + if (!sloppy) { + if (!this.addError('Missing or invalid tag name')) { + return false; + } + } + } + + return true; + }; + + Rules = { + // http://usejsdoc.org/tags-access.html + 'access': ['parseAccess'], + // http://usejsdoc.org/tags-alias.html + 'alias': ['parseNamePath', 'ensureEnd'], + // http://usejsdoc.org/tags-augments.html + 'augments': ['parseType', 'parseNamePathOptional', 'ensureEnd'], + // http://usejsdoc.org/tags-constructor.html + 'constructor': ['parseType', 'parseNamePathOptional', 'ensureEnd'], + // Synonym: http://usejsdoc.org/tags-constructor.html + 'class': ['parseType', 'parseNamePathOptional', 'ensureEnd'], + // Synonym: http://usejsdoc.org/tags-extends.html + 'extends': ['parseType', 'parseNamePathOptional', 'ensureEnd'], + // http://usejsdoc.org/tags-example.html + 'example': ['parseCaption'], + // http://usejsdoc.org/tags-deprecated.html + 'deprecated': ['parseDescription'], + // http://usejsdoc.org/tags-global.html + 'global': ['ensureEnd'], + // http://usejsdoc.org/tags-inner.html + 'inner': ['ensureEnd'], + // http://usejsdoc.org/tags-instance.html + 'instance': ['ensureEnd'], + // http://usejsdoc.org/tags-kind.html + 'kind': ['parseKind'], + // http://usejsdoc.org/tags-mixes.html + 'mixes': ['parseNamePath', 'ensureEnd'], + // http://usejsdoc.org/tags-mixin.html + 'mixin': ['parseNamePathOptional', 'ensureEnd'], + // http://usejsdoc.org/tags-member.html + 'member': ['parseType', 'parseNamePathOptional', 'ensureEnd'], + // http://usejsdoc.org/tags-method.html + 'method': ['parseNamePathOptional', 'ensureEnd'], + // http://usejsdoc.org/tags-module.html + 'module': ['parseType', 'parseNamePathOptional', 'ensureEnd'], + // Synonym: http://usejsdoc.org/tags-method.html + 'func': ['parseNamePathOptional', 'ensureEnd'], + // Synonym: http://usejsdoc.org/tags-method.html + 'function': ['parseNamePathOptional', 'ensureEnd'], + // Synonym: http://usejsdoc.org/tags-member.html + 'var': ['parseType', 'parseNamePathOptional', 'ensureEnd'], + // http://usejsdoc.org/tags-name.html + 'name': ['parseNamePath', 'ensureEnd'], + // http://usejsdoc.org/tags-namespace.html + 'namespace': ['parseType', 'parseNamePathOptional', 'ensureEnd'], + // http://usejsdoc.org/tags-private.html + 'private': ['parseType', 'parseDescription'], + // http://usejsdoc.org/tags-protected.html + 'protected': ['parseType', 'parseDescription'], + // http://usejsdoc.org/tags-public.html + 'public': ['parseType', 'parseDescription'], + // http://usejsdoc.org/tags-readonly.html + 'readonly': ['ensureEnd'], + // http://usejsdoc.org/tags-requires.html + 'requires': ['parseNamePath', 'ensureEnd'], + // http://usejsdoc.org/tags-since.html + 'since': ['parseDescription'], + // http://usejsdoc.org/tags-static.html + 'static': ['ensureEnd'], + // http://usejsdoc.org/tags-summary.html + 'summary': ['parseDescription'], + // http://usejsdoc.org/tags-this.html + 'this': ['parseThis', 'ensureEnd'], + // http://usejsdoc.org/tags-todo.html + 'todo': ['parseDescription'], + // http://usejsdoc.org/tags-typedef.html + 'typedef': ['parseType', 'parseNamePathOptional'], + // http://usejsdoc.org/tags-variation.html + 'variation': ['parseVariation'], + // http://usejsdoc.org/tags-version.html + 'version': ['parseDescription'] + }; + + TagParser.prototype.parse = function parse() { + var i, iz, sequences, method; + + + // empty title + if (!this._title) { + if (!this.addError('Missing or invalid title')) { + return null; + } + } + + // Seek to content last index. + this._last = seekContent(this._title); + + if (this._options.range) { + this._tag.range = [this._first, source.slice(0, this._last).replace(/\s*$/, '').length].map(convertIndex); + } + + if (hasOwnProperty(Rules, this._title)) { + sequences = Rules[this._title]; + } else { + // default sequences + sequences = ['parseType', 'parseName', 'parseDescription', 'epilogue']; + } + + for (i = 0, iz = sequences.length; i < iz; ++i) { + method = sequences[i]; + if (!this[method]()) { + return null; + } + } + + return this._tag; + }; + + function parseTag(options) { + var title, parser, tag; + + // skip to tag + if (!skipToTag()) { + return null; + } + + // scan title + title = scanTitle(); + + // construct tag parser + parser = new TagParser(options, title); + tag = parser.parse(); + + // Seek global index to end of this tag. + while (index < parser._last) { + advance(); + } + + return tag; + } + + // + // Parse JSDoc + // + + function scanJSDocDescription(preserveWhitespace) { + var description = '', ch, atAllowed; + + atAllowed = true; + while (index < length) { + ch = source.charCodeAt(index); + + if (atAllowed && ch === 0x40 /* '@' */) { + break; + } + + if (esutils.code.isLineTerminator(ch)) { + atAllowed = true; + } else if (atAllowed && !esutils.code.isWhiteSpace(ch)) { + atAllowed = false; + } + + description += advance(); + } + + return preserveWhitespace ? description : description.trim(); + } + + function parse(comment, options) { + var tags = [], tag, description, interestingTags, i, iz; + + if (options === undefined) { + options = {}; + } + + if (typeof options.unwrap === 'boolean' && options.unwrap) { + source = unwrapComment(comment); + } else { + source = comment; + } + + originalSource = comment; + + // array of relevant tags + if (options.tags) { + if (Array.isArray(options.tags)) { + interestingTags = { }; + for (i = 0, iz = options.tags.length; i < iz; i++) { + if (typeof options.tags[i] === 'string') { + interestingTags[options.tags[i]] = true; + } else { + utility.throwError('Invalid "tags" parameter: ' + options.tags); + } + } + } else { + utility.throwError('Invalid "tags" parameter: ' + options.tags); + } + } + + length = source.length; + index = 0; + lineNumber = 0; + recoverable = options.recoverable; + sloppy = options.sloppy; + strict = options.strict; + + description = scanJSDocDescription(options.preserveWhitespace); + + while (true) { + tag = parseTag(options); + if (!tag) { + break; + } + if (!interestingTags || interestingTags.hasOwnProperty(tag.title)) { + tags.push(tag); + } + } + + return { + description: description, + tags: tags + }; + } + exports.parse = parse; + }(jsdoc = {})); + + exports.version = utility.VERSION; + exports.parse = jsdoc.parse; + exports.parseType = typed.parseType; + exports.parseParamType = typed.parseParamType; + exports.unwrapComment = unwrapComment; + exports.Syntax = shallowCopy(typed.Syntax); + exports.Error = utility.DoctrineError; + exports.type = { + Syntax: exports.Syntax, + parseType: typed.parseType, + parseParamType: typed.parseParamType, + stringify: typed.stringify + }; +}()); +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/node_modules/doctrine/lib/typed.js b/node_modules/doctrine/lib/typed.js new file mode 100644 index 0000000..bdd3c39 --- /dev/null +++ b/node_modules/doctrine/lib/typed.js @@ -0,0 +1,1305 @@ +/* + * @fileoverview Type expression parser. + * @author Yusuke Suzuki + * @author Dan Tao + * @author Andrew Eisenberg + */ + +// "typed", the Type Expression Parser for doctrine. + +(function () { + 'use strict'; + + var Syntax, + Token, + source, + length, + index, + previous, + token, + value, + esutils, + utility, + rangeOffset, + addRange; + + esutils = require('esutils'); + utility = require('./utility'); + + Syntax = { + NullableLiteral: 'NullableLiteral', + AllLiteral: 'AllLiteral', + NullLiteral: 'NullLiteral', + UndefinedLiteral: 'UndefinedLiteral', + VoidLiteral: 'VoidLiteral', + UnionType: 'UnionType', + ArrayType: 'ArrayType', + RecordType: 'RecordType', + FieldType: 'FieldType', + FunctionType: 'FunctionType', + ParameterType: 'ParameterType', + RestType: 'RestType', + NonNullableType: 'NonNullableType', + OptionalType: 'OptionalType', + NullableType: 'NullableType', + NameExpression: 'NameExpression', + TypeApplication: 'TypeApplication', + StringLiteralType: 'StringLiteralType', + NumericLiteralType: 'NumericLiteralType', + BooleanLiteralType: 'BooleanLiteralType' + }; + + Token = { + ILLEGAL: 0, // ILLEGAL + DOT_LT: 1, // .< + REST: 2, // ... + LT: 3, // < + GT: 4, // > + LPAREN: 5, // ( + RPAREN: 6, // ) + LBRACE: 7, // { + RBRACE: 8, // } + LBRACK: 9, // [ + RBRACK: 10, // ] + COMMA: 11, // , + COLON: 12, // : + STAR: 13, // * + PIPE: 14, // | + QUESTION: 15, // ? + BANG: 16, // ! + EQUAL: 17, // = + NAME: 18, // name token + STRING: 19, // string + NUMBER: 20, // number + EOF: 21 + }; + + function isTypeName(ch) { + return '><(){}[],:*|?!='.indexOf(String.fromCharCode(ch)) === -1 && !esutils.code.isWhiteSpace(ch) && !esutils.code.isLineTerminator(ch); + } + + function Context(previous, index, token, value) { + this._previous = previous; + this._index = index; + this._token = token; + this._value = value; + } + + Context.prototype.restore = function () { + previous = this._previous; + index = this._index; + token = this._token; + value = this._value; + }; + + Context.save = function () { + return new Context(previous, index, token, value); + }; + + function maybeAddRange(node, range) { + if (addRange) { + node.range = [range[0] + rangeOffset, range[1] + rangeOffset]; + } + return node; + } + + function advance() { + var ch = source.charAt(index); + index += 1; + return ch; + } + + function scanHexEscape(prefix) { + var i, len, ch, code = 0; + + len = (prefix === 'u') ? 4 : 2; + for (i = 0; i < len; ++i) { + if (index < length && esutils.code.isHexDigit(source.charCodeAt(index))) { + ch = advance(); + code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase()); + } else { + return ''; + } + } + return String.fromCharCode(code); + } + + function scanString() { + var str = '', quote, ch, code, unescaped, restore; //TODO review removal octal = false + quote = source.charAt(index); + ++index; + + while (index < length) { + ch = advance(); + + if (ch === quote) { + quote = ''; + break; + } else if (ch === '\\') { + ch = advance(); + if (!esutils.code.isLineTerminator(ch.charCodeAt(0))) { + switch (ch) { + case 'n': + str += '\n'; + break; + case 'r': + str += '\r'; + break; + case 't': + str += '\t'; + break; + case 'u': + case 'x': + restore = index; + unescaped = scanHexEscape(ch); + if (unescaped) { + str += unescaped; + } else { + index = restore; + str += ch; + } + break; + case 'b': + str += '\b'; + break; + case 'f': + str += '\f'; + break; + case 'v': + str += '\v'; + break; + + default: + if (esutils.code.isOctalDigit(ch.charCodeAt(0))) { + code = '01234567'.indexOf(ch); + + // \0 is not octal escape sequence + // Deprecating unused code. TODO review removal + //if (code !== 0) { + // octal = true; + //} + + if (index < length && esutils.code.isOctalDigit(source.charCodeAt(index))) { + //TODO Review Removal octal = true; + code = code * 8 + '01234567'.indexOf(advance()); + + // 3 digits are only allowed when string starts + // with 0, 1, 2, 3 + if ('0123'.indexOf(ch) >= 0 && + index < length && + esutils.code.isOctalDigit(source.charCodeAt(index))) { + code = code * 8 + '01234567'.indexOf(advance()); + } + } + str += String.fromCharCode(code); + } else { + str += ch; + } + break; + } + } else { + if (ch === '\r' && source.charCodeAt(index) === 0x0A /* '\n' */) { + ++index; + } + } + } else if (esutils.code.isLineTerminator(ch.charCodeAt(0))) { + break; + } else { + str += ch; + } + } + + if (quote !== '') { + utility.throwError('unexpected quote'); + } + + value = str; + return Token.STRING; + } + + function scanNumber() { + var number, ch; + + number = ''; + ch = source.charCodeAt(index); + + if (ch !== 0x2E /* '.' */) { + number = advance(); + ch = source.charCodeAt(index); + + if (number === '0') { + if (ch === 0x78 /* 'x' */ || ch === 0x58 /* 'X' */) { + number += advance(); + while (index < length) { + ch = source.charCodeAt(index); + if (!esutils.code.isHexDigit(ch)) { + break; + } + number += advance(); + } + + if (number.length <= 2) { + // only 0x + utility.throwError('unexpected token'); + } + + if (index < length) { + ch = source.charCodeAt(index); + if (esutils.code.isIdentifierStartES5(ch)) { + utility.throwError('unexpected token'); + } + } + value = parseInt(number, 16); + return Token.NUMBER; + } + + if (esutils.code.isOctalDigit(ch)) { + number += advance(); + while (index < length) { + ch = source.charCodeAt(index); + if (!esutils.code.isOctalDigit(ch)) { + break; + } + number += advance(); + } + + if (index < length) { + ch = source.charCodeAt(index); + if (esutils.code.isIdentifierStartES5(ch) || esutils.code.isDecimalDigit(ch)) { + utility.throwError('unexpected token'); + } + } + value = parseInt(number, 8); + return Token.NUMBER; + } + + if (esutils.code.isDecimalDigit(ch)) { + utility.throwError('unexpected token'); + } + } + + while (index < length) { + ch = source.charCodeAt(index); + if (!esutils.code.isDecimalDigit(ch)) { + break; + } + number += advance(); + } + } + + if (ch === 0x2E /* '.' */) { + number += advance(); + while (index < length) { + ch = source.charCodeAt(index); + if (!esutils.code.isDecimalDigit(ch)) { + break; + } + number += advance(); + } + } + + if (ch === 0x65 /* 'e' */ || ch === 0x45 /* 'E' */) { + number += advance(); + + ch = source.charCodeAt(index); + if (ch === 0x2B /* '+' */ || ch === 0x2D /* '-' */) { + number += advance(); + } + + ch = source.charCodeAt(index); + if (esutils.code.isDecimalDigit(ch)) { + number += advance(); + while (index < length) { + ch = source.charCodeAt(index); + if (!esutils.code.isDecimalDigit(ch)) { + break; + } + number += advance(); + } + } else { + utility.throwError('unexpected token'); + } + } + + if (index < length) { + ch = source.charCodeAt(index); + if (esutils.code.isIdentifierStartES5(ch)) { + utility.throwError('unexpected token'); + } + } + + value = parseFloat(number); + return Token.NUMBER; + } + + + function scanTypeName() { + var ch, ch2; + + value = advance(); + while (index < length && isTypeName(source.charCodeAt(index))) { + ch = source.charCodeAt(index); + if (ch === 0x2E /* '.' */) { + if ((index + 1) >= length) { + return Token.ILLEGAL; + } + ch2 = source.charCodeAt(index + 1); + if (ch2 === 0x3C /* '<' */) { + break; + } + } + value += advance(); + } + return Token.NAME; + } + + function next() { + var ch; + + previous = index; + + while (index < length && esutils.code.isWhiteSpace(source.charCodeAt(index))) { + advance(); + } + if (index >= length) { + token = Token.EOF; + return token; + } + + ch = source.charCodeAt(index); + switch (ch) { + case 0x27: /* ''' */ + case 0x22: /* '"' */ + token = scanString(); + return token; + + case 0x3A: /* ':' */ + advance(); + token = Token.COLON; + return token; + + case 0x2C: /* ',' */ + advance(); + token = Token.COMMA; + return token; + + case 0x28: /* '(' */ + advance(); + token = Token.LPAREN; + return token; + + case 0x29: /* ')' */ + advance(); + token = Token.RPAREN; + return token; + + case 0x5B: /* '[' */ + advance(); + token = Token.LBRACK; + return token; + + case 0x5D: /* ']' */ + advance(); + token = Token.RBRACK; + return token; + + case 0x7B: /* '{' */ + advance(); + token = Token.LBRACE; + return token; + + case 0x7D: /* '}' */ + advance(); + token = Token.RBRACE; + return token; + + case 0x2E: /* '.' */ + if (index + 1 < length) { + ch = source.charCodeAt(index + 1); + if (ch === 0x3C /* '<' */) { + advance(); // '.' + advance(); // '<' + token = Token.DOT_LT; + return token; + } + + if (ch === 0x2E /* '.' */ && index + 2 < length && source.charCodeAt(index + 2) === 0x2E /* '.' */) { + advance(); // '.' + advance(); // '.' + advance(); // '.' + token = Token.REST; + return token; + } + + if (esutils.code.isDecimalDigit(ch)) { + token = scanNumber(); + return token; + } + } + token = Token.ILLEGAL; + return token; + + case 0x3C: /* '<' */ + advance(); + token = Token.LT; + return token; + + case 0x3E: /* '>' */ + advance(); + token = Token.GT; + return token; + + case 0x2A: /* '*' */ + advance(); + token = Token.STAR; + return token; + + case 0x7C: /* '|' */ + advance(); + token = Token.PIPE; + return token; + + case 0x3F: /* '?' */ + advance(); + token = Token.QUESTION; + return token; + + case 0x21: /* '!' */ + advance(); + token = Token.BANG; + return token; + + case 0x3D: /* '=' */ + advance(); + token = Token.EQUAL; + return token; + + case 0x2D: /* '-' */ + token = scanNumber(); + return token; + + default: + if (esutils.code.isDecimalDigit(ch)) { + token = scanNumber(); + return token; + } + + // type string permits following case, + // + // namespace.module.MyClass + // + // this reduced 1 token TK_NAME + utility.assert(isTypeName(ch)); + token = scanTypeName(); + return token; + } + } + + function consume(target, text) { + utility.assert(token === target, text || 'consumed token not matched'); + next(); + } + + function expect(target, message) { + if (token !== target) { + utility.throwError(message || 'unexpected token'); + } + next(); + } + + // UnionType := '(' TypeUnionList ')' + // + // TypeUnionList := + // <> + // | NonemptyTypeUnionList + // + // NonemptyTypeUnionList := + // TypeExpression + // | TypeExpression '|' NonemptyTypeUnionList + function parseUnionType() { + var elements, startIndex = index - 1; + consume(Token.LPAREN, 'UnionType should start with ('); + elements = []; + if (token !== Token.RPAREN) { + while (true) { + elements.push(parseTypeExpression()); + if (token === Token.RPAREN) { + break; + } + expect(Token.PIPE); + } + } + consume(Token.RPAREN, 'UnionType should end with )'); + return maybeAddRange({ + type: Syntax.UnionType, + elements: elements + }, [startIndex, previous]); + } + + // ArrayType := '[' ElementTypeList ']' + // + // ElementTypeList := + // <> + // | TypeExpression + // | '...' TypeExpression + // | TypeExpression ',' ElementTypeList + function parseArrayType() { + var elements, startIndex = index - 1, restStartIndex; + consume(Token.LBRACK, 'ArrayType should start with ['); + elements = []; + while (token !== Token.RBRACK) { + if (token === Token.REST) { + restStartIndex = index - 3; + consume(Token.REST); + elements.push(maybeAddRange({ + type: Syntax.RestType, + expression: parseTypeExpression() + }, [restStartIndex, previous])); + break; + } else { + elements.push(parseTypeExpression()); + } + if (token !== Token.RBRACK) { + expect(Token.COMMA); + } + } + expect(Token.RBRACK); + return maybeAddRange({ + type: Syntax.ArrayType, + elements: elements + }, [startIndex, previous]); + } + + function parseFieldName() { + var v = value; + if (token === Token.NAME || token === Token.STRING) { + next(); + return v; + } + + if (token === Token.NUMBER) { + consume(Token.NUMBER); + return String(v); + } + + utility.throwError('unexpected token'); + } + + // FieldType := + // FieldName + // | FieldName ':' TypeExpression + // + // FieldName := + // NameExpression + // | StringLiteral + // | NumberLiteral + // | ReservedIdentifier + function parseFieldType() { + var key, rangeStart = previous; + + key = parseFieldName(); + if (token === Token.COLON) { + consume(Token.COLON); + return maybeAddRange({ + type: Syntax.FieldType, + key: key, + value: parseTypeExpression() + }, [rangeStart, previous]); + } + return maybeAddRange({ + type: Syntax.FieldType, + key: key, + value: null + }, [rangeStart, previous]); + } + + // RecordType := '{' FieldTypeList '}' + // + // FieldTypeList := + // <> + // | FieldType + // | FieldType ',' FieldTypeList + function parseRecordType() { + var fields, rangeStart = index - 1, rangeEnd; + + consume(Token.LBRACE, 'RecordType should start with {'); + fields = []; + if (token === Token.COMMA) { + consume(Token.COMMA); + } else { + while (token !== Token.RBRACE) { + fields.push(parseFieldType()); + if (token !== Token.RBRACE) { + expect(Token.COMMA); + } + } + } + rangeEnd = index; + expect(Token.RBRACE); + return maybeAddRange({ + type: Syntax.RecordType, + fields: fields + }, [rangeStart, rangeEnd]); + } + + // NameExpression := + // Identifier + // | TagIdentifier ':' Identifier + // + // Tag identifier is one of "module", "external" or "event" + // Identifier is the same as Token.NAME, including any dots, something like + // namespace.module.MyClass + function parseNameExpression() { + var name = value, rangeStart = index - name.length; + expect(Token.NAME); + + if (token === Token.COLON && ( + name === 'module' || + name === 'external' || + name === 'event')) { + consume(Token.COLON); + name += ':' + value; + expect(Token.NAME); + } + + return maybeAddRange({ + type: Syntax.NameExpression, + name: name + }, [rangeStart, previous]); + } + + // TypeExpressionList := + // TopLevelTypeExpression + // | TopLevelTypeExpression ',' TypeExpressionList + function parseTypeExpressionList() { + var elements = []; + + elements.push(parseTop()); + while (token === Token.COMMA) { + consume(Token.COMMA); + elements.push(parseTop()); + } + return elements; + } + + // TypeName := + // NameExpression + // | NameExpression TypeApplication + // + // TypeApplication := + // '.<' TypeExpressionList '>' + // | '<' TypeExpressionList '>' // this is extension of doctrine + function parseTypeName() { + var expr, applications, startIndex = index - value.length; + + expr = parseNameExpression(); + if (token === Token.DOT_LT || token === Token.LT) { + next(); + applications = parseTypeExpressionList(); + expect(Token.GT); + return maybeAddRange({ + type: Syntax.TypeApplication, + expression: expr, + applications: applications + }, [startIndex, previous]); + } + return expr; + } + + // ResultType := + // <> + // | ':' void + // | ':' TypeExpression + // + // BNF is above + // but, we remove <> pattern, so token is always TypeToken::COLON + function parseResultType() { + consume(Token.COLON, 'ResultType should start with :'); + if (token === Token.NAME && value === 'void') { + consume(Token.NAME); + return { + type: Syntax.VoidLiteral + }; + } + return parseTypeExpression(); + } + + // ParametersType := + // RestParameterType + // | NonRestParametersType + // | NonRestParametersType ',' RestParameterType + // + // RestParameterType := + // '...' + // '...' Identifier + // + // NonRestParametersType := + // ParameterType ',' NonRestParametersType + // | ParameterType + // | OptionalParametersType + // + // OptionalParametersType := + // OptionalParameterType + // | OptionalParameterType, OptionalParametersType + // + // OptionalParameterType := ParameterType= + // + // ParameterType := TypeExpression | Identifier ':' TypeExpression + // + // Identifier is "new" or "this" + function parseParametersType() { + var params = [], optionalSequence = false, expr, rest = false, startIndex, restStartIndex = index - 3, nameStartIndex; + + while (token !== Token.RPAREN) { + if (token === Token.REST) { + // RestParameterType + consume(Token.REST); + rest = true; + } + + startIndex = previous; + + expr = parseTypeExpression(); + if (expr.type === Syntax.NameExpression && token === Token.COLON) { + nameStartIndex = previous - expr.name.length; + // Identifier ':' TypeExpression + consume(Token.COLON); + expr = maybeAddRange({ + type: Syntax.ParameterType, + name: expr.name, + expression: parseTypeExpression() + }, [nameStartIndex, previous]); + } + if (token === Token.EQUAL) { + consume(Token.EQUAL); + expr = maybeAddRange({ + type: Syntax.OptionalType, + expression: expr + }, [startIndex, previous]); + optionalSequence = true; + } else { + if (optionalSequence) { + utility.throwError('unexpected token'); + } + } + if (rest) { + expr = maybeAddRange({ + type: Syntax.RestType, + expression: expr + }, [restStartIndex, previous]); + } + params.push(expr); + if (token !== Token.RPAREN) { + expect(Token.COMMA); + } + } + return params; + } + + // FunctionType := 'function' FunctionSignatureType + // + // FunctionSignatureType := + // | TypeParameters '(' ')' ResultType + // | TypeParameters '(' ParametersType ')' ResultType + // | TypeParameters '(' 'this' ':' TypeName ')' ResultType + // | TypeParameters '(' 'this' ':' TypeName ',' ParametersType ')' ResultType + function parseFunctionType() { + var isNew, thisBinding, params, result, fnType, startIndex = index - value.length; + utility.assert(token === Token.NAME && value === 'function', 'FunctionType should start with \'function\''); + consume(Token.NAME); + + // Google Closure Compiler is not implementing TypeParameters. + // So we do not. if we don't get '(', we see it as error. + expect(Token.LPAREN); + + isNew = false; + params = []; + thisBinding = null; + if (token !== Token.RPAREN) { + // ParametersType or 'this' + if (token === Token.NAME && + (value === 'this' || value === 'new')) { + // 'this' or 'new' + // 'new' is Closure Compiler extension + isNew = value === 'new'; + consume(Token.NAME); + expect(Token.COLON); + thisBinding = parseTypeName(); + if (token === Token.COMMA) { + consume(Token.COMMA); + params = parseParametersType(); + } + } else { + params = parseParametersType(); + } + } + + expect(Token.RPAREN); + + result = null; + if (token === Token.COLON) { + result = parseResultType(); + } + + fnType = maybeAddRange({ + type: Syntax.FunctionType, + params: params, + result: result + }, [startIndex, previous]); + if (thisBinding) { + // avoid adding null 'new' and 'this' properties + fnType['this'] = thisBinding; + if (isNew) { + fnType['new'] = true; + } + } + return fnType; + } + + // BasicTypeExpression := + // '*' + // | 'null' + // | 'undefined' + // | TypeName + // | FunctionType + // | UnionType + // | RecordType + // | ArrayType + function parseBasicTypeExpression() { + var context, startIndex; + switch (token) { + case Token.STAR: + consume(Token.STAR); + return maybeAddRange({ + type: Syntax.AllLiteral + }, [previous - 1, previous]); + + case Token.LPAREN: + return parseUnionType(); + + case Token.LBRACK: + return parseArrayType(); + + case Token.LBRACE: + return parseRecordType(); + + case Token.NAME: + startIndex = index - value.length; + + if (value === 'null') { + consume(Token.NAME); + return maybeAddRange({ + type: Syntax.NullLiteral + }, [startIndex, previous]); + } + + if (value === 'undefined') { + consume(Token.NAME); + return maybeAddRange({ + type: Syntax.UndefinedLiteral + }, [startIndex, previous]); + } + + if (value === 'true' || value === 'false') { + consume(Token.NAME); + return maybeAddRange({ + type: Syntax.BooleanLiteralType, + value: value === 'true' + }, [startIndex, previous]); + } + + context = Context.save(); + if (value === 'function') { + try { + return parseFunctionType(); + } catch (e) { + context.restore(); + } + } + + return parseTypeName(); + + case Token.STRING: + next(); + return maybeAddRange({ + type: Syntax.StringLiteralType, + value: value + }, [previous - value.length - 2, previous]); + + case Token.NUMBER: + next(); + return maybeAddRange({ + type: Syntax.NumericLiteralType, + value: value + }, [previous - String(value).length, previous]); + + default: + utility.throwError('unexpected token'); + } + } + + // TypeExpression := + // BasicTypeExpression + // | '?' BasicTypeExpression + // | '!' BasicTypeExpression + // | BasicTypeExpression '?' + // | BasicTypeExpression '!' + // | '?' + // | BasicTypeExpression '[]' + function parseTypeExpression() { + var expr, rangeStart; + + if (token === Token.QUESTION) { + rangeStart = index - 1; + consume(Token.QUESTION); + if (token === Token.COMMA || token === Token.EQUAL || token === Token.RBRACE || + token === Token.RPAREN || token === Token.PIPE || token === Token.EOF || + token === Token.RBRACK || token === Token.GT) { + return maybeAddRange({ + type: Syntax.NullableLiteral + }, [rangeStart, previous]); + } + return maybeAddRange({ + type: Syntax.NullableType, + expression: parseBasicTypeExpression(), + prefix: true + }, [rangeStart, previous]); + } else if (token === Token.BANG) { + rangeStart = index - 1; + consume(Token.BANG); + return maybeAddRange({ + type: Syntax.NonNullableType, + expression: parseBasicTypeExpression(), + prefix: true + }, [rangeStart, previous]); + } else { + rangeStart = previous; + } + + expr = parseBasicTypeExpression(); + if (token === Token.BANG) { + consume(Token.BANG); + return maybeAddRange({ + type: Syntax.NonNullableType, + expression: expr, + prefix: false + }, [rangeStart, previous]); + } + + if (token === Token.QUESTION) { + consume(Token.QUESTION); + return maybeAddRange({ + type: Syntax.NullableType, + expression: expr, + prefix: false + }, [rangeStart, previous]); + } + + if (token === Token.LBRACK) { + consume(Token.LBRACK); + expect(Token.RBRACK, 'expected an array-style type declaration (' + value + '[])'); + return maybeAddRange({ + type: Syntax.TypeApplication, + expression: maybeAddRange({ + type: Syntax.NameExpression, + name: 'Array' + }, [rangeStart, previous]), + applications: [expr] + }, [rangeStart, previous]); + } + + return expr; + } + + // TopLevelTypeExpression := + // TypeExpression + // | TypeUnionList + // + // This rule is Google Closure Compiler extension, not ES4 + // like, + // { number | string } + // If strict to ES4, we should write it as + // { (number|string) } + function parseTop() { + var expr, elements; + + expr = parseTypeExpression(); + if (token !== Token.PIPE) { + return expr; + } + + elements = [expr]; + consume(Token.PIPE); + while (true) { + elements.push(parseTypeExpression()); + if (token !== Token.PIPE) { + break; + } + consume(Token.PIPE); + } + + return maybeAddRange({ + type: Syntax.UnionType, + elements: elements + }, [0, index]); + } + + function parseTopParamType() { + var expr; + + if (token === Token.REST) { + consume(Token.REST); + return maybeAddRange({ + type: Syntax.RestType, + expression: parseTop() + }, [0, index]); + } + + expr = parseTop(); + if (token === Token.EQUAL) { + consume(Token.EQUAL); + return maybeAddRange({ + type: Syntax.OptionalType, + expression: expr + }, [0, index]); + } + + return expr; + } + + function parseType(src, opt) { + var expr; + + source = src; + length = source.length; + index = 0; + previous = 0; + addRange = opt && opt.range; + rangeOffset = opt && opt.startIndex || 0; + + next(); + expr = parseTop(); + + if (opt && opt.midstream) { + return { + expression: expr, + index: previous + }; + } + + if (token !== Token.EOF) { + utility.throwError('not reach to EOF'); + } + + return expr; + } + + function parseParamType(src, opt) { + var expr; + + source = src; + length = source.length; + index = 0; + previous = 0; + addRange = opt && opt.range; + rangeOffset = opt && opt.startIndex || 0; + + next(); + expr = parseTopParamType(); + + if (opt && opt.midstream) { + return { + expression: expr, + index: previous + }; + } + + if (token !== Token.EOF) { + utility.throwError('not reach to EOF'); + } + + return expr; + } + + function stringifyImpl(node, compact, topLevel) { + var result, i, iz; + + switch (node.type) { + case Syntax.NullableLiteral: + result = '?'; + break; + + case Syntax.AllLiteral: + result = '*'; + break; + + case Syntax.NullLiteral: + result = 'null'; + break; + + case Syntax.UndefinedLiteral: + result = 'undefined'; + break; + + case Syntax.VoidLiteral: + result = 'void'; + break; + + case Syntax.UnionType: + if (!topLevel) { + result = '('; + } else { + result = ''; + } + + for (i = 0, iz = node.elements.length; i < iz; ++i) { + result += stringifyImpl(node.elements[i], compact); + if ((i + 1) !== iz) { + result += compact ? '|' : ' | '; + } + } + + if (!topLevel) { + result += ')'; + } + break; + + case Syntax.ArrayType: + result = '['; + for (i = 0, iz = node.elements.length; i < iz; ++i) { + result += stringifyImpl(node.elements[i], compact); + if ((i + 1) !== iz) { + result += compact ? ',' : ', '; + } + } + result += ']'; + break; + + case Syntax.RecordType: + result = '{'; + for (i = 0, iz = node.fields.length; i < iz; ++i) { + result += stringifyImpl(node.fields[i], compact); + if ((i + 1) !== iz) { + result += compact ? ',' : ', '; + } + } + result += '}'; + break; + + case Syntax.FieldType: + if (node.value) { + result = node.key + (compact ? ':' : ': ') + stringifyImpl(node.value, compact); + } else { + result = node.key; + } + break; + + case Syntax.FunctionType: + result = compact ? 'function(' : 'function ('; + + if (node['this']) { + if (node['new']) { + result += (compact ? 'new:' : 'new: '); + } else { + result += (compact ? 'this:' : 'this: '); + } + + result += stringifyImpl(node['this'], compact); + + if (node.params.length !== 0) { + result += compact ? ',' : ', '; + } + } + + for (i = 0, iz = node.params.length; i < iz; ++i) { + result += stringifyImpl(node.params[i], compact); + if ((i + 1) !== iz) { + result += compact ? ',' : ', '; + } + } + + result += ')'; + + if (node.result) { + result += (compact ? ':' : ': ') + stringifyImpl(node.result, compact); + } + break; + + case Syntax.ParameterType: + result = node.name + (compact ? ':' : ': ') + stringifyImpl(node.expression, compact); + break; + + case Syntax.RestType: + result = '...'; + if (node.expression) { + result += stringifyImpl(node.expression, compact); + } + break; + + case Syntax.NonNullableType: + if (node.prefix) { + result = '!' + stringifyImpl(node.expression, compact); + } else { + result = stringifyImpl(node.expression, compact) + '!'; + } + break; + + case Syntax.OptionalType: + result = stringifyImpl(node.expression, compact) + '='; + break; + + case Syntax.NullableType: + if (node.prefix) { + result = '?' + stringifyImpl(node.expression, compact); + } else { + result = stringifyImpl(node.expression, compact) + '?'; + } + break; + + case Syntax.NameExpression: + result = node.name; + break; + + case Syntax.TypeApplication: + result = stringifyImpl(node.expression, compact) + '.<'; + for (i = 0, iz = node.applications.length; i < iz; ++i) { + result += stringifyImpl(node.applications[i], compact); + if ((i + 1) !== iz) { + result += compact ? ',' : ', '; + } + } + result += '>'; + break; + + case Syntax.StringLiteralType: + result = '"' + node.value + '"'; + break; + + case Syntax.NumericLiteralType: + result = String(node.value); + break; + + case Syntax.BooleanLiteralType: + result = String(node.value); + break; + + default: + utility.throwError('Unknown type ' + node.type); + } + + return result; + } + + function stringify(node, options) { + if (options == null) { + options = {}; + } + return stringifyImpl(node, options.compact, options.topLevel); + } + + exports.parseType = parseType; + exports.parseParamType = parseParamType; + exports.stringify = stringify; + exports.Syntax = Syntax; +}()); +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/node_modules/doctrine/lib/utility.js b/node_modules/doctrine/lib/utility.js new file mode 100644 index 0000000..381580e --- /dev/null +++ b/node_modules/doctrine/lib/utility.js @@ -0,0 +1,35 @@ +/* + * @fileoverview Utilities for Doctrine + * @author Yusuke Suzuki + */ + + +(function () { + 'use strict'; + + var VERSION; + + VERSION = require('../package.json').version; + exports.VERSION = VERSION; + + function DoctrineError(message) { + this.name = 'DoctrineError'; + this.message = message; + } + DoctrineError.prototype = (function () { + var Middle = function () { }; + Middle.prototype = Error.prototype; + return new Middle(); + }()); + DoctrineError.prototype.constructor = DoctrineError; + exports.DoctrineError = DoctrineError; + + function throwError(message) { + throw new DoctrineError(message); + } + exports.throwError = throwError; + + exports.assert = require('assert'); +}()); + +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/node_modules/doctrine/package.json b/node_modules/doctrine/package.json new file mode 100644 index 0000000..a7f1aa5 --- /dev/null +++ b/node_modules/doctrine/package.json @@ -0,0 +1,123 @@ +{ + "_args": [ + [ + { + "raw": "doctrine@^2.1.0", + "scope": null, + "escapedName": "doctrine", + "name": "doctrine", + "rawSpec": "^2.1.0", + "spec": ">=2.1.0 <3.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint" + ] + ], + "_from": "doctrine@>=2.1.0 <3.0.0", + "_id": "doctrine@2.1.0", + "_inCache": true, + "_location": "/doctrine", + "_nodeVersion": "8.9.3", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/doctrine-2.1.0.tgz_1515250441489_0.6465353241655976" + }, + "_npmUser": { + "name": "eslint", + "email": "nicholas+eslint@nczconsulting.com" + }, + "_npmVersion": "5.5.1", + "_phantomChildren": {}, + "_requested": { + "raw": "doctrine@^2.1.0", + "scope": null, + "escapedName": "doctrine", + "name": "doctrine", + "rawSpec": "^2.1.0", + "spec": ">=2.1.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "_shasum": "5cd01fc101621b42c4cd7f5d1a66243716d3f39d", + "_shrinkwrap": null, + "_spec": "doctrine@^2.1.0", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint", + "bugs": { + "url": "https://github.com/eslint/doctrine/issues" + }, + "dependencies": { + "esutils": "^2.0.2" + }, + "description": "JSDoc parser", + "devDependencies": { + "coveralls": "^2.11.2", + "dateformat": "^1.0.11", + "eslint": "^1.10.3", + "eslint-release": "^0.10.0", + "linefix": "^0.1.1", + "mocha": "^3.4.2", + "npm-license": "^0.3.1", + "nyc": "^10.3.2", + "semver": "^5.0.3", + "shelljs": "^0.5.3", + "shelljs-nodecli": "^0.1.1", + "should": "^5.0.1" + }, + "directories": { + "lib": "./lib" + }, + "dist": { + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "shasum": "5cd01fc101621b42c4cd7f5d1a66243716d3f39d", + "tarball": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "lib" + ], + "gitHead": "fdd0004782f218c4362fd928d82ef0e84a8e64d3", + "homepage": "https://github.com/eslint/doctrine", + "license": "Apache-2.0", + "main": "lib/doctrine.js", + "maintainers": [ + { + "name": "ivolodin", + "email": "ivolodin@gmail.com" + }, + { + "name": "eslint", + "email": "nicholas+eslint@nczconsulting.com" + }, + { + "name": "nzakas", + "email": "nicholas@nczconsulting.com" + }, + { + "name": "constellation", + "email": "utatane.tea@gmail.com" + } + ], + "name": "doctrine", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/eslint/doctrine.git" + }, + "scripts": { + "alpharelease": "eslint-prerelease alpha", + "betarelease": "eslint-prerelease beta", + "ci-release": "eslint-ci-release", + "coveralls": "nyc report --reporter=text-lcov | coveralls", + "lint": "eslint lib/", + "pretest": "npm run lint", + "release": "eslint-release", + "test": "nyc mocha" + }, + "version": "2.1.0" +} diff --git a/node_modules/easyews/LICENSE b/node_modules/easyews/LICENSE new file mode 100644 index 0000000..9cecc1d --- /dev/null +++ b/node_modules/easyews/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + {one line to give the program's name and a brief idea of what it does.} + Copyright (C) {year} {name of author} + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + {project} Copyright (C) {year} {fullname} + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/node_modules/easyews/README.md b/node_modules/easyews/README.md new file mode 100644 index 0000000..8da8425 --- /dev/null +++ b/node_modules/easyews/README.md @@ -0,0 +1,280 @@ +![LOGO](https://davecra.files.wordpress.com/2017/07/easyews.png?w=600) +# Introduction +This library makes performing EWS operations from Outlook Mail Web Add-ins via JavaScript much easier. EWS is quite difficult to perform from JavaScript because you have to format a specific SOAP message in order to submit the request using [makeEwsRequestAsync()](https://docs.microsoft.com/en-us/outlook/add-ins/web-services?product=outlook). However, this is complicated by the fact you then get a SOAP message back that you then have to parse in order to get your result (or error). This library limits your need to call makeEwsRequestAsync() by encapsulating the call in easy to use functions. + +**NOTE:** Microsoft official guidance at this point is to no longer use EWS, but rather to use the REST API's. Some of this functionality (as of this writing: 8/1/2017), is available through REST and some is not. However, to get more informaiton, please see the following link:https://docs.microsoft.com/en-us/outlook/add-ins/use-rest-api + +### Installation +To install this library, run the following command: + +``` +npm -install easyews +``` + +### Follow +Please follow my blog for the latest developments on easyEws. You can find my blog here: + +![LOGO](https://davecra.files.wordpress.com/2017/07/blog-icon-large.png?w=20) http://theofficecontext.com + +You can use this link to narrow the results only to those posts which relate to this library: + +* https://theofficecontext.com/?s=easyews + +![TWITTER](https://davecra.files.wordpress.com/2010/10/tlogo.png?w=20) You can also follow me on Twitter: [@davecra](http://twitter.com/davecra) + +![LINKEDIN](https://davecra.files.wordpress.com/2014/02/inbug-60px-r.png?w=20) And also on LinkedIn: [davidcr](https://www.linkedin.com/in/davidcr/) + +# Usage +This section is covers how to use easyEws. The following functions are available to call: + +* [sendPlainTextEmailWithAttachment](#sendPlainTextEmailWithAttachment) - creates a new emails message with a single attachment and sends it +* [getMailItemMimeContent](#getMailItemMimeContent)- gets the mail item as raw MIME data +* [updateEwsHeader](#updateEwsHeader) - Updates the headers in the mail item +* [getFolderItemIds](#getFolderItemIds)- Returns a list of items in the folder +* [getMailItem](#getMailItem) - Gets the item details for a specific item by ID +* [expandGroup](#expandGroup) - Returns a list of members to an Exchange Distribution Group +* [findConversationItems](#findConversationItems) - Find a given conversation by the ID +* [getSpecificHeader](#getSpecificHeader) - Gets a specific Internet header for a spific item +* [getEwsHeaders](#getEwsHeaders) - Gets Internet headers for a spific item +* [updateFolderProperty](#updateFolderProperty) - Updates a folder property. If the property does not exist, it will be created. +* [getFolderProperty](#getFolderProperty) - Gets a folder property +* [getFolderId](#getFolderId) - Gets the folder id by the given name from the store +* [moveItem](#moveItem) - Moves an item from one folder to another + +### sendPlainTextEmailWithAttachment +This method will send a plain text message to a recipient with an attachment. This function is very specific, but provides the essential foundation for creating an email with different options. + +**NOTE**: If additional options are needed, different types of send requests, please contact me. + +Here are the paramaters for this method: +* **subject**: *string* - this is the subject for the email to be set +* **body**: *string* - this is the body of the message to be sent. It must be in plain text. HTML is NOT supported. +* **to**: *string* - this is the list of recipients for the email to be sent +* **attachmentName**: *string* - this is the name of a single attachment you can apply to the email message +* **attachmentMime**: *string* - this is the MIME content (base64) of the object to be attached. +* **successCallback**: *function(**result**: string)* - Returns "success" if completed successfully. +* **errorCallback**: *function(**error**: string)* - If an error occurs a string with the resulting error will be returned. For more detail on the exact nature of the issue, you can refer to the debugCallback. +* **debugCallback**: *function(**debug**: string)* - Contains a detailed XML output with the original xml sent, the response from the server in xml, and any status messages or error objects returned. + +##### Example ##### +Here is an example of how to use this method: + +```javascript +Example is TBD. +``` + +### getMailItemMimeContent +This method will return the MIME content of a specific mail item. + +Here are the paramters for this method: +* **mailItemId**: *string* - the mail itemID for which you want to retrieve MIME content +* successCallback - function(result: string) - Returns the MIME content as a BASE64 string. You will want to btoa() the results to manage it as an object or string +* **errorCallback**: *function(**error**: string)* - If an error occurs a string with the resulting error will be returned. For more detail on the exact nature of the issue, you can refer to the debugCallback. +56 +* **debugCallback**: *function(**debug**: string)* - Contains a detailed XML output with the original xml sent, the response from the server in xml, and any status messages or error objects returned. + +##### Example ##### +Here is an example of how to use this method: + +```javascript +Example is TBD. +``` + +### updateEwsHeader +This method will update the mail transport (x-headers) in the selected message. The message must be saved into the mail store for this to work. + +**NOTE**: If you try to perform this on Outlook 2016 / full-windows-client, the settings may not stick if you are running in cached mode. This is by default. The only way for this to work is to wait for 30 seconds to a minute. This problem DOES NOT occur with Outlook in online mode and in Outlook Web Access (OWA) or Outlook Online (Office 365). + +Here are the paramters for this method: +* **mailItemId**: *string* - The mail item id for the items whos header you want to update +* **headerName**: *string* - The header you want to update +* **headerValue**: *string* - The value you want to set the header to +* **successCallback**: *function(**result**: string)* - Returns "success" if completed successfully. +* **errorCallback**: *function(**error**: string)* - If an error occurs a string with the resulting error will be returned. For more detail on the exact nature of the issue, you can refer to the debugCallback. +56 +* **debugCallback**: *function(**debug**: string)* - Contains a detailed XML output with the original xml sent, the response from the server in xml, and any status messages or error objects returned. + +##### Example ##### +Here is an example of how to use this method: + +```javascript +Example is TBD. +``` + +### getFolderItemIds +This method will return an array of item IDs for all the items found in a particular folder. If you need the number of items in a folder you can get the array count. If you need to find a specific item you can then use the ID's to make the [getMailItem()](#getMailItem) method. + +Here are the paramaters for this method: +* **folderId**: *string*: The folder ID for which you want to get all the items +* **successCallback**: *function(**result**: string[])* - returns an array of itemID's if completed successfully. +* **errorCallback**: *function(**error**: string)* - If an error occurs a string with the resulting error will be returned. For more detail on the exact nature of the issue, you can refer to the debugCallback. +56 +* **debugCallback**: *function(**debug**: string)* - Contains a detailed XML output with the original xml sent, the response from the server in xml, and any status messages or error objects returned. + +##### Example ##### +Here is an example of how to use this method: + +```javascript +Example is TBD. +``` + +### getMailItem +This method will get all the details of a mail item and store it in a MailItem object. + +**NOTE:** The MailItem object right now is very primitive only surfacing a few of the properties. If more proeprties are needed, please contact me. + +Here are the parameters for this method: +* **itemId**: *string* - the item id you want to access. +* **successCallback**: *function(**result**: MailItem)* - Returns a MailItem object with the values of the email +* **errorCallback**: *function(**error**: string)* - If an error occurs a string with the resulting error will be returned. For more detail on the exact nature of the issue, you can refer to the debugCallback. +56 +* **debugCallback**: *function(**debug**: string)* - Contains a detailed XML output with the original xml sent, the response from the server in xml, and any status messages or error objects returned. + +##### Example ##### +Here is an example of how to use this method: + +```javascript +Example is TBD. +``` + +### expandGroup +(2/27/2018) This does not function in Exchange 2016 / On-Prem (TBD in CU9). + +This method will take a group name and split it one level to constituent users and groups. It is not recursive, so if you need to split multiple groups within groups, you will need to call this function multiple times. + +Here are the paramters for this method: +* **group**: *string* - the name of the group you want to expand. +* **successCallback**: *function(**result**: MailBoxUser[])* - If successful will return an array of MailBoxUser objects. +* **errorCallback**: *function(**error**: string)* - If an error occurs a string with the resulting error will be returned. For more detail on the exact nature of the issue, you can refer to the debugCallback. +56 +* **debugCallback**: *function(**debug**: string)* - Contains a detailed XML output with the original xml sent, the response from the server in xml, and any status messages or error objects returned. + +##### Example ##### +Here is an example of how to use this method: + +```javascript +Example is TBD. +``` + +### findConversationItems +This method will return all the related itemID's in a specific conversation. If you need to find a specific item you can then use the ID's to make the [getMailItem()](#getMailItem) method. + +Here are the paramaters for this method: +* **conversationId**: *string* - the conversation ID for which you want to retrieve all the related items +* successCallback +* **errorCallback**: *function(**error**: string)* - If an error occurs a string with the resulting error will be returned. For more detail on the exact nature of the issue, you can refer to the debugCallback. +56 +* **debugCallback**: *function(**debug**: string)* - Contains a detailed XML output with the original xml sent, the response from the server in xml, and any status messages or error objects returned. + +##### Example ##### +Here is an example of how to use this method: + +```javascript +Example is TBD. +``` + +### getSpecificHeader +This method will return a specific mail header (x-header) value for a specific mail item. + +Here are the paramters for this method: +* **itemId**: *string* - the mail item you want to access +* **headerName**: *string* - the header property you want to access +* **headerType**: *string* - the header value type you want to acess. Supports: String or Integer +* **successCallback**: function(**result**: string)* - if successfull will return a the value of the header or NULL if it was not found +* **errorCallback**: *function(**error**: string)* - If an error occurs a string with the resulting error will be returned. For more detail on the exact nature of the issue, you can refer to the debugCallback. +56 +* **debugCallback**: *function(**debug**: string)* - Contains a detailed XML output with the original xml sent, the response from the server in xml, and any status messages or error objects returned. + +##### Example ##### +Here is an example of how to use this method: + +```javascript +Example is TBD. +``` + +### getEwsHeaders +This method will get return all the Internet Message Headers (x-headers) for a given mail item. + +Here are the parameters for this method: +* **itemId**: *string* - the ID of mail item you want to retrieve +* **successCallback**: *function(**result**: Dictionary)* - If successful will return a Dictionary with all the Internet Message Headers in key/value pairs which can be iterated using .forEach(). +* **errorCallback**: *function(**error**: string)* - If an error occurs a string with the resulting error will be returned. For more detail on the exact nature of the issue, you can refer to the debugCallback. +56 +* **debugCallback**: *function(**debug**: string)* - Contains a detailed XML output with the original xml sent, the response from the server in xml, and any status messages or error objects returned. + +##### Example ##### +Here is an example of how to use this method: + +```javascript +Example is TBD. +``` + +### updateFolderProperty +This method will update a specific named property on a MAPI folder object in the Exchange message store. + +Here are the paramters for this method: +* **folderId**: *string* - The ID of the folder you want to update +* **propName**: *string* - The property you want to add or update +* **propValue**: *string* - The value of the property you wan to add or update +* **successCallback**: *function(**result**: string)* - Returns "success" if completed successfully. +* **errorCallback**: *function(**error**: string)* - If an error occurs a string with the resulting error will be returned. For more detail on the exact nature of the issue, you can refer to the debugCallback. +56 +* **debugCallback**: *function(**debug**: string)* - Contains a detailed XML output with the original xml sent, the response from the server in xml, and any status messages or error objects returned. + +##### Example ##### +Here is an example of how to use this method: + +```javascript +Example is TBD. +``` + +### getFolderProperty +This method will get the value of a specific named property on an API folder object in the Exchange message store. + +Here are the paramters for this method: +* **folderId**: *string* - The ID of the folder you want to access +* **propName**: *string* - The property you want to return +* **successCallback**: *function(**result**: string)* - Returns the property folder value if completed successfully. +* **errorCallback**: *function(**error**: string)* - If an error occurs a string with the resulting error will be returned. For more detail on the exact nature of the issue, you can refer to the debugCallback. +56 +* **debugCallback**: *function(**debug**: string)* - Contains a detailed XML output with the original xml sent, the response from the server in xml, and any status messages or error objects returned. + +##### Example ##### +Here is an example of how to use this method: + +```javascript +Example is TBD. +``` + +### getFolderId +Gets the folder ID for a specific names MAPI folder in the Excahnge mail store. + +Here are the parameters for this method: +* **folderName**: *string* - The name of the folder you want to get the ID for. +* **successCallback**: *function(**result**: string)* - Returns the folder ID if completed successfully. +* **errorCallback**: *function(**error**: string)* - If an error occurs a string with the resulting error will be returned. For more detail on the exact nature of the issue, you can refer to the debugCallback. +* **debugCallback**: *function(**debug**: string)* - Contains a detailed XML output with the original xml sent, the response from the server in xml, and any status messages or error objects returned. + +##### Example ##### +Here is an example of how to use this method: + +```javascript +Example is TBD. +``` + +### moveItem +Moves an item to the specified MAPI folder in the Exchange store. + +Here are the paramters for this method: +* **itemId**: *string* - The item ID for the message, appointment or meeting that is to be moved. +* **folderID**: *string* The folder name or the folder ID of the MAPI folder where you want to move the item to. +* **successCallback**: *function(**result**: string)* - the success callback. will return 'success' if the process completes successfully. +* **errorCallback**: *function(**error**: string)* - If an error occurs a string with the resulting error will be returned. For more detail on the exact nature of the issue, you can refer to the debugCallback. +* **debugCallback**: *function(**debug**: string)* - Contains a detailed XML output with the original xml sent, the response from the server in xml, and any status messages or error objects returned. + +##### Example ##### +Here is an example of how to use this method: + +```javascript +Example is TBD. +``` \ No newline at end of file diff --git a/node_modules/easyews/_config.yml b/node_modules/easyews/_config.yml new file mode 100644 index 0000000..9da9a02 --- /dev/null +++ b/node_modules/easyews/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-dinky \ No newline at end of file diff --git a/node_modules/easyews/easyEws.js b/node_modules/easyews/easyEws.js new file mode 100644 index 0000000..6e1a2b5 --- /dev/null +++ b/node_modules/easyews/easyEws.js @@ -0,0 +1,964 @@ +/*! + * easyEWS JavaScript Library v1.0.9 + * http://theofficecontext.com + * + * Copyright David E. Craig and other contributors + * Released under the MIT license + * https://tldrlegal.com/license/mit-license + * + * Date: 2018-02-27T12:38EST + */ + /** + * The global easyEws object + * @type {__nonInstanceEasyEwsClass} + * */ +var easyEws = new __nonInstanceEasyEwsClass(); +/** + * @class + */ +function __nonInstanceEasyEwsClass() { +/*********************************************************************************************** + *********************************************************************************************** + *********************************************************************************************** + **** * * **** * ***** *** + * * * * * * * * * * + **** * * **** * * * + * * * * * * * * * + * *** **** ***** ***** *** +*********************************************************************************************** +*********************************************************************************************** +***********************************************************************************************/ + /** + * PUBLIC: creates a new emails message with a single attachment and sends it + * + * @param {string} subject - The subject for the message to be sent + * @param {string} body - The body of the message to be sent + * @param {string} to - The email address of the recipient + * @param {string} attachmentName - Name of the attachment + * @param {string} attachmentMime - MIME content in Base64 for the attachment + * @param {successCallback} successCallback - Callback with 'success' if compelted successfully - function(string) { } + * @param {errorCallback} errorCallback - Error handler callback - function(string) { } + * @param {debugCallback} debugCallback - Debug handler returns raw XML - function(string) { } + */ + this.sendPlainTextEmailWithAttachment = function (subject, body, to, attachmentName, attachmentMime, successCallback, errorCallback, debugCallback) { + /** @type {string} */ + var soap = '' + + ' ' + + ' ' + + ' ' + subject + '' + + ' ' + body + '' + + ' ' + + ' ' + + ' ' + attachmentName + '' + + ' false' + + ' ' + + ' ' + attachmentMime + '' + + ' ' + + ' ' + + ' ' + + ' ' + to + '' + + ' ' + + ' ' + + ''; + + soap = getSoapHeader(soap); + // make the EWS call + asyncEws(soap, function (xmlDoc) { + // Get the required response, and if it's NoError then all has succeeded, so tell the user. + // Otherwise, tell them what the problem was. (E.G. Recipient email addresses might have been + // entered incorrectly --- try it and see for yourself what happens!!) + /** @type {string} */ + var elem = xmlDoc.getElementsByTagName("m:ResponseCode")[0]; + if(elem == null) elem = xmlDoc.getElementsByTagName("ResponseCode")[0]; + var result = elem.textContent; + if (result == "NoError") { + successCallback(result); + } + else { + if (errorCallback != null) + errorCallback(result); + } + }, function (errorDetails) { + if (errorCallback != null) + errorCallback(errorDetails); + }, function (debug) { + if (debugCallback != null) + debugCallback(debug); + }); + }; + /** + * PUBLIC: gets the mail item as raw MIME data + * + * @param {string} mailItemId - The id for the item + * @param {successCallback} successCallback - Callback with email message as MIME Base64 string - function(string) { } + * @param {errorCallback} errorCallback - Error handler callback - function(Error) { } + * @param {debugCallback} debugCallback - Debug handler returns raw XML - function(String) { } + */ + this.getMailItemMimeContent = function (mailItemId, successCallback, errorCallback, debugCallback) { + /** @type {string} */ + var soap = + '' + + ' ' + + ' IdOnly' + + ' true' + + ' ' + + ' ' + + ' ' + + ' ' + + ''; + soap = getSoapHeader(soap); + // make the EWS call + asyncEws(soap, function (xmlDoc) { + /** @type {array} */ + var nodes = getNodes(xmlDoc,"t:MimeContent"); + /** @type {string} */ + var content = nodes[0].textContent; + successCallback(content); + }, function (errorDetails) { + if (errorCallback != null) + errorCallback(errorDetails); + }, function (debug) { + if (debugCallback != null) + debugCallback(debug); + }); + }; + /** + * PUBLIC: Updates the headers in the mail item + * SEE: https://msdn.microsoft.com/en-us/library/office/dn596091(v=exchg.150).aspx + * SEE: https://msdn.microsoft.com/en-us/library/office/dn495610(v=exchg.150).aspx + * + * @param {string} mailItemId - The id of the item to update + * @param {string} headerName - The header item to add/update + * @param {string} headerValue - The header value to update + * @param {boolean} [isMeeting] - is required to be true for meeting requests + * @param {successCallback} [successCallback] - returns 'succeeeded' is successful - function(String) { } + * @param {errorCallback} [errorCallback] - Error handler callback - function(Error) { } + * @param {debugCallback} [debugCallback] - Debug handler returns raw XML - function(String) { } + */ + this.updateEwsHeader = function (mailItemId, headerName, headerValue, isMeeting, + successCallback, errorCallback, debugCallback) { + /** @type {string} */ + var firstLine = ''; + if(isMeeting){ + firstLine = ''; + } + /** @type {string} */ + var soap = + firstLine + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + headerValue + '' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ''; + soap = getSoapHeader(soap); + // make the EWS call + asyncEws(soap, function (xmlDoc) { + if (successCallback) + successCallback("succeeded"); + }, function (errorDetails) { + if (errorCallback != null) + errorCallback(errorDetails); + }, function (debug) { + if (debugCallback != null) + debugCallback(debug); + }); + }; + /** + * PUBLIC: Returns a list of items in the folder + * + * @param {string} folderId - The ID of the folder you want to search + * @param {successCallbackArray} successCallback - Callback with array of item IDs - function(String[]) { } + * @param {errorCallback} errorCallback - Error handler callback - function(Error) { } + * @param {errorCallback} errorCallback - Debug handler returns raw XML - function(String) { } + */ + this.getFolderItemIds = function (folderId, successCallback, errorCallback, debugCallback) { + /** @type {string} */ + var soap = + '' + + ' ' + + ' IdOnly' + + ' ' + + ' ' + + ' ' + + ' ' + + ''; + + /** @type {array} */ + var returnArray = []; + + soap = getSoapHeader(soap); + + // call ews + asyncEws(soap, function (xmlDoc) { + /** @type {array} */ + var nodes = getNodes(xmlDoc, "t:ItemId"); + // loop through and return an array of ids + $.each(nodes, function (index, value) { + returnArray.push(value.getAttribute("Id")); + }); + successCallback(returnArray); + }, function (errorDetails) { + if (errorCallback != null) { + errorCallback(errorDetails); + } + }, function (debug) { + if (debugCallback != null) + debugCallback(debug); + }); + }; + /** + * PUBLIC: Gets the item details for a specific item by ID + * + * @param {string} itemId The ID for the item + * @param {successCallbackMailItem} successCallback - Callback with the details of the MailItem - function(MailItem) { } + * @param {errorCallback} errorCallback - Error handler callback - function(Error) { } + * @param {debugCallback} debugCallback - Debug handler returns raw XML - function(String) { } + */ + this.getMailItem = function (itemId, successCallback, errorCallback, debugCallback) { + /** @type {string} */ + var soap = + '' + + ' ' + + ' Default' + + ' true' + + ' ' + + ' ' + + ' ' + + ' ' + + ''; + soap = getSoapHeader(soap); + // make call to EWS + asyncEws(soap, function (xmlDoc) { + /** @type {MailItem} */ + var item = new MailItem(xmlDoc); + successCallback(item); + }, function (errorDetails) { + if(errorCallback != null) { + errorCallback(errorDetails); + } + }, function (debug) { + if (debugCallback != null) + debugCallback(debug); + }); + }; + /** + * PUBLIC: Expands a group and returns all the members + * NOTE: Does not enumerate groups in groups + * + * @param {string} group The alias for the group to be expanded + * @param {successCallbackMailboxUserArray} successCallback - Callback with array of MailBoxUsers - function(MailBoxUser[]) { } + * @param {errorCallback} errorCallback - Error handler callback - function(Error) { } + * @param {errorCallback} errorCallback - Debug handler returns raw XML - function(String) { } + */ + this.expandGroup = function (group, successCallback, errorCallback, debugCallback) { + /** @type {string} */ + var soap = + '' + + ' ' + + ' ' + group + '' + + ' ' + + ''; + soap = getSoapHeader(soap); + // make the EWS call + /** @type {array} */ + var returnArray = []; + asyncEws(soap, function (xmlDoc) { + /** @type {array} */ + var extendedProps = getNodes(xmlDoc, "t:Mailbox"); + // loop through and return an array of properties + $.each(extendedProps, function (index, value) { + returnArray.push(new MailboxUser(value)); + }); + successCallback(returnArray); + }, function (errorDetails) { + if (errorCallback != null) + errorCallback(errorDetails); + }, function (debug) { + if (debugCallback != null) + debugCallback(debug); + }); + }; + /** + * PUBLIC: Find a given conversation by the ID + * NOTE: Search for parent: + * http://stackoverflow.com/questions/19008696/exchange-find-items-in-ews-conversation-using-xml-request + * http://www.outlookcode.com/codedetail.aspx?id=1714 + * https://msdn.microsoft.com/en-us/library/office/dn610351(v=exchg.150).aspx + * + * @param {string} converstionId - The conversation to find + * @param {successCallbackArray} successCallback - Callback with array of item IDs - function(String[]) { } + * @param {errorCallback} errorCallback - Error handler callback - function(Error) { } + * @param {errorCallback} errorCallback - Debug handler returns raw XML - function(String) { } + */ + this.findConversationItems = function (conversationId, successCallback, errorCallback, debugCallback) { + /** @type {string} */ + var soap = + ' ' + + ' ' + + ' IdOnly' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' TreeOrderDescending' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' '; + soap = getSoapHeader(soap); + // Make EWS call + asyncEws(soap, function (xmlDoc) { + /** @type {array} */ + var returnArray = []; + try { + /** @type {array} */ + var nodes = getNodes(xmlDoc, "t:ItemId"); + if (nodes == null) { + if (errorCallback != null) { + errorCallback(new Error("The XML returned from the server could not be parsed.")); + } + } else if (nodes.length == 0) { + successCallback(null); + } else { + // loop through and return an array of ids + $.each(nodes, function (index, value) { + returnArray.push(value.getAttribute("Id")); + }); + successCallback(returnArray); + } + } catch (error) { + if (errorCallback != null) + errorCallback(error); + } + }, function (errorDetails) { + if (errorCallback != null) + errorCallback(errorDetails); + }, function (debug) { + if (debugCallback != null) + debugCallback(debug); + }); + }; + /** + * PUBLIC: Gets a specific Internet header for a spific item + * NOTE: https://msdn.microsoft.com/en-us/library/office/aa566013(v=exchg.150).aspx + * + * @param {string} itemId - The item ID to get + * @param {string} headerName - The header to get + * @param {string} headerType - The header type (String, Integer) + * @param {successCallback} successCallback - Returns the value for the header - function(string) { } + * @param {errorCallback} errorCallback - Error handler callback - function(Error) { } + * @param {errorCallback} errorCallback - Debug handler returns raw XML - function(String) { } + */ + this.getSpecificHeader = function (itemId, headerName, headerType, successCallback, errorCallback, debugCallback) { + /** @type {string} */ + var soap = + ' ' + + ' ' + + ' IdOnly' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' '; + + soap = getSoapHeader(soap); + // Make the EWS call + /** @type {string} */ + var returnValue = ""; + asyncEws(soap, function (xmlDoc) { + try { + if (xmlDoc == null) { + successCallback(null); + return; + } + /** @type {array} */ + var nodes = getNodes(xmlDoc, "t:ExtendedProperty"); + $.each(nodes, function (index, value) { + /** @type {string} */ + var nodeName = getNodes(value, "t:ExtendedFieldURI")[0].getAttribute("PropertyName"); + /** @type {string} */ + var nodeValue = getNodes(value, "t:Value")[0].textContent; + if (nodeName == headerName) { + returnValue = nodeValue; + } + }); + successCallback(returnValue); + } catch (error) { + if (errorCallback != null) + errorCallback(error); + } + }, function (errorDetails) { + if (errorCallback != null) + errorCallback(errorDetails); + }, function (debug) { + if (debugCallback != null) + debugCallback(debug); + }); + }; + /** + * PUBLIC: Gets Internet headers for a spific item + * NOTE: https://msdn.microsoft.com/en-us/library/office/aa566013(v=exchg.150).aspx + * + * @param {string} itemId - The item ID to get + * @param {successCallbackDictionary} successCallback - Callback with a Dictionary(key,value) containing the message headers - function(Dictionary) { } + * @param {errorCallback} errorCallback - Error handler callback - function(Error) { } + * @param {errorCallback} errorCallback - Debug handler returns raw XML - function(String) { } + */ + this.getEwsHeaders = function (itemId, successCallback, errorCallback, debugCallback) { + /** @type {string} */ + var soap = + ' ' + + ' ' + + ' AllProperties' + + ' true' + + ' ' + + ' ' + + ' ' + + ' ' + + ' '; + soap = getSoapHeader(soap); + // Make the EWS call + /** @type {Dictionary} */ + var returnArray = new Dictionary(); + asyncEws(soap, function (xmlDoc) { + try { + if (xmlDoc == null) { + successCallback(null); + return; + } + /** @type {array} */ + var nodes = getNodes(xmlDoc, "t:InternetMessageHeader"); + $.each(nodes, function (index, value) { + returnArray.add(value.getAttribute("HeaderName"), value.textContent); + }); + successCallback(returnArray); + } catch (error) { + if (errorCallback != null) + errorCallback(error); + } + }, function (errorDetails) { + if (errorCallback != null) + errorCallback(errorDetails); + }, function (debug) { + if (debugCallback != null) + debugCallback(debug); + }); + }; + /** + * PUBLIC: Updates a folder property. If the property does not exist, it will be created. + * + * @param {string} folderId - The ID for the folder + * @param {string} propName - The property on the folder to set + * @param {string} propValue - The value for the propert + * @param {successCallback} successCallback - returns 'succeeeded' is successful - function(String) { } + * @param {errorCallback} errorCallback - Error handler callback - function(Error) { } + * @param {debugCallback} debugCallback - Debug handler returns raw XML - function(String) { } + */ + this.updateFolderProperty = function (folderId, propName, propValue, successCallback, errorCallback, debugCallback) { + /** @type {string} */ + var soap = + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + propValue + '' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' '; + + soap = getSoapHeader(soap); + // make the EWS call + asyncEws(soap, function(data) { + if(successCallback != null) + successCallback('succeeeded'); + }, function (error) { + if (errorCallback != null) + errorCallback(error); + }, function (debug) { + if (debugCallback != null) + debugCallback(debug); + }); + }; + /** + * PUBLIC: Gets a folder property + * + * @param {string} folderId - The ID for the folder + * @param {string} propName - The property to get + * @param {successCallback} successCallback - returns the folder property value if successful - function(String) { } + * @param {errorCallback} errorCallback - Error handler callback - function(Error) { } + * @param {debugCallback} debugCallback - Debug handler returns raw XML - function(String) { } + */ + this.getFolderProperty = function (folderId, propName, successCallback, errorCallback, debugCallback) { + /** @type {string} */ + var soap = + '' + + '' + + 'IdOnly' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + ''; + soap = getSoapHeader(soap); + // make the EWS call + asyncEws(soap, function (xmlDoc) { + /** @type {array} */ + var nodes = getNodes(xmlDoc, "t:Value"); + // return the content of the node + if (nodes.length > 0) { + successCallback(nodes[0].textContent); + } else { + successCallback(null); // no property found + } + }, function (error) { + if (errorCallback != null) + errorCallback(error); + }, function (debug) { + if (debugCallback != null) + debugCallback(debug); + }); + }; + /** + * PUBLIC: Gets the folder id by the given name from the store + * + * @param {string} folderName - Name of the folder to get the ID for + * @param {successCallback} successCallback - returns the folder ID if successful - function(String) { } + * @param {errorCallback} errorCallback - Error handler callback - function(Error) { } + * @param {debugCallback} debugCallback - Debug handler returns raw XML - function(String) { } + */ + this.getFolderId = function (folderName, successCallback, errorCallback, debugCallback) { + /** @type {string} */ + var soap = + ' ' + + ' ' + + ' IdOnly' + + ' ' + + ' ' + + ' ' + + ' ' + + ' '; + soap = getSoapHeader(soap); + // make EWS callback + asyncEws(soap, function (xmlDoc) { + /** @type {array} */ + var nodes = getNodes(xmlDoc, "t:FolderId"); + if (nodes.length > 0) { + /** @type {string} */ + var id = nodes[0].getAttribute("Id"); + successCallback(id); + } else { + errorCallback("Unable to get folder ID"); + } + }, function (errorDetails) { + if (errorCallback != null) + errorCallback(errorDetails); + }, function (debug) { + if (debugCallback != null) + debugCallback(debug); + }); + }; + /** + * PUBLIC: Moves an item to the specified folder + * + * @param {string} itemId - the item to be moved + * @param {string} folderId - Name or ID of the folder where the item will be moved + * @param {successCallback} successCallback - returns the folder ID if successful - function(String) { } + * @param {errorCallback} errorCallback - Error handler callback - function(Error) { } + * @param {debugCallback} debugCallback - Debug handler returns raw XML - function(String) { } + */ + this.moveItem = function(itemId, folderId, successCallback, errorCallback, debugCallback) { + /** @type {string} */ + var soap = '' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + ''; + soap = getSoapHeader(soap); + // make EWS callback + asyncEws(soap, function (data) { + if(successCallback != null) + successCallback('succeeeded'); + }, function (errorDetails) { + if (errorCallback != null) + errorCallback(errorDetails); + }, function (debug) { + if (debugCallback != null) + debugCallback(debug); + }); + }; +/*********************************************************************************************** + *********************************************************************************************** + *********************************************************************************************** + **** **** ***** * * *** ***** ***** *** + * * * * * * * * * * * * * + **** **** * * * ***** * *** * + * * * * * * * * * * * * + * * * ***** * * * * ***** *** +*********************************************************************************************** +*********************************************************************************************** +***********************************************************************************************/ + /** + * PRIVATE: creates a SOAP EWS wrapper + * + * @param {string} request The XML body of the soap message + */ + function getSoapHeader(request) { + /** @type {string} */ + var result = + '' + + '' + + ' ' + + ' ' + + ' ' + + ' ' + request + '' + + ''; + return result; + }; + + /** + * PRIVATE: Makes an EWS callback with promise + * + * @param {string} soap - XML Soap message + * @param {function({DOMDocument})} successCallback - Success callback - function(DOMDocument) { } + * @param {function({Object})} errorCallback - Error handler callback - function(Error) { } + * @param {function({string})} debugCallback - Debug callback - function(String) { } + */ + function asyncEws(soap, successCallback, errorCallback, debugCallback) { + Office.context.mailbox.makeEwsRequestAsync(soap, function (ewsResult) { + if (ewsResult.status == "succeeded") { + /** @type {XMLDocument} */ + var xmlDoc = $.parseXML(ewsResult.value); + successCallback(xmlDoc); + + // provide a detailed debug with the initial soap, fully formed + // and the response from the server + debugCallback("STATUS: " + ewsResult.status + "\n" + + "---- START SOAP ----\n" + soap + "\n---- END SOAP ----\n" + + "---- START RESPONSE ----\n" + ewsResult.value + "---- END RESPONSE ----"); // return raw result + } else { + if (errorCallback != null) { + errorCallback("makeEwsRequestAsync failed. " + ewsResult.error); + debugCallback("STATUS: " + ewsResult.status + "\n" + + "ERROR: " + ewsResult.error + "\n" + + "---- START SOAP ----\n" + soap + "\n---- END SOAP ----\n" + + "---- START RESPONSE ----\n" + ewsResult.value + "---- END RESPONSE ----"); // return raw result + } + } + }); + }; + /** + * PRIVATE: This function returns an element node list based on the name + * provided (using the Namespace, such as t:Item). It will look + * for t:Item and return all nodes, but it not, it will seach + * without the namespace "Item" + *NOTE: This is done because there is a difference in calling EWS functions + * from the browser in OWA and the full client Outlook + * @param {XMLNode} node - The parent node + * @param {string} elementNameWithNS - The element tagname to get with namespace + * @return {XMLNode} - The node found + */ + function getNodes(node, elementNameWithNS) { + /** @type {string} */ + var elementWithoutNS = elementNameWithNS.substring(elementNameWithNS.indexOf(":") + 1); + /** @type {array} */ + var retVal = node.getElementsByTagName(elementNameWithNS); + if (retVal == null || retVal.length == 0) { + retVal = node.getElementsByTagName(elementWithoutNS); + } + return retVal; + }; +}; + +/*********************************************************************************************** + *********************************************************************************************** + *********************************************************************************************** + * * ***** * **** ***** **** *** + * * * * * * * * * * * + ***** *** * **** *** **** * + * * * * * * * * * * + * * ***** ***** * ***** * * *** +*********************************************************************************************** +*********************************************************************************************** +***********************************************************************************************/ +/* HELPER FUNCTIONS AND CLASSES */ +/** + * @typedef {Object} MailItem + * @property {string} MimeContent Returns the MimeContent of the message + * @property {string} CharacterSet Returns the mime content character set + * @property {string} Subject Returns the subject of the message + * @param {XMLDocument} value Sets the value of a new MailItem + */ +function MailItem(value) { + /// + /// Mail Item wrapper + /// + /// XML from an EWS Request + this.value = value || {}; + + /** + * Returns the MimeContent of the message + * @returns {string} Base64 string + */ + this.MimeContent = function () { + return this.value.getElementsByTagName("t:MimeContent")[0].textContent; + }; + + /** + * Returns the mime content character set + * @returns {string} Character set value + */ + this.CharacterSet = function () { + return this.value.getElementsByTagName("t:MimeContent")[0].getAttribute("CharacterSet"); + }; + + /** + * Returns the subject of the message + * @returns {string} Subject line + */ + this.Subject = function () { + return this.value.getElementsByTagName("t:Subject")[0].textContent; + }; + + /** Returns the body of the message + * @returns {string} Body text + */ + this.Body = function () { + return this.value.getElementsByTagName("t:Body")[0].textContent; + } +} + +/** + * Mailbox user wrapper + * + * username + * user@there.com + * SMTP + * Mailbox / PublicDL + * + * @typedef {Object} MailboxUser + * @property {string} Name Returns the name of the item + * @property {string} Address Returns the email address of the item + * @property {string} RoutingType Returns the type of address of the item + * @property {string} MailboxType Returns is the item is a mailbox user or a PublicDL + * @param {XMLDocument} value XML string from EWS request + */ +function MailboxUser(value) { + this.value = value || {}; + /** + * Returns the name of the item + * @returns {string} The user name + */ + this.Name = function () { + return this.value.getElementsByTagName("t:Name")[0].textContent; + }; + /** + * Returns the email address of the item + * @returns {string} email + */ + this.Address = function () { + return this.value.getElementsByTagName("t:EmailAddress")[0].textContent; + }; + /** + * Returns the type of address of the item + * @returns {string} type + */ + this.RoutingType = function () { + return this.value.getElementsByTagName("t:RoutingType")[0].textContent; + }; + /** + * Returns is the item is a mailbox user or a PublicDL + * @returns {string} Mailbox or PublicDL + */ + this.MailboxType = function () { + return this.value.getElementsByTagName("t:MailboxType")[0].textContent; + }; +} + +/** + * Dictionary Object Class + * Helps to work with items in a dictionary with key value pairs + * + * @typedef {Object} Dictionary + * @property {function(Object, function())} forEach Loops through each item in the Dictionary + * @property {function(string)} lookup Returns the value for the specified key + * @property {function(string, Object)} add Adds a new item to the Dictionary collection + * @property {boolean} containsKey True if key exists in collection + * @property {Number} length Returns the length of the array, or number of items + * @param {Object[]} values Array of values + */ +function Dictionary(values) { + this.values = values || {}; + + /** + * INTERNAL: Loops through each item in the Dictionary + * @param {Object} object + * @param {function(Object, Object)} action + */ + var forEachIn = function (object, action) { + for (var property in object) { + if (Object.prototype.hasOwnProperty.call(object, property)) + action(property, object[property]); + } + }; + + /** + * Returns true if it contains the specified key + * @param {string} key + */ + this.containsKey = function (key) { + return Object.prototype.hasOwnProperty.call(this.values, key) && + Object.prototype.propertyIsEnumerable.call(this.values, key); + }; + + /** + * For each function for the Dictionary + * @param {function(Object,Object)} + */ + this.forEach = function (action) { + forEachIn(this.values, action); + }; + + /** + * Returns the value for the specified key + * @param {Object} key The value found + */ + this.lookup = function (key) { + return this.values[key]; + }; + + /** + * Adds a new item to the Dictionary collection + * @param {string} key The key name + * @param {Object} value The value + */ + this.add = function (key, value) { + this.values[key] = value; + }; + + /** + * Returns the length of the array, or number of items + * @returns {Number} The number of items in the array + */ + this.length = function () { + /** @type {number} */ + var len = 0; + forEachIn(this.values, function () { len++ }); + return len; + }; +}; +/*********************************************************************************************** + *********************************************************************************************** + *********************************************************************************************** + ***** *** **** *** *** ***** * * ***** **** *** *** + * * * * * * * * * * * * * * * * * * * + * * * * * * * *** * * **** ***** * + * * * * * * * * * * * * * * * * * * * * + ** *** **** *** *** ***** * * * * * * * *** +*********************************************************************************************** +*********************************************************************************************** +***********************************************************************************************/ +/** + * This is the sucess callback + * @callback successCallback + * @param {string} result + * @returns {void} + */ +var successCallback = function(result) { }; +/** + * This is the sucess callback + * @callback successCallback + * @param {MailItem} result + * @returns {void} + */ +var successCallbackMailItem = function(result) { }; +/** + * This is the sucess callback + * @callback successCallbackArray + * @param {string[]} result + * @returns {void} + */ +var successCallbackArray = function(result) { }; +/** + * This is the success callback + * @callback successCallbackMailBoxUserArray + * @param {MailboxUser[]} result + * @returns {void} + */ +var successCallbackMailboxUserArray = function(result) { }; +/** + * This is the sucess callback + * @callback successCallbackDictionary + * @param {Dictionary} result + * @returns {void} + */ +var successCallbackDictionary = function(result) { }; +/** + * This is the error callback + * @callback errorCallback + * @param {string} error + * @returns {void} + */ +var errorCallback = function(error) { }; +/** + * This is the debug callback + * @callback debugCallback + * @param {string} debug + * @returns {void} + */ +var debugCallback = function(debug) { }; \ No newline at end of file diff --git a/node_modules/easyews/package.json b/node_modules/easyews/package.json new file mode 100644 index 0000000..bd00c2b --- /dev/null +++ b/node_modules/easyews/package.json @@ -0,0 +1,91 @@ +{ + "_args": [ + [ + { + "raw": "easyews", + "scope": null, + "escapedName": "easyews", + "name": "easyews", + "rawSpec": "", + "spec": "latest", + "type": "tag" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample" + ] + ], + "_from": "easyews@latest", + "_id": "easyews@1.0.9", + "_inCache": true, + "_location": "/easyews", + "_nodeVersion": "6.10.3", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/easyews_1.0.9_1519756948896_0.3001567434206944" + }, + "_npmUser": { + "name": "davecra", + "email": "decyahoo-gravatar@yahoo.com" + }, + "_npmVersion": "3.10.10", + "_phantomChildren": {}, + "_requested": { + "raw": "easyews", + "scope": null, + "escapedName": "easyews", + "name": "easyews", + "rawSpec": "", + "spec": "latest", + "type": "tag" + }, + "_requiredBy": [ + "#USER" + ], + "_resolved": "https://registry.npmjs.org/easyews/-/easyews-1.0.9.tgz", + "_shasum": "d906d5ade66075ee9fa6850d0e1f1debaea8fd79", + "_shrinkwrap": null, + "_spec": "easyews", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample", + "author": { + "name": "David E. Craig" + }, + "bugs": { + "url": "https://github.com/davecra/easyEws/issues" + }, + "dependencies": {}, + "description": "This library makes performing EWS operations from Outlook Mail Web Add-ins via JavaScript much easier.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "d906d5ade66075ee9fa6850d0e1f1debaea8fd79", + "tarball": "https://registry.npmjs.org/easyews/-/easyews-1.0.9.tgz", + "fileCount": 5, + "unpackedSize": 98480 + }, + "gitHead": "11a6bc112ddc7c632433f54256cb2e32df388787", + "homepage": "https://github.com/davecra/easyEws#readme", + "keywords": [ + "EWS", + "outlook", + "officejs", + "makeEwsRequestAsync" + ], + "license": "GNU", + "main": "easyEws.js", + "maintainers": [ + { + "name": "davecra", + "email": "decyahoo-gravatar@yahoo.com" + } + ], + "name": "easyews", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/davecra/easyEws.git" + }, + "scripts": { + "test": "easyEws" + }, + "version": "1.0.9" +} diff --git a/node_modules/eslint-scope/CHANGELOG.md b/node_modules/eslint-scope/CHANGELOG.md new file mode 100644 index 0000000..f83857c --- /dev/null +++ b/node_modules/eslint-scope/CHANGELOG.md @@ -0,0 +1,25 @@ +v3.7.1 - April 12, 2017 + +* ced6262 Fix: restore previous Scope API exports from escope (#31) (Vitor Balocco) +* 5c3d966 Fix: Remove and Modify tests that contain invalid ES6 syntax (#29) (Reyad Attiyat) + +v3.7.0 - March 17, 2017 + +* 9e27835 Chore: Add files section to package.json (#24) (Ilya Volodin) +* 3e4d123 Upgrade: eslint-config-eslint to 4.0.0 (#21) (Teddy Katz) +* 38c50fb Chore: Rename src to lib and test to tests (#20) (Corbin Uselton) +* f4cd920 Chore: Remove esprima (#19) (Corbin Uselton) +* f81fad5 Revert "Chore: Remove esprima" (#18) (James Henry) +* 31b0085 Chore: Remove es6-map and es6-weakmap as they are included in node4 (#10) (#13) (Corbin Uselton) +* 12a1ca1 Add Makefile.js and eslint (#15) (Reyad Attiyat) +* 7d23f8e Chore: Remove es6-map and es6-weakmap as they are included in node4 (#10) (Corbin Uselton) +* 019441e Chore: Convert to ES6 that is supported on Node 4, commonjs modules and remove Babel (#14) (Corbin Uselton) +* c647f65 Update: Add check for node.body in referencer (#2) (Corbin Uselton) +* eb5c9db Remove browserify and jsdoc (#12) (Corbin Uselton) +* cf38df0 Chore: Update README.md (#3) (James Henry) +* 8a142ca Chore: Add eslint-release scripts (#6) (James Henry) +* e60d8cb Chore: Remove unused bower.json (#5) (James Henry) +* 049c545 Chore: Fix tests for eslint-scope (#4) (James Henry) +* f026aab Chore: Update package.json for eslint fork (#1) (James Henry) +* a94d281 Chore: Update license with JSF copyright (Nicholas C. Zakas) + diff --git a/node_modules/eslint-scope/LICENSE b/node_modules/eslint-scope/LICENSE new file mode 100644 index 0000000..4419797 --- /dev/null +++ b/node_modules/eslint-scope/LICENSE @@ -0,0 +1,23 @@ +eslint-scope +Copyright JS Foundation and other contributors, https://js.foundation +Copyright (C) 2012-2013 Yusuke Suzuki (twitter: @Constellation) and other contributors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/eslint-scope/README.md b/node_modules/eslint-scope/README.md new file mode 100644 index 0000000..7e7ce0d --- /dev/null +++ b/node_modules/eslint-scope/README.md @@ -0,0 +1,54 @@ +# ESLint Scope + +ESLint Scope is the [ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm) scope analyzer used in ESLint. It is a fork of [escope](http://github.com/estools/escope). + +## Usage + +Install: + +``` +npm i eslint-scope --save +``` + +Example: + +```js +var eslintScope = require('eslint-scope'); +var espree = require('espree'); +var estraverse = require('estraverse'); + +var ast = espree.parse(code); +var scopeManager = eslintScope.analyze(ast); + +var currentScope = scopeManager.acquire(ast); // global scope + +estraverse.traverse(ast, { + enter: function(node, parent) { + // do stuff + + if (/Function/.test(node.type)) { + currentScope = scopeManager.acquire(node); // get current function scope + } + }, + leave: function(node, parent) { + if (/Function/.test(node.type)) { + currentScope = currentScope.upper; // set to parent scope + } + + // do stuff + } +}); +``` + +## Contributing + +Issues and pull requests will be triaged and responded to as quickly as possible. We operate under the [ESLint Contributor Guidelines](http://eslint.org/docs/developer-guide/contributing), so please be sure to read them before contributing. If you're not sure where to dig in, check out the [issues](https://github.com/eslint/eslint-scope/issues). + +## Build Commands + +* `npm test` - run all linting and tests +* `npm run lint` - run all linting + +## License + +ESLint Scope is licensed under a permissive BSD 2-clause license. diff --git a/node_modules/eslint-scope/lib/definition.js b/node_modules/eslint-scope/lib/definition.js new file mode 100644 index 0000000..172bfe2 --- /dev/null +++ b/node_modules/eslint-scope/lib/definition.js @@ -0,0 +1,86 @@ +/* + Copyright (C) 2015 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +"use strict"; + +const Variable = require("./variable"); + +/** + * @class Definition + */ +class Definition { + constructor(type, name, node, parent, index, kind) { + + /** + * @member {String} Definition#type - type of the occurrence (e.g. "Parameter", "Variable", ...). + */ + this.type = type; + + /** + * @member {espree.Identifier} Definition#name - the identifier AST node of the occurrence. + */ + this.name = name; + + /** + * @member {espree.Node} Definition#node - the enclosing node of the identifier. + */ + this.node = node; + + /** + * @member {espree.Node?} Definition#parent - the enclosing statement node of the identifier. + */ + this.parent = parent; + + /** + * @member {Number?} Definition#index - the index in the declaration statement. + */ + this.index = index; + + /** + * @member {String?} Definition#kind - the kind of the declaration statement. + */ + this.kind = kind; + } +} + +/** + * @class ParameterDefinition + */ +class ParameterDefinition extends Definition { + constructor(name, node, index, rest) { + super(Variable.Parameter, name, node, null, index, null); + + /** + * Whether the parameter definition is a part of a rest parameter. + * @member {boolean} ParameterDefinition#rest + */ + this.rest = rest; + } +} + +module.exports = { + ParameterDefinition, + Definition +}; + +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/node_modules/eslint-scope/lib/index.js b/node_modules/eslint-scope/lib/index.js new file mode 100644 index 0000000..f48252f --- /dev/null +++ b/node_modules/eslint-scope/lib/index.js @@ -0,0 +1,165 @@ +/* + Copyright (C) 2012-2014 Yusuke Suzuki + Copyright (C) 2013 Alex Seville + Copyright (C) 2014 Thiago de Arruda + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/** + * Escope (escope) is an ECMAScript + * scope analyzer extracted from the esmangle project. + *

+ * escope finds lexical scopes in a source program, i.e. areas of that + * program where different occurrences of the same identifier refer to the same + * variable. With each scope the contained variables are collected, and each + * identifier reference in code is linked to its corresponding variable (if + * possible). + *

+ * escope works on a syntax tree of the parsed source code which has + * to adhere to the + * Mozilla Parser API. E.g. espree is a parser + * that produces such syntax trees. + *

+ * The main interface is the {@link analyze} function. + * @module escope + */ +"use strict"; + +/* eslint no-underscore-dangle: ["error", { "allow": ["__currentScope"] }] */ + +const assert = require("assert"); + +const ScopeManager = require("./scope-manager"); +const Referencer = require("./referencer"); +const Reference = require("./reference"); +const Variable = require("./variable"); +const Scope = require("./scope").Scope; +const version = require("../package.json").version; + +/** + * Set the default options + * @returns {Object} options + */ +function defaultOptions() { + return { + optimistic: false, + directive: false, + nodejsScope: false, + impliedStrict: false, + sourceType: "script", // one of ['script', 'module'] + ecmaVersion: 5, + childVisitorKeys: null, + fallback: "iteration" + }; +} + +/** + * Preform deep update on option object + * @param {Object} target - Options + * @param {Object} override - Updates + * @returns {Object} Updated options + */ +function updateDeeply(target, override) { + + /** + * Is hash object + * @param {Object} value - Test value + * @returns {boolean} Result + */ + function isHashObject(value) { + return typeof value === "object" && value instanceof Object && !(value instanceof Array) && !(value instanceof RegExp); + } + + for (const key in override) { + if (override.hasOwnProperty(key)) { + const val = override[key]; + + if (isHashObject(val)) { + if (isHashObject(target[key])) { + updateDeeply(target[key], val); + } else { + target[key] = updateDeeply({}, val); + } + } else { + target[key] = val; + } + } + } + return target; +} + +/** + * Main interface function. Takes an Espree syntax tree and returns the + * analyzed scopes. + * @function analyze + * @param {espree.Tree} tree - Abstract Syntax Tree + * @param {Object} providedOptions - Options that tailor the scope analysis + * @param {boolean} [providedOptions.optimistic=false] - the optimistic flag + * @param {boolean} [providedOptions.directive=false]- the directive flag + * @param {boolean} [providedOptions.ignoreEval=false]- whether to check 'eval()' calls + * @param {boolean} [providedOptions.nodejsScope=false]- whether the whole + * script is executed under node.js environment. When enabled, escope adds + * a function scope immediately following the global scope. + * @param {boolean} [providedOptions.impliedStrict=false]- implied strict mode + * (if ecmaVersion >= 5). + * @param {string} [providedOptions.sourceType='script']- the source type of the script. one of 'script' and 'module' + * @param {number} [providedOptions.ecmaVersion=5]- which ECMAScript version is considered + * @param {Object} [providedOptions.childVisitorKeys=null] - Additional known visitor keys. See [esrecurse](https://github.com/estools/esrecurse)'s the `childVisitorKeys` option. + * @param {string} [providedOptions.fallback='iteration'] - A kind of the fallback in order to encounter with unknown node. See [esrecurse](https://github.com/estools/esrecurse)'s the `fallback` option. + * @returns {ScopeManager} ScopeManager + */ +function analyze(tree, providedOptions) { + const options = updateDeeply(defaultOptions(), providedOptions); + const scopeManager = new ScopeManager(options); + const referencer = new Referencer(options, scopeManager); + + referencer.visit(tree); + + assert(scopeManager.__currentScope === null, "currentScope should be null."); + + return scopeManager; +} + +module.exports = { + + /** @name module:escope.version */ + version, + + /** @name module:escope.Reference */ + Reference, + + /** @name module:escope.Variable */ + Variable, + + /** @name module:escope.Scope */ + Scope, + + /** @name module:escope.ScopeManager */ + ScopeManager, + analyze +}; + + +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/node_modules/eslint-scope/lib/pattern-visitor.js b/node_modules/eslint-scope/lib/pattern-visitor.js new file mode 100644 index 0000000..afa6291 --- /dev/null +++ b/node_modules/eslint-scope/lib/pattern-visitor.js @@ -0,0 +1,152 @@ +/* + Copyright (C) 2015 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +"use strict"; + +/* eslint-disable no-undefined */ + +const Syntax = require("estraverse").Syntax; +const esrecurse = require("esrecurse"); + +/** + * Get last array element + * @param {array} xs - array + * @returns {any} Last elment + */ +function getLast(xs) { + return xs[xs.length - 1] || null; +} + +class PatternVisitor extends esrecurse.Visitor { + static isPattern(node) { + const nodeType = node.type; + + return ( + nodeType === Syntax.Identifier || + nodeType === Syntax.ObjectPattern || + nodeType === Syntax.ArrayPattern || + nodeType === Syntax.SpreadElement || + nodeType === Syntax.RestElement || + nodeType === Syntax.AssignmentPattern + ); + } + + constructor(options, rootPattern, callback) { + super(null, options); + this.rootPattern = rootPattern; + this.callback = callback; + this.assignments = []; + this.rightHandNodes = []; + this.restElements = []; + } + + Identifier(pattern) { + const lastRestElement = getLast(this.restElements); + + this.callback(pattern, { + topLevel: pattern === this.rootPattern, + rest: lastRestElement !== null && lastRestElement !== undefined && lastRestElement.argument === pattern, + assignments: this.assignments + }); + } + + Property(property) { + + // Computed property's key is a right hand node. + if (property.computed) { + this.rightHandNodes.push(property.key); + } + + // If it's shorthand, its key is same as its value. + // If it's shorthand and has its default value, its key is same as its value.left (the value is AssignmentPattern). + // If it's not shorthand, the name of new variable is its value's. + this.visit(property.value); + } + + ArrayPattern(pattern) { + for (let i = 0, iz = pattern.elements.length; i < iz; ++i) { + const element = pattern.elements[i]; + + this.visit(element); + } + } + + AssignmentPattern(pattern) { + this.assignments.push(pattern); + this.visit(pattern.left); + this.rightHandNodes.push(pattern.right); + this.assignments.pop(); + } + + RestElement(pattern) { + this.restElements.push(pattern); + this.visit(pattern.argument); + this.restElements.pop(); + } + + MemberExpression(node) { + + // Computed property's key is a right hand node. + if (node.computed) { + this.rightHandNodes.push(node.property); + } + + // the object is only read, write to its property. + this.rightHandNodes.push(node.object); + } + + // + // ForInStatement.left and AssignmentExpression.left are LeftHandSideExpression. + // By spec, LeftHandSideExpression is Pattern or MemberExpression. + // (see also: https://github.com/estree/estree/pull/20#issuecomment-74584758) + // But espree 2.0 parses to ArrayExpression, ObjectExpression, etc... + // + + SpreadElement(node) { + this.visit(node.argument); + } + + ArrayExpression(node) { + node.elements.forEach(this.visit, this); + } + + AssignmentExpression(node) { + this.assignments.push(node); + this.visit(node.left); + this.rightHandNodes.push(node.right); + this.assignments.pop(); + } + + CallExpression(node) { + + // arguments are right hand nodes. + node.arguments.forEach(a => { + this.rightHandNodes.push(a); + }); + this.visit(node.callee); + } +} + +module.exports = PatternVisitor; + +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/node_modules/eslint-scope/lib/reference.js b/node_modules/eslint-scope/lib/reference.js new file mode 100644 index 0000000..9529827 --- /dev/null +++ b/node_modules/eslint-scope/lib/reference.js @@ -0,0 +1,167 @@ +/* + Copyright (C) 2015 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +"use strict"; + +const READ = 0x1; +const WRITE = 0x2; +const RW = READ | WRITE; + +/** + * A Reference represents a single occurrence of an identifier in code. + * @class Reference + */ +class Reference { + constructor(ident, scope, flag, writeExpr, maybeImplicitGlobal, partial, init) { + + /** + * Identifier syntax node. + * @member {espreeIdentifier} Reference#identifier + */ + this.identifier = ident; + + /** + * Reference to the enclosing Scope. + * @member {Scope} Reference#from + */ + this.from = scope; + + /** + * Whether the reference comes from a dynamic scope (such as 'eval', + * 'with', etc.), and may be trapped by dynamic scopes. + * @member {boolean} Reference#tainted + */ + this.tainted = false; + + /** + * The variable this reference is resolved with. + * @member {Variable} Reference#resolved + */ + this.resolved = null; + + /** + * The read-write mode of the reference. (Value is one of {@link + * Reference.READ}, {@link Reference.RW}, {@link Reference.WRITE}). + * @member {number} Reference#flag + * @private + */ + this.flag = flag; + if (this.isWrite()) { + + /** + * If reference is writeable, this is the tree being written to it. + * @member {espreeNode} Reference#writeExpr + */ + this.writeExpr = writeExpr; + + /** + * Whether the Reference might refer to a partial value of writeExpr. + * @member {boolean} Reference#partial + */ + this.partial = partial; + + /** + * Whether the Reference is to write of initialization. + * @member {boolean} Reference#init + */ + this.init = init; + } + this.__maybeImplicitGlobal = maybeImplicitGlobal; + } + + /** + * Whether the reference is static. + * @method Reference#isStatic + * @returns {boolean} static + */ + isStatic() { + return !this.tainted && this.resolved && this.resolved.scope.isStatic(); + } + + /** + * Whether the reference is writeable. + * @method Reference#isWrite + * @returns {boolean} write + */ + isWrite() { + return !!(this.flag & Reference.WRITE); + } + + /** + * Whether the reference is readable. + * @method Reference#isRead + * @returns {boolean} read + */ + isRead() { + return !!(this.flag & Reference.READ); + } + + /** + * Whether the reference is read-only. + * @method Reference#isReadOnly + * @returns {boolean} read only + */ + isReadOnly() { + return this.flag === Reference.READ; + } + + /** + * Whether the reference is write-only. + * @method Reference#isWriteOnly + * @returns {boolean} write only + */ + isWriteOnly() { + return this.flag === Reference.WRITE; + } + + /** + * Whether the reference is read-write. + * @method Reference#isReadWrite + * @returns {boolean} read write + */ + isReadWrite() { + return this.flag === Reference.RW; + } +} + +/** + * @constant Reference.READ + * @private + */ +Reference.READ = READ; + +/** + * @constant Reference.WRITE + * @private + */ +Reference.WRITE = WRITE; + +/** + * @constant Reference.RW + * @private + */ +Reference.RW = RW; + +module.exports = Reference; + +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/node_modules/eslint-scope/lib/referencer.js b/node_modules/eslint-scope/lib/referencer.js new file mode 100644 index 0000000..b7cdbb6 --- /dev/null +++ b/node_modules/eslint-scope/lib/referencer.js @@ -0,0 +1,638 @@ +/* + Copyright (C) 2015 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +"use strict"; + +/* eslint-disable no-underscore-dangle */ +/* eslint-disable no-undefined */ + +const Syntax = require("estraverse").Syntax; +const esrecurse = require("esrecurse"); +const Reference = require("./reference"); +const Variable = require("./variable"); +const PatternVisitor = require("./pattern-visitor"); +const definition = require("./definition"); +const assert = require("assert"); + +const ParameterDefinition = definition.ParameterDefinition; +const Definition = definition.Definition; + +/** + * Traverse identifier in pattern + * @param {Object} options - options + * @param {pattern} rootPattern - root pattern + * @param {Refencer} referencer - referencer + * @param {callback} callback - callback + * @returns {void} + */ +function traverseIdentifierInPattern(options, rootPattern, referencer, callback) { + + // Call the callback at left hand identifier nodes, and Collect right hand nodes. + const visitor = new PatternVisitor(options, rootPattern, callback); + + visitor.visit(rootPattern); + + // Process the right hand nodes recursively. + if (referencer !== null && referencer !== undefined) { + visitor.rightHandNodes.forEach(referencer.visit, referencer); + } +} + +// Importing ImportDeclaration. +// http://people.mozilla.org/~jorendorff/es6-draft.html#sec-moduledeclarationinstantiation +// https://github.com/estree/estree/blob/master/es6.md#importdeclaration +// FIXME: Now, we don't create module environment, because the context is +// implementation dependent. + +class Importer extends esrecurse.Visitor { + constructor(declaration, referencer) { + super(null, referencer.options); + this.declaration = declaration; + this.referencer = referencer; + } + + visitImport(id, specifier) { + this.referencer.visitPattern(id, pattern => { + this.referencer.currentScope().__define(pattern, + new Definition( + Variable.ImportBinding, + pattern, + specifier, + this.declaration, + null, + null + )); + }); + } + + ImportNamespaceSpecifier(node) { + const local = (node.local || node.id); + + if (local) { + this.visitImport(local, node); + } + } + + ImportDefaultSpecifier(node) { + const local = (node.local || node.id); + + this.visitImport(local, node); + } + + ImportSpecifier(node) { + const local = (node.local || node.id); + + if (node.name) { + this.visitImport(node.name, node); + } else { + this.visitImport(local, node); + } + } +} + +// Referencing variables and creating bindings. +class Referencer extends esrecurse.Visitor { + constructor(options, scopeManager) { + super(null, options); + this.options = options; + this.scopeManager = scopeManager; + this.parent = null; + this.isInnerMethodDefinition = false; + } + + currentScope() { + return this.scopeManager.__currentScope; + } + + close(node) { + while (this.currentScope() && node === this.currentScope().block) { + this.scopeManager.__currentScope = this.currentScope().__close(this.scopeManager); + } + } + + pushInnerMethodDefinition(isInnerMethodDefinition) { + const previous = this.isInnerMethodDefinition; + + this.isInnerMethodDefinition = isInnerMethodDefinition; + return previous; + } + + popInnerMethodDefinition(isInnerMethodDefinition) { + this.isInnerMethodDefinition = isInnerMethodDefinition; + } + + materializeTDZScope(node, iterationNode) { + + // http://people.mozilla.org/~jorendorff/es6-draft.html#sec-runtime-semantics-forin-div-ofexpressionevaluation-abstract-operation + // TDZ scope hides the declaration's names. + this.scopeManager.__nestTDZScope(node, iterationNode); + this.visitVariableDeclaration(this.currentScope(), Variable.TDZ, iterationNode.left, 0, true); + } + + materializeIterationScope(node) { + + // Generate iteration scope for upper ForIn/ForOf Statements. + const letOrConstDecl = node.left; + + this.scopeManager.__nestForScope(node); + this.visitVariableDeclaration(this.currentScope(), Variable.Variable, letOrConstDecl, 0); + this.visitPattern(letOrConstDecl.declarations[0].id, pattern => { + this.currentScope().__referencing(pattern, Reference.WRITE, node.right, null, true, true); + }); + } + + referencingDefaultValue(pattern, assignments, maybeImplicitGlobal, init) { + const scope = this.currentScope(); + + assignments.forEach(assignment => { + scope.__referencing( + pattern, + Reference.WRITE, + assignment.right, + maybeImplicitGlobal, + pattern !== assignment.left, + init); + }); + } + + visitPattern(node, options, callback) { + if (typeof options === "function") { + callback = options; + options = { processRightHandNodes: false }; + } + traverseIdentifierInPattern( + this.options, + node, + options.processRightHandNodes ? this : null, + callback); + } + + visitFunction(node) { + let i, iz; + + // FunctionDeclaration name is defined in upper scope + // NOTE: Not referring variableScope. It is intended. + // Since + // in ES5, FunctionDeclaration should be in FunctionBody. + // in ES6, FunctionDeclaration should be block scoped. + + if (node.type === Syntax.FunctionDeclaration) { + + // id is defined in upper scope + this.currentScope().__define(node.id, + new Definition( + Variable.FunctionName, + node.id, + node, + null, + null, + null + )); + } + + // FunctionExpression with name creates its special scope; + // FunctionExpressionNameScope. + if (node.type === Syntax.FunctionExpression && node.id) { + this.scopeManager.__nestFunctionExpressionNameScope(node); + } + + // Consider this function is in the MethodDefinition. + this.scopeManager.__nestFunctionScope(node, this.isInnerMethodDefinition); + + const that = this; + + /** + * Visit pattern callback + * @param {pattern} pattern - pattern + * @param {Object} info - info + * @returns {void} + */ + function visitPatternCallback(pattern, info) { + that.currentScope().__define(pattern, + new ParameterDefinition( + pattern, + node, + i, + info.rest + )); + + that.referencingDefaultValue(pattern, info.assignments, null, true); + } + + // Process parameter declarations. + for (i = 0, iz = node.params.length; i < iz; ++i) { + this.visitPattern(node.params[i], { processRightHandNodes: true }, visitPatternCallback); + } + + // if there's a rest argument, add that + if (node.rest) { + this.visitPattern({ + type: "RestElement", + argument: node.rest + }, pattern => { + this.currentScope().__define(pattern, + new ParameterDefinition( + pattern, + node, + node.params.length, + true + )); + }); + } + + // In TypeScript there are a number of function-like constructs which have no body, + // so check it exists before traversing + if (node.body) { + + // Skip BlockStatement to prevent creating BlockStatement scope. + if (node.body.type === Syntax.BlockStatement) { + this.visitChildren(node.body); + } else { + this.visit(node.body); + } + } + + this.close(node); + } + + visitClass(node) { + if (node.type === Syntax.ClassDeclaration) { + this.currentScope().__define(node.id, + new Definition( + Variable.ClassName, + node.id, + node, + null, + null, + null + )); + } + + // FIXME: Maybe consider TDZ. + this.visit(node.superClass); + + this.scopeManager.__nestClassScope(node); + + if (node.id) { + this.currentScope().__define(node.id, + new Definition( + Variable.ClassName, + node.id, + node + )); + } + this.visit(node.body); + + this.close(node); + } + + visitProperty(node) { + let previous; + + if (node.computed) { + this.visit(node.key); + } + + const isMethodDefinition = node.type === Syntax.MethodDefinition; + + if (isMethodDefinition) { + previous = this.pushInnerMethodDefinition(true); + } + this.visit(node.value); + if (isMethodDefinition) { + this.popInnerMethodDefinition(previous); + } + } + + visitForIn(node) { + if (node.left.type === Syntax.VariableDeclaration && node.left.kind !== "var") { + this.materializeTDZScope(node.right, node); + this.visit(node.right); + this.close(node.right); + + this.materializeIterationScope(node); + this.visit(node.body); + this.close(node); + } else { + if (node.left.type === Syntax.VariableDeclaration) { + this.visit(node.left); + this.visitPattern(node.left.declarations[0].id, pattern => { + this.currentScope().__referencing(pattern, Reference.WRITE, node.right, null, true, true); + }); + } else { + this.visitPattern(node.left, { processRightHandNodes: true }, (pattern, info) => { + let maybeImplicitGlobal = null; + + if (!this.currentScope().isStrict) { + maybeImplicitGlobal = { + pattern, + node + }; + } + this.referencingDefaultValue(pattern, info.assignments, maybeImplicitGlobal, false); + this.currentScope().__referencing(pattern, Reference.WRITE, node.right, maybeImplicitGlobal, true, false); + }); + } + this.visit(node.right); + this.visit(node.body); + } + } + + visitVariableDeclaration(variableTargetScope, type, node, index, fromTDZ) { + + // If this was called to initialize a TDZ scope, this needs to make definitions, but doesn't make references. + const decl = node.declarations[index]; + const init = decl.init; + + this.visitPattern(decl.id, { processRightHandNodes: !fromTDZ }, (pattern, info) => { + variableTargetScope.__define(pattern, + new Definition( + type, + pattern, + decl, + node, + index, + node.kind + )); + + if (!fromTDZ) { + this.referencingDefaultValue(pattern, info.assignments, null, true); + } + if (init) { + this.currentScope().__referencing(pattern, Reference.WRITE, init, null, !info.topLevel, true); + } + }); + } + + AssignmentExpression(node) { + if (PatternVisitor.isPattern(node.left)) { + if (node.operator === "=") { + this.visitPattern(node.left, { processRightHandNodes: true }, (pattern, info) => { + let maybeImplicitGlobal = null; + + if (!this.currentScope().isStrict) { + maybeImplicitGlobal = { + pattern, + node + }; + } + this.referencingDefaultValue(pattern, info.assignments, maybeImplicitGlobal, false); + this.currentScope().__referencing(pattern, Reference.WRITE, node.right, maybeImplicitGlobal, !info.topLevel, false); + }); + } else { + this.currentScope().__referencing(node.left, Reference.RW, node.right); + } + } else { + this.visit(node.left); + } + this.visit(node.right); + } + + CatchClause(node) { + this.scopeManager.__nestCatchScope(node); + + this.visitPattern(node.param, { processRightHandNodes: true }, (pattern, info) => { + this.currentScope().__define(pattern, + new Definition( + Variable.CatchClause, + node.param, + node, + null, + null, + null + )); + this.referencingDefaultValue(pattern, info.assignments, null, true); + }); + this.visit(node.body); + + this.close(node); + } + + Program(node) { + this.scopeManager.__nestGlobalScope(node); + + if (this.scopeManager.__isNodejsScope()) { + + // Force strictness of GlobalScope to false when using node.js scope. + this.currentScope().isStrict = false; + this.scopeManager.__nestFunctionScope(node, false); + } + + if (this.scopeManager.__isES6() && this.scopeManager.isModule()) { + this.scopeManager.__nestModuleScope(node); + } + + if (this.scopeManager.isStrictModeSupported() && this.scopeManager.isImpliedStrict()) { + this.currentScope().isStrict = true; + } + + this.visitChildren(node); + this.close(node); + } + + Identifier(node) { + this.currentScope().__referencing(node); + } + + UpdateExpression(node) { + if (PatternVisitor.isPattern(node.argument)) { + this.currentScope().__referencing(node.argument, Reference.RW, null); + } else { + this.visitChildren(node); + } + } + + MemberExpression(node) { + this.visit(node.object); + if (node.computed) { + this.visit(node.property); + } + } + + Property(node) { + this.visitProperty(node); + } + + MethodDefinition(node) { + this.visitProperty(node); + } + + BreakStatement() {} // eslint-disable-line class-methods-use-this + + ContinueStatement() {} // eslint-disable-line class-methods-use-this + + LabeledStatement(node) { + this.visit(node.body); + } + + ForStatement(node) { + + // Create ForStatement declaration. + // NOTE: In ES6, ForStatement dynamically generates + // per iteration environment. However, escope is + // a static analyzer, we only generate one scope for ForStatement. + if (node.init && node.init.type === Syntax.VariableDeclaration && node.init.kind !== "var") { + this.scopeManager.__nestForScope(node); + } + + this.visitChildren(node); + + this.close(node); + } + + ClassExpression(node) { + this.visitClass(node); + } + + ClassDeclaration(node) { + this.visitClass(node); + } + + CallExpression(node) { + + // Check this is direct call to eval + if (!this.scopeManager.__ignoreEval() && node.callee.type === Syntax.Identifier && node.callee.name === "eval") { + + // NOTE: This should be `variableScope`. Since direct eval call always creates Lexical environment and + // let / const should be enclosed into it. Only VariableDeclaration affects on the caller's environment. + this.currentScope().variableScope.__detectEval(); + } + this.visitChildren(node); + } + + BlockStatement(node) { + if (this.scopeManager.__isES6()) { + this.scopeManager.__nestBlockScope(node); + } + + this.visitChildren(node); + + this.close(node); + } + + ThisExpression() { + this.currentScope().variableScope.__detectThis(); + } + + WithStatement(node) { + this.visit(node.object); + + // Then nest scope for WithStatement. + this.scopeManager.__nestWithScope(node); + + this.visit(node.body); + + this.close(node); + } + + VariableDeclaration(node) { + const variableTargetScope = (node.kind === "var") ? this.currentScope().variableScope : this.currentScope(); + + for (let i = 0, iz = node.declarations.length; i < iz; ++i) { + const decl = node.declarations[i]; + + this.visitVariableDeclaration(variableTargetScope, Variable.Variable, node, i); + if (decl.init) { + this.visit(decl.init); + } + } + } + + // sec 13.11.8 + SwitchStatement(node) { + this.visit(node.discriminant); + + if (this.scopeManager.__isES6()) { + this.scopeManager.__nestSwitchScope(node); + } + + for (let i = 0, iz = node.cases.length; i < iz; ++i) { + this.visit(node.cases[i]); + } + + this.close(node); + } + + FunctionDeclaration(node) { + this.visitFunction(node); + } + + FunctionExpression(node) { + this.visitFunction(node); + } + + ForOfStatement(node) { + this.visitForIn(node); + } + + ForInStatement(node) { + this.visitForIn(node); + } + + ArrowFunctionExpression(node) { + this.visitFunction(node); + } + + ImportDeclaration(node) { + assert(this.scopeManager.__isES6() && this.scopeManager.isModule(), "ImportDeclaration should appear when the mode is ES6 and in the module context."); + + const importer = new Importer(node, this); + + importer.visit(node); + } + + visitExportDeclaration(node) { + if (node.source) { + return; + } + if (node.declaration) { + this.visit(node.declaration); + return; + } + + this.visitChildren(node); + } + + ExportDeclaration(node) { + this.visitExportDeclaration(node); + } + + ExportNamedDeclaration(node) { + this.visitExportDeclaration(node); + } + + ExportSpecifier(node) { + const local = (node.id || node.local); + + this.visit(local); + } + + MetaProperty() { // eslint-disable-line class-methods-use-this + + // do nothing. + } +} + +module.exports = Referencer; + +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/node_modules/eslint-scope/lib/scope-manager.js b/node_modules/eslint-scope/lib/scope-manager.js new file mode 100644 index 0000000..0cc75a0 --- /dev/null +++ b/node_modules/eslint-scope/lib/scope-manager.js @@ -0,0 +1,255 @@ +/* + Copyright (C) 2015 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +"use strict"; + +/* eslint-disable no-underscore-dangle */ + +const Scope = require("./scope"); +const assert = require("assert"); + +const GlobalScope = Scope.GlobalScope; +const CatchScope = Scope.CatchScope; +const WithScope = Scope.WithScope; +const ModuleScope = Scope.ModuleScope; +const ClassScope = Scope.ClassScope; +const SwitchScope = Scope.SwitchScope; +const FunctionScope = Scope.FunctionScope; +const ForScope = Scope.ForScope; +const TDZScope = Scope.TDZScope; +const FunctionExpressionNameScope = Scope.FunctionExpressionNameScope; +const BlockScope = Scope.BlockScope; + +/** + * @class ScopeManager + */ +class ScopeManager { + constructor(options) { + this.scopes = []; + this.globalScope = null; + this.__nodeToScope = new WeakMap(); + this.__currentScope = null; + this.__options = options; + this.__declaredVariables = new WeakMap(); + } + + __useDirective() { + return this.__options.directive; + } + + __isOptimistic() { + return this.__options.optimistic; + } + + __ignoreEval() { + return this.__options.ignoreEval; + } + + __isNodejsScope() { + return this.__options.nodejsScope; + } + + isModule() { + return this.__options.sourceType === "module"; + } + + isImpliedStrict() { + return this.__options.impliedStrict; + } + + isStrictModeSupported() { + return this.__options.ecmaVersion >= 5; + } + + // Returns appropriate scope for this node. + __get(node) { + return this.__nodeToScope.get(node); + } + + /** + * Get variables that are declared by the node. + * + * "are declared by the node" means the node is same as `Variable.defs[].node` or `Variable.defs[].parent`. + * If the node declares nothing, this method returns an empty array. + * CAUTION: This API is experimental. See https://github.com/estools/escope/pull/69 for more details. + * + * @param {Espree.Node} node - a node to get. + * @returns {Variable[]} variables that declared by the node. + */ + getDeclaredVariables(node) { + return this.__declaredVariables.get(node) || []; + } + + /** + * acquire scope from node. + * @method ScopeManager#acquire + * @param {Espree.Node} node - node for the acquired scope. + * @param {boolean=} inner - look up the most inner scope, default value is false. + * @returns {Scope?} Scope from node + */ + acquire(node, inner) { + + /** + * predicate + * @param {Scope} testScope - scope to test + * @returns {boolean} predicate + */ + function predicate(testScope) { + if (testScope.type === "function" && testScope.functionExpressionScope) { + return false; + } + if (testScope.type === "TDZ") { + return false; + } + return true; + } + + const scopes = this.__get(node); + + if (!scopes || scopes.length === 0) { + return null; + } + + // Heuristic selection from all scopes. + // If you would like to get all scopes, please use ScopeManager#acquireAll. + if (scopes.length === 1) { + return scopes[0]; + } + + if (inner) { + for (let i = scopes.length - 1; i >= 0; --i) { + const scope = scopes[i]; + + if (predicate(scope)) { + return scope; + } + } + } else { + for (let i = 0, iz = scopes.length; i < iz; ++i) { + const scope = scopes[i]; + + if (predicate(scope)) { + return scope; + } + } + } + + return null; + } + + /** + * acquire all scopes from node. + * @method ScopeManager#acquireAll + * @param {Espree.Node} node - node for the acquired scope. + * @returns {Scopes?} Scope array + */ + acquireAll(node) { + return this.__get(node); + } + + /** + * release the node. + * @method ScopeManager#release + * @param {Espree.Node} node - releasing node. + * @param {boolean=} inner - look up the most inner scope, default value is false. + * @returns {Scope?} upper scope for the node. + */ + release(node, inner) { + const scopes = this.__get(node); + + if (scopes && scopes.length) { + const scope = scopes[0].upper; + + if (!scope) { + return null; + } + return this.acquire(scope.block, inner); + } + return null; + } + + attach() { } // eslint-disable-line class-methods-use-this + + detach() { } // eslint-disable-line class-methods-use-this + + __nestScope(scope) { + if (scope instanceof GlobalScope) { + assert(this.__currentScope === null); + this.globalScope = scope; + } + this.__currentScope = scope; + return scope; + } + + __nestGlobalScope(node) { + return this.__nestScope(new GlobalScope(this, node)); + } + + __nestBlockScope(node) { + return this.__nestScope(new BlockScope(this, this.__currentScope, node)); + } + + __nestFunctionScope(node, isMethodDefinition) { + return this.__nestScope(new FunctionScope(this, this.__currentScope, node, isMethodDefinition)); + } + + __nestForScope(node) { + return this.__nestScope(new ForScope(this, this.__currentScope, node)); + } + + __nestCatchScope(node) { + return this.__nestScope(new CatchScope(this, this.__currentScope, node)); + } + + __nestWithScope(node) { + return this.__nestScope(new WithScope(this, this.__currentScope, node)); + } + + __nestClassScope(node) { + return this.__nestScope(new ClassScope(this, this.__currentScope, node)); + } + + __nestSwitchScope(node) { + return this.__nestScope(new SwitchScope(this, this.__currentScope, node)); + } + + __nestModuleScope(node) { + return this.__nestScope(new ModuleScope(this, this.__currentScope, node)); + } + + __nestTDZScope(node) { + return this.__nestScope(new TDZScope(this, this.__currentScope, node)); + } + + __nestFunctionExpressionNameScope(node) { + return this.__nestScope(new FunctionExpressionNameScope(this, this.__currentScope, node)); + } + + __isES6() { + return this.__options.ecmaVersion >= 6; + } +} + +module.exports = ScopeManager; + +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/node_modules/eslint-scope/lib/scope.js b/node_modules/eslint-scope/lib/scope.js new file mode 100644 index 0000000..3307a36 --- /dev/null +++ b/node_modules/eslint-scope/lib/scope.js @@ -0,0 +1,722 @@ +/* + Copyright (C) 2015 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +"use strict"; + +/* eslint-disable no-underscore-dangle */ +/* eslint-disable no-undefined */ + +const Syntax = require("estraverse").Syntax; + +const Reference = require("./reference"); +const Variable = require("./variable"); +const Definition = require("./definition").Definition; +const assert = require("assert"); + +/** + * Test if scope is struct + * @param {Scope} scope - scope + * @param {Block} block - block + * @param {boolean} isMethodDefinition - is method definiton + * @param {boolean} useDirective - use directive + * @returns {boolean} is strict scope + */ +function isStrictScope(scope, block, isMethodDefinition, useDirective) { + let body; + + // When upper scope is exists and strict, inner scope is also strict. + if (scope.upper && scope.upper.isStrict) { + return true; + } + + // ArrowFunctionExpression's scope is always strict scope. + if (block.type === Syntax.ArrowFunctionExpression) { + return true; + } + + if (isMethodDefinition) { + return true; + } + + if (scope.type === "class" || scope.type === "module") { + return true; + } + + if (scope.type === "block" || scope.type === "switch") { + return false; + } + + if (scope.type === "function") { + if (block.type === Syntax.Program) { + body = block; + } else { + body = block.body; + } + + if (!body) { + return false; + } + } else if (scope.type === "global") { + body = block; + } else { + return false; + } + + // Search 'use strict' directive. + if (useDirective) { + for (let i = 0, iz = body.body.length; i < iz; ++i) { + const stmt = body.body[i]; + + if (stmt.type !== Syntax.DirectiveStatement) { + break; + } + if (stmt.raw === "\"use strict\"" || stmt.raw === "'use strict'") { + return true; + } + } + } else { + for (let i = 0, iz = body.body.length; i < iz; ++i) { + const stmt = body.body[i]; + + if (stmt.type !== Syntax.ExpressionStatement) { + break; + } + const expr = stmt.expression; + + if (expr.type !== Syntax.Literal || typeof expr.value !== "string") { + break; + } + if (expr.raw !== null && expr.raw !== undefined) { + if (expr.raw === "\"use strict\"" || expr.raw === "'use strict'") { + return true; + } + } else { + if (expr.value === "use strict") { + return true; + } + } + } + } + return false; +} + +/** + * Register scope + * @param {ScopeManager} scopeManager - scope manager + * @param {Scope} scope - scope + * @returns {void} + */ +function registerScope(scopeManager, scope) { + scopeManager.scopes.push(scope); + + const scopes = scopeManager.__nodeToScope.get(scope.block); + + if (scopes) { + scopes.push(scope); + } else { + scopeManager.__nodeToScope.set(scope.block, [scope]); + } +} + +/** + * Should be statically + * @param {Object} def - def + * @returns {boolean} should be statically + */ +function shouldBeStatically(def) { + return ( + (def.type === Variable.ClassName) || + (def.type === Variable.Variable && def.parent.kind !== "var") + ); +} + +/** + * @class Scope + */ +class Scope { + constructor(scopeManager, type, upperScope, block, isMethodDefinition) { + + /** + * One of 'TDZ', 'module', 'block', 'switch', 'function', 'catch', 'with', 'function', 'class', 'global'. + * @member {String} Scope#type + */ + this.type = type; + + /** + * The scoped {@link Variable}s of this scope, as { Variable.name + * : Variable }. + * @member {Map} Scope#set + */ + this.set = new Map(); + + /** + * The tainted variables of this scope, as { Variable.name : + * boolean }. + * @member {Map} Scope#taints */ + this.taints = new Map(); + + /** + * Generally, through the lexical scoping of JS you can always know + * which variable an identifier in the source code refers to. There are + * a few exceptions to this rule. With 'global' and 'with' scopes you + * can only decide at runtime which variable a reference refers to. + * Moreover, if 'eval()' is used in a scope, it might introduce new + * bindings in this or its parent scopes. + * All those scopes are considered 'dynamic'. + * @member {boolean} Scope#dynamic + */ + this.dynamic = this.type === "global" || this.type === "with"; + + /** + * A reference to the scope-defining syntax node. + * @member {espree.Node} Scope#block + */ + this.block = block; + + /** + * The {@link Reference|references} that are not resolved with this scope. + * @member {Reference[]} Scope#through + */ + this.through = []; + + /** + * The scoped {@link Variable}s of this scope. In the case of a + * 'function' scope this includes the automatic argument arguments as + * its first element, as well as all further formal arguments. + * @member {Variable[]} Scope#variables + */ + this.variables = []; + + /** + * Any variable {@link Reference|reference} found in this scope. This + * includes occurrences of local variables as well as variables from + * parent scopes (including the global scope). For local variables + * this also includes defining occurrences (like in a 'var' statement). + * In a 'function' scope this does not include the occurrences of the + * formal parameter in the parameter list. + * @member {Reference[]} Scope#references + */ + this.references = []; + + /** + * For 'global' and 'function' scopes, this is a self-reference. For + * other scope types this is the variableScope value of the + * parent scope. + * @member {Scope} Scope#variableScope + */ + this.variableScope = + (this.type === "global" || this.type === "function" || this.type === "module") ? this : upperScope.variableScope; + + /** + * Whether this scope is created by a FunctionExpression. + * @member {boolean} Scope#functionExpressionScope + */ + this.functionExpressionScope = false; + + /** + * Whether this is a scope that contains an 'eval()' invocation. + * @member {boolean} Scope#directCallToEvalScope + */ + this.directCallToEvalScope = false; + + /** + * @member {boolean} Scope#thisFound + */ + this.thisFound = false; + + this.__left = []; + + /** + * Reference to the parent {@link Scope|scope}. + * @member {Scope} Scope#upper + */ + this.upper = upperScope; + + /** + * Whether 'use strict' is in effect in this scope. + * @member {boolean} Scope#isStrict + */ + this.isStrict = isStrictScope(this, block, isMethodDefinition, scopeManager.__useDirective()); + + /** + * List of nested {@link Scope}s. + * @member {Scope[]} Scope#childScopes + */ + this.childScopes = []; + if (this.upper) { + this.upper.childScopes.push(this); + } + + this.__declaredVariables = scopeManager.__declaredVariables; + + registerScope(scopeManager, this); + } + + __shouldStaticallyClose(scopeManager) { + return (!this.dynamic || scopeManager.__isOptimistic()); + } + + __shouldStaticallyCloseForGlobal(ref) { + + // On global scope, let/const/class declarations should be resolved statically. + const name = ref.identifier.name; + + if (!this.set.has(name)) { + return false; + } + + const variable = this.set.get(name); + const defs = variable.defs; + + return defs.length > 0 && defs.every(shouldBeStatically); + } + + __staticCloseRef(ref) { + if (!this.__resolve(ref)) { + this.__delegateToUpperScope(ref); + } + } + + __dynamicCloseRef(ref) { + + // notify all names are through to global + let current = this; + + do { + current.through.push(ref); + current = current.upper; + } while (current); + } + + __globalCloseRef(ref) { + + // let/const/class declarations should be resolved statically. + // others should be resolved dynamically. + if (this.__shouldStaticallyCloseForGlobal(ref)) { + this.__staticCloseRef(ref); + } else { + this.__dynamicCloseRef(ref); + } + } + + __close(scopeManager) { + let closeRef; + + if (this.__shouldStaticallyClose(scopeManager)) { + closeRef = this.__staticCloseRef; + } else if (this.type !== "global") { + closeRef = this.__dynamicCloseRef; + } else { + closeRef = this.__globalCloseRef; + } + + // Try Resolving all references in this scope. + for (let i = 0, iz = this.__left.length; i < iz; ++i) { + const ref = this.__left[i]; + + closeRef.call(this, ref); + } + this.__left = null; + + return this.upper; + } + + __resolve(ref) { + const name = ref.identifier.name; + + if (this.set.has(name)) { + const variable = this.set.get(name); + + variable.references.push(ref); + variable.stack = variable.stack && ref.from.variableScope === this.variableScope; + if (ref.tainted) { + variable.tainted = true; + this.taints.set(variable.name, true); + } + ref.resolved = variable; + return true; + } + return false; + } + + __delegateToUpperScope(ref) { + if (this.upper) { + this.upper.__left.push(ref); + } + this.through.push(ref); + } + + __addDeclaredVariablesOfNode(variable, node) { + if (node === null || node === undefined) { + return; + } + + let variables = this.__declaredVariables.get(node); + + if (variables === null || variables === undefined) { + variables = []; + this.__declaredVariables.set(node, variables); + } + if (variables.indexOf(variable) === -1) { + variables.push(variable); + } + } + + __defineGeneric(name, set, variables, node, def) { + let variable; + + variable = set.get(name); + if (!variable) { + variable = new Variable(name, this); + set.set(name, variable); + variables.push(variable); + } + + if (def) { + variable.defs.push(def); + if (def.type !== Variable.TDZ) { + this.__addDeclaredVariablesOfNode(variable, def.node); + this.__addDeclaredVariablesOfNode(variable, def.parent); + } + } + if (node) { + variable.identifiers.push(node); + } + } + + __define(node, def) { + if (node && node.type === Syntax.Identifier) { + this.__defineGeneric( + node.name, + this.set, + this.variables, + node, + def); + } + } + + __referencing(node, assign, writeExpr, maybeImplicitGlobal, partial, init) { + + // because Array element may be null + if (!node || node.type !== Syntax.Identifier) { + return; + } + + // Specially handle like `this`. + if (node.name === "super") { + return; + } + + const ref = new Reference(node, this, assign || Reference.READ, writeExpr, maybeImplicitGlobal, !!partial, !!init); + + this.references.push(ref); + this.__left.push(ref); + } + + __detectEval() { + let current = this; + + this.directCallToEvalScope = true; + do { + current.dynamic = true; + current = current.upper; + } while (current); + } + + __detectThis() { + this.thisFound = true; + } + + __isClosed() { + return this.__left === null; + } + + /** + * returns resolved {Reference} + * @method Scope#resolve + * @param {Espree.Identifier} ident - identifier to be resolved. + * @returns {Reference} reference + */ + resolve(ident) { + let ref, i, iz; + + assert(this.__isClosed(), "Scope should be closed."); + assert(ident.type === Syntax.Identifier, "Target should be identifier."); + for (i = 0, iz = this.references.length; i < iz; ++i) { + ref = this.references[i]; + if (ref.identifier === ident) { + return ref; + } + } + return null; + } + + /** + * returns this scope is static + * @method Scope#isStatic + * @returns {boolean} static + */ + isStatic() { + return !this.dynamic; + } + + /** + * returns this scope has materialized arguments + * @method Scope#isArgumentsMaterialized + * @returns {boolean} arguemnts materialized + */ + isArgumentsMaterialized() { // eslint-disable-line class-methods-use-this + return true; + } + + /** + * returns this scope has materialized `this` reference + * @method Scope#isThisMaterialized + * @returns {boolean} this materialized + */ + isThisMaterialized() { // eslint-disable-line class-methods-use-this + return true; + } + + isUsedName(name) { + if (this.set.has(name)) { + return true; + } + for (let i = 0, iz = this.through.length; i < iz; ++i) { + if (this.through[i].identifier.name === name) { + return true; + } + } + return false; + } +} + +class GlobalScope extends Scope { + constructor(scopeManager, block) { + super(scopeManager, "global", null, block, false); + this.implicit = { + set: new Map(), + variables: [], + + /** + * List of {@link Reference}s that are left to be resolved (i.e. which + * need to be linked to the variable they refer to). + * @member {Reference[]} Scope#implicit#left + */ + left: [] + }; + } + + __close(scopeManager) { + const implicit = []; + + for (let i = 0, iz = this.__left.length; i < iz; ++i) { + const ref = this.__left[i]; + + if (ref.__maybeImplicitGlobal && !this.set.has(ref.identifier.name)) { + implicit.push(ref.__maybeImplicitGlobal); + } + } + + // create an implicit global variable from assignment expression + for (let i = 0, iz = implicit.length; i < iz; ++i) { + const info = implicit[i]; + + this.__defineImplicit(info.pattern, + new Definition( + Variable.ImplicitGlobalVariable, + info.pattern, + info.node, + null, + null, + null + )); + + } + + this.implicit.left = this.__left; + + return super.__close(scopeManager); + } + + __defineImplicit(node, def) { + if (node && node.type === Syntax.Identifier) { + this.__defineGeneric( + node.name, + this.implicit.set, + this.implicit.variables, + node, + def); + } + } +} + +class ModuleScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "module", upperScope, block, false); + } +} + +class FunctionExpressionNameScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "function-expression-name", upperScope, block, false); + this.__define(block.id, + new Definition( + Variable.FunctionName, + block.id, + block, + null, + null, + null + )); + this.functionExpressionScope = true; + } +} + +class CatchScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "catch", upperScope, block, false); + } +} + +class WithScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "with", upperScope, block, false); + } + + __close(scopeManager) { + if (this.__shouldStaticallyClose(scopeManager)) { + return super.__close(scopeManager); + } + + for (let i = 0, iz = this.__left.length; i < iz; ++i) { + const ref = this.__left[i]; + + ref.tainted = true; + this.__delegateToUpperScope(ref); + } + this.__left = null; + + return this.upper; + } +} + +class TDZScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "TDZ", upperScope, block, false); + } +} + +class BlockScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "block", upperScope, block, false); + } +} + +class SwitchScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "switch", upperScope, block, false); + } +} + +class FunctionScope extends Scope { + constructor(scopeManager, upperScope, block, isMethodDefinition) { + super(scopeManager, "function", upperScope, block, isMethodDefinition); + + // section 9.2.13, FunctionDeclarationInstantiation. + // NOTE Arrow functions never have an arguments objects. + if (this.block.type !== Syntax.ArrowFunctionExpression) { + this.__defineArguments(); + } + } + + isArgumentsMaterialized() { + + // TODO(Constellation) + // We can more aggressive on this condition like this. + // + // function t() { + // // arguments of t is always hidden. + // function arguments() { + // } + // } + if (this.block.type === Syntax.ArrowFunctionExpression) { + return false; + } + + if (!this.isStatic()) { + return true; + } + + const variable = this.set.get("arguments"); + + assert(variable, "Always have arguments variable."); + return variable.tainted || variable.references.length !== 0; + } + + isThisMaterialized() { + if (!this.isStatic()) { + return true; + } + return this.thisFound; + } + + __defineArguments() { + this.__defineGeneric( + "arguments", + this.set, + this.variables, + null, + null); + this.taints.set("arguments", true); + } +} + +class ForScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "for", upperScope, block, false); + } +} + +class ClassScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "class", upperScope, block, false); + } +} + +module.exports = { + Scope, + GlobalScope, + ModuleScope, + FunctionExpressionNameScope, + CatchScope, + WithScope, + TDZScope, + BlockScope, + SwitchScope, + FunctionScope, + ForScope, + ClassScope +}; + +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/node_modules/eslint-scope/lib/variable.js b/node_modules/eslint-scope/lib/variable.js new file mode 100644 index 0000000..6373209 --- /dev/null +++ b/node_modules/eslint-scope/lib/variable.js @@ -0,0 +1,89 @@ +/* + Copyright (C) 2015 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +"use strict"; + +/** + * A Variable represents a locally scoped identifier. These include arguments to + * functions. + * @class Variable + */ +class Variable { + constructor(name, scope) { + + /** + * The variable name, as given in the source code. + * @member {String} Variable#name + */ + this.name = name; + + /** + * List of defining occurrences of this variable (like in 'var ...' + * statements or as parameter), as AST nodes. + * @member {espree.Identifier[]} Variable#identifiers + */ + this.identifiers = []; + + /** + * List of {@link Reference|references} of this variable (excluding parameter entries) + * in its defining scope and all nested scopes. For defining + * occurrences only see {@link Variable#defs}. + * @member {Reference[]} Variable#references + */ + this.references = []; + + /** + * List of defining occurrences of this variable (like in 'var ...' + * statements or as parameter), as custom objects. + * @member {Definition[]} Variable#defs + */ + this.defs = []; + + this.tainted = false; + + /** + * Whether this is a stack variable. + * @member {boolean} Variable#stack + */ + this.stack = true; + + /** + * Reference to the enclosing Scope. + * @member {Scope} Variable#scope + */ + this.scope = scope; + } +} + +Variable.CatchClause = "CatchClause"; +Variable.Parameter = "Parameter"; +Variable.FunctionName = "FunctionName"; +Variable.ClassName = "ClassName"; +Variable.Variable = "Variable"; +Variable.ImportBinding = "ImportBinding"; +Variable.TDZ = "TDZ"; +Variable.ImplicitGlobalVariable = "ImplicitGlobalVariable"; + +module.exports = Variable; + +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/node_modules/eslint-scope/package.json b/node_modules/eslint-scope/package.json new file mode 100644 index 0000000..891cf8b --- /dev/null +++ b/node_modules/eslint-scope/package.json @@ -0,0 +1,117 @@ +{ + "_args": [ + [ + { + "raw": "eslint-scope@^3.7.1", + "scope": null, + "escapedName": "eslint-scope", + "name": "eslint-scope", + "rawSpec": "^3.7.1", + "spec": ">=3.7.1 <4.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint" + ] + ], + "_from": "eslint-scope@>=3.7.1 <4.0.0", + "_id": "eslint-scope@3.7.1", + "_inCache": true, + "_location": "/eslint-scope", + "_nodeVersion": "4.3.1", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/eslint-scope-3.7.1.tgz_1492031610481_0.544424896594137" + }, + "_npmUser": { + "name": "ivolodin", + "email": "ivolodin@gmail.com" + }, + "_npmVersion": "2.14.12", + "_phantomChildren": {}, + "_requested": { + "raw": "eslint-scope@^3.7.1", + "scope": null, + "escapedName": "eslint-scope", + "name": "eslint-scope", + "rawSpec": "^3.7.1", + "spec": ">=3.7.1 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", + "_shasum": "3d63c3edfda02e06e01a452ad88caacc7cdcb6e8", + "_shrinkwrap": null, + "_spec": "eslint-scope@^3.7.1", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint", + "bugs": { + "url": "https://github.com/eslint/eslint-scope/issues" + }, + "dependencies": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + }, + "description": "ECMAScript scope analyzer for ESLint", + "devDependencies": { + "chai": "^3.4.1", + "eslint": "^3.15.0", + "eslint-config-eslint": "^4.0.0", + "eslint-release": "^0.10.1", + "espree": "^3.1.1", + "istanbul": "^0.4.5", + "mocha": "^3.2.0", + "npm-license": "^0.3.3", + "shelljs": "^0.7.6", + "typescript": "~2.0.10", + "typescript-eslint-parser": "^1.0.0" + }, + "directories": {}, + "dist": { + "shasum": "3d63c3edfda02e06e01a452ad88caacc7cdcb6e8", + "tarball": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz" + }, + "engines": { + "node": ">=4.0.0" + }, + "files": [ + "LICENSE", + "README.md", + "lib" + ], + "gitHead": "bec1febf351ae7137a62241c18eb78876ee4fb7f", + "homepage": "http://github.com/eslint/eslint-scope", + "license": "BSD-2-Clause", + "main": "lib/index.js", + "maintainers": [ + { + "name": "eslint", + "email": "nicholas+eslint@nczconsulting.com" + }, + { + "name": "ivolodin", + "email": "ivolodin@gmail.com" + }, + { + "name": "nzakas", + "email": "nicholas@nczconsulting.com" + } + ], + "name": "eslint-scope", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/eslint/eslint-scope.git" + }, + "scripts": { + "alpharelease": "eslint-prerelease alpha", + "betarelease": "eslint-prerelease beta", + "ci-release": "eslint-ci-release", + "gh-release": "eslint-gh-release", + "lint": "node Makefile.js lint", + "release": "eslint-release", + "test": "node Makefile.js test" + }, + "version": "3.7.1" +} diff --git a/node_modules/eslint-visitor-keys/CHANGELOG.md b/node_modules/eslint-visitor-keys/CHANGELOG.md new file mode 100644 index 0000000..9937fc0 --- /dev/null +++ b/node_modules/eslint-visitor-keys/CHANGELOG.md @@ -0,0 +1,11 @@ +v1.0.0 - December 18, 2017 + +* 1f6bd38 Breaking: update keys (#4) (Toru Nagashima) + +v0.1.0 - November 17, 2017 + +* 17b4a88 Chore: update `repository` field in package.json (#3) (Toru Nagashima) +* a5a026b New: eslint-visitor-keys (#1) (Toru Nagashima) +* a1a48b8 Update: Change license to Apache 2 (#2) (Ilya Volodin) +* 2204715 Initial commit (Toru Nagashima) + diff --git a/node_modules/eslint-visitor-keys/LICENSE b/node_modules/eslint-visitor-keys/LICENSE new file mode 100644 index 0000000..17a2553 --- /dev/null +++ b/node_modules/eslint-visitor-keys/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright contributors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/eslint-visitor-keys/README.md b/node_modules/eslint-visitor-keys/README.md new file mode 100644 index 0000000..250f5fa --- /dev/null +++ b/node_modules/eslint-visitor-keys/README.md @@ -0,0 +1,98 @@ +# eslint-visitor-keys + +[![npm version](https://img.shields.io/npm/v/eslint-visitor-keys.svg)](https://www.npmjs.com/package/eslint-visitor-keys) +[![Downloads/month](https://img.shields.io/npm/dm/eslint-visitor-keys.svg)](http://www.npmtrends.com/eslint-visitor-keys) +[![Build Status](https://travis-ci.org/eslint/eslint-visitor-keys.svg?branch=master)](https://travis-ci.org/eslint/eslint-visitor-keys) +[![Dependency Status](https://david-dm.org/eslint/eslint-visitor-keys.svg)](https://david-dm.org/eslint/eslint-visitor-keys) + +Constants and utilities about visitor keys to traverse AST. + +## 💿 Installation + +Use [npm] to install. + +```bash +$ npm install eslint-visitor-keys +``` + +### Requirements + +- [Node.js] 4.0.0 or later. + +## 📖 Usage + +```js +const evk = require("eslint-visitor-keys") +``` + +### evk.KEYS + +> type: `{ [type: string]: string[] | undefined }` + +Visitor keys. This keys are frozen. + +This is an object. Keys are the type of [ESTree] nodes. Their values are an array of property names which have child nodes. + +For example: + +``` +console.log(evk.KEYS.AssignmentExpression) // → ["left", "right"] +``` + +### evk.getKeys(node) + +> type: `(node: object) => string[]` + +Get the visitor keys of a given AST node. + +This is similar to `Object.keys(node)` of ES Standard, but some keys are excluded: `parent`, `leadingComments`, `trailingComments`, and names which start with `_`. + +This will be used to traverse unknown nodes. + +For example: + +``` +const node = { + type: "AssignmentExpression", + left: { type: "Identifier", name: "foo" }, + right: { type: "Literal", value: 0 } +} +console.log(evk.getKeys(node)) // → ["type", "left", "right"] +``` + +### evk.unionWith(additionalKeys) + +> type: `(additionalKeys: object) => { [type: string]: string[] | undefined }` + +Make the union set with `evk.KEYS` and the given keys. + +- The order of keys is, `additionalKeys` is at first, then `evk.KEYS` is concatenated after that. +- It removes duplicated keys as keeping the first one. + +For example: + +``` +console.log(evk.unionWith({ + MethodDefinition: ["decorators"] +})) // → { ..., MethodDefinition: ["decorators", "key", "value"], ... } +``` + +## 📰 Change log + +See [GitHub releases](https://github.com/eslint/eslint-visitor-keys/releases). + +## 🻠Contributing + +Welcome. See [ESLint contribution guidelines](https://eslint.org/docs/developer-guide/contributing/). + +### Development commands + +- `npm test` runs tests and measures code coverage. +- `npm run lint` checks source codes with ESLint. +- `npm run coverage` opens the code coverage report of the previous test with your default browser. +- `npm run release` publishes this package to [npm] registory. + + +[npm]: https://www.npmjs.com/ +[Node.js]: https://nodejs.org/en/ +[ESTree]: https://github.com/estree/estree diff --git a/node_modules/eslint-visitor-keys/lib/index.js b/node_modules/eslint-visitor-keys/lib/index.js new file mode 100644 index 0000000..cd8a326 --- /dev/null +++ b/node_modules/eslint-visitor-keys/lib/index.js @@ -0,0 +1,81 @@ +/** + * @author Toru Nagashima + * See LICENSE file in root directory for full license. + */ +"use strict"; + +const KEYS = require("./visitor-keys.json"); + +// Types. +const NODE_TYPES = Object.freeze(Object.keys(KEYS)); + +// Freeze the keys. +for (const type of NODE_TYPES) { + Object.freeze(KEYS[type]); +} +Object.freeze(KEYS); + +// List to ignore keys. +const KEY_BLACKLIST = new Set([ + "parent", + "leadingComments", + "trailingComments" +]); + +/** + * Check whether a given key should be used or not. + * @param {string} key The key to check. + * @returns {boolean} `true` if the key should be used. + */ +function filterKey(key) { + return !KEY_BLACKLIST.has(key) && key[0] !== "_"; +} + +//------------------------------------------------------------------------------ +// Public interfaces +//------------------------------------------------------------------------------ + +module.exports = Object.freeze({ + + /** + * Visitor keys. + * @type {{ [type: string]: string[] | undefined }} + */ + KEYS, + + /** + * Get visitor keys of a given node. + * @param {Object} node The AST node to get keys. + * @returns {string[]} Visitor keys of the node. + */ + getKeys(node) { + return Object.keys(node).filter(filterKey); + }, + + // Disable valid-jsdoc rule because it reports syntax error on the type of @returns. + // eslint-disable-next-line valid-jsdoc + /** + * Make the union set with `KEYS` and given keys. + * @param {Object} additionalKeys The additional keys. + * @returns {{ [type: string]: string[] | undefined }} The union set. + */ + unionWith(additionalKeys) { + const retv = Object.assign({}, KEYS); + + for (const type of Object.keys(additionalKeys)) { + if (retv.hasOwnProperty(type)) { + const keys = new Set(additionalKeys[type]); + + for (const key of retv[type]) { + keys.add(key); + } + + retv[type] = Object.freeze(Array.from(keys)); + } else { + retv[type] = Object.freeze(Array.from(additionalKeys[type])); + } + } + + return Object.freeze(retv); + } +}); diff --git a/node_modules/eslint-visitor-keys/lib/visitor-keys.json b/node_modules/eslint-visitor-keys/lib/visitor-keys.json new file mode 100644 index 0000000..5e07415 --- /dev/null +++ b/node_modules/eslint-visitor-keys/lib/visitor-keys.json @@ -0,0 +1,277 @@ +{ + "AssignmentExpression": [ + "left", + "right" + ], + "AssignmentPattern": [ + "left", + "right" + ], + "ArrayExpression": [ + "elements" + ], + "ArrayPattern": [ + "elements" + ], + "ArrowFunctionExpression": [ + "params", + "body" + ], + "AwaitExpression": [ + "argument" + ], + "BlockStatement": [ + "body" + ], + "BinaryExpression": [ + "left", + "right" + ], + "BreakStatement": [ + "label" + ], + "CallExpression": [ + "callee", + "arguments" + ], + "CatchClause": [ + "param", + "body" + ], + "ClassBody": [ + "body" + ], + "ClassDeclaration": [ + "id", + "superClass", + "body" + ], + "ClassExpression": [ + "id", + "superClass", + "body" + ], + "ConditionalExpression": [ + "test", + "consequent", + "alternate" + ], + "ContinueStatement": [ + "label" + ], + "DebuggerStatement": [], + "DoWhileStatement": [ + "body", + "test" + ], + "EmptyStatement": [], + "ExportAllDeclaration": [ + "source" + ], + "ExportDefaultDeclaration": [ + "declaration" + ], + "ExportNamedDeclaration": [ + "declaration", + "specifiers", + "source" + ], + "ExportSpecifier": [ + "exported", + "local" + ], + "ExpressionStatement": [ + "expression" + ], + "ExperimentalRestProperty": [ + "argument" + ], + "ExperimentalSpreadProperty": [ + "argument" + ], + "ForStatement": [ + "init", + "test", + "update", + "body" + ], + "ForInStatement": [ + "left", + "right", + "body" + ], + "ForOfStatement": [ + "left", + "right", + "body" + ], + "FunctionDeclaration": [ + "id", + "params", + "body" + ], + "FunctionExpression": [ + "id", + "params", + "body" + ], + "Identifier": [], + "IfStatement": [ + "test", + "consequent", + "alternate" + ], + "ImportDeclaration": [ + "specifiers", + "source" + ], + "ImportDefaultSpecifier": [ + "local" + ], + "ImportNamespaceSpecifier": [ + "local" + ], + "ImportSpecifier": [ + "imported", + "local" + ], + "JSXAttribute": [ + "name", + "value" + ], + "JSXClosingElement": [ + "name" + ], + "JSXElement": [ + "openingElement", + "children", + "closingElement" + ], + "JSXEmptyExpression": [], + "JSXExpressionContainer": [ + "expression" + ], + "JSXIdentifier": [], + "JSXMemberExpression": [ + "object", + "property" + ], + "JSXNamespacedName": [ + "namespace", + "name" + ], + "JSXOpeningElement": [ + "name", + "attributes" + ], + "JSXSpreadAttribute": [ + "argument" + ], + "JSXText": [], + "JSXFragment": [ + "openingFragment", + "children", + "closingFragment" + ], + "Literal": [], + "LabeledStatement": [ + "label", + "body" + ], + "LogicalExpression": [ + "left", + "right" + ], + "MemberExpression": [ + "object", + "property" + ], + "MetaProperty": [ + "meta", + "property" + ], + "MethodDefinition": [ + "key", + "value" + ], + "NewExpression": [ + "callee", + "arguments" + ], + "ObjectExpression": [ + "properties" + ], + "ObjectPattern": [ + "properties" + ], + "Program": [ + "body" + ], + "Property": [ + "key", + "value" + ], + "RestElement": [ + "argument" + ], + "ReturnStatement": [ + "argument" + ], + "SequenceExpression": [ + "expressions" + ], + "SpreadElement": [ + "argument" + ], + "Super": [], + "SwitchStatement": [ + "discriminant", + "cases" + ], + "SwitchCase": [ + "test", + "consequent" + ], + "TaggedTemplateExpression": [ + "tag", + "quasi" + ], + "TemplateElement": [], + "TemplateLiteral": [ + "quasis", + "expressions" + ], + "ThisExpression": [], + "ThrowStatement": [ + "argument" + ], + "TryStatement": [ + "block", + "handler", + "finalizer" + ], + "UnaryExpression": [ + "argument" + ], + "UpdateExpression": [ + "argument" + ], + "VariableDeclaration": [ + "declarations" + ], + "VariableDeclarator": [ + "id", + "init" + ], + "WhileStatement": [ + "test", + "body" + ], + "WithStatement": [ + "object", + "body" + ], + "YieldExpression": [ + "argument" + ] +} diff --git a/node_modules/eslint-visitor-keys/package.json b/node_modules/eslint-visitor-keys/package.json new file mode 100644 index 0000000..235b564 --- /dev/null +++ b/node_modules/eslint-visitor-keys/package.json @@ -0,0 +1,104 @@ +{ + "_args": [ + [ + { + "raw": "eslint-visitor-keys@^1.0.0", + "scope": null, + "escapedName": "eslint-visitor-keys", + "name": "eslint-visitor-keys", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint" + ] + ], + "_from": "eslint-visitor-keys@>=1.0.0 <2.0.0", + "_id": "eslint-visitor-keys@1.0.0", + "_inCache": true, + "_location": "/eslint-visitor-keys", + "_nodeVersion": "8.9.3", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/eslint-visitor-keys-1.0.0.tgz_1513594527044_0.7528314294759184" + }, + "_npmUser": { + "name": "eslint", + "email": "nicholas+eslint@nczconsulting.com" + }, + "_npmVersion": "5.5.1", + "_phantomChildren": {}, + "_requested": { + "raw": "eslint-visitor-keys@^1.0.0", + "scope": null, + "escapedName": "eslint-visitor-keys", + "name": "eslint-visitor-keys", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "_shasum": "3f3180fb2e291017716acb4c9d6d5b5c34a6a81d", + "_shrinkwrap": null, + "_spec": "eslint-visitor-keys@^1.0.0", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint", + "author": { + "name": "Toru Nagashima", + "url": "https://github.com/mysticatea" + }, + "bugs": { + "url": "https://github.com/eslint/eslint-visitor-keys/issues" + }, + "dependencies": {}, + "description": "Constants and utilities about visitor keys to traverse AST.", + "devDependencies": { + "eslint": "^4.7.2", + "eslint-config-eslint": "^4.0.0", + "eslint-release": "^0.10.3", + "mocha": "^3.5.3", + "nyc": "^11.2.1", + "opener": "^1.4.3" + }, + "directories": {}, + "dist": { + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "shasum": "3f3180fb2e291017716acb4c9d6d5b5c34a6a81d", + "tarball": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "lib" + ], + "gitHead": "7f35599b67605e4b1ddc84740077e15a84da5a36", + "homepage": "https://github.com/eslint/eslint-visitor-keys#readme", + "keywords": [], + "license": "Apache-2.0", + "main": "lib/index.js", + "maintainers": [ + { + "name": "eslint", + "email": "nicholas+eslint@nczconsulting.com" + } + ], + "name": "eslint-visitor-keys", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/eslint/eslint-visitor-keys.git" + }, + "scripts": { + "ci-release": "eslint-ci-release", + "coverage": "nyc report --reporter lcov && opener coverage/lcov-report/index.html", + "lint": "eslint lib tests/lib", + "pretest": "npm run -s lint", + "release": "eslint-release", + "test": "nyc mocha tests/lib" + }, + "version": "1.0.0" +} diff --git a/node_modules/eslint/CHANGELOG.md b/node_modules/eslint/CHANGELOG.md new file mode 100644 index 0000000..a659769 --- /dev/null +++ b/node_modules/eslint/CHANGELOG.md @@ -0,0 +1,4564 @@ +v4.18.1 - February 20, 2018 + +* f417506 Fix: ensure no-await-in-loop reports the correct node (fixes #9992) (#9993) (Teddy Katz) +* 3e99363 Docs: Fixed typo in key-spacing rule doc (#9987) (Jaid) +* 7c2cd70 Docs: deprecate experimentalObjectRestSpread (#9986) (Toru Nagashima) + +v4.18.0 - February 16, 2018 + +* 70f22f3 Chore: Apply memoization to config creation within glob utils (#9944) (Kenton Jacobsen) +* 0e4ae22 Update: fix indent bug with binary operators/ignoredNodes (fixes #9882) (#9951) (Teddy Katz) +* 47ac478 Update: add named imports and exports for object-curly-newline (#9876) (Nicholas Chua) +* e8efdd0 Fix: support Rest/Spread Properties (fixes #9885) (#9943) (Toru Nagashima) +* f012b8c Fix: support Async iteration (fixes #9891) (#9957) (Toru Nagashima) +* 74fa253 Docs: Clarify no-mixed-operators options (fixes #9962) (#9964) (Ivan Hayes) +* 426868f Docs: clean up key-spacing docs (fixes #9900) (#9963) (Abid Uzair) +* 4a6f22e Update: support eslint-disable-* block comments (fixes #8781) (#9745) (Erin) +* 777283b Docs: Propose fix typo for function (#9965) (John Eismeier) +* bf3d494 Docs: Fix typo in max-len ignorePattern example. (#9956) (Tim Martin) +* d64fbb4 Docs: fix typo in prefer-destructuring.md example (#9930) (Vse Mozhet Byt) +* f8d343f Chore: Fix default issue template (#9946) (Kai Cataldo) + +v4.17.0 - February 2, 2018 + +* 1da1ada Update: Add "multiline" type to padding-line-between-statements (#8668) (Matthew Bennett) +* bb213dc Chore: Use messageIds in some of the core rules (#9648) (Jed Fox) +* 1aa1970 Docs: remove outdated rule naming convention (#9925) (Teddy Katz) +* 3afaff6 Docs: Add prefer-destructuring variable reassignment example (#9873) (LePirlouit) +* d20f6b4 Fix: Typo in error message when running npm (#9866) (Maciej Kasprzyk) +* 51ec6a7 Docs: Use GitHub Multiple PR/Issue templates (#9911) (Kai Cataldo) +* dc80487 Update: space-unary-ops uses astUtils.canTokensBeAdjacent (fixes #9907) (#9906) (Kevin Partington) +* 084351b Docs: Fix the messageId example (fixes #9889) (#9892) (Jed Fox) +* 9cbb487 Docs: Mention the `globals` key in the no-undef docs (#9867) (Dan Dascalescu) + +v4.16.0 - January 19, 2018 + +* e26a25f Update: allow continue instead of if wrap in guard-for-in (fixes #7567) (#9796) (Michael Ficarra) +* af043eb Update: Add NewExpression support to comma-style (#9591) (Frazer McLean) +* 4f898c7 Build: Fix JSDoc syntax errors (#9813) (Matija Marohnić) +* 13bcf3c Fix: Removing curly quotes in no-eq-null report message (#9852) (Kevin Partington) +* b96fb31 Docs: configuration hierarchy for CLIEngine options (fixes #9526) (#9855) (PiIsFour) +* 8ccbdda Docs: Clarify that -c configs merge with `.eslintrc.*` (fixes #9535) (#9847) (Kevin Partington) +* 978574f Docs: Fix examples for no-useless-escape (#9853) (Toru Kobayashi) +* cd5681d Chore: Deactivate consistent-docs-url in internal rules folder (#9815) (Kevin Partington) +* 2e87ddd Docs: Sync messageId examples' style with other examples (#9816) (Kevin Partington) +* 1d61930 Update: use doctrine range information in valid-jsdoc (#9831) (Teddy Katz) +* 133336e Update: fix indent behavior on template literal arguments (fixes #9061) (#9820) (Teddy Katz) +* ea1b15d Fix: avoid crashing on malformed configuration comments (fixes #9373) (#9819) (Teddy Katz) +* add1e70 Update: fix indent bug on comments in ternary expressions (fixes #9729) (#9818) (Teddy Katz) +* 6a5cd32 Fix: prefer-destructuring error with computed properties (fixes #9784) (#9817) (Teddy Katz) +* 601f851 Docs: Minor modification to code comments for clarity (#9821) (rgovind92) +* b9da067 Docs: fix misleading info about RuleTester column numbers (#9830) (Teddy Katz) +* 2cf4522 Update: Rename and deprecate object-property-newline option (#9570) (Jonathan Pool) +* acde640 Docs: Add ES 2018 to Configuring ESLint (#9829) (Kai Cataldo) +* ccfce15 Docs: Minor tweaks to working with rules page (#9824) (Kevin Partington) +* 54b329a Docs: fix substitution of {{ name }} (#9822) (Andres Kalle) + +v4.15.0 - January 6, 2018 + +* 6ab04b5 New: Add context.report({ messageId }) (fixes #6740) (#9165) (Jed Fox) +* fc7f404 Docs: add url to each of the rules (refs #6582) (#9788) (Patrick McElhaney) +* fc44da9 Docs: fix sort-imports rule block language (#9805) (ferhat elmas) +* 65f0176 New: CLIEngine#getRules() (refs #6582) (#9782) (Patrick McElhaney) +* c64195f Update: More detailed assert message for rule-tester (#9769) (Weijia Wang) +* 9fcfabf Fix: no-extra-parens false positive (fixes: #9755) (#9795) (Erin) +* 61e5fa0 Docs: Add table of contents to Node.js API docs (#9785) (Patrick McElhaney) +* 4c87f42 Fix: incorrect error messages of no-unused-vars (fixes #9774) (#9791) (akouryy) +* bbabf34 Update: add `ignoreComments` option to `indent` rule (fixes #9018) (#9752) (Kevin Partington) +* db431cb Docs: HTTP -> HTTPS (fixes #9768) (#9768) (Ronald Eddy Jr) +* cbf0fb9 Docs: describe how to feature-detect scopeManager/visitorKeys support (#9764) (Teddy Katz) +* f7dcb70 Docs: Add note about "patch release pending" label to maintainer guide (#9763) (Teddy Katz) + +v4.14.0 - December 23, 2017 + +* be2f57e Update: support separate requires in one-var. (fixes #6175) (#9441) (薛定谔的猫) +* 370d614 Docs: Fix typos (#9751) (Jed Fox) +* 8196c45 Chore: Reorganize CLI options and associated docs (#9758) (Kevin Partington) +* 75c7419 Update: Logical-and is counted in `complexity` rule (fixes #8535) (#9754) (Kevin Partington) +* eb4b1e0 Docs: reintroduce misspelling in `valid-typeof` example (#9753) (Teddy Katz) +* ae51eb2 New: Add allowImplicit option to array-callback-return (fixes #8539) (#9344) (James C. Davis) +* e9d5dfd Docs: improve no-extra-parens formatting (#9747) (Rich Trott) +* 37d066c Chore: Add unit tests for overrides glob matching. (#9744) (Robert Jackson) +* 805a94e Chore: Fix typo in CLIEngine test name (#9741) (@scriptdaemon) +* 1c2aafd Update: Improve parser integrations (fixes #8392) (#8755) (Toru Nagashima) +* 4ddc131 Upgrade: debug@^3.1.0 (#9731) (Kevin Partington) +* f252c19 Docs: Make the lint message `source` property a little more subtle (#9735) (Jed Fox) +* 5a5c23c Docs: fix the link to contributing page (#9727) (Victor Hom) +* f44ce11 Docs: change beginner to good first issue label text (#9726) (Victor Hom) +* 14baa2e Chore: improve arrow-body-style error message (refs #5498) (#9718) (Teddy Katz) +* f819920 Docs: fix typos (#9723) (Thomas Broadley) +* 43d4ba8 Fix: false positive on rule`lines-between-class-members` (fixes #9665) (#9680) (sakabar) + +v4.13.1 - December 11, 2017 + +* b72dc83 Fix: eol-last allow empty-string to always pass (refs #9534) (#9696) (Kevin Partington) +* d80aa7c Fix: camelcase destructure leading/trailing underscore (fixes #9700) (#9701) (Kevin Partington) +* d49d9d0 Docs: Add missing period to the README (#9702) (Kevin Partington) +* 4564fe0 Chore: no-invalid-meta crash if no export assignment (refs #9534) (#9698) (Kevin Partington) + +v4.13.0 - December 8, 2017 + +* 256481b Update: update handling of destructuring in camelcase (fixes #8511) (#9468) (Erin) +* d067ae1 Docs: Don’t use undocumented array-style configuration for max-len (#9690) (Jed Fox) +* 1ad3091 Chore: fix test-suite to work with node master (#9688) (Myles Borins) +* cdb1488 Docs: Adds an example with try/catch. (#9672) (Jaap Taal) + +v4.12.1 - November 30, 2017 + +* 1e362a0 Revert "Fix: Use XML 1.1 on XML formatters (fixes #9607) (#9608)" (#9667) (Kevin Partington) + +v4.12.0 - November 25, 2017 + +* 76dab18 Upgrade: doctrine@^2.0.2 (#9656) (Kevin Partington) +* 28c9c8e New: add a Linter#defineParser function (#9321) (Ives van Hoorne) +* 5619910 Update: Add autofix for `sort-vars` (#9496) (Trevin Hofmann) +* 71eedbf Update: add `beforeStatementContinuationChars` to semi (fixes #9521) (#9594) (Toru Nagashima) +* 4118f14 New: Adds implicit-arrow-linebreak rule (refs #9510) (#9629) (Sharmila Jesupaul) +* 208fb0f Fix: Use XML 1.1 on XML formatters (fixes #9607) (#9608) (Daniel Reigada) +* 6e04f14 Upgrade: `globals` to 11.0.1 (fixes #9614) (#9632) (Toru Nagashima) +* e13d439 Fix: space-in-parens crash (#9655) (Toru Nagashima) +* 92171cc Docs: Updating migration guide for single-line disable (#9385) (Justin Helmer) +* f39ffe7 Docs: remove extra punctuation from readme (#9640) (Teddy Katz) +* a015234 Fix: prefer-destructuring false positive on "super" (fixes #9625) (#9626) (Kei Ito) +* 0cf081e Update: add importNames option to no-restricted-imports (#9506) (Benjamin R Gibson) +* 332c214 Docs: Add @platinumazure to TSC (#9618) (Ilya Volodin) + +v4.11.0 - November 10, 2017 + +* d4557a6 Docs: disallow use of the comma operator using no-restricted-syntax (#9585) (薛定谔的猫) +* d602f9e Upgrade: espree v3.5.2 (#9611) (Kai Cataldo) +* 4def876 Chore: avoid handling rules instances in config-validator (#9364) (Teddy Katz) +* fe5ac7e Chore: fix incorrect comment in safe-emitter.js (#9605) (Teddy Katz) +* 6672fae Docs: Fixed a typo on lines-between-class-members doc (#9603) (Moinul Hossain) +* 980ecd3 Chore: Update copyright and license info (#9599) (薛定谔的猫) +* cc2c7c9 Build: use Node 8 in appveyor (#9595) (薛定谔的猫) +* 2542f04 Docs: Add missing options for `lines-around-comment` (#9589) (Clément Fiorio) +* b6a7490 Build: ensure fuzzer tests get run with `npm test` (#9590) (Teddy Katz) +* 1073bc5 Build: remove shelljs-nodecli (refs #9533) (#9588) (Teddy Katz) +* 7e3bf6a Fix: edge-cases of semi-style (#9560) (Toru Nagashima) +* e5a37ce Fix: object-curly-newline for flow code (#9458) (Tiddo Langerak) +* 9064b9c Chore: add equalTokens in ast-utils. (#9500) (薛定谔的猫) +* b7c5b19 Fix: Correct [object Object] output of error.data. (#9561) (Jonathan Pool) +* 51c8cf0 Docs: Disambiguate definition of Update tag (#9584) (Jonathan Pool) +* afc3c75 Docs: clarify what eslint-config-eslint is (#9582) (Teddy Katz) +* aedae9d Docs: fix spelling in valid-typeof example (#9574) (Maksim Degtyarev) +* 4c5aaf3 Docs: Fix typo in no-underscore-dangle rule (#9567) (Fabien Lucas) +* 3623600 Chore: upgrade ajv@5.3.0 (#9557) (薛定谔的猫) +* 1b606cd Chore: Remove an indirect dependency on jsonify (#9444) (Rouven Weßling) +* 4d7d7ab Update: Resolve npm installed formatters (#5900) (#9464) (Tom Erik Støwer) +* accc490 Fix: Files with no failures get "passing" testcase (#9547) (Samuel Levy) +* ab0f66d Docs: Add examples to better show rule coverage. (#9548) (Jonathan Pool) +* 88d2303 Chore: Add object-property-newline tests to increase coverage. (#9553) (Jonathan Pool) +* 7f37b1c Build: test Node 9 on Travis (#9556) (Teddy Katz) +* acccfbd Docs: Minor rephrase in `no-invalid-this`. (#9542) (Francisc) +* 8f9c0fe Docs: improve id-match usage advice (#9544) (Teddy Katz) +* a9606a3 Fix: invalid tests with super (fixes #9539) (#9545) (Teddy Katz) +* 8e1a095 Chore: enable a modified version of multiline-comment-style on codebase (#9452) (Teddy Katz) +* cb60285 Chore: remove commented test for HTML formatter (#9532) (Teddy Katz) +* 06b491e Docs: fix duplicate entries in changelog (#9530) (Teddy Katz) +* 2224733 Chore: use eslint-plugin-rulesdir instead of --rulesdir for self-linting (#9164) (Teddy Katz) +* 9cf4ebe Docs: add .md to link(for github users) (#9529) (薛定谔的猫) + +v4.10.0 - October 27, 2017 + +* bb6e60a Fix: Improve the doc for no-restricted-modules rule (fixes #9437) (#9495) (vibss2397) +* c529de9 Docs: Amend rule document to correct and complete it (refs #6251). (#9498) (Jonathan Pool) +* f9c6673 Chore: Add tests to cover array and object values and leading commas. (#9502) (Jonathan Pool) +* 9169258 Chore: remove `npm run check-commit` script (#9513) (Teddy Katz) +* 7d390b2 Docs: Revise contributor documentation on issue labels. (#9469) (Jonathan Pool) +* d80b9d0 Fix: no-var don't fix globals (fixes #9520) (#9525) (Toru Nagashima) +* b8aa071 Fix: allow linting the empty string from stdin (fixes #9515) (#9517) (Teddy Katz) +* 350a72c Chore: regex.test => string.startsWith (#9518) (薛定谔的猫) +* de0bef4 Chore: remove obsolete eslintbot templates (#9512) (Teddy Katz) +* 720b6d5 Docs: Update ISSUE_TEMPLATE.md (#9504) (薛定谔的猫) +* 2fa64b7 Fix: should not convert non-consecutive line comments to a single blo… (#9475) (薛定谔的猫) +* 9725146 Fix: multiline-comment-style fix produces invalid code (fixes #9461). (#9463) (薛定谔的猫) +* b12cff8 Fix: Expected order of jsdoc tags (fixes #9412) (#9451) (Orlando Wenzinger) +* f054ab5 Docs: add `.md` to link (for github users) (#9501) (薛定谔的猫) +* 5ed9cfc Docs: Correct violations of “Variable Declarations†in Code Conventions (#9447) (Jonathan Pool) +* 3171097 Docs: Clears confusion on usage of global and local plugins.(#9492) (Vasili Sviridov) +* 3204773 Chore: enable max-len. (#9414) (薛定谔的猫) +* 0f71fef Docs: Unquote booleans in lines-between-class-members docs (#9497) (Brandon Mills) +* b3d7532 Docs: use consistent terminology & fix link etc. (#9490) (薛定谔的猫) +* 87db8ae Docs: Fix broken links (#9488) (gpiress) +* 51bdb2f Docs: Incorrect link to related rule (#9477) (Gavin King) +* 1a962e8 Docs: Add FAQ for when ESLint cannot find plugin (#9467) (Kevin Partington) +* 8768b2d Fix: multiline-comment-style autofixer added trailing space (#9454) (Teddy Katz) +* e830aa1 Fix: multiline-comment-style reports block comments followed by code (#9450) (Teddy Katz) +* b12e5fe Docs: Repair broken links and add migration links. (#9473) (Jonathan Pool) +* eca01ed Docs: Add missing info about special status of home-dir config files. (#9472) (Jonathan Pool) +* eb8cfb1 Fix: change err report in constant condition (fixes #9398) (#9436) (Victor Hom) +* da77eb4 Chore: Revise no-config-file test to prevent false failure. (#9443) (Jonathan Pool) +* 47e5f6f Docs: ensure "good commit message" examples actually follow guidelines (#9466) (Teddy Katz) +* ebb530d Update: Don't ignore comments (no-trailing-spaces) (#9416) (Chris van Marle) +* 5012661 Build: fix `npm run profile` script (fixes #9397) (#9455) (Teddy Katz) +* ecac0fd Docs: Remove blockBindings references (#9446) (Jan Pilzer) +* 0b89865 Chore: ensure tests for internal rules get run (#9453) (Teddy Katz) +* 052c504 Docs: suggest deleting branches after merging PRs (#9449) (Teddy Katz) +* b31e55a Chore: move internal rules out of lib/ (#9448) (Teddy Katz) +* a7521e3 Docs: improve examples for multiline-comment-style (#9440) (Teddy Katz) + +v4.9.0 - October 14, 2017 + +* 85388fb Fix: Correct error and test messages to fit config search path (#9428) (Jonathan Pool) +* 62a323c Fix: Add class options for `lines-around-comment` (fixes #8564) (#8565) (Ed Lee) +* 8eb4aae New: multiline-comment-style rule (fixes #8320) (#9389) (薛定谔的猫) +* db41408 Chore: avoid applying eslint-env comments twice (#9278) (Teddy Katz) +* febb897 Chore: avoid loose equality assertions (#9415) (Teddy Katz) +* 2247efa Update: Add FunctionExpression to require-jsdoc (fixes #5867) (#9395) (Kai Cataldo) +* 6791d18 Docs: Corrected noun to verb. (#9438) (Jonathan Pool) +* b02fbb6 Update: custom messages for no-restricted-* (refs #8400) (Maja Wichrowska) +* 02732bd Docs: Reorganized to avoid misunderstandings. (#9434) (Jonathan Pool) +* d9466b8 Docs: Correct time forecast for tests. (#9432) (Jonathan Pool) +* f7ed84f Docs: Add instruction re home-directory config files (refs #7729) (#9426) (Jonathan Pool) +* 30d018b Chore: Add Aladdin-ADD & VictorHom to README (#9424) (Kai Cataldo) +* 2d8a303 Docs: fix examples for prefer-numeric-literals (#9155) (Lutz Lengemann) +* d7610f5 Docs: Add jquery warning to prefer-destructuring (#9409) (Thomas Grainger) +* e835dd1 Docs: clarify no-mixed-operators (fixes #8051) (Ruxandra Fediuc) +* 51360c8 Docs: update block-spacing details (fixes #8743) (#9375) (Victor Hom) +* 6767857 Update: fix ignored nodes in indent rule when using tabs (fixes #9392) (#9393) (Robin Houston) +* 37dde77 Chore: Refactor SourceCode#getJSDocComment (#9403) (Kai Cataldo) +* 9fedd51 Chore: Add missing space in blog post template (#9407) (Kevin Partington) +* 7654c99 Docs: add installing prerequisites in readme. (#9401) (薛定谔的猫) +* 786cc73 Update: Add "consistent" option to array-bracket-newline (fixes #9136) (#9206) (Ethan Rutherford) +* e171f6b Docs: add installing prerequisites. (#9394) (薛定谔的猫) +* 74dfc87 Docs: update doc for class-methods-use-this (fixes #8910) (#9374) (Victor Hom) +* b4a9dbf Docs: show console call with no-restricted-syntax (fixes #7806) (#9376) (Victor Hom) +* 8da525f Fix: recognise multiline comments as multiline arrays (fixes #9211) (#9369) (Phil Quinn) +* c581b77 Chore: Error => TypeError (#9390) (薛定谔的猫) +* ee99876 New: lines-between-class-members rule (fixes #5949) (#9141) (薛定谔的猫) +* 9d3f5ad Chore: report unused eslint-disable directives in ESLint codebase (#9371) (Teddy Katz) +* 1167638 Update: add allowElseIf option to no-else-return (fixes #9228) (#9229) (Thomas Grainger) +* 4567ab1 New: Add the fix-dry-run flag (fixes #9076) (#9073) (RafaÅ‚ RuciÅ„ski) + +v4.8.0 - September 29, 2017 + +* 3f2b908 New: add option to report unused eslint-disable directives (fixes #9249) (#9250) (Teddy Katz) +* ff2be59 Fix: dot notation rule failing to catch string template (fixes #9350) (#9357) (Phil Quinn) +* b1372da Chore: remove sourceCode property from Linter (refs #9161) (#9363) (Teddy Katz) +* cef6f8c Docs: remove line about removing rules from semver policy (#9367) (Teddy Katz) +* 06efe87 Fix: Add meta element with charset attribute. (#9365) (H1Gdev) +* 458ca67 Docs: update architecture page (fixes #9337) (#9345) (Victor Hom) +* 1c6bc67 Fix: special EventEmitter keys leak information about other rules (#9328) (Teddy Katz) +* d593e61 Docs: update eslint.org links to use https (#9358) (Teddy Katz) +* 38d0cb2 Fix: fix wrong code-path about try-for-in (fixes #8848) (#9348) (Toru Nagashima) +* 434d9e2 Fix: Invalid font-size property value issue. (#9341) (H1Gdev) +* a7668c2 Chore: Remove unnecessary slice from logging utility (#9343) (Gyandeep Singh) +* 2ff6fb6 Chore: remove unused arguments in codebase (#9340) (Teddy Katz) + +v4.7.2 - September 21, 2017 + +* 4f87732 Fix: Revert setting node.parent early (fixes #9331) (#9336) (Teddy Katz) + +v4.7.1 - September 18, 2017 + +* 08656db Fix: Handle nested disable directive correctly (fixes #9318) (#9322) (Gyandeep Singh) +* 9226495 Revert "Chore: rewrite parseListConfig for a small perf gain." (#9325) (薛定谔的猫) + +v4.7.0 - September 15, 2017 + +* 787b78b Upgrade: Espree v3.5.1 (fixes #9153) (#9314) (Brandon Mills) +* 1488b51 Update: run rules after `node.parent` is already set (fixes #9122) (#9283) (Teddy Katz) +* 4431d68 Docs: fix wrong config in max-len example. (#9309) (薛定谔的猫) +* 7d24dde Docs: Fix code snippet to refer to the correct option (#9313) (Ruben Tytgat) +* 12388d4 Chore: rewrite parseListConfig for a small perf gain. (#9300) (薛定谔的猫) +* ce1f084 Update: fix MemberExpression handling in no-extra-parens (fixes #9156) (jackyho112) +* 0c720a3 Update: allow autofixing when using processors (fixes #7510) (#9090) (Teddy Katz) +* 838df76 Chore: upgrade deps. (#9289) (薛定谔的猫) +* f12def6 Update: indent flatTernary option to handle `return` (fixes #9285) (#9296) (Teddy Katz) +* e220687 Fix: remove autofix for var undef inits (fixes #9231) (#9288) (Victor Hom) +* 002e199 Docs: fix no-restricted-globals wrong config. (#9305) (薛定谔的猫) +* fcfe91a Docs: fix wrong config in id-length example. (#9303) (薛定谔的猫) +* 2731f94 Update: make newline-per-chained-call fixable (#9149) (João Granado) +* 61f1093 Chore: avoid monkeypatching Linter instances in RuleTester (#9276) (Teddy Katz) +* 28929cb Chore: remove Linter#reset (refs #9161) (#9268) (Teddy Katz) +* abc8634 Build: re-run browserify when generating site (#9275) (Teddy Katz) +* 7685fed Fix: IIFE and arrow functions in no-invalid-this (fixes #9126) (#9258) (Toru Nagashima) +* 2b1eba2 Chore: enable eslint-plugin/no-deprecated-context-methods (#9279) (Teddy Katz) +* 981f933 Fix: reuse the AST of source code object in verify (#9256) (Toru Nagashima) +* cd698ba Docs: move RuleTester documentation to Node.js API page (#9273) (Teddy Katz) +* 4ae7ad3 Docs: fix inaccuracy in `npm run perf` description (#9274) (Teddy Katz) +* cad45bd Docs: improve documentation for rule contexts (#9272) (Teddy Katz) +* 3b0c6fd Chore: remove extraneous linter properties (refs #9161) (#9267) (Teddy Katz) +* c3231b3 Docs: Fix typo in array-bracket-newline.md (#9269) (宋文强) +* 51132d6 Fix: Formatters keep trailing '.' if preceded by a space (fixes #9154) (#9247) (i-ron-y) +* 88d5d4d Chore: remove undocumented Linter#markVariableAsUsed method (refs #9161) (#9266) (Teddy Katz) +* 09414cf Chore: remove internal Linter#getDeclaredVariables method (refs #9161) (#9264) (Teddy Katz) +* f31f59d Chore: prefer smaller scope for variables in codebase (#9265) (Teddy Katz) +* 3693e4e Chore: remove undocumented Linter#getScope method (#9253) (Teddy Katz) +* 5d7eb81 Chore: refactor config hash caching in CLIEngine (#9260) (Teddy Katz) +* 1a76c4d Chore: remove SourceCode passthroughs from Linter.prototype (refs #9161) (#9263) (Teddy Katz) +* 40ae27b Chore: avoid relying on Linter#getScope/markVariableAsUsed in tests (#9252) (Teddy Katz) +* b383d81 Chore: make executeOnFile a pure function in CLIEngine (#9262) (Teddy Katz) +* 5e0e579 Chore: avoid internal SourceCode methods in Linter tests (refs #9161) (#9223) (Teddy Katz) +* adab827 Chore: remove unused eslint-disable comment (#9251) (Teddy Katz) +* 31e4ec8 Chore: use consistent names for apply-disable-directives in tests (#9246) (Teddy Katz) +* 7ba46e6 Fix: shebang error in eslint-disable-new-line; add tests (fixes #9238) (#9240) (i-ron-y) +* 8f6546c Chore: remove undocumented defaults() method (refs #9161) (#9237) (Teddy Katz) +* 82d8b73 Docs: Fix error in example code for sort-imports (fixes #8734) (#9245) (i-ron-y) +* a32ec36 Update: refactor eslint-disable comment processing (#9216) (Teddy Katz) +* 583f0b8 Chore: avoid using globals in CLIEngine tests (#9242) (Teddy Katz) +* c8bf687 Chore: upgrade eslint-plugin-eslint-plugin@1.0.0 (#9234) (薛定谔的猫) +* 3c41a05 Chore: always normalize rules to new API in rules.js (#9236) (Teddy Katz) +* c5f4227 Chore: move logic for handling missing rules to rules.js (#9235) (Teddy Katz) +* bf1e344 Chore: create report translators lazily (#9221) (Teddy Katz) +* 2eedc1f Chore: remove currentFilename prop from Linter instances (refs #9161) (#9219) (Teddy Katz) +* 5566e94 Docs: Replace misleading CLA links (#9133) (#9232) (i-ron-y) +* c991630 Chore: remove ConfigOps.normalize in favor of ConfigOps.getRuleSeverity (#9224) (Teddy Katz) +* 171962a Chore: remove internal Linter#getAncestors helper (refs #9161) (#9222) (Teddy Katz) +* a567499 Chore: avoid storing list of problems on Linter instance (refs #9161) (#9214) (Teddy Katz) +* ed6d088 Chore: avoid relying on undocumented Linter#getFilename API in tests (#9218) (Teddy Katz) + +v4.6.1 - September 3, 2017 + +* bdec46d Build: avoid process leak when generating website (#9217) (Teddy Katz) +* cb74b87 Fix: avoid adding globals when an env is used with `false` (fixes #9202) (#9203) (Teddy Katz) +* f9b7544 Docs: Correct a typo in generator-star-spacing documentation (#9205) (Ethan Rutherford) +* e5c5e83 Build: Fixing issue with docs generation (Fixes #9199) (#9200) (Ilya Volodin) + +v4.6.0 - September 1, 2017 + +* 56dd769 Docs: fix link format in prefer-arrow-callback.md (#9198) (Vse Mozhet Byt) +* 6becf91 Update: add eslint version to error output. (fixes #9037) (#9071) (薛定谔的猫) +* 0e09973 New: function-paren-newline rule (fixes #6074) (#8102) (Teddy Katz) +* 88a64cc Chore: Make parseJsonConfig() a pure function in Linter (#9186) (Teddy Katz) +* 1bbac51 Fix: avoid breaking eslint-plugin-eslint-comments (fixes #9193) (#9196) (Teddy Katz) +* 3e8b70a Fix: off-by-one error in eslint-disable comment checking (#9195) (Teddy Katz) +* 73815f6 Docs: rewrite prefer-arrow-callback documentation (fixes #8950) (#9077) (Charles E. Morgan) +* 0d3a854 Chore: avoid mutating report descriptors in report-translator (#9189) (Teddy Katz) +* 2db356b Update: no-unused-vars Improve message to include the allowed patterns (#9176) (Eli White) +* 8fbaf0a Update: Add configurability to generator-star-spacing (#8985) (Ethan Rutherford) +* 8ed779c Chore: remove currentScopes property from Linter instances (refs #9161) (#9187) (Teddy Katz) +* af4ad60 Fix: Handle error when running init without npm (#9169) (Gabriel Aumala) +* 4b94c6c Chore: make parse() a pure function in Linter (refs #9161) (#9183) (Teddy Katz) +* 1be5634 Chore: don't make Linter a subclass of EventEmitter (refs #9161) (#9177) (Teddy Katz) +* e95af9b Chore: don't include internal test helpers in npm package (#9160) (Teddy Katz) +* 6fb32e1 Chore: avoid using private Linter APIs in astUtils tests (refs #9161) (#9173) (Teddy Katz) +* de6dccd Docs: add documentation for Linter methods (refs #6525) (#9151) (Teddy Katz) +* 2d90030 Chore: remove unused assignment. (#9182) (薛定谔的猫) +* d672aef Chore: refactor reporting logic (refs #9161) (#9168) (Teddy Katz) +* 5ab0434 Fix: indent crash on sparse arrays with "off" option (fixes #9157) (#9166) (Teddy Katz) +* c147b97 Chore: Make SourceCodeFixer accept text instead of a SourceCode instance (#9178) (Teddy Katz) +* f127423 Chore: avoid using private Linter APIs in Linter tests (refs #9161) (#9175) (Teddy Katz) +* 2334335 Chore: avoid using private Linter APIs in SourceCode tests (refs #9161) (#9174) (Teddy Katz) +* 2dc243a Chore: avoid using internal Linter APIs in RuleTester (refs #9161) (#9172) (Teddy Katz) +* d6e436f Fix: no-extra-parens reported some parenthesized IIFEs (fixes #9140) (#9158) (Teddy Katz) +* e6b115c Build: Add an edit link to the rule docs’ metadata (#9049) (Jed Fox) +* fcb7bb4 Chore: avoid unnecessarily complex forEach calls in no-extra-parens (#9159) (Teddy Katz) +* ffa021e Docs: quotes rule - when does \n require backticks (#9135) (avimar) +* 60c5148 Chore: improve coverage in lib/*.js (#9130) (Teddy Katz) + +v4.5.0 - August 18, 2017 + +* decdd2c Update: allow arbitrary nodes to be ignored in `indent` (fixes #8594) (#9105) (Teddy Katz) +* 79062f3 Update: fix indentation of multiline `new.target` expressions (#9116) (Teddy Katz) +* d00e24f Upgrade: `chalk` to 2.x release (#9115) (Stephen Edgar) +* 6ef734a Docs: add missing word in processor documentation (#9106) (Teddy Katz) +* a4f53ba Fix: Include files with no messages in junit results (#9093) (#9094) (Sean DuBois) +* 1d6a9c0 Chore: enable eslint-plugin/test-case-shorthand-strings (#9067) (薛定谔的猫) +* f8add8f Fix: don't autofix with linter.verifyAndFix when `fix: false` is used (#9098) (Teddy Katz) +* 77bcee4 Docs: update instructions for adding TSC members (#9086) (Teddy Katz) +* bd09cd5 Update: avoid requiring NaN spaces of indentation (fixes #9083) (#9085) (Teddy Katz) +* c93a853 Chore: Remove extra space in blogpost template (#9088) (Kai Cataldo) + +v4.4.1 - August 7, 2017 + +* ec93614 Fix: no-multi-spaces to avoid reporting consecutive tabs (fixes #9079) (#9087) (Teddy Katz) + +v4.4.0 - August 5, 2017 + +* 89196fd Upgrade: Espree to 3.5.0 (#9074) (Gyandeep Singh) +* b3e4598 Fix: clarify AST and don't use `node.start`/`node.end` (fixes #8956) (#8984) (Toru Nagashima) +* 62911e4 Update: Add ImportDeclaration option to indent rule (#8955) (David Irvine) +* de75f9b Chore: enable object-curly-newline & object-property-newline.(fixes #9042) (#9068) (薛定谔的猫) +* 5ae8458 Docs: fix typo in object-shorthand.md (#9066) (Jon Berry) +* c3d5b39 Docs: clarify options descriptions (fixes #8875) (#9060) (Brandon Mailhiot) +* 37158c5 Docs: clarified behavior of globalReturn option (fixes #8953) (#9058) (Brandon Mailhiot) +* c2f3553 Docs: Update example for MemberExpression option of indent (fixes #9056) (#9057) (Jeff) +* 78a85e0 Fix: no-extra-parens incorrectly reports async function expressions (#9035) (薛定谔的猫) +* c794f86 Fix: getter-return reporting method named 'get' (fixes #8919) (#9004) (薛定谔的猫) +* d0f78ec Docs: update rule deprecation policy (fixes #8635) (#9033) (Teddy Katz) +* 5ab282f Fix: Print error message in bin/eslint.js (fixes #9011) (#9041) (Victor Hom) +* 50e3cf3 Docs: Update sort-keys doc to define natural ordering (fixes #9043) (#9045) (Karan Sharma) +* 7ecfe6a Chore: enable eslint-plugin/test-case-property-ordering (#9040) (薛定谔的猫) +* ad32697 Upgrade: js-yaml to 3.9.1 (refs #9011) (#9044) (Teddy Katz) +* 66c1d43 Docs: Create SUPPORT.md (#9031) (Teddy Katz) +* 7247b6c Update: handle indentation of custom destructuring syntax (fixes #8990) (#9027) (Teddy Katz) +* cdb82f2 Fix: padding-line-between-statements crash on semicolons after blocks (#8748) (Alexander Madyankin) +* 3141872 Chore: remove unnecessary eslint-disable comments in codebase (#9032) (Teddy Katz) +* 0f97279 Fix: refactor no-multi-spaces to avoid regex backtracking (fixes #9001) (#9008) (Teddy Katz) +* b74514d Fix: refactor RuleContext to not modify report locations (fixes #8980) (#8997) (Teddy Katz) +* 31d7fd2 Fix: inconsistent `indent` behavior on computed properties (fixes #8989) (#8999) (Teddy Katz) +* 3393894 Fix: avoid reporting the entire AST for missing rules (#8998) (Teddy Katz) +* b3b95b8 Chore: enable additional rules on ESLint codebase (#9013) (Teddy Katz) +* 9b6c552 Upgrade: eslint-plugin-eslint-plugin@0.8.0 (#9012) (薛定谔的猫) +* acbe86a Chore: disallow .substr and .substring in favor of .slice (#9010) (Teddy Katz) +* d0536d6 Chore: Optimizes adding Linter methods (fixes #9000) (#9007) (Sean C Denison) +* 0a0401f Chore: fix spelling error. (#9003) (薛定谔的猫) +* 3d020b9 Update: emit a warning for ecmaFeatures rather than throwing an error (#8974) (Teddy Katz) +* d2f8f9f Fix: include name of invalid config in validation messages (fixes #8963) (#8973) (Teddy Katz) +* c3ee46b Chore: fix misleading comment in RuleTester (#8995) (Teddy Katz) + +v4.3.0 - July 21, 2017 + +* 91dccdf Update: support more options in prefer-destructuring (#8796) (Victor Hom) +* 3bebcfd Update: Support generator yields in no constant condition (#8762) (Victor Hom) +* 96df8c9 Fix: Handle fixing objects containing comments (fixes #8484) (#8944) (Brian Schemp) +* e39d41d Docs: Make `peerDependencies` package.json snippet valid JSON (#8971) (Sam Adams) +* a5fd101 Fix: duplicated error message if a crash occurs (fixes #8964) (#8965) (Teddy Katz) +* f8d122c Docs: trailing commas not allowed in json (#8969) (Scott Fletcher) +* d09288a Chore: Use `output: null` to assert that a test case is not autofixed. (#8960) (薛定谔的猫) +* e639358 Update: add question to confirm downgrade (fixes #8870) (#8911) (Toru Nagashima) +* 601039d Docs: fix badge in eslint-config-eslint readme (#8954) (Teddy Katz) +* 3c231fa Update: add enforceInMethodNames to no-underscore-dangle (fixes #7065) (#7234) (Gabriele Petronella) +* 128591f Update: prefer-numeric-literals warns Number.parseInt (fixes #8913) (#8929) (Kevin Partington) +* 846f8b1 Docs: Clarified that core PRs require issue in maintainer guide (#8927) (Kevin Partington) +* 55bc35d Fix: Avoid shell mangling during eslint --init (#8936) (Anders Kaseorg) +* 10c3d78 Chore: fix misleading `indent` test (#8925) (Teddy Katz) +* fb8005d Update: no-restricted-globals custom error messages (fixes #8315) (#8932) (Kevin Partington) +* a747b6f Chore: make minor improvements to `indent` internals (#8947) (Teddy Katz) +* 1ea3723 Update: fix indentation of parenthesized MemberExpressions (fixes #8924) (#8928) (Teddy Katz) +* 9abc6f7 Update: fix BinaryExpression indentation edge case (fixes #8914) (#8930) (Teddy Katz) +* 0e90453 Docs: Fixing broken cyclomatic complexity link (fixes #8396) (#8937) (Chris Bargren) +* a8a8350 Chore: improve performance of `indent` rule (#8905) (Teddy Katz) +* 764b2a9 Chore: update header info in `indent` (#8926) (Teddy Katz) +* 597c217 Fix: confusing error if plugins from config is not an array (#8888) (Calvin Freitas) +* 3c1dd6d Docs: add description of no-sync `allowAtRootLevel` option (fixes #8902) (#8906) (Teddy Katz) +* 933a9cf Chore: add a fuzzer to detect bugs in core rules (#8422) (Teddy Katz) +* 45f8cd9 Docs: fix verifyAndFix result property name (#8903) (Tino Vyatkin) +* 1a89e1c Docs: Fix always-multiline example in multiline-ternary docs (#8904) (Nathan Woltman) + +v4.2.0 - July 8, 2017 + +* e0f0101 Update: fix indentation of nested function parameters (fixes #8892) (#8900) (Teddy Katz) +* 9f95a3e Chore: remove unused helper method from `indent` (#8901) (Teddy Katz) +* 11ffe6b Fix: no-regex-spaces rule incorrectly fixes quantified spaces (#8773) (Keri Warr) +* 975dacf Update: fix indentation of EmptyStatements (fixes #8882) (#8885) (Teddy Katz) +* 88ed041 Build: Turnoff CI branch build (fixes #8804) (#8873) (Gyandeep Singh) +* 72f22eb Chore: replace is-my-json-valid with Ajv (#8852) (Gajus Kuizinas) +* 7c8de92 Docs: Clarified PR guidelines in maintainer guide (#8876) (Kevin Partington) +* d1fc408 Docs: Update CLA link in Contributing docs (#8883) (Calvin Freitas) +* 931a9f1 Fix: indent false positive with multi-line await expression (#8837) (薛定谔的猫) +* 3767cda Update: add no-sync option to allow at root level (fixes #7985) (#8859) (Victor Hom) +* 1ce553d Docs: Fix wording of minProperties in object-curly-newline (fixes #8874) (#8878) (solmsted) +* f00854e Fix: --quiet no longer fixes warnings (fixes #8675) (#8858) (Kevin Partington) +* b678535 Chore: Add collapsible block for config in ISSUE_TEMPLATE (#8872) (Gyandeep Singh) +* 1f5bfc2 Update: Add always-multiline option to multiline-ternary (fixes #8770) (#8841) (Nathan Woltman) +* 22116f2 Fix: correct comma-dangle JSON schema (#8864) (Evgeny Poberezkin) +* 676af9e Update: fix indentation of JSXExpressionContainer contents (fixes #8832) (#8850) (Teddy Katz) +* 330dd58 Chore: fix title of linter test suite (#8861) (Teddy Katz) +* 60099ed Chore: enable for-direction rule on ESLint codebase (#8853) (薛定谔的猫) +* e0d1a84 Chore: upgrade eslint-plugin-eslint-plugin & eslint-plugin-node (#8856) (薛定谔的猫) +* 0780d86 Chore: remove identical tests (#8851) (Teddy Katz) +* 5c3ac8e Fix: arrow-parens fixer gets tripped up with trailing comma in args (#8838) (薛定谔的猫) +* c4f2e29 Build: fix race condition in demo (#8827) (Teddy Katz) +* c693be5 New: Allow passing a function as `fix` option (fixes #8039) (#8730) (Ian VanSchooten) +* 8796d55 Docs: add missing item to 4.0 migration guide table of contents (#8835) (薛定谔的猫) +* 742998c doc md update: false -> `false` (#8825) (Erik Vold) +* ce969f9 Docs: add guidelines for patch release communication (fixes #7277) (#8823) (Teddy Katz) +* 5c83c99 Docs: Clarify arrow function parens in no-extra-parens (fixes #8741) (#8822) (Kevin Partington) +* 84d921d Docs: Added note about Node/CJS scoping to no-redeclare (fixes #8814) (#8820) (Kevin Partington) +* 85c9327 Update: fix parenthesized CallExpression indentation (fixes #8790) (#8802) (Teddy Katz) +* be8d354 Update: simplify variable declarator indent handling (fixes #8785) (#8801) (Teddy Katz) +* 9417818 Fix: no-debugger autofixer produced invalid syntax (#8806) (Teddy Katz) +* 8698a92 New: getter-return rule (fixes #8449) (#8460) (薛定谔的猫) +* eac06f2 Fix: no-extra-parens false positives for variables called "let" (#8808) (Teddy Katz) +* 616587f Fix: dot-notation autofix produces syntax errors for object called "let" (#8807) (Teddy Katz) +* a53ef7e Fix: don't require a third argument in linter.verifyAndFix (fixes #8805) (#8809) (Teddy Katz) +* 5ad8b70 Docs: add minor formatting improvement to paragraph about parsers (#8816) (Teddy Katz) + +v4.1.1 - June 25, 2017 + +* f307aa0 Fix: ensure configs from a plugin are cached separately (fixes #8792) (#8798) (Teddy Katz) +* 8b48ae8 Docs: Add doc on parser services (fixes #8390) (#8795) (Victor Hom) +* 0d041e7 Fix: avoid crashing when using baseConfig with extends (fixes #8791) (#8797) (Teddy Katz) +* 03213bb Chore: improve comment explanation of `indent` internal functions (#8800) (Teddy Katz) +* d2e88ed Chore: Fix misleading comment in ConfigCache.js (#8799) (Teddy Katz) + +v4.1.0 - June 23, 2017 + +* e8f1362 Docs: Remove wrong descriptions in `padded-block` rule (#8783) (Plusb Preco) +* 291a783 Update: `enforceForArrowConditionals` to `no-extra-parens` (fixes #6196) (#8439) (Evilebot Tnawi) +* a21dd32 New: Add `overrides`/`files` options for glob-based config (fixes #3611) (#8081) (Sylvan Mably) +* 879688c Update: Add ignoreComments option to no-trailing-spaces (#8061) (Jake Roussel) +* b58ae2e Chore: Only instantiate fileEntryCache when cache flage set (perf) (#8763) (Gyandeep Singh) +* 9851288 Update: fix indent errors on multiline destructure (fixes #8729) (#8756) (Victor Hom) +* 3608f06 Docs: Increase visibility of code of conduct (fixes #8758) (#8764) (Kai Cataldo) +* 673a58b Update: support multiple fixes in a report (fixes #7348) (#8101) (Toru Nagashima) +* 7a1bc38 Fix: don't pass default parserOptions to custom parsers (fixes #8744) (#8745) (Teddy Katz) +* c5b4052 Chore: enable computed-property-spacing on ESLint codebase (#8760) (Teddy Katz) +* 3419f64 Docs: describe how to use formatters on the formatter demo page (#8754) (Teddy Katz) +* a3ff8f2 Chore: combine tests in tests/lib/eslint.js and tests/lib/linter.js (#8746) (Teddy Katz) +* b7cc1e6 Fix: Space-infix-ops should ignore type annotations in TypeScript (#8341) (Reyad Attiyat) +* 46e73ee Fix: eslint --init installs wrong dependencies of popular styles (fixes #7338) (#8713) (Toru Nagashima) +* a82361b Chore: Prevent package-lock.json files from being created (fixes #8742) (#8747) (Teddy Katz) +* 5f81a68 New: Add eslintIgnore support to package.json (fixes #8458) (#8690) (Victor Hom) +* b5a70b4 Update: fix multiline binary operator/parentheses indentation (#8719) (Teddy Katz) +* ab8b016 Update: fix MemberExpression indentation with "off" option (fixes #8721) (#8724) (Teddy Katz) +* eb5d12c Update: Add Fixer method to Linter API (#8631) (Gyandeep Singh) +* 26a2daa Chore: Cache fs reads in ignored-paths (fixes #8363) (#8706) (Victor Hom) + +v4.0.0 - June 11, 2017 + +* 4aefb49 Chore: avoid using deprecated rules on ESLint codebase (#8708) (Teddy Katz) +* 389feba Chore: upgrade deps. (#8684) (薛定谔的猫) +* 3da7b5e Fix: Semi-Style only check for comments when tokens exist (fixes #8696) (#8697) (Reyad Attiyat) +* 3cfe9ee Fix: Add space between async and param on fix (fixes #8682) (#8693) (Reyad Attiyat) +* c702858 Chore: enable no-multiple-empty-lines on ESLint codebase (#8694) (Teddy Katz) +* 34c4020 Update: Add support for parens on left side for-loops (fixes: #8393) (#8679) (Victor Hom) +* 735cd09 Docs: Correct the comment in an example for `no-mixed-requires` (#8686) (Fangzhou Li) +* 026f048 Chore: remove dead code from prefer-const (#8683) (Teddy Katz) + +v4.0.0-rc.0 - June 2, 2017 + +* 0058b0f8 Update: add --fix to no-debugger (#8660) (薛定谔的猫) +* b4daa225 Docs: Note to --fix option for strict rule (#8680) (Vitaliy Potapov) +* 4df33e7c Chore: check for root:true in project sooner (fixes #8561) (#8638) (Victor Hom) +* c9b980ce Build: Add Node 8 on travis (#8669) (Gyandeep Singh) +* 95248336 Fix: Don't check object destructing in integer property (fixes #8654) (#8657) (flowmemo) +* c4ac969c Update: fix parenthesized ternary expression indentation (fixes #8637) (#8649) (Teddy Katz) +* 4f2f9fcb Build: update license checker to allow LGPL (fixes #8647) (#8652) (Teddy Katz) +* b0c83bd1 Docs: suggest pushing new commits to a PR instead of amending (#8632) (Teddy Katz) +* d0e9fd2d Fix: Config merge to correctly account for extends (fixes #8193) (#8636) (Gyandeep Singh) +* 705d88f7 Docs: Update CLA link on Pull Requests page (#8642) (Teddy Katz) +* 794d4d6c Docs: missing paren on readme (#8640) (Dan Beam) +* 7ebd9d6f New: array-element-newline rule (fixes #6075) (#8375) (Jan Peer Stöcklmair) +* f62cff66 Chore: Remove dependency to user-home (fixes #8604) (#8629) (Pavol Madar) +* 936bc174 Docs: Add missing documentation for scoped modules in sharable config developer-guide (#8610) (Jonathan Samines) + +v4.0.0-beta.0 - May 19, 2017 + +* 2f7015b6 New: semi-style rule (fixes #8169) (#8542) (Toru Nagashima) +* 1eaef580 Revert "Breaking: Traverse into type annotations (fixes #7129) (#8365)" (#8584) (Kai Cataldo) +* eb14584a Fix: no-unneeded-ternary change code behavior after fix (fixes #8507) (#8624) (Jan Peer Stöcklmair) +* 3ec436ee Breaking: New Linter API (fixes #8454) (#8465) (Gyandeep Singh) +* 3fc9653a Fix: Call expression consistency in variable declaration (fixes #8607) (#8619) (Reyad Attiyat) +* 5b6093ef Docs: Remove .eslintignore reference to transpiled file filtering (#8622) (Alex Summer) +* 729bbcdb Chore: Fix lgtm alerts. (#8611) (Max Schaefer) +* 3418479a Update: improve indent of `flatTernaryExpressions` (fixes #8481) (#8587) (Toru Nagashima) +* 268d52ef Update: Use sane defaults for JSX indentation (fixes #8425) (#8593) (Teddy Katz) +* d21f5283 Chore: make shelljs a devDependency instead of a dependency (#8608) (Teddy Katz) +* 11493781 Docs: Rephrase in about section (#8609) (Sudarsan G P) +* 23401626 Chore: remove strip-bom dependency (refs #8603) (#8606) (Teddy Katz) +* a93a2f95 New: padding-line-between-statements rule (fixes #7356) (#8099) (Toru Nagashima) +* 0ef09ea0 New: for-direction rule (fixes #8387) (#8519) (薛定谔的猫) +* a73e6c09 Fix: Fix failing uknown node test since #8569 indents class bodies (#8588) (Reyad Attiyat) +* c6c639d6 Fix: Ignore unknown nodes for Indent rule (fixes #8440) (#8504) (Reyad Attiyat) +* df17bc87 Fix: object-shorthand crash on some computed keys (fixes #8576) (#8577) (Teddy Katz) +* 482d5720 New: switch-colon-spacing rule (fixes #7981) (#8540) (Toru Nagashima) +* afa35c68 Update: check allman-style classes correctly in indent (fixes #8493) (#8569) (Teddy Katz) +* de0b4ad7 Fix: Indent Ignore Variable Declaration init operator (fixes #8546) (#8563) (Reyad Attiyat) +* 927ca0dc Fix: invalid syntax from prefer-arrow-callback autofixer (fixes #8541) (#8555) (Teddy Katz) +* 25db3d22 Chore: avoid skipping test for env overrides (refs #8291) (#8556) (Teddy Katz) +* 456f519b Update: make indent MemberExpression handling more robust (fixes #8552) (#8554) (Teddy Katz) +* 873310e5 Fix: run no-unexpected-multiline only if needed (fixes #8550) (#8551) (Ruben Bridgewater) +* 833a0cad Fix: confusing RuleTester error message when options is not an array (#8557) (Teddy Katz) + +v4.0.0-alpha.2 - May 5, 2017 + +* 74ab344 Update: check allman-style blocks correctly in indent rule (fixes #8493) (#8499) (Teddy Katz) +* f6256d4 Update: no-extend-native checks global scope refs only (fixes #8461) (#8528) (Kevin Partington) +* b463045 Docs: add typescript-eslint-parser (#8388) (#8534) (薛定谔的猫) +* 99c56d5 Update: handle multiline parents consistently in indent (fixes #8455) (#8498) (Teddy Katz) +* cf940c6 Update: indent `from` tokens in import statements (fixes #8438) (#8466) (Teddy Katz) +* 0a9a90f Fix: max-len doesn't allow comments longer than code (#8532) (Ken Gregory) +* 734846b Breaking: validate eslintrc properties (fixes #8213) (#8295) (alberto) +* 025e97a Chore: delete duplicated test. (#8527) (薛定谔的猫) +* 6a333ff Upgrade: espree@^3.4.2 (#8526) (Kevin Partington) +* e52d998 Docs: Configuring Cascading and Hierarchy example correction (#8512) (Cheong Yip) +* e135aa5 Docs: Correct code of conduct link on Readme.md (#8517) (Zander Mackie) +* 37e3ba1 Chore: Add license report and scan status (#8503) (Kevin Wang) +* afbea78 Chore: don't pull default options from eslint:recommended (fixes #8374) (#8381) (Teddy Katz) +* d49acc3 Update: fix no-self-compare false negative on non-literals (fixes #7677) (#8492) (Teddy Katz) +* aaa1a81 Fix: avoid creating extra whitespace in brace-style fixer (fixes #7621) (#8491) (Teddy Katz) +* 9c3da77 Docs: list another related rule in no-undefined (#8467) (Ethan) +* f987814 Docs: Update CHANGELOG.md for v4.0.0-alpha.1 release (#8488) (Kai Cataldo) + +v4.0.0-alpha.1 - April 21, 2017 + +* b0dadfe3 Docs: Update comments section of Migrating to v4.0.0 (#8486) (Kai Cataldo) +* b337738f Update: Add `consistent` option to `object-curly-newline` (fixes #6488) (#7720) (Evilebot Tnawi) +* 53fefb3b Update: add fix for no-confusing-arrow (#8347) (Mordy Tikotzky) +* 735d02d5 Update: Deprecate sourceCode.getComments() (fixes #8408) (#8434) (Kai Cataldo) +* ac39e3b0 Update: no-unexpected-multiline to flag confusing division (fixes #8469) (#8475) (Teddy Katz) +* e35107f0 Fix: indent crash on arrow functions without parens at start of line (#8477) (Teddy Katz) +* 973adeb6 Docs: State that functions option only applies in ES2017 (fixes #7809) (#8468) (Thenaesh Elango) +* 7bc6fe0a New: array-bracket-newline rule (#8314) (Jan Peer Stöcklmair) +* 10a1a2d7 Chore: Do not use cache when testing (#8464) (Kai Cataldo) +* 9f540fd2 Update: no-unused-vars false negative about destructuring (fixes #8442) (#8459) (Toru Nagashima) +* 741ed393 Docs: Clarify how to run local ESLint installation (#8463) (Kai Cataldo) +* fac53890 Breaking: Remove array-callback-return from recommended (fixes #8428) (#8433) (Kai Cataldo) +* 288c96c1 Upgrade: dependencies (#8304) (alberto) +* 48700fc8 Docs: Remove extra header line from LICENSE (#8448) (Teddy Katz) +* 161ee4ea Chore: avoid cloning comments array in TokenStore (#8436) (Teddy Katz) +* 0c2a386e Docs: clarify new indent behavior with MemberExpressions (#8432) (Teddy Katz) +* 446b8876 Docs: update space-before-function-paren docs for 4.0 (fixes #8430) (#8431) (Teddy Katz) + +v4.0.0-alpha.0 - April 7, 2017 + +* 950874f Docs: add 4.0.0 migration guide (fixes #8306) (#8313) (Teddy Katz) +* 2754141 Fix: more autofix token-combining bugs (#8394) (Teddy Katz) +* f5a7e42 Breaking: log number of fixable problems (fixes #7364) (#8324) (alberto) +* 769b121 Chore: Fix indentation errors in indent-legacy (#8424) (Kai Cataldo) +* 8394e48 Update: add deprecated indent-legacy rule as v3.x indent rule snapshot (#8286) (Teddy Katz) +* 3c87e85 Fix: no-multi-spaces false positive with irregular indent whitespace (#8412) (Teddy Katz) +* cc53481 Breaking: rewrite indent (fixes #1801, #3737, #3845, #6007, ...16 more) (#7618) (Teddy Katz) +* 867dd2e Breaking: Calculate leading/trailing comments in core (#7516) (Kai Cataldo) +* de9f1a0 Docs: ES6 syntax vs globals configuration (fixes #7984) (#8350) (Zander Mackie) +* 66af53e Breaking: Traverse into type annotations (fixes #7129) (#8365) (Kai Cataldo) +* 86cf3e4 New: no-buffer-constructor rule (fixes #5614) (#8413) (Teddy Katz) +* f560c06 Update: fix space-unary-ops behavior with postfix UpdateExpressions (#8391) (Teddy Katz) +* 936af66 Fix: no-multiple-empty-lines crash on space after last \n (fixes #8401) (#8402) (Teddy Katz) +* e395919 Breaking: Resolve patterns from .eslintignore directory (fixes #6759) (#7678) (Ian VanSchooten) +* c778676 Breaking: convert RuleTester to ES6 class (refs #8231) (#8263) (Teddy Katz) +* 6f7757e Breaking: convert SourceCode to ES6 class (refs #8231) (#8264) (Teddy Katz) +* 8842d7e Chore: fix comment spacing in tests (#8405) (Teddy Katz) +* 9a9d916 Breaking: update eslint:recommended for 4.0.0 (fixes #8236) (#8372) (Teddy Katz) +* b0c63f0 Breaking: infer endLine and endColumn from a reported node (fixes #8004) (#8234) (Teddy Katz) +* 40b8c69 Breaking: no-multi-spaces check around inline comments (fixes #7693) (#7696) (Kai Cataldo) +* 034a575 Breaking: convert CLIEngine to ES6 class (refs #8231) (#8262) (Teddy Katz) +* 7dd890d Breaking: tweak space-before-function-paren default option (fixes #8267) (#8285) (Teddy Katz) +* 0e0dd27 Breaking: Remove `ecmaFeatures` from `eslint:recommended` (#8239) (alberto) +* 2fa7502 Breaking: disallow scoped plugin references without scope (fixes #6362) (#8233) (Teddy Katz) +* 4673f6e Chore: Switch to eslint-scope from escope (#8280) (Corbin Uselton) +* e232464 Breaking: change defaults for padded-blocks (fixes #7879) (#8134) (alberto) + +v3.19.0 - March 31, 2017 + +* e09132f Fix: no-extra-parens false positive with exports and object literals (#8359) (Teddy Katz) +* 91baed4 Update: allow custom messages in no-restricted-syntax (fixes #8298) (#8357) (Vitor Balocco) +* 35c93e6 Fix: prevent space-before-function-paren from checking type annotations (#8349) (Teddy Katz) +* 3342e9f Fix: don't modify operator precedence in operator-assignment autofixer (#8358) (Teddy Katz) +* f88375f Docs: clarify that no-unsafe-negation is in eslint:recommended (#8371) (Teddy Katz) +* 02f0d27 Docs: Add soda0289 to Development Team (#8367) (Kai Cataldo) +* 155424c Fix: ignore empty path in patterns (fixes #8362) (#8364) (alberto) +* 27616a8 Fix: prefer-const false positive with object spread (fixes #8187) (#8297) (Vitor Balocco) +* 8569a90 Docs: add note about git's linebreak handling to linebreak-style docs (#8361) (Teddy Katz) +* 5878593 Chore: fix invalid syntax in no-param-reassign test (#8360) (Teddy Katz) +* 1b1046b Fix: don't classify plugins that throw errors as "missing" (fixes #6874) (#8323) (Teddy Katz) +* 29f4ba5 Fix: no-useless-computed-key invalid autofix for getters and setters (#8335) (Teddy Katz) +* 0541eaf Fix: no-implicit-coercion invalid autofix with consecutive identifiers (#8340) (Teddy Katz) +* 41b9786 Fix: no-extra-parens false positive with objects following arrows (#8339) (Teddy Katz) +* 3146167 Fix: `eslint.verify` should not mutate config argument (fixes #8329) (#8334) (alberto) +* 927de90 Fix: dot-notation autofix produces invalid syntax for integer properties (#8332) (Teddy Katz) +* a9d1bea Fix: comma-style autofix produces errors on parenthesized elements (#8331) (Teddy Katz) +* d52173f Fix: don't generate invalid options in config-rule (#8326) (Teddy Katz) +* 6eda3b5 Fix: no-extra-parens invalid autofix in for-of statements (#8337) (Teddy Katz) +* 6c819d8 Fix: dot-notation autofix produces errors on parenthesized computed keys (#8330) (Teddy Katz) +* 2d883d7 Fix: object-shorthand autofix produces errors on parenthesized functions (#8328) (Teddy Katz) +* cd9b774 Fix: quotes false positive with backtick option in method names (#8327) (Teddy Katz) +* d064ba2 Fix: no-else-return false positive for ifs in single-statement position (#8338) (Teddy Katz) +* 6a718ba Chore: enable max-statements-per-line on ESLint codebase (#8321) (Teddy Katz) +* 614b62e Chore: update sinon calls to deprecated API. (#8310) (alberto) +* 0491572 Chore: use precalculated counts in codeframe formatter (#8296) (Vitor Balocco) +* 8733e6a Chore: Fix incorrect error location properties in tests (#8307) (alberto) +* c4ffb49 Chore: Fix typos in test option assertions (#8305) (Teddy Katz) +* 79a97cb Upgrade: devDependencies (#8303) (alberto) +* e4da200 Upgrade: Mocha to 3.2.0 (#8299) (Ilya Volodin) +* 2f144ca Fix: operator-assignment autofix errors with parentheses (fixes #8293) (#8294) (Teddy Katz) +* 7521cd5 Chore: update token logic in rules to use ast-utils (#8288) (Teddy Katz) +* 9b509ce Chore: refactor space-before-function-paren rule (#8284) (Teddy Katz) +* ddc6350 Fix: no-param-reassign false positive on destructuring (fixes #8279) (#8281) (Teddy Katz) +* f8176b3 Chore: improve test coverage for node-event-generator (#8287) (Teddy Katz) +* 602e9c2 Docs: fix incorrect selector examples (#8278) (Teddy Katz) + +v3.18.0 - March 17, 2017 + +* 85f74ca Fix: broken code path of direct nested loops (fixes #8248) (#8274) (Toru Nagashima) +* a61c359 Fix: Ignore hidden folders when resolving globs (fixes #8259) (#8270) (Ian VanSchooten) +* 6f05546 Chore: convert StubModuleResolver in config tests to ES6 class (#8265) (Teddy Katz) +* 0c0fc31 Fix: false positive of no-extra-parens about spread and sequense (#8275) (Toru Nagashima) +* e104973 Docs: remove self-reference in no-restricted-syntax docs (#8277) (Vitor Balocco) +* 23eca51 Update: Add allowTaggedTemplates to no-unused-expressions (fixes #7632) (#8253) (Kevin Partington) +* f9ede3f Upgrade: doctrine to 2.0.0 (#8269) (alberto) +* 1b678a6 New: allow rules to listen for AST selectors (fixes #5407) (#7833) (Teddy Katz) +* 63ca0c5 Chore: use precalculated counts in stylish formatter (#8251) (alberto) +* 47c3171 Fix: typo in console.error (#8258) (Jan Peer Stöcklmair) +* e74ed6d Chore: convert Traverser to ES6 class (refs #7849) (#8232) (Teddy Katz) +* 13eead9 Fix: sort-vars crash on mixed destructuring declarations (#8245) (Teddy Katz) +* 133f489 Fix: func-name-matching crash on destructuring assignment to functions (#8247) (Teddy Katz) +* a34b9c4 Fix: func-name-matching crash on non-string literal computed keys (#8246) (Teddy Katz) +* 7276e6d Docs: remove unneeded semicolons in arrow-parens.md (#8249) (Dmitry Gershun) +* 8c40a25 concat-stream known to be vulnerable prior 1.5.2 (#8228) (Samuel) +* 149c055 Upgrade: mock-fs to v4.2.0 (fixes #8194) (#8243) (Teddy Katz) +* a83bff9 Build: remove unneeded json config in demo (fixes #8237) (#8242) (alberto) +* df12137 Docs: fix typos (#8235) (Gyandeep Singh) +* b5e9788 Chore: rename no-extra-parens methods (#8225) (Vitor Balocco) +* 7f8afe6 Update: no-extra-parens overlooked spread and superClass (fixes #8175) (#8209) (Toru Nagashima) +* ce6ff56 Docs: set recommended true for no-global-assign (fixes #8215) (#8218) (BinYi LIU) +* 5b5c236 Fix: wrong comment when module not found in config (fixes #8192) (#8196) (alberto) + +v3.17.1 - March 6, 2017 + +* f8c8e6e Build: change mock-fs path without SSH (fixes #8207) (#8208) (Toru Nagashima) +* f713f11 Fix: nonblock-statement-body-position multiline error (fixes #8202) (#8203) (Teddy Katz) +* 41e3d9c Fix: `operator-assignment` with parenthesized expression (fixes #8190) (#8197) (alberto) +* 5e3bca7 Chore: add eslint-plugin-eslint-plugin (#8198) (Teddy Katz) +* 580da36 Chore: add missing `output` property to tests (#8195) (alberto) + +v3.17.0 - March 3, 2017 + +* 4fdf6d7 Update: deprecate `applyDefaultPatterns` in `line-comment-position` (#8183) (alberto) +* 25e5817 Fix: Don't autofix `+ +a` to `++a` in space-unary-ops (#8176) (Alan Pierce) +* a6ce8f9 Build: Sort rules before dumping them to doc files (#8154) (Danny Andrews) +* 0af9057 Chore: Upgrade to a patched version of mock-fs (fixes #8177) (#8188) (Teddy Katz) +* bf4d8cf Update: ignore eslint comments in lines-arount-comment (fixes #4345) (#8155) (alberto) +* dad20ad New: add SourceCode#getLocFromIndex and #getIndexFromLoc (fixes #8073) (#8158) (Teddy Katz) +* 18a519f Update: let RuleTester cases assert that no autofix occurs (fixes #8157) (#8163) (Teddy Katz) +* a30eb8d Docs: improve documentation for RuleTester cases (#8162) (Teddy Katz) +* a78ec9f Chore: upgrade `coveralls` to ^2.11.16 (#8161) (alberto) +* d02bd11 Fix: padded-blocks autofix problems with comments (#8149) (alberto) +* 9994889 Docs: Add missing space to `create` in `no-use-before-define` (#8166) (Justin Anastos) +* 4d542ba Docs: Remove unneeded statement about autofix (#8164) (alberto) +* 20daea5 New: no-compare-neg-zero rule (#8091) (薛定谔的猫) +* 4d35a81 Fix: Add a utility to avoid autofix conflicts (fixes #7928, fixes #8026) (#8067) (Alan Pierce) +* 287e882 New: nonblock-statement-body-position rule (fixes #6067) (#8108) (Teddy Katz) +* 7f1f4e5 Chore: remove unneeded devDeps `linefix` and `gh-got` (#8160) (alberto) +* ca1694b Update: ignore negative ranges in fixes (#8133) (alberto) +* 163d751 Docs: `lines-around-comment` doesn't disallow empty lines (#8151) (alberto) +* 1c84922 Chore: upgrade eslint-plugin-node (#8156) (alberto) +* 1ee5c27 Fix: Make RuleTester handle empty-string cases gracefully (fixes #8142) (#8143) (Teddy Katz) +* 044bc10 Docs: Add details about "--fix" option for "sort-imports" rule (#8077) (Olivier Audard) +* 3fec54a Add option to ignore property in no-param-reassign (#8087) (Christian Bundy) +* 4e52cfc Fix: Improve keyword-spacing typescript support (fixes #8110) (#8111) (Reyad Attiyat) +* 7ff42e8 New: Allow regexes in RuleTester (fixes #7837) (#8115) (Daniel Lo Nigro) +* cbd7ded Build: display rules’ meta data in their docs (fixes #5774) (#8127) (Wilson Kurniawan) +* da8e8af Update: include function name in report message if possible (fixes #7260) (#8058) (Dieter Luypaert) +* 8f91e32 Fix: `ignoreRestSiblings` option didn't cover arguments (fixes #8119) (#8120) (Toru Nagashima) + +v3.16.1 - February 22, 2017 + +* ff8a80c Fix: duplicated autofix output for inverted fix ranges (fixes #8116) (#8117) (Teddy Katz) +* a421897 Docs: fix typo in arrow-parens.md (#8132) (Will Chen) +* 22d7fbf Chore: fix invalid redeclared variables in tests (#8130) (Teddy Katz) +* 8d95598 Chore: fix output assertion typos in rule tests (#8129) (Teddy Katz) +* 9fa2559 Docs: Add missing quotes in key-spacing rule (#8121) (Glenn Reyes) +* f3a6ced Build: package.json update for eslint-config-eslint release (ESLint Jenkins) + +v3.16.0 - February 20, 2017 + +* d89d0b4 Update: fix quotes false negative for string literals as template tags (#8107) (Teddy Katz) +* 21be366 Chore: Ensuring eslint:recommended rules are sorted. (#8106) (Kevin Partington) +* 360dbe4 Update: Improve error message when extend config missing (fixes #6115) (#8100) (alberto) +* f62a724 Chore: use updated token iterator methods (#8103) (Kai Cataldo) +* daf6f26 Fix: check output in RuleTester when errors is a number (fixes #7640) (#8097) (alberto) +* cfb65c5 Update: make no-lone-blocks report blocks in switch cases (fixes #8047) (#8062) (Teddy Katz) +* 290fb1f Update: Add includeComments to getTokenByRangeStart (fixes #8068) (#8069) (Kai Cataldo) +* ff066dc Chore: Incorrect source code test text (#8096) (Jack Ford) +* 14d146d Docs: Clarify --ext only works with directories (fixes #7939) (#8095) (alberto) +* 013a454 Docs: Add TSC meeting quorum requirement (#8086) (Kevin Partington) +* 7516303 Fix: `sourceCode.getTokenAfter` shouldn't skip tokens after comments (#8055) (Toru Nagashima) +* c53e034 Fix: unicode-bom fixer insert BOM in appropriate location (fixes #8083) (#8084) (pantosha) +* 55ac302 Chore: fix the timing to define rules for tests (#8082) (Toru Nagashima) +* c7e64f3 Upgrade: mock-fs (#8070) (Toru Nagashima) +* acc3301 Update: handle uncommon linebreaks consistently in rules (fixes #7949) (#8049) (Teddy Katz) +* 591b74a Chore: enable operator-linebreak on ESLint codebase (#8064) (Teddy Katz) +* 6445d2a Docs: Add documentation for /* exported */ (fixes #7998) (#8065) (Lee Yi Min) +* fcc38db Chore: simplify and improve performance for autofix (#8035) (Toru Nagashima) +* b04fde7 Chore: improve performance of SourceCode constructor (#8054) (Teddy Katz) +* 90fd555 Update: improve null detection in eqeqeq for ES6 regexes (fixes #8020) (#8042) (Teddy Katz) +* 16248e2 Fix: no-extra-boolean-cast incorrect Boolean() autofixing (fixes #7977) (#8037) (Jonathan Wilsson) +* 834f45d Update: rewrite TokenStore (fixes #7810) (#7936) (Toru Nagashima) +* 329dcdc Chore: unify checks for statement list parents (#8048) (Teddy Katz) +* c596690 Docs: Clarify generator-star-spacing config example (fixes #8027) (#8034) (Hòa Trần) +* a11d4a6 Docs: fix a typo in shareable configs documentation (#8036) (Dan Homola) +* 1e3d4c6 Update: add fixer for no-unused-labels (#7841) (Teddy Katz) +* f47fb98 Update: ensure semi-spacing checks import/export declarations (#8033) (Teddy Katz) +* e228d56 Update: no-undefined handles properties/classes/modules (fixes #7964) (#7966) (Kevin Partington) +* 7bc92d9 Chore: fix invalid test cases (#8030) (Toru Nagashima) + +v3.15.0 - February 3, 2017 + +* f2a3580 Fix: `no-extra-parens` incorrect precedence (fixes #7978) (#7999) (alberto) +* d6b6ba1 Fix: no-var should fix ForStatement.init (#7993) (Toru Nagashima) +* 99d386d Upgrade: Espree v3.4.0 (#8019) (Kai Cataldo) +* 42390fd Docs: update README.md for team (#8016) (Toru Nagashima) +* d7ffd88 Chore: enable template-tag-spacing on ESLint codebase (#8005) (Teddy Katz) +* f2be7e3 Docs: Fix typo in object-curly-newline.md (#8002) (Danny Andrews) +* df2351a Docs: Fix misleading section in brace-style documentation (#7996) (Teddy Katz) +* 5ae6e00 Chore: avoid unnecessary feature detection for Symbol (#7992) (Teddy Katz) +* 5d57c57 Chore: fix no-else-return lint error (refs #7986) (#7994) (Vitor Balocco) +* 62fb054 Chore: enable no-else-return on ESLint codebase (#7986) (Teddy Katz) +* c59a0ba Update: add ignoreRestSiblings option to no-unused-vars (#7968) (Zack Argyle) +* 5cdfa99 Chore: enable no-unneeded-ternary on ESLint codebase (#7987) (Teddy Katz) +* fbd7c13 Update: ensure operator-assignment handles exponentiation operators (#7970) (Teddy Katz) +* c5066ce Update: add "variables" option to no-use-before-define (fixes #7111) (#7948) (Teddy Katz) +* 09546a4 New: `template-tag-spacing` rule (fixes #7631) (#7913) (Jonathan Wilsson) + +v3.14.1 - January 25, 2017 + +* 791f32b Fix: brace-style false positive for keyword method names (fixes #7974) (#7980) (Teddy Katz) +* d7a0add Docs: Add ESLint tutorial embed to getting started (#7971) (Jamis Charles) +* 72d41f0 Fix: no-var autofix syntax error in single-line statements (fixes #7961) (#7962) (Teddy Katz) +* b9e5b68 Fix: indent rule crash on sparse array with object (fixes #7959) (#7960) (Gyandeep Singh) +* a7bd66a Chore: Adding assign/redeclare tests to no-undefined (refs #7964) (#7965) (Kevin Partington) +* 8bcbf5d Docs: typo in prefer-promise-reject-errors (#7958) (Patrick McElhaney) + +v3.14.0 - January 20, 2017 + +* 506324a Fix: `no-var` does not fix if causes ReferenceError (fixes #7950) (#7953) (Toru Nagashima) +* 05e7432 New: no-chained-assignments rule (fixes #6424) (#7904) (Stewart Rand) +* 243e47d Update: Add fixer for no-else-return (fixes #7863) (#7864) (Xander Dumaine) +* f091d95 New: `prefer-promise-reject-errors` rule (fixes #7685) (#7689) (Teddy Katz) +* ca01e00 Fix: recognize all line terminators in func-call-spacing (fixes #7923) (#7924) (Francesco Trotta) +* a664e8a Update: add ignoreJSX option to no-extra-parens (Fixes #7444) (#7926) (Robert Rossmann) +* 8ac3518 Fix: no-useless-computed-key false positive with `__proto__` (#7934) (Teddy Katz) +* c835e19 Docs: remove reference to deleted rule (#7942) (Alejandro Oviedo) +* 3c1e63b Docs: Improve examples for no-case-declarations (fixes #6716) (#7920) (Kevin Rangel) +* 7e04b33 Fix: Ignore inline plugin rule config in autoconfig (fixes #7860) (#7919) (Ian VanSchooten) +* 6448ba0 Fix: add parentheses in no-extra-boolean-cast autofixer (fixes #7912) (#7914) (Szymon Przybylski) +* b3f2094 Fix: brace-style crash with lone block statements (fixes #7908) (#7909) (Teddy Katz) +* 5eb2e88 Docs: Correct typos in configuring.md (#7916) (Gabriel Delépine) +* bd5e219 Update: ensure brace-style validates class bodies (fixes #7608) (#7871) (Teddy Katz) +* 427543a Fix: catastrophic backtracking in astUtils linebreak regex (fixes #7893) (#7898) (Teddy Katz) +* 995554c Fix: Correct typos in no-alert.md and lib/ast-utils.js (#7905) (Stewart Rand) +* d6150e3 Chore: Enable comma-dangle on ESLint codebase (fixes #7725) (#7906) (Teddy Katz) +* 075ec25 Chore: update to use ES6 classes (refs #7849) (#7891) (Claire Dranginis) +* 55f0cb6 Update: refactor brace-style and fix inconsistencies (fixes #7869) (#7870) (Teddy Katz) + +v3.13.1 - January 9, 2017 + +* 3fc4e3f Fix: prefer-destructuring reporting compound assignments (fixes #7881) (#7882) (Teddy Katz) +* f90462e Fix: no-extra-label autofix should not remove labels used elsewhere (#7885) (Teddy Katz) + +v3.13.0 - January 6, 2017 + +* cd4c025 Update: add fixer for no-extra-label (#7840) (Teddy Katz) +* aa75c92 Fix: Ensure prefer-const fixes destructuring assignments (fixes #7852) (#7859) (Teddy Katz) +* 4008022 Chore: Refactor to use ES6 Classes (Part 3)(refs #7849) (#7865) (Gyandeep Singh) +* c9ba40a Update: add fixer for `no-unneeded-ternary` (#7540) (Teddy Katz) +* dd56d87 Update: add object-shorthand option for arrow functions (fixes #7564) (#7746) (Teddy Katz) +* fbafdc0 Docs: `padded-blocks` `never` case (fixes #7868) (#7878) (alberto) +* ca1f841 Fix: no-useless-return stack overflow on loops after throw (fixes #7855) (#7856) (Teddy Katz) +* d80d994 Update: add fixer for object-property-newline (fixes #7740) (#7808) (Teddy Katz) +* bf3ea3a Fix: capitalized-comments: Ignore consec. comments if first is invalid (#7835) (Kevin Partington) +* 616611a Chore: Refactor to use ES6 Classes (Part 2)(refs #7849) (#7847) (Gyandeep Singh) +* 856084b Chore: Refactor to use ES6 Classes (Part 1)(refs #7849) (#7846) (Gyandeep Singh) +* bf45893 Docs: Clarify that we only support Stage 4 proposals (#7845) (Kevin Partington) +* 0fc24f7 Fix: adapt new-paren rule so it handles TypeScript (fixes #7817) (#7820) (Philipp A) +* df0b06b Fix: no-multiple-empty-lines perf issue on large files (fixes #7803) (#7843) (Teddy Katz) +* 18fa521 Chore: use ast-utils helper functions in no-multiple-empty-lines (#7842) (Teddy Katz) +* 7122205 Docs: Array destructuring example for no-unused-vars (fixes #7838) (#7839) (Remco Haszing) +* e21b36b Chore: add integration tests for cache files (refs #7748) (#7794) (Teddy Katz) +* 2322733 Fix: Throw error if ruletester is missing required test scenarios (#7388) (Teddy Katz) +* 1beecec Update: add fixer for `operator-linebreak` (#7702) (Teddy Katz) +* c5c3b21 Fix: no-implied-eval false positive on 'setTimeoutFoo' (fixes #7821) (#7836) (Teddy Katz) +* 00dd96c Chore: enable array-bracket-spacing on ESLint codebase (#7830) (Teddy Katz) +* ebcae1f Update: no-return-await with with complex `return` argument (fixes #7594) (#7595) (Dalton Santos) +* fd4cd3b Fix: Disable no-var autofixer in some incorrect cases in loops (#7811) (Alan Pierce) +* 1f25834 Docs: update outdated info in Architecture page (#7816) (Teddy Katz) +* f20b9e9 Fix: Relax no-useless-escape's handling of ']' in regexes (fixes #7789) (#7793) (Teddy Katz) +* 3004c1e Fix: consistent-return shouldn't report class constructors (fixes #7790) (#7797) (Teddy Katz) +* b938f1f Docs: Add an example for the spread operator to prefer-spread.md (#7802) (#7804) (butlermd) +* b8ce2dc Docs: Remove .html extensions from links in developer-guide (#7805) (Kevin Partington) +* aafebb2 Docs: Wrap placeholder sample in {% raw %} (#7798) (Daniel Lo Nigro) +* bb6b73b Chore: replace unnecessary function callbacks with arrow functions (#7795) (Teddy Katz) +* 428fbdf Fix: func-call-spacing "never" doesn't fix w/ line breaks (fixes #7787) (#7788) (Kevin Partington) +* 6e61070 Fix: `semi` false positive before regex/template literals (fixes #7782) (#7783) (Teddy Katz) +* ff0c050 Fix: remove internal property from config generation (fixes #7758) (#7761) (alberto) +* 27424cb New: `prefer-destructuring` rule (fixes #6053) (#7741) (Alex LaFroscia) +* bb648ce Docs: fix unclear example for no-useless-escape (#7781) (Teddy Katz) +* 8c3a962 Fix: syntax errors from object-shorthand autofix (fixes #7744) (#7745) (Teddy Katz) +* 8b296a2 Docs: fix in semi.md: correct instead of incorrect (#7779) (German Prostakov) +* 3493241 Upgrade: strip-json-comments ~v2.0.1 (Janus Troelsen) +* 75b7ba4 Chore: enable object-curly-spacing on ESLint codebase (refs #7725) (#7770) (Teddy Katz) +* 7d1dc7e Update: Make default-case comment case-insensitive (fixes #7673) (#7742) (Robert Rossmann) +* f1bf5ec Chore: convert remaining old-style context.report() calls to the new API (#7763) (Teddy Katz) + +v3.12.2 - December 14, 2016 + +* dec3ec6 Fix: indent bug with AssignmentExpressions (fixes #7747) (#7750) (Teddy Katz) +* 5344751 Build: Don't create blogpost links from rule names within other words (#7754) (Teddy Katz) +* 639b798 Docs: Use `Object.prototype` in examples (#7755) (Alex Reardon) + +v3.12.1 - December 12, 2016 + +* 0ad4d33 Fix: `indent` regression with function calls (fixes #7732, fixes #7733) (#7734) (Teddy Katz) +* ab246dd Docs: Rules restricting globals/properties/syntax are linked together (#7743) (Kevin Partington) +* df2f115 Docs: Add eslint-config-mdcs to JSCS Migration Guide (#7737) (Joshua Koo) +* 4b77333 Build: avoid creating broken rule links in the changelog (#7731) (Teddy Katz) + +v3.12.0 - December 9, 2016 + +* e569225 Update: fix false positive/negative of yoda rule (fixes #7676) (#7695) (Toru Nagashima) +* e95a230 Fix: indent "first" option false positive on nested arrays (fixes #7727) (#7728) (Teddy Katz) +* 81f9e7d Fix: Allow duplicated let declarations in `prefer-const` (fixes #7712) (#7717) (Teddy Katz) +* 1d0d61d New: Add no-await-in-loop rule (#7563) (Nat Mote) +* 2cdfb4e New: Additional APIs (fixes #6256) (#7669) (Ilya Volodin) +* 4278c42 Update: make no-obj-calls report errors for Reflect (fixes #7700) (#7710) (Tomas Echeverri Valencia) +* 4742d82 Docs: clarify the default behavior of `operator-linebreak` (fixes #7459) (#7726) (Teddy Katz) +* a8489e2 Chore: Avoid parserOptions boilerplate in tests for ES6 rules (#7724) (Teddy Katz) +* b921d1f Update: add `indent` options for array and object literals (fixes #7473) (#7681) (Teddy Katz) +* 7079c89 Update: Add airbnb-base to init styleguides (fixes #6986) (#7699) (alberto) +* 63bb3f8 Docs: improve the documentation for the autofix API (#7716) (Teddy Katz) +* f8786fb Update: add fixer for `capitalized-comments` (#7701) (Teddy Katz) +* abfd24f Fix: don't validate schemas for disabled rules (fixes #7690) (#7692) (Teddy Katz) +* 2ac07d8 Upgrade: Update globals dependency to 9.14.0 (#7683) (Aleksandr Oleynikov) +* 90a5d29 Docs: Remove incorrect info about issue requirements from PR guide (#7691) (Teddy Katz) +* f80c278 Docs: Add sails-hook-lint to integrations list (#7679) (Anthony M) +* e96da3f Docs: link first instance of `package.json` (#7684) (Kent C. Dodds) +* bf20e20 Build: include links to rule pages in release blogpost (#7671) (Teddy Katz) +* b30116c Docs: Fix code-blocks in spaced-comment docs (#7524) (MichaÅ‚ GoÅ‚Ä™biowski) +* 0a2a7fd Fix: Allow \u2028 and \u2029 as string escapes in no-useless-escape (#7672) (Teddy Katz) +* 76c33a9 Docs: Change Sails.js integration to active npm package (#7675) (Anthony M) + +v3.11.1 - November 28, 2016 + +* be739d0 Fix: capitalized-comments fatal error fixed (fixes #7663) (#7664) (Rich Trott) +* cc4cedc Docs: Fix a typo in array-bracket-spacing documentation (#7667) (Alex Guerrero) +* f8adadc Docs: fix a typo in capitalized-comments documentation (#7666) (Teddy Katz) + +v3.11.0 - November 25, 2016 + +* ad56694 New: capitalized-comments rule (fixes #6055) (#7415) (Kevin Partington) +* 7185567 Update: add fixer for `operator-assignment` (#7517) (Teddy Katz) +* faf5f56 Update: fix false negative of `quotes` with \n in template (fixes #7646) (#7647) (Teddy Katz) +* 474e444 Update: add fixer for `sort-imports` (#7535) (Teddy Katz) +* f9b70b3 Docs: Enable example highlighting in rules examples (ref #6444) (#7644) (Alex Guerrero) +* d50f6c1 Fix: incorrect location for `no-useless-escape` errors (fixes #7643) (#7645) (Teddy Katz) +* 54a993c Docs: Fix a typo in the require-yield.md (#7652) (Vse Mozhet Byt) +* eadd808 Chore: Fix prefer-arrow-callback lint errors (#7651) (Kevin Partington) +* 89bd8de New: `require-await` rule (fixes #6820) (#7435) (Toru Nagashima) +* b7432bd Chore: Ensure JS files are checked out with LF (#7624) (Kevin Partington) +* 32a3547 Docs: Add absent quotes in rules documentation (#7625) (Denis Sikuler) +* 5c9a4ad Fix: Prevent `quotes` from fixing templates to directives (fixes #7610) (#7617) (Teddy Katz) +* d90ca46 Upgrade: Update markdownlint dependency to 0.3.1 (fixes #7589) (#7592) (David Anson) +* 07124d1 Docs: add missing quote mark (+=" → "+=") (#7613) (Sean Juarez) +* 8998043 Docs: fix wording in docs for no-extra-parens config (Michael Ficarra) + +v3.10.2 - November 15, 2016 + +* 0643bfe Fix: correctly handle commented code in `indent` autofixer (fixes #7604) (#7606) (Teddy Katz) +* bd0514c Fix: syntax error after `key-spacing` autofix with comment (fixes #7603) (#7607) (Teddy Katz) +* f56c1ef Fix: `indent` crash on parenthesized global return values (fixes #7573) (#7596) (Teddy Katz) +* 100c6e1 Docs: Fix example for curly "multi-or-nest" option (#7597) (Will Chen) +* 6abb534 Docs: Update code of conduct link (#7599) (Nicholas C. Zakas) +* 8302cdb Docs: Update no-tabs to match existing standards & improve readbility (#7590) (Matt Stow) + +v3.10.1 - November 14, 2016 + +* 8a0e92a Fix: handle try/catch correctly in `no-return-await` (fixes #7581) (#7582) (Teddy Katz) +* c4dd015 Fix: no-useless-return stack overflow on unreachable loops (fixes #7583) (#7584) (Teddy Katz) + +v3.10.0 - November 11, 2016 + +* 7ee039b Update: Add comma-style options for calls, fns, imports (fixes #7470) (Max Englander) +* 670e060 Chore: make the `object-shorthand` tests more readable (#7580) (Teddy Katz) +* c3f4809 Update: Allow `func-names` to recognize inferred ES6 names (fixes #7235) (#7244) (Logan Smyth) +* b8d6e48 Fix: syntax errors created by `object-shorthand` autofix (fixes #7574) (#7575) (Teddy Katz) +* 1b3b65c Chore: ensure that files in tests/conf are linted (#7579) (Teddy Katz) +* 2bd1dd7 Update: avoid creating extra whitespace in `arrow-body-style` fixer (#7504) (Teddy Katz) +* 66fe9ff New: `no-return-await` rule. (fixes #7537) (#7547) (Jordan Harband) +* 759525e Chore: Use process.exitCode instead of process.exit() in bin/eslint.js (#7569) (Teddy Katz) +* 0d60db7 Fix: Curly rule doesn't account for leading comment (fixes #7538) (#7539) (Will Chen) +* 5003b1c Update: fix in/instanceof handling with `space-infix-ops` (fixes #7525) (#7552) (Teddy Katz) +* 3e6131e Docs: explain config option merging (#7499) (Danny Andrews) +* 1766524 Update: "Error type should be" assertion in rule-tester (fixes 6106) (#7550) (Frans Jaspers) +* 44eb274 Docs: Missing semicolon report was missing a comma (#7553) (James) +* 6dbda15 Docs: Document the optional defaults argument for RuleTester (#7548) (Teddy Katz) +* e117b80 Docs: typo fix (#7546) (oprogramador) +* 25e5613 Chore: Remove incorrect test from indent.js. (#7531) (Scott Stern) +* c0f4937 Fix: `arrow-parens` supports type annotations (fixes #7406) (#7436) (Toru Nagashima) +* a838b8e Docs: `func-name-matching`: update with “alwaysâ€/“never†option (#7536) (Jordan Harband) +* 3c379ff Update: `no-restricted-{imports,modules}`: add “patterns†(fixes #6963) (#7433) (Jordan Harband) +* f5764ee Docs: Update example of results returned from `executeOnFiles` (#7362) (Simen Bekkhus) +* 4613ba0 Fix: Add support for escape char in JSX. (#7461) (Scott Stern) +* ea0970d Fix: `curly` false positive with no-semicolon style (#7509) (Teddy Katz) +* af1fde1 Update: fix `brace-style` false negative on multiline node (fixes #7493) (#7496) (Teddy Katz) +* 3798aea Update: max-statements to report function name (refs #7260) (#7399) (Nicholas C. Zakas) +* 0c215fa Update: Add `ArrowFunctionExpression` support to `require-jsdoc` rule (#7518) (Gyandeep Singh) +* 578c373 Build: handle deprecated rules with no 'replacedBy' (refs #7471) (#7494) (Vitor Balocco) +* a7f3976 Docs: Specify min ESLint version for new rule format (#7501) (cowchimp) +* 8a3e717 Update: Fix `lines-around-directive` semicolon handling (fixes #7450) (#7483) (Teddy Katz) +* e58cead Update: add a fixer for certain statically-verifiable `eqeqeq` cases (#7389) (Teddy Katz) +* 0dea0ac Chore: Add Node 7 to travis ci build (#7506) (Gyandeep Singh) +* 36338f0 Update: add fixer for `no-extra-boolean-cast` (#7387) (Teddy Katz) +* 183def6 Chore: enable `prefer-arrow-callback` on ESLint codebase (fixes #6407) (#7503) (Teddy Katz) +* 4f1fa67 Docs: Update copyright (#7497) (Nicholas C. Zakas) + +v3.9.1 - October 31, 2016 + +* 2012258 Fix: incorrect `indent` check for array property access (fixes #7484) (#7485) (Teddy Katz) +* 8a71d4a Fix: `no-useless-return` false positive on conditionals (fixes #7477) (#7482) (Teddy Katz) +* 56a662b Fix: allow escaped backreferences in `no-useless-escape` (fixes #7472) (#7474) (Teddy Katz) +* fffdf13 Build: Fix prefer-reflect rule to not crash site gen build (#7471) (Ilya Volodin) +* 8ba68a3 Docs: Update broken link (#7490) (Devinsuit) +* 65231d8 Docs: add the "fixable" icon for `no-useless-return` (#7480) (Teddy Katz) + +v3.9.0 - October 28, 2016 + +* d933516 New: `no-useless-return` rule (fixes #7309) (#7441) (Toru Nagashima) +* 5e7af30 Update: Add `CallExpression` option for `indent` (fixes #5946) (#7189) (Teddy Katz) +* b200086 Fix: Support type annotations in array-bracket-spacing (#7445) (Jimmy Jia) +* 5ed8b9b Update: Deprecate prefer-reflect (fixes #7226) (#7464) (Kai Cataldo) +* 92ad43b Chore: Update deprecated rules in conf/eslint.json (#7467) (Kai Cataldo) +* e46666b New: Codeframe formatter (fixes #5860) (#7437) (Vitor Balocco) +* fe0d903 Upgrade: Shelljs to ^0.7.5 (fixes #7316) (#7465) (Gyandeep Singh) +* 1d5146f Update: fix wrong indentation about `catch`,`finally` (#7371) (Toru Nagashima) +* 77e3a34 Chore: Pin mock-fs dev dependency (#7466) (Gyandeep Singh) +* c675d7d Update: Fix `no-useless-escape` false negative in regexes (fixes #7424) (#7425) (Teddy Katz) +* ee3bcea Update: add fixer for `newline-after-var` (fixes #5959) (#7375) (Teddy Katz) +* 6e9ff08 Fix: indent.js to support multiline array statements. (#7237) (Scott Stern) +* f8153ad Build: Ensure absolute links in docs retain .md extensions (fixes #7419) (#7438) (Teddy Katz) +* 16367a8 Fix: Return statement spacing. Fix for indent rule. (fixes #7164) (#7197) (Imad Elyafi) +* 3813988 Update: fix false negative of `no-extra-parens` (fixes #7122) (#7432) (Toru Nagashima) +* 23062e2 Docs: Fix typo in no-unexpected-multiline (fixes #7442) (#7447) (Denis Sikuler) +* d257428 Update: `func-name-matching`: add “alwaysâ€/“never†option (fixes #7391) (#7428) (Jordan Harband) +* c710584 Fix: support for MemberExpression with function body. (#7400) (Scott Stern) +* 2c8ed2d Build: ensure that all files are linted on bash (fixes #7426) (#7427) (Teddy Katz) +* 18ff70f Chore: Enable `no-useless-escape` (#7403) (Vitor Balocco) +* 8dfd802 Fix: avoid `camelcase` false positive with NewExpressions (fixes #7363) (#7409) (Teddy Katz) +* e8159b4 Docs: Fix typo and explain static func calls for class-methods-use-this (#7421) (Scott O'Hara) +* 85d7e24 Docs: add additional examples for MemberExpressions in Indent rule. (#7408) (Scott Stern) +* 2aa1107 Docs: Include note on fatal: true in the node.js api section (#7376) (Simen Bekkhus) +* e064a25 Update: add fixer for `arrow-body-style` (#7240) (Teddy Katz) +* e0fe727 Update: add fixer for `brace-style` (fixes #7074) (#7347) (Teddy Katz) +* cbbe420 New: Support enhanced parsers (fixes #6974) (#6975) (Nicholas C. Zakas) +* 644d25b Update: Add an ignoreRegExpLiterals option to max-len (fixes #3229) (#7346) (Wilfred Hughes) +* 6875576 Docs: Remove broken links to jslinterrors.com (fixes #7368) (#7369) (Dannii Willis) + +v3.8.1 - October 17, 2016 + +* 681c78a Fix: `comma-dangle` was confused by type annotations (fixes #7370) (#7372) (Toru Nagashima) +* 7525042 Fix: Allow useless escapes in tagged template literals (fixes #7383) (#7384) (Teddy Katz) +* 9106964 Docs: Fix broken link for stylish formatter (#7386) (Vitor Balocco) +* 49d3c1b Docs: Document the deprecated meta property (#7367) (Randy Coulman) +* 19d2996 Docs: Relax permission for merging PRs (refs eslint/tsc-meetings#20) (#7360) (Brandon Mills) + +v3.8.0 - October 14, 2016 + +* ee60acf Chore: add integration tests for autofixing (fixes #5909) (#7349) (Teddy Katz) +* c8796e9 Update: `comma-dangle` supports trailing function commas (refs #7101) (#7181) (Toru Nagashima) +* c4abaf0 Update: `space-before-function-paren` supports async/await (refs #7101) (#7180) (Toru Nagashima) +* d0d3b28 Fix: id-length rule incorrectly firing on member access (fixes #6475) (#7365) (Burak YiÄŸit Kaya) +* 2729d94 Fix: Don't report setter params in class bodies as unused (fixes #7351) (#7352) (Teddy Katz) +* 0b85004 Chore: Enable prefer-template (fixes #6407) (#7357) (Kai Cataldo) +* ca1947b Chore: Update pull request template (refs eslint/tsc-meetings#20) (#7359) (Brandon Mills) +* d840afe Docs: remove broken link from no-loop-func doc (#7342) (Michael McDermott) +* 5266793 Update: no-useless-escape checks template literals (fixes #7331) (#7332) (Kai Cataldo) +* b08fb91 Update: add source property to LintResult object (fixes #7098) (#7304) (Vitor Balocco) +* 0db4164 Chore: run prefer-template autofixer on test files (refs #6407) (#7354) (Kai Cataldo) +* c1470b5 Update: Make the `prefer-template` fixer unescape quotes (fixes #7330) (#7334) (Teddy Katz) +* 5d08c33 Fix: Handle parentheses correctly in `yoda` fixer (fixes #7326) (#7327) (Teddy Katz) +* cd72bba New: `func-name-matching` rule (fixes #6065) (#7063) (Annie Zhang) +* 55b5146 Fix: `RuleTester` didn't support `mocha --watch` (#7287) (Toru Nagashima) +* f8387c1 Update: add fixer for `prefer-spread` (#7283) (Teddy Katz) +* 52da71e Fix: Don't require commas after rest properties (fixes #7297) (#7298) (Teddy Katz) +* 3b11d3f Chore: refactor `no-multiple-empty-lines` (#7314) (Teddy Katz) +* 16d495d Docs: Updating CLI overview with latest changes (#7335) (Kevin Partington) +* 52dfce5 Update: add fixer for `one-var-declaration-per-line` (#7295) (Teddy Katz) +* 0e994ae Update: Improve the error messages for `no-unused-vars` (fixes #7282) (#7315) (Teddy Katz) +* 93214aa Chore: Convert non-lib/test files to template literals (refs #6407) (#7329) (Kai Cataldo) +* 72f394d Update: Fix false negative of `no-multiple-empty-lines` (fixes #7312) (#7313) (Teddy Katz) +* 756bc5a Update: Use characters instead of code units for `max-len` (#7299) (Teddy Katz) +* c9a7ec5 Fix: Improving optionator configuration for --print-config (#7206) (Kevin Partington) +* 51bfade Fix: avoid `object-shorthand` crash with spread properties (fixes #7305) (#7306) (Teddy Katz) +* a12d1a9 Update: add fixer for `no-lonely-if` (#7202) (Teddy Katz) +* 1418384 Fix: Don't require semicolons before `++`/`--` (#7252) (Adrian Heine né Lang) +* 2ffe516 Update: add fixer for `curly` (#7105) (Teddy Katz) +* ac3504d Update: add functionPrototypeMethods to wrap-iife (fixes #7212) (#7284) (Eli White) +* 5e16fb4 Update: add fixer for `no-extra-bind` (#7236) (Teddy Katz) + +v3.7.1 - October 3, 2016 + +* 3dcae13 Fix: Use the correct location for `comma-dangle` errors (fixes #7291) (#7292) (Teddy Katz) +* cb7ba6d Fix: no-implicit-coercion should not fix ~. (fixes #7272) (#7289) (Eli White) +* ce590e2 Chore: Add additional tests for bin/eslint.js (#7290) (Teddy Katz) +* 8ec82ee Docs: change links of templates to raw data (#7288) (Toru Nagashima) + +v3.7.0 - September 30, 2016 + +* 2fee8ad Fix: object-shorthand's consistent-as-needed option (issue #7214) (#7215) (Naomi Jacobs) +* c05a19c Update: add fixer for `prefer-numeric-literals` (#7205) (Teddy Katz) +* 2f171f3 Update: add fixer for `no-undef-init` (#7210) (Teddy Katz) +* 876d747 Docs: Steps for adding new committers/TSCers (#7221) (Nicholas C. Zakas) +* dffb4fa Fix: `no-unused-vars` false positive (fixes #7250) (#7258) (Toru Nagashima) +* 4448cec Docs: Adding missing ES8 reference to configuring (#7271) (Kevin Partington) +* 332d213 Update: Ensure `indent` handles nested functions correctly (fixes #7249) (#7265) (Teddy Katz) +* c36d842 Update: add fixer for `no-useless-computed-key` (#7207) (Teddy Katz) +* 18376cf Update: add fixer for `lines-around-directive` (#7217) (Teddy Katz) +* f8e8fab Update: add fixer for `wrap-iife` (#7196) (Teddy Katz) +* 558b444 Docs: Add @not-an-aardvark to development team (#7279) (Ilya Volodin) +* cd1dc57 Update: Add a fixer for `dot-location` (#7186) (Teddy Katz) +* 89787b2 Update: for `yoda`, add a fixer (#7199) (Teddy Katz) +* 742ae67 Fix: avoid indent and no-mixed-spaces-and-tabs conflicts (fixes #7248) (#7266) (Teddy Katz) +* 85b8714 Fix: Use error templates even when reading from stdin (fixes #7213) (#7223) (Teddy Katz) +* 66adac1 Docs: correction in prefer-reflect docs (fixes #7069) (#7150) (Scott Stern) +* e3f95de Update: Fix `no-extra-parens` false negative (fixes #7229) (#7231) (Teddy Katz) +* 2909c19 Docs: Fix typo in object-shorthand docs (#7267) (Brian Donovan) +* 7bb800d Chore: add internal rule to enforce meta.docs conventions (fixes #6954) (#7155) (Vitor Balocco) +* 722c68c Docs: add code fences to the issue template (#7254) (Teddy Katz) + +v3.6.1 - September 26, 2016 + +* b467436 Upgrade: Upgrade Espree to 3.3.1 (#7253) (Ilya Volodin) +* 299a563 Build: Do not strip .md extension from absolute URLs (#7222) (Kai Cataldo) +* 27042d2 Chore: removed unused code related to scopeMap (#7218) (Yang Su) +* d154204 Chore: Lint bin/eslint.js (#7243) (Kevin Partington) +* 87625fa Docs: Improve eol-last examples in docs (#7227) (Chainarong Tangsurakit) +* de8eaa4 Docs: `class-methods-use-this`: fix option name (#7224) (Jordan Harband) +* 2355f8d Docs: Add Brunch plugin to integrations (#7225) (Aleksey Shvayka) +* a5817ae Docs: Default option from `operator-linebreak` is `after`and not always (#7228) (Konstantin Pschera) + +v3.6.0 - September 23, 2016 + +* 1b05d9c Update: add fixer for `strict` (fixes #6668) (#7198) (Teddy Katz) +* 0a36138 Docs: Update ecmaVersion instructions (#7195) (Nicholas C. Zakas) +* aaa3779 Update: Allow `space-unary-ops` to handle await expressions (#7174) (Teddy Katz) +* 91bf477 Update: add fixer for `prefer-template` (fixes #6978) (#7165) (Teddy Katz) +* 745343f Update: `no-extra-parens` supports async/await (refs #7101) (#7178) (Toru Nagashima) +* 8e1fee1 Fix: Handle number literals correctly in `no-whitespace-before-property` (#7185) (Teddy Katz) +* 462a3f7 Update: `keyword-spacing` supports async/await (refs #7101) (#7179) (Toru Nagashima) +* 709a734 Update: Allow template string in `valid-typeof` comparison (fixes #7166) (#7168) (Teddy Katz) +* f71937a Fix: Don't report async/generator callbacks in `array-callback-return` (#7172) (Teddy Katz) +* 461b015 Fix: Handle async functions correctly in `prefer-arrow-callback` fixer (#7173) (Teddy Katz) +* 7ea3e4b Fix: Handle await expressions correctly in `no-unused-expressions` (#7175) (Teddy Katz) +* 16bb802 Update: Ensure `arrow-parens` handles async arrow functions correctly (#7176) (Teddy Katz) +* 2d10657 Chore: add tests for `generator-star-spacing` and async (refs #7101) (#7182) (Toru Nagashima) +* c118d21 Update: Let `no-restricted-properties` check destructuring (fixes #7147) (#7151) (Teddy Katz) +* 9e0b068 Fix: valid-jsdoc does not throw on FieldType without value (fixes #7184) (#7187) (Kai Cataldo) +* 4b5d9b7 Docs: Update process for evaluating proposals (fixes #7156) (#7183) (Kai Cataldo) +* 95c777a Update: Make `no-restricted-properties` more flexible (fixes #7137) (#7139) (Teddy Katz) +* 0fdf23c Update: fix `quotes` rule's false negative (fixes #7084) (#7141) (Toru Nagashima) +* f2a789d Update: fix `no-unused-vars` false negative (fixes #7124) (#7143) (Toru Nagashima) +* 6148d85 Fix: Report columns for `eol-last` correctly (fixes #7136) (#7149) (kdex) +* e016384 Update: add fixer for quote-props (fixes #6996) (#7095) (Teddy Katz) +* 35f7be9 Upgrade: espree to 3.2.0, remove tests with SyntaxErrors (fixes #7169) (#7170) (Teddy Katz) +* 28ddcf8 Fix: `max-len`: `ignoreTemplateLiterals`: handle 3+ lines (fixes #7125) (#7138) (Jordan Harband) +* 660e091 Docs: Update rule descriptions (fixes #5912) (#7152) (Kenneth Williams) +* 8b3fc32 Update: Make `indent` report lines with mixed spaces/tabs (fixes #4274) (#7076) (Teddy Katz) +* b39ac2c Update: add fixer for `no-regex-spaces` (#7113) (Teddy Katz) +* cc80467 Docs: Update PR templates for formatting (#7128) (Nicholas C. Zakas) +* 76acbb5 Fix: include LogicalExpression in indent length calc (fixes #6731) (#7087) (Alec) +* a876673 Update: no-implicit-coercion checks TemplateLiterals (fixes #7062) (#7121) (Kai Cataldo) +* 8db4f0c Chore: Enable `typeof` check for `no-undef` rule in eslint-config-eslint (#7103) (Teddy Katz) +* 7e8316f Docs: Update release process (#7127) (Nicholas C. Zakas) +* 22edd8a Update: `class-methods-use-this`: `exceptMethods` option (fixes #7085) (#7120) (Jordan Harband) +* afd132a Fix: line-comment-position "above" string option now works (fixes #7100) (#7102) (Kevin Partington) +* 1738b2e Chore: fix name of internal-no-invalid-meta test file (#7142) (Vitor Balocco) +* ac0bb62 Docs: Fixes examples for allowTemplateLiterals (fixes #7115) (#7135) (Zoe Ingram) +* bcfa3e5 Update: Add `always`/`never` option to `eol-last` (fixes #6938) (#6952) (kdex) +* 0ca26d9 Docs: Distinguish examples for space-before-blocks (#7132) (Timo Tijhof) +* 9a2aefb Chore: Don't require an issue reference in check-commit npm script (#7104) (Teddy Katz) +* c85fd84 Fix: max-statements-per-line rule to force minimum to be 1 (fixes #7051) (#7092) (Scott Stern) +* e462e47 Docs: updates category of no-restricted-properties (fixes #7112) (#7118) (Alec) +* 6ae660b Fix: Don't report comparisons of two typeof expressions (fixes #7078) (#7082) (Teddy Katz) +* 710f205 Docs: Fix typos in Issues section of Maintainer's Guide (#7114) (Kai Cataldo) +* 546a3ca Docs: Clarify that linter does not process configuration (fixes #7108) (#7110) (Kevin Partington) +* 0d50943 Docs: Elaborate on `guard-for-in` best practice (fixes #7071) (#7094) (Dallon Feldner) +* 58e6d76 Docs: Fix examples for no-restricted-properties (#7099) (not-an-aardvark) +* 6cfe519 Docs: Corrected typo in line-comment-position rule doc (#7097) (Alex Mercier) +* f02e52a Docs: Add fixable note to no-implicit-coercion docs (#7096) (Brandon Mills) + +v3.5.0 - September 9, 2016 + +* 08fa538 Update: fix false negative of `arrow-spacing` (fixes #7079) (#7080) (Toru Nagashima) +* cec65e3 Update: add fixer for no-floating-decimal (fixes #7070) (#7081) (not-an-aardvark) +* 2a3f699 Fix: Column number for no-multiple-empty-lines (fixes #7086) (#7088) (Ian VanSchooten) +* 6947299 Docs: Add info about closing accepted issues to docs (fixes #6979) (#7089) (Kai Cataldo) +* d30157a Docs: Add link to awesome-eslint in integrations page (#7090) (Vitor Balocco) +* 457be1b Docs: Update so issues are not required (fixes #7015) (#7072) (Nicholas C. Zakas) +* d9513b7 Fix: Allow linting of .hidden files/folders (fixes #4828) (#6844) (Ian VanSchooten) +* 6d97c18 New: `max-len`: `ignoreStrings`+`ignoreTemplateLiterals` (fixes #5805) (#7049) (Jordan Harband) +* 538d258 Update: make no-implicit-coercion support autofixing. (fixes #7056) (#7061) (Eli White) +* 883316d Update: add fixer for prefer-arrow-callback (fixes #7002) (#7004) (not-an-aardvark) +* 7502eed Update: auto-fix for `comma-style` (fixes #6941) (#6957) (Gyandeep Singh) +* 645dda5 Update: add fixer for dot-notation (fixes #7014) (#7054) (not-an-aardvark) +* 2657846 Fix: `no-console` ignores user-defined console (fixes #7010) (#7058) (Toru Nagashima) +* 656bb6e Update: add fixer for newline-before-return (fixes #5958) (#7050) (Vitor Balocco) +* 1f995c3 Fix: no-implicit-coercion string concat false positive (fixes #7057) (#7060) (Kai Cataldo) +* 6718749 Docs: Clarify that `es6` env also sets `ecmaVersion` to 6 (#7067) (Jérémie Astori) +* e118728 Update: add fixer for wrap-regex (fixes #7013) (#7048) (not-an-aardvark) +* f4fcd1e Update: add more `indent` options for functions (fixes #6052) (#7043) (not-an-aardvark) +* 657eee5 Update: add fixer for new-parens (fixes #6994) (#7047) (not-an-aardvark) +* ff19aa9 Update: improve `max-statements-per-line` message (fixes #6287) (#7044) (Jordan Harband) +* 3960617 New: `prefer-numeric-literals` rule (fixes #6068) (#7029) (Annie Zhang) +* fa760f9 Chore: no-regex-spaces uses internal rule message format (fixes #7052) (#7053) (Kevin Partington) +* 22c7e09 Update: no-magic-numbers false negative on reassigned vars (fixes #4616) (#7028) (not-an-aardvark) +* be29599 Update: Throw error if whitespace found in plugin name (fixes #6854) (#6960) (Jesse Ostrander) +* 4063a79 Fix: Rule message placeholders can be inside braces (fixes #6988) (#7041) (Kevin Partington) +* 52e8d9c Docs: Clean up sort-vars (#7045) (Matthew Dunsdon) +* 4126f12 Chore: Rule messages use internal rule message format (fixes #6977) (#6989) (Kevin Partington) +* 46cb690 New: `no-restricted-properties` rule (fixes #3218) (#7017) (Eli White) +* 00b3042 Update: Pass file path to parse function (fixes #5344) (#7024) (Annie Zhang) +* 3f13325 Docs: Add kaicataldo and JamesHenry to our teams (#7039) (alberto) +* 8e77f16 Update: `new-parens` false negative (fixes #6997) (#6999) (Toru Nagashima) +* 326f457 Docs: Add missing 'to' in no-restricted-modules (#7022) (Oskar Risberg) +* 8277357 New: `line-comment-position` rule (fixes #6077) (#6953) (alberto) +* c1f0d76 New: `lines-around-directive` rule (fixes #6069) (#6998) (Kai Cataldo) +* 61f1de0 Docs: Fix typo in no-debugger (#7019) (Denis Ciccale) +* 256c4a2 Fix: Allow separate mode option for multiline and align (fixes #6691) (#6991) (Annie Zhang) +* a989a7c Docs: Declaring dependency on eslint in shared config (fixes #6617) (#6985) (alberto) +* 6869c60 Docs: Fix minor typo in no-extra-parens doc (#6992) (Jérémie Astori) +* 28f1619 Docs: Update the example of SwitchCase (#6981) (fish) + +v3.4.0 - August 26, 2016 + +* c210510 Update: add fixer for no-extra-parens (fixes #6944) (#6950) (not-an-aardvark) +* ca3d448 Fix: `prefer-const` false negative about `eslintUsed` (fixes #5837) (#6971) (Toru Nagashima) +* 1153955 Docs: Draft of JSCS migration guide (refs #5859) (#6942) (Nicholas C. Zakas) +* 3e522be Fix: false negative of `indent` with `else if` statements (fixes #6956) (#6965) (not-an-aardvark) +* 2dfb290 Docs: Distinguish examples in rules under Stylistic Issues part 7 (#6760) (Kenneth Williams) +* 3c710c9 Fix: rename "AirBnB" => "Airbnb" init choice (fixes #6969) (Harrison Shoff) +* 7660b39 Fix: `object-curly-spacing` for type annotations (fixes #6940) (#6945) (Toru Nagashima) +* 21ab784 New: do not remove non visited files from cache. (fixes #6780) (#6921) (Roy Riojas) +* 3a1763c Fix: enable `@scope/plugin/ruleId`-style specifier (refs #6362) (#6939) (Toru Nagashima) +* d6fd064 Update: Add never option to multiline-ternary (fixes #6751) (#6905) (Kai Cataldo) +* 0d268f1 New: `symbol-description` rule (fixes #6778) (#6825) (Jarek Rencz) +* a063d4e Fix: no-cond-assign within a function expression (fixes #6908) (#6909) (Patrick McElhaney) +* 16db93a Build: Tag docs, publish release notes (fixes #6892) (#6934) (Nicholas C. Zakas) +* 0cf1d55 Chore: Fix object-shorthand errors (fixes #6958) (#6959) (Kai Cataldo) +* 8851ddd Fix: Improve pref of globbing by inheriting glob.GlobSync (fixes #6710) (#6783) (Kael Zhang) +* cf2242c Update: `requireStringLiterals` option for `valid-typeof` (fixes #6698) (#6923) (not-an-aardvark) +* 8561389 Fix: `no-trailing-spaces` wrong fixing (fixes #6933) (#6937) (Toru Nagashima) +* 6a92be5 Docs: Update semantic versioning policy (#6935) (alberto) +* a5189a6 New: `class-methods-use-this` rule (fixes #5139) (#6881) (Gyandeep Singh) +* 1563808 Update: add support for ecmaVersion 20xx (fixes #6750) (#6907) (Kai Cataldo) +* d8b770c Docs: Change rule descriptions for consistent casing (#6915) (Brandon Mills) +* c676322 Chore: Use object-shorthand batch 3 (refs #6407) (#6914) (Kai Cataldo) + +v3.3.1 - August 15, 2016 + +* a2f06be Build: optimize rule page title for small browser tabs (fixes #6888) (#6904) (Vitor Balocco) +* 02a00d6 Docs: clarify rule details for no-template-curly-in-string (#6900) (not-an-aardvark) +* b9b3446 Fix: sort-keys ignores destructuring patterns (fixes #6896) (#6899) (Kai Cataldo) +* 3fe3a4f Docs: Update options in `object-shorthand` (#6898) (Grant Snodgrass) +* cd09c96 Chore: Use object-shorthand batch 2 (refs #6407) (#6897) (Kai Cataldo) +* 2841008 Chore: Use object-shorthand batch 1 (refs #6407) (#6893) (Kai Cataldo) + +v3.3.0 - August 12, 2016 + +* 683ac56 Build: Add CI release scripts (fixes #6884) (#6885) (Nicholas C. Zakas) +* ebf8441 Update: `prefer-rest-params` relax for member accesses (fixes #5990) (#6871) (Toru Nagashima) +* df01c4f Update: Add regex support for exceptions (fixes #5187) (#6883) (Annie Zhang) +* 055742c Fix: `no-dupe-keys` type errors (fixes #6886) (#6889) (Toru Nagashima) +* e456fd3 New: `sort-keys` rule (fixes #6076) (#6800) (Toru Nagashima) +* 3e879fc Update: Rule "eqeqeq" to have more specific null handling (fixes #6543) (#6849) (Simon Sturmer) +* e8cb7f9 Chore: use eslint-plugin-node (refs #6407) (#6862) (Toru Nagashima) +* e37bbd8 Docs: Remove duplicate statement (#6878) (Richard Käll) +* 11395ca Fix: `no-dupe-keys` false negative (fixes #6801) (#6863) (Toru Nagashima) +* 1ecd2a3 Update: improve error message in `no-control-regex` (#6839) (Jordan Harband) +* d610d6c Update: make `max-lines` report the actual number of lines (fixes #6766) (#6764) (Jarek Rencz) +* b256c50 Chore: Fix glob for core js files for lint (fixes #6870) (#6872) (Gyandeep Singh) +* f8ab8f1 New: func-call-spacing rule (fixes #6080) (#6749) (Brandon Mills) +* be68f0b New: no-template-curly-in-string rule (fixes #6186) (#6767) (Jeroen Engels) +* 80789ab Chore: don't throw if rule is in old format (fixes #6848) (#6850) (Vitor Balocco) +* d47c505 Fix: `newline-after-var` false positive (fixes #6834) (#6847) (Toru Nagashima) +* bf0afcb Update: validate void operator in no-constant-condition (fixes #5726) (#6837) (Vitor Balocco) +* 5ef839e New: Add consistent and ..-as-needed to object-shorthand (fixes #5438) (#5439) (Martijn de Haan) +* 7e1bf01 Fix: update peerDependencies of airbnb option for `--init` (fixes #6843) (#6846) (Vitor Balocco) +* 8581f4f Fix: `no-invalid-this` false positive (fixes #6824) (#6827) (Toru Nagashima) +* 90f78f4 Update: add `props` option to `no-self-assign` rule (fixes #6718) (#6721) (Toru Nagashima) +* 30d71d6 Update: 'requireForBlockBody' modifier for 'arrow-parens' (fixes #6557) (#6558) (Nicolas Froidure) +* cdded07 Chore: use native `Object.assign` (refs #6407) (#6832) (Gyandeep Singh) +* 579ec49 Chore: Add link to rule change guidelines in "needs info" template (fixes #6829) (#6831) (Kevin Partington) +* 117e7aa Docs: Remove incorrect "constructor" statement from `no-new-symbol` docs (#6830) (Jarek Rencz) +* aef18b4 New: `no-unsafe-negation` rule (fixes #2716) (#6789) (Toru Nagashima) +* d94e945 Docs: Update Getting Started w/ Readme installation instructions (#6823) (Kai Cataldo) +* dfbc112 Upgrade: proxyquire to 1.7.10 (fixes #6821) (#6822) (alberto) +* 4c5e911 Chore: enable `prefer-const` and apply it to our codebase (refs #6407) (#6805) (Toru Nagashima) +* e524d16 Update: camelcase rule fix for import declarations (fixes #6755) (#6784) (Lorenzo Zottar) +* 8f3509d Update: make `eslint:all` excluding deprecated rules (fixes #6734) (#6756) (Toru Nagashima) +* 2b17459 New: `no-global-assign` rule (fixes #6586) (#6746) (alberto) + +v3.2.2 - August 1, 2016 + +* 510ce4b Upgrade: file-entry-cache@^1.3.1 (fixes #6816, refs #6780) (#6819) (alberto) +* 46b14cd Fix: ignore MemberExpression in VariableDeclarators (fixes #6795) (#6815) (Nicholas C. Zakas) + +v3.2.1 - August 1, 2016 + +* 584577a Build: Pin file-entry-cache to avoid licence issue (refs #6816) (#6818) (alberto) +* 38d0d23 Docs: clarify minor releases and suggest using `~ to version (#6804) (Henry Zhu) +* 4ca809e Fix: Normalizes messages so all end with a period (fixes #6762) (#6807) (Patrick McElhaney) +* c7488ac Fix: Make MemberExpression option opt-in (fixes #6797) (#6798) (Rich Trott) +* 715e8fa Docs: Update issue closing policy (fixes #6765) (#6808) (Nicholas C. Zakas) +* 288f7bf Build: Fix site generation (fixes #6791) (#6793) (Nicholas C. Zakas) +* 261a9f3 Docs: Update JSCS status in README (#6802) (alberto) +* 5ae0887 Docs: Update no-void.md (#6799) (Daniel Hritzkiv) + +v3.2.0 - July 29, 2016 + +* 2438ee2 Upgrade: Update markdownlint dependency to 0.2.0 (fixes #6781) (#6782) (David Anson) +* 4fc0018 Chore: dogfooding `no-var` rule and remove `var`s (refs #6407) (#6757) (Toru Nagashima) +* b22eb5c New: `no-tabs` rule (fixes #6079) (#6772) (Gyandeep Singh) +* ddea63a Chore: Updated no-control-regex tests to cover all cases (fixes #6438) (#6752) (Efe Gürkan YALAMAN) +* 1025772 Docs: Add plugin example to disabling with comments guide (fixes #6742) (#6747) (Brandon Mills) +* 628aae4 Docs: fix inconsistent spacing inside block comment (#6768) (Brian Jacobel) +* 2983c32 Docs: Add options to func-names config comments (#6748) (Brandon Mills) +* 2f94443 Docs: fix wrong path (#6763) (molee1905) +* 6f3faa4 Revert "Build: Remove support for Node v5 (fixes #6743)" (#6758) (Nicholas C. Zakas) +* 99dfd1c Docs: fix grammar issue in rule-changes page (#6761) (Vitor Balocco) +* e825458 Fix: Rule no-unused-vars had missing period (fixes #6738) (#6739) (Brian Mock) +* 71ae64c Docs: Clarify cache file deletion (fixes #4943) (#6712) (Nicholas C. Zakas) +* 26c85dd Update: merge warnings of consecutive unreachable nodes (fixes #6583) (#6729) (Toru Nagashima) +* 106e40b Fix: Correct grammar in object-curly-newline reports (fixes #6725) (#6728) (Vitor Balocco) +* e00754c Chore: Dogfooding ES6 rules (refs #6407) (#6735) (alberto) +* 181b26a Build: Remove support for Node v5 (fixes #6743) (#6744) (alberto) +* 5320a6c Update: `no-use-before-define` false negative on for-in/of (fixes #6699) (#6719) (Toru Nagashima) +* a2090cb Fix: space-infix-ops doesn't fail for type annotations(fixes #5211) (#6723) (Nicholas C. Zakas) +* 9c36ecf Docs: Add @vitorbal and @platinumazure to development team (Ilya Volodin) +* e09d1b8 Docs: describe all RuleTester options (fixes #4810, fixes #6709) (#6711) (Nicholas C. Zakas) +* a157f47 Chore: Update CLIEngine option desc (fixes #5179) (#6713) (Nicholas C. Zakas) +* a0727f9 Chore: fix `.gitignore` for vscode (refs #6383) (#6720) (Toru Nagashima) +* 75d2d43 Docs: Clarify Closure type hint expectation (fixes #5231) (#6714) (Nicholas C. Zakas) +* 95ea25a Update: Check indentation of multi-line chained properties (refs #1801) (#5940) (Rich Trott) +* e7b1e1c Docs: Edit issue/PR waiting period docs (fixes #6009) (#6715) (Nicholas C. Zakas) +* 053aa0c Update: Added 'allowSuper' option to `no-underscore-dangle` (fixes #6355) (#6662) (peteward44) +* 8929045 Build: Automatically generate rule index (refs #2860) (#6658) (Ilya Volodin) +* f916ae5 Docs: Fix multiline-ternary typos (#6704) (Cédric Malard) +* c64b0c2 Chore: First ES6 refactoring (refs #6407) (#6570) (Nicholas C. Zakas) + +v3.1.1 - July 18, 2016 + +* 565e584 Fix: `eslint:all` causes regression in 3.1.0 (fixes #6687) (#6696) (alberto) +* cb90359 Fix: Allow named recursive functions (fixes #6616) (#6667) (alberto) +* 3f206dd Fix: `balanced` false positive in `spaced-comment` (fixes #6689) (#6692) (Grant Snodgrass) +* 57f1676 Docs: Add missing brackets from code examples (#6700) (Plusb Preco) +* 124f066 Chore: Remove fixable key from multiline-ternary metadata (fixes #6683) (#6688) (Kai Cataldo) +* 9f96086 Fix: Escape control characters in XML. (fixes #6673) (#6672) (George Chung) + +v3.1.0 - July 15, 2016 + +* e8f8c6c Fix: incorrect exitCode when eslint is called with --stdin (fixes #6677) (#6682) (Steven Humphrey) +* 38639bf Update: make `no-var` fixable (fixes #6639) (#6644) (Toru Nagashima) +* dfc20e9 Fix: `no-unused-vars` false positive in loop (fixes #6646) (#6649) (Toru Nagashima) +* 2ba75d5 Update: relax outerIIFEBody definition (fixes #6613) (#6653) (Stephen E. Baker) +* 421e4bf Chore: combine multiple RegEx replaces with one (fixes #6669) (#6661) (Sakthipriyan Vairamani) +* 089ee2c Docs: fix typos,wrong path,backticks (#6663) (molee1905) +* ef827d2 Docs: Add another pre-commit hook to integrations (#6666) (David Alan Hjelle) +* a343b3c Docs: Fix option typo in no-underscore-dangle (Fixes #6674) (#6675) (Luke Page) +* 5985eb2 Chore: add internal rule that validates meta property (fixes #6383) (#6608) (Vitor Balocco) +* 4adb15f Update: Add `balanced` option to `spaced-comment` (fixes #4133) (#6575) (Annie Zhang) +* 1b13c25 Docs: fix incorrect example being mark as correct (#6660) (David Björklund) +* a8b4e40 Fix: Install required eslint plugin for "standard" guide (fixes #6656) (#6657) (Feross Aboukhadijeh) +* 720686b New: `endLine` and `endColumn` of the lint result. (refs #3307) (#6640) (Toru Nagashima) +* 54faa46 Docs: Small tweaks to CLI documentation (fixes #6627) (#6642) (Kevin Partington) +* e108850 Docs: Added examples and structure to `padded-blocks` (fixes #6628) (#6643) (alberto) +* 350e1c0 Docs: Typo (#6650) (Peter Rood) +* b837c92 Docs: Correct a term in max-len.md (fixes #6637) (#6641) (Vse Mozhet Byt) +* baeb313 Fix: Warning behavior for executeOnText (fixes #6611) (#6632) (Nicholas C. Zakas) +* e6004be Chore: Enable preferType in valid-jsdoc (refs #5188) (#6634) (Nicholas C. Zakas) +* ca323cf Fix: Use default assertion messages (fixes #6532) (#6615) (Dmitrii Abramov) +* 2bdf22c Fix: Do not throw exception if baseConfig is provided (fixes #6605) (#6625) (Kevin Partington) +* e42cacb Upgrade: mock-fs to 3.10, fixes for Node 6.3 (fixes #6621) (#6624) (Tim Schaub) +* 8a263ae New: multiline-ternary rule (fixes #6066) (#6590) (Kai Cataldo) +* e951303 Update: Adding new `key-spacing` option (fixes #5613) (#5907) (Kyle Mendes) +* 10c3e91 Docs: Remove reference from 3.0.0 migration guide (refs #6605) (#6618) (Kevin Partington) +* 5010694 Docs: Removed non-existing resource (#6609) (Moritz Kröger) +* 6d40d85 Docs: Note that PR requires ACCEPTED issue (refs #6568) (#6604) (Patrick McElhaney) + +v3.0.1 - July 5, 2016 + +* 27700cf Fix: `no-unused-vars` false positive around callback (fixes #6576) (#6579) (Toru Nagashima) +* 124d8a3 Docs: Pull request template (#6568) (Nicholas C. Zakas) +* e9a2ed9 Docs: Fix rules\id-length exceptions typos (fixes #6397) (#6593) (GramParallelo) +* a2cfa1b Fix: Make outerIIFEBody work correctly (fixes #6585) (#6596) (Nicholas C. Zakas) +* 9c451a2 Docs: Use string severity in example (#6601) (Kenneth Williams) +* 8308c0b Chore: remove path-is-absolute in favor of the built-in (fixes #6598) (#6600) (shinnn) +* 7a63717 Docs: Add missing pull request step (fixes #6595) (#6597) (Nicholas C. Zakas) +* de3ed84 Fix: make `no-unused-vars` ignore for-in (fixes #2342) (#6126) (Oleg Gaidarenko) +* 6ef2cbe Fix: strip Unicode BOM of config files (fixes #6556) (#6580) (Toru Nagashima) +* ee7fcfa Docs: Correct type of `outerIIFEBody` in `indent` (fixes #6581) (#6584) (alberto) +* 25fc7b7 Fix: false negative of `max-len` (fixes #6564) (#6565) (not-an-aardvark) +* f6b8452 Docs: Distinguish examples in rules under Stylistic Issues part 6 (#6567) (Kenneth Williams) + +v3.0.0 - July 1, 2016 + +* 66de9d8 Docs: Update installation instructions on README (#6569) (Nicholas C. Zakas) +* dc5b78b Breaking: Add `require-yield` rule to `eslint:recommended` (fixes #6550) (#6554) (Gyandeep Singh) +* 7988427 Fix: lib/config.js tests pass if personal config exists (fixes #6559) (#6566) (Kevin Partington) +* 4c05967 Docs: Update rule docs for new format (fixes #5417) (#6551) (Nicholas C. Zakas) +* 70da5a8 Docs: Correct link to rules page (#fixes 6553) (#6561) (alberto) +* e2b2030 Update: Check RegExp strings for `no-regex-spaces` (fixes #3586) (#6379) (Jackson Ray Hamilton) +* 397e51b Update: Implement outerIIFEBody for indent rule (fixes #6259) (#6382) (David Shepherd) +* 666da7c Docs: 3.0.0 migration guide (#6521) (Nicholas C. Zakas) +* b9bf8fb Docs: Update Governance Policy (fixes #6452) (#6522) (Nicholas C. Zakas) +* 1290657 Update: `no-unused-vars` ignores read it modifies itself (fixes #6348) (#6535) (Toru Nagashima) +* d601f6b Fix: Delete cache only when executing on files (fixes #6459) (#6540) (Kai Cataldo) +* e0d4b19 Breaking: Error thrown/printed if no config found (fixes #5987) (#6538) (Kevin Partington) +* 18663d4 Fix: false negative of `no-useless-rename` (fixes #6502) (#6506) (Toru Nagashima) +* 0a7936d Update: Add fixer for prefer-const (fixes #6448) (#6486) (Nick Heiner) +* c60341f Chore: Update index and `meta` for `"eslint:recommended"` (refs #6403) (#6539) (Mark Pedrotti) +* 73da28d Better wording for the error reported by the rule "no-else-return" #6411 (#6413) (Olivier Thomann) +* e06a5b5 Update: Add fixer for arrow-parens (fixes #4766) (#6501) (madmed88) +* 5f8f3e8 Docs: Remove Box as a sponsor (#6529) (Nicholas C. Zakas) +* 7dfe0ad Docs: fix max-lines samples (fixes #6516) (#6515) (Dmitriy Shekhovtsov) +* fa05119 Breaking: Update eslint:recommended (fixes #6403) (#6509) (Nicholas C. Zakas) +* e96177b Docs: Add "Proposing a Rule Change" link to CONTRIBUTING.md (#6511) (Kevin Partington) +* bea9096 Docs: Update pull request steps (fixes #6474) (#6510) (Nicholas C. Zakas) +* 7bcf6e0 Docs: Consistent example headings & text pt3 (refs #5446) (#6492) (Guy Fraser) +* 1a328d9 Docs: Consistent example headings & text pt4 (refs #5446) (#6493) (Guy Fraser) +* ff5765e Docs: Consistent example headings & text pt2 (refs #5446)(#6491) (Guy Fraser) +* 01384fa Docs: Fixing typos (refs #5446)(#6494) (Guy Fraser) +* 4343ae8 Fix: false negative of `object-shorthand` (fixes #6429) (#6434) (Toru Nagashima) +* b7d8c7d Docs: more accurate yoda-speak (#6497) (Tony Lukasavage) +* 3b0ab0d Fix: add warnIgnored flag to CLIEngine.executeOnText (fixes #6302) (#6305) (Robert Levy) +* c2c6cec Docs: Mark object-shorthand as fixable. (#6485) (Nick Heiner) +* 5668236 Fix: Allow objectsInObjects exception when destructuring (fixes #6469) (#6470) (Adam Renklint) +* 17ac0ae Fix: `strict` rule reports a syntax error for ES2016 (fixes #6405) (#6464) (Toru Nagashima) +* 4545123 Docs: Rephrase documentation for `no-duplicate-imports` (#6463) (Simen Bekkhus) +* 1b133e3 Docs: improve `no-native-reassign` and specifying globals (fixes #5358) (#6462) (Toru Nagashima) +* b179373 Chore: Remove dead code in excuteOnFiles (fixes #6467) (#6466) (Andrew Hutchings) +* 18fbc4b Chore: Simplify eslint process exit code (fixes #6368) (#6371) (alberto) +* 58542e4 Breaking: Drop support for node < 4 (fixes #4483) (#6401) (alberto) +* f50657e Breaking: use default for complexity in eslint:recommended (fixes #6021) (#6410) (alberto) +* 3e690fb Fix: Exit init early if guide is chosen w/ no package.json (fixes #6476) (#6478) (Kai Cataldo) + +v2.13.1 - June 20, 2016 + +* 434de7f Fix: wrong baseDir (fixes #6450) (#6457) (Toru Nagashima) +* 3c9ce09 Fix: Keep indentation when fixing `padded-blocks` "never" (fixes #6454) (#6456) (Ed Lee) +* a9d4cb2 Docs: Fix typo in max-params examples (#6471) (J. William Ashton) +* 1e185b9 Fix: no-multiple-empty-lines errors when no line breaks (fixes #6449) (#6451) (strawbrary) + +v2.13.0 - June 17, 2016 + +* cf223dd Fix: add test for a syntax error (fixes #6013) (#6378) (Toru Nagashima) +* da30cf9 Update: Add fixer for object-shorthand (fixes #6412) (#6418) (Nick Heiner) +* 2cd90eb Chore: Fix rule meta description inconsistencies (refs #5417) (#6422) (Mark Pedrotti) +* d798b2c Added quotes around "classes" option key (#6441) (Guy Fraser) +* 852b6df Docs: Delete empty table of links from Code Path Analysis (#6423) (Mark Pedrotti) +* 5e9117e Chore: sort rules in eslint.json (fixes #6425) (#6426) (alberto) +* c2b5277 Docs: Add gitter chat link to Reporting Bugs (#6430) (Mark Pedrotti) +* 1316db0 Update: Add `never` option for `func-names` (fixes #6059) (#6392) (alberto) +* 1c123e2 Update: Add autofix for `padded-blocks` (fixes #6320) (#6393) (alberto) +* 8ec89c8 Fix: `--print-config` return config inside subdir (fixes #6329) (#6385) (alberto) +* 4f73240 Fix: `object-curly-newline` multiline with comments (fixes #6381) (#6396) (Toru Nagashima) +* 77697a7 Chore: Fake config hierarchy fixtures (fixes #6206) (#6402) (Gyandeep Singh) +* 73a9a6d Docs: Fix links in Configuring ESLint (#6421) (Mark Pedrotti) +* ed84c4c Fix: improve `newline-per-chained-call` message (fixes #6340) (#6360) (Toru Nagashima) +* 9ea4e44 Docs: Update parser reference to `espree` instead of `esprima` (#6404) (alberto) +* 7f57467 Docs: Make `fix` param clearer (fixes #6366) (#6367) (Nick Heiner) +* fb49c7f Fix: nested `extends` with relative path (fixes #6358) (#6359) (Toru Nagashima) +* 5122f73 Update: no-multiple-empty-lines fixer (fixes #6225) (#6226) (Ruurd Moelker) +* 0e7ce72 Docs: Fix rest-spread-spacing's name (#6365) (cody) +* cfdd524 Fix: allow semi as braceless body of statements (fixes #6386) (#6391) (alberto) +* 6b08cfc Docs: key-spacing fixable documenation notes (fixes #6375) (#6376) (Ruurd Moelker) +* 4b4be3b Docs: `max-lines` option: fix `skipComments` typo (#6374) (Jordan Harband) +* 20ab4f6 Docs: Fix wrong link in object-curly-newline (#6373) (Grant Snodgrass) +* 412ce8d Docs: Fix broken links in no-mixed-operators (#6372) (Grant Snodgrass) + +v2.12.0 - June 10, 2016 + +* 54c30fb Update: Add explicit default option `always` for `eqeqeq` (refs #6144) (#6342) (alberto) +* 2d63370 Update: max-len will warn indented comment lines (fixes #6322) (#6324) (Kai Cataldo) +* dcd4ad7 Docs: clarify usage of inline disable comments (fixes #6335) (#6347) (Kai Cataldo) +* c03300b Docs: Clarified how plugin rules look in plugin configs (fixes #6346) (#6351) (Kevin Partington) +* 9c87709 Docs: Add semantic versioning policy (fixes #6244) (#6343) (Nicholas C. Zakas) +* 5affab1 Docs: Describe values under Extending Configuration Files (refs #6240) (#6336) (Mark Pedrotti) +* 2520f5a New: `max-lines` rule (fixes #6078) (#6321) (alberto) +* 9bfbc64 Update: Option for object literals in `arrow-body-style` (fixes #5936) (#6216) (alberto) +* 977cdd5 Chore: remove unused method from FileFinder (fixes #6344) (#6345) (alberto) +* 477fbc1 Docs: Add section about customizing RuleTester (fixes #6227) (#6331) (Jeroen Engels) +* 0e14016 New: `no-mixed-operators` rule (fixes #6023) (#6241) (Toru Nagashima) +* 6e03c4b Update: Add never option to arrow-body-style (fixes #6317) (#6318) (Andrew Hyndman) +* f804397 New: Add `eslint:all` option (fixes #6240) (#6248) (Robert Fletcher) +* dfe05bf Docs: Link JSCS rules to their corresponding page. (#6334) (alberto) +* 1cc4356 Docs: Remove reference to numeric config (fixes #6309) (#6327) (Kevin Partington) +* 2d4efbe Docs: Describe options in rule under Strict Mode (#6312) (Mark Pedrotti) +* c1953fa Docs: Typo fix 'and' -> 'any' (#6326) (Stephen Edgar) +* d49ab4b Docs: Code conventions improvements (#6313) (Kevin Partington) +* 316a507 Fix: one-var allows uninitialized vars in ForIn/ForOf (fixes #5744) (#6272) (Kai Cataldo) +* 6cbee31 Docs: Typo fix 'colum' -> 'column' (#6306) (Andrew Cobby) +* 2663569 New: `object-curly-newline` (fixes #6072) (#6223) (Toru Nagashima) +* 72c2ea5 Update: callback-return allows for object methods (fixes #4711) (#6277) (Kai Cataldo) +* 89580a4 Docs: Distinguish examples in rules under Stylistic Issues part 5 (#6291) (Kenneth Williams) +* 1313804 New: rest-spread-spacing rule (fixes #5391) (#6278) (Kai Cataldo) +* 61dfe68 Fix: `no-useless-rename` false positive in babel-eslint (fixes #6266) (#6290) (alberto) +* c78c8cb Build: Remove commit check from appveyor (fixes #6292) (#6294) (alberto) +* 3e38fc1 Chore: more tests for comments at the end of blocks (refs #6090) (#6273) (Kai Cataldo) +* 38dccdd Docs: `--no-ignore` disables all forms of ignore (fixes #6260) (#6304) (alberto) +* bb69380 Fix: no-useless-rename handles ExperimentalRestProperty (fixes #6284) (#6288) (Kevin Partington) +* fca0679 Update: Improve perf not traversing default ignored dirs (fixes #5679) (#6276) (alberto) +* 320e8b0 Docs: Describe options in rules under Possible Errors part 4 (#6270) (Mark Pedrotti) +* 3e052c1 Docs: Mark no-useless-rename as fixable in rules index (#6297) (Dalton Santos) + +v2.11.1 - May 30, 2016 + +* 64b0d0c Fix: failed to parse `/*eslint` comments by colon (fixes #6224) (#6258) (Toru Nagashima) +* c8936eb Build: Don't check commit count (fixes #5935) (#6263) (Nicholas C. Zakas) +* 113c1a8 Fix: `max-statements-per-line` false positive at exports (fixes #6264) (#6268) (Toru Nagashima) +* 03beb27 Fix: `no-useless-rename` false positives (fixes #6266) (#6267) (alberto) +* fe89037 Docs: Fix rule name in example (#6279) (Kenneth Williams) + +v2.11.0 - May 27, 2016 + +* 77dd2b4 Fix: On --init, print message when package.json is invalid (fixes #6257) (#6261) (Kai Cataldo) +* 7f60186 Fix: `--ignore-pattern` can't uningnore files (fixes #6127) (#6253) (alberto) +* fea8fe6 New: no-useless-rename (fixes #6058) (#6249) (Kai Cataldo) +* b4cff9d Fix: Incorrect object-property-newline behavior (fixes #6207) (#6213) (RafaÅ‚ RuciÅ„ski) +* 35b4656 Docs: Edit arrow-parens.md to show correct output value (#6245) (Adam Terlson) +* ee0cd58 Fix: `newline-before-return` shouldn't disallow newlines (fixes #6176) (#6217) (alberto) +* d4f5526 Fix: `vars-on-top` crashs at export declarations (fixes #6210) (#6220) (Toru Nagashima) +* 088bda9 New: `unicode-bom` rule to allow or disallow BOM (fixes #5502) (#6230) (Andrew Johnston) +* 14bfc03 Fix: `comma-dangle` wrong autofix (fixes #6233) (#6235) (Toru Nagashima) +* cdd65d7 Docs: added examples for arrow-body-style (refs #5498) (#6242) (Tieme van Veen) +* c10c07f Fix: lost code in autofixing (refs #6233) (#6234) (Toru Nagashima) +* e6d5b1f Docs: Add rule deprecation section to user guide (fixes #5845) (#6201) (Kai Cataldo) +* 777941e Upgrade: doctrine to 1.2.2 (fixes #6121) (#6231) (alberto) +* 74c458d Update: key-spacing rule whitespace fixer (fixes #6167) (#6169) (Ruurd Moelker) +* 04bd586 New: Disallow use of Object.prototype methods on objects (fixes #2693) (#6107) (Andrew Levine) +* 53754ec Update: max in `max-statements-per-line` should be >=0 (fixes #6171) (#6172) (alberto) +* 54d1201 Update: Add treatUndefinedAsUnspecified option (fixes #6026) (#6194) (Kenneth Williams) +* 18152dd Update: Add checkLoops option to no-constant-condition (fixes #5477) (#6202) (Kai Cataldo) +* 7644908 Fix: no-multiple-empty-lines BOF and EOF defaults (fixes #6179) (#6180) (Ruurd Moelker) +* 72335eb Fix: `max-statements-per-line` false positive (fixes #6173, fixes #6153) (#6192) (Toru Nagashima) +* 9fce04e Fix: `generator-star-spacing` false positive (fixes #6135) (#6168) (Toru Nagashima) + +v2.10.2 - May 16, 2016 + +* bda5de5 Fix: Remove default parser from CLIEngine options (fixes #6182) (#6183) (alberto) +* e59e5a0 Docs: Describe options in rules under Possible Errors part 3 (#6105) (Mark Pedrotti) +* 842ab2e Build: Run phantomjs tests using karma (fixes #6128) (#6178) (alberto) + +v2.10.1 - May 14, 2016 + +* 9397135 Fix: `valid-jsdoc` false positive at default parameters (fixes #6097) (#6170) (Toru Nagashima) +* 2166ad4 Fix: warning & error count in `CLIEngine.getErrorResults` (fixes #6155) (#6157) (alberto) +* 1e0a652 Fix: ignore empty statements in max-statements-per-line (fixes #6153) (#6156) (alberto) +* f9ca0d6 Fix: `no-extra-parens` to check for nulls (fixes #6161) (#6164) (Gyandeep Singh) +* d095ee3 Fix: Parser merge sequence in config (fixes #6158) (#6160) (Gyandeep Singh) +* f33e49f Fix: `no-return-assign` to check for null tokens (fixes #6159) (#6162) (Gyandeep Singh) + +v2.10.0 - May 13, 2016 + +* 098cd9c Docs: Distinguish examples in rules under Stylistic Issues part 4 (#6136) (Kenneth Williams) +* 805742c Docs: Clarify JSX option usage (#6132) (Richard Collins) +* 10b0933 Fix: Optimize no-irregular-whitespace for the common case (fixes #6116) (#6117) (Andres Suarez) +* 36bec90 Docs: linkify URLs in development-environment.md (#6150) (chrisjshull) +* 29c401a Docs: Convert rules in index under Removed from list to table (#6091) (Mark Pedrotti) +* e13e696 Fix: `_` and `$` in isES5Constructor (fixes #6085) (#6094) (Kevin Locke) +* 67916b9 Fix: `no-loop-func` crashed (fixes #6130) (#6138) (Toru Nagashima) +* d311a62 Fix: Sort fixes consistently even if they overlap (fixes #6124) (#6133) (alberto) +* 6294459 Docs: Correct syntax for default ignores and `.eslintignore` example (#6118) (alberto) +* 067db14 Fix: Replace `assert.deepEqual` by `lodash.isEqual` (fixes #6111) (#6112) (alberto) +* 52fdf04 Fix: `no-multiple-empty-lines` duplicate errors at BOF (fixes #6113) (#6114) (alberto) +* e6f56da Docs: Document `--ignore-pattern` (#6120) (alberto) +* ef739cd Fix: Merge various command line configs at the same time (fixes #6104) (#6108) (Ed Lee) +* 767da6f Update: add returnAssign option to no-extra-parens (fixes #6036) (#6095) (Kai Cataldo) +* 06f6252 Build: Use split instead of slice/indexOf for commit check (fixes #6109) (#6110) (Ed Lee) +* c4fc39b Docs: Update headings of rules under Removed (refs #5774) (#6102) (Mark Pedrotti) +* 716345f Build: Match rule id at beginning of heading (refs #5774) (#6089) (Mark Pedrotti) +* 0734967 Update: Add an option to `prefer-const` (fixes #5692) (#6040) (Toru Nagashima) +* 7941d5e Update: Add autofix for `lines-around-comment` (fixes #5956) (#6062) (alberto) +* dc538aa Build: Pin proxyquire to ">=1.0.0 <1.7.5" (fixes #6096) (#6100) (alberto) +* 04563ca Docs: Describe options in rules under Possible Errors part 2 (#6063) (Mark Pedrotti) +* 5d390b2 Chore: Replace deprecated calls to context - batch 4 (fixes #6029) (#6087) (alberto) +* 6df4b23 Fix: `no-return-assign` warning nested expressions (fixes #5913) (#6041) (Toru Nagashima) +* 16fad58 Merge pull request #6088 from eslint/docs-one-var-per-line (alberto) +* 0b67170 Docs: Correct default for `one-var-declaration-per-line` (fixes #6017) (#6022) (Ed Lee) +* d40017f Fix: comma-style accounts for parens in array (fixes #6006) (#6038) (Kai Cataldo) +* 992d9cf Docs: Fix typography/teriminology in indent doc (fixes #6045) (#6044) (Rich Trott) +* 4ae39d2 Chore: Replace deprecated calls to context - batch 3 (refs #6029) (#6056) (alberto) +* 8633e4d Update: multipass should not exit prematurely (fixes #5995) (#6048) (alberto) +* 3c44c2c Update: Adds an avoidQuotes option for object-shorthand (fixes #3366) (#5870) (Chris Sauvé) +* a9a4652 Fix: throw when rule uses `fix` but `meta.fixable` not set (fixes #5970) (#6043) (Vitor Balocco) +* ad10106 Docs: Update comma-style docs (#6039) (Kai Cataldo) +* 388d6f8 Fix: `no-sequences` false negative at arrow expressions (fixes #6082) (#6083) (Toru Nagashima) +* 8e96064 Docs: Clarify rule example in README since we allow string error levels (#6061) (Kevin Partington) +* a66bf19 Fix: `lines-around-comment` multiple errors on same line (fixes #5965) (#5994) (alberto) +* a2cc54e Docs: Organize meta and describe visitor in Working with Rules (#5967) (Mark Pedrotti) +* ef8cbff Fix: object-shorthand should only lint computed methods (fixes #6015) (#6024) (Kai Cataldo) +* cd1b057 Chore: Replace deprecated calls to context - batch 2 (refs #6029) (#6049) (alberto) +* a3a6e06 Update: no-irregal-whitespace in a regular expression (fixes #5840) (#6018) (Linda_pp) +* 9b9d76c Chore: Replace deprecated calls to context - batch 1 (refs #6029) (#6034) (alberto) +* dd8bf93 Fix: blockless else in max-statements-per-line (fixes #5926) (#5993) (Glen Mailer) +* f84eb80 New: Add new rule `object-property-newline` (fixes #5667) (#5933) (Vitor Balocco) +* d5f4104 Docs: mention parsing errors in strict mode (fixes #5485) (#5991) (Mark Pedrotti) +* 249732e Docs: Move docs from eslint.github.io (fixes #5964) (#6012) (Nicholas C. Zakas) +* 4c2de6c Docs: Add example of diff clarity to comma-dangle rule docs (#6035) (Vitor Balocco) +* 3db2e89 Fix: Do not swallow exceptions in CLIEngine.getFormatter (fixes #5977) (#5978) (Gustav Nikolaj) +* eb2fb44 Fix: Always ignore defaults unless explicitly passed (fixes #5547) (#5820) (Ian VanSchooten) +* ab57e94 Docs: Add example of diff clarity to newline-per-chained-call (#5986) (Vitor Balocco) +* 88bc014 Docs: Update readme info about jshint (#6027) (alberto) +* a2c15cc Docs: put config example in code block (#6005) (Amos Wenger) +* a5011cb Docs: Fix a wrong examples' header of `prefer-arrow-callback`. (#6020) (Toru Nagashima) +* 1484ede Docs: Typo in nodejs-api (#6025) (alberto) +* ade6a9b Docs: typo: "eslint-disable-line" not "eslint disable-line" (#6019) (Will Day) +* 2f15354 Fix: Removed false positives of break and continue (fixes #5972) (#6000) (Onur Temizkan) + +v2.9.0 - April 29, 2016 + +* a8a2cd8 Fix: Avoid autoconfig crashes from inline comments (fixes #5992) (#5999) (Ian VanSchooten) +* 23b00e0 Upgrade: npm-license to 0.3.2 (fixes #5996) (#5998) (alberto) +* 377167d Upgrade: ignore to 3.1.2 (fixes #5979) (#5988) (alberto) +* 141b778 Fix: no-control-regex literal handling fixed. (fixes #5737) (#5943) (Efe Gürkan YALAMAN) +* 577757d Fix: Clarify color option (fixes #5928) (#5974) (Grant Snodgrass) +* e7e6581 Docs: Update CLA link (#5980) (Gustav Nikolaj) +* 0be26bc Build: Add nodejs 6 to travis (fixes #5971) (#5973) (Gyandeep Singh) +* e606523 New: Rule `no-unsafe-finally` (fixes #5808) (#5932) (Onur Temizkan) +* 42d1ecc Chore: Add metadata to existing rules - Batch 7 (refs #5417) (#5969) (Vitor Balocco) +* e2ad1ec Update: object-shorthand lints computed methods (fixes #5871) (#5963) (Chris Sauvé) +* d24516a Chore: Add metadata to existing rules - Batch 6 (refs #5417) (#5966) (Vitor Balocco) +* 1e7a3ef Fix: `id-match` false positive in property values (fixes #5885) (#5960) (Mike Sherov) +* 51ddd4b Update: Use process @abstract when processing @return (fixes #5941) (#5945) (Simon Schick) +* 52a4bea Update: Add autofix for `no-whitespace-before-property` (fixes #5927) (#5951) (alberto) +* 46e058d Docs: Correct typo in configuring.md (#5957) (Nick S. Plekhanov) +* 5f8abab Chore: Add metadata to existing rules - Batch 5 (refs #5417) (#5944) (Vitor Balocco) +* 0562f77 Chore: Add missing newlines to test cases (fixes #5947) (Rich Trott) +* fc78e78 Chore: Enable quote-props rule in eslint-config-eslint (refs #5188) (#5938) (Gyandeep Singh) +* 43f6d05 Docs: Update docs to refer to column (#5937) (Sashko Stubailo) +* 586478e Update: Add autofix for `comma-dangle` (fixes #3805) (#5925) (alberto) +* a4f9c5a Docs: Distinguish examples in rules under Stylistic Issues part 3 (Kenneth Williams) +* e7c0737 Chore: Enable no-console rule in eslint-config-eslint (refs #5188) (Kevin Partington) +* 0023fe6 Build: Add “chore†to commit tags (fixes #5880) (#5929) (Mike Sherov) +* 25d626a Upgrade: espree 3.1.4 (fixes #5923, fixes #5756) (Kai Cataldo) +* a01b412 New: Add `no-useless-computed-key` rule (fixes #5402) (Burak Yigit Kaya) +* 9afb9cb Chore: Remove workaround for espree and escope bugs (fixes #5852) (alberto) +* 3ffc582 Chore: Update copyright and license info (alberto) +* 249eb40 Docs: Clarify init sets up local installation (fixes #5874) (Kai Cataldo) +* 6cd8c86 Docs: Describe options in rules under Possible Errors part 1 (Mark Pedrotti) +* f842d18 Fix: `no-this-before-super` crash on unreachable paths (fixes #5894) (Toru Nagashima) +* a02960b Docs: Fix missing delimiter in README links (Kevin Partington) +* 3a9e72c Docs: Update developer guide with new standards (Nicholas C. Zakas) +* cb78585 Update: Add `allowUnboundThis` to `prefer-arrow-callback` (fixes #4668) (Burak Yigit Kaya) +* 02be29f Chore: Remove CLA check from bot (Nicholas C. Zakas) +* 220713e Chore: Add metadata to existing rules - Batch 4 (refs #5417) (Vitor Balocco) +* df53414 Chore: Include jQuery Foundation info (Nicholas C. Zakas) +* f1b2992 Fix: `no-useless-escape` false positive in JSXAttribute (fixes #5882) (Toru Nagashima) +* 74674ad Docs: Move `sort-imports` to 'ECMAScript 6' (Kenneth Williams) +* ae69ddb Docs: Fix severity type in example (Kenneth Williams) +* 19f6fff Update: Autofixing does multiple passes (refs #5329) (Nicholas C. Zakas) +* 1e4b0ca Docs: Reduce length of paragraphs in rules index (Mark Pedrotti) +* 8cfe1eb Docs: Fix a wrong option (Zach Orlovsky) +* 8f6739f Docs: Add alberto as reviewer (alberto) +* 2ae4938 Docs: Fix message for `inline-config` option (alberto) +* 089900b Docs: Fix a wrong rule name in an example (Toru Nagashima) +* c032b41 Docs: Fix emphasis (Toru Nagashima) +* ae606f0 Docs: Update JSCS info in README (alberto) +* a9c5323 Fix: Install ESLint on init if not installed (fixes #5833) (Kai Cataldo) +* ed38358 Docs: Removed incorrect example (James M. Greene) +* af3113c Docs: Fix config comments in indent docs (Brandon Mills) +* 2b39461 Update: `commentPattern` option for `default-case` rule (fixes #5803) (Artyom Lvov) + +v2.8.0 - April 15, 2016 + +* a8821a5 Docs: Distinguish examples in rules under Stylistic Issues part 2 (Kenneth Williams) +* 76913b6 Update: Add metadata to existing rules - Batch 3 (refs #5417) (Vitor Balocco) +* 34ad8d2 Fix: Check that module.paths exists (fixes #5791) (Nicholas C. Zakas) +* 37239b1 Docs: Add new members of the team (Ilya Volodin) +* fb3c2eb Update: allow template literals (fixes #5234) (Jonathan Haines) +* 5a4a935 Update: Add metadata to existing rules - Batch 2 (refs #5417) (Vitor Balocco) +* ea2e625 Fix: newline-before-return handles return as first token (fixes #5816) (Kevin Partington) +* f8db9c9 Update: add nestedBinaryExpressions to no-extra-parens (fixes #3065) (Ilya Volodin) +* 0045d57 Update: `allowNamedFunctions` in `prefer-arrow-callback` (fixes #5675) (alberto) +* 19da72a Update: Add metadata to existing rules - Batch 1 (refs #5417) (Vitor Balocco) +* cc14e43 Fix: `no-fallthrough` empty case with comment (fixes #5799) (alberto) +* 13c8b14 Fix: LogicalExpression checks for short circuit (fixes #5693) (Vamshi krishna) +* 73b225e Fix: Document and fix metadata (refs #5417) (Ilya Volodin) +* 882d199 Docs: Improve options description in `no-redeclare` (alberto) +* 6a71ceb Docs: Improve options description in `no-params-reassign` (alberto) +* 24b6215 Update: Include 'typeof' in rule 'no-constant-condition' (fixes #5228) (Vamshi krishna) +* a959063 Docs: Remove link to deprecated ESLintTester project (refs #3110) (Trey Thomas) +* 6fd7d82 Update: Change order in `eslint --init` env options (fixes #5742) (alberto) +* c59d909 Fix: Extra paren check around object arrow bodies (fixes #5789) (Brandon Mills) +* 6f88546 Docs: Use double quotes for better Win compatibility (fixes #5796) (alberto) +* 02743d5 Fix: catch self-assignment operators in `no-magic-number` (fixes #4400) (alberto) +* c94e74e Docs: Make rule descriptions more consistent (Kenneth Williams) +* 6028252 Docs: Distinguish examples in rules under Stylistic Issues part 1 (Mark Pedrotti) +* ccd8ca9 Fix: Added property onlyDeclaration to id-match rule (fixes #3488) (Gajus Kuizinas) +* 6703c02 Update: no-useless-escape / exact locations of errors (fixes #5751) (Onur Temizkan) +* 3d84b91 Fix: ignore trailing whitespace in template literal (fixes #5786) (Kai Cataldo) +* b0e6bc4 Update: add allowEmptyCatch option to no-empty (fixes #5800) (Kai Cataldo) +* f1f1dd7 Docs: Add @pedrottimark as a committer (Brandon Mills) +* 228f201 Update: `commentPattern` option for `no-fallthrough` rule (fixes #5757) (Artyom Lvov) +* 41db670 Docs: Clarify disable inline comments (Kai Cataldo) +* 9c9a295 Docs: Add note about shell vs node glob parameters in cli (alberto) +* 5308ff9 Docs: Add code backticks to sentence in fixable rules (Mark Pedrotti) +* 965ec06 Docs: fix the examples for space-before-function-paren. (Craig Silverstein) +* 2b202fc Update: Add ignore option to space-before-function-parens (fixes #4127) (Craig Silverstein) +* 24c12ba Fix: improve `constructor-super` errors for literals (fixes #5449) (Toru Nagashima) + +v2.7.0 - April 4, 2016 + +* 134cb1f Revert "Update: adds nestedBinaryExpressions for no-extra-parens rule (fixes #3065)" (Ilya Volodin) +* 7e80867 Docs: Update sentence in fixable rules (Mark Pedrotti) +* 1b6d5a3 Update: adds nestedBinaryExpressions for no-extra-parens (fixes #3065) (Nick Fisher) +* 4f93c32 Docs: Clarify `array-bracket-spacing` with newlines (fixes #5768) (alberto) +* 161ddac Fix: remove `console.dir` (fixes #5770) (Toru Nagashima) +* 0c33f6a Fix: indent rule uses wrong node for class indent level (fixes #5764) (Paul O’Shannessy) + +v2.6.0 - April 1, 2016 + +* ce2accd Fix: vars-on-top now accepts exported variables (fixes #5711) (Olmo Kramer) +* 7aacba7 Update: Deprecate option `maximum` in favor of `max` (fixes #5685) (Vitor Balocco) +* 5fe6fca Fix: no-useless-escape \B regex escape (fixes #5750) (Onur Temizkan) +* 9b73ffd Update: `destructuring` option of `prefer-const` rule (fixes #5594) (Toru Nagashima) +* 8ac9206 Docs: Typo in `sort-imports` (alberto) +* 12902c5 Fix: valid-jsdoc crash w/ Field & Array Type (fixes #5745) (fixes #5746) (Burak Yigit Kaya) +* 2c8b65a Docs: Edit examples for a few rules (Mark Pedrotti) +* d736bc2 Fix: Treat SwitchCase like a block in lines-around-comment (fixes #5718) (Scott O'Hara) +* 24a61a4 Update: make `no-useless-escape` allowing line breaks (fixes #5689) (Toru Nagashima) +* 4ecd45e Fix: Ensure proper lookup of config files (fixes #5175, fixes #5468) (Nicholas C. Zakas) +* 088e26b Fix: Update doctrine to allow hyphens in JSDoc names (fixes #5612) (Kai Cataldo) +* 692fd5d Upgrade: Old Chalk.JS deprecated method (fixes #5716) (Morris Singer) +* f59d91d Update: no-param-reassign error msgs (fixes #5705) (Isaac Levy) +* c1b16cd Fix: Object spread throws error in key-spacing rule. (fixes #5724) (Ziad El Khoury Hanna) +* 3091613 Docs: Correct explanation about properties (James Monger) +* cb0f0be Fix: Lint issue with `valid-jsdoc` rule (refs #5188) (Gyandeep Singh) +* aba1954 Build: Ignore jsdoc folder internally (fixes #5714) (alberto) +* a35f127 Fix: Lint for eslint project in regards to vars (refs #5188) (Gyandeep Singh) +* d9ab4f0 Fix: Windows scoped package configs (fixes #5644) (Nicholas C. Zakas) +* 8d0cd0d Update: Basic valid-jsdoc default parameter support (fixes #5658) (Tom Andrews) + +v2.5.3 - March 28, 2016 + +* 8749ac5 Build: Disable bundling dependencies (fixes #5687) (Nicholas C. Zakas) + +v2.5.2 - March 28, 2016 + +* 1cc7f8e Docs: Remove mention of minimatch for .eslintignore (Ian VanSchooten) +* 5bd69a9 Docs: Reorder FAQ in README (alberto) +* 98e6bd9 Fix: Correct default for indentation in `eslint --init` (fixes #5698) (alberto) +* 679095e Fix: make the default of `options.cwd` in runtime (fixes #5694) (Toru Nagashima) +* 4f06f2f Docs: Distinguish examples in rules under Best Practices part 2 (Mark Pedrotti) +* 013a18e Build: Fix bundling script (fixes #5680) (Nicholas C. Zakas) +* 8c5d954 Docs: Typo fix (István Donkó) +* 09659d6 Docs: Use string severity (Kenneth Williams) +* a4ae769 Docs: Manual changelog update for v2.5.1 (Nicholas C. Zakas) +* c41fab9 Fix: don't use path.extname with undefined value (fixes #5678) (Myles Borins) + +v2.5.1 - March 25, 2016 + +* Build: No functional changes, just republished with a working package. + +v2.5.0 - March 25, 2016 + +* 7021aa9 Fix: lines-around-comment in ESLint repo, part 2 (refs #5188) (Kevin Partington) +* 095c435 Docs: Remove ES2016 from experimental section of README (Kevin Partington) +* 646f863 Build: Bundle dependencies in package.json (fixes #5013) (Nicholas C. Zakas) +* ea06868 Docs: Clarify --ext does not apply to globs (fixes #5452) (Ian VanSchooten) +* 569c478 Build: Fix phantomjs CI problems (fixes #5666) (alberto) +* 6022426 Docs: Add link to chat room in README primary links (alberto) +* 2fbb530 Docs: Add link to "Proposing a Rule Change" in README (alberto) +* 25bf491 Upgrade: globals 9.x (fixes #5668) (Toru Nagashima) +* d6f8409 New: Rule - No useless escape (fixes #5460) (Onur Temizkan) +* 12a43f1 Docs: remove brace expansion from configuring.md (refs #5314) (Jonathan Haines) +* 92d1749 New: max-statements-per-line (fixes #5424) (Kenneth Williams) +* aaf324a Fix: missing support for json sub configs (fixes #5413) (Noam Okman) +* 48ad5fe Update: Add 'caughtErrors' to rule no-unused-vars (fixes #3837) (vamshi) +* ad90c2b Fix: incorrect config message (fixes #5653) (s0ph1e) +* a551831 Docs: Distinguish examples in rules under Node.js and CommonJS (Mark Pedrotti) +* 83cd651 Upgrade: chai to 3.5.0 (fixes #5647) (alberto) +* 32748dc Fix: `radix` rule false positive at shadowed variables (fixes #5639) (Toru Nagashima) +* 66db38d Fix: `--no-ignore` should not un-ignore default ignores (fixes #5547) (alberto) +* e3e06f3 Docs: Distinguish examples in rules under Best Practices part 4 (Mark Pedrotti) +* a9f0865 Docs: Update no-sequences rule docs for clarity (fixes #5536) (Kai Cataldo) +* bae7b30 Docs: Add michaelficarra as committer (alberto) +* e2990e7 Docs: Consistent wording in rules README (alberto) +* 49b4d2a Docs: Update team list with new members (Ilya Volodin) +* d0ae66c Update: Allow autoconfiguration for JSX code (fixes #5511) (Ian VanSchooten) +* 38a0a64 Docs: Clarify `linebreak-style` docs (fixes #5628) (alberto) +* 4b7305e Fix: Allow default ignored files to be unignored (fixes #5410) (Ian VanSchooten) +* 4b05ce6 Update: Enforce repo coding conventions via ESLint (refs #5188) (Kevin Partington) +* 051b255 Docs: Remove or rewrite references to former ecmaFeatures (Mark Pedrotti) +* 9a22625 Fix: `prefer-const` false positive at non-blocked if (fixes #5610) (Toru Nagashima) +* b1fd482 Fix: leading comments added from previous node (fixes #5531) (Kai Cataldo) +* c335650 Docs: correct the no-confusing-arrow docs (Daniel Norman) +* e94b77d Fix: Respect 'ignoreTrailingComments' in max-len rule (fixes #5563) (Vamshi Krishna) +* 9289ef8 Fix: handle personal package.json without config (fixes #5496) (Denny Christochowitz) +* 87d74b2 Fix: `prefer-const` got to not change scopes (refs #5284) (Toru Nagashima) +* 5a881e7 Docs: Fix typo in code snippet for no-unmodified-loop-condition rule (Chris Rebert) +* 03037c2 Update: Overrides for space-unary-ops (fixes #5060) (Afnan Fahim) +* 24d986a Update: replace MD5 hashing of cache files with MurmurHash (fixes #5522) (Michael Ficarra) +* f405030 Fix: Ensure allowing `await` as a property name (fixes #5564) (Toru Nagashima) +* aefc90c Fix: `no-useless-constructor` clash (fixes #5573) (Toru Nagashima) +* 9eaa20d Docs: Fix typo in CLI help message (ryym) +* a7c3e67 Docs: Invalid json in `configuring.md` (alberto) +* 4e50332 Docs: Make `prefer-template` examples consistent. (alberto) +* cfc14a9 Fix: valid-jsdoc correctly checks type union (fixes #5260) (Kai Cataldo) +* 689cb7d Fix: `quote-props` false positive on certain keys (fixes #5532) (Burak Yigit Kaya) +* 167a03a Fix: `brace-style` erroneously ignoring certain errors (fixes #5197) (Burak Yigit Kaya) +* 3133f28 Fix: object-curly-spacing doesn't know types (fixes #5537) (fixes #5538) (Burak Yigit Kaya) +* d0ca171 Docs: Separate parser and config questions in issue template (Kevin Partington) +* bc769ca Fix: Improve file path resolution (fixes #5314) (Ian VanSchooten) +* 9ca8567 Docs: Distinguish examples in rules under Best Practices part 3 (Mark Pedrotti) +* b9c69f1 Docs: Distinguish examples in rules under Variables part 2 (Mark Pedrotti) +* c289414 New: `no-duplicate-imports` rule (fixes #3478) (Simen Bekkhus) + +v2.4.0 - March 11, 2016 + +* 97b2466 Fix: estraverse/escope to work with unknowns (fixes #5476) (Nicholas C. Zakas) +* 641b3f7 Fix: validate the type of severity level (fixes #5499) (Shinnosuke Watanabe) +* 9ee8869 Docs: no-unused-expressions - add more edge unusable and usable examples (Brett Zamir) +* 56bf864 Docs: Create parity between no-sequences examples (Brett Zamir) +* 13ef1c7 New: add `--parser-options` to CLI (fixes #5495) (Jordan Harband) +* ae1ee54 Docs: fix func-style arrow exception option (Craig Martin) +* 91852fd Docs: no-lone-blocks - show non-problematic (and problematic) label (Brett Zamir) +* b34458f Docs: Rearrange rules for better categories (and improve rule summaries) (Brett Zamir) +* 1198b26 Docs: Minor README clarifications (Brett Zamir) +* 03e6869 Fix: newline-before-return: bug with comment (fixes #5480) (mustafa) +* ad100fd Fix: overindent in VariableDeclarator parens or brackets (fixes #5492) (David Greenspan) +* 9b8e04b Docs: Replace all node references to Node.js which is the official name (Brett Zamir) +* cc1f2f0 Docs: Minor fixes in no-new-func (Brett Zamir) +* 6ab81d4 Docs: Distinguish examples in rules under Best Practices part 1 (Mark Pedrotti) +* 9c6c70c Update: add `allowParens` option to `no-confusing-arrow` (fixes #5332) (Burak Yigit Kaya) +* 979c096 Docs: Document linebreak-style as fixable. (Afnan Fahim) +* 9f18a81 Fix: Ignore destructuring assignment in `object-shorthand` (fixes #5488) (alberto) +* 5d9a798 Docs: README.md, prefer-const; change modified to reassigned (Michiel de Bruijne) +* 38eb7f1 Fix: key-spacing checks ObjectExpression is multiline (fixes #5479) (Kevin Partington) +* 9592c45 Fix: `no-unmodified-loop-condition` false positive (fixes #5445) (Toru Nagashima) + +v2.3.0 - March 4, 2016 + +* 1b2c6e0 Update: Proposed no-magic-numbers option: ignoreJSXNumbers (fixes #5348) (Brandon Beeks) +* 63c0b7d Docs: Fix incorrect environment ref. in Rules in Plugins. (fixes #5421) (Jesse McCarthy) +* 124c447 Build: Add additional linebreak to docs (fixes #5464) (Ilya Volodin) +* 0d3831b Docs: Add RuleTester parserOptions migration steps (Kevin Partington) +* 50f4d5a Fix: extends chain (fixes #5411) (Toru Nagashima) +* 0547072 Update: Replace getLast() with lodash.last() (fixes #5456) (Jordan Eldredge) +* 8c29946 Docs: Distinguish examples in rules under Possible Errors part 1 (Mark Pedrotti) +* 5319b4a Docs: Distinguish examples in rules under Possible Errors part 2 (Mark Pedrotti) +* 1da2420 Fix: crash when SourceCode object was reused (fixes #5007) (Toru Nagashima) +* 9e9daab New: newline-before-return rule (fixes #5009) (Kai Cataldo) +* e1bbe45 Fix: Check space after anonymous generator star (fixes #5435) (alberto) +* 119e0ed Docs: Distinguish examples in rules under Variables (Mark Pedrotti) +* 905c049 Fix: `no-undef` false positive at new.target (fixes #5420) (Toru Nagashima) +* 4a67b9a Update: Add ES7 support (fixes #5401) (Brandon Mills) +* 89c757d Docs: Replace ecmaFeatures with parserOptions in working-with-rules (Kevin Partington) +* 804c08e Docs: Add parserOptions to RuleTester section of working-with-rules (Kevin Partington) +* 1982c50 Docs: Document string option for `no-unused-vars`. (alberto) +* 4f82b2b Update: Support classes in `padded-blocks` (fixes #5092) (alberto) +* ed5564f Docs: Specify results of `no-unused-var` with `args` (fixes #5334) (chinesedfan) +* de0a4ef Fix: `getFormatter` throws an error when called as static (fixes #5378) (cowchimp) +* 78f7ca9 Fix: Prevent crash from swallowing console.log (fixes #5381) (Ian VanSchooten) +* 34b648d Fix: remove tests which have invalid syntax (fixes #5405) (Toru Nagashima) +* 7de5ae4 Docs: Missing allow option in docs (Scott O'Hara) +* cf14c71 Fix: `no-useless-constructor` rule crashes sometimes (fixes #5290) (Burak Yigit Kaya) +* 70e3a02 Update: Allow string severity in config (fixes #3626) (Nicholas C. Zakas) +* 13c7c19 Update: Exclude ES5 constructors from consistent-return (fixes #5379) (Kevin Locke) +* 784d3bf Fix: Location info in `dot-notation` rule (fixes #5397) (Gyandeep Singh) +* 6280b2d Update: Support switch statements in padded-blocks (fixes #5056) (alberto) +* 25a5b2c Fix: Allow irregular whitespace in comments (fixes #5368) (Christophe Porteneuve) +* 560c0d9 New: no-restricted-globals rule implementation (fixes #3966) (Benoît Zugmeyer) +* c5bb478 Fix: `constructor-super` false positive after a loop (fixes #5394) (Toru Nagashima) +* 6c0c4aa Docs: Add Issue template (fixes #5313) (Kai Cataldo) +* 1170e67 Fix: indent rule doesn't handle constructor instantiation (fixes #5384) (Nate Cavanaugh) +* 6bc9932 Fix: Avoid magic numbers in rule options (fixes #4182) (Brandon Beeks) +* 694e1c1 Fix: Add tests to cover default magic number tests (fixes #5385) (Brandon Beeks) +* 0b5349d Fix: .eslintignore paths should be absolute (fixes #5362) (alberto) +* 8f6c2e7 Update: Better error message for plugins (refs #5221) (Nicholas C. Zakas) +* 972d41b Update: Improve error message for rule-tester (fixes #5369) (Jeroen Engels) +* fe3f6bd Fix: `no-self-assign` false positive at shorthand (fixes #5371) (Toru Nagashima) +* 2376291 Docs: Missing space in `no-fallthrough` doc. (alberto) +* 5aedb87 Docs: Add mysticatea as reviewer (Nicholas C. Zakas) +* 1f9fd10 Update: no-invalid-regexp allows custom flags (fixes #5249) (Afnan Fahim) +* f1eab9b Fix: Support for dash and slash in `valid-jsdoc` (fixes #1598) (Gyandeep Singh) +* cd12a4b Fix:`newline-per-chained-call` should only warn on methods (fixes #5289) (Burak Yigit Kaya) +* 0d1377d Docs: Add missing `symbol` type into valid list (Plusb Preco) +* 6aa2380 Update: prefer-const; change modified to reassigned (fixes #5350) (Michiel de Bruijne) +* d1d62c6 Fix: indent check for else keyword with Stroustrup style (fixes #5218) (Gyandeep Singh) +* 7932f78 Build: Fix commit message validation (fixes #5340) (Nicholas C. Zakas) +* 1c347f5 Fix: Cleanup temp files from tests (fixes #5338) (Nick) +* 2f3e1ae Build: Change rules to warnings in perf test (fixes #5330) (Brandon Mills) +* 36f40c2 Docs: Achieve consistent order of h2 in rule pages (Mark Pedrotti) + +v2.2.0 - February 19, 2016 + +* 45a22b5 Docs: remove esprima-fb from suggested parsers (Henry Zhu) +* a4d9cd3 Docs: Fix semi rule typo (Brandon Mills) +* 9d005c0 Docs: Correct option name in `no-implicit-coercion` rule (Neil Kistner) +* 2977248 Fix: Do not cache `.eslintrc.js` (fixes #5067) (Nick) +* 211eb8f Fix: no-multi-spaces conflicts with smart tabs (fixes #2077) (Afnan Fahim) +* 6dc9483 Fix: Crash in `constructor-super` (fixes #5319) (Burak Yigit Kaya) +* 3f48875 Docs: Fix yield star spacing examples (Dmitriy Lazarev) +* 4dab76e Docs: Update `preferType` heading to keep code format (fixes #5307) (chinesedfan) +* 7020b82 Fix: `sort-imports` warned between default and members (fixes #5305) (Toru Nagashima) +* 2f4cd1c Fix: `constructor-super` and `no-this-before-super` false (fixes #5261) (Toru Nagashima) +* 59e9c5b New: eslint-disable-next-line (fixes #5206) (Kai Cataldo) +* afb6708 Fix: `indent` rule forgot about some CallExpressions (fixes #5295) (Burak Yigit Kaya) +* d18d406 Docs: Update PR creation bot message (fixes #5268) (Nicholas C. Zakas) +* 0b1cd19 Fix: Ignore parser option if set to default parser (fixes #5241) (Kai Cataldo) + +v2.1.0 - February 15, 2016 + +* 7981ef5 Build: Fix release script (Nicholas C. Zakas) +* c9c34ea Fix: Skip computed members in `newline-per-chained-call` (fixes #5245) (Burak Yigit Kaya) +* b32ddad Build: `npm run perf` command should check the exit code (fixes #5279) (Burak Yigit Kaya) +* 6580d1c Docs: Fix incorrect `api.verify` JSDoc for `config` param (refs #5104) (Burak Yigit Kaya) +* 1f47868 Docs: Update yield-star-spacing documentation for 2.0.0 (fixes #5272) (Burak Yigit Kaya) +* 29da8aa Fix: `newline-after-var` crash on a switch statement (fixes #5277) (Toru Nagashima) +* 86c5a20 Fix: `func-style` should ignore ExportDefaultDeclarations (fixes #5183) (Burak Yigit Kaya) +* ba287aa Fix: Consolidate try/catches to top levels (fixes #5243) (Ian VanSchooten) +* 3ef5da1 Docs: Update no-magic-numbers#ignorearrayindexes. (KazuakiM) +* 0d6850e Update: Allow var declaration at end of block (fixes #5246) (alberto) +* c1e3a73 Fix: Popular style init handles missing package.json keys (refs #5243) (Brandon Mills) +* 68c6e22 Docs: fix default value of `keyword-spacing`'s overrides option. (Toru Nagashima) +* 00fe46f Upgrade: inquirer (fixes #5265) (Bogdan Chadkin) +* ef729d7 Docs: Remove option that is not being used in max-len rule (Thanos Lefteris) +* 4a5ddd5 Docs: Fix rule config above examples for require-jsdoc (Thanos Lefteris) +* c5cbc1b Docs: Add rule config above each example in jsx-quotes (Thanos Lefteris) +* f0aceba Docs: Correct alphabetical ordering in rule list (Randy Coulman) +* 1651ffa Docs: update migrating to 2.0.0 (fixes #5232) (Toru Nagashima) +* 9078537 Fix: `indent` on variable declaration with separate array (fixes #5237) (Burak Yigit Kaya) +* f8868b2 Docs: Typo fix in consistent-this rule doc fixes #5240 (Nicolas Froidure) +* 44f6915 Fix: ESLint Bot mentions the wrong person for extra info (fixes #5229) (Burak Yigit Kaya) +* c612a8e Fix: `no-empty-function` crash (fixes #5227) (Toru Nagashima) +* ae663b6 Docs: Add links for issue documentation (Nicholas C. Zakas) +* 717bede Build: Switch to using eslint-release (fixes #5223) (Nicholas C. Zakas) +* 980e139 Fix: Combine all answers for processAnswers (fixes #5220) (Ian VanSchooten) +* 1f2a1d5 Docs: Remove inline errors from doc examples (fixes #4104) (Burak Yigit Kaya) + +v2.0.0 - February 12, 2016 + +* cc3a66b Docs: Issue message when more info is needed (Nicholas C. Zakas) +* 2bc40fa Docs: Simplify hierarchy of headings in rule pages (Mark Pedrotti) +* 1666254 Docs: Add note about only-whitespace rule for `--fix` (fixes #4774) (Burak Yigit Kaya) +* 2fa09d2 Docs: Add `quotes` to related section of `prefer-template` (fixes #5192) (Burak Yigit Kaya) +* 7b12995 Fix: `key-spacing` not enforcing no-space in minimum mode (fixes #5008) (Burak Yigit Kaya) +* c1c4f4d Breaking: new `no-empty-function` rule (fixes #5161) (Toru Nagashima) + +v2.0.0-rc.1 - February 9, 2016 + +* 4dad82a Update: Adding shared environment for node and browser (refs #5196) (Eli White) +* b46c893 Fix: Config file relative paths (fixes #5164, fixes #5160) (Nicholas C. Zakas) +* aa5b2ac Fix: no-whitespace-before-property fixes (fixes #5167) (Kai Cataldo) +* 4e99924 Update: Replace several dependencies with lodash (fixes #5012) (Gajus Kuizinas) +* 718dc68 Docs: Remove periods in rules' README for consistency. (alberto) +* 7a47085 Docs: Correct `arrow-spacing` overview. (alberto) +* a4cde1b Docs: Clarify global-require inside try/catch (fixes #3834) (Brandon Mills) +* fd07925 Docs: Clarify docs for api.verify (fixes #5101, fixes #5104) (Burak Yigit Kaya) +* 413247f New: Add a --print-config flag (fixes #5099) (Christopher Crouzet) +* efeef42 Update: Implement auto fix for space-in-parens (fixes #5050) (alberto) +* e07fdd4 Fix: code path analysis and labels (fixes #5171) (Toru Nagashima) +* 2417bb2 Fix: `no-unmodified-loop-condition` false positive (fixes #5166) (Toru Nagashima) +* fae1884 Fix: Allow same-line comments in padded-blocks (fixes #5055) (Brandon Mills) +* a24d8ad Fix: Improve autoconfig logging (fixes #5119) (Ian VanSchooten) +* e525923 Docs: Correct obvious inconsistencies in rules h2 elements (Mark Pedrotti) +* 9675b5e Docs: `avoid-escape` does not allow backticks (fixes #5147) (alberto) +* a03919a Fix: `no-unexpected-multiline` false positive (fixes #5148) (Feross Aboukhadijeh) +* 74360d6 Docs: Note no-empty applies to empty block statements (fixes #5105) (alberto) +* 6eeaa3f Build: Remove pending tests (fixes #5126) (Ian VanSchooten) +* 02c83df Docs: Update docs/rules/no-plusplus.md (Sheldon Griffin) +* 0c4de5c New: Added "table" formatter (fixes #4037) (Gajus Kuizinas) +* 0a59926 Update: 'implied strict mode' ecmaFeature (fixes #4832) (Nick Evans) +* 53a6eb3 Fix: Handle singular case in rule-tester error message (fixes #5141) (Bryan Smith) +* 97ac91c Build: Increment eslint-config-eslint (Nicholas C. Zakas) + +v2.0.0-rc.0 - February 2, 2016 + +* 973c499 Fix: `sort-imports` crash (fixes #5130) (Toru Nagashima) +* e64b2c2 Breaking: remove `no-empty-label` (fixes #5042) (Toru Nagashima) +* 79ebbc9 Breaking: update `eslint:recommended` (fixes #5103) (Toru Nagashima) +* e1d7368 New: `no-extra-label` rule (fixes #5059) (Toru Nagashima) +* c83b48c Fix: find ignore file only in cwd (fixes #5087) (Nicholas C. Zakas) +* 3a24240 Docs: Fix jsdoc param names to match function param names (Thanos Lefteris) +* 1d79746 Docs: Replace ecmaFeatures setting with link to config page (Thanos Lefteris) +* e96ffd2 New: `template-curly-spacing` rule (fixes #5049) (Toru Nagashima) +* 4b02902 Update: Extended no-console rule (fixes #5095) (EricHenry) +* 757651e Docs: Remove reference to rules enabled by default (fixes #5100) (Brandon Mills) +* 0d87f5d Docs: Clarify eslint-disable comments only affect rules (fixes #5005) (Brandon Mills) +* 1e791a2 New: `no-self-assign` rule (fixes #4729) (Toru Nagashima) +* c706eb9 Fix: reduced `no-loop-func` false positive (fixes #5044) (Toru Nagashima) +* 3275e86 Update: Add extra aliases to consistent-this rule (fixes #4492) (Zachary Alexander Belford) +* a227360 Docs: Replace joyent org with nodejs (Thanos Lefteris) +* b2aedfe New: Rule to enforce newline after each call in the chain (fixes #4538) (Rajendra Patil) +* d67bfdd New: `no-unused-labels` rule (fixes #5052) (Toru Nagashima) + +v2.0.0-beta.3 - January 29, 2016 + +* 86a3e3d Update: Remove blank lines at beginning of files (fixes #5045) (Jared Sohn) +* 4fea752 New: Autoconfiguration from source inspection (fixes #3567) (Ian VanSchooten) +* 519f39f Breaking: Remove deprecated rules (fixes #5032) (Gyandeep Singh) +* c75ee4a New: Add support for configs in plugins (fixes #3659) (Ilya Volodin) +* 361377f Fix: `prefer-const` false positive reading before writing (fixes #5074) (Toru Nagashima) +* ff2551d Build: Improve `npm run perf` command (fixes #5028) (Toru Nagashima) +* bcca69b Update: add int32Hint option to `no-bitwise` rule (fixes #4873) (Maga D. Zandaqo) +* e3f2683 Update: config extends dependency lookup (fixes #5023) (Nicholas C. Zakas) +* a327a06 Fix: Indent rule for allman brace style scenario (fixes #5064) (Gyandeep Singh) +* afdff6d Fix: `no-extra-bind` false positive (fixes #5058) (Toru Nagashima) +* c1fad4f Update: add autofix support for spaced-comment (fixes #4969, fixes #5030) (Maga D. Zandaqo) +* 889b942 Revert "Docs: Update readme for legend describing rules icons (refs #4355)" (Nicholas C. Zakas) +* b0f21a0 Fix: `keyword-spacing` false positive in template strings (fixes #5043) (Toru Nagashima) +* 53fa5d1 Fix: `prefer-const` false positive in a loop condition (fixes #5024) (Toru Nagashima) +* 385d399 Docs: Update readme for legend describing rules icons (Kai Cataldo) +* 505f1a6 Update: Allow parser to be relative to config (fixes #4985) (Nicholas C. Zakas) +* 79e8a0b New: `one-var-declaration-per-line` rule (fixes #1622) (alberto) +* 654e6e1 Update: Check extra Boolean calls in no-extra-boolean-cast (fixes #3650) (Andrew Sutton) + +v2.0.0-beta.2 - January 22, 2016 + +* 3fa834f Docs: Fix formatter links (fixes #5006) (Gyandeep Singh) +* 54b1bc8 Docs: Fix link in strict.md (fixes #5026) (Nick Evans) +* e0c5cf7 Upgrade: Espree to 3.0.0 (fixes #5018) (Ilya Volodin) +* 69f149d Docs: language tweaks (Andres Kalle) +* 2b33c74 Update: valid-jsdoc to not require @return in constructors (fixes #4976) (Maga D. Zandaqo) +* 6ac2e01 Docs: Fix description of exported comment (Mickael Jeanroy) +* 29392f8 New: allow-multiline option on comma-dangle (fixes #4967) (Alberto Gimeno) +* 05b8cb3 Update: Module overrides all 'strict' rule options (fixes #4936) (Nick Evans) +* 8470474 New: Add metadata to few test rules (fixes #4494) (Ilya Volodin) +* ba11c1b Docs: Add Algolia as sponsor to README (Nicholas C. Zakas) +* b28a19d Breaking: Plugins envs and config removal (fixes #4782, fixes #4952) (Nicholas C. Zakas) +* a456077 Docs: newline-after-var doesn't allow invalid options. (alberto) +* 3e6a24e Breaking: Change `strict` default mode to "safe" (fixes #4961) (alberto) +* 5b96265 Breaking: Update eslint:recommended (fixes #4953) (alberto) +* 7457a4e Upgrade: glob to 6.x (fixes #4991) (Gyandeep Singh) +* d3f4bdd Build: Cleanup for code coverage (fixes #4983) (Gyandeep Singh) +* b8fbaa0 Fix: multiple message in TAP formatter (fixes #4975) (Simon Degraeve) +* 990f8da Fix: `getNodeByRangeIndex` performance issue (fixes #4989) (Toru Nagashima) +* 8ac1dac Build: Update markdownlint dependency to 0.1.0 (fixes #4988) (David Anson) +* 5cd5429 Fix: function expression doc in call expression (fixes #4964) (Tim Schaub) +* 4173baa Fix: `no-dupe-class-members` false positive (fixes #4981) (Toru Nagashima) +* 12fe803 Breaking: Supports Unicode BOM (fixes #4878) (Toru Nagashima) +* 1fc80e9 Build: Increment eslint-config-eslint (Nicholas C. Zakas) +* e0a9024 Update: Report newline between template tag and literal (fixes #4210) (Rajendra Patil) +* da3336c Update: Rules should get `sourceType` from Program node (fixes #4960) (Nick Evans) +* a2ac359 Update: Make jsx-quotes fixable (refs #4377) (Gabriele Petronella) +* ee1014d Fix: Incorrect error location for object-curly-spacing (fixes #4957) (alberto) +* b52ed17 Fix: Incorrect error location for space-in-parens (fixes #4956) (alberto) +* 9c1bafb Fix: Columns of parse errors are off by 1 (fixes #4896) (alberto) +* 5e4841e New: 'id-blacklist' rule (fixes #3358) (Keith Cirkel) +* 700b8bc Update: Add "allow" option to allow specific operators (fixes #3308) (Rajendra Patil) +* d82eeb1 Update: Add describe around rule tester blocks (fixes #4907) (Ilya Volodin) +* 2967402 Update: Add minimum value to integer values in schema (fixes #4941) (Ilya Volodin) +* 7b632f8 Upgrade: Globals to ^8.18.0 (fixes #4728) (Gyandeep Singh) +* 86e6e57 Fix: Incorrect error at EOF for no-multiple-empty-lines (fixes #4917) (alberto) +* 7f058f3 Fix: Incorrect location for padded-blocks (fixes #4913) (alberto) +* b3de8f7 Fix: Do not show ignore messages for default ignored files (fixes #4931) (Gyandeep Singh) +* b1360da Update: Support multiLine and singleLine options (fixes #4697) (Rajendra Patil) +* 82fbe09 Docs: Small semantic issue in documentation example (fixes #4937) (Marcelo Zarate) +* 13a4e30 Docs: Formatting inconsistencies (fixes #4912) (alberto) +* d487013 Update: Option to allow extra parens for cond assign (fixes #3317) (alberto) +* 0f469b4 Fix: JSDoc for function expression on object property (fixes #4900) (Tim Schaub) +* c2dee27 Update: Add module tests to no-extra-semi (fixes #4915) (Nicholas C. Zakas) +* 5a633bf Update: Add `preferType` option to `valid-jsdoc` rule (fixes #3056) (Gyandeep Singh) +* ebd01b7 Build: Fix version number on release (fixes #4921) (Nicholas C. Zakas) +* 2d626a3 Docs: Fix typo in changelog (Nicholas C. Zakas) +* c4c4139 Fix: global-require no longer warns if require is shadowed (fixes #4812) (Kevin Partington) +* bbf7f27 New: provide config.parser via `parserName` on RuleContext (fixes #3670) (Ben Mosher) + +v2.0.0-beta.1 - January 11, 2016 + +* 6c70d84 Build: Fix prerelease script (fixes #4919) (Nicholas C. Zakas) +* d5c9435 New: 'sort-imports' rule (refs #3143) (Christian Schuller) +* a8cfd56 Fix: remove duplicate of eslint-config-eslint (fixes #4909) (Toru Nagashima) +* 19a9fbb Breaking: `space-before-blocks` ignores after keywords (fixes #1338) (Toru Nagashima) +* c275b41 Fix: no-extra-parens ExpressionStatement restricted prods (fixes #4902) (Michael Ficarra) +* b795850 Breaking: don't load ~/.eslintrc when using --config flag (fixes #4881) (alberto) +* 3906481 Build: Add AppVeyor CI (fixes #4894) (Gyandeep Singh) +* 6390862 Docs: Fix missing footnote (Yoshiya Hinosawa) +* e5e06f8 Fix: Jsdoc comment for multi-line function expressions (fixes #4889) (Gyandeep Singh) +* 7c9be60 Fix: Fix path errors in windows (fixes #4888) (Gyandeep Singh) +* a1840e7 Fix: gray text was invisible on Solarized Dark theme (fixes #4886) (Jack Leigh) +* fc9f528 Docs: Modify unnecessary flag docs in quote-props (Matija Marohnić) +* 186e8f0 Update: Ignore camelcase in object destructuring (fixes #3185) (alberto) +* 7c97201 Upgrade: doctrine version to 1.1.0 (fixes #4854) (Tim Schaub) +* ceaf324 New: Add no-new-symbol rule (fixes #4862) (alberto) +* e2f2b66 Breaking: Remove defaults from `eslint:recommended` (fixes #4809) (Ian VanSchooten) +* 0b3c01e Docs: Specify default for func-style (fixes #4834) (Ian VanSchooten) +* 008ea39 Docs: Document default for operator assignment (fixes #4835) (alberto) +* b566f56 Docs: no-new-func typo (alberto) +* 1569695 Update: Adds default 'that' for consistent-this (fixes #4833) (alberto) +* f7b28b7 Docs: clarify `requireReturn` option for valid-jsdoc rule (fixes #4859) (Tim Schaub) +* 407f329 Build: Fix prerelease script (Nicholas C. Zakas) +* 688f277 Fix: Set proper exit code for Node > 0.10 (fixes #4691) (Nicholas C. Zakas) +* 58715e9 Fix: Use single quotes in context.report messages (fixes #4845) (Joe Lencioni) +* 5b7586b Fix: do not require a @return tag for @interface (fixes #4860) (Tim Schaub) +* d43f26c Breaking: migrate from minimatch to node-ignore (fixes #2365) (Stefan Grönke) +* c07ca39 Breaking: merges keyword spacing rules (fixes #3869) (Toru Nagashima) +* 871f534 Upgrade: Optionator version to 0.8.1 (fixes #4851) (Eric Johnson) +* 82d4cd9 Update: Add atomtest env (fixes #4848) (Andres Suarez) +* 9c9beb5 Update: Add "ignore" override for operator-linebreak (fixes #4294) (Rajendra Patil) +* 9c03abc Update: Add "allowCall" option (fixes #4011) (Rajendra Patil) +* 29516f1 Docs: fix migration guide for no-arrow-condition rule (Peter Newnham) +* 2ef7549 Docs: clarify remedy to some prefer-const errors (Turadg Aleahmad) +* 1288ba4 Update: Add default limit to `complexity` (fixes #4808) (Ian VanSchooten) +* d3e8179 Fix: env is rewritten by modules (fixes #4814) (Toru Nagashima) +* fd72aba Docs: Example fix for `no-extra-parens` rule (fixes #3527) (Gyandeep Singh) +* 315f272 Fix: Change max-warnings type to Int (fixes #4660) (George Zahariev) +* 5050768 Update: Ask for `commonjs` under config init (fixes #3553) (Gyandeep Singh) +* 4665256 New: Add no-whitespace-before-property rule (fixes #1086) (Kai Cataldo) +* f500d7d Fix: allow extending @scope/eslint/file (fixes #4800) (André Cruz) +* 5ab564e New: 'ignoreArrayIndexes' option for 'no-magic-numbers' (fixes #4370) (Christian Schuller) +* 97cdb95 New: Add no-useless-constructor rule (fixes #4785) (alberto) +* b9bcbaf Fix: Bug in no-extra-bind (fixes #4806) (Andres Kalle) +* 246a6d2 Docs: Documentation fix (Andres Kalle) +* 9ea6b36 Update: Ignore case in jsdoc tags (fixes #4576) (alberto) +* acdda24 Fix: ignore argument parens in no-unexpected-multiline (fixes #4658) (alberto) +* 4931f56 Update: optionally allow bitwise operators (fixes #4742) (Swaagie) + +v2.0.0-alpha-2 - December 23, 2015 + +* Build: Add prerelease script (Nicholas C. Zakas) +* Update: Allow to omit semi for one-line blocks (fixes #4385) (alberto) +* Fix: Handle getters and setters in key-spacing (fixes #4792) (Brandon Mills) +* Fix: ObjectRestSpread throws error in key-spacing rule (fixes #4763) (Ziad El Khoury Hanna) +* Docs: Typo in generator-star (alberto) +* Fix: Backtick behavior in quotes rule (fixes #3090) (Nicholas C. Zakas) +* Fix: Empty schemas forbid any options (fixes #4789) (Brandon Mills) +* Fix: Remove `isMarkedAsUsed` function name (fixes #4783) (Gyandeep Singh) +* Fix: support arrow functions in no-return-assign (fixes #4743) (alberto) +* Docs: Add license header to Working with Rules guide (Brandon Mills) +* Fix: RuleTester to show parsing errors (fixes #4779) (Nicholas C. Zakas) +* Docs: Escape underscores in no-path-concat (alberto) +* Update: configuration for classes in space-before-blocks (fixes #4089) (alberto) +* Docs: Typo in no-useless-concat (alberto) +* Docs: fix typos, suggests (molee1905) +* Docs: Typos in space-before-keywords and space-unary-ops (fixes #4771) (alberto) +* Upgrade: beefy to ^2.0.0, fixes installation errors (fixes #4760) (Kai Cataldo) +* Docs: Typo in no-unexpected-multiline (fixes #4756) (alberto) +* Update: option to ignore top-level max statements (fixes #4309) (alberto) +* Update: Implement auto fix for semi-spacing rule (fixes #3829) (alberto) +* Fix: small typos in code examples (Plusb Preco) +* Docs: Add section on file extensions to user-guide/configuring (adam) +* Fix: Comma first issue in `indent` (fixes #4739, fixes #3456) (Gyandeep Singh) +* Fix: no-constant-condition false positive (fixes #4737) (alberto) +* Fix: Add source property for fatal errors (fixes #3325) (Gyandeep Singh) +* New: Add a comment length option to the max-len rule (fixes #4665) (Ian) +* Docs: RuleTester doesn't require any tests (fixes #4681) (alberto) +* Fix: Remove path analysis from debug log (fixes #4631) (Ilya Volodin) +* Fix: Set null to property ruleId when fatal is true (fixes #4722) (Sébastien Règne) +* New: Visual Studio compatible formatter (fixes #4708) (rhpijnacker) +* New: Add greasemonkey environment (fixes #4715) (silverwind) +* Fix: always-multiline for comma-dangle import (fixes #4704) (Nicholas C. Zakas) +* Fix: Check 1tbs non-block else (fixes #4692) (Nicholas C. Zakas) +* Fix: Apply environment configs last (fixes #3915) (Nicholas C. Zakas) +* New: `no-unmodified-loop-condition` rule (fixes #4523) (Toru Nagashima) +* Breaking: deprecate `no-arrow-condition` rule (fixes #4417) (Luke Karrys) +* Update: Add cwd option for cli-engine (fixes #4472) (Ilya Volodin) +* New: Add no-confusing-arrow rule (refs #4417) (Luke Karrys) +* Fix: ensure `ConfigOps.merge` do a deep copy (fixes #4682) (Toru Nagashima) +* Fix: `no-invalid-this` allows this in static method (fixes #4669) (Toru Nagashima) +* Fix: Export class syntax for `require-jsdoc` rule (fixes #4667) (Gyandeep Singh) +* Update: Add "safe" mode to strict (fixes #3306) (Brandon Mills) + +v2.0.0-alpha-1 - December 11, 2015 + +* Breaking: Correct links between variables and references (fixes #4615) (Toru Nagashima) +* Fix: Update rule tests for parser options (fixes #4673) (Nicholas C. Zakas) +* Breaking: Implement parserOptions (fixes #4641) (Nicholas C. Zakas) +* Fix: max-len rule overestimates the width of some tabs (fixes #4661) (Nick Evans) +* New: Add no-implicit-globals rule (fixes #4542) (Joshua Peek) +* Update: `no-use-before-define` checks invalid initializer (fixes #4280) (Toru Nagashima) +* Fix: Use oneValuePerFlag for --ignore-pattern option (fixes #4507) (George Zahariev) +* New: `array-callback-return` rule (fixes #1128) (Toru Nagashima) +* Upgrade: Handlebars to >= 4.0.5 for security reasons (fixes #4642) (Jacques Favreau) +* Update: Add class body support to `indent` rule (fixes #4372) (Gyandeep Singh) +* Breaking: Remove space-after-keyword newline check (fixes #4149) (Nicholas C. Zakas) +* Breaking: Treat package.json like the rest of configs (fixes #4451) (Ilya Volodin) +* Docs: writing mistake (molee1905) +* Update: Add 'method' option to no-empty (fixes #4605) (Kai Cataldo) +* Breaking: Remove autofix from eqeqeq (fixes #4578) (Ilya Volodin) +* Breaking: Remove ES6 global variables from builtins (fixes #4085) (Brandon Mills) +* Fix: Handle forbidden LineTerminators in no-extra-parens (fixes #4229) (Brandon Mills) +* Update: Option to ignore constructor Fns object-shorthand (fixes #4487) (Kai Cataldo) +* Fix: Check YieldExpression argument in no-extra-parens (fixes #4608) (Brandon Mills) +* Fix: Do not cache `package.json` (fixes #4611) (Spain) +* Build: Consume no-underscore-dangle allowAfterThis option (fixes #4599) (Kevin Partington) +* New: Add no-restricted-imports rule (fixes #3196) (Guy Ellis) +* Docs: no-extra-semi no longer refers to deprecated rule (fixes #4598) (Kevin Partington) +* Fix: `consistent-return` checks the last (refs #3530, fixes #3373) (Toru Nagashima) +* Update: add class option to `no-use-before-define` (fixes #3944) (Toru Nagashima) +* Breaking: Simplify rule schemas (fixes #3625) (Nicholas C. Zakas) +* Docs: Update docs/rules/no-plusplus.md (Xiangyun Chi) +* Breaking: added bower_components to default ignore (fixes #3550) (Julian Laval) +* Fix: `no-unreachable` with the code path (refs #3530, fixes #3939) (Toru Nagashima) +* Fix: `no-this-before-super` with the code path analysis (refs #3530) (Toru Nagashima) +* Fix: `no-fallthrough` with the code path analysis (refs #3530) (Toru Nagashima) +* Fix: `constructor-super` with the code path analysis (refs #3530) (Toru Nagashima) +* Breaking: Switch to Espree 3.0.0 (fixes #4334) (Nicholas C. Zakas) +* Breaking: Freeze context object (fixes #4495) (Nicholas C. Zakas) +* Docs: Add Code of Conduct (fixes #3095) (Nicholas C. Zakas) +* Breaking: Remove warnings of readonly from `no-undef` (fixes #4504) (Toru Nagashima) +* Update: allowAfterThis option in no-underscore-dangle (fixes #3435) (just-boris) +* Fix: Adding options unit tests for --ignore-pattern (refs #4507) (Kevin Partington) +* Breaking: Implement yield-star-spacing rule (fixes #4115) (Bryan Smith) +* New: `prefer-rest-params` rule (fixes #4108) (Toru Nagashima) +* Update: `prefer-const` begins to cover separating init (fixes #4474) (Toru Nagashima) +* Fix: `no-eval` come to catch indirect eval (fixes #4399, fixes #4441) (Toru Nagashima) +* Breaking: Default no-magic-numbers to none. (fixes #4193) (alberto) +* Breaking: Allow empty arrow body (fixes #4411) (alberto) +* New: Code Path Analysis (fixes #3530) (Toru Nagashima) + +v1.10.3 - December 1, 2015 + +* Docs: Update strict rule docs (fixes #4583) (Nicholas C. Zakas) +* Docs: Reference .eslintrc.* in contributing docs (fixes #4532) (Kai Cataldo) +* Fix: Add for-of to `curly` rule (fixes #4571) (Kai Cataldo) +* Fix: Ignore space before function in array start (fixes #4569) (alberto) + +v1.10.2 - November 27, 2015 + +* Upgrade: escope@3.3.0 (refs #4485) (Nicholas C. Zakas) +* Upgrade: Pinned down js-yaml to avoid breaking dep (fixes #4553) (alberto) +* Fix: lines-around-comment with multiple comments (fixes #3509) (alberto) +* Upgrade: doctrine@0.7.1 (fixes #4545) (Kevin Partington) +* Fix: Bugfix for eqeqeq autofix (fixes #4540) (Kevin Partington) +* Fix: Add for-in to `curly` rule (fixes #4436) (Kai Cataldo) +* Fix: `valid-jsdoc` unneeded require check fix (fixes #4527) (Gyandeep Singh) +* Fix: `brace-style` ASI fix for if-else condition (fixes #4520) (Gyandeep Singh) +* Build: Add branch update during release process (fixes #4491) (Gyandeep Singh) +* Build: Allow revert commits in commit messages (fixes #4452) (alberto) +* Fix: Incorrect location in no-fallthrough (fixes #4516) (alberto) +* Fix: `no-spaced-func` had been crashed (fixes #4508) (Toru Nagashima) +* Fix: Add a RestProperty test of `no-undef` (fixes #3271) (Toru Nagashima) +* Docs: Load badge from HTTPS (Brian J Brennan) +* Build: Update eslint bot messages (fixes #4497) (Nicholas C. Zakas) + +v1.10.1 - November 20, 2015 + +* Fix: Revert freezing context object (refs #4495) (Nicholas C. Zakas) +* 1.10.0 (Nicholas C. Zakas) + +v1.10.0 - November 20, 2015 + +* Docs: Remove dupes from changelog (Nicholas C. Zakas) +* Update: --init to create extensioned files (fixes #4476) (Nicholas C. Zakas) +* Docs: Update description of exported comment (fixes #3916) (Nicholas C. Zakas) +* Docs: Move legacy rules to stylistic (files #4111) (Nicholas C. Zakas) +* Docs: Clean up description of recommended rules (fixes #4365) (Nicholas C. Zakas) +* Docs: Fix home directory config description (fixes #4398) (Nicholas C. Zakas) +* Update: Add class support to `require-jsdoc` rule (fixes #4268) (Gyandeep Singh) +* Update: return type error in `valid-jsdoc` rule (fixes #4443) (Gyandeep Singh) +* Update: Display errors at the place where fix should go (fixes #4470) (nightwing) +* Docs: Fix typo in default `cacheLocation` value (Andrew Hutchings) +* Fix: Handle comments in block-spacing (fixes #4387) (alberto) +* Update: Accept array for `ignorePattern` (fixes #3982) (Jesse McCarthy) +* Update: replace label and break with IIFE and return (fixes #4459) (Ilya Panasenko) +* Fix: space-before-keywords false positive (fixes #4449) (alberto) +* Fix: Improves performance (refs #3530) (Toru Nagashima) +* Fix: Autofix quotes produces invalid javascript (fixes #4380) (nightwing) +* Docs: Update indent.md (Nathan Brown) +* New: Disable comment config option (fixes #3901) (Matthew Riley MacPherson) +* New: Config files with extensions (fixes #4045, fixes #4263) (Nicholas C. Zakas) +* Revert "Update: Add JSX exceptions to no-extra-parens (fixes #4229)" (Brandon Mills) +* Update: Add JSX exceptions to no-extra-parens (fixes #4229) (Brandon Mills) +* Docs: Replace link to deprecated rule with newer rule (Andrew Marshall) +* Fix: `no-extend-native` crashed at empty defineProperty (fixes #4438) (Toru Nagashima) +* Fix: Support empty if blocks in lines-around-comment (fixes #4339) (alberto) +* Fix: `curly` warns wrong location for `else` (fixes #4362) (Toru Nagashima) +* Fix: `id-length` properties never option (fixes #4347) (Toru Nagashima) +* Docs: missing close rbracket in example (@storkme) +* Revert "Update: Allow empty arrow body (fixes #4411)" (Nicholas C. Zakas) +* Fix: eqeqeq autofix avoids clashes with space-infix-ops (fixes #4423) (Kevin Partington) +* Docs: Document semi-spacing behaviour (fixes #4404) (alberto) +* Update: Allow empty arrow body (fixes #4411) (alberto) +* Fix: Handle comments in comma-spacing (fixes #4389) (alberto) +* Update: Refactor eslint.verify args (fixes #4395) (Nicholas C. Zakas) +* Fix: no-undef-init should ignore const (fixes #4284) (Nicholas C. Zakas) +* Fix: Add the missing "as-needed" docs to the radix rule (fixes #4364) (MichaÅ‚ GoÅ‚Ä™biowski) +* Fix: Display singular/plural version of "line" in message (fixes #4359) (Marius Schulz) +* Update: Add Popular Style Guides (fixes #4320) (Jamund Ferguson) +* Fix: eslint.report can be called w/o node if loc provided (fixes #4220) (Kevin Partington) +* Update: no-implicit-coercion validate AssignmentExpression (fixes #4348) (Ilya Panasenko) + +v1.9.0 - November 6, 2015 + +* Update: Make radix accept a "as-needed" option (fixes #4048) (MichaÅ‚ GoÅ‚Ä™biowski) +* Fix: Update the message to include number of lines (fixes #4342) (Brian Delahunty) +* Docs: ASI causes problem whether semicolons are used or not (Thai Pangsakulyanont) +* Fix: Fixer to not overlap ranges among fix objects (fixes #4321) (Gyandeep Singh) +* Update: Add default to `max-nested-callbacks` (fixes #4297) (alberto) +* Fix: Check comments in space-in-parens (fixes #4302) (alberto) +* Update: Add quotes to error messages to improve clarity (fixes #4313) (alberto) +* Fix: tests failing due to differences in temporary paths (fixes #4324) (alberto) +* Fix: Make tests compatible with Windows (fixes #4315) (Ian VanSchooten) +* Update: Extract glob and filesystem logic from cli-engine (fixes #4305) (Ian VanSchooten) +* Build: Clarify commit-check messages (fixes #4256) (Ian VanSchooten) +* Upgrade: Upgrade various dependencies (fixes #4303) (Gyandeep Singh) +* Build: Add node 5 to travis build (fixes #4310) (Gyandeep Singh) +* Fix: ensure using correct estraverse (fixes #3951) (Toru Nagashima) +* Docs: update docs about using gitignore (Mateusz Derks) +* Update: Detect and fix wrong linebreaks (fixes #3981) (alberto) +* New: Add no-case-declarations rule (fixes #4278) (Erik Arvidsson) + +v1.8.0 - October 30, 2015 + +* Fix: Check for node property before testing type (fixes #4298) (Ian VanSchooten) +* Docs: Specify 'double' as default for quotes (fixes #4270) (Ian VanSchooten) +* Fix: Missing errors in space-in-parens (fixes #4257, fixes #3996) (alberto) +* Docs: fixed typo (Mathieu M-Gosselin) +* Fix: `cacheLocation` handles paths in windows style. (fixes #4285) (royriojas) +* Docs: fixed typo (mpal9000) +* Update: Add support for class in `valid-jsdoc` rule (fixes #4279) (Gyandeep Singh) +* Update: cache-file accepts a directory. (fixes #4241) (royriojas) +* Update: Add `maxEOF` to no-multiple-empty-lines (fixes #4235) (Adrien Vergé) +* Update: fix option for comma-spacing (fixes #4232) (HIPP Edgar (PRESTA EXT)) +* Docs: Fix use of wrong word in configuration doc (Jérémie Astori) +* Fix: Prepare config before verifying SourceCode (fixes #4230) (Ian VanSchooten) +* Update: RuleTester come to check AST was not modified (fixes #4156) (Toru Nagashima) +* Fix: wrong count for 'no-multiple-empty-lines' on last line (fixes #4228) (alberto) +* Update: Add `allow` option to `no-shadow` rule (fixes #3035) (Gyandeep Singh) +* Doc: Correct the spelling of Alberto's surname (alberto) +* Docs: Add alberto as a committer (Gyandeep Singh) +* Build: Do not stub console in testing (fixes #1328) (Gyandeep Singh) +* Fix: Check node exists before checking type (fixes #4231) (Ian VanSchooten) +* Update: Option to exclude afterthoughts from no-plusplus (fixes #4093) (Brody McKee) +* New: Add rule no-arrow-condition (fixes #3280) (Luke Karrys) +* Update: Add linebreak style option to eol-last (fixes #4148) (alberto) +* New: arrow-body-style rule (fixes #4109) (alberto) + +v1.7.3 - October 21, 2015 + +* Fix: Support comma-first style in key-spacing (fixes #3877) (Brandon Mills) +* Fix: no-magic-numbers: variable declarations (fixes #4192) (Ilya Panasenko) +* Fix: Support ES6 shorthand in key-spacing (fixes #3678) (Brandon Mills) +* Fix: `indent` array with memberExpression (fixes #4203) (Gyandeep Singh) +* Fix: `indent` param function on sameline (fixes #4174) (Gyandeep Singh) +* Fix: no-multiple-empty-lines fails when empty line at EOF (fixes #4214) (alberto) +* Fix: `comma-dangle` false positive (fixes #4200) (Nicholas C. Zakas) +* Fix: `valid-jsdoc` prefer problem (fixes #4205) (Nicholas C. Zakas) +* Docs: Add missing single-quote (Kevin Lamping) +* Fix: correct no-multiple-empty-lines at EOF (fixes #4140) (alberto) + +v1.7.2 - October 19, 2015 + +* Fix: comma-dangle confused by parens (fixes #4195) (Nicholas C. Zakas) +* Fix: no-mixed-spaces-and-tabs (fixes #4189, fixes #4190) (alberto) +* Fix: no-extend-native disallow using Object.properties (fixes #4180) (Nathan Woltman) +* Fix: no-magic-numbers should ignore Number.parseInt (fixes #4167) (Henry Zhu) + +v1.7.1 - October 16, 2015 + +* Fix: id-match schema (fixes #4155) (Nicholas C. Zakas) +* Fix: no-magic-numbers should ignore parseInt (fixes #4167) (Nicholas C. Zakas) +* Fix: `indent` param function fix (fixes #4165, fixes #4164) (Gyandeep Singh) + +v1.7.0 - October 16, 2015 + +* Fix: array-bracket-spacing for empty array (fixes #4141) (alberto) +* Fix: `indent` arrow function check fix (fixes #4142) (Gyandeep Singh) +* Update: Support .js files for config (fixes #3102) (Gyandeep Singh) +* Fix: Make eslint-config-eslint work (fixes #4145) (Nicholas C. Zakas) +* Fix: `prefer-arrow-callback` had been wrong at arguments (fixes #4095) (Toru Nagashima) +* Docs: Update various rules docs (Nicholas C. Zakas) +* New: Create eslint-config-eslint (fixes #3525) (Nicholas C. Zakas) +* Update: RuleTester allows string errors in invalid cases (fixes #4117) (Kevin Partington) +* Docs: Reference no-unexpected-multiline in semi (fixes #4114) (alberto) +* Update: added exceptions to `lines-around-comment` rule. (fixes #2965) (Mathieu M-Gosselin) +* Update: Add `matchDescription` option to `valid-jsdoc` (fixes #2449) (Gyandeep Singh) +* Fix: check for objects or arrays in array-bracket-spacing (fixes #4083) (alberto) +* Docs: Alphabetize Rules lists (Kenneth Chung) +* Fix: message templates fail when no parameters are passed (fixes #4080) (Ilya Volodin) +* Fix: `indent` multi-line function call (fixes #4073, fixes #4075) (Gyandeep Singh) +* Docs: Improve comma-dangle documentation (Gilad Peleg) +* Fix: no-mixed-tabs-and-spaces fails with some comments (fixes #4086) (alberto) +* Fix: `semi` to check for do-while loops (fixes #4090) (Gyandeep Singh) +* Build: Fix path related failures on Windows in tests (fixes #4061) (Burak Yigit Kaya) +* Fix: `no-unused-vars` had been missing some parameters (fixes #4047) (Toru Nagashima) +* Fix: no-mixed-spaces-and-tabs with comments and templates (fixes #4077) (alberto) +* Update: Add `allow` option for `no-underscore-dangle` rule (fixes #2135) (Gyandeep Singh) +* Update: `allowArrowFunctions` option for `func-style` rule (fixes #1897) (Gyandeep Singh) +* Fix: Ignore template literals in no-mixed-tabs-and-spaces (fixes #4054) (Nicholas C. Zakas) +* Build: Enable CodeClimate (fixes #4068) (Nicholas C. Zakas) +* Fix: `no-cond-assign` had needed double parens in `for` (fixes #4023) (Toru Nagashima) +* Update: Ignore end of function in newline-after-var (fixes #3682) (alberto) +* Build: Performance perf to not ignore jshint file (refs #3765) (Gyandeep Singh) +* Fix: id-match bug incorrectly errors on `NewExpression` (fixes #4042) (Burak Yigit Kaya) +* Fix: `no-trailing-spaces` autofix to handle linebreaks (fixes #4050) (Gyandeep Singh) +* Fix: renamed no-magic-number to no-magic-numbers (fixes #4053) (Vincent Lemeunier) +* New: add "consistent" option to the "curly" rule (fixes #2390) (Benoît Zugmeyer) +* Update: Option to ignore for loops in init-declarations (fixes #3641) (alberto) +* Update: Add webextensions environment (fixes #4051) (Blake Winton) +* Fix: no-cond-assign should report assignment location (fixes #4040) (alberto) +* New: no-empty-pattern rule (fixes #3668) (alberto) +* Upgrade: Upgrade globals to 8.11.0 (fixes #3599) (Burak Yigit Kaya) +* Docs: Re-tag JSX code fences (fixes #4020) (Brandon Mills) +* New: no-magic-number rule (fixes #4027) (Vincent Lemeunier) +* Docs: Remove list of users from README (fixes #3881) (Brandon Mills) +* Fix: `no-redeclare` and `no-sahadow` for builtin globals (fixes #3971) (Toru Nagashima) +* Build: Add `.eslintignore` file for the project (fixes #3765) (Gyandeep Singh) + +v1.6.0 - October 2, 2015 + +* Fix: cache is basically not working (fixes #4008) (Richard Hansen) +* Fix: a test failure on Windows (fixes #3968) (Toru Nagashima) +* Fix: `no-invalid-this` had been missing globals in node (fixes #3961) (Toru Nagashima) +* Fix: `curly` with `multi` had false positive (fixes #3856) (Toru Nagashima) +* Build: Add load performance check inside perf function (fixes #3994) (Gyandeep Singh) +* Fix: space-before-keywords fails with super keyword (fixes #3946) (alberto) +* Fix: CLI should not fail on account of ignored files (fixes #3978) (Dominic Barnes) +* Fix: brace-style rule incorrectly flagging switch (fixes #4002) (Aparajita Fishman) +* Update: Implement auto fix for space-unary-ops rule (fixes #3976) (alberto) +* Update: Implement auto fix for computed-property-spacing (fixes #3975) (alberto) +* Update: Implement auto fix for no-multi-spaces rule (fixes #3979) (alberto) +* Fix: Report shorthand method names in complexity rule (fixes #3955) (Tijn Kersjes) +* Docs: Add note about typeof check for isNaN (fixes #3985) (Daniel Lo Nigro) +* Update: ESLint reports parsing errors with clear prefix. (fixes #3555) (Kevin Partington) +* Build: Update markdownlint dependency (fixes #3954) (David Anson) +* Update: `no-mixed-require` to have non boolean option (fixes #3922) (Gyandeep Singh) +* Fix: trailing spaces auto fix to check for line breaks (fixes #3940) (Gyandeep Singh) +* Update: Add `typeof` option to `no-undef` rule (fixes #3684) (Gyandeep Singh) +* Docs: Fix explanation and typos for accessor-pairs (alberto) +* Docs: Fix typos for camelcase (alberto) +* Docs: Fix typos for max-statements (Danny Guo) +* Update: Implement auto fix for object-curly-spacing (fixes #3857) (alberto) +* Update: Implement auto fix for array-bracket-spacing rule (fixes #3858) (alberto) +* Fix: Add schema to `global-require` rule (fixes #3923) (Gyandeep Singh) +* Update: Apply lazy loading for rules (fixes #3930) (Gyandeep Singh) +* Docs: Fix typo for arrow-spacing (Danny Guo) +* Docs: Fix typos for wrap-regex (Danny Guo) +* Docs: Fix explanation for space-before-keywords (Danny Guo) +* Docs: Fix typos for operator-linebreak (Danny Guo) +* Docs: Fix typos for callback-return (Danny Guo) +* Fix: no-trailing-spaces autofix to account for blank lines (fixes #3912) (Gyandeep Singh) +* Docs: Fix example in no-negated-condition.md (fixes #3908) (alberto) +* Update:warn message use @return when prefer.returns=return (fixes #3889) (闲耘™) +* Update: Implement auto fix for generator-star-spacing rule (fixes #3873) (alberto) +* Update: Implement auto fix for arrow-spacing rule (fixes #3860) (alberto) +* Update: Implement auto fix for block-spacing rule (fixes #3859) (alberto) +* Fix: Support allman style for switch statement (fixes #3903) (Gyandeep Singh) +* New: no-negated-condition rule (fixes #3740) (alberto) +* Docs: Fix typo in blog post template (Nicholas C. Zakas) +* Update: Add env 'nashorn' to support Java 8 Nashorn Engine (fixes #3874) (Benjamin Winterberg) +* Docs: Prepare for rule doc linting (refs #2271) (Ian VanSchooten) + +v1.5.1 - September 22, 2015 + +* Fix: valid-jsdoc fix for param with properties (fixes #3476) (Gyandeep Singh) +* Fix: valid-jsdoc error with square braces (fixes #2270) (Gyandeep Singh) +* Upgrade: `doctrine` to 0.7.0 (fixes #3891) (Gyandeep Singh) +* Fix: `space-before-keywords` had been wrong on getters (fixes #3854) (Toru Nagashima) +* Fix: `no-dupe-args` had been wrong for nested destructure (fixes #3867) (Toru Nagashima) +* Docs: io.js is the new Node.js (thefourtheye) +* Docs: Fix method signature on working-with-rules docs (fixes #3862) (alberto) +* Docs: Add related ternary links (refs #3835) (Ian VanSchooten) +* Fix: don’t ignore config if cwd is the home dir (fixes #3846) (Mathias Schreck) +* Fix: `func-style` had been warning arrows with `this` (fixes #3819) (Toru Nagashima) +* Fix: `space-before-keywords`; allow opening curly braces (fixes #3789) (Marko Raatikka) +* Build: Fix broken .gitattributes generation (fixes #3566) (Nicholas C. Zakas) +* Build: Fix formatter docs generation (fixes #3847) (Nicholas C. Zakas) + +v1.5.0 - September 18, 2015 + +* Fix: invalidate cache when config changes. (fixes #3770) (royriojas) +* Fix: function body indent issues (fixes #3614, fixes #3799) (Gyandeep Singh) +* Update: Add configuration option to `space-before-blocks` (fixes #3758) (Phil Vargas) +* Fix: space checking between tokens (fixes #2211) (Nicholas C. Zakas) +* Fix: env-specified ecmaFeatures had been wrong (fixes #3735) (Toru Nagashima) +* Docs: Change example wording from warnings to problems (fixes #3676) (Ian VanSchooten) +* Build: Generate formatter example docs (fixes #3560) (Ian VanSchooten) +* New: Add --debug flag to CLI (fixes #2692) (Nicholas C. Zakas) +* Docs: Update no-undef-init docs (fixes #3170) (Nicholas C. Zakas) +* Docs: Update no-unused-expressions docs (fixes #3685) (Nicholas C. Zakas) +* Docs: Clarify node types in no-multi-spaces (fixes #3781) (Nicholas C. Zakas) +* Docs: Update new-cap docs (fixes #3798) (Nicholas C. Zakas) +* Fix: `space-before-blocks` had conflicted `arrow-spacing` (fixes #3769) (Toru Nagashima) +* Fix: `comma-dangle` had not been checking imports/exports (fixes #3794) (Toru Nagashima) +* Fix: tests fail due to differences in temporary paths. (fixes #3778) (royriojas) +* Fix: Directory ignoring should work (fixes #3812) (Nicholas C. Zakas) +* Fix: Ensure **/node_modules works in ignore files (fixes #3788) (Nicholas C. Zakas) +* Update: Implement auto fix for `space-infix-ops` rule (fixes #3801) (Gyandeep Singh) +* Fix: `no-warning-comments` can't be set via config comment (fixes #3619) (Burak Yigit Kaya) +* Update: `key-spacing` should allow 1+ around colon (fixes #3363) (Burak Yigit Kaya) +* Fix: false alarm of semi-spacing with semi set to never (fixes #1983) (Chen Yicai) +* Fix: Ensure ./ works correctly with CLI (fixes #3792) (Nicholas C. Zakas) +* Docs: add more examples + tests for block-scoped-var (fixes #3791) (JT) +* Update: Implement auto fix for `indent` rule (fixes #3734) (Gyandeep Singh) +* Fix: `space-before-keywords` fails to handle some cases (fixes #3756) (Marko Raatikka) +* Docs: Add if-else example (fixes #3722) (Ian VanSchooten) +* Fix: jsx-quotes exception for attributes without value (fixes #3793) (Mathias Schreck) +* Docs: Fix closing code fence on cli docs (Ian VanSchooten) +* Update: Implement auto fix for `space-before-blocks` rule (fixes #3776) (Gyandeep Singh) +* Update: Implement auto fix for `space-after-keywords` rule (fixes #3773) (Gyandeep Singh) +* Fix: `semi-spacing` had conflicted with `block-spacing` (fixes #3721) (Toru Nagashima) +* Update: Implement auto fix for `space-before-keywords` rule (fixes #3771) (Gyandeep Singh) +* Update: auto fix for space-before-function-paren rule (fixes #3766) (alberto) +* Update: Implement auto fix for `no-extra-semi` rule (fixes #3745) (Gyandeep Singh) +* Update: Refactors the traversing logic (refs #3530) (Toru Nagashima) +* Update: Implement auto fix for `space-return-throw-case` (fixes #3732) (Gyandeep Singh) +* Update: Implement auto fix for `no-spaced-func` rule (fixes #3728) (Gyandeep Singh) +* Update: Implement auto fix for `eol-last` rule (fixes #3725) (Gyandeep Singh) +* Update: Implement auto fix for `no-trailing-spaces` rule (fixes #3723) (Gyandeep Singh) + +v1.4.3 - September 15, 2015 + +* Fix: Directory ignoring should work (fixes #3812) (Nicholas C. Zakas) +* Fix: jsx-quotes exception for attributes without value (fixes #3793) (Mathias Schreck) + +v1.4.2 - September 15, 2015 + +* Fix: Ensure **/node_modules works in ignore files (fixes #3788) (Nicholas C. Zakas) +* Fix: Ensure ./ works correctly with CLI (fixes #3792) (Nicholas C. Zakas) + +v1.4.1 - September 11, 2015 + +* Fix: CLIEngine default cache parameter name (fixes #3755) (Daniel G. Taylor) +* Fix: Glob pattern from .eslintignore not applied (fixes #3750) (Burak Yigit Kaya) +* Fix: Skip JSDoc from NewExpression (fixes #3744) (Nicholas C. Zakas) +* Docs: Shorten and simplify autocomment for new issues (Nicholas C. Zakas) + +v1.4.0 - September 11, 2015 + +* Docs: Add new formatters to API docs (Ian VanSchooten) +* New: Implement autofixing (fixes #3134) (Nicholas C. Zakas) +* Fix: Remove temporary `"allow-null"` (fixes #3705) (Toru Nagashima) +* Fix: `no-unused-vars` had been crashed at `/*global $foo*/` (fixes #3714) (Toru Nagashima) +* Build: check-commit now checks commit message length. (fixes #3706) (Kevin Partington) +* Fix: make getScope acquire innermost scope (fixes #3700) (voideanvalue) +* Docs: Fix spelling mistake (domharrington) +* Fix: Allow whitespace in rule message parameters. (fixes #3690) (Kevin Partington) +* Fix: Eqeqeq rule with no option does not warn on 'a == null' (fixes #3699) (fediev) +* Fix: `no-unused-expressions` with `allowShortCircuit` false positive if left has no effect (fixes #3675) (Toru Nagashima) +* Update: Add Node 4 to travis builds (fixes #3697) (Ian VanSchooten) +* Fix: Not check for punctuator if on same line as last var (fixes #3694) (Gyandeep Singh) +* Docs: Make `quotes` docs clearer (fixes #3646) (Nicholas C. Zakas) +* Build: Increase mocha timeout (fixes #3692) (Nicholas C. Zakas) +* Fix: `no-extra-bind` to flag all arrow funcs (fixes #3672) (Nicholas C. Zakas) +* Docs: Update README with release and sponsor info (Nicholas C. Zakas) +* Fix: `object-curly-spacing` had been crashing on an empty object pattern (fixes #3658) (Toru Nagashima) +* Fix: `no-extra-parens` false positive at IIFE with member accessing (fixes #3653) (Toru Nagashima) +* Fix: `comma-dangle` with `"always"`/`"always-multiline"` false positive after a rest element (fixes #3627) (Toru Nagashima) +* New: `jsx-quotes` rule (fixes #2011) (Mathias Schreck) +* Docs: Add linting for second half of rule docs (refs #2271) (Ian VanSchooten) +* Fix: `no-unused-vars` had not shown correct locations for `/*global` (fixes #3617) (Toru Nagashima) +* Fix: `space-after-keywords` not working for `catch` (fixes #3654) (Burak Yigit Kaya) +* Fix: Incorrectly warning about ignored files (fixes #3649) (Burak Yigit Kaya) +* Fix: Indent rule VariableDeclarator doesn't apply to arrow functions (fixes #3661) (Burak Yigit Kaya) +* Upgrade: Consuming handlebars@^4.0.0 (fixes #3632) (Kevin Partington) +* Docs: Fixing typos in plugin processor section. (fixes #3648) (Kevin Partington) +* Fix: Invalid env keys would cause an unhandled exception.(fixes #3265) (Ray Booysen) +* Docs: Fixing broken link in documentation (Ilya Volodin) +* Update: Check for default assignment in no-unneeded-ternary (fixes #3232) (cjihrig) +* Fix: `consistent-as-needed` mode with `keyword: true` (fixes #3636) (Alex Guerrero) +* New: Implement cache in order to only operate on changed files since previous run. (fixes #2998) (Roy Riojas) +* Update: Grouping related CLI options. (fixes #3612) (Kevin Partington) +* Update: Using @override does not require @param or @returns (fixes #3629) (Whitney Young) +* Docs: Use eslint-env in no-undef (fixes #3616) (Ian VanSchooten) +* New: `require-jsdoc` rule (fixes #1842) (Gyandeep Singh) +* New: Support glob path on command line (fixes #3402) (Burak Yigit Kaya) +* Update: Short circuit and ternary support in no-unused-expressions (fixes #2733) (David Warkentin) +* Docs: Replace to npmjs.com (Ryuichi Okumura) +* Fix: `indent` should only indent chain calls if the first call is single line (fixes #3591) (Burak Yigit Kaya) +* Fix: `quote-props` should not crash for object rest spread syntax (fixes #3595) (Joakim Carlstein) +* Update: Use `globals` module for the `commonjs` globals (fixes #3606) (Sindre Sorhus) +* New: `no-restricted-syntax` rule to forbid certain syntax (fixes #2422) (Burak Yigit Kaya) +* Fix: `no-useless-concat` false positive at numbers (fixes #3575, fixes #3589) (Toru Nagashima) +* New: Add --max-warnings flag to CLI (fixes #2769) (Kevin Partington) +* New: Add `parser` as an option (fixes #3127) (Gyandeep Singh) +* New: `space-before-keywords` rule (fixes #1631) (Marko Raatikka) +* Update: Allowing inline comments to disable eslint rules (fixes #3472) (Whitney Young) +* Docs: Including for(;;) as valid case in no-constant-condition (Kevin Partington) +* Update: Add quotes around the label in `no-redeclare` error messages (fixes #3583) (Ian VanSchooten) +* Docs: correct contributing URL (Dieter Luypaert) +* Fix: line number for duplicate object keys error (fixes #3573) (Elliot Lynde) +* New: global-require rule (fixes #2318) (Jamund Ferguson) + +v1.3.1 - August 29, 2015 + +* Fix: `indent` to not crash on empty files (fixes #3570) (Gyandeep Singh) +* Fix: Remove unused config file (fixes #2227) (Gyandeep Singh) + +v1.3.0 - August 28, 2015 + +* Build: Autogenerate release blog post (fixes #3562) (Nicholas C. Zakas) +* New: `no-useless-concat` rule (fixes #3506) (Henry Zhu) +* Update: Add `keywords` flag to `consistent-as-needed` mode in `quote-props` (fixes #3532) (Burak Yigit Kaya) +* Update: adds `numbers` option to quote-props (fixes #2914) (Jose Roberto Vidal) +* Fix: `quote-props` rule should ignore computed and shorthand properties (fixes #3557) (fixes #3544) (Burak Yigit Kaya) +* Docs: Add config comments for rule examples 'accessor-pairs' to 'no-extra-semi' (refs #2271) (Ian VanSchooten) +* Update: Return to accept `undefined` type (fixes #3382) (Gyandeep Singh) +* New: Added HTML formatter (fixes #3505) (Julian Laval) +* Fix: check space after yield keyword in space-unary-ops (fixes #2707) (Mathias Schreck) +* Docs: (curly) Fix broken code in example (Kent C. Dodds) +* Update: Quote var name in `no-unused-vars` error messages (refs #3526) (Burak Yigit Kaya) +* Update: Move methods to SourceCode (fixes #3516) (Nicholas C. Zakas) +* Fix: Don't try too hard to find fault in `no-implicit-coercion` (refs #3402) (Burak Yigit Kaya) +* Fix: Detect ternary operator in operator-linebreak rule (fixes #3274) (Burak Yigit Kaya) +* Docs: Clearer plugin rule configuration (fixes #2022) (Nicholas C. Zakas) +* Update: Add quotes around the label in `no-empty-label` error reports (fixes #3526) (Burak Yigit Kaya) +* Docs: Turn off Liquid in example (Nicholas C. Zakas) +* Docs: Mention CommonJS along with Node.js (fixes #3388) (Nicholas C. Zakas) +* Docs: Make it clear which rules are recommended (fixes #3398) (Nicholas C. Zakas) +* Docs: Add links to JSON Schema resources (fixes #3411) (Nicholas C. Zakas) +* Docs: Add more info to migration guide (fixes #3439) (Nicholas C. Zakas) +* Fix: ASI indentation issue (fixes #3514) (Burak Yigit Kaya) +* Fix: Make `no-implicit-coercion` smarter about numerical expressions (fixes #3510) (Burak Yigit Kaya) +* Fix: `prefer-template` had not been handling TemplateLiteral as literal node (fixes #3507) (Toru Nagashima) +* Update: `newline-after-var` Allow comment + blank after var (fixes #2852) (Ian VanSchooten) +* Update: Add `unnecessary` option to `quote-props` (fixes #3381) (Burak Yigit Kaya) +* Fix: `indent` shouldn't check the last line unless it is a punctuator (fixes #3498) (Burak Yigit Kaya) +* Fix: `indent` rule does not indent when doing multi-line chain calls (fixes #3279) (Burak Yigit Kaya) +* Fix: sort-vars rule fails when memo is undefined (fixes #3474) (Burak Yigit Kaya) +* Fix: `brace-style` doesn't report some closing brace errors (fixes #3486) (Burak Yigit Kaya) +* Update: separate options for block and line comments in `spaced-comment` rule (fixes #2897) (Burak Yigit Kaya) +* Fix: `indent` does not check FunctionDeclaration nodes properly (fixes #3173) (Burak Yigit Kaya) +* Update: Added "properties" option to `id-length` rule to ignore property names. (fixes #3450) (Mathieu M-Gosselin) +* Update: add new ignore pattern options to no-unused-vars (fixes #2321) (Mathias Schreck) +* New: Protractor environment (fixes #3457) (James Whitney) +* Docs: Added section to shareable config (Gregory Waxman) +* Update: Allow pre-parsed code (fixes #1025, fixes #948) (Nicholas C. Zakas) + +v1.2.1 - August 20, 2015 + +* Fix: "key-spacing" crashes eslint on object literal shorthand properties (fixes #3463) (Burak Yigit Kaya) +* Fix: ignore leading space check for `null` elements in comma-spacing (fixes #3392) (Mathias Schreck) +* Fix: `prefer-arrow-callback` false positive at recursive functions (fixes #3454) (Toru Nagashima) +* Fix: one-var rule doesn’t have default options (fixes #3449) (Burak Yigit Kaya) +* Fix: Refactor `no-duplicate-case` to be simpler and more efficient (fixes #3440) (Burak Yigit Kaya) +* Docs: Fix trailing spaces in README (Nicholas C. Zakas) +* Docs: Update gyandeeps and add byk (Nicholas C. Zakas) +* Docs: Update plugins documentation for 1.0.0 (Nicholas C. Zakas) +* Docs: `object-curly-spacing` doc is inaccurate about exceptions (Burak Yigit Kaya) +* Fix: `object-curly-spacing` shows the incorrect column for opening brace (fixes #3438) (Burak Yigit Kaya) + +v1.2.0 - August 18, 2015 + +* Update: add support for semicolon in comma-first setup in indent rule (fixes #3423) (Burak Yigit Kaya) +* Docs: better JSDoc for indent rule (Burak Yigit Kaya) +* Docs: Document the second argument of `CLIEngine.executeOnText()` (Sindre Sorhus) +* New: `no-dupe-class-members` rule (fixes #3294) (Toru Nagashima) +* Fix: exclude `AssignmentExpression` and `Property` nodes from extra indentation on first line (fixes #3391) (Burak Yigit Kaya) +* Update: Separate indent options for var, let and const (fixes #3339) (Burak Yigit Kaya) +* Fix: Add AssignmentPattern to space-infix-ops (fixes #3380) (Burak Yigit Kaya) +* Docs: Fix typo: exception label (tienslebien) +* Update: Clean up tests for CLI config support (refs #2543) (Gyandeep Singh) +* New: `block-spacing` rule (fixes #3303) (Toru Nagashima) +* Docs: Update docs for no-iterator (fixes #3405) (Nicholas C. Zakas) +* Upgrade: bump `espree` dependency to `2.2.4` (fixes #3403) (Burak Yigit Kaya) +* Fix: false positive on switch 'no duplicate case', (fixes #3408) (Cristian Carlesso) +* Fix: `valid-jsdoc` test does not recognize aliases for `@param` (fixes #3399) (Burak Yigit Kaya) +* New: enable `-c` flag to accept a shareable config (fixes #2543) (Shinnosuke Watanabe) +* Fix: Apply plugin given in CLI (fixes #3383) (Ian VanSchooten) +* New: Add commonjs environment (fixes #3377) (Nicholas C. Zakas) +* Docs: Update no-unused-var docs (Nicholas C. Zakas) +* Fix: trailing commas in object-curly-spacing for import/export (fixes #3324) (Henry Zhu) +* Update: Make `baseConfig` to behave as other config options (fixes #3371) (Gyandeep Singh) +* Docs: Add "Compatibility" section to linebreak-style (Vitor Balocco) +* New: `prefer-arrow-callback` rule (fixes #3140) (Toru Nagashima) +* Docs: Clarify what an unused var is (fixes #2342) (Nicholas C. Zakas) +* Docs: Mention double-byte character limitation in max-len (fixes #2370) (Nicholas C. Zakas) +* Fix: object curly spacing incorrectly warning for import with default and multiple named specifiers (fixes #3370) (Luke Karrys) +* Fix: Indent rule errors with array of objects (fixes #3329) (Burak Yigit Kaya) +* Update: Make it clear that `space-infix-ops` support `const` (fixes #3299) (Burak Yigit Kaya) +* New: `prefer-template` rule (fixes #3014) (Toru Nagashima) +* Docs: Clarify `no-process-env` docs (fixes #3318) (Nicholas C. Zakas) +* Docs: Fix arrow name typo (fixes #3309) (Nicholas C. Zakas) +* Update: Improve error message for `indent` rule violation (fixes #3340) (Burak Yigit Kaya) +* Fix: radix rule does not apply for Number.parseInt (ES6) (fixes #3364) (Burak Yigit Kaya) +* Fix: `key-spacing.align` doesn't pay attention to non-whitespace before key (fixes #3267) (Burak Yigit Kaya) +* Fix: arrow-parens & destructuring/default params (fixes #3353) (Jamund Ferguson) +* Update: Add support for Allman to brace-style rule, brackets on newline (fixes #3347) (Burak Yigit Kaya) +* Fix: Regression no-catch-shadow (1.1.0) (fixes #3322) (Burak Yigit Kaya) +* Docs: remove note outdated in 1.0.0 (Denis Sokolov) +* Build: automatically convert line endings in release script (fixes #2642) (Burak Yigit Kaya) +* Update: allow disabling new-cap on object methods (fixes #3172) (Burak Yigit Kaya) +* Update: Improve checkstyle format (fixes #3183) (Burak Yigit Kaya) +* Fix: Indent rule errors if an array literal starts a new statement (fixes #3328) (Burak Yigit Kaya) +* Update: Improve validation error messages (fixes #3193) (Burak Yigit Kaya) +* Docs: fix syntax error in space-before-function-paren (Fabrício Matté) +* Fix: `indent` rule to check for last line correctly (fixes #3327) (Gyandeep Singh) +* Fix: Inconsistent off-by-one errors with column numbers (fixes #3231) (Burak Yigit Kaya) +* Fix: Keyword "else" must not be followed by a newline (fixes #3226) (Burak Yigit Kaya) +* Fix: `id-length` does not work for most of the new ES6 patterns (fixes #3286) (Burak Yigit Kaya) +* Fix: Spaced Comment Exceptions Not Working (fixes #3276) (Jamund Ferguson) + +v1.1.0 - August 7, 2015 + +* Update: Added as-needed option to arrow-parens (fixes #3277) (Jamund Ferguson) +* Fix: curly-spacing missing import case (fixes #3302) (Jamund Ferguson) +* Fix: `eslint-env` in comments had not been setting `ecmaFeatures` (fixes #2134) (Toru Nagashima) +* Fix: `es6` env had been missing `spread` and `newTarget` (fixes #3281) (Toru Nagashima) +* Fix: Report no-spaced-func on last token before paren (fixes #3289) (Benjamin Woodruff) +* Fix: Check for null elements in indent rule (fixes #3272) (Gyandeep Singh) +* Docs: Use backticks for option heading (Gyandeep Singh) +* Fix: `no-invalid-this` had been missing jsdoc comment (fixes #3287) (Toru Nagashima) +* Fix: `indent` rule for multi-line objects and arrays (fixes #3236) (Gyandeep Singh) +* Update: add new `multi-or-nest` option for the `curly` rule (fixes #1806) (Ivan Nikulin) +* Fix: `no-cond-assign` had been missing simplest pattern (fixes #3249) (Toru Nagashima) +* Fix: id-length rule doesn't catch violations in arrow function parameters (fixes #3275) (Burak Yigit Kaya) +* New: Added grep-style formatter (fixes #2991) (Nobody Really) +* Update: Split out generic AST methods into utility (fixes #962) (Gyandeep Singh) +* Fix: `accessor-pairs` false positive (fixes #3262) (Toru Nagashima) +* Fix: `context.getScope()` returns correct scope in blockBindings (fixes #3254) (Toru Nagashima) +* Update: Expose `getErrorResults` as a static method on `CLIEngine` (fixes #3242) (Gyandeep Singh) +* Update: Expose `getFormatter` as a static method on `CLIEngine` (fixes #3239) (Gyandeep Singh) +* Docs: use correct encoding for id-match.md (fixes #3246) (Matthieu Larcher) +* Docs: place id-match rule at correct place in README.md (fixes #3245) (Matthieu Larcher) +* Docs: Update no-proto.md (Joe Zimmerman) +* Docs: Fix typo in object-shorthand docs (Gunnar Lium) +* Upgrade: inquirer dependency (fixes #3241) (Gyandeep Singh) +* Fix: `indent` rule for objects and nested one line blocks (fixes #3238, fixes #3237) (Gyandeep Singh) +* Docs: Fix wrong options in examples of key-spacing (keik) +* Docs: Adds missing "not" to semi.md (Marius Schulz) +* Docs: Update no-multi-spaces.md (Kenneth Powers) +* Fix: `indent` to not error on same line nodes (fixes #3228) (Gyandeep Singh) +* New: Jest environment (fixes #3212) (Darshak Parikh) + +v1.0.0 - July 31, 2015 + +* Update: merge `no-reserved-keys` into `quote-props` (fixes #1539) (Jose Roberto Vidal) +* Fix: `indent` error message (fixes #3220) (Gyandeep Singh) +* Update: Add embertest env (fixes #3205) (ismay) +* Docs: Correct documentation errors for `id-length` rule. (Jess Telford) +* Breaking: `indent` rule to have node specific options (fixes #3210) (Gyandeep Singh) +* Fix: space-after-keyword shouldn't allow newlines (fixes #3198) (Brandon Mills) +* New: Add JSON formatter (fixes #3036) (Burak Yigit Kaya) +* Breaking: Switch to RuleTester (fixes #3186) (Nicholas C. Zakas) +* Breaking: remove duplicate warnings of `no-undef` from `block-scoped-var` (fixes #3201) (Toru Nagashima) +* Fix: `init-declarations` ignores in for-in/of (fixes #3202) (Toru Nagashima) +* Fix: `quotes` with `"backtick"` ignores ModuleSpecifier and LiteralPropertyName (fixes #3181) (Toru Nagashima) +* Fix: space-in-parens in Template Strings (fixes #3182) (Ian VanSchooten) +* Fix: Check for concatenation in no-throw-literal (fixes #3099, fixes #3101) (Ian VanSchooten) +* Build: Remove `eslint-tester` from devDependencies (fixes #3189) (Gyandeep Singh) +* Fix: Use new ESLintTester (fixes #3187) (Nicholas C. Zakas) +* Update: `new-cap` supports fullnames (fixes #2584) (Toru Nagashima) +* Fix: Non object rule options merge (fixes #3179) (Gyandeep Singh) +* New: add id-match rule (fixes #2829) (Matthieu Larcher) +* Fix: Rule options merge (fixes #3175) (Gyandeep Singh) +* Fix: `spaced-comment` allows a mix of markers and exceptions (fixes #2895) (Toru Nagashima) +* Fix: `block-scoped-var` issues (fixes #2253, fixes #2747, fixes #2967) (Toru Nagashima) +* New: Add id-length rule (fixes #2784) (Burak Yigit Kaya) +* Update: New parameters for quote-props rule (fixes #1283, fixes #1658) (Tomasz OlÄ™dzki) + +v1.0.0-rc-3 - July 24, 2015 + +* Fix: Make Chai and Mocha as a dependency (fixes #3156) (Gyandeep Singh) +* Fix: traverse `ExperimentalSpread/RestProperty.argument` (fixes #3157) (Toru Nagashima) +* Fix: Check shareable config package prefix correctly (fixes #3146) (Gyandeep Singh) +* Update: move redeclaration checking for builtins (fixes #3070) (Toru Nagashima) +* Fix: `quotes` with `"backtick"` allows directive prologues (fixes #3132) (Toru Nagashima) +* Fix: `ESLintTester` path in exposed API (fixes #3149) (Gyandeep Singh) +* Docs: Remove AppVeyor badge (Gyandeep Singh) +* Fix: Check no-new-func on CallExpressions (fixes #3145) (Benjamin Woodruff) + +v1.0.0-rc-2 - July 23, 2015 + +* Docs: Mention eslint-tester in migration guide (Nicholas C. Zakas) +* Docs: Mention variables defined in a global comment (fixes #3137) (William Becker) +* Docs: add documentation about custom-formatters. (fixes #1260) (royriojas) +* Fix: Multi-line variable declarations indent (fixes #3139) (Gyandeep Singh) +* Fix: handles blocks in no-use-before-define (fixes #2960) (Jose Roberto Vidal) +* Update: `props` option of `no-param-reassign` (fixes #1600) (Toru Nagashima) +* New: Support shared configs named `@scope/eslint-config`, with shortcuts of `@scope` and `@scope/` (fixes #3123) (Jordan Harband) +* New: Add ignorePattern, ignoreComments, and ignoreUrls options to max-len (fixes #2934, fixes #2221, fixes #1661) (Benjamin Woodruff) +* Build: Increase Windows Mocha timeout (fixes #3133) (Ian VanSchooten) +* Docs: incorrect syntax in the example for rule «one-var» (Alexander Burtsev) +* Build: Check commit message format at end of tests (fixes #3058) (Ian VanSchooten) +* Update: Move eslint-tester into repo (fixes #3110) (Nicholas C. Zakas) +* Fix: Not load configs outside config with `root: true` (fixes #3109) (Gyandeep Singh) +* Docs: Add config information to README (fixes #3074) (Nicholas C. Zakas) +* Docs: Add mysticatea as committer (Nicholas C. Zakas) +* Docs: Grammar fixes in rule descriptions (refs #3038) (Greg Cochard) +* Fix: Update sort-vars to ignore Array and ObjectPattern (fixes #2954) (Harry Ho) +* Fix: block-scoped-var rule incorrectly flagging break/continue with label (fixes #3082) (Aparajita Fishman) +* Fix: spaces trigger wrong in `no-useless-call` and `prefer-spread` (fixes #3054) (Toru Nagashima) +* Fix: `arrow-spacing` allow multi-spaces and line-endings (fixes #3079) (Toru Nagashima) +* Fix: add missing loop scopes to one-var (fixes #3073) (Jose Roberto Vidal) +* New: the `no-invalid-this` rule (fixes #2815) (Toru Nagashima) +* Fix: allow empty loop body in no-extra-semi (fixes #3075) (Mathias Schreck) +* Update: Add qunit to environments (fixes #2870) (Nicholas C. Zakas) +* Fix: `space-before-blocks` to consider classes (fixes #3062) (Gyandeep Singh) +* Fix: Include phantomjs globals (fixes #3064) (Linus Unnebäck) +* Fix: no-else-return handles multiple else-if blocks (fixes #3015) (Jose Roberto Vidal) +* Fix: `no-*-assgin` rules support destructuring (fixes #3029) (Toru Nagashima) +* New: the `no-implicit-coercion` rule (fixes #1621) (Toru Nagashima) +* Fix: Make no-implied-eval match more types of strings (fixes #2898) (Benjamin Woodruff) +* Docs: Clarify that bot message is automatic (Ian VanSchooten) +* Fix: Skip rest properties in no-dupe-keys (fixes 3042) (Nicholas C. Zakas) +* Docs: New issue template (fixes #3048) (Nicholas C. Zakas) +* Fix: strict rule supports classes (fixes #2977) (Toru Nagashima) +* New: the `prefer-reflect` rule (fixes #2939) (Keith Cirkel) +* Docs: make grammar consistent in rules index (Greg Cochard) +* Docs: Fix unmatched paren in rule description (Greg Cochard) +* Docs: Small typo fix in no-useless-call documentation (Paul O’Shannessy) +* Build: readd phantomjs dependency with locked down version (fixes #3026) (Mathias Schreck) +* Docs: Add IanVS as committer (Nicholas C. Zakas) +* docs: additional computed-property-spacing documentation (fixes #2941) (Jamund Ferguson) +* Docs: Add let and const examples for newline-after-var (fixes #3020) (James Whitney) +* Build: Remove unnecessary phantomjs devDependency (fixes #3021) (Gyandeep Singh) +* Update: added shared builtins list (fixes #2972) (Jose Roberto Vidal) + +v1.0.0-rc-1 - July 15, 2015 + +* Upgrade: Espree to 2.2.0 (fixes #3011) (Nicholas C. Zakas) +* Docs: fix a typo (bartmichu) +* Fix: indent rule should recognize single line statements with ASI (fixes #3001, fixes #3000) (Mathias Schreck) +* Update: Handle CRLF line endings in spaced-comment rule - 2 (fixes #3005) (Burak Yigit Kaya) +* Fix: Indent rule error on empty block body (fixes #2999) (Gyandeep Singh) +* New: the `no-class-assign` rule (fixes #2718) (Toru Nagashima) +* New: the `no-const-assign` rule (fixes #2719) (Toru Nagashima) +* Docs: Add 1.0.0 migration guide (fixes #2994) (Nicholas C. Zakas) +* Docs: Update changelog for 0.24.1 (fixes #2976) (Nicholas C. Zakas) +* Breaking: Remove deprecated rules (fixes #1898) (Ian VanSchooten) +* Fix: multi-line + fat arrow indent (fixes #2239) (Gyandeep Singh) +* Breaking: Create eslint:recommended and add to --init (fixes #2713) (Greg Cochard) +* Fix: Indent rule (fixes #1797, fixes #1799, fixes #2248, fixes #2343, fixes #2278, fixes #1800) (Gyandeep Singh) +* New: `context.getDeclaredVariables(node)` (fixes #2801) (Toru Nagashima) +* New: the `no-useless-call` rule (fixes #1925) (Toru Nagashima) +* New: the `prefer-spread` rule (fixes #2946) (Toru Nagashima) +* Fix: `valid-jsdoc` counts `return` for arrow expressions (fixes #2952) (Toru Nagashima) +* New: Add exported comment option (fixes #1200) (Jamund Ferguson) +* Breaking: Default to --reset behavior (fixes #2100) (Brandon Mills) +* New: Add arrow-parens and arrow-spacing rule (fixes #2628) (Jxck) +* Fix: Shallow cloning issues in eslint config (fixes #2961) (Gyandeep Singh) +* Add: Warn on missing rule definition or deprecation (fixes #1549) (Ian VanSchooten) +* Update: adding some tests for no-redeclare to test named functions (fixes #2953) (Dominic Barnes) +* New: Add support for root: true in config files (fixes #2736) (Ian VanSchooten) +* Fix: workaround for leading and trailing comments in padded-block (fixes #2336 and fixes #2788) (Mathias Schreck) +* Fix: object-shorthand computed props (fixes #2937) (Jamund Ferguson) +* Fix: Remove invalid check inside `getJSDocComment` function (fixes #2938) (Gyandeep Singh) +* Docs: Clarify when not to use space-before-blocks (Ian VanSchooten) +* Update: `no-loop-func` allows block-scoped variables (fixes #2517) (Toru Nagashima) +* Docs: remove mistaken "off by default" (Jan Schär) +* Build: Add appveyor CI system (fixes #2923) (Gyandeep Singh) +* Docs: Fix typo in the shareable configs doc (Siddharth Kannan) +* Fix: max-len to report correct column number (fixes #2926) (Mathias Schreck) +* Fix: add destructuring support to comma-dangle rule (fixes #2911) (Mathias Schreck) +* Docs: clarification in no-unused-vars (Jan Schär) +* Fix: `no-redeclare` checks module scopes (fixes #2903) (Toru Nagashima) +* Docs: missing quotes in JSON (Jan Schär) +* Breaking: Switch to 1-based columns (fixes #2284) (Nicholas C. Zakas) +* Docs: array-bracket-spacing examples used space-in-brackets (Brandon Mills) +* Docs: Add spaced-line-comment deprecation notice (Brandon Mills) +* Docs: Add space-in-brackets deprecation notice (Brandon Mills) +* Fix: Include execScript in no-implied-eval rule (fixes #2873) (Frederik Braun) +* Fix: Support class syntax for line-around-comment rule (fixes #2894) (Gyandeep Singh) +* Fix: lines-around-comment was crashing in some cases due to a missing check (fixes #2892) (Mathieu M-Gosselin) +* New: Add init-declarations rule (fixes #2606) (cjihrig) +* Docs: Fix typo in array-bracket-spacing rule (zallek) +* Fix: Added missing export syntax support to the block-scoped-var rule. (fixes #2887) (Mathieu M-Gosselin) +* Build: gensite target supports rule removal (refs #1898) (Brandon Mills) +* Update: Handle CRLF line endings in spaced-comment rule (fixes #2884) (David Anson) +* Update: Attach parent in getNodeByRangeIndex (fixes #2863) (Brandon Mills) +* Docs: Fix typo (Bryan Smith) +* New: Add serviceworker environment (fixes #2557) (Gyandeep Singh) +* Fix: Yoda should ignore comparisons where both sides are constants (fixes #2867) (cjihrig) +* Update: Loosens regex rules around intentional fall through comments (Fixes #2811) (greg5green) +* Update: Add missing schema to rules (fixes #2858) (Ilya Volodin) +* New: `require-yield` rule (fixes #2822) (Toru Nagashima) +* New: add callback-return rule (fixes #994) (Jamund Ferguson) + +v0.24.1 - July 10, 2015 + +* Docs: Clarify when not to use space-before-blocks (Ian VanSchooten) +* Docs: remove mistaken "off by default" (Jan Schär) +* Docs: remove mistaken "off by default" (Jan Schär) +* Docs: Fix typo in the shareable configs doc (Siddharth Kannan) +* Docs: clarification in no-unused-vars (Jan Schär) +* Docs: missing quotes in JSON (Jan Schär) +* Fix: Revert 1-based column changes in tests for patch (refs #2284) (Nicholas C. Zakas) +* Fix: Shallow cloning issues in eslint config (fixes #2961) (Gyandeep Singh) +* Fix: object-shorthand computed props (fixes #2937) (Jamund Ferguson) +* Fix: Remove invalid check inside `getJSDocComment` function (fixes #2938) (Gyandeep Singh) +* Fix: max-len to report correct column number (fixes #2926) (Mathias Schreck) +* Fix: add destructuring support to comma-dangle rule (fixes #2911) (Mathias Schreck) +* Fix: `no-redeclare` checks module scopes (fixes #2903) (Toru Nagashima) +* Fix: Include execScript in no-implied-eval rule (fixes #2873) (Frederik Braun) +* Fix: Support class syntax for line-around-comment rule (fixes #2894) (Gyandeep Singh) +* Fix: lines-around-comment was crashing in some cases due to a missing check (fixes #2892) (Mathieu M-Gosselin) +* Fix: Added missing export syntax support to the block-scoped-var rule. (fixes #2887) (Mathieu M-Gosselin) +* Fix: Yoda should ignore comparisons where both sides are constants (fixes #2867) (cjihrig) +* Docs: array-bracket-spacing examples used space-in-brackets (Brandon Mills) +* Docs: Add spaced-line-comment deprecation notice (Brandon Mills) +* Docs: Add space-in-brackets deprecation notice (Brandon Mills) + +v0.24.0 - June 26, 2015 + +* Upgrade: eslint-tester to 0.8.1 (Nicholas C. Zakas) +* Fix: no-dupe-args sparse array crash (fixes #2848) (Chris Walker) +* Fix: space-after-keywords should ignore extra parens (fixes #2847) (Mathias Schreck) +* New: add no-unexpected-multiline rule (fixes #746) (Glen Mailer) +* Update: refactor handle-callback-err to improve performance (fixes #2841) (Mathias Schreck) +* Fix: Add --init to the CLI options (fixes #2817) (Gyandeep Singh) +* Update: Add `except-parens` option to `no-return-assign` rule (fixes #2809) (Toru Nagashima) +* Fix: handle-callback-err missing arrow functions (fixes #2823) (Jamund Ferguson) +* Fix: `no-extra-semi` in class bodies (fixes #2794) (Toru Nagashima) +* Fix: Check type to be file when looking for config files (fixes #2790) (Gyandeep Singh) +* Fix: valid-jsdoc to work for object getters (fixes #2407) (Gyandeep Singh) +* Update: Add an option as an object to `generator-star-spacing` rule (fixes #2787) (Toru Nagashima) +* Build: Update markdownlint dependency (David Anson) +* Fix: context report message to handle more scenarios (fixes #2746) (Gyandeep Singh) +* Update: Ignore JsDoc comments by default for `spaced-comment` (fixes #2766) (Gyandeep Singh) +* Fix: one-var 'never' option for mixed initialization (Fixes #2786) (Ian VanSchooten) +* Docs: Fix a minor typo in a prefer-const example (jviide) +* Fix: comma-dangle always-multiline: no comma right before the last brace (fixes #2091) (Benoît Zugmeyer) +* Fix: Allow blocked comments with markers and new-line (fixes #2777) (Gyandeep Singh) +* Docs: small fix in quote-props examples (Jose Roberto Vidal) +* Fix: object-shorthand rule should not warn for NFEs (fixes #2748) (Michael Ficarra) +* Fix: arraysInObjects for object-curly-spacing (fixes #2752) (Jamund Ferguson) +* Docs: Clarify --rule description (fixes #2773) (Nicholas C. Zakas) +* Fix: object literals in arrow function bodies (fixes #2702) (Jose Roberto Vidal) +* New: `constructor-super` rule (fixes #2720) (Toru Nagashima) +* New: `no-this-before-super` rule (fixes #2721) (Toru Nagashima) +* Fix: space-unary-ops flags expressions starting w/ keyword (fixes #2764) (Michael Ficarra) +* Update: Add block options to `lines-around-comment` rule (fixes #2667) (Gyandeep Singh) +* New: array-bracket-spacing (fixes #2226) (Jamund Ferguson) +* Fix: No-shadow rule duplicating error messages (fixes #2706) (Aliaksei Shytkin) + +v0.23.0 - June 14, 2015 + +* Build: Comment out auto publishing of release notes (refs #2640) (Ilya Volodin) +* Fix: "extends" within package.json (fixes #2754) (Gyandeep Singh) +* Upgrade: globals@8.0.0 (fixes #2759) (silverwind) +* Docs: eol-last docs fix (fixes #2755) (Gyandeep Singh) +* Docs: btmills is a reviewer (Nicholas C. Zakas) +* Build: Revert lock io.js to v2.1.0 (refs #2745) (Brandon Mills) +* New: computed-property-spacing (refs #2226) (Jamund Ferguson) +* Build: Pin Sinon version (fixes #2742) (Ilya Volodin) +* Fix: `prefer-const` treats `for-in`/`for-of` with the same way (Fixes #2739) (Toru Nagashima) +* Docs: Add links to team members profile (Gyandeep Singh) +* Docs: add team and ES7 info to readme (Nicholas C. Zakas) +* Fix: don't try to strip "line:" prefix from parser errors with no such prefix (fixes #2698) (Tim Cuthbertson) +* Fix: never ignore config comment options (fixes #2725) (Brandon Mills) +* Update: Add clarification to spaced-comment (refs #2588) (Greg Cochard) +* Update: Add markers to spaced-comment (fixes #2588) (Greg Cochard) +* Fix: no-trailing-spaces now handles skipBlankLines (fixes #2575) (Greg Cochard) +* Docs: Mark global-strict on by default (fixes #2629) (Ilya Volodin) +* New: Allow extends to be an array (fixes #2699) (Justin Morris) +* New: globals@7.1.0 (fixes #2682) (silverwind) +* New: `prefer-const` rule (fixes #2333) (Toru Nagashima) +* Fix: remove hard-coded list of unary keywords in space-unary-ops rule (fixes #2696) (Tim Cuthbertson) +* Breaking: Automatically validate rule options (fixes #2595) (Brandon Mills) +* Update: no-lone-blocks does not report block-level scopes (fixes #2119) (Jose Roberto Vidal) +* Update: yoda onlyEquality option (fixes #2638) (Denis Sokolov) +* Docs: update comment to align with source code it's referencing (Michael Ficarra) +* Fix: Misconfigured default option for lines-around-comment rule (fixes #2677) (Gyandeep Singh) +* Fix: `no-shadow` allows shadowing in the TDZ (fixes #2568) (Toru Nagashima) +* New: spaced-comment rule (fixes #1088) (Gyandeep Singh) +* Fix: Check unused vars in exported functions (fixes #2678) (Gyandeep Singh) +* Build: Stringify payload of release notes (fixes #2640) (Greg Cochard) +* Fix: Allowing u flag in regex to properly lint no-empty-character-class (fixes #2679) (Dominic Barnes) +* Docs: deprecate no-wrap-func (fixes #2644) (Jose Roberto Vidal) +* Docs: Fixing grammar: then -> than (E) +* Fix: trailing commas in object-curly-spacing (fixes #2647) (Jamund Ferguson) +* Docs: be consistent about deprecation status (Matthew Dapena-Tretter) +* Docs: Fix mistakes in object-curly-spacing docs (Matthew Dapena-Tretter) +* New: run processors when calling executeOnText (fixes #2331) (Mordy Tikotzky) +* Update: move executeOnText() tests to the correct describe block (fixes #2648) (Mordy Tikotzky) +* Update: add tests to assert that the preprocessor is running (fixes #2651) (Mordy Tikotzky) +* Build: Lock io.js to v2.1.0 (fixes #2653) (Ilya Volodin) + +v0.22.1 - May 30, 2015 + +* Build: Remove release notes auto-publish (refs #2640) (Ilya Volodin) + +v0.22.0 - May 30, 2015 + +* Upgrade: escope 3.1.0 (fixes #2310, #2405) (Toru Nagashima) +* Fix: “consistent-this†incorrectly flagging destructuring of `this` (fixes #2633) (David Aurelio) +* Upgrade: eslint-tester to 0.7.0 (Ilya Volodin) +* Update: allow shadowed references in no-alert (fixes #1105) (Mathias Schreck) +* Fix: no-multiple-empty-lines and template strings (fixes #2605) (Jamund Ferguson) +* New: object-curly-spacing (fixes #2225) (Jamund Ferguson) +* Docs: minor fix for one-var rule (Jamund Ferguson) +* Fix: Shared config being clobbered by other config (fixes #2592) (Dominic Barnes) +* Update: adds "functions" option to no-extra-parens (fixes #2477) (Jose Roberto Vidal) +* Docs: Fix json formatting for lines-around-comments rule (Gyandeep Singh) +* Fix: Improve around function/class names of `no-shadow` (fixes #2556, #2552) (Toru Nagashima) +* Fix: Improve code coverage (fixes #2590) (Ilya Volodin) +* Fix: Allow scoped configs to have sub-configs (fixes #2594) (Greg Cochard) +* Build: Add auto-update of release tag on github (fixes #2566) (Greg Cochard) +* New: lines-around-comment (fixes #1344) (Jamund Ferguson) +* Build: Unblock build by increasing code coverage (Ilya Volodin) +* New: accessor-pairs rule to object initializations (fixes #1638) (Gyandeep Singh) +* Fix: counting of variables statements in one-var (fixes #2570) (Mathias Schreck) +* Build: Add sudo:false for Travis (fixes #2582) (Ilya Volodin) +* New: Add rule schemas (refs #2179) (Brandon Mills) +* Docs: Fix typo in shareable-configs example (fixes #2571) (Ted Piotrowski) +* Build: Relax markdownlint rules by disabling style-only items (David Anson) +* Fix: Object shorthand rule incorrectly flagging getters/setters (fixes #2563) (Brad Dougherty) +* New: Add config validator (refs #2179) (Brandon Mills) +* New: Add worker environment (fixes #2442) (Ilya Volodin) +* New no-empty-character class (fixes #2508) (Jamund Ferguson) +* New: Adds --ignore-pattern option. (fixes #1742) (Patrick McElhaney) + +v0.21.2 - May 18, 2015 + +* 0.21.2 (Nicholas C. Zakas) +* Fix: one-var exception for ForStatement.init (fixes #2505) (Brandon Mills) +* Fix: Don't throw spurious shadow errors for classes (fixes #2545) (Jimmy Jia) +* Fix: valid-jsdoc rule to support exported functions (fixes #2522) (Gyandeep Singh) +* Fix: Allow scoped packages in configuration extends (fixes #2544) (Eric Isakson) +* Docs: Add chatroom to FAQ (Nicholas C. Zakas) +* Docs: Move Gitter badge (Nicholas C. Zakas) + +v0.21.1 - May 15, 2015 + +* 0.21.1 (Nicholas C. Zakas) +* Fix: loc obj in report fn expects column (fixes #2481) (Varun Verma) +* Build: Make sure that all md files end with empty line (fixes #2520) (Ilya Volodin) +* Added Gitter badge (The Gitter Badger) +* Fix: forced no-shadow to check all scopes (fixes #2294) (Jose Roberto Vidal) +* Fix: --init indent setting (fixes #2493) (Nicholas C. Zakas) +* Docs: Mention bundling multiple shareable configs (Nicholas C. Zakas) +* Fix: Not to override the required extended config object directly (fixes #2487) (Gyandeep Singh) +* Build: Update markdownlint dependency (David Anson) +* Docs: added recursive function example to no-unused-vars (Jose Roberto Vidal) +* Docs: Fix typo (then -> than) (Vladimir Agafonkin) +* Revert "Fix: sanitise Jekyll interpolation during site generation (fixes #2297)" (Nicholas C. Zakas) +* Fix: dot-location should use correct dot token (fixes #2504) (Mathias Schreck) +* Fix: Stop linebreak-style from crashing (fixes #2490) (James Whitney) +* Fix: rule no-duplicate-case problem with CallExpressions. (fixes #2499) (Matthias Osswald) +* Fix: Enable full support for eslint-env comments (refs #2134) (Ilya Volodin) +* Build: Speed up site generation (fixes #2475) (Ilya Volodin) +* Docs: Fixing trailing spaces (Fixes #2478) (Ilya Volodin) +* Docs: Update README FAQs (Nicholas C. Zakas) +* Fix: Allow comment before comma for comma-spacing rule (fixes #2408) (Gyandeep Singh) + +v0.21.0 - May 9, 2015 + +* 0.21.0 (Nicholas C. Zakas) +* New: Shareable configs (fixes #2415) (Nicholas C. Zakas) +* Fix: Edge cases for no-wrap-func (fixes #2466) (Nicholas C. Zakas) +* Docs: Update ecmaFeatures description (Nicholas C. Zakas) +* New: Add dot-location rule. (fixes #1884) (Greg Cochard) +* New: Add addPlugin method to CLI-engine (Fixes #1971) (Ilya Volodin) +* Breaking: Do not check unset declaration types (Fixes #2448) (Ilya Volodin) +* Fix: no-redeclare switch scoping (fixes #2337) (Nicholas C. Zakas) +* Fix: Check extra scope in no-use-before-define (fixes #2372) (Nicholas C. Zakas) +* Fix: Ensure baseConfig isn't changed (fixes #2380) (Nicholas C. Zakas) +* Fix: Don't warn for member expression functions (fixes #2402) (Nicholas C. Zakas) +* New: Adds skipBlankLines option to the no-trailing-spaces rule (fixes #2303) (Andrew Vaughan) +* Fix: Adding exception for last line (Refs #2423) (Greg Cochard) +* Fix: crash on 0 max (fixes #2423) (gcochard) +* Fix object-shorthand arrow functions (fixes #2414) (Jamund Ferguson) +* Fix: Improves detection of self-referential functions (fixes #2363) (Jose Roberto Vidal) +* Update: key-spacing groups must be consecutive lines (fixes #1728) (Brandon Mills) +* Docs: grammar fix in no-sync (Tony Lukasavage) +* Docs: Update configuring.md to fix incorrect link. (Ans) +* New: Check --stdin-filename by ignore settings (fixes #2432) (Aliaksei Shytkin) +* Fix: `no-loop-func` rule allows functions at init part (fixes #2427) (Toru Nagashima) +* New: Add init command (fixes #2302) (Ilya Volodin) +* Fix: no-irregular-whitespace should work with irregular line breaks (fixes #2316) (Mathias Schreck) +* Fix: generator-star-spacing with class methods (fixes #2351) (Brandon Mills) +* New: no-unneeded-ternary rule to disallow boolean literals in conditional expressions (fixes #2391) (Gyandeep Singh) +* Docs: Add `restParams` to `ecmaFeatures` options list (refs: #2346) (Bogdan Savluk) +* Fix: space-in-brackets Cannot read property 'range' (fixes #2392) (Gyandeep Singh) +* Docs: Sort the rules (Lukas Böcker) +* Add: Exception option for `no-extend-native` and `no-native-reassign` (fixes #2355) (Gyandeep Singh) +* Fix: space-in-brackets import declaration (fixes #2378) (Gyandeep Singh) +* Update: Add uninitialized and initialized options (fixes #2206) (Ian VanSchooten) +* Fix: brace-style to not warn about curly mix ifStatements (fixes #1739) (Gyandeep Singh) +* Fix: npm run profile script should use espree (fixes #2150) (Mathias Schreck) +* New: Add support for extending configurations (fixes #1637) (Espen Hovlandsdal) +* Fix: Include string literal keys in object-shorthand (Fixes #2374) (Jamund Ferguson) +* Docs: Specify language for all code fences, enable corresponding markdownlint rule. (David Anson) +* New: linebreak-style rule (fixes #1255) (Erik Müller) +* Update: Add "none" option to operator-linebreak rule (fixes #2295) (Casey Visco) +* Fix: sanitise Jekyll interpolation during site generation (fixes #2297) (Michael Ficarra) + +v0.20.0 - April 24, 2015 + +* 0.20.0 (Nicholas C. Zakas) +* Fix: support arrow functions in no-extra-parens (fixes #2367) (Michael Ficarra) +* Fix: Column position in space-infix-ops rule (fixes #2354) (Gyandeep Singh) +* Fix: allow plugins to be namespaced (fixes #2360) (Seth Pollack) +* Update: one-var: enable let & const (fixes #2301) (Joey Baker) +* Docs: Add meteor to avaiable environments list (bartmichu) +* Update: Use `Object.assign()` polyfill for all object merging (fixes #2348) (Sindre Sorhus) +* Docs: Update markdownlint dependency, resolve/suppress new issues. (David Anson) +* Fix: newline-after-var declare and export (fixes #2325) (Gyandeep Singh) +* Docs: Some typos and grammar. (AlexKVal) +* Fix: newline-after-var to ignore declare in for specifiers (fixes #2317) (Gyandeep Singh) +* New: add --stdin-filename option (fixes #1950) (Mordy Tikotzky) +* Fix: Load .eslintrc in $HOME only if no other .eslintrc is found (fixes #2279) (Jasper Woudenberg) +* Fix: Add `v8` module to no-mixed-requires rule (fixes #2320) (Gyandeep Singh) +* Fix: key-spacing with single properties (fixes #2311) (Brandon Mills) +* Docs: `no-invalid-regexp`: add `ecmaFeatures` flags for `u`/`y` (Jordan Harband) +* New: object-shorthand rule (refs: #1617) (Jamund Ferguson) +* Update: backticks support for quotes rule (fixes #2153) (borislavjivkov) +* Fix: space-in-brackets to work with modules (fixes #2216) (Nicholas C. Zakas) + +v0.19.0 - April 11, 2015 + +* 0.19.0 (Nicholas C. Zakas) +* Upgrade: Espree to 2.0.1 (Nicholas C. Zakas) +* Docs: Update one-var documentation (fixes #2210) (Nicholas C. Zakas) +* Update: Add test for no-undef (fixes #2214) (Nicholas C. Zakas) +* Fix: Report better location for padded-blocks error (fixes #2224) (Nicholas C. Zakas) +* Fix: Don't check concise methods in quote-props (fixes #2251) (Nicholas C. Zakas) +* Fix: Consider tabs for space-in-parens rule (fixes #2191) (Josh Quintana) +* Fix: block-scoped-var to work with classes (fixes #2280) (Nicholas C. Zakas) +* Docs: Remove trailing spaces, enable corresponding markdownlint rule. (David Anson) +* Fix: padded-blocks with ASI (fixes #2273) (Brandon Mills) +* Fix: Handle comment lines in newline-after-var (fixed #2237) (Casey Visco) +* Docs: Standardize on '*' for unordered lists, enable corresponding markdownlint rule. (David Anson) +* Fix: no-undef and no-underscore-dangle to use double quotes (fixes #2258) (Gyandeep Singh) +* Docs: Improve grammar and style in comma-dangle.md (Nate Eagleson) +* Docs: Improve grammar and style in padded-blocks.md (Nate Eagleson) +* Docs: Update URL in no-wrap-func.md to resolve 404 (Nate Eagleson) +* Docs: Fix typo in command-line-interface.md (Nate Eagleson) +* Docs: Fix typo in working-with-rules.md (Nate Eagleson) +* Docs: Remove hard tabs from *.md, enable corresponding markdownlint rule. (David Anson) +* Fix: Function id missing in parent scope when using ecmaFeature `modules` for rule block-scoped-var (fixes #2242) (Michael Ferris) +* Fix: Ignore single lines for vertical alignment (fixes #2018) (Ian VanSchooten) +* Fix: Allow inline comments in newline-after-var rule (fixes #2229) (Casey Visco) +* Upgrade: Espree 2.0.0 and escope 3.0.0 (fixes #2234, fixes #2201, fixes (Nicholas C. Zakas) +* Docs: Update --no-ignore warning (Brandon Mills) +* Build: Remove jshint files (fixes #2222) (Jeff Tan) +* Docs: no-empty fix comment change (refs #2188) (Gyandeep Singh) +* Fix: duplicate semi and no-extra-semi errors (fixes #2207) (Brandon Mills) +* Docs: Update processors description (Nicholas C. Zakas) +* Fix: semi error on export declaration (fixes #2194) (Brandon Mills) +* New: operator-linebreak rule (fixes #1405) (Benoît Zugmeyer) +* Docs: Fixing broken links in documentation (Ilya Volodin) +* Upgrade: Espree to 0.12.3 (fixes #2195) (Gyandeep Singh) +* Fix: camelcase rule with {properties: never} shouldn't check assignment (fixes #2189) (Gyandeep Singh) +* New: Allow modifying base config (fixes #2143) (Meo) +* New: no-continue rule (fixes #1945) (borislavjivkov) +* Fix: `no-empty` rule should allow any comments (fixes #2188) (Gyandeep Singh) +* Docs: Fix spell in camelcase doc (fixes #2190) (Gyandeep Singh) +* Fix: Require semicolon after import/export statements (fixes #2174) (Gyandeep Singh) +* Build: Add linting of Markdown files to "npm test" script (fixes #2182) (David Anson) +* Build: Fixing site generation (Ilya Volodin) +* Build: Fix gensite task to work even if files are missing (Nicholas C. Zakas) + +v0.18.0 - March 28, 2015 + +* 0.18.0 (Nicholas C. Zakas) +* Fix: Mark variables as used in module scope (fixes #2137) (Nicholas C. Zakas) +* Fix: arrow functions need wrapping (fixes #2113) (Nicholas C. Zakas) +* Fix: Don't crash on empty array pattern item (fixes #2111) (Nicholas C. Zakas) +* Fix: Don't error on destructured params (fixes #2051) (Nicholas C. Zakas) +* Docs: Fixing broken links (Ilya Volodin) +* Fix: no-constant-condition should not flag += (fixes #2155) (Nicholas C. Zakas) +* Fix: Ensure piped in code will trigger correct errors (fixes #2154) (Nicholas C. Zakas) +* Fix: block-scoped-var to handle imports (fixes #2087) (Nicholas C. Zakas) +* Fix: no-dupe-args to work with destructuring (fixes #2148) (Nicholas C. Zakas) +* Fix: key-spacing crash on computed properties (fixes #2120) (Brandon Mills) +* Fix: indent crash on caseless switch (fixes #2144) (Brandon Mills) +* Fix: Don't warn about destructured catch params (fixes #2125) (Nicholas C. Zakas) +* Update: Omit setter param from no-unused-vars (fixes #2133) (Nicholas C. Zakas) +* Docs: Cleaning dead links (Ilya Volodin) +* Docs: Moving documentation out of the repository and modifying build scripts (Ilya Volodin) +* Docs: Update link to Documentation (Kate Lizogubova) +* Docs: Adding back deprecated space-unary-word-ops documentation (Ilya Volodin) +* Fix: Unused recursive functions should be flagged (issue2095) (Nicholas C. Zakas) +* Breaking: Remove JSX support from no-undef (fixes #2093) (Nicholas C. Zakas) +* Fix: markVariableAsUsed() should work in Node.js env (fixes #2089) (Nicholas C. Zakas) +* New: Add "always" and "never" options to "one-var" rule. (fixes #1619) (Danny Fritz) +* New: newline-after-var rule (fixes #2057) (Gopal Venkatesan) +* Fix: func-names with ES6 classes (fixes #2103) (Marsup) +* Fix: Add "Error" to the "new-cap" rule exceptions (fixes #2098) (Mickaël Tricot) +* Fix: vars-on-top conflict with ES6 import (fixes #2099) (Gyandeep Singh) +* Docs: Fixed JSON syntax (Sajin) +* New: space-before-function-paren rule (fixes #2028) (Brandon Mills) +* Breaking: rule no-empty also checking for empty catch blocks. (fixes #1841) (Dieter Oberkofler) +* Update: rule camelcase to allow snake_case in object literals. (fixes #1919) (Dieter Oberkofler) +* New: Added option int32Hint for space-infix-ops (fixes #1295) (Kirill Efimov) +* New: no-param-reassign rule (fixes #1599) (Nat Burns) + +v0.17.1 - March 17, 2015 + +* 0.17.1 (Nicholas C. Zakas) +* Fix: no-func-assign should not fail on import declarations (fixes #2060) (Igor Zalutsky) +* Fix: block-scoped-var to work with destructuring (fixes #2059) (Nicholas C. Zakas) +* Fix: no-redeclare should check Node.js scope (fixes #2064) (Nicholas C. Zakas) +* Fix: space-before-function-parentheses generator methods (fixes #2082) (Brandon Mills) +* Fix: Method name resolution in complexity rule (fixes #2049) (Nicholas C. Zakas) +* Fix: no-unused-vars crash from escope workaround (fixes #2042) (Brandon Mills) +* Fix: restrict dot-notation keywords to actual ES3 keywords (fixes #2075) (Michael Ficarra) +* Fix: block-scoped-var to work with classes (fixes #2048) (Nicholas C. Zakas) +* Docs: Update no-new documentation (fixes #2044) (Nicholas C. Zakas) +* Fix: yoda range exceptions with this (fixes #2063) (Brandon Mills) +* Docs: Fix documentation on configuring eslint with comments (Miguel Ping) +* Fix: rule no-duplicate-case problem with MemberExpressions. (fixes #2038) (Dieter Oberkofler) +* Fix: Exempt \0 from no-octal-escape (fixes #1923) (Michael Ficarra) + +v0.17.0 - March 14, 2015 + +* 0.17.0 (Nicholas C. Zakas) +* Fix: module import specifiers should be defined (refs #1978) (Nicholas C. Zakas) +* Fix: Ignore super in no-undef (refs #1968) (Nicholas C. Zakas) +* Upgrade: Espree to v0.12.0 (refs #1968) (Nicholas C. Zakas) +* Fix: destructured arguments should work in block-scoped-var (fixes #1996) (Nicholas C. Zakas) +* Fix: Line breaking with just carriage return (fixes #2005) (Nicholas C. Zakas) +* Fix: location of new-cap error messages (fixes #2025) (Mathias Schreck) +* Breaking: Stop checking JSX variable use, expose API instead (fixes #1911) (Glen Mailer) +* Fix: Check spacing of class methods (fixes #1989) (Nicholas C. Zakas) +* New: no-duplicate-case rule to disallow a duplicate case label (fixes #2015) (Dieter Oberkofler) +* Clarify issue requirement for doc pull requests (Ian) +* Add quotes around object key (Ian) +* Fix: Add comma-dangle allow-multiline (fixes #1984) (Keith Cirkel) +* Fix: Don't explode on default export function (fixes #1985) (Nicholas C. Zakas) +* Update: Add AST node exceptions to comma-style. (fixes #1932) (Evan Simmons) +* Docs: Add spread operator to available language options (Nicholas C. Zakas) +* New: generator-star-spacing rule (fixes #1680, fixes #1949) (Brandon Mills) + +v0.16.2 - March 10, 2015 + +* 0.16.2 (Nicholas C. Zakas) +* Fix: Ensure globalReturn isn't on when node:false (fixes #1995) (Nicholas C. Zakas) +* Downgrade: escope pegged to 2.0.6 (refs #2001) (Nicholas C. Zakas) +* Upgrade: escope to 2.0.7 (fixes #1978) (Nicholas C. Zakas) +* Docs: Update descriptive text for --no-ignore option. (David Anson) +* Upgrade: estraverse to latest for ESTree support (fixes #1986) (Nicholas C. Zakas) +* Fix: Global block-scope-var check should work (fixes #1980) (Nicholas C. Zakas) +* Fix: Don't warn about parens around yield (fixes #1981) (Nicholas C. Zakas) + +v0.16.1 - March 8, 2015 + +* 0.16.1 (Nicholas C. Zakas) +* Fix: Node.js scoping in block-scoped-var (fixes #1969) (Nicholas C. Zakas) +* Update: Enable ES6 scoping for more options (Nicholas C. Zakas) +* Fix: Ensure all export nodes are traversable (fixes #1965) (Nicholas C. Zakas) +* Fix: Ensure class names are marked as used (fixes #1967) (Nicholas C. Zakas) +* Fix: remove typo that caused a crash (fixes #1963) (Fabricio C Zuardi) +* Docs: Added missing "are" (Sean Wilkinson) + +v0.16.0 - March 7, 2015 + +* 0.16.0 (Nicholas C. Zakas) +* Fix: Pass correct sourceType to escope (fixes #1959) (Nicholas C. Zakas) +* Fix: Scoping for Node.js (fixes #892) (Nicholas C. Zakas) +* Fix: strict rule should honor module code (fixes #1956) (Nicholas C. Zakas) +* New: Add es6 environment (fixes #1864, fixes #1944) (Nicholas C. Zakas) +* Docs: Update ecmaFeatures list (fixes #1942) (Nicholas C. Zakas) +* Fix: Make no-unused-vars ignore exports (fixes #1903) (Nicholas C. Zakas) +* Upgrade: Espree to v1.11.0 (Nicholas C. Zakas) +* Fix: Comment configuration of rule doesn't work (fixes #1792) (Jary) +* Fix: Rest args should work in no-undef and block-scoped-var (fixes #1543) (Nicholas C. Zakas) +* Breaking: change no-comma-dangle to comma-dangle (fixes #1350) (Mathias Schreck) +* Update: space-before-function-parentheses to support generators (fixes #1929) (Brandon Mills) +* New: Adding support for "// eslint-disable-line rule" style comments (Billy Matthews) +* Fix: Use unversioned sinon file in browser test (fixes #1947) (Nicholas C. Zakas) +* Docs: Add mention of compatible parsers (Nicholas C. Zakas) +* Fix: Better error when given null as rule config (fixes #1760) (Glen Mailer) +* Update: no-empty to check TryStatement.handler (fixes #1930) (Brandon Mills) +* Fix: space-before-function-parentheses and object methods (fixes #1920) (Brandon Mills) +* New: no-dupe-args rule (fixes #1880) (Jamund Ferguson) +* Fix: comma-spacing should ignore JSX text (fixes #1916) (Brandon Mills) +* Breaking: made eol-last less strict (fixes #1460) (Glen Mailer) +* New: generator-star middle option (fixes #1808) (Jamund Ferguson) +* Upgrade: Espree to 1.10.0 for classes support (Nicholas C. Zakas) +* Docs: no-plusplus.md - auto semicolon insertion (Miroslav Obradović) +* Docs: Use union types in TokenStore JSDoc (refs #1878) (Brandon Mills) +* Fix: block-scoped-var to work with destructuring (fixes #1863) (Nicholas C. Zakas) +* Docs: Update docs for token-related methods (fixes #1878) (Nicholas C. Zakas) +* Update: Remove preferGlobal from package.json (fixes #1877) (Nicholas C. Zakas) +* Fix: allow block bindings in no-inner-declarations (fixes #1893) (Roberto Vidal) +* Fix: getScope and no-use-before-define for arrow functions (fixes #1895) (Brandon Mills) +* Fix: Make no-inner-declarations look for arrow functions (fixes #1892) (Brandon Mills) +* Breaking: Change no-space-before-semi to semi-spacing and add "after" option (fixes #1671) (Mathias Schreck) +* Update: Add support for custom preprocessors (fixes #1817) (Ilya Volodin) + +v0.15.1 - February 26, 2015 + +* 0.15.1 (Nicholas C. Zakas) +* Build: Fix release task (Nicholas C. Zakas) +* Fix: check all semicolons in no-space-before-semi (fixes #1885) (Mathias Schreck) +* Fix: Refactor comma-spacing (fixes #1587, fixes #1845) (Roberto Vidal) +* Fix: Allow globalReturn in consistent-return (fixes #1868) (Brandon Mills) +* Fix: semi rule should check throw statements (fixes #1873) (Mathias Schreck) +* Docs: Added HolidayCheck AG as user (0xPIT) +* Upgrade: `chalk` to 1.0.0 (Sindre Sorhus) +* Docs: Add CustomInk to the list of companies (Derek Lindahl) +* Docs: Alphabetize project & company usage list (Derek Lindahl) +* Docs: fix typo (Henry Zhu) +* Docs: Fix typo (Brenard Cubacub) + +v0.15.0 - February 21, 2015 + +* 0.15.0 (Nicholas C. Zakas) +* Upgrade: Espree to 1.9.1 (fixes #1816, fixes #1805) (Nicholas C. Zakas) +* Fix: make rules work with for-of statements (fixes #1859) (Mathias Schreck) +* Fix: Enable globalReturn for Node.js environment (fixes #1158) (Nicholas C. Zakas) +* Fix: Location of extra paren message (fixes #1814) (Nicholas C. Zakas) +* Fix: Remove unnecessary file exists check (fixes #1831) (Nicholas C. Zakas) +* Fix: Don't count else-if in max-depth (fixes #1835) (Nicholas C. Zakas) +* Fix: Don't flag for-of statement (fixes #1852) (Nicholas C. Zakas) +* Build: Test using io.js as well (Nicholas C. Zakas) +* Change customformat value to path (suisho) +* Docs: Add a missing word in the Contributing doc (Ben Linskey) +* Docs: Fix typo in wrap-iife rule doc title (Ben Linskey) +* Docs: Update pages to fix rendering of lists (David Anson) +* Fix: new-cap should allow defining exceptions (fixes #1424) (Brian Di Palma) +* Update: Add requireReturnDescription for valid-jsdoc (fixes #1833) (Brian Di Palma) +* New: rule no-throw-literal added (fixes #1791) (Dieter Oberkofler) +* New: multi-line option for the curly rule (fixes #1812) (Hugo Wood) +* Docs: fix typo in configuring docs (mendenhallmagic) +* Update: Backslashes in path (fixes #1818) (Jan Schär) +* Docs: Update pages to fix rendering of lists and fenced code blocks (David Anson) +* Docs: add webpack loader to the docs/integrations page (Maxime Thirouin) +* Breaking: space-before-function-parentheses replaces space-after-function-name and checkFunctionKeyword (fixes #1618) (Mathias Schreck) + +v0.14.1 - February 8, 2015 + +* 0.14.1 (Nicholas C. Zakas) +* Fix: Exit code should be 1 for any number of errors (fixes #1795) (Nicholas C. Zakas) +* Fix: Check indentation of first line (fixes #1796) (Nicholas C. Zakas) +* Fix: strict rules shouldn't throw on arrow functions (fixes #1789) (Nicholas C. Zakas) + +v0.14.0 - February 7, 2015 + +* 0.14.0 (Nicholas C. Zakas) +* Update: Fix indentation of comment (Nicholas C. Zakas) +* Fix: comma-spacing for template literals (fixes #1736) (Nicholas C. Zakas) +* Build: Add Node.js 0.12 testing (Nicholas C. Zakas) +* Breaking: Remove node from results (fixes #957) (Nicholas C. Zakas) +* Breaking: Exit code is now error count (Nicholas C. Zakas) +* Docs: Correct getFormatter() documentation (refs #1723) (Nicholas C. Zakas) +* Update: Make rules work with arrow functions (fixes #1508, fixes #1509, fixes #1493) (Nicholas C. Zakas) +* Fix: Ensure template string references count (fixes #1542) (Nicholas C. Zakas) +* Fix: no-undef to work with arrow functions (fixes #1604) (Nicholas C. Zakas) +* Upgrade: Espree to version 1.8.0 (Nicholas C. Zakas) +* Fix: Don't throw error for arguments (fixes #1759) (Nicholas C. Zakas) +* Fix: Don't warn on computed nonliteral properties (fixes #1762) (Nicholas C. Zakas) +* New: Allow parser to be configured (fixes #1624) (Nicholas C. Zakas) +* Docs: Added double quotes for JSON keys for comma-spacing and key-spacing rule (Dmitry Polovka) +* New: Rule indent (fixes #1022) (Dmitriy Shekhovtsov) +* Revert "New: Rule indent (fixes #1022)" (Nicholas C. Zakas) +* Update: fix eslint indentations (fixes #1770) (Dmitriy Shekhovtsov) +* Fix: Scoping issues for no-unused-vars (fixes #1741) (Nicholas C. Zakas) +* Docs: Added `eslint-enable` inline (Ivan Fraixedes) +* New: Add predefined Meteor globals (fixes #1763) (Johan Brook) +* New: Rule indent (fixes #1022) (Dmitriy Shekhovtsov) +* Update: Check all assignments for consistent-this (fixes #1513) (Timothy Jones) +* Fix: Support exceptions in no-multi-spaces (fixes #1755) (Brandon Mills) +* Docs: Forgotten parentheses in code snippet (Ivan Fraixedes) +* Update: CLIEngine results include warning and error count (fixes #1732) (gyandeeps) +* Fix: Scoping issues for no-unused-vars (fixes #1733) (Nicholas C. Zakas) +* Update: Add getNodeByRangeIndex method (refs #1755) (Brandon Mills) +* Update: Replace getTokenByRange(Index->Start) (refs #1721) (Brandon Mills) +* Update: Fast-path for empty input (fixes #546) (Nicholas C. Zakas) +* Fix: Allow single line else-if (fixes #1739) (Nicholas C. Zakas) +* Fix: Don't crash when $HOME isn't set (fixes #1465) (Nicholas C. Zakas) +* Fix: Make no-multi-spaces work for every case (fixes #1603, fixes #1659) (Nicholas C. Zakas) +* Breaking: Show error and warning counts in stylish summary (fixes #1746) (Brandon Mills) +* Docs: fixed typo in no-lone-blocks docs (Vitor Balocco) +* Docs: fixed typo in consistent-return docs (Vitor Balocco) +* Breaking: remove implied eval check from no-eval (fixes #1202) (Mathias Schreck) +* Update: Improve CLIEngine.getFormatter() (refs #1723) (Nicholas C. Zakas) +* Docs: Add Backbone plugin link (Ilya Volodin) +* Docs: use npm's keyword route (Tom Vincent) +* Build: Update sitegen script (Closes #1725) (Ilya Volodin) + +v0.13.0 - January 24, 2015 + +* 0.13.0 (Nicholas C. Zakas) +* Update: The rule spaced-line-comment now also allows tabs and not only spaces as whitespace. (fixes #1713) (Dieter Oberkofler) +* Docs: add Jasmine rules and eslintplugin npm links (Tom Vincent) +* Fix: Make no-redeclare work with let (fixes #917) (Nicholas C. Zakas) +* Update: Add CLIEngine.getFormatter() (fixes #1653) (Nicholas C. Zakas) +* Breaking: Update escope (fixes #1642) (Nicholas C. Zakas) +* Update: Switch to using estraverse-fb (fixes #1712) (Nicholas C. Zakas) +* Docs: Update README FAQ (Nicholas C. Zakas) +* Update: no-warning-comments matches on whole word only (fixes #1709) (Nick Fisher) +* Build: Add JSDoc generation (fixes #1363) (Nicholas C. Zakas) +* Docs: Add more info about context (fixes #1330) (Nicholas C. Zakas) +* Upgrade: Espree to 1.7.1 (fixes #1706) (Nicholas C. Zakas) +* Docs: Make CLA notice more prominent (Nicholas C. Zakas) +* Update: Added globals for: phantom,jquery, prototypejs, shelljs (fixes #1704) (Dmitriy Shekhovtsov) +* Docs: Fixed example for the space-return-throw-case rule (mpal9000) +* Fix: Except object literal methods from func-names (fixes #1699) (Brandon Mills) +* Update: use global strict mode everywhere (fixes #1691) (Brandon Mills) +* Update: Add allowPattern option for dot-notation rule (fixes #1679) (Tim Schaub) +* Fix: Missing undeclared variables in JSX (fixes #1676) (Yannick Croissant) +* Fix: no-unused-expressions rule incorrectly flagging yield (fixes #1672) (Rémi Gérard-Marchant) +* Update: Combine strict mode rules (fixes #1246) (Brandon Mills) +* Fix: disregards leading './' in ignore pattern or file name (fixes #1685) (Chris Montrois) +* Upgrade: globals module to latest (fixes #1670) (Nicholas C. Zakas) +* Fix: generator-star should allow params (fixes #1677) (Brandon Mills) +* Fix: no-unused-vars for JSX (fixes #1673 and fixes #1534) (Yannick Croissant) +* Docs: Add angularjs-eslint link into the integration doc (Emmanuel DEMEY) + +v0.12.0 - January 17, 2015 + +* 0.12.0 (Nicholas C. Zakas) +* Fix: Track JSX global variable correctly (fixes #1534) (Nicholas C. Zakas) +* Fix: Property regex flag checking (fixes #1537) (Nicholas C. Zakas) +* Docs: Add angularjs-eslint link into the integration doc (Emmanuel DEMEY) +* Update: Expose ecmaFeatures on context (fixes #1648) (Nicholas C. Zakas) +* Docs: Added Fitbit to the list of companies (Igor Zalutsky) +* New: gen-star rule (refs #1617) (Jamund Ferguson) +* New: no-var rule (refs #1617) (Jamund Ferguson) +* Fix: Support JSX spread operator (fixes #1634) (Nicholas C. Zakas) +* Docs: Document ecmaFeatures (Nicholas C. Zakas) +* Upgrade: several dependencies (fixes #1377) (Nicholas C. Zakas) +* Fix: Broken JSX test (Nicholas C. Zakas) +* Fix: no-bitwise reports on bitwise assignment expressions (fixes #1643) (Mathias Schreck) +* Fix: Find JSXIdentifier refs in no-unused-vars (fixes #1534) (Nicholas C. Zakas) +* Update: Add a couple JSX tests (Nicholas C. Zakas) +* Fix: quotes rule ignores JSX literals (fixes #1477) (Nicholas C. Zakas) +* Fix: Don't warn on JSX literals with newlines (fixes #1533) (Nicholas C. Zakas) +* Update: Fully enable JSX support (fixes #1640) (Nicholas C. Zakas) +* Breaking: Allow parser feature flips (fixes #1602) (Nicholas C. Zakas) +* Fix: Allow comments in key-spacing groups (fixes #1632) (Brandon Mills) +* Fix: block-scoped-var reports labels (fixes #1630) (Michael Ficarra) +* Docs: add newline to no-process-env (fixes #1627) (Tom Vincent) +* Fix: Update optionator, --no in help (fixes #1134) (George Zahariev) +* Fix: Allow individual newlines in space-in-brackets (fixes #1614) (Brandon Mills) +* Docs: Correct alignment in example project tree (Tim Schaub) +* Docs: Remove references to Esprima (Nicholas C. Zakas) +* Docs: Remove illegal code fence (Nicholas C. Zakas) + +v0.11.0 - December 30, 2014 + +* 0.11.0 (Nicholas C. Zakas) +* Fix: Adding regexp literal exception (fixes #1589) (Greg Cochard) +* Fix: padded-blocks incorrectly complained on comments (fixes #1416) (Mathias Schreck) +* Fix: column location of key-spacing with additional tokens (fixes #1458) (Mathias Schreck) +* Build: tag correct commit (refs #1606) (Mathias Schreck) +* Upgrade: Updat Espree to 1.3.1 (Nicholas C. Zakas) +* Fix: add es3 config option to dot-notation rule (fixes #1484) (Michael Ficarra) +* Fix: valid-jsdoc should recognize @class (fixes #1585) (Nicholas C. Zakas) +* Update: Switch to use Espree (fixes #1595) (Nicholas C. Zakas) +* Fix: brace-style stroustrup should report on cuddled elseif (fixes #1583) (Ian Christian Myers) +* New: Configuration via package.json (fixes #698) (Michael Mclaughlin) +* Update: Set environments w/ globals (fixes #1577) (Elan Shanker) +* Fix: yoda treats negative numbers as literals (fixes #1571) (Brandon Mills) +* Fix: function arguments now count towards no-shadow check (fixes #1584) (Glen Mailer) +* Fix: check if next statement is on newline when warning against extra semicolons. (fixes #1580) (Evan You) +* Update: add yoda exception for range tests (fixes #1561) (Brandon Mills) +* New: space-after-function-name (fixes #1340) (Roberto Vidal) + +v0.10.2 - December 12, 2014 + +* 0.10.2 (Nicholas C. Zakas) +* Fix: detect for...in in no-loop-func (fixes #1573) (Greg Cochard) +* Update: simplify comma-spacing logic (fixes #1562) (Brandon Mills) +* Fix: operator-assignment addition is non-commutative (fixes#1556) (Brandon Mills) +* 0.10.1 (Nicholas C. Zakas) +* Update: Add new-cap exception configurations. (Fixes #1487) - `newCapsAllowed` - `nonNewCapsAllowed` (Jordan Harband) + +v0.10.1 - December 6, 2014 + +* 0.10.1 (Nicholas C. Zakas) +* Docs: Fix v0.10.0 changelog (Nicholas C. Zakas) +* Build: Ensure changelog works with large semver versions (Nicholas C. Zakas) +* Fix: comma-spacing and comma-style to work with array literals (fixes #1492) (Nicholas C. Zakas) +* Update: better operator regex in use-isnan rule (fixes #1551) (Michael Ficarra) +* Fix: wrong op index in no-multi-spaces (fixes #1547) (Brandon Mills) +* Fix: Restrict use-isnan violations to comparison operators. (Fixes #1535) (Jordan Harband) +* Fix: comma-spacing has false positives when parenthesis are used (fixes #1457) (Jamund Ferguson) +* Docs: alphabetize the "Stylistic Issues" section (Jeff Williams) +* Build: make the "gensite" target work when DOCS_DIR does not exist (fixes #1530) (Jeff Williams) +* Docs: badges should only refer to master branch (Mathias Schreck) +* Fix: prevent crash on empty blocks in no-else-return (fixes #1527) (Mathias Schreck) +* Build: Fix md to html conversion regex (fixes #1525) (Brandon Mills) +* 0.10.0 (Nicholas C. Zakas) + +v0.10.0 - November 27, 2014 + +* 0.10.0 (Nicholas C. Zakas) +* Fix: Add Object and Function as exceptions in new-cap (refs #1487) (Nicholas C. Zakas) +* Breaking: Allow extensionless files to be passed on CLI (fixes #1131) (Nicholas C. Zakas) +* Fix: typo: iffe to iife, none to non (Michael Ficarra) +* Update: refactor tokens API (refs #1212) (Brandon Mills) +* New: Allow other file extensions (fixes #801) (Nicholas C. Zakas) +* Update: Add Event to browser globals (fixes #1474) (Nicholas C. Zakas) +* Fix: check function call arguments in comma-spacing (fixes #1515) (Mathias Schreck) +* Update: Add no-cond-assign option to disallow nested assignments in conditionals (fixes #1444) (Jeff Williams) +* Fix: crash in no-multi-spaces on empty array elements (fixes #1418) (Brandon Mills) +* Fix: Don't explode on directory traversal (fixes #1452) (Nicholas C. Zakas) +* Fix: no-fallthrough should work when semis are missing (fixes #1447) (Nicholas C. Zakas) +* Fix: JSDoc parsing by updating doctrine (fixes #1442) (Nicholas C. Zakas) +* Update: restore the "runs" global present in Jasmine 1.3 (fixes #1498) (MichaÅ‚ GoÅ‚Ä™biowski) +* Fix: ignore undefined identifiers in typeof (fixes #1482) (Mathias Schreck) +* Fix: Ignoring empty comments. (fixes #1488) (Greg Cochard) +* New: Add space-unary-ops rules (#1346) (Marcin Kumorek) +* Update: Remove shebang workaround in spaced-line-comment (fixes #1433) (Michael Ficarra) +* Docs: change 'and' to 'an' in docs/rules/valid-jsdoc.md (fixes #1441) (Michael Ficarra) +* Update: Add `beforeAll` and `afterAll` to the Jasmine globals (fixes #1478) (Gyandeep Singh) +* Update: Add exception options to space-in-parens (fixes #1368) (David Clark) +* Build: Add check for license issues (fixes #782) (Brandon Mills) +* Docs: update badges (Yoshua Wuyts) +* Docs: Update pages to fix rendering of lists and fenced code blocks (David Anson) +* Fix: env rules merging for command line config (fixes #1271) (Roberto Vidal) +* Fix: Collect variables declare in switch-case.(fixes #1453) (chris) +* Fix: remove extra capture group (Nate-Wilkins) +* Update: allow distinct alignment groups in key-spacing (fixes #1439) (Brandon Mills) +* Fix: message for numeric property names in quote-props (fixes #1459) (Brandon Mills) +* Docs: Remove assumption about the rule config (Alexander Schmidt) +* New: Add ability to time individual rules (fixes #1437) (Brandon Mills) +* Fix: single quotes (Nate-Wilkins) +* Docs: Fix broken code fences in key-spacing docs (Brandon Mills) +* Docs: Explain .eslintignore features (fixes #1094) (Brandon Mills) +* Breaking: ignore node_modules by default (fixes #1163) (Brandon Mills) +* Fix: Adds clamping to getSource beforeCount (fixes #1427) (Greg Gianforcaro) +* New: add no-inline-comment rule (fixes #1366) (Greg Cochard) +* Fix: '.md' to '.html' with anchors (fixes #1415) (Nate-Wilkins) +* Build: Filter and sort versions in gensite (fixes #1430) (Brandon Mills) +* Build: Escape period in regex (fixes #1428) (Brandon Mills) +* Revert "Fix: '.md' to '.html' with anchors (fixes #1415)" (Nicholas C. Zakas) +* 0.9.2 (Nicholas C. Zakas) +* New: Add operator-assignment rule (fixes #1420) (Brandon Mills) + +v0.9.2 - November 1, 2014 + +* 0.9.2 (Nicholas C. Zakas) +* Fix: '.md' to '.html' with anchors (fixes #1415) (Nate-Wilkins) +* Fix: Allow line breaks in key-spacing rule (fixes #1407) (Brandon Mills) +* Build: add coveralls integration (fixes #1411) (Mathias Schreck) +* Fix: add severity flag for ignored file warning (fixes #1401) (Mathias Schreck) +* Fix: Keep sinon at ~1.10.3 (fixes #1406) (Brandon Mills) +* Fix: ! negates .eslintignore patterns (fixes #1093) (Brandon Mills) +* Fix: let fs.stat throw if a file does not exist (fixes #1296) (Mathias Schreck) +* Fix: check switch statements in space-before-blocks (fixes #1397) (Mathias Schreck) +* Docs: fix rule name in example configuration (Mathias Schreck) +* Fix: disable colors during test run (fixes #1395) (Mathias Schreck) +* New: add isPathIgnored method to CLIEngine (fixes #1392) (Mathias Schreck) +* Docs: changing eslint to ESLint and add missing backtick (Mathias Schreck) +* Docs: Documents the functionality to load a custom formatter from a file (Adam Baldwin) +* 0.9.1 (Nicholas C. Zakas) +* Update: Option type for mixed tabs and spaces (fixes #1374) (Max Nordlund) +* Fix: Nested occurrences of no-else-return now show multiple reports (fixes #1369) (Jordan Hawker) + +v0.9.1 - October 25, 2014 + +* 0.9.1 (Nicholas C. Zakas) +* Docs: fix link on governance model (azu) +* Fix: plugins without rulesConfig causes crash (fixes #1388) (Mathias Schreck) +* 0.9.0 (Nicholas C. Zakas) + +v0.9.0 - October 24, 2014 + +* 0.9.0 (Nicholas C. Zakas) +* New: Allow reading from STDIN (fixes #368) (Nicholas C. Zakas) +* New: add --quiet option (fixes #905) (Mathias Schreck) +* Update: Add support for plugin default configuration (fixes #1358) (Ilya Volodin) +* Fix: Make sure shebang comment node is removed (fixes #1352) (Nicholas C. Zakas) +* New: Adding in rule for irregular whitespace checking. (fixes #1024) (Jonathan Kingston) +* Fix: space-in-parens should not throw for multiline statements (fixes #1351) (Jary) +* Docs: Explain global vs. local plugins (fixes #1238) (Nicholas C. Zakas) +* Docs: Add docs on Node.js API (fixes #1247) (Nicholas C. Zakas) +* Docs: Add recommended keywords for plugins (fixes #1248) (Nicholas C. Zakas) +* Update: Add CLIEngine#getConfigForFile (fixes #1309) (Nicholas C. Zakas) +* Update: turn on comma-style for project (fixes #1316) (Nicholas C. Zakas) +* Fix: Ensure messages are sorted by line (fixes #1343) (Nicholas C. Zakas) +* Update: Added arraysInObjects and objectsInObjects options to space-in-brackets rule (fixes #1265, fixes #1302) (vegetableman) +* Breaking: Removed comma spacing check from space-infix-ops (fixes #1361) (vegetableman) +* Fix: addressed linting errors (Nicholas C. Zakas) +* Docs: Add Contributor Model (fixes #1341) (Nicholas C. Zakas) +* Docs: Add reference to CLA (Nicholas C. Zakas) +* Build: add version numbers to docs (fixes #1170) (Mathias Schreck) +* Fix: no-fallthrough incorrectly flagged falls through annotations (fixes #1353) (Mathias Schreck) +* Build: separate site publishing form generation (fixes #1356) (Mathias Schreck) +* New: Add key-spacing rule (fixes #1280) (Brandon Mills) +* New: add spaced-line-comment rule (fixes #1345) (Greg Cochard) +* Docs: added more Related Rules sections (fixes #1347) (Delapouite) +* Fix: resolve linting issue in (fixes #1339) (Nicholas C. Zakas) +* New: add space-before-blocks rule (fixes #1277) (Mathias Schreck) +* Docs: Remove moot integration plugins (Sindre Sorhus) +* New: add rule for multiple empty lines (fixes #1254) (Greg Cochard) +* Fix: no-shadow rule should consider function expressions (fixes #1322) (Mathias Schreck) +* Update: remove globals present only in Jasmine plugins (fixes #1326) (MichaÅ‚ GoÅ‚ębiowski) +* New: added no-multi-spaces rule (fixes #630) (vegetableman) +* New: Added comma-spacing rule (Fixes #628, Fixes #1319) (vegetableman) +* New: add rule for padded blocks (fixes #1278) (Mathias Schreck) +* Docs: fix eqeqeq isNullCheck comment (Denis Sokolov) +* Fix: no-comma-dangle violation in unit test and Makefile.js/lint not checking return codes (fixes #1306) (David Anson) +* Fix: allow comma-last with object properties having line breaks (fixes #1314) (vegetableman) +* New: Added comma-style rule (fixes #1282) (vegetableman) +* Update: add space after function keyword check (fixes #1276) (Mathias Schreck) +* Update: Add missing environments and fix sorting/grouping of rules (fixes #1307, fixes #1308) (David Anson) +* Docs: Fix sorting of rules within each section (David Anson) +* Docs: Correct a few misspelled words (David Anson) +* Docs: Update multiple pages to fix rendering of fenced code blocks (David Anson) +* New: Added no-process-env rule (fixes #657) (vegetableman) +* Fix: add rule ensuring #1258 is fixed by recent rewrite (fixes #1258) (Michael Ficarra) +* Update: split propertyName from singleValue in space-in-brackets (fixes #1253) (Michael Ficarra) +* Update: add "as-needed" option to quote-props rule (fixes #1279) (Michael Ficarra) +* Docs: fixed broken link and changed warning level to error level (vegetableman) +* Docs: Added "the native web" to the list of companies that use ESLint. (Golo Roden) +* Docs: Add BountySource badge to README (Nicholas C. Zakas) +* 0.8.2 (Nicholas C. Zakas) + +v0.8.2 - September 20, 2014 + +* 0.8.2 (Nicholas C. Zakas) +* Docs: Updated contribution guidelines to add accepted/bounty issues descriptions (Nicholas C. Zakas) +* Docs: Update README with links and FAQs (Nicholas C. Zakas) +* Docs: add finally to space-after-keywords documentation (Mathias Schreck) +* New: add ignoreCase option to sort-vars (fixes #1272) (Mathias Schreck) +* Docs: fix typo (Barry Handelman) +* Docs: Fix broken Markdown on configuration page (Nicholas C. Zakas) +* Docs: Fix reference to wrong rule name (Harry Wolff) +* Upgrade: Most dev dependencies (Nicholas C. Zakas) +* Upgrade: shelljs to 0.3.0 (Nicholas C. Zakas) +* Upgrade: doctrine to 0.5.2 (Nicholas C. Zakas) +* Upgrade: esprima to 1.2.2 (Nicholas C. Zakas) +* Upgrade: eslint-tester to latest (Nicholas C. Zakas) +* Fix: Load .eslintrc in directory with $HOME as an ancestor (fixes #1266) (Beau Gunderson) +* Fix: load .eslintrc from HOME (fixes #1262) (Beau Gunderson) +* New: Add sharable rule settings (fixes #1233) (Ilya Volodin) +* Upgrade: upgrade outdated dependencies (fixes #1251) (Mathias Schreck) +* Docs: fix typo in no-ex-assign documentation (Michael Ficarra) +* Docs: add intellij plugin to integrations (ido) +* Docs: Changing NPM to npm (Peter deHaan) +* Fix: strict should check function expressions (fixes #1244) (Brandon Mills) +* Docs: fix vars-on-top documentation (fixes #1234) (Mathias Schreck) +* 0.8.1 (Nicholas C. Zakas) +* Docs: Fixed a typo in brace-style.md (Anton Antonov) + +v0.8.1 - September 9, 2014 + +* 0.8.1 (Nicholas C. Zakas) +* Fix: Ensure exit code is 1 when there's a syntax error (fixes #1239) (Nicholas C. Zakas) +* Docs: fix up vars-on-top documentation (fixes #1234) (Michael Ficarra) +* Fix: vars-on-top directive support (fixes #1235) (Michael Ficarra) +* Fix: Avoid mutating node.range in max-len (fixes #1224) (Brandon Mills) +* Docs: Typo, add missing quotation mark (Ãdám Lippai) +* Update: space-in-brackets to allow exceptions (fixes #1142) (Brandyn Bennett) +* 0.8.0 (Nicholas C. Zakas) + +v0.8.0 - September 5, 2014 + +* 0.8.0 (Nicholas C. Zakas) +* Perf-related revert "Fix: Speed up tokens API (refs #1212)" (Nicholas C. Zakas) +* Fix: no-fallthrough: continue affects control flow, too (fixes #1220) (Michael Ficarra) +* Fix: rewrite no-unused-vars rule (refs #1212) (Michael Ficarra) +* Fix: Error when there's a \r in .eslintrc (#1172) (Gyandeep Singh) +* Added rule disallowing reserved words being used as keys (fixes #1144) (Emil Bay) +* Fix: rewrite no-spaced-func rule (refs #1212) (Michael Ficarra) +* Fix: Speed up getScope() (refs #1212) (Brandon Mills) +* Fix: no-extra-strict behavior for named function expressions (fixes #1209) (Mathias Schreck) +* Add Date.UTC to allowed capitalized functions (David Brockman Smoliansky) +* New: Adding 'vars-on-top' rule (fixes #1148) (Gyandeep Singh) +* Fix: Speed up tokens API (refs #1212) (Brandon Mills) +* Docs: document plugin usage (fixes #1117) (Mathias Schreck) +* New: accept plugins from cli (fixes #1113) (Mathias Schreck) +* Docs: fix some typos. (Mathias Schreck) +* New: Load plugins from configs (fixes #1115). (Mathias Schreck) +* Fix: no-unused-expressions better directive detection (fixes #1195) (Michael Ficarra) +* Fix: no-unused-expressions directive support (fixes #1185) (Michael Ficarra) +* Update: Add 'allowSingleLine' option to brace-style (fixes #1089) (John Gozde) +* Docs: Spell checking and one extra closing curly in code example (Juga Paazmaya) +* Fix: mergeConfigs ensures the plugins property exists (fixes #1191). (Mathias Schreck) +* Update: Declare ES6 collections (Map, Set, WeakMap, WeakSet) as built-in globals (fixes #1189) (MichaÅ‚ GoÅ‚ębiowski) +* New: Adding 'plugin' CLI option (fixes #1112) (Greg) +* Fix: Correct a typo in the error message in tests (MichaÅ‚ GoÅ‚ębiowski) +* New: Add no-extra-bind rule to flag unnecessary bind calls (fixes #982) (Bence Dányi) +* Fix: Useless bind call in cli-engine (fixes #1181) (Bence Dányi) +* Docs: Updates `amd` description (fixes #1175) (James Whitney) +* New: Adds support for the `jasmine` env (fixes #1176) (James Whitney) +* Fix: for-in support to no-empty-label rule (fixes #1161) (Marc Harter) +* docs: Update link (Mathias Bynens) +* Fix: crash when loading empty eslintrc file (fixes #1164) (Michael Ficarra) +* Fix: no-unused-var should respect compound assignments (fixes #1166) (Michael Ficarra) +* Update: ES3 `ReservedWord`s (fixes #1151) Adds ES3 `ReservedWord`s to the list of keywords in the `dot-notation` rule (fixes #1151) (Emil Bay) +* Update: Update comment parser to read rule slashes (fixes #1116) (Jary) +* New: add no-void rule (fixes #1017). (Mike Sidorov) +* New: Add rules.import() (fixes #1114) (Mathias Schreck) +* New: Make mergeConfigs() merge plugin entries (fixes #1111) (Mathias Schreck) +* Breaking: Change no-global-strict to global-strict and add "always" option (fixes #989) (Brandon Mills) +* Fix: no-unreachable should check top-level statements (fixes #1138) (Brandon Mills) +* Fix: Speed up no-unreachable (fixes #1135) (Brandon Mills) +* New: advanced handle-callback-err configuration (fixes #1124) (Mathias Schreck) +* New: Expose CLIEngine (fixes #1083) (Gyandeep Singh) +* Docs: Add link to new Atom linter (fixes #1125) (Gil Pedersen) +* Fix: space-after-keywords checks finally of TryStatement (fixes #1122) (Michael Ficarra) +* Fix: space-after-keywords checks while of DoWhileStatement (fixes #1120) (Michael Ficarra) +* Fix: space-after-keywords w/ "never" should allow else-if (fixes #1118) (Michael Ficarra) +* Fix: dot-notation rule flags non-keyword reserved words (fixes #1102) (Michael Ficarra) +* Update: Use xml-escape instead of inline helper (Ref #848) (jrajav) +* Update: Added comments support to .eslintignore (fixes #1084) (Vitaly Puzrin) +* Update: enabled 'no-trailing-spaces' rule by default (fixes #1051) (Vitaly Puzrin) +* Breaking: Ignore children of all patterns by adding "/**" (Fixes #1069) (jrajav) +* Fix: skip dot files and ignored dirs on traverse (fixes #1077, related to #814) (Vitaly Puzrin) +* Docs: Added Gruntjs plugin on integrations page (Gyandeep Singh) +* Fix: don't break node offsets if hasbang present (fixes #1078) (Vitaly Puzrin) +* Build: Exclude readme/index from rules Resources generation (Fixes #1072) (jrajav) +* Docs: Change eol-last examples to `

` (Fixes #1068) (jrajav)
+* 0.7.4 (Nicholas C. Zakas)
+* New: space-in-parens rule (Closes #627) (jrajav)
+
+v0.7.4 - July 10, 2014
+
+* 0.7.4 (Nicholas C. Zakas)
+* Docs: Fix 'lintinging' typo and ref links (Tom Vincent)
+* Fix: Transform envs option to object in Config (Fixes #1064) (jrajav)
+* 0.7.3 (Nicholas C. Zakas)
+
+v0.7.3 - July 9, 2014
+
+* 0.7.3 (Nicholas C. Zakas)
+* Update: Address code review comment for strict rule (refs #1011) (Nicholas C. Zakas)
+* Docs: Update copyright policy (Nicholas C. Zakas)
+* Docs: Update documentation for max-len to include description of second option (fixes #1006) (Nicholas C. Zakas)
+* Fix: Avoid double warnings for strict rule (fixes #1011) (Nicholas C. Zakas)
+* Fix: Check envs for true/false (Fixes #1059) (jrajav)
+* 0.7.2 (Nicholas C. Zakas)
+
+v0.7.2 - July 8, 2014
+
+* 0.7.2 (Nicholas C. Zakas)
+* Fix: no-mixed-spaces-and-tabs incorrectly flagging multiline comments (fixes #1055) (Nicholas C. Zakas)
+* Fix: new-cap error that throws on non-string member (fixes #1056) (Nicholas C. Zakas)
+* Fix: Always make globals an object (Fixes #1049) (jrajav)
+* 0.7.1 (Nicholas C. Zakas)
+
+v0.7.1 - July 7, 2014
+
+* 0.7.1 (Nicholas C. Zakas)
+* Docs: Add Related Rules sections (Fixes #990) (jrajav)
+* Fix: Check output file isn't dir, fix tests (Fixes #1034) (jrajav)
+* Docs: Updated documentation for several rules (Nicholas C. Zakas)
+* Docs: Updated contributor guide and dev env setup guide (Nicholas C. Zakas)
+* Breaking: Implement configuration hierarchy (fixes #963) (Nicholas C. Zakas)
+* Update: greatly simplify eqeqeq's operator finding logic (fixes #1037) (Michael Ficarra)
+* New: Add getSourceLines() to core and rule context (fixed #1005) (Jary)
+* Build + Docs: Adding generated resource links to rule docs (Fixes #1021) (jrajav)
+* Fix: Ignore unused params for args: 'none' (Fixes #1026) (jrajav)
+* Fix: Point eqeqeq error at operator (Fixes #1029) (jrajav)
+* New: report output to a file (fixes #1027) (Gyandeep Singh)
+* Breaking: CLIEngine abstraction for CLI operations; formatters no longer are passed configs (fixes #935) (Nicholas C. Zakas)
+* Fix: Allow stdout to drain before exiting (fixes #317) (Nicholas C. Zakas)
+* New: add no-undefined rule (fixes #1020) (Michael Ficarra)
+* New: Added no-mixed-spaces-and-tabs rule (fixes #1003) (Jary)
+* New: Added no-trailing-spaces rule (fixes #995) (Vitaly Puzrin)
+* Update: Factor ignores out of Config (fixes #958) (jrajav)
+* Fix: rewrite eol-last rule (fixes #1007) (fixes #1008) (Michael Ficarra)
+* Fix: add additional IIFE exception in no-extra-parens (fixes #1004) (Michael Ficarra)
+* Docs: Removed reference to brace-style Stroustrup default (fixes #1000) (Caleb Troughton)
+* New: Added eol-last rule (Fixes #996) (Vitaly Puzrin)
+* Fix: Put rule severity in messages (Fixes #984); deprecates passing full config to Formatters (jrajav)
+* Fix: no-unused-vars to check only file globals (fixes #975) (Aliaksei Shytkin)
+* Build: Makefile - Check for rule ids in docs titles (Fixes #969) (Delapouite)
+* Docs: guard-for-in - added missing id in title (Fixes #969) (Delapouite)
+* Breaking: Change 'no-yoda' rule to 'yoda' and add "always" option (Fixes #959) (jrajav)
+* Fix: Fixes no-unused-vars to check /*globals*/ (Fixes #955) (jrajav)
+* Update: no-eval to also warn on setTimeout and setInterval (fixes #721) (Nicholas C. Zakas)
+* Remove: experimental match() method (Nicholas C. Zakas)
+* Update: space-in-brackets now always allows empty object and array literals to have no spaces (fixes #797) (Nicholas C. Zakas)
+* New: Allow the cli parameter "color" and "no-color" (fixes #954) (Tom Gallacher)
+* Fix: valid-jsdoc no more warning for multi-level params (Fixes #925) (Delapouite)
+* Update: Search parent directories for .eslintignore (Fixes #933) (jrajav)
+* Fix: Correct order of arguments passed to assert.equal (fixes #945) (Michał Gołębiowski)
+* Update: Write the summary in stylish formatter in yellow if no errors (fixes #906); test coloring of messages (Michał Gołębiowski)
+* Fix: Corrects configs merging into base config (Fixes #838) (jrajav)
+* Fix: Adding check if char is non-alphabetic to new-cap (Fixes #940) (jrajav)
+* Docs: Update about page description (fixes #936) (Nicholas C. Zakas)
+* Docs: Add '/', forgotten in first commit (Fixes #931) (jrajav)
+* Update: Rule `new-cap` checks capitalized functions (fixes #904) (Aliaksei Shytkin)
+* Docs: Mention allowed semicolons in "never" mode for 'semi' rule (fixes #931) (jrajav)
+* Docs: Mention Yeoman generator in dev setup (fixes #914) (Nicholas C. Zakas)
+* Build: Remove flaky perf test from Travis (Nicholas C. Zakas)
+* Breaking: Refactor .eslintignore functionality (refs #928, fixes #901, fixes #837, fixes #853) (Nicholas C. Zakas)
+* 0.6.2 (Nicholas C. Zakas)
+* Breaking: Remove JSON support for .eslintignore (fixes #883) (icebox)
+
+v0.6.2 - May 23, 2014
+
+* 0.6.2 (Nicholas C. Zakas)
+* Fix: Adding per-environment rule configs to docs and doc validation (Fixes #918) (jrajav)
+* Docs: Updated contribution guidelines (Nicholas C. Zakas)
+* Docs: Update description of eqeqeq to mention special cases (fixes #924) (Nicholas C. Zakas)
+* Fix: block-scoped-var CatchClause handling (fixes #922) (Michael Ficarra)
+* Fix: block-scoped-var respects decls in for and for-in (fixes #919) (Michael Ficarra)
+* Update: Implement eqeqeq option "allow-null" (fixes #910) (Michał Gołębiowski)
+* Fix: new-cap should allow non-alpha characters (fixes #897) (Michael Ficarra)
+* Update: Refactor ESLintTester to fix dependency hell (fixes #602) (Nicholas C. Zakas)
+* Fix: Merge configs with ancestors (Fixes #820) (jrajav)
+* Fix: no-fallthrough should respect block statements in case statements (fixes #893) (Nicholas C. Zakas)
+* Docs: Fix layout issue in configuration docs (fixes #889) (Nicholas C. Zakas)
+* Build: Enable default-case rule (fixes #881) (icebox)
+* Build: Enable space-after-keywords (fixes #884) (icebox)
+* Fix api double emit on comment nodes (fixes #876) (Aliaksei Shytkin)
+* 0.6.1 (Nicholas C. Zakas)
+
+v0.6.1 - May 17, 2014
+
+* 0.6.1 (Nicholas C. Zakas)
+* Upgrade: Optionator to 0.4.0 (fixes #885) (Nicholas C. Zakas)
+* 0.6.0 (Nicholas C. Zakas)
+
+v0.6.0 - May 17, 2014
+
+* 0.6.0 (Nicholas C. Zakas)
+* Fix: Remove -r alias for --rule (fixes #882) (Nicholas C. Zakas)
+* Docs: Update dev setup, contributing, default-case descriptions (Nicholas C. Zakas)
+* Update: valid-jsdoc now allows you to optionally turn off parameter description checks (fixes #822) (Nicholas C. Zakas)
+* Breaking: brace-style now disallows block statements where curlies are on the same line (fixes #758) (Nicholas C. Zakas)
+* Add linting Makefile.js (fixes #870) (icebox)
+* add rule flag, closes #692 (George Zahariev)
+* Add check between rules doc and index (fixes #865) (icebox)
+* Add Build Next mention in integrations README. (icebox)
+* document new IIFE exception for no-extra parens added as part of #655 (Michael Ficarra)
+* (fixes #622) Add rule ID on documentation pages (Delapouite)
+* fixes #655: add IIFE exception to no-extra-parens (Michael Ficarra)
+* add new rule "no-new-require" (Wil Moore III)
+* exit with non-zero status when tests fail (fixes #858) (Márton Salomváry)
+* removed unicode zero width space character from messages (fixes #857) (Márton Salomváry)
+* Change: --rulesdir now can be specified multiple times (fixes #830) (Nicholas C. Zakas)
+* Update: Node 0.8 no longer supported (fixes #734) (Nicholas C. Zakas)
+* Update: Add typed arrays into builtin environment globals (fixes #846) (Nicholas C. Zakas)
+* Fix: Add prototype methods to global scope (fixes #700) (Nicholas C. Zakas)
+* Rule: no-restricted-modules (fixes #791) (Christian)
+* Upgrade: Esprima to 1.2 (fixes #842) (Nicholas C. Zakas)
+* Docs: reporting level 2 is an error (fixes #843) (Brandon Mills)
+* Upgrade: Esprima to 1.2, switch to using Esprima comment attachment (fixes #730) (Nicholas C. Zakas)
+* Fix: Semi rule incorrectly flagging extra semicolon (fixes #840) (Nicholas C. Zakas)
+* Build: Update Travis to only test Node 0.10 (refs #734) (Nicholas C. Zakas)
+* Add "nofunc" option (fixes #829) (Conrad Zimmerman)
+* Rule: no-inner-declarations (fixes #587) (Brandon Mills)
+* Rule 'block-scoped-var': correct scope for functions, arguments (fixes #832) (Aliaksei Shytkin)
+* Rule: default-case (fixes #787) (Aliaksei Shytkin)
+* Ignored files are excluded unless --force is passed on the CLI (Nick Fisher)
+* Fixes a typo and a broken link in the documentation (Nick Fisher)
+* Replaces .some() with .indexOf() where appropriate (Nick Fisher)
+* Fix correct config merge for array values (fixes #819) (Aliaksei Shytkin)
+* Remove warning about ESLint being in Alpha (Nick Fisher)
+* Adds `space-after-keywords` rule (fixes #807) (Nick Fisher)
+* Rule: no-lonely-if (fixes #790) (Brandon Mills)
+* Add ignore comments in file (fixes #305) (Aliaksei Shytkin)
+* 0.5.1 (Nicholas C. Zakas)
+* Change: no-unused-vars default to 'all' (fixes #760) (Nicholas C. Zakas)
+
+v0.5.1 - April 17, 2014
+
+* 0.5.1 (Nicholas C. Zakas)
+* Fix general config not to be modified by comment config in files (fixes #806) (Aliaksei Shytkin)
+* SVG badges (Ryuichi Okumura)
+* fixes #804: clean up implementation of #803 (which fixed #781) (Michael Ficarra)
+* Build: Fix perf test to take median of three runs (fixes #781) (Nicholas C. Zakas)
+* Fix: --reset will now properly ignore default rules in environments.json (fixes #800) (Nicholas C. Zakas)
+* Docs: Updated contributor guidelines (Nicholas C. Zakas)
+* Added Mocha global variables for TDD style. Fixes #793. (Golo Roden)
+* Rule: no-sequences (fixes #561) (Brandon Mills)
+* Change .eslintingore to plain text (fixes #761) (Brandon Mills)
+* Change 'no-spaced-func' message (fixes #762) (Aliaksei Shytkin)
+* Rule 'block-scoped-var' works correct when object inits (fixes #783) (Aliaksei Shytkin)
+* Build: Always build docs site on top of origin/master (Nicholas C. Zakas)
+* 0.5.0 (Nicholas C. Zakas)
+
+v0.5.0 - April 10, 2014
+
+* 0.5.0 (Nicholas C. Zakas)
+* Build: Bump perf limit so Travis won't fail every time (fixes #780) (Nicholas C. Zakas)
+* Add tests to cover 100% of eslint.js (Aliaksei Shytkin)
+* Fix: Make sure no-path-concat doesn't flag non-concat operations (fixes #776) (Nicholas C. Zakas)
+* Rule 'no-unused-var' in functional expression with identifier (fixes #775) (Aliaksei Shytkin)
+* Rule: valid-typeof (Ian Christian Myers)
+* Add global cli flag (ref #692) (Brandon Mills)
+* update to latest Optionator (George Zahariev)
+* Add options for rule 'no-unused-vars' to check all arguments in functions (fixes #728) (Aliaksei Shytkin)
+* Fix: Cleanup package.json (Nicholas C. Zakas)
+* New: Experimental support for CSS Auron (fixes #765) (Nicholas C. Zakas)
+* Lint tests on build (fixes #764) (Aliaksei Shytkin)
+* Rule block-scoped-var works correct with object properties (fixes #755) (Aliaksei Shytkin)
+* Breaking: implement eslint-env and remove jshint/jslint environment comment support (fixes #759) (Aliaksei Shytkin)
+* readme: npm i -> npm install (Linus Unnebäck)
+* Add env flag to cli options summary (fixes #752) (Brandon Mills)
+* Fix: Give the perf test a better calculated budget (fixes #749) (Nicholas C. Zakas)
+* give the `env` flag type `[String]`, improve code (fixes #748) (George Zahariev)
+* fixes #735: add new, more efficient getTokens interfaces (Michael Ficarra)
+* Add --env cli flag (ref #692) (Brandon Mills)
+* Fixes #740 - Make sure callbacks exist before marking them as 'handled'. (mstuart)
+* fixes #743: wrap-regex rule warns on regex used in dynamic member access (Michael Ficarra)
+* replace tab indents with 4 spaces in lib/rules/handle-callback-err.js (Michael Ficarra)
+* Adding homepage and bugs links to package.json (Peter deHaan)
+* JSDoc for rules (Anton Rudeshko)
+* 0.4.5 (Nicholas C. Zakas)
+
+v0.4.5 - March 29, 2014
+
+* 0.4.5 (Nicholas C. Zakas)
+* Build: Add perf check into Travis build to better monitor performance regressions (fixes #732) (Nicholas C. Zakas)
+* Fix: Make sure semi reports correct location of missing semicolon (fixes #726) (Nicholas C. Zakas)
+* Add --no-eslintrc cli flag (ref #717) (Brandon Mills)
+* Fix #716 crash with reset flag (Brandon Mills)
+* Fixed JSON formatting and highlighting (Anton Rudeshko (Tesla))
+* fixes #723: block-scoped-var throws on unnamed function expression (Michael Ficarra)
+* Fix: Make stroustrup brace-style closing message make sense (fixes #719) (Nicholas C. Zakas)
+* no-comma-dangle reports correct line number (Andrey Popp)
+* Upgrade: Esprima to 1.1.1 and EScope to 1.0.1 (fixes #718) (Nicholas C. Zakas)
+* Add reset cli flag (refs #692) (Brandon Mills)
+* Relax eqeqeq null check (fixes #669) (Brandon Mills)
+* 0.4.4 (Nicholas C. Zakas)
+* New Rule: handle-callback-err (fixes #567) (Jamund Ferguson)
+
+v0.4.4 - March 25, 2014
+
+* 0.4.4 (Nicholas C. Zakas)
+* Fix no-used-vars to report FunctionExpression params (fixes #697). (Andrey Popp)
+* fixes #711: eslint reports wrong line number for files with shebang (Michael Ficarra)
+* Fix for no-unused-vars and MemberExpression (Andrey Popp)
+* added no-warning-comments rule (Alexander Schmidt)
+* fixes #699: brace-style does not check function expressions (Michael Ficarra)
+* rewrite block-scoped-var (Michael Ficarra)
+* recommend using hasOwnProperty from Object.prototype in guard-for-in docs (Michael Ficarra)
+* change conf/environments.json spacing to be simpler and more consistent (Michael Ficarra)
+* Update API to use context.getFilename() instead of .filename. (Loren Segal)
+* Small changes, JSDoc is clarified (Aliaksei Shytkin)
+* Move FileFinder to separate file (Aliaksei Shytkin)
+* Cache if file is not found (Aliaksei Shytkin)
+* Use cache on config files seach (Aliaksei Shytkin)
+* Added .eslintignore to load from parents folders (fixes #681) (Aliaksei Shytkin)
+* fix 'node-modules' typo in docs (Fred K. Schott)
+* Upgrade to the latest version of doctrine. (Brian Di Palma)
+* Document optional filename and default it to `input`. (Loren Segal)
+* Fix: Compatibility for Node 0.8 (Nicholas C. Zakas)
+* Update: Makefile.js now uses shelljs-nodecli (Nicholas C. Zakas)
+* #681 apply all .eslintignore exclusions (Aliaksei Shytkin)
+* Add RuleContext.filename property (for eslint/eslint#468). (Loren Segal)
+* 0.4.3 (Nicholas C. Zakas)
+
+v0.4.3 - March 18, 2014
+
+* 0.4.3 (Nicholas C. Zakas)
+* fixes #682: rewrite no-constant-condition rule (Michael Ficarra)
+* Fixes #673 allow configuration of @return errors via requireReturn - (fixes #673) (Brian Di Palma)
+* Tweaking inline code formatting for "if, while, dowhile" (Peter deHaan)
+* Fixes #677 getJSDocComment() should not search beyond FunctionExpression or FunctionDeclaration parent nodes. (Brian Di Palma)
+* Relaxed enforcement of camelcase rule (Ian Christian Myers)
+* Fixing issue #675. Incorrect triggering of no-else-return rule. (Brian Di Palma)
+* Added style option for wrap-iife (Mathias Schreck)
+* Fix: Issues with named function expressions in no-unused-vars and no-shadow (fixes #662) (Nicholas C. Zakas)
+* Update: camelcase rule now doesn't flag function calls (fixes #656) (Nicholas C. Zakas)
+* Updating documentation description for: no-space-before-semi rule, changing rules to exempt strings with semicolons and test for that condition. Fixes #629. (Jonathan Kingston)
+* Adding in rule no-space-before-semi to prevent spaces before semicolons. fixes #629 (Jonathan Kingston)
+* show NPM version (Paul Verest)
+* adapt code formatting (Mathias Schreck)
+* Added a TextMate 2 integration to the docs (Nate Silva)
+* 0.4.2 (Nicholas C. Zakas)
+
+v0.4.2 - March 3, 2014
+
+* 0.4.2 (Nicholas C. Zakas)
+* fixes #651: disable no-catch-shadow rule in node environment (Michael Ficarra)
+* Fixed context.report message parsing (Ian Christian Myers)
+* fixe #648: wrap-iife rule should actually check that IIFEs are wrapped (Michael Ficarra)
+* Added "stroustrup" option for brace-style (Ian Christian Myers)
+* 0.4.1 (Nicholas C. Zakas)
+
+v0.4.1 - February 27, 2014
+
+* 0.4.1 (Nicholas C. Zakas)
+* Created space-in-brackets rule (Ian Christian Myers)
+* Update: Allow valid-jsdoc to specify replacement tags (fixes #637) (Nicholas C. Zakas)
+* Fix: Ensure getJSDocComment() works for all function declarations (fixes #638) (Nicholas C. Zakas)
+* Added broccoli-eslint to integration docs (Christian)
+* fixes #634: getters/setters shouldn't trigger no-dupe-keys (Michael Ficarra)
+* Update: semi to also enforce not using semicolons (fixes #618) (Nicholas C. Zakas)
+* New Rule: no-constant-condition  - removed SwitchStatement discriminant check  - removed AssignmentExpression with right Identifier  - fixed copy paste error  - added DoWhileStatement, ForStatement based on discussion: https://github.com/eslint/eslint/pull/624 (fixes #621) (Christian)
+* New Rule: no-constant-condition (fixes #621) (Christian)
+* Adding mimosa-eslint to Build System list (dbashford)
+* Fix: Make sure semi flags return statements without a semicolon (fixes #616) (Nicholas C. Zakas)
+* Fix: stylish formatter blue text -> white text (fixes #607) (Nicholas C. Zakas)
+* Fix: radix rule should warn (not throw error) when parseInt() is called without arguments (fixes #611) (Nicholas C. Zakas)
+* Update README.md (Dmitry)
+* Adding JSDoc comments for TAP format helper functions (Jonathan Kingston)
+* Updating documentation to include TAP format option (Jonathan Kingston)
+* Fixing validation issues to TAP formatter (Jonathan Kingston)
+* Adding TAP formatter and basic tests (Jonathan Kingston)
+* Docs: Updated integrations page (Nicholas C. Zakas)
+* 0.4.0 (Nicholas C. Zakas)
+
+v0.4.0 - February 12, 2014
+
+* 0.4.0 (Nicholas C. Zakas)
+* Change: Switch :after to :exit (fixes #605) (Nicholas C. Zakas)
+* Fix: Make sure no-unused-vars doesn't get confused by nested functions (fixes #584) (Nicholas C. Zakas)
+* Update: .eslintrc to check more things (Nicholas C. Zakas)
+* Fix: Make sure JSDoc parser accepts JSDoc3-style optional parameters (Nicholas C. Zakas)
+* Docs: Update documentation with linking instructions for ESLintTester (Nicholas C. Zakas)
+* New Rule: valid-jsdoc (fixes #536) (Nicholas C. Zakas)
+* #595 improved func-names documentation (Kyle Nunery)
+* #595 added more func-names tests (Kyle Nunery)
+* #595 fix rule message and add more tests (Kyle Nunery)
+* use optionator for option parsing, not optimist (George Zahariev)
+* Include instructions for working with ESLintTester (Nicholas C. Zakas)
+* #595 remove needless 'function Foo() {}' in tests (Kyle Nunery)
+* #595 fix whitespace (Kyle Nunery)
+* #595 fix markdown for js code blocks (Kyle Nunery)
+* Adding information about Yeomen generator (Ilya Volodin)
+* #595 add docs for rule func-names (Kyle Nunery)
+* #595 add func-names rule (Kyle Nunery)
+* migrate variables array to map (Brandon Mills)
+* Perf: Move try-catch out of verify() function to allow V8 optimization (refs #574) (Nicholas C. Zakas)
+* Docs: Added instructions for running npm run profile (Nicholas C. Zakas)
+* refactor variable name lookup into a separate function (Brandon Mills)
+* optimize findVariable() in no-unused-vars (Brandon Mills)
+* move to tests/bench (Chris Dickinson)
+* add `npm run profile`. (Chris Dickinson)
+* #586 refactor based on https://github.com/eslint/eslint/pull/590#discussion_r9476367 (Christian)
+* #586 added no-unreachable jsdoc, documentation note on hoisting case (Christian)
+* #586 add hoisting check to no-unreachable (Christian)
+* readme: Remove stray asterisk (Timo Tijhof)
+* #580 Remove eslint.getAllComments(), related docs, related tests (Christian)
+* Added test for bug fix #582. Test Passes (Shmueli Englard)
+* Added curly braces to if statment (Shmueli Englard)
+* Added new test for fix to #582 (fixes 582) (Shmueli Englard)
+* Bug #582: Added check if node.value isn't a string just exit (Shmueli Englard)
+* Update Rule: implement curly options for single-statement bodies (fixes #511) (Nicholas C. Zakas)
+* New Rule: no-extra-boolean-cast (fixes #557) (Brandon Mills)
+* New Rule: no-sparse-arrays (fixes #499) (Nicholas C. Zakas)
+* Fix: no-spaced-func is now an error (Nicholas C. Zakas)
+* New Rule: no-process-exit (fixes #568) (Nicholas C. Zakas)
+* New Rule: no-labels (fixes #550) (Nicholas C. Zakas)
+* New Rule: no-lone-blocks (fixes #512) (Brandon Mills)
+* Added Emacs/Flycheck integration (Nikolai Prokoschenko)
+* Build: Add perf test (Nicholas C. Zakas)
+* Fix: no-cond-assign shouldn't throw error when there's a for loop with an empty conditional (fixes #53) (Nicholas C. Zakas)
+* Docs: Add docs for no-regex-spaces and all doc errors now break build (closes #562) (Nicholas C. Zakas)
+* Rename: regex-spaces to no-regex-spaces (Nicholas C. Zakas)
+* Docs: Add docs for no-underscore-dangle (refs #562) (Nicholas C. Zakas)
+* Docs: Add docs for no-undef-init (refs #562) (Nicholas C. Zakas)
+* Docs: Add docs for no-return-assign (refs #562) (Nicholas C. Zakas)
+* Fix: Misspelling in no-return-assign message (Nicholas C. Zakas)
+* Docs: Add docs for no-new-wrappers (refs #562) (Nicholas C. Zakas)
+* Docs: Add docs for no-new-object (refs #562) (Nicholas C. Zakas)
+* Docs: Add docs for no-implied-eval (refs #562) (Nicholas C. Zakas)
+* Docs: Updated documentation for developing rules (Nicholas C. Zakas)
+* Testing: Move ESLintTester to be external dependency (fixes #480) (Nicholas C. Zakas)
+* Docs: Add list of known integrations (Nicholas C. Zakas)
+* Fix #570 (dmp42)
+* document no-array-constructor rule (Michael Ficarra)
+* fixes #500: no-array-constructor should not flag 1-argument construction (Michael Ficarra)
+* fixes #501: no-array-constructor recognises CallExpression form (Michael Ficarra)
+* rename no-new-array rule to no-array-constructor; ref #501 (Michael Ficarra)
+* Fix: Make radix rule warn on invalid second parameter (fixes #563) (Nicholas C. Zakas)
+* Docs: Added no-floating-decimal docs (refs #562) (Nicholas C. Zakas)
+* New Rule: no-path-concat (fixes #540) (Nicholas C. Zakas)
+* Docs: Add some missing rule docs (refs #562) (Nicholas C. Zakas)
+* Fix: CLI should not output anything when there are no warnings (fixes #558) (Nicholas C. Zakas)
+* New Rule: no-yoda (fixes #504) (Nicholas C. Zakas)
+* New Rule: consistent-return (fixes #481) (Nicholas C. Zakas)
+* Rewrite configuration documentation to include information about globals (fixes #555) (Nicholas C. Zakas)
+* Allow YAML configuration files (fixes #491) (Nicholas C. Zakas)
+* 0.3.0 (Nicholas C. Zakas)
+
+v0.3.0 - January 20, 2014
+
+* 0.3.0 (Nicholas C. Zakas)
+* Config: Allow comments in JSON configuration files (fixes #492) (Nicholas C. Zakas)
+* Bug: max-len fix to report correct line number (fixes #552) (Nicholas C. Zakas)
+* Build: Use browserify to create browser-ready ESLint (fixes #119) (Nicholas C. Zakas)
+* Docs: Ensure all rules have entry on top-level rules index page (Nicholas C. Zakas)
+* Docs: Add docs for no-fallthrough rule (Nicholas C. Zakas)
+* Update README.md (Peter deHaan)
+* Update README.md (Peter deHaan)
+* Update package.json (Peter deHaan)
+* Docs: Added documentation for semi rule (Nicholas C. Zakas)
+* Build: Reset branch coverage target (Nicholas C. Zakas)
+* Update build system to generate eslint.org during release (Nicholas C. Zakas)
+* Updated setup doc (Nicholas C. Zakas)
+* Fix #525 & #528 (Mangled Deutz)
+* Improve no-negated-in-lhs description (David Bruant)
+* Fixing typo (David Bruant)
+* Update no-new.md (Tamas Fodor)
+* Update no-extra-semi.md (Tamas Fodor)
+* Fixing broken links in documentation (Ilya Volodin)
+* Update about page (Nicholas C. Zakas)
+* Site generation build step and documentation updates to support it (fixes #478) (Nicholas C. Zakas)
+* Change message for brace-style rule (fixes #490) (Nicholas C. Zakas)
+* Add question about ES6 support to FAQ (fixes #530) (Nicholas C. Zakas)
+* Set unlimited number of listeners for event emitter (fixes #524) (Nicholas C. Zakas)
+* Add support for comment events (fixes #531) Add :after events for comments (Nicholas C. Zakas)
+* Add :after events for comments (Nicholas C. Zakas)
+* Allow config files to have any name (fixes #486). (Aparajita Fishman)
+* List available formatters (fixes #533). (Aparajita Fishman)
+* Add support for comment events (fixes #531) (Nicholas C. Zakas)
+* Add Stylish formatter and make it default. Fixes #517 (Sindre Sorhus)
+* Fix missing code exit (Mangled Deutz)
+* Added unit test for calling Config.getConfig with no arguments. (Aparajita Fishman)
+* Typo (Mangled Deutz)
+* Fixed docs typo (Nicholas C. Zakas)
+* Mark functions as used when any method is called on them (Nicholas C. Zakas)
+* Fixed: Config.getConfig is called either with a file path or with no args (fixes #520) (Aparajita Fishman)
+* Fix minor bug in no-empty rule (Nicholas C. Zakas)
+* add more info for failure messages (Nicholas C. Zakas)
+* Add ruleId to all formatters output (fixes #472) (Nicholas C. Zakas)
+* Remove unused code (Nicholas C. Zakas)
+* Correctly handle case with both finally and catch in no-empty (Nicholas C. Zakas)
+* Update documentation for no-unused-vars (Nicholas C. Zakas)
+* Ensure that bound function expressions are reported as being used (fixes #510) (Nicholas C. Zakas)
+* Allow empty catch/finally blocks (fixes #514) and update documentation (fixes #513) (Nicholas C. Zakas)
+* Updated contribution guidelines (Nicholas C. Zakas)
+* Add default setting for no-cond-assign (Nicholas C. Zakas)
+* Add build step to check rule consistency (Nicholas C. Zakas)
+* update docs: explicit cli args are exempt from eslintignore exclusions (Michael Ficarra)
+* fixes #505: no-cond-assign should ignore doubly parenthesised tests (Michael Ficarra)
+* Renamed unnecessary-strict to no-extra-strict (Nicholas C. Zakas)
+* Fixed missing documentation links (Nicholas C. Zakas)
+* Add build task to check for missing docs and tests for rules (Nicholas C. Zakas)
+* Slight reorganization of rule groups (Nicholas C. Zakas)
+* Added one-var and sorted some rules (Nicholas C. Zakas)
+* Updated Travis badge for new location (Nicholas C. Zakas)
+* fixes #494: allow shebangs in processed JS files (Michael Ficarra)
+* fixes #496: lint ignored files when explicitly specified via the CLI (Michael Ficarra)
+* More tests (Ilya Volodin)
+* Upgrade Istanbul (Ilya Volodin)
+* fixes #495: holey arrays cause no-comma-dangle rule to throw (Michael Ficarra)
+* Documentation and minor changes (Ilya Volodin)
+* Adding missing package registration (Ilya Volodin)
+* Adding support for .eslintignore and .jshintignore (Closes #484) (Ilya Volodin)
+* fixes #482: brace-style bug with multiline conditions (Michael Ficarra)
+* Switching Travis to use ESLint (Closes #462) (Ilya Volodin)
+* 0.2.0 (Nicholas C. Zakas)
+
+v0.2.0 - January 1, 2014
+
+* 0.2.0 (Nicholas C. Zakas)
+* Bump code coverage checks (Nicholas C. Zakas)
+* Take care of unreachable code in case statement (Nicholas C. Zakas)
+* Updated rule messaging and added extra tests (Nicholas C. Zakas)
+* Fixing eslint errors and unittests (Ilya Volodin)
+* Rule: max-nested-callbacks (Ian Christian Myers)
+* Fix fall-through rule with nested switch statements (fixes #430) (Nicholas C. Zakas)
+* Fixed trailing comma (Nicholas C. Zakas)
+* Added more tests for func-style (Nicholas C. Zakas)
+* Fixed documentation for func-style (Nicholas C. Zakas)
+* Fixed linting error (Nicholas C. Zakas)
+* Rule to enforce function style (fixes #460) (Nicholas C. Zakas)
+* Rule is off by default. Updated documentation (Ilya Volodin)
+* Rule: sort variables. Closes #457 (Ilya Volodin)
+* Update architecture.md (Nicholas C. Zakas)
+* Change quotes option to avoid-escapes and update docs (fixes #199) (Brandon Payton)
+* Add allow-avoiding-escaped-quotes option to quotes rule (fixes #199) (Brandon Payton)
+* Update no-empty-class.md (Nicholas C. Zakas)
+* Updated titles on all rule documentation (fixes #348) (Nicholas C. Zakas)
+* Fixing eslint errors in codebase (Ilya Volodin)
+* fixes #464: space-infix-ops checks for VariableDeclarator init spacing (Michael Ficarra)
+* Add options to no-unused-vars. Fixes #367 (Ilya Volodin)
+* rename escape function to xmlEscape in checkstyle formatter (Michael Ficarra)
+* The semi rule now reports correct line number (Ian Christian Myers)
+* context.report now takes optional location (Ian Christian Myers)
+* fixes #454: escape values for XML in checkstyle formatter (Michael Ficarra)
+* Add color to Mocha test reporting (Ian Christian Myers)
+* Rule no-nested-ternary (Ian Christian Myers)
+* Fixing no-unused-var and no-redeclare (Ilya Volodin)
+* fixes #449: no-mixed-requires throws TypeError when grouping is enabled (Michael Ficarra)
+* Fixed reported line number for trailing comma error (Ian Christian Myers)
+* Update doc title for quote (Matthew DuVall)
+* fixes #446: join paths without additional delimiters (Michael Ficarra)
+* docs: add documentation for quotes rule (Matthew DuVall)
+* minor style changes to lib/rules/space-infix-ops.js as requested in #444 (Michael Ficarra)
+* remove "function invalid(){ return D }" from some tests (Michael Ficarra)
+* fixes #429: require spaces around infix operators; enabled by default (Michael Ficarra)
+* simplify fix for #442 (Michael Ficarra)
+* Fix broken test, ensure tests get run before a release is pushed (Nicholas C. Zakas)
+* 0.1.4 (Nicholas C. Zakas)
+
+v0.1.4 - December 5, 2013
+
+* 0.1.4 (Nicholas C. Zakas)
+* Add release scripts to package.json (Nicholas C. Zakas)
+* Fixed release error in Makefile (Nicholas C. Zakas)
+* Fix JSHint warnings (Nicholas C. Zakas)
+* Make sure 'default' isn't flagged by no-space-returns-throw rule (fixes #442) (Nicholas C. Zakas)
+* Fixing documentation (Ilya Volodin)
+* Fixing disabling rules with invalid comments Closes #435 (Ilya Volodin)
+* improve assertion on wrong number of errors (Christoph Neuroth)
+* fixes #431: no-unused-expressions should not flag statement level void (Michael Ficarra)
+* fixes #437: fragile no-extend-native rule (Michael Ficarra)
+* change space-* rule documentation headers to be more descriptive (Michael Ficarra)
+* Moved to tabs, added comments, a few more tests (Jamund Ferguson)
+* split GH-332 rule into space-unary-word-ops and space-return-throw-case (Michael Ficarra)
+* fixes #346: validate strings passed to the RegExp constructor (Michael Ficarra)
+* change some documentation extensions from js to md (Michael Ficarra)
+* fixes #332: unary word operators must be followed by whitespace (Michael Ficarra)
+* Add some docs (Jamund Ferguson)
+* DRYing cli tests and improving code coverage (Ilya Volodin)
+* fixes #371: add no-shadow-restricted-names rule (Michael Ficarra)
+* Added Support for Object.defineProperty() checking (Jamund Ferguson)
+* fixes #333: add rule to disallow gratuitously parenthesised expressions (Michael Ficarra)
+* improve rule test coverage (Michael Ficarra)
+* No Extend Native (Jamund Ferguson)
+* change getTokens 2nd/3rd arguments to count tokens, not characters (Michael Ficarra)
+* fixes #416: no-fallthrough flagging last case + reporting wrong line num (Michael Ficarra)
+* fixes #415: fix unnecessary-strict rule false positives (Michael Ficarra)
+* Add missing dependency (Nicholas C. Zakas)
+* Update docs related to running unit tests (Nicholas C. Zakas)
+* Add JSHint as missing dependency (Nicholas C. Zakas)
+* Switch to using ShellJS makefile (fixes #418) (Nicholas C. Zakas)
+* Updated documentation to reflect test changes (refs #417) (Nicholas C. Zakas)
+* Change to eslintTester.addRuleTest (fixes #417) (Nicholas C. Zakas)
+* Fix false positives for no-script-url (fixes #400) (Nicholas C. Zakas)
+* Fix lint warning (Nicholas C. Zakas)
+* Fixing ESLint warnings, introducing Makefile.js (not yet wired in) (Nicholas C. Zakas)
+* fixes #384: include builtin module list to avoid repl dependency (Michael Ficarra)
+* 0.1.3 (Nicholas C. Zakas)
+
+v0.1.3 - November 25, 2013
+
+* 0.1.3 (Nicholas C. Zakas)
+* Updated changelog (Nicholas C. Zakas)
+* Vows is gone. Mocha is now default (Ilya Volodin)
+* fixes #412: remove last remaining false positives in no-spaced-func (Michael Ficarra)
+* fixes #407: no-spaced-func rule flagging non-argument-list spaced parens (Michael Ficarra)
+* Add no-extra-semi to configuration (fixes #386) (Nicholas C. Zakas)
+* Converting formatter tests and core (Ilya Volodin)
+* Don't output anything when there are no errors in compact formatter (fixes #408) (Nicholas C. Zakas)
+* Removing Node 0.11 test - it fails all the time (Nicholas C. Zakas)
+* Completing conversion of rule's tests to mocha (Ilya Volodin)
+* added mocha conversion tests for strict, quote-props and one-var; enhanced one of the invalid one-var tests that was expecting two messages (Michael Paulukonis)
+
+
+v0.1.2 - November 23, 2013
+
+* 0.1.2 (Nicholas C. Zakas)
+* added mocha tests for radix and quotes; fixed some of the internals on quotes from vows annotations (Michael Paulukonis)
+* added tests for regex-spaces, strict, unnecessary-strict; fixed some types in overview/author notes in other tests. (Michael Paulukonis)
+* Converting unittests to mocha (Ilya Volodin)
+* mocha conversions of tests for 'use-isnan' and 'wrap-iife' (Michael Paulukonis)
+* added mocha tests semi.js and wrap-regex.js (Michael Paulukonis)
+* Converting more tests to mocha (Ilya Volodin)
+* Update CONTRIBUTING.md (Nicholas C. Zakas)
+* Cleaning up eslintTester (Ilya Volodin)
+* DRYing unittests and converting them to mocha (Ilya Volodin)
+* Reformatted Gruntfile (Nicholas C. Zakas)
+* Add tests to config load order: base, env, user. (icebox)
+* Fixing indent in gruntfile (Ilya Volodin)
+* Removing jake, adding Grunt, Travis now runs grunt (Ilya Volodin)
+* Add rules per environments to config. (icebox)
+* Add globals property to the environments. (icebox)
+* Fix error about IIFE if the function is in a new (Marsup)
+* Fix a broken link in the docs (Brian J Brennan)
+* Add test coverage for additional cases, fix open paren at beginning of expr (Matthew DuVall)
+* Fixing no-undef for eval use case (Ilya Volodin)
+* fixes #372: disallow negated left operand in `in` operator (Michael Ficarra)
+* Fixing no-self-compare rule to check for operator (Ilya Volodin)
+* bug: open parens in args causes no-spaced-func to trigger (Matthew DuVall)
+* fixes #369: restrict UnaryExpressions to delete in no-unused-expressions (Michael Ficarra)
+* Make sure delete operator isn't flagged as unused expression (fixes #364) (Nicholas C. Zakas)
+* Don't flag ++ or -- as unused expressions (fixes #366) (Nicholas C. Zakas)
+* Ensure that 'use strict' isn't flagged as an unused expression (fixes #361) (Nicholas C. Zakas)
+* Increase test coverage for strict-related rules (refs #361) (Nicholas C. Zakas)
+* Up code coverage numbers (Nicholas C. Zakas)
+* Fixes error in new-cap rule when 'new' is used without a constructor (fixes #360) (Nicholas C. Zakas)
+* added files array in package json (Christian)
+* removed unused jshint dependency (Christian)
+* Add test coverage for new Foo constructor usage (Matt DuVall)
+* Pull code coverage up by removing unused method (Matt DuVall)
+* recognise CallExpression variant of RegExp ctor in no-control-regex rule (Michael Ficarra)
+* Merge smart-eqeqeq into eqeqeq (Matt DuVall)
+* Catch additional cases for a.b, new F, iife (Matt DuVall)
+* 0.2.0-dev (Nicholas C. Zakas)
+* Version 0.1.0 (Nicholas C. Zakas)
+* rule: no-spaced-func disallow spaces between function identifier and application (Matt DuVall)
+
+v0.1.1 - November 09, 2013
+
+* Ensure mergeConfigs() doesn't thrown an error when keys are missing in base config (fixes #358) (Nicholas C. Zakas)
+
+v0.1.0 - November 03, 2013
+
+* Version 0.1.0 (Nicholas C. Zakas)
+* Updated Readme for v0.1.0 (Nicholas C. Zakas)
+* Bump code coverage verification to 95% across the board (Nicholas C. Zakas)
+* Fixed broken links (Nicholas C. Zakas)
+* Added information about runtime rules (Nicholas C. Zakas)
+* Added documentation about configuration files (Nicholas C. Zakas)
+* Added description of -v option (Nicholas C. Zakas)
+* Updated architecture documentation (Nicholas C. Zakas)
+* Fix bug in no-control-regex (fixes #347) (Nicholas C. Zakas)
+* Fix link to architecture doc in readme (azu)
+* Rule: No control characters in regular expressions (fixes #338) (Nicholas C. Zakas)
+* Add escaping \= test (Matt DuVall)
+* Add docs for rule (Matt DuVall)
+* rule: no-div-regex for catching ambiguous division operators in regexes (Matt DuVall)
+* Change context-var to block-scoped-var (Matt DuVall)
+* Implement config.globals (Oleg Grenrus)
+* Add 'config-declared global' test (Oleg Grenrus)
+* Adding ability to separate rules with comma (Ilya Volodin)
+* Added rule for missing 'use strict' (fixes #321) (Nicholas C. Zakas)
+* Fixing unittests and finishing code (Ilya Volodin)
+* Disabling/enabling rules through comments (Ilya Volodin)
+* Rename rule to context-var and add documentation (Matt DuVall)
+* Added link to no-global-strict doc in readme (Nicholas C. Zakas)
+* Add try-catch scoping with tests (Matt DuVall)
+* Fix linting error (Matt DuVall)
+* Store FunctionDeclarations in scope as they can be used as literals (Matt DuVall)
+* Fix to use getTokens and add test for MemberExpression usage (Matt DuVall)
+* rule: block-scope-var to check for variables declared in block-scope (Matt DuVall)
+* no-unused-expressions rule: add test and doc mention for `a && b()` (Michael Ficarra)
+* rule: wrap-regex for parens around regular expression literals (Matt DuVall)
+* fixes #308: implement no-unused-expressions rule; ref. jshint rule W030 (Michael Ficarra)
+* Updated change log script to filter out merge messages (Nicholas C. Zakas)
+* Updated changelog (Nicholas C. Zakas)
+* 0.1.0-dev (Nicholas C. Zakas)
+
+v0.0.9 - October 5, 2013
+
+* Version 0.0.9 release (Nicholas C. Zakas)
+* Added rule for no global strict mode (fixes #322) (Nicholas C. Zakas)
+* Change default on to be errors instead of warnings (fixes #326) (Nicholas C. Zakas)
+* Fixed bug where JSHint was using the wrong file in lint task (Nicholas C. Zakas)
+* Updated docs for no-unused vars rule. (Andrew de Andrade)
+* Removed console.log in tests. (Andrew de Andrade)
+* Added link to roadmap and JSHint feature parity list. (Andrew de Andrade)
+* Fixed warning when unused var declared as param in FunctionExpression/Declaration can be ignored because later param is used (Andrew de Andrade)
+* Rename test for smartereqeqeq.js to smarter-eqeqeq.js (Andrew de Andrade)
+* Keep test filename inline with rule name (Andrew de Andrade)
+* Added further instructions for multiline test cases. (Andrew de Andrade)
+* Protecting private method (Seth McLaughlin)
+* Updating look up algorithm for local config files (Seth McLaughlin)
+* Fixing ESLint errors (Ilya Volodin)
+* Implemented local default config file (Seth McLaughlin)
+* Upgrading escope version and fixing related bugs (Ilya Volodin)
+* Fixing assignment during initialization issue (Ilya Volodin)
+* add plain-English regexp description to no-empty-class rule (Michael Ficarra)
+* fixes #289: no-empty-class flags regexps with... flags (Michael Ficarra)
+* Rule: no-catch-shadow (Ian Christian Myers)
+* Update no-empty for compatibility with esprima@1.0.4 (fixes #290) (Mark Macdonald)
+* Fixing bug with _ in MemberExpression (Ilya Volodin)
+* Rule: no-func-assign (Ian Christian Myers)
+* Fix false warning from no-undef rule (fixes #283) (Mark Macdonald)
+* Adding eslint to jake (Ilya Volodin)
+* Rule no redeclare (Ilya Volodin)
+* Fixing no use before define issues (Ilya Volodin)
+* Rule: no-octal-escape (Ian Christian Myers)
+* Fix for `no-proto` and `no-iterator` false positive (Ian Christian Myers)
+* Rule: no-iterator (Ian Christian Myers)
+* Fixing type in guard-for-in documentation (Ilya Volodin)
+* Rule No use before define (Ilya Volodin)
+* Added documentation for the `no-new` rule (Ian Christian Myers)
+* Added documentation for the `no-eval` rule (Ian Christian Myers)
+* Added documentation for the `no-caller` rule (Ian Christian Myers)
+* Added documentation for the `no-bitwise` rule (Ian Christian Myers)
+* simplify no-empty-class rule (Michael Ficarra)
+* Fix `no-empty-class` false negatives (Ian Christian Myers)
+* Added documentation for the `no-alert` rule (Ian Christian Myers)
+* Added documentation for the `new-parens` rule (Ian Christian Myers)
+* Added documentation for the `max-params` rule (Ian Christian Myers)
+* Added documentation for `max-len` rule (Ian Christian Myers)
+* Created link from rules README.md to no-plusplus.md documentation (Ian Christian Myers)
+* Added documentation for `guard-for-in` rule (Ian Christian Myers)
+* Added documentation for `dot-notation` rule (Ian Christian Myers)
+* Added documentation for `curly` rule (Ian Christian Myers)
+* Updated `camelcase` rule documentation (Ian Christian Myers)
+* Added documentation for `complexity` rule (Ian Christian Myers)
+* Changed `no-dangle` documentation to `no-comma-dangle` (Ian Christian Myers)
+* Rule: no-empty-class (Ian Christian Myers)
+* Increased test coverage for max-depth (Ian Christian Myers)
+* Increased test coverage for no-shadow (Ian Christian Myers)
+* Increased test coverage on no-mixed-requires (Ian Christian Myers)
+* Added docs for eqeqeq and no-with (fixes #262) (Raphael Pigulla)
+* Create camelcase.md (Micah Eschbacher)
+* Fix issues with function in no-unused-vars (Ilya Volodin)
+* Rule: No shadow (Ilya Volodin)
+* fixes #252: semi rule errors on VariableDeclarations in ForInStatements (Michael Ficarra)
+* rule: max-len to lint maximum length of a line (Matt DuVall)
+* Fixes #249 (Raphael Pigulla)
+* Merge branch 'master' of https://github.com/beardtwizzle/eslint (Jonathan Mahoney)
+* Re-add lines that were accidentally deleted from config (Jonathan Mahoney)
+* Add support for pre-defined environment globals (re: #228) (Jonathan Mahoney)
+* Rule: no-else-return (Ian Christian Myers)
+* Re-add lines that were accidentally deleted from config (Jonathan Mahoney)
+* Add support for pre-defined environment globals (re: #228) (Jonathan Mahoney)
+* Fix no-unused-vars to report correct line numbers (Ilya Volodin)
+* Rule: no proto (Ilya Volodin)
+* Rule: No Script URL (Ilya Volodin)
+* Rule: max-depth (Ian Christian Myers)
+* Fix: Error severity for rules with options. (Ian Christian Myers)
+* Rule: No wrap func (Ilya Volodin)
+* bug: Fixes semi rule for VariableDeclaration in ForStatement (Matt DuVall)
+* Individual perf tests for rules (Ilya Volodin)
+* Fix loading rules from a rules directory (Ian Christian Myers)
+* Rule no-mixed-requires (fixes #221) (Raphael Pigulla)
+* bug: Add ForStatement for no-cond-assign check (Matthew DuVall)
+* JSLint XML formatter now escapes special characters in the evidence and reason attributes. (Ian Christian Myers)
+* Formatter: JSLint XML (Ian Christian Myers)
+* Refactored `max-statements` rule. (Ian Christian Myers)
+* Fix tests broken due to new rule message text (James Allardice)
+* Merge branch 'master' into match-jshint-messages (James Allardice)
+* Refactored `one-var` rule. (Ian Christian Myers)
+* split eslint.define into eslint.defineRule and eslint.defineRules (Michael Ficarra)
+* Removed unnecessary rules.js test. (Ian Christian Myers)
+* Rule: one-var (Ian Christian Myers)
+* Rule: No unused variables (Ilya Volodin)
+* expose interface for defining new rules at runtime without fs access (Michael Ficarra)
+* disallow 00 in no-octal rule (Michael Ficarra)
+* Increased test coverage for `lib/cli.js`. (Ian Christian Myers)
+* Increased test coverage for `lib/rules.js` (Ian Christian Myers)
+* Increased test coverage for jUnit formatter. (Ian Christian Myers)
+* scripts/bundle: output bundle+map to /build directory (Michael Ficarra)
+* add test for 0X... hex literals in no-octal tests (Michael Ficarra)
+* fixes #200: no-octals should not see leading-0 floats as violations (Michael Ficarra)
+* add back tests for loading rules from a directory (Michael Ficarra)
+* add back in ability to load rules from a directory (Michael Ficarra)
+* Increased test coverage for `complexity` rule. (Ian Christian Myers)
+* Increased test coverage for `max-params` rule. (Ian Christian Myers)
+* also output source map when generating bundle (Michael Ficarra)
+* Rule: unnecessary-strict (Ian Christian Myers)
+* Improve performance of getTokens (Ilya Volodin)
+* Performance jake task (Ilya Volodin)
+* don't force explicit listing of rules; generate listing for bundle (Michael Ficarra)
+* Rule: no-dupe-keys (Ian Christian Myers)
+* fixes #145: create a browser bundle (Michael Ficarra)
+* Fixing no-caller bug (Ilya Volodin)
+* Check for use of underscore library as an exception for var declarations (Matthew DuVall)
+* Merge branch 'master' of https://github.com/nzakas/eslint into no-underscore-dangle (Matthew DuVall)
+* Fixing spelling (Ilya Volodin)
+* Rule: no-empty-label (Ilya Volodin)
+* Add builtin globals to the global scope (fixes #185) (Mark Macdonald)
+* Rule: no-loop-func (Ilya Volodin)
+* Merge branch 'master' of https://github.com/nzakas/eslint into no-underscore-dangle (Matt DuVall)
+* Use proper node declarations and __proto__ exception (Matt DuVall)
+* Updating no-undef patch (see pull request #164) - Simplify parseBoolean() - Make knowledge of```/*jshint*/``` and ```/*global */``` internal to eslint object - Put user-declared globals in Program scope (Mark Macdonald)
+* Rule: no-eq-null (Ian Christian Myers)
+* fixed broken merge (Raphael Pigulla)
+* fixes #143 (Raphael Pigulla)
+* added consistent-this rule (Raphael Pigulla)
+* Rule: no-sync to encourage async usage (Matt DuVall)
+* Update eslint.json with no-underscore-dangle rule (Matt DuVall)
+* Rule: no-underscore-dangle for func/var declarations (Matt DuVall)
+* Warn on finding the bitwise NOT operator (James Allardice)
+* Updating no-undef patch (see pull request #164) 3. Move parsing of ```/*global */``` and ```/*jshint */``` to eslint.js (Mark Macdonald)
+* Warn on finding a bitwise shift operator (fixes #170) (James Allardice)
+* Fix broken test (James Allardice)
+* Add support for the do-while statement to the curly rule (closes #167) (James Allardice)
+* Removing nasty leading underscores (Patrick Brosset)
+* Added tests and test cases for a few files (Patrick Brosset)
+* CLI: -f now accepts a file path (Ian Christian Myers)
+* Updating no-undef patch (see pull request #164) 1. Move predefined globals to ```conf/environments.json``` 2. Move mixin() to ```lib/util.js``` (Mark Macdonald)
+* Match messages to JS[LH]int where appropriate, and ensure consistent message formatting (closes #163) (James Allardice)
+* Add support for the do-while statement to the curly rule (closes #167) (James Allardice)
+* Removing nasty leading underscores (Patrick Brosset)
+* Added tests and test cases for a few files (Patrick Brosset)
+* Merge branch 'master' of github.com:nzakas/jscheck (Nicholas C. Zakas)
+* Added acceptance criteria for rules to docs (Nicholas C. Zakas)
+* Add no-undef (fixes #6) (Mark Macdonald)
+* Fixing no-self-compare (Ilya Volodin)
+* Rule: No multiline strings (Ilya Volodin)
+* CLI refactor to remove process.exit(), file not found now a regular error message, updated formatters to handle this case (Nicholas C. Zakas)
+* Rule: no-self-compare (Ilya Volodin)
+* Rule: No unnecessary semicolons (fixes #158) (Nicholas C. Zakas)
+* Fixed error in no-ex-assign when return statement as found in catch clause (Nicholas C. Zakas)
+* Rename no-exc-assign to no-ex-assign and add to config (Nicholas C. Zakas)
+* Renamed count-spaces to regex-spaces (Nicholas C. Zakas)
+* Documentation updates (Nicholas C. Zakas)
+* Put all rules into strict mode and update docs accordingly (Nicholas C. Zakas)
+* Merge branch 'master' of github.com:nzakas/jscheck (Nicholas C. Zakas)
+* Ensure getScope() works properly when called from Program node (fixes #148) (Nicholas C. Zakas)
+* Rule: wrap-iife (Ilya Volodin)
+* add additional test for no-cond-assign rule (Stephen Murray)
+* Merge branch 'master' of github.com:nzakas/jscheck (Nicholas C. Zakas)
+* Experimental support for Jake as a build system (fixes #151) (Nicholas C. Zakas)
+* fixes #152 (Stephen Murray)
+* add docs for no-exc-assign (Stephen Murray)
+* Merge branch 'master' of https://github.com/nzakas/eslint into no-new-object-array-literals (Matt DuVall)
+* Merge branch 'master' of https://github.com/nzakas/eslint into count-spaces (Matt DuVall)
+* Added a test for getting global scope from Program node (refs #148) (Nicholas C. Zakas)
+* Add positive test case for `object.Array` (Matthew DuVall)
+* Only support space characters for repetitions (Matthew DuVall)
+* fix line length per code conventions (Stephen Murray)
+* fix indentation per code conventions (Stephen Murray)
+* fixes #149 (Stephen Murray)
+* Rule: no-ternary (Ian Christian Myers)
+* Check that the return statement has an argument before checking its type (James Allardice)
+* Rule: count-spaces for multiple spaces in regular expressions (Matt DuVall)
+* Update eslint.json configuration file for literal rules (Matt DuVall)
+* Created no-label-var rule. (Ian Christian Myers)
+* Rule: no-new-array and no-new-object (Matt DuVall)
+* Added ability to retrieve scope using escope. (Ian Christian Myers)
+* Corrected unused arguments (Patrick Brosset)
+* Reporting function complexity on function:after and using array push/pop to handle nesting (Patrick Brosset)
+* Fixing style issues discovered while npm testing (Patrick Brosset)
+* First draft proposal for a cyclomatic complexity ESLint rule (Patrick Brosset)
+* Corrected file extension on no-plusplus rule documentation. (Ian Christian Myers)
+* Documentation for no-delete-var rule. Closes #129 (Ilya Volodin)
+* Rule: max-statements (Ian Christian Myers)
+* Better documentation for the `no-plusplus` rule. (Ian Christian Myers)
+* Rule: no-plusplus (Ian Christian Myers)
+* Rule: no assignment in return statement (Ilya Volodin)
+* Updating max-params rule name (Ilya Volodin)
+* Rule: Function has too many parameters (Ilya Volodin)
+* Removing merge originals (Ilya Volodin)
+* Rebasing on master (Ilya Volodin)
+* Rule: Variables should not be deleted (Ilya Volodin)
+* Fixes incorrect reporting of missing semicolon (Ian Christian Myers)
+* Rebase against master branch (Mathias Bynens)
+* Rule to warn on use of Math and JSON as functions (James Allardice)
+* Formatter: Checkstyle (Ian Christian Myers)
+* docs: Clean up structure (Mathias Bynens)
+* Merging no-native-reassign and no-redefine (Ilya Volodin)
+* Rule: no native reassignment (Ilya Volodin)
+* 0.0.8-dev (Nicholas C. Zakas)
+* v0.0.7 released (Nicholas C. Zakas)
+* Updated Tests, etc. (Jamund Ferguson)
+* Added jUnit Support (Fixes #16) (Jamund Ferguson)
+
+v0.0.7 - July 22, 2013
+
+* 0.0.7 (Nicholas C. Zakas)
+* Add code coverage checks to npm test and update rule tests to have better coverage (Nicholas C. Zakas)
+* Fixed CLI output on serial programatic executions (Ian Christian Myers)
+* Removes line length from code style convention docs (Josh Perez)
+* Adds escapeRegExp and fixes documentation (Josh Perez)
+* Add quotes rule and test coverage for configuration options (Matt DuVall)
+* Adds templating for lint messages and refactors rules to use it (Josh Perez)
+* Fixes lint rules for unchecked test file (Josh Perez)
+* Changes dotnotation rule to match JSHint style (Josh Perez)
+* Change configInfo to options and add test coverage (Matt DuVall)
+* Merge branch 'master' of https://github.com/nzakas/eslint into optional-args-for-rule (Matt DuVall)
+* Adds dot notation lint rule (Josh Perez)
+* Strip trailing underscores in camelcase rule - Fixes #94 (Patrick Brosset)
+* add mailing list link (Douglas Campos)
+* Strip leading underscores in camelcase rule - Fixes #94 (Patrick Brosset)
+* Created no-dangle rule. (Ian Christian Myers)
+* Fixed rule name (James Allardice)
+* Make sure the callee type is Identifier (James Allardice)
+* Add rule for implied eval via setTimeout/Interval (James Allardice)
+* Fix rule name in config (James Allardice)
+* Fixes #90 -- updates docstrings (Stephen Murray)
+* Fixes issue with fs.existsSync on NodeJS 0.6 (Ian Christian Myers)
+* Fixing -c config option. (Ian Christian Myers)
+* Allow arrays to be passed as multiple args to rule (Matt DuVall)
+* Test to make sure empty case with one line break is safe (Matt DuVall)
+* Rule: The Function constructor is eval (Ilya Volodin)
+* Enabled require("eslint") and exposed out CLI. (Ian Christian Myers)
+* Adds test and fix for issue #82 (Mark Macdonald)
+* Merge branch 'master' of https://github.com/nzakas/eslint into ok (Yusuke Suzuki)
+* Created brace-style rule. (Ian Christian Myers)
+* Formatters can now process multiple files at once (Jamund Ferguson)
+* Rule: Do not use 'new' for side effects (Ilya Volodin)
+* Adds smarter-eqeqeq rule (Josh Perez)
+* Add EditorConfig file for consistent editor/IDE behavior (Jed Hunsaker)
+* Fix the positive case for no-unreachable where there is no return statement at all, or if the return is at the end. Those cases should not return any errors. The error condition was not be checked before throwing the rule error. (Joel Feenstra)
+* Adds test and fix for no-octal on 0 literal (Mark Macdonald)
+* Don't report no-empty warnings when a parent is FunctionExpression / FunctionDeclaration (Yusuke Suzuki)
+* Add api.getAncestors (Yusuke Suzuki)
+* Ensure estraverse version 1.2.0 or later (Yusuke Suzuki)
+* Fixes no-alert lint rule for non identifier calls (Josh Perez)
+* Fixes exception when init is null (Josh Perez)
+* Fixes no-octal check to only check for numbers (Josh Perez)
+* 0.0.7-dev (Nicholas C. Zakas)
+* 0.0.6 (Nicholas C. Zakas)
+* Follow the rule naming conventions (James Allardice)
+* Add rule for missing radix argument to parseInt (James Allardice)
+* Allow return, falls-through comment, and throw for falls-through (Matt DuVall)
+* Merge branch 'master' of https://github.com/nzakas/eslint into rule-fall-through (Matt DuVall)
+* Globals are not good, declare len (Matt DuVall)
+* Rule to add no-fall-through (Matt DuVall)
+
+v0.0.6 - July 16, 2013
+
+* 0.0.6 (Nicholas C. Zakas)
+* Changed semi rule to use tokens instead of source (Nicholas C. Zakas)
+* Renaming new-parens rule (Ilya Volodin)
+* Renaming no-new-wrappers rule and adding tests (Ilya Volodin)
+* Add license URL (Nick Schonning)
+* Remove unused sinon requires (Nick Schonning)
+* Remove redundant JSHint directives (Nick Schonning)
+* Rule: Do not use constructor for wrapper objects (Ilya Volodin)
+* Test node 0.11 unstable but allow it to fail (Nick Schonning)
+* Rule: Constructor should use parentheses (Ilya Volodin)
+* Fix reference to "CSS Lint" in Contributing documentation (Brian McKenna)
+* Add git attributes file for line endings (Andy Hu)
+* Rename to create an 'index' file in GH web view (Evan Goer)
+* Avoid accidentally creating a markdown link (Evan Goer)
+* Add headings and correct internal links (Evan Goer)
+* Add wiki files to docs directory (Evan Goer)
+* Add rules for leading/trailing decimal points (James Allardice)
+* Add rule to prevent comparisons with value NaN (James Allardice)
+* Fixing jshint error (Ilya Volodin)
+* Rule: no octal literals (Ilya Volodin)
+* Rule: no undefined when initializing variables (Ilya Volodin)
+* Updated CONTRIBUTING.md (Nicholas C. Zakas)
+* Make sure namespaces are honored in new-cap (Nicholas C. Zakas)
+* Make sure no-empty also checks for ';;' (Nicholas C. Zakas)
+* Add CLI option to output version (Nicholas C. Zakas)
+* Updated contribution guidelines (Nicholas C. Zakas)
+* Fixing jshint complaints. (Joel Feenstra)
+* Converting to a switch statement and declaring variables. (Joel Feenstra)
+* Added .jshintrc file (until ESLint can lint itself) and cleaned up JSHint warnings (Nicholas C. Zakas)
+* Merge branch 'master' of github.com:nzakas/jscheck (Nicholas C. Zakas)
+* A bit of cleanup (Nicholas C. Zakas)
+* Add unreachable code detection for switch cases and after continue/break. (Joel Feenstra)
+* Add support for detecting unreachable code after a throw or return statement. (Joel Feenstra)
+* Fix curly brace check when an if statement is the alternate. (Joel Feenstra)
+* Check for empty switch statements with no cases. (Matt DuVall)
+* Added CONTRIBUTING.md (Nicholas C. Zakas)
+* Added rule to check for missing semicolons (fixes #9) (Nicholas C. Zakas)
+* Verify that file paths exist before reading the file (Matt DuVall)
+* Added guard-for-in rule (fixes #1) (Nicholas C. Zakas)
+* Run linting with npm test as well (Nicholas C. Zakas)
+* Removed foo.txt (Nicholas C. Zakas)
+* Updated config file with new no-caller ID (Nicholas C. Zakas)
+* Changed name of no-arg to no-caller (Nicholas C. Zakas)
+* Increased test coverage (Nicholas C. Zakas)
+* Got npm test to work with istanbul, huzzah\! (Nicholas C. Zakas)
+* Moved /config to /conf (Nicholas C. Zakas)
+* Added script to auto-generate changelog (Nicholas C. Zakas)
+* Add `quote-props` rule (Mathias Bynens)
+* Cleaned up relationship between bin/eslint, lib/cli.js, and lib/eslint.js (Nicholas C. Zakas)
+* Add problem count to compact formatter (Nicholas C. Zakas)
+* Fix merge conflict (Nicholas C. Zakas)
+* Change reporters to formatters, add format command line option. Also added tests for compact format. (Nicholas C. Zakas)
+* Change reporters to formatters, add format command line option (Nicholas C. Zakas)
+* Start development of 0.0.6-dev (Nicholas C. Zakas)
diff --git a/node_modules/eslint/LICENSE b/node_modules/eslint/LICENSE
new file mode 100644
index 0000000..7fe552a
--- /dev/null
+++ b/node_modules/eslint/LICENSE
@@ -0,0 +1,19 @@
+Copyright JS Foundation and other contributors, https://js.foundation
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/eslint/README.md b/node_modules/eslint/README.md
new file mode 100644
index 0000000..c333edd
--- /dev/null
+++ b/node_modules/eslint/README.md
@@ -0,0 +1,254 @@
+[![NPM version][npm-image]][npm-url]
+[![build status][travis-image]][travis-url]
+[![Build status][appveyor-image]][appveyor-url]
+[![Test coverage][coveralls-image]][coveralls-url]
+[![Downloads][downloads-image]][downloads-url]
+[![Bountysource](https://www.bountysource.com/badge/tracker?tracker_id=282608)](https://www.bountysource.com/trackers/282608-eslint?utm_source=282608&utm_medium=shield&utm_campaign=TRACKER_BADGE)
+[![Join the chat at https://gitter.im/eslint/eslint](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/eslint/eslint?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Feslint%2Feslint.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Feslint%2Feslint?ref=badge_shield)
+
+# ESLint
+
+[Website](https://eslint.org) |
+[Configuring](https://eslint.org/docs/user-guide/configuring) |
+[Rules](https://eslint.org/docs/rules/) |
+[Contributing](https://eslint.org/docs/developer-guide/contributing) |
+[Reporting Bugs](https://eslint.org/docs/developer-guide/contributing/reporting-bugs) |
+[Code of Conduct](https://js.foundation/community/code-of-conduct) |
+[Twitter](https://twitter.com/geteslint) |
+[Mailing List](https://groups.google.com/group/eslint) |
+[Chat Room](https://gitter.im/eslint/eslint)
+
+ESLint is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code. In many ways, it is similar to JSLint and JSHint with a few exceptions:
+
+* ESLint uses [Espree](https://github.com/eslint/espree) for JavaScript parsing.
+* ESLint uses an AST to evaluate patterns in code.
+* ESLint is completely pluggable, every single rule is a plugin and you can add more at runtime.
+
+## Installation and Usage
+
+Prerequisites: [Node.js](https://nodejs.org/en/) (>=4.x), npm version 2+.
+
+There are two ways to install ESLint: globally and locally.
+
+### Local Installation and Usage
+
+If you want to include ESLint as part of your project's build system, we recommend installing it locally. You can do so using npm:
+
+```
+$ npm install eslint --save-dev
+```
+
+You should then setup a configuration file:
+
+```
+$ ./node_modules/.bin/eslint --init
+```
+
+After that, you can run ESLint on any file or directory like this:
+
+```
+$ ./node_modules/.bin/eslint yourfile.js
+```
+
+Any plugins or shareable configs that you use must also be installed locally to work with a locally-installed ESLint.
+
+### Global Installation and Usage
+
+If you want to make ESLint available to tools that run across all of your projects, we recommend installing ESLint globally. You can do so using npm:
+
+```
+$ npm install -g eslint
+```
+
+You should then setup a configuration file:
+
+```
+$ eslint --init
+```
+
+After that, you can run ESLint on any file or directory like this:
+
+```
+$ eslint yourfile.js
+```
+
+Any plugins or shareable configs that you use must also be installed globally to work with a globally-installed ESLint.
+
+**Note:** `eslint --init` is intended for setting up and configuring ESLint on a per-project basis and will perform a local installation of ESLint and its plugins in the directory in which it is run. If you prefer using a global installation of ESLint, any plugins used in your configuration must also be installed globally.
+
+## Configuration
+
+After running `eslint --init`, you'll have a `.eslintrc` file in your directory. In it, you'll see some rules configured like this:
+
+```json
+{
+    "rules": {
+        "semi": ["error", "always"],
+        "quotes": ["error", "double"]
+    }
+}
+```
+
+The names `"semi"` and `"quotes"` are the names of [rules](https://eslint.org/docs/rules) in ESLint. The first value is the error level of the rule and can be one of these values:
+
+* `"off"` or `0` - turn the rule off
+* `"warn"` or `1` - turn the rule on as a warning (doesn't affect exit code)
+* `"error"` or `2` - turn the rule on as an error (exit code will be 1)
+
+The three error levels allow you fine-grained control over how ESLint applies rules (for more configuration options and details, see the [configuration docs](https://eslint.org/docs/user-guide/configuring)).
+
+## Sponsors
+
+* Site search ([eslint.org](https://eslint.org)) is sponsored by [Algolia](https://www.algolia.com)
+
+## Team
+
+These folks keep the project moving and are resources for help.
+
+### Technical Steering Committee (TSC)
+
+* Nicholas C. Zakas ([@nzakas](https://github.com/nzakas))
+* Ilya Volodin ([@ilyavolodin](https://github.com/ilyavolodin))
+* Brandon Mills ([@btmills](https://github.com/btmills))
+* Gyandeep Singh ([@gyandeeps](https://github.com/gyandeeps))
+* Toru Nagashima ([@mysticatea](https://github.com/mysticatea))
+* Alberto Rodríguez ([@alberto](https://github.com/alberto))
+* Kai Cataldo ([@kaicataldo](https://github.com/kaicataldo))
+* Teddy Katz ([@not-an-aardvark](https://github.com/not-an-aardvark))
+* Kevin Partington ([@platinumazure](https://github.com/platinumazure))
+
+### Development Team
+
+* Mathias Schreck ([@lo1tuma](https://github.com/lo1tuma))
+* Jamund Ferguson ([@xjamundx](https://github.com/xjamundx))
+* Ian VanSchooten ([@ianvs](https://github.com/ianvs))
+* Burak YiÄŸit Kaya ([@byk](https://github.com/byk))
+* Michael Ficarra ([@michaelficarra](https://github.com/michaelficarra))
+* Mark Pedrotti ([@pedrottimark](https://github.com/pedrottimark))
+* Oleg Gaidarenko ([@markelog](https://github.com/markelog))
+* Mike Sherov ([@mikesherov](https://github.com/mikesherov))
+* Henry Zhu ([@hzoo](https://github.com/hzoo))
+* Marat Dulin ([@mdevils](https://github.com/mdevils))
+* Alexej Yaroshevich ([@zxqfox](https://github.com/zxqfox))
+* Vitor Balocco ([@vitorbal](https://github.com/vitorbal))
+* James Henry ([@JamesHenry](https://github.com/JamesHenry))
+* Reyad Attiyat ([@soda0289](https://github.com/soda0289))
+* 薛定谔的猫 ([@Aladdin-ADD](https://github.com/Aladdin-ADD))
+* Victor Hom ([@VictorHom](https://github.com/VictorHom))
+
+## Releases
+
+We have scheduled releases every two weeks on Friday or Saturday.
+
+## Code of Conduct
+
+ESLint adheres to the [JS Foundation Code of Conduct](https://js.foundation/community/code-of-conduct).
+
+## Filing Issues
+
+Before filing an issue, please be sure to read the guidelines for what you're reporting:
+
+* [Bug Report](https://eslint.org/docs/developer-guide/contributing/reporting-bugs)
+* [Propose a New Rule](https://eslint.org/docs/developer-guide/contributing/new-rules)
+* [Proposing a Rule Change](https://eslint.org/docs/developer-guide/contributing/rule-changes)
+* [Request a Change](https://eslint.org/docs/developer-guide/contributing/changes)
+
+## Semantic Versioning Policy
+
+ESLint follows [semantic versioning](https://semver.org). However, due to the nature of ESLint as a code quality tool, it's not always clear when a minor or major version bump occurs. To help clarify this for everyone, we've defined the following semantic versioning policy for ESLint:
+
+* Patch release (intended to not break your lint build)
+    * A bug fix in a rule that results in ESLint reporting fewer errors.
+    * A bug fix to the CLI or core (including formatters).
+    * Improvements to documentation.
+    * Non-user-facing changes such as refactoring code, adding, deleting, or modifying tests, and increasing test coverage.
+    * Re-releasing after a failed release (i.e., publishing a release that doesn't work for anyone).
+* Minor release (might break your lint build)
+    * A bug fix in a rule that results in ESLint reporting more errors.
+    * A new rule is created.
+    * A new option to an existing rule that does not result in ESLint reporting more errors by default.
+    * An existing rule is deprecated.
+    * A new CLI capability is created.
+    * New capabilities to the public API are added (new classes, new methods, new arguments to existing methods, etc.).
+    * A new formatter is created.
+* Major release (likely to break your lint build)
+    * `eslint:recommended` is updated.
+    * A new option to an existing rule that results in ESLint reporting more errors by default.
+    * An existing formatter is removed.
+    * Part of the public API is removed or changed in an incompatible way.
+
+According to our policy, any minor update may report more errors than the previous release (ex: from a bug fix). As such, we recommend using the tilde (`~`) in `package.json` e.g. `"eslint": "~3.1.0"` to guarantee the results of your builds.
+
+## License
+
+[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Feslint%2Feslint.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Feslint%2Feslint?ref=badge_large)
+
+## Frequently Asked Questions
+
+### How is ESLint different from JSHint?
+
+The most significant difference is that ESLint has pluggable linting rules. That means you can use the rules it comes with, or you can extend it with rules created by others or by yourself!
+
+### How does ESLint performance compare to JSHint?
+
+ESLint is slower than JSHint, usually 2-3x slower on a single file. This is because ESLint uses Espree to construct an AST before it can evaluate your code whereas JSHint evaluates your code as it's being parsed. The speed is also based on the number of rules you enable; the more rules you enable, the slower the process.
+
+Despite being slower, we believe that ESLint is fast enough to replace JSHint without causing significant pain.
+
+### I heard ESLint is going to replace JSCS?
+
+Yes. Since we are solving the same problems, ESLint and JSCS teams have decided to join forces and work together in the development of ESLint instead of competing with each other. You can read more about this in both [ESLint](https://eslint.org/blog/2016/04/welcoming-jscs-to-eslint) and [JSCS](https://medium.com/@markelog/jscs-end-of-the-line-bc9bf0b3fdb2#.u76sx334n) announcements.
+
+### So, should I stop using JSCS and start using ESLint?
+
+Maybe, depending on how much you need it. [JSCS has reached end of life](https://eslint.org/blog/2016/07/jscs-end-of-life), but if it is working for you then there is no reason to move yet. We are still working to smooth the transition. You can see our progress [here](https://github.com/eslint/eslint/milestones/JSCS%20Compatibility). We’ll announce when all of the changes necessary to support JSCS users in ESLint are complete and will start encouraging JSCS users to switch to ESLint at that time.
+
+If you are having issues with JSCS, you can try to move to ESLint. We are focusing our time and energy on JSCS compatibility issues.
+
+### Is ESLint just linting or does it also check style?
+
+ESLint does both traditional linting (looking for problematic patterns) and style checking (enforcement of conventions). You can use it for both.
+
+### Why can't ESLint find my plugins?
+
+ESLint can be [globally or locally installed](#installation-and-usage). If you install ESLint globally, your plugins must also be installed globally; if you install ESLint locally, your plugins must also be installed locally.
+
+If you are trying to run globally, make sure your plugins are installed globally (use `npm ls -g`).
+
+If you are trying to run locally:
+
+* Make sure your plugins (and ESLint) are both in your project's `package.json` as devDependencies (or dependencies, if your project uses ESLint at runtime).
+* Make sure you have run `npm install` and all your dependencies are installed.
+
+In all cases, make sure your plugins' peerDependencies have been installed as well. You can use `npm view eslint-plugin-myplugin peerDepencies` to see what peer dependencies `eslint-plugin-myplugin` has.
+
+### Does ESLint support JSX?
+
+Yes, ESLint natively supports parsing JSX syntax (this must be enabled in [configuration](https://eslint.org/docs/user-guide/configuring)). Please note that supporting JSX syntax *is not* the same as supporting React. React applies specific semantics to JSX syntax that ESLint doesn't recognize. We recommend using [eslint-plugin-react](https://www.npmjs.com/package/eslint-plugin-react) if you are using React and want React semantics.
+
+### What about ECMAScript 6 support?
+
+ESLint has full support for ECMAScript 6. By default, this support is off. You can enable ECMAScript 6 syntax and global variables through [configuration](https://eslint.org/docs/user-guide/configuring).
+
+### What about experimental features?
+
+ESLint doesn't natively support experimental ECMAScript language features. You can use [babel-eslint](https://github.com/babel/babel-eslint) to use any option available in Babel.
+
+Once a language feature has been adopted into the ECMAScript standard (stage 4 according to the [TC39 process](https://tc39.github.io/process-document/)), we will accept issues and pull requests related to the new feature, subject to our [contributing guidelines](https://eslint.org/docs/developer-guide/contributing). Until then, please use the appropriate parser and plugin(s) for your experimental feature.
+
+### Where to ask for help?
+
+Join our [Mailing List](https://groups.google.com/group/eslint) or [Chatroom](https://gitter.im/eslint/eslint).
+
+
+[npm-image]: https://img.shields.io/npm/v/eslint.svg?style=flat-square
+[npm-url]: https://www.npmjs.com/package/eslint
+[travis-image]: https://img.shields.io/travis/eslint/eslint/master.svg?style=flat-square
+[travis-url]: https://travis-ci.org/eslint/eslint
+[appveyor-image]: https://ci.appveyor.com/api/projects/status/iwxmiobcvbw3b0av/branch/master?svg=true
+[appveyor-url]: https://ci.appveyor.com/project/nzakas/eslint/branch/master
+[coveralls-image]: https://img.shields.io/coveralls/eslint/eslint/master.svg?style=flat-square
+[coveralls-url]: https://coveralls.io/r/eslint/eslint?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/eslint.svg?style=flat-square
+[downloads-url]: https://www.npmjs.com/package/eslint
diff --git a/node_modules/eslint/bin/eslint.js b/node_modules/eslint/bin/eslint.js
new file mode 100644
index 0000000..1a29804
--- /dev/null
+++ b/node_modules/eslint/bin/eslint.js
@@ -0,0 +1,75 @@
+#!/usr/bin/env node
+
+/**
+ * @fileoverview Main CLI that is run via the eslint command.
+ * @author Nicholas C. Zakas
+ */
+
+/* eslint no-console:off */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const useStdIn = (process.argv.indexOf("--stdin") > -1),
+    init = (process.argv.indexOf("--init") > -1),
+    debug = (process.argv.indexOf("--debug") > -1);
+
+// must do this initialization *before* other requires in order to work
+if (debug) {
+    require("debug").enable("eslint:*,-eslint:code-path");
+}
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+// now we can safely include the other modules that use debug
+const concat = require("concat-stream"),
+    cli = require("../lib/cli"),
+    path = require("path"),
+    fs = require("fs");
+
+//------------------------------------------------------------------------------
+// Execution
+//------------------------------------------------------------------------------
+
+process.once("uncaughtException", err => {
+
+    // lazy load
+    const lodash = require("lodash");
+
+    if (typeof err.messageTemplate === "string" && err.messageTemplate.length > 0) {
+        const template = lodash.template(fs.readFileSync(path.resolve(__dirname, `../messages/${err.messageTemplate}.txt`), "utf-8"));
+        const pkg = require("../package.json");
+
+        console.error("\nOops! Something went wrong! :(");
+        console.error(`\nESLint: ${pkg.version}.\n${template(err.messageData || {})}`);
+    } else {
+
+        console.error(err.message);
+        console.error(err.stack);
+    }
+
+    process.exitCode = 1;
+});
+
+if (useStdIn) {
+    process.stdin.pipe(concat({ encoding: "string" }, text => {
+        process.exitCode = cli.execute(process.argv, text);
+    }));
+} else if (init) {
+    const configInit = require("../lib/config/config-initializer");
+
+    configInit.initializeConfig().then(() => {
+        process.exitCode = 0;
+    }).catch(err => {
+        process.exitCode = 1;
+        console.error(err.message);
+        console.error(err.stack);
+    });
+} else {
+    process.exitCode = cli.execute(process.argv);
+}
diff --git a/node_modules/eslint/conf/blank-script.json b/node_modules/eslint/conf/blank-script.json
new file mode 100644
index 0000000..d7d7d37
--- /dev/null
+++ b/node_modules/eslint/conf/blank-script.json
@@ -0,0 +1,21 @@
+{
+  "type": "Program",
+  "body": [],
+  "sourceType": "script",
+  "range": [
+    0,
+    0
+  ],
+  "loc": {
+    "start": {
+      "line": 0,
+      "column": 0
+    },
+    "end": {
+      "line": 0,
+      "column": 0
+    }
+  },
+  "comments": [],
+  "tokens": []
+}
diff --git a/node_modules/eslint/conf/category-list.json b/node_modules/eslint/conf/category-list.json
new file mode 100644
index 0000000..5427667
--- /dev/null
+++ b/node_modules/eslint/conf/category-list.json
@@ -0,0 +1,40 @@
+{
+    "categories": [
+        { "name": "Possible Errors", "description": "These rules relate to possible syntax or logic errors in JavaScript code:" },
+        { "name": "Best Practices", "description": "These rules relate to better ways of doing things to help you avoid problems:" },
+        { "name": "Strict Mode", "description": "These rules relate to strict mode directives:" },
+        { "name": "Variables", "description": "These rules relate to variable declarations:" },
+        { "name": "Node.js and CommonJS", "description": "These rules relate to code running in Node.js, or in browsers with CommonJS:" },
+        { "name": "Stylistic Issues", "description": "These rules relate to style guidelines, and are therefore quite subjective:" },
+        { "name": "ECMAScript 6", "description": "These rules relate to ES6, also known as ES2015:" }
+    ],
+    "deprecated": {
+        "name": "Deprecated",
+        "description": "These rules have been deprecated in accordance with the [deprecation policy](/docs/user-guide/rule-deprecation), and replaced by newer rules:",
+        "rules": []
+    },
+    "removed": {
+        "name": "Removed",
+        "description": "These rules from older versions of ESLint (before the [deprecation policy](/docs/user-guide/rule-deprecation) existed) have been replaced by newer rules:",
+        "rules": [
+            { "removed": "generator-star", "replacedBy": ["generator-star-spacing"] },
+            { "removed": "global-strict", "replacedBy": ["strict"] },
+            { "removed": "no-arrow-condition", "replacedBy": ["no-confusing-arrow", "no-constant-condition"] },
+            { "removed": "no-comma-dangle", "replacedBy": ["comma-dangle"] },
+            { "removed": "no-empty-class", "replacedBy": ["no-empty-character-class"] },
+            { "removed": "no-empty-label", "replacedBy": ["no-labels"] },
+            { "removed": "no-extra-strict", "replacedBy": ["strict"] },
+            { "removed": "no-reserved-keys", "replacedBy": ["quote-props"] },
+            { "removed": "no-space-before-semi", "replacedBy": ["semi-spacing"] },
+            { "removed": "no-wrap-func", "replacedBy": ["no-extra-parens"] },
+            { "removed": "space-after-function-name", "replacedBy": ["space-before-function-paren"] },
+            { "removed": "space-after-keywords", "replacedBy": ["keyword-spacing"] },
+            { "removed": "space-before-function-parentheses", "replacedBy": ["space-before-function-paren"] },
+            { "removed": "space-before-keywords", "replacedBy": ["keyword-spacing"] },
+            { "removed": "space-in-brackets", "replacedBy": ["object-curly-spacing", "array-bracket-spacing"] },
+            { "removed": "space-return-throw-case", "replacedBy": ["keyword-spacing"] },
+            { "removed": "space-unary-word-ops", "replacedBy": ["space-unary-ops"] },
+            { "removed": "spaced-line-comment", "replacedBy": ["spaced-comment"] }
+        ]
+    }
+}
diff --git a/node_modules/eslint/conf/config-schema.js b/node_modules/eslint/conf/config-schema.js
new file mode 100644
index 0000000..626e1d5
--- /dev/null
+++ b/node_modules/eslint/conf/config-schema.js
@@ -0,0 +1,70 @@
+/**
+ * @fileoverview Defines a schema for configs.
+ * @author Sylvan Mably
+ */
+
+"use strict";
+
+const baseConfigProperties = {
+    env: { type: "object" },
+    globals: { type: "object" },
+    parser: { type: ["string", "null"] },
+    parserOptions: { type: "object" },
+    plugins: { type: "array" },
+    rules: { type: "object" },
+    settings: { type: "object" },
+
+    ecmaFeatures: { type: "object" } // deprecated; logs a warning when used
+};
+
+const overrideProperties = Object.assign(
+    {},
+    baseConfigProperties,
+    {
+        files: {
+            oneOf: [
+                { type: "string" },
+                {
+                    type: "array",
+                    items: { type: "string" },
+                    minItems: 1
+                }
+            ]
+        },
+        excludedFiles: {
+            oneOf: [
+                { type: "string" },
+                {
+                    type: "array",
+                    items: { type: "string" }
+                }
+            ]
+        }
+    }
+);
+
+const topLevelConfigProperties = Object.assign(
+    {},
+    baseConfigProperties,
+    {
+        extends: { type: ["string", "array"] },
+        root: { type: "boolean" },
+        overrides: {
+            type: "array",
+            items: {
+                type: "object",
+                properties: overrideProperties,
+                required: ["files"],
+                additionalProperties: false
+            }
+        }
+    }
+);
+
+const configSchema = {
+    type: "object",
+    properties: topLevelConfigProperties,
+    additionalProperties: false
+};
+
+module.exports = configSchema;
diff --git a/node_modules/eslint/conf/default-cli-options.js b/node_modules/eslint/conf/default-cli-options.js
new file mode 100644
index 0000000..7d46d46
--- /dev/null
+++ b/node_modules/eslint/conf/default-cli-options.js
@@ -0,0 +1,30 @@
+/**
+ * @fileoverview Default CLIEngineOptions.
+ * @author Ian VanSchooten
+ */
+
+"use strict";
+
+module.exports = {
+    configFile: null,
+    baseConfig: false,
+    rulePaths: [],
+    useEslintrc: true,
+    envs: [],
+    globals: [],
+    extensions: [".js"],
+    ignore: true,
+    ignorePath: null,
+    cache: false,
+
+    /*
+     * in order to honor the cacheFile option if specified
+     * this option should not have a default value otherwise
+     * it will always be used
+     */
+    cacheLocation: "",
+    cacheFile: ".eslintcache",
+    fix: false,
+    allowInlineConfig: true,
+    reportUnusedDisableDirectives: false
+};
diff --git a/node_modules/eslint/conf/default-config-options.js b/node_modules/eslint/conf/default-config-options.js
new file mode 100644
index 0000000..96fe25c
--- /dev/null
+++ b/node_modules/eslint/conf/default-config-options.js
@@ -0,0 +1,29 @@
+/**
+ * @fileoverview Default config options
+ * @author Teddy Katz
+ */
+
+"use strict";
+
+/**
+ * Freezes an object and all its nested properties
+ * @param {Object} obj The object to deeply freeze
+ * @returns {Object} `obj` after freezing it
+ */
+function deepFreeze(obj) {
+    if (obj === null || typeof obj !== "object") {
+        return obj;
+    }
+
+    Object.keys(obj).map(key => obj[key]).forEach(deepFreeze);
+    return Object.freeze(obj);
+}
+
+module.exports = deepFreeze({
+    env: {},
+    globals: {},
+    rules: {},
+    settings: {},
+    parser: "espree",
+    parserOptions: {}
+});
diff --git a/node_modules/eslint/conf/environments.js b/node_modules/eslint/conf/environments.js
new file mode 100644
index 0000000..44f2e0d
--- /dev/null
+++ b/node_modules/eslint/conf/environments.js
@@ -0,0 +1,231 @@
+/**
+ * @fileoverview Defines environment settings and globals.
+ * @author Elan Shanker
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const globals = require("globals");
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = {
+    builtin: globals.es5,
+    browser: {
+
+        /*
+         * For backward compatibility.
+         * Remove those on the next major release.
+         */
+        globals: Object.assign(
+            {
+                AutocompleteErrorEvent: false,
+                CDATASection: false,
+                ClientRect: false,
+                ClientRectList: false,
+                CSSAnimation: false,
+                CSSTransition: false,
+                CSSUnknownRule: false,
+                CSSViewportRule: false,
+                Debug: false,
+                DocumentTimeline: false,
+                DOMSettableTokenList: false,
+                ElementTimeControl: false,
+                FederatedCredential: false,
+                FileError: false,
+                HTMLAppletElement: false,
+                HTMLBlockquoteElement: false,
+                HTMLIsIndexElement: false,
+                HTMLKeygenElement: false,
+                HTMLLayerElement: false,
+                IDBEnvironment: false,
+                InputMethodContext: false,
+                MediaKeyError: false,
+                MediaKeyEvent: false,
+                MediaKeys: false,
+                opera: false,
+                PasswordCredential: false,
+                ReadableByteStream: false,
+                SharedKeyframeList: false,
+                showModalDialog: false,
+                SiteBoundCredential: false,
+                SVGAltGlyphDefElement: false,
+                SVGAltGlyphElement: false,
+                SVGAltGlyphItemElement: false,
+                SVGAnimateColorElement: false,
+                SVGAnimatedPathData: false,
+                SVGAnimatedPoints: false,
+                SVGColor: false,
+                SVGColorProfileElement: false,
+                SVGColorProfileRule: false,
+                SVGCSSRule: false,
+                SVGCursorElement: false,
+                SVGDocument: false,
+                SVGElementInstance: false,
+                SVGElementInstanceList: false,
+                SVGEvent: false,
+                SVGExternalResourcesRequired: false,
+                SVGFilterPrimitiveStandardAttributes: false,
+                SVGFitToViewBox: false,
+                SVGFontElement: false,
+                SVGFontFaceElement: false,
+                SVGFontFaceFormatElement: false,
+                SVGFontFaceNameElement: false,
+                SVGFontFaceSrcElement: false,
+                SVGFontFaceUriElement: false,
+                SVGGlyphElement: false,
+                SVGGlyphRefElement: false,
+                SVGHKernElement: false,
+                SVGICCColor: false,
+                SVGLangSpace: false,
+                SVGLocatable: false,
+                SVGMissingGlyphElement: false,
+                SVGPaint: false,
+                SVGPathSeg: false,
+                SVGPathSegArcAbs: false,
+                SVGPathSegArcRel: false,
+                SVGPathSegClosePath: false,
+                SVGPathSegCurvetoCubicAbs: false,
+                SVGPathSegCurvetoCubicRel: false,
+                SVGPathSegCurvetoCubicSmoothAbs: false,
+                SVGPathSegCurvetoCubicSmoothRel: false,
+                SVGPathSegCurvetoQuadraticAbs: false,
+                SVGPathSegCurvetoQuadraticRel: false,
+                SVGPathSegCurvetoQuadraticSmoothAbs: false,
+                SVGPathSegCurvetoQuadraticSmoothRel: false,
+                SVGPathSegLinetoAbs: false,
+                SVGPathSegLinetoHorizontalAbs: false,
+                SVGPathSegLinetoHorizontalRel: false,
+                SVGPathSegLinetoRel: false,
+                SVGPathSegLinetoVerticalAbs: false,
+                SVGPathSegLinetoVerticalRel: false,
+                SVGPathSegList: false,
+                SVGPathSegMovetoAbs: false,
+                SVGPathSegMovetoRel: false,
+                SVGRenderingIntent: false,
+                SVGStylable: false,
+                SVGTests: false,
+                SVGTransformable: false,
+                SVGTRefElement: false,
+                SVGURIReference: false,
+                SVGViewSpec: false,
+                SVGVKernElement: false,
+                SVGZoomAndPan: false,
+                SVGZoomEvent: false,
+                TimeEvent: false,
+                XDomainRequest: false,
+                XMLHttpRequestProgressEvent: false,
+                XPathException: false,
+                XPathNamespace: false,
+                XPathNSResolver: false
+            },
+            globals.browser
+        )
+    },
+    node: {
+
+        /*
+         * For backward compatibility.
+         * Remove those on the next major release.
+         */
+        globals: Object.assign(
+            { arguments: false, GLOBAL: false, root: false },
+            globals.node
+        ),
+        parserOptions: {
+            ecmaFeatures: {
+                globalReturn: true
+            }
+        }
+    },
+    commonjs: {
+        globals: globals.commonjs,
+        parserOptions: {
+            ecmaFeatures: {
+                globalReturn: true
+            }
+        }
+    },
+    "shared-node-browser": {
+        globals: globals["shared-node-browser"]
+    },
+    worker: {
+        globals: globals.worker
+    },
+    amd: {
+        globals: globals.amd
+    },
+    mocha: {
+        globals: globals.mocha
+    },
+    jasmine: {
+        globals: globals.jasmine
+    },
+    jest: {
+
+        /*
+         * For backward compatibility.
+         * Remove those on the next major release.
+         */
+        globals: Object.assign(
+            { check: false, gen: false },
+            globals.jest
+        )
+    },
+    phantomjs: {
+        globals: globals.phantomjs
+    },
+    jquery: {
+        globals: globals.jquery
+    },
+    qunit: {
+        globals: globals.qunit
+    },
+    prototypejs: {
+        globals: globals.prototypejs
+    },
+    shelljs: {
+        globals: globals.shelljs
+    },
+    meteor: {
+        globals: globals.meteor
+    },
+    mongo: {
+        globals: globals.mongo
+    },
+    protractor: {
+        globals: globals.protractor
+    },
+    applescript: {
+        globals: globals.applescript
+    },
+    nashorn: {
+        globals: globals.nashorn
+    },
+    serviceworker: {
+        globals: globals.serviceworker
+    },
+    atomtest: {
+        globals: globals.atomtest
+    },
+    embertest: {
+        globals: globals.embertest
+    },
+    webextensions: {
+        globals: globals.webextensions
+    },
+    es6: {
+        globals: globals.es2015,
+        parserOptions: {
+            ecmaVersion: 6
+        }
+    },
+    greasemonkey: {
+        globals: globals.greasemonkey
+    }
+};
diff --git a/node_modules/eslint/conf/eslint-all.js b/node_modules/eslint/conf/eslint-all.js
new file mode 100644
index 0000000..43db54f
--- /dev/null
+++ b/node_modules/eslint/conf/eslint-all.js
@@ -0,0 +1,31 @@
+/**
+ * @fileoverview Config to enable all rules.
+ * @author Robert Fletcher
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const load = require("../lib/load-rules"),
+    Rules = require("../lib/rules");
+const rules = new Rules();
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const enabledRules = Object.keys(load()).reduce((result, ruleId) => {
+    if (!rules.get(ruleId).meta.deprecated) {
+        result[ruleId] = "error";
+    }
+    return result;
+}, {});
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = { rules: enabledRules };
diff --git a/node_modules/eslint/conf/eslint-recommended.js b/node_modules/eslint/conf/eslint-recommended.js
new file mode 100644
index 0000000..0acee23
--- /dev/null
+++ b/node_modules/eslint/conf/eslint-recommended.js
@@ -0,0 +1,271 @@
+/**
+ * @fileoverview Configuration applied when a user configuration extends from
+ * eslint:recommended.
+ * @author Nicholas C. Zakas
+ */
+
+"use strict";
+
+/* eslint sort-keys: ["error", "asc"] */
+
+module.exports = {
+    rules: {
+        "accessor-pairs": "off",
+        "array-bracket-newline": "off",
+        "array-bracket-spacing": "off",
+        "array-callback-return": "off",
+        "array-element-newline": "off",
+        "arrow-body-style": "off",
+        "arrow-parens": "off",
+        "arrow-spacing": "off",
+        "block-scoped-var": "off",
+        "block-spacing": "off",
+        "brace-style": "off",
+        "callback-return": "off",
+        camelcase: "off",
+        "capitalized-comments": "off",
+        "class-methods-use-this": "off",
+        "comma-dangle": "off",
+        "comma-spacing": "off",
+        "comma-style": "off",
+        complexity: "off",
+        "computed-property-spacing": "off",
+        "consistent-return": "off",
+        "consistent-this": "off",
+        "constructor-super": "error",
+        curly: "off",
+        "default-case": "off",
+        "dot-location": "off",
+        "dot-notation": "off",
+        "eol-last": "off",
+        eqeqeq: "off",
+        "for-direction": "off",
+        "func-call-spacing": "off",
+        "func-name-matching": "off",
+        "func-names": "off",
+        "func-style": "off",
+        "function-paren-newline": "off",
+        "generator-star-spacing": "off",
+        "getter-return": "off",
+        "global-require": "off",
+        "guard-for-in": "off",
+        "handle-callback-err": "off",
+        "id-blacklist": "off",
+        "id-length": "off",
+        "id-match": "off",
+        "implicit-arrow-linebreak": "off",
+        indent: "off",
+        "indent-legacy": "off",
+        "init-declarations": "off",
+        "jsx-quotes": "off",
+        "key-spacing": "off",
+        "keyword-spacing": "off",
+        "line-comment-position": "off",
+        "linebreak-style": "off",
+        "lines-around-comment": "off",
+        "lines-around-directive": "off",
+        "lines-between-class-members": "off",
+        "max-depth": "off",
+        "max-len": "off",
+        "max-lines": "off",
+        "max-nested-callbacks": "off",
+        "max-params": "off",
+        "max-statements": "off",
+        "max-statements-per-line": "off",
+        "multiline-comment-style": "off",
+        "multiline-ternary": "off",
+        "new-cap": "off",
+        "new-parens": "off",
+        "newline-after-var": "off",
+        "newline-before-return": "off",
+        "newline-per-chained-call": "off",
+        "no-alert": "off",
+        "no-array-constructor": "off",
+        "no-await-in-loop": "off",
+        "no-bitwise": "off",
+        "no-buffer-constructor": "off",
+        "no-caller": "off",
+        "no-case-declarations": "error",
+        "no-catch-shadow": "off",
+        "no-class-assign": "error",
+        "no-compare-neg-zero": "error",
+        "no-cond-assign": "error",
+        "no-confusing-arrow": "off",
+        "no-console": "error",
+        "no-const-assign": "error",
+        "no-constant-condition": "error",
+        "no-continue": "off",
+        "no-control-regex": "error",
+        "no-debugger": "error",
+        "no-delete-var": "error",
+        "no-div-regex": "off",
+        "no-dupe-args": "error",
+        "no-dupe-class-members": "error",
+        "no-dupe-keys": "error",
+        "no-duplicate-case": "error",
+        "no-duplicate-imports": "off",
+        "no-else-return": "off",
+        "no-empty": "error",
+        "no-empty-character-class": "error",
+        "no-empty-function": "off",
+        "no-empty-pattern": "error",
+        "no-eq-null": "off",
+        "no-eval": "off",
+        "no-ex-assign": "error",
+        "no-extend-native": "off",
+        "no-extra-bind": "off",
+        "no-extra-boolean-cast": "error",
+        "no-extra-label": "off",
+        "no-extra-parens": "off",
+        "no-extra-semi": "error",
+        "no-fallthrough": "error",
+        "no-floating-decimal": "off",
+        "no-func-assign": "error",
+        "no-global-assign": "error",
+        "no-implicit-coercion": "off",
+        "no-implicit-globals": "off",
+        "no-implied-eval": "off",
+        "no-inline-comments": "off",
+        "no-inner-declarations": "error",
+        "no-invalid-regexp": "error",
+        "no-invalid-this": "off",
+        "no-irregular-whitespace": "error",
+        "no-iterator": "off",
+        "no-label-var": "off",
+        "no-labels": "off",
+        "no-lone-blocks": "off",
+        "no-lonely-if": "off",
+        "no-loop-func": "off",
+        "no-magic-numbers": "off",
+        "no-mixed-operators": "off",
+        "no-mixed-requires": "off",
+        "no-mixed-spaces-and-tabs": "error",
+        "no-multi-assign": "off",
+        "no-multi-spaces": "off",
+        "no-multi-str": "off",
+        "no-multiple-empty-lines": "off",
+        "no-native-reassign": "off",
+        "no-negated-condition": "off",
+        "no-negated-in-lhs": "off",
+        "no-nested-ternary": "off",
+        "no-new": "off",
+        "no-new-func": "off",
+        "no-new-object": "off",
+        "no-new-require": "off",
+        "no-new-symbol": "error",
+        "no-new-wrappers": "off",
+        "no-obj-calls": "error",
+        "no-octal": "error",
+        "no-octal-escape": "off",
+        "no-param-reassign": "off",
+        "no-path-concat": "off",
+        "no-plusplus": "off",
+        "no-process-env": "off",
+        "no-process-exit": "off",
+        "no-proto": "off",
+        "no-prototype-builtins": "off",
+        "no-redeclare": "error",
+        "no-regex-spaces": "error",
+        "no-restricted-globals": "off",
+        "no-restricted-imports": "off",
+        "no-restricted-modules": "off",
+        "no-restricted-properties": "off",
+        "no-restricted-syntax": "off",
+        "no-return-assign": "off",
+        "no-return-await": "off",
+        "no-script-url": "off",
+        "no-self-assign": "error",
+        "no-self-compare": "off",
+        "no-sequences": "off",
+        "no-shadow": "off",
+        "no-shadow-restricted-names": "off",
+        "no-spaced-func": "off",
+        "no-sparse-arrays": "error",
+        "no-sync": "off",
+        "no-tabs": "off",
+        "no-template-curly-in-string": "off",
+        "no-ternary": "off",
+        "no-this-before-super": "error",
+        "no-throw-literal": "off",
+        "no-trailing-spaces": "off",
+        "no-undef": "error",
+        "no-undef-init": "off",
+        "no-undefined": "off",
+        "no-underscore-dangle": "off",
+        "no-unexpected-multiline": "error",
+        "no-unmodified-loop-condition": "off",
+        "no-unneeded-ternary": "off",
+        "no-unreachable": "error",
+        "no-unsafe-finally": "error",
+        "no-unsafe-negation": "error",
+        "no-unused-expressions": "off",
+        "no-unused-labels": "error",
+        "no-unused-vars": "error",
+        "no-use-before-define": "off",
+        "no-useless-call": "off",
+        "no-useless-computed-key": "off",
+        "no-useless-concat": "off",
+        "no-useless-constructor": "off",
+        "no-useless-escape": "error",
+        "no-useless-rename": "off",
+        "no-useless-return": "off",
+        "no-var": "off",
+        "no-void": "off",
+        "no-warning-comments": "off",
+        "no-whitespace-before-property": "off",
+        "no-with": "off",
+        "nonblock-statement-body-position": "off",
+        "object-curly-newline": "off",
+        "object-curly-spacing": "off",
+        "object-property-newline": "off",
+        "object-shorthand": "off",
+        "one-var": "off",
+        "one-var-declaration-per-line": "off",
+        "operator-assignment": "off",
+        "operator-linebreak": "off",
+        "padded-blocks": "off",
+        "padding-line-between-statements": "off",
+        "prefer-arrow-callback": "off",
+        "prefer-const": "off",
+        "prefer-destructuring": "off",
+        "prefer-numeric-literals": "off",
+        "prefer-promise-reject-errors": "off",
+        "prefer-reflect": "off",
+        "prefer-rest-params": "off",
+        "prefer-spread": "off",
+        "prefer-template": "off",
+        "quote-props": "off",
+        quotes: "off",
+        radix: "off",
+        "require-await": "off",
+        "require-jsdoc": "off",
+        "require-yield": "error",
+        "rest-spread-spacing": "off",
+        semi: "off",
+        "semi-spacing": "off",
+        "semi-style": "off",
+        "sort-imports": "off",
+        "sort-keys": "off",
+        "sort-vars": "off",
+        "space-before-blocks": "off",
+        "space-before-function-paren": "off",
+        "space-in-parens": "off",
+        "space-infix-ops": "off",
+        "space-unary-ops": "off",
+        "spaced-comment": "off",
+        strict: "off",
+        "switch-colon-spacing": "off",
+        "symbol-description": "off",
+        "template-curly-spacing": "off",
+        "template-tag-spacing": "off",
+        "unicode-bom": "off",
+        "use-isnan": "error",
+        "valid-jsdoc": "off",
+        "valid-typeof": "error",
+        "vars-on-top": "off",
+        "wrap-iife": "off",
+        "wrap-regex": "off",
+        "yield-star-spacing": "off",
+        yoda: "off"
+    }
+};
diff --git a/node_modules/eslint/conf/replacements.json b/node_modules/eslint/conf/replacements.json
new file mode 100644
index 0000000..c047811
--- /dev/null
+++ b/node_modules/eslint/conf/replacements.json
@@ -0,0 +1,22 @@
+{
+    "rules": {
+        "generator-star": ["generator-star-spacing"],
+        "global-strict": ["strict"],
+        "no-arrow-condition": ["no-confusing-arrow", "no-constant-condition"],
+        "no-comma-dangle": ["comma-dangle"],
+        "no-empty-class": ["no-empty-character-class"],
+        "no-empty-label": ["no-labels"],
+        "no-extra-strict": ["strict"],
+        "no-reserved-keys": ["quote-props"],
+        "no-space-before-semi": ["semi-spacing"],
+        "no-wrap-func": ["no-extra-parens"],
+        "space-after-function-name": ["space-before-function-paren"],
+        "space-after-keywords": ["keyword-spacing"],
+        "space-before-function-parentheses": ["space-before-function-paren"],
+        "space-before-keywords": ["keyword-spacing"],
+        "space-in-brackets": ["object-curly-spacing", "array-bracket-spacing", "computed-property-spacing"],
+        "space-return-throw-case": ["keyword-spacing"],
+        "space-unary-word-ops": ["space-unary-ops"],
+        "spaced-line-comment": ["spaced-comment"]
+    }
+}
diff --git a/node_modules/eslint/lib/api.js b/node_modules/eslint/lib/api.js
new file mode 100644
index 0000000..0a0832a
--- /dev/null
+++ b/node_modules/eslint/lib/api.js
@@ -0,0 +1,16 @@
+/**
+ * @fileoverview Expose out ESLint and CLI to require.
+ * @author Ian Christian Myers
+ */
+
+"use strict";
+
+const Linter = require("./linter");
+
+module.exports = {
+    linter: new Linter(),
+    Linter,
+    CLIEngine: require("./cli-engine"),
+    RuleTester: require("./testers/rule-tester"),
+    SourceCode: require("./util/source-code")
+};
diff --git a/node_modules/eslint/lib/ast-utils.js b/node_modules/eslint/lib/ast-utils.js
new file mode 100644
index 0000000..a186bde
--- /dev/null
+++ b/node_modules/eslint/lib/ast-utils.js
@@ -0,0 +1,1350 @@
+/**
+ * @fileoverview Common utils for AST.
+ * @author Gyandeep Singh
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const esutils = require("esutils");
+const espree = require("espree");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+const anyFunctionPattern = /^(?:Function(?:Declaration|Expression)|ArrowFunctionExpression)$/;
+const anyLoopPattern = /^(?:DoWhile|For|ForIn|ForOf|While)Statement$/;
+const arrayOrTypedArrayPattern = /Array$/;
+const arrayMethodPattern = /^(?:every|filter|find|findIndex|forEach|map|some)$/;
+const bindOrCallOrApplyPattern = /^(?:bind|call|apply)$/;
+const breakableTypePattern = /^(?:(?:Do)?While|For(?:In|Of)?|Switch)Statement$/;
+const thisTagPattern = /^[\s*]*@this/m;
+
+
+const COMMENTS_IGNORE_PATTERN = /^\s*(?:eslint|jshint\s+|jslint\s+|istanbul\s+|globals?\s+|exported\s+|jscs)/;
+const LINEBREAKS = new Set(["\r\n", "\r", "\n", "\u2028", "\u2029"]);
+const LINEBREAK_MATCHER = /\r\n|[\r\n\u2028\u2029]/;
+const SHEBANG_MATCHER = /^#!([^\r\n]+)/;
+
+// A set of node types that can contain a list of statements
+const STATEMENT_LIST_PARENTS = new Set(["Program", "BlockStatement", "SwitchCase"]);
+
+/**
+ * Checks reference if is non initializer and writable.
+ * @param {Reference} reference - A reference to check.
+ * @param {int} index - The index of the reference in the references.
+ * @param {Reference[]} references - The array that the reference belongs to.
+ * @returns {boolean} Success/Failure
+ * @private
+ */
+function isModifyingReference(reference, index, references) {
+    const identifier = reference.identifier;
+
+    /*
+     * Destructuring assignments can have multiple default value, so
+     * possibly there are multiple writeable references for the same
+     * identifier.
+     */
+    const modifyingDifferentIdentifier = index === 0 ||
+        references[index - 1].identifier !== identifier;
+
+    return (identifier &&
+        reference.init === false &&
+        reference.isWrite() &&
+        modifyingDifferentIdentifier
+    );
+}
+
+/**
+ * Checks whether the given string starts with uppercase or not.
+ *
+ * @param {string} s - The string to check.
+ * @returns {boolean} `true` if the string starts with uppercase.
+ */
+function startsWithUpperCase(s) {
+    return s[0] !== s[0].toLocaleLowerCase();
+}
+
+/**
+ * Checks whether or not a node is a constructor.
+ * @param {ASTNode} node - A function node to check.
+ * @returns {boolean} Wehether or not a node is a constructor.
+ */
+function isES5Constructor(node) {
+    return (node.id && startsWithUpperCase(node.id.name));
+}
+
+/**
+ * Finds a function node from ancestors of a node.
+ * @param {ASTNode} node - A start node to find.
+ * @returns {Node|null} A found function node.
+ */
+function getUpperFunction(node) {
+    while (node) {
+        if (anyFunctionPattern.test(node.type)) {
+            return node;
+        }
+        node = node.parent;
+    }
+    return null;
+}
+
+/**
+ * Checks whether a given node is a function node or not.
+ * The following types are function nodes:
+ *
+ * - ArrowFunctionExpression
+ * - FunctionDeclaration
+ * - FunctionExpression
+ *
+ * @param {ASTNode|null} node - A node to check.
+ * @returns {boolean} `true` if the node is a function node.
+ */
+function isFunction(node) {
+    return Boolean(node && anyFunctionPattern.test(node.type));
+}
+
+/**
+ * Checks whether a given node is a loop node or not.
+ * The following types are loop nodes:
+ *
+ * - DoWhileStatement
+ * - ForInStatement
+ * - ForOfStatement
+ * - ForStatement
+ * - WhileStatement
+ *
+ * @param {ASTNode|null} node - A node to check.
+ * @returns {boolean} `true` if the node is a loop node.
+ */
+function isLoop(node) {
+    return Boolean(node && anyLoopPattern.test(node.type));
+}
+
+/**
+ * Checks whether the given node is in a loop or not.
+ *
+ * @param {ASTNode} node - The node to check.
+ * @returns {boolean} `true` if the node is in a loop.
+ */
+function isInLoop(node) {
+    while (node && !isFunction(node)) {
+        if (isLoop(node)) {
+            return true;
+        }
+
+        node = node.parent;
+    }
+
+    return false;
+}
+
+/**
+ * Checks whether or not a node is `null` or `undefined`.
+ * @param {ASTNode} node - A node to check.
+ * @returns {boolean} Whether or not the node is a `null` or `undefined`.
+ * @public
+ */
+function isNullOrUndefined(node) {
+    return (
+        module.exports.isNullLiteral(node) ||
+        (node.type === "Identifier" && node.name === "undefined") ||
+        (node.type === "UnaryExpression" && node.operator === "void")
+    );
+}
+
+/**
+ * Checks whether or not a node is callee.
+ * @param {ASTNode} node - A node to check.
+ * @returns {boolean} Whether or not the node is callee.
+ */
+function isCallee(node) {
+    return node.parent.type === "CallExpression" && node.parent.callee === node;
+}
+
+/**
+ * Checks whether or not a node is `Reflect.apply`.
+ * @param {ASTNode} node - A node to check.
+ * @returns {boolean} Whether or not the node is a `Reflect.apply`.
+ */
+function isReflectApply(node) {
+    return (
+        node.type === "MemberExpression" &&
+        node.object.type === "Identifier" &&
+        node.object.name === "Reflect" &&
+        node.property.type === "Identifier" &&
+        node.property.name === "apply" &&
+        node.computed === false
+    );
+}
+
+/**
+ * Checks whether or not a node is `Array.from`.
+ * @param {ASTNode} node - A node to check.
+ * @returns {boolean} Whether or not the node is a `Array.from`.
+ */
+function isArrayFromMethod(node) {
+    return (
+        node.type === "MemberExpression" &&
+        node.object.type === "Identifier" &&
+        arrayOrTypedArrayPattern.test(node.object.name) &&
+        node.property.type === "Identifier" &&
+        node.property.name === "from" &&
+        node.computed === false
+    );
+}
+
+/**
+ * Checks whether or not a node is a method which has `thisArg`.
+ * @param {ASTNode} node - A node to check.
+ * @returns {boolean} Whether or not the node is a method which has `thisArg`.
+ */
+function isMethodWhichHasThisArg(node) {
+    while (node) {
+        if (node.type === "Identifier") {
+            return arrayMethodPattern.test(node.name);
+        }
+        if (node.type === "MemberExpression" && !node.computed) {
+            node = node.property;
+            continue;
+        }
+
+        break;
+    }
+
+    return false;
+}
+
+/**
+ * Creates the negate function of the given function.
+ * @param {Function} f - The function to negate.
+ * @returns {Function} Negated function.
+ */
+function negate(f) {
+    return token => !f(token);
+}
+
+/**
+ * Checks whether or not a node has a `@this` tag in its comments.
+ * @param {ASTNode} node - A node to check.
+ * @param {SourceCode} sourceCode - A SourceCode instance to get comments.
+ * @returns {boolean} Whether or not the node has a `@this` tag in its comments.
+ */
+function hasJSDocThisTag(node, sourceCode) {
+    const jsdocComment = sourceCode.getJSDocComment(node);
+
+    if (jsdocComment && thisTagPattern.test(jsdocComment.value)) {
+        return true;
+    }
+
+    // Checks `@this` in its leading comments for callbacks,
+    // because callbacks don't have its JSDoc comment.
+    // e.g.
+    //     sinon.test(/* @this sinon.Sandbox */function() { this.spy(); });
+    return sourceCode.getCommentsBefore(node).some(comment => thisTagPattern.test(comment.value));
+}
+
+/**
+ * Determines if a node is surrounded by parentheses.
+ * @param {SourceCode} sourceCode The ESLint source code object
+ * @param {ASTNode} node The node to be checked.
+ * @returns {boolean} True if the node is parenthesised.
+ * @private
+ */
+function isParenthesised(sourceCode, node) {
+    const previousToken = sourceCode.getTokenBefore(node),
+        nextToken = sourceCode.getTokenAfter(node);
+
+    return Boolean(previousToken && nextToken) &&
+        previousToken.value === "(" && previousToken.range[1] <= node.range[0] &&
+        nextToken.value === ")" && nextToken.range[0] >= node.range[1];
+}
+
+/**
+ * Checks if the given token is an arrow token or not.
+ *
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is an arrow token.
+ */
+function isArrowToken(token) {
+    return token.value === "=>" && token.type === "Punctuator";
+}
+
+/**
+ * Checks if the given token is a comma token or not.
+ *
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a comma token.
+ */
+function isCommaToken(token) {
+    return token.value === "," && token.type === "Punctuator";
+}
+
+/**
+ * Checks if the given token is a semicolon token or not.
+ *
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a semicolon token.
+ */
+function isSemicolonToken(token) {
+    return token.value === ";" && token.type === "Punctuator";
+}
+
+/**
+ * Checks if the given token is a colon token or not.
+ *
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a colon token.
+ */
+function isColonToken(token) {
+    return token.value === ":" && token.type === "Punctuator";
+}
+
+/**
+ * Checks if the given token is an opening parenthesis token or not.
+ *
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is an opening parenthesis token.
+ */
+function isOpeningParenToken(token) {
+    return token.value === "(" && token.type === "Punctuator";
+}
+
+/**
+ * Checks if the given token is a closing parenthesis token or not.
+ *
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a closing parenthesis token.
+ */
+function isClosingParenToken(token) {
+    return token.value === ")" && token.type === "Punctuator";
+}
+
+/**
+ * Checks if the given token is an opening square bracket token or not.
+ *
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is an opening square bracket token.
+ */
+function isOpeningBracketToken(token) {
+    return token.value === "[" && token.type === "Punctuator";
+}
+
+/**
+ * Checks if the given token is a closing square bracket token or not.
+ *
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a closing square bracket token.
+ */
+function isClosingBracketToken(token) {
+    return token.value === "]" && token.type === "Punctuator";
+}
+
+/**
+ * Checks if the given token is an opening brace token or not.
+ *
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is an opening brace token.
+ */
+function isOpeningBraceToken(token) {
+    return token.value === "{" && token.type === "Punctuator";
+}
+
+/**
+ * Checks if the given token is a closing brace token or not.
+ *
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a closing brace token.
+ */
+function isClosingBraceToken(token) {
+    return token.value === "}" && token.type === "Punctuator";
+}
+
+/**
+ * Checks if the given token is a comment token or not.
+ *
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a comment token.
+ */
+function isCommentToken(token) {
+    return token.type === "Line" || token.type === "Block" || token.type === "Shebang";
+}
+
+/**
+ * Checks if the given token is a keyword token or not.
+ *
+ * @param {Token} token - The token to check.
+ * @returns {boolean} `true` if the token is a keyword token.
+ */
+function isKeywordToken(token) {
+    return token.type === "Keyword";
+}
+
+/**
+ * Gets the `(` token of the given function node.
+ *
+ * @param {ASTNode} node - The function node to get.
+ * @param {SourceCode} sourceCode - The source code object to get tokens.
+ * @returns {Token} `(` token.
+ */
+function getOpeningParenOfParams(node, sourceCode) {
+    return node.id
+        ? sourceCode.getTokenAfter(node.id, isOpeningParenToken)
+        : sourceCode.getFirstToken(node, isOpeningParenToken);
+}
+
+/**
+ * Creates a version of the LINEBREAK_MATCHER regex with the global flag.
+ * Global regexes are mutable, so this needs to be a function instead of a constant.
+ * @returns {RegExp} A global regular expression that matches line terminators
+ */
+function createGlobalLinebreakMatcher() {
+    return new RegExp(LINEBREAK_MATCHER.source, "g");
+}
+
+/**
+ * Checks whether or not the tokens of two given nodes are same.
+ * @param {ASTNode} left - A node 1 to compare.
+ * @param {ASTNode} right - A node 2 to compare.
+ * @param {SourceCode} sourceCode - The ESLint source code object.
+ * @returns {boolean} the source code for the given node.
+ */
+function equalTokens(left, right, sourceCode) {
+    const tokensL = sourceCode.getTokens(left);
+    const tokensR = sourceCode.getTokens(right);
+
+    if (tokensL.length !== tokensR.length) {
+        return false;
+    }
+    for (let i = 0; i < tokensL.length; ++i) {
+        if (tokensL[i].type !== tokensR[i].type ||
+            tokensL[i].value !== tokensR[i].value
+        ) {
+            return false;
+        }
+    }
+
+    return true;
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = {
+    COMMENTS_IGNORE_PATTERN,
+    LINEBREAKS,
+    LINEBREAK_MATCHER,
+    SHEBANG_MATCHER,
+    STATEMENT_LIST_PARENTS,
+
+    /**
+     * Determines whether two adjacent tokens are on the same line.
+     * @param {Object} left - The left token object.
+     * @param {Object} right - The right token object.
+     * @returns {boolean} Whether or not the tokens are on the same line.
+     * @public
+     */
+    isTokenOnSameLine(left, right) {
+        return left.loc.end.line === right.loc.start.line;
+    },
+
+    isNullOrUndefined,
+    isCallee,
+    isES5Constructor,
+    getUpperFunction,
+    isFunction,
+    isLoop,
+    isInLoop,
+    isArrayFromMethod,
+    isParenthesised,
+    createGlobalLinebreakMatcher,
+    equalTokens,
+
+    isArrowToken,
+    isClosingBraceToken,
+    isClosingBracketToken,
+    isClosingParenToken,
+    isColonToken,
+    isCommaToken,
+    isCommentToken,
+    isKeywordToken,
+    isNotClosingBraceToken: negate(isClosingBraceToken),
+    isNotClosingBracketToken: negate(isClosingBracketToken),
+    isNotClosingParenToken: negate(isClosingParenToken),
+    isNotColonToken: negate(isColonToken),
+    isNotCommaToken: negate(isCommaToken),
+    isNotOpeningBraceToken: negate(isOpeningBraceToken),
+    isNotOpeningBracketToken: negate(isOpeningBracketToken),
+    isNotOpeningParenToken: negate(isOpeningParenToken),
+    isNotSemicolonToken: negate(isSemicolonToken),
+    isOpeningBraceToken,
+    isOpeningBracketToken,
+    isOpeningParenToken,
+    isSemicolonToken,
+
+    /**
+     * Checks whether or not a given node is a string literal.
+     * @param {ASTNode} node - A node to check.
+     * @returns {boolean} `true` if the node is a string literal.
+     */
+    isStringLiteral(node) {
+        return (
+            (node.type === "Literal" && typeof node.value === "string") ||
+            node.type === "TemplateLiteral"
+        );
+    },
+
+    /**
+     * Checks whether a given node is a breakable statement or not.
+     * The node is breakable if the node is one of the following type:
+     *
+     * - DoWhileStatement
+     * - ForInStatement
+     * - ForOfStatement
+     * - ForStatement
+     * - SwitchStatement
+     * - WhileStatement
+     *
+     * @param {ASTNode} node - A node to check.
+     * @returns {boolean} `true` if the node is breakable.
+     */
+    isBreakableStatement(node) {
+        return breakableTypePattern.test(node.type);
+    },
+
+    /**
+     * Gets the label if the parent node of a given node is a LabeledStatement.
+     *
+     * @param {ASTNode} node - A node to get.
+     * @returns {string|null} The label or `null`.
+     */
+    getLabel(node) {
+        if (node.parent.type === "LabeledStatement") {
+            return node.parent.label.name;
+        }
+        return null;
+    },
+
+    /**
+     * Gets references which are non initializer and writable.
+     * @param {Reference[]} references - An array of references.
+     * @returns {Reference[]} An array of only references which are non initializer and writable.
+     * @public
+     */
+    getModifyingReferences(references) {
+        return references.filter(isModifyingReference);
+    },
+
+    /**
+     * Validate that a string passed in is surrounded by the specified character
+     * @param  {string} val The text to check.
+     * @param  {string} character The character to see if it's surrounded by.
+     * @returns {boolean} True if the text is surrounded by the character, false if not.
+     * @private
+     */
+    isSurroundedBy(val, character) {
+        return val[0] === character && val[val.length - 1] === character;
+    },
+
+    /**
+     * Returns whether the provided node is an ESLint directive comment or not
+     * @param {Line|Block} node The comment token to be checked
+     * @returns {boolean} `true` if the node is an ESLint directive comment
+     */
+    isDirectiveComment(node) {
+        const comment = node.value.trim();
+
+        return (
+            node.type === "Line" && comment.indexOf("eslint-") === 0 ||
+            node.type === "Block" && (
+                comment.indexOf("global ") === 0 ||
+                comment.indexOf("eslint ") === 0 ||
+                comment.indexOf("eslint-") === 0
+            )
+        );
+    },
+
+    /**
+     * Gets the trailing statement of a given node.
+     *
+     *     if (code)
+     *         consequent;
+     *
+     * When taking this `IfStatement`, returns `consequent;` statement.
+     *
+     * @param {ASTNode} A node to get.
+     * @returns {ASTNode|null} The trailing statement's node.
+     */
+    getTrailingStatement: esutils.ast.trailingStatement,
+
+    /**
+     * Finds the variable by a given name in a given scope and its upper scopes.
+     *
+     * @param {eslint-scope.Scope} initScope - A scope to start find.
+     * @param {string} name - A variable name to find.
+     * @returns {eslint-scope.Variable|null} A found variable or `null`.
+     */
+    getVariableByName(initScope, name) {
+        let scope = initScope;
+
+        while (scope) {
+            const variable = scope.set.get(name);
+
+            if (variable) {
+                return variable;
+            }
+
+            scope = scope.upper;
+        }
+
+        return null;
+    },
+
+    /**
+     * Checks whether or not a given function node is the default `this` binding.
+     *
+     * First, this checks the node:
+     *
+     * - The function name does not start with uppercase (it's a constructor).
+     * - The function does not have a JSDoc comment that has a @this tag.
+     *
+     * Next, this checks the location of the node.
+     * If the location is below, this judges `this` is valid.
+     *
+     * - The location is not on an object literal.
+     * - The location is not assigned to a variable which starts with an uppercase letter.
+     * - The location is not on an ES2015 class.
+     * - Its `bind`/`call`/`apply` method is not called directly.
+     * - The function is not a callback of array methods (such as `.forEach()`) if `thisArg` is given.
+     *
+     * @param {ASTNode} node - A function node to check.
+     * @param {SourceCode} sourceCode - A SourceCode instance to get comments.
+     * @returns {boolean} The function node is the default `this` binding.
+     */
+    isDefaultThisBinding(node, sourceCode) {
+        if (isES5Constructor(node) || hasJSDocThisTag(node, sourceCode)) {
+            return false;
+        }
+        const isAnonymous = node.id === null;
+
+        while (node) {
+            const parent = node.parent;
+
+            switch (parent.type) {
+
+                /*
+                 * Looks up the destination.
+                 * e.g., obj.foo = nativeFoo || function foo() { ... };
+                 */
+                case "LogicalExpression":
+                case "ConditionalExpression":
+                    node = parent;
+                    break;
+
+                /*
+                 * If the upper function is IIFE, checks the destination of the return value.
+                 * e.g.
+                 *   obj.foo = (function() {
+                 *     // setup...
+                 *     return function foo() { ... };
+                 *   })();
+                 *   obj.foo = (() =>
+                 *     function foo() { ... }
+                 *   )();
+                 */
+                case "ReturnStatement": {
+                    const func = getUpperFunction(parent);
+
+                    if (func === null || !isCallee(func)) {
+                        return true;
+                    }
+                    node = func.parent;
+                    break;
+                }
+                case "ArrowFunctionExpression":
+                    if (node !== parent.body || !isCallee(parent)) {
+                        return true;
+                    }
+                    node = parent.parent;
+                    break;
+
+                /*
+                 * e.g.
+                 *   var obj = { foo() { ... } };
+                 *   var obj = { foo: function() { ... } };
+                 *   class A { constructor() { ... } }
+                 *   class A { foo() { ... } }
+                 *   class A { get foo() { ... } }
+                 *   class A { set foo() { ... } }
+                 *   class A { static foo() { ... } }
+                 */
+                case "Property":
+                case "MethodDefinition":
+                    return parent.value !== node;
+
+                /*
+                 * e.g.
+                 *   obj.foo = function foo() { ... };
+                 *   Foo = function() { ... };
+                 *   [obj.foo = function foo() { ... }] = a;
+                 *   [Foo = function() { ... }] = a;
+                 */
+                case "AssignmentExpression":
+                case "AssignmentPattern":
+                    if (parent.left.type === "MemberExpression") {
+                        return false;
+                    }
+                    if (
+                        isAnonymous &&
+                        parent.left.type === "Identifier" &&
+                        startsWithUpperCase(parent.left.name)
+                    ) {
+                        return false;
+                    }
+                    return true;
+
+                /*
+                 * e.g.
+                 *   var Foo = function() { ... };
+                 */
+                case "VariableDeclarator":
+                    return !(
+                        isAnonymous &&
+                        parent.init === node &&
+                        parent.id.type === "Identifier" &&
+                        startsWithUpperCase(parent.id.name)
+                    );
+
+                /*
+                 * e.g.
+                 *   var foo = function foo() { ... }.bind(obj);
+                 *   (function foo() { ... }).call(obj);
+                 *   (function foo() { ... }).apply(obj, []);
+                 */
+                case "MemberExpression":
+                    return (
+                        parent.object !== node ||
+                        parent.property.type !== "Identifier" ||
+                        !bindOrCallOrApplyPattern.test(parent.property.name) ||
+                        !isCallee(parent) ||
+                        parent.parent.arguments.length === 0 ||
+                        isNullOrUndefined(parent.parent.arguments[0])
+                    );
+
+                /*
+                 * e.g.
+                 *   Reflect.apply(function() {}, obj, []);
+                 *   Array.from([], function() {}, obj);
+                 *   list.forEach(function() {}, obj);
+                 */
+                case "CallExpression":
+                    if (isReflectApply(parent.callee)) {
+                        return (
+                            parent.arguments.length !== 3 ||
+                            parent.arguments[0] !== node ||
+                            isNullOrUndefined(parent.arguments[1])
+                        );
+                    }
+                    if (isArrayFromMethod(parent.callee)) {
+                        return (
+                            parent.arguments.length !== 3 ||
+                            parent.arguments[1] !== node ||
+                            isNullOrUndefined(parent.arguments[2])
+                        );
+                    }
+                    if (isMethodWhichHasThisArg(parent.callee)) {
+                        return (
+                            parent.arguments.length !== 2 ||
+                            parent.arguments[0] !== node ||
+                            isNullOrUndefined(parent.arguments[1])
+                        );
+                    }
+                    return true;
+
+                // Otherwise `this` is default.
+                default:
+                    return true;
+            }
+        }
+
+        /* istanbul ignore next */
+        return true;
+    },
+
+    /**
+     * Get the precedence level based on the node type
+     * @param {ASTNode} node node to evaluate
+     * @returns {int} precedence level
+     * @private
+     */
+    getPrecedence(node) {
+        switch (node.type) {
+            case "SequenceExpression":
+                return 0;
+
+            case "AssignmentExpression":
+            case "ArrowFunctionExpression":
+            case "YieldExpression":
+                return 1;
+
+            case "ConditionalExpression":
+                return 3;
+
+            case "LogicalExpression":
+                switch (node.operator) {
+                    case "||":
+                        return 4;
+                    case "&&":
+                        return 5;
+
+                    // no default
+                }
+
+                /* falls through */
+
+            case "BinaryExpression":
+
+                switch (node.operator) {
+                    case "|":
+                        return 6;
+                    case "^":
+                        return 7;
+                    case "&":
+                        return 8;
+                    case "==":
+                    case "!=":
+                    case "===":
+                    case "!==":
+                        return 9;
+                    case "<":
+                    case "<=":
+                    case ">":
+                    case ">=":
+                    case "in":
+                    case "instanceof":
+                        return 10;
+                    case "<<":
+                    case ">>":
+                    case ">>>":
+                        return 11;
+                    case "+":
+                    case "-":
+                        return 12;
+                    case "*":
+                    case "/":
+                    case "%":
+                        return 13;
+                    case "**":
+                        return 15;
+
+                    // no default
+                }
+
+                /* falls through */
+
+            case "UnaryExpression":
+            case "AwaitExpression":
+                return 16;
+
+            case "UpdateExpression":
+                return 17;
+
+            case "CallExpression":
+                return 18;
+
+            case "NewExpression":
+                return 19;
+
+            default:
+                return 20;
+        }
+    },
+
+    /**
+     * Checks whether the given node is an empty block node or not.
+     *
+     * @param {ASTNode|null} node - The node to check.
+     * @returns {boolean} `true` if the node is an empty block.
+     */
+    isEmptyBlock(node) {
+        return Boolean(node && node.type === "BlockStatement" && node.body.length === 0);
+    },
+
+    /**
+     * Checks whether the given node is an empty function node or not.
+     *
+     * @param {ASTNode|null} node - The node to check.
+     * @returns {boolean} `true` if the node is an empty function.
+     */
+    isEmptyFunction(node) {
+        return isFunction(node) && module.exports.isEmptyBlock(node.body);
+    },
+
+    /**
+     * Gets the property name of a given node.
+     * The node can be a MemberExpression, a Property, or a MethodDefinition.
+     *
+     * If the name is dynamic, this returns `null`.
+     *
+     * For examples:
+     *
+     *     a.b           // => "b"
+     *     a["b"]        // => "b"
+     *     a['b']        // => "b"
+     *     a[`b`]        // => "b"
+     *     a[100]        // => "100"
+     *     a[b]          // => null
+     *     a["a" + "b"]  // => null
+     *     a[tag`b`]     // => null
+     *     a[`${b}`]     // => null
+     *
+     *     let a = {b: 1}            // => "b"
+     *     let a = {["b"]: 1}        // => "b"
+     *     let a = {['b']: 1}        // => "b"
+     *     let a = {[`b`]: 1}        // => "b"
+     *     let a = {[100]: 1}        // => "100"
+     *     let a = {[b]: 1}          // => null
+     *     let a = {["a" + "b"]: 1}  // => null
+     *     let a = {[tag`b`]: 1}     // => null
+     *     let a = {[`${b}`]: 1}     // => null
+     *
+     * @param {ASTNode} node - The node to get.
+     * @returns {string|null} The property name if static. Otherwise, null.
+     */
+    getStaticPropertyName(node) {
+        let prop;
+
+        switch (node && node.type) {
+            case "Property":
+            case "MethodDefinition":
+                prop = node.key;
+                break;
+
+            case "MemberExpression":
+                prop = node.property;
+                break;
+
+            // no default
+        }
+
+        switch (prop && prop.type) {
+            case "Literal":
+                return String(prop.value);
+
+            case "TemplateLiteral":
+                if (prop.expressions.length === 0 && prop.quasis.length === 1) {
+                    return prop.quasis[0].value.cooked;
+                }
+                break;
+
+            case "Identifier":
+                if (!node.computed) {
+                    return prop.name;
+                }
+                break;
+
+            // no default
+        }
+
+        return null;
+    },
+
+    /**
+     * Get directives from directive prologue of a Program or Function node.
+     * @param {ASTNode} node - The node to check.
+     * @returns {ASTNode[]} The directives found in the directive prologue.
+     */
+    getDirectivePrologue(node) {
+        const directives = [];
+
+        // Directive prologues only occur at the top of files or functions.
+        if (
+            node.type === "Program" ||
+            node.type === "FunctionDeclaration" ||
+            node.type === "FunctionExpression" ||
+
+            /*
+             * Do not check arrow functions with implicit return.
+             * `() => "use strict";` returns the string `"use strict"`.
+             */
+            (node.type === "ArrowFunctionExpression" && node.body.type === "BlockStatement")
+        ) {
+            const statements = node.type === "Program" ? node.body : node.body.body;
+
+            for (const statement of statements) {
+                if (
+                    statement.type === "ExpressionStatement" &&
+                    statement.expression.type === "Literal"
+                ) {
+                    directives.push(statement);
+                } else {
+                    break;
+                }
+            }
+        }
+
+        return directives;
+    },
+
+
+    /**
+     * Determines whether this node is a decimal integer literal. If a node is a decimal integer literal, a dot added
+     * after the node will be parsed as a decimal point, rather than a property-access dot.
+     * @param {ASTNode} node - The node to check.
+     * @returns {boolean} `true` if this node is a decimal integer.
+     * @example
+     *
+     * 5       // true
+     * 5.      // false
+     * 5.0     // false
+     * 05      // false
+     * 0x5     // false
+     * 0b101   // false
+     * 0o5     // false
+     * 5e0     // false
+     * '5'     // false
+     */
+    isDecimalInteger(node) {
+        return node.type === "Literal" && typeof node.value === "number" && /^(0|[1-9]\d*)$/.test(node.raw);
+    },
+
+    /**
+     * Gets the name and kind of the given function node.
+     *
+     * - `function foo() {}`  .................... `function 'foo'`
+     * - `(function foo() {})`  .................. `function 'foo'`
+     * - `(function() {})`  ...................... `function`
+     * - `function* foo() {}`  ................... `generator function 'foo'`
+     * - `(function* foo() {})`  ................. `generator function 'foo'`
+     * - `(function*() {})`  ..................... `generator function`
+     * - `() => {}`  ............................. `arrow function`
+     * - `async () => {}`  ....................... `async arrow function`
+     * - `({ foo: function foo() {} })`  ......... `method 'foo'`
+     * - `({ foo: function() {} })`  ............. `method 'foo'`
+     * - `({ ['foo']: function() {} })`  ......... `method 'foo'`
+     * - `({ [foo]: function() {} })`  ........... `method`
+     * - `({ foo() {} })`  ....................... `method 'foo'`
+     * - `({ foo: function* foo() {} })`  ........ `generator method 'foo'`
+     * - `({ foo: function*() {} })`  ............ `generator method 'foo'`
+     * - `({ ['foo']: function*() {} })`  ........ `generator method 'foo'`
+     * - `({ [foo]: function*() {} })`  .......... `generator method`
+     * - `({ *foo() {} })`  ...................... `generator method 'foo'`
+     * - `({ foo: async function foo() {} })`  ... `async method 'foo'`
+     * - `({ foo: async function() {} })`  ....... `async method 'foo'`
+     * - `({ ['foo']: async function() {} })`  ... `async method 'foo'`
+     * - `({ [foo]: async function() {} })`  ..... `async method`
+     * - `({ async foo() {} })`  ................. `async method 'foo'`
+     * - `({ get foo() {} })`  ................... `getter 'foo'`
+     * - `({ set foo(a) {} })`  .................. `setter 'foo'`
+     * - `class A { constructor() {} }`  ......... `constructor`
+     * - `class A { foo() {} }`  ................. `method 'foo'`
+     * - `class A { *foo() {} }`  ................ `generator method 'foo'`
+     * - `class A { async foo() {} }`  ........... `async method 'foo'`
+     * - `class A { ['foo']() {} }`  ............. `method 'foo'`
+     * - `class A { *['foo']() {} }`  ............ `generator method 'foo'`
+     * - `class A { async ['foo']() {} }`  ....... `async method 'foo'`
+     * - `class A { [foo]() {} }`  ............... `method`
+     * - `class A { *[foo]() {} }`  .............. `generator method`
+     * - `class A { async [foo]() {} }`  ......... `async method`
+     * - `class A { get foo() {} }`  ............. `getter 'foo'`
+     * - `class A { set foo(a) {} }`  ............ `setter 'foo'`
+     * - `class A { static foo() {} }`  .......... `static method 'foo'`
+     * - `class A { static *foo() {} }`  ......... `static generator method 'foo'`
+     * - `class A { static async foo() {} }`  .... `static async method 'foo'`
+     * - `class A { static get foo() {} }`  ...... `static getter 'foo'`
+     * - `class A { static set foo(a) {} }`  ..... `static setter 'foo'`
+     *
+     * @param {ASTNode} node - The function node to get.
+     * @returns {string} The name and kind of the function node.
+     */
+    getFunctionNameWithKind(node) {
+        const parent = node.parent;
+        const tokens = [];
+
+        if (parent.type === "MethodDefinition" && parent.static) {
+            tokens.push("static");
+        }
+        if (node.async) {
+            tokens.push("async");
+        }
+        if (node.generator) {
+            tokens.push("generator");
+        }
+
+        if (node.type === "ArrowFunctionExpression") {
+            tokens.push("arrow", "function");
+        } else if (parent.type === "Property" || parent.type === "MethodDefinition") {
+            if (parent.kind === "constructor") {
+                return "constructor";
+            }
+            if (parent.kind === "get") {
+                tokens.push("getter");
+            } else if (parent.kind === "set") {
+                tokens.push("setter");
+            } else {
+                tokens.push("method");
+            }
+        } else {
+            tokens.push("function");
+        }
+
+        if (node.id) {
+            tokens.push(`'${node.id.name}'`);
+        } else {
+            const name = module.exports.getStaticPropertyName(parent);
+
+            if (name) {
+                tokens.push(`'${name}'`);
+            }
+        }
+
+        return tokens.join(" ");
+    },
+
+    /**
+     * Gets the location of the given function node for reporting.
+     *
+     * - `function foo() {}`
+     *    ^^^^^^^^^^^^
+     * - `(function foo() {})`
+     *     ^^^^^^^^^^^^
+     * - `(function() {})`
+     *     ^^^^^^^^
+     * - `function* foo() {}`
+     *    ^^^^^^^^^^^^^
+     * - `(function* foo() {})`
+     *     ^^^^^^^^^^^^^
+     * - `(function*() {})`
+     *     ^^^^^^^^^
+     * - `() => {}`
+     *       ^^
+     * - `async () => {}`
+     *             ^^
+     * - `({ foo: function foo() {} })`
+     *       ^^^^^^^^^^^^^^^^^
+     * - `({ foo: function() {} })`
+     *       ^^^^^^^^^^^^^
+     * - `({ ['foo']: function() {} })`
+     *       ^^^^^^^^^^^^^^^^^
+     * - `({ [foo]: function() {} })`
+     *       ^^^^^^^^^^^^^^^
+     * - `({ foo() {} })`
+     *       ^^^
+     * - `({ foo: function* foo() {} })`
+     *       ^^^^^^^^^^^^^^^^^^
+     * - `({ foo: function*() {} })`
+     *       ^^^^^^^^^^^^^^
+     * - `({ ['foo']: function*() {} })`
+     *       ^^^^^^^^^^^^^^^^^^
+     * - `({ [foo]: function*() {} })`
+     *       ^^^^^^^^^^^^^^^^
+     * - `({ *foo() {} })`
+     *       ^^^^
+     * - `({ foo: async function foo() {} })`
+     *       ^^^^^^^^^^^^^^^^^^^^^^^
+     * - `({ foo: async function() {} })`
+     *       ^^^^^^^^^^^^^^^^^^^
+     * - `({ ['foo']: async function() {} })`
+     *       ^^^^^^^^^^^^^^^^^^^^^^^
+     * - `({ [foo]: async function() {} })`
+     *       ^^^^^^^^^^^^^^^^^^^^^
+     * - `({ async foo() {} })`
+     *       ^^^^^^^^^
+     * - `({ get foo() {} })`
+     *       ^^^^^^^
+     * - `({ set foo(a) {} })`
+     *       ^^^^^^^
+     * - `class A { constructor() {} }`
+     *              ^^^^^^^^^^^
+     * - `class A { foo() {} }`
+     *              ^^^
+     * - `class A { *foo() {} }`
+     *              ^^^^
+     * - `class A { async foo() {} }`
+     *              ^^^^^^^^^
+     * - `class A { ['foo']() {} }`
+     *              ^^^^^^^
+     * - `class A { *['foo']() {} }`
+     *              ^^^^^^^^
+     * - `class A { async ['foo']() {} }`
+     *              ^^^^^^^^^^^^^
+     * - `class A { [foo]() {} }`
+     *              ^^^^^
+     * - `class A { *[foo]() {} }`
+     *              ^^^^^^
+     * - `class A { async [foo]() {} }`
+     *              ^^^^^^^^^^^
+     * - `class A { get foo() {} }`
+     *              ^^^^^^^
+     * - `class A { set foo(a) {} }`
+     *              ^^^^^^^
+     * - `class A { static foo() {} }`
+     *              ^^^^^^^^^^
+     * - `class A { static *foo() {} }`
+     *              ^^^^^^^^^^^
+     * - `class A { static async foo() {} }`
+     *              ^^^^^^^^^^^^^^^^
+     * - `class A { static get foo() {} }`
+     *              ^^^^^^^^^^^^^^
+     * - `class A { static set foo(a) {} }`
+     *              ^^^^^^^^^^^^^^
+     *
+     * @param {ASTNode} node - The function node to get.
+     * @param {SourceCode} sourceCode - The source code object to get tokens.
+     * @returns {string} The location of the function node for reporting.
+     */
+    getFunctionHeadLoc(node, sourceCode) {
+        const parent = node.parent;
+        let start = null;
+        let end = null;
+
+        if (node.type === "ArrowFunctionExpression") {
+            const arrowToken = sourceCode.getTokenBefore(node.body, isArrowToken);
+
+            start = arrowToken.loc.start;
+            end = arrowToken.loc.end;
+        } else if (parent.type === "Property" || parent.type === "MethodDefinition") {
+            start = parent.loc.start;
+            end = getOpeningParenOfParams(node, sourceCode).loc.start;
+        } else {
+            start = node.loc.start;
+            end = getOpeningParenOfParams(node, sourceCode).loc.start;
+        }
+
+        return {
+            start: Object.assign({}, start),
+            end: Object.assign({}, end)
+        };
+    },
+
+    /**
+     * Gets the parenthesized text of a node. This is similar to sourceCode.getText(node), but it also includes any parentheses
+     * surrounding the node.
+     * @param {SourceCode} sourceCode The source code object
+     * @param {ASTNode} node An expression node
+     * @returns {string} The text representing the node, with all surrounding parentheses included
+     */
+    getParenthesisedText(sourceCode, node) {
+        let leftToken = sourceCode.getFirstToken(node);
+        let rightToken = sourceCode.getLastToken(node);
+
+        while (
+            sourceCode.getTokenBefore(leftToken) &&
+            sourceCode.getTokenBefore(leftToken).type === "Punctuator" &&
+            sourceCode.getTokenBefore(leftToken).value === "(" &&
+            sourceCode.getTokenAfter(rightToken) &&
+            sourceCode.getTokenAfter(rightToken).type === "Punctuator" &&
+            sourceCode.getTokenAfter(rightToken).value === ")"
+        ) {
+            leftToken = sourceCode.getTokenBefore(leftToken);
+            rightToken = sourceCode.getTokenAfter(rightToken);
+        }
+
+        return sourceCode.getText().slice(leftToken.range[0], rightToken.range[1]);
+    },
+
+    /*
+     * Determine if a node has a possiblity to be an Error object
+     * @param  {ASTNode} node  ASTNode to check
+     * @returns {boolean} True if there is a chance it contains an Error obj
+     */
+    couldBeError(node) {
+        switch (node.type) {
+            case "Identifier":
+            case "CallExpression":
+            case "NewExpression":
+            case "MemberExpression":
+            case "TaggedTemplateExpression":
+            case "YieldExpression":
+            case "AwaitExpression":
+                return true; // possibly an error object.
+
+            case "AssignmentExpression":
+                return module.exports.couldBeError(node.right);
+
+            case "SequenceExpression": {
+                const exprs = node.expressions;
+
+                return exprs.length !== 0 && module.exports.couldBeError(exprs[exprs.length - 1]);
+            }
+
+            case "LogicalExpression":
+                return module.exports.couldBeError(node.left) || module.exports.couldBeError(node.right);
+
+            case "ConditionalExpression":
+                return module.exports.couldBeError(node.consequent) || module.exports.couldBeError(node.alternate);
+
+            default:
+                return false;
+        }
+    },
+
+    /**
+     * Determines whether the given node is a `null` literal.
+     * @param {ASTNode} node The node to check
+     * @returns {boolean} `true` if the node is a `null` literal
+     */
+    isNullLiteral(node) {
+
+        /*
+         * Checking `node.value === null` does not guarantee that a literal is a null literal.
+         * When parsing values that cannot be represented in the current environment (e.g. unicode
+         * regexes in Node 4), `node.value` is set to `null` because it wouldn't be possible to
+         * set `node.value` to a unicode regex. To make sure a literal is actually `null`, check
+         * `node.regex` instead. Also see: https://github.com/eslint/eslint/issues/8020
+         */
+        return node.type === "Literal" && node.value === null && !node.regex;
+    },
+
+    /**
+     * Determines whether two tokens can safely be placed next to each other without merging into a single token
+     * @param {Token|string} leftValue The left token. If this is a string, it will be tokenized and the last token will be used.
+     * @param {Token|string} rightValue The right token. If this is a string, it will be tokenized and the first token will be used.
+     * @returns {boolean} If the tokens cannot be safely placed next to each other, returns `false`. If the tokens can be placed
+     * next to each other, behavior is undefined (although it should return `true` in most cases).
+     */
+    canTokensBeAdjacent(leftValue, rightValue) {
+        let leftToken;
+
+        if (typeof leftValue === "string") {
+            const leftTokens = espree.tokenize(leftValue, { ecmaVersion: 2015 });
+
+            leftToken = leftTokens[leftTokens.length - 1];
+        } else {
+            leftToken = leftValue;
+        }
+
+        const rightToken = typeof rightValue === "string" ? espree.tokenize(rightValue, { ecmaVersion: 2015 })[0] : rightValue;
+
+        if (leftToken.type === "Punctuator" || rightToken.type === "Punctuator") {
+            if (leftToken.type === "Punctuator" && rightToken.type === "Punctuator") {
+                const PLUS_TOKENS = new Set(["+", "++"]);
+                const MINUS_TOKENS = new Set(["-", "--"]);
+
+                return !(
+                    PLUS_TOKENS.has(leftToken.value) && PLUS_TOKENS.has(rightToken.value) ||
+                    MINUS_TOKENS.has(leftToken.value) && MINUS_TOKENS.has(rightToken.value)
+                );
+            }
+            return true;
+        }
+
+        if (
+            leftToken.type === "String" || rightToken.type === "String" ||
+            leftToken.type === "Template" || rightToken.type === "Template"
+        ) {
+            return true;
+        }
+
+        if (leftToken.type !== "Numeric" && rightToken.type === "Numeric" && rightToken.value.startsWith(".")) {
+            return true;
+        }
+
+        return false;
+    }
+};
diff --git a/node_modules/eslint/lib/cli-engine.js b/node_modules/eslint/lib/cli-engine.js
new file mode 100644
index 0000000..0c1afcb
--- /dev/null
+++ b/node_modules/eslint/lib/cli-engine.js
@@ -0,0 +1,719 @@
+/**
+ * @fileoverview Main CLI object.
+ * @author Nicholas C. Zakas
+ */
+
+"use strict";
+
+/*
+ * The CLI object should *not* call process.exit() directly. It should only return
+ * exit codes. This allows other programs to use the CLI object and still control
+ * when the program exits.
+ */
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const fs = require("fs"),
+    path = require("path"),
+    defaultOptions = require("../conf/default-cli-options"),
+    Linter = require("./linter"),
+    IgnoredPaths = require("./ignored-paths"),
+    Config = require("./config"),
+    fileEntryCache = require("file-entry-cache"),
+    globUtil = require("./util/glob-util"),
+    validator = require("./config/config-validator"),
+    stringify = require("json-stable-stringify-without-jsonify"),
+    hash = require("./util/hash"),
+    ModuleResolver = require("./util/module-resolver"),
+    naming = require("./util/naming"),
+    pkg = require("../package.json");
+
+const debug = require("debug")("eslint:cli-engine");
+
+const resolver = new ModuleResolver();
+
+//------------------------------------------------------------------------------
+// Typedefs
+//------------------------------------------------------------------------------
+
+/**
+ * The options to configure a CLI engine with.
+ * @typedef {Object} CLIEngineOptions
+ * @property {boolean} allowInlineConfig Enable or disable inline configuration comments.
+ * @property {boolean|Object} baseConfig Base config object. True enables recommend rules and environments.
+ * @property {boolean} cache Enable result caching.
+ * @property {string} cacheLocation The cache file to use instead of .eslintcache.
+ * @property {string} configFile The configuration file to use.
+ * @property {string} cwd The value to use for the current working directory.
+ * @property {string[]} envs An array of environments to load.
+ * @property {string[]} extensions An array of file extensions to check.
+ * @property {boolean|Function} fix Execute in autofix mode. If a function, should return a boolean.
+ * @property {string[]} globals An array of global variables to declare.
+ * @property {boolean} ignore False disables use of .eslintignore.
+ * @property {string} ignorePath The ignore file to use instead of .eslintignore.
+ * @property {string} ignorePattern A glob pattern of files to ignore.
+ * @property {boolean} useEslintrc False disables looking for .eslintrc
+ * @property {string} parser The name of the parser to use.
+ * @property {Object} parserOptions An object of parserOption settings to use.
+ * @property {string[]} plugins An array of plugins to load.
+ * @property {Object} rules An object of rules to use.
+ * @property {string[]} rulePaths An array of directories to load custom rules from.
+ * @property {boolean} reportUnusedDisableDirectives `true` adds reports for unused eslint-disable directives
+ */
+
+/**
+ * A linting warning or error.
+ * @typedef {Object} LintMessage
+ * @property {string} message The message to display to the user.
+ */
+
+/**
+ * A linting result.
+ * @typedef {Object} LintResult
+ * @property {string} filePath The path to the file that was linted.
+ * @property {LintMessage[]} messages All of the messages for the result.
+ * @property {number} errorCount Number of errors for the result.
+ * @property {number} warningCount Number of warnings for the result.
+ * @property {number} fixableErrorCount Number of fixable errors for the result.
+ * @property {number} fixableWarningCount Number of fixable warnings for the result.
+ * @property {string=} [source] The source code of the file that was linted.
+ * @property {string=} [output] The source code of the file that was linted, with as many fixes applied as possible.
+ */
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * It will calculate the error and warning count for collection of messages per file
+ * @param {Object[]} messages - Collection of messages
+ * @returns {Object} Contains the stats
+ * @private
+ */
+function calculateStatsPerFile(messages) {
+    return messages.reduce((stat, message) => {
+        if (message.fatal || message.severity === 2) {
+            stat.errorCount++;
+            if (message.fix) {
+                stat.fixableErrorCount++;
+            }
+        } else {
+            stat.warningCount++;
+            if (message.fix) {
+                stat.fixableWarningCount++;
+            }
+        }
+        return stat;
+    }, {
+        errorCount: 0,
+        warningCount: 0,
+        fixableErrorCount: 0,
+        fixableWarningCount: 0
+    });
+}
+
+/**
+ * It will calculate the error and warning count for collection of results from all files
+ * @param {Object[]} results - Collection of messages from all the files
+ * @returns {Object} Contains the stats
+ * @private
+ */
+function calculateStatsPerRun(results) {
+    return results.reduce((stat, result) => {
+        stat.errorCount += result.errorCount;
+        stat.warningCount += result.warningCount;
+        stat.fixableErrorCount += result.fixableErrorCount;
+        stat.fixableWarningCount += result.fixableWarningCount;
+        return stat;
+    }, {
+        errorCount: 0,
+        warningCount: 0,
+        fixableErrorCount: 0,
+        fixableWarningCount: 0
+    });
+}
+
+/**
+ * Processes an source code using ESLint.
+ * @param {string} text The source code to check.
+ * @param {Object} configHelper The configuration options for ESLint.
+ * @param {string} filename An optional string representing the texts filename.
+ * @param {boolean|Function} fix Indicates if fixes should be processed.
+ * @param {boolean} allowInlineConfig Allow/ignore comments that change config.
+ * @param {boolean} reportUnusedDisableDirectives Allow/ignore comments that change config.
+ * @param {Linter} linter Linter context
+ * @returns {LintResult} The results for linting on this text.
+ * @private
+ */
+function processText(text, configHelper, filename, fix, allowInlineConfig, reportUnusedDisableDirectives, linter) {
+    let filePath,
+        fileExtension,
+        processor;
+
+    if (filename) {
+        filePath = path.resolve(filename);
+        fileExtension = path.extname(filename);
+    }
+
+    filename = filename || "";
+    debug(`Linting ${filename}`);
+    const config = configHelper.getConfig(filePath);
+
+    if (config.plugins) {
+        configHelper.plugins.loadAll(config.plugins);
+    }
+
+    const loadedPlugins = configHelper.plugins.getAll();
+
+    for (const plugin in loadedPlugins) {
+        if (loadedPlugins[plugin].processors && Object.keys(loadedPlugins[plugin].processors).indexOf(fileExtension) >= 0) {
+            processor = loadedPlugins[plugin].processors[fileExtension];
+            break;
+        }
+    }
+
+    const autofixingEnabled = typeof fix !== "undefined" && (!processor || processor.supportsAutofix);
+
+    const fixedResult = linter.verifyAndFix(text, config, {
+        filename,
+        allowInlineConfig,
+        reportUnusedDisableDirectives,
+        fix: !!autofixingEnabled && fix,
+        preprocess: processor && (rawText => processor.preprocess(rawText, filename)),
+        postprocess: processor && (problemLists => processor.postprocess(problemLists, filename))
+    });
+
+    const stats = calculateStatsPerFile(fixedResult.messages);
+
+    const result = {
+        filePath: filename,
+        messages: fixedResult.messages,
+        errorCount: stats.errorCount,
+        warningCount: stats.warningCount,
+        fixableErrorCount: stats.fixableErrorCount,
+        fixableWarningCount: stats.fixableWarningCount
+    };
+
+    if (fixedResult.fixed) {
+        result.output = fixedResult.output;
+    }
+
+    if (result.errorCount + result.warningCount > 0 && typeof result.output === "undefined") {
+        result.source = text;
+    }
+
+    return result;
+}
+
+/**
+ * Processes an individual file using ESLint. Files used here are known to
+ * exist, so no need to check that here.
+ * @param {string} filename The filename of the file being checked.
+ * @param {Object} configHelper The configuration options for ESLint.
+ * @param {Object} options The CLIEngine options object.
+ * @param {Linter} linter Linter context
+ * @returns {LintResult} The results for linting on this file.
+ * @private
+ */
+function processFile(filename, configHelper, options, linter) {
+
+    const text = fs.readFileSync(path.resolve(filename), "utf8"),
+        result = processText(
+            text,
+            configHelper,
+            filename,
+            options.fix,
+            options.allowInlineConfig,
+            options.reportUnusedDisableDirectives,
+            linter
+        );
+
+    return result;
+
+}
+
+/**
+ * Returns result with warning by ignore settings
+ * @param {string} filePath - File path of checked code
+ * @param {string} baseDir  - Absolute path of base directory
+ * @returns {LintResult} Result with single warning
+ * @private
+ */
+function createIgnoreResult(filePath, baseDir) {
+    let message;
+    const isHidden = /^\./.test(path.basename(filePath));
+    const isInNodeModules = baseDir && path.relative(baseDir, filePath).startsWith("node_modules");
+    const isInBowerComponents = baseDir && path.relative(baseDir, filePath).startsWith("bower_components");
+
+    if (isHidden) {
+        message = "File ignored by default.  Use a negated ignore pattern (like \"--ignore-pattern '!'\") to override.";
+    } else if (isInNodeModules) {
+        message = "File ignored by default. Use \"--ignore-pattern '!node_modules/*'\" to override.";
+    } else if (isInBowerComponents) {
+        message = "File ignored by default. Use \"--ignore-pattern '!bower_components/*'\" to override.";
+    } else {
+        message = "File ignored because of a matching ignore pattern. Use \"--no-ignore\" to override.";
+    }
+
+    return {
+        filePath: path.resolve(filePath),
+        messages: [
+            {
+                fatal: false,
+                severity: 1,
+                message
+            }
+        ],
+        errorCount: 0,
+        warningCount: 1,
+        fixableErrorCount: 0,
+        fixableWarningCount: 0
+    };
+}
+
+
+/**
+ * Checks if the given message is an error message.
+ * @param {Object} message The message to check.
+ * @returns {boolean} Whether or not the message is an error message.
+ * @private
+ */
+function isErrorMessage(message) {
+    return message.severity === 2;
+}
+
+
+/**
+ * return the cacheFile to be used by eslint, based on whether the provided parameter is
+ * a directory or looks like a directory (ends in `path.sep`), in which case the file
+ * name will be the `cacheFile/.cache_hashOfCWD`
+ *
+ * if cacheFile points to a file or looks like a file then in will just use that file
+ *
+ * @param {string} cacheFile The name of file to be used to store the cache
+ * @param {string} cwd Current working directory
+ * @returns {string} the resolved path to the cache file
+ */
+function getCacheFile(cacheFile, cwd) {
+
+    /*
+     * make sure the path separators are normalized for the environment/os
+     * keeping the trailing path separator if present
+     */
+    cacheFile = path.normalize(cacheFile);
+
+    const resolvedCacheFile = path.resolve(cwd, cacheFile);
+    const looksLikeADirectory = cacheFile[cacheFile.length - 1] === path.sep;
+
+    /**
+     * return the name for the cache file in case the provided parameter is a directory
+     * @returns {string} the resolved path to the cacheFile
+     */
+    function getCacheFileForDirectory() {
+        return path.join(resolvedCacheFile, `.cache_${hash(cwd)}`);
+    }
+
+    let fileStats;
+
+    try {
+        fileStats = fs.lstatSync(resolvedCacheFile);
+    } catch (ex) {
+        fileStats = null;
+    }
+
+
+    /*
+     * in case the file exists we need to verify if the provided path
+     * is a directory or a file. If it is a directory we want to create a file
+     * inside that directory
+     */
+    if (fileStats) {
+
+        /*
+         * is a directory or is a file, but the original file the user provided
+         * looks like a directory but `path.resolve` removed the `last path.sep`
+         * so we need to still treat this like a directory
+         */
+        if (fileStats.isDirectory() || looksLikeADirectory) {
+            return getCacheFileForDirectory();
+        }
+
+        // is file so just use that file
+        return resolvedCacheFile;
+    }
+
+    /*
+     * here we known the file or directory doesn't exist,
+     * so we will try to infer if its a directory if it looks like a directory
+     * for the current operating system.
+     */
+
+    // if the last character passed is a path separator we assume is a directory
+    if (looksLikeADirectory) {
+        return getCacheFileForDirectory();
+    }
+
+    return resolvedCacheFile;
+}
+
+const configHashCache = new WeakMap();
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+class CLIEngine {
+
+    /**
+     * Creates a new instance of the core CLI engine.
+     * @param {CLIEngineOptions} options The options for this instance.
+     * @constructor
+     */
+    constructor(options) {
+
+        options = Object.assign(
+            Object.create(null),
+            defaultOptions,
+            { cwd: process.cwd() },
+            options
+        );
+
+        /**
+         * Stored options for this instance
+         * @type {Object}
+         */
+        this.options = options;
+        this.linter = new Linter();
+
+        if (options.cache) {
+            const cacheFile = getCacheFile(this.options.cacheLocation || this.options.cacheFile, this.options.cwd);
+
+            /**
+             * Cache used to avoid operating on files that haven't changed since the
+             * last successful execution (e.g., file passed linting with no errors and
+             * no warnings).
+             * @type {Object}
+             */
+            this._fileCache = fileEntryCache.create(cacheFile);
+        }
+
+        // load in additional rules
+        if (this.options.rulePaths) {
+            const cwd = this.options.cwd;
+
+            this.options.rulePaths.forEach(rulesdir => {
+                debug(`Loading rules from ${rulesdir}`);
+                this.linter.rules.load(rulesdir, cwd);
+            });
+        }
+
+        if (this.options.rules && Object.keys(this.options.rules).length) {
+            const loadedRules = this.linter.getRules();
+
+            Object.keys(this.options.rules).forEach(name => {
+                validator.validateRuleOptions(loadedRules.get(name), name, this.options.rules[name], "CLI");
+            });
+        }
+
+        this.config = new Config(this.options, this.linter);
+    }
+
+    getRules() {
+        return this.linter.getRules();
+    }
+
+    /**
+     * Returns results that only contains errors.
+     * @param {LintResult[]} results The results to filter.
+     * @returns {LintResult[]} The filtered results.
+     */
+    static getErrorResults(results) {
+        const filtered = [];
+
+        results.forEach(result => {
+            const filteredMessages = result.messages.filter(isErrorMessage);
+
+            if (filteredMessages.length > 0) {
+                filtered.push(
+                    Object.assign(result, {
+                        messages: filteredMessages,
+                        errorCount: filteredMessages.length,
+                        warningCount: 0,
+                        fixableErrorCount: result.fixableErrorCount,
+                        fixableWarningCount: 0
+                    })
+                );
+            }
+        });
+
+        return filtered;
+    }
+
+    /**
+     * Outputs fixes from the given results to files.
+     * @param {Object} report The report object created by CLIEngine.
+     * @returns {void}
+     */
+    static outputFixes(report) {
+        report.results.filter(result => result.hasOwnProperty("output")).forEach(result => {
+            fs.writeFileSync(result.filePath, result.output);
+        });
+    }
+
+
+    /**
+     * Add a plugin by passing its configuration
+     * @param {string} name Name of the plugin.
+     * @param {Object} pluginobject Plugin configuration object.
+     * @returns {void}
+     */
+    addPlugin(name, pluginobject) {
+        this.config.plugins.define(name, pluginobject);
+    }
+
+    /**
+     * Resolves the patterns passed into executeOnFiles() into glob-based patterns
+     * for easier handling.
+     * @param {string[]} patterns The file patterns passed on the command line.
+     * @returns {string[]} The equivalent glob patterns.
+     */
+    resolveFileGlobPatterns(patterns) {
+        return globUtil.resolveFileGlobPatterns(patterns, this.options);
+    }
+
+    /**
+     * Executes the current configuration on an array of file and directory names.
+     * @param {string[]} patterns An array of file and directory names.
+     * @returns {Object} The results for all files that were linted.
+     */
+    executeOnFiles(patterns) {
+        const options = this.options,
+            fileCache = this._fileCache,
+            configHelper = this.config;
+        const cacheFile = getCacheFile(this.options.cacheLocation || this.options.cacheFile, this.options.cwd);
+
+        if (!options.cache && fs.existsSync(cacheFile)) {
+            fs.unlinkSync(cacheFile);
+        }
+
+        /**
+         * Calculates the hash of the config file used to validate a given file
+         * @param  {string} filename The path of the file to retrieve a config object for to calculate the hash
+         * @returns {string}         the hash of the config
+         */
+        function hashOfConfigFor(filename) {
+            const config = configHelper.getConfig(filename);
+
+            if (!configHashCache.has(config)) {
+                configHashCache.set(config, hash(`${pkg.version}_${stringify(config)}`));
+            }
+
+            return configHashCache.get(config);
+        }
+
+        const startTime = Date.now();
+        const fileList = globUtil.listFilesToProcess(this.resolveFileGlobPatterns(patterns), options);
+        const results = fileList.map(fileInfo => {
+            if (fileInfo.ignored) {
+                return createIgnoreResult(fileInfo.filename, options.cwd);
+            }
+
+            if (options.cache) {
+
+                /*
+                 * get the descriptor for this file
+                 * with the metadata and the flag that determines if
+                 * the file has changed
+                 */
+                const descriptor = fileCache.getFileDescriptor(fileInfo.filename);
+                const hashOfConfig = hashOfConfigFor(fileInfo.filename);
+                const changed = descriptor.changed || descriptor.meta.hashOfConfig !== hashOfConfig;
+
+                if (!changed) {
+                    debug(`Skipping file since hasn't changed: ${fileInfo.filename}`);
+
+                    /*
+                     * Add the the cached results (always will be 0 error and
+                     * 0 warnings). We should not cache results for files that
+                     * failed, in order to guarantee that next execution will
+                     * process those files as well.
+                     */
+                    return descriptor.meta.results;
+                }
+            }
+
+            debug(`Processing ${fileInfo.filename}`);
+
+            return processFile(fileInfo.filename, configHelper, options, this.linter);
+        });
+
+        if (options.cache) {
+            results.forEach(result => {
+                if (result.messages.length) {
+
+                    /*
+                     * if a file contains errors or warnings we don't want to
+                     * store the file in the cache so we can guarantee that
+                     * next execution will also operate on this file
+                     */
+                    fileCache.removeEntry(result.filePath);
+                } else {
+
+                    /*
+                     * since the file passed we store the result here
+                     * TODO: it might not be necessary to store the results list in the cache,
+                     * since it should always be 0 errors/warnings
+                     */
+                    const descriptor = fileCache.getFileDescriptor(result.filePath);
+
+                    descriptor.meta.hashOfConfig = hashOfConfigFor(result.filePath);
+                    descriptor.meta.results = result;
+                }
+            });
+
+            // persist the cache to disk
+            fileCache.reconcile();
+        }
+
+        const stats = calculateStatsPerRun(results);
+
+        debug(`Linting complete in: ${Date.now() - startTime}ms`);
+
+        return {
+            results,
+            errorCount: stats.errorCount,
+            warningCount: stats.warningCount,
+            fixableErrorCount: stats.fixableErrorCount,
+            fixableWarningCount: stats.fixableWarningCount
+        };
+    }
+
+    /**
+     * Executes the current configuration on text.
+     * @param {string} text A string of JavaScript code to lint.
+     * @param {string} filename An optional string representing the texts filename.
+     * @param {boolean} warnIgnored Always warn when a file is ignored
+     * @returns {Object} The results for the linting.
+     */
+    executeOnText(text, filename, warnIgnored) {
+
+        const results = [],
+            options = this.options,
+            configHelper = this.config,
+            ignoredPaths = new IgnoredPaths(options);
+
+        // resolve filename based on options.cwd (for reporting, ignoredPaths also resolves)
+        if (filename && !path.isAbsolute(filename)) {
+            filename = path.resolve(options.cwd, filename);
+        }
+
+        if (filename && ignoredPaths.contains(filename)) {
+            if (warnIgnored) {
+                results.push(createIgnoreResult(filename, options.cwd));
+            }
+        } else {
+            results.push(
+                processText(
+                    text,
+                    configHelper,
+                    filename,
+                    options.fix,
+                    options.allowInlineConfig,
+                    options.reportUnusedDisableDirectives,
+                    this.linter
+                )
+            );
+        }
+
+        const stats = calculateStatsPerRun(results);
+
+        return {
+            results,
+            errorCount: stats.errorCount,
+            warningCount: stats.warningCount,
+            fixableErrorCount: stats.fixableErrorCount,
+            fixableWarningCount: stats.fixableWarningCount
+        };
+    }
+
+    /**
+     * Returns a configuration object for the given file based on the CLI options.
+     * This is the same logic used by the ESLint CLI executable to determine
+     * configuration for each file it processes.
+     * @param {string} filePath The path of the file to retrieve a config object for.
+     * @returns {Object} A configuration object for the file.
+     */
+    getConfigForFile(filePath) {
+        const configHelper = this.config;
+
+        return configHelper.getConfig(filePath);
+    }
+
+    /**
+     * Checks if a given path is ignored by ESLint.
+     * @param {string} filePath The path of the file to check.
+     * @returns {boolean} Whether or not the given path is ignored.
+     */
+    isPathIgnored(filePath) {
+        const resolvedPath = path.resolve(this.options.cwd, filePath);
+        const ignoredPaths = new IgnoredPaths(this.options);
+
+        return ignoredPaths.contains(resolvedPath);
+    }
+
+    /**
+     * Returns the formatter representing the given format or null if no formatter
+     * with the given name can be found.
+     * @param {string} [format] The name of the format to load or the path to a
+     *      custom formatter.
+     * @returns {Function} The formatter function or null if not found.
+     */
+    getFormatter(format) {
+
+
+        // default is stylish
+        format = format || "stylish";
+
+        // only strings are valid formatters
+        if (typeof format === "string") {
+
+            // replace \ with / for Windows compatibility
+            format = format.replace(/\\/g, "/");
+
+            const cwd = this.options ? this.options.cwd : process.cwd();
+            const namespace = naming.getNamespaceFromTerm(format);
+
+            let formatterPath;
+
+            // if there's a slash, then it's a file
+            if (!namespace && format.indexOf("/") > -1) {
+                formatterPath = path.resolve(cwd, format);
+            } else {
+                try {
+                    const npmFormat = naming.normalizePackageName(format, "eslint-formatter");
+
+                    formatterPath = resolver.resolve(npmFormat, `${cwd}/node_modules`);
+                } catch (e) {
+                    formatterPath = `./formatters/${format}`;
+                }
+            }
+
+            try {
+                return require(formatterPath);
+            } catch (ex) {
+                ex.message = `There was a problem loading formatter: ${formatterPath}\nError: ${ex.message}`;
+                throw ex;
+            }
+
+        } else {
+            return null;
+        }
+    }
+}
+
+CLIEngine.version = pkg.version;
+CLIEngine.getFormatter = CLIEngine.prototype.getFormatter;
+
+module.exports = CLIEngine;
diff --git a/node_modules/eslint/lib/cli.js b/node_modules/eslint/lib/cli.js
new file mode 100644
index 0000000..6a5482b
--- /dev/null
+++ b/node_modules/eslint/lib/cli.js
@@ -0,0 +1,219 @@
+/**
+ * @fileoverview Main CLI object.
+ * @author Nicholas C. Zakas
+ */
+
+"use strict";
+
+/*
+ * The CLI object should *not* call process.exit() directly. It should only return
+ * exit codes. This allows other programs to use the CLI object and still control
+ * when the program exits.
+ */
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const fs = require("fs"),
+    path = require("path"),
+    options = require("./options"),
+    CLIEngine = require("./cli-engine"),
+    mkdirp = require("mkdirp"),
+    log = require("./logging");
+
+const debug = require("debug")("eslint:cli");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Predicate function for whether or not to apply fixes in quiet mode.
+ * If a message is a warning, do not apply a fix.
+ * @param {LintResult} lintResult The lint result.
+ * @returns {boolean} True if the lint message is an error (and thus should be
+ * autofixed), false otherwise.
+ */
+function quietFixPredicate(lintResult) {
+    return lintResult.severity === 2;
+}
+
+/**
+ * Translates the CLI options into the options expected by the CLIEngine.
+ * @param {Object} cliOptions The CLI options to translate.
+ * @returns {CLIEngineOptions} The options object for the CLIEngine.
+ * @private
+ */
+function translateOptions(cliOptions) {
+    return {
+        envs: cliOptions.env,
+        extensions: cliOptions.ext,
+        rules: cliOptions.rule,
+        plugins: cliOptions.plugin,
+        globals: cliOptions.global,
+        ignore: cliOptions.ignore,
+        ignorePath: cliOptions.ignorePath,
+        ignorePattern: cliOptions.ignorePattern,
+        configFile: cliOptions.config,
+        rulePaths: cliOptions.rulesdir,
+        useEslintrc: cliOptions.eslintrc,
+        parser: cliOptions.parser,
+        parserOptions: cliOptions.parserOptions,
+        cache: cliOptions.cache,
+        cacheFile: cliOptions.cacheFile,
+        cacheLocation: cliOptions.cacheLocation,
+        fix: (cliOptions.fix || cliOptions.fixDryRun) && (cliOptions.quiet ? quietFixPredicate : true),
+        allowInlineConfig: cliOptions.inlineConfig,
+        reportUnusedDisableDirectives: cliOptions.reportUnusedDisableDirectives
+    };
+}
+
+/**
+ * Outputs the results of the linting.
+ * @param {CLIEngine} engine The CLIEngine to use.
+ * @param {LintResult[]} results The results to print.
+ * @param {string} format The name of the formatter to use or the path to the formatter.
+ * @param {string} outputFile The path for the output file.
+ * @returns {boolean} True if the printing succeeds, false if not.
+ * @private
+ */
+function printResults(engine, results, format, outputFile) {
+    let formatter;
+
+    try {
+        formatter = engine.getFormatter(format);
+    } catch (e) {
+        log.error(e.message);
+        return false;
+    }
+
+    const output = formatter(results);
+
+    if (output) {
+        if (outputFile) {
+            const filePath = path.resolve(process.cwd(), outputFile);
+
+            if (fs.existsSync(filePath) && fs.statSync(filePath).isDirectory()) {
+                log.error("Cannot write to output file path, it is a directory: %s", outputFile);
+                return false;
+            }
+
+            try {
+                mkdirp.sync(path.dirname(filePath));
+                fs.writeFileSync(filePath, output);
+            } catch (ex) {
+                log.error("There was a problem writing the output file:\n%s", ex);
+                return false;
+            }
+        } else {
+            log.info(output);
+        }
+    }
+
+    return true;
+
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/**
+ * Encapsulates all CLI behavior for eslint. Makes it easier to test as well as
+ * for other Node.js programs to effectively run the CLI.
+ */
+const cli = {
+
+    /**
+     * Executes the CLI based on an array of arguments that is passed in.
+     * @param {string|Array|Object} args The arguments to process.
+     * @param {string} [text] The text to lint (used for TTY).
+     * @returns {int} The exit code for the operation.
+     */
+    execute(args, text) {
+
+        let currentOptions;
+
+        try {
+            currentOptions = options.parse(args);
+        } catch (error) {
+            log.error(error.message);
+            return 1;
+        }
+
+        const files = currentOptions._;
+
+        const useStdin = typeof text === "string";
+
+        if (currentOptions.version) { // version from package.json
+
+            log.info(`v${require("../package.json").version}`);
+
+        } else if (currentOptions.printConfig) {
+            if (files.length) {
+                log.error("The --print-config option must be used with exactly one file name.");
+                return 1;
+            }
+            if (useStdin) {
+                log.error("The --print-config option is not available for piped-in code.");
+                return 1;
+            }
+
+            const engine = new CLIEngine(translateOptions(currentOptions));
+
+            const fileConfig = engine.getConfigForFile(currentOptions.printConfig);
+
+            log.info(JSON.stringify(fileConfig, null, "  "));
+            return 0;
+        } else if (currentOptions.help || (!files.length && !useStdin)) {
+
+            log.info(options.generateHelp());
+
+        } else {
+
+            debug(`Running on ${useStdin ? "text" : "files"}`);
+
+            if (currentOptions.fix && currentOptions.fixDryRun) {
+                log.error("The --fix option and the --fix-dry-run option cannot be used together.");
+                return 1;
+            }
+
+            if (useStdin && currentOptions.fix) {
+                log.error("The --fix option is not available for piped-in code; use --fix-dry-run instead.");
+                return 1;
+            }
+
+            const engine = new CLIEngine(translateOptions(currentOptions));
+
+            const report = useStdin ? engine.executeOnText(text, currentOptions.stdinFilename, true) : engine.executeOnFiles(files);
+
+            if (currentOptions.fix) {
+                debug("Fix mode enabled - applying fixes");
+                CLIEngine.outputFixes(report);
+            }
+
+            if (currentOptions.quiet) {
+                debug("Quiet mode enabled - filtering out warnings");
+                report.results = CLIEngine.getErrorResults(report.results);
+            }
+
+            if (printResults(engine, report.results, currentOptions.format, currentOptions.outputFile)) {
+                const tooManyWarnings = currentOptions.maxWarnings >= 0 && report.warningCount > currentOptions.maxWarnings;
+
+                if (!report.errorCount && tooManyWarnings) {
+                    log.error("ESLint found too many warnings (maximum: %s).", currentOptions.maxWarnings);
+                }
+
+                return (report.errorCount || tooManyWarnings) ? 1 : 0;
+            }
+            return 1;
+
+
+        }
+
+        return 0;
+    }
+};
+
+module.exports = cli;
diff --git a/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js b/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js
new file mode 100644
index 0000000..1a4f787
--- /dev/null
+++ b/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js
@@ -0,0 +1,659 @@
+/**
+ * @fileoverview A class of the code path analyzer.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const assert = require("assert"),
+    CodePath = require("./code-path"),
+    CodePathSegment = require("./code-path-segment"),
+    IdGenerator = require("./id-generator"),
+    debug = require("./debug-helpers"),
+    astUtils = require("../ast-utils");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Checks whether or not a given node is a `case` node (not `default` node).
+ *
+ * @param {ASTNode} node - A `SwitchCase` node to check.
+ * @returns {boolean} `true` if the node is a `case` node (not `default` node).
+ */
+function isCaseNode(node) {
+    return Boolean(node.test);
+}
+
+/**
+ * Checks whether or not a given logical expression node goes different path
+ * between the `true` case and the `false` case.
+ *
+ * @param {ASTNode} node - A node to check.
+ * @returns {boolean} `true` if the node is a test of a choice statement.
+ */
+function isForkingByTrueOrFalse(node) {
+    const parent = node.parent;
+
+    switch (parent.type) {
+        case "ConditionalExpression":
+        case "IfStatement":
+        case "WhileStatement":
+        case "DoWhileStatement":
+        case "ForStatement":
+            return parent.test === node;
+
+        case "LogicalExpression":
+            return true;
+
+        default:
+            return false;
+    }
+}
+
+/**
+ * Gets the boolean value of a given literal node.
+ *
+ * This is used to detect infinity loops (e.g. `while (true) {}`).
+ * Statements preceded by an infinity loop are unreachable if the loop didn't
+ * have any `break` statement.
+ *
+ * @param {ASTNode} node - A node to get.
+ * @returns {boolean|undefined} a boolean value if the node is a Literal node,
+ *   otherwise `undefined`.
+ */
+function getBooleanValueIfSimpleConstant(node) {
+    if (node.type === "Literal") {
+        return Boolean(node.value);
+    }
+    return void 0;
+}
+
+/**
+ * Checks that a given identifier node is a reference or not.
+ *
+ * This is used to detect the first throwable node in a `try` block.
+ *
+ * @param {ASTNode} node - An Identifier node to check.
+ * @returns {boolean} `true` if the node is a reference.
+ */
+function isIdentifierReference(node) {
+    const parent = node.parent;
+
+    switch (parent.type) {
+        case "LabeledStatement":
+        case "BreakStatement":
+        case "ContinueStatement":
+        case "ArrayPattern":
+        case "RestElement":
+        case "ImportSpecifier":
+        case "ImportDefaultSpecifier":
+        case "ImportNamespaceSpecifier":
+        case "CatchClause":
+            return false;
+
+        case "FunctionDeclaration":
+        case "FunctionExpression":
+        case "ArrowFunctionExpression":
+        case "ClassDeclaration":
+        case "ClassExpression":
+        case "VariableDeclarator":
+            return parent.id !== node;
+
+        case "Property":
+        case "MethodDefinition":
+            return (
+                parent.key !== node ||
+                parent.computed ||
+                parent.shorthand
+            );
+
+        case "AssignmentPattern":
+            return parent.key !== node;
+
+        default:
+            return true;
+    }
+}
+
+/**
+ * Updates the current segment with the head segment.
+ * This is similar to local branches and tracking branches of git.
+ *
+ * To separate the current and the head is in order to not make useless segments.
+ *
+ * In this process, both "onCodePathSegmentStart" and "onCodePathSegmentEnd"
+ * events are fired.
+ *
+ * @param {CodePathAnalyzer} analyzer - The instance.
+ * @param {ASTNode} node - The current AST node.
+ * @returns {void}
+ */
+function forwardCurrentToHead(analyzer, node) {
+    const codePath = analyzer.codePath;
+    const state = CodePath.getState(codePath);
+    const currentSegments = state.currentSegments;
+    const headSegments = state.headSegments;
+    const end = Math.max(currentSegments.length, headSegments.length);
+    let i, currentSegment, headSegment;
+
+    // Fires leaving events.
+    for (i = 0; i < end; ++i) {
+        currentSegment = currentSegments[i];
+        headSegment = headSegments[i];
+
+        if (currentSegment !== headSegment && currentSegment) {
+            debug.dump(`onCodePathSegmentEnd ${currentSegment.id}`);
+
+            if (currentSegment.reachable) {
+                analyzer.emitter.emit(
+                    "onCodePathSegmentEnd",
+                    currentSegment,
+                    node
+                );
+            }
+        }
+    }
+
+    // Update state.
+    state.currentSegments = headSegments;
+
+    // Fires entering events.
+    for (i = 0; i < end; ++i) {
+        currentSegment = currentSegments[i];
+        headSegment = headSegments[i];
+
+        if (currentSegment !== headSegment && headSegment) {
+            debug.dump(`onCodePathSegmentStart ${headSegment.id}`);
+
+            CodePathSegment.markUsed(headSegment);
+            if (headSegment.reachable) {
+                analyzer.emitter.emit(
+                    "onCodePathSegmentStart",
+                    headSegment,
+                    node
+                );
+            }
+        }
+    }
+
+}
+
+/**
+ * Updates the current segment with empty.
+ * This is called at the last of functions or the program.
+ *
+ * @param {CodePathAnalyzer} analyzer - The instance.
+ * @param {ASTNode} node - The current AST node.
+ * @returns {void}
+ */
+function leaveFromCurrentSegment(analyzer, node) {
+    const state = CodePath.getState(analyzer.codePath);
+    const currentSegments = state.currentSegments;
+
+    for (let i = 0; i < currentSegments.length; ++i) {
+        const currentSegment = currentSegments[i];
+
+        debug.dump(`onCodePathSegmentEnd ${currentSegment.id}`);
+        if (currentSegment.reachable) {
+            analyzer.emitter.emit(
+                "onCodePathSegmentEnd",
+                currentSegment,
+                node
+            );
+        }
+    }
+
+    state.currentSegments = [];
+}
+
+/**
+ * Updates the code path due to the position of a given node in the parent node
+ * thereof.
+ *
+ * For example, if the node is `parent.consequent`, this creates a fork from the
+ * current path.
+ *
+ * @param {CodePathAnalyzer} analyzer - The instance.
+ * @param {ASTNode} node - The current AST node.
+ * @returns {void}
+ */
+function preprocess(analyzer, node) {
+    const codePath = analyzer.codePath;
+    const state = CodePath.getState(codePath);
+    const parent = node.parent;
+
+    switch (parent.type) {
+        case "LogicalExpression":
+            if (parent.right === node) {
+                state.makeLogicalRight();
+            }
+            break;
+
+        case "ConditionalExpression":
+        case "IfStatement":
+
+            /*
+             * Fork if this node is at `consequent`/`alternate`.
+             * `popForkContext()` exists at `IfStatement:exit` and
+             * `ConditionalExpression:exit`.
+             */
+            if (parent.consequent === node) {
+                state.makeIfConsequent();
+            } else if (parent.alternate === node) {
+                state.makeIfAlternate();
+            }
+            break;
+
+        case "SwitchCase":
+            if (parent.consequent[0] === node) {
+                state.makeSwitchCaseBody(false, !parent.test);
+            }
+            break;
+
+        case "TryStatement":
+            if (parent.handler === node) {
+                state.makeCatchBlock();
+            } else if (parent.finalizer === node) {
+                state.makeFinallyBlock();
+            }
+            break;
+
+        case "WhileStatement":
+            if (parent.test === node) {
+                state.makeWhileTest(getBooleanValueIfSimpleConstant(node));
+            } else {
+                assert(parent.body === node);
+                state.makeWhileBody();
+            }
+            break;
+
+        case "DoWhileStatement":
+            if (parent.body === node) {
+                state.makeDoWhileBody();
+            } else {
+                assert(parent.test === node);
+                state.makeDoWhileTest(getBooleanValueIfSimpleConstant(node));
+            }
+            break;
+
+        case "ForStatement":
+            if (parent.test === node) {
+                state.makeForTest(getBooleanValueIfSimpleConstant(node));
+            } else if (parent.update === node) {
+                state.makeForUpdate();
+            } else if (parent.body === node) {
+                state.makeForBody();
+            }
+            break;
+
+        case "ForInStatement":
+        case "ForOfStatement":
+            if (parent.left === node) {
+                state.makeForInOfLeft();
+            } else if (parent.right === node) {
+                state.makeForInOfRight();
+            } else {
+                assert(parent.body === node);
+                state.makeForInOfBody();
+            }
+            break;
+
+        case "AssignmentPattern":
+
+            /*
+             * Fork if this node is at `right`.
+             * `left` is executed always, so it uses the current path.
+             * `popForkContext()` exists at `AssignmentPattern:exit`.
+             */
+            if (parent.right === node) {
+                state.pushForkContext();
+                state.forkBypassPath();
+                state.forkPath();
+            }
+            break;
+
+        default:
+            break;
+    }
+}
+
+/**
+ * Updates the code path due to the type of a given node in entering.
+ *
+ * @param {CodePathAnalyzer} analyzer - The instance.
+ * @param {ASTNode} node - The current AST node.
+ * @returns {void}
+ */
+function processCodePathToEnter(analyzer, node) {
+    let codePath = analyzer.codePath;
+    let state = codePath && CodePath.getState(codePath);
+    const parent = node.parent;
+
+    switch (node.type) {
+        case "Program":
+        case "FunctionDeclaration":
+        case "FunctionExpression":
+        case "ArrowFunctionExpression":
+            if (codePath) {
+
+                // Emits onCodePathSegmentStart events if updated.
+                forwardCurrentToHead(analyzer, node);
+                debug.dumpState(node, state, false);
+            }
+
+            // Create the code path of this scope.
+            codePath = analyzer.codePath = new CodePath(
+                analyzer.idGenerator.next(),
+                codePath,
+                analyzer.onLooped
+            );
+            state = CodePath.getState(codePath);
+
+            // Emits onCodePathStart events.
+            debug.dump(`onCodePathStart ${codePath.id}`);
+            analyzer.emitter.emit("onCodePathStart", codePath, node);
+            break;
+
+        case "LogicalExpression":
+            state.pushChoiceContext(node.operator, isForkingByTrueOrFalse(node));
+            break;
+
+        case "ConditionalExpression":
+        case "IfStatement":
+            state.pushChoiceContext("test", false);
+            break;
+
+        case "SwitchStatement":
+            state.pushSwitchContext(
+                node.cases.some(isCaseNode),
+                astUtils.getLabel(node)
+            );
+            break;
+
+        case "TryStatement":
+            state.pushTryContext(Boolean(node.finalizer));
+            break;
+
+        case "SwitchCase":
+
+            /*
+             * Fork if this node is after the 2st node in `cases`.
+             * It's similar to `else` blocks.
+             * The next `test` node is processed in this path.
+             */
+            if (parent.discriminant !== node && parent.cases[0] !== node) {
+                state.forkPath();
+            }
+            break;
+
+        case "WhileStatement":
+        case "DoWhileStatement":
+        case "ForStatement":
+        case "ForInStatement":
+        case "ForOfStatement":
+            state.pushLoopContext(node.type, astUtils.getLabel(node));
+            break;
+
+        case "LabeledStatement":
+            if (!astUtils.isBreakableStatement(node.body)) {
+                state.pushBreakContext(false, node.label.name);
+            }
+            break;
+
+        default:
+            break;
+    }
+
+    // Emits onCodePathSegmentStart events if updated.
+    forwardCurrentToHead(analyzer, node);
+    debug.dumpState(node, state, false);
+}
+
+/**
+ * Updates the code path due to the type of a given node in leaving.
+ *
+ * @param {CodePathAnalyzer} analyzer - The instance.
+ * @param {ASTNode} node - The current AST node.
+ * @returns {void}
+ */
+function processCodePathToExit(analyzer, node) {
+    const codePath = analyzer.codePath;
+    const state = CodePath.getState(codePath);
+    let dontForward = false;
+
+    switch (node.type) {
+        case "IfStatement":
+        case "ConditionalExpression":
+        case "LogicalExpression":
+            state.popChoiceContext();
+            break;
+
+        case "SwitchStatement":
+            state.popSwitchContext();
+            break;
+
+        case "SwitchCase":
+
+            /*
+             * This is the same as the process at the 1st `consequent` node in
+             * `preprocess` function.
+             * Must do if this `consequent` is empty.
+             */
+            if (node.consequent.length === 0) {
+                state.makeSwitchCaseBody(true, !node.test);
+            }
+            if (state.forkContext.reachable) {
+                dontForward = true;
+            }
+            break;
+
+        case "TryStatement":
+            state.popTryContext();
+            break;
+
+        case "BreakStatement":
+            forwardCurrentToHead(analyzer, node);
+            state.makeBreak(node.label && node.label.name);
+            dontForward = true;
+            break;
+
+        case "ContinueStatement":
+            forwardCurrentToHead(analyzer, node);
+            state.makeContinue(node.label && node.label.name);
+            dontForward = true;
+            break;
+
+        case "ReturnStatement":
+            forwardCurrentToHead(analyzer, node);
+            state.makeReturn();
+            dontForward = true;
+            break;
+
+        case "ThrowStatement":
+            forwardCurrentToHead(analyzer, node);
+            state.makeThrow();
+            dontForward = true;
+            break;
+
+        case "Identifier":
+            if (isIdentifierReference(node)) {
+                state.makeFirstThrowablePathInTryBlock();
+                dontForward = true;
+            }
+            break;
+
+        case "CallExpression":
+        case "MemberExpression":
+        case "NewExpression":
+            state.makeFirstThrowablePathInTryBlock();
+            break;
+
+        case "WhileStatement":
+        case "DoWhileStatement":
+        case "ForStatement":
+        case "ForInStatement":
+        case "ForOfStatement":
+            state.popLoopContext();
+            break;
+
+        case "AssignmentPattern":
+            state.popForkContext();
+            break;
+
+        case "LabeledStatement":
+            if (!astUtils.isBreakableStatement(node.body)) {
+                state.popBreakContext();
+            }
+            break;
+
+        default:
+            break;
+    }
+
+    // Emits onCodePathSegmentStart events if updated.
+    if (!dontForward) {
+        forwardCurrentToHead(analyzer, node);
+    }
+    debug.dumpState(node, state, true);
+}
+
+/**
+ * Updates the code path to finalize the current code path.
+ *
+ * @param {CodePathAnalyzer} analyzer - The instance.
+ * @param {ASTNode} node - The current AST node.
+ * @returns {void}
+ */
+function postprocess(analyzer, node) {
+    switch (node.type) {
+        case "Program":
+        case "FunctionDeclaration":
+        case "FunctionExpression":
+        case "ArrowFunctionExpression": {
+            let codePath = analyzer.codePath;
+
+            // Mark the current path as the final node.
+            CodePath.getState(codePath).makeFinal();
+
+            // Emits onCodePathSegmentEnd event of the current segments.
+            leaveFromCurrentSegment(analyzer, node);
+
+            // Emits onCodePathEnd event of this code path.
+            debug.dump(`onCodePathEnd ${codePath.id}`);
+            analyzer.emitter.emit("onCodePathEnd", codePath, node);
+            debug.dumpDot(codePath);
+
+            codePath = analyzer.codePath = analyzer.codePath.upper;
+            if (codePath) {
+                debug.dumpState(node, CodePath.getState(codePath), true);
+            }
+            break;
+        }
+
+        default:
+            break;
+    }
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/**
+ * The class to analyze code paths.
+ * This class implements the EventGenerator interface.
+ */
+class CodePathAnalyzer {
+
+    /**
+     * @param {EventGenerator} eventGenerator - An event generator to wrap.
+     */
+    constructor(eventGenerator) {
+        this.original = eventGenerator;
+        this.emitter = eventGenerator.emitter;
+        this.codePath = null;
+        this.idGenerator = new IdGenerator("s");
+        this.currentNode = null;
+        this.onLooped = this.onLooped.bind(this);
+    }
+
+    /**
+     * Does the process to enter a given AST node.
+     * This updates state of analysis and calls `enterNode` of the wrapped.
+     *
+     * @param {ASTNode} node - A node which is entering.
+     * @returns {void}
+     */
+    enterNode(node) {
+        this.currentNode = node;
+
+        // Updates the code path due to node's position in its parent node.
+        if (node.parent) {
+            preprocess(this, node);
+        }
+
+        /*
+         * Updates the code path.
+         * And emits onCodePathStart/onCodePathSegmentStart events.
+         */
+        processCodePathToEnter(this, node);
+
+        // Emits node events.
+        this.original.enterNode(node);
+
+        this.currentNode = null;
+    }
+
+    /**
+     * Does the process to leave a given AST node.
+     * This updates state of analysis and calls `leaveNode` of the wrapped.
+     *
+     * @param {ASTNode} node - A node which is leaving.
+     * @returns {void}
+     */
+    leaveNode(node) {
+        this.currentNode = node;
+
+        /*
+         * Updates the code path.
+         * And emits onCodePathStart/onCodePathSegmentStart events.
+         */
+        processCodePathToExit(this, node);
+
+        // Emits node events.
+        this.original.leaveNode(node);
+
+        // Emits the last onCodePathStart/onCodePathSegmentStart events.
+        postprocess(this, node);
+
+        this.currentNode = null;
+    }
+
+    /**
+     * This is called on a code path looped.
+     * Then this raises a looped event.
+     *
+     * @param {CodePathSegment} fromSegment - A segment of prev.
+     * @param {CodePathSegment} toSegment - A segment of next.
+     * @returns {void}
+     */
+    onLooped(fromSegment, toSegment) {
+        if (fromSegment.reachable && toSegment.reachable) {
+            debug.dump(`onCodePathSegmentLoop ${fromSegment.id} -> ${toSegment.id}`);
+            this.emitter.emit(
+                "onCodePathSegmentLoop",
+                fromSegment,
+                toSegment,
+                this.currentNode
+            );
+        }
+    }
+}
+
+module.exports = CodePathAnalyzer;
diff --git a/node_modules/eslint/lib/code-path-analysis/code-path-segment.js b/node_modules/eslint/lib/code-path-analysis/code-path-segment.js
new file mode 100644
index 0000000..8145f92
--- /dev/null
+++ b/node_modules/eslint/lib/code-path-analysis/code-path-segment.js
@@ -0,0 +1,245 @@
+/**
+ * @fileoverview A class of the code path segment.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const debug = require("./debug-helpers");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Checks whether or not a given segment is reachable.
+ *
+ * @param {CodePathSegment} segment - A segment to check.
+ * @returns {boolean} `true` if the segment is reachable.
+ */
+function isReachable(segment) {
+    return segment.reachable;
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/**
+ * A code path segment.
+ */
+class CodePathSegment {
+
+    /**
+     * @param {string} id - An identifier.
+     * @param {CodePathSegment[]} allPrevSegments - An array of the previous segments.
+     *   This array includes unreachable segments.
+     * @param {boolean} reachable - A flag which shows this is reachable.
+     */
+    constructor(id, allPrevSegments, reachable) {
+
+        /**
+         * The identifier of this code path.
+         * Rules use it to store additional information of each rule.
+         * @type {string}
+         */
+        this.id = id;
+
+        /**
+         * An array of the next segments.
+         * @type {CodePathSegment[]}
+         */
+        this.nextSegments = [];
+
+        /**
+         * An array of the previous segments.
+         * @type {CodePathSegment[]}
+         */
+        this.prevSegments = allPrevSegments.filter(isReachable);
+
+        /**
+         * An array of the next segments.
+         * This array includes unreachable segments.
+         * @type {CodePathSegment[]}
+         */
+        this.allNextSegments = [];
+
+        /**
+         * An array of the previous segments.
+         * This array includes unreachable segments.
+         * @type {CodePathSegment[]}
+         */
+        this.allPrevSegments = allPrevSegments;
+
+        /**
+         * A flag which shows this is reachable.
+         * @type {boolean}
+         */
+        this.reachable = reachable;
+
+        // Internal data.
+        Object.defineProperty(this, "internal", {
+            value: {
+                used: false,
+                loopedPrevSegments: []
+            }
+        });
+
+        /* istanbul ignore if */
+        if (debug.enabled) {
+            this.internal.nodes = [];
+            this.internal.exitNodes = [];
+        }
+    }
+
+    /**
+     * Checks a given previous segment is coming from the end of a loop.
+     *
+     * @param {CodePathSegment} segment - A previous segment to check.
+     * @returns {boolean} `true` if the segment is coming from the end of a loop.
+     */
+    isLoopedPrevSegment(segment) {
+        return this.internal.loopedPrevSegments.indexOf(segment) !== -1;
+    }
+
+    /**
+     * Creates the root segment.
+     *
+     * @param {string} id - An identifier.
+     * @returns {CodePathSegment} The created segment.
+     */
+    static newRoot(id) {
+        return new CodePathSegment(id, [], true);
+    }
+
+    /**
+     * Creates a segment that follows given segments.
+     *
+     * @param {string} id - An identifier.
+     * @param {CodePathSegment[]} allPrevSegments - An array of the previous segments.
+     * @returns {CodePathSegment} The created segment.
+     */
+    static newNext(id, allPrevSegments) {
+        return new CodePathSegment(
+            id,
+            CodePathSegment.flattenUnusedSegments(allPrevSegments),
+            allPrevSegments.some(isReachable)
+        );
+    }
+
+    /**
+     * Creates an unreachable segment that follows given segments.
+     *
+     * @param {string} id - An identifier.
+     * @param {CodePathSegment[]} allPrevSegments - An array of the previous segments.
+     * @returns {CodePathSegment} The created segment.
+     */
+    static newUnreachable(id, allPrevSegments) {
+        const segment = new CodePathSegment(id, CodePathSegment.flattenUnusedSegments(allPrevSegments), false);
+
+        /*
+         * In `if (a) return a; foo();` case, the unreachable segment preceded by
+         * the return statement is not used but must not be remove.
+         */
+        CodePathSegment.markUsed(segment);
+
+        return segment;
+    }
+
+    /**
+     * Creates a segment that follows given segments.
+     * This factory method does not connect with `allPrevSegments`.
+     * But this inherits `reachable` flag.
+     *
+     * @param {string} id - An identifier.
+     * @param {CodePathSegment[]} allPrevSegments - An array of the previous segments.
+     * @returns {CodePathSegment} The created segment.
+     */
+    static newDisconnected(id, allPrevSegments) {
+        return new CodePathSegment(id, [], allPrevSegments.some(isReachable));
+    }
+
+    /**
+     * Makes a given segment being used.
+     *
+     * And this function registers the segment into the previous segments as a next.
+     *
+     * @param {CodePathSegment} segment - A segment to mark.
+     * @returns {void}
+     */
+    static markUsed(segment) {
+        if (segment.internal.used) {
+            return;
+        }
+        segment.internal.used = true;
+
+        let i;
+
+        if (segment.reachable) {
+            for (i = 0; i < segment.allPrevSegments.length; ++i) {
+                const prevSegment = segment.allPrevSegments[i];
+
+                prevSegment.allNextSegments.push(segment);
+                prevSegment.nextSegments.push(segment);
+            }
+        } else {
+            for (i = 0; i < segment.allPrevSegments.length; ++i) {
+                segment.allPrevSegments[i].allNextSegments.push(segment);
+            }
+        }
+    }
+
+    /**
+     * Marks a previous segment as looped.
+     *
+     * @param {CodePathSegment} segment - A segment.
+     * @param {CodePathSegment} prevSegment - A previous segment to mark.
+     * @returns {void}
+     */
+    static markPrevSegmentAsLooped(segment, prevSegment) {
+        segment.internal.loopedPrevSegments.push(prevSegment);
+    }
+
+    /**
+     * Replaces unused segments with the previous segments of each unused segment.
+     *
+     * @param {CodePathSegment[]} segments - An array of segments to replace.
+     * @returns {CodePathSegment[]} The replaced array.
+     */
+    static flattenUnusedSegments(segments) {
+        const done = Object.create(null);
+        const retv = [];
+
+        for (let i = 0; i < segments.length; ++i) {
+            const segment = segments[i];
+
+            // Ignores duplicated.
+            if (done[segment.id]) {
+                continue;
+            }
+
+            // Use previous segments if unused.
+            if (!segment.internal.used) {
+                for (let j = 0; j < segment.allPrevSegments.length; ++j) {
+                    const prevSegment = segment.allPrevSegments[j];
+
+                    if (!done[prevSegment.id]) {
+                        done[prevSegment.id] = true;
+                        retv.push(prevSegment);
+                    }
+                }
+            } else {
+                done[segment.id] = true;
+                retv.push(segment);
+            }
+        }
+
+        return retv;
+    }
+}
+
+module.exports = CodePathSegment;
diff --git a/node_modules/eslint/lib/code-path-analysis/code-path-state.js b/node_modules/eslint/lib/code-path-analysis/code-path-state.js
new file mode 100644
index 0000000..0c31e20
--- /dev/null
+++ b/node_modules/eslint/lib/code-path-analysis/code-path-state.js
@@ -0,0 +1,1440 @@
+/**
+ * @fileoverview A class to manage state of generating a code path.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const CodePathSegment = require("./code-path-segment"),
+    ForkContext = require("./fork-context");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Adds given segments into the `dest` array.
+ * If the `others` array does not includes the given segments, adds to the `all`
+ * array as well.
+ *
+ * This adds only reachable and used segments.
+ *
+ * @param {CodePathSegment[]} dest - A destination array (`returnedSegments` or `thrownSegments`).
+ * @param {CodePathSegment[]} others - Another destination array (`returnedSegments` or `thrownSegments`).
+ * @param {CodePathSegment[]} all - The unified destination array (`finalSegments`).
+ * @param {CodePathSegment[]} segments - Segments to add.
+ * @returns {void}
+ */
+function addToReturnedOrThrown(dest, others, all, segments) {
+    for (let i = 0; i < segments.length; ++i) {
+        const segment = segments[i];
+
+        dest.push(segment);
+        if (others.indexOf(segment) === -1) {
+            all.push(segment);
+        }
+    }
+}
+
+/**
+ * Gets a loop-context for a `continue` statement.
+ *
+ * @param {CodePathState} state - A state to get.
+ * @param {string} label - The label of a `continue` statement.
+ * @returns {LoopContext} A loop-context for a `continue` statement.
+ */
+function getContinueContext(state, label) {
+    if (!label) {
+        return state.loopContext;
+    }
+
+    let context = state.loopContext;
+
+    while (context) {
+        if (context.label === label) {
+            return context;
+        }
+        context = context.upper;
+    }
+
+    /* istanbul ignore next: foolproof (syntax error) */
+    return null;
+}
+
+/**
+ * Gets a context for a `break` statement.
+ *
+ * @param {CodePathState} state - A state to get.
+ * @param {string} label - The label of a `break` statement.
+ * @returns {LoopContext|SwitchContext} A context for a `break` statement.
+ */
+function getBreakContext(state, label) {
+    let context = state.breakContext;
+
+    while (context) {
+        if (label ? context.label === label : context.breakable) {
+            return context;
+        }
+        context = context.upper;
+    }
+
+    /* istanbul ignore next: foolproof (syntax error) */
+    return null;
+}
+
+/**
+ * Gets a context for a `return` statement.
+ *
+ * @param {CodePathState} state - A state to get.
+ * @returns {TryContext|CodePathState} A context for a `return` statement.
+ */
+function getReturnContext(state) {
+    let context = state.tryContext;
+
+    while (context) {
+        if (context.hasFinalizer && context.position !== "finally") {
+            return context;
+        }
+        context = context.upper;
+    }
+
+    return state;
+}
+
+/**
+ * Gets a context for a `throw` statement.
+ *
+ * @param {CodePathState} state - A state to get.
+ * @returns {TryContext|CodePathState} A context for a `throw` statement.
+ */
+function getThrowContext(state) {
+    let context = state.tryContext;
+
+    while (context) {
+        if (context.position === "try" ||
+            (context.hasFinalizer && context.position === "catch")
+        ) {
+            return context;
+        }
+        context = context.upper;
+    }
+
+    return state;
+}
+
+/**
+ * Removes a given element from a given array.
+ *
+ * @param {any[]} xs - An array to remove the specific element.
+ * @param {any} x - An element to be removed.
+ * @returns {void}
+ */
+function remove(xs, x) {
+    xs.splice(xs.indexOf(x), 1);
+}
+
+/**
+ * Disconnect given segments.
+ *
+ * This is used in a process for switch statements.
+ * If there is the "default" chunk before other cases, the order is different
+ * between node's and running's.
+ *
+ * @param {CodePathSegment[]} prevSegments - Forward segments to disconnect.
+ * @param {CodePathSegment[]} nextSegments - Backward segments to disconnect.
+ * @returns {void}
+ */
+function removeConnection(prevSegments, nextSegments) {
+    for (let i = 0; i < prevSegments.length; ++i) {
+        const prevSegment = prevSegments[i];
+        const nextSegment = nextSegments[i];
+
+        remove(prevSegment.nextSegments, nextSegment);
+        remove(prevSegment.allNextSegments, nextSegment);
+        remove(nextSegment.prevSegments, prevSegment);
+        remove(nextSegment.allPrevSegments, prevSegment);
+    }
+}
+
+/**
+ * Creates looping path.
+ *
+ * @param {CodePathState} state - The instance.
+ * @param {CodePathSegment[]} fromSegments - Segments which are source.
+ * @param {CodePathSegment[]} toSegments - Segments which are destination.
+ * @returns {void}
+ */
+function makeLooped(state, fromSegments, toSegments) {
+    fromSegments = CodePathSegment.flattenUnusedSegments(fromSegments);
+    toSegments = CodePathSegment.flattenUnusedSegments(toSegments);
+
+    const end = Math.min(fromSegments.length, toSegments.length);
+
+    for (let i = 0; i < end; ++i) {
+        const fromSegment = fromSegments[i];
+        const toSegment = toSegments[i];
+
+        if (toSegment.reachable) {
+            fromSegment.nextSegments.push(toSegment);
+        }
+        if (fromSegment.reachable) {
+            toSegment.prevSegments.push(fromSegment);
+        }
+        fromSegment.allNextSegments.push(toSegment);
+        toSegment.allPrevSegments.push(fromSegment);
+
+        if (toSegment.allPrevSegments.length >= 2) {
+            CodePathSegment.markPrevSegmentAsLooped(toSegment, fromSegment);
+        }
+
+        state.notifyLooped(fromSegment, toSegment);
+    }
+}
+
+/**
+ * Finalizes segments of `test` chunk of a ForStatement.
+ *
+ * - Adds `false` paths to paths which are leaving from the loop.
+ * - Sets `true` paths to paths which go to the body.
+ *
+ * @param {LoopContext} context - A loop context to modify.
+ * @param {ChoiceContext} choiceContext - A choice context of this loop.
+ * @param {CodePathSegment[]} head - The current head paths.
+ * @returns {void}
+ */
+function finalizeTestSegmentsOfFor(context, choiceContext, head) {
+    if (!choiceContext.processed) {
+        choiceContext.trueForkContext.add(head);
+        choiceContext.falseForkContext.add(head);
+    }
+
+    if (context.test !== true) {
+        context.brokenForkContext.addAll(choiceContext.falseForkContext);
+    }
+    context.endOfTestSegments = choiceContext.trueForkContext.makeNext(0, -1);
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/**
+ * A class which manages state to analyze code paths.
+ */
+class CodePathState {
+
+    /**
+     * @param {IdGenerator} idGenerator - An id generator to generate id for code
+     *   path segments.
+     * @param {Function} onLooped - A callback function to notify looping.
+     */
+    constructor(idGenerator, onLooped) {
+        this.idGenerator = idGenerator;
+        this.notifyLooped = onLooped;
+        this.forkContext = ForkContext.newRoot(idGenerator);
+        this.choiceContext = null;
+        this.switchContext = null;
+        this.tryContext = null;
+        this.loopContext = null;
+        this.breakContext = null;
+
+        this.currentSegments = [];
+        this.initialSegment = this.forkContext.head[0];
+
+        // returnedSegments and thrownSegments push elements into finalSegments also.
+        const final = this.finalSegments = [];
+        const returned = this.returnedForkContext = [];
+        const thrown = this.thrownForkContext = [];
+
+        returned.add = addToReturnedOrThrown.bind(null, returned, thrown, final);
+        thrown.add = addToReturnedOrThrown.bind(null, thrown, returned, final);
+    }
+
+    /**
+     * The head segments.
+     * @type {CodePathSegment[]}
+     */
+    get headSegments() {
+        return this.forkContext.head;
+    }
+
+    /**
+     * The parent forking context.
+     * This is used for the root of new forks.
+     * @type {ForkContext}
+     */
+    get parentForkContext() {
+        const current = this.forkContext;
+
+        return current && current.upper;
+    }
+
+    /**
+     * Creates and stacks new forking context.
+     *
+     * @param {boolean} forkLeavingPath - A flag which shows being in a
+     *   "finally" block.
+     * @returns {ForkContext} The created context.
+     */
+    pushForkContext(forkLeavingPath) {
+        this.forkContext = ForkContext.newEmpty(
+            this.forkContext,
+            forkLeavingPath
+        );
+
+        return this.forkContext;
+    }
+
+    /**
+     * Pops and merges the last forking context.
+     * @returns {ForkContext} The last context.
+     */
+    popForkContext() {
+        const lastContext = this.forkContext;
+
+        this.forkContext = lastContext.upper;
+        this.forkContext.replaceHead(lastContext.makeNext(0, -1));
+
+        return lastContext;
+    }
+
+    /**
+     * Creates a new path.
+     * @returns {void}
+     */
+    forkPath() {
+        this.forkContext.add(this.parentForkContext.makeNext(-1, -1));
+    }
+
+    /**
+     * Creates a bypass path.
+     * This is used for such as IfStatement which does not have "else" chunk.
+     *
+     * @returns {void}
+     */
+    forkBypassPath() {
+        this.forkContext.add(this.parentForkContext.head);
+    }
+
+    //--------------------------------------------------------------------------
+    // ConditionalExpression, LogicalExpression, IfStatement
+    //--------------------------------------------------------------------------
+
+    /**
+     * Creates a context for ConditionalExpression, LogicalExpression,
+     * IfStatement, WhileStatement, DoWhileStatement, or ForStatement.
+     *
+     * LogicalExpressions have cases that it goes different paths between the
+     * `true` case and the `false` case.
+     *
+     * For Example:
+     *
+     *     if (a || b) {
+     *         foo();
+     *     } else {
+     *         bar();
+     *     }
+     *
+     * In this case, `b` is evaluated always in the code path of the `else`
+     * block, but it's not so in the code path of the `if` block.
+     * So there are 3 paths.
+     *
+     *     a -> foo();
+     *     a -> b -> foo();
+     *     a -> b -> bar();
+     *
+     * @param {string} kind - A kind string.
+     *   If the new context is LogicalExpression's, this is `"&&"` or `"||"`.
+     *   If it's IfStatement's or ConditionalExpression's, this is `"test"`.
+     *   Otherwise, this is `"loop"`.
+     * @param {boolean} isForkingAsResult - A flag that shows that goes different
+     *   paths between `true` and `false`.
+     * @returns {void}
+     */
+    pushChoiceContext(kind, isForkingAsResult) {
+        this.choiceContext = {
+            upper: this.choiceContext,
+            kind,
+            isForkingAsResult,
+            trueForkContext: ForkContext.newEmpty(this.forkContext),
+            falseForkContext: ForkContext.newEmpty(this.forkContext),
+            processed: false
+        };
+    }
+
+    /**
+     * Pops the last choice context and finalizes it.
+     *
+     * @returns {ChoiceContext} The popped context.
+     */
+    popChoiceContext() {
+        const context = this.choiceContext;
+
+        this.choiceContext = context.upper;
+
+        const forkContext = this.forkContext;
+        const headSegments = forkContext.head;
+
+        switch (context.kind) {
+            case "&&":
+            case "||":
+
+                /*
+                 * If any result were not transferred from child contexts,
+                 * this sets the head segments to both cases.
+                 * The head segments are the path of the right-hand operand.
+                 */
+                if (!context.processed) {
+                    context.trueForkContext.add(headSegments);
+                    context.falseForkContext.add(headSegments);
+                }
+
+                /*
+                 * Transfers results to upper context if this context is in
+                 * test chunk.
+                 */
+                if (context.isForkingAsResult) {
+                    const parentContext = this.choiceContext;
+
+                    parentContext.trueForkContext.addAll(context.trueForkContext);
+                    parentContext.falseForkContext.addAll(context.falseForkContext);
+                    parentContext.processed = true;
+
+                    return context;
+                }
+
+                break;
+
+            case "test":
+                if (!context.processed) {
+
+                    /*
+                     * The head segments are the path of the `if` block here.
+                     * Updates the `true` path with the end of the `if` block.
+                     */
+                    context.trueForkContext.clear();
+                    context.trueForkContext.add(headSegments);
+                } else {
+
+                    /*
+                     * The head segments are the path of the `else` block here.
+                     * Updates the `false` path with the end of the `else`
+                     * block.
+                     */
+                    context.falseForkContext.clear();
+                    context.falseForkContext.add(headSegments);
+                }
+
+                break;
+
+            case "loop":
+
+                /*
+                 * Loops are addressed in popLoopContext().
+                 * This is called from popLoopContext().
+                 */
+                return context;
+
+            /* istanbul ignore next */
+            default:
+                throw new Error("unreachable");
+        }
+
+        // Merges all paths.
+        const prevForkContext = context.trueForkContext;
+
+        prevForkContext.addAll(context.falseForkContext);
+        forkContext.replaceHead(prevForkContext.makeNext(0, -1));
+
+        return context;
+    }
+
+    /**
+     * Makes a code path segment of the right-hand operand of a logical
+     * expression.
+     *
+     * @returns {void}
+     */
+    makeLogicalRight() {
+        const context = this.choiceContext;
+        const forkContext = this.forkContext;
+
+        if (context.processed) {
+
+            /*
+             * This got segments already from the child choice context.
+             * Creates the next path from own true/false fork context.
+             */
+            const prevForkContext =
+                context.kind === "&&" ? context.trueForkContext
+                /* kind === "||" */ : context.falseForkContext;
+
+            forkContext.replaceHead(prevForkContext.makeNext(0, -1));
+            prevForkContext.clear();
+
+            context.processed = false;
+        } else {
+
+            /*
+             * This did not get segments from the child choice context.
+             * So addresses the head segments.
+             * The head segments are the path of the left-hand operand.
+             */
+            if (context.kind === "&&") {
+
+                // The path does short-circuit if false.
+                context.falseForkContext.add(forkContext.head);
+            } else {
+
+                // The path does short-circuit if true.
+                context.trueForkContext.add(forkContext.head);
+            }
+
+            forkContext.replaceHead(forkContext.makeNext(-1, -1));
+        }
+    }
+
+    /**
+     * Makes a code path segment of the `if` block.
+     *
+     * @returns {void}
+     */
+    makeIfConsequent() {
+        const context = this.choiceContext;
+        const forkContext = this.forkContext;
+
+        /*
+         * If any result were not transferred from child contexts,
+         * this sets the head segments to both cases.
+         * The head segments are the path of the test expression.
+         */
+        if (!context.processed) {
+            context.trueForkContext.add(forkContext.head);
+            context.falseForkContext.add(forkContext.head);
+        }
+
+        context.processed = false;
+
+        // Creates new path from the `true` case.
+        forkContext.replaceHead(
+            context.trueForkContext.makeNext(0, -1)
+        );
+    }
+
+    /**
+     * Makes a code path segment of the `else` block.
+     *
+     * @returns {void}
+     */
+    makeIfAlternate() {
+        const context = this.choiceContext;
+        const forkContext = this.forkContext;
+
+        /*
+         * The head segments are the path of the `if` block.
+         * Updates the `true` path with the end of the `if` block.
+         */
+        context.trueForkContext.clear();
+        context.trueForkContext.add(forkContext.head);
+        context.processed = true;
+
+        // Creates new path from the `false` case.
+        forkContext.replaceHead(
+            context.falseForkContext.makeNext(0, -1)
+        );
+    }
+
+    //--------------------------------------------------------------------------
+    // SwitchStatement
+    //--------------------------------------------------------------------------
+
+    /**
+     * Creates a context object of SwitchStatement and stacks it.
+     *
+     * @param {boolean} hasCase - `true` if the switch statement has one or more
+     *   case parts.
+     * @param {string|null} label - The label text.
+     * @returns {void}
+     */
+    pushSwitchContext(hasCase, label) {
+        this.switchContext = {
+            upper: this.switchContext,
+            hasCase,
+            defaultSegments: null,
+            defaultBodySegments: null,
+            foundDefault: false,
+            lastIsDefault: false,
+            countForks: 0
+        };
+
+        this.pushBreakContext(true, label);
+    }
+
+    /**
+     * Pops the last context of SwitchStatement and finalizes it.
+     *
+     * - Disposes all forking stack for `case` and `default`.
+     * - Creates the next code path segment from `context.brokenForkContext`.
+     * - If the last `SwitchCase` node is not a `default` part, creates a path
+     *   to the `default` body.
+     *
+     * @returns {void}
+     */
+    popSwitchContext() {
+        const context = this.switchContext;
+
+        this.switchContext = context.upper;
+
+        const forkContext = this.forkContext;
+        const brokenForkContext = this.popBreakContext().brokenForkContext;
+
+        if (context.countForks === 0) {
+
+            /*
+             * When there is only one `default` chunk and there is one or more
+             * `break` statements, even if forks are nothing, it needs to merge
+             * those.
+             */
+            if (!brokenForkContext.empty) {
+                brokenForkContext.add(forkContext.makeNext(-1, -1));
+                forkContext.replaceHead(brokenForkContext.makeNext(0, -1));
+            }
+
+            return;
+        }
+
+        const lastSegments = forkContext.head;
+
+        this.forkBypassPath();
+        const lastCaseSegments = forkContext.head;
+
+        /*
+         * `brokenForkContext` is used to make the next segment.
+         * It must add the last segment into `brokenForkContext`.
+         */
+        brokenForkContext.add(lastSegments);
+
+        /*
+         * A path which is failed in all case test should be connected to path
+         * of `default` chunk.
+         */
+        if (!context.lastIsDefault) {
+            if (context.defaultBodySegments) {
+
+                /*
+                 * Remove a link from `default` label to its chunk.
+                 * It's false route.
+                 */
+                removeConnection(context.defaultSegments, context.defaultBodySegments);
+                makeLooped(this, lastCaseSegments, context.defaultBodySegments);
+            } else {
+
+                /*
+                 * It handles the last case body as broken if `default` chunk
+                 * does not exist.
+                 */
+                brokenForkContext.add(lastCaseSegments);
+            }
+        }
+
+        // Pops the segment context stack until the entry segment.
+        for (let i = 0; i < context.countForks; ++i) {
+            this.forkContext = this.forkContext.upper;
+        }
+
+        /*
+         * Creates a path from all brokenForkContext paths.
+         * This is a path after switch statement.
+         */
+        this.forkContext.replaceHead(brokenForkContext.makeNext(0, -1));
+    }
+
+    /**
+     * Makes a code path segment for a `SwitchCase` node.
+     *
+     * @param {boolean} isEmpty - `true` if the body is empty.
+     * @param {boolean} isDefault - `true` if the body is the default case.
+     * @returns {void}
+     */
+    makeSwitchCaseBody(isEmpty, isDefault) {
+        const context = this.switchContext;
+
+        if (!context.hasCase) {
+            return;
+        }
+
+        /*
+         * Merge forks.
+         * The parent fork context has two segments.
+         * Those are from the current case and the body of the previous case.
+         */
+        const parentForkContext = this.forkContext;
+        const forkContext = this.pushForkContext();
+
+        forkContext.add(parentForkContext.makeNext(0, -1));
+
+        /*
+         * Save `default` chunk info.
+         * If the `default` label is not at the last, we must make a path from
+         * the last `case` to the `default` chunk.
+         */
+        if (isDefault) {
+            context.defaultSegments = parentForkContext.head;
+            if (isEmpty) {
+                context.foundDefault = true;
+            } else {
+                context.defaultBodySegments = forkContext.head;
+            }
+        } else {
+            if (!isEmpty && context.foundDefault) {
+                context.foundDefault = false;
+                context.defaultBodySegments = forkContext.head;
+            }
+        }
+
+        context.lastIsDefault = isDefault;
+        context.countForks += 1;
+    }
+
+    //--------------------------------------------------------------------------
+    // TryStatement
+    //--------------------------------------------------------------------------
+
+    /**
+     * Creates a context object of TryStatement and stacks it.
+     *
+     * @param {boolean} hasFinalizer - `true` if the try statement has a
+     *   `finally` block.
+     * @returns {void}
+     */
+    pushTryContext(hasFinalizer) {
+        this.tryContext = {
+            upper: this.tryContext,
+            position: "try",
+            hasFinalizer,
+
+            returnedForkContext: hasFinalizer
+                ? ForkContext.newEmpty(this.forkContext)
+                : null,
+
+            thrownForkContext: ForkContext.newEmpty(this.forkContext),
+            lastOfTryIsReachable: false,
+            lastOfCatchIsReachable: false
+        };
+    }
+
+    /**
+     * Pops the last context of TryStatement and finalizes it.
+     *
+     * @returns {void}
+     */
+    popTryContext() {
+        const context = this.tryContext;
+
+        this.tryContext = context.upper;
+
+        if (context.position === "catch") {
+
+            // Merges two paths from the `try` block and `catch` block merely.
+            this.popForkContext();
+            return;
+        }
+
+        /*
+         * The following process is executed only when there is the `finally`
+         * block.
+         */
+
+        const returned = context.returnedForkContext;
+        const thrown = context.thrownForkContext;
+
+        if (returned.empty && thrown.empty) {
+            return;
+        }
+
+        // Separate head to normal paths and leaving paths.
+        const headSegments = this.forkContext.head;
+
+        this.forkContext = this.forkContext.upper;
+        const normalSegments = headSegments.slice(0, headSegments.length / 2 | 0);
+        const leavingSegments = headSegments.slice(headSegments.length / 2 | 0);
+
+        // Forwards the leaving path to upper contexts.
+        if (!returned.empty) {
+            getReturnContext(this).returnedForkContext.add(leavingSegments);
+        }
+        if (!thrown.empty) {
+            getThrowContext(this).thrownForkContext.add(leavingSegments);
+        }
+
+        // Sets the normal path as the next.
+        this.forkContext.replaceHead(normalSegments);
+
+        /*
+         * If both paths of the `try` block and the `catch` block are
+         * unreachable, the next path becomes unreachable as well.
+         */
+        if (!context.lastOfTryIsReachable && !context.lastOfCatchIsReachable) {
+            this.forkContext.makeUnreachable();
+        }
+    }
+
+    /**
+     * Makes a code path segment for a `catch` block.
+     *
+     * @returns {void}
+     */
+    makeCatchBlock() {
+        const context = this.tryContext;
+        const forkContext = this.forkContext;
+        const thrown = context.thrownForkContext;
+
+        // Update state.
+        context.position = "catch";
+        context.thrownForkContext = ForkContext.newEmpty(forkContext);
+        context.lastOfTryIsReachable = forkContext.reachable;
+
+        // Merge thrown paths.
+        thrown.add(forkContext.head);
+        const thrownSegments = thrown.makeNext(0, -1);
+
+        // Fork to a bypass and the merged thrown path.
+        this.pushForkContext();
+        this.forkBypassPath();
+        this.forkContext.add(thrownSegments);
+    }
+
+    /**
+     * Makes a code path segment for a `finally` block.
+     *
+     * In the `finally` block, parallel paths are created. The parallel paths
+     * are used as leaving-paths. The leaving-paths are paths from `return`
+     * statements and `throw` statements in a `try` block or a `catch` block.
+     *
+     * @returns {void}
+     */
+    makeFinallyBlock() {
+        const context = this.tryContext;
+        let forkContext = this.forkContext;
+        const returned = context.returnedForkContext;
+        const thrown = context.thrownForkContext;
+        const headOfLeavingSegments = forkContext.head;
+
+        // Update state.
+        if (context.position === "catch") {
+
+            // Merges two paths from the `try` block and `catch` block.
+            this.popForkContext();
+            forkContext = this.forkContext;
+
+            context.lastOfCatchIsReachable = forkContext.reachable;
+        } else {
+            context.lastOfTryIsReachable = forkContext.reachable;
+        }
+        context.position = "finally";
+
+        if (returned.empty && thrown.empty) {
+
+            // This path does not leave.
+            return;
+        }
+
+        /*
+         * Create a parallel segment from merging returned and thrown.
+         * This segment will leave at the end of this finally block.
+         */
+        const segments = forkContext.makeNext(-1, -1);
+
+        for (let i = 0; i < forkContext.count; ++i) {
+            const prevSegsOfLeavingSegment = [headOfLeavingSegments[i]];
+
+            for (let j = 0; j < returned.segmentsList.length; ++j) {
+                prevSegsOfLeavingSegment.push(returned.segmentsList[j][i]);
+            }
+            for (let j = 0; j < thrown.segmentsList.length; ++j) {
+                prevSegsOfLeavingSegment.push(thrown.segmentsList[j][i]);
+            }
+
+            segments.push(
+                CodePathSegment.newNext(
+                    this.idGenerator.next(),
+                    prevSegsOfLeavingSegment
+                )
+            );
+        }
+
+        this.pushForkContext(true);
+        this.forkContext.add(segments);
+    }
+
+    /**
+     * Makes a code path segment from the first throwable node to the `catch`
+     * block or the `finally` block.
+     *
+     * @returns {void}
+     */
+    makeFirstThrowablePathInTryBlock() {
+        const forkContext = this.forkContext;
+
+        if (!forkContext.reachable) {
+            return;
+        }
+
+        const context = getThrowContext(this);
+
+        if (context === this ||
+            context.position !== "try" ||
+            !context.thrownForkContext.empty
+        ) {
+            return;
+        }
+
+        context.thrownForkContext.add(forkContext.head);
+        forkContext.replaceHead(forkContext.makeNext(-1, -1));
+    }
+
+    //--------------------------------------------------------------------------
+    // Loop Statements
+    //--------------------------------------------------------------------------
+
+    /**
+     * Creates a context object of a loop statement and stacks it.
+     *
+     * @param {string} type - The type of the node which was triggered. One of
+     *   `WhileStatement`, `DoWhileStatement`, `ForStatement`, `ForInStatement`,
+     *   and `ForStatement`.
+     * @param {string|null} label - A label of the node which was triggered.
+     * @returns {void}
+     */
+    pushLoopContext(type, label) {
+        const forkContext = this.forkContext;
+        const breakContext = this.pushBreakContext(true, label);
+
+        switch (type) {
+            case "WhileStatement":
+                this.pushChoiceContext("loop", false);
+                this.loopContext = {
+                    upper: this.loopContext,
+                    type,
+                    label,
+                    test: void 0,
+                    continueDestSegments: null,
+                    brokenForkContext: breakContext.brokenForkContext
+                };
+                break;
+
+            case "DoWhileStatement":
+                this.pushChoiceContext("loop", false);
+                this.loopContext = {
+                    upper: this.loopContext,
+                    type,
+                    label,
+                    test: void 0,
+                    entrySegments: null,
+                    continueForkContext: ForkContext.newEmpty(forkContext),
+                    brokenForkContext: breakContext.brokenForkContext
+                };
+                break;
+
+            case "ForStatement":
+                this.pushChoiceContext("loop", false);
+                this.loopContext = {
+                    upper: this.loopContext,
+                    type,
+                    label,
+                    test: void 0,
+                    endOfInitSegments: null,
+                    testSegments: null,
+                    endOfTestSegments: null,
+                    updateSegments: null,
+                    endOfUpdateSegments: null,
+                    continueDestSegments: null,
+                    brokenForkContext: breakContext.brokenForkContext
+                };
+                break;
+
+            case "ForInStatement":
+            case "ForOfStatement":
+                this.loopContext = {
+                    upper: this.loopContext,
+                    type,
+                    label,
+                    prevSegments: null,
+                    leftSegments: null,
+                    endOfLeftSegments: null,
+                    continueDestSegments: null,
+                    brokenForkContext: breakContext.brokenForkContext
+                };
+                break;
+
+            /* istanbul ignore next */
+            default:
+                throw new Error(`unknown type: "${type}"`);
+        }
+    }
+
+    /**
+     * Pops the last context of a loop statement and finalizes it.
+     *
+     * @returns {void}
+     */
+    popLoopContext() {
+        const context = this.loopContext;
+
+        this.loopContext = context.upper;
+
+        const forkContext = this.forkContext;
+        const brokenForkContext = this.popBreakContext().brokenForkContext;
+
+        // Creates a looped path.
+        switch (context.type) {
+            case "WhileStatement":
+            case "ForStatement":
+                this.popChoiceContext();
+                makeLooped(
+                    this,
+                    forkContext.head,
+                    context.continueDestSegments
+                );
+                break;
+
+            case "DoWhileStatement": {
+                const choiceContext = this.popChoiceContext();
+
+                if (!choiceContext.processed) {
+                    choiceContext.trueForkContext.add(forkContext.head);
+                    choiceContext.falseForkContext.add(forkContext.head);
+                }
+                if (context.test !== true) {
+                    brokenForkContext.addAll(choiceContext.falseForkContext);
+                }
+
+                // `true` paths go to looping.
+                const segmentsList = choiceContext.trueForkContext.segmentsList;
+
+                for (let i = 0; i < segmentsList.length; ++i) {
+                    makeLooped(
+                        this,
+                        segmentsList[i],
+                        context.entrySegments
+                    );
+                }
+                break;
+            }
+
+            case "ForInStatement":
+            case "ForOfStatement":
+                brokenForkContext.add(forkContext.head);
+                makeLooped(
+                    this,
+                    forkContext.head,
+                    context.leftSegments
+                );
+                break;
+
+            /* istanbul ignore next */
+            default:
+                throw new Error("unreachable");
+        }
+
+        // Go next.
+        if (brokenForkContext.empty) {
+            forkContext.replaceHead(forkContext.makeUnreachable(-1, -1));
+        } else {
+            forkContext.replaceHead(brokenForkContext.makeNext(0, -1));
+        }
+    }
+
+    /**
+     * Makes a code path segment for the test part of a WhileStatement.
+     *
+     * @param {boolean|undefined} test - The test value (only when constant).
+     * @returns {void}
+     */
+    makeWhileTest(test) {
+        const context = this.loopContext;
+        const forkContext = this.forkContext;
+        const testSegments = forkContext.makeNext(0, -1);
+
+        // Update state.
+        context.test = test;
+        context.continueDestSegments = testSegments;
+        forkContext.replaceHead(testSegments);
+    }
+
+    /**
+     * Makes a code path segment for the body part of a WhileStatement.
+     *
+     * @returns {void}
+     */
+    makeWhileBody() {
+        const context = this.loopContext;
+        const choiceContext = this.choiceContext;
+        const forkContext = this.forkContext;
+
+        if (!choiceContext.processed) {
+            choiceContext.trueForkContext.add(forkContext.head);
+            choiceContext.falseForkContext.add(forkContext.head);
+        }
+
+        // Update state.
+        if (context.test !== true) {
+            context.brokenForkContext.addAll(choiceContext.falseForkContext);
+        }
+        forkContext.replaceHead(choiceContext.trueForkContext.makeNext(0, -1));
+    }
+
+    /**
+     * Makes a code path segment for the body part of a DoWhileStatement.
+     *
+     * @returns {void}
+     */
+    makeDoWhileBody() {
+        const context = this.loopContext;
+        const forkContext = this.forkContext;
+        const bodySegments = forkContext.makeNext(-1, -1);
+
+        // Update state.
+        context.entrySegments = bodySegments;
+        forkContext.replaceHead(bodySegments);
+    }
+
+    /**
+     * Makes a code path segment for the test part of a DoWhileStatement.
+     *
+     * @param {boolean|undefined} test - The test value (only when constant).
+     * @returns {void}
+     */
+    makeDoWhileTest(test) {
+        const context = this.loopContext;
+        const forkContext = this.forkContext;
+
+        context.test = test;
+
+        // Creates paths of `continue` statements.
+        if (!context.continueForkContext.empty) {
+            context.continueForkContext.add(forkContext.head);
+            const testSegments = context.continueForkContext.makeNext(0, -1);
+
+            forkContext.replaceHead(testSegments);
+        }
+    }
+
+    /**
+     * Makes a code path segment for the test part of a ForStatement.
+     *
+     * @param {boolean|undefined} test - The test value (only when constant).
+     * @returns {void}
+     */
+    makeForTest(test) {
+        const context = this.loopContext;
+        const forkContext = this.forkContext;
+        const endOfInitSegments = forkContext.head;
+        const testSegments = forkContext.makeNext(-1, -1);
+
+        // Update state.
+        context.test = test;
+        context.endOfInitSegments = endOfInitSegments;
+        context.continueDestSegments = context.testSegments = testSegments;
+        forkContext.replaceHead(testSegments);
+    }
+
+    /**
+     * Makes a code path segment for the update part of a ForStatement.
+     *
+     * @returns {void}
+     */
+    makeForUpdate() {
+        const context = this.loopContext;
+        const choiceContext = this.choiceContext;
+        const forkContext = this.forkContext;
+
+        // Make the next paths of the test.
+        if (context.testSegments) {
+            finalizeTestSegmentsOfFor(
+                context,
+                choiceContext,
+                forkContext.head
+            );
+        } else {
+            context.endOfInitSegments = forkContext.head;
+        }
+
+        // Update state.
+        const updateSegments = forkContext.makeDisconnected(-1, -1);
+
+        context.continueDestSegments = context.updateSegments = updateSegments;
+        forkContext.replaceHead(updateSegments);
+    }
+
+    /**
+     * Makes a code path segment for the body part of a ForStatement.
+     *
+     * @returns {void}
+     */
+    makeForBody() {
+        const context = this.loopContext;
+        const choiceContext = this.choiceContext;
+        const forkContext = this.forkContext;
+
+        // Update state.
+        if (context.updateSegments) {
+            context.endOfUpdateSegments = forkContext.head;
+
+            // `update` -> `test`
+            if (context.testSegments) {
+                makeLooped(
+                    this,
+                    context.endOfUpdateSegments,
+                    context.testSegments
+                );
+            }
+        } else if (context.testSegments) {
+            finalizeTestSegmentsOfFor(
+                context,
+                choiceContext,
+                forkContext.head
+            );
+        } else {
+            context.endOfInitSegments = forkContext.head;
+        }
+
+        let bodySegments = context.endOfTestSegments;
+
+        if (!bodySegments) {
+
+            /*
+             * If there is not the `test` part, the `body` path comes from the
+             * `init` part and the `update` part.
+             */
+            const prevForkContext = ForkContext.newEmpty(forkContext);
+
+            prevForkContext.add(context.endOfInitSegments);
+            if (context.endOfUpdateSegments) {
+                prevForkContext.add(context.endOfUpdateSegments);
+            }
+
+            bodySegments = prevForkContext.makeNext(0, -1);
+        }
+        context.continueDestSegments = context.continueDestSegments || bodySegments;
+        forkContext.replaceHead(bodySegments);
+    }
+
+    /**
+     * Makes a code path segment for the left part of a ForInStatement and a
+     * ForOfStatement.
+     *
+     * @returns {void}
+     */
+    makeForInOfLeft() {
+        const context = this.loopContext;
+        const forkContext = this.forkContext;
+        const leftSegments = forkContext.makeDisconnected(-1, -1);
+
+        // Update state.
+        context.prevSegments = forkContext.head;
+        context.leftSegments = context.continueDestSegments = leftSegments;
+        forkContext.replaceHead(leftSegments);
+    }
+
+    /**
+     * Makes a code path segment for the right part of a ForInStatement and a
+     * ForOfStatement.
+     *
+     * @returns {void}
+     */
+    makeForInOfRight() {
+        const context = this.loopContext;
+        const forkContext = this.forkContext;
+        const temp = ForkContext.newEmpty(forkContext);
+
+        temp.add(context.prevSegments);
+        const rightSegments = temp.makeNext(-1, -1);
+
+        // Update state.
+        context.endOfLeftSegments = forkContext.head;
+        forkContext.replaceHead(rightSegments);
+    }
+
+    /**
+     * Makes a code path segment for the body part of a ForInStatement and a
+     * ForOfStatement.
+     *
+     * @returns {void}
+     */
+    makeForInOfBody() {
+        const context = this.loopContext;
+        const forkContext = this.forkContext;
+        const temp = ForkContext.newEmpty(forkContext);
+
+        temp.add(context.endOfLeftSegments);
+        const bodySegments = temp.makeNext(-1, -1);
+
+        // Make a path: `right` -> `left`.
+        makeLooped(this, forkContext.head, context.leftSegments);
+
+        // Update state.
+        context.brokenForkContext.add(forkContext.head);
+        forkContext.replaceHead(bodySegments);
+    }
+
+    //--------------------------------------------------------------------------
+    // Control Statements
+    //--------------------------------------------------------------------------
+
+    /**
+     * Creates new context for BreakStatement.
+     *
+     * @param {boolean} breakable - The flag to indicate it can break by
+     *      an unlabeled BreakStatement.
+     * @param {string|null} label - The label of this context.
+     * @returns {Object} The new context.
+     */
+    pushBreakContext(breakable, label) {
+        this.breakContext = {
+            upper: this.breakContext,
+            breakable,
+            label,
+            brokenForkContext: ForkContext.newEmpty(this.forkContext)
+        };
+        return this.breakContext;
+    }
+
+    /**
+     * Removes the top item of the break context stack.
+     *
+     * @returns {Object} The removed context.
+     */
+    popBreakContext() {
+        const context = this.breakContext;
+        const forkContext = this.forkContext;
+
+        this.breakContext = context.upper;
+
+        // Process this context here for other than switches and loops.
+        if (!context.breakable) {
+            const brokenForkContext = context.brokenForkContext;
+
+            if (!brokenForkContext.empty) {
+                brokenForkContext.add(forkContext.head);
+                forkContext.replaceHead(brokenForkContext.makeNext(0, -1));
+            }
+        }
+
+        return context;
+    }
+
+    /**
+     * Makes a path for a `break` statement.
+     *
+     * It registers the head segment to a context of `break`.
+     * It makes new unreachable segment, then it set the head with the segment.
+     *
+     * @param {string} label - A label of the break statement.
+     * @returns {void}
+     */
+    makeBreak(label) {
+        const forkContext = this.forkContext;
+
+        if (!forkContext.reachable) {
+            return;
+        }
+
+        const context = getBreakContext(this, label);
+
+        /* istanbul ignore else: foolproof (syntax error) */
+        if (context) {
+            context.brokenForkContext.add(forkContext.head);
+        }
+
+        forkContext.replaceHead(forkContext.makeUnreachable(-1, -1));
+    }
+
+    /**
+     * Makes a path for a `continue` statement.
+     *
+     * It makes a looping path.
+     * It makes new unreachable segment, then it set the head with the segment.
+     *
+     * @param {string} label - A label of the continue statement.
+     * @returns {void}
+     */
+    makeContinue(label) {
+        const forkContext = this.forkContext;
+
+        if (!forkContext.reachable) {
+            return;
+        }
+
+        const context = getContinueContext(this, label);
+
+        /* istanbul ignore else: foolproof (syntax error) */
+        if (context) {
+            if (context.continueDestSegments) {
+                makeLooped(this, forkContext.head, context.continueDestSegments);
+
+                // If the context is a for-in/of loop, this effects a break also.
+                if (context.type === "ForInStatement" ||
+                    context.type === "ForOfStatement"
+                ) {
+                    context.brokenForkContext.add(forkContext.head);
+                }
+            } else {
+                context.continueForkContext.add(forkContext.head);
+            }
+        }
+        forkContext.replaceHead(forkContext.makeUnreachable(-1, -1));
+    }
+
+    /**
+     * Makes a path for a `return` statement.
+     *
+     * It registers the head segment to a context of `return`.
+     * It makes new unreachable segment, then it set the head with the segment.
+     *
+     * @returns {void}
+     */
+    makeReturn() {
+        const forkContext = this.forkContext;
+
+        if (forkContext.reachable) {
+            getReturnContext(this).returnedForkContext.add(forkContext.head);
+            forkContext.replaceHead(forkContext.makeUnreachable(-1, -1));
+        }
+    }
+
+    /**
+     * Makes a path for a `throw` statement.
+     *
+     * It registers the head segment to a context of `throw`.
+     * It makes new unreachable segment, then it set the head with the segment.
+     *
+     * @returns {void}
+     */
+    makeThrow() {
+        const forkContext = this.forkContext;
+
+        if (forkContext.reachable) {
+            getThrowContext(this).thrownForkContext.add(forkContext.head);
+            forkContext.replaceHead(forkContext.makeUnreachable(-1, -1));
+        }
+    }
+
+    /**
+     * Makes the final path.
+     * @returns {void}
+     */
+    makeFinal() {
+        const segments = this.currentSegments;
+
+        if (segments.length > 0 && segments[0].reachable) {
+            this.returnedForkContext.add(segments);
+        }
+    }
+}
+
+module.exports = CodePathState;
diff --git a/node_modules/eslint/lib/code-path-analysis/code-path.js b/node_modules/eslint/lib/code-path-analysis/code-path.js
new file mode 100644
index 0000000..709a111
--- /dev/null
+++ b/node_modules/eslint/lib/code-path-analysis/code-path.js
@@ -0,0 +1,234 @@
+/**
+ * @fileoverview A class of the code path.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const CodePathState = require("./code-path-state");
+const IdGenerator = require("./id-generator");
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/**
+ * A code path.
+ */
+class CodePath {
+
+    /**
+     * @param {string} id - An identifier.
+     * @param {CodePath|null} upper - The code path of the upper function scope.
+     * @param {Function} onLooped - A callback function to notify looping.
+     */
+    constructor(id, upper, onLooped) {
+
+        /**
+         * The identifier of this code path.
+         * Rules use it to store additional information of each rule.
+         * @type {string}
+         */
+        this.id = id;
+
+        /**
+         * The code path of the upper function scope.
+         * @type {CodePath|null}
+         */
+        this.upper = upper;
+
+        /**
+         * The code paths of nested function scopes.
+         * @type {CodePath[]}
+         */
+        this.childCodePaths = [];
+
+        // Initializes internal state.
+        Object.defineProperty(
+            this,
+            "internal",
+            { value: new CodePathState(new IdGenerator(`${id}_`), onLooped) }
+        );
+
+        // Adds this into `childCodePaths` of `upper`.
+        if (upper) {
+            upper.childCodePaths.push(this);
+        }
+    }
+
+    /**
+     * Gets the state of a given code path.
+     *
+     * @param {CodePath} codePath - A code path to get.
+     * @returns {CodePathState} The state of the code path.
+     */
+    static getState(codePath) {
+        return codePath.internal;
+    }
+
+    /**
+     * The initial code path segment.
+     * @type {CodePathSegment}
+     */
+    get initialSegment() {
+        return this.internal.initialSegment;
+    }
+
+    /**
+     * Final code path segments.
+     * This array is a mix of `returnedSegments` and `thrownSegments`.
+     * @type {CodePathSegment[]}
+     */
+    get finalSegments() {
+        return this.internal.finalSegments;
+    }
+
+    /**
+     * Final code path segments which is with `return` statements.
+     * This array contains the last path segment if it's reachable.
+     * Since the reachable last path returns `undefined`.
+     * @type {CodePathSegment[]}
+     */
+    get returnedSegments() {
+        return this.internal.returnedForkContext;
+    }
+
+    /**
+     * Final code path segments which is with `throw` statements.
+     * @type {CodePathSegment[]}
+     */
+    get thrownSegments() {
+        return this.internal.thrownForkContext;
+    }
+
+    /**
+     * Current code path segments.
+     * @type {CodePathSegment[]}
+     */
+    get currentSegments() {
+        return this.internal.currentSegments;
+    }
+
+    /**
+     * Traverses all segments in this code path.
+     *
+     *     codePath.traverseSegments(function(segment, controller) {
+     *         // do something.
+     *     });
+     *
+     * This method enumerates segments in order from the head.
+     *
+     * The `controller` object has two methods.
+     *
+     * - `controller.skip()` - Skip the following segments in this branch.
+     * - `controller.break()` - Skip all following segments.
+     *
+     * @param {Object} [options] - Omittable.
+     * @param {CodePathSegment} [options.first] - The first segment to traverse.
+     * @param {CodePathSegment} [options.last] - The last segment to traverse.
+     * @param {Function} callback - A callback function.
+     * @returns {void}
+     */
+    traverseSegments(options, callback) {
+        if (typeof options === "function") {
+            callback = options;
+            options = null;
+        }
+
+        options = options || {};
+        const startSegment = options.first || this.internal.initialSegment;
+        const lastSegment = options.last;
+
+        let item = null;
+        let index = 0;
+        let end = 0;
+        let segment = null;
+        const visited = Object.create(null);
+        const stack = [[startSegment, 0]];
+        let skippedSegment = null;
+        let broken = false;
+        const controller = {
+            skip() {
+                if (stack.length <= 1) {
+                    broken = true;
+                } else {
+                    skippedSegment = stack[stack.length - 2][0];
+                }
+            },
+            break() {
+                broken = true;
+            }
+        };
+
+        /**
+         * Checks a given previous segment has been visited.
+         * @param {CodePathSegment} prevSegment - A previous segment to check.
+         * @returns {boolean} `true` if the segment has been visited.
+         */
+        function isVisited(prevSegment) {
+            return (
+                visited[prevSegment.id] ||
+                segment.isLoopedPrevSegment(prevSegment)
+            );
+        }
+
+        while (stack.length > 0) {
+            item = stack[stack.length - 1];
+            segment = item[0];
+            index = item[1];
+
+            if (index === 0) {
+
+                // Skip if this segment has been visited already.
+                if (visited[segment.id]) {
+                    stack.pop();
+                    continue;
+                }
+
+                // Skip if all previous segments have not been visited.
+                if (segment !== startSegment &&
+                    segment.prevSegments.length > 0 &&
+                    !segment.prevSegments.every(isVisited)
+                ) {
+                    stack.pop();
+                    continue;
+                }
+
+                // Reset the flag of skipping if all branches have been skipped.
+                if (skippedSegment && segment.prevSegments.indexOf(skippedSegment) !== -1) {
+                    skippedSegment = null;
+                }
+                visited[segment.id] = true;
+
+                // Call the callback when the first time.
+                if (!skippedSegment) {
+                    callback.call(this, segment, controller);
+                    if (segment === lastSegment) {
+                        controller.skip();
+                    }
+                    if (broken) {
+                        break;
+                    }
+                }
+            }
+
+            // Update the stack.
+            end = segment.nextSegments.length - 1;
+            if (index < end) {
+                item[1] += 1;
+                stack.push([segment.nextSegments[index], 0]);
+            } else if (index === end) {
+                item[0] = segment.nextSegments[index];
+                item[1] = 0;
+            } else {
+                stack.pop();
+            }
+        }
+    }
+}
+
+module.exports = CodePath;
diff --git a/node_modules/eslint/lib/code-path-analysis/debug-helpers.js b/node_modules/eslint/lib/code-path-analysis/debug-helpers.js
new file mode 100644
index 0000000..9af985c
--- /dev/null
+++ b/node_modules/eslint/lib/code-path-analysis/debug-helpers.js
@@ -0,0 +1,200 @@
+/**
+ * @fileoverview Helpers to debug for code path analysis.
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const debug = require("debug")("eslint:code-path");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Gets id of a given segment.
+ * @param {CodePathSegment} segment - A segment to get.
+ * @returns {string} Id of the segment.
+ */
+/* istanbul ignore next */
+function getId(segment) { // eslint-disable-line require-jsdoc
+    return segment.id + (segment.reachable ? "" : "!");
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = {
+
+    /**
+     * A flag that debug dumping is enabled or not.
+     * @type {boolean}
+     */
+    enabled: debug.enabled,
+
+    /**
+     * Dumps given objects.
+     *
+     * @param {...any} args - objects to dump.
+     * @returns {void}
+     */
+    dump: debug,
+
+    /**
+     * Dumps the current analyzing state.
+     *
+     * @param {ASTNode} node - A node to dump.
+     * @param {CodePathState} state - A state to dump.
+     * @param {boolean} leaving - A flag whether or not it's leaving
+     * @returns {void}
+     */
+    dumpState: !debug.enabled ? debug : /* istanbul ignore next */ function(node, state, leaving) {
+        for (let i = 0; i < state.currentSegments.length; ++i) {
+            const segInternal = state.currentSegments[i].internal;
+
+            if (leaving) {
+                segInternal.exitNodes.push(node);
+            } else {
+                segInternal.nodes.push(node);
+            }
+        }
+
+        debug([
+            `${state.currentSegments.map(getId).join(",")})`,
+            `${node.type}${leaving ? ":exit" : ""}`
+        ].join(" "));
+    },
+
+    /**
+     * Dumps a DOT code of a given code path.
+     * The DOT code can be visialized with Graphvis.
+     *
+     * @param {CodePath} codePath - A code path to dump.
+     * @returns {void}
+     * @see http://www.graphviz.org
+     * @see http://www.webgraphviz.com
+     */
+    dumpDot: !debug.enabled ? debug : /* istanbul ignore next */ function(codePath) {
+        let text =
+            "\n" +
+            "digraph {\n" +
+            "node[shape=box,style=\"rounded,filled\",fillcolor=white];\n" +
+            "initial[label=\"\",shape=circle,style=filled,fillcolor=black,width=0.25,height=0.25];\n";
+
+        if (codePath.returnedSegments.length > 0) {
+            text += "final[label=\"\",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25];\n";
+        }
+        if (codePath.thrownSegments.length > 0) {
+            text += "thrown[label=\"✘\",shape=circle,width=0.3,height=0.3,fixedsize];\n";
+        }
+
+        const traceMap = Object.create(null);
+        const arrows = this.makeDotArrows(codePath, traceMap);
+
+        for (const id in traceMap) { // eslint-disable-line guard-for-in
+            const segment = traceMap[id];
+
+            text += `${id}[`;
+
+            if (segment.reachable) {
+                text += "label=\"";
+            } else {
+                text += "style=\"rounded,dashed,filled\",fillcolor=\"#FF9800\",label=\"<>\\n";
+            }
+
+            if (segment.internal.nodes.length > 0 || segment.internal.exitNodes.length > 0) {
+                text += [].concat(
+                    segment.internal.nodes.map(node => {
+                        switch (node.type) {
+                            case "Identifier": return `${node.type} (${node.name})`;
+                            case "Literal": return `${node.type} (${node.value})`;
+                            default: return node.type;
+                        }
+                    }),
+                    segment.internal.exitNodes.map(node => {
+                        switch (node.type) {
+                            case "Identifier": return `${node.type}:exit (${node.name})`;
+                            case "Literal": return `${node.type}:exit (${node.value})`;
+                            default: return `${node.type}:exit`;
+                        }
+                    })
+                ).join("\\n");
+            } else {
+                text += "????";
+            }
+
+            text += "\"];\n";
+        }
+
+        text += `${arrows}\n`;
+        text += "}";
+        debug("DOT", text);
+    },
+
+    /**
+     * Makes a DOT code of a given code path.
+     * The DOT code can be visialized with Graphvis.
+     *
+     * @param {CodePath} codePath - A code path to make DOT.
+     * @param {Object} traceMap - Optional. A map to check whether or not segments had been done.
+     * @returns {string} A DOT code of the code path.
+     */
+    makeDotArrows(codePath, traceMap) {
+        const stack = [[codePath.initialSegment, 0]];
+        const done = traceMap || Object.create(null);
+        let lastId = codePath.initialSegment.id;
+        let text = `initial->${codePath.initialSegment.id}`;
+
+        while (stack.length > 0) {
+            const item = stack.pop();
+            const segment = item[0];
+            const index = item[1];
+
+            if (done[segment.id] && index === 0) {
+                continue;
+            }
+            done[segment.id] = segment;
+
+            const nextSegment = segment.allNextSegments[index];
+
+            if (!nextSegment) {
+                continue;
+            }
+
+            if (lastId === segment.id) {
+                text += `->${nextSegment.id}`;
+            } else {
+                text += `;\n${segment.id}->${nextSegment.id}`;
+            }
+            lastId = nextSegment.id;
+
+            stack.unshift([segment, 1 + index]);
+            stack.push([nextSegment, 0]);
+        }
+
+        codePath.returnedSegments.forEach(finalSegment => {
+            if (lastId === finalSegment.id) {
+                text += "->final";
+            } else {
+                text += `;\n${finalSegment.id}->final`;
+            }
+            lastId = null;
+        });
+
+        codePath.thrownSegments.forEach(finalSegment => {
+            if (lastId === finalSegment.id) {
+                text += "->thrown";
+            } else {
+                text += `;\n${finalSegment.id}->thrown`;
+            }
+            lastId = null;
+        });
+
+        return `${text};`;
+    }
+};
diff --git a/node_modules/eslint/lib/code-path-analysis/fork-context.js b/node_modules/eslint/lib/code-path-analysis/fork-context.js
new file mode 100644
index 0000000..4fae6bb
--- /dev/null
+++ b/node_modules/eslint/lib/code-path-analysis/fork-context.js
@@ -0,0 +1,262 @@
+/**
+ * @fileoverview A class to operate forking.
+ *
+ * This is state of forking.
+ * This has a fork list and manages it.
+ *
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const assert = require("assert"),
+    CodePathSegment = require("./code-path-segment");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Gets whether or not a given segment is reachable.
+ *
+ * @param {CodePathSegment} segment - A segment to get.
+ * @returns {boolean} `true` if the segment is reachable.
+ */
+function isReachable(segment) {
+    return segment.reachable;
+}
+
+/**
+ * Creates new segments from the specific range of `context.segmentsList`.
+ *
+ * When `context.segmentsList` is `[[a, b], [c, d], [e, f]]`, `begin` is `0`, and
+ * `end` is `-1`, this creates `[g, h]`. This `g` is from `a`, `c`, and `e`.
+ * This `h` is from `b`, `d`, and `f`.
+ *
+ * @param {ForkContext} context - An instance.
+ * @param {number} begin - The first index of the previous segments.
+ * @param {number} end - The last index of the previous segments.
+ * @param {Function} create - A factory function of new segments.
+ * @returns {CodePathSegment[]} New segments.
+ */
+function makeSegments(context, begin, end, create) {
+    const list = context.segmentsList;
+
+    if (begin < 0) {
+        begin = list.length + begin;
+    }
+    if (end < 0) {
+        end = list.length + end;
+    }
+
+    const segments = [];
+
+    for (let i = 0; i < context.count; ++i) {
+        const allPrevSegments = [];
+
+        for (let j = begin; j <= end; ++j) {
+            allPrevSegments.push(list[j][i]);
+        }
+
+        segments.push(create(context.idGenerator.next(), allPrevSegments));
+    }
+
+    return segments;
+}
+
+/**
+ * `segments` becomes doubly in a `finally` block. Then if a code path exits by a
+ * control statement (such as `break`, `continue`) from the `finally` block, the
+ * destination's segments may be half of the source segments. In that case, this
+ * merges segments.
+ *
+ * @param {ForkContext} context - An instance.
+ * @param {CodePathSegment[]} segments - Segments to merge.
+ * @returns {CodePathSegment[]} The merged segments.
+ */
+function mergeExtraSegments(context, segments) {
+    while (segments.length > context.count) {
+        const merged = [];
+
+        for (let i = 0, length = segments.length / 2 | 0; i < length; ++i) {
+            merged.push(CodePathSegment.newNext(
+                context.idGenerator.next(),
+                [segments[i], segments[i + length]]
+            ));
+        }
+        segments = merged;
+    }
+    return segments;
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/**
+ * A class to manage forking.
+ */
+class ForkContext {
+
+    /**
+     * @param {IdGenerator} idGenerator - An identifier generator for segments.
+     * @param {ForkContext|null} upper - An upper fork context.
+     * @param {number} count - A number of parallel segments.
+     */
+    constructor(idGenerator, upper, count) {
+        this.idGenerator = idGenerator;
+        this.upper = upper;
+        this.count = count;
+        this.segmentsList = [];
+    }
+
+    /**
+     * The head segments.
+     * @type {CodePathSegment[]}
+     */
+    get head() {
+        const list = this.segmentsList;
+
+        return list.length === 0 ? [] : list[list.length - 1];
+    }
+
+    /**
+     * A flag which shows empty.
+     * @type {boolean}
+     */
+    get empty() {
+        return this.segmentsList.length === 0;
+    }
+
+    /**
+     * A flag which shows reachable.
+     * @type {boolean}
+     */
+    get reachable() {
+        const segments = this.head;
+
+        return segments.length > 0 && segments.some(isReachable);
+    }
+
+    /**
+     * Creates new segments from this context.
+     *
+     * @param {number} begin - The first index of previous segments.
+     * @param {number} end - The last index of previous segments.
+     * @returns {CodePathSegment[]} New segments.
+     */
+    makeNext(begin, end) {
+        return makeSegments(this, begin, end, CodePathSegment.newNext);
+    }
+
+    /**
+     * Creates new segments from this context.
+     * The new segments is always unreachable.
+     *
+     * @param {number} begin - The first index of previous segments.
+     * @param {number} end - The last index of previous segments.
+     * @returns {CodePathSegment[]} New segments.
+     */
+    makeUnreachable(begin, end) {
+        return makeSegments(this, begin, end, CodePathSegment.newUnreachable);
+    }
+
+    /**
+     * Creates new segments from this context.
+     * The new segments don't have connections for previous segments.
+     * But these inherit the reachable flag from this context.
+     *
+     * @param {number} begin - The first index of previous segments.
+     * @param {number} end - The last index of previous segments.
+     * @returns {CodePathSegment[]} New segments.
+     */
+    makeDisconnected(begin, end) {
+        return makeSegments(this, begin, end, CodePathSegment.newDisconnected);
+    }
+
+    /**
+     * Adds segments into this context.
+     * The added segments become the head.
+     *
+     * @param {CodePathSegment[]} segments - Segments to add.
+     * @returns {void}
+     */
+    add(segments) {
+        assert(segments.length >= this.count, `${segments.length} >= ${this.count}`);
+
+        this.segmentsList.push(mergeExtraSegments(this, segments));
+    }
+
+    /**
+     * Replaces the head segments with given segments.
+     * The current head segments are removed.
+     *
+     * @param {CodePathSegment[]} segments - Segments to add.
+     * @returns {void}
+     */
+    replaceHead(segments) {
+        assert(segments.length >= this.count, `${segments.length} >= ${this.count}`);
+
+        this.segmentsList.splice(-1, 1, mergeExtraSegments(this, segments));
+    }
+
+    /**
+     * Adds all segments of a given fork context into this context.
+     *
+     * @param {ForkContext} context - A fork context to add.
+     * @returns {void}
+     */
+    addAll(context) {
+        assert(context.count === this.count);
+
+        const source = context.segmentsList;
+
+        for (let i = 0; i < source.length; ++i) {
+            this.segmentsList.push(source[i]);
+        }
+    }
+
+    /**
+     * Clears all secments in this context.
+     *
+     * @returns {void}
+     */
+    clear() {
+        this.segmentsList = [];
+    }
+
+    /**
+     * Creates the root fork context.
+     *
+     * @param {IdGenerator} idGenerator - An identifier generator for segments.
+     * @returns {ForkContext} New fork context.
+     */
+    static newRoot(idGenerator) {
+        const context = new ForkContext(idGenerator, null, 1);
+
+        context.add([CodePathSegment.newRoot(idGenerator.next())]);
+
+        return context;
+    }
+
+    /**
+     * Creates an empty fork context preceded by a given context.
+     *
+     * @param {ForkContext} parentContext - The parent fork context.
+     * @param {boolean} forkLeavingPath - A flag which shows inside of `finally` block.
+     * @returns {ForkContext} New fork context.
+     */
+    static newEmpty(parentContext, forkLeavingPath) {
+        return new ForkContext(
+            parentContext.idGenerator,
+            parentContext,
+            (forkLeavingPath ? 2 : 1) * parentContext.count
+        );
+    }
+}
+
+module.exports = ForkContext;
diff --git a/node_modules/eslint/lib/code-path-analysis/id-generator.js b/node_modules/eslint/lib/code-path-analysis/id-generator.js
new file mode 100644
index 0000000..062058d
--- /dev/null
+++ b/node_modules/eslint/lib/code-path-analysis/id-generator.js
@@ -0,0 +1,46 @@
+/**
+ * @fileoverview A class of identifiers generator for code path segments.
+ *
+ * Each rule uses the identifier of code path segments to store additional
+ * information of the code path.
+ *
+ * @author Toru Nagashima
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/**
+ * A generator for unique ids.
+ */
+class IdGenerator {
+
+    /**
+     * @param {string} prefix - Optional. A prefix of generated ids.
+     */
+    constructor(prefix) {
+        this.prefix = String(prefix);
+        this.n = 0;
+    }
+
+    /**
+     * Generates id.
+     *
+     * @returns {string} A generated id.
+     */
+    next() {
+        this.n = 1 + this.n | 0;
+
+        /* istanbul ignore if */
+        if (this.n < 0) {
+            this.n = 1;
+        }
+
+        return this.prefix + this.n;
+    }
+}
+
+module.exports = IdGenerator;
diff --git a/node_modules/eslint/lib/config.js b/node_modules/eslint/lib/config.js
new file mode 100644
index 0000000..b66b9f4
--- /dev/null
+++ b/node_modules/eslint/lib/config.js
@@ -0,0 +1,365 @@
+/**
+ * @fileoverview Responsible for loading config files
+ * @author Seth McLaughlin
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const path = require("path"),
+    os = require("os"),
+    ConfigOps = require("./config/config-ops"),
+    ConfigFile = require("./config/config-file"),
+    ConfigCache = require("./config/config-cache"),
+    Plugins = require("./config/plugins"),
+    FileFinder = require("./file-finder"),
+    isResolvable = require("is-resolvable");
+
+const debug = require("debug")("eslint:config");
+
+//------------------------------------------------------------------------------
+// Constants
+//------------------------------------------------------------------------------
+
+const PERSONAL_CONFIG_DIR = os.homedir();
+const SUBCONFIG_SEP = ":";
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Determines if any rules were explicitly passed in as options.
+ * @param {Object} options The options used to create our configuration.
+ * @returns {boolean} True if rules were passed in as options, false otherwise.
+ * @private
+ */
+function hasRules(options) {
+    return options.rules && Object.keys(options.rules).length > 0;
+}
+
+//------------------------------------------------------------------------------
+// API
+//------------------------------------------------------------------------------
+
+/**
+ * Configuration class
+ */
+class Config {
+
+    /**
+     * @param {Object} options Options to be passed in
+     * @param {Linter} linterContext Linter instance object
+     */
+    constructor(options, linterContext) {
+        options = options || {};
+
+        this.linterContext = linterContext;
+        this.plugins = new Plugins(linterContext.environments, linterContext.rules);
+
+        this.options = options;
+        this.ignore = options.ignore;
+        this.ignorePath = options.ignorePath;
+        this.parser = options.parser;
+        this.parserOptions = options.parserOptions || {};
+
+        this.configCache = new ConfigCache();
+
+        this.baseConfig = options.baseConfig
+            ? ConfigOps.merge({}, ConfigFile.loadObject(options.baseConfig, this))
+            : { rules: {} };
+        this.baseConfig.filePath = "";
+        this.baseConfig.baseDirectory = this.options.cwd;
+
+        this.configCache.setConfig(this.baseConfig.filePath, this.baseConfig);
+        this.configCache.setMergedVectorConfig(this.baseConfig.filePath, this.baseConfig);
+
+        this.useEslintrc = (options.useEslintrc !== false);
+
+        this.env = (options.envs || []).reduce((envs, name) => {
+            envs[name] = true;
+            return envs;
+        }, {});
+
+        /*
+         * Handle declared globals.
+         * For global variable foo, handle "foo:false" and "foo:true" to set
+         * whether global is writable.
+         * If user declares "foo", convert to "foo:false".
+         */
+        this.globals = (options.globals || []).reduce((globals, def) => {
+            const parts = def.split(SUBCONFIG_SEP);
+
+            globals[parts[0]] = (parts.length > 1 && parts[1] === "true");
+
+            return globals;
+        }, {});
+
+        this.loadSpecificConfig(options.configFile);
+
+        // Empty values in configs don't merge properly
+        const cliConfigOptions = {
+            env: this.env,
+            rules: this.options.rules,
+            globals: this.globals,
+            parserOptions: this.parserOptions,
+            plugins: this.options.plugins
+        };
+
+        this.cliConfig = {};
+        Object.keys(cliConfigOptions).forEach(configKey => {
+            const value = cliConfigOptions[configKey];
+
+            if (value) {
+                this.cliConfig[configKey] = value;
+            }
+        });
+    }
+
+    /**
+     * Loads the config options from a config specified on the command line.
+     * @param {string} [config] A shareable named config or path to a config file.
+     * @returns {void}
+     */
+    loadSpecificConfig(config) {
+        if (config) {
+            debug(`Using command line config ${config}`);
+            const isNamedConfig =
+                isResolvable(config) ||
+                isResolvable(`eslint-config-${config}`) ||
+                config.charAt(0) === "@";
+
+            if (!isNamedConfig) {
+                config = path.resolve(this.options.cwd, config);
+            }
+
+            this.specificConfig = ConfigFile.load(config, this);
+        }
+    }
+
+    /**
+     * Gets the personal config object from user's home directory.
+     * @returns {Object} the personal config object (null if there is no personal config)
+     * @private
+     */
+    getPersonalConfig() {
+        if (typeof this.personalConfig === "undefined") {
+            let config;
+            const filename = ConfigFile.getFilenameForDirectory(PERSONAL_CONFIG_DIR);
+
+            if (filename) {
+                debug("Using personal config");
+                config = ConfigFile.load(filename, this);
+            }
+
+            this.personalConfig = config || null;
+        }
+
+        return this.personalConfig;
+    }
+
+    /**
+     * Builds a hierarchy of config objects, including the base config, all local configs from the directory tree,
+     * and a config file specified on the command line, if applicable.
+     * @param {string} directory a file in whose directory we start looking for a local config
+     * @returns {Object[]} The config objects, in ascending order of precedence
+     * @private
+     */
+    getConfigHierarchy(directory) {
+        debug(`Constructing config file hierarchy for ${directory}`);
+
+        // Step 1: Always include baseConfig
+        let configs = [this.baseConfig];
+
+        // Step 2: Add user-specified config from .eslintrc.* and package.json files
+        if (this.useEslintrc) {
+            debug("Using .eslintrc and package.json files");
+            configs = configs.concat(this.getLocalConfigHierarchy(directory));
+        } else {
+            debug("Not using .eslintrc or package.json files");
+        }
+
+        // Step 3: Merge in command line config file
+        if (this.specificConfig) {
+            debug("Using command line config file");
+            configs.push(this.specificConfig);
+        }
+
+        return configs;
+    }
+
+    /**
+     * Gets a list of config objects extracted from local config files that apply to the current directory, in
+     * descending order, beginning with the config that is highest in the directory tree.
+     * @param {string} directory The directory to start looking in for local config files.
+     * @returns {Object[]} The shallow local config objects, in ascending order of precedence (closest to the current
+     * directory at the end), or an empty array if there are no local configs.
+     * @private
+     */
+    getLocalConfigHierarchy(directory) {
+        const localConfigFiles = this.findLocalConfigFiles(directory),
+            projectConfigPath = ConfigFile.getFilenameForDirectory(this.options.cwd),
+            searched = [],
+            configs = [];
+
+        for (const localConfigFile of localConfigFiles) {
+            const localConfigDirectory = path.dirname(localConfigFile);
+            const localConfigHierarchyCache = this.configCache.getHierarchyLocalConfigs(localConfigDirectory);
+
+            if (localConfigHierarchyCache) {
+                const localConfigHierarchy = localConfigHierarchyCache.concat(configs.reverse());
+
+                this.configCache.setHierarchyLocalConfigs(searched, localConfigHierarchy);
+                return localConfigHierarchy;
+            }
+
+            /*
+             * Don't consider the personal config file in the home directory,
+             * except if the home directory is the same as the current working directory
+             */
+            if (localConfigDirectory === PERSONAL_CONFIG_DIR && localConfigFile !== projectConfigPath) {
+                continue;
+            }
+
+            debug(`Loading ${localConfigFile}`);
+            const localConfig = ConfigFile.load(localConfigFile, this);
+
+            // Ignore empty config files
+            if (!localConfig) {
+                continue;
+            }
+
+            debug(`Using ${localConfigFile}`);
+            configs.push(localConfig);
+            searched.push(localConfigDirectory);
+
+            // Stop traversing if a config is found with the root flag set
+            if (localConfig.root) {
+                break;
+            }
+        }
+
+        if (!configs.length && !this.specificConfig) {
+
+            // Fall back on the personal config from ~/.eslintrc
+            debug("Using personal config file");
+            const personalConfig = this.getPersonalConfig();
+
+            if (personalConfig) {
+                configs.push(personalConfig);
+            } else if (!hasRules(this.options) && !this.options.baseConfig) {
+
+                // No config file, no manual configuration, and no rules, so error.
+                const noConfigError = new Error("No ESLint configuration found.");
+
+                noConfigError.messageTemplate = "no-config-found";
+                noConfigError.messageData = {
+                    directory,
+                    filesExamined: localConfigFiles
+                };
+
+                throw noConfigError;
+            }
+        }
+
+        // Set the caches for the parent directories
+        this.configCache.setHierarchyLocalConfigs(searched, configs.reverse());
+
+        return configs;
+    }
+
+    /**
+     * Gets the vector of applicable configs and subconfigs from the hierarchy for a given file. A vector is an array of
+     * entries, each of which in an object specifying a config file path and an array of override indices corresponding
+     * to entries in the config file's overrides section whose glob patterns match the specified file path; e.g., the
+     * vector entry { configFile: '/home/john/app/.eslintrc', matchingOverrides: [0, 2] } would indicate that the main
+     * project .eslintrc file and its first and third override blocks apply to the current file.
+     * @param {string} filePath The file path for which to build the hierarchy and config vector.
+     * @returns {Array} config vector applicable to the specified path
+     * @private
+     */
+    getConfigVector(filePath) {
+        const directory = filePath ? path.dirname(filePath) : this.options.cwd;
+
+        return this.getConfigHierarchy(directory).map(config => {
+            const vectorEntry = {
+                filePath: config.filePath,
+                matchingOverrides: []
+            };
+
+            if (config.overrides) {
+                const relativePath = path.relative(config.baseDirectory, filePath || directory);
+
+                config.overrides.forEach((override, i) => {
+                    if (ConfigOps.pathMatchesGlobs(relativePath, override.files, override.excludedFiles)) {
+                        vectorEntry.matchingOverrides.push(i);
+                    }
+                });
+            }
+
+            return vectorEntry;
+        });
+    }
+
+    /**
+     * Finds local config files from the specified directory and its parent directories.
+     * @param {string} directory The directory to start searching from.
+     * @returns {GeneratorFunction} The paths of local config files found.
+     */
+    findLocalConfigFiles(directory) {
+        if (!this.localConfigFinder) {
+            this.localConfigFinder = new FileFinder(ConfigFile.CONFIG_FILES, this.options.cwd);
+        }
+
+        return this.localConfigFinder.findAllInDirectoryAndParents(directory);
+    }
+
+    /**
+     * Builds the authoritative config object for the specified file path by merging the hierarchy of config objects
+     * that apply to the current file, including the base config (conf/eslint-recommended), the user's personal config
+     * from their homedir, all local configs from the directory tree, any specific config file passed on the command
+     * line, any configuration overrides set directly on the command line, and finally the environment configs
+     * (conf/environments).
+     * @param {string} filePath a file in whose directory we start looking for a local config
+     * @returns {Object} config object
+     */
+    getConfig(filePath) {
+        const vector = this.getConfigVector(filePath);
+        let config = this.configCache.getMergedConfig(vector);
+
+        if (config) {
+            debug("Using config from cache");
+            return config;
+        }
+
+        // Step 1: Merge in the filesystem configurations (base, local, and personal)
+        config = ConfigOps.getConfigFromVector(vector, this.configCache);
+
+        // Step 2: Merge in command line configurations
+        config = ConfigOps.merge(config, this.cliConfig);
+
+        if (this.cliConfig.plugins) {
+            this.plugins.loadAll(this.cliConfig.plugins);
+        }
+
+        /*
+         * Step 3: Override parser only if it is passed explicitly through the command line
+         * or if it's not defined yet (because the final object will at least have the parser key)
+         */
+        if (this.parser || !config.parser) {
+            config = ConfigOps.merge(config, { parser: this.parser });
+        }
+
+        // Step 4: Apply environments to the config
+        config = ConfigOps.applyEnvironments(config, this.linterContext.environments);
+
+        this.configCache.setMergedConfig(vector, config);
+
+        return config;
+    }
+}
+
+module.exports = Config;
diff --git a/node_modules/eslint/lib/config/autoconfig.js b/node_modules/eslint/lib/config/autoconfig.js
new file mode 100644
index 0000000..8536fdc
--- /dev/null
+++ b/node_modules/eslint/lib/config/autoconfig.js
@@ -0,0 +1,359 @@
+/**
+ * @fileoverview Used for creating a suggested configuration based on project code.
+ * @author Ian VanSchooten
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const lodash = require("lodash"),
+    Linter = require("../linter"),
+    configRule = require("./config-rule"),
+    ConfigOps = require("./config-ops"),
+    recConfig = require("../../conf/eslint-recommended");
+
+const debug = require("debug")("eslint:autoconfig");
+const linter = new Linter();
+
+//------------------------------------------------------------------------------
+// Data
+//------------------------------------------------------------------------------
+
+const MAX_CONFIG_COMBINATIONS = 17, // 16 combinations + 1 for severity only
+    RECOMMENDED_CONFIG_NAME = "eslint:recommended";
+
+//------------------------------------------------------------------------------
+// Private
+//------------------------------------------------------------------------------
+
+/**
+ * Information about a rule configuration, in the context of a Registry.
+ *
+ * @typedef {Object}     registryItem
+ * @param   {ruleConfig} config        A valid configuration for the rule
+ * @param   {number}     specificity   The number of elements in the ruleConfig array
+ * @param   {number}     errorCount    The number of errors encountered when linting with the config
+ */
+
+/**
+ * This callback is used to measure execution status in a progress bar
+ * @callback progressCallback
+ * @param {number} The total number of times the callback will be called.
+ */
+
+/**
+ * Create registryItems for rules
+ * @param   {rulesConfig} rulesConfig Hash of rule names and arrays of ruleConfig items
+ * @returns {Object}                  registryItems for each rule in provided rulesConfig
+ */
+function makeRegistryItems(rulesConfig) {
+    return Object.keys(rulesConfig).reduce((accumulator, ruleId) => {
+        accumulator[ruleId] = rulesConfig[ruleId].map(config => ({
+            config,
+            specificity: config.length || 1,
+            errorCount: void 0
+        }));
+        return accumulator;
+    }, {});
+}
+
+/**
+ * Creates an object in which to store rule configs and error counts
+ *
+ * Unless a rulesConfig is provided at construction, the registry will not contain
+ * any rules, only methods.  This will be useful for building up registries manually.
+ *
+ * Registry class
+ */
+class Registry {
+
+    /**
+     * @param {rulesConfig} [rulesConfig] Hash of rule names and arrays of possible configurations
+     */
+    constructor(rulesConfig) {
+        this.rules = (rulesConfig) ? makeRegistryItems(rulesConfig) : {};
+    }
+
+    /**
+     * Populate the registry with core rule configs.
+     *
+     * It will set the registry's `rule` property to an object having rule names
+     * as keys and an array of registryItems as values.
+     *
+     * @returns {void}
+     */
+    populateFromCoreRules() {
+        const rulesConfig = configRule.createCoreRuleConfigs();
+
+        this.rules = makeRegistryItems(rulesConfig);
+    }
+
+    /**
+     * Creates sets of rule configurations which can be used for linting
+     * and initializes registry errors to zero for those configurations (side effect).
+     *
+     * This combines as many rules together as possible, such that the first sets
+     * in the array will have the highest number of rules configured, and later sets
+     * will have fewer and fewer, as not all rules have the same number of possible
+     * configurations.
+     *
+     * The length of the returned array will be <= MAX_CONFIG_COMBINATIONS.
+     *
+     * @param   {Object}   registry The autoconfig registry
+     * @returns {Object[]}          "rules" configurations to use for linting
+     */
+    buildRuleSets() {
+        let idx = 0;
+        const ruleIds = Object.keys(this.rules),
+            ruleSets = [];
+
+        /**
+         * Add a rule configuration from the registry to the ruleSets
+         *
+         * This is broken out into its own function so that it doesn't need to be
+         * created inside of the while loop.
+         *
+         * @param   {string} rule The ruleId to add.
+         * @returns {void}
+         */
+        const addRuleToRuleSet = function(rule) {
+
+            /*
+             * This check ensures that there is a rule configuration and that
+             * it has fewer than the max combinations allowed.
+             * If it has too many configs, we will only use the most basic of
+             * the possible configurations.
+             */
+            const hasFewCombos = (this.rules[rule].length <= MAX_CONFIG_COMBINATIONS);
+
+            if (this.rules[rule][idx] && (hasFewCombos || this.rules[rule][idx].specificity <= 2)) {
+
+                /*
+                 * If the rule has too many possible combinations, only take
+                 * simple ones, avoiding objects.
+                 */
+                if (!hasFewCombos && typeof this.rules[rule][idx].config[1] === "object") {
+                    return;
+                }
+
+                ruleSets[idx] = ruleSets[idx] || {};
+                ruleSets[idx][rule] = this.rules[rule][idx].config;
+
+                /*
+                 * Initialize errorCount to zero, since this is a config which
+                 * will be linted.
+                 */
+                this.rules[rule][idx].errorCount = 0;
+            }
+        }.bind(this);
+
+        while (ruleSets.length === idx) {
+            ruleIds.forEach(addRuleToRuleSet);
+            idx += 1;
+        }
+
+        return ruleSets;
+    }
+
+    /**
+     * Remove all items from the registry with a non-zero number of errors
+     *
+     * Note: this also removes rule configurations which were not linted
+     * (meaning, they have an undefined errorCount).
+     *
+     * @returns {void}
+     */
+    stripFailingConfigs() {
+        const ruleIds = Object.keys(this.rules),
+            newRegistry = new Registry();
+
+        newRegistry.rules = Object.assign({}, this.rules);
+        ruleIds.forEach(ruleId => {
+            const errorFreeItems = newRegistry.rules[ruleId].filter(registryItem => (registryItem.errorCount === 0));
+
+            if (errorFreeItems.length > 0) {
+                newRegistry.rules[ruleId] = errorFreeItems;
+            } else {
+                delete newRegistry.rules[ruleId];
+            }
+        });
+
+        return newRegistry;
+    }
+
+    /**
+     * Removes rule configurations which were not included in a ruleSet
+     *
+     * @returns {void}
+     */
+    stripExtraConfigs() {
+        const ruleIds = Object.keys(this.rules),
+            newRegistry = new Registry();
+
+        newRegistry.rules = Object.assign({}, this.rules);
+        ruleIds.forEach(ruleId => {
+            newRegistry.rules[ruleId] = newRegistry.rules[ruleId].filter(registryItem => (typeof registryItem.errorCount !== "undefined"));
+        });
+
+        return newRegistry;
+    }
+
+    /**
+     * Creates a registry of rules which had no error-free configs.
+     * The new registry is intended to be analyzed to determine whether its rules
+     * should be disabled or set to warning.
+     *
+     * @returns {Registry}  A registry of failing rules.
+     */
+    getFailingRulesRegistry() {
+        const ruleIds = Object.keys(this.rules),
+            failingRegistry = new Registry();
+
+        ruleIds.forEach(ruleId => {
+            const failingConfigs = this.rules[ruleId].filter(registryItem => (registryItem.errorCount > 0));
+
+            if (failingConfigs && failingConfigs.length === this.rules[ruleId].length) {
+                failingRegistry.rules[ruleId] = failingConfigs;
+            }
+        });
+
+        return failingRegistry;
+    }
+
+    /**
+     * Create an eslint config for any rules which only have one configuration
+     * in the registry.
+     *
+     * @returns {Object} An eslint config with rules section populated
+     */
+    createConfig() {
+        const ruleIds = Object.keys(this.rules),
+            config = { rules: {} };
+
+        ruleIds.forEach(ruleId => {
+            if (this.rules[ruleId].length === 1) {
+                config.rules[ruleId] = this.rules[ruleId][0].config;
+            }
+        });
+
+        return config;
+    }
+
+    /**
+     * Return a cloned registry containing only configs with a desired specificity
+     *
+     * @param   {number} specificity Only keep configs with this specificity
+     * @returns {Registry}           A registry of rules
+     */
+    filterBySpecificity(specificity) {
+        const ruleIds = Object.keys(this.rules),
+            newRegistry = new Registry();
+
+        newRegistry.rules = Object.assign({}, this.rules);
+        ruleIds.forEach(ruleId => {
+            newRegistry.rules[ruleId] = this.rules[ruleId].filter(registryItem => (registryItem.specificity === specificity));
+        });
+
+        return newRegistry;
+    }
+
+    /**
+     * Lint SourceCodes against all configurations in the registry, and record results
+     *
+     * @param   {Object[]} sourceCodes  SourceCode objects for each filename
+     * @param   {Object}   config       ESLint config object
+     * @param   {progressCallback} [cb] Optional callback for reporting execution status
+     * @returns {Registry}              New registry with errorCount populated
+     */
+    lintSourceCode(sourceCodes, config, cb) {
+        let lintedRegistry = new Registry();
+
+        lintedRegistry.rules = Object.assign({}, this.rules);
+
+        const ruleSets = lintedRegistry.buildRuleSets();
+
+        lintedRegistry = lintedRegistry.stripExtraConfigs();
+
+        debug("Linting with all possible rule combinations");
+
+        const filenames = Object.keys(sourceCodes);
+        const totalFilesLinting = filenames.length * ruleSets.length;
+
+        filenames.forEach(filename => {
+            debug(`Linting file: ${filename}`);
+
+            let ruleSetIdx = 0;
+
+            ruleSets.forEach(ruleSet => {
+                const lintConfig = Object.assign({}, config, { rules: ruleSet });
+                const lintResults = linter.verify(sourceCodes[filename], lintConfig);
+
+                lintResults.forEach(result => {
+
+                    /*
+                     * It is possible that the error is from a configuration comment
+                     * in a linted file, in which case there may not be a config
+                     * set in this ruleSetIdx.
+                     * (https://github.com/eslint/eslint/issues/5992)
+                     * (https://github.com/eslint/eslint/issues/7860)
+                     */
+                    if (
+                        lintedRegistry.rules[result.ruleId] &&
+                        lintedRegistry.rules[result.ruleId][ruleSetIdx]
+                    ) {
+                        lintedRegistry.rules[result.ruleId][ruleSetIdx].errorCount += 1;
+                    }
+                });
+
+                ruleSetIdx += 1;
+
+                if (cb) {
+                    cb(totalFilesLinting); // eslint-disable-line callback-return
+                }
+            });
+
+            // Deallocate for GC
+            sourceCodes[filename] = null;
+        });
+
+        return lintedRegistry;
+    }
+}
+
+/**
+ * Extract rule configuration into eslint:recommended where possible.
+ *
+ * This will return a new config with `"extends": "eslint:recommended"` and
+ * only the rules which have configurations different from the recommended config.
+ *
+ * @param   {Object} config config object
+ * @returns {Object}        config object using `"extends": "eslint:recommended"`
+ */
+function extendFromRecommended(config) {
+    const newConfig = Object.assign({}, config);
+
+    ConfigOps.normalizeToStrings(newConfig);
+
+    const recRules = Object.keys(recConfig.rules).filter(ruleId => ConfigOps.isErrorSeverity(recConfig.rules[ruleId]));
+
+    recRules.forEach(ruleId => {
+        if (lodash.isEqual(recConfig.rules[ruleId], newConfig.rules[ruleId])) {
+            delete newConfig.rules[ruleId];
+        }
+    });
+    newConfig.extends = RECOMMENDED_CONFIG_NAME;
+    return newConfig;
+}
+
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = {
+    Registry,
+    extendFromRecommended
+};
diff --git a/node_modules/eslint/lib/config/config-cache.js b/node_modules/eslint/lib/config/config-cache.js
new file mode 100644
index 0000000..07436a8
--- /dev/null
+++ b/node_modules/eslint/lib/config/config-cache.js
@@ -0,0 +1,130 @@
+/**
+ * @fileoverview Responsible for caching config files
+ * @author Sylvan Mably
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Get a string hash for a config vector
+ * @param {Array} vector config vector to hash
+ * @returns {string} hash of the vector values
+ * @private
+ */
+function hash(vector) {
+    return JSON.stringify(vector);
+}
+
+//------------------------------------------------------------------------------
+// API
+//------------------------------------------------------------------------------
+
+/**
+ * Configuration caching class
+ */
+module.exports = class ConfigCache {
+
+    constructor() {
+        this.configFullNameCache = new Map();
+        this.localHierarchyCache = new Map();
+        this.mergedVectorCache = new Map();
+        this.mergedCache = new Map();
+    }
+
+    /**
+     * Gets a config object from the cache for the specified config file path.
+     * @param {string} configFullName the name of the configuration as used in the eslint config(e.g. 'plugin:node/recommended'),
+     * or the absolute path to a config file. This should uniquely identify a config.
+     * @returns {Object|null} config object, if found in the cache, otherwise null
+     * @private
+     */
+    getConfig(configFullName) {
+        return this.configFullNameCache.get(configFullName);
+    }
+
+    /**
+     * Sets a config object in the cache for the specified config file path.
+     * @param {string} configFullName the name of the configuration as used in the eslint config(e.g. 'plugin:node/recommended'),
+     * or the absolute path to a config file. This should uniquely identify a config.
+     * @param {Object} config the config object to add to the cache
+     * @returns {void}
+     * @private
+     */
+    setConfig(configFullName, config) {
+        this.configFullNameCache.set(configFullName, config);
+    }
+
+    /**
+     * Gets a list of hierarchy-local config objects that apply to the specified directory.
+     * @param {string} directory the path to the directory
+     * @returns {Object[]|null} a list of config objects, if found in the cache, otherwise null
+     * @private
+     */
+    getHierarchyLocalConfigs(directory) {
+        return this.localHierarchyCache.get(directory);
+    }
+
+    /**
+     * For each of the supplied parent directories, sets the list of config objects for that directory to the
+     * appropriate subset of the supplied parent config objects.
+     * @param {string[]} parentDirectories a list of parent directories to add to the config cache
+     * @param {Object[]} parentConfigs a list of config objects that apply to the lowest directory in parentDirectories
+     * @returns {void}
+     * @private
+     */
+    setHierarchyLocalConfigs(parentDirectories, parentConfigs) {
+        parentDirectories.forEach((localConfigDirectory, i) => {
+            const directoryParentConfigs = parentConfigs.slice(0, parentConfigs.length - i);
+
+            this.localHierarchyCache.set(localConfigDirectory, directoryParentConfigs);
+        });
+    }
+
+    /**
+     * Gets a merged config object corresponding to the supplied vector.
+     * @param {Array} vector the vector to find a merged config for
+     * @returns {Object|null} a merged config object, if found in the cache, otherwise null
+     * @private
+     */
+    getMergedVectorConfig(vector) {
+        return this.mergedVectorCache.get(hash(vector));
+    }
+
+    /**
+     * Sets a merged config object in the cache for the supplied vector.
+     * @param {Array} vector the vector to save a merged config for
+     * @param {Object} config the merged config object to add to the cache
+     * @returns {void}
+     * @private
+     */
+    setMergedVectorConfig(vector, config) {
+        this.mergedVectorCache.set(hash(vector), config);
+    }
+
+    /**
+     * Gets a merged config object corresponding to the supplied vector, including configuration options from outside
+     * the vector.
+     * @param {Array} vector the vector to find a merged config for
+     * @returns {Object|null} a merged config object, if found in the cache, otherwise null
+     * @private
+     */
+    getMergedConfig(vector) {
+        return this.mergedCache.get(hash(vector));
+    }
+
+    /**
+     * Sets a merged config object in the cache for the supplied vector, including configuration options from outside
+     * the vector.
+     * @param {Array} vector the vector to save a merged config for
+     * @param {Object} config the merged config object to add to the cache
+     * @returns {void}
+     * @private
+     */
+    setMergedConfig(vector, config) {
+        this.mergedCache.set(hash(vector), config);
+    }
+};
diff --git a/node_modules/eslint/lib/config/config-file.js b/node_modules/eslint/lib/config/config-file.js
new file mode 100644
index 0000000..c5ff073
--- /dev/null
+++ b/node_modules/eslint/lib/config/config-file.js
@@ -0,0 +1,595 @@
+/**
+ * @fileoverview Helper to locate and load configuration files.
+ * @author Nicholas C. Zakas
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const fs = require("fs"),
+    path = require("path"),
+    ConfigOps = require("./config-ops"),
+    validator = require("./config-validator"),
+    ModuleResolver = require("../util/module-resolver"),
+    naming = require("../util/naming"),
+    pathIsInside = require("path-is-inside"),
+    stripComments = require("strip-json-comments"),
+    stringify = require("json-stable-stringify-without-jsonify"),
+    requireUncached = require("require-uncached");
+
+const debug = require("debug")("eslint:config-file");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Determines sort order for object keys for json-stable-stringify
+ *
+ * see: https://github.com/samn/json-stable-stringify#cmp
+ *
+ * @param   {Object} a The first comparison object ({key: akey, value: avalue})
+ * @param   {Object} b The second comparison object ({key: bkey, value: bvalue})
+ * @returns {number}   1 or -1, used in stringify cmp method
+ */
+function sortByKey(a, b) {
+    return a.key > b.key ? 1 : -1;
+}
+
+//------------------------------------------------------------------------------
+// Private
+//------------------------------------------------------------------------------
+
+const CONFIG_FILES = [
+    ".eslintrc.js",
+    ".eslintrc.yaml",
+    ".eslintrc.yml",
+    ".eslintrc.json",
+    ".eslintrc",
+    "package.json"
+];
+
+const resolver = new ModuleResolver();
+
+/**
+ * Convenience wrapper for synchronously reading file contents.
+ * @param {string} filePath The filename to read.
+ * @returns {string} The file contents, with the BOM removed.
+ * @private
+ */
+function readFile(filePath) {
+    return fs.readFileSync(filePath, "utf8").replace(/^\ufeff/, "");
+}
+
+/**
+ * Determines if a given string represents a filepath or not using the same
+ * conventions as require(), meaning that the first character must be nonalphanumeric
+ * and not the @ sign which is used for scoped packages to be considered a file path.
+ * @param {string} filePath The string to check.
+ * @returns {boolean} True if it's a filepath, false if not.
+ * @private
+ */
+function isFilePath(filePath) {
+    return path.isAbsolute(filePath) || !/\w|@/.test(filePath.charAt(0));
+}
+
+/**
+ * Loads a YAML configuration from a file.
+ * @param {string} filePath The filename to load.
+ * @returns {Object} The configuration object from the file.
+ * @throws {Error} If the file cannot be read.
+ * @private
+ */
+function loadYAMLConfigFile(filePath) {
+    debug(`Loading YAML config file: ${filePath}`);
+
+    // lazy load YAML to improve performance when not used
+    const yaml = require("js-yaml");
+
+    try {
+
+        // empty YAML file can be null, so always use
+        return yaml.safeLoad(readFile(filePath)) || {};
+    } catch (e) {
+        debug(`Error reading YAML file: ${filePath}`);
+        e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
+        throw e;
+    }
+}
+
+/**
+ * Loads a JSON configuration from a file.
+ * @param {string} filePath The filename to load.
+ * @returns {Object} The configuration object from the file.
+ * @throws {Error} If the file cannot be read.
+ * @private
+ */
+function loadJSONConfigFile(filePath) {
+    debug(`Loading JSON config file: ${filePath}`);
+
+    try {
+        return JSON.parse(stripComments(readFile(filePath)));
+    } catch (e) {
+        debug(`Error reading JSON file: ${filePath}`);
+        e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
+        throw e;
+    }
+}
+
+/**
+ * Loads a legacy (.eslintrc) configuration from a file.
+ * @param {string} filePath The filename to load.
+ * @returns {Object} The configuration object from the file.
+ * @throws {Error} If the file cannot be read.
+ * @private
+ */
+function loadLegacyConfigFile(filePath) {
+    debug(`Loading config file: ${filePath}`);
+
+    // lazy load YAML to improve performance when not used
+    const yaml = require("js-yaml");
+
+    try {
+        return yaml.safeLoad(stripComments(readFile(filePath))) || /* istanbul ignore next */ {};
+    } catch (e) {
+        debug(`Error reading YAML file: ${filePath}`);
+        e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
+        throw e;
+    }
+}
+
+/**
+ * Loads a JavaScript configuration from a file.
+ * @param {string} filePath The filename to load.
+ * @returns {Object} The configuration object from the file.
+ * @throws {Error} If the file cannot be read.
+ * @private
+ */
+function loadJSConfigFile(filePath) {
+    debug(`Loading JS config file: ${filePath}`);
+    try {
+        return requireUncached(filePath);
+    } catch (e) {
+        debug(`Error reading JavaScript file: ${filePath}`);
+        e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
+        throw e;
+    }
+}
+
+/**
+ * Loads a configuration from a package.json file.
+ * @param {string} filePath The filename to load.
+ * @returns {Object} The configuration object from the file.
+ * @throws {Error} If the file cannot be read.
+ * @private
+ */
+function loadPackageJSONConfigFile(filePath) {
+    debug(`Loading package.json config file: ${filePath}`);
+    try {
+        return loadJSONConfigFile(filePath).eslintConfig || null;
+    } catch (e) {
+        debug(`Error reading package.json file: ${filePath}`);
+        e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
+        throw e;
+    }
+}
+
+/**
+ * Creates an error to notify about a missing config to extend from.
+ * @param {string} configName The name of the missing config.
+ * @returns {Error} The error object to throw
+ * @private
+ */
+function configMissingError(configName) {
+    const error = new Error(`Failed to load config "${configName}" to extend from.`);
+
+    error.messageTemplate = "extend-config-missing";
+    error.messageData = {
+        configName
+    };
+    return error;
+}
+
+/**
+ * Loads a configuration file regardless of the source. Inspects the file path
+ * to determine the correctly way to load the config file.
+ * @param {Object} file The path to the configuration.
+ * @returns {Object} The configuration information.
+ * @private
+ */
+function loadConfigFile(file) {
+    const filePath = file.filePath;
+    let config;
+
+    switch (path.extname(filePath)) {
+        case ".js":
+            config = loadJSConfigFile(filePath);
+            if (file.configName) {
+                config = config.configs[file.configName];
+                if (!config) {
+                    throw configMissingError(file.configFullName);
+                }
+            }
+            break;
+
+        case ".json":
+            if (path.basename(filePath) === "package.json") {
+                config = loadPackageJSONConfigFile(filePath);
+                if (config === null) {
+                    return null;
+                }
+            } else {
+                config = loadJSONConfigFile(filePath);
+            }
+            break;
+
+        case ".yaml":
+        case ".yml":
+            config = loadYAMLConfigFile(filePath);
+            break;
+
+        default:
+            config = loadLegacyConfigFile(filePath);
+    }
+
+    return ConfigOps.merge(ConfigOps.createEmptyConfig(), config);
+}
+
+/**
+ * Writes a configuration file in JSON format.
+ * @param {Object} config The configuration object to write.
+ * @param {string} filePath The filename to write to.
+ * @returns {void}
+ * @private
+ */
+function writeJSONConfigFile(config, filePath) {
+    debug(`Writing JSON config file: ${filePath}`);
+
+    const content = stringify(config, { cmp: sortByKey, space: 4 });
+
+    fs.writeFileSync(filePath, content, "utf8");
+}
+
+/**
+ * Writes a configuration file in YAML format.
+ * @param {Object} config The configuration object to write.
+ * @param {string} filePath The filename to write to.
+ * @returns {void}
+ * @private
+ */
+function writeYAMLConfigFile(config, filePath) {
+    debug(`Writing YAML config file: ${filePath}`);
+
+    // lazy load YAML to improve performance when not used
+    const yaml = require("js-yaml");
+
+    const content = yaml.safeDump(config, { sortKeys: true });
+
+    fs.writeFileSync(filePath, content, "utf8");
+}
+
+/**
+ * Writes a configuration file in JavaScript format.
+ * @param {Object} config The configuration object to write.
+ * @param {string} filePath The filename to write to.
+ * @returns {void}
+ * @private
+ */
+function writeJSConfigFile(config, filePath) {
+    debug(`Writing JS config file: ${filePath}`);
+
+    const content = `module.exports = ${stringify(config, { cmp: sortByKey, space: 4 })};`;
+
+    fs.writeFileSync(filePath, content, "utf8");
+}
+
+/**
+ * Writes a configuration file.
+ * @param {Object} config The configuration object to write.
+ * @param {string} filePath The filename to write to.
+ * @returns {void}
+ * @throws {Error} When an unknown file type is specified.
+ * @private
+ */
+function write(config, filePath) {
+    switch (path.extname(filePath)) {
+        case ".js":
+            writeJSConfigFile(config, filePath);
+            break;
+
+        case ".json":
+            writeJSONConfigFile(config, filePath);
+            break;
+
+        case ".yaml":
+        case ".yml":
+            writeYAMLConfigFile(config, filePath);
+            break;
+
+        default:
+            throw new Error("Can't write to unknown file type.");
+    }
+}
+
+/**
+ * Determines the base directory for node packages referenced in a config file.
+ * This does not include node_modules in the path so it can be used for all
+ * references relative to a config file.
+ * @param {string} configFilePath The config file referencing the file.
+ * @returns {string} The base directory for the file path.
+ * @private
+ */
+function getBaseDir(configFilePath) {
+
+    // calculates the path of the project including ESLint as dependency
+    const projectPath = path.resolve(__dirname, "../../../");
+
+    if (configFilePath && pathIsInside(configFilePath, projectPath)) {
+
+        // be careful of https://github.com/substack/node-resolve/issues/78
+        return path.join(path.resolve(configFilePath));
+    }
+
+    /*
+     * default to ESLint project path since it's unlikely that plugins will be
+     * in this directory
+     */
+    return path.join(projectPath);
+}
+
+/**
+ * Determines the lookup path, including node_modules, for package
+ * references relative to a config file.
+ * @param {string} configFilePath The config file referencing the file.
+ * @returns {string} The lookup path for the file path.
+ * @private
+ */
+function getLookupPath(configFilePath) {
+    const basedir = getBaseDir(configFilePath);
+
+    return path.join(basedir, "node_modules");
+}
+
+/**
+ * Resolves a eslint core config path
+ * @param {string} name The eslint config name.
+ * @returns {string} The resolved path of the config.
+ * @private
+ */
+function getEslintCoreConfigPath(name) {
+    if (name === "eslint:recommended") {
+
+        /*
+         * Add an explicit substitution for eslint:recommended to
+         * conf/eslint-recommended.js.
+         */
+        return path.resolve(__dirname, "../../conf/eslint-recommended.js");
+    }
+
+    if (name === "eslint:all") {
+
+        /*
+         * Add an explicit substitution for eslint:all to conf/eslint-all.js
+         */
+        return path.resolve(__dirname, "../../conf/eslint-all.js");
+    }
+
+    throw configMissingError(name);
+}
+
+/**
+ * Applies values from the "extends" field in a configuration file.
+ * @param {Object} config The configuration information.
+ * @param {Config} configContext Plugin context for the config instance
+ * @param {string} filePath The file path from which the configuration information
+ *      was loaded.
+ * @param {string} [relativeTo] The path to resolve relative to.
+ * @returns {Object} A new configuration object with all of the "extends" fields
+ *      loaded and merged.
+ * @private
+ */
+function applyExtends(config, configContext, filePath, relativeTo) {
+    let configExtends = config.extends;
+
+    // normalize into an array for easier handling
+    if (!Array.isArray(config.extends)) {
+        configExtends = [config.extends];
+    }
+
+    // Make the last element in an array take the highest precedence
+    config = configExtends.reduceRight((previousValue, parentPath) => {
+        try {
+            if (parentPath.startsWith("eslint:")) {
+                parentPath = getEslintCoreConfigPath(parentPath);
+            } else if (isFilePath(parentPath)) {
+
+                /*
+                 * If the `extends` path is relative, use the directory of the current configuration
+                 * file as the reference point. Otherwise, use as-is.
+                 */
+                parentPath = (path.isAbsolute(parentPath)
+                    ? parentPath
+                    : path.join(relativeTo || path.dirname(filePath), parentPath)
+                );
+            }
+            debug(`Loading ${parentPath}`);
+
+            // eslint-disable-next-line no-use-before-define
+            return ConfigOps.merge(load(parentPath, configContext, relativeTo), previousValue);
+        } catch (e) {
+
+            /*
+             * If the file referenced by `extends` failed to load, add the path
+             * to the configuration file that referenced it to the error
+             * message so the user is able to see where it was referenced from,
+             * then re-throw.
+             */
+            e.message += `\nReferenced from: ${filePath}`;
+            throw e;
+        }
+
+    }, config);
+
+    return config;
+}
+
+/**
+ * Resolves a configuration file path into the fully-formed path, whether filename
+ * or package name.
+ * @param {string} filePath The filepath to resolve.
+ * @param {string} [relativeTo] The path to resolve relative to.
+ * @returns {Object} An object containing 3 properties:
+ * - 'filePath' (required) the resolved path that can be used directly to load the configuration.
+ * - 'configName' the name of the configuration inside the plugin.
+ * - 'configFullName' (required) the name of the configuration as used in the eslint config(e.g. 'plugin:node/recommended'),
+ *     or the absolute path to a config file. This should uniquely identify a config.
+ * @private
+ */
+function resolve(filePath, relativeTo) {
+    if (isFilePath(filePath)) {
+        const fullPath = path.resolve(relativeTo || "", filePath);
+
+        return { filePath: fullPath, configFullName: fullPath };
+    }
+    let normalizedPackageName;
+
+    if (filePath.startsWith("plugin:")) {
+        const configFullName = filePath;
+        const pluginName = filePath.slice(7, filePath.lastIndexOf("/"));
+        const configName = filePath.slice(filePath.lastIndexOf("/") + 1);
+
+        normalizedPackageName = naming.normalizePackageName(pluginName, "eslint-plugin");
+        debug(`Attempting to resolve ${normalizedPackageName}`);
+        filePath = resolver.resolve(normalizedPackageName, getLookupPath(relativeTo));
+        return { filePath, configName, configFullName };
+    }
+    normalizedPackageName = naming.normalizePackageName(filePath, "eslint-config");
+    debug(`Attempting to resolve ${normalizedPackageName}`);
+    filePath = resolver.resolve(normalizedPackageName, getLookupPath(relativeTo));
+    return { filePath, configFullName: filePath };
+
+
+}
+
+/**
+ * Loads a configuration file from the given file path.
+ * @param {Object} resolvedPath The value from calling resolve() on a filename or package name.
+ * @param {Config} configContext Plugins context
+ * @returns {Object} The configuration information.
+ */
+function loadFromDisk(resolvedPath, configContext) {
+    const dirname = path.dirname(resolvedPath.filePath),
+        lookupPath = getLookupPath(dirname);
+    let config = loadConfigFile(resolvedPath);
+
+    if (config) {
+
+        // ensure plugins are properly loaded first
+        if (config.plugins) {
+            configContext.plugins.loadAll(config.plugins);
+        }
+
+        // include full path of parser if present
+        if (config.parser) {
+            if (isFilePath(config.parser)) {
+                config.parser = path.resolve(dirname || "", config.parser);
+            } else {
+                config.parser = resolver.resolve(config.parser, lookupPath);
+            }
+        }
+
+        const ruleMap = configContext.linterContext.getRules();
+
+        // validate the configuration before continuing
+        validator.validate(config, resolvedPath.configFullName, ruleMap.get.bind(ruleMap), configContext.linterContext.environments);
+
+        /*
+         * If an `extends` property is defined, it represents a configuration file to use as
+         * a "parent". Load the referenced file and merge the configuration recursively.
+         */
+        if (config.extends) {
+            config = applyExtends(config, configContext, resolvedPath.filePath, dirname);
+        }
+    }
+
+    return config;
+}
+
+/**
+ * Loads a config object, applying extends if present.
+ * @param {Object} configObject a config object to load
+ * @param {Config} configContext Context for the config instance
+ * @returns {Object} the config object with extends applied if present, or the passed config if not
+ * @private
+ */
+function loadObject(configObject, configContext) {
+    return configObject.extends ? applyExtends(configObject, configContext, "") : configObject;
+}
+
+/**
+ * Loads a config object from the config cache based on its filename, falling back to the disk if the file is not yet
+ * cached.
+ * @param {string} filePath the path to the config file
+ * @param {Config} configContext Context for the config instance
+ * @param {string} [relativeTo] The path to resolve relative to.
+ * @returns {Object} the parsed config object (empty object if there was a parse error)
+ * @private
+ */
+function load(filePath, configContext, relativeTo) {
+    const resolvedPath = resolve(filePath, relativeTo);
+
+    const cachedConfig = configContext.configCache.getConfig(resolvedPath.configFullName);
+
+    if (cachedConfig) {
+        return cachedConfig;
+    }
+
+    const config = loadFromDisk(resolvedPath, configContext);
+
+    if (config) {
+        config.filePath = resolvedPath.filePath;
+        config.baseDirectory = path.dirname(resolvedPath.filePath);
+        configContext.configCache.setConfig(resolvedPath.configFullName, config);
+    }
+
+    return config;
+}
+
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = {
+
+    getBaseDir,
+    getLookupPath,
+    load,
+    loadObject,
+    resolve,
+    write,
+    applyExtends,
+    CONFIG_FILES,
+
+    /**
+     * Retrieves the configuration filename for a given directory. It loops over all
+     * of the valid configuration filenames in order to find the first one that exists.
+     * @param {string} directory The directory to check for a config file.
+     * @returns {?string} The filename of the configuration file for the directory
+     *      or null if there is no configuration file in the directory.
+     */
+    getFilenameForDirectory(directory) {
+        for (let i = 0, len = CONFIG_FILES.length; i < len; i++) {
+            const filename = path.join(directory, CONFIG_FILES[i]);
+
+            if (fs.existsSync(filename) && fs.statSync(filename).isFile()) {
+                return filename;
+            }
+        }
+
+        return null;
+    }
+};
diff --git a/node_modules/eslint/lib/config/config-initializer.js b/node_modules/eslint/lib/config/config-initializer.js
new file mode 100644
index 0000000..e4865a0
--- /dev/null
+++ b/node_modules/eslint/lib/config/config-initializer.js
@@ -0,0 +1,605 @@
+/**
+ * @fileoverview Config initialization wizard.
+ * @author Ilya Volodin
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const util = require("util"),
+    inquirer = require("inquirer"),
+    ProgressBar = require("progress"),
+    semver = require("semver"),
+    autoconfig = require("./autoconfig.js"),
+    ConfigFile = require("./config-file"),
+    ConfigOps = require("./config-ops"),
+    getSourceCodeOfFiles = require("../util/source-code-util").getSourceCodeOfFiles,
+    ModuleResolver = require("../util/module-resolver"),
+    npmUtil = require("../util/npm-util"),
+    recConfig = require("../../conf/eslint-recommended"),
+    log = require("../logging");
+
+const debug = require("debug")("eslint:config-initializer");
+
+//------------------------------------------------------------------------------
+// Private
+//------------------------------------------------------------------------------
+
+/* istanbul ignore next: hard to test fs function */
+/**
+ * Create .eslintrc file in the current working directory
+ * @param {Object} config object that contains user's answers
+ * @param {string} format The file format to write to.
+ * @returns {void}
+ */
+function writeFile(config, format) {
+
+    // default is .js
+    let extname = ".js";
+
+    if (format === "YAML") {
+        extname = ".yml";
+    } else if (format === "JSON") {
+        extname = ".json";
+    }
+
+    const installedESLint = config.installedESLint;
+
+    delete config.installedESLint;
+
+    ConfigFile.write(config, `./.eslintrc${extname}`);
+    log.info(`Successfully created .eslintrc${extname} file in ${process.cwd()}`);
+
+    if (installedESLint) {
+        log.info("ESLint was installed locally. We recommend using this local copy instead of your globally-installed copy.");
+    }
+}
+
+/**
+ * Get the peer dependencies of the given module.
+ * This adds the gotten value to cache at the first time, then reuses it.
+ * In a process, this function is called twice, but `npmUtil.fetchPeerDependencies` needs to access network which is relatively slow.
+ * @param {string} moduleName The module name to get.
+ * @returns {Object} The peer dependencies of the given module.
+ * This object is the object of `peerDependencies` field of `package.json`.
+ * Returns null if npm was not found.
+ */
+function getPeerDependencies(moduleName) {
+    let result = getPeerDependencies.cache.get(moduleName);
+
+    if (!result) {
+        log.info(`Checking peerDependencies of ${moduleName}`);
+
+        result = npmUtil.fetchPeerDependencies(moduleName);
+        getPeerDependencies.cache.set(moduleName, result);
+    }
+
+    return result;
+}
+getPeerDependencies.cache = new Map();
+
+/**
+ * Synchronously install necessary plugins, configs, parsers, etc. based on the config
+ * @param   {Object} config  config object
+ * @param   {boolean} [installESLint=true]  If `false` is given, it does not install eslint.
+ * @returns {void}
+ */
+function installModules(config, installESLint) {
+    const modules = {};
+
+    // Create a list of modules which should be installed based on config
+    if (config.plugins) {
+        for (const plugin of config.plugins) {
+            modules[`eslint-plugin-${plugin}`] = "latest";
+        }
+    }
+    if (config.extends && config.extends.indexOf("eslint:") === -1) {
+        const moduleName = `eslint-config-${config.extends}`;
+
+        modules[moduleName] = "latest";
+        Object.assign(
+            modules,
+            getPeerDependencies(`${moduleName}@latest`)
+        );
+    }
+
+    // If no modules, do nothing.
+    if (Object.keys(modules).length === 0) {
+        return;
+    }
+
+    if (installESLint === false) {
+        delete modules.eslint;
+    } else {
+        const installStatus = npmUtil.checkDevDeps(["eslint"]);
+
+        // Mark to show messages if it's new installation of eslint.
+        if (installStatus.eslint === false) {
+            log.info("Local ESLint installation not found.");
+            modules.eslint = modules.eslint || "latest";
+            config.installedESLint = true;
+        }
+    }
+
+    // Install packages
+    const modulesToInstall = Object.keys(modules).map(name => `${name}@${modules[name]}`);
+
+    log.info(`Installing ${modulesToInstall.join(", ")}`);
+
+    npmUtil.installSyncSaveDev(modulesToInstall);
+}
+
+/**
+ * Set the `rules` of a config by examining a user's source code
+ *
+ * Note: This clones the config object and returns a new config to avoid mutating
+ * the original config parameter.
+ *
+ * @param   {Object} answers  answers received from inquirer
+ * @param   {Object} config   config object
+ * @returns {Object}          config object with configured rules
+ */
+function configureRules(answers, config) {
+    const BAR_TOTAL = 20,
+        BAR_SOURCE_CODE_TOTAL = 4,
+        newConfig = Object.assign({}, config),
+        disabledConfigs = {};
+    let sourceCodes,
+        registry;
+
+    // Set up a progress bar, as this process can take a long time
+    const bar = new ProgressBar("Determining Config: :percent [:bar] :elapseds elapsed, eta :etas ", {
+        width: 30,
+        total: BAR_TOTAL
+    });
+
+    bar.tick(0); // Shows the progress bar
+
+    // Get the SourceCode of all chosen files
+    const patterns = answers.patterns.split(/[\s]+/);
+
+    try {
+        sourceCodes = getSourceCodeOfFiles(patterns, { baseConfig: newConfig, useEslintrc: false }, total => {
+            bar.tick((BAR_SOURCE_CODE_TOTAL / total));
+        });
+    } catch (e) {
+        log.info("\n");
+        throw e;
+    }
+    const fileQty = Object.keys(sourceCodes).length;
+
+    if (fileQty === 0) {
+        log.info("\n");
+        throw new Error("Automatic Configuration failed.  No files were able to be parsed.");
+    }
+
+    // Create a registry of rule configs
+    registry = new autoconfig.Registry();
+    registry.populateFromCoreRules();
+
+    // Lint all files with each rule config in the registry
+    registry = registry.lintSourceCode(sourceCodes, newConfig, total => {
+        bar.tick((BAR_TOTAL - BAR_SOURCE_CODE_TOTAL) / total); // Subtract out ticks used at beginning
+    });
+    debug(`\nRegistry: ${util.inspect(registry.rules, { depth: null })}`);
+
+    // Create a list of recommended rules, because we don't want to disable them
+    const recRules = Object.keys(recConfig.rules).filter(ruleId => ConfigOps.isErrorSeverity(recConfig.rules[ruleId]));
+
+    // Find and disable rules which had no error-free configuration
+    const failingRegistry = registry.getFailingRulesRegistry();
+
+    Object.keys(failingRegistry.rules).forEach(ruleId => {
+
+        // If the rule is recommended, set it to error, otherwise disable it
+        disabledConfigs[ruleId] = (recRules.indexOf(ruleId) !== -1) ? 2 : 0;
+    });
+
+    // Now that we know which rules to disable, strip out configs with errors
+    registry = registry.stripFailingConfigs();
+
+    /*
+     * If there is only one config that results in no errors for a rule, we should use it.
+     * createConfig will only add rules that have one configuration in the registry.
+     */
+    const singleConfigs = registry.createConfig().rules;
+
+    /*
+     * The "sweet spot" for number of options in a config seems to be two (severity plus one option).
+     * Very often, a third option (usually an object) is available to address
+     * edge cases, exceptions, or unique situations. We will prefer to use a config with
+     * specificity of two.
+     */
+    const specTwoConfigs = registry.filterBySpecificity(2).createConfig().rules;
+
+    // Maybe a specific combination using all three options works
+    const specThreeConfigs = registry.filterBySpecificity(3).createConfig().rules;
+
+    // If all else fails, try to use the default (severity only)
+    const defaultConfigs = registry.filterBySpecificity(1).createConfig().rules;
+
+    // Combine configs in reverse priority order (later take precedence)
+    newConfig.rules = Object.assign({}, disabledConfigs, defaultConfigs, specThreeConfigs, specTwoConfigs, singleConfigs);
+
+    // Make sure progress bar has finished (floating point rounding)
+    bar.update(BAR_TOTAL);
+
+    // Log out some stats to let the user know what happened
+    const finalRuleIds = Object.keys(newConfig.rules);
+    const totalRules = finalRuleIds.length;
+    const enabledRules = finalRuleIds.filter(ruleId => (newConfig.rules[ruleId] !== 0)).length;
+    const resultMessage = [
+        `\nEnabled ${enabledRules} out of ${totalRules}`,
+        `rules based on ${fileQty}`,
+        `file${(fileQty === 1) ? "." : "s."}`
+    ].join(" ");
+
+    log.info(resultMessage);
+
+    ConfigOps.normalizeToStrings(newConfig);
+    return newConfig;
+}
+
+/**
+ * process user's answers and create config object
+ * @param {Object} answers answers received from inquirer
+ * @returns {Object} config object
+ */
+function processAnswers(answers) {
+    let config = { rules: {}, env: {} };
+
+    if (answers.es6) {
+        config.env.es6 = true;
+        if (answers.modules) {
+            config.parserOptions = config.parserOptions || {};
+            config.parserOptions.sourceType = "module";
+        }
+    }
+    if (answers.commonjs) {
+        config.env.commonjs = true;
+    }
+    answers.env.forEach(env => {
+        config.env[env] = true;
+    });
+    if (answers.jsx) {
+        config.parserOptions = config.parserOptions || {};
+        config.parserOptions.ecmaFeatures = config.parserOptions.ecmaFeatures || {};
+        config.parserOptions.ecmaFeatures.jsx = true;
+        if (answers.react) {
+            config.plugins = ["react"];
+            config.parserOptions.ecmaFeatures.experimentalObjectRestSpread = true;
+        }
+    }
+
+    if (answers.source === "prompt") {
+        config.extends = "eslint:recommended";
+        config.rules.indent = ["error", answers.indent];
+        config.rules.quotes = ["error", answers.quotes];
+        config.rules["linebreak-style"] = ["error", answers.linebreak];
+        config.rules.semi = ["error", answers.semi ? "always" : "never"];
+    }
+
+    installModules(config);
+
+    if (answers.source === "auto") {
+        config = configureRules(answers, config);
+        config = autoconfig.extendFromRecommended(config);
+    }
+
+    ConfigOps.normalizeToStrings(config);
+    return config;
+}
+
+/**
+ * process user's style guide of choice and return an appropriate config object.
+ * @param {string} guide name of the chosen style guide
+ * @param {boolean} [installESLint=true]  If `false` is given, it does not install eslint.
+ * @returns {Object} config object
+ */
+function getConfigForStyleGuide(guide, installESLint) {
+    const guides = {
+        google: { extends: "google" },
+        airbnb: { extends: "airbnb" },
+        "airbnb-base": { extends: "airbnb-base" },
+        standard: { extends: "standard" }
+    };
+
+    if (!guides[guide]) {
+        throw new Error("You referenced an unsupported guide.");
+    }
+
+    installModules(guides[guide], installESLint);
+
+    return guides[guide];
+}
+
+/**
+ * Get the version of the local ESLint.
+ * @returns {string|null} The version. If the local ESLint was not found, returns null.
+ */
+function getLocalESLintVersion() {
+    try {
+        const resolver = new ModuleResolver();
+        const eslintPath = resolver.resolve("eslint", process.cwd());
+        const eslint = require(eslintPath);
+
+        return eslint.linter.version || null;
+    } catch (_err) {
+        return null;
+    }
+}
+
+/**
+ * Get the shareable config name of the chosen style guide.
+ * @param {Object} answers The answers object.
+ * @returns {string} The shareable config name.
+ */
+function getStyleGuideName(answers) {
+    if (answers.styleguide === "airbnb" && !answers.airbnbReact) {
+        return "airbnb-base";
+    }
+    return answers.styleguide;
+}
+
+/**
+ * Check whether the local ESLint version conflicts with the required version of the chosen shareable config.
+ * @param {Object} answers The answers object.
+ * @returns {boolean} `true` if the local ESLint is found then it conflicts with the required version of the chosen shareable config.
+ */
+function hasESLintVersionConflict(answers) {
+
+    // Get the local ESLint version.
+    const localESLintVersion = getLocalESLintVersion();
+
+    if (!localESLintVersion) {
+        return false;
+    }
+
+    // Get the required range of ESLint version.
+    const configName = getStyleGuideName(answers);
+    const moduleName = `eslint-config-${configName}@latest`;
+    const peerDependencies = getPeerDependencies(moduleName) || {};
+    const requiredESLintVersionRange = peerDependencies.eslint;
+
+    if (!requiredESLintVersionRange) {
+        return false;
+    }
+
+    answers.localESLintVersion = localESLintVersion;
+    answers.requiredESLintVersionRange = requiredESLintVersionRange;
+
+    // Check the version.
+    if (semver.satisfies(localESLintVersion, requiredESLintVersionRange)) {
+        answers.installESLint = false;
+        return false;
+    }
+
+    return true;
+}
+
+/* istanbul ignore next: no need to test inquirer*/
+/**
+ * Ask use a few questions on command prompt
+ * @returns {Promise} The promise with the result of the prompt
+ */
+function promptUser() {
+
+    return inquirer.prompt([
+        {
+            type: "list",
+            name: "source",
+            message: "How would you like to configure ESLint?",
+            default: "prompt",
+            choices: [
+                { name: "Answer questions about your style", value: "prompt" },
+                { name: "Use a popular style guide", value: "guide" },
+                { name: "Inspect your JavaScript file(s)", value: "auto" }
+            ]
+        },
+        {
+            type: "list",
+            name: "styleguide",
+            message: "Which style guide do you want to follow?",
+            choices: [{ name: "Google", value: "google" }, { name: "Airbnb", value: "airbnb" }, { name: "Standard", value: "standard" }],
+            when(answers) {
+                answers.packageJsonExists = npmUtil.checkPackageJson();
+                return answers.source === "guide" && answers.packageJsonExists;
+            }
+        },
+        {
+            type: "confirm",
+            name: "airbnbReact",
+            message: "Do you use React?",
+            default: false,
+            when(answers) {
+                return answers.styleguide === "airbnb";
+            }
+        },
+        {
+            type: "input",
+            name: "patterns",
+            message: "Which file(s), path(s), or glob(s) should be examined?",
+            when(answers) {
+                return (answers.source === "auto");
+            },
+            validate(input) {
+                if (input.trim().length === 0 && input.trim() !== ",") {
+                    return "You must tell us what code to examine. Try again.";
+                }
+                return true;
+            }
+        },
+        {
+            type: "list",
+            name: "format",
+            message: "What format do you want your config file to be in?",
+            default: "JavaScript",
+            choices: ["JavaScript", "YAML", "JSON"],
+            when(answers) {
+                return ((answers.source === "guide" && answers.packageJsonExists) || answers.source === "auto");
+            }
+        },
+        {
+            type: "confirm",
+            name: "installESLint",
+            message(answers) {
+                const verb = semver.ltr(answers.localESLintVersion, answers.requiredESLintVersionRange)
+                    ? "upgrade"
+                    : "downgrade";
+
+                return `The style guide "${answers.styleguide}" requires eslint@${answers.requiredESLintVersionRange}. You are currently using eslint@${answers.localESLintVersion}.\n  Do you want to ${verb}?`;
+            },
+            default: true,
+            when(answers) {
+                return answers.source === "guide" && answers.packageJsonExists && hasESLintVersionConflict(answers);
+            }
+        }
+    ]).then(earlyAnswers => {
+
+        // early exit if you are using a style guide
+        if (earlyAnswers.source === "guide") {
+            if (!earlyAnswers.packageJsonExists) {
+                log.info("A package.json is necessary to install plugins such as style guides. Run `npm init` to create a package.json file and try again.");
+                return void 0;
+            }
+            if (earlyAnswers.installESLint === false && !semver.satisfies(earlyAnswers.localESLintVersion, earlyAnswers.requiredESLintVersionRange)) {
+                log.info(`Note: it might not work since ESLint's version is mismatched with the ${earlyAnswers.styleguide} config.`);
+            }
+            if (earlyAnswers.styleguide === "airbnb" && !earlyAnswers.airbnbReact) {
+                earlyAnswers.styleguide = "airbnb-base";
+            }
+
+            const config = getConfigForStyleGuide(earlyAnswers.styleguide, earlyAnswers.installESLint);
+
+            writeFile(config, earlyAnswers.format);
+
+            return void 0;
+        }
+
+        // continue with the questions otherwise...
+        return inquirer.prompt([
+            {
+                type: "confirm",
+                name: "es6",
+                message: "Are you using ECMAScript 6 features?",
+                default: false
+            },
+            {
+                type: "confirm",
+                name: "modules",
+                message: "Are you using ES6 modules?",
+                default: false,
+                when(answers) {
+                    return answers.es6 === true;
+                }
+            },
+            {
+                type: "checkbox",
+                name: "env",
+                message: "Where will your code run?",
+                default: ["browser"],
+                choices: [{ name: "Browser", value: "browser" }, { name: "Node", value: "node" }]
+            },
+            {
+                type: "confirm",
+                name: "commonjs",
+                message: "Do you use CommonJS?",
+                default: false,
+                when(answers) {
+                    return answers.env.some(env => env === "browser");
+                }
+            },
+            {
+                type: "confirm",
+                name: "jsx",
+                message: "Do you use JSX?",
+                default: false
+            },
+            {
+                type: "confirm",
+                name: "react",
+                message: "Do you use React?",
+                default: false,
+                when(answers) {
+                    return answers.jsx;
+                }
+            }
+        ]).then(secondAnswers => {
+
+            // early exit if you are using automatic style generation
+            if (earlyAnswers.source === "auto") {
+                const combinedAnswers = Object.assign({}, earlyAnswers, secondAnswers);
+
+                const config = processAnswers(combinedAnswers);
+
+                installModules(config);
+                writeFile(config, earlyAnswers.format);
+
+                return void 0;
+            }
+
+            // continue with the style questions otherwise...
+            return inquirer.prompt([
+                {
+                    type: "list",
+                    name: "indent",
+                    message: "What style of indentation do you use?",
+                    default: "tab",
+                    choices: [{ name: "Tabs", value: "tab" }, { name: "Spaces", value: 4 }]
+                },
+                {
+                    type: "list",
+                    name: "quotes",
+                    message: "What quotes do you use for strings?",
+                    default: "double",
+                    choices: [{ name: "Double", value: "double" }, { name: "Single", value: "single" }]
+                },
+                {
+                    type: "list",
+                    name: "linebreak",
+                    message: "What line endings do you use?",
+                    default: "unix",
+                    choices: [{ name: "Unix", value: "unix" }, { name: "Windows", value: "windows" }]
+                },
+                {
+                    type: "confirm",
+                    name: "semi",
+                    message: "Do you require semicolons?",
+                    default: true
+                },
+                {
+                    type: "list",
+                    name: "format",
+                    message: "What format do you want your config file to be in?",
+                    default: "JavaScript",
+                    choices: ["JavaScript", "YAML", "JSON"]
+                }
+            ]).then(answers => {
+                const totalAnswers = Object.assign({}, earlyAnswers, secondAnswers, answers);
+
+                const config = processAnswers(totalAnswers);
+
+                installModules(config);
+                writeFile(config, answers.format);
+            });
+        });
+    });
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+const init = {
+    getConfigForStyleGuide,
+    hasESLintVersionConflict,
+    processAnswers,
+    /* istanbul ignore next */initializeConfig() {
+        return promptUser();
+    }
+};
+
+module.exports = init;
diff --git a/node_modules/eslint/lib/config/config-ops.js b/node_modules/eslint/lib/config/config-ops.js
new file mode 100644
index 0000000..2ce500a
--- /dev/null
+++ b/node_modules/eslint/lib/config/config-ops.js
@@ -0,0 +1,383 @@
+/**
+ * @fileoverview Config file operations. This file must be usable in the browser,
+ * so no Node-specific code can be here.
+ * @author Nicholas C. Zakas
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const minimatch = require("minimatch"),
+    path = require("path");
+
+const debug = require("debug")("eslint:config-ops");
+
+//------------------------------------------------------------------------------
+// Private
+//------------------------------------------------------------------------------
+
+const RULE_SEVERITY_STRINGS = ["off", "warn", "error"],
+    RULE_SEVERITY = RULE_SEVERITY_STRINGS.reduce((map, value, index) => {
+        map[value] = index;
+        return map;
+    }, {}),
+    VALID_SEVERITIES = [0, 1, 2, "off", "warn", "error"];
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = {
+
+    /**
+     * Creates an empty configuration object suitable for merging as a base.
+     * @returns {Object} A configuration object.
+     */
+    createEmptyConfig() {
+        return {
+            globals: {},
+            env: {},
+            rules: {},
+            parserOptions: {}
+        };
+    },
+
+    /**
+     * Creates an environment config based on the specified environments.
+     * @param {Object} env The environment settings.
+     * @param {Environments} envContext The environment context.
+     * @returns {Object} A configuration object with the appropriate rules and globals
+     *      set.
+     */
+    createEnvironmentConfig(env, envContext) {
+
+        const envConfig = this.createEmptyConfig();
+
+        if (env) {
+
+            envConfig.env = env;
+
+            Object.keys(env).filter(name => env[name]).forEach(name => {
+                const environment = envContext.get(name);
+
+                if (environment) {
+                    debug(`Creating config for environment ${name}`);
+                    if (environment.globals) {
+                        Object.assign(envConfig.globals, environment.globals);
+                    }
+
+                    if (environment.parserOptions) {
+                        Object.assign(envConfig.parserOptions, environment.parserOptions);
+                    }
+                }
+            });
+        }
+
+        return envConfig;
+    },
+
+    /**
+     * Given a config with environment settings, applies the globals and
+     * ecmaFeatures to the configuration and returns the result.
+     * @param {Object} config The configuration information.
+     * @param {Environments} envContent env context.
+     * @returns {Object} The updated configuration information.
+     */
+    applyEnvironments(config, envContent) {
+        if (config.env && typeof config.env === "object") {
+            debug("Apply environment settings to config");
+            return this.merge(this.createEnvironmentConfig(config.env, envContent), config);
+        }
+
+        return config;
+    },
+
+    /**
+     * Merges two config objects. This will not only add missing keys, but will also modify values to match.
+     * @param {Object} target config object
+     * @param {Object} src config object. Overrides in this config object will take priority over base.
+     * @param {boolean} [combine] Whether to combine arrays or not
+     * @param {boolean} [isRule] Whether its a rule
+     * @returns {Object} merged config object.
+     */
+    merge: function deepmerge(target, src, combine, isRule) {
+
+        /*
+         * The MIT License (MIT)
+         *
+         * Copyright (c) 2012 Nicholas Fisher
+         *
+         * Permission is hereby granted, free of charge, to any person obtaining a copy
+         * of this software and associated documentation files (the "Software"), to deal
+         * in the Software without restriction, including without limitation the rights
+         * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+         * copies of the Software, and to permit persons to whom the Software is
+         * furnished to do so, subject to the following conditions:
+         *
+         * The above copyright notice and this permission notice shall be included in
+         * all copies or substantial portions of the Software.
+         *
+         * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+         * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+         * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+         * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+         * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+         * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+         * THE SOFTWARE.
+         */
+
+        /*
+         * This code is taken from deepmerge repo
+         * (https://github.com/KyleAMathews/deepmerge)
+         * and modified to meet our needs.
+         */
+        const array = Array.isArray(src) || Array.isArray(target);
+        let dst = array && [] || {};
+
+        combine = !!combine;
+        isRule = !!isRule;
+        if (array) {
+            target = target || [];
+
+            // src could be a string, so check for array
+            if (isRule && Array.isArray(src) && src.length > 1) {
+                dst = dst.concat(src);
+            } else {
+                dst = dst.concat(target);
+            }
+            if (typeof src !== "object" && !Array.isArray(src)) {
+                src = [src];
+            }
+            Object.keys(src).forEach((e, i) => {
+                e = src[i];
+                if (typeof dst[i] === "undefined") {
+                    dst[i] = e;
+                } else if (typeof e === "object") {
+                    if (isRule) {
+                        dst[i] = e;
+                    } else {
+                        dst[i] = deepmerge(target[i], e, combine, isRule);
+                    }
+                } else {
+                    if (!combine) {
+                        dst[i] = e;
+                    } else {
+                        if (dst.indexOf(e) === -1) {
+                            dst.push(e);
+                        }
+                    }
+                }
+            });
+        } else {
+            if (target && typeof target === "object") {
+                Object.keys(target).forEach(key => {
+                    dst[key] = target[key];
+                });
+            }
+            Object.keys(src).forEach(key => {
+                if (key === "overrides") {
+                    dst[key] = (target[key] || []).concat(src[key] || []);
+                } else if (Array.isArray(src[key]) || Array.isArray(target[key])) {
+                    dst[key] = deepmerge(target[key], src[key], key === "plugins" || key === "extends", isRule);
+                } else if (typeof src[key] !== "object" || !src[key] || key === "exported" || key === "astGlobals") {
+                    dst[key] = src[key];
+                } else {
+                    dst[key] = deepmerge(target[key] || {}, src[key], combine, key === "rules");
+                }
+            });
+        }
+
+        return dst;
+    },
+
+    /**
+     * Normalizes the severity value of a rule's configuration to a number
+     * @param {(number|string|[number, ...*]|[string, ...*])} ruleConfig A rule's configuration value, generally
+     * received from the user. A valid config value is either 0, 1, 2, the string "off" (treated the same as 0),
+     * the string "warn" (treated the same as 1), the string "error" (treated the same as 2), or an array
+     * whose first element is one of the above values. Strings are matched case-insensitively.
+     * @returns {(0|1|2)} The numeric severity value if the config value was valid, otherwise 0.
+     */
+    getRuleSeverity(ruleConfig) {
+        const severityValue = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;
+
+        if (severityValue === 0 || severityValue === 1 || severityValue === 2) {
+            return severityValue;
+        }
+
+        if (typeof severityValue === "string") {
+            return RULE_SEVERITY[severityValue.toLowerCase()] || 0;
+        }
+
+        return 0;
+    },
+
+    /**
+     * Converts old-style severity settings (0, 1, 2) into new-style
+     * severity settings (off, warn, error) for all rules. Assumption is that severity
+     * values have already been validated as correct.
+     * @param {Object} config The config object to normalize.
+     * @returns {void}
+     */
+    normalizeToStrings(config) {
+
+        if (config.rules) {
+            Object.keys(config.rules).forEach(ruleId => {
+                const ruleConfig = config.rules[ruleId];
+
+                if (typeof ruleConfig === "number") {
+                    config.rules[ruleId] = RULE_SEVERITY_STRINGS[ruleConfig] || RULE_SEVERITY_STRINGS[0];
+                } else if (Array.isArray(ruleConfig) && typeof ruleConfig[0] === "number") {
+                    ruleConfig[0] = RULE_SEVERITY_STRINGS[ruleConfig[0]] || RULE_SEVERITY_STRINGS[0];
+                }
+            });
+        }
+    },
+
+    /**
+     * Determines if the severity for the given rule configuration represents an error.
+     * @param {int|string|Array} ruleConfig The configuration for an individual rule.
+     * @returns {boolean} True if the rule represents an error, false if not.
+     */
+    isErrorSeverity(ruleConfig) {
+
+        let severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;
+
+        if (typeof severity === "string") {
+            severity = RULE_SEVERITY[severity.toLowerCase()] || 0;
+        }
+
+        return (typeof severity === "number" && severity === 2);
+    },
+
+    /**
+     * Checks whether a given config has valid severity or not.
+     * @param {number|string|Array} ruleConfig - The configuration for an individual rule.
+     * @returns {boolean} `true` if the configuration has valid severity.
+     */
+    isValidSeverity(ruleConfig) {
+        let severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;
+
+        if (typeof severity === "string") {
+            severity = severity.toLowerCase();
+        }
+        return VALID_SEVERITIES.indexOf(severity) !== -1;
+    },
+
+    /**
+     * Checks whether every rule of a given config has valid severity or not.
+     * @param {Object} config - The configuration for rules.
+     * @returns {boolean} `true` if the configuration has valid severity.
+     */
+    isEverySeverityValid(config) {
+        return Object.keys(config).every(ruleId => this.isValidSeverity(config[ruleId]));
+    },
+
+    /**
+     * Merges all configurations in a given config vector. A vector is an array of objects, each containing a config
+     * file path and a list of subconfig indices that match the current file path. All config data is assumed to be
+     * cached.
+     * @param {Array} vector list of config files and their subconfig indices that match the current file path
+     * @param {Object} configCache the config cache
+     * @returns {Object} config object
+     */
+    getConfigFromVector(vector, configCache) {
+
+        const cachedConfig = configCache.getMergedVectorConfig(vector);
+
+        if (cachedConfig) {
+            return cachedConfig;
+        }
+
+        debug("Using config from partial cache");
+
+        const subvector = Array.from(vector);
+        let nearestCacheIndex = subvector.length - 1,
+            partialCachedConfig;
+
+        while (nearestCacheIndex >= 0) {
+            partialCachedConfig = configCache.getMergedVectorConfig(subvector);
+            if (partialCachedConfig) {
+                break;
+            }
+            subvector.pop();
+            nearestCacheIndex--;
+        }
+
+        if (!partialCachedConfig) {
+            partialCachedConfig = {};
+        }
+
+        let finalConfig = partialCachedConfig;
+
+        // Start from entry immediately following nearest cached config (first uncached entry)
+        for (let i = nearestCacheIndex + 1; i < vector.length; i++) {
+            finalConfig = this.mergeVectorEntry(finalConfig, vector[i], configCache);
+            configCache.setMergedVectorConfig(vector.slice(0, i + 1), finalConfig);
+        }
+
+        return finalConfig;
+    },
+
+    /**
+     * Merges the config options from a single vector entry into the supplied config.
+     * @param {Object} config the base config to merge the vector entry's options into
+     * @param {Object} vectorEntry a single entry from a vector, consisting of a config file path and an array of
+     * matching override indices
+     * @param {Object} configCache the config cache
+     * @returns {Object} merged config object
+     */
+    mergeVectorEntry(config, vectorEntry, configCache) {
+        const vectorEntryConfig = Object.assign({}, configCache.getConfig(vectorEntry.filePath));
+        let mergedConfig = Object.assign({}, config),
+            overrides;
+
+        if (vectorEntryConfig.overrides) {
+            overrides = vectorEntryConfig.overrides.filter(
+                (override, overrideIndex) => vectorEntry.matchingOverrides.indexOf(overrideIndex) !== -1
+            );
+        } else {
+            overrides = [];
+        }
+
+        mergedConfig = this.merge(mergedConfig, vectorEntryConfig);
+
+        delete mergedConfig.overrides;
+
+        mergedConfig = overrides.reduce((lastConfig, override) => this.merge(lastConfig, override), mergedConfig);
+
+        if (mergedConfig.filePath) {
+            delete mergedConfig.filePath;
+            delete mergedConfig.baseDirectory;
+        } else if (mergedConfig.files) {
+            delete mergedConfig.files;
+        }
+
+        return mergedConfig;
+    },
+
+    /**
+     * Checks that the specified file path matches all of the supplied glob patterns.
+     * @param {string} filePath The file path to test patterns against
+     * @param {string|string[]} patterns One or more glob patterns, of which at least one should match the file path
+     * @param {string|string[]} [excludedPatterns] One or more glob patterns, of which none should match the file path
+     * @returns {boolean} True if all the supplied patterns match the file path, false otherwise
+     */
+    pathMatchesGlobs(filePath, patterns, excludedPatterns) {
+        const patternList = [].concat(patterns);
+        const excludedPatternList = [].concat(excludedPatterns || []);
+
+        patternList.concat(excludedPatternList).forEach(pattern => {
+            if (path.isAbsolute(pattern) || pattern.includes("..")) {
+                throw new Error(`Invalid override pattern (expected relative path not containing '..'): ${pattern}`);
+            }
+        });
+
+        const opts = { matchBase: true };
+
+        return patternList.some(pattern => minimatch(filePath, pattern, opts)) &&
+            !excludedPatternList.some(excludedPattern => minimatch(filePath, excludedPattern, opts));
+    }
+};
diff --git a/node_modules/eslint/lib/config/config-rule.js b/node_modules/eslint/lib/config/config-rule.js
new file mode 100644
index 0000000..5fc38ac
--- /dev/null
+++ b/node_modules/eslint/lib/config/config-rule.js
@@ -0,0 +1,322 @@
+/**
+ * @fileoverview Create configurations for a rule
+ * @author Ian VanSchooten
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const Rules = require("../rules"),
+    loadRules = require("../load-rules");
+
+const rules = new Rules();
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Wrap all of the elements of an array into arrays.
+ * @param   {*[]}     xs Any array.
+ * @returns {Array[]}    An array of arrays.
+ */
+function explodeArray(xs) {
+    return xs.reduce((accumulator, x) => {
+        accumulator.push([x]);
+        return accumulator;
+    }, []);
+}
+
+/**
+ * Mix two arrays such that each element of the second array is concatenated
+ * onto each element of the first array.
+ *
+ * For example:
+ * combineArrays([a, [b, c]], [x, y]); // -> [[a, x], [a, y], [b, c, x], [b, c, y]]
+ *
+ * @param   {array} arr1 The first array to combine.
+ * @param   {array} arr2 The second array to combine.
+ * @returns {array}      A mixture of the elements of the first and second arrays.
+ */
+function combineArrays(arr1, arr2) {
+    const res = [];
+
+    if (arr1.length === 0) {
+        return explodeArray(arr2);
+    }
+    if (arr2.length === 0) {
+        return explodeArray(arr1);
+    }
+    arr1.forEach(x1 => {
+        arr2.forEach(x2 => {
+            res.push([].concat(x1, x2));
+        });
+    });
+    return res;
+}
+
+/**
+ * Group together valid rule configurations based on object properties
+ *
+ * e.g.:
+ * groupByProperty([
+ *     {before: true},
+ *     {before: false},
+ *     {after: true},
+ *     {after: false}
+ * ]);
+ *
+ * will return:
+ * [
+ *     [{before: true}, {before: false}],
+ *     [{after: true}, {after: false}]
+ * ]
+ *
+ * @param   {Object[]} objects Array of objects, each with one property/value pair
+ * @returns {Array[]}          Array of arrays of objects grouped by property
+ */
+function groupByProperty(objects) {
+    const groupedObj = objects.reduce((accumulator, obj) => {
+        const prop = Object.keys(obj)[0];
+
+        accumulator[prop] = accumulator[prop] ? accumulator[prop].concat(obj) : [obj];
+        return accumulator;
+    }, {});
+
+    return Object.keys(groupedObj).map(prop => groupedObj[prop]);
+}
+
+
+//------------------------------------------------------------------------------
+// Private
+//------------------------------------------------------------------------------
+
+/**
+ * Configuration settings for a rule.
+ *
+ * A configuration can be a single number (severity), or an array where the first
+ * element in the array is the severity, and is the only required element.
+ * Configs may also have one or more additional elements to specify rule
+ * configuration or options.
+ *
+ * @typedef {array|number} ruleConfig
+ * @param {number}  0  The rule's severity (0, 1, 2).
+ */
+
+/**
+ * Object whose keys are rule names and values are arrays of valid ruleConfig items
+ * which should be linted against the target source code to determine error counts.
+ * (a ruleConfigSet.ruleConfigs).
+ *
+ * e.g. rulesConfig = {
+ *     "comma-dangle": [2, [2, "always"], [2, "always-multiline"], [2, "never"]],
+ *     "no-console": [2]
+ * }
+ * @typedef rulesConfig
+ */
+
+
+/**
+ * Create valid rule configurations by combining two arrays,
+ * with each array containing multiple objects each with a
+ * single property/value pair and matching properties.
+ *
+ * e.g.:
+ * combinePropertyObjects(
+ *     [{before: true}, {before: false}],
+ *     [{after: true}, {after: false}]
+ * );
+ *
+ * will return:
+ * [
+ *     {before: true, after: true},
+ *     {before: true, after: false},
+ *     {before: false, after: true},
+ *     {before: false, after: false}
+ * ]
+ *
+ * @param   {Object[]} objArr1 Single key/value objects, all with the same key
+ * @param   {Object[]} objArr2 Single key/value objects, all with another key
+ * @returns {Object[]}         Combined objects for each combination of input properties and values
+ */
+function combinePropertyObjects(objArr1, objArr2) {
+    const res = [];
+
+    if (objArr1.length === 0) {
+        return objArr2;
+    }
+    if (objArr2.length === 0) {
+        return objArr1;
+    }
+    objArr1.forEach(obj1 => {
+        objArr2.forEach(obj2 => {
+            const combinedObj = {};
+            const obj1Props = Object.keys(obj1);
+            const obj2Props = Object.keys(obj2);
+
+            obj1Props.forEach(prop1 => {
+                combinedObj[prop1] = obj1[prop1];
+            });
+            obj2Props.forEach(prop2 => {
+                combinedObj[prop2] = obj2[prop2];
+            });
+            res.push(combinedObj);
+        });
+    });
+    return res;
+}
+
+/**
+ * Creates a new instance of a rule configuration set
+ *
+ * A rule configuration set is an array of configurations that are valid for a
+ * given rule.  For example, the configuration set for the "semi" rule could be:
+ *
+ * ruleConfigSet.ruleConfigs // -> [[2], [2, "always"], [2, "never"]]
+ *
+ * Rule configuration set class
+ */
+class RuleConfigSet {
+
+    /**
+     * @param {ruleConfig[]} configs Valid rule configurations
+     */
+    constructor(configs) {
+
+        /**
+         * Stored valid rule configurations for this instance
+         * @type {array}
+         */
+        this.ruleConfigs = configs || [];
+    }
+
+    /**
+     * Add a severity level to the front of all configs in the instance.
+     * This should only be called after all configs have been added to the instance.
+     *
+     * @param {number} [severity=2] The level of severity for the rule (0, 1, 2)
+     * @returns {void}
+     */
+    addErrorSeverity(severity) {
+        severity = severity || 2;
+
+        this.ruleConfigs = this.ruleConfigs.map(config => {
+            config.unshift(severity);
+            return config;
+        });
+
+        // Add a single config at the beginning consisting of only the severity
+        this.ruleConfigs.unshift(severity);
+    }
+
+    /**
+     * Add rule configs from an array of strings (schema enums)
+     * @param  {string[]} enums Array of valid rule options (e.g. ["always", "never"])
+     * @returns {void}
+     */
+    addEnums(enums) {
+        this.ruleConfigs = this.ruleConfigs.concat(combineArrays(this.ruleConfigs, enums));
+    }
+
+    /**
+     * Add rule configurations from a schema object
+     * @param  {Object} obj Schema item with type === "object"
+     * @returns {boolean} true if at least one schema for the object could be generated, false otherwise
+     */
+    addObject(obj) {
+        const objectConfigSet = {
+            objectConfigs: [],
+            add(property, values) {
+                for (let idx = 0; idx < values.length; idx++) {
+                    const optionObj = {};
+
+                    optionObj[property] = values[idx];
+                    this.objectConfigs.push(optionObj);
+                }
+            },
+
+            combine() {
+                this.objectConfigs = groupByProperty(this.objectConfigs).reduce((accumulator, objArr) => combinePropertyObjects(accumulator, objArr), []);
+            }
+        };
+
+        /*
+         * The object schema could have multiple independent properties.
+         * If any contain enums or booleans, they can be added and then combined
+         */
+        Object.keys(obj.properties).forEach(prop => {
+            if (obj.properties[prop].enum) {
+                objectConfigSet.add(prop, obj.properties[prop].enum);
+            }
+            if (obj.properties[prop].type && obj.properties[prop].type === "boolean") {
+                objectConfigSet.add(prop, [true, false]);
+            }
+        });
+        objectConfigSet.combine();
+
+        if (objectConfigSet.objectConfigs.length > 0) {
+            this.ruleConfigs = this.ruleConfigs.concat(combineArrays(this.ruleConfigs, objectConfigSet.objectConfigs));
+            return true;
+        }
+
+        return false;
+    }
+}
+
+/**
+ * Generate valid rule configurations based on a schema object
+ * @param   {Object} schema  A rule's schema object
+ * @returns {array[]}        Valid rule configurations
+ */
+function generateConfigsFromSchema(schema) {
+    const configSet = new RuleConfigSet();
+
+    if (Array.isArray(schema)) {
+        for (const opt of schema) {
+            if (opt.enum) {
+                configSet.addEnums(opt.enum);
+            } else if (opt.type && opt.type === "object") {
+                if (!configSet.addObject(opt)) {
+                    break;
+                }
+
+            // TODO (IanVS): support oneOf
+            } else {
+
+                // If we don't know how to fill in this option, don't fill in any of the following options.
+                break;
+            }
+        }
+    }
+    configSet.addErrorSeverity();
+    return configSet.ruleConfigs;
+}
+
+/**
+ * Generate possible rule configurations for all of the core rules
+ * @returns {rulesConfig} Hash of rule names and arrays of possible configurations
+ */
+function createCoreRuleConfigs() {
+    const ruleList = loadRules();
+
+    return Object.keys(ruleList).reduce((accumulator, id) => {
+        const rule = rules.get(id);
+        const schema = (typeof rule === "function") ? rule.schema : rule.meta.schema;
+
+        accumulator[id] = generateConfigsFromSchema(schema);
+        return accumulator;
+    }, {});
+}
+
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = {
+    generateConfigsFromSchema,
+    createCoreRuleConfigs
+};
diff --git a/node_modules/eslint/lib/config/config-validator.js b/node_modules/eslint/lib/config/config-validator.js
new file mode 100644
index 0000000..1a5b3ef
--- /dev/null
+++ b/node_modules/eslint/lib/config/config-validator.js
@@ -0,0 +1,251 @@
+/**
+ * @fileoverview Validates configs.
+ * @author Brandon Mills
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const ajv = require("../util/ajv"),
+    lodash = require("lodash"),
+    configSchema = require("../../conf/config-schema.js"),
+    util = require("util");
+
+const ruleValidators = new WeakMap();
+
+//------------------------------------------------------------------------------
+// Private
+//------------------------------------------------------------------------------
+let validateSchema;
+
+/**
+ * Gets a complete options schema for a rule.
+ * @param {{create: Function, schema: (Array|null)}} rule A new-style rule object
+ * @returns {Object} JSON Schema for the rule's options.
+ */
+function getRuleOptionsSchema(rule) {
+    const schema = rule.schema || rule.meta && rule.meta.schema;
+
+    // Given a tuple of schemas, insert warning level at the beginning
+    if (Array.isArray(schema)) {
+        if (schema.length) {
+            return {
+                type: "array",
+                items: schema,
+                minItems: 0,
+                maxItems: schema.length
+            };
+        }
+        return {
+            type: "array",
+            minItems: 0,
+            maxItems: 0
+        };
+
+    }
+
+    // Given a full schema, leave it alone
+    return schema || null;
+}
+
+/**
+ * Validates a rule's severity and returns the severity value. Throws an error if the severity is invalid.
+ * @param {options} options The given options for the rule.
+ * @returns {number|string} The rule's severity value
+ */
+function validateRuleSeverity(options) {
+    const severity = Array.isArray(options) ? options[0] : options;
+
+    if (severity !== 0 && severity !== 1 && severity !== 2 && !(typeof severity === "string" && /^(?:off|warn|error)$/i.test(severity))) {
+        throw new Error(`\tSeverity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '${util.inspect(severity).replace(/'/g, "\"").replace(/\n/g, "")}').\n`);
+    }
+
+    return severity;
+}
+
+/**
+ * Validates the non-severity options passed to a rule, based on its schema.
+ * @param {{create: Function}} rule The rule to validate
+ * @param {array} localOptions The options for the rule, excluding severity
+ * @returns {void}
+ */
+function validateRuleSchema(rule, localOptions) {
+    if (!ruleValidators.has(rule)) {
+        const schema = getRuleOptionsSchema(rule);
+
+        if (schema) {
+            ruleValidators.set(rule, ajv.compile(schema));
+        }
+    }
+
+    const validateRule = ruleValidators.get(rule);
+
+    if (validateRule) {
+        validateRule(localOptions);
+        if (validateRule.errors) {
+            throw new Error(validateRule.errors.map(
+                error => `\tValue ${JSON.stringify(error.data)} ${error.message}.\n`
+            ).join(""));
+        }
+    }
+}
+
+/**
+ * Validates a rule's options against its schema.
+ * @param {{create: Function}|null} rule The rule that the config is being validated for
+ * @param {string} ruleId The rule's unique name.
+ * @param {array|number} options The given options for the rule.
+ * @param {string|null} source The name of the configuration source to report in any errors. If null or undefined,
+ * no source is prepended to the message.
+ * @returns {void}
+ */
+function validateRuleOptions(rule, ruleId, options, source) {
+    if (!rule) {
+        return;
+    }
+    try {
+        const severity = validateRuleSeverity(options);
+
+        if (severity !== 0 && !(typeof severity === "string" && severity.toLowerCase() === "off")) {
+            validateRuleSchema(rule, Array.isArray(options) ? options.slice(1) : []);
+        }
+    } catch (err) {
+        const enhancedMessage = `Configuration for rule "${ruleId}" is invalid:\n${err.message}`;
+
+        if (typeof source === "string") {
+            throw new Error(`${source}:\n\t${enhancedMessage}`);
+        } else {
+            throw new Error(enhancedMessage);
+        }
+    }
+}
+
+/**
+ * Validates an environment object
+ * @param {Object} environment The environment config object to validate.
+ * @param {string} source The name of the configuration source to report in any errors.
+ * @param {Environments} envContext Env context
+ * @returns {void}
+ */
+function validateEnvironment(environment, source, envContext) {
+
+    // not having an environment is ok
+    if (!environment) {
+        return;
+    }
+
+    Object.keys(environment).forEach(env => {
+        if (!envContext.get(env)) {
+            const message = `${source}:\n\tEnvironment key "${env}" is unknown\n`;
+
+            throw new Error(message);
+        }
+    });
+}
+
+/**
+ * Validates a rules config object
+ * @param {Object} rulesConfig The rules config object to validate.
+ * @param {string} source The name of the configuration source to report in any errors.
+ * @param {function(string): {create: Function}} ruleMapper A mapper function from strings to loaded rules
+ * @returns {void}
+ */
+function validateRules(rulesConfig, source, ruleMapper) {
+    if (!rulesConfig) {
+        return;
+    }
+
+    Object.keys(rulesConfig).forEach(id => {
+        validateRuleOptions(ruleMapper(id), id, rulesConfig[id], source);
+    });
+}
+
+/**
+ * Formats an array of schema validation errors.
+ * @param {Array} errors An array of error messages to format.
+ * @returns {string} Formatted error message
+ */
+function formatErrors(errors) {
+    return errors.map(error => {
+        if (error.keyword === "additionalProperties") {
+            const formattedPropertyPath = error.dataPath.length ? `${error.dataPath.slice(1)}.${error.params.additionalProperty}` : error.params.additionalProperty;
+
+            return `Unexpected top-level property "${formattedPropertyPath}"`;
+        }
+        if (error.keyword === "type") {
+            const formattedField = error.dataPath.slice(1);
+            const formattedExpectedType = Array.isArray(error.schema) ? error.schema.join("/") : error.schema;
+            const formattedValue = JSON.stringify(error.data);
+
+            return `Property "${formattedField}" is the wrong type (expected ${formattedExpectedType} but got \`${formattedValue}\`)`;
+        }
+
+        const field = error.dataPath[0] === "." ? error.dataPath.slice(1) : error.dataPath;
+
+        return `"${field}" ${error.message}. Value: ${JSON.stringify(error.data)}`;
+    }).map(message => `\t- ${message}.\n`).join("");
+}
+
+/**
+ * Emits a deprecation warning containing a given filepath. A new deprecation warning is emitted
+ * for each unique file path, but repeated invocations with the same file path have no effect.
+ * No warnings are emitted if the `--no-deprecation` or `--no-warnings` Node runtime flags are active.
+ * @param {string} source The name of the configuration source to report the warning for.
+ * @returns {void}
+ */
+const emitEcmaFeaturesWarning = lodash.memoize(source => {
+
+    /*
+     * util.deprecate seems to be the only way to emit a warning in Node 4.x while respecting the --no-warnings flag.
+     * (In Node 6+, process.emitWarning could be used instead.)
+     */
+    util.deprecate(
+        () => {},
+        `[eslint] The 'ecmaFeatures' config file property is deprecated, and has no effect. (found in ${source})`
+    )();
+});
+
+/**
+ * Validates the top level properties of the config object.
+ * @param {Object} config The config object to validate.
+ * @param {string} source The name of the configuration source to report in any errors.
+ * @returns {void}
+ */
+function validateConfigSchema(config, source) {
+    validateSchema = validateSchema || ajv.compile(configSchema);
+
+    if (!validateSchema(config)) {
+        throw new Error(`ESLint configuration in ${source} is invalid:\n${formatErrors(validateSchema.errors)}`);
+    }
+
+    if (Object.prototype.hasOwnProperty.call(config, "ecmaFeatures")) {
+        emitEcmaFeaturesWarning(source);
+    }
+}
+
+/**
+ * Validates an entire config object.
+ * @param {Object} config The config object to validate.
+ * @param {string} source The name of the configuration source to report in any errors.
+ * @param {function(string): {create: Function}} ruleMapper A mapper function from rule IDs to defined rules
+ * @param {Environments} envContext The env context
+ * @returns {void}
+ */
+function validate(config, source, ruleMapper, envContext) {
+    validateConfigSchema(config, source);
+    validateRules(config.rules, source, ruleMapper);
+    validateEnvironment(config.env, source, envContext);
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = {
+    getRuleOptionsSchema,
+    validate,
+    validateRuleOptions
+};
diff --git a/node_modules/eslint/lib/config/environments.js b/node_modules/eslint/lib/config/environments.js
new file mode 100644
index 0000000..1ec9438
--- /dev/null
+++ b/node_modules/eslint/lib/config/environments.js
@@ -0,0 +1,84 @@
+/**
+ * @fileoverview Environments manager
+ * @author Nicholas C. Zakas
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const envs = require("../../conf/environments");
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+class Environments {
+
+    /**
+     * create env context
+     */
+    constructor() {
+        this._environments = new Map();
+
+        this.load();
+    }
+
+    /**
+     * Loads the default environments.
+     * @returns {void}
+     * @private
+     */
+    load() {
+        Object.keys(envs).forEach(envName => {
+            this._environments.set(envName, envs[envName]);
+        });
+    }
+
+    /**
+     * Gets the environment with the given name.
+     * @param {string} name The name of the environment to retrieve.
+     * @returns {Object?} The environment object or null if not found.
+     */
+    get(name) {
+        return this._environments.get(name) || null;
+    }
+
+    /**
+     * Gets all the environment present
+     * @returns {Object} The environment object for each env name
+     */
+    getAll() {
+        return Array.from(this._environments).reduce((coll, env) => {
+            coll[env[0]] = env[1];
+            return coll;
+        }, {});
+    }
+
+    /**
+     * Defines an environment.
+     * @param {string} name The name of the environment.
+     * @param {Object} env The environment settings.
+     * @returns {void}
+     */
+    define(name, env) {
+        this._environments.set(name, env);
+    }
+
+    /**
+     * Imports all environments from a plugin.
+     * @param {Object} plugin The plugin object.
+     * @param {string} pluginName The name of the plugin.
+     * @returns {void}
+     */
+    importPlugin(plugin, pluginName) {
+        if (plugin.environments) {
+            Object.keys(plugin.environments).forEach(envName => {
+                this.define(`${pluginName}/${envName}`, plugin.environments[envName]);
+            });
+        }
+    }
+}
+
+module.exports = Environments;
diff --git a/node_modules/eslint/lib/config/plugins.js b/node_modules/eslint/lib/config/plugins.js
new file mode 100644
index 0000000..c509c48
--- /dev/null
+++ b/node_modules/eslint/lib/config/plugins.js
@@ -0,0 +1,150 @@
+/**
+ * @fileoverview Plugins manager
+ * @author Nicholas C. Zakas
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const debug = require("debug")("eslint:plugins");
+const naming = require("../util/naming");
+
+//------------------------------------------------------------------------------
+// Private
+//------------------------------------------------------------------------------
+
+const PLUGIN_NAME_PREFIX = "eslint-plugin-";
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+/**
+ * Plugin class
+ */
+class Plugins {
+
+    /**
+     * Creates the plugins context
+     * @param {Environments} envContext - env context
+     * @param {Rules} rulesContext - rules context
+     */
+    constructor(envContext, rulesContext) {
+        this._plugins = Object.create(null);
+        this._environments = envContext;
+        this._rules = rulesContext;
+    }
+
+    /**
+     * Defines a plugin with a given name rather than loading from disk.
+     * @param {string} pluginName The name of the plugin to load.
+     * @param {Object} plugin The plugin object.
+     * @returns {void}
+     */
+    define(pluginName, plugin) {
+        const pluginNamespace = naming.getNamespaceFromTerm(pluginName),
+            pluginNameWithoutNamespace = naming.removeNamespaceFromTerm(pluginName),
+            pluginNameWithoutPrefix = naming.removePrefixFromTerm(PLUGIN_NAME_PREFIX, pluginNameWithoutNamespace),
+            shortName = pluginNamespace + pluginNameWithoutPrefix;
+
+        // load up environments and rules
+        this._plugins[shortName] = plugin;
+        this._environments.importPlugin(plugin, shortName);
+        this._rules.importPlugin(plugin, shortName);
+    }
+
+    /**
+     * Gets a plugin with the given name.
+     * @param {string} pluginName The name of the plugin to retrieve.
+     * @returns {Object} The plugin or null if not loaded.
+     */
+    get(pluginName) {
+        return this._plugins[pluginName] || null;
+    }
+
+    /**
+     * Returns all plugins that are loaded.
+     * @returns {Object} The plugins cache.
+     */
+    getAll() {
+        return this._plugins;
+    }
+
+    /**
+     * Loads a plugin with the given name.
+     * @param {string} pluginName The name of the plugin to load.
+     * @returns {void}
+     * @throws {Error} If the plugin cannot be loaded.
+     */
+    load(pluginName) {
+        const pluginNamespace = naming.getNamespaceFromTerm(pluginName),
+            pluginNameWithoutNamespace = naming.removeNamespaceFromTerm(pluginName),
+            pluginNameWithoutPrefix = naming.removePrefixFromTerm(PLUGIN_NAME_PREFIX, pluginNameWithoutNamespace),
+            shortName = pluginNamespace + pluginNameWithoutPrefix,
+            longName = pluginNamespace + PLUGIN_NAME_PREFIX + pluginNameWithoutPrefix;
+        let plugin = null;
+
+        if (pluginName.match(/\s+/)) {
+            const whitespaceError = new Error(`Whitespace found in plugin name '${pluginName}'`);
+
+            whitespaceError.messageTemplate = "whitespace-found";
+            whitespaceError.messageData = {
+                pluginName: longName
+            };
+            throw whitespaceError;
+        }
+
+        if (!this._plugins[shortName]) {
+            try {
+                plugin = require(longName);
+            } catch (pluginLoadErr) {
+                try {
+
+                    // Check whether the plugin exists
+                    require.resolve(longName);
+                } catch (missingPluginErr) {
+
+                    // If the plugin can't be resolved, display the missing plugin error (usually a config or install error)
+                    debug(`Failed to load plugin ${longName}.`);
+                    missingPluginErr.message = `Failed to load plugin ${pluginName}: ${missingPluginErr.message}`;
+                    missingPluginErr.messageTemplate = "plugin-missing";
+                    missingPluginErr.messageData = {
+                        pluginName: longName
+                    };
+                    throw missingPluginErr;
+                }
+
+                // Otherwise, the plugin exists and is throwing on module load for some reason, so print the stack trace.
+                throw pluginLoadErr;
+            }
+
+            this.define(pluginName, plugin);
+        }
+    }
+
+    /**
+     * Loads all plugins from an array.
+     * @param {string[]} pluginNames An array of plugins names.
+     * @returns {void}
+     * @throws {Error} If a plugin cannot be loaded.
+     * @throws {Error} If "plugins" in config is not an array
+     */
+    loadAll(pluginNames) {
+
+        // if "plugins" in config is not an array, throw an error so user can fix their config.
+        if (!Array.isArray(pluginNames)) {
+            const pluginNotArrayMessage = "ESLint configuration error: \"plugins\" value must be an array";
+
+            debug(`${pluginNotArrayMessage}: ${JSON.stringify(pluginNames)}`);
+
+            throw new Error(pluginNotArrayMessage);
+        }
+
+        // load each plugin by name
+        pluginNames.forEach(this.load, this);
+    }
+}
+
+module.exports = Plugins;
diff --git a/node_modules/eslint/lib/file-finder.js b/node_modules/eslint/lib/file-finder.js
new file mode 100644
index 0000000..3458bbf
--- /dev/null
+++ b/node_modules/eslint/lib/file-finder.js
@@ -0,0 +1,145 @@
+/**
+ * @fileoverview Util class to find config files.
+ * @author Aliaksei Shytkin
+ */
+
+"use strict";
+
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+
+const fs = require("fs"),
+    path = require("path");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Get the entries for a directory. Including a try-catch may be detrimental to
+ * function performance, so move it out here a separate function.
+ * @param {string} directory The directory to search in.
+ * @returns {string[]} The entries in the directory or an empty array on error.
+ * @private
+ */
+function getDirectoryEntries(directory) {
+    try {
+
+        return fs.readdirSync(directory);
+    } catch (ex) {
+        return [];
+    }
+}
+
+/**
+ * Create a hash of filenames from a directory listing
+ * @param {string[]} entries Array of directory entries.
+ * @param {string} directory Path to a current directory.
+ * @param {string[]} supportedConfigs List of support filenames.
+ * @returns {Object} Hashmap of filenames
+ */
+function normalizeDirectoryEntries(entries, directory, supportedConfigs) {
+    const fileHash = {};
+
+    entries.forEach(entry => {
+        if (supportedConfigs.indexOf(entry) >= 0) {
+            const resolvedEntry = path.resolve(directory, entry);
+
+            if (fs.statSync(resolvedEntry).isFile()) {
+                fileHash[entry] = resolvedEntry;
+            }
+        }
+    });
+    return fileHash;
+}
+
+//------------------------------------------------------------------------------
+// API
+//------------------------------------------------------------------------------
+
+/**
+ * FileFinder class
+ */
+class FileFinder {
+
+    /**
+     * @param {string[]} files The basename(s) of the file(s) to find.
+     * @param {stirng} cwd Current working directory
+     */
+    constructor(files, cwd) {
+        this.fileNames = Array.isArray(files) ? files : [files];
+        this.cwd = cwd || process.cwd();
+        this.cache = {};
+    }
+
+    /**
+     * Find all instances of files with the specified file names, in directory and
+     * parent directories. Cache the results.
+     * Does not check if a matching directory entry is a file.
+     * Searches for all the file names in this.fileNames.
+     * Is currently used by lib/config.js to find .eslintrc and package.json files.
+     * @param  {string} directory The directory to start the search from.
+     * @returns {GeneratorFunction} to iterate the file paths found
+     */
+    *findAllInDirectoryAndParents(directory) {
+        const cache = this.cache;
+
+        if (directory) {
+            directory = path.resolve(this.cwd, directory);
+        } else {
+            directory = this.cwd;
+        }
+
+        if (cache.hasOwnProperty(directory)) {
+            yield* cache[directory];
+            return; // to avoid doing the normal loop afterwards
+        }
+
+        const dirs = [];
+        const fileNames = this.fileNames;
+        let searched = 0;
+
+        do {
+            dirs[searched++] = directory;
+            cache[directory] = [];
+
+            const filesMap = normalizeDirectoryEntries(getDirectoryEntries(directory), directory, fileNames);
+
+            if (Object.keys(filesMap).length) {
+                for (let k = 0; k < fileNames.length; k++) {
+
+                    if (filesMap[fileNames[k]]) {
+                        const filePath = filesMap[fileNames[k]];
+
+                        // Add the file path to the cache of each directory searched.
+                        for (let j = 0; j < searched; j++) {
+                            cache[dirs[j]].push(filePath);
+                        }
+                        yield filePath;
+                        break;
+                    }
+                }
+            }
+
+            const child = directory;
+
+            // Assign parent directory to directory.
+            directory = path.dirname(directory);
+
+            if (directory === child) {
+                return;
+            }
+
+        } while (!cache.hasOwnProperty(directory));
+
+        // Add what has been cached previously to the cache of each directory searched.
+        for (let i = 0; i < searched; i++) {
+            dirs.push.apply(cache[dirs[i]], cache[directory]);
+        }
+
+        yield* cache[dirs[0]];
+    }
+}
+
+module.exports = FileFinder;
diff --git a/node_modules/eslint/lib/formatters/checkstyle.js b/node_modules/eslint/lib/formatters/checkstyle.js
new file mode 100644
index 0000000..c807871
--- /dev/null
+++ b/node_modules/eslint/lib/formatters/checkstyle.js
@@ -0,0 +1,60 @@
+/**
+ * @fileoverview CheckStyle XML reporter
+ * @author Ian Christian Myers
+ */
+"use strict";
+
+const xmlEscape = require("../util/xml-escape");
+
+//------------------------------------------------------------------------------
+// Helper Functions
+//------------------------------------------------------------------------------
+
+/**
+ * Returns the severity of warning or error
+ * @param {Object} message message object to examine
+ * @returns {string} severity level
+ * @private
+ */
+function getMessageType(message) {
+    if (message.fatal || message.severity === 2) {
+        return "error";
+    }
+    return "warning";
+
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = function(results) {
+
+    let output = "";
+
+    output += "";
+    output += "";
+
+    results.forEach(result => {
+        const messages = result.messages;
+
+        output += ``;
+
+        messages.forEach(message => {
+            output += [
+                ``
+            ].join(" ");
+        });
+
+        output += "";
+
+    });
+
+    output += "";
+
+    return output;
+};
diff --git a/node_modules/eslint/lib/formatters/codeframe.js b/node_modules/eslint/lib/formatters/codeframe.js
new file mode 100644
index 0000000..0b97a0d
--- /dev/null
+++ b/node_modules/eslint/lib/formatters/codeframe.js
@@ -0,0 +1,138 @@
+/**
+ * @fileoverview Codeframe reporter
+ * @author Vitor Balocco
+ */
+"use strict";
+
+const chalk = require("chalk");
+const codeFrame = require("babel-code-frame");
+const path = require("path");
+
+//------------------------------------------------------------------------------
+// Helpers
+//------------------------------------------------------------------------------
+
+/**
+ * Given a word and a count, append an s if count is not one.
+ * @param   {string} word  A word in its singular form.
+ * @param   {number} count A number controlling whether word should be pluralized.
+ * @returns {string}       The original word with an s on the end if count is not one.
+ */
+function pluralize(word, count) {
+    return (count === 1 ? word : `${word}s`);
+}
+
+/**
+ * Gets a formatted relative file path from an absolute path and a line/column in the file.
+ * @param   {string} filePath The absolute file path to format.
+ * @param   {number} line     The line from the file to use for formatting.
+ * @param   {number} column   The column from the file to use for formatting.
+ * @returns {string}          The formatted file path.
+ */
+function formatFilePath(filePath, line, column) {
+    let relPath = path.relative(process.cwd(), filePath);
+
+    if (line && column) {
+        relPath += `:${line}:${column}`;
+    }
+
+    return chalk.green(relPath);
+}
+
+/**
+ * Gets the formatted output for a given message.
+ * @param   {Object} message      The object that represents this message.
+ * @param   {Object} parentResult The result object that this message belongs to.
+ * @returns {string}              The formatted output.
+ */
+function formatMessage(message, parentResult) {
+    const type = (message.fatal || message.severity === 2) ? chalk.red("error") : chalk.yellow("warning");
+    const msg = `${chalk.bold(message.message.replace(/([^ ])\.$/, "$1"))}`;
+    const ruleId = message.fatal ? "" : chalk.dim(`(${message.ruleId})`);
+    const filePath = formatFilePath(parentResult.filePath, message.line, message.column);
+    const sourceCode = parentResult.output ? parentResult.output : parentResult.source;
+
+    const firstLine = [
+        `${type}:`,
+        `${msg}`,
+        ruleId ? `${ruleId}` : "",
+        sourceCode ? `at ${filePath}:` : `at ${filePath}`
+    ].filter(String).join(" ");
+
+    const result = [firstLine];
+
+    if (sourceCode) {
+        result.push(
+            codeFrame(sourceCode, message.line, message.column, { highlightCode: false })
+        );
+    }
+
+    return result.join("\n");
+}
+
+/**
+ * Gets the formatted output summary for a given number of errors and warnings.
+ * @param   {number} errors   The number of errors.
+ * @param   {number} warnings The number of warnings.
+ * @param   {number} fixableErrors The number of fixable errors.
+ * @param   {number} fixableWarnings The number of fixable warnings.
+ * @returns {string}          The formatted output summary.
+ */
+function formatSummary(errors, warnings, fixableErrors, fixableWarnings) {
+    const summaryColor = errors > 0 ? "red" : "yellow";
+    const summary = [];
+    const fixablesSummary = [];
+
+    if (errors > 0) {
+        summary.push(`${errors} ${pluralize("error", errors)}`);
+    }
+
+    if (warnings > 0) {
+        summary.push(`${warnings} ${pluralize("warning", warnings)}`);
+    }
+
+    if (fixableErrors > 0) {
+        fixablesSummary.push(`${fixableErrors} ${pluralize("error", fixableErrors)}`);
+    }
+
+    if (fixableWarnings > 0) {
+        fixablesSummary.push(`${fixableWarnings} ${pluralize("warning", fixableWarnings)}`);
+    }
+
+    let output = chalk[summaryColor].bold(`${summary.join(" and ")} found.`);
+
+    if (fixableErrors || fixableWarnings) {
+        output += chalk[summaryColor].bold(`\n${fixablesSummary.join(" and ")} potentially fixable with the \`--fix\` option.`);
+    }
+
+    return output;
+}
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = function(results) {
+    let errors = 0;
+    let warnings = 0;
+    let fixableErrors = 0;
+    let fixableWarnings = 0;
+
+    const resultsWithMessages = results.filter(result => result.messages.length > 0);
+
+    let output = resultsWithMessages.reduce((resultsOutput, result) => {
+        const messages = result.messages.map(message => `${formatMessage(message, result)}\n\n`);
+
+        errors += result.errorCount;
+        warnings += result.warningCount;
+        fixableErrors += result.fixableErrorCount;
+        fixableWarnings += result.fixableWarningCount;
+
+        return resultsOutput.concat(messages);
+    }, []).join("\n");
+
+    output += "\n";
+    output += formatSummary(errors, warnings, fixableErrors, fixableWarnings);
+
+    return (errors + warnings) > 0 ? output : "";
+};
diff --git a/node_modules/eslint/lib/formatters/compact.js b/node_modules/eslint/lib/formatters/compact.js
new file mode 100644
index 0000000..2b540bd
--- /dev/null
+++ b/node_modules/eslint/lib/formatters/compact.js
@@ -0,0 +1,60 @@
+/**
+ * @fileoverview Compact reporter
+ * @author Nicholas C. Zakas
+ */
+"use strict";
+
+//------------------------------------------------------------------------------
+// Helper Functions
+//------------------------------------------------------------------------------
+
+/**
+ * Returns the severity of warning or error
+ * @param {Object} message message object to examine
+ * @returns {string} severity level
+ * @private
+ */
+function getMessageType(message) {
+    if (message.fatal || message.severity === 2) {
+        return "Error";
+    }
+    return "Warning";
+
+}
+
+
+//------------------------------------------------------------------------------
+// Public Interface
+//------------------------------------------------------------------------------
+
+module.exports = function(results) {
+
+    let output = "",
+        total = 0;
+
+    results.forEach(result => {
+
+        const messages = result.messages;
+
+        total += messages.length;
+
+        messages.forEach(message => {
+
+            output += `${result.filePath}: `;
+            output += `line ${message.line || 0}`;
+            output += `, col ${message.column || 0}`;
+            output += `, ${getMessageType(message)}`;
+            output += ` - ${message.message}`;
+            output += message.ruleId ? ` (${message.ruleId})` : "";
+            output += "\n";
+
+        });
+
+    });
+
+    if (total > 0) {
+        output += `\n${total} problem${total !== 1 ? "s" : ""}`;
+    }
+
+    return output;
+};
diff --git a/node_modules/eslint/lib/formatters/html-template-message.html b/node_modules/eslint/lib/formatters/html-template-message.html
new file mode 100644
index 0000000..66f49ff
--- /dev/null
+++ b/node_modules/eslint/lib/formatters/html-template-message.html
@@ -0,0 +1,8 @@
+
+    <%= lineNumber %>:<%= columnNumber %>
+    <%= severityName %>
+    <%- message %>
+    
+        <%= ruleId %>
+    
+
diff --git a/node_modules/eslint/lib/formatters/html-template-page.html b/node_modules/eslint/lib/formatters/html-template-page.html
new file mode 100644
index 0000000..4016576
--- /dev/null
+++ b/node_modules/eslint/lib/formatters/html-template-page.html
@@ -0,0 +1,115 @@
+
+
+    
+        
+        ESLint Report
+        
+    
+    
+        
+

ESLint Report

+
+ <%= reportSummary %> - Generated on <%= date %> +
+
+ + + <%= results %> + +
+ + + diff --git a/node_modules/eslint/lib/formatters/html-template-result.html b/node_modules/eslint/lib/formatters/html-template-result.html new file mode 100644 index 0000000..f4a5593 --- /dev/null +++ b/node_modules/eslint/lib/formatters/html-template-result.html @@ -0,0 +1,6 @@ + + + [+] <%- filePath %> + <%- summary %> + + diff --git a/node_modules/eslint/lib/formatters/html.js b/node_modules/eslint/lib/formatters/html.js new file mode 100644 index 0000000..d450f9d --- /dev/null +++ b/node_modules/eslint/lib/formatters/html.js @@ -0,0 +1,127 @@ +/** + * @fileoverview HTML reporter + * @author Julian Laval + */ +"use strict"; + +const lodash = require("lodash"); +const fs = require("fs"); +const path = require("path"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const pageTemplate = lodash.template(fs.readFileSync(path.join(__dirname, "html-template-page.html"), "utf-8")); +const messageTemplate = lodash.template(fs.readFileSync(path.join(__dirname, "html-template-message.html"), "utf-8")); +const resultTemplate = lodash.template(fs.readFileSync(path.join(__dirname, "html-template-result.html"), "utf-8")); + +/** + * Given a word and a count, append an s if count is not one. + * @param {string} word A word in its singular form. + * @param {int} count A number controlling whether word should be pluralized. + * @returns {string} The original word with an s on the end if count is not one. + */ +function pluralize(word, count) { + return (count === 1 ? word : `${word}s`); +} + +/** + * Renders text along the template of x problems (x errors, x warnings) + * @param {string} totalErrors Total errors + * @param {string} totalWarnings Total warnings + * @returns {string} The formatted string, pluralized where necessary + */ +function renderSummary(totalErrors, totalWarnings) { + const totalProblems = totalErrors + totalWarnings; + let renderedText = `${totalProblems} ${pluralize("problem", totalProblems)}`; + + if (totalProblems !== 0) { + renderedText += ` (${totalErrors} ${pluralize("error", totalErrors)}, ${totalWarnings} ${pluralize("warning", totalWarnings)})`; + } + return renderedText; +} + +/** + * Get the color based on whether there are errors/warnings... + * @param {string} totalErrors Total errors + * @param {string} totalWarnings Total warnings + * @returns {int} The color code (0 = green, 1 = yellow, 2 = red) + */ +function renderColor(totalErrors, totalWarnings) { + if (totalErrors !== 0) { + return 2; + } + if (totalWarnings !== 0) { + return 1; + } + return 0; +} + +/** + * Get HTML (table rows) describing the messages. + * @param {Array} messages Messages. + * @param {int} parentIndex Index of the parent HTML row. + * @returns {string} HTML (table rows) describing the messages. + */ +function renderMessages(messages, parentIndex) { + + /** + * Get HTML (table row) describing a message. + * @param {Object} message Message. + * @returns {string} HTML (table row) describing a message. + */ + return lodash.map(messages, message => { + const lineNumber = message.line || 0; + const columnNumber = message.column || 0; + + return messageTemplate({ + parentIndex, + lineNumber, + columnNumber, + severityNumber: message.severity, + severityName: message.severity === 1 ? "Warning" : "Error", + message: message.message, + ruleId: message.ruleId + }); + }).join("\n"); +} + +/** + * @param {Array} results Test results. + * @returns {string} HTML string describing the results. + */ +function renderResults(results) { + return lodash.map(results, (result, index) => resultTemplate({ + index, + color: renderColor(result.errorCount, result.warningCount), + filePath: result.filePath, + summary: renderSummary(result.errorCount, result.warningCount) + + }) + renderMessages(result.messages, index)).join("\n"); +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +module.exports = function(results) { + let totalErrors, + totalWarnings; + + totalErrors = 0; + totalWarnings = 0; + + // Iterate over results to get totals + results.forEach(result => { + totalErrors += result.errorCount; + totalWarnings += result.warningCount; + }); + + return pageTemplate({ + date: new Date(), + reportColor: renderColor(totalErrors, totalWarnings), + reportSummary: renderSummary(totalErrors, totalWarnings), + results: renderResults(results) + }); +}; diff --git a/node_modules/eslint/lib/formatters/jslint-xml.js b/node_modules/eslint/lib/formatters/jslint-xml.js new file mode 100644 index 0000000..1474343 --- /dev/null +++ b/node_modules/eslint/lib/formatters/jslint-xml.js @@ -0,0 +1,41 @@ +/** + * @fileoverview JSLint XML reporter + * @author Ian Christian Myers + */ +"use strict"; + +const xmlEscape = require("../util/xml-escape"); + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +module.exports = function(results) { + + let output = ""; + + output += ""; + output += ""; + + results.forEach(result => { + const messages = result.messages; + + output += ``; + + messages.forEach(message => { + output += [ + `` + ].join(" "); + }); + + output += ""; + + }); + + output += ""; + + return output; +}; diff --git a/node_modules/eslint/lib/formatters/json.js b/node_modules/eslint/lib/formatters/json.js new file mode 100644 index 0000000..82138af --- /dev/null +++ b/node_modules/eslint/lib/formatters/json.js @@ -0,0 +1,13 @@ +/** + * @fileoverview JSON reporter + * @author Burak Yigit Kaya aka BYK + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +module.exports = function(results) { + return JSON.stringify(results); +}; diff --git a/node_modules/eslint/lib/formatters/junit.js b/node_modules/eslint/lib/formatters/junit.js new file mode 100644 index 0000000..77d548f --- /dev/null +++ b/node_modules/eslint/lib/formatters/junit.js @@ -0,0 +1,70 @@ +/** + * @fileoverview jUnit Reporter + * @author Jamund Ferguson + */ +"use strict"; + +const xmlEscape = require("../util/xml-escape"); + +//------------------------------------------------------------------------------ +// Helper Functions +//------------------------------------------------------------------------------ + +/** + * Returns the severity of warning or error + * @param {Object} message message object to examine + * @returns {string} severity level + * @private + */ +function getMessageType(message) { + if (message.fatal || message.severity === 2) { + return "Error"; + } + return "Warning"; + +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +module.exports = function(results) { + + let output = ""; + + output += "\n"; + output += "\n"; + + results.forEach(result => { + + const messages = result.messages; + + if (messages.length > 0) { + output += `\n`; + messages.forEach(message => { + const type = message.fatal ? "error" : "failure"; + + output += ``; + output += `<${type} message="${xmlEscape(message.message || "")}">`; + output += ""; + output += ``; + output += "\n"; + }); + output += "\n"; + } else { + output += `\n`; + output += `\n`; + output += "\n"; + } + + }); + + output += "\n"; + + return output; +}; diff --git a/node_modules/eslint/lib/formatters/stylish.js b/node_modules/eslint/lib/formatters/stylish.js new file mode 100644 index 0000000..e586fe8 --- /dev/null +++ b/node_modules/eslint/lib/formatters/stylish.js @@ -0,0 +1,100 @@ +/** + * @fileoverview Stylish reporter + * @author Sindre Sorhus + */ +"use strict"; + +const chalk = require("chalk"), + stripAnsi = require("strip-ansi"), + table = require("text-table"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Given a word and a count, append an s if count is not one. + * @param {string} word A word in its singular form. + * @param {int} count A number controlling whether word should be pluralized. + * @returns {string} The original word with an s on the end if count is not one. + */ +function pluralize(word, count) { + return (count === 1 ? word : `${word}s`); +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +module.exports = function(results) { + + let output = "\n", + errorCount = 0, + warningCount = 0, + fixableErrorCount = 0, + fixableWarningCount = 0, + summaryColor = "yellow"; + + results.forEach(result => { + const messages = result.messages; + + if (messages.length === 0) { + return; + } + + errorCount += result.errorCount; + warningCount += result.warningCount; + fixableErrorCount += result.fixableErrorCount; + fixableWarningCount += result.fixableWarningCount; + + output += `${chalk.underline(result.filePath)}\n`; + + output += `${table( + messages.map(message => { + let messageType; + + if (message.fatal || message.severity === 2) { + messageType = chalk.red("error"); + summaryColor = "red"; + } else { + messageType = chalk.yellow("warning"); + } + + return [ + "", + message.line || 0, + message.column || 0, + messageType, + message.message.replace(/([^ ])\.$/, "$1"), + chalk.dim(message.ruleId || "") + ]; + }), + { + align: ["", "r", "l"], + stringLength(str) { + return stripAnsi(str).length; + } + } + ).split("\n").map(el => el.replace(/(\d+)\s+(\d+)/, (m, p1, p2) => chalk.dim(`${p1}:${p2}`))).join("\n")}\n\n`; + }); + + const total = errorCount + warningCount; + + if (total > 0) { + output += chalk[summaryColor].bold([ + "\u2716 ", total, pluralize(" problem", total), + " (", errorCount, pluralize(" error", errorCount), ", ", + warningCount, pluralize(" warning", warningCount), ")\n" + ].join("")); + + if (fixableErrorCount > 0 || fixableWarningCount > 0) { + output += chalk[summaryColor].bold([ + " ", fixableErrorCount, pluralize(" error", fixableErrorCount), ", ", + fixableWarningCount, pluralize(" warning", fixableWarningCount), + " potentially fixable with the `--fix` option.\n" + ].join("")); + } + } + + return total > 0 ? output : ""; +}; diff --git a/node_modules/eslint/lib/formatters/table.js b/node_modules/eslint/lib/formatters/table.js new file mode 100644 index 0000000..ebc3314 --- /dev/null +++ b/node_modules/eslint/lib/formatters/table.js @@ -0,0 +1,150 @@ +/** + * @fileoverview "table reporter. + * @author Gajus Kuizinas + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const chalk = require("chalk"), + table = require("table").table, + pluralize = require("pluralize"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Draws text table. + * @param {Array} messages Error messages relating to a specific file. + * @returns {string} A text table. + */ +function drawTable(messages) { + const rows = []; + + if (messages.length === 0) { + return ""; + } + + rows.push([ + chalk.bold("Line"), + chalk.bold("Column"), + chalk.bold("Type"), + chalk.bold("Message"), + chalk.bold("Rule ID") + ]); + + messages.forEach(message => { + let messageType; + + if (message.fatal || message.severity === 2) { + messageType = chalk.red("error"); + } else { + messageType = chalk.yellow("warning"); + } + + rows.push([ + message.line || 0, + message.column || 0, + messageType, + message.message, + message.ruleId || "" + ]); + }); + + return table(rows, { + columns: { + 0: { + width: 8, + wrapWord: true + }, + 1: { + width: 8, + wrapWord: true + }, + 2: { + width: 8, + wrapWord: true + }, + 3: { + paddingRight: 5, + width: 50, + wrapWord: true + }, + 4: { + width: 20, + wrapWord: true + } + }, + drawHorizontalLine(index) { + return index === 1; + } + }); +} + +/** + * Draws a report (multiple tables). + * @param {Array} results Report results for every file. + * @returns {string} A column of text tables. + */ +function drawReport(results) { + let files; + + files = results.map(result => { + if (!result.messages.length) { + return ""; + } + + return `\n${result.filePath}\n\n${drawTable(result.messages)}`; + }); + + files = files.filter(content => content.trim()); + + return files.join(""); +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +module.exports = function(report) { + let result, + errorCount, + warningCount; + + result = ""; + errorCount = 0; + warningCount = 0; + + report.forEach(fileReport => { + errorCount += fileReport.errorCount; + warningCount += fileReport.warningCount; + }); + + if (errorCount || warningCount) { + result = drawReport(report); + } + + result += `\n${table([ + [ + chalk.red(pluralize("Error", errorCount, true)) + ], + [ + chalk.yellow(pluralize("Warning", warningCount, true)) + ] + ], { + columns: { + 0: { + width: 110, + wrapWord: true + } + }, + drawHorizontalLine() { + return true; + } + })}`; + + return result; +}; diff --git a/node_modules/eslint/lib/formatters/tap.js b/node_modules/eslint/lib/formatters/tap.js new file mode 100644 index 0000000..9651a2b --- /dev/null +++ b/node_modules/eslint/lib/formatters/tap.js @@ -0,0 +1,92 @@ +/** + * @fileoverview TAP reporter + * @author Jonathan Kingston + */ +"use strict"; + +const yaml = require("js-yaml"); + +//------------------------------------------------------------------------------ +// Helper Functions +//------------------------------------------------------------------------------ + +/** + * Returns a canonical error level string based upon the error message passed in. + * @param {Object} message Individual error message provided by eslint + * @returns {string} Error level string + */ +function getMessageType(message) { + if (message.fatal || message.severity === 2) { + return "error"; + } + return "warning"; + +} + +/** + * Takes in a JavaScript object and outputs a TAP diagnostics string + * @param {Object} diagnostic JavaScript object to be embedded as YAML into output. + * @returns {string} diagnostics string with YAML embedded - TAP version 13 compliant + */ +function outputDiagnostics(diagnostic) { + const prefix = " "; + let output = `${prefix}---\n`; + + output += prefix + yaml.safeDump(diagnostic).split("\n").join(`\n${prefix}`); + output += "...\n"; + return output; +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +module.exports = function(results) { + let output = `TAP version 13\n1..${results.length}\n`; + + results.forEach((result, id) => { + const messages = result.messages; + let testResult = "ok"; + let diagnostics = {}; + + if (messages.length > 0) { + testResult = "not ok"; + + messages.forEach(message => { + const diagnostic = { + message: message.message, + severity: getMessageType(message), + data: { + line: message.line || 0, + column: message.column || 0, + ruleId: message.ruleId || "" + } + }; + + /* + * If we have multiple messages place them under a messages key + * The first error will be logged as message key + * This is to adhere to TAP 13 loosely defined specification of having a message key + */ + if ("message" in diagnostics) { + if (typeof diagnostics.messages === "undefined") { + diagnostics.messages = []; + } + diagnostics.messages.push(diagnostic); + } else { + diagnostics = diagnostic; + } + }); + } + + output += `${testResult} ${id + 1} - ${result.filePath}\n`; + + // If we have an error include diagnostics + if (messages.length > 0) { + output += outputDiagnostics(diagnostics); + } + + }); + + return output; +}; diff --git a/node_modules/eslint/lib/formatters/unix.js b/node_modules/eslint/lib/formatters/unix.js new file mode 100644 index 0000000..c6c4ebb --- /dev/null +++ b/node_modules/eslint/lib/formatters/unix.js @@ -0,0 +1,58 @@ +/** + * @fileoverview unix-style formatter. + * @author oshi-shinobu + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Helper Functions +//------------------------------------------------------------------------------ + +/** + * Returns a canonical error level string based upon the error message passed in. + * @param {Object} message Individual error message provided by eslint + * @returns {string} Error level string + */ +function getMessageType(message) { + if (message.fatal || message.severity === 2) { + return "Error"; + } + return "Warning"; + +} + + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +module.exports = function(results) { + + let output = "", + total = 0; + + results.forEach(result => { + + const messages = result.messages; + + total += messages.length; + + messages.forEach(message => { + + output += `${result.filePath}:`; + output += `${message.line || 0}:`; + output += `${message.column || 0}:`; + output += ` ${message.message} `; + output += `[${getMessageType(message)}${message.ruleId ? `/${message.ruleId}` : ""}]`; + output += "\n"; + + }); + + }); + + if (total > 0) { + output += `\n${total} problem${total !== 1 ? "s" : ""}`; + } + + return output; +}; diff --git a/node_modules/eslint/lib/formatters/visualstudio.js b/node_modules/eslint/lib/formatters/visualstudio.js new file mode 100644 index 0000000..0d49431 --- /dev/null +++ b/node_modules/eslint/lib/formatters/visualstudio.js @@ -0,0 +1,63 @@ +/** + * @fileoverview Visual Studio compatible formatter + * @author Ronald Pijnacker + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Helper Functions +//------------------------------------------------------------------------------ + +/** + * Returns the severity of warning or error + * @param {Object} message message object to examine + * @returns {string} severity level + * @private + */ +function getMessageType(message) { + if (message.fatal || message.severity === 2) { + return "error"; + } + return "warning"; + +} + + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +module.exports = function(results) { + + let output = "", + total = 0; + + results.forEach(result => { + + const messages = result.messages; + + total += messages.length; + + messages.forEach(message => { + + output += result.filePath; + output += `(${message.line || 0}`; + output += message.column ? `,${message.column}` : ""; + output += `): ${getMessageType(message)}`; + output += message.ruleId ? ` ${message.ruleId}` : ""; + output += ` : ${message.message}`; + output += "\n"; + + }); + + }); + + if (total === 0) { + output += "no problems"; + } else { + output += `\n${total} problem${total !== 1 ? "s" : ""}`; + } + + return output; +}; diff --git a/node_modules/eslint/lib/ignored-paths.js b/node_modules/eslint/lib/ignored-paths.js new file mode 100644 index 0000000..c02e83b --- /dev/null +++ b/node_modules/eslint/lib/ignored-paths.js @@ -0,0 +1,289 @@ +/** + * @fileoverview Responsible for loading ignore config files and managing ignore patterns + * @author Jonathan Rajavuori + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const fs = require("fs"), + path = require("path"), + ignore = require("ignore"), + pathUtil = require("./util/path-util"); + +const debug = require("debug")("eslint:ignored-paths"); + +//------------------------------------------------------------------------------ +// Constants +//------------------------------------------------------------------------------ + +const ESLINT_IGNORE_FILENAME = ".eslintignore"; + +/** + * Adds `"*"` at the end of `"node_modules/"`, + * so that subtle directories could be re-included by .gitignore patterns + * such as `"!node_modules/should_not_ignored"` + */ +const DEFAULT_IGNORE_DIRS = [ + "/node_modules/*", + "/bower_components/*" +]; +const DEFAULT_OPTIONS = { + dotfiles: false, + cwd: process.cwd() +}; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Find a file in the current directory. + * @param {string} cwd Current working directory + * @param {string} name File name + * @returns {string} Path of ignore file or an empty string. + */ +function findFile(cwd, name) { + const ignoreFilePath = path.resolve(cwd, name); + + return fs.existsSync(ignoreFilePath) && fs.statSync(ignoreFilePath).isFile() ? ignoreFilePath : ""; +} + +/** + * Find an ignore file in the current directory. + * @param {string} cwd Current working directory + * @returns {string} Path of ignore file or an empty string. + */ +function findIgnoreFile(cwd) { + return findFile(cwd, ESLINT_IGNORE_FILENAME); +} + +/** + * Find an package.json file in the current directory. + * @param {string} cwd Current working directory + * @returns {string} Path of package.json file or an empty string. + */ +function findPackageJSONFile(cwd) { + return findFile(cwd, "package.json"); +} + +/** + * Merge options with defaults + * @param {Object} options Options to merge with DEFAULT_OPTIONS constant + * @returns {Object} Merged options + */ +function mergeDefaultOptions(options) { + options = (options || {}); + return Object.assign({}, DEFAULT_OPTIONS, options); +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * IgnoredPaths class + */ +class IgnoredPaths { + + /** + * @param {Object} options object containing 'ignore', 'ignorePath' and 'patterns' properties + */ + constructor(options) { + options = mergeDefaultOptions(options); + this.cache = {}; + + /** + * add pattern to node-ignore instance + * @param {Object} ig, instance of node-ignore + * @param {string} pattern, pattern do add to ig + * @returns {array} raw ignore rules + */ + function addPattern(ig, pattern) { + return ig.addPattern(pattern); + } + + this.defaultPatterns = [].concat(DEFAULT_IGNORE_DIRS, options.patterns || []); + this.baseDir = options.cwd; + + this.ig = { + custom: ignore(), + default: ignore() + }; + + /* + * Add a way to keep track of ignored files. This was present in node-ignore + * 2.x, but dropped for now as of 3.0.10. + */ + this.ig.custom.ignoreFiles = []; + this.ig.default.ignoreFiles = []; + + if (options.dotfiles !== true) { + + /* + * ignore files beginning with a dot, but not files in a parent or + * ancestor directory (which in relative format will begin with `../`). + */ + addPattern(this.ig.default, [".*", "!../"]); + } + + addPattern(this.ig.default, this.defaultPatterns); + + if (options.ignore !== false) { + let ignorePath; + + if (options.ignorePath) { + debug("Using specific ignore file"); + + try { + fs.statSync(options.ignorePath); + ignorePath = options.ignorePath; + } catch (e) { + e.message = `Cannot read ignore file: ${options.ignorePath}\nError: ${e.message}`; + throw e; + } + } else { + debug(`Looking for ignore file in ${options.cwd}`); + ignorePath = findIgnoreFile(options.cwd); + + try { + fs.statSync(ignorePath); + debug(`Loaded ignore file ${ignorePath}`); + } catch (e) { + debug("Could not find ignore file in cwd"); + this.options = options; + } + } + + if (ignorePath) { + debug(`Adding ${ignorePath}`); + this.baseDir = path.dirname(path.resolve(options.cwd, ignorePath)); + this.addIgnoreFile(this.ig.custom, ignorePath); + this.addIgnoreFile(this.ig.default, ignorePath); + } else { + try { + + // if the ignoreFile does not exist, check package.json for eslintIgnore + const packageJSONPath = findPackageJSONFile(options.cwd); + + if (packageJSONPath) { + let packageJSONOptions; + + try { + packageJSONOptions = JSON.parse(fs.readFileSync(packageJSONPath, "utf8")); + } catch (e) { + debug("Could not read package.json file to check eslintIgnore property"); + throw e; + } + + if (packageJSONOptions.eslintIgnore) { + if (Array.isArray(packageJSONOptions.eslintIgnore)) { + packageJSONOptions.eslintIgnore.forEach(pattern => { + addPattern(this.ig.custom, pattern); + addPattern(this.ig.default, pattern); + }); + } else { + throw new TypeError("Package.json eslintIgnore property requires an array of paths"); + } + } + } + } catch (e) { + debug("Could not find package.json to check eslintIgnore property"); + throw e; + } + } + + if (options.ignorePattern) { + addPattern(this.ig.custom, options.ignorePattern); + addPattern(this.ig.default, options.ignorePattern); + } + } + + this.options = options; + } + + /** + * read ignore filepath + * @param {string} filePath, file to add to ig + * @returns {array} raw ignore rules + */ + readIgnoreFile(filePath) { + if (typeof this.cache[filePath] === "undefined") { + this.cache[filePath] = fs.readFileSync(filePath, "utf8"); + } + return this.cache[filePath]; + } + + /** + * add ignore file to node-ignore instance + * @param {Object} ig, instance of node-ignore + * @param {string} filePath, file to add to ig + * @returns {array} raw ignore rules + */ + addIgnoreFile(ig, filePath) { + ig.ignoreFiles.push(filePath); + return ig.add(this.readIgnoreFile(filePath)); + } + + /** + * Determine whether a file path is included in the default or custom ignore patterns + * @param {string} filepath Path to check + * @param {string} [category=null] check 'default', 'custom' or both (null) + * @returns {boolean} true if the file path matches one or more patterns, false otherwise + */ + contains(filepath, category) { + + let result = false; + const absolutePath = path.resolve(this.options.cwd, filepath); + const relativePath = pathUtil.getRelativePath(absolutePath, this.baseDir); + + if ((typeof category === "undefined") || (category === "default")) { + result = result || (this.ig.default.filter([relativePath]).length === 0); + } + + if ((typeof category === "undefined") || (category === "custom")) { + result = result || (this.ig.custom.filter([relativePath]).length === 0); + } + + return result; + + } + + /** + * Returns a list of dir patterns for glob to ignore + * @returns {function()} method to check whether a folder should be ignored by glob. + */ + getIgnoredFoldersGlobChecker() { + + const ig = ignore().add(DEFAULT_IGNORE_DIRS); + + if (this.options.dotfiles !== true) { + + // Ignore hidden folders. (This cannot be ".*", or else it's not possible to unignore hidden files) + ig.add([".*/*", "!../"]); + } + + if (this.options.ignore) { + ig.add(this.ig.custom); + } + + const filter = ig.createFilter(); + + const base = this.baseDir; + + return function(absolutePath) { + const relative = pathUtil.getRelativePath(absolutePath, base); + + if (!relative) { + return false; + } + + return !filter(relative); + }; + } +} + +module.exports = IgnoredPaths; diff --git a/node_modules/eslint/lib/linter.js b/node_modules/eslint/lib/linter.js new file mode 100644 index 0000000..8e95c3a --- /dev/null +++ b/node_modules/eslint/lib/linter.js @@ -0,0 +1,1185 @@ +/** + * @fileoverview Main Linter Class + * @author Gyandeep Singh + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const eslintScope = require("eslint-scope"), + evk = require("eslint-visitor-keys"), + levn = require("levn"), + lodash = require("lodash"), + blankScriptAST = require("../conf/blank-script.json"), + defaultConfig = require("../conf/default-config-options.js"), + CodePathAnalyzer = require("./code-path-analysis/code-path-analyzer"), + ConfigOps = require("./config/config-ops"), + validator = require("./config/config-validator"), + Environments = require("./config/environments"), + applyDisableDirectives = require("./util/apply-disable-directives"), + createEmitter = require("./util/safe-emitter"), + NodeEventGenerator = require("./util/node-event-generator"), + SourceCode = require("./util/source-code"), + Traverser = require("./util/traverser"), + createReportTranslator = require("./report-translator"), + Rules = require("./rules"), + timing = require("./timing"), + astUtils = require("./ast-utils"), + pkg = require("../package.json"), + SourceCodeFixer = require("./util/source-code-fixer"); + +const debug = require("debug")("eslint:linter"); +const MAX_AUTOFIX_PASSES = 10; + +//------------------------------------------------------------------------------ +// Typedefs +//------------------------------------------------------------------------------ + +/** + * The result of a parsing operation from parseForESLint() + * @typedef {Object} CustomParseResult + * @property {ASTNode} ast The ESTree AST Program node. + * @property {Object} services An object containing additional services related + * to the parser. + * @property {ScopeManager|null} scopeManager The scope manager object of this AST. + * @property {Object|null} visitorKeys The visitor keys to traverse this AST. + */ + +/** + * @typedef {Object} DisableDirective + * @property {("disable"|"enable"|"disable-line"|"disable-next-line")} type + * @property {number} line + * @property {number} column + * @property {(string|null)} ruleId + */ + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Parses a list of "name:boolean_value" or/and "name" options divided by comma or + * whitespace. + * @param {string} string The string to parse. + * @param {Comment} comment The comment node which has the string. + * @returns {Object} Result map object of names and boolean values + */ +function parseBooleanConfig(string, comment) { + const items = {}; + + // Collapse whitespace around `:` and `,` to make parsing easier + string = string.replace(/\s*([:,])\s*/g, "$1"); + + string.split(/\s|,+/).forEach(name => { + if (!name) { + return; + } + const pos = name.indexOf(":"); + let value; + + if (pos !== -1) { + value = name.slice(pos + 1); + name = name.slice(0, pos); + } + + items[name] = { + value: (value === "true"), + comment + }; + + }); + return items; +} + +/** + * Parses a JSON-like config. + * @param {string} string The string to parse. + * @param {Object} location Start line and column of comments for potential error message. + * @returns {({success: true, config: Object}|{success: false, error: Problem})} Result map object + */ +function parseJsonConfig(string, location) { + let items = {}; + + // Parses a JSON-like comment by the same way as parsing CLI option. + try { + items = levn.parse("Object", string) || {}; + + // Some tests say that it should ignore invalid comments such as `/*eslint no-alert:abc*/`. + // Also, commaless notations have invalid severity: + // "no-alert: 2 no-console: 2" --> {"no-alert": "2 no-console: 2"} + // Should ignore that case as well. + if (ConfigOps.isEverySeverityValid(items)) { + return { + success: true, + config: items + }; + } + } catch (ex) { + + // ignore to parse the string by a fallback. + } + + /* + * Optionator cannot parse commaless notations. + * But we are supporting that. So this is a fallback for that. + */ + items = {}; + string = string.replace(/([a-zA-Z0-9\-/]+):/g, "\"$1\":").replace(/(]|[0-9])\s+(?=")/, "$1,"); + try { + items = JSON.parse(`{${string}}`); + } catch (ex) { + return { + success: false, + error: { + ruleId: null, + fatal: true, + severity: 2, + source: null, + message: `Failed to parse JSON from '${string}': ${ex.message}`, + line: location.start.line, + column: location.start.column + 1 + } + }; + + } + + return { + success: true, + config: items + }; +} + +/** + * Parses a config of values separated by comma. + * @param {string} string The string to parse. + * @returns {Object} Result map of values and true values + */ +function parseListConfig(string) { + const items = {}; + + // Collapse whitespace around , + string = string.replace(/\s*,\s*/g, ","); + + string.split(/,+/).forEach(name => { + name = name.trim(); + if (!name) { + return; + } + items[name] = true; + }); + return items; +} + +/** + * Ensures that variables representing built-in properties of the Global Object, + * and any globals declared by special block comments, are present in the global + * scope. + * @param {Scope} globalScope The global scope. + * @param {Object} config The existing configuration data. + * @param {Environments} envContext Env context + * @returns {void} + */ +function addDeclaredGlobals(globalScope, config, envContext) { + const declaredGlobals = {}, + exportedGlobals = {}, + explicitGlobals = {}, + builtin = envContext.get("builtin"); + + Object.assign(declaredGlobals, builtin); + + Object.keys(config.env).filter(name => config.env[name]).forEach(name => { + const env = envContext.get(name), + environmentGlobals = env && env.globals; + + if (environmentGlobals) { + Object.assign(declaredGlobals, environmentGlobals); + } + }); + + Object.assign(exportedGlobals, config.exported); + Object.assign(declaredGlobals, config.globals); + Object.assign(explicitGlobals, config.astGlobals); + + Object.keys(declaredGlobals).forEach(name => { + let variable = globalScope.set.get(name); + + if (!variable) { + variable = new eslintScope.Variable(name, globalScope); + variable.eslintExplicitGlobal = false; + globalScope.variables.push(variable); + globalScope.set.set(name, variable); + } + variable.writeable = declaredGlobals[name]; + }); + + Object.keys(explicitGlobals).forEach(name => { + let variable = globalScope.set.get(name); + + if (!variable) { + variable = new eslintScope.Variable(name, globalScope); + variable.eslintExplicitGlobal = true; + variable.eslintExplicitGlobalComment = explicitGlobals[name].comment; + globalScope.variables.push(variable); + globalScope.set.set(name, variable); + } + variable.writeable = explicitGlobals[name].value; + }); + + // mark all exported variables as such + Object.keys(exportedGlobals).forEach(name => { + const variable = globalScope.set.get(name); + + if (variable) { + variable.eslintUsed = true; + } + }); + + /* + * "through" contains all references which definitions cannot be found. + * Since we augment the global scope using configuration, we need to update + * references and remove the ones that were added by configuration. + */ + globalScope.through = globalScope.through.filter(reference => { + const name = reference.identifier.name; + const variable = globalScope.set.get(name); + + if (variable) { + + /* + * Links the variable and the reference. + * And this reference is removed from `Scope#through`. + */ + reference.resolved = variable; + variable.references.push(reference); + + return false; + } + + return true; + }); +} + +/** + * Creates a collection of disable directives from a comment + * @param {("disable"|"enable"|"disable-line"|"disable-next-line")} type The type of directive comment + * @param {{line: number, column: number}} loc The 0-based location of the comment token + * @param {string} value The value after the directive in the comment + * comment specified no specific rules, so it applies to all rules (e.g. `eslint-disable`) + * @returns {DisableDirective[]} Directives from the comment + */ +function createDisableDirectives(type, loc, value) { + const ruleIds = Object.keys(parseListConfig(value)); + const directiveRules = ruleIds.length ? ruleIds : [null]; + + return directiveRules.map(ruleId => ({ type, line: loc.line, column: loc.column + 1, ruleId })); +} + +/** + * Parses comments in file to extract file-specific config of rules, globals + * and environments and merges them with global config; also code blocks + * where reporting is disabled or enabled and merges them with reporting config. + * @param {string} filename The file being checked. + * @param {ASTNode} ast The top node of the AST. + * @param {Object} config The existing configuration data. + * @param {function(string): {create: Function}} ruleMapper A map from rule IDs to defined rules + * @returns {{config: Object, problems: Problem[], disableDirectives: DisableDirective[]}} + * Modified config object, along with any problems encountered while parsing config comments + */ +function modifyConfigsFromComments(filename, ast, config, ruleMapper) { + + const commentConfig = { + exported: {}, + astGlobals: {}, + rules: {}, + env: {} + }; + const commentRules = {}; + const problems = []; + const disableDirectives = []; + + ast.comments.filter(token => token.type !== "Shebang").forEach(comment => { + + let value = comment.value.trim(); + const match = /^(eslint(-\w+){0,3}|exported|globals?)(\s|$)/.exec(value); + + if (match) { + value = value.slice(match.index + match[1].length); + if (comment.type === "Block") { + switch (match[1]) { + case "exported": + Object.assign(commentConfig.exported, parseBooleanConfig(value, comment)); + break; + + case "globals": + case "global": + Object.assign(commentConfig.astGlobals, parseBooleanConfig(value, comment)); + break; + + case "eslint-disable": + [].push.apply(disableDirectives, createDisableDirectives("disable", comment.loc.start, value)); + break; + + case "eslint-disable-line": + if (comment.loc.start.line === comment.loc.end.line) { + [].push.apply(disableDirectives, createDisableDirectives("disable-line", comment.loc.start, value)); + } + break; + + case "eslint-disable-next-line": + if (comment.loc.start.line === comment.loc.end.line) { + [].push.apply(disableDirectives, createDisableDirectives("disable-next-line", comment.loc.start, value)); + } + break; + + case "eslint-enable": + [].push.apply(disableDirectives, createDisableDirectives("enable", comment.loc.start, value)); + break; + + case "eslint": { + const parseResult = parseJsonConfig(value, comment.loc); + + if (parseResult.success) { + Object.keys(parseResult.config).forEach(name => { + const ruleValue = parseResult.config[name]; + + try { + validator.validateRuleOptions(ruleMapper(name), name, ruleValue); + } catch (err) { + problems.push({ + ruleId: name, + severity: 2, + source: null, + message: err.message, + line: comment.loc.start.line, + column: comment.loc.start.column + 1, + endLine: comment.loc.end.line, + endColumn: comment.loc.end.column + 1, + nodeType: null + }); + } + commentRules[name] = ruleValue; + }); + } else { + problems.push(parseResult.error); + } + + break; + } + + // no default + } + } else { // comment.type === "Line" + if (match[1] === "eslint-disable-line") { + [].push.apply(disableDirectives, createDisableDirectives("disable-line", comment.loc.start, value)); + } else if (match[1] === "eslint-disable-next-line") { + [].push.apply(disableDirectives, createDisableDirectives("disable-next-line", comment.loc.start, value)); + } + } + } + }); + + Object.assign(commentConfig.rules, commentRules); + + return { + config: ConfigOps.merge(config, commentConfig), + problems, + disableDirectives + }; +} + +/** + * Normalize ECMAScript version from the initial config + * @param {number} ecmaVersion ECMAScript version from the initial config + * @param {boolean} isModule Whether the source type is module or not + * @returns {number} normalized ECMAScript version + */ +function normalizeEcmaVersion(ecmaVersion, isModule) { + + // Need at least ES6 for modules + if (isModule && (!ecmaVersion || ecmaVersion < 6)) { + ecmaVersion = 6; + } + + /* + * Calculate ECMAScript edition number from official year version starting with + * ES2015, which corresponds with ES6 (or a difference of 2009). + */ + if (ecmaVersion >= 2015) { + ecmaVersion -= 2009; + } + + return ecmaVersion; +} + +/** + * Process initial config to make it safe to extend by file comment config + * @param {Object} config Initial config + * @param {Environments} envContext Env context + * @returns {Object} Processed config + */ +function prepareConfig(config, envContext) { + config.globals = config.globals || {}; + const copiedRules = {}; + let parserOptions = {}; + + if (typeof config.rules === "object") { + Object.keys(config.rules).forEach(k => { + const rule = config.rules[k]; + + if (rule === null) { + throw new Error(`Invalid config for rule '${k}'.`); + } + if (Array.isArray(rule)) { + copiedRules[k] = rule.slice(); + } else { + copiedRules[k] = rule; + } + }); + } + + // merge in environment parserOptions + if (typeof config.env === "object") { + Object.keys(config.env).forEach(envName => { + const env = envContext.get(envName); + + if (config.env[envName] && env && env.parserOptions) { + parserOptions = ConfigOps.merge(parserOptions, env.parserOptions); + } + }); + } + + const preparedConfig = { + rules: copiedRules, + parser: config.parser || defaultConfig.parser, + globals: ConfigOps.merge(defaultConfig.globals, config.globals), + env: ConfigOps.merge(defaultConfig.env, config.env || {}), + settings: ConfigOps.merge(defaultConfig.settings, config.settings || {}), + parserOptions: ConfigOps.merge(parserOptions, config.parserOptions || {}) + }; + const isModule = preparedConfig.parserOptions.sourceType === "module"; + + if (isModule) { + + // can't have global return inside of modules + preparedConfig.parserOptions.ecmaFeatures = Object.assign({}, preparedConfig.parserOptions.ecmaFeatures, { globalReturn: false }); + } + + preparedConfig.parserOptions.ecmaVersion = normalizeEcmaVersion(preparedConfig.parserOptions.ecmaVersion, isModule); + + return preparedConfig; +} + +const eslintEnvPattern = /\/\*\s*eslint-env\s(.+?)\*\//g; + +/** + * Checks whether or not there is a comment which has "eslint-env *" in a given text. + * @param {string} text - A source code text to check. + * @returns {Object|null} A result of parseListConfig() with "eslint-env *" comment. + */ +function findEslintEnv(text) { + let match, retv; + + eslintEnvPattern.lastIndex = 0; + + while ((match = eslintEnvPattern.exec(text))) { + retv = Object.assign(retv || {}, parseListConfig(match[1])); + } + + return retv; +} + +/** + * Strips Unicode BOM from a given text. + * + * @param {string} text - A text to strip. + * @returns {string} The stripped text. + */ +function stripUnicodeBOM(text) { + + /* + * Check Unicode BOM. + * In JavaScript, string data is stored as UTF-16, so BOM is 0xFEFF. + * http://www.ecma-international.org/ecma-262/6.0/#sec-unicode-format-control-characters + */ + if (text.charCodeAt(0) === 0xFEFF) { + return text.slice(1); + } + return text; +} + +/** + * Get the options for a rule (not including severity), if any + * @param {Array|number} ruleConfig rule configuration + * @returns {Array} of rule options, empty Array if none + */ +function getRuleOptions(ruleConfig) { + if (Array.isArray(ruleConfig)) { + return ruleConfig.slice(1); + } + return []; + +} + +/** + * Analyze scope of the given AST. + * @param {ASTNode} ast The `Program` node to analyze. + * @param {Object} parserOptions The parser options. + * @param {Object} visitorKeys The visitor keys. + * @returns {ScopeManager} The analysis result. + */ +function analyzeScope(ast, parserOptions, visitorKeys) { + const ecmaFeatures = parserOptions.ecmaFeatures || {}; + const ecmaVersion = parserOptions.ecmaVersion || 5; + + return eslintScope.analyze(ast, { + ignoreEval: true, + nodejsScope: ecmaFeatures.globalReturn, + impliedStrict: ecmaFeatures.impliedStrict, + ecmaVersion, + sourceType: parserOptions.sourceType || "script", + childVisitorKeys: visitorKeys || evk.KEYS, + fallback: Traverser.getKeys + }); +} + +/** + * Parses text into an AST. Moved out here because the try-catch prevents + * optimization of functions, so it's best to keep the try-catch as isolated + * as possible + * @param {string} text The text to parse. + * @param {Object} providedParserOptions Options to pass to the parser + * @param {Object} parser The parser module + * @param {string} filePath The path to the file being parsed. + * @returns {{success: false, error: Problem}|{success: true, sourceCode: SourceCode}} + * An object containing the AST and parser services if parsing was successful, or the error if parsing failed + * @private + */ +function parse(text, providedParserOptions, parser, filePath) { + const textToParse = stripUnicodeBOM(text).replace(astUtils.SHEBANG_MATCHER, (match, captured) => `//${captured}`); + const parserOptions = Object.assign({}, providedParserOptions, { + loc: true, + range: true, + raw: true, + tokens: true, + comment: true, + eslintVisitorKeys: true, + eslintScopeManager: true, + filePath + }); + + /* + * Check for parsing errors first. If there's a parsing error, nothing + * else can happen. However, a parsing error does not throw an error + * from this method - it's just considered a fatal error message, a + * problem that ESLint identified just like any other. + */ + try { + const parseResult = (typeof parser.parseForESLint === "function") + ? parser.parseForESLint(textToParse, parserOptions) + : { ast: parser.parse(textToParse, parserOptions) }; + const ast = parseResult.ast; + const parserServices = parseResult.services || {}; + const visitorKeys = parseResult.visitorKeys || evk.KEYS; + const scopeManager = parseResult.scopeManager || analyzeScope(ast, parserOptions, visitorKeys); + + return { + success: true, + + /* + * Save all values that `parseForESLint()` returned. + * If a `SourceCode` object is given as the first parameter instead of source code text, + * linter skips the parsing process and reuses the source code object. + * In that case, linter needs all the values that `parseForESLint()` returned. + */ + sourceCode: new SourceCode({ + text, + ast, + parserServices, + scopeManager, + visitorKeys + }) + }; + } catch (ex) { + + // If the message includes a leading line number, strip it: + const message = `Parsing error: ${ex.message.replace(/^line \d+:/i, "").trim()}`; + const source = ex.lineNumber ? SourceCode.splitLines(text)[ex.lineNumber - 1] : null; + + return { + success: false, + error: { + ruleId: null, + fatal: true, + severity: 2, + source, + message, + line: ex.lineNumber, + column: ex.column + } + }; + } +} + +/** + * Gets the scope for the current node + * @param {ScopeManager} scopeManager The scope manager for this AST + * @param {ASTNode} currentNode The node to get the scope of + * @param {number} ecmaVersion The `ecmaVersion` setting that this code was parsed with + * @returns {eslint-scope.Scope} The scope information for this node + */ +function getScope(scopeManager, currentNode, ecmaVersion) { + let initialNode; + + // if current node introduces a scope, add it to the list + if ( + ["FunctionDeclaration", "FunctionExpression", "ArrowFunctionExpression"].indexOf(currentNode.type) >= 0 || + ecmaVersion >= 6 && ["BlockStatement", "SwitchStatement", "CatchClause"].indexOf(currentNode.type) >= 0 + ) { + initialNode = currentNode; + } else { + initialNode = currentNode.parent; + } + + // Ascend the current node's parents + for (let node = initialNode; node; node = node.parent) { + + // Get the innermost scope + const scope = scopeManager.acquire(node, true); + + if (scope) { + if (scope.type === "function-expression-name") { + return scope.childScopes[0]; + } + return scope; + } + } + + return scopeManager.scopes[0]; +} + +/** + * Marks a variable as used in the current scope + * @param {ScopeManager} scopeManager The scope manager for this AST. The scope may be mutated by this function. + * @param {ASTNode} currentNode The node currently being traversed + * @param {Object} parserOptions The options used to parse this text + * @param {string} name The name of the variable that should be marked as used. + * @returns {boolean} True if the variable was found and marked as used, false if not. + */ +function markVariableAsUsed(scopeManager, currentNode, parserOptions, name) { + const hasGlobalReturn = parserOptions.ecmaFeatures && parserOptions.ecmaFeatures.globalReturn; + const specialScope = hasGlobalReturn || parserOptions.sourceType === "module"; + const currentScope = getScope(scopeManager, currentNode, parserOptions.ecmaVersion); + + // Special Node.js scope means we need to start one level deeper + const initialScope = currentScope.type === "global" && specialScope ? currentScope.childScopes[0] : currentScope; + + for (let scope = initialScope; scope; scope = scope.upper) { + const variable = scope.variables.find(scopeVar => scopeVar.name === name); + + if (variable) { + variable.eslintUsed = true; + return true; + } + } + + return false; +} + +// methods that exist on SourceCode object +const DEPRECATED_SOURCECODE_PASSTHROUGHS = { + getSource: "getText", + getSourceLines: "getLines", + getAllComments: "getAllComments", + getNodeByRangeIndex: "getNodeByRangeIndex", + getComments: "getComments", + getCommentsBefore: "getCommentsBefore", + getCommentsAfter: "getCommentsAfter", + getCommentsInside: "getCommentsInside", + getJSDocComment: "getJSDocComment", + getFirstToken: "getFirstToken", + getFirstTokens: "getFirstTokens", + getLastToken: "getLastToken", + getLastTokens: "getLastTokens", + getTokenAfter: "getTokenAfter", + getTokenBefore: "getTokenBefore", + getTokenByRangeStart: "getTokenByRangeStart", + getTokens: "getTokens", + getTokensAfter: "getTokensAfter", + getTokensBefore: "getTokensBefore", + getTokensBetween: "getTokensBetween" +}; + +const BASE_TRAVERSAL_CONTEXT = Object.freeze( + Object.keys(DEPRECATED_SOURCECODE_PASSTHROUGHS).reduce( + (contextInfo, methodName) => + Object.assign(contextInfo, { + [methodName]() { + const sourceCode = this.getSourceCode(); + + return sourceCode[DEPRECATED_SOURCECODE_PASSTHROUGHS[methodName]].apply(sourceCode, arguments); + } + }), + {} + ) +); + +const lastSourceCodes = new WeakMap(); + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Object that is responsible for verifying JavaScript text + * @name eslint + */ +module.exports = class Linter { + + constructor() { + lastSourceCodes.set(this, null); + this.version = pkg.version; + + this.rules = new Rules(); + this._parsers = new Map(); + this.environments = new Environments(); + } + + /** + * Configuration object for the `verify` API. A JS representation of the eslintrc files. + * @typedef {Object} ESLintConfig + * @property {Object} rules The rule configuration to verify against. + * @property {string} [parser] Parser to use when generatig the AST. + * @property {Object} [parserOptions] Options for the parsed used. + * @property {Object} [settings] Global settings passed to each rule. + * @property {Object} [env] The environment to verify in. + * @property {Object} [globals] Available globals to the code. + */ + + /** + * Same as linter.verify, except without support for processors. + * @param {string|SourceCode} textOrSourceCode The text to parse or a SourceCode object. + * @param {ESLintConfig} config An ESLintConfig instance to configure everything. + * @param {(string|Object)} [filenameOrOptions] The optional filename of the file being checked. + * If this is not set, the filename will default to '' in the rule context. If + * an object, then it has "filename", "saveState", and "allowInlineConfig" properties. + * @param {boolean} [filenameOrOptions.allowInlineConfig=true] Allow/disallow inline comments' ability to change config once it is set. Defaults to true if not supplied. + * Useful if you want to validate JS without comments overriding rules. + * @param {boolean} [filenameOrOptions.reportUnusedDisableDirectives=false] Adds reported errors for unused + * eslint-disable directives + * @returns {Object[]} The results as an array of messages or null if no messages. + */ + _verifyWithoutProcessors(textOrSourceCode, config, filenameOrOptions) { + let text, + allowInlineConfig, + providedFilename, + reportUnusedDisableDirectives; + + // evaluate arguments + if (typeof filenameOrOptions === "object") { + providedFilename = filenameOrOptions.filename; + allowInlineConfig = filenameOrOptions.allowInlineConfig; + reportUnusedDisableDirectives = filenameOrOptions.reportUnusedDisableDirectives; + } else { + providedFilename = filenameOrOptions; + } + + if (typeof textOrSourceCode === "string") { + lastSourceCodes.set(this, null); + text = textOrSourceCode; + } else { + lastSourceCodes.set(this, textOrSourceCode); + text = textOrSourceCode.text; + } + + const filename = typeof providedFilename === "string" ? providedFilename : ""; + + // search and apply "eslint-env *". + const envInFile = findEslintEnv(text); + + config = Object.assign({}, config); + + if (envInFile) { + if (config.env) { + config.env = Object.assign({}, config.env, envInFile); + } else { + config.env = envInFile; + } + } + + // process initial config to make it safe to extend + config = prepareConfig(config, this.environments); + + if (!lastSourceCodes.get(this)) { + + // there's no input, just exit here + if (text.trim().length === 0) { + lastSourceCodes.set(this, new SourceCode(text, blankScriptAST)); + return []; + } + + let parser; + + try { + parser = this._parsers.get(config.parser) || require(config.parser); + } catch (ex) { + return [{ + ruleId: null, + fatal: true, + severity: 2, + source: null, + message: ex.message, + line: 0, + column: 0 + }]; + } + const parseResult = parse( + text, + config.parserOptions, + parser, + filename + ); + + if (!parseResult.success) { + return [parseResult.error]; + } + + lastSourceCodes.set(this, parseResult.sourceCode); + } else { + + /* + * If the given source code object as the first argument does not have scopeManager, analyze the scope. + * This is for backward compatibility (SourceCode is frozen so it cannot rebind). + */ + const lastSourceCode = lastSourceCodes.get(this); + + if (!lastSourceCode.scopeManager) { + lastSourceCodes.set(this, new SourceCode({ + text: lastSourceCode.text, + ast: lastSourceCode.ast, + parserServices: lastSourceCode.parserServices, + visitorKeys: lastSourceCode.visitorKeys, + scopeManager: analyzeScope(lastSourceCode.ast, config.parserOptions) + })); + } + } + + const problems = []; + const sourceCode = lastSourceCodes.get(this); + let disableDirectives; + + // parse global comments and modify config + if (allowInlineConfig !== false) { + const modifyConfigResult = modifyConfigsFromComments(filename, sourceCode.ast, config, ruleId => this.rules.get(ruleId)); + + config = modifyConfigResult.config; + modifyConfigResult.problems.forEach(problem => problems.push(problem)); + disableDirectives = modifyConfigResult.disableDirectives; + } else { + disableDirectives = []; + } + + const emitter = createEmitter(); + const traverser = new Traverser(); + const scopeManager = sourceCode.scopeManager; + + /* + * Create a frozen object with the ruleContext properties and methods that are shared by all rules. + * All rule contexts will inherit from this object. This avoids the performance penalty of copying all the + * properties once for each rule. + */ + const sharedTraversalContext = Object.freeze( + Object.assign( + Object.create(BASE_TRAVERSAL_CONTEXT), + { + getAncestors: () => traverser.parents(), + getDeclaredVariables: scopeManager.getDeclaredVariables.bind(scopeManager), + getFilename: () => filename, + getScope: () => getScope(scopeManager, traverser.current(), config.parserOptions.ecmaVersion), + getSourceCode: () => sourceCode, + markVariableAsUsed: name => markVariableAsUsed(scopeManager, traverser.current(), config.parserOptions, name), + parserOptions: config.parserOptions, + parserPath: config.parser, + parserServices: sourceCode.parserServices, + settings: config.settings, + + /** + * This is used to avoid breaking rules that used to monkeypatch the `Linter#report` method + * by using the `_linter` property on rule contexts. + * + * This should be removed in a major release after we create a better way to + * lint for unused disable comments. + * https://github.com/eslint/eslint/issues/9193 + */ + _linter: { + report() {}, + on: emitter.on + } + } + ) + ); + + // enable appropriate rules + Object.keys(config.rules).forEach(ruleId => { + const severity = ConfigOps.getRuleSeverity(config.rules[ruleId]); + + if (severity === 0) { + return; + } + + const rule = this.rules.get(ruleId); + const messageIds = rule && rule.meta && rule.meta.messages; + let reportTranslator = null; + const ruleContext = Object.freeze( + Object.assign( + Object.create(sharedTraversalContext), + { + id: ruleId, + options: getRuleOptions(config.rules[ruleId]), + report() { + + /* + * Create a report translator lazily. + * In a vast majority of cases, any given rule reports zero errors on a given + * piece of code. Creating a translator lazily avoids the performance cost of + * creating a new translator function for each rule that usually doesn't get + * called. + * + * Using lazy report translators improves end-to-end performance by about 3% + * with Node 8.4.0. + */ + if (reportTranslator === null) { + reportTranslator = createReportTranslator({ ruleId, severity, sourceCode, messageIds }); + } + const problem = reportTranslator.apply(null, arguments); + + if (problem.fix && rule.meta && !rule.meta.fixable) { + throw new Error("Fixable rules should export a `meta.fixable` property."); + } + problems.push(problem); + + /* + * This is used to avoid breaking rules that used monkeypatch Linter, and relied on + * `linter.report` getting called with report info every time a rule reports a problem. + * To continue to support this, make sure that `context._linter.report` is called every + * time a problem is reported by a rule, even though `context._linter` is no longer a + * `Linter` instance. + * + * This should be removed in a major release after we create a better way to + * lint for unused disable comments. + * https://github.com/eslint/eslint/issues/9193 + */ + sharedTraversalContext._linter.report( // eslint-disable-line no-underscore-dangle + problem.ruleId, + problem.severity, + { loc: { start: { line: problem.line, column: problem.column - 1 } } }, + problem.message + ); + } + } + ) + ); + + try { + const ruleListeners = rule.create(ruleContext); + + // add all the selectors from the rule as listeners + Object.keys(ruleListeners).forEach(selector => { + emitter.on( + selector, + timing.enabled + ? timing.time(ruleId, ruleListeners[selector]) + : ruleListeners[selector] + ); + }); + } catch (ex) { + ex.message = `Error while loading rule '${ruleId}': ${ex.message}`; + throw ex; + } + }); + + // augment global scope with declared global variables + addDeclaredGlobals(scopeManager.scopes[0], config, this.environments); + + const eventGenerator = new CodePathAnalyzer(new NodeEventGenerator(emitter)); + + /* + * Each node has a type property. Whenever a particular type of + * node is found, an event is fired. This allows any listeners to + * automatically be informed that this type of node has been found + * and react accordingly. + */ + traverser.traverse(sourceCode.ast, { + enter(node, parent) { + node.parent = parent; + eventGenerator.enterNode(node); + }, + leave(node) { + eventGenerator.leaveNode(node); + }, + visitorKeys: sourceCode.visitorKeys + }); + + return applyDisableDirectives({ + directives: disableDirectives, + problems: problems.sort((problemA, problemB) => problemA.line - problemB.line || problemA.column - problemB.column), + reportUnusedDisableDirectives + }); + } + + /** + * Verifies the text against the rules specified by the second argument. + * @param {string|SourceCode} textOrSourceCode The text to parse or a SourceCode object. + * @param {ESLintConfig} config An ESLintConfig instance to configure everything. + * @param {(string|Object)} [filenameOrOptions] The optional filename of the file being checked. + * If this is not set, the filename will default to '' in the rule context. If + * an object, then it has "filename", "saveState", and "allowInlineConfig" properties. + * @param {boolean} [saveState] Indicates if the state from the last run should be saved. + * Mostly useful for testing purposes. + * @param {boolean} [filenameOrOptions.allowInlineConfig] Allow/disallow inline comments' ability to change config once it is set. Defaults to true if not supplied. + * Useful if you want to validate JS without comments overriding rules. + * @param {function(string): string[]} [filenameOrOptions.preprocess] preprocessor for source text. If provided, + * this should accept a string of source text, and return an array of code blocks to lint. + * @param {function(Array): Object[]} [filenameOrOptions.postprocess] postprocessor for report messages. If provided, + * this should accept an array of the message lists for each code block returned from the preprocessor, + * apply a mapping to the messages as appropriate, and return a one-dimensional array of messages + * @returns {Object[]} The results as an array of messages or null if no messages. + */ + verify(textOrSourceCode, config, filenameOrOptions) { + const preprocess = filenameOrOptions && filenameOrOptions.preprocess || (rawText => [rawText]); + const postprocess = filenameOrOptions && filenameOrOptions.postprocess || lodash.flatten; + + return postprocess( + preprocess(textOrSourceCode).map( + textBlock => this._verifyWithoutProcessors(textBlock, config, filenameOrOptions) + ) + ); + } + + /** + * Gets the SourceCode object representing the parsed source. + * @returns {SourceCode} The SourceCode object. + */ + getSourceCode() { + return lastSourceCodes.get(this); + } + + /** + * Defines a new linting rule. + * @param {string} ruleId A unique rule identifier + * @param {Function} ruleModule Function from context to object mapping AST node types to event handlers + * @returns {void} + */ + defineRule(ruleId, ruleModule) { + this.rules.define(ruleId, ruleModule); + } + + /** + * Defines many new linting rules. + * @param {Object} rulesToDefine map from unique rule identifier to rule + * @returns {void} + */ + defineRules(rulesToDefine) { + Object.getOwnPropertyNames(rulesToDefine).forEach(ruleId => { + this.defineRule(ruleId, rulesToDefine[ruleId]); + }); + } + + /** + * Gets an object with all loaded rules. + * @returns {Map} All loaded rules + */ + getRules() { + return this.rules.getAllLoadedRules(); + } + + /** + * Define a new parser module + * @param {any} parserId Name of the parser + * @param {any} parserModule The parser object + * @returns {void} + */ + defineParser(parserId, parserModule) { + this._parsers.set(parserId, parserModule); + } + + /** + * Performs multiple autofix passes over the text until as many fixes as possible + * have been applied. + * @param {string} text The source text to apply fixes to. + * @param {Object} config The ESLint config object to use. + * @param {Object} options The ESLint options object to use. + * @param {string} options.filename The filename from which the text was read. + * @param {boolean} options.allowInlineConfig Flag indicating if inline comments + * should be allowed. + * @param {boolean|Function} options.fix Determines whether fixes should be applied + * @param {Function} options.preprocess preprocessor for source text. If provided, this should + * accept a string of source text, and return an array of code blocks to lint. + * @param {Function} options.postprocess postprocessor for report messages. If provided, + * this should accept an array of the message lists for each code block returned from the preprocessor, + * apply a mapping to the messages as appropriate, and return a one-dimensional array of messages + * @returns {Object} The result of the fix operation as returned from the + * SourceCodeFixer. + */ + verifyAndFix(text, config, options) { + let messages = [], + fixedResult, + fixed = false, + passNumber = 0; + const debugTextDescription = options && options.filename || `${text.slice(0, 10)}...`; + const shouldFix = options && typeof options.fix !== "undefined" ? options.fix : true; + + /** + * This loop continues until one of the following is true: + * + * 1. No more fixes have been applied. + * 2. Ten passes have been made. + * + * That means anytime a fix is successfully applied, there will be another pass. + * Essentially, guaranteeing a minimum of two passes. + */ + do { + passNumber++; + + debug(`Linting code for ${debugTextDescription} (pass ${passNumber})`); + messages = this.verify(text, config, options); + + debug(`Generating fixed text for ${debugTextDescription} (pass ${passNumber})`); + fixedResult = SourceCodeFixer.applyFixes(text, messages, shouldFix); + + /* + * stop if there are any syntax errors. + * 'fixedResult.output' is a empty string. + */ + if (messages.length === 1 && messages[0].fatal) { + break; + } + + // keep track if any fixes were ever applied - important for return value + fixed = fixed || fixedResult.fixed; + + // update to use the fixed output instead of the original text + text = fixedResult.output; + + } while ( + fixedResult.fixed && + passNumber < MAX_AUTOFIX_PASSES + ); + + /* + * If the last result had fixes, we need to lint again to be sure we have + * the most up-to-date information. + */ + if (fixedResult.fixed) { + fixedResult.messages = this.verify(text, config, options); + } + + // ensure the last result properly reflects if fixes were done + fixedResult.fixed = fixed; + fixedResult.output = text; + + return fixedResult; + } +}; diff --git a/node_modules/eslint/lib/load-rules.js b/node_modules/eslint/lib/load-rules.js new file mode 100644 index 0000000..b74905d --- /dev/null +++ b/node_modules/eslint/lib/load-rules.js @@ -0,0 +1,50 @@ +/** + * @fileoverview Module for loading rules from files and directories. + * @author Michael Ficarra + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const fs = require("fs"), + path = require("path"); + +const rulesDirCache = {}; + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Load all rule modules from specified directory. + * @param {string} [rulesDir] Path to rules directory, may be relative. Defaults to `lib/rules`. + * @param {string} cwd Current working directory + * @returns {Object} Loaded rule modules by rule ids (file names). + */ +module.exports = function(rulesDir, cwd) { + if (!rulesDir) { + rulesDir = path.join(__dirname, "rules"); + } else { + rulesDir = path.resolve(cwd, rulesDir); + } + + // cache will help performance as IO operation are expensive + if (rulesDirCache[rulesDir]) { + return rulesDirCache[rulesDir]; + } + + const rules = Object.create(null); + + fs.readdirSync(rulesDir).forEach(file => { + if (path.extname(file) !== ".js") { + return; + } + rules[file.slice(0, -3)] = path.join(rulesDir, file); + }); + rulesDirCache[rulesDir] = rules; + + return rules; +}; diff --git a/node_modules/eslint/lib/logging.js b/node_modules/eslint/lib/logging.js new file mode 100644 index 0000000..22451e5 --- /dev/null +++ b/node_modules/eslint/lib/logging.js @@ -0,0 +1,28 @@ +/** + * @fileoverview Handle logging for ESLint + * @author Gyandeep Singh + */ + +"use strict"; + +/* eslint no-console: "off" */ + +/* istanbul ignore next */ +module.exports = { + + /** + * Cover for console.log + * @returns {void} + */ + info() { + console.log.apply(console, arguments); + }, + + /** + * Cover for console.error + * @returns {void} + */ + error() { + console.error.apply(console, arguments); + } +}; diff --git a/node_modules/eslint/lib/options.js b/node_modules/eslint/lib/options.js new file mode 100644 index 0000000..9265d15 --- /dev/null +++ b/node_modules/eslint/lib/options.js @@ -0,0 +1,241 @@ +/** + * @fileoverview Options configuration for optionator. + * @author George Zahariev + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const optionator = require("optionator"); + +//------------------------------------------------------------------------------ +// Initialization and Public Interface +//------------------------------------------------------------------------------ + +// exports "parse(args)", "generateHelp()", and "generateHelpForOption(optionName)" +module.exports = optionator({ + prepend: "eslint [options] file.js [file.js] [dir]", + defaults: { + concatRepeatedArrays: true, + mergeRepeatedObjects: true + }, + options: [ + { + heading: "Basic configuration" + }, + { + option: "eslintrc", + type: "Boolean", + default: "true", + description: "Disable use of configuration from .eslintrc.*" + }, + { + option: "config", + alias: "c", + type: "path::String", + description: "Use this configuration, overriding .eslintrc.* config options if present" + }, + { + option: "env", + type: "[String]", + description: "Specify environments" + }, + { + option: "ext", + type: "[String]", + default: ".js", + description: "Specify JavaScript file extensions" + }, + { + option: "global", + type: "[String]", + description: "Define global variables" + }, + { + option: "parser", + type: "String", + description: "Specify the parser to be used" + }, + { + option: "parser-options", + type: "Object", + description: "Specify parser options" + }, + { + heading: "Specifying rules and plugins" + }, + { + option: "rulesdir", + type: "[path::String]", + description: "Use additional rules from this directory" + }, + { + option: "plugin", + type: "[String]", + description: "Specify plugins" + }, + { + option: "rule", + type: "Object", + description: "Specify rules" + }, + { + heading: "Fixing problems" + }, + { + option: "fix", + type: "Boolean", + default: false, + description: "Automatically fix problems" + }, + { + option: "fix-dry-run", + type: "Boolean", + default: false, + description: "Automatically fix problems without saving the changes to the file system" + }, + { + heading: "Ignoring files" + }, + { + option: "ignore-path", + type: "path::String", + description: "Specify path of ignore file" + }, + { + option: "ignore", + type: "Boolean", + default: "true", + description: "Disable use of ignore files and patterns" + }, + { + option: "ignore-pattern", + type: "[String]", + description: "Pattern of files to ignore (in addition to those in .eslintignore)", + concatRepeatedArrays: [true, { + oneValuePerFlag: true + }] + }, + { + heading: "Using stdin" + }, + { + option: "stdin", + type: "Boolean", + default: "false", + description: "Lint code provided on " + }, + { + option: "stdin-filename", + type: "String", + description: "Specify filename to process STDIN as" + }, + { + heading: "Handling warnings" + }, + { + option: "quiet", + type: "Boolean", + default: "false", + description: "Report errors only" + }, + { + option: "max-warnings", + type: "Int", + default: "-1", + description: "Number of warnings to trigger nonzero exit code" + }, + { + heading: "Output" + }, + { + option: "output-file", + alias: "o", + type: "path::String", + description: "Specify file to write report to" + }, + { + option: "format", + alias: "f", + type: "String", + default: "stylish", + description: "Use a specific output format" + }, + { + option: "color", + type: "Boolean", + alias: "no-color", + description: "Force enabling/disabling of color" + }, + { + heading: "Inline configuration comments" + }, + { + option: "inline-config", + type: "Boolean", + default: "true", + description: "Prevent comments from changing config or rules" + }, + { + option: "report-unused-disable-directives", + type: "Boolean", + default: false, + description: "Adds reported errors for unused eslint-disable directives" + }, + { + heading: "Caching" + }, + { + option: "cache", + type: "Boolean", + default: "false", + description: "Only check changed files" + }, + { + option: "cache-file", + type: "path::String", + default: ".eslintcache", + description: "Path to the cache file. Deprecated: use --cache-location" + }, + { + option: "cache-location", + type: "path::String", + description: "Path to the cache file or directory" + }, + { + heading: "Miscellaneous" + }, + { + option: "init", + type: "Boolean", + default: "false", + description: "Run config initialization wizard" + }, + { + option: "debug", + type: "Boolean", + default: false, + description: "Output debugging information" + }, + { + option: "help", + alias: "h", + type: "Boolean", + description: "Show help" + }, + { + option: "version", + alias: "v", + type: "Boolean", + description: "Output the version number" + }, + { + option: "print-config", + type: "path::String", + description: "Print the configuration for the given file" + } + ] +}); diff --git a/node_modules/eslint/lib/report-translator.js b/node_modules/eslint/lib/report-translator.js new file mode 100644 index 0000000..7893a1f --- /dev/null +++ b/node_modules/eslint/lib/report-translator.js @@ -0,0 +1,286 @@ +/** + * @fileoverview A helper that translates context.report() calls from the rule API into generic problem objects + * @author Teddy Katz + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const assert = require("assert"); +const ruleFixer = require("./util/rule-fixer"); +const interpolate = require("./util/interpolate"); + +//------------------------------------------------------------------------------ +// Typedefs +//------------------------------------------------------------------------------ + +/** + * An error message description + * @typedef {Object} MessageDescriptor + * @property {ASTNode} [node] The reported node + * @property {Location} loc The location of the problem. + * @property {string} message The problem message. + * @property {Object} [data] Optional data to use to fill in placeholders in the + * message. + * @property {Function} [fix] The function to call that creates a fix command. + */ + +/** + * Information about the report + * @typedef {Object} ReportInfo + * @property {string} ruleId + * @property {(0|1|2)} severity + * @property {(string|undefined)} message + * @property {(string|undefined)} messageId + * @property {number} line + * @property {number} column + * @property {(number|undefined)} endLine + * @property {(number|undefined)} endColumn + * @property {(string|null)} nodeType + * @property {string} source + * @property {({text: string, range: (number[]|null)}|null)} fix + */ + +//------------------------------------------------------------------------------ +// Module Definition +//------------------------------------------------------------------------------ + + +/** + * Translates a multi-argument context.report() call into a single object argument call + * @param {...*} arguments A list of arguments passed to `context.report` + * @returns {MessageDescriptor} A normalized object containing report information + */ +function normalizeMultiArgReportCall() { + + // If there is one argument, it is considered to be a new-style call already. + if (arguments.length === 1) { + + // Shallow clone the object to avoid surprises if reusing the descriptor + return Object.assign({}, arguments[0]); + } + + // If the second argument is a string, the arguments are interpreted as [node, message, data, fix]. + if (typeof arguments[1] === "string") { + return { + node: arguments[0], + message: arguments[1], + data: arguments[2], + fix: arguments[3] + }; + } + + // Otherwise, the arguments are interpreted as [node, loc, message, data, fix]. + return { + node: arguments[0], + loc: arguments[1], + message: arguments[2], + data: arguments[3], + fix: arguments[4] + }; +} + +/** + * Asserts that either a loc or a node was provided, and the node is valid if it was provided. + * @param {MessageDescriptor} descriptor A descriptor to validate + * @returns {void} + * @throws AssertionError if neither a node nor a loc was provided, or if the node is not an object + */ +function assertValidNodeInfo(descriptor) { + if (descriptor.node) { + assert(typeof descriptor.node === "object", "Node must be an object"); + } else { + assert(descriptor.loc, "Node must be provided when reporting error if location is not provided"); + } +} + +/** + * Normalizes a MessageDescriptor to always have a `loc` with `start` and `end` properties + * @param {MessageDescriptor} descriptor A descriptor for the report from a rule. + * @returns {{start: Location, end: (Location|null)}} An updated location that infers the `start` and `end` properties + * from the `node` of the original descriptor, or infers the `start` from the `loc` of the original descriptor. + */ +function normalizeReportLoc(descriptor) { + if (descriptor.loc) { + if (descriptor.loc.start) { + return descriptor.loc; + } + return { start: descriptor.loc, end: null }; + } + return descriptor.node.loc; +} + +/** + * Interpolates data placeholders in report messages + * @param {MessageDescriptor} descriptor The report message descriptor. + * @returns {string} The interpolated message for the descriptor + */ +function normalizeMessagePlaceholders(descriptor) { + return interpolate(descriptor.message, descriptor.data); +} + +/** + * Compares items in a fixes array by range. + * @param {Fix} a The first message. + * @param {Fix} b The second message. + * @returns {int} -1 if a comes before b, 1 if a comes after b, 0 if equal. + * @private + */ +function compareFixesByRange(a, b) { + return a.range[0] - b.range[0] || a.range[1] - b.range[1]; +} + +/** + * Merges the given fixes array into one. + * @param {Fix[]} fixes The fixes to merge. + * @param {SourceCode} sourceCode The source code object to get the text between fixes. + * @returns {{text: string, range: number[]}} The merged fixes + */ +function mergeFixes(fixes, sourceCode) { + if (fixes.length === 0) { + return null; + } + if (fixes.length === 1) { + return fixes[0]; + } + + fixes.sort(compareFixesByRange); + + const originalText = sourceCode.text; + const start = fixes[0].range[0]; + const end = fixes[fixes.length - 1].range[1]; + let text = ""; + let lastPos = Number.MIN_SAFE_INTEGER; + + for (const fix of fixes) { + assert(fix.range[0] >= lastPos, "Fix objects must not be overlapped in a report."); + + if (fix.range[0] >= 0) { + text += originalText.slice(Math.max(0, start, lastPos), fix.range[0]); + } + text += fix.text; + lastPos = fix.range[1]; + } + text += originalText.slice(Math.max(0, start, lastPos), end); + + return { range: [start, end], text }; +} + +/** + * Gets one fix object from the given descriptor. + * If the descriptor retrieves multiple fixes, this merges those to one. + * @param {MessageDescriptor} descriptor The report descriptor. + * @param {SourceCode} sourceCode The source code object to get text between fixes. + * @returns {({text: string, range: number[]}|null)} The fix for the descriptor + */ +function normalizeFixes(descriptor, sourceCode) { + if (typeof descriptor.fix !== "function") { + return null; + } + + // @type {null | Fix | Fix[] | IterableIterator} + const fix = descriptor.fix(ruleFixer); + + // Merge to one. + if (fix && Symbol.iterator in fix) { + return mergeFixes(Array.from(fix), sourceCode); + } + return fix; +} + +/** + * Creates information about the report from a descriptor + * @param {Object} options Information about the problem + * @param {string} options.ruleId Rule ID + * @param {(0|1|2)} options.severity Rule severity + * @param {(ASTNode|null)} options.node Node + * @param {string} options.message Error message + * @param {{start: SourceLocation, end: (SourceLocation|null)}} options.loc Start and end location + * @param {{text: string, range: (number[]|null)}} options.fix The fix object + * @param {string[]} options.sourceLines Source lines + * @returns {function(...args): ReportInfo} Function that returns information about the report + */ +function createProblem(options) { + const problem = { + ruleId: options.ruleId, + severity: options.severity, + message: options.message, + line: options.loc.start.line, + column: options.loc.start.column + 1, + nodeType: options.node && options.node.type || null, + source: options.sourceLines[options.loc.start.line - 1] || "" + }; + + /* + * If this isn’t in the conditional, some of the tests fail + * because `messageId` is present in the problem object + */ + if (options.messageId) { + problem.messageId = options.messageId; + } + + if (options.loc.end) { + problem.endLine = options.loc.end.line; + problem.endColumn = options.loc.end.column + 1; + } + + if (options.fix) { + problem.fix = options.fix; + } + + return problem; +} + +/** + * Returns a function that converts the arguments of a `context.report` call from a rule into a reported + * problem for the Node.js API. + * @param {{ruleId: string, severity: number, sourceCode: SourceCode, messageIds: Object}} metadata Metadata for the reported problem + * @param {SourceCode} sourceCode The `SourceCode` instance for the text being linted + * @returns {function(...args): ReportInfo} Function that returns information about the report + */ + +module.exports = function createReportTranslator(metadata) { + + /* + * `createReportTranslator` gets called once per enabled rule per file. It needs to be very performant. + * The report translator itself (i.e. the function that `createReportTranslator` returns) gets + * called every time a rule reports a problem, which happens much less frequently (usually, the vast + * majority of rules don't report any problems for a given file). + */ + return function() { + const descriptor = normalizeMultiArgReportCall.apply(null, arguments); + + assertValidNodeInfo(descriptor); + + if (descriptor.messageId) { + if (!metadata.messageIds) { + throw new TypeError("context.report() called with a messageId, but no messages were present in the rule metadata."); + } + const id = descriptor.messageId; + const messages = metadata.messageIds; + + if (descriptor.message) { + throw new TypeError("context.report() called with a message and a messageId. Please only pass one."); + } + if (!messages || !Object.prototype.hasOwnProperty.call(messages, id)) { + throw new TypeError(`context.report() called with a messageId of '${id}' which is not present in the 'messages' config: ${JSON.stringify(messages, null, 2)}`); + } + descriptor.message = messages[id]; + } + + + return createProblem({ + ruleId: metadata.ruleId, + severity: metadata.severity, + node: descriptor.node, + message: normalizeMessagePlaceholders(descriptor), + messageId: descriptor.messageId, + loc: normalizeReportLoc(descriptor), + fix: normalizeFixes(descriptor, metadata.sourceCode), + sourceLines: metadata.sourceCode.lines + }); + }; +}; diff --git a/node_modules/eslint/lib/rules.js b/node_modules/eslint/lib/rules.js new file mode 100644 index 0000000..040f9db --- /dev/null +++ b/node_modules/eslint/lib/rules.js @@ -0,0 +1,140 @@ +/** + * @fileoverview Defines a storage for rules. + * @author Nicholas C. Zakas + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const lodash = require("lodash"); +const loadRules = require("./load-rules"); +const ruleReplacements = require("../conf/replacements").rules; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Creates a stub rule that gets used when a rule with a given ID is not found. + * @param {string} ruleId The ID of the missing rule + * @returns {{create: function(RuleContext): Object}} A rule that reports an error at the first location + * in the program. The report has the message `Definition for rule '${ruleId}' was not found` if the rule is unknown, + * or `Rule '${ruleId}' was removed and replaced by: ${replacements.join(", ")}` if the rule is known to have been + * replaced. + */ +const createMissingRule = lodash.memoize(ruleId => { + const message = Object.prototype.hasOwnProperty.call(ruleReplacements, ruleId) + ? `Rule '${ruleId}' was removed and replaced by: ${ruleReplacements[ruleId].join(", ")}` + : `Definition for rule '${ruleId}' was not found`; + + return { + create: context => ({ + Program() { + context.report({ + loc: { line: 1, column: 0 }, + message + }); + } + }) + }; +}); + +/** + * Normalizes a rule module to the new-style API + * @param {(Function|{create: Function})} rule A rule object, which can either be a function + * ("old-style") or an object with a `create` method ("new-style") + * @returns {{create: Function}} A new-style rule. + */ +function normalizeRule(rule) { + return typeof rule === "function" ? Object.assign({ create: rule }, rule) : rule; +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +class Rules { + constructor() { + this._rules = Object.create(null); + + this.load(); + } + + /** + * Registers a rule module for rule id in storage. + * @param {string} ruleId Rule id (file name). + * @param {Function} ruleModule Rule handler. + * @returns {void} + */ + define(ruleId, ruleModule) { + this._rules[ruleId] = normalizeRule(ruleModule); + } + + /** + * Loads and registers all rules from passed rules directory. + * @param {string} [rulesDir] Path to rules directory, may be relative. Defaults to `lib/rules`. + * @param {string} cwd Current working directory + * @returns {void} + */ + load(rulesDir, cwd) { + const newRules = loadRules(rulesDir, cwd); + + Object.keys(newRules).forEach(ruleId => { + this.define(ruleId, newRules[ruleId]); + }); + } + + /** + * Registers all given rules of a plugin. + * @param {Object} plugin The plugin object to import. + * @param {string} pluginName The name of the plugin without prefix (`eslint-plugin-`). + * @returns {void} + */ + importPlugin(plugin, pluginName) { + if (plugin.rules) { + Object.keys(plugin.rules).forEach(ruleId => { + const qualifiedRuleId = `${pluginName}/${ruleId}`, + rule = plugin.rules[ruleId]; + + this.define(qualifiedRuleId, rule); + }); + } + } + + /** + * Access rule handler by id (file name). + * @param {string} ruleId Rule id (file name). + * @returns {{create: Function, schema: JsonSchema[]}} + * A rule. This is normalized to always have the new-style shape with a `create` method. + */ + get(ruleId) { + if (!Object.prototype.hasOwnProperty.call(this._rules, ruleId)) { + return createMissingRule(ruleId); + } + if (typeof this._rules[ruleId] === "string") { + return normalizeRule(require(this._rules[ruleId])); + } + return this._rules[ruleId]; + + } + + /** + * Get an object with all currently loaded rules + * @returns {Map} All loaded rules + */ + getAllLoadedRules() { + const allRules = new Map(); + + Object.keys(this._rules).forEach(name => { + const rule = this.get(name); + + allRules.set(name, rule); + }); + return allRules; + } +} + +module.exports = Rules; diff --git a/node_modules/eslint/lib/rules/.eslintrc.yml b/node_modules/eslint/lib/rules/.eslintrc.yml new file mode 100644 index 0000000..64b3cee --- /dev/null +++ b/node_modules/eslint/lib/rules/.eslintrc.yml @@ -0,0 +1,4 @@ +rules: + rulesdir/no-invalid-meta: "error" + rulesdir/consistent-docs-description: "error" + rulesdir/consistent-docs-url: "error" diff --git a/node_modules/eslint/lib/rules/accessor-pairs.js b/node_modules/eslint/lib/rules/accessor-pairs.js new file mode 100644 index 0000000..51ac2c2 --- /dev/null +++ b/node_modules/eslint/lib/rules/accessor-pairs.js @@ -0,0 +1,161 @@ +/** + * @fileoverview Rule to flag wrapping non-iife in parens + * @author Gyandeep Singh + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks whether or not a given node is an `Identifier` node which was named a given name. + * @param {ASTNode} node - A node to check. + * @param {string} name - An expected name of the node. + * @returns {boolean} `true` if the node is an `Identifier` node which was named as expected. + */ +function isIdentifier(node, name) { + return node.type === "Identifier" && node.name === name; +} + +/** + * Checks whether or not a given node is an argument of a specified method call. + * @param {ASTNode} node - A node to check. + * @param {number} index - An expected index of the node in arguments. + * @param {string} object - An expected name of the object of the method. + * @param {string} property - An expected name of the method. + * @returns {boolean} `true` if the node is an argument of the specified method call. + */ +function isArgumentOfMethodCall(node, index, object, property) { + const parent = node.parent; + + return ( + parent.type === "CallExpression" && + parent.callee.type === "MemberExpression" && + parent.callee.computed === false && + isIdentifier(parent.callee.object, object) && + isIdentifier(parent.callee.property, property) && + parent.arguments[index] === node + ); +} + +/** + * Checks whether or not a given node is a property descriptor. + * @param {ASTNode} node - A node to check. + * @returns {boolean} `true` if the node is a property descriptor. + */ +function isPropertyDescriptor(node) { + + // Object.defineProperty(obj, "foo", {set: ...}) + if (isArgumentOfMethodCall(node, 2, "Object", "defineProperty") || + isArgumentOfMethodCall(node, 2, "Reflect", "defineProperty") + ) { + return true; + } + + /* + * Object.defineProperties(obj, {foo: {set: ...}}) + * Object.create(proto, {foo: {set: ...}}) + */ + node = node.parent.parent; + + return node.type === "ObjectExpression" && ( + isArgumentOfMethodCall(node, 1, "Object", "create") || + isArgumentOfMethodCall(node, 1, "Object", "defineProperties") + ); +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce getter and setter pairs in objects", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/accessor-pairs" + }, + schema: [{ + type: "object", + properties: { + getWithoutSet: { + type: "boolean" + }, + setWithoutGet: { + type: "boolean" + } + }, + additionalProperties: false + }], + messages: { + getter: "Getter is not present.", + setter: "Setter is not present." + } + }, + create(context) { + const config = context.options[0] || {}; + const checkGetWithoutSet = config.getWithoutSet === true; + const checkSetWithoutGet = config.setWithoutGet !== false; + + /** + * Checks a object expression to see if it has setter and getter both present or none. + * @param {ASTNode} node The node to check. + * @returns {void} + * @private + */ + function checkLonelySetGet(node) { + let isSetPresent = false; + let isGetPresent = false; + const isDescriptor = isPropertyDescriptor(node); + + for (let i = 0, end = node.properties.length; i < end; i++) { + const property = node.properties[i]; + + let propToCheck = ""; + + if (property.kind === "init") { + if (isDescriptor && !property.computed) { + propToCheck = property.key.name; + } + } else { + propToCheck = property.kind; + } + + switch (propToCheck) { + case "set": + isSetPresent = true; + break; + + case "get": + isGetPresent = true; + break; + + default: + + // Do nothing + } + + if (isSetPresent && isGetPresent) { + break; + } + } + + if (checkSetWithoutGet && isSetPresent && !isGetPresent) { + context.report({ node, messageId: "getter" }); + } else if (checkGetWithoutSet && isGetPresent && !isSetPresent) { + context.report({ node, messageId: "setter" }); + } + } + + return { + ObjectExpression(node) { + if (checkSetWithoutGet || checkGetWithoutSet) { + checkLonelySetGet(node); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/array-bracket-newline.js b/node_modules/eslint/lib/rules/array-bracket-newline.js new file mode 100644 index 0000000..e190405 --- /dev/null +++ b/node_modules/eslint/lib/rules/array-bracket-newline.js @@ -0,0 +1,256 @@ +/** + * @fileoverview Rule to enforce linebreaks after open and before close array brackets + * @author Jan Peer Stöcklmair + */ + +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce linebreaks after opening and before closing array brackets", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/array-bracket-newline" + }, + fixable: "whitespace", + schema: [ + { + oneOf: [ + { + enum: ["always", "never", "consistent"] + }, + { + type: "object", + properties: { + multiline: { + type: "boolean" + }, + minItems: { + type: ["integer", "null"], + minimum: 0 + } + }, + additionalProperties: false + } + ] + } + ], + messages: { + unexpectedOpeningLinebreak: "There should be no linebreak after '['.", + unexpectedClosingLinebreak: "There should be no linebreak before ']'.", + missingOpeningLinebreak: "A linebreak is required after '['.", + missingClosingLinebreak: "A linebreak is required before ']'." + } + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + + //---------------------------------------------------------------------- + // Helpers + //---------------------------------------------------------------------- + + /** + * Normalizes a given option value. + * + * @param {string|Object|undefined} option - An option value to parse. + * @returns {{multiline: boolean, minItems: number}} Normalized option object. + */ + function normalizeOptionValue(option) { + let consistent = false; + let multiline = false; + let minItems = 0; + + if (option) { + if (option === "consistent") { + consistent = true; + minItems = Number.POSITIVE_INFINITY; + } else if (option === "always" || option.minItems === 0) { + minItems = 0; + } else if (option === "never") { + minItems = Number.POSITIVE_INFINITY; + } else { + multiline = Boolean(option.multiline); + minItems = option.minItems || Number.POSITIVE_INFINITY; + } + } else { + consistent = false; + multiline = true; + minItems = Number.POSITIVE_INFINITY; + } + + return { consistent, multiline, minItems }; + } + + /** + * Normalizes a given option value. + * + * @param {string|Object|undefined} options - An option value to parse. + * @returns {{ArrayExpression: {multiline: boolean, minItems: number}, ArrayPattern: {multiline: boolean, minItems: number}}} Normalized option object. + */ + function normalizeOptions(options) { + const value = normalizeOptionValue(options); + + return { ArrayExpression: value, ArrayPattern: value }; + } + + /** + * Reports that there shouldn't be a linebreak after the first token + * @param {ASTNode} node - The node to report in the event of an error. + * @param {Token} token - The token to use for the report. + * @returns {void} + */ + function reportNoBeginningLinebreak(node, token) { + context.report({ + node, + loc: token.loc, + messageId: "unexpectedOpeningLinebreak", + fix(fixer) { + const nextToken = sourceCode.getTokenAfter(token, { includeComments: true }); + + if (astUtils.isCommentToken(nextToken)) { + return null; + } + + return fixer.removeRange([token.range[1], nextToken.range[0]]); + } + }); + } + + /** + * Reports that there shouldn't be a linebreak before the last token + * @param {ASTNode} node - The node to report in the event of an error. + * @param {Token} token - The token to use for the report. + * @returns {void} + */ + function reportNoEndingLinebreak(node, token) { + context.report({ + node, + loc: token.loc, + messageId: "unexpectedClosingLinebreak", + fix(fixer) { + const previousToken = sourceCode.getTokenBefore(token, { includeComments: true }); + + if (astUtils.isCommentToken(previousToken)) { + return null; + } + + return fixer.removeRange([previousToken.range[1], token.range[0]]); + } + }); + } + + /** + * Reports that there should be a linebreak after the first token + * @param {ASTNode} node - The node to report in the event of an error. + * @param {Token} token - The token to use for the report. + * @returns {void} + */ + function reportRequiredBeginningLinebreak(node, token) { + context.report({ + node, + loc: token.loc, + messageId: "missingOpeningLinebreak", + fix(fixer) { + return fixer.insertTextAfter(token, "\n"); + } + }); + } + + /** + * Reports that there should be a linebreak before the last token + * @param {ASTNode} node - The node to report in the event of an error. + * @param {Token} token - The token to use for the report. + * @returns {void} + */ + function reportRequiredEndingLinebreak(node, token) { + context.report({ + node, + loc: token.loc, + messageId: "missingClosingLinebreak", + fix(fixer) { + return fixer.insertTextBefore(token, "\n"); + } + }); + } + + /** + * Reports a given node if it violated this rule. + * + * @param {ASTNode} node - A node to check. This is an ArrayExpression node or an ArrayPattern node. + * @returns {void} + */ + function check(node) { + const elements = node.elements; + const normalizedOptions = normalizeOptions(context.options[0]); + const options = normalizedOptions[node.type]; + const openBracket = sourceCode.getFirstToken(node); + const closeBracket = sourceCode.getLastToken(node); + const firstIncComment = sourceCode.getTokenAfter(openBracket, { includeComments: true }); + const lastIncComment = sourceCode.getTokenBefore(closeBracket, { includeComments: true }); + const first = sourceCode.getTokenAfter(openBracket); + const last = sourceCode.getTokenBefore(closeBracket); + + const needsLinebreaks = ( + elements.length >= options.minItems || + ( + options.multiline && + elements.length > 0 && + firstIncComment.loc.start.line !== lastIncComment.loc.end.line + ) || + ( + elements.length === 0 && + firstIncComment.type === "Block" && + firstIncComment.loc.start.line !== lastIncComment.loc.end.line && + firstIncComment === lastIncComment + ) || + ( + options.consistent && + firstIncComment.loc.start.line !== openBracket.loc.end.line + ) + ); + + /* + * Use tokens or comments to check multiline or not. + * But use only tokens to check whether linebreaks are needed. + * This allows: + * var arr = [ // eslint-disable-line foo + * 'a' + * ] + */ + + if (needsLinebreaks) { + if (astUtils.isTokenOnSameLine(openBracket, first)) { + reportRequiredBeginningLinebreak(node, openBracket); + } + if (astUtils.isTokenOnSameLine(last, closeBracket)) { + reportRequiredEndingLinebreak(node, closeBracket); + } + } else { + if (!astUtils.isTokenOnSameLine(openBracket, first)) { + reportNoBeginningLinebreak(node, openBracket); + } + if (!astUtils.isTokenOnSameLine(last, closeBracket)) { + reportNoEndingLinebreak(node, closeBracket); + } + } + } + + //---------------------------------------------------------------------- + // Public + //---------------------------------------------------------------------- + + return { + ArrayPattern: check, + ArrayExpression: check + }; + } +}; diff --git a/node_modules/eslint/lib/rules/array-bracket-spacing.js b/node_modules/eslint/lib/rules/array-bracket-spacing.js new file mode 100644 index 0000000..c64ff3d --- /dev/null +++ b/node_modules/eslint/lib/rules/array-bracket-spacing.js @@ -0,0 +1,236 @@ +/** + * @fileoverview Disallows or enforces spaces inside of array brackets. + * @author Jamund Ferguson + */ +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce consistent spacing inside array brackets", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/array-bracket-spacing" + }, + fixable: "whitespace", + schema: [ + { + enum: ["always", "never"] + }, + { + type: "object", + properties: { + singleValue: { + type: "boolean" + }, + objectsInArrays: { + type: "boolean" + }, + arraysInArrays: { + type: "boolean" + } + }, + additionalProperties: false + } + ], + messages: { + unexpectedSpaceAfter: "There should be no space after '{{tokenValue}}'.", + unexpectedSpaceBefore: "There should be no space before '{{tokenValue}}'.", + missingSpaceAfter: "A space is required after '{{tokenValue}}'.", + missingSpaceBefore: "A space is required before '{{tokenValue}}'." + } + }, + create(context) { + const spaced = context.options[0] === "always", + sourceCode = context.getSourceCode(); + + /** + * Determines whether an option is set, relative to the spacing option. + * If spaced is "always", then check whether option is set to false. + * If spaced is "never", then check whether option is set to true. + * @param {Object} option - The option to exclude. + * @returns {boolean} Whether or not the property is excluded. + */ + function isOptionSet(option) { + return context.options[1] ? context.options[1][option] === !spaced : false; + } + + const options = { + spaced, + singleElementException: isOptionSet("singleValue"), + objectsInArraysException: isOptionSet("objectsInArrays"), + arraysInArraysException: isOptionSet("arraysInArrays") + }; + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Reports that there shouldn't be a space after the first token + * @param {ASTNode} node - The node to report in the event of an error. + * @param {Token} token - The token to use for the report. + * @returns {void} + */ + function reportNoBeginningSpace(node, token) { + context.report({ + node, + loc: token.loc.start, + messageId: "unexpectedSpaceAfter", + data: { + tokenValue: token.value + }, + fix(fixer) { + const nextToken = sourceCode.getTokenAfter(token); + + return fixer.removeRange([token.range[1], nextToken.range[0]]); + } + }); + } + + /** + * Reports that there shouldn't be a space before the last token + * @param {ASTNode} node - The node to report in the event of an error. + * @param {Token} token - The token to use for the report. + * @returns {void} + */ + function reportNoEndingSpace(node, token) { + context.report({ + node, + loc: token.loc.start, + messageId: "unexpectedSpaceBefore", + data: { + tokenValue: token.value + }, + fix(fixer) { + const previousToken = sourceCode.getTokenBefore(token); + + return fixer.removeRange([previousToken.range[1], token.range[0]]); + } + }); + } + + /** + * Reports that there should be a space after the first token + * @param {ASTNode} node - The node to report in the event of an error. + * @param {Token} token - The token to use for the report. + * @returns {void} + */ + function reportRequiredBeginningSpace(node, token) { + context.report({ + node, + loc: token.loc.start, + messageId: "missingSpaceAfter", + data: { + tokenValue: token.value + }, + fix(fixer) { + return fixer.insertTextAfter(token, " "); + } + }); + } + + /** + * Reports that there should be a space before the last token + * @param {ASTNode} node - The node to report in the event of an error. + * @param {Token} token - The token to use for the report. + * @returns {void} + */ + function reportRequiredEndingSpace(node, token) { + context.report({ + node, + loc: token.loc.start, + messageId: "missingSpaceBefore", + data: { + tokenValue: token.value + }, + fix(fixer) { + return fixer.insertTextBefore(token, " "); + } + }); + } + + /** + * Determines if a node is an object type + * @param {ASTNode} node - The node to check. + * @returns {boolean} Whether or not the node is an object type. + */ + function isObjectType(node) { + return node && (node.type === "ObjectExpression" || node.type === "ObjectPattern"); + } + + /** + * Determines if a node is an array type + * @param {ASTNode} node - The node to check. + * @returns {boolean} Whether or not the node is an array type. + */ + function isArrayType(node) { + return node && (node.type === "ArrayExpression" || node.type === "ArrayPattern"); + } + + /** + * Validates the spacing around array brackets + * @param {ASTNode} node - The node we're checking for spacing + * @returns {void} + */ + function validateArraySpacing(node) { + if (options.spaced && node.elements.length === 0) { + return; + } + + const first = sourceCode.getFirstToken(node), + second = sourceCode.getFirstToken(node, 1), + last = node.typeAnnotation + ? sourceCode.getTokenBefore(node.typeAnnotation) + : sourceCode.getLastToken(node), + penultimate = sourceCode.getTokenBefore(last), + firstElement = node.elements[0], + lastElement = node.elements[node.elements.length - 1]; + + const openingBracketMustBeSpaced = + options.objectsInArraysException && isObjectType(firstElement) || + options.arraysInArraysException && isArrayType(firstElement) || + options.singleElementException && node.elements.length === 1 + ? !options.spaced : options.spaced; + + const closingBracketMustBeSpaced = + options.objectsInArraysException && isObjectType(lastElement) || + options.arraysInArraysException && isArrayType(lastElement) || + options.singleElementException && node.elements.length === 1 + ? !options.spaced : options.spaced; + + if (astUtils.isTokenOnSameLine(first, second)) { + if (openingBracketMustBeSpaced && !sourceCode.isSpaceBetweenTokens(first, second)) { + reportRequiredBeginningSpace(node, first); + } + if (!openingBracketMustBeSpaced && sourceCode.isSpaceBetweenTokens(first, second)) { + reportNoBeginningSpace(node, first); + } + } + + if (first !== penultimate && astUtils.isTokenOnSameLine(penultimate, last)) { + if (closingBracketMustBeSpaced && !sourceCode.isSpaceBetweenTokens(penultimate, last)) { + reportRequiredEndingSpace(node, last); + } + if (!closingBracketMustBeSpaced && sourceCode.isSpaceBetweenTokens(penultimate, last)) { + reportNoEndingSpace(node, last); + } + } + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + ArrayPattern: validateArraySpacing, + ArrayExpression: validateArraySpacing + }; + } +}; diff --git a/node_modules/eslint/lib/rules/array-callback-return.js b/node_modules/eslint/lib/rules/array-callback-return.js new file mode 100644 index 0000000..ad0d026 --- /dev/null +++ b/node_modules/eslint/lib/rules/array-callback-return.js @@ -0,0 +1,253 @@ +/** + * @fileoverview Rule to enforce return statements in callbacks of array's methods + * @author Toru Nagashima + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const lodash = require("lodash"); + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const TARGET_NODE_TYPE = /^(?:Arrow)?FunctionExpression$/; +const TARGET_METHODS = /^(?:every|filter|find(?:Index)?|map|reduce(?:Right)?|some|sort)$/; + +/** + * Checks a given code path segment is reachable. + * + * @param {CodePathSegment} segment - A segment to check. + * @returns {boolean} `true` if the segment is reachable. + */ +function isReachable(segment) { + return segment.reachable; +} + +/** + * Gets a readable location. + * + * - FunctionExpression -> the function name or `function` keyword. + * - ArrowFunctionExpression -> `=>` token. + * + * @param {ASTNode} node - A function node to get. + * @param {SourceCode} sourceCode - A source code to get tokens. + * @returns {ASTNode|Token} The node or the token of a location. + */ +function getLocation(node, sourceCode) { + if (node.type === "ArrowFunctionExpression") { + return sourceCode.getTokenBefore(node.body); + } + return node.id || node; +} + +/** + * Checks a given node is a MemberExpression node which has the specified name's + * property. + * + * @param {ASTNode} node - A node to check. + * @returns {boolean} `true` if the node is a MemberExpression node which has + * the specified name's property + */ +function isTargetMethod(node) { + return ( + node.type === "MemberExpression" && + TARGET_METHODS.test(astUtils.getStaticPropertyName(node) || "") + ); +} + +/** + * Checks whether or not a given node is a function expression which is the + * callback of an array method. + * + * @param {ASTNode} node - A node to check. This is one of + * FunctionExpression or ArrowFunctionExpression. + * @returns {boolean} `true` if the node is the callback of an array method. + */ +function isCallbackOfArrayMethod(node) { + while (node) { + const parent = node.parent; + + switch (parent.type) { + + /* + * Looks up the destination. e.g., + * foo.every(nativeFoo || function foo() { ... }); + */ + case "LogicalExpression": + case "ConditionalExpression": + node = parent; + break; + + /* + * If the upper function is IIFE, checks the destination of the return value. + * e.g. + * foo.every((function() { + * // setup... + * return function callback() { ... }; + * })()); + */ + case "ReturnStatement": { + const func = astUtils.getUpperFunction(parent); + + if (func === null || !astUtils.isCallee(func)) { + return false; + } + node = func.parent; + break; + } + + /* + * e.g. + * Array.from([], function() {}); + * list.every(function() {}); + */ + case "CallExpression": + if (astUtils.isArrayFromMethod(parent.callee)) { + return ( + parent.arguments.length >= 2 && + parent.arguments[1] === node + ); + } + if (isTargetMethod(parent.callee)) { + return ( + parent.arguments.length >= 1 && + parent.arguments[0] === node + ); + } + return false; + + // Otherwise this node is not target. + default: + return false; + } + } + + /* istanbul ignore next: unreachable */ + return false; +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce `return` statements in callbacks of array methods", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/array-callback-return" + }, + + schema: [ + { + type: "object", + properties: { + allowImplicit: { + type: "boolean" + } + }, + additionalProperties: false + } + ], + + messages: { + expectedAtEnd: "Expected to return a value at the end of {{name}}.", + expectedInside: "Expected to return a value in {{name}}.", + expectedReturnValue: "{{name}} expected a return value." + } + }, + + create(context) { + + const options = context.options[0] || { allowImplicit: false }; + + let funcInfo = { + upper: null, + codePath: null, + hasReturn: false, + shouldCheck: false, + node: null + }; + + /** + * Checks whether or not the last code path segment is reachable. + * Then reports this function if the segment is reachable. + * + * If the last code path segment is reachable, there are paths which are not + * returned or thrown. + * + * @param {ASTNode} node - A node to check. + * @returns {void} + */ + function checkLastSegment(node) { + if (funcInfo.shouldCheck && + funcInfo.codePath.currentSegments.some(isReachable) + ) { + context.report({ + node, + loc: getLocation(node, context.getSourceCode()).loc.start, + messageId: funcInfo.hasReturn + ? "expectedAtEnd" + : "expectedInside", + data: { + name: astUtils.getFunctionNameWithKind(funcInfo.node) + } + }); + } + } + + return { + + // Stacks this function's information. + onCodePathStart(codePath, node) { + funcInfo = { + upper: funcInfo, + codePath, + hasReturn: false, + shouldCheck: + TARGET_NODE_TYPE.test(node.type) && + node.body.type === "BlockStatement" && + isCallbackOfArrayMethod(node) && + !node.async && + !node.generator, + node + }; + }, + + // Pops this function's information. + onCodePathEnd() { + funcInfo = funcInfo.upper; + }, + + // Checks the return statement is valid. + ReturnStatement(node) { + if (funcInfo.shouldCheck) { + funcInfo.hasReturn = true; + + // if allowImplicit: false, should also check node.argument + if (!options.allowImplicit && !node.argument) { + context.report({ + node, + messageId: "expectedReturnValue", + data: { + name: lodash.upperFirst(astUtils.getFunctionNameWithKind(funcInfo.node)) + } + }); + } + } + }, + + // Reports a given function if the last path is reachable. + "FunctionExpression:exit": checkLastSegment, + "ArrowFunctionExpression:exit": checkLastSegment + }; + } +}; diff --git a/node_modules/eslint/lib/rules/array-element-newline.js b/node_modules/eslint/lib/rules/array-element-newline.js new file mode 100644 index 0000000..d8a8652 --- /dev/null +++ b/node_modules/eslint/lib/rules/array-element-newline.js @@ -0,0 +1,236 @@ +/** + * @fileoverview Rule to enforce line breaks after each array element + * @author Jan Peer Stöcklmair + */ + +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce line breaks after each array element", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/array-element-newline" + }, + fixable: "whitespace", + schema: [ + { + oneOf: [ + { + enum: ["always", "never"] + }, + { + type: "object", + properties: { + multiline: { + type: "boolean" + }, + minItems: { + type: ["integer", "null"], + minimum: 0 + } + }, + additionalProperties: false + } + ] + } + ], + + messages: { + unexpectedLineBreak: "There should be no linebreak here.", + missingLineBreak: "There should be a linebreak after this element." + } + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + //---------------------------------------------------------------------- + // Helpers + //---------------------------------------------------------------------- + + /** + * Normalizes a given option value. + * + * @param {string|Object|undefined} option - An option value to parse. + * @returns {{multiline: boolean, minItems: number}} Normalized option object. + */ + function normalizeOptionValue(option) { + let multiline = false; + let minItems; + + option = option || "always"; + + if (option === "always" || option.minItems === 0) { + minItems = 0; + } else if (option === "never") { + minItems = Number.POSITIVE_INFINITY; + } else { + multiline = Boolean(option.multiline); + minItems = option.minItems || Number.POSITIVE_INFINITY; + } + + return { multiline, minItems }; + } + + /** + * Normalizes a given option value. + * + * @param {string|Object|undefined} options - An option value to parse. + * @returns {{ArrayExpression: {multiline: boolean, minItems: number}, ArrayPattern: {multiline: boolean, minItems: number}}} Normalized option object. + */ + function normalizeOptions(options) { + const value = normalizeOptionValue(options); + + return { ArrayExpression: value, ArrayPattern: value }; + } + + /** + * Reports that there shouldn't be a line break after the first token + * @param {Token} token - The token to use for the report. + * @returns {void} + */ + function reportNoLineBreak(token) { + const tokenBefore = sourceCode.getTokenBefore(token, { includeComments: true }); + + context.report({ + loc: { + start: tokenBefore.loc.end, + end: token.loc.start + }, + messageId: "unexpectedLineBreak", + fix(fixer) { + if (astUtils.isCommentToken(tokenBefore)) { + return null; + } + + if (!astUtils.isTokenOnSameLine(tokenBefore, token)) { + return fixer.replaceTextRange([tokenBefore.range[1], token.range[0]], " "); + } + + /* + * This will check if the comma is on the same line as the next element + * Following array: + * [ + * 1 + * , 2 + * , 3 + * ] + * + * will be fixed to: + * [ + * 1, 2, 3 + * ] + */ + const twoTokensBefore = sourceCode.getTokenBefore(tokenBefore, { includeComments: true }); + + if (astUtils.isCommentToken(twoTokensBefore)) { + return null; + } + + return fixer.replaceTextRange([twoTokensBefore.range[1], tokenBefore.range[0]], ""); + + } + }); + } + + /** + * Reports that there should be a line break after the first token + * @param {Token} token - The token to use for the report. + * @returns {void} + */ + function reportRequiredLineBreak(token) { + const tokenBefore = sourceCode.getTokenBefore(token, { includeComments: true }); + + context.report({ + loc: { + start: tokenBefore.loc.end, + end: token.loc.start + }, + messageId: "missingLineBreak", + fix(fixer) { + return fixer.replaceTextRange([tokenBefore.range[1], token.range[0]], "\n"); + } + }); + } + + /** + * Reports a given node if it violated this rule. + * + * @param {ASTNode} node - A node to check. This is an ObjectExpression node or an ObjectPattern node. + * @param {{multiline: boolean, minItems: number}} options - An option object. + * @returns {void} + */ + function check(node) { + const elements = node.elements; + const normalizedOptions = normalizeOptions(context.options[0]); + const options = normalizedOptions[node.type]; + + let elementBreak = false; + + /* + * MULTILINE: true + * loop through every element and check + * if at least one element has linebreaks inside + * this ensures that following is not valid (due to elements are on the same line): + * + * [ + * 1, + * 2, + * 3 + * ] + */ + if (options.multiline) { + elementBreak = elements + .filter(element => element !== null) + .some(element => element.loc.start.line !== element.loc.end.line); + } + + const needsLinebreaks = ( + elements.length >= options.minItems || + ( + options.multiline && + elementBreak + ) + ); + + elements.forEach((element, i) => { + const previousElement = elements[i - 1]; + + if (i === 0 || element === null || previousElement === null) { + return; + } + + const commaToken = sourceCode.getFirstTokenBetween(previousElement, element, astUtils.isCommaToken); + const lastTokenOfPreviousElement = sourceCode.getTokenBefore(commaToken); + const firstTokenOfCurrentElement = sourceCode.getTokenAfter(commaToken); + + if (needsLinebreaks) { + if (astUtils.isTokenOnSameLine(lastTokenOfPreviousElement, firstTokenOfCurrentElement)) { + reportRequiredLineBreak(firstTokenOfCurrentElement); + } + } else { + if (!astUtils.isTokenOnSameLine(lastTokenOfPreviousElement, firstTokenOfCurrentElement)) { + reportNoLineBreak(firstTokenOfCurrentElement); + } + } + }); + } + + //---------------------------------------------------------------------- + // Public + //---------------------------------------------------------------------- + + return { + ArrayPattern: check, + ArrayExpression: check + }; + } +}; diff --git a/node_modules/eslint/lib/rules/arrow-body-style.js b/node_modules/eslint/lib/rules/arrow-body-style.js new file mode 100644 index 0000000..1f0d137 --- /dev/null +++ b/node_modules/eslint/lib/rules/arrow-body-style.js @@ -0,0 +1,236 @@ +/** + * @fileoverview Rule to require braces in arrow function body. + * @author Alberto Rodríguez + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require braces around arrow function bodies", + category: "ECMAScript 6", + recommended: false, + url: "https://eslint.org/docs/rules/arrow-body-style" + }, + + schema: { + anyOf: [ + { + type: "array", + items: [ + { + enum: ["always", "never"] + } + ], + minItems: 0, + maxItems: 1 + }, + { + type: "array", + items: [ + { + enum: ["as-needed"] + }, + { + type: "object", + properties: { + requireReturnForObjectLiteral: { type: "boolean" } + }, + additionalProperties: false + } + ], + minItems: 0, + maxItems: 2 + } + ] + }, + + fixable: "code", + + messages: { + unexpectedOtherBlock: "Unexpected block statement surrounding arrow body.", + unexpectedEmptyBlock: "Unexpected block statement surrounding arrow body; put a value of `undefined` immediately after the `=>`.", + unexpectedObjectBlock: "Unexpected block statement surrounding arrow body; parenthesize the returned value and move it immediately after the `=>`.", + unexpectedSingleBlock: "Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>`.", + expectedBlock: "Expected block statement surrounding arrow body." + } + }, + + create(context) { + const options = context.options; + const always = options[0] === "always"; + const asNeeded = !options[0] || options[0] === "as-needed"; + const never = options[0] === "never"; + const requireReturnForObjectLiteral = options[1] && options[1].requireReturnForObjectLiteral; + const sourceCode = context.getSourceCode(); + + /** + * Checks whether the given node has ASI problem or not. + * @param {Token} token The token to check. + * @returns {boolean} `true` if it changes semantics if `;` or `}` followed by the token are removed. + */ + function hasASIProblem(token) { + return token && token.type === "Punctuator" && /^[([/`+-]/.test(token.value); + } + + /** + * Gets the closing parenthesis which is the pair of the given opening parenthesis. + * @param {Token} token The opening parenthesis token to get. + * @returns {Token} The found closing parenthesis token. + */ + function findClosingParen(token) { + let node = sourceCode.getNodeByRangeIndex(token.range[1]); + + while (!astUtils.isParenthesised(sourceCode, node)) { + node = node.parent; + } + return sourceCode.getTokenAfter(node); + } + + /** + * Determines whether a arrow function body needs braces + * @param {ASTNode} node The arrow function node. + * @returns {void} + */ + function validate(node) { + const arrowBody = node.body; + + if (arrowBody.type === "BlockStatement") { + const blockBody = arrowBody.body; + + if (blockBody.length !== 1 && !never) { + return; + } + + if (asNeeded && requireReturnForObjectLiteral && blockBody[0].type === "ReturnStatement" && + blockBody[0].argument && blockBody[0].argument.type === "ObjectExpression") { + return; + } + + if (never || asNeeded && blockBody[0].type === "ReturnStatement") { + let messageId; + + if (blockBody.length === 0) { + messageId = "unexpectedEmptyBlock"; + } else if (blockBody.length > 1) { + messageId = "unexpectedOtherBlock"; + } else if (astUtils.isOpeningBraceToken(sourceCode.getFirstToken(blockBody[0], { skip: 1 }))) { + messageId = "unexpectedObjectBlock"; + } else { + messageId = "unexpectedSingleBlock"; + } + + context.report({ + node, + loc: arrowBody.loc.start, + messageId, + fix(fixer) { + const fixes = []; + + if (blockBody.length !== 1 || + blockBody[0].type !== "ReturnStatement" || + !blockBody[0].argument || + hasASIProblem(sourceCode.getTokenAfter(arrowBody)) + ) { + return fixes; + } + + const openingBrace = sourceCode.getFirstToken(arrowBody); + const closingBrace = sourceCode.getLastToken(arrowBody); + const firstValueToken = sourceCode.getFirstToken(blockBody[0], 1); + const lastValueToken = sourceCode.getLastToken(blockBody[0]); + const commentsExist = + sourceCode.commentsExistBetween(openingBrace, firstValueToken) || + sourceCode.commentsExistBetween(lastValueToken, closingBrace); + + /* + * Remove tokens around the return value. + * If comments don't exist, remove extra spaces as well. + */ + if (commentsExist) { + fixes.push( + fixer.remove(openingBrace), + fixer.remove(closingBrace), + fixer.remove(sourceCode.getTokenAfter(openingBrace)) // return keyword + ); + } else { + fixes.push( + fixer.removeRange([openingBrace.range[0], firstValueToken.range[0]]), + fixer.removeRange([lastValueToken.range[1], closingBrace.range[1]]) + ); + } + + /* + * If the first token of the reutrn value is `{`, + * enclose the return value by parentheses to avoid syntax error. + */ + if (astUtils.isOpeningBraceToken(firstValueToken)) { + fixes.push( + fixer.insertTextBefore(firstValueToken, "("), + fixer.insertTextAfter(lastValueToken, ")") + ); + } + + /* + * If the last token of the return statement is semicolon, remove it. + * Non-block arrow body is an expression, not a statement. + */ + if (astUtils.isSemicolonToken(lastValueToken)) { + fixes.push(fixer.remove(lastValueToken)); + } + + return fixes; + } + }); + } + } else { + if (always || (asNeeded && requireReturnForObjectLiteral && arrowBody.type === "ObjectExpression")) { + context.report({ + node, + loc: arrowBody.loc.start, + messageId: "expectedBlock", + fix(fixer) { + const fixes = []; + const arrowToken = sourceCode.getTokenBefore(arrowBody, astUtils.isArrowToken); + const firstBodyToken = sourceCode.getTokenAfter(arrowToken); + const lastBodyToken = sourceCode.getLastToken(node); + const isParenthesisedObjectLiteral = + astUtils.isOpeningParenToken(firstBodyToken) && + astUtils.isOpeningBraceToken(sourceCode.getTokenAfter(firstBodyToken)); + + // Wrap the value by a block and a return statement. + fixes.push( + fixer.insertTextBefore(firstBodyToken, "{return "), + fixer.insertTextAfter(lastBodyToken, "}") + ); + + // If the value is object literal, remove parentheses which were forced by syntax. + if (isParenthesisedObjectLiteral) { + fixes.push( + fixer.remove(firstBodyToken), + fixer.remove(findClosingParen(firstBodyToken)) + ); + } + + return fixes; + } + }); + } + } + } + + return { + "ArrowFunctionExpression:exit": validate + }; + } +}; diff --git a/node_modules/eslint/lib/rules/arrow-parens.js b/node_modules/eslint/lib/rules/arrow-parens.js new file mode 100644 index 0000000..8cabb7f --- /dev/null +++ b/node_modules/eslint/lib/rules/arrow-parens.js @@ -0,0 +1,161 @@ +/** + * @fileoverview Rule to require parens in arrow function arguments. + * @author Jxck + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require parentheses around arrow function arguments", + category: "ECMAScript 6", + recommended: false, + url: "https://eslint.org/docs/rules/arrow-parens" + }, + + fixable: "code", + + schema: [ + { + enum: ["always", "as-needed"] + }, + { + type: "object", + properties: { + requireForBlockBody: { + type: "boolean" + } + }, + additionalProperties: false + } + ], + + messages: { + unexpectedParens: "Unexpected parentheses around single function argument.", + expectedParens: "Expected parentheses around arrow function argument.", + + unexpectedParensInline: "Unexpected parentheses around single function argument having a body with no curly braces.", + expectedParensBlock: "Expected parentheses around arrow function argument having a body with curly braces." + } + }, + + create(context) { + const asNeeded = context.options[0] === "as-needed"; + const requireForBlockBody = asNeeded && context.options[1] && context.options[1].requireForBlockBody === true; + + const sourceCode = context.getSourceCode(); + + /** + * Determines whether a arrow function argument end with `)` + * @param {ASTNode} node The arrow function node. + * @returns {void} + */ + function parens(node) { + const isAsync = node.async; + const firstTokenOfParam = sourceCode.getFirstToken(node, isAsync ? 1 : 0); + + /** + * Remove the parenthesis around a parameter + * @param {Fixer} fixer Fixer + * @returns {string} fixed parameter + */ + function fixParamsWithParenthesis(fixer) { + const paramToken = sourceCode.getTokenAfter(firstTokenOfParam); + + /* + * ES8 allows Trailing commas in function parameter lists and calls + * https://github.com/eslint/eslint/issues/8834 + */ + const closingParenToken = sourceCode.getTokenAfter(paramToken, astUtils.isClosingParenToken); + const asyncToken = isAsync ? sourceCode.getTokenBefore(firstTokenOfParam) : null; + const shouldAddSpaceForAsync = asyncToken && (asyncToken.range[1] === firstTokenOfParam.range[0]); + + return fixer.replaceTextRange([ + firstTokenOfParam.range[0], + closingParenToken.range[1] + ], `${shouldAddSpaceForAsync ? " " : ""}${paramToken.value}`); + } + + // "as-needed", { "requireForBlockBody": true }: x => x + if ( + requireForBlockBody && + node.params.length === 1 && + node.params[0].type === "Identifier" && + !node.params[0].typeAnnotation && + node.body.type !== "BlockStatement" && + !node.returnType + ) { + if (astUtils.isOpeningParenToken(firstTokenOfParam)) { + context.report({ + node, + messageId: "unexpectedParensInline", + fix: fixParamsWithParenthesis + }); + } + return; + } + + if ( + requireForBlockBody && + node.body.type === "BlockStatement" + ) { + if (!astUtils.isOpeningParenToken(firstTokenOfParam)) { + context.report({ + node, + messageId: "expectedParensBlock", + fix(fixer) { + return fixer.replaceText(firstTokenOfParam, `(${firstTokenOfParam.value})`); + } + }); + } + return; + } + + // "as-needed": x => x + if (asNeeded && + node.params.length === 1 && + node.params[0].type === "Identifier" && + !node.params[0].typeAnnotation && + !node.returnType + ) { + if (astUtils.isOpeningParenToken(firstTokenOfParam)) { + context.report({ + node, + messageId: "unexpectedParens", + fix: fixParamsWithParenthesis + }); + } + return; + } + + if (firstTokenOfParam.type === "Identifier") { + const after = sourceCode.getTokenAfter(firstTokenOfParam); + + // (x) => x + if (after.value !== ")") { + context.report({ + node, + messageId: "expectedParens", + fix(fixer) { + return fixer.replaceText(firstTokenOfParam, `(${firstTokenOfParam.value})`); + } + }); + } + } + } + + return { + ArrowFunctionExpression: parens + }; + } +}; diff --git a/node_modules/eslint/lib/rules/arrow-spacing.js b/node_modules/eslint/lib/rules/arrow-spacing.js new file mode 100644 index 0000000..52f8fca --- /dev/null +++ b/node_modules/eslint/lib/rules/arrow-spacing.js @@ -0,0 +1,158 @@ +/** + * @fileoverview Rule to define spacing before/after arrow function's arrow. + * @author Jxck + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce consistent spacing before and after the arrow in arrow functions", + category: "ECMAScript 6", + recommended: false, + url: "https://eslint.org/docs/rules/arrow-spacing" + }, + + fixable: "whitespace", + + schema: [ + { + type: "object", + properties: { + before: { + type: "boolean" + }, + after: { + type: "boolean" + } + }, + additionalProperties: false + } + ], + + messages: { + expectedBefore: "Missing space before =>.", + unexpectedBefore: "Unexpected space before =>.", + + expectedAfter: "Missing space after =>.", + unexpectedAfter: "Unexpected space after =>." + } + }, + + create(context) { + + // merge rules with default + const rule = { before: true, after: true }, + option = context.options[0] || {}; + + rule.before = option.before !== false; + rule.after = option.after !== false; + + const sourceCode = context.getSourceCode(); + + /** + * Get tokens of arrow(`=>`) and before/after arrow. + * @param {ASTNode} node The arrow function node. + * @returns {Object} Tokens of arrow and before/after arrow. + */ + function getTokens(node) { + const arrow = sourceCode.getTokenBefore(node.body, astUtils.isArrowToken); + + return { + before: sourceCode.getTokenBefore(arrow), + arrow, + after: sourceCode.getTokenAfter(arrow) + }; + } + + /** + * Count spaces before/after arrow(`=>`) token. + * @param {Object} tokens Tokens before/after arrow. + * @returns {Object} count of space before/after arrow. + */ + function countSpaces(tokens) { + const before = tokens.arrow.range[0] - tokens.before.range[1]; + const after = tokens.after.range[0] - tokens.arrow.range[1]; + + return { before, after }; + } + + /** + * Determines whether space(s) before after arrow(`=>`) is satisfy rule. + * if before/after value is `true`, there should be space(s). + * if before/after value is `false`, there should be no space. + * @param {ASTNode} node The arrow function node. + * @returns {void} + */ + function spaces(node) { + const tokens = getTokens(node); + const countSpace = countSpaces(tokens); + + if (rule.before) { + + // should be space(s) before arrow + if (countSpace.before === 0) { + context.report({ + node: tokens.before, + messageId: "expectedBefore", + fix(fixer) { + return fixer.insertTextBefore(tokens.arrow, " "); + } + }); + } + } else { + + // should be no space before arrow + if (countSpace.before > 0) { + context.report({ + node: tokens.before, + messageId: "unexpectedBefore", + fix(fixer) { + return fixer.removeRange([tokens.before.range[1], tokens.arrow.range[0]]); + } + }); + } + } + + if (rule.after) { + + // should be space(s) after arrow + if (countSpace.after === 0) { + context.report({ + node: tokens.after, + messageId: "expectedAfter", + fix(fixer) { + return fixer.insertTextAfter(tokens.arrow, " "); + } + }); + } + } else { + + // should be no space after arrow + if (countSpace.after > 0) { + context.report({ + node: tokens.after, + messageId: "unexpectedAfter", + fix(fixer) { + return fixer.removeRange([tokens.arrow.range[1], tokens.after.range[0]]); + } + }); + } + } + } + + return { + ArrowFunctionExpression: spaces + }; + } +}; diff --git a/node_modules/eslint/lib/rules/block-scoped-var.js b/node_modules/eslint/lib/rules/block-scoped-var.js new file mode 100644 index 0000000..1000fbc --- /dev/null +++ b/node_modules/eslint/lib/rules/block-scoped-var.js @@ -0,0 +1,120 @@ +/** + * @fileoverview Rule to check for "block scoped" variables by binding context + * @author Matt DuVall + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce the use of variables within the scope they are defined", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/block-scoped-var" + }, + + schema: [], + + messages: { + outOfScope: "'{{name}}' used outside of binding context." + } + }, + + create(context) { + let stack = []; + + /** + * Makes a block scope. + * @param {ASTNode} node - A node of a scope. + * @returns {void} + */ + function enterScope(node) { + stack.push(node.range); + } + + /** + * Pops the last block scope. + * @returns {void} + */ + function exitScope() { + stack.pop(); + } + + /** + * Reports a given reference. + * @param {eslint-scope.Reference} reference - A reference to report. + * @returns {void} + */ + function report(reference) { + const identifier = reference.identifier; + + context.report({ node: identifier, messageId: "outOfScope", data: { name: identifier.name } }); + } + + /** + * Finds and reports references which are outside of valid scopes. + * @param {ASTNode} node - A node to get variables. + * @returns {void} + */ + function checkForVariables(node) { + if (node.kind !== "var") { + return; + } + + // Defines a predicate to check whether or not a given reference is outside of valid scope. + const scopeRange = stack[stack.length - 1]; + + /** + * Check if a reference is out of scope + * @param {ASTNode} reference node to examine + * @returns {boolean} True is its outside the scope + * @private + */ + function isOutsideOfScope(reference) { + const idRange = reference.identifier.range; + + return idRange[0] < scopeRange[0] || idRange[1] > scopeRange[1]; + } + + // Gets declared variables, and checks its references. + const variables = context.getDeclaredVariables(node); + + for (let i = 0; i < variables.length; ++i) { + + // Reports. + variables[i] + .references + .filter(isOutsideOfScope) + .forEach(report); + } + } + + return { + Program(node) { + stack = [node.range]; + }, + + // Manages scopes. + BlockStatement: enterScope, + "BlockStatement:exit": exitScope, + ForStatement: enterScope, + "ForStatement:exit": exitScope, + ForInStatement: enterScope, + "ForInStatement:exit": exitScope, + ForOfStatement: enterScope, + "ForOfStatement:exit": exitScope, + SwitchStatement: enterScope, + "SwitchStatement:exit": exitScope, + CatchClause: enterScope, + "CatchClause:exit": exitScope, + + // Finds and reports references which are outside of valid scope. + VariableDeclaration: checkForVariables + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/block-spacing.js b/node_modules/eslint/lib/rules/block-spacing.js new file mode 100644 index 0000000..5363813 --- /dev/null +++ b/node_modules/eslint/lib/rules/block-spacing.js @@ -0,0 +1,145 @@ +/** + * @fileoverview A rule to disallow or enforce spaces inside of single line blocks. + * @author Toru Nagashima + */ + +"use strict"; + +const util = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow or enforce spaces inside of blocks after opening block and before closing block", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/block-spacing" + }, + + fixable: "whitespace", + + schema: [ + { enum: ["always", "never"] } + ], + + messages: { + missing: "Requires a space {{location}} '{{token}}'", + extra: "Unexpected space(s) {{location}} '{{token}}'" + } + }, + + create(context) { + const always = (context.options[0] !== "never"), + messageId = always ? "missing" : "extra", + sourceCode = context.getSourceCode(); + + /** + * Gets the open brace token from a given node. + * @param {ASTNode} node - A BlockStatement/SwitchStatement node to get. + * @returns {Token} The token of the open brace. + */ + function getOpenBrace(node) { + if (node.type === "SwitchStatement") { + if (node.cases.length > 0) { + return sourceCode.getTokenBefore(node.cases[0]); + } + return sourceCode.getLastToken(node, 1); + } + return sourceCode.getFirstToken(node); + } + + /** + * Checks whether or not: + * - given tokens are on same line. + * - there is/isn't a space between given tokens. + * @param {Token} left - A token to check. + * @param {Token} right - The token which is next to `left`. + * @returns {boolean} + * When the option is `"always"`, `true` if there are one or more spaces between given tokens. + * When the option is `"never"`, `true` if there are not any spaces between given tokens. + * If given tokens are not on same line, it's always `true`. + */ + function isValid(left, right) { + return ( + !util.isTokenOnSameLine(left, right) || + sourceCode.isSpaceBetweenTokens(left, right) === always + ); + } + + /** + * Reports invalid spacing style inside braces. + * @param {ASTNode} node - A BlockStatement/SwitchStatement node to get. + * @returns {void} + */ + function checkSpacingInsideBraces(node) { + + // Gets braces and the first/last token of content. + const openBrace = getOpenBrace(node); + const closeBrace = sourceCode.getLastToken(node); + const firstToken = sourceCode.getTokenAfter(openBrace, { includeComments: true }); + const lastToken = sourceCode.getTokenBefore(closeBrace, { includeComments: true }); + + // Skip if the node is invalid or empty. + if (openBrace.type !== "Punctuator" || + openBrace.value !== "{" || + closeBrace.type !== "Punctuator" || + closeBrace.value !== "}" || + firstToken === closeBrace + ) { + return; + } + + // Skip line comments for option never + if (!always && firstToken.type === "Line") { + return; + } + + // Check. + if (!isValid(openBrace, firstToken)) { + context.report({ + node, + loc: openBrace.loc.start, + messageId, + data: { + location: "after", + token: openBrace.value + }, + fix(fixer) { + if (always) { + return fixer.insertTextBefore(firstToken, " "); + } + + return fixer.removeRange([openBrace.range[1], firstToken.range[0]]); + } + }); + } + if (!isValid(lastToken, closeBrace)) { + context.report({ + node, + loc: closeBrace.loc.start, + messageId, + data: { + location: "before", + token: closeBrace.value + }, + fix(fixer) { + if (always) { + return fixer.insertTextAfter(lastToken, " "); + } + + return fixer.removeRange([lastToken.range[1], closeBrace.range[0]]); + } + }); + } + } + + return { + BlockStatement: checkSpacingInsideBraces, + SwitchStatement: checkSpacingInsideBraces + }; + } +}; diff --git a/node_modules/eslint/lib/rules/brace-style.js b/node_modules/eslint/lib/rules/brace-style.js new file mode 100644 index 0000000..e2cbafe --- /dev/null +++ b/node_modules/eslint/lib/rules/brace-style.js @@ -0,0 +1,185 @@ +/** + * @fileoverview Rule to flag block statements that do not use the one true brace style + * @author Ian Christian Myers + */ + +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce consistent brace style for blocks", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/brace-style" + }, + + schema: [ + { + enum: ["1tbs", "stroustrup", "allman"] + }, + { + type: "object", + properties: { + allowSingleLine: { + type: "boolean" + } + }, + additionalProperties: false + } + ], + + fixable: "whitespace", + + messages: { + nextLineOpen: "Opening curly brace does not appear on the same line as controlling statement.", + sameLineOpen: "Opening curly brace appears on the same line as controlling statement.", + blockSameLine: "Statement inside of curly braces should be on next line.", + nextLineClose: "Closing curly brace does not appear on the same line as the subsequent block.", + singleLineClose: "Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.", + sameLineClose: "Closing curly brace appears on the same line as the subsequent block." + } + }, + + create(context) { + const style = context.options[0] || "1tbs", + params = context.options[1] || {}, + sourceCode = context.getSourceCode(); + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Fixes a place where a newline unexpectedly appears + * @param {Token} firstToken The token before the unexpected newline + * @param {Token} secondToken The token after the unexpected newline + * @returns {Function} A fixer function to remove the newlines between the tokens + */ + function removeNewlineBetween(firstToken, secondToken) { + const textRange = [firstToken.range[1], secondToken.range[0]]; + const textBetween = sourceCode.text.slice(textRange[0], textRange[1]); + + // Don't do a fix if there is a comment between the tokens + if (textBetween.trim()) { + return null; + } + return fixer => fixer.replaceTextRange(textRange, " "); + } + + /** + * Validates a pair of curly brackets based on the user's config + * @param {Token} openingCurly The opening curly bracket + * @param {Token} closingCurly The closing curly bracket + * @returns {void} + */ + function validateCurlyPair(openingCurly, closingCurly) { + const tokenBeforeOpeningCurly = sourceCode.getTokenBefore(openingCurly); + const tokenAfterOpeningCurly = sourceCode.getTokenAfter(openingCurly); + const tokenBeforeClosingCurly = sourceCode.getTokenBefore(closingCurly); + const singleLineException = params.allowSingleLine && astUtils.isTokenOnSameLine(openingCurly, closingCurly); + + if (style !== "allman" && !astUtils.isTokenOnSameLine(tokenBeforeOpeningCurly, openingCurly)) { + context.report({ + node: openingCurly, + messageId: "nextLineOpen", + fix: removeNewlineBetween(tokenBeforeOpeningCurly, openingCurly) + }); + } + + if (style === "allman" && astUtils.isTokenOnSameLine(tokenBeforeOpeningCurly, openingCurly) && !singleLineException) { + context.report({ + node: openingCurly, + messageId: "sameLineOpen", + fix: fixer => fixer.insertTextBefore(openingCurly, "\n") + }); + } + + if (astUtils.isTokenOnSameLine(openingCurly, tokenAfterOpeningCurly) && tokenAfterOpeningCurly !== closingCurly && !singleLineException) { + context.report({ + node: openingCurly, + messageId: "blockSameLine", + fix: fixer => fixer.insertTextAfter(openingCurly, "\n") + }); + } + + if (tokenBeforeClosingCurly !== openingCurly && !singleLineException && astUtils.isTokenOnSameLine(tokenBeforeClosingCurly, closingCurly)) { + context.report({ + node: closingCurly, + messageId: "singleLineClose", + fix: fixer => fixer.insertTextBefore(closingCurly, "\n") + }); + } + } + + /** + * Validates the location of a token that appears before a keyword (e.g. a newline before `else`) + * @param {Token} curlyToken The closing curly token. This is assumed to precede a keyword token (such as `else` or `finally`). + * @returns {void} + */ + function validateCurlyBeforeKeyword(curlyToken) { + const keywordToken = sourceCode.getTokenAfter(curlyToken); + + if (style === "1tbs" && !astUtils.isTokenOnSameLine(curlyToken, keywordToken)) { + context.report({ + node: curlyToken, + messageId: "nextLineClose", + fix: removeNewlineBetween(curlyToken, keywordToken) + }); + } + + if (style !== "1tbs" && astUtils.isTokenOnSameLine(curlyToken, keywordToken)) { + context.report({ + node: curlyToken, + messageId: "sameLineClose", + fix: fixer => fixer.insertTextAfter(curlyToken, "\n") + }); + } + } + + //-------------------------------------------------------------------------- + // Public API + //-------------------------------------------------------------------------- + + return { + BlockStatement(node) { + if (!astUtils.STATEMENT_LIST_PARENTS.has(node.parent.type)) { + validateCurlyPair(sourceCode.getFirstToken(node), sourceCode.getLastToken(node)); + } + }, + ClassBody(node) { + validateCurlyPair(sourceCode.getFirstToken(node), sourceCode.getLastToken(node)); + }, + SwitchStatement(node) { + const closingCurly = sourceCode.getLastToken(node); + const openingCurly = sourceCode.getTokenBefore(node.cases.length ? node.cases[0] : closingCurly); + + validateCurlyPair(openingCurly, closingCurly); + }, + IfStatement(node) { + if (node.consequent.type === "BlockStatement" && node.alternate) { + + // Handle the keyword after the `if` block (before `else`) + validateCurlyBeforeKeyword(sourceCode.getLastToken(node.consequent)); + } + }, + TryStatement(node) { + + // Handle the keyword after the `try` block (before `catch` or `finally`) + validateCurlyBeforeKeyword(sourceCode.getLastToken(node.block)); + + if (node.handler && node.finalizer) { + + // Handle the keyword after the `catch` block (before `finally`) + validateCurlyBeforeKeyword(sourceCode.getLastToken(node.handler.body)); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/callback-return.js b/node_modules/eslint/lib/rules/callback-return.js new file mode 100644 index 0000000..f55fed8 --- /dev/null +++ b/node_modules/eslint/lib/rules/callback-return.js @@ -0,0 +1,180 @@ +/** + * @fileoverview Enforce return after a callback. + * @author Jamund Ferguson + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require `return` statements after callbacks", + category: "Node.js and CommonJS", + recommended: false, + url: "https://eslint.org/docs/rules/callback-return" + }, + + schema: [{ + type: "array", + items: { type: "string" } + }], + + messages: { + missingReturn: "Expected return with your callback function." + } + }, + + create(context) { + + const callbacks = context.options[0] || ["callback", "cb", "next"], + sourceCode = context.getSourceCode(); + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Find the closest parent matching a list of types. + * @param {ASTNode} node The node whose parents we are searching + * @param {Array} types The node types to match + * @returns {ASTNode} The matched node or undefined. + */ + function findClosestParentOfType(node, types) { + if (!node.parent) { + return null; + } + if (types.indexOf(node.parent.type) === -1) { + return findClosestParentOfType(node.parent, types); + } + return node.parent; + } + + /** + * Check to see if a node contains only identifers + * @param {ASTNode} node The node to check + * @returns {boolean} Whether or not the node contains only identifers + */ + function containsOnlyIdentifiers(node) { + if (node.type === "Identifier") { + return true; + } + + if (node.type === "MemberExpression") { + if (node.object.type === "Identifier") { + return true; + } + if (node.object.type === "MemberExpression") { + return containsOnlyIdentifiers(node.object); + } + } + + return false; + } + + /** + * Check to see if a CallExpression is in our callback list. + * @param {ASTNode} node The node to check against our callback names list. + * @returns {boolean} Whether or not this function matches our callback name. + */ + function isCallback(node) { + return containsOnlyIdentifiers(node.callee) && callbacks.indexOf(sourceCode.getText(node.callee)) > -1; + } + + /** + * Determines whether or not the callback is part of a callback expression. + * @param {ASTNode} node The callback node + * @param {ASTNode} parentNode The expression node + * @returns {boolean} Whether or not this is part of a callback expression + */ + function isCallbackExpression(node, parentNode) { + + // ensure the parent node exists and is an expression + if (!parentNode || parentNode.type !== "ExpressionStatement") { + return false; + } + + // cb() + if (parentNode.expression === node) { + return true; + } + + // special case for cb && cb() and similar + if (parentNode.expression.type === "BinaryExpression" || parentNode.expression.type === "LogicalExpression") { + if (parentNode.expression.right === node) { + return true; + } + } + + return false; + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + CallExpression(node) { + + // if we're not a callback we can return + if (!isCallback(node)) { + return; + } + + // find the closest block, return or loop + const closestBlock = findClosestParentOfType(node, ["BlockStatement", "ReturnStatement", "ArrowFunctionExpression"]) || {}; + + // if our parent is a return we know we're ok + if (closestBlock.type === "ReturnStatement") { + return; + } + + // arrow functions don't always have blocks and implicitly return + if (closestBlock.type === "ArrowFunctionExpression") { + return; + } + + // block statements are part of functions and most if statements + if (closestBlock.type === "BlockStatement") { + + // find the last item in the block + const lastItem = closestBlock.body[closestBlock.body.length - 1]; + + // if the callback is the last thing in a block that might be ok + if (isCallbackExpression(node, lastItem)) { + + const parentType = closestBlock.parent.type; + + // but only if the block is part of a function + if (parentType === "FunctionExpression" || + parentType === "FunctionDeclaration" || + parentType === "ArrowFunctionExpression" + ) { + return; + } + + } + + // ending a block with a return is also ok + if (lastItem.type === "ReturnStatement") { + + // but only if the callback is immediately before + if (isCallbackExpression(node, closestBlock.body[closestBlock.body.length - 2])) { + return; + } + } + + } + + // as long as you're the child of a function at this point you should be asked to return + if (findClosestParentOfType(node, ["FunctionDeclaration", "FunctionExpression", "ArrowFunctionExpression"])) { + context.report({ node, messageId: "missingReturn" }); + } + + } + + }; + } +}; diff --git a/node_modules/eslint/lib/rules/camelcase.js b/node_modules/eslint/lib/rules/camelcase.js new file mode 100644 index 0000000..84db54f --- /dev/null +++ b/node_modules/eslint/lib/rules/camelcase.js @@ -0,0 +1,159 @@ +/** + * @fileoverview Rule to flag non-camelcased identifiers + * @author Nicholas C. Zakas + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce camelcase naming convention", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/camelcase" + }, + + schema: [ + { + type: "object", + properties: { + properties: { + enum: ["always", "never"] + } + }, + additionalProperties: false + } + ], + + messages: { + notCamelCase: "Identifier '{{name}}' is not in camel case." + } + }, + + create(context) { + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + // contains reported nodes to avoid reporting twice on destructuring with shorthand notation + const reported = []; + const ALLOWED_PARENT_TYPES = new Set(["CallExpression", "NewExpression"]); + + /** + * Checks if a string contains an underscore and isn't all upper-case + * @param {string} name The string to check. + * @returns {boolean} if the string is underscored + * @private + */ + function isUnderscored(name) { + + // if there's an underscore, it might be A_CONSTANT, which is okay + return name.indexOf("_") > -1 && name !== name.toUpperCase(); + } + + /** + * Reports an AST node as a rule violation. + * @param {ASTNode} node The node to report. + * @returns {void} + * @private + */ + function report(node) { + if (reported.indexOf(node) < 0) { + reported.push(node); + context.report({ node, messageId: "notCamelCase", data: { name: node.name } }); + } + } + + const options = context.options[0] || {}; + let properties = options.properties || ""; + + if (properties !== "always" && properties !== "never") { + properties = "always"; + } + + return { + + Identifier(node) { + + /* + * Leading and trailing underscores are commonly used to flag + * private/protected identifiers, strip them + */ + const name = node.name.replace(/^_+|_+$/g, ""), + effectiveParent = (node.parent.type === "MemberExpression") ? node.parent.parent : node.parent; + + // MemberExpressions get special rules + if (node.parent.type === "MemberExpression") { + + // "never" check properties + if (properties === "never") { + return; + } + + // Always report underscored object names + if (node.parent.object.type === "Identifier" && node.parent.object.name === node.name && isUnderscored(name)) { + report(node); + + // Report AssignmentExpressions only if they are the left side of the assignment + } else if (effectiveParent.type === "AssignmentExpression" && isUnderscored(name) && (effectiveParent.right.type !== "MemberExpression" || effectiveParent.left.type === "MemberExpression" && effectiveParent.left.property.name === node.name)) { + report(node); + } + + /* + * Properties have their own rules, and + * AssignmentPattern nodes can be treated like Properties: + * e.g.: const { no_camelcased = false } = bar; + */ + } else if (node.parent.type === "Property" || node.parent.type === "AssignmentPattern") { + + if (node.parent.parent && node.parent.parent.type === "ObjectPattern") { + + if (node.parent.shorthand && node.parent.value.left && isUnderscored(name)) { + + report(node); + } + + // prevent checking righthand side of destructured object + if (node.parent.key === node && node.parent.value !== node) { + return; + } + + if (node.parent.value.name && isUnderscored(name)) { + report(node); + } + } + + // "never" check properties + if (properties === "never") { + return; + } + + // don't check right hand side of AssignmentExpression to prevent duplicate warnings + if (isUnderscored(name) && !ALLOWED_PARENT_TYPES.has(effectiveParent.type) && !(node.parent.right === node)) { + report(node); + } + + // Check if it's an import specifier + } else if (["ImportSpecifier", "ImportNamespaceSpecifier", "ImportDefaultSpecifier"].indexOf(node.parent.type) >= 0) { + + // Report only if the local imported identifier is underscored + if (node.parent.local && node.parent.local.name === node.name && isUnderscored(name)) { + report(node); + } + + // Report anything that is underscored that isn't a CallExpression + } else if (isUnderscored(name) && !ALLOWED_PARENT_TYPES.has(effectiveParent.type)) { + report(node); + } + } + + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/capitalized-comments.js b/node_modules/eslint/lib/rules/capitalized-comments.js new file mode 100644 index 0000000..c98a446 --- /dev/null +++ b/node_modules/eslint/lib/rules/capitalized-comments.js @@ -0,0 +1,307 @@ +/** + * @fileoverview enforce or disallow capitalization of the first letter of a comment + * @author Kevin Partington + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const LETTER_PATTERN = require("../util/patterns/letters"); +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const DEFAULT_IGNORE_PATTERN = astUtils.COMMENTS_IGNORE_PATTERN, + WHITESPACE = /\s/g, + MAYBE_URL = /^\s*[^:/?#\s]+:\/\/[^?#]/, // TODO: Combine w/ max-len pattern? + DEFAULTS = { + ignorePattern: null, + ignoreInlineComments: false, + ignoreConsecutiveComments: false + }; + +/* + * Base schema body for defining the basic capitalization rule, ignorePattern, + * and ignoreInlineComments values. + * This can be used in a few different ways in the actual schema. + */ +const SCHEMA_BODY = { + type: "object", + properties: { + ignorePattern: { + type: "string" + }, + ignoreInlineComments: { + type: "boolean" + }, + ignoreConsecutiveComments: { + type: "boolean" + } + }, + additionalProperties: false +}; + +/** + * Get normalized options for either block or line comments from the given + * user-provided options. + * - If the user-provided options is just a string, returns a normalized + * set of options using default values for all other options. + * - If the user-provided options is an object, then a normalized option + * set is returned. Options specified in overrides will take priority + * over options specified in the main options object, which will in + * turn take priority over the rule's defaults. + * + * @param {Object|string} rawOptions The user-provided options. + * @param {string} which Either "line" or "block". + * @returns {Object} The normalized options. + */ +function getNormalizedOptions(rawOptions, which) { + if (!rawOptions) { + return Object.assign({}, DEFAULTS); + } + + return Object.assign({}, DEFAULTS, rawOptions[which] || rawOptions); +} + +/** + * Get normalized options for block and line comments. + * + * @param {Object|string} rawOptions The user-provided options. + * @returns {Object} An object with "Line" and "Block" keys and corresponding + * normalized options objects. + */ +function getAllNormalizedOptions(rawOptions) { + return { + Line: getNormalizedOptions(rawOptions, "line"), + Block: getNormalizedOptions(rawOptions, "block") + }; +} + +/** + * Creates a regular expression for each ignorePattern defined in the rule + * options. + * + * This is done in order to avoid invoking the RegExp constructor repeatedly. + * + * @param {Object} normalizedOptions The normalized rule options. + * @returns {void} + */ +function createRegExpForIgnorePatterns(normalizedOptions) { + Object.keys(normalizedOptions).forEach(key => { + const ignorePatternStr = normalizedOptions[key].ignorePattern; + + if (ignorePatternStr) { + const regExp = RegExp(`^\\s*(?:${ignorePatternStr})`); + + normalizedOptions[key].ignorePatternRegExp = regExp; + } + }); +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce or disallow capitalization of the first letter of a comment", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/capitalized-comments" + }, + fixable: "code", + schema: [ + { enum: ["always", "never"] }, + { + oneOf: [ + SCHEMA_BODY, + { + type: "object", + properties: { + line: SCHEMA_BODY, + block: SCHEMA_BODY + }, + additionalProperties: false + } + ] + } + ], + + messages: { + unexpectedLowercaseComment: "Comments should not begin with a lowercase character", + unexpectedUppercaseComment: "Comments should not begin with an uppercase character" + } + }, + + create(context) { + + const capitalize = context.options[0] || "always", + normalizedOptions = getAllNormalizedOptions(context.options[1]), + sourceCode = context.getSourceCode(); + + createRegExpForIgnorePatterns(normalizedOptions); + + //---------------------------------------------------------------------- + // Helpers + //---------------------------------------------------------------------- + + /** + * Checks whether a comment is an inline comment. + * + * For the purpose of this rule, a comment is inline if: + * 1. The comment is preceded by a token on the same line; and + * 2. The command is followed by a token on the same line. + * + * Note that the comment itself need not be single-line! + * + * Also, it follows from this definition that only block comments can + * be considered as possibly inline. This is because line comments + * would consume any following tokens on the same line as the comment. + * + * @param {ASTNode} comment The comment node to check. + * @returns {boolean} True if the comment is an inline comment, false + * otherwise. + */ + function isInlineComment(comment) { + const previousToken = sourceCode.getTokenBefore(comment, { includeComments: true }), + nextToken = sourceCode.getTokenAfter(comment, { includeComments: true }); + + return Boolean( + previousToken && + nextToken && + comment.loc.start.line === previousToken.loc.end.line && + comment.loc.end.line === nextToken.loc.start.line + ); + } + + /** + * Determine if a comment follows another comment. + * + * @param {ASTNode} comment The comment to check. + * @returns {boolean} True if the comment follows a valid comment. + */ + function isConsecutiveComment(comment) { + const previousTokenOrComment = sourceCode.getTokenBefore(comment, { includeComments: true }); + + return Boolean( + previousTokenOrComment && + ["Block", "Line"].indexOf(previousTokenOrComment.type) !== -1 + ); + } + + /** + * Check a comment to determine if it is valid for this rule. + * + * @param {ASTNode} comment The comment node to process. + * @param {Object} options The options for checking this comment. + * @returns {boolean} True if the comment is valid, false otherwise. + */ + function isCommentValid(comment, options) { + + // 1. Check for default ignore pattern. + if (DEFAULT_IGNORE_PATTERN.test(comment.value)) { + return true; + } + + // 2. Check for custom ignore pattern. + const commentWithoutAsterisks = comment.value + .replace(/\*/g, ""); + + if (options.ignorePatternRegExp && options.ignorePatternRegExp.test(commentWithoutAsterisks)) { + return true; + } + + // 3. Check for inline comments. + if (options.ignoreInlineComments && isInlineComment(comment)) { + return true; + } + + // 4. Is this a consecutive comment (and are we tolerating those)? + if (options.ignoreConsecutiveComments && isConsecutiveComment(comment)) { + return true; + } + + // 5. Does the comment start with a possible URL? + if (MAYBE_URL.test(commentWithoutAsterisks)) { + return true; + } + + // 6. Is the initial word character a letter? + const commentWordCharsOnly = commentWithoutAsterisks + .replace(WHITESPACE, ""); + + if (commentWordCharsOnly.length === 0) { + return true; + } + + const firstWordChar = commentWordCharsOnly[0]; + + if (!LETTER_PATTERN.test(firstWordChar)) { + return true; + } + + // 7. Check the case of the initial word character. + const isUppercase = firstWordChar !== firstWordChar.toLocaleLowerCase(), + isLowercase = firstWordChar !== firstWordChar.toLocaleUpperCase(); + + if (capitalize === "always" && isLowercase) { + return false; + } + if (capitalize === "never" && isUppercase) { + return false; + } + + return true; + } + + /** + * Process a comment to determine if it needs to be reported. + * + * @param {ASTNode} comment The comment node to process. + * @returns {void} + */ + function processComment(comment) { + const options = normalizedOptions[comment.type], + commentValid = isCommentValid(comment, options); + + if (!commentValid) { + const messageId = capitalize === "always" + ? "unexpectedLowercaseComment" + : "unexpectedUppercaseComment"; + + context.report({ + node: null, // Intentionally using loc instead + loc: comment.loc, + messageId, + fix(fixer) { + const match = comment.value.match(LETTER_PATTERN); + + return fixer.replaceTextRange( + + // Offset match.index by 2 to account for the first 2 characters that start the comment (// or /*) + [comment.range[0] + match.index + 2, comment.range[0] + match.index + 3], + capitalize === "always" ? match[0].toLocaleUpperCase() : match[0].toLocaleLowerCase() + ); + } + }); + } + } + + //---------------------------------------------------------------------- + // Public + //---------------------------------------------------------------------- + + return { + Program() { + const comments = sourceCode.getAllComments(); + + comments.filter(token => token.type !== "Shebang").forEach(processComment); + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/class-methods-use-this.js b/node_modules/eslint/lib/rules/class-methods-use-this.js new file mode 100644 index 0000000..b7d9413 --- /dev/null +++ b/node_modules/eslint/lib/rules/class-methods-use-this.js @@ -0,0 +1,115 @@ +/** + * @fileoverview Rule to enforce that all class methods use 'this'. + * @author Patrick Williams + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce that class methods utilize `this`", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/class-methods-use-this" + }, + schema: [{ + type: "object", + properties: { + exceptMethods: { + type: "array", + items: { + type: "string" + } + } + }, + additionalProperties: false + }], + + messages: { + missingThis: "Expected 'this' to be used by class method '{{name}}'." + } + }, + create(context) { + const config = context.options[0] ? Object.assign({}, context.options[0]) : {}; + const exceptMethods = new Set(config.exceptMethods || []); + + const stack = []; + + /** + * Initializes the current context to false and pushes it onto the stack. + * These booleans represent whether 'this' has been used in the context. + * @returns {void} + * @private + */ + function enterFunction() { + stack.push(false); + } + + /** + * Check if the node is an instance method + * @param {ASTNode} node - node to check + * @returns {boolean} True if its an instance method + * @private + */ + function isInstanceMethod(node) { + return !node.static && node.kind !== "constructor" && node.type === "MethodDefinition"; + } + + /** + * Check if the node is an instance method not excluded by config + * @param {ASTNode} node - node to check + * @returns {boolean} True if it is an instance method, and not excluded by config + * @private + */ + function isIncludedInstanceMethod(node) { + return isInstanceMethod(node) && !exceptMethods.has(node.key.name); + } + + /** + * Checks if we are leaving a function that is a method, and reports if 'this' has not been used. + * Static methods and the constructor are exempt. + * Then pops the context off the stack. + * @param {ASTNode} node - A function node that was entered. + * @returns {void} + * @private + */ + function exitFunction(node) { + const methodUsesThis = stack.pop(); + + if (isIncludedInstanceMethod(node.parent) && !methodUsesThis) { + context.report({ + node, + messageId: "missingThis", + data: { + name: node.parent.key.name + } + }); + } + } + + /** + * Mark the current context as having used 'this'. + * @returns {void} + * @private + */ + function markThisUsed() { + if (stack.length) { + stack[stack.length - 1] = true; + } + } + + return { + FunctionDeclaration: enterFunction, + "FunctionDeclaration:exit": exitFunction, + FunctionExpression: enterFunction, + "FunctionExpression:exit": exitFunction, + ThisExpression: markThisUsed, + Super: markThisUsed + }; + } +}; diff --git a/node_modules/eslint/lib/rules/comma-dangle.js b/node_modules/eslint/lib/rules/comma-dangle.js new file mode 100644 index 0000000..50de7b5 --- /dev/null +++ b/node_modules/eslint/lib/rules/comma-dangle.js @@ -0,0 +1,341 @@ +/** + * @fileoverview Rule to forbid or enforce dangling commas. + * @author Ian Christian Myers + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const lodash = require("lodash"); +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const DEFAULT_OPTIONS = Object.freeze({ + arrays: "never", + objects: "never", + imports: "never", + exports: "never", + functions: "ignore" +}); + +/** + * Checks whether or not a trailing comma is allowed in a given node. + * If the `lastItem` is `RestElement` or `RestProperty`, it disallows trailing commas. + * + * @param {ASTNode} lastItem - The node of the last element in the given node. + * @returns {boolean} `true` if a trailing comma is allowed. + */ +function isTrailingCommaAllowed(lastItem) { + return !( + lastItem.type === "RestElement" || + lastItem.type === "RestProperty" || + lastItem.type === "ExperimentalRestProperty" + ); +} + +/** + * Normalize option value. + * + * @param {string|Object|undefined} optionValue - The 1st option value to normalize. + * @returns {Object} The normalized option value. + */ +function normalizeOptions(optionValue) { + if (typeof optionValue === "string") { + return { + arrays: optionValue, + objects: optionValue, + imports: optionValue, + exports: optionValue, + + // For backward compatibility, always ignore functions. + functions: "ignore" + }; + } + if (typeof optionValue === "object" && optionValue !== null) { + return { + arrays: optionValue.arrays || DEFAULT_OPTIONS.arrays, + objects: optionValue.objects || DEFAULT_OPTIONS.objects, + imports: optionValue.imports || DEFAULT_OPTIONS.imports, + exports: optionValue.exports || DEFAULT_OPTIONS.exports, + functions: optionValue.functions || DEFAULT_OPTIONS.functions + }; + } + + return DEFAULT_OPTIONS; +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require or disallow trailing commas", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/comma-dangle" + }, + fixable: "code", + schema: { + definitions: { + value: { + enum: [ + "always-multiline", + "always", + "never", + "only-multiline" + ] + }, + valueWithIgnore: { + enum: [ + "always-multiline", + "always", + "ignore", + "never", + "only-multiline" + ] + } + }, + type: "array", + items: [ + { + oneOf: [ + { + $ref: "#/definitions/value" + }, + { + type: "object", + properties: { + arrays: { $ref: "#/definitions/valueWithIgnore" }, + objects: { $ref: "#/definitions/valueWithIgnore" }, + imports: { $ref: "#/definitions/valueWithIgnore" }, + exports: { $ref: "#/definitions/valueWithIgnore" }, + functions: { $ref: "#/definitions/valueWithIgnore" } + }, + additionalProperties: false + } + ] + } + ] + }, + + messages: { + unexpected: "Unexpected trailing comma.", + missing: "Missing trailing comma." + } + }, + + create(context) { + const options = normalizeOptions(context.options[0]); + const sourceCode = context.getSourceCode(); + + /** + * Gets the last item of the given node. + * @param {ASTNode} node - The node to get. + * @returns {ASTNode|null} The last node or null. + */ + function getLastItem(node) { + switch (node.type) { + case "ObjectExpression": + case "ObjectPattern": + return lodash.last(node.properties); + case "ArrayExpression": + case "ArrayPattern": + return lodash.last(node.elements); + case "ImportDeclaration": + case "ExportNamedDeclaration": + return lodash.last(node.specifiers); + case "FunctionDeclaration": + case "FunctionExpression": + case "ArrowFunctionExpression": + return lodash.last(node.params); + case "CallExpression": + case "NewExpression": + return lodash.last(node.arguments); + default: + return null; + } + } + + /** + * Gets the trailing comma token of the given node. + * If the trailing comma does not exist, this returns the token which is + * the insertion point of the trailing comma token. + * + * @param {ASTNode} node - The node to get. + * @param {ASTNode} lastItem - The last item of the node. + * @returns {Token} The trailing comma token or the insertion point. + */ + function getTrailingToken(node, lastItem) { + switch (node.type) { + case "ObjectExpression": + case "ArrayExpression": + case "CallExpression": + case "NewExpression": + return sourceCode.getLastToken(node, 1); + default: { + const nextToken = sourceCode.getTokenAfter(lastItem); + + if (astUtils.isCommaToken(nextToken)) { + return nextToken; + } + return sourceCode.getLastToken(lastItem); + } + } + } + + /** + * Checks whether or not a given node is multiline. + * This rule handles a given node as multiline when the closing parenthesis + * and the last element are not on the same line. + * + * @param {ASTNode} node - A node to check. + * @returns {boolean} `true` if the node is multiline. + */ + function isMultiline(node) { + const lastItem = getLastItem(node); + + if (!lastItem) { + return false; + } + + const penultimateToken = getTrailingToken(node, lastItem); + const lastToken = sourceCode.getTokenAfter(penultimateToken); + + return lastToken.loc.end.line !== penultimateToken.loc.end.line; + } + + /** + * Reports a trailing comma if it exists. + * + * @param {ASTNode} node - A node to check. Its type is one of + * ObjectExpression, ObjectPattern, ArrayExpression, ArrayPattern, + * ImportDeclaration, and ExportNamedDeclaration. + * @returns {void} + */ + function forbidTrailingComma(node) { + const lastItem = getLastItem(node); + + if (!lastItem || (node.type === "ImportDeclaration" && lastItem.type !== "ImportSpecifier")) { + return; + } + + const trailingToken = getTrailingToken(node, lastItem); + + if (astUtils.isCommaToken(trailingToken)) { + context.report({ + node: lastItem, + loc: trailingToken.loc.start, + messageId: "unexpected", + fix(fixer) { + return fixer.remove(trailingToken); + } + }); + } + } + + /** + * Reports the last element of a given node if it does not have a trailing + * comma. + * + * If a given node is `ArrayPattern` which has `RestElement`, the trailing + * comma is disallowed, so report if it exists. + * + * @param {ASTNode} node - A node to check. Its type is one of + * ObjectExpression, ObjectPattern, ArrayExpression, ArrayPattern, + * ImportDeclaration, and ExportNamedDeclaration. + * @returns {void} + */ + function forceTrailingComma(node) { + const lastItem = getLastItem(node); + + if (!lastItem || (node.type === "ImportDeclaration" && lastItem.type !== "ImportSpecifier")) { + return; + } + if (!isTrailingCommaAllowed(lastItem)) { + forbidTrailingComma(node); + return; + } + + const trailingToken = getTrailingToken(node, lastItem); + + if (trailingToken.value !== ",") { + context.report({ + node: lastItem, + loc: trailingToken.loc.end, + messageId: "missing", + fix(fixer) { + return fixer.insertTextAfter(trailingToken, ","); + } + }); + } + } + + /** + * If a given node is multiline, reports the last element of a given node + * when it does not have a trailing comma. + * Otherwise, reports a trailing comma if it exists. + * + * @param {ASTNode} node - A node to check. Its type is one of + * ObjectExpression, ObjectPattern, ArrayExpression, ArrayPattern, + * ImportDeclaration, and ExportNamedDeclaration. + * @returns {void} + */ + function forceTrailingCommaIfMultiline(node) { + if (isMultiline(node)) { + forceTrailingComma(node); + } else { + forbidTrailingComma(node); + } + } + + /** + * Only if a given node is not multiline, reports the last element of a given node + * when it does not have a trailing comma. + * Otherwise, reports a trailing comma if it exists. + * + * @param {ASTNode} node - A node to check. Its type is one of + * ObjectExpression, ObjectPattern, ArrayExpression, ArrayPattern, + * ImportDeclaration, and ExportNamedDeclaration. + * @returns {void} + */ + function allowTrailingCommaIfMultiline(node) { + if (!isMultiline(node)) { + forbidTrailingComma(node); + } + } + + const predicate = { + always: forceTrailingComma, + "always-multiline": forceTrailingCommaIfMultiline, + "only-multiline": allowTrailingCommaIfMultiline, + never: forbidTrailingComma, + ignore: lodash.noop + }; + + return { + ObjectExpression: predicate[options.objects], + ObjectPattern: predicate[options.objects], + + ArrayExpression: predicate[options.arrays], + ArrayPattern: predicate[options.arrays], + + ImportDeclaration: predicate[options.imports], + + ExportNamedDeclaration: predicate[options.exports], + + FunctionDeclaration: predicate[options.functions], + FunctionExpression: predicate[options.functions], + ArrowFunctionExpression: predicate[options.functions], + CallExpression: predicate[options.functions], + NewExpression: predicate[options.functions] + }; + } +}; diff --git a/node_modules/eslint/lib/rules/comma-spacing.js b/node_modules/eslint/lib/rules/comma-spacing.js new file mode 100644 index 0000000..2a48e54 --- /dev/null +++ b/node_modules/eslint/lib/rules/comma-spacing.js @@ -0,0 +1,187 @@ +/** + * @fileoverview Comma spacing - validates spacing before and after comma + * @author Vignesh Anand aka vegetableman. + */ +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce consistent spacing before and after commas", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/comma-spacing" + }, + + fixable: "whitespace", + + schema: [ + { + type: "object", + properties: { + before: { + type: "boolean" + }, + after: { + type: "boolean" + } + }, + additionalProperties: false + } + ], + + messages: { + missing: "A space is required {{loc}} ','.", + unexpected: "There should be no space {{loc}} ','." + } + }, + + create(context) { + + const sourceCode = context.getSourceCode(); + const tokensAndComments = sourceCode.tokensAndComments; + + const options = { + before: context.options[0] ? !!context.options[0].before : false, + after: context.options[0] ? !!context.options[0].after : true + }; + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + // list of comma tokens to ignore for the check of leading whitespace + const commaTokensToIgnore = []; + + /** + * Reports a spacing error with an appropriate message. + * @param {ASTNode} node The binary expression node to report. + * @param {string} loc Is the error "before" or "after" the comma? + * @param {ASTNode} otherNode The node at the left or right of `node` + * @returns {void} + * @private + */ + function report(node, loc, otherNode) { + context.report({ + node, + fix(fixer) { + if (options[loc]) { + if (loc === "before") { + return fixer.insertTextBefore(node, " "); + } + return fixer.insertTextAfter(node, " "); + + } + let start, end; + const newText = ""; + + if (loc === "before") { + start = otherNode.range[1]; + end = node.range[0]; + } else { + start = node.range[1]; + end = otherNode.range[0]; + } + + return fixer.replaceTextRange([start, end], newText); + + }, + messageId: options[loc] ? "missing" : "unexpected", + data: { + loc + } + }); + } + + /** + * Validates the spacing around a comma token. + * @param {Object} tokens - The tokens to be validated. + * @param {Token} tokens.comma The token representing the comma. + * @param {Token} [tokens.left] The last token before the comma. + * @param {Token} [tokens.right] The first token after the comma. + * @param {Token|ASTNode} reportItem The item to use when reporting an error. + * @returns {void} + * @private + */ + function validateCommaItemSpacing(tokens, reportItem) { + if (tokens.left && astUtils.isTokenOnSameLine(tokens.left, tokens.comma) && + (options.before !== sourceCode.isSpaceBetweenTokens(tokens.left, tokens.comma)) + ) { + report(reportItem, "before", tokens.left); + } + + if (tokens.right && !options.after && tokens.right.type === "Line") { + return; + } + + if (tokens.right && astUtils.isTokenOnSameLine(tokens.comma, tokens.right) && + (options.after !== sourceCode.isSpaceBetweenTokens(tokens.comma, tokens.right)) + ) { + report(reportItem, "after", tokens.right); + } + } + + /** + * Adds null elements of the given ArrayExpression or ArrayPattern node to the ignore list. + * @param {ASTNode} node An ArrayExpression or ArrayPattern node. + * @returns {void} + */ + function addNullElementsToIgnoreList(node) { + let previousToken = sourceCode.getFirstToken(node); + + node.elements.forEach(element => { + let token; + + if (element === null) { + token = sourceCode.getTokenAfter(previousToken); + + if (astUtils.isCommaToken(token)) { + commaTokensToIgnore.push(token); + } + } else { + token = sourceCode.getTokenAfter(element); + } + + previousToken = token; + }); + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + "Program:exit"() { + tokensAndComments.forEach((token, i) => { + + if (!astUtils.isCommaToken(token)) { + return; + } + + if (token && token.type === "JSXText") { + return; + } + + const previousToken = tokensAndComments[i - 1]; + const nextToken = tokensAndComments[i + 1]; + + validateCommaItemSpacing({ + comma: token, + left: astUtils.isCommaToken(previousToken) || commaTokensToIgnore.indexOf(token) > -1 ? null : previousToken, + right: astUtils.isCommaToken(nextToken) ? null : nextToken + }, token); + }); + }, + ArrayExpression: addNullElementsToIgnoreList, + ArrayPattern: addNullElementsToIgnoreList + + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/comma-style.js b/node_modules/eslint/lib/rules/comma-style.js new file mode 100644 index 0000000..5ba2dbb --- /dev/null +++ b/node_modules/eslint/lib/rules/comma-style.js @@ -0,0 +1,311 @@ +/** + * @fileoverview Comma style - enforces comma styles of two types: last and first + * @author Vignesh Anand aka vegetableman + */ + +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce consistent comma style", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/comma-style" + }, + fixable: "code", + schema: [ + { + enum: ["first", "last"] + }, + { + type: "object", + properties: { + exceptions: { + type: "object", + additionalProperties: { + type: "boolean" + } + } + }, + additionalProperties: false + } + ], + messages: { + unexpectedLineBeforeAndAfterComma: "Bad line breaking before and after ','.", + expectedCommaFirst: "',' should be placed first.", + expectedCommaLast: "',' should be placed last." + } + }, + + create(context) { + const style = context.options[0] || "last", + sourceCode = context.getSourceCode(); + const exceptions = { + ArrayPattern: true, + ArrowFunctionExpression: true, + CallExpression: true, + FunctionDeclaration: true, + FunctionExpression: true, + ImportDeclaration: true, + ObjectPattern: true, + NewExpression: true + }; + + if (context.options.length === 2 && context.options[1].hasOwnProperty("exceptions")) { + const keys = Object.keys(context.options[1].exceptions); + + for (let i = 0; i < keys.length; i++) { + exceptions[keys[i]] = context.options[1].exceptions[keys[i]]; + } + } + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Modified text based on the style + * @param {string} styleType Style type + * @param {string} text Source code text + * @returns {string} modified text + * @private + */ + function getReplacedText(styleType, text) { + switch (styleType) { + case "between": + return `,${text.replace("\n", "")}`; + + case "first": + return `${text},`; + + case "last": + return `,${text}`; + + default: + return ""; + } + } + + /** + * Determines the fixer function for a given style. + * @param {string} styleType comma style + * @param {ASTNode} previousItemToken The token to check. + * @param {ASTNode} commaToken The token to check. + * @param {ASTNode} currentItemToken The token to check. + * @returns {Function} Fixer function + * @private + */ + function getFixerFunction(styleType, previousItemToken, commaToken, currentItemToken) { + const text = + sourceCode.text.slice(previousItemToken.range[1], commaToken.range[0]) + + sourceCode.text.slice(commaToken.range[1], currentItemToken.range[0]); + const range = [previousItemToken.range[1], currentItemToken.range[0]]; + + return function(fixer) { + return fixer.replaceTextRange(range, getReplacedText(styleType, text)); + }; + } + + /** + * Validates the spacing around single items in lists. + * @param {Token} previousItemToken The last token from the previous item. + * @param {Token} commaToken The token representing the comma. + * @param {Token} currentItemToken The first token of the current item. + * @param {Token} reportItem The item to use when reporting an error. + * @returns {void} + * @private + */ + function validateCommaItemSpacing(previousItemToken, commaToken, currentItemToken, reportItem) { + + // if single line + if (astUtils.isTokenOnSameLine(commaToken, currentItemToken) && + astUtils.isTokenOnSameLine(previousItemToken, commaToken)) { + + // do nothing. + + } else if (!astUtils.isTokenOnSameLine(commaToken, currentItemToken) && + !astUtils.isTokenOnSameLine(previousItemToken, commaToken)) { + + // lone comma + context.report({ + node: reportItem, + loc: { + line: commaToken.loc.end.line, + column: commaToken.loc.start.column + }, + messageId: "unexpectedLineBeforeAndAfterComma", + fix: getFixerFunction("between", previousItemToken, commaToken, currentItemToken) + }); + + } else if (style === "first" && !astUtils.isTokenOnSameLine(commaToken, currentItemToken)) { + + context.report({ + node: reportItem, + messageId: "expectedCommaFirst", + fix: getFixerFunction(style, previousItemToken, commaToken, currentItemToken) + }); + + } else if (style === "last" && astUtils.isTokenOnSameLine(commaToken, currentItemToken)) { + + context.report({ + node: reportItem, + loc: { + line: commaToken.loc.end.line, + column: commaToken.loc.end.column + }, + messageId: "expectedCommaLast", + fix: getFixerFunction(style, previousItemToken, commaToken, currentItemToken) + }); + } + } + + /** + * Checks the comma placement with regards to a declaration/property/element + * @param {ASTNode} node The binary expression node to check + * @param {string} property The property of the node containing child nodes. + * @private + * @returns {void} + */ + function validateComma(node, property) { + const items = node[property], + arrayLiteral = (node.type === "ArrayExpression" || node.type === "ArrayPattern"); + + if (items.length > 1 || arrayLiteral) { + + // seed as opening [ + let previousItemToken = sourceCode.getFirstToken(node); + + items.forEach(item => { + const commaToken = item ? sourceCode.getTokenBefore(item) : previousItemToken, + currentItemToken = item ? sourceCode.getFirstToken(item) : sourceCode.getTokenAfter(commaToken), + reportItem = item || currentItemToken, + tokenBeforeComma = sourceCode.getTokenBefore(commaToken); + + // Check if previous token is wrapped in parentheses + if (tokenBeforeComma && astUtils.isClosingParenToken(tokenBeforeComma)) { + previousItemToken = tokenBeforeComma; + } + + /* + * This works by comparing three token locations: + * - previousItemToken is the last token of the previous item + * - commaToken is the location of the comma before the current item + * - currentItemToken is the first token of the current item + * + * These values get switched around if item is undefined. + * previousItemToken will refer to the last token not belonging + * to the current item, which could be a comma or an opening + * square bracket. currentItemToken could be a comma. + * + * All comparisons are done based on these tokens directly, so + * they are always valid regardless of an undefined item. + */ + if (astUtils.isCommaToken(commaToken)) { + validateCommaItemSpacing(previousItemToken, commaToken, + currentItemToken, reportItem); + } + + if (item) { + const tokenAfterItem = sourceCode.getTokenAfter(item, astUtils.isNotClosingParenToken); + + previousItemToken = tokenAfterItem + ? sourceCode.getTokenBefore(tokenAfterItem) + : sourceCode.ast.tokens[sourceCode.ast.tokens.length - 1]; + } + }); + + /* + * Special case for array literals that have empty last items, such + * as [ 1, 2, ]. These arrays only have two items show up in the + * AST, so we need to look at the token to verify that there's no + * dangling comma. + */ + if (arrayLiteral) { + + const lastToken = sourceCode.getLastToken(node), + nextToLastToken = sourceCode.getTokenBefore(lastToken); + + if (astUtils.isCommaToken(nextToLastToken)) { + validateCommaItemSpacing( + sourceCode.getTokenBefore(nextToLastToken), + nextToLastToken, + lastToken, + lastToken + ); + } + } + } + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + const nodes = {}; + + if (!exceptions.VariableDeclaration) { + nodes.VariableDeclaration = function(node) { + validateComma(node, "declarations"); + }; + } + if (!exceptions.ObjectExpression) { + nodes.ObjectExpression = function(node) { + validateComma(node, "properties"); + }; + } + if (!exceptions.ObjectPattern) { + nodes.ObjectPattern = function(node) { + validateComma(node, "properties"); + }; + } + if (!exceptions.ArrayExpression) { + nodes.ArrayExpression = function(node) { + validateComma(node, "elements"); + }; + } + if (!exceptions.ArrayPattern) { + nodes.ArrayPattern = function(node) { + validateComma(node, "elements"); + }; + } + if (!exceptions.FunctionDeclaration) { + nodes.FunctionDeclaration = function(node) { + validateComma(node, "params"); + }; + } + if (!exceptions.FunctionExpression) { + nodes.FunctionExpression = function(node) { + validateComma(node, "params"); + }; + } + if (!exceptions.ArrowFunctionExpression) { + nodes.ArrowFunctionExpression = function(node) { + validateComma(node, "params"); + }; + } + if (!exceptions.CallExpression) { + nodes.CallExpression = function(node) { + validateComma(node, "arguments"); + }; + } + if (!exceptions.ImportDeclaration) { + nodes.ImportDeclaration = function(node) { + validateComma(node, "specifiers"); + }; + } + if (!exceptions.NewExpression) { + nodes.NewExpression = function(node) { + validateComma(node, "arguments"); + }; + } + + return nodes; + } +}; diff --git a/node_modules/eslint/lib/rules/complexity.js b/node_modules/eslint/lib/rules/complexity.js new file mode 100644 index 0000000..0b86441 --- /dev/null +++ b/node_modules/eslint/lib/rules/complexity.js @@ -0,0 +1,159 @@ +/** + * @fileoverview Counts the cyclomatic complexity of each function of the script. See http://en.wikipedia.org/wiki/Cyclomatic_complexity. + * Counts the number of if, conditional, for, whilte, try, switch/case, + * @author Patrick Brosset + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const lodash = require("lodash"); + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce a maximum cyclomatic complexity allowed in a program", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/complexity" + }, + + schema: [ + { + oneOf: [ + { + type: "integer", + minimum: 0 + }, + { + type: "object", + properties: { + maximum: { + type: "integer", + minimum: 0 + }, + max: { + type: "integer", + minimum: 0 + } + }, + additionalProperties: false + } + ] + } + ], + + messages: { + complex: "{{name}} has a complexity of {{complexity}}." + } + }, + + create(context) { + const option = context.options[0]; + let THRESHOLD = 20; + + if (typeof option === "object" && option.hasOwnProperty("maximum") && typeof option.maximum === "number") { + THRESHOLD = option.maximum; + } + if (typeof option === "object" && option.hasOwnProperty("max") && typeof option.max === "number") { + THRESHOLD = option.max; + } + if (typeof option === "number") { + THRESHOLD = option; + } + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + // Using a stack to store complexity (handling nested functions) + const fns = []; + + /** + * When parsing a new function, store it in our function stack + * @returns {void} + * @private + */ + function startFunction() { + fns.push(1); + } + + /** + * Evaluate the node at the end of function + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ + function endFunction(node) { + const name = lodash.upperFirst(astUtils.getFunctionNameWithKind(node)); + const complexity = fns.pop(); + + if (complexity > THRESHOLD) { + context.report({ + node, + messageId: "complex", + data: { name, complexity } + }); + } + } + + /** + * Increase the complexity of the function in context + * @returns {void} + * @private + */ + function increaseComplexity() { + if (fns.length) { + fns[fns.length - 1]++; + } + } + + /** + * Increase the switch complexity in context + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ + function increaseSwitchComplexity(node) { + + // Avoiding `default` + if (node.test) { + increaseComplexity(); + } + } + + //-------------------------------------------------------------------------- + // Public API + //-------------------------------------------------------------------------- + + return { + FunctionDeclaration: startFunction, + FunctionExpression: startFunction, + ArrowFunctionExpression: startFunction, + "FunctionDeclaration:exit": endFunction, + "FunctionExpression:exit": endFunction, + "ArrowFunctionExpression:exit": endFunction, + + CatchClause: increaseComplexity, + ConditionalExpression: increaseComplexity, + LogicalExpression: increaseComplexity, + ForStatement: increaseComplexity, + ForInStatement: increaseComplexity, + ForOfStatement: increaseComplexity, + IfStatement: increaseComplexity, + SwitchCase: increaseSwitchComplexity, + WhileStatement: increaseComplexity, + DoWhileStatement: increaseComplexity + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/computed-property-spacing.js b/node_modules/eslint/lib/rules/computed-property-spacing.js new file mode 100644 index 0000000..51334a2 --- /dev/null +++ b/node_modules/eslint/lib/rules/computed-property-spacing.js @@ -0,0 +1,185 @@ +/** + * @fileoverview Disallows or enforces spaces inside computed properties. + * @author Jamund Ferguson + */ +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce consistent spacing inside computed property brackets", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/computed-property-spacing" + }, + + fixable: "whitespace", + + schema: [ + { + enum: ["always", "never"] + } + ], + + messages: { + unexpectedSpaceBefore: "There should be no space before '{{tokenValue}}'.", + unexpectedSpaceAfter: "There should be no space after '{{tokenValue}}'.", + + missingSpaceBefore: "A space is required before '{{tokenValue}}'.", + missingSpaceAfter: "A space is required after '{{tokenValue}}'." + } + }, + + create(context) { + const sourceCode = context.getSourceCode(); + const propertyNameMustBeSpaced = context.options[0] === "always"; // default is "never" + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Reports that there shouldn't be a space after the first token + * @param {ASTNode} node - The node to report in the event of an error. + * @param {Token} token - The token to use for the report. + * @param {Token} tokenAfter - The token after `token`. + * @returns {void} + */ + function reportNoBeginningSpace(node, token, tokenAfter) { + context.report({ + node, + loc: token.loc.start, + messageId: "unexpectedSpaceAfter", + data: { + tokenValue: token.value + }, + fix(fixer) { + return fixer.removeRange([token.range[1], tokenAfter.range[0]]); + } + }); + } + + /** + * Reports that there shouldn't be a space before the last token + * @param {ASTNode} node - The node to report in the event of an error. + * @param {Token} token - The token to use for the report. + * @param {Token} tokenBefore - The token before `token`. + * @returns {void} + */ + function reportNoEndingSpace(node, token, tokenBefore) { + context.report({ + node, + loc: token.loc.start, + messageId: "unexpectedSpaceBefore", + data: { + tokenValue: token.value + }, + fix(fixer) { + return fixer.removeRange([tokenBefore.range[1], token.range[0]]); + } + }); + } + + /** + * Reports that there should be a space after the first token + * @param {ASTNode} node - The node to report in the event of an error. + * @param {Token} token - The token to use for the report. + * @returns {void} + */ + function reportRequiredBeginningSpace(node, token) { + context.report({ + node, + loc: token.loc.start, + messageId: "missingSpaceAfter", + data: { + tokenValue: token.value + }, + fix(fixer) { + return fixer.insertTextAfter(token, " "); + } + }); + } + + /** + * Reports that there should be a space before the last token + * @param {ASTNode} node - The node to report in the event of an error. + * @param {Token} token - The token to use for the report. + * @returns {void} + */ + function reportRequiredEndingSpace(node, token) { + context.report({ + node, + loc: token.loc.start, + messageId: "missingSpaceBefore", + data: { + tokenValue: token.value + }, + fix(fixer) { + return fixer.insertTextBefore(token, " "); + } + }); + } + + /** + * Returns a function that checks the spacing of a node on the property name + * that was passed in. + * @param {string} propertyName The property on the node to check for spacing + * @returns {Function} A function that will check spacing on a node + */ + function checkSpacing(propertyName) { + return function(node) { + if (!node.computed) { + return; + } + + const property = node[propertyName]; + + const before = sourceCode.getTokenBefore(property), + first = sourceCode.getFirstToken(property), + last = sourceCode.getLastToken(property), + after = sourceCode.getTokenAfter(property); + + if (astUtils.isTokenOnSameLine(before, first)) { + if (propertyNameMustBeSpaced) { + if (!sourceCode.isSpaceBetweenTokens(before, first) && astUtils.isTokenOnSameLine(before, first)) { + reportRequiredBeginningSpace(node, before); + } + } else { + if (sourceCode.isSpaceBetweenTokens(before, first)) { + reportNoBeginningSpace(node, before, first); + } + } + } + + if (astUtils.isTokenOnSameLine(last, after)) { + if (propertyNameMustBeSpaced) { + if (!sourceCode.isSpaceBetweenTokens(last, after) && astUtils.isTokenOnSameLine(last, after)) { + reportRequiredEndingSpace(node, after); + } + } else { + if (sourceCode.isSpaceBetweenTokens(last, after)) { + reportNoEndingSpace(node, after, last); + } + } + } + }; + } + + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + Property: checkSpacing("key"), + MemberExpression: checkSpacing("property") + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/consistent-return.js b/node_modules/eslint/lib/rules/consistent-return.js new file mode 100644 index 0000000..c86b171 --- /dev/null +++ b/node_modules/eslint/lib/rules/consistent-return.js @@ -0,0 +1,194 @@ +/** + * @fileoverview Rule to flag consistent return values + * @author Nicholas C. Zakas + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const lodash = require("lodash"); + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks whether or not a given node is an `Identifier` node which was named a given name. + * @param {ASTNode} node - A node to check. + * @param {string} name - An expected name of the node. + * @returns {boolean} `true` if the node is an `Identifier` node which was named as expected. + */ +function isIdentifier(node, name) { + return node.type === "Identifier" && node.name === name; +} + +/** + * Checks whether or not a given code path segment is unreachable. + * @param {CodePathSegment} segment - A CodePathSegment to check. + * @returns {boolean} `true` if the segment is unreachable. + */ +function isUnreachable(segment) { + return !segment.reachable; +} + +/** + * Checks whether a given node is a `constructor` method in an ES6 class + * @param {ASTNode} node A node to check + * @returns {boolean} `true` if the node is a `constructor` method + */ +function isClassConstructor(node) { + return node.type === "FunctionExpression" && + node.parent && + node.parent.type === "MethodDefinition" && + node.parent.kind === "constructor"; +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require `return` statements to either always or never specify values", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/consistent-return" + }, + + schema: [{ + type: "object", + properties: { + treatUndefinedAsUnspecified: { + type: "boolean" + } + }, + additionalProperties: false + }], + + messages: { + missingReturn: "Expected to return a value at the end of {{name}}.", + missingReturnValue: "{{name}} expected a return value.", + unexpectedReturnValue: "{{name}} expected no return value." + } + }, + + create(context) { + const options = context.options[0] || {}; + const treatUndefinedAsUnspecified = options.treatUndefinedAsUnspecified === true; + let funcInfo = null; + + /** + * Checks whether of not the implicit returning is consistent if the last + * code path segment is reachable. + * + * @param {ASTNode} node - A program/function node to check. + * @returns {void} + */ + function checkLastSegment(node) { + let loc, name; + + /* + * Skip if it expected no return value or unreachable. + * When unreachable, all paths are returned or thrown. + */ + if (!funcInfo.hasReturnValue || + funcInfo.codePath.currentSegments.every(isUnreachable) || + astUtils.isES5Constructor(node) || + isClassConstructor(node) + ) { + return; + } + + // Adjust a location and a message. + if (node.type === "Program") { + + // The head of program. + loc = { line: 1, column: 0 }; + name = "program"; + } else if (node.type === "ArrowFunctionExpression") { + + // `=>` token + loc = context.getSourceCode().getTokenBefore(node.body, astUtils.isArrowToken).loc.start; + } else if ( + node.parent.type === "MethodDefinition" || + (node.parent.type === "Property" && node.parent.method) + ) { + + // Method name. + loc = node.parent.key.loc.start; + } else { + + // Function name or `function` keyword. + loc = (node.id || node).loc.start; + } + + if (!name) { + name = astUtils.getFunctionNameWithKind(node); + } + + // Reports. + context.report({ + node, + loc, + messageId: "missingReturn", + data: { name } + }); + } + + return { + + // Initializes/Disposes state of each code path. + onCodePathStart(codePath, node) { + funcInfo = { + upper: funcInfo, + codePath, + hasReturn: false, + hasReturnValue: false, + messageId: "", + node + }; + }, + onCodePathEnd() { + funcInfo = funcInfo.upper; + }, + + // Reports a given return statement if it's inconsistent. + ReturnStatement(node) { + const argument = node.argument; + let hasReturnValue = Boolean(argument); + + if (treatUndefinedAsUnspecified && hasReturnValue) { + hasReturnValue = !isIdentifier(argument, "undefined") && argument.operator !== "void"; + } + + if (!funcInfo.hasReturn) { + funcInfo.hasReturn = true; + funcInfo.hasReturnValue = hasReturnValue; + funcInfo.messageId = hasReturnValue ? "missingReturnValue" : "unexpectedReturnValue"; + funcInfo.data = { + name: funcInfo.node.type === "Program" + ? "Program" + : lodash.upperFirst(astUtils.getFunctionNameWithKind(funcInfo.node)) + }; + } else if (funcInfo.hasReturnValue !== hasReturnValue) { + context.report({ + node, + messageId: funcInfo.messageId, + data: funcInfo.data + }); + } + }, + + // Reports a given program/function if the implicit returning is not consistent. + "Program:exit": checkLastSegment, + "FunctionDeclaration:exit": checkLastSegment, + "FunctionExpression:exit": checkLastSegment, + "ArrowFunctionExpression:exit": checkLastSegment + }; + } +}; diff --git a/node_modules/eslint/lib/rules/consistent-this.js b/node_modules/eslint/lib/rules/consistent-this.js new file mode 100644 index 0000000..5cc3a64 --- /dev/null +++ b/node_modules/eslint/lib/rules/consistent-this.js @@ -0,0 +1,149 @@ +/** + * @fileoverview Rule to enforce consistent naming of "this" context variables + * @author Raphael Pigulla + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce consistent naming when capturing the current execution context", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/consistent-this" + }, + + schema: { + type: "array", + items: { + type: "string", + minLength: 1 + }, + uniqueItems: true + }, + + messages: { + aliasNotAssignedToThis: "Designated alias '{{name}}' is not assigned to 'this'.", + unexpectedAlias: "Unexpected alias '{{name}}' for 'this'." + } + }, + + create(context) { + let aliases = []; + + if (context.options.length === 0) { + aliases.push("that"); + } else { + aliases = context.options; + } + + /** + * Reports that a variable declarator or assignment expression is assigning + * a non-'this' value to the specified alias. + * @param {ASTNode} node - The assigning node. + * @param {string} name - the name of the alias that was incorrectly used. + * @returns {void} + */ + function reportBadAssignment(node, name) { + context.report({ node, messageId: "aliasNotAssignedToThis", data: { name } }); + } + + /** + * Checks that an assignment to an identifier only assigns 'this' to the + * appropriate alias, and the alias is only assigned to 'this'. + * @param {ASTNode} node - The assigning node. + * @param {Identifier} name - The name of the variable assigned to. + * @param {Expression} value - The value of the assignment. + * @returns {void} + */ + function checkAssignment(node, name, value) { + const isThis = value.type === "ThisExpression"; + + if (aliases.indexOf(name) !== -1) { + if (!isThis || node.operator && node.operator !== "=") { + reportBadAssignment(node, name); + } + } else if (isThis) { + context.report({ node, messageId: "unexpectedAlias", data: { name } }); + } + } + + /** + * Ensures that a variable declaration of the alias in a program or function + * is assigned to the correct value. + * @param {string} alias alias the check the assignment of. + * @param {Object} scope scope of the current code we are checking. + * @private + * @returns {void} + */ + function checkWasAssigned(alias, scope) { + const variable = scope.set.get(alias); + + if (!variable) { + return; + } + + if (variable.defs.some(def => def.node.type === "VariableDeclarator" && + def.node.init !== null)) { + return; + } + + /* + * The alias has been declared and not assigned: check it was + * assigned later in the same scope. + */ + if (!variable.references.some(reference => { + const write = reference.writeExpr; + + return ( + reference.from === scope && + write && write.type === "ThisExpression" && + write.parent.operator === "=" + ); + })) { + variable.defs.map(def => def.node).forEach(node => { + reportBadAssignment(node, alias); + }); + } + } + + /** + * Check each alias to ensure that is was assinged to the correct value. + * @returns {void} + */ + function ensureWasAssigned() { + const scope = context.getScope(); + + aliases.forEach(alias => { + checkWasAssigned(alias, scope); + }); + } + + return { + "Program:exit": ensureWasAssigned, + "FunctionExpression:exit": ensureWasAssigned, + "FunctionDeclaration:exit": ensureWasAssigned, + + VariableDeclarator(node) { + const id = node.id; + const isDestructuring = + id.type === "ArrayPattern" || id.type === "ObjectPattern"; + + if (node.init !== null && !isDestructuring) { + checkAssignment(node, id.name, node.init); + } + }, + + AssignmentExpression(node) { + if (node.left.type === "Identifier") { + checkAssignment(node, node.left.name, node.right); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/constructor-super.js b/node_modules/eslint/lib/rules/constructor-super.js new file mode 100644 index 0000000..3cbc2f5 --- /dev/null +++ b/node_modules/eslint/lib/rules/constructor-super.js @@ -0,0 +1,395 @@ +/** + * @fileoverview A rule to verify `super()` callings in constructor. + * @author Toru Nagashima + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks whether a given code path segment is reachable or not. + * + * @param {CodePathSegment} segment - A code path segment to check. + * @returns {boolean} `true` if the segment is reachable. + */ +function isReachable(segment) { + return segment.reachable; +} + +/** + * Checks whether or not a given node is a constructor. + * @param {ASTNode} node - A node to check. This node type is one of + * `Program`, `FunctionDeclaration`, `FunctionExpression`, and + * `ArrowFunctionExpression`. + * @returns {boolean} `true` if the node is a constructor. + */ +function isConstructorFunction(node) { + return ( + node.type === "FunctionExpression" && + node.parent.type === "MethodDefinition" && + node.parent.kind === "constructor" + ); +} + +/** + * Checks whether a given node can be a constructor or not. + * + * @param {ASTNode} node - A node to check. + * @returns {boolean} `true` if the node can be a constructor. + */ +function isPossibleConstructor(node) { + if (!node) { + return false; + } + + switch (node.type) { + case "ClassExpression": + case "FunctionExpression": + case "ThisExpression": + case "MemberExpression": + case "CallExpression": + case "NewExpression": + case "YieldExpression": + case "TaggedTemplateExpression": + case "MetaProperty": + return true; + + case "Identifier": + return node.name !== "undefined"; + + case "AssignmentExpression": + return isPossibleConstructor(node.right); + + case "LogicalExpression": + return ( + isPossibleConstructor(node.left) || + isPossibleConstructor(node.right) + ); + + case "ConditionalExpression": + return ( + isPossibleConstructor(node.alternate) || + isPossibleConstructor(node.consequent) + ); + + case "SequenceExpression": { + const lastExpression = node.expressions[node.expressions.length - 1]; + + return isPossibleConstructor(lastExpression); + } + + default: + return false; + } +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require `super()` calls in constructors", + category: "ECMAScript 6", + recommended: true, + url: "https://eslint.org/docs/rules/constructor-super" + }, + + schema: [], + + messages: { + missingSome: "Lacked a call of 'super()' in some code paths.", + missingAll: "Expected to call 'super()'.", + + duplicate: "Unexpected duplicate 'super()'.", + badSuper: "Unexpected 'super()' because 'super' is not a constructor.", + unexpected: "Unexpected 'super()'." + } + }, + + create(context) { + + /* + * {{hasExtends: boolean, scope: Scope, codePath: CodePath}[]} + * Information for each constructor. + * - upper: Information of the upper constructor. + * - hasExtends: A flag which shows whether own class has a valid `extends` + * part. + * - scope: The scope of own class. + * - codePath: The code path object of the constructor. + */ + let funcInfo = null; + + /* + * {Map} + * Information for each code path segment. + * - calledInSomePaths: A flag of be called `super()` in some code paths. + * - calledInEveryPaths: A flag of be called `super()` in all code paths. + * - validNodes: + */ + let segInfoMap = Object.create(null); + + /** + * Gets the flag which shows `super()` is called in some paths. + * @param {CodePathSegment} segment - A code path segment to get. + * @returns {boolean} The flag which shows `super()` is called in some paths + */ + function isCalledInSomePath(segment) { + return segment.reachable && segInfoMap[segment.id].calledInSomePaths; + } + + /** + * Gets the flag which shows `super()` is called in all paths. + * @param {CodePathSegment} segment - A code path segment to get. + * @returns {boolean} The flag which shows `super()` is called in all paths. + */ + function isCalledInEveryPath(segment) { + + /* + * If specific segment is the looped segment of the current segment, + * skip the segment. + * If not skipped, this never becomes true after a loop. + */ + if (segment.nextSegments.length === 1 && + segment.nextSegments[0].isLoopedPrevSegment(segment) + ) { + return true; + } + return segment.reachable && segInfoMap[segment.id].calledInEveryPaths; + } + + return { + + /** + * Stacks a constructor information. + * @param {CodePath} codePath - A code path which was started. + * @param {ASTNode} node - The current node. + * @returns {void} + */ + onCodePathStart(codePath, node) { + if (isConstructorFunction(node)) { + + // Class > ClassBody > MethodDefinition > FunctionExpression + const classNode = node.parent.parent.parent; + const superClass = classNode.superClass; + + funcInfo = { + upper: funcInfo, + isConstructor: true, + hasExtends: Boolean(superClass), + superIsConstructor: isPossibleConstructor(superClass), + codePath + }; + } else { + funcInfo = { + upper: funcInfo, + isConstructor: false, + hasExtends: false, + superIsConstructor: false, + codePath + }; + } + }, + + /** + * Pops a constructor information. + * And reports if `super()` lacked. + * @param {CodePath} codePath - A code path which was ended. + * @param {ASTNode} node - The current node. + * @returns {void} + */ + onCodePathEnd(codePath, node) { + const hasExtends = funcInfo.hasExtends; + + // Pop. + funcInfo = funcInfo.upper; + + if (!hasExtends) { + return; + } + + // Reports if `super()` lacked. + const segments = codePath.returnedSegments; + const calledInEveryPaths = segments.every(isCalledInEveryPath); + const calledInSomePaths = segments.some(isCalledInSomePath); + + if (!calledInEveryPaths) { + context.report({ + messageId: calledInSomePaths + ? "missingSome" + : "missingAll", + node: node.parent + }); + } + }, + + /** + * Initialize information of a given code path segment. + * @param {CodePathSegment} segment - A code path segment to initialize. + * @returns {void} + */ + onCodePathSegmentStart(segment) { + if (!(funcInfo && funcInfo.isConstructor && funcInfo.hasExtends)) { + return; + } + + // Initialize info. + const info = segInfoMap[segment.id] = { + calledInSomePaths: false, + calledInEveryPaths: false, + validNodes: [] + }; + + // When there are previous segments, aggregates these. + const prevSegments = segment.prevSegments; + + if (prevSegments.length > 0) { + info.calledInSomePaths = prevSegments.some(isCalledInSomePath); + info.calledInEveryPaths = prevSegments.every(isCalledInEveryPath); + } + }, + + /** + * Update information of the code path segment when a code path was + * looped. + * @param {CodePathSegment} fromSegment - The code path segment of the + * end of a loop. + * @param {CodePathSegment} toSegment - A code path segment of the head + * of a loop. + * @returns {void} + */ + onCodePathSegmentLoop(fromSegment, toSegment) { + if (!(funcInfo && funcInfo.isConstructor && funcInfo.hasExtends)) { + return; + } + + // Update information inside of the loop. + const isRealLoop = toSegment.prevSegments.length >= 2; + + funcInfo.codePath.traverseSegments( + { first: toSegment, last: fromSegment }, + segment => { + const info = segInfoMap[segment.id]; + const prevSegments = segment.prevSegments; + + // Updates flags. + info.calledInSomePaths = prevSegments.some(isCalledInSomePath); + info.calledInEveryPaths = prevSegments.every(isCalledInEveryPath); + + // If flags become true anew, reports the valid nodes. + if (info.calledInSomePaths || isRealLoop) { + const nodes = info.validNodes; + + info.validNodes = []; + + for (let i = 0; i < nodes.length; ++i) { + const node = nodes[i]; + + context.report({ + messageId: "duplicate", + node + }); + } + } + } + ); + }, + + /** + * Checks for a call of `super()`. + * @param {ASTNode} node - A CallExpression node to check. + * @returns {void} + */ + "CallExpression:exit"(node) { + if (!(funcInfo && funcInfo.isConstructor)) { + return; + } + + // Skips except `super()`. + if (node.callee.type !== "Super") { + return; + } + + // Reports if needed. + if (funcInfo.hasExtends) { + const segments = funcInfo.codePath.currentSegments; + let duplicate = false; + let info = null; + + for (let i = 0; i < segments.length; ++i) { + const segment = segments[i]; + + if (segment.reachable) { + info = segInfoMap[segment.id]; + + duplicate = duplicate || info.calledInSomePaths; + info.calledInSomePaths = info.calledInEveryPaths = true; + } + } + + if (info) { + if (duplicate) { + context.report({ + messageId: "duplicate", + node + }); + } else if (!funcInfo.superIsConstructor) { + context.report({ + messageId: "badSuper", + node + }); + } else { + info.validNodes.push(node); + } + } + } else if (funcInfo.codePath.currentSegments.some(isReachable)) { + context.report({ + messageId: "unexpected", + node + }); + } + }, + + /** + * Set the mark to the returned path as `super()` was called. + * @param {ASTNode} node - A ReturnStatement node to check. + * @returns {void} + */ + ReturnStatement(node) { + if (!(funcInfo && funcInfo.isConstructor && funcInfo.hasExtends)) { + return; + } + + // Skips if no argument. + if (!node.argument) { + return; + } + + // Returning argument is a substitute of 'super()'. + const segments = funcInfo.codePath.currentSegments; + + for (let i = 0; i < segments.length; ++i) { + const segment = segments[i]; + + if (segment.reachable) { + const info = segInfoMap[segment.id]; + + info.calledInSomePaths = info.calledInEveryPaths = true; + } + } + }, + + /** + * Resets state. + * @returns {void} + */ + "Program:exit"() { + segInfoMap = Object.create(null); + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/curly.js b/node_modules/eslint/lib/rules/curly.js new file mode 100644 index 0000000..f1e4f49 --- /dev/null +++ b/node_modules/eslint/lib/rules/curly.js @@ -0,0 +1,379 @@ +/** + * @fileoverview Rule to flag statements without curly braces + * @author Nicholas C. Zakas + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce consistent brace style for all control statements", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/curly" + }, + + schema: { + anyOf: [ + { + type: "array", + items: [ + { + enum: ["all"] + } + ], + minItems: 0, + maxItems: 1 + }, + { + type: "array", + items: [ + { + enum: ["multi", "multi-line", "multi-or-nest"] + }, + { + enum: ["consistent"] + } + ], + minItems: 0, + maxItems: 2 + } + ] + }, + + fixable: "code", + + messages: { + missingCurlyAfter: "Expected { after '{{name}}'.", + missingCurlyAfterCondition: "Expected { after '{{name}}' condition.", + unexpectedCurlyAfter: "Unnecessary { after '{{name}}'.", + unexpectedCurlyAfterCondition: "Unnecessary { after '{{name}}' condition." + } + }, + + create(context) { + + const multiOnly = (context.options[0] === "multi"); + const multiLine = (context.options[0] === "multi-line"); + const multiOrNest = (context.options[0] === "multi-or-nest"); + const consistent = (context.options[1] === "consistent"); + + const sourceCode = context.getSourceCode(); + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Determines if a given node is a one-liner that's on the same line as it's preceding code. + * @param {ASTNode} node The node to check. + * @returns {boolean} True if the node is a one-liner that's on the same line as it's preceding code. + * @private + */ + function isCollapsedOneLiner(node) { + const before = sourceCode.getTokenBefore(node); + const last = sourceCode.getLastToken(node); + const lastExcludingSemicolon = astUtils.isSemicolonToken(last) ? sourceCode.getTokenBefore(last) : last; + + return before.loc.start.line === lastExcludingSemicolon.loc.end.line; + } + + /** + * Determines if a given node is a one-liner. + * @param {ASTNode} node The node to check. + * @returns {boolean} True if the node is a one-liner. + * @private + */ + function isOneLiner(node) { + const first = sourceCode.getFirstToken(node), + last = sourceCode.getLastToken(node); + + return first.loc.start.line === last.loc.end.line; + } + + /** + * Checks if the given token is an `else` token or not. + * + * @param {Token} token - The token to check. + * @returns {boolean} `true` if the token is an `else` token. + */ + function isElseKeywordToken(token) { + return token.value === "else" && token.type === "Keyword"; + } + + /** + * Gets the `else` keyword token of a given `IfStatement` node. + * @param {ASTNode} node - A `IfStatement` node to get. + * @returns {Token} The `else` keyword token. + */ + function getElseKeyword(node) { + return node.alternate && sourceCode.getFirstTokenBetween(node.consequent, node.alternate, isElseKeywordToken); + } + + /** + * Checks a given IfStatement node requires braces of the consequent chunk. + * This returns `true` when below: + * + * 1. The given node has the `alternate` node. + * 2. There is a `IfStatement` which doesn't have `alternate` node in the + * trailing statement chain of the `consequent` node. + * + * @param {ASTNode} node - A IfStatement node to check. + * @returns {boolean} `true` if the node requires braces of the consequent chunk. + */ + function requiresBraceOfConsequent(node) { + if (node.alternate && node.consequent.type === "BlockStatement") { + if (node.consequent.body.length >= 2) { + return true; + } + + node = node.consequent.body[0]; + while (node) { + if (node.type === "IfStatement" && !node.alternate) { + return true; + } + node = astUtils.getTrailingStatement(node); + } + } + + return false; + } + + /** + * Determines if a semicolon needs to be inserted after removing a set of curly brackets, in order to avoid a SyntaxError. + * @param {Token} closingBracket The } token + * @returns {boolean} `true` if a semicolon needs to be inserted after the last statement in the block. + */ + function needsSemicolon(closingBracket) { + const tokenBefore = sourceCode.getTokenBefore(closingBracket); + const tokenAfter = sourceCode.getTokenAfter(closingBracket); + const lastBlockNode = sourceCode.getNodeByRangeIndex(tokenBefore.range[0]); + + if (astUtils.isSemicolonToken(tokenBefore)) { + + // If the last statement already has a semicolon, don't add another one. + return false; + } + + if (!tokenAfter) { + + // If there are no statements after this block, there is no need to add a semicolon. + return false; + } + + if (lastBlockNode.type === "BlockStatement" && lastBlockNode.parent.type !== "FunctionExpression" && lastBlockNode.parent.type !== "ArrowFunctionExpression") { + + /* + * If the last node surrounded by curly brackets is a BlockStatement (other than a FunctionExpression or an ArrowFunctionExpression), + * don't insert a semicolon. Otherwise, the semicolon would be parsed as a separate statement, which would cause + * a SyntaxError if it was followed by `else`. + */ + return false; + } + + if (tokenBefore.loc.end.line === tokenAfter.loc.start.line) { + + // If the next token is on the same line, insert a semicolon. + return true; + } + + if (/^[([/`+-]/.test(tokenAfter.value)) { + + // If the next token starts with a character that would disrupt ASI, insert a semicolon. + return true; + } + + if (tokenBefore.type === "Punctuator" && (tokenBefore.value === "++" || tokenBefore.value === "--")) { + + // If the last token is ++ or --, insert a semicolon to avoid disrupting ASI. + return true; + } + + // Otherwise, do not insert a semicolon. + return false; + } + + /** + * Prepares to check the body of a node to see if it's a block statement. + * @param {ASTNode} node The node to report if there's a problem. + * @param {ASTNode} body The body node to check for blocks. + * @param {string} name The name to report if there's a problem. + * @param {{ condition: boolean }} opts Options to pass to the report functions + * @returns {Object} a prepared check object, with "actual", "expected", "check" properties. + * "actual" will be `true` or `false` whether the body is already a block statement. + * "expected" will be `true` or `false` if the body should be a block statement or not, or + * `null` if it doesn't matter, depending on the rule options. It can be modified to change + * the final behavior of "check". + * "check" will be a function reporting appropriate problems depending on the other + * properties. + */ + function prepareCheck(node, body, name, opts) { + const hasBlock = (body.type === "BlockStatement"); + let expected = null; + + if (node.type === "IfStatement" && node.consequent === body && requiresBraceOfConsequent(node)) { + expected = true; + } else if (multiOnly) { + if (hasBlock && body.body.length === 1) { + expected = false; + } + } else if (multiLine) { + if (!isCollapsedOneLiner(body)) { + expected = true; + } + } else if (multiOrNest) { + if (hasBlock && body.body.length === 1 && isOneLiner(body.body[0])) { + const leadingComments = sourceCode.getCommentsBefore(body.body[0]); + + expected = leadingComments.length > 0; + } else if (!isOneLiner(body)) { + expected = true; + } + } else { + expected = true; + } + + return { + actual: hasBlock, + expected, + check() { + if (this.expected !== null && this.expected !== this.actual) { + if (this.expected) { + context.report({ + node, + loc: (name !== "else" ? node : getElseKeyword(node)).loc.start, + messageId: opts && opts.condition ? "missingCurlyAfterCondition" : "missingCurlyAfter", + data: { + name + }, + fix: fixer => fixer.replaceText(body, `{${sourceCode.getText(body)}}`) + }); + } else { + context.report({ + node, + loc: (name !== "else" ? node : getElseKeyword(node)).loc.start, + messageId: opts && opts.condition ? "unexpectedCurlyAfterCondition" : "unexpectedCurlyAfter", + data: { + name + }, + fix(fixer) { + + /* + * `do while` expressions sometimes need a space to be inserted after `do`. + * e.g. `do{foo()} while (bar)` should be corrected to `do foo() while (bar)` + */ + const needsPrecedingSpace = node.type === "DoWhileStatement" && + sourceCode.getTokenBefore(body).range[1] === body.range[0] && + !astUtils.canTokensBeAdjacent("do", sourceCode.getFirstToken(body, { skip: 1 })); + + const openingBracket = sourceCode.getFirstToken(body); + const closingBracket = sourceCode.getLastToken(body); + const lastTokenInBlock = sourceCode.getTokenBefore(closingBracket); + + if (needsSemicolon(closingBracket)) { + + /* + * If removing braces would cause a SyntaxError due to multiple statements on the same line (or + * change the semantics of the code due to ASI), don't perform a fix. + */ + return null; + } + + const resultingBodyText = sourceCode.getText().slice(openingBracket.range[1], lastTokenInBlock.range[0]) + + sourceCode.getText(lastTokenInBlock) + + sourceCode.getText().slice(lastTokenInBlock.range[1], closingBracket.range[0]); + + return fixer.replaceText(body, (needsPrecedingSpace ? " " : "") + resultingBodyText); + } + }); + } + } + } + }; + } + + /** + * Prepares to check the bodies of a "if", "else if" and "else" chain. + * @param {ASTNode} node The first IfStatement node of the chain. + * @returns {Object[]} prepared checks for each body of the chain. See `prepareCheck` for more + * information. + */ + function prepareIfChecks(node) { + const preparedChecks = []; + + do { + preparedChecks.push(prepareCheck(node, node.consequent, "if", { condition: true })); + if (node.alternate && node.alternate.type !== "IfStatement") { + preparedChecks.push(prepareCheck(node, node.alternate, "else")); + break; + } + node = node.alternate; + } while (node); + + if (consistent) { + + /* + * If any node should have or already have braces, make sure they + * all have braces. + * If all nodes shouldn't have braces, make sure they don't. + */ + const expected = preparedChecks.some(preparedCheck => { + if (preparedCheck.expected !== null) { + return preparedCheck.expected; + } + return preparedCheck.actual; + }); + + preparedChecks.forEach(preparedCheck => { + preparedCheck.expected = expected; + }); + } + + return preparedChecks; + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + IfStatement(node) { + if (node.parent.type !== "IfStatement") { + prepareIfChecks(node).forEach(preparedCheck => { + preparedCheck.check(); + }); + } + }, + + WhileStatement(node) { + prepareCheck(node, node.body, "while", { condition: true }).check(); + }, + + DoWhileStatement(node) { + prepareCheck(node, node.body, "do").check(); + }, + + ForStatement(node) { + prepareCheck(node, node.body, "for", { condition: true }).check(); + }, + + ForInStatement(node) { + prepareCheck(node, node.body, "for-in").check(); + }, + + ForOfStatement(node) { + prepareCheck(node, node.body, "for-of").check(); + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/default-case.js b/node_modules/eslint/lib/rules/default-case.js new file mode 100644 index 0000000..cf12319 --- /dev/null +++ b/node_modules/eslint/lib/rules/default-case.js @@ -0,0 +1,95 @@ +/** + * @fileoverview require default case in switch statements + * @author Aliaksei Shytkin + */ +"use strict"; + +const DEFAULT_COMMENT_PATTERN = /^no default$/i; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require `default` cases in `switch` statements", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/default-case" + }, + + schema: [{ + type: "object", + properties: { + commentPattern: { + type: "string" + } + }, + additionalProperties: false + }], + + messages: { + missingDefaultCase: "Expected a default case." + } + }, + + create(context) { + const options = context.options[0] || {}; + const commentPattern = options.commentPattern + ? new RegExp(options.commentPattern) + : DEFAULT_COMMENT_PATTERN; + + const sourceCode = context.getSourceCode(); + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Shortcut to get last element of array + * @param {*[]} collection Array + * @returns {*} Last element + */ + function last(collection) { + return collection[collection.length - 1]; + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + + SwitchStatement(node) { + + if (!node.cases.length) { + + /* + * skip check of empty switch because there is no easy way + * to extract comments inside it now + */ + return; + } + + const hasDefault = node.cases.some(v => v.test === null); + + if (!hasDefault) { + + let comment; + + const lastCase = last(node.cases); + const comments = sourceCode.getCommentsAfter(lastCase); + + if (comments.length) { + comment = last(comments); + } + + if (!comment || !commentPattern.test(comment.value.trim())) { + context.report({ node, messageId: "missingDefaultCase" }); + } + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/dot-location.js b/node_modules/eslint/lib/rules/dot-location.js new file mode 100644 index 0000000..7ff8ca6 --- /dev/null +++ b/node_modules/eslint/lib/rules/dot-location.js @@ -0,0 +1,94 @@ +/** + * @fileoverview Validates newlines before and after dots + * @author Greg Cochard + */ + +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce consistent newlines before and after dots", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/dot-location" + }, + + schema: [ + { + enum: ["object", "property"] + } + ], + + fixable: "code", + + messages: { + expectedDotAfterObject: "Expected dot to be on same line as object.", + expectedDotBeforeProperty: "Expected dot to be on same line as property." + } + }, + + create(context) { + + const config = context.options[0]; + + // default to onObject if no preference is passed + const onObject = config === "object" || !config; + + const sourceCode = context.getSourceCode(); + + /** + * Reports if the dot between object and property is on the correct loccation. + * @param {ASTNode} obj The object owning the property. + * @param {ASTNode} prop The property of the object. + * @param {ASTNode} node The corresponding node of the token. + * @returns {void} + */ + function checkDotLocation(obj, prop, node) { + const dot = sourceCode.getTokenBefore(prop); + const textBeforeDot = sourceCode.getText().slice(obj.range[1], dot.range[0]); + const textAfterDot = sourceCode.getText().slice(dot.range[1], prop.range[0]); + + if (dot.type === "Punctuator" && dot.value === ".") { + if (onObject) { + if (!astUtils.isTokenOnSameLine(obj, dot)) { + const neededTextAfterObj = astUtils.isDecimalInteger(obj) ? " " : ""; + + context.report({ + node, + loc: dot.loc.start, + messageId: "expectedDotAfterObject", + fix: fixer => fixer.replaceTextRange([obj.range[1], prop.range[0]], `${neededTextAfterObj}.${textBeforeDot}${textAfterDot}`) + }); + } + } else if (!astUtils.isTokenOnSameLine(dot, prop)) { + context.report({ + node, + loc: dot.loc.start, + messageId: "expectedDotBeforeProperty", + fix: fixer => fixer.replaceTextRange([obj.range[1], prop.range[0]], `${textBeforeDot}${textAfterDot}.`) + }); + } + } + } + + /** + * Checks the spacing of the dot within a member expression. + * @param {ASTNode} node The node to check. + * @returns {void} + */ + function checkNode(node) { + checkDotLocation(node.object, node.property, node); + } + + return { + MemberExpression: checkNode + }; + } +}; diff --git a/node_modules/eslint/lib/rules/dot-notation.js b/node_modules/eslint/lib/rules/dot-notation.js new file mode 100644 index 0000000..c381661 --- /dev/null +++ b/node_modules/eslint/lib/rules/dot-notation.js @@ -0,0 +1,165 @@ +/** + * @fileoverview Rule to warn about using dot notation instead of square bracket notation when possible. + * @author Josh Perez + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +const validIdentifier = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/; +const keywords = require("../util/keywords"); + +module.exports = { + meta: { + docs: { + description: "enforce dot notation whenever possible", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/dot-notation" + }, + + schema: [ + { + type: "object", + properties: { + allowKeywords: { + type: "boolean" + }, + allowPattern: { + type: "string" + } + }, + additionalProperties: false + } + ], + + fixable: "code", + + messages: { + useDot: "[{{key}}] is better written in dot notation.", + useBrackets: ".{{key}} is a syntax error." + } + }, + + create(context) { + const options = context.options[0] || {}; + const allowKeywords = options.allowKeywords === void 0 || !!options.allowKeywords; + const sourceCode = context.getSourceCode(); + + let allowPattern; + + if (options.allowPattern) { + allowPattern = new RegExp(options.allowPattern); + } + + /** + * Check if the property is valid dot notation + * @param {ASTNode} node The dot notation node + * @param {string} value Value which is to be checked + * @returns {void} + */ + function checkComputedProperty(node, value) { + if ( + validIdentifier.test(value) && + (allowKeywords || keywords.indexOf(String(value)) === -1) && + !(allowPattern && allowPattern.test(value)) + ) { + const formattedValue = node.property.type === "Literal" ? JSON.stringify(value) : `\`${value}\``; + + context.report({ + node: node.property, + messageId: "useDot", + data: { + key: formattedValue + }, + fix(fixer) { + const leftBracket = sourceCode.getTokenAfter(node.object, astUtils.isOpeningBracketToken); + const rightBracket = sourceCode.getLastToken(node); + + if (sourceCode.getFirstTokenBetween(leftBracket, rightBracket, { includeComments: true, filter: astUtils.isCommentToken })) { + + // Don't perform any fixes if there are comments inside the brackets. + return null; + } + + const tokenAfterProperty = sourceCode.getTokenAfter(rightBracket); + const needsSpaceAfterProperty = tokenAfterProperty && + rightBracket.range[1] === tokenAfterProperty.range[0] && + !astUtils.canTokensBeAdjacent(String(value), tokenAfterProperty); + + const textBeforeDot = astUtils.isDecimalInteger(node.object) ? " " : ""; + const textAfterProperty = needsSpaceAfterProperty ? " " : ""; + + return fixer.replaceTextRange( + [leftBracket.range[0], rightBracket.range[1]], + `${textBeforeDot}.${value}${textAfterProperty}` + ); + } + }); + } + } + + return { + MemberExpression(node) { + if ( + node.computed && + node.property.type === "Literal" + ) { + checkComputedProperty(node, node.property.value); + } + if ( + node.computed && + node.property.type === "TemplateLiteral" && + node.property.expressions.length === 0 + ) { + checkComputedProperty(node, node.property.quasis[0].value.cooked); + } + if ( + !allowKeywords && + !node.computed && + keywords.indexOf(String(node.property.name)) !== -1 + ) { + context.report({ + node: node.property, + messageId: "useBrackets", + data: { + key: node.property.name + }, + fix(fixer) { + const dot = sourceCode.getTokenBefore(node.property); + const textAfterDot = sourceCode.text.slice(dot.range[1], node.property.range[0]); + + if (textAfterDot.trim()) { + + // Don't perform any fixes if there are comments between the dot and the property name. + return null; + } + + if (node.object.type === "Identifier" && node.object.name === "let") { + + /* + * A statement that starts with `let[` is parsed as a destructuring variable declaration, not + * a MemberExpression. + */ + return null; + } + + return fixer.replaceTextRange( + [dot.range[0], node.property.range[1]], + `[${textAfterDot}"${node.property.name}"]` + ); + } + }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/eol-last.js b/node_modules/eslint/lib/rules/eol-last.js new file mode 100644 index 0000000..3ecf422 --- /dev/null +++ b/node_modules/eslint/lib/rules/eol-last.js @@ -0,0 +1,107 @@ +/** + * @fileoverview Require or disallow newline at the end of files + * @author Nodeca Team + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const lodash = require("lodash"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require or disallow newline at the end of files", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/eol-last" + }, + fixable: "whitespace", + schema: [ + { + enum: ["always", "never", "unix", "windows"] + } + ], + messages: { + missing: "Newline required at end of file but not found.", + unexpected: "Newline not allowed at end of file." + } + }, + create(context) { + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + Program: function checkBadEOF(node) { + const sourceCode = context.getSourceCode(), + src = sourceCode.getText(), + location = { + column: lodash.last(sourceCode.lines).length, + line: sourceCode.lines.length + }, + LF = "\n", + CRLF = `\r${LF}`, + endsWithNewline = lodash.endsWith(src, LF); + + /* + * Empty source is always valid: No content in file so we don't + * need to lint for a newline on the last line of content. + */ + if (!src.length) { + return; + } + + let mode = context.options[0] || "always", + appendCRLF = false; + + if (mode === "unix") { + + // `"unix"` should behave exactly as `"always"` + mode = "always"; + } + if (mode === "windows") { + + // `"windows"` should behave exactly as `"always"`, but append CRLF in the fixer for backwards compatibility + mode = "always"; + appendCRLF = true; + } + if (mode === "always" && !endsWithNewline) { + + // File is not newline-terminated, but should be + context.report({ + node, + loc: location, + messageId: "missing", + fix(fixer) { + return fixer.insertTextAfterRange([0, src.length], appendCRLF ? CRLF : LF); + } + }); + } else if (mode === "never" && endsWithNewline) { + + // File is newline-terminated, but shouldn't be + context.report({ + node, + loc: location, + messageId: "unexpected", + fix(fixer) { + const finalEOLs = /(?:\r?\n)+$/, + match = finalEOLs.exec(sourceCode.text), + start = match.index, + end = sourceCode.text.length; + + return fixer.replaceTextRange([start, end], ""); + } + }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/eqeqeq.js b/node_modules/eslint/lib/rules/eqeqeq.js new file mode 100644 index 0000000..ec9d0a7 --- /dev/null +++ b/node_modules/eslint/lib/rules/eqeqeq.js @@ -0,0 +1,185 @@ +/** + * @fileoverview Rule to flag statements that use != and == instead of !== and === + * @author Nicholas C. Zakas + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require the use of `===` and `!==`", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/eqeqeq" + }, + + schema: { + anyOf: [ + { + type: "array", + items: [ + { + enum: ["always"] + }, + { + type: "object", + properties: { + null: { + enum: ["always", "never", "ignore"] + } + }, + additionalProperties: false + } + ], + additionalItems: false + }, + { + type: "array", + items: [ + { + enum: ["smart", "allow-null"] + } + ], + additionalItems: false + } + ] + }, + + fixable: "code", + + messages: { + unexpected: "Expected '{{expectedOperator}}' and instead saw '{{actualOperator}}'." + } + }, + + create(context) { + const config = context.options[0] || "always"; + const options = context.options[1] || {}; + const sourceCode = context.getSourceCode(); + + const nullOption = (config === "always") + ? options.null || "always" + : "ignore"; + const enforceRuleForNull = (nullOption === "always"); + const enforceInverseRuleForNull = (nullOption === "never"); + + /** + * Checks if an expression is a typeof expression + * @param {ASTNode} node The node to check + * @returns {boolean} if the node is a typeof expression + */ + function isTypeOf(node) { + return node.type === "UnaryExpression" && node.operator === "typeof"; + } + + /** + * Checks if either operand of a binary expression is a typeof operation + * @param {ASTNode} node The node to check + * @returns {boolean} if one of the operands is typeof + * @private + */ + function isTypeOfBinary(node) { + return isTypeOf(node.left) || isTypeOf(node.right); + } + + /** + * Checks if operands are literals of the same type (via typeof) + * @param {ASTNode} node The node to check + * @returns {boolean} if operands are of same type + * @private + */ + function areLiteralsAndSameType(node) { + return node.left.type === "Literal" && node.right.type === "Literal" && + typeof node.left.value === typeof node.right.value; + } + + /** + * Checks if one of the operands is a literal null + * @param {ASTNode} node The node to check + * @returns {boolean} if operands are null + * @private + */ + function isNullCheck(node) { + return astUtils.isNullLiteral(node.right) || astUtils.isNullLiteral(node.left); + } + + /** + * Gets the location (line and column) of the binary expression's operator + * @param {ASTNode} node The binary expression node to check + * @param {string} operator The operator to find + * @returns {Object} { line, column } location of operator + * @private + */ + function getOperatorLocation(node) { + const opToken = sourceCode.getTokenAfter(node.left); + + return { line: opToken.loc.start.line, column: opToken.loc.start.column }; + } + + /** + * Reports a message for this rule. + * @param {ASTNode} node The binary expression node that was checked + * @param {string} expectedOperator The operator that was expected (either '==', '!=', '===', or '!==') + * @returns {void} + * @private + */ + function report(node, expectedOperator) { + context.report({ + node, + loc: getOperatorLocation(node), + messageId: "unexpected", + data: { expectedOperator, actualOperator: node.operator }, + fix(fixer) { + + // If the comparison is a `typeof` comparison or both sides are literals with the same type, then it's safe to fix. + if (isTypeOfBinary(node) || areLiteralsAndSameType(node)) { + const operatorToken = sourceCode.getFirstTokenBetween( + node.left, + node.right, + token => token.value === node.operator + ); + + return fixer.replaceText(operatorToken, expectedOperator); + } + return null; + } + }); + } + + return { + BinaryExpression(node) { + const isNull = isNullCheck(node); + + if (node.operator !== "==" && node.operator !== "!=") { + if (enforceInverseRuleForNull && isNull) { + report(node, node.operator.slice(0, -1)); + } + return; + } + + if (config === "smart" && (isTypeOfBinary(node) || + areLiteralsAndSameType(node) || isNull)) { + return; + } + + if (!enforceRuleForNull && isNull) { + return; + } + + report(node, `${node.operator}=`); + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/for-direction.js b/node_modules/eslint/lib/rules/for-direction.js new file mode 100644 index 0000000..c91888d --- /dev/null +++ b/node_modules/eslint/lib/rules/for-direction.js @@ -0,0 +1,106 @@ +/** + * @fileoverview enforce "for" loop update clause moving the counter in the right direction.(for-direction) + * @author Aladdin-ADD + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce \"for\" loop update clause moving the counter in the right direction.", + category: "Possible Errors", + recommended: false, + url: "https://eslint.org/docs/rules/for-direction" + }, + fixable: null, + schema: [] + }, + + create(context) { + + /** + * report an error. + * @param {ASTNode} node the node to report. + * @returns {void} + */ + function report(node) { + context.report({ + node, + message: "The update clause in this loop moves the variable in the wrong direction." + }); + } + + /** + * check UpdateExpression add/sub the counter + * @param {ASTNode} update UpdateExpression to check + * @param {string} counter variable name to check + * @returns {int} if add return 1, if sub return -1, if nochange, return 0 + */ + function getUpdateDirection(update, counter) { + if (update.argument.type === "Identifier" && update.argument.name === counter) { + if (update.operator === "++") { + return 1; + } + if (update.operator === "--") { + return -1; + } + } + return 0; + } + + /** + * check AssignmentExpression add/sub the counter + * @param {ASTNode} update AssignmentExpression to check + * @param {string} counter variable name to check + * @returns {int} if add return 1, if sub return -1, if nochange, return 0 + */ + function getAssignmentDirection(update, counter) { + if (update.left.name === counter) { + if (update.operator === "+=") { + return 1; + } + if (update.operator === "-=") { + return -1; + } + } + return 0; + } + return { + ForStatement(node) { + + if (node.test && node.test.type === "BinaryExpression" && node.test.left.type === "Identifier" && node.update) { + const counter = node.test.left.name; + const operator = node.test.operator; + const update = node.update; + + if (operator === "<" || operator === "<=") { + + // report error if update sub the counter (--, -=) + if (update.type === "UpdateExpression" && getUpdateDirection(update, counter) < 0) { + report(node); + } + + if (update.type === "AssignmentExpression" && getAssignmentDirection(update, counter) < 0) { + report(node); + } + } else if (operator === ">" || operator === ">=") { + + // report error if update add the counter (++, +=) + if (update.type === "UpdateExpression" && getUpdateDirection(update, counter) > 0) { + report(node); + } + + if (update.type === "AssignmentExpression" && getAssignmentDirection(update, counter) > 0) { + report(node); + } + } + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/func-call-spacing.js b/node_modules/eslint/lib/rules/func-call-spacing.js new file mode 100644 index 0000000..b13613c --- /dev/null +++ b/node_modules/eslint/lib/rules/func-call-spacing.js @@ -0,0 +1,160 @@ +/** + * @fileoverview Rule to control spacing within function calls + * @author Matt DuVall + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require or disallow spacing between function identifiers and their invocations", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/func-call-spacing" + }, + + fixable: "whitespace", + schema: { + anyOf: [ + { + type: "array", + items: [ + { + enum: ["never"] + } + ], + minItems: 0, + maxItems: 1 + }, + { + type: "array", + items: [ + { + enum: ["always"] + }, + { + type: "object", + properties: { + allowNewlines: { + type: "boolean" + } + }, + additionalProperties: false + } + ], + minItems: 0, + maxItems: 2 + } + ] + } + }, + + create(context) { + + const never = context.options[0] !== "always"; + const allowNewlines = !never && context.options[1] && context.options[1].allowNewlines; + const sourceCode = context.getSourceCode(); + const text = sourceCode.getText(); + + /** + * Check if open space is present in a function name + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ + function checkSpacing(node) { + const lastToken = sourceCode.getLastToken(node); + const lastCalleeToken = sourceCode.getLastToken(node.callee); + const parenToken = sourceCode.getFirstTokenBetween(lastCalleeToken, lastToken, astUtils.isOpeningParenToken); + const prevToken = parenToken && sourceCode.getTokenBefore(parenToken); + + // Parens in NewExpression are optional + if (!(parenToken && parenToken.range[1] < node.range[1])) { + return; + } + + const textBetweenTokens = text.slice(prevToken.range[1], parenToken.range[0]).replace(/\/\*.*?\*\//g, ""); + const hasWhitespace = /\s/.test(textBetweenTokens); + const hasNewline = hasWhitespace && astUtils.LINEBREAK_MATCHER.test(textBetweenTokens); + + /* + * never allowNewlines hasWhitespace hasNewline message + * F F F F Missing space between function name and paren. + * F F F T (Invalid `!hasWhitespace && hasNewline`) + * F F T T Unexpected newline between function name and paren. + * F F T F (OK) + * F T T F (OK) + * F T T T (OK) + * F T F T (Invalid `!hasWhitespace && hasNewline`) + * F T F F Missing space between function name and paren. + * T T F F (Invalid `never && allowNewlines`) + * T T F T (Invalid `!hasWhitespace && hasNewline`) + * T T T T (Invalid `never && allowNewlines`) + * T T T F (Invalid `never && allowNewlines`) + * T F T F Unexpected space between function name and paren. + * T F T T Unexpected space between function name and paren. + * T F F T (Invalid `!hasWhitespace && hasNewline`) + * T F F F (OK) + * + * T T Unexpected space between function name and paren. + * F F Missing space between function name and paren. + * F F T Unexpected newline between function name and paren. + */ + + if (never && hasWhitespace) { + context.report({ + node, + loc: lastCalleeToken.loc.start, + message: "Unexpected space between function name and paren.", + fix(fixer) { + + /* + * Only autofix if there is no newline + * https://github.com/eslint/eslint/issues/7787 + */ + if (!hasNewline) { + return fixer.removeRange([prevToken.range[1], parenToken.range[0]]); + } + + return null; + } + }); + } else if (!never && !hasWhitespace) { + context.report({ + node, + loc: lastCalleeToken.loc.start, + message: "Missing space between function name and paren.", + fix(fixer) { + return fixer.insertTextBefore(parenToken, " "); + } + }); + } else if (!never && !allowNewlines && hasNewline) { + context.report({ + node, + loc: lastCalleeToken.loc.start, + message: "Unexpected newline between function name and paren.", + fix(fixer) { + return fixer.replaceTextRange([prevToken.range[1], parenToken.range[0]], " "); + } + }); + } + } + + return { + CallExpression: checkSpacing, + NewExpression: checkSpacing + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/func-name-matching.js b/node_modules/eslint/lib/rules/func-name-matching.js new file mode 100644 index 0000000..85fd7d4 --- /dev/null +++ b/node_modules/eslint/lib/rules/func-name-matching.js @@ -0,0 +1,194 @@ +/** + * @fileoverview Rule to require function names to match the name of the variable or property to which they are assigned. + * @author Annie Zhang, Pavel Strashkin + */ + +"use strict"; + +//-------------------------------------------------------------------------- +// Requirements +//-------------------------------------------------------------------------- + +const astUtils = require("../ast-utils"); +const esutils = require("esutils"); + +//-------------------------------------------------------------------------- +// Helpers +//-------------------------------------------------------------------------- + +/** + * Determines if a pattern is `module.exports` or `module["exports"]` + * @param {ASTNode} pattern The left side of the AssignmentExpression + * @returns {boolean} True if the pattern is `module.exports` or `module["exports"]` + */ +function isModuleExports(pattern) { + if (pattern.type === "MemberExpression" && pattern.object.type === "Identifier" && pattern.object.name === "module") { + + // module.exports + if (pattern.property.type === "Identifier" && pattern.property.name === "exports") { + return true; + } + + // module["exports"] + if (pattern.property.type === "Literal" && pattern.property.value === "exports") { + return true; + } + } + return false; +} + +/** + * Determines if a string name is a valid identifier + * @param {string} name The string to be checked + * @param {int} ecmaVersion The ECMAScript version if specified in the parserOptions config + * @returns {boolean} True if the string is a valid identifier + */ +function isIdentifier(name, ecmaVersion) { + if (ecmaVersion >= 6) { + return esutils.keyword.isIdentifierES6(name); + } + return esutils.keyword.isIdentifierES5(name); +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +const alwaysOrNever = { enum: ["always", "never"] }; +const optionsObject = { + type: "object", + properties: { + includeCommonJSModuleExports: { + type: "boolean" + } + }, + additionalProperties: false +}; + +module.exports = { + meta: { + docs: { + description: "require function names to match the name of the variable or property to which they are assigned", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/func-name-matching" + }, + + schema: { + anyOf: [{ + type: "array", + additionalItems: false, + items: [alwaysOrNever, optionsObject] + }, { + type: "array", + additionalItems: false, + items: [optionsObject] + }] + } + }, + + create(context) { + const options = (typeof context.options[0] === "object" ? context.options[0] : context.options[1]) || {}; + const nameMatches = typeof context.options[0] === "string" ? context.options[0] : "always"; + const includeModuleExports = options.includeCommonJSModuleExports; + const ecmaVersion = context.parserOptions && context.parserOptions.ecmaVersion ? context.parserOptions.ecmaVersion : 5; + + /** + * Compares identifiers based on the nameMatches option + * @param {string} x the first identifier + * @param {string} y the second identifier + * @returns {boolean} whether the two identifiers should warn. + */ + function shouldWarn(x, y) { + return (nameMatches === "always" && x !== y) || (nameMatches === "never" && x === y); + } + + /** + * Reports + * @param {ASTNode} node The node to report + * @param {string} name The variable or property name + * @param {string} funcName The function name + * @param {boolean} isProp True if the reported node is a property assignment + * @returns {void} + */ + function report(node, name, funcName, isProp) { + let message; + + if (nameMatches === "always" && isProp) { + message = "Function name `{{funcName}}` should match property name `{{name}}`"; + } else if (nameMatches === "always") { + message = "Function name `{{funcName}}` should match variable name `{{name}}`"; + } else if (isProp) { + message = "Function name `{{funcName}}` should not match property name `{{name}}`"; + } else { + message = "Function name `{{funcName}}` should not match variable name `{{name}}`"; + } + context.report({ + node, + message, + data: { + name, + funcName + } + }); + } + + /** + * Determines whether a given node is a string literal + * @param {ASTNode} node The node to check + * @returns {boolean} `true` if the node is a string literal + */ + function isStringLiteral(node) { + return node.type === "Literal" && typeof node.value === "string"; + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + + VariableDeclarator(node) { + if (!node.init || node.init.type !== "FunctionExpression" || node.id.type !== "Identifier") { + return; + } + if (node.init.id && shouldWarn(node.id.name, node.init.id.name)) { + report(node, node.id.name, node.init.id.name, false); + } + }, + + AssignmentExpression(node) { + if ( + node.right.type !== "FunctionExpression" || + (node.left.computed && node.left.property.type !== "Literal") || + (!includeModuleExports && isModuleExports(node.left)) || + (node.left.type !== "Identifier" && node.left.type !== "MemberExpression") + ) { + return; + } + + const isProp = node.left.type === "MemberExpression"; + const name = isProp ? astUtils.getStaticPropertyName(node.left) : node.left.name; + + if (node.right.id && isIdentifier(name) && shouldWarn(name, node.right.id.name)) { + report(node, name, node.right.id.name, isProp); + } + }, + + Property(node) { + if (node.value.type !== "FunctionExpression" || !node.value.id || node.computed && !isStringLiteral(node.key)) { + return; + } + if (node.key.type === "Identifier" && shouldWarn(node.key.name, node.value.id.name)) { + report(node, node.key.name, node.value.id.name, true); + } else if ( + isStringLiteral(node.key) && + isIdentifier(node.key.value, ecmaVersion) && + shouldWarn(node.key.value, node.value.id.name) + ) { + report(node, node.key.value, node.value.id.name, true); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/func-names.js b/node_modules/eslint/lib/rules/func-names.js new file mode 100644 index 0000000..722f276 --- /dev/null +++ b/node_modules/eslint/lib/rules/func-names.js @@ -0,0 +1,115 @@ +/** + * @fileoverview Rule to warn when a function expression does not have a name. + * @author Kyle T. Nunery + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +/** + * Checks whether or not a given variable is a function name. + * @param {eslint-scope.Variable} variable - A variable to check. + * @returns {boolean} `true` if the variable is a function name. + */ +function isFunctionName(variable) { + return variable && variable.defs[0].type === "FunctionName"; +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require or disallow named `function` expressions", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/func-names" + }, + + schema: [ + { + enum: ["always", "as-needed", "never"] + } + ] + }, + + create(context) { + const never = context.options[0] === "never"; + const asNeeded = context.options[0] === "as-needed"; + + /** + * Determines whether the current FunctionExpression node is a get, set, or + * shorthand method in an object literal or a class. + * @param {ASTNode} node - A node to check. + * @returns {boolean} True if the node is a get, set, or shorthand method. + */ + function isObjectOrClassMethod(node) { + const parent = node.parent; + + return (parent.type === "MethodDefinition" || ( + parent.type === "Property" && ( + parent.method || + parent.kind === "get" || + parent.kind === "set" + ) + )); + } + + /** + * Determines whether the current FunctionExpression node has a name that would be + * inferred from context in a conforming ES6 environment. + * @param {ASTNode} node - A node to check. + * @returns {boolean} True if the node would have a name assigned automatically. + */ + function hasInferredName(node) { + const parent = node.parent; + + return isObjectOrClassMethod(node) || + (parent.type === "VariableDeclarator" && parent.id.type === "Identifier" && parent.init === node) || + (parent.type === "Property" && parent.value === node) || + (parent.type === "AssignmentExpression" && parent.left.type === "Identifier" && parent.right === node) || + (parent.type === "ExportDefaultDeclaration" && parent.declaration === node) || + (parent.type === "AssignmentPattern" && parent.right === node); + } + + return { + "FunctionExpression:exit"(node) { + + // Skip recursive functions. + const nameVar = context.getDeclaredVariables(node)[0]; + + if (isFunctionName(nameVar) && nameVar.references.length > 0) { + return; + } + + const hasName = Boolean(node.id && node.id.name); + const name = astUtils.getFunctionNameWithKind(node); + + if (never) { + if (hasName) { + context.report({ + node, + message: "Unexpected named {{name}}.", + data: { name } + }); + } + } else { + if (!hasName && (asNeeded ? !hasInferredName(node) : !isObjectOrClassMethod(node))) { + context.report({ + node, + message: "Unexpected unnamed {{name}}.", + data: { name } + }); + } + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/func-style.js b/node_modules/eslint/lib/rules/func-style.js new file mode 100644 index 0000000..ea6d74f --- /dev/null +++ b/node_modules/eslint/lib/rules/func-style.js @@ -0,0 +1,90 @@ +/** + * @fileoverview Rule to enforce a particular function style + * @author Nicholas C. Zakas + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce the consistent use of either `function` declarations or expressions", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/func-style" + }, + + schema: [ + { + enum: ["declaration", "expression"] + }, + { + type: "object", + properties: { + allowArrowFunctions: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + + const style = context.options[0], + allowArrowFunctions = context.options[1] && context.options[1].allowArrowFunctions === true, + enforceDeclarations = (style === "declaration"), + stack = []; + + const nodesToCheck = { + FunctionDeclaration(node) { + stack.push(false); + + if (!enforceDeclarations && node.parent.type !== "ExportDefaultDeclaration") { + context.report({ node, message: "Expected a function expression." }); + } + }, + "FunctionDeclaration:exit"() { + stack.pop(); + }, + + FunctionExpression(node) { + stack.push(false); + + if (enforceDeclarations && node.parent.type === "VariableDeclarator") { + context.report({ node: node.parent, message: "Expected a function declaration." }); + } + }, + "FunctionExpression:exit"() { + stack.pop(); + }, + + ThisExpression() { + if (stack.length > 0) { + stack[stack.length - 1] = true; + } + } + }; + + if (!allowArrowFunctions) { + nodesToCheck.ArrowFunctionExpression = function() { + stack.push(false); + }; + + nodesToCheck["ArrowFunctionExpression:exit"] = function(node) { + const hasThisExpr = stack.pop(); + + if (enforceDeclarations && !hasThisExpr && node.parent.type === "VariableDeclarator") { + context.report({ node: node.parent, message: "Expected a function declaration." }); + } + }; + } + + return nodesToCheck; + + } +}; diff --git a/node_modules/eslint/lib/rules/function-paren-newline.js b/node_modules/eslint/lib/rules/function-paren-newline.js new file mode 100644 index 0000000..7e4f279 --- /dev/null +++ b/node_modules/eslint/lib/rules/function-paren-newline.js @@ -0,0 +1,222 @@ +/** + * @fileoverview enforce consistent line breaks inside function parentheses + * @author Teddy Katz + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce consistent line breaks inside function parentheses", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/function-paren-newline" + }, + fixable: "whitespace", + schema: [ + { + oneOf: [ + { + enum: ["always", "never", "consistent", "multiline"] + }, + { + type: "object", + properties: { + minItems: { + type: "integer", + minimum: 0 + } + }, + additionalProperties: false + } + ] + } + ] + }, + + create(context) { + const sourceCode = context.getSourceCode(); + const rawOption = context.options[0] || "multiline"; + const multilineOption = rawOption === "multiline"; + const consistentOption = rawOption === "consistent"; + let minItems; + + if (typeof rawOption === "object") { + minItems = rawOption.minItems; + } else if (rawOption === "always") { + minItems = 0; + } else if (rawOption === "never") { + minItems = Infinity; + } else { + minItems = null; + } + + //---------------------------------------------------------------------- + // Helpers + //---------------------------------------------------------------------- + + /** + * Determines whether there should be newlines inside function parens + * @param {ASTNode[]} elements The arguments or parameters in the list + * @param {boolean} hasLeftNewline `true` if the left paren has a newline in the current code. + * @returns {boolean} `true` if there should be newlines inside the function parens + */ + function shouldHaveNewlines(elements, hasLeftNewline) { + if (multilineOption) { + return elements.some((element, index) => index !== elements.length - 1 && element.loc.end.line !== elements[index + 1].loc.start.line); + } + if (consistentOption) { + return hasLeftNewline; + } + return elements.length >= minItems; + } + + /** + * Validates a list of arguments or parameters + * @param {Object} parens An object with keys `leftParen` for the left paren token, and `rightParen` for the right paren token + * @param {ASTNode[]} elements The arguments or parameters in the list + * @returns {void} + */ + function validateParens(parens, elements) { + const leftParen = parens.leftParen; + const rightParen = parens.rightParen; + const tokenAfterLeftParen = sourceCode.getTokenAfter(leftParen); + const tokenBeforeRightParen = sourceCode.getTokenBefore(rightParen); + const hasLeftNewline = !astUtils.isTokenOnSameLine(leftParen, tokenAfterLeftParen); + const hasRightNewline = !astUtils.isTokenOnSameLine(tokenBeforeRightParen, rightParen); + const needsNewlines = shouldHaveNewlines(elements, hasLeftNewline); + + if (hasLeftNewline && !needsNewlines) { + context.report({ + node: leftParen, + message: "Unexpected newline after '('.", + fix(fixer) { + return sourceCode.getText().slice(leftParen.range[1], tokenAfterLeftParen.range[0]).trim() + + // If there is a comment between the ( and the first element, don't do a fix. + ? null + : fixer.removeRange([leftParen.range[1], tokenAfterLeftParen.range[0]]); + } + }); + } else if (!hasLeftNewline && needsNewlines) { + context.report({ + node: leftParen, + message: "Expected a newline after '('.", + fix: fixer => fixer.insertTextAfter(leftParen, "\n") + }); + } + + if (hasRightNewline && !needsNewlines) { + context.report({ + node: rightParen, + message: "Unexpected newline before ')'.", + fix(fixer) { + return sourceCode.getText().slice(tokenBeforeRightParen.range[1], rightParen.range[0]).trim() + + // If there is a comment between the last element and the ), don't do a fix. + ? null + : fixer.removeRange([tokenBeforeRightParen.range[1], rightParen.range[0]]); + } + }); + } else if (!hasRightNewline && needsNewlines) { + context.report({ + node: rightParen, + message: "Expected a newline before ')'.", + fix: fixer => fixer.insertTextBefore(rightParen, "\n") + }); + } + } + + /** + * Gets the left paren and right paren tokens of a node. + * @param {ASTNode} node The node with parens + * @returns {Object} An object with keys `leftParen` for the left paren token, and `rightParen` for the right paren token. + * Can also return `null` if an expression has no parens (e.g. a NewExpression with no arguments, or an ArrowFunctionExpression + * with a single parameter) + */ + function getParenTokens(node) { + switch (node.type) { + case "NewExpression": + if (!node.arguments.length && !( + astUtils.isOpeningParenToken(sourceCode.getLastToken(node, { skip: 1 })) && + astUtils.isClosingParenToken(sourceCode.getLastToken(node)) + )) { + + // If the NewExpression does not have parens (e.g. `new Foo`), return null. + return null; + } + + // falls through + + case "CallExpression": + return { + leftParen: sourceCode.getTokenAfter(node.callee, astUtils.isOpeningParenToken), + rightParen: sourceCode.getLastToken(node) + }; + + case "FunctionDeclaration": + case "FunctionExpression": { + const leftParen = sourceCode.getFirstToken(node, astUtils.isOpeningParenToken); + const rightParen = node.params.length + ? sourceCode.getTokenAfter(node.params[node.params.length - 1], astUtils.isClosingParenToken) + : sourceCode.getTokenAfter(leftParen); + + return { leftParen, rightParen }; + } + + case "ArrowFunctionExpression": { + const firstToken = sourceCode.getFirstToken(node); + + if (!astUtils.isOpeningParenToken(firstToken)) { + + // If the ArrowFunctionExpression has a single param without parens, return null. + return null; + } + + return { + leftParen: firstToken, + rightParen: sourceCode.getTokenBefore(node.body, astUtils.isClosingParenToken) + }; + } + + default: + throw new TypeError(`unexpected node with type ${node.type}`); + } + } + + /** + * Validates the parentheses for a node + * @param {ASTNode} node The node with parens + * @returns {void} + */ + function validateNode(node) { + const parens = getParenTokens(node); + + if (parens) { + validateParens(parens, astUtils.isFunction(node) ? node.params : node.arguments); + } + } + + //---------------------------------------------------------------------- + // Public + //---------------------------------------------------------------------- + + return { + ArrowFunctionExpression: validateNode, + CallExpression: validateNode, + FunctionDeclaration: validateNode, + FunctionExpression: validateNode, + NewExpression: validateNode + }; + } +}; diff --git a/node_modules/eslint/lib/rules/generator-star-spacing.js b/node_modules/eslint/lib/rules/generator-star-spacing.js new file mode 100644 index 0000000..282b375 --- /dev/null +++ b/node_modules/eslint/lib/rules/generator-star-spacing.js @@ -0,0 +1,200 @@ +/** + * @fileoverview Rule to check the spacing around the * in generator functions. + * @author Jamund Ferguson + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +const OVERRIDE_SCHEMA = { + oneOf: [ + { + enum: ["before", "after", "both", "neither"] + }, + { + type: "object", + properties: { + before: { type: "boolean" }, + after: { type: "boolean" } + }, + additionalProperties: false + } + ] +}; + +module.exports = { + meta: { + docs: { + description: "enforce consistent spacing around `*` operators in generator functions", + category: "ECMAScript 6", + recommended: false, + url: "https://eslint.org/docs/rules/generator-star-spacing" + }, + + fixable: "whitespace", + + schema: [ + { + oneOf: [ + { + enum: ["before", "after", "both", "neither"] + }, + { + type: "object", + properties: { + before: { type: "boolean" }, + after: { type: "boolean" }, + named: OVERRIDE_SCHEMA, + anonymous: OVERRIDE_SCHEMA, + method: OVERRIDE_SCHEMA + }, + additionalProperties: false + } + ] + } + ] + }, + + create(context) { + + const optionDefinitions = { + before: { before: true, after: false }, + after: { before: false, after: true }, + both: { before: true, after: true }, + neither: { before: false, after: false } + }; + + /** + * Returns resolved option definitions based on an option and defaults + * + * @param {any} option - The option object or string value + * @param {Object} defaults - The defaults to use if options are not present + * @returns {Object} the resolved object definition + */ + function optionToDefinition(option, defaults) { + if (!option) { + return defaults; + } + + return typeof option === "string" + ? optionDefinitions[option] + : Object.assign({}, defaults, option); + } + + const modes = (function(option) { + option = option || {}; + const defaults = optionToDefinition(option, optionDefinitions.before); + + return { + named: optionToDefinition(option.named, defaults), + anonymous: optionToDefinition(option.anonymous, defaults), + method: optionToDefinition(option.method, defaults) + }; + }(context.options[0])); + + const sourceCode = context.getSourceCode(); + + /** + * Checks if the given token is a star token or not. + * + * @param {Token} token - The token to check. + * @returns {boolean} `true` if the token is a star token. + */ + function isStarToken(token) { + return token.value === "*" && token.type === "Punctuator"; + } + + /** + * Gets the generator star token of the given function node. + * + * @param {ASTNode} node - The function node to get. + * @returns {Token} Found star token. + */ + function getStarToken(node) { + return sourceCode.getFirstToken( + (node.parent.method || node.parent.type === "MethodDefinition") ? node.parent : node, + isStarToken + ); + } + + /** + * Checks the spacing between two tokens before or after the star token. + * + * @param {string} kind Either "named", "anonymous", or "method" + * @param {string} side Either "before" or "after". + * @param {Token} leftToken `function` keyword token if side is "before", or + * star token if side is "after". + * @param {Token} rightToken Star token if side is "before", or identifier + * token if side is "after". + * @returns {void} + */ + function checkSpacing(kind, side, leftToken, rightToken) { + if (!!(rightToken.range[0] - leftToken.range[1]) !== modes[kind][side]) { + const after = leftToken.value === "*"; + const spaceRequired = modes[kind][side]; + const node = after ? leftToken : rightToken; + const type = spaceRequired ? "Missing" : "Unexpected"; + const message = "{{type}} space {{side}} *."; + const data = { + type, + side + }; + + context.report({ + node, + message, + data, + fix(fixer) { + if (spaceRequired) { + if (after) { + return fixer.insertTextAfter(node, " "); + } + return fixer.insertTextBefore(node, " "); + } + return fixer.removeRange([leftToken.range[1], rightToken.range[0]]); + } + }); + } + } + + /** + * Enforces the spacing around the star if node is a generator function. + * + * @param {ASTNode} node A function expression or declaration node. + * @returns {void} + */ + function checkFunction(node) { + if (!node.generator) { + return; + } + + const starToken = getStarToken(node); + const prevToken = sourceCode.getTokenBefore(starToken); + const nextToken = sourceCode.getTokenAfter(starToken); + + let kind = "named"; + + if (node.parent.type === "MethodDefinition" || (node.parent.type === "Property" && node.parent.method)) { + kind = "method"; + } else if (!node.id) { + kind = "anonymous"; + } + + // Only check before when preceded by `function`|`static` keyword + if (!(kind === "method" && starToken === sourceCode.getFirstToken(node.parent))) { + checkSpacing(kind, "before", prevToken, starToken); + } + + checkSpacing(kind, "after", starToken, nextToken); + } + + return { + FunctionDeclaration: checkFunction, + FunctionExpression: checkFunction + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/getter-return.js b/node_modules/eslint/lib/rules/getter-return.js new file mode 100644 index 0000000..58f2a39 --- /dev/null +++ b/node_modules/eslint/lib/rules/getter-return.js @@ -0,0 +1,178 @@ +/** + * @fileoverview Enforces that a return statement is present in property getters. + * @author Aladdin-ADD(hh_2013@foxmail.com) + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ +const TARGET_NODE_TYPE = /^(?:Arrow)?FunctionExpression$/; + +/** + * Checks a given code path segment is reachable. + * + * @param {CodePathSegment} segment - A segment to check. + * @returns {boolean} `true` if the segment is reachable. + */ +function isReachable(segment) { + return segment.reachable; +} + +/** + * Gets a readable location. + * + * - FunctionExpression -> the function name or `function` keyword. + * + * @param {ASTNode} node - A function node to get. + * @returns {ASTNode|Token} The node or the token of a location. + */ +function getId(node) { + return node.id || node; +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce `return` statements in getters", + category: "Possible Errors", + recommended: false, + url: "https://eslint.org/docs/rules/getter-return" + }, + fixable: null, + schema: [ + { + type: "object", + properties: { + allowImplicit: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + + const options = context.options[0] || { allowImplicit: false }; + + let funcInfo = { + upper: null, + codePath: null, + hasReturn: false, + shouldCheck: false, + node: null + }; + + /** + * Checks whether or not the last code path segment is reachable. + * Then reports this function if the segment is reachable. + * + * If the last code path segment is reachable, there are paths which are not + * returned or thrown. + * + * @param {ASTNode} node - A node to check. + * @returns {void} + */ + function checkLastSegment(node) { + if (funcInfo.shouldCheck && + funcInfo.codePath.currentSegments.some(isReachable) + ) { + context.report({ + node, + loc: getId(node).loc.start, + message: funcInfo.hasReturn + ? "Expected {{name}} to always return a value." + : "Expected to return a value in {{name}}.", + data: { + name: astUtils.getFunctionNameWithKind(funcInfo.node) + } + }); + } + } + + /** + * Checks whether a node means a getter function. + * @param {ASTNode} node - a node to check. + * @returns {boolean} if node means a getter, return true; else return false. + */ + function isGetter(node) { + const parent = node.parent; + + if (TARGET_NODE_TYPE.test(node.type) && node.body.type === "BlockStatement") { + if (parent.kind === "get") { + return true; + } + if (parent.type === "Property" && astUtils.getStaticPropertyName(parent) === "get" && parent.parent.type === "ObjectExpression") { + + // Object.defineProperty() + if (parent.parent.parent.type === "CallExpression" && + astUtils.getStaticPropertyName(parent.parent.parent.callee) === "defineProperty") { + return true; + } + + // Object.defineProperties() + if (parent.parent.parent.type === "Property" && + parent.parent.parent.parent.type === "ObjectExpression" && + parent.parent.parent.parent.parent.type === "CallExpression" && + astUtils.getStaticPropertyName(parent.parent.parent.parent.parent.callee) === "defineProperties") { + return true; + } + } + } + return false; + } + return { + + // Stacks this function's information. + onCodePathStart(codePath, node) { + funcInfo = { + upper: funcInfo, + codePath, + hasReturn: false, + shouldCheck: isGetter(node), + node + }; + }, + + // Pops this function's information. + onCodePathEnd() { + funcInfo = funcInfo.upper; + }, + + // Checks the return statement is valid. + ReturnStatement(node) { + if (funcInfo.shouldCheck) { + funcInfo.hasReturn = true; + + // if allowImplicit: false, should also check node.argument + if (!options.allowImplicit && !node.argument) { + context.report({ + node, + message: "Expected to return a value in {{name}}.", + data: { + name: astUtils.getFunctionNameWithKind(funcInfo.node) + } + }); + } + } + }, + + // Reports a given function if the last path is reachable. + "FunctionExpression:exit": checkLastSegment, + "ArrowFunctionExpression:exit": checkLastSegment + }; + } +}; diff --git a/node_modules/eslint/lib/rules/global-require.js b/node_modules/eslint/lib/rules/global-require.js new file mode 100644 index 0000000..a5f5335 --- /dev/null +++ b/node_modules/eslint/lib/rules/global-require.js @@ -0,0 +1,76 @@ +/** + * @fileoverview Rule for disallowing require() outside of the top-level module context + * @author Jamund Ferguson + */ + +"use strict"; + +const ACCEPTABLE_PARENTS = [ + "AssignmentExpression", + "VariableDeclarator", + "MemberExpression", + "ExpressionStatement", + "CallExpression", + "ConditionalExpression", + "Program", + "VariableDeclaration" +]; + +/** + * Finds the eslint-scope reference in the given scope. + * @param {Object} scope The scope to search. + * @param {ASTNode} node The identifier node. + * @returns {Reference|null} Returns the found reference or null if none were found. + */ +function findReference(scope, node) { + const references = scope.references.filter(reference => reference.identifier.range[0] === node.range[0] && + reference.identifier.range[1] === node.range[1]); + + /* istanbul ignore else: correctly returns null */ + if (references.length === 1) { + return references[0]; + } + return null; + +} + +/** + * Checks if the given identifier node is shadowed in the given scope. + * @param {Object} scope The current scope. + * @param {ASTNode} node The identifier node to check. + * @returns {boolean} Whether or not the name is shadowed. + */ +function isShadowed(scope, node) { + const reference = findReference(scope, node); + + return reference && reference.resolved && reference.resolved.defs.length > 0; +} + +module.exports = { + meta: { + docs: { + description: "require `require()` calls to be placed at top-level module scope", + category: "Node.js and CommonJS", + recommended: false, + url: "https://eslint.org/docs/rules/global-require" + }, + + schema: [] + }, + + create(context) { + return { + CallExpression(node) { + const currentScope = context.getScope(); + + if (node.callee.name === "require" && !isShadowed(currentScope, node.callee)) { + const isGoodRequire = context.getAncestors().every(parent => ACCEPTABLE_PARENTS.indexOf(parent.type) > -1); + + if (!isGoodRequire) { + context.report({ node, message: "Unexpected require()." }); + } + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/guard-for-in.js b/node_modules/eslint/lib/rules/guard-for-in.js new file mode 100644 index 0000000..0f85e49 --- /dev/null +++ b/node_modules/eslint/lib/rules/guard-for-in.js @@ -0,0 +1,71 @@ +/** + * @fileoverview Rule to flag for-in loops without if statements inside + * @author Nicholas C. Zakas + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require `for-in` loops to include an `if` statement", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/guard-for-in" + }, + + schema: [] + }, + + create(context) { + + return { + + ForInStatement(node) { + const body = node.body; + + // empty statement + if (body.type === "EmptyStatement") { + return; + } + + // if statement + if (body.type === "IfStatement") { + return; + } + + // empty block + if (body.type === "BlockStatement" && body.body.length === 0) { + return; + } + + // block with just if statement + if (body.type === "BlockStatement" && body.body.length === 1 && body.body[0].type === "IfStatement") { + return; + } + + // block that starts with if statement + if (body.type === "BlockStatement" && body.body.length >= 1 && body.body[0].type === "IfStatement") { + const i = body.body[0]; + + // ... whose consequent is a continue + if (i.consequent.type === "ContinueStatement") { + return; + } + + // ... whose consequent is a block that contains only a continue + if (i.consequent.type === "BlockStatement" && i.consequent.body.length === 1 && i.consequent.body[0].type === "ContinueStatement") { + return; + } + } + + context.report({ node, message: "The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype." }); + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/handle-callback-err.js b/node_modules/eslint/lib/rules/handle-callback-err.js new file mode 100644 index 0000000..f6e6c10 --- /dev/null +++ b/node_modules/eslint/lib/rules/handle-callback-err.js @@ -0,0 +1,90 @@ +/** + * @fileoverview Ensure handling of errors when we know they exist. + * @author Jamund Ferguson + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require error handling in callbacks", + category: "Node.js and CommonJS", + recommended: false, + url: "https://eslint.org/docs/rules/handle-callback-err" + }, + + schema: [ + { + type: "string" + } + ] + }, + + create(context) { + + const errorArgument = context.options[0] || "err"; + + /** + * Checks if the given argument should be interpreted as a regexp pattern. + * @param {string} stringToCheck The string which should be checked. + * @returns {boolean} Whether or not the string should be interpreted as a pattern. + */ + function isPattern(stringToCheck) { + const firstChar = stringToCheck[0]; + + return firstChar === "^"; + } + + /** + * Checks if the given name matches the configured error argument. + * @param {string} name The name which should be compared. + * @returns {boolean} Whether or not the given name matches the configured error variable name. + */ + function matchesConfiguredErrorName(name) { + if (isPattern(errorArgument)) { + const regexp = new RegExp(errorArgument); + + return regexp.test(name); + } + return name === errorArgument; + } + + /** + * Get the parameters of a given function scope. + * @param {Object} scope The function scope. + * @returns {array} All parameters of the given scope. + */ + function getParameters(scope) { + return scope.variables.filter(variable => variable.defs[0] && variable.defs[0].type === "Parameter"); + } + + /** + * Check to see if we're handling the error object properly. + * @param {ASTNode} node The AST node to check. + * @returns {void} + */ + function checkForError(node) { + const scope = context.getScope(), + parameters = getParameters(scope), + firstParameter = parameters[0]; + + if (firstParameter && matchesConfiguredErrorName(firstParameter.name)) { + if (firstParameter.references.length === 0) { + context.report({ node, message: "Expected error to be handled." }); + } + } + } + + return { + FunctionDeclaration: checkForError, + FunctionExpression: checkForError, + ArrowFunctionExpression: checkForError + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/id-blacklist.js b/node_modules/eslint/lib/rules/id-blacklist.js new file mode 100644 index 0000000..ba9b5d4 --- /dev/null +++ b/node_modules/eslint/lib/rules/id-blacklist.js @@ -0,0 +1,122 @@ +/** + * @fileoverview Rule that warns when identifier names that are + * blacklisted in the configuration are used. + * @author Keith Cirkel (http://keithcirkel.co.uk) + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow specified identifiers", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/id-blacklist" + }, + + schema: { + type: "array", + items: { + type: "string" + }, + uniqueItems: true + } + }, + + create(context) { + + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + const blacklist = context.options; + + + /** + * Checks if a string matches the provided pattern + * @param {string} name The string to check. + * @returns {boolean} if the string is a match + * @private + */ + function isInvalid(name) { + return blacklist.indexOf(name) !== -1; + } + + /** + * Verifies if we should report an error or not based on the effective + * parent node and the identifier name. + * @param {ASTNode} effectiveParent The effective parent node of the node to be reported + * @param {string} name The identifier name of the identifier node + * @returns {boolean} whether an error should be reported or not + */ + function shouldReport(effectiveParent, name) { + return effectiveParent.type !== "CallExpression" && + effectiveParent.type !== "NewExpression" && + isInvalid(name); + } + + /** + * Reports an AST node as a rule violation. + * @param {ASTNode} node The node to report. + * @returns {void} + * @private + */ + function report(node) { + context.report({ + node, + message: "Identifier '{{name}}' is blacklisted.", + data: { + name: node.name + } + }); + } + + return { + + Identifier(node) { + const name = node.name, + effectiveParent = (node.parent.type === "MemberExpression") ? node.parent.parent : node.parent; + + // MemberExpressions get special rules + if (node.parent.type === "MemberExpression") { + + // Always check object names + if (node.parent.object.type === "Identifier" && + node.parent.object.name === node.name) { + if (isInvalid(name)) { + report(node); + } + + // Report AssignmentExpressions only if they are the left side of the assignment + } else if (effectiveParent.type === "AssignmentExpression" && + (effectiveParent.right.type !== "MemberExpression" || + effectiveParent.left.type === "MemberExpression" && + effectiveParent.left.property.name === node.name)) { + if (isInvalid(name)) { + report(node); + } + } + + // Properties have their own rules + } else if (node.parent.type === "Property") { + + if (shouldReport(effectiveParent, name)) { + report(node); + } + + // Report anything that is a match and not a CallExpression + } else if (shouldReport(effectiveParent, name)) { + report(node); + } + } + + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/id-length.js b/node_modules/eslint/lib/rules/id-length.js new file mode 100644 index 0000000..eaed262 --- /dev/null +++ b/node_modules/eslint/lib/rules/id-length.js @@ -0,0 +1,117 @@ +/** + * @fileoverview Rule that warns when identifier names are shorter or longer + * than the values provided in configuration. + * @author Burak Yigit Kaya aka BYK + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce minimum and maximum identifier lengths", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/id-length" + }, + + schema: [ + { + type: "object", + properties: { + min: { + type: "number" + }, + max: { + type: "number" + }, + exceptions: { + type: "array", + uniqueItems: true, + items: { + type: "string" + } + }, + properties: { + enum: ["always", "never"] + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + const options = context.options[0] || {}; + const minLength = typeof options.min !== "undefined" ? options.min : 2; + const maxLength = typeof options.max !== "undefined" ? options.max : Infinity; + const properties = options.properties !== "never"; + const exceptions = (options.exceptions ? options.exceptions : []) + .reduce((obj, item) => { + obj[item] = true; + + return obj; + }, {}); + + const SUPPORTED_EXPRESSIONS = { + MemberExpression: properties && function(parent) { + return !parent.computed && ( + + // regular property assignment + (parent.parent.left === parent && parent.parent.type === "AssignmentExpression" || + + // or the last identifier in an ObjectPattern destructuring + parent.parent.type === "Property" && parent.parent.value === parent && + parent.parent.parent.type === "ObjectPattern" && parent.parent.parent.parent.left === parent.parent.parent) + ); + }, + AssignmentPattern(parent, node) { + return parent.left === node; + }, + VariableDeclarator(parent, node) { + return parent.id === node; + }, + Property: properties && function(parent, node) { + return parent.key === node; + }, + ImportDefaultSpecifier: true, + RestElement: true, + FunctionExpression: true, + ArrowFunctionExpression: true, + ClassDeclaration: true, + FunctionDeclaration: true, + MethodDefinition: true, + CatchClause: true + }; + + return { + Identifier(node) { + const name = node.name; + const parent = node.parent; + + const isShort = name.length < minLength; + const isLong = name.length > maxLength; + + if (!(isShort || isLong) || exceptions[name]) { + return; // Nothing to report + } + + const isValidExpression = SUPPORTED_EXPRESSIONS[parent.type]; + + if (isValidExpression && (isValidExpression === true || isValidExpression(parent, node))) { + context.report({ + node, + message: isShort + ? "Identifier name '{{name}}' is too short (< {{min}})." + : "Identifier name '{{name}}' is too long (> {{max}}).", + data: { name, min: minLength, max: maxLength } + }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/id-match.js b/node_modules/eslint/lib/rules/id-match.js new file mode 100644 index 0000000..608ef17 --- /dev/null +++ b/node_modules/eslint/lib/rules/id-match.js @@ -0,0 +1,145 @@ +/** + * @fileoverview Rule to flag non-matching identifiers + * @author Matthieu Larcher + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require identifiers to match a specified regular expression", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/id-match" + }, + + schema: [ + { + type: "string" + }, + { + type: "object", + properties: { + properties: { + type: "boolean" + } + } + } + ] + }, + + create(context) { + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + const pattern = context.options[0] || "^.+$", + regexp = new RegExp(pattern); + + const options = context.options[1] || {}, + properties = !!options.properties, + onlyDeclarations = !!options.onlyDeclarations; + + /** + * Checks if a string matches the provided pattern + * @param {string} name The string to check. + * @returns {boolean} if the string is a match + * @private + */ + function isInvalid(name) { + return !regexp.test(name); + } + + /** + * Verifies if we should report an error or not based on the effective + * parent node and the identifier name. + * @param {ASTNode} effectiveParent The effective parent node of the node to be reported + * @param {string} name The identifier name of the identifier node + * @returns {boolean} whether an error should be reported or not + */ + function shouldReport(effectiveParent, name) { + return effectiveParent.type !== "CallExpression" && + effectiveParent.type !== "NewExpression" && + isInvalid(name); + } + + /** + * Reports an AST node as a rule violation. + * @param {ASTNode} node The node to report. + * @returns {void} + * @private + */ + function report(node) { + context.report({ + node, + message: "Identifier '{{name}}' does not match the pattern '{{pattern}}'.", + data: { + name: node.name, + pattern + } + }); + } + + return { + + Identifier(node) { + const name = node.name, + parent = node.parent, + effectiveParent = (parent.type === "MemberExpression") ? parent.parent : parent; + + if (parent.type === "MemberExpression") { + + if (!properties) { + return; + } + + // Always check object names + if (parent.object.type === "Identifier" && + parent.object.name === name) { + if (isInvalid(name)) { + report(node); + } + + // Report AssignmentExpressions only if they are the left side of the assignment + } else if (effectiveParent.type === "AssignmentExpression" && + (effectiveParent.right.type !== "MemberExpression" || + effectiveParent.left.type === "MemberExpression" && + effectiveParent.left.property.name === name)) { + if (isInvalid(name)) { + report(node); + } + } + + } else if (parent.type === "Property") { + + if (!properties || parent.key.name !== name) { + return; + } + + if (shouldReport(effectiveParent, name)) { + report(node); + } + + } else { + const isDeclaration = effectiveParent.type === "FunctionDeclaration" || effectiveParent.type === "VariableDeclarator"; + + if (onlyDeclarations && !isDeclaration) { + return; + } + + if (shouldReport(effectiveParent, name)) { + report(node); + } + } + } + + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/implicit-arrow-linebreak.js b/node_modules/eslint/lib/rules/implicit-arrow-linebreak.js new file mode 100644 index 0000000..a7ad112 --- /dev/null +++ b/node_modules/eslint/lib/rules/implicit-arrow-linebreak.js @@ -0,0 +1,87 @@ +/** + * @fileoverview enforce the location of arrow function bodies + * @author Sharmila Jesupaul + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ +module.exports = { + meta: { + docs: { + description: "enforce the location of arrow function bodies", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/implicit-arrow-linebreak" + }, + fixable: "whitespace", + schema: [ + { + enum: ["beside", "below"] + } + ] + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + //---------------------------------------------------------------------- + // Helpers + //---------------------------------------------------------------------- + /** + * Gets the applicable preference for a particular keyword + * @returns {string} The applicable option for the keyword, e.g. 'beside' + */ + function getOption() { + return context.options[0] || "beside"; + } + + /** + * Validates the location of an arrow function body + * @param {ASTNode} node The arrow function body + * @param {string} keywordName The applicable keyword name for the arrow function body + * @returns {void} + */ + function validateExpression(node) { + const option = getOption(); + + let tokenBefore = sourceCode.getTokenBefore(node.body); + const hasParens = tokenBefore.value === "("; + + if (node.type === "BlockStatement") { + return; + } + + let fixerTarget = node.body; + + if (hasParens) { + + // Gets the first token before the function body that is not an open paren + tokenBefore = sourceCode.getTokenBefore(node.body, token => token.value !== "("); + fixerTarget = sourceCode.getTokenAfter(tokenBefore); + } + + if (tokenBefore.loc.end.line === fixerTarget.loc.start.line && option === "below") { + context.report({ + node: fixerTarget, + message: "Expected a linebreak before this expression.", + fix: fixer => fixer.insertTextBefore(fixerTarget, "\n") + }); + } else if (tokenBefore.loc.end.line !== fixerTarget.loc.start.line && option === "beside") { + context.report({ + node: fixerTarget, + message: "Expected no linebreak before this expression.", + fix: fixer => fixer.replaceTextRange([tokenBefore.range[1], fixerTarget.range[0]], " ") + }); + } + } + + //---------------------------------------------------------------------- + // Public + //---------------------------------------------------------------------- + return { + ArrowFunctionExpression: node => validateExpression(node) + }; + } +}; diff --git a/node_modules/eslint/lib/rules/indent-legacy.js b/node_modules/eslint/lib/rules/indent-legacy.js new file mode 100644 index 0000000..701cf01 --- /dev/null +++ b/node_modules/eslint/lib/rules/indent-legacy.js @@ -0,0 +1,1138 @@ +/** + * @fileoverview This option sets a specific tab width for your code + * + * This rule has been ported and modified from nodeca. + * @author Vitaly Puzrin + * @author Gyandeep Singh + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +/* istanbul ignore next: this rule has known coverage issues, but it's deprecated and shouldn't be updated in the future anyway. */ +module.exports = { + meta: { + docs: { + description: "enforce consistent indentation", + category: "Stylistic Issues", + recommended: false, + replacedBy: ["indent"], + url: "https://eslint.org/docs/rules/indent-legacy" + }, + + deprecated: true, + + fixable: "whitespace", + + schema: [ + { + oneOf: [ + { + enum: ["tab"] + }, + { + type: "integer", + minimum: 0 + } + ] + }, + { + type: "object", + properties: { + SwitchCase: { + type: "integer", + minimum: 0 + }, + VariableDeclarator: { + oneOf: [ + { + type: "integer", + minimum: 0 + }, + { + type: "object", + properties: { + var: { + type: "integer", + minimum: 0 + }, + let: { + type: "integer", + minimum: 0 + }, + const: { + type: "integer", + minimum: 0 + } + } + } + ] + }, + outerIIFEBody: { + type: "integer", + minimum: 0 + }, + MemberExpression: { + type: "integer", + minimum: 0 + }, + FunctionDeclaration: { + type: "object", + properties: { + parameters: { + oneOf: [ + { + type: "integer", + minimum: 0 + }, + { + enum: ["first"] + } + ] + }, + body: { + type: "integer", + minimum: 0 + } + } + }, + FunctionExpression: { + type: "object", + properties: { + parameters: { + oneOf: [ + { + type: "integer", + minimum: 0 + }, + { + enum: ["first"] + } + ] + }, + body: { + type: "integer", + minimum: 0 + } + } + }, + CallExpression: { + type: "object", + properties: { + parameters: { + oneOf: [ + { + type: "integer", + minimum: 0 + }, + { + enum: ["first"] + } + ] + } + } + }, + ArrayExpression: { + oneOf: [ + { + type: "integer", + minimum: 0 + }, + { + enum: ["first"] + } + ] + }, + ObjectExpression: { + oneOf: [ + { + type: "integer", + minimum: 0 + }, + { + enum: ["first"] + } + ] + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + const DEFAULT_VARIABLE_INDENT = 1; + const DEFAULT_PARAMETER_INDENT = null; // For backwards compatibility, don't check parameter indentation unless specified in the config + const DEFAULT_FUNCTION_BODY_INDENT = 1; + + let indentType = "space"; + let indentSize = 4; + const options = { + SwitchCase: 0, + VariableDeclarator: { + var: DEFAULT_VARIABLE_INDENT, + let: DEFAULT_VARIABLE_INDENT, + const: DEFAULT_VARIABLE_INDENT + }, + outerIIFEBody: null, + FunctionDeclaration: { + parameters: DEFAULT_PARAMETER_INDENT, + body: DEFAULT_FUNCTION_BODY_INDENT + }, + FunctionExpression: { + parameters: DEFAULT_PARAMETER_INDENT, + body: DEFAULT_FUNCTION_BODY_INDENT + }, + CallExpression: { + arguments: DEFAULT_PARAMETER_INDENT + }, + ArrayExpression: 1, + ObjectExpression: 1 + }; + + const sourceCode = context.getSourceCode(); + + if (context.options.length) { + if (context.options[0] === "tab") { + indentSize = 1; + indentType = "tab"; + } else /* istanbul ignore else : this will be caught by options validation */ if (typeof context.options[0] === "number") { + indentSize = context.options[0]; + indentType = "space"; + } + + if (context.options[1]) { + const opts = context.options[1]; + + options.SwitchCase = opts.SwitchCase || 0; + const variableDeclaratorRules = opts.VariableDeclarator; + + if (typeof variableDeclaratorRules === "number") { + options.VariableDeclarator = { + var: variableDeclaratorRules, + let: variableDeclaratorRules, + const: variableDeclaratorRules + }; + } else if (typeof variableDeclaratorRules === "object") { + Object.assign(options.VariableDeclarator, variableDeclaratorRules); + } + + if (typeof opts.outerIIFEBody === "number") { + options.outerIIFEBody = opts.outerIIFEBody; + } + + if (typeof opts.MemberExpression === "number") { + options.MemberExpression = opts.MemberExpression; + } + + if (typeof opts.FunctionDeclaration === "object") { + Object.assign(options.FunctionDeclaration, opts.FunctionDeclaration); + } + + if (typeof opts.FunctionExpression === "object") { + Object.assign(options.FunctionExpression, opts.FunctionExpression); + } + + if (typeof opts.CallExpression === "object") { + Object.assign(options.CallExpression, opts.CallExpression); + } + + if (typeof opts.ArrayExpression === "number" || typeof opts.ArrayExpression === "string") { + options.ArrayExpression = opts.ArrayExpression; + } + + if (typeof opts.ObjectExpression === "number" || typeof opts.ObjectExpression === "string") { + options.ObjectExpression = opts.ObjectExpression; + } + } + } + + const caseIndentStore = {}; + + /** + * Creates an error message for a line, given the expected/actual indentation. + * @param {int} expectedAmount The expected amount of indentation characters for this line + * @param {int} actualSpaces The actual number of indentation spaces that were found on this line + * @param {int} actualTabs The actual number of indentation tabs that were found on this line + * @returns {string} An error message for this line + */ + function createErrorMessage(expectedAmount, actualSpaces, actualTabs) { + const expectedStatement = `${expectedAmount} ${indentType}${expectedAmount === 1 ? "" : "s"}`; // e.g. "2 tabs" + const foundSpacesWord = `space${actualSpaces === 1 ? "" : "s"}`; // e.g. "space" + const foundTabsWord = `tab${actualTabs === 1 ? "" : "s"}`; // e.g. "tabs" + let foundStatement; + + if (actualSpaces > 0 && actualTabs > 0) { + foundStatement = `${actualSpaces} ${foundSpacesWord} and ${actualTabs} ${foundTabsWord}`; // e.g. "1 space and 2 tabs" + } else if (actualSpaces > 0) { + + /* + * Abbreviate the message if the expected indentation is also spaces. + * e.g. 'Expected 4 spaces but found 2' rather than 'Expected 4 spaces but found 2 spaces' + */ + foundStatement = indentType === "space" ? actualSpaces : `${actualSpaces} ${foundSpacesWord}`; + } else if (actualTabs > 0) { + foundStatement = indentType === "tab" ? actualTabs : `${actualTabs} ${foundTabsWord}`; + } else { + foundStatement = "0"; + } + + return `Expected indentation of ${expectedStatement} but found ${foundStatement}.`; + } + + /** + * Reports a given indent violation + * @param {ASTNode} node Node violating the indent rule + * @param {int} needed Expected indentation character count + * @param {int} gottenSpaces Indentation space count in the actual node/code + * @param {int} gottenTabs Indentation tab count in the actual node/code + * @param {Object=} loc Error line and column location + * @param {boolean} isLastNodeCheck Is the error for last node check + * @param {int} lastNodeCheckEndOffset Number of charecters to skip from the end + * @returns {void} + */ + function report(node, needed, gottenSpaces, gottenTabs, loc, isLastNodeCheck) { + if (gottenSpaces && gottenTabs) { + + // To avoid conflicts with `no-mixed-spaces-and-tabs`, don't report lines that have both spaces and tabs. + return; + } + + const desiredIndent = (indentType === "space" ? " " : "\t").repeat(needed); + + const textRange = isLastNodeCheck + ? [node.range[1] - node.loc.end.column, node.range[1] - node.loc.end.column + gottenSpaces + gottenTabs] + : [node.range[0] - node.loc.start.column, node.range[0] - node.loc.start.column + gottenSpaces + gottenTabs]; + + context.report({ + node, + loc, + message: createErrorMessage(needed, gottenSpaces, gottenTabs), + fix: fixer => fixer.replaceTextRange(textRange, desiredIndent) + }); + } + + /** + * Get the actual indent of node + * @param {ASTNode|Token} node Node to examine + * @param {boolean} [byLastLine=false] get indent of node's last line + * @returns {Object} The node's indent. Contains keys `space` and `tab`, representing the indent of each character. Also + * contains keys `goodChar` and `badChar`, where `goodChar` is the amount of the user's desired indentation character, and + * `badChar` is the amount of the other indentation character. + */ + function getNodeIndent(node, byLastLine) { + const token = byLastLine ? sourceCode.getLastToken(node) : sourceCode.getFirstToken(node); + const srcCharsBeforeNode = sourceCode.getText(token, token.loc.start.column).split(""); + const indentChars = srcCharsBeforeNode.slice(0, srcCharsBeforeNode.findIndex(char => char !== " " && char !== "\t")); + const spaces = indentChars.filter(char => char === " ").length; + const tabs = indentChars.filter(char => char === "\t").length; + + return { + space: spaces, + tab: tabs, + goodChar: indentType === "space" ? spaces : tabs, + badChar: indentType === "space" ? tabs : spaces + }; + } + + /** + * Checks node is the first in its own start line. By default it looks by start line. + * @param {ASTNode} node The node to check + * @param {boolean} [byEndLocation=false] Lookup based on start position or end + * @returns {boolean} true if its the first in the its start line + */ + function isNodeFirstInLine(node, byEndLocation) { + const firstToken = byEndLocation === true ? sourceCode.getLastToken(node, 1) : sourceCode.getTokenBefore(node), + startLine = byEndLocation === true ? node.loc.end.line : node.loc.start.line, + endLine = firstToken ? firstToken.loc.end.line : -1; + + return startLine !== endLine; + } + + /** + * Check indent for node + * @param {ASTNode} node Node to check + * @param {int} neededIndent needed indent + * @param {boolean} [excludeCommas=false] skip comma on start of line + * @returns {void} + */ + function checkNodeIndent(node, neededIndent) { + const actualIndent = getNodeIndent(node, false); + + if ( + node.type !== "ArrayExpression" && + node.type !== "ObjectExpression" && + (actualIndent.goodChar !== neededIndent || actualIndent.badChar !== 0) && + isNodeFirstInLine(node) + ) { + report(node, neededIndent, actualIndent.space, actualIndent.tab); + } + + if (node.type === "IfStatement" && node.alternate) { + const elseToken = sourceCode.getTokenBefore(node.alternate); + + checkNodeIndent(elseToken, neededIndent); + + if (!isNodeFirstInLine(node.alternate)) { + checkNodeIndent(node.alternate, neededIndent); + } + } + + if (node.type === "TryStatement" && node.handler) { + const catchToken = sourceCode.getFirstToken(node.handler); + + checkNodeIndent(catchToken, neededIndent); + } + + if (node.type === "TryStatement" && node.finalizer) { + const finallyToken = sourceCode.getTokenBefore(node.finalizer); + + checkNodeIndent(finallyToken, neededIndent); + } + + if (node.type === "DoWhileStatement") { + const whileToken = sourceCode.getTokenAfter(node.body); + + checkNodeIndent(whileToken, neededIndent); + } + } + + /** + * Check indent for nodes list + * @param {ASTNode[]} nodes list of node objects + * @param {int} indent needed indent + * @param {boolean} [excludeCommas=false] skip comma on start of line + * @returns {void} + */ + function checkNodesIndent(nodes, indent) { + nodes.forEach(node => checkNodeIndent(node, indent)); + } + + /** + * Check last node line indent this detects, that block closed correctly + * @param {ASTNode} node Node to examine + * @param {int} lastLineIndent needed indent + * @returns {void} + */ + function checkLastNodeLineIndent(node, lastLineIndent) { + const lastToken = sourceCode.getLastToken(node); + const endIndent = getNodeIndent(lastToken, true); + + if ((endIndent.goodChar !== lastLineIndent || endIndent.badChar !== 0) && isNodeFirstInLine(node, true)) { + report( + node, + lastLineIndent, + endIndent.space, + endIndent.tab, + { line: lastToken.loc.start.line, column: lastToken.loc.start.column }, + true + ); + } + } + + /** + * Check last node line indent this detects, that block closed correctly + * This function for more complicated return statement case, where closing parenthesis may be followed by ';' + * @param {ASTNode} node Node to examine + * @param {int} firstLineIndent first line needed indent + * @returns {void} + */ + function checkLastReturnStatementLineIndent(node, firstLineIndent) { + + /* + * in case if return statement ends with ');' we have traverse back to ')' + * otherwise we'll measure indent for ';' and replace ')' + */ + const lastToken = sourceCode.getLastToken(node, astUtils.isClosingParenToken); + const textBeforeClosingParenthesis = sourceCode.getText(lastToken, lastToken.loc.start.column).slice(0, -1); + + if (textBeforeClosingParenthesis.trim()) { + + // There are tokens before the closing paren, don't report this case + return; + } + + const endIndent = getNodeIndent(lastToken, true); + + if (endIndent.goodChar !== firstLineIndent) { + report( + node, + firstLineIndent, + endIndent.space, + endIndent.tab, + { line: lastToken.loc.start.line, column: lastToken.loc.start.column }, + true + ); + } + } + + /** + * Check first node line indent is correct + * @param {ASTNode} node Node to examine + * @param {int} firstLineIndent needed indent + * @returns {void} + */ + function checkFirstNodeLineIndent(node, firstLineIndent) { + const startIndent = getNodeIndent(node, false); + + if ((startIndent.goodChar !== firstLineIndent || startIndent.badChar !== 0) && isNodeFirstInLine(node)) { + report( + node, + firstLineIndent, + startIndent.space, + startIndent.tab, + { line: node.loc.start.line, column: node.loc.start.column } + ); + } + } + + /** + * Returns a parent node of given node based on a specified type + * if not present then return null + * @param {ASTNode} node node to examine + * @param {string} type type that is being looked for + * @param {string} stopAtList end points for the evaluating code + * @returns {ASTNode|void} if found then node otherwise null + */ + function getParentNodeByType(node, type, stopAtList) { + let parent = node.parent; + + if (!stopAtList) { + stopAtList = ["Program"]; + } + + while (parent.type !== type && stopAtList.indexOf(parent.type) === -1 && parent.type !== "Program") { + parent = parent.parent; + } + + return parent.type === type ? parent : null; + } + + /** + * Returns the VariableDeclarator based on the current node + * if not present then return null + * @param {ASTNode} node node to examine + * @returns {ASTNode|void} if found then node otherwise null + */ + function getVariableDeclaratorNode(node) { + return getParentNodeByType(node, "VariableDeclarator"); + } + + /** + * Check to see if the node is part of the multi-line variable declaration. + * Also if its on the same line as the varNode + * @param {ASTNode} node node to check + * @param {ASTNode} varNode variable declaration node to check against + * @returns {boolean} True if all the above condition satisfy + */ + function isNodeInVarOnTop(node, varNode) { + return varNode && + varNode.parent.loc.start.line === node.loc.start.line && + varNode.parent.declarations.length > 1; + } + + /** + * Check to see if the argument before the callee node is multi-line and + * there should only be 1 argument before the callee node + * @param {ASTNode} node node to check + * @returns {boolean} True if arguments are multi-line + */ + function isArgBeforeCalleeNodeMultiline(node) { + const parent = node.parent; + + if (parent.arguments.length >= 2 && parent.arguments[1] === node) { + return parent.arguments[0].loc.end.line > parent.arguments[0].loc.start.line; + } + + return false; + } + + /** + * Check to see if the node is a file level IIFE + * @param {ASTNode} node The function node to check. + * @returns {boolean} True if the node is the outer IIFE + */ + function isOuterIIFE(node) { + const parent = node.parent; + let stmt = parent.parent; + + /* + * Verify that the node is an IIEF + */ + if ( + parent.type !== "CallExpression" || + parent.callee !== node) { + + return false; + } + + /* + * Navigate legal ancestors to determine whether this IIEF is outer + */ + while ( + stmt.type === "UnaryExpression" && ( + stmt.operator === "!" || + stmt.operator === "~" || + stmt.operator === "+" || + stmt.operator === "-") || + stmt.type === "AssignmentExpression" || + stmt.type === "LogicalExpression" || + stmt.type === "SequenceExpression" || + stmt.type === "VariableDeclarator") { + + stmt = stmt.parent; + } + + return (( + stmt.type === "ExpressionStatement" || + stmt.type === "VariableDeclaration") && + stmt.parent && stmt.parent.type === "Program" + ); + } + + /** + * Check indent for function block content + * @param {ASTNode} node A BlockStatement node that is inside of a function. + * @returns {void} + */ + function checkIndentInFunctionBlock(node) { + + /* + * Search first caller in chain. + * Ex.: + * + * Models <- Identifier + * .User + * .find() + * .exec(function() { + * // function body + * }); + * + * Looks for 'Models' + */ + const calleeNode = node.parent; // FunctionExpression + let indent; + + if (calleeNode.parent && + (calleeNode.parent.type === "Property" || + calleeNode.parent.type === "ArrayExpression")) { + + // If function is part of array or object, comma can be put at left + indent = getNodeIndent(calleeNode, false).goodChar; + } else { + + // If function is standalone, simple calculate indent + indent = getNodeIndent(calleeNode).goodChar; + } + + if (calleeNode.parent.type === "CallExpression") { + const calleeParent = calleeNode.parent; + + if (calleeNode.type !== "FunctionExpression" && calleeNode.type !== "ArrowFunctionExpression") { + if (calleeParent && calleeParent.loc.start.line < node.loc.start.line) { + indent = getNodeIndent(calleeParent).goodChar; + } + } else { + if (isArgBeforeCalleeNodeMultiline(calleeNode) && + calleeParent.callee.loc.start.line === calleeParent.callee.loc.end.line && + !isNodeFirstInLine(calleeNode)) { + indent = getNodeIndent(calleeParent).goodChar; + } + } + } + + /* + * function body indent should be indent + indent size, unless this + * is a FunctionDeclaration, FunctionExpression, or outer IIFE and the corresponding options are enabled. + */ + let functionOffset = indentSize; + + if (options.outerIIFEBody !== null && isOuterIIFE(calleeNode)) { + functionOffset = options.outerIIFEBody * indentSize; + } else if (calleeNode.type === "FunctionExpression") { + functionOffset = options.FunctionExpression.body * indentSize; + } else if (calleeNode.type === "FunctionDeclaration") { + functionOffset = options.FunctionDeclaration.body * indentSize; + } + indent += functionOffset; + + // check if the node is inside a variable + const parentVarNode = getVariableDeclaratorNode(node); + + if (parentVarNode && isNodeInVarOnTop(node, parentVarNode)) { + indent += indentSize * options.VariableDeclarator[parentVarNode.parent.kind]; + } + + if (node.body.length > 0) { + checkNodesIndent(node.body, indent); + } + + checkLastNodeLineIndent(node, indent - functionOffset); + } + + + /** + * Checks if the given node starts and ends on the same line + * @param {ASTNode} node The node to check + * @returns {boolean} Whether or not the block starts and ends on the same line. + */ + function isSingleLineNode(node) { + const lastToken = sourceCode.getLastToken(node), + startLine = node.loc.start.line, + endLine = lastToken.loc.end.line; + + return startLine === endLine; + } + + /** + * Check to see if the first element inside an array is an object and on the same line as the node + * If the node is not an array then it will return false. + * @param {ASTNode} node node to check + * @returns {boolean} success/failure + */ + function isFirstArrayElementOnSameLine(node) { + if (node.type === "ArrayExpression" && node.elements[0]) { + return node.elements[0].loc.start.line === node.loc.start.line && node.elements[0].type === "ObjectExpression"; + } + return false; + + } + + /** + * Check indent for array block content or object block content + * @param {ASTNode} node node to examine + * @returns {void} + */ + function checkIndentInArrayOrObjectBlock(node) { + + // Skip inline + if (isSingleLineNode(node)) { + return; + } + + let elements = (node.type === "ArrayExpression") ? node.elements : node.properties; + + // filter out empty elements example would be [ , 2] so remove first element as espree considers it as null + elements = elements.filter(elem => elem !== null); + + let nodeIndent; + let elementsIndent; + const parentVarNode = getVariableDeclaratorNode(node); + + // TODO - come up with a better strategy in future + if (isNodeFirstInLine(node)) { + const parent = node.parent; + + nodeIndent = getNodeIndent(parent).goodChar; + if (!parentVarNode || parentVarNode.loc.start.line !== node.loc.start.line) { + if (parent.type !== "VariableDeclarator" || parentVarNode === parentVarNode.parent.declarations[0]) { + if (parent.type === "VariableDeclarator" && parentVarNode.loc.start.line === parent.loc.start.line) { + nodeIndent += (indentSize * options.VariableDeclarator[parentVarNode.parent.kind]); + } else if (parent.type === "ObjectExpression" || parent.type === "ArrayExpression") { + const parentElements = node.parent.type === "ObjectExpression" ? node.parent.properties : node.parent.elements; + + if (parentElements[0] && + parentElements[0].loc.start.line === parent.loc.start.line && + parentElements[0].loc.end.line !== parent.loc.start.line) { + + /* + * If the first element of the array spans multiple lines, don't increase the expected indentation of the rest. + * e.g. [{ + * foo: 1 + * }, + * { + * bar: 1 + * }] + * the second object is not indented. + */ + } else if (typeof options[parent.type] === "number") { + nodeIndent += options[parent.type] * indentSize; + } else { + nodeIndent = parentElements[0].loc.start.column; + } + } else if (parent.type === "CallExpression" || parent.type === "NewExpression") { + if (typeof options.CallExpression.arguments === "number") { + nodeIndent += options.CallExpression.arguments * indentSize; + } else if (options.CallExpression.arguments === "first") { + if (parent.arguments.indexOf(node) !== -1) { + nodeIndent = parent.arguments[0].loc.start.column; + } + } else { + nodeIndent += indentSize; + } + } else if (parent.type === "LogicalExpression" || parent.type === "ArrowFunctionExpression") { + nodeIndent += indentSize; + } + } + } else if (!parentVarNode && !isFirstArrayElementOnSameLine(parent) && parent.type !== "MemberExpression" && parent.type !== "ExpressionStatement" && parent.type !== "AssignmentExpression" && parent.type !== "Property") { + nodeIndent += indentSize; + } + + checkFirstNodeLineIndent(node, nodeIndent); + } else { + nodeIndent = getNodeIndent(node).goodChar; + } + + if (options[node.type] === "first") { + elementsIndent = elements.length ? elements[0].loc.start.column : 0; // If there are no elements, elementsIndent doesn't matter. + } else { + elementsIndent = nodeIndent + indentSize * options[node.type]; + } + + /* + * Check if the node is a multiple variable declaration; if so, then + * make sure indentation takes that into account. + */ + if (isNodeInVarOnTop(node, parentVarNode)) { + elementsIndent += indentSize * options.VariableDeclarator[parentVarNode.parent.kind]; + } + + checkNodesIndent(elements, elementsIndent); + + if (elements.length > 0) { + + // Skip last block line check if last item in same line + if (elements[elements.length - 1].loc.end.line === node.loc.end.line) { + return; + } + } + + checkLastNodeLineIndent(node, nodeIndent + + (isNodeInVarOnTop(node, parentVarNode) ? options.VariableDeclarator[parentVarNode.parent.kind] * indentSize : 0)); + } + + /** + * Check if the node or node body is a BlockStatement or not + * @param {ASTNode} node node to test + * @returns {boolean} True if it or its body is a block statement + */ + function isNodeBodyBlock(node) { + return node.type === "BlockStatement" || node.type === "ClassBody" || (node.body && node.body.type === "BlockStatement") || + (node.consequent && node.consequent.type === "BlockStatement"); + } + + /** + * Check indentation for blocks + * @param {ASTNode} node node to check + * @returns {void} + */ + function blockIndentationCheck(node) { + + // Skip inline blocks + if (isSingleLineNode(node)) { + return; + } + + if (node.parent && ( + node.parent.type === "FunctionExpression" || + node.parent.type === "FunctionDeclaration" || + node.parent.type === "ArrowFunctionExpression") + ) { + checkIndentInFunctionBlock(node); + return; + } + + let indent; + let nodesToCheck = []; + + /* + * For this statements we should check indent from statement beginning, + * not from the beginning of the block. + */ + const statementsWithProperties = [ + "IfStatement", "WhileStatement", "ForStatement", "ForInStatement", "ForOfStatement", "DoWhileStatement", "ClassDeclaration", "TryStatement" + ]; + + if (node.parent && statementsWithProperties.indexOf(node.parent.type) !== -1 && isNodeBodyBlock(node)) { + indent = getNodeIndent(node.parent).goodChar; + } else if (node.parent && node.parent.type === "CatchClause") { + indent = getNodeIndent(node.parent.parent).goodChar; + } else { + indent = getNodeIndent(node).goodChar; + } + + if (node.type === "IfStatement" && node.consequent.type !== "BlockStatement") { + nodesToCheck = [node.consequent]; + } else if (Array.isArray(node.body)) { + nodesToCheck = node.body; + } else { + nodesToCheck = [node.body]; + } + + if (nodesToCheck.length > 0) { + checkNodesIndent(nodesToCheck, indent + indentSize); + } + + if (node.type === "BlockStatement") { + checkLastNodeLineIndent(node, indent); + } + } + + /** + * Filter out the elements which are on the same line of each other or the node. + * basically have only 1 elements from each line except the variable declaration line. + * @param {ASTNode} node Variable declaration node + * @returns {ASTNode[]} Filtered elements + */ + function filterOutSameLineVars(node) { + return node.declarations.reduce((finalCollection, elem) => { + const lastElem = finalCollection[finalCollection.length - 1]; + + if ((elem.loc.start.line !== node.loc.start.line && !lastElem) || + (lastElem && lastElem.loc.start.line !== elem.loc.start.line)) { + finalCollection.push(elem); + } + + return finalCollection; + }, []); + } + + /** + * Check indentation for variable declarations + * @param {ASTNode} node node to examine + * @returns {void} + */ + function checkIndentInVariableDeclarations(node) { + const elements = filterOutSameLineVars(node); + const nodeIndent = getNodeIndent(node).goodChar; + const lastElement = elements[elements.length - 1]; + + const elementsIndent = nodeIndent + indentSize * options.VariableDeclarator[node.kind]; + + checkNodesIndent(elements, elementsIndent); + + // Only check the last line if there is any token after the last item + if (sourceCode.getLastToken(node).loc.end.line <= lastElement.loc.end.line) { + return; + } + + const tokenBeforeLastElement = sourceCode.getTokenBefore(lastElement); + + if (tokenBeforeLastElement.value === ",") { + + // Special case for comma-first syntax where the semicolon is indented + checkLastNodeLineIndent(node, getNodeIndent(tokenBeforeLastElement).goodChar); + } else { + checkLastNodeLineIndent(node, elementsIndent - indentSize); + } + } + + /** + * Check and decide whether to check for indentation for blockless nodes + * Scenarios are for or while statements without braces around them + * @param {ASTNode} node node to examine + * @returns {void} + */ + function blockLessNodes(node) { + if (node.body.type !== "BlockStatement") { + blockIndentationCheck(node); + } + } + + /** + * Returns the expected indentation for the case statement + * @param {ASTNode} node node to examine + * @param {int} [switchIndent] indent for switch statement + * @returns {int} indent size + */ + function expectedCaseIndent(node, switchIndent) { + const switchNode = (node.type === "SwitchStatement") ? node : node.parent; + let caseIndent; + + if (caseIndentStore[switchNode.loc.start.line]) { + return caseIndentStore[switchNode.loc.start.line]; + } + if (typeof switchIndent === "undefined") { + switchIndent = getNodeIndent(switchNode).goodChar; + } + + if (switchNode.cases.length > 0 && options.SwitchCase === 0) { + caseIndent = switchIndent; + } else { + caseIndent = switchIndent + (indentSize * options.SwitchCase); + } + + caseIndentStore[switchNode.loc.start.line] = caseIndent; + return caseIndent; + + } + + /** + * Checks wether a return statement is wrapped in () + * @param {ASTNode} node node to examine + * @returns {boolean} the result + */ + function isWrappedInParenthesis(node) { + const regex = /^return\s*?\(\s*?\);*?/; + + const statementWithoutArgument = sourceCode.getText(node).replace( + sourceCode.getText(node.argument), "" + ); + + return regex.test(statementWithoutArgument); + } + + return { + Program(node) { + if (node.body.length > 0) { + + // Root nodes should have no indent + checkNodesIndent(node.body, getNodeIndent(node).goodChar); + } + }, + + ClassBody: blockIndentationCheck, + + BlockStatement: blockIndentationCheck, + + WhileStatement: blockLessNodes, + + ForStatement: blockLessNodes, + + ForInStatement: blockLessNodes, + + ForOfStatement: blockLessNodes, + + DoWhileStatement: blockLessNodes, + + IfStatement(node) { + if (node.consequent.type !== "BlockStatement" && node.consequent.loc.start.line > node.loc.start.line) { + blockIndentationCheck(node); + } + }, + + VariableDeclaration(node) { + if (node.declarations[node.declarations.length - 1].loc.start.line > node.declarations[0].loc.start.line) { + checkIndentInVariableDeclarations(node); + } + }, + + ObjectExpression(node) { + checkIndentInArrayOrObjectBlock(node); + }, + + ArrayExpression(node) { + checkIndentInArrayOrObjectBlock(node); + }, + + MemberExpression(node) { + + if (typeof options.MemberExpression === "undefined") { + return; + } + + if (isSingleLineNode(node)) { + return; + } + + /* + * The typical layout of variable declarations and assignments + * alter the expectation of correct indentation. Skip them. + * TODO: Add appropriate configuration options for variable + * declarations and assignments. + */ + if (getParentNodeByType(node, "VariableDeclarator", ["FunctionExpression", "ArrowFunctionExpression"])) { + return; + } + + if (getParentNodeByType(node, "AssignmentExpression", ["FunctionExpression"])) { + return; + } + + const propertyIndent = getNodeIndent(node).goodChar + indentSize * options.MemberExpression; + + const checkNodes = [node.property]; + + const dot = sourceCode.getTokenBefore(node.property); + + if (dot.type === "Punctuator" && dot.value === ".") { + checkNodes.push(dot); + } + + checkNodesIndent(checkNodes, propertyIndent); + }, + + SwitchStatement(node) { + + // Switch is not a 'BlockStatement' + const switchIndent = getNodeIndent(node).goodChar; + const caseIndent = expectedCaseIndent(node, switchIndent); + + checkNodesIndent(node.cases, caseIndent); + + + checkLastNodeLineIndent(node, switchIndent); + }, + + SwitchCase(node) { + + // Skip inline cases + if (isSingleLineNode(node)) { + return; + } + const caseIndent = expectedCaseIndent(node); + + checkNodesIndent(node.consequent, caseIndent + indentSize); + }, + + FunctionDeclaration(node) { + if (isSingleLineNode(node)) { + return; + } + if (options.FunctionDeclaration.parameters === "first" && node.params.length) { + checkNodesIndent(node.params.slice(1), node.params[0].loc.start.column); + } else if (options.FunctionDeclaration.parameters !== null) { + checkNodesIndent(node.params, getNodeIndent(node).goodChar + indentSize * options.FunctionDeclaration.parameters); + } + }, + + FunctionExpression(node) { + if (isSingleLineNode(node)) { + return; + } + if (options.FunctionExpression.parameters === "first" && node.params.length) { + checkNodesIndent(node.params.slice(1), node.params[0].loc.start.column); + } else if (options.FunctionExpression.parameters !== null) { + checkNodesIndent(node.params, getNodeIndent(node).goodChar + indentSize * options.FunctionExpression.parameters); + } + }, + + ReturnStatement(node) { + if (isSingleLineNode(node)) { + return; + } + + const firstLineIndent = getNodeIndent(node).goodChar; + + // in case if return statement is wrapped in parenthesis + if (isWrappedInParenthesis(node)) { + checkLastReturnStatementLineIndent(node, firstLineIndent); + } else { + checkNodeIndent(node, firstLineIndent); + } + }, + + CallExpression(node) { + if (isSingleLineNode(node)) { + return; + } + if (options.CallExpression.arguments === "first" && node.arguments.length) { + checkNodesIndent(node.arguments.slice(1), node.arguments[0].loc.start.column); + } else if (options.CallExpression.arguments !== null) { + checkNodesIndent(node.arguments, getNodeIndent(node).goodChar + indentSize * options.CallExpression.arguments); + } + } + + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/indent.js b/node_modules/eslint/lib/rules/indent.js new file mode 100644 index 0000000..acc5246 --- /dev/null +++ b/node_modules/eslint/lib/rules/indent.js @@ -0,0 +1,1533 @@ +/** + * @fileoverview This option sets a specific tab width for your code + * + * @author Teddy Katz + * @author Vitaly Puzrin + * @author Gyandeep Singh + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const lodash = require("lodash"); +const astUtils = require("../ast-utils"); +const createTree = require("functional-red-black-tree"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +const KNOWN_NODES = new Set([ + "AssignmentExpression", + "AssignmentPattern", + "ArrayExpression", + "ArrayPattern", + "ArrowFunctionExpression", + "AwaitExpression", + "BlockStatement", + "BinaryExpression", + "BreakStatement", + "CallExpression", + "CatchClause", + "ClassBody", + "ClassDeclaration", + "ClassExpression", + "ConditionalExpression", + "ContinueStatement", + "DoWhileStatement", + "DebuggerStatement", + "EmptyStatement", + "ExperimentalRestProperty", + "ExperimentalSpreadProperty", + "ExpressionStatement", + "ForStatement", + "ForInStatement", + "ForOfStatement", + "FunctionDeclaration", + "FunctionExpression", + "Identifier", + "IfStatement", + "Literal", + "LabeledStatement", + "LogicalExpression", + "MemberExpression", + "MetaProperty", + "MethodDefinition", + "NewExpression", + "ObjectExpression", + "ObjectPattern", + "Program", + "Property", + "RestElement", + "ReturnStatement", + "SequenceExpression", + "SpreadElement", + "Super", + "SwitchCase", + "SwitchStatement", + "TaggedTemplateExpression", + "TemplateElement", + "TemplateLiteral", + "ThisExpression", + "ThrowStatement", + "TryStatement", + "UnaryExpression", + "UpdateExpression", + "VariableDeclaration", + "VariableDeclarator", + "WhileStatement", + "WithStatement", + "YieldExpression", + "JSXIdentifier", + "JSXNamespacedName", + "JSXMemberExpression", + "JSXEmptyExpression", + "JSXExpressionContainer", + "JSXElement", + "JSXClosingElement", + "JSXOpeningElement", + "JSXAttribute", + "JSXSpreadAttribute", + "JSXText", + "ExportDefaultDeclaration", + "ExportNamedDeclaration", + "ExportAllDeclaration", + "ExportSpecifier", + "ImportDeclaration", + "ImportSpecifier", + "ImportDefaultSpecifier", + "ImportNamespaceSpecifier" +]); + +/* + * General rule strategy: + * 1. An OffsetStorage instance stores a map of desired offsets, where each token has a specified offset from another + * specified token or to the first column. + * 2. As the AST is traversed, modify the desired offsets of tokens accordingly. For example, when entering a + * BlockStatement, offset all of the tokens in the BlockStatement by 1 indent level from the opening curly + * brace of the BlockStatement. + * 3. After traversing the AST, calculate the expected indentation levels of every token according to the + * OffsetStorage container. + * 4. For each line, compare the expected indentation of the first token to the actual indentation in the file, + * and report the token if the two values are not equal. + */ + + +/** + * A mutable balanced binary search tree that stores (key, value) pairs. The keys are numeric, and must be unique. + * This is intended to be a generic wrapper around a balanced binary search tree library, so that the underlying implementation + * can easily be swapped out. + */ +class BinarySearchTree { + + /** + * Creates an empty tree + */ + constructor() { + this._rbTree = createTree(); + } + + /** + * Inserts an entry into the tree. + * @param {number} key The entry's key + * @param {*} value The entry's value + * @returns {void} + */ + insert(key, value) { + const iterator = this._rbTree.find(key); + + if (iterator.valid) { + this._rbTree = iterator.update(value); + } else { + this._rbTree = this._rbTree.insert(key, value); + } + } + + /** + * Finds the entry with the largest key less than or equal to the provided key + * @param {number} key The provided key + * @returns {{key: number, value: *}|null} The found entry, or null if no such entry exists. + */ + findLe(key) { + const iterator = this._rbTree.le(key); + + return iterator && { key: iterator.key, value: iterator.value }; + } + + /** + * Deletes all of the keys in the interval [start, end) + * @param {number} start The start of the range + * @param {number} end The end of the range + * @returns {void} + */ + deleteRange(start, end) { + + // Exit without traversing the tree if the range has zero size. + if (start === end) { + return; + } + const iterator = this._rbTree.ge(start); + + while (iterator.valid && iterator.key < end) { + this._rbTree = this._rbTree.remove(iterator.key); + iterator.next(); + } + } +} + +/** + * A helper class to get token-based info related to indentation + */ +class TokenInfo { + + /** + * @param {SourceCode} sourceCode A SourceCode object + */ + constructor(sourceCode) { + this.sourceCode = sourceCode; + this.firstTokensByLineNumber = sourceCode.tokensAndComments.reduce((map, token) => { + if (!map.has(token.loc.start.line)) { + map.set(token.loc.start.line, token); + } + if (!map.has(token.loc.end.line) && sourceCode.text.slice(token.range[1] - token.loc.end.column, token.range[1]).trim()) { + map.set(token.loc.end.line, token); + } + return map; + }, new Map()); + } + + /** + * Gets the first token on a given token's line + * @param {Token|ASTNode} token a node or token + * @returns {Token} The first token on the given line + */ + getFirstTokenOfLine(token) { + return this.firstTokensByLineNumber.get(token.loc.start.line); + } + + /** + * Determines whether a token is the first token in its line + * @param {Token} token The token + * @returns {boolean} `true` if the token is the first on its line + */ + isFirstTokenOfLine(token) { + return this.getFirstTokenOfLine(token) === token; + } + + /** + * Get the actual indent of a token + * @param {Token} token Token to examine. This should be the first token on its line. + * @returns {string} The indentation characters that precede the token + */ + getTokenIndent(token) { + return this.sourceCode.text.slice(token.range[0] - token.loc.start.column, token.range[0]); + } +} + +/** + * A class to store information on desired offsets of tokens from each other + */ +class OffsetStorage { + + /** + * @param {TokenInfo} tokenInfo a TokenInfo instance + * @param {number} indentSize The desired size of each indentation level + * @param {string} indentType The indentation character + */ + constructor(tokenInfo, indentSize, indentType) { + this._tokenInfo = tokenInfo; + this._indentSize = indentSize; + this._indentType = indentType; + + this._tree = new BinarySearchTree(); + this._tree.insert(0, { offset: 0, from: null, force: false }); + + this._lockedFirstTokens = new WeakMap(); + this._desiredIndentCache = new WeakMap(); + this._ignoredTokens = new WeakSet(); + } + + _getOffsetDescriptor(token) { + return this._tree.findLe(token.range[0]).value; + } + + /** + * Sets the offset column of token B to match the offset column of token A. + * **WARNING**: This matches a *column*, even if baseToken is not the first token on its line. In + * most cases, `setDesiredOffset` should be used instead. + * @param {Token} baseToken The first token + * @param {Token} offsetToken The second token, whose offset should be matched to the first token + * @returns {void} + */ + matchOffsetOf(baseToken, offsetToken) { + + /* + * lockedFirstTokens is a map from a token whose indentation is controlled by the "first" option to + * the token that it depends on. For example, with the `ArrayExpression: first` option, the first + * token of each element in the array after the first will be mapped to the first token of the first + * element. The desired indentation of each of these tokens is computed based on the desired indentation + * of the "first" element, rather than through the normal offset mechanism. + */ + this._lockedFirstTokens.set(offsetToken, baseToken); + } + + /** + * Sets the desired offset of a token. + * + * This uses a line-based offset collapsing behavior to handle tokens on the same line. + * For example, consider the following two cases: + * + * ( + * [ + * bar + * ] + * ) + * + * ([ + * bar + * ]) + * + * Based on the first case, it's clear that the `bar` token needs to have an offset of 1 indent level (4 spaces) from + * the `[` token, and the `[` token has to have an offset of 1 indent level from the `(` token. Since the `(` token is + * the first on its line (with an indent of 0 spaces), the `bar` token needs to be offset by 2 indent levels (8 spaces) + * from the start of its line. + * + * However, in the second case `bar` should only be indented by 4 spaces. This is because the offset of 1 indent level + * between the `(` and the `[` tokens gets "collapsed" because the two tokens are on the same line. As a result, the + * `(` token is mapped to the `[` token with an offset of 0, and the rule correctly decides that `bar` should be indented + * by 1 indent level from the start of the line. + * + * This is useful because rule listeners can usually just call `setDesiredOffset` for all the tokens in the node, + * without needing to check which lines those tokens are on. + * + * Note that since collapsing only occurs when two tokens are on the same line, there are a few cases where non-intuitive + * behavior can occur. For example, consider the following cases: + * + * foo( + * ). + * bar( + * baz + * ) + * + * foo( + * ).bar( + * baz + * ) + * + * Based on the first example, it would seem that `bar` should be offset by 1 indent level from `foo`, and `baz` + * should be offset by 1 indent level from `bar`. However, this is not correct, because it would result in `baz` + * being indented by 2 indent levels in the second case (since `foo`, `bar`, and `baz` are all on separate lines, no + * collapsing would occur). + * + * Instead, the correct way would be to offset `baz` by 1 level from `bar`, offset `bar` by 1 level from the `)`, and + * offset the `)` by 0 levels from `foo`. This ensures that the offset between `bar` and the `)` are correctly collapsed + * in the second case. + * + * @param {Token} token The token + * @param {Token} fromToken The token that `token` should be offset from + * @param {number} offset The desired indent level + * @returns {void} + */ + setDesiredOffset(token, fromToken, offset) { + return this.setDesiredOffsets(token.range, fromToken, offset); + } + + /** + * Sets the desired offset of all tokens in a range + * It's common for node listeners in this file to need to apply the same offset to a large, contiguous range of tokens. + * Moreover, the offset of any given token is usually updated multiple times (roughly once for each node that contains + * it). This means that the offset of each token is updated O(AST depth) times. + * It would not be performant to store and update the offsets for each token independently, because the rule would end + * up having a time complexity of O(number of tokens * AST depth), which is quite slow for large files. + * + * Instead, the offset tree is represented as a collection of contiguous offset ranges in a file. For example, the following + * list could represent the state of the offset tree at a given point: + * + * * Tokens starting in the interval [0, 15) are aligned with the beginning of the file + * * Tokens starting in the interval [15, 30) are offset by 1 indent level from the `bar` token + * * Tokens starting in the interval [30, 43) are offset by 1 indent level from the `foo` token + * * Tokens starting in the interval [43, 820) are offset by 2 indent levels from the `bar` token + * * Tokens starting in the interval [820, ∞) are offset by 1 indent level from the `baz` token + * + * The `setDesiredOffsets` methods inserts ranges like the ones above. The third line above would be inserted by using: + * `setDesiredOffsets([30, 43], fooToken, 1);` + * + * @param {[number, number]} range A [start, end] pair. All tokens with range[0] <= token.start < range[1] will have the offset applied. + * @param {Token} fromToken The token that this is offset from + * @param {number} offset The desired indent level + * @param {boolean} force `true` if this offset should not use the normal collapsing behavior. This should almost always be false. + * @returns {void} + */ + setDesiredOffsets(range, fromToken, offset, force) { + + /* + * Offset ranges are stored as a collection of nodes, where each node maps a numeric key to an offset + * descriptor. The tree for the example above would have the following nodes: + * + * * key: 0, value: { offset: 0, from: null } + * * key: 15, value: { offset: 1, from: barToken } + * * key: 30, value: { offset: 1, from: fooToken } + * * key: 43, value: { offset: 2, from: barToken } + * * key: 820, value: { offset: 1, from: bazToken } + * + * To find the offset descriptor for any given token, one needs to find the node with the largest key + * which is <= token.start. To make this operation fast, the nodes are stored in a balanced binary + * search tree indexed by key. + */ + + const descriptorToInsert = { offset, from: fromToken, force }; + + const descriptorAfterRange = this._tree.findLe(range[1]).value; + + const fromTokenIsInRange = fromToken && fromToken.range[0] >= range[0] && fromToken.range[1] <= range[1]; + const fromTokenDescriptor = fromTokenIsInRange && this._getOffsetDescriptor(fromToken); + + // First, remove any existing nodes in the range from the tree. + this._tree.deleteRange(range[0] + 1, range[1]); + + // Insert a new node into the tree for this range + this._tree.insert(range[0], descriptorToInsert); + + /* + * To avoid circular offset dependencies, keep the `fromToken` token mapped to whatever it was mapped to previously, + * even if it's in the current range. + */ + if (fromTokenIsInRange) { + this._tree.insert(fromToken.range[0], fromTokenDescriptor); + this._tree.insert(fromToken.range[1], descriptorToInsert); + } + + /* + * To avoid modifying the offset of tokens after the range, insert another node to keep the offset of the following + * tokens the same as it was before. + */ + this._tree.insert(range[1], descriptorAfterRange); + } + + /** + * Gets the desired indent of a token + * @param {Token} token The token + * @returns {string} The desired indent of the token + */ + getDesiredIndent(token) { + if (!this._desiredIndentCache.has(token)) { + + if (this._ignoredTokens.has(token)) { + + /* + * If the token is ignored, use the actual indent of the token as the desired indent. + * This ensures that no errors are reported for this token. + */ + this._desiredIndentCache.set( + token, + this._tokenInfo.getTokenIndent(token) + ); + } else if (this._lockedFirstTokens.has(token)) { + const firstToken = this._lockedFirstTokens.get(token); + + this._desiredIndentCache.set( + token, + + // (indentation for the first element's line) + this.getDesiredIndent(this._tokenInfo.getFirstTokenOfLine(firstToken)) + + + // (space between the start of the first element's line and the first element) + this._indentType.repeat(firstToken.loc.start.column - this._tokenInfo.getFirstTokenOfLine(firstToken).loc.start.column) + ); + } else { + const offsetInfo = this._getOffsetDescriptor(token); + const offset = ( + offsetInfo.from && + offsetInfo.from.loc.start.line === token.loc.start.line && + !/^\s*?\n/.test(token.value) && + !offsetInfo.force + ) ? 0 : offsetInfo.offset * this._indentSize; + + this._desiredIndentCache.set( + token, + (offsetInfo.from ? this.getDesiredIndent(offsetInfo.from) : "") + this._indentType.repeat(offset) + ); + } + } + return this._desiredIndentCache.get(token); + } + + /** + * Ignores a token, preventing it from being reported. + * @param {Token} token The token + * @returns {void} + */ + ignoreToken(token) { + if (this._tokenInfo.isFirstTokenOfLine(token)) { + this._ignoredTokens.add(token); + } + } + + /** + * Gets the first token that the given token's indentation is dependent on + * @param {Token} token The token + * @returns {Token} The token that the given token depends on, or `null` if the given token is at the top level + */ + getFirstDependency(token) { + return this._getOffsetDescriptor(token).from; + } +} + +const ELEMENT_LIST_SCHEMA = { + oneOf: [ + { + type: "integer", + minimum: 0 + }, + { + enum: ["first", "off"] + } + ] +}; + +module.exports = { + meta: { + docs: { + description: "enforce consistent indentation", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/indent" + }, + + fixable: "whitespace", + + schema: [ + { + oneOf: [ + { + enum: ["tab"] + }, + { + type: "integer", + minimum: 0 + } + ] + }, + { + type: "object", + properties: { + SwitchCase: { + type: "integer", + minimum: 0 + }, + VariableDeclarator: { + oneOf: [ + { + type: "integer", + minimum: 0 + }, + { + type: "object", + properties: { + var: { + type: "integer", + minimum: 0 + }, + let: { + type: "integer", + minimum: 0 + }, + const: { + type: "integer", + minimum: 0 + } + }, + additionalProperties: false + } + ] + }, + outerIIFEBody: { + type: "integer", + minimum: 0 + }, + MemberExpression: { + oneOf: [ + { + type: "integer", + minimum: 0 + }, + { + enum: ["off"] + } + ] + }, + FunctionDeclaration: { + type: "object", + properties: { + parameters: ELEMENT_LIST_SCHEMA, + body: { + type: "integer", + minimum: 0 + } + }, + additionalProperties: false + }, + FunctionExpression: { + type: "object", + properties: { + parameters: ELEMENT_LIST_SCHEMA, + body: { + type: "integer", + minimum: 0 + } + }, + additionalProperties: false + }, + CallExpression: { + type: "object", + properties: { + arguments: ELEMENT_LIST_SCHEMA + }, + additionalProperties: false + }, + ArrayExpression: ELEMENT_LIST_SCHEMA, + ObjectExpression: ELEMENT_LIST_SCHEMA, + ImportDeclaration: ELEMENT_LIST_SCHEMA, + flatTernaryExpressions: { + type: "boolean" + }, + ignoredNodes: { + type: "array", + items: { + type: "string", + not: { + pattern: ":exit$" + } + } + }, + ignoreComments: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + const DEFAULT_VARIABLE_INDENT = 1; + const DEFAULT_PARAMETER_INDENT = 1; + const DEFAULT_FUNCTION_BODY_INDENT = 1; + + let indentType = "space"; + let indentSize = 4; + const options = { + SwitchCase: 0, + VariableDeclarator: { + var: DEFAULT_VARIABLE_INDENT, + let: DEFAULT_VARIABLE_INDENT, + const: DEFAULT_VARIABLE_INDENT + }, + outerIIFEBody: 1, + FunctionDeclaration: { + parameters: DEFAULT_PARAMETER_INDENT, + body: DEFAULT_FUNCTION_BODY_INDENT + }, + FunctionExpression: { + parameters: DEFAULT_PARAMETER_INDENT, + body: DEFAULT_FUNCTION_BODY_INDENT + }, + CallExpression: { + arguments: DEFAULT_PARAMETER_INDENT + }, + MemberExpression: 1, + ArrayExpression: 1, + ObjectExpression: 1, + ImportDeclaration: 1, + flatTernaryExpressions: false, + ignoredNodes: [], + ignoreComments: false + }; + + if (context.options.length) { + if (context.options[0] === "tab") { + indentSize = 1; + indentType = "tab"; + } else { + indentSize = context.options[0]; + indentType = "space"; + } + + if (context.options[1]) { + lodash.merge(options, context.options[1]); + + if (typeof options.VariableDeclarator === "number") { + options.VariableDeclarator = { + var: options.VariableDeclarator, + let: options.VariableDeclarator, + const: options.VariableDeclarator + }; + } + } + } + + const sourceCode = context.getSourceCode(); + const tokenInfo = new TokenInfo(sourceCode); + const offsets = new OffsetStorage(tokenInfo, indentSize, indentType === "space" ? " " : "\t"); + const parameterParens = new WeakSet(); + + /** + * Creates an error message for a line, given the expected/actual indentation. + * @param {int} expectedAmount The expected amount of indentation characters for this line + * @param {int} actualSpaces The actual number of indentation spaces that were found on this line + * @param {int} actualTabs The actual number of indentation tabs that were found on this line + * @returns {string} An error message for this line + */ + function createErrorMessage(expectedAmount, actualSpaces, actualTabs) { + const expectedStatement = `${expectedAmount} ${indentType}${expectedAmount === 1 ? "" : "s"}`; // e.g. "2 tabs" + const foundSpacesWord = `space${actualSpaces === 1 ? "" : "s"}`; // e.g. "space" + const foundTabsWord = `tab${actualTabs === 1 ? "" : "s"}`; // e.g. "tabs" + let foundStatement; + + if (actualSpaces > 0) { + + /* + * Abbreviate the message if the expected indentation is also spaces. + * e.g. 'Expected 4 spaces but found 2' rather than 'Expected 4 spaces but found 2 spaces' + */ + foundStatement = indentType === "space" ? actualSpaces : `${actualSpaces} ${foundSpacesWord}`; + } else if (actualTabs > 0) { + foundStatement = indentType === "tab" ? actualTabs : `${actualTabs} ${foundTabsWord}`; + } else { + foundStatement = "0"; + } + + return `Expected indentation of ${expectedStatement} but found ${foundStatement}.`; + } + + /** + * Reports a given indent violation + * @param {Token} token Token violating the indent rule + * @param {string} neededIndent Expected indentation string + * @returns {void} + */ + function report(token, neededIndent) { + const actualIndent = Array.from(tokenInfo.getTokenIndent(token)); + const numSpaces = actualIndent.filter(char => char === " ").length; + const numTabs = actualIndent.filter(char => char === "\t").length; + + context.report({ + node: token, + message: createErrorMessage(neededIndent.length, numSpaces, numTabs), + loc: { + start: { line: token.loc.start.line, column: 0 }, + end: { line: token.loc.start.line, column: token.loc.start.column } + }, + fix(fixer) { + const range = [token.range[0] - token.loc.start.column, token.range[0]]; + const newText = neededIndent; + + return fixer.replaceTextRange(range, newText); + } + }); + } + + /** + * Checks if a token's indentation is correct + * @param {Token} token Token to examine + * @param {string} desiredIndent Desired indentation of the string + * @returns {boolean} `true` if the token's indentation is correct + */ + function validateTokenIndent(token, desiredIndent) { + const indentation = tokenInfo.getTokenIndent(token); + + return indentation === desiredIndent || + + // To avoid conflicts with no-mixed-spaces-and-tabs, don't report mixed spaces and tabs. + indentation.includes(" ") && indentation.includes("\t"); + } + + /** + * Check to see if the node is a file level IIFE + * @param {ASTNode} node The function node to check. + * @returns {boolean} True if the node is the outer IIFE + */ + function isOuterIIFE(node) { + + /* + * Verify that the node is an IIFE + */ + if (!node.parent || node.parent.type !== "CallExpression" || node.parent.callee !== node) { + return false; + } + + /* + * Navigate legal ancestors to determine whether this IIFE is outer. + * A "legal ancestor" is an expression or statement that causes the function to get executed immediately. + * For example, `!(function(){})()` is an outer IIFE even though it is preceded by a ! operator. + */ + let statement = node.parent && node.parent.parent; + + while ( + statement.type === "UnaryExpression" && ["!", "~", "+", "-"].indexOf(statement.operator) > -1 || + statement.type === "AssignmentExpression" || + statement.type === "LogicalExpression" || + statement.type === "SequenceExpression" || + statement.type === "VariableDeclarator" + ) { + statement = statement.parent; + } + + return (statement.type === "ExpressionStatement" || statement.type === "VariableDeclaration") && statement.parent.type === "Program"; + } + + /** + * Check indentation for lists of elements (arrays, objects, function params) + * @param {ASTNode[]} elements List of elements that should be offset + * @param {Token} startToken The start token of the list that element should be aligned against, e.g. '[' + * @param {Token} endToken The end token of the list, e.g. ']' + * @param {number|string} offset The amount that the elements should be offset + * @returns {void} + */ + function addElementListIndent(elements, startToken, endToken, offset) { + + /** + * Gets the first token of a given element, including surrounding parentheses. + * @param {ASTNode} element A node in the `elements` list + * @returns {Token} The first token of this element + */ + function getFirstToken(element) { + let token = sourceCode.getTokenBefore(element); + + while (astUtils.isOpeningParenToken(token) && token !== startToken) { + token = sourceCode.getTokenBefore(token); + } + return sourceCode.getTokenAfter(token); + } + + // Run through all the tokens in the list, and offset them by one indent level (mainly for comments, other things will end up overridden) + offsets.setDesiredOffsets( + [startToken.range[1], endToken.range[0]], + startToken, + typeof offset === "number" ? offset : 1 + ); + offsets.setDesiredOffset(endToken, startToken, 0); + + // If the preference is "first" but there is no first element (e.g. sparse arrays w/ empty first slot), fall back to 1 level. + if (offset === "first" && elements.length && !elements[0]) { + return; + } + elements.forEach((element, index) => { + if (!element) { + + // Skip holes in arrays + return; + } + if (offset === "off") { + + // Ignore the first token of every element if the "off" option is used + offsets.ignoreToken(getFirstToken(element)); + } + + // Offset the following elements correctly relative to the first element + if (index === 0) { + return; + } + if (offset === "first" && tokenInfo.isFirstTokenOfLine(getFirstToken(element))) { + offsets.matchOffsetOf(getFirstToken(elements[0]), getFirstToken(element)); + } else { + const previousElement = elements[index - 1]; + const firstTokenOfPreviousElement = previousElement && getFirstToken(previousElement); + + if (previousElement && sourceCode.getLastToken(previousElement).loc.end.line > startToken.loc.end.line) { + offsets.setDesiredOffsets(element.range, firstTokenOfPreviousElement, 0); + } + } + }); + } + + /** + * Check and decide whether to check for indentation for blockless nodes + * Scenarios are for or while statements without braces around them + * @param {ASTNode} node node to examine + * @returns {void} + */ + function addBlocklessNodeIndent(node) { + if (node.type !== "BlockStatement") { + const lastParentToken = sourceCode.getTokenBefore(node, astUtils.isNotOpeningParenToken); + + let firstBodyToken = sourceCode.getFirstToken(node); + let lastBodyToken = sourceCode.getLastToken(node); + + while ( + astUtils.isOpeningParenToken(sourceCode.getTokenBefore(firstBodyToken)) && + astUtils.isClosingParenToken(sourceCode.getTokenAfter(lastBodyToken)) + ) { + firstBodyToken = sourceCode.getTokenBefore(firstBodyToken); + lastBodyToken = sourceCode.getTokenAfter(lastBodyToken); + } + + offsets.setDesiredOffsets([firstBodyToken.range[0], lastBodyToken.range[1]], lastParentToken, 1); + + /* + * For blockless nodes with semicolon-first style, don't indent the semicolon. + * e.g. + * if (foo) bar() + * ; [1, 2, 3].map(foo) + */ + const lastToken = sourceCode.getLastToken(node); + + if (node.type !== "EmptyStatement" && astUtils.isSemicolonToken(lastToken)) { + offsets.setDesiredOffset(lastToken, lastParentToken, 0); + } + } + } + + /** + * Checks the indentation for nodes that are like function calls (`CallExpression` and `NewExpression`) + * @param {ASTNode} node A CallExpression or NewExpression node + * @returns {void} + */ + function addFunctionCallIndent(node) { + let openingParen; + + if (node.arguments.length) { + openingParen = sourceCode.getFirstTokenBetween(node.callee, node.arguments[0], astUtils.isOpeningParenToken); + } else { + openingParen = sourceCode.getLastToken(node, 1); + } + const closingParen = sourceCode.getLastToken(node); + + parameterParens.add(openingParen); + parameterParens.add(closingParen); + offsets.setDesiredOffset(openingParen, sourceCode.getTokenBefore(openingParen), 0); + + addElementListIndent(node.arguments, openingParen, closingParen, options.CallExpression.arguments); + } + + /** + * Checks the indentation of parenthesized values, given a list of tokens in a program + * @param {Token[]} tokens A list of tokens + * @returns {void} + */ + function addParensIndent(tokens) { + const parenStack = []; + const parenPairs = []; + + tokens.forEach(nextToken => { + + // Accumulate a list of parenthesis pairs + if (astUtils.isOpeningParenToken(nextToken)) { + parenStack.push(nextToken); + } else if (astUtils.isClosingParenToken(nextToken)) { + parenPairs.unshift({ left: parenStack.pop(), right: nextToken }); + } + }); + + parenPairs.forEach(pair => { + const leftParen = pair.left; + const rightParen = pair.right; + + // We only want to handle parens around expressions, so exclude parentheses that are in function parameters and function call arguments. + if (!parameterParens.has(leftParen) && !parameterParens.has(rightParen)) { + const parenthesizedTokens = new Set(sourceCode.getTokensBetween(leftParen, rightParen)); + + parenthesizedTokens.forEach(token => { + if (!parenthesizedTokens.has(offsets.getFirstDependency(token))) { + offsets.setDesiredOffset(token, leftParen, 1); + } + }); + } + + offsets.setDesiredOffset(rightParen, leftParen, 0); + }); + } + + /** + * Ignore all tokens within an unknown node whose offset do not depend + * on another token's offset within the unknown node + * @param {ASTNode} node Unknown Node + * @returns {void} + */ + function ignoreNode(node) { + const unknownNodeTokens = new Set(sourceCode.getTokens(node, { includeComments: true })); + + unknownNodeTokens.forEach(token => { + if (!unknownNodeTokens.has(offsets.getFirstDependency(token))) { + const firstTokenOfLine = tokenInfo.getFirstTokenOfLine(token); + + if (token === firstTokenOfLine) { + offsets.ignoreToken(token); + } else { + offsets.setDesiredOffset(token, firstTokenOfLine, 0); + } + } + }); + } + + /** + * Check whether the given token is on the first line of a statement. + * @param {Token} token The token to check. + * @param {ASTNode} leafNode The expression node that the token belongs directly. + * @returns {boolean} `true` if the token is on the first line of a statement. + */ + function isOnFirstLineOfStatement(token, leafNode) { + let node = leafNode; + + while (node.parent && !node.parent.type.endsWith("Statement") && !node.parent.type.endsWith("Declaration")) { + node = node.parent; + } + node = node.parent; + + return !node || node.loc.start.line === token.loc.start.line; + } + + const baseOffsetListeners = { + "ArrayExpression, ArrayPattern"(node) { + const openingBracket = sourceCode.getFirstToken(node); + const closingBracket = sourceCode.getTokenAfter(lodash.findLast(node.elements) || openingBracket, astUtils.isClosingBracketToken); + + addElementListIndent(node.elements, openingBracket, closingBracket, options.ArrayExpression); + }, + + "ObjectExpression, ObjectPattern"(node) { + const openingCurly = sourceCode.getFirstToken(node); + const closingCurly = sourceCode.getTokenAfter( + node.properties.length ? node.properties[node.properties.length - 1] : openingCurly, + astUtils.isClosingBraceToken + ); + + addElementListIndent(node.properties, openingCurly, closingCurly, options.ObjectExpression); + }, + + ArrowFunctionExpression(node) { + const firstToken = sourceCode.getFirstToken(node); + + if (astUtils.isOpeningParenToken(firstToken)) { + const openingParen = firstToken; + const closingParen = sourceCode.getTokenBefore(node.body, astUtils.isClosingParenToken); + + parameterParens.add(openingParen); + parameterParens.add(closingParen); + addElementListIndent(node.params, openingParen, closingParen, options.FunctionExpression.parameters); + } + addBlocklessNodeIndent(node.body); + + let arrowToken; + + if (node.params.length) { + arrowToken = sourceCode.getTokenAfter(node.params[node.params.length - 1], astUtils.isArrowToken); + } else { + arrowToken = sourceCode.getFirstToken(node, astUtils.isArrowToken); + } + offsets.setDesiredOffset(arrowToken, sourceCode.getFirstToken(node), 0); + }, + + AssignmentExpression(node) { + const operator = sourceCode.getFirstTokenBetween(node.left, node.right, token => token.value === node.operator); + + offsets.setDesiredOffsets([operator.range[0], node.range[1]], sourceCode.getLastToken(node.left), 1); + offsets.ignoreToken(operator); + offsets.ignoreToken(sourceCode.getTokenAfter(operator)); + }, + + "BinaryExpression, LogicalExpression"(node) { + const operator = sourceCode.getFirstTokenBetween(node.left, node.right, token => token.value === node.operator); + + /* + * For backwards compatibility, don't check BinaryExpression indents, e.g. + * var foo = bar && + * baz; + */ + + const tokenAfterOperator = sourceCode.getTokenAfter(operator); + + offsets.ignoreToken(operator); + offsets.ignoreToken(tokenAfterOperator); + offsets.setDesiredOffset(tokenAfterOperator, operator, 0); + }, + + "BlockStatement, ClassBody"(node) { + + let blockIndentLevel; + + if (node.parent && isOuterIIFE(node.parent)) { + blockIndentLevel = options.outerIIFEBody; + } else if (node.parent && (node.parent.type === "FunctionExpression" || node.parent.type === "ArrowFunctionExpression")) { + blockIndentLevel = options.FunctionExpression.body; + } else if (node.parent && node.parent.type === "FunctionDeclaration") { + blockIndentLevel = options.FunctionDeclaration.body; + } else { + blockIndentLevel = 1; + } + + /* + * For blocks that aren't lone statements, ensure that the opening curly brace + * is aligned with the parent. + */ + if (!astUtils.STATEMENT_LIST_PARENTS.has(node.parent.type)) { + offsets.setDesiredOffset(sourceCode.getFirstToken(node), sourceCode.getFirstToken(node.parent), 0); + } + addElementListIndent(node.body, sourceCode.getFirstToken(node), sourceCode.getLastToken(node), blockIndentLevel); + }, + + CallExpression: addFunctionCallIndent, + + + "ClassDeclaration[superClass], ClassExpression[superClass]"(node) { + const classToken = sourceCode.getFirstToken(node); + const extendsToken = sourceCode.getTokenBefore(node.superClass, astUtils.isNotOpeningParenToken); + + offsets.setDesiredOffsets([extendsToken.range[0], node.body.range[0]], classToken, 1); + }, + + ConditionalExpression(node) { + const firstToken = sourceCode.getFirstToken(node); + + // `flatTernaryExpressions` option is for the following style: + // var a = + // foo > 0 ? bar : + // foo < 0 ? baz : + // /*else*/ qiz ; + if (!options.flatTernaryExpressions || + !astUtils.isTokenOnSameLine(node.test, node.consequent) || + isOnFirstLineOfStatement(firstToken, node) + ) { + const questionMarkToken = sourceCode.getFirstTokenBetween(node.test, node.consequent, token => token.type === "Punctuator" && token.value === "?"); + const colonToken = sourceCode.getFirstTokenBetween(node.consequent, node.alternate, token => token.type === "Punctuator" && token.value === ":"); + + const firstConsequentToken = sourceCode.getTokenAfter(questionMarkToken); + const lastConsequentToken = sourceCode.getTokenBefore(colonToken); + const firstAlternateToken = sourceCode.getTokenAfter(colonToken); + + offsets.setDesiredOffset(questionMarkToken, firstToken, 1); + offsets.setDesiredOffset(colonToken, firstToken, 1); + + offsets.setDesiredOffset(firstConsequentToken, firstToken, 1); + + /* + * The alternate and the consequent should usually have the same indentation. + * If they share part of a line, align the alternate against the first token of the consequent. + * This allows the alternate to be indented correctly in cases like this: + * foo ? ( + * bar + * ) : ( // this '(' is aligned with the '(' above, so it's considered to be aligned with `foo` + * baz // as a result, `baz` is offset by 1 rather than 2 + * ) + */ + if (lastConsequentToken.loc.end.line === firstAlternateToken.loc.start.line) { + offsets.setDesiredOffset(firstAlternateToken, firstConsequentToken, 0); + } else { + + /** + * If the alternate and consequent do not share part of a line, offset the alternate from the first + * token of the conditional expression. For example: + * foo ? bar + * : baz + * + * If `baz` were aligned with `bar` rather than being offset by 1 from `foo`, `baz` would end up + * having no expected indentation. + */ + offsets.setDesiredOffset(firstAlternateToken, firstToken, 1); + } + + offsets.setDesiredOffsets([questionMarkToken.range[1], colonToken.range[0]], firstConsequentToken, 0); + offsets.setDesiredOffsets([colonToken.range[1], node.range[1]], firstAlternateToken, 0); + } + }, + + "DoWhileStatement, WhileStatement, ForInStatement, ForOfStatement": node => addBlocklessNodeIndent(node.body), + + ExportNamedDeclaration(node) { + if (node.declaration === null) { + const closingCurly = sourceCode.getLastToken(node, astUtils.isClosingBraceToken); + + // Indent the specifiers in `export {foo, bar, baz}` + addElementListIndent(node.specifiers, sourceCode.getFirstToken(node, { skip: 1 }), closingCurly, 1); + + if (node.source) { + + // Indent everything after and including the `from` token in `export {foo, bar, baz} from 'qux'` + offsets.setDesiredOffsets([closingCurly.range[1], node.range[1]], sourceCode.getFirstToken(node), 1); + } + } + }, + + ForStatement(node) { + const forOpeningParen = sourceCode.getFirstToken(node, 1); + + if (node.init) { + offsets.setDesiredOffsets(node.init.range, forOpeningParen, 1); + } + if (node.test) { + offsets.setDesiredOffsets(node.test.range, forOpeningParen, 1); + } + if (node.update) { + offsets.setDesiredOffsets(node.update.range, forOpeningParen, 1); + } + addBlocklessNodeIndent(node.body); + }, + + "FunctionDeclaration, FunctionExpression"(node) { + const closingParen = sourceCode.getTokenBefore(node.body); + const openingParen = sourceCode.getTokenBefore(node.params.length ? node.params[0] : closingParen); + + parameterParens.add(openingParen); + parameterParens.add(closingParen); + addElementListIndent(node.params, openingParen, closingParen, options[node.type].parameters); + }, + + IfStatement(node) { + addBlocklessNodeIndent(node.consequent); + if (node.alternate && node.alternate.type !== "IfStatement") { + addBlocklessNodeIndent(node.alternate); + } + }, + + ImportDeclaration(node) { + if (node.specifiers.some(specifier => specifier.type === "ImportSpecifier")) { + const openingCurly = sourceCode.getFirstToken(node, astUtils.isOpeningBraceToken); + const closingCurly = sourceCode.getLastToken(node, astUtils.isClosingBraceToken); + + addElementListIndent(node.specifiers.filter(specifier => specifier.type === "ImportSpecifier"), openingCurly, closingCurly, options.ImportDeclaration); + } + + const fromToken = sourceCode.getLastToken(node, token => token.type === "Identifier" && token.value === "from"); + + if (fromToken) { + offsets.setDesiredOffsets([fromToken.range[0], node.range[1]], sourceCode.getFirstToken(node), 1); + } + }, + + "MemberExpression, JSXMemberExpression, MetaProperty"(node) { + const object = node.type === "MetaProperty" ? node.meta : node.object; + const firstNonObjectToken = sourceCode.getFirstTokenBetween(object, node.property, astUtils.isNotClosingParenToken); + const secondNonObjectToken = sourceCode.getTokenAfter(firstNonObjectToken); + + const objectParenCount = sourceCode.getTokensBetween(object, node.property, { filter: astUtils.isClosingParenToken }).length; + const firstObjectToken = objectParenCount + ? sourceCode.getTokenBefore(object, { skip: objectParenCount - 1 }) + : sourceCode.getFirstToken(object); + const lastObjectToken = sourceCode.getTokenBefore(firstNonObjectToken); + const firstPropertyToken = node.computed ? firstNonObjectToken : secondNonObjectToken; + + if (node.computed) { + + // For computed MemberExpressions, match the closing bracket with the opening bracket. + offsets.setDesiredOffset(sourceCode.getLastToken(node), firstNonObjectToken, 0); + offsets.setDesiredOffsets(node.property.range, firstNonObjectToken, 1); + } + + /* + * If the object ends on the same line that the property starts, match against the last token + * of the object, to ensure that the MemberExpression is not indented. + * + * Otherwise, match against the first token of the object, e.g. + * foo + * .bar + * .baz // <-- offset by 1 from `foo` + */ + const offsetBase = lastObjectToken.loc.end.line === firstPropertyToken.loc.start.line + ? lastObjectToken + : firstObjectToken; + + if (typeof options.MemberExpression === "number") { + + // Match the dot (for non-computed properties) or the opening bracket (for computed properties) against the object. + offsets.setDesiredOffset(firstNonObjectToken, offsetBase, options.MemberExpression); + + /* + * For computed MemberExpressions, match the first token of the property against the opening bracket. + * Otherwise, match the first token of the property against the object. + */ + offsets.setDesiredOffset(secondNonObjectToken, node.computed ? firstNonObjectToken : offsetBase, options.MemberExpression); + } else { + + // If the MemberExpression option is off, ignore the dot and the first token of the property. + offsets.ignoreToken(firstNonObjectToken); + offsets.ignoreToken(secondNonObjectToken); + + // To ignore the property indentation, ensure that the property tokens depend on the ignored tokens. + offsets.setDesiredOffset(firstNonObjectToken, offsetBase, 0); + offsets.setDesiredOffset(secondNonObjectToken, firstNonObjectToken, 0); + } + }, + + NewExpression(node) { + + // Only indent the arguments if the NewExpression has parens (e.g. `new Foo(bar)` or `new Foo()`, but not `new Foo` + if (node.arguments.length > 0 || + astUtils.isClosingParenToken(sourceCode.getLastToken(node)) && + astUtils.isOpeningParenToken(sourceCode.getLastToken(node, 1))) { + addFunctionCallIndent(node); + } + }, + + Property(node) { + if (!node.shorthand && !node.method && node.kind === "init") { + const colon = sourceCode.getFirstTokenBetween(node.key, node.value, astUtils.isColonToken); + + offsets.ignoreToken(sourceCode.getTokenAfter(colon)); + } + }, + + SwitchStatement(node) { + const openingCurly = sourceCode.getTokenAfter(node.discriminant, astUtils.isOpeningBraceToken); + const closingCurly = sourceCode.getLastToken(node); + const caseKeywords = node.cases.map(switchCase => sourceCode.getFirstToken(switchCase)); + + offsets.setDesiredOffsets([openingCurly.range[1], closingCurly.range[0]], openingCurly, options.SwitchCase); + + node.cases.forEach((switchCase, index) => { + const caseKeyword = caseKeywords[index]; + + if (!(switchCase.consequent.length === 1 && switchCase.consequent[0].type === "BlockStatement")) { + const tokenAfterCurrentCase = index === node.cases.length - 1 ? closingCurly : caseKeywords[index + 1]; + + offsets.setDesiredOffsets([caseKeyword.range[1], tokenAfterCurrentCase.range[0]], caseKeyword, 1); + } + }); + + if (node.cases.length) { + sourceCode.getTokensBetween( + node.cases[node.cases.length - 1], + closingCurly, + { includeComments: true, filter: astUtils.isCommentToken } + ).forEach(token => offsets.ignoreToken(token)); + } + }, + + TemplateLiteral(node) { + node.expressions.forEach((expression, index) => { + const previousQuasi = node.quasis[index]; + const nextQuasi = node.quasis[index + 1]; + const tokenToAlignFrom = previousQuasi.loc.start.line === previousQuasi.loc.end.line ? sourceCode.getFirstToken(previousQuasi) : null; + + offsets.setDesiredOffsets([previousQuasi.range[1], nextQuasi.range[0]], tokenToAlignFrom, 1); + offsets.setDesiredOffset(sourceCode.getFirstToken(nextQuasi), tokenToAlignFrom, 0); + }); + }, + + VariableDeclaration(node) { + const variableIndent = options.VariableDeclarator.hasOwnProperty(node.kind) ? options.VariableDeclarator[node.kind] : DEFAULT_VARIABLE_INDENT; + + if (node.declarations[node.declarations.length - 1].loc.start.line > node.loc.start.line) { + + /* + * VariableDeclarator indentation is a bit different from other forms of indentation, in that the + * indentation of an opening bracket sometimes won't match that of a closing bracket. For example, + * the following indentations are correct: + * + * var foo = { + * ok: true + * }; + * + * var foo = { + * ok: true, + * }, + * bar = 1; + * + * Account for when exiting the AST (after indentations have already been set for the nodes in + * the declaration) by manually increasing the indentation level of the tokens in this declarator + * on the same line as the start of the declaration, provided that there are declarators that + * follow this one. + */ + const firstToken = sourceCode.getFirstToken(node); + + offsets.setDesiredOffsets(node.range, firstToken, variableIndent, true); + } else { + offsets.setDesiredOffsets(node.range, sourceCode.getFirstToken(node), variableIndent); + } + const lastToken = sourceCode.getLastToken(node); + + if (astUtils.isSemicolonToken(lastToken)) { + offsets.ignoreToken(lastToken); + } + }, + + VariableDeclarator(node) { + if (node.init) { + const equalOperator = sourceCode.getTokenBefore(node.init, astUtils.isNotOpeningParenToken); + const tokenAfterOperator = sourceCode.getTokenAfter(equalOperator); + + offsets.ignoreToken(equalOperator); + offsets.ignoreToken(tokenAfterOperator); + offsets.setDesiredOffsets([tokenAfterOperator.range[0], node.range[1]], equalOperator, 1); + offsets.setDesiredOffset(equalOperator, sourceCode.getLastToken(node.id), 0); + } + }, + + "JSXAttribute[value]"(node) { + const equalsToken = sourceCode.getFirstTokenBetween(node.name, node.value, token => token.type === "Punctuator" && token.value === "="); + + offsets.setDesiredOffsets([equalsToken.range[0], node.value.range[1]], sourceCode.getFirstToken(node.name), 1); + }, + + JSXElement(node) { + if (node.closingElement) { + addElementListIndent(node.children, sourceCode.getFirstToken(node.openingElement), sourceCode.getFirstToken(node.closingElement), 1); + } + }, + + JSXOpeningElement(node) { + const firstToken = sourceCode.getFirstToken(node); + let closingToken; + + if (node.selfClosing) { + closingToken = sourceCode.getLastToken(node, { skip: 1 }); + offsets.setDesiredOffset(sourceCode.getLastToken(node), closingToken, 0); + } else { + closingToken = sourceCode.getLastToken(node); + } + offsets.setDesiredOffsets(node.name.range, sourceCode.getFirstToken(node)); + addElementListIndent(node.attributes, firstToken, closingToken, 1); + }, + + JSXClosingElement(node) { + const firstToken = sourceCode.getFirstToken(node); + + offsets.setDesiredOffsets(node.name.range, firstToken, 1); + offsets.setDesiredOffset(sourceCode.getLastToken(node), firstToken, 0); + }, + + JSXExpressionContainer(node) { + const openingCurly = sourceCode.getFirstToken(node); + const closingCurly = sourceCode.getLastToken(node); + + offsets.setDesiredOffsets( + [openingCurly.range[1], closingCurly.range[0]], + openingCurly, + 1 + ); + offsets.setDesiredOffset(closingCurly, openingCurly, 0); + } + }; + + const listenerCallQueue = []; + + /* + * To ignore the indentation of a node: + * 1. Don't call the node's listener when entering it (if it has a listener) + * 2. Call `ignoreNode` on the node sometime after exiting it and before validating offsets. + */ + const offsetListeners = lodash.mapValues( + baseOffsetListeners, + + /* + * Offset listener calls are deferred until traversal is finished, and are called as + * part of the final `Program:exit` listener. This is necessary because a node might + * be matched by multiple selectors. + * + * Example: Suppose there is an offset listener for `Identifier`, and the user has + * specified in configuration that `MemberExpression > Identifier` should be ignored. + * Due to selector specificity rules, the `Identifier` listener will get called first. However, + * if a given Identifier node is supposed to be ignored, then the `Identifier` offset listener + * should not have been called at all. Without doing extra selector matching, we don't know + * whether the Identifier matches the `MemberExpression > Identifier` selector until the + * `MemberExpression > Identifier` listener is called. + * + * To avoid this, the `Identifier` listener isn't called until traversal finishes and all + * ignored nodes are known. + */ + listener => + node => + listenerCallQueue.push({ listener, node }) + ); + + // For each ignored node selector, set up a listener to collect it into the `ignoredNodes` set. + const ignoredNodes = new Set(); + const addToIgnoredNodes = ignoredNodes.add.bind(ignoredNodes); + + const ignoredNodeListeners = options.ignoredNodes.reduce( + (listeners, ignoredSelector) => Object.assign(listeners, { [ignoredSelector]: addToIgnoredNodes }), + {} + ); + + /* + * Join the listeners, and add a listener to verify that all tokens actually have the correct indentation + * at the end. + * + * Using Object.assign will cause some offset listeners to be overwritten if the same selector also appears + * in `ignoredNodeListeners`. This isn't a problem because all of the matching nodes will be ignored, + * so those listeners wouldn't be called anyway. + */ + return Object.assign( + offsetListeners, + ignoredNodeListeners, + { + "*:exit"(node) { + + // If a node's type is nonstandard, we can't tell how its children should be offset, so ignore it. + if (!KNOWN_NODES.has(node.type)) { + ignoredNodes.add(node); + } + }, + "Program:exit"() { + + // If ignoreComments option is enabled, ignore all comment tokens. + if (options.ignoreComments) { + sourceCode.getAllComments() + .forEach(comment => offsets.ignoreToken(comment)); + } + + // Invoke the queued offset listeners for the nodes that aren't ignored. + listenerCallQueue + .filter(nodeInfo => !ignoredNodes.has(nodeInfo.node)) + .forEach(nodeInfo => nodeInfo.listener(nodeInfo.node)); + + // Update the offsets for ignored nodes to prevent their child tokens from being reported. + ignoredNodes.forEach(ignoreNode); + + addParensIndent(sourceCode.ast.tokens); + + /* + * Create a Map from (tokenOrComment) => (precedingToken). + * This is necessary because sourceCode.getTokenBefore does not handle a comment as an argument correctly. + */ + const precedingTokens = sourceCode.ast.comments.reduce((commentMap, comment) => { + const tokenOrCommentBefore = sourceCode.getTokenBefore(comment, { includeComments: true }); + + return commentMap.set(comment, commentMap.has(tokenOrCommentBefore) ? commentMap.get(tokenOrCommentBefore) : tokenOrCommentBefore); + }, new WeakMap()); + + sourceCode.lines.forEach((line, lineIndex) => { + const lineNumber = lineIndex + 1; + + if (!tokenInfo.firstTokensByLineNumber.has(lineNumber)) { + + // Don't check indentation on blank lines + return; + } + + const firstTokenOfLine = tokenInfo.firstTokensByLineNumber.get(lineNumber); + + if (firstTokenOfLine.loc.start.line !== lineNumber) { + + // Don't check the indentation of multi-line tokens (e.g. template literals or block comments) twice. + return; + } + + // If the token matches the expected expected indentation, don't report it. + if (validateTokenIndent(firstTokenOfLine, offsets.getDesiredIndent(firstTokenOfLine))) { + return; + } + + if (astUtils.isCommentToken(firstTokenOfLine)) { + const tokenBefore = precedingTokens.get(firstTokenOfLine); + const tokenAfter = tokenBefore ? sourceCode.getTokenAfter(tokenBefore) : sourceCode.ast.tokens[0]; + + // If a comment matches the expected indentation of the token immediately before or after, don't report it. + if ( + tokenBefore && validateTokenIndent(firstTokenOfLine, offsets.getDesiredIndent(tokenBefore)) || + tokenAfter && validateTokenIndent(firstTokenOfLine, offsets.getDesiredIndent(tokenAfter)) + ) { + return; + } + } + + // Otherwise, report the token/comment. + report(firstTokenOfLine, offsets.getDesiredIndent(firstTokenOfLine)); + }); + } + } + ); + } +}; diff --git a/node_modules/eslint/lib/rules/init-declarations.js b/node_modules/eslint/lib/rules/init-declarations.js new file mode 100644 index 0000000..412b96d --- /dev/null +++ b/node_modules/eslint/lib/rules/init-declarations.js @@ -0,0 +1,138 @@ +/** + * @fileoverview A rule to control the style of variable initializations. + * @author Colin Ihrig + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks whether or not a given node is a for loop. + * @param {ASTNode} block - A node to check. + * @returns {boolean} `true` when the node is a for loop. + */ +function isForLoop(block) { + return block.type === "ForInStatement" || + block.type === "ForOfStatement" || + block.type === "ForStatement"; +} + +/** + * Checks whether or not a given declarator node has its initializer. + * @param {ASTNode} node - A declarator node to check. + * @returns {boolean} `true` when the node has its initializer. + */ +function isInitialized(node) { + const declaration = node.parent; + const block = declaration.parent; + + if (isForLoop(block)) { + if (block.type === "ForStatement") { + return block.init === declaration; + } + return block.left === declaration; + } + return Boolean(node.init); +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require or disallow initialization in variable declarations", + category: "Variables", + recommended: false, + url: "https://eslint.org/docs/rules/init-declarations" + }, + + schema: { + anyOf: [ + { + type: "array", + items: [ + { + enum: ["always"] + } + ], + minItems: 0, + maxItems: 1 + }, + { + type: "array", + items: [ + { + enum: ["never"] + }, + { + type: "object", + properties: { + ignoreForLoopInit: { + type: "boolean" + } + }, + additionalProperties: false + } + ], + minItems: 0, + maxItems: 2 + } + ] + } + }, + + create(context) { + + const MODE_ALWAYS = "always", + MODE_NEVER = "never"; + + const mode = context.options[0] || MODE_ALWAYS; + const params = context.options[1] || {}; + + //-------------------------------------------------------------------------- + // Public API + //-------------------------------------------------------------------------- + + return { + "VariableDeclaration:exit"(node) { + + const kind = node.kind, + declarations = node.declarations; + + for (let i = 0; i < declarations.length; ++i) { + const declaration = declarations[i], + id = declaration.id, + initialized = isInitialized(declaration), + isIgnoredForLoop = params.ignoreForLoopInit && isForLoop(node.parent); + + if (id.type !== "Identifier") { + continue; + } + + if (mode === MODE_ALWAYS && !initialized) { + context.report({ + node: declaration, + message: "Variable '{{idName}}' should be initialized on declaration.", + data: { + idName: id.name + } + }); + } else if (mode === MODE_NEVER && kind !== "const" && initialized && !isIgnoredForLoop) { + context.report({ + node: declaration, + message: "Variable '{{idName}}' should not be initialized on declaration.", + data: { + idName: id.name + } + }); + } + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/jsx-quotes.js b/node_modules/eslint/lib/rules/jsx-quotes.js new file mode 100644 index 0000000..54ec481 --- /dev/null +++ b/node_modules/eslint/lib/rules/jsx-quotes.js @@ -0,0 +1,90 @@ +/** + * @fileoverview A rule to ensure consistent quotes used in jsx syntax. + * @author Mathias Schreck + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Constants +//------------------------------------------------------------------------------ + +const QUOTE_SETTINGS = { + "prefer-double": { + quote: "\"", + description: "singlequote", + convert(str) { + return str.replace(/'/g, "\""); + } + }, + "prefer-single": { + quote: "'", + description: "doublequote", + convert(str) { + return str.replace(/"/g, "'"); + } + } +}; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce the consistent use of either double or single quotes in JSX attributes", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/jsx-quotes" + }, + + fixable: "whitespace", + + schema: [ + { + enum: ["prefer-single", "prefer-double"] + } + ] + }, + + create(context) { + const quoteOption = context.options[0] || "prefer-double", + setting = QUOTE_SETTINGS[quoteOption]; + + /** + * Checks if the given string literal node uses the expected quotes + * @param {ASTNode} node - A string literal node. + * @returns {boolean} Whether or not the string literal used the expected quotes. + * @public + */ + function usesExpectedQuotes(node) { + return node.value.indexOf(setting.quote) !== -1 || astUtils.isSurroundedBy(node.raw, setting.quote); + } + + return { + JSXAttribute(node) { + const attributeValue = node.value; + + if (attributeValue && astUtils.isStringLiteral(attributeValue) && !usesExpectedQuotes(attributeValue)) { + context.report({ + node: attributeValue, + message: "Unexpected usage of {{description}}.", + data: { + description: setting.description + }, + fix(fixer) { + return fixer.replaceText(attributeValue, setting.convert(attributeValue.raw)); + } + }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/key-spacing.js b/node_modules/eslint/lib/rules/key-spacing.js new file mode 100644 index 0000000..b1208e1 --- /dev/null +++ b/node_modules/eslint/lib/rules/key-spacing.js @@ -0,0 +1,643 @@ +/** + * @fileoverview Rule to specify spacing of object literal keys and values + * @author Brandon Mills + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks whether a string contains a line terminator as defined in + * http://www.ecma-international.org/ecma-262/5.1/#sec-7.3 + * @param {string} str String to test. + * @returns {boolean} True if str contains a line terminator. + */ +function containsLineTerminator(str) { + return astUtils.LINEBREAK_MATCHER.test(str); +} + +/** + * Gets the last element of an array. + * @param {Array} arr An array. + * @returns {any} Last element of arr. + */ +function last(arr) { + return arr[arr.length - 1]; +} + +/** + * Checks whether a node is contained on a single line. + * @param {ASTNode} node AST Node being evaluated. + * @returns {boolean} True if the node is a single line. + */ +function isSingleLine(node) { + return (node.loc.end.line === node.loc.start.line); +} + +/** + * Initializes a single option property from the configuration with defaults for undefined values + * @param {Object} toOptions Object to be initialized + * @param {Object} fromOptions Object to be initialized from + * @returns {Object} The object with correctly initialized options and values + */ +function initOptionProperty(toOptions, fromOptions) { + toOptions.mode = fromOptions.mode || "strict"; + + // Set value of beforeColon + if (typeof fromOptions.beforeColon !== "undefined") { + toOptions.beforeColon = +fromOptions.beforeColon; + } else { + toOptions.beforeColon = 0; + } + + // Set value of afterColon + if (typeof fromOptions.afterColon !== "undefined") { + toOptions.afterColon = +fromOptions.afterColon; + } else { + toOptions.afterColon = 1; + } + + // Set align if exists + if (typeof fromOptions.align !== "undefined") { + if (typeof fromOptions.align === "object") { + toOptions.align = fromOptions.align; + } else { // "string" + toOptions.align = { + on: fromOptions.align, + mode: toOptions.mode, + beforeColon: toOptions.beforeColon, + afterColon: toOptions.afterColon + }; + } + } + + return toOptions; +} + +/** + * Initializes all the option values (singleLine, multiLine and align) from the configuration with defaults for undefined values + * @param {Object} toOptions Object to be initialized + * @param {Object} fromOptions Object to be initialized from + * @returns {Object} The object with correctly initialized options and values + */ +function initOptions(toOptions, fromOptions) { + if (typeof fromOptions.align === "object") { + + // Initialize the alignment configuration + toOptions.align = initOptionProperty({}, fromOptions.align); + toOptions.align.on = fromOptions.align.on || "colon"; + toOptions.align.mode = fromOptions.align.mode || "strict"; + + toOptions.multiLine = initOptionProperty({}, (fromOptions.multiLine || fromOptions)); + toOptions.singleLine = initOptionProperty({}, (fromOptions.singleLine || fromOptions)); + + } else { // string or undefined + toOptions.multiLine = initOptionProperty({}, (fromOptions.multiLine || fromOptions)); + toOptions.singleLine = initOptionProperty({}, (fromOptions.singleLine || fromOptions)); + + // If alignment options are defined in multiLine, pull them out into the general align configuration + if (toOptions.multiLine.align) { + toOptions.align = { + on: toOptions.multiLine.align.on, + mode: toOptions.multiLine.align.mode || toOptions.multiLine.mode, + beforeColon: toOptions.multiLine.align.beforeColon, + afterColon: toOptions.multiLine.align.afterColon + }; + } + } + + return toOptions; +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +const messages = { + key: "{{error}} space after {{computed}}key '{{key}}'.", + value: "{{error}} space before value for {{computed}}key '{{key}}'." +}; + +module.exports = { + meta: { + docs: { + description: "enforce consistent spacing between keys and values in object literal properties", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/key-spacing" + }, + + fixable: "whitespace", + + schema: [{ + anyOf: [ + { + type: "object", + properties: { + align: { + anyOf: [ + { + enum: ["colon", "value"] + }, + { + type: "object", + properties: { + mode: { + enum: ["strict", "minimum"] + }, + on: { + enum: ["colon", "value"] + }, + beforeColon: { + type: "boolean" + }, + afterColon: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + }, + mode: { + enum: ["strict", "minimum"] + }, + beforeColon: { + type: "boolean" + }, + afterColon: { + type: "boolean" + } + }, + additionalProperties: false + }, + { + type: "object", + properties: { + singleLine: { + type: "object", + properties: { + mode: { + enum: ["strict", "minimum"] + }, + beforeColon: { + type: "boolean" + }, + afterColon: { + type: "boolean" + } + }, + additionalProperties: false + }, + multiLine: { + type: "object", + properties: { + align: { + anyOf: [ + { + enum: ["colon", "value"] + }, + { + type: "object", + properties: { + mode: { + enum: ["strict", "minimum"] + }, + on: { + enum: ["colon", "value"] + }, + beforeColon: { + type: "boolean" + }, + afterColon: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + }, + mode: { + enum: ["strict", "minimum"] + }, + beforeColon: { + type: "boolean" + }, + afterColon: { + type: "boolean" + } + }, + additionalProperties: false + } + }, + additionalProperties: false + }, + { + type: "object", + properties: { + singleLine: { + type: "object", + properties: { + mode: { + enum: ["strict", "minimum"] + }, + beforeColon: { + type: "boolean" + }, + afterColon: { + type: "boolean" + } + }, + additionalProperties: false + }, + multiLine: { + type: "object", + properties: { + mode: { + enum: ["strict", "minimum"] + }, + beforeColon: { + type: "boolean" + }, + afterColon: { + type: "boolean" + } + }, + additionalProperties: false + }, + align: { + type: "object", + properties: { + mode: { + enum: ["strict", "minimum"] + }, + on: { + enum: ["colon", "value"] + }, + beforeColon: { + type: "boolean" + }, + afterColon: { + type: "boolean" + } + }, + additionalProperties: false + } + }, + additionalProperties: false + } + ] + }] + }, + + create(context) { + + /** + * OPTIONS + * "key-spacing": [2, { + * beforeColon: false, + * afterColon: true, + * align: "colon" // Optional, or "value" + * } + */ + const options = context.options[0] || {}, + ruleOptions = initOptions({}, options), + multiLineOptions = ruleOptions.multiLine, + singleLineOptions = ruleOptions.singleLine, + alignmentOptions = ruleOptions.align || null; + + const sourceCode = context.getSourceCode(); + + /** + * Checks whether a property is a member of the property group it follows. + * @param {ASTNode} lastMember The last Property known to be in the group. + * @param {ASTNode} candidate The next Property that might be in the group. + * @returns {boolean} True if the candidate property is part of the group. + */ + function continuesPropertyGroup(lastMember, candidate) { + const groupEndLine = lastMember.loc.start.line, + candidateStartLine = candidate.loc.start.line; + + if (candidateStartLine - groupEndLine <= 1) { + return true; + } + + /* + * Check that the first comment is adjacent to the end of the group, the + * last comment is adjacent to the candidate property, and that successive + * comments are adjacent to each other. + */ + const leadingComments = sourceCode.getCommentsBefore(candidate); + + if ( + leadingComments.length && + leadingComments[0].loc.start.line - groupEndLine <= 1 && + candidateStartLine - last(leadingComments).loc.end.line <= 1 + ) { + for (let i = 1; i < leadingComments.length; i++) { + if (leadingComments[i].loc.start.line - leadingComments[i - 1].loc.end.line > 1) { + return false; + } + } + return true; + } + + return false; + } + + /** + * Determines if the given property is key-value property. + * @param {ASTNode} property Property node to check. + * @returns {boolean} Whether the property is a key-value property. + */ + function isKeyValueProperty(property) { + return !( + property.method || + property.shorthand || + property.kind !== "init" || + property.type !== "Property" // Could be "ExperimentalSpreadProperty" or "SpreadElement" + ); + } + + /** + * Starting from the given a node (a property.key node here) looks forward + * until it finds the last token before a colon punctuator and returns it. + * @param {ASTNode} node The node to start looking from. + * @returns {ASTNode} The last token before a colon punctuator. + */ + function getLastTokenBeforeColon(node) { + const colonToken = sourceCode.getTokenAfter(node, astUtils.isColonToken); + + return sourceCode.getTokenBefore(colonToken); + } + + /** + * Starting from the given a node (a property.key node here) looks forward + * until it finds the colon punctuator and returns it. + * @param {ASTNode} node The node to start looking from. + * @returns {ASTNode} The colon punctuator. + */ + function getNextColon(node) { + return sourceCode.getTokenAfter(node, astUtils.isColonToken); + } + + /** + * Gets an object literal property's key as the identifier name or string value. + * @param {ASTNode} property Property node whose key to retrieve. + * @returns {string} The property's key. + */ + function getKey(property) { + const key = property.key; + + if (property.computed) { + return sourceCode.getText().slice(key.range[0], key.range[1]); + } + + return property.key.name || property.key.value; + } + + /** + * Reports an appropriately-formatted error if spacing is incorrect on one + * side of the colon. + * @param {ASTNode} property Key-value pair in an object literal. + * @param {string} side Side being verified - either "key" or "value". + * @param {string} whitespace Actual whitespace string. + * @param {int} expected Expected whitespace length. + * @param {string} mode Value of the mode as "strict" or "minimum" + * @returns {void} + */ + function report(property, side, whitespace, expected, mode) { + const diff = whitespace.length - expected, + nextColon = getNextColon(property.key), + tokenBeforeColon = sourceCode.getTokenBefore(nextColon, { includeComments: true }), + tokenAfterColon = sourceCode.getTokenAfter(nextColon, { includeComments: true }), + isKeySide = side === "key", + locStart = isKeySide ? tokenBeforeColon.loc.start : tokenAfterColon.loc.start, + isExtra = diff > 0, + diffAbs = Math.abs(diff), + spaces = Array(diffAbs + 1).join(" "); + + if (( + diff && mode === "strict" || + diff < 0 && mode === "minimum" || + diff > 0 && !expected && mode === "minimum") && + !(expected && containsLineTerminator(whitespace)) + ) { + let fix; + + if (isExtra) { + let range; + + // Remove whitespace + if (isKeySide) { + range = [tokenBeforeColon.range[1], tokenBeforeColon.range[1] + diffAbs]; + } else { + range = [tokenAfterColon.range[0] - diffAbs, tokenAfterColon.range[0]]; + } + fix = function(fixer) { + return fixer.removeRange(range); + }; + } else { + + // Add whitespace + if (isKeySide) { + fix = function(fixer) { + return fixer.insertTextAfter(tokenBeforeColon, spaces); + }; + } else { + fix = function(fixer) { + return fixer.insertTextBefore(tokenAfterColon, spaces); + }; + } + } + + context.report({ + node: property[side], + loc: locStart, + message: messages[side], + data: { + error: isExtra ? "Extra" : "Missing", + computed: property.computed ? "computed " : "", + key: getKey(property) + }, + fix + }); + } + } + + /** + * Gets the number of characters in a key, including quotes around string + * keys and braces around computed property keys. + * @param {ASTNode} property Property of on object literal. + * @returns {int} Width of the key. + */ + function getKeyWidth(property) { + const startToken = sourceCode.getFirstToken(property); + const endToken = getLastTokenBeforeColon(property.key); + + return endToken.range[1] - startToken.range[0]; + } + + /** + * Gets the whitespace around the colon in an object literal property. + * @param {ASTNode} property Property node from an object literal. + * @returns {Object} Whitespace before and after the property's colon. + */ + function getPropertyWhitespace(property) { + const whitespace = /(\s*):(\s*)/.exec(sourceCode.getText().slice( + property.key.range[1], property.value.range[0] + )); + + if (whitespace) { + return { + beforeColon: whitespace[1], + afterColon: whitespace[2] + }; + } + return null; + } + + /** + * Creates groups of properties. + * @param {ASTNode} node ObjectExpression node being evaluated. + * @returns {Array.} Groups of property AST node lists. + */ + function createGroups(node) { + if (node.properties.length === 1) { + return [node.properties]; + } + + return node.properties.reduce((groups, property) => { + const currentGroup = last(groups), + prev = last(currentGroup); + + if (!prev || continuesPropertyGroup(prev, property)) { + currentGroup.push(property); + } else { + groups.push([property]); + } + + return groups; + }, [ + [] + ]); + } + + /** + * Verifies correct vertical alignment of a group of properties. + * @param {ASTNode[]} properties List of Property AST nodes. + * @returns {void} + */ + function verifyGroupAlignment(properties) { + const length = properties.length, + widths = properties.map(getKeyWidth), // Width of keys, including quotes + align = alignmentOptions.on; // "value" or "colon" + let targetWidth = Math.max.apply(null, widths), + beforeColon, afterColon, mode; + + if (alignmentOptions && length > 1) { // When aligning values within a group, use the alignment configuration. + beforeColon = alignmentOptions.beforeColon; + afterColon = alignmentOptions.afterColon; + mode = alignmentOptions.mode; + } else { + beforeColon = multiLineOptions.beforeColon; + afterColon = multiLineOptions.afterColon; + mode = alignmentOptions.mode; + } + + // Conditionally include one space before or after colon + targetWidth += (align === "colon" ? beforeColon : afterColon); + + for (let i = 0; i < length; i++) { + const property = properties[i]; + const whitespace = getPropertyWhitespace(property); + + if (whitespace) { // Object literal getters/setters lack a colon + const width = widths[i]; + + if (align === "value") { + report(property, "key", whitespace.beforeColon, beforeColon, mode); + report(property, "value", whitespace.afterColon, targetWidth - width, mode); + } else { // align = "colon" + report(property, "key", whitespace.beforeColon, targetWidth - width, mode); + report(property, "value", whitespace.afterColon, afterColon, mode); + } + } + } + } + + /** + * Verifies vertical alignment, taking into account groups of properties. + * @param {ASTNode} node ObjectExpression node being evaluated. + * @returns {void} + */ + function verifyAlignment(node) { + createGroups(node).forEach(group => { + verifyGroupAlignment(group.filter(isKeyValueProperty)); + }); + } + + /** + * Verifies spacing of property conforms to specified options. + * @param {ASTNode} node Property node being evaluated. + * @param {Object} lineOptions Configured singleLine or multiLine options + * @returns {void} + */ + function verifySpacing(node, lineOptions) { + const actual = getPropertyWhitespace(node); + + if (actual) { // Object literal getters/setters lack colons + report(node, "key", actual.beforeColon, lineOptions.beforeColon, lineOptions.mode); + report(node, "value", actual.afterColon, lineOptions.afterColon, lineOptions.mode); + } + } + + /** + * Verifies spacing of each property in a list. + * @param {ASTNode[]} properties List of Property AST nodes. + * @returns {void} + */ + function verifyListSpacing(properties) { + const length = properties.length; + + for (let i = 0; i < length; i++) { + verifySpacing(properties[i], singleLineOptions); + } + } + + //-------------------------------------------------------------------------- + // Public API + //-------------------------------------------------------------------------- + + if (alignmentOptions) { // Verify vertical alignment + + return { + ObjectExpression(node) { + if (isSingleLine(node)) { + verifyListSpacing(node.properties.filter(isKeyValueProperty)); + } else { + verifyAlignment(node); + } + } + }; + + } + + // Obey beforeColon and afterColon in each property as configured + return { + Property(node) { + verifySpacing(node, isSingleLine(node.parent) ? singleLineOptions : multiLineOptions); + } + }; + + + } +}; diff --git a/node_modules/eslint/lib/rules/keyword-spacing.js b/node_modules/eslint/lib/rules/keyword-spacing.js new file mode 100644 index 0000000..89b9733 --- /dev/null +++ b/node_modules/eslint/lib/rules/keyword-spacing.js @@ -0,0 +1,590 @@ +/** + * @fileoverview Rule to enforce spacing before and after keywords. + * @author Toru Nagashima + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"), + keywords = require("../util/keywords"); + +//------------------------------------------------------------------------------ +// Constants +//------------------------------------------------------------------------------ + +const PREV_TOKEN = /^[)\]}>]$/; +const NEXT_TOKEN = /^(?:[([{<~!]|\+\+?|--?)$/; +const PREV_TOKEN_M = /^[)\]}>*]$/; +const NEXT_TOKEN_M = /^[{*]$/; +const TEMPLATE_OPEN_PAREN = /\$\{$/; +const TEMPLATE_CLOSE_PAREN = /^\}/; +const CHECK_TYPE = /^(?:JSXElement|RegularExpression|String|Template)$/; +const KEYS = keywords.concat(["as", "async", "await", "from", "get", "let", "of", "set", "yield"]); + +// check duplications. +(function() { + KEYS.sort(); + for (let i = 1; i < KEYS.length; ++i) { + if (KEYS[i] === KEYS[i - 1]) { + throw new Error(`Duplication was found in the keyword list: ${KEYS[i]}`); + } + } +}()); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks whether or not a given token is a "Template" token ends with "${". + * + * @param {Token} token - A token to check. + * @returns {boolean} `true` if the token is a "Template" token ends with "${". + */ +function isOpenParenOfTemplate(token) { + return token.type === "Template" && TEMPLATE_OPEN_PAREN.test(token.value); +} + +/** + * Checks whether or not a given token is a "Template" token starts with "}". + * + * @param {Token} token - A token to check. + * @returns {boolean} `true` if the token is a "Template" token starts with "}". + */ +function isCloseParenOfTemplate(token) { + return token.type === "Template" && TEMPLATE_CLOSE_PAREN.test(token.value); +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce consistent spacing before and after keywords", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/keyword-spacing" + }, + + fixable: "whitespace", + + schema: [ + { + type: "object", + properties: { + before: { type: "boolean" }, + after: { type: "boolean" }, + overrides: { + type: "object", + properties: KEYS.reduce((retv, key) => { + retv[key] = { + type: "object", + properties: { + before: { type: "boolean" }, + after: { type: "boolean" } + }, + additionalProperties: false + }; + return retv; + }, {}), + additionalProperties: false + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + /** + * Reports a given token if there are not space(s) before the token. + * + * @param {Token} token - A token to report. + * @param {RegExp|undefined} pattern - Optional. A pattern of the previous + * token to check. + * @returns {void} + */ + function expectSpaceBefore(token, pattern) { + pattern = pattern || PREV_TOKEN; + + const prevToken = sourceCode.getTokenBefore(token); + + if (prevToken && + (CHECK_TYPE.test(prevToken.type) || pattern.test(prevToken.value)) && + !isOpenParenOfTemplate(prevToken) && + astUtils.isTokenOnSameLine(prevToken, token) && + !sourceCode.isSpaceBetweenTokens(prevToken, token) + ) { + context.report({ + loc: token.loc.start, + message: "Expected space(s) before \"{{value}}\".", + data: token, + fix(fixer) { + return fixer.insertTextBefore(token, " "); + } + }); + } + } + + /** + * Reports a given token if there are space(s) before the token. + * + * @param {Token} token - A token to report. + * @param {RegExp|undefined} pattern - Optional. A pattern of the previous + * token to check. + * @returns {void} + */ + function unexpectSpaceBefore(token, pattern) { + pattern = pattern || PREV_TOKEN; + + const prevToken = sourceCode.getTokenBefore(token); + + if (prevToken && + (CHECK_TYPE.test(prevToken.type) || pattern.test(prevToken.value)) && + !isOpenParenOfTemplate(prevToken) && + astUtils.isTokenOnSameLine(prevToken, token) && + sourceCode.isSpaceBetweenTokens(prevToken, token) + ) { + context.report({ + loc: token.loc.start, + message: "Unexpected space(s) before \"{{value}}\".", + data: token, + fix(fixer) { + return fixer.removeRange([prevToken.range[1], token.range[0]]); + } + }); + } + } + + /** + * Reports a given token if there are not space(s) after the token. + * + * @param {Token} token - A token to report. + * @param {RegExp|undefined} pattern - Optional. A pattern of the next + * token to check. + * @returns {void} + */ + function expectSpaceAfter(token, pattern) { + pattern = pattern || NEXT_TOKEN; + + const nextToken = sourceCode.getTokenAfter(token); + + if (nextToken && + (CHECK_TYPE.test(nextToken.type) || pattern.test(nextToken.value)) && + !isCloseParenOfTemplate(nextToken) && + astUtils.isTokenOnSameLine(token, nextToken) && + !sourceCode.isSpaceBetweenTokens(token, nextToken) + ) { + context.report({ + loc: token.loc.start, + message: "Expected space(s) after \"{{value}}\".", + data: token, + fix(fixer) { + return fixer.insertTextAfter(token, " "); + } + }); + } + } + + /** + * Reports a given token if there are space(s) after the token. + * + * @param {Token} token - A token to report. + * @param {RegExp|undefined} pattern - Optional. A pattern of the next + * token to check. + * @returns {void} + */ + function unexpectSpaceAfter(token, pattern) { + pattern = pattern || NEXT_TOKEN; + + const nextToken = sourceCode.getTokenAfter(token); + + if (nextToken && + (CHECK_TYPE.test(nextToken.type) || pattern.test(nextToken.value)) && + !isCloseParenOfTemplate(nextToken) && + astUtils.isTokenOnSameLine(token, nextToken) && + sourceCode.isSpaceBetweenTokens(token, nextToken) + ) { + context.report({ + loc: token.loc.start, + message: "Unexpected space(s) after \"{{value}}\".", + data: token, + fix(fixer) { + return fixer.removeRange([token.range[1], nextToken.range[0]]); + } + }); + } + } + + /** + * Parses the option object and determines check methods for each keyword. + * + * @param {Object|undefined} options - The option object to parse. + * @returns {Object} - Normalized option object. + * Keys are keywords (there are for every keyword). + * Values are instances of `{"before": function, "after": function}`. + */ + function parseOptions(options) { + const before = !options || options.before !== false; + const after = !options || options.after !== false; + const defaultValue = { + before: before ? expectSpaceBefore : unexpectSpaceBefore, + after: after ? expectSpaceAfter : unexpectSpaceAfter + }; + const overrides = (options && options.overrides) || {}; + const retv = Object.create(null); + + for (let i = 0; i < KEYS.length; ++i) { + const key = KEYS[i]; + const override = overrides[key]; + + if (override) { + const thisBefore = ("before" in override) ? override.before : before; + const thisAfter = ("after" in override) ? override.after : after; + + retv[key] = { + before: thisBefore ? expectSpaceBefore : unexpectSpaceBefore, + after: thisAfter ? expectSpaceAfter : unexpectSpaceAfter + }; + } else { + retv[key] = defaultValue; + } + } + + return retv; + } + + const checkMethodMap = parseOptions(context.options[0]); + + /** + * Reports a given token if usage of spacing followed by the token is + * invalid. + * + * @param {Token} token - A token to report. + * @param {RegExp|undefined} pattern - Optional. A pattern of the previous + * token to check. + * @returns {void} + */ + function checkSpacingBefore(token, pattern) { + checkMethodMap[token.value].before(token, pattern); + } + + /** + * Reports a given token if usage of spacing preceded by the token is + * invalid. + * + * @param {Token} token - A token to report. + * @param {RegExp|undefined} pattern - Optional. A pattern of the next + * token to check. + * @returns {void} + */ + function checkSpacingAfter(token, pattern) { + checkMethodMap[token.value].after(token, pattern); + } + + /** + * Reports a given token if usage of spacing around the token is invalid. + * + * @param {Token} token - A token to report. + * @returns {void} + */ + function checkSpacingAround(token) { + checkSpacingBefore(token); + checkSpacingAfter(token); + } + + /** + * Reports the first token of a given node if the first token is a keyword + * and usage of spacing around the token is invalid. + * + * @param {ASTNode|null} node - A node to report. + * @returns {void} + */ + function checkSpacingAroundFirstToken(node) { + const firstToken = node && sourceCode.getFirstToken(node); + + if (firstToken && firstToken.type === "Keyword") { + checkSpacingAround(firstToken); + } + } + + /** + * Reports the first token of a given node if the first token is a keyword + * and usage of spacing followed by the token is invalid. + * + * This is used for unary operators (e.g. `typeof`), `function`, and `super`. + * Other rules are handling usage of spacing preceded by those keywords. + * + * @param {ASTNode|null} node - A node to report. + * @returns {void} + */ + function checkSpacingBeforeFirstToken(node) { + const firstToken = node && sourceCode.getFirstToken(node); + + if (firstToken && firstToken.type === "Keyword") { + checkSpacingBefore(firstToken); + } + } + + /** + * Reports the previous token of a given node if the token is a keyword and + * usage of spacing around the token is invalid. + * + * @param {ASTNode|null} node - A node to report. + * @returns {void} + */ + function checkSpacingAroundTokenBefore(node) { + if (node) { + const token = sourceCode.getTokenBefore(node, astUtils.isKeywordToken); + + checkSpacingAround(token); + } + } + + /** + * Reports `async` or `function` keywords of a given node if usage of + * spacing around those keywords is invalid. + * + * @param {ASTNode} node - A node to report. + * @returns {void} + */ + function checkSpacingForFunction(node) { + const firstToken = node && sourceCode.getFirstToken(node); + + if (firstToken && + ((firstToken.type === "Keyword" && firstToken.value === "function") || + firstToken.value === "async") + ) { + checkSpacingBefore(firstToken); + } + } + + /** + * Reports `class` and `extends` keywords of a given node if usage of + * spacing around those keywords is invalid. + * + * @param {ASTNode} node - A node to report. + * @returns {void} + */ + function checkSpacingForClass(node) { + checkSpacingAroundFirstToken(node); + checkSpacingAroundTokenBefore(node.superClass); + } + + /** + * Reports `if` and `else` keywords of a given node if usage of spacing + * around those keywords is invalid. + * + * @param {ASTNode} node - A node to report. + * @returns {void} + */ + function checkSpacingForIfStatement(node) { + checkSpacingAroundFirstToken(node); + checkSpacingAroundTokenBefore(node.alternate); + } + + /** + * Reports `try`, `catch`, and `finally` keywords of a given node if usage + * of spacing around those keywords is invalid. + * + * @param {ASTNode} node - A node to report. + * @returns {void} + */ + function checkSpacingForTryStatement(node) { + checkSpacingAroundFirstToken(node); + checkSpacingAroundFirstToken(node.handler); + checkSpacingAroundTokenBefore(node.finalizer); + } + + /** + * Reports `do` and `while` keywords of a given node if usage of spacing + * around those keywords is invalid. + * + * @param {ASTNode} node - A node to report. + * @returns {void} + */ + function checkSpacingForDoWhileStatement(node) { + checkSpacingAroundFirstToken(node); + checkSpacingAroundTokenBefore(node.test); + } + + /** + * Reports `for` and `in` keywords of a given node if usage of spacing + * around those keywords is invalid. + * + * @param {ASTNode} node - A node to report. + * @returns {void} + */ + function checkSpacingForForInStatement(node) { + checkSpacingAroundFirstToken(node); + checkSpacingAroundTokenBefore(node.right); + } + + /** + * Reports `for` and `of` keywords of a given node if usage of spacing + * around those keywords is invalid. + * + * @param {ASTNode} node - A node to report. + * @returns {void} + */ + function checkSpacingForForOfStatement(node) { + if (node.await) { + checkSpacingBefore(sourceCode.getFirstToken(node, 0)); + checkSpacingAfter(sourceCode.getFirstToken(node, 1)); + } else { + checkSpacingAroundFirstToken(node); + } + checkSpacingAround(sourceCode.getTokenBefore(node.right, astUtils.isNotOpeningParenToken)); + } + + /** + * Reports `import`, `export`, `as`, and `from` keywords of a given node if + * usage of spacing around those keywords is invalid. + * + * This rule handles the `*` token in module declarations. + * + * import*as A from "./a"; /*error Expected space(s) after "import". + * error Expected space(s) before "as". + * + * @param {ASTNode} node - A node to report. + * @returns {void} + */ + function checkSpacingForModuleDeclaration(node) { + const firstToken = sourceCode.getFirstToken(node); + + checkSpacingBefore(firstToken, PREV_TOKEN_M); + checkSpacingAfter(firstToken, NEXT_TOKEN_M); + + if (node.source) { + const fromToken = sourceCode.getTokenBefore(node.source); + + checkSpacingBefore(fromToken, PREV_TOKEN_M); + checkSpacingAfter(fromToken, NEXT_TOKEN_M); + } + } + + /** + * Reports `as` keyword of a given node if usage of spacing around this + * keyword is invalid. + * + * @param {ASTNode} node - A node to report. + * @returns {void} + */ + function checkSpacingForImportNamespaceSpecifier(node) { + const asToken = sourceCode.getFirstToken(node, 1); + + checkSpacingBefore(asToken, PREV_TOKEN_M); + } + + /** + * Reports `static`, `get`, and `set` keywords of a given node if usage of + * spacing around those keywords is invalid. + * + * @param {ASTNode} node - A node to report. + * @returns {void} + */ + function checkSpacingForProperty(node) { + if (node.static) { + checkSpacingAroundFirstToken(node); + } + if (node.kind === "get" || + node.kind === "set" || + ( + (node.method || node.type === "MethodDefinition") && + node.value.async + ) + ) { + const token = sourceCode.getTokenBefore( + node.key, + tok => { + switch (tok.value) { + case "get": + case "set": + case "async": + return true; + default: + return false; + } + } + ); + + if (!token) { + throw new Error("Failed to find token get, set, or async beside method name"); + } + + + checkSpacingAround(token); + } + } + + /** + * Reports `await` keyword of a given node if usage of spacing before + * this keyword is invalid. + * + * @param {ASTNode} node - A node to report. + * @returns {void} + */ + function checkSpacingForAwaitExpression(node) { + checkSpacingBefore(sourceCode.getFirstToken(node)); + } + + return { + + // Statements + DebuggerStatement: checkSpacingAroundFirstToken, + WithStatement: checkSpacingAroundFirstToken, + + // Statements - Control flow + BreakStatement: checkSpacingAroundFirstToken, + ContinueStatement: checkSpacingAroundFirstToken, + ReturnStatement: checkSpacingAroundFirstToken, + ThrowStatement: checkSpacingAroundFirstToken, + TryStatement: checkSpacingForTryStatement, + + // Statements - Choice + IfStatement: checkSpacingForIfStatement, + SwitchStatement: checkSpacingAroundFirstToken, + SwitchCase: checkSpacingAroundFirstToken, + + // Statements - Loops + DoWhileStatement: checkSpacingForDoWhileStatement, + ForInStatement: checkSpacingForForInStatement, + ForOfStatement: checkSpacingForForOfStatement, + ForStatement: checkSpacingAroundFirstToken, + WhileStatement: checkSpacingAroundFirstToken, + + // Statements - Declarations + ClassDeclaration: checkSpacingForClass, + ExportNamedDeclaration: checkSpacingForModuleDeclaration, + ExportDefaultDeclaration: checkSpacingAroundFirstToken, + ExportAllDeclaration: checkSpacingForModuleDeclaration, + FunctionDeclaration: checkSpacingForFunction, + ImportDeclaration: checkSpacingForModuleDeclaration, + VariableDeclaration: checkSpacingAroundFirstToken, + + // Expressions + ArrowFunctionExpression: checkSpacingForFunction, + AwaitExpression: checkSpacingForAwaitExpression, + ClassExpression: checkSpacingForClass, + FunctionExpression: checkSpacingForFunction, + NewExpression: checkSpacingBeforeFirstToken, + Super: checkSpacingBeforeFirstToken, + ThisExpression: checkSpacingBeforeFirstToken, + UnaryExpression: checkSpacingBeforeFirstToken, + YieldExpression: checkSpacingBeforeFirstToken, + + // Others + ImportNamespaceSpecifier: checkSpacingForImportNamespaceSpecifier, + MethodDefinition: checkSpacingForProperty, + Property: checkSpacingForProperty + }; + } +}; diff --git a/node_modules/eslint/lib/rules/line-comment-position.js b/node_modules/eslint/lib/rules/line-comment-position.js new file mode 100644 index 0000000..ebdb024 --- /dev/null +++ b/node_modules/eslint/lib/rules/line-comment-position.js @@ -0,0 +1,116 @@ +/** + * @fileoverview Rule to enforce the position of line comments + * @author Alberto Rodríguez + */ +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce position of line comments", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/line-comment-position" + }, + + schema: [ + { + oneOf: [ + { + enum: ["above", "beside"] + }, + { + type: "object", + properties: { + position: { + enum: ["above", "beside"] + }, + ignorePattern: { + type: "string" + }, + applyDefaultPatterns: { + type: "boolean" + }, + applyDefaultIgnorePatterns: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + } + ] + }, + + create(context) { + const options = context.options[0]; + + let above, + ignorePattern, + applyDefaultIgnorePatterns = true; + + if (!options || typeof options === "string") { + above = !options || options === "above"; + + } else { + above = options.position === "above"; + ignorePattern = options.ignorePattern; + + if (options.hasOwnProperty("applyDefaultIgnorePatterns")) { + applyDefaultIgnorePatterns = options.applyDefaultIgnorePatterns !== false; + } else { + applyDefaultIgnorePatterns = options.applyDefaultPatterns !== false; + } + } + + const defaultIgnoreRegExp = astUtils.COMMENTS_IGNORE_PATTERN; + const fallThroughRegExp = /^\s*falls?\s?through/; + const customIgnoreRegExp = new RegExp(ignorePattern); + const sourceCode = context.getSourceCode(); + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + Program() { + const comments = sourceCode.getAllComments(); + + comments.filter(token => token.type === "Line").forEach(node => { + if (applyDefaultIgnorePatterns && (defaultIgnoreRegExp.test(node.value) || fallThroughRegExp.test(node.value))) { + return; + } + + if (ignorePattern && customIgnoreRegExp.test(node.value)) { + return; + } + + const previous = sourceCode.getTokenBefore(node, { includeComments: true }); + const isOnSameLine = previous && previous.loc.end.line === node.loc.start.line; + + if (above) { + if (isOnSameLine) { + context.report({ + node, + message: "Expected comment to be above code." + }); + } + } else { + if (!isOnSameLine) { + context.report({ + node, + message: "Expected comment to be beside code." + }); + } + } + }); + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/linebreak-style.js b/node_modules/eslint/lib/rules/linebreak-style.js new file mode 100644 index 0000000..d5a170f --- /dev/null +++ b/node_modules/eslint/lib/rules/linebreak-style.js @@ -0,0 +1,97 @@ +/** + * @fileoverview Rule to enforce a single linebreak style. + * @author Erik Mueller + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce consistent linebreak style", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/linebreak-style" + }, + + fixable: "whitespace", + + schema: [ + { + enum: ["unix", "windows"] + } + ] + }, + + create(context) { + + const EXPECTED_LF_MSG = "Expected linebreaks to be 'LF' but found 'CRLF'.", + EXPECTED_CRLF_MSG = "Expected linebreaks to be 'CRLF' but found 'LF'."; + + const sourceCode = context.getSourceCode(); + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Builds a fix function that replaces text at the specified range in the source text. + * @param {int[]} range The range to replace + * @param {string} text The text to insert. + * @returns {Function} Fixer function + * @private + */ + function createFix(range, text) { + return function(fixer) { + return fixer.replaceTextRange(range, text); + }; + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + Program: function checkForlinebreakStyle(node) { + const linebreakStyle = context.options[0] || "unix", + expectedLF = linebreakStyle === "unix", + expectedLFChars = expectedLF ? "\n" : "\r\n", + source = sourceCode.getText(), + pattern = astUtils.createGlobalLinebreakMatcher(); + let match; + + let i = 0; + + while ((match = pattern.exec(source)) !== null) { + i++; + if (match[0] === expectedLFChars) { + continue; + } + + const index = match.index; + const range = [index, index + match[0].length]; + + context.report({ + node, + loc: { + line: i, + column: sourceCode.lines[i - 1].length + }, + message: expectedLF ? EXPECTED_LF_MSG : EXPECTED_CRLF_MSG, + fix: createFix(range, expectedLFChars) + }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/lines-around-comment.js b/node_modules/eslint/lib/rules/lines-around-comment.js new file mode 100644 index 0000000..5d98473 --- /dev/null +++ b/node_modules/eslint/lib/rules/lines-around-comment.js @@ -0,0 +1,398 @@ +/** + * @fileoverview Enforces empty lines around comments. + * @author Jamund Ferguson + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const lodash = require("lodash"), + astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Return an array with with any line numbers that are empty. + * @param {Array} lines An array of each line of the file. + * @returns {Array} An array of line numbers. + */ +function getEmptyLineNums(lines) { + const emptyLines = lines.map((line, i) => ({ + code: line.trim(), + num: i + 1 + })).filter(line => !line.code).map(line => line.num); + + return emptyLines; +} + +/** + * Return an array with with any line numbers that contain comments. + * @param {Array} comments An array of comment tokens. + * @returns {Array} An array of line numbers. + */ +function getCommentLineNums(comments) { + const lines = []; + + comments.forEach(token => { + const start = token.loc.start.line; + const end = token.loc.end.line; + + lines.push(start, end); + }); + return lines; +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require empty lines around comments", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/lines-around-comment" + }, + + fixable: "whitespace", + + schema: [ + { + type: "object", + properties: { + beforeBlockComment: { + type: "boolean" + }, + afterBlockComment: { + type: "boolean" + }, + beforeLineComment: { + type: "boolean" + }, + afterLineComment: { + type: "boolean" + }, + allowBlockStart: { + type: "boolean" + }, + allowBlockEnd: { + type: "boolean" + }, + allowClassStart: { + type: "boolean" + }, + allowClassEnd: { + type: "boolean" + }, + allowObjectStart: { + type: "boolean" + }, + allowObjectEnd: { + type: "boolean" + }, + allowArrayStart: { + type: "boolean" + }, + allowArrayEnd: { + type: "boolean" + }, + ignorePattern: { + type: "string" + }, + applyDefaultIgnorePatterns: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + + const options = context.options[0] ? Object.assign({}, context.options[0]) : {}; + const ignorePattern = options.ignorePattern; + const defaultIgnoreRegExp = astUtils.COMMENTS_IGNORE_PATTERN; + const customIgnoreRegExp = new RegExp(ignorePattern); + const applyDefaultIgnorePatterns = options.applyDefaultIgnorePatterns !== false; + + + options.beforeLineComment = options.beforeLineComment || false; + options.afterLineComment = options.afterLineComment || false; + options.beforeBlockComment = typeof options.beforeBlockComment !== "undefined" ? options.beforeBlockComment : true; + options.afterBlockComment = options.afterBlockComment || false; + options.allowBlockStart = options.allowBlockStart || false; + options.allowBlockEnd = options.allowBlockEnd || false; + + const sourceCode = context.getSourceCode(); + + const lines = sourceCode.lines, + numLines = lines.length + 1, + comments = sourceCode.getAllComments(), + commentLines = getCommentLineNums(comments), + emptyLines = getEmptyLineNums(lines), + commentAndEmptyLines = commentLines.concat(emptyLines); + + /** + * Returns whether or not comments are on lines starting with or ending with code + * @param {token} token The comment token to check. + * @returns {boolean} True if the comment is not alone. + */ + function codeAroundComment(token) { + let currentToken = token; + + do { + currentToken = sourceCode.getTokenBefore(currentToken, { includeComments: true }); + } while (currentToken && astUtils.isCommentToken(currentToken)); + + if (currentToken && astUtils.isTokenOnSameLine(currentToken, token)) { + return true; + } + + currentToken = token; + do { + currentToken = sourceCode.getTokenAfter(currentToken, { includeComments: true }); + } while (currentToken && astUtils.isCommentToken(currentToken)); + + if (currentToken && astUtils.isTokenOnSameLine(token, currentToken)) { + return true; + } + + return false; + } + + /** + * Returns whether or not comments are inside a node type or not. + * @param {ASTNode} parent The Comment parent node. + * @param {string} nodeType The parent type to check against. + * @returns {boolean} True if the comment is inside nodeType. + */ + function isParentNodeType(parent, nodeType) { + return parent.type === nodeType || + (parent.body && parent.body.type === nodeType) || + (parent.consequent && parent.consequent.type === nodeType); + } + + /** + * Returns the parent node that contains the given token. + * @param {token} token The token to check. + * @returns {ASTNode} The parent node that contains the given token. + */ + function getParentNodeOfToken(token) { + return sourceCode.getNodeByRangeIndex(token.range[0]); + } + + /** + * Returns whether or not comments are at the parent start or not. + * @param {token} token The Comment token. + * @param {string} nodeType The parent type to check against. + * @returns {boolean} True if the comment is at parent start. + */ + function isCommentAtParentStart(token, nodeType) { + const parent = getParentNodeOfToken(token); + + return parent && isParentNodeType(parent, nodeType) && + token.loc.start.line - parent.loc.start.line === 1; + } + + /** + * Returns whether or not comments are at the parent end or not. + * @param {token} token The Comment token. + * @param {string} nodeType The parent type to check against. + * @returns {boolean} True if the comment is at parent end. + */ + function isCommentAtParentEnd(token, nodeType) { + const parent = getParentNodeOfToken(token); + + return parent && isParentNodeType(parent, nodeType) && + parent.loc.end.line - token.loc.end.line === 1; + } + + /** + * Returns whether or not comments are at the block start or not. + * @param {token} token The Comment token. + * @returns {boolean} True if the comment is at block start. + */ + function isCommentAtBlockStart(token) { + return isCommentAtParentStart(token, "ClassBody") || isCommentAtParentStart(token, "BlockStatement") || isCommentAtParentStart(token, "SwitchCase"); + } + + /** + * Returns whether or not comments are at the block end or not. + * @param {token} token The Comment token. + * @returns {boolean} True if the comment is at block end. + */ + function isCommentAtBlockEnd(token) { + return isCommentAtParentEnd(token, "ClassBody") || isCommentAtParentEnd(token, "BlockStatement") || isCommentAtParentEnd(token, "SwitchCase") || isCommentAtParentEnd(token, "SwitchStatement"); + } + + /** + * Returns whether or not comments are at the class start or not. + * @param {token} token The Comment token. + * @returns {boolean} True if the comment is at class start. + */ + function isCommentAtClassStart(token) { + return isCommentAtParentStart(token, "ClassBody"); + } + + /** + * Returns whether or not comments are at the class end or not. + * @param {token} token The Comment token. + * @returns {boolean} True if the comment is at class end. + */ + function isCommentAtClassEnd(token) { + return isCommentAtParentEnd(token, "ClassBody"); + } + + /** + * Returns whether or not comments are at the object start or not. + * @param {token} token The Comment token. + * @returns {boolean} True if the comment is at object start. + */ + function isCommentAtObjectStart(token) { + return isCommentAtParentStart(token, "ObjectExpression") || isCommentAtParentStart(token, "ObjectPattern"); + } + + /** + * Returns whether or not comments are at the object end or not. + * @param {token} token The Comment token. + * @returns {boolean} True if the comment is at object end. + */ + function isCommentAtObjectEnd(token) { + return isCommentAtParentEnd(token, "ObjectExpression") || isCommentAtParentEnd(token, "ObjectPattern"); + } + + /** + * Returns whether or not comments are at the array start or not. + * @param {token} token The Comment token. + * @returns {boolean} True if the comment is at array start. + */ + function isCommentAtArrayStart(token) { + return isCommentAtParentStart(token, "ArrayExpression") || isCommentAtParentStart(token, "ArrayPattern"); + } + + /** + * Returns whether or not comments are at the array end or not. + * @param {token} token The Comment token. + * @returns {boolean} True if the comment is at array end. + */ + function isCommentAtArrayEnd(token) { + return isCommentAtParentEnd(token, "ArrayExpression") || isCommentAtParentEnd(token, "ArrayPattern"); + } + + /** + * Checks if a comment token has lines around it (ignores inline comments) + * @param {token} token The Comment token. + * @param {Object} opts Options to determine the newline. + * @param {boolean} opts.after Should have a newline after this line. + * @param {boolean} opts.before Should have a newline before this line. + * @returns {void} + */ + function checkForEmptyLine(token, opts) { + if (applyDefaultIgnorePatterns && defaultIgnoreRegExp.test(token.value)) { + return; + } + + if (ignorePattern && customIgnoreRegExp.test(token.value)) { + return; + } + + let after = opts.after, + before = opts.before; + + const prevLineNum = token.loc.start.line - 1, + nextLineNum = token.loc.end.line + 1, + commentIsNotAlone = codeAroundComment(token); + + const blockStartAllowed = options.allowBlockStart && + isCommentAtBlockStart(token) && + !(options.allowClassStart === false && + isCommentAtClassStart(token)), + blockEndAllowed = options.allowBlockEnd && isCommentAtBlockEnd(token) && !(options.allowClassEnd === false && isCommentAtClassEnd(token)), + classStartAllowed = options.allowClassStart && isCommentAtClassStart(token), + classEndAllowed = options.allowClassEnd && isCommentAtClassEnd(token), + objectStartAllowed = options.allowObjectStart && isCommentAtObjectStart(token), + objectEndAllowed = options.allowObjectEnd && isCommentAtObjectEnd(token), + arrayStartAllowed = options.allowArrayStart && isCommentAtArrayStart(token), + arrayEndAllowed = options.allowArrayEnd && isCommentAtArrayEnd(token); + + const exceptionStartAllowed = blockStartAllowed || classStartAllowed || objectStartAllowed || arrayStartAllowed; + const exceptionEndAllowed = blockEndAllowed || classEndAllowed || objectEndAllowed || arrayEndAllowed; + + // ignore top of the file and bottom of the file + if (prevLineNum < 1) { + before = false; + } + if (nextLineNum >= numLines) { + after = false; + } + + // we ignore all inline comments + if (commentIsNotAlone) { + return; + } + + const previousTokenOrComment = sourceCode.getTokenBefore(token, { includeComments: true }); + const nextTokenOrComment = sourceCode.getTokenAfter(token, { includeComments: true }); + + // check for newline before + if (!exceptionStartAllowed && before && !lodash.includes(commentAndEmptyLines, prevLineNum) && + !(astUtils.isCommentToken(previousTokenOrComment) && astUtils.isTokenOnSameLine(previousTokenOrComment, token))) { + const lineStart = token.range[0] - token.loc.start.column; + const range = [lineStart, lineStart]; + + context.report({ + node: token, + message: "Expected line before comment.", + fix(fixer) { + return fixer.insertTextBeforeRange(range, "\n"); + } + }); + } + + // check for newline after + if (!exceptionEndAllowed && after && !lodash.includes(commentAndEmptyLines, nextLineNum) && + !(astUtils.isCommentToken(nextTokenOrComment) && astUtils.isTokenOnSameLine(token, nextTokenOrComment))) { + context.report({ + node: token, + message: "Expected line after comment.", + fix(fixer) { + return fixer.insertTextAfter(token, "\n"); + } + }); + } + + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + Program() { + comments.forEach(token => { + if (token.type === "Line") { + if (options.beforeLineComment || options.afterLineComment) { + checkForEmptyLine(token, { + after: options.afterLineComment, + before: options.beforeLineComment + }); + } + } else if (token.type === "Block") { + if (options.beforeBlockComment || options.afterBlockComment) { + checkForEmptyLine(token, { + after: options.afterBlockComment, + before: options.beforeBlockComment + }); + } + } + }); + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/lines-around-directive.js b/node_modules/eslint/lib/rules/lines-around-directive.js new file mode 100644 index 0000000..3ba3ab5 --- /dev/null +++ b/node_modules/eslint/lib/rules/lines-around-directive.js @@ -0,0 +1,194 @@ +/** + * @fileoverview Require or disallow newlines around directives. + * @author Kai Cataldo + * @deprecated + */ + +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require or disallow newlines around directives", + category: "Stylistic Issues", + recommended: false, + replacedBy: ["padding-line-between-statements"], + url: "https://eslint.org/docs/rules/lines-around-directive" + }, + schema: [{ + oneOf: [ + { + enum: ["always", "never"] + }, + { + type: "object", + properties: { + before: { + enum: ["always", "never"] + }, + after: { + enum: ["always", "never"] + } + }, + additionalProperties: false, + minProperties: 2 + } + ] + }], + fixable: "whitespace", + deprecated: true + }, + + create(context) { + const sourceCode = context.getSourceCode(); + const config = context.options[0] || "always"; + const expectLineBefore = typeof config === "string" ? config : config.before; + const expectLineAfter = typeof config === "string" ? config : config.after; + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Check if node is preceded by a blank newline. + * @param {ASTNode} node Node to check. + * @returns {boolean} Whether or not the passed in node is preceded by a blank newline. + */ + function hasNewlineBefore(node) { + const tokenBefore = sourceCode.getTokenBefore(node, { includeComments: true }); + const tokenLineBefore = tokenBefore ? tokenBefore.loc.end.line : 0; + + return node.loc.start.line - tokenLineBefore >= 2; + } + + /** + * Gets the last token of a node that is on the same line as the rest of the node. + * This will usually be the last token of the node, but it will be the second-to-last token if the node has a trailing + * semicolon on a different line. + * @param {ASTNode} node A directive node + * @returns {Token} The last token of the node on the line + */ + function getLastTokenOnLine(node) { + const lastToken = sourceCode.getLastToken(node); + const secondToLastToken = sourceCode.getTokenBefore(lastToken); + + return astUtils.isSemicolonToken(lastToken) && lastToken.loc.start.line > secondToLastToken.loc.end.line + ? secondToLastToken + : lastToken; + } + + /** + * Check if node is followed by a blank newline. + * @param {ASTNode} node Node to check. + * @returns {boolean} Whether or not the passed in node is followed by a blank newline. + */ + function hasNewlineAfter(node) { + const lastToken = getLastTokenOnLine(node); + const tokenAfter = sourceCode.getTokenAfter(lastToken, { includeComments: true }); + + return tokenAfter.loc.start.line - lastToken.loc.end.line >= 2; + } + + /** + * Report errors for newlines around directives. + * @param {ASTNode} node Node to check. + * @param {string} location Whether the error was found before or after the directive. + * @param {boolean} expected Whether or not a newline was expected or unexpected. + * @returns {void} + */ + function reportError(node, location, expected) { + context.report({ + node, + message: "{{expected}} newline {{location}} \"{{value}}\" directive.", + data: { + expected: expected ? "Expected" : "Unexpected", + value: node.expression.value, + location + }, + fix(fixer) { + const lastToken = getLastTokenOnLine(node); + + if (expected) { + return location === "before" ? fixer.insertTextBefore(node, "\n") : fixer.insertTextAfter(lastToken, "\n"); + } + return fixer.removeRange(location === "before" ? [node.range[0] - 1, node.range[0]] : [lastToken.range[1], lastToken.range[1] + 1]); + } + }); + } + + /** + * Check lines around directives in node + * @param {ASTNode} node - node to check + * @returns {void} + */ + function checkDirectives(node) { + const directives = astUtils.getDirectivePrologue(node); + + if (!directives.length) { + return; + } + + const firstDirective = directives[0]; + const leadingComments = sourceCode.getCommentsBefore(firstDirective); + + /* + * Only check before the first directive if it is preceded by a comment or if it is at the top of + * the file and expectLineBefore is set to "never". This is to not force a newline at the top of + * the file if there are no comments as well as for compatibility with padded-blocks. + */ + if (leadingComments.length) { + if (expectLineBefore === "always" && !hasNewlineBefore(firstDirective)) { + reportError(firstDirective, "before", true); + } + + if (expectLineBefore === "never" && hasNewlineBefore(firstDirective)) { + reportError(firstDirective, "before", false); + } + } else if ( + node.type === "Program" && + expectLineBefore === "never" && + !leadingComments.length && + hasNewlineBefore(firstDirective) + ) { + reportError(firstDirective, "before", false); + } + + const lastDirective = directives[directives.length - 1]; + const statements = node.type === "Program" ? node.body : node.body.body; + + /* + * Do not check after the last directive if the body only + * contains a directive prologue and isn't followed by a comment to ensure + * this rule behaves well with padded-blocks. + */ + if (lastDirective === statements[statements.length - 1] && !lastDirective.trailingComments) { + return; + } + + if (expectLineAfter === "always" && !hasNewlineAfter(lastDirective)) { + reportError(lastDirective, "after", true); + } + + if (expectLineAfter === "never" && hasNewlineAfter(lastDirective)) { + reportError(lastDirective, "after", false); + } + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + Program: checkDirectives, + FunctionDeclaration: checkDirectives, + FunctionExpression: checkDirectives, + ArrowFunctionExpression: checkDirectives + }; + } +}; diff --git a/node_modules/eslint/lib/rules/lines-between-class-members.js b/node_modules/eslint/lib/rules/lines-between-class-members.js new file mode 100644 index 0000000..252984d --- /dev/null +++ b/node_modules/eslint/lib/rules/lines-between-class-members.js @@ -0,0 +1,140 @@ +/** + * @fileoverview Rule to check empty newline between class members + * @author 薛定谔的猫 + */ +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require or disallow an empty line between class members", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/lines-between-class-members" + }, + + fixable: "whitespace", + + schema: [ + { + enum: ["always", "never"] + }, + { + type: "object", + properties: { + exceptAfterSingleLine: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + + const options = []; + + options[0] = context.options[0] || "always"; + options[1] = context.options[1] || { exceptAfterSingleLine: false }; + + const ALWAYS_MESSAGE = "Expected blank line between class members."; + const NEVER_MESSAGE = "Unexpected blank line between class members."; + + const sourceCode = context.getSourceCode(); + + /** + * Checks if there is padding between two tokens + * @param {Token} first The first token + * @param {Token} second The second token + * @returns {boolean} True if there is at least a line between the tokens + */ + function isPaddingBetweenTokens(first, second) { + const comments = sourceCode.getCommentsBefore(second); + const len = comments.length; + + // If there is no comments + if (len === 0) { + const linesBetweenFstAndSnd = second.loc.start.line - first.loc.end.line - 1; + + return linesBetweenFstAndSnd >= 1; + } + + + // If there are comments + let sumOfCommentLines = 0; // the numbers of lines of comments + let prevCommentLineNum = -1; // line number of the end of the previous comment + + for (let i = 0; i < len; i++) { + const commentLinesOfThisComment = comments[i].loc.end.line - comments[i].loc.start.line + 1; + + sumOfCommentLines += commentLinesOfThisComment; + + /* + * If this comment and the previous comment are in the same line, + * the count of comment lines is duplicated. So decrement sumOfCommentLines. + */ + if (prevCommentLineNum === comments[i].loc.start.line) { + sumOfCommentLines -= 1; + } + + prevCommentLineNum = comments[i].loc.end.line; + } + + /* + * If the first block and the first comment are in the same line, + * the count of comment lines is duplicated. So decrement sumOfCommentLines. + */ + if (first.loc.end.line === comments[0].loc.start.line) { + sumOfCommentLines -= 1; + } + + /* + * If the last comment and the second block are in the same line, + * the count of comment lines is duplicated. So decrement sumOfCommentLines. + */ + if (comments[len - 1].loc.end.line === second.loc.start.line) { + sumOfCommentLines -= 1; + } + + const linesBetweenFstAndSnd = second.loc.start.line - first.loc.end.line - 1; + + return linesBetweenFstAndSnd - sumOfCommentLines >= 1; + } + + return { + ClassBody(node) { + const body = node.body; + + for (let i = 0; i < body.length - 1; i++) { + const curFirst = sourceCode.getFirstToken(body[i]); + const curLast = sourceCode.getLastToken(body[i]); + const nextFirst = sourceCode.getFirstToken(body[i + 1]); + const isPadded = isPaddingBetweenTokens(curLast, nextFirst); + const isMulti = !astUtils.isTokenOnSameLine(curFirst, curLast); + const skip = !isMulti && options[1].exceptAfterSingleLine; + + + if ((options[0] === "always" && !skip && !isPadded) || + (options[0] === "never" && isPadded)) { + context.report({ + node: body[i + 1], + message: isPadded ? NEVER_MESSAGE : ALWAYS_MESSAGE, + fix(fixer) { + return isPadded + ? fixer.replaceTextRange([curLast.range[1], nextFirst.range[0]], "\n") + : fixer.insertTextAfter(curLast, "\n"); + } + }); + } + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/max-depth.js b/node_modules/eslint/lib/rules/max-depth.js new file mode 100644 index 0000000..ead44b9 --- /dev/null +++ b/node_modules/eslint/lib/rules/max-depth.js @@ -0,0 +1,149 @@ +/** + * @fileoverview A rule to set the maximum depth block can be nested in a function. + * @author Ian Christian Myers + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce a maximum depth that blocks can be nested", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/max-depth" + }, + + schema: [ + { + oneOf: [ + { + type: "integer", + minimum: 0 + }, + { + type: "object", + properties: { + maximum: { + type: "integer", + minimum: 0 + }, + max: { + type: "integer", + minimum: 0 + } + }, + additionalProperties: false + } + ] + } + ] + }, + + create(context) { + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + const functionStack = [], + option = context.options[0]; + let maxDepth = 4; + + if (typeof option === "object" && option.hasOwnProperty("maximum") && typeof option.maximum === "number") { + maxDepth = option.maximum; + } + if (typeof option === "object" && option.hasOwnProperty("max") && typeof option.max === "number") { + maxDepth = option.max; + } + if (typeof option === "number") { + maxDepth = option; + } + + /** + * When parsing a new function, store it in our function stack + * @returns {void} + * @private + */ + function startFunction() { + functionStack.push(0); + } + + /** + * When parsing is done then pop out the reference + * @returns {void} + * @private + */ + function endFunction() { + functionStack.pop(); + } + + /** + * Save the block and Evaluate the node + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ + function pushBlock(node) { + const len = ++functionStack[functionStack.length - 1]; + + if (len > maxDepth) { + context.report({ node, message: "Blocks are nested too deeply ({{depth}}).", data: { depth: len } }); + } + } + + /** + * Pop the saved block + * @returns {void} + * @private + */ + function popBlock() { + functionStack[functionStack.length - 1]--; + } + + //-------------------------------------------------------------------------- + // Public API + //-------------------------------------------------------------------------- + + return { + Program: startFunction, + FunctionDeclaration: startFunction, + FunctionExpression: startFunction, + ArrowFunctionExpression: startFunction, + + IfStatement(node) { + if (node.parent.type !== "IfStatement") { + pushBlock(node); + } + }, + SwitchStatement: pushBlock, + TryStatement: pushBlock, + DoWhileStatement: pushBlock, + WhileStatement: pushBlock, + WithStatement: pushBlock, + ForStatement: pushBlock, + ForInStatement: pushBlock, + ForOfStatement: pushBlock, + + "IfStatement:exit": popBlock, + "SwitchStatement:exit": popBlock, + "TryStatement:exit": popBlock, + "DoWhileStatement:exit": popBlock, + "WhileStatement:exit": popBlock, + "WithStatement:exit": popBlock, + "ForStatement:exit": popBlock, + "ForInStatement:exit": popBlock, + "ForOfStatement:exit": popBlock, + + "FunctionDeclaration:exit": endFunction, + "FunctionExpression:exit": endFunction, + "ArrowFunctionExpression:exit": endFunction, + "Program:exit": endFunction + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/max-len.js b/node_modules/eslint/lib/rules/max-len.js new file mode 100644 index 0000000..35ac803 --- /dev/null +++ b/node_modules/eslint/lib/rules/max-len.js @@ -0,0 +1,366 @@ +/** + * @fileoverview Rule to check for max length on a line. + * @author Matt DuVall + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Constants +//------------------------------------------------------------------------------ + +const OPTIONS_SCHEMA = { + type: "object", + properties: { + code: { + type: "integer", + minimum: 0 + }, + comments: { + type: "integer", + minimum: 0 + }, + tabWidth: { + type: "integer", + minimum: 0 + }, + ignorePattern: { + type: "string" + }, + ignoreComments: { + type: "boolean" + }, + ignoreStrings: { + type: "boolean" + }, + ignoreUrls: { + type: "boolean" + }, + ignoreTemplateLiterals: { + type: "boolean" + }, + ignoreRegExpLiterals: { + type: "boolean" + }, + ignoreTrailingComments: { + type: "boolean" + } + }, + additionalProperties: false +}; + +const OPTIONS_OR_INTEGER_SCHEMA = { + anyOf: [ + OPTIONS_SCHEMA, + { + type: "integer", + minimum: 0 + } + ] +}; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce a maximum line length", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/max-len" + }, + + schema: [ + OPTIONS_OR_INTEGER_SCHEMA, + OPTIONS_OR_INTEGER_SCHEMA, + OPTIONS_SCHEMA + ] + }, + + create(context) { + + /* + * Inspired by http://tools.ietf.org/html/rfc3986#appendix-B, however: + * - They're matching an entire string that we know is a URI + * - We're matching part of a string where we think there *might* be a URL + * - We're only concerned about URLs, as picking out any URI would cause + * too many false positives + * - We don't care about matching the entire URL, any small segment is fine + */ + const URL_REGEXP = /[^:/?#]:\/\/[^?#]/; + + const sourceCode = context.getSourceCode(); + + /** + * Computes the length of a line that may contain tabs. The width of each + * tab will be the number of spaces to the next tab stop. + * @param {string} line The line. + * @param {int} tabWidth The width of each tab stop in spaces. + * @returns {int} The computed line length. + * @private + */ + function computeLineLength(line, tabWidth) { + let extraCharacterCount = 0; + + line.replace(/\t/g, (match, offset) => { + const totalOffset = offset + extraCharacterCount, + previousTabStopOffset = tabWidth ? totalOffset % tabWidth : 0, + spaceCount = tabWidth - previousTabStopOffset; + + extraCharacterCount += spaceCount - 1; // -1 for the replaced tab + }); + return Array.from(line).length + extraCharacterCount; + } + + // The options object must be the last option specified… + const lastOption = context.options[context.options.length - 1]; + const options = typeof lastOption === "object" ? Object.create(lastOption) : {}; + + // …but max code length… + if (typeof context.options[0] === "number") { + options.code = context.options[0]; + } + + // …and tabWidth can be optionally specified directly as integers. + if (typeof context.options[1] === "number") { + options.tabWidth = context.options[1]; + } + + const maxLength = options.code || 80, + tabWidth = options.tabWidth || 4, + ignoreComments = options.ignoreComments || false, + ignoreStrings = options.ignoreStrings || false, + ignoreTemplateLiterals = options.ignoreTemplateLiterals || false, + ignoreRegExpLiterals = options.ignoreRegExpLiterals || false, + ignoreTrailingComments = options.ignoreTrailingComments || options.ignoreComments || false, + ignoreUrls = options.ignoreUrls || false, + maxCommentLength = options.comments; + let ignorePattern = options.ignorePattern || null; + + if (ignorePattern) { + ignorePattern = new RegExp(ignorePattern); + } + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Tells if a given comment is trailing: it starts on the current line and + * extends to or past the end of the current line. + * @param {string} line The source line we want to check for a trailing comment on + * @param {number} lineNumber The one-indexed line number for line + * @param {ASTNode} comment The comment to inspect + * @returns {boolean} If the comment is trailing on the given line + */ + function isTrailingComment(line, lineNumber, comment) { + return comment && + (comment.loc.start.line === lineNumber && lineNumber <= comment.loc.end.line) && + (comment.loc.end.line > lineNumber || comment.loc.end.column === line.length); + } + + /** + * Tells if a comment encompasses the entire line. + * @param {string} line The source line with a trailing comment + * @param {number} lineNumber The one-indexed line number this is on + * @param {ASTNode} comment The comment to remove + * @returns {boolean} If the comment covers the entire line + */ + function isFullLineComment(line, lineNumber, comment) { + const start = comment.loc.start, + end = comment.loc.end, + isFirstTokenOnLine = !line.slice(0, comment.loc.start.column).trim(); + + return comment && + (start.line < lineNumber || (start.line === lineNumber && isFirstTokenOnLine)) && + (end.line > lineNumber || (end.line === lineNumber && end.column === line.length)); + } + + /** + * Gets the line after the comment and any remaining trailing whitespace is + * stripped. + * @param {string} line The source line with a trailing comment + * @param {ASTNode} comment The comment to remove + * @returns {string} Line without comment and trailing whitepace + */ + function stripTrailingComment(line, comment) { + + // loc.column is zero-indexed + return line.slice(0, comment.loc.start.column).replace(/\s+$/, ""); + } + + /** + * Ensure that an array exists at [key] on `object`, and add `value` to it. + * + * @param {Object} object the object to mutate + * @param {string} key the object's key + * @param {*} value the value to add + * @returns {void} + * @private + */ + function ensureArrayAndPush(object, key, value) { + if (!Array.isArray(object[key])) { + object[key] = []; + } + object[key].push(value); + } + + /** + * Retrieves an array containing all strings (" or ') in the source code. + * + * @returns {ASTNode[]} An array of string nodes. + */ + function getAllStrings() { + return sourceCode.ast.tokens.filter(token => token.type === "String"); + } + + /** + * Retrieves an array containing all template literals in the source code. + * + * @returns {ASTNode[]} An array of template literal nodes. + */ + function getAllTemplateLiterals() { + return sourceCode.ast.tokens.filter(token => token.type === "Template"); + } + + + /** + * Retrieves an array containing all RegExp literals in the source code. + * + * @returns {ASTNode[]} An array of RegExp literal nodes. + */ + function getAllRegExpLiterals() { + return sourceCode.ast.tokens.filter(token => token.type === "RegularExpression"); + } + + + /** + * A reducer to group an AST node by line number, both start and end. + * + * @param {Object} acc the accumulator + * @param {ASTNode} node the AST node in question + * @returns {Object} the modified accumulator + * @private + */ + function groupByLineNumber(acc, node) { + for (let i = node.loc.start.line; i <= node.loc.end.line; ++i) { + ensureArrayAndPush(acc, i, node); + } + return acc; + } + + /** + * Check the program for max length + * @param {ASTNode} node Node to examine + * @returns {void} + * @private + */ + function checkProgramForMaxLength(node) { + + // split (honors line-ending) + const lines = sourceCode.lines, + + // list of comments to ignore + comments = ignoreComments || maxCommentLength || ignoreTrailingComments ? sourceCode.getAllComments() : []; + + // we iterate over comments in parallel with the lines + let commentsIndex = 0; + + const strings = getAllStrings(); + const stringsByLine = strings.reduce(groupByLineNumber, {}); + + const templateLiterals = getAllTemplateLiterals(); + const templateLiteralsByLine = templateLiterals.reduce(groupByLineNumber, {}); + + const regExpLiterals = getAllRegExpLiterals(); + const regExpLiteralsByLine = regExpLiterals.reduce(groupByLineNumber, {}); + + lines.forEach((line, i) => { + + // i is zero-indexed, line numbers are one-indexed + const lineNumber = i + 1; + + /* + * if we're checking comment length; we need to know whether this + * line is a comment + */ + let lineIsComment = false; + + /* + * We can short-circuit the comment checks if we're already out of + * comments to check. + */ + if (commentsIndex < comments.length) { + let comment = null; + + // iterate over comments until we find one past the current line + do { + comment = comments[++commentsIndex]; + } while (comment && comment.loc.start.line <= lineNumber); + + // and step back by one + comment = comments[--commentsIndex]; + + if (isFullLineComment(line, lineNumber, comment)) { + lineIsComment = true; + } else if (ignoreTrailingComments && isTrailingComment(line, lineNumber, comment)) { + line = stripTrailingComment(line, comment); + } + } + if (ignorePattern && ignorePattern.test(line) || + ignoreUrls && URL_REGEXP.test(line) || + ignoreStrings && stringsByLine[lineNumber] || + ignoreTemplateLiterals && templateLiteralsByLine[lineNumber] || + ignoreRegExpLiterals && regExpLiteralsByLine[lineNumber] + ) { + + // ignore this line + return; + } + + const lineLength = computeLineLength(line, tabWidth); + const commentLengthApplies = lineIsComment && maxCommentLength; + + if (lineIsComment && ignoreComments) { + return; + } + + if (commentLengthApplies) { + if (lineLength > maxCommentLength) { + context.report({ + node, + loc: { line: lineNumber, column: 0 }, + message: "Line {{lineNumber}} exceeds the maximum comment line length of {{maxCommentLength}}.", + data: { + lineNumber: i + 1, + maxCommentLength + } + }); + } + } else if (lineLength > maxLength) { + context.report({ + node, + loc: { line: lineNumber, column: 0 }, + message: "Line {{lineNumber}} exceeds the maximum line length of {{maxLength}}.", + data: { + lineNumber: i + 1, + maxLength + } + }); + } + }); + } + + + //-------------------------------------------------------------------------- + // Public API + //-------------------------------------------------------------------------- + + return { + Program: checkProgramForMaxLength + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/max-lines.js b/node_modules/eslint/lib/rules/max-lines.js new file mode 100644 index 0000000..9bb4420 --- /dev/null +++ b/node_modules/eslint/lib/rules/max-lines.js @@ -0,0 +1,145 @@ +/** + * @fileoverview enforce a maximum file length + * @author Alberto Rodríguez + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const lodash = require("lodash"); +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce a maximum number of lines per file", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/max-lines" + }, + + schema: [ + { + oneOf: [ + { + type: "integer", + minimum: 0 + }, + { + type: "object", + properties: { + max: { + type: "integer", + minimum: 0 + }, + skipComments: { + type: "boolean" + }, + skipBlankLines: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + } + ] + }, + + create(context) { + const option = context.options[0]; + let max = 300; + + if (typeof option === "object" && option.hasOwnProperty("max") && typeof option.max === "number") { + max = option.max; + } + + if (typeof option === "number") { + max = option; + } + + const skipComments = option && option.skipComments; + const skipBlankLines = option && option.skipBlankLines; + + const sourceCode = context.getSourceCode(); + + /** + * Returns whether or not a token is a comment node type + * @param {Token} token The token to check + * @returns {boolean} True if the token is a comment node + */ + function isCommentNodeType(token) { + return token && (token.type === "Block" || token.type === "Line"); + } + + /** + * Returns the line numbers of a comment that don't have any code on the same line + * @param {Node} comment The comment node to check + * @returns {int[]} The line numbers + */ + function getLinesWithoutCode(comment) { + let start = comment.loc.start.line; + let end = comment.loc.end.line; + + let token; + + token = comment; + do { + token = sourceCode.getTokenBefore(token, { includeComments: true }); + } while (isCommentNodeType(token)); + + if (token && astUtils.isTokenOnSameLine(token, comment)) { + start += 1; + } + + token = comment; + do { + token = sourceCode.getTokenAfter(token, { includeComments: true }); + } while (isCommentNodeType(token)); + + if (token && astUtils.isTokenOnSameLine(comment, token)) { + end -= 1; + } + + if (start <= end) { + return lodash.range(start, end + 1); + } + return []; + } + + return { + "Program:exit"() { + let lines = sourceCode.lines.map((text, i) => ({ lineNumber: i + 1, text })); + + if (skipBlankLines) { + lines = lines.filter(l => l.text.trim() !== ""); + } + + if (skipComments) { + const comments = sourceCode.getAllComments(); + + const commentLines = lodash.flatten(comments.map(comment => getLinesWithoutCode(comment))); + + lines = lines.filter(l => !lodash.includes(commentLines, l.lineNumber)); + } + + if (lines.length > max) { + context.report({ + loc: { line: 1, column: 0 }, + message: "File must be at most {{max}} lines long. It's {{actual}} lines long.", + data: { + max, + actual: lines.length + } + }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/max-nested-callbacks.js b/node_modules/eslint/lib/rules/max-nested-callbacks.js new file mode 100644 index 0000000..7d7386e --- /dev/null +++ b/node_modules/eslint/lib/rules/max-nested-callbacks.js @@ -0,0 +1,113 @@ +/** + * @fileoverview Rule to enforce a maximum number of nested callbacks. + * @author Ian Christian Myers + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce a maximum depth that callbacks can be nested", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/max-nested-callbacks" + }, + + schema: [ + { + oneOf: [ + { + type: "integer", + minimum: 0 + }, + { + type: "object", + properties: { + maximum: { + type: "integer", + minimum: 0 + }, + max: { + type: "integer", + minimum: 0 + } + }, + additionalProperties: false + } + ] + } + ] + }, + + create(context) { + + //-------------------------------------------------------------------------- + // Constants + //-------------------------------------------------------------------------- + const option = context.options[0]; + let THRESHOLD = 10; + + if (typeof option === "object" && option.hasOwnProperty("maximum") && typeof option.maximum === "number") { + THRESHOLD = option.maximum; + } + if (typeof option === "object" && option.hasOwnProperty("max") && typeof option.max === "number") { + THRESHOLD = option.max; + } + if (typeof option === "number") { + THRESHOLD = option; + } + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + const callbackStack = []; + + /** + * Checks a given function node for too many callbacks. + * @param {ASTNode} node The node to check. + * @returns {void} + * @private + */ + function checkFunction(node) { + const parent = node.parent; + + if (parent.type === "CallExpression") { + callbackStack.push(node); + } + + if (callbackStack.length > THRESHOLD) { + const opts = { num: callbackStack.length, max: THRESHOLD }; + + context.report({ node, message: "Too many nested callbacks ({{num}}). Maximum allowed is {{max}}.", data: opts }); + } + } + + /** + * Pops the call stack. + * @returns {void} + * @private + */ + function popStack() { + callbackStack.pop(); + } + + //-------------------------------------------------------------------------- + // Public API + //-------------------------------------------------------------------------- + + return { + ArrowFunctionExpression: checkFunction, + "ArrowFunctionExpression:exit": popStack, + + FunctionExpression: checkFunction, + "FunctionExpression:exit": popStack + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/max-params.js b/node_modules/eslint/lib/rules/max-params.js new file mode 100644 index 0000000..d7c22c5 --- /dev/null +++ b/node_modules/eslint/lib/rules/max-params.js @@ -0,0 +1,97 @@ +/** + * @fileoverview Rule to flag when a function has too many parameters + * @author Ilya Volodin + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const lodash = require("lodash"); + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce a maximum number of parameters in function definitions", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/max-params" + }, + + schema: [ + { + oneOf: [ + { + type: "integer", + minimum: 0 + }, + { + type: "object", + properties: { + maximum: { + type: "integer", + minimum: 0 + }, + max: { + type: "integer", + minimum: 0 + } + }, + additionalProperties: false + } + ] + } + ] + }, + + create(context) { + + const option = context.options[0]; + let numParams = 3; + + if (typeof option === "object" && option.hasOwnProperty("maximum") && typeof option.maximum === "number") { + numParams = option.maximum; + } + if (typeof option === "object" && option.hasOwnProperty("max") && typeof option.max === "number") { + numParams = option.max; + } + if (typeof option === "number") { + numParams = option; + } + + /** + * Checks a function to see if it has too many parameters. + * @param {ASTNode} node The node to check. + * @returns {void} + * @private + */ + function checkFunction(node) { + if (node.params.length > numParams) { + context.report({ + node, + message: "{{name}} has too many parameters ({{count}}). Maximum allowed is {{max}}.", + data: { + name: lodash.upperFirst(astUtils.getFunctionNameWithKind(node)), + count: node.params.length, + max: numParams + } + }); + } + } + + return { + FunctionDeclaration: checkFunction, + ArrowFunctionExpression: checkFunction, + FunctionExpression: checkFunction + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/max-statements-per-line.js b/node_modules/eslint/lib/rules/max-statements-per-line.js new file mode 100644 index 0000000..a6776bd --- /dev/null +++ b/node_modules/eslint/lib/rules/max-statements-per-line.js @@ -0,0 +1,195 @@ +/** + * @fileoverview Specify the maximum number of statements allowed per line. + * @author Kenneth Williams + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce a maximum number of statements allowed per line", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/max-statements-per-line" + }, + + schema: [ + { + type: "object", + properties: { + max: { + type: "integer", + minimum: 1 + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + + const sourceCode = context.getSourceCode(), + options = context.options[0] || {}, + maxStatementsPerLine = typeof options.max !== "undefined" ? options.max : 1, + message = "This line has {{numberOfStatementsOnThisLine}} {{statements}}. Maximum allowed is {{maxStatementsPerLine}}."; + + let lastStatementLine = 0, + numberOfStatementsOnThisLine = 0, + firstExtraStatement; + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + const SINGLE_CHILD_ALLOWED = /^(?:(?:DoWhile|For|ForIn|ForOf|If|Labeled|While)Statement|Export(?:Default|Named)Declaration)$/; + + /** + * Reports with the first extra statement, and clears it. + * + * @returns {void} + */ + function reportFirstExtraStatementAndClear() { + if (firstExtraStatement) { + context.report({ + node: firstExtraStatement, + message, + data: { + numberOfStatementsOnThisLine, + maxStatementsPerLine, + statements: numberOfStatementsOnThisLine === 1 ? "statement" : "statements" + } + }); + } + firstExtraStatement = null; + } + + /** + * Gets the actual last token of a given node. + * + * @param {ASTNode} node - A node to get. This is a node except EmptyStatement. + * @returns {Token} The actual last token. + */ + function getActualLastToken(node) { + return sourceCode.getLastToken(node, astUtils.isNotSemicolonToken); + } + + /** + * Addresses a given node. + * It updates the state of this rule, then reports the node if the node violated this rule. + * + * @param {ASTNode} node - A node to check. + * @returns {void} + */ + function enterStatement(node) { + const line = node.loc.start.line; + + /* + * Skip to allow non-block statements if this is direct child of control statements. + * `if (a) foo();` is counted as 1. + * But `if (a) foo(); else foo();` should be counted as 2. + */ + if (SINGLE_CHILD_ALLOWED.test(node.parent.type) && + node.parent.alternate !== node + ) { + return; + } + + // Update state. + if (line === lastStatementLine) { + numberOfStatementsOnThisLine += 1; + } else { + reportFirstExtraStatementAndClear(); + numberOfStatementsOnThisLine = 1; + lastStatementLine = line; + } + + // Reports if the node violated this rule. + if (numberOfStatementsOnThisLine === maxStatementsPerLine + 1) { + firstExtraStatement = firstExtraStatement || node; + } + } + + /** + * Updates the state of this rule with the end line of leaving node to check with the next statement. + * + * @param {ASTNode} node - A node to check. + * @returns {void} + */ + function leaveStatement(node) { + const line = getActualLastToken(node).loc.end.line; + + // Update state. + if (line !== lastStatementLine) { + reportFirstExtraStatementAndClear(); + numberOfStatementsOnThisLine = 1; + lastStatementLine = line; + } + } + + //-------------------------------------------------------------------------- + // Public API + //-------------------------------------------------------------------------- + + return { + BreakStatement: enterStatement, + ClassDeclaration: enterStatement, + ContinueStatement: enterStatement, + DebuggerStatement: enterStatement, + DoWhileStatement: enterStatement, + ExpressionStatement: enterStatement, + ForInStatement: enterStatement, + ForOfStatement: enterStatement, + ForStatement: enterStatement, + FunctionDeclaration: enterStatement, + IfStatement: enterStatement, + ImportDeclaration: enterStatement, + LabeledStatement: enterStatement, + ReturnStatement: enterStatement, + SwitchStatement: enterStatement, + ThrowStatement: enterStatement, + TryStatement: enterStatement, + VariableDeclaration: enterStatement, + WhileStatement: enterStatement, + WithStatement: enterStatement, + ExportNamedDeclaration: enterStatement, + ExportDefaultDeclaration: enterStatement, + ExportAllDeclaration: enterStatement, + + "BreakStatement:exit": leaveStatement, + "ClassDeclaration:exit": leaveStatement, + "ContinueStatement:exit": leaveStatement, + "DebuggerStatement:exit": leaveStatement, + "DoWhileStatement:exit": leaveStatement, + "ExpressionStatement:exit": leaveStatement, + "ForInStatement:exit": leaveStatement, + "ForOfStatement:exit": leaveStatement, + "ForStatement:exit": leaveStatement, + "FunctionDeclaration:exit": leaveStatement, + "IfStatement:exit": leaveStatement, + "ImportDeclaration:exit": leaveStatement, + "LabeledStatement:exit": leaveStatement, + "ReturnStatement:exit": leaveStatement, + "SwitchStatement:exit": leaveStatement, + "ThrowStatement:exit": leaveStatement, + "TryStatement:exit": leaveStatement, + "VariableDeclaration:exit": leaveStatement, + "WhileStatement:exit": leaveStatement, + "WithStatement:exit": leaveStatement, + "ExportNamedDeclaration:exit": leaveStatement, + "ExportDefaultDeclaration:exit": leaveStatement, + "ExportAllDeclaration:exit": leaveStatement, + "Program:exit": reportFirstExtraStatementAndClear + }; + } +}; diff --git a/node_modules/eslint/lib/rules/max-statements.js b/node_modules/eslint/lib/rules/max-statements.js new file mode 100644 index 0000000..faa0d5d --- /dev/null +++ b/node_modules/eslint/lib/rules/max-statements.js @@ -0,0 +1,171 @@ +/** + * @fileoverview A rule to set the maximum number of statements in a function. + * @author Ian Christian Myers + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const lodash = require("lodash"); + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce a maximum number of statements allowed in function blocks", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/max-statements" + }, + + schema: [ + { + oneOf: [ + { + type: "integer", + minimum: 0 + }, + { + type: "object", + properties: { + maximum: { + type: "integer", + minimum: 0 + }, + max: { + type: "integer", + minimum: 0 + } + }, + additionalProperties: false + } + ] + }, + { + type: "object", + properties: { + ignoreTopLevelFunctions: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + const functionStack = [], + option = context.options[0], + ignoreTopLevelFunctions = context.options[1] && context.options[1].ignoreTopLevelFunctions || false, + topLevelFunctions = []; + let maxStatements = 10; + + if (typeof option === "object" && option.hasOwnProperty("maximum") && typeof option.maximum === "number") { + maxStatements = option.maximum; + } + if (typeof option === "object" && option.hasOwnProperty("max") && typeof option.max === "number") { + maxStatements = option.max; + } + if (typeof option === "number") { + maxStatements = option; + } + + /** + * Reports a node if it has too many statements + * @param {ASTNode} node node to evaluate + * @param {int} count Number of statements in node + * @param {int} max Maximum number of statements allowed + * @returns {void} + * @private + */ + function reportIfTooManyStatements(node, count, max) { + if (count > max) { + const name = lodash.upperFirst(astUtils.getFunctionNameWithKind(node)); + + context.report({ + node, + message: "{{name}} has too many statements ({{count}}). Maximum allowed is {{max}}.", + data: { name, count, max } + }); + } + } + + /** + * When parsing a new function, store it in our function stack + * @returns {void} + * @private + */ + function startFunction() { + functionStack.push(0); + } + + /** + * Evaluate the node at the end of function + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ + function endFunction(node) { + const count = functionStack.pop(); + + if (ignoreTopLevelFunctions && functionStack.length === 0) { + topLevelFunctions.push({ node, count }); + } else { + reportIfTooManyStatements(node, count, maxStatements); + } + } + + /** + * Increment the count of the functions + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ + function countStatements(node) { + functionStack[functionStack.length - 1] += node.body.length; + } + + //-------------------------------------------------------------------------- + // Public API + //-------------------------------------------------------------------------- + + return { + FunctionDeclaration: startFunction, + FunctionExpression: startFunction, + ArrowFunctionExpression: startFunction, + + BlockStatement: countStatements, + + "FunctionDeclaration:exit": endFunction, + "FunctionExpression:exit": endFunction, + "ArrowFunctionExpression:exit": endFunction, + + "Program:exit"() { + if (topLevelFunctions.length === 1) { + return; + } + + topLevelFunctions.forEach(element => { + const count = element.count; + const node = element.node; + + reportIfTooManyStatements(node, count, maxStatements); + }); + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/multiline-comment-style.js b/node_modules/eslint/lib/rules/multiline-comment-style.js new file mode 100644 index 0000000..4da9a61 --- /dev/null +++ b/node_modules/eslint/lib/rules/multiline-comment-style.js @@ -0,0 +1,295 @@ +/** + * @fileoverview enforce a particular style for multiline comments + * @author Teddy Katz + */ +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce a particular style for multiline comments", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/multiline-comment-style" + }, + fixable: "whitespace", + schema: [{ enum: ["starred-block", "separate-lines", "bare-block"] }] + }, + + create(context) { + const sourceCode = context.getSourceCode(); + const option = context.options[0] || "starred-block"; + + const EXPECTED_BLOCK_ERROR = "Expected a block comment instead of consecutive line comments."; + const START_NEWLINE_ERROR = "Expected a linebreak after '/*'."; + const END_NEWLINE_ERROR = "Expected a linebreak before '*/'."; + const MISSING_STAR_ERROR = "Expected a '*' at the start of this line."; + const ALIGNMENT_ERROR = "Expected this line to be aligned with the start of the comment."; + const EXPECTED_LINES_ERROR = "Expected multiple line comments instead of a block comment."; + + //---------------------------------------------------------------------- + // Helpers + //---------------------------------------------------------------------- + + /** + * Gets a list of comment lines in a group + * @param {Token[]} commentGroup A group of comments, containing either multiple line comments or a single block comment + * @returns {string[]} A list of comment lines + */ + function getCommentLines(commentGroup) { + if (commentGroup[0].type === "Line") { + return commentGroup.map(comment => comment.value); + } + return commentGroup[0].value + .split(astUtils.LINEBREAK_MATCHER) + .map(line => line.replace(/^\s*\*?/, "")); + } + + /** + * Converts a comment into starred-block form + * @param {Token} firstComment The first comment of the group being converted + * @param {string[]} commentLinesList A list of lines to appear in the new starred-block comment + * @returns {string} A representation of the comment value in starred-block form, excluding start and end markers + */ + function convertToStarredBlock(firstComment, commentLinesList) { + const initialOffset = sourceCode.text.slice(firstComment.range[0] - firstComment.loc.start.column, firstComment.range[0]); + const starredLines = commentLinesList.map(line => `${initialOffset} *${line}`); + + return `\n${starredLines.join("\n")}\n${initialOffset} `; + } + + /** + * Converts a comment into separate-line form + * @param {Token} firstComment The first comment of the group being converted + * @param {string[]} commentLinesList A list of lines to appear in the new starred-block comment + * @returns {string} A representation of the comment value in separate-line form + */ + function convertToSeparateLines(firstComment, commentLinesList) { + const initialOffset = sourceCode.text.slice(firstComment.range[0] - firstComment.loc.start.column, firstComment.range[0]); + const separateLines = commentLinesList.map(line => `// ${line.trim()}`); + + return separateLines.join(`\n${initialOffset}`); + } + + /** + * Converts a comment into bare-block form + * @param {Token} firstComment The first comment of the group being converted + * @param {string[]} commentLinesList A list of lines to appear in the new starred-block comment + * @returns {string} A representation of the comment value in bare-block form + */ + function convertToBlock(firstComment, commentLinesList) { + const initialOffset = sourceCode.text.slice(firstComment.range[0] - firstComment.loc.start.column, firstComment.range[0]); + const blockLines = commentLinesList.map(line => line.trim()); + + return `/* ${blockLines.join(`\n${initialOffset} `)} */`; + } + + /** + * Check a comment is JSDoc form + * @param {Token[]} commentGroup A group of comments, containing either multiple line comments or a single block comment + * @returns {boolean} if commentGroup is JSDoc form, return true + */ + function isJSDoc(commentGroup) { + const lines = commentGroup[0].value.split(astUtils.LINEBREAK_MATCHER); + + return commentGroup[0].type === "Block" && + /^\*\s*$/.test(lines[0]) && + lines.slice(1, -1).every(line => /^\s* /.test(line)) && + /^\s*$/.test(lines[lines.length - 1]); + } + + /** + * Each method checks a group of comments to see if it's valid according to the given option. + * @param {Token[]} commentGroup A list of comments that appear together. This will either contain a single + * block comment or multiple line comments. + * @returns {void} + */ + const commentGroupCheckers = { + "starred-block"(commentGroup) { + const commentLines = getCommentLines(commentGroup); + + if (commentLines.some(value => value.includes("*/"))) { + return; + } + + if (commentGroup.length > 1) { + context.report({ + loc: { + start: commentGroup[0].loc.start, + end: commentGroup[commentGroup.length - 1].loc.end + }, + message: EXPECTED_BLOCK_ERROR, + fix(fixer) { + const range = [commentGroup[0].range[0], commentGroup[commentGroup.length - 1].range[1]]; + const starredBlock = `/*${convertToStarredBlock(commentGroup[0], commentLines)}*/`; + + return commentLines.some(value => value.startsWith("/")) + ? null + : fixer.replaceTextRange(range, starredBlock); + } + }); + } else { + const block = commentGroup[0]; + const lines = block.value.split(astUtils.LINEBREAK_MATCHER); + const expectedLinePrefix = `${sourceCode.text.slice(block.range[0] - block.loc.start.column, block.range[0])} *`; + + if (!/^\*?\s*$/.test(lines[0])) { + const start = block.value.startsWith("*") ? block.range[0] + 1 : block.range[0]; + + context.report({ + loc: { + start: block.loc.start, + end: { line: block.loc.start.line, column: block.loc.start.column + 2 } + }, + message: START_NEWLINE_ERROR, + fix: fixer => fixer.insertTextAfterRange([start, start + 2], `\n${expectedLinePrefix}`) + }); + } + + if (!/^\s*$/.test(lines[lines.length - 1])) { + context.report({ + loc: { + start: { line: block.loc.end.line, column: block.loc.end.column - 2 }, + end: block.loc.end + }, + message: END_NEWLINE_ERROR, + fix: fixer => fixer.replaceTextRange([block.range[1] - 2, block.range[1]], `\n${expectedLinePrefix}/`) + }); + } + + for (let lineNumber = block.loc.start.line + 1; lineNumber <= block.loc.end.line; lineNumber++) { + const lineText = sourceCode.lines[lineNumber - 1]; + + if (!lineText.startsWith(expectedLinePrefix)) { + context.report({ + loc: { + start: { line: lineNumber, column: 0 }, + end: { line: lineNumber, column: sourceCode.lines[lineNumber - 1].length } + }, + message: /^\s*\*/.test(lineText) + ? ALIGNMENT_ERROR + : MISSING_STAR_ERROR, + fix(fixer) { + const lineStartIndex = sourceCode.getIndexFromLoc({ line: lineNumber, column: 0 }); + const linePrefixLength = lineText.match(/^\s*\*? ?/)[0].length; + const commentStartIndex = lineStartIndex + linePrefixLength; + + const replacementText = lineNumber === block.loc.end.line || lineText.length === linePrefixLength + ? expectedLinePrefix + : `${expectedLinePrefix} `; + + return fixer.replaceTextRange([lineStartIndex, commentStartIndex], replacementText); + } + }); + } + } + } + }, + "separate-lines"(commentGroup) { + if (!isJSDoc(commentGroup) && commentGroup[0].type === "Block") { + const commentLines = getCommentLines(commentGroup); + const block = commentGroup[0]; + const tokenAfter = sourceCode.getTokenAfter(block, { includeComments: true }); + + if (tokenAfter && block.loc.end.line === tokenAfter.loc.start.line) { + return; + } + + context.report({ + loc: { + start: block.loc.start, + end: { line: block.loc.start.line, column: block.loc.start.column + 2 } + }, + message: EXPECTED_LINES_ERROR, + fix(fixer) { + return fixer.replaceText(block, convertToSeparateLines(block, commentLines.filter(line => line))); + } + }); + } + }, + "bare-block"(commentGroup) { + if (!isJSDoc(commentGroup)) { + const commentLines = getCommentLines(commentGroup); + + // disallows consecutive line comments in favor of using a block comment. + if (commentGroup[0].type === "Line" && commentLines.length > 1 && + !commentLines.some(value => value.includes("*/"))) { + context.report({ + loc: { + start: commentGroup[0].loc.start, + end: commentGroup[commentGroup.length - 1].loc.end + }, + message: EXPECTED_BLOCK_ERROR, + fix(fixer) { + const range = [commentGroup[0].range[0], commentGroup[commentGroup.length - 1].range[1]]; + const block = convertToBlock(commentGroup[0], commentLines.filter(line => line)); + + return fixer.replaceTextRange(range, block); + } + }); + } + + // prohibits block comments from having a * at the beginning of each line. + if (commentGroup[0].type === "Block") { + const block = commentGroup[0]; + const lines = block.value.split(astUtils.LINEBREAK_MATCHER).filter(line => line.trim()); + + if (lines.length > 0 && lines.every(line => /^\s*\*/.test(line))) { + context.report({ + loc: { + start: block.loc.start, + end: { line: block.loc.start.line, column: block.loc.start.column + 2 } + }, + message: EXPECTED_BLOCK_ERROR, + fix(fixer) { + return fixer.replaceText(block, convertToBlock(block, commentLines.filter(line => line))); + } + }); + } + } + } + } + }; + + //---------------------------------------------------------------------- + // Public + //---------------------------------------------------------------------- + + return { + Program() { + return sourceCode.getAllComments() + .filter(comment => comment.type !== "Shebang") + .filter(comment => !astUtils.COMMENTS_IGNORE_PATTERN.test(comment.value)) + .filter(comment => { + const tokenBefore = sourceCode.getTokenBefore(comment, { includeComments: true }); + + return !tokenBefore || tokenBefore.loc.end.line < comment.loc.start.line; + }) + .reduce((commentGroups, comment, index, commentList) => { + const tokenBefore = sourceCode.getTokenBefore(comment, { includeComments: true }); + + if ( + comment.type === "Line" && + index && commentList[index - 1].type === "Line" && + tokenBefore && tokenBefore.loc.end.line === comment.loc.start.line - 1 && + tokenBefore === commentList[index - 1] + ) { + commentGroups[commentGroups.length - 1].push(comment); + } else { + commentGroups.push([comment]); + } + + return commentGroups; + }, []) + .filter(commentGroup => !(commentGroup.length === 1 && commentGroup[0].loc.start.line === commentGroup[0].loc.end.line)) + .forEach(commentGroupCheckers[option]); + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/multiline-ternary.js b/node_modules/eslint/lib/rules/multiline-ternary.js new file mode 100644 index 0000000..10cf269 --- /dev/null +++ b/node_modules/eslint/lib/rules/multiline-ternary.js @@ -0,0 +1,90 @@ +/** + * @fileoverview Enforce newlines between operands of ternary expressions + * @author Kai Cataldo + */ + +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce newlines between operands of ternary expressions", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/multiline-ternary" + }, + schema: [ + { + enum: ["always", "always-multiline", "never"] + } + ] + }, + + create(context) { + const option = context.options[0]; + const multiline = option !== "never"; + const allowSingleLine = option === "always-multiline"; + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Tests whether node is preceded by supplied tokens + * @param {ASTNode} node - node to check + * @param {ASTNode} parentNode - parent of node to report + * @param {boolean} expected - whether newline was expected or not + * @returns {void} + * @private + */ + function reportError(node, parentNode, expected) { + context.report({ + node, + message: "{{expected}} newline between {{typeOfError}} of ternary expression.", + data: { + expected: expected ? "Expected" : "Unexpected", + typeOfError: node === parentNode.test ? "test and consequent" : "consequent and alternate" + } + }); + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + ConditionalExpression(node) { + const areTestAndConsequentOnSameLine = astUtils.isTokenOnSameLine(node.test, node.consequent); + const areConsequentAndAlternateOnSameLine = astUtils.isTokenOnSameLine(node.consequent, node.alternate); + + if (!multiline) { + if (!areTestAndConsequentOnSameLine) { + reportError(node.test, node, false); + } + + if (!areConsequentAndAlternateOnSameLine) { + reportError(node.consequent, node, false); + } + } else { + if (allowSingleLine && node.loc.start.line === node.loc.end.line) { + return; + } + + if (areTestAndConsequentOnSameLine) { + reportError(node.test, node, true); + } + + if (areConsequentAndAlternateOnSameLine) { + reportError(node.consequent, node, true); + } + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/new-cap.js b/node_modules/eslint/lib/rules/new-cap.js new file mode 100644 index 0000000..cc33e3b --- /dev/null +++ b/node_modules/eslint/lib/rules/new-cap.js @@ -0,0 +1,273 @@ +/** + * @fileoverview Rule to flag use of constructors without capital letters + * @author Nicholas C. Zakas + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const CAPS_ALLOWED = [ + "Array", + "Boolean", + "Date", + "Error", + "Function", + "Number", + "Object", + "RegExp", + "String", + "Symbol" +]; + +/** + * Ensure that if the key is provided, it must be an array. + * @param {Object} obj Object to check with `key`. + * @param {string} key Object key to check on `obj`. + * @param {*} fallback If obj[key] is not present, this will be returned. + * @returns {string[]} Returns obj[key] if it's an Array, otherwise `fallback` + */ +function checkArray(obj, key, fallback) { + + /* istanbul ignore if */ + if (Object.prototype.hasOwnProperty.call(obj, key) && !Array.isArray(obj[key])) { + throw new TypeError(`${key}, if provided, must be an Array`); + } + return obj[key] || fallback; +} + +/** + * A reducer function to invert an array to an Object mapping the string form of the key, to `true`. + * @param {Object} map Accumulator object for the reduce. + * @param {string} key Object key to set to `true`. + * @returns {Object} Returns the updated Object for further reduction. + */ +function invert(map, key) { + map[key] = true; + return map; +} + +/** + * Creates an object with the cap is new exceptions as its keys and true as their values. + * @param {Object} config Rule configuration + * @returns {Object} Object with cap is new exceptions. + */ +function calculateCapIsNewExceptions(config) { + let capIsNewExceptions = checkArray(config, "capIsNewExceptions", CAPS_ALLOWED); + + if (capIsNewExceptions !== CAPS_ALLOWED) { + capIsNewExceptions = capIsNewExceptions.concat(CAPS_ALLOWED); + } + + return capIsNewExceptions.reduce(invert, {}); +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require constructor names to begin with a capital letter", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/new-cap" + }, + + schema: [ + { + type: "object", + properties: { + newIsCap: { + type: "boolean" + }, + capIsNew: { + type: "boolean" + }, + newIsCapExceptions: { + type: "array", + items: { + type: "string" + } + }, + newIsCapExceptionPattern: { + type: "string" + }, + capIsNewExceptions: { + type: "array", + items: { + type: "string" + } + }, + capIsNewExceptionPattern: { + type: "string" + }, + properties: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + + const config = context.options[0] ? Object.assign({}, context.options[0]) : {}; + + config.newIsCap = config.newIsCap !== false; + config.capIsNew = config.capIsNew !== false; + const skipProperties = config.properties === false; + + const newIsCapExceptions = checkArray(config, "newIsCapExceptions", []).reduce(invert, {}); + const newIsCapExceptionPattern = config.newIsCapExceptionPattern ? new RegExp(config.newIsCapExceptionPattern) : null; + + const capIsNewExceptions = calculateCapIsNewExceptions(config); + const capIsNewExceptionPattern = config.capIsNewExceptionPattern ? new RegExp(config.capIsNewExceptionPattern) : null; + + const listeners = {}; + + const sourceCode = context.getSourceCode(); + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Get exact callee name from expression + * @param {ASTNode} node CallExpression or NewExpression node + * @returns {string} name + */ + function extractNameFromExpression(node) { + + let name = ""; + + if (node.callee.type === "MemberExpression") { + const property = node.callee.property; + + if (property.type === "Literal" && (typeof property.value === "string")) { + name = property.value; + } else if (property.type === "Identifier" && !node.callee.computed) { + name = property.name; + } + } else { + name = node.callee.name; + } + return name; + } + + /** + * Returns the capitalization state of the string - + * Whether the first character is uppercase, lowercase, or non-alphabetic + * @param {string} str String + * @returns {string} capitalization state: "non-alpha", "lower", or "upper" + */ + function getCap(str) { + const firstChar = str.charAt(0); + + const firstCharLower = firstChar.toLowerCase(); + const firstCharUpper = firstChar.toUpperCase(); + + if (firstCharLower === firstCharUpper) { + + // char has no uppercase variant, so it's non-alphabetic + return "non-alpha"; + } + if (firstChar === firstCharLower) { + return "lower"; + } + return "upper"; + + } + + /** + * Check if capitalization is allowed for a CallExpression + * @param {Object} allowedMap Object mapping calleeName to a Boolean + * @param {ASTNode} node CallExpression node + * @param {string} calleeName Capitalized callee name from a CallExpression + * @param {Object} pattern RegExp object from options pattern + * @returns {boolean} Returns true if the callee may be capitalized + */ + function isCapAllowed(allowedMap, node, calleeName, pattern) { + const sourceText = sourceCode.getText(node.callee); + + if (allowedMap[calleeName] || allowedMap[sourceText]) { + return true; + } + + if (pattern && pattern.test(sourceText)) { + return true; + } + + if (calleeName === "UTC" && node.callee.type === "MemberExpression") { + + // allow if callee is Date.UTC + return node.callee.object.type === "Identifier" && + node.callee.object.name === "Date"; + } + + return skipProperties && node.callee.type === "MemberExpression"; + } + + /** + * Reports the given message for the given node. The location will be the start of the property or the callee. + * @param {ASTNode} node CallExpression or NewExpression node. + * @param {string} message The message to report. + * @returns {void} + */ + function report(node, message) { + let callee = node.callee; + + if (callee.type === "MemberExpression") { + callee = callee.property; + } + + context.report({ node, loc: callee.loc.start, message }); + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + if (config.newIsCap) { + listeners.NewExpression = function(node) { + + const constructorName = extractNameFromExpression(node); + + if (constructorName) { + const capitalization = getCap(constructorName); + const isAllowed = capitalization !== "lower" || isCapAllowed(newIsCapExceptions, node, constructorName, newIsCapExceptionPattern); + + if (!isAllowed) { + report(node, "A constructor name should not start with a lowercase letter."); + } + } + }; + } + + if (config.capIsNew) { + listeners.CallExpression = function(node) { + + const calleeName = extractNameFromExpression(node); + + if (calleeName) { + const capitalization = getCap(calleeName); + const isAllowed = capitalization !== "upper" || isCapAllowed(capIsNewExceptions, node, calleeName, capIsNewExceptionPattern); + + if (!isAllowed) { + report(node, "A function with a name starting with an uppercase letter should only be used as a constructor."); + } + } + }; + } + + return listeners; + } +}; diff --git a/node_modules/eslint/lib/rules/new-parens.js b/node_modules/eslint/lib/rules/new-parens.js new file mode 100644 index 0000000..abf2e03 --- /dev/null +++ b/node_modules/eslint/lib/rules/new-parens.js @@ -0,0 +1,59 @@ +/** + * @fileoverview Rule to flag when using constructor without parentheses + * @author Ilya Volodin + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require parentheses when invoking a constructor with no arguments", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/new-parens" + }, + + schema: [], + + fixable: "code" + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + return { + NewExpression(node) { + if (node.arguments.length !== 0) { + return; // shortcut: if there are arguments, there have to be parens + } + + const lastToken = sourceCode.getLastToken(node); + const hasLastParen = lastToken && astUtils.isClosingParenToken(lastToken); + const hasParens = hasLastParen && astUtils.isOpeningParenToken(sourceCode.getTokenBefore(lastToken)); + + if (!hasParens) { + context.report({ + node, + message: "Missing '()' invoking a constructor.", + fix: fixer => fixer.insertTextAfter(node, "()") + }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/newline-after-var.js b/node_modules/eslint/lib/rules/newline-after-var.js new file mode 100644 index 0000000..b11d9d9 --- /dev/null +++ b/node_modules/eslint/lib/rules/newline-after-var.js @@ -0,0 +1,255 @@ +/** + * @fileoverview Rule to check empty newline after "var" statement + * @author Gopal Venkatesan + * @deprecated + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require or disallow an empty line after variable declarations", + category: "Stylistic Issues", + recommended: false, + replacedBy: ["padding-line-between-statements"], + url: "https://eslint.org/docs/rules/newline-after-var" + }, + + schema: [ + { + enum: ["never", "always"] + } + ], + + fixable: "whitespace", + + deprecated: true + }, + + create(context) { + + const ALWAYS_MESSAGE = "Expected blank line after variable declarations.", + NEVER_MESSAGE = "Unexpected blank line after variable declarations."; + + const sourceCode = context.getSourceCode(); + + // Default `mode` to "always". + const mode = context.options[0] === "never" ? "never" : "always"; + + // Cache starting and ending line numbers of comments for faster lookup + const commentEndLine = sourceCode.getAllComments().reduce((result, token) => { + result[token.loc.start.line] = token.loc.end.line; + return result; + }, {}); + + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Gets a token from the given node to compare line to the next statement. + * + * In general, the token is the last token of the node. However, the token is the second last token if the following conditions satisfy. + * + * - The last token is semicolon. + * - The semicolon is on a different line from the previous token of the semicolon. + * + * This behavior would address semicolon-less style code. e.g.: + * + * var foo = 1 + * + * ;(a || b).doSomething() + * + * @param {ASTNode} node - The node to get. + * @returns {Token} The token to compare line to the next statement. + */ + function getLastToken(node) { + const lastToken = sourceCode.getLastToken(node); + + if (lastToken.type === "Punctuator" && lastToken.value === ";") { + const prevToken = sourceCode.getTokenBefore(lastToken); + + if (prevToken.loc.end.line !== lastToken.loc.start.line) { + return prevToken; + } + } + + return lastToken; + } + + /** + * Determine if provided keyword is a variable declaration + * @private + * @param {string} keyword - keyword to test + * @returns {boolean} True if `keyword` is a type of var + */ + function isVar(keyword) { + return keyword === "var" || keyword === "let" || keyword === "const"; + } + + /** + * Determine if provided keyword is a variant of for specifiers + * @private + * @param {string} keyword - keyword to test + * @returns {boolean} True if `keyword` is a variant of for specifier + */ + function isForTypeSpecifier(keyword) { + return keyword === "ForStatement" || keyword === "ForInStatement" || keyword === "ForOfStatement"; + } + + /** + * Determine if provided keyword is an export specifiers + * @private + * @param {string} nodeType - nodeType to test + * @returns {boolean} True if `nodeType` is an export specifier + */ + function isExportSpecifier(nodeType) { + return nodeType === "ExportNamedDeclaration" || nodeType === "ExportSpecifier" || + nodeType === "ExportDefaultDeclaration" || nodeType === "ExportAllDeclaration"; + } + + /** + * Determine if provided node is the last of their parent block. + * @private + * @param {ASTNode} node - node to test + * @returns {boolean} True if `node` is last of their parent block. + */ + function isLastNode(node) { + const token = sourceCode.getTokenAfter(node); + + return !token || (token.type === "Punctuator" && token.value === "}"); + } + + /** + * Gets the last line of a group of consecutive comments + * @param {number} commentStartLine The starting line of the group + * @returns {number} The number of the last comment line of the group + */ + function getLastCommentLineOfBlock(commentStartLine) { + const currentCommentEnd = commentEndLine[commentStartLine]; + + return commentEndLine[currentCommentEnd + 1] ? getLastCommentLineOfBlock(currentCommentEnd + 1) : currentCommentEnd; + } + + /** + * Determine if a token starts more than one line after a comment ends + * @param {token} token The token being checked + * @param {integer} commentStartLine The line number on which the comment starts + * @returns {boolean} True if `token` does not start immediately after a comment + */ + function hasBlankLineAfterComment(token, commentStartLine) { + return token.loc.start.line > getLastCommentLineOfBlock(commentStartLine) + 1; + } + + /** + * Checks that a blank line exists after a variable declaration when mode is + * set to "always", or checks that there is no blank line when mode is set + * to "never" + * @private + * @param {ASTNode} node - `VariableDeclaration` node to test + * @returns {void} + */ + function checkForBlankLine(node) { + + /* + * lastToken is the last token on the node's line. It will usually also be the last token of the node, but it will + * sometimes be second-last if there is a semicolon on a different line. + */ + const lastToken = getLastToken(node), + + /* + * If lastToken is the last token of the node, nextToken should be the token after the node. Otherwise, nextToken + * is the last token of the node. + */ + nextToken = lastToken === sourceCode.getLastToken(node) ? sourceCode.getTokenAfter(node) : sourceCode.getLastToken(node), + nextLineNum = lastToken.loc.end.line + 1; + + // Ignore if there is no following statement + if (!nextToken) { + return; + } + + // Ignore if parent of node is a for variant + if (isForTypeSpecifier(node.parent.type)) { + return; + } + + // Ignore if parent of node is an export specifier + if (isExportSpecifier(node.parent.type)) { + return; + } + + /* + * Some coding styles use multiple `var` statements, so do nothing if + * the next token is a `var` statement. + */ + if (nextToken.type === "Keyword" && isVar(nextToken.value)) { + return; + } + + // Ignore if it is last statement in a block + if (isLastNode(node)) { + return; + } + + // Next statement is not a `var`... + const noNextLineToken = nextToken.loc.start.line > nextLineNum; + const hasNextLineComment = (typeof commentEndLine[nextLineNum] !== "undefined"); + + if (mode === "never" && noNextLineToken && !hasNextLineComment) { + context.report({ + node, + message: NEVER_MESSAGE, + data: { identifier: node.name }, + fix(fixer) { + const linesBetween = sourceCode.getText().slice(lastToken.range[1], nextToken.range[0]).split(astUtils.LINEBREAK_MATCHER); + + return fixer.replaceTextRange([lastToken.range[1], nextToken.range[0]], `${linesBetween.slice(0, -1).join("")}\n${linesBetween[linesBetween.length - 1]}`); + } + }); + } + + // Token on the next line, or comment without blank line + if ( + mode === "always" && ( + !noNextLineToken || + hasNextLineComment && !hasBlankLineAfterComment(nextToken, nextLineNum) + ) + ) { + context.report({ + node, + message: ALWAYS_MESSAGE, + data: { identifier: node.name }, + fix(fixer) { + if ((noNextLineToken ? getLastCommentLineOfBlock(nextLineNum) : lastToken.loc.end.line) === nextToken.loc.start.line) { + return fixer.insertTextBefore(nextToken, "\n\n"); + } + + return fixer.insertTextBeforeRange([nextToken.range[0] - nextToken.loc.start.column, nextToken.range[1]], "\n"); + } + }); + } + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + VariableDeclaration: checkForBlankLine + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/newline-before-return.js b/node_modules/eslint/lib/rules/newline-before-return.js new file mode 100644 index 0000000..5bc1f70 --- /dev/null +++ b/node_modules/eslint/lib/rules/newline-before-return.js @@ -0,0 +1,211 @@ +/** + * @fileoverview Rule to require newlines before `return` statement + * @author Kai Cataldo + * @deprecated + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require an empty line before `return` statements", + category: "Stylistic Issues", + recommended: false, + replacedBy: ["padding-line-between-statements"], + url: "https://eslint.org/docs/rules/newline-before-return" + }, + fixable: "whitespace", + schema: [], + deprecated: true + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Tests whether node is preceded by supplied tokens + * @param {ASTNode} node - node to check + * @param {array} testTokens - array of tokens to test against + * @returns {boolean} Whether or not the node is preceded by one of the supplied tokens + * @private + */ + function isPrecededByTokens(node, testTokens) { + const tokenBefore = sourceCode.getTokenBefore(node); + + return testTokens.some(token => tokenBefore.value === token); + } + + /** + * Checks whether node is the first node after statement or in block + * @param {ASTNode} node - node to check + * @returns {boolean} Whether or not the node is the first node after statement or in block + * @private + */ + function isFirstNode(node) { + const parentType = node.parent.type; + + if (node.parent.body) { + return Array.isArray(node.parent.body) + ? node.parent.body[0] === node + : node.parent.body === node; + } + + if (parentType === "IfStatement") { + return isPrecededByTokens(node, ["else", ")"]); + } + if (parentType === "DoWhileStatement") { + return isPrecededByTokens(node, ["do"]); + } + if (parentType === "SwitchCase") { + return isPrecededByTokens(node, [":"]); + } + return isPrecededByTokens(node, [")"]); + + } + + /** + * Returns the number of lines of comments that precede the node + * @param {ASTNode} node - node to check for overlapping comments + * @param {number} lineNumTokenBefore - line number of previous token, to check for overlapping comments + * @returns {number} Number of lines of comments that precede the node + * @private + */ + function calcCommentLines(node, lineNumTokenBefore) { + const comments = sourceCode.getCommentsBefore(node); + let numLinesComments = 0; + + if (!comments.length) { + return numLinesComments; + } + + comments.forEach(comment => { + numLinesComments++; + + if (comment.type === "Block") { + numLinesComments += comment.loc.end.line - comment.loc.start.line; + } + + // avoid counting lines with inline comments twice + if (comment.loc.start.line === lineNumTokenBefore) { + numLinesComments--; + } + + if (comment.loc.end.line === node.loc.start.line) { + numLinesComments--; + } + }); + + return numLinesComments; + } + + /** + * Returns the line number of the token before the node that is passed in as an argument + * @param {ASTNode} node - The node to use as the start of the calculation + * @returns {number} Line number of the token before `node` + * @private + */ + function getLineNumberOfTokenBefore(node) { + const tokenBefore = sourceCode.getTokenBefore(node); + let lineNumTokenBefore; + + /** + * Global return (at the beginning of a script) is a special case. + * If there is no token before `return`, then we expect no line + * break before the return. Comments are allowed to occupy lines + * before the global return, just no blank lines. + * Setting lineNumTokenBefore to zero in that case results in the + * desired behavior. + */ + if (tokenBefore) { + lineNumTokenBefore = tokenBefore.loc.end.line; + } else { + lineNumTokenBefore = 0; // global return at beginning of script + } + + return lineNumTokenBefore; + } + + /** + * Checks whether node is preceded by a newline + * @param {ASTNode} node - node to check + * @returns {boolean} Whether or not the node is preceded by a newline + * @private + */ + function hasNewlineBefore(node) { + const lineNumNode = node.loc.start.line; + const lineNumTokenBefore = getLineNumberOfTokenBefore(node); + const commentLines = calcCommentLines(node, lineNumTokenBefore); + + return (lineNumNode - lineNumTokenBefore - commentLines) > 1; + } + + /** + * Checks whether it is safe to apply a fix to a given return statement. + * + * The fix is not considered safe if the given return statement has leading comments, + * as we cannot safely determine if the newline should be added before or after the comments. + * For more information, see: https://github.com/eslint/eslint/issues/5958#issuecomment-222767211 + * + * @param {ASTNode} node - The return statement node to check. + * @returns {boolean} `true` if it can fix the node. + * @private + */ + function canFix(node) { + const leadingComments = sourceCode.getCommentsBefore(node); + const lastLeadingComment = leadingComments[leadingComments.length - 1]; + const tokenBefore = sourceCode.getTokenBefore(node); + + if (leadingComments.length === 0) { + return true; + } + + /* + * if the last leading comment ends in the same line as the previous token and + * does not share a line with the `return` node, we can consider it safe to fix. + * Example: + * function a() { + * var b; //comment + * return; + * } + */ + if (lastLeadingComment.loc.end.line === tokenBefore.loc.end.line && + lastLeadingComment.loc.end.line !== node.loc.start.line) { + return true; + } + + return false; + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + ReturnStatement(node) { + if (!isFirstNode(node) && !hasNewlineBefore(node)) { + context.report({ + node, + message: "Expected newline before return statement.", + fix(fixer) { + if (canFix(node)) { + const tokenBefore = sourceCode.getTokenBefore(node); + const newlines = node.loc.start.line === tokenBefore.loc.end.line ? "\n\n" : "\n"; + + return fixer.insertTextBefore(node, newlines); + } + return null; + } + }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/newline-per-chained-call.js b/node_modules/eslint/lib/rules/newline-per-chained-call.js new file mode 100644 index 0000000..9691da4 --- /dev/null +++ b/node_modules/eslint/lib/rules/newline-per-chained-call.js @@ -0,0 +1,104 @@ +/** + * @fileoverview Rule to ensure newline per method call when chaining calls + * @author Rajendra Patil + * @author Burak Yigit Kaya + */ + +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require a newline after each call in a method chain", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/newline-per-chained-call" + }, + fixable: "whitespace", + schema: [{ + type: "object", + properties: { + ignoreChainWithDepth: { + type: "integer", + minimum: 1, + maximum: 10 + } + }, + additionalProperties: false + }] + }, + + create(context) { + + const options = context.options[0] || {}, + ignoreChainWithDepth = options.ignoreChainWithDepth || 2; + + const sourceCode = context.getSourceCode(); + + /** + * Get the prefix of a given MemberExpression node. + * If the MemberExpression node is a computed value it returns a + * left bracket. If not it returns a period. + * + * @param {ASTNode} node - A MemberExpression node to get + * @returns {string} The prefix of the node. + */ + function getPrefix(node) { + return node.computed ? "[" : "."; + } + + /** + * Gets the property text of a given MemberExpression node. + * If the text is multiline, this returns only the first line. + * + * @param {ASTNode} node - A MemberExpression node to get. + * @returns {string} The property text of the node. + */ + function getPropertyText(node) { + const prefix = getPrefix(node); + const lines = sourceCode.getText(node.property).split(astUtils.LINEBREAK_MATCHER); + const suffix = node.computed && lines.length === 1 ? "]" : ""; + + return prefix + lines[0] + suffix; + } + + return { + "CallExpression:exit"(node) { + if (!node.callee || node.callee.type !== "MemberExpression") { + return; + } + + const callee = node.callee; + let parent = callee.object; + let depth = 1; + + while (parent && parent.callee) { + depth += 1; + parent = parent.callee.object; + } + + if (depth > ignoreChainWithDepth && astUtils.isTokenOnSameLine(callee.object, callee.property)) { + context.report({ + node: callee.property, + loc: callee.property.loc.start, + message: "Expected line break before `{{callee}}`.", + data: { + callee: getPropertyText(callee) + }, + fix(fixer) { + const firstTokenAfterObject = sourceCode.getTokenAfter(callee.object, astUtils.isNotClosingParenToken); + + return fixer.insertTextBefore(firstTokenAfterObject, "\n"); + } + }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-alert.js b/node_modules/eslint/lib/rules/no-alert.js new file mode 100644 index 0000000..69d419d --- /dev/null +++ b/node_modules/eslint/lib/rules/no-alert.js @@ -0,0 +1,125 @@ +/** + * @fileoverview Rule to flag use of alert, confirm, prompt + * @author Nicholas C. Zakas + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const getPropertyName = require("../ast-utils").getStaticPropertyName; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks if the given name is a prohibited identifier. + * @param {string} name The name to check + * @returns {boolean} Whether or not the name is prohibited. + */ +function isProhibitedIdentifier(name) { + return /^(alert|confirm|prompt)$/.test(name); +} + +/** + * Finds the eslint-scope reference in the given scope. + * @param {Object} scope The scope to search. + * @param {ASTNode} node The identifier node. + * @returns {Reference|null} Returns the found reference or null if none were found. + */ +function findReference(scope, node) { + const references = scope.references.filter(reference => reference.identifier.range[0] === node.range[0] && + reference.identifier.range[1] === node.range[1]); + + if (references.length === 1) { + return references[0]; + } + return null; +} + +/** + * Checks if the given identifier node is shadowed in the given scope. + * @param {Object} scope The current scope. + * @param {string} node The identifier node to check + * @returns {boolean} Whether or not the name is shadowed. + */ +function isShadowed(scope, node) { + const reference = findReference(scope, node); + + return reference && reference.resolved && reference.resolved.defs.length > 0; +} + +/** + * Checks if the given identifier node is a ThisExpression in the global scope or the global window property. + * @param {Object} scope The current scope. + * @param {string} node The identifier node to check + * @returns {boolean} Whether or not the node is a reference to the global object. + */ +function isGlobalThisReferenceOrGlobalWindow(scope, node) { + if (scope.type === "global" && node.type === "ThisExpression") { + return true; + } + if (node.name === "window") { + return !isShadowed(scope, node); + } + + return false; +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow the use of `alert`, `confirm`, and `prompt`", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-alert" + }, + + schema: [], + + messages: { + unexpected: "Unexpected {{name}}." + } + }, + + create(context) { + return { + CallExpression(node) { + const callee = node.callee, + currentScope = context.getScope(); + + // without window. + if (callee.type === "Identifier") { + const name = callee.name; + + if (!isShadowed(currentScope, callee) && isProhibitedIdentifier(callee.name)) { + context.report({ + node, + messageId: "unexpected", + data: { name } + }); + } + + } else if (callee.type === "MemberExpression" && isGlobalThisReferenceOrGlobalWindow(currentScope, callee.object)) { + const name = getPropertyName(callee); + + if (isProhibitedIdentifier(name)) { + context.report({ + node, + messageId: "unexpected", + data: { name } + }); + } + } + + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-array-constructor.js b/node_modules/eslint/lib/rules/no-array-constructor.js new file mode 100644 index 0000000..51676f7 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-array-constructor.js @@ -0,0 +1,52 @@ +/** + * @fileoverview Disallow construction of dense arrays using the Array constructor + * @author Matt DuVall + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow `Array` constructors", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/no-array-constructor" + }, + + schema: [], + + messages: { + preferLiteral: "The array literal notation [] is preferable." + } + }, + + create(context) { + + /** + * Disallow construction of dense arrays using the Array constructor + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ + function check(node) { + if ( + node.arguments.length !== 1 && + node.callee.type === "Identifier" && + node.callee.name === "Array" + ) { + context.report({ node, messageId: "preferLiteral" }); + } + } + + return { + CallExpression: check, + NewExpression: check + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-await-in-loop.js b/node_modules/eslint/lib/rules/no-await-in-loop.js new file mode 100644 index 0000000..ef0bda9 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-await-in-loop.js @@ -0,0 +1,102 @@ +/** + * @fileoverview Rule to disallow uses of await inside of loops. + * @author Nat Mote (nmote) + */ +"use strict"; + +/** + * Check whether it should stop traversing ancestors at the given node. + * @param {ASTNode} node A node to check. + * @returns {boolean} `true` if it should stop traversing. + */ +function isBoundary(node) { + const t = node.type; + + return ( + t === "FunctionDeclaration" || + t === "FunctionExpression" || + t === "ArrowFunctionExpression" || + + /* + * Don't report the await expressions on for-await-of loop since it's + * asynchronous iteration intentionally. + */ + (t === "ForOfStatement" && node.await === true) + ); +} + +/** + * Check whether the given node is in loop. + * @param {ASTNode} node A node to check. + * @param {ASTNode} parent A parent node to check. + * @returns {boolean} `true` if the node is in loop. + */ +function isLooped(node, parent) { + switch (parent.type) { + case "ForStatement": + return ( + node === parent.test || + node === parent.update || + node === parent.body + ); + + case "ForOfStatement": + case "ForInStatement": + return node === parent.body; + + case "WhileStatement": + case "DoWhileStatement": + return node === parent.test || node === parent.body; + + default: + return false; + } +} + +module.exports = { + meta: { + docs: { + description: "disallow `await` inside of loops", + category: "Possible Errors", + recommended: false, + url: "https://eslint.org/docs/rules/no-await-in-loop" + }, + schema: [], + messages: { + unexpectedAwait: "Unexpected `await` inside a loop." + } + }, + create(context) { + + /** + * Validate an await expression. + * @param {ASTNode} awaitNode An AwaitExpression or ForOfStatement node to validate. + * @returns {void} + */ + function validate(awaitNode) { + if (awaitNode.type === "ForOfStatement" && !awaitNode.await) { + return; + } + + let node = awaitNode; + let parent = node.parent; + + while (parent && !isBoundary(parent)) { + if (isLooped(node, parent)) { + context.report({ + node: awaitNode, + messageId: "unexpectedAwait" + }); + return; + } + node = parent; + parent = parent.parent; + } + } + + return { + AwaitExpression: validate, + ForOfStatement: validate + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-bitwise.js b/node_modules/eslint/lib/rules/no-bitwise.js new file mode 100644 index 0000000..36bbdaf --- /dev/null +++ b/node_modules/eslint/lib/rules/no-bitwise.js @@ -0,0 +1,116 @@ +/** + * @fileoverview Rule to flag bitwise identifiers + * @author Nicholas C. Zakas + */ + +"use strict"; + +/* + * + * Set of bitwise operators. + * + */ +const BITWISE_OPERATORS = [ + "^", "|", "&", "<<", ">>", ">>>", + "^=", "|=", "&=", "<<=", ">>=", ">>>=", + "~" +]; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow bitwise operators", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/no-bitwise" + }, + + schema: [ + { + type: "object", + properties: { + allow: { + type: "array", + items: { + enum: BITWISE_OPERATORS + }, + uniqueItems: true + }, + int32Hint: { + type: "boolean" + } + }, + additionalProperties: false + } + ], + + messages: { + unexpected: "Unexpected use of '{{operator}}'." + } + }, + + create(context) { + const options = context.options[0] || {}; + const allowed = options.allow || []; + const int32Hint = options.int32Hint === true; + + /** + * Reports an unexpected use of a bitwise operator. + * @param {ASTNode} node Node which contains the bitwise operator. + * @returns {void} + */ + function report(node) { + context.report({ node, messageId: "unexpected", data: { operator: node.operator } }); + } + + /** + * Checks if the given node has a bitwise operator. + * @param {ASTNode} node The node to check. + * @returns {boolean} Whether or not the node has a bitwise operator. + */ + function hasBitwiseOperator(node) { + return BITWISE_OPERATORS.indexOf(node.operator) !== -1; + } + + /** + * Checks if exceptions were provided, e.g. `{ allow: ['~', '|'] }`. + * @param {ASTNode} node The node to check. + * @returns {boolean} Whether or not the node has a bitwise operator. + */ + function allowedOperator(node) { + return allowed.indexOf(node.operator) !== -1; + } + + /** + * Checks if the given bitwise operator is used for integer typecasting, i.e. "|0" + * @param {ASTNode} node The node to check. + * @returns {boolean} whether the node is used in integer typecasting. + */ + function isInt32Hint(node) { + return int32Hint && node.operator === "|" && node.right && + node.right.type === "Literal" && node.right.value === 0; + } + + /** + * Report if the given node contains a bitwise operator. + * @param {ASTNode} node The node to check. + * @returns {void} + */ + function checkNodeForBitwiseOperator(node) { + if (hasBitwiseOperator(node) && !allowedOperator(node) && !isInt32Hint(node)) { + report(node); + } + } + + return { + AssignmentExpression: checkNodeForBitwiseOperator, + BinaryExpression: checkNodeForBitwiseOperator, + UnaryExpression: checkNodeForBitwiseOperator + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-buffer-constructor.js b/node_modules/eslint/lib/rules/no-buffer-constructor.js new file mode 100644 index 0000000..2cf2ee4 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-buffer-constructor.js @@ -0,0 +1,41 @@ +/** + * @fileoverview disallow use of the Buffer() constructor + * @author Teddy Katz + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow use of the Buffer() constructor", + category: "Node.js and CommonJS", + recommended: false, + url: "https://eslint.org/docs/rules/no-buffer-constructor" + }, + schema: [], + messages: { + deprecated: "{{expr}} is deprecated. Use Buffer.from(), Buffer.alloc(), or Buffer.allocUnsafe() instead." + } + }, + + create(context) { + + //---------------------------------------------------------------------- + // Public + //---------------------------------------------------------------------- + + return { + "CallExpression[callee.name='Buffer'], NewExpression[callee.name='Buffer']"(node) { + context.report({ + node, + messageId: "deprecated", + data: { expr: node.type === "CallExpression" ? "Buffer()" : "new Buffer()" } + }); + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-caller.js b/node_modules/eslint/lib/rules/no-caller.js new file mode 100644 index 0000000..9756b21 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-caller.js @@ -0,0 +1,44 @@ +/** + * @fileoverview Rule to flag use of arguments.callee and arguments.caller. + * @author Nicholas C. Zakas + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow the use of `arguments.caller` or `arguments.callee`", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-caller" + }, + + schema: [], + + messages: { + unexpected: "Avoid arguments.{{prop}}." + } + }, + + create(context) { + + return { + + MemberExpression(node) { + const objectName = node.object.name, + propertyName = node.property.name; + + if (objectName === "arguments" && !node.computed && propertyName && propertyName.match(/^calle[er]$/)) { + context.report({ node, messageId: "unexpected", data: { prop: propertyName } }); + } + + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-case-declarations.js b/node_modules/eslint/lib/rules/no-case-declarations.js new file mode 100644 index 0000000..862be4c --- /dev/null +++ b/node_modules/eslint/lib/rules/no-case-declarations.js @@ -0,0 +1,62 @@ +/** + * @fileoverview Rule to flag use of an lexical declarations inside a case clause + * @author Erik Arvidsson + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow lexical declarations in case clauses", + category: "Best Practices", + recommended: true, + url: "https://eslint.org/docs/rules/no-case-declarations" + }, + + schema: [], + + messages: { + unexpected: "Unexpected lexical declaration in case block." + } + }, + + create(context) { + + /** + * Checks whether or not a node is a lexical declaration. + * @param {ASTNode} node A direct child statement of a switch case. + * @returns {boolean} Whether or not the node is a lexical declaration. + */ + function isLexicalDeclaration(node) { + switch (node.type) { + case "FunctionDeclaration": + case "ClassDeclaration": + return true; + case "VariableDeclaration": + return node.kind !== "var"; + default: + return false; + } + } + + return { + SwitchCase(node) { + for (let i = 0; i < node.consequent.length; i++) { + const statement = node.consequent[i]; + + if (isLexicalDeclaration(statement)) { + context.report({ + node, + messageId: "unexpected" + }); + } + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-catch-shadow.js b/node_modules/eslint/lib/rules/no-catch-shadow.js new file mode 100644 index 0000000..9077922 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-catch-shadow.js @@ -0,0 +1,74 @@ +/** + * @fileoverview Rule to flag variable leak in CatchClauses in IE 8 and earlier + * @author Ian Christian Myers + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow `catch` clause parameters from shadowing variables in the outer scope", + category: "Variables", + recommended: false, + url: "https://eslint.org/docs/rules/no-catch-shadow" + }, + + schema: [], + + messages: { + mutable: "Value of '{{name}}' may be overwritten in IE 8 and earlier." + } + }, + + create(context) { + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Check if the parameters are been shadowed + * @param {Object} scope current scope + * @param {string} name parameter name + * @returns {boolean} True is its been shadowed + */ + function paramIsShadowing(scope, name) { + return astUtils.getVariableByName(scope, name) !== null; + } + + //-------------------------------------------------------------------------- + // Public API + //-------------------------------------------------------------------------- + + return { + + CatchClause(node) { + let scope = context.getScope(); + + /* + * When ecmaVersion >= 6, CatchClause creates its own scope + * so start from one upper scope to exclude the current node + */ + if (scope.block === node) { + scope = scope.upper; + } + + if (paramIsShadowing(scope, node.param.name)) { + context.report({ node, messageId: "mutable", data: { name: node.param.name } }); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-class-assign.js b/node_modules/eslint/lib/rules/no-class-assign.js new file mode 100644 index 0000000..58dddd6 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-class-assign.js @@ -0,0 +1,59 @@ +/** + * @fileoverview A rule to disallow modifying variables of class declarations + * @author Toru Nagashima + */ + +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow reassigning class members", + category: "ECMAScript 6", + recommended: true, + url: "https://eslint.org/docs/rules/no-class-assign" + }, + + schema: [], + + messages: { + class: "'{{name}}' is a class." + } + }, + + create(context) { + + /** + * Finds and reports references that are non initializer and writable. + * @param {Variable} variable - A variable to check. + * @returns {void} + */ + function checkVariable(variable) { + astUtils.getModifyingReferences(variable.references).forEach(reference => { + context.report({ node: reference.identifier, messageId: "class", data: { name: reference.identifier.name } }); + + }); + } + + /** + * Finds and reports references that are non initializer and writable. + * @param {ASTNode} node - A ClassDeclaration/ClassExpression node to check. + * @returns {void} + */ + function checkForClass(node) { + context.getDeclaredVariables(node).forEach(checkVariable); + } + + return { + ClassDeclaration: checkForClass, + ClassExpression: checkForClass + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-compare-neg-zero.js b/node_modules/eslint/lib/rules/no-compare-neg-zero.js new file mode 100644 index 0000000..6903bd0 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-compare-neg-zero.js @@ -0,0 +1,57 @@ +/** + * @fileoverview The rule should warn against code that tries to compare against -0. + * @author Aladdin-ADD + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow comparing against -0", + category: "Possible Errors", + recommended: true, + url: "https://eslint.org/docs/rules/no-compare-neg-zero" + }, + fixable: null, + schema: [], + messages: { + unexpected: "Do not use the '{{operator}}' operator to compare against -0." + } + }, + + create(context) { + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Checks a given node is -0 + * + * @param {ASTNode} node - A node to check. + * @returns {boolean} `true` if the node is -0. + */ + function isNegZero(node) { + return node.type === "UnaryExpression" && node.operator === "-" && node.argument.type === "Literal" && node.argument.value === 0; + } + const OPERATORS_TO_CHECK = new Set([">", ">=", "<", "<=", "==", "===", "!=", "!=="]); + + return { + BinaryExpression(node) { + if (OPERATORS_TO_CHECK.has(node.operator)) { + if (isNegZero(node.left) || isNegZero(node.right)) { + context.report({ + node, + messageId: "unexpected", + data: { operator: node.operator } + }); + } + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-cond-assign.js b/node_modules/eslint/lib/rules/no-cond-assign.js new file mode 100644 index 0000000..f949bcc --- /dev/null +++ b/node_modules/eslint/lib/rules/no-cond-assign.js @@ -0,0 +1,146 @@ +/** + * @fileoverview Rule to flag assignment in a conditional statement's test expression + * @author Stephen Murray + */ +"use strict"; + +const astUtils = require("../ast-utils"); + +const NODE_DESCRIPTIONS = { + DoWhileStatement: "a 'do...while' statement", + ForStatement: "a 'for' statement", + IfStatement: "an 'if' statement", + WhileStatement: "a 'while' statement" +}; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow assignment operators in conditional expressions", + category: "Possible Errors", + recommended: true, + url: "https://eslint.org/docs/rules/no-cond-assign" + }, + + schema: [ + { + enum: ["except-parens", "always"] + } + ], + + messages: { + unexpected: "Unexpected assignment within {{type}}.", + + // must match JSHint's error message + missing: "Expected a conditional expression and instead saw an assignment." + } + }, + + create(context) { + + const prohibitAssign = (context.options[0] || "except-parens"); + + const sourceCode = context.getSourceCode(); + + /** + * Check whether an AST node is the test expression for a conditional statement. + * @param {!Object} node The node to test. + * @returns {boolean} `true` if the node is the text expression for a conditional statement; otherwise, `false`. + */ + function isConditionalTestExpression(node) { + return node.parent && + node.parent.test && + node === node.parent.test; + } + + /** + * Given an AST node, perform a bottom-up search for the first ancestor that represents a conditional statement. + * @param {!Object} node The node to use at the start of the search. + * @returns {?Object} The closest ancestor node that represents a conditional statement. + */ + function findConditionalAncestor(node) { + let currentAncestor = node; + + do { + if (isConditionalTestExpression(currentAncestor)) { + return currentAncestor.parent; + } + } while ((currentAncestor = currentAncestor.parent) && !astUtils.isFunction(currentAncestor)); + + return null; + } + + /** + * Check whether the code represented by an AST node is enclosed in two sets of parentheses. + * @param {!Object} node The node to test. + * @returns {boolean} `true` if the code is enclosed in two sets of parentheses; otherwise, `false`. + */ + function isParenthesisedTwice(node) { + const previousToken = sourceCode.getTokenBefore(node, 1), + nextToken = sourceCode.getTokenAfter(node, 1); + + return astUtils.isParenthesised(sourceCode, node) && + astUtils.isOpeningParenToken(previousToken) && previousToken.range[1] <= node.range[0] && + astUtils.isClosingParenToken(nextToken) && nextToken.range[0] >= node.range[1]; + } + + /** + * Check a conditional statement's test expression for top-level assignments that are not enclosed in parentheses. + * @param {!Object} node The node for the conditional statement. + * @returns {void} + */ + function testForAssign(node) { + if (node.test && + (node.test.type === "AssignmentExpression") && + (node.type === "ForStatement" + ? !astUtils.isParenthesised(sourceCode, node.test) + : !isParenthesisedTwice(node.test) + ) + ) { + + context.report({ + node, + loc: node.test.loc.start, + messageId: "missing" + }); + } + } + + /** + * Check whether an assignment expression is descended from a conditional statement's test expression. + * @param {!Object} node The node for the assignment expression. + * @returns {void} + */ + function testForConditionalAncestor(node) { + const ancestor = findConditionalAncestor(node); + + if (ancestor) { + context.report({ + node: ancestor, + messageId: "unexpected", + data: { + type: NODE_DESCRIPTIONS[ancestor.type] || ancestor.type + } + }); + } + } + + if (prohibitAssign === "always") { + return { + AssignmentExpression: testForConditionalAncestor + }; + } + + return { + DoWhileStatement: testForAssign, + ForStatement: testForAssign, + IfStatement: testForAssign, + WhileStatement: testForAssign + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-confusing-arrow.js b/node_modules/eslint/lib/rules/no-confusing-arrow.js new file mode 100644 index 0000000..297e3b1 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-confusing-arrow.js @@ -0,0 +1,81 @@ +/** + * @fileoverview A rule to warn against using arrow functions when they could be + * confused with comparisions + * @author Jxck + */ + +"use strict"; + +const astUtils = require("../ast-utils.js"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks whether or not a node is a conditional expression. + * @param {ASTNode} node - node to test + * @returns {boolean} `true` if the node is a conditional expression. + */ +function isConditional(node) { + return node && node.type === "ConditionalExpression"; +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow arrow functions where they could be confused with comparisons", + category: "ECMAScript 6", + recommended: false, + url: "https://eslint.org/docs/rules/no-confusing-arrow" + }, + + fixable: "code", + + schema: [{ + type: "object", + properties: { + allowParens: { type: "boolean" } + }, + additionalProperties: false + }], + + messages: { + confusing: "Arrow function used ambiguously with a conditional expression." + } + }, + + create(context) { + const config = context.options[0] || {}; + const sourceCode = context.getSourceCode(); + + /** + * Reports if an arrow function contains an ambiguous conditional. + * @param {ASTNode} node - A node to check and report. + * @returns {void} + */ + function checkArrowFunc(node) { + const body = node.body; + + if (isConditional(body) && !(config.allowParens && astUtils.isParenthesised(sourceCode, body))) { + context.report({ + node, + messageId: "confusing", + fix(fixer) { + + // if `allowParens` is not set to true dont bother wrapping in parens + return config.allowParens && fixer.replaceText(node.body, `(${sourceCode.getText(node.body)})`); + } + }); + } + } + + return { + ArrowFunctionExpression: checkArrowFunc + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-console.js b/node_modules/eslint/lib/rules/no-console.js new file mode 100644 index 0000000..fd5c33a --- /dev/null +++ b/node_modules/eslint/lib/rules/no-console.js @@ -0,0 +1,136 @@ +/** + * @fileoverview Rule to flag use of console object + * @author Nicholas C. Zakas + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow the use of `console`", + category: "Possible Errors", + recommended: true, + url: "https://eslint.org/docs/rules/no-console" + }, + + schema: [ + { + type: "object", + properties: { + allow: { + type: "array", + items: { + type: "string" + }, + minItems: 1, + uniqueItems: true + } + }, + additionalProperties: false + } + ], + + messages: { + unexpected: "Unexpected console statement." + } + }, + + create(context) { + const options = context.options[0] || {}; + const allowed = options.allow || []; + + /** + * Checks whether the given reference is 'console' or not. + * + * @param {eslint-scope.Reference} reference - The reference to check. + * @returns {boolean} `true` if the reference is 'console'. + */ + function isConsole(reference) { + const id = reference.identifier; + + return id && id.name === "console"; + } + + /** + * Checks whether the property name of the given MemberExpression node + * is allowed by options or not. + * + * @param {ASTNode} node - The MemberExpression node to check. + * @returns {boolean} `true` if the property name of the node is allowed. + */ + function isAllowed(node) { + const propertyName = astUtils.getStaticPropertyName(node); + + return propertyName && allowed.indexOf(propertyName) !== -1; + } + + /** + * Checks whether the given reference is a member access which is not + * allowed by options or not. + * + * @param {eslint-scope.Reference} reference - The reference to check. + * @returns {boolean} `true` if the reference is a member access which + * is not allowed by options. + */ + function isMemberAccessExceptAllowed(reference) { + const node = reference.identifier; + const parent = node.parent; + + return ( + parent.type === "MemberExpression" && + parent.object === node && + !isAllowed(parent) + ); + } + + /** + * Reports the given reference as a violation. + * + * @param {eslint-scope.Reference} reference - The reference to report. + * @returns {void} + */ + function report(reference) { + const node = reference.identifier.parent; + + context.report({ + node, + loc: node.loc, + messageId: "unexpected" + }); + } + + return { + "Program:exit"() { + const scope = context.getScope(); + const consoleVar = astUtils.getVariableByName(scope, "console"); + const shadowed = consoleVar && consoleVar.defs.length > 0; + + /* + * 'scope.through' includes all references to undefined + * variables. If the variable 'console' is not defined, it uses + * 'scope.through'. + */ + const references = consoleVar + ? consoleVar.references + : scope.through.filter(isConsole); + + if (!shadowed) { + references + .filter(isMemberAccessExceptAllowed) + .forEach(report); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-const-assign.js b/node_modules/eslint/lib/rules/no-const-assign.js new file mode 100644 index 0000000..043fe05 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-const-assign.js @@ -0,0 +1,52 @@ +/** + * @fileoverview A rule to disallow modifying variables that are declared using `const` + * @author Toru Nagashima + */ + +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow reassigning `const` variables", + category: "ECMAScript 6", + recommended: true, + url: "https://eslint.org/docs/rules/no-const-assign" + }, + + schema: [], + + messages: { + const: "'{{name}}' is constant." + } + }, + + create(context) { + + /** + * Finds and reports references that are non initializer and writable. + * @param {Variable} variable - A variable to check. + * @returns {void} + */ + function checkVariable(variable) { + astUtils.getModifyingReferences(variable.references).forEach(reference => { + context.report({ node: reference.identifier, messageId: "const", data: { name: reference.identifier.name } }); + }); + } + + return { + VariableDeclaration(node) { + if (node.kind === "const") { + context.getDeclaredVariables(node).forEach(checkVariable); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-constant-condition.js b/node_modules/eslint/lib/rules/no-constant-condition.js new file mode 100644 index 0000000..724da97 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-constant-condition.js @@ -0,0 +1,214 @@ +/** + * @fileoverview Rule to flag use constant conditions + * @author Christian Schulz + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow constant expressions in conditions", + category: "Possible Errors", + recommended: true, + url: "https://eslint.org/docs/rules/no-constant-condition" + }, + + schema: [ + { + type: "object", + properties: { + checkLoops: { + type: "boolean" + } + }, + additionalProperties: false + } + ], + + messages: { + unexpected: "Unexpected constant condition." + } + }, + + create(context) { + const options = context.options[0] || {}, + checkLoops = options.checkLoops !== false, + loopSetStack = []; + + let loopsInCurrentScope = new Set(); + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + + /** + * Checks if a branch node of LogicalExpression short circuits the whole condition + * @param {ASTNode} node The branch of main condition which needs to be checked + * @param {string} operator The operator of the main LogicalExpression. + * @returns {boolean} true when condition short circuits whole condition + */ + function isLogicalIdentity(node, operator) { + switch (node.type) { + case "Literal": + return (operator === "||" && node.value === true) || + (operator === "&&" && node.value === false); + + case "UnaryExpression": + return (operator === "&&" && node.operator === "void"); + + case "LogicalExpression": + return isLogicalIdentity(node.left, node.operator) || + isLogicalIdentity(node.right, node.operator); + + // no default + } + return false; + } + + /** + * Checks if a node has a constant truthiness value. + * @param {ASTNode} node The AST node to check. + * @param {boolean} inBooleanPosition `false` if checking branch of a condition. + * `true` in all other cases + * @returns {Bool} true when node's truthiness is constant + * @private + */ + function isConstant(node, inBooleanPosition) { + switch (node.type) { + case "Literal": + case "ArrowFunctionExpression": + case "FunctionExpression": + case "ObjectExpression": + case "ArrayExpression": + return true; + + case "UnaryExpression": + if (node.operator === "void") { + return true; + } + + return (node.operator === "typeof" && inBooleanPosition) || + isConstant(node.argument, true); + + case "BinaryExpression": + return isConstant(node.left, false) && + isConstant(node.right, false) && + node.operator !== "in"; + + case "LogicalExpression": { + const isLeftConstant = isConstant(node.left, inBooleanPosition); + const isRightConstant = isConstant(node.right, inBooleanPosition); + const isLeftShortCircuit = (isLeftConstant && isLogicalIdentity(node.left, node.operator)); + const isRightShortCircuit = (isRightConstant && isLogicalIdentity(node.right, node.operator)); + + return (isLeftConstant && isRightConstant) || isLeftShortCircuit || isRightShortCircuit; + } + + case "AssignmentExpression": + return (node.operator === "=") && isConstant(node.right, inBooleanPosition); + + case "SequenceExpression": + return isConstant(node.expressions[node.expressions.length - 1], inBooleanPosition); + + // no default + } + return false; + } + + /** + * Tracks when the given node contains a constant condition. + * @param {ASTNode} node The AST node to check. + * @returns {void} + * @private + */ + function trackConstantConditionLoop(node) { + if (node.test && isConstant(node.test, true)) { + loopsInCurrentScope.add(node); + } + } + + /** + * Reports when the set contains the given constant condition node + * @param {ASTNode} node The AST node to check. + * @returns {void} + * @private + */ + function checkConstantConditionLoopInSet(node) { + if (loopsInCurrentScope.has(node)) { + loopsInCurrentScope.delete(node); + context.report({ node: node.test, messageId: "unexpected" }); + } + } + + /** + * Reports when the given node contains a constant condition. + * @param {ASTNode} node The AST node to check. + * @returns {void} + * @private + */ + function reportIfConstant(node) { + if (node.test && isConstant(node.test, true)) { + context.report({ node: node.test, messageId: "unexpected" }); + } + } + + /** + * Stores current set of constant loops in loopSetStack temporarily + * and uses a new set to track constant loops + * @returns {void} + * @private + */ + function enterFunction() { + loopSetStack.push(loopsInCurrentScope); + loopsInCurrentScope = new Set(); + } + + /** + * Reports when the set still contains stored constant conditions + * @param {ASTNode} node The AST node to check. + * @returns {void} + * @private + */ + function exitFunction() { + loopsInCurrentScope = loopSetStack.pop(); + } + + /** + * Checks node when checkLoops option is enabled + * @param {ASTNode} node The AST node to check. + * @returns {void} + * @private + */ + function checkLoop(node) { + if (checkLoops) { + trackConstantConditionLoop(node); + } + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + ConditionalExpression: reportIfConstant, + IfStatement: reportIfConstant, + WhileStatement: checkLoop, + "WhileStatement:exit": checkConstantConditionLoopInSet, + DoWhileStatement: checkLoop, + "DoWhileStatement:exit": checkConstantConditionLoopInSet, + ForStatement: checkLoop, + "ForStatement > .test": node => checkLoop(node.parent), + "ForStatement:exit": checkConstantConditionLoopInSet, + FunctionDeclaration: enterFunction, + "FunctionDeclaration:exit": exitFunction, + YieldExpression: () => loopsInCurrentScope.clear() + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-continue.js b/node_modules/eslint/lib/rules/no-continue.js new file mode 100644 index 0000000..3075b77 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-continue.js @@ -0,0 +1,37 @@ +/** + * @fileoverview Rule to flag use of continue statement + * @author Borislav Zhivkov + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow `continue` statements", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/no-continue" + }, + + schema: [], + + messages: { + unexpected: "Unexpected use of continue statement." + } + }, + + create(context) { + + return { + ContinueStatement(node) { + context.report({ node, messageId: "unexpected" }); + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-control-regex.js b/node_modules/eslint/lib/rules/no-control-regex.js new file mode 100644 index 0000000..e3afce7 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-control-regex.js @@ -0,0 +1,132 @@ +/** + * @fileoverview Rule to forbid control charactes from regular expressions. + * @author Nicholas C. Zakas + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow control characters in regular expressions", + category: "Possible Errors", + recommended: true, + url: "https://eslint.org/docs/rules/no-control-regex" + }, + + schema: [], + + messages: { + unexpected: "Unexpected control character(s) in regular expression: {{controlChars}}." + } + }, + + create(context) { + + /** + * Get the regex expression + * @param {ASTNode} node node to evaluate + * @returns {RegExp|null} Regex if found else null + * @private + */ + function getRegExp(node) { + if (node.value instanceof RegExp) { + return node.value; + } + if (typeof node.value === "string") { + + const parent = context.getAncestors().pop(); + + if ((parent.type === "NewExpression" || parent.type === "CallExpression") && + parent.callee.type === "Identifier" && parent.callee.name === "RegExp" + ) { + + // there could be an invalid regular expression string + try { + return new RegExp(node.value); + } catch (ex) { + return null; + } + } + } + + return null; + } + + + const controlChar = /[\x00-\x1f]/g; // eslint-disable-line no-control-regex + const consecutiveSlashes = /\\+/g; + const consecutiveSlashesAtEnd = /\\+$/g; + const stringControlChar = /\\x[01][0-9a-f]/ig; + const stringControlCharWithoutSlash = /x[01][0-9a-f]/ig; + + /** + * Return a list of the control characters in the given regex string + * @param {string} regexStr regex as string to check + * @returns {array} returns a list of found control characters on given string + * @private + */ + function getControlCharacters(regexStr) { + + // check control characters, if RegExp object used + const controlChars = regexStr.match(controlChar) || []; + + let stringControlChars = []; + + // check substr, if regex literal used + const subStrIndex = regexStr.search(stringControlChar); + + if (subStrIndex > -1) { + + // is it escaped, check backslash count + const possibleEscapeCharacters = regexStr.slice(0, subStrIndex).match(consecutiveSlashesAtEnd); + + const hasControlChars = possibleEscapeCharacters === null || !(possibleEscapeCharacters[0].length % 2); + + if (hasControlChars) { + stringControlChars = regexStr.slice(subStrIndex, -1) + .split(consecutiveSlashes) + .filter(Boolean) + .map(x => { + const match = x.match(stringControlCharWithoutSlash) || [x]; + + return `\\${match[0]}`; + }); + } + } + + return controlChars.map(x => { + const hexCode = `0${x.charCodeAt(0).toString(16)}`.slice(-2); + + return `\\x${hexCode}`; + }).concat(stringControlChars); + } + + return { + Literal(node) { + const regex = getRegExp(node); + + if (regex) { + const computedValue = regex.toString(); + + const controlCharacters = getControlCharacters(computedValue); + + if (controlCharacters.length > 0) { + context.report({ + node, + messageId: "unexpected", + data: { + controlChars: controlCharacters.join(", ") + } + }); + } + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-debugger.js b/node_modules/eslint/lib/rules/no-debugger.js new file mode 100644 index 0000000..f00e819 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-debugger.js @@ -0,0 +1,47 @@ +/** + * @fileoverview Rule to flag use of a debugger statement + * @author Nicholas C. Zakas + */ + +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow the use of `debugger`", + category: "Possible Errors", + recommended: true, + url: "https://eslint.org/docs/rules/no-debugger" + }, + fixable: "code", + schema: [], + messages: { + unexpected: "Unexpected 'debugger' statement." + } + }, + + create(context) { + + return { + DebuggerStatement(node) { + context.report({ + node, + messageId: "unexpected", + fix(fixer) { + if (astUtils.STATEMENT_LIST_PARENTS.has(node.parent.type)) { + return fixer.remove(node); + } + return null; + } + }); + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-delete-var.js b/node_modules/eslint/lib/rules/no-delete-var.js new file mode 100644 index 0000000..f54a396 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-delete-var.js @@ -0,0 +1,40 @@ +/** + * @fileoverview Rule to flag when deleting variables + * @author Ilya Volodin + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow deleting variables", + category: "Variables", + recommended: true, + url: "https://eslint.org/docs/rules/no-delete-var" + }, + + schema: [], + + messages: { + unexpected: "Variables should not be deleted." + } + }, + + create(context) { + + return { + + UnaryExpression(node) { + if (node.operator === "delete" && node.argument.type === "Identifier") { + context.report({ node, messageId: "unexpected" }); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-div-regex.js b/node_modules/eslint/lib/rules/no-div-regex.js new file mode 100644 index 0000000..c050249 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-div-regex.js @@ -0,0 +1,43 @@ +/** + * @fileoverview Rule to check for ambiguous div operator in regexes + * @author Matt DuVall + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow division operators explicitly at the beginning of regular expressions", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-div-regex" + }, + + schema: [], + + messages: { + unexpected: "A regular expression literal can be confused with '/='." + } + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + return { + + Literal(node) { + const token = sourceCode.getFirstToken(node); + + if (token.type === "RegularExpression" && token.value[1] === "=") { + context.report({ node, messageId: "unexpected" }); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-dupe-args.js b/node_modules/eslint/lib/rules/no-dupe-args.js new file mode 100644 index 0000000..e5a7f41 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-dupe-args.js @@ -0,0 +1,78 @@ +/** + * @fileoverview Rule to flag duplicate arguments + * @author Jamund Ferguson + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow duplicate arguments in `function` definitions", + category: "Possible Errors", + recommended: true, + url: "https://eslint.org/docs/rules/no-dupe-args" + }, + + schema: [], + + messages: { + unexpected: "Duplicate param '{{name}}'." + } + }, + + create(context) { + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Checks whether or not a given definition is a parameter's. + * @param {eslint-scope.DefEntry} def - A definition to check. + * @returns {boolean} `true` if the definition is a parameter's. + */ + function isParameter(def) { + return def.type === "Parameter"; + } + + /** + * Determines if a given node has duplicate parameters. + * @param {ASTNode} node The node to check. + * @returns {void} + * @private + */ + function checkParams(node) { + const variables = context.getDeclaredVariables(node); + + for (let i = 0; i < variables.length; ++i) { + const variable = variables[i]; + + // Checks and reports duplications. + const defs = variable.defs.filter(isParameter); + + if (defs.length >= 2) { + context.report({ + node, + messageId: "unexpected", + data: { name: variable.name } + }); + } + } + } + + //-------------------------------------------------------------------------- + // Public API + //-------------------------------------------------------------------------- + + return { + FunctionDeclaration: checkParams, + FunctionExpression: checkParams + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-dupe-class-members.js b/node_modules/eslint/lib/rules/no-dupe-class-members.js new file mode 100644 index 0000000..d0fc359 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-dupe-class-members.js @@ -0,0 +1,114 @@ +/** + * @fileoverview A rule to disallow duplicate name in class members. + * @author Toru Nagashima + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow duplicate class members", + category: "ECMAScript 6", + recommended: true, + url: "https://eslint.org/docs/rules/no-dupe-class-members" + }, + + schema: [], + + messages: { + unexpected: "Duplicate name '{{name}}'." + } + }, + + create(context) { + let stack = []; + + /** + * Gets state of a given member name. + * @param {string} name - A name of a member. + * @param {boolean} isStatic - A flag which specifies that is a static member. + * @returns {Object} A state of a given member name. + * - retv.init {boolean} A flag which shows the name is declared as normal member. + * - retv.get {boolean} A flag which shows the name is declared as getter. + * - retv.set {boolean} A flag which shows the name is declared as setter. + */ + function getState(name, isStatic) { + const stateMap = stack[stack.length - 1]; + const key = `$${name}`; // to avoid "__proto__". + + if (!stateMap[key]) { + stateMap[key] = { + nonStatic: { init: false, get: false, set: false }, + static: { init: false, get: false, set: false } + }; + } + + return stateMap[key][isStatic ? "static" : "nonStatic"]; + } + + /** + * Gets the name text of a given node. + * + * @param {ASTNode} node - A node to get the name. + * @returns {string} The name text of the node. + */ + function getName(node) { + switch (node.type) { + case "Identifier": return node.name; + case "Literal": return String(node.value); + + /* istanbul ignore next: syntax error */ + default: return ""; + } + } + + return { + + // Initializes the stack of state of member declarations. + Program() { + stack = []; + }, + + // Initializes state of member declarations for the class. + ClassBody() { + stack.push(Object.create(null)); + }, + + // Disposes the state for the class. + "ClassBody:exit"() { + stack.pop(); + }, + + // Reports the node if its name has been declared already. + MethodDefinition(node) { + if (node.computed) { + return; + } + + const name = getName(node.key); + const state = getState(name, node.static); + let isDuplicate = false; + + if (node.kind === "get") { + isDuplicate = (state.init || state.get); + state.get = true; + } else if (node.kind === "set") { + isDuplicate = (state.init || state.set); + state.set = true; + } else { + isDuplicate = (state.init || state.get || state.set); + state.init = true; + } + + if (isDuplicate) { + context.report({ node, messageId: "unexpected", data: { name } }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-dupe-keys.js b/node_modules/eslint/lib/rules/no-dupe-keys.js new file mode 100644 index 0000000..577710c --- /dev/null +++ b/node_modules/eslint/lib/rules/no-dupe-keys.js @@ -0,0 +1,140 @@ +/** + * @fileoverview Rule to flag use of duplicate keys in an object. + * @author Ian Christian Myers + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const GET_KIND = /^(?:init|get)$/; +const SET_KIND = /^(?:init|set)$/; + +/** + * The class which stores properties' information of an object. + */ +class ObjectInfo { + + /** + * @param {ObjectInfo|null} upper - The information of the outer object. + * @param {ASTNode} node - The ObjectExpression node of this information. + */ + constructor(upper, node) { + this.upper = upper; + this.node = node; + this.properties = new Map(); + } + + /** + * Gets the information of the given Property node. + * @param {ASTNode} node - The Property node to get. + * @returns {{get: boolean, set: boolean}} The information of the property. + */ + getPropertyInfo(node) { + const name = astUtils.getStaticPropertyName(node); + + if (!this.properties.has(name)) { + this.properties.set(name, { get: false, set: false }); + } + return this.properties.get(name); + } + + /** + * Checks whether the given property has been defined already or not. + * @param {ASTNode} node - The Property node to check. + * @returns {boolean} `true` if the property has been defined. + */ + isPropertyDefined(node) { + const entry = this.getPropertyInfo(node); + + return ( + (GET_KIND.test(node.kind) && entry.get) || + (SET_KIND.test(node.kind) && entry.set) + ); + } + + /** + * Defines the given property. + * @param {ASTNode} node - The Property node to define. + * @returns {void} + */ + defineProperty(node) { + const entry = this.getPropertyInfo(node); + + if (GET_KIND.test(node.kind)) { + entry.get = true; + } + if (SET_KIND.test(node.kind)) { + entry.set = true; + } + } +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow duplicate keys in object literals", + category: "Possible Errors", + recommended: true, + url: "https://eslint.org/docs/rules/no-dupe-keys" + }, + + schema: [], + + messages: { + unexpected: "Duplicate key '{{name}}'." + } + }, + + create(context) { + let info = null; + + return { + ObjectExpression(node) { + info = new ObjectInfo(info, node); + }, + "ObjectExpression:exit"() { + info = info.upper; + }, + + Property(node) { + const name = astUtils.getStaticPropertyName(node); + + // Skip destructuring. + if (node.parent.type !== "ObjectExpression") { + return; + } + + // Skip if the name is not static. + if (!name) { + return; + } + + // Reports if the name is defined already. + if (info.isPropertyDefined(node)) { + context.report({ + node: info.node, + loc: node.key.loc, + messageId: "unexpected", + data: { name } + }); + } + + // Update info. + info.defineProperty(node); + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-duplicate-case.js b/node_modules/eslint/lib/rules/no-duplicate-case.js new file mode 100644 index 0000000..128b1fc --- /dev/null +++ b/node_modules/eslint/lib/rules/no-duplicate-case.js @@ -0,0 +1,48 @@ +/** + * @fileoverview Rule to disallow a duplicate case label. + * @author Dieter Oberkofler + * @author Burak Yigit Kaya + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow duplicate case labels", + category: "Possible Errors", + recommended: true, + url: "https://eslint.org/docs/rules/no-duplicate-case" + }, + + schema: [], + + messages: { + unexpected: "Duplicate case label." + } + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + return { + SwitchStatement(node) { + const mapping = {}; + + node.cases.forEach(switchCase => { + const key = sourceCode.getText(switchCase.test); + + if (mapping[key]) { + context.report({ node: switchCase, messageId: "unexpected" }); + } else { + mapping[key] = switchCase; + } + }); + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-duplicate-imports.js b/node_modules/eslint/lib/rules/no-duplicate-imports.js new file mode 100644 index 0000000..32071da --- /dev/null +++ b/node_modules/eslint/lib/rules/no-duplicate-imports.js @@ -0,0 +1,138 @@ +/** + * @fileoverview Restrict usage of duplicate imports. + * @author Simen Bekkhus + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +/** + * Returns the name of the module imported or re-exported. + * + * @param {ASTNode} node - A node to get. + * @returns {string} the name of the module, or empty string if no name. + */ +function getValue(node) { + if (node && node.source && node.source.value) { + return node.source.value.trim(); + } + + return ""; +} + +/** + * Checks if the name of the import or export exists in the given array, and reports if so. + * + * @param {RuleContext} context - The ESLint rule context object. + * @param {ASTNode} node - A node to get. + * @param {string} value - The name of the imported or exported module. + * @param {string[]} array - The array containing other imports or exports in the file. + * @param {string} message - A message to be reported after the name of the module + * + * @returns {void} No return value + */ +function checkAndReport(context, node, value, array, message) { + if (array.indexOf(value) !== -1) { + context.report({ + node, + message: "'{{module}}' {{message}}", + data: { + module: value, + message + } + }); + } +} + +/** + * @callback nodeCallback + * @param {ASTNode} node - A node to handle. + */ + +/** + * Returns a function handling the imports of a given file + * + * @param {RuleContext} context - The ESLint rule context object. + * @param {boolean} includeExports - Whether or not to check for exports in addition to imports. + * @param {string[]} importsInFile - The array containing other imports in the file. + * @param {string[]} exportsInFile - The array containing other exports in the file. + * + * @returns {nodeCallback} A function passed to ESLint to handle the statement. + */ +function handleImports(context, includeExports, importsInFile, exportsInFile) { + return function(node) { + const value = getValue(node); + + if (value) { + checkAndReport(context, node, value, importsInFile, "import is duplicated."); + + if (includeExports) { + checkAndReport(context, node, value, exportsInFile, "import is duplicated as export."); + } + + importsInFile.push(value); + } + }; +} + +/** + * Returns a function handling the exports of a given file + * + * @param {RuleContext} context - The ESLint rule context object. + * @param {string[]} importsInFile - The array containing other imports in the file. + * @param {string[]} exportsInFile - The array containing other exports in the file. + * + * @returns {nodeCallback} A function passed to ESLint to handle the statement. + */ +function handleExports(context, importsInFile, exportsInFile) { + return function(node) { + const value = getValue(node); + + if (value) { + checkAndReport(context, node, value, exportsInFile, "export is duplicated."); + checkAndReport(context, node, value, importsInFile, "export is duplicated as import."); + + exportsInFile.push(value); + } + }; +} + +module.exports = { + meta: { + docs: { + description: "disallow duplicate module imports", + category: "ECMAScript 6", + recommended: false, + url: "https://eslint.org/docs/rules/no-duplicate-imports" + }, + + schema: [{ + type: "object", + properties: { + includeExports: { + type: "boolean" + } + }, + additionalProperties: false + }] + }, + + create(context) { + const includeExports = (context.options[0] || {}).includeExports, + importsInFile = [], + exportsInFile = []; + + const handlers = { + ImportDeclaration: handleImports(context, includeExports, importsInFile, exportsInFile) + }; + + if (includeExports) { + handlers.ExportNamedDeclaration = handleExports(context, importsInFile, exportsInFile); + handlers.ExportAllDeclaration = handleExports(context, importsInFile, exportsInFile); + } + + return handlers; + } +}; diff --git a/node_modules/eslint/lib/rules/no-else-return.js b/node_modules/eslint/lib/rules/no-else-return.js new file mode 100644 index 0000000..015cedd --- /dev/null +++ b/node_modules/eslint/lib/rules/no-else-return.js @@ -0,0 +1,282 @@ +/** + * @fileoverview Rule to flag `else` after a `return` in `if` + * @author Ian Christian Myers + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); +const FixTracker = require("../util/fix-tracker"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow `else` blocks after `return` statements in `if` statements", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-else-return" + }, + + schema: [{ + type: "object", + properties: { + allowElseIf: { + type: "boolean" + } + }, + additionalProperties: false + }], + + fixable: "code", + + messages: { + unexpected: "Unnecessary 'else' after 'return'." + } + }, + + create(context) { + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Display the context report if rule is violated + * + * @param {Node} node The 'else' node + * @returns {void} + */ + function displayReport(node) { + context.report({ + node, + messageId: "unexpected", + fix: fixer => { + const sourceCode = context.getSourceCode(); + const startToken = sourceCode.getFirstToken(node); + const elseToken = sourceCode.getTokenBefore(startToken); + const source = sourceCode.getText(node); + const lastIfToken = sourceCode.getTokenBefore(elseToken); + let fixedSource, firstTokenOfElseBlock; + + if (startToken.type === "Punctuator" && startToken.value === "{") { + firstTokenOfElseBlock = sourceCode.getTokenAfter(startToken); + } else { + firstTokenOfElseBlock = startToken; + } + + /* + * If the if block does not have curly braces and does not end in a semicolon + * and the else block starts with (, [, /, +, ` or -, then it is not + * safe to remove the else keyword, because ASI will not add a semicolon + * after the if block + */ + const ifBlockMaybeUnsafe = node.parent.consequent.type !== "BlockStatement" && lastIfToken.value !== ";"; + const elseBlockUnsafe = /^[([/+`-]/.test(firstTokenOfElseBlock.value); + + if (ifBlockMaybeUnsafe && elseBlockUnsafe) { + return null; + } + + const endToken = sourceCode.getLastToken(node); + const lastTokenOfElseBlock = sourceCode.getTokenBefore(endToken); + + if (lastTokenOfElseBlock.value !== ";") { + const nextToken = sourceCode.getTokenAfter(endToken); + + const nextTokenUnsafe = nextToken && /^[([/+`-]/.test(nextToken.value); + const nextTokenOnSameLine = nextToken && nextToken.loc.start.line === lastTokenOfElseBlock.loc.start.line; + + /* + * If the else block contents does not end in a semicolon, + * and the else block starts with (, [, /, +, ` or -, then it is not + * safe to remove the else block, because ASI will not add a semicolon + * after the remaining else block contents + */ + if (nextTokenUnsafe || (nextTokenOnSameLine && nextToken.value !== "}")) { + return null; + } + } + + if (startToken.type === "Punctuator" && startToken.value === "{") { + fixedSource = source.slice(1, -1); + } else { + fixedSource = source; + } + + /* + * Extend the replacement range to include the entire + * function to avoid conflicting with no-useless-return. + * https://github.com/eslint/eslint/issues/8026 + */ + return new FixTracker(fixer, sourceCode) + .retainEnclosingFunction(node) + .replaceTextRange([elseToken.range[0], node.range[1]], fixedSource); + } + }); + } + + /** + * Check to see if the node is a ReturnStatement + * + * @param {Node} node The node being evaluated + * @returns {boolean} True if node is a return + */ + function checkForReturn(node) { + return node.type === "ReturnStatement"; + } + + /** + * Naive return checking, does not iterate through the whole + * BlockStatement because we make the assumption that the ReturnStatement + * will be the last node in the body of the BlockStatement. + * + * @param {Node} node The consequent/alternate node + * @returns {boolean} True if it has a return + */ + function naiveHasReturn(node) { + if (node.type === "BlockStatement") { + const body = node.body, + lastChildNode = body[body.length - 1]; + + return lastChildNode && checkForReturn(lastChildNode); + } + return checkForReturn(node); + } + + /** + * Check to see if the node is valid for evaluation, + * meaning it has an else. + * + * @param {Node} node The node being evaluated + * @returns {boolean} True if the node is valid + */ + function hasElse(node) { + return node.alternate && node.consequent; + } + + /** + * If the consequent is an IfStatement, check to see if it has an else + * and both its consequent and alternate path return, meaning this is + * a nested case of rule violation. If-Else not considered currently. + * + * @param {Node} node The consequent node + * @returns {boolean} True if this is a nested rule violation + */ + function checkForIf(node) { + return node.type === "IfStatement" && hasElse(node) && + naiveHasReturn(node.alternate) && naiveHasReturn(node.consequent); + } + + /** + * Check the consequent/body node to make sure it is not + * a ReturnStatement or an IfStatement that returns on both + * code paths. + * + * @param {Node} node The consequent or body node + * @param {Node} alternate The alternate node + * @returns {boolean} `true` if it is a Return/If node that always returns. + */ + function checkForReturnOrIf(node) { + return checkForReturn(node) || checkForIf(node); + } + + + /** + * Check whether a node returns in every codepath. + * @param {Node} node The node to be checked + * @returns {boolean} `true` if it returns on every codepath. + */ + function alwaysReturns(node) { + if (node.type === "BlockStatement") { + + // If we have a BlockStatement, check each consequent body node. + return node.body.some(checkForReturnOrIf); + } + + /* + * If not a block statement, make sure the consequent isn't a + * ReturnStatement or an IfStatement with returns on both paths. + */ + return checkForReturnOrIf(node); + } + + + /** + * Check the if statement, but don't catch else-if blocks. + * @returns {void} + * @param {Node} node The node for the if statement to check + * @private + */ + function checkIfWithoutElse(node) { + const parent = node.parent; + let consequents, + alternate; + + /* + * Fixing this would require splitting one statement into two, so no error should + * be reported if this node is in a position where only one statement is allowed. + */ + if (!astUtils.STATEMENT_LIST_PARENTS.has(parent.type)) { + return; + } + + for (consequents = []; node.type === "IfStatement"; node = node.alternate) { + if (!node.alternate) { + return; + } + consequents.push(node.consequent); + alternate = node.alternate; + } + + if (consequents.every(alwaysReturns)) { + displayReport(alternate); + } + } + + /** + * Check the if statement + * @returns {void} + * @param {Node} node The node for the if statement to check + * @private + */ + function checkIfWithElse(node) { + const parent = node.parent; + + + /* + * Fixing this would require splitting one statement into two, so no error should + * be reported if this node is in a position where only one statement is allowed. + */ + if (!astUtils.STATEMENT_LIST_PARENTS.has(parent.type)) { + return; + } + + const alternate = node.alternate; + + if (alternate && alwaysReturns(node.consequent)) { + displayReport(alternate); + } + } + + const allowElseIf = !(context.options[0] && context.options[0].allowElseIf === false); + + //-------------------------------------------------------------------------- + // Public API + //-------------------------------------------------------------------------- + + return { + + "IfStatement:exit": allowElseIf ? checkIfWithoutElse : checkIfWithElse + + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-empty-character-class.js b/node_modules/eslint/lib/rules/no-empty-character-class.js new file mode 100644 index 0000000..1f5c733 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-empty-character-class.js @@ -0,0 +1,62 @@ +/** + * @fileoverview Rule to flag the use of empty character classes in regular expressions + * @author Ian Christian Myers + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/* + * plain-English description of the following regexp: + * 0. `^` fix the match at the beginning of the string + * 1. `\/`: the `/` that begins the regexp + * 2. `([^\\[]|\\.|\[([^\\\]]|\\.)+\])*`: regexp contents; 0 or more of the following + * 2.0. `[^\\[]`: any character that's not a `\` or a `[` (anything but escape sequences and character classes) + * 2.1. `\\.`: an escape sequence + * 2.2. `\[([^\\\]]|\\.)+\]`: a character class that isn't empty + * 3. `\/` the `/` that ends the regexp + * 4. `[gimuy]*`: optional regexp flags + * 5. `$`: fix the match at the end of the string + */ +const regex = /^\/([^\\[]|\\.|\[([^\\\]]|\\.)+])*\/[gimuy]*$/; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow empty character classes in regular expressions", + category: "Possible Errors", + recommended: true, + url: "https://eslint.org/docs/rules/no-empty-character-class" + }, + + schema: [], + + messages: { + unexpected: "Empty class." + } + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + return { + + Literal(node) { + const token = sourceCode.getFirstToken(node); + + if (token.type === "RegularExpression" && !regex.test(token.value)) { + context.report({ node, messageId: "unexpected" }); + } + } + + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-empty-function.js b/node_modules/eslint/lib/rules/no-empty-function.js new file mode 100644 index 0000000..d9948cd --- /dev/null +++ b/node_modules/eslint/lib/rules/no-empty-function.js @@ -0,0 +1,165 @@ +/** + * @fileoverview Rule to disallow empty functions. + * @author Toru Nagashima + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const ALLOW_OPTIONS = Object.freeze([ + "functions", + "arrowFunctions", + "generatorFunctions", + "methods", + "generatorMethods", + "getters", + "setters", + "constructors" +]); + +/** + * Gets the kind of a given function node. + * + * @param {ASTNode} node - A function node to get. This is one of + * an ArrowFunctionExpression, a FunctionDeclaration, or a + * FunctionExpression. + * @returns {string} The kind of the function. This is one of "functions", + * "arrowFunctions", "generatorFunctions", "asyncFunctions", "methods", + * "generatorMethods", "asyncMethods", "getters", "setters", and + * "constructors". + */ +function getKind(node) { + const parent = node.parent; + let kind = ""; + + if (node.type === "ArrowFunctionExpression") { + return "arrowFunctions"; + } + + // Detects main kind. + if (parent.type === "Property") { + if (parent.kind === "get") { + return "getters"; + } + if (parent.kind === "set") { + return "setters"; + } + kind = parent.method ? "methods" : "functions"; + + } else if (parent.type === "MethodDefinition") { + if (parent.kind === "get") { + return "getters"; + } + if (parent.kind === "set") { + return "setters"; + } + if (parent.kind === "constructor") { + return "constructors"; + } + kind = "methods"; + + } else { + kind = "functions"; + } + + // Detects prefix. + let prefix = ""; + + if (node.generator) { + prefix = "generator"; + } else if (node.async) { + prefix = "async"; + } else { + return kind; + } + return prefix + kind[0].toUpperCase() + kind.slice(1); +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow empty functions", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-empty-function" + }, + + schema: [ + { + type: "object", + properties: { + allow: { + type: "array", + items: { enum: ALLOW_OPTIONS }, + uniqueItems: true + } + }, + additionalProperties: false + } + ], + + messages: { + unexpected: "Unexpected empty {{name}}." + } + }, + + create(context) { + const options = context.options[0] || {}; + const allowed = options.allow || []; + + const sourceCode = context.getSourceCode(); + + /** + * Reports a given function node if the node matches the following patterns. + * + * - Not allowed by options. + * - The body is empty. + * - The body doesn't have any comments. + * + * @param {ASTNode} node - A function node to report. This is one of + * an ArrowFunctionExpression, a FunctionDeclaration, or a + * FunctionExpression. + * @returns {void} + */ + function reportIfEmpty(node) { + const kind = getKind(node); + const name = astUtils.getFunctionNameWithKind(node); + const innerComments = sourceCode.getTokens(node.body, { + includeComments: true, + filter: astUtils.isCommentToken + }); + + if (allowed.indexOf(kind) === -1 && + node.body.type === "BlockStatement" && + node.body.body.length === 0 && + innerComments.length === 0 + ) { + context.report({ + node, + loc: node.body.loc.start, + messageId: "unexpected", + data: { name } + }); + } + } + + return { + ArrowFunctionExpression: reportIfEmpty, + FunctionDeclaration: reportIfEmpty, + FunctionExpression: reportIfEmpty + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-empty-pattern.js b/node_modules/eslint/lib/rules/no-empty-pattern.js new file mode 100644 index 0000000..9397105 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-empty-pattern.js @@ -0,0 +1,41 @@ +/** + * @fileoverview Rule to disallow an empty pattern + * @author Alberto Rodríguez + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow empty destructuring patterns", + category: "Best Practices", + recommended: true, + url: "https://eslint.org/docs/rules/no-empty-pattern" + }, + + schema: [], + + messages: { + unexpected: "Unexpected empty {{type}} pattern." + } + }, + + create(context) { + return { + ObjectPattern(node) { + if (node.properties.length === 0) { + context.report({ node, messageId: "unexpected", data: { type: "object" } }); + } + }, + ArrayPattern(node) { + if (node.elements.length === 0) { + context.report({ node, messageId: "unexpected", data: { type: "array" } }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-empty.js b/node_modules/eslint/lib/rules/no-empty.js new file mode 100644 index 0000000..a598d40 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-empty.js @@ -0,0 +1,83 @@ +/** + * @fileoverview Rule to flag use of an empty block statement + * @author Nicholas C. Zakas + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow empty block statements", + category: "Possible Errors", + recommended: true, + url: "https://eslint.org/docs/rules/no-empty" + }, + + schema: [ + { + type: "object", + properties: { + allowEmptyCatch: { + type: "boolean" + } + }, + additionalProperties: false + } + ], + + messages: { + unexpected: "Empty {{type}} statement." + } + }, + + create(context) { + const options = context.options[0] || {}, + allowEmptyCatch = options.allowEmptyCatch || false; + + const sourceCode = context.getSourceCode(); + + return { + BlockStatement(node) { + + // if the body is not empty, we can just return immediately + if (node.body.length !== 0) { + return; + } + + // a function is generally allowed to be empty + if (astUtils.isFunction(node.parent)) { + return; + } + + if (allowEmptyCatch && node.parent.type === "CatchClause") { + return; + } + + // any other block is only allowed to be empty, if it contains a comment + if (sourceCode.getCommentsInside(node).length > 0) { + return; + } + + context.report({ node, messageId: "unexpected", data: { type: "block" } }); + }, + + SwitchStatement(node) { + + if (typeof node.cases === "undefined" || node.cases.length === 0) { + context.report({ node, messageId: "unexpected", data: { type: "switch" } }); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-eq-null.js b/node_modules/eslint/lib/rules/no-eq-null.js new file mode 100644 index 0000000..eadd16d --- /dev/null +++ b/node_modules/eslint/lib/rules/no-eq-null.js @@ -0,0 +1,44 @@ +/** + * @fileoverview Rule to flag comparisons to null without a type-checking + * operator. + * @author Ian Christian Myers + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow `null` comparisons without type-checking operators", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-eq-null" + }, + + schema: [], + + messages: { + unexpected: "Use '===' to compare with null." + } + }, + + create(context) { + + return { + + BinaryExpression(node) { + const badOperator = node.operator === "==" || node.operator === "!="; + + if (node.right.type === "Literal" && node.right.raw === "null" && badOperator || + node.left.type === "Literal" && node.left.raw === "null" && badOperator) { + context.report({ node, messageId: "unexpected" }); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-eval.js b/node_modules/eslint/lib/rules/no-eval.js new file mode 100644 index 0000000..f77451e --- /dev/null +++ b/node_modules/eslint/lib/rules/no-eval.js @@ -0,0 +1,313 @@ +/** + * @fileoverview Rule to flag use of eval() statement + * @author Nicholas C. Zakas + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const candidatesOfGlobalObject = Object.freeze([ + "global", + "window" +]); + +/** + * Checks a given node is a Identifier node of the specified name. + * + * @param {ASTNode} node - A node to check. + * @param {string} name - A name to check. + * @returns {boolean} `true` if the node is a Identifier node of the name. + */ +function isIdentifier(node, name) { + return node.type === "Identifier" && node.name === name; +} + +/** + * Checks a given node is a Literal node of the specified string value. + * + * @param {ASTNode} node - A node to check. + * @param {string} name - A name to check. + * @returns {boolean} `true` if the node is a Literal node of the name. + */ +function isConstant(node, name) { + switch (node.type) { + case "Literal": + return node.value === name; + + case "TemplateLiteral": + return ( + node.expressions.length === 0 && + node.quasis[0].value.cooked === name + ); + + default: + return false; + } +} + +/** + * Checks a given node is a MemberExpression node which has the specified name's + * property. + * + * @param {ASTNode} node - A node to check. + * @param {string} name - A name to check. + * @returns {boolean} `true` if the node is a MemberExpression node which has + * the specified name's property + */ +function isMember(node, name) { + return ( + node.type === "MemberExpression" && + (node.computed ? isConstant : isIdentifier)(node.property, name) + ); +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow the use of `eval()`", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-eval" + }, + + schema: [ + { + type: "object", + properties: { + allowIndirect: { type: "boolean" } + }, + additionalProperties: false + } + ], + + messages: { + unexpected: "eval can be harmful." + } + }, + + create(context) { + const allowIndirect = Boolean( + context.options[0] && + context.options[0].allowIndirect + ); + const sourceCode = context.getSourceCode(); + let funcInfo = null; + + /** + * Pushs a variable scope (Program or Function) information to the stack. + * + * This is used in order to check whether or not `this` binding is a + * reference to the global object. + * + * @param {ASTNode} node - A node of the scope. This is one of Program, + * FunctionDeclaration, FunctionExpression, and ArrowFunctionExpression. + * @returns {void} + */ + function enterVarScope(node) { + const strict = context.getScope().isStrict; + + funcInfo = { + upper: funcInfo, + node, + strict, + defaultThis: false, + initialized: strict + }; + } + + /** + * Pops a variable scope from the stack. + * + * @returns {void} + */ + function exitVarScope() { + funcInfo = funcInfo.upper; + } + + /** + * Reports a given node. + * + * `node` is `Identifier` or `MemberExpression`. + * The parent of `node` might be `CallExpression`. + * + * The location of the report is always `eval` `Identifier` (or possibly + * `Literal`). The type of the report is `CallExpression` if the parent is + * `CallExpression`. Otherwise, it's the given node type. + * + * @param {ASTNode} node - A node to report. + * @returns {void} + */ + function report(node) { + let locationNode = node; + const parent = node.parent; + + if (node.type === "MemberExpression") { + locationNode = node.property; + } + if (parent.type === "CallExpression" && parent.callee === node) { + node = parent; + } + + context.report({ + node, + loc: locationNode.loc.start, + messageId: "unexpected" + }); + } + + /** + * Reports accesses of `eval` via the global object. + * + * @param {eslint-scope.Scope} globalScope - The global scope. + * @returns {void} + */ + function reportAccessingEvalViaGlobalObject(globalScope) { + for (let i = 0; i < candidatesOfGlobalObject.length; ++i) { + const name = candidatesOfGlobalObject[i]; + const variable = astUtils.getVariableByName(globalScope, name); + + if (!variable) { + continue; + } + + const references = variable.references; + + for (let j = 0; j < references.length; ++j) { + const identifier = references[j].identifier; + let node = identifier.parent; + + // To detect code like `window.window.eval`. + while (isMember(node, name)) { + node = node.parent; + } + + // Reports. + if (isMember(node, "eval")) { + report(node); + } + } + } + } + + /** + * Reports all accesses of `eval` (excludes direct calls to eval). + * + * @param {eslint-scope.Scope} globalScope - The global scope. + * @returns {void} + */ + function reportAccessingEval(globalScope) { + const variable = astUtils.getVariableByName(globalScope, "eval"); + + if (!variable) { + return; + } + + const references = variable.references; + + for (let i = 0; i < references.length; ++i) { + const reference = references[i]; + const id = reference.identifier; + + if (id.name === "eval" && !astUtils.isCallee(id)) { + + // Is accessing to eval (excludes direct calls to eval) + report(id); + } + } + } + + if (allowIndirect) { + + // Checks only direct calls to eval. It's simple! + return { + "CallExpression:exit"(node) { + const callee = node.callee; + + if (isIdentifier(callee, "eval")) { + report(callee); + } + } + }; + } + + return { + "CallExpression:exit"(node) { + const callee = node.callee; + + if (isIdentifier(callee, "eval")) { + report(callee); + } + }, + + Program(node) { + const scope = context.getScope(), + features = context.parserOptions.ecmaFeatures || {}, + strict = + scope.isStrict || + node.sourceType === "module" || + (features.globalReturn && scope.childScopes[0].isStrict); + + funcInfo = { + upper: null, + node, + strict, + defaultThis: true, + initialized: true + }; + }, + + "Program:exit"() { + const globalScope = context.getScope(); + + exitVarScope(); + reportAccessingEval(globalScope); + reportAccessingEvalViaGlobalObject(globalScope); + }, + + FunctionDeclaration: enterVarScope, + "FunctionDeclaration:exit": exitVarScope, + FunctionExpression: enterVarScope, + "FunctionExpression:exit": exitVarScope, + ArrowFunctionExpression: enterVarScope, + "ArrowFunctionExpression:exit": exitVarScope, + + ThisExpression(node) { + if (!isMember(node.parent, "eval")) { + return; + } + + /* + * `this.eval` is found. + * Checks whether or not the value of `this` is the global object. + */ + if (!funcInfo.initialized) { + funcInfo.initialized = true; + funcInfo.defaultThis = astUtils.isDefaultThisBinding( + funcInfo.node, + sourceCode + ); + } + + if (!funcInfo.strict && funcInfo.defaultThis) { + + // `this.eval` is possible built-in `eval`. + report(node.parent); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-ex-assign.js b/node_modules/eslint/lib/rules/no-ex-assign.js new file mode 100644 index 0000000..feace41 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-ex-assign.js @@ -0,0 +1,50 @@ +/** + * @fileoverview Rule to flag assignment of the exception parameter + * @author Stephen Murray + */ + +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow reassigning exceptions in `catch` clauses", + category: "Possible Errors", + recommended: true, + url: "https://eslint.org/docs/rules/no-ex-assign" + }, + + schema: [], + + messages: { + unexpected: "Do not assign to the exception parameter." + } + }, + + create(context) { + + /** + * Finds and reports references that are non initializer and writable. + * @param {Variable} variable - A variable to check. + * @returns {void} + */ + function checkVariable(variable) { + astUtils.getModifyingReferences(variable.references).forEach(reference => { + context.report({ node: reference.identifier, messageId: "unexpected" }); + }); + } + + return { + CatchClause(node) { + context.getDeclaredVariables(node).forEach(checkVariable); + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-extend-native.js b/node_modules/eslint/lib/rules/no-extend-native.js new file mode 100644 index 0000000..3ba1309 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-extend-native.js @@ -0,0 +1,179 @@ +/** + * @fileoverview Rule to flag adding properties to native object's prototypes. + * @author David Nelson + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); +const globals = require("globals"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const propertyDefinitionMethods = new Set(["defineProperty", "defineProperties"]); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow extending native types", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-extend-native" + }, + + schema: [ + { + type: "object", + properties: { + exceptions: { + type: "array", + items: { + type: "string" + }, + uniqueItems: true + } + }, + additionalProperties: false + } + ], + + messages: { + unexpected: "{{builtin}} prototype is read only, properties should not be added." + } + }, + + create(context) { + + const config = context.options[0] || {}; + const exceptions = new Set(config.exceptions || []); + const modifiedBuiltins = new Set( + Object.keys(globals.builtin) + .filter(builtin => builtin[0].toUpperCase() === builtin[0]) + .filter(builtin => !exceptions.has(builtin)) + ); + + /** + * Reports a lint error for the given node. + * @param {ASTNode} node The node to report. + * @param {string} builtin The name of the native builtin being extended. + * @returns {void} + */ + function reportNode(node, builtin) { + context.report({ + node, + messageId: "unexpected", + data: { + builtin + } + }); + } + + /** + * Check to see if the `prototype` property of the given object + * identifier node is being accessed. + * @param {ASTNode} identifierNode The Identifier representing the object + * to check. + * @returns {boolean} True if the identifier is the object of a + * MemberExpression and its `prototype` property is being accessed, + * false otherwise. + */ + function isPrototypePropertyAccessed(identifierNode) { + return Boolean( + identifierNode && + identifierNode.parent && + identifierNode.parent.type === "MemberExpression" && + identifierNode.parent.object === identifierNode && + astUtils.getStaticPropertyName(identifierNode.parent) === "prototype" + ); + } + + /** + * Checks that an identifier is an object of a prototype whose member + * is being assigned in an AssignmentExpression. + * Example: Object.prototype.foo = "bar" + * @param {ASTNode} identifierNode The identifier to check. + * @returns {boolean} True if the identifier's prototype is modified. + */ + function isInPrototypePropertyAssignment(identifierNode) { + return Boolean( + isPrototypePropertyAccessed(identifierNode) && + identifierNode.parent.parent.type === "MemberExpression" && + identifierNode.parent.parent.parent.type === "AssignmentExpression" && + identifierNode.parent.parent.parent.left === identifierNode.parent.parent + ); + } + + /** + * Checks that an identifier is an object of a prototype whose member + * is being extended via the Object.defineProperty() or + * Object.defineProperties() methods. + * Example: Object.defineProperty(Array.prototype, "foo", ...) + * Example: Object.defineProperties(Array.prototype, ...) + * @param {ASTNode} identifierNode The identifier to check. + * @returns {boolean} True if the identifier's prototype is modified. + */ + function isInDefinePropertyCall(identifierNode) { + return Boolean( + isPrototypePropertyAccessed(identifierNode) && + identifierNode.parent.parent.type === "CallExpression" && + identifierNode.parent.parent.arguments[0] === identifierNode.parent && + identifierNode.parent.parent.callee.type === "MemberExpression" && + identifierNode.parent.parent.callee.object.type === "Identifier" && + identifierNode.parent.parent.callee.object.name === "Object" && + identifierNode.parent.parent.callee.property.type === "Identifier" && + propertyDefinitionMethods.has(identifierNode.parent.parent.callee.property.name) + ); + } + + /** + * Check to see if object prototype access is part of a prototype + * extension. There are three ways a prototype can be extended: + * 1. Assignment to prototype property (Object.prototype.foo = 1) + * 2. Object.defineProperty()/Object.defineProperties() on a prototype + * If prototype extension is detected, report the AssignmentExpression + * or CallExpression node. + * @param {ASTNode} identifierNode The Identifier representing the object + * which prototype is being accessed and possibly extended. + * @returns {void} + */ + function checkAndReportPrototypeExtension(identifierNode) { + if (isInPrototypePropertyAssignment(identifierNode)) { + + // Identifier --> MemberExpression --> MemberExpression --> AssignmentExpression + reportNode(identifierNode.parent.parent.parent, identifierNode.name); + } else if (isInDefinePropertyCall(identifierNode)) { + + // Identifier --> MemberExpression --> CallExpression + reportNode(identifierNode.parent.parent, identifierNode.name); + } + } + + return { + + "Program:exit"() { + const globalScope = context.getScope(); + + modifiedBuiltins.forEach(builtin => { + const builtinVar = globalScope.set.get(builtin); + + if (builtinVar && builtinVar.references) { + builtinVar.references + .map(ref => ref.identifier) + .forEach(checkAndReportPrototypeExtension); + } + }); + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-extra-bind.js b/node_modules/eslint/lib/rules/no-extra-bind.js new file mode 100644 index 0000000..8d90180 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-extra-bind.js @@ -0,0 +1,150 @@ +/** + * @fileoverview Rule to flag unnecessary bind calls + * @author Bence Dányi + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow unnecessary calls to `.bind()`", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-extra-bind" + }, + + schema: [], + + fixable: "code", + + messages: { + unexpected: "The function binding is unnecessary." + } + }, + + create(context) { + let scopeInfo = null; + + /** + * Reports a given function node. + * + * @param {ASTNode} node - A node to report. This is a FunctionExpression or + * an ArrowFunctionExpression. + * @returns {void} + */ + function report(node) { + context.report({ + node: node.parent.parent, + messageId: "unexpected", + loc: node.parent.property.loc.start, + fix(fixer) { + const firstTokenToRemove = context.getSourceCode() + .getFirstTokenBetween(node.parent.object, node.parent.property, astUtils.isNotClosingParenToken); + + return fixer.removeRange([firstTokenToRemove.range[0], node.parent.parent.range[1]]); + } + }); + } + + /** + * Checks whether or not a given function node is the callee of `.bind()` + * method. + * + * e.g. `(function() {}.bind(foo))` + * + * @param {ASTNode} node - A node to report. This is a FunctionExpression or + * an ArrowFunctionExpression. + * @returns {boolean} `true` if the node is the callee of `.bind()` method. + */ + function isCalleeOfBindMethod(node) { + const parent = node.parent; + const grandparent = parent.parent; + + return ( + grandparent && + grandparent.type === "CallExpression" && + grandparent.callee === parent && + grandparent.arguments.length === 1 && + parent.type === "MemberExpression" && + parent.object === node && + astUtils.getStaticPropertyName(parent) === "bind" + ); + } + + /** + * Adds a scope information object to the stack. + * + * @param {ASTNode} node - A node to add. This node is a FunctionExpression + * or a FunctionDeclaration node. + * @returns {void} + */ + function enterFunction(node) { + scopeInfo = { + isBound: isCalleeOfBindMethod(node), + thisFound: false, + upper: scopeInfo + }; + } + + /** + * Removes the scope information object from the top of the stack. + * At the same time, this reports the function node if the function has + * `.bind()` and the `this` keywords found. + * + * @param {ASTNode} node - A node to remove. This node is a + * FunctionExpression or a FunctionDeclaration node. + * @returns {void} + */ + function exitFunction(node) { + if (scopeInfo.isBound && !scopeInfo.thisFound) { + report(node); + } + + scopeInfo = scopeInfo.upper; + } + + /** + * Reports a given arrow function if the function is callee of `.bind()` + * method. + * + * @param {ASTNode} node - A node to report. This node is an + * ArrowFunctionExpression. + * @returns {void} + */ + function exitArrowFunction(node) { + if (isCalleeOfBindMethod(node)) { + report(node); + } + } + + /** + * Set the mark as the `this` keyword was found in this scope. + * + * @returns {void} + */ + function markAsThisFound() { + if (scopeInfo) { + scopeInfo.thisFound = true; + } + } + + return { + "ArrowFunctionExpression:exit": exitArrowFunction, + FunctionDeclaration: enterFunction, + "FunctionDeclaration:exit": exitFunction, + FunctionExpression: enterFunction, + "FunctionExpression:exit": exitFunction, + ThisExpression: markAsThisFound + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-extra-boolean-cast.js b/node_modules/eslint/lib/rules/no-extra-boolean-cast.js new file mode 100644 index 0000000..3819136 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-extra-boolean-cast.js @@ -0,0 +1,128 @@ +/** + * @fileoverview Rule to flag unnecessary double negation in Boolean contexts + * @author Brandon Mills + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow unnecessary boolean casts", + category: "Possible Errors", + recommended: true, + url: "https://eslint.org/docs/rules/no-extra-boolean-cast" + }, + + schema: [], + + fixable: "code", + + messages: { + unexpectedCall: "Redundant Boolean call.", + unexpectedNegation: "Redundant double negation." + } + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + // Node types which have a test which will coerce values to booleans. + const BOOLEAN_NODE_TYPES = [ + "IfStatement", + "DoWhileStatement", + "WhileStatement", + "ConditionalExpression", + "ForStatement" + ]; + + /** + * Check if a node is in a context where its value would be coerced to a boolean at runtime. + * + * @param {Object} node The node + * @param {Object} parent Its parent + * @returns {boolean} If it is in a boolean context + */ + function isInBooleanContext(node, parent) { + return ( + (BOOLEAN_NODE_TYPES.indexOf(parent.type) !== -1 && + node === parent.test) || + + // ! + (parent.type === "UnaryExpression" && + parent.operator === "!") + ); + } + + + return { + UnaryExpression(node) { + const ancestors = context.getAncestors(), + parent = ancestors.pop(), + grandparent = ancestors.pop(); + + // Exit early if it's guaranteed not to match + if (node.operator !== "!" || + parent.type !== "UnaryExpression" || + parent.operator !== "!") { + return; + } + + if (isInBooleanContext(parent, grandparent) || + + // Boolean() and new Boolean() + ((grandparent.type === "CallExpression" || grandparent.type === "NewExpression") && + grandparent.callee.type === "Identifier" && + grandparent.callee.name === "Boolean") + ) { + context.report({ + node, + messageId: "unexpectedNegation", + fix: fixer => fixer.replaceText(parent, sourceCode.getText(node.argument)) + }); + } + }, + CallExpression(node) { + const parent = node.parent; + + if (node.callee.type !== "Identifier" || node.callee.name !== "Boolean") { + return; + } + + if (isInBooleanContext(node, parent)) { + context.report({ + node, + messageId: "unexpectedCall", + fix: fixer => { + if (!node.arguments.length) { + return fixer.replaceText(parent, "true"); + } + + if (node.arguments.length > 1 || node.arguments[0].type === "SpreadElement") { + return null; + } + + const argument = node.arguments[0]; + + if (astUtils.getPrecedence(argument) < astUtils.getPrecedence(node.parent)) { + return fixer.replaceText(node, `(${sourceCode.getText(argument)})`); + } + return fixer.replaceText(node, sourceCode.getText(argument)); + } + }); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-extra-label.js b/node_modules/eslint/lib/rules/no-extra-label.js new file mode 100644 index 0000000..73a3fea --- /dev/null +++ b/node_modules/eslint/lib/rules/no-extra-label.js @@ -0,0 +1,145 @@ +/** + * @fileoverview Rule to disallow unnecessary labels + * @author Toru Nagashima + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow unnecessary labels", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-extra-label" + }, + + schema: [], + + fixable: "code", + + messages: { + unexpected: "This label '{{name}}' is unnecessary." + } + }, + + create(context) { + const sourceCode = context.getSourceCode(); + let scopeInfo = null; + + /** + * Creates a new scope with a breakable statement. + * + * @param {ASTNode} node - A node to create. This is a BreakableStatement. + * @returns {void} + */ + function enterBreakableStatement(node) { + scopeInfo = { + label: node.parent.type === "LabeledStatement" ? node.parent.label : null, + breakable: true, + upper: scopeInfo + }; + } + + /** + * Removes the top scope of the stack. + * + * @returns {void} + */ + function exitBreakableStatement() { + scopeInfo = scopeInfo.upper; + } + + /** + * Creates a new scope with a labeled statement. + * + * This ignores it if the body is a breakable statement. + * In this case it's handled in the `enterBreakableStatement` function. + * + * @param {ASTNode} node - A node to create. This is a LabeledStatement. + * @returns {void} + */ + function enterLabeledStatement(node) { + if (!astUtils.isBreakableStatement(node.body)) { + scopeInfo = { + label: node.label, + breakable: false, + upper: scopeInfo + }; + } + } + + /** + * Removes the top scope of the stack. + * + * This ignores it if the body is a breakable statement. + * In this case it's handled in the `exitBreakableStatement` function. + * + * @param {ASTNode} node - A node. This is a LabeledStatement. + * @returns {void} + */ + function exitLabeledStatement(node) { + if (!astUtils.isBreakableStatement(node.body)) { + scopeInfo = scopeInfo.upper; + } + } + + /** + * Reports a given control node if it's unnecessary. + * + * @param {ASTNode} node - A node. This is a BreakStatement or a + * ContinueStatement. + * @returns {void} + */ + function reportIfUnnecessary(node) { + if (!node.label) { + return; + } + + const labelNode = node.label; + + for (let info = scopeInfo; info !== null; info = info.upper) { + if (info.breakable || info.label && info.label.name === labelNode.name) { + if (info.breakable && info.label && info.label.name === labelNode.name) { + context.report({ + node: labelNode, + messageId: "unexpected", + data: labelNode, + fix: fixer => fixer.removeRange([sourceCode.getFirstToken(node).range[1], labelNode.range[1]]) + }); + } + return; + } + } + } + + return { + WhileStatement: enterBreakableStatement, + "WhileStatement:exit": exitBreakableStatement, + DoWhileStatement: enterBreakableStatement, + "DoWhileStatement:exit": exitBreakableStatement, + ForStatement: enterBreakableStatement, + "ForStatement:exit": exitBreakableStatement, + ForInStatement: enterBreakableStatement, + "ForInStatement:exit": exitBreakableStatement, + ForOfStatement: enterBreakableStatement, + "ForOfStatement:exit": exitBreakableStatement, + SwitchStatement: enterBreakableStatement, + "SwitchStatement:exit": exitBreakableStatement, + LabeledStatement: enterLabeledStatement, + "LabeledStatement:exit": exitLabeledStatement, + BreakStatement: reportIfUnnecessary, + ContinueStatement: reportIfUnnecessary + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-extra-parens.js b/node_modules/eslint/lib/rules/no-extra-parens.js new file mode 100644 index 0000000..daf069e --- /dev/null +++ b/node_modules/eslint/lib/rules/no-extra-parens.js @@ -0,0 +1,750 @@ +/** + * @fileoverview Disallow parenthesising higher precedence subexpressions. + * @author Michael Ficarra + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils.js"); + +module.exports = { + meta: { + docs: { + description: "disallow unnecessary parentheses", + category: "Possible Errors", + recommended: false, + url: "https://eslint.org/docs/rules/no-extra-parens" + }, + + fixable: "code", + + schema: { + anyOf: [ + { + type: "array", + items: [ + { + enum: ["functions"] + } + ], + minItems: 0, + maxItems: 1 + }, + { + type: "array", + items: [ + { + enum: ["all"] + }, + { + type: "object", + properties: { + conditionalAssign: { type: "boolean" }, + nestedBinaryExpressions: { type: "boolean" }, + returnAssign: { type: "boolean" }, + ignoreJSX: { enum: ["none", "all", "single-line", "multi-line"] }, + enforceForArrowConditionals: { type: "boolean" } + }, + additionalProperties: false + } + ], + minItems: 0, + maxItems: 2 + } + ] + }, + + messages: { + unexpected: "Gratuitous parentheses around expression." + } + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + const tokensToIgnore = new WeakSet(); + const isParenthesised = astUtils.isParenthesised.bind(astUtils, sourceCode); + const precedence = astUtils.getPrecedence; + const ALL_NODES = context.options[0] !== "functions"; + const EXCEPT_COND_ASSIGN = ALL_NODES && context.options[1] && context.options[1].conditionalAssign === false; + const NESTED_BINARY = ALL_NODES && context.options[1] && context.options[1].nestedBinaryExpressions === false; + const EXCEPT_RETURN_ASSIGN = ALL_NODES && context.options[1] && context.options[1].returnAssign === false; + const IGNORE_JSX = ALL_NODES && context.options[1] && context.options[1].ignoreJSX; + const IGNORE_ARROW_CONDITIONALS = ALL_NODES && context.options[1] && + context.options[1].enforceForArrowConditionals === false; + + const PRECEDENCE_OF_ASSIGNMENT_EXPR = precedence({ type: "AssignmentExpression" }); + const PRECEDENCE_OF_UPDATE_EXPR = precedence({ type: "UpdateExpression" }); + + /** + * Determines if this rule should be enforced for a node given the current configuration. + * @param {ASTNode} node - The node to be checked. + * @returns {boolean} True if the rule should be enforced for this node. + * @private + */ + function ruleApplies(node) { + if (node.type === "JSXElement") { + const isSingleLine = node.loc.start.line === node.loc.end.line; + + switch (IGNORE_JSX) { + + // Exclude this JSX element from linting + case "all": + return false; + + // Exclude this JSX element if it is multi-line element + case "multi-line": + return isSingleLine; + + // Exclude this JSX element if it is single-line element + case "single-line": + return !isSingleLine; + + // Nothing special to be done for JSX elements + case "none": + break; + + // no default + } + } + + return ALL_NODES || node.type === "FunctionExpression" || node.type === "ArrowFunctionExpression"; + } + + /** + * Determines if a node is surrounded by parentheses twice. + * @param {ASTNode} node - The node to be checked. + * @returns {boolean} True if the node is doubly parenthesised. + * @private + */ + function isParenthesisedTwice(node) { + const previousToken = sourceCode.getTokenBefore(node, 1), + nextToken = sourceCode.getTokenAfter(node, 1); + + return isParenthesised(node) && previousToken && nextToken && + astUtils.isOpeningParenToken(previousToken) && previousToken.range[1] <= node.range[0] && + astUtils.isClosingParenToken(nextToken) && nextToken.range[0] >= node.range[1]; + } + + /** + * Determines if a node is surrounded by (potentially) invalid parentheses. + * @param {ASTNode} node - The node to be checked. + * @returns {boolean} True if the node is incorrectly parenthesised. + * @private + */ + function hasExcessParens(node) { + return ruleApplies(node) && isParenthesised(node); + } + + /** + * Determines if a node that is expected to be parenthesised is surrounded by + * (potentially) invalid extra parentheses. + * @param {ASTNode} node - The node to be checked. + * @returns {boolean} True if the node is has an unexpected extra pair of parentheses. + * @private + */ + function hasDoubleExcessParens(node) { + return ruleApplies(node) && isParenthesisedTwice(node); + } + + /** + * Determines if a node test expression is allowed to have a parenthesised assignment + * @param {ASTNode} node - The node to be checked. + * @returns {boolean} True if the assignment can be parenthesised. + * @private + */ + function isCondAssignException(node) { + return EXCEPT_COND_ASSIGN && node.test.type === "AssignmentExpression"; + } + + /** + * Determines if a node is in a return statement + * @param {ASTNode} node - The node to be checked. + * @returns {boolean} True if the node is in a return statement. + * @private + */ + function isInReturnStatement(node) { + while (node) { + if (node.type === "ReturnStatement" || + (node.type === "ArrowFunctionExpression" && node.body.type !== "BlockStatement")) { + return true; + } + node = node.parent; + } + + return false; + } + + /** + * Determines if a constructor function is newed-up with parens + * @param {ASTNode} newExpression - The NewExpression node to be checked. + * @returns {boolean} True if the constructor is called with parens. + * @private + */ + function isNewExpressionWithParens(newExpression) { + const lastToken = sourceCode.getLastToken(newExpression); + const penultimateToken = sourceCode.getTokenBefore(lastToken); + + return newExpression.arguments.length > 0 || astUtils.isOpeningParenToken(penultimateToken) && astUtils.isClosingParenToken(lastToken); + } + + /** + * Determines if a node is or contains an assignment expression + * @param {ASTNode} node - The node to be checked. + * @returns {boolean} True if the node is or contains an assignment expression. + * @private + */ + function containsAssignment(node) { + if (node.type === "AssignmentExpression") { + return true; + } + if (node.type === "ConditionalExpression" && + (node.consequent.type === "AssignmentExpression" || node.alternate.type === "AssignmentExpression")) { + return true; + } + if ((node.left && node.left.type === "AssignmentExpression") || + (node.right && node.right.type === "AssignmentExpression")) { + return true; + } + + return false; + } + + /** + * Determines if a node is contained by or is itself a return statement and is allowed to have a parenthesised assignment + * @param {ASTNode} node - The node to be checked. + * @returns {boolean} True if the assignment can be parenthesised. + * @private + */ + function isReturnAssignException(node) { + if (!EXCEPT_RETURN_ASSIGN || !isInReturnStatement(node)) { + return false; + } + + if (node.type === "ReturnStatement") { + return node.argument && containsAssignment(node.argument); + } + if (node.type === "ArrowFunctionExpression" && node.body.type !== "BlockStatement") { + return containsAssignment(node.body); + } + return containsAssignment(node); + + } + + /** + * Determines if a node following a [no LineTerminator here] restriction is + * surrounded by (potentially) invalid extra parentheses. + * @param {Token} token - The token preceding the [no LineTerminator here] restriction. + * @param {ASTNode} node - The node to be checked. + * @returns {boolean} True if the node is incorrectly parenthesised. + * @private + */ + function hasExcessParensNoLineTerminator(token, node) { + if (token.loc.end.line === node.loc.start.line) { + return hasExcessParens(node); + } + + return hasDoubleExcessParens(node); + } + + /** + * Determines whether a node should be preceded by an additional space when removing parens + * @param {ASTNode} node node to evaluate; must be surrounded by parentheses + * @returns {boolean} `true` if a space should be inserted before the node + * @private + */ + function requiresLeadingSpace(node) { + const leftParenToken = sourceCode.getTokenBefore(node); + const tokenBeforeLeftParen = sourceCode.getTokenBefore(node, 1); + const firstToken = sourceCode.getFirstToken(node); + + return tokenBeforeLeftParen && + tokenBeforeLeftParen.range[1] === leftParenToken.range[0] && + leftParenToken.range[1] === firstToken.range[0] && + !astUtils.canTokensBeAdjacent(tokenBeforeLeftParen, firstToken); + } + + /** + * Determines whether a node should be followed by an additional space when removing parens + * @param {ASTNode} node node to evaluate; must be surrounded by parentheses + * @returns {boolean} `true` if a space should be inserted after the node + * @private + */ + function requiresTrailingSpace(node) { + const nextTwoTokens = sourceCode.getTokensAfter(node, { count: 2 }); + const rightParenToken = nextTwoTokens[0]; + const tokenAfterRightParen = nextTwoTokens[1]; + const tokenBeforeRightParen = sourceCode.getLastToken(node); + + return rightParenToken && tokenAfterRightParen && + !sourceCode.isSpaceBetweenTokens(rightParenToken, tokenAfterRightParen) && + !astUtils.canTokensBeAdjacent(tokenBeforeRightParen, tokenAfterRightParen); + } + + /** + * Determines if a given expression node is an IIFE + * @param {ASTNode} node The node to check + * @returns {boolean} `true` if the given node is an IIFE + */ + function isIIFE(node) { + return node.type === "CallExpression" && node.callee.type === "FunctionExpression"; + } + + /** + * Report the node + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ + function report(node) { + const leftParenToken = sourceCode.getTokenBefore(node); + const rightParenToken = sourceCode.getTokenAfter(node); + + if (!isParenthesisedTwice(node)) { + if (tokensToIgnore.has(sourceCode.getFirstToken(node))) { + return; + } + + if (isIIFE(node) && !isParenthesised(node.callee)) { + return; + } + } + + context.report({ + node, + loc: leftParenToken.loc.start, + messageId: "unexpected", + fix(fixer) { + const parenthesizedSource = sourceCode.text.slice(leftParenToken.range[1], rightParenToken.range[0]); + + return fixer.replaceTextRange([ + leftParenToken.range[0], + rightParenToken.range[1] + ], (requiresLeadingSpace(node) ? " " : "") + parenthesizedSource + (requiresTrailingSpace(node) ? " " : "")); + } + }); + } + + /** + * Evaluate Unary update + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ + function checkUnaryUpdate(node) { + if (node.type === "UnaryExpression" && node.argument.type === "BinaryExpression" && node.argument.operator === "**") { + return; + } + + if (hasExcessParens(node.argument) && precedence(node.argument) >= precedence(node)) { + report(node.argument); + } + } + + /** + * Check if a member expression contains a call expression + * @param {ASTNode} node MemberExpression node to evaluate + * @returns {boolean} true if found, false if not + */ + function doesMemberExpressionContainCallExpression(node) { + let currentNode = node.object; + let currentNodeType = node.object.type; + + while (currentNodeType === "MemberExpression") { + currentNode = currentNode.object; + currentNodeType = currentNode.type; + } + + return currentNodeType === "CallExpression"; + } + + /** + * Evaluate a new call + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ + function checkCallNew(node) { + const callee = node.callee; + + if (hasExcessParens(callee) && precedence(callee) >= precedence(node)) { + const hasNewParensException = callee.type === "NewExpression" && !isNewExpressionWithParens(callee); + + if ( + hasDoubleExcessParens(callee) || + !isIIFE(node) && !hasNewParensException && !( + + /* + * Allow extra parens around a new expression if + * there are intervening parentheses. + */ + callee.type === "MemberExpression" && + doesMemberExpressionContainCallExpression(callee) + ) + ) { + report(node.callee); + } + } + if (node.arguments.length === 1) { + if (hasDoubleExcessParens(node.arguments[0]) && precedence(node.arguments[0]) >= PRECEDENCE_OF_ASSIGNMENT_EXPR) { + report(node.arguments[0]); + } + } else { + node.arguments + .filter(arg => hasExcessParens(arg) && precedence(arg) >= PRECEDENCE_OF_ASSIGNMENT_EXPR) + .forEach(report); + } + } + + /** + * Evaluate binary logicals + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ + function checkBinaryLogical(node) { + const prec = precedence(node); + const leftPrecedence = precedence(node.left); + const rightPrecedence = precedence(node.right); + const isExponentiation = node.operator === "**"; + const shouldSkipLeft = (NESTED_BINARY && (node.left.type === "BinaryExpression" || node.left.type === "LogicalExpression")) || + node.left.type === "UnaryExpression" && isExponentiation; + const shouldSkipRight = NESTED_BINARY && (node.right.type === "BinaryExpression" || node.right.type === "LogicalExpression"); + + if (!shouldSkipLeft && hasExcessParens(node.left) && (leftPrecedence > prec || (leftPrecedence === prec && !isExponentiation))) { + report(node.left); + } + if (!shouldSkipRight && hasExcessParens(node.right) && (rightPrecedence > prec || (rightPrecedence === prec && isExponentiation))) { + report(node.right); + } + } + + /** + * Check the parentheses around the super class of the given class definition. + * @param {ASTNode} node The node of class declarations to check. + * @returns {void} + */ + function checkClass(node) { + if (!node.superClass) { + return; + } + + /* + * If `node.superClass` is a LeftHandSideExpression, parentheses are extra. + * Otherwise, parentheses are needed. + */ + const hasExtraParens = precedence(node.superClass) > PRECEDENCE_OF_UPDATE_EXPR + ? hasExcessParens(node.superClass) + : hasDoubleExcessParens(node.superClass); + + if (hasExtraParens) { + report(node.superClass); + } + } + + /** + * Check the parentheses around the argument of the given spread operator. + * @param {ASTNode} node The node of spread elements/properties to check. + * @returns {void} + */ + function checkSpreadOperator(node) { + const hasExtraParens = precedence(node.argument) >= PRECEDENCE_OF_ASSIGNMENT_EXPR + ? hasExcessParens(node.argument) + : hasDoubleExcessParens(node.argument); + + if (hasExtraParens) { + report(node.argument); + } + } + + /** + * Checks the parentheses for an ExpressionStatement or ExportDefaultDeclaration + * @param {ASTNode} node The ExpressionStatement.expression or ExportDefaultDeclaration.declaration node + * @returns {void} + */ + function checkExpressionOrExportStatement(node) { + const firstToken = isParenthesised(node) ? sourceCode.getTokenBefore(node) : sourceCode.getFirstToken(node); + const secondToken = sourceCode.getTokenAfter(firstToken, astUtils.isNotOpeningParenToken); + const thirdToken = secondToken ? sourceCode.getTokenAfter(secondToken) : null; + + if ( + astUtils.isOpeningParenToken(firstToken) && + ( + astUtils.isOpeningBraceToken(secondToken) || + secondToken.type === "Keyword" && ( + secondToken.value === "function" || + secondToken.value === "class" || + secondToken.value === "let" && astUtils.isOpeningBracketToken(sourceCode.getTokenAfter(secondToken, astUtils.isNotClosingParenToken)) + ) || + secondToken && secondToken.type === "Identifier" && secondToken.value === "async" && thirdToken && thirdToken.type === "Keyword" && thirdToken.value === "function" + ) + ) { + tokensToIgnore.add(secondToken); + } + + if (hasExcessParens(node)) { + report(node); + } + } + + return { + ArrayExpression(node) { + node.elements + .filter(e => e && hasExcessParens(e) && precedence(e) >= PRECEDENCE_OF_ASSIGNMENT_EXPR) + .forEach(report); + }, + + ArrowFunctionExpression(node) { + if (isReturnAssignException(node)) { + return; + } + + if (node.body.type === "ConditionalExpression" && + IGNORE_ARROW_CONDITIONALS && + !isParenthesisedTwice(node.body) + ) { + return; + } + + if (node.body.type !== "BlockStatement") { + const firstBodyToken = sourceCode.getFirstToken(node.body, astUtils.isNotOpeningParenToken); + const tokenBeforeFirst = sourceCode.getTokenBefore(firstBodyToken); + + if (astUtils.isOpeningParenToken(tokenBeforeFirst) && astUtils.isOpeningBraceToken(firstBodyToken)) { + tokensToIgnore.add(firstBodyToken); + } + if (hasExcessParens(node.body) && precedence(node.body) >= PRECEDENCE_OF_ASSIGNMENT_EXPR) { + report(node.body); + } + } + }, + + AssignmentExpression(node) { + if (isReturnAssignException(node)) { + return; + } + + if (hasExcessParens(node.right) && precedence(node.right) >= precedence(node)) { + report(node.right); + } + }, + + BinaryExpression: checkBinaryLogical, + CallExpression: checkCallNew, + + ConditionalExpression(node) { + if (isReturnAssignException(node)) { + return; + } + + if (hasExcessParens(node.test) && precedence(node.test) >= precedence({ type: "LogicalExpression", operator: "||" })) { + report(node.test); + } + + if (hasExcessParens(node.consequent) && precedence(node.consequent) >= PRECEDENCE_OF_ASSIGNMENT_EXPR) { + report(node.consequent); + } + + if (hasExcessParens(node.alternate) && precedence(node.alternate) >= PRECEDENCE_OF_ASSIGNMENT_EXPR) { + report(node.alternate); + } + }, + + DoWhileStatement(node) { + if (hasDoubleExcessParens(node.test) && !isCondAssignException(node)) { + report(node.test); + } + }, + + ExportDefaultDeclaration: node => checkExpressionOrExportStatement(node.declaration), + ExpressionStatement: node => checkExpressionOrExportStatement(node.expression), + + "ForInStatement, ForOfStatement"(node) { + if (node.left.type !== "VariableDeclarator") { + const firstLeftToken = sourceCode.getFirstToken(node.left, astUtils.isNotOpeningParenToken); + + if ( + firstLeftToken.value === "let" && ( + + /* + * If `let` is the only thing on the left side of the loop, it's the loop variable: `for ((let) of foo);` + * Removing it will cause a syntax error, because it will be parsed as the start of a VariableDeclarator. + */ + firstLeftToken.range[1] === node.left.range[1] || + + /* + * If `let` is followed by a `[` token, it's a property access on the `let` value: `for ((let[foo]) of bar);` + * Removing it will cause the property access to be parsed as a destructuring declaration of `foo` instead. + */ + astUtils.isOpeningBracketToken( + sourceCode.getTokenAfter(firstLeftToken, astUtils.isNotClosingParenToken) + ) + ) + ) { + tokensToIgnore.add(firstLeftToken); + } + } + if (!(node.type === "ForOfStatement" && node.right.type === "SequenceExpression") && hasExcessParens(node.right)) { + report(node.right); + } + if (hasExcessParens(node.left)) { + report(node.left); + } + }, + + ForStatement(node) { + if (node.init && hasExcessParens(node.init)) { + report(node.init); + } + + if (node.test && hasExcessParens(node.test) && !isCondAssignException(node)) { + report(node.test); + } + + if (node.update && hasExcessParens(node.update)) { + report(node.update); + } + }, + + IfStatement(node) { + if (hasDoubleExcessParens(node.test) && !isCondAssignException(node)) { + report(node.test); + } + }, + + LogicalExpression: checkBinaryLogical, + + MemberExpression(node) { + const nodeObjHasExcessParens = hasExcessParens(node.object); + + if ( + nodeObjHasExcessParens && + precedence(node.object) >= precedence(node) && + ( + node.computed || + !( + astUtils.isDecimalInteger(node.object) || + + // RegExp literal is allowed to have parens (#1589) + (node.object.type === "Literal" && node.object.regex) + ) + ) + ) { + report(node.object); + } + + if (nodeObjHasExcessParens && + node.object.type === "CallExpression" && + node.parent.type !== "NewExpression") { + report(node.object); + } + + if (node.computed && hasExcessParens(node.property)) { + report(node.property); + } + }, + + NewExpression: checkCallNew, + + ObjectExpression(node) { + node.properties + .filter(property => { + const value = property.value; + + return value && hasExcessParens(value) && precedence(value) >= PRECEDENCE_OF_ASSIGNMENT_EXPR; + }).forEach(property => report(property.value)); + }, + + ReturnStatement(node) { + const returnToken = sourceCode.getFirstToken(node); + + if (isReturnAssignException(node)) { + return; + } + + if (node.argument && + hasExcessParensNoLineTerminator(returnToken, node.argument) && + + // RegExp literal is allowed to have parens (#1589) + !(node.argument.type === "Literal" && node.argument.regex)) { + report(node.argument); + } + }, + + SequenceExpression(node) { + node.expressions + .filter(e => hasExcessParens(e) && precedence(e) >= precedence(node)) + .forEach(report); + }, + + SwitchCase(node) { + if (node.test && hasExcessParens(node.test)) { + report(node.test); + } + }, + + SwitchStatement(node) { + if (hasDoubleExcessParens(node.discriminant)) { + report(node.discriminant); + } + }, + + ThrowStatement(node) { + const throwToken = sourceCode.getFirstToken(node); + + if (hasExcessParensNoLineTerminator(throwToken, node.argument)) { + report(node.argument); + } + }, + + UnaryExpression: checkUnaryUpdate, + UpdateExpression: checkUnaryUpdate, + AwaitExpression: checkUnaryUpdate, + + VariableDeclarator(node) { + if (node.init && hasExcessParens(node.init) && + precedence(node.init) >= PRECEDENCE_OF_ASSIGNMENT_EXPR && + + // RegExp literal is allowed to have parens (#1589) + !(node.init.type === "Literal" && node.init.regex)) { + report(node.init); + } + }, + + WhileStatement(node) { + if (hasDoubleExcessParens(node.test) && !isCondAssignException(node)) { + report(node.test); + } + }, + + WithStatement(node) { + if (hasDoubleExcessParens(node.object)) { + report(node.object); + } + }, + + YieldExpression(node) { + if (node.argument) { + const yieldToken = sourceCode.getFirstToken(node); + + if ((precedence(node.argument) >= precedence(node) && + hasExcessParensNoLineTerminator(yieldToken, node.argument)) || + hasDoubleExcessParens(node.argument)) { + report(node.argument); + } + } + }, + + ClassDeclaration: checkClass, + ClassExpression: checkClass, + + SpreadElement: checkSpreadOperator, + SpreadProperty: checkSpreadOperator, + ExperimentalSpreadProperty: checkSpreadOperator + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-extra-semi.js b/node_modules/eslint/lib/rules/no-extra-semi.js new file mode 100644 index 0000000..a074108 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-extra-semi.js @@ -0,0 +1,125 @@ +/** + * @fileoverview Rule to flag use of unnecessary semicolons + * @author Nicholas C. Zakas + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const FixTracker = require("../util/fix-tracker"); +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow unnecessary semicolons", + category: "Possible Errors", + recommended: true, + url: "https://eslint.org/docs/rules/no-extra-semi" + }, + + fixable: "code", + schema: [], + + messages: { + unexpected: "Unnecessary semicolon." + } + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + /** + * Reports an unnecessary semicolon error. + * @param {Node|Token} nodeOrToken - A node or a token to be reported. + * @returns {void} + */ + function report(nodeOrToken) { + context.report({ + node: nodeOrToken, + messageId: "unexpected", + fix(fixer) { + + /* + * Expand the replacement range to include the surrounding + * tokens to avoid conflicting with semi. + * https://github.com/eslint/eslint/issues/7928 + */ + return new FixTracker(fixer, context.getSourceCode()) + .retainSurroundingTokens(nodeOrToken) + .remove(nodeOrToken); + } + }); + } + + /** + * Checks for a part of a class body. + * This checks tokens from a specified token to a next MethodDefinition or the end of class body. + * + * @param {Token} firstToken - The first token to check. + * @returns {void} + */ + function checkForPartOfClassBody(firstToken) { + for (let token = firstToken; + token.type === "Punctuator" && !astUtils.isClosingBraceToken(token); + token = sourceCode.getTokenAfter(token) + ) { + if (astUtils.isSemicolonToken(token)) { + report(token); + } + } + } + + return { + + /** + * Reports this empty statement, except if the parent node is a loop. + * @param {Node} node - A EmptyStatement node to be reported. + * @returns {void} + */ + EmptyStatement(node) { + const parent = node.parent, + allowedParentTypes = [ + "ForStatement", + "ForInStatement", + "ForOfStatement", + "WhileStatement", + "DoWhileStatement", + "IfStatement", + "LabeledStatement", + "WithStatement" + ]; + + if (allowedParentTypes.indexOf(parent.type) === -1) { + report(node); + } + }, + + /** + * Checks tokens from the head of this class body to the first MethodDefinition or the end of this class body. + * @param {Node} node - A ClassBody node to check. + * @returns {void} + */ + ClassBody(node) { + checkForPartOfClassBody(sourceCode.getFirstToken(node, 1)); // 0 is `{`. + }, + + /** + * Checks tokens from this MethodDefinition to the next MethodDefinition or the end of this class body. + * @param {Node} node - A MethodDefinition node of the start point. + * @returns {void} + */ + MethodDefinition(node) { + checkForPartOfClassBody(sourceCode.getTokenAfter(node)); + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-fallthrough.js b/node_modules/eslint/lib/rules/no-fallthrough.js new file mode 100644 index 0000000..ce4f91a --- /dev/null +++ b/node_modules/eslint/lib/rules/no-fallthrough.js @@ -0,0 +1,136 @@ +/** + * @fileoverview Rule to flag fall-through cases in switch statements. + * @author Matt DuVall + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const lodash = require("lodash"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const DEFAULT_FALLTHROUGH_COMMENT = /falls?\s?through/i; + +/** + * Checks whether or not a given node has a fallthrough comment. + * @param {ASTNode} node - A SwitchCase node to get comments. + * @param {RuleContext} context - A rule context which stores comments. + * @param {RegExp} fallthroughCommentPattern - A pattern to match comment to. + * @returns {boolean} `true` if the node has a valid fallthrough comment. + */ +function hasFallthroughComment(node, context, fallthroughCommentPattern) { + const sourceCode = context.getSourceCode(); + const comment = lodash.last(sourceCode.getCommentsBefore(node)); + + return Boolean(comment && fallthroughCommentPattern.test(comment.value)); +} + +/** + * Checks whether or not a given code path segment is reachable. + * @param {CodePathSegment} segment - A CodePathSegment to check. + * @returns {boolean} `true` if the segment is reachable. + */ +function isReachable(segment) { + return segment.reachable; +} + +/** + * Checks whether a node and a token are separated by blank lines + * @param {ASTNode} node - The node to check + * @param {Token} token - The token to compare against + * @returns {boolean} `true` if there are blank lines between node and token + */ +function hasBlankLinesBetween(node, token) { + return token.loc.start.line > node.loc.end.line + 1; +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow fallthrough of `case` statements", + category: "Best Practices", + recommended: true, + url: "https://eslint.org/docs/rules/no-fallthrough" + }, + + schema: [ + { + type: "object", + properties: { + commentPattern: { + type: "string" + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + const options = context.options[0] || {}; + let currentCodePath = null; + const sourceCode = context.getSourceCode(); + + /* + * We need to use leading comments of the next SwitchCase node because + * trailing comments is wrong if semicolons are omitted. + */ + let fallthroughCase = null; + let fallthroughCommentPattern = null; + + if (options.commentPattern) { + fallthroughCommentPattern = new RegExp(options.commentPattern); + } else { + fallthroughCommentPattern = DEFAULT_FALLTHROUGH_COMMENT; + } + + return { + onCodePathStart(codePath) { + currentCodePath = codePath; + }, + onCodePathEnd() { + currentCodePath = currentCodePath.upper; + }, + + SwitchCase(node) { + + /* + * Checks whether or not there is a fallthrough comment. + * And reports the previous fallthrough node if that does not exist. + */ + if (fallthroughCase && !hasFallthroughComment(node, context, fallthroughCommentPattern)) { + context.report({ + message: "Expected a 'break' statement before '{{type}}'.", + data: { type: node.test ? "case" : "default" }, + node + }); + } + fallthroughCase = null; + }, + + "SwitchCase:exit"(node) { + const nextToken = sourceCode.getTokenAfter(node); + + /* + * `reachable` meant fall through because statements preceded by + * `break`, `return`, or `throw` are unreachable. + * And allows empty cases and the last case. + */ + if (currentCodePath.currentSegments.some(isReachable) && + (node.consequent.length > 0 || hasBlankLinesBetween(node, nextToken)) && + lodash.last(node.parent.cases) !== node) { + fallthroughCase = node; + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-floating-decimal.js b/node_modules/eslint/lib/rules/no-floating-decimal.js new file mode 100644 index 0000000..da8c479 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-floating-decimal.js @@ -0,0 +1,65 @@ +/** + * @fileoverview Rule to flag use of a leading/trailing decimal point in a numeric literal + * @author James Allardice + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow leading or trailing decimal points in numeric literals", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-floating-decimal" + }, + + schema: [], + + fixable: "code" + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + return { + Literal(node) { + + if (typeof node.value === "number") { + if (node.raw.startsWith(".")) { + context.report({ + node, + message: "A leading decimal point can be confused with a dot.", + fix(fixer) { + const tokenBefore = sourceCode.getTokenBefore(node); + const needsSpaceBefore = tokenBefore && + tokenBefore.range[1] === node.range[0] && + !astUtils.canTokensBeAdjacent(tokenBefore, `0${node.raw}`); + + return fixer.insertTextBefore(node, needsSpaceBefore ? " 0" : "0"); + } + }); + } + if (node.raw.indexOf(".") === node.raw.length - 1) { + context.report({ + node, + message: "A trailing decimal point can be confused with a dot.", + fix: fixer => fixer.insertTextAfter(node, "0") + }); + } + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-func-assign.js b/node_modules/eslint/lib/rules/no-func-assign.js new file mode 100644 index 0000000..a0a17f3 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-func-assign.js @@ -0,0 +1,64 @@ +/** + * @fileoverview Rule to flag use of function declaration identifiers as variables. + * @author Ian Christian Myers + */ + +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow reassigning `function` declarations", + category: "Possible Errors", + recommended: true, + url: "https://eslint.org/docs/rules/no-func-assign" + }, + + schema: [] + }, + + create(context) { + + /** + * Reports a reference if is non initializer and writable. + * @param {References} references - Collection of reference to check. + * @returns {void} + */ + function checkReference(references) { + astUtils.getModifyingReferences(references).forEach(reference => { + context.report({ node: reference.identifier, message: "'{{name}}' is a function.", data: { name: reference.identifier.name } }); + }); + } + + /** + * Finds and reports references that are non initializer and writable. + * @param {Variable} variable - A variable to check. + * @returns {void} + */ + function checkVariable(variable) { + if (variable.defs[0].type === "FunctionName") { + checkReference(variable.references); + } + } + + /** + * Checks parameters of a given function node. + * @param {ASTNode} node - A function node to check. + * @returns {void} + */ + function checkForFunction(node) { + context.getDeclaredVariables(node).forEach(checkVariable); + } + + return { + FunctionDeclaration: checkForFunction, + FunctionExpression: checkForFunction + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-global-assign.js b/node_modules/eslint/lib/rules/no-global-assign.js new file mode 100644 index 0000000..3397bdb --- /dev/null +++ b/node_modules/eslint/lib/rules/no-global-assign.js @@ -0,0 +1,86 @@ +/** + * @fileoverview Rule to disallow assignments to native objects or read-only global variables + * @author Ilya Volodin + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow assignments to native objects or read-only global variables", + category: "Best Practices", + recommended: true, + url: "https://eslint.org/docs/rules/no-global-assign" + }, + + schema: [ + { + type: "object", + properties: { + exceptions: { + type: "array", + items: { type: "string" }, + uniqueItems: true + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + const config = context.options[0]; + const exceptions = (config && config.exceptions) || []; + + /** + * Reports write references. + * @param {Reference} reference - A reference to check. + * @param {int} index - The index of the reference in the references. + * @param {Reference[]} references - The array that the reference belongs to. + * @returns {void} + */ + function checkReference(reference, index, references) { + const identifier = reference.identifier; + + if (reference.init === false && + reference.isWrite() && + + /* + * Destructuring assignments can have multiple default value, + * so possibly there are multiple writeable references for the same identifier. + */ + (index === 0 || references[index - 1].identifier !== identifier) + ) { + context.report({ + node: identifier, + message: "Read-only global '{{name}}' should not be modified.", + data: identifier + }); + } + } + + /** + * Reports write references if a given variable is read-only builtin. + * @param {Variable} variable - A variable to check. + * @returns {void} + */ + function checkVariable(variable) { + if (variable.writeable === false && exceptions.indexOf(variable.name) === -1) { + variable.references.forEach(checkReference); + } + } + + return { + Program() { + const globalScope = context.getScope(); + + globalScope.variables.forEach(checkVariable); + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-implicit-coercion.js b/node_modules/eslint/lib/rules/no-implicit-coercion.js new file mode 100644 index 0000000..7efab83 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-implicit-coercion.js @@ -0,0 +1,293 @@ +/** + * @fileoverview A rule to disallow the type conversions with shorter notations. + * @author Toru Nagashima + */ + +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const INDEX_OF_PATTERN = /^(?:i|lastI)ndexOf$/; +const ALLOWABLE_OPERATORS = ["~", "!!", "+", "*"]; + +/** + * Parses and normalizes an option object. + * @param {Object} options - An option object to parse. + * @returns {Object} The parsed and normalized option object. + */ +function parseOptions(options) { + options = options || {}; + return { + boolean: "boolean" in options ? Boolean(options.boolean) : true, + number: "number" in options ? Boolean(options.number) : true, + string: "string" in options ? Boolean(options.string) : true, + allow: options.allow || [] + }; +} + +/** + * Checks whether or not a node is a double logical nigating. + * @param {ASTNode} node - An UnaryExpression node to check. + * @returns {boolean} Whether or not the node is a double logical nigating. + */ +function isDoubleLogicalNegating(node) { + return ( + node.operator === "!" && + node.argument.type === "UnaryExpression" && + node.argument.operator === "!" + ); +} + +/** + * Checks whether or not a node is a binary negating of `.indexOf()` method calling. + * @param {ASTNode} node - An UnaryExpression node to check. + * @returns {boolean} Whether or not the node is a binary negating of `.indexOf()` method calling. + */ +function isBinaryNegatingOfIndexOf(node) { + return ( + node.operator === "~" && + node.argument.type === "CallExpression" && + node.argument.callee.type === "MemberExpression" && + node.argument.callee.property.type === "Identifier" && + INDEX_OF_PATTERN.test(node.argument.callee.property.name) + ); +} + +/** + * Checks whether or not a node is a multiplying by one. + * @param {BinaryExpression} node - A BinaryExpression node to check. + * @returns {boolean} Whether or not the node is a multiplying by one. + */ +function isMultiplyByOne(node) { + return node.operator === "*" && ( + node.left.type === "Literal" && node.left.value === 1 || + node.right.type === "Literal" && node.right.value === 1 + ); +} + +/** + * Checks whether the result of a node is numeric or not + * @param {ASTNode} node The node to test + * @returns {boolean} true if the node is a number literal or a `Number()`, `parseInt` or `parseFloat` call + */ +function isNumeric(node) { + return ( + node.type === "Literal" && typeof node.value === "number" || + node.type === "CallExpression" && ( + node.callee.name === "Number" || + node.callee.name === "parseInt" || + node.callee.name === "parseFloat" + ) + ); +} + +/** + * Returns the first non-numeric operand in a BinaryExpression. Designed to be + * used from bottom to up since it walks up the BinaryExpression trees using + * node.parent to find the result. + * @param {BinaryExpression} node The BinaryExpression node to be walked up on + * @returns {ASTNode|null} The first non-numeric item in the BinaryExpression tree or null + */ +function getNonNumericOperand(node) { + const left = node.left, + right = node.right; + + if (right.type !== "BinaryExpression" && !isNumeric(right)) { + return right; + } + + if (left.type !== "BinaryExpression" && !isNumeric(left)) { + return left; + } + + return null; +} + +/** + * Checks whether a node is an empty string literal or not. + * @param {ASTNode} node The node to check. + * @returns {boolean} Whether or not the passed in node is an + * empty string literal or not. + */ +function isEmptyString(node) { + return astUtils.isStringLiteral(node) && (node.value === "" || (node.type === "TemplateLiteral" && node.quasis.length === 1 && node.quasis[0].value.cooked === "")); +} + +/** + * Checks whether or not a node is a concatenating with an empty string. + * @param {ASTNode} node - A BinaryExpression node to check. + * @returns {boolean} Whether or not the node is a concatenating with an empty string. + */ +function isConcatWithEmptyString(node) { + return node.operator === "+" && ( + (isEmptyString(node.left) && !astUtils.isStringLiteral(node.right)) || + (isEmptyString(node.right) && !astUtils.isStringLiteral(node.left)) + ); +} + +/** + * Checks whether or not a node is appended with an empty string. + * @param {ASTNode} node - An AssignmentExpression node to check. + * @returns {boolean} Whether or not the node is appended with an empty string. + */ +function isAppendEmptyString(node) { + return node.operator === "+=" && isEmptyString(node.right); +} + +/** + * Returns the operand that is not an empty string from a flagged BinaryExpression. + * @param {ASTNode} node - The flagged BinaryExpression node to check. + * @returns {ASTNode} The operand that is not an empty string from a flagged BinaryExpression. + */ +function getNonEmptyOperand(node) { + return isEmptyString(node.left) ? node.right : node.left; +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow shorthand type conversions", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-implicit-coercion" + }, + + fixable: "code", + schema: [{ + type: "object", + properties: { + boolean: { + type: "boolean" + }, + number: { + type: "boolean" + }, + string: { + type: "boolean" + }, + allow: { + type: "array", + items: { + enum: ALLOWABLE_OPERATORS + }, + uniqueItems: true + } + }, + additionalProperties: false + }] + }, + + create(context) { + const options = parseOptions(context.options[0]); + const sourceCode = context.getSourceCode(); + + /** + * Reports an error and autofixes the node + * @param {ASTNode} node - An ast node to report the error on. + * @param {string} recommendation - The recommended code for the issue + * @param {bool} shouldFix - Whether this report should fix the node + * @returns {void} + */ + function report(node, recommendation, shouldFix) { + shouldFix = typeof shouldFix === "undefined" ? true : shouldFix; + + context.report({ + node, + message: "use `{{recommendation}}` instead.", + data: { + recommendation + }, + fix(fixer) { + if (!shouldFix) { + return null; + } + + const tokenBefore = sourceCode.getTokenBefore(node); + + if ( + tokenBefore && + tokenBefore.range[1] === node.range[0] && + !astUtils.canTokensBeAdjacent(tokenBefore, recommendation) + ) { + return fixer.replaceText(node, ` ${recommendation}`); + } + return fixer.replaceText(node, recommendation); + } + }); + } + + return { + UnaryExpression(node) { + let operatorAllowed; + + // !!foo + operatorAllowed = options.allow.indexOf("!!") >= 0; + if (!operatorAllowed && options.boolean && isDoubleLogicalNegating(node)) { + const recommendation = `Boolean(${sourceCode.getText(node.argument.argument)})`; + + report(node, recommendation); + } + + // ~foo.indexOf(bar) + operatorAllowed = options.allow.indexOf("~") >= 0; + if (!operatorAllowed && options.boolean && isBinaryNegatingOfIndexOf(node)) { + const recommendation = `${sourceCode.getText(node.argument)} !== -1`; + + report(node, recommendation, false); + } + + // +foo + operatorAllowed = options.allow.indexOf("+") >= 0; + if (!operatorAllowed && options.number && node.operator === "+" && !isNumeric(node.argument)) { + const recommendation = `Number(${sourceCode.getText(node.argument)})`; + + report(node, recommendation); + } + }, + + // Use `:exit` to prevent double reporting + "BinaryExpression:exit"(node) { + let operatorAllowed; + + // 1 * foo + operatorAllowed = options.allow.indexOf("*") >= 0; + const nonNumericOperand = !operatorAllowed && options.number && isMultiplyByOne(node) && getNonNumericOperand(node); + + if (nonNumericOperand) { + const recommendation = `Number(${sourceCode.getText(nonNumericOperand)})`; + + report(node, recommendation); + } + + // "" + foo + operatorAllowed = options.allow.indexOf("+") >= 0; + if (!operatorAllowed && options.string && isConcatWithEmptyString(node)) { + const recommendation = `String(${sourceCode.getText(getNonEmptyOperand(node))})`; + + report(node, recommendation); + } + }, + + AssignmentExpression(node) { + + // foo += "" + const operatorAllowed = options.allow.indexOf("+") >= 0; + + if (!operatorAllowed && options.string && isAppendEmptyString(node)) { + const code = sourceCode.getText(getNonEmptyOperand(node)); + const recommendation = `${code} = String(${code})`; + + report(node, recommendation); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-implicit-globals.js b/node_modules/eslint/lib/rules/no-implicit-globals.js new file mode 100644 index 0000000..c4717b6 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-implicit-globals.js @@ -0,0 +1,56 @@ +/** + * @fileoverview Rule to check for implicit global variables and functions. + * @author Joshua Peek + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow variable and `function` declarations in the global scope", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-implicit-globals" + }, + + schema: [] + }, + + create(context) { + return { + Program() { + const scope = context.getScope(); + + scope.variables.forEach(variable => { + if (variable.writeable) { + return; + } + + variable.defs.forEach(def => { + if (def.type === "FunctionName" || (def.type === "Variable" && def.parent.kind === "var")) { + context.report({ node: def.node, message: "Implicit global variable, assign as global property instead." }); + } + }); + }); + + scope.implicit.variables.forEach(variable => { + const scopeVariable = scope.set.get(variable.name); + + if (scopeVariable && scopeVariable.writeable) { + return; + } + + variable.defs.forEach(def => { + context.report({ node: def.node, message: "Implicit global variable, assign as global property instead." }); + }); + }); + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-implied-eval.js b/node_modules/eslint/lib/rules/no-implied-eval.js new file mode 100644 index 0000000..de294bc --- /dev/null +++ b/node_modules/eslint/lib/rules/no-implied-eval.js @@ -0,0 +1,162 @@ +/** + * @fileoverview Rule to flag use of implied eval via setTimeout and setInterval + * @author James Allardice + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow the use of `eval()`-like methods", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-implied-eval" + }, + + schema: [] + }, + + create(context) { + const CALLEE_RE = /^(setTimeout|setInterval|execScript)$/; + + /* + * Figures out if we should inspect a given binary expression. Is a stack + * of stacks, where the first element in each substack is a CallExpression. + */ + const impliedEvalAncestorsStack = []; + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Get the last element of an array, without modifying arr, like pop(), but non-destructive. + * @param {array} arr What to inspect + * @returns {*} The last element of arr + * @private + */ + function last(arr) { + return arr ? arr[arr.length - 1] : null; + } + + /** + * Checks if the given MemberExpression node is a potentially implied eval identifier on window. + * @param {ASTNode} node The MemberExpression node to check. + * @returns {boolean} Whether or not the given node is potentially an implied eval. + * @private + */ + function isImpliedEvalMemberExpression(node) { + const object = node.object, + property = node.property, + hasImpliedEvalName = CALLEE_RE.test(property.name) || CALLEE_RE.test(property.value); + + return object.name === "window" && hasImpliedEvalName; + } + + /** + * Determines if a node represents a call to a potentially implied eval. + * + * This checks the callee name and that there's an argument, but not the type of the argument. + * + * @param {ASTNode} node The CallExpression to check. + * @returns {boolean} True if the node matches, false if not. + * @private + */ + function isImpliedEvalCallExpression(node) { + const isMemberExpression = (node.callee.type === "MemberExpression"), + isIdentifier = (node.callee.type === "Identifier"), + isImpliedEvalCallee = + (isIdentifier && CALLEE_RE.test(node.callee.name)) || + (isMemberExpression && isImpliedEvalMemberExpression(node.callee)); + + return isImpliedEvalCallee && node.arguments.length; + } + + /** + * Checks that the parent is a direct descendent of an potential implied eval CallExpression, and if the parent is a CallExpression, that we're the first argument. + * @param {ASTNode} node The node to inspect the parent of. + * @returns {boolean} Was the parent a direct descendent, and is the child therefore potentially part of a dangerous argument? + * @private + */ + function hasImpliedEvalParent(node) { + + // make sure our parent is marked + return node.parent === last(last(impliedEvalAncestorsStack)) && + + // if our parent is a CallExpression, make sure we're the first argument + (node.parent.type !== "CallExpression" || node === node.parent.arguments[0]); + } + + /** + * Checks if our parent is marked as part of an implied eval argument. If + * so, collapses the top of impliedEvalAncestorsStack and reports on the + * original CallExpression. + * @param {ASTNode} node The CallExpression to check. + * @returns {boolean} True if the node matches, false if not. + * @private + */ + function checkString(node) { + if (hasImpliedEvalParent(node)) { + + // remove the entire substack, to avoid duplicate reports + const substack = impliedEvalAncestorsStack.pop(); + + context.report({ node: substack[0], message: "Implied eval. Consider passing a function instead of a string." }); + } + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + CallExpression(node) { + if (isImpliedEvalCallExpression(node)) { + + // call expressions create a new substack + impliedEvalAncestorsStack.push([node]); + } + }, + + "CallExpression:exit"(node) { + if (node === last(last(impliedEvalAncestorsStack))) { + + /* + * Destroys the entire sub-stack, rather than just using + * last(impliedEvalAncestorsStack).pop(), as a CallExpression is + * always the bottom of a impliedEvalAncestorsStack substack. + */ + impliedEvalAncestorsStack.pop(); + } + }, + + BinaryExpression(node) { + if (node.operator === "+" && hasImpliedEvalParent(node)) { + last(impliedEvalAncestorsStack).push(node); + } + }, + + "BinaryExpression:exit"(node) { + if (node === last(last(impliedEvalAncestorsStack))) { + last(impliedEvalAncestorsStack).pop(); + } + }, + + Literal(node) { + if (typeof node.value === "string") { + checkString(node); + } + }, + + TemplateLiteral(node) { + checkString(node); + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-inline-comments.js b/node_modules/eslint/lib/rules/no-inline-comments.js new file mode 100644 index 0000000..85a0d38 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-inline-comments.js @@ -0,0 +1,66 @@ +/** + * @fileoverview Enforces or disallows inline comments. + * @author Greg Cochard + */ +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow inline comments after code", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/no-inline-comments" + }, + + schema: [] + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + /** + * Will check that comments are not on lines starting with or ending with code + * @param {ASTNode} node The comment node to check + * @private + * @returns {void} + */ + function testCodeAroundComment(node) { + + // Get the whole line and cut it off at the start of the comment + const startLine = String(sourceCode.lines[node.loc.start.line - 1]); + const endLine = String(sourceCode.lines[node.loc.end.line - 1]); + + const preamble = startLine.slice(0, node.loc.start.column).trim(); + + // Also check after the comment + const postamble = endLine.slice(node.loc.end.column).trim(); + + // Check that this comment isn't an ESLint directive + const isDirective = astUtils.isDirectiveComment(node); + + // Should be empty if there was only whitespace around the comment + if (!isDirective && (preamble || postamble)) { + context.report({ node, message: "Unexpected comment inline with code." }); + } + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + Program() { + const comments = sourceCode.getAllComments(); + + comments.filter(token => token.type !== "Shebang").forEach(testCodeAroundComment); + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-inner-declarations.js b/node_modules/eslint/lib/rules/no-inner-declarations.js new file mode 100644 index 0000000..032c0a0 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-inner-declarations.js @@ -0,0 +1,90 @@ +/** + * @fileoverview Rule to enforce declarations in program or function body root. + * @author Brandon Mills + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow variable or `function` declarations in nested blocks", + category: "Possible Errors", + recommended: true, + url: "https://eslint.org/docs/rules/no-inner-declarations" + }, + + schema: [ + { + enum: ["functions", "both"] + } + ] + }, + + create(context) { + + /** + * Find the nearest Program or Function ancestor node. + * @returns {Object} Ancestor's type and distance from node. + */ + function nearestBody() { + const ancestors = context.getAncestors(); + let ancestor = ancestors.pop(), + generation = 1; + + while (ancestor && ["Program", "FunctionDeclaration", + "FunctionExpression", "ArrowFunctionExpression" + ].indexOf(ancestor.type) < 0) { + generation += 1; + ancestor = ancestors.pop(); + } + + return { + + // Type of containing ancestor + type: ancestor.type, + + // Separation between ancestor and node + distance: generation + }; + } + + /** + * Ensure that a given node is at a program or function body's root. + * @param {ASTNode} node Declaration node to check. + * @returns {void} + */ + function check(node) { + const body = nearestBody(), + valid = ((body.type === "Program" && body.distance === 1) || + body.distance === 2); + + if (!valid) { + context.report({ + node, + message: "Move {{type}} declaration to {{body}} root.", + data: { + type: (node.type === "FunctionDeclaration" ? "function" : "variable"), + body: (body.type === "Program" ? "program" : "function body") + } + }); + } + } + + return { + + FunctionDeclaration: check, + VariableDeclaration(node) { + if (context.options[0] === "both" && node.kind === "var") { + check(node); + } + } + + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-invalid-regexp.js b/node_modules/eslint/lib/rules/no-invalid-regexp.js new file mode 100644 index 0000000..8ccb524 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-invalid-regexp.js @@ -0,0 +1,107 @@ +/** + * @fileoverview Validate strings passed to the RegExp constructor + * @author Michael Ficarra + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const espree = require("espree"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow invalid regular expression strings in `RegExp` constructors", + category: "Possible Errors", + recommended: true, + url: "https://eslint.org/docs/rules/no-invalid-regexp" + }, + + schema: [{ + type: "object", + properties: { + allowConstructorFlags: { + type: "array", + items: { + type: "string" + } + } + }, + additionalProperties: false + }] + }, + + create(context) { + + const options = context.options[0]; + let allowedFlags = ""; + + if (options && options.allowConstructorFlags) { + allowedFlags = options.allowConstructorFlags.join(""); + } + + /** + * Check if node is a string + * @param {ASTNode} node node to evaluate + * @returns {boolean} True if its a string + * @private + */ + function isString(node) { + return node && node.type === "Literal" && typeof node.value === "string"; + } + + /** + * Validate strings passed to the RegExp constructor + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ + function check(node) { + if (node.callee.type === "Identifier" && node.callee.name === "RegExp" && isString(node.arguments[0])) { + let flags = isString(node.arguments[1]) ? node.arguments[1].value : ""; + + if (allowedFlags) { + flags = flags.replace(new RegExp(`[${allowedFlags}]`, "gi"), ""); + } + + try { + void new RegExp(node.arguments[0].value); + } catch (e) { + context.report({ + node, + message: "{{message}}.", + data: e + }); + } + + if (flags) { + + try { + espree.parse(`/./${flags}`, context.parserOptions); + } catch (ex) { + context.report({ + node, + message: "Invalid flags supplied to RegExp constructor '{{flags}}'.", + data: { + flags + } + }); + } + } + + } + } + + return { + CallExpression: check, + NewExpression: check + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-invalid-this.js b/node_modules/eslint/lib/rules/no-invalid-this.js new file mode 100644 index 0000000..a04673b --- /dev/null +++ b/node_modules/eslint/lib/rules/no-invalid-this.js @@ -0,0 +1,124 @@ +/** + * @fileoverview A rule to disallow `this` keywords outside of classes or class-like objects. + * @author Toru Nagashima + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow `this` keywords outside of classes or class-like objects", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-invalid-this" + }, + + schema: [] + }, + + create(context) { + const stack = [], + sourceCode = context.getSourceCode(); + + /** + * Gets the current checking context. + * + * The return value has a flag that whether or not `this` keyword is valid. + * The flag is initialized when got at the first time. + * + * @returns {{valid: boolean}} + * an object which has a flag that whether or not `this` keyword is valid. + */ + stack.getCurrent = function() { + const current = this[this.length - 1]; + + if (!current.init) { + current.init = true; + current.valid = !astUtils.isDefaultThisBinding( + current.node, + sourceCode + ); + } + return current; + }; + + /** + * Pushs new checking context into the stack. + * + * The checking context is not initialized yet. + * Because most functions don't have `this` keyword. + * When `this` keyword was found, the checking context is initialized. + * + * @param {ASTNode} node - A function node that was entered. + * @returns {void} + */ + function enterFunction(node) { + + // `this` can be invalid only under strict mode. + stack.push({ + init: !context.getScope().isStrict, + node, + valid: true + }); + } + + /** + * Pops the current checking context from the stack. + * @returns {void} + */ + function exitFunction() { + stack.pop(); + } + + return { + + /* + * `this` is invalid only under strict mode. + * Modules is always strict mode. + */ + Program(node) { + const scope = context.getScope(), + features = context.parserOptions.ecmaFeatures || {}; + + stack.push({ + init: true, + node, + valid: !( + scope.isStrict || + node.sourceType === "module" || + (features.globalReturn && scope.childScopes[0].isStrict) + ) + }); + }, + + "Program:exit"() { + stack.pop(); + }, + + FunctionDeclaration: enterFunction, + "FunctionDeclaration:exit": exitFunction, + FunctionExpression: enterFunction, + "FunctionExpression:exit": exitFunction, + + // Reports if `this` of the current context is invalid. + ThisExpression(node) { + const current = stack.getCurrent(); + + if (current && !current.valid) { + context.report({ node, message: "Unexpected 'this'." }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-irregular-whitespace.js b/node_modules/eslint/lib/rules/no-irregular-whitespace.js new file mode 100644 index 0000000..e36ec88 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-irregular-whitespace.js @@ -0,0 +1,237 @@ +/** + * @fileoverview Rule to disalow whitespace that is not a tab or space, whitespace inside strings and comments are allowed + * @author Jonathan Kingston + * @author Christophe Porteneuve + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Constants +//------------------------------------------------------------------------------ + +const ALL_IRREGULARS = /[\f\v\u0085\ufeff\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000\u2028\u2029]/; +const IRREGULAR_WHITESPACE = /[\f\v\u0085\ufeff\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u202f\u205f\u3000]+/mg; +const IRREGULAR_LINE_TERMINATORS = /[\u2028\u2029]/mg; +const LINE_BREAK = astUtils.createGlobalLinebreakMatcher(); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow irregular whitespace outside of strings and comments", + category: "Possible Errors", + recommended: true, + url: "https://eslint.org/docs/rules/no-irregular-whitespace" + }, + + schema: [ + { + type: "object", + properties: { + skipComments: { + type: "boolean" + }, + skipStrings: { + type: "boolean" + }, + skipTemplates: { + type: "boolean" + }, + skipRegExps: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + + // Module store of errors that we have found + let errors = []; + + // Lookup the `skipComments` option, which defaults to `false`. + const options = context.options[0] || {}; + const skipComments = !!options.skipComments; + const skipStrings = options.skipStrings !== false; + const skipRegExps = !!options.skipRegExps; + const skipTemplates = !!options.skipTemplates; + + const sourceCode = context.getSourceCode(); + const commentNodes = sourceCode.getAllComments(); + + /** + * Removes errors that occur inside a string node + * @param {ASTNode} node to check for matching errors. + * @returns {void} + * @private + */ + function removeWhitespaceError(node) { + const locStart = node.loc.start; + const locEnd = node.loc.end; + + errors = errors.filter(error => { + const errorLoc = error[1]; + + if (errorLoc.line >= locStart.line && errorLoc.line <= locEnd.line) { + if (errorLoc.column >= locStart.column && (errorLoc.column <= locEnd.column || errorLoc.line < locEnd.line)) { + return false; + } + } + return true; + }); + } + + /** + * Checks identifier or literal nodes for errors that we are choosing to ignore and calls the relevant methods to remove the errors + * @param {ASTNode} node to check for matching errors. + * @returns {void} + * @private + */ + function removeInvalidNodeErrorsInIdentifierOrLiteral(node) { + const shouldCheckStrings = skipStrings && (typeof node.value === "string"); + const shouldCheckRegExps = skipRegExps && (node.value instanceof RegExp); + + if (shouldCheckStrings || shouldCheckRegExps) { + + // If we have irregular characters remove them from the errors list + if (ALL_IRREGULARS.test(node.raw)) { + removeWhitespaceError(node); + } + } + } + + /** + * Checks template string literal nodes for errors that we are choosing to ignore and calls the relevant methods to remove the errors + * @param {ASTNode} node to check for matching errors. + * @returns {void} + * @private + */ + function removeInvalidNodeErrorsInTemplateLiteral(node) { + if (typeof node.value.raw === "string") { + if (ALL_IRREGULARS.test(node.value.raw)) { + removeWhitespaceError(node); + } + } + } + + /** + * Checks comment nodes for errors that we are choosing to ignore and calls the relevant methods to remove the errors + * @param {ASTNode} node to check for matching errors. + * @returns {void} + * @private + */ + function removeInvalidNodeErrorsInComment(node) { + if (ALL_IRREGULARS.test(node.value)) { + removeWhitespaceError(node); + } + } + + /** + * Checks the program source for irregular whitespace + * @param {ASTNode} node The program node + * @returns {void} + * @private + */ + function checkForIrregularWhitespace(node) { + const sourceLines = sourceCode.lines; + + sourceLines.forEach((sourceLine, lineIndex) => { + const lineNumber = lineIndex + 1; + let match; + + while ((match = IRREGULAR_WHITESPACE.exec(sourceLine)) !== null) { + const location = { + line: lineNumber, + column: match.index + }; + + errors.push([node, location, "Irregular whitespace not allowed."]); + } + }); + } + + /** + * Checks the program source for irregular line terminators + * @param {ASTNode} node The program node + * @returns {void} + * @private + */ + function checkForIrregularLineTerminators(node) { + const source = sourceCode.getText(), + sourceLines = sourceCode.lines, + linebreaks = source.match(LINE_BREAK); + let lastLineIndex = -1, + match; + + while ((match = IRREGULAR_LINE_TERMINATORS.exec(source)) !== null) { + const lineIndex = linebreaks.indexOf(match[0], lastLineIndex + 1) || 0; + const location = { + line: lineIndex + 1, + column: sourceLines[lineIndex].length + }; + + errors.push([node, location, "Irregular whitespace not allowed."]); + lastLineIndex = lineIndex; + } + } + + /** + * A no-op function to act as placeholder for comment accumulation when the `skipComments` option is `false`. + * @returns {void} + * @private + */ + function noop() {} + + const nodes = {}; + + if (ALL_IRREGULARS.test(sourceCode.getText())) { + nodes.Program = function(node) { + + /* + * As we can easily fire warnings for all white space issues with + * all the source its simpler to fire them here. + * This means we can check all the application code without having + * to worry about issues caused in the parser tokens. + * When writing this code also evaluating per node was missing out + * connecting tokens in some cases. + * We can later filter the errors when they are found to be not an + * issue in nodes we don't care about. + */ + checkForIrregularWhitespace(node); + checkForIrregularLineTerminators(node); + }; + + nodes.Identifier = removeInvalidNodeErrorsInIdentifierOrLiteral; + nodes.Literal = removeInvalidNodeErrorsInIdentifierOrLiteral; + nodes.TemplateElement = skipTemplates ? removeInvalidNodeErrorsInTemplateLiteral : noop; + nodes["Program:exit"] = function() { + if (skipComments) { + + // First strip errors occurring in comment nodes. + commentNodes.forEach(removeInvalidNodeErrorsInComment); + } + + // If we have any errors remaining report on them + errors.forEach(error => { + context.report.apply(context, error); + }); + }; + } else { + nodes.Program = noop; + } + + return nodes; + } +}; diff --git a/node_modules/eslint/lib/rules/no-iterator.js b/node_modules/eslint/lib/rules/no-iterator.js new file mode 100644 index 0000000..ca12fcd --- /dev/null +++ b/node_modules/eslint/lib/rules/no-iterator.js @@ -0,0 +1,39 @@ +/** + * @fileoverview Rule to flag usage of __iterator__ property + * @author Ian Christian Myers + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow the use of the `__iterator__` property", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-iterator" + }, + + schema: [] + }, + + create(context) { + + return { + + MemberExpression(node) { + + if (node.property && + (node.property.type === "Identifier" && node.property.name === "__iterator__" && !node.computed) || + (node.property.type === "Literal" && node.property.value === "__iterator__")) { + context.report({ node, message: "Reserved name '__iterator__'." }); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-label-var.js b/node_modules/eslint/lib/rules/no-label-var.js new file mode 100644 index 0000000..a880abf --- /dev/null +++ b/node_modules/eslint/lib/rules/no-label-var.js @@ -0,0 +1,70 @@ +/** + * @fileoverview Rule to flag labels that are the same as an identifier + * @author Ian Christian Myers + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow labels that share a name with a variable", + category: "Variables", + recommended: false, + url: "https://eslint.org/docs/rules/no-label-var" + }, + + schema: [] + }, + + create(context) { + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Check if the identifier is present inside current scope + * @param {Object} scope current scope + * @param {string} name To evaluate + * @returns {boolean} True if its present + * @private + */ + function findIdentifier(scope, name) { + return astUtils.getVariableByName(scope, name) !== null; + } + + //-------------------------------------------------------------------------- + // Public API + //-------------------------------------------------------------------------- + + return { + + LabeledStatement(node) { + + // Fetch the innermost scope. + const scope = context.getScope(); + + /* + * Recursively find the identifier walking up the scope, starting + * with the innermost scope. + */ + if (findIdentifier(scope, node.label.name)) { + context.report({ node, message: "Found identifier with same name as label." }); + } + } + + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-labels.js b/node_modules/eslint/lib/rules/no-labels.js new file mode 100644 index 0000000..e09bb7b --- /dev/null +++ b/node_modules/eslint/lib/rules/no-labels.js @@ -0,0 +1,142 @@ +/** + * @fileoverview Disallow Labeled Statements + * @author Nicholas C. Zakas + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow labeled statements", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-labels" + }, + + schema: [ + { + type: "object", + properties: { + allowLoop: { + type: "boolean" + }, + allowSwitch: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + const options = context.options[0]; + const allowLoop = Boolean(options && options.allowLoop); + const allowSwitch = Boolean(options && options.allowSwitch); + let scopeInfo = null; + + /** + * Gets the kind of a given node. + * + * @param {ASTNode} node - A node to get. + * @returns {string} The kind of the node. + */ + function getBodyKind(node) { + if (astUtils.isLoop(node)) { + return "loop"; + } + if (node.type === "SwitchStatement") { + return "switch"; + } + return "other"; + } + + /** + * Checks whether the label of a given kind is allowed or not. + * + * @param {string} kind - A kind to check. + * @returns {boolean} `true` if the kind is allowed. + */ + function isAllowed(kind) { + switch (kind) { + case "loop": return allowLoop; + case "switch": return allowSwitch; + default: return false; + } + } + + /** + * Checks whether a given name is a label of a loop or not. + * + * @param {string} label - A name of a label to check. + * @returns {boolean} `true` if the name is a label of a loop. + */ + function getKind(label) { + let info = scopeInfo; + + while (info) { + if (info.label === label) { + return info.kind; + } + info = info.upper; + } + + /* istanbul ignore next: syntax error */ + return "other"; + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + LabeledStatement(node) { + scopeInfo = { + label: node.label.name, + kind: getBodyKind(node.body), + upper: scopeInfo + }; + }, + + "LabeledStatement:exit"(node) { + if (!isAllowed(scopeInfo.kind)) { + context.report({ + node, + message: "Unexpected labeled statement." + }); + } + + scopeInfo = scopeInfo.upper; + }, + + BreakStatement(node) { + if (node.label && !isAllowed(getKind(node.label.name))) { + context.report({ + node, + message: "Unexpected label in break statement." + }); + } + }, + + ContinueStatement(node) { + if (node.label && !isAllowed(getKind(node.label.name))) { + context.report({ + node, + message: "Unexpected label in continue statement." + }); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-lone-blocks.js b/node_modules/eslint/lib/rules/no-lone-blocks.js new file mode 100644 index 0000000..5e22aac --- /dev/null +++ b/node_modules/eslint/lib/rules/no-lone-blocks.js @@ -0,0 +1,113 @@ +/** + * @fileoverview Rule to flag blocks with no reason to exist + * @author Brandon Mills + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow unnecessary nested blocks", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-lone-blocks" + }, + + schema: [] + }, + + create(context) { + + // A stack of lone blocks to be checked for block-level bindings + const loneBlocks = []; + let ruleDef; + + /** + * Reports a node as invalid. + * @param {ASTNode} node - The node to be reported. + * @returns {void} + */ + function report(node) { + const message = node.parent.type === "BlockStatement" ? "Nested block is redundant." : "Block is redundant."; + + context.report({ node, message }); + } + + /** + * Checks for any ocurrence of a BlockStatement in a place where lists of statements can appear + * @param {ASTNode} node The node to check + * @returns {boolean} True if the node is a lone block. + */ + function isLoneBlock(node) { + return node.parent.type === "BlockStatement" || + node.parent.type === "Program" || + + // Don't report blocks in switch cases if the block is the only statement of the case. + node.parent.type === "SwitchCase" && !(node.parent.consequent[0] === node && node.parent.consequent.length === 1); + } + + /** + * Checks the enclosing block of the current node for block-level bindings, + * and "marks it" as valid if any. + * @returns {void} + */ + function markLoneBlock() { + if (loneBlocks.length === 0) { + return; + } + + const block = context.getAncestors().pop(); + + if (loneBlocks[loneBlocks.length - 1] === block) { + loneBlocks.pop(); + } + } + + // Default rule definition: report all lone blocks + ruleDef = { + BlockStatement(node) { + if (isLoneBlock(node)) { + report(node); + } + } + }; + + // ES6: report blocks without block-level bindings + if (context.parserOptions.ecmaVersion >= 6) { + ruleDef = { + BlockStatement(node) { + if (isLoneBlock(node)) { + loneBlocks.push(node); + } + }, + "BlockStatement:exit"(node) { + if (loneBlocks.length > 0 && loneBlocks[loneBlocks.length - 1] === node) { + loneBlocks.pop(); + report(node); + } + } + }; + + ruleDef.VariableDeclaration = function(node) { + if (node.kind === "let" || node.kind === "const") { + markLoneBlock(); + } + }; + + ruleDef.FunctionDeclaration = function() { + if (context.getScope().isStrict) { + markLoneBlock(); + } + }; + + ruleDef.ClassDeclaration = markLoneBlock; + } + + return ruleDef; + } +}; diff --git a/node_modules/eslint/lib/rules/no-lonely-if.js b/node_modules/eslint/lib/rules/no-lonely-if.js new file mode 100644 index 0000000..3ecc41e --- /dev/null +++ b/node_modules/eslint/lib/rules/no-lonely-if.js @@ -0,0 +1,84 @@ +/** + * @fileoverview Rule to disallow if as the only statmenet in an else block + * @author Brandon Mills + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow `if` statements as the only statement in `else` blocks", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/no-lonely-if" + }, + + schema: [], + + fixable: "code" + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + return { + IfStatement(node) { + const ancestors = context.getAncestors(), + parent = ancestors.pop(), + grandparent = ancestors.pop(); + + if (parent && parent.type === "BlockStatement" && + parent.body.length === 1 && grandparent && + grandparent.type === "IfStatement" && + parent === grandparent.alternate) { + context.report({ + node, + message: "Unexpected if as the only statement in an else block.", + fix(fixer) { + const openingElseCurly = sourceCode.getFirstToken(parent); + const closingElseCurly = sourceCode.getLastToken(parent); + const elseKeyword = sourceCode.getTokenBefore(openingElseCurly); + const tokenAfterElseBlock = sourceCode.getTokenAfter(closingElseCurly); + const lastIfToken = sourceCode.getLastToken(node.consequent); + const sourceText = sourceCode.getText(); + + if (sourceText.slice(openingElseCurly.range[1], + node.range[0]).trim() || sourceText.slice(node.range[1], closingElseCurly.range[0]).trim()) { + + // Don't fix if there are any non-whitespace characters interfering (e.g. comments) + return null; + } + + if ( + node.consequent.type !== "BlockStatement" && lastIfToken.value !== ";" && tokenAfterElseBlock && + ( + node.consequent.loc.end.line === tokenAfterElseBlock.loc.start.line || + /^[([/+`-]/.test(tokenAfterElseBlock.value) || + lastIfToken.value === "++" || + lastIfToken.value === "--" + ) + ) { + + /* + * If the `if` statement has no block, and is not followed by a semicolon, make sure that fixing + * the issue would not change semantics due to ASI. If this would happen, don't do a fix. + */ + return null; + } + + return fixer.replaceTextRange( + [openingElseCurly.range[0], closingElseCurly.range[1]], + (elseKeyword.range[1] === openingElseCurly.range[0] ? " " : "") + sourceCode.getText(node) + ); + } + }); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-loop-func.js b/node_modules/eslint/lib/rules/no-loop-func.js new file mode 100644 index 0000000..0dce09a --- /dev/null +++ b/node_modules/eslint/lib/rules/no-loop-func.js @@ -0,0 +1,202 @@ +/** + * @fileoverview Rule to flag creation of function inside a loop + * @author Ilya Volodin + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Gets the containing loop node of a specified node. + * + * We don't need to check nested functions, so this ignores those. + * `Scope.through` contains references of nested functions. + * + * @param {ASTNode} node - An AST node to get. + * @returns {ASTNode|null} The containing loop node of the specified node, or + * `null`. + */ +function getContainingLoopNode(node) { + let parent = node.parent; + + while (parent) { + switch (parent.type) { + case "WhileStatement": + case "DoWhileStatement": + return parent; + + case "ForStatement": + + // `init` is outside of the loop. + if (parent.init !== node) { + return parent; + } + break; + + case "ForInStatement": + case "ForOfStatement": + + // `right` is outside of the loop. + if (parent.right !== node) { + return parent; + } + break; + + case "ArrowFunctionExpression": + case "FunctionExpression": + case "FunctionDeclaration": + + // We don't need to check nested functions. + return null; + + default: + break; + } + + node = parent; + parent = node.parent; + } + + return null; +} + +/** + * Gets the containing loop node of a given node. + * If the loop was nested, this returns the most outer loop. + * + * @param {ASTNode} node - A node to get. This is a loop node. + * @param {ASTNode|null} excludedNode - A node that the result node should not + * include. + * @returns {ASTNode} The most outer loop node. + */ +function getTopLoopNode(node, excludedNode) { + let retv = node; + const border = excludedNode ? excludedNode.range[1] : 0; + + while (node && node.range[0] >= border) { + retv = node; + node = getContainingLoopNode(node); + } + + return retv; +} + +/** + * Checks whether a given reference which refers to an upper scope's variable is + * safe or not. + * + * @param {ASTNode} loopNode - A containing loop node. + * @param {eslint-scope.Reference} reference - A reference to check. + * @returns {boolean} `true` if the reference is safe or not. + */ +function isSafe(loopNode, reference) { + const variable = reference.resolved; + const definition = variable && variable.defs[0]; + const declaration = definition && definition.parent; + const kind = (declaration && declaration.type === "VariableDeclaration") + ? declaration.kind + : ""; + + // Variables which are declared by `const` is safe. + if (kind === "const") { + return true; + } + + /* + * Variables which are declared by `let` in the loop is safe. + * It's a different instance from the next loop step's. + */ + if (kind === "let" && + declaration.range[0] > loopNode.range[0] && + declaration.range[1] < loopNode.range[1] + ) { + return true; + } + + /* + * WriteReferences which exist after this border are unsafe because those + * can modify the variable. + */ + const border = getTopLoopNode( + loopNode, + (kind === "let") ? declaration : null + ).range[0]; + + /** + * Checks whether a given reference is safe or not. + * The reference is every reference of the upper scope's variable we are + * looking now. + * + * It's safeafe if the reference matches one of the following condition. + * - is readonly. + * - doesn't exist inside a local function and after the border. + * + * @param {eslint-scope.Reference} upperRef - A reference to check. + * @returns {boolean} `true` if the reference is safe. + */ + function isSafeReference(upperRef) { + const id = upperRef.identifier; + + return ( + !upperRef.isWrite() || + variable.scope.variableScope === upperRef.from.variableScope && + id.range[0] < border + ); + } + + return Boolean(variable) && variable.references.every(isSafeReference); +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow `function` declarations and expressions inside loop statements", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-loop-func" + }, + + schema: [] + }, + + create(context) { + + /** + * Reports functions which match the following condition: + * + * - has a loop node in ancestors. + * - has any references which refers to an unsafe variable. + * + * @param {ASTNode} node The AST node to check. + * @returns {boolean} Whether or not the node is within a loop. + */ + function checkForLoops(node) { + const loopNode = getContainingLoopNode(node); + + if (!loopNode) { + return; + } + + const references = context.getScope().through; + + if (references.length > 0 && + !references.every(isSafe.bind(null, loopNode)) + ) { + context.report({ node, message: "Don't make functions within a loop." }); + } + } + + return { + ArrowFunctionExpression: checkForLoops, + FunctionExpression: checkForLoops, + FunctionDeclaration: checkForLoops + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-magic-numbers.js b/node_modules/eslint/lib/rules/no-magic-numbers.js new file mode 100644 index 0000000..20a752e --- /dev/null +++ b/node_modules/eslint/lib/rules/no-magic-numbers.js @@ -0,0 +1,150 @@ +/** + * @fileoverview Rule to flag statements that use magic numbers (adapted from https://github.com/danielstjules/buddy.js) + * @author Vincent Lemeunier + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow magic numbers", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-magic-numbers" + }, + + schema: [{ + type: "object", + properties: { + detectObjects: { + type: "boolean" + }, + enforceConst: { + type: "boolean" + }, + ignore: { + type: "array", + items: { + type: "number" + }, + uniqueItems: true + }, + ignoreArrayIndexes: { + type: "boolean" + } + }, + additionalProperties: false + }] + }, + + create(context) { + const config = context.options[0] || {}, + detectObjects = !!config.detectObjects, + enforceConst = !!config.enforceConst, + ignore = config.ignore || [], + ignoreArrayIndexes = !!config.ignoreArrayIndexes; + + /** + * Returns whether the node is number literal + * @param {Node} node - the node literal being evaluated + * @returns {boolean} true if the node is a number literal + */ + function isNumber(node) { + return typeof node.value === "number"; + } + + /** + * Returns whether the number should be ignored + * @param {number} num - the number + * @returns {boolean} true if the number should be ignored + */ + function shouldIgnoreNumber(num) { + return ignore.indexOf(num) !== -1; + } + + /** + * Returns whether the number should be ignored when used as a radix within parseInt() or Number.parseInt() + * @param {ASTNode} parent - the non-"UnaryExpression" parent + * @param {ASTNode} node - the node literal being evaluated + * @returns {boolean} true if the number should be ignored + */ + function shouldIgnoreParseInt(parent, node) { + return parent.type === "CallExpression" && node === parent.arguments[1] && + (parent.callee.name === "parseInt" || + parent.callee.type === "MemberExpression" && + parent.callee.object.name === "Number" && + parent.callee.property.name === "parseInt"); + } + + /** + * Returns whether the number should be ignored when used to define a JSX prop + * @param {ASTNode} parent - the non-"UnaryExpression" parent + * @returns {boolean} true if the number should be ignored + */ + function shouldIgnoreJSXNumbers(parent) { + return parent.type.indexOf("JSX") === 0; + } + + /** + * Returns whether the number should be ignored when used as an array index with enabled 'ignoreArrayIndexes' option. + * @param {ASTNode} parent - the non-"UnaryExpression" parent. + * @returns {boolean} true if the number should be ignored + */ + function shouldIgnoreArrayIndexes(parent) { + return parent.type === "MemberExpression" && ignoreArrayIndexes; + } + + return { + Literal(node) { + let parent = node.parent, + value = node.value, + raw = node.raw; + const okTypes = detectObjects ? [] : ["ObjectExpression", "Property", "AssignmentExpression"]; + + if (!isNumber(node)) { + return; + } + + // For negative magic numbers: update the value and parent node + if (parent.type === "UnaryExpression" && parent.operator === "-") { + node = parent; + parent = node.parent; + value = -value; + raw = `-${raw}`; + } + + if (shouldIgnoreNumber(value) || + shouldIgnoreParseInt(parent, node) || + shouldIgnoreArrayIndexes(parent) || + shouldIgnoreJSXNumbers(parent)) { + return; + } + + if (parent.type === "VariableDeclarator") { + if (enforceConst && parent.parent.kind !== "const") { + context.report({ + node, + message: "Number constants declarations must use 'const'." + }); + } + } else if ( + okTypes.indexOf(parent.type) === -1 || + (parent.type === "AssignmentExpression" && parent.left.type === "Identifier") + ) { + context.report({ + node, + message: "No magic number: {{raw}}.", + data: { + raw + } + }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-mixed-operators.js b/node_modules/eslint/lib/rules/no-mixed-operators.js new file mode 100644 index 0000000..0df4225 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-mixed-operators.js @@ -0,0 +1,210 @@ +/** + * @fileoverview Rule to disallow mixed binary operators. + * @author Toru Nagashima + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils.js"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const ARITHMETIC_OPERATORS = ["+", "-", "*", "/", "%", "**"]; +const BITWISE_OPERATORS = ["&", "|", "^", "~", "<<", ">>", ">>>"]; +const COMPARISON_OPERATORS = ["==", "!=", "===", "!==", ">", ">=", "<", "<="]; +const LOGICAL_OPERATORS = ["&&", "||"]; +const RELATIONAL_OPERATORS = ["in", "instanceof"]; +const ALL_OPERATORS = [].concat( + ARITHMETIC_OPERATORS, + BITWISE_OPERATORS, + COMPARISON_OPERATORS, + LOGICAL_OPERATORS, + RELATIONAL_OPERATORS +); +const DEFAULT_GROUPS = [ + ARITHMETIC_OPERATORS, + BITWISE_OPERATORS, + COMPARISON_OPERATORS, + LOGICAL_OPERATORS, + RELATIONAL_OPERATORS +]; +const TARGET_NODE_TYPE = /^(?:Binary|Logical)Expression$/; + +/** + * Normalizes options. + * + * @param {Object|undefined} options - A options object to normalize. + * @returns {Object} Normalized option object. + */ +function normalizeOptions(options) { + const hasGroups = (options && options.groups && options.groups.length > 0); + const groups = hasGroups ? options.groups : DEFAULT_GROUPS; + const allowSamePrecedence = (options && options.allowSamePrecedence) !== false; + + return { + groups, + allowSamePrecedence + }; +} + +/** + * Checks whether any group which includes both given operator exists or not. + * + * @param {Array.} groups - A list of groups to check. + * @param {string} left - An operator. + * @param {string} right - Another operator. + * @returns {boolean} `true` if such group existed. + */ +function includesBothInAGroup(groups, left, right) { + return groups.some(group => group.indexOf(left) !== -1 && group.indexOf(right) !== -1); +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow mixed binary operators", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/no-mixed-operators" + }, + schema: [ + { + type: "object", + properties: { + groups: { + type: "array", + items: { + type: "array", + items: { enum: ALL_OPERATORS }, + minItems: 2, + uniqueItems: true + }, + uniqueItems: true + }, + allowSamePrecedence: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + const sourceCode = context.getSourceCode(); + const options = normalizeOptions(context.options[0]); + + /** + * Checks whether a given node should be ignored by options or not. + * + * @param {ASTNode} node - A node to check. This is a BinaryExpression + * node or a LogicalExpression node. This parent node is one of + * them, too. + * @returns {boolean} `true` if the node should be ignored. + */ + function shouldIgnore(node) { + const a = node; + const b = node.parent; + + return ( + !includesBothInAGroup(options.groups, a.operator, b.operator) || + ( + options.allowSamePrecedence && + astUtils.getPrecedence(a) === astUtils.getPrecedence(b) + ) + ); + } + + /** + * Checks whether the operator of a given node is mixed with parent + * node's operator or not. + * + * @param {ASTNode} node - A node to check. This is a BinaryExpression + * node or a LogicalExpression node. This parent node is one of + * them, too. + * @returns {boolean} `true` if the node was mixed. + */ + function isMixedWithParent(node) { + return ( + node.operator !== node.parent.operator && + !astUtils.isParenthesised(sourceCode, node) + ); + } + + /** + * Gets the operator token of a given node. + * + * @param {ASTNode} node - A node to check. This is a BinaryExpression + * node or a LogicalExpression node. + * @returns {Token} The operator token of the node. + */ + function getOperatorToken(node) { + return sourceCode.getTokenAfter(node.left, astUtils.isNotClosingParenToken); + } + + /** + * Reports both the operator of a given node and the operator of the + * parent node. + * + * @param {ASTNode} node - A node to check. This is a BinaryExpression + * node or a LogicalExpression node. This parent node is one of + * them, too. + * @returns {void} + */ + function reportBothOperators(node) { + const parent = node.parent; + const left = (parent.left === node) ? node : parent; + const right = (parent.left !== node) ? node : parent; + const message = + "Unexpected mix of '{{leftOperator}}' and '{{rightOperator}}'."; + const data = { + leftOperator: left.operator, + rightOperator: right.operator + }; + + context.report({ + node: left, + loc: getOperatorToken(left).loc.start, + message, + data + }); + context.report({ + node: right, + loc: getOperatorToken(right).loc.start, + message, + data + }); + } + + /** + * Checks between the operator of this node and the operator of the + * parent node. + * + * @param {ASTNode} node - A node to check. + * @returns {void} + */ + function check(node) { + if (TARGET_NODE_TYPE.test(node.parent.type) && + isMixedWithParent(node) && + !shouldIgnore(node) + ) { + reportBothOperators(node); + } + } + + return { + BinaryExpression: check, + LogicalExpression: check + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-mixed-requires.js b/node_modules/eslint/lib/rules/no-mixed-requires.js new file mode 100644 index 0000000..1058f3a --- /dev/null +++ b/node_modules/eslint/lib/rules/no-mixed-requires.js @@ -0,0 +1,221 @@ +/** + * @fileoverview Rule to enforce grouped require statements for Node.JS + * @author Raphael Pigulla + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow `require` calls to be mixed with regular variable declarations", + category: "Node.js and CommonJS", + recommended: false, + url: "https://eslint.org/docs/rules/no-mixed-requires" + }, + + schema: [ + { + oneOf: [ + { + type: "boolean" + }, + { + type: "object", + properties: { + grouping: { + type: "boolean" + }, + allowCall: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + } + ] + }, + + create(context) { + + const options = context.options[0]; + let grouping = false, + allowCall = false; + + if (typeof options === "object") { + grouping = options.grouping; + allowCall = options.allowCall; + } else { + grouping = !!options; + } + + /** + * Returns the list of built-in modules. + * + * @returns {string[]} An array of built-in Node.js modules. + */ + function getBuiltinModules() { + + /* + * This list is generated using: + * `require("repl")._builtinLibs.concat('repl').sort()` + * This particular list is as per nodejs v0.12.2 and iojs v0.7.1 + */ + return [ + "assert", "buffer", "child_process", "cluster", "crypto", + "dgram", "dns", "domain", "events", "fs", "http", "https", + "net", "os", "path", "punycode", "querystring", "readline", + "repl", "smalloc", "stream", "string_decoder", "tls", "tty", + "url", "util", "v8", "vm", "zlib" + ]; + } + + const BUILTIN_MODULES = getBuiltinModules(); + + const DECL_REQUIRE = "require", + DECL_UNINITIALIZED = "uninitialized", + DECL_OTHER = "other"; + + const REQ_CORE = "core", + REQ_FILE = "file", + REQ_MODULE = "module", + REQ_COMPUTED = "computed"; + + /** + * Determines the type of a declaration statement. + * @param {ASTNode} initExpression The init node of the VariableDeclarator. + * @returns {string} The type of declaration represented by the expression. + */ + function getDeclarationType(initExpression) { + if (!initExpression) { + + // "var x;" + return DECL_UNINITIALIZED; + } + + if (initExpression.type === "CallExpression" && + initExpression.callee.type === "Identifier" && + initExpression.callee.name === "require" + ) { + + // "var x = require('util');" + return DECL_REQUIRE; + } + if (allowCall && + initExpression.type === "CallExpression" && + initExpression.callee.type === "CallExpression" + ) { + + // "var x = require('diagnose')('sub-module');" + return getDeclarationType(initExpression.callee); + } + if (initExpression.type === "MemberExpression") { + + // "var x = require('glob').Glob;" + return getDeclarationType(initExpression.object); + } + + // "var x = 42;" + return DECL_OTHER; + } + + /** + * Determines the type of module that is loaded via require. + * @param {ASTNode} initExpression The init node of the VariableDeclarator. + * @returns {string} The module type. + */ + function inferModuleType(initExpression) { + if (initExpression.type === "MemberExpression") { + + // "var x = require('glob').Glob;" + return inferModuleType(initExpression.object); + } + if (initExpression.arguments.length === 0) { + + // "var x = require();" + return REQ_COMPUTED; + } + + const arg = initExpression.arguments[0]; + + if (arg.type !== "Literal" || typeof arg.value !== "string") { + + // "var x = require(42);" + return REQ_COMPUTED; + } + + if (BUILTIN_MODULES.indexOf(arg.value) !== -1) { + + // "var fs = require('fs');" + return REQ_CORE; + } + if (/^\.{0,2}\//.test(arg.value)) { + + // "var utils = require('./utils');" + return REQ_FILE; + } + + // "var async = require('async');" + return REQ_MODULE; + + } + + /** + * Check if the list of variable declarations is mixed, i.e. whether it + * contains both require and other declarations. + * @param {ASTNode} declarations The list of VariableDeclarators. + * @returns {boolean} True if the declarations are mixed, false if not. + */ + function isMixed(declarations) { + const contains = {}; + + declarations.forEach(declaration => { + const type = getDeclarationType(declaration.init); + + contains[type] = true; + }); + + return !!( + contains[DECL_REQUIRE] && + (contains[DECL_UNINITIALIZED] || contains[DECL_OTHER]) + ); + } + + /** + * Check if all require declarations in the given list are of the same + * type. + * @param {ASTNode} declarations The list of VariableDeclarators. + * @returns {boolean} True if the declarations are grouped, false if not. + */ + function isGrouped(declarations) { + const found = {}; + + declarations.forEach(declaration => { + if (getDeclarationType(declaration.init) === DECL_REQUIRE) { + found[inferModuleType(declaration.init)] = true; + } + }); + + return Object.keys(found).length <= 1; + } + + + return { + + VariableDeclaration(node) { + + if (isMixed(node.declarations)) { + context.report({ node, message: "Do not mix 'require' and other declarations." }); + } else if (grouping && !isGrouped(node.declarations)) { + context.report({ node, message: "Do not mix core, module, file and computed requires." }); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js b/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js new file mode 100644 index 0000000..7cb4b4c --- /dev/null +++ b/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js @@ -0,0 +1,144 @@ +/** + * @fileoverview Disallow mixed spaces and tabs for indentation + * @author Jary Niebur + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow mixed spaces and tabs for indentation", + category: "Stylistic Issues", + recommended: true, + url: "https://eslint.org/docs/rules/no-mixed-spaces-and-tabs" + }, + + schema: [ + { + enum: ["smart-tabs", true, false] + } + ] + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + let smartTabs; + const ignoredLocs = []; + + switch (context.options[0]) { + case true: // Support old syntax, maybe add deprecation warning here + case "smart-tabs": + smartTabs = true; + break; + default: + smartTabs = false; + } + + /** + * Determines if a given line and column are before a location. + * @param {Location} loc The location object from an AST node. + * @param {int} line The line to check. + * @param {int} column The column to check. + * @returns {boolean} True if the line and column are before the location, false if not. + * @private + */ + function beforeLoc(loc, line, column) { + if (line < loc.start.line) { + return true; + } + return line === loc.start.line && column < loc.start.column; + } + + /** + * Determines if a given line and column are after a location. + * @param {Location} loc The location object from an AST node. + * @param {int} line The line to check. + * @param {int} column The column to check. + * @returns {boolean} True if the line and column are after the location, false if not. + * @private + */ + function afterLoc(loc, line, column) { + if (line > loc.end.line) { + return true; + } + return line === loc.end.line && column > loc.end.column; + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + + TemplateElement(node) { + ignoredLocs.push(node.loc); + }, + + "Program:exit"(node) { + + /* + * At least one space followed by a tab + * or the reverse before non-tab/-space + * characters begin. + */ + let regex = /^(?=[\t ]*(\t | \t))/; + const lines = sourceCode.lines, + comments = sourceCode.getAllComments(); + + comments.forEach(comment => { + ignoredLocs.push(comment.loc); + }); + + ignoredLocs.sort((first, second) => { + if (beforeLoc(first, second.start.line, second.start.column)) { + return 1; + } + + if (beforeLoc(second, first.start.line, second.start.column)) { + return -1; + } + + return 0; + }); + + if (smartTabs) { + + /* + * At least one space followed by a tab + * before non-tab/-space characters begin. + */ + regex = /^(?=[\t ]* \t)/; + } + + lines.forEach((line, i) => { + const match = regex.exec(line); + + if (match) { + const lineNumber = i + 1, + column = match.index + 1; + + for (let j = 0; j < ignoredLocs.length; j++) { + if (beforeLoc(ignoredLocs[j], lineNumber, column)) { + continue; + } + if (afterLoc(ignoredLocs[j], lineNumber, column)) { + continue; + } + + return; + } + + context.report({ node, loc: { line: lineNumber, column }, message: "Mixed spaces and tabs." }); + } + }); + } + + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-multi-assign.js b/node_modules/eslint/lib/rules/no-multi-assign.js new file mode 100644 index 0000000..ca3f778 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-multi-assign.js @@ -0,0 +1,42 @@ +/** + * @fileoverview Rule to check use of chained assignment expressions + * @author Stewart Rand + */ + +"use strict"; + + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow use of chained assignment expressions", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/no-multi-assign" + }, + schema: [] + }, + + create(context) { + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + AssignmentExpression(node) { + if (["AssignmentExpression", "VariableDeclarator"].indexOf(node.parent.type) !== -1) { + context.report({ + node, + message: "Unexpected chained assignment." + }); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-multi-spaces.js b/node_modules/eslint/lib/rules/no-multi-spaces.js new file mode 100644 index 0000000..d0ca097 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-multi-spaces.js @@ -0,0 +1,131 @@ +/** + * @fileoverview Disallow use of multiple spaces. + * @author Nicholas C. Zakas + */ + +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow multiple spaces", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-multi-spaces" + }, + + fixable: "whitespace", + + schema: [ + { + type: "object", + properties: { + exceptions: { + type: "object", + patternProperties: { + "^([A-Z][a-z]*)+$": { + type: "boolean" + } + }, + additionalProperties: false + }, + ignoreEOLComments: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + const sourceCode = context.getSourceCode(); + const options = context.options[0] || {}; + const ignoreEOLComments = options.ignoreEOLComments; + const exceptions = Object.assign({ Property: true }, options.exceptions); + const hasExceptions = Object.keys(exceptions).filter(key => exceptions[key]).length > 0; + + /** + * Formats value of given comment token for error message by truncating its length. + * @param {Token} token comment token + * @returns {string} formatted value + * @private + */ + function formatReportedCommentValue(token) { + const valueLines = token.value.split("\n"); + const value = valueLines[0]; + const formattedValue = `${value.slice(0, 12)}...`; + + return valueLines.length === 1 && value.length <= 12 ? value : formattedValue; + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + Program() { + sourceCode.tokensAndComments.forEach((leftToken, leftIndex, tokensAndComments) => { + if (leftIndex === tokensAndComments.length - 1) { + return; + } + const rightToken = tokensAndComments[leftIndex + 1]; + + // Ignore tokens that don't have 2 spaces between them or are on different lines + if ( + !sourceCode.text.slice(leftToken.range[1], rightToken.range[0]).includes(" ") || + leftToken.loc.end.line < rightToken.loc.start.line + ) { + return; + } + + // Ignore comments that are the last token on their line if `ignoreEOLComments` is active. + if ( + ignoreEOLComments && + astUtils.isCommentToken(rightToken) && + ( + leftIndex === tokensAndComments.length - 2 || + rightToken.loc.end.line < tokensAndComments[leftIndex + 2].loc.start.line + ) + ) { + return; + } + + // Ignore tokens that are in a node in the "exceptions" object + if (hasExceptions) { + const parentNode = sourceCode.getNodeByRangeIndex(rightToken.range[0] - 1); + + if (parentNode && exceptions[parentNode.type]) { + return; + } + } + + let displayValue; + + if (rightToken.type === "Block") { + displayValue = `/*${formatReportedCommentValue(rightToken)}*/`; + } else if (rightToken.type === "Line") { + displayValue = `//${formatReportedCommentValue(rightToken)}`; + } else { + displayValue = rightToken.value; + } + + context.report({ + node: rightToken, + loc: rightToken.loc.start, + message: "Multiple spaces found before '{{displayValue}}'.", + data: { displayValue }, + fix: fixer => fixer.replaceTextRange([leftToken.range[1], rightToken.range[0]], " ") + }); + }); + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-multi-str.js b/node_modules/eslint/lib/rules/no-multi-str.js new file mode 100644 index 0000000..2b97c26 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-multi-str.js @@ -0,0 +1,56 @@ +/** + * @fileoverview Rule to flag when using multiline strings + * @author Ilya Volodin + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow multiline strings", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-multi-str" + }, + + schema: [] + }, + + create(context) { + + /** + * Determines if a given node is part of JSX syntax. + * @param {ASTNode} node The node to check. + * @returns {boolean} True if the node is a JSX node, false if not. + * @private + */ + function isJSXElement(node) { + return node.type.indexOf("JSX") === 0; + } + + //-------------------------------------------------------------------------- + // Public API + //-------------------------------------------------------------------------- + + return { + + Literal(node) { + if (astUtils.LINEBREAK_MATCHER.test(node.raw) && !isJSXElement(node.parent)) { + context.report({ node, message: "Multiline support is limited to browsers supporting ES5 only." }); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-multiple-empty-lines.js b/node_modules/eslint/lib/rules/no-multiple-empty-lines.js new file mode 100644 index 0000000..a111786 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-multiple-empty-lines.js @@ -0,0 +1,137 @@ +/** + * @fileoverview Disallows multiple blank lines. + * implementation adapted from the no-trailing-spaces rule. + * @author Greg Cochard + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow multiple empty lines", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/no-multiple-empty-lines" + }, + + fixable: "whitespace", + + schema: [ + { + type: "object", + properties: { + max: { + type: "integer", + minimum: 0 + }, + maxEOF: { + type: "integer", + minimum: 0 + }, + maxBOF: { + type: "integer", + minimum: 0 + } + }, + required: ["max"], + additionalProperties: false + } + ] + }, + + create(context) { + + // Use options.max or 2 as default + let max = 2, + maxEOF = max, + maxBOF = max; + + if (context.options.length) { + max = context.options[0].max; + maxEOF = typeof context.options[0].maxEOF !== "undefined" ? context.options[0].maxEOF : max; + maxBOF = typeof context.options[0].maxBOF !== "undefined" ? context.options[0].maxBOF : max; + } + + const sourceCode = context.getSourceCode(); + + // Swallow the final newline, as some editors add it automatically and we don't want it to cause an issue + const allLines = sourceCode.lines[sourceCode.lines.length - 1] === "" ? sourceCode.lines.slice(0, -1) : sourceCode.lines; + const templateLiteralLines = new Set(); + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + TemplateLiteral(node) { + node.quasis.forEach(literalPart => { + + // Empty lines have a semantic meaning if they're inside template literals. Don't count these as empty lines. + for (let ignoredLine = literalPart.loc.start.line; ignoredLine < literalPart.loc.end.line; ignoredLine++) { + templateLiteralLines.add(ignoredLine); + } + }); + }, + "Program:exit"(node) { + return allLines + + // Given a list of lines, first get a list of line numbers that are non-empty. + .reduce((nonEmptyLineNumbers, line, index) => { + if (line.trim() || templateLiteralLines.has(index + 1)) { + nonEmptyLineNumbers.push(index + 1); + } + return nonEmptyLineNumbers; + }, []) + + // Add a value at the end to allow trailing empty lines to be checked. + .concat(allLines.length + 1) + + // Given two line numbers of non-empty lines, report the lines between if the difference is too large. + .reduce((lastLineNumber, lineNumber) => { + let message, maxAllowed; + + if (lastLineNumber === 0) { + message = "Too many blank lines at the beginning of file. Max of {{max}} allowed."; + maxAllowed = maxBOF; + } else if (lineNumber === allLines.length + 1) { + message = "Too many blank lines at the end of file. Max of {{max}} allowed."; + maxAllowed = maxEOF; + } else { + message = "More than {{max}} blank {{pluralizedLines}} not allowed."; + maxAllowed = max; + } + + if (lineNumber - lastLineNumber - 1 > maxAllowed) { + context.report({ + node, + loc: { start: { line: lastLineNumber + 1, column: 0 }, end: { line: lineNumber, column: 0 } }, + message, + data: { max: maxAllowed, pluralizedLines: maxAllowed === 1 ? "line" : "lines" }, + fix(fixer) { + const rangeStart = sourceCode.getIndexFromLoc({ line: lastLineNumber + 1, column: 0 }); + + /* + * The end of the removal range is usually the start index of the next line. + * However, at the end of the file there is no next line, so the end of the + * range is just the length of the text. + */ + const lineNumberAfterRemovedLines = lineNumber - maxAllowed; + const rangeEnd = lineNumberAfterRemovedLines <= allLines.length + ? sourceCode.getIndexFromLoc({ line: lineNumberAfterRemovedLines, column: 0 }) + : sourceCode.text.length; + + return fixer.removeRange([rangeStart, rangeEnd]); + } + }); + } + + return lineNumber; + }, 0); + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-native-reassign.js b/node_modules/eslint/lib/rules/no-native-reassign.js new file mode 100644 index 0000000..b1064b0 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-native-reassign.js @@ -0,0 +1,90 @@ +/** + * @fileoverview Rule to disallow assignments to native objects or read-only global variables + * @author Ilya Volodin + * @deprecated in ESLint v3.3.0 + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow assignments to native objects or read-only global variables", + category: "Best Practices", + recommended: false, + replacedBy: ["no-global-assign"], + url: "https://eslint.org/docs/rules/no-native-reassign" + }, + + deprecated: true, + + schema: [ + { + type: "object", + properties: { + exceptions: { + type: "array", + items: { type: "string" }, + uniqueItems: true + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + const config = context.options[0]; + const exceptions = (config && config.exceptions) || []; + + /** + * Reports write references. + * @param {Reference} reference - A reference to check. + * @param {int} index - The index of the reference in the references. + * @param {Reference[]} references - The array that the reference belongs to. + * @returns {void} + */ + function checkReference(reference, index, references) { + const identifier = reference.identifier; + + if (reference.init === false && + reference.isWrite() && + + /* + * Destructuring assignments can have multiple default value, + * so possibly there are multiple writeable references for the same identifier. + */ + (index === 0 || references[index - 1].identifier !== identifier) + ) { + context.report({ + node: identifier, + message: "Read-only global '{{name}}' should not be modified.", + data: identifier + }); + } + } + + /** + * Reports write references if a given variable is read-only builtin. + * @param {Variable} variable - A variable to check. + * @returns {void} + */ + function checkVariable(variable) { + if (variable.writeable === false && exceptions.indexOf(variable.name) === -1) { + variable.references.forEach(checkReference); + } + } + + return { + Program() { + const globalScope = context.getScope(); + + globalScope.variables.forEach(checkVariable); + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-negated-condition.js b/node_modules/eslint/lib/rules/no-negated-condition.js new file mode 100644 index 0000000..254dcb5 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-negated-condition.js @@ -0,0 +1,83 @@ +/** + * @fileoverview Rule to disallow a negated condition + * @author Alberto Rodríguez + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow negated conditions", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/no-negated-condition" + }, + + schema: [] + }, + + create(context) { + + /** + * Determines if a given node is an if-else without a condition on the else + * @param {ASTNode} node The node to check. + * @returns {boolean} True if the node has an else without an if. + * @private + */ + function hasElseWithoutCondition(node) { + return node.alternate && node.alternate.type !== "IfStatement"; + } + + /** + * Determines if a given node is a negated unary expression + * @param {Object} test The test object to check. + * @returns {boolean} True if the node is a negated unary expression. + * @private + */ + function isNegatedUnaryExpression(test) { + return test.type === "UnaryExpression" && test.operator === "!"; + } + + /** + * Determines if a given node is a negated binary expression + * @param {Test} test The test to check. + * @returns {boolean} True if the node is a negated binary expression. + * @private + */ + function isNegatedBinaryExpression(test) { + return test.type === "BinaryExpression" && + (test.operator === "!=" || test.operator === "!=="); + } + + /** + * Determines if a given node has a negated if expression + * @param {ASTNode} node The node to check. + * @returns {boolean} True if the node has a negated if expression. + * @private + */ + function isNegatedIf(node) { + return isNegatedUnaryExpression(node.test) || isNegatedBinaryExpression(node.test); + } + + return { + IfStatement(node) { + if (!hasElseWithoutCondition(node)) { + return; + } + + if (isNegatedIf(node)) { + context.report({ node, message: "Unexpected negated condition." }); + } + }, + ConditionalExpression(node) { + if (isNegatedIf(node)) { + context.report({ node, message: "Unexpected negated condition." }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-negated-in-lhs.js b/node_modules/eslint/lib/rules/no-negated-in-lhs.js new file mode 100644 index 0000000..7f08814 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-negated-in-lhs.js @@ -0,0 +1,39 @@ +/** + * @fileoverview A rule to disallow negated left operands of the `in` operator + * @author Michael Ficarra + * @deprecated in ESLint v3.3.0 + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow negating the left operand in `in` expressions", + category: "Possible Errors", + recommended: false, + replacedBy: ["no-unsafe-negation"], + url: "https://eslint.org/docs/rules/no-negated-in-lhs" + }, + deprecated: true, + + schema: [] + }, + + create(context) { + + return { + + BinaryExpression(node) { + if (node.operator === "in" && node.left.type === "UnaryExpression" && node.left.operator === "!") { + context.report({ node, message: "The 'in' expression's left operand is negated." }); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-nested-ternary.js b/node_modules/eslint/lib/rules/no-nested-ternary.js new file mode 100644 index 0000000..15e72f2 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-nested-ternary.js @@ -0,0 +1,35 @@ +/** + * @fileoverview Rule to flag nested ternary expressions + * @author Ian Christian Myers + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow nested ternary expressions", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/no-nested-ternary" + }, + + schema: [] + }, + + create(context) { + + return { + ConditionalExpression(node) { + if (node.alternate.type === "ConditionalExpression" || + node.consequent.type === "ConditionalExpression") { + context.report({ node, message: "Do not nest ternary expressions." }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-new-func.js b/node_modules/eslint/lib/rules/no-new-func.js new file mode 100644 index 0000000..8ee327b --- /dev/null +++ b/node_modules/eslint/lib/rules/no-new-func.js @@ -0,0 +1,46 @@ +/** + * @fileoverview Rule to flag when using new Function + * @author Ilya Volodin + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow `new` operators with the `Function` object", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-new-func" + }, + + schema: [] + }, + + create(context) { + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Reports a node. + * @param {ASTNode} node The node to report + * @returns {void} + * @private + */ + function report(node) { + context.report({ node, message: "The Function constructor is eval." }); + } + + return { + "NewExpression[callee.name = 'Function']": report, + "CallExpression[callee.name = 'Function']": report + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-new-object.js b/node_modules/eslint/lib/rules/no-new-object.js new file mode 100644 index 0000000..3f68cbc --- /dev/null +++ b/node_modules/eslint/lib/rules/no-new-object.js @@ -0,0 +1,36 @@ +/** + * @fileoverview A rule to disallow calls to the Object constructor + * @author Matt DuVall + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow `Object` constructors", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/no-new-object" + }, + + schema: [] + }, + + create(context) { + + return { + + NewExpression(node) { + if (node.callee.name === "Object") { + context.report({ node, message: "The object literal notation {} is preferrable." }); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-new-require.js b/node_modules/eslint/lib/rules/no-new-require.js new file mode 100644 index 0000000..f74daa7 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-new-require.js @@ -0,0 +1,36 @@ +/** + * @fileoverview Rule to disallow use of new operator with the `require` function + * @author Wil Moore III + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow `new` operators with calls to `require`", + category: "Node.js and CommonJS", + recommended: false, + url: "https://eslint.org/docs/rules/no-new-require" + }, + + schema: [] + }, + + create(context) { + + return { + + NewExpression(node) { + if (node.callee.type === "Identifier" && node.callee.name === "require") { + context.report({ node, message: "Unexpected use of new with require." }); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-new-symbol.js b/node_modules/eslint/lib/rules/no-new-symbol.js new file mode 100644 index 0000000..a537268 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-new-symbol.js @@ -0,0 +1,44 @@ +/** + * @fileoverview Rule to disallow use of the new operator with the `Symbol` object + * @author Alberto Rodríguez + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow `new` operators with the `Symbol` object", + category: "ECMAScript 6", + recommended: true, + url: "https://eslint.org/docs/rules/no-new-symbol" + }, + + schema: [] + }, + + create(context) { + + return { + "Program:exit"() { + const globalScope = context.getScope(); + const variable = globalScope.set.get("Symbol"); + + if (variable && variable.defs.length === 0) { + variable.references.forEach(ref => { + const node = ref.identifier; + + if (node.parent && node.parent.type === "NewExpression") { + context.report({ node, message: "`Symbol` cannot be called as a constructor." }); + } + }); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-new-wrappers.js b/node_modules/eslint/lib/rules/no-new-wrappers.js new file mode 100644 index 0000000..e8d5162 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-new-wrappers.js @@ -0,0 +1,38 @@ +/** + * @fileoverview Rule to flag when using constructor for wrapper objects + * @author Ilya Volodin + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow `new` operators with the `String`, `Number`, and `Boolean` objects", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-new-wrappers" + }, + + schema: [] + }, + + create(context) { + + return { + + NewExpression(node) { + const wrapperObjects = ["String", "Number", "Boolean", "Math", "JSON"]; + + if (wrapperObjects.indexOf(node.callee.name) > -1) { + context.report({ node, message: "Do not use {{fn}} as a constructor.", data: { fn: node.callee.name } }); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-new.js b/node_modules/eslint/lib/rules/no-new.js new file mode 100644 index 0000000..f9121bc --- /dev/null +++ b/node_modules/eslint/lib/rules/no-new.js @@ -0,0 +1,34 @@ +/** + * @fileoverview Rule to flag statements with function invocation preceded by + * "new" and not part of assignment + * @author Ilya Volodin + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow `new` operators outside of assignments or comparisons", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-new" + }, + + schema: [] + }, + + create(context) { + + return { + "ExpressionStatement > NewExpression"(node) { + context.report({ node: node.parent, message: "Do not use 'new' for side effects." }); + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-obj-calls.js b/node_modules/eslint/lib/rules/no-obj-calls.js new file mode 100644 index 0000000..320343c --- /dev/null +++ b/node_modules/eslint/lib/rules/no-obj-calls.js @@ -0,0 +1,40 @@ +/** + * @fileoverview Rule to flag use of an object property of the global object (Math and JSON) as a function + * @author James Allardice + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow calling global object properties as functions", + category: "Possible Errors", + recommended: true, + url: "https://eslint.org/docs/rules/no-obj-calls" + }, + + schema: [] + }, + + create(context) { + + return { + CallExpression(node) { + + if (node.callee.type === "Identifier") { + const name = node.callee.name; + + if (name === "Math" || name === "JSON" || name === "Reflect") { + context.report({ node, message: "'{{name}}' is not a function.", data: { name } }); + } + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-octal-escape.js b/node_modules/eslint/lib/rules/no-octal-escape.js new file mode 100644 index 0000000..e9509b8 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-octal-escape.js @@ -0,0 +1,48 @@ +/** + * @fileoverview Rule to flag octal escape sequences in string literals. + * @author Ian Christian Myers + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow octal escape sequences in string literals", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-octal-escape" + }, + + schema: [] + }, + + create(context) { + + return { + + Literal(node) { + if (typeof node.value !== "string") { + return; + } + + const match = node.raw.match(/^([^\\]|\\[^0-7])*\\([0-3][0-7]{1,2}|[4-7][0-7]|[0-7])/); + + if (match) { + const octalDigit = match[2]; + + // \0 is actually not considered an octal + if (match[2] !== "0" || typeof match[3] !== "undefined") { + context.report({ node, message: "Don't use octal: '\\{{octalDigit}}'. Use '\\u....' instead.", data: { octalDigit } }); + } + } + } + + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-octal.js b/node_modules/eslint/lib/rules/no-octal.js new file mode 100644 index 0000000..d782c23 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-octal.js @@ -0,0 +1,36 @@ +/** + * @fileoverview Rule to flag when initializing octal literal + * @author Ilya Volodin + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow octal literals", + category: "Best Practices", + recommended: true, + url: "https://eslint.org/docs/rules/no-octal" + }, + + schema: [] + }, + + create(context) { + + return { + + Literal(node) { + if (typeof node.value === "number" && /^0[0-7]/.test(node.raw)) { + context.report({ node, message: "Octal literals should not be used." }); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-param-reassign.js b/node_modules/eslint/lib/rules/no-param-reassign.js new file mode 100644 index 0000000..be1a559 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-param-reassign.js @@ -0,0 +1,174 @@ +/** + * @fileoverview Disallow reassignment of function parameters. + * @author Nat Burns + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +const stopNodePattern = /(?:Statement|Declaration|Function(?:Expression)?|Program)$/; + +module.exports = { + meta: { + docs: { + description: "disallow reassigning `function` parameters", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-param-reassign" + }, + + schema: [ + { + oneOf: [ + { + type: "object", + properties: { + props: { + enum: [false] + } + }, + additionalProperties: false + }, + { + type: "object", + properties: { + props: { + enum: [true] + }, + ignorePropertyModificationsFor: { + type: "array", + items: { + type: "string" + }, + uniqueItems: true + } + }, + additionalProperties: false + } + ] + } + ] + }, + + create(context) { + const props = context.options[0] && Boolean(context.options[0].props); + const ignoredPropertyAssignmentsFor = context.options[0] && context.options[0].ignorePropertyModificationsFor || []; + + /** + * Checks whether or not the reference modifies properties of its variable. + * @param {Reference} reference - A reference to check. + * @returns {boolean} Whether or not the reference modifies properties of its variable. + */ + function isModifyingProp(reference) { + let node = reference.identifier; + let parent = node.parent; + + while (parent && !stopNodePattern.test(parent.type)) { + switch (parent.type) { + + // e.g. foo.a = 0; + case "AssignmentExpression": + return parent.left === node; + + // e.g. ++foo.a; + case "UpdateExpression": + return true; + + // e.g. delete foo.a; + case "UnaryExpression": + if (parent.operator === "delete") { + return true; + } + break; + + // EXCLUDES: e.g. cache.get(foo.a).b = 0; + case "CallExpression": + if (parent.callee !== node) { + return false; + } + break; + + // EXCLUDES: e.g. cache[foo.a] = 0; + case "MemberExpression": + if (parent.property === node) { + return false; + } + break; + + // EXCLUDES: e.g. ({ [foo]: a }) = bar; + case "Property": + if (parent.key === node) { + return false; + } + + break; + + // no default + } + + node = parent; + parent = node.parent; + } + + return false; + } + + /** + * Reports a reference if is non initializer and writable. + * @param {Reference} reference - A reference to check. + * @param {int} index - The index of the reference in the references. + * @param {Reference[]} references - The array that the reference belongs to. + * @returns {void} + */ + function checkReference(reference, index, references) { + const identifier = reference.identifier; + + if (identifier && + !reference.init && + + /* + * Destructuring assignments can have multiple default value, + * so possibly there are multiple writeable references for the same identifier. + */ + (index === 0 || references[index - 1].identifier !== identifier) + ) { + if (reference.isWrite()) { + context.report({ node: identifier, message: "Assignment to function parameter '{{name}}'.", data: { name: identifier.name } }); + } else if (props && isModifyingProp(reference) && ignoredPropertyAssignmentsFor.indexOf(identifier.name) === -1) { + context.report({ node: identifier, message: "Assignment to property of function parameter '{{name}}'.", data: { name: identifier.name } }); + } + } + } + + /** + * Finds and reports references that are non initializer and writable. + * @param {Variable} variable - A variable to check. + * @returns {void} + */ + function checkVariable(variable) { + if (variable.defs[0].type === "Parameter") { + variable.references.forEach(checkReference); + } + } + + /** + * Checks parameters of a given function node. + * @param {ASTNode} node - A function node to check. + * @returns {void} + */ + function checkForFunction(node) { + context.getDeclaredVariables(node).forEach(checkVariable); + } + + return { + + // `:exit` is needed for the `node.parent` property of identifier nodes. + "FunctionDeclaration:exit": checkForFunction, + "FunctionExpression:exit": checkForFunction, + "ArrowFunctionExpression:exit": checkForFunction + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-path-concat.js b/node_modules/eslint/lib/rules/no-path-concat.js new file mode 100644 index 0000000..1dee7bd --- /dev/null +++ b/node_modules/eslint/lib/rules/no-path-concat.js @@ -0,0 +1,50 @@ +/** + * @fileoverview Disallow string concatenation when using __dirname and __filename + * @author Nicholas C. Zakas + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow string concatenation with `__dirname` and `__filename`", + category: "Node.js and CommonJS", + recommended: false, + url: "https://eslint.org/docs/rules/no-path-concat" + }, + + schema: [] + }, + + create(context) { + + const MATCHER = /^__(?:dir|file)name$/; + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + + BinaryExpression(node) { + + const left = node.left, + right = node.right; + + if (node.operator === "+" && + ((left.type === "Identifier" && MATCHER.test(left.name)) || + (right.type === "Identifier" && MATCHER.test(right.name))) + ) { + + context.report({ node, message: "Use path.join() or path.resolve() instead of + to create paths." }); + } + } + + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-plusplus.js b/node_modules/eslint/lib/rules/no-plusplus.js new file mode 100644 index 0000000..f754b36 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-plusplus.js @@ -0,0 +1,62 @@ +/** + * @fileoverview Rule to flag use of unary increment and decrement operators. + * @author Ian Christian Myers + * @author Brody McKee (github.com/mrmckeb) + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow the unary operators `++` and `--`", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/no-plusplus" + }, + + schema: [ + { + type: "object", + properties: { + allowForLoopAfterthoughts: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + + const config = context.options[0]; + let allowInForAfterthought = false; + + if (typeof config === "object") { + allowInForAfterthought = config.allowForLoopAfterthoughts === true; + } + + return { + + UpdateExpression(node) { + if (allowInForAfterthought && node.parent.type === "ForStatement") { + return; + } + context.report({ + node, + message: "Unary operator '{{operator}}' used.", + data: { + operator: node.operator + } + }); + } + + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-process-env.js b/node_modules/eslint/lib/rules/no-process-env.js new file mode 100644 index 0000000..71b27ff --- /dev/null +++ b/node_modules/eslint/lib/rules/no-process-env.js @@ -0,0 +1,40 @@ +/** + * @fileoverview Disallow the use of process.env() + * @author Vignesh Anand + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow the use of `process.env`", + category: "Node.js and CommonJS", + recommended: false, + url: "https://eslint.org/docs/rules/no-process-env" + }, + + schema: [] + }, + + create(context) { + + return { + + MemberExpression(node) { + const objectName = node.object.name, + propertyName = node.property.name; + + if (objectName === "process" && !node.computed && propertyName && propertyName === "env") { + context.report({ node, message: "Unexpected use of process.env." }); + } + + } + + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-process-exit.js b/node_modules/eslint/lib/rules/no-process-exit.js new file mode 100644 index 0000000..2d22d7f --- /dev/null +++ b/node_modules/eslint/lib/rules/no-process-exit.js @@ -0,0 +1,36 @@ +/** + * @fileoverview Disallow the use of process.exit() + * @author Nicholas C. Zakas + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow the use of `process.exit()`", + category: "Node.js and CommonJS", + recommended: false, + url: "https://eslint.org/docs/rules/no-process-exit" + }, + + schema: [] + }, + + create(context) { + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + "CallExpression > MemberExpression.callee[object.name = 'process'][property.name = 'exit']"(node) { + context.report({ node: node.parent, message: "Don't use process.exit(); throw an error instead." }); + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-proto.js b/node_modules/eslint/lib/rules/no-proto.js new file mode 100644 index 0000000..e37c6c2 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-proto.js @@ -0,0 +1,39 @@ +/** + * @fileoverview Rule to flag usage of __proto__ property + * @author Ilya Volodin + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow the use of the `__proto__` property", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-proto" + }, + + schema: [] + }, + + create(context) { + + return { + + MemberExpression(node) { + + if (node.property && + (node.property.type === "Identifier" && node.property.name === "__proto__" && !node.computed) || + (node.property.type === "Literal" && node.property.value === "__proto__")) { + context.report({ node, message: "The '__proto__' property is deprecated." }); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-prototype-builtins.js b/node_modules/eslint/lib/rules/no-prototype-builtins.js new file mode 100644 index 0000000..f52847f --- /dev/null +++ b/node_modules/eslint/lib/rules/no-prototype-builtins.js @@ -0,0 +1,55 @@ +/** + * @fileoverview Rule to disallow use of Object.prototype builtins on objects + * @author Andrew Levine + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow calling some `Object.prototype` methods directly on objects", + category: "Possible Errors", + recommended: false, + url: "https://eslint.org/docs/rules/no-prototype-builtins" + }, + + schema: [] + }, + + create(context) { + const DISALLOWED_PROPS = [ + "hasOwnProperty", + "isPrototypeOf", + "propertyIsEnumerable" + ]; + + /** + * Reports if a disallowed property is used in a CallExpression + * @param {ASTNode} node The CallExpression node. + * @returns {void} + */ + function disallowBuiltIns(node) { + if (node.callee.type !== "MemberExpression" || node.callee.computed) { + return; + } + const propName = node.callee.property.name; + + if (DISALLOWED_PROPS.indexOf(propName) > -1) { + context.report({ + message: "Do not access Object.prototype method '{{prop}}' from target object.", + loc: node.callee.property.loc.start, + data: { prop: propName }, + node + }); + } + } + + return { + CallExpression: disallowBuiltIns + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-redeclare.js b/node_modules/eslint/lib/rules/no-redeclare.js new file mode 100644 index 0000000..79ab211 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-redeclare.js @@ -0,0 +1,102 @@ +/** + * @fileoverview Rule to flag when the same variable is declared more then once. + * @author Ilya Volodin + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow variable redeclaration", + category: "Best Practices", + recommended: true, + url: "https://eslint.org/docs/rules/no-redeclare" + }, + + schema: [ + { + type: "object", + properties: { + builtinGlobals: { type: "boolean" } + }, + additionalProperties: false + } + ] + }, + + create(context) { + const options = { + builtinGlobals: Boolean(context.options[0] && context.options[0].builtinGlobals) + }; + + /** + * Find variables in a given scope and flag redeclared ones. + * @param {Scope} scope - An eslint-scope scope object. + * @returns {void} + * @private + */ + function findVariablesInScope(scope) { + scope.variables.forEach(variable => { + const hasBuiltin = options.builtinGlobals && "writeable" in variable; + const count = (hasBuiltin ? 1 : 0) + variable.identifiers.length; + + if (count >= 2) { + variable.identifiers.sort((a, b) => a.range[1] - b.range[1]); + + for (let i = (hasBuiltin ? 0 : 1), l = variable.identifiers.length; i < l; i++) { + context.report({ node: variable.identifiers[i], message: "'{{a}}' is already defined.", data: { a: variable.name } }); + } + } + }); + + } + + /** + * Find variables in the current scope. + * @param {ASTNode} node - The Program node. + * @returns {void} + * @private + */ + function checkForGlobal(node) { + const scope = context.getScope(), + parserOptions = context.parserOptions, + ecmaFeatures = parserOptions.ecmaFeatures || {}; + + // Nodejs env or modules has a special scope. + if (ecmaFeatures.globalReturn || node.sourceType === "module") { + findVariablesInScope(scope.childScopes[0]); + } else { + findVariablesInScope(scope); + } + } + + /** + * Find variables in the current scope. + * @returns {void} + * @private + */ + function checkForBlock() { + findVariablesInScope(context.getScope()); + } + + if (context.parserOptions.ecmaVersion >= 6) { + return { + Program: checkForGlobal, + BlockStatement: checkForBlock, + SwitchStatement: checkForBlock + }; + } + return { + Program: checkForGlobal, + FunctionDeclaration: checkForBlock, + FunctionExpression: checkForBlock, + ArrowFunctionExpression: checkForBlock + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-regex-spaces.js b/node_modules/eslint/lib/rules/no-regex-spaces.js new file mode 100644 index 0000000..a50692a --- /dev/null +++ b/node_modules/eslint/lib/rules/no-regex-spaces.js @@ -0,0 +1,115 @@ +/** + * @fileoverview Rule to count multiple spaces in regular expressions + * @author Matt DuVall + */ + +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow multiple spaces in regular expressions", + category: "Possible Errors", + recommended: true, + url: "https://eslint.org/docs/rules/no-regex-spaces" + }, + + schema: [], + + fixable: "code" + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + /** + * Validate regular expressions + * @param {ASTNode} node node to validate + * @param {string} value regular expression to validate + * @param {number} valueStart The start location of the regex/string literal. It will always be the case that + * `sourceCode.getText().slice(valueStart, valueStart + value.length) === value` + * @returns {void} + * @private + */ + function checkRegex(node, value, valueStart) { + const multipleSpacesRegex = /( {2,})( [+*{?]|[^+*{?]|$)/, + regexResults = multipleSpacesRegex.exec(value); + + if (regexResults !== null) { + const count = regexResults[1].length; + + context.report({ + node, + message: "Spaces are hard to count. Use {{{count}}}.", + data: { count }, + fix(fixer) { + return fixer.replaceTextRange( + [valueStart + regexResults.index, valueStart + regexResults.index + count], + ` {${count}}` + ); + } + }); + + /* + * TODO: (platinumazure) Fix message to use rule message + * substitution when api.report is fixed in lib/eslint.js. + */ + } + } + + /** + * Validate regular expression literals + * @param {ASTNode} node node to validate + * @returns {void} + * @private + */ + function checkLiteral(node) { + const token = sourceCode.getFirstToken(node), + nodeType = token.type, + nodeValue = token.value; + + if (nodeType === "RegularExpression") { + checkRegex(node, nodeValue, token.range[0]); + } + } + + /** + * Check if node is a string + * @param {ASTNode} node node to evaluate + * @returns {boolean} True if its a string + * @private + */ + function isString(node) { + return node && node.type === "Literal" && typeof node.value === "string"; + } + + /** + * Validate strings passed to the RegExp constructor + * @param {ASTNode} node node to validate + * @returns {void} + * @private + */ + function checkFunction(node) { + const scope = context.getScope(); + const regExpVar = astUtils.getVariableByName(scope, "RegExp"); + const shadowed = regExpVar && regExpVar.defs.length > 0; + + if (node.callee.type === "Identifier" && node.callee.name === "RegExp" && isString(node.arguments[0]) && !shadowed) { + checkRegex(node, node.arguments[0].value, node.arguments[0].range[0] + 1); + } + } + + return { + Literal: checkLiteral, + CallExpression: checkFunction, + NewExpression: checkFunction + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-restricted-globals.js b/node_modules/eslint/lib/rules/no-restricted-globals.js new file mode 100644 index 0000000..691e55d --- /dev/null +++ b/node_modules/eslint/lib/rules/no-restricted-globals.js @@ -0,0 +1,121 @@ +/** + * @fileoverview Restrict usage of specified globals. + * @author Benoît Zugmeyer + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const DEFAULT_MESSAGE_TEMPLATE = "Unexpected use of '{{name}}'.", + CUSTOM_MESSAGE_TEMPLATE = "Unexpected use of '{{name}}'. {{customMessage}}"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow specified global variables", + category: "Variables", + recommended: false, + url: "https://eslint.org/docs/rules/no-restricted-globals" + }, + + schema: { + type: "array", + items: { + oneOf: [ + { + type: "string" + }, + { + type: "object", + properties: { + name: { type: "string" }, + message: { type: "string" } + }, + required: ["name"], + additionalProperties: false + } + ] + }, + uniqueItems: true, + minItems: 0 + } + }, + + create(context) { + + // If no globals are restricted, we don't need to do anything + if (context.options.length === 0) { + return {}; + } + + const restrictedGlobalMessages = context.options.reduce((memo, option) => { + if (typeof option === "string") { + memo[option] = null; + } else { + memo[option.name] = option.message; + } + + return memo; + }, {}); + + /** + * Report a variable to be used as a restricted global. + * @param {Reference} reference the variable reference + * @returns {void} + * @private + */ + function reportReference(reference) { + const name = reference.identifier.name, + customMessage = restrictedGlobalMessages[name], + message = customMessage + ? CUSTOM_MESSAGE_TEMPLATE + : DEFAULT_MESSAGE_TEMPLATE; + + context.report({ + node: reference.identifier, + message, + data: { + name, + customMessage + } + }); + } + + /** + * Check if the given name is a restricted global name. + * @param {string} name name of a variable + * @returns {boolean} whether the variable is a restricted global or not + * @private + */ + function isRestricted(name) { + return restrictedGlobalMessages.hasOwnProperty(name); + } + + return { + Program() { + const scope = context.getScope(); + + // Report variables declared elsewhere (ex: variables defined as "global" by eslint) + scope.variables.forEach(variable => { + if (!variable.defs.length && isRestricted(variable.name)) { + variable.references.forEach(reportReference); + } + }); + + // Report variables not declared at all + scope.through.forEach(reference => { + if (isRestricted(reference.identifier.name)) { + reportReference(reference); + } + }); + + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-restricted-imports.js b/node_modules/eslint/lib/rules/no-restricted-imports.js new file mode 100644 index 0000000..11d09d6 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-restricted-imports.js @@ -0,0 +1,264 @@ +/** + * @fileoverview Restrict usage of specified node imports. + * @author Guy Ellis + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const DEFAULT_MESSAGE_TEMPLATE = "'{{importSource}}' import is restricted from being used."; +const CUSTOM_MESSAGE_TEMPLATE = "'{{importSource}}' import is restricted from being used. {{customMessage}}"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +const ignore = require("ignore"); + +const arrayOfStrings = { + type: "array", + items: { type: "string" }, + uniqueItems: true +}; + +const arrayOfStringsOrObjects = { + type: "array", + items: { + anyOf: [ + { type: "string" }, + { + type: "object", + properties: { + name: { type: "string" }, + message: { + type: "string", + minLength: 1 + }, + importNames: { + type: "array", + items: { + type: "string" + } + } + }, + additionalProperties: false, + required: ["name"] + } + ] + }, + uniqueItems: true +}; + +module.exports = { + meta: { + docs: { + description: "disallow specified modules when loaded by `import`", + category: "ECMAScript 6", + recommended: false, + url: "https://eslint.org/docs/rules/no-restricted-imports" + }, + + schema: { + anyOf: [ + arrayOfStringsOrObjects, + { + type: "array", + items: { + type: "object", + properties: { + paths: arrayOfStringsOrObjects, + patterns: arrayOfStrings + }, + additionalProperties: false + }, + additionalItems: false + } + ] + } + }, + + create(context) { + const options = Array.isArray(context.options) ? context.options : []; + const isPathAndPatternsObject = + typeof options[0] === "object" && + (options[0].hasOwnProperty("paths") || options[0].hasOwnProperty("patterns")); + + const restrictedPaths = (isPathAndPatternsObject ? options[0].paths : context.options) || []; + const restrictedPatterns = (isPathAndPatternsObject ? options[0].patterns : []) || []; + + const restrictedPathMessages = restrictedPaths.reduce((memo, importSource) => { + if (typeof importSource === "string") { + memo[importSource] = { message: null }; + } else { + memo[importSource.name] = { + message: importSource.message, + importNames: importSource.importNames + }; + } + return memo; + }, {}); + + // if no imports are restricted we don"t need to check + if (Object.keys(restrictedPaths).length === 0 && restrictedPatterns.length === 0) { + return {}; + } + + const restrictedPatternsMatcher = ignore().add(restrictedPatterns); + + /** + * Checks to see if "*" is being used to import everything. + * @param {Set.} importNames - Set of import names that are being imported + * @returns {boolean} whether everything is imported or not + */ + function isEverythingImported(importNames) { + return importNames.has("*"); + } + + /** + * Report a restricted path. + * @param {node} node representing the restricted path reference + * @returns {void} + * @private + */ + function reportPath(node) { + const importSource = node.source.value.trim(); + const customMessage = restrictedPathMessages[importSource] && restrictedPathMessages[importSource].message; + const message = customMessage + ? CUSTOM_MESSAGE_TEMPLATE + : DEFAULT_MESSAGE_TEMPLATE; + + context.report({ + node, + message, + data: { + importSource, + customMessage + } + }); + } + + /** + * Report a restricted path specifically for patterns. + * @param {node} node - representing the restricted path reference + * @returns {void} + * @private + */ + function reportPathForPatterns(node) { + const importSource = node.source.value.trim(); + + context.report({ + node, + message: "'{{importSource}}' import is restricted from being used by a pattern.", + data: { + importSource + } + }); + } + + /** + * Report a restricted path specifically when using the '*' import. + * @param {string} importSource - path of the import + * @param {node} node - representing the restricted path reference + * @returns {void} + * @private + */ + function reportPathForEverythingImported(importSource, node) { + const importNames = restrictedPathMessages[importSource].importNames; + + context.report({ + node, + message: "* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted.", + data: { + importSource, + importNames + } + }); + } + + /** + * Check if the given importSource is restricted because '*' is being imported. + * @param {string} importSource - path of the import + * @param {Set.} importNames - Set of import names that are being imported + * @returns {boolean} whether the path is restricted + * @private + */ + function isRestrictedForEverythingImported(importSource, importNames) { + return Object.prototype.hasOwnProperty.call(restrictedPathMessages, importSource) && + restrictedPathMessages[importSource].importNames && + isEverythingImported(importNames); + } + + /** + * Check if the given importNames are restricted given a list of restrictedImportNames. + * @param {Set.} importNames - Set of import names that are being imported + * @param {[string]} restrictedImportNames - array of import names that are restricted for this import + * @returns {boolean} whether the objectName is restricted + * @private + */ + function isRestrictedObject(importNames, restrictedImportNames) { + return restrictedImportNames.some(restrictedObjectName => ( + importNames.has(restrictedObjectName) + )); + } + + /** + * Check if the given importSource is a restricted path. + * @param {string} importSource - path of the import + * @param {Set.} importNames - Set of import names that are being imported + * @returns {boolean} whether the variable is a restricted path or not + * @private + */ + function isRestrictedPath(importSource, importNames) { + let isRestricted = false; + + if (Object.prototype.hasOwnProperty.call(restrictedPathMessages, importSource)) { + if (restrictedPathMessages[importSource].importNames) { + isRestricted = isRestrictedObject(importNames, restrictedPathMessages[importSource].importNames); + } else { + isRestricted = true; + } + } + + return isRestricted; + } + + /** + * Check if the given importSource is restricted by a pattern. + * @param {string} importSource - path of the import + * @returns {boolean} whether the variable is a restricted pattern or not + * @private + */ + function isRestrictedPattern(importSource) { + return restrictedPatterns.length > 0 && restrictedPatternsMatcher.ignores(importSource); + } + + return { + ImportDeclaration(node) { + const importSource = node.source.value.trim(); + const importNames = node.specifiers.reduce((set, specifier) => { + if (specifier.type === "ImportDefaultSpecifier") { + set.add("default"); + } else if (specifier.type === "ImportNamespaceSpecifier") { + set.add("*"); + } else { + set.add(specifier.imported.name); + } + return set; + }, new Set()); + + if (isRestrictedForEverythingImported(importSource, importNames)) { + reportPathForEverythingImported(importSource, node); + } + + if (isRestrictedPath(importSource, importNames)) { + reportPath(node); + } + if (isRestrictedPattern(importSource)) { + reportPathForPatterns(node); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-restricted-modules.js b/node_modules/eslint/lib/rules/no-restricted-modules.js new file mode 100644 index 0000000..5427109 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-restricted-modules.js @@ -0,0 +1,178 @@ +/** + * @fileoverview Restrict usage of specified node modules. + * @author Christian Schulz + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const DEFAULT_MESSAGE_TEMPLATE = "'{{moduleName}}' module is restricted from being used."; +const CUSTOM_MESSAGE_TEMPLATE = "'{{moduleName}}' module is restricted from being used. {{customMessage}}"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +const ignore = require("ignore"); + +const arrayOfStrings = { + type: "array", + items: { type: "string" }, + uniqueItems: true +}; + +const arrayOfStringsOrObjects = { + type: "array", + items: { + anyOf: [ + { type: "string" }, + { + type: "object", + properties: { + name: { type: "string" }, + message: { + type: "string", + minLength: 1 + } + }, + additionalProperties: false, + required: ["name"] + } + ] + }, + uniqueItems: true +}; + +module.exports = { + meta: { + docs: { + description: "disallow specified modules when loaded by `require`", + category: "Node.js and CommonJS", + recommended: false, + url: "https://eslint.org/docs/rules/no-restricted-modules" + }, + + schema: { + anyOf: [ + arrayOfStringsOrObjects, + { + type: "array", + items: { + type: "object", + properties: { + paths: arrayOfStringsOrObjects, + patterns: arrayOfStrings + }, + additionalProperties: false + }, + additionalItems: false + } + ] + } + }, + + create(context) { + const options = Array.isArray(context.options) ? context.options : []; + const isPathAndPatternsObject = + typeof options[0] === "object" && + (options[0].hasOwnProperty("paths") || options[0].hasOwnProperty("patterns")); + + const restrictedPaths = (isPathAndPatternsObject ? options[0].paths : context.options) || []; + const restrictedPatterns = (isPathAndPatternsObject ? options[0].patterns : []) || []; + + const restrictedPathMessages = restrictedPaths.reduce((memo, importName) => { + if (typeof importName === "string") { + memo[importName] = null; + } else { + memo[importName.name] = importName.message; + } + return memo; + }, {}); + + // if no imports are restricted we don"t need to check + if (Object.keys(restrictedPaths).length === 0 && restrictedPatterns.length === 0) { + return {}; + } + + const ig = ignore().add(restrictedPatterns); + + + /** + * Function to check if a node is a string literal. + * @param {ASTNode} node The node to check. + * @returns {boolean} If the node is a string literal. + */ + function isString(node) { + return node && node.type === "Literal" && typeof node.value === "string"; + } + + /** + * Function to check if a node is a require call. + * @param {ASTNode} node The node to check. + * @returns {boolean} If the node is a require call. + */ + function isRequireCall(node) { + return node.callee.type === "Identifier" && node.callee.name === "require"; + } + + /** + * Report a restricted path. + * @param {node} node representing the restricted path reference + * @returns {void} + * @private + */ + function reportPath(node) { + const moduleName = node.arguments[0].value.trim(); + const customMessage = restrictedPathMessages[moduleName]; + const message = customMessage + ? CUSTOM_MESSAGE_TEMPLATE + : DEFAULT_MESSAGE_TEMPLATE; + + context.report({ + node, + message, + data: { + moduleName, + customMessage + } + }); + } + + /** + * Check if the given name is a restricted path name + * @param {string} name name of a variable + * @returns {boolean} whether the variable is a restricted path or not + * @private + */ + function isRestrictedPath(name) { + return Object.prototype.hasOwnProperty.call(restrictedPathMessages, name); + } + + return { + CallExpression(node) { + if (isRequireCall(node)) { + + // node has arguments and first argument is string + if (node.arguments.length && isString(node.arguments[0])) { + const moduleName = node.arguments[0].value.trim(); + + // check if argument value is in restricted modules array + if (isRestrictedPath(moduleName)) { + reportPath(node); + } + + if (restrictedPatterns.length > 0 && ig.ignores(moduleName)) { + context.report({ + node, + message: "'{{moduleName}}' module is restricted from being used by a pattern.", + data: { moduleName } + }); + } + } + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-restricted-properties.js b/node_modules/eslint/lib/rules/no-restricted-properties.js new file mode 100644 index 0000000..71cc83c --- /dev/null +++ b/node_modules/eslint/lib/rules/no-restricted-properties.js @@ -0,0 +1,174 @@ +/** + * @fileoverview Rule to disallow certain object properties + * @author Will Klein & Eli White + */ + +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow certain properties on certain objects", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-restricted-properties" + }, + + schema: { + type: "array", + items: { + anyOf: [ // `object` and `property` are both optional, but at least one of them must be provided. + { + type: "object", + properties: { + object: { + type: "string" + }, + property: { + type: "string" + }, + message: { + type: "string" + } + }, + additionalProperties: false, + required: ["object"] + }, + { + type: "object", + properties: { + object: { + type: "string" + }, + property: { + type: "string" + }, + message: { + type: "string" + } + }, + additionalProperties: false, + required: ["property"] + } + ] + }, + uniqueItems: true + } + }, + + create(context) { + const restrictedCalls = context.options; + + if (restrictedCalls.length === 0) { + return {}; + } + + const restrictedProperties = new Map(); + const globallyRestrictedObjects = new Map(); + const globallyRestrictedProperties = new Map(); + + restrictedCalls.forEach(option => { + const objectName = option.object; + const propertyName = option.property; + + if (typeof objectName === "undefined") { + globallyRestrictedProperties.set(propertyName, { message: option.message }); + } else if (typeof propertyName === "undefined") { + globallyRestrictedObjects.set(objectName, { message: option.message }); + } else { + if (!restrictedProperties.has(objectName)) { + restrictedProperties.set(objectName, new Map()); + } + + restrictedProperties.get(objectName).set(propertyName, { + message: option.message + }); + } + }); + + /** + * Checks to see whether a property access is restricted, and reports it if so. + * @param {ASTNode} node The node to report + * @param {string} objectName The name of the object + * @param {string} propertyName The name of the property + * @returns {undefined} + */ + function checkPropertyAccess(node, objectName, propertyName) { + if (propertyName === null) { + return; + } + const matchedObject = restrictedProperties.get(objectName); + const matchedObjectProperty = matchedObject ? matchedObject.get(propertyName) : globallyRestrictedObjects.get(objectName); + const globalMatchedProperty = globallyRestrictedProperties.get(propertyName); + + if (matchedObjectProperty) { + const message = matchedObjectProperty.message ? ` ${matchedObjectProperty.message}` : ""; + + context.report({ + node, + // eslint-disable-next-line eslint-plugin/report-message-format + message: "'{{objectName}}.{{propertyName}}' is restricted from being used.{{message}}", + data: { + objectName, + propertyName, + message + } + }); + } else if (globalMatchedProperty) { + const message = globalMatchedProperty.message ? ` ${globalMatchedProperty.message}` : ""; + + context.report({ + node, + // eslint-disable-next-line eslint-plugin/report-message-format + message: "'{{propertyName}}' is restricted from being used.{{message}}", + data: { + propertyName, + message + } + }); + } + } + + /** + * Checks property accesses in a destructuring assignment expression, e.g. `var foo; ({foo} = bar);` + * @param {ASTNode} node An AssignmentExpression or AssignmentPattern node + * @returns {undefined} + */ + function checkDestructuringAssignment(node) { + if (node.right.type === "Identifier") { + const objectName = node.right.name; + + if (node.left.type === "ObjectPattern") { + node.left.properties.forEach(property => { + checkPropertyAccess(node.left, objectName, astUtils.getStaticPropertyName(property)); + }); + } + } + } + + return { + MemberExpression(node) { + checkPropertyAccess(node, node.object && node.object.name, astUtils.getStaticPropertyName(node)); + }, + VariableDeclarator(node) { + if (node.init && node.init.type === "Identifier") { + const objectName = node.init.name; + + if (node.id.type === "ObjectPattern") { + node.id.properties.forEach(property => { + checkPropertyAccess(node.id, objectName, astUtils.getStaticPropertyName(property)); + }); + } + } + }, + AssignmentExpression: checkDestructuringAssignment, + AssignmentPattern: checkDestructuringAssignment + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-restricted-syntax.js b/node_modules/eslint/lib/rules/no-restricted-syntax.js new file mode 100644 index 0000000..c472d94 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-restricted-syntax.js @@ -0,0 +1,63 @@ +/** + * @fileoverview Rule to flag use of certain node types + * @author Burak Yigit Kaya + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow specified syntax", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/no-restricted-syntax" + }, + + schema: { + type: "array", + items: [{ + oneOf: [ + { + type: "string" + }, + { + type: "object", + properties: { + selector: { type: "string" }, + message: { type: "string" } + }, + required: ["selector"], + additionalProperties: false + } + ] + }], + uniqueItems: true, + minItems: 0 + } + }, + + create(context) { + return context.options.reduce((result, selectorOrObject) => { + const isStringFormat = (typeof selectorOrObject === "string"); + const hasCustomMessage = !isStringFormat && Boolean(selectorOrObject.message); + + const selector = isStringFormat ? selectorOrObject : selectorOrObject.selector; + const message = hasCustomMessage ? selectorOrObject.message : "Using '{{selector}}' is not allowed."; + + return Object.assign(result, { + [selector](node) { + context.report({ + node, + message, + data: hasCustomMessage ? {} : { selector } + }); + } + }); + }, {}); + + } +}; diff --git a/node_modules/eslint/lib/rules/no-return-assign.js b/node_modules/eslint/lib/rules/no-return-assign.js new file mode 100644 index 0000000..0a016cf --- /dev/null +++ b/node_modules/eslint/lib/rules/no-return-assign.js @@ -0,0 +1,72 @@ +/** + * @fileoverview Rule to flag when return statement contains assignment + * @author Ilya Volodin + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const SENTINEL_TYPE = /^(?:[a-zA-Z]+?Statement|ArrowFunctionExpression|FunctionExpression|ClassExpression)$/; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow assignment operators in `return` statements", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-return-assign" + }, + + schema: [ + { + enum: ["except-parens", "always"] + } + ] + }, + + create(context) { + const always = (context.options[0] || "except-parens") !== "except-parens"; + const sourceCode = context.getSourceCode(); + + return { + AssignmentExpression(node) { + if (!always && astUtils.isParenthesised(sourceCode, node)) { + return; + } + + let parent = node.parent; + + // Find ReturnStatement or ArrowFunctionExpression in ancestors. + while (parent && !SENTINEL_TYPE.test(parent.type)) { + node = parent; + parent = parent.parent; + } + + // Reports. + if (parent && parent.type === "ReturnStatement") { + context.report({ + node: parent, + message: "Return statement should not contain assignment." + }); + } else if (parent && parent.type === "ArrowFunctionExpression" && parent.body === node) { + context.report({ + node: parent, + message: "Arrow function should not return assignment." + }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-return-await.js b/node_modules/eslint/lib/rules/no-return-await.js new file mode 100644 index 0000000..490ccae --- /dev/null +++ b/node_modules/eslint/lib/rules/no-return-await.js @@ -0,0 +1,98 @@ +/** + * @fileoverview Disallows unnecessary `return await` + * @author Jordan Harband + */ +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +const message = "Redundant use of `await` on a return value."; + +module.exports = { + meta: { + docs: { + description: "disallow unnecessary `return await`", + category: "Best Practices", + + // TODO: set to true + recommended: false, + + url: "https://eslint.org/docs/rules/no-return-await" + }, + fixable: null, + schema: [ + ] + }, + + create(context) { + + /** + * Reports a found unnecessary `await` expression. + * @param {ASTNode} node The node representing the `await` expression to report + * @returns {void} + */ + function reportUnnecessaryAwait(node) { + context.report({ + node: context.getSourceCode().getFirstToken(node), + loc: node.loc, + message + }); + } + + /** + * Determines whether a thrown error from this node will be caught/handled within this function rather than immediately halting + * this function. For example, a statement in a `try` block will always have an error handler. A statement in + * a `catch` block will only have an error handler if there is also a `finally` block. + * @param {ASTNode} node A node representing a location where an could be thrown + * @returns {boolean} `true` if a thrown error will be caught/handled in this function + */ + function hasErrorHandler(node) { + let ancestor = node; + + while (!astUtils.isFunction(ancestor) && ancestor.type !== "Program") { + if (ancestor.parent.type === "TryStatement" && (ancestor === ancestor.parent.block || ancestor === ancestor.parent.handler && ancestor.parent.finalizer)) { + return true; + } + ancestor = ancestor.parent; + } + return false; + } + + /** + * Checks if a node is placed in tail call position. Once `return` arguments (or arrow function expressions) can be a complex expression, + * an `await` expression could or could not be unnecessary by the definition of this rule. So we're looking for `await` expressions that are in tail position. + * @param {ASTNode} node A node representing the `await` expression to check + * @returns {boolean} The checking result + */ + function isInTailCallPosition(node) { + if (node.parent.type === "ArrowFunctionExpression") { + return true; + } + if (node.parent.type === "ReturnStatement") { + return !hasErrorHandler(node.parent); + } + if (node.parent.type === "ConditionalExpression" && (node === node.parent.consequent || node === node.parent.alternate)) { + return isInTailCallPosition(node.parent); + } + if (node.parent.type === "LogicalExpression" && node === node.parent.right) { + return isInTailCallPosition(node.parent); + } + if (node.parent.type === "SequenceExpression" && node === node.parent.expressions[node.parent.expressions.length - 1]) { + return isInTailCallPosition(node.parent); + } + return false; + } + + return { + AwaitExpression(node) { + if (isInTailCallPosition(node) && !hasErrorHandler(node)) { + reportUnnecessaryAwait(node); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-script-url.js b/node_modules/eslint/lib/rules/no-script-url.js new file mode 100644 index 0000000..ba74daf --- /dev/null +++ b/node_modules/eslint/lib/rules/no-script-url.js @@ -0,0 +1,42 @@ +/** + * @fileoverview Rule to flag when using javascript: urls + * @author Ilya Volodin + */ +/* jshint scripturl: true */ +/* eslint no-script-url: 0 */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow `javascript:` urls", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-script-url" + }, + + schema: [] + }, + + create(context) { + + return { + + Literal(node) { + if (node.value && typeof node.value === "string") { + const value = node.value.toLowerCase(); + + if (value.indexOf("javascript:") === 0) { + context.report({ node, message: "Script URL is a form of eval." }); + } + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-self-assign.js b/node_modules/eslint/lib/rules/no-self-assign.js new file mode 100644 index 0000000..8091d7d --- /dev/null +++ b/node_modules/eslint/lib/rules/no-self-assign.js @@ -0,0 +1,217 @@ +/** + * @fileoverview Rule to disallow assignments where both sides are exactly the same + * @author Toru Nagashima + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const SPACES = /\s+/g; + +/** + * Checks whether the property of 2 given member expression nodes are the same + * property or not. + * + * @param {ASTNode} left - A member expression node to check. + * @param {ASTNode} right - Another member expression node to check. + * @returns {boolean} `true` if the member expressions have the same property. + */ +function isSameProperty(left, right) { + if (left.property.type === "Identifier" && + left.property.type === right.property.type && + left.property.name === right.property.name && + left.computed === right.computed + ) { + return true; + } + + const lname = astUtils.getStaticPropertyName(left); + const rname = astUtils.getStaticPropertyName(right); + + return lname !== null && lname === rname; +} + +/** + * Checks whether 2 given member expression nodes are the reference to the same + * property or not. + * + * @param {ASTNode} left - A member expression node to check. + * @param {ASTNode} right - Another member expression node to check. + * @returns {boolean} `true` if the member expressions are the reference to the + * same property or not. + */ +function isSameMember(left, right) { + if (!isSameProperty(left, right)) { + return false; + } + + const lobj = left.object; + const robj = right.object; + + if (lobj.type !== robj.type) { + return false; + } + if (lobj.type === "MemberExpression") { + return isSameMember(lobj, robj); + } + return lobj.type === "Identifier" && lobj.name === robj.name; +} + +/** + * Traverses 2 Pattern nodes in parallel, then reports self-assignments. + * + * @param {ASTNode|null} left - A left node to traverse. This is a Pattern or + * a Property. + * @param {ASTNode|null} right - A right node to traverse. This is a Pattern or + * a Property. + * @param {boolean} props - The flag to check member expressions as well. + * @param {Function} report - A callback function to report. + * @returns {void} + */ +function eachSelfAssignment(left, right, props, report) { + if (!left || !right) { + + // do nothing + } else if ( + left.type === "Identifier" && + right.type === "Identifier" && + left.name === right.name + ) { + report(right); + } else if ( + left.type === "ArrayPattern" && + right.type === "ArrayExpression" + ) { + const end = Math.min(left.elements.length, right.elements.length); + + for (let i = 0; i < end; ++i) { + const rightElement = right.elements[i]; + + eachSelfAssignment(left.elements[i], rightElement, props, report); + + // After a spread element, those indices are unknown. + if (rightElement && rightElement.type === "SpreadElement") { + break; + } + } + } else if ( + left.type === "RestElement" && + right.type === "SpreadElement" + ) { + eachSelfAssignment(left.argument, right.argument, props, report); + } else if ( + left.type === "ObjectPattern" && + right.type === "ObjectExpression" && + right.properties.length >= 1 + ) { + + /* + * Gets the index of the last spread property. + * It's possible to overwrite properties followed by it. + */ + let startJ = 0; + + for (let i = right.properties.length - 1; i >= 0; --i) { + const propType = right.properties[i].type; + + if (propType === "SpreadElement" || propType === "ExperimentalSpreadProperty") { + startJ = i + 1; + break; + } + } + + for (let i = 0; i < left.properties.length; ++i) { + for (let j = startJ; j < right.properties.length; ++j) { + eachSelfAssignment( + left.properties[i], + right.properties[j], + props, + report + ); + } + } + } else if ( + left.type === "Property" && + right.type === "Property" && + !left.computed && + !right.computed && + right.kind === "init" && + !right.method && + left.key.name === right.key.name + ) { + eachSelfAssignment(left.value, right.value, props, report); + } else if ( + props && + left.type === "MemberExpression" && + right.type === "MemberExpression" && + isSameMember(left, right) + ) { + report(right); + } +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow assignments where both sides are exactly the same", + category: "Best Practices", + recommended: true, + url: "https://eslint.org/docs/rules/no-self-assign" + }, + + schema: [ + { + type: "object", + properties: { + props: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + const sourceCode = context.getSourceCode(); + const options = context.options[0]; + const props = Boolean(options && options.props); + + /** + * Reports a given node as self assignments. + * + * @param {ASTNode} node - A node to report. This is an Identifier node. + * @returns {void} + */ + function report(node) { + context.report({ + node, + message: "'{{name}}' is assigned to itself.", + data: { + name: sourceCode.getText(node).replace(SPACES, "") + } + }); + } + + return { + AssignmentExpression(node) { + if (node.operator === "=") { + eachSelfAssignment(node.left, node.right, props, report); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-self-compare.js b/node_modules/eslint/lib/rules/no-self-compare.js new file mode 100644 index 0000000..6ebc387 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-self-compare.js @@ -0,0 +1,54 @@ +/** + * @fileoverview Rule to flag comparison where left part is the same as the right + * part. + * @author Ilya Volodin + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow comparisons where both sides are exactly the same", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-self-compare" + }, + + schema: [] + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + /** + * Determines whether two nodes are composed of the same tokens. + * @param {ASTNode} nodeA The first node + * @param {ASTNode} nodeB The second node + * @returns {boolean} true if the nodes have identical token representations + */ + function hasSameTokens(nodeA, nodeB) { + const tokensA = sourceCode.getTokens(nodeA); + const tokensB = sourceCode.getTokens(nodeB); + + return tokensA.length === tokensB.length && + tokensA.every((token, index) => token.type === tokensB[index].type && token.value === tokensB[index].value); + } + + return { + + BinaryExpression(node) { + const operators = new Set(["===", "==", "!==", "!=", ">", "<", ">=", "<="]); + + if (operators.has(node.operator) && hasSameTokens(node.left, node.right)) { + context.report({ node, message: "Comparing to itself is potentially pointless." }); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-sequences.js b/node_modules/eslint/lib/rules/no-sequences.js new file mode 100644 index 0000000..8eaf555 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-sequences.js @@ -0,0 +1,113 @@ +/** + * @fileoverview Rule to flag use of comma operator + * @author Brandon Mills + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow comma operators", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-sequences" + }, + + schema: [] + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + /** + * Parts of the grammar that are required to have parens. + */ + const parenthesized = { + DoWhileStatement: "test", + IfStatement: "test", + SwitchStatement: "discriminant", + WhileStatement: "test", + WithStatement: "object", + ArrowFunctionExpression: "body" + + /* + * Omitting CallExpression - commas are parsed as argument separators + * Omitting NewExpression - commas are parsed as argument separators + * Omitting ForInStatement - parts aren't individually parenthesised + * Omitting ForStatement - parts aren't individually parenthesised + */ + }; + + /** + * Determines whether a node is required by the grammar to be wrapped in + * parens, e.g. the test of an if statement. + * @param {ASTNode} node - The AST node + * @returns {boolean} True if parens around node belong to parent node. + */ + function requiresExtraParens(node) { + return node.parent && parenthesized[node.parent.type] && + node === node.parent[parenthesized[node.parent.type]]; + } + + /** + * Check if a node is wrapped in parens. + * @param {ASTNode} node - The AST node + * @returns {boolean} True if the node has a paren on each side. + */ + function isParenthesised(node) { + return astUtils.isParenthesised(sourceCode, node); + } + + /** + * Check if a node is wrapped in two levels of parens. + * @param {ASTNode} node - The AST node + * @returns {boolean} True if two parens surround the node on each side. + */ + function isParenthesisedTwice(node) { + const previousToken = sourceCode.getTokenBefore(node, 1), + nextToken = sourceCode.getTokenAfter(node, 1); + + return isParenthesised(node) && previousToken && nextToken && + astUtils.isOpeningParenToken(previousToken) && previousToken.range[1] <= node.range[0] && + astUtils.isClosingParenToken(nextToken) && nextToken.range[0] >= node.range[1]; + } + + return { + SequenceExpression(node) { + + // Always allow sequences in for statement update + if (node.parent.type === "ForStatement" && + (node === node.parent.init || node === node.parent.update)) { + return; + } + + // Wrapping a sequence in extra parens indicates intent + if (requiresExtraParens(node)) { + if (isParenthesisedTwice(node)) { + return; + } + } else { + if (isParenthesised(node)) { + return; + } + } + + const child = sourceCode.getTokenAfter(node.expressions[0]); + + context.report({ node, loc: child.loc.start, message: "Unexpected use of comma operator." }); + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-shadow-restricted-names.js b/node_modules/eslint/lib/rules/no-shadow-restricted-names.js new file mode 100644 index 0000000..7b92521 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-shadow-restricted-names.js @@ -0,0 +1,70 @@ +/** + * @fileoverview Disallow shadowing of NaN, undefined, and Infinity (ES5 section 15.1.1) + * @author Michael Ficarra + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow identifiers from shadowing restricted names", + category: "Variables", + recommended: false, + url: "https://eslint.org/docs/rules/no-shadow-restricted-names" + }, + + schema: [] + }, + + create(context) { + + const RESTRICTED = ["undefined", "NaN", "Infinity", "arguments", "eval"]; + + /** + * Check if the node name is present inside the restricted list + * @param {ASTNode} id id to evaluate + * @returns {void} + * @private + */ + function checkForViolation(id) { + if (RESTRICTED.indexOf(id.name) > -1) { + context.report({ + node: id, + message: "Shadowing of global property '{{idName}}'.", + data: { + idName: id.name + } + }); + } + } + + return { + VariableDeclarator(node) { + checkForViolation(node.id); + }, + ArrowFunctionExpression(node) { + [].map.call(node.params, checkForViolation); + }, + FunctionExpression(node) { + if (node.id) { + checkForViolation(node.id); + } + [].map.call(node.params, checkForViolation); + }, + FunctionDeclaration(node) { + if (node.id) { + checkForViolation(node.id); + [].map.call(node.params, checkForViolation); + } + }, + CatchClause(node) { + checkForViolation(node.param); + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-shadow.js b/node_modules/eslint/lib/rules/no-shadow.js new file mode 100644 index 0000000..d01231f --- /dev/null +++ b/node_modules/eslint/lib/rules/no-shadow.js @@ -0,0 +1,189 @@ +/** + * @fileoverview Rule to flag on declaring variables already declared in the outer scope + * @author Ilya Volodin + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow variable declarations from shadowing variables declared in the outer scope", + category: "Variables", + recommended: false, + url: "https://eslint.org/docs/rules/no-shadow" + }, + + schema: [ + { + type: "object", + properties: { + builtinGlobals: { type: "boolean" }, + hoist: { enum: ["all", "functions", "never"] }, + allow: { + type: "array", + items: { + type: "string" + } + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + + const options = { + builtinGlobals: Boolean(context.options[0] && context.options[0].builtinGlobals), + hoist: (context.options[0] && context.options[0].hoist) || "functions", + allow: (context.options[0] && context.options[0].allow) || [] + }; + + /** + * Check if variable name is allowed. + * + * @param {ASTNode} variable The variable to check. + * @returns {boolean} Whether or not the variable name is allowed. + */ + function isAllowed(variable) { + return options.allow.indexOf(variable.name) !== -1; + } + + /** + * Checks if a variable of the class name in the class scope of ClassDeclaration. + * + * ClassDeclaration creates two variables of its name into its outer scope and its class scope. + * So we should ignore the variable in the class scope. + * + * @param {Object} variable The variable to check. + * @returns {boolean} Whether or not the variable of the class name in the class scope of ClassDeclaration. + */ + function isDuplicatedClassNameVariable(variable) { + const block = variable.scope.block; + + return block.type === "ClassDeclaration" && block.id === variable.identifiers[0]; + } + + /** + * Checks if a variable is inside the initializer of scopeVar. + * + * To avoid reporting at declarations such as `var a = function a() {};`. + * But it should report `var a = function(a) {};` or `var a = function() { function a() {} };`. + * + * @param {Object} variable The variable to check. + * @param {Object} scopeVar The scope variable to look for. + * @returns {boolean} Whether or not the variable is inside initializer of scopeVar. + */ + function isOnInitializer(variable, scopeVar) { + const outerScope = scopeVar.scope; + const outerDef = scopeVar.defs[0]; + const outer = outerDef && outerDef.parent && outerDef.parent.range; + const innerScope = variable.scope; + const innerDef = variable.defs[0]; + const inner = innerDef && innerDef.name.range; + + return ( + outer && + inner && + outer[0] < inner[0] && + inner[1] < outer[1] && + ((innerDef.type === "FunctionName" && innerDef.node.type === "FunctionExpression") || innerDef.node.type === "ClassExpression") && + outerScope === innerScope.upper + ); + } + + /** + * Get a range of a variable's identifier node. + * @param {Object} variable The variable to get. + * @returns {Array|undefined} The range of the variable's identifier node. + */ + function getNameRange(variable) { + const def = variable.defs[0]; + + return def && def.name.range; + } + + /** + * Checks if a variable is in TDZ of scopeVar. + * @param {Object} variable The variable to check. + * @param {Object} scopeVar The variable of TDZ. + * @returns {boolean} Whether or not the variable is in TDZ of scopeVar. + */ + function isInTdz(variable, scopeVar) { + const outerDef = scopeVar.defs[0]; + const inner = getNameRange(variable); + const outer = getNameRange(scopeVar); + + return ( + inner && + outer && + inner[1] < outer[0] && + + // Excepts FunctionDeclaration if is {"hoist":"function"}. + (options.hoist !== "functions" || !outerDef || outerDef.node.type !== "FunctionDeclaration") + ); + } + + /** + * Checks the current context for shadowed variables. + * @param {Scope} scope - Fixme + * @returns {void} + */ + function checkForShadows(scope) { + const variables = scope.variables; + + for (let i = 0; i < variables.length; ++i) { + const variable = variables[i]; + + // Skips "arguments" or variables of a class name in the class scope of ClassDeclaration. + if (variable.identifiers.length === 0 || + isDuplicatedClassNameVariable(variable) || + isAllowed(variable) + ) { + continue; + } + + // Gets shadowed variable. + const shadowed = astUtils.getVariableByName(scope.upper, variable.name); + + if (shadowed && + (shadowed.identifiers.length > 0 || (options.builtinGlobals && "writeable" in shadowed)) && + !isOnInitializer(variable, shadowed) && + !(options.hoist !== "all" && isInTdz(variable, shadowed)) + ) { + context.report({ + node: variable.identifiers[0], + message: "'{{name}}' is already declared in the upper scope.", + data: variable + }); + } + } + } + + return { + "Program:exit"() { + const globalScope = context.getScope(); + const stack = globalScope.childScopes.slice(); + + while (stack.length) { + const scope = stack.pop(); + + stack.push.apply(stack, scope.childScopes); + checkForShadows(scope); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-spaced-func.js b/node_modules/eslint/lib/rules/no-spaced-func.js new file mode 100644 index 0000000..42d1e4b --- /dev/null +++ b/node_modules/eslint/lib/rules/no-spaced-func.js @@ -0,0 +1,76 @@ +/** + * @fileoverview Rule to check that spaced function application + * @author Matt DuVall + * @deprecated in ESLint v3.3.0 + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow spacing between function identifiers and their applications (deprecated)", + category: "Stylistic Issues", + recommended: false, + replacedBy: ["func-call-spacing"], + url: "https://eslint.org/docs/rules/no-spaced-func" + }, + + deprecated: true, + + fixable: "whitespace", + schema: [] + }, + + create(context) { + + const sourceCode = context.getSourceCode(); + + /** + * Check if open space is present in a function name + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ + function detectOpenSpaces(node) { + const lastCalleeToken = sourceCode.getLastToken(node.callee); + let prevToken = lastCalleeToken, + parenToken = sourceCode.getTokenAfter(lastCalleeToken); + + // advances to an open parenthesis. + while ( + parenToken && + parenToken.range[1] < node.range[1] && + parenToken.value !== "(" + ) { + prevToken = parenToken; + parenToken = sourceCode.getTokenAfter(parenToken); + } + + // look for a space between the callee and the open paren + if (parenToken && + parenToken.range[1] < node.range[1] && + sourceCode.isSpaceBetweenTokens(prevToken, parenToken) + ) { + context.report({ + node, + loc: lastCalleeToken.loc.start, + message: "Unexpected space between function name and paren.", + fix(fixer) { + return fixer.removeRange([prevToken.range[1], parenToken.range[0]]); + } + }); + } + } + + return { + CallExpression: detectOpenSpaces, + NewExpression: detectOpenSpaces + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-sparse-arrays.js b/node_modules/eslint/lib/rules/no-sparse-arrays.js new file mode 100644 index 0000000..1cc6f7c --- /dev/null +++ b/node_modules/eslint/lib/rules/no-sparse-arrays.js @@ -0,0 +1,44 @@ +/** + * @fileoverview Disallow sparse arrays + * @author Nicholas C. Zakas + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow sparse arrays", + category: "Possible Errors", + recommended: true, + url: "https://eslint.org/docs/rules/no-sparse-arrays" + }, + + schema: [] + }, + + create(context) { + + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + + ArrayExpression(node) { + + const emptySpot = node.elements.indexOf(null) > -1; + + if (emptySpot) { + context.report({ node, message: "Unexpected comma in middle of array." }); + } + } + + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-sync.js b/node_modules/eslint/lib/rules/no-sync.js new file mode 100644 index 0000000..eb7b787 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-sync.js @@ -0,0 +1,54 @@ +/** + * @fileoverview Rule to check for properties whose identifier ends with the string Sync + * @author Matt DuVall + */ + +/* jshint node:true */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow synchronous methods", + category: "Node.js and CommonJS", + recommended: false, + url: "https://eslint.org/docs/rules/no-sync" + }, + + schema: [ + { + type: "object", + properties: { + allowAtRootLevel: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + const selector = context.options[0] && context.options[0].allowAtRootLevel + ? ":function MemberExpression[property.name=/.*Sync$/]" + : "MemberExpression[property.name=/.*Sync$/]"; + + return { + [selector](node) { + context.report({ + node, + message: "Unexpected sync method: '{{propertyName}}'.", + data: { + propertyName: node.property.name + } + }); + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-tabs.js b/node_modules/eslint/lib/rules/no-tabs.js new file mode 100644 index 0000000..08a8fa5 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-tabs.js @@ -0,0 +1,48 @@ +/** + * @fileoverview Rule to check for tabs inside a file + * @author Gyandeep Singh + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ +const regex = /\t/; + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow all tabs", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/no-tabs" + }, + schema: [] + }, + + create(context) { + return { + Program(node) { + context.getSourceCode().getLines().forEach((line, index) => { + const match = regex.exec(line); + + if (match) { + context.report({ + node, + loc: { + line: index + 1, + column: match.index + 1 + }, + message: "Unexpected tab character." + }); + } + }); + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-template-curly-in-string.js b/node_modules/eslint/lib/rules/no-template-curly-in-string.js new file mode 100644 index 0000000..ed74fcc --- /dev/null +++ b/node_modules/eslint/lib/rules/no-template-curly-in-string.js @@ -0,0 +1,38 @@ +/** + * @fileoverview Warn when using template string syntax in regular strings + * @author Jeroen Engels + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow template literal placeholder syntax in regular strings", + category: "Possible Errors", + recommended: false, + url: "https://eslint.org/docs/rules/no-template-curly-in-string" + }, + + schema: [] + }, + + create(context) { + const regex = /\$\{[^}]+\}/; + + return { + Literal(node) { + if (typeof node.value === "string" && regex.test(node.value)) { + context.report({ + node, + message: "Unexpected template string expression." + }); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-ternary.js b/node_modules/eslint/lib/rules/no-ternary.js new file mode 100644 index 0000000..4dcc8db --- /dev/null +++ b/node_modules/eslint/lib/rules/no-ternary.js @@ -0,0 +1,35 @@ +/** + * @fileoverview Rule to flag use of ternary operators. + * @author Ian Christian Myers + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow ternary operators", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/no-ternary" + }, + + schema: [] + }, + + create(context) { + + return { + + ConditionalExpression(node) { + context.report({ node, message: "Ternary operator used." }); + } + + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-this-before-super.js b/node_modules/eslint/lib/rules/no-this-before-super.js new file mode 100644 index 0000000..944a323 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-this-before-super.js @@ -0,0 +1,300 @@ +/** + * @fileoverview A rule to disallow using `this`/`super` before `super()`. + * @author Toru Nagashima + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks whether or not a given node is a constructor. + * @param {ASTNode} node - A node to check. This node type is one of + * `Program`, `FunctionDeclaration`, `FunctionExpression`, and + * `ArrowFunctionExpression`. + * @returns {boolean} `true` if the node is a constructor. + */ +function isConstructorFunction(node) { + return ( + node.type === "FunctionExpression" && + node.parent.type === "MethodDefinition" && + node.parent.kind === "constructor" + ); +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow `this`/`super` before calling `super()` in constructors", + category: "ECMAScript 6", + recommended: true, + url: "https://eslint.org/docs/rules/no-this-before-super" + }, + + schema: [] + }, + + create(context) { + + /* + * Information for each constructor. + * - upper: Information of the upper constructor. + * - hasExtends: A flag which shows whether the owner class has a valid + * `extends` part. + * - scope: The scope of the owner class. + * - codePath: The code path of this constructor. + */ + let funcInfo = null; + + /* + * Information for each code path segment. + * Each key is the id of a code path segment. + * Each value is an object: + * - superCalled: The flag which shows `super()` called in all code paths. + * - invalidNodes: The array of invalid ThisExpression and Super nodes. + */ + let segInfoMap = Object.create(null); + + /** + * Gets whether or not `super()` is called in a given code path segment. + * @param {CodePathSegment} segment - A code path segment to get. + * @returns {boolean} `true` if `super()` is called. + */ + function isCalled(segment) { + return !segment.reachable || segInfoMap[segment.id].superCalled; + } + + /** + * Checks whether or not this is in a constructor. + * @returns {boolean} `true` if this is in a constructor. + */ + function isInConstructorOfDerivedClass() { + return Boolean(funcInfo && funcInfo.isConstructor && funcInfo.hasExtends); + } + + /** + * Checks whether or not this is before `super()` is called. + * @returns {boolean} `true` if this is before `super()` is called. + */ + function isBeforeCallOfSuper() { + return ( + isInConstructorOfDerivedClass() && + !funcInfo.codePath.currentSegments.every(isCalled) + ); + } + + /** + * Sets a given node as invalid. + * @param {ASTNode} node - A node to set as invalid. This is one of + * a ThisExpression and a Super. + * @returns {void} + */ + function setInvalid(node) { + const segments = funcInfo.codePath.currentSegments; + + for (let i = 0; i < segments.length; ++i) { + const segment = segments[i]; + + if (segment.reachable) { + segInfoMap[segment.id].invalidNodes.push(node); + } + } + } + + /** + * Sets the current segment as `super` was called. + * @returns {void} + */ + function setSuperCalled() { + const segments = funcInfo.codePath.currentSegments; + + for (let i = 0; i < segments.length; ++i) { + const segment = segments[i]; + + if (segment.reachable) { + segInfoMap[segment.id].superCalled = true; + } + } + } + + return { + + /** + * Adds information of a constructor into the stack. + * @param {CodePath} codePath - A code path which was started. + * @param {ASTNode} node - The current node. + * @returns {void} + */ + onCodePathStart(codePath, node) { + if (isConstructorFunction(node)) { + + // Class > ClassBody > MethodDefinition > FunctionExpression + const classNode = node.parent.parent.parent; + + funcInfo = { + upper: funcInfo, + isConstructor: true, + hasExtends: Boolean( + classNode.superClass && + !astUtils.isNullOrUndefined(classNode.superClass) + ), + codePath + }; + } else { + funcInfo = { + upper: funcInfo, + isConstructor: false, + hasExtends: false, + codePath + }; + } + }, + + /** + * Removes the top of stack item. + * + * And this treverses all segments of this code path then reports every + * invalid node. + * + * @param {CodePath} codePath - A code path which was ended. + * @param {ASTNode} node - The current node. + * @returns {void} + */ + onCodePathEnd(codePath) { + const isDerivedClass = funcInfo.hasExtends; + + funcInfo = funcInfo.upper; + if (!isDerivedClass) { + return; + } + + codePath.traverseSegments((segment, controller) => { + const info = segInfoMap[segment.id]; + + for (let i = 0; i < info.invalidNodes.length; ++i) { + const invalidNode = info.invalidNodes[i]; + + context.report({ + message: "'{{kind}}' is not allowed before 'super()'.", + node: invalidNode, + data: { + kind: invalidNode.type === "Super" ? "super" : "this" + } + }); + } + + if (info.superCalled) { + controller.skip(); + } + }); + }, + + /** + * Initialize information of a given code path segment. + * @param {CodePathSegment} segment - A code path segment to initialize. + * @returns {void} + */ + onCodePathSegmentStart(segment) { + if (!isInConstructorOfDerivedClass()) { + return; + } + + // Initialize info. + segInfoMap[segment.id] = { + superCalled: ( + segment.prevSegments.length > 0 && + segment.prevSegments.every(isCalled) + ), + invalidNodes: [] + }; + }, + + /** + * Update information of the code path segment when a code path was + * looped. + * @param {CodePathSegment} fromSegment - The code path segment of the + * end of a loop. + * @param {CodePathSegment} toSegment - A code path segment of the head + * of a loop. + * @returns {void} + */ + onCodePathSegmentLoop(fromSegment, toSegment) { + if (!isInConstructorOfDerivedClass()) { + return; + } + + // Update information inside of the loop. + funcInfo.codePath.traverseSegments( + { first: toSegment, last: fromSegment }, + (segment, controller) => { + const info = segInfoMap[segment.id]; + + if (info.superCalled) { + info.invalidNodes = []; + controller.skip(); + } else if ( + segment.prevSegments.length > 0 && + segment.prevSegments.every(isCalled) + ) { + info.superCalled = true; + info.invalidNodes = []; + } + } + ); + }, + + /** + * Reports if this is before `super()`. + * @param {ASTNode} node - A target node. + * @returns {void} + */ + ThisExpression(node) { + if (isBeforeCallOfSuper()) { + setInvalid(node); + } + }, + + /** + * Reports if this is before `super()`. + * @param {ASTNode} node - A target node. + * @returns {void} + */ + Super(node) { + if (!astUtils.isCallee(node) && isBeforeCallOfSuper()) { + setInvalid(node); + } + }, + + /** + * Marks `super()` called. + * @param {ASTNode} node - A target node. + * @returns {void} + */ + "CallExpression:exit"(node) { + if (node.callee.type === "Super" && isBeforeCallOfSuper()) { + setSuperCalled(); + } + }, + + /** + * Resets state. + * @returns {void} + */ + "Program:exit"() { + segInfoMap = Object.create(null); + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-throw-literal.js b/node_modules/eslint/lib/rules/no-throw-literal.js new file mode 100644 index 0000000..b080578 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-throw-literal.js @@ -0,0 +1,44 @@ +/** + * @fileoverview Rule to restrict what can be thrown as an exception. + * @author Dieter Oberkofler + */ + +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow throwing literals as exceptions", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-throw-literal" + }, + + schema: [] + }, + + create(context) { + + return { + + ThrowStatement(node) { + if (!astUtils.couldBeError(node.argument)) { + context.report({ node, message: "Expected an object to be thrown." }); + } else if (node.argument.type === "Identifier") { + if (node.argument.name === "undefined") { + context.report({ node, message: "Do not throw undefined." }); + } + } + + } + + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-trailing-spaces.js b/node_modules/eslint/lib/rules/no-trailing-spaces.js new file mode 100644 index 0000000..4d70c3b --- /dev/null +++ b/node_modules/eslint/lib/rules/no-trailing-spaces.js @@ -0,0 +1,170 @@ +/** + * @fileoverview Disallow trailing spaces at the end of lines. + * @author Nodeca Team + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow trailing whitespace at the end of lines", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/no-trailing-spaces" + }, + + fixable: "whitespace", + + schema: [ + { + type: "object", + properties: { + skipBlankLines: { + type: "boolean" + }, + ignoreComments: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + const BLANK_CLASS = "[ \t\u00a0\u2000-\u200b\u3000]", + SKIP_BLANK = `^${BLANK_CLASS}*$`, + NONBLANK = `${BLANK_CLASS}+$`; + + const options = context.options[0] || {}, + skipBlankLines = options.skipBlankLines || false, + ignoreComments = typeof options.ignoreComments === "boolean" && options.ignoreComments; + + /** + * Report the error message + * @param {ASTNode} node node to report + * @param {int[]} location range information + * @param {int[]} fixRange Range based on the whole program + * @returns {void} + */ + function report(node, location, fixRange) { + + /* + * Passing node is a bit dirty, because message data will contain big + * text in `source`. But... who cares :) ? + * One more kludge will not make worse the bloody wizardry of this + * plugin. + */ + context.report({ + node, + loc: location, + message: "Trailing spaces not allowed.", + fix(fixer) { + return fixer.removeRange(fixRange); + } + }); + } + + /** + * Given a list of comment nodes, return the line numbers for those comments. + * @param {Array} comments An array of comment nodes. + * @returns {number[]} An array of line numbers containing comments. + */ + function getCommentLineNumbers(comments) { + const lines = new Set(); + + comments.forEach(comment => { + for (let i = comment.loc.start.line; i <= comment.loc.end.line; i++) { + lines.add(i); + } + }); + + return lines; + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + + Program: function checkTrailingSpaces(node) { + + /* + * Let's hack. Since Espree does not return whitespace nodes, + * fetch the source code and do matching via regexps. + */ + + const re = new RegExp(NONBLANK), + skipMatch = new RegExp(SKIP_BLANK), + lines = sourceCode.lines, + linebreaks = sourceCode.getText().match(astUtils.createGlobalLinebreakMatcher()), + comments = sourceCode.getAllComments(), + commentLineNumbers = getCommentLineNumbers(comments); + + let totalLength = 0, + fixRange = []; + + for (let i = 0, ii = lines.length; i < ii; i++) { + const matches = re.exec(lines[i]); + + /* + * Always add linebreak length to line length to accommodate for line break (\n or \r\n) + * Because during the fix time they also reserve one spot in the array. + * Usually linebreak length is 2 for \r\n (CRLF) and 1 for \n (LF) + */ + const linebreakLength = linebreaks && linebreaks[i] ? linebreaks[i].length : 1; + const lineLength = lines[i].length + linebreakLength; + + if (matches) { + const location = { + line: i + 1, + column: matches.index + }; + + const rangeStart = totalLength + location.column; + const rangeEnd = totalLength + lineLength - linebreakLength; + const containingNode = sourceCode.getNodeByRangeIndex(rangeStart); + + if (containingNode && containingNode.type === "TemplateElement" && + rangeStart > containingNode.parent.range[0] && + rangeEnd < containingNode.parent.range[1]) { + totalLength += lineLength; + continue; + } + + /* + * If the line has only whitespace, and skipBlankLines + * is true, don't report it + */ + if (skipBlankLines && skipMatch.test(lines[i])) { + totalLength += lineLength; + continue; + } + + fixRange = [rangeStart, rangeEnd]; + + if (!ignoreComments || !commentLineNumbers.has(location.line)) { + report(node, location, fixRange); + } + } + + totalLength += lineLength; + } + } + + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-undef-init.js b/node_modules/eslint/lib/rules/no-undef-init.js new file mode 100644 index 0000000..2e0ab24 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-undef-init.js @@ -0,0 +1,64 @@ +/** + * @fileoverview Rule to flag when initializing to undefined + * @author Ilya Volodin + */ + +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow initializing variables to `undefined`", + category: "Variables", + recommended: false, + url: "https://eslint.org/docs/rules/no-undef-init" + }, + + schema: [], + + fixable: "code" + }, + + create(context) { + + const sourceCode = context.getSourceCode(); + + return { + + VariableDeclarator(node) { + const name = sourceCode.getText(node.id), + init = node.init && node.init.name, + scope = context.getScope(), + undefinedVar = astUtils.getVariableByName(scope, "undefined"), + shadowed = undefinedVar && undefinedVar.defs.length > 0; + + if (init === "undefined" && node.parent.kind !== "const" && !shadowed) { + context.report({ + node, + message: "It's not necessary to initialize '{{name}}' to undefined.", + data: { name }, + fix(fixer) { + if (node.parent.kind === "var") { + return null; + } + + if (node.id.type === "ArrayPattern" || node.id.type === "ObjectPattern") { + + // Don't fix destructuring assignment to `undefined`. + return null; + } + return fixer.removeRange([node.id.range[1], node.range[1]]); + } + }); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-undef.js b/node_modules/eslint/lib/rules/no-undef.js new file mode 100644 index 0000000..c8347d5 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-undef.js @@ -0,0 +1,72 @@ +/** + * @fileoverview Rule to flag references to undeclared variables. + * @author Mark Macdonald + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks if the given node is the argument of a typeof operator. + * @param {ASTNode} node The AST node being checked. + * @returns {boolean} Whether or not the node is the argument of a typeof operator. + */ +function hasTypeOfOperator(node) { + const parent = node.parent; + + return parent.type === "UnaryExpression" && parent.operator === "typeof"; +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow the use of undeclared variables unless mentioned in `/*global */` comments", + category: "Variables", + recommended: true, + url: "https://eslint.org/docs/rules/no-undef" + }, + + schema: [ + { + type: "object", + properties: { + typeof: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + const options = context.options[0]; + const considerTypeOf = options && options.typeof === true || false; + + return { + "Program:exit"(/* node */) { + const globalScope = context.getScope(); + + globalScope.through.forEach(ref => { + const identifier = ref.identifier; + + if (!considerTypeOf && hasTypeOfOperator(identifier)) { + return; + } + + context.report({ + node: identifier, + message: "'{{name}}' is not defined.", + data: identifier + }); + }); + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-undefined.js b/node_modules/eslint/lib/rules/no-undefined.js new file mode 100644 index 0000000..94b514e --- /dev/null +++ b/node_modules/eslint/lib/rules/no-undefined.js @@ -0,0 +1,78 @@ +/** + * @fileoverview Rule to flag references to the undefined variable. + * @author Michael Ficarra + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow the use of `undefined` as an identifier", + category: "Variables", + recommended: false, + url: "https://eslint.org/docs/rules/no-undefined" + }, + + schema: [] + }, + + create(context) { + + /** + * Report an invalid "undefined" identifier node. + * @param {ASTNode} node The node to report. + * @returns {void} + */ + function report(node) { + context.report({ + node, + message: "Unexpected use of undefined." + }); + } + + /** + * Checks the given scope for references to `undefined` and reports + * all references found. + * @param {eslint-scope.Scope} scope The scope to check. + * @returns {void} + */ + function checkScope(scope) { + const undefinedVar = scope.set.get("undefined"); + + if (!undefinedVar) { + return; + } + + const references = undefinedVar.references; + + const defs = undefinedVar.defs; + + // Report non-initializing references (those are covered in defs below) + references + .filter(ref => !ref.init) + .forEach(ref => report(ref.identifier)); + + defs.forEach(def => report(def.name)); + } + + return { + "Program:exit"() { + const globalScope = context.getScope(); + + const stack = [globalScope]; + + while (stack.length) { + const scope = stack.pop(); + + stack.push.apply(stack, scope.childScopes); + checkScope(scope); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-underscore-dangle.js b/node_modules/eslint/lib/rules/no-underscore-dangle.js new file mode 100644 index 0000000..c76488a --- /dev/null +++ b/node_modules/eslint/lib/rules/no-underscore-dangle.js @@ -0,0 +1,204 @@ +/** + * @fileoverview Rule to flag trailing underscores in variable declarations. + * @author Matt DuVall + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow dangling underscores in identifiers", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/no-underscore-dangle" + }, + + schema: [ + { + type: "object", + properties: { + allow: { + type: "array", + items: { + type: "string" + } + }, + allowAfterThis: { + type: "boolean" + }, + allowAfterSuper: { + type: "boolean" + }, + enforceInMethodNames: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + + const options = context.options[0] || {}; + const ALLOWED_VARIABLES = options.allow ? options.allow : []; + const allowAfterThis = typeof options.allowAfterThis !== "undefined" ? options.allowAfterThis : false; + const allowAfterSuper = typeof options.allowAfterSuper !== "undefined" ? options.allowAfterSuper : false; + const enforceInMethodNames = typeof options.enforceInMethodNames !== "undefined" ? options.enforceInMethodNames : false; + + //------------------------------------------------------------------------- + // Helpers + //------------------------------------------------------------------------- + + /** + * Check if identifier is present inside the allowed option + * @param {string} identifier name of the node + * @returns {boolean} true if its is present + * @private + */ + function isAllowed(identifier) { + return ALLOWED_VARIABLES.some(ident => ident === identifier); + } + + /** + * Check if identifier has a underscore at the end + * @param {ASTNode} identifier node to evaluate + * @returns {boolean} true if its is present + * @private + */ + function hasTrailingUnderscore(identifier) { + const len = identifier.length; + + return identifier !== "_" && (identifier[0] === "_" || identifier[len - 1] === "_"); + } + + /** + * Check if identifier is a special case member expression + * @param {ASTNode} identifier node to evaluate + * @returns {boolean} true if its is a special case + * @private + */ + function isSpecialCaseIdentifierForMemberExpression(identifier) { + return identifier === "__proto__"; + } + + /** + * Check if identifier is a special case variable expression + * @param {ASTNode} identifier node to evaluate + * @returns {boolean} true if its is a special case + * @private + */ + function isSpecialCaseIdentifierInVariableExpression(identifier) { + + // Checks for the underscore library usage here + return identifier === "_"; + } + + /** + * Check if function has a underscore at the end + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ + function checkForTrailingUnderscoreInFunctionDeclaration(node) { + if (node.id) { + const identifier = node.id.name; + + if (typeof identifier !== "undefined" && hasTrailingUnderscore(identifier) && !isAllowed(identifier)) { + context.report({ + node, + message: "Unexpected dangling '_' in '{{identifier}}'.", + data: { + identifier + } + }); + } + } + } + + /** + * Check if variable expression has a underscore at the end + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ + function checkForTrailingUnderscoreInVariableExpression(node) { + const identifier = node.id.name; + + if (typeof identifier !== "undefined" && hasTrailingUnderscore(identifier) && + !isSpecialCaseIdentifierInVariableExpression(identifier) && !isAllowed(identifier)) { + context.report({ + node, + message: "Unexpected dangling '_' in '{{identifier}}'.", + data: { + identifier + } + }); + } + } + + /** + * Check if member expression has a underscore at the end + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ + function checkForTrailingUnderscoreInMemberExpression(node) { + const identifier = node.property.name, + isMemberOfThis = node.object.type === "ThisExpression", + isMemberOfSuper = node.object.type === "Super"; + + if (typeof identifier !== "undefined" && hasTrailingUnderscore(identifier) && + !(isMemberOfThis && allowAfterThis) && + !(isMemberOfSuper && allowAfterSuper) && + !isSpecialCaseIdentifierForMemberExpression(identifier) && !isAllowed(identifier)) { + context.report({ + node, + message: "Unexpected dangling '_' in '{{identifier}}'.", + data: { + identifier + } + }); + } + } + + /** + * Check if method declaration or method property has a underscore at the end + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ + function checkForTrailingUnderscoreInMethod(node) { + const identifier = node.key.name; + const isMethod = node.type === "MethodDefinition" || node.type === "Property" && node.method; + + if (typeof identifier !== "undefined" && enforceInMethodNames && isMethod && hasTrailingUnderscore(identifier)) { + context.report({ + node, + message: "Unexpected dangling '_' in '{{identifier}}'.", + data: { + identifier + } + }); + } + } + + //-------------------------------------------------------------------------- + // Public API + //-------------------------------------------------------------------------- + + return { + FunctionDeclaration: checkForTrailingUnderscoreInFunctionDeclaration, + VariableDeclarator: checkForTrailingUnderscoreInVariableExpression, + MemberExpression: checkForTrailingUnderscoreInMemberExpression, + MethodDefinition: checkForTrailingUnderscoreInMethod, + Property: checkForTrailingUnderscoreInMethod + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-unexpected-multiline.js b/node_modules/eslint/lib/rules/no-unexpected-multiline.js new file mode 100644 index 0000000..c7c2668 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-unexpected-multiline.js @@ -0,0 +1,99 @@ +/** + * @fileoverview Rule to spot scenarios where a newline looks like it is ending a statement, but is not. + * @author Glen Mailer + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow confusing multiline expressions", + category: "Possible Errors", + recommended: true, + url: "https://eslint.org/docs/rules/no-unexpected-multiline" + }, + + schema: [] + }, + + create(context) { + + const FUNCTION_MESSAGE = "Unexpected newline between function and ( of function call."; + const PROPERTY_MESSAGE = "Unexpected newline between object and [ of property access."; + const TAGGED_TEMPLATE_MESSAGE = "Unexpected newline between template tag and template literal."; + const DIVISION_MESSAGE = "Unexpected newline between numerator and division operator."; + + const REGEX_FLAG_MATCHER = /^[gimuy]+$/; + + const sourceCode = context.getSourceCode(); + + /** + * Check to see if there is a newline between the node and the following open bracket + * line's expression + * @param {ASTNode} node The node to check. + * @param {string} msg The error message to use. + * @returns {void} + * @private + */ + function checkForBreakAfter(node, msg) { + const openParen = sourceCode.getTokenAfter(node, astUtils.isNotClosingParenToken); + const nodeExpressionEnd = sourceCode.getTokenBefore(openParen); + + if (openParen.loc.start.line !== nodeExpressionEnd.loc.end.line) { + context.report({ node, loc: openParen.loc.start, message: msg, data: { char: openParen.value } }); + } + } + + //-------------------------------------------------------------------------- + // Public API + //-------------------------------------------------------------------------- + + return { + + MemberExpression(node) { + if (!node.computed) { + return; + } + checkForBreakAfter(node.object, PROPERTY_MESSAGE); + }, + + TaggedTemplateExpression(node) { + if (node.tag.loc.end.line === node.quasi.loc.start.line) { + return; + } + context.report({ node, loc: node.loc.start, message: TAGGED_TEMPLATE_MESSAGE }); + }, + + CallExpression(node) { + if (node.arguments.length === 0) { + return; + } + checkForBreakAfter(node.callee, FUNCTION_MESSAGE); + }, + + "BinaryExpression[operator='/'] > BinaryExpression[operator='/'].left"(node) { + const secondSlash = sourceCode.getTokenAfter(node, token => token.value === "/"); + const tokenAfterOperator = sourceCode.getTokenAfter(secondSlash); + + if ( + tokenAfterOperator.type === "Identifier" && + REGEX_FLAG_MATCHER.test(tokenAfterOperator.value) && + secondSlash.range[1] === tokenAfterOperator.range[0] + ) { + checkForBreakAfter(node.left, DIVISION_MESSAGE); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-unmodified-loop-condition.js b/node_modules/eslint/lib/rules/no-unmodified-loop-condition.js new file mode 100644 index 0000000..623144d --- /dev/null +++ b/node_modules/eslint/lib/rules/no-unmodified-loop-condition.js @@ -0,0 +1,368 @@ +/** + * @fileoverview Rule to disallow use of unmodified expressions in loop conditions + * @author Toru Nagashima + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const Traverser = require("../util/traverser"), + astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const pushAll = Function.apply.bind(Array.prototype.push); +const SENTINEL_PATTERN = /(?:(?:Call|Class|Function|Member|New|Yield)Expression|Statement|Declaration)$/; +const LOOP_PATTERN = /^(?:DoWhile|For|While)Statement$/; // for-in/of statements don't have `test` property. +const GROUP_PATTERN = /^(?:BinaryExpression|ConditionalExpression)$/; +const SKIP_PATTERN = /^(?:ArrowFunction|Class|Function)Expression$/; +const DYNAMIC_PATTERN = /^(?:Call|Member|New|TaggedTemplate|Yield)Expression$/; + +/** + * @typedef {Object} LoopConditionInfo + * @property {eslint-scope.Reference} reference - The reference. + * @property {ASTNode} group - BinaryExpression or ConditionalExpression nodes + * that the reference is belonging to. + * @property {Function} isInLoop - The predicate which checks a given reference + * is in this loop. + * @property {boolean} modified - The flag that the reference is modified in + * this loop. + */ + +/** + * Checks whether or not a given reference is a write reference. + * + * @param {eslint-scope.Reference} reference - A reference to check. + * @returns {boolean} `true` if the reference is a write reference. + */ +function isWriteReference(reference) { + if (reference.init) { + const def = reference.resolved && reference.resolved.defs[0]; + + if (!def || def.type !== "Variable" || def.parent.kind !== "var") { + return false; + } + } + return reference.isWrite(); +} + +/** + * Checks whether or not a given loop condition info does not have the modified + * flag. + * + * @param {LoopConditionInfo} condition - A loop condition info to check. + * @returns {boolean} `true` if the loop condition info is "unmodified". + */ +function isUnmodified(condition) { + return !condition.modified; +} + +/** + * Checks whether or not a given loop condition info does not have the modified + * flag and does not have the group this condition belongs to. + * + * @param {LoopConditionInfo} condition - A loop condition info to check. + * @returns {boolean} `true` if the loop condition info is "unmodified". + */ +function isUnmodifiedAndNotBelongToGroup(condition) { + return !(condition.modified || condition.group); +} + +/** + * Checks whether or not a given reference is inside of a given node. + * + * @param {ASTNode} node - A node to check. + * @param {eslint-scope.Reference} reference - A reference to check. + * @returns {boolean} `true` if the reference is inside of the node. + */ +function isInRange(node, reference) { + const or = node.range; + const ir = reference.identifier.range; + + return or[0] <= ir[0] && ir[1] <= or[1]; +} + +/** + * Checks whether or not a given reference is inside of a loop node's condition. + * + * @param {ASTNode} node - A node to check. + * @param {eslint-scope.Reference} reference - A reference to check. + * @returns {boolean} `true` if the reference is inside of the loop node's + * condition. + */ +const isInLoop = { + WhileStatement: isInRange, + DoWhileStatement: isInRange, + ForStatement(node, reference) { + return ( + isInRange(node, reference) && + !(node.init && isInRange(node.init, reference)) + ); + } +}; + +/** + * Gets the function which encloses a given reference. + * This supports only FunctionDeclaration. + * + * @param {eslint-scope.Reference} reference - A reference to get. + * @returns {ASTNode|null} The function node or null. + */ +function getEncloseFunctionDeclaration(reference) { + let node = reference.identifier; + + while (node) { + if (node.type === "FunctionDeclaration") { + return node.id ? node : null; + } + + node = node.parent; + } + + return null; +} + +/** + * Updates the "modified" flags of given loop conditions with given modifiers. + * + * @param {LoopConditionInfo[]} conditions - The loop conditions to be updated. + * @param {eslint-scope.Reference[]} modifiers - The references to update. + * @returns {void} + */ +function updateModifiedFlag(conditions, modifiers) { + + for (let i = 0; i < conditions.length; ++i) { + const condition = conditions[i]; + + for (let j = 0; !condition.modified && j < modifiers.length; ++j) { + const modifier = modifiers[j]; + let funcNode, funcVar; + + /* + * Besides checking for the condition being in the loop, we want to + * check the function that this modifier is belonging to is called + * in the loop. + * FIXME: This should probably be extracted to a function. + */ + const inLoop = condition.isInLoop(modifier) || Boolean( + (funcNode = getEncloseFunctionDeclaration(modifier)) && + (funcVar = astUtils.getVariableByName(modifier.from.upper, funcNode.id.name)) && + funcVar.references.some(condition.isInLoop) + ); + + condition.modified = inLoop; + } + } +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow unmodified loop conditions", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-unmodified-loop-condition" + }, + + schema: [] + }, + + create(context) { + const sourceCode = context.getSourceCode(); + let groupMap = null; + + /** + * Reports a given condition info. + * + * @param {LoopConditionInfo} condition - A loop condition info to report. + * @returns {void} + */ + function report(condition) { + const node = condition.reference.identifier; + + context.report({ + node, + message: "'{{name}}' is not modified in this loop.", + data: node + }); + } + + /** + * Registers given conditions to the group the condition belongs to. + * + * @param {LoopConditionInfo[]} conditions - A loop condition info to + * register. + * @returns {void} + */ + function registerConditionsToGroup(conditions) { + for (let i = 0; i < conditions.length; ++i) { + const condition = conditions[i]; + + if (condition.group) { + let group = groupMap.get(condition.group); + + if (!group) { + group = []; + groupMap.set(condition.group, group); + } + group.push(condition); + } + } + } + + /** + * Reports references which are inside of unmodified groups. + * + * @param {LoopConditionInfo[]} conditions - A loop condition info to report. + * @returns {void} + */ + function checkConditionsInGroup(conditions) { + if (conditions.every(isUnmodified)) { + conditions.forEach(report); + } + } + + /** + * Checks whether or not a given group node has any dynamic elements. + * + * @param {ASTNode} root - A node to check. + * This node is one of BinaryExpression or ConditionalExpression. + * @returns {boolean} `true` if the node is dynamic. + */ + function hasDynamicExpressions(root) { + let retv = false; + + Traverser.traverse(root, { + visitorKeys: sourceCode.visitorKeys, + enter(node) { + if (DYNAMIC_PATTERN.test(node.type)) { + retv = true; + this.break(); + } else if (SKIP_PATTERN.test(node.type)) { + this.skip(); + } + } + }); + + return retv; + } + + /** + * Creates the loop condition information from a given reference. + * + * @param {eslint-scope.Reference} reference - A reference to create. + * @returns {LoopConditionInfo|null} Created loop condition info, or null. + */ + function toLoopCondition(reference) { + if (reference.init) { + return null; + } + + let group = null; + let child = reference.identifier; + let node = child.parent; + + while (node) { + if (SENTINEL_PATTERN.test(node.type)) { + if (LOOP_PATTERN.test(node.type) && node.test === child) { + + // This reference is inside of a loop condition. + return { + reference, + group, + isInLoop: isInLoop[node.type].bind(null, node), + modified: false + }; + } + + // This reference is outside of a loop condition. + break; + } + + /* + * If it's inside of a group, OK if either operand is modified. + * So stores the group this reference belongs to. + */ + if (GROUP_PATTERN.test(node.type)) { + + // If this expression is dynamic, no need to check. + if (hasDynamicExpressions(node)) { + break; + } else { + group = node; + } + } + + child = node; + node = node.parent; + } + + return null; + } + + /** + * Finds unmodified references which are inside of a loop condition. + * Then reports the references which are outside of groups. + * + * @param {eslint-scope.Variable} variable - A variable to report. + * @returns {void} + */ + function checkReferences(variable) { + + // Gets references that exist in loop conditions. + const conditions = variable + .references + .map(toLoopCondition) + .filter(Boolean); + + if (conditions.length === 0) { + return; + } + + // Registers the conditions to belonging groups. + registerConditionsToGroup(conditions); + + // Check the conditions are modified. + const modifiers = variable.references.filter(isWriteReference); + + if (modifiers.length > 0) { + updateModifiedFlag(conditions, modifiers); + } + + /* + * Reports the conditions which are not belonging to groups. + * Others will be reported after all variables are done. + */ + conditions + .filter(isUnmodifiedAndNotBelongToGroup) + .forEach(report); + } + + return { + "Program:exit"() { + const queue = [context.getScope()]; + + groupMap = new Map(); + + let scope; + + while ((scope = queue.pop())) { + pushAll(queue, scope.childScopes); + scope.variables.forEach(checkReferences); + } + + groupMap.forEach(checkConditionsInGroup); + groupMap = null; + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-unneeded-ternary.js b/node_modules/eslint/lib/rules/no-unneeded-ternary.js new file mode 100644 index 0000000..7f82c8e --- /dev/null +++ b/node_modules/eslint/lib/rules/no-unneeded-ternary.js @@ -0,0 +1,156 @@ +/** + * @fileoverview Rule to flag no-unneeded-ternary + * @author Gyandeep Singh + */ + +"use strict"; + +const astUtils = require("../ast-utils"); + +// Operators that always result in a boolean value +const BOOLEAN_OPERATORS = new Set(["==", "===", "!=", "!==", ">", ">=", "<", "<=", "in", "instanceof"]); +const OPERATOR_INVERSES = { + "==": "!=", + "!=": "==", + "===": "!==", + "!==": "===" + + // Operators like < and >= are not true inverses, since both will return false with NaN. +}; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow ternary operators when simpler alternatives exist", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/no-unneeded-ternary" + }, + + schema: [ + { + type: "object", + properties: { + defaultAssignment: { + type: "boolean" + } + }, + additionalProperties: false + } + ], + + fixable: "code" + }, + + create(context) { + const options = context.options[0] || {}; + const defaultAssignment = options.defaultAssignment !== false; + const sourceCode = context.getSourceCode(); + + /** + * Test if the node is a boolean literal + * @param {ASTNode} node - The node to report. + * @returns {boolean} True if the its a boolean literal + * @private + */ + function isBooleanLiteral(node) { + return node.type === "Literal" && typeof node.value === "boolean"; + } + + /** + * Creates an expression that represents the boolean inverse of the expression represented by the original node + * @param {ASTNode} node A node representing an expression + * @returns {string} A string representing an inverted expression + */ + function invertExpression(node) { + if (node.type === "BinaryExpression" && Object.prototype.hasOwnProperty.call(OPERATOR_INVERSES, node.operator)) { + const operatorToken = sourceCode.getFirstTokenBetween( + node.left, + node.right, + token => token.value === node.operator + ); + const text = sourceCode.getText(); + + return text.slice(node.range[0], + operatorToken.range[0]) + OPERATOR_INVERSES[node.operator] + text.slice(operatorToken.range[1], node.range[1]); + } + + if (astUtils.getPrecedence(node) < astUtils.getPrecedence({ type: "UnaryExpression" })) { + return `!(${astUtils.getParenthesisedText(sourceCode, node)})`; + } + return `!${astUtils.getParenthesisedText(sourceCode, node)}`; + } + + /** + * Tests if a given node always evaluates to a boolean value + * @param {ASTNode} node - An expression node + * @returns {boolean} True if it is determined that the node will always evaluate to a boolean value + */ + function isBooleanExpression(node) { + return node.type === "BinaryExpression" && BOOLEAN_OPERATORS.has(node.operator) || + node.type === "UnaryExpression" && node.operator === "!"; + } + + /** + * Test if the node matches the pattern id ? id : expression + * @param {ASTNode} node - The ConditionalExpression to check. + * @returns {boolean} True if the pattern is matched, and false otherwise + * @private + */ + function matchesDefaultAssignment(node) { + return node.test.type === "Identifier" && + node.consequent.type === "Identifier" && + node.test.name === node.consequent.name; + } + + return { + + ConditionalExpression(node) { + if (isBooleanLiteral(node.alternate) && isBooleanLiteral(node.consequent)) { + context.report({ + node, + loc: node.consequent.loc.start, + message: "Unnecessary use of boolean literals in conditional expression.", + fix(fixer) { + if (node.consequent.value === node.alternate.value) { + + // Replace `foo ? true : true` with just `true`, but don't replace `foo() ? true : true` + return node.test.type === "Identifier" ? fixer.replaceText(node, node.consequent.value.toString()) : null; + } + if (node.alternate.value) { + + // Replace `foo() ? false : true` with `!(foo())` + return fixer.replaceText(node, invertExpression(node.test)); + } + + // Replace `foo ? true : false` with `foo` if `foo` is guaranteed to be a boolean, or `!!foo` otherwise. + + return fixer.replaceText(node, isBooleanExpression(node.test) ? astUtils.getParenthesisedText(sourceCode, node.test) : `!${invertExpression(node.test)}`); + } + }); + } else if (!defaultAssignment && matchesDefaultAssignment(node)) { + context.report({ + node, + loc: node.consequent.loc.start, + message: "Unnecessary use of conditional expression for default assignment.", + fix: fixer => { + let nodeAlternate = astUtils.getParenthesisedText(sourceCode, node.alternate); + + if (node.alternate.type === "ConditionalExpression") { + const isAlternateParenthesised = astUtils.isParenthesised(sourceCode, node.alternate); + + nodeAlternate = isAlternateParenthesised ? nodeAlternate : `(${nodeAlternate})`; + } + + return fixer.replaceText(node, `${astUtils.getParenthesisedText(sourceCode, node.test)} || ${nodeAlternate}`); + } + }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-unreachable.js b/node_modules/eslint/lib/rules/no-unreachable.js new file mode 100644 index 0000000..80d2463 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-unreachable.js @@ -0,0 +1,213 @@ +/** + * @fileoverview Checks for unreachable code due to return, throws, break, and continue. + * @author Joel Feenstra + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks whether or not a given variable declarator has the initializer. + * @param {ASTNode} node - A VariableDeclarator node to check. + * @returns {boolean} `true` if the node has the initializer. + */ +function isInitialized(node) { + return Boolean(node.init); +} + +/** + * Checks whether or not a given code path segment is unreachable. + * @param {CodePathSegment} segment - A CodePathSegment to check. + * @returns {boolean} `true` if the segment is unreachable. + */ +function isUnreachable(segment) { + return !segment.reachable; +} + +/** + * The class to distinguish consecutive unreachable statements. + */ +class ConsecutiveRange { + constructor(sourceCode) { + this.sourceCode = sourceCode; + this.startNode = null; + this.endNode = null; + } + + /** + * The location object of this range. + * @type {Object} + */ + get location() { + return { + start: this.startNode.loc.start, + end: this.endNode.loc.end + }; + } + + /** + * `true` if this range is empty. + * @type {boolean} + */ + get isEmpty() { + return !(this.startNode && this.endNode); + } + + /** + * Checks whether the given node is inside of this range. + * @param {ASTNode|Token} node - The node to check. + * @returns {boolean} `true` if the node is inside of this range. + */ + contains(node) { + return ( + node.range[0] >= this.startNode.range[0] && + node.range[1] <= this.endNode.range[1] + ); + } + + /** + * Checks whether the given node is consecutive to this range. + * @param {ASTNode} node - The node to check. + * @returns {boolean} `true` if the node is consecutive to this range. + */ + isConsecutive(node) { + return this.contains(this.sourceCode.getTokenBefore(node)); + } + + /** + * Merges the given node to this range. + * @param {ASTNode} node - The node to merge. + * @returns {void} + */ + merge(node) { + this.endNode = node; + } + + /** + * Resets this range by the given node or null. + * @param {ASTNode|null} node - The node to reset, or null. + * @returns {void} + */ + reset(node) { + this.startNode = this.endNode = node; + } +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow unreachable code after `return`, `throw`, `continue`, and `break` statements", + category: "Possible Errors", + recommended: true, + url: "https://eslint.org/docs/rules/no-unreachable" + }, + + schema: [] + }, + + create(context) { + let currentCodePath = null; + + const range = new ConsecutiveRange(context.getSourceCode()); + + /** + * Reports a given node if it's unreachable. + * @param {ASTNode} node - A statement node to report. + * @returns {void} + */ + function reportIfUnreachable(node) { + let nextNode = null; + + if (node && currentCodePath.currentSegments.every(isUnreachable)) { + + // Store this statement to distinguish consecutive statements. + if (range.isEmpty) { + range.reset(node); + return; + } + + // Skip if this statement is inside of the current range. + if (range.contains(node)) { + return; + } + + // Merge if this statement is consecutive to the current range. + if (range.isConsecutive(node)) { + range.merge(node); + return; + } + + nextNode = node; + } + + /* + * Report the current range since this statement is reachable or is + * not consecutive to the current range. + */ + if (!range.isEmpty) { + context.report({ + message: "Unreachable code.", + loc: range.location, + node: range.startNode + }); + } + + // Update the current range. + range.reset(nextNode); + } + + return { + + // Manages the current code path. + onCodePathStart(codePath) { + currentCodePath = codePath; + }, + + onCodePathEnd() { + currentCodePath = currentCodePath.upper; + }, + + // Registers for all statement nodes (excludes FunctionDeclaration). + BlockStatement: reportIfUnreachable, + BreakStatement: reportIfUnreachable, + ClassDeclaration: reportIfUnreachable, + ContinueStatement: reportIfUnreachable, + DebuggerStatement: reportIfUnreachable, + DoWhileStatement: reportIfUnreachable, + EmptyStatement: reportIfUnreachable, + ExpressionStatement: reportIfUnreachable, + ForInStatement: reportIfUnreachable, + ForOfStatement: reportIfUnreachable, + ForStatement: reportIfUnreachable, + IfStatement: reportIfUnreachable, + ImportDeclaration: reportIfUnreachable, + LabeledStatement: reportIfUnreachable, + ReturnStatement: reportIfUnreachable, + SwitchStatement: reportIfUnreachable, + ThrowStatement: reportIfUnreachable, + TryStatement: reportIfUnreachable, + + VariableDeclaration(node) { + if (node.kind !== "var" || node.declarations.some(isInitialized)) { + reportIfUnreachable(node); + } + }, + + WhileStatement: reportIfUnreachable, + WithStatement: reportIfUnreachable, + ExportNamedDeclaration: reportIfUnreachable, + ExportDefaultDeclaration: reportIfUnreachable, + ExportAllDeclaration: reportIfUnreachable, + + "Program:exit"() { + reportIfUnreachable(); + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-unsafe-finally.js b/node_modules/eslint/lib/rules/no-unsafe-finally.js new file mode 100644 index 0000000..ebef051 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-unsafe-finally.js @@ -0,0 +1,105 @@ +/** + * @fileoverview Rule to flag unsafe statements in finally block + * @author Onur Temizkan + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const SENTINEL_NODE_TYPE_RETURN_THROW = /^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression)$/; +const SENTINEL_NODE_TYPE_BREAK = /^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|DoWhileStatement|WhileStatement|ForOfStatement|ForInStatement|ForStatement|SwitchStatement)$/; +const SENTINEL_NODE_TYPE_CONTINUE = /^(?:Program|(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|DoWhileStatement|WhileStatement|ForOfStatement|ForInStatement|ForStatement)$/; + + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow control flow statements in `finally` blocks", + category: "Possible Errors", + recommended: true, + url: "https://eslint.org/docs/rules/no-unsafe-finally" + }, + + schema: [] + }, + create(context) { + + /** + * Checks if the node is the finalizer of a TryStatement + * + * @param {ASTNode} node - node to check. + * @returns {boolean} - true if the node is the finalizer of a TryStatement + */ + function isFinallyBlock(node) { + return node.parent.type === "TryStatement" && node.parent.finalizer === node; + } + + /** + * Climbs up the tree if the node is not a sentinel node + * + * @param {ASTNode} node - node to check. + * @param {string} label - label of the break or continue statement + * @returns {boolean} - return whether the node is a finally block or a sentinel node + */ + function isInFinallyBlock(node, label) { + let labelInside = false; + let sentinelNodeType; + + if (node.type === "BreakStatement" && !node.label) { + sentinelNodeType = SENTINEL_NODE_TYPE_BREAK; + } else if (node.type === "ContinueStatement") { + sentinelNodeType = SENTINEL_NODE_TYPE_CONTINUE; + } else { + sentinelNodeType = SENTINEL_NODE_TYPE_RETURN_THROW; + } + + while (node && !sentinelNodeType.test(node.type)) { + if (node.parent.label && label && (node.parent.label.name === label.name)) { + labelInside = true; + } + if (isFinallyBlock(node)) { + if (label && labelInside) { + return false; + } + return true; + } + node = node.parent; + } + return false; + } + + /** + * Checks whether the possibly-unsafe statement is inside a finally block. + * + * @param {ASTNode} node - node to check. + * @returns {void} + */ + function check(node) { + if (isInFinallyBlock(node, node.label)) { + context.report({ + message: "Unsafe usage of {{nodeType}}.", + data: { + nodeType: node.type + }, + node, + line: node.loc.line, + column: node.loc.column + }); + } + } + + return { + ReturnStatement: check, + ThrowStatement: check, + BreakStatement: check, + ContinueStatement: check + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-unsafe-negation.js b/node_modules/eslint/lib/rules/no-unsafe-negation.js new file mode 100644 index 0000000..5dc39f1 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-unsafe-negation.js @@ -0,0 +1,81 @@ +/** + * @fileoverview Rule to disallow negating the left operand of relational operators + * @author Toru Nagashima + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks whether the given operator is a relational operator or not. + * + * @param {string} op - The operator type to check. + * @returns {boolean} `true` if the operator is a relational operator. + */ +function isRelationalOperator(op) { + return op === "in" || op === "instanceof"; +} + +/** + * Checks whether the given node is a logical negation expression or not. + * + * @param {ASTNode} node - The node to check. + * @returns {boolean} `true` if the node is a logical negation expression. + */ +function isNegation(node) { + return node.type === "UnaryExpression" && node.operator === "!"; +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow negating the left operand of relational operators", + category: "Possible Errors", + recommended: true, + url: "https://eslint.org/docs/rules/no-unsafe-negation" + }, + schema: [], + fixable: "code" + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + return { + BinaryExpression(node) { + if (isRelationalOperator(node.operator) && + isNegation(node.left) && + !astUtils.isParenthesised(sourceCode, node.left) + ) { + context.report({ + node, + loc: node.left.loc, + message: "Unexpected negating the left operand of '{{operator}}' operator.", + data: node, + + fix(fixer) { + const negationToken = sourceCode.getFirstToken(node.left); + const fixRange = [negationToken.range[1], node.range[1]]; + const text = sourceCode.text.slice(fixRange[0], fixRange[1]); + + return fixer.replaceTextRange(fixRange, `(${text})`); + } + }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-unused-expressions.js b/node_modules/eslint/lib/rules/no-unused-expressions.js new file mode 100644 index 0000000..fedfac1 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-unused-expressions.js @@ -0,0 +1,127 @@ +/** + * @fileoverview Flag expressions in statement position that do not side effect + * @author Michael Ficarra + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow unused expressions", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-unused-expressions" + }, + + schema: [ + { + type: "object", + properties: { + allowShortCircuit: { + type: "boolean" + }, + allowTernary: { + type: "boolean" + }, + allowTaggedTemplates: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + const config = context.options[0] || {}, + allowShortCircuit = config.allowShortCircuit || false, + allowTernary = config.allowTernary || false, + allowTaggedTemplates = config.allowTaggedTemplates || false; + + /** + * @param {ASTNode} node - any node + * @returns {boolean} whether the given node structurally represents a directive + */ + function looksLikeDirective(node) { + return node.type === "ExpressionStatement" && + node.expression.type === "Literal" && typeof node.expression.value === "string"; + } + + /** + * @param {Function} predicate - ([a] -> Boolean) the function used to make the determination + * @param {a[]} list - the input list + * @returns {a[]} the leading sequence of members in the given list that pass the given predicate + */ + function takeWhile(predicate, list) { + for (let i = 0; i < list.length; ++i) { + if (!predicate(list[i])) { + return list.slice(0, i); + } + } + return list.slice(); + } + + /** + * @param {ASTNode} node - a Program or BlockStatement node + * @returns {ASTNode[]} the leading sequence of directive nodes in the given node's body + */ + function directives(node) { + return takeWhile(looksLikeDirective, node.body); + } + + /** + * @param {ASTNode} node - any node + * @param {ASTNode[]} ancestors - the given node's ancestors + * @returns {boolean} whether the given node is considered a directive in its current position + */ + function isDirective(node, ancestors) { + const parent = ancestors[ancestors.length - 1], + grandparent = ancestors[ancestors.length - 2]; + + return (parent.type === "Program" || parent.type === "BlockStatement" && + (/Function/.test(grandparent.type))) && + directives(parent).indexOf(node) >= 0; + } + + /** + * Determines whether or not a given node is a valid expression. Recurses on short circuit eval and ternary nodes if enabled by flags. + * @param {ASTNode} node - any node + * @returns {boolean} whether the given node is a valid expression + */ + function isValidExpression(node) { + if (allowTernary) { + + // Recursive check for ternary and logical expressions + if (node.type === "ConditionalExpression") { + return isValidExpression(node.consequent) && isValidExpression(node.alternate); + } + } + + if (allowShortCircuit) { + if (node.type === "LogicalExpression") { + return isValidExpression(node.right); + } + } + + if (allowTaggedTemplates && node.type === "TaggedTemplateExpression") { + return true; + } + + return /^(?:Assignment|Call|New|Update|Yield|Await)Expression$/.test(node.type) || + (node.type === "UnaryExpression" && ["delete", "void"].indexOf(node.operator) >= 0); + } + + return { + ExpressionStatement(node) { + if (!isValidExpression(node.expression) && !isDirective(node, context.getAncestors())) { + context.report({ node, message: "Expected an assignment or function call and instead saw an expression." }); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-unused-labels.js b/node_modules/eslint/lib/rules/no-unused-labels.js new file mode 100644 index 0000000..3e1dcb6 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-unused-labels.js @@ -0,0 +1,107 @@ +/** + * @fileoverview Rule to disallow unused labels. + * @author Toru Nagashima + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow unused labels", + category: "Best Practices", + recommended: true, + url: "https://eslint.org/docs/rules/no-unused-labels" + }, + + schema: [], + + fixable: "code" + }, + + create(context) { + const sourceCode = context.getSourceCode(); + let scopeInfo = null; + + /** + * Adds a scope info to the stack. + * + * @param {ASTNode} node - A node to add. This is a LabeledStatement. + * @returns {void} + */ + function enterLabeledScope(node) { + scopeInfo = { + label: node.label.name, + used: false, + upper: scopeInfo + }; + } + + /** + * Removes the top of the stack. + * At the same time, this reports the label if it's never used. + * + * @param {ASTNode} node - A node to report. This is a LabeledStatement. + * @returns {void} + */ + function exitLabeledScope(node) { + if (!scopeInfo.used) { + context.report({ + node: node.label, + message: "'{{name}}:' is defined but never used.", + data: node.label, + fix(fixer) { + + /* + * Only perform a fix if there are no comments between the label and the body. This will be the case + * when there is exactly one token/comment (the ":") between the label and the body. + */ + if (sourceCode.getTokenAfter(node.label, { includeComments: true }) === + sourceCode.getTokenBefore(node.body, { includeComments: true })) { + return fixer.removeRange([node.range[0], node.body.range[0]]); + } + + return null; + } + }); + } + + scopeInfo = scopeInfo.upper; + } + + /** + * Marks the label of a given node as used. + * + * @param {ASTNode} node - A node to mark. This is a BreakStatement or + * ContinueStatement. + * @returns {void} + */ + function markAsUsed(node) { + if (!node.label) { + return; + } + + const label = node.label.name; + let info = scopeInfo; + + while (info) { + if (info.label === label) { + info.used = true; + break; + } + info = info.upper; + } + } + + return { + LabeledStatement: enterLabeledScope, + "LabeledStatement:exit": exitLabeledScope, + BreakStatement: markAsUsed, + ContinueStatement: markAsUsed + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-unused-vars.js b/node_modules/eslint/lib/rules/no-unused-vars.js new file mode 100644 index 0000000..6ba5734 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-unused-vars.js @@ -0,0 +1,643 @@ +/** + * @fileoverview Rule to flag declared but unused variables + * @author Ilya Volodin + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const lodash = require("lodash"); +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow unused variables", + category: "Variables", + recommended: true, + url: "https://eslint.org/docs/rules/no-unused-vars" + }, + + schema: [ + { + oneOf: [ + { + enum: ["all", "local"] + }, + { + type: "object", + properties: { + vars: { + enum: ["all", "local"] + }, + varsIgnorePattern: { + type: "string" + }, + args: { + enum: ["all", "after-used", "none"] + }, + ignoreRestSiblings: { + type: "boolean" + }, + argsIgnorePattern: { + type: "string" + }, + caughtErrors: { + enum: ["all", "none"] + }, + caughtErrorsIgnorePattern: { + type: "string" + } + } + } + ] + } + ] + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + const REST_PROPERTY_TYPE = /^(?:RestElement|(?:Experimental)?RestProperty)$/; + + const config = { + vars: "all", + args: "after-used", + ignoreRestSiblings: false, + caughtErrors: "none" + }; + + const firstOption = context.options[0]; + + if (firstOption) { + if (typeof firstOption === "string") { + config.vars = firstOption; + } else { + config.vars = firstOption.vars || config.vars; + config.args = firstOption.args || config.args; + config.ignoreRestSiblings = firstOption.ignoreRestSiblings || config.ignoreRestSiblings; + config.caughtErrors = firstOption.caughtErrors || config.caughtErrors; + + if (firstOption.varsIgnorePattern) { + config.varsIgnorePattern = new RegExp(firstOption.varsIgnorePattern); + } + + if (firstOption.argsIgnorePattern) { + config.argsIgnorePattern = new RegExp(firstOption.argsIgnorePattern); + } + + if (firstOption.caughtErrorsIgnorePattern) { + config.caughtErrorsIgnorePattern = new RegExp(firstOption.caughtErrorsIgnorePattern); + } + } + } + + /** + * Generate the warning message about the variable being + * defined and unused, including the ignore pattern if configured. + * @param {Variable} unusedVar - eslint-scope variable object. + * @returns {string} The warning message to be used with this unused variable. + */ + function getDefinedMessage(unusedVar) { + const defType = unusedVar.defs && unusedVar.defs[0] && unusedVar.defs[0].type; + let type; + let pattern; + + if (defType === "CatchClause" && config.caughtErrorsIgnorePattern) { + type = "args"; + pattern = config.caughtErrorsIgnorePattern.toString(); + } else if (defType === "Parameter" && config.argsIgnorePattern) { + type = "args"; + pattern = config.argsIgnorePattern.toString(); + } else if (defType !== "Parameter" && config.varsIgnorePattern) { + type = "vars"; + pattern = config.varsIgnorePattern.toString(); + } + + const additional = type ? ` Allowed unused ${type} must match ${pattern}.` : ""; + + return `'{{name}}' is defined but never used.${additional}`; + } + + /** + * Generate the warning message about the variable being + * assigned and unused, including the ignore pattern if configured. + * @returns {string} The warning message to be used with this unused variable. + */ + function getAssignedMessage() { + const additional = config.varsIgnorePattern ? ` Allowed unused vars must match ${config.varsIgnorePattern.toString()}.` : ""; + + return `'{{name}}' is assigned a value but never used.${additional}`; + } + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + const STATEMENT_TYPE = /(?:Statement|Declaration)$/; + + /** + * Determines if a given variable is being exported from a module. + * @param {Variable} variable - eslint-scope variable object. + * @returns {boolean} True if the variable is exported, false if not. + * @private + */ + function isExported(variable) { + + const definition = variable.defs[0]; + + if (definition) { + + let node = definition.node; + + if (node.type === "VariableDeclarator") { + node = node.parent; + } else if (definition.type === "Parameter") { + return false; + } + + return node.parent.type.indexOf("Export") === 0; + } + return false; + + } + + /** + * Determines if a variable has a sibling rest property + * @param {Variable} variable - eslint-scope variable object. + * @returns {boolean} True if the variable is exported, false if not. + * @private + */ + function hasRestSpreadSibling(variable) { + if (config.ignoreRestSiblings) { + return variable.defs.some(def => { + const propertyNode = def.name.parent; + const patternNode = propertyNode.parent; + + return ( + propertyNode.type === "Property" && + patternNode.type === "ObjectPattern" && + REST_PROPERTY_TYPE.test(patternNode.properties[patternNode.properties.length - 1].type) + ); + }); + } + + return false; + } + + /** + * Determines if a reference is a read operation. + * @param {Reference} ref - An eslint-scope Reference + * @returns {boolean} whether the given reference represents a read operation + * @private + */ + function isReadRef(ref) { + return ref.isRead(); + } + + /** + * Determine if an identifier is referencing an enclosing function name. + * @param {Reference} ref - The reference to check. + * @param {ASTNode[]} nodes - The candidate function nodes. + * @returns {boolean} True if it's a self-reference, false if not. + * @private + */ + function isSelfReference(ref, nodes) { + let scope = ref.from; + + while (scope) { + if (nodes.indexOf(scope.block) >= 0) { + return true; + } + + scope = scope.upper; + } + + return false; + } + + /** + * Checks the position of given nodes. + * + * @param {ASTNode} inner - A node which is expected as inside. + * @param {ASTNode} outer - A node which is expected as outside. + * @returns {boolean} `true` if the `inner` node exists in the `outer` node. + * @private + */ + function isInside(inner, outer) { + return ( + inner.range[0] >= outer.range[0] && + inner.range[1] <= outer.range[1] + ); + } + + /** + * If a given reference is left-hand side of an assignment, this gets + * the right-hand side node of the assignment. + * + * In the following cases, this returns null. + * + * - The reference is not the LHS of an assignment expression. + * - The reference is inside of a loop. + * - The reference is inside of a function scope which is different from + * the declaration. + * + * @param {eslint-scope.Reference} ref - A reference to check. + * @param {ASTNode} prevRhsNode - The previous RHS node. + * @returns {ASTNode|null} The RHS node or null. + * @private + */ + function getRhsNode(ref, prevRhsNode) { + const id = ref.identifier; + const parent = id.parent; + const granpa = parent.parent; + const refScope = ref.from.variableScope; + const varScope = ref.resolved.scope.variableScope; + const canBeUsedLater = refScope !== varScope || astUtils.isInLoop(id); + + /* + * Inherits the previous node if this reference is in the node. + * This is for `a = a + a`-like code. + */ + if (prevRhsNode && isInside(id, prevRhsNode)) { + return prevRhsNode; + } + + if (parent.type === "AssignmentExpression" && + granpa.type === "ExpressionStatement" && + id === parent.left && + !canBeUsedLater + ) { + return parent.right; + } + return null; + } + + /** + * Checks whether a given function node is stored to somewhere or not. + * If the function node is stored, the function can be used later. + * + * @param {ASTNode} funcNode - A function node to check. + * @param {ASTNode} rhsNode - The RHS node of the previous assignment. + * @returns {boolean} `true` if under the following conditions: + * - the funcNode is assigned to a variable. + * - the funcNode is bound as an argument of a function call. + * - the function is bound to a property and the object satisfies above conditions. + * @private + */ + function isStorableFunction(funcNode, rhsNode) { + let node = funcNode; + let parent = funcNode.parent; + + while (parent && isInside(parent, rhsNode)) { + switch (parent.type) { + case "SequenceExpression": + if (parent.expressions[parent.expressions.length - 1] !== node) { + return false; + } + break; + + case "CallExpression": + case "NewExpression": + return parent.callee !== node; + + case "AssignmentExpression": + case "TaggedTemplateExpression": + case "YieldExpression": + return true; + + default: + if (STATEMENT_TYPE.test(parent.type)) { + + /* + * If it encountered statements, this is a complex pattern. + * Since analyzeing complex patterns is hard, this returns `true` to avoid false positive. + */ + return true; + } + } + + node = parent; + parent = parent.parent; + } + + return false; + } + + /** + * Checks whether a given Identifier node exists inside of a function node which can be used later. + * + * "can be used later" means: + * - the function is assigned to a variable. + * - the function is bound to a property and the object can be used later. + * - the function is bound as an argument of a function call. + * + * If a reference exists in a function which can be used later, the reference is read when the function is called. + * + * @param {ASTNode} id - An Identifier node to check. + * @param {ASTNode} rhsNode - The RHS node of the previous assignment. + * @returns {boolean} `true` if the `id` node exists inside of a function node which can be used later. + * @private + */ + function isInsideOfStorableFunction(id, rhsNode) { + const funcNode = astUtils.getUpperFunction(id); + + return ( + funcNode && + isInside(funcNode, rhsNode) && + isStorableFunction(funcNode, rhsNode) + ); + } + + /** + * Checks whether a given reference is a read to update itself or not. + * + * @param {eslint-scope.Reference} ref - A reference to check. + * @param {ASTNode} rhsNode - The RHS node of the previous assignment. + * @returns {boolean} The reference is a read to update itself. + * @private + */ + function isReadForItself(ref, rhsNode) { + const id = ref.identifier; + const parent = id.parent; + const granpa = parent.parent; + + return ref.isRead() && ( + + // self update. e.g. `a += 1`, `a++` + ( + parent.type === "AssignmentExpression" && + granpa.type === "ExpressionStatement" && + parent.left === id + ) || + ( + parent.type === "UpdateExpression" && + granpa.type === "ExpressionStatement" + ) || + + // in RHS of an assignment for itself. e.g. `a = a + 1` + ( + rhsNode && + isInside(id, rhsNode) && + !isInsideOfStorableFunction(id, rhsNode) + ) + ); + } + + /** + * Determine if an identifier is used either in for-in loops. + * + * @param {Reference} ref - The reference to check. + * @returns {boolean} whether reference is used in the for-in loops + * @private + */ + function isForInRef(ref) { + let target = ref.identifier.parent; + + + // "for (var ...) { return; }" + if (target.type === "VariableDeclarator") { + target = target.parent.parent; + } + + if (target.type !== "ForInStatement") { + return false; + } + + // "for (...) { return; }" + if (target.body.type === "BlockStatement") { + target = target.body.body[0]; + + // "for (...) return;" + } else { + target = target.body; + } + + // For empty loop body + if (!target) { + return false; + } + + return target.type === "ReturnStatement"; + } + + /** + * Determines if the variable is used. + * @param {Variable} variable - The variable to check. + * @returns {boolean} True if the variable is used + * @private + */ + function isUsedVariable(variable) { + const functionNodes = variable.defs.filter(def => def.type === "FunctionName").map(def => def.node), + isFunctionDefinition = functionNodes.length > 0; + let rhsNode = null; + + return variable.references.some(ref => { + if (isForInRef(ref)) { + return true; + } + + const forItself = isReadForItself(ref, rhsNode); + + rhsNode = getRhsNode(ref, rhsNode); + + return ( + isReadRef(ref) && + !forItself && + !(isFunctionDefinition && isSelfReference(ref, functionNodes)) + ); + }); + } + + /** + * Checks whether the given variable is the last parameter in the non-ignored parameters. + * + * @param {eslint-scope.Variable} variable - The variable to check. + * @returns {boolean} `true` if the variable is the last. + */ + function isLastInNonIgnoredParameters(variable) { + const def = variable.defs[0]; + + // This is the last. + if (def.index === def.node.params.length - 1) { + return true; + } + + // if all parameters preceded by this variable are ignored and unused, this is the last. + if (config.argsIgnorePattern) { + const params = context.getDeclaredVariables(def.node); + const posteriorParams = params.slice(params.indexOf(variable) + 1); + + if (posteriorParams.every(v => v.references.length === 0 && config.argsIgnorePattern.test(v.name))) { + return true; + } + } + + return false; + } + + /** + * Gets an array of variables without read references. + * @param {Scope} scope - an eslint-scope Scope object. + * @param {Variable[]} unusedVars - an array that saving result. + * @returns {Variable[]} unused variables of the scope and descendant scopes. + * @private + */ + function collectUnusedVariables(scope, unusedVars) { + const variables = scope.variables; + const childScopes = scope.childScopes; + let i, l; + + if (scope.type !== "TDZ" && (scope.type !== "global" || config.vars === "all")) { + for (i = 0, l = variables.length; i < l; ++i) { + const variable = variables[i]; + + // skip a variable of class itself name in the class scope + if (scope.type === "class" && scope.block.id === variable.identifiers[0]) { + continue; + } + + // skip function expression names and variables marked with markVariableAsUsed() + if (scope.functionExpressionScope || variable.eslintUsed) { + continue; + } + + // skip implicit "arguments" variable + if (scope.type === "function" && variable.name === "arguments" && variable.identifiers.length === 0) { + continue; + } + + // explicit global variables don't have definitions. + const def = variable.defs[0]; + + if (def) { + const type = def.type; + + // skip catch variables + if (type === "CatchClause") { + if (config.caughtErrors === "none") { + continue; + } + + // skip ignored parameters + if (config.caughtErrorsIgnorePattern && config.caughtErrorsIgnorePattern.test(def.name.name)) { + continue; + } + } + + if (type === "Parameter") { + + // skip any setter argument + if ((def.node.parent.type === "Property" || def.node.parent.type === "MethodDefinition") && def.node.parent.kind === "set") { + continue; + } + + // if "args" option is "none", skip any parameter + if (config.args === "none") { + continue; + } + + // skip ignored parameters + if (config.argsIgnorePattern && config.argsIgnorePattern.test(def.name.name)) { + continue; + } + + // if "args" option is "after-used", skip all but the last parameter + if (config.args === "after-used" && astUtils.isFunction(def.name.parent) && !isLastInNonIgnoredParameters(variable)) { + continue; + } + } else { + + // skip ignored variables + if (config.varsIgnorePattern && config.varsIgnorePattern.test(def.name.name)) { + continue; + } + } + } + + if (!isUsedVariable(variable) && !isExported(variable) && !hasRestSpreadSibling(variable)) { + unusedVars.push(variable); + } + } + } + + for (i = 0, l = childScopes.length; i < l; ++i) { + collectUnusedVariables(childScopes[i], unusedVars); + } + + return unusedVars; + } + + /** + * Gets the index of a given variable name in a given comment. + * @param {eslint-scope.Variable} variable - A variable to get. + * @param {ASTNode} comment - A comment node which includes the variable name. + * @returns {number} The index of the variable name's location. + * @private + */ + function getColumnInComment(variable, comment) { + const namePattern = new RegExp(`[\\s,]${lodash.escapeRegExp(variable.name)}(?:$|[\\s,:])`, "g"); + + // To ignore the first text "global". + namePattern.lastIndex = comment.value.indexOf("global") + 6; + + // Search a given variable name. + const match = namePattern.exec(comment.value); + + return match ? match.index + 1 : 0; + } + + /** + * Creates the correct location of a given variables. + * The location is at its name string in a `/*global` comment. + * + * @param {eslint-scope.Variable} variable - A variable to get its location. + * @returns {{line: number, column: number}} The location object for the variable. + * @private + */ + function getLocation(variable) { + const comment = variable.eslintExplicitGlobalComment; + + return sourceCode.getLocFromIndex(comment.range[0] + 2 + getColumnInComment(variable, comment)); + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + "Program:exit"(programNode) { + const unusedVars = collectUnusedVariables(context.getScope(), []); + + for (let i = 0, l = unusedVars.length; i < l; ++i) { + const unusedVar = unusedVars[i]; + + if (unusedVar.eslintExplicitGlobal) { + context.report({ + node: programNode, + loc: getLocation(unusedVar), + message: getDefinedMessage(unusedVar), + data: unusedVar + }); + } else if (unusedVar.defs.length > 0) { + context.report({ + node: unusedVar.identifiers[0], + message: unusedVar.references.some(ref => ref.isWrite()) + ? getAssignedMessage() + : getDefinedMessage(unusedVar), + data: unusedVar + }); + } + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-use-before-define.js b/node_modules/eslint/lib/rules/no-use-before-define.js new file mode 100644 index 0000000..37b8e11 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-use-before-define.js @@ -0,0 +1,267 @@ +/** + * @fileoverview Rule to flag use of variables before they are defined + * @author Ilya Volodin + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const SENTINEL_TYPE = /^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/; +const FOR_IN_OF_TYPE = /^For(?:In|Of)Statement$/; + +/** + * Parses a given value as options. + * + * @param {any} options - A value to parse. + * @returns {Object} The parsed options. + */ +function parseOptions(options) { + let functions = true; + let classes = true; + let variables = true; + + if (typeof options === "string") { + functions = (options !== "nofunc"); + } else if (typeof options === "object" && options !== null) { + functions = options.functions !== false; + classes = options.classes !== false; + variables = options.variables !== false; + } + + return { functions, classes, variables }; +} + +/** + * Checks whether or not a given variable is a function declaration. + * + * @param {eslint-scope.Variable} variable - A variable to check. + * @returns {boolean} `true` if the variable is a function declaration. + */ +function isFunction(variable) { + return variable.defs[0].type === "FunctionName"; +} + +/** + * Checks whether or not a given variable is a class declaration in an upper function scope. + * + * @param {eslint-scope.Variable} variable - A variable to check. + * @param {eslint-scope.Reference} reference - A reference to check. + * @returns {boolean} `true` if the variable is a class declaration. + */ +function isOuterClass(variable, reference) { + return ( + variable.defs[0].type === "ClassName" && + variable.scope.variableScope !== reference.from.variableScope + ); +} + +/** + * Checks whether or not a given variable is a variable declaration in an upper function scope. + * @param {eslint-scope.Variable} variable - A variable to check. + * @param {eslint-scope.Reference} reference - A reference to check. + * @returns {boolean} `true` if the variable is a variable declaration. + */ +function isOuterVariable(variable, reference) { + return ( + variable.defs[0].type === "Variable" && + variable.scope.variableScope !== reference.from.variableScope + ); +} + +/** + * Checks whether or not a given location is inside of the range of a given node. + * + * @param {ASTNode} node - An node to check. + * @param {number} location - A location to check. + * @returns {boolean} `true` if the location is inside of the range of the node. + */ +function isInRange(node, location) { + return node && node.range[0] <= location && location <= node.range[1]; +} + +/** + * Checks whether or not a given reference is inside of the initializers of a given variable. + * + * This returns `true` in the following cases: + * + * var a = a + * var [a = a] = list + * var {a = a} = obj + * for (var a in a) {} + * for (var a of a) {} + * + * @param {Variable} variable - A variable to check. + * @param {Reference} reference - A reference to check. + * @returns {boolean} `true` if the reference is inside of the initializers. + */ +function isInInitializer(variable, reference) { + if (variable.scope !== reference.from) { + return false; + } + + let node = variable.identifiers[0].parent; + const location = reference.identifier.range[1]; + + while (node) { + if (node.type === "VariableDeclarator") { + if (isInRange(node.init, location)) { + return true; + } + if (FOR_IN_OF_TYPE.test(node.parent.parent.type) && + isInRange(node.parent.parent.right, location) + ) { + return true; + } + break; + } else if (node.type === "AssignmentPattern") { + if (isInRange(node.right, location)) { + return true; + } + } else if (SENTINEL_TYPE.test(node.type)) { + break; + } + + node = node.parent; + } + + return false; +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow the use of variables before they are defined", + category: "Variables", + recommended: false, + url: "https://eslint.org/docs/rules/no-use-before-define" + }, + + schema: [ + { + oneOf: [ + { + enum: ["nofunc"] + }, + { + type: "object", + properties: { + functions: { type: "boolean" }, + classes: { type: "boolean" }, + variables: { type: "boolean" } + }, + additionalProperties: false + } + ] + } + ] + }, + + create(context) { + const options = parseOptions(context.options[0]); + + /** + * Determines whether a given use-before-define case should be reported according to the options. + * @param {eslint-scope.Variable} variable The variable that gets used before being defined + * @param {eslint-scope.Reference} reference The reference to the variable + * @returns {boolean} `true` if the usage should be reported + */ + function isForbidden(variable, reference) { + if (isFunction(variable)) { + return options.functions; + } + if (isOuterClass(variable, reference)) { + return options.classes; + } + if (isOuterVariable(variable, reference)) { + return options.variables; + } + return true; + } + + /** + * Finds and validates all variables in a given scope. + * @param {Scope} scope The scope object. + * @returns {void} + * @private + */ + function findVariablesInScope(scope) { + scope.references.forEach(reference => { + const variable = reference.resolved; + + /* + * Skips when the reference is: + * - initialization's. + * - referring to an undefined variable. + * - referring to a global environment variable (there're no identifiers). + * - located preceded by the variable (except in initializers). + * - allowed by options. + */ + if (reference.init || + !variable || + variable.identifiers.length === 0 || + (variable.identifiers[0].range[1] < reference.identifier.range[1] && !isInInitializer(variable, reference)) || + !isForbidden(variable, reference) + ) { + return; + } + + // Reports. + context.report({ + node: reference.identifier, + message: "'{{name}}' was used before it was defined.", + data: reference.identifier + }); + }); + } + + /** + * Validates variables inside of a node's scope. + * @param {ASTNode} node The node to check. + * @returns {void} + * @private + */ + function findVariables() { + const scope = context.getScope(); + + findVariablesInScope(scope); + } + + const ruleDefinition = { + "Program:exit"(node) { + const scope = context.getScope(), + ecmaFeatures = context.parserOptions.ecmaFeatures || {}; + + findVariablesInScope(scope); + + // both Node.js and Modules have an extra scope + if (ecmaFeatures.globalReturn || node.sourceType === "module") { + findVariablesInScope(scope.childScopes[0]); + } + } + }; + + if (context.parserOptions.ecmaVersion >= 6) { + ruleDefinition["BlockStatement:exit"] = + ruleDefinition["SwitchStatement:exit"] = findVariables; + + ruleDefinition["ArrowFunctionExpression:exit"] = function(node) { + if (node.body.type !== "BlockStatement") { + findVariables(); + } + }; + } else { + ruleDefinition["FunctionExpression:exit"] = + ruleDefinition["FunctionDeclaration:exit"] = + ruleDefinition["ArrowFunctionExpression:exit"] = findVariables; + } + + return ruleDefinition; + } +}; diff --git a/node_modules/eslint/lib/rules/no-useless-call.js b/node_modules/eslint/lib/rules/no-useless-call.js new file mode 100644 index 0000000..925c9f7 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-useless-call.js @@ -0,0 +1,81 @@ +/** + * @fileoverview A rule to disallow unnecessary `.call()` and `.apply()`. + * @author Toru Nagashima + */ + +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks whether or not a node is a `.call()`/`.apply()`. + * @param {ASTNode} node - A CallExpression node to check. + * @returns {boolean} Whether or not the node is a `.call()`/`.apply()`. + */ +function isCallOrNonVariadicApply(node) { + return ( + node.callee.type === "MemberExpression" && + node.callee.property.type === "Identifier" && + node.callee.computed === false && + ( + (node.callee.property.name === "call" && node.arguments.length >= 1) || + (node.callee.property.name === "apply" && node.arguments.length === 2 && node.arguments[1].type === "ArrayExpression") + ) + ); +} + + +/** + * Checks whether or not `thisArg` is not changed by `.call()`/`.apply()`. + * @param {ASTNode|null} expectedThis - The node that is the owner of the applied function. + * @param {ASTNode} thisArg - The node that is given to the first argument of the `.call()`/`.apply()`. + * @param {SourceCode} sourceCode - The ESLint source code object. + * @returns {boolean} Whether or not `thisArg` is not changed by `.call()`/`.apply()`. + */ +function isValidThisArg(expectedThis, thisArg, sourceCode) { + if (!expectedThis) { + return astUtils.isNullOrUndefined(thisArg); + } + return astUtils.equalTokens(expectedThis, thisArg, sourceCode); +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow unnecessary calls to `.call()` and `.apply()`", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-useless-call" + }, + + schema: [] + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + return { + CallExpression(node) { + if (!isCallOrNonVariadicApply(node)) { + return; + } + + const applied = node.callee.object; + const expectedThis = (applied.type === "MemberExpression") ? applied.object : null; + const thisArg = node.arguments[0]; + + if (isValidThisArg(expectedThis, thisArg, sourceCode)) { + context.report({ node, message: "unnecessary '.{{name}}()'.", data: { name: node.callee.property.name } }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-useless-computed-key.js b/node_modules/eslint/lib/rules/no-useless-computed-key.js new file mode 100644 index 0000000..0757307 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-useless-computed-key.js @@ -0,0 +1,76 @@ +/** + * @fileoverview Rule to disallow unnecessary computed property keys in object literals + * @author Burak Yigit Kaya + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +const MESSAGE_UNNECESSARY_COMPUTED = "Unnecessarily computed property [{{property}}] found."; + +module.exports = { + meta: { + docs: { + description: "disallow unnecessary computed property keys in object literals", + category: "ECMAScript 6", + recommended: false, + url: "https://eslint.org/docs/rules/no-useless-computed-key" + }, + + schema: [], + + fixable: "code" + }, + create(context) { + const sourceCode = context.getSourceCode(); + + return { + Property(node) { + if (!node.computed) { + return; + } + + const key = node.key, + nodeType = typeof key.value; + + if (key.type === "Literal" && (nodeType === "string" || nodeType === "number") && key.value !== "__proto__") { + context.report({ + node, + message: MESSAGE_UNNECESSARY_COMPUTED, + data: { property: sourceCode.getText(key) }, + fix(fixer) { + const leftSquareBracket = sourceCode.getFirstToken(node, astUtils.isOpeningBracketToken); + const rightSquareBracket = sourceCode.getFirstTokenBetween(node.key, node.value, astUtils.isClosingBracketToken); + const tokensBetween = sourceCode.getTokensBetween(leftSquareBracket, rightSquareBracket, 1); + + if (tokensBetween.slice(0, -1).some((token, index) => + sourceCode.getText().slice(token.range[1], tokensBetween[index + 1].range[0]).trim())) { + + // If there are comments between the brackets and the property name, don't do a fix. + return null; + } + + const tokenBeforeLeftBracket = sourceCode.getTokenBefore(leftSquareBracket); + + // Insert a space before the key to avoid changing identifiers, e.g. ({ get[2]() {} }) to ({ get2() {} }) + const needsSpaceBeforeKey = tokenBeforeLeftBracket.range[1] === leftSquareBracket.range[0] && + !astUtils.canTokensBeAdjacent(tokenBeforeLeftBracket, sourceCode.getFirstToken(key)); + + const replacementKey = (needsSpaceBeforeKey ? " " : "") + key.raw; + + return fixer.replaceTextRange([leftSquareBracket.range[0], rightSquareBracket.range[1]], replacementKey); + } + }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-useless-concat.js b/node_modules/eslint/lib/rules/no-useless-concat.js new file mode 100644 index 0000000..a9ac786 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-useless-concat.js @@ -0,0 +1,109 @@ +/** + * @fileoverview disallow unncessary concatenation of template strings + * @author Henry Zhu + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks whether or not a given node is a concatenation. + * @param {ASTNode} node - A node to check. + * @returns {boolean} `true` if the node is a concatenation. + */ +function isConcatenation(node) { + return node.type === "BinaryExpression" && node.operator === "+"; +} + +/** + * Checks if the given token is a `+` token or not. + * @param {Token} token - The token to check. + * @returns {boolean} `true` if the token is a `+` token. + */ +function isConcatOperatorToken(token) { + return token.value === "+" && token.type === "Punctuator"; +} + +/** + * Get's the right most node on the left side of a BinaryExpression with + operator. + * @param {ASTNode} node - A BinaryExpression node to check. + * @returns {ASTNode} node + */ +function getLeft(node) { + let left = node.left; + + while (isConcatenation(left)) { + left = left.right; + } + return left; +} + +/** + * Get's the left most node on the right side of a BinaryExpression with + operator. + * @param {ASTNode} node - A BinaryExpression node to check. + * @returns {ASTNode} node + */ +function getRight(node) { + let right = node.right; + + while (isConcatenation(right)) { + right = right.left; + } + return right; +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow unnecessary concatenation of literals or template literals", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-useless-concat" + }, + + schema: [] + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + return { + BinaryExpression(node) { + + // check if not concatenation + if (node.operator !== "+") { + return; + } + + // account for the `foo + "a" + "b"` case + const left = getLeft(node); + const right = getRight(node); + + if (astUtils.isStringLiteral(left) && + astUtils.isStringLiteral(right) && + astUtils.isTokenOnSameLine(left, right) + ) { + const operatorToken = sourceCode.getFirstTokenBetween(left, right, isConcatOperatorToken); + + context.report({ + node, + loc: operatorToken.loc.start, + message: "Unexpected string concatenation of literals." + }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-useless-constructor.js b/node_modules/eslint/lib/rules/no-useless-constructor.js new file mode 100644 index 0000000..59e40be --- /dev/null +++ b/node_modules/eslint/lib/rules/no-useless-constructor.js @@ -0,0 +1,183 @@ +/** + * @fileoverview Rule to flag the use of redundant constructors in classes. + * @author Alberto Rodríguez + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks whether a given array of statements is a single call of `super`. + * + * @param {ASTNode[]} body - An array of statements to check. + * @returns {boolean} `true` if the body is a single call of `super`. + */ +function isSingleSuperCall(body) { + return ( + body.length === 1 && + body[0].type === "ExpressionStatement" && + body[0].expression.type === "CallExpression" && + body[0].expression.callee.type === "Super" + ); +} + +/** + * Checks whether a given node is a pattern which doesn't have any side effects. + * Default parameters and Destructuring parameters can have side effects. + * + * @param {ASTNode} node - A pattern node. + * @returns {boolean} `true` if the node doesn't have any side effects. + */ +function isSimple(node) { + return node.type === "Identifier" || node.type === "RestElement"; +} + +/** + * Checks whether a given array of expressions is `...arguments` or not. + * `super(...arguments)` passes all arguments through. + * + * @param {ASTNode[]} superArgs - An array of expressions to check. + * @returns {boolean} `true` if the superArgs is `...arguments`. + */ +function isSpreadArguments(superArgs) { + return ( + superArgs.length === 1 && + superArgs[0].type === "SpreadElement" && + superArgs[0].argument.type === "Identifier" && + superArgs[0].argument.name === "arguments" + ); +} + +/** + * Checks whether given 2 nodes are identifiers which have the same name or not. + * + * @param {ASTNode} ctorParam - A node to check. + * @param {ASTNode} superArg - A node to check. + * @returns {boolean} `true` if the nodes are identifiers which have the same + * name. + */ +function isValidIdentifierPair(ctorParam, superArg) { + return ( + ctorParam.type === "Identifier" && + superArg.type === "Identifier" && + ctorParam.name === superArg.name + ); +} + +/** + * Checks whether given 2 nodes are a rest/spread pair which has the same values. + * + * @param {ASTNode} ctorParam - A node to check. + * @param {ASTNode} superArg - A node to check. + * @returns {boolean} `true` if the nodes are a rest/spread pair which has the + * same values. + */ +function isValidRestSpreadPair(ctorParam, superArg) { + return ( + ctorParam.type === "RestElement" && + superArg.type === "SpreadElement" && + isValidIdentifierPair(ctorParam.argument, superArg.argument) + ); +} + +/** + * Checks whether given 2 nodes have the same value or not. + * + * @param {ASTNode} ctorParam - A node to check. + * @param {ASTNode} superArg - A node to check. + * @returns {boolean} `true` if the nodes have the same value or not. + */ +function isValidPair(ctorParam, superArg) { + return ( + isValidIdentifierPair(ctorParam, superArg) || + isValidRestSpreadPair(ctorParam, superArg) + ); +} + +/** + * Checks whether the parameters of a constructor and the arguments of `super()` + * have the same values or not. + * + * @param {ASTNode} ctorParams - The parameters of a constructor to check. + * @param {ASTNode} superArgs - The arguments of `super()` to check. + * @returns {boolean} `true` if those have the same values. + */ +function isPassingThrough(ctorParams, superArgs) { + if (ctorParams.length !== superArgs.length) { + return false; + } + + for (let i = 0; i < ctorParams.length; ++i) { + if (!isValidPair(ctorParams[i], superArgs[i])) { + return false; + } + } + + return true; +} + +/** + * Checks whether the constructor body is a redundant super call. + * + * @param {Array} body - constructor body content. + * @param {Array} ctorParams - The params to check against super call. + * @returns {boolean} true if the construtor body is redundant + */ +function isRedundantSuperCall(body, ctorParams) { + return ( + isSingleSuperCall(body) && + ctorParams.every(isSimple) && + ( + isSpreadArguments(body[0].expression.arguments) || + isPassingThrough(ctorParams, body[0].expression.arguments) + ) + ); +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow unnecessary constructors", + category: "ECMAScript 6", + recommended: false, + url: "https://eslint.org/docs/rules/no-useless-constructor" + }, + + schema: [] + }, + + create(context) { + + /** + * Checks whether a node is a redundant constructor + * @param {ASTNode} node - node to check + * @returns {void} + */ + function checkForConstructor(node) { + if (node.kind !== "constructor") { + return; + } + + const body = node.value.body.body; + const ctorParams = node.value.params; + const superClass = node.parent.parent.superClass; + + if (superClass ? isRedundantSuperCall(body, ctorParams) : (body.length === 0)) { + context.report({ + node, + message: "Useless constructor." + }); + } + } + + return { + MethodDefinition: checkForConstructor + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-useless-escape.js b/node_modules/eslint/lib/rules/no-useless-escape.js new file mode 100644 index 0000000..80abec7 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-useless-escape.js @@ -0,0 +1,224 @@ +/** + * @fileoverview Look for useless escapes in strings and regexes + * @author Onur Temizkan + */ + +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +/** + * Returns the union of two sets. + * @param {Set} setA The first set + * @param {Set} setB The second set + * @returns {Set} The union of the two sets + */ +function union(setA, setB) { + return new Set(function *() { + yield* setA; + yield* setB; + }()); +} + +const VALID_STRING_ESCAPES = union(new Set("\\nrvtbfux"), astUtils.LINEBREAKS); +const REGEX_GENERAL_ESCAPES = new Set("\\bcdDfnrsStvwWxu0123456789]"); +const REGEX_NON_CHARCLASS_ESCAPES = union(REGEX_GENERAL_ESCAPES, new Set("^/.$*+?[{}|()B")); + +/** + * Parses a regular expression into a list of characters with character class info. + * @param {string} regExpText The raw text used to create the regular expression + * @returns {Object[]} A list of characters, each with info on escaping and whether they're in a character class. + * @example + * + * parseRegExp('a\\b[cd-]') + * + * returns: + * [ + * {text: 'a', index: 0, escaped: false, inCharClass: false, startsCharClass: false, endsCharClass: false}, + * {text: 'b', index: 2, escaped: true, inCharClass: false, startsCharClass: false, endsCharClass: false}, + * {text: 'c', index: 4, escaped: false, inCharClass: true, startsCharClass: true, endsCharClass: false}, + * {text: 'd', index: 5, escaped: false, inCharClass: true, startsCharClass: false, endsCharClass: false}, + * {text: '-', index: 6, escaped: false, inCharClass: true, startsCharClass: false, endsCharClass: false} + * ] + */ +function parseRegExp(regExpText) { + const charList = []; + + regExpText.split("").reduce((state, char, index) => { + if (!state.escapeNextChar) { + if (char === "\\") { + return Object.assign(state, { escapeNextChar: true }); + } + if (char === "[" && !state.inCharClass) { + return Object.assign(state, { inCharClass: true, startingCharClass: true }); + } + if (char === "]" && state.inCharClass) { + if (charList.length && charList[charList.length - 1].inCharClass) { + charList[charList.length - 1].endsCharClass = true; + } + return Object.assign(state, { inCharClass: false, startingCharClass: false }); + } + } + charList.push({ + text: char, + index, + escaped: state.escapeNextChar, + inCharClass: state.inCharClass, + startsCharClass: state.startingCharClass, + endsCharClass: false + }); + return Object.assign(state, { escapeNextChar: false, startingCharClass: false }); + }, { escapeNextChar: false, inCharClass: false, startingCharClass: false }); + + return charList; +} + +module.exports = { + meta: { + docs: { + description: "disallow unnecessary escape characters", + category: "Best Practices", + recommended: true, + url: "https://eslint.org/docs/rules/no-useless-escape" + }, + + schema: [] + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + /** + * Reports a node + * @param {ASTNode} node The node to report + * @param {number} startOffset The backslash's offset from the start of the node + * @param {string} character The uselessly escaped character (not including the backslash) + * @returns {void} + */ + function report(node, startOffset, character) { + context.report({ + node, + loc: sourceCode.getLocFromIndex(sourceCode.getIndexFromLoc(node.loc.start) + startOffset), + message: "Unnecessary escape character: \\{{character}}.", + data: { character } + }); + } + + /** + * Checks if the escape character in given string slice is unnecessary. + * + * @private + * @param {ASTNode} node - node to validate. + * @param {string} match - string slice to validate. + * @returns {void} + */ + function validateString(node, match) { + const isTemplateElement = node.type === "TemplateElement"; + const escapedChar = match[0][1]; + let isUnnecessaryEscape = !VALID_STRING_ESCAPES.has(escapedChar); + let isQuoteEscape; + + if (isTemplateElement) { + isQuoteEscape = escapedChar === "`"; + + if (escapedChar === "$") { + + // Warn if `\$` is not followed by `{` + isUnnecessaryEscape = match.input[match.index + 2] !== "{"; + } else if (escapedChar === "{") { + + /* + * Warn if `\{` is not preceded by `$`. If preceded by `$`, escaping + * is necessary and the rule should not warn. If preceded by `/$`, the rule + * will warn for the `/$` instead, as it is the first unnecessarily escaped character. + */ + isUnnecessaryEscape = match.input[match.index - 1] !== "$"; + } + } else { + isQuoteEscape = escapedChar === node.raw[0]; + } + + if (isUnnecessaryEscape && !isQuoteEscape) { + report(node, match.index + 1, match[0].slice(1)); + } + } + + /** + * Checks if a node has an escape. + * + * @param {ASTNode} node - node to check. + * @returns {void} + */ + function check(node) { + const isTemplateElement = node.type === "TemplateElement"; + + if ( + isTemplateElement && + node.parent && + node.parent.parent && + node.parent.parent.type === "TaggedTemplateExpression" && + node.parent === node.parent.parent.quasi + ) { + + // Don't report tagged template literals, because the backslash character is accessible to the tag function. + return; + } + + if (typeof node.value === "string" || isTemplateElement) { + + /* + * JSXAttribute doesn't have any escape sequence: https://facebook.github.io/jsx/. + * In addition, backticks are not supported by JSX yet: https://github.com/facebook/jsx/issues/25. + */ + if (node.parent.type === "JSXAttribute" || node.parent.type === "JSXElement") { + return; + } + + const value = isTemplateElement ? node.value.raw : node.raw.slice(1, -1); + const pattern = /\\[^\d]/g; + let match; + + while ((match = pattern.exec(value))) { + validateString(node, match); + } + } else if (node.regex) { + parseRegExp(node.regex.pattern) + + /* + * The '-' character is a special case, because it's only valid to escape it if it's in a character + * class, and is not at either edge of the character class. To account for this, don't consider '-' + * characters to be valid in general, and filter out '-' characters that appear in the middle of a + * character class. + */ + .filter(charInfo => !(charInfo.text === "-" && charInfo.inCharClass && !charInfo.startsCharClass && !charInfo.endsCharClass)) + + /* + * The '^' character is also a special case; it must always be escaped outside of character classes, but + * it only needs to be escaped in character classes if it's at the beginning of the character class. To + * account for this, consider it to be a valid escape character outside of character classes, and filter + * out '^' characters that appear at the start of a character class. + */ + .filter(charInfo => !(charInfo.text === "^" && charInfo.startsCharClass)) + + // Filter out characters that aren't escaped. + .filter(charInfo => charInfo.escaped) + + // Filter out characters that are valid to escape, based on their position in the regular expression. + .filter(charInfo => !(charInfo.inCharClass ? REGEX_GENERAL_ESCAPES : REGEX_NON_CHARCLASS_ESCAPES).has(charInfo.text)) + + // Report all the remaining characters. + .forEach(charInfo => report(node, charInfo.index, charInfo.text)); + } + + } + + return { + Literal: check, + TemplateElement: check + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-useless-rename.js b/node_modules/eslint/lib/rules/no-useless-rename.js new file mode 100644 index 0000000..83a03de --- /dev/null +++ b/node_modules/eslint/lib/rules/no-useless-rename.js @@ -0,0 +1,148 @@ +/** + * @fileoverview Disallow renaming import, export, and destructured assignments to the same name. + * @author Kai Cataldo + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow renaming import, export, and destructured assignments to the same name", + category: "ECMAScript 6", + recommended: false, + url: "https://eslint.org/docs/rules/no-useless-rename" + }, + fixable: "code", + schema: [ + { + type: "object", + properties: { + ignoreDestructuring: { type: "boolean" }, + ignoreImport: { type: "boolean" }, + ignoreExport: { type: "boolean" } + }, + additionalProperties: false + } + ] + }, + + create(context) { + const options = context.options[0] || {}, + ignoreDestructuring = options.ignoreDestructuring === true, + ignoreImport = options.ignoreImport === true, + ignoreExport = options.ignoreExport === true; + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Reports error for unnecessarily renamed assignments + * @param {ASTNode} node - node to report + * @param {ASTNode} initial - node with initial name value + * @param {ASTNode} result - node with new name value + * @param {string} type - the type of the offending node + * @returns {void} + */ + function reportError(node, initial, result, type) { + const name = initial.type === "Identifier" ? initial.name : initial.value; + + return context.report({ + node, + message: "{{type}} {{name}} unnecessarily renamed.", + data: { + name, + type + }, + fix(fixer) { + return fixer.replaceTextRange([ + initial.range[0], + result.range[1] + ], name); + } + }); + } + + /** + * Checks whether a destructured assignment is unnecessarily renamed + * @param {ASTNode} node - node to check + * @returns {void} + */ + function checkDestructured(node) { + if (ignoreDestructuring) { + return; + } + + const properties = node.properties; + + for (let i = 0; i < properties.length; i++) { + if (properties[i].shorthand) { + continue; + } + + /** + * If an ObjectPattern property is computed, we have no idea + * if a rename is useless or not. If an ObjectPattern property + * lacks a key, it is likely an ExperimentalRestProperty and + * so there is no "renaming" occurring here. + */ + if (properties[i].computed || !properties[i].key) { + continue; + } + + if (properties[i].key.type === "Identifier" && properties[i].key.name === properties[i].value.name || + properties[i].key.type === "Literal" && properties[i].key.value === properties[i].value.name) { + reportError(properties[i], properties[i].key, properties[i].value, "Destructuring assignment"); + } + } + } + + /** + * Checks whether an import is unnecessarily renamed + * @param {ASTNode} node - node to check + * @returns {void} + */ + function checkImport(node) { + if (ignoreImport) { + return; + } + + if (node.imported.name === node.local.name && + node.imported.range[0] !== node.local.range[0]) { + reportError(node, node.imported, node.local, "Import"); + } + } + + /** + * Checks whether an export is unnecessarily renamed + * @param {ASTNode} node - node to check + * @returns {void} + */ + function checkExport(node) { + if (ignoreExport) { + return; + } + + if (node.local.name === node.exported.name && + node.local.range[0] !== node.exported.range[0]) { + reportError(node, node.local, node.exported, "Export"); + } + + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + ObjectPattern: checkDestructured, + ImportSpecifier: checkImport, + ExportSpecifier: checkExport + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-useless-return.js b/node_modules/eslint/lib/rules/no-useless-return.js new file mode 100644 index 0000000..8e2a6d9 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-useless-return.js @@ -0,0 +1,305 @@ +/** + * @fileoverview Disallow redundant return statements + * @author Teddy Katz + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"), + FixTracker = require("../util/fix-tracker"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Adds all elements of 2nd argument into 1st argument. + * + * @param {Array} array - The destination array to add. + * @param {Array} elements - The source array to add. + * @returns {void} + */ +const pushAll = Function.apply.bind(Array.prototype.push); + +/** + * Removes the given element from the array. + * + * @param {Array} array - The source array to remove. + * @param {any} element - The target item to remove. + * @returns {void} + */ +function remove(array, element) { + const index = array.indexOf(element); + + if (index !== -1) { + array.splice(index, 1); + } +} + +/** + * Checks whether it can remove the given return statement or not. + * + * @param {ASTNode} node - The return statement node to check. + * @returns {boolean} `true` if the node is removeable. + */ +function isRemovable(node) { + return astUtils.STATEMENT_LIST_PARENTS.has(node.parent.type); +} + +/** + * Checks whether the given return statement is in a `finally` block or not. + * + * @param {ASTNode} node - The return statement node to check. + * @returns {boolean} `true` if the node is in a `finally` block. + */ +function isInFinally(node) { + while (node && node.parent && !astUtils.isFunction(node)) { + if (node.parent.type === "TryStatement" && node.parent.finalizer === node) { + return true; + } + + node = node.parent; + } + + return false; +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow redundant return statements", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-useless-return" + }, + fixable: "code", + schema: [] + }, + + create(context) { + const segmentInfoMap = new WeakMap(); + const usedUnreachableSegments = new WeakSet(); + let scopeInfo = null; + + /** + * Checks whether the given segment is terminated by a return statement or not. + * + * @param {CodePathSegment} segment - The segment to check. + * @returns {boolean} `true` if the segment is terminated by a return statement, or if it's still a part of unreachable. + */ + function isReturned(segment) { + const info = segmentInfoMap.get(segment); + + return !info || info.returned; + } + + /** + * Collects useless return statements from the given previous segments. + * + * A previous segment may be an unreachable segment. + * In that case, the information object of the unreachable segment is not + * initialized because `onCodePathSegmentStart` event is not notified for + * unreachable segments. + * This goes to the previous segments of the unreachable segment recursively + * if the unreachable segment was generated by a return statement. Otherwise, + * this ignores the unreachable segment. + * + * This behavior would simulate code paths for the case that the return + * statement does not exist. + * + * @param {ASTNode[]} uselessReturns - The collected return statements. + * @param {CodePathSegment[]} prevSegments - The previous segments to traverse. + * @param {WeakSet} [traversedSegments] A set of segments that have already been traversed in this call + * @returns {ASTNode[]} `uselessReturns`. + */ + function getUselessReturns(uselessReturns, prevSegments, traversedSegments) { + if (!traversedSegments) { + traversedSegments = new WeakSet(); + } + for (const segment of prevSegments) { + if (!segment.reachable) { + if (!traversedSegments.has(segment)) { + traversedSegments.add(segment); + getUselessReturns( + uselessReturns, + segment.allPrevSegments.filter(isReturned), + traversedSegments + ); + } + continue; + } + + pushAll(uselessReturns, segmentInfoMap.get(segment).uselessReturns); + } + + return uselessReturns; + } + + /** + * Removes the return statements on the given segment from the useless return + * statement list. + * + * This segment may be an unreachable segment. + * In that case, the information object of the unreachable segment is not + * initialized because `onCodePathSegmentStart` event is not notified for + * unreachable segments. + * This goes to the previous segments of the unreachable segment recursively + * if the unreachable segment was generated by a return statement. Otherwise, + * this ignores the unreachable segment. + * + * This behavior would simulate code paths for the case that the return + * statement does not exist. + * + * @param {CodePathSegment} segment - The segment to get return statements. + * @returns {void} + */ + function markReturnStatementsOnSegmentAsUsed(segment) { + if (!segment.reachable) { + usedUnreachableSegments.add(segment); + segment.allPrevSegments + .filter(isReturned) + .filter(prevSegment => !usedUnreachableSegments.has(prevSegment)) + .forEach(markReturnStatementsOnSegmentAsUsed); + return; + } + + const info = segmentInfoMap.get(segment); + + for (const node of info.uselessReturns) { + remove(scopeInfo.uselessReturns, node); + } + info.uselessReturns = []; + } + + /** + * Removes the return statements on the current segments from the useless + * return statement list. + * + * This function will be called at every statement except FunctionDeclaration, + * BlockStatement, and BreakStatement. + * + * - FunctionDeclarations are always executed whether it's returned or not. + * - BlockStatements do nothing. + * - BreakStatements go the next merely. + * + * @returns {void} + */ + function markReturnStatementsOnCurrentSegmentsAsUsed() { + scopeInfo + .codePath + .currentSegments + .forEach(markReturnStatementsOnSegmentAsUsed); + } + + //---------------------------------------------------------------------- + // Public + //---------------------------------------------------------------------- + + return { + + // Makes and pushs a new scope information. + onCodePathStart(codePath) { + scopeInfo = { + upper: scopeInfo, + uselessReturns: [], + codePath + }; + }, + + // Reports useless return statements if exist. + onCodePathEnd() { + for (const node of scopeInfo.uselessReturns) { + context.report({ + node, + loc: node.loc, + message: "Unnecessary return statement.", + fix(fixer) { + if (isRemovable(node)) { + + /* + * Extend the replacement range to include the + * entire function to avoid conflicting with + * no-else-return. + * https://github.com/eslint/eslint/issues/8026 + */ + return new FixTracker(fixer, context.getSourceCode()) + .retainEnclosingFunction(node) + .remove(node); + } + return null; + } + }); + } + + scopeInfo = scopeInfo.upper; + }, + + /* + * Initializes segments. + * NOTE: This event is notified for only reachable segments. + */ + onCodePathSegmentStart(segment) { + const info = { + uselessReturns: getUselessReturns([], segment.allPrevSegments), + returned: false + }; + + // Stores the info. + segmentInfoMap.set(segment, info); + }, + + // Adds ReturnStatement node to check whether it's useless or not. + ReturnStatement(node) { + if (node.argument) { + markReturnStatementsOnCurrentSegmentsAsUsed(); + } + if (node.argument || astUtils.isInLoop(node) || isInFinally(node)) { + return; + } + + for (const segment of scopeInfo.codePath.currentSegments) { + const info = segmentInfoMap.get(segment); + + if (info) { + info.uselessReturns.push(node); + info.returned = true; + } + } + scopeInfo.uselessReturns.push(node); + }, + + /* + * Registers for all statement nodes except FunctionDeclaration, BlockStatement, BreakStatement. + * Removes return statements of the current segments from the useless return statement list. + */ + ClassDeclaration: markReturnStatementsOnCurrentSegmentsAsUsed, + ContinueStatement: markReturnStatementsOnCurrentSegmentsAsUsed, + DebuggerStatement: markReturnStatementsOnCurrentSegmentsAsUsed, + DoWhileStatement: markReturnStatementsOnCurrentSegmentsAsUsed, + EmptyStatement: markReturnStatementsOnCurrentSegmentsAsUsed, + ExpressionStatement: markReturnStatementsOnCurrentSegmentsAsUsed, + ForInStatement: markReturnStatementsOnCurrentSegmentsAsUsed, + ForOfStatement: markReturnStatementsOnCurrentSegmentsAsUsed, + ForStatement: markReturnStatementsOnCurrentSegmentsAsUsed, + IfStatement: markReturnStatementsOnCurrentSegmentsAsUsed, + ImportDeclaration: markReturnStatementsOnCurrentSegmentsAsUsed, + LabeledStatement: markReturnStatementsOnCurrentSegmentsAsUsed, + SwitchStatement: markReturnStatementsOnCurrentSegmentsAsUsed, + ThrowStatement: markReturnStatementsOnCurrentSegmentsAsUsed, + TryStatement: markReturnStatementsOnCurrentSegmentsAsUsed, + VariableDeclaration: markReturnStatementsOnCurrentSegmentsAsUsed, + WhileStatement: markReturnStatementsOnCurrentSegmentsAsUsed, + WithStatement: markReturnStatementsOnCurrentSegmentsAsUsed, + ExportNamedDeclaration: markReturnStatementsOnCurrentSegmentsAsUsed, + ExportDefaultDeclaration: markReturnStatementsOnCurrentSegmentsAsUsed, + ExportAllDeclaration: markReturnStatementsOnCurrentSegmentsAsUsed + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-var.js b/node_modules/eslint/lib/rules/no-var.js new file mode 100644 index 0000000..d95ca53 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-var.js @@ -0,0 +1,329 @@ +/** + * @fileoverview Rule to check for the usage of var. + * @author Jamund Ferguson + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Check whether a given variable is a global variable or not. + * @param {eslint-scope.Variable} variable The variable to check. + * @returns {boolean} `true` if the variable is a global variable. + */ +function isGlobal(variable) { + return Boolean(variable.scope) && variable.scope.type === "global"; +} + +/** + * Finds the nearest function scope or global scope walking up the scope + * hierarchy. + * + * @param {eslint-scope.Scope} scope - The scope to traverse. + * @returns {eslint-scope.Scope} a function scope or global scope containing the given + * scope. + */ +function getEnclosingFunctionScope(scope) { + while (scope.type !== "function" && scope.type !== "global") { + scope = scope.upper; + } + return scope; +} + +/** + * Checks whether the given variable has any references from a more specific + * function expression (i.e. a closure). + * + * @param {eslint-scope.Variable} variable - A variable to check. + * @returns {boolean} `true` if the variable is used from a closure. + */ +function isReferencedInClosure(variable) { + const enclosingFunctionScope = getEnclosingFunctionScope(variable.scope); + + return variable.references.some(reference => + getEnclosingFunctionScope(reference.from) !== enclosingFunctionScope); +} + +/** + * Checks whether the given node is the assignee of a loop. + * + * @param {ASTNode} node - A VariableDeclaration node to check. + * @returns {boolean} `true` if the declaration is assigned as part of loop + * iteration. + */ +function isLoopAssignee(node) { + return (node.parent.type === "ForOfStatement" || node.parent.type === "ForInStatement") && + node === node.parent.left; +} + +/** + * Checks whether the given variable declaration is immediately initialized. + * + * @param {ASTNode} node - A VariableDeclaration node to check. + * @returns {boolean} `true` if the declaration has an initializer. + */ +function isDeclarationInitialized(node) { + return node.declarations.every(declarator => declarator.init !== null); +} + +const SCOPE_NODE_TYPE = /^(?:Program|BlockStatement|SwitchStatement|ForStatement|ForInStatement|ForOfStatement)$/; + +/** + * Gets the scope node which directly contains a given node. + * + * @param {ASTNode} node - A node to get. This is a `VariableDeclaration` or + * an `Identifier`. + * @returns {ASTNode} A scope node. This is one of `Program`, `BlockStatement`, + * `SwitchStatement`, `ForStatement`, `ForInStatement`, and + * `ForOfStatement`. + */ +function getScopeNode(node) { + while (node) { + if (SCOPE_NODE_TYPE.test(node.type)) { + return node; + } + + node = node.parent; + } + + /* istanbul ignore next : unreachable */ + return null; +} + +/** + * Checks whether a given variable is redeclared or not. + * + * @param {eslint-scope.Variable} variable - A variable to check. + * @returns {boolean} `true` if the variable is redeclared. + */ +function isRedeclared(variable) { + return variable.defs.length >= 2; +} + +/** + * Checks whether a given variable is used from outside of the specified scope. + * + * @param {ASTNode} scopeNode - A scope node to check. + * @returns {Function} The predicate function which checks whether a given + * variable is used from outside of the specified scope. + */ +function isUsedFromOutsideOf(scopeNode) { + + /** + * Checks whether a given reference is inside of the specified scope or not. + * + * @param {eslint-scope.Reference} reference - A reference to check. + * @returns {boolean} `true` if the reference is inside of the specified + * scope. + */ + function isOutsideOfScope(reference) { + const scope = scopeNode.range; + const id = reference.identifier.range; + + return id[0] < scope[0] || id[1] > scope[1]; + } + + return function(variable) { + return variable.references.some(isOutsideOfScope); + }; +} + +/** + * Creates the predicate function which checks whether a variable has their references in TDZ. + * + * The predicate function would return `true`: + * + * - if a reference is before the declarator. E.g. (var a = b, b = 1;)(var {a = b, b} = {};) + * - if a reference is in the expression of their default value. E.g. (var {a = a} = {};) + * - if a reference is in the expression of their initializer. E.g. (var a = a;) + * + * @param {ASTNode} node - The initializer node of VariableDeclarator. + * @returns {Function} The predicate function. + * @private + */ +function hasReferenceInTDZ(node) { + const initStart = node.range[0]; + const initEnd = node.range[1]; + + return variable => { + const id = variable.defs[0].name; + const idStart = id.range[0]; + const defaultValue = (id.parent.type === "AssignmentPattern" ? id.parent.right : null); + const defaultStart = defaultValue && defaultValue.range[0]; + const defaultEnd = defaultValue && defaultValue.range[1]; + + return variable.references.some(reference => { + const start = reference.identifier.range[0]; + const end = reference.identifier.range[1]; + + return !reference.init && ( + start < idStart || + (defaultValue !== null && start >= defaultStart && end <= defaultEnd) || + (start >= initStart && end <= initEnd) + ); + }); + }; +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require `let` or `const` instead of `var`", + category: "ECMAScript 6", + recommended: false, + url: "https://eslint.org/docs/rules/no-var" + }, + + schema: [], + fixable: "code" + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + /** + * Checks whether the variables which are defined by the given declarator node have their references in TDZ. + * + * @param {ASTNode} declarator - The VariableDeclarator node to check. + * @returns {boolean} `true` if one of the variables which are defined by the given declarator node have their references in TDZ. + */ + function hasSelfReferenceInTDZ(declarator) { + if (!declarator.init) { + return false; + } + const variables = context.getDeclaredVariables(declarator); + + return variables.some(hasReferenceInTDZ(declarator.init)); + } + + /** + * Checks whether it can fix a given variable declaration or not. + * It cannot fix if the following cases: + * + * - A variable is a global variable. + * - A variable is declared on a SwitchCase node. + * - A variable is redeclared. + * - A variable is used from outside the scope. + * - A variable is used from a closure within a loop. + * - A variable might be used before it is assigned within a loop. + * - A variable might be used in TDZ. + * - A variable is declared in statement position (e.g. a single-line `IfStatement`) + * + * ## A variable is declared on a SwitchCase node. + * + * If this rule modifies 'var' declarations on a SwitchCase node, it + * would generate the warnings of 'no-case-declarations' rule. And the + * 'eslint:recommended' preset includes 'no-case-declarations' rule, so + * this rule doesn't modify those declarations. + * + * ## A variable is redeclared. + * + * The language spec disallows redeclarations of `let` declarations. + * Those variables would cause syntax errors. + * + * ## A variable is used from outside the scope. + * + * The language spec disallows accesses from outside of the scope for + * `let` declarations. Those variables would cause reference errors. + * + * ## A variable is used from a closure within a loop. + * + * A `var` declaration within a loop shares the same variable instance + * across all loop iterations, while a `let` declaration creates a new + * instance for each iteration. This means if a variable in a loop is + * referenced by any closure, changing it from `var` to `let` would + * change the behavior in a way that is generally unsafe. + * + * ## A variable might be used before it is assigned within a loop. + * + * Within a loop, a `let` declaration without an initializer will be + * initialized to null, while a `var` declaration will retain its value + * from the previous iteration, so it is only safe to change `var` to + * `let` if we can statically determine that the variable is always + * assigned a value before its first access in the loop body. To keep + * the implementation simple, we only convert `var` to `let` within + * loops when the variable is a loop assignee or the declaration has an + * initializer. + * + * @param {ASTNode} node - A variable declaration node to check. + * @returns {boolean} `true` if it can fix the node. + */ + function canFix(node) { + const variables = context.getDeclaredVariables(node); + const scopeNode = getScopeNode(node); + + if (node.parent.type === "SwitchCase" || + node.declarations.some(hasSelfReferenceInTDZ) || + variables.some(isGlobal) || + variables.some(isRedeclared) || + variables.some(isUsedFromOutsideOf(scopeNode)) + ) { + return false; + } + + if (astUtils.isInLoop(node)) { + if (variables.some(isReferencedInClosure)) { + return false; + } + if (!isLoopAssignee(node) && !isDeclarationInitialized(node)) { + return false; + } + } + + if ( + !isLoopAssignee(node) && + !(node.parent.type === "ForStatement" && node.parent.init === node) && + !astUtils.STATEMENT_LIST_PARENTS.has(node.parent.type) + ) { + + // If the declaration is not in a block, e.g. `if (foo) var bar = 1;`, then it can't be fixed. + return false; + } + + return true; + } + + /** + * Reports a given variable declaration node. + * + * @param {ASTNode} node - A variable declaration node to report. + * @returns {void} + */ + function report(node) { + const varToken = sourceCode.getFirstToken(node); + + context.report({ + node, + message: "Unexpected var, use let or const instead.", + + fix(fixer) { + if (canFix(node)) { + return fixer.replaceText(varToken, "let"); + } + return null; + } + }); + } + + return { + "VariableDeclaration:exit"(node) { + if (node.kind === "var") { + report(node); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-void.js b/node_modules/eslint/lib/rules/no-void.js new file mode 100644 index 0000000..1d3d887 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-void.js @@ -0,0 +1,38 @@ +/** + * @fileoverview Rule to disallow use of void operator. + * @author Mike Sidorov + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow `void` operators", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-void" + }, + + schema: [] + }, + + create(context) { + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + UnaryExpression(node) { + if (node.operator === "void") { + context.report({ node, message: "Expected 'undefined' and instead saw 'void'." }); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-warning-comments.js b/node_modules/eslint/lib/rules/no-warning-comments.js new file mode 100644 index 0000000..ce58f9a --- /dev/null +++ b/node_modules/eslint/lib/rules/no-warning-comments.js @@ -0,0 +1,140 @@ +/** + * @fileoverview Rule that warns about used warning comments + * @author Alexander Schmidt + */ + +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow specified warning terms in comments", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-warning-comments" + }, + + schema: [ + { + type: "object", + properties: { + terms: { + type: "array", + items: { + type: "string" + } + }, + location: { + enum: ["start", "anywhere"] + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + + const sourceCode = context.getSourceCode(), + configuration = context.options[0] || {}, + warningTerms = configuration.terms || ["todo", "fixme", "xxx"], + location = configuration.location || "start", + selfConfigRegEx = /\bno-warning-comments\b/; + + /** + * Convert a warning term into a RegExp which will match a comment containing that whole word in the specified + * location ("start" or "anywhere"). If the term starts or ends with non word characters, then the match will not + * require word boundaries on that side. + * + * @param {string} term A term to convert to a RegExp + * @returns {RegExp} The term converted to a RegExp + */ + function convertToRegExp(term) { + const escaped = term.replace(/[-/\\$^*+?.()|[\]{}]/g, "\\$&"); + let prefix; + + /* + * If the term ends in a word character (a-z0-9_), ensure a word + * boundary at the end, so that substrings do not get falsely + * matched. eg "todo" in a string such as "mastodon". + * If the term ends in a non-word character, then \b won't match on + * the boundary to the next non-word character, which would likely + * be a space. For example `/\bFIX!\b/.test('FIX! blah') === false`. + * In these cases, use no bounding match. Same applies for the + * prefix, handled below. + */ + const suffix = /\w$/.test(term) ? "\\b" : ""; + + if (location === "start") { + + /* + * When matching at the start, ignore leading whitespace, and + * there's no need to worry about word boundaries. + */ + prefix = "^\\s*"; + } else if (/^\w/.test(term)) { + prefix = "\\b"; + } else { + prefix = ""; + } + + return new RegExp(prefix + escaped + suffix, "i"); + } + + const warningRegExps = warningTerms.map(convertToRegExp); + + /** + * Checks the specified comment for matches of the configured warning terms and returns the matches. + * @param {string} comment The comment which is checked. + * @returns {Array} All matched warning terms for this comment. + */ + function commentContainsWarningTerm(comment) { + const matches = []; + + warningRegExps.forEach((regex, index) => { + if (regex.test(comment)) { + matches.push(warningTerms[index]); + } + }); + + return matches; + } + + /** + * Checks the specified node for matching warning comments and reports them. + * @param {ASTNode} node The AST node being checked. + * @returns {void} undefined. + */ + function checkComment(node) { + if (astUtils.isDirectiveComment(node) && selfConfigRegEx.test(node.value)) { + return; + } + + const matches = commentContainsWarningTerm(node.value); + + matches.forEach(matchedTerm => { + context.report({ + node, + message: "Unexpected '{{matchedTerm}}' comment.", + data: { + matchedTerm + } + }); + }); + } + + return { + Program() { + const comments = sourceCode.getAllComments(); + + comments.filter(token => token.type !== "Shebang").forEach(checkComment); + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-whitespace-before-property.js b/node_modules/eslint/lib/rules/no-whitespace-before-property.js new file mode 100644 index 0000000..fc4c25f --- /dev/null +++ b/node_modules/eslint/lib/rules/no-whitespace-before-property.js @@ -0,0 +1,95 @@ +/** + * @fileoverview Rule to disallow whitespace before properties + * @author Kai Cataldo + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow whitespace before properties", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/no-whitespace-before-property" + }, + + fixable: "whitespace", + schema: [] + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Reports whitespace before property token + * @param {ASTNode} node - the node to report in the event of an error + * @param {Token} leftToken - the left token + * @param {Token} rightToken - the right token + * @returns {void} + * @private + */ + function reportError(node, leftToken, rightToken) { + const replacementText = node.computed ? "" : "."; + + context.report({ + node, + message: "Unexpected whitespace before property {{propName}}.", + data: { + propName: sourceCode.getText(node.property) + }, + fix(fixer) { + if (!node.computed && astUtils.isDecimalInteger(node.object)) { + + /* + * If the object is a number literal, fixing it to something like 5.toString() would cause a SyntaxError. + * Don't fix this case. + */ + return null; + } + return fixer.replaceTextRange([leftToken.range[1], rightToken.range[0]], replacementText); + } + }); + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + MemberExpression(node) { + let rightToken; + let leftToken; + + if (!astUtils.isTokenOnSameLine(node.object, node.property)) { + return; + } + + if (node.computed) { + rightToken = sourceCode.getTokenBefore(node.property, astUtils.isOpeningBracketToken); + leftToken = sourceCode.getTokenBefore(rightToken); + } else { + rightToken = sourceCode.getFirstToken(node.property); + leftToken = sourceCode.getTokenBefore(rightToken, 1); + } + + if (sourceCode.isSpaceBetweenTokens(leftToken, rightToken)) { + reportError(node, leftToken, rightToken); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-with.js b/node_modules/eslint/lib/rules/no-with.js new file mode 100644 index 0000000..d72dcdf --- /dev/null +++ b/node_modules/eslint/lib/rules/no-with.js @@ -0,0 +1,33 @@ +/** + * @fileoverview Rule to flag use of with statement + * @author Nicholas C. Zakas + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow `with` statements", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/no-with" + }, + + schema: [] + }, + + create(context) { + + return { + WithStatement(node) { + context.report({ node, message: "Unexpected use of 'with' statement." }); + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/nonblock-statement-body-position.js b/node_modules/eslint/lib/rules/nonblock-statement-body-position.js new file mode 100644 index 0000000..e447ef8 --- /dev/null +++ b/node_modules/eslint/lib/rules/nonblock-statement-body-position.js @@ -0,0 +1,115 @@ +/** + * @fileoverview enforce the location of single-line statements + * @author Teddy Katz + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +const POSITION_SCHEMA = { enum: ["beside", "below", "any"] }; + +module.exports = { + meta: { + docs: { + description: "enforce the location of single-line statements", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/nonblock-statement-body-position" + }, + fixable: "whitespace", + schema: [ + POSITION_SCHEMA, + { + properties: { + overrides: { + properties: { + if: POSITION_SCHEMA, + else: POSITION_SCHEMA, + while: POSITION_SCHEMA, + do: POSITION_SCHEMA, + for: POSITION_SCHEMA + }, + additionalProperties: false + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + //---------------------------------------------------------------------- + // Helpers + //---------------------------------------------------------------------- + + /** + * Gets the applicable preference for a particular keyword + * @param {string} keywordName The name of a keyword, e.g. 'if' + * @returns {string} The applicable option for the keyword, e.g. 'beside' + */ + function getOption(keywordName) { + return context.options[1] && context.options[1].overrides && context.options[1].overrides[keywordName] || + context.options[0] || + "beside"; + } + + /** + * Validates the location of a single-line statement + * @param {ASTNode} node The single-line statement + * @param {string} keywordName The applicable keyword name for the single-line statement + * @returns {void} + */ + function validateStatement(node, keywordName) { + const option = getOption(keywordName); + + if (node.type === "BlockStatement" || option === "any") { + return; + } + + const tokenBefore = sourceCode.getTokenBefore(node); + + if (tokenBefore.loc.end.line === node.loc.start.line && option === "below") { + context.report({ + node, + message: "Expected a linebreak before this statement.", + fix: fixer => fixer.insertTextBefore(node, "\n") + }); + } else if (tokenBefore.loc.end.line !== node.loc.start.line && option === "beside") { + context.report({ + node, + message: "Expected no linebreak before this statement.", + fix(fixer) { + if (sourceCode.getText().slice(tokenBefore.range[1], node.range[0]).trim()) { + return null; + } + return fixer.replaceTextRange([tokenBefore.range[1], node.range[0]], " "); + } + }); + } + } + + //---------------------------------------------------------------------- + // Public + //---------------------------------------------------------------------- + + return { + IfStatement(node) { + validateStatement(node.consequent, "if"); + + // Check the `else` node, but don't check 'else if' statements. + if (node.alternate && node.alternate.type !== "IfStatement") { + validateStatement(node.alternate, "else"); + } + }, + WhileStatement: node => validateStatement(node.body, "while"), + DoWhileStatement: node => validateStatement(node.body, "do"), + ForStatement: node => validateStatement(node.body, "for"), + ForInStatement: node => validateStatement(node.body, "for"), + ForOfStatement: node => validateStatement(node.body, "for") + }; + } +}; diff --git a/node_modules/eslint/lib/rules/object-curly-newline.js b/node_modules/eslint/lib/rules/object-curly-newline.js new file mode 100644 index 0000000..14b5d06 --- /dev/null +++ b/node_modules/eslint/lib/rules/object-curly-newline.js @@ -0,0 +1,298 @@ +/** + * @fileoverview Rule to require or disallow line breaks inside braces. + * @author Toru Nagashima + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); +const lodash = require("lodash"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +// Schema objects. +const OPTION_VALUE = { + oneOf: [ + { + enum: ["always", "never"] + }, + { + type: "object", + properties: { + multiline: { + type: "boolean" + }, + minProperties: { + type: "integer", + minimum: 0 + }, + consistent: { + type: "boolean" + } + }, + additionalProperties: false, + minProperties: 1 + } + ] +}; + +/** + * Normalizes a given option value. + * + * @param {string|Object|undefined} value - An option value to parse. + * @returns {{multiline: boolean, minProperties: number, consistent: boolean}} Normalized option object. + */ +function normalizeOptionValue(value) { + let multiline = false; + let minProperties = Number.POSITIVE_INFINITY; + let consistent = false; + + if (value) { + if (value === "always") { + minProperties = 0; + } else if (value === "never") { + minProperties = Number.POSITIVE_INFINITY; + } else { + multiline = Boolean(value.multiline); + minProperties = value.minProperties || Number.POSITIVE_INFINITY; + consistent = Boolean(value.consistent); + } + } else { + multiline = true; + } + + return { multiline, minProperties, consistent }; +} + +/** + * Normalizes a given option value. + * + * @param {string|Object|undefined} options - An option value to parse. + * @returns {{ + * ObjectExpression: {multiline: boolean, minProperties: number, consistent: boolean}, + * ObjectPattern: {multiline: boolean, minProperties: number, consistent: boolean}, + * ImportDeclaration: {multiline: boolean, minProperties: number, consistent: boolean}, + * ExportNamedDeclaration : {multiline: boolean, minProperties: number, consistent: boolean} + * }} Normalized option object. + */ +function normalizeOptions(options) { + const isNodeSpecificOption = lodash.overSome([lodash.isPlainObject, lodash.isString]); + + if (lodash.isPlainObject(options) && lodash.some(options, isNodeSpecificOption)) { + return { + ObjectExpression: normalizeOptionValue(options.ObjectExpression), + ObjectPattern: normalizeOptionValue(options.ObjectPattern), + ImportDeclaration: normalizeOptionValue(options.ImportDeclaration), + ExportNamedDeclaration: normalizeOptionValue(options.ExportDeclaration) + }; + } + + const value = normalizeOptionValue(options); + + return { ObjectExpression: value, ObjectPattern: value, ImportDeclaration: value, ExportNamedDeclaration: value }; +} + +/** + * Determines if ObjectExpression, ObjectPattern, ImportDeclaration or ExportNamedDeclaration + * node needs to be checked for missing line breaks + * + * @param {ASTNode} node - Node under inspection + * @param {Object} options - option specific to node type + * @param {Token} first - First object property + * @param {Token} last - Last object property + * @returns {boolean} `true` if node needs to be checked for missing line breaks + */ +function areLineBreaksRequired(node, options, first, last) { + let objectProperties; + + if (node.type === "ObjectExpression" || node.type === "ObjectPattern") { + objectProperties = node.properties; + } else { + + // is ImportDeclaration or ExportNamedDeclaration + objectProperties = node.specifiers; + } + + return objectProperties.length >= options.minProperties || + ( + options.multiline && + objectProperties.length > 0 && + first.loc.start.line !== last.loc.end.line + ); +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce consistent line breaks inside braces", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/object-curly-newline" + }, + fixable: "whitespace", + schema: [ + { + oneOf: [ + OPTION_VALUE, + { + type: "object", + properties: { + ObjectExpression: OPTION_VALUE, + ObjectPattern: OPTION_VALUE, + ImportDeclaration: OPTION_VALUE, + ExportDeclaration: OPTION_VALUE + }, + additionalProperties: false, + minProperties: 1 + } + ] + } + ] + }, + + create(context) { + const sourceCode = context.getSourceCode(); + const normalizedOptions = normalizeOptions(context.options[0]); + + /** + * Reports a given node if it violated this rule. + * @param {ASTNode} node - A node to check. This is an ObjectExpression, ObjectPattern, ImportDeclaration or ExportNamedDeclaration node. + * @param {{multiline: boolean, minProperties: number, consistent: boolean}} options - An option object. + * @returns {void} + */ + function check(node) { + const options = normalizedOptions[node.type]; + + if ( + (node.type === "ImportDeclaration" && + !node.specifiers.some(specifier => specifier.type === "ImportSpecifier")) || + (node.type === "ExportNamedDeclaration" && + !node.specifiers.some(specifier => specifier.type === "ExportSpecifier")) + ) { + return; + } + + const openBrace = sourceCode.getFirstToken(node, token => token.value === "{"); + + let closeBrace; + + if (node.typeAnnotation) { + closeBrace = sourceCode.getTokenBefore(node.typeAnnotation); + } else { + closeBrace = sourceCode.getLastToken(node, token => token.value === "}"); + } + + let first = sourceCode.getTokenAfter(openBrace, { includeComments: true }); + let last = sourceCode.getTokenBefore(closeBrace, { includeComments: true }); + + const needsLineBreaks = areLineBreaksRequired(node, options, first, last); + + const hasCommentsFirstToken = astUtils.isCommentToken(first); + const hasCommentsLastToken = astUtils.isCommentToken(last); + + /* + * Use tokens or comments to check multiline or not. + * But use only tokens to check whether line breaks are needed. + * This allows: + * var obj = { // eslint-disable-line foo + * a: 1 + * } + */ + first = sourceCode.getTokenAfter(openBrace); + last = sourceCode.getTokenBefore(closeBrace); + + if (needsLineBreaks) { + if (astUtils.isTokenOnSameLine(openBrace, first)) { + context.report({ + message: "Expected a line break after this opening brace.", + node, + loc: openBrace.loc.start, + fix(fixer) { + if (hasCommentsFirstToken) { + return null; + } + + return fixer.insertTextAfter(openBrace, "\n"); + } + }); + } + if (astUtils.isTokenOnSameLine(last, closeBrace)) { + context.report({ + message: "Expected a line break before this closing brace.", + node, + loc: closeBrace.loc.start, + fix(fixer) { + if (hasCommentsLastToken) { + return null; + } + + return fixer.insertTextBefore(closeBrace, "\n"); + } + }); + } + } else { + const consistent = options.consistent; + const hasLineBreakBetweenOpenBraceAndFirst = !astUtils.isTokenOnSameLine(openBrace, first); + const hasLineBreakBetweenCloseBraceAndLast = !astUtils.isTokenOnSameLine(last, closeBrace); + + if ( + (!consistent && hasLineBreakBetweenOpenBraceAndFirst) || + (consistent && hasLineBreakBetweenOpenBraceAndFirst && !hasLineBreakBetweenCloseBraceAndLast) + ) { + context.report({ + message: "Unexpected line break after this opening brace.", + node, + loc: openBrace.loc.start, + fix(fixer) { + if (hasCommentsFirstToken) { + return null; + } + + return fixer.removeRange([ + openBrace.range[1], + first.range[0] + ]); + } + }); + } + if ( + (!consistent && hasLineBreakBetweenCloseBraceAndLast) || + (consistent && !hasLineBreakBetweenOpenBraceAndFirst && hasLineBreakBetweenCloseBraceAndLast) + ) { + context.report({ + message: "Unexpected line break before this closing brace.", + node, + loc: closeBrace.loc.start, + fix(fixer) { + if (hasCommentsLastToken) { + return null; + } + + return fixer.removeRange([ + last.range[1], + closeBrace.range[0] + ]); + } + }); + } + } + } + + return { + ObjectExpression: check, + ObjectPattern: check, + ImportDeclaration: check, + ExportNamedDeclaration: check + }; + } +}; diff --git a/node_modules/eslint/lib/rules/object-curly-spacing.js b/node_modules/eslint/lib/rules/object-curly-spacing.js new file mode 100644 index 0000000..b37d6fd --- /dev/null +++ b/node_modules/eslint/lib/rules/object-curly-spacing.js @@ -0,0 +1,300 @@ +/** + * @fileoverview Disallows or enforces spaces inside of object literals. + * @author Jamund Ferguson + */ +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce consistent spacing inside braces", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/object-curly-spacing" + }, + + fixable: "whitespace", + + schema: [ + { + enum: ["always", "never"] + }, + { + type: "object", + properties: { + arraysInObjects: { + type: "boolean" + }, + objectsInObjects: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + const spaced = context.options[0] === "always", + sourceCode = context.getSourceCode(); + + /** + * Determines whether an option is set, relative to the spacing option. + * If spaced is "always", then check whether option is set to false. + * If spaced is "never", then check whether option is set to true. + * @param {Object} option - The option to exclude. + * @returns {boolean} Whether or not the property is excluded. + */ + function isOptionSet(option) { + return context.options[1] ? context.options[1][option] === !spaced : false; + } + + const options = { + spaced, + arraysInObjectsException: isOptionSet("arraysInObjects"), + objectsInObjectsException: isOptionSet("objectsInObjects") + }; + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Reports that there shouldn't be a space after the first token + * @param {ASTNode} node - The node to report in the event of an error. + * @param {Token} token - The token to use for the report. + * @returns {void} + */ + function reportNoBeginningSpace(node, token) { + context.report({ + node, + loc: token.loc.start, + message: "There should be no space after '{{token}}'.", + data: { + token: token.value + }, + fix(fixer) { + const nextToken = context.getSourceCode().getTokenAfter(token); + + return fixer.removeRange([token.range[1], nextToken.range[0]]); + } + }); + } + + /** + * Reports that there shouldn't be a space before the last token + * @param {ASTNode} node - The node to report in the event of an error. + * @param {Token} token - The token to use for the report. + * @returns {void} + */ + function reportNoEndingSpace(node, token) { + context.report({ + node, + loc: token.loc.start, + message: "There should be no space before '{{token}}'.", + data: { + token: token.value + }, + fix(fixer) { + const previousToken = context.getSourceCode().getTokenBefore(token); + + return fixer.removeRange([previousToken.range[1], token.range[0]]); + } + }); + } + + /** + * Reports that there should be a space after the first token + * @param {ASTNode} node - The node to report in the event of an error. + * @param {Token} token - The token to use for the report. + * @returns {void} + */ + function reportRequiredBeginningSpace(node, token) { + context.report({ + node, + loc: token.loc.start, + message: "A space is required after '{{token}}'.", + data: { + token: token.value + }, + fix(fixer) { + return fixer.insertTextAfter(token, " "); + } + }); + } + + /** + * Reports that there should be a space before the last token + * @param {ASTNode} node - The node to report in the event of an error. + * @param {Token} token - The token to use for the report. + * @returns {void} + */ + function reportRequiredEndingSpace(node, token) { + context.report({ + node, + loc: token.loc.start, + message: "A space is required before '{{token}}'.", + data: { + token: token.value + }, + fix(fixer) { + return fixer.insertTextBefore(token, " "); + } + }); + } + + /** + * Determines if spacing in curly braces is valid. + * @param {ASTNode} node The AST node to check. + * @param {Token} first The first token to check (should be the opening brace) + * @param {Token} second The second token to check (should be first after the opening brace) + * @param {Token} penultimate The penultimate token to check (should be last before closing brace) + * @param {Token} last The last token to check (should be closing brace) + * @returns {void} + */ + function validateBraceSpacing(node, first, second, penultimate, last) { + if (astUtils.isTokenOnSameLine(first, second)) { + const firstSpaced = sourceCode.isSpaceBetweenTokens(first, second); + + if (options.spaced && !firstSpaced) { + reportRequiredBeginningSpace(node, first); + } + if (!options.spaced && firstSpaced) { + reportNoBeginningSpace(node, first); + } + } + + if (astUtils.isTokenOnSameLine(penultimate, last)) { + const shouldCheckPenultimate = ( + options.arraysInObjectsException && astUtils.isClosingBracketToken(penultimate) || + options.objectsInObjectsException && astUtils.isClosingBraceToken(penultimate) + ); + const penultimateType = shouldCheckPenultimate && sourceCode.getNodeByRangeIndex(penultimate.range[0]).type; + + const closingCurlyBraceMustBeSpaced = ( + options.arraysInObjectsException && penultimateType === "ArrayExpression" || + options.objectsInObjectsException && (penultimateType === "ObjectExpression" || penultimateType === "ObjectPattern") + ) ? !options.spaced : options.spaced; + + const lastSpaced = sourceCode.isSpaceBetweenTokens(penultimate, last); + + if (closingCurlyBraceMustBeSpaced && !lastSpaced) { + reportRequiredEndingSpace(node, last); + } + if (!closingCurlyBraceMustBeSpaced && lastSpaced) { + reportNoEndingSpace(node, last); + } + } + } + + /** + * Gets '}' token of an object node. + * + * Because the last token of object patterns might be a type annotation, + * this traverses tokens preceded by the last property, then returns the + * first '}' token. + * + * @param {ASTNode} node - The node to get. This node is an + * ObjectExpression or an ObjectPattern. And this node has one or + * more properties. + * @returns {Token} '}' token. + */ + function getClosingBraceOfObject(node) { + const lastProperty = node.properties[node.properties.length - 1]; + + return sourceCode.getTokenAfter(lastProperty, astUtils.isClosingBraceToken); + } + + /** + * Reports a given object node if spacing in curly braces is invalid. + * @param {ASTNode} node - An ObjectExpression or ObjectPattern node to check. + * @returns {void} + */ + function checkForObject(node) { + if (node.properties.length === 0) { + return; + } + + const first = sourceCode.getFirstToken(node), + last = getClosingBraceOfObject(node), + second = sourceCode.getTokenAfter(first), + penultimate = sourceCode.getTokenBefore(last); + + validateBraceSpacing(node, first, second, penultimate, last); + } + + /** + * Reports a given import node if spacing in curly braces is invalid. + * @param {ASTNode} node - An ImportDeclaration node to check. + * @returns {void} + */ + function checkForImport(node) { + if (node.specifiers.length === 0) { + return; + } + + let firstSpecifier = node.specifiers[0]; + const lastSpecifier = node.specifiers[node.specifiers.length - 1]; + + if (lastSpecifier.type !== "ImportSpecifier") { + return; + } + if (firstSpecifier.type !== "ImportSpecifier") { + firstSpecifier = node.specifiers[1]; + } + + const first = sourceCode.getTokenBefore(firstSpecifier), + last = sourceCode.getTokenAfter(lastSpecifier, astUtils.isNotCommaToken), + second = sourceCode.getTokenAfter(first), + penultimate = sourceCode.getTokenBefore(last); + + validateBraceSpacing(node, first, second, penultimate, last); + } + + /** + * Reports a given export node if spacing in curly braces is invalid. + * @param {ASTNode} node - An ExportNamedDeclaration node to check. + * @returns {void} + */ + function checkForExport(node) { + if (node.specifiers.length === 0) { + return; + } + + const firstSpecifier = node.specifiers[0], + lastSpecifier = node.specifiers[node.specifiers.length - 1], + first = sourceCode.getTokenBefore(firstSpecifier), + last = sourceCode.getTokenAfter(lastSpecifier, astUtils.isNotCommaToken), + second = sourceCode.getTokenAfter(first), + penultimate = sourceCode.getTokenBefore(last); + + validateBraceSpacing(node, first, second, penultimate, last); + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + + // var {x} = y; + ObjectPattern: checkForObject, + + // var y = {x: 'y'} + ObjectExpression: checkForObject, + + // import {y} from 'x'; + ImportDeclaration: checkForImport, + + // export {name} from 'yo'; + ExportNamedDeclaration: checkForExport + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/object-property-newline.js b/node_modules/eslint/lib/rules/object-property-newline.js new file mode 100644 index 0000000..65baf0a --- /dev/null +++ b/node_modules/eslint/lib/rules/object-property-newline.js @@ -0,0 +1,91 @@ +/** + * @fileoverview Rule to enforce placing object properties on separate lines. + * @author Vitor Balocco + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce placing object properties on separate lines", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/object-property-newline" + }, + + schema: [ + { + type: "object", + properties: { + allowAllPropertiesOnSameLine: { + type: "boolean" + }, + allowMultiplePropertiesPerLine: { // Deprecated + type: "boolean" + } + }, + additionalProperties: false + } + ], + + fixable: "whitespace" + }, + + create(context) { + const allowSameLine = context.options[0] && ( + Boolean(context.options[0].allowAllPropertiesOnSameLine) || + Boolean(context.options[0].allowMultiplePropertiesPerLine) // Deprecated + ); + const errorMessage = allowSameLine + ? "Object properties must go on a new line if they aren't all on the same line." + : "Object properties must go on a new line."; + + const sourceCode = context.getSourceCode(); + + return { + ObjectExpression(node) { + if (allowSameLine) { + if (node.properties.length > 1) { + const firstTokenOfFirstProperty = sourceCode.getFirstToken(node.properties[0]); + const lastTokenOfLastProperty = sourceCode.getLastToken(node.properties[node.properties.length - 1]); + + if (firstTokenOfFirstProperty.loc.end.line === lastTokenOfLastProperty.loc.start.line) { + + // All keys and values are on the same line + return; + } + } + } + + for (let i = 1; i < node.properties.length; i++) { + const lastTokenOfPreviousProperty = sourceCode.getLastToken(node.properties[i - 1]); + const firstTokenOfCurrentProperty = sourceCode.getFirstToken(node.properties[i]); + + if (lastTokenOfPreviousProperty.loc.end.line === firstTokenOfCurrentProperty.loc.start.line) { + context.report({ + node, + loc: firstTokenOfCurrentProperty.loc.start, + message: errorMessage, + fix(fixer) { + const comma = sourceCode.getTokenBefore(firstTokenOfCurrentProperty); + const rangeAfterComma = [comma.range[1], firstTokenOfCurrentProperty.range[0]]; + + // Don't perform a fix if there are any comments between the comma and the next property. + if (sourceCode.text.slice(rangeAfterComma[0], rangeAfterComma[1]).trim()) { + return null; + } + + return fixer.replaceTextRange(rangeAfterComma, "\n"); + } + }); + } + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/object-shorthand.js b/node_modules/eslint/lib/rules/object-shorthand.js new file mode 100644 index 0000000..c5239a7 --- /dev/null +++ b/node_modules/eslint/lib/rules/object-shorthand.js @@ -0,0 +1,457 @@ +/** + * @fileoverview Rule to enforce concise object methods and properties. + * @author Jamund Ferguson + */ + +"use strict"; + +const OPTIONS = { + always: "always", + never: "never", + methods: "methods", + properties: "properties", + consistent: "consistent", + consistentAsNeeded: "consistent-as-needed" +}; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ +module.exports = { + meta: { + docs: { + description: "require or disallow method and property shorthand syntax for object literals", + category: "ECMAScript 6", + recommended: false, + url: "https://eslint.org/docs/rules/object-shorthand" + }, + + fixable: "code", + + schema: { + anyOf: [ + { + type: "array", + items: [ + { + enum: ["always", "methods", "properties", "never", "consistent", "consistent-as-needed"] + } + ], + minItems: 0, + maxItems: 1 + }, + { + type: "array", + items: [ + { + enum: ["always", "methods", "properties"] + }, + { + type: "object", + properties: { + avoidQuotes: { + type: "boolean" + } + }, + additionalProperties: false + } + ], + minItems: 0, + maxItems: 2 + }, + { + type: "array", + items: [ + { + enum: ["always", "methods"] + }, + { + type: "object", + properties: { + ignoreConstructors: { + type: "boolean" + }, + avoidQuotes: { + type: "boolean" + }, + avoidExplicitReturnArrows: { + type: "boolean" + } + }, + additionalProperties: false + } + ], + minItems: 0, + maxItems: 2 + } + ] + } + }, + + create(context) { + const APPLY = context.options[0] || OPTIONS.always; + const APPLY_TO_METHODS = APPLY === OPTIONS.methods || APPLY === OPTIONS.always; + const APPLY_TO_PROPS = APPLY === OPTIONS.properties || APPLY === OPTIONS.always; + const APPLY_NEVER = APPLY === OPTIONS.never; + const APPLY_CONSISTENT = APPLY === OPTIONS.consistent; + const APPLY_CONSISTENT_AS_NEEDED = APPLY === OPTIONS.consistentAsNeeded; + + const PARAMS = context.options[1] || {}; + const IGNORE_CONSTRUCTORS = PARAMS.ignoreConstructors; + const AVOID_QUOTES = PARAMS.avoidQuotes; + const AVOID_EXPLICIT_RETURN_ARROWS = !!PARAMS.avoidExplicitReturnArrows; + const sourceCode = context.getSourceCode(); + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Determines if the first character of the name is a capital letter. + * @param {string} name The name of the node to evaluate. + * @returns {boolean} True if the first character of the property name is a capital letter, false if not. + * @private + */ + function isConstructor(name) { + const firstChar = name.charAt(0); + + return firstChar === firstChar.toUpperCase(); + } + + /** + * Determines if the property can have a shorthand form. + * @param {ASTNode} property Property AST node + * @returns {boolean} True if the property can have a shorthand form + * @private + * + */ + function canHaveShorthand(property) { + return (property.kind !== "set" && property.kind !== "get" && property.type !== "SpreadElement" && property.type !== "SpreadProperty" && property.type !== "ExperimentalSpreadProperty"); + } + + /** + * Checks whether a node is a string literal. + * @param {ASTNode} node - Any AST node. + * @returns {boolean} `true` if it is a string literal. + */ + function isStringLiteral(node) { + return node.type === "Literal" && typeof node.value === "string"; + } + + /** + * Determines if the property is a shorthand or not. + * @param {ASTNode} property Property AST node + * @returns {boolean} True if the property is considered shorthand, false if not. + * @private + * + */ + function isShorthand(property) { + + // property.method is true when `{a(){}}`. + return (property.shorthand || property.method); + } + + /** + * Determines if the property's key and method or value are named equally. + * @param {ASTNode} property Property AST node + * @returns {boolean} True if the key and value are named equally, false if not. + * @private + * + */ + function isRedundant(property) { + const value = property.value; + + if (value.type === "FunctionExpression") { + return !value.id; // Only anonymous should be shorthand method. + } + if (value.type === "Identifier") { + return astUtils.getStaticPropertyName(property) === value.name; + } + + return false; + } + + /** + * Ensures that an object's properties are consistently shorthand, or not shorthand at all. + * @param {ASTNode} node Property AST node + * @param {boolean} checkRedundancy Whether to check longform redundancy + * @returns {void} + * + */ + function checkConsistency(node, checkRedundancy) { + + // We are excluding getters/setters and spread properties as they are considered neither longform nor shorthand. + const properties = node.properties.filter(canHaveShorthand); + + // Do we still have properties left after filtering the getters and setters? + if (properties.length > 0) { + const shorthandProperties = properties.filter(isShorthand); + + /* + * If we do not have an equal number of longform properties as + * shorthand properties, we are using the annotations inconsistently + */ + if (shorthandProperties.length !== properties.length) { + + // We have at least 1 shorthand property + if (shorthandProperties.length > 0) { + context.report({ node, message: "Unexpected mix of shorthand and non-shorthand properties." }); + } else if (checkRedundancy) { + + /* + * If all properties of the object contain a method or value with a name matching it's key, + * all the keys are redundant. + */ + const canAlwaysUseShorthand = properties.every(isRedundant); + + if (canAlwaysUseShorthand) { + context.report({ node, message: "Expected shorthand for all properties." }); + } + } + } + } + } + + /** + * Fixes a FunctionExpression node by making it into a shorthand property. + * @param {SourceCodeFixer} fixer The fixer object + * @param {ASTNode} node A `Property` node that has a `FunctionExpression` or `ArrowFunctionExpression` as its value + * @returns {Object} A fix for this node + */ + function makeFunctionShorthand(fixer, node) { + const firstKeyToken = node.computed + ? sourceCode.getFirstToken(node, astUtils.isOpeningBracketToken) + : sourceCode.getFirstToken(node.key); + const lastKeyToken = node.computed + ? sourceCode.getFirstTokenBetween(node.key, node.value, astUtils.isClosingBracketToken) + : sourceCode.getLastToken(node.key); + const keyText = sourceCode.text.slice(firstKeyToken.range[0], lastKeyToken.range[1]); + let keyPrefix = ""; + + if (node.value.async) { + keyPrefix += "async "; + } + if (node.value.generator) { + keyPrefix += "*"; + } + + if (node.value.type === "FunctionExpression") { + const functionToken = sourceCode.getTokens(node.value).find(token => token.type === "Keyword" && token.value === "function"); + const tokenBeforeParams = node.value.generator ? sourceCode.getTokenAfter(functionToken) : functionToken; + + return fixer.replaceTextRange( + [firstKeyToken.range[0], node.range[1]], + keyPrefix + keyText + sourceCode.text.slice(tokenBeforeParams.range[1], node.value.range[1]) + ); + } + const arrowToken = sourceCode.getTokens(node.value).find(token => token.value === "=>"); + const tokenBeforeArrow = sourceCode.getTokenBefore(arrowToken); + const hasParensAroundParameters = tokenBeforeArrow.type === "Punctuator" && tokenBeforeArrow.value === ")"; + const oldParamText = sourceCode.text.slice(sourceCode.getFirstToken(node.value, node.value.async ? 1 : 0).range[0], tokenBeforeArrow.range[1]); + const newParamText = hasParensAroundParameters ? oldParamText : `(${oldParamText})`; + + return fixer.replaceTextRange( + [firstKeyToken.range[0], node.range[1]], + keyPrefix + keyText + newParamText + sourceCode.text.slice(arrowToken.range[1], node.value.range[1]) + ); + + } + + /** + * Fixes a FunctionExpression node by making it into a longform property. + * @param {SourceCodeFixer} fixer The fixer object + * @param {ASTNode} node A `Property` node that has a `FunctionExpression` as its value + * @returns {Object} A fix for this node + */ + function makeFunctionLongform(fixer, node) { + const firstKeyToken = node.computed ? sourceCode.getTokens(node).find(token => token.value === "[") : sourceCode.getFirstToken(node.key); + const lastKeyToken = node.computed ? sourceCode.getTokensBetween(node.key, node.value).find(token => token.value === "]") : sourceCode.getLastToken(node.key); + const keyText = sourceCode.text.slice(firstKeyToken.range[0], lastKeyToken.range[1]); + let functionHeader = "function"; + + if (node.value.async) { + functionHeader = `async ${functionHeader}`; + } + if (node.value.generator) { + functionHeader = `${functionHeader}*`; + } + + return fixer.replaceTextRange([node.range[0], lastKeyToken.range[1]], `${keyText}: ${functionHeader}`); + } + + /* + * To determine whether a given arrow function has a lexical identifier (`this`, `arguments`, `super`, or `new.target`), + * create a stack of functions that define these identifiers (i.e. all functions except arrow functions) as the AST is + * traversed. Whenever a new function is encountered, create a new entry on the stack (corresponding to a different lexical + * scope of `this`), and whenever a function is exited, pop that entry off the stack. When an arrow function is entered, + * keep a reference to it on the current stack entry, and remove that reference when the arrow function is exited. + * When a lexical identifier is encountered, mark all the arrow functions on the current stack entry by adding them + * to an `arrowsWithLexicalIdentifiers` set. Any arrow function in that set will not be reported by this rule, + * because converting it into a method would change the value of one of the lexical identifiers. + */ + const lexicalScopeStack = []; + const arrowsWithLexicalIdentifiers = new WeakSet(); + const argumentsIdentifiers = new WeakSet(); + + /** + * Enters a function. This creates a new lexical identifier scope, so a new Set of arrow functions is pushed onto the stack. + * Also, this marks all `arguments` identifiers so that they can be detected later. + * @returns {void} + */ + function enterFunction() { + lexicalScopeStack.unshift(new Set()); + context.getScope().variables.filter(variable => variable.name === "arguments").forEach(variable => { + variable.references.map(ref => ref.identifier).forEach(identifier => argumentsIdentifiers.add(identifier)); + }); + } + + /** + * Exits a function. This pops the current set of arrow functions off the lexical scope stack. + * @returns {void} + */ + function exitFunction() { + lexicalScopeStack.shift(); + } + + /** + * Marks the current function as having a lexical keyword. This implies that all arrow functions + * in the current lexical scope contain a reference to this lexical keyword. + * @returns {void} + */ + function reportLexicalIdentifier() { + lexicalScopeStack[0].forEach(arrowFunction => arrowsWithLexicalIdentifiers.add(arrowFunction)); + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + Program: enterFunction, + FunctionDeclaration: enterFunction, + FunctionExpression: enterFunction, + "Program:exit": exitFunction, + "FunctionDeclaration:exit": exitFunction, + "FunctionExpression:exit": exitFunction, + + ArrowFunctionExpression(node) { + lexicalScopeStack[0].add(node); + }, + "ArrowFunctionExpression:exit"(node) { + lexicalScopeStack[0].delete(node); + }, + + ThisExpression: reportLexicalIdentifier, + Super: reportLexicalIdentifier, + MetaProperty(node) { + if (node.meta.name === "new" && node.property.name === "target") { + reportLexicalIdentifier(); + } + }, + Identifier(node) { + if (argumentsIdentifiers.has(node)) { + reportLexicalIdentifier(); + } + }, + + ObjectExpression(node) { + if (APPLY_CONSISTENT) { + checkConsistency(node, false); + } else if (APPLY_CONSISTENT_AS_NEEDED) { + checkConsistency(node, true); + } + }, + + "Property:exit"(node) { + const isConciseProperty = node.method || node.shorthand; + + // Ignore destructuring assignment + if (node.parent.type === "ObjectPattern") { + return; + } + + // getters and setters are ignored + if (node.kind === "get" || node.kind === "set") { + return; + } + + // only computed methods can fail the following checks + if (node.computed && node.value.type !== "FunctionExpression" && node.value.type !== "ArrowFunctionExpression") { + return; + } + + //-------------------------------------------------------------- + // Checks for property/method shorthand. + if (isConciseProperty) { + if (node.method && (APPLY_NEVER || AVOID_QUOTES && isStringLiteral(node.key))) { + const message = APPLY_NEVER ? "Expected longform method syntax." : "Expected longform method syntax for string literal keys."; + + // { x() {} } should be written as { x: function() {} } + context.report({ + node, + message, + fix: fixer => makeFunctionLongform(fixer, node) + }); + } else if (APPLY_NEVER) { + + // { x } should be written as { x: x } + context.report({ + node, + message: "Expected longform property syntax.", + fix: fixer => fixer.insertTextAfter(node.key, `: ${node.key.name}`) + }); + } + } else if (APPLY_TO_METHODS && !node.value.id && (node.value.type === "FunctionExpression" || node.value.type === "ArrowFunctionExpression")) { + if (IGNORE_CONSTRUCTORS && node.key.type === "Identifier" && isConstructor(node.key.name)) { + return; + } + if (AVOID_QUOTES && isStringLiteral(node.key)) { + return; + } + + // {[x]: function(){}} should be written as {[x]() {}} + if (node.value.type === "FunctionExpression" || + node.value.type === "ArrowFunctionExpression" && + node.value.body.type === "BlockStatement" && + AVOID_EXPLICIT_RETURN_ARROWS && + !arrowsWithLexicalIdentifiers.has(node.value) + ) { + context.report({ + node, + message: "Expected method shorthand.", + fix: fixer => makeFunctionShorthand(fixer, node) + }); + } + } else if (node.value.type === "Identifier" && node.key.name === node.value.name && APPLY_TO_PROPS) { + + // {x: x} should be written as {x} + context.report({ + node, + message: "Expected property shorthand.", + fix(fixer) { + return fixer.replaceText(node, node.value.name); + } + }); + } else if (node.value.type === "Identifier" && node.key.type === "Literal" && node.key.value === node.value.name && APPLY_TO_PROPS) { + if (AVOID_QUOTES) { + return; + } + + // {"x": x} should be written as {x} + context.report({ + node, + message: "Expected property shorthand.", + fix(fixer) { + return fixer.replaceText(node, node.value.name); + } + }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/one-var-declaration-per-line.js b/node_modules/eslint/lib/rules/one-var-declaration-per-line.js new file mode 100644 index 0000000..e17529b --- /dev/null +++ b/node_modules/eslint/lib/rules/one-var-declaration-per-line.js @@ -0,0 +1,87 @@ +/** + * @fileoverview Rule to check multiple var declarations per line + * @author Alberto Rodríguez + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require or disallow newlines around variable declarations", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/one-var-declaration-per-line" + }, + + schema: [ + { + enum: ["always", "initializations"] + } + ], + + fixable: "whitespace" + }, + + create(context) { + + const ERROR_MESSAGE = "Expected variable declaration to be on a new line."; + const always = context.options[0] === "always"; + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + + /** + * Determine if provided keyword is a variant of for specifiers + * @private + * @param {string} keyword - keyword to test + * @returns {boolean} True if `keyword` is a variant of for specifier + */ + function isForTypeSpecifier(keyword) { + return keyword === "ForStatement" || keyword === "ForInStatement" || keyword === "ForOfStatement"; + } + + /** + * Checks newlines around variable declarations. + * @private + * @param {ASTNode} node - `VariableDeclaration` node to test + * @returns {void} + */ + function checkForNewLine(node) { + if (isForTypeSpecifier(node.parent.type)) { + return; + } + + const declarations = node.declarations; + let prev; + + declarations.forEach(current => { + if (prev && prev.loc.end.line === current.loc.start.line) { + if (always || prev.init || current.init) { + context.report({ + node, + message: ERROR_MESSAGE, + loc: current.loc.start, + fix: fixer => fixer.insertTextBefore(current, "\n") + }); + } + } + prev = current; + }); + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + VariableDeclaration: checkForNewLine + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/one-var.js b/node_modules/eslint/lib/rules/one-var.js new file mode 100644 index 0000000..cd09444 --- /dev/null +++ b/node_modules/eslint/lib/rules/one-var.js @@ -0,0 +1,401 @@ +/** + * @fileoverview A rule to control the use of single variable declarations. + * @author Ian Christian Myers + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce variables to be declared either together or separately in functions", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/one-var" + }, + + schema: [ + { + oneOf: [ + { + enum: ["always", "never"] + }, + { + type: "object", + properties: { + separateRequires: { + type: "boolean" + }, + var: { + enum: ["always", "never"] + }, + let: { + enum: ["always", "never"] + }, + const: { + enum: ["always", "never"] + } + }, + additionalProperties: false + }, + { + type: "object", + properties: { + initialized: { + enum: ["always", "never"] + }, + uninitialized: { + enum: ["always", "never"] + } + }, + additionalProperties: false + } + ] + } + ] + }, + + create(context) { + + const MODE_ALWAYS = "always", + MODE_NEVER = "never"; + + const mode = context.options[0] || MODE_ALWAYS; + + const options = {}; + + if (typeof mode === "string") { // simple options configuration with just a string + options.var = { uninitialized: mode, initialized: mode }; + options.let = { uninitialized: mode, initialized: mode }; + options.const = { uninitialized: mode, initialized: mode }; + } else if (typeof mode === "object") { // options configuration is an object + if (mode.hasOwnProperty("separateRequires")) { + options.separateRequires = !!mode.separateRequires; + } + if (mode.hasOwnProperty("var")) { + options.var = { uninitialized: mode.var, initialized: mode.var }; + } + if (mode.hasOwnProperty("let")) { + options.let = { uninitialized: mode.let, initialized: mode.let }; + } + if (mode.hasOwnProperty("const")) { + options.const = { uninitialized: mode.const, initialized: mode.const }; + } + if (mode.hasOwnProperty("uninitialized")) { + if (!options.var) { + options.var = {}; + } + if (!options.let) { + options.let = {}; + } + if (!options.const) { + options.const = {}; + } + options.var.uninitialized = mode.uninitialized; + options.let.uninitialized = mode.uninitialized; + options.const.uninitialized = mode.uninitialized; + } + if (mode.hasOwnProperty("initialized")) { + if (!options.var) { + options.var = {}; + } + if (!options.let) { + options.let = {}; + } + if (!options.const) { + options.const = {}; + } + options.var.initialized = mode.initialized; + options.let.initialized = mode.initialized; + options.const.initialized = mode.initialized; + } + } + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + const functionStack = []; + const blockStack = []; + + /** + * Increments the blockStack counter. + * @returns {void} + * @private + */ + function startBlock() { + blockStack.push({ + let: { initialized: false, uninitialized: false }, + const: { initialized: false, uninitialized: false } + }); + } + + /** + * Increments the functionStack counter. + * @returns {void} + * @private + */ + function startFunction() { + functionStack.push({ initialized: false, uninitialized: false }); + startBlock(); + } + + /** + * Decrements the blockStack counter. + * @returns {void} + * @private + */ + function endBlock() { + blockStack.pop(); + } + + /** + * Decrements the functionStack counter. + * @returns {void} + * @private + */ + function endFunction() { + functionStack.pop(); + endBlock(); + } + + /** + * Check if a variable declaration is a require. + * @param {ASTNode} decl variable declaration Node + * @returns {bool} if decl is a require, return true; else return false. + * @private + */ + function isRequire(decl) { + return decl.init && decl.init.type === "CallExpression" && decl.init.callee.name === "require"; + } + + /** + * Records whether initialized/uninitialized/required variables are defined in current scope. + * @param {string} statementType node.kind, one of: "var", "let", or "const" + * @param {ASTNode[]} declarations List of declarations + * @param {Object} currentScope The scope being investigated + * @returns {void} + * @private + */ + function recordTypes(statementType, declarations, currentScope) { + for (let i = 0; i < declarations.length; i++) { + if (declarations[i].init === null) { + if (options[statementType] && options[statementType].uninitialized === MODE_ALWAYS) { + currentScope.uninitialized = true; + } + } else { + if (options[statementType] && options[statementType].initialized === MODE_ALWAYS) { + if (options.separateRequires && isRequire(declarations[i])) { + currentScope.required = true; + } else { + currentScope.initialized = true; + } + } + } + } + } + + /** + * Determines the current scope (function or block) + * @param {string} statementType node.kind, one of: "var", "let", or "const" + * @returns {Object} The scope associated with statementType + */ + function getCurrentScope(statementType) { + let currentScope; + + if (statementType === "var") { + currentScope = functionStack[functionStack.length - 1]; + } else if (statementType === "let") { + currentScope = blockStack[blockStack.length - 1].let; + } else if (statementType === "const") { + currentScope = blockStack[blockStack.length - 1].const; + } + return currentScope; + } + + /** + * Counts the number of initialized and uninitialized declarations in a list of declarations + * @param {ASTNode[]} declarations List of declarations + * @returns {Object} Counts of 'uninitialized' and 'initialized' declarations + * @private + */ + function countDeclarations(declarations) { + const counts = { uninitialized: 0, initialized: 0 }; + + for (let i = 0; i < declarations.length; i++) { + if (declarations[i].init === null) { + counts.uninitialized++; + } else { + counts.initialized++; + } + } + return counts; + } + + /** + * Determines if there is more than one var statement in the current scope. + * @param {string} statementType node.kind, one of: "var", "let", or "const" + * @param {ASTNode[]} declarations List of declarations + * @returns {boolean} Returns true if it is the first var declaration, false if not. + * @private + */ + function hasOnlyOneStatement(statementType, declarations) { + + const declarationCounts = countDeclarations(declarations); + const currentOptions = options[statementType] || {}; + const currentScope = getCurrentScope(statementType); + const hasRequires = declarations.some(isRequire); + + if (currentOptions.uninitialized === MODE_ALWAYS && currentOptions.initialized === MODE_ALWAYS) { + if (currentScope.uninitialized || currentScope.initialized) { + return false; + } + } + + if (declarationCounts.uninitialized > 0) { + if (currentOptions.uninitialized === MODE_ALWAYS && currentScope.uninitialized) { + return false; + } + } + if (declarationCounts.initialized > 0) { + if (currentOptions.initialized === MODE_ALWAYS && currentScope.initialized) { + return false; + } + } + if (currentScope.required && hasRequires) { + return false; + } + recordTypes(statementType, declarations, currentScope); + return true; + } + + + //-------------------------------------------------------------------------- + // Public API + //-------------------------------------------------------------------------- + + return { + Program: startFunction, + FunctionDeclaration: startFunction, + FunctionExpression: startFunction, + ArrowFunctionExpression: startFunction, + BlockStatement: startBlock, + ForStatement: startBlock, + ForInStatement: startBlock, + ForOfStatement: startBlock, + SwitchStatement: startBlock, + + VariableDeclaration(node) { + const parent = node.parent; + const type = node.kind; + + if (!options[type]) { + return; + } + + const declarations = node.declarations; + const declarationCounts = countDeclarations(declarations); + const mixedRequires = declarations.some(isRequire) && !declarations.every(isRequire); + + if (options[type].initialized === MODE_ALWAYS) { + if (options.separateRequires && mixedRequires) { + context.report({ + node, + message: "Split requires to be separated into a single block." + }); + } + } + + // always + if (!hasOnlyOneStatement(type, declarations)) { + if (options[type].initialized === MODE_ALWAYS && options[type].uninitialized === MODE_ALWAYS) { + context.report({ + node, + message: "Combine this with the previous '{{type}}' statement.", + data: { + type + } + }); + } else { + if (options[type].initialized === MODE_ALWAYS) { + context.report({ + node, + message: "Combine this with the previous '{{type}}' statement with initialized variables.", + data: { + type + } + }); + } + if (options[type].uninitialized === MODE_ALWAYS) { + if (node.parent.left === node && (node.parent.type === "ForInStatement" || node.parent.type === "ForOfStatement")) { + return; + } + context.report({ + node, + message: "Combine this with the previous '{{type}}' statement with uninitialized variables.", + data: { + type + } + }); + } + } + } + + // never + if (parent.type !== "ForStatement" || parent.init !== node) { + const totalDeclarations = declarationCounts.uninitialized + declarationCounts.initialized; + + if (totalDeclarations > 1) { + + if (options[type].initialized === MODE_NEVER && options[type].uninitialized === MODE_NEVER) { + + // both initialized and uninitialized + context.report({ + node, + message: "Split '{{type}}' declarations into multiple statements.", + data: { + type + } + }); + } else if (options[type].initialized === MODE_NEVER && declarationCounts.initialized > 0) { + + // initialized + context.report({ + node, + message: "Split initialized '{{type}}' declarations into multiple statements.", + data: { + type + } + }); + } else if (options[type].uninitialized === MODE_NEVER && declarationCounts.uninitialized > 0) { + + // uninitialized + context.report({ + node, + message: "Split uninitialized '{{type}}' declarations into multiple statements.", + data: { + type + } + }); + } + } + } + }, + + "ForStatement:exit": endBlock, + "ForOfStatement:exit": endBlock, + "ForInStatement:exit": endBlock, + "SwitchStatement:exit": endBlock, + "BlockStatement:exit": endBlock, + "Program:exit": endFunction, + "FunctionDeclaration:exit": endFunction, + "FunctionExpression:exit": endFunction, + "ArrowFunctionExpression:exit": endFunction + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/operator-assignment.js b/node_modules/eslint/lib/rules/operator-assignment.js new file mode 100644 index 0000000..ad516bb --- /dev/null +++ b/node_modules/eslint/lib/rules/operator-assignment.js @@ -0,0 +1,207 @@ +/** + * @fileoverview Rule to replace assignment expressions with operator assignment + * @author Brandon Mills + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks whether an operator is commutative and has an operator assignment + * shorthand form. + * @param {string} operator Operator to check. + * @returns {boolean} True if the operator is commutative and has a + * shorthand form. + */ +function isCommutativeOperatorWithShorthand(operator) { + return ["*", "&", "^", "|"].indexOf(operator) >= 0; +} + +/** + * Checks whether an operator is not commuatative and has an operator assignment + * shorthand form. + * @param {string} operator Operator to check. + * @returns {boolean} True if the operator is not commuatative and has + * a shorthand form. + */ +function isNonCommutativeOperatorWithShorthand(operator) { + return ["+", "-", "/", "%", "<<", ">>", ">>>", "**"].indexOf(operator) >= 0; +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +/** + * Checks whether two expressions reference the same value. For example: + * a = a + * a.b = a.b + * a[0] = a[0] + * a['b'] = a['b'] + * @param {ASTNode} a Left side of the comparison. + * @param {ASTNode} b Right side of the comparison. + * @returns {boolean} True if both sides match and reference the same value. + */ +function same(a, b) { + if (a.type !== b.type) { + return false; + } + + switch (a.type) { + case "Identifier": + return a.name === b.name; + + case "Literal": + return a.value === b.value; + + case "MemberExpression": + + /* + * x[0] = x[0] + * x[y] = x[y] + * x.y = x.y + */ + return same(a.object, b.object) && same(a.property, b.property); + + default: + return false; + } +} + +/** + * Determines if the left side of a node can be safely fixed (i.e. if it activates the same getters/setters and) + * toString calls regardless of whether assignment shorthand is used) + * @param {ASTNode} node The node on the left side of the expression + * @returns {boolean} `true` if the node can be fixed + */ +function canBeFixed(node) { + return node.type === "Identifier" || + node.type === "MemberExpression" && node.object.type === "Identifier" && (!node.computed || node.property.type === "Literal"); +} + +module.exports = { + meta: { + docs: { + description: "require or disallow assignment operator shorthand where possible", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/operator-assignment" + }, + + schema: [ + { + enum: ["always", "never"] + } + ], + + fixable: "code" + }, + + create(context) { + + const sourceCode = context.getSourceCode(); + + /** + * Returns the operator token of an AssignmentExpression or BinaryExpression + * @param {ASTNode} node An AssignmentExpression or BinaryExpression node + * @returns {Token} The operator token in the node + */ + function getOperatorToken(node) { + return sourceCode.getFirstTokenBetween(node.left, node.right, token => token.value === node.operator); + } + + /** + * Ensures that an assignment uses the shorthand form where possible. + * @param {ASTNode} node An AssignmentExpression node. + * @returns {void} + */ + function verify(node) { + if (node.operator !== "=" || node.right.type !== "BinaryExpression") { + return; + } + + const left = node.left; + const expr = node.right; + const operator = expr.operator; + + if (isCommutativeOperatorWithShorthand(operator) || isNonCommutativeOperatorWithShorthand(operator)) { + if (same(left, expr.left)) { + context.report({ + node, + message: "Assignment can be replaced with operator assignment.", + fix(fixer) { + if (canBeFixed(left)) { + const equalsToken = getOperatorToken(node); + const operatorToken = getOperatorToken(expr); + const leftText = sourceCode.getText().slice(node.range[0], equalsToken.range[0]); + const rightText = sourceCode.getText().slice(operatorToken.range[1], node.right.range[1]); + + return fixer.replaceText(node, `${leftText}${expr.operator}=${rightText}`); + } + return null; + } + }); + } else if (same(left, expr.right) && isCommutativeOperatorWithShorthand(operator)) { + + /* + * This case can't be fixed safely. + * If `a` and `b` both have custom valueOf() behavior, then fixing `a = b * a` to `a *= b` would + * change the execution order of the valueOf() functions. + */ + context.report({ + node, + message: "Assignment can be replaced with operator assignment." + }); + } + } + } + + /** + * Warns if an assignment expression uses operator assignment shorthand. + * @param {ASTNode} node An AssignmentExpression node. + * @returns {void} + */ + function prohibit(node) { + if (node.operator !== "=") { + context.report({ + node, + message: "Unexpected operator assignment shorthand.", + fix(fixer) { + if (canBeFixed(node.left)) { + const operatorToken = getOperatorToken(node); + const leftText = sourceCode.getText().slice(node.range[0], operatorToken.range[0]); + const newOperator = node.operator.slice(0, -1); + let rightText; + + // If this change would modify precedence (e.g. `foo *= bar + 1` => `foo = foo * (bar + 1)`), parenthesize the right side. + if ( + astUtils.getPrecedence(node.right) <= astUtils.getPrecedence({ type: "BinaryExpression", operator: newOperator }) && + !astUtils.isParenthesised(sourceCode, node.right) + ) { + rightText = `${sourceCode.text.slice(operatorToken.range[1], node.right.range[0])}(${sourceCode.getText(node.right)})`; + } else { + rightText = sourceCode.text.slice(operatorToken.range[1], node.range[1]); + } + + return fixer.replaceText(node, `${leftText}= ${leftText}${newOperator}${rightText}`); + } + return null; + } + }); + } + } + + return { + AssignmentExpression: context.options[0] !== "never" ? verify : prohibit + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/operator-linebreak.js b/node_modules/eslint/lib/rules/operator-linebreak.js new file mode 100644 index 0000000..558258b --- /dev/null +++ b/node_modules/eslint/lib/rules/operator-linebreak.js @@ -0,0 +1,253 @@ +/** + * @fileoverview Operator linebreak - enforces operator linebreak style of two types: after and before + * @author Benoît Zugmeyer + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce consistent linebreak style for operators", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/operator-linebreak" + }, + + schema: [ + { + enum: ["after", "before", "none", null] + }, + { + type: "object", + properties: { + overrides: { + type: "object", + properties: { + anyOf: { + type: "string", + enum: ["after", "before", "none", "ignore"] + } + } + } + }, + additionalProperties: false + } + ], + + fixable: "code" + }, + + create(context) { + + const usedDefaultGlobal = !context.options[0]; + const globalStyle = context.options[0] || "after"; + const options = context.options[1] || {}; + const styleOverrides = options.overrides ? Object.assign({}, options.overrides) : {}; + + if (usedDefaultGlobal && !styleOverrides["?"]) { + styleOverrides["?"] = "before"; + } + + if (usedDefaultGlobal && !styleOverrides[":"]) { + styleOverrides[":"] = "before"; + } + + const sourceCode = context.getSourceCode(); + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Gets a fixer function to fix rule issues + * @param {Token} operatorToken The operator token of an expression + * @param {string} desiredStyle The style for the rule. One of 'before', 'after', 'none' + * @returns {Function} A fixer function + */ + function getFixer(operatorToken, desiredStyle) { + return fixer => { + const tokenBefore = sourceCode.getTokenBefore(operatorToken); + const tokenAfter = sourceCode.getTokenAfter(operatorToken); + const textBefore = sourceCode.text.slice(tokenBefore.range[1], operatorToken.range[0]); + const textAfter = sourceCode.text.slice(operatorToken.range[1], tokenAfter.range[0]); + const hasLinebreakBefore = !astUtils.isTokenOnSameLine(tokenBefore, operatorToken); + const hasLinebreakAfter = !astUtils.isTokenOnSameLine(operatorToken, tokenAfter); + let newTextBefore, newTextAfter; + + if (hasLinebreakBefore !== hasLinebreakAfter && desiredStyle !== "none") { + + // If there is a comment before and after the operator, don't do a fix. + if (sourceCode.getTokenBefore(operatorToken, { includeComments: true }) !== tokenBefore && + sourceCode.getTokenAfter(operatorToken, { includeComments: true }) !== tokenAfter) { + + return null; + } + + /* + * If there is only one linebreak and it's on the wrong side of the operator, swap the text before and after the operator. + * foo && + * bar + * would get fixed to + * foo + * && bar + */ + newTextBefore = textAfter; + newTextAfter = textBefore; + } else { + const LINEBREAK_REGEX = astUtils.createGlobalLinebreakMatcher(); + + // Otherwise, if no linebreak is desired and no comments interfere, replace the linebreaks with empty strings. + newTextBefore = desiredStyle === "before" || textBefore.trim() ? textBefore : textBefore.replace(LINEBREAK_REGEX, ""); + newTextAfter = desiredStyle === "after" || textAfter.trim() ? textAfter : textAfter.replace(LINEBREAK_REGEX, ""); + + // If there was no change (due to interfering comments), don't output a fix. + if (newTextBefore === textBefore && newTextAfter === textAfter) { + return null; + } + } + + if (newTextAfter === "" && tokenAfter.type === "Punctuator" && "+-".includes(operatorToken.value) && tokenAfter.value === operatorToken.value) { + + // To avoid accidentally creating a ++ or -- operator, insert a space if the operator is a +/- and the following token is a unary +/-. + newTextAfter += " "; + } + + return fixer.replaceTextRange([tokenBefore.range[1], tokenAfter.range[0]], newTextBefore + operatorToken.value + newTextAfter); + }; + } + + /** + * Checks the operator placement + * @param {ASTNode} node The node to check + * @param {ASTNode} leftSide The node that comes before the operator in `node` + * @private + * @returns {void} + */ + function validateNode(node, leftSide) { + + /* + * When the left part of a binary expression is a single expression wrapped in + * parentheses (ex: `(a) + b`), leftToken will be the last token of the expression + * and operatorToken will be the closing parenthesis. + * The leftToken should be the last closing parenthesis, and the operatorToken + * should be the token right after that. + */ + const operatorToken = sourceCode.getTokenAfter(leftSide, astUtils.isNotClosingParenToken); + const leftToken = sourceCode.getTokenBefore(operatorToken); + const rightToken = sourceCode.getTokenAfter(operatorToken); + const operator = operatorToken.value; + const operatorStyleOverride = styleOverrides[operator]; + const style = operatorStyleOverride || globalStyle; + const fix = getFixer(operatorToken, style); + + // if single line + if (astUtils.isTokenOnSameLine(leftToken, operatorToken) && + astUtils.isTokenOnSameLine(operatorToken, rightToken)) { + + // do nothing. + + } else if (operatorStyleOverride !== "ignore" && !astUtils.isTokenOnSameLine(leftToken, operatorToken) && + !astUtils.isTokenOnSameLine(operatorToken, rightToken)) { + + // lone operator + context.report({ + node, + loc: { + line: operatorToken.loc.end.line, + column: operatorToken.loc.end.column + }, + message: "Bad line breaking before and after '{{operator}}'.", + data: { + operator + }, + fix + }); + + } else if (style === "before" && astUtils.isTokenOnSameLine(leftToken, operatorToken)) { + + context.report({ + node, + loc: { + line: operatorToken.loc.end.line, + column: operatorToken.loc.end.column + }, + message: "'{{operator}}' should be placed at the beginning of the line.", + data: { + operator + }, + fix + }); + + } else if (style === "after" && astUtils.isTokenOnSameLine(operatorToken, rightToken)) { + + context.report({ + node, + loc: { + line: operatorToken.loc.end.line, + column: operatorToken.loc.end.column + }, + message: "'{{operator}}' should be placed at the end of the line.", + data: { + operator + }, + fix + }); + + } else if (style === "none") { + + context.report({ + node, + loc: { + line: operatorToken.loc.end.line, + column: operatorToken.loc.end.column + }, + message: "There should be no line break before or after '{{operator}}'.", + data: { + operator + }, + fix + }); + + } + } + + /** + * Validates a binary expression using `validateNode` + * @param {BinaryExpression|LogicalExpression|AssignmentExpression} node node to be validated + * @returns {void} + */ + function validateBinaryExpression(node) { + validateNode(node, node.left); + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + BinaryExpression: validateBinaryExpression, + LogicalExpression: validateBinaryExpression, + AssignmentExpression: validateBinaryExpression, + VariableDeclarator(node) { + if (node.init) { + validateNode(node, node.id); + } + }, + ConditionalExpression(node) { + validateNode(node, node.test); + validateNode(node, node.consequent); + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/padded-blocks.js b/node_modules/eslint/lib/rules/padded-blocks.js new file mode 100644 index 0000000..2fbb267 --- /dev/null +++ b/node_modules/eslint/lib/rules/padded-blocks.js @@ -0,0 +1,257 @@ +/** + * @fileoverview A rule to ensure blank lines within blocks. + * @author Mathias Schreck + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require or disallow padding within blocks", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/padded-blocks" + }, + + fixable: "whitespace", + + schema: [ + { + oneOf: [ + { + enum: ["always", "never"] + }, + { + type: "object", + properties: { + blocks: { + enum: ["always", "never"] + }, + switches: { + enum: ["always", "never"] + }, + classes: { + enum: ["always", "never"] + } + }, + additionalProperties: false, + minProperties: 1 + } + ] + } + ] + }, + + create(context) { + const options = {}; + const config = context.options[0] || "always"; + + if (typeof config === "string") { + const shouldHavePadding = config === "always"; + + options.blocks = shouldHavePadding; + options.switches = shouldHavePadding; + options.classes = shouldHavePadding; + } else { + if (config.hasOwnProperty("blocks")) { + options.blocks = config.blocks === "always"; + } + if (config.hasOwnProperty("switches")) { + options.switches = config.switches === "always"; + } + if (config.hasOwnProperty("classes")) { + options.classes = config.classes === "always"; + } + } + + const ALWAYS_MESSAGE = "Block must be padded by blank lines.", + NEVER_MESSAGE = "Block must not be padded by blank lines."; + + const sourceCode = context.getSourceCode(); + + /** + * Gets the open brace token from a given node. + * @param {ASTNode} node - A BlockStatement or SwitchStatement node from which to get the open brace. + * @returns {Token} The token of the open brace. + */ + function getOpenBrace(node) { + if (node.type === "SwitchStatement") { + return sourceCode.getTokenBefore(node.cases[0]); + } + return sourceCode.getFirstToken(node); + } + + /** + * Checks if the given parameter is a comment node + * @param {ASTNode|Token} node An AST node or token + * @returns {boolean} True if node is a comment + */ + function isComment(node) { + return node.type === "Line" || node.type === "Block"; + } + + /** + * Checks if there is padding between two tokens + * @param {Token} first The first token + * @param {Token} second The second token + * @returns {boolean} True if there is at least a line between the tokens + */ + function isPaddingBetweenTokens(first, second) { + return second.loc.start.line - first.loc.end.line >= 2; + } + + + /** + * Checks if the given token has a blank line after it. + * @param {Token} token The token to check. + * @returns {boolean} Whether or not the token is followed by a blank line. + */ + function getFirstBlockToken(token) { + let prev, + first = token; + + do { + prev = first; + first = sourceCode.getTokenAfter(first, { includeComments: true }); + } while (isComment(first) && first.loc.start.line === prev.loc.end.line); + + return first; + } + + /** + * Checks if the given token is preceeded by a blank line. + * @param {Token} token The token to check + * @returns {boolean} Whether or not the token is preceeded by a blank line + */ + function getLastBlockToken(token) { + let last = token, + next; + + do { + next = last; + last = sourceCode.getTokenBefore(last, { includeComments: true }); + } while (isComment(last) && last.loc.end.line === next.loc.start.line); + + return last; + } + + /** + * Checks if a node should be padded, according to the rule config. + * @param {ASTNode} node The AST node to check. + * @returns {boolean} True if the node should be padded, false otherwise. + */ + function requirePaddingFor(node) { + switch (node.type) { + case "BlockStatement": + return options.blocks; + case "SwitchStatement": + return options.switches; + case "ClassBody": + return options.classes; + + /* istanbul ignore next */ + default: + throw new Error("unreachable"); + } + } + + /** + * Checks the given BlockStatement node to be padded if the block is not empty. + * @param {ASTNode} node The AST node of a BlockStatement. + * @returns {void} undefined. + */ + function checkPadding(node) { + const openBrace = getOpenBrace(node), + firstBlockToken = getFirstBlockToken(openBrace), + tokenBeforeFirst = sourceCode.getTokenBefore(firstBlockToken, { includeComments: true }), + closeBrace = sourceCode.getLastToken(node), + lastBlockToken = getLastBlockToken(closeBrace), + tokenAfterLast = sourceCode.getTokenAfter(lastBlockToken, { includeComments: true }), + blockHasTopPadding = isPaddingBetweenTokens(tokenBeforeFirst, firstBlockToken), + blockHasBottomPadding = isPaddingBetweenTokens(lastBlockToken, tokenAfterLast); + + if (requirePaddingFor(node)) { + if (!blockHasTopPadding) { + context.report({ + node, + loc: { line: tokenBeforeFirst.loc.start.line, column: tokenBeforeFirst.loc.start.column }, + fix(fixer) { + return fixer.insertTextAfter(tokenBeforeFirst, "\n"); + }, + message: ALWAYS_MESSAGE + }); + } + if (!blockHasBottomPadding) { + context.report({ + node, + loc: { line: tokenAfterLast.loc.end.line, column: tokenAfterLast.loc.end.column - 1 }, + fix(fixer) { + return fixer.insertTextBefore(tokenAfterLast, "\n"); + }, + message: ALWAYS_MESSAGE + }); + } + } else { + if (blockHasTopPadding) { + + context.report({ + node, + loc: { line: tokenBeforeFirst.loc.start.line, column: tokenBeforeFirst.loc.start.column }, + fix(fixer) { + return fixer.replaceTextRange([tokenBeforeFirst.range[1], firstBlockToken.range[0] - firstBlockToken.loc.start.column], "\n"); + }, + message: NEVER_MESSAGE + }); + } + + if (blockHasBottomPadding) { + + context.report({ + node, + loc: { line: tokenAfterLast.loc.end.line, column: tokenAfterLast.loc.end.column - 1 }, + message: NEVER_MESSAGE, + fix(fixer) { + return fixer.replaceTextRange([lastBlockToken.range[1], tokenAfterLast.range[0] - tokenAfterLast.loc.start.column], "\n"); + } + }); + } + } + } + + const rule = {}; + + if (options.hasOwnProperty("switches")) { + rule.SwitchStatement = function(node) { + if (node.cases.length === 0) { + return; + } + checkPadding(node); + }; + } + + if (options.hasOwnProperty("blocks")) { + rule.BlockStatement = function(node) { + if (node.body.length === 0) { + return; + } + checkPadding(node); + }; + } + + if (options.hasOwnProperty("classes")) { + rule.ClassBody = function(node) { + if (node.body.length === 0) { + return; + } + checkPadding(node); + }; + } + + return rule; + } +}; diff --git a/node_modules/eslint/lib/rules/padding-line-between-statements.js b/node_modules/eslint/lib/rules/padding-line-between-statements.js new file mode 100644 index 0000000..e03cec8 --- /dev/null +++ b/node_modules/eslint/lib/rules/padding-line-between-statements.js @@ -0,0 +1,596 @@ +/** + * @fileoverview Rule to require or disallow newlines between statements + * @author Toru Nagashima + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const LT = `[${Array.from(astUtils.LINEBREAKS).join("")}]`; +const PADDING_LINE_SEQUENCE = new RegExp( + String.raw`^(\s*?${LT})\s*${LT}(\s*;?)$` +); +const CJS_EXPORT = /^(?:module\s*\.\s*)?exports(?:\s*\.|\s*\[|$)/; +const CJS_IMPORT = /^require\(/; + +/** + * Creates tester which check if a node starts with specific keyword. + * + * @param {string} keyword The keyword to test. + * @returns {Object} the created tester. + * @private + */ +function newKeywordTester(keyword) { + return { + test: (node, sourceCode) => + sourceCode.getFirstToken(node).value === keyword + }; +} + +/** + * Creates tester which check if a node is specific type. + * + * @param {string} type The node type to test. + * @returns {Object} the created tester. + * @private + */ +function newNodeTypeTester(type) { + return { + test: node => + node.type === type + }; +} + +/** + * Checks the given node is an expression statement of IIFE. + * + * @param {ASTNode} node The node to check. + * @returns {boolean} `true` if the node is an expression statement of IIFE. + * @private + */ +function isIIFEStatement(node) { + if (node.type === "ExpressionStatement") { + let call = node.expression; + + if (call.type === "UnaryExpression") { + call = call.argument; + } + return call.type === "CallExpression" && astUtils.isFunction(call.callee); + } + return false; +} + +/** + * Checks whether the given node is a block-like statement. + * This checks the last token of the node is the closing brace of a block. + * + * @param {SourceCode} sourceCode The source code to get tokens. + * @param {ASTNode} node The node to check. + * @returns {boolean} `true` if the node is a block-like statement. + * @private + */ +function isBlockLikeStatement(sourceCode, node) { + + // do-while with a block is a block-like statement. + if (node.type === "DoWhileStatement" && node.body.type === "BlockStatement") { + return true; + } + + /* + * IIFE is a block-like statement specially from + * JSCS#disallowPaddingNewLinesAfterBlocks. + */ + if (isIIFEStatement(node)) { + return true; + } + + // Checks the last token is a closing brace of blocks. + const lastToken = sourceCode.getLastToken(node, astUtils.isNotSemicolonToken); + const belongingNode = lastToken && astUtils.isClosingBraceToken(lastToken) + ? sourceCode.getNodeByRangeIndex(lastToken.range[0]) + : null; + + return Boolean(belongingNode) && ( + belongingNode.type === "BlockStatement" || + belongingNode.type === "SwitchStatement" + ); +} + +/** + * Check whether the given node is a directive or not. + * @param {ASTNode} node The node to check. + * @param {SourceCode} sourceCode The source code object to get tokens. + * @returns {boolean} `true` if the node is a directive. + */ +function isDirective(node, sourceCode) { + return ( + node.type === "ExpressionStatement" && + ( + node.parent.type === "Program" || + ( + node.parent.type === "BlockStatement" && + astUtils.isFunction(node.parent.parent) + ) + ) && + node.expression.type === "Literal" && + typeof node.expression.value === "string" && + !astUtils.isParenthesised(sourceCode, node.expression) + ); +} + +/** + * Check whether the given node is a part of directive prologue or not. + * @param {ASTNode} node The node to check. + * @param {SourceCode} sourceCode The source code object to get tokens. + * @returns {boolean} `true` if the node is a part of directive prologue. + */ +function isDirectivePrologue(node, sourceCode) { + if (isDirective(node, sourceCode)) { + for (const sibling of node.parent.body) { + if (sibling === node) { + break; + } + if (!isDirective(sibling, sourceCode)) { + return false; + } + } + return true; + } + return false; +} + +/** + * Gets the actual last token. + * + * If a semicolon is semicolon-less style's semicolon, this ignores it. + * For example: + * + * foo() + * ;[1, 2, 3].forEach(bar) + * + * @param {SourceCode} sourceCode The source code to get tokens. + * @param {ASTNode} node The node to get. + * @returns {Token} The actual last token. + * @private + */ +function getActualLastToken(sourceCode, node) { + const semiToken = sourceCode.getLastToken(node); + const prevToken = sourceCode.getTokenBefore(semiToken); + const nextToken = sourceCode.getTokenAfter(semiToken); + const isSemicolonLessStyle = Boolean( + prevToken && + nextToken && + prevToken.range[0] >= node.range[0] && + astUtils.isSemicolonToken(semiToken) && + semiToken.loc.start.line !== prevToken.loc.end.line && + semiToken.loc.end.line === nextToken.loc.start.line + ); + + return isSemicolonLessStyle ? prevToken : semiToken; +} + +/** + * This returns the concatenation of the first 2 captured strings. + * @param {string} _ Unused. Whole matched string. + * @param {string} trailingSpaces The trailing spaces of the first line. + * @param {string} indentSpaces The indentation spaces of the last line. + * @returns {string} The concatenation of trailingSpaces and indentSpaces. + * @private + */ +function replacerToRemovePaddingLines(_, trailingSpaces, indentSpaces) { + return trailingSpaces + indentSpaces; +} + +/** + * Check and report statements for `any` configuration. + * It does nothing. + * + * @returns {void} + * @private + */ +function verifyForAny() { +} + +/** + * Check and report statements for `never` configuration. + * This autofix removes blank lines between the given 2 statements. + * However, if comments exist between 2 blank lines, it does not remove those + * blank lines automatically. + * + * @param {RuleContext} context The rule context to report. + * @param {ASTNode} _ Unused. The previous node to check. + * @param {ASTNode} nextNode The next node to check. + * @param {Array} paddingLines The array of token pairs that blank + * lines exist between the pair. + * @returns {void} + * @private + */ +function verifyForNever(context, _, nextNode, paddingLines) { + if (paddingLines.length === 0) { + return; + } + + context.report({ + node: nextNode, + message: "Unexpected blank line before this statement.", + fix(fixer) { + if (paddingLines.length >= 2) { + return null; + } + + const prevToken = paddingLines[0][0]; + const nextToken = paddingLines[0][1]; + const start = prevToken.range[1]; + const end = nextToken.range[0]; + const text = context.getSourceCode().text + .slice(start, end) + .replace(PADDING_LINE_SEQUENCE, replacerToRemovePaddingLines); + + return fixer.replaceTextRange([start, end], text); + } + }); +} + +/** + * Check and report statements for `always` configuration. + * This autofix inserts a blank line between the given 2 statements. + * If the `prevNode` has trailing comments, it inserts a blank line after the + * trailing comments. + * + * @param {RuleContext} context The rule context to report. + * @param {ASTNode} prevNode The previous node to check. + * @param {ASTNode} nextNode The next node to check. + * @param {Array} paddingLines The array of token pairs that blank + * lines exist between the pair. + * @returns {void} + * @private + */ +function verifyForAlways(context, prevNode, nextNode, paddingLines) { + if (paddingLines.length > 0) { + return; + } + + context.report({ + node: nextNode, + message: "Expected blank line before this statement.", + fix(fixer) { + const sourceCode = context.getSourceCode(); + let prevToken = getActualLastToken(sourceCode, prevNode); + const nextToken = sourceCode.getFirstTokenBetween( + prevToken, + nextNode, + { + includeComments: true, + + /** + * Skip the trailing comments of the previous node. + * This inserts a blank line after the last trailing comment. + * + * For example: + * + * foo(); // trailing comment. + * // comment. + * bar(); + * + * Get fixed to: + * + * foo(); // trailing comment. + * + * // comment. + * bar(); + * + * @param {Token} token The token to check. + * @returns {boolean} `true` if the token is not a trailing comment. + * @private + */ + filter(token) { + if (astUtils.isTokenOnSameLine(prevToken, token)) { + prevToken = token; + return false; + } + return true; + } + } + ) || nextNode; + const insertText = astUtils.isTokenOnSameLine(prevToken, nextToken) + ? "\n\n" + : "\n"; + + return fixer.insertTextAfter(prevToken, insertText); + } + }); +} + +/** + * Types of blank lines. + * `any`, `never`, and `always` are defined. + * Those have `verify` method to check and report statements. + * @private + */ +const PaddingTypes = { + any: { verify: verifyForAny }, + never: { verify: verifyForNever }, + always: { verify: verifyForAlways } +}; + +/** + * Types of statements. + * Those have `test` method to check it matches to the given statement. + * @private + */ +const StatementTypes = { + "*": { test: () => true }, + "block-like": { + test: (node, sourceCode) => isBlockLikeStatement(sourceCode, node) + }, + "cjs-export": { + test: (node, sourceCode) => + node.type === "ExpressionStatement" && + node.expression.type === "AssignmentExpression" && + CJS_EXPORT.test(sourceCode.getText(node.expression.left)) + }, + "cjs-import": { + test: (node, sourceCode) => + node.type === "VariableDeclaration" && + node.declarations.length > 0 && + Boolean(node.declarations[0].init) && + CJS_IMPORT.test(sourceCode.getText(node.declarations[0].init)) + }, + directive: { + test: isDirectivePrologue + }, + expression: { + test: (node, sourceCode) => + node.type === "ExpressionStatement" && + !isDirectivePrologue(node, sourceCode) + }, + "multiline-block-like": { + test: (node, sourceCode) => + node.loc.start.line !== node.loc.end.line && + isBlockLikeStatement(sourceCode, node) + }, + "multiline-expression": { + test: (node, sourceCode) => + node.loc.start.line !== node.loc.end.line && + node.type === "ExpressionStatement" && + !isDirectivePrologue(node, sourceCode) + }, + + block: newNodeTypeTester("BlockStatement"), + empty: newNodeTypeTester("EmptyStatement"), + + break: newKeywordTester("break"), + case: newKeywordTester("case"), + class: newKeywordTester("class"), + const: newKeywordTester("const"), + continue: newKeywordTester("continue"), + debugger: newKeywordTester("debugger"), + default: newKeywordTester("default"), + do: newKeywordTester("do"), + export: newKeywordTester("export"), + for: newKeywordTester("for"), + function: newKeywordTester("function"), + if: newKeywordTester("if"), + import: newKeywordTester("import"), + let: newKeywordTester("let"), + return: newKeywordTester("return"), + switch: newKeywordTester("switch"), + throw: newKeywordTester("throw"), + try: newKeywordTester("try"), + var: newKeywordTester("var"), + while: newKeywordTester("while"), + with: newKeywordTester("with") +}; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require or disallow padding lines between statements", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/padding-line-between-statements" + }, + fixable: "whitespace", + schema: { + definitions: { + paddingType: { + enum: Object.keys(PaddingTypes) + }, + statementType: { + anyOf: [ + { enum: Object.keys(StatementTypes) }, + { + type: "array", + items: { enum: Object.keys(StatementTypes) }, + minItems: 1, + uniqueItems: true, + additionalItems: false + } + ] + } + }, + type: "array", + items: { + type: "object", + properties: { + blankLine: { $ref: "#/definitions/paddingType" }, + prev: { $ref: "#/definitions/statementType" }, + next: { $ref: "#/definitions/statementType" } + }, + additionalProperties: false, + required: ["blankLine", "prev", "next"] + }, + additionalItems: false + } + }, + + create(context) { + const sourceCode = context.getSourceCode(); + const configureList = context.options || []; + let scopeInfo = null; + + /** + * Processes to enter to new scope. + * This manages the current previous statement. + * @returns {void} + * @private + */ + function enterScope() { + scopeInfo = { + upper: scopeInfo, + prevNode: null + }; + } + + /** + * Processes to exit from the current scope. + * @returns {void} + * @private + */ + function exitScope() { + scopeInfo = scopeInfo.upper; + } + + /** + * Checks whether the given node matches the given type. + * + * @param {ASTNode} node The statement node to check. + * @param {string|string[]} type The statement type to check. + * @returns {boolean} `true` if the statement node matched the type. + * @private + */ + function match(node, type) { + while (node.type === "LabeledStatement") { + node = node.body; + } + if (Array.isArray(type)) { + return type.some(match.bind(null, node)); + } + return StatementTypes[type].test(node, sourceCode); + } + + /** + * Finds the last matched configure from configureList. + * + * @param {ASTNode} prevNode The previous statement to match. + * @param {ASTNode} nextNode The current statement to match. + * @returns {Object} The tester of the last matched configure. + * @private + */ + function getPaddingType(prevNode, nextNode) { + for (let i = configureList.length - 1; i >= 0; --i) { + const configure = configureList[i]; + const matched = + match(prevNode, configure.prev) && + match(nextNode, configure.next); + + if (matched) { + return PaddingTypes[configure.blankLine]; + } + } + return PaddingTypes.any; + } + + /** + * Gets padding line sequences between the given 2 statements. + * Comments are separators of the padding line sequences. + * + * @param {ASTNode} prevNode The previous statement to count. + * @param {ASTNode} nextNode The current statement to count. + * @returns {Array} The array of token pairs. + * @private + */ + function getPaddingLineSequences(prevNode, nextNode) { + const pairs = []; + let prevToken = getActualLastToken(sourceCode, prevNode); + + if (nextNode.loc.start.line - prevToken.loc.end.line >= 2) { + do { + const token = sourceCode.getTokenAfter( + prevToken, + { includeComments: true } + ); + + if (token.loc.start.line - prevToken.loc.end.line >= 2) { + pairs.push([prevToken, token]); + } + prevToken = token; + + } while (prevToken.range[0] < nextNode.range[0]); + } + + return pairs; + } + + /** + * Verify padding lines between the given node and the previous node. + * + * @param {ASTNode} node The node to verify. + * @returns {void} + * @private + */ + function verify(node) { + const parentType = node.parent.type; + const validParent = + astUtils.STATEMENT_LIST_PARENTS.has(parentType) || + parentType === "SwitchStatement"; + + if (!validParent) { + return; + } + + // Save this node as the current previous statement. + const prevNode = scopeInfo.prevNode; + + // Verify. + if (prevNode) { + const type = getPaddingType(prevNode, node); + const paddingLines = getPaddingLineSequences(prevNode, node); + + type.verify(context, prevNode, node, paddingLines); + } + + scopeInfo.prevNode = node; + } + + /** + * Verify padding lines between the given node and the previous node. + * Then process to enter to new scope. + * + * @param {ASTNode} node The node to verify. + * @returns {void} + * @private + */ + function verifyThenEnterScope(node) { + verify(node); + enterScope(); + } + + return { + Program: enterScope, + BlockStatement: enterScope, + SwitchStatement: enterScope, + "Program:exit": exitScope, + "BlockStatement:exit": exitScope, + "SwitchStatement:exit": exitScope, + + ":statement": verify, + + SwitchCase: verifyThenEnterScope, + "SwitchCase:exit": exitScope + }; + } +}; diff --git a/node_modules/eslint/lib/rules/prefer-arrow-callback.js b/node_modules/eslint/lib/rules/prefer-arrow-callback.js new file mode 100644 index 0000000..ff7a0fa --- /dev/null +++ b/node_modules/eslint/lib/rules/prefer-arrow-callback.js @@ -0,0 +1,305 @@ +/** + * @fileoverview A rule to suggest using arrow functions as callbacks. + * @author Toru Nagashima + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks whether or not a given variable is a function name. + * @param {eslint-scope.Variable} variable - A variable to check. + * @returns {boolean} `true` if the variable is a function name. + */ +function isFunctionName(variable) { + return variable && variable.defs[0].type === "FunctionName"; +} + +/** + * Checks whether or not a given MetaProperty node equals to a given value. + * @param {ASTNode} node - A MetaProperty node to check. + * @param {string} metaName - The name of `MetaProperty.meta`. + * @param {string} propertyName - The name of `MetaProperty.property`. + * @returns {boolean} `true` if the node is the specific value. + */ +function checkMetaProperty(node, metaName, propertyName) { + return node.meta.name === metaName && node.property.name === propertyName; +} + +/** + * Gets the variable object of `arguments` which is defined implicitly. + * @param {eslint-scope.Scope} scope - A scope to get. + * @returns {eslint-scope.Variable} The found variable object. + */ +function getVariableOfArguments(scope) { + const variables = scope.variables; + + for (let i = 0; i < variables.length; ++i) { + const variable = variables[i]; + + if (variable.name === "arguments") { + + /* + * If there was a parameter which is named "arguments", the + * implicit "arguments" is not defined. + * So does fast return with null. + */ + return (variable.identifiers.length === 0) ? variable : null; + } + } + + /* istanbul ignore next */ + return null; +} + +/** + * Checkes whether or not a given node is a callback. + * @param {ASTNode} node - A node to check. + * @returns {Object} + * {boolean} retv.isCallback - `true` if the node is a callback. + * {boolean} retv.isLexicalThis - `true` if the node is with `.bind(this)`. + */ +function getCallbackInfo(node) { + const retv = { isCallback: false, isLexicalThis: false }; + let parent = node.parent; + + while (node) { + switch (parent.type) { + + // Checks parents recursively. + + case "LogicalExpression": + case "ConditionalExpression": + break; + + // Checks whether the parent node is `.bind(this)` call. + case "MemberExpression": + if (parent.object === node && + !parent.property.computed && + parent.property.type === "Identifier" && + parent.property.name === "bind" && + parent.parent.type === "CallExpression" && + parent.parent.callee === parent + ) { + retv.isLexicalThis = ( + parent.parent.arguments.length === 1 && + parent.parent.arguments[0].type === "ThisExpression" + ); + parent = parent.parent; + } else { + return retv; + } + break; + + // Checks whether the node is a callback. + case "CallExpression": + case "NewExpression": + if (parent.callee !== node) { + retv.isCallback = true; + } + return retv; + + default: + return retv; + } + + node = parent; + parent = parent.parent; + } + + /* istanbul ignore next */ + throw new Error("unreachable"); +} + +/** + * Checks whether a simple list of parameters contains any duplicates. This does not handle complex + * parameter lists (e.g. with destructuring), since complex parameter lists are a SyntaxError with duplicate + * parameter names anyway. Instead, it always returns `false` for complex parameter lists. + * @param {ASTNode[]} paramsList The list of parameters for a function + * @returns {boolean} `true` if the list of parameters contains any duplicates + */ +function hasDuplicateParams(paramsList) { + return paramsList.every(param => param.type === "Identifier") && paramsList.length !== new Set(paramsList.map(param => param.name)).size; +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require using arrow functions for callbacks", + category: "ECMAScript 6", + recommended: false, + url: "https://eslint.org/docs/rules/prefer-arrow-callback" + }, + + schema: [ + { + type: "object", + properties: { + allowNamedFunctions: { + type: "boolean" + }, + allowUnboundThis: { + type: "boolean" + } + }, + additionalProperties: false + } + ], + + fixable: "code" + }, + + create(context) { + const options = context.options[0] || {}; + + const allowUnboundThis = options.allowUnboundThis !== false; // default to true + const allowNamedFunctions = options.allowNamedFunctions; + const sourceCode = context.getSourceCode(); + + /* + * {Array<{this: boolean, super: boolean, meta: boolean}>} + * - this - A flag which shows there are one or more ThisExpression. + * - super - A flag which shows there are one or more Super. + * - meta - A flag which shows there are one or more MethProperty. + */ + let stack = []; + + /** + * Pushes new function scope with all `false` flags. + * @returns {void} + */ + function enterScope() { + stack.push({ this: false, super: false, meta: false }); + } + + /** + * Pops a function scope from the stack. + * @returns {{this: boolean, super: boolean, meta: boolean}} The information of the last scope. + */ + function exitScope() { + return stack.pop(); + } + + return { + + // Reset internal state. + Program() { + stack = []; + }, + + // If there are below, it cannot replace with arrow functions merely. + ThisExpression() { + const info = stack[stack.length - 1]; + + if (info) { + info.this = true; + } + }, + + Super() { + const info = stack[stack.length - 1]; + + if (info) { + info.super = true; + } + }, + + MetaProperty(node) { + const info = stack[stack.length - 1]; + + if (info && checkMetaProperty(node, "new", "target")) { + info.meta = true; + } + }, + + // To skip nested scopes. + FunctionDeclaration: enterScope, + "FunctionDeclaration:exit": exitScope, + + // Main. + FunctionExpression: enterScope, + "FunctionExpression:exit"(node) { + const scopeInfo = exitScope(); + + // Skip named function expressions + if (allowNamedFunctions && node.id && node.id.name) { + return; + } + + // Skip generators. + if (node.generator) { + return; + } + + // Skip recursive functions. + const nameVar = context.getDeclaredVariables(node)[0]; + + if (isFunctionName(nameVar) && nameVar.references.length > 0) { + return; + } + + // Skip if it's using arguments. + const variable = getVariableOfArguments(context.getScope()); + + if (variable && variable.references.length > 0) { + return; + } + + // Reports if it's a callback which can replace with arrows. + const callbackInfo = getCallbackInfo(node); + + if (callbackInfo.isCallback && + (!allowUnboundThis || !scopeInfo.this || callbackInfo.isLexicalThis) && + !scopeInfo.super && + !scopeInfo.meta + ) { + context.report({ + node, + message: "Unexpected function expression.", + fix(fixer) { + if ((!callbackInfo.isLexicalThis && scopeInfo.this) || hasDuplicateParams(node.params)) { + + /* + * If the callback function does not have .bind(this) and contains a reference to `this`, there + * is no way to determine what `this` should be, so don't perform any fixes. + * If the callback function has duplicates in its list of parameters (possible in sloppy mode), + * don't replace it with an arrow function, because this is a SyntaxError with arrow functions. + */ + return null; + } + + const paramsLeftParen = node.params.length ? sourceCode.getTokenBefore(node.params[0]) : sourceCode.getTokenBefore(node.body, 1); + const paramsRightParen = sourceCode.getTokenBefore(node.body); + const asyncKeyword = node.async ? "async " : ""; + const paramsFullText = sourceCode.text.slice(paramsLeftParen.range[0], paramsRightParen.range[1]); + const arrowFunctionText = `${asyncKeyword}${paramsFullText} => ${sourceCode.getText(node.body)}`; + + /* + * If the callback function has `.bind(this)`, replace it with an arrow function and remove the binding. + * Otherwise, just replace the arrow function itself. + */ + const replacedNode = callbackInfo.isLexicalThis ? node.parent.parent : node; + + /* + * If the replaced node is part of a BinaryExpression, LogicalExpression, or MemberExpression, then + * the arrow function needs to be parenthesized, because `foo || () => {}` is invalid syntax even + * though `foo || function() {}` is valid. + */ + const needsParens = replacedNode.parent.type !== "CallExpression" && replacedNode.parent.type !== "ConditionalExpression"; + const replacementText = needsParens ? `(${arrowFunctionText})` : arrowFunctionText; + + return fixer.replaceText(replacedNode, replacementText); + } + }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/prefer-const.js b/node_modules/eslint/lib/rules/prefer-const.js new file mode 100644 index 0000000..a24a002 --- /dev/null +++ b/node_modules/eslint/lib/rules/prefer-const.js @@ -0,0 +1,322 @@ +/** + * @fileoverview A rule to suggest using of const declaration for variables that are never reassigned after declared. + * @author Toru Nagashima + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const PATTERN_TYPE = /^(?:.+?Pattern|RestElement|SpreadProperty|ExperimentalRestProperty|Property)$/; +const DECLARATION_HOST_TYPE = /^(?:Program|BlockStatement|SwitchCase)$/; +const DESTRUCTURING_HOST_TYPE = /^(?:VariableDeclarator|AssignmentExpression)$/; + +/** + * Adds multiple items to the tail of an array. + * + * @param {any[]} array - A destination to add. + * @param {any[]} values - Items to be added. + * @returns {void} + */ +const pushAll = Function.apply.bind(Array.prototype.push); + +/** + * Checks whether a given node is located at `ForStatement.init` or not. + * + * @param {ASTNode} node - A node to check. + * @returns {boolean} `true` if the node is located at `ForStatement.init`. + */ +function isInitOfForStatement(node) { + return node.parent.type === "ForStatement" && node.parent.init === node; +} + +/** + * Checks whether a given Identifier node becomes a VariableDeclaration or not. + * + * @param {ASTNode} identifier - An Identifier node to check. + * @returns {boolean} `true` if the node can become a VariableDeclaration. + */ +function canBecomeVariableDeclaration(identifier) { + let node = identifier.parent; + + while (PATTERN_TYPE.test(node.type)) { + node = node.parent; + } + + return ( + node.type === "VariableDeclarator" || + ( + node.type === "AssignmentExpression" && + node.parent.type === "ExpressionStatement" && + DECLARATION_HOST_TYPE.test(node.parent.parent.type) + ) + ); +} + +/** + * Gets an identifier node of a given variable. + * + * If the initialization exists or one or more reading references exist before + * the first assignment, the identifier node is the node of the declaration. + * Otherwise, the identifier node is the node of the first assignment. + * + * If the variable should not change to const, this function returns null. + * - If the variable is reassigned. + * - If the variable is never initialized nor assigned. + * - If the variable is initialized in a different scope from the declaration. + * - If the unique assignment of the variable cannot change to a declaration. + * e.g. `if (a) b = 1` / `return (b = 1)` + * - If the variable is declared in the global scope and `eslintUsed` is `true`. + * `/*exported foo` directive comment makes such variables. This rule does not + * warn such variables because this rule cannot distinguish whether the + * exported variables are reassigned or not. + * + * @param {eslint-scope.Variable} variable - A variable to get. + * @param {boolean} ignoreReadBeforeAssign - + * The value of `ignoreReadBeforeAssign` option. + * @returns {ASTNode|null} + * An Identifier node if the variable should change to const. + * Otherwise, null. + */ +function getIdentifierIfShouldBeConst(variable, ignoreReadBeforeAssign) { + if (variable.eslintUsed && variable.scope.type === "global") { + return null; + } + + // Finds the unique WriteReference. + let writer = null; + let isReadBeforeInit = false; + const references = variable.references; + + for (let i = 0; i < references.length; ++i) { + const reference = references[i]; + + if (reference.isWrite()) { + const isReassigned = ( + writer !== null && + writer.identifier !== reference.identifier + ); + + if (isReassigned) { + return null; + } + writer = reference; + + } else if (reference.isRead() && writer === null) { + if (ignoreReadBeforeAssign) { + return null; + } + isReadBeforeInit = true; + } + } + + /* + * If the assignment is from a different scope, ignore it. + * If the assignment cannot change to a declaration, ignore it. + */ + const shouldBeConst = ( + writer !== null && + writer.from === variable.scope && + canBecomeVariableDeclaration(writer.identifier) + ); + + if (!shouldBeConst) { + return null; + } + if (isReadBeforeInit) { + return variable.defs[0].name; + } + return writer.identifier; +} + +/** + * Gets the VariableDeclarator/AssignmentExpression node that a given reference + * belongs to. + * This is used to detect a mix of reassigned and never reassigned in a + * destructuring. + * + * @param {eslint-scope.Reference} reference - A reference to get. + * @returns {ASTNode|null} A VariableDeclarator/AssignmentExpression node or + * null. + */ +function getDestructuringHost(reference) { + if (!reference.isWrite()) { + return null; + } + let node = reference.identifier.parent; + + while (PATTERN_TYPE.test(node.type)) { + node = node.parent; + } + + if (!DESTRUCTURING_HOST_TYPE.test(node.type)) { + return null; + } + return node; +} + +/** + * Groups by the VariableDeclarator/AssignmentExpression node that each + * reference of given variables belongs to. + * This is used to detect a mix of reassigned and never reassigned in a + * destructuring. + * + * @param {eslint-scope.Variable[]} variables - Variables to group by destructuring. + * @param {boolean} ignoreReadBeforeAssign - + * The value of `ignoreReadBeforeAssign` option. + * @returns {Map} Grouped identifier nodes. + */ +function groupByDestructuring(variables, ignoreReadBeforeAssign) { + const identifierMap = new Map(); + + for (let i = 0; i < variables.length; ++i) { + const variable = variables[i]; + const references = variable.references; + const identifier = getIdentifierIfShouldBeConst(variable, ignoreReadBeforeAssign); + let prevId = null; + + for (let j = 0; j < references.length; ++j) { + const reference = references[j]; + const id = reference.identifier; + + /* + * Avoid counting a reference twice or more for default values of + * destructuring. + */ + if (id === prevId) { + continue; + } + prevId = id; + + // Add the identifier node into the destructuring group. + const group = getDestructuringHost(reference); + + if (group) { + if (identifierMap.has(group)) { + identifierMap.get(group).push(identifier); + } else { + identifierMap.set(group, [identifier]); + } + } + } + } + + return identifierMap; +} + +/** + * Finds the nearest parent of node with a given type. + * + * @param {ASTNode} node – The node to search from. + * @param {string} type – The type field of the parent node. + * @param {Function} shouldStop – a predicate that returns true if the traversal should stop, and false otherwise. + * @returns {ASTNode} The closest ancestor with the specified type; null if no such ancestor exists. + */ +function findUp(node, type, shouldStop) { + if (!node || shouldStop(node)) { + return null; + } + if (node.type === type) { + return node; + } + return findUp(node.parent, type, shouldStop); +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require `const` declarations for variables that are never reassigned after declared", + category: "ECMAScript 6", + recommended: false, + url: "https://eslint.org/docs/rules/prefer-const" + }, + + fixable: "code", + + schema: [ + { + type: "object", + properties: { + destructuring: { enum: ["any", "all"] }, + ignoreReadBeforeAssign: { type: "boolean" } + }, + additionalProperties: false + } + ] + }, + + create(context) { + const options = context.options[0] || {}; + const sourceCode = context.getSourceCode(); + const checkingMixedDestructuring = options.destructuring !== "all"; + const ignoreReadBeforeAssign = options.ignoreReadBeforeAssign === true; + const variables = []; + + /** + * Reports given identifier nodes if all of the nodes should be declared + * as const. + * + * The argument 'nodes' is an array of Identifier nodes. + * This node is the result of 'getIdentifierIfShouldBeConst()', so it's + * nullable. In simple declaration or assignment cases, the length of + * the array is 1. In destructuring cases, the length of the array can + * be 2 or more. + * + * @param {(eslint-scope.Reference|null)[]} nodes - + * References which are grouped by destructuring to report. + * @returns {void} + */ + function checkGroup(nodes) { + const nodesToReport = nodes.filter(Boolean); + + if (nodes.length && (checkingMixedDestructuring || nodesToReport.length === nodes.length)) { + const varDeclParent = findUp(nodes[0], "VariableDeclaration", parentNode => parentNode.type.endsWith("Statement")); + const shouldFix = varDeclParent && + + /* + * If there are multiple variable declarations, like {let a = 1, b = 2}, then + * do not attempt to fix if one of the declarations should be `const`. It's + * too hard to know how the developer would want to automatically resolve the issue. + */ + varDeclParent.declarations.length === 1 && + + // Don't do a fix unless the variable is initialized (or it's in a for-in or for-of loop) + (varDeclParent.parent.type === "ForInStatement" || varDeclParent.parent.type === "ForOfStatement" || varDeclParent.declarations[0].init) && + + /* + * If options.destucturing is "all", then this warning will not occur unless + * every assignment in the destructuring should be const. In that case, it's safe + * to apply the fix. + */ + nodesToReport.length === nodes.length; + + nodesToReport.forEach(node => { + context.report({ + node, + message: "'{{name}}' is never reassigned. Use 'const' instead.", + data: node, + fix: shouldFix ? fixer => fixer.replaceText(sourceCode.getFirstToken(varDeclParent), "const") : null + }); + }); + } + } + + return { + "Program:exit"() { + groupByDestructuring(variables, ignoreReadBeforeAssign).forEach(checkGroup); + }, + + VariableDeclaration(node) { + if (node.kind === "let" && !isInitOfForStatement(node)) { + pushAll(variables, context.getDeclaredVariables(node)); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/prefer-destructuring.js b/node_modules/eslint/lib/rules/prefer-destructuring.js new file mode 100644 index 0000000..112ea64 --- /dev/null +++ b/node_modules/eslint/lib/rules/prefer-destructuring.js @@ -0,0 +1,220 @@ +/** + * @fileoverview Prefer destructuring from arrays and objects + * @author Alex LaFroscia + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require destructuring from arrays and/or objects", + category: "ECMAScript 6", + recommended: false, + url: "https://eslint.org/docs/rules/prefer-destructuring" + }, + schema: [ + { + + /* + * old support {array: Boolean, object: Boolean} + * new support {VariableDeclarator: {}, AssignmentExpression: {}} + */ + oneOf: [ + { + type: "object", + properties: { + VariableDeclarator: { + type: "object", + properties: { + array: { + type: "boolean" + }, + object: { + type: "boolean" + } + }, + additionalProperties: false + }, + AssignmentExpression: { + type: "object", + properties: { + array: { + type: "boolean" + }, + object: { + type: "boolean" + } + }, + additionalProperties: false + } + }, + additionalProperties: false + }, + { + type: "object", + properties: { + array: { + type: "boolean" + }, + object: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + }, + { + type: "object", + properties: { + enforceForRenamedProperties: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + }, + create(context) { + + const enabledTypes = context.options[0]; + const enforceForRenamedProperties = context.options[1] && context.options[1].enforceForRenamedProperties; + let normalizedOptions = { + VariableDeclarator: { array: true, object: true }, + AssignmentExpression: { array: true, object: true } + }; + + if (enabledTypes) { + normalizedOptions = typeof enabledTypes.array !== "undefined" || typeof enabledTypes.object !== "undefined" + ? { VariableDeclarator: enabledTypes, AssignmentExpression: enabledTypes } + : enabledTypes; + } + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * @param {string} nodeType "AssignmentExpression" or "VariableDeclarator" + * @param {string} destructuringType "array" or "object" + * @returns {boolean} `true` if the destructuring type should be checked for the given node + */ + function shouldCheck(nodeType, destructuringType) { + return normalizedOptions && + normalizedOptions[nodeType] && + normalizedOptions[nodeType][destructuringType]; + } + + /** + * Determines if the given node is accessing an array index + * + * This is used to differentiate array index access from object property + * access. + * + * @param {ASTNode} node the node to evaluate + * @returns {boolean} whether or not the node is an integer + */ + function isArrayIndexAccess(node) { + return Number.isInteger(node.property.value); + } + + /** + * Report that the given node should use destructuring + * + * @param {ASTNode} reportNode the node to report + * @param {string} type the type of destructuring that should have been done + * @returns {void} + */ + function report(reportNode, type) { + context.report({ node: reportNode, message: "Use {{type}} destructuring.", data: { type } }); + } + + /** + * Check that the `prefer-destructuring` rules are followed based on the + * given left- and right-hand side of the assignment. + * + * Pulled out into a separate method so that VariableDeclarators and + * AssignmentExpressions can share the same verification logic. + * + * @param {ASTNode} leftNode the left-hand side of the assignment + * @param {ASTNode} rightNode the right-hand side of the assignment + * @param {ASTNode} reportNode the node to report the error on + * @returns {void} + */ + function performCheck(leftNode, rightNode, reportNode) { + if (rightNode.type !== "MemberExpression" || rightNode.object.type === "Super") { + return; + } + + if (isArrayIndexAccess(rightNode)) { + if (shouldCheck(reportNode.type, "array")) { + report(reportNode, "array"); + } + return; + } + + if (shouldCheck(reportNode.type, "object") && enforceForRenamedProperties) { + report(reportNode, "object"); + return; + } + + if (shouldCheck(reportNode.type, "object")) { + const property = rightNode.property; + + if ( + (property.type === "Literal" && leftNode.name === property.value) || + (property.type === "Identifier" && leftNode.name === property.name && !rightNode.computed) + ) { + report(reportNode, "object"); + } + } + } + + /** + * Check if a given variable declarator is coming from an property access + * that should be using destructuring instead + * + * @param {ASTNode} node the variable declarator to check + * @returns {void} + */ + function checkVariableDeclarator(node) { + + // Skip if variable is declared without assignment + if (!node.init) { + return; + } + + // We only care about member expressions past this point + if (node.init.type !== "MemberExpression") { + return; + } + + performCheck(node.id, node.init, node); + } + + /** + * Run the `prefer-destructuring` check on an AssignmentExpression + * + * @param {ASTNode} node the AssignmentExpression node + * @returns {void} + */ + function checkAssigmentExpression(node) { + if (node.operator === "=") { + performCheck(node.left, node.right, node); + } + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + VariableDeclarator: checkVariableDeclarator, + AssignmentExpression: checkAssigmentExpression + }; + } +}; diff --git a/node_modules/eslint/lib/rules/prefer-numeric-literals.js b/node_modules/eslint/lib/rules/prefer-numeric-literals.js new file mode 100644 index 0000000..051a91c --- /dev/null +++ b/node_modules/eslint/lib/rules/prefer-numeric-literals.js @@ -0,0 +1,113 @@ +/** + * @fileoverview Rule to disallow `parseInt()` in favor of binary, octal, and hexadecimal literals + * @author Annie Zhang, Henry Zhu + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks to see if a CallExpression's callee node is `parseInt` or + * `Number.parseInt`. + * @param {ASTNode} calleeNode The callee node to evaluate. + * @returns {boolean} True if the callee is `parseInt` or `Number.parseInt`, + * false otherwise. + */ +function isParseInt(calleeNode) { + switch (calleeNode.type) { + case "Identifier": + return calleeNode.name === "parseInt"; + case "MemberExpression": + return calleeNode.object.type === "Identifier" && + calleeNode.object.name === "Number" && + calleeNode.property.type === "Identifier" && + calleeNode.property.name === "parseInt"; + + // no default + } + + return false; +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals", + category: "ECMAScript 6", + recommended: false, + url: "https://eslint.org/docs/rules/prefer-numeric-literals" + }, + + schema: [], + + fixable: "code" + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + const radixMap = { + 2: "binary", + 8: "octal", + 16: "hexadecimal" + }; + + const prefixMap = { + 2: "0b", + 8: "0o", + 16: "0x" + }; + + //---------------------------------------------------------------------- + // Public + //---------------------------------------------------------------------- + + return { + + CallExpression(node) { + + // doesn't check parseInt() if it doesn't have a radix argument + if (node.arguments.length !== 2) { + return; + } + + // only error if the radix is 2, 8, or 16 + const radixName = radixMap[node.arguments[1].value]; + + if (isParseInt(node.callee) && + radixName && + node.arguments[0].type === "Literal" + ) { + context.report({ + node, + message: "Use {{radixName}} literals instead of {{functionName}}().", + data: { + radixName, + functionName: sourceCode.getText(node.callee) + }, + fix(fixer) { + const newPrefix = prefixMap[node.arguments[1].value]; + + if (+(newPrefix + node.arguments[0].value) !== parseInt(node.arguments[0].value, node.arguments[1].value)) { + + /* + * If the newly-produced literal would be invalid, (e.g. 0b1234), + * or it would yield an incorrect parseInt result for some other reason, don't make a fix. + */ + return null; + } + return fixer.replaceText(node, prefixMap[node.arguments[1].value] + node.arguments[0].value); + } + }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/prefer-promise-reject-errors.js b/node_modules/eslint/lib/rules/prefer-promise-reject-errors.js new file mode 100644 index 0000000..f92bd58 --- /dev/null +++ b/node_modules/eslint/lib/rules/prefer-promise-reject-errors.js @@ -0,0 +1,125 @@ +/** + * @fileoverview restrict values that can be used as Promise rejection reasons + * @author Teddy Katz + */ +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require using Error objects as Promise rejection reasons", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/prefer-promise-reject-errors" + }, + fixable: null, + schema: [ + { + type: "object", + properties: { + allowEmptyReject: { type: "boolean" } + }, + additionalProperties: false + } + ] + }, + + create(context) { + + const ALLOW_EMPTY_REJECT = context.options.length && context.options[0].allowEmptyReject; + + //---------------------------------------------------------------------- + // Helpers + //---------------------------------------------------------------------- + + /** + * Checks the argument of a reject() or Promise.reject() CallExpression, and reports it if it can't be an Error + * @param {ASTNode} callExpression A CallExpression node which is used to reject a Promise + * @returns {void} + */ + function checkRejectCall(callExpression) { + if (!callExpression.arguments.length && ALLOW_EMPTY_REJECT) { + return; + } + if ( + !callExpression.arguments.length || + !astUtils.couldBeError(callExpression.arguments[0]) || + callExpression.arguments[0].type === "Identifier" && callExpression.arguments[0].name === "undefined" + ) { + context.report({ + node: callExpression, + message: "Expected the Promise rejection reason to be an Error." + }); + } + } + + /** + * Determines whether a function call is a Promise.reject() call + * @param {ASTNode} node A CallExpression node + * @returns {boolean} `true` if the call is a Promise.reject() call + */ + function isPromiseRejectCall(node) { + return node.callee.type === "MemberExpression" && + node.callee.object.type === "Identifier" && node.callee.object.name === "Promise" && + node.callee.property.type === "Identifier" && node.callee.property.name === "reject"; + } + + //---------------------------------------------------------------------- + // Public + //---------------------------------------------------------------------- + + return { + + // Check `Promise.reject(value)` calls. + CallExpression(node) { + if (isPromiseRejectCall(node)) { + checkRejectCall(node); + } + }, + + /* + * Check for `new Promise((resolve, reject) => {})`, and check for reject() calls. + * This function is run on "NewExpression:exit" instead of "NewExpression" to ensure that + * the nodes in the expression already have the `parent` property. + */ + "NewExpression:exit"(node) { + if ( + node.callee.type === "Identifier" && node.callee.name === "Promise" && + node.arguments.length && astUtils.isFunction(node.arguments[0]) && + node.arguments[0].params.length > 1 && node.arguments[0].params[1].type === "Identifier" + ) { + context.getDeclaredVariables(node.arguments[0]) + + /* + * Find the first variable that matches the second parameter's name. + * If the first parameter has the same name as the second parameter, then the variable will actually + * be "declared" when the first parameter is evaluated, but then it will be immediately overwritten + * by the second parameter. It's not possible for an expression with the variable to be evaluated before + * the variable is overwritten, because functions with duplicate parameters cannot have destructuring or + * default assignments in their parameter lists. Therefore, it's not necessary to explicitly account for + * this case. + */ + .find(variable => variable.name === node.arguments[0].params[1].name) + + // Get the references to that variable. + .references + + // Only check the references that read the parameter's value. + .filter(ref => ref.isRead()) + + // Only check the references that are used as the callee in a function call, e.g. `reject(foo)`. + .filter(ref => ref.identifier.parent.type === "CallExpression" && ref.identifier === ref.identifier.parent.callee) + + // Check the argument of the function call to determine whether it's an Error. + .forEach(ref => checkRejectCall(ref.identifier.parent)); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/prefer-reflect.js b/node_modules/eslint/lib/rules/prefer-reflect.js new file mode 100644 index 0000000..56e841f --- /dev/null +++ b/node_modules/eslint/lib/rules/prefer-reflect.js @@ -0,0 +1,120 @@ +/** + * @fileoverview Rule to suggest using "Reflect" api over Function/Object methods + * @author Keith Cirkel + * @deprecated in ESLint v3.9.0 + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require `Reflect` methods where applicable", + category: "ECMAScript 6", + recommended: false, + replacedBy: [], + url: "https://eslint.org/docs/rules/prefer-reflect" + }, + + deprecated: true, + + schema: [ + { + type: "object", + properties: { + exceptions: { + type: "array", + items: { + enum: [ + "apply", + "call", + "delete", + "defineProperty", + "getOwnPropertyDescriptor", + "getPrototypeOf", + "setPrototypeOf", + "isExtensible", + "getOwnPropertyNames", + "preventExtensions" + ] + }, + uniqueItems: true + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + const existingNames = { + apply: "Function.prototype.apply", + call: "Function.prototype.call", + defineProperty: "Object.defineProperty", + getOwnPropertyDescriptor: "Object.getOwnPropertyDescriptor", + getPrototypeOf: "Object.getPrototypeOf", + setPrototypeOf: "Object.setPrototypeOf", + isExtensible: "Object.isExtensible", + getOwnPropertyNames: "Object.getOwnPropertyNames", + preventExtensions: "Object.preventExtensions" + }; + + const reflectSubsitutes = { + apply: "Reflect.apply", + call: "Reflect.apply", + defineProperty: "Reflect.defineProperty", + getOwnPropertyDescriptor: "Reflect.getOwnPropertyDescriptor", + getPrototypeOf: "Reflect.getPrototypeOf", + setPrototypeOf: "Reflect.setPrototypeOf", + isExtensible: "Reflect.isExtensible", + getOwnPropertyNames: "Reflect.getOwnPropertyNames", + preventExtensions: "Reflect.preventExtensions" + }; + + const exceptions = (context.options[0] || {}).exceptions || []; + + /** + * Reports the Reflect violation based on the `existing` and `substitute` + * @param {Object} node The node that violates the rule. + * @param {string} existing The existing method name that has been used. + * @param {string} substitute The Reflect substitute that should be used. + * @returns {void} + */ + function report(node, existing, substitute) { + context.report({ + node, + message: "Avoid using {{existing}}, instead use {{substitute}}.", + data: { + existing, + substitute + } + }); + } + + return { + CallExpression(node) { + const methodName = (node.callee.property || {}).name; + const isReflectCall = (node.callee.object || {}).name === "Reflect"; + const hasReflectSubsitute = reflectSubsitutes.hasOwnProperty(methodName); + const userConfiguredException = exceptions.indexOf(methodName) !== -1; + + if (hasReflectSubsitute && !isReflectCall && !userConfiguredException) { + report(node, existingNames[methodName], reflectSubsitutes[methodName]); + } + }, + UnaryExpression(node) { + const isDeleteOperator = node.operator === "delete"; + const targetsIdentifier = node.argument.type === "Identifier"; + const userConfiguredException = exceptions.indexOf("delete") !== -1; + + if (isDeleteOperator && !targetsIdentifier && !userConfiguredException) { + report(node, "the delete keyword", "Reflect.deleteProperty"); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/prefer-rest-params.js b/node_modules/eslint/lib/rules/prefer-rest-params.js new file mode 100644 index 0000000..133456e --- /dev/null +++ b/node_modules/eslint/lib/rules/prefer-rest-params.js @@ -0,0 +1,112 @@ +/** + * @fileoverview Rule to + * @author Toru Nagashima + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Gets the variable object of `arguments` which is defined implicitly. + * @param {eslint-scope.Scope} scope - A scope to get. + * @returns {eslint-scope.Variable} The found variable object. + */ +function getVariableOfArguments(scope) { + const variables = scope.variables; + + for (let i = 0; i < variables.length; ++i) { + const variable = variables[i]; + + if (variable.name === "arguments") { + + /* + * If there was a parameter which is named "arguments", the implicit "arguments" is not defined. + * So does fast return with null. + */ + return (variable.identifiers.length === 0) ? variable : null; + } + } + + /* istanbul ignore next : unreachable */ + return null; +} + +/** + * Checks if the given reference is not normal member access. + * + * - arguments .... true // not member access + * - arguments[i] .... true // computed member access + * - arguments[0] .... true // computed member access + * - arguments.length .... false // normal member access + * + * @param {eslint-scope.Reference} reference - The reference to check. + * @returns {boolean} `true` if the reference is not normal member access. + */ +function isNotNormalMemberAccess(reference) { + const id = reference.identifier; + const parent = id.parent; + + return !( + parent.type === "MemberExpression" && + parent.object === id && + !parent.computed + ); +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require rest parameters instead of `arguments`", + category: "ECMAScript 6", + recommended: false, + url: "https://eslint.org/docs/rules/prefer-rest-params" + }, + + schema: [] + }, + + create(context) { + + /** + * Reports a given reference. + * + * @param {eslint-scope.Reference} reference - A reference to report. + * @returns {void} + */ + function report(reference) { + context.report({ + node: reference.identifier, + loc: reference.identifier.loc, + message: "Use the rest parameters instead of 'arguments'." + }); + } + + /** + * Reports references of the implicit `arguments` variable if exist. + * + * @returns {void} + */ + function checkForArguments() { + const argumentsVar = getVariableOfArguments(context.getScope()); + + if (argumentsVar) { + argumentsVar + .references + .filter(isNotNormalMemberAccess) + .forEach(report); + } + } + + return { + "FunctionDeclaration:exit": checkForArguments, + "FunctionExpression:exit": checkForArguments + }; + } +}; diff --git a/node_modules/eslint/lib/rules/prefer-spread.js b/node_modules/eslint/lib/rules/prefer-spread.js new file mode 100644 index 0000000..62cfb28 --- /dev/null +++ b/node_modules/eslint/lib/rules/prefer-spread.js @@ -0,0 +1,97 @@ +/** + * @fileoverview A rule to suggest using of the spread operator instead of `.apply()`. + * @author Toru Nagashima + */ + +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks whether or not a node is a `.apply()` for variadic. + * @param {ASTNode} node - A CallExpression node to check. + * @returns {boolean} Whether or not the node is a `.apply()` for variadic. + */ +function isVariadicApplyCalling(node) { + return ( + node.callee.type === "MemberExpression" && + node.callee.property.type === "Identifier" && + node.callee.property.name === "apply" && + node.callee.computed === false && + node.arguments.length === 2 && + node.arguments[1].type !== "ArrayExpression" && + node.arguments[1].type !== "SpreadElement" + ); +} + + +/** + * Checks whether or not `thisArg` is not changed by `.apply()`. + * @param {ASTNode|null} expectedThis - The node that is the owner of the applied function. + * @param {ASTNode} thisArg - The node that is given to the first argument of the `.apply()`. + * @param {RuleContext} context - The ESLint rule context object. + * @returns {boolean} Whether or not `thisArg` is not changed by `.apply()`. + */ +function isValidThisArg(expectedThis, thisArg, context) { + if (!expectedThis) { + return astUtils.isNullOrUndefined(thisArg); + } + return astUtils.equalTokens(expectedThis, thisArg, context); +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require spread operators instead of `.apply()`", + category: "ECMAScript 6", + recommended: false, + url: "https://eslint.org/docs/rules/prefer-spread" + }, + + schema: [], + + fixable: "code" + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + return { + CallExpression(node) { + if (!isVariadicApplyCalling(node)) { + return; + } + + const applied = node.callee.object; + const expectedThis = (applied.type === "MemberExpression") ? applied.object : null; + const thisArg = node.arguments[0]; + + if (isValidThisArg(expectedThis, thisArg, sourceCode)) { + context.report({ + node, + message: "Use the spread operator instead of '.apply()'.", + fix(fixer) { + if (expectedThis && expectedThis.type !== "Identifier") { + + // Don't fix cases where the `this` value could be a computed expression. + return null; + } + + const propertyDot = sourceCode.getFirstTokenBetween(applied, node.callee.property, token => token.value === "."); + + return fixer.replaceTextRange([propertyDot.range[0], node.range[1]], `(...${sourceCode.getText(node.arguments[1])})`); + } + }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/prefer-template.js b/node_modules/eslint/lib/rules/prefer-template.js new file mode 100644 index 0000000..c583bdc --- /dev/null +++ b/node_modules/eslint/lib/rules/prefer-template.js @@ -0,0 +1,233 @@ +/** + * @fileoverview A rule to suggest using template literals instead of string concatenation. + * @author Toru Nagashima + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks whether or not a given node is a concatenation. + * @param {ASTNode} node - A node to check. + * @returns {boolean} `true` if the node is a concatenation. + */ +function isConcatenation(node) { + return node.type === "BinaryExpression" && node.operator === "+"; +} + +/** + * Gets the top binary expression node for concatenation in parents of a given node. + * @param {ASTNode} node - A node to get. + * @returns {ASTNode} the top binary expression node in parents of a given node. + */ +function getTopConcatBinaryExpression(node) { + while (isConcatenation(node.parent)) { + node = node.parent; + } + return node; +} + +/** + * Checks whether or not a given binary expression has string literals. + * @param {ASTNode} node - A node to check. + * @returns {boolean} `true` if the node has string literals. + */ +function hasStringLiteral(node) { + if (isConcatenation(node)) { + + // `left` is deeper than `right` normally. + return hasStringLiteral(node.right) || hasStringLiteral(node.left); + } + return astUtils.isStringLiteral(node); +} + +/** + * Checks whether or not a given binary expression has non string literals. + * @param {ASTNode} node - A node to check. + * @returns {boolean} `true` if the node has non string literals. + */ +function hasNonStringLiteral(node) { + if (isConcatenation(node)) { + + // `left` is deeper than `right` normally. + return hasNonStringLiteral(node.right) || hasNonStringLiteral(node.left); + } + return !astUtils.isStringLiteral(node); +} + +/** + * Determines whether a given node will start with a template curly expression (`${}`) when being converted to a template literal. + * @param {ASTNode} node The node that will be fixed to a template literal + * @returns {boolean} `true` if the node will start with a template curly. + */ +function startsWithTemplateCurly(node) { + if (node.type === "BinaryExpression") { + return startsWithTemplateCurly(node.left); + } + if (node.type === "TemplateLiteral") { + return node.expressions.length && node.quasis.length && node.quasis[0].range[0] === node.quasis[0].range[1]; + } + return node.type !== "Literal" || typeof node.value !== "string"; +} + +/** + * Determines whether a given node end with a template curly expression (`${}`) when being converted to a template literal. + * @param {ASTNode} node The node that will be fixed to a template literal + * @returns {boolean} `true` if the node will end with a template curly. + */ +function endsWithTemplateCurly(node) { + if (node.type === "BinaryExpression") { + return startsWithTemplateCurly(node.right); + } + if (node.type === "TemplateLiteral") { + return node.expressions.length && node.quasis.length && node.quasis[node.quasis.length - 1].range[0] === node.quasis[node.quasis.length - 1].range[1]; + } + return node.type !== "Literal" || typeof node.value !== "string"; +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require template literals instead of string concatenation", + category: "ECMAScript 6", + recommended: false, + url: "https://eslint.org/docs/rules/prefer-template" + }, + + schema: [], + + fixable: "code" + }, + + create(context) { + const sourceCode = context.getSourceCode(); + let done = Object.create(null); + + /** + * Gets the non-token text between two nodes, ignoring any other tokens that appear between the two tokens. + * @param {ASTNode} node1 The first node + * @param {ASTNode} node2 The second node + * @returns {string} The text between the nodes, excluding other tokens + */ + function getTextBetween(node1, node2) { + const allTokens = [node1].concat(sourceCode.getTokensBetween(node1, node2)).concat(node2); + const sourceText = sourceCode.getText(); + + return allTokens.slice(0, -1).reduce((accumulator, token, index) => accumulator + sourceText.slice(token.range[1], allTokens[index + 1].range[0]), ""); + } + + /** + * Returns a template literal form of the given node. + * @param {ASTNode} currentNode A node that should be converted to a template literal + * @param {string} textBeforeNode Text that should appear before the node + * @param {string} textAfterNode Text that should appear after the node + * @returns {string} A string form of this node, represented as a template literal + */ + function getTemplateLiteral(currentNode, textBeforeNode, textAfterNode) { + if (currentNode.type === "Literal" && typeof currentNode.value === "string") { + + /* + * If the current node is a string literal, escape any instances of ${ or ` to prevent them from being interpreted + * as a template placeholder. However, if the code already contains a backslash before the ${ or ` + * for some reason, don't add another backslash, because that would change the meaning of the code (it would cause + * an actual backslash character to appear before the dollar sign). + */ + return `\`${currentNode.raw.slice(1, -1).replace(/\\*(\${|`)/g, matched => { + if (matched.lastIndexOf("\\") % 2) { + return `\\${matched}`; + } + return matched; + + // Unescape any quotes that appear in the original Literal that no longer need to be escaped. + }).replace(new RegExp(`\\\\${currentNode.raw[0]}`, "g"), currentNode.raw[0])}\``; + } + + if (currentNode.type === "TemplateLiteral") { + return sourceCode.getText(currentNode); + } + + if (isConcatenation(currentNode) && hasStringLiteral(currentNode) && hasNonStringLiteral(currentNode)) { + const plusSign = sourceCode.getFirstTokenBetween(currentNode.left, currentNode.right, token => token.value === "+"); + const textBeforePlus = getTextBetween(currentNode.left, plusSign); + const textAfterPlus = getTextBetween(plusSign, currentNode.right); + const leftEndsWithCurly = endsWithTemplateCurly(currentNode.left); + const rightStartsWithCurly = startsWithTemplateCurly(currentNode.right); + + if (leftEndsWithCurly) { + + // If the left side of the expression ends with a template curly, add the extra text to the end of the curly bracket. + // `foo${bar}` /* comment */ + 'baz' --> `foo${bar /* comment */ }${baz}` + return getTemplateLiteral(currentNode.left, textBeforeNode, textBeforePlus + textAfterPlus).slice(0, -1) + + getTemplateLiteral(currentNode.right, null, textAfterNode).slice(1); + } + if (rightStartsWithCurly) { + + // Otherwise, if the right side of the expression starts with a template curly, add the text there. + // 'foo' /* comment */ + `${bar}baz` --> `foo${ /* comment */ bar}baz` + return getTemplateLiteral(currentNode.left, textBeforeNode, null).slice(0, -1) + + getTemplateLiteral(currentNode.right, textBeforePlus + textAfterPlus, textAfterNode).slice(1); + } + + /* + * Otherwise, these nodes should not be combined into a template curly, since there is nowhere to put + * the text between them. + */ + return `${getTemplateLiteral(currentNode.left, textBeforeNode, null)}${textBeforePlus}+${textAfterPlus}${getTemplateLiteral(currentNode.right, textAfterNode, null)}`; + } + + return `\`\${${textBeforeNode || ""}${sourceCode.getText(currentNode)}${textAfterNode || ""}}\``; + } + + /** + * Reports if a given node is string concatenation with non string literals. + * + * @param {ASTNode} node - A node to check. + * @returns {void} + */ + function checkForStringConcat(node) { + if (!astUtils.isStringLiteral(node) || !isConcatenation(node.parent)) { + return; + } + + const topBinaryExpr = getTopConcatBinaryExpression(node.parent); + + // Checks whether or not this node had been checked already. + if (done[topBinaryExpr.range[0]]) { + return; + } + done[topBinaryExpr.range[0]] = true; + + if (hasNonStringLiteral(topBinaryExpr)) { + context.report({ + node: topBinaryExpr, + message: "Unexpected string concatenation.", + fix(fixer) { + return fixer.replaceText(topBinaryExpr, getTemplateLiteral(topBinaryExpr, null, null)); + } + }); + } + } + + return { + Program() { + done = Object.create(null); + }, + + Literal: checkForStringConcat, + TemplateLiteral: checkForStringConcat + }; + } +}; diff --git a/node_modules/eslint/lib/rules/quote-props.js b/node_modules/eslint/lib/rules/quote-props.js new file mode 100644 index 0000000..3673949 --- /dev/null +++ b/node_modules/eslint/lib/rules/quote-props.js @@ -0,0 +1,299 @@ +/** + * @fileoverview Rule to flag non-quoted property names in object literals. + * @author Mathias Bynens + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const espree = require("espree"), + keywords = require("../util/keywords"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require quotes around object literal property names", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/quote-props" + }, + + schema: { + anyOf: [ + { + type: "array", + items: [ + { + enum: ["always", "as-needed", "consistent", "consistent-as-needed"] + } + ], + minItems: 0, + maxItems: 1 + }, + { + type: "array", + items: [ + { + enum: ["always", "as-needed", "consistent", "consistent-as-needed"] + }, + { + type: "object", + properties: { + keywords: { + type: "boolean" + }, + unnecessary: { + type: "boolean" + }, + numbers: { + type: "boolean" + } + }, + additionalProperties: false + } + ], + minItems: 0, + maxItems: 2 + } + ] + }, + + fixable: "code" + }, + + create(context) { + + const MODE = context.options[0], + KEYWORDS = context.options[1] && context.options[1].keywords, + CHECK_UNNECESSARY = !context.options[1] || context.options[1].unnecessary !== false, + NUMBERS = context.options[1] && context.options[1].numbers, + + MESSAGE_UNNECESSARY = "Unnecessarily quoted property '{{property}}' found.", + MESSAGE_UNQUOTED = "Unquoted property '{{property}}' found.", + MESSAGE_NUMERIC = "Unquoted number literal '{{property}}' used as key.", + MESSAGE_RESERVED = "Unquoted reserved word '{{property}}' used as key.", + sourceCode = context.getSourceCode(); + + + /** + * Checks whether a certain string constitutes an ES3 token + * @param {string} tokenStr - The string to be checked. + * @returns {boolean} `true` if it is an ES3 token. + */ + function isKeyword(tokenStr) { + return keywords.indexOf(tokenStr) >= 0; + } + + /** + * Checks if an espree-tokenized key has redundant quotes (i.e. whether quotes are unnecessary) + * @param {string} rawKey The raw key value from the source + * @param {espreeTokens} tokens The espree-tokenized node key + * @param {boolean} [skipNumberLiterals=false] Indicates whether number literals should be checked + * @returns {boolean} Whether or not a key has redundant quotes. + * @private + */ + function areQuotesRedundant(rawKey, tokens, skipNumberLiterals) { + return tokens.length === 1 && tokens[0].start === 0 && tokens[0].end === rawKey.length && + (["Identifier", "Keyword", "Null", "Boolean"].indexOf(tokens[0].type) >= 0 || + (tokens[0].type === "Numeric" && !skipNumberLiterals && String(+tokens[0].value) === tokens[0].value)); + } + + /** + * Returns a string representation of a property node with quotes removed + * @param {ASTNode} key Key AST Node, which may or may not be quoted + * @returns {string} A replacement string for this property + */ + function getUnquotedKey(key) { + return key.type === "Identifier" ? key.name : key.value; + } + + /** + * Returns a string representation of a property node with quotes added + * @param {ASTNode} key Key AST Node, which may or may not be quoted + * @returns {string} A replacement string for this property + */ + function getQuotedKey(key) { + if (key.type === "Literal" && typeof key.value === "string") { + + // If the key is already a string literal, don't replace the quotes with double quotes. + return sourceCode.getText(key); + } + + // Otherwise, the key is either an identifier or a number literal. + return `"${key.type === "Identifier" ? key.name : key.value}"`; + } + + /** + * Ensures that a property's key is quoted only when necessary + * @param {ASTNode} node Property AST node + * @returns {void} + */ + function checkUnnecessaryQuotes(node) { + const key = node.key; + + if (node.method || node.computed || node.shorthand) { + return; + } + + if (key.type === "Literal" && typeof key.value === "string") { + let tokens; + + try { + tokens = espree.tokenize(key.value); + } catch (e) { + return; + } + + if (tokens.length !== 1) { + return; + } + + const isKeywordToken = isKeyword(tokens[0].value); + + if (isKeywordToken && KEYWORDS) { + return; + } + + if (CHECK_UNNECESSARY && areQuotesRedundant(key.value, tokens, NUMBERS)) { + context.report({ + node, + message: MESSAGE_UNNECESSARY, + data: { property: key.value }, + fix: fixer => fixer.replaceText(key, getUnquotedKey(key)) + }); + } + } else if (KEYWORDS && key.type === "Identifier" && isKeyword(key.name)) { + context.report({ + node, + message: MESSAGE_RESERVED, + data: { property: key.name }, + fix: fixer => fixer.replaceText(key, getQuotedKey(key)) + }); + } else if (NUMBERS && key.type === "Literal" && typeof key.value === "number") { + context.report({ + node, + message: MESSAGE_NUMERIC, + data: { property: key.value }, + fix: fixer => fixer.replaceText(key, getQuotedKey(key)) + }); + } + } + + /** + * Ensures that a property's key is quoted + * @param {ASTNode} node Property AST node + * @returns {void} + */ + function checkOmittedQuotes(node) { + const key = node.key; + + if (!node.method && !node.computed && !node.shorthand && !(key.type === "Literal" && typeof key.value === "string")) { + context.report({ + node, + message: MESSAGE_UNQUOTED, + data: { property: key.name || key.value }, + fix: fixer => fixer.replaceText(key, getQuotedKey(key)) + }); + } + } + + /** + * Ensures that an object's keys are consistently quoted, optionally checks for redundancy of quotes + * @param {ASTNode} node Property AST node + * @param {boolean} checkQuotesRedundancy Whether to check quotes' redundancy + * @returns {void} + */ + function checkConsistency(node, checkQuotesRedundancy) { + const quotedProps = [], + unquotedProps = []; + let keywordKeyName = null, + necessaryQuotes = false; + + node.properties.forEach(property => { + const key = property.key; + + if (!key || property.method || property.computed || property.shorthand) { + return; + } + + if (key.type === "Literal" && typeof key.value === "string") { + + quotedProps.push(property); + + if (checkQuotesRedundancy) { + let tokens; + + try { + tokens = espree.tokenize(key.value); + } catch (e) { + necessaryQuotes = true; + return; + } + + necessaryQuotes = necessaryQuotes || !areQuotesRedundant(key.value, tokens) || KEYWORDS && isKeyword(tokens[0].value); + } + } else if (KEYWORDS && checkQuotesRedundancy && key.type === "Identifier" && isKeyword(key.name)) { + unquotedProps.push(property); + necessaryQuotes = true; + keywordKeyName = key.name; + } else { + unquotedProps.push(property); + } + }); + + if (checkQuotesRedundancy && quotedProps.length && !necessaryQuotes) { + quotedProps.forEach(property => { + context.report({ + node: property, + message: "Properties shouldn't be quoted as all quotes are redundant.", + fix: fixer => fixer.replaceText(property.key, getUnquotedKey(property.key)) + }); + }); + } else if (unquotedProps.length && keywordKeyName) { + unquotedProps.forEach(property => { + context.report({ + node: property, + message: "Properties should be quoted as '{{property}}' is a reserved word.", + data: { property: keywordKeyName }, + fix: fixer => fixer.replaceText(property.key, getQuotedKey(property.key)) + }); + }); + } else if (quotedProps.length && unquotedProps.length) { + unquotedProps.forEach(property => { + context.report({ + node: property, + message: "Inconsistently quoted property '{{key}}' found.", + data: { key: property.key.name || property.key.value }, + fix: fixer => fixer.replaceText(property.key, getQuotedKey(property.key)) + }); + }); + } + } + + return { + Property(node) { + if (MODE === "always" || !MODE) { + checkOmittedQuotes(node); + } + if (MODE === "as-needed") { + checkUnnecessaryQuotes(node); + } + }, + ObjectExpression(node) { + if (MODE === "consistent") { + checkConsistency(node, false); + } + if (MODE === "consistent-as-needed") { + checkConsistency(node, true); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/quotes.js b/node_modules/eslint/lib/rules/quotes.js new file mode 100644 index 0000000..fa8bbae --- /dev/null +++ b/node_modules/eslint/lib/rules/quotes.js @@ -0,0 +1,297 @@ +/** + * @fileoverview A rule to choose between single and double quote marks + * @author Matt DuVall , Brandon Payton + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Constants +//------------------------------------------------------------------------------ + +const QUOTE_SETTINGS = { + double: { + quote: "\"", + alternateQuote: "'", + description: "doublequote" + }, + single: { + quote: "'", + alternateQuote: "\"", + description: "singlequote" + }, + backtick: { + quote: "`", + alternateQuote: "\"", + description: "backtick" + } +}; + +// An unescaped newline is a newline preceded by an even number of backslashes. +const UNESCAPED_LINEBREAK_PATTERN = new RegExp(String.raw`(^|[^\\])(\\\\)*[${Array.from(astUtils.LINEBREAKS).join("")}]`); + +/** + * Switches quoting of javascript string between ' " and ` + * escaping and unescaping as necessary. + * Only escaping of the minimal set of characters is changed. + * Note: escaping of newlines when switching from backtick to other quotes is not handled. + * @param {string} str - A string to convert. + * @returns {string} The string with changed quotes. + * @private + */ +QUOTE_SETTINGS.double.convert = +QUOTE_SETTINGS.single.convert = +QUOTE_SETTINGS.backtick.convert = function(str) { + const newQuote = this.quote; + const oldQuote = str[0]; + + if (newQuote === oldQuote) { + return str; + } + return newQuote + str.slice(1, -1).replace(/\\(\${|\r\n?|\n|.)|["'`]|\${|(\r\n?|\n)/g, (match, escaped, newline) => { + if (escaped === oldQuote || oldQuote === "`" && escaped === "${") { + return escaped; // unescape + } + if (match === newQuote || newQuote === "`" && match === "${") { + return `\\${match}`; // escape + } + if (newline && oldQuote === "`") { + return "\\n"; // escape newlines + } + return match; + }) + newQuote; +}; + +const AVOID_ESCAPE = "avoid-escape"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce the consistent use of either backticks, double, or single quotes", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/quotes" + }, + + fixable: "code", + + schema: [ + { + enum: ["single", "double", "backtick"] + }, + { + anyOf: [ + { + enum: ["avoid-escape"] + }, + { + type: "object", + properties: { + avoidEscape: { + type: "boolean" + }, + allowTemplateLiterals: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + } + ] + }, + + create(context) { + + const quoteOption = context.options[0], + settings = QUOTE_SETTINGS[quoteOption || "double"], + options = context.options[1], + allowTemplateLiterals = options && options.allowTemplateLiterals === true, + sourceCode = context.getSourceCode(); + let avoidEscape = options && options.avoidEscape === true; + + // deprecated + if (options === AVOID_ESCAPE) { + avoidEscape = true; + } + + /** + * Determines if a given node is part of JSX syntax. + * + * This function returns `true` in the following cases: + * + * - `
` ... If the literal is an attribute value, the parent of the literal is `JSXAttribute`. + * - `
foo
` ... If the literal is a text content, the parent of the literal is `JSXElement`. + * + * In particular, this function returns `false` in the following cases: + * + * - `
` + * - `
{"foo"}
` + * + * In both cases, inside of the braces is handled as normal JavaScript. + * The braces are `JSXExpressionContainer` nodes. + * + * @param {ASTNode} node The Literal node to check. + * @returns {boolean} True if the node is a part of JSX, false if not. + * @private + */ + function isJSXLiteral(node) { + return node.parent.type === "JSXAttribute" || node.parent.type === "JSXElement"; + } + + /** + * Checks whether or not a given node is a directive. + * The directive is a `ExpressionStatement` which has only a string literal. + * @param {ASTNode} node - A node to check. + * @returns {boolean} Whether or not the node is a directive. + * @private + */ + function isDirective(node) { + return ( + node.type === "ExpressionStatement" && + node.expression.type === "Literal" && + typeof node.expression.value === "string" + ); + } + + /** + * Checks whether or not a given node is a part of directive prologues. + * See also: http://www.ecma-international.org/ecma-262/6.0/#sec-directive-prologues-and-the-use-strict-directive + * @param {ASTNode} node - A node to check. + * @returns {boolean} Whether or not the node is a part of directive prologues. + * @private + */ + function isPartOfDirectivePrologue(node) { + const block = node.parent.parent; + + if (block.type !== "Program" && (block.type !== "BlockStatement" || !astUtils.isFunction(block.parent))) { + return false; + } + + // Check the node is at a prologue. + for (let i = 0; i < block.body.length; ++i) { + const statement = block.body[i]; + + if (statement === node.parent) { + return true; + } + if (!isDirective(statement)) { + break; + } + } + + return false; + } + + /** + * Checks whether or not a given node is allowed as non backtick. + * @param {ASTNode} node - A node to check. + * @returns {boolean} Whether or not the node is allowed as non backtick. + * @private + */ + function isAllowedAsNonBacktick(node) { + const parent = node.parent; + + switch (parent.type) { + + // Directive Prologues. + case "ExpressionStatement": + return isPartOfDirectivePrologue(node); + + // LiteralPropertyName. + case "Property": + case "MethodDefinition": + return parent.key === node && !parent.computed; + + // ModuleSpecifier. + case "ImportDeclaration": + case "ExportNamedDeclaration": + case "ExportAllDeclaration": + return parent.source === node; + + // Others don't allow. + default: + return false; + } + } + + return { + + Literal(node) { + const val = node.value, + rawVal = node.raw; + + if (settings && typeof val === "string") { + let isValid = (quoteOption === "backtick" && isAllowedAsNonBacktick(node)) || + isJSXLiteral(node) || + astUtils.isSurroundedBy(rawVal, settings.quote); + + if (!isValid && avoidEscape) { + isValid = astUtils.isSurroundedBy(rawVal, settings.alternateQuote) && rawVal.indexOf(settings.quote) >= 0; + } + + if (!isValid) { + context.report({ + node, + message: "Strings must use {{description}}.", + data: { + description: settings.description + }, + fix(fixer) { + return fixer.replaceText(node, settings.convert(node.raw)); + } + }); + } + } + }, + + TemplateLiteral(node) { + + // If backticks are expected or it's a tagged template, then this shouldn't throw an errors + if ( + allowTemplateLiterals || + quoteOption === "backtick" || + node.parent.type === "TaggedTemplateExpression" && node === node.parent.quasi + ) { + return; + } + + // A warning should be produced if the template literal only has one TemplateElement, and has no unescaped newlines. + const shouldWarn = node.quasis.length === 1 && !UNESCAPED_LINEBREAK_PATTERN.test(node.quasis[0].value.raw); + + if (shouldWarn) { + context.report({ + node, + message: "Strings must use {{description}}.", + data: { + description: settings.description + }, + fix(fixer) { + if (isPartOfDirectivePrologue(node)) { + + /* + * TemplateLiterals in a directive prologue aren't actually directives, but if they're + * in the directive prologue, then fixing them might turn them into directives and change + * the behavior of the code. + */ + return null; + } + return fixer.replaceText(node, settings.convert(sourceCode.getText(node))); + } + }); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/radix.js b/node_modules/eslint/lib/rules/radix.js new file mode 100644 index 0000000..7e116a6 --- /dev/null +++ b/node_modules/eslint/lib/rules/radix.js @@ -0,0 +1,172 @@ +/** + * @fileoverview Rule to flag use of parseInt without a radix argument + * @author James Allardice + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const MODE_ALWAYS = "always", + MODE_AS_NEEDED = "as-needed"; + +/** + * Checks whether a given variable is shadowed or not. + * + * @param {eslint-scope.Variable} variable - A variable to check. + * @returns {boolean} `true` if the variable is shadowed. + */ +function isShadowed(variable) { + return variable.defs.length >= 1; +} + +/** + * Checks whether a given node is a MemberExpression of `parseInt` method or not. + * + * @param {ASTNode} node - A node to check. + * @returns {boolean} `true` if the node is a MemberExpression of `parseInt` + * method. + */ +function isParseIntMethod(node) { + return ( + node.type === "MemberExpression" && + !node.computed && + node.property.type === "Identifier" && + node.property.name === "parseInt" + ); +} + +/** + * Checks whether a given node is a valid value of radix or not. + * + * The following values are invalid. + * + * - A literal except numbers. + * - undefined. + * + * @param {ASTNode} radix - A node of radix to check. + * @returns {boolean} `true` if the node is valid. + */ +function isValidRadix(radix) { + return !( + (radix.type === "Literal" && typeof radix.value !== "number") || + (radix.type === "Identifier" && radix.name === "undefined") + ); +} + +/** + * Checks whether a given node is a default value of radix or not. + * + * @param {ASTNode} radix - A node of radix to check. + * @returns {boolean} `true` if the node is the literal node of `10`. + */ +function isDefaultRadix(radix) { + return radix.type === "Literal" && radix.value === 10; +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce the consistent use of the radix argument when using `parseInt()`", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/radix" + }, + + schema: [ + { + enum: ["always", "as-needed"] + } + ] + }, + + create(context) { + const mode = context.options[0] || MODE_ALWAYS; + + /** + * Checks the arguments of a given CallExpression node and reports it if it + * offends this rule. + * + * @param {ASTNode} node - A CallExpression node to check. + * @returns {void} + */ + function checkArguments(node) { + const args = node.arguments; + + switch (args.length) { + case 0: + context.report({ + node, + message: "Missing parameters." + }); + break; + + case 1: + if (mode === MODE_ALWAYS) { + context.report({ + node, + message: "Missing radix parameter." + }); + } + break; + + default: + if (mode === MODE_AS_NEEDED && isDefaultRadix(args[1])) { + context.report({ + node, + message: "Redundant radix parameter." + }); + } else if (!isValidRadix(args[1])) { + context.report({ + node, + message: "Invalid radix parameter." + }); + } + break; + } + } + + return { + "Program:exit"() { + const scope = context.getScope(); + let variable; + + // Check `parseInt()` + variable = astUtils.getVariableByName(scope, "parseInt"); + if (!isShadowed(variable)) { + variable.references.forEach(reference => { + const node = reference.identifier; + + if (astUtils.isCallee(node)) { + checkArguments(node.parent); + } + }); + } + + // Check `Number.parseInt()` + variable = astUtils.getVariableByName(scope, "Number"); + if (!isShadowed(variable)) { + variable.references.forEach(reference => { + const node = reference.identifier.parent; + + if (isParseIntMethod(node) && astUtils.isCallee(node)) { + checkArguments(node.parent); + } + }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/require-await.js b/node_modules/eslint/lib/rules/require-await.js new file mode 100644 index 0000000..5517cf8 --- /dev/null +++ b/node_modules/eslint/lib/rules/require-await.js @@ -0,0 +1,101 @@ +/** + * @fileoverview Rule to disallow async functions which have no `await` expression. + * @author Toru Nagashima + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Capitalize the 1st letter of the given text. + * + * @param {string} text - The text to capitalize. + * @returns {string} The text that the 1st letter was capitalized. + */ +function capitalizeFirstLetter(text) { + return text[0].toUpperCase() + text.slice(1); +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "disallow async functions which have no `await` expression", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/require-await" + }, + schema: [] + }, + + create(context) { + const sourceCode = context.getSourceCode(); + let scopeInfo = null; + + /** + * Push the scope info object to the stack. + * + * @returns {void} + */ + function enterFunction() { + scopeInfo = { + upper: scopeInfo, + hasAwait: false + }; + } + + /** + * Pop the top scope info object from the stack. + * Also, it reports the function if needed. + * + * @param {ASTNode} node - The node to report. + * @returns {void} + */ + function exitFunction(node) { + if (node.async && !scopeInfo.hasAwait && !astUtils.isEmptyFunction(node)) { + context.report({ + node, + loc: astUtils.getFunctionHeadLoc(node, sourceCode), + message: "{{name}} has no 'await' expression.", + data: { + name: capitalizeFirstLetter( + astUtils.getFunctionNameWithKind(node) + ) + } + }); + } + + scopeInfo = scopeInfo.upper; + } + + return { + FunctionDeclaration: enterFunction, + FunctionExpression: enterFunction, + ArrowFunctionExpression: enterFunction, + "FunctionDeclaration:exit": exitFunction, + "FunctionExpression:exit": exitFunction, + "ArrowFunctionExpression:exit": exitFunction, + + AwaitExpression() { + scopeInfo.hasAwait = true; + }, + ForOfStatement(node) { + if (node.await) { + scopeInfo.hasAwait = true; + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/require-jsdoc.js b/node_modules/eslint/lib/rules/require-jsdoc.js new file mode 100644 index 0000000..91b90b7 --- /dev/null +++ b/node_modules/eslint/lib/rules/require-jsdoc.js @@ -0,0 +1,106 @@ +/** + * @fileoverview Rule to check for jsdoc presence. + * @author Gyandeep Singh + */ +"use strict"; + +module.exports = { + meta: { + docs: { + description: "require JSDoc comments", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/require-jsdoc" + }, + + schema: [ + { + type: "object", + properties: { + require: { + type: "object", + properties: { + ClassDeclaration: { + type: "boolean" + }, + MethodDefinition: { + type: "boolean" + }, + FunctionDeclaration: { + type: "boolean" + }, + ArrowFunctionExpression: { + type: "boolean" + }, + FunctionExpression: { + type: "boolean" + } + }, + additionalProperties: false + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + const source = context.getSourceCode(); + const DEFAULT_OPTIONS = { + FunctionDeclaration: true, + MethodDefinition: false, + ClassDeclaration: false, + ArrowFunctionExpression: false, + FunctionExpression: false + }; + const options = Object.assign(DEFAULT_OPTIONS, context.options[0] && context.options[0].require || {}); + + /** + * Report the error message + * @param {ASTNode} node node to report + * @returns {void} + */ + function report(node) { + context.report({ node, message: "Missing JSDoc comment." }); + } + + /** + * Check if the jsdoc comment is present or not. + * @param {ASTNode} node node to examine + * @returns {void} + */ + function checkJsDoc(node) { + const jsdocComment = source.getJSDocComment(node); + + if (!jsdocComment) { + report(node); + } + } + + return { + FunctionDeclaration(node) { + if (options.FunctionDeclaration) { + checkJsDoc(node); + } + }, + FunctionExpression(node) { + if ( + (options.MethodDefinition && node.parent.type === "MethodDefinition") || + (options.FunctionExpression && (node.parent.type === "VariableDeclarator" || (node.parent.type === "Property" && node === node.parent.value))) + ) { + checkJsDoc(node); + } + }, + ClassDeclaration(node) { + if (options.ClassDeclaration) { + checkJsDoc(node); + } + }, + ArrowFunctionExpression(node) { + if (options.ArrowFunctionExpression && node.parent.type === "VariableDeclarator") { + checkJsDoc(node); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/require-yield.js b/node_modules/eslint/lib/rules/require-yield.js new file mode 100644 index 0000000..83a2987 --- /dev/null +++ b/node_modules/eslint/lib/rules/require-yield.js @@ -0,0 +1,72 @@ +/** + * @fileoverview Rule to flag the generator functions that does not have yield. + * @author Toru Nagashima + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require generator functions to contain `yield`", + category: "ECMAScript 6", + recommended: true, + url: "https://eslint.org/docs/rules/require-yield" + }, + + schema: [] + }, + + create(context) { + const stack = []; + + /** + * If the node is a generator function, start counting `yield` keywords. + * @param {Node} node - A function node to check. + * @returns {void} + */ + function beginChecking(node) { + if (node.generator) { + stack.push(0); + } + } + + /** + * If the node is a generator function, end counting `yield` keywords, then + * reports result. + * @param {Node} node - A function node to check. + * @returns {void} + */ + function endChecking(node) { + if (!node.generator) { + return; + } + + const countYield = stack.pop(); + + if (countYield === 0 && node.body.body.length > 0) { + context.report({ node, message: "This generator function does not have 'yield'." }); + } + } + + return { + FunctionDeclaration: beginChecking, + "FunctionDeclaration:exit": endChecking, + FunctionExpression: beginChecking, + "FunctionExpression:exit": endChecking, + + // Increases the count of `yield` keyword. + YieldExpression() { + + /* istanbul ignore else */ + if (stack.length > 0) { + stack[stack.length - 1] += 1; + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/rest-spread-spacing.js b/node_modules/eslint/lib/rules/rest-spread-spacing.js new file mode 100644 index 0000000..e87d881 --- /dev/null +++ b/node_modules/eslint/lib/rules/rest-spread-spacing.js @@ -0,0 +1,114 @@ +/** + * @fileoverview Enforce spacing between rest and spread operators and their expressions. + * @author Kai Cataldo + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce spacing between rest and spread operators and their expressions", + category: "ECMAScript 6", + recommended: false, + url: "https://eslint.org/docs/rules/rest-spread-spacing" + }, + fixable: "whitespace", + schema: [ + { + enum: ["always", "never"] + } + ] + }, + + create(context) { + const sourceCode = context.getSourceCode(), + alwaysSpace = context.options[0] === "always"; + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Checks whitespace between rest/spread operators and their expressions + * @param {ASTNode} node - The node to check + * @returns {void} + */ + function checkWhiteSpace(node) { + const operator = sourceCode.getFirstToken(node), + nextToken = sourceCode.getTokenAfter(operator), + hasWhitespace = sourceCode.isSpaceBetweenTokens(operator, nextToken); + let type; + + switch (node.type) { + case "SpreadElement": + type = "spread"; + if (node.parent.type === "ObjectExpression") { + type += " property"; + } + break; + case "RestElement": + type = "rest"; + if (node.parent.type === "ObjectPattern") { + type += " property"; + } + break; + case "ExperimentalSpreadProperty": + type = "spread property"; + break; + case "ExperimentalRestProperty": + type = "rest property"; + break; + default: + return; + } + + if (alwaysSpace && !hasWhitespace) { + context.report({ + node, + loc: { + line: operator.loc.end.line, + column: operator.loc.end.column + }, + message: "Expected whitespace after {{type}} operator.", + data: { + type + }, + fix(fixer) { + return fixer.replaceTextRange([operator.range[1], nextToken.range[0]], " "); + } + }); + } else if (!alwaysSpace && hasWhitespace) { + context.report({ + node, + loc: { + line: operator.loc.end.line, + column: operator.loc.end.column + }, + message: "Unexpected whitespace after {{type}} operator.", + data: { + type + }, + fix(fixer) { + return fixer.removeRange([operator.range[1], nextToken.range[0]]); + } + }); + } + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + SpreadElement: checkWhiteSpace, + RestElement: checkWhiteSpace, + ExperimentalSpreadProperty: checkWhiteSpace, + ExperimentalRestProperty: checkWhiteSpace + }; + } +}; diff --git a/node_modules/eslint/lib/rules/semi-spacing.js b/node_modules/eslint/lib/rules/semi-spacing.js new file mode 100644 index 0000000..07af993 --- /dev/null +++ b/node_modules/eslint/lib/rules/semi-spacing.js @@ -0,0 +1,212 @@ +/** + * @fileoverview Validates spacing before and after semicolon + * @author Mathias Schreck + */ + +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce consistent spacing before and after semicolons", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/semi-spacing" + }, + + fixable: "whitespace", + + schema: [ + { + type: "object", + properties: { + before: { + type: "boolean" + }, + after: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + + const config = context.options[0], + sourceCode = context.getSourceCode(); + let requireSpaceBefore = false, + requireSpaceAfter = true; + + if (typeof config === "object") { + if (config.hasOwnProperty("before")) { + requireSpaceBefore = config.before; + } + if (config.hasOwnProperty("after")) { + requireSpaceAfter = config.after; + } + } + + /** + * Checks if a given token has leading whitespace. + * @param {Object} token The token to check. + * @returns {boolean} True if the given token has leading space, false if not. + */ + function hasLeadingSpace(token) { + const tokenBefore = sourceCode.getTokenBefore(token); + + return tokenBefore && astUtils.isTokenOnSameLine(tokenBefore, token) && sourceCode.isSpaceBetweenTokens(tokenBefore, token); + } + + /** + * Checks if a given token has trailing whitespace. + * @param {Object} token The token to check. + * @returns {boolean} True if the given token has trailing space, false if not. + */ + function hasTrailingSpace(token) { + const tokenAfter = sourceCode.getTokenAfter(token); + + return tokenAfter && astUtils.isTokenOnSameLine(token, tokenAfter) && sourceCode.isSpaceBetweenTokens(token, tokenAfter); + } + + /** + * Checks if the given token is the last token in its line. + * @param {Token} token The token to check. + * @returns {boolean} Whether or not the token is the last in its line. + */ + function isLastTokenInCurrentLine(token) { + const tokenAfter = sourceCode.getTokenAfter(token); + + return !(tokenAfter && astUtils.isTokenOnSameLine(token, tokenAfter)); + } + + /** + * Checks if the given token is the first token in its line + * @param {Token} token The token to check. + * @returns {boolean} Whether or not the token is the first in its line. + */ + function isFirstTokenInCurrentLine(token) { + const tokenBefore = sourceCode.getTokenBefore(token); + + return !(tokenBefore && astUtils.isTokenOnSameLine(token, tokenBefore)); + } + + /** + * Checks if the next token of a given token is a closing parenthesis. + * @param {Token} token The token to check. + * @returns {boolean} Whether or not the next token of a given token is a closing parenthesis. + */ + function isBeforeClosingParen(token) { + const nextToken = sourceCode.getTokenAfter(token); + + return (nextToken && astUtils.isClosingBraceToken(nextToken) || astUtils.isClosingParenToken(nextToken)); + } + + /** + * Reports if the given token has invalid spacing. + * @param {Token} token The semicolon token to check. + * @param {ASTNode} node The corresponding node of the token. + * @returns {void} + */ + function checkSemicolonSpacing(token, node) { + if (astUtils.isSemicolonToken(token)) { + const location = token.loc.start; + + if (hasLeadingSpace(token)) { + if (!requireSpaceBefore) { + context.report({ + node, + loc: location, + message: "Unexpected whitespace before semicolon.", + fix(fixer) { + const tokenBefore = sourceCode.getTokenBefore(token); + + return fixer.removeRange([tokenBefore.range[1], token.range[0]]); + } + }); + } + } else { + if (requireSpaceBefore) { + context.report({ + node, + loc: location, + message: "Missing whitespace before semicolon.", + fix(fixer) { + return fixer.insertTextBefore(token, " "); + } + }); + } + } + + if (!isFirstTokenInCurrentLine(token) && !isLastTokenInCurrentLine(token) && !isBeforeClosingParen(token)) { + if (hasTrailingSpace(token)) { + if (!requireSpaceAfter) { + context.report({ + node, + loc: location, + message: "Unexpected whitespace after semicolon.", + fix(fixer) { + const tokenAfter = sourceCode.getTokenAfter(token); + + return fixer.removeRange([token.range[1], tokenAfter.range[0]]); + } + }); + } + } else { + if (requireSpaceAfter) { + context.report({ + node, + loc: location, + message: "Missing whitespace after semicolon.", + fix(fixer) { + return fixer.insertTextAfter(token, " "); + } + }); + } + } + } + } + } + + /** + * Checks the spacing of the semicolon with the assumption that the last token is the semicolon. + * @param {ASTNode} node The node to check. + * @returns {void} + */ + function checkNode(node) { + const token = sourceCode.getLastToken(node); + + checkSemicolonSpacing(token, node); + } + + return { + VariableDeclaration: checkNode, + ExpressionStatement: checkNode, + BreakStatement: checkNode, + ContinueStatement: checkNode, + DebuggerStatement: checkNode, + ReturnStatement: checkNode, + ThrowStatement: checkNode, + ImportDeclaration: checkNode, + ExportNamedDeclaration: checkNode, + ExportAllDeclaration: checkNode, + ExportDefaultDeclaration: checkNode, + ForStatement(node) { + if (node.init) { + checkSemicolonSpacing(sourceCode.getTokenAfter(node.init), node); + } + + if (node.test) { + checkSemicolonSpacing(sourceCode.getTokenAfter(node.test), node); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/semi-style.js b/node_modules/eslint/lib/rules/semi-style.js new file mode 100644 index 0000000..de65928 --- /dev/null +++ b/node_modules/eslint/lib/rules/semi-style.js @@ -0,0 +1,144 @@ +/** + * @fileoverview Rule to enforce location of semicolons. + * @author Toru Nagashima + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +const SELECTOR = `:matches(${ + [ + "BreakStatement", "ContinueStatement", "DebuggerStatement", + "DoWhileStatement", "ExportAllDeclaration", + "ExportDefaultDeclaration", "ExportNamedDeclaration", + "ExpressionStatement", "ImportDeclaration", "ReturnStatement", + "ThrowStatement", "VariableDeclaration" + ].join(",") +})`; + +/** + * Get the child node list of a given node. + * This returns `Program#body`, `BlockStatement#body`, or `SwitchCase#consequent`. + * This is used to check whether a node is the first/last child. + * @param {Node} node A node to get child node list. + * @returns {Node[]|null} The child node list. + */ +function getChildren(node) { + const t = node.type; + + if (t === "BlockStatement" || t === "Program") { + return node.body; + } + if (t === "SwitchCase") { + return node.consequent; + } + return null; +} + +/** + * Check whether a given node is the last statement in the parent block. + * @param {Node} node A node to check. + * @returns {boolean} `true` if the node is the last statement in the parent block. + */ +function isLastChild(node) { + const t = node.parent.type; + + if (t === "IfStatement" && node.parent.consequent === node && node.parent.alternate) { // before `else` keyword. + return true; + } + if (t === "DoWhileStatement") { // before `while` keyword. + return true; + } + const nodeList = getChildren(node.parent); + + return nodeList !== null && nodeList[nodeList.length - 1] === node; // before `}` or etc. +} + +module.exports = { + meta: { + docs: { + description: "enforce location of semicolons", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/semi-style" + }, + schema: [{ enum: ["last", "first"] }], + fixable: "whitespace" + }, + + create(context) { + const sourceCode = context.getSourceCode(); + const option = context.options[0] || "last"; + + /** + * Check the given semicolon token. + * @param {Token} semiToken The semicolon token to check. + * @param {"first"|"last"} expected The expected location to check. + * @returns {void} + */ + function check(semiToken, expected) { + const prevToken = sourceCode.getTokenBefore(semiToken); + const nextToken = sourceCode.getTokenAfter(semiToken); + const prevIsSameLine = !prevToken || astUtils.isTokenOnSameLine(prevToken, semiToken); + const nextIsSameLine = !nextToken || astUtils.isTokenOnSameLine(semiToken, nextToken); + + if ((expected === "last" && !prevIsSameLine) || (expected === "first" && !nextIsSameLine)) { + context.report({ + loc: semiToken.loc, + message: "Expected this semicolon to be at {{pos}}.", + data: { + pos: (expected === "last") + ? "the end of the previous line" + : "the beginning of the next line" + }, + fix(fixer) { + if (prevToken && nextToken && sourceCode.commentsExistBetween(prevToken, nextToken)) { + return null; + } + + const start = prevToken ? prevToken.range[1] : semiToken.range[0]; + const end = nextToken ? nextToken.range[0] : semiToken.range[1]; + const text = (expected === "last") ? ";\n" : "\n;"; + + return fixer.replaceTextRange([start, end], text); + } + }); + } + } + + return { + [SELECTOR](node) { + if (option === "first" && isLastChild(node)) { + return; + } + + const lastToken = sourceCode.getLastToken(node); + + if (astUtils.isSemicolonToken(lastToken)) { + check(lastToken, option); + } + }, + + ForStatement(node) { + const firstSemi = node.init && sourceCode.getTokenAfter(node.init, astUtils.isSemicolonToken); + const secondSemi = node.test && sourceCode.getTokenAfter(node.test, astUtils.isSemicolonToken); + + if (firstSemi) { + check(firstSemi, "last"); + } + if (secondSemi) { + check(secondSemi, "last"); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/semi.js b/node_modules/eslint/lib/rules/semi.js new file mode 100644 index 0000000..33a214d --- /dev/null +++ b/node_modules/eslint/lib/rules/semi.js @@ -0,0 +1,326 @@ +/** + * @fileoverview Rule to flag missing semicolons. + * @author Nicholas C. Zakas + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const FixTracker = require("../util/fix-tracker"); +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require or disallow semicolons instead of ASI", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/semi" + }, + + fixable: "code", + + schema: { + anyOf: [ + { + type: "array", + items: [ + { + enum: ["never"] + }, + { + type: "object", + properties: { + beforeStatementContinuationChars: { + enum: ["always", "any", "never"] + } + }, + additionalProperties: false + } + ], + minItems: 0, + maxItems: 2 + }, + { + type: "array", + items: [ + { + enum: ["always"] + }, + { + type: "object", + properties: { + omitLastInOneLineBlock: { type: "boolean" } + }, + additionalProperties: false + } + ], + minItems: 0, + maxItems: 2 + } + ] + } + }, + + create(context) { + + const OPT_OUT_PATTERN = /^[-[(/+`]/; // One of [(/+-` + const options = context.options[1]; + const never = context.options[0] === "never"; + const exceptOneLine = Boolean(options && options.omitLastInOneLineBlock); + const beforeStatementContinuationChars = (options && options.beforeStatementContinuationChars) || "any"; + const sourceCode = context.getSourceCode(); + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Reports a semicolon error with appropriate location and message. + * @param {ASTNode} node The node with an extra or missing semicolon. + * @param {boolean} missing True if the semicolon is missing. + * @returns {void} + */ + function report(node, missing) { + const lastToken = sourceCode.getLastToken(node); + let message, + fix, + loc = lastToken.loc; + + if (!missing) { + message = "Missing semicolon."; + loc = loc.end; + fix = function(fixer) { + return fixer.insertTextAfter(lastToken, ";"); + }; + } else { + message = "Extra semicolon."; + loc = loc.start; + fix = function(fixer) { + + /* + * Expand the replacement range to include the surrounding + * tokens to avoid conflicting with no-extra-semi. + * https://github.com/eslint/eslint/issues/7928 + */ + return new FixTracker(fixer, sourceCode) + .retainSurroundingTokens(lastToken) + .remove(lastToken); + }; + } + + context.report({ + node, + loc, + message, + fix + }); + + } + + /** + * Check whether a given semicolon token is redandant. + * @param {Token} semiToken A semicolon token to check. + * @returns {boolean} `true` if the next token is `;` or `}`. + */ + function isRedundantSemi(semiToken) { + const nextToken = sourceCode.getTokenAfter(semiToken); + + return ( + !nextToken || + astUtils.isClosingBraceToken(nextToken) || + astUtils.isSemicolonToken(nextToken) + ); + } + + /** + * Check whether a given token is the closing brace of an arrow function. + * @param {Token} lastToken A token to check. + * @returns {boolean} `true` if the token is the closing brace of an arrow function. + */ + function isEndOfArrowBlock(lastToken) { + if (!astUtils.isClosingBraceToken(lastToken)) { + return false; + } + const node = sourceCode.getNodeByRangeIndex(lastToken.range[0]); + + return ( + node.type === "BlockStatement" && + node.parent.type === "ArrowFunctionExpression" + ); + } + + /** + * Check whether a given node is on the same line with the next token. + * @param {Node} node A statement node to check. + * @returns {boolean} `true` if the node is on the same line with the next token. + */ + function isOnSameLineWithNextToken(node) { + const prevToken = sourceCode.getLastToken(node, 1); + const nextToken = sourceCode.getTokenAfter(node); + + return !!nextToken && astUtils.isTokenOnSameLine(prevToken, nextToken); + } + + /** + * Check whether a given node can connect the next line if the next line is unreliable. + * @param {Node} node A statement node to check. + * @returns {boolean} `true` if the node can connect the next line. + */ + function maybeAsiHazardAfter(node) { + const t = node.type; + + if (t === "DoWhileStatement" || + t === "BreakStatement" || + t === "ContinueStatement" || + t === "DebuggerStatement" || + t === "ImportDeclaration" || + t === "ExportAllDeclaration" + ) { + return false; + } + if (t === "ReturnStatement") { + return Boolean(node.argument); + } + if (t === "ExportNamedDeclaration") { + return Boolean(node.declaration); + } + if (isEndOfArrowBlock(sourceCode.getLastToken(node, 1))) { + return false; + } + + return true; + } + + /** + * Check whether a given token can connect the previous statement. + * @param {Token} token A token to check. + * @returns {boolean} `true` if the token is one of `[`, `(`, `/`, `+`, `-`, ```, `++`, and `--`. + */ + function maybeAsiHazardBefore(token) { + return ( + Boolean(token) && + OPT_OUT_PATTERN.test(token.value) && + token.value !== "++" && + token.value !== "--" + ); + } + + /** + * Check if the semicolon of a given node is unnecessary, only true if: + * - next token is a valid statement divider (`;` or `}`). + * - next token is on a new line and the node is not connectable to the new line. + * @param {Node} node A statement node to check. + * @returns {boolean} whether the semicolon is unnecessary. + */ + function canRemoveSemicolon(node) { + if (isRedundantSemi(sourceCode.getLastToken(node))) { + return true; // `;;` or `;}` + } + if (isOnSameLineWithNextToken(node)) { + return false; // One liner. + } + if (beforeStatementContinuationChars === "never" && !maybeAsiHazardAfter(node)) { + return true; // ASI works. This statement doesn't connect to the next. + } + if (!maybeAsiHazardBefore(sourceCode.getTokenAfter(node))) { + return true; // ASI works. The next token doesn't connect to this statement. + } + + return false; + } + + /** + * Checks a node to see if it's in a one-liner block statement. + * @param {ASTNode} node The node to check. + * @returns {boolean} whether the node is in a one-liner block statement. + */ + function isOneLinerBlock(node) { + const parent = node.parent; + const nextToken = sourceCode.getTokenAfter(node); + + if (!nextToken || nextToken.value !== "}") { + return false; + } + return ( + !!parent && + parent.type === "BlockStatement" && + parent.loc.start.line === parent.loc.end.line + ); + } + + /** + * Checks a node to see if it's followed by a semicolon. + * @param {ASTNode} node The node to check. + * @returns {void} + */ + function checkForSemicolon(node) { + const isSemi = astUtils.isSemicolonToken(sourceCode.getLastToken(node)); + + if (never) { + if (isSemi && canRemoveSemicolon(node)) { + report(node, true); + } else if (!isSemi && beforeStatementContinuationChars === "always" && maybeAsiHazardBefore(sourceCode.getTokenAfter(node))) { + report(node); + } + } else { + const oneLinerBlock = (exceptOneLine && isOneLinerBlock(node)); + + if (isSemi && oneLinerBlock) { + report(node, true); + } else if (!isSemi && !oneLinerBlock) { + report(node); + } + } + } + + /** + * Checks to see if there's a semicolon after a variable declaration. + * @param {ASTNode} node The node to check. + * @returns {void} + */ + function checkForSemicolonForVariableDeclaration(node) { + const parent = node.parent; + + if ((parent.type !== "ForStatement" || parent.init !== node) && + (!/^For(?:In|Of)Statement/.test(parent.type) || parent.left !== node) + ) { + checkForSemicolon(node); + } + } + + //-------------------------------------------------------------------------- + // Public API + //-------------------------------------------------------------------------- + + return { + VariableDeclaration: checkForSemicolonForVariableDeclaration, + ExpressionStatement: checkForSemicolon, + ReturnStatement: checkForSemicolon, + ThrowStatement: checkForSemicolon, + DoWhileStatement: checkForSemicolon, + DebuggerStatement: checkForSemicolon, + BreakStatement: checkForSemicolon, + ContinueStatement: checkForSemicolon, + ImportDeclaration: checkForSemicolon, + ExportAllDeclaration: checkForSemicolon, + ExportNamedDeclaration(node) { + if (!node.declaration) { + checkForSemicolon(node); + } + }, + ExportDefaultDeclaration(node) { + if (!/(?:Class|Function)Declaration/.test(node.declaration.type)) { + checkForSemicolon(node); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/sort-imports.js b/node_modules/eslint/lib/rules/sort-imports.js new file mode 100644 index 0000000..8735be5 --- /dev/null +++ b/node_modules/eslint/lib/rules/sort-imports.js @@ -0,0 +1,197 @@ +/** + * @fileoverview Rule to require sorting of import declarations + * @author Christian Schuller + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce sorted import declarations within modules", + category: "ECMAScript 6", + recommended: false, + url: "https://eslint.org/docs/rules/sort-imports" + }, + + schema: [ + { + type: "object", + properties: { + ignoreCase: { + type: "boolean" + }, + memberSyntaxSortOrder: { + type: "array", + items: { + enum: ["none", "all", "multiple", "single"] + }, + uniqueItems: true, + minItems: 4, + maxItems: 4 + }, + ignoreMemberSort: { + type: "boolean" + } + }, + additionalProperties: false + } + ], + + fixable: "code" + }, + + create(context) { + + const configuration = context.options[0] || {}, + ignoreCase = configuration.ignoreCase || false, + ignoreMemberSort = configuration.ignoreMemberSort || false, + memberSyntaxSortOrder = configuration.memberSyntaxSortOrder || ["none", "all", "multiple", "single"], + sourceCode = context.getSourceCode(); + let previousDeclaration = null; + + /** + * Gets the used member syntax style. + * + * import "my-module.js" --> none + * import * as myModule from "my-module.js" --> all + * import {myMember} from "my-module.js" --> single + * import {foo, bar} from "my-module.js" --> multiple + * + * @param {ASTNode} node - the ImportDeclaration node. + * @returns {string} used member parameter style, ["all", "multiple", "single"] + */ + function usedMemberSyntax(node) { + if (node.specifiers.length === 0) { + return "none"; + } + if (node.specifiers[0].type === "ImportNamespaceSpecifier") { + return "all"; + } + if (node.specifiers.length === 1) { + return "single"; + } + return "multiple"; + + } + + /** + * Gets the group by member parameter index for given declaration. + * @param {ASTNode} node - the ImportDeclaration node. + * @returns {number} the declaration group by member index. + */ + function getMemberParameterGroupIndex(node) { + return memberSyntaxSortOrder.indexOf(usedMemberSyntax(node)); + } + + /** + * Gets the local name of the first imported module. + * @param {ASTNode} node - the ImportDeclaration node. + * @returns {?string} the local name of the first imported module. + */ + function getFirstLocalMemberName(node) { + if (node.specifiers[0]) { + return node.specifiers[0].local.name; + } + return null; + + } + + return { + ImportDeclaration(node) { + if (previousDeclaration) { + const currentMemberSyntaxGroupIndex = getMemberParameterGroupIndex(node), + previousMemberSyntaxGroupIndex = getMemberParameterGroupIndex(previousDeclaration); + let currentLocalMemberName = getFirstLocalMemberName(node), + previousLocalMemberName = getFirstLocalMemberName(previousDeclaration); + + if (ignoreCase) { + previousLocalMemberName = previousLocalMemberName && previousLocalMemberName.toLowerCase(); + currentLocalMemberName = currentLocalMemberName && currentLocalMemberName.toLowerCase(); + } + + /* + * When the current declaration uses a different member syntax, + * then check if the ordering is correct. + * Otherwise, make a default string compare (like rule sort-vars to be consistent) of the first used local member name. + */ + if (currentMemberSyntaxGroupIndex !== previousMemberSyntaxGroupIndex) { + if (currentMemberSyntaxGroupIndex < previousMemberSyntaxGroupIndex) { + context.report({ + node, + message: "Expected '{{syntaxA}}' syntax before '{{syntaxB}}' syntax.", + data: { + syntaxA: memberSyntaxSortOrder[currentMemberSyntaxGroupIndex], + syntaxB: memberSyntaxSortOrder[previousMemberSyntaxGroupIndex] + } + }); + } + } else { + if (previousLocalMemberName && + currentLocalMemberName && + currentLocalMemberName < previousLocalMemberName + ) { + context.report({ + node, + message: "Imports should be sorted alphabetically." + }); + } + } + } + + if (!ignoreMemberSort) { + const importSpecifiers = node.specifiers.filter(specifier => specifier.type === "ImportSpecifier"); + const getSortableName = ignoreCase ? specifier => specifier.local.name.toLowerCase() : specifier => specifier.local.name; + const firstUnsortedIndex = importSpecifiers.map(getSortableName).findIndex((name, index, array) => array[index - 1] > name); + + if (firstUnsortedIndex !== -1) { + context.report({ + node: importSpecifiers[firstUnsortedIndex], + message: "Member '{{memberName}}' of the import declaration should be sorted alphabetically.", + data: { memberName: importSpecifiers[firstUnsortedIndex].local.name }, + fix(fixer) { + if (importSpecifiers.some(specifier => + sourceCode.getCommentsBefore(specifier).length || sourceCode.getCommentsAfter(specifier).length)) { + + // If there are comments in the ImportSpecifier list, don't rearrange the specifiers. + return null; + } + + return fixer.replaceTextRange( + [importSpecifiers[0].range[0], importSpecifiers[importSpecifiers.length - 1].range[1]], + importSpecifiers + + // Clone the importSpecifiers array to avoid mutating it + .slice() + + // Sort the array into the desired order + .sort((specifierA, specifierB) => { + const aName = getSortableName(specifierA); + const bName = getSortableName(specifierB); + + return aName > bName ? 1 : -1; + }) + + // Build a string out of the sorted list of import specifiers and the text between the originals + .reduce((sourceText, specifier, index) => { + const textAfterSpecifier = index === importSpecifiers.length - 1 + ? "" + : sourceCode.getText().slice(importSpecifiers[index].range[1], importSpecifiers[index + 1].range[0]); + + return sourceText + sourceCode.getText(specifier) + textAfterSpecifier; + }, "") + ); + } + }); + } + } + + previousDeclaration = node; + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/sort-keys.js b/node_modules/eslint/lib/rules/sort-keys.js new file mode 100644 index 0000000..9318e2f --- /dev/null +++ b/node_modules/eslint/lib/rules/sort-keys.js @@ -0,0 +1,158 @@ +/** + * @fileoverview Rule to require object keys to be sorted + * @author Toru Nagashima + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"), + naturalCompare = require("natural-compare"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Gets the property name of the given `Property` node. + * + * - If the property's key is an `Identifier` node, this returns the key's name + * whether it's a computed property or not. + * - If the property has a static name, this returns the static name. + * - Otherwise, this returns null. + * + * @param {ASTNode} node - The `Property` node to get. + * @returns {string|null} The property name or null. + * @private + */ +function getPropertyName(node) { + return astUtils.getStaticPropertyName(node) || node.key.name || null; +} + +/** + * Functions which check that the given 2 names are in specific order. + * + * Postfix `I` is meant insensitive. + * Postfix `N` is meant natual. + * + * @private + */ +const isValidOrders = { + asc(a, b) { + return a <= b; + }, + ascI(a, b) { + return a.toLowerCase() <= b.toLowerCase(); + }, + ascN(a, b) { + return naturalCompare(a, b) <= 0; + }, + ascIN(a, b) { + return naturalCompare(a.toLowerCase(), b.toLowerCase()) <= 0; + }, + desc(a, b) { + return isValidOrders.asc(b, a); + }, + descI(a, b) { + return isValidOrders.ascI(b, a); + }, + descN(a, b) { + return isValidOrders.ascN(b, a); + }, + descIN(a, b) { + return isValidOrders.ascIN(b, a); + } +}; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require object keys to be sorted", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/sort-keys" + }, + schema: [ + { + enum: ["asc", "desc"] + }, + { + type: "object", + properties: { + caseSensitive: { + type: "boolean" + }, + natural: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + + // Parse options. + const order = context.options[0] || "asc"; + const options = context.options[1]; + const insensitive = (options && options.caseSensitive) === false; + const natual = Boolean(options && options.natural); + const isValidOrder = isValidOrders[ + order + (insensitive ? "I" : "") + (natual ? "N" : "") + ]; + + // The stack to save the previous property's name for each object literals. + let stack = null; + + return { + ObjectExpression() { + stack = { + upper: stack, + prevName: null + }; + }, + + "ObjectExpression:exit"() { + stack = stack.upper; + }, + + Property(node) { + if (node.parent.type === "ObjectPattern") { + return; + } + + const prevName = stack.prevName; + const thisName = getPropertyName(node); + + stack.prevName = thisName || prevName; + + if (!prevName || !thisName) { + return; + } + + if (!isValidOrder(prevName, thisName)) { + context.report({ + node, + loc: node.key.loc, + message: "Expected object keys to be in {{natual}}{{insensitive}}{{order}}ending order. '{{thisName}}' should be before '{{prevName}}'.", + data: { + thisName, + prevName, + order, + insensitive: insensitive ? "insensitive " : "", + natual: natual ? "natural " : "" + } + }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/sort-vars.js b/node_modules/eslint/lib/rules/sort-vars.js new file mode 100644 index 0000000..334deb0 --- /dev/null +++ b/node_modules/eslint/lib/rules/sort-vars.js @@ -0,0 +1,97 @@ +/** + * @fileoverview Rule to require sorting of variables within a single Variable Declaration block + * @author Ilya Volodin + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require variables within the same declaration block to be sorted", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/sort-vars" + }, + + schema: [ + { + type: "object", + properties: { + ignoreCase: { + type: "boolean" + } + }, + additionalProperties: false + } + ], + + fixable: "code" + }, + + create(context) { + + const configuration = context.options[0] || {}, + ignoreCase = configuration.ignoreCase || false, + sourceCode = context.getSourceCode(); + + return { + VariableDeclaration(node) { + const idDeclarations = node.declarations.filter(decl => decl.id.type === "Identifier"); + const getSortableName = ignoreCase ? decl => decl.id.name.toLowerCase() : decl => decl.id.name; + const unfixable = idDeclarations.some(decl => decl.init !== null && decl.init.type !== "Literal"); + let fixed = false; + + idDeclarations.slice(1).reduce((memo, decl) => { + const lastVariableName = getSortableName(memo), + currentVariableName = getSortableName(decl); + + if (currentVariableName < lastVariableName) { + context.report({ + node: decl, + message: "Variables within the same declaration block should be sorted alphabetically.", + fix(fixer) { + if (unfixable || fixed) { + return null; + } + return fixer.replaceTextRange( + [idDeclarations[0].range[0], idDeclarations[idDeclarations.length - 1].range[1]], + idDeclarations + + // Clone the idDeclarations array to avoid mutating it + .slice() + + // Sort the array into the desired order + .sort((declA, declB) => { + const aName = getSortableName(declA); + const bName = getSortableName(declB); + + return aName > bName ? 1 : -1; + }) + + // Build a string out of the sorted list of identifier declarations and the text between the originals + .reduce((sourceText, identifier, index) => { + const textAfterIdentifier = index === idDeclarations.length - 1 + ? "" + : sourceCode.getText().slice(idDeclarations[index].range[1], idDeclarations[index + 1].range[0]); + + return sourceText + sourceCode.getText(identifier) + textAfterIdentifier; + }, "") + + ); + } + }); + fixed = true; + return memo; + } + return decl; + + }, idDeclarations[0]); + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/space-before-blocks.js b/node_modules/eslint/lib/rules/space-before-blocks.js new file mode 100644 index 0000000..2b82066 --- /dev/null +++ b/node_modules/eslint/lib/rules/space-before-blocks.js @@ -0,0 +1,149 @@ +/** + * @fileoverview A rule to ensure whitespace before blocks. + * @author Mathias Schreck + */ + +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce consistent spacing before blocks", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/space-before-blocks" + }, + + fixable: "whitespace", + + schema: [ + { + oneOf: [ + { + enum: ["always", "never"] + }, + { + type: "object", + properties: { + keywords: { + enum: ["always", "never"] + }, + functions: { + enum: ["always", "never"] + }, + classes: { + enum: ["always", "never"] + } + }, + additionalProperties: false + } + ] + } + ] + }, + + create(context) { + const config = context.options[0], + sourceCode = context.getSourceCode(); + let checkFunctions = true, + checkKeywords = true, + checkClasses = true; + + if (typeof config === "object") { + checkFunctions = config.functions !== "never"; + checkKeywords = config.keywords !== "never"; + checkClasses = config.classes !== "never"; + } else if (config === "never") { + checkFunctions = false; + checkKeywords = false; + checkClasses = false; + } + + /** + * Checks whether or not a given token is an arrow operator (=>) or a keyword + * in order to avoid to conflict with `arrow-spacing` and `keyword-spacing`. + * + * @param {Token} token - A token to check. + * @returns {boolean} `true` if the token is an arrow operator. + */ + function isConflicted(token) { + return (token.type === "Punctuator" && token.value === "=>") || token.type === "Keyword"; + } + + /** + * Checks the given BlockStatement node has a preceding space if it doesn’t start on a new line. + * @param {ASTNode|Token} node The AST node of a BlockStatement. + * @returns {void} undefined. + */ + function checkPrecedingSpace(node) { + const precedingToken = sourceCode.getTokenBefore(node); + + if (precedingToken && !isConflicted(precedingToken) && astUtils.isTokenOnSameLine(precedingToken, node)) { + const hasSpace = sourceCode.isSpaceBetweenTokens(precedingToken, node); + const parent = context.getAncestors().pop(); + let requireSpace; + + if (parent.type === "FunctionExpression" || parent.type === "FunctionDeclaration") { + requireSpace = checkFunctions; + } else if (node.type === "ClassBody") { + requireSpace = checkClasses; + } else { + requireSpace = checkKeywords; + } + + if (requireSpace) { + if (!hasSpace) { + context.report({ + node, + message: "Missing space before opening brace.", + fix(fixer) { + return fixer.insertTextBefore(node, " "); + } + }); + } + } else { + if (hasSpace) { + context.report({ + node, + message: "Unexpected space before opening brace.", + fix(fixer) { + return fixer.removeRange([precedingToken.range[1], node.range[0]]); + } + }); + } + } + } + } + + /** + * Checks if the CaseBlock of an given SwitchStatement node has a preceding space. + * @param {ASTNode} node The node of a SwitchStatement. + * @returns {void} undefined. + */ + function checkSpaceBeforeCaseBlock(node) { + const cases = node.cases; + let openingBrace; + + if (cases.length > 0) { + openingBrace = sourceCode.getTokenBefore(cases[0]); + } else { + openingBrace = sourceCode.getLastToken(node, 1); + } + + checkPrecedingSpace(openingBrace); + } + + return { + BlockStatement: checkPrecedingSpace, + ClassBody: checkPrecedingSpace, + SwitchStatement: checkSpaceBeforeCaseBlock + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/space-before-function-paren.js b/node_modules/eslint/lib/rules/space-before-function-paren.js new file mode 100644 index 0000000..51f6cc4 --- /dev/null +++ b/node_modules/eslint/lib/rules/space-before-function-paren.js @@ -0,0 +1,143 @@ +/** + * @fileoverview Rule to validate spacing before function paren. + * @author Mathias Schreck + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce consistent spacing before `function` definition opening parenthesis", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/space-before-function-paren" + }, + + fixable: "whitespace", + + schema: [ + { + oneOf: [ + { + enum: ["always", "never"] + }, + { + type: "object", + properties: { + anonymous: { + enum: ["always", "never", "ignore"] + }, + named: { + enum: ["always", "never", "ignore"] + }, + asyncArrow: { + enum: ["always", "never", "ignore"] + } + }, + additionalProperties: false + } + ] + } + ] + }, + + create(context) { + const sourceCode = context.getSourceCode(); + const baseConfig = typeof context.options[0] === "string" ? context.options[0] : "always"; + const overrideConfig = typeof context.options[0] === "object" ? context.options[0] : {}; + + /** + * Determines whether a function has a name. + * @param {ASTNode} node The function node. + * @returns {boolean} Whether the function has a name. + */ + function isNamedFunction(node) { + if (node.id) { + return true; + } + + const parent = node.parent; + + return parent.type === "MethodDefinition" || + (parent.type === "Property" && + ( + parent.kind === "get" || + parent.kind === "set" || + parent.method + ) + ); + } + + /** + * Gets the config for a given function + * @param {ASTNode} node The function node + * @returns {string} "always", "never", or "ignore" + */ + function getConfigForFunction(node) { + if (node.type === "ArrowFunctionExpression") { + + // Always ignore non-async functions and arrow functions without parens, e.g. async foo => bar + if (node.async && astUtils.isOpeningParenToken(sourceCode.getFirstToken(node, { skip: 1 }))) { + return overrideConfig.asyncArrow || baseConfig; + } + } else if (isNamedFunction(node)) { + return overrideConfig.named || baseConfig; + + // `generator-star-spacing` should warn anonymous generators. E.g. `function* () {}` + } else if (!node.generator) { + return overrideConfig.anonymous || baseConfig; + } + + return "ignore"; + } + + /** + * Checks the parens of a function node + * @param {ASTNode} node A function node + * @returns {void} + */ + function checkFunction(node) { + const functionConfig = getConfigForFunction(node); + + if (functionConfig === "ignore") { + return; + } + + const rightToken = sourceCode.getFirstToken(node, astUtils.isOpeningParenToken); + const leftToken = sourceCode.getTokenBefore(rightToken); + const hasSpacing = sourceCode.isSpaceBetweenTokens(leftToken, rightToken); + + if (hasSpacing && functionConfig === "never") { + context.report({ + node, + loc: leftToken.loc.end, + message: "Unexpected space before function parentheses.", + fix: fixer => fixer.removeRange([leftToken.range[1], rightToken.range[0]]) + }); + } else if (!hasSpacing && functionConfig === "always") { + context.report({ + node, + loc: leftToken.loc.end, + message: "Missing space before function parentheses.", + fix: fixer => fixer.insertTextAfter(leftToken, " ") + }); + } + } + + return { + ArrowFunctionExpression: checkFunction, + FunctionDeclaration: checkFunction, + FunctionExpression: checkFunction + }; + } +}; diff --git a/node_modules/eslint/lib/rules/space-in-parens.js b/node_modules/eslint/lib/rules/space-in-parens.js new file mode 100644 index 0000000..7e315c4 --- /dev/null +++ b/node_modules/eslint/lib/rules/space-in-parens.js @@ -0,0 +1,275 @@ +/** + * @fileoverview Disallows or enforces spaces inside of parentheses. + * @author Jonathan Rajavuori + */ +"use strict"; + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce consistent spacing inside parentheses", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/space-in-parens" + }, + + fixable: "whitespace", + + schema: [ + { + enum: ["always", "never"] + }, + { + type: "object", + properties: { + exceptions: { + type: "array", + items: { + enum: ["{}", "[]", "()", "empty"] + }, + uniqueItems: true + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + + const MISSING_SPACE_MESSAGE = "There must be a space inside this paren.", + REJECTED_SPACE_MESSAGE = "There should be no spaces inside this paren.", + ALWAYS = context.options[0] === "always", + exceptionsArrayOptions = (context.options[1] && context.options[1].exceptions) || [], + options = {}; + let exceptions; + + if (exceptionsArrayOptions.length) { + options.braceException = exceptionsArrayOptions.indexOf("{}") !== -1; + options.bracketException = exceptionsArrayOptions.indexOf("[]") !== -1; + options.parenException = exceptionsArrayOptions.indexOf("()") !== -1; + options.empty = exceptionsArrayOptions.indexOf("empty") !== -1; + } + + /** + * Produces an object with the opener and closer exception values + * @param {Object} opts The exception options + * @returns {Object} `openers` and `closers` exception values + * @private + */ + function getExceptions() { + const openers = [], + closers = []; + + if (options.braceException) { + openers.push("{"); + closers.push("}"); + } + + if (options.bracketException) { + openers.push("["); + closers.push("]"); + } + + if (options.parenException) { + openers.push("("); + closers.push(")"); + } + + if (options.empty) { + openers.push(")"); + closers.push("("); + } + + return { + openers, + closers + }; + } + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + const sourceCode = context.getSourceCode(); + + /** + * Determines if a token is one of the exceptions for the opener paren + * @param {Object} token The token to check + * @returns {boolean} True if the token is one of the exceptions for the opener paren + */ + function isOpenerException(token) { + return token.type === "Punctuator" && exceptions.openers.indexOf(token.value) >= 0; + } + + /** + * Determines if a token is one of the exceptions for the closer paren + * @param {Object} token The token to check + * @returns {boolean} True if the token is one of the exceptions for the closer paren + */ + function isCloserException(token) { + return token.type === "Punctuator" && exceptions.closers.indexOf(token.value) >= 0; + } + + /** + * Determines if an opener paren should have a missing space after it + * @param {Object} left The paren token + * @param {Object} right The token after it + * @returns {boolean} True if the paren should have a space + */ + function shouldOpenerHaveSpace(left, right) { + if (sourceCode.isSpaceBetweenTokens(left, right)) { + return false; + } + + if (ALWAYS) { + if (astUtils.isClosingParenToken(right)) { + return false; + } + return !isOpenerException(right); + } + return isOpenerException(right); + + } + + /** + * Determines if an closer paren should have a missing space after it + * @param {Object} left The token before the paren + * @param {Object} right The paren token + * @returns {boolean} True if the paren should have a space + */ + function shouldCloserHaveSpace(left, right) { + if (astUtils.isOpeningParenToken(left)) { + return false; + } + + if (sourceCode.isSpaceBetweenTokens(left, right)) { + return false; + } + + if (ALWAYS) { + return !isCloserException(left); + } + return isCloserException(left); + + } + + /** + * Determines if an opener paren should not have an existing space after it + * @param {Object} left The paren token + * @param {Object} right The token after it + * @returns {boolean} True if the paren should reject the space + */ + function shouldOpenerRejectSpace(left, right) { + if (right.type === "Line") { + return false; + } + + if (!astUtils.isTokenOnSameLine(left, right)) { + return false; + } + + if (!sourceCode.isSpaceBetweenTokens(left, right)) { + return false; + } + + if (ALWAYS) { + return isOpenerException(right); + } + return !isOpenerException(right); + + } + + /** + * Determines if an closer paren should not have an existing space after it + * @param {Object} left The token before the paren + * @param {Object} right The paren token + * @returns {boolean} True if the paren should reject the space + */ + function shouldCloserRejectSpace(left, right) { + if (astUtils.isOpeningParenToken(left)) { + return false; + } + + if (!astUtils.isTokenOnSameLine(left, right)) { + return false; + } + + if (!sourceCode.isSpaceBetweenTokens(left, right)) { + return false; + } + + if (ALWAYS) { + return isCloserException(left); + } + return !isCloserException(left); + + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + Program: function checkParenSpaces(node) { + exceptions = getExceptions(); + const tokens = sourceCode.tokensAndComments; + + tokens.forEach((token, i) => { + const prevToken = tokens[i - 1]; + const nextToken = tokens[i + 1]; + + if (!astUtils.isOpeningParenToken(token) && !astUtils.isClosingParenToken(token)) { + return; + } + + if (token.value === "(" && shouldOpenerHaveSpace(token, nextToken)) { + context.report({ + node, + loc: token.loc.start, + message: MISSING_SPACE_MESSAGE, + fix(fixer) { + return fixer.insertTextAfter(token, " "); + } + }); + } else if (token.value === "(" && shouldOpenerRejectSpace(token, nextToken)) { + context.report({ + node, + loc: token.loc.start, + message: REJECTED_SPACE_MESSAGE, + fix(fixer) { + return fixer.removeRange([token.range[1], nextToken.range[0]]); + } + }); + } else if (token.value === ")" && shouldCloserHaveSpace(prevToken, token)) { + + // context.report(node, token.loc.start, MISSING_SPACE_MESSAGE); + context.report({ + node, + loc: token.loc.start, + message: MISSING_SPACE_MESSAGE, + fix(fixer) { + return fixer.insertTextBefore(token, " "); + } + }); + } else if (token.value === ")" && shouldCloserRejectSpace(prevToken, token)) { + context.report({ + node, + loc: token.loc.start, + message: REJECTED_SPACE_MESSAGE, + fix(fixer) { + return fixer.removeRange([prevToken.range[1], token.range[0]]); + } + }); + } + }); + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/space-infix-ops.js b/node_modules/eslint/lib/rules/space-infix-ops.js new file mode 100644 index 0000000..49b6465 --- /dev/null +++ b/node_modules/eslint/lib/rules/space-infix-ops.js @@ -0,0 +1,168 @@ +/** + * @fileoverview Require spaces around infix operators + * @author Michael Ficarra + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require spacing around infix operators", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/space-infix-ops" + }, + + fixable: "whitespace", + + schema: [ + { + type: "object", + properties: { + int32Hint: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + const int32Hint = context.options[0] ? context.options[0].int32Hint === true : false; + + const OPERATORS = [ + "*", "/", "%", "+", "-", "<<", ">>", ">>>", "<", "<=", ">", ">=", "in", + "instanceof", "==", "!=", "===", "!==", "&", "^", "|", "&&", "||", "=", + "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=", "&=", "^=", "|=", + "?", ":", ",", "**" + ]; + + const sourceCode = context.getSourceCode(); + + /** + * Returns the first token which violates the rule + * @param {ASTNode} left - The left node of the main node + * @param {ASTNode} right - The right node of the main node + * @returns {Object} The violator token or null + * @private + */ + function getFirstNonSpacedToken(left, right) { + const tokens = sourceCode.getTokensBetween(left, right, 1); + + for (let i = 1, l = tokens.length - 1; i < l; ++i) { + const op = tokens[i]; + + if ( + (op.type === "Punctuator" || op.type === "Keyword") && + OPERATORS.indexOf(op.value) >= 0 && + (tokens[i - 1].range[1] >= op.range[0] || op.range[1] >= tokens[i + 1].range[0]) + ) { + return op; + } + } + return null; + } + + /** + * Reports an AST node as a rule violation + * @param {ASTNode} mainNode - The node to report + * @param {Object} culpritToken - The token which has a problem + * @returns {void} + * @private + */ + function report(mainNode, culpritToken) { + context.report({ + node: mainNode, + loc: culpritToken.loc.start, + message: "Infix operators must be spaced.", + fix(fixer) { + const previousToken = sourceCode.getTokenBefore(culpritToken); + const afterToken = sourceCode.getTokenAfter(culpritToken); + let fixString = ""; + + if (culpritToken.range[0] - previousToken.range[1] === 0) { + fixString = " "; + } + + fixString += culpritToken.value; + + if (afterToken.range[0] - culpritToken.range[1] === 0) { + fixString += " "; + } + + return fixer.replaceText(culpritToken, fixString); + } + }); + } + + /** + * Check if the node is binary then report + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ + function checkBinary(node) { + const leftNode = (node.left.typeAnnotation) ? node.left.typeAnnotation : node.left; + const rightNode = node.right; + + const nonSpacedNode = getFirstNonSpacedToken(leftNode, rightNode); + + if (nonSpacedNode) { + if (!(int32Hint && sourceCode.getText(node).endsWith("|0"))) { + report(node, nonSpacedNode); + } + } + } + + /** + * Check if the node is conditional + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ + function checkConditional(node) { + const nonSpacedConsequesntNode = getFirstNonSpacedToken(node.test, node.consequent); + const nonSpacedAlternateNode = getFirstNonSpacedToken(node.consequent, node.alternate); + + if (nonSpacedConsequesntNode) { + report(node, nonSpacedConsequesntNode); + } else if (nonSpacedAlternateNode) { + report(node, nonSpacedAlternateNode); + } + } + + /** + * Check if the node is a variable + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ + function checkVar(node) { + const leftNode = (node.id.typeAnnotation) ? node.id.typeAnnotation : node.id; + const rightNode = node.init; + + if (rightNode) { + const nonSpacedNode = getFirstNonSpacedToken(leftNode, rightNode); + + if (nonSpacedNode) { + report(node, nonSpacedNode); + } + } + } + + return { + AssignmentExpression: checkBinary, + AssignmentPattern: checkBinary, + BinaryExpression: checkBinary, + LogicalExpression: checkBinary, + ConditionalExpression: checkConditional, + VariableDeclarator: checkVar + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/space-unary-ops.js b/node_modules/eslint/lib/rules/space-unary-ops.js new file mode 100644 index 0000000..601d705 --- /dev/null +++ b/node_modules/eslint/lib/rules/space-unary-ops.js @@ -0,0 +1,311 @@ +/** + * @fileoverview This rule shoud require or disallow spaces before or after unary operations. + * @author Marcin Kumorek + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce consistent spacing before or after unary operators", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/space-unary-ops" + }, + + fixable: "whitespace", + + schema: [ + { + type: "object", + properties: { + words: { + type: "boolean" + }, + nonwords: { + type: "boolean" + }, + overrides: { + type: "object", + additionalProperties: { + type: "boolean" + } + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + const options = context.options && Array.isArray(context.options) && context.options[0] || { words: true, nonwords: false }; + + const sourceCode = context.getSourceCode(); + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * Check if the node is the first "!" in a "!!" convert to Boolean expression + * @param {ASTnode} node AST node + * @returns {boolean} Whether or not the node is first "!" in "!!" + */ + function isFirstBangInBangBangExpression(node) { + return node && node.type === "UnaryExpression" && node.argument.operator === "!" && + node.argument && node.argument.type === "UnaryExpression" && node.argument.operator === "!"; + } + + /** + * Checks if an override exists for a given operator. + * @param {string} operator Operator + * @returns {boolean} Whether or not an override has been provided for the operator + */ + function overrideExistsForOperator(operator) { + return options.overrides && options.overrides.hasOwnProperty(operator); + } + + /** + * Gets the value that the override was set to for this operator + * @param {string} operator Operator + * @returns {boolean} Whether or not an override enforces a space with this operator + */ + function overrideEnforcesSpaces(operator) { + return options.overrides[operator]; + } + + /** + * Verify Unary Word Operator has spaces after the word operator + * @param {ASTnode} node AST node + * @param {Object} firstToken first token from the AST node + * @param {Object} secondToken second token from the AST node + * @param {string} word The word to be used for reporting + * @returns {void} + */ + function verifyWordHasSpaces(node, firstToken, secondToken, word) { + if (secondToken.range[0] === firstToken.range[1]) { + context.report({ + node, + message: "Unary word operator '{{word}}' must be followed by whitespace.", + data: { + word + }, + fix(fixer) { + return fixer.insertTextAfter(firstToken, " "); + } + }); + } + } + + /** + * Verify Unary Word Operator doesn't have spaces after the word operator + * @param {ASTnode} node AST node + * @param {Object} firstToken first token from the AST node + * @param {Object} secondToken second token from the AST node + * @param {string} word The word to be used for reporting + * @returns {void} + */ + function verifyWordDoesntHaveSpaces(node, firstToken, secondToken, word) { + if (astUtils.canTokensBeAdjacent(firstToken, secondToken)) { + if (secondToken.range[0] > firstToken.range[1]) { + context.report({ + node, + message: "Unexpected space after unary word operator '{{word}}'.", + data: { + word + }, + fix(fixer) { + return fixer.removeRange([firstToken.range[1], secondToken.range[0]]); + } + }); + } + } + } + + /** + * Check Unary Word Operators for spaces after the word operator + * @param {ASTnode} node AST node + * @param {Object} firstToken first token from the AST node + * @param {Object} secondToken second token from the AST node + * @param {string} word The word to be used for reporting + * @returns {void} + */ + function checkUnaryWordOperatorForSpaces(node, firstToken, secondToken, word) { + word = word || firstToken.value; + + if (overrideExistsForOperator(word)) { + if (overrideEnforcesSpaces(word)) { + verifyWordHasSpaces(node, firstToken, secondToken, word); + } else { + verifyWordDoesntHaveSpaces(node, firstToken, secondToken, word); + } + } else if (options.words) { + verifyWordHasSpaces(node, firstToken, secondToken, word); + } else { + verifyWordDoesntHaveSpaces(node, firstToken, secondToken, word); + } + } + + /** + * Verifies YieldExpressions satisfy spacing requirements + * @param {ASTnode} node AST node + * @returns {void} + */ + function checkForSpacesAfterYield(node) { + const tokens = sourceCode.getFirstTokens(node, 3), + word = "yield"; + + if (!node.argument || node.delegate) { + return; + } + + checkUnaryWordOperatorForSpaces(node, tokens[0], tokens[1], word); + } + + /** + * Verifies AwaitExpressions satisfy spacing requirements + * @param {ASTNode} node AwaitExpression AST node + * @returns {void} + */ + function checkForSpacesAfterAwait(node) { + const tokens = sourceCode.getFirstTokens(node, 3); + + checkUnaryWordOperatorForSpaces(node, tokens[0], tokens[1], "await"); + } + + /** + * Verifies UnaryExpression, UpdateExpression and NewExpression have spaces before or after the operator + * @param {ASTnode} node AST node + * @param {Object} firstToken First token in the expression + * @param {Object} secondToken Second token in the expression + * @returns {void} + */ + function verifyNonWordsHaveSpaces(node, firstToken, secondToken) { + if (node.prefix) { + if (isFirstBangInBangBangExpression(node)) { + return; + } + if (firstToken.range[1] === secondToken.range[0]) { + context.report({ + node, + message: "Unary operator '{{operator}}' must be followed by whitespace.", + data: { + operator: firstToken.value + }, + fix(fixer) { + return fixer.insertTextAfter(firstToken, " "); + } + }); + } + } else { + if (firstToken.range[1] === secondToken.range[0]) { + context.report({ + node, + message: "Space is required before unary expressions '{{token}}'.", + data: { + token: secondToken.value + }, + fix(fixer) { + return fixer.insertTextBefore(secondToken, " "); + } + }); + } + } + } + + /** + * Verifies UnaryExpression, UpdateExpression and NewExpression don't have spaces before or after the operator + * @param {ASTnode} node AST node + * @param {Object} firstToken First token in the expression + * @param {Object} secondToken Second token in the expression + * @returns {void} + */ + function verifyNonWordsDontHaveSpaces(node, firstToken, secondToken) { + if (node.prefix) { + if (secondToken.range[0] > firstToken.range[1]) { + context.report({ + node, + message: "Unexpected space after unary operator '{{operator}}'.", + data: { + operator: firstToken.value + }, + fix(fixer) { + if (astUtils.canTokensBeAdjacent(firstToken, secondToken)) { + return fixer.removeRange([firstToken.range[1], secondToken.range[0]]); + } + return null; + } + }); + } + } else { + if (secondToken.range[0] > firstToken.range[1]) { + context.report({ + node, + message: "Unexpected space before unary operator '{{operator}}'.", + data: { + operator: secondToken.value + }, + fix(fixer) { + return fixer.removeRange([firstToken.range[1], secondToken.range[0]]); + } + }); + } + } + } + + /** + * Verifies UnaryExpression, UpdateExpression and NewExpression satisfy spacing requirements + * @param {ASTnode} node AST node + * @returns {void} + */ + function checkForSpaces(node) { + const tokens = node.type === "UpdateExpression" && !node.prefix + ? sourceCode.getLastTokens(node, 2) + : sourceCode.getFirstTokens(node, 2); + const firstToken = tokens[0]; + const secondToken = tokens[1]; + + if ((node.type === "NewExpression" || node.prefix) && firstToken.type === "Keyword") { + checkUnaryWordOperatorForSpaces(node, firstToken, secondToken); + return; + } + + const operator = node.prefix ? tokens[0].value : tokens[1].value; + + if (overrideExistsForOperator(operator)) { + if (overrideEnforcesSpaces(operator)) { + verifyNonWordsHaveSpaces(node, firstToken, secondToken); + } else { + verifyNonWordsDontHaveSpaces(node, firstToken, secondToken); + } + } else if (options.nonwords) { + verifyNonWordsHaveSpaces(node, firstToken, secondToken); + } else { + verifyNonWordsDontHaveSpaces(node, firstToken, secondToken); + } + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + UnaryExpression: checkForSpaces, + UpdateExpression: checkForSpaces, + NewExpression: checkForSpaces, + YieldExpression: checkForSpacesAfterYield, + AwaitExpression: checkForSpacesAfterAwait + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/spaced-comment.js b/node_modules/eslint/lib/rules/spaced-comment.js new file mode 100644 index 0000000..9d2f5f4 --- /dev/null +++ b/node_modules/eslint/lib/rules/spaced-comment.js @@ -0,0 +1,376 @@ +/** + * @fileoverview Source code for spaced-comments rule + * @author Gyandeep Singh + */ +"use strict"; + +const lodash = require("lodash"); +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Escapes the control characters of a given string. + * @param {string} s - A string to escape. + * @returns {string} An escaped string. + */ +function escape(s) { + const isOneChar = s.length === 1; + + s = lodash.escapeRegExp(s); + return isOneChar ? s : `(?:${s})`; +} + +/** + * Escapes the control characters of a given string. + * And adds a repeat flag. + * @param {string} s - A string to escape. + * @returns {string} An escaped string. + */ +function escapeAndRepeat(s) { + return `${escape(s)}+`; +} + +/** + * Parses `markers` option. + * If markers don't include `"*"`, this adds `"*"` to allow JSDoc comments. + * @param {string[]} [markers] - A marker list. + * @returns {string[]} A marker list. + */ +function parseMarkersOption(markers) { + markers = markers ? markers.slice(0) : []; + + // `*` is a marker for JSDoc comments. + if (markers.indexOf("*") === -1) { + markers.push("*"); + } + + return markers; +} + +/** + * Creates string pattern for exceptions. + * Generated pattern: + * + * 1. A space or an exception pattern sequence. + * + * @param {string[]} exceptions - An exception pattern list. + * @returns {string} A regular expression string for exceptions. + */ +function createExceptionsPattern(exceptions) { + let pattern = ""; + + /* + * A space or an exception pattern sequence. + * [] ==> "\s" + * ["-"] ==> "(?:\s|\-+$)" + * ["-", "="] ==> "(?:\s|(?:\-+|=+)$)" + * ["-", "=", "--=="] ==> "(?:\s|(?:\-+|=+|(?:\-\-==)+)$)" ==> https://jex.im/regulex/#!embed=false&flags=&re=(%3F%3A%5Cs%7C(%3F%3A%5C-%2B%7C%3D%2B%7C(%3F%3A%5C-%5C-%3D%3D)%2B)%24) + */ + if (exceptions.length === 0) { + + // a space. + pattern += "\\s"; + } else { + + // a space or... + pattern += "(?:\\s|"; + + if (exceptions.length === 1) { + + // a sequence of the exception pattern. + pattern += escapeAndRepeat(exceptions[0]); + } else { + + // a sequence of one of the exception patterns. + pattern += "(?:"; + pattern += exceptions.map(escapeAndRepeat).join("|"); + pattern += ")"; + } + pattern += `(?:$|[${Array.from(astUtils.LINEBREAKS).join("")}]))`; + } + + return pattern; +} + +/** + * Creates RegExp object for `always` mode. + * Generated pattern for beginning of comment: + * + * 1. First, a marker or nothing. + * 2. Next, a space or an exception pattern sequence. + * + * @param {string[]} markers - A marker list. + * @param {string[]} exceptions - An exception pattern list. + * @returns {RegExp} A RegExp object for the beginning of a comment in `always` mode. + */ +function createAlwaysStylePattern(markers, exceptions) { + let pattern = "^"; + + /* + * A marker or nothing. + * ["*"] ==> "\*?" + * ["*", "!"] ==> "(?:\*|!)?" + * ["*", "/", "!<"] ==> "(?:\*|\/|(?:!<))?" ==> https://jex.im/regulex/#!embed=false&flags=&re=(%3F%3A%5C*%7C%5C%2F%7C(%3F%3A!%3C))%3F + */ + if (markers.length === 1) { + + // the marker. + pattern += escape(markers[0]); + } else { + + // one of markers. + pattern += "(?:"; + pattern += markers.map(escape).join("|"); + pattern += ")"; + } + + pattern += "?"; // or nothing. + pattern += createExceptionsPattern(exceptions); + + return new RegExp(pattern); +} + +/** + * Creates RegExp object for `never` mode. + * Generated pattern for beginning of comment: + * + * 1. First, a marker or nothing (captured). + * 2. Next, a space or a tab. + * + * @param {string[]} markers - A marker list. + * @returns {RegExp} A RegExp object for `never` mode. + */ +function createNeverStylePattern(markers) { + const pattern = `^(${markers.map(escape).join("|")})?[ \t]+`; + + return new RegExp(pattern); +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce consistent spacing after the `//` or `/*` in a comment", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/spaced-comment" + }, + + fixable: "whitespace", + + schema: [ + { + enum: ["always", "never"] + }, + { + type: "object", + properties: { + exceptions: { + type: "array", + items: { + type: "string" + } + }, + markers: { + type: "array", + items: { + type: "string" + } + }, + line: { + type: "object", + properties: { + exceptions: { + type: "array", + items: { + type: "string" + } + }, + markers: { + type: "array", + items: { + type: "string" + } + } + }, + additionalProperties: false + }, + block: { + type: "object", + properties: { + exceptions: { + type: "array", + items: { + type: "string" + } + }, + markers: { + type: "array", + items: { + type: "string" + } + }, + balanced: { + type: "boolean" + } + }, + additionalProperties: false + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + + const sourceCode = context.getSourceCode(); + + // Unless the first option is never, require a space + const requireSpace = context.options[0] !== "never"; + + /* + * Parse the second options. + * If markers don't include `"*"`, it's added automatically for JSDoc + * comments. + */ + const config = context.options[1] || {}; + const balanced = config.block && config.block.balanced; + + const styleRules = ["block", "line"].reduce((rule, type) => { + const markers = parseMarkersOption(config[type] && config[type].markers || config.markers); + const exceptions = config[type] && config[type].exceptions || config.exceptions || []; + const endNeverPattern = "[ \t]+$"; + + // Create RegExp object for valid patterns. + rule[type] = { + beginRegex: requireSpace ? createAlwaysStylePattern(markers, exceptions) : createNeverStylePattern(markers), + endRegex: balanced && requireSpace ? new RegExp(`${createExceptionsPattern(exceptions)}$`) : new RegExp(endNeverPattern), + hasExceptions: exceptions.length > 0, + markers: new RegExp(`^(${markers.map(escape).join("|")})`) + }; + + return rule; + }, {}); + + /** + * Reports a beginning spacing error with an appropriate message. + * @param {ASTNode} node - A comment node to check. + * @param {string} message - An error message to report. + * @param {Array} match - An array of match results for markers. + * @param {string} refChar - Character used for reference in the error message. + * @returns {void} + */ + function reportBegin(node, message, match, refChar) { + const type = node.type.toLowerCase(), + commentIdentifier = type === "block" ? "/*" : "//"; + + context.report({ + node, + fix(fixer) { + const start = node.range[0]; + let end = start + 2; + + if (requireSpace) { + if (match) { + end += match[0].length; + } + return fixer.insertTextAfterRange([start, end], " "); + } + end += match[0].length; + return fixer.replaceTextRange([start, end], commentIdentifier + (match[1] ? match[1] : "")); + + }, + message, + data: { refChar } + }); + } + + /** + * Reports an ending spacing error with an appropriate message. + * @param {ASTNode} node - A comment node to check. + * @param {string} message - An error message to report. + * @param {string} match - An array of the matched whitespace characters. + * @returns {void} + */ + function reportEnd(node, message, match) { + context.report({ + node, + fix(fixer) { + if (requireSpace) { + return fixer.insertTextAfterRange([node.range[0], node.range[1] - 2], " "); + } + const end = node.range[1] - 2, + start = end - match[0].length; + + return fixer.replaceTextRange([start, end], ""); + + }, + message + }); + } + + /** + * Reports a given comment if it's invalid. + * @param {ASTNode} node - a comment node to check. + * @returns {void} + */ + function checkCommentForSpace(node) { + const type = node.type.toLowerCase(), + rule = styleRules[type], + commentIdentifier = type === "block" ? "/*" : "//"; + + // Ignores empty comments. + if (node.value.length === 0) { + return; + } + + const beginMatch = rule.beginRegex.exec(node.value); + const endMatch = rule.endRegex.exec(node.value); + + // Checks. + if (requireSpace) { + if (!beginMatch) { + const hasMarker = rule.markers.exec(node.value); + const marker = hasMarker ? commentIdentifier + hasMarker[0] : commentIdentifier; + + if (rule.hasExceptions) { + reportBegin(node, "Expected exception block, space or tab after '{{refChar}}' in comment.", hasMarker, marker); + } else { + reportBegin(node, "Expected space or tab after '{{refChar}}' in comment.", hasMarker, marker); + } + } + + if (balanced && type === "block" && !endMatch) { + reportEnd(node, "Expected space or tab before '*/' in comment."); + } + } else { + if (beginMatch) { + if (!beginMatch[1]) { + reportBegin(node, "Unexpected space or tab after '{{refChar}}' in comment.", beginMatch, commentIdentifier); + } else { + reportBegin(node, "Unexpected space or tab after marker ({{refChar}}) in comment.", beginMatch, beginMatch[1]); + } + } + + if (balanced && type === "block" && endMatch) { + reportEnd(node, "Unexpected space or tab before '*/' in comment.", endMatch); + } + } + } + + return { + Program() { + const comments = sourceCode.getAllComments(); + + comments.filter(token => token.type !== "Shebang").forEach(checkCommentForSpace); + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/strict.js b/node_modules/eslint/lib/rules/strict.js new file mode 100644 index 0000000..633a8b3 --- /dev/null +++ b/node_modules/eslint/lib/rules/strict.js @@ -0,0 +1,278 @@ +/** + * @fileoverview Rule to control usage of strict mode directives. + * @author Brandon Mills + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const messages = { + function: "Use the function form of 'use strict'.", + global: "Use the global form of 'use strict'.", + multiple: "Multiple 'use strict' directives.", + never: "Strict mode is not permitted.", + unnecessary: "Unnecessary 'use strict' directive.", + module: "'use strict' is unnecessary inside of modules.", + implied: "'use strict' is unnecessary when implied strict mode is enabled.", + unnecessaryInClasses: "'use strict' is unnecessary inside of classes.", + nonSimpleParameterList: "'use strict' directive inside a function with non-simple parameter list throws a syntax error since ES2016.", + wrap: "Wrap {{name}} in a function with 'use strict' directive." +}; + +/** + * Gets all of the Use Strict Directives in the Directive Prologue of a group of + * statements. + * @param {ASTNode[]} statements Statements in the program or function body. + * @returns {ASTNode[]} All of the Use Strict Directives. + */ +function getUseStrictDirectives(statements) { + const directives = []; + + for (let i = 0; i < statements.length; i++) { + const statement = statements[i]; + + if ( + statement.type === "ExpressionStatement" && + statement.expression.type === "Literal" && + statement.expression.value === "use strict" + ) { + directives[i] = statement; + } else { + break; + } + } + + return directives; +} + +/** + * Checks whether a given parameter is a simple parameter. + * + * @param {ASTNode} node - A pattern node to check. + * @returns {boolean} `true` if the node is an Identifier node. + */ +function isSimpleParameter(node) { + return node.type === "Identifier"; +} + +/** + * Checks whether a given parameter list is a simple parameter list. + * + * @param {ASTNode[]} params - A parameter list to check. + * @returns {boolean} `true` if the every parameter is an Identifier node. + */ +function isSimpleParameterList(params) { + return params.every(isSimpleParameter); +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require or disallow strict mode directives", + category: "Strict Mode", + recommended: false, + url: "https://eslint.org/docs/rules/strict" + }, + + schema: [ + { + enum: ["never", "global", "function", "safe"] + } + ], + + fixable: "code" + }, + + create(context) { + + const ecmaFeatures = context.parserOptions.ecmaFeatures || {}, + scopes = [], + classScopes = []; + let mode = context.options[0] || "safe"; + + if (ecmaFeatures.impliedStrict) { + mode = "implied"; + } else if (mode === "safe") { + mode = ecmaFeatures.globalReturn ? "global" : "function"; + } + + /** + * Determines whether a reported error should be fixed, depending on the error type. + * @param {string} errorType The type of error + * @returns {boolean} `true` if the reported error should be fixed + */ + function shouldFix(errorType) { + return errorType === "multiple" || errorType === "unnecessary" || errorType === "module" || errorType === "implied" || errorType === "unnecessaryInClasses"; + } + + /** + * Gets a fixer function to remove a given 'use strict' directive. + * @param {ASTNode} node The directive that should be removed + * @returns {Function} A fixer function + */ + function getFixFunction(node) { + return fixer => fixer.remove(node); + } + + /** + * Report a slice of an array of nodes with a given message. + * @param {ASTNode[]} nodes Nodes. + * @param {string} start Index to start from. + * @param {string} end Index to end before. + * @param {string} message Message to display. + * @param {boolean} fix `true` if the directive should be fixed (i.e. removed) + * @returns {void} + */ + function reportSlice(nodes, start, end, message, fix) { + nodes.slice(start, end).forEach(node => { + context.report({ node, message, fix: fix ? getFixFunction(node) : null }); + }); + } + + /** + * Report all nodes in an array with a given message. + * @param {ASTNode[]} nodes Nodes. + * @param {string} message Message to display. + * @param {boolean} fix `true` if the directive should be fixed (i.e. removed) + * @returns {void} + */ + function reportAll(nodes, message, fix) { + reportSlice(nodes, 0, nodes.length, message, fix); + } + + /** + * Report all nodes in an array, except the first, with a given message. + * @param {ASTNode[]} nodes Nodes. + * @param {string} message Message to display. + * @param {boolean} fix `true` if the directive should be fixed (i.e. removed) + * @returns {void} + */ + function reportAllExceptFirst(nodes, message, fix) { + reportSlice(nodes, 1, nodes.length, message, fix); + } + + /** + * Entering a function in 'function' mode pushes a new nested scope onto the + * stack. The new scope is true if the nested function is strict mode code. + * @param {ASTNode} node The function declaration or expression. + * @param {ASTNode[]} useStrictDirectives The Use Strict Directives of the node. + * @returns {void} + */ + function enterFunctionInFunctionMode(node, useStrictDirectives) { + const isInClass = classScopes.length > 0, + isParentGlobal = scopes.length === 0 && classScopes.length === 0, + isParentStrict = scopes.length > 0 && scopes[scopes.length - 1], + isStrict = useStrictDirectives.length > 0; + + if (isStrict) { + if (!isSimpleParameterList(node.params)) { + context.report({ node: useStrictDirectives[0], message: messages.nonSimpleParameterList }); + } else if (isParentStrict) { + context.report({ node: useStrictDirectives[0], message: messages.unnecessary, fix: getFixFunction(useStrictDirectives[0]) }); + } else if (isInClass) { + context.report({ node: useStrictDirectives[0], message: messages.unnecessaryInClasses, fix: getFixFunction(useStrictDirectives[0]) }); + } + + reportAllExceptFirst(useStrictDirectives, messages.multiple, true); + } else if (isParentGlobal) { + if (isSimpleParameterList(node.params)) { + context.report({ node, message: messages.function }); + } else { + context.report({ + node, + message: messages.wrap, + data: { name: astUtils.getFunctionNameWithKind(node) } + }); + } + } + + scopes.push(isParentStrict || isStrict); + } + + /** + * Exiting a function in 'function' mode pops its scope off the stack. + * @returns {void} + */ + function exitFunctionInFunctionMode() { + scopes.pop(); + } + + /** + * Enter a function and either: + * - Push a new nested scope onto the stack (in 'function' mode). + * - Report all the Use Strict Directives (in the other modes). + * @param {ASTNode} node The function declaration or expression. + * @returns {void} + */ + function enterFunction(node) { + const isBlock = node.body.type === "BlockStatement", + useStrictDirectives = isBlock + ? getUseStrictDirectives(node.body.body) : []; + + if (mode === "function") { + enterFunctionInFunctionMode(node, useStrictDirectives); + } else if (useStrictDirectives.length > 0) { + if (isSimpleParameterList(node.params)) { + reportAll(useStrictDirectives, messages[mode], shouldFix(mode)); + } else { + context.report({ node: useStrictDirectives[0], message: messages.nonSimpleParameterList }); + reportAllExceptFirst(useStrictDirectives, messages.multiple, true); + } + } + } + + const rule = { + Program(node) { + const useStrictDirectives = getUseStrictDirectives(node.body); + + if (node.sourceType === "module") { + mode = "module"; + } + + if (mode === "global") { + if (node.body.length > 0 && useStrictDirectives.length === 0) { + context.report({ node, message: messages.global }); + } + reportAllExceptFirst(useStrictDirectives, messages.multiple, true); + } else { + reportAll(useStrictDirectives, messages[mode], shouldFix(mode)); + } + }, + FunctionDeclaration: enterFunction, + FunctionExpression: enterFunction, + ArrowFunctionExpression: enterFunction + }; + + if (mode === "function") { + Object.assign(rule, { + + // Inside of class bodies are always strict mode. + ClassBody() { + classScopes.push(true); + }, + "ClassBody:exit"() { + classScopes.pop(); + }, + + "FunctionDeclaration:exit": exitFunctionInFunctionMode, + "FunctionExpression:exit": exitFunctionInFunctionMode, + "ArrowFunctionExpression:exit": exitFunctionInFunctionMode + }); + } + + return rule; + } +}; diff --git a/node_modules/eslint/lib/rules/switch-colon-spacing.js b/node_modules/eslint/lib/rules/switch-colon-spacing.js new file mode 100644 index 0000000..cf19df6 --- /dev/null +++ b/node_modules/eslint/lib/rules/switch-colon-spacing.js @@ -0,0 +1,134 @@ +/** + * @fileoverview Rule to enforce spacing around colons of switch statements. + * @author Toru Nagashima + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce spacing around colons of switch statements", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/switch-colon-spacing" + }, + schema: [ + { + type: "object", + properties: { + before: { type: "boolean" }, + after: { type: "boolean" } + }, + additionalProperties: false + } + ], + fixable: "whitespace" + }, + + create(context) { + const sourceCode = context.getSourceCode(); + const options = context.options[0] || {}; + const beforeSpacing = options.before === true; // false by default + const afterSpacing = options.after !== false; // true by default + + /** + * Get the colon token of the given SwitchCase node. + * @param {ASTNode} node The SwitchCase node to get. + * @returns {Token} The colon token of the node. + */ + function getColonToken(node) { + if (node.test) { + return sourceCode.getTokenAfter(node.test, astUtils.isColonToken); + } + return sourceCode.getFirstToken(node, 1); + } + + /** + * Check whether the spacing between the given 2 tokens is valid or not. + * @param {Token} left The left token to check. + * @param {Token} right The right token to check. + * @param {boolean} expected The expected spacing to check. `true` if there should be a space. + * @returns {boolean} `true` if the spacing between the tokens is valid. + */ + function isValidSpacing(left, right, expected) { + return ( + astUtils.isClosingBraceToken(right) || + !astUtils.isTokenOnSameLine(left, right) || + sourceCode.isSpaceBetweenTokens(left, right) === expected + ); + } + + /** + * Check whether comments exist between the given 2 tokens. + * @param {Token} left The left token to check. + * @param {Token} right The right token to check. + * @returns {boolean} `true` if comments exist between the given 2 tokens. + */ + function commentsExistBetween(left, right) { + return sourceCode.getFirstTokenBetween( + left, + right, + { + includeComments: true, + filter: astUtils.isCommentToken + } + ) !== null; + } + + /** + * Fix the spacing between the given 2 tokens. + * @param {RuleFixer} fixer The fixer to fix. + * @param {Token} left The left token of fix range. + * @param {Token} right The right token of fix range. + * @param {boolean} spacing The spacing style. `true` if there should be a space. + * @returns {Fix|null} The fix object. + */ + function fix(fixer, left, right, spacing) { + if (commentsExistBetween(left, right)) { + return null; + } + if (spacing) { + return fixer.insertTextAfter(left, " "); + } + return fixer.removeRange([left.range[1], right.range[0]]); + } + + return { + SwitchCase(node) { + const colonToken = getColonToken(node); + const beforeToken = sourceCode.getTokenBefore(colonToken); + const afterToken = sourceCode.getTokenAfter(colonToken); + + if (!isValidSpacing(beforeToken, colonToken, beforeSpacing)) { + context.report({ + node, + loc: colonToken.loc, + message: "{{verb}} space(s) before this colon.", + data: { verb: beforeSpacing ? "Expected" : "Unexpected" }, + fix: fixer => fix(fixer, beforeToken, colonToken, beforeSpacing) + }); + } + if (!isValidSpacing(colonToken, afterToken, afterSpacing)) { + context.report({ + node, + loc: colonToken.loc, + message: "{{verb}} space(s) after this colon.", + data: { verb: afterSpacing ? "Expected" : "Unexpected" }, + fix: fixer => fix(fixer, colonToken, afterToken, afterSpacing) + }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/symbol-description.js b/node_modules/eslint/lib/rules/symbol-description.js new file mode 100644 index 0000000..95c1a1d --- /dev/null +++ b/node_modules/eslint/lib/rules/symbol-description.js @@ -0,0 +1,67 @@ +/** + * @fileoverview Rule to enforce description with the `Symbol` object + * @author Jarek Rencz + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + + +module.exports = { + meta: { + docs: { + description: "require symbol descriptions", + category: "ECMAScript 6", + recommended: false, + url: "https://eslint.org/docs/rules/symbol-description" + }, + + schema: [] + }, + + create(context) { + + /** + * Reports if node does not conform the rule in case rule is set to + * report missing description + * + * @param {ASTNode} node - A CallExpression node to check. + * @returns {void} + */ + function checkArgument(node) { + if (node.arguments.length === 0) { + context.report({ + node, + message: "Expected Symbol to have a description." + }); + } + } + + return { + "Program:exit"() { + const scope = context.getScope(); + const variable = astUtils.getVariableByName(scope, "Symbol"); + + if (variable && variable.defs.length === 0) { + variable.references.forEach(reference => { + const node = reference.identifier; + + if (astUtils.isCallee(node)) { + checkArgument(node.parent); + } + }); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/template-curly-spacing.js b/node_modules/eslint/lib/rules/template-curly-spacing.js new file mode 100644 index 0000000..707ea76 --- /dev/null +++ b/node_modules/eslint/lib/rules/template-curly-spacing.js @@ -0,0 +1,122 @@ +/** + * @fileoverview Rule to enforce spacing around embedded expressions of template strings + * @author Toru Nagashima + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const OPEN_PAREN = /\$\{$/; +const CLOSE_PAREN = /^\}/; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require or disallow spacing around embedded expressions of template strings", + category: "ECMAScript 6", + recommended: false, + url: "https://eslint.org/docs/rules/template-curly-spacing" + }, + + fixable: "whitespace", + + schema: [ + { enum: ["always", "never"] } + ] + }, + + create(context) { + const sourceCode = context.getSourceCode(); + const always = context.options[0] === "always"; + const prefix = always ? "Expected" : "Unexpected"; + + /** + * Checks spacing before `}` of a given token. + * @param {Token} token - A token to check. This is a Template token. + * @returns {void} + */ + function checkSpacingBefore(token) { + const prevToken = sourceCode.getTokenBefore(token); + + if (prevToken && + CLOSE_PAREN.test(token.value) && + astUtils.isTokenOnSameLine(prevToken, token) && + sourceCode.isSpaceBetweenTokens(prevToken, token) !== always + ) { + context.report({ + loc: token.loc.start, + message: "{{prefix}} space(s) before '}'.", + data: { + prefix + }, + fix(fixer) { + if (always) { + return fixer.insertTextBefore(token, " "); + } + return fixer.removeRange([ + prevToken.range[1], + token.range[0] + ]); + } + }); + } + } + + /** + * Checks spacing after `${` of a given token. + * @param {Token} token - A token to check. This is a Template token. + * @returns {void} + */ + function checkSpacingAfter(token) { + const nextToken = sourceCode.getTokenAfter(token); + + if (nextToken && + OPEN_PAREN.test(token.value) && + astUtils.isTokenOnSameLine(token, nextToken) && + sourceCode.isSpaceBetweenTokens(token, nextToken) !== always + ) { + context.report({ + loc: { + line: token.loc.end.line, + column: token.loc.end.column - 2 + }, + message: "{{prefix}} space(s) after '${'.", + data: { + prefix + }, + fix(fixer) { + if (always) { + return fixer.insertTextAfter(token, " "); + } + return fixer.removeRange([ + token.range[1], + nextToken.range[0] + ]); + } + }); + } + } + + return { + TemplateElement(node) { + const token = sourceCode.getFirstToken(node); + + checkSpacingBefore(token); + checkSpacingAfter(token); + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/template-tag-spacing.js b/node_modules/eslint/lib/rules/template-tag-spacing.js new file mode 100644 index 0000000..aee7ac1 --- /dev/null +++ b/node_modules/eslint/lib/rules/template-tag-spacing.js @@ -0,0 +1,78 @@ +/** + * @fileoverview Rule to check spacing between template tags and their literals + * @author Jonathan Wilsson + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require or disallow spacing between template tags and their literals", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/template-tag-spacing" + }, + + fixable: "whitespace", + + schema: [ + { enum: ["always", "never"] } + ] + }, + + create(context) { + const never = context.options[0] !== "always"; + const sourceCode = context.getSourceCode(); + + /** + * Check if a space is present between a template tag and its literal + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ + function checkSpacing(node) { + const tagToken = sourceCode.getTokenBefore(node.quasi); + const literalToken = sourceCode.getFirstToken(node.quasi); + const hasWhitespace = sourceCode.isSpaceBetweenTokens(tagToken, literalToken); + + if (never && hasWhitespace) { + context.report({ + node, + loc: tagToken.loc.start, + message: "Unexpected space between template tag and template literal.", + fix(fixer) { + const comments = sourceCode.getCommentsBefore(node.quasi); + + // Don't fix anything if there's a single line comment after the template tag + if (comments.some(comment => comment.type === "Line")) { + return null; + } + + return fixer.replaceTextRange( + [tagToken.range[1], literalToken.range[0]], + comments.reduce((text, comment) => text + sourceCode.getText(comment), "") + ); + } + }); + } else if (!never && !hasWhitespace) { + context.report({ + node, + loc: tagToken.loc.start, + message: "Missing space between template tag and template literal.", + fix(fixer) { + return fixer.insertTextAfter(tagToken, " "); + } + }); + } + } + + return { + TaggedTemplateExpression: checkSpacing + }; + } +}; diff --git a/node_modules/eslint/lib/rules/unicode-bom.js b/node_modules/eslint/lib/rules/unicode-bom.js new file mode 100644 index 0000000..03b2d5a --- /dev/null +++ b/node_modules/eslint/lib/rules/unicode-bom.js @@ -0,0 +1,67 @@ +/** + * @fileoverview Require or disallow Unicode BOM + * @author Andrew Johnston + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require or disallow Unicode byte order mark (BOM)", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/unicode-bom" + }, + + fixable: "whitespace", + + schema: [ + { + enum: ["always", "never"] + } + ] + }, + + create(context) { + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + + Program: function checkUnicodeBOM(node) { + + const sourceCode = context.getSourceCode(), + location = { column: 0, line: 1 }, + requireBOM = context.options[0] || "never"; + + if (!sourceCode.hasBOM && (requireBOM === "always")) { + context.report({ + node, + loc: location, + message: "Expected Unicode BOM (Byte Order Mark).", + fix(fixer) { + return fixer.insertTextBeforeRange([0, 1], "\uFEFF"); + } + }); + } else if (sourceCode.hasBOM && (requireBOM === "never")) { + context.report({ + node, + loc: location, + message: "Unexpected Unicode BOM (Byte Order Mark).", + fix(fixer) { + return fixer.removeRange([-1, 0]); + } + }); + } + } + + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/use-isnan.js b/node_modules/eslint/lib/rules/use-isnan.js new file mode 100644 index 0000000..5bad5b3 --- /dev/null +++ b/node_modules/eslint/lib/rules/use-isnan.js @@ -0,0 +1,35 @@ +/** + * @fileoverview Rule to flag comparisons to the value NaN + * @author James Allardice + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require calls to `isNaN()` when checking for `NaN`", + category: "Possible Errors", + recommended: true, + url: "https://eslint.org/docs/rules/use-isnan" + }, + + schema: [] + }, + + create(context) { + + return { + BinaryExpression(node) { + if (/^(?:[<>]|[!=]=)=?$/.test(node.operator) && (node.left.name === "NaN" || node.right.name === "NaN")) { + context.report({ node, message: "Use the isNaN function to compare with NaN." }); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/valid-jsdoc.js b/node_modules/eslint/lib/rules/valid-jsdoc.js new file mode 100644 index 0000000..c213c50 --- /dev/null +++ b/node_modules/eslint/lib/rules/valid-jsdoc.js @@ -0,0 +1,485 @@ +/** + * @fileoverview Validates JSDoc comments are syntactically correct + * @author Nicholas C. Zakas + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const doctrine = require("doctrine"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce valid JSDoc comments", + category: "Possible Errors", + recommended: false, + url: "https://eslint.org/docs/rules/valid-jsdoc" + }, + + schema: [ + { + type: "object", + properties: { + prefer: { + type: "object", + additionalProperties: { + type: "string" + } + }, + preferType: { + type: "object", + additionalProperties: { + type: "string" + } + }, + requireReturn: { + type: "boolean" + }, + requireParamDescription: { + type: "boolean" + }, + requireReturnDescription: { + type: "boolean" + }, + matchDescription: { + type: "string" + }, + requireReturnType: { + type: "boolean" + } + }, + additionalProperties: false + } + ], + + fixable: "code" + }, + + create(context) { + + const options = context.options[0] || {}, + prefer = options.prefer || {}, + sourceCode = context.getSourceCode(), + + // these both default to true, so you have to explicitly make them false + requireReturn = options.requireReturn !== false, + requireParamDescription = options.requireParamDescription !== false, + requireReturnDescription = options.requireReturnDescription !== false, + requireReturnType = options.requireReturnType !== false, + preferType = options.preferType || {}, + checkPreferType = Object.keys(preferType).length !== 0; + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + // Using a stack to store if a function returns or not (handling nested functions) + const fns = []; + + /** + * Check if node type is a Class + * @param {ASTNode} node node to check. + * @returns {boolean} True is its a class + * @private + */ + function isTypeClass(node) { + return node.type === "ClassExpression" || node.type === "ClassDeclaration"; + } + + /** + * When parsing a new function, store it in our function stack. + * @param {ASTNode} node A function node to check. + * @returns {void} + * @private + */ + function startFunction(node) { + fns.push({ + returnPresent: (node.type === "ArrowFunctionExpression" && node.body.type !== "BlockStatement") || + isTypeClass(node) + }); + } + + /** + * Indicate that return has been found in the current function. + * @param {ASTNode} node The return node. + * @returns {void} + * @private + */ + function addReturn(node) { + const functionState = fns[fns.length - 1]; + + if (functionState && node.argument !== null) { + functionState.returnPresent = true; + } + } + + /** + * Check if return tag type is void or undefined + * @param {Object} tag JSDoc tag + * @returns {boolean} True if its of type void or undefined + * @private + */ + function isValidReturnType(tag) { + return tag.type === null || tag.type.name === "void" || tag.type.type === "UndefinedLiteral"; + } + + /** + * Check if type should be validated based on some exceptions + * @param {Object} type JSDoc tag + * @returns {boolean} True if it can be validated + * @private + */ + function canTypeBeValidated(type) { + return type !== "UndefinedLiteral" && // {undefined} as there is no name property available. + type !== "NullLiteral" && // {null} + type !== "NullableLiteral" && // {?} + type !== "FunctionType" && // {function(a)} + type !== "AllLiteral"; // {*} + } + + /** + * Extract the current and expected type based on the input type object + * @param {Object} type JSDoc tag + * @returns {{currentType: Doctrine.Type, expectedTypeName: string}} The current type annotation and + * the expected name of the annotation + * @private + */ + function getCurrentExpectedTypes(type) { + let currentType; + + if (type.name) { + currentType = type; + } else if (type.expression) { + currentType = type.expression; + } + + return { + currentType, + expectedTypeName: currentType && preferType[currentType.name] + }; + } + + /** + * Gets the location of a JSDoc node in a file + * @param {Token} jsdocComment The comment that this node is parsed from + * @param {{range: number[]}} parsedJsdocNode A tag or other node which was parsed from this comment + * @returns {{start: SourceLocation, end: SourceLocation}} The 0-based source location for the tag + */ + function getAbsoluteRange(jsdocComment, parsedJsdocNode) { + return { + start: sourceCode.getLocFromIndex(jsdocComment.range[0] + 2 + parsedJsdocNode.range[0]), + end: sourceCode.getLocFromIndex(jsdocComment.range[0] + 2 + parsedJsdocNode.range[1]) + }; + } + + /** + * Validate type for a given JSDoc node + * @param {Object} jsdocNode JSDoc node + * @param {Object} type JSDoc tag + * @returns {void} + * @private + */ + function validateType(jsdocNode, type) { + if (!type || !canTypeBeValidated(type.type)) { + return; + } + + const typesToCheck = []; + let elements = []; + + switch (type.type) { + case "TypeApplication": // {Array.} + elements = type.applications[0].type === "UnionType" ? type.applications[0].elements : type.applications; + typesToCheck.push(getCurrentExpectedTypes(type)); + break; + case "RecordType": // {{20:String}} + elements = type.fields; + break; + case "UnionType": // {String|number|Test} + case "ArrayType": // {[String, number, Test]} + elements = type.elements; + break; + case "FieldType": // Array.<{count: number, votes: number}> + if (type.value) { + typesToCheck.push(getCurrentExpectedTypes(type.value)); + } + break; + default: + typesToCheck.push(getCurrentExpectedTypes(type)); + } + + elements.forEach(validateType.bind(null, jsdocNode)); + + typesToCheck.forEach(typeToCheck => { + if (typeToCheck.expectedTypeName && + typeToCheck.expectedTypeName !== typeToCheck.currentType.name) { + context.report({ + node: jsdocNode, + message: "Use '{{expectedTypeName}}' instead of '{{currentTypeName}}'.", + loc: getAbsoluteRange(jsdocNode, typeToCheck.currentType), + data: { + currentTypeName: typeToCheck.currentType.name, + expectedTypeName: typeToCheck.expectedTypeName + }, + fix(fixer) { + return fixer.replaceTextRange( + typeToCheck.currentType.range.map(indexInComment => jsdocNode.range[0] + 2 + indexInComment), + typeToCheck.expectedTypeName + ); + } + }); + } + }); + } + + /** + * Validate the JSDoc node and output warnings if anything is wrong. + * @param {ASTNode} node The AST node to check. + * @returns {void} + * @private + */ + function checkJSDoc(node) { + const jsdocNode = sourceCode.getJSDocComment(node), + functionData = fns.pop(), + paramTagsByName = Object.create(null), + paramTags = []; + let hasReturns = false, + returnsTag, + hasConstructor = false, + isInterface = false, + isOverride = false, + isAbstract = false; + + // make sure only to validate JSDoc comments + if (jsdocNode) { + let jsdoc; + + try { + jsdoc = doctrine.parse(jsdocNode.value, { + strict: true, + unwrap: true, + sloppy: true, + range: true + }); + } catch (ex) { + + if (/braces/i.test(ex.message)) { + context.report({ node: jsdocNode, message: "JSDoc type missing brace." }); + } else { + context.report({ node: jsdocNode, message: "JSDoc syntax error." }); + } + + return; + } + + jsdoc.tags.forEach(tag => { + + switch (tag.title.toLowerCase()) { + + case "param": + case "arg": + case "argument": + paramTags.push(tag); + break; + + case "return": + case "returns": + hasReturns = true; + returnsTag = tag; + break; + + case "constructor": + case "class": + hasConstructor = true; + break; + + case "override": + case "inheritdoc": + isOverride = true; + break; + + case "abstract": + case "virtual": + isAbstract = true; + break; + + case "interface": + isInterface = true; + break; + + // no default + } + + // check tag preferences + if (prefer.hasOwnProperty(tag.title) && tag.title !== prefer[tag.title]) { + const entireTagRange = getAbsoluteRange(jsdocNode, tag); + + context.report({ + node: jsdocNode, + message: "Use @{{name}} instead.", + loc: { + start: entireTagRange.start, + end: { + line: entireTagRange.start.line, + column: entireTagRange.start.column + `@${tag.title}`.length + } + }, + data: { name: prefer[tag.title] }, + fix(fixer) { + return fixer.replaceTextRange( + [ + jsdocNode.range[0] + tag.range[0] + 3, + jsdocNode.range[0] + tag.range[0] + tag.title.length + 3 + ], + prefer[tag.title] + ); + } + }); + } + + // validate the types + if (checkPreferType && tag.type) { + validateType(jsdocNode, tag.type); + } + }); + + paramTags.forEach(param => { + if (!param.type) { + context.report({ + node: jsdocNode, + message: "Missing JSDoc parameter type for '{{name}}'.", + loc: getAbsoluteRange(jsdocNode, param), + data: { name: param.name } + }); + } + if (!param.description && requireParamDescription) { + context.report({ + node: jsdocNode, + message: "Missing JSDoc parameter description for '{{name}}'.", + loc: getAbsoluteRange(jsdocNode, param), + data: { name: param.name } + }); + } + if (paramTagsByName[param.name]) { + context.report({ + node: jsdocNode, + message: "Duplicate JSDoc parameter '{{name}}'.", + loc: getAbsoluteRange(jsdocNode, param), + data: { name: param.name } + }); + } else if (param.name.indexOf(".") === -1) { + paramTagsByName[param.name] = param; + } + }); + + if (hasReturns) { + if (!requireReturn && !functionData.returnPresent && (returnsTag.type === null || !isValidReturnType(returnsTag)) && !isAbstract) { + context.report({ + node: jsdocNode, + message: "Unexpected @{{title}} tag; function has no return statement.", + loc: getAbsoluteRange(jsdocNode, returnsTag), + data: { + title: returnsTag.title + } + }); + } else { + if (requireReturnType && !returnsTag.type) { + context.report({ node: jsdocNode, message: "Missing JSDoc return type." }); + } + + if (!isValidReturnType(returnsTag) && !returnsTag.description && requireReturnDescription) { + context.report({ node: jsdocNode, message: "Missing JSDoc return description." }); + } + } + } + + // check for functions missing @returns + if (!isOverride && !hasReturns && !hasConstructor && !isInterface && + node.parent.kind !== "get" && node.parent.kind !== "constructor" && + node.parent.kind !== "set" && !isTypeClass(node)) { + if (requireReturn || functionData.returnPresent) { + context.report({ + node: jsdocNode, + message: "Missing JSDoc @{{returns}} for function.", + data: { + returns: prefer.returns || "returns" + } + }); + } + } + + // check the parameters + const jsdocParamNames = Object.keys(paramTagsByName); + + if (node.params) { + node.params.forEach((param, paramsIndex) => { + if (param.type === "AssignmentPattern") { + param = param.left; + } + + const name = param.name; + + // TODO(nzakas): Figure out logical things to do with destructured, default, rest params + if (param.type === "Identifier") { + if (jsdocParamNames[paramsIndex] && (name !== jsdocParamNames[paramsIndex])) { + context.report({ + node: jsdocNode, + message: "Expected JSDoc for '{{name}}' but found '{{jsdocName}}'.", + loc: getAbsoluteRange(jsdocNode, paramTagsByName[jsdocParamNames[paramsIndex]]), + data: { + name, + jsdocName: jsdocParamNames[paramsIndex] + } + }); + } else if (!paramTagsByName[name] && !isOverride) { + context.report({ + node: jsdocNode, + message: "Missing JSDoc for parameter '{{name}}'.", + data: { + name + } + }); + } + } + }); + } + + if (options.matchDescription) { + const regex = new RegExp(options.matchDescription); + + if (!regex.test(jsdoc.description)) { + context.report({ node: jsdocNode, message: "JSDoc description does not satisfy the regex pattern." }); + } + } + + } + + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + ArrowFunctionExpression: startFunction, + FunctionExpression: startFunction, + FunctionDeclaration: startFunction, + ClassExpression: startFunction, + ClassDeclaration: startFunction, + "ArrowFunctionExpression:exit": checkJSDoc, + "FunctionExpression:exit": checkJSDoc, + "FunctionDeclaration:exit": checkJSDoc, + "ClassExpression:exit": checkJSDoc, + "ClassDeclaration:exit": checkJSDoc, + ReturnStatement: addReturn + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/valid-typeof.js b/node_modules/eslint/lib/rules/valid-typeof.js new file mode 100644 index 0000000..ac4e74f --- /dev/null +++ b/node_modules/eslint/lib/rules/valid-typeof.js @@ -0,0 +1,78 @@ +/** + * @fileoverview Ensures that the results of typeof are compared against a valid string + * @author Ian Christian Myers + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "enforce comparing `typeof` expressions against valid strings", + category: "Possible Errors", + recommended: true, + url: "https://eslint.org/docs/rules/valid-typeof" + }, + + schema: [ + { + type: "object", + properties: { + requireStringLiterals: { + type: "boolean" + } + }, + additionalProperties: false + } + ] + }, + + create(context) { + + const VALID_TYPES = ["symbol", "undefined", "object", "boolean", "number", "string", "function"], + OPERATORS = ["==", "===", "!=", "!=="]; + + const requireStringLiterals = context.options[0] && context.options[0].requireStringLiterals; + + /** + * Determines whether a node is a typeof expression. + * @param {ASTNode} node The node + * @returns {boolean} `true` if the node is a typeof expression + */ + function isTypeofExpression(node) { + return node.type === "UnaryExpression" && node.operator === "typeof"; + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + + UnaryExpression(node) { + if (isTypeofExpression(node)) { + const parent = context.getAncestors().pop(); + + if (parent.type === "BinaryExpression" && OPERATORS.indexOf(parent.operator) !== -1) { + const sibling = parent.left === node ? parent.right : parent.left; + + if (sibling.type === "Literal" || sibling.type === "TemplateLiteral" && !sibling.expressions.length) { + const value = sibling.type === "Literal" ? sibling.value : sibling.quasis[0].value.cooked; + + if (VALID_TYPES.indexOf(value) === -1) { + context.report({ node: sibling, message: "Invalid typeof comparison value." }); + } + } else if (requireStringLiterals && !isTypeofExpression(sibling)) { + context.report({ node: sibling, message: "Typeof comparisons should be to string literals." }); + } + } + } + } + + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/vars-on-top.js b/node_modules/eslint/lib/rules/vars-on-top.js new file mode 100644 index 0000000..8f6bf1d --- /dev/null +++ b/node_modules/eslint/lib/rules/vars-on-top.js @@ -0,0 +1,150 @@ +/** + * @fileoverview Rule to enforce var declarations are only at the top of a function. + * @author Danny Fritz + * @author Gyandeep Singh + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require `var` declarations be placed at the top of their containing scope", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/vars-on-top" + }, + + schema: [] + }, + + create(context) { + const errorMessage = "All 'var' declarations must be at the top of the function scope."; + + //-------------------------------------------------------------------------- + // Helpers + //-------------------------------------------------------------------------- + + /** + * @param {ASTNode} node - any node + * @returns {boolean} whether the given node structurally represents a directive + */ + function looksLikeDirective(node) { + return node.type === "ExpressionStatement" && + node.expression.type === "Literal" && typeof node.expression.value === "string"; + } + + /** + * Check to see if its a ES6 import declaration + * @param {ASTNode} node - any node + * @returns {boolean} whether the given node represents a import declaration + */ + function looksLikeImport(node) { + return node.type === "ImportDeclaration" || node.type === "ImportSpecifier" || + node.type === "ImportDefaultSpecifier" || node.type === "ImportNamespaceSpecifier"; + } + + /** + * Checks whether a given node is a variable declaration or not. + * + * @param {ASTNode} node - any node + * @returns {boolean} `true` if the node is a variable declaration. + */ + function isVariableDeclaration(node) { + return ( + node.type === "VariableDeclaration" || + ( + node.type === "ExportNamedDeclaration" && + node.declaration && + node.declaration.type === "VariableDeclaration" + ) + ); + } + + /** + * Checks whether this variable is on top of the block body + * @param {ASTNode} node - The node to check + * @param {ASTNode[]} statements - collection of ASTNodes for the parent node block + * @returns {boolean} True if var is on top otherwise false + */ + function isVarOnTop(node, statements) { + const l = statements.length; + let i = 0; + + // skip over directives + for (; i < l; ++i) { + if (!looksLikeDirective(statements[i]) && !looksLikeImport(statements[i])) { + break; + } + } + + for (; i < l; ++i) { + if (!isVariableDeclaration(statements[i])) { + return false; + } + if (statements[i] === node) { + return true; + } + } + + return false; + } + + /** + * Checks whether variable is on top at the global level + * @param {ASTNode} node - The node to check + * @param {ASTNode} parent - Parent of the node + * @returns {void} + */ + function globalVarCheck(node, parent) { + if (!isVarOnTop(node, parent.body)) { + context.report({ node, message: errorMessage }); + } + } + + /** + * Checks whether variable is on top at functional block scope level + * @param {ASTNode} node - The node to check + * @param {ASTNode} parent - Parent of the node + * @param {ASTNode} grandParent - Parent of the node's parent + * @returns {void} + */ + function blockScopeVarCheck(node, parent, grandParent) { + if (!(/Function/.test(grandParent.type) && + parent.type === "BlockStatement" && + isVarOnTop(node, parent.body))) { + context.report({ node, message: errorMessage }); + } + } + + //-------------------------------------------------------------------------- + // Public API + //-------------------------------------------------------------------------- + + return { + VariableDeclaration(node) { + const ancestors = context.getAncestors(); + let parent = ancestors.pop(); + let grandParent = ancestors.pop(); + + if (node.kind === "var") { // check variable is `var` type and not `let` or `const` + if (parent.type === "ExportNamedDeclaration") { + node = parent; + parent = grandParent; + grandParent = ancestors.pop(); + } + + if (parent.type === "Program") { // That means its a global variable + globalVarCheck(node, parent); + } else { + blockScopeVarCheck(node, parent, grandParent); + } + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/wrap-iife.js b/node_modules/eslint/lib/rules/wrap-iife.js new file mode 100644 index 0000000..a21bf21 --- /dev/null +++ b/node_modules/eslint/lib/rules/wrap-iife.js @@ -0,0 +1,152 @@ +/** + * @fileoverview Rule to flag when IIFE is not wrapped in parens + * @author Ilya Volodin + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require parentheses around immediate `function` invocations", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/wrap-iife" + }, + + schema: [ + { + enum: ["outside", "inside", "any"] + }, + { + type: "object", + properties: { + functionPrototypeMethods: { + type: "boolean" + } + }, + additionalProperties: false + } + ], + + fixable: "code" + }, + + create(context) { + + const style = context.options[0] || "outside"; + const includeFunctionPrototypeMethods = (context.options[1] && context.options[1].functionPrototypeMethods) || false; + + const sourceCode = context.getSourceCode(); + + /** + * Check if the node is wrapped in () + * @param {ASTNode} node node to evaluate + * @returns {boolean} True if it is wrapped + * @private + */ + function wrapped(node) { + return astUtils.isParenthesised(sourceCode, node); + } + + /** + * Get the function node from an IIFE + * @param {ASTNode} node node to evaluate + * @returns {ASTNode} node that is the function expression of the given IIFE, or null if none exist + */ + function getFunctionNodeFromIIFE(node) { + const callee = node.callee; + + if (callee.type === "FunctionExpression") { + return callee; + } + + if (includeFunctionPrototypeMethods && + callee.type === "MemberExpression" && + callee.object.type === "FunctionExpression" && + (astUtils.getStaticPropertyName(callee) === "call" || astUtils.getStaticPropertyName(callee) === "apply") + ) { + return callee.object; + } + + return null; + } + + + return { + CallExpression(node) { + const innerNode = getFunctionNodeFromIIFE(node); + + if (!innerNode) { + return; + } + + const callExpressionWrapped = wrapped(node), + functionExpressionWrapped = wrapped(innerNode); + + if (!callExpressionWrapped && !functionExpressionWrapped) { + context.report({ + node, + message: "Wrap an immediate function invocation in parentheses.", + fix(fixer) { + const nodeToSurround = style === "inside" ? innerNode : node; + + return fixer.replaceText(nodeToSurround, `(${sourceCode.getText(nodeToSurround)})`); + } + }); + } else if (style === "inside" && !functionExpressionWrapped) { + context.report({ + node, + message: "Wrap only the function expression in parens.", + fix(fixer) { + + /* + * The outer call expression will always be wrapped at this point. + * Replace the range between the end of the function expression and the end of the call expression. + * for example, in `(function(foo) {}(bar))`, the range `(bar))` should get replaced with `)(bar)`. + * Replace the parens from the outer expression, and parenthesize the function expression. + */ + const parenAfter = sourceCode.getTokenAfter(node); + + return fixer.replaceTextRange( + [innerNode.range[1], parenAfter.range[1]], + `)${sourceCode.getText().slice(innerNode.range[1], parenAfter.range[0])}` + ); + } + }); + } else if (style === "outside" && !callExpressionWrapped) { + context.report({ + node, + message: "Move the invocation into the parens that contain the function.", + fix(fixer) { + + /* + * The inner function expression will always be wrapped at this point. + * It's only necessary to replace the range between the end of the function expression + * and the call expression. For example, in `(function(foo) {})(bar)`, the range `)(bar)` + * should get replaced with `(bar))`. + */ + const parenAfter = sourceCode.getTokenAfter(innerNode); + + return fixer.replaceTextRange( + [parenAfter.range[0], node.range[1]], + `${sourceCode.getText().slice(parenAfter.range[1], node.range[1])})` + ); + } + }); + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/wrap-regex.js b/node_modules/eslint/lib/rules/wrap-regex.js new file mode 100644 index 0000000..e58a4fe --- /dev/null +++ b/node_modules/eslint/lib/rules/wrap-regex.js @@ -0,0 +1,53 @@ +/** + * @fileoverview Rule to flag when regex literals are not wrapped in parens + * @author Matt DuVall + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require parenthesis around regex literals", + category: "Stylistic Issues", + recommended: false, + url: "https://eslint.org/docs/rules/wrap-regex" + }, + + schema: [], + + fixable: "code" + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + return { + + Literal(node) { + const token = sourceCode.getFirstToken(node), + nodeType = token.type; + + if (nodeType === "RegularExpression") { + const source = sourceCode.getTokenBefore(node); + const ancestors = context.getAncestors(); + const grandparent = ancestors[ancestors.length - 1]; + + if (grandparent.type === "MemberExpression" && grandparent.object === node && + (!source || source.value !== "(")) { + context.report({ + node, + message: "Wrap the regexp literal in parens to disambiguate the slash.", + fix: fixer => fixer.replaceText(node, `(${sourceCode.getText(node)})`) + }); + } + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/yield-star-spacing.js b/node_modules/eslint/lib/rules/yield-star-spacing.js new file mode 100644 index 0000000..33a37f0 --- /dev/null +++ b/node_modules/eslint/lib/rules/yield-star-spacing.js @@ -0,0 +1,118 @@ +/** + * @fileoverview Rule to check the spacing around the * in yield* expressions. + * @author Bryan Smith + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require or disallow spacing around the `*` in `yield*` expressions", + category: "ECMAScript 6", + recommended: false, + url: "https://eslint.org/docs/rules/yield-star-spacing" + }, + + fixable: "whitespace", + + schema: [ + { + oneOf: [ + { + enum: ["before", "after", "both", "neither"] + }, + { + type: "object", + properties: { + before: { type: "boolean" }, + after: { type: "boolean" } + }, + additionalProperties: false + } + ] + } + ] + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + const mode = (function(option) { + if (!option || typeof option === "string") { + return { + before: { before: true, after: false }, + after: { before: false, after: true }, + both: { before: true, after: true }, + neither: { before: false, after: false } + }[option || "after"]; + } + return option; + }(context.options[0])); + + /** + * Checks the spacing between two tokens before or after the star token. + * @param {string} side Either "before" or "after". + * @param {Token} leftToken `function` keyword token if side is "before", or + * star token if side is "after". + * @param {Token} rightToken Star token if side is "before", or identifier + * token if side is "after". + * @returns {void} + */ + function checkSpacing(side, leftToken, rightToken) { + if (sourceCode.isSpaceBetweenTokens(leftToken, rightToken) !== mode[side]) { + const after = leftToken.value === "*"; + const spaceRequired = mode[side]; + const node = after ? leftToken : rightToken; + const type = spaceRequired ? "Missing" : "Unexpected"; + const message = "{{type}} space {{side}} *."; + + context.report({ + node, + message, + data: { + type, + side + }, + fix(fixer) { + if (spaceRequired) { + if (after) { + return fixer.insertTextAfter(node, " "); + } + return fixer.insertTextBefore(node, " "); + } + return fixer.removeRange([leftToken.range[1], rightToken.range[0]]); + } + }); + } + } + + /** + * Enforces the spacing around the star if node is a yield* expression. + * @param {ASTNode} node A yield expression node. + * @returns {void} + */ + function checkExpression(node) { + if (!node.delegate) { + return; + } + + const tokens = sourceCode.getFirstTokens(node, 3); + const yieldToken = tokens[0]; + const starToken = tokens[1]; + const nextToken = tokens[2]; + + checkSpacing("before", yieldToken, starToken); + checkSpacing("after", starToken, nextToken); + } + + return { + YieldExpression: checkExpression + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/yoda.js b/node_modules/eslint/lib/rules/yoda.js new file mode 100644 index 0000000..7f3bc61 --- /dev/null +++ b/node_modules/eslint/lib/rules/yoda.js @@ -0,0 +1,311 @@ +/** + * @fileoverview Rule to require or disallow yoda comparisons + * @author Nicholas C. Zakas + */ +"use strict"; + +//-------------------------------------------------------------------------- +// Requirements +//-------------------------------------------------------------------------- + +const astUtils = require("../ast-utils"); + +//-------------------------------------------------------------------------- +// Helpers +//-------------------------------------------------------------------------- + +/** + * Determines whether an operator is a comparison operator. + * @param {string} operator The operator to check. + * @returns {boolean} Whether or not it is a comparison operator. + */ +function isComparisonOperator(operator) { + return (/^(==|===|!=|!==|<|>|<=|>=)$/).test(operator); +} + +/** + * Determines whether an operator is an equality operator. + * @param {string} operator The operator to check. + * @returns {boolean} Whether or not it is an equality operator. + */ +function isEqualityOperator(operator) { + return (/^(==|===)$/).test(operator); +} + +/** + * Determines whether an operator is one used in a range test. + * Allowed operators are `<` and `<=`. + * @param {string} operator The operator to check. + * @returns {boolean} Whether the operator is used in range tests. + */ +function isRangeTestOperator(operator) { + return ["<", "<="].indexOf(operator) >= 0; +} + +/** + * Determines whether a non-Literal node is a negative number that should be + * treated as if it were a single Literal node. + * @param {ASTNode} node Node to test. + * @returns {boolean} True if the node is a negative number that looks like a + * real literal and should be treated as such. + */ +function looksLikeLiteral(node) { + return (node.type === "UnaryExpression" && + node.operator === "-" && + node.prefix && + node.argument.type === "Literal" && + typeof node.argument.value === "number"); +} + +/** + * Attempts to derive a Literal node from nodes that are treated like literals. + * @param {ASTNode} node Node to normalize. + * @param {number} [defaultValue] The default value to be returned if the node + * is not a Literal. + * @returns {ASTNode} One of the following options. + * 1. The original node if the node is already a Literal + * 2. A normalized Literal node with the negative number as the value if the + * node represents a negative number literal. + * 3. The Literal node which has the `defaultValue` argument if it exists. + * 4. Otherwise `null`. + */ +function getNormalizedLiteral(node, defaultValue) { + if (node.type === "Literal") { + return node; + } + + if (looksLikeLiteral(node)) { + return { + type: "Literal", + value: -node.argument.value, + raw: `-${node.argument.value}` + }; + } + + if (defaultValue) { + return { + type: "Literal", + value: defaultValue, + raw: String(defaultValue) + }; + } + + return null; +} + +/** + * Checks whether two expressions reference the same value. For example: + * a = a + * a.b = a.b + * a[0] = a[0] + * a['b'] = a['b'] + * @param {ASTNode} a Left side of the comparison. + * @param {ASTNode} b Right side of the comparison. + * @returns {boolean} True if both sides match and reference the same value. + */ +function same(a, b) { + if (a.type !== b.type) { + return false; + } + + switch (a.type) { + case "Identifier": + return a.name === b.name; + + case "Literal": + return a.value === b.value; + + case "MemberExpression": { + const nameA = astUtils.getStaticPropertyName(a); + + // x.y = x["y"] + if (nameA) { + return ( + same(a.object, b.object) && + nameA === astUtils.getStaticPropertyName(b) + ); + } + + /* + * x[0] = x[0] + * x[y] = x[y] + * x.y = x.y + */ + return ( + a.computed === b.computed && + same(a.object, b.object) && + same(a.property, b.property) + ); + } + + case "ThisExpression": + return true; + + default: + return false; + } +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +module.exports = { + meta: { + docs: { + description: "require or disallow \"Yoda\" conditions", + category: "Best Practices", + recommended: false, + url: "https://eslint.org/docs/rules/yoda" + }, + + schema: [ + { + enum: ["always", "never"] + }, + { + type: "object", + properties: { + exceptRange: { + type: "boolean" + }, + onlyEquality: { + type: "boolean" + } + }, + additionalProperties: false + } + ], + + fixable: "code" + }, + + create(context) { + + // Default to "never" (!always) if no option + const always = (context.options[0] === "always"); + const exceptRange = (context.options[1] && context.options[1].exceptRange); + const onlyEquality = (context.options[1] && context.options[1].onlyEquality); + + const sourceCode = context.getSourceCode(); + + /** + * Determines whether node represents a range test. + * A range test is a "between" test like `(0 <= x && x < 1)` or an "outside" + * test like `(x < 0 || 1 <= x)`. It must be wrapped in parentheses, and + * both operators must be `<` or `<=`. Finally, the literal on the left side + * must be less than or equal to the literal on the right side so that the + * test makes any sense. + * @param {ASTNode} node LogicalExpression node to test. + * @returns {boolean} Whether node is a range test. + */ + function isRangeTest(node) { + const left = node.left, + right = node.right; + + /** + * Determines whether node is of the form `0 <= x && x < 1`. + * @returns {boolean} Whether node is a "between" range test. + */ + function isBetweenTest() { + let leftLiteral, rightLiteral; + + return (node.operator === "&&" && + (leftLiteral = getNormalizedLiteral(left.left)) && + (rightLiteral = getNormalizedLiteral(right.right, Number.POSITIVE_INFINITY)) && + leftLiteral.value <= rightLiteral.value && + same(left.right, right.left)); + } + + /** + * Determines whether node is of the form `x < 0 || 1 <= x`. + * @returns {boolean} Whether node is an "outside" range test. + */ + function isOutsideTest() { + let leftLiteral, rightLiteral; + + return (node.operator === "||" && + (leftLiteral = getNormalizedLiteral(left.right, Number.NEGATIVE_INFINITY)) && + (rightLiteral = getNormalizedLiteral(right.left)) && + leftLiteral.value <= rightLiteral.value && + same(left.left, right.right)); + } + + /** + * Determines whether node is wrapped in parentheses. + * @returns {boolean} Whether node is preceded immediately by an open + * paren token and followed immediately by a close + * paren token. + */ + function isParenWrapped() { + return astUtils.isParenthesised(sourceCode, node); + } + + return (node.type === "LogicalExpression" && + left.type === "BinaryExpression" && + right.type === "BinaryExpression" && + isRangeTestOperator(left.operator) && + isRangeTestOperator(right.operator) && + (isBetweenTest() || isOutsideTest()) && + isParenWrapped()); + } + + const OPERATOR_FLIP_MAP = { + "===": "===", + "!==": "!==", + "==": "==", + "!=": "!=", + "<": ">", + ">": "<", + "<=": ">=", + ">=": "<=" + }; + + /** + * Returns a string representation of a BinaryExpression node with its sides/operator flipped around. + * @param {ASTNode} node The BinaryExpression node + * @returns {string} A string representation of the node with the sides and operator flipped + */ + function getFlippedString(node) { + const operatorToken = sourceCode.getFirstTokenBetween(node.left, node.right, token => token.value === node.operator); + const textBeforeOperator = sourceCode.getText().slice(sourceCode.getTokenBefore(operatorToken).range[1], operatorToken.range[0]); + const textAfterOperator = sourceCode.getText().slice(operatorToken.range[1], sourceCode.getTokenAfter(operatorToken).range[0]); + const leftText = sourceCode.getText().slice(node.range[0], sourceCode.getTokenBefore(operatorToken).range[1]); + const rightText = sourceCode.getText().slice(sourceCode.getTokenAfter(operatorToken).range[0], node.range[1]); + + return rightText + textBeforeOperator + OPERATOR_FLIP_MAP[operatorToken.value] + textAfterOperator + leftText; + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + BinaryExpression(node) { + const expectedLiteral = always ? node.left : node.right; + const expectedNonLiteral = always ? node.right : node.left; + + // If `expectedLiteral` is not a literal, and `expectedNonLiteral` is a literal, raise an error. + if ( + (expectedNonLiteral.type === "Literal" || looksLikeLiteral(expectedNonLiteral)) && + !(expectedLiteral.type === "Literal" || looksLikeLiteral(expectedLiteral)) && + !(!isEqualityOperator(node.operator) && onlyEquality) && + isComparisonOperator(node.operator) && + !(exceptRange && isRangeTest(context.getAncestors().pop())) + ) { + context.report({ + node, + message: "Expected literal to be on the {{expectedSide}} side of {{operator}}.", + data: { + operator: node.operator, + expectedSide: always ? "left" : "right" + }, + fix: fixer => fixer.replaceText(node, getFlippedString(node)) + }); + } + + } + }; + + } +}; diff --git a/node_modules/eslint/lib/testers/rule-tester.js b/node_modules/eslint/lib/testers/rule-tester.js new file mode 100644 index 0000000..de218a8 --- /dev/null +++ b/node_modules/eslint/lib/testers/rule-tester.js @@ -0,0 +1,591 @@ +/** + * @fileoverview Mocha test wrapper + * @author Ilya Volodin + */ +"use strict"; + +/* global describe, it */ + +/* + * This is a wrapper around mocha to allow for DRY unittests for eslint + * Format: + * RuleTester.run("{ruleName}", { + * valid: [ + * "{code}", + * { code: "{code}", options: {options}, globals: {globals}, parser: "{parser}", settings: {settings} } + * ], + * invalid: [ + * { code: "{code}", errors: {numErrors} }, + * { code: "{code}", errors: ["{errorMessage}"] }, + * { code: "{code}", options: {options}, globals: {globals}, parser: "{parser}", settings: {settings}, errors: [{ message: "{errorMessage}", type: "{errorNodeType}"}] } + * ] + * }); + * + * Variables: + * {code} - String that represents the code to be tested + * {options} - Arguments that are passed to the configurable rules. + * {globals} - An object representing a list of variables that are + * registered as globals + * {parser} - String representing the parser to use + * {settings} - An object representing global settings for all rules + * {numErrors} - If failing case doesn't need to check error message, + * this integer will specify how many errors should be + * received + * {errorMessage} - Message that is returned by the rule on failure + * {errorNodeType} - AST node type that is returned by they rule as + * a cause of the failure. + */ + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const lodash = require("lodash"), + assert = require("assert"), + util = require("util"), + validator = require("../config/config-validator"), + ajv = require("../util/ajv"), + Linter = require("../linter"), + Environments = require("../config/environments"), + SourceCodeFixer = require("../util/source-code-fixer"), + interpolate = require("../util/interpolate"); + +//------------------------------------------------------------------------------ +// Private Members +//------------------------------------------------------------------------------ + +/* + * testerDefaultConfig must not be modified as it allows to reset the tester to + * the initial default configuration + */ +const testerDefaultConfig = { rules: {} }; +let defaultConfig = { rules: {} }; + +/* + * List every parameters possible on a test case that are not related to eslint + * configuration + */ +const RuleTesterParameters = [ + "code", + "filename", + "options", + "errors", + "output" +]; + +const hasOwnProperty = Function.call.bind(Object.hasOwnProperty); + +/** + * Clones a given value deeply. + * Note: This ignores `parent` property. + * + * @param {any} x - A value to clone. + * @returns {any} A cloned value. + */ +function cloneDeeplyExcludesParent(x) { + if (typeof x === "object" && x !== null) { + if (Array.isArray(x)) { + return x.map(cloneDeeplyExcludesParent); + } + + const retv = {}; + + for (const key in x) { + if (key !== "parent" && hasOwnProperty(x, key)) { + retv[key] = cloneDeeplyExcludesParent(x[key]); + } + } + + return retv; + } + + return x; +} + +/** + * Freezes a given value deeply. + * + * @param {any} x - A value to freeze. + * @returns {void} + */ +function freezeDeeply(x) { + if (typeof x === "object" && x !== null) { + if (Array.isArray(x)) { + x.forEach(freezeDeeply); + } else { + for (const key in x) { + if (key !== "parent" && hasOwnProperty(x, key)) { + freezeDeeply(x[key]); + } + } + } + Object.freeze(x); + } +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +// default separators for testing +const DESCRIBE = Symbol("describe"); +const IT = Symbol("it"); + +/** + * This is `it` default handler if `it` don't exist. + * @this {Mocha} + * @param {string} text - The description of the test case. + * @param {Function} method - The logic of the test case. + * @returns {any} Returned value of `method`. + */ +function itDefaultHandler(text, method) { + try { + return method.apply(this); + } catch (err) { + if (err instanceof assert.AssertionError) { + err.message += ` (${util.inspect(err.actual)} ${err.operator} ${util.inspect(err.expected)})`; + } + throw err; + } +} + +/** + * This is `describe` default handler if `describe` don't exist. + * @this {Mocha} + * @param {string} text - The description of the test case. + * @param {Function} method - The logic of the test case. + * @returns {any} Returned value of `method`. + */ +function describeDefaultHandler(text, method) { + return method.apply(this); +} + +class RuleTester { + + /** + * Creates a new instance of RuleTester. + * @param {Object} [testerConfig] Optional, extra configuration for the tester + * @constructor + */ + constructor(testerConfig) { + + /** + * The configuration to use for this tester. Combination of the tester + * configuration and the default configuration. + * @type {Object} + */ + this.testerConfig = lodash.merge( + + // we have to clone because merge uses the first argument for recipient + lodash.cloneDeep(defaultConfig), + testerConfig, + { rules: { "rule-tester/validate-ast": "error" } } + ); + + /** + * Rule definitions to define before tests. + * @type {Object} + */ + this.rules = {}; + this.linter = new Linter(); + } + + /** + * Set the configuration to use for all future tests + * @param {Object} config the configuration to use. + * @returns {void} + */ + static setDefaultConfig(config) { + if (typeof config !== "object") { + throw new TypeError("RuleTester.setDefaultConfig: config must be an object"); + } + defaultConfig = config; + + // Make sure the rules object exists since it is assumed to exist later + defaultConfig.rules = defaultConfig.rules || {}; + } + + /** + * Get the current configuration used for all tests + * @returns {Object} the current configuration + */ + static getDefaultConfig() { + return defaultConfig; + } + + /** + * Reset the configuration to the initial configuration of the tester removing + * any changes made until now. + * @returns {void} + */ + static resetDefaultConfig() { + defaultConfig = lodash.cloneDeep(testerDefaultConfig); + } + + + /* + * If people use `mocha test.js --watch` command, `describe` and `it` function + * instances are different for each execution. So `describe` and `it` should get fresh instance + * always. + */ + static get describe() { + return ( + this[DESCRIBE] || + (typeof describe === "function" ? describe : describeDefaultHandler) + ); + } + + static set describe(value) { + this[DESCRIBE] = value; + } + + static get it() { + return ( + this[IT] || + (typeof it === "function" ? it : itDefaultHandler) + ); + } + + static set it(value) { + this[IT] = value; + } + + /** + * Define a rule for one particular run of tests. + * @param {string} name The name of the rule to define. + * @param {Function} rule The rule definition. + * @returns {void} + */ + defineRule(name, rule) { + this.rules[name] = rule; + } + + /** + * Adds a new rule test to execute. + * @param {string} ruleName The name of the rule to run. + * @param {Function} rule The rule to test. + * @param {Object} test The collection of tests to run. + * @returns {void} + */ + run(ruleName, rule, test) { + + const testerConfig = this.testerConfig, + requiredScenarios = ["valid", "invalid"], + scenarioErrors = [], + linter = this.linter; + + if (lodash.isNil(test) || typeof test !== "object") { + throw new TypeError(`Test Scenarios for rule ${ruleName} : Could not find test scenario object`); + } + + requiredScenarios.forEach(scenarioType => { + if (lodash.isNil(test[scenarioType])) { + scenarioErrors.push(`Could not find any ${scenarioType} test scenarios`); + } + }); + + if (scenarioErrors.length > 0) { + throw new Error([ + `Test Scenarios for rule ${ruleName} is invalid:` + ].concat(scenarioErrors).join("\n")); + } + + + linter.defineRule(ruleName, Object.assign({}, rule, { + + // Create a wrapper rule that freezes the `context` properties. + create(context) { + freezeDeeply(context.options); + freezeDeeply(context.settings); + freezeDeeply(context.parserOptions); + + return (typeof rule === "function" ? rule : rule.create)(context); + } + })); + + linter.defineRules(this.rules); + + const ruleMap = linter.getRules(); + + /** + * Run the rule for the given item + * @param {string|Object} item Item to run the rule against + * @returns {Object} Eslint run result + * @private + */ + function runRuleForItem(item) { + let config = lodash.cloneDeep(testerConfig), + code, filename, beforeAST, afterAST; + + if (typeof item === "string") { + code = item; + } else { + code = item.code; + + /* + * Assumes everything on the item is a config except for the + * parameters used by this tester + */ + const itemConfig = lodash.omit(item, RuleTesterParameters); + + /* + * Create the config object from the tester config and this item + * specific configurations. + */ + config = lodash.merge( + config, + itemConfig + ); + } + + if (item.filename) { + filename = item.filename; + } + + if (Object.prototype.hasOwnProperty.call(item, "options")) { + assert(Array.isArray(item.options), "options must be an array"); + config.rules[ruleName] = [1].concat(item.options); + } else { + config.rules[ruleName] = 1; + } + + const schema = validator.getRuleOptionsSchema(rule); + + /* + * Setup AST getters. + * The goal is to check whether or not AST was modified when + * running the rule under test. + */ + linter.defineRule("rule-tester/validate-ast", () => ({ + Program(node) { + beforeAST = cloneDeeplyExcludesParent(node); + }, + "Program:exit"(node) { + afterAST = node; + } + })); + + if (schema) { + ajv.validateSchema(schema); + + if (ajv.errors) { + const errors = ajv.errors.map(error => { + const field = error.dataPath[0] === "." ? error.dataPath.slice(1) : error.dataPath; + + return `\t${field}: ${error.message}`; + }).join("\n"); + + throw new Error([`Schema for rule ${ruleName} is invalid:`, errors]); + } + } + + validator.validate(config, "rule-tester", ruleMap.get.bind(ruleMap), new Environments()); + + return { + messages: linter.verify(code, config, filename, true), + beforeAST, + afterAST: cloneDeeplyExcludesParent(afterAST) + }; + } + + /** + * Check if the AST was changed + * @param {ASTNode} beforeAST AST node before running + * @param {ASTNode} afterAST AST node after running + * @returns {void} + * @private + */ + function assertASTDidntChange(beforeAST, afterAST) { + if (!lodash.isEqual(beforeAST, afterAST)) { + + // Not using directly to avoid performance problem in node 6.1.0. See #6111 + // eslint-disable-next-line no-restricted-properties + assert.deepEqual(beforeAST, afterAST, "Rule should not modify AST."); + } + } + + /** + * Check if the template is valid or not + * all valid cases go through this + * @param {string|Object} item Item to run the rule against + * @returns {void} + * @private + */ + function testValidTemplate(item) { + const result = runRuleForItem(item); + const messages = result.messages; + + assert.strictEqual(messages.length, 0, util.format("Should have no errors but had %d: %s", + messages.length, util.inspect(messages))); + + assertASTDidntChange(result.beforeAST, result.afterAST); + } + + /** + * Asserts that the message matches its expected value. If the expected + * value is a regular expression, it is checked against the actual + * value. + * @param {string} actual Actual value + * @param {string|RegExp} expected Expected value + * @returns {void} + * @private + */ + function assertMessageMatches(actual, expected) { + if (expected instanceof RegExp) { + + // assert.js doesn't have a built-in RegExp match function + assert.ok( + expected.test(actual), + `Expected '${actual}' to match ${expected}` + ); + } else { + assert.strictEqual(actual, expected); + } + } + + /** + * Check if the template is invalid or not + * all invalid cases go through this. + * @param {string|Object} item Item to run the rule against + * @returns {void} + * @private + */ + function testInvalidTemplate(item) { + assert.ok(item.errors || item.errors === 0, + `Did not specify errors for an invalid test of ${ruleName}`); + + const result = runRuleForItem(item); + const messages = result.messages; + + + if (typeof item.errors === "number") { + assert.strictEqual(messages.length, item.errors, util.format("Should have %d error%s but had %d: %s", + item.errors, item.errors === 1 ? "" : "s", messages.length, util.inspect(messages))); + } else { + assert.strictEqual( + messages.length, item.errors.length, + util.format( + "Should have %d error%s but had %d: %s", + item.errors.length, item.errors.length === 1 ? "" : "s", messages.length, util.inspect(messages) + ) + ); + + const hasMessageOfThisRule = messages.some(m => m.ruleId === ruleName); + + for (let i = 0, l = item.errors.length; i < l; i++) { + const error = item.errors[i]; + const message = messages[i]; + + assert(!message.fatal, `A fatal parsing error occurred: ${message.message}`); + assert(hasMessageOfThisRule, "Error rule name should be the same as the name of the rule being tested"); + + if (typeof error === "string" || error instanceof RegExp) { + + // Just an error message. + assertMessageMatches(message.message, error); + } else if (typeof error === "object") { + + /* + * Error object. + * This may have a message, node type, line, and/or + * column. + */ + if (error.message) { + assertMessageMatches(message.message, error.message); + } + + if (error.messageId) { + const hOP = Object.hasOwnProperty.call.bind(Object.hasOwnProperty); + + // verify that `error.message` is `undefined` + assert.strictEqual(error.message, void 0, "Error should not specify both a message and a messageId."); + if (!hOP(rule, "meta") || !hOP(rule.meta, "messages")) { + assert.fail("Rule must specify a messages hash in `meta`"); + } + if (!hOP(rule.meta.messages, error.messageId)) { + const friendlyIDList = `[${Object.keys(rule.meta.messages).map(key => `'${key}'`).join(", ")}]`; + + assert.fail(`Invalid messageId '${error.messageId}'. Expected one of ${friendlyIDList}.`); + } + + let expectedMessage = rule.meta.messages[error.messageId]; + + if (error.data) { + expectedMessage = interpolate(expectedMessage, error.data); + } + + assertMessageMatches(message.message, expectedMessage); + } + + if (error.type) { + assert.strictEqual(message.nodeType, error.type, `Error type should be ${error.type}, found ${message.nodeType}`); + } + + if (error.hasOwnProperty("line")) { + assert.strictEqual(message.line, error.line, `Error line should be ${error.line}`); + } + + if (error.hasOwnProperty("column")) { + assert.strictEqual(message.column, error.column, `Error column should be ${error.column}`); + } + + if (error.hasOwnProperty("endLine")) { + assert.strictEqual(message.endLine, error.endLine, `Error endLine should be ${error.endLine}`); + } + + if (error.hasOwnProperty("endColumn")) { + assert.strictEqual(message.endColumn, error.endColumn, `Error endColumn should be ${error.endColumn}`); + } + } else { + + // Message was an unexpected type + assert.fail(message, null, "Error should be a string, object, or RegExp."); + } + } + } + + if (item.hasOwnProperty("output")) { + if (item.output === null) { + assert.strictEqual( + messages.filter(message => message.fix).length, + 0, + "Expected no autofixes to be suggested" + ); + } else { + const fixResult = SourceCodeFixer.applyFixes(item.code, messages); + + // eslint-disable-next-line no-restricted-properties + assert.equal(fixResult.output, item.output, "Output is incorrect."); + } + } + + assertASTDidntChange(result.beforeAST, result.afterAST); + } + + /* + * This creates a mocha test suite and pipes all supplied info through + * one of the templates above. + */ + RuleTester.describe(ruleName, () => { + RuleTester.describe("valid", () => { + test.valid.forEach(valid => { + RuleTester.it(typeof valid === "object" ? valid.code : valid, () => { + testValidTemplate(valid); + }); + }); + }); + + RuleTester.describe("invalid", () => { + test.invalid.forEach(invalid => { + RuleTester.it(invalid.code, () => { + testInvalidTemplate(invalid); + }); + }); + }); + }); + } +} + +RuleTester[DESCRIBE] = RuleTester[IT] = null; + +module.exports = RuleTester; diff --git a/node_modules/eslint/lib/timing.js b/node_modules/eslint/lib/timing.js new file mode 100644 index 0000000..e33ac8f --- /dev/null +++ b/node_modules/eslint/lib/timing.js @@ -0,0 +1,141 @@ +/** + * @fileoverview Tracks performance of individual rules. + * @author Brandon Mills + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/* istanbul ignore next */ +/** + * Align the string to left + * @param {string} str string to evaluate + * @param {int} len length of the string + * @param {string} ch delimiter character + * @returns {string} modified string + * @private + */ +function alignLeft(str, len, ch) { + return str + new Array(len - str.length + 1).join(ch || " "); +} + +/* istanbul ignore next */ +/** + * Align the string to right + * @param {string} str string to evaluate + * @param {int} len length of the string + * @param {string} ch delimiter character + * @returns {string} modified string + * @private + */ +function alignRight(str, len, ch) { + return new Array(len - str.length + 1).join(ch || " ") + str; +} + +//------------------------------------------------------------------------------ +// Module definition +//------------------------------------------------------------------------------ + +const enabled = !!process.env.TIMING; + +const HEADERS = ["Rule", "Time (ms)", "Relative"]; +const ALIGN = [alignLeft, alignRight, alignRight]; + +/* istanbul ignore next */ +/** + * display the data + * @param {Object} data Data object to be displayed + * @returns {string} modified string + * @private + */ +function display(data) { + let total = 0; + const rows = Object.keys(data) + .map(key => { + const time = data[key]; + + total += time; + return [key, time]; + }) + .sort((a, b) => b[1] - a[1]) + .slice(0, 10); + + rows.forEach(row => { + row.push(`${(row[1] * 100 / total).toFixed(1)}%`); + row[1] = row[1].toFixed(3); + }); + + rows.unshift(HEADERS); + + const widths = []; + + rows.forEach(row => { + const len = row.length; + + for (let i = 0; i < len; i++) { + const n = row[i].length; + + if (!widths[i] || n > widths[i]) { + widths[i] = n; + } + } + }); + + const table = rows.map(row => ( + row + .map((cell, index) => ALIGN[index](cell, widths[index])) + .join(" | ") + )); + + table.splice(1, 0, widths.map((w, index) => { + if (index !== 0 && index !== widths.length - 1) { + w++; + } + + return ALIGN[index](":", w + 1, "-"); + }).join("|")); + + console.log(table.join("\n")); // eslint-disable-line no-console +} + +/* istanbul ignore next */ +module.exports = (function() { + + const data = Object.create(null); + + /** + * Time the run + * @param {*} key key from the data object + * @param {Function} fn function to be called + * @returns {Function} function to be executed + * @private + */ + function time(key, fn) { + if (typeof data[key] === "undefined") { + data[key] = 0; + } + + return function() { + let t = process.hrtime(); + + fn.apply(null, Array.prototype.slice.call(arguments)); + t = process.hrtime(t); + data[key] += t[0] * 1e3 + t[1] / 1e6; + }; + } + + if (enabled) { + process.on("exit", () => { + display(data); + }); + } + + return { + time, + enabled + }; + +}()); diff --git a/node_modules/eslint/lib/token-store/backward-token-comment-cursor.js b/node_modules/eslint/lib/token-store/backward-token-comment-cursor.js new file mode 100644 index 0000000..7c2137a --- /dev/null +++ b/node_modules/eslint/lib/token-store/backward-token-comment-cursor.js @@ -0,0 +1,57 @@ +/** + * @fileoverview Define the cursor which iterates tokens and comments in reverse. + * @author Toru Nagashima + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const Cursor = require("./cursor"); +const utils = require("./utils"); + +//------------------------------------------------------------------------------ +// Exports +//------------------------------------------------------------------------------ + +/** + * The cursor which iterates tokens and comments in reverse. + */ +module.exports = class BackwardTokenCommentCursor extends Cursor { + + /** + * Initializes this cursor. + * @param {Token[]} tokens - The array of tokens. + * @param {Comment[]} comments - The array of comments. + * @param {Object} indexMap - The map from locations to indices in `tokens`. + * @param {number} startLoc - The start location of the iteration range. + * @param {number} endLoc - The end location of the iteration range. + */ + constructor(tokens, comments, indexMap, startLoc, endLoc) { + super(); + this.tokens = tokens; + this.comments = comments; + this.tokenIndex = utils.getLastIndex(tokens, indexMap, endLoc); + this.commentIndex = utils.search(comments, endLoc) - 1; + this.border = startLoc; + } + + /** @inheritdoc */ + moveNext() { + const token = (this.tokenIndex >= 0) ? this.tokens[this.tokenIndex] : null; + const comment = (this.commentIndex >= 0) ? this.comments[this.commentIndex] : null; + + if (token && (!comment || token.range[1] > comment.range[1])) { + this.current = token; + this.tokenIndex -= 1; + } else if (comment) { + this.current = comment; + this.commentIndex -= 1; + } else { + this.current = null; + } + + return Boolean(this.current) && (this.border === -1 || this.current.range[0] >= this.border); + } +}; diff --git a/node_modules/eslint/lib/token-store/backward-token-cursor.js b/node_modules/eslint/lib/token-store/backward-token-cursor.js new file mode 100644 index 0000000..93973bc --- /dev/null +++ b/node_modules/eslint/lib/token-store/backward-token-cursor.js @@ -0,0 +1,58 @@ +/** + * @fileoverview Define the cursor which iterates tokens only in reverse. + * @author Toru Nagashima + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const Cursor = require("./cursor"); +const utils = require("./utils"); + +//------------------------------------------------------------------------------ +// Exports +//------------------------------------------------------------------------------ + +/** + * The cursor which iterates tokens only in reverse. + */ +module.exports = class BackwardTokenCursor extends Cursor { + + /** + * Initializes this cursor. + * @param {Token[]} tokens - The array of tokens. + * @param {Comment[]} comments - The array of comments. + * @param {Object} indexMap - The map from locations to indices in `tokens`. + * @param {number} startLoc - The start location of the iteration range. + * @param {number} endLoc - The end location of the iteration range. + */ + constructor(tokens, comments, indexMap, startLoc, endLoc) { + super(); + this.tokens = tokens; + this.index = utils.getLastIndex(tokens, indexMap, endLoc); + this.indexEnd = utils.getFirstIndex(tokens, indexMap, startLoc); + } + + /** @inheritdoc */ + moveNext() { + if (this.index >= this.indexEnd) { + this.current = this.tokens[this.index]; + this.index -= 1; + return true; + } + return false; + } + + /* + * + * Shorthand for performance. + * + */ + + /** @inheritdoc */ + getOneToken() { + return (this.index >= this.indexEnd) ? this.tokens[this.index] : null; + } +}; diff --git a/node_modules/eslint/lib/token-store/cursor.js b/node_modules/eslint/lib/token-store/cursor.js new file mode 100644 index 0000000..4e1595c --- /dev/null +++ b/node_modules/eslint/lib/token-store/cursor.js @@ -0,0 +1,76 @@ +/** + * @fileoverview Define the abstract class about cursors which iterate tokens. + * @author Toru Nagashima + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Exports +//------------------------------------------------------------------------------ + +/** + * The abstract class about cursors which iterate tokens. + * + * This class has 2 abstract methods. + * + * - `current: Token | Comment | null` ... The current token. + * - `moveNext(): boolean` ... Moves this cursor to the next token. If the next token didn't exist, it returns `false`. + * + * This is similar to ES2015 Iterators. + * However, Iterators were slow (at 2017-01), so I created this class as similar to C# IEnumerable. + * + * There are the following known sub classes. + * + * - ForwardTokenCursor .......... The cursor which iterates tokens only. + * - BackwardTokenCursor ......... The cursor which iterates tokens only in reverse. + * - ForwardTokenCommentCursor ... The cursor which iterates tokens and comments. + * - BackwardTokenCommentCursor .. The cursor which iterates tokens and comments in reverse. + * - DecorativeCursor + * - FilterCursor ............ The cursor which ignores the specified tokens. + * - SkipCursor .............. The cursor which ignores the first few tokens. + * - LimitCursor ............. The cursor which limits the count of tokens. + * + */ +module.exports = class Cursor { + + /** + * Initializes this cursor. + */ + constructor() { + this.current = null; + } + + /** + * Gets the first token. + * This consumes this cursor. + * @returns {Token|Comment} The first token or null. + */ + getOneToken() { + return this.moveNext() ? this.current : null; + } + + /** + * Gets the first tokens. + * This consumes this cursor. + * @returns {(Token|Comment)[]} All tokens. + */ + getAllTokens() { + const tokens = []; + + while (this.moveNext()) { + tokens.push(this.current); + } + + return tokens; + } + + /** + * Moves this cursor to the next token. + * @returns {boolean} `true` if the next token exists. + * @abstract + */ + /* istanbul ignore next */ + moveNext() { // eslint-disable-line class-methods-use-this + throw new Error("Not implemented."); + } +}; diff --git a/node_modules/eslint/lib/token-store/cursors.js b/node_modules/eslint/lib/token-store/cursors.js new file mode 100644 index 0000000..b315c7e --- /dev/null +++ b/node_modules/eslint/lib/token-store/cursors.js @@ -0,0 +1,92 @@ +/** + * @fileoverview Define 2 token factories; forward and backward. + * @author Toru Nagashima + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const BackwardTokenCommentCursor = require("./backward-token-comment-cursor"); +const BackwardTokenCursor = require("./backward-token-cursor"); +const FilterCursor = require("./filter-cursor"); +const ForwardTokenCommentCursor = require("./forward-token-comment-cursor"); +const ForwardTokenCursor = require("./forward-token-cursor"); +const LimitCursor = require("./limit-cursor"); +const SkipCursor = require("./skip-cursor"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * The cursor factory. + * @private + */ +class CursorFactory { + + /** + * Initializes this cursor. + * @param {Function} TokenCursor - The class of the cursor which iterates tokens only. + * @param {Function} TokenCommentCursor - The class of the cursor which iterates the mix of tokens and comments. + */ + constructor(TokenCursor, TokenCommentCursor) { + this.TokenCursor = TokenCursor; + this.TokenCommentCursor = TokenCommentCursor; + } + + /** + * Creates a base cursor instance that can be decorated by createCursor. + * + * @param {Token[]} tokens - The array of tokens. + * @param {Comment[]} comments - The array of comments. + * @param {Object} indexMap - The map from locations to indices in `tokens`. + * @param {number} startLoc - The start location of the iteration range. + * @param {number} endLoc - The end location of the iteration range. + * @param {boolean} includeComments - The flag to iterate comments as well. + * @returns {Cursor} The created base cursor. + */ + createBaseCursor(tokens, comments, indexMap, startLoc, endLoc, includeComments) { + const Cursor = includeComments ? this.TokenCommentCursor : this.TokenCursor; + + return new Cursor(tokens, comments, indexMap, startLoc, endLoc); + } + + /** + * Creates a cursor that iterates tokens with normalized options. + * + * @param {Token[]} tokens - The array of tokens. + * @param {Comment[]} comments - The array of comments. + * @param {Object} indexMap - The map from locations to indices in `tokens`. + * @param {number} startLoc - The start location of the iteration range. + * @param {number} endLoc - The end location of the iteration range. + * @param {boolean} includeComments - The flag to iterate comments as well. + * @param {Function|null} filter - The predicate function to choose tokens. + * @param {number} skip - The count of tokens the cursor skips. + * @param {number} count - The maximum count of tokens the cursor iterates. Zero is no iteration for backward compatibility. + * @returns {Cursor} The created cursor. + */ + createCursor(tokens, comments, indexMap, startLoc, endLoc, includeComments, filter, skip, count) { + let cursor = this.createBaseCursor(tokens, comments, indexMap, startLoc, endLoc, includeComments); + + if (filter) { + cursor = new FilterCursor(cursor, filter); + } + if (skip >= 1) { + cursor = new SkipCursor(cursor, skip); + } + if (count >= 0) { + cursor = new LimitCursor(cursor, count); + } + + return cursor; + } +} + +//------------------------------------------------------------------------------ +// Exports +//------------------------------------------------------------------------------ + +exports.forward = new CursorFactory(ForwardTokenCursor, ForwardTokenCommentCursor); +exports.backward = new CursorFactory(BackwardTokenCursor, BackwardTokenCommentCursor); diff --git a/node_modules/eslint/lib/token-store/decorative-cursor.js b/node_modules/eslint/lib/token-store/decorative-cursor.js new file mode 100644 index 0000000..f0bff9c --- /dev/null +++ b/node_modules/eslint/lib/token-store/decorative-cursor.js @@ -0,0 +1,39 @@ +/** + * @fileoverview Define the abstract class about cursors which manipulate another cursor. + * @author Toru Nagashima + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const Cursor = require("./cursor"); + +//------------------------------------------------------------------------------ +// Exports +//------------------------------------------------------------------------------ + +/** + * The abstract class about cursors which manipulate another cursor. + */ +module.exports = class DecorativeCursor extends Cursor { + + /** + * Initializes this cursor. + * @param {Cursor} cursor - The cursor to be decorated. + */ + constructor(cursor) { + super(); + this.cursor = cursor; + } + + /** @inheritdoc */ + moveNext() { + const retv = this.cursor.moveNext(); + + this.current = this.cursor.current; + + return retv; + } +}; diff --git a/node_modules/eslint/lib/token-store/filter-cursor.js b/node_modules/eslint/lib/token-store/filter-cursor.js new file mode 100644 index 0000000..7133627 --- /dev/null +++ b/node_modules/eslint/lib/token-store/filter-cursor.js @@ -0,0 +1,43 @@ +/** + * @fileoverview Define the cursor which ignores specified tokens. + * @author Toru Nagashima + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const DecorativeCursor = require("./decorative-cursor"); + +//------------------------------------------------------------------------------ +// Exports +//------------------------------------------------------------------------------ + +/** + * The decorative cursor which ignores specified tokens. + */ +module.exports = class FilterCursor extends DecorativeCursor { + + /** + * Initializes this cursor. + * @param {Cursor} cursor - The cursor to be decorated. + * @param {Function} predicate - The predicate function to decide tokens this cursor iterates. + */ + constructor(cursor, predicate) { + super(cursor); + this.predicate = predicate; + } + + /** @inheritdoc */ + moveNext() { + const predicate = this.predicate; + + while (super.moveNext()) { + if (predicate(this.current)) { + return true; + } + } + return false; + } +}; diff --git a/node_modules/eslint/lib/token-store/forward-token-comment-cursor.js b/node_modules/eslint/lib/token-store/forward-token-comment-cursor.js new file mode 100644 index 0000000..be08552 --- /dev/null +++ b/node_modules/eslint/lib/token-store/forward-token-comment-cursor.js @@ -0,0 +1,57 @@ +/** + * @fileoverview Define the cursor which iterates tokens and comments. + * @author Toru Nagashima + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const Cursor = require("./cursor"); +const utils = require("./utils"); + +//------------------------------------------------------------------------------ +// Exports +//------------------------------------------------------------------------------ + +/** + * The cursor which iterates tokens and comments. + */ +module.exports = class ForwardTokenCommentCursor extends Cursor { + + /** + * Initializes this cursor. + * @param {Token[]} tokens - The array of tokens. + * @param {Comment[]} comments - The array of comments. + * @param {Object} indexMap - The map from locations to indices in `tokens`. + * @param {number} startLoc - The start location of the iteration range. + * @param {number} endLoc - The end location of the iteration range. + */ + constructor(tokens, comments, indexMap, startLoc, endLoc) { + super(); + this.tokens = tokens; + this.comments = comments; + this.tokenIndex = utils.getFirstIndex(tokens, indexMap, startLoc); + this.commentIndex = utils.search(comments, startLoc); + this.border = endLoc; + } + + /** @inheritdoc */ + moveNext() { + const token = (this.tokenIndex < this.tokens.length) ? this.tokens[this.tokenIndex] : null; + const comment = (this.commentIndex < this.comments.length) ? this.comments[this.commentIndex] : null; + + if (token && (!comment || token.range[0] < comment.range[0])) { + this.current = token; + this.tokenIndex += 1; + } else if (comment) { + this.current = comment; + this.commentIndex += 1; + } else { + this.current = null; + } + + return Boolean(this.current) && (this.border === -1 || this.current.range[1] <= this.border); + } +}; diff --git a/node_modules/eslint/lib/token-store/forward-token-cursor.js b/node_modules/eslint/lib/token-store/forward-token-cursor.js new file mode 100644 index 0000000..523ed39 --- /dev/null +++ b/node_modules/eslint/lib/token-store/forward-token-cursor.js @@ -0,0 +1,63 @@ +/** + * @fileoverview Define the cursor which iterates tokens only. + * @author Toru Nagashima + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const Cursor = require("./cursor"); +const utils = require("./utils"); + +//------------------------------------------------------------------------------ +// Exports +//------------------------------------------------------------------------------ + +/** + * The cursor which iterates tokens only. + */ +module.exports = class ForwardTokenCursor extends Cursor { + + /** + * Initializes this cursor. + * @param {Token[]} tokens - The array of tokens. + * @param {Comment[]} comments - The array of comments. + * @param {Object} indexMap - The map from locations to indices in `tokens`. + * @param {number} startLoc - The start location of the iteration range. + * @param {number} endLoc - The end location of the iteration range. + */ + constructor(tokens, comments, indexMap, startLoc, endLoc) { + super(); + this.tokens = tokens; + this.index = utils.getFirstIndex(tokens, indexMap, startLoc); + this.indexEnd = utils.getLastIndex(tokens, indexMap, endLoc); + } + + /** @inheritdoc */ + moveNext() { + if (this.index <= this.indexEnd) { + this.current = this.tokens[this.index]; + this.index += 1; + return true; + } + return false; + } + + /* + * + * Shorthand for performance. + * + */ + + /** @inheritdoc */ + getOneToken() { + return (this.index <= this.indexEnd) ? this.tokens[this.index] : null; + } + + /** @inheritdoc */ + getAllTokens() { + return this.tokens.slice(this.index, this.indexEnd + 1); + } +}; diff --git a/node_modules/eslint/lib/token-store/index.js b/node_modules/eslint/lib/token-store/index.js new file mode 100644 index 0000000..1446b9f --- /dev/null +++ b/node_modules/eslint/lib/token-store/index.js @@ -0,0 +1,633 @@ +/** + * @fileoverview Object to handle access and retrieval of tokens. + * @author Brandon Mills + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const assert = require("assert"); +const cursors = require("./cursors"); +const ForwardTokenCursor = require("./forward-token-cursor"); +const PaddedTokenCursor = require("./padded-token-cursor"); +const utils = require("./utils"); +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const TOKENS = Symbol("tokens"); +const COMMENTS = Symbol("comments"); +const INDEX_MAP = Symbol("indexMap"); + +/** + * Creates the map from locations to indices in `tokens`. + * + * The first/last location of tokens is mapped to the index of the token. + * The first/last location of comments is mapped to the index of the next token of each comment. + * + * @param {Token[]} tokens - The array of tokens. + * @param {Comment[]} comments - The array of comments. + * @returns {Object} The map from locations to indices in `tokens`. + * @private + */ +function createIndexMap(tokens, comments) { + const map = Object.create(null); + let tokenIndex = 0; + let commentIndex = 0; + let nextStart = 0; + let range = null; + + while (tokenIndex < tokens.length || commentIndex < comments.length) { + nextStart = (commentIndex < comments.length) ? comments[commentIndex].range[0] : Number.MAX_SAFE_INTEGER; + while (tokenIndex < tokens.length && (range = tokens[tokenIndex].range)[0] < nextStart) { + map[range[0]] = tokenIndex; + map[range[1] - 1] = tokenIndex; + tokenIndex += 1; + } + + nextStart = (tokenIndex < tokens.length) ? tokens[tokenIndex].range[0] : Number.MAX_SAFE_INTEGER; + while (commentIndex < comments.length && (range = comments[commentIndex].range)[0] < nextStart) { + map[range[0]] = tokenIndex; + map[range[1] - 1] = tokenIndex; + commentIndex += 1; + } + } + + return map; +} + +/** + * Creates the cursor iterates tokens with options. + * + * @param {CursorFactory} factory - The cursor factory to initialize cursor. + * @param {Token[]} tokens - The array of tokens. + * @param {Comment[]} comments - The array of comments. + * @param {Object} indexMap - The map from locations to indices in `tokens`. + * @param {number} startLoc - The start location of the iteration range. + * @param {number} endLoc - The end location of the iteration range. + * @param {number|Function|Object} [opts=0] - The option object. If this is a number then it's `opts.skip`. If this is a function then it's `opts.filter`. + * @param {boolean} [opts.includeComments=false] - The flag to iterate comments as well. + * @param {Function|null} [opts.filter=null] - The predicate function to choose tokens. + * @param {number} [opts.skip=0] - The count of tokens the cursor skips. + * @returns {Cursor} The created cursor. + * @private + */ +function createCursorWithSkip(factory, tokens, comments, indexMap, startLoc, endLoc, opts) { + let includeComments = false; + let skip = 0; + let filter = null; + + if (typeof opts === "number") { + skip = opts | 0; + } else if (typeof opts === "function") { + filter = opts; + } else if (opts) { + includeComments = !!opts.includeComments; + skip = opts.skip | 0; + filter = opts.filter || null; + } + assert(skip >= 0, "options.skip should be zero or a positive integer."); + assert(!filter || typeof filter === "function", "options.filter should be a function."); + + return factory.createCursor(tokens, comments, indexMap, startLoc, endLoc, includeComments, filter, skip, -1); +} + +/** + * Creates the cursor iterates tokens with options. + * + * @param {CursorFactory} factory - The cursor factory to initialize cursor. + * @param {Token[]} tokens - The array of tokens. + * @param {Comment[]} comments - The array of comments. + * @param {Object} indexMap - The map from locations to indices in `tokens`. + * @param {number} startLoc - The start location of the iteration range. + * @param {number} endLoc - The end location of the iteration range. + * @param {number|Function|Object} [opts=0] - The option object. If this is a number then it's `opts.count`. If this is a function then it's `opts.filter`. + * @param {boolean} [opts.includeComments] - The flag to iterate comments as well. + * @param {Function|null} [opts.filter=null] - The predicate function to choose tokens. + * @param {number} [opts.count=0] - The maximum count of tokens the cursor iterates. Zero is no iteration for backward compatibility. + * @returns {Cursor} The created cursor. + * @private + */ +function createCursorWithCount(factory, tokens, comments, indexMap, startLoc, endLoc, opts) { + let includeComments = false; + let count = 0; + let countExists = false; + let filter = null; + + if (typeof opts === "number") { + count = opts | 0; + countExists = true; + } else if (typeof opts === "function") { + filter = opts; + } else if (opts) { + includeComments = !!opts.includeComments; + count = opts.count | 0; + countExists = typeof opts.count === "number"; + filter = opts.filter || null; + } + assert(count >= 0, "options.count should be zero or a positive integer."); + assert(!filter || typeof filter === "function", "options.filter should be a function."); + + return factory.createCursor(tokens, comments, indexMap, startLoc, endLoc, includeComments, filter, 0, countExists ? count : -1); +} + +/** + * Creates the cursor iterates tokens with options. + * This is overload function of the below. + * + * @param {Token[]} tokens - The array of tokens. + * @param {Comment[]} comments - The array of comments. + * @param {Object} indexMap - The map from locations to indices in `tokens`. + * @param {number} startLoc - The start location of the iteration range. + * @param {number} endLoc - The end location of the iteration range. + * @param {Function|Object} opts - The option object. If this is a function then it's `opts.filter`. + * @param {boolean} [opts.includeComments] - The flag to iterate comments as well. + * @param {Function|null} [opts.filter=null] - The predicate function to choose tokens. + * @param {number} [opts.count=0] - The maximum count of tokens the cursor iterates. Zero is no iteration for backward compatibility. + * @returns {Cursor} The created cursor. + * @private + */ +/** + * Creates the cursor iterates tokens with options. + * + * @param {Token[]} tokens - The array of tokens. + * @param {Comment[]} comments - The array of comments. + * @param {Object} indexMap - The map from locations to indices in `tokens`. + * @param {number} startLoc - The start location of the iteration range. + * @param {number} endLoc - The end location of the iteration range. + * @param {number} [beforeCount=0] - The number of tokens before the node to retrieve. + * @param {boolean} [afterCount=0] - The number of tokens after the node to retrieve. + * @returns {Cursor} The created cursor. + * @private + */ +function createCursorWithPadding(tokens, comments, indexMap, startLoc, endLoc, beforeCount, afterCount) { + if (typeof beforeCount === "undefined" && typeof afterCount === "undefined") { + return new ForwardTokenCursor(tokens, comments, indexMap, startLoc, endLoc); + } + if (typeof beforeCount === "number" || typeof beforeCount === "undefined") { + return new PaddedTokenCursor(tokens, comments, indexMap, startLoc, endLoc, beforeCount | 0, afterCount | 0); + } + return createCursorWithCount(cursors.forward, tokens, comments, indexMap, startLoc, endLoc, beforeCount); +} + +/** + * Gets comment tokens that are adjacent to the current cursor position. + * @param {Cursor} cursor - A cursor instance. + * @returns {Array} An array of comment tokens adjacent to the current cursor position. + * @private + */ +function getAdjacentCommentTokensFromCursor(cursor) { + const tokens = []; + let currentToken = cursor.getOneToken(); + + while (currentToken && astUtils.isCommentToken(currentToken)) { + tokens.push(currentToken); + currentToken = cursor.getOneToken(); + } + + return tokens; +} + +//------------------------------------------------------------------------------ +// Exports +//------------------------------------------------------------------------------ + +/** + * The token store. + * + * This class provides methods to get tokens by locations as fast as possible. + * The methods are a part of public API, so we should be careful if it changes this class. + * + * People can get tokens in O(1) by the hash map which is mapping from the location of tokens/comments to tokens. + * Also people can get a mix of tokens and comments in O(log k), the k is the number of comments. + * Assuming that comments to be much fewer than tokens, this does not make hash map from token's locations to comments to reduce memory cost. + * This uses binary-searching instead for comments. + */ +module.exports = class TokenStore { + + /** + * Initializes this token store. + * @param {Token[]} tokens - The array of tokens. + * @param {Comment[]} comments - The array of comments. + */ + constructor(tokens, comments) { + this[TOKENS] = tokens; + this[COMMENTS] = comments; + this[INDEX_MAP] = createIndexMap(tokens, comments); + } + + //-------------------------------------------------------------------------- + // Gets single token. + //-------------------------------------------------------------------------- + + /** + * Gets the token starting at the specified index. + * @param {number} offset - Index of the start of the token's range. + * @param {Object} [options=0] - The option object. + * @param {boolean} [options.includeComments=false] - The flag to iterate comments as well. + * @returns {Token|null} The token starting at index, or null if no such token. + */ + getTokenByRangeStart(offset, options) { + const includeComments = options && options.includeComments; + const token = cursors.forward.createBaseCursor( + this[TOKENS], + this[COMMENTS], + this[INDEX_MAP], + offset, + -1, + includeComments + ).getOneToken(); + + if (token && token.range[0] === offset) { + return token; + } + return null; + } + + /** + * Gets the first token of the given node. + * @param {ASTNode} node - The AST node. + * @param {number|Function|Object} [options=0] - The option object. If this is a number then it's `options.skip`. If this is a function then it's `options.filter`. + * @param {boolean} [options.includeComments=false] - The flag to iterate comments as well. + * @param {Function|null} [options.filter=null] - The predicate function to choose tokens. + * @param {number} [options.skip=0] - The count of tokens the cursor skips. + * @returns {Token|null} An object representing the token. + */ + getFirstToken(node, options) { + return createCursorWithSkip( + cursors.forward, + this[TOKENS], + this[COMMENTS], + this[INDEX_MAP], + node.range[0], + node.range[1], + options + ).getOneToken(); + } + + /** + * Gets the last token of the given node. + * @param {ASTNode} node - The AST node. + * @param {number|Function|Object} [options=0] - The option object. Same options as getFirstToken() + * @returns {Token|null} An object representing the token. + */ + getLastToken(node, options) { + return createCursorWithSkip( + cursors.backward, + this[TOKENS], + this[COMMENTS], + this[INDEX_MAP], + node.range[0], + node.range[1], + options + ).getOneToken(); + } + + /** + * Gets the token that precedes a given node or token. + * @param {ASTNode|Token|Comment} node - The AST node or token. + * @param {number|Function|Object} [options=0] - The option object. Same options as getFirstToken() + * @returns {Token|null} An object representing the token. + */ + getTokenBefore(node, options) { + return createCursorWithSkip( + cursors.backward, + this[TOKENS], + this[COMMENTS], + this[INDEX_MAP], + -1, + node.range[0], + options + ).getOneToken(); + } + + /** + * Gets the token that follows a given node or token. + * @param {ASTNode|Token|Comment} node - The AST node or token. + * @param {number|Function|Object} [options=0] - The option object. Same options as getFirstToken() + * @returns {Token|null} An object representing the token. + */ + getTokenAfter(node, options) { + return createCursorWithSkip( + cursors.forward, + this[TOKENS], + this[COMMENTS], + this[INDEX_MAP], + node.range[1], + -1, + options + ).getOneToken(); + } + + /** + * Gets the first token between two non-overlapping nodes. + * @param {ASTNode|Token|Comment} left - Node before the desired token range. + * @param {ASTNode|Token|Comment} right - Node after the desired token range. + * @param {number|Function|Object} [options=0] - The option object. Same options as getFirstToken() + * @returns {Token|null} An object representing the token. + */ + getFirstTokenBetween(left, right, options) { + return createCursorWithSkip( + cursors.forward, + this[TOKENS], + this[COMMENTS], + this[INDEX_MAP], + left.range[1], + right.range[0], + options + ).getOneToken(); + } + + /** + * Gets the last token between two non-overlapping nodes. + * @param {ASTNode|Token|Comment} left Node before the desired token range. + * @param {ASTNode|Token|Comment} right Node after the desired token range. + * @param {number|Function|Object} [options=0] - The option object. Same options as getFirstToken() + * @returns {Token|null} An object representing the token. + */ + getLastTokenBetween(left, right, options) { + return createCursorWithSkip( + cursors.backward, + this[TOKENS], + this[COMMENTS], + this[INDEX_MAP], + left.range[1], + right.range[0], + options + ).getOneToken(); + } + + /** + * Gets the token that precedes a given node or token in the token stream. + * This is defined for backward compatibility. Use `includeComments` option instead. + * TODO: We have a plan to remove this in a future major version. + * @param {ASTNode|Token|Comment} node The AST node or token. + * @param {number} [skip=0] A number of tokens to skip. + * @returns {Token|null} An object representing the token. + * @deprecated + */ + getTokenOrCommentBefore(node, skip) { + return this.getTokenBefore(node, { includeComments: true, skip }); + } + + /** + * Gets the token that follows a given node or token in the token stream. + * This is defined for backward compatibility. Use `includeComments` option instead. + * TODO: We have a plan to remove this in a future major version. + * @param {ASTNode|Token|Comment} node The AST node or token. + * @param {number} [skip=0] A number of tokens to skip. + * @returns {Token|null} An object representing the token. + * @deprecated + */ + getTokenOrCommentAfter(node, skip) { + return this.getTokenAfter(node, { includeComments: true, skip }); + } + + //-------------------------------------------------------------------------- + // Gets multiple tokens. + //-------------------------------------------------------------------------- + + /** + * Gets the first `count` tokens of the given node. + * @param {ASTNode} node - The AST node. + * @param {number|Function|Object} [options=0] - The option object. If this is a number then it's `options.count`. If this is a function then it's `options.filter`. + * @param {boolean} [options.includeComments=false] - The flag to iterate comments as well. + * @param {Function|null} [options.filter=null] - The predicate function to choose tokens. + * @param {number} [options.count=0] - The maximum count of tokens the cursor iterates. + * @returns {Token[]} Tokens. + */ + getFirstTokens(node, options) { + return createCursorWithCount( + cursors.forward, + this[TOKENS], + this[COMMENTS], + this[INDEX_MAP], + node.range[0], + node.range[1], + options + ).getAllTokens(); + } + + /** + * Gets the last `count` tokens of the given node. + * @param {ASTNode} node - The AST node. + * @param {number|Function|Object} [options=0] - The option object. Same options as getFirstTokens() + * @returns {Token[]} Tokens. + */ + getLastTokens(node, options) { + return createCursorWithCount( + cursors.backward, + this[TOKENS], + this[COMMENTS], + this[INDEX_MAP], + node.range[0], + node.range[1], + options + ).getAllTokens().reverse(); + } + + /** + * Gets the `count` tokens that precedes a given node or token. + * @param {ASTNode|Token|Comment} node - The AST node or token. + * @param {number|Function|Object} [options=0] - The option object. Same options as getFirstTokens() + * @returns {Token[]} Tokens. + */ + getTokensBefore(node, options) { + return createCursorWithCount( + cursors.backward, + this[TOKENS], + this[COMMENTS], + this[INDEX_MAP], + -1, + node.range[0], + options + ).getAllTokens().reverse(); + } + + /** + * Gets the `count` tokens that follows a given node or token. + * @param {ASTNode|Token|Comment} node - The AST node or token. + * @param {number|Function|Object} [options=0] - The option object. Same options as getFirstTokens() + * @returns {Token[]} Tokens. + */ + getTokensAfter(node, options) { + return createCursorWithCount( + cursors.forward, + this[TOKENS], + this[COMMENTS], + this[INDEX_MAP], + node.range[1], + -1, + options + ).getAllTokens(); + } + + /** + * Gets the first `count` tokens between two non-overlapping nodes. + * @param {ASTNode|Token|Comment} left - Node before the desired token range. + * @param {ASTNode|Token|Comment} right - Node after the desired token range. + * @param {number|Function|Object} [options=0] - The option object. Same options as getFirstTokens() + * @returns {Token[]} Tokens between left and right. + */ + getFirstTokensBetween(left, right, options) { + return createCursorWithCount( + cursors.forward, + this[TOKENS], + this[COMMENTS], + this[INDEX_MAP], + left.range[1], + right.range[0], + options + ).getAllTokens(); + } + + /** + * Gets the last `count` tokens between two non-overlapping nodes. + * @param {ASTNode|Token|Comment} left Node before the desired token range. + * @param {ASTNode|Token|Comment} right Node after the desired token range. + * @param {number|Function|Object} [options=0] - The option object. Same options as getFirstTokens() + * @returns {Token[]} Tokens between left and right. + */ + getLastTokensBetween(left, right, options) { + return createCursorWithCount( + cursors.backward, + this[TOKENS], + this[COMMENTS], + this[INDEX_MAP], + left.range[1], + right.range[0], + options + ).getAllTokens().reverse(); + } + + /** + * Gets all tokens that are related to the given node. + * @param {ASTNode} node - The AST node. + * @param {Function|Object} options The option object. If this is a function then it's `options.filter`. + * @param {boolean} [options.includeComments=false] - The flag to iterate comments as well. + * @param {Function|null} [options.filter=null] - The predicate function to choose tokens. + * @param {number} [options.count=0] - The maximum count of tokens the cursor iterates. + * @returns {Token[]} Array of objects representing tokens. + */ + /** + * Gets all tokens that are related to the given node. + * @param {ASTNode} node - The AST node. + * @param {int} [beforeCount=0] - The number of tokens before the node to retrieve. + * @param {int} [afterCount=0] - The number of tokens after the node to retrieve. + * @returns {Token[]} Array of objects representing tokens. + */ + getTokens(node, beforeCount, afterCount) { + return createCursorWithPadding( + this[TOKENS], + this[COMMENTS], + this[INDEX_MAP], + node.range[0], + node.range[1], + beforeCount, + afterCount + ).getAllTokens(); + } + + /** + * Gets all of the tokens between two non-overlapping nodes. + * @param {ASTNode|Token|Comment} left Node before the desired token range. + * @param {ASTNode|Token|Comment} right Node after the desired token range. + * @param {Function|Object} options The option object. If this is a function then it's `options.filter`. + * @param {boolean} [options.includeComments=false] - The flag to iterate comments as well. + * @param {Function|null} [options.filter=null] - The predicate function to choose tokens. + * @param {number} [options.count=0] - The maximum count of tokens the cursor iterates. + * @returns {Token[]} Tokens between left and right. + */ + /** + * Gets all of the tokens between two non-overlapping nodes. + * @param {ASTNode|Token|Comment} left Node before the desired token range. + * @param {ASTNode|Token|Comment} right Node after the desired token range. + * @param {int} [padding=0] Number of extra tokens on either side of center. + * @returns {Token[]} Tokens between left and right. + */ + getTokensBetween(left, right, padding) { + return createCursorWithPadding( + this[TOKENS], + this[COMMENTS], + this[INDEX_MAP], + left.range[1], + right.range[0], + padding, + padding + ).getAllTokens(); + } + + //-------------------------------------------------------------------------- + // Others. + //-------------------------------------------------------------------------- + + /** + * Checks whether any comments exist or not between the given 2 nodes. + * + * @param {ASTNode} left - The node to check. + * @param {ASTNode} right - The node to check. + * @returns {boolean} `true` if one or more comments exist. + */ + commentsExistBetween(left, right) { + const index = utils.search(this[COMMENTS], left.range[1]); + + return ( + index < this[COMMENTS].length && + this[COMMENTS][index].range[1] <= right.range[0] + ); + } + + /** + * Gets all comment tokens directly before the given node or token. + * @param {ASTNode|token} nodeOrToken The AST node or token to check for adjacent comment tokens. + * @returns {Array} An array of comments in occurrence order. + */ + getCommentsBefore(nodeOrToken) { + const cursor = createCursorWithCount( + cursors.backward, + this[TOKENS], + this[COMMENTS], + this[INDEX_MAP], + -1, + nodeOrToken.range[0], + { includeComments: true } + ); + + return getAdjacentCommentTokensFromCursor(cursor).reverse(); + } + + /** + * Gets all comment tokens directly after the given node or token. + * @param {ASTNode|token} nodeOrToken The AST node or token to check for adjacent comment tokens. + * @returns {Array} An array of comments in occurrence order. + */ + getCommentsAfter(nodeOrToken) { + const cursor = createCursorWithCount( + cursors.forward, + this[TOKENS], + this[COMMENTS], + this[INDEX_MAP], + nodeOrToken.range[1], + -1, + { includeComments: true } + ); + + return getAdjacentCommentTokensFromCursor(cursor); + } + + /** + * Gets all comment tokens inside the given node. + * @param {ASTNode} node The AST node to get the comments for. + * @returns {Array} An array of comments in occurrence order. + */ + getCommentsInside(node) { + return this.getTokens(node, { + includeComments: true, + filter: astUtils.isCommentToken + }); + } +}; diff --git a/node_modules/eslint/lib/token-store/limit-cursor.js b/node_modules/eslint/lib/token-store/limit-cursor.js new file mode 100644 index 0000000..efb46cf --- /dev/null +++ b/node_modules/eslint/lib/token-store/limit-cursor.js @@ -0,0 +1,40 @@ +/** + * @fileoverview Define the cursor which limits the number of tokens. + * @author Toru Nagashima + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const DecorativeCursor = require("./decorative-cursor"); + +//------------------------------------------------------------------------------ +// Exports +//------------------------------------------------------------------------------ + +/** + * The decorative cursor which limits the number of tokens. + */ +module.exports = class LimitCursor extends DecorativeCursor { + + /** + * Initializes this cursor. + * @param {Cursor} cursor - The cursor to be decorated. + * @param {number} count - The count of tokens this cursor iterates. + */ + constructor(cursor, count) { + super(cursor); + this.count = count; + } + + /** @inheritdoc */ + moveNext() { + if (this.count > 0) { + this.count -= 1; + return super.moveNext(); + } + return false; + } +}; diff --git a/node_modules/eslint/lib/token-store/padded-token-cursor.js b/node_modules/eslint/lib/token-store/padded-token-cursor.js new file mode 100644 index 0000000..c083aed --- /dev/null +++ b/node_modules/eslint/lib/token-store/padded-token-cursor.js @@ -0,0 +1,38 @@ +/** + * @fileoverview Define the cursor which iterates tokens only, with inflated range. + * @author Toru Nagashima + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const ForwardTokenCursor = require("./forward-token-cursor"); + +//------------------------------------------------------------------------------ +// Exports +//------------------------------------------------------------------------------ + +/** + * The cursor which iterates tokens only, with inflated range. + * This is for the backward compatibility of padding options. + */ +module.exports = class PaddedTokenCursor extends ForwardTokenCursor { + + /** + * Initializes this cursor. + * @param {Token[]} tokens - The array of tokens. + * @param {Comment[]} comments - The array of comments. + * @param {Object} indexMap - The map from locations to indices in `tokens`. + * @param {number} startLoc - The start location of the iteration range. + * @param {number} endLoc - The end location of the iteration range. + * @param {number} beforeCount - The number of tokens this cursor iterates before start. + * @param {number} afterCount - The number of tokens this cursor iterates after end. + */ + constructor(tokens, comments, indexMap, startLoc, endLoc, beforeCount, afterCount) { + super(tokens, comments, indexMap, startLoc, endLoc); + this.index = Math.max(0, this.index - beforeCount); + this.indexEnd = Math.min(tokens.length - 1, this.indexEnd + afterCount); + } +}; diff --git a/node_modules/eslint/lib/token-store/skip-cursor.js b/node_modules/eslint/lib/token-store/skip-cursor.js new file mode 100644 index 0000000..ab34dfa --- /dev/null +++ b/node_modules/eslint/lib/token-store/skip-cursor.js @@ -0,0 +1,42 @@ +/** + * @fileoverview Define the cursor which ignores the first few tokens. + * @author Toru Nagashima + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const DecorativeCursor = require("./decorative-cursor"); + +//------------------------------------------------------------------------------ +// Exports +//------------------------------------------------------------------------------ + +/** + * The decorative cursor which ignores the first few tokens. + */ +module.exports = class SkipCursor extends DecorativeCursor { + + /** + * Initializes this cursor. + * @param {Cursor} cursor - The cursor to be decorated. + * @param {number} count - The count of tokens this cursor skips. + */ + constructor(cursor, count) { + super(cursor); + this.count = count; + } + + /** @inheritdoc */ + moveNext() { + while (this.count > 0) { + this.count -= 1; + if (!super.moveNext()) { + return false; + } + } + return super.moveNext(); + } +}; diff --git a/node_modules/eslint/lib/token-store/utils.js b/node_modules/eslint/lib/token-store/utils.js new file mode 100644 index 0000000..34b0a9a --- /dev/null +++ b/node_modules/eslint/lib/token-store/utils.js @@ -0,0 +1,104 @@ +/** + * @fileoverview Define utilify functions for token store. + * @author Toru Nagashima + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const lodash = require("lodash"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Gets `token.range[0]` from the given token. + * + * @param {Node|Token|Comment} token - The token to get. + * @returns {number} The start location. + * @private + */ +function getStartLocation(token) { + return token.range[0]; +} + +//------------------------------------------------------------------------------ +// Exports +//------------------------------------------------------------------------------ + +/** + * Binary-searches the index of the first token which is after the given location. + * If it was not found, this returns `tokens.length`. + * + * @param {(Token|Comment)[]} tokens - It searches the token in this list. + * @param {number} location - The location to search. + * @returns {number} The found index or `tokens.length`. + */ +exports.search = function search(tokens, location) { + return lodash.sortedIndexBy( + tokens, + { range: [location] }, + getStartLocation + ); +}; + +/** + * Gets the index of the `startLoc` in `tokens`. + * `startLoc` can be the value of `node.range[1]`, so this checks about `startLoc - 1` as well. + * + * @param {(Token|Comment)[]} tokens - The tokens to find an index. + * @param {Object} indexMap - The map from locations to indices. + * @param {number} startLoc - The location to get an index. + * @returns {number} The index. + */ +exports.getFirstIndex = function getFirstIndex(tokens, indexMap, startLoc) { + if (startLoc in indexMap) { + return indexMap[startLoc]; + } + if ((startLoc - 1) in indexMap) { + const index = indexMap[startLoc - 1]; + const token = (index >= 0 && index < tokens.length) ? tokens[index] : null; + + /* + * For the map of "comment's location -> token's index", it points the next token of a comment. + * In that case, +1 is unnecessary. + */ + if (token && token.range[0] >= startLoc) { + return index; + } + return index + 1; + } + return 0; +}; + +/** + * Gets the index of the `endLoc` in `tokens`. + * The information of end locations are recorded at `endLoc - 1` in `indexMap`, so this checks about `endLoc - 1` as well. + * + * @param {(Token|Comment)[]} tokens - The tokens to find an index. + * @param {Object} indexMap - The map from locations to indices. + * @param {number} endLoc - The location to get an index. + * @returns {number} The index. + */ +exports.getLastIndex = function getLastIndex(tokens, indexMap, endLoc) { + if (endLoc in indexMap) { + return indexMap[endLoc] - 1; + } + if ((endLoc - 1) in indexMap) { + const index = indexMap[endLoc - 1]; + const token = (index >= 0 && index < tokens.length) ? tokens[index] : null; + + /* + * For the map of "comment's location -> token's index", it points the next token of a comment. + * In that case, -1 is necessary. + */ + if (token && token.range[1] > endLoc) { + return index - 1; + } + return index; + } + return tokens.length - 1; +}; diff --git a/node_modules/eslint/lib/util/ajv.js b/node_modules/eslint/lib/util/ajv.js new file mode 100644 index 0000000..f9e8b98 --- /dev/null +++ b/node_modules/eslint/lib/util/ajv.js @@ -0,0 +1,29 @@ +/** + * @fileoverview The instance of Ajv validator. + * @author Evgeny Poberezkin + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const Ajv = require("ajv"), + metaSchema = require("ajv/lib/refs/json-schema-draft-04.json"); + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +const ajv = new Ajv({ + meta: false, + validateSchema: false, + missingRefs: "ignore", + verbose: true +}); + +ajv.addMetaSchema(metaSchema); +// eslint-disable-next-line no-underscore-dangle +ajv._opts.defaultMeta = metaSchema.id; + +module.exports = ajv; diff --git a/node_modules/eslint/lib/util/apply-disable-directives.js b/node_modules/eslint/lib/util/apply-disable-directives.js new file mode 100644 index 0000000..8153942 --- /dev/null +++ b/node_modules/eslint/lib/util/apply-disable-directives.js @@ -0,0 +1,160 @@ +/** + * @fileoverview A module that filters reported problems based on `eslint-disable` and `eslint-enable` comments + * @author Teddy Katz + */ + +"use strict"; + +const lodash = require("lodash"); + +/** + * Compares the locations of two objects in a source file + * @param {{line: number, column: number}} itemA The first object + * @param {{line: number, column: number}} itemB The second object + * @returns {number} A value less than 1 if itemA appears before itemB in the source file, greater than 1 if + * itemA appears after itemB in the source file, or 0 if itemA and itemB have the same location. + */ +function compareLocations(itemA, itemB) { + return itemA.line - itemB.line || itemA.column - itemB.column; +} + +/** + * This is the same as the exported function, except that it + * doesn't handle disable-line and disable-next-line directives, and it always reports unused + * disable directives. + * @param {Object} options options for applying directives. This is the same as the options + * for the exported function, except that `reportUnusedDisableDirectives` is not supported + * (this function always reports unused disable directives). + * @returns {{problems: Problem[], unusedDisableDirectives: Problem[]}} An object with a list + * of filtered problems and unused eslint-disable directives + */ +function applyDirectives(options) { + const problems = []; + let nextDirectiveIndex = 0; + let currentGlobalDisableDirective = null; + const disabledRuleMap = new Map(); + + // enabledRules is only used when there is a current global disable directive. + const enabledRules = new Set(); + const usedDisableDirectives = new Set(); + + for (const problem of options.problems) { + while ( + nextDirectiveIndex < options.directives.length && + compareLocations(options.directives[nextDirectiveIndex], problem) <= 0 + ) { + const directive = options.directives[nextDirectiveIndex++]; + + switch (directive.type) { + case "disable": + if (directive.ruleId === null) { + currentGlobalDisableDirective = directive; + disabledRuleMap.clear(); + enabledRules.clear(); + } else if (currentGlobalDisableDirective) { + enabledRules.delete(directive.ruleId); + disabledRuleMap.set(directive.ruleId, directive); + } else { + disabledRuleMap.set(directive.ruleId, directive); + } + break; + + case "enable": + if (directive.ruleId === null) { + currentGlobalDisableDirective = null; + disabledRuleMap.clear(); + } else if (currentGlobalDisableDirective) { + enabledRules.add(directive.ruleId); + disabledRuleMap.delete(directive.ruleId); + } else { + disabledRuleMap.delete(directive.ruleId); + } + break; + + // no default + } + } + + if (disabledRuleMap.has(problem.ruleId)) { + usedDisableDirectives.add(disabledRuleMap.get(problem.ruleId)); + } else if (currentGlobalDisableDirective && !enabledRules.has(problem.ruleId)) { + usedDisableDirectives.add(currentGlobalDisableDirective); + } else { + problems.push(problem); + } + } + + const unusedDisableDirectives = options.directives + .filter(directive => directive.type === "disable" && !usedDisableDirectives.has(directive)) + .map(directive => ({ + ruleId: null, + message: directive.ruleId + ? `Unused eslint-disable directive (no problems were reported from '${directive.ruleId}').` + : "Unused eslint-disable directive (no problems were reported).", + line: directive.unprocessedDirective.line, + column: directive.unprocessedDirective.column, + severity: 2, + source: null, + nodeType: null + })); + + return { problems, unusedDisableDirectives }; +} + +/** + * Given a list of directive comments (i.e. metadata about eslint-disable and eslint-enable comments) and a list + * of reported problems, determines which problems should be reported. + * @param {Object} options Information about directives and problems + * @param {{ + * type: ("disable"|"enable"|"disable-line"|"disable-next-line"), + * ruleId: (string|null), + * line: number, + * column: number + * }} options.directives Directive comments found in the file, with one-based columns. + * Two directive comments can only have the same location if they also have the same type (e.g. a single eslint-disable + * comment for two different rules is represented as two directives). + * @param {{ruleId: (string|null), line: number, column: number}[]} options.problems + * A list of problems reported by rules, sorted by increasing location in the file, with one-based columns. + * @param {boolean} options.reportUnusedDisableDirectives If `true`, adds additional problems for unused directives + * @returns {{ruleId: (string|null), line: number, column: number}[]} + * A list of reported problems that were not disabled by the directive comments. + */ +module.exports = options => { + const blockDirectives = options.directives + .filter(directive => directive.type === "disable" || directive.type === "enable") + .map(directive => Object.assign({}, directive, { unprocessedDirective: directive })) + .sort(compareLocations); + + const lineDirectives = lodash.flatMap(options.directives, directive => { + switch (directive.type) { + case "disable": + case "enable": + return []; + + case "disable-line": + return [ + { type: "disable", line: directive.line, column: 1, ruleId: directive.ruleId, unprocessedDirective: directive }, + { type: "enable", line: directive.line + 1, column: 0, ruleId: directive.ruleId, unprocessedDirective: directive } + ]; + + case "disable-next-line": + return [ + { type: "disable", line: directive.line + 1, column: 1, ruleId: directive.ruleId, unprocessedDirective: directive }, + { type: "enable", line: directive.line + 2, column: 0, ruleId: directive.ruleId, unprocessedDirective: directive } + ]; + + default: + throw new TypeError(`Unrecognized directive type '${directive.type}'`); + } + }).sort(compareLocations); + + const blockDirectivesResult = applyDirectives({ problems: options.problems, directives: blockDirectives }); + const lineDirectivesResult = applyDirectives({ problems: blockDirectivesResult.problems, directives: lineDirectives }); + + return options.reportUnusedDisableDirectives + ? lineDirectivesResult.problems + .concat(blockDirectivesResult.unusedDisableDirectives) + .concat(lineDirectivesResult.unusedDisableDirectives) + .sort(compareLocations) + : lineDirectivesResult.problems; +}; diff --git a/node_modules/eslint/lib/util/fix-tracker.js b/node_modules/eslint/lib/util/fix-tracker.js new file mode 100644 index 0000000..067070d --- /dev/null +++ b/node_modules/eslint/lib/util/fix-tracker.js @@ -0,0 +1,120 @@ +/** + * @fileoverview Helper class to aid in constructing fix commands. + * @author Alan Pierce + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("../ast-utils"); + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * A helper class to combine fix options into a fix command. Currently, it + * exposes some "retain" methods that extend the range of the text being + * replaced so that other fixes won't touch that region in the same pass. + */ +class FixTracker { + + /** + * Create a new FixTracker. + * + * @param {ruleFixer} fixer A ruleFixer instance. + * @param {SourceCode} sourceCode A SourceCode object for the current code. + */ + constructor(fixer, sourceCode) { + this.fixer = fixer; + this.sourceCode = sourceCode; + this.retainedRange = null; + } + + /** + * Mark the given range as "retained", meaning that other fixes may not + * may not modify this region in the same pass. + * + * @param {int[]} range The range to retain. + * @returns {FixTracker} The same RuleFixer, for chained calls. + */ + retainRange(range) { + this.retainedRange = range; + return this; + } + + /** + * Given a node, find the function containing it (or the entire program) and + * mark it as retained, meaning that other fixes may not modify it in this + * pass. This is useful for avoiding conflicts in fixes that modify control + * flow. + * + * @param {ASTNode} node The node to use as a starting point. + * @returns {FixTracker} The same RuleFixer, for chained calls. + */ + retainEnclosingFunction(node) { + const functionNode = astUtils.getUpperFunction(node); + + return this.retainRange(functionNode ? functionNode.range : this.sourceCode.ast.range); + } + + /** + * Given a node or token, find the token before and afterward, and mark that + * range as retained, meaning that other fixes may not modify it in this + * pass. This is useful for avoiding conflicts in fixes that make a small + * change to the code where the AST should not be changed. + * + * @param {ASTNode|Token} nodeOrToken The node or token to use as a starting + * point. The token to the left and right are use in the range. + * @returns {FixTracker} The same RuleFixer, for chained calls. + */ + retainSurroundingTokens(nodeOrToken) { + const tokenBefore = this.sourceCode.getTokenBefore(nodeOrToken) || nodeOrToken; + const tokenAfter = this.sourceCode.getTokenAfter(nodeOrToken) || nodeOrToken; + + return this.retainRange([tokenBefore.range[0], tokenAfter.range[1]]); + } + + /** + * Create a fix command that replaces the given range with the given text, + * accounting for any retained ranges. + * + * @param {int[]} range The range to remove in the fix. + * @param {string} text The text to insert in place of the range. + * @returns {Object} The fix command. + */ + replaceTextRange(range, text) { + let actualRange; + + if (this.retainedRange) { + actualRange = [ + Math.min(this.retainedRange[0], range[0]), + Math.max(this.retainedRange[1], range[1]) + ]; + } else { + actualRange = range; + } + + return this.fixer.replaceTextRange( + actualRange, + this.sourceCode.text.slice(actualRange[0], range[0]) + + text + + this.sourceCode.text.slice(range[1], actualRange[1]) + ); + } + + /** + * Create a fix command that removes the given node or token, accounting for + * any retained ranges. + * + * @param {ASTNode|Token} nodeOrToken The node or token to remove. + * @returns {Object} The fix command. + */ + remove(nodeOrToken) { + return this.replaceTextRange(nodeOrToken.range, ""); + } +} + +module.exports = FixTracker; diff --git a/node_modules/eslint/lib/util/glob-util.js b/node_modules/eslint/lib/util/glob-util.js new file mode 100644 index 0000000..e4b7827 --- /dev/null +++ b/node_modules/eslint/lib/util/glob-util.js @@ -0,0 +1,195 @@ +/** + * @fileoverview Utilities for working with globs and the filesystem. + * @author Ian VanSchooten + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const lodash = require("lodash"), + fs = require("fs"), + path = require("path"), + GlobSync = require("./glob"), + + pathUtil = require("./path-util"), + IgnoredPaths = require("../ignored-paths"); + +const debug = require("debug")("eslint:glob-util"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks if a provided path is a directory and returns a glob string matching + * all files under that directory if so, the path itself otherwise. + * + * Reason for this is that `glob` needs `/**` to collect all the files under a + * directory where as our previous implementation without `glob` simply walked + * a directory that is passed. So this is to maintain backwards compatibility. + * + * Also makes sure all path separators are POSIX style for `glob` compatibility. + * + * @param {Object} [options] An options object + * @param {string[]} [options.extensions=[".js"]] An array of accepted extensions + * @param {string} [options.cwd=process.cwd()] The cwd to use to resolve relative pathnames + * @returns {Function} A function that takes a pathname and returns a glob that + * matches all files with the provided extensions if + * pathname is a directory. + */ +function processPath(options) { + const cwd = (options && options.cwd) || process.cwd(); + let extensions = (options && options.extensions) || [".js"]; + + extensions = extensions.map(ext => ext.replace(/^\./, "")); + + let suffix = "/**"; + + if (extensions.length === 1) { + suffix += `/*.${extensions[0]}`; + } else { + suffix += `/*.{${extensions.join(",")}}`; + } + + /** + * A function that converts a directory name to a glob pattern + * + * @param {string} pathname The directory path to be modified + * @returns {string} The glob path or the file path itself + * @private + */ + return function(pathname) { + let newPath = pathname; + const resolvedPath = path.resolve(cwd, pathname); + + if (fs.existsSync(resolvedPath) && fs.statSync(resolvedPath).isDirectory()) { + newPath = pathname.replace(/[/\\]$/, "") + suffix; + } + + return pathUtil.convertPathToPosix(newPath); + }; +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Resolves any directory patterns into glob-based patterns for easier handling. + * @param {string[]} patterns File patterns (such as passed on the command line). + * @param {Object} options An options object. + * @returns {string[]} The equivalent glob patterns and filepath strings. + */ +function resolveFileGlobPatterns(patterns, options) { + + const processPathExtensions = processPath(options); + + return patterns.filter(p => p.length).map(processPathExtensions); +} + +const dotfilesPattern = /(?:(?:^\.)|(?:[/\\]\.))[^/\\.].*/; + +/** + * Build a list of absolute filesnames on which ESLint will act. + * Ignored files are excluded from the results, as are duplicates. + * + * @param {string[]} globPatterns Glob patterns. + * @param {Object} [options] An options object. + * @param {string} [options.cwd] CWD (considered for relative filenames) + * @param {boolean} [options.ignore] False disables use of .eslintignore. + * @param {string} [options.ignorePath] The ignore file to use instead of .eslintignore. + * @param {string} [options.ignorePattern] A pattern of files to ignore. + * @returns {string[]} Resolved absolute filenames. + */ +function listFilesToProcess(globPatterns, options) { + options = options || { ignore: true }; + const files = [], + added = {}; + + const cwd = (options && options.cwd) || process.cwd(); + + const getIgnorePaths = lodash.memoize( + optionsObj => + new IgnoredPaths(optionsObj) + ); + + /** + * Executes the linter on a file defined by the `filename`. Skips + * unsupported file extensions and any files that are already linted. + * @param {string} filename The file to be processed + * @param {boolean} shouldWarnIgnored Whether or not a report should be made if + * the file is ignored + * @param {IgnoredPaths} ignoredPaths An instance of IgnoredPaths + * @returns {void} + */ + function addFile(filename, shouldWarnIgnored, ignoredPaths) { + let ignored = false; + let isSilentlyIgnored; + + if (ignoredPaths.contains(filename, "default")) { + ignored = (options.ignore !== false) && shouldWarnIgnored; + isSilentlyIgnored = !shouldWarnIgnored; + } + + if (options.ignore !== false) { + if (ignoredPaths.contains(filename, "custom")) { + if (shouldWarnIgnored) { + ignored = true; + } else { + isSilentlyIgnored = true; + } + } + } + + if (isSilentlyIgnored && !ignored) { + return; + } + + if (added[filename]) { + return; + } + files.push({ filename, ignored }); + added[filename] = true; + } + + debug("Creating list of files to process."); + globPatterns.forEach(pattern => { + const file = path.resolve(cwd, pattern); + + if (fs.existsSync(file) && fs.statSync(file).isFile()) { + const ignoredPaths = getIgnorePaths(options); + + addFile(fs.realpathSync(file), true, ignoredPaths); + } else { + + // regex to find .hidden or /.hidden patterns, but not ./relative or ../relative + const globIncludesDotfiles = dotfilesPattern.test(pattern); + let newOptions = options; + + if (!options.dotfiles) { + newOptions = Object.assign({}, options, { dotfiles: globIncludesDotfiles }); + } + + const ignoredPaths = getIgnorePaths(newOptions); + const shouldIgnore = ignoredPaths.getIgnoredFoldersGlobChecker(); + const globOptions = { + nodir: true, + dot: true, + cwd + }; + + new GlobSync(pattern, globOptions, shouldIgnore).found.forEach(globMatch => { + addFile(path.resolve(cwd, globMatch), false, ignoredPaths); + }); + } + }); + + return files; +} + +module.exports = { + resolveFileGlobPatterns, + listFilesToProcess +}; diff --git a/node_modules/eslint/lib/util/glob.js b/node_modules/eslint/lib/util/glob.js new file mode 100644 index 0000000..f352dae --- /dev/null +++ b/node_modules/eslint/lib/util/glob.js @@ -0,0 +1,63 @@ +/** + * @fileoverview An inherited `glob.GlobSync` to support .gitignore patterns. + * @author Kael Zhang + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const Sync = require("glob").GlobSync, + util = require("util"); + +//------------------------------------------------------------------------------ +// Private +//------------------------------------------------------------------------------ + +const IGNORE = Symbol("ignore"); + +/** + * Subclass of `glob.GlobSync` + * @param {string} pattern Pattern to be matched. + * @param {Object} options `options` for `glob` + * @param {function()} shouldIgnore Method to check whether a directory should be ignored. + * @constructor + */ +function GlobSync(pattern, options, shouldIgnore) { + + /** + * We don't put this thing to argument `options` to avoid + * further problems, such as `options` validation. + * + * Use `Symbol` as much as possible to avoid confliction. + */ + this[IGNORE] = shouldIgnore; + + Sync.call(this, pattern, options); +} + +util.inherits(GlobSync, Sync); + +/* eslint no-underscore-dangle: ["error", { "allow": ["_readdir", "_mark"] }] */ + +GlobSync.prototype._readdir = function(abs, inGlobStar) { + + /** + * `options.nodir` makes `options.mark` as `true`. + * Mark `abs` first + * to make sure `"node_modules"` will be ignored immediately with ignore pattern `"node_modules/"`. + * + * There is a built-in cache about marked `File.Stat` in `glob`, so that we could not worry about the extra invocation of `this._mark()` + */ + const marked = this._mark(abs); + + if (this[IGNORE](marked)) { + return null; + } + + return Sync.prototype._readdir.call(this, abs, inGlobStar); +}; + + +module.exports = GlobSync; diff --git a/node_modules/eslint/lib/util/hash.js b/node_modules/eslint/lib/util/hash.js new file mode 100644 index 0000000..6d7ef8b --- /dev/null +++ b/node_modules/eslint/lib/util/hash.js @@ -0,0 +1,35 @@ +/** + * @fileoverview Defining the hashing function in one place. + * @author Michael Ficarra + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const murmur = require("imurmurhash"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ +// Private +//------------------------------------------------------------------------------ + +/** + * hash the given string + * @param {string} str the string to hash + * @returns {string} the hash + */ +function hash(str) { + return murmur(str).result().toString(36); +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +module.exports = hash; diff --git a/node_modules/eslint/lib/util/interpolate.js b/node_modules/eslint/lib/util/interpolate.js new file mode 100644 index 0000000..e0f2d02 --- /dev/null +++ b/node_modules/eslint/lib/util/interpolate.js @@ -0,0 +1,24 @@ +/** + * @fileoverview Interpolate keys from an object into a string with {{ }} markers. + * @author Jed Fox + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +module.exports = (text, data) => { + if (!data) { + return text; + } + return text.replace(/\{\{\s*([^{}]+?)\s*\}\}/g, (fullMatch, term) => { + if (term in data) { + return data[term]; + } + + // Preserve old behavior: If parameter name not provided, don't replace it. + return fullMatch; + }); +}; diff --git a/node_modules/eslint/lib/util/keywords.js b/node_modules/eslint/lib/util/keywords.js new file mode 100644 index 0000000..3fbb777 --- /dev/null +++ b/node_modules/eslint/lib/util/keywords.js @@ -0,0 +1,67 @@ +/** + * @fileoverview A shared list of ES3 keywords. + * @author Josh Perez + */ +"use strict"; + +module.exports = [ + "abstract", + "boolean", + "break", + "byte", + "case", + "catch", + "char", + "class", + "const", + "continue", + "debugger", + "default", + "delete", + "do", + "double", + "else", + "enum", + "export", + "extends", + "false", + "final", + "finally", + "float", + "for", + "function", + "goto", + "if", + "implements", + "import", + "in", + "instanceof", + "int", + "interface", + "long", + "native", + "new", + "null", + "package", + "private", + "protected", + "public", + "return", + "short", + "static", + "super", + "switch", + "synchronized", + "this", + "throw", + "throws", + "transient", + "true", + "try", + "typeof", + "var", + "void", + "volatile", + "while", + "with" +]; diff --git a/node_modules/eslint/lib/util/module-resolver.js b/node_modules/eslint/lib/util/module-resolver.js new file mode 100644 index 0000000..470a54f --- /dev/null +++ b/node_modules/eslint/lib/util/module-resolver.js @@ -0,0 +1,85 @@ +/** + * @fileoverview Implements the Node.js require.resolve algorithm + * @author Nicholas C. Zakas + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const Module = require("module"); + +//------------------------------------------------------------------------------ +// Private +//------------------------------------------------------------------------------ + +const DEFAULT_OPTIONS = { + + /* + * module.paths is an array of paths to search for resolving things relative + * to this file. Module.globalPaths contains all of the special Node.js + * directories that can also be searched for modules. + * + * Need to check for existence of module.paths because Jest seems not to + * include it. See https://github.com/eslint/eslint/issues/5791. + */ + lookupPaths: module.paths ? module.paths.concat(Module.globalPaths) : Module.globalPaths.concat() +}; + +/** + * Resolves modules based on a set of options. + */ +class ModuleResolver { + + /** + * Resolves modules based on a set of options. + * @param {Object} options The options for resolving modules. + * @param {string[]} options.lookupPaths An array of paths to include in the + * lookup with the highest priority paths coming first. + */ + constructor(options) { + this.options = Object.assign({}, DEFAULT_OPTIONS, options || {}); + } + + /** + * Resolves the file location of a given module relative to the configured + * lookup paths. + * @param {string} name The module name to resolve. + * @param {string} extraLookupPath An extra path to look into for the module. + * This path is used with the highest priority. + * @returns {string} The resolved file path for the module. + * @throws {Error} If the module cannot be resolved. + */ + resolve(name, extraLookupPath) { + + /* + * First, clone the lookup paths so we're not messing things up for + * subsequent calls to this function. Then, move the extraLookupPath to the + * top of the lookup paths list so it will be searched first. + */ + const lookupPaths = this.options.lookupPaths.concat(); + + lookupPaths.unshift(extraLookupPath); + + /** + * Module._findPath is an internal method to Node.js, then one they use to + * lookup file paths when require() is called. So, we are hooking into the + * exact same logic that Node.js uses. + */ + const result = Module._findPath(name, lookupPaths); // eslint-disable-line no-underscore-dangle + + if (!result) { + throw new Error(`Cannot find module '${name}'`); + } + + return result; + } +} + +//------------------------------------------------------------------------------ +// Public API +//------------------------------------------------------------------------------ + +module.exports = ModuleResolver; diff --git a/node_modules/eslint/lib/util/naming.js b/node_modules/eslint/lib/util/naming.js new file mode 100644 index 0000000..dcac81b --- /dev/null +++ b/node_modules/eslint/lib/util/naming.js @@ -0,0 +1,112 @@ +/** + * @fileoverview Common helpers for naming of plugins, formatters and configs + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const pathUtil = require("../util/path-util"); + +//------------------------------------------------------------------------------ +// Private +//------------------------------------------------------------------------------ + +const NAMESPACE_REGEX = /^@.*\//i; + +/** + * Brings package name to correct format based on prefix + * @param {string} name The name of the package. + * @param {string} prefix Can be either "eslint-plugin", "eslint-config" or "eslint-formatter" + * @returns {string} Normalized name of the package + * @private + */ +function normalizePackageName(name, prefix) { + + /** + * On Windows, name can come in with Windows slashes instead of Unix slashes. + * Normalize to Unix first to avoid errors later on. + * https://github.com/eslint/eslint/issues/5644 + */ + if (name.indexOf("\\") > -1) { + name = pathUtil.convertPathToPosix(name); + } + + if (name.charAt(0) === "@") { + + /** + * it's a scoped package + * package name is the prefix, or just a username + */ + const scopedPackageShortcutRegex = new RegExp(`^(@[^/]+)(?:/(?:${prefix})?)?$`), + scopedPackageNameRegex = new RegExp(`^${prefix}(-|$)`); + + if (scopedPackageShortcutRegex.test(name)) { + name = name.replace(scopedPackageShortcutRegex, `$1/${prefix}`); + } else if (!scopedPackageNameRegex.test(name.split("/")[1])) { + + /** + * for scoped packages, insert the prefix after the first / unless + * the path is already @scope/eslint or @scope/eslint-xxx-yyy + */ + name = name.replace(/^@([^/]+)\/(.*)$/, `@$1/${prefix}-$2`); + } + } else if (name.indexOf(`${prefix}-`) !== 0) { + name = `${prefix}-${name}`; + } + + return name; +} + +/** + * Removes the prefix from a term. + * @param {string} prefix The prefix to remove. + * @param {string} term The term which may have the prefix. + * @returns {string} The term without prefix. + */ +function removePrefixFromTerm(prefix, term) { + return term.startsWith(prefix) ? term.slice(prefix.length) : term; +} + +/** + * Adds a prefix to a term. + * @param {string} prefix The prefix to add. + * @param {string} term The term which may not have the prefix. + * @returns {string} The term with prefix. + */ +function addPrefixToTerm(prefix, term) { + return term.startsWith(prefix) ? term : `${prefix}${term}`; +} + +/** + * Gets the scope (namespace) of a term. + * @param {string} term The term which may have the namespace. + * @returns {string} The namepace of the term if it has one. + */ +function getNamespaceFromTerm(term) { + const match = term.match(NAMESPACE_REGEX); + + return match ? match[0] : ""; +} + +/** + * Removes the namespace from a term. + * @param {string} term The term which may have the namespace. + * @returns {string} The name of the plugin without the namespace. + */ +function removeNamespaceFromTerm(term) { + return term.replace(NAMESPACE_REGEX, ""); +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +module.exports = { + normalizePackageName, + removePrefixFromTerm, + addPrefixToTerm, + getNamespaceFromTerm, + removeNamespaceFromTerm +}; diff --git a/node_modules/eslint/lib/util/node-event-generator.js b/node_modules/eslint/lib/util/node-event-generator.js new file mode 100644 index 0000000..9d477bb --- /dev/null +++ b/node_modules/eslint/lib/util/node-event-generator.js @@ -0,0 +1,308 @@ +/** + * @fileoverview The event generator for AST nodes. + * @author Toru Nagashima + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const esquery = require("esquery"); +const lodash = require("lodash"); + +//------------------------------------------------------------------------------ +// Typedefs +//------------------------------------------------------------------------------ + +/** + * An object describing an AST selector + * @typedef {Object} ASTSelector + * @property {string} rawSelector The string that was parsed into this selector + * @property {boolean} isExit `true` if this should be emitted when exiting the node rather than when entering + * @property {Object} parsedSelector An object (from esquery) describing the matching behavior of the selector + * @property {string[]|null} listenerTypes A list of node types that could possibly cause the selector to match, + * or `null` if all node types could cause a match + * @property {number} attributeCount The total number of classes, pseudo-classes, and attribute queries in this selector + * @property {number} identifierCount The total number of identifier queries in this selector + */ + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Gets the possible types of a selector + * @param {Object} parsedSelector An object (from esquery) describing the matching behavior of the selector + * @returns {string[]|null} The node types that could possibly trigger this selector, or `null` if all node types could trigger it + */ +function getPossibleTypes(parsedSelector) { + switch (parsedSelector.type) { + case "identifier": + return [parsedSelector.value]; + + case "matches": { + const typesForComponents = parsedSelector.selectors.map(getPossibleTypes); + + if (typesForComponents.every(typesForComponent => typesForComponent)) { + return lodash.union.apply(null, typesForComponents); + } + return null; + } + + case "compound": { + const typesForComponents = parsedSelector.selectors.map(getPossibleTypes).filter(typesForComponent => typesForComponent); + + // If all of the components could match any type, then the compound could also match any type. + if (!typesForComponents.length) { + return null; + } + + /* + * If at least one of the components could only match a particular type, the compound could only match + * the intersection of those types. + */ + return lodash.intersection.apply(null, typesForComponents); + } + + case "child": + case "descendant": + case "sibling": + case "adjacent": + return getPossibleTypes(parsedSelector.right); + + default: + return null; + + } +} + +/** + * Counts the number of class, pseudo-class, and attribute queries in this selector + * @param {Object} parsedSelector An object (from esquery) describing the selector's matching behavior + * @returns {number} The number of class, pseudo-class, and attribute queries in this selector + */ +function countClassAttributes(parsedSelector) { + switch (parsedSelector.type) { + case "child": + case "descendant": + case "sibling": + case "adjacent": + return countClassAttributes(parsedSelector.left) + countClassAttributes(parsedSelector.right); + + case "compound": + case "not": + case "matches": + return parsedSelector.selectors.reduce((sum, childSelector) => sum + countClassAttributes(childSelector), 0); + + case "attribute": + case "field": + case "nth-child": + case "nth-last-child": + return 1; + + default: + return 0; + } +} + +/** + * Counts the number of identifier queries in this selector + * @param {Object} parsedSelector An object (from esquery) describing the selector's matching behavior + * @returns {number} The number of identifier queries + */ +function countIdentifiers(parsedSelector) { + switch (parsedSelector.type) { + case "child": + case "descendant": + case "sibling": + case "adjacent": + return countIdentifiers(parsedSelector.left) + countIdentifiers(parsedSelector.right); + + case "compound": + case "not": + case "matches": + return parsedSelector.selectors.reduce((sum, childSelector) => sum + countIdentifiers(childSelector), 0); + + case "identifier": + return 1; + + default: + return 0; + } +} + +/** + * Compares the specificity of two selector objects, with CSS-like rules. + * @param {ASTSelector} selectorA An AST selector descriptor + * @param {ASTSelector} selectorB Another AST selector descriptor + * @returns {number} + * a value less than 0 if selectorA is less specific than selectorB + * a value greater than 0 if selectorA is more specific than selectorB + * a value less than 0 if selectorA and selectorB have the same specificity, and selectorA <= selectorB alphabetically + * a value greater than 0 if selectorA and selectorB have the same specificity, and selectorA > selectorB alphabetically + */ +function compareSpecificity(selectorA, selectorB) { + return selectorA.attributeCount - selectorB.attributeCount || + selectorA.identifierCount - selectorB.identifierCount || + (selectorA.rawSelector <= selectorB.rawSelector ? -1 : 1); +} + +/** + * Parses a raw selector string, and throws a useful error if parsing fails. + * @param {string} rawSelector A raw AST selector + * @returns {Object} An object (from esquery) describing the matching behavior of this selector + * @throws {Error} An error if the selector is invalid + */ +function tryParseSelector(rawSelector) { + try { + return esquery.parse(rawSelector.replace(/:exit$/, "")); + } catch (err) { + if (typeof err.offset === "number") { + throw new SyntaxError(`Syntax error in selector "${rawSelector}" at position ${err.offset}: ${err.message}`); + } + throw err; + } +} + +/** + * Parses a raw selector string, and returns the parsed selector along with specificity and type information. + * @param {string} rawSelector A raw AST selector + * @returns {ASTSelector} A selector descriptor + */ +const parseSelector = lodash.memoize(rawSelector => { + const parsedSelector = tryParseSelector(rawSelector); + + return { + rawSelector, + isExit: rawSelector.endsWith(":exit"), + parsedSelector, + listenerTypes: getPossibleTypes(parsedSelector), + attributeCount: countClassAttributes(parsedSelector), + identifierCount: countIdentifiers(parsedSelector) + }; +}); + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * The event generator for AST nodes. + * This implements below interface. + * + * ```ts + * interface EventGenerator { + * emitter: SafeEmitter; + * enterNode(node: ASTNode): void; + * leaveNode(node: ASTNode): void; + * } + * ``` + */ +class NodeEventGenerator { + + /** + * @param {SafeEmitter} emitter + * An SafeEmitter which is the destination of events. This emitter must already + * have registered listeners for all of the events that it needs to listen for. + * (See lib/util/safe-emitter.js for more details on `SafeEmitter`.) + * @returns {NodeEventGenerator} new instance + */ + constructor(emitter) { + this.emitter = emitter; + this.currentAncestry = []; + this.enterSelectorsByNodeType = new Map(); + this.exitSelectorsByNodeType = new Map(); + this.anyTypeEnterSelectors = []; + this.anyTypeExitSelectors = []; + + emitter.eventNames().forEach(rawSelector => { + const selector = parseSelector(rawSelector); + + if (selector.listenerTypes) { + selector.listenerTypes.forEach(nodeType => { + const typeMap = selector.isExit ? this.exitSelectorsByNodeType : this.enterSelectorsByNodeType; + + if (!typeMap.has(nodeType)) { + typeMap.set(nodeType, []); + } + typeMap.get(nodeType).push(selector); + }); + } else { + (selector.isExit ? this.anyTypeExitSelectors : this.anyTypeEnterSelectors).push(selector); + } + }); + + this.anyTypeEnterSelectors.sort(compareSpecificity); + this.anyTypeExitSelectors.sort(compareSpecificity); + this.enterSelectorsByNodeType.forEach(selectorList => selectorList.sort(compareSpecificity)); + this.exitSelectorsByNodeType.forEach(selectorList => selectorList.sort(compareSpecificity)); + } + + /** + * Checks a selector against a node, and emits it if it matches + * @param {ASTNode} node The node to check + * @param {ASTSelector} selector An AST selector descriptor + * @returns {void} + */ + applySelector(node, selector) { + if (esquery.matches(node, selector.parsedSelector, this.currentAncestry)) { + this.emitter.emit(selector.rawSelector, node); + } + } + + /** + * Applies all appropriate selectors to a node, in specificity order + * @param {ASTNode} node The node to check + * @param {boolean} isExit `false` if the node is currently being entered, `true` if it's currently being exited + * @returns {void} + */ + applySelectors(node, isExit) { + const selectorsByNodeType = (isExit ? this.exitSelectorsByNodeType : this.enterSelectorsByNodeType).get(node.type) || []; + const anyTypeSelectors = isExit ? this.anyTypeExitSelectors : this.anyTypeEnterSelectors; + + /* + * selectorsByNodeType and anyTypeSelectors were already sorted by specificity in the constructor. + * Iterate through each of them, applying selectors in the right order. + */ + let selectorsByTypeIndex = 0; + let anyTypeSelectorsIndex = 0; + + while (selectorsByTypeIndex < selectorsByNodeType.length || anyTypeSelectorsIndex < anyTypeSelectors.length) { + if ( + selectorsByTypeIndex >= selectorsByNodeType.length || + anyTypeSelectorsIndex < anyTypeSelectors.length && + compareSpecificity(anyTypeSelectors[anyTypeSelectorsIndex], selectorsByNodeType[selectorsByTypeIndex]) < 0 + ) { + this.applySelector(node, anyTypeSelectors[anyTypeSelectorsIndex++]); + } else { + this.applySelector(node, selectorsByNodeType[selectorsByTypeIndex++]); + } + } + } + + /** + * Emits an event of entering AST node. + * @param {ASTNode} node - A node which was entered. + * @returns {void} + */ + enterNode(node) { + if (node.parent) { + this.currentAncestry.unshift(node.parent); + } + this.applySelectors(node, false); + } + + /** + * Emits an event of leaving AST node. + * @param {ASTNode} node - A node which was left. + * @returns {void} + */ + leaveNode(node) { + this.applySelectors(node, true); + this.currentAncestry.shift(); + } +} + +module.exports = NodeEventGenerator; diff --git a/node_modules/eslint/lib/util/npm-util.js b/node_modules/eslint/lib/util/npm-util.js new file mode 100644 index 0000000..1c0cc5c --- /dev/null +++ b/node_modules/eslint/lib/util/npm-util.js @@ -0,0 +1,179 @@ +/** + * @fileoverview Utility for executing npm commands. + * @author Ian VanSchooten + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const fs = require("fs"), + spawn = require("cross-spawn"), + path = require("path"), + log = require("../logging"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Find the closest package.json file, starting at process.cwd (by default), + * and working up to root. + * + * @param {string} [startDir=process.cwd()] Starting directory + * @returns {string} Absolute path to closest package.json file + */ +function findPackageJson(startDir) { + let dir = path.resolve(startDir || process.cwd()); + + do { + const pkgFile = path.join(dir, "package.json"); + + if (!fs.existsSync(pkgFile) || !fs.statSync(pkgFile).isFile()) { + dir = path.join(dir, ".."); + continue; + } + return pkgFile; + } while (dir !== path.resolve(dir, "..")); + return null; +} + +//------------------------------------------------------------------------------ +// Private +//------------------------------------------------------------------------------ + +/** + * Install node modules synchronously and save to devDependencies in package.json + * @param {string|string[]} packages Node module or modules to install + * @returns {void} + */ +function installSyncSaveDev(packages) { + if (!Array.isArray(packages)) { + packages = [packages]; + } + const npmProcess = spawn.sync("npm", ["i", "--save-dev"].concat(packages), + { stdio: "inherit" }); + const error = npmProcess.error; + + if (error && error.code === "ENOENT") { + const pluralS = packages.length > 1 ? "s" : ""; + + log.error(`Could not execute npm. Please install the following package${pluralS} with a package manager of your choice: ${packages.join(", ")}`); + } +} + +/** + * Fetch `peerDependencies` of the given package by `npm show` command. + * @param {string} packageName The package name to fetch peerDependencies. + * @returns {Object} Gotten peerDependencies. Returns null if npm was not found. + */ +function fetchPeerDependencies(packageName) { + const npmProcess = spawn.sync( + "npm", + ["show", "--json", packageName, "peerDependencies"], + { encoding: "utf8" } + ); + + const error = npmProcess.error; + + if (error && error.code === "ENOENT") { + return null; + } + const fetchedText = npmProcess.stdout.trim(); + + return JSON.parse(fetchedText || "{}"); + + +} + +/** + * Check whether node modules are include in a project's package.json. + * + * @param {string[]} packages Array of node module names + * @param {Object} opt Options Object + * @param {boolean} opt.dependencies Set to true to check for direct dependencies + * @param {boolean} opt.devDependencies Set to true to check for development dependencies + * @param {boolean} opt.startdir Directory to begin searching from + * @returns {Object} An object whose keys are the module names + * and values are booleans indicating installation. + */ +function check(packages, opt) { + let deps = []; + const pkgJson = (opt) ? findPackageJson(opt.startDir) : findPackageJson(); + let fileJson; + + if (!pkgJson) { + throw new Error("Could not find a package.json file. Run 'npm init' to create one."); + } + + try { + fileJson = JSON.parse(fs.readFileSync(pkgJson, "utf8")); + } catch (e) { + log.info("Could not read package.json file. Please check that the file contains valid JSON."); + throw new Error(e); + } + + if (opt.devDependencies && typeof fileJson.devDependencies === "object") { + deps = deps.concat(Object.keys(fileJson.devDependencies)); + } + if (opt.dependencies && typeof fileJson.dependencies === "object") { + deps = deps.concat(Object.keys(fileJson.dependencies)); + } + return packages.reduce((status, pkg) => { + status[pkg] = deps.indexOf(pkg) !== -1; + return status; + }, {}); +} + +/** + * Check whether node modules are included in the dependencies of a project's + * package.json. + * + * Convienience wrapper around check(). + * + * @param {string[]} packages Array of node modules to check. + * @param {string} rootDir The directory contianing a package.json + * @returns {Object} An object whose keys are the module names + * and values are booleans indicating installation. + */ +function checkDeps(packages, rootDir) { + return check(packages, { dependencies: true, startDir: rootDir }); +} + +/** + * Check whether node modules are included in the devDependencies of a project's + * package.json. + * + * Convienience wrapper around check(). + * + * @param {string[]} packages Array of node modules to check. + * @returns {Object} An object whose keys are the module names + * and values are booleans indicating installation. + */ +function checkDevDeps(packages) { + return check(packages, { devDependencies: true }); +} + +/** + * Check whether package.json is found in current path. + * + * @param {string=} startDir Starting directory + * @returns {boolean} Whether a package.json is found in current path. + */ +function checkPackageJson(startDir) { + return !!findPackageJson(startDir); +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +module.exports = { + installSyncSaveDev, + fetchPeerDependencies, + checkDeps, + checkDevDeps, + checkPackageJson +}; diff --git a/node_modules/eslint/lib/util/path-util.js b/node_modules/eslint/lib/util/path-util.js new file mode 100644 index 0000000..4100ff9 --- /dev/null +++ b/node_modules/eslint/lib/util/path-util.js @@ -0,0 +1,74 @@ +/** + * @fileoverview Common helpers for operations on filenames and paths + * @author Ian VanSchooten + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const path = require("path"); + +//------------------------------------------------------------------------------ +// Private +//------------------------------------------------------------------------------ + +/** + * Replace Windows with posix style paths + * + * @param {string} filepath Path to convert + * @returns {string} Converted filepath + */ +function convertPathToPosix(filepath) { + const normalizedFilepath = path.normalize(filepath); + const posixFilepath = normalizedFilepath.replace(/\\/g, "/"); + + return posixFilepath; +} + +/** + * Converts an absolute filepath to a relative path from a given base path + * + * For example, if the filepath is `/my/awesome/project/foo.bar`, + * and the base directory is `/my/awesome/project/`, + * then this function should return `foo.bar`. + * + * path.relative() does something similar, but it requires a baseDir (`from` argument). + * This function makes it optional and just removes a leading slash if the baseDir is not given. + * + * It does not take into account symlinks (for now). + * + * @param {string} filepath Path to convert to relative path. If already relative, + * it will be assumed to be relative to process.cwd(), + * converted to absolute, and then processed. + * @param {string} [baseDir] Absolute base directory to resolve the filepath from. + * If not provided, all this function will do is remove + * a leading slash. + * @returns {string} Relative filepath + */ +function getRelativePath(filepath, baseDir) { + let relativePath; + + if (!path.isAbsolute(filepath)) { + filepath = path.resolve(filepath); + } + if (baseDir) { + if (!path.isAbsolute(baseDir)) { + throw new Error("baseDir should be an absolute path"); + } + relativePath = path.relative(baseDir, filepath); + } else { + relativePath = filepath.replace(/^\//, ""); + } + return relativePath; +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +module.exports = { + convertPathToPosix, + getRelativePath +}; diff --git a/node_modules/eslint/lib/util/patterns/letters.js b/node_modules/eslint/lib/util/patterns/letters.js new file mode 100644 index 0000000..eb255d8 --- /dev/null +++ b/node_modules/eslint/lib/util/patterns/letters.js @@ -0,0 +1,36 @@ +/** + * @fileoverview Pattern for detecting any letter (even letters outside of ASCII). + * NOTE: This file was generated using this script in JSCS based on the Unicode 7.0.0 standard: https://github.com/jscs-dev/node-jscs/blob/f5ed14427deb7e7aac84f3056a5aab2d9f3e563e/publish/helpers/generate-patterns.js + * Do not edit this file by hand-- please use https://github.com/mathiasbynens/regenerate to regenerate the regular expression exported from this file. + * @author Kevin Partington + * @license MIT License (from JSCS). See below. + */ + +/* + * The MIT License (MIT) + * + * Copyright 2013-2016 Dulin Marat and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +"use strict"; + +module.exports = /[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\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-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\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]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/; diff --git a/node_modules/eslint/lib/util/rule-fixer.js b/node_modules/eslint/lib/util/rule-fixer.js new file mode 100644 index 0000000..bdd80d1 --- /dev/null +++ b/node_modules/eslint/lib/util/rule-fixer.js @@ -0,0 +1,140 @@ +/** + * @fileoverview An object that creates fix commands for rules. + * @author Nicholas C. Zakas + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +// none! + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Creates a fix command that inserts text at the specified index in the source text. + * @param {int} index The 0-based index at which to insert the new text. + * @param {string} text The text to insert. + * @returns {Object} The fix command. + * @private + */ +function insertTextAt(index, text) { + return { + range: [index, index], + text + }; +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Creates code fixing commands for rules. + */ + +const ruleFixer = Object.freeze({ + + /** + * Creates a fix command that inserts text after the given node or token. + * The fix is not applied until applyFixes() is called. + * @param {ASTNode|Token} nodeOrToken The node or token to insert after. + * @param {string} text The text to insert. + * @returns {Object} The fix command. + */ + insertTextAfter(nodeOrToken, text) { + return this.insertTextAfterRange(nodeOrToken.range, text); + }, + + /** + * Creates a fix command that inserts text after the specified range in the source text. + * The fix is not applied until applyFixes() is called. + * @param {int[]} range The range to replace, first item is start of range, second + * is end of range. + * @param {string} text The text to insert. + * @returns {Object} The fix command. + */ + insertTextAfterRange(range, text) { + return insertTextAt(range[1], text); + }, + + /** + * Creates a fix command that inserts text before the given node or token. + * The fix is not applied until applyFixes() is called. + * @param {ASTNode|Token} nodeOrToken The node or token to insert before. + * @param {string} text The text to insert. + * @returns {Object} The fix command. + */ + insertTextBefore(nodeOrToken, text) { + return this.insertTextBeforeRange(nodeOrToken.range, text); + }, + + /** + * Creates a fix command that inserts text before the specified range in the source text. + * The fix is not applied until applyFixes() is called. + * @param {int[]} range The range to replace, first item is start of range, second + * is end of range. + * @param {string} text The text to insert. + * @returns {Object} The fix command. + */ + insertTextBeforeRange(range, text) { + return insertTextAt(range[0], text); + }, + + /** + * Creates a fix command that replaces text at the node or token. + * The fix is not applied until applyFixes() is called. + * @param {ASTNode|Token} nodeOrToken The node or token to remove. + * @param {string} text The text to insert. + * @returns {Object} The fix command. + */ + replaceText(nodeOrToken, text) { + return this.replaceTextRange(nodeOrToken.range, text); + }, + + /** + * Creates a fix command that replaces text at the specified range in the source text. + * The fix is not applied until applyFixes() is called. + * @param {int[]} range The range to replace, first item is start of range, second + * is end of range. + * @param {string} text The text to insert. + * @returns {Object} The fix command. + */ + replaceTextRange(range, text) { + return { + range, + text + }; + }, + + /** + * Creates a fix command that removes the node or token from the source. + * The fix is not applied until applyFixes() is called. + * @param {ASTNode|Token} nodeOrToken The node or token to remove. + * @returns {Object} The fix command. + */ + remove(nodeOrToken) { + return this.removeRange(nodeOrToken.range); + }, + + /** + * Creates a fix command that removes the specified range of text from the source. + * The fix is not applied until applyFixes() is called. + * @param {int[]} range The range to remove, first item is start of range, second + * is end of range. + * @returns {Object} The fix command. + */ + removeRange(range) { + return { + range, + text: "" + }; + } + +}); + + +module.exports = ruleFixer; diff --git a/node_modules/eslint/lib/util/safe-emitter.js b/node_modules/eslint/lib/util/safe-emitter.js new file mode 100644 index 0000000..2fa373c --- /dev/null +++ b/node_modules/eslint/lib/util/safe-emitter.js @@ -0,0 +1,54 @@ +/** + * @fileoverview A variant of EventEmitter which does not give listeners information about each other + * @author Teddy Katz + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Typedefs +//------------------------------------------------------------------------------ + +/** + * An event emitter + * @typedef {Object} SafeEmitter + * @property {function(eventName: string, listenerFunc: Function): void} on Adds a listener for a given event name + * @property {function(eventName: string, arg1?: any, arg2?: any, arg3?: any)} emit Emits an event with a given name. + * This calls all the listeners that were listening for that name, with `arg1`, `arg2`, and `arg3` as arguments. + * @property {function(): string[]} eventNames Gets the list of event names that have registered listeners. + */ + +/** + * Creates an object which can listen for and emit events. + * This is similar to the EventEmitter API in Node's standard library, but it has a few differences. + * The goal is to allow multiple modules to attach arbitrary listeners to the same emitter, without + * letting the modules know about each other at all. + * 1. It has no special keys like `error` and `newListener`, which would allow modules to detect when + * another module throws an error or registers a listener. + * 2. It calls listener functions without any `this` value. (`EventEmitter` calls listeners with a + * `this` value of the emitter instance, which would give listeners access to other listeners.) + * 3. Events can be emitted with at most 3 arguments. (For example: when using `emitter.emit('foo', a, b, c)`, + * the arguments `a`, `b`, and `c` will be passed to the listener functions.) + * @returns {SafeEmitter} An emitter + */ +module.exports = () => { + const listeners = Object.create(null); + + return Object.freeze({ + on(eventName, listener) { + if (eventName in listeners) { + listeners[eventName].push(listener); + } else { + listeners[eventName] = [listener]; + } + }, + emit(eventName, a, b, c) { + if (eventName in listeners) { + listeners[eventName].forEach(listener => listener(a, b, c)); + } + }, + eventNames() { + return Object.keys(listeners); + } + }); +}; diff --git a/node_modules/eslint/lib/util/source-code-fixer.js b/node_modules/eslint/lib/util/source-code-fixer.js new file mode 100644 index 0000000..b5bfc74 --- /dev/null +++ b/node_modules/eslint/lib/util/source-code-fixer.js @@ -0,0 +1,152 @@ +/** + * @fileoverview An object that caches and applies source code fixes. + * @author Nicholas C. Zakas + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const debug = require("debug")("eslint:text-fixer"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const BOM = "\uFEFF"; + +/** + * Compares items in a messages array by range. + * @param {Message} a The first message. + * @param {Message} b The second message. + * @returns {int} -1 if a comes before b, 1 if a comes after b, 0 if equal. + * @private + */ +function compareMessagesByFixRange(a, b) { + return a.fix.range[0] - b.fix.range[0] || a.fix.range[1] - b.fix.range[1]; +} + +/** + * Compares items in a messages array by line and column. + * @param {Message} a The first message. + * @param {Message} b The second message. + * @returns {int} -1 if a comes before b, 1 if a comes after b, 0 if equal. + * @private + */ +function compareMessagesByLocation(a, b) { + return a.line - b.line || a.column - b.column; +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Utility for apply fixes to source code. + * @constructor + */ +function SourceCodeFixer() { + Object.freeze(this); +} + +/** + * Applies the fixes specified by the messages to the given text. Tries to be + * smart about the fixes and won't apply fixes over the same area in the text. + * @param {string} sourceText The text to apply the changes to. + * @param {Message[]} messages The array of messages reported by ESLint. + * @param {boolean|Function} [shouldFix=true] Determines whether each message should be fixed + * @returns {Object} An object containing the fixed text and any unfixed messages. + */ +SourceCodeFixer.applyFixes = function(sourceText, messages, shouldFix) { + debug("Applying fixes"); + + if (shouldFix === false) { + debug("shouldFix parameter was false, not attempting fixes"); + return { + fixed: false, + messages, + output: sourceText + }; + } + + // clone the array + const remainingMessages = [], + fixes = [], + bom = sourceText.startsWith(BOM) ? BOM : "", + text = bom ? sourceText.slice(1) : sourceText; + let lastPos = Number.NEGATIVE_INFINITY, + output = bom; + + /** + * Try to use the 'fix' from a problem. + * @param {Message} problem The message object to apply fixes from + * @returns {boolean} Whether fix was successfully applied + */ + function attemptFix(problem) { + const fix = problem.fix; + const start = fix.range[0]; + const end = fix.range[1]; + + // Remain it as a problem if it's overlapped or it's a negative range + if (lastPos >= start || start > end) { + remainingMessages.push(problem); + return false; + } + + // Remove BOM. + if ((start < 0 && end >= 0) || (start === 0 && fix.text.startsWith(BOM))) { + output = ""; + } + + // Make output to this fix. + output += text.slice(Math.max(0, lastPos), Math.max(0, start)); + output += fix.text; + lastPos = end; + return true; + } + + messages.forEach(problem => { + if (problem.hasOwnProperty("fix")) { + fixes.push(problem); + } else { + remainingMessages.push(problem); + } + }); + + if (fixes.length) { + debug("Found fixes to apply"); + let fixesWereApplied = false; + + for (const problem of fixes.sort(compareMessagesByFixRange)) { + if (typeof shouldFix !== "function" || shouldFix(problem)) { + attemptFix(problem); + + /* + * The only time attemptFix will fail is if a previous fix was + * applied which conflicts with it. So we can mark this as true. + */ + fixesWereApplied = true; + } else { + remainingMessages.push(problem); + } + } + output += text.slice(Math.max(0, lastPos)); + + return { + fixed: fixesWereApplied, + messages: remainingMessages.sort(compareMessagesByLocation), + output + }; + } + + debug("No fixes to apply"); + return { + fixed: false, + messages, + output: bom + text + }; + +}; + +module.exports = SourceCodeFixer; diff --git a/node_modules/eslint/lib/util/source-code-util.js b/node_modules/eslint/lib/util/source-code-util.js new file mode 100644 index 0000000..6ffd243 --- /dev/null +++ b/node_modules/eslint/lib/util/source-code-util.js @@ -0,0 +1,109 @@ +/** + * @fileoverview Tools for obtaining SourceCode objects. + * @author Ian VanSchooten + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const CLIEngine = require("../cli-engine"), + globUtil = require("./glob-util"), + baseDefaultOptions = require("../../conf/default-cli-options"); + +const debug = require("debug")("eslint:source-code-util"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Get the SourceCode object for a single file + * @param {string} filename The fully resolved filename to get SourceCode from. + * @param {Object} options A CLIEngine options object. + * @returns {Array} Array of the SourceCode object representing the file + * and fatal error message. + */ +function getSourceCodeOfFile(filename, options) { + debug("getting sourceCode of", filename); + const opts = Object.assign({}, options, { rules: {} }); + const cli = new CLIEngine(opts); + const results = cli.executeOnFiles([filename]); + + if (results && results.results[0] && results.results[0].messages[0] && results.results[0].messages[0].fatal) { + const msg = results.results[0].messages[0]; + + throw new Error(`(${filename}:${msg.line}:${msg.column}) ${msg.message}`); + } + const sourceCode = cli.linter.getSourceCode(); + + return sourceCode; +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + + +/** + * This callback is used to measure execution status in a progress bar + * @callback progressCallback + * @param {number} The total number of times the callback will be called. + */ + +/** + * Gets the SourceCode of a single file, or set of files. + * @param {string[]|string} patterns A filename, directory name, or glob, + * or an array of them + * @param {Object} [options] A CLIEngine options object. If not provided, + * the default cli options will be used. + * @param {progressCallback} [cb] Callback for reporting execution status + * @returns {Object} The SourceCode of all processed files. + */ +function getSourceCodeOfFiles(patterns, options, cb) { + const sourceCodes = {}; + let opts; + + if (typeof patterns === "string") { + patterns = [patterns]; + } + + const defaultOptions = Object.assign({}, baseDefaultOptions, { cwd: process.cwd() }); + + if (typeof options === "undefined") { + opts = defaultOptions; + } else if (typeof options === "function") { + cb = options; + opts = defaultOptions; + } else if (typeof options === "object") { + opts = Object.assign({}, defaultOptions, options); + } + debug("constructed options:", opts); + patterns = globUtil.resolveFileGlobPatterns(patterns, opts); + + const filenames = globUtil.listFilesToProcess(patterns, opts) + .filter(fileInfo => !fileInfo.ignored) + .reduce((files, fileInfo) => files.concat(fileInfo.filename), []); + + if (filenames.length === 0) { + debug(`Did not find any files matching pattern(s): ${patterns}`); + } + filenames.forEach(filename => { + const sourceCode = getSourceCodeOfFile(filename, opts); + + if (sourceCode) { + debug("got sourceCode of", filename); + sourceCodes[filename] = sourceCode; + } + if (cb) { + cb(filenames.length); // eslint-disable-line callback-return + } + }); + return sourceCodes; +} + +module.exports = { + getSourceCodeOfFiles +}; diff --git a/node_modules/eslint/lib/util/source-code.js b/node_modules/eslint/lib/util/source-code.js new file mode 100644 index 0000000..dee81aa --- /dev/null +++ b/node_modules/eslint/lib/util/source-code.js @@ -0,0 +1,507 @@ +/** + * @fileoverview Abstraction of JavaScript source code. + * @author Nicholas C. Zakas + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const TokenStore = require("../token-store"), + Traverser = require("./traverser"), + astUtils = require("../ast-utils"), + lodash = require("lodash"); + +//------------------------------------------------------------------------------ +// Private +//------------------------------------------------------------------------------ + +/** + * Validates that the given AST has the required information. + * @param {ASTNode} ast The Program node of the AST to check. + * @throws {Error} If the AST doesn't contain the correct information. + * @returns {void} + * @private + */ +function validate(ast) { + if (!ast.tokens) { + throw new Error("AST is missing the tokens array."); + } + + if (!ast.comments) { + throw new Error("AST is missing the comments array."); + } + + if (!ast.loc) { + throw new Error("AST is missing location information."); + } + + if (!ast.range) { + throw new Error("AST is missing range information"); + } +} + +/** + * Check to see if its a ES6 export declaration. + * @param {ASTNode} astNode An AST node. + * @returns {boolean} whether the given node represents an export declaration. + * @private + */ +function looksLikeExport(astNode) { + return astNode.type === "ExportDefaultDeclaration" || astNode.type === "ExportNamedDeclaration" || + astNode.type === "ExportAllDeclaration" || astNode.type === "ExportSpecifier"; +} + +/** + * Merges two sorted lists into a larger sorted list in O(n) time. + * @param {Token[]} tokens The list of tokens. + * @param {Token[]} comments The list of comments. + * @returns {Token[]} A sorted list of tokens and comments. + * @private + */ +function sortedMerge(tokens, comments) { + const result = []; + let tokenIndex = 0; + let commentIndex = 0; + + while (tokenIndex < tokens.length || commentIndex < comments.length) { + if (commentIndex >= comments.length || tokenIndex < tokens.length && tokens[tokenIndex].range[0] < comments[commentIndex].range[0]) { + result.push(tokens[tokenIndex++]); + } else { + result.push(comments[commentIndex++]); + } + } + + return result; +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +class SourceCode extends TokenStore { + + /** + * Represents parsed source code. + * @param {string|Object} textOrConfig - The source code text or config object. + * @param {string} textOrConfig.text - The source code text. + * @param {ASTNode} textOrConfig.ast - The Program node of the AST representing the code. This AST should be created from the text that BOM was stripped. + * @param {Object|null} textOrConfig.parserServices - The parser srevices. + * @param {ScopeManager|null} textOrConfig.scopeManager - The scope of this source code. + * @param {Object|null} textOrConfig.visitorKeys - The visitor keys to traverse AST. + * @param {ASTNode} [ast] - The Program node of the AST representing the code. This AST should be created from the text that BOM was stripped. + * @constructor + */ + constructor(textOrConfig, ast) { + let text, parserServices, scopeManager, visitorKeys; + + // Process overloading. + if (typeof textOrConfig === "string") { + text = textOrConfig; + } else if (typeof textOrConfig === "object" && textOrConfig !== null) { + text = textOrConfig.text; + ast = textOrConfig.ast; + parserServices = textOrConfig.parserServices; + scopeManager = textOrConfig.scopeManager; + visitorKeys = textOrConfig.visitorKeys; + } + + validate(ast); + super(ast.tokens, ast.comments); + + /** + * The flag to indicate that the source code has Unicode BOM. + * @type boolean + */ + this.hasBOM = (text.charCodeAt(0) === 0xFEFF); + + /** + * The original text source code. + * BOM was stripped from this text. + * @type string + */ + this.text = (this.hasBOM ? text.slice(1) : text); + + /** + * The parsed AST for the source code. + * @type ASTNode + */ + this.ast = ast; + + /** + * The parser services of this source code. + * @type {Object} + */ + this.parserServices = parserServices || {}; + + /** + * The scope of this source code. + * @type {ScopeManager|null} + */ + this.scopeManager = scopeManager || null; + + /** + * The visitor keys to traverse AST. + * @type {Object} + */ + this.visitorKeys = visitorKeys || Traverser.DEFAULT_VISITOR_KEYS; + + // Check the source text for the presence of a shebang since it is parsed as a standard line comment. + const shebangMatched = this.text.match(astUtils.SHEBANG_MATCHER); + const hasShebang = shebangMatched && ast.comments.length && ast.comments[0].value === shebangMatched[1]; + + if (hasShebang) { + ast.comments[0].type = "Shebang"; + } + + this.tokensAndComments = sortedMerge(ast.tokens, ast.comments); + + /** + * The source code split into lines according to ECMA-262 specification. + * This is done to avoid each rule needing to do so separately. + * @type string[] + */ + this.lines = []; + this.lineStartIndices = [0]; + + const lineEndingPattern = astUtils.createGlobalLinebreakMatcher(); + let match; + + /* + * Previously, this was implemented using a regex that + * matched a sequence of non-linebreak characters followed by a + * linebreak, then adding the lengths of the matches. However, + * this caused a catastrophic backtracking issue when the end + * of a file contained a large number of non-newline characters. + * To avoid this, the current implementation just matches newlines + * and uses match.index to get the correct line start indices. + */ + while ((match = lineEndingPattern.exec(this.text))) { + this.lines.push(this.text.slice(this.lineStartIndices[this.lineStartIndices.length - 1], match.index)); + this.lineStartIndices.push(match.index + match[0].length); + } + this.lines.push(this.text.slice(this.lineStartIndices[this.lineStartIndices.length - 1])); + + // Cache for comments found using getComments(). + this._commentCache = new WeakMap(); + + // don't allow modification of this object + Object.freeze(this); + Object.freeze(this.lines); + } + + /** + * Split the source code into multiple lines based on the line delimiters. + * @param {string} text Source code as a string. + * @returns {string[]} Array of source code lines. + * @public + */ + static splitLines(text) { + return text.split(astUtils.createGlobalLinebreakMatcher()); + } + + /** + * Gets the source code for the given node. + * @param {ASTNode=} node The AST node to get the text for. + * @param {int=} beforeCount The number of characters before the node to retrieve. + * @param {int=} afterCount The number of characters after the node to retrieve. + * @returns {string} The text representing the AST node. + * @public + */ + getText(node, beforeCount, afterCount) { + if (node) { + return this.text.slice(Math.max(node.range[0] - (beforeCount || 0), 0), + node.range[1] + (afterCount || 0)); + } + return this.text; + } + + /** + * Gets the entire source text split into an array of lines. + * @returns {Array} The source text as an array of lines. + * @public + */ + getLines() { + return this.lines; + } + + /** + * Retrieves an array containing all comments in the source code. + * @returns {ASTNode[]} An array of comment nodes. + * @public + */ + getAllComments() { + return this.ast.comments; + } + + /** + * Gets all comments for the given node. + * @param {ASTNode} node The AST node to get the comments for. + * @returns {Object} An object containing a leading and trailing array + * of comments indexed by their position. + * @public + */ + getComments(node) { + if (this._commentCache.has(node)) { + return this._commentCache.get(node); + } + + const comments = { + leading: [], + trailing: [] + }; + + /* + * Return all comments as leading comments of the Program node when + * there is no executable code. + */ + if (node.type === "Program") { + if (node.body.length === 0) { + comments.leading = node.comments; + } + } else { + + /* + * Return comments as trailing comments of nodes that only contain + * comments (to mimic the comment attachment behavior present in Espree). + */ + if ((node.type === "BlockStatement" || node.type === "ClassBody") && node.body.length === 0 || + node.type === "ObjectExpression" && node.properties.length === 0 || + node.type === "ArrayExpression" && node.elements.length === 0 || + node.type === "SwitchStatement" && node.cases.length === 0 + ) { + comments.trailing = this.getTokens(node, { + includeComments: true, + filter: astUtils.isCommentToken + }); + } + + /* + * Iterate over tokens before and after node and collect comment tokens. + * Do not include comments that exist outside of the parent node + * to avoid duplication. + */ + let currentToken = this.getTokenBefore(node, { includeComments: true }); + + while (currentToken && astUtils.isCommentToken(currentToken)) { + if (node.parent && (currentToken.start < node.parent.start)) { + break; + } + comments.leading.push(currentToken); + currentToken = this.getTokenBefore(currentToken, { includeComments: true }); + } + + comments.leading.reverse(); + + currentToken = this.getTokenAfter(node, { includeComments: true }); + + while (currentToken && astUtils.isCommentToken(currentToken)) { + if (node.parent && (currentToken.end > node.parent.end)) { + break; + } + comments.trailing.push(currentToken); + currentToken = this.getTokenAfter(currentToken, { includeComments: true }); + } + } + + this._commentCache.set(node, comments); + return comments; + } + + /** + * Retrieves the JSDoc comment for a given node. + * @param {ASTNode} node The AST node to get the comment for. + * @returns {Token|null} The Block comment token containing the JSDoc comment + * for the given node or null if not found. + * @public + */ + getJSDocComment(node) { + + /** + * Checks for the presence of a JSDoc comment for the given node and returns it. + * @param {ASTNode} astNode The AST node to get the comment for. + * @returns {Token|null} The Block comment token containing the JSDoc comment + * for the given node or null if not found. + * @private + */ + const findJSDocComment = astNode => { + const tokenBefore = this.getTokenBefore(astNode, { includeComments: true }); + + if ( + tokenBefore && + astUtils.isCommentToken(tokenBefore) && + tokenBefore.type === "Block" && + tokenBefore.value.charAt(0) === "*" && + astNode.loc.start.line - tokenBefore.loc.end.line <= 1 + ) { + return tokenBefore; + } + + return null; + }; + let parent = node.parent; + + switch (node.type) { + case "ClassDeclaration": + case "FunctionDeclaration": + return findJSDocComment(looksLikeExport(parent) ? parent : node); + + case "ClassExpression": + return findJSDocComment(parent.parent); + + case "ArrowFunctionExpression": + case "FunctionExpression": + if (parent.type !== "CallExpression" && parent.type !== "NewExpression") { + while ( + !this.getCommentsBefore(parent).length && + !/Function/.test(parent.type) && + parent.type !== "MethodDefinition" && + parent.type !== "Property" + ) { + parent = parent.parent; + + if (!parent) { + break; + } + } + + if (parent && parent.type !== "FunctionDeclaration" && parent.type !== "Program") { + return findJSDocComment(parent); + } + } + + return findJSDocComment(node); + + // falls through + default: + return null; + } + } + + /** + * Gets the deepest node containing a range index. + * @param {int} index Range index of the desired node. + * @returns {ASTNode} The node if found or null if not found. + * @public + */ + getNodeByRangeIndex(index) { + let result = null, + resultParent = null; + + Traverser.traverse(this.ast, { + visitorKeys: this.visitorKeys, + enter(node, parent) { + if (node.range[0] <= index && index < node.range[1]) { + result = node; + resultParent = parent; + } else { + this.skip(); + } + }, + leave(node) { + if (node === result) { + this.break(); + } + } + }); + + return result ? Object.assign({ parent: resultParent }, result) : null; + } + + /** + * Determines if two tokens have at least one whitespace character + * between them. This completely disregards comments in making the + * determination, so comments count as zero-length substrings. + * @param {Token} first The token to check after. + * @param {Token} second The token to check before. + * @returns {boolean} True if there is only space between tokens, false + * if there is anything other than whitespace between tokens. + * @public + */ + isSpaceBetweenTokens(first, second) { + const text = this.text.slice(first.range[1], second.range[0]); + + return /\s/.test(text.replace(/\/\*.*?\*\//g, "")); + } + + /** + * Converts a source text index into a (line, column) pair. + * @param {number} index The index of a character in a file + * @returns {Object} A {line, column} location object with a 0-indexed column + * @public + */ + getLocFromIndex(index) { + if (typeof index !== "number") { + throw new TypeError("Expected `index` to be a number."); + } + + if (index < 0 || index > this.text.length) { + throw new RangeError(`Index out of range (requested index ${index}, but source text has length ${this.text.length}).`); + } + + /* + * For an argument of this.text.length, return the location one "spot" past the last character + * of the file. If the last character is a linebreak, the location will be column 0 of the next + * line; otherwise, the location will be in the next column on the same line. + * + * See getIndexFromLoc for the motivation for this special case. + */ + if (index === this.text.length) { + return { line: this.lines.length, column: this.lines[this.lines.length - 1].length }; + } + + /* + * To figure out which line rangeIndex is on, determine the last index at which rangeIndex could + * be inserted into lineIndices to keep the list sorted. + */ + const lineNumber = lodash.sortedLastIndex(this.lineStartIndices, index); + + return { line: lineNumber, column: index - this.lineStartIndices[lineNumber - 1] }; + } + + /** + * Converts a (line, column) pair into a range index. + * @param {Object} loc A line/column location + * @param {number} loc.line The line number of the location (1-indexed) + * @param {number} loc.column The column number of the location (0-indexed) + * @returns {number} The range index of the location in the file. + * @public + */ + getIndexFromLoc(loc) { + if (typeof loc !== "object" || typeof loc.line !== "number" || typeof loc.column !== "number") { + throw new TypeError("Expected `loc` to be an object with numeric `line` and `column` properties."); + } + + if (loc.line <= 0) { + throw new RangeError(`Line number out of range (line ${loc.line} requested). Line numbers should be 1-based.`); + } + + if (loc.line > this.lineStartIndices.length) { + throw new RangeError(`Line number out of range (line ${loc.line} requested, but only ${this.lineStartIndices.length} lines present).`); + } + + const lineStartIndex = this.lineStartIndices[loc.line - 1]; + const lineEndIndex = loc.line === this.lineStartIndices.length ? this.text.length : this.lineStartIndices[loc.line]; + const positionIndex = lineStartIndex + loc.column; + + /* + * By design, getIndexFromLoc({ line: lineNum, column: 0 }) should return the start index of + * the given line, provided that the line number is valid element of this.lines. Since the + * last element of this.lines is an empty string for files with trailing newlines, add a + * special case where getting the index for the first location after the end of the file + * will return the length of the file, rather than throwing an error. This allows rules to + * use getIndexFromLoc consistently without worrying about edge cases at the end of a file. + */ + if ( + loc.line === this.lineStartIndices.length && positionIndex > lineEndIndex || + loc.line < this.lineStartIndices.length && positionIndex >= lineEndIndex + ) { + throw new RangeError(`Column number out of range (column ${loc.column} requested, but the length of line ${loc.line} is ${lineEndIndex - lineStartIndex}).`); + } + + return positionIndex; + } +} + +module.exports = SourceCode; diff --git a/node_modules/eslint/lib/util/traverser.js b/node_modules/eslint/lib/util/traverser.js new file mode 100644 index 0000000..79fb32f --- /dev/null +++ b/node_modules/eslint/lib/util/traverser.js @@ -0,0 +1,193 @@ +/** + * @fileoverview Traverser to traverse AST trees. + * @author Nicholas C. Zakas + * @author Toru Nagashima + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const vk = require("eslint-visitor-keys"); +const debug = require("debug")("eslint:traverser"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Do nothing. + * @returns {void} + */ +function noop() { + + // do nothing. +} + +/** + * Check whether the given value is an ASTNode or not. + * @param {any} x The value to check. + * @returns {boolean} `true` if the value is an ASTNode. + */ +function isNode(x) { + return x !== null && typeof x === "object" && typeof x.type === "string"; +} + +/** + * Get the visitor keys of a given node. + * @param {Object} visitorKeys The map of visitor keys. + * @param {ASTNode} node The node to get their visitor keys. + * @returns {string[]} The visitor keys of the node. + */ +function getVisitorKeys(visitorKeys, node) { + let keys = visitorKeys[node.type]; + + if (!keys) { + keys = vk.getKeys(node); + debug("Unknown node type \"%s\": Estimated visitor keys %j", node.type, keys); + } + + return keys; +} + +/** + * The traverser class to traverse AST trees. + */ +class Traverser { + constructor() { + this._current = null; + this._parents = []; + this._skipped = false; + this._broken = false; + this._visitorKeys = null; + this._enter = null; + this._leave = null; + } + + /** + * @returns {ASTNode} The current node. + */ + current() { + return this._current; + } + + /** + * @returns {ASTNode[]} The ancestor nodes. + */ + parents() { + return this._parents.slice(0); + } + + /** + * Break the current traversal. + * @returns {void} + */ + break() { + this._broken = true; + } + + /** + * Skip child nodes for the current traversal. + * @returns {void} + */ + skip() { + this._skipped = true; + } + + /** + * Traverse the given AST tree. + * @param {ASTNode} node The root node to traverse. + * @param {Object} options The option object. + * @param {Object} [options.visitorKeys=DEFAULT_VISITOR_KEYS] The keys of each node types to traverse child nodes. Default is `./default-visitor-keys.json`. + * @param {Function} [options.enter=noop] The callback function which is called on entering each node. + * @param {Function} [options.leave=noop] The callback function which is called on leaving each node. + * @returns {void} + */ + traverse(node, options) { + this._current = null; + this._parents = []; + this._skipped = false; + this._broken = false; + this._visitorKeys = options.visitorKeys || vk.KEYS; + this._enter = options.enter || noop; + this._leave = options.leave || noop; + this._traverse(node, null); + } + + /** + * Traverse the given AST tree recursively. + * @param {ASTNode} node The current node. + * @param {ASTNode|null} parent The parent node. + * @returns {void} + * @private + */ + _traverse(node, parent) { + if (!isNode(node)) { + return; + } + + this._current = node; + this._skipped = false; + this._enter(node, parent); + + if (!this._skipped && !this._broken) { + const keys = getVisitorKeys(this._visitorKeys, node); + + if (keys.length >= 1) { + this._parents.push(node); + for (let i = 0; i < keys.length && !this._broken; ++i) { + const child = node[keys[i]]; + + if (Array.isArray(child)) { + for (let j = 0; j < child.length && !this._broken; ++j) { + this._traverse(child[j], node); + } + } else { + this._traverse(child, node); + } + } + this._parents.pop(); + } + } + + if (!this._broken) { + this._leave(node, parent); + } + + this._current = parent; + } + + /** + * Calculates the keys to use for traversal. + * @param {ASTNode} node The node to read keys from. + * @returns {string[]} An array of keys to visit on the node. + * @private + */ + static getKeys(node) { + return vk.getKeys(node); + } + + /** + * Traverse the given AST tree. + * @param {ASTNode} node The root node to traverse. + * @param {Object} options The option object. + * @param {Object} [options.visitorKeys=DEFAULT_VISITOR_KEYS] The keys of each node types to traverse child nodes. Default is `./default-visitor-keys.json`. + * @param {Function} [options.enter=noop] The callback function which is called on entering each node. + * @param {Function} [options.leave=noop] The callback function which is called on leaving each node. + * @returns {void} + */ + static traverse(node, options) { + new Traverser().traverse(node, options); + } + + /** + * The default visitor keys. + * @type {Object} + */ + static get DEFAULT_VISITOR_KEYS() { + return vk.KEYS; + } +} + +module.exports = Traverser; diff --git a/node_modules/eslint/lib/util/xml-escape.js b/node_modules/eslint/lib/util/xml-escape.js new file mode 100644 index 0000000..9f43c99 --- /dev/null +++ b/node_modules/eslint/lib/util/xml-escape.js @@ -0,0 +1,34 @@ +/** + * @fileoverview XML character escaper + * @author George Chung + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Returns the escaped value for a character + * @param {string} s string to examine + * @returns {string} severity level + * @private + */ +module.exports = function(s) { + return (`${s}`).replace(/[<>&"'\x00-\x1F\x7F\u0080-\uFFFF]/g, c => { // eslint-disable-line no-control-regex + switch (c) { + case "<": + return "<"; + case ">": + return ">"; + case "&": + return "&"; + case "\"": + return """; + case "'": + return "'"; + default: + return `&#${c.charCodeAt(0)};`; + } + }); +}; diff --git a/node_modules/eslint/messages/extend-config-missing.txt b/node_modules/eslint/messages/extend-config-missing.txt new file mode 100644 index 0000000..38e6458 --- /dev/null +++ b/node_modules/eslint/messages/extend-config-missing.txt @@ -0,0 +1,3 @@ +ESLint couldn't find the config "<%- configName %>" to extend from. Please check that the name of the config is correct. + +If you still have problems, please stop by https://gitter.im/eslint/eslint to chat with the team. diff --git a/node_modules/eslint/messages/no-config-found.txt b/node_modules/eslint/messages/no-config-found.txt new file mode 100644 index 0000000..2f95c41 --- /dev/null +++ b/node_modules/eslint/messages/no-config-found.txt @@ -0,0 +1,7 @@ +ESLint couldn't find a configuration file. To set up a configuration file for this project, please run: + + eslint --init + +ESLint looked for configuration files in <%= directory %> and its ancestors. If it found none, it then looked in your home directory. + +If you think you already have a configuration file or if you need more help, please stop by the ESLint chat room: https://gitter.im/eslint/eslint diff --git a/node_modules/eslint/messages/plugin-missing.txt b/node_modules/eslint/messages/plugin-missing.txt new file mode 100644 index 0000000..00c7fe7 --- /dev/null +++ b/node_modules/eslint/messages/plugin-missing.txt @@ -0,0 +1,9 @@ +ESLint couldn't find the plugin "<%- pluginName %>". This can happen for a couple different reasons: + +1. If ESLint is installed globally, then make sure <%- pluginName %> is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin. + +2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following: + + npm i <%- pluginName %>@latest --save-dev + +If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team. diff --git a/node_modules/eslint/messages/whitespace-found.txt b/node_modules/eslint/messages/whitespace-found.txt new file mode 100644 index 0000000..eea4efc --- /dev/null +++ b/node_modules/eslint/messages/whitespace-found.txt @@ -0,0 +1,3 @@ +ESLint couldn't find the plugin "<%- pluginName %>". because there is whitespace in the name. Please check your configuration and remove all whitespace from the plugin name. + +If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team. diff --git a/node_modules/eslint/node_modules/.bin/mkdirp b/node_modules/eslint/node_modules/.bin/mkdirp new file mode 100644 index 0000000..4b00467 --- /dev/null +++ b/node_modules/eslint/node_modules/.bin/mkdirp @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../mkdirp/bin/cmd.js" "$@" + ret=$? +else + node "$basedir/../mkdirp/bin/cmd.js" "$@" + ret=$? +fi +exit $ret diff --git a/node_modules/eslint/node_modules/.bin/mkdirp.cmd b/node_modules/eslint/node_modules/.bin/mkdirp.cmd new file mode 100644 index 0000000..0d2cdd7 --- /dev/null +++ b/node_modules/eslint/node_modules/.bin/mkdirp.cmd @@ -0,0 +1,7 @@ +@IF EXIST "%~dp0\node.exe" ( + "%~dp0\node.exe" "%~dp0\..\mkdirp\bin\cmd.js" %* +) ELSE ( + @SETLOCAL + @SET PATHEXT=%PATHEXT:;.JS;=;% + node "%~dp0\..\mkdirp\bin\cmd.js" %* +) \ No newline at end of file diff --git a/node_modules/eslint/node_modules/ajv/.tonic_example.js b/node_modules/eslint/node_modules/ajv/.tonic_example.js new file mode 100644 index 0000000..aa11812 --- /dev/null +++ b/node_modules/eslint/node_modules/ajv/.tonic_example.js @@ -0,0 +1,20 @@ +var Ajv = require('ajv'); +var ajv = new Ajv({allErrors: true}); + +var schema = { + "properties": { + "foo": { "type": "string" }, + "bar": { "type": "number", "maximum": 3 } + } +}; + +var validate = ajv.compile(schema); + +test({"foo": "abc", "bar": 2}); +test({"foo": 2, "bar": 4}); + +function test(data) { + var valid = validate(data); + if (valid) console.log('Valid!'); + else console.log('Invalid: ' + ajv.errorsText(validate.errors)); +} \ No newline at end of file diff --git a/node_modules/eslint/node_modules/ajv/LICENSE b/node_modules/eslint/node_modules/ajv/LICENSE new file mode 100644 index 0000000..8105396 --- /dev/null +++ b/node_modules/eslint/node_modules/ajv/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Evgeny Poberezkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/node_modules/eslint/node_modules/ajv/README.md b/node_modules/eslint/node_modules/ajv/README.md new file mode 100644 index 0000000..387c81d --- /dev/null +++ b/node_modules/eslint/node_modules/ajv/README.md @@ -0,0 +1,1327 @@ +Ajv logo + +# Ajv: Another JSON Schema Validator + +The fastest JSON Schema validator for Node.js and browser with draft 6 support. + + +[![Build Status](https://travis-ci.org/epoberezkin/ajv.svg?branch=master)](https://travis-ci.org/epoberezkin/ajv) +[![npm version](https://badge.fury.io/js/ajv.svg)](https://www.npmjs.com/package/ajv) +[![npm@beta](https://img.shields.io/npm/v/ajv/beta.svg)](https://github.com/epoberezkin/ajv/tree/beta) +[![npm downloads](https://img.shields.io/npm/dm/ajv.svg)](https://www.npmjs.com/package/ajv) +[![Coverage Status](https://coveralls.io/repos/epoberezkin/ajv/badge.svg?branch=master&service=github)](https://coveralls.io/github/epoberezkin/ajv?branch=master) +[![Greenkeeper badge](https://badges.greenkeeper.io/epoberezkin/ajv.svg)](https://greenkeeper.io/) +[![Gitter](https://img.shields.io/gitter/room/ajv-validator/ajv.svg)](https://gitter.im/ajv-validator/ajv) + + +__Please note__: Ajv [version 6](https://github.com/epoberezkin/ajv/tree/beta) with [JSON Schema draft-07](http://json-schema.org/work-in-progress) support is released. Use `npm install ajv@beta` to install. + + +## Using version 5 + +[JSON Schema draft-06](https://trac.tools.ietf.org/html/draft-wright-json-schema-validation-01) is published. + +[Ajv version 5.0.0](https://github.com/epoberezkin/ajv/releases/tag/5.0.0) that supports draft-06 is released. It may require either migrating your schemas or updating your code (to continue using draft-04 and v5 schemas). + +__Please note__: To use Ajv with draft-04 schemas you need to explicitly add meta-schema to the validator instance: + +```javascript +ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json')); +``` + + +## Contents + +- [Performance](#performance) +- [Features](#features) +- [Getting started](#getting-started) +- [Frequently Asked Questions](https://github.com/epoberezkin/ajv/blob/master/FAQ.md) +- [Using in browser](#using-in-browser) +- [Command line interface](#command-line-interface) +- Validation + - [Keywords](#validation-keywords) + - [Formats](#formats) + - [Combining schemas with $ref](#ref) + - [$data reference](#data-reference) + - NEW: [$merge and $patch keywords](#merge-and-patch-keywords) + - [Defining custom keywords](#defining-custom-keywords) + - [Asynchronous schema compilation](#asynchronous-schema-compilation) + - [Asynchronous validation](#asynchronous-validation) +- Modifying data during validation + - [Filtering data](#filtering-data) + - [Assigning defaults](#assigning-defaults) + - [Coercing data types](#coercing-data-types) +- API + - [Methods](#api) + - [Options](#options) + - [Validation errors](#validation-errors) +- [Related packages](#related-packages) +- [Packages using Ajv](#some-packages-using-ajv) +- [Tests, Contributing, History, License](#tests) + + +## Performance + +Ajv generates code using [doT templates](https://github.com/olado/doT) to turn JSON schemas into super-fast validation functions that are efficient for v8 optimization. + +Currently Ajv is the fastest and the most standard compliant validator according to these benchmarks: + +- [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark) - 50% faster than the second place +- [jsck benchmark](https://github.com/pandastrike/jsck#benchmarks) - 20-190% faster +- [z-schema benchmark](https://rawgit.com/zaggino/z-schema/master/benchmark/results.html) +- [themis benchmark](https://cdn.rawgit.com/playlyfe/themis/master/benchmark/results.html) + + +Performance of different validators by [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark): + +[![performance](https://chart.googleapis.com/chart?chxt=x,y&cht=bhs&chco=76A4FB&chls=2.0&chbh=32,4,1&chs=600x416&chxl=-1:|djv|ajv|json-schema-validator-generator|jsen|is-my-json-valid|themis|z-schema|jsck|skeemas|json-schema-library|tv4&chd=t:100,98,72.1,66.8,50.1,15.1,6.1,3.8,1.2,0.7,0.2)](https://github.com/ebdrup/json-schema-benchmark/blob/master/README.md#performance) + + +## Features + +- Ajv implements full JSON Schema [draft 6](http://json-schema.org/) and draft 4 standards: + - all validation keywords (see [JSON Schema validation keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md)) + - full support of remote refs (remote schemas have to be added with `addSchema` or compiled to be available) + - support of circular references between schemas + - correct string lengths for strings with unicode pairs (can be turned off) + - [formats](#formats) defined by JSON Schema draft 4 standard and custom formats (can be turned off) + - [validates schemas against meta-schema](#api-validateschema) +- supports [browsers](#using-in-browser) and Node.js 0.10-8.x +- [asynchronous loading](#asynchronous-schema-compilation) of referenced schemas during compilation +- "All errors" validation mode with [option allErrors](#options) +- [error messages with parameters](#validation-errors) describing error reasons to allow creating custom error messages +- i18n error messages support with [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) package +- [filtering data](#filtering-data) from additional properties +- [assigning defaults](#assigning-defaults) to missing properties and items +- [coercing data](#coercing-data-types) to the types specified in `type` keywords +- [custom keywords](#defining-custom-keywords) +- draft-6 keywords `const`, `contains` and `propertyNames` +- draft-6 boolean schemas (`true`/`false` as a schema to always pass/fail). +- keywords `switch`, `patternRequired`, `formatMaximum` / `formatMinimum` and `formatExclusiveMaximum` / `formatExclusiveMinimum` from [JSON-schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) with [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package +- [$data reference](#data-reference) to use values from the validated data as values for the schema keywords +- [asynchronous validation](#asynchronous-validation) of custom formats and keywords + +Currently Ajv is the only validator that passes all the tests from [JSON Schema Test Suite](https://github.com/json-schema/JSON-Schema-Test-Suite) (according to [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark), apart from the test that requires that `1.0` is not an integer that is impossible to satisfy in JavaScript). + + +## Install + +``` +npm install ajv +``` + +or to install [version 6](https://github.com/epoberezkin/ajv/tree/beta): + +``` +npm install ajv@beta +``` + + +## Getting started + +Try it in the Node.js REPL: https://tonicdev.com/npm/ajv + + +The fastest validation call: + +```javascript +var Ajv = require('ajv'); +var ajv = new Ajv(); // options can be passed, e.g. {allErrors: true} +var validate = ajv.compile(schema); +var valid = validate(data); +if (!valid) console.log(validate.errors); +``` + +or with less code + +```javascript +// ... +var valid = ajv.validate(schema, data); +if (!valid) console.log(ajv.errors); +// ... +``` + +or + +```javascript +// ... +var valid = ajv.addSchema(schema, 'mySchema') + .validate('mySchema', data); +if (!valid) console.log(ajv.errorsText()); +// ... +``` + +See [API](#api) and [Options](#options) for more details. + +Ajv compiles schemas to functions and caches them in all cases (using schema serialized with [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) or a custom function as a key), so that the next time the same schema is used (not necessarily the same object instance) it won't be compiled again. + +The best performance is achieved when using compiled functions returned by `compile` or `getSchema` methods (there is no additional function call). + +__Please note__: every time a validation function or `ajv.validate` are called `errors` property is overwritten. You need to copy `errors` array reference to another variable if you want to use it later (e.g., in the callback). See [Validation errors](#validation-errors) + + +## Using in browser + +You can require Ajv directly from the code you browserify - in this case Ajv will be a part of your bundle. + +If you need to use Ajv in several bundles you can create a separate UMD bundle using `npm run bundle` script (thanks to [siddo420](https://github.com/siddo420)). + +Then you need to load Ajv in the browser: +```html + +``` + +This bundle can be used with different module systems; it creates global `Ajv` if no module system is found. + +The browser bundle is available on [cdnjs](https://cdnjs.com/libraries/ajv). + +Ajv is tested with these browsers: + +[![Sauce Test Status](https://saucelabs.com/browser-matrix/epoberezkin.svg)](https://saucelabs.com/u/epoberezkin) + +__Please note__: some frameworks, e.g. Dojo, may redefine global require in such way that is not compatible with CommonJS module format. In such case Ajv bundle has to be loaded before the framework and then you can use global Ajv (see issue [#234](https://github.com/epoberezkin/ajv/issues/234)). + + +## Command line interface + +CLI is available as a separate npm package [ajv-cli](https://github.com/jessedc/ajv-cli). It supports: + +- compiling JSON-schemas to test their validity +- BETA: generating standalone module exporting a validation function to be used without Ajv (using [ajv-pack](https://github.com/epoberezkin/ajv-pack)) +- migrate schemas to draft-06 (using [json-schema-migrate](https://github.com/epoberezkin/json-schema-migrate)) +- validating data file(s) against JSON-schema +- testing expected validity of data against JSON-schema +- referenced schemas +- custom meta-schemas +- files in JSON and JavaScript format +- all Ajv options +- reporting changes in data after validation in [JSON-patch](https://tools.ietf.org/html/rfc6902) format + + +## Validation keywords + +Ajv supports all validation keywords from draft 4 of JSON-schema standard: + +- [type](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#type) +- [for numbers](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-numbers) - maximum, minimum, exclusiveMaximum, exclusiveMinimum, multipleOf +- [for strings](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-strings) - maxLength, minLength, pattern, format +- [for arrays](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-arrays) - maxItems, minItems, uniqueItems, items, additionalItems, [contains](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#contains) +- [for objects](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-objects) - maxProperties, minProperties, required, properties, patternProperties, additionalProperties, dependencies, [propertyNames](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#propertynames) +- [for all types](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-all-types) - enum, [const](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#const) +- [compound keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#compound-keywords) - not, oneOf, anyOf, allOf + +With [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package Ajv also supports validation keywords from [JSON Schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) for JSON-schema standard: + +- [switch](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#switch-proposed) - conditional validation with a sequence of if/then clauses +- [patternRequired](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#patternrequired-proposed) - like `required` but with patterns that some property should match. +- [formatMaximum, formatMinimum, formatExclusiveMaximum, formatExclusiveMinimum](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#formatmaximum--formatminimum-and-exclusiveformatmaximum--exclusiveformatminimum-proposed) - setting limits for date, time, etc. + +See [JSON Schema validation keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md) for more details. + + +## Formats + +The following formats are supported for string validation with "format" keyword: + +- _date_: full-date according to [RFC3339](http://tools.ietf.org/html/rfc3339#section-5.6). +- _time_: time with optional time-zone. +- _date-time_: date-time from the same source (time-zone is mandatory). `date`, `time` and `date-time` validate ranges in `full` mode and only regexp in `fast` mode (see [options](#options)). +- _uri_: full uri with optional protocol. +- _url_: [URL record](https://url.spec.whatwg.org/#concept-url). +- _uri-template_: URI template according to [RFC6570](https://tools.ietf.org/html/rfc6570) +- _email_: email address. +- _hostname_: host name according to [RFC1034](http://tools.ietf.org/html/rfc1034#section-3.5). +- _ipv4_: IP address v4. +- _ipv6_: IP address v6. +- _regex_: tests whether a string is a valid regular expression by passing it to RegExp constructor. +- _uuid_: Universally Unique IDentifier according to [RFC4122](http://tools.ietf.org/html/rfc4122). +- _json-pointer_: JSON-pointer according to [RFC6901](https://tools.ietf.org/html/rfc6901). +- _relative-json-pointer_: relative JSON-pointer according to [this draft](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00). + +There are two modes of format validation: `fast` and `full`. This mode affects formats `date`, `time`, `date-time`, `uri`, `email`, and `hostname`. See [Options](#options) for details. + +You can add additional formats and replace any of the formats above using [addFormat](#api-addformat) method. + +The option `unknownFormats` allows changing the default behaviour when an unknown format is encountered. In this case Ajv can either fail schema compilation (default) or ignore it (default in versions before 5.0.0). You also can whitelist specific format(s) to be ignored. See [Options](#options) for details. + +You can find patterns used for format validation and the sources that were used in [formats.js](https://github.com/epoberezkin/ajv/blob/master/lib/compile/formats.js). + + +## Combining schemas with $ref + +You can structure your validation logic across multiple schema files and have schemas reference each other using `$ref` keyword. + +Example: + +```javascript +var schema = { + "$id": "http://example.com/schemas/schema.json", + "type": "object", + "properties": { + "foo": { "$ref": "defs.json#/definitions/int" }, + "bar": { "$ref": "defs.json#/definitions/str" } + } +}; + +var defsSchema = { + "$id": "http://example.com/schemas/defs.json", + "definitions": { + "int": { "type": "integer" }, + "str": { "type": "string" } + } +}; +``` + +Now to compile your schema you can either pass all schemas to Ajv instance: + +```javascript +var ajv = new Ajv({schemas: [schema, defsSchema]}); +var validate = ajv.getSchema('http://example.com/schemas/schema.json'); +``` + +or use `addSchema` method: + +```javascript +var ajv = new Ajv; +var validate = ajv.addSchema(defsSchema) + .compile(schema); +``` + +See [Options](#options) and [addSchema](#api) method. + +__Please note__: +- `$ref` is resolved as the uri-reference using schema $id as the base URI (see the example). +- References can be recursive (and mutually recursive) to implement the schemas for different data structures (such as linked lists, trees, graphs, etc.). +- You don't have to host your schema files at the URIs that you use as schema $id. These URIs are only used to identify the schemas, and according to JSON Schema specification validators should not expect to be able to download the schemas from these URIs. +- The actual location of the schema file in the file system is not used. +- You can pass the identifier of the schema as the second parameter of `addSchema` method or as a property name in `schemas` option. This identifier can be used instead of (or in addition to) schema $id. +- You cannot have the same $id (or the schema identifier) used for more than one schema - the exception will be thrown. +- You can implement dynamic resolution of the referenced schemas using `compileAsync` method. In this way you can store schemas in any system (files, web, database, etc.) and reference them without explicitly adding to Ajv instance. See [Asynchronous schema compilation](#asynchronous-schema-compilation). + + +## $data reference + +With `$data` option you can use values from the validated data as the values for the schema keywords. See [proposal](https://github.com/json-schema/json-schema/wiki/$data-(v5-proposal)) for more information about how it works. + +`$data` reference is supported in the keywords: const, enum, format, maximum/minimum, exclusiveMaximum / exclusiveMinimum, maxLength / minLength, maxItems / minItems, maxProperties / minProperties, formatMaximum / formatMinimum, formatExclusiveMaximum / formatExclusiveMinimum, multipleOf, pattern, required, uniqueItems. + +The value of "$data" should be a [JSON-pointer](https://tools.ietf.org/html/rfc6901) to the data (the root is always the top level data object, even if the $data reference is inside a referenced subschema) or a [relative JSON-pointer](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00) (it is relative to the current point in data; if the $data reference is inside a referenced subschema it cannot point to the data outside of the root level for this subschema). + +Examples. + +This schema requires that the value in property `smaller` is less or equal than the value in the property larger: + +```javascript +var ajv = new Ajv({$data: true}); + +var schema = { + "properties": { + "smaller": { + "type": "number", + "maximum": { "$data": "1/larger" } + }, + "larger": { "type": "number" } + } +}; + +var validData = { + smaller: 5, + larger: 7 +}; + +ajv.validate(schema, validData); // true +``` + +This schema requires that the properties have the same format as their field names: + +```javascript +var schema = { + "additionalProperties": { + "type": "string", + "format": { "$data": "0#" } + } +}; + +var validData = { + 'date-time': '1963-06-19T08:30:06.283185Z', + email: 'joe.bloggs@example.com' +} +``` + +`$data` reference is resolved safely - it won't throw even if some property is undefined. If `$data` resolves to `undefined` the validation succeeds (with the exclusion of `const` keyword). If `$data` resolves to incorrect type (e.g. not "number" for maximum keyword) the validation fails. + + +## $merge and $patch keywords + +With the package [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) you can use the keywords `$merge` and `$patch` that allow extending JSON-schemas with patches using formats [JSON Merge Patch (RFC 7396)](https://tools.ietf.org/html/rfc7396) and [JSON Patch (RFC 6902)](https://tools.ietf.org/html/rfc6902). + +To add keywords `$merge` and `$patch` to Ajv instance use this code: + +```javascript +require('ajv-merge-patch')(ajv); +``` + +Examples. + +Using `$merge`: + +```json +{ + "$merge": { + "source": { + "type": "object", + "properties": { "p": { "type": "string" } }, + "additionalProperties": false + }, + "with": { + "properties": { "q": { "type": "number" } } + } + } +} +``` + +Using `$patch`: + +```json +{ + "$patch": { + "source": { + "type": "object", + "properties": { "p": { "type": "string" } }, + "additionalProperties": false + }, + "with": [ + { "op": "add", "path": "/properties/q", "value": { "type": "number" } } + ] + } +} +``` + +The schemas above are equivalent to this schema: + +```json +{ + "type": "object", + "properties": { + "p": { "type": "string" }, + "q": { "type": "number" } + }, + "additionalProperties": false +} +``` + +The properties `source` and `with` in the keywords `$merge` and `$patch` can use absolute or relative `$ref` to point to other schemas previously added to the Ajv instance or to the fragments of the current schema. + +See the package [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) for more information. + + +## Defining custom keywords + +The advantages of using custom keywords are: + +- allow creating validation scenarios that cannot be expressed using JSON Schema +- simplify your schemas +- help bringing a bigger part of the validation logic to your schemas +- make your schemas more expressive, less verbose and closer to your application domain +- implement custom data processors that modify your data (`modifying` option MUST be used in keyword definition) and/or create side effects while the data is being validated + +If a keyword is used only for side-effects and its validation result is pre-defined, use option `valid: true/false` in keyword definition to simplify both generated code (no error handling in case of `valid: true`) and your keyword functions (no need to return any validation result). + +The concerns you have to be aware of when extending JSON-schema standard with custom keywords are the portability and understanding of your schemas. You will have to support these custom keywords on other platforms and to properly document these keywords so that everybody can understand them in your schemas. + +You can define custom keywords with [addKeyword](#api-addkeyword) method. Keywords are defined on the `ajv` instance level - new instances will not have previously defined keywords. + +Ajv allows defining keywords with: +- validation function +- compilation function +- macro function +- inline compilation function that should return code (as string) that will be inlined in the currently compiled schema. + +Example. `range` and `exclusiveRange` keywords using compiled schema: + +```javascript +ajv.addKeyword('range', { + type: 'number', + compile: function (sch, parentSchema) { + var min = sch[0]; + var max = sch[1]; + + return parentSchema.exclusiveRange === true + ? function (data) { return data > min && data < max; } + : function (data) { return data >= min && data <= max; } + } +}); + +var schema = { "range": [2, 4], "exclusiveRange": true }; +var validate = ajv.compile(schema); +console.log(validate(2.01)); // true +console.log(validate(3.99)); // true +console.log(validate(2)); // false +console.log(validate(4)); // false +``` + +Several custom keywords (typeof, instanceof, range and propertyNames) are defined in [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package - they can be used for your schemas and as a starting point for your own custom keywords. + +See [Defining custom keywords](https://github.com/epoberezkin/ajv/blob/master/CUSTOM.md) for more details. + + +## Asynchronous schema compilation + +During asynchronous compilation remote references are loaded using supplied function. See `compileAsync` [method](#api-compileAsync) and `loadSchema` [option](#options). + +Example: + +```javascript +var ajv = new Ajv({ loadSchema: loadSchema }); + +ajv.compileAsync(schema).then(function (validate) { + var valid = validate(data); + // ... +}); + +function loadSchema(uri) { + return request.json(uri).then(function (res) { + if (res.statusCode >= 400) + throw new Error('Loading error: ' + res.statusCode); + return res.body; + }); +} +``` + +__Please note__: [Option](#options) `missingRefs` should NOT be set to `"ignore"` or `"fail"` for asynchronous compilation to work. + + +## Asynchronous validation + +Example in Node.js REPL: https://tonicdev.com/esp/ajv-asynchronous-validation + +You can define custom formats and keywords that perform validation asynchronously by accessing database or some other service. You should add `async: true` in the keyword or format definition (see [addFormat](#api-addformat), [addKeyword](#api-addkeyword) and [Defining custom keywords](#defining-custom-keywords)). + +If your schema uses asynchronous formats/keywords or refers to some schema that contains them it should have `"$async": true` keyword so that Ajv can compile it correctly. If asynchronous format/keyword or reference to asynchronous schema is used in the schema without `$async` keyword Ajv will throw an exception during schema compilation. + +__Please note__: all asynchronous subschemas that are referenced from the current or other schemas should have `"$async": true` keyword as well, otherwise the schema compilation will fail. + +Validation function for an asynchronous custom format/keyword should return a promise that resolves with `true` or `false` (or rejects with `new Ajv.ValidationError(errors)` if you want to return custom errors from the keyword function). Ajv compiles asynchronous schemas to either [es7 async functions](http://tc39.github.io/ecmascript-asyncawait/) that can optionally be transpiled with [nodent](https://github.com/MatAtBread/nodent) or with [regenerator](https://github.com/facebook/regenerator) or to [generator functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*) that can be optionally transpiled with regenerator as well. You can also supply any other transpiler as a function. See [Options](#options). + +The compiled validation function has `$async: true` property (if the schema is asynchronous), so you can differentiate these functions if you are using both synchronous and asynchronous schemas. + +If you are using generators, the compiled validation function can be either wrapped with [co](https://github.com/tj/co) (default) or returned as generator function, that can be used directly, e.g. in [koa](http://koajs.com/) 1.0. `co` is a small library, it is included in Ajv (both as npm dependency and in the browser bundle). + +Async functions are currently supported in Chrome 55, Firefox 52, Node.js 7 (with --harmony-async-await) and MS Edge 13 (with flag). + +Generator functions are currently supported in Chrome, Firefox and Node.js. + +If you are using Ajv in other browsers or in older versions of Node.js you should use one of available transpiling options. All provided async modes use global Promise class. If your platform does not have Promise you should use a polyfill that defines it. + +Validation result will be a promise that resolves with validated data or rejects with an exception `Ajv.ValidationError` that contains the array of validation errors in `errors` property. + + +Example: + +```javascript +/** + * Default mode is non-transpiled generator function wrapped with `co`. + * Using package ajv-async (https://github.com/epoberezkin/ajv-async) + * you can auto-detect the best async mode. + * In this case, without "async" and "transpile" options + * (or with option {async: true}) + * Ajv will choose the first supported/installed option in this order: + * 1. native async function + * 2. native generator function wrapped with co + * 3. es7 async functions transpiled with nodent + * 4. es7 async functions transpiled with regenerator + */ + +var setupAsync = require('ajv-async'); +var ajv = setupAsync(new Ajv); + +ajv.addKeyword('idExists', { + async: true, + type: 'number', + validate: checkIdExists +}); + + +function checkIdExists(schema, data) { + return knex(schema.table) + .select('id') + .where('id', data) + .then(function (rows) { + return !!rows.length; // true if record is found + }); +} + +var schema = { + "$async": true, + "properties": { + "userId": { + "type": "integer", + "idExists": { "table": "users" } + }, + "postId": { + "type": "integer", + "idExists": { "table": "posts" } + } + } +}; + +var validate = ajv.compile(schema); + +validate({ userId: 1, postId: 19 }) +.then(function (data) { + console.log('Data is valid', data); // { userId: 1, postId: 19 } +}) +.catch(function (err) { + if (!(err instanceof Ajv.ValidationError)) throw err; + // data is invalid + console.log('Validation errors:', err.errors); +}); +``` + +### Using transpilers with asynchronous validation functions. + +To use a transpiler you should separately install it (or load its bundle in the browser). + +Ajv npm package includes minified browser bundles of regenerator and nodent in dist folder. + + +#### Using nodent + +```javascript +var setupAsync = require('ajv-async'); +var ajv = new Ajv({ /* async: 'es7', */ transpile: 'nodent' }); +setupAsync(ajv); +var validate = ajv.compile(schema); // transpiled es7 async function +validate(data).then(successFunc).catch(errorFunc); +``` + +`npm install nodent` or use `nodent.min.js` from dist folder of npm package. + + +#### Using regenerator + +```javascript +var setupAsync = require('ajv-async'); +var ajv = new Ajv({ /* async: 'es7', */ transpile: 'regenerator' }); +setupAsync(ajv); +var validate = ajv.compile(schema); // transpiled es7 async function +validate(data).then(successFunc).catch(errorFunc); +``` + +`npm install regenerator` or use `regenerator.min.js` from dist folder of npm package. + + +#### Using other transpilers + +```javascript +var ajv = new Ajv({ async: 'es7', processCode: transpileFunc }); +var validate = ajv.compile(schema); // transpiled es7 async function +validate(data).then(successFunc).catch(errorFunc); +``` + +See [Options](#options). + + +#### Comparison of async modes + +|mode|transpile
speed*|run-time
speed*|bundle
size| +|---|:-:|:-:|:-:| +|es7 async
(native)|-|0.75|-| +|generators
(native)|-|1.0|-| +|es7.nodent|1.35|1.1|215Kb| +|es7.regenerator|1.0|2.7|1109Kb| +|regenerator|1.0|3.2|1109Kb| + +\* Relative performance in Node.js 7.x — smaller is better. + +[nodent](https://github.com/MatAtBread/nodent) has several advantages: + +- much smaller browser bundle than regenerator +- almost the same performance of generated code as native generators in Node.js and the latest Chrome +- much better performance than native generators in other browsers +- works in IE 9 (regenerator does not) + + +## Filtering data + +With [option `removeAdditional`](#options) (added by [andyscott](https://github.com/andyscott)) you can filter data during the validation. + +This option modifies original data. + +Example: + +```javascript +var ajv = new Ajv({ removeAdditional: true }); +var schema = { + "additionalProperties": false, + "properties": { + "foo": { "type": "number" }, + "bar": { + "additionalProperties": { "type": "number" }, + "properties": { + "baz": { "type": "string" } + } + } + } +} + +var data = { + "foo": 0, + "additional1": 1, // will be removed; `additionalProperties` == false + "bar": { + "baz": "abc", + "additional2": 2 // will NOT be removed; `additionalProperties` != false + }, +} + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // { "foo": 0, "bar": { "baz": "abc", "additional2": 2 } +``` + +If `removeAdditional` option in the example above were `"all"` then both `additional1` and `additional2` properties would have been removed. + +If the option were `"failing"` then property `additional1` would have been removed regardless of its value and property `additional2` would have been removed only if its value were failing the schema in the inner `additionalProperties` (so in the example above it would have stayed because it passes the schema, but any non-number would have been removed). + +__Please note__: If you use `removeAdditional` option with `additionalProperties` keyword inside `anyOf`/`oneOf` keywords your validation can fail with this schema, for example: + +```json +{ + "type": "object", + "oneOf": [ + { + "properties": { + "foo": { "type": "string" } + }, + "required": [ "foo" ], + "additionalProperties": false + }, + { + "properties": { + "bar": { "type": "integer" } + }, + "required": [ "bar" ], + "additionalProperties": false + } + ] +} +``` + +The intention of the schema above is to allow objects with either the string property "foo" or the integer property "bar", but not with both and not with any other properties. + +With the option `removeAdditional: true` the validation will pass for the object `{ "foo": "abc"}` but will fail for the object `{"bar": 1}`. It happens because while the first subschema in `oneOf` is validated, the property `bar` is removed because it is an additional property according to the standard (because it is not included in `properties` keyword in the same schema). + +While this behaviour is unexpected (issues [#129](https://github.com/epoberezkin/ajv/issues/129), [#134](https://github.com/epoberezkin/ajv/issues/134)), it is correct. To have the expected behaviour (both objects are allowed and additional properties are removed) the schema has to be refactored in this way: + +```json +{ + "type": "object", + "properties": { + "foo": { "type": "string" }, + "bar": { "type": "integer" } + }, + "additionalProperties": false, + "oneOf": [ + { "required": [ "foo" ] }, + { "required": [ "bar" ] } + ] +} +``` + +The schema above is also more efficient - it will compile into a faster function. + + +## Assigning defaults + +With [option `useDefaults`](#options) Ajv will assign values from `default` keyword in the schemas of `properties` and `items` (when it is the array of schemas) to the missing properties and items. + +This option modifies original data. + +__Please note__: by default the default value is inserted in the generated validation code as a literal (starting from v4.0), so the value inserted in the data will be the deep clone of the default in the schema. + +If you need to insert the default value in the data by reference pass the option `useDefaults: "shared"`. + +Inserting defaults by reference can be faster (in case you have an object in `default`) and it allows to have dynamic values in defaults, e.g. timestamp, without recompiling the schema. The side effect is that modifying the default value in any validated data instance will change the default in the schema and in other validated data instances. See example 3 below. + + +Example 1 (`default` in `properties`): + +```javascript +var ajv = new Ajv({ useDefaults: true }); +var schema = { + "type": "object", + "properties": { + "foo": { "type": "number" }, + "bar": { "type": "string", "default": "baz" } + }, + "required": [ "foo", "bar" ] +}; + +var data = { "foo": 1 }; + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // { "foo": 1, "bar": "baz" } +``` + +Example 2 (`default` in `items`): + +```javascript +var schema = { + "type": "array", + "items": [ + { "type": "number" }, + { "type": "string", "default": "foo" } + ] +} + +var data = [ 1 ]; + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // [ 1, "foo" ] +``` + +Example 3 (inserting "defaults" by reference): + +```javascript +var ajv = new Ajv({ useDefaults: 'shared' }); + +var schema = { + properties: { + foo: { + default: { bar: 1 } + } + } +} + +var validate = ajv.compile(schema); + +var data = {}; +console.log(validate(data)); // true +console.log(data); // { foo: { bar: 1 } } + +data.foo.bar = 2; + +var data2 = {}; +console.log(validate(data2)); // true +console.log(data2); // { foo: { bar: 2 } } +``` + +`default` keywords in other cases are ignored: + +- not in `properties` or `items` subschemas +- in schemas inside `anyOf`, `oneOf` and `not` (see [#42](https://github.com/epoberezkin/ajv/issues/42)) +- in `if` subschema of `switch` keyword +- in schemas generated by custom macro keywords + + +## Coercing data types + +When you are validating user inputs all your data properties are usually strings. The option `coerceTypes` allows you to have your data types coerced to the types specified in your schema `type` keywords, both to pass the validation and to use the correctly typed data afterwards. + +This option modifies original data. + +__Please note__: if you pass a scalar value to the validating function its type will be coerced and it will pass the validation, but the value of the variable you pass won't be updated because scalars are passed by value. + + +Example 1: + +```javascript +var ajv = new Ajv({ coerceTypes: true }); +var schema = { + "type": "object", + "properties": { + "foo": { "type": "number" }, + "bar": { "type": "boolean" } + }, + "required": [ "foo", "bar" ] +}; + +var data = { "foo": "1", "bar": "false" }; + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // { "foo": 1, "bar": false } +``` + +Example 2 (array coercions): + +```javascript +var ajv = new Ajv({ coerceTypes: 'array' }); +var schema = { + "properties": { + "foo": { "type": "array", "items": { "type": "number" } }, + "bar": { "type": "boolean" } + } +}; + +var data = { "foo": "1", "bar": ["false"] }; + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // { "foo": [1], "bar": false } +``` + +The coercion rules, as you can see from the example, are different from JavaScript both to validate user input as expected and to have the coercion reversible (to correctly validate cases where different types are defined in subschemas of "anyOf" and other compound keywords). + +See [Coercion rules](https://github.com/epoberezkin/ajv/blob/master/COERCION.md) for details. + + +## API + +##### new Ajv(Object options) -> Object + +Create Ajv instance. + + +##### .compile(Object schema) -> Function<Object data> + +Generate validating function and cache the compiled schema for future use. + +Validating function returns boolean and has properties `errors` with the errors from the last validation (`null` if there were no errors) and `schema` with the reference to the original schema. + +Unless the option `validateSchema` is false, the schema will be validated against meta-schema and if schema is invalid the error will be thrown. See [options](#options). + + +##### .compileAsync(Object schema [, Boolean meta] [, Function callback]) -> Promise + +Asynchronous version of `compile` method that loads missing remote schemas using asynchronous function in `options.loadSchema`. This function returns a Promise that resolves to a validation function. An optional callback passed to `compileAsync` will be called with 2 parameters: error (or null) and validating function. The returned promise will reject (and the callback will be called with an error) when: + +- missing schema can't be loaded (`loadSchema` returns a Promise that rejects). +- a schema containing a missing reference is loaded, but the reference cannot be resolved. +- schema (or some loaded/referenced schema) is invalid. + +The function compiles schema and loads the first missing schema (or meta-schema) until all missing schemas are loaded. + +You can asynchronously compile meta-schema by passing `true` as the second parameter. + +See example in [Asynchronous compilation](#asynchronous-schema-compilation). + + +##### .validate(Object schema|String key|String ref, data) -> Boolean + +Validate data using passed schema (it will be compiled and cached). + +Instead of the schema you can use the key that was previously passed to `addSchema`, the schema id if it was present in the schema or any previously resolved reference. + +Validation errors will be available in the `errors` property of Ajv instance (`null` if there were no errors). + +__Please note__: every time this method is called the errors are overwritten so you need to copy them to another variable if you want to use them later. + +If the schema is asynchronous (has `$async` keyword on the top level) this method returns a Promise. See [Asynchronous validation](#asynchronous-validation). + + +##### .addSchema(Array<Object>|Object schema [, String key]) -> Ajv + +Add schema(s) to validator instance. This method does not compile schemas (but it still validates them). Because of that dependencies can be added in any order and circular dependencies are supported. It also prevents unnecessary compilation of schemas that are containers for other schemas but not used as a whole. + +Array of schemas can be passed (schemas should have ids), the second parameter will be ignored. + +Key can be passed that can be used to reference the schema and will be used as the schema id if there is no id inside the schema. If the key is not passed, the schema id will be used as the key. + + +Once the schema is added, it (and all the references inside it) can be referenced in other schemas and used to validate data. + +Although `addSchema` does not compile schemas, explicit compilation is not required - the schema will be compiled when it is used first time. + +By default the schema is validated against meta-schema before it is added, and if the schema does not pass validation the exception is thrown. This behaviour is controlled by `validateSchema` option. + +__Please note__: Ajv uses the [method chaining syntax](https://en.wikipedia.org/wiki/Method_chaining) for all methods with the prefix `add*` and `remove*`. +This allows you to do nice things like the following. + +```javascript +var validate = new Ajv().addSchema(schema).addFormat(name, regex).getSchema(uri); +``` + +##### .addMetaSchema(Array<Object>|Object schema [, String key]) -> Ajv + +Adds meta schema(s) that can be used to validate other schemas. That function should be used instead of `addSchema` because there may be instance options that would compile a meta schema incorrectly (at the moment it is `removeAdditional` option). + +There is no need to explicitly add draft 6 meta schema (http://json-schema.org/draft-06/schema and http://json-schema.org/schema) - it is added by default, unless option `meta` is set to `false`. You only need to use it if you have a changed meta-schema that you want to use to validate your schemas. See `validateSchema`. + + +##### .validateSchema(Object schema) -> Boolean + +Validates schema. This method should be used to validate schemas rather than `validate` due to the inconsistency of `uri` format in JSON Schema standard. + +By default this method is called automatically when the schema is added, so you rarely need to use it directly. + +If schema doesn't have `$schema` property, it is validated against draft 6 meta-schema (option `meta` should not be false). + +If schema has `$schema` property, then the schema with this id (that should be previously added) is used to validate passed schema. + +Errors will be available at `ajv.errors`. + + +##### .getSchema(String key) -> Function<Object data> + +Retrieve compiled schema previously added with `addSchema` by the key passed to `addSchema` or by its full reference (id). The returned validating function has `schema` property with the reference to the original schema. + + +##### .removeSchema([Object schema|String key|String ref|RegExp pattern]) -> Ajv + +Remove added/cached schema. Even if schema is referenced by other schemas it can be safely removed as dependent schemas have local references. + +Schema can be removed using: +- key passed to `addSchema` +- it's full reference (id) +- RegExp that should match schema id or key (meta-schemas won't be removed) +- actual schema object that will be stable-stringified to remove schema from cache + +If no parameter is passed all schemas but meta-schemas will be removed and the cache will be cleared. + + +##### .addFormat(String name, String|RegExp|Function|Object format) -> Ajv + +Add custom format to validate strings or numbers. It can also be used to replace pre-defined formats for Ajv instance. + +Strings are converted to RegExp. + +Function should return validation result as `true` or `false`. + +If object is passed it should have properties `validate`, `compare` and `async`: + +- _validate_: a string, RegExp or a function as described above. +- _compare_: an optional comparison function that accepts two strings and compares them according to the format meaning. This function is used with keywords `formatMaximum`/`formatMinimum` (defined in [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package). It should return `1` if the first value is bigger than the second value, `-1` if it is smaller and `0` if it is equal. +- _async_: an optional `true` value if `validate` is an asynchronous function; in this case it should return a promise that resolves with a value `true` or `false`. +- _type_: an optional type of data that the format applies to. It can be `"string"` (default) or `"number"` (see https://github.com/epoberezkin/ajv/issues/291#issuecomment-259923858). If the type of data is different, the validation will pass. + +Custom formats can be also added via `formats` option. + + +##### .addKeyword(String keyword, Object definition) -> Ajv + +Add custom validation keyword to Ajv instance. + +Keyword should be different from all standard JSON schema keywords and different from previously defined keywords. There is no way to redefine keywords or to remove keyword definition from the instance. + +Keyword must start with a letter, `_` or `$`, and may continue with letters, numbers, `_`, `$`, or `-`. +It is recommended to use an application-specific prefix for keywords to avoid current and future name collisions. + +Example Keywords: +- `"xyz-example"`: valid, and uses prefix for the xyz project to avoid name collisions. +- `"example"`: valid, but not recommended as it could collide with future versions of JSON schema etc. +- `"3-example"`: invalid as numbers are not allowed to be the first character in a keyword + +Keyword definition is an object with the following properties: + +- _type_: optional string or array of strings with data type(s) that the keyword applies to. If not present, the keyword will apply to all types. +- _validate_: validating function +- _compile_: compiling function +- _macro_: macro function +- _inline_: compiling function that returns code (as string) +- _schema_: an optional `false` value used with "validate" keyword to not pass schema +- _metaSchema_: an optional meta-schema for keyword schema +- _modifying_: `true` MUST be passed if keyword modifies data +- _valid_: pass `true`/`false` to pre-define validation result, the result returned from validation function will be ignored. This option cannot be used with macro keywords. +- _$data_: an optional `true` value to support [$data reference](#data-reference) as the value of custom keyword. The reference will be resolved at validation time. If the keyword has meta-schema it would be extended to allow $data and it will be used to validate the resolved value. Supporting $data reference requires that keyword has validating function (as the only option or in addition to compile, macro or inline function). +- _async_: an optional `true` value if the validation function is asynchronous (whether it is compiled or passed in _validate_ property); in this case it should return a promise that resolves with a value `true` or `false`. This option is ignored in case of "macro" and "inline" keywords. +- _errors_: an optional boolean indicating whether keyword returns errors. If this property is not set Ajv will determine if the errors were set in case of failed validation. + +_compile_, _macro_ and _inline_ are mutually exclusive, only one should be used at a time. _validate_ can be used separately or in addition to them to support $data reference. + +__Please note__: If the keyword is validating data type that is different from the type(s) in its definition, the validation function will not be called (and expanded macro will not be used), so there is no need to check for data type inside validation function or inside schema returned by macro function (unless you want to enforce a specific type and for some reason do not want to use a separate `type` keyword for that). In the same way as standard keywords work, if the keyword does not apply to the data type being validated, the validation of this keyword will succeed. + +See [Defining custom keywords](#defining-custom-keywords) for more details. + + +##### .getKeyword(String keyword) -> Object|Boolean + +Returns custom keyword definition, `true` for pre-defined keywords and `false` if the keyword is unknown. + + +##### .removeKeyword(String keyword) -> Ajv + +Removes custom or pre-defined keyword so you can redefine them. + +While this method can be used to extend pre-defined keywords, it can also be used to completely change their meaning - it may lead to unexpected results. + +__Please note__: schemas compiled before the keyword is removed will continue to work without changes. To recompile schemas use `removeSchema` method and compile them again. + + +##### .errorsText([Array<Object> errors [, Object options]]) -> String + +Returns the text with all errors in a String. + +Options can have properties `separator` (string used to separate errors, ", " by default) and `dataVar` (the variable name that dataPaths are prefixed with, "data" by default). + + +## Options + +Defaults: + +```javascript +{ + // validation and reporting options: + $data: false, + allErrors: false, + verbose: false, + jsonPointers: false, + uniqueItems: true, + unicode: true, + format: 'fast', + formats: {}, + unknownFormats: true, + schemas: {}, + logger: undefined, + // referenced schema options: + schemaId: undefined // recommended '$id' + missingRefs: true, + extendRefs: 'ignore', // recommended 'fail' + loadSchema: undefined, // function(uri: string): Promise {} + // options to modify validated data: + removeAdditional: false, + useDefaults: false, + coerceTypes: false, + // asynchronous validation options: + async: 'co*', + transpile: undefined, // requires ajv-async package + // advanced options: + meta: true, + validateSchema: true, + addUsedSchema: true, + inlineRefs: true, + passContext: false, + loopRequired: Infinity, + ownProperties: false, + multipleOfPrecision: false, + errorDataPath: 'object', + messages: true, + sourceCode: false, + processCode: undefined, // function (str: string): string {} + cache: new Cache, + serialize: undefined +} +``` + +##### Validation and reporting options + +- _$data_: support [$data references](#data-reference). Draft 6 meta-schema that is added by default will be extended to allow them. If you want to use another meta-schema you need to use $dataMetaSchema method to add support for $data reference. See [API](#api). +- _allErrors_: check all rules collecting all errors. Default is to return after the first error. +- _verbose_: include the reference to the part of the schema (`schema` and `parentSchema`) and validated data in errors (false by default). +- _jsonPointers_: set `dataPath` property of errors using [JSON Pointers](https://tools.ietf.org/html/rfc6901) instead of JavaScript property access notation. +- _uniqueItems_: validate `uniqueItems` keyword (true by default). +- _unicode_: calculate correct length of strings with unicode pairs (true by default). Pass `false` to use `.length` of strings that is faster, but gives "incorrect" lengths of strings with unicode pairs - each unicode pair is counted as two characters. +- _format_: formats validation mode ('fast' by default). Pass 'full' for more correct and slow validation or `false` not to validate formats at all. E.g., 25:00:00 and 2015/14/33 will be invalid time and date in 'full' mode but it will be valid in 'fast' mode. +- _formats_: an object with custom formats. Keys and values will be passed to `addFormat` method. +- _unknownFormats_: handling of unknown formats. Option values: + - `true` (default) - if an unknown format is encountered the exception is thrown during schema compilation. If `format` keyword value is [$data reference](#data-reference) and it is unknown the validation will fail. + - `[String]` - an array of unknown format names that will be ignored. This option can be used to allow usage of third party schemas with format(s) for which you don't have definitions, but still fail if another unknown format is used. If `format` keyword value is [$data reference](#data-reference) and it is not in this array the validation will fail. + - `"ignore"` - to log warning during schema compilation and always pass validation (the default behaviour in versions before 5.0.0). This option is not recommended, as it allows to mistype format name and it won't be validated without any error message. This behaviour is required by JSON-schema specification. +- _schemas_: an array or object of schemas that will be added to the instance. In case you pass the array the schemas must have IDs in them. When the object is passed the method `addSchema(value, key)` will be called for each schema in this object. +- _logger_: sets the logging method. Default is the global `console` object that should have methods `log`, `warn` and `error`. Option values: + - custom logger - it should have methods `log`, `warn` and `error`. If any of these methods is missing an exception will be thrown. + - `false` - logging is disabled. + + +##### Referenced schema options + +- _schemaId_: this option defines which keywords are used as schema URI. Option value: + - `"$id"` (recommended) - only use `$id` keyword as schema URI (as specified in JSON Schema draft-06), ignore `id` keyword (if it is present a warning will be logged). + - `"id"` - only use `id` keyword as schema URI (as specified in JSON Schema draft-04), ignore `$id` keyword (if it is present a warning will be logged). + - `undefined` (default) - use both `$id` and `id` keywords as schema URI. If both are present (in the same schema object) and different the exception will be thrown during schema compilation. +- _missingRefs_: handling of missing referenced schemas. Option values: + - `true` (default) - if the reference cannot be resolved during compilation the exception is thrown. The thrown error has properties `missingRef` (with hash fragment) and `missingSchema` (without it). Both properties are resolved relative to the current base id (usually schema id, unless it was substituted). + - `"ignore"` - to log error during compilation and always pass validation. + - `"fail"` - to log error and successfully compile schema but fail validation if this rule is checked. +- _extendRefs_: validation of other keywords when `$ref` is present in the schema. Option values: + - `"ignore"` (default) - when `$ref` is used other keywords are ignored (as per [JSON Reference](https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03#section-3) standard). A warning will be logged during the schema compilation. + - `"fail"` (recommended) - if other validation keywords are used together with `$ref` the exception will be thrown when the schema is compiled. This option is recommended to make sure schema has no keywords that are ignored, which can be confusing. + - `true` - validate all keywords in the schemas with `$ref` (the default behaviour in versions before 5.0.0). +- _loadSchema_: asynchronous function that will be used to load remote schemas when `compileAsync` [method](#api-compileAsync) is used and some reference is missing (option `missingRefs` should NOT be 'fail' or 'ignore'). This function should accept remote schema uri as a parameter and return a Promise that resolves to a schema. See example in [Asynchronous compilation](#asynchronous-schema-compilation). + + +##### Options to modify validated data + +- _removeAdditional_: remove additional properties - see example in [Filtering data](#filtering-data). This option is not used if schema is added with `addMetaSchema` method. Option values: + - `false` (default) - not to remove additional properties + - `"all"` - all additional properties are removed, regardless of `additionalProperties` keyword in schema (and no validation is made for them). + - `true` - only additional properties with `additionalProperties` keyword equal to `false` are removed. + - `"failing"` - additional properties that fail schema validation will be removed (where `additionalProperties` keyword is `false` or schema). +- _useDefaults_: replace missing properties and items with the values from corresponding `default` keywords. Default behaviour is to ignore `default` keywords. This option is not used if schema is added with `addMetaSchema` method. See examples in [Assigning defaults](#assigning-defaults). Option values: + - `false` (default) - do not use defaults + - `true` - insert defaults by value (safer and slower, object literal is used). + - `"shared"` - insert defaults by reference (faster). If the default is an object, it will be shared by all instances of validated data. If you modify the inserted default in the validated data, it will be modified in the schema as well. +- _coerceTypes_: change data type of data to match `type` keyword. See the example in [Coercing data types](#coercing-data-types) and [coercion rules](https://github.com/epoberezkin/ajv/blob/master/COERCION.md). Option values: + - `false` (default) - no type coercion. + - `true` - coerce scalar data types. + - `"array"` - in addition to coercions between scalar types, coerce scalar data to an array with one element and vice versa (as required by the schema). + + +##### Asynchronous validation options + +- _async_: determines how Ajv compiles asynchronous schemas (see [Asynchronous validation](#asynchronous-validation)) to functions. Option values: + - `"*"` / `"co*"` (default) - compile to generator function ("co*" - wrapped with `co.wrap`). If generators are not supported and you don't provide `processCode` option (or `transpile` option if you use [ajv-async](https://github.com/epoberezkin/ajv-async) package), the exception will be thrown when async schema is compiled. + - `"es7"` - compile to es7 async function. Unless your platform supports them you need to provide `processCode` or `transpile` option. According to [compatibility table](http://kangax.github.io/compat-table/es7/)) async functions are supported by: + - Firefox 52, + - Chrome 55, + - Node.js 7 (with `--harmony-async-await`), + - MS Edge 13 (with flag). + - `undefined`/`true` - auto-detect async mode. It requires [ajv-async](https://github.com/epoberezkin/ajv-async) package. If `transpile` option is not passed, ajv-async will choose the first of supported/installed async/transpile modes in this order: + - "es7" (native async functions), + - "co*" (native generators with co.wrap), + - "es7"/"nodent", + - "co*"/"regenerator" during the creation of the Ajv instance. + + If none of the options is available the exception will be thrown. +- _transpile_: Requires [ajv-async](https://github.com/epoberezkin/ajv-async) package. It determines whether Ajv transpiles compiled asynchronous validation function. Option values: + - `"nodent"` - transpile with [nodent](https://github.com/MatAtBread/nodent). If nodent is not installed, the exception will be thrown. nodent can only transpile es7 async functions; it will enforce this mode. + - `"regenerator"` - transpile with [regenerator](https://github.com/facebook/regenerator). If regenerator is not installed, the exception will be thrown. + - a function - this function should accept the code of validation function as a string and return transpiled code. This option allows you to use any other transpiler you prefer. If you are passing a function, you can simply pass it to `processCode` option without using ajv-async. + + +##### Advanced options + +- _meta_: add [meta-schema](http://json-schema.org/documentation.html) so it can be used by other schemas (true by default). If an object is passed, it will be used as the default meta-schema for schemas that have no `$schema` keyword. This default meta-schema MUST have `$schema` keyword. +- _validateSchema_: validate added/compiled schemas against meta-schema (true by default). `$schema` property in the schema can either be http://json-schema.org/schema or http://json-schema.org/draft-04/schema or absent (draft-4 meta-schema will be used) or can be a reference to the schema previously added with `addMetaSchema` method. Option values: + - `true` (default) - if the validation fails, throw the exception. + - `"log"` - if the validation fails, log error. + - `false` - skip schema validation. +- _addUsedSchema_: by default methods `compile` and `validate` add schemas to the instance if they have `$id` (or `id`) property that doesn't start with "#". If `$id` is present and it is not unique the exception will be thrown. Set this option to `false` to skip adding schemas to the instance and the `$id` uniqueness check when these methods are used. This option does not affect `addSchema` method. +- _inlineRefs_: Affects compilation of referenced schemas. Option values: + - `true` (default) - the referenced schemas that don't have refs in them are inlined, regardless of their size - that substantially improves performance at the cost of the bigger size of compiled schema functions. + - `false` - to not inline referenced schemas (they will be compiled as separate functions). + - integer number - to limit the maximum number of keywords of the schema that will be inlined. +- _passContext_: pass validation context to custom keyword functions. If this option is `true` and you pass some context to the compiled validation function with `validate.call(context, data)`, the `context` will be available as `this` in your custom keywords. By default `this` is Ajv instance. +- _loopRequired_: by default `required` keyword is compiled into a single expression (or a sequence of statements in `allErrors` mode). In case of a very large number of properties in this keyword it may result in a very big validation function. Pass integer to set the number of properties above which `required` keyword will be validated in a loop - smaller validation function size but also worse performance. +- _ownProperties_: by default Ajv iterates over all enumerable object properties; when this option is `true` only own enumerable object properties (i.e. found directly on the object rather than on its prototype) are iterated. Contributed by @mbroadst. +- _multipleOfPrecision_: by default `multipleOf` keyword is validated by comparing the result of division with parseInt() of that result. It works for dividers that are bigger than 1. For small dividers such as 0.01 the result of the division is usually not integer (even when it should be integer, see issue [#84](https://github.com/epoberezkin/ajv/issues/84)). If you need to use fractional dividers set this option to some positive integer N to have `multipleOf` validated using this formula: `Math.abs(Math.round(division) - division) < 1e-N` (it is slower but allows for float arithmetics deviations). +- _errorDataPath_: set `dataPath` to point to 'object' (default) or to 'property' when validating keywords `required`, `additionalProperties` and `dependencies`. +- _messages_: Include human-readable messages in errors. `true` by default. `false` can be passed when custom messages are used (e.g. with [ajv-i18n](https://github.com/epoberezkin/ajv-i18n)). +- _sourceCode_: add `sourceCode` property to validating function (for debugging; this code can be different from the result of toString call). +- _processCode_: an optional function to process generated code before it is passed to Function constructor. It can be used to either beautify (the validating function is generated without line-breaks) or to transpile code. Starting from version 5.0.0 this option replaced options: + - `beautify` that formatted the generated function using [js-beautify](https://github.com/beautify-web/js-beautify). If you want to beautify the generated code pass `require('js-beautify').js_beautify`. + - `transpile` that transpiled asynchronous validation function. You can still use `transpile` option with [ajv-async](https://github.com/epoberezkin/ajv-async) package. See [Asynchronous validation](#asynchronous-validation) for more information. +- _cache_: an optional instance of cache to store compiled schemas using stable-stringified schema as a key. For example, set-associative cache [sacjs](https://github.com/epoberezkin/sacjs) can be used. If not passed then a simple hash is used which is good enough for the common use case (a limited number of statically defined schemas). Cache should have methods `put(key, value)`, `get(key)`, `del(key)` and `clear()`. +- _serialize_: an optional function to serialize schema to cache key. Pass `false` to use schema itself as a key (e.g., if WeakMap used as a cache). By default [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used. + + +## Validation errors + +In case of validation failure, Ajv assigns the array of errors to `errors` property of validation function (or to `errors` property of Ajv instance when `validate` or `validateSchema` methods were called). In case of [asynchronous validation](#asynchronous-validation), the returned promise is rejected with exception `Ajv.ValidationError` that has `errors` property. + + +### Error objects + +Each error is an object with the following properties: + +- _keyword_: validation keyword. +- _dataPath_: the path to the part of the data that was validated. By default `dataPath` uses JavaScript property access notation (e.g., `".prop[1].subProp"`). When the option `jsonPointers` is true (see [Options](#options)) `dataPath` will be set using JSON pointer standard (e.g., `"/prop/1/subProp"`). +- _schemaPath_: the path (JSON-pointer as a URI fragment) to the schema of the keyword that failed validation. +- _params_: the object with the additional information about error that can be used to create custom error messages (e.g., using [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) package). See below for parameters set by all keywords. +- _message_: the standard error message (can be excluded with option `messages` set to false). +- _schema_: the schema of the keyword (added with `verbose` option). +- _parentSchema_: the schema containing the keyword (added with `verbose` option) +- _data_: the data validated by the keyword (added with `verbose` option). + +__Please note__: `propertyNames` keyword schema validation errors have an additional property `propertyName`, `dataPath` points to the object. After schema validation for each property name, if it is invalid an additional error is added with the property `keyword` equal to `"propertyNames"`. + + +### Error parameters + +Properties of `params` object in errors depend on the keyword that failed validation. + +- `maxItems`, `minItems`, `maxLength`, `minLength`, `maxProperties`, `minProperties` - property `limit` (number, the schema of the keyword). +- `additionalItems` - property `limit` (the maximum number of allowed items in case when `items` keyword is an array of schemas and `additionalItems` is false). +- `additionalProperties` - property `additionalProperty` (the property not used in `properties` and `patternProperties` keywords). +- `dependencies` - properties: + - `property` (dependent property), + - `missingProperty` (required missing dependency - only the first one is reported currently) + - `deps` (required dependencies, comma separated list as a string), + - `depsCount` (the number of required dependencies). +- `format` - property `format` (the schema of the keyword). +- `maximum`, `minimum` - properties: + - `limit` (number, the schema of the keyword), + - `exclusive` (boolean, the schema of `exclusiveMaximum` or `exclusiveMinimum`), + - `comparison` (string, comparison operation to compare the data to the limit, with the data on the left and the limit on the right; can be "<", "<=", ">", ">=") +- `multipleOf` - property `multipleOf` (the schema of the keyword) +- `pattern` - property `pattern` (the schema of the keyword) +- `required` - property `missingProperty` (required property that is missing). +- `propertyNames` - property `propertyName` (an invalid property name). +- `patternRequired` (in ajv-keywords) - property `missingPattern` (required pattern that did not match any property). +- `type` - property `type` (required type(s), a string, can be a comma-separated list) +- `uniqueItems` - properties `i` and `j` (indices of duplicate items). +- `enum` - property `allowedValues` pointing to the array of values (the schema of the keyword). +- `$ref` - property `ref` with the referenced schema URI. +- custom keywords (in case keyword definition doesn't create errors) - property `keyword` (the keyword name). + + +## Related packages + +- [ajv-async](https://github.com/epoberezkin/ajv-async) - configure async validation mode +- [ajv-cli](https://github.com/jessedc/ajv-cli) - command line interface +- [ajv-errors](https://github.com/epoberezkin/ajv-errors) - custom error messages +- [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) - internationalised error messages +- [ajv-istanbul](https://github.com/epoberezkin/ajv-istanbul) - instrument generated validation code to measure test coverage of your schemas +- [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) - custom validation keywords (if/then/else, select, typeof, etc.) +- [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) - keywords $merge and $patch +- [ajv-pack](https://github.com/epoberezkin/ajv-pack) - produces a compact module exporting validation functions + + +## Some packages using Ajv + +- [webpack](https://github.com/webpack/webpack) - a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser +- [jsonscript-js](https://github.com/JSONScript/jsonscript-js) - the interpreter for [JSONScript](http://www.jsonscript.org) - scripted processing of existing endpoints and services +- [osprey-method-handler](https://github.com/mulesoft-labs/osprey-method-handler) - Express middleware for validating requests and responses based on a RAML method object, used in [osprey](https://github.com/mulesoft/osprey) - validating API proxy generated from a RAML definition +- [har-validator](https://github.com/ahmadnassri/har-validator) - HTTP Archive (HAR) validator +- [jsoneditor](https://github.com/josdejong/jsoneditor) - a web-based tool to view, edit, format, and validate JSON http://jsoneditoronline.org +- [JSON Schema Lint](https://github.com/nickcmaynard/jsonschemalint) - a web tool to validate JSON/YAML document against a single JSON-schema http://jsonschemalint.com +- [objection](https://github.com/vincit/objection.js) - SQL-friendly ORM for Node.js +- [table](https://github.com/gajus/table) - formats data into a string table +- [ripple-lib](https://github.com/ripple/ripple-lib) - a JavaScript API for interacting with [Ripple](https://ripple.com) in Node.js and the browser +- [restbase](https://github.com/wikimedia/restbase) - distributed storage with REST API & dispatcher for backend services built to provide a low-latency & high-throughput API for Wikipedia / Wikimedia content +- [hippie-swagger](https://github.com/CacheControl/hippie-swagger) - [Hippie](https://github.com/vesln/hippie) wrapper that provides end to end API testing with swagger validation +- [react-form-controlled](https://github.com/seeden/react-form-controlled) - React controlled form components with validation +- [rabbitmq-schema](https://github.com/tjmehta/rabbitmq-schema) - a schema definition module for RabbitMQ graphs and messages +- [@query/schema](https://www.npmjs.com/package/@query/schema) - stream filtering with a URI-safe query syntax parsing to JSON Schema +- [chai-ajv-json-schema](https://github.com/peon374/chai-ajv-json-schema) - chai plugin to us JSON-schema with expect in mocha tests +- [grunt-jsonschema-ajv](https://github.com/SignpostMarv/grunt-jsonschema-ajv) - Grunt plugin for validating files against JSON Schema +- [extract-text-webpack-plugin](https://github.com/webpack-contrib/extract-text-webpack-plugin) - extract text from bundle into a file +- [electron-builder](https://github.com/electron-userland/electron-builder) - a solution to package and build a ready for distribution Electron app +- [addons-linter](https://github.com/mozilla/addons-linter) - Mozilla Add-ons Linter +- [gh-pages-generator](https://github.com/epoberezkin/gh-pages-generator) - multi-page site generator converting markdown files to GitHub pages + + +## Tests + +``` +npm install +git submodule update --init +npm test +``` + +## Contributing + +All validation functions are generated using doT templates in [dot](https://github.com/epoberezkin/ajv/tree/master/lib/dot) folder. Templates are precompiled so doT is not a run-time dependency. + +`npm run build` - compiles templates to [dotjs](https://github.com/epoberezkin/ajv/tree/master/lib/dotjs) folder. + +`npm run watch` - automatically compiles templates when files in dot folder change + +Please see [Contributing guidelines](https://github.com/epoberezkin/ajv/blob/master/CONTRIBUTING.md) + + +## Changes history + +See https://github.com/epoberezkin/ajv/releases + +__Please note__: [Changes in version 5.0.0](https://github.com/epoberezkin/ajv/releases/tag/5.0.0). + +[Changes in version 4.6.0](https://github.com/epoberezkin/ajv/releases/tag/4.6.0). + +[Changes in version 4.0.0](https://github.com/epoberezkin/ajv/releases/tag/4.0.0). + +[Changes in version 3.0.0](https://github.com/epoberezkin/ajv/releases/tag/3.0.0). + +[Changes in version 2.0.0](https://github.com/epoberezkin/ajv/releases/tag/2.0.0). + + +## License + +[MIT](https://github.com/epoberezkin/ajv/blob/master/LICENSE) diff --git a/node_modules/eslint/node_modules/ajv/dist/ajv.bundle.js b/node_modules/eslint/node_modules/ajv/dist/ajv.bundle.js new file mode 100644 index 0000000..01d5632 --- /dev/null +++ b/node_modules/eslint/node_modules/ajv/dist/ajv.bundle.js @@ -0,0 +1,7345 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Ajv = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; +// For the source: https://gist.github.com/dperini/729294 +// For test cases: https://mathiasbynens.be/demo/url-regex +// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983. +// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; +var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; +var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; +var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$|^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; +var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; + + +module.exports = formats; + +function formats(mode) { + mode = mode == 'full' ? 'full' : 'fast'; + return util.copy(formats[mode]); +} + + +formats.fast = { + // date: http://tools.ietf.org/html/rfc3339#section-5.6 + date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, + // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 + time: /^[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i, + 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i, + // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js + uri: /^(?:[a-z][a-z0-9+-.]*)(?::|\/)\/?[^\s]*$/i, + 'uri-reference': /^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i, + 'uri-template': URITEMPLATE, + url: URL, + // email (sources from jsen validator): + // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363 + // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation') + email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, + hostname: HOSTNAME, + // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, + // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses + ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, + regex: regex, + // uuid: http://tools.ietf.org/html/rfc4122 + uuid: UUID, + // JSON-pointer: https://tools.ietf.org/html/rfc6901 + // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A + 'json-pointer': JSON_POINTER, + // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00 + 'relative-json-pointer': RELATIVE_JSON_POINTER +}; + + +formats.full = { + date: date, + time: time, + 'date-time': date_time, + uri: uri, + 'uri-reference': URIREF, + 'uri-template': URITEMPLATE, + url: URL, + email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, + hostname: hostname, + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, + ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, + regex: regex, + uuid: UUID, + 'json-pointer': JSON_POINTER, + 'relative-json-pointer': RELATIVE_JSON_POINTER +}; + + +function date(str) { + // full-date from http://tools.ietf.org/html/rfc3339#section-5.6 + var matches = str.match(DATE); + if (!matches) return false; + + var month = +matches[1]; + var day = +matches[2]; + return month >= 1 && month <= 12 && day >= 1 && day <= DAYS[month]; +} + + +function time(str, full) { + var matches = str.match(TIME); + if (!matches) return false; + + var hour = matches[1]; + var minute = matches[2]; + var second = matches[3]; + var timeZone = matches[5]; + return hour <= 23 && minute <= 59 && second <= 59 && (!full || timeZone); +} + + +var DATE_TIME_SEPARATOR = /t|\s/i; +function date_time(str) { + // http://tools.ietf.org/html/rfc3339#section-5.6 + var dateTime = str.split(DATE_TIME_SEPARATOR); + return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true); +} + + +function hostname(str) { + // https://tools.ietf.org/html/rfc1034#section-3.5 + // https://tools.ietf.org/html/rfc1123#section-2 + return str.length <= 255 && HOSTNAME.test(str); +} + + +var NOT_URI_FRAGMENT = /\/|:/; +function uri(str) { + // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "." + return NOT_URI_FRAGMENT.test(str) && URI.test(str); +} + + +var Z_ANCHOR = /[^\\]\\Z/; +function regex(str) { + if (Z_ANCHOR.test(str)) return false; + try { + new RegExp(str); + return true; + } catch(e) { + return false; + } +} + +},{"./util":12}],7:[function(require,module,exports){ +'use strict'; + +var resolve = require('./resolve') + , util = require('./util') + , errorClasses = require('./error_classes') + , stableStringify = require('fast-json-stable-stringify'); + +var validateGenerator = require('../dotjs/validate'); + +/** + * Functions below are used inside compiled validations function + */ + +var co = require('co'); +var ucs2length = util.ucs2length; +var equal = require('fast-deep-equal'); + +// this error is thrown by async schemas to return validation errors via exception +var ValidationError = errorClasses.Validation; + +module.exports = compile; + + +/** + * Compiles schema to validation function + * @this Ajv + * @param {Object} schema schema object + * @param {Object} root object with information about the root schema for this schema + * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution + * @param {String} baseId base ID for IDs in the schema + * @return {Function} validation function + */ +function compile(schema, root, localRefs, baseId) { + /* jshint validthis: true, evil: true */ + /* eslint no-shadow: 0 */ + var self = this + , opts = this._opts + , refVal = [ undefined ] + , refs = {} + , patterns = [] + , patternsHash = {} + , defaults = [] + , defaultsHash = {} + , customRules = []; + + root = root || { schema: schema, refVal: refVal, refs: refs }; + + var c = checkCompiling.call(this, schema, root, baseId); + var compilation = this._compilations[c.index]; + if (c.compiling) return (compilation.callValidate = callValidate); + + var formats = this._formats; + var RULES = this.RULES; + + try { + var v = localCompile(schema, root, localRefs, baseId); + compilation.validate = v; + var cv = compilation.callValidate; + if (cv) { + cv.schema = v.schema; + cv.errors = null; + cv.refs = v.refs; + cv.refVal = v.refVal; + cv.root = v.root; + cv.$async = v.$async; + if (opts.sourceCode) cv.source = v.source; + } + return v; + } finally { + endCompiling.call(this, schema, root, baseId); + } + + function callValidate() { + var validate = compilation.validate; + var result = validate.apply(null, arguments); + callValidate.errors = validate.errors; + return result; + } + + function localCompile(_schema, _root, localRefs, baseId) { + var isRoot = !_root || (_root && _root.schema == _schema); + if (_root.schema != root.schema) + return compile.call(self, _schema, _root, localRefs, baseId); + + var $async = _schema.$async === true; + + var sourceCode = validateGenerator({ + isTop: true, + schema: _schema, + isRoot: isRoot, + baseId: baseId, + root: _root, + schemaPath: '', + errSchemaPath: '#', + errorPath: '""', + MissingRefError: errorClasses.MissingRef, + RULES: RULES, + validate: validateGenerator, + util: util, + resolve: resolve, + resolveRef: resolveRef, + usePattern: usePattern, + useDefault: useDefault, + useCustomRule: useCustomRule, + opts: opts, + formats: formats, + logger: self.logger, + self: self + }); + + sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode) + + vars(defaults, defaultCode) + vars(customRules, customRuleCode) + + sourceCode; + + if (opts.processCode) sourceCode = opts.processCode(sourceCode); + // console.log('\n\n\n *** \n', JSON.stringify(sourceCode)); + var validate; + try { + var makeValidate = new Function( + 'self', + 'RULES', + 'formats', + 'root', + 'refVal', + 'defaults', + 'customRules', + 'co', + 'equal', + 'ucs2length', + 'ValidationError', + sourceCode + ); + + validate = makeValidate( + self, + RULES, + formats, + root, + refVal, + defaults, + customRules, + co, + equal, + ucs2length, + ValidationError + ); + + refVal[0] = validate; + } catch(e) { + self.logger.error('Error compiling schema, function code:', sourceCode); + throw e; + } + + validate.schema = _schema; + validate.errors = null; + validate.refs = refs; + validate.refVal = refVal; + validate.root = isRoot ? validate : _root; + if ($async) validate.$async = true; + if (opts.sourceCode === true) { + validate.source = { + code: sourceCode, + patterns: patterns, + defaults: defaults + }; + } + + return validate; + } + + function resolveRef(baseId, ref, isRoot) { + ref = resolve.url(baseId, ref); + var refIndex = refs[ref]; + var _refVal, refCode; + if (refIndex !== undefined) { + _refVal = refVal[refIndex]; + refCode = 'refVal[' + refIndex + ']'; + return resolvedRef(_refVal, refCode); + } + if (!isRoot && root.refs) { + var rootRefId = root.refs[ref]; + if (rootRefId !== undefined) { + _refVal = root.refVal[rootRefId]; + refCode = addLocalRef(ref, _refVal); + return resolvedRef(_refVal, refCode); + } + } + + refCode = addLocalRef(ref); + var v = resolve.call(self, localCompile, root, ref); + if (v === undefined) { + var localSchema = localRefs && localRefs[ref]; + if (localSchema) { + v = resolve.inlineRef(localSchema, opts.inlineRefs) + ? localSchema + : compile.call(self, localSchema, root, localRefs, baseId); + } + } + + if (v === undefined) { + removeLocalRef(ref); + } else { + replaceLocalRef(ref, v); + return resolvedRef(v, refCode); + } + } + + function addLocalRef(ref, v) { + var refId = refVal.length; + refVal[refId] = v; + refs[ref] = refId; + return 'refVal' + refId; + } + + function removeLocalRef(ref) { + delete refs[ref]; + } + + function replaceLocalRef(ref, v) { + var refId = refs[ref]; + refVal[refId] = v; + } + + function resolvedRef(refVal, code) { + return typeof refVal == 'object' || typeof refVal == 'boolean' + ? { code: code, schema: refVal, inline: true } + : { code: code, $async: refVal && refVal.$async }; + } + + function usePattern(regexStr) { + var index = patternsHash[regexStr]; + if (index === undefined) { + index = patternsHash[regexStr] = patterns.length; + patterns[index] = regexStr; + } + return 'pattern' + index; + } + + function useDefault(value) { + switch (typeof value) { + case 'boolean': + case 'number': + return '' + value; + case 'string': + return util.toQuotedString(value); + case 'object': + if (value === null) return 'null'; + var valueStr = stableStringify(value); + var index = defaultsHash[valueStr]; + if (index === undefined) { + index = defaultsHash[valueStr] = defaults.length; + defaults[index] = value; + } + return 'default' + index; + } + } + + function useCustomRule(rule, schema, parentSchema, it) { + var validateSchema = rule.definition.validateSchema; + if (validateSchema && self._opts.validateSchema !== false) { + var valid = validateSchema(schema); + if (!valid) { + var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors); + if (self._opts.validateSchema == 'log') self.logger.error(message); + else throw new Error(message); + } + } + + var compile = rule.definition.compile + , inline = rule.definition.inline + , macro = rule.definition.macro; + + var validate; + if (compile) { + validate = compile.call(self, schema, parentSchema, it); + } else if (macro) { + validate = macro.call(self, schema, parentSchema, it); + if (opts.validateSchema !== false) self.validateSchema(validate, true); + } else if (inline) { + validate = inline.call(self, it, rule.keyword, schema, parentSchema); + } else { + validate = rule.definition.validate; + if (!validate) return; + } + + if (validate === undefined) + throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); + + var index = customRules.length; + customRules[index] = validate; + + return { + code: 'customRule' + index, + validate: validate + }; + } +} + + +/** + * Checks if the schema is currently compiled + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean) + */ +function checkCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var index = compIndex.call(this, schema, root, baseId); + if (index >= 0) return { index: index, compiling: true }; + index = this._compilations.length; + this._compilations[index] = { + schema: schema, + root: root, + baseId: baseId + }; + return { index: index, compiling: false }; +} + + +/** + * Removes the schema from the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + */ +function endCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var i = compIndex.call(this, schema, root, baseId); + if (i >= 0) this._compilations.splice(i, 1); +} + + +/** + * Index of schema compilation in the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Integer} compilation index + */ +function compIndex(schema, root, baseId) { + /* jshint validthis: true */ + for (var i=0; i= 0xD800 && value <= 0xDBFF && pos < len) { + // high surrogate, and there is a next character + value = str.charCodeAt(pos); + if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate + } + } + return length; +}; + +},{}],12:[function(require,module,exports){ +'use strict'; + + +module.exports = { + copy: copy, + checkDataType: checkDataType, + checkDataTypes: checkDataTypes, + coerceToTypes: coerceToTypes, + toHash: toHash, + getProperty: getProperty, + escapeQuotes: escapeQuotes, + equal: require('fast-deep-equal'), + ucs2length: require('./ucs2length'), + varOccurences: varOccurences, + varReplace: varReplace, + cleanUpCode: cleanUpCode, + finalCleanUpCode: finalCleanUpCode, + schemaHasRules: schemaHasRules, + schemaHasRulesExcept: schemaHasRulesExcept, + toQuotedString: toQuotedString, + getPathExpr: getPathExpr, + getPath: getPath, + getData: getData, + unescapeFragment: unescapeFragment, + unescapeJsonPointer: unescapeJsonPointer, + escapeFragment: escapeFragment, + escapeJsonPointer: escapeJsonPointer +}; + + +function copy(o, to) { + to = to || {}; + for (var key in o) to[key] = o[key]; + return to; +} + + +function checkDataType(dataType, data, negate) { + var EQUAL = negate ? ' !== ' : ' === ' + , AND = negate ? ' || ' : ' && ' + , OK = negate ? '!' : '' + , NOT = negate ? '' : '!'; + switch (dataType) { + case 'null': return data + EQUAL + 'null'; + case 'array': return OK + 'Array.isArray(' + data + ')'; + case 'object': return '(' + OK + data + AND + + 'typeof ' + data + EQUAL + '"object"' + AND + + NOT + 'Array.isArray(' + data + '))'; + case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND + + NOT + '(' + data + ' % 1)' + + AND + data + EQUAL + data + ')'; + default: return 'typeof ' + data + EQUAL + '"' + dataType + '"'; + } +} + + +function checkDataTypes(dataTypes, data) { + switch (dataTypes.length) { + case 1: return checkDataType(dataTypes[0], data, true); + default: + var code = ''; + var types = toHash(dataTypes); + if (types.array && types.object) { + code = types.null ? '(': '(!' + data + ' || '; + code += 'typeof ' + data + ' !== "object")'; + delete types.null; + delete types.array; + delete types.object; + } + if (types.number) delete types.integer; + for (var t in types) + code += (code ? ' && ' : '' ) + checkDataType(t, data, true); + + return code; + } +} + + +var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]); +function coerceToTypes(optionCoerceTypes, dataTypes) { + if (Array.isArray(dataTypes)) { + var types = []; + for (var i=0; i= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl); + return paths[lvl - up]; + } + + if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl); + data = 'data' + ((lvl - up) || ''); + if (!jsonPointer) return data; + } + + var expr = data; + var segments = jsonPointer.split('/'); + for (var i=0; i', + $notOp = $isMax ? '>' : '<', + $errorKeyword = undefined; + if ($isDataExcl) { + var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), + $exclusive = 'exclusive' + $lvl, + $exclType = 'exclType' + $lvl, + $exclIsNumber = 'exclIsNumber' + $lvl, + $opExpr = 'op' + $lvl, + $opStr = '\' + ' + $opExpr + ' + \''; + out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; + $schemaValueExcl = 'schemaExcl' + $lvl; + out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { '; + var $errorKeyword = $exclusiveKeyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';'; + } else { + var $exclIsNumber = typeof $schemaExcl == 'number', + $opStr = $op; + if ($exclIsNumber && $isData) { + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { '; + } else { + if ($exclIsNumber && $schema === undefined) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaExcl; + $notOp += '='; + } else { + if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); + if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $notOp += '='; + } else { + $exclusive = false; + $opStr += '='; + } + } + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { '; + } + } + $errorKeyword = $errorKeyword || $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be ' + ($opStr) + ' '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],14:[function(require,module,exports){ +'use strict'; +module.exports = function generate__limitItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxItems' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxItems') { + out += 'more'; + } else { + out += 'less'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],15:[function(require,module,exports){ +'use strict'; +module.exports = function generate__limitLength(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxLength' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + if (it.opts.unicode === false) { + out += ' ' + ($data) + '.length '; + } else { + out += ' ucs2length(' + ($data) + ') '; + } + out += ' ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be '; + if ($keyword == 'maxLength') { + out += 'longer'; + } else { + out += 'shorter'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' characters\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],16:[function(require,module,exports){ +'use strict'; +module.exports = function generate__limitProperties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxProperties' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxProperties') { + out += 'more'; + } else { + out += 'less'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' properties\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],17:[function(require,module,exports){ +'use strict'; +module.exports = function generate_allOf(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $currentBaseId = $it.baseId, + $allSchemasEmpty = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + $allSchemasEmpty = false; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($breakOnError) { + if ($allSchemasEmpty) { + out += ' if (true) { '; + } else { + out += ' ' + ($closingBraces.slice(0, -1)) + ' '; + } + } + out = it.util.cleanUpCode(out); + return out; +} + +},{}],18:[function(require,module,exports){ +'use strict'; +module.exports = function generate_anyOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $noEmptySchema = $schema.every(function($sch) { + return it.util.schemaHasRules($sch, it.RULES.all); + }); + if ($noEmptySchema) { + var $currentBaseId = $it.baseId; + out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { '; + $closingBraces += '}'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should match some schema in anyOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + out = it.util.cleanUpCode(out); + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} + +},{}],19:[function(require,module,exports){ +'use strict'; +module.exports = function generate_const(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!$isData) { + out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';'; + } + out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should be equal to constant\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],20:[function(require,module,exports){ +'use strict'; +module.exports = function generate_contains(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId, + $nonEmptySchema = it.util.schemaHasRules($schema, it.RULES.all); + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($nonEmptySchema) { + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (' + ($nextValid) + ') break; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {'; + } else { + out += ' if (' + ($data) + '.length == 0) {'; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should contain a valid item\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + if ($nonEmptySchema) { + out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + } + if (it.opts.allErrors) { + out += ' } '; + } + out = it.util.cleanUpCode(out); + return out; +} + +},{}],21:[function(require,module,exports){ +'use strict'; +module.exports = function generate_custom(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $rule = this, + $definition = 'definition' + $lvl, + $rDef = $rule.definition, + $closingBraces = ''; + var $compile, $inline, $macro, $ruleValidate, $validateCode; + if ($isData && $rDef.$data) { + $validateCode = 'keywordValidate' + $lvl; + var $validateSchema = $rDef.validateSchema; + out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;'; + } else { + $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); + if (!$ruleValidate) return; + $schemaValue = 'validate.schema' + $schemaPath; + $validateCode = $ruleValidate.code; + $compile = $rDef.compile; + $inline = $rDef.inline; + $macro = $rDef.macro; + } + var $ruleErrs = $validateCode + '.errors', + $i = 'i' + $lvl, + $ruleErr = 'ruleErr' + $lvl, + $asyncKeyword = $rDef.async; + if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema'); + if (!($inline || $macro)) { + out += '' + ($ruleErrs) + ' = null;'; + } + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($isData && $rDef.$data) { + $closingBraces += '}'; + out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { '; + if ($validateSchema) { + $closingBraces += '}'; + out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { '; + } + } + if ($inline) { + if ($rDef.statements) { + out += ' ' + ($ruleValidate.validate) + ' '; + } else { + out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; '; + } + } else if ($macro) { + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + $it.schema = $ruleValidate.validate; + $it.schemaPath = ''; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($code); + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + out += ' ' + ($validateCode) + '.call( '; + if (it.opts.passContext) { + out += 'this'; + } else { + out += 'self'; + } + if ($compile || $rDef.schema === false) { + out += ' , ' + ($data) + ' '; + } else { + out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' '; + } + out += ' , (dataPath || \'\')'; + if (it.errorPath != '""') { + out += ' + ' + (it.errorPath); + } + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) '; + var def_callRuleValidate = out; + out = $$outStack.pop(); + if ($rDef.errors === false) { + out += ' ' + ($valid) + ' = '; + if ($asyncKeyword) { + out += '' + (it.yieldAwait); + } + out += '' + (def_callRuleValidate) + '; '; + } else { + if ($asyncKeyword) { + $ruleErrs = 'customErrors' + $lvl; + out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = ' + (it.yieldAwait) + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } '; + } else { + out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; '; + } + } + } + if ($rDef.modifying) { + out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];'; + } + out += '' + ($closingBraces); + if ($rDef.valid) { + if ($breakOnError) { + out += ' if (true) { '; + } + } else { + out += ' if ( '; + if ($rDef.valid === undefined) { + out += ' !'; + if ($macro) { + out += '' + ($nextValid); + } else { + out += '' + ($valid); + } + } else { + out += ' ' + (!$rDef.valid) + ' '; + } + out += ') { '; + $errorKeyword = $rule.keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + var def_customError = out; + out = $$outStack.pop(); + if ($inline) { + if ($rDef.errors) { + if ($rDef.errors != 'full') { + out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '= 0) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } else { + throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); + } + } + var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate; + var $formatType = $isObject && $format.type || 'string'; + if ($isObject) { + var $async = $format.async === true; + $format = $format.validate; + } + if ($formatType != $ruleType) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } + if ($async) { + if (!it.async) throw new Error('async format in sync schema'); + var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; + out += ' if (!(' + (it.yieldAwait) + ' ' + ($formatRef) + '(' + ($data) + '))) { '; + } else { + out += ' if (! '; + var $formatRef = 'formats' + it.util.getProperty($schema); + if ($isObject) $formatRef += '.validate'; + if (typeof $format == 'function') { + out += ' ' + ($formatRef) + '(' + ($data) + ') '; + } else { + out += ' ' + ($formatRef) + '.test(' + ($data) + ') '; + } + out += ') { '; + } + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match format "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],25:[function(require,module,exports){ +'use strict'; +module.exports = function generate_items(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId; + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if (Array.isArray($schema)) { + var $additionalItems = it.schema.additionalItems; + if ($additionalItems === false) { + out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + $closingBraces += '}'; + out += ' else { '; + } + } + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { '; + var $passData = $data + '[' + $i + ']'; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); + $it.dataPathArr[$dataNxt] = $i; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if (typeof $additionalItems == 'object' && it.util.schemaHasRules($additionalItems, it.RULES.all)) { + $it.schema = $additionalItems; + $it.schemaPath = it.schemaPath + '.additionalItems'; + $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } else if (it.util.schemaHasRules($schema, it.RULES.all)) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' }'; + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + out = it.util.cleanUpCode(out); + return out; +} + +},{}],26:[function(require,module,exports){ +'use strict'; +module.exports = function generate_multipleOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + out += 'var division' + ($lvl) + ';if ('; + if ($isData) { + out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || '; + } + out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', '; + if (it.opts.multipleOfPrecision) { + out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' '; + } else { + out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') '; + } + out += ' ) '; + if ($isData) { + out += ' ) '; + } + out += ' ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be multiple of '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],27:[function(require,module,exports){ +'use strict'; +module.exports = function generate_not(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + if (it.util.schemaHasRules($schema, it.RULES.all)) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.createErrors = false; + var $allErrorsOption; + if ($it.opts.allErrors) { + $allErrorsOption = $it.opts.allErrors; + $it.opts.allErrors = false; + } + out += ' ' + (it.validate($it)) + ' '; + $it.createErrors = true; + if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (' + ($nextValid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + } else { + out += ' var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if ($breakOnError) { + out += ' if (false) { '; + } + } + return out; +} + +},{}],28:[function(require,module,exports){ +'use strict'; +module.exports = function generate_oneOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + out += 'var ' + ($errs) + ' = errors;var prevValid' + ($lvl) + ' = false;var ' + ($valid) + ' = false;'; + var $currentBaseId = $it.baseId; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + } else { + out += ' var ' + ($nextValid) + ' = true; '; + } + if ($i) { + out += ' if (' + ($nextValid) + ' && prevValid' + ($lvl) + ') ' + ($valid) + ' = false; else { '; + $closingBraces += '}'; + } + out += ' if (' + ($nextValid) + ') ' + ($valid) + ' = prevValid' + ($lvl) + ' = true;'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should match exactly one schema in oneOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }'; + if (it.opts.allErrors) { + out += ' } '; + } + return out; +} + +},{}],29:[function(require,module,exports){ +'use strict'; +module.exports = function generate_pattern(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema); + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match pattern "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],30:[function(require,module,exports){ +'use strict'; +module.exports = function generate_properties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl; + var $schemaKeys = Object.keys($schema || {}), + $pProperties = it.schema.patternProperties || {}, + $pPropertyKeys = Object.keys($pProperties), + $aProperties = it.schema.additionalProperties, + $someProperties = $schemaKeys.length || $pPropertyKeys.length, + $noAdditional = $aProperties === false, + $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length, + $removeAdditional = it.opts.removeAdditional, + $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + var $required = it.schema.required; + if ($required && !(it.opts.v5 && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required); + if (it.opts.patternGroups) { + var $pgProperties = it.schema.patternGroups || {}, + $pgPropertyKeys = Object.keys($pgProperties); + } + out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined;'; + } + if ($checkAdditional) { + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + if ($someProperties) { + out += ' var isAdditional' + ($lvl) + ' = !(false '; + if ($schemaKeys.length) { + if ($schemaKeys.length > 5) { + out += ' || validate.schema' + ($schemaPath) + '[' + ($key) + '] '; + } else { + var arr1 = $schemaKeys; + if (arr1) { + var $propertyKey, i1 = -1, + l1 = arr1.length - 1; + while (i1 < l1) { + $propertyKey = arr1[i1 += 1]; + out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' '; + } + } + } + } + if ($pPropertyKeys.length) { + var arr2 = $pPropertyKeys; + if (arr2) { + var $pProperty, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $pProperty = arr2[$i += 1]; + out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') '; + } + } + } + if (it.opts.patternGroups && $pgPropertyKeys.length) { + var arr3 = $pgPropertyKeys; + if (arr3) { + var $pgProperty, $i = -1, + l3 = arr3.length - 1; + while ($i < l3) { + $pgProperty = arr3[$i += 1]; + out += ' || ' + (it.usePattern($pgProperty)) + '.test(' + ($key) + ') '; + } + } + } + out += ' ); if (isAdditional' + ($lvl) + ') { '; + } + if ($removeAdditional == 'all') { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + var $currentErrorPath = it.errorPath; + var $additionalProperty = '\' + ' + $key + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + } + if ($noAdditional) { + if ($removeAdditional) { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + out += ' ' + ($nextValid) + ' = false; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalProperties'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have additional properties\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + out += ' break; '; + } + } + } else if ($additionalIsSchema) { + if ($removeAdditional == 'failing') { + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + } else { + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + } + } + it.errorPath = $currentErrorPath; + } + if ($someProperties) { + out += ' } '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + var $useDefaults = it.opts.useDefaults && !it.compositeRule; + if ($schemaKeys.length) { + var arr4 = $schemaKeys; + if (arr4) { + var $propertyKey, i4 = -1, + l4 = arr4.length - 1; + while (i4 < l4) { + $propertyKey = arr4[i4 += 1]; + var $sch = $schema[$propertyKey]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + var $prop = it.util.getProperty($propertyKey), + $passData = $data + $prop, + $hasDefault = $useDefaults && $sch.default !== undefined; + $it.schema = $sch; + $it.schemaPath = $schemaPath + $prop; + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); + $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); + $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + $code = it.util.varReplace($code, $nextData, $passData); + var $useData = $passData; + } else { + var $useData = $nextData; + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; '; + } + if ($hasDefault) { + out += ' ' + ($code) + ' '; + } else { + if ($requiredHash && $requiredHash[$propertyKey]) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = false; '; + var $currentErrorPath = it.errorPath, + $currErrSchemaPath = $errSchemaPath, + $missingProperty = it.util.escapeQuotes($propertyKey); + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + $errSchemaPath = it.errSchemaPath + '/required'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + it.errorPath = $currentErrorPath; + out += ' } else { '; + } else { + if ($breakOnError) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = true; } else { '; + } else { + out += ' if (' + ($useData) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ' ) { '; + } + } + out += ' ' + ($code) + ' } '; + } + } + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($pPropertyKeys.length) { + var arr5 = $pPropertyKeys; + if (arr5) { + var $pProperty, i5 = -1, + l5 = arr5.length - 1; + while (i5 < l5) { + $pProperty = arr5[i5 += 1]; + var $sch = $pProperties[$pProperty]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + $it.schema = $sch; + $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); + $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else ' + ($nextValid) + ' = true; '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + } + if (it.opts.patternGroups && $pgPropertyKeys.length) { + var arr6 = $pgPropertyKeys; + if (arr6) { + var $pgProperty, i6 = -1, + l6 = arr6.length - 1; + while (i6 < l6) { + $pgProperty = arr6[i6 += 1]; + var $pgSchema = $pgProperties[$pgProperty], + $sch = $pgSchema.schema; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + $it.schema = $sch; + $it.schemaPath = it.schemaPath + '.patternGroups' + it.util.getProperty($pgProperty) + '.schema'; + $it.errSchemaPath = it.errSchemaPath + '/patternGroups/' + it.util.escapeFragment($pgProperty) + '/schema'; + out += ' var pgPropCount' + ($lvl) + ' = 0; '; + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' if (' + (it.usePattern($pgProperty)) + '.test(' + ($key) + ')) { pgPropCount' + ($lvl) + '++; '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else ' + ($nextValid) + ' = true; '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + var $pgMin = $pgSchema.minimum, + $pgMax = $pgSchema.maximum; + if ($pgMin !== undefined || $pgMax !== undefined) { + out += ' var ' + ($valid) + ' = true; '; + var $currErrSchemaPath = $errSchemaPath; + if ($pgMin !== undefined) { + var $limit = $pgMin, + $reason = 'minimum', + $moreOrLess = 'less'; + out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' >= ' + ($pgMin) + '; '; + $errSchemaPath = it.errSchemaPath + '/patternGroups/minimum'; + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('patternGroups') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { reason: \'' + ($reason) + '\', limit: ' + ($limit) + ', pattern: \'' + (it.util.escapeQuotes($pgProperty)) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern "' + (it.util.escapeQuotes($pgProperty)) + '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($pgMax !== undefined) { + out += ' else '; + } + } + if ($pgMax !== undefined) { + var $limit = $pgMax, + $reason = 'maximum', + $moreOrLess = 'more'; + out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' <= ' + ($pgMax) + '; '; + $errSchemaPath = it.errSchemaPath + '/patternGroups/maximum'; + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('patternGroups') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { reason: \'' + ($reason) + '\', limit: ' + ($limit) + ', pattern: \'' + (it.util.escapeQuotes($pgProperty)) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern "' + (it.util.escapeQuotes($pgProperty)) + '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + } + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + out += ' if (' + ($valid) + ') { '; + $closingBraces += '}'; + } + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + out = it.util.cleanUpCode(out); + return out; +} + +},{}],31:[function(require,module,exports){ +'use strict'; +module.exports = function generate_propertyNames(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + if (it.util.schemaHasRules($schema, it.RULES.all)) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $i = 'i' + $lvl, + $invalidName = '\' + ' + $key + ' + \'', + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + out += ' var ' + ($errs) + ' = errors; '; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined; '; + } + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' var startErrs' + ($lvl) + ' = errors; '; + var $passData = $key; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + '= it.opts.loopRequired, + $ownProperties = it.opts.ownProperties; + if ($breakOnError) { + out += ' var missing' + ($lvl) + '; '; + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + out += ' var ' + ($valid) + ' = true; '; + if ($isData) { + out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; + } + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += '; if (!' + ($valid) + ') break; } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + } else { + out += ' if ( '; + var arr2 = $required; + if (arr2) { + var $propertyKey, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $propertyKey = arr2[$i += 1]; + if ($i) { + out += ' || '; + } + var $prop = it.util.getProperty($propertyKey), + $useData = $data + $prop; + out += ' ( ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; + } + } + out += ') { '; + var $propertyPath = 'missing' + $lvl, + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + } + } else { + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + if ($isData) { + out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { '; + } + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } '; + if ($isData) { + out += ' } '; + } + } else { + var arr3 = $required; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $prop = it.util.getProperty($propertyKey), + $missingProperty = it.util.escapeQuotes($propertyKey), + $useData = $data + $prop; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; + } + } + } + } + it.errorPath = $currentErrorPath; + } else if ($breakOnError) { + out += ' if (true) {'; + } + return out; +} + +},{}],34:[function(require,module,exports){ +'use strict'; +module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (($schema || $isData) && it.opts.uniqueItems !== false) { + if ($isData) { + out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { '; + } + out += ' var ' + ($valid) + ' = true; if (' + ($data) + '.length > 1) { var i = ' + ($data) + '.length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} + +},{}],35:[function(require,module,exports){ +'use strict'; +module.exports = function generate_validate(it, $keyword, $ruleType) { + var out = ''; + var $async = it.schema.$async === true, + $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'), + $id = it.self._getId(it.schema); + if (it.isTop) { + if ($async) { + it.async = true; + var $es7 = it.opts.async == 'es7'; + it.yieldAwait = $es7 ? 'await' : 'yield'; + } + out += ' var validate = '; + if ($async) { + if ($es7) { + out += ' (async function '; + } else { + if (it.opts.async != '*') { + out += 'co.wrap'; + } + out += '(function* '; + } + } else { + out += ' (function '; + } + out += ' (data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; '; + if ($id && (it.opts.sourceCode || it.opts.processCode)) { + out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' '; + } + } + if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) { + var $keyword = 'false schema'; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + if (it.schema === false) { + if (it.isTop) { + $breakOnError = true; + } else { + out += ' var ' + ($valid) + ' = false; '; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'boolean schema is false\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } else { + if (it.isTop) { + if ($async) { + out += ' return data; '; + } else { + out += ' validate.errors = null; return true; '; + } + } else { + out += ' var ' + ($valid) + ' = true; '; + } + } + if (it.isTop) { + out += ' }); return validate; '; + } + return out; + } + if (it.isTop) { + var $top = it.isTop, + $lvl = it.level = 0, + $dataLvl = it.dataLevel = 0, + $data = 'data'; + it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); + it.baseId = it.baseId || it.rootId; + delete it.isTop; + it.dataPathArr = [undefined]; + out += ' var vErrors = null; '; + out += ' var errors = 0; '; + out += ' if (rootData === undefined) rootData = data; '; + } else { + var $lvl = it.level, + $dataLvl = it.dataLevel, + $data = 'data' + ($dataLvl || ''); + if ($id) it.baseId = it.resolve.url(it.baseId, $id); + if ($async && !it.async) throw new Error('async schema in sync schema'); + out += ' var errs_' + ($lvl) + ' = errors;'; + } + var $valid = 'valid' + $lvl, + $breakOnError = !it.opts.allErrors, + $closingBraces1 = '', + $closingBraces2 = ''; + var $errorKeyword; + var $typeSchema = it.schema.type, + $typeIsArray = Array.isArray($typeSchema); + if ($typeIsArray && $typeSchema.length == 1) { + $typeSchema = $typeSchema[0]; + $typeIsArray = false; + } + if (it.schema.$ref && $refKeywords) { + if (it.opts.extendRefs == 'fail') { + throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); + } else if (it.opts.extendRefs !== true) { + $refKeywords = false; + it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); + } + } + if ($typeSchema) { + if (it.opts.coerceTypes) { + var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); + } + var $rulesGroup = it.RULES.types[$typeSchema]; + if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) { + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type', + $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; + out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { '; + if ($coerceToTypes) { + var $dataType = 'dataType' + $lvl, + $coerced = 'coerced' + $lvl; + out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; '; + if (it.opts.coerceTypes == 'array') { + out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ')) ' + ($dataType) + ' = \'array\'; '; + } + out += ' var ' + ($coerced) + ' = undefined; '; + var $bracesCoercion = ''; + var arr1 = $coerceToTypes; + if (arr1) { + var $type, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $type = arr1[$i += 1]; + if ($i) { + out += ' if (' + ($coerced) + ' === undefined) { '; + $bracesCoercion += '}'; + } + if (it.opts.coerceTypes == 'array' && $type != 'array') { + out += ' if (' + ($dataType) + ' == \'array\' && ' + ($data) + '.length == 1) { ' + ($coerced) + ' = ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; } '; + } + if ($type == 'string') { + out += ' if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; + } else if ($type == 'number' || $type == 'integer') { + out += ' if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; + if ($type == 'integer') { + out += ' && !(' + ($data) + ' % 1)'; + } + out += ')) ' + ($coerced) + ' = +' + ($data) + '; '; + } else if ($type == 'boolean') { + out += ' if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; + } else if ($type == 'null') { + out += ' if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; + } else if (it.opts.coerceTypes == 'array' && $type == 'array') { + out += ' if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; + } + } + } + out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' ' + ($data) + ' = ' + ($coerced) + '; '; + if (!$dataLvl) { + out += 'if (' + ($parentData) + ' !== undefined)'; + } + out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } '; + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } + out += ' } '; + } + } + if (it.schema.$ref && !$refKeywords) { + out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' '; + if ($breakOnError) { + out += ' } if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } else { + if (it.opts.v5 && it.schema.patternGroups) { + it.logger.warn('keyword "patternGroups" is deprecated and disabled. Use option patternGroups: true to enable.'); + } + var arr2 = it.RULES; + if (arr2) { + var $rulesGroup, i2 = -1, + l2 = arr2.length - 1; + while (i2 < l2) { + $rulesGroup = arr2[i2 += 1]; + if ($shouldUseGroup($rulesGroup)) { + if ($rulesGroup.type) { + out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data)) + ') { '; + } + if (it.opts.useDefaults && !it.compositeRule) { + if ($rulesGroup.type == 'object' && it.schema.properties) { + var $schema = it.schema.properties, + $schemaKeys = Object.keys($schema); + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if ($sch.default !== undefined) { + var $passData = $data + it.util.getProperty($propertyKey); + out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) { + var arr4 = it.schema.items; + if (arr4) { + var $sch, $i = -1, + l4 = arr4.length - 1; + while ($i < l4) { + $sch = arr4[$i += 1]; + if ($sch.default !== undefined) { + var $passData = $data + '[' + $i + ']'; + out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } + } + var arr5 = $rulesGroup.rules; + if (arr5) { + var $rule, i5 = -1, + l5 = arr5.length - 1; + while (i5 < l5) { + $rule = arr5[i5 += 1]; + if ($shouldUseRule($rule)) { + var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); + if ($code) { + out += ' ' + ($code) + ' '; + if ($breakOnError) { + $closingBraces1 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces1) + ' '; + $closingBraces1 = ''; + } + if ($rulesGroup.type) { + out += ' } '; + if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { + out += ' else { '; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + } + } + if ($breakOnError) { + out += ' if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces2) + ' '; + } + if ($top) { + if ($async) { + out += ' if (errors === 0) return data; '; + out += ' else throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; '; + out += ' return errors === 0; '; + } + out += ' }); return validate;'; + } else { + out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';'; + } + out = it.util.cleanUpCode(out); + if ($top) { + out = it.util.finalCleanUpCode(out, $async); + } + + function $shouldUseGroup($rulesGroup) { + var rules = $rulesGroup.rules; + for (var i = 0; i < rules.length; i++) + if ($shouldUseRule(rules[i])) return true; + } + + function $shouldUseRule($rule) { + return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule)); + } + + function $ruleImplementsSomeKeyword($rule) { + var impl = $rule.implements; + for (var i = 0; i < impl.length; i++) + if (it.schema[impl[i]] !== undefined) return true; + } + return out; +} + +},{}],36:[function(require,module,exports){ +'use strict'; + +var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; +var customRuleCode = require('./dotjs/custom'); + +module.exports = { + add: addKeyword, + get: getKeyword, + remove: removeKeyword +}; + +/** + * Define custom keyword + * @this Ajv + * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords). + * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`. + * @return {Ajv} this for method chaining + */ +function addKeyword(keyword, definition) { + /* jshint validthis: true */ + /* eslint no-shadow: 0 */ + var RULES = this.RULES; + + if (RULES.keywords[keyword]) + throw new Error('Keyword ' + keyword + ' is already defined'); + + if (!IDENTIFIER.test(keyword)) + throw new Error('Keyword ' + keyword + ' is not a valid identifier'); + + if (definition) { + if (definition.macro && definition.valid !== undefined) + throw new Error('"valid" option cannot be used with macro keywords'); + + var dataType = definition.type; + if (Array.isArray(dataType)) { + var i, len = dataType.length; + for (i=0; i 2) res = slice.call(arguments, 1); + resolve(res); + }); + }); +} + +/** + * Convert an array of "yieldables" to a promise. + * Uses `Promise.all()` internally. + * + * @param {Array} obj + * @return {Promise} + * @api private + */ + +function arrayToPromise(obj) { + return Promise.all(obj.map(toPromise, this)); +} + +/** + * Convert an object of "yieldables" to a promise. + * Uses `Promise.all()` internally. + * + * @param {Object} obj + * @return {Promise} + * @api private + */ + +function objectToPromise(obj){ + var results = new obj.constructor(); + var keys = Object.keys(obj); + var promises = []; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var promise = toPromise.call(this, obj[key]); + if (promise && isPromise(promise)) defer(promise, key); + else results[key] = obj[key]; + } + return Promise.all(promises).then(function () { + return results; + }); + + function defer(promise, key) { + // predefine the key in the result + results[key] = undefined; + promises.push(promise.then(function (res) { + results[key] = res; + })); + } +} + +/** + * Check if `obj` is a promise. + * + * @param {Object} obj + * @return {Boolean} + * @api private + */ + +function isPromise(obj) { + return 'function' == typeof obj.then; +} + +/** + * Check if `obj` is a generator. + * + * @param {Mixed} obj + * @return {Boolean} + * @api private + */ + +function isGenerator(obj) { + return 'function' == typeof obj.next && 'function' == typeof obj.throw; +} + +/** + * Check if `obj` is a generator function. + * + * @param {Mixed} obj + * @return {Boolean} + * @api private + */ +function isGeneratorFunction(obj) { + var constructor = obj.constructor; + if (!constructor) return false; + if ('GeneratorFunction' === constructor.name || 'GeneratorFunction' === constructor.displayName) return true; + return isGenerator(constructor.prototype); +} + +/** + * Check for plain object. + * + * @param {Mixed} val + * @return {Boolean} + * @api private + */ + +function isObject(val) { + return Object == val.constructor; +} + +},{}],41:[function(require,module,exports){ +'use strict'; + +module.exports = function equal(a, b) { + if (a === b) return true; + + var arrA = Array.isArray(a) + , arrB = Array.isArray(b) + , i; + + if (arrA && arrB) { + if (a.length != b.length) return false; + for (i = 0; i < a.length; i++) + if (!equal(a[i], b[i])) return false; + return true; + } + + if (arrA != arrB) return false; + + if (a && b && typeof a === 'object' && typeof b === 'object') { + var keys = Object.keys(a); + if (keys.length !== Object.keys(b).length) return false; + + var dateA = a instanceof Date + , dateB = b instanceof Date; + if (dateA && dateB) return a.getTime() == b.getTime(); + if (dateA != dateB) return false; + + var regexpA = a instanceof RegExp + , regexpB = b instanceof RegExp; + if (regexpA && regexpB) return a.toString() == b.toString(); + if (regexpA != regexpB) return false; + + for (i = 0; i < keys.length; i++) + if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; + + for (i = 0; i < keys.length; i++) + if(!equal(a[keys[i]], b[keys[i]])) return false; + + return true; + } + + return false; +}; + +},{}],42:[function(require,module,exports){ +'use strict'; + +module.exports = function (data, opts) { + if (!opts) opts = {}; + if (typeof opts === 'function') opts = { cmp: opts }; + var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false; + + var cmp = opts.cmp && (function (f) { + return function (node) { + return function (a, b) { + var aobj = { key: a, value: node[a] }; + var bobj = { key: b, value: node[b] }; + return f(aobj, bobj); + }; + }; + })(opts.cmp); + + var seen = []; + return (function stringify (node) { + if (node && node.toJSON && typeof node.toJSON === 'function') { + node = node.toJSON(); + } + + if (node === undefined) return; + if (typeof node == 'number') return isFinite(node) ? '' + node : 'null'; + if (typeof node !== 'object') return JSON.stringify(node); + + var i, out; + if (Array.isArray(node)) { + out = '['; + for (i = 0; i < node.length; i++) { + if (i) out += ','; + out += stringify(node[i]) || 'null'; + } + return out + ']'; + } + + if (node === null) return 'null'; + + if (seen.indexOf(node) !== -1) { + if (cycles) return JSON.stringify('__cycle__'); + throw new TypeError('Converting circular structure to JSON'); + } + + var seenIndex = seen.push(node) - 1; + var keys = Object.keys(node).sort(cmp && cmp(node)); + out = ''; + for (i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = stringify(node[key]); + + if (!value) continue; + if (out) out += ','; + out += JSON.stringify(key) + ':' + value; + } + seen.splice(seenIndex, 1); + return '{' + out + '}'; + })(data); +}; + +},{}],43:[function(require,module,exports){ +'use strict'; + +var traverse = module.exports = function (schema, opts, cb) { + if (typeof opts == 'function') { + cb = opts; + opts = {}; + } + _traverse(opts, cb, schema, '', schema); +}; + + +traverse.keywords = { + additionalItems: true, + items: true, + contains: true, + additionalProperties: true, + propertyNames: true, + not: true +}; + +traverse.arrayKeywords = { + items: true, + allOf: true, + anyOf: true, + oneOf: true +}; + +traverse.propsKeywords = { + definitions: true, + properties: true, + patternProperties: true, + dependencies: true +}; + +traverse.skipKeywords = { + enum: true, + const: true, + required: true, + maximum: true, + minimum: true, + exclusiveMaximum: true, + exclusiveMinimum: true, + multipleOf: true, + maxLength: true, + minLength: true, + pattern: true, + format: true, + maxItems: true, + minItems: true, + uniqueItems: true, + maxProperties: true, + minProperties: true +}; + + +function _traverse(opts, cb, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { + if (schema && typeof schema == 'object' && !Array.isArray(schema)) { + cb(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); + for (var key in schema) { + var sch = schema[key]; + if (Array.isArray(sch)) { + if (key in traverse.arrayKeywords) { + for (var i=0; i= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' + }, + + /** Convenience shortcuts */ + baseMinusTMin = base - tMin, + floor = Math.floor, + stringFromCharCode = String.fromCharCode, + + /** Temporary variable */ + key; + + /*--------------------------------------------------------------------------*/ + + /** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ + function error(type) { + throw new RangeError(errors[type]); + } + + /** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ + function map(array, fn) { + var length = array.length; + var result = []; + while (length--) { + result[length] = fn(array[length]); + } + return result; + } + + /** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {Array} A new string of characters returned by the callback + * function. + */ + function mapDomain(string, fn) { + var parts = string.split('@'); + var result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + string = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + string = string.replace(regexSeparators, '\x2E'); + var labels = string.split('.'); + var encoded = map(labels, fn).join('.'); + return result + encoded; + } + + /** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ + function ucs2decode(string) { + var output = [], + counter = 0, + length = string.length, + value, + extra; + while (counter < length) { + value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // high surrogate, and there is a next character + extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // low surrogate + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // unmatched surrogate; only append this code unit, in case the next + // code unit is the high surrogate of a surrogate pair + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; + } + + /** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ + function ucs2encode(array) { + return map(array, function(value) { + var output = ''; + if (value > 0xFFFF) { + value -= 0x10000; + output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); + value = 0xDC00 | value & 0x3FF; + } + output += stringFromCharCode(value); + return output; + }).join(''); + } + + /** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ + function basicToDigit(codePoint) { + if (codePoint - 48 < 10) { + return codePoint - 22; + } + if (codePoint - 65 < 26) { + return codePoint - 65; + } + if (codePoint - 97 < 26) { + return codePoint - 97; + } + return base; + } + + /** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ + function digitToBasic(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); + } + + /** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ + function adapt(delta, numPoints, firstTime) { + var k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); + } + + /** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ + function decode(input) { + // Don't use UCS-2 + var output = [], + inputLength = input.length, + out, + i = 0, + n = initialN, + bias = initialBias, + basic, + j, + index, + oldi, + w, + k, + digit, + t, + /** Cached calculation results */ + baseMinusT; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + + for (j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { + + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + for (oldi = i, w = 1, k = base; /* no condition */; k += base) { + + if (index >= inputLength) { + error('invalid-input'); + } + + digit = basicToDigit(input.charCodeAt(index++)); + + if (digit >= base || digit > floor((maxInt - i) / w)) { + error('overflow'); + } + + i += digit * w; + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + + if (digit < t) { + break; + } + + baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error('overflow'); + } + + w *= baseMinusT; + + } + + out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error('overflow'); + } + + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output + output.splice(i++, 0, n); + + } + + return ucs2encode(output); + } + + /** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ + function encode(input) { + var n, + delta, + handledCPCount, + basicLength, + bias, + j, + m, + q, + k, + t, + currentValue, + output = [], + /** `inputLength` will hold the number of code points in `input`. */ + inputLength, + /** Cached calculation results */ + handledCPCountPlusOne, + baseMinusT, + qMinusT; + + // Convert the input in UCS-2 to Unicode + input = ucs2decode(input); + + // Cache the length + inputLength = input.length; + + // Initialize the state + n = initialN; + delta = 0; + bias = initialBias; + + // Handle the basic code points + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue < 0x80) { + output.push(stringFromCharCode(currentValue)); + } + } + + handledCPCount = basicLength = output.length; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string - if it is not empty - with a delimiter + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + for (m = maxInt, j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow + handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + + if (currentValue < n && ++delta > maxInt) { + error('overflow'); + } + + if (currentValue == n) { + // Represent delta as a generalized variable-length integer + for (q = delta, k = base; /* no condition */; k += base) { + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + if (q < t) { + break; + } + qMinusT = q - t; + baseMinusT = base - t; + output.push( + stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) + ); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + + ++delta; + ++n; + + } + return output.join(''); + } + + /** + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ + function toUnicode(input) { + return mapDomain(input, function(string) { + return regexPunycode.test(string) + ? decode(string.slice(4).toLowerCase()) + : string; + }); + } + + /** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ + function toASCII(input) { + return mapDomain(input, function(string) { + return regexNonASCII.test(string) + ? 'xn--' + encode(string) + : string; + }); + } + + /*--------------------------------------------------------------------------*/ + + /** Define the public API */ + punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '1.4.1', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode + }; + + /** Expose `punycode` */ + // Some AMD build optimizers, like r.js, check for specific condition patterns + // like the following: + if ( + typeof define == 'function' && + typeof define.amd == 'object' && + define.amd + ) { + define('punycode', function() { + return punycode; + }); + } else if (freeExports && freeModule) { + if (module.exports == freeExports) { + // in Node.js, io.js, or RingoJS v0.8.0+ + freeModule.exports = punycode; + } else { + // in Narwhal or RingoJS v0.7.0- + for (key in punycode) { + punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); + } + } + } else { + // in Rhino or a web browser + root.punycode = punycode; + } + +}(this)); + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],45:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +// If obj.hasOwnProperty has been overridden, then calling +// obj.hasOwnProperty(prop) will break. +// See: https://github.com/joyent/node/issues/1707 +function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} + +module.exports = function(qs, sep, eq, options) { + sep = sep || '&'; + eq = eq || '='; + var obj = {}; + + if (typeof qs !== 'string' || qs.length === 0) { + return obj; + } + + var regexp = /\+/g; + qs = qs.split(sep); + + var maxKeys = 1000; + if (options && typeof options.maxKeys === 'number') { + maxKeys = options.maxKeys; + } + + var len = qs.length; + // maxKeys <= 0 means that we should not limit keys count + if (maxKeys > 0 && len > maxKeys) { + len = maxKeys; + } + + for (var i = 0; i < len; ++i) { + var x = qs[i].replace(regexp, '%20'), + idx = x.indexOf(eq), + kstr, vstr, k, v; + + if (idx >= 0) { + kstr = x.substr(0, idx); + vstr = x.substr(idx + 1); + } else { + kstr = x; + vstr = ''; + } + + k = decodeURIComponent(kstr); + v = decodeURIComponent(vstr); + + if (!hasOwnProperty(obj, k)) { + obj[k] = v; + } else if (isArray(obj[k])) { + obj[k].push(v); + } else { + obj[k] = [obj[k], v]; + } + } + + return obj; +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + +},{}],46:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +var stringifyPrimitive = function(v) { + switch (typeof v) { + case 'string': + return v; + + case 'boolean': + return v ? 'true' : 'false'; + + case 'number': + return isFinite(v) ? v : ''; + + default: + return ''; + } +}; + +module.exports = function(obj, sep, eq, name) { + sep = sep || '&'; + eq = eq || '='; + if (obj === null) { + obj = undefined; + } + + if (typeof obj === 'object') { + return map(objectKeys(obj), function(k) { + var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; + if (isArray(obj[k])) { + return map(obj[k], function(v) { + return ks + encodeURIComponent(stringifyPrimitive(v)); + }).join(sep); + } else { + return ks + encodeURIComponent(stringifyPrimitive(obj[k])); + } + }).join(sep); + + } + + if (!name) return ''; + return encodeURIComponent(stringifyPrimitive(name)) + eq + + encodeURIComponent(stringifyPrimitive(obj)); +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + +function map (xs, f) { + if (xs.map) return xs.map(f); + var res = []; + for (var i = 0; i < xs.length; i++) { + res.push(f(xs[i], i)); + } + return res; +} + +var objectKeys = Object.keys || function (obj) { + var res = []; + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key); + } + return res; +}; + +},{}],47:[function(require,module,exports){ +'use strict'; + +exports.decode = exports.parse = require('./decode'); +exports.encode = exports.stringify = require('./encode'); + +},{"./decode":45,"./encode":46}],48:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +var punycode = require('punycode'); +var util = require('./util'); + +exports.parse = urlParse; +exports.resolve = urlResolve; +exports.resolveObject = urlResolveObject; +exports.format = urlFormat; + +exports.Url = Url; + +function Url() { + this.protocol = null; + this.slashes = null; + this.auth = null; + this.host = null; + this.port = null; + this.hostname = null; + this.hash = null; + this.search = null; + this.query = null; + this.pathname = null; + this.path = null; + this.href = null; +} + +// Reference: RFC 3986, RFC 1808, RFC 2396 + +// define these here so at least they only have to be +// compiled once on the first module load. +var protocolPattern = /^([a-z0-9.+-]+:)/i, + portPattern = /:[0-9]*$/, + + // Special case for a simple path URL + simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, + + // RFC 2396: characters reserved for delimiting URLs. + // We actually just auto-escape these. + delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'], + + // RFC 2396: characters not allowed for various reasons. + unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims), + + // Allowed by RFCs, but cause of XSS attacks. Always escape these. + autoEscape = ['\''].concat(unwise), + // Characters that are never ever allowed in a hostname. + // Note that any invalid chars are also handled, but these + // are the ones that are *expected* to be seen, so we fast-path + // them. + nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape), + hostEndingChars = ['/', '?', '#'], + hostnameMaxLen = 255, + hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/, + hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, + // protocols that can allow "unsafe" and "unwise" chars. + unsafeProtocol = { + 'javascript': true, + 'javascript:': true + }, + // protocols that never have a hostname. + hostlessProtocol = { + 'javascript': true, + 'javascript:': true + }, + // protocols that always contain a // bit. + slashedProtocol = { + 'http': true, + 'https': true, + 'ftp': true, + 'gopher': true, + 'file': true, + 'http:': true, + 'https:': true, + 'ftp:': true, + 'gopher:': true, + 'file:': true + }, + querystring = require('querystring'); + +function urlParse(url, parseQueryString, slashesDenoteHost) { + if (url && util.isObject(url) && url instanceof Url) return url; + + var u = new Url; + u.parse(url, parseQueryString, slashesDenoteHost); + return u; +} + +Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) { + if (!util.isString(url)) { + throw new TypeError("Parameter 'url' must be a string, not " + typeof url); + } + + // Copy chrome, IE, opera backslash-handling behavior. + // Back slashes before the query string get converted to forward slashes + // See: https://code.google.com/p/chromium/issues/detail?id=25916 + var queryIndex = url.indexOf('?'), + splitter = + (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#', + uSplit = url.split(splitter), + slashRegex = /\\/g; + uSplit[0] = uSplit[0].replace(slashRegex, '/'); + url = uSplit.join(splitter); + + var rest = url; + + // trim before proceeding. + // This is to support parse stuff like " http://foo.com \n" + rest = rest.trim(); + + if (!slashesDenoteHost && url.split('#').length === 1) { + // Try fast path regexp + var simplePath = simplePathPattern.exec(rest); + if (simplePath) { + this.path = rest; + this.href = rest; + this.pathname = simplePath[1]; + if (simplePath[2]) { + this.search = simplePath[2]; + if (parseQueryString) { + this.query = querystring.parse(this.search.substr(1)); + } else { + this.query = this.search.substr(1); + } + } else if (parseQueryString) { + this.search = ''; + this.query = {}; + } + return this; + } + } + + var proto = protocolPattern.exec(rest); + if (proto) { + proto = proto[0]; + var lowerProto = proto.toLowerCase(); + this.protocol = lowerProto; + rest = rest.substr(proto.length); + } + + // figure out if it's got a host + // user@server is *always* interpreted as a hostname, and url + // resolution will treat //foo/bar as host=foo,path=bar because that's + // how the browser resolves relative URLs. + if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) { + var slashes = rest.substr(0, 2) === '//'; + if (slashes && !(proto && hostlessProtocol[proto])) { + rest = rest.substr(2); + this.slashes = true; + } + } + + if (!hostlessProtocol[proto] && + (slashes || (proto && !slashedProtocol[proto]))) { + + // there's a hostname. + // the first instance of /, ?, ;, or # ends the host. + // + // If there is an @ in the hostname, then non-host chars *are* allowed + // to the left of the last @ sign, unless some host-ending character + // comes *before* the @-sign. + // URLs are obnoxious. + // + // ex: + // http://a@b@c/ => user:a@b host:c + // http://a@b?@c => user:a host:c path:/?@c + + // v0.12 TODO(isaacs): This is not quite how Chrome does things. + // Review our test case against browsers more comprehensively. + + // find the first instance of any hostEndingChars + var hostEnd = -1; + for (var i = 0; i < hostEndingChars.length; i++) { + var hec = rest.indexOf(hostEndingChars[i]); + if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) + hostEnd = hec; + } + + // at this point, either we have an explicit point where the + // auth portion cannot go past, or the last @ char is the decider. + var auth, atSign; + if (hostEnd === -1) { + // atSign can be anywhere. + atSign = rest.lastIndexOf('@'); + } else { + // atSign must be in auth portion. + // http://a@b/c@d => host:b auth:a path:/c@d + atSign = rest.lastIndexOf('@', hostEnd); + } + + // Now we have a portion which is definitely the auth. + // Pull that off. + if (atSign !== -1) { + auth = rest.slice(0, atSign); + rest = rest.slice(atSign + 1); + this.auth = decodeURIComponent(auth); + } + + // the host is the remaining to the left of the first non-host char + hostEnd = -1; + for (var i = 0; i < nonHostChars.length; i++) { + var hec = rest.indexOf(nonHostChars[i]); + if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) + hostEnd = hec; + } + // if we still have not hit it, then the entire thing is a host. + if (hostEnd === -1) + hostEnd = rest.length; + + this.host = rest.slice(0, hostEnd); + rest = rest.slice(hostEnd); + + // pull out port. + this.parseHost(); + + // we've indicated that there is a hostname, + // so even if it's empty, it has to be present. + this.hostname = this.hostname || ''; + + // if hostname begins with [ and ends with ] + // assume that it's an IPv6 address. + var ipv6Hostname = this.hostname[0] === '[' && + this.hostname[this.hostname.length - 1] === ']'; + + // validate a little. + if (!ipv6Hostname) { + var hostparts = this.hostname.split(/\./); + for (var i = 0, l = hostparts.length; i < l; i++) { + var part = hostparts[i]; + if (!part) continue; + if (!part.match(hostnamePartPattern)) { + var newpart = ''; + for (var j = 0, k = part.length; j < k; j++) { + if (part.charCodeAt(j) > 127) { + // we replace non-ASCII char with a temporary placeholder + // we need this to make sure size of hostname is not + // broken by replacing non-ASCII by nothing + newpart += 'x'; + } else { + newpart += part[j]; + } + } + // we test again with ASCII char only + if (!newpart.match(hostnamePartPattern)) { + var validParts = hostparts.slice(0, i); + var notHost = hostparts.slice(i + 1); + var bit = part.match(hostnamePartStart); + if (bit) { + validParts.push(bit[1]); + notHost.unshift(bit[2]); + } + if (notHost.length) { + rest = '/' + notHost.join('.') + rest; + } + this.hostname = validParts.join('.'); + break; + } + } + } + } + + if (this.hostname.length > hostnameMaxLen) { + this.hostname = ''; + } else { + // hostnames are always lower case. + this.hostname = this.hostname.toLowerCase(); + } + + if (!ipv6Hostname) { + // IDNA Support: Returns a punycoded representation of "domain". + // It only converts parts of the domain name that + // have non-ASCII characters, i.e. it doesn't matter if + // you call it with a domain that already is ASCII-only. + this.hostname = punycode.toASCII(this.hostname); + } + + var p = this.port ? ':' + this.port : ''; + var h = this.hostname || ''; + this.host = h + p; + this.href += this.host; + + // strip [ and ] from the hostname + // the host field still retains them, though + if (ipv6Hostname) { + this.hostname = this.hostname.substr(1, this.hostname.length - 2); + if (rest[0] !== '/') { + rest = '/' + rest; + } + } + } + + // now rest is set to the post-host stuff. + // chop off any delim chars. + if (!unsafeProtocol[lowerProto]) { + + // First, make 100% sure that any "autoEscape" chars get + // escaped, even if encodeURIComponent doesn't think they + // need to be. + for (var i = 0, l = autoEscape.length; i < l; i++) { + var ae = autoEscape[i]; + if (rest.indexOf(ae) === -1) + continue; + var esc = encodeURIComponent(ae); + if (esc === ae) { + esc = escape(ae); + } + rest = rest.split(ae).join(esc); + } + } + + + // chop off from the tail first. + var hash = rest.indexOf('#'); + if (hash !== -1) { + // got a fragment string. + this.hash = rest.substr(hash); + rest = rest.slice(0, hash); + } + var qm = rest.indexOf('?'); + if (qm !== -1) { + this.search = rest.substr(qm); + this.query = rest.substr(qm + 1); + if (parseQueryString) { + this.query = querystring.parse(this.query); + } + rest = rest.slice(0, qm); + } else if (parseQueryString) { + // no query string, but parseQueryString still requested + this.search = ''; + this.query = {}; + } + if (rest) this.pathname = rest; + if (slashedProtocol[lowerProto] && + this.hostname && !this.pathname) { + this.pathname = '/'; + } + + //to support http.request + if (this.pathname || this.search) { + var p = this.pathname || ''; + var s = this.search || ''; + this.path = p + s; + } + + // finally, reconstruct the href based on what has been validated. + this.href = this.format(); + return this; +}; + +// format a parsed object into a url string +function urlFormat(obj) { + // ensure it's an object, and not a string url. + // If it's an obj, this is a no-op. + // this way, you can call url_format() on strings + // to clean up potentially wonky urls. + if (util.isString(obj)) obj = urlParse(obj); + if (!(obj instanceof Url)) return Url.prototype.format.call(obj); + return obj.format(); +} + +Url.prototype.format = function() { + var auth = this.auth || ''; + if (auth) { + auth = encodeURIComponent(auth); + auth = auth.replace(/%3A/i, ':'); + auth += '@'; + } + + var protocol = this.protocol || '', + pathname = this.pathname || '', + hash = this.hash || '', + host = false, + query = ''; + + if (this.host) { + host = auth + this.host; + } else if (this.hostname) { + host = auth + (this.hostname.indexOf(':') === -1 ? + this.hostname : + '[' + this.hostname + ']'); + if (this.port) { + host += ':' + this.port; + } + } + + if (this.query && + util.isObject(this.query) && + Object.keys(this.query).length) { + query = querystring.stringify(this.query); + } + + var search = this.search || (query && ('?' + query)) || ''; + + if (protocol && protocol.substr(-1) !== ':') protocol += ':'; + + // only the slashedProtocols get the //. Not mailto:, xmpp:, etc. + // unless they had them to begin with. + if (this.slashes || + (!protocol || slashedProtocol[protocol]) && host !== false) { + host = '//' + (host || ''); + if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname; + } else if (!host) { + host = ''; + } + + if (hash && hash.charAt(0) !== '#') hash = '#' + hash; + if (search && search.charAt(0) !== '?') search = '?' + search; + + pathname = pathname.replace(/[?#]/g, function(match) { + return encodeURIComponent(match); + }); + search = search.replace('#', '%23'); + + return protocol + host + pathname + search + hash; +}; + +function urlResolve(source, relative) { + return urlParse(source, false, true).resolve(relative); +} + +Url.prototype.resolve = function(relative) { + return this.resolveObject(urlParse(relative, false, true)).format(); +}; + +function urlResolveObject(source, relative) { + if (!source) return relative; + return urlParse(source, false, true).resolveObject(relative); +} + +Url.prototype.resolveObject = function(relative) { + if (util.isString(relative)) { + var rel = new Url(); + rel.parse(relative, false, true); + relative = rel; + } + + var result = new Url(); + var tkeys = Object.keys(this); + for (var tk = 0; tk < tkeys.length; tk++) { + var tkey = tkeys[tk]; + result[tkey] = this[tkey]; + } + + // hash is always overridden, no matter what. + // even href="" will remove it. + result.hash = relative.hash; + + // if the relative url is empty, then there's nothing left to do here. + if (relative.href === '') { + result.href = result.format(); + return result; + } + + // hrefs like //foo/bar always cut to the protocol. + if (relative.slashes && !relative.protocol) { + // take everything except the protocol from relative + var rkeys = Object.keys(relative); + for (var rk = 0; rk < rkeys.length; rk++) { + var rkey = rkeys[rk]; + if (rkey !== 'protocol') + result[rkey] = relative[rkey]; + } + + //urlParse appends trailing / to urls like http://www.example.com + if (slashedProtocol[result.protocol] && + result.hostname && !result.pathname) { + result.path = result.pathname = '/'; + } + + result.href = result.format(); + return result; + } + + if (relative.protocol && relative.protocol !== result.protocol) { + // if it's a known url protocol, then changing + // the protocol does weird things + // first, if it's not file:, then we MUST have a host, + // and if there was a path + // to begin with, then we MUST have a path. + // if it is file:, then the host is dropped, + // because that's known to be hostless. + // anything else is assumed to be absolute. + if (!slashedProtocol[relative.protocol]) { + var keys = Object.keys(relative); + for (var v = 0; v < keys.length; v++) { + var k = keys[v]; + result[k] = relative[k]; + } + result.href = result.format(); + return result; + } + + result.protocol = relative.protocol; + if (!relative.host && !hostlessProtocol[relative.protocol]) { + var relPath = (relative.pathname || '').split('/'); + while (relPath.length && !(relative.host = relPath.shift())); + if (!relative.host) relative.host = ''; + if (!relative.hostname) relative.hostname = ''; + if (relPath[0] !== '') relPath.unshift(''); + if (relPath.length < 2) relPath.unshift(''); + result.pathname = relPath.join('/'); + } else { + result.pathname = relative.pathname; + } + result.search = relative.search; + result.query = relative.query; + result.host = relative.host || ''; + result.auth = relative.auth; + result.hostname = relative.hostname || relative.host; + result.port = relative.port; + // to support http.request + if (result.pathname || result.search) { + var p = result.pathname || ''; + var s = result.search || ''; + result.path = p + s; + } + result.slashes = result.slashes || relative.slashes; + result.href = result.format(); + return result; + } + + var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'), + isRelAbs = ( + relative.host || + relative.pathname && relative.pathname.charAt(0) === '/' + ), + mustEndAbs = (isRelAbs || isSourceAbs || + (result.host && relative.pathname)), + removeAllDots = mustEndAbs, + srcPath = result.pathname && result.pathname.split('/') || [], + relPath = relative.pathname && relative.pathname.split('/') || [], + psychotic = result.protocol && !slashedProtocol[result.protocol]; + + // if the url is a non-slashed url, then relative + // links like ../.. should be able + // to crawl up to the hostname, as well. This is strange. + // result.protocol has already been set by now. + // Later on, put the first path part into the host field. + if (psychotic) { + result.hostname = ''; + result.port = null; + if (result.host) { + if (srcPath[0] === '') srcPath[0] = result.host; + else srcPath.unshift(result.host); + } + result.host = ''; + if (relative.protocol) { + relative.hostname = null; + relative.port = null; + if (relative.host) { + if (relPath[0] === '') relPath[0] = relative.host; + else relPath.unshift(relative.host); + } + relative.host = null; + } + mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === ''); + } + + if (isRelAbs) { + // it's absolute. + result.host = (relative.host || relative.host === '') ? + relative.host : result.host; + result.hostname = (relative.hostname || relative.hostname === '') ? + relative.hostname : result.hostname; + result.search = relative.search; + result.query = relative.query; + srcPath = relPath; + // fall through to the dot-handling below. + } else if (relPath.length) { + // it's relative + // throw away the existing file, and take the new path instead. + if (!srcPath) srcPath = []; + srcPath.pop(); + srcPath = srcPath.concat(relPath); + result.search = relative.search; + result.query = relative.query; + } else if (!util.isNullOrUndefined(relative.search)) { + // just pull out the search. + // like href='?foo'. + // Put this after the other two cases because it simplifies the booleans + if (psychotic) { + result.hostname = result.host = srcPath.shift(); + //occationaly the auth can get stuck only in host + //this especially happens in cases like + //url.resolveObject('mailto:local1@domain1', 'local2@domain2') + var authInHost = result.host && result.host.indexOf('@') > 0 ? + result.host.split('@') : false; + if (authInHost) { + result.auth = authInHost.shift(); + result.host = result.hostname = authInHost.shift(); + } + } + result.search = relative.search; + result.query = relative.query; + //to support http.request + if (!util.isNull(result.pathname) || !util.isNull(result.search)) { + result.path = (result.pathname ? result.pathname : '') + + (result.search ? result.search : ''); + } + result.href = result.format(); + return result; + } + + if (!srcPath.length) { + // no path at all. easy. + // we've already handled the other stuff above. + result.pathname = null; + //to support http.request + if (result.search) { + result.path = '/' + result.search; + } else { + result.path = null; + } + result.href = result.format(); + return result; + } + + // if a url ENDs in . or .., then it must get a trailing slash. + // however, if it ends in anything else non-slashy, + // then it must NOT get a trailing slash. + var last = srcPath.slice(-1)[0]; + var hasTrailingSlash = ( + (result.host || relative.host || srcPath.length > 1) && + (last === '.' || last === '..') || last === ''); + + // strip single dots, resolve double dots to parent dir + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = srcPath.length; i >= 0; i--) { + last = srcPath[i]; + if (last === '.') { + srcPath.splice(i, 1); + } else if (last === '..') { + srcPath.splice(i, 1); + up++; + } else if (up) { + srcPath.splice(i, 1); + up--; + } + } + + // if the path is allowed to go above the root, restore leading ..s + if (!mustEndAbs && !removeAllDots) { + for (; up--; up) { + srcPath.unshift('..'); + } + } + + if (mustEndAbs && srcPath[0] !== '' && + (!srcPath[0] || srcPath[0].charAt(0) !== '/')) { + srcPath.unshift(''); + } + + if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) { + srcPath.push(''); + } + + var isAbsolute = srcPath[0] === '' || + (srcPath[0] && srcPath[0].charAt(0) === '/'); + + // put the host back + if (psychotic) { + result.hostname = result.host = isAbsolute ? '' : + srcPath.length ? srcPath.shift() : ''; + //occationaly the auth can get stuck only in host + //this especially happens in cases like + //url.resolveObject('mailto:local1@domain1', 'local2@domain2') + var authInHost = result.host && result.host.indexOf('@') > 0 ? + result.host.split('@') : false; + if (authInHost) { + result.auth = authInHost.shift(); + result.host = result.hostname = authInHost.shift(); + } + } + + mustEndAbs = mustEndAbs || (result.host && srcPath.length); + + if (mustEndAbs && !isAbsolute) { + srcPath.unshift(''); + } + + if (!srcPath.length) { + result.pathname = null; + result.path = null; + } else { + result.pathname = srcPath.join('/'); + } + + //to support request.http + if (!util.isNull(result.pathname) || !util.isNull(result.search)) { + result.path = (result.pathname ? result.pathname : '') + + (result.search ? result.search : ''); + } + result.auth = relative.auth || result.auth; + result.slashes = result.slashes || relative.slashes; + result.href = result.format(); + return result; +}; + +Url.prototype.parseHost = function() { + var host = this.host; + var port = portPattern.exec(host); + if (port) { + port = port[0]; + if (port !== ':') { + this.port = port.substr(1); + } + host = host.substr(0, host.length - port.length); + } + if (host) this.hostname = host; +}; + +},{"./util":49,"punycode":44,"querystring":47}],49:[function(require,module,exports){ +'use strict'; + +module.exports = { + isString: function(arg) { + return typeof(arg) === 'string'; + }, + isObject: function(arg) { + return typeof(arg) === 'object' && arg !== null; + }, + isNull: function(arg) { + return arg === null; + }, + isNullOrUndefined: function(arg) { + return arg == null; + } +}; + +},{}],"ajv":[function(require,module,exports){ +'use strict'; + +var compileSchema = require('./compile') + , resolve = require('./compile/resolve') + , Cache = require('./cache') + , SchemaObject = require('./compile/schema_obj') + , stableStringify = require('fast-json-stable-stringify') + , formats = require('./compile/formats') + , rules = require('./compile/rules') + , $dataMetaSchema = require('./$data') + , patternGroups = require('./patternGroups') + , util = require('./compile/util') + , co = require('co'); + +module.exports = Ajv; + +Ajv.prototype.validate = validate; +Ajv.prototype.compile = compile; +Ajv.prototype.addSchema = addSchema; +Ajv.prototype.addMetaSchema = addMetaSchema; +Ajv.prototype.validateSchema = validateSchema; +Ajv.prototype.getSchema = getSchema; +Ajv.prototype.removeSchema = removeSchema; +Ajv.prototype.addFormat = addFormat; +Ajv.prototype.errorsText = errorsText; + +Ajv.prototype._addSchema = _addSchema; +Ajv.prototype._compile = _compile; + +Ajv.prototype.compileAsync = require('./compile/async'); +var customKeyword = require('./keyword'); +Ajv.prototype.addKeyword = customKeyword.add; +Ajv.prototype.getKeyword = customKeyword.get; +Ajv.prototype.removeKeyword = customKeyword.remove; + +var errorClasses = require('./compile/error_classes'); +Ajv.ValidationError = errorClasses.Validation; +Ajv.MissingRefError = errorClasses.MissingRef; +Ajv.$dataMetaSchema = $dataMetaSchema; + +var META_SCHEMA_ID = 'http://json-schema.org/draft-06/schema'; + +var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes' ]; +var META_SUPPORT_DATA = ['/properties']; + +/** + * Creates validator instance. + * Usage: `Ajv(opts)` + * @param {Object} opts optional options + * @return {Object} ajv instance + */ +function Ajv(opts) { + if (!(this instanceof Ajv)) return new Ajv(opts); + opts = this._opts = util.copy(opts) || {}; + setLogger(this); + this._schemas = {}; + this._refs = {}; + this._fragments = {}; + this._formats = formats(opts.format); + var schemaUriFormat = this._schemaUriFormat = this._formats['uri-reference']; + this._schemaUriFormatFunc = function (str) { return schemaUriFormat.test(str); }; + + this._cache = opts.cache || new Cache; + this._loadingSchemas = {}; + this._compilations = []; + this.RULES = rules(); + this._getId = chooseGetId(opts); + + opts.loopRequired = opts.loopRequired || Infinity; + if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true; + if (opts.serialize === undefined) opts.serialize = stableStringify; + this._metaOpts = getMetaSchemaOptions(this); + + if (opts.formats) addInitialFormats(this); + addDraft6MetaSchema(this); + if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta); + addInitialSchemas(this); + if (opts.patternGroups) patternGroups(this); +} + + + +/** + * Validate data using schema + * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize. + * @this Ajv + * @param {String|Object} schemaKeyRef key, ref or schema object + * @param {Any} data to be validated + * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`). + */ +function validate(schemaKeyRef, data) { + var v; + if (typeof schemaKeyRef == 'string') { + v = this.getSchema(schemaKeyRef); + if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"'); + } else { + var schemaObj = this._addSchema(schemaKeyRef); + v = schemaObj.validate || this._compile(schemaObj); + } + + var valid = v(data); + if (v.$async === true) + return this._opts.async == '*' ? co(valid) : valid; + this.errors = v.errors; + return valid; +} + + +/** + * Create validating function for passed schema. + * @this Ajv + * @param {Object} schema schema object + * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords. + * @return {Function} validating function + */ +function compile(schema, _meta) { + var schemaObj = this._addSchema(schema, undefined, _meta); + return schemaObj.validate || this._compile(schemaObj); +} + + +/** + * Adds schema to the instance. + * @this Ajv + * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored. + * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. + * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead. + * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead. + * @return {Ajv} this for method chaining + */ +function addSchema(schema, key, _skipValidation, _meta) { + if (Array.isArray(schema)){ + for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used. + * @param {Object} options optional options with properties `separator` and `dataVar`. + * @return {String} human readable string with all errors descriptions + */ +function errorsText(errors, options) { + errors = errors || this.errors; + if (!errors) return 'No errors'; + options = options || {}; + var separator = options.separator === undefined ? ', ' : options.separator; + var dataVar = options.dataVar === undefined ? 'data' : options.dataVar; + + var text = ''; + for (var i=0; i=1&&t<=12&&a>=1&&a<=h[t]}function o(e,r){var t=e.match(u);if(!t)return!1;return t[1]<=23&&t[2]<=59&&t[3]<=59&&(!r||t[5])}function i(e){if(E.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var n=e("./util"),l=/^\d\d\d\d-(\d\d)-(\d\d)$/,h=[0,31,29,31,30,31,30,31,31,30,31,30,31],u=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i,c=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*$/i,d=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,f=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,p=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,m=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,v=/^(?:\/(?:[^~/]|~0|~1)*)*$|^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,y=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;r.exports=a,a.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,uri:/^(?:[a-z][a-z0-9+-.]*)(?::|\/)\/?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i,"uri-template":f,url:p,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:c,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:i,uuid:m,"json-pointer":v,"relative-json-pointer":y},a.full={date:s,time:o,"date-time":function(e){var r=e.split(g);return 2==r.length&&s(r[0])&&o(r[1],!0)},uri:function(e){return P.test(e)&&d.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":f,url:p,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:function(e){return e.length<=255&&c.test(e)},ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:i,uuid:m,"json-pointer":v,"relative-json-pointer":y};var g=/t|\s/i,P=/\/|:/,E=/[^\\]\\Z/},{"./util":12}],7:[function(e,r,t){"use strict";function a(e,r,t,P){function E(){var e=C.validate,r=e.apply(null,arguments);return E.errors=e.errors,r}function w(e,t,s,f){var P=!t||t&&t.schema==e;if(t.schema!=r.schema)return a.call($,e,t,s,f);var E=!0===e.$async,w=p({isTop:!0,schema:e,isRoot:P,baseId:f,root:t,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:d.MissingRef,RULES:U,validate:p,util:c,resolve:u,resolveRef:b,usePattern:_,useDefault:x,useCustomRule:F,opts:R,formats:Q,logger:$.logger,self:$});w=h(O,n)+h(I,o)+h(k,i)+h(L,l)+w,R.processCode&&(w=R.processCode(w));var S;try{S=new Function("self","RULES","formats","root","refVal","defaults","customRules","co","equal","ucs2length","ValidationError",w)($,U,Q,r,O,k,L,m,y,v,g),O[0]=S}catch(e){throw $.logger.error("Error compiling schema, function code:",w),e}return S.schema=e,S.errors=null,S.refs=D,S.refVal=O,S.root=P?S:t,E&&(S.$async=!0),!0===R.sourceCode&&(S.source={code:w,patterns:I,defaults:k}),S}function b(e,s,o){s=u.url(e,s);var i,n,l=D[s];if(void 0!==l)return i=O[l],n="refVal["+l+"]",j(i,n);if(!o&&r.refs){var h=r.refs[s];if(void 0!==h)return i=r.refVal[h],n=S(s,i),j(i,n)}n=S(s);var c=u.call($,w,r,s);if(void 0===c){var d=t&&t[s];d&&(c=u.inlineRef(d,R.inlineRefs)?d:a.call($,d,r,t,e))}if(void 0!==c)return function(e,r){O[D[e]]=r}(s,c),j(c,n);!function(e){delete D[e]}(s)}function S(e,r){var t=O.length;return O[t]=r,D[e]=t,"refVal"+t}function j(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&e.$async}}function _(e){var r=A[e];return void 0===r&&(r=A[e]=I.length,I[r]=e),"pattern"+r}function x(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return c.toQuotedString(e);case"object":if(null===e)return"null";var r=f(e),t=q[r];return void 0===t&&(t=q[r]=k.length,k[t]=e),"default"+t}}function F(e,r,t,a){var s=e.definition.validateSchema;if(s&&!1!==$._opts.validateSchema){if(!s(r)){var o="keyword schema is invalid: "+$.errorsText(s.errors);if("log"!=$._opts.validateSchema)throw new Error(o);$.logger.error(o)}}var i,n=e.definition.compile,l=e.definition.inline,h=e.definition.macro;if(n)i=n.call($,r,t,a);else if(h)i=h.call($,r,t,a),!1!==R.validateSchema&&$.validateSchema(i,!0);else if(l)i=l.call($,a,e.keyword,r,t);else if(!(i=e.definition.validate))return;if(void 0===i)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var u=L.length;return L[u]=i,{code:"customRule"+u,validate:i}}var $=this,R=this._opts,O=[void 0],D={},I=[],A={},k=[],q={},L=[],z=function(e,r,t){var a=s.call(this,e,r,t);return a>=0?{index:a,compiling:!0}:(a=this._compilations.length,this._compilations[a]={schema:e,root:r,baseId:t},{index:a,compiling:!1})}.call(this,e,r=r||{schema:e,refVal:O,refs:D},P),C=this._compilations[z.index];if(z.compiling)return C.callValidate=E;var Q=this._formats,U=this.RULES;try{var V=w(e,r,t,P);C.validate=V;var N=C.callValidate;return N&&(N.schema=V.schema,N.errors=null,N.refs=V.refs,N.refVal=V.refVal,N.root=V.root,N.$async=V.$async,R.sourceCode&&(N.source=V.source)),V}finally{(function(e,r,t){var a=s.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}).call(this,e,r,P)}}function s(e,r,t){for(var a=0;a=55296&&r<=56319&&s=r)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw new Error("Cannot access data "+a+" levels up, current level is "+r);if(i="data"+(r-a||""),!s)return i}for(var l=i,h=s.split("/"),c=0;c",y=f?">":"<",g=void 0;if(e.opts.$data&&m&&m.$data){var P=e.util.getData(m.$data,i,e.dataPathArr),E="exclusive"+o,w="exclType"+o,b="exclIsNumber"+o,S="' + "+(_="op"+o)+" + '";s+=" var schemaExcl"+o+" = "+P+"; ",s+=" var "+E+"; var "+w+" = typeof "+(P="schemaExcl"+o)+"; if ("+w+" != 'boolean' && "+w+" != 'undefined' && "+w+" != 'number') { ";g=p;(x=x||[]).push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(g||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: {} ",!1!==e.opts.messages&&(s+=" , message: '"+p+" should be boolean' "),e.opts.verbose&&(s+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var j=s;s=x.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+j+"]); ":" validate.errors = ["+j+"]; return false; ":" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } else if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+w+" == 'number' ? ( ("+E+" = "+a+" === undefined || "+P+" "+v+"= "+a+") ? "+c+" "+y+"= "+P+" : "+c+" "+y+" "+a+" ) : ( ("+E+" = "+P+" === true) ? "+c+" "+y+"= "+a+" : "+c+" "+y+" "+a+" ) || "+c+" !== "+c+") { var op"+o+" = "+E+" ? '"+v+"' : '"+v+"=';"}else{S=v;if((b="number"==typeof m)&&d){var _="'"+S+"'";s+=" if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" ( "+a+" === undefined || "+m+" "+v+"= "+a+" ? "+c+" "+y+"= "+m+" : "+c+" "+y+" "+a+" ) || "+c+" !== "+c+") { "}else{b&&void 0===n?(E=!0,g=p,h=e.errSchemaPath+"/"+p,a=m,y+="="):(b&&(a=Math[f?"min":"max"](m,n)),m===(!b||a)?(E=!0,g=p,h=e.errSchemaPath+"/"+p,y+="="):(E=!1,S+="="));_="'"+S+"'";s+=" if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+c+" "+y+" "+a+" || "+c+" !== "+c+") { "}}g=g||r;var x;(x=x||[]).push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(g||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { comparison: "+_+", limit: "+a+", exclusive: "+E+" } ",!1!==e.opts.messages&&(s+=" , message: 'should be "+S+" ",s+=d?"' + "+a:a+"'"),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";j=s;return s=x.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+j+"]); ":" validate.errors = ["+j+"]; return false; ":" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",u&&(s+=" else { "),s}},{}],14:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;s+="if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+c+".length "+("maxItems"==r?">":"<")+" "+a+") { ";var f=r,p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(f||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ",s+="maxItems"==r?"more":"less",s+=" than ",s+=d?"' + "+a+" + '":""+n,s+=" items' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",u&&(s+=" else { "),s}},{}],15:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;s+="if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=!1===e.opts.unicode?" "+c+".length ":" ucs2length("+c+") ",s+=" "+("maxLength"==r?">":"<")+" "+a+") { ";var f=r,p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(f||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT be ",s+="maxLength"==r?"longer":"shorter",s+=" than ",s+=d?"' + "+a+" + '":""+n,s+=" characters' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",u&&(s+=" else { "),s}},{}],16:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;s+="if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" Object.keys("+c+").length "+("maxProperties"==r?">":"<")+" "+a+") { ";var f=r,p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(f||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ",s+="maxProperties"==r?"more":"less",s+=" than ",s+=d?"' + "+a+" + '":""+n,s+=" properties' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",u&&(s+=" else { "),s}},{}],17:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.schema[r],o=e.schemaPath+e.util.getProperty(r),i=e.errSchemaPath+"/"+r,n=!e.opts.allErrors,l=e.util.copy(e),h="";l.level++;var u="valid"+l.level,c=l.baseId,d=!0,f=s;if(f)for(var p,m=-1,v=f.length-1;m=0)return h&&(a+=" if (true) { "),a;throw new Error('unknown format "'+i+'" is used in schema at path "'+e.errSchemaPath+'"')}var v,y=(v="object"==typeof m&&!(m instanceof RegExp)&&m.validate)&&m.type||"string";if(v){var g=!0===m.async;m=m.validate}if(y!=t)return h&&(a+=" if (true) { "),a;if(g){if(!e.async)throw new Error("async format in sync schema");var P="formats"+e.util.getProperty(i)+".validate";a+=" if (!("+e.yieldAwait+" "+P+"("+u+"))) { "}else{a+=" if (! ";P="formats"+e.util.getProperty(i);v&&(P+=".validate"),a+="function"==typeof m?" "+P+"("+u+") ":" "+P+".test("+u+") ",a+=") { "}}var E=E||[];E.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",a+=d?""+c:""+e.util.toQuotedString(i),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match format \"",a+=d?"' + "+c+" + '":""+e.util.escapeQuotes(i),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=d?"validate.schema"+n:""+e.util.toQuotedString(i),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var w=a;return a=E.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+w+"]); ":" validate.errors = ["+w+"]; return false; ":" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",h&&(a+=" else { "),a}},{}],25:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="valid"+s,d="errs__"+s,f=e.util.copy(e),p="";f.level++;var m="valid"+f.level,v="i"+s,y=f.dataLevel=e.dataLevel+1,g="data"+y,P=e.baseId;if(a+="var "+d+" = errors;var "+c+";",Array.isArray(i)){var E=e.schema.additionalItems;if(!1===E){a+=" "+c+" = "+u+".length <= "+i.length+"; ";var w=l;l=e.errSchemaPath+"/additionalItems",a+=" if (!"+c+") { ";var b=b||[];b.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+i.length+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have more than "+i.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var S=a;a=b.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+S+"]); ":" validate.errors = ["+S+"]; return false; ":" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",l=w,h&&(p+="}",a+=" else { ")}var j=i;if(j)for(var _,x=-1,F=j.length-1;x "+x+") { ";var $=u+"["+x+"]";f.schema=_,f.schemaPath=n+"["+x+"]",f.errSchemaPath=l+"/"+x,f.errorPath=e.util.getPathExpr(e.errorPath,x,e.opts.jsonPointers,!0),f.dataPathArr[y]=x;var R=e.validate(f);f.baseId=P,e.util.varOccurences(R,g)<2?a+=" "+e.util.varReplace(R,g,$)+" ":a+=" var "+g+" = "+$+"; "+R+" ",a+=" } ",h&&(a+=" if ("+m+") { ",p+="}")}if("object"==typeof E&&e.util.schemaHasRules(E,e.RULES.all)){f.schema=E,f.schemaPath=e.schemaPath+".additionalItems",f.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+m+" = true; if ("+u+".length > "+i.length+") { for (var "+v+" = "+i.length+"; "+v+" < "+u+".length; "+v+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);$=u+"["+v+"]";f.dataPathArr[y]=v;R=e.validate(f);f.baseId=P,e.util.varOccurences(R,g)<2?a+=" "+e.util.varReplace(R,g,$)+" ":a+=" var "+g+" = "+$+"; "+R+" ",h&&(a+=" if (!"+m+") break; "),a+=" } } ",h&&(a+=" if ("+m+") { ",p+="}")}}else if(e.util.schemaHasRules(i,e.RULES.all)){f.schema=i,f.schemaPath=n,f.errSchemaPath=l,a+=" for (var "+v+" = 0; "+v+" < "+u+".length; "+v+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);$=u+"["+v+"]";f.dataPathArr[y]=v;R=e.validate(f);f.baseId=P,e.util.varOccurences(R,g)<2?a+=" "+e.util.varReplace(R,g,$)+" ":a+=" var "+g+" = "+$+"; "+R+" ",h&&(a+=" if (!"+m+") break; "),a+=" }"}return h&&(a+=" "+p+" if ("+d+" == errors) {"),a=e.util.cleanUpCode(a)}},{}],26:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n,s+="var division"+o+";if (",d&&(s+=" "+a+" !== undefined && ( typeof "+a+" != 'number' || "),s+=" (division"+o+" = "+c+" / "+a+", ",s+=e.opts.multipleOfPrecision?" Math.abs(Math.round(division"+o+") - division"+o+") > 1e-"+e.opts.multipleOfPrecision+" ":" division"+o+" !== parseInt(division"+o+") ",s+=" ) ",d&&(s+=" ) "),s+=" ) { ";var f=f||[];f.push(s),s="",!1!==e.createErrors?(s+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { multipleOf: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should be multiple of ",s+=d?"' + "+a:a+"'"),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var p=s;return s=f.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+p+"]); ":" validate.errors = ["+p+"]; return false; ":" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",u&&(s+=" else { "),s}},{}],27:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="errs__"+s,d=e.util.copy(e);d.level++;var f="valid"+d.level;if(e.util.schemaHasRules(i,e.RULES.all)){d.schema=i,d.schemaPath=n,d.errSchemaPath=l,a+=" var "+c+" = errors; ";var p=e.compositeRule;e.compositeRule=d.compositeRule=!0,d.createErrors=!1;var m;d.opts.allErrors&&(m=d.opts.allErrors,d.opts.allErrors=!1),a+=" "+e.validate(d)+" ",d.createErrors=!0,m&&(d.opts.allErrors=m),e.compositeRule=d.compositeRule=p,a+=" if ("+f+") { ";var v=v||[];v.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var y=a;a=v.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+y+"]); ":" validate.errors = ["+y+"]; return false; ":" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+c+"; if (vErrors !== null) { if ("+c+") vErrors.length = "+c+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",h&&(a+=" if (false) { ");return a}},{}],28:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="valid"+s,d="errs__"+s,f=e.util.copy(e),p="";f.level++;var m="valid"+f.level;a+="var "+d+" = errors;var prevValid"+s+" = false;var "+c+" = false;";var v=f.baseId,y=e.compositeRule;e.compositeRule=f.compositeRule=!0;var g=i;if(g)for(var P,E=-1,w=g.length-1;E5)a+=" || validate.schema"+n+"["+v+"] ";else{var L=w;if(L)for(var z=-1,C=L.length-1;z= "+ve+"; ",l=e.errSchemaPath+"/patternGroups/minimum",a+=" if (!"+c+") { ";(we=we||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'patternGroups' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { reason: '"+Pe+"', limit: "+ge+", pattern: '"+e.util.escapeQuotes(ce)+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have "+Ee+" than "+ge+' properties matching pattern "'+e.util.escapeQuotes(ce)+"\"' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";B=a;a=we.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+B+"]); ":" validate.errors = ["+B+"]; return false; ":" var err = "+B+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",void 0!==ye&&(a+=" else ")}if(void 0!==ye){ge=ye,Pe="maximum",Ee="more";a+=" "+c+" = pgPropCount"+s+" <= "+ye+"; ",l=e.errSchemaPath+"/patternGroups/maximum",a+=" if (!"+c+") { ";var we;(we=we||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'patternGroups' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { reason: '"+Pe+"', limit: "+ge+", pattern: '"+e.util.escapeQuotes(ce)+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have "+Ee+" than "+ge+' properties matching pattern "'+e.util.escapeQuotes(ce)+"\"' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";B=a;a=we.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+B+"]); ":" validate.errors = ["+B+"]; return false; ":" var err = "+B+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } "}l=K,h&&(a+=" if ("+c+") { ",p+="}")}}}}return h&&(a+=" "+p+" if ("+d+" == errors) {"),a=e.util.cleanUpCode(a)}},{}],31:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="errs__"+s,d=e.util.copy(e);d.level++;var f="valid"+d.level;if(e.util.schemaHasRules(i,e.RULES.all)){d.schema=i,d.schemaPath=n,d.errSchemaPath=l;var p="key"+s,m="idx"+s,v="i"+s,y="' + "+p+" + '",g="data"+(d.dataLevel=e.dataLevel+1),P="dataProperties"+s,E=e.opts.ownProperties,w=e.baseId;a+=" var "+c+" = errors; ",E&&(a+=" var "+P+" = undefined; "),a+=E?" "+P+" = "+P+" || Object.keys("+u+"); for (var "+m+"=0; "+m+"<"+P+".length; "+m+"++) { var "+p+" = "+P+"["+m+"]; ":" for (var "+p+" in "+u+") { ",a+=" var startErrs"+s+" = errors; ";var b=p,S=e.compositeRule;e.compositeRule=d.compositeRule=!0;var j=e.validate(d);d.baseId=w,e.util.varOccurences(j,g)<2?a+=" "+e.util.varReplace(j,g,b)+" ":a+=" var "+g+" = "+b+"; "+j+" ",e.compositeRule=d.compositeRule=S,a+=" if (!"+f+") { for (var "+v+"=startErrs"+s+"; "+v+"=e.opts.loopRequired,b=e.opts.ownProperties;if(h)if(a+=" var missing"+s+"; ",w){d||(a+=" var "+f+" = validate.schema"+n+"; ");var S="' + "+(R="schema"+s+"["+(x="i"+s)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(E,R,e.opts.jsonPointers)),a+=" var "+c+" = true; ",d&&(a+=" if (schema"+s+" === undefined) "+c+" = true; else if (!Array.isArray(schema"+s+")) "+c+" = false; else {"),a+=" for (var "+x+" = 0; "+x+" < "+f+".length; "+x+"++) { "+c+" = "+u+"["+f+"["+x+"]] !== undefined ",b&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", "+f+"["+x+"]) "),a+="; if (!"+c+") break; } ",d&&(a+=" } "),a+=" if (!"+c+") { ";($=$||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",a+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var j=a;a=$.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+j+"]); ":" validate.errors = ["+j+"]; return false; ":" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var _=p;if(_)for(var x=-1,F=_.length-1;x 1) { var i = "+c+".length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal("+c+"[i], "+c+"[j])) { "+d+" = false; break outer; } } } } ",f&&(s+=" } "),s+=" if (!"+d+") { ";var p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(s+=" , schema: ",s+=f?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var m=s;s=p.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",u&&(s+=" else { ")}else u&&(s+=" if (true) { ");return s}},{}],35:[function(e,r,t){"use strict";r.exports=function(e,r,t){function a(e){for(var r=e.rules,t=0;t2&&(r=n.call(arguments,1)),t(r)})})}.call(this,e):Array.isArray(e)?function(e){return Promise.all(e.map(s,this))}.call(this,e):function(e){return Object==e.constructor}(e)?function(e){for(var r=new e.constructor,t=Object.keys(e),a=[],i=0;i1&&(a=t[0]+"@",e=t[1]);return a+o((e=e.replace(O,".")).split("."),r).join(".")}function n(e){for(var r,t,a=[],s=0,o=e.length;s=55296&&r<=56319&&s65535&&(r+=k((e-=65536)>>>10&1023|55296),e=56320|1023&e),r+=k(e)}).join("")}function h(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:E}function u(e,r){return e+22+75*(e<26)-((0!=r)<<5)}function c(e,r,t){var a=0;for(e=t?A(e/j):e>>1,e+=A(e/r);e>I*b>>1;a+=E)e=A(e/I);return A(a+(I+1)*e/(e+S))}function d(e){var r,t,a,o,i,n,u,d,f,p,m=[],v=e.length,y=0,g=x,S=_;for((t=e.lastIndexOf(F))<0&&(t=0),a=0;a=128&&s("not-basic"),m.push(e.charCodeAt(a));for(o=t>0?t+1:0;o=v&&s("invalid-input"),((d=h(e.charCodeAt(o++)))>=E||d>A((P-y)/n))&&s("overflow"),y+=d*n,f=u<=S?w:u>=S+b?b:u-S,!(dA(P/(p=E-f))&&s("overflow"),n*=p;S=c(y-i,r=m.length+1,0==i),A(y/r)>P-g&&s("overflow"),g+=A(y/r),y%=r,m.splice(y++,0,g)}return l(m)}function f(e){var r,t,a,o,i,l,h,d,f,p,m,v,y,g,S,j=[];for(v=(e=n(e)).length,r=x,t=0,i=_,l=0;l=r&&mA((P-t)/(y=a+1))&&s("overflow"),t+=(h-r)*y,r=h,l=0;lP&&s("overflow"),m==r){for(d=t,f=E;p=f<=i?w:f>=i+b?b:f-i,!(d= 0x80 (not a basic code point)","invalid-input":"Invalid input"},I=E-w,A=Math.floor,k=String.fromCharCode;if(y={version:"1.4.1",ucs2:{decode:n,encode:l},decode:d,encode:f,toASCII:function(e){return i(e,function(e){return R.test(e)?"xn--"+f(e):e})},toUnicode:function(e){return i(e,function(e){return $.test(e)?d(e.slice(4).toLowerCase()):e})}},p&&m)if(r.exports==p)m.exports=y;else for(g in y)y.hasOwnProperty(g)&&(p[g]=y[g]);else a.punycode=y}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],45:[function(e,r,t){"use strict";function a(e,r){return Object.prototype.hasOwnProperty.call(e,r)}r.exports=function(e,r,t,o){r=r||"&",t=t||"=";var i={};if("string"!=typeof e||0===e.length)return i;var n=/\+/g;e=e.split(r);var l=1e3;o&&"number"==typeof o.maxKeys&&(l=o.maxKeys);var h=e.length;l>0&&h>l&&(h=l);for(var u=0;u=0?(c=m.substr(0,v),d=m.substr(v+1)):(c=m,d=""),f=decodeURIComponent(c),p=decodeURIComponent(d),a(i,f)?s(i[f])?i[f].push(p):i[f]=[i[f],p]:i[f]=p}return i};var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],46:[function(e,r,t){"use strict";function a(e,r){if(e.map)return e.map(r);for(var t=[],a=0;a",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(u),d=["%","/","?",";","#"].concat(c),f=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},P=e("querystring");a.prototype.parse=function(e,r,t){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),s=-1!==a&&a127?A+="x":A+=I[k];if(!A.match(p)){var L=O.slice(0,_),z=O.slice(_+1),C=I.match(m);C&&(L.push(C[1]),z.unshift(C[2])),z.length&&(u="/"+z.join(".")+u),this.hostname=L.join(".");break}}}this.hostname=this.hostname.length>255?"":this.hostname.toLowerCase(),R||(this.hostname=o.toASCII(this.hostname));var Q=this.port?":"+this.port:"";this.host=(this.hostname||"")+Q,this.href+=this.host,R&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==u[0]&&(u="/"+u))}if(!v[b])for(_=0,D=c.length;_0)&&t.host.split("@"))&&(t.auth=$.shift(),t.host=t.hostname=$.shift())}return t.search=e.search,t.query=e.query,i.isNull(t.pathname)&&i.isNull(t.search)||(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.href=t.format(),t}if(!w.length)return t.pathname=null,t.path=t.search?"/"+t.search:null,t.href=t.format(),t;for(var S=w.slice(-1)[0],j=(t.host||e.host||w.length>1)&&("."===S||".."===S)||""===S,_=0,x=w.length;x>=0;x--)"."===(S=w[x])?w.splice(x,1):".."===S?(w.splice(x,1),_++):_&&(w.splice(x,1),_--);if(!P&&!E)for(;_--;_)w.unshift("..");!P||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),j&&"/"!==w.join("/").substr(-1)&&w.push("");var F=""===w[0]||w[0]&&"/"===w[0].charAt(0);if(b){t.hostname=t.host=F?"":w.length?w.shift():"";var $;($=!!(t.host&&t.host.indexOf("@")>0)&&t.host.split("@"))&&(t.auth=$.shift(),t.host=t.hostname=$.shift())}return(P=P||t.host&&w.length)&&!F&&w.unshift(""),w.length?t.pathname=w.join("/"):(t.pathname=null,t.path=null),i.isNull(t.pathname)&&i.isNull(t.search)||(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.auth=e.auth||t.auth,t.slashes=t.slashes||e.slashes,t.href=t.format(),t},a.prototype.parseHost=function(){var e=this.host,r=l.exec(e);r&&(":"!==(r=r[0])&&(this.port=r.substr(1)),e=e.substr(0,e.length-r.length)),e&&(this.hostname=e)}},{"./util":49,punycode:44,querystring:47}],49:[function(e,r,t){"use strict";r.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],ajv:[function(e,r,t){"use strict";function a(r){if(!(this instanceof a))return new a(r);r=this._opts=E.copy(r)||{},function(e){var r=e._opts.logger;if(!1===r)e.logger={log:u,warn:u,error:u};else{if(void 0===r&&(r=console),!("object"==typeof r&&r.log&&r.warn&&r.error))throw new Error("logger must implement log, warn and error methods");e.logger=r}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=v(r.format);var t=this._schemaUriFormat=this._formats["uri-reference"];this._schemaUriFormatFunc=function(e){return t.test(e)},this._cache=r.cache||new f,this._loadingSchemas={},this._compilations=[],this.RULES=y(),this._getId=function(e){switch(e.schemaId){case"$id":return n;case"id":return i;default:return l}}(r),r.loopRequired=r.loopRequired||1/0,"property"==r.errorDataPath&&(r._errorDataPathProperty=!0),void 0===r.serialize&&(r.serialize=m),this._metaOpts=function(e){for(var r=E.copy(e._opts),t=0;t<_.length;t++)delete r[_[t]];return r}(this),r.formats&&function(e){for(var r in e._opts.formats){var t=e._opts.formats[r];e.addFormat(r,t)}}(this),function(r){var t;r._opts.$data&&(t=e("./refs/$data.json"),r.addMetaSchema(t,t.$id,!0));if(!1===r._opts.meta)return;var a=e("./refs/json-schema-draft-06.json");r._opts.$data&&(a=g(a,x));r.addMetaSchema(a,j,!0),r._refs["http://json-schema.org/schema"]=j}(this),"object"==typeof r.meta&&this.addMetaSchema(r.meta),function(e){var r=e._opts.schemas;if(!r)return;if(Array.isArray(r))e.addSchema(r);else for(var t in r)e.addSchema(r[t],t)}(this),r.patternGroups&&P(this)}function s(e,r){return r=d.normalizeId(r),e._schemas[r]||e._refs[r]||e._fragments[r]}function o(e,r,t){for(var a in r){var s=r[a];s.meta||t&&!t.test(a)||(e._cache.del(s.cacheKey),delete r[a])}}function i(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function n(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function l(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function h(e,r){if(e._schemas[r]||e._refs[r])throw new Error('schema with key or id "'+r+'" already exists')}function u(){}var c=e("./compile"),d=e("./compile/resolve"),f=e("./cache"),p=e("./compile/schema_obj"),m=e("fast-json-stable-stringify"),v=e("./compile/formats"),y=e("./compile/rules"),g=e("./$data"),P=e("./patternGroups"),E=e("./compile/util"),w=e("co");r.exports=a,a.prototype.validate=function(e,r){var t;if("string"==typeof e){if(!(t=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var a=this._addSchema(e);t=a.validate||this._compile(a)}var s=t(r);return!0===t.$async?"*"==this._opts.async?w(s):s:(this.errors=t.errors,s)},a.prototype.compile=function(e,r){var t=this._addSchema(e,void 0,r);return t.validate||this._compile(t)},a.prototype.addSchema=function(e,r,t,a){if(Array.isArray(e)){for(var s=0;s=t}function i(e,t,n){var r=t.input.slice(t.start);return n&&(r=r.replace(l,"$1 $3")),e.test(r)}function s(e,t,n,r){var i=new e.constructor(e.options,e.input,t);if(n)for(var s in n)i[s]=n[s];var o=e,a=i;return["inFunction","inAsyncFunction","inAsync","inGenerator","inModule"].forEach(function(e){e in o&&(a[e]=o[e])}),r&&(i.options.preserveParens=!0),i.nextToken(),i}var o={},a=/^async[\t ]+(return|throw)/,u=/^async[\t ]+function/,c=/^\s*[():;]/,l=/([^\n])\/\*(\*(?!\/)|[^\n*])*\*\/([^\n])/g,p=/\s*(get|set)\s*\(/;t.exports=function(e,t){var n=function(){};e.extend("initialContext",function(r){return function(){return this.options.ecmaVersion<7&&(n=function(t){e.raise(t.start,"async/await keywords only available when ecmaVersion>=7")}),this.reservedWords=new RegExp(this.reservedWords.toString().replace(/await|async/g,"").replace("|/","/").replace("/|","/").replace("||","|")),this.reservedWordsStrict=new RegExp(this.reservedWordsStrict.toString().replace(/await|async/g,"").replace("|/","/").replace("/|","/").replace("||","|")),this.reservedWordsStrictBind=new RegExp(this.reservedWordsStrictBind.toString().replace(/await|async/g,"").replace("|/","/").replace("/|","/").replace("||","|")),this.inAsyncFunction=t.inAsyncFunction,t.awaitAnywhere&&t.inAsyncFunction&&e.raise(node.start,"The options awaitAnywhere and inAsyncFunction are mutually exclusive"),r.apply(this,arguments)}}),e.extend("shouldParseExportStatement",function(e){return function(){return!("name"!==this.type.label||"async"!==this.value||!i(u,this))||e.apply(this,arguments)}}),e.extend("parseStatement",function(e){return function(n,r){var s=this.start,o=this.startLoc;if("name"===this.type.label)if(i(u,this,!0)){var c=this.inAsyncFunction;try{return this.inAsyncFunction=!0,this.next(),(l=this.parseStatement(n,r)).async=!0,l.start=s,l.loc&&(l.loc.start=o),l.range&&(l.range[0]=s),l}finally{this.inAsyncFunction=c}}else if("object"==typeof t&&t.asyncExits&&i(a,this)){this.next();var l;return(l=this.parseStatement(n,r)).async=!0,l.start=s,l.loc&&(l.loc.start=o),l.range&&(l.range[0]=s),l}return e.apply(this,arguments)}}),e.extend("parseIdent",function(e){return function(t){var n=e.apply(this,arguments);return this.inAsyncFunction&&"await"===n.name&&0===arguments.length&&this.raise(n.start,"'await' is reserved within async functions"),n}}),e.extend("parseExprAtom",function(e){return function(i){var a,u=this.start,l=this.startLoc,p=e.apply(this,arguments);if("Identifier"===p.type)if("async"!==p.name||r(this,p.end)){if("await"===p.name){var h=this.startNodeAt(p.start,p.loc&&p.loc.start);if(this.inAsyncFunction)return a=this.parseExprSubscripts(),h.operator="await",h.argument=a,h=this.finishNodeAt(h,"AwaitExpression",a.end,a.loc&&a.loc.end),n(h),h;if(this.input.slice(p.end).match(c))return t.awaitAnywhere||"module"!==this.options.sourceType?p:this.raise(p.start,"'await' is reserved within modules");if("object"==typeof t&&t.awaitAnywhere&&(u=this.start,(a=s(this,u-4).parseExprSubscripts()).end<=u))return a=s(this,u).parseExprSubscripts(),h.operator="await",h.argument=a,h=this.finishNodeAt(h,"AwaitExpression",a.end,a.loc&&a.loc.end),this.pos=a.end,this.end=a.end,this.endLoc=a.endLoc,this.next(),n(h),h;if(!t.awaitAnywhere&&"module"===this.options.sourceType)return this.raise(p.start,"'await' is reserved within modules")}}else{var f=this.inAsyncFunction;try{this.inAsyncFunction=!0;var d=this,y=!1,m={parseFunctionBody:function(e,t){try{var n=y;return y=!0,d.parseFunctionBody.apply(this,arguments)}finally{y=n}},raise:function(){try{return d.raise.apply(this,arguments)}catch(e){throw y?e:o}}};if("SequenceExpression"===(a=s(this,this.start,m,!0).parseExpression()).type&&(a=a.expressions[0]),"CallExpression"===a.type&&(a=a.callee),"FunctionExpression"===a.type||"FunctionDeclaration"===a.type||"ArrowFunctionExpression"===a.type)return"SequenceExpression"===(a=s(this,this.start,m).parseExpression()).type&&(a=a.expressions[0]),"CallExpression"===a.type&&(a=a.callee),a.async=!0,a.start=u,a.loc&&(a.loc.start=l),a.range&&(a.range[0]=u),this.pos=a.end,this.end=a.end,this.endLoc=a.endLoc,this.next(),n(a),a}catch(e){if(e!==o)throw e}finally{this.inAsyncFunction=f}}return p}}),e.extend("finishNodeAt",function(e){return function(t,n,r,i){return t.__asyncValue&&(delete t.__asyncValue,t.value.async=!0),e.apply(this,arguments)}}),e.extend("finishNode",function(e){return function(t,n){return t.__asyncValue&&(delete t.__asyncValue,t.value.async=!0),e.apply(this,arguments)}}),e.extend("parsePropertyName",function(e){return function(t){t.key&&t.key.name;var i=e.apply(this,arguments);return"Identifier"!==i.type||"async"!==i.name||r(this,i.end)||this.input.slice(i.end).match(c)||(p.test(this.input.slice(i.end))?(i=e.apply(this,arguments),t.__asyncValue=!0):(n(t),"set"===t.kind&&this.raise(i.start,"'set (value)' cannot be be async"),"Identifier"===(i=e.apply(this,arguments)).type&&"set"===i.name&&this.raise(i.start,"'set (value)' cannot be be async"),t.__asyncValue=!0)),i}}),e.extend("parseClassMethod",function(e){return function(t,n,r){var i;n.__asyncValue&&("constructor"===n.kind&&this.raise(n.start,"class constructor() cannot be be async"),i=this.inAsyncFunction,this.inAsyncFunction=!0);var s=e.apply(this,arguments);return this.inAsyncFunction=i,s}}),e.extend("parseMethod",function(e){return function(t){var n;this.__currentProperty&&this.__currentProperty.__asyncValue&&(n=this.inAsyncFunction,this.inAsyncFunction=!0);var r=e.apply(this,arguments);return this.inAsyncFunction=n,r}}),e.extend("parsePropertyValue",function(e){return function(t,n,r,i,s,o){var a=this.__currentProperty;this.__currentProperty=t;var u;t.__asyncValue&&(u=this.inAsyncFunction,this.inAsyncFunction=!0);var c=e.apply(this,arguments);return this.inAsyncFunction=u,this.__currentProperty=a,c}})}},{}],3:[function(e,t,n){function r(e,t,n){var r=new e.constructor(e.options,e.input,t);if(n)for(var i in n)r[i]=n[i];var s=e,o=r;return["inFunction","inAsync","inGenerator","inModule"].forEach(function(e){e in s&&(o[e]=s[e])}),r.nextToken(),r}var i=/^async[\t ]+(return|throw)/,s=/^\s*[):;]/,o=/([^\n])\/\*(\*(?!\/)|[^\n*])*\*\/([^\n])/g;t.exports=function(e,t){t&&"object"==typeof t||(t={}),e.extend("parse",function(n){return function(){return this.inAsync=t.inAsyncFunction,t.awaitAnywhere&&t.inAsyncFunction&&e.raise(node.start,"The options awaitAnywhere and inAsyncFunction are mutually exclusive"),n.apply(this,arguments)}}),e.extend("parseStatement",function(e){return function(n,r){var s=this.start,a=this.startLoc;if("name"===this.type.label&&t.asyncExits&&function(e,t,n){var r=t.input.slice(t.start);return n&&(r=r.replace(o,"$1 $3")),e.test(r)}(i,this)){this.next();var u=this.parseStatement(n,r);return u.async=!0,u.start=s,u.loc&&(u.loc.start=a),u.range&&(u.range[0]=s),u}return e.apply(this,arguments)}}),e.extend("parseIdent",function(e){return function(n){return"module"===this.options.sourceType&&this.options.ecmaVersion>=8&&t.awaitAnywhere?e.call(this,!0):e.apply(this,arguments)}}),e.extend("parseExprAtom",function(e){var n={};return function(i){var s,o=this.start,a=(this.startLoc,e.apply(this,arguments));if("Identifier"===a.type&&"await"===a.name&&!this.inAsync&&t.awaitAnywhere){var u=this.startNodeAt(a.start,a.loc&&a.loc.start);o=this.start;var c={raise:function(){try{return pp.raise.apply(this,arguments)}catch(e){throw n}}};try{if((s=r(this,o-4,c).parseExprSubscripts()).end<=o)return s=r(this,o,c).parseExprSubscripts(),u.argument=s,u=this.finishNodeAt(u,"AwaitExpression",s.end,s.loc&&s.loc.end),this.pos=s.end,this.end=s.end,this.endLoc=s.endLoc,this.next(),u}catch(e){if(e===n)return a;throw e}}return a}});var n={undefined:!0,get:!0,set:!0,static:!0,async:!0,constructor:!0};e.extend("parsePropertyName",function(e){return function(t){var r=t.key&&t.key.name,i=e.apply(this,arguments);return"get"===this.value&&(t.__maybeStaticAsyncGetter=!0),n[this.value]?i:("Identifier"!==i.type||"async"!==i.name&&"async"!==r||function(e,t){return e.lineStart>=t}(this,i.end)||this.input.slice(i.end).match(s)?delete t.__maybeStaticAsyncGetter:"set"===t.kind||"set"===i.name?this.raise(i.start,"'set (value)' cannot be be async"):(this.__isAsyncProp=!0,"Identifier"===(i=e.apply(this,arguments)).type&&"set"===i.name&&this.raise(i.start,"'set (value)' cannot be be async")),i)}}),e.extend("parseClassMethod",function(e){return function(t,n,r){var i=e.apply(this,arguments);return n.__maybeStaticAsyncGetter&&(delete n.__maybeStaticAsyncGetter,"get"!==n.key.name&&(n.kind="get")),i}}),e.extend("parseFunctionBody",function(e){return function(t,n){var r=this.inAsync;this.__isAsyncProp&&(t.async=!0,this.inAsync=!0,delete this.__isAsyncProp);var i=e.apply(this,arguments);return this.inAsync=r,i}})}},{}],4:[function(e,t,n){!function(e,r){"object"==typeof n&&void 0!==t?r(n):"function"==typeof define&&define.amd?define(["exports"],r):r(e.acorn=e.acorn||{})}(this,function(e){"use strict";function t(e,t){for(var n=65536,r=0;re)return!1;if((n+=t[r+1])>=e)return!0}}function n(e,n){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&x.test(String.fromCharCode(e)):!1!==n&&t(e,E)))}function r(e,n){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&w.test(String.fromCharCode(e)):!1!==n&&(t(e,E)||t(e,S)))))}function i(e,t){return new k(e,{beforeExpr:!0,binop:t})}function s(e,t){return void 0===t&&(t={}),t.keyword=e,_[e]=new k(e,t)}function o(e){return 10===e||13===e||8232===e||8233===e}function a(e,t){return $.call(e,t)}function u(e,t){for(var n=1,r=0;;){T.lastIndex=r;var i=T.exec(e);if(!(i&&i.index=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),R(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}return R(t.onComment)&&(t.onComment=function(e,t){return function(n,r,i,s,o,a){var u={type:n?"Block":"Line",value:r,start:i,end:s};e.locations&&(u.loc=new j(this,o,a)),e.ranges&&(u.range=[i,s]),t.push(u)}}(t,t.onComment)),t}function l(e){return new RegExp("^(?:"+e.replace(/ /g,"|")+")$")}function p(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=-1}function h(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}function f(e,t,n,r){try{return new RegExp(e,t)}catch(e){if(void 0!==n)throw e instanceof SyntaxError&&r.raise(n,"Error parsing regular expression: "+e.message),e}}function d(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}var y={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},m="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",g={5:m,6:m+" const class extends export import super"},v="ªµºÀ-ÖØ-öø-ˈ-Ë‘Ë -ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ÒÒŠ-Ô¯Ô±-Õ–Õ™Õ¡-Ö‡×-תװ-ײؠ-يٮٯٱ-Û“Û•Û¥Û¦Û®Û¯Ûº-Û¼Û¿ÜÜ’-ܯÝ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽà¥à¥˜-ॡॱ-ঀঅ-ঌà¦à¦à¦“-নপ-রলশ-হঽৎড়à§à§Ÿ-ৡৰৱਅ-ਊà¨à¨à¨“-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-àªàª-ઑઓ-નપ-રલળવ-હઽà«à« à«¡à«¹à¬…-ଌà¬à¬à¬“-ନପ-ରଲଳଵ-ହଽଡ଼à­à­Ÿ-ୡୱஃஅ-ஊஎ-à®à®’-கஙசஜஞடணதந-பம-ஹà¯à°…-ఌఎ-à°à°’-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-à²à²’-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-à´à´’-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-à·†à¸-ะาำเ-ๆàºàº‚ຄງຈຊàºàº”-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿá-á•áš-áá¡á¥á¦á®-á°áµ-á‚á‚Žá‚ -ჅჇáƒáƒ-ჺჼ-ቈቊ-á‰á‰-ቖቘቚ-á‰á‰ -ኈኊ-áŠáŠ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-áŒáŒ’-ጕጘ-ášáŽ€-áŽáŽ -áµá¸-á½á-ᙬᙯ-ᙿáš-áššáš -ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱá€-á‘á -á¬á®-á°áž€-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞá¥-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-á°£á±-á±á±š-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-á¼á¼ -ὅὈ-á½á½-ὗὙὛá½á½Ÿ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-á¿Œá¿-á¿“á¿–-Ίῠ-Ῥῲ-ῴῶ-ῼâ±â¿â‚-ₜℂℇℊ-ℓℕ℘-â„ℤΩℨK-ℹℼ-â„¿â……-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-â·Žâ·-â·–â·˜-ⷞ々-〇〡-〩〱-〵〸-〼ã-ã‚–ã‚›-ã‚Ÿã‚¡-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿã€-䶵一-鿕ꀀ-ê’Œê“-ꓽꔀ-ꘌê˜-ꘟꘪꘫꙀ-ꙮꙿ-êšêš -ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ê ê ƒ-ê …ê ‡-ê Šê Œ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲê§ê§ -ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ê©‚ê©„-ê©‹ê© -ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ê«ê« -ꫪꫲ-ê«´ê¬-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ê­šê­œ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-ï©­ï©°-龎ff-stﬓ-ﬗï¬ï¬Ÿ-ﬨשׁ-זּטּ-לּמּנּï­ï­ƒï­„ï­†-ﮱﯓ-ï´½ïµ-ï¶ï¶’-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Zï½-zヲ-하-ᅦᅧ-ï¿ï¿’-ï¿—ï¿š-ï¿œ",b="‌â€Â·Ì€-ͯ·҃-Ò‡Ö‘-Ö½Ö¿×ׇׂׅׄØ-ØšÙ‹-٩ٰۖ-ۜ۟-Û¤Û§Û¨Ûª-Û­Û°-۹ܑܰ-ÝŠÞ¦-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-à ­à¡™-࡛ࣔ-ࣣ࣡-ःऺ-़ा-à¥à¥‘-ॗॢॣ०-९à¦-ঃ়া-ৄেৈো-à§à§—ৢৣ০-৯à¨-ਃ਼ਾ-ੂੇੈੋ-à©à©‘੦-ੱੵàª-ઃ઼ા-ૅે-ૉો-à«à«¢à«£à«¦-૯à¬-ଃ଼ା-ୄେୈୋ-à­à­–ୗୢୣ୦-୯ஂா-ூெ-ைொ-à¯à¯—௦-௯ఀ-ఃా-ౄె-ైొ-à±à±•à±–ౢౣ౦-౯à²-ಃ಼ಾ-ೄೆ-ೈೊ-à³à³•à³–ೢೣ೦-೯à´-ഃാ-ൄെ-ൈൊ-àµàµ—ൢൣ൦-൯ංඃ්à·-ුූෘ-à·Ÿà·¦-෯ෲෳัิ-ฺ็-๎à¹-๙ັິ-ູົຼ່-à»à»-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇à¾-ྗྙ-ྼ࿆ါ-ှá€-á‰á–-á™áž-á á¢-á¤á§-á­á±-á´á‚‚-á‚á‚-á‚á-áŸá©-á±áœ’-᜔ᜲ-᜴á’á“á²á³áž´-៓áŸáŸ -៩᠋-á á -᠙ᢩᤠ-ᤫᤰ-᤻᥆-á¥á§-᧚ᨗ-ᨛᩕ-á©žá© -᩿᩼-᪉áª-᪙᪰-᪽ᬀ-ᬄ᬴-á­„á­-᭙᭫-᭳ᮀ-ᮂᮡ-á®­á®°-᮹᯦-᯳ᰤ-á°·á±€-᱉á±-á±™á³-á³’á³”-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿â€â”âƒ-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀê¢ê¢´-ꣅê£-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀ê§-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌê©ê©-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿ê«ê««-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-ï¸ï¸ -︯︳︴ï¹-ï¹ï¼-9_",x=new RegExp("["+v+"]"),w=new RegExp("["+v+b+"]");v=b=null;var E=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,10591,541],S=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239],k=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null},A={beforeExpr:!0},C={startsExpr:!0},_={},L={num:new k("num",C),regexp:new k("regexp",C),string:new k("string",C),name:new k("name",C),eof:new k("eof"),bracketL:new k("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new k("]"),braceL:new k("{",{beforeExpr:!0,startsExpr:!0}),braceR:new k("}"),parenL:new k("(",{beforeExpr:!0,startsExpr:!0}),parenR:new k(")"),comma:new k(",",A),semi:new k(";",A),colon:new k(":",A),dot:new k("."),question:new k("?",A),arrow:new k("=>",A),template:new k("template"),invalidTemplate:new k("invalidTemplate"),ellipsis:new k("...",A),backQuote:new k("`",C),dollarBraceL:new k("${",{beforeExpr:!0,startsExpr:!0}),eq:new k("=",{beforeExpr:!0,isAssign:!0}),assign:new k("_=",{beforeExpr:!0,isAssign:!0}),incDec:new k("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new k("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:i("||",1),logicalAND:i("&&",2),bitwiseOR:i("|",3),bitwiseXOR:i("^",4),bitwiseAND:i("&",5),equality:i("==/!=/===/!==",6),relational:i("/<=/>=",7),bitShift:i("<>/>>>",8),plusMin:new k("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:i("%",10),star:i("*",10),slash:i("/",10),starstar:new k("**",{beforeExpr:!0}),_break:s("break"),_case:s("case",A),_catch:s("catch"),_continue:s("continue"),_debugger:s("debugger"),_default:s("default",A),_do:s("do",{isLoop:!0,beforeExpr:!0}),_else:s("else",A),_finally:s("finally"),_for:s("for",{isLoop:!0}),_function:s("function",C),_if:s("if"),_return:s("return",A),_switch:s("switch"),_throw:s("throw",A),_try:s("try"),_var:s("var"),_const:s("const"),_while:s("while",{isLoop:!0}),_with:s("with"),_new:s("new",{beforeExpr:!0,startsExpr:!0}),_this:s("this",C),_super:s("super",C),_class:s("class",C),_extends:s("extends",A),_export:s("export"),_import:s("import"),_null:s("null",C),_true:s("true",C),_false:s("false",C),_in:s("in",{beforeExpr:!0,binop:7}),_instanceof:s("instanceof",{beforeExpr:!0,binop:7}),_typeof:s("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:s("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:s("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},O=/\r\n?|\n|\u2028|\u2029/,T=new RegExp(O.source,"g"),N=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,P=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,F=Object.prototype,$=F.hasOwnProperty,B=F.toString,R=Array.isArray||function(e){return"[object Array]"===B.call(e)},I=function(e,t){this.line=e,this.column=t};I.prototype.offset=function(e){return new I(this.line,this.column+e)};var j=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)},D={ecmaVersion:7,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1,plugins:{}},M={},V=function(e,t,n){this.options=e=c(e),this.sourceFile=e.sourceFile,this.keywords=l(g[e.ecmaVersion>=6?6:5]);var r="";if(!e.allowReserved){for(var i=e.ecmaVersion;!(r=y[i]);i--);"module"==e.sourceType&&(r+=" await")}this.reservedWords=l(r);var s=(r?r+" ":"")+y.strict;this.reservedWordsStrict=l(s),this.reservedWordsStrictBind=l(s+" "+y.strictBind),this.input=String(t),this.containsEsc=!1,this.loadPlugins(e.plugins),n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(O).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=L.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.inFunction=this.inGenerator=this.inAsync=!1,this.yieldPos=this.awaitPos=0,this.labels=[],0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterFunctionScope()};V.prototype.isKeyword=function(e){return this.keywords.test(e)},V.prototype.isReservedWord=function(e){return this.reservedWords.test(e)},V.prototype.extend=function(e,t){this[e]=t(this[e])},V.prototype.loadPlugins=function(e){for(var t in e){var n=M[t];if(!n)throw new Error("Plugin '"+t+"' not found");n(this,e[t])}},V.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)};var q=V.prototype,U=/^(?:'((?:\\.|[^'])*?)'|"((?:\\.|[^"])*?)"|;)/;q.strictDirective=function(e){for(;;){P.lastIndex=e,e+=P.exec(this.input)[0].length;var t=U.exec(this.input.slice(e));if(!t)return!1;if("use strict"==(t[1]||t[2]))return!0;e+=t[0].length}},q.eat=function(e){return this.type===e&&(this.next(),!0)},q.isContextual=function(e){return this.type===L.name&&this.value===e},q.eatContextual=function(e){return this.value===e&&this.eat(L.name)},q.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},q.canInsertSemicolon=function(){return this.type===L.eof||this.type===L.braceR||O.test(this.input.slice(this.lastTokEnd,this.start))},q.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},q.semicolon=function(){this.eat(L.semi)||this.insertSemicolon()||this.unexpected()},q.afterTrailingComma=function(e,t){if(this.type==e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},q.expect=function(e){this.eat(e)||this.unexpected()},q.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")},q.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,"Parenthesized pattern")}},q.checkExpressionErrors=function(e,t){var n=e?e.shorthandAssign:-1;if(!t)return n>=0;n>-1&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns")},q.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos=6&&(e.sourceType=this.options.sourceType),this.finishNode(e,"Program")};var W={kind:"loop"},G={kind:"switch"};z.isLet=function(){if(this.type!==L.name||this.options.ecmaVersion<6||"let"!=this.value)return!1;P.lastIndex=this.pos;var e=P.exec(this.input),t=this.pos+e[0].length,i=this.input.charCodeAt(t);if(91===i||123==i)return!0;if(n(i,!0)){for(var s=t+1;r(this.input.charCodeAt(s),!0);)++s;var o=this.input.slice(t,s);if(!this.isKeyword(o))return!0}return!1},z.isAsyncFunction=function(){if(this.type!==L.name||this.options.ecmaVersion<8||"async"!=this.value)return!1;P.lastIndex=this.pos;var e=P.exec(this.input),t=this.pos+e[0].length;return!(O.test(this.input.slice(this.pos,t))||"function"!==this.input.slice(t,t+8)||t+8!=this.input.length&&r(this.input.charAt(t+8)))},z.parseStatement=function(e,t,n){var r,i=this.type,s=this.startNode();switch(this.isLet()&&(i=L._var,r="let"),i){case L._break:case L._continue:return this.parseBreakContinueStatement(s,i.keyword);case L._debugger:return this.parseDebuggerStatement(s);case L._do:return this.parseDoStatement(s);case L._for:return this.parseForStatement(s);case L._function:return!e&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1);case L._class:return e||this.unexpected(),this.parseClass(s,!0);case L._if:return this.parseIfStatement(s);case L._return:return this.parseReturnStatement(s);case L._switch:return this.parseSwitchStatement(s);case L._throw:return this.parseThrowStatement(s);case L._try:return this.parseTryStatement(s);case L._const:case L._var:return r=r||this.value,e||"var"==r||this.unexpected(),this.parseVarStatement(s,r);case L._while:return this.parseWhileStatement(s);case L._with:return this.parseWithStatement(s);case L.braceL:return this.parseBlock();case L.semi:return this.parseEmptyStatement(s);case L._export:case L._import:return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),i===L._import?this.parseImport(s):this.parseExport(s,n);default:if(this.isAsyncFunction()&&e)return this.next(),this.parseFunctionStatement(s,!0);var o=this.value,a=this.parseExpression();return i===L.name&&"Identifier"===a.type&&this.eat(L.colon)?this.parseLabeledStatement(s,o,a):this.parseExpressionStatement(s,a)}},z.parseBreakContinueStatement=function(e,t){var n="break"==t;this.next(),this.eat(L.semi)||this.insertSemicolon()?e.label=null:this.type!==L.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r=6?this.eat(L.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},z.parseForStatement=function(e){if(this.next(),this.labels.push(W),this.enterLexicalScope(),this.expect(L.parenL),this.type===L.semi)return this.parseFor(e,null);var t=this.isLet();if(this.type===L._var||this.type===L._const||t){var n=this.startNode(),r=t?"let":this.value;return this.next(),this.parseVar(n,!0,r),this.finishNode(n,"VariableDeclaration"),!(this.type===L._in||this.options.ecmaVersion>=6&&this.isContextual("of"))||1!==n.declarations.length||"var"!==r&&n.declarations[0].init?this.parseFor(e,n):this.parseForIn(e,n)}var i=new p,s=this.parseExpression(!0,i);return this.type===L._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.toAssignable(s),this.checkLVal(s),this.checkPatternErrors(i,!0),this.parseForIn(e,s)):(this.checkExpressionErrors(i,!0),this.parseFor(e,s))},z.parseFunctionStatement=function(e,t){return this.next(),this.parseFunction(e,!0,!1,t)},z.isFunction=function(){return this.type===L._function||this.isAsyncFunction()},z.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(!this.strict&&this.isFunction()),e.alternate=this.eat(L._else)?this.parseStatement(!this.strict&&this.isFunction()):null,this.finishNode(e,"IfStatement")},z.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(L.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},z.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(L.braceL),this.labels.push(G),this.enterLexicalScope();for(var t,n=!1;this.type!=L.braceR;)if(this.type===L._case||this.type===L._default){var r=this.type===L._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(L.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(!0));return this.exitLexicalScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},z.parseThrowStatement=function(e){return this.next(),O.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var J=[];z.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===L._catch){var t=this.startNode();this.next(),this.expect(L.parenL),t.param=this.parseBindingAtom(),this.enterLexicalScope(),this.checkLVal(t.param,"let"),this.expect(L.parenR),t.body=this.parseBlock(!1),this.exitLexicalScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(L._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},z.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},z.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(W),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"WhileStatement")},z.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(!1),this.finishNode(e,"WithStatement")},z.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},z.parseLabeledStatement=function(e,t,n){for(var r=0,i=this.labels;r=0;o--){var a=this.labels[o];if(a.statementStart!=e.start)break;a.statementStart=this.start,a.kind=s}return this.labels.push({name:t,kind:s,statementStart:this.start}),e.body=this.parseStatement(!0),("ClassDeclaration"==e.body.type||"VariableDeclaration"==e.body.type&&"var"!=e.body.kind||"FunctionDeclaration"==e.body.type&&(this.strict||e.body.generator))&&this.raiseRecoverable(e.body.start,"Invalid labeled declaration"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},z.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},z.parseBlock=function(e){void 0===e&&(e=!0);var t=this.startNode();for(t.body=[],this.expect(L.braceL),e&&this.enterLexicalScope();!this.eat(L.braceR);){var n=this.parseStatement(!0);t.body.push(n)}return e&&this.exitLexicalScope(),this.finishNode(t,"BlockStatement")},z.parseFor=function(e,t){return e.init=t,this.expect(L.semi),e.test=this.type===L.semi?null:this.parseExpression(),this.expect(L.semi),e.update=this.type===L.parenR?null:this.parseExpression(),this.expect(L.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"ForStatement")},z.parseForIn=function(e,t){var n=this.type===L._in?"ForInStatement":"ForOfStatement";return this.next(),e.left=t,e.right=this.parseExpression(),this.expect(L.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,n)},z.parseVar=function(e,t,n){for(e.declarations=[],e.kind=n;;){var r=this.startNode();if(this.parseVarId(r,n),this.eat(L.eq)?r.init=this.parseMaybeAssign(t):"const"!==n||this.type===L._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"==r.id.type||t&&(this.type===L._in||this.isContextual("of"))?r.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(L.comma))break}return e},z.parseVarId=function(e,t){e.id=this.parseBindingAtom(t),this.checkLVal(e.id,t,!1)},z.parseFunction=function(e,t,n,r){this.initFunction(e),this.options.ecmaVersion>=6&&!r&&(e.generator=this.eat(L.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&&(e.id="nullableID"===t&&this.type!=L.name?null:this.parseIdent(),e.id&&this.checkLVal(e.id,"var"));var i=this.inGenerator,s=this.inAsync,o=this.yieldPos,a=this.awaitPos,u=this.inFunction;return this.inGenerator=e.generator,this.inAsync=e.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),t||(e.id=this.type==L.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n),this.inGenerator=i,this.inAsync=s,this.yieldPos=o,this.awaitPos=a,this.inFunction=u,this.finishNode(e,t?"FunctionDeclaration":"FunctionExpression")},z.parseFunctionParams=function(e){this.expect(L.parenL),e.params=this.parseBindingList(L.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},z.parseClass=function(e,t){this.next(),this.parseClassId(e,t),this.parseClassSuper(e);var n=this.startNode(),r=!1;for(n.body=[],this.expect(L.braceL);!this.eat(L.braceR);)if(!this.eat(L.semi)){var i=this.startNode(),s=this.eat(L.star),o=!1,a=this.type===L.name&&"static"===this.value;this.parsePropertyName(i),i.static=a&&this.type!==L.parenL,i.static&&(s&&this.unexpected(),s=this.eat(L.star),this.parsePropertyName(i)),this.options.ecmaVersion>=8&&!s&&!i.computed&&"Identifier"===i.key.type&&"async"===i.key.name&&this.type!==L.parenL&&!this.canInsertSemicolon()&&(o=!0,this.parsePropertyName(i)),i.kind="method";var u=!1;if(!i.computed){var c=i.key;s||o||"Identifier"!==c.type||this.type===L.parenL||"get"!==c.name&&"set"!==c.name||(u=!0,i.kind=c.name,c=this.parsePropertyName(i)),!i.static&&("Identifier"===c.type&&"constructor"===c.name||"Literal"===c.type&&"constructor"===c.value)&&(r&&this.raise(c.start,"Duplicate constructor in the same class"),u&&this.raise(c.start,"Constructor can't have get/set modifier"),s&&this.raise(c.start,"Constructor can't be a generator"),o&&this.raise(c.start,"Constructor can't be an async method"),i.kind="constructor",r=!0)}if(this.parseClassMethod(n,i,s,o),u){var l="get"===i.kind?0:1;if(i.value.params.length!==l){var p=i.value.start;"get"===i.kind?this.raiseRecoverable(p,"getter should have no params"):this.raiseRecoverable(p,"setter should have exactly one param")}else"set"===i.kind&&"RestElement"===i.value.params[0].type&&this.raiseRecoverable(i.value.params[0].start,"Setter cannot use rest params")}}return e.body=this.finishNode(n,"ClassBody"),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},z.parseClassMethod=function(e,t,n,r){t.value=this.parseMethod(n,r),e.body.push(this.finishNode(t,"MethodDefinition"))},z.parseClassId=function(e,t){e.id=this.type===L.name?this.parseIdent():!0===t?this.unexpected():null},z.parseClassSuper=function(e){e.superClass=this.eat(L._extends)?this.parseExprSubscripts():null},z.parseExport=function(e,t){if(this.next(),this.eat(L.star))return this.expectContextual("from"),e.source=this.type===L.string?this.parseExprAtom():this.unexpected(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(L._default)){this.checkExport(t,"default",this.lastTokStart);var n;if(this.type===L._function||(n=this.isAsyncFunction())){var r=this.startNode();this.next(),n&&this.next(),e.declaration=this.parseFunction(r,"nullableID",!1,n)}else if(this.type===L._class){var i=this.startNode();e.declaration=this.parseClass(i,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(!0),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))e.source=this.type===L.string?this.parseExprAtom():this.unexpected();else{for(var s=0,o=e.specifiers;s=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Can not use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":break;case"ObjectExpression":e.type="ObjectPattern";for(var n=0,r=e.properties;n=6&&(e.computed||e.method||e.shorthand))){var n,r=e.key;switch(r.type){case"Identifier":n=r.name;break;case"Literal":n=String(r.value);break;default:return}var i=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===n&&"init"===i&&(t.proto&&this.raiseRecoverable(r.start,"Redefinition of __proto__ property"),t.proto=!0);else{var s=t[n="$"+n];if(s){("init"===i?this.strict&&s.init||s.get||s.set:s.init||s[i])&&this.raiseRecoverable(r.start,"Redefinition of property")}else s=t[n]={init:!1,get:!1,set:!1};s[i]=!0}}},Y.parseExpression=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===L.comma){var s=this.startNodeAt(n,r);for(s.expressions=[i];this.eat(L.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(s,"SequenceExpression")}return i},Y.parseMaybeAssign=function(e,t,n){if(this.inGenerator&&this.isContextual("yield"))return this.parseYield();var r=!1,i=-1,s=-1;t?(i=t.parenthesizedAssign,s=t.trailingComma,t.parenthesizedAssign=t.trailingComma=-1):(t=new p,r=!0);var o=this.start,a=this.startLoc;this.type!=L.parenL&&this.type!=L.name||(this.potentialArrowAt=this.start);var u=this.parseMaybeConditional(e,t);if(n&&(u=n.call(this,u,o,a)),this.type.isAssign){this.checkPatternErrors(t,!0),r||p.call(t);var c=this.startNodeAt(o,a);return c.operator=this.value,c.left=this.type===L.eq?this.toAssignable(u):u,t.shorthandAssign=-1,this.checkLVal(u),this.next(),c.right=this.parseMaybeAssign(e),this.finishNode(c,"AssignmentExpression")}return r&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),s>-1&&(t.trailingComma=s),u},Y.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(L.question)){var s=this.startNodeAt(n,r);return s.test=i,s.consequent=this.parseMaybeAssign(),this.expect(L.colon),s.alternate=this.parseMaybeAssign(e),this.finishNode(s,"ConditionalExpression")}return i},Y.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1);return this.checkExpressionErrors(t)?i:i.start==n&&"ArrowFunctionExpression"===i.type?i:this.parseExprOp(i,n,r,-1,e)},Y.parseExprOp=function(e,t,n,r,i){var s=this.type.binop;if(null!=s&&(!i||this.type!==L._in)&&s>r){var o=this.type===L.logicalOR||this.type===L.logicalAND,a=this.value;this.next();var u=this.start,c=this.startLoc,l=this.parseExprOp(this.parseMaybeUnary(null,!1),u,c,s,i),p=this.buildBinary(t,n,e,l,a,o);return this.parseExprOp(p,t,n,r,i)}return e},Y.buildBinary=function(e,t,n,r,i,s){var o=this.startNodeAt(e,t);return o.left=n,o.operator=i,o.right=r,this.finishNode(o,s?"LogicalExpression":"BinaryExpression")},Y.parseMaybeUnary=function(e,t){var n,r=this.start,i=this.startLoc;if(this.inAsync&&this.isContextual("await"))n=this.parseAwait(),t=!0;else if(this.type.prefix){var s=this.startNode(),o=this.type===L.incDec;s.operator=this.value,s.prefix=!0,this.next(),s.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),o?this.checkLVal(s.argument):this.strict&&"delete"===s.operator&&"Identifier"===s.argument.type?this.raiseRecoverable(s.start,"Deleting local variable in strict mode"):t=!0,n=this.finishNode(s,o?"UpdateExpression":"UnaryExpression")}else{if(n=this.parseExprSubscripts(e),this.checkExpressionErrors(e))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var a=this.startNodeAt(r,i);a.operator=this.value,a.prefix=!1,a.argument=n,this.checkLVal(n),this.next(),n=this.finishNode(a,"UpdateExpression")}}return!t&&this.eat(L.starstar)?this.buildBinary(r,i,n,this.parseMaybeUnary(null,!1),"**",!1):n},Y.parseExprSubscripts=function(e){var t=this.start,n=this.startLoc,r=this.parseExprAtom(e),i="ArrowFunctionExpression"===r.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd);if(this.checkExpressionErrors(e)||i)return r;var s=this.parseSubscripts(r,t,n);return e&&"MemberExpression"===s.type&&(e.parenthesizedAssign>=s.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=s.start&&(e.parenthesizedBind=-1)),s},Y.parseSubscripts=function(e,t,n,r){for(var i=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd==e.end&&!this.canInsertSemicolon(),s=void 0;;)if((s=this.eat(L.bracketL))||this.eat(L.dot)){var o=this.startNodeAt(t,n);o.object=e,o.property=s?this.parseExpression():this.parseIdent(!0),o.computed=!!s,s&&this.expect(L.bracketR),e=this.finishNode(o,"MemberExpression")}else if(!r&&this.eat(L.parenL)){var a=new p,u=this.yieldPos,c=this.awaitPos;this.yieldPos=0,this.awaitPos=0;var l=this.parseExprList(L.parenR,this.options.ecmaVersion>=8,!1,a);if(i&&!this.canInsertSemicolon()&&this.eat(L.arrow))return this.checkPatternErrors(a,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=u,this.awaitPos=c,this.parseArrowExpression(this.startNodeAt(t,n),l,!0);this.checkExpressionErrors(a,!0),this.yieldPos=u||this.yieldPos,this.awaitPos=c||this.awaitPos;var h=this.startNodeAt(t,n);h.callee=e,h.arguments=l,e=this.finishNode(h,"CallExpression")}else{if(this.type!==L.backQuote)return e;var f=this.startNodeAt(t,n);f.tag=e,f.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(f,"TaggedTemplateExpression")}},Y.parseExprAtom=function(e){var t,n=this.potentialArrowAt==this.start;switch(this.type){case L._super:return this.inFunction||this.raise(this.start,"'super' outside of function or class"),t=this.startNode(),this.next(),this.type!==L.dot&&this.type!==L.bracketL&&this.type!==L.parenL&&this.unexpected(),this.finishNode(t,"Super");case L._this:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case L.name:var r=this.start,i=this.startLoc,s=this.parseIdent(this.type!==L.name);if(this.options.ecmaVersion>=8&&"async"===s.name&&!this.canInsertSemicolon()&&this.eat(L._function))return this.parseFunction(this.startNodeAt(r,i),!1,!1,!0);if(n&&!this.canInsertSemicolon()){if(this.eat(L.arrow))return this.parseArrowExpression(this.startNodeAt(r,i),[s],!1);if(this.options.ecmaVersion>=8&&"async"===s.name&&this.type===L.name)return s=this.parseIdent(),!this.canInsertSemicolon()&&this.eat(L.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(r,i),[s],!0)}return s;case L.regexp:var o=this.value;return t=this.parseLiteral(o.value),t.regex={pattern:o.pattern,flags:o.flags},t;case L.num:case L.string:return this.parseLiteral(this.value);case L._null:case L._true:case L._false:return t=this.startNode(),t.value=this.type===L._null?null:this.type===L._true,t.raw=this.type.keyword,this.next(),this.finishNode(t,"Literal");case L.parenL:var a=this.start,u=this.parseParenAndDistinguishExpression(n);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(u)&&(e.parenthesizedAssign=a),e.parenthesizedBind<0&&(e.parenthesizedBind=a)),u;case L.bracketL:return t=this.startNode(),this.next(),t.elements=this.parseExprList(L.bracketR,!0,!0,e),this.finishNode(t,"ArrayExpression");case L.braceL:return this.parseObj(!1,e);case L._function:return t=this.startNode(),this.next(),this.parseFunction(t,!1);case L._class:return this.parseClass(this.startNode(),!1);case L._new:return this.parseNew();case L.backQuote:return this.parseTemplate();default:this.unexpected()}},Y.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),this.next(),this.finishNode(t,"Literal")},Y.parseParenExpression=function(){this.expect(L.parenL);var e=this.parseExpression();return this.expect(L.parenR),e},Y.parseParenAndDistinguishExpression=function(e){var t,n=this.start,r=this.startLoc,i=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var s,o,a=this.start,u=this.startLoc,c=[],l=!0,h=!1,f=new p,d=this.yieldPos,y=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==L.parenR;){if(l?l=!1:this.expect(L.comma),i&&this.afterTrailingComma(L.parenR,!0)){h=!0;break}if(this.type===L.ellipsis){s=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===L.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}this.type!==L.parenL||o||(o=this.start),c.push(this.parseMaybeAssign(!1,f,this.parseParenItem))}var m=this.start,g=this.startLoc;if(this.expect(L.parenR),e&&!this.canInsertSemicolon()&&this.eat(L.arrow))return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),o&&this.unexpected(o),this.yieldPos=d,this.awaitPos=y,this.parseParenArrowList(n,r,c);c.length&&!h||this.unexpected(this.lastTokStart),s&&this.unexpected(s),this.checkExpressionErrors(f,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=y||this.awaitPos,c.length>1?((t=this.startNodeAt(a,u)).expressions=c,this.finishNodeAt(t,"SequenceExpression",m,g)):t=c[0]}else t=this.parseParenExpression();if(this.options.preserveParens){var v=this.startNodeAt(n,r);return v.expression=t,this.finishNode(v,"ParenthesizedExpression")}return t},Y.parseParenItem=function(e){return e},Y.parseParenArrowList=function(e,t,n){return this.parseArrowExpression(this.startNodeAt(e,t),n)};var Q=[];Y.parseNew=function(){var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(L.dot))return e.meta=t,e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is new.target"),this.inFunction||this.raiseRecoverable(e.start,"new.target can only be used in functions"),this.finishNode(e,"MetaProperty");var n=this.start,r=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(),n,r,!0),this.eat(L.parenL)?e.arguments=this.parseExprList(L.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Q,this.finishNode(e,"NewExpression")},Y.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===L.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value,cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),n.tail=this.type===L.backQuote,this.finishNode(n,"TemplateElement")},Y.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.expect(L.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(L.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")},Y.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===L.name||this.type===L.num||this.type===L.string||this.type===L.bracketL||this.type.keyword)&&!O.test(this.input.slice(this.lastTokEnd,this.start))},Y.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(L.braceR);){if(r)r=!1;else if(this.expect(L.comma),this.afterTrailingComma(L.braceR))break;var s=this.parseProperty(e,t);this.checkPropClash(s,i),n.properties.push(s)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},Y.parseProperty=function(e,t){var n,r,i,s,o=this.startNode();return this.options.ecmaVersion>=6&&(o.method=!1,o.shorthand=!1,(e||t)&&(i=this.start,s=this.startLoc),e||(n=this.eat(L.star))),this.parsePropertyName(o),!e&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(o)?(r=!0,this.parsePropertyName(o,t)):r=!1,this.parsePropertyValue(o,e,n,r,i,s,t),this.finishNode(o,"Property")},Y.parsePropertyValue=function(e,t,n,r,i,s,o){if((n||r)&&this.type===L.colon&&this.unexpected(),this.eat(L.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===L.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(n,r);else if(t||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type==L.comma||this.type==L.braceR)this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?(this.checkUnreserved(e.key),e.kind="init",t?e.value=this.parseMaybeDefault(i,s,e.key):this.type===L.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,s,e.key)):e.value=e.key,e.shorthand=!0):this.unexpected();else{(n||r)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var a="get"===e.kind?0:1;if(e.value.params.length!==a){var u=e.value.start;"get"===e.kind?this.raiseRecoverable(u,"getter should have no params"):this.raiseRecoverable(u,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}},Y.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(L.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(L.bracketR),e.key;e.computed=!1}return e.key=this.type===L.num||this.type===L.string?this.parseExprAtom():this.parseIdent(!0)},Y.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=!1,e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},Y.parseMethod=function(e,t){var n=this.startNode(),r=this.inGenerator,i=this.inAsync,s=this.yieldPos,o=this.awaitPos,a=this.inFunction;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=e),this.options.ecmaVersion>=8&&(n.async=!!t),this.inGenerator=n.generator,this.inAsync=n.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),this.expect(L.parenL),n.params=this.parseBindingList(L.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1),this.inGenerator=r,this.inAsync=i,this.yieldPos=s,this.awaitPos=o,this.inFunction=a,this.finishNode(n,"FunctionExpression")},Y.parseArrowExpression=function(e,t,n){var r=this.inGenerator,i=this.inAsync,s=this.yieldPos,o=this.awaitPos,a=this.inFunction;return this.enterFunctionScope(),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.inGenerator=!1,this.inAsync=e.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0),this.inGenerator=r,this.inAsync=i,this.yieldPos=s,this.awaitPos=o,this.inFunction=a,this.finishNode(e,"ArrowFunctionExpression")},Y.parseFunctionBody=function(e,t){var n=t&&this.type!==L.braceL,r=this.strict,i=!1;if(n)e.body=this.parseMaybeAssign(),e.expression=!0,this.checkParams(e,!1);else{var s=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);r&&!s||(i=this.strictDirective(this.end))&&s&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var o=this.labels;this.labels=[],i&&(this.strict=!0),this.checkParams(e,!r&&!i&&!t&&this.isSimpleParamList(e.params)),e.body=this.parseBlock(!1),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=o}this.exitFunctionScope(),this.strict&&e.id&&this.checkLVal(e.id,"none"),this.strict=r},Y.isSimpleParamList=function(e){for(var t=0,n=e;t0;)t[n]=arguments[n+1];for(var r=0,i=t;r=1;e--){var t=this.context[e];if("function"===t.token)return t.generator}return!1},ie.updateContext=function(e){var t,n=this.type;n.keyword&&e==L.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},L.parenR.updateContext=L.braceR.updateContext=function(){if(1!=this.context.length){var e=this.context.pop();e===re.b_stat&&"function"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}else this.exprAllowed=!0},L.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?re.b_stat:re.b_expr),this.exprAllowed=!0},L.dollarBraceL.updateContext=function(){this.context.push(re.b_tmpl),this.exprAllowed=!0},L.parenL.updateContext=function(e){var t=e===L._if||e===L._for||e===L._with||e===L._while;this.context.push(t?re.p_stat:re.p_expr),this.exprAllowed=!0},L.incDec.updateContext=function(){},L._function.updateContext=L._class.updateContext=function(e){e.beforeExpr&&e!==L.semi&&e!==L._else&&(e!==L.colon&&e!==L.braceL||this.curContext()!==re.b_stat)?this.context.push(re.f_expr):this.context.push(re.f_stat),this.exprAllowed=!1},L.backQuote.updateContext=function(){this.curContext()===re.q_tmpl?this.context.pop():this.context.push(re.q_tmpl),this.exprAllowed=!1},L.star.updateContext=function(e){if(e==L._function){var t=this.context.length-1;this.context[t]===re.f_expr?this.context[t]=re.f_expr_gen:this.context[t]=re.f_gen}this.exprAllowed=!0},L.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&("of"==this.value&&!this.exprAllowed||"yield"==this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var se=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new j(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},oe=V.prototype,ae="object"==typeof Packages&&"[object JavaPackage]"==Object.prototype.toString.call(Packages);oe.next=function(){this.options.onToken&&this.options.onToken(new se(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},oe.getToken=function(){return this.next(),new se(this)},"undefined"!=typeof Symbol&&(oe[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===L.eof,value:t}}}}),oe.curContext=function(){return this.context[this.context.length-1]},oe.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(L.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},oe.readToken=function(e){return n(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},oe.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=57344)return e;return(e<<10)+this.input.charCodeAt(this.pos+1)-56613888},oe.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(-1===n&&this.raise(this.pos-2,"Unterminated comment"),this.pos=n+2,this.options.locations){T.lastIndex=t;for(var r;(r=T.exec(this.input))&&r.index8&&e<14||e>=5760&&N.test(String.fromCharCode(e))))break e;++this.pos}}},oe.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},oe.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(L.ellipsis)):(++this.pos,this.finishToken(L.dot))},oe.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(L.assign,2):this.finishOp(L.slash,1)},oe.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=42===e?L.star:L.modulo;return this.options.ecmaVersion>=7&&42==e&&42===t&&(++n,r=L.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(L.assign,n+1):this.finishOp(r,n)},oe.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.finishOp(124===e?L.logicalOR:L.logicalAND,2):61===t?this.finishOp(L.assign,2):this.finishOp(124===e?L.bitwiseOR:L.bitwiseAND,1)},oe.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(L.assign,2):this.finishOp(L.bitwiseXOR,1)},oe.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!=t||this.inModule||62!=this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!O.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(L.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(L.assign,2):this.finishOp(L.plusMin,1)},oe.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(L.assign,n+1):this.finishOp(L.bitShift,n)):33!=t||60!=e||this.inModule||45!=this.input.charCodeAt(this.pos+2)||45!=this.input.charCodeAt(this.pos+3)?(61===t&&(n=2),this.finishOp(L.relational,n)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},oe.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(L.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(L.arrow)):this.finishOp(61===e?L.eq:L.prefix,1)},oe.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(L.parenL);case 41:return++this.pos,this.finishToken(L.parenR);case 59:return++this.pos,this.finishToken(L.semi);case 44:return++this.pos,this.finishToken(L.comma);case 91:return++this.pos,this.finishToken(L.bracketL);case 93:return++this.pos,this.finishToken(L.bracketR);case 123:return++this.pos,this.finishToken(L.braceL);case 125:return++this.pos,this.finishToken(L.braceR);case 58:return++this.pos,this.finishToken(L.colon);case 63:return++this.pos,this.finishToken(L.question);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(L.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(L.prefix,1)}this.raise(this.pos,"Unexpected character '"+d(e)+"'")},oe.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};var ue=!!f("ï¿¿","u");oe.readRegexp=function(){for(var e,t,n=this,r=this.pos;;){n.pos>=n.input.length&&n.raise(r,"Unterminated regular expression");var i=n.input.charAt(n.pos);if(O.test(i)&&n.raise(r,"Unterminated regular expression"),e)e=!1;else{if("["===i)t=!0;else if("]"===i&&t)t=!1;else if("/"===i&&!t)break;e="\\"===i}++n.pos}var s=this.input.slice(r,this.pos);++this.pos;var o=this.readWord1(),a=s,u="";if(o){var c=/^[gim]*$/;this.options.ecmaVersion>=6&&(c=/^[gimuy]*$/),c.test(o)||this.raise(r,"Invalid regular expression flag"),o.indexOf("u")>=0&&(ue?u="u":(a=(a=a.replace(/\\u\{([0-9a-fA-F]+)\}/g,function(e,t,i){return(t=Number("0x"+t))>1114111&&n.raise(r+i+3,"Code point out of bounds"),"x"})).replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"),u=u.replace("u","")))}var l=null;return ae||(f(a,u,r,this),l=f(s,o)),this.finishToken(L.regexp,{pattern:s,flags:o,value:l})},oe.readInt=function(e,t){for(var n=this.pos,r=0,i=0,s=null==t?1/0:t;i=97?o-97+10:o>=65?o-65+10:o>=48&&o<=57?o-48:1/0)>=e)break;++this.pos,r=r*e+a}return this.pos===n||null!=t&&this.pos-n!==t?null:r},oe.readRadixNumber=function(e){this.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.start+2,"Expected number in radix "+e),n(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(L.num,t)},oe.readNumber=function(e){var t=this.pos,r=!1,i=48===this.input.charCodeAt(this.pos);e||null!==this.readInt(10)||this.raise(t,"Invalid number"),i&&this.pos==t+1&&(i=!1);var s=this.input.charCodeAt(this.pos);46!==s||i||(++this.pos,this.readInt(10),r=!0,s=this.input.charCodeAt(this.pos)),69!==s&&101!==s||i||(43!==(s=this.input.charCodeAt(++this.pos))&&45!==s||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),r=!0),n(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var o,a=this.input.slice(t,this.pos);return r?o=parseFloat(a):i&&1!==a.length?this.strict?this.raise(t,"Invalid number"):o=/[89]/.test(a)?parseInt(a,10):parseInt(a,8):o=parseInt(a,10),this.finishToken(L.num,o)},oe.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},oe.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;92===r?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):(o(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(L.string,t)};var ce={};oe.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==ce)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},oe.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw ce;this.raise(e,t)},oe.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==L.template&&this.type!==L.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(L.template,e)):36===n?(this.pos+=2,this.finishToken(L.dollarBraceL)):(++this.pos,this.finishToken(L.backQuote));if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(o(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},oe.readInvalidTemplateToken=function(){for(;this.pos=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(n,8);return r>255&&(n=n.slice(0,-1),r=parseInt(n,8)),"0"!==n&&(this.strict||e)&&this.invalidStringToken(this.pos-2,"Octal literal in strict mode"),this.pos+=n.length-1,String.fromCharCode(r)}return String.fromCharCode(t)}},oe.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.invalidStringToken(t,"Bad character escape sequence"),n},oe.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,i=this.pos,s=this.options.ecmaVersion>=6;this.pos=s)&&a[c](t,n,e),(null==r||t.start==r)&&(null==s||t.end==s)&&o(c,t))throw new i(t,n)}(n,u)}catch(e){if(e instanceof i)return e;throw e}},e.findNodeAround=function(n,r,s,o,a){s=t(s),o||(o=e.base);try{!function e(t,n,a){var u=a||t.type;if(!(t.start>r||t.end=r&&s(u,t))throw new i(t,n);o[u](t,n,e)}}(n,a)}catch(e){if(e instanceof i)return e;throw e}},e.findNodeBefore=function(n,r,s,o,a){s=t(s),o||(o=e.base);var u;return function e(t,n,a){if(!(t.start>r)){var c=a||t.type;t.end<=r&&(!u||u.node.end0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return o[e>>18&63]+o[e>>12&63]+o[e>>6&63]+o[63&e]}function s(e,t,n){for(var r,s=[],o=t;o0?c-4:c;var l=0;for(t=0;t>16&255,o[l++]=i>>8&255,o[l++]=255&i;return 2===s?(i=a[e.charCodeAt(t)]<<2|a[e.charCodeAt(t+1)]>>4,o[l++]=255&i):1===s&&(i=a[e.charCodeAt(t)]<<10|a[e.charCodeAt(t+1)]<<4|a[e.charCodeAt(t+2)]>>2,o[l++]=i>>8&255,o[l++]=255&i),o},n.fromByteArray=function(e){for(var t,n=e.length,r=n%3,i="",a=[],u=0,c=n-r;uc?c:u+16383));return 1===r?(t=e[n-1],i+=o[t>>2],i+=o[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=o[t>>10],i+=o[t>>4&63],i+=o[t<<2&63],i+="="),a.push(i),a.join("")};for(var o=[],a=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,p=c.length;lB)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=i.prototype,t}function i(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return a(e)}return s(e,t,n)}function s(e,t,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return T(e)?function(e,t,n){if(t<0||e.byteLength=B)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+B.toString(16)+" bytes");return 0|e}function l(e,t){if(i.isBuffer(e))return e.length;if(N(e)||T(e))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return _(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return L(e).length;default:if(r)return _(e).length;t=(""+t).toLowerCase(),r=!0}}function p(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,n){var r=e.length;(!t||t<0)&&(t=0);(!n||n<0||n>r)&&(n=r);for(var i="",s=t;s2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,P(n)&&(n=s?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(s)return-1;n=e.length-1}else if(n<0){if(!s)return-1;n=0}if("string"==typeof t&&(t=i.from(t,r)),i.isBuffer(t))return 0===t.length?-1:d(e,t,n,r,s);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):d(e,[t],n,r,s);throw new TypeError("val must be string, number or Buffer")}function d(e,t,n,r,i){function s(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,a=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,a/=2,u/=2,n/=2}var c;if(i){var l=-1;for(c=n;ca&&(n=a-u),c=n;c>=0;c--){for(var p=!0,h=0;hi&&(r=i):r=i;var s=t.length;if(s%2!=0)throw new TypeError("Invalid hex string");r>s/2&&(r=s/2);for(var o=0;o>8,i=n%256,s.push(i),s.push(r);return s}(t,e.length-n),e,n,r)}function w(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:s>223?3:s>191?2:1;if(i+a<=n){var u,c,l,p;switch(a){case 1:s<128&&(o=s);break;case 2:128==(192&(u=e[i+1]))&&(p=(31&s)<<6|63&u)>127&&(o=p);break;case 3:u=e[i+1],c=e[i+2],128==(192&u)&&128==(192&c)&&(p=(15&s)<<12|(63&u)<<6|63&c)>2047&&(p<55296||p>57343)&&(o=p);break;case 4:u=e[i+1],c=e[i+2],l=e[i+3],128==(192&u)&&128==(192&c)&&128==(192&l)&&(p=(15&s)<<18|(63&u)<<12|(63&c)<<6|63&l)>65535&&p<1114112&&(o=p)}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=a}return function(e){var t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);var n="",r=0;for(;rn)throw new RangeError("Trying to access beyond buffer length")}function S(e,t,n,r,s,o){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||te.length)throw new RangeError("Index out of range")}function k(e,t,n,r,i,s){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function A(e,t,n,r,i){return t=+t,n>>>=0,i||k(e,0,n,4),$.write(e,t,n,r,23,4),n+4}function C(e,t,n,r,i){return t=+t,n>>>=0,i||k(e,0,n,8),$.write(e,t,n,r,52,8),n+8}function _(e,t){t=t||1/0;for(var n,r=e.length,i=null,s=[],o=0;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function L(e){return F.toByteArray(function(e){if((e=e.trim().replace(I,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function O(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function T(e){return e instanceof ArrayBuffer||null!=e&&null!=e.constructor&&"ArrayBuffer"===e.constructor.name&&"number"==typeof e.byteLength}function N(e){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(e)}function P(e){return e!=e}var F=e("base64-js"),$=e("ieee754");n.Buffer=i,n.SlowBuffer=function(e){return+e!=e&&(e=0),i.alloc(+e)},n.INSPECT_MAX_BYTES=50;var B=2147483647;n.kMaxLength=B,(i.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(e,t,n){return s(e,t,n)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(e,t,n){return function(e,t,n){return o(e),e<=0?r(e):void 0!==t?"string"==typeof n?r(e).fill(t,n):r(e).fill(t):r(e)}(e,t,n)},i.allocUnsafe=function(e){return a(e)},i.allocUnsafeSlow=function(e){return a(e)},i.isBuffer=function(e){return null!=e&&!0===e._isBuffer},i.compare=function(e,t){if(!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,s=0,o=Math.min(n,r);s0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},i.prototype.compare=function(e,t,n,r,s){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===s&&(s=this.length),t<0||n>e.length||r<0||s>this.length)throw new RangeError("out of range index");if(r>=s&&t>=n)return 0;if(r>=s)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,s>>>=0,this===e)return 0;for(var o=s-r,a=n-t,u=Math.min(o,a),c=this.slice(r,s),l=e.slice(t,n),p=0;p>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var s=!1;;)switch(r){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return m(this,e,t,n);case"ascii":return g(this,e,t,n);case"latin1":case"binary":return v(this,e,t,n);case"base64":return b(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var R=4096;i.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||E(e,t,this.length);for(var r=this[e],i=1,s=0;++s>>=0,t>>>=0,n||E(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},i.prototype.readUInt8=function(e,t){return e>>>=0,t||E(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return e>>>=0,t||E(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return e>>>=0,t||E(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return e>>>=0,t||E(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,t){return e>>>=0,t||E(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||E(e,t,this.length);for(var r=this[e],i=1,s=0;++s=i&&(r-=Math.pow(2,8*t)),r},i.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||E(e,t,this.length);for(var r=t,i=1,s=this[e+--r];r>0&&(i*=256);)s+=this[e+--r]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},i.prototype.readInt8=function(e,t){return e>>>=0,t||E(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){e>>>=0,t||E(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt16BE=function(e,t){e>>>=0,t||E(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt32LE=function(e,t){return e>>>=0,t||E(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e>>>=0,t||E(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return e>>>=0,t||E(e,4,this.length),$.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e>>>=0,t||E(e,4,this.length),$.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e>>>=0,t||E(e,8,this.length),$.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e>>>=0,t||E(e,8,this.length),$.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){S(this,e,t,n,Math.pow(2,8*n)-1,0)}var i=1,s=0;for(this[t]=255&e;++s>>=0,n>>>=0,!r){S(this,e,t,n,Math.pow(2,8*n)-1,0)}var i=n-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+n},i.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,1,255,0),this[t]=255&e,t+1},i.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},i.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);S(this,e,t,n,i-1,-i)}var s=0,o=1,a=0;for(this[t]=255&e;++s>0)-a&255;return t+n},i.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);S(this,e,t,n,i-1,-i)}var s=n-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+n},i.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},i.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeFloatLE=function(e,t,n){return A(this,e,t,!0,n)},i.prototype.writeFloatBE=function(e,t,n){return A(this,e,t,!1,n)},i.prototype.writeDoubleLE=function(e,t,n){return C(this,e,t,!0,n)},i.prototype.writeDoubleBE=function(e,t,n){return C(this,e,t,!1,n)},i.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(s<1e3)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;o>1,l=-7,p=n?i-1:0,h=n?-1:1,f=e[t+p];for(p+=h,s=f&(1<<-l)-1,f>>=-l,l+=a;l>0;s=256*s+e[t+p],p+=h,l-=8);for(o=s&(1<<-l)-1,s>>=-l,l+=r;l>0;o=256*o+e[t+p],p+=h,l-=8);if(0===s)s=1-c;else{if(s===u)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),s-=c}return(f?-1:1)*o*Math.pow(2,s-r)},n.write=function(e,t,n,r,i,s){var o,a,u,c=8*s-i-1,l=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:s-1,d=r?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+p>=1?h/u:h*Math.pow(2,1-p))*u>=2&&(o++,u/=2),o+p>=l?(a=0,o=l):o+p>=1?(a=(t*u-1)*Math.pow(2,i),o+=p):(a=t*Math.pow(2,p-1)*Math.pow(2,i),o=0));i>=8;e[n+f]=255&a,f+=d,a/=256,i-=8);for(o=o<0;e[n+f]=255&o,f+=d,o/=256,c-=8);e[n+f-d]|=128*y}},{}],10:[function(e,t,n){(function(n){function r(){}function i(e){this.covers={},this._ident=i.prototype.version+"_"+Math.random(),this.setOptions(e||{})}var s=e("./lib/parser"),o=e("./lib/arboriculture"),a=e("./lib/output");i.prototype.smCache={},i.prototype.setOptions=function(e){return this.log=!1===e.log?r:e.log||this.log,this.options=function(e){var t={};return e.forEach(function(e){if(e&&"object"==typeof e)for(var n in e)t[n]=e[n]}),t}([this.options,e]),delete this.options.log,this},i.prototype.version=e("./package.json").version,i.prototype.isThenable=function(e){return e&&e instanceof Object&&"function"==typeof e.then},i.prototype.compile=function(e,t,n,s){"object"==typeof n&&void 0===s&&(s=n),s=s||{};for(var o in i.initialCodeGenOpts)o in s||(s[o]=i.initialCodeGenOpts[o]);var a=this.parse(e,t,null,s);return this.asynchronize(a,null,s,this.log||r),this.prettyPrint(a,s),a},i.prototype.parse=function(e,t,n,r){"object"==typeof n&&void 0===r&&(r=n);var i={origCode:e.toString(),filename:t};try{return i.ast=s.parse(i.origCode,r&&r.parser),r.babelTree&&s.treeWalker(i.ast,function(e,t,n){"Literal"===e.type?n[0].replace(o.babelLiteralNode(e.value)):"Property"===e.type&&("ClassBody"===n[0].parent.type?e.type="ClassProperty":e.type="ObjectProperty"),t()}),i}catch(e){if(e instanceof SyntaxError){var a=i.origCode.substr(e.pos-e.loc.column);a=a.split("\n")[0],e.message+=" "+t+" (nodent)\n"+a+"\n"+a.replace(/[\S ]/g,"-").substring(0,e.loc.column)+"^",e.stack=""}throw e}},i.prototype.asynchronize=o.asynchronize,i.prototype.printNode=o.printNode,i.prototype.prettyPrint=function(t,r){var i=t.filename?t.filename.split("/"):["anonymous"],s=i.pop(),o=a(t.ast,r&&r.sourcemap?{map:{startLine:r.mapStartLine||0,file:s+"(original)",sourceMapRoot:i.join("/"),sourceContent:t.origCode}}:null,t.origCode);if(r&&r.sourcemap)try{var u="",c=o.map.toJSON();if(c){var l=e("source-map").SourceMapConsumer;t.sourcemap=c,this.smCache[t.filename]={map:c,smc:new l(c)},u="\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,"+function(e){return(e instanceof n?e:new n(e.toString(),"binary")).toString("base64")}(JSON.stringify(c))+"\n"}t.code=o.code+u}catch(e){t.code=o}else t.code=o;return t},i.prototype.getDefaultCompileOptions=void 0,Object.defineProperty(i.prototype,"Promise",{get:function(){return initOpts.log("Warning: nodent.Promise is deprecated. Use nodent.Thenable instead"),Thenable},enumerable:!1,configurable:!1}),i.initialCodeGenOpts={noRuntime:!1,lazyThenables:!1,es6target:!1,noUseDirective:!1,wrapAwait:null,mapStartLine:0,sourcemap:!0,engine:!1,parser:{sourceType:"script"},$return:"$return",$error:"$error",$arguments:"$args",$asyncspawn:"$asyncspawn",$asyncbind:"$asyncbind",generatedSymbolPrefix:"$",$makeThenable:"$makeThenable"},t.exports=i}).call(this,e("buffer").Buffer)},{"./lib/arboriculture":11,"./lib/output":12,"./lib/parser":13,"./package.json":25,buffer:8,"source-map":24}],11:[function(e,t,n){"use strict";function r(e){if(!e)return"";if(Array.isArray(e))return e.map(r).join("|\n");try{return m(e)}catch(t){return t.message+": "+(e&&e.type)}}function i(e){if(Array.isArray(e))return e.map(function(e){return i(e)});var t={};return Object.keys(e).forEach(function(n){t[n]=e[n]}),t}function s(e,t){e!==t&&(e.__proto__=Object.getPrototypeOf(t),Object.keys(e).forEach(function(t){t in g||delete e[t]}),Object.keys(t).forEach(function(n){n in e||(e[n]=t[n])}))}function o(){}function a(e){return e?(b.node=e,b):{}}function u(e,t,n){if(!e)return null;if(t&&"object"==typeof t){var r=Object.keys(t);return u(e,function(e){return r.every(function(n){return e[n]==t[n]})})}var i,s={};if(Array.isArray(e)){for(var o=0;o0){if(!o)return t(e);delete e.async}return void(!o&&i?t():(e.type="ReturnStatement",e.$mapped=!0,e.argument={type:"CallExpression",callee:k(s,[n]).$error,arguments:[e.argument]}))}return"TryStatement"===e.type?(i++,t(e),void i--):a(e).isFunction?(r++,t(e),void r--):void t(e)}if(r>0){if(!a(e).isAsync)return t(e);delete e.async}return e.$mapped=!0,void(a(e.argument).isUnaryExpression&&"void"===e.argument.operator?e.argument=e.argument.argument:e.argument={type:"CallExpression",callee:k(s,[n]).$return,arguments:e.argument?[e.argument]:[]})},t)}function P(e,t){return Array.isArray(e)?e.map(function(e){return P(e,t)}):(y.treeWalker(e,function(e,t,n){if(t(),"ConditionalExpression"===e.type&&(c(e.alternate)||c(e.consequent))){h(E("condOp"));s(e,_(y.part("if ($0) return $1 ; return $2",[e.test,e.consequent,e.alternate]).body))}},t),e)}function F(e,t){return Array.isArray(e)?e.map(function(e){return F(e,t)}):(y.treeWalker(e,function(e,t,n){if(t(),"LogicalExpression"===e.type&&c(e.right)){var r,i=h(E("logical"+("&&"===e.operator?"And":"Or")));if("||"===e.operator)r="var $0; if (!($0 = $1)) {$0 = $2} return $0";else{if("&&"!==e.operator)throw new Error(v(e)+"Illegal logical operator: "+e.operator);r="var $0; if ($0 = $1) {$0 = $2} return $0"}s(e,_(y.part(r,[i,e.left,e.right]).body))}},t),e)}function $(e,t,n){if("SwitchCase"!==e.type&&a(e).isBlockStatement)for(var r=0;r { $$setMapped: while (q) { if (q.then) "+(1===i?" return void q.then($idTrampoline, $exit); ":" return q.then($idTrampoline, $exit); ")+" try { if (q.pop) if (q.length) return q.pop() ? $idContinuation.call(this) : q; else q = $idStep; else q = q.call(this) } catch (_exception) { return $exit(_exception); } } }))($idIter)":"($idTrampoline = (function (q) { $$setMapped: while (q) { if (q.then) "+(1===i?" return void q.then($idTrampoline, $exit); ":" return q.then($idTrampoline, $exit); ")+" try { if (q.pop) if (q.length) return q.pop() ? $idContinuation.call(this) : q; else q = $idStep; else q = q.call(this) } catch (_exception) { return $exit(_exception); } } }).bind(this))($idIter)",{setMapped:function(e){return e.$mapped=!0,e},idTrampoline:w,exit:P,idIter:E,idContinuation:A,idStep:S}).expr:y.part("(Function.$0.trampoline(this,$1,$2,$3,$5)($4))",[pe.asyncbind,A,S,P,E,b(1===i)]).expr,o.push({type:"ReturnStatement",argument:N}),o.push({$label:e.$label,type:"FunctionDeclaration",id:E,params:[],body:{type:"BlockStatement",body:d}}),f&&o.push({type:"FunctionDeclaration",id:S,params:[],body:{type:"BlockStatement",body:[f,L]}}),!l||"VariableDeclaration"!==l.type||"let"!==l.kind&&"const"!==l.kind?(o.push(v),t[0].replace(o.map(r))):("const"===l.kind&&(l.kind="let"),t[0].replace([{type:"BlockStatement",body:o.map(r)},r(v)]))}}function G(e){if(!a(e).isFunction)throw new Error("Cannot examine non-Function node types for async exits");return u(e.body,function(e){return"Identifier"===e.type&&(e.name===n.$return||e.name===n.$error)||I(e)&&a(e).isAsync},function(e){return!(a(e).isFunction&&(e.$wasAsync||a(e).isAsync))})}function J(t){return y.treeWalker(t,function(t,r,i){var s=x(t);if(r(),s&&a(s).isAsync){if("set"==t.kind){var o=new SyntaxError(v(s)+"method 'async set' cannot be invoked",e.filename,t.start);throw o.pos=t.start,o.loc=t.loc.start,o}s.async=!1;var u=w(s);G(s)||0!==s.body.body.length&&"ReturnStatement"===s.body.body[s.body.body.length-1].type||s.body.body.push({type:"ReturnStatement"});var c=m(S({type:"FunctionExpression",params:[pe.return,pe.error],body:J(N(s.body,i)),$wasAsync:!0},n),n.promises||n.generators||n.engine?null:b(!n.lazyThenables||0));n.promises?s.body={type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"NewExpression",callee:h("Promise"),arguments:[c]}}]}:s.body={type:"BlockStatement",body:[{type:"ReturnStatement",argument:c}]},u&&D(s.body.body,[he])}})}function H(e){return y.treeWalker(e,function(e,t,r){if(t(),a(e).isAsync&&a(e).isFunction){var i;(i=x(r[0].parent))&&a(i).isAsync&&"get"===r[0].parent.kind&&X(r[0].parent.key),delete e.async;var s=w(e),o=S({type:"FunctionExpression",params:[pe.return,pe.error],$wasAsync:!0},n),u=[{self:o}].concat(r);return a(e.body).isBlockStatement?(G(e)||0!==e.body.body.length&&"ReturnStatement"===e.body.body[e.body.body.length-1].type||e.body.body.push({type:"ReturnStatement"}),o.body={type:"BlockStatement",body:e.body.body.map(function(e){return N(e,u)})}):(o.body={type:"BlockStatement",body:[N({type:"ReturnStatement",argument:e.body},u)]},e.expression=!1),o=m(o,n.promises||n.generators||n.engine?null:b(!n.lazyThenables||0)),n.promises&&(o={type:"NewExpression",callee:h("Promise"),arguments:[o]}),o={type:"BlockStatement",body:[{type:"ReturnStatement",loc:e.loc,argument:o}]},s&&D(o.body,[he]),void(e.body=o)}}),e}function Y(e){if(Array.isArray(e))return e.map(Y);var t=0;return y.treeWalker(e,function(e,n,r){if("ThrowStatement"!==e.type&&"ReturnStatement"!==e.type||e.$mapped){if(a(e).isFunction)return t++,n(e),void t--}else if(t>0&&a(e).isAsync)return delete e.async,e.argument={type:"CallExpression",callee:"ThrowStatement"===e.type?pe.error:pe.return,arguments:e.argument?[e.argument]:[]},void(e.type="ReturnStatement");n(e)})}function Q(e,t){if(n.noRuntime)throw new Error("Nodent: 'noRuntime' option only compatible with -promise and -engine modes");return y.part("{ return (function*($return,$error){ $:body }).$asyncspawn(Promise,this) }",{return:pe.return,error:pe.error,asyncspawn:pe.asyncspawn,body:Y(e).concat(t?[{type:"ReturnStatement",argument:pe.return}]:[])}).body[0]}function X(e){e.$asyncgetwarninig||(e.$asyncgetwarninig=!0,d(v(e)+"'async get "+r(e)+"(){...}' is non-standard. See https://github.com/MatAtBread/nodent#differences-from-the-es7-specification"))}function Z(e,t){function r(e,t){y.treeWalker(e,function(n,r,i){n!==e&&a(n).isFunction||(a(n).isAwait?t?(n.$hidden=!0,r()):(delete n.operator,n.delegate=!1,n.type="YieldExpression",r()):r())})}function o(e){var t=n.promises;n.promises=!0,A(e,!0),n.promises=t}function u(e){return"BlockStatement"!==e.body.type&&(e.body={type:"BlockStatement",body:[{type:"ReturnStatement",argument:e.body}]}),e}function c(e,n){n.$asyncexitwarninig||(n.$asyncexitwarninig=!0,d(v(e)+"'async "+{ReturnStatement:"return",ThrowStatement:"throw"}[e.type]+"' not possible in "+(t?"engine":"generator")+" mode. Using Promises for function at "+v(n)))}y.treeWalker(e,function(e,n,i){n();var l,p,h;if(a(e).isAsync&&a(e).isFunction){var f;(f=x(i[0].parent))&&a(f).isAsync&&"get"===i[0].parent.kind&&X(i[0].parent.key),(p=G(e))?(c(p,e.body),o(e)):t?"get"!==i[0].parent.kind&&r(e,!0):(delete(l=e).async,h=w(l),r(l,!1),(l=u(l)).body=Q(l.body.body,p),h&&D(l.body.body,[he]),l.id&&"ExpressionStatement"===i[0].parent.type?(l.type="FunctionDeclaration",i[1].replace(l)):i[0].replace(l))}else(l=x(e))&&a(l).isAsync&&((p=G(l))?(c(p,l),o(e)):t&&"get"!==e.kind||(t?o(e):(e.async=!1,h=w(l),r(l,!1),s(l,u(l)),l.body=Q(l.body.body,p)),h&&D(l.body.body,[he])))});var l=i(n);return n.engine=!1,n.generators=!1,ie(e),ne(e),j(e,l.engine),F(e),P(e),V(e,[M,W,B,R,$]),q(e,"warn"),n.engine=l.engine,n.generators=l.generators,e}function K(e,t,n){var r=[];return y.treeWalker(e,function(i,s,o){if(i===e)return s();t(i,o)?r.push([].concat(o)):n||a(i).isScope||s()}),r}function ee(e,t){var n=[],r={};if((e=e.filter(function(e){return"ExportNamedDeclaration"!==e[0].parent.type})).length){var s={};e.forEach(function(e){function t(e){e in s?r[e]=o.declarations[u]:s[e]=o.declarations[u]}for(var n=e[0],o=n.self,a=(o.kind,[]),u=0;u1?{type:"SequenceExpression",expressions:a}:a[0];"For"!==n.parent.type.slice(0,3)&&(p={type:"ExpressionStatement",expression:p}),n.replace(p)}});var o=Object.keys(s);o.length&&(o=o.map(function(e){return{type:"VariableDeclarator",id:h(e),loc:s[e].loc,start:s[e].start,end:s[e].end}}),n[0]&&"VariableDeclaration"===n[0].type?n[0].declarations=n[0].declarations.concat(o):n.unshift({type:"VariableDeclaration",kind:t,declarations:o}))}return{decls:n,duplicates:r}}function te(e){if(!e)return[];if(Array.isArray(e))return e.reduce(function(e,t){return e.concat(te(t.id))},[]);switch(e.type){case"Identifier":return[e.name];case"AssignmentPattern":return te(e.left);case"ArrayPattern":return e.elements.reduce(function(e,t){return e.concat(te(t))},[]);case"ObjectPattern":return e.properties.reduce(function(e,t){return e.concat(te(t))},[]);case"ObjectProperty":case"Property":return te(e.value);case"RestElement":case"RestProperty":return te(e.argument)}}function ne(e){function t(e){return u(e,function(e){return"AssignmentExpression"===e.type})}function n(e){return function(t,n){if("VariableDeclaration"===t.type&&(t.kind=t.kind||"var")&&e.indexOf(t.kind)>=0){var r=n[0];return("left"!=r.field||"ForInStatement"!==r.parent.type&&"ForOfStatement"!==r.parent.type)&&("init"!=r.field||"ForStatement"!==r.parent.type||"const"!==t.kind&&"let"!==t.kind)}}}function o(e,t){return!("FunctionDeclaration"!==e.type||!e.id)&&(a(e).isAsync||!e.$continuation)}var l={TemplateLiteral:function(e){return e.expressions},NewExpression:function(e){return e.arguments},CallExpression:function(e){return e.arguments},SequenceExpression:function(e){return e.expressions},ArrayExpression:function(e){return e.elements},ObjectExpression:function(e){return e.properties.map(function(e){return e.value})}};y.treeWalker(e,function(e,n,r){function o(e){h.length&&(e.argument={type:"SequenceExpression",expressions:h.map(function(e){var t=i(e);return s(e,e.left),t}).concat(e.argument)},h=[])}var u;if(n(),e.type in l&&!e.$hoisted){var p=l[e.type](e),h=[];for(u=0;u0;u--)if(e.declarations[u]&&e.declarations[u].init&&c(e.declarations[u].init)){var f={type:"VariableDeclaration",kind:e.kind,declarations:e.declarations.splice(u)},d=r[0];if(!("index"in d))throw new Error("VariableDeclaration not in a block");d.parent[d.field].splice(d.index+1,0,f)}}),function(e){function t(e){d(v(e)+"Possible assignment to 'const "+r(e)+"'")}function n(e){switch(e.type){case"Identifier":"const"===i[e.name]&&t(e);break;case"ArrayPattern":e.elements.forEach(function(e){"const"===i[e.name]&&t(e)});break;case"ObjectPattern":e.properties.forEach(function(e){"const"===i[e.key.name]&&t(e)})}}var i={};y.treeWalker(e,function(e,t,r){var s=a(e).isBlockStatement;if(s){i=Object.create(i);for(var o=0;o=0&&"ReturnStatement"===r[1].self.type){var s=e.$thisCallName,o=i(ce[s].def.body.body);ce[s].$inlined=!0,a(r[1].self).isJump||o.push({type:"ReturnStatement"}),r[1].replace(o)}});var n=Object.keys(ce).map(function(e){return ce[e].$inlined&&ce[e].def});y.treeWalker(e,function(e,t,r){t(),n.indexOf(e)>=0&&r[0].remove()})}if(!("Program"===e.type&&"module"===e.sourceType||u(e,function(e){return a(e).isES6},!0))){var r=oe(e);!function(e){y.treeWalker(e,function(e,t,n){if("Program"===e.type||"FunctionDeclaration"===e.type||"FunctionExpression"===e.type){var i=r;if(r=r||oe(e)){t();var s="Program"===e.type?e:e.body,o=K(s,function(e,t){if("FunctionDeclaration"===e.type)return t[0].parent!==s});o=o.map(function(e){return e[0].remove()}),[].push.apply(s.body,o)}else t();r=i}else t()})}(e)}return y.treeWalker(e,function(e,t,n){t(),Object.keys(e).filter(function(e){return"$"===e[0]}).forEach(function(t){delete e[t]})}),e}var ce={},le=1,pe={};Object.keys(n).filter(function(e){return"$"===e[0]}).forEach(function(e){pe[e.slice(1)]=h(n[e])});var he=y.part("var $0 = arguments",[pe.arguments]).body[0];return n.engine?(e.ast=re(e.ast,!0),e.ast=Z(e.ast,n.engine),e.ast=se(e.ast),ue(e.ast)):n.generators?(e.ast=re(e.ast),e.ast=Z(e.ast),e.ast=se(e.ast),ue(e.ast)):(e.ast=re(e.ast),A(e.ast)),n.babelTree&&y.treeWalker(e.ast,function(e,t,n){t(),"Literal"===e.type&&s(e,b(e.value))}),e}var y=e("./parser"),m=e("./output"),g={start:!0,end:!0,loc:!0,range:!0},v={getScope:function(){return"FunctionDeclaration"===this.node.type||"FunctionExpression"===this.node.type||"Function"===this.node.type||"ObjectMethod"===this.node.type||"ClassMethod"===this.node.type||"ArrowFunctionExpression"===this.node.type&&"BlockStatement"===this.node.body.type?this.node.body.body:"Program"===this.node.type?this.node.body:null},isScope:function(){return"FunctionDeclaration"===this.node.type||"FunctionExpression"===this.node.type||"Function"===this.node.type||"Program"===this.node.type||"ObjectMethod"===this.node.type||"ClassMethod"===this.node.type||"ArrowFunctionExpression"===this.node.type&&"BlockStatement"===this.node.body.type},isFunction:function(){return"FunctionDeclaration"===this.node.type||"FunctionExpression"===this.node.type||"Function"===this.node.type||"ObjectMethod"===this.node.type||"ClassMethod"===this.node.type||"ArrowFunctionExpression"===this.node.type},isClass:function(){return"ClassDeclaration"===this.node.type||"ClassExpression"===this.node.type},isBlockStatement:function(){return"ClassBody"===this.node.type||"Program"===this.node.type||"BlockStatement"===this.node.type?this.node.body:"SwitchCase"===this.node.type&&this.node.consequent},isExpressionStatement:function(){return"ExpressionStatement"===this.node.type},isLiteral:function(){return"Literal"===this.node.type||"BooleanLiteral"===this.node.type||"RegExpLiteral"===this.node.type||"NumericLiteral"===this.node.type||"StringLiteral"===this.node.type||"NullLiteral"===this.node.type},isDirective:function(){return"ExpressionStatement"===this.node.type&&("StringLiteral"===this.node.expression.type||"Literal"===this.node.expression.type&&"string"==typeof this.node.expression.value)},isUnaryExpression:function(){return"UnaryExpression"===this.node.type},isAwait:function(){return"AwaitExpression"===this.node.type&&!this.node.$hidden},isAsync:function(){return this.node.async},isStatement:function(){return null!==this.node.type.match(/[a-zA-Z]+Declaration/)||null!==this.node.type.match(/[a-zA-Z]+Statement/)},isExpression:function(){return null!==this.node.type.match(/[a-zA-Z]+Expression/)},isLoop:function(){return"ForStatement"===this.node.type||"WhileStatement"===this.node.type||"DoWhileStatement"===this.node.type},isJump:function(){return"ReturnStatement"===this.node.type||"ThrowStatement"===this.node.type||"BreakStatement"===this.node.type||"ContinueStatement"===this.node.type},isES6:function(){switch(this.node.type){case"ExportNamedDeclaration":case"ExportSpecifier":case"ExportDefaultDeclaration":case"ExportAllDeclaration":case"ImportDeclaration":case"ImportSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ArrowFunctionExpression":case"ForOfStatement":case"YieldExpression":case"Super":case"RestElement":case"RestProperty":case"SpreadElement":case"TemplateLiteral":case"ClassDeclaration":case"ClassExpression":return!0;case"VariableDeclaration":return this.node.kind&&"var"!==this.node.kind;case"FunctionDeclaration":case"FunctionExpression":return!!this.node.generator}}},b={};Object.keys(v).forEach(function(e){Object.defineProperty(b,e,{get:v[e]})}),t.exports={printNode:r,babelLiteralNode:p,asynchronize:function(e,t,n,r){try{return d(e,0,n,r)}catch(t){if(t instanceof SyntaxError){var i=e.origCode.substr(t.pos-t.loc.column);i=i.split("\n")[0],t.message+=" (nodent)\n"+i+"\n"+i.replace(/[\S ]/g,"-").substring(0,t.loc.column)+"^",t.stack=""}throw t}}}},{"./output":12,"./parser":13}],12:[function(e,t,n){"use strict";function r(e){if("NewExpression"===e.type&&e.arguments&&e.arguments.length)return 19;var t=h[e.type]||h[e.type+e.operator]||h[e.type+e.operator+(e.prefix?"prefix":"")];return void 0!==t?t:20}var i,s,o,a,u,c,l=e("source-map").SourceMapGenerator;if("".repeat)c=function(e,t){return t&&e?e.repeat(t):""};else{var p={};c=function(e,t){if(!t||!e)return"";var n=""+e+t;if(!p[n]){for(var r=[];t--;)r.push(e);p[n]=r.join("")}return p[n]}}var h={ExpressionStatement:-1,Identifier:21,Literal:21,BooleanLiteral:21,RegExpLiteral:21,NumericLiteral:21,StringLiteral:21,NullLiteral:21,ThisExpression:21,SuperExpression:21,ObjectExpression:21,ClassExpression:21,MemberExpression:19,CallExpression:18,NewExpression:18,ArrayExpression:17.5,FunctionExpression:17.5,FunctionDeclaration:17.5,ArrowFunctionExpression:17.5,"UpdateExpression++":17,"UpdateExpression--":17,"UpdateExpression++prefix":16,"UpdateExpression--prefix":16,UnaryExpression:16,AwaitExpression:16,"BinaryExpression**":15,"BinaryExpression*":15,"BinaryExpression/":15,"BinaryExpression%":15,"BinaryExpression+":14,"BinaryExpression-":14,"BinaryExpression<<":13,"BinaryExpression>>":13,"BinaryExpression>>>":13,"BinaryExpression<":12,"BinaryExpression<=":12,"BinaryExpression>":12,"BinaryExpression>=":12,BinaryExpressionin:12,BinaryExpressioninstanceof:12,"BinaryExpression==":11,"BinaryExpression===":11,"BinaryExpression!=":11,"BinaryExpression!==":11,"BinaryExpression&":10,"BinaryExpression^":9,"BinaryExpression|":8,"LogicalExpression&&":7,"LogicalExpression||":6,ConditionalExpression:5,AssignmentPattern:4,AssignmentExpression:4,yield:3,YieldExpression:3,SpreadElement:2,"comma-separated-list":1.5,SequenceExpression:1},f={type:"comma-separated-list"},d={out:function(e,t,n){var r=this[n||e.type];r?r.call(this,e,t):t.write(e,"/*"+e.type+"?*/ "+t.sourceAt(e.start,e.end))},expr:function(e,t,n,i){2===i||r(n)0)for(var r=n.length,i=0;i0){this.out(e[0],t,e[0].type);for(var r=1,i=e.length;r0){t.write(null,s);for(var a=0,u=n.length;a0){this.out(n[0],t,"VariableDeclarator");for(var i=1;i0){for(var s=0;s0)for(var r=0;r ")):(this.formatParameters(e.params,t),t.write(e,"=> ")),"ObjectExpression"===e.body.type||"SequenceExpression"===e.body.type?(t.write(null,"("),this.out(e.body,t,e.body.type),t.write(null,")")):this.out(e.body,t,e.body.type)},ThisExpression:function(e,t){t.write(e,"this")},Super:function(e,t){t.write(e,"super")},RestElement:s=function(e,t){t.write(e,"..."),this.out(e.argument,t,e.argument.type)},SpreadElement:s,YieldExpression:function(e,t){t.write(e,e.delegate?"yield*":"yield"),e.argument&&(t.write(null," "),this.expr(t,e,e.argument))},AwaitExpression:function(e,t){t.write(e,"await "),this.expr(t,e,e.argument)},TemplateLiteral:function(e,t){var n,r=e.quasis,i=e.expressions;t.write(e,"`");for(var s=0,o=i.length;s0)for(var n=e.elements,r=n.length,i=0;;){var s=n[i];if(s&&this.expr(t,f,s),((i+=1)=r)break;t.lineLength()>t.wrapColumn&&t.write(null,t.lineEnd,c(t.indent,t.indentLevel+1))}t.write(null,"]")},ArrayPattern:a,ObjectExpression:function(e,t){var n,r=c(t.indent,t.indentLevel++),i=t.lineEnd,s=r+t.indent;if(t.write(e,"{"),e.properties.length>0){t.write(null,i);for(var o=e.properties,a=o.length,u=0;n=o[u],t.write(null,s),this.out(n,t,"Property"),++ut.wrapColumn&&t.write(null,t.lineEnd,c(t.indent,t.indentLevel+1));t.write(null,i,r,"}")}else t.write(null,"}");t.indentLevel--},Property:function(e,t){e.method||"get"===e.kind||"set"===e.kind?this.MethodDefinition(e,t):(e.shorthand||(e.computed?(t.write(null,"["),this.out(e.key,t,e.key.type),t.write(null,"]")):this.out(e.key,t,e.key.type),t.write(null,": ")),this.expr(t,f,e.value))},ObjectPattern:function(e,t){if(t.write(e,"{"),e.properties.length>0)for(var n=e.properties,r=n.length,i=0;this.out(n[i],t,"Property"),++i0)for(var i=r.length,s=0;s1&&t.write(e," "),this.expr(t,e,e.argument,!0)):(this.expr(t,e,e.argument),t.write(e,e.operator))},UpdateExpression:function(e,t){e.prefix?(t.write(e,e.operator),this.out(e.argument,t,e.argument.type)):(this.out(e.argument,t,e.argument.type),t.write(e,e.operator))},BinaryExpression:o=function(e,t){var n=e.operator;"in"===n&&t.inForInit&&t.write(null,"("),this.expr(t,e,e.left),t.write(e," ",n," "),this.expr(t,e,e.right,"ArrowFunctionExpression"===e.right.type?2:0),"in"===n&&t.inForInit&&t.write(null,")")},LogicalExpression:o,AssignmentExpression:function(e,t){"ObjectPattern"===e.left.type&&t.write(null,"("),this.BinaryExpression(e,t),"ObjectPattern"===e.left.type&&t.write(null,")")},AssignmentPattern:function(e,t){this.expr(t,e,e.left),t.write(e," = "),this.expr(t,e,e.right)},ConditionalExpression:function(e,t){this.expr(t,e,e.test,!0),t.write(e," ? "),this.expr(t,e,e.consequent),t.write(null," : "),this.expr(t,e,e.alternate)},NewExpression:function(e,t){t.write(e,"new "),this.expr(t,e,e.callee,"CallExpression"===e.callee.type||"ObjectExpression"===e.callee.type?2:0),this.argumentList(e,t)},CallExpression:function(e,t){this.expr(t,e,e.callee,"ObjectExpression"===e.callee.type?2:0),this.argumentList(e,t)},MemberExpression:function(e,t){!("ObjectExpression"===e.object.type||e.object.type.match(/Literal$/)&&e.object.raw&&e.object.raw.match(/^[0-9]/))&&("ArrayExpression"===e.object.type||"CallExpression"===e.object.type||"NewExpression"===e.object.type||r(e)<=r(e.object))?this.out(e.object,t,e.object.type):(t.write(null,"("),this.out(e.object,t,e.object.type),t.write(null,")")),e.computed?(t.write(e,"["),this.out(e.property,t,e.property.type),t.write(null,"]")):(t.write(e,"."),this.out(e.property,t,e.property.type))},Identifier:function(e,t){t.write(e,e.name)},Literal:function(e,t){t.write(e,e.raw)},NullLiteral:function(e,t){t.write(e,"null")},BooleanLiteral:function(e,t){t.write(e,JSON.stringify(e.value))},StringLiteral:function(e,t){t.write(e,JSON.stringify(e.value))},RegExpLiteral:function(e,t){t.write(e,e.extra.raw||"/"+e.pattern+"/"+e.flags)},NumericLiteral:function(e,t){t.write(e,JSON.stringify(e.value))}};t.exports=function(e,t,n){var r="",i=[],s=(t=t||{}).map&&new l(t.map);s&&t.map.sourceContent&&s.setSourceContent(t.map.file,t.map.sourceContent);var o="",a=[],u=[],p={inForInit:0,lineLength:function(){return r.length},sourceAt:function(e,t){return n?n.substring(e,t):"/* Omitted Non-standard node */"},write:function(e){o=arguments[arguments.length-1];for(var n=1;n=0&&r({self:i,parent:e,field:u[c],index:!0}):l instanceof Object&&i===l&&r({self:i,parent:e,field:u[c]})}})},n),e}function s(t,n){var r=[],s={ecmaVersion:8,allowHashBang:!0,allowReturnOutsideFunction:!0,allowImportExportEverywhere:!0,locations:!0,onComment:r};if((!n||!n.noNodentExtensions||parseInt(o.version)<4)&&(c||(parseInt(o.version)<4&&console.warn("Nodent: Warning - noNodentExtensions option requires acorn >=v4.x. Extensions installed."),e("acorn-es7-plugin")(o),c=!0),s.plugins=s.plugins||{},s.plugins.asyncawait={asyncExits:!0,awaitAnywhere:!0}),n)for(var a in n)"noNodentExtensions"!==a&&(s[a]=n[a]);var u=o.parse(t,s);return i(u,function(e,t,n){for(t();r.length&&e.loc&&e.loc.start.line>=r[0].loc.start.line&&e.loc.end.line>=r[0].loc.end.line;)e.$comments=e.$comments||[],e.$comments.push(r.shift())}),u}var o=e("acorn"),a=e("acorn/dist/walk").make({AwaitExpression:function(e,t,n){n(e.argument,t,"Expression")},SwitchStatement:function(e,t,n){n(e.discriminant,t,"Expression");for(var r=0;r=0)return t}else{var n=i.toSetString(e);if(s.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')},r.prototype.at=function(e){if(e>=0&&e>>=5)>0&&(t|=32),n+=r.encode(t)}while(i>0);return n},n.decode=function(e,t,n){var i,s,o=e.length,a=0,u=0;do{if(t>=o)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(s=r.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));i=!!(32&s),a+=(s&=31)<>1;return 1==(1&e)?-t:t}(a),n.rest=t}},{"./base64":16}],16:[function(e,t,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");n.encode=function(e){if(0<=e&&e0?t-u>1?r(u,t,i,s,o,a):a==n.LEAST_UPPER_BOUND?t1?r(e,u,i,s,o,a):a==n.LEAST_UPPER_BOUND?u:e<0?-1:e}n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,t,i,s){if(0===t.length)return-1;var o=r(-1,t.length,e,t,i,s||n.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&0===i(t[o],t[o-1],!0);)--o;return o}},{}],18:[function(e,t,n){function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var i=e("./util");r.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},r.prototype.add=function(e){!function(e,t){var n=e.generatedLine,r=t.generatedLine,s=e.generatedColumn,o=t.generatedColumn;return r>n||r==n&&o>=s||i.compareByGeneratedPositionsInflated(e,t)<=0}(this._last,e)?(this._sorted=!1,this._array.push(e)):(this._last=e,this._array.push(e))},r.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},n.MappingList=r},{"./util":23}],19:[function(e,t,n){function r(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function i(e,t,n,s){if(n=0){var s=this._originalMappings[i];if(void 0===e.column)for(var o=s.originalLine;s&&s.originalLine===o;)r.push({line:a.getArg(s,"generatedLine",null),column:a.getArg(s,"generatedColumn",null),lastColumn:a.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i];else for(var c=s.originalColumn;s&&s.originalLine===t&&s.originalColumn==c;)r.push({line:a.getArg(s,"generatedLine",null),column:a.getArg(s,"generatedColumn",null),lastColumn:a.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i]}return r},n.SourceMapConsumer=r,(i.prototype=Object.create(r.prototype)).consumer=r,i.fromSourceMap=function(e){var t=Object.create(i.prototype),n=t._names=c.fromArray(e._names.toArray(),!0),r=t._sources=c.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var o=e._mappings.toArray().slice(),u=t.__generatedMappings=[],l=t.__originalMappings=[],h=0,f=o.length;h1&&(n.source=y+i[1],y+=i[1],n.originalLine=f+i[2],f=n.originalLine,n.originalLine+=1,n.originalColumn=d+i[3],d=n.originalColumn,i.length>4&&(n.name=m+i[4],m+=i[4])),E.push(n),"number"==typeof n.originalLine&&w.push(n)}p(E,a.compareByGeneratedPositionsDeflated),this.__generatedMappings=E,p(w,a.compareByOriginalPositions),this.__originalMappings=w},i.prototype._findMapping=function(e,t,n,r,i,s){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return u.search(e,t,i,s)},i.prototype.computeColumnSpans=function(){for(var e=0;e=0){var i=this._generatedMappings[n];if(i.generatedLine===t.generatedLine){var s=a.getArg(i,"source",null);null!==s&&(s=this._sources.at(s),null!=this.sourceRoot&&(s=a.join(this.sourceRoot,s)));var o=a.getArg(i,"name",null);return null!==o&&(o=this._names.at(o)),{source:s,line:a.getArg(i,"originalLine",null),column:a.getArg(i,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}},i.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},i.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=a.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var n;if(null!=this.sourceRoot&&(n=a.urlParse(this.sourceRoot))){var r=e.replace(/^file:\/\//,"");if("file"==n.scheme&&this._sources.has(r))return this.sourcesContent[this._sources.indexOf(r)];if((!n.path||"/"==n.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},i.prototype.generatedPositionFor=function(e){var t=a.getArg(e,"source");if(null!=this.sourceRoot&&(t=a.relative(this.sourceRoot,t)),!this._sources.has(t))return{line:null,column:null,lastColumn:null};var n={source:t=this._sources.indexOf(t),originalLine:a.getArg(e,"line"),originalColumn:a.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,a.getArg(e,"bias",r.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===n.source)return{line:a.getArg(s,"generatedLine",null),column:a.getArg(s,"generatedColumn",null),lastColumn:a.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=i,(o.prototype=Object.create(r.prototype)).constructor=r,o.prototype._version=3,Object.defineProperty(o.prototype,"sources",{get:function(){for(var e=[],t=0;t0&&e.column>=0)||t||n||r)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))},r.prototype._serializeMappings=function(){for(var e,t,n,r,o=0,a=1,u=0,c=0,l=0,p=0,h="",f=this._mappings.toArray(),d=0,y=f.length;d0){if(!s.compareByGeneratedPositionsInflated(t,f[d-1]))continue;e+=","}e+=i.encode(t.generatedColumn-o),o=t.generatedColumn,null!=t.source&&(r=this._sources.indexOf(t.source),e+=i.encode(r-p),p=r,e+=i.encode(t.originalLine-1-c),c=t.originalLine-1,e+=i.encode(t.originalColumn-u),u=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=i.encode(n-l),l=n)),h+=e}return h},r.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;null!=t&&(e=s.relative(t,e));var n=s.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)},r.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},r.prototype.toString=function(){return JSON.stringify(this.toJSON())},n.SourceMapGenerator=r},{"./array-set":14,"./base64-vlq":15,"./mapping-list":18,"./util":23}],22:[function(e,t,n){function r(e,t,n,r,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==n?null:n,this.name=null==i?null:i,this[a]=!0,null!=r&&this.add(r)}var i=e("./source-map-generator").SourceMapGenerator,s=e("./util"),o=/(\r?\n)/,a="$$$isSourceNode$$$";r.fromStringWithSourceMap=function(e,t,n){function i(e,t){if(null===e||void 0===e.source)a.add(t);else{var i=n?s.join(n,e.source):e.source;a.add(new r(e.originalLine,e.originalColumn,i,t,e.name))}}var a=new r,u=e.split(o),c=0,l=function(){function e(){return c=0;t--)this.prepend(e[t]);else{if(!e[a]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},r.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n0){for(t=[],n=0;n=0;l--)"."===(o=u[l])?u.splice(l,1):".."===o?c++:c>0&&(""===o?(u.splice(l+1,c),c=0):(u.splice(l,2),c--));return""===(t=u.join("/"))&&(t=a?"/":"."),s?(s.path=t,i(s)):t}function o(e){return e}function a(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function u(e,t){return e===t?0:e>t?1:-1}n.getArg=function(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')};var c=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,l=/^data:.+\,.+$/;n.urlParse=r,n.urlGenerate=i,n.normalize=s,n.join=function(e,t){""===e&&(e="."),""===t&&(t=".");var n=r(t),o=r(e);if(o&&(e=o.path||"/"),n&&!n.scheme)return o&&(n.scheme=o.scheme),i(n);if(n||t.match(l))return t;if(o&&!o.host&&!o.path)return o.host=t,i(o);var a="/"===t.charAt(0)?t:s(e.replace(/\/+$/,"")+"/"+t);return o?(o.path=a,i(o)):a},n.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(c)},n.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return t;if((e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)};var p=!("__proto__"in Object.create(null));n.toSetString=p?o:function(e){return a(e)?"$"+e:e},n.fromSetString=p?o:function(e){return a(e)?e.slice(1):e},n.compareByOriginalPositions=function(e,t,n){var r=e.source-t.source;return 0!==r?r:0!=(r=e.originalLine-t.originalLine)?r:0!=(r=e.originalColumn-t.originalColumn)||n?r:0!=(r=e.generatedColumn-t.generatedColumn)?r:0!=(r=e.generatedLine-t.generatedLine)?r:e.name-t.name},n.compareByGeneratedPositionsDeflated=function(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r?r:0!=(r=e.generatedColumn-t.generatedColumn)||n?r:0!=(r=e.source-t.source)?r:0!=(r=e.originalLine-t.originalLine)?r:0!=(r=e.originalColumn-t.originalColumn)?r:e.name-t.name},n.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n?n:0!=(n=e.generatedColumn-t.generatedColumn)?n:0!==(n=u(e.source,t.source))?n:0!=(n=e.originalLine-t.originalLine)?n:0!=(n=e.originalColumn-t.originalColumn)?n:u(e.name,t.name)}},{}],24:[function(e,t,n){n.SourceMapGenerator=e("./lib/source-map-generator").SourceMapGenerator,n.SourceMapConsumer=e("./lib/source-map-consumer").SourceMapConsumer,n.SourceNode=e("./lib/source-node").SourceNode},{"./lib/source-map-consumer":20,"./lib/source-map-generator":21,"./lib/source-node":22}],25:[function(e,t,n){t.exports={_args:[[{raw:"nodent-compiler@>=3.1.5",scope:null,escapedName:"nodent-compiler",name:"nodent-compiler",rawSpec:">=3.1.5",spec:">=3.1.5",type:"range"},"/Users/evgenypoberezkin/Documents/JSON/ajv/node_modules/nodent"]],_from:"nodent-compiler@>=3.1.5",_id:"nodent-compiler@3.1.5",_inCache:!0,_location:"/nodent-compiler",_nodeVersion:"8.9.1",_npmOperationalInternal:{host:"s3://npm-registry-packages",tmp:"tmp/nodent-compiler-3.1.5.tgz_1511792299537_0.15715787676163018"},_npmUser:{name:"matatbread",email:"npm@mailed.me.uk"},_npmVersion:"5.5.1",_phantomChildren:{},_requested:{raw:"nodent-compiler@>=3.1.5",scope:null,escapedName:"nodent-compiler",name:"nodent-compiler",rawSpec:">=3.1.5",spec:">=3.1.5",type:"range"},_requiredBy:["/nodent"],_resolved:"https://registry.npmjs.org/nodent-compiler/-/nodent-compiler-3.1.5.tgz",_shasum:"8c09289eacf7256bda89c2b88941681d5cccf80c",_shrinkwrap:null,_spec:"nodent-compiler@>=3.1.5",_where:"/Users/evgenypoberezkin/Documents/JSON/ajv/node_modules/nodent",author:{name:"Mat At Bread",email:"nodent@mailed.me.uk"},bugs:{url:"https://github.com/MatAtBread/nodent/issues"},dependencies:{acorn:">=2.5.2","acorn-es7-plugin":">=1.1.6","source-map":"^0.5.6"},description:"NoDent - Asynchronous Javascript language extensions",devDependencies:{},directories:{},dist:{integrity:"sha512-Istg796un2lALiy/eFNnLbAEMovQqrtpVqXVY8PKs6ycsyBbK480D55misJBQ1QxvstcJ7Hk9xbSVkV8lIi+tg==",shasum:"8c09289eacf7256bda89c2b88941681d5cccf80c",tarball:"https://registry.npmjs.org/nodent-compiler/-/nodent-compiler-3.1.5.tgz"},engines:"node >= 0.10.0",gitHead:"93054f019902e2b107e7be681836273f35a02614",homepage:"https://github.com/MatAtBread/nodent-compiler#readme",keywords:["Javascript","ES7","async","await","language","extensions","Node","callback","generator","Promise","asynchronous"],license:"BSD-2-Clause",main:"compiler.js",maintainers:[{name:"matatbread",email:"npm@mailed.me.uk"}],name:"nodent-compiler",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+https://github.com/MatAtBread/nodent-compiler.git"},scripts:{test:"node tests/basic.js # Please install 'nodent' and test the compiler fully from there."},version:"3.1.5"}},{}],26:[function(e,t,n){"use strict";function r(e,t){if(Function.prototype.$asyncspawn||Object.defineProperty(Function.prototype,"$asyncspawn",{value:r,enumerable:!1,configurable:!0,writable:!0}),this instanceof Function){var n=this;return new e(function(e,r){function i(t,n){var o;try{if((o=t.call(s,n)).done){if(o.value!==e){if(o.value&&o.value===o.value.then)return o.value(e,r);e&&e(o.value),e=null}return}o.value.then?o.value.then(function(e){i(s.next,e)},function(e){i(s.throw,e)}):i(s.next,o.value)}catch(e){return r&&r(e),void(r=null)}}var s=n.call(t,e,r);i(s.next)})}}var i=function(e,t){for(var n=t.toString(),r="return "+n,i=n.match(/.*\(([^)]*)\)/)[1],s=/['"]!!!([^'"]*)['"]/g,o=[];;){var a=s.exec(r);if(!a)break;o.push(a)}return o.reverse().forEach(function(t){r=r.slice(0,t.index)+e[t[1]]+r.substr(t.index+t[0].length)}),r=r.replace(/\/\*[^*]*\*\//g," ").replace(/\s+/g," "),new Function(i,r)()}({zousan:e("./zousan").toString(),thenable:e("./thenableFactory").toString()},function e(t,n){function r(){return i.apply(t,arguments)}Function.prototype.$asyncbind||Object.defineProperty(Function.prototype,"$asyncbind",{value:e,enumerable:!1,configurable:!0,writable:!0}),e.trampoline||(e.trampoline=function(e,t,n,r,i){return function s(o){for(;o;){if(o.then)return o=o.then(s,r),i?void 0:o;try{if(o.pop){if(o.length)return o.pop()?t.call(e):o;o=n}else o=o.call(e)}catch(e){return r(e)}}}}),e.LazyThenable||(e.LazyThenable="!!!thenable"(),e.EagerThenable=e.Thenable=(e.EagerThenableFactory="!!!zousan")());var i=this;switch(n){case!0:return new e.Thenable(r);case 0:return new e.LazyThenable(r);case void 0:return r.then=r,r;default:return function(){try{return i.apply(t,arguments)}catch(e){return n(e)}}}});i(),r(),t.exports={$asyncbind:i,$asyncspawn:r}},{"./thenableFactory":27,"./zousan":28}],27:[function(e,t,n){t.exports=function(){function e(e){return e&&e instanceof Object&&"function"==typeof e.then}function t(n,r,i){try{var s=i?i(r):r;if(n===s)return n.reject(new TypeError("Promise resolution loop"));e(s)?s.then(function(e){t(n,e)},function(e){n.reject(e)}):n.resolve(s)}catch(e){n.reject(e)}}function n(){}function r(e){}function i(r,i){var s=new n;try{this._resolver(function(n){return e(n)?n.then(r,i):t(s,n,r)},function(e){t(s,e,i)})}catch(e){t(s,e,i)}return s}function s(e){this._resolver=e,this.then=i}return n.prototype={resolve:r,reject:r,then:function(e,t){this.resolve=e,this.reject=t}},s.resolve=function(e){return s.isThenable(e)?e:{then:function(t){return t(e)}}},s.isThenable=e,s}},{}],28:[function(e,t,n){(function(e){"use strict";t.exports=function(t){function n(e){if(e){var t=this;e(function(e){t.resolve(e)},function(e){t.reject(e)})}}function r(e,t){if("function"==typeof e.y)try{var n=e.y.call(void 0,t);e.p.resolve(n)}catch(t){e.p.reject(t)}else e.p.resolve(t)}function i(e,t){if("function"==typeof e.n)try{var n=e.n.call(void 0,t);e.p.resolve(n)}catch(t){e.p.reject(t)}else e.p.reject(t)}t=t||"object"==typeof e&&e.nextTick||"function"==typeof setImmediate&&setImmediate||function(e){setTimeout(e,0)};var s=function(){function e(){for(;n.length-r;){try{n[r]()}catch(e){}n[r++]=void 0,r===i&&(n.splice(0,i),r=0)}}var n=[],r=0,i=1024;return function(i){n.push(i),n.length-r==1&&t(e)}}();return n.prototype={resolve:function(e){if(void 0===this.state){if(e===this)return this.reject(new TypeError("Attempt to resolve promise with self"));var t=this;if(e&&("function"==typeof e||"object"==typeof e))try{var n=0,i=e.then;if("function"==typeof i)return void i.call(e,function(e){n++||t.resolve(e)},function(e){n++||t.reject(e)})}catch(e){return void(n||this.reject(e))}this.state=r,this.v=e,t.c&&s(function(){for(var n=0,i=t.c.length;n]*>)(.*)/i,/(.*)(<\/script>)(.*)/i],o=0,a=!0;t=t.split("\n");for(var u=0;u=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r=-1&&!i;s--){var o=s>=0?arguments[s]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(n=o+"/"+n,i="/"===o.charAt(0))}return n=t(r(n.split("/"),function(e){return!!e}),!i).join("/"),(i?"/":"")+n||"."},n.normalize=function(e){var i=n.isAbsolute(e),s="/"===o(e,-1);return(e=t(r(e.split("/"),function(e){return!!e}),!i).join("/"))||i||(e="."),e&&s&&(e+="/"),(i?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(r(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},n.relative=function(e,t){function r(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=n.resolve(e).substr(1),t=n.resolve(t).substr(1);for(var i=r(e.split("/")),s=r(t.split("/")),o=Math.min(i.length,s.length),a=o,u=0;u1)for(var n=1;n= 8.8",https:!0,_http_server:">= 0.11",_linklist:"< 8",module:!0,net:!0,os:!0,path:!0,perf_hooks:">= 8.5",process:">= 1",punycode:!0,querystring:!0,readline:!0,repl:!0,stream:!0,string_decoder:!0,sys:!0,timers:!0,tls:!0,tty:!0,url:!0,util:!0,v8:">= 1",vm:!0,zlib:!0}},{}],37:[function(e,t,n){(function(n){function r(e){if(!0===e)return!0;for(var t=e.split(" "),n=t[0],r=t[1].split("."),s=0;s<3;++s){var o=Number(i[s]||0),a=Number(r[s]||0);if(o!==a)return"<"===n?o="===n&&o>=a}return!1}var i=n.versions&&n.versions.node&&n.versions.node.split(".")||[],s=e("./core.json"),o={};for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&(o[a]=r(s[a]));t.exports=o}).call(this,e("_process"))},{"./core.json":36,_process:32}],38:[function(e,t,n){var r=e("path"),i=e("fs"),s=r.parse||e("path-parse");t.exports=function(e,t){var n=t&&t.moduleDirectory?[].concat(t.moduleDirectory):["node_modules"],o=r.resolve(e);if(t&&!1===t.preserveSymlinks)try{o=i.realpathSync(o)}catch(e){if("ENOENT"!==e.code)throw e}var a="/";/^([A-Za-z]:)/.test(o)?a="":/^\\\\/.test(o)&&(a="\\\\");for(var u=[o],c=s(o);c.dir!==u[u.length-1];)u.push(c.dir),c=s(c.dir);var l=u.reduce(function(e,t){return e.concat(n.map(function(e){return r.join(a,t,e)}))},[]);return t&&t.paths?l.concat(t.paths):l}},{fs:7,path:30,"path-parse":31}],39:[function(e,t,n){var r=e("./core"),i=e("fs"),s=e("path"),o=e("./caller.js"),a=e("./node-modules-paths.js");t.exports=function(e,t){function n(e){if(l(e))return e;for(var t=0;t"))}return Object.keys(hostOptions).forEach(function(k){"host"===parseOpts[k]&&(parseOpts[k]=function(){try{return eval(hostOptions[k]),!0}catch(e){return!1}}())}),parseOpts.promises||parseOpts.es7||parseOpts.generators||parseOpts.engine?((parseOpts.promises||parseOpts.es7)&&parseOpts.generators&&(log("No valid 'use nodent' directive, assumed -es7 mode"),parseOpts=optionSets.es7),(parseOpts.generators||parseOpts.engine)&&(parseOpts.promises=!0),parseOpts.promises&&(parseOpts.es7=!0),parseOpts):null}function stripBOM(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),"#!"===e.substring(0,2)&&(e="//"+e),e}function compileNodentedFile(e,t){return t=t||e.log,function(n,r,i){var s=stripBOM(fs.readFileSync(r,"utf8")),o=e.parse(s,r,i);i=i||parseCompilerOptions(o.ast,t,r),e.asynchronize(o,void 0,i,t),e.prettyPrint(o,i),n._compile(o.code,o.filename)}}function asyncify(e){return e=e||Thenable,function(t,n,r){if(Array.isArray(n)){var i=n;n=function(e,t){return i.indexOf(e)>=0}}else n=n||function(e,t){return!(e.match(/Sync$/)&&e.replace(/Sync$/,"")in t)};r||(r="");var s=Object.create(t);for(var o in s)!function(){var i=o;try{"function"!=typeof t[i]||s[i+r]&&s[i+r].isAsync||!n(i,s)||(s[i+r]=function(){var n=Array.prototype.slice.call(arguments);return new e(function(e,r){var s=function(t,n){if(t)return r(t);switch(arguments.length){case 0:return e();case 2:return e(n);default:return e(Array.prototype.slice.call(arguments,1))}};n.length>t[i].length?n.push(s):n[t[i].length-1]=s;t[i].apply(t,n)})},s[i+r].isAsync=!0)}catch(e){}}();return s.super=t,s}}function generateRequestHandler(e,t,n){var r={},i=this;t||(t=/\.njs$/),n?n.compiler||(n.compiler={}):n={compiler:{}};var s=copyObj([NodentCompiler.initialCodeGenOpts,n.compiler]);return function(o,a,u){function c(e){a.statusCode=500,a.write(e.toString()),a.end()}if(r[o.url])return a.setHeader("Content-Type",r[o.url].contentType),n.setHeaders&&n.setHeaders(a),a.write(r[o.url].output),void a.end();if(!(o.url.match(t)||n.htmlScriptRegex&&o.url.match(n.htmlScriptRegex)))return u&&u();var l=e+o.url;if(n.extensions&&!fs.existsSync(l))for(var p=0;p=0?this.covers[n]=require(e):this.covers[n]=require(__dirname+"/covers/"+e)),this.covers[n](this,t)}function prepareMappedStackTrace(e,t){return e+t.map(function(e){var t=e.getFileName();if(t&&NodentCompiler.prototype.smCache[t]){var n=NodentCompiler.prototype.smCache[t].smc.originalPositionFor({line:e.getLineNumber(),column:e.getColumnNumber()});if(n&&n.line){var r=e.toString();return"\n at "+r.substring(0,r.length-1)+" => …"+n.source+":"+n.line+":"+n.column+(e.getFunctionName()?")":"")}}return"\n at "+e}).join("")}function setGlobalEnvironment(e){var t={};t[defaultCodeGenOpts.$asyncbind]={value:$asyncbind,writable:!0,enumerable:!1,configurable:!0},t[defaultCodeGenOpts.$asyncspawn]={value:$asyncspawn,writable:!0,enumerable:!1,configurable:!0};try{Object.defineProperties(Function.prototype,t)}catch(t){e.log("Function prototypes already assigned: ",t.messsage)}defaultCodeGenOpts[defaultCodeGenOpts.$error]in global||(global[defaultCodeGenOpts[defaultCodeGenOpts.$error]]=globalErrorHandler),e.augmentObject&&Object.defineProperties(Object.prototype,{asyncify:{value:function(e,t,n){return asyncify(e)(this,t,n)},writable:!0,configurable:!0},isThenable:{value:function(){return Thenable.isThenable(this)},writable:!0,configurable:!0}}),Object[defaultCodeGenOpts.$makeThenable]=Thenable.resolve}function initialize(e){function t(n,r){if(!r.match(/nodent\/nodent\.js$/)){if(r.match(/node_modules\/nodent\/.*\.js$/))return stdJSLoader(n,r);for(var o=0;ot[n])return 1}return 0}(u.version,NodentCompiler.prototype.version)<0&&(u.originalNodentLoader=n.exports,n.exports=function(){var t=require.extensions[".js"],n=u.originalNodentLoader.apply(this,arguments);return u.jsCompiler=require.extensions[".js"],require.extensions[".js"]=t,setGlobalEnvironment(e),n},Object.keys(u.originalNodentLoader).forEach(function(e){n.exports[e]=u.originalNodentLoader[e]}),i.push(u),i=i.sort(function(e,t){return t.path.length-e.path.length})))}function n(t){if(Array.isArray(t))return t.forEach(n);if(require.extensions[t]){Object.keys(e).filter(function(t){return compiler[t]!=e[t]}).length&&e.log("File extension "+t+" already configured for async/await compilation.")}require.extensions[t]=compileNodentedFile(compiler,e.log)}if(e){for(var r in e)if("use"!==r&&!config.hasOwnProperty(r))throw new Error("NoDent: unknown option: "+r+"="+JSON.stringify(e[r]))}else e={};compiler?compiler.setOptions(e):(Object.keys(config).forEach(function(t){t in e||(e[t]=config[t])}),compiler=new NodentCompiler(e)),e.dontMapStackTraces||(Error.prepareStackTrace=prepareMappedStackTrace),setGlobalEnvironment(e);var i=[];if(!e.dontInstallRequireHook){if(!stdJSLoader){stdJSLoader=require.extensions[".js"];var s=compileNodentedFile(compiler,e.log);require.extensions[".js"]=t}e.extension&&n(e.extension)}return e.use&&(Array.isArray(e.use)?(e.log("Warning: nodent({use:[...]}) is deprecated. Use nodent.require(module,options)\n"+(new Error).stack.split("\n")[2]),e.use.length&&e.use.forEach(function(e){compiler[e]=compiler.require(e)})):(e.log("Warning: nodent({use:{...}}) is deprecated. Use nodent.require(module,options)\n"+(new Error).stack.split("\n")[2]),Object.keys(e.use).forEach(function(t){compiler[t]=compiler.require(t,e.use[t])}))),compiler}function runFromCLI(){function e(e,n){try{var s,o;if(r.fromast){if(e=JSON.parse(e),s={origCode:"",filename:t,ast:e},!(o=parseCompilerOptions(e,i.log))){var a=r.use?'"use nodent-'+r.use+'";':'"use nodent";';o=parseCompilerOptions(a,i.log),console.warn("/* "+t+": No 'use nodent*' directive, assumed "+a+" */")}}else(o=parseCompilerOptions(r.use?'"use nodent-'+r.use+'";':e,i.log))||(o=parseCompilerOptions('"use nodent";',i.log),r.dest||console.warn("/* "+t+": 'use nodent*' directive missing/ignored, assumed 'use nodent;' */")),s=i.parse(e,t,o);if(r.parseast||r.pretty||i.asynchronize(s,void 0,o,i.log),i.prettyPrint(s,o),r.out||r.pretty||r.dest){if(r.dest&&!n)throw new Error("Can't write unknown file to "+r.dest);var u="";r.runtime&&(u+="Function.prototype.$asyncbind = "+Function.prototype.$asyncbind.toString()+";\n",u+="global.$error = global.$error || "+global.$error.toString()+";\n"),u+=s.code,n&&r.dest?(fs.writeFileSync(r.dest+n,u),console.log("Compiled",r.dest+n)):console.log(u)}(r.minast||r.parseast)&&console.log(JSON.stringify(s.ast,function(e,t){return"$"===e[0]||e.match(/^(start|end|loc)$/)?void 0:t},2,null)),r.ast&&console.log(JSON.stringify(s.ast,function(e,t){return"$"===e[0]?void 0:t},0)),r.exec&&new Function(s.code)()}catch(e){console.error(e)}}var t,n=require("path"),r=(process.env.NODENT_OPTS&&JSON.parse(process.env.NODENT_OPTS),function(e){for(var t=[],n=e||2;n0",engine:"(async ()=>0)",noRuntime:"Promise"};NodentCompiler.prototype.Thenable=Thenable,NodentCompiler.prototype.EagerThenable=$asyncbind.EagerThenableFactory,NodentCompiler.prototype.asyncify=asyncify,NodentCompiler.prototype.require=requireCover,NodentCompiler.prototype.generateRequestHandler=generateRequestHandler,NodentCompiler.prototype.$asyncspawn=$asyncspawn,NodentCompiler.prototype.$asyncbind=$asyncbind,NodentCompiler.prototype.parseCompilerOptions=parseCompilerOptions,$asyncbind.call($asyncbind);var compiler;initialize.setDefaultCompileOptions=function(e,t){return e&&Object.keys(e).forEach(function(t){if(!(t in defaultCodeGenOpts))throw new Error("NoDent: unknown compiler option: "+t);defaultCodeGenOpts[t]=e[t]}),t&&Object.keys(t).forEach(function(e){if(!(e in t))throw new Error("NoDent: unknown configuration option: "+e);config[e]=t[e]}),initialize},initialize.setCompileOptions=function(e,t){return optionSet[e]=optionSet[e]||copyObj([defaultCodeGenOpts]),t&&Object.keys(t).forEach(function(n){if(!(n in defaultCodeGenOpts))throw new Error("NoDent: unknown compiler option: "+n);optionSet[e][n]=t[n]}),initialize},initialize.asyncify=asyncify,initialize.Thenable=$asyncbind.Thenable,initialize.EagerThenable=$asyncbind.EagerThenableFactory,module.exports=initialize,require.main===module&&process.argv.length>=3&&runFromCLI()}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},"/node_modules/nodent")},{"./htmlScriptParser":29,_process:32,fs:7,"nodent-compiler":10,"nodent-runtime":26,path:30,resolve:33}]},{},[]); \ No newline at end of file diff --git a/node_modules/eslint/node_modules/ajv/dist/regenerator.min.js b/node_modules/eslint/node_modules/ajv/dist/regenerator.min.js new file mode 100644 index 0000000..ef3b8be --- /dev/null +++ b/node_modules/eslint/node_modules/ajv/dist/regenerator.min.js @@ -0,0 +1,2 @@ +/* regenerator 0.12.2: Source transformer enabling ECMAScript 6 generator functions (yield) in JavaScript-of-today (ES5) */ +require=function e(t,r,n){function i(a,o){if(!r[a]){if(!t[a]){var u="function"==typeof require&&require;if(!o&&u)return u(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[a]={exports:{}};t[a][0].call(c.exports,function(e){var r=t[a][1][e];return i(r||e)},c,c.exports,e,t,r,n)}return r[a].exports}for(var s="function"==typeof require&&require,a=0;a=0;o--)if(u[o]!==l[o])return!1;for(o=u.length-1;o>=0;o--)if(a=u[o],!h(e[a],t[a],r,n))return!1;return!0}(e,t,r,o))}return r?e===t:e==t}function f(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function d(e,t,r){h(e,t,!0)&&c(e,t,r,"notDeepStrictEqual",d)}function m(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function y(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&c(i,r,"Missing expected exception"+n);var s="string"==typeof n,a=!e&&g.isError(i),o=!e&&i&&!r;if((a&&s&&m(i,r)||o)&&c(i,r,"Got unwanted exception"+n),e&&i&&r&&!m(i,r)||!e&&i)throw i}var g=e("util/"),b=Object.prototype.hasOwnProperty,v=Array.prototype.slice,x="foo"===function(){}.name,E=t.exports=p,A=/\s*function\s+([^\(\s]*)\s*/;E.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return u(l(e.actual),128)+" "+e.operator+" "+u(l(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||c;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=o(t),s=n.indexOf("\n"+i);if(s>=0){var a=n.indexOf("\n",s+1);n=n.substring(a+1)}this.stack=n}}},g.inherits(E.AssertionError,Error),E.fail=c,E.ok=p,E.equal=function(e,t,r){e!=t&&c(e,t,r,"==",E.equal)},E.notEqual=function(e,t,r){e==t&&c(e,t,r,"!=",E.notEqual)},E.deepEqual=function(e,t,r){h(e,t,!1)||c(e,t,r,"deepEqual",E.deepEqual)},E.deepStrictEqual=function(e,t,r){h(e,t,!0)||c(e,t,r,"deepStrictEqual",E.deepStrictEqual)},E.notDeepEqual=function(e,t,r){h(e,t,!1)&&c(e,t,r,"notDeepEqual",E.notDeepEqual)},E.notDeepStrictEqual=d,E.strictEqual=function(e,t,r){e!==t&&c(e,t,r,"===",E.strictEqual)},E.notStrictEqual=function(e,t,r){e===t&&c(e,t,r,"!==",E.notStrictEqual)},E.throws=function(e,t,r){y(!0,e,t,r)},E.doesNotThrow=function(e,t,r){y(!1,e,t,r)},E.ifError=function(e){if(e)throw e};var D=Object.keys||function(e){var t=[];for(var r in e)b.call(e,r)&&t.push(r);return t}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":613}],2:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=t.use(e("../lib/shared")).defaults,i=r.Type.def,s=r.Type.or;i("Noop").bases("Node").build(),i("DoExpression").bases("Expression").build("body").field("body",[i("Statement")]),i("Super").bases("Expression").build(),i("BindExpression").bases("Expression").build("object","callee").field("object",s(i("Expression"),null)).field("callee",i("Expression")),i("Decorator").bases("Node").build("expression").field("expression",i("Expression")),i("Property").field("decorators",s([i("Decorator")],null),n.null),i("MethodDefinition").field("decorators",s([i("Decorator")],null),n.null),i("MetaProperty").bases("Expression").build("meta","property").field("meta",i("Identifier")).field("property",i("Identifier")),i("ParenthesizedExpression").bases("Expression").build("expression").field("expression",i("Expression")),i("ImportSpecifier").bases("ModuleSpecifier").build("imported","local").field("imported",i("Identifier")),i("ImportDefaultSpecifier").bases("ModuleSpecifier").build("local"),i("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("local"),i("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",s(i("Declaration"),i("Expression"))),i("ExportNamedDeclaration").bases("Declaration").build("declaration","specifiers","source").field("declaration",s(i("Declaration"),null)).field("specifiers",[i("ExportSpecifier")],n.emptyArray).field("source",s(i("Literal"),null),n.null),i("ExportSpecifier").bases("ModuleSpecifier").build("local","exported").field("exported",i("Identifier")),i("ExportNamespaceSpecifier").bases("Specifier").build("exported").field("exported",i("Identifier")),i("ExportDefaultSpecifier").bases("Specifier").build("exported").field("exported",i("Identifier")),i("ExportAllDeclaration").bases("Declaration").build("exported","source").field("exported",s(i("Identifier"),null)).field("source",i("Literal")),i("CommentBlock").bases("Comment").build("value","leading","trailing"),i("CommentLine").bases("Comment").build("value","leading","trailing")}},{"../lib/shared":18,"../lib/types":19,"./es7":7}],3:[function(e,t,r){t.exports=function(t){t.use(e("./babel")),t.use(e("./flow"));var r=t.use(e("../lib/types")),n=t.use(e("../lib/shared")).defaults,i=r.Type.def,s=r.Type.or;i("Directive").bases("Node").build("value").field("value",i("DirectiveLiteral")),i("DirectiveLiteral").bases("Node","Expression").build("value").field("value",String,n["use strict"]),i("BlockStatement").bases("Statement").build("body").field("body",[i("Statement")]).field("directives",[i("Directive")],n.emptyArray),i("Program").bases("Node").build("body").field("body",[i("Statement")]).field("directives",[i("Directive")],n.emptyArray),i("StringLiteral").bases("Literal").build("value").field("value",String),i("NumericLiteral").bases("Literal").build("value").field("value",Number),i("NullLiteral").bases("Literal").build(),i("BooleanLiteral").bases("Literal").build("value").field("value",Boolean),i("RegExpLiteral").bases("Literal").build("pattern","flags").field("pattern",String).field("flags",String);var a=s(i("Property"),i("ObjectMethod"),i("ObjectProperty"),i("SpreadProperty"));i("ObjectExpression").bases("Expression").build("properties").field("properties",[a]),i("ObjectMethod").bases("Node","Function").build("kind","key","params","body","computed").field("kind",s("method","get","set")).field("key",s(i("Literal"),i("Identifier"),i("Expression"))).field("params",[i("Pattern")]).field("body",i("BlockStatement")).field("computed",Boolean,n.false).field("generator",Boolean,n.false).field("async",Boolean,n.false).field("decorators",s([i("Decorator")],null),n.null),i("ObjectProperty").bases("Node").build("key","value").field("key",s(i("Literal"),i("Identifier"),i("Expression"))).field("value",s(i("Expression"),i("Pattern"))).field("computed",Boolean,n.false);var o=s(i("MethodDefinition"),i("VariableDeclarator"),i("ClassPropertyDefinition"),i("ClassProperty"),i("ClassMethod"));i("ClassBody").bases("Declaration").build("body").field("body",[o]),i("ClassMethod").bases("Declaration","Function").build("kind","key","params","body","computed","static").field("kind",s("get","set","method","constructor")).field("key",s(i("Literal"),i("Identifier"),i("Expression"))).field("params",[i("Pattern")]).field("body",i("BlockStatement")).field("computed",Boolean,n.false).field("static",Boolean,n.false).field("generator",Boolean,n.false).field("async",Boolean,n.false).field("decorators",s([i("Decorator")],null),n.null);var u=s(i("Property"),i("PropertyPattern"),i("SpreadPropertyPattern"),i("SpreadProperty"),i("ObjectProperty"),i("RestProperty"));i("ObjectPattern").bases("Pattern").build("properties").field("properties",[u]).field("decorators",s([i("Decorator")],null),n.null),i("SpreadProperty").bases("Node").build("argument").field("argument",i("Expression")),i("RestProperty").bases("Node").build("argument").field("argument",i("Expression")),i("ForAwaitStatement").bases("Statement").build("left","right","body").field("left",s(i("VariableDeclaration"),i("Expression"))).field("right",i("Expression")).field("body",i("Statement")),i("Import").bases("Expression").build()}},{"../lib/shared":18,"../lib/types":19,"./babel":2,"./flow":9}],4:[function(e,t,r){t.exports=function(t){var r=t.use(e("../lib/types")).Type,n=r.def,i=r.or,s=t.use(e("../lib/shared")),a=s.defaults,o=s.geq;n("Printable").field("loc",i(n("SourceLocation"),null),a.null,!0),n("Node").bases("Printable").field("type",String).field("comments",i([n("Comment")],null),a.null,!0),n("SourceLocation").build("start","end","source").field("start",n("Position")).field("end",n("Position")).field("source",i(String,null),a.null),n("Position").build("line","column").field("line",o(1)).field("column",o(0)),n("File").bases("Node").build("program","name").field("program",n("Program")).field("name",i(String,null),a.null),n("Program").bases("Node").build("body").field("body",[n("Statement")]),n("Function").bases("Node").field("id",i(n("Identifier"),null),a.null).field("params",[n("Pattern")]).field("body",n("BlockStatement")),n("Statement").bases("Node"),n("EmptyStatement").bases("Statement").build(),n("BlockStatement").bases("Statement").build("body").field("body",[n("Statement")]),n("ExpressionStatement").bases("Statement").build("expression").field("expression",n("Expression")),n("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",n("Expression")).field("consequent",n("Statement")).field("alternate",i(n("Statement"),null),a.null),n("LabeledStatement").bases("Statement").build("label","body").field("label",n("Identifier")).field("body",n("Statement")),n("BreakStatement").bases("Statement").build("label").field("label",i(n("Identifier"),null),a.null),n("ContinueStatement").bases("Statement").build("label").field("label",i(n("Identifier"),null),a.null),n("WithStatement").bases("Statement").build("object","body").field("object",n("Expression")).field("body",n("Statement")),n("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",n("Expression")).field("cases",[n("SwitchCase")]).field("lexical",Boolean,a.false),n("ReturnStatement").bases("Statement").build("argument").field("argument",i(n("Expression"),null)),n("ThrowStatement").bases("Statement").build("argument").field("argument",n("Expression")),n("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",n("BlockStatement")).field("handler",i(n("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[n("CatchClause")],function(){return this.handler?[this.handler]:[]},!0).field("guardedHandlers",[n("CatchClause")],a.emptyArray).field("finalizer",i(n("BlockStatement"),null),a.null),n("CatchClause").bases("Node").build("param","guard","body").field("param",n("Pattern")).field("guard",i(n("Expression"),null),a.null).field("body",n("BlockStatement")),n("WhileStatement").bases("Statement").build("test","body").field("test",n("Expression")).field("body",n("Statement")),n("DoWhileStatement").bases("Statement").build("body","test").field("body",n("Statement")).field("test",n("Expression")),n("ForStatement").bases("Statement").build("init","test","update","body").field("init",i(n("VariableDeclaration"),n("Expression"),null)).field("test",i(n("Expression"),null)).field("update",i(n("Expression"),null)).field("body",n("Statement")),n("ForInStatement").bases("Statement").build("left","right","body").field("left",i(n("VariableDeclaration"),n("Expression"))).field("right",n("Expression")).field("body",n("Statement")),n("DebuggerStatement").bases("Statement").build(),n("Declaration").bases("Statement"),n("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",n("Identifier")),n("FunctionExpression").bases("Function","Expression").build("id","params","body"),n("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",i("var","let","const")).field("declarations",[n("VariableDeclarator")]),n("VariableDeclarator").bases("Node").build("id","init").field("id",n("Pattern")).field("init",i(n("Expression"),null)),n("Expression").bases("Node","Pattern"),n("ThisExpression").bases("Expression").build(),n("ArrayExpression").bases("Expression").build("elements").field("elements",[i(n("Expression"),null)]),n("ObjectExpression").bases("Expression").build("properties").field("properties",[n("Property")]),n("Property").bases("Node").build("kind","key","value").field("kind",i("init","get","set")).field("key",i(n("Literal"),n("Identifier"))).field("value",n("Expression")),n("SequenceExpression").bases("Expression").build("expressions").field("expressions",[n("Expression")]);var u=i("-","+","!","~","typeof","void","delete");n("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",u).field("argument",n("Expression")).field("prefix",Boolean,a.true);var l=i("==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof","..");n("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",l).field("left",n("Expression")).field("right",n("Expression"));var c=i("=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=");n("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",c).field("left",n("Pattern")).field("right",n("Expression"));var p=i("++","--");n("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",p).field("argument",n("Expression")).field("prefix",Boolean);var h=i("||","&&");n("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",h).field("left",n("Expression")).field("right",n("Expression")),n("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",n("Expression")).field("consequent",n("Expression")).field("alternate",n("Expression")),n("NewExpression").bases("Expression").build("callee","arguments").field("callee",n("Expression")).field("arguments",[n("Expression")]),n("CallExpression").bases("Expression").build("callee","arguments").field("callee",n("Expression")).field("arguments",[n("Expression")]),n("MemberExpression").bases("Expression").build("object","property","computed").field("object",n("Expression")).field("property",i(n("Identifier"),n("Expression"))).field("computed",Boolean,function(){var e=this.property.type;return"Literal"===e||"MemberExpression"===e||"BinaryExpression"===e}),n("Pattern").bases("Node"),n("SwitchCase").bases("Node").build("test","consequent").field("test",i(n("Expression"),null)).field("consequent",[n("Statement")]),n("Identifier").bases("Node","Expression","Pattern").build("name").field("name",String),n("Literal").bases("Node","Expression").build("value").field("value",i(String,Boolean,null,Number,RegExp)).field("regex",i({pattern:String,flags:String},null),function(){if(this.value instanceof RegExp){var e="";return this.value.ignoreCase&&(e+="i"),this.value.multiline&&(e+="m"),this.value.global&&(e+="g"),{pattern:this.value.source,flags:e}}return null}),n("Comment").bases("Printable").field("value",String).field("leading",Boolean,a.true).field("trailing",Boolean,a.false)}},{"../lib/shared":18,"../lib/types":19}],5:[function(e,t,r){t.exports=function(t){t.use(e("./core"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or;n("XMLDefaultDeclaration").bases("Declaration").field("namespace",n("Expression")),n("XMLAnyName").bases("Expression"),n("XMLQualifiedIdentifier").bases("Expression").field("left",i(n("Identifier"),n("XMLAnyName"))).field("right",i(n("Identifier"),n("Expression"))).field("computed",Boolean),n("XMLFunctionQualifiedIdentifier").bases("Expression").field("right",i(n("Identifier"),n("Expression"))).field("computed",Boolean),n("XMLAttributeSelector").bases("Expression").field("attribute",n("Expression")),n("XMLFilterExpression").bases("Expression").field("left",n("Expression")).field("right",n("Expression")),n("XMLElement").bases("XML","Expression").field("contents",[n("XML")]),n("XMLList").bases("XML","Expression").field("contents",[n("XML")]),n("XML").bases("Node"),n("XMLEscape").bases("XML").field("expression",n("Expression")),n("XMLText").bases("XML").field("text",String),n("XMLStartTag").bases("XML").field("contents",[n("XML")]),n("XMLEndTag").bases("XML").field("contents",[n("XML")]),n("XMLPointTag").bases("XML").field("contents",[n("XML")]),n("XMLName").bases("XML").field("contents",i(String,[n("XML")])),n("XMLAttribute").bases("XML").field("value",String),n("XMLCdata").bases("XML").field("contents",String),n("XMLComment").bases("XML").field("contents",String),n("XMLProcessingInstruction").bases("XML").field("target",String).field("contents",i(String,null))}},{"../lib/types":19,"./core":4}],6:[function(e,t,r){t.exports=function(t){t.use(e("./core"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")).defaults;n("Function").field("generator",Boolean,s.false).field("expression",Boolean,s.false).field("defaults",[i(n("Expression"),null)],s.emptyArray).field("rest",i(n("Identifier"),null),s.null),n("RestElement").bases("Pattern").build("argument").field("argument",n("Pattern")),n("SpreadElementPattern").bases("Pattern").build("argument").field("argument",n("Pattern")),n("FunctionDeclaration").build("id","params","body","generator","expression"),n("FunctionExpression").build("id","params","body","generator","expression"),n("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,s.null).field("body",i(n("BlockStatement"),n("Expression"))).field("generator",!1,s.false),n("YieldExpression").bases("Expression").build("argument","delegate").field("argument",i(n("Expression"),null)).field("delegate",Boolean,s.false),n("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",n("Expression")).field("blocks",[n("ComprehensionBlock")]).field("filter",i(n("Expression"),null)),n("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",n("Expression")).field("blocks",[n("ComprehensionBlock")]).field("filter",i(n("Expression"),null)),n("ComprehensionBlock").bases("Node").build("left","right","each").field("left",n("Pattern")).field("right",n("Expression")).field("each",Boolean),n("Property").field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("value",i(n("Expression"),n("Pattern"))).field("method",Boolean,s.false).field("shorthand",Boolean,s.false).field("computed",Boolean,s.false),n("PropertyPattern").bases("Pattern").build("key","pattern").field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("pattern",n("Pattern")).field("computed",Boolean,s.false),n("ObjectPattern").bases("Pattern").build("properties").field("properties",[i(n("PropertyPattern"),n("Property"))]),n("ArrayPattern").bases("Pattern").build("elements").field("elements",[i(n("Pattern"),null)]),n("MethodDefinition").bases("Declaration").build("kind","key","value","static").field("kind",i("constructor","method","get","set")).field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("value",n("Function")).field("computed",Boolean,s.false).field("static",Boolean,s.false),n("SpreadElement").bases("Node").build("argument").field("argument",n("Expression")),n("ArrayExpression").field("elements",[i(n("Expression"),n("SpreadElement"),n("RestElement"),null)]),n("NewExpression").field("arguments",[i(n("Expression"),n("SpreadElement"))]),n("CallExpression").field("arguments",[i(n("Expression"),n("SpreadElement"))]),n("AssignmentPattern").bases("Pattern").build("left","right").field("left",n("Pattern")).field("right",n("Expression"));var a=i(n("MethodDefinition"),n("VariableDeclarator"),n("ClassPropertyDefinition"),n("ClassProperty"));n("ClassProperty").bases("Declaration").build("key").field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("computed",Boolean,s.false),n("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",a),n("ClassBody").bases("Declaration").build("body").field("body",[a]),n("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",i(n("Identifier"),null)).field("body",n("ClassBody")).field("superClass",i(n("Expression"),null),s.null),n("ClassExpression").bases("Expression").build("id","body","superClass").field("id",i(n("Identifier"),null),s.null).field("body",n("ClassBody")).field("superClass",i(n("Expression"),null),s.null).field("implements",[n("ClassImplements")],s.emptyArray),n("ClassImplements").bases("Node").build("id").field("id",n("Identifier")).field("superClass",i(n("Expression"),null),s.null),n("Specifier").bases("Node"),n("ModuleSpecifier").bases("Specifier").field("local",i(n("Identifier"),null),s.null).field("id",i(n("Identifier"),null),s.null).field("name",i(n("Identifier"),null),s.null),n("TaggedTemplateExpression").bases("Expression").build("tag","quasi").field("tag",n("Expression")).field("quasi",n("TemplateLiteral")),n("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[n("TemplateElement")]).field("expressions",[n("Expression")]),n("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:String,raw:String}).field("tail",Boolean)}},{"../lib/shared":18,"../lib/types":19,"./core":4}],7:[function(e,t,r){t.exports=function(t){t.use(e("./es6"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=(r.builtInTypes,t.use(e("../lib/shared")).defaults);n("Function").field("async",Boolean,s.false),n("SpreadProperty").bases("Node").build("argument").field("argument",n("Expression")),n("ObjectExpression").field("properties",[i(n("Property"),n("SpreadProperty"))]),n("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",n("Pattern")),n("ObjectPattern").field("properties",[i(n("Property"),n("PropertyPattern"),n("SpreadPropertyPattern"))]),n("AwaitExpression").bases("Expression").build("argument","all").field("argument",i(n("Expression"),null)).field("all",Boolean,s.false)}},{"../lib/shared":18,"../lib/types":19,"./es6":6}],8:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=t.use(e("../lib/shared")).defaults,i=r.Type.def,s=r.Type.or;i("VariableDeclaration").field("declarations",[s(i("VariableDeclarator"),i("Identifier"))]),i("Property").field("value",s(i("Expression"),i("Pattern"))),i("ArrayPattern").field("elements",[s(i("Pattern"),i("SpreadElement"),null)]),i("ObjectPattern").field("properties",[s(i("Property"),i("PropertyPattern"),i("SpreadPropertyPattern"),i("SpreadProperty"))]),i("ExportSpecifier").bases("ModuleSpecifier").build("id","name"),i("ExportBatchSpecifier").bases("Specifier").build(),i("ImportSpecifier").bases("ModuleSpecifier").build("id","name"),i("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("id"),i("ImportDefaultSpecifier").bases("ModuleSpecifier").build("id"),i("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",s(i("Declaration"),i("Expression"),null)).field("specifiers",[s(i("ExportSpecifier"),i("ExportBatchSpecifier"))],n.emptyArray).field("source",s(i("Literal"),null),n.null),i("ImportDeclaration").bases("Declaration").build("specifiers","source","importKind").field("specifiers",[s(i("ImportSpecifier"),i("ImportNamespaceSpecifier"),i("ImportDefaultSpecifier"))],n.emptyArray).field("source",i("Literal")).field("importKind",s("value","type"),function(){return"value"}),i("Block").bases("Comment").build("value","leading","trailing"),i("Line").bases("Comment").build("value","leading","trailing")}},{"../lib/shared":18,"../lib/types":19,"./es7":7}],9:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")).defaults;n("Type").bases("Node"),n("AnyTypeAnnotation").bases("Type").build(),n("EmptyTypeAnnotation").bases("Type").build(),n("MixedTypeAnnotation").bases("Type").build(),n("VoidTypeAnnotation").bases("Type").build(),n("NumberTypeAnnotation").bases("Type").build(),n("NumberLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",Number).field("raw",String),n("NumericLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",Number).field("raw",String),n("StringTypeAnnotation").bases("Type").build(),n("StringLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",String).field("raw",String),n("BooleanTypeAnnotation").bases("Type").build(),n("BooleanLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",Boolean).field("raw",String),n("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",n("Type")),n("NullableTypeAnnotation").bases("Type").build("typeAnnotation").field("typeAnnotation",n("Type")),n("NullLiteralTypeAnnotation").bases("Type").build(),n("NullTypeAnnotation").bases("Type").build(),n("ThisTypeAnnotation").bases("Type").build(),n("ExistsTypeAnnotation").bases("Type").build(),n("ExistentialTypeParam").bases("Type").build(),n("FunctionTypeAnnotation").bases("Type").build("params","returnType","rest","typeParameters").field("params",[n("FunctionTypeParam")]).field("returnType",n("Type")).field("rest",i(n("FunctionTypeParam"),null)).field("typeParameters",i(n("TypeParameterDeclaration"),null)),n("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",n("Identifier")).field("typeAnnotation",n("Type")).field("optional",Boolean),n("ArrayTypeAnnotation").bases("Type").build("elementType").field("elementType",n("Type")),n("ObjectTypeAnnotation").bases("Type").build("properties","indexers","callProperties").field("properties",[n("ObjectTypeProperty")]).field("indexers",[n("ObjectTypeIndexer")],s.emptyArray).field("callProperties",[n("ObjectTypeCallProperty")],s.emptyArray).field("exact",Boolean,s.false),n("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",i(n("Literal"),n("Identifier"))).field("value",n("Type")).field("optional",Boolean).field("variance",i("plus","minus",null),s.null),n("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",n("Identifier")).field("key",n("Type")).field("value",n("Type")).field("variance",i("plus","minus",null),s.null),n("ObjectTypeCallProperty").bases("Node").build("value").field("value",n("FunctionTypeAnnotation")).field("static",Boolean,s.false),n("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",i(n("Identifier"),n("QualifiedTypeIdentifier"))).field("id",n("Identifier")),n("GenericTypeAnnotation").bases("Type").build("id","typeParameters").field("id",i(n("Identifier"),n("QualifiedTypeIdentifier"))).field("typeParameters",i(n("TypeParameterInstantiation"),null)),n("MemberTypeAnnotation").bases("Type").build("object","property").field("object",n("Identifier")).field("property",i(n("MemberTypeAnnotation"),n("GenericTypeAnnotation"))),n("UnionTypeAnnotation").bases("Type").build("types").field("types",[n("Type")]),n("IntersectionTypeAnnotation").bases("Type").build("types").field("types",[n("Type")]),n("TypeofTypeAnnotation").bases("Type").build("argument").field("argument",n("Type")),n("Identifier").field("typeAnnotation",i(n("TypeAnnotation"),null),s.null),n("TypeParameterDeclaration").bases("Node").build("params").field("params",[n("TypeParameter")]),n("TypeParameterInstantiation").bases("Node").build("params").field("params",[n("Type")]),n("TypeParameter").bases("Type").build("name","variance","bound").field("name",String).field("variance",i("plus","minus",null),s.null).field("bound",i(n("TypeAnnotation"),null),s.null),n("Function").field("returnType",i(n("TypeAnnotation"),null),s.null).field("typeParameters",i(n("TypeParameterDeclaration"),null),s.null),n("ClassProperty").build("key","value","typeAnnotation","static").field("value",i(n("Expression"),null)).field("typeAnnotation",i(n("TypeAnnotation"),null)).field("static",Boolean,s.false).field("variance",i("plus","minus",null),s.null),n("ClassImplements").field("typeParameters",i(n("TypeParameterInstantiation"),null),s.null),n("InterfaceDeclaration").bases("Declaration").build("id","body","extends").field("id",n("Identifier")).field("typeParameters",i(n("TypeParameterDeclaration"),null),s.null).field("body",n("ObjectTypeAnnotation")).field("extends",[n("InterfaceExtends")]),n("DeclareInterface").bases("InterfaceDeclaration").build("id","body","extends"),n("InterfaceExtends").bases("Node").build("id").field("id",n("Identifier")).field("typeParameters",i(n("TypeParameterInstantiation"),null)),n("TypeAlias").bases("Declaration").build("id","typeParameters","right").field("id",n("Identifier")).field("typeParameters",i(n("TypeParameterDeclaration"),null)).field("right",n("Type")),n("DeclareTypeAlias").bases("TypeAlias").build("id","typeParameters","right"),n("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",n("Expression")).field("typeAnnotation",n("TypeAnnotation")),n("TupleTypeAnnotation").bases("Type").build("types").field("types",[n("Type")]),n("DeclareVariable").bases("Statement").build("id").field("id",n("Identifier")),n("DeclareFunction").bases("Statement").build("id").field("id",n("Identifier")),n("DeclareClass").bases("InterfaceDeclaration").build("id"),n("DeclareModule").bases("Statement").build("id","body").field("id",i(n("Identifier"),n("Literal"))).field("body",n("BlockStatement")),n("DeclareModuleExports").bases("Statement").build("typeAnnotation").field("typeAnnotation",n("Type")),n("DeclareExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",i(n("DeclareVariable"),n("DeclareFunction"),n("DeclareClass"),n("Type"),null)).field("specifiers",[i(n("ExportSpecifier"),n("ExportBatchSpecifier"))],s.emptyArray).field("source",i(n("Literal"),null),s.null),n("DeclareExportAllDeclaration").bases("Declaration").build("source").field("source",i(n("Literal"),null),s.null)}},{"../lib/shared":18,"../lib/types":19,"./es7":7}],10:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")).defaults;n("JSXAttribute").bases("Node").build("name","value").field("name",i(n("JSXIdentifier"),n("JSXNamespacedName"))).field("value",i(n("Literal"),n("JSXExpressionContainer"),null),s.null),n("JSXIdentifier").bases("Identifier").build("name").field("name",String),n("JSXNamespacedName").bases("Node").build("namespace","name").field("namespace",n("JSXIdentifier")).field("name",n("JSXIdentifier")),n("JSXMemberExpression").bases("MemberExpression").build("object","property").field("object",i(n("JSXIdentifier"),n("JSXMemberExpression"))).field("property",n("JSXIdentifier")).field("computed",Boolean,s.false);var a=i(n("JSXIdentifier"),n("JSXNamespacedName"),n("JSXMemberExpression"));n("JSXSpreadAttribute").bases("Node").build("argument").field("argument",n("Expression"));var o=[i(n("JSXAttribute"),n("JSXSpreadAttribute"))];n("JSXExpressionContainer").bases("Expression").build("expression").field("expression",n("Expression")),n("JSXElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",n("JSXOpeningElement")).field("closingElement",i(n("JSXClosingElement"),null),s.null).field("children",[i(n("JSXElement"),n("JSXExpressionContainer"),n("JSXText"),n("Literal"))],s.emptyArray).field("name",a,function(){return this.openingElement.name},!0).field("selfClosing",Boolean,function(){return this.openingElement.selfClosing},!0).field("attributes",o,function(){return this.openingElement.attributes},!0),n("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",a).field("attributes",o,s.emptyArray).field("selfClosing",Boolean,s.false),n("JSXClosingElement").bases("Node").build("name").field("name",a),n("JSXText").bases("Literal").build("value").field("value",String),n("JSXEmptyExpression").bases("Expression").build()}},{"../lib/shared":18,"../lib/types":19,"./es7":7}],11:[function(e,t,r){t.exports=function(t){t.use(e("./core"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")),a=s.geq,o=s.defaults;n("Function").field("body",i(n("BlockStatement"),n("Expression"))),n("ForInStatement").build("left","right","body","each").field("each",Boolean,o.false),n("ForOfStatement").bases("Statement").build("left","right","body").field("left",i(n("VariableDeclaration"),n("Expression"))).field("right",n("Expression")).field("body",n("Statement")),n("LetStatement").bases("Statement").build("head","body").field("head",[n("VariableDeclarator")]).field("body",n("Statement")),n("LetExpression").bases("Expression").build("head","body").field("head",[n("VariableDeclarator")]).field("body",n("Expression")),n("GraphExpression").bases("Expression").build("index","expression").field("index",a(0)).field("expression",n("Literal")),n("GraphIndexExpression").bases("Expression").build("index").field("index",a(0))}},{"../lib/shared":18,"../lib/types":19,"./core":4}],12:[function(e,t,r){t.exports=function(t){function r(e){var t=n.indexOf(e);return-1===t&&(t=n.length,n.push(e),i[t]=e(s)),i[t]}var n=[],i=[],s={};s.use=r;var a=r(e("./lib/types"));t.forEach(r),a.finalize();var o={Type:a.Type,builtInTypes:a.builtInTypes,namedTypes:a.namedTypes,builders:a.builders,defineMethod:a.defineMethod,getFieldNames:a.getFieldNames,getFieldValue:a.getFieldValue,eachField:a.eachField,someField:a.someField,getSupertypeNames:a.getSupertypeNames,astNodesAreEquivalent:r(e("./lib/equiv")),finalize:a.finalize,Path:r(e("./lib/path")),NodePath:r(e("./lib/node-path")),PathVisitor:r(e("./lib/path-visitor")),use:r};return o.visit=o.PathVisitor.visit,o}},{"./lib/equiv":13,"./lib/node-path":14,"./lib/path":16,"./lib/path-visitor":15,"./lib/types":19}],13:[function(e,t,r){t.exports=function(t){function r(e,t,r){return u.check(r)?r.length=0:r=null,i(e,t,r)}function n(e){return/[_$a-z][_$a-z0-9]*/i.test(e)?"."+e:"["+JSON.stringify(e)+"]"}function i(e,t,r){return e===t||(u.check(e)?function(e,t,r){u.assert(e);var n=e.length;if(!u.check(t)||t.length!==n)return r&&r.push("length"),!1;for(var s=0;su)return!0;if(s===u&&"right"===this.name){if(r.right!==t)throw new Error("Nodes must be equal");return!0}default:return!1}case"SequenceExpression":switch(r.type){case"ForStatement":return!1;case"ExpressionStatement":return"expression"!==this.name;default:return!0}case"YieldExpression":switch(r.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return!0;default:return!1}case"Literal":return"MemberExpression"===r.type&&l.check(t.value)&&"object"===this.name&&r.object===t;case"AssignmentExpression":case"ConditionalExpression":switch(r.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return"callee"===this.name&&r.callee===t;case"ConditionalExpression":return"test"===this.name&&r.test===t;case"MemberExpression":return"object"===this.name&&r.object===t;default:return!1}default:if("NewExpression"===r.type&&"callee"===this.name&&r.callee===t)return i(t)}return!(!0===e||this.canBeFirstInStatement()||!this.firstInStatement())};var d={};return[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(e,t){e.forEach(function(e){d[e]=t})}),f.canBeFirstInStatement=function(){var e=this.node;return!o.FunctionExpression.check(e)&&!o.ObjectExpression.check(e)},f.firstInStatement=function(){return function(e){for(var t,r;e.parent;e=e.parent){if(t=e.node,r=e.parent.node,o.BlockStatement.check(r)&&"body"===e.parent.name&&0===e.name){if(r.body[0]!==t)throw new Error("Nodes must be equal");return!0}if(o.ExpressionStatement.check(r)&&"expression"===e.name){if(r.expression!==t)throw new Error("Nodes must be equal");return!0}if(o.SequenceExpression.check(r)&&"expressions"===e.parent.name&&0===e.name){if(r.expressions[0]!==t)throw new Error("Nodes must be equal")}else if(o.CallExpression.check(r)&&"callee"===e.name){if(r.callee!==t)throw new Error("Nodes must be equal")}else if(o.MemberExpression.check(r)&&"object"===e.name){if(r.object!==t)throw new Error("Nodes must be equal")}else if(o.ConditionalExpression.check(r)&&"test"===e.name){if(r.test!==t)throw new Error("Nodes must be equal")}else if(n(r)&&"left"===e.name){if(r.left!==t)throw new Error("Nodes must be equal")}else{if(!o.UnaryExpression.check(r)||r.prefix||"argument"!==e.name)return!1;if(r.argument!==t)throw new Error("Nodes must be equal")}}return!0}(this)},r}},{"./path":16,"./scope":17,"./types":19}],15:[function(e,t,r){var n=Object.prototype.hasOwnProperty;t.exports=function(t){function r(){if(!(this instanceof r))throw new Error("PathVisitor constructor cannot be invoked without 'new'");this._reusableContextStack=[],this._methodNameTable=function(e){var t=Object.create(null);for(var r in e)/^visit[A-Z]/.test(r)&&(t[r.slice("visit".length)]=!0);for(var n=a.computeSupertypeLookupTable(t),i=Object.create(null),s=(t=Object.keys(n)).length,o=0;o=0&&(s[e.name=a]=e)}else i[e.name]=e.value,s[e.name]=e;if(i[e.name]!==e.value)throw new Error("");if(e.parentPath.get(e.name)!==e)throw new Error("")}(this),l.check(i)){for(var u=i.length,c=o(this.parentPath,a-1,this.name+1),p=[this.name,1],h=0;h=e},a+" >= "+e)},r.defaults={null:function(){return null},emptyArray:function(){return[]},false:function(){return!1},true:function(){return!0},undefined:function(){}};var o=i.or(s.string,s.number,s.boolean,s.null,s.undefined);return r.isPrimitive=new i(function(e){if(null===e)return!0;var t=typeof e;return!("object"===t||"function"===t)},o.toString()),r}},{"../lib/types":19}],19:[function(e,t,r){var n=Array.prototype,i=n.slice,s=(n.map,n.forEach,Object.prototype),a=s.toString,o=a.call(function(){}),u=a.call(""),l=s.hasOwnProperty;t.exports=function(){function e(t,r){var n=this;if(!(n instanceof e))throw new Error("Type constructor cannot be invoked without 'new'");if(a.call(t)!==o)throw new Error(t+" is not a function");var i=a.call(r);if(i!==o&&i!==u)throw new Error(r+" is neither a function nor a string");Object.defineProperties(n,{name:{value:r},check:{value:function(e,r){var i=t.call(n,e,r);return!i&&r&&a.call(r)===o&&r(n,e),i}}})}function t(e){return S.check(e)?"{"+Object.keys(e).map(function(t){return t+": "+e[t]}).join(", ")+"}":D.check(e)?"["+e.map(t).join(", ")+"]":JSON.stringify(e)}function r(t,r){var n=a.call(t),i=new e(function(e){return a.call(e)===n},r);return x[r]=i,t&&"function"==typeof t.constructor&&(b.push(t.constructor),v.push(i)),i}function n(t,r){if(t instanceof e)return t;if(t instanceof c)return t.type;if(D.check(t))return e.fromArray(t);if(S.check(t))return e.fromObject(t);if(A.check(t)){var n=b.indexOf(t);return n>=0?v[n]:new e(t,r)}return new e(function(e){return e===t},_.check(r)?function(){return t+""}:r)}function s(e,t,r,i){if(!(this instanceof s))throw new Error("Field constructor cannot be invoked without 'new'");E.assert(e);var a={name:{value:e},type:{value:t=n(t)},hidden:{value:!!i}};A.check(r)&&(a.defaultFn={value:r}),Object.defineProperties(this,a)}function c(t){var r=this;if(!(r instanceof c))throw new Error("Def constructor cannot be invoked without 'new'");Object.defineProperties(r,{typeName:{value:t},baseNames:{value:[]},ownFields:{value:Object.create(null)},allSupertypes:{value:Object.create(null)},supertypeList:{value:[]},allFields:{value:Object.create(null)},fieldNames:{value:[]},type:{value:new e(function(e,t){return r.check(e,t)},t)}})}function p(e){return e.replace(/^[A-Z]+/,function(e){var t=e.length;switch(t){case 0:return"";case 1:return e.toLowerCase();default:return e.slice(0,t-1).toLowerCase()+e.charAt(t-1)}})}function h(e){return(e=p(e)).replace(/(Expression)?$/,"Statement")}function f(e){var t=c.fromValue(e);if(t)return t.fieldNames.slice(0);if("type"in e)throw new Error("did not recognize object of type "+JSON.stringify(e.type));return Object.keys(e)}function d(e,t){var r=c.fromValue(e);if(r){var n=r.allFields[t];if(n)return n.getValue(e)}return e&&e[t]}function m(e,t){return Object.keys(t).forEach(function(r){e[r]=t[r]}),e}var y={},g=e.prototype;y.Type=e,g.assert=function(e,r){if(!this.check(e,r)){var n=t(e);throw new Error(n+" does not match type "+this)}return!0},g.toString=function(){var e=this.name;return E.check(e)?e:A.check(e)?e.call(this)+"":e+" type"};var b=[],v=[],x={};y.builtInTypes=x;var E=r("truthy","string"),A=r(function(){},"function"),D=r([],"array"),S=r({},"object"),C=(r(/./,"RegExp"),r(new Date,"Date"),r(3,"number")),_=(r(!0,"boolean"),r(null,"null"),r(void 0,"undefined"));e.or=function(){for(var t=[],r=arguments.length,i=0;i=0&&function(e){var t=h(e);if(!T[t]){var r=T[p(e)];r&&(T[t]=function(){return T.expressionStatement(r.apply(T,arguments))})}}(e.typeName)}},y.finalize=function(){Object.keys(k).forEach(function(e){k[e].finalize()})},y}},{}],20:[function(e,t,r){t.exports=e("./fork")([e("./def/core"),e("./def/es6"),e("./def/es7"),e("./def/mozilla"),e("./def/e4x"),e("./def/jsx"),e("./def/flow"),e("./def/esprima"),e("./def/babel"),e("./def/babel6")])},{"./def/babel":2,"./def/babel6":3,"./def/core":4,"./def/e4x":5,"./def/es6":6,"./def/es7":7,"./def/esprima":8,"./def/flow":9,"./def/jsx":10,"./def/mozilla":11,"./fork":12}],21:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return t.replace(a.default,function(){for(var t=arguments.length,r=Array(t),n=0;n3&&void 0!==arguments[3]?arguments[3]:{};r=Math.max(r,0);var s=n.highlightCode&&u.default.supportsColor||n.forceColor,a=u.default;n.forceColor&&(a=new u.default.constructor({enabled:!0}));var o=function(e,t){return s?e(t):t},c=function(e){return{keyword:e.cyan,capitalized:e.yellow,jsx_tag:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.grey,invalid:e.white.bgRed.bold,gutter:e.grey,marker:e.red.bold}}(a);s&&(e=i(c,e));var p=n.linesAbove||2,h=n.linesBelow||3,f=e.split(l),d=Math.max(t-(p+1),0),m=Math.min(f.length,t+h);t||r||(d=0,m=f.length);var y=String(m).length,g=f.slice(d,m).map(function(e,n){var i=d+1+n,s=" "+(" "+i).slice(-y)+" | ";if(i===t){var a="";if(r){var u=e.slice(0,r-1).replace(/[^\t]/g," ");a=["\n ",o(c.gutter,s.replace(/\d/g," ")),u,o(c.marker,"^")].join("")}return[o(c.marker,">"),o(c.gutter,s),e,a].join("")}return" "+o(c.gutter,s)+e}).join("\n");return s?a.reset(g):g};var s=e("js-tokens"),a=n(s),o=n(e("esutils")),u=n(e("chalk")),l=/\r\n|[\n\r\u2028\u2029]/,c=/^[a-z][\w-]*$/i,p=/^[()\[\]{}]$/;t.exports=r.default},{chalk:24,esutils:28,"js-tokens":322}],22:[function(e,t,r){"use strict";t.exports=function(){return/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g}},{}],23:[function(e,t,r){"use strict";Object.defineProperty(t,"exports",{enumerable:!0,get:function(){var e={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};return e.colors.grey=e.colors.gray,Object.keys(e).forEach(function(t){var r=e[t];Object.keys(r).forEach(function(t){var n=r[t];e[t]=r[t]={open:"["+n[0]+"m",close:"["+n[1]+"m"}}),Object.defineProperty(e,t,{value:r,enumerable:!1})}),e}})},{}],24:[function(e,t,r){(function(r){"use strict";function n(e){this.enabled=e&&void 0!==e.enabled?e.enabled:l}function i(e){var t=function(){return function(){var e=arguments,t=e.length,r=0!==t&&String(arguments[0]);if(t>1)for(var n=1;n=97&&o<=122||o>=65&&o<=90||36===o||95===o;for(a=new Array(128),o=0;o<128;++o)a[o]=o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||36===o||95===o;t.exports={isDecimalDigit:function(e){return 48<=e&&e<=57},isHexDigit:function(e){return 48<=e&&e<=57||97<=e&&e<=102||65<=e&&e<=70},isOctalDigit:function(e){return e>=48&&e<=55},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&i.indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStartES5:function(t){return t<128?s[t]:n.NonAsciiIdentifierStart.test(e(t))},isIdentifierPartES5:function(t){return t<128?a[t]:n.NonAsciiIdentifierPart.test(e(t))},isIdentifierStartES6:function(t){return t<128?s[t]:r.NonAsciiIdentifierStart.test(e(t))},isIdentifierPartES6:function(t){return t<128?a[t]:r.NonAsciiIdentifierPart.test(e(t))}}}()},{}],27:[function(e,t,r){!function(){"use strict";function r(e,t){return!(!t&&"yield"===e)&&n(e,t)}function n(e,t){if(t&&function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function i(e,t){return"null"===e||"true"===e||"false"===e||r(e,t)}function s(e,t){return"null"===e||"true"===e||"false"===e||n(e,t)}function a(e){var t,r,n;if(0===e.length)return!1;if(n=e.charCodeAt(0),!l.isIdentifierStartES5(n))return!1;for(t=1,r=e.length;t=r)return!1;if(!(56320<=(i=e.charCodeAt(t))&&i<=57343))return!1;n=o(n,i)}if(!s(n))return!1;s=l.isIdentifierPartES6}return!0}var l=e("./code");t.exports={isKeywordES5:r,isKeywordES6:n,isReservedWordES5:i,isReservedWordES6:s,isRestrictedWord:function(e){return"eval"===e||"arguments"===e},isIdentifierNameES5:a,isIdentifierNameES6:u,isIdentifierES5:function(e,t){return a(e)&&!i(e,t)},isIdentifierES6:function(e,t){return u(e)&&!s(e,t)}}}()},{"./code":26}],28:[function(e,t,r){!function(){"use strict";r.ast=e("./ast"),r.code=e("./code"),r.keyword=e("./keyword")}()},{"./ast":25,"./code":26,"./keyword":27}],29:[function(e,t,r){"use strict";var n=e("ansi-regex")();t.exports=function(e){return"string"==typeof e?e.replace(n,""):e}},{"ansi-regex":22}],30:[function(e,t,r){(function(e){"use strict";var r=e.argv,n=r.indexOf("--"),i=function(e){e="--"+e;var t=r.indexOf(e);return-1!==t&&(-1===n||t1&&void 0!==arguments[1]?arguments[1]:{};return t.filename=e,x(h.default.readFileSync(e,"utf8"),t)};var h=i(e("fs")),f=n(e("../util")),d=n(e("babel-messages")),m=n(e("babel-types")),y=i(e("babel-traverse")),g=i(e("../transformation/file/options/option-manager")),b=i(e("../transformation/pipeline"));r.util=f,r.messages=d,r.types=m,r.traverse=y.default,r.OptionManager=g.default,r.Pipeline=b.default;var v=new b.default,x=(r.analyse=v.analyse.bind(v),r.transform=v.transform.bind(v));r.transformFromAst=v.transformFromAst.bind(v)},{"../../package":73,"../helpers/resolve-plugin":38,"../helpers/resolve-preset":39,"../tools/build-external-helpers":42,"../transformation/file":43,"../transformation/file/options/config":47,"../transformation/file/options/option-manager":49,"../transformation/pipeline":54,"../util":57,"babel-messages":110,"babel-template":139,"babel-traverse":143,"babel-types":180,fs:193}],33:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){return["babel-plugin-"+e,e]},t.exports=r.default},{}],34:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){var t=["babel-preset-"+e,e],r=e.match(/^(@[^/]+)\/(.+)$/);if(r){var n=r[1],i=r[2];t.push(n+"/babel-preset-"+i)}return t},t.exports=r.default},{}],35:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/get-iterator"));r.default=function(e,t){if(e&&t)return(0,s.default)(e,t,function(e,t){if(t&&Array.isArray(e)){var r=t.slice(0),n=e,s=Array.isArray(n),a=0;for(n=s?n:(0,i.default)(n);;){var o;if(s){if(a>=n.length)break;o=n[a++]}else{if((a=n.next()).done)break;o=a.value}var u=o;r.indexOf(u)<0&&r.push(u)}return r}})};var s=n(e("lodash/mergeWith"));t.exports=r.default},{"babel-runtime/core-js/get-iterator":120,"lodash/mergeWith":527}],36:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t,r){if(e){if("Program"===e.type)return n.file(e,t||[],r||[]);if("File"===e.type)return e}throw new Error("Not a valid ast?")};var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));t.exports=r.default},{"babel-types":180}],37:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t){return e.reduce(function(e,r){return e||(0,n.default)(r,t)},null)};var n=function(e){return e&&e.__esModule?e:{default:e}}(e("./resolve"));t.exports=r.default},{"./resolve":40}],38:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0,r.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.cwd();return(0,s.default)((0,a.default)(e),t)};var s=i(e("./resolve-from-possible-names")),a=i(e("./get-possible-plugin-names"));t.exports=r.default}).call(this,e("_process"))},{"./get-possible-plugin-names":33,"./resolve-from-possible-names":37,_process:550}],39:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0,r.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.cwd();return(0,s.default)((0,a.default)(e),t)};var s=i(e("./resolve-from-possible-names")),a=i(e("./get-possible-preset-names"));t.exports=r.default}).call(this,e("_process"))},{"./get-possible-preset-names":34,"./resolve-from-possible-names":37,_process:550}],40:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var s=i(e("babel-runtime/helpers/typeof"));r.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.cwd();if("object"===(void 0===a.default?"undefined":(0,s.default)(a.default)))return null;var r=u[t];if(!r){r=new a.default;var i=o.default.join(t,".babelrc");r.id=i,r.filename=i,r.paths=a.default._nodeModulePaths(t),u[t]=r}try{return a.default._resolveFilename(e,r)}catch(e){return null}};var a=i(e("module")),o=i(e("path")),u={};t.exports=r.default}).call(this,e("_process"))},{_process:550,"babel-runtime/helpers/typeof":138,module:193,path:546}],41:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/map")),s=n(e("babel-runtime/helpers/classCallCheck")),a=n(e("babel-runtime/helpers/possibleConstructorReturn")),o=n(e("babel-runtime/helpers/inherits")),u=function(e){function t(){(0,s.default)(this,t);var r=(0,a.default)(this,e.call(this));return r.dynamicData={},r}return(0,o.default)(t,e),t.prototype.setDynamic=function(e,t){this.dynamicData[e]=t},t.prototype.get=function(t){if(this.has(t))return e.prototype.get.call(this,t);if(Object.prototype.hasOwnProperty.call(this.dynamicData,t)){var r=this.dynamicData[t]();return this.set(t,r),r}},t}(i.default);r.default=u,t.exports=r.default},{"babel-runtime/core-js/map":122,"babel-runtime/helpers/classCallCheck":134,"babel-runtime/helpers/inherits":135,"babel-runtime/helpers/possibleConstructorReturn":137}],42:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function s(e,t){var r=[],n=h.functionExpression(null,[h.identifier("global")],h.blockStatement(r)),i=h.program([h.expressionStatement(h.callExpression(n,[u.get("selfGlobal")]))]);return r.push(h.variableDeclaration("var",[h.variableDeclarator(e,h.assignmentExpression("=",h.memberExpression(h.identifier("global"),e),h.objectExpression([])))])),t(r),i}function a(e,t){var r=[];return r.push(h.variableDeclaration("var",[h.variableDeclarator(e,h.identifier("global"))])),t(r),h.program([f({FACTORY_PARAMETERS:h.identifier("global"),BROWSER_ARGUMENTS:h.assignmentExpression("=",h.memberExpression(h.identifier("root"),e),h.objectExpression([])),COMMON_ARGUMENTS:h.identifier("exports"),AMD_ARGUMENTS:h.arrayExpression([h.stringLiteral("exports")]),FACTORY_BODY:r,UMD_ROOT:h.identifier("this")})])}function o(e,t){var r=[];return r.push(h.variableDeclaration("var",[h.variableDeclarator(e,h.objectExpression([]))])),t(r),r.push(h.expressionStatement(e)),h.program(r)}r.__esModule=!0,r.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"global",r=h.identifier("babelHelpers"),n=void 0,i={global:s,umd:a,var:o}[t];if(!i)throw new Error(c.get("unsupportedOutputType",t));return n=i(r,function(t){return function(e,t,r){u.list.forEach(function(n){if(!(r&&r.indexOf(n)<0)){var i=h.identifier(n);e.push(h.expressionStatement(h.assignmentExpression("=",h.memberExpression(t,i),u.get(n))))}})}(t,r,e)}),(0,l.default)(n).code};var u=i(e("babel-helpers")),l=n(e("babel-generator")),c=i(e("babel-messages")),p=n(e("babel-template")),h=i(e("babel-types")),f=(0,p.default)('\n (function (root, factory) {\n if (typeof define === "function" && define.amd) {\n define(AMD_ARGUMENTS, factory);\n } else if (typeof exports === "object") {\n factory(COMMON_ARGUMENTS);\n } else {\n factory(BROWSER_ARGUMENTS);\n }\n })(UMD_ROOT, function (FACTORY_PARAMETERS) {\n FACTORY_BODY\n });\n');t.exports=r.default},{"babel-generator":85,"babel-helpers":109,"babel-messages":110,"babel-template":139,"babel-types":180}],43:[function(e,t,r){(function(t){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0,r.File=void 0;var s=i(e("babel-runtime/core-js/get-iterator")),a=i(e("babel-runtime/core-js/object/create")),o=i(e("babel-runtime/core-js/object/assign")),u=i(e("babel-runtime/helpers/classCallCheck")),l=i(e("babel-runtime/helpers/possibleConstructorReturn")),c=i(e("babel-runtime/helpers/inherits")),p=i(e("babel-helpers")),h=n(e("./metadata")),f=i(e("convert-source-map")),d=i(e("./options/option-manager")),m=i(e("../plugin-pass")),y=e("babel-traverse"),g=i(y),b=i(e("source-map")),v=i(e("babel-generator")),x=i(e("babel-code-frame")),E=i(e("lodash/defaults")),A=i(e("./logger")),D=i(e("../../store")),S=e("babylon"),C=n(e("../../util")),_=i(e("path")),w=n(e("babel-types")),k=i(e("../../helpers/resolve")),F=i(e("../internal-plugins/block-hoist")),T=i(e("../internal-plugins/shadow-functions")),P=/^#!.*/,B=[[F.default],[T.default]],O={enter:function(e,t){var r=e.node.loc;r&&(t.loc=r,e.stop())}},N=function(r){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];(0,u.default)(this,n);var i=(0,l.default)(this,r.call(this));return i.pipeline=t,i.log=new A.default(i,e.filename||"unknown"),i.opts=i.initOptions(e),i.parserOpts={sourceType:i.opts.sourceType,sourceFileName:i.opts.filename,plugins:[]},i.pluginVisitors=[],i.pluginPasses=[],i.buildPluginsForOptions(i.opts),i.opts.passPerPreset&&(i.perPresetOpts=[],i.opts.presets.forEach(function(e){var t=(0,o.default)((0,a.default)(i.opts),e);i.perPresetOpts.push(t),i.buildPluginsForOptions(t)})),i.metadata={usedHelpers:[],marked:[],modules:{imports:[],exports:{exported:[],specifiers:[]}}},i.dynamicImportTypes={},i.dynamicImportIds={},i.dynamicImports=[],i.declarations={},i.usedHelpers={},i.path=null,i.ast={},i.code="",i.shebang="",i.hub=new y.Hub(i),i}return(0,c.default)(n,r),n.prototype.getMetadata=function(){var e=!1,t=this.ast.program.body,r=Array.isArray(t),n=0;for(t=r?t:(0,s.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var a=i;if(w.isModuleDeclaration(a)){e=!0;break}}e&&this.path.traverse(h,this)},n.prototype.initOptions=function(e){(e=new d.default(this.log,this.pipeline).init(e)).inputSourceMap&&(e.sourceMaps=!0),e.moduleId&&(e.moduleIds=!0),e.basename=_.default.basename(e.filename,_.default.extname(e.filename)),e.ignore=C.arrayify(e.ignore,C.regexify),e.only&&(e.only=C.arrayify(e.only,C.regexify)),(0,E.default)(e,{moduleRoot:e.sourceRoot}),(0,E.default)(e,{sourceRoot:e.moduleRoot}),(0,E.default)(e,{filenameRelative:e.filename});var t=_.default.basename(e.filenameRelative);return(0,E.default)(e,{sourceFileName:t,sourceMapTarget:t}),e},n.prototype.buildPluginsForOptions=function(e){if(Array.isArray(e.plugins)){var t=[],r=[],n=e.plugins.concat(B),i=Array.isArray(n),a=0;for(n=i?n:(0,s.default)(n);;){var o;if(i){if(a>=n.length)break;o=n[a++]}else{if((a=n.next()).done)break;o=a.value}var u=o,l=u[0],c=u[1];t.push(l.visitor),r.push(new m.default(this,l,c)),l.manipulateOptions&&l.manipulateOptions(e,this.parserOpts,this)}this.pluginVisitors.push(t),this.pluginPasses.push(r)}},n.prototype.getModuleName=function(){var e=this.opts;if(!e.moduleIds)return null;if(null!=e.moduleId&&!e.getModuleId)return e.moduleId;var t=e.filenameRelative,r="";if(null!=e.moduleRoot&&(r=e.moduleRoot+"/"),!e.filenameRelative)return r+e.filename.replace(/^\//,"");if(null!=e.sourceRoot){var n=new RegExp("^"+e.sourceRoot+"/?");t=t.replace(n,"")}return t=t.replace(/\.(\w*?)$/,""),r+=t,r=r.replace(/\\/g,"/"),e.getModuleId?e.getModuleId(r)||r:r},n.prototype.resolveModuleSource=function(e){var t=this.opts.resolveModuleSource;return t&&(e=t(e,this.opts.filename)),e},n.prototype.addImport=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,n=e+":"+t,i=this.dynamicImportIds[n];if(!i){e=this.resolveModuleSource(e),i=this.dynamicImportIds[n]=this.scope.generateUidIdentifier(r);var s=[];"*"===t?s.push(w.importNamespaceSpecifier(i)):"default"===t?s.push(w.importDefaultSpecifier(i)):s.push(w.importSpecifier(i,w.identifier(t)));var a=w.importDeclaration(s,w.stringLiteral(e));a._blockHoist=3,this.path.unshiftContainer("body",a)}return i},n.prototype.addHelper=function(e){var t=this.declarations[e];if(t)return t;this.usedHelpers[e]||(this.metadata.usedHelpers.push(e),this.usedHelpers[e]=!0);var r=this.get("helperGenerator"),n=this.get("helpersNamespace");if(r){var i=r(e);if(i)return i}else if(n)return w.memberExpression(n,w.identifier(e));var s=(0,p.default)(e),a=this.declarations[e]=this.scope.generateUidIdentifier(e);return w.isFunctionExpression(s)&&!s.id?(s.body._compact=!0,s._generated=!0,s.id=a,s.type="FunctionDeclaration",this.path.unshiftContainer("body",s)):(s._compact=!0,this.scope.push({id:a,init:s,unique:!0})),a},n.prototype.addTemplateObject=function(e,t,r){var n=r.elements.map(function(e){return e.value}),i=e+"_"+r.elements.length+"_"+n.join(","),s=this.declarations[i];if(s)return s;var a=this.declarations[i]=this.scope.generateUidIdentifier("templateObject"),o=this.addHelper(e),u=w.callExpression(o,[t,r]);return u._compact=!0,this.scope.push({id:a,init:u,_blockHoist:1.9}),a},n.prototype.buildCodeFrameError=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:SyntaxError,n=e&&(e.loc||e._loc),i=new r(t);return n?i.loc=n.start:((0,g.default)(e,O,this.scope,i),i.message+=" (This is an error on an internal node. Probably an internal error",i.loc&&(i.message+=". Location has been estimated."),i.message+=")"),i},n.prototype.mergeSourceMap=function(e){var t=this.opts.inputSourceMap;if(t){var r=new b.default.SourceMapConsumer(t),n=new b.default.SourceMapConsumer(e),i=new b.default.SourceMapGenerator({file:r.file,sourceRoot:r.sourceRoot}),s=n.sources[0];r.eachMapping(function(e){var t=n.generatedPositionFor({line:e.generatedLine,column:e.generatedColumn,source:s});null!=t.column&&i.addMapping({source:e.source,original:null==e.source?null:{line:e.originalLine,column:e.originalColumn},generated:t})});var a=i.toJSON();return t.mappings=a.mappings,t}return e},n.prototype.parse=function(r){var n=S.parse,i=this.opts.parserOpts;if(i&&(i=(0,o.default)({},this.parserOpts,i)).parser){if("string"==typeof i.parser){var s=_.default.dirname(this.opts.filename)||t.cwd(),a=(0,k.default)(i.parser,s);if(!a)throw new Error("Couldn't find parser "+i.parser+' with "parse" method relative to directory '+s);n=e(a).parse}else n=i.parser;i.parser={parse:function(e){return(0,S.parse)(e,i)}}}this.log.debug("Parse start");var u=n(r,i||this.parserOpts);return this.log.debug("Parse stop"),u},n.prototype._addAst=function(e){this.path=y.NodePath.get({hub:this.hub,parentPath:null,parent:e,container:e,key:"program"}).setContext(),this.scope=this.path.scope,this.ast=e,this.getMetadata()},n.prototype.addAst=function(e){this.log.debug("Start set AST"),this._addAst(e),this.log.debug("End set AST")},n.prototype.transform=function(){for(var e=0;e=r.length)break;a=r[i++]}else{if((i=r.next()).done)break;a=i.value}var o=a,u=o.plugin[e];u&&u.call(o,this)}},n.prototype.parseInputSourceMap=function(e){var t=this.opts;if(!1!==t.inputSourceMap){var r=f.default.fromSource(e);r&&(t.inputSourceMap=r.toObject(),e=f.default.removeComments(e))}return e},n.prototype.parseShebang=function(){var e=P.exec(this.code);e&&(this.shebang=e[0],this.code=this.code.replace(P,""))},n.prototype.makeResult=function(e){var t=e.code,r=e.map,n=e.ast,i=e.ignored,s={metadata:null,options:this.opts,ignored:!!i,code:null,ast:null,map:r||null};return this.opts.code&&(s.code=t),this.opts.ast&&(s.ast=n),this.opts.metadata&&(s.metadata=this.metadata),s},n.prototype.generate=function(){var r=this.opts,n=this.ast,i={ast:n};if(!r.code)return this.makeResult(i);var s=v.default;if(r.generatorOpts.generator&&"string"==typeof(s=r.generatorOpts.generator)){var a=_.default.dirname(this.opts.filename)||t.cwd(),u=(0,k.default)(s,a);if(!u)throw new Error("Couldn't find generator "+s+' with "print" method relative to directory '+a);s=e(u).print}this.log.debug("Generation start");var l=s(n,r.generatorOpts?(0,o.default)(r,r.generatorOpts):r,this.code);return i.code=l.code,i.map=l.map,this.log.debug("Generation end"),this.shebang&&(i.code=this.shebang+"\n"+i.code),i.map&&(i.map=this.mergeSourceMap(i.map)),"inline"!==r.sourceMaps&&"both"!==r.sourceMaps||(i.code+="\n"+f.default.fromObject(i.map).toComment()),"inline"===r.sourceMaps&&(i.map=null),this.makeResult(i)},n}(D.default);r.default=N,r.File=N}).call(this,e("_process"))},{"../../helpers/resolve":40,"../../store":41,"../../util":57,"../internal-plugins/block-hoist":52,"../internal-plugins/shadow-functions":53,"../plugin-pass":55,"./logger":44,"./metadata":45,"./options/option-manager":49,_process:550,"babel-code-frame":21,"babel-generator":85,"babel-helpers":109,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/object/assign":124,"babel-runtime/core-js/object/create":125,"babel-runtime/helpers/classCallCheck":134,"babel-runtime/helpers/inherits":135,"babel-runtime/helpers/possibleConstructorReturn":137,"babel-traverse":143,"babel-types":180,babylon:188,"convert-source-map":58,"lodash/defaults":495,path:546,"source-map":72}],44:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/classCallCheck")),s=n(e("debug/node")),a=(0,s.default)("babel:verbose"),o=(0,s.default)("babel"),u=[],l=function(){function e(t,r){(0,i.default)(this,e),this.filename=r,this.file=t}return e.prototype._buildMessage=function(e){var t="[BABEL] "+this.filename;return e&&(t+=": "+e),t},e.prototype.warn=function(e){console.warn(this._buildMessage(e))},e.prototype.error=function(e){throw new(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Error)(this._buildMessage(e))},e.prototype.deprecate=function(e){this.file.opts&&this.file.opts.suppressDeprecationMessages||(e=this._buildMessage(e),u.indexOf(e)>=0||(u.push(e),console.error(e)))},e.prototype.verbose=function(e){a.enabled&&a(this._buildMessage(e))},e.prototype.debug=function(e){o.enabled&&o(this._buildMessage(e))},e.prototype.deopt=function(e,t){this.debug(t)},e}();r.default=l,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":134,"debug/node":59}],45:[function(e,t,r){"use strict";r.__esModule=!0,r.ImportDeclaration=r.ModuleDeclaration=void 0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/get-iterator"));r.ExportDeclaration=function(e,t){var r=e.node,s=r.source?r.source.value:null,a=t.metadata.modules.exports,o=e.get("declaration");if(o.isStatement()){var u=o.getBindingIdentifiers();for(var l in u)a.exported.push(l),a.specifiers.push({kind:"local",local:l,exported:e.isExportDefaultDeclaration()?"default":l})}if(e.isExportNamedDeclaration()&&r.specifiers){var c=r.specifiers,p=Array.isArray(c),h=0;for(c=p?c:(0,n.default)(c);;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if((h=c.next()).done)break;f=h.value}var d=f,m=d.exported.name;a.exported.push(m),i.isExportDefaultSpecifier(d)&&a.specifiers.push({kind:"external",local:m,exported:m,source:s}),i.isExportNamespaceSpecifier(d)&&a.specifiers.push({kind:"external-namespace",exported:m,source:s});var y=d.local;y&&(s&&a.specifiers.push({kind:"external",local:y.name,exported:m,source:s}),s||a.specifiers.push({kind:"local",local:y.name,exported:m}))}}e.isExportAllDeclaration()&&a.specifiers.push({kind:"external-all",source:s})},r.Scope=function(e){e.skip()};var i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));r.ModuleDeclaration={enter:function(e,t){var r=e.node;r.source&&(r.source.value=t.resolveModuleSource(r.source.value))}},r.ImportDeclaration={exit:function(e,t){var r=e.node,i=[],s=[];t.metadata.modules.imports.push({source:r.source.value,imported:s,specifiers:i});var a=e.get("specifiers"),o=Array.isArray(a),u=0;for(a=o?a:(0,n.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}var c=l,p=c.node.local.name;if(c.isImportDefaultSpecifier()&&(s.push("default"),i.push({kind:"named",imported:"default",local:p})),c.isImportSpecifier()){var h=c.node.imported.name;s.push(h),i.push({kind:"named",imported:h,local:p})}c.isImportNamespaceSpecifier()&&(s.push("*"),i.push({kind:"namespace",local:p}))}}}},{"babel-runtime/core-js/get-iterator":120,"babel-types":180}],46:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=f[e];return null==t?f[e]=h.default.existsSync(e):t}r.__esModule=!0;var a=i(e("babel-runtime/core-js/object/assign")),o=i(e("babel-runtime/helpers/classCallCheck"));r.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],r=e.filename,n=new m(t);return!1!==e.babelrc&&n.findConfigs(r),n.mergeConfig({options:e,alias:"base",dirname:r&&p.default.dirname(r)}),n.configs};var u=i(e("../../../helpers/resolve")),l=i(e("json5")),c=i(e("path-is-absolute")),p=i(e("path")),h=i(e("fs")),f={},d={},m=function(){function e(t){(0,o.default)(this,e),this.resolvedConfigs=[],this.configs=[],this.log=t}return e.prototype.findConfigs=function(e){if(e){(0,c.default)(e)||(e=p.default.join(n.cwd(),e));for(var t=!1,r=!1;e!==(e=p.default.dirname(e));){if(!t){var i=p.default.join(e,".babelrc");s(i)&&(this.addConfig(i),t=!0);var a=p.default.join(e,"package.json");!t&&s(a)&&(t=this.addConfig(a,"babel",JSON))}if(!r){var o=p.default.join(e,".babelignore");s(o)&&(this.addIgnoreConfig(o),r=!0)}if(r&&t)return}}},e.prototype.addIgnoreConfig=function(e){var t=h.default.readFileSync(e,"utf8").split("\n");(t=t.map(function(e){return e.replace(/#(.*?)$/,"").trim()}).filter(function(e){return!!e})).length&&this.mergeConfig({options:{ignore:t},alias:e,dirname:p.default.dirname(e)})},e.prototype.addConfig=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default;if(this.resolvedConfigs.indexOf(e)>=0)return!1;this.resolvedConfigs.push(e);var n=h.default.readFileSync(e,"utf8"),i=void 0;try{i=d[n]=d[n]||r.parse(n),t&&(i=i[t])}catch(t){throw t.message=e+": Error while parsing JSON - "+t.message,t}return this.mergeConfig({options:i,alias:e,dirname:p.default.dirname(e)}),!!i},e.prototype.mergeConfig=function(e){var t=e.options,r=e.alias,i=e.loc,s=e.dirname;if(!t)return!1;if(t=(0,a.default)({},t),s=s||n.cwd(),i=i||r,t.extends){var o=(0,u.default)(t.extends,s);o?this.addConfig(o):this.log&&this.log.error("Couldn't resolve extends clause of "+t.extends+" in "+r),delete t.extends}this.configs.push({options:t,alias:r,loc:i,dirname:s});var l=void 0,c=n.env.BABEL_ENV||n.env.NODE_ENV||"development";t.env&&(l=t.env[c],delete t.env),this.mergeConfig({options:l,alias:r+".env."+c,dirname:s})},e}();t.exports=r.default}).call(this,e("_process"))},{"../../../helpers/resolve":40,_process:550,"babel-runtime/core-js/object/assign":124,"babel-runtime/helpers/classCallCheck":134,fs:193,json5:324,path:546,"path-is-absolute":547}],47:[function(e,t,r){"use strict";t.exports={filename:{type:"filename",description:"filename to use when reading from stdin - this will be used in source-maps, errors etc",default:"unknown",shorthand:"f"},filenameRelative:{hidden:!0,type:"string"},inputSourceMap:{hidden:!0},env:{hidden:!0,default:{}},mode:{description:"",hidden:!0},retainLines:{type:"boolean",default:!1,description:"retain line numbers - will result in really ugly code"},highlightCode:{description:"enable/disable ANSI syntax highlighting of code frames (on by default)",type:"boolean",default:!0},suppressDeprecationMessages:{type:"boolean",default:!1,hidden:!0},presets:{type:"list",description:"",default:[]},plugins:{type:"list",default:[],description:""},ignore:{type:"list",description:"list of glob paths to **not** compile",default:[]},only:{type:"list",description:"list of glob paths to **only** compile"},code:{hidden:!0,default:!0,type:"boolean"},metadata:{hidden:!0,default:!0,type:"boolean"},ast:{hidden:!0,default:!0,type:"boolean"},extends:{type:"string",hidden:!0},comments:{type:"boolean",default:!0,description:"write comments to generated output (true by default)"},shouldPrintComment:{hidden:!0,description:"optional callback to control whether a comment should be inserted, when this is used the comments option is ignored"},wrapPluginVisitorMethod:{hidden:!0,description:"optional callback to wrap all visitor methods"},compact:{type:"booleanString",default:"auto",description:"do not include superfluous whitespace characters and line terminators [true|false|auto]"},minified:{type:"boolean",default:!1,description:"save as much bytes when printing [true|false]"},sourceMap:{alias:"sourceMaps",hidden:!0},sourceMaps:{type:"booleanString",description:"[true|false|inline]",default:!1,shorthand:"s"},sourceMapTarget:{type:"string",description:"set `file` on returned source map"},sourceFileName:{type:"string",description:"set `sources[0]` on returned source map"},sourceRoot:{type:"filename",description:"the root from which all sources are relative"},babelrc:{description:"Whether or not to look up .babelrc and .babelignore files",type:"boolean",default:!0},sourceType:{description:"",default:"module"},auxiliaryCommentBefore:{type:"string",description:"print a comment before any injected non-user code"},auxiliaryCommentAfter:{type:"string",description:"print a comment after any injected non-user code"},resolveModuleSource:{hidden:!0},getModuleId:{hidden:!0},moduleRoot:{type:"filename",description:"optional prefix for the AMD module formatter that will be prepend to the filename on module definitions"},moduleIds:{type:"boolean",default:!1,shorthand:"M",description:"insert an explicit id for modules"},moduleId:{description:"specify a custom name for module ids",type:"string"},passPerPreset:{description:"Whether to spawn a traversal pass per a preset. By default all presets are merged.",type:"boolean",default:!1,hidden:!0},parserOpts:{description:"Options to pass into the parser, or to change parsers (parserOpts.parser)",default:!1},generatorOpts:{description:"Options to pass into the generator, or to change generators (generatorOpts.generator)",default:!1}}},{}],48:[function(e,t,r){"use strict";r.__esModule=!0,r.config=void 0,r.normaliseOptions=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t in e){var r=e[t];if(null!=r){var s=i.default[t];if(s&&s.alias&&(s=i.default[s.alias]),s){var a=n[s.type];a&&(r=a(r)),e[t]=r}}}return e};var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./parsers")),i=function(e){return e&&e.__esModule?e:{default:e}}(e("./config"));r.config=i.default},{"./config":47,"./parsers":50}],49:[function(e,t,r){(function(n){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function s(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var a=s(e("babel-runtime/helpers/objectWithoutProperties")),o=s(e("babel-runtime/core-js/json/stringify")),u=s(e("babel-runtime/core-js/object/assign")),l=s(e("babel-runtime/core-js/get-iterator")),c=s(e("babel-runtime/helpers/typeof")),p=s(e("babel-runtime/helpers/classCallCheck")),h=i(e("../../../api/node")),f=s(e("../../plugin")),d=i(e("babel-messages")),m=e("./index"),y=s(e("../../../helpers/resolve-plugin")),g=s(e("../../../helpers/resolve-preset")),b=s(e("lodash/cloneDeepWith")),v=s(e("lodash/clone")),x=s(e("../../../helpers/merge")),E=s(e("./config")),A=s(e("./removed")),D=s(e("./build-config-chain")),S=s(e("path")),C=function(){function t(e){(0,p.default)(this,t),this.resolvedConfigs=[],this.options=t.createBareOptions(),this.log=e}return t.memoisePluginContainer=function(e,r,n,i){var s=t.memoisedPlugins,a=Array.isArray(s),o=0;for(s=a?s:(0,l.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if((o=s.next()).done)break;u=o.value}var p=u;if(p.container===e)return p.plugin}var m=void 0;if("object"===(void 0===(m="function"==typeof e?e(h):e)?"undefined":(0,c.default)(m))){var y=new f.default(m,i);return t.memoisedPlugins.push({container:e,plugin:y}),y}throw new TypeError(d.get("pluginNotObject",r,n,void 0===m?"undefined":(0,c.default)(m))+r+n)},t.createBareOptions=function(){var e={};for(var t in E.default){var r=E.default[t];e[t]=(0,v.default)(r.default)}return e},t.normalisePlugin=function(e,r,n,i){if(!((e=e.__esModule?e.default:e)instanceof f.default)){if("function"!=typeof e&&"object"!==(void 0===e?"undefined":(0,c.default)(e)))throw new TypeError(d.get("pluginNotFunction",r,n,void 0===e?"undefined":(0,c.default)(e)));e=t.memoisePluginContainer(e,r,n,i)}return e.init(r,n),e},t.normalisePlugins=function(r,n,i){return i.map(function(i,s){var a=void 0,o=void 0;if(!i)throw new TypeError("Falsy value found in plugins");Array.isArray(i)?(a=i[0],o=i[1]):a=i;var u="string"==typeof a?a:r+"$"+s;if("string"==typeof a){var l=(0,y.default)(a,n);if(!l)throw new ReferenceError(d.get("pluginUnknown",a,r,s,n));a=e(l)}return a=t.normalisePlugin(a,r,s,u),[a,o]})},t.prototype.mergeOptions=function(e){var r=this,i=e.options,s=e.extending,a=e.alias,o=e.loc,l=e.dirname;if(a=a||"foreign",i){("object"!==(void 0===i?"undefined":(0,c.default)(i))||Array.isArray(i))&&this.log.error("Invalid options type for "+a,TypeError);var p=(0,b.default)(i,function(e){if(e instanceof f.default)return e});l=l||n.cwd(),o=o||a;for(var h in p){if(!E.default[h]&&this.log)if(A.default[h])this.log.error("Using removed Babel 5 option: "+a+"."+h+" - "+A.default[h].message,ReferenceError);else{var d="Unknown option: "+a+"."+h+". Check out http://babeljs.io/docs/usage/options/ for more information about options.";this.log.error(d+"\n\nA common cause of this error is the presence of a configuration options object without the corresponding preset name. Example:\n\nInvalid:\n `{ presets: [{option: value}] }`\nValid:\n `{ presets: [['presetName', {option: value}]] }`\n\nFor more detailed information on preset configuration, please see http://babeljs.io/docs/plugins/#pluginpresets-options.",ReferenceError)}}(0,m.normaliseOptions)(p),p.plugins&&(p.plugins=t.normalisePlugins(o,l,p.plugins)),p.presets&&(p.passPerPreset?p.presets=this.resolvePresets(p.presets,l,function(e,t){r.mergeOptions({options:e,extending:e,alias:t,loc:t,dirname:l})}):(this.mergePresets(p.presets,l),delete p.presets)),i===s?(0,u.default)(s,p):(0,x.default)(s||this.options,p)}},t.prototype.mergePresets=function(e,t){var r=this;this.resolvePresets(e,t,function(e,t){r.mergeOptions({options:e,alias:t,loc:t,dirname:S.default.dirname(t||"")})})},t.prototype.resolvePresets=function(t,r,n){return t.map(function(t){var i=void 0;if(Array.isArray(t)){if(t.length>2)throw new Error("Unexpected extra options "+(0,o.default)(t.slice(2))+" passed to preset.");var s=t;t=s[0],i=s[1]}var u=void 0;try{if("string"==typeof t){if(!(u=(0,g.default)(t,r)))throw new Error("Couldn't find preset "+(0,o.default)(t)+" relative to directory "+(0,o.default)(r));t=e(u)}if("object"===(void 0===t?"undefined":(0,c.default)(t))&&t.__esModule)if(t.default)t=t.default;else{var l=t;l.__esModule;t=(0,a.default)(l,["__esModule"])}if("object"===(void 0===t?"undefined":(0,c.default)(t))&&t.buildPreset&&(t=t.buildPreset),"function"!=typeof t&&void 0!==i)throw new Error("Options "+(0,o.default)(i)+" passed to "+(u||"a preset")+" which does not accept options.");if("function"==typeof t&&(t=t(h,i,{dirname:r})),"object"!==(void 0===t?"undefined":(0,c.default)(t)))throw new Error("Unsupported preset format: "+t+".");n&&n(t,u)}catch(e){throw u&&(e.message+=" (While processing preset: "+(0,o.default)(u)+")"),e}return t})},t.prototype.normaliseOptions=function(){var e=this.options;for(var t in E.default){var r=E.default[t],n=e[t];!n&&r.optional||(r.alias?e[r.alias]=e[r.alias]||n:e[t]=n)}},t.prototype.init=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,D.default)(e,this.log),r=Array.isArray(t),n=0;for(t=r?t:(0,l.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i;this.mergeOptions(s)}return this.normaliseOptions(e),this.options},t}();r.default=C,C.memoisedPlugins=[],t.exports=r.default}).call(this,e("_process"))},{"../../../api/node":32,"../../../helpers/merge":35,"../../../helpers/resolve-plugin":38,"../../../helpers/resolve-preset":39,"../../plugin":56,"./build-config-chain":46,"./config":47,"./index":48,"./removed":51,_process:550,"babel-messages":110,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/json/stringify":121,"babel-runtime/core-js/object/assign":124,"babel-runtime/helpers/classCallCheck":134,"babel-runtime/helpers/objectWithoutProperties":136,"babel-runtime/helpers/typeof":138,"lodash/clone":491,"lodash/cloneDeepWith":493,path:546}],50:[function(e,t,r){"use strict";r.__esModule=!0,r.filename=void 0,r.boolean=function(e){return!!e},r.booleanString=function(e){return i.booleanify(e)},r.list=function(e){return i.list(e)};var n=function(e){return e&&e.__esModule?e:{default:e}}(e("slash")),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("../../../util"));r.filename=n.default},{"../../../util":57,slash:603}],51:[function(e,t,r){"use strict";t.exports={auxiliaryComment:{message:"Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`"},blacklist:{message:"Put the specific transforms you want in the `plugins` option"},breakConfig:{message:"This is not a necessary option in Babel 6"},experimental:{message:"Put the specific transforms you want in the `plugins` option"},externalHelpers:{message:"Use the `external-helpers` plugin instead. Check out http://babeljs.io/docs/plugins/external-helpers/"},extra:{message:""},jsxPragma:{message:"use the `pragma` option in the `react-jsx` plugin . Check out http://babeljs.io/docs/plugins/transform-react-jsx/"},loose:{message:"Specify the `loose` option for the relevant plugin you are using or use a preset that sets the option."},metadataUsedHelpers:{message:"Not required anymore as this is enabled by default"},modules:{message:"Use the corresponding module transform plugin in the `plugins` option. Check out http://babeljs.io/docs/plugins/#modules"},nonStandard:{message:"Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. Also check out the react preset http://babeljs.io/docs/plugins/preset-react/"},optional:{message:"Put the specific transforms you want in the `plugins` option"},sourceMapName:{message:"Use the `sourceMapTarget` option"},stage:{message:"Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets"},whitelist:{message:"Put the specific transforms you want in the `plugins` option"}}},{}],52:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("../plugin")),s=n(e("lodash/sortBy"));r.default=new i.default({name:"internal.blockHoist",visitor:{Block:{exit:function(e){for(var t=e.node,r=!1,n=0;n1&&void 0!==arguments[1]?arguments[1]:{};return t.code=!1,t.mode="lint",this.transform(e,t)},e.prototype.pretransform=function(e,t){var r=new o.default(t,this);return r.wrap(e,function(){return r.addCode(e),r.parseCode(e),r})},e.prototype.transform=function(e,t){var r=new o.default(t,this);return r.wrap(e,function(){return r.addCode(e),r.parseCode(e),r.transform()})},e.prototype.analyse=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments[2];return t.code=!1,r&&(t.plugins=t.plugins||[],t.plugins.push(new a.default({visitor:r}))),this.transform(e,t).metadata},e.prototype.transformFromAst=function(e,t,r){e=(0,s.default)(e);var n=new o.default(r,this);return n.wrap(t,function(){return n.addCode(t),n.addAst(e),n.transform()})},e}();r.default=u,t.exports=r.default},{"../helpers/normalize-ast":36,"./file":43,"./plugin":56,"babel-runtime/helpers/classCallCheck":134}],55:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/classCallCheck")),s=n(e("babel-runtime/helpers/possibleConstructorReturn")),a=n(e("babel-runtime/helpers/inherits")),o=n(e("../store")),u=(n(e("./file")),function(e){function t(r,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,i.default)(this,t);var o=(0,s.default)(this,e.call(this));return o.plugin=n,o.key=n.key,o.file=r,o.opts=a,o}return(0,a.default)(t,e),t.prototype.addHelper=function(){var e;return(e=this.file).addHelper.apply(e,arguments)},t.prototype.addImport=function(){var e;return(e=this.file).addImport.apply(e,arguments)},t.prototype.getModuleName=function(){var e;return(e=this.file).getModuleName.apply(e,arguments)},t.prototype.buildCodeFrameError=function(){var e;return(e=this.file).buildCodeFrameError.apply(e,arguments)},t}(o.default));r.default=u,t.exports=r.default},{"../store":41,"./file":43,"babel-runtime/helpers/classCallCheck":134,"babel-runtime/helpers/inherits":135,"babel-runtime/helpers/possibleConstructorReturn":137}],56:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/get-iterator")),s=n(e("babel-runtime/helpers/classCallCheck")),a=n(e("babel-runtime/helpers/possibleConstructorReturn")),o=n(e("babel-runtime/helpers/inherits")),u=n(e("./file/options/option-manager")),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-messages")),c=n(e("../store")),p=n(e("babel-traverse")),h=n(e("lodash/assign")),f=n(e("lodash/clone")),d=["enter","exit"],m=function(e){function t(r,n){(0,s.default)(this,t);var i=(0,a.default)(this,e.call(this));return i.initialized=!1,i.raw=(0,h.default)({},r),i.key=i.take("name")||n,i.manipulateOptions=i.take("manipulateOptions"),i.post=i.take("post"),i.pre=i.take("pre"),i.visitor=i.normaliseVisitor((0,f.default)(i.take("visitor"))||{}),i}return(0,o.default)(t,e),t.prototype.take=function(e){var t=this.raw[e];return delete this.raw[e],t},t.prototype.chain=function(e,t){if(!e[t])return this[t];if(!this[t])return e[t];var r=[e[t],this[t]];return function(){for(var e=void 0,t=arguments.length,n=Array(t),s=0;s=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}if(l){var c=l.apply(this,n);null!=c&&(e=c)}}return e}},t.prototype.maybeInherit=function(e){var t=this.take("inherits");t&&(t=u.default.normalisePlugin(t,e,"inherits"),this.manipulateOptions=this.chain(t,"manipulateOptions"),this.post=this.chain(t,"post"),this.pre=this.chain(t,"pre"),this.visitor=p.default.visitors.merge([t.visitor,this.visitor]))},t.prototype.init=function(e,t){if(!this.initialized){this.initialized=!0,this.maybeInherit(e);for(var r in this.raw)throw new Error(l.get("pluginInvalidProperty",e,t,r))}},t.prototype.normaliseVisitor=function(e){var t=d,r=Array.isArray(t),n=0;for(t=r?t:(0,i.default)(t);;){var s;if(r){if(n>=t.length)break;s=t[n++]}else{if((n=t.next()).done)break;s=n.value}if(e[s])throw new Error("Plugins aren't allowed to specify catch-all enter/exit handlers. Please target individual nodes.")}return p.default.explode(e),e},t}(c.default);r.default=m,t.exports=r.default},{"../store":41,"./file/options/option-manager":49,"babel-messages":110,"babel-runtime/core-js/get-iterator":120,"babel-runtime/helpers/classCallCheck":134,"babel-runtime/helpers/inherits":135,"babel-runtime/helpers/possibleConstructorReturn":137,"babel-traverse":143,"lodash/assign":488,"lodash/clone":491}],57:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var r=t||i.EXTENSIONS,n=m.default.extname(e);return(0,f.default)(r,n)}function s(e){return e?Array.isArray(e)?e:"string"==typeof e?e.split(","):[e]:[]}function a(e,t){return e?"boolean"==typeof e?a([e],t):"string"==typeof e?a(s(e),t):Array.isArray(e)?(t&&(e=e.map(t)),e):[e]:[]}function o(e,t){return"function"==typeof e?e(t):e.test(t)}r.__esModule=!0,r.inspect=r.inherits=void 0;var u=n(e("babel-runtime/core-js/get-iterator")),l=e("util");Object.defineProperty(r,"inherits",{enumerable:!0,get:function(){return l.inherits}}),Object.defineProperty(r,"inspect",{enumerable:!0,get:function(){return l.inspect}}),r.canCompile=i,r.list=s,r.regexify=function(e){if(!e)return new RegExp(/.^/);if(Array.isArray(e)&&(e=new RegExp(e.map(c.default).join("|"),"i")),"string"==typeof e){e=(0,y.default)(e),((0,p.default)(e,"./")||(0,p.default)(e,"*/"))&&(e=e.slice(2)),(0,p.default)(e,"**/")&&(e=e.slice(3));var t=h.default.makeRe(e,{nocase:!0});return new RegExp(t.source.slice(1,-1),"i")}if((0,d.default)(e))return e;throw new TypeError("illegal type for regexify")},r.arrayify=a,r.booleanify=function(e){return"true"===e||1==e||!("false"===e||0==e||!e)&&e},r.shouldIgnore=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2];if(e=e.replace(/\\/g,"/"),r){var n=r,i=Array.isArray(n),s=0;for(n=i?n:(0,u.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}if(o(a,e))return!1}return!0}if(t.length){var l=t,c=Array.isArray(l),p=0;for(l=c?l:(0,u.default)(l);;){var h;if(c){if(p>=l.length)break;h=l[p++]}else{if((p=l.next()).done)break;h=p.value}if(o(h,e))return!0}}return!1};var c=n(e("lodash/escapeRegExp")),p=n(e("lodash/startsWith")),h=n(e("minimatch")),f=n(e("lodash/includes")),d=n(e("lodash/isRegExp")),m=n(e("path")),y=n(e("slash"));i.EXTENSIONS=[".js",".jsx",".es6",".es"]},{"babel-runtime/core-js/get-iterator":120,"lodash/escapeRegExp":497,"lodash/includes":507,"lodash/isRegExp":519,"lodash/startsWith":532,minimatch:542,path:546,slash:603,util:613}],58:[function(e,t,r){(function(t){"use strict";function n(e,n){(n=n||{}).isFileComment&&(e=function(e,t){var n=r.mapFileCommentRegex.exec(e),a=n[1]||n[2],o=s.resolve(t,a);try{return i.readFileSync(o,"utf8")}catch(e){throw new Error("An error occurred while trying to read the map file at "+o+"\n"+e)}}(e,n.commentFileDir)),n.hasComment&&(e=function(e){return e.split(",").pop()}(e)),n.isEncoded&&(e=function(e){return new t(e,"base64").toString()}(e)),(n.isJSON||n.isEncoded)&&(e=JSON.parse(e)),this.sourcemap=e}var i=e("fs"),s=e("path");Object.defineProperty(r,"commentRegex",{get:function(){return/^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/gm}}),Object.defineProperty(r,"mapFileCommentRegex",{get:function(){return/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"`]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/gm}}),n.prototype.toJSON=function(e){return JSON.stringify(this.sourcemap,null,e)},n.prototype.toBase64=function(){var e=this.toJSON();return new t(e).toString("base64")},n.prototype.toComment=function(e){var t="sourceMappingURL=data:application/json;charset=utf-8;base64,"+this.toBase64();return e&&e.multiline?"/*# "+t+" */":"//# "+t},n.prototype.toObject=function(){return JSON.parse(this.toJSON())},n.prototype.addProperty=function(e,t){if(this.sourcemap.hasOwnProperty(e))throw new Error('property "'+e+'" already exists on the sourcemap, use set property instead');return this.setProperty(e,t)},n.prototype.setProperty=function(e,t){return this.sourcemap[e]=t,this},n.prototype.getProperty=function(e){return this.sourcemap[e]},r.fromObject=function(e){return new n(e)},r.fromJSON=function(e){return new n(e,{isJSON:!0})},r.fromBase64=function(e){return new n(e,{isEncoded:!0})},r.fromComment=function(e){return e=e.replace(/^\/\*/g,"//").replace(/\*\/$/g,""),new n(e,{isEncoded:!0,hasComment:!0})},r.fromMapFileComment=function(e,t){return new n(e,{commentFileDir:t,isFileComment:!0,isJSON:!0})},r.fromSource=function(e){var t=e.match(r.commentRegex);return t?r.fromComment(t.pop()):null},r.fromMapFileSource=function(e,t){var n=e.match(r.mapFileCommentRegex);return n?r.fromMapFileComment(n.pop(),t):null},r.removeComments=function(e){return e.replace(r.commentRegex,"")},r.removeMapFileComments=function(e){return e.replace(r.mapFileCommentRegex,"")},r.generateMapFileComment=function(e,t){var r="sourceMappingURL="+e;return t&&t.multiline?"/*# "+r+" */":"//# "+r}}).call(this,e("buffer").Buffer)},{buffer:194,fs:193,path:546}],59:[function(e,t,r){t.exports=e("./src/node")},{"./src/node":61}],60:[function(e,t,r){function n(e){function t(){if(t.enabled){var e=t,n=+new Date,s=n-(i||n);e.diff=s,e.prev=i,e.curr=n,i=n;for(var a=new Array(arguments.length),o=0;o=0)return t}else{var r=i.toSetString(e);if(s.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},n.prototype.at=function(e){if(e>=0&&e>>=5)>0&&(t|=32),r+=n.encode(t)}while(i>0);return r},r.decode=function(e,t,r){var i,s,a=e.length,o=0,u=0;do{if(t>=a)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(s=n.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));i=!!(32&s),o+=(s&=31)<>1;return 1==(1&e)?-t:t}(o),r.rest=t}},{"./base64":64}],64:[function(e,t,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");r.encode=function(e){if(0<=e&&e0?t-u>1?n(u,t,i,s,a,o):o==r.LEAST_UPPER_BOUND?t1?n(e,u,i,s,a,o):o==r.LEAST_UPPER_BOUND?u:e<0?-1:e}r.GREATEST_LOWER_BOUND=1,r.LEAST_UPPER_BOUND=2,r.search=function(e,t,i,s){if(0===t.length)return-1;var a=n(-1,t.length,e,t,i,s||r.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&0===i(t[a],t[a-1],!0);)--a;return a}},{}],66:[function(e,t,r){function n(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var i=e("./util");n.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},n.prototype.add=function(e){!function(e,t){var r=e.generatedLine,n=t.generatedLine,s=e.generatedColumn,a=t.generatedColumn;return n>r||n==r&&a>=s||i.compareByGeneratedPositionsInflated(e,t)<=0}(this._last,e)?(this._sorted=!1,this._array.push(e)):(this._last=e,this._array.push(e))},n.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},r.MappingList=n},{"./util":71}],67:[function(e,t,r){function n(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function i(e,t,r,s){if(r=0){var s=this._originalMappings[i];if(void 0===e.column)for(var a=s.originalLine;s&&s.originalLine===a;)n.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i];else for(var l=s.originalColumn;s&&s.originalLine===t&&s.originalColumn==l;)n.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i]}return n},r.SourceMapConsumer=n,(i.prototype=Object.create(n.prototype)).consumer=n,i.fromSourceMap=function(e){var t=Object.create(i.prototype),r=t._names=l.fromArray(e._names.toArray(),!0),n=t._sources=l.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var a=e._mappings.toArray().slice(),u=t.__generatedMappings=[],c=t.__originalMappings=[],h=0,f=a.length;h1&&(r.source=m+i[1],m+=i[1],r.originalLine=f+i[2],f=r.originalLine,r.originalLine+=1,r.originalColumn=d+i[3],d=r.originalColumn,i.length>4&&(r.name=y+i[4],y+=i[4])),A.push(r),"number"==typeof r.originalLine&&E.push(r)}p(A,o.compareByGeneratedPositionsDeflated),this.__generatedMappings=A,p(E,o.compareByOriginalPositions),this.__originalMappings=E},i.prototype._findMapping=function(e,t,r,n,i,s){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[n]);return u.search(e,t,i,s)},i.prototype.computeColumnSpans=function(){for(var e=0;e=0){var i=this._generatedMappings[r];if(i.generatedLine===t.generatedLine){var s=o.getArg(i,"source",null);null!==s&&(s=this._sources.at(s),null!=this.sourceRoot&&(s=o.join(this.sourceRoot,s)));var a=o.getArg(i,"name",null);return null!==a&&(a=this._names.at(a)),{source:s,line:o.getArg(i,"originalLine",null),column:o.getArg(i,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},i.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},i.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=o.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=o.urlParse(this.sourceRoot))){var n=e.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(n))return this.sourcesContent[this._sources.indexOf(n)];if((!r.path||"/"==r.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},i.prototype.generatedPositionFor=function(e){var t=o.getArg(e,"source");if(null!=this.sourceRoot&&(t=o.relative(this.sourceRoot,t)),!this._sources.has(t))return{line:null,column:null,lastColumn:null};var r={source:t=this._sources.indexOf(t),originalLine:o.getArg(e,"line"),originalColumn:o.getArg(e,"column")},i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,o.getArg(e,"bias",n.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===r.source)return{line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},r.BasicSourceMapConsumer=i,(a.prototype=Object.create(n.prototype)).constructor=n,a.prototype._version=3,Object.defineProperty(a.prototype,"sources",{get:function(){for(var e=[],t=0;t0&&e.column>=0)||t||r||n)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:n}))},n.prototype._serializeMappings=function(){for(var e,t,r,n,a=0,o=1,u=0,l=0,c=0,p=0,h="",f=this._mappings.toArray(),d=0,m=f.length;d0){if(!s.compareByGeneratedPositionsInflated(t,f[d-1]))continue;e+=","}e+=i.encode(t.generatedColumn-a),a=t.generatedColumn,null!=t.source&&(n=this._sources.indexOf(t.source),e+=i.encode(n-p),p=n,e+=i.encode(t.originalLine-1-l),l=t.originalLine-1,e+=i.encode(t.originalColumn-u),u=t.originalColumn,null!=t.name&&(r=this._names.indexOf(t.name),e+=i.encode(r-c),c=r)),h+=e}return h},n.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;null!=t&&(e=s.relative(t,e));var r=s.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},n.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},n.prototype.toString=function(){return JSON.stringify(this.toJSON())},r.SourceMapGenerator=n},{"./array-set":62,"./base64-vlq":63,"./mapping-list":66,"./util":71}],70:[function(e,t,r){function n(e,t,r,n,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==r?null:r,this.name=null==i?null:i,this[o]=!0,null!=n&&this.add(n)}var i=e("./source-map-generator").SourceMapGenerator,s=e("./util"),a=/(\r?\n)/,o="$$$isSourceNode$$$";n.fromStringWithSourceMap=function(e,t,r){function i(e,t){if(null===e||void 0===e.source)o.add(t);else{var i=r?s.join(r,e.source):e.source;o.add(new n(e.originalLine,e.originalColumn,i,t,e.name))}}var o=new n,u=e.split(a),l=0,c=function(){function e(){return l=0;t--)this.prepend(e[t]);else{if(!e[o]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},n.prototype.walk=function(e){for(var t,r=0,n=this.children.length;r0){for(t=[],r=0;r=0;c--)"."===(a=u[c])?u.splice(c,1):".."===a?l++:l>0&&(""===a?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return""===(t=u.join("/"))&&(t=o?"/":"."),s?(s.path=t,i(s)):t}function a(e){return e}function o(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var r=t-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function u(e,t){return e===t?0:e>t?1:-1}r.getArg=function(e,t,r){if(t in e)return e[t];if(3===arguments.length)return r;throw new Error('"'+t+'" is a required argument.')};var l=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,c=/^data:.+\,.+$/;r.urlParse=n,r.urlGenerate=i,r.normalize=s,r.join=function(e,t){""===e&&(e="."),""===t&&(t=".");var r=n(t),a=n(e);if(a&&(e=a.path||"/"),r&&!r.scheme)return a&&(r.scheme=a.scheme),i(r);if(r||t.match(c))return t;if(a&&!a.host&&!a.path)return a.host=t,i(a);var o="/"===t.charAt(0)?t:s(e.replace(/\/+$/,"")+"/"+t);return a?(a.path=o,i(a)):o},r.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(l)},r.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==t.indexOf(e+"/");){var n=e.lastIndexOf("/");if(n<0)return t;if((e=e.slice(0,n)).match(/^([^\/]+:\/)?\/*$/))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)};var p=!("__proto__"in Object.create(null));r.toSetString=p?a:function(e){return o(e)?"$"+e:e},r.fromSetString=p?a:function(e){return o(e)?e.slice(1):e},r.compareByOriginalPositions=function(e,t,r){var n=e.source-t.source;return 0!==n?n:0!=(n=e.originalLine-t.originalLine)?n:0!=(n=e.originalColumn-t.originalColumn)||r?n:0!=(n=e.generatedColumn-t.generatedColumn)?n:0!=(n=e.generatedLine-t.generatedLine)?n:e.name-t.name},r.compareByGeneratedPositionsDeflated=function(e,t,r){var n=e.generatedLine-t.generatedLine;return 0!==n?n:0!=(n=e.generatedColumn-t.generatedColumn)||r?n:0!=(n=e.source-t.source)?n:0!=(n=e.originalLine-t.originalLine)?n:0!=(n=e.originalColumn-t.originalColumn)?n:e.name-t.name},r.compareByGeneratedPositionsInflated=function(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r?r:0!=(r=e.generatedColumn-t.generatedColumn)?r:0!==(r=u(e.source,t.source))?r:0!=(r=e.originalLine-t.originalLine)?r:0!=(r=e.originalColumn-t.originalColumn)?r:u(e.name,t.name)}},{}],72:[function(e,t,r){r.SourceMapGenerator=e("./lib/source-map-generator").SourceMapGenerator,r.SourceMapConsumer=e("./lib/source-map-consumer").SourceMapConsumer,r.SourceNode=e("./lib/source-node").SourceNode},{"./lib/source-map-consumer":68,"./lib/source-map-generator":69,"./lib/source-node":70}],73:[function(e,t,r){t.exports={_args:[[{raw:"babel-core@^6.18.2",scope:null,escapedName:"babel-core",name:"babel-core",rawSpec:"^6.18.2",spec:">=6.18.2 <7.0.0",type:"range"},"/Users/evgenypoberezkin/Documents/JSON/ajv/node_modules/regenerator"]],_from:"babel-core@>=6.18.2 <7.0.0",_id:"babel-core@6.26.0",_inCache:!0,_location:"/babel-core",_nodeVersion:"6.9.0",_npmOperationalInternal:{host:"s3://npm-registry-packages",tmp:"tmp/babel-core-6.26.0.tgz_1502898861183_0.43529116874560714"},_npmUser:{name:"hzoo",email:"hi@henryzoo.com"},_npmVersion:"4.6.1",_phantomChildren:{ms:"2.0.0"},_requested:{raw:"babel-core@^6.18.2",scope:null,escapedName:"babel-core",name:"babel-core",rawSpec:"^6.18.2",spec:">=6.18.2 <7.0.0",type:"range"},_requiredBy:["/babel-register","/regenerator"],_resolved:"https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz",_shasum:"af32f78b31a6fcef119c87b0fd8d9753f03a0bb8",_shrinkwrap:null,_spec:"babel-core@^6.18.2",_where:"/Users/evgenypoberezkin/Documents/JSON/ajv/node_modules/regenerator",author:{name:"Sebastian McKenzie",email:"sebmck@gmail.com"},dependencies:{"babel-code-frame":"^6.26.0","babel-generator":"^6.26.0","babel-helpers":"^6.24.1","babel-messages":"^6.23.0","babel-register":"^6.26.0","babel-runtime":"^6.26.0","babel-template":"^6.26.0","babel-traverse":"^6.26.0","babel-types":"^6.26.0",babylon:"^6.18.0","convert-source-map":"^1.5.0",debug:"^2.6.8",json5:"^0.5.1",lodash:"^4.17.4",minimatch:"^3.0.4","path-is-absolute":"^1.0.1",private:"^0.1.7",slash:"^1.0.0","source-map":"^0.5.6"},description:"Babel compiler core.",devDependencies:{"babel-helper-fixtures":"^6.26.0","babel-helper-transform-fixture-test-runner":"^6.26.0","babel-polyfill":"^6.26.0"},directories:{},dist:{shasum:"af32f78b31a6fcef119c87b0fd8d9753f03a0bb8",tarball:"https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz"},homepage:"https://babeljs.io/",keywords:["6to5","babel","classes","const","es6","harmony","let","modules","transpile","transpiler","var","babel-core","compiler"],license:"MIT",maintainers:[{name:"thejameskyle",email:"me@thejameskyle.com"},{name:"sebmck",email:"sebmck@gmail.com"},{name:"danez",email:"daniel@tschinder.de"},{name:"hzoo",email:"hi@henryzoo.com"},{name:"loganfsmyth",email:"loganfsmyth@gmail.com"}],name:"babel-core",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"https://github.com/babel/babel/tree/master/packages/babel-core"},scripts:{bench:"make bench",test:"make test"},version:"6.26.0"}},{}],74:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/classCallCheck")),s=n(e("trim-right")),a=/^[ \t]+$/,o=function(){function e(t){(0,i.default)(this,e),this._map=null,this._buf=[],this._last="",this._queue=[],this._position={line:1,column:0},this._sourcePosition={identifierName:null,line:null,column:null,filename:null},this._map=t}return e.prototype.get=function(){this._flush();var e=this._map,t={code:(0,s.default)(this._buf.join("")),map:null,rawMappings:e&&e.getRawMappings()};return e&&Object.defineProperty(t,"map",{configurable:!0,enumerable:!0,get:function(){return this.map=e.get()},set:function(e){Object.defineProperty(this,"map",{value:e,writable:!0})}}),t},e.prototype.append=function(e){this._flush();var t=this._sourcePosition,r=t.line,n=t.column,i=t.filename,s=t.identifierName;this._append(e,r,n,s,i)},e.prototype.queue=function(e){if("\n"===e)for(;this._queue.length>0&&a.test(this._queue[0][0]);)this._queue.shift();var t=this._sourcePosition,r=t.line,n=t.column,i=t.filename,s=t.identifierName;this._queue.unshift([e,r,n,s,i])},e.prototype._flush=function(){for(var e=void 0;e=this._queue.pop();)this._append.apply(this,e)},e.prototype._append=function(e,t,r,n,i){this._map&&"\n"!==e[0]&&this._map.mark(this._position.line,this._position.column,t,r,n,i),this._buf.push(e),this._last=e[e.length-1];for(var s=0;s0&&"\n"===this._queue[0][0]&&this._queue.shift()},e.prototype.removeLastSemicolon=function(){this._queue.length>0&&";"===this._queue[0][0]&&this._queue.shift()},e.prototype.endsWith=function(e){if(1===e.length){var t=void 0;if(this._queue.length>0){var r=this._queue[0][0];t=r[r.length-1]}else t=this._last;return t===e}var n=this._last+this._queue.reduce(function(e,t){return t[0]+e},"");return e.length<=n.length&&n.slice(-e.length)===e},e.prototype.hasContent=function(){return this._queue.length>0||!!this._last},e.prototype.source=function(e,t){if(!e||t){var r=t?t[e]:null;this._sourcePosition.identifierName=t&&t.identifierName||null,this._sourcePosition.line=r?r.line:null,this._sourcePosition.column=r?r.column:null,this._sourcePosition.filename=t&&t.filename||null}},e.prototype.withSource=function(e,t,r){if(!this._map)return r();var n=this._sourcePosition.line,i=this._sourcePosition.column,s=this._sourcePosition.filename,a=this._sourcePosition.identifierName;this.source(e,t),r(),this._sourcePosition.line=n,this._sourcePosition.column=i,this._sourcePosition.filename=s,this._sourcePosition.identifierName=a},e.prototype.getCurrentColumn=function(){var e=this._queue.reduce(function(e,t){return t[0]+e},""),t=e.lastIndexOf("\n");return-1===t?this._position.column+e.length:e.length-1-t},e.prototype.getCurrentLine=function(){for(var e=this._queue.reduce(function(e,t){return t[0]+e},""),t=0,r=0;r")}function a(){this.space(),this.token("|"),this.space()}r.__esModule=!0,r.TypeParameterDeclaration=r.StringLiteralTypeAnnotation=r.NumericLiteralTypeAnnotation=r.GenericTypeAnnotation=r.ClassImplements=void 0,r.AnyTypeAnnotation=function(){this.word("any")},r.ArrayTypeAnnotation=function(e){this.print(e.elementType,e),this.token("["),this.token("]")},r.BooleanTypeAnnotation=function(){this.word("boolean")},r.BooleanLiteralTypeAnnotation=function(e){this.word(e.value?"true":"false")},r.NullLiteralTypeAnnotation=function(){this.word("null")},r.DeclareClass=function(e,t){u.isDeclareExportDeclaration(t)||(this.word("declare"),this.space()),this.word("class"),this.space(),this._interfaceish(e)},r.DeclareFunction=function(e,t){u.isDeclareExportDeclaration(t)||(this.word("declare"),this.space()),this.word("function"),this.space(),this.print(e.id,e),this.print(e.id.typeAnnotation.typeAnnotation,e),this.semicolon()},r.DeclareInterface=function(e){this.word("declare"),this.space(),this.InterfaceDeclaration(e)},r.DeclareModule=function(e){this.word("declare"),this.space(),this.word("module"),this.space(),this.print(e.id,e),this.space(),this.print(e.body,e)},r.DeclareModuleExports=function(e){this.word("declare"),this.space(),this.word("module"),this.token("."),this.word("exports"),this.print(e.typeAnnotation,e)},r.DeclareTypeAlias=function(e){this.word("declare"),this.space(),this.TypeAlias(e)},r.DeclareOpaqueType=function(e,t){u.isDeclareExportDeclaration(t)||(this.word("declare"),this.space()),this.OpaqueType(e)},r.DeclareVariable=function(e,t){u.isDeclareExportDeclaration(t)||(this.word("declare"),this.space()),this.word("var"),this.space(),this.print(e.id,e),this.print(e.id.typeAnnotation,e),this.semicolon()},r.DeclareExportDeclaration=function(e){this.word("declare"),this.space(),this.word("export"),this.space(),e.default&&(this.word("default"),this.space()),function(e){if(e.declaration){var t=e.declaration;this.print(t,e),u.isStatement(t)||this.semicolon()}else this.token("{"),e.specifiers.length&&(this.space(),this.printList(e.specifiers,e),this.space()),this.token("}"),e.source&&(this.space(),this.word("from"),this.space(),this.print(e.source,e)),this.semicolon()}.apply(this,arguments)},r.ExistentialTypeParam=function(){this.token("*")},r.FunctionTypeAnnotation=function(e,t){this.print(e.typeParameters,e),this.token("("),this.printList(e.params,e),e.rest&&(e.params.length&&(this.token(","),this.space()),this.token("..."),this.print(e.rest,e)),this.token(")"),"ObjectTypeCallProperty"===t.type||"DeclareFunction"===t.type?this.token(":"):(this.space(),this.token("=>")),this.space(),this.print(e.returnType,e)},r.FunctionTypeParam=function(e){this.print(e.name,e),e.optional&&this.token("?"),this.token(":"),this.space(),this.print(e.typeAnnotation,e)},r.InterfaceExtends=n,r._interfaceish=function(e){this.print(e.id,e),this.print(e.typeParameters,e),e.extends.length&&(this.space(),this.word("extends"),this.space(),this.printList(e.extends,e)),e.mixins&&e.mixins.length&&(this.space(),this.word("mixins"),this.space(),this.printList(e.mixins,e)),this.space(),this.print(e.body,e)},r._variance=function(e){"plus"===e.variance?this.token("+"):"minus"===e.variance&&this.token("-")},r.InterfaceDeclaration=function(e){this.word("interface"),this.space(),this._interfaceish(e)},r.IntersectionTypeAnnotation=function(e){this.printJoin(e.types,e,{separator:i})},r.MixedTypeAnnotation=function(){this.word("mixed")},r.EmptyTypeAnnotation=function(){this.word("empty")},r.NullableTypeAnnotation=function(e){this.token("?"),this.print(e.typeAnnotation,e)};var o=e("./types");Object.defineProperty(r,"NumericLiteralTypeAnnotation",{enumerable:!0,get:function(){return o.NumericLiteral}}),Object.defineProperty(r,"StringLiteralTypeAnnotation",{enumerable:!0,get:function(){return o.StringLiteral}}),r.NumberTypeAnnotation=function(){this.word("number")},r.StringTypeAnnotation=function(){this.word("string")},r.ThisTypeAnnotation=function(){this.word("this")},r.TupleTypeAnnotation=function(e){this.token("["),this.printList(e.types,e),this.token("]")},r.TypeofTypeAnnotation=function(e){this.word("typeof"),this.space(),this.print(e.argument,e)},r.TypeAlias=function(e){this.word("type"),this.space(),this.print(e.id,e),this.print(e.typeParameters,e),this.space(),this.token("="),this.space(),this.print(e.right,e),this.semicolon()},r.OpaqueType=function(e){this.word("opaque"),this.space(),this.word("type"),this.space(),this.print(e.id,e),this.print(e.typeParameters,e),e.supertype&&(this.token(":"),this.space(),this.print(e.supertype,e)),e.impltype&&(this.space(),this.token("="),this.space(),this.print(e.impltype,e)),this.semicolon()},r.TypeAnnotation=function(e){this.token(":"),this.space(),e.optional&&this.token("?"),this.print(e.typeAnnotation,e)},r.TypeParameter=function(e){this._variance(e),this.word(e.name),e.bound&&this.print(e.bound,e),e.default&&(this.space(),this.token("="),this.space(),this.print(e.default,e))},r.TypeParameterInstantiation=s,r.ObjectTypeAnnotation=function(e){var t=this;e.exact?this.token("{|"):this.token("{");var r=e.properties.concat(e.callProperties,e.indexers);r.length&&(this.space(),this.printJoin(r,e,{addNewlines:function(e){if(e&&!r[0])return 1},indent:!0,statement:!0,iterator:function(){1!==r.length&&(t.format.flowCommaSeparator?t.token(","):t.semicolon(),t.space())}}),this.space()),e.exact?this.token("|}"):this.token("}")},r.ObjectTypeCallProperty=function(e){e.static&&(this.word("static"),this.space()),this.print(e.value,e)},r.ObjectTypeIndexer=function(e){e.static&&(this.word("static"),this.space()),this._variance(e),this.token("["),this.print(e.id,e),this.token(":"),this.space(),this.print(e.key,e),this.token("]"),this.token(":"),this.space(),this.print(e.value,e)},r.ObjectTypeProperty=function(e){e.static&&(this.word("static"),this.space()),this._variance(e),this.print(e.key,e),e.optional&&this.token("?"),this.token(":"),this.space(),this.print(e.value,e)},r.ObjectTypeSpreadProperty=function(e){this.token("..."),this.print(e.argument,e)},r.QualifiedTypeIdentifier=function(e){this.print(e.qualification,e),this.token("."),this.print(e.id,e)},r.UnionTypeAnnotation=function(e){this.printJoin(e.types,e,{separator:a})},r.TypeCastExpression=function(e){this.token("("),this.print(e.expression,e),this.print(e.typeAnnotation,e),this.token(")")},r.VoidTypeAnnotation=function(){this.word("void")};var u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));r.ClassImplements=n,r.GenericTypeAnnotation=n,r.TypeParameterDeclaration=s},{"./types":84,"babel-types":180}],79:[function(e,t,r){"use strict";function n(){this.space()}r.__esModule=!0;var i=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/get-iterator"));r.JSXAttribute=function(e){this.print(e.name,e),e.value&&(this.token("="),this.print(e.value,e))},r.JSXIdentifier=function(e){this.word(e.name)},r.JSXNamespacedName=function(e){this.print(e.namespace,e),this.token(":"),this.print(e.name,e)},r.JSXMemberExpression=function(e){this.print(e.object,e),this.token("."),this.print(e.property,e)},r.JSXSpreadAttribute=function(e){this.token("{"),this.token("..."),this.print(e.argument,e),this.token("}")},r.JSXExpressionContainer=function(e){this.token("{"),this.print(e.expression,e),this.token("}")},r.JSXSpreadChild=function(e){this.token("{"),this.token("..."),this.print(e.expression,e),this.token("}")},r.JSXText=function(e){this.token(e.value)},r.JSXElement=function(e){var t=e.openingElement;if(this.print(t,e),!t.selfClosing){this.indent();var r=e.children,n=Array.isArray(r),s=0;for(r=n?r:(0,i.default)(r);;){var a;if(n){if(s>=r.length)break;a=r[s++]}else{if((s=r.next()).done)break;a=s.value}var o=a;this.print(o,e)}this.dedent(),this.print(e.closingElement,e)}},r.JSXOpeningElement=function(e){this.token("<"),this.print(e.name,e),e.attributes.length>0&&(this.space(),this.printJoin(e.attributes,e,{separator:n})),e.selfClosing?(this.space(),this.token("/>")):this.token(">")},r.JSXClosingElement=function(e){this.token("")},r.JSXEmptyExpression=function(){}},{"babel-runtime/core-js/get-iterator":120}],80:[function(e,t,r){"use strict";function n(e){e.async&&(this.word("async"),this.space()),this.word("function"),e.generator&&this.token("*"),e.id?(this.space(),this.print(e.id,e)):this.space(),this._params(e),this.space(),this.print(e.body,e)}r.__esModule=!0,r.FunctionDeclaration=void 0,r._params=function(e){var t=this;this.print(e.typeParameters,e),this.token("("),this.printList(e.params,e,{iterator:function(e){e.optional&&t.token("?"),t.print(e.typeAnnotation,e)}}),this.token(")"),e.returnType&&this.print(e.returnType,e)},r._method=function(e){var t=e.kind,r=e.key;"method"!==t&&"init"!==t||e.generator&&this.token("*"),"get"!==t&&"set"!==t||(this.word(t),this.space()),e.async&&(this.word("async"),this.space()),e.computed?(this.token("["),this.print(r,e),this.token("]")):this.print(r,e),this._params(e),this.space(),this.print(e.body,e)},r.FunctionExpression=n,r.ArrowFunctionExpression=function(e){e.async&&(this.word("async"),this.space());var t=e.params[0];1===e.params.length&&i.isIdentifier(t)&&!function(e,t){return e.typeParameters||e.returnType||t.typeAnnotation||t.optional||t.trailingComments}(e,t)?this.print(t,e):this._params(e),this.space(),this.token("=>"),this.space(),this.print(e.body,e)};var i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));r.FunctionDeclaration=n},{"babel-types":180}],81:[function(e,t,r){"use strict";function n(e){if(e.declaration){var t=e.declaration;this.print(t,e),i.isStatement(t)||this.semicolon()}else{"type"===e.exportKind&&(this.word("type"),this.space());for(var r=e.specifiers.slice(0),n=!1;;){var s=r[0];if(!i.isExportDefaultSpecifier(s)&&!i.isExportNamespaceSpecifier(s))break;n=!0,this.print(r.shift(),e),r.length&&(this.token(","),this.space())}(r.length||!r.length&&!n)&&(this.token("{"),r.length&&(this.space(),this.printList(r,e),this.space()),this.token("}")),e.source&&(this.space(),this.word("from"),this.space(),this.print(e.source,e)),this.semicolon()}}r.__esModule=!0,r.ImportSpecifier=function(e){"type"!==e.importKind&&"typeof"!==e.importKind||(this.word(e.importKind),this.space()),this.print(e.imported,e),e.local&&e.local.name!==e.imported.name&&(this.space(),this.word("as"),this.space(),this.print(e.local,e))},r.ImportDefaultSpecifier=function(e){this.print(e.local,e)},r.ExportDefaultSpecifier=function(e){this.print(e.exported,e)},r.ExportSpecifier=function(e){this.print(e.local,e),e.exported&&e.local.name!==e.exported.name&&(this.space(),this.word("as"),this.space(),this.print(e.exported,e))},r.ExportNamespaceSpecifier=function(e){this.token("*"),this.space(),this.word("as"),this.space(),this.print(e.exported,e)},r.ExportAllDeclaration=function(e){this.word("export"),this.space(),this.token("*"),this.space(),this.word("from"),this.space(),this.print(e.source,e),this.semicolon()},r.ExportNamedDeclaration=function(){this.word("export"),this.space(),n.apply(this,arguments)},r.ExportDefaultDeclaration=function(){this.word("export"),this.space(),this.word("default"),this.space(),n.apply(this,arguments)},r.ImportDeclaration=function(e){this.word("import"),this.space(),"type"!==e.importKind&&"typeof"!==e.importKind||(this.word(e.importKind),this.space());var t=e.specifiers.slice(0);if(t&&t.length){for(;;){var r=t[0];if(!i.isImportDefaultSpecifier(r)&&!i.isImportNamespaceSpecifier(r))break;this.print(t.shift(),e),t.length&&(this.token(","),this.space())}t.length&&(this.token("{"),this.space(),this.printList(t,e),this.space(),this.token("}")),this.space(),this.word("from"),this.space()}this.print(e.source,e),this.semicolon()},r.ImportNamespaceSpecifier=function(e){this.token("*"),this.space(),this.word("as"),this.space(),this.print(e.local,e)};var i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"))},{"babel-types":180}],82:[function(e,t,r){"use strict";function n(e){return u.isStatement(e.body)?n(e.body):e}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"label";return function(r){this.word(e);var n=r[t];if(n){this.space();var i=this.startTerminatorless();this.print(n,r),this.endTerminatorless(i)}this.semicolon()}}function s(){if(this.token(","),this.newline(),this.endsWith("\n"))for(var e=0;e<4;e++)this.space(!0)}function a(){if(this.token(","),this.newline(),this.endsWith("\n"))for(var e=0;e<6;e++)this.space(!0)}r.__esModule=!0,r.ThrowStatement=r.BreakStatement=r.ReturnStatement=r.ContinueStatement=r.ForAwaitStatement=r.ForOfStatement=r.ForInStatement=void 0;var o=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/get-iterator"));r.WithStatement=function(e){this.word("with"),this.space(),this.token("("),this.print(e.object,e),this.token(")"),this.printBlock(e)},r.IfStatement=function(e){this.word("if"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.space();var t=e.alternate&&u.isIfStatement(n(e.consequent));t&&(this.token("{"),this.newline(),this.indent()),this.printAndIndentOnComments(e.consequent,e),t&&(this.dedent(),this.newline(),this.token("}")),e.alternate&&(this.endsWith("}")&&this.space(),this.word("else"),this.space(),this.printAndIndentOnComments(e.alternate,e))},r.ForStatement=function(e){this.word("for"),this.space(),this.token("("),this.inForStatementInitCounter++,this.print(e.init,e),this.inForStatementInitCounter--,this.token(";"),e.test&&(this.space(),this.print(e.test,e)),this.token(";"),e.update&&(this.space(),this.print(e.update,e)),this.token(")"),this.printBlock(e)},r.WhileStatement=function(e){this.word("while"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.printBlock(e)},r.DoWhileStatement=function(e){this.word("do"),this.space(),this.print(e.body,e),this.space(),this.word("while"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.semicolon()},r.LabeledStatement=function(e){this.print(e.label,e),this.token(":"),this.space(),this.print(e.body,e)},r.TryStatement=function(e){this.word("try"),this.space(),this.print(e.block,e),this.space(),e.handlers?this.print(e.handlers[0],e):this.print(e.handler,e),e.finalizer&&(this.space(),this.word("finally"),this.space(),this.print(e.finalizer,e))},r.CatchClause=function(e){this.word("catch"),this.space(),this.token("("),this.print(e.param,e),this.token(")"),this.space(),this.print(e.body,e)},r.SwitchStatement=function(e){this.word("switch"),this.space(),this.token("("),this.print(e.discriminant,e),this.token(")"),this.space(),this.token("{"),this.printSequence(e.cases,e,{indent:!0,addNewlines:function(t,r){if(!t&&e.cases[e.cases.length-1]===r)return-1}}),this.token("}")},r.SwitchCase=function(e){e.test?(this.word("case"),this.space(),this.print(e.test,e),this.token(":")):(this.word("default"),this.token(":")),e.consequent.length&&(this.newline(),this.printSequence(e.consequent,e,{indent:!0}))},r.DebuggerStatement=function(){this.word("debugger"),this.semicolon()},r.VariableDeclaration=function(e,t){this.word(e.kind),this.space();var r=!1;if(!u.isFor(t)){var n=e.declarations,i=Array.isArray(n),l=0;for(n=i?n:(0,o.default)(n);;){var c;if(i){if(l>=n.length)break;c=n[l++]}else{if((l=n.next()).done)break;c=l.value}c.init&&(r=!0)}}var p=void 0;r&&(p="const"===e.kind?a:s),this.printList(e.declarations,e,{separator:p}),(!u.isFor(t)||t.left!==e&&t.init!==e)&&this.semicolon()},r.VariableDeclarator=function(e){this.print(e.id,e),this.print(e.id.typeAnnotation,e),e.init&&(this.space(),this.token("="),this.space(),this.print(e.init,e))};var u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),l=function(e){return function(t){this.word("for"),this.space(),"await"===e&&(this.word("await"),this.space()),this.token("("),this.print(t.left,t),this.space(),this.word("await"===e?"of":e),this.space(),this.print(t.right,t),this.token(")"),this.printBlock(t)}};r.ForInStatement=l("in"),r.ForOfStatement=l("of"),r.ForAwaitStatement=l("await"),r.ContinueStatement=i("continue"),r.ReturnStatement=i("return","argument"),r.BreakStatement=i("break"),r.ThrowStatement=i("throw","argument")},{"babel-runtime/core-js/get-iterator":120,"babel-types":180}],83:[function(e,t,r){"use strict";r.__esModule=!0,r.TaggedTemplateExpression=function(e){this.print(e.tag,e),this.print(e.quasi,e)},r.TemplateElement=function(e,t){var r=t.quasis[0]===e,n=t.quasis[t.quasis.length-1]===e,i=(r?"`":"}")+e.value.raw+(n?"`":"${");this.token(i)},r.TemplateLiteral=function(e){for(var t=e.quasis,r=0;r0&&this.space(),this.print(i,e),n1&&void 0!==arguments[1]?arguments[1]:{},a=arguments[2];(0,i.default)(this,t);var c=r.tokens||[],p=function(e,t,r){var n=" ";if(e&&"string"==typeof e){var i=(0,o.default)(e).indent;i&&" "!==i&&(n=i)}var s={auxiliaryCommentBefore:t.auxiliaryCommentBefore,auxiliaryCommentAfter:t.auxiliaryCommentAfter,shouldPrintComment:t.shouldPrintComment,retainLines:t.retainLines,retainFunctionParens:t.retainFunctionParens,comments:null==t.comments||t.comments,compact:t.compact,minified:t.minified,concise:t.concise,quotes:t.quotes||function(e,t){if(!e)return"double";for(var r={single:0,double:0},n=0,i=0;i=3)break}}return r.single>r.double?"single":"double"}(e,r),jsonCompatibleStrings:t.jsonCompatibleStrings,indent:{adjustMultilineComment:!0,style:n,base:0},flowCommaSeparator:t.flowCommaSeparator};return s.minified?(s.compact=!0,s.shouldPrintComment=s.shouldPrintComment||function(){return s.comments}):s.shouldPrintComment=s.shouldPrintComment||function(e){return s.comments||e.indexOf("@license")>=0||e.indexOf("@preserve")>=0},"auto"===s.compact&&(s.compact=e.length>5e5,s.compact&&console.error("[BABEL] "+l.get("codeGeneratorDeopt",t.filename,"500KB"))),s.compact&&(s.indent.adjustMultilineComment=!1),s}(a,n,c),h=n.sourceMaps?new u.default(n,a):null,f=(0,s.default)(this,e.call(this,p,h,c));return f.ast=r,f}return(0,a.default)(t,e),t.prototype.generate=function(){return e.prototype.generate.call(this,this.ast)},t}(n(e("./printer")).default);r.CodeGenerator=function(){function e(t,r,n){(0,i.default)(this,e),this._generator=new c(t,r,n)}return e.prototype.generate=function(){return this._generator.generate()},e}()},{"./printer":89,"./source-map":90,"babel-messages":110,"babel-runtime/helpers/classCallCheck":134,"babel-runtime/helpers/inherits":135,"babel-runtime/helpers/possibleConstructorReturn":137,"detect-indent":311}],86:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){function t(e,t){var n=r[e];r[e]=n?function(e,r,i){var s=n(e,r,i);return null==s?t(e,r,i):s}:t}var r={},n=(0,c.default)(e),i=Array.isArray(n),s=0;for(n=i?n:(0,l.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}var o=a,u=f.FLIPPED_ALIAS_KEYS[o];if(u){var p=u,h=Array.isArray(p),d=0;for(p=h?p:(0,l.default)(p);;){var m;if(h){if(d>=p.length)break;m=p[d++]}else{if((d=p.next()).done)break;m=d.value}t(m,e[o])}}else t(o,e[o])}return r}function a(e,t,r,n){var i=e[t.type];return i?i(t,r,n):null}function o(e){return!!f.isCallExpression(e)||!!f.isMemberExpression(e)&&(o(e.object)||!e.computed&&o(e.property))}function u(e,t,r){if(!e)return 0;f.isExpressionStatement(e)&&(e=e.expression);var n=a(m,e,t);if(!n){var i=a(y,e,t);if(i)for(var s=0;s1&&void 0!==arguments[1]?arguments[1]:{},r=t.considerArrow,n=void 0!==r&&r,i=t.considerDefaultExports,s=void 0!==i&&i,a=e.length-1,o=e[a],l=e[--a];a>0;){if(u.isExpressionStatement(l,{expression:o})||u.isTaggedTemplateExpression(l)||s&&u.isExportDefaultDeclaration(l,{declaration:o})||n&&u.isArrowFunctionExpression(l,{body:o}))return!0;if(!(u.isCallExpression(l,{callee:o})||u.isSequenceExpression(l)&&l.expressions[0]===o||u.isMemberExpression(l,{object:o})||u.isConditional(l,{test:o})||u.isBinary(l,{left:o})||u.isAssignmentExpression(l,{left:o})))return!1;o=l,l=e[--a]}return!1}r.__esModule=!0,r.AwaitExpression=r.FunctionTypeAnnotation=void 0,r.NullableTypeAnnotation=n,r.UpdateExpression=function(e,t){return u.isMemberExpression(t)&&t.object===e},r.ObjectExpression=function(e,t,r){return o(r,{considerArrow:!0})},r.DoExpression=function(e,t,r){return o(r)},r.Binary=function(e,t){if((u.isCallExpression(t)||u.isNewExpression(t))&&t.callee===e||u.isUnaryLike(t)||u.isMemberExpression(t)&&t.object===e||u.isAwaitExpression(t))return!0;if(u.isBinary(t)){var r=t.operator,n=l[r],i=e.operator,s=l[i];if(n===s&&t.right===e&&!u.isLogicalExpression(t)||n>s)return!0}return!1},r.BinaryExpression=function(e,t){return"in"===e.operator&&(u.isVariableDeclarator(t)||u.isFor(t))},r.SequenceExpression=function(e,t){return!(u.isForStatement(t)||u.isThrowStatement(t)||u.isReturnStatement(t)||u.isIfStatement(t)&&t.test===e||u.isWhileStatement(t)&&t.test===e||u.isForInStatement(t)&&t.right===e||u.isSwitchStatement(t)&&t.discriminant===e||u.isExpressionStatement(t)&&t.expression===e)},r.YieldExpression=i,r.ClassExpression=function(e,t,r){return o(r,{considerDefaultExports:!0})},r.UnaryLike=s,r.FunctionExpression=function(e,t,r){return o(r,{considerDefaultExports:!0})},r.ArrowFunctionExpression=function(e,t){return!!(u.isExportDeclaration(t)||u.isBinaryExpression(t)||u.isLogicalExpression(t)||u.isUnaryExpression(t)||u.isTaggedTemplateExpression(t))||s(e,t)},r.ConditionalExpression=a,r.AssignmentExpression=function(e){return!!u.isObjectPattern(e.left)||a.apply(void 0,arguments)};var u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),l={"||":0,"&&":1,"|":2,"^":3,"&":4,"==":5,"===":5,"!=":5,"!==":5,"<":6,">":6,"<=":6,">=":6,in:6,instanceof:6,">>":7,"<<":7,">>>":7,"+":8,"-":8,"*":9,"/":9,"%":9,"**":10};r.FunctionTypeAnnotation=n,r.AwaitExpression=i},{"babel-types":180}],88:[function(e,t,r){"use strict";function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o.isMemberExpression(e)?(n(e.object,t),e.computed&&n(e.property,t)):o.isBinary(e)||o.isAssignmentExpression(e)?(n(e.left,t),n(e.right,t)):o.isCallExpression(e)?(t.hasCall=!0,n(e.callee,t)):o.isFunction(e)?t.hasFunction=!0:o.isIdentifier(e)&&(t.hasHelper=t.hasHelper||i(e.callee)),t}function i(e){return o.isMemberExpression(e)?i(e.object)||i(e.property):o.isIdentifier(e)?"require"===e.name||"_"===e.name[0]:o.isCallExpression(e)?i(e.callee):!(!o.isBinary(e)&&!o.isAssignmentExpression(e))&&(o.isIdentifier(e.left)&&i(e.left)||i(e.right))}function s(e){return o.isLiteral(e)||o.isObjectExpression(e)||o.isArrayExpression(e)||o.isIdentifier(e)||o.isMemberExpression(e)}var a=function(e){return e&&e.__esModule?e:{default:e}}(e("lodash/map")),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));r.nodes={AssignmentExpression:function(e){var t=n(e.right);if(t.hasCall&&t.hasHelper||t.hasFunction)return{before:t.hasFunction,after:!0}},SwitchCase:function(e,t){return{before:e.consequent.length||t.cases[0]===e}},LogicalExpression:function(e){if(o.isFunction(e.left)||o.isFunction(e.right))return{after:!0}},Literal:function(e){if("use strict"===e.value)return{after:!0}},CallExpression:function(e){if(o.isFunction(e.callee)||i(e))return{before:!0,after:!0}},VariableDeclaration:function(e){for(var t=0;t0?new g.default(n):null}return e.prototype.generate=function(e){return this.print(e),this._maybeAddAuxComment(),this._buf.get()},e.prototype.indent=function(){this.format.compact||this.format.concise||this._indent++},e.prototype.dedent=function(){this.format.compact||this.format.concise||this._indent--},e.prototype.semicolon=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._maybeAddAuxComment(),this._append(";",!e)},e.prototype.rightBrace=function(){this.format.minified&&this._buf.removeLastSemicolon(),this.token("}")},e.prototype.space=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.format.compact||(this._buf.hasContent()&&!this.endsWith(" ")&&!this.endsWith("\n")||e)&&this._space()},e.prototype.word=function(e){this._endsWithWord&&this._space(),this._maybeAddAuxComment(),this._append(e),this._endsWithWord=!0},e.prototype.number=function(e){this.word(e),this._endsWithInteger=(0,f.default)(+e)&&!E.test(e)&&!v.test(e)&&!x.test(e)&&"."!==e[e.length-1]},e.prototype.token=function(e){("--"===e&&this.endsWith("!")||"+"===e[0]&&this.endsWith("+")||"-"===e[0]&&this.endsWith("-")||"."===e[0]&&this._endsWithInteger)&&this._space(),this._maybeAddAuxComment(),this._append(e)},e.prototype.newline=function(e){if(!this.format.retainLines&&!this.format.compact)if(this.format.concise)this.space();else if(!(this.endsWith("\n\n")||("number"!=typeof e&&(e=1),e=Math.min(2,e),(this.endsWith("{\n")||this.endsWith(":\n"))&&e--,e<=0)))for(var t=0;t1&&void 0!==arguments[1]&&arguments[1];this._maybeAddParen(e),this._maybeIndent(e),t?this._buf.queue(e):this._buf.append(e),this._endsWithWord=!1,this._endsWithInteger=!1},e.prototype._maybeIndent=function(e){this._indent&&this.endsWith("\n")&&"\n"!==e[0]&&this._buf.queue(this._getIndent())},e.prototype._maybeAddParen=function(e){var t=this._parenPushNewlineState;if(t){this._parenPushNewlineState=null;var r=void 0;for(r=0;r2&&void 0!==arguments[2]?arguments[2]:{};if(e&&e.length){r.indent&&this.indent();for(var n={addNewlines:r.addNewlines},i=0;i1&&void 0!==arguments[1])||arguments[1];e.innerComments&&(t&&this.indent(),this._printComments(e.innerComments),t&&this.dedent())},e.prototype.printSequence=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r.statement=!0,this.printJoin(e,t,r)},e.prototype.printList=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return null==r.separator&&(r.separator=s),this.printJoin(e,t,r)},e.prototype._printNewline=function(e,t,r,n){var i=this;if(!this.format.retainLines&&!this.format.compact)if(this.format.concise)this.space();else{var s=0;if(null!=t.start&&!t._ignoreUserWhitespace&&this._whitespace)if(e){var a=t.leadingComments,o=a&&(0,p.default)(a,function(e){return!!e.loc&&i.format.shouldPrintComment(e.value)});s=this._whitespace.getNewlinesBefore(o||t)}else{var u=t.trailingComments,l=u&&(0,h.default)(u,function(e){return!!e.loc&&i.format.shouldPrintComment(e.value)});s=this._whitespace.getNewlinesAfter(l||t)}else{e||s++,n.addNewlines&&(s+=n.addNewlines(e,t)||0);var c=y.needsWhitespaceAfter;e&&(c=y.needsWhitespaceBefore),c(t,r)&&s++,this._buf.hasContent()||(s=0)}this.newline(s)}},e.prototype._getComments=function(e,t){return t&&(e?t.leadingComments:t.trailingComments)||[]},e.prototype._printComment=function(e){var t=this;if(this.format.shouldPrintComment(e.value)&&!e.ignore&&!this._printedComments.has(e)){if(this._printedComments.add(e),null!=e.start){if(this._printedCommentStarts[e.start])return;this._printedCommentStarts[e.start]=!0}this.newline(this._whitespace?this._whitespace.getNewlinesBefore(e):0),this.endsWith("[")||this.endsWith("{")||this.space();var r="CommentLine"===e.type?"//"+e.value+"\n":"/*"+e.value+"*/";if("CommentBlock"===e.type&&this.format.indent.adjustMultilineComment){var n=e.loc&&e.loc.start.column;if(n){var i=new RegExp("\\n\\s{1,"+n+"}","g");r=r.replace(i,"\n")}var s=Math.max(this._getIndent().length,this._buf.getCurrentColumn());r=r.replace(/\n(?!$)/g,"\n"+(0,d.default)(" ",s))}this.withSource("start",e.loc,function(){t._append(r)}),this.newline((this._whitespace?this._whitespace.getNewlinesAfter(e):0)+("CommentLine"===e.type?-1:0))}},e.prototype._printComments=function(e){if(e&&e.length){var t=e,r=Array.isArray(t),n=0;for(t=r?t:(0,o.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i;this._printComment(s)}}},e}();r.default=A;for(var D=[e("./generators/template-literals"),e("./generators/expressions"),e("./generators/statements"),e("./generators/classes"),e("./generators/methods"),e("./generators/modules"),e("./generators/types"),e("./generators/flow"),e("./generators/base"),e("./generators/jsx")],S=0;S=0){for(;i&&e.start===n[i-1].start;)--i;t=n[i-1],r=n[i]}return this._getNewlinesBetween(t,r)},e.prototype.getNewlinesAfter=function(e){var t=void 0,r=void 0,n=this.tokens,i=this._findToken(function(t){return t.end-e.end},0,n.length);if(i>=0){for(;i&&e.end===n[i-1].end;)--i;t=n[i],","===(r=n[i+1]).type.label&&(r=n[i+2])}return r&&"eof"===r.type.label?1:this._getNewlinesBetween(t,r)},e.prototype._getNewlinesBetween=function(e,t){if(!t||!t.loc)return 0;for(var r=e?e.loc.end.line:1,n=t.loc.start.line,i=0,s=r;s=r)return-1;var n=t+r>>>1,i=e(this.tokens[n]);return i<0?this._findToken(e,n+1,r):i>0?this._findToken(e,t,n):0===i?n:-1},e}();r.default=i,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":134}],92:[function(e,t,r){arguments[4][62][0].apply(r,arguments)},{"./util":101,dup:62}],93:[function(e,t,r){arguments[4][63][0].apply(r,arguments)},{"./base64":94,dup:63}],94:[function(e,t,r){arguments[4][64][0].apply(r,arguments)},{dup:64}],95:[function(e,t,r){arguments[4][65][0].apply(r,arguments)},{dup:65}],96:[function(e,t,r){arguments[4][66][0].apply(r,arguments)},{"./util":101,dup:66}],97:[function(e,t,r){arguments[4][67][0].apply(r,arguments)},{dup:67}],98:[function(e,t,r){arguments[4][68][0].apply(r,arguments)},{"./array-set":92,"./base64-vlq":93,"./binary-search":95,"./quick-sort":97,"./util":101,dup:68}],99:[function(e,t,r){arguments[4][69][0].apply(r,arguments)},{"./array-set":92,"./base64-vlq":93,"./mapping-list":96,"./util":101,dup:69}],100:[function(e,t,r){arguments[4][70][0].apply(r,arguments)},{"./source-map-generator":99,"./util":101,dup:70}],101:[function(e,t,r){arguments[4][71][0].apply(r,arguments)},{dup:71}],102:[function(e,t,r){arguments[4][72][0].apply(r,arguments)},{"./lib/source-map-consumer":98,"./lib/source-map-generator":99,"./lib/source-node":100,dup:72}],103:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=u.objectExpression([]);return(0,s.default)(e).forEach(function(r){var n=e[r],i=u.objectExpression([]),a=u.objectProperty(n._key,i,n._computed);(0,s.default)(n).forEach(function(e){var t=n[e];if("_"!==e[0]){var r=t;(u.isClassMethod(t)||u.isClassProperty(t))&&(t=t.value);var s=u.objectProperty(u.identifier(e),t);u.inheritsComments(s,r),u.removeComments(r),i.properties.push(s)}}),t.properties.push(a)}),t}r.__esModule=!0;var s=n(e("babel-runtime/core-js/object/keys"));r.push=function(e,t,r,n,i){var s=u.toKeyAlias(t),l={};if((0,o.default)(e,s)&&(l=e[s]),e[s]=l,l._inherits=l._inherits||[],l._inherits.push(t),l._key=t.key,t.computed&&(l._computed=!0),t.decorators){var c=l.decorators=l.decorators||u.arrayExpression([]);c.elements=c.elements.concat(t.decorators.map(function(e){return e.expression}).reverse())}if(l.value||l.initializer)throw n.buildCodeFrameError(t,"Key conflict with sibling node");var p=void 0,h=void 0;(u.isObjectProperty(t)||u.isObjectMethod(t)||u.isClassMethod(t))&&(p=u.toComputedKey(t,t.key)),u.isObjectProperty(t)||u.isClassProperty(t)?h=t.value:(u.isObjectMethod(t)||u.isClassMethod(t))&&((h=u.functionExpression(null,t.params,t.body,t.generator,t.async)).returnType=t.returnType);var f=function(e){return!u.isClassMethod(e)&&!u.isObjectMethod(e)||"get"!==e.kind&&"set"!==e.kind?"value":e.kind}(t);return r&&"value"===f||(r=f),i&&u.isStringLiteral(p)&&("value"===r||"initializer"===r)&&u.isFunctionExpression(h)&&(h=(0,a.default)({id:p,node:h,scope:i})),h&&(u.inheritsComments(h,t),l[r]=h),l},r.hasComputed=function(e){for(var t in e)if(e[t]._computed)return!0;return!1},r.toComputedObjectFromClass=function(e){for(var t=u.arrayExpression([]),r=0;r1&&void 0!==arguments[1]&&arguments[1];(0,o.default)(this,e),this.forceSuperMemoisation=t.forceSuperMemoisation,this.methodPath=t.methodPath,this.methodNode=t.methodNode,this.superRef=t.superRef,this.isStatic=t.isStatic,this.hasSuper=!1,this.inClass=r,this.isLoose=t.isLoose,this.scope=this.methodPath.scope,this.file=t.file,this.opts=t,this.bareSupers=[],this.returns=[],this.thises=[]}return e.prototype.getObjectRef=function(){return this.opts.objectRef||this.opts.getObjectRef()},e.prototype.setSuperProperty=function(e,t,r){return p.callExpression(this.file.addHelper("set"),[a(this.getObjectRef(),this.isStatic),r?e:p.stringLiteral(e.name),t,p.thisExpression()])},e.prototype.getSuperProperty=function(e,t){return p.callExpression(this.file.addHelper("get"),[a(this.getObjectRef(),this.isStatic),t?e:p.stringLiteral(e.name),p.thisExpression()])},e.prototype.replace=function(){this.methodPath.traverse(f,this)},e.prototype.getLooseSuperProperty=function(e,t){var r=this.methodNode,n=this.superRef||p.identifier("Function");return t.property===e?void 0:p.isCallExpression(t,{callee:e})?void 0:p.isMemberExpression(t)&&!r.static?p.memberExpression(n,p.identifier("prototype")):n},e.prototype.looseHandle=function(e){var t=e.node;if(e.isSuper())return this.getLooseSuperProperty(t,e.parent);if(e.isCallExpression()){var r=t.callee;if(!p.isMemberExpression(r))return;if(!p.isSuper(r.object))return;return p.appendToMemberExpression(r,p.identifier("call")),t.arguments.unshift(p.thisExpression()),!0}},e.prototype.specHandleAssignmentExpression=function(e,t,r){return"="===r.operator?this.setSuperProperty(r.left.property,r.right,r.left.computed):(e=e||t.scope.generateUidIdentifier("ref"),[p.variableDeclaration("var",[p.variableDeclarator(e,r.left)]),p.expressionStatement(p.assignmentExpression("=",r.left,p.binaryExpression(r.operator[0],e,r.right)))])},e.prototype.specHandle=function(e){var t=void 0,r=void 0,n=void 0,i=e.parent,a=e.node;if(function(e,t){return!!p.isSuper(e)&&!p.isMemberExpression(t,{computed:!1})&&!p.isCallExpression(t,{callee:e})}(a,i))throw e.buildCodeFrameError(c.get("classesIllegalBareSuper"));if(p.isCallExpression(a)){var o=a.callee;if(p.isSuper(o))return;s(o)&&(t=o.property,r=o.computed,n=a.arguments)}else if(p.isMemberExpression(a)&&p.isSuper(a.object))t=a.property,r=a.computed;else{if(p.isUpdateExpression(a)&&s(a.argument)){var u=p.binaryExpression(a.operator[0],a.argument,p.numericLiteral(1));if(a.prefix)return this.specHandleAssignmentExpression(null,e,u);var l=e.scope.generateUidIdentifier("ref");return this.specHandleAssignmentExpression(l,e,u).concat(p.expressionStatement(l))}if(p.isAssignmentExpression(a)&&s(a.left))return this.specHandleAssignmentExpression(null,e,a)}if(t){var h=this.getSuperProperty(t,r);return n?this.optimiseCall(h,n):h}},e.prototype.optimiseCall=function(e,t){var r=p.thisExpression();return r[h]=!0,(0,l.default)(e,r,t)},e}();r.default=d,t.exports=r.default},{"babel-helper-optimise-call-expression":106,"babel-messages":110,"babel-runtime/core-js/symbol":129,"babel-runtime/helpers/classCallCheck":134,"babel-types":180}],108:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-template")),i={};r.default=i,i.typeof=(0,n.default)('\n (typeof Symbol === "function" && typeof Symbol.iterator === "symbol")\n ? function (obj) { return typeof obj; }\n : function (obj) {\n return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype\n ? "symbol"\n : typeof obj;\n };\n'),i.jsx=(0,n.default)('\n (function () {\n var REACT_ELEMENT_TYPE = (typeof Symbol === "function" && Symbol.for && Symbol.for("react.element")) || 0xeac7;\n\n return function createRawReactElement (type, props, key, children) {\n var defaultProps = type && type.defaultProps;\n var childrenLength = arguments.length - 3;\n\n if (!props && childrenLength !== 0) {\n // If we\'re going to assign props.children, we create a new object now\n // to avoid mutating defaultProps.\n props = {};\n }\n if (props && defaultProps) {\n for (var propName in defaultProps) {\n if (props[propName] === void 0) {\n props[propName] = defaultProps[propName];\n }\n }\n } else if (!props) {\n props = defaultProps || {};\n }\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 3];\n }\n props.children = childArray;\n }\n\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key === undefined ? null : \'\' + key,\n ref: null,\n props: props,\n _owner: null,\n };\n };\n\n })()\n'),i.asyncIterator=(0,n.default)('\n (function (iterable) {\n if (typeof Symbol === "function") {\n if (Symbol.asyncIterator) {\n var method = iterable[Symbol.asyncIterator];\n if (method != null) return method.call(iterable);\n }\n if (Symbol.iterator) {\n return iterable[Symbol.iterator]();\n }\n }\n throw new TypeError("Object is not async iterable");\n })\n'),i.asyncGenerator=(0,n.default)('\n (function () {\n function AwaitValue(value) {\n this.value = value;\n }\n\n function AsyncGenerator(gen) {\n var front, back;\n\n function send(key, arg) {\n return new Promise(function (resolve, reject) {\n var request = {\n key: key,\n arg: arg,\n resolve: resolve,\n reject: reject,\n next: null\n };\n\n if (back) {\n back = back.next = request;\n } else {\n front = back = request;\n resume(key, arg);\n }\n });\n }\n\n function resume(key, arg) {\n try {\n var result = gen[key](arg)\n var value = result.value;\n if (value instanceof AwaitValue) {\n Promise.resolve(value.value).then(\n function (arg) { resume("next", arg); },\n function (arg) { resume("throw", arg); });\n } else {\n settle(result.done ? "return" : "normal", result.value);\n }\n } catch (err) {\n settle("throw", err);\n }\n }\n\n function settle(type, value) {\n switch (type) {\n case "return":\n front.resolve({ value: value, done: true });\n break;\n case "throw":\n front.reject(value);\n break;\n default:\n front.resolve({ value: value, done: false });\n break;\n }\n\n front = front.next;\n if (front) {\n resume(front.key, front.arg);\n } else {\n back = null;\n }\n }\n\n this._invoke = send;\n\n // Hide "return" method if generator return is not supported\n if (typeof gen.return !== "function") {\n this.return = undefined;\n }\n }\n\n if (typeof Symbol === "function" && Symbol.asyncIterator) {\n AsyncGenerator.prototype[Symbol.asyncIterator] = function () { return this; };\n }\n\n AsyncGenerator.prototype.next = function (arg) { return this._invoke("next", arg); };\n AsyncGenerator.prototype.throw = function (arg) { return this._invoke("throw", arg); };\n AsyncGenerator.prototype.return = function (arg) { return this._invoke("return", arg); };\n\n return {\n wrap: function (fn) {\n return function () {\n return new AsyncGenerator(fn.apply(this, arguments));\n };\n },\n await: function (value) {\n return new AwaitValue(value);\n }\n };\n\n })()\n'),i.asyncGeneratorDelegate=(0,n.default)('\n (function (inner, awaitWrap) {\n var iter = {}, waiting = false;\n\n function pump(key, value) {\n waiting = true;\n value = new Promise(function (resolve) { resolve(inner[key](value)); });\n return { done: false, value: awaitWrap(value) };\n };\n\n if (typeof Symbol === "function" && Symbol.iterator) {\n iter[Symbol.iterator] = function () { return this; };\n }\n\n iter.next = function (value) {\n if (waiting) {\n waiting = false;\n return value;\n }\n return pump("next", value);\n };\n\n if (typeof inner.throw === "function") {\n iter.throw = function (value) {\n if (waiting) {\n waiting = false;\n throw value;\n }\n return pump("throw", value);\n };\n }\n\n if (typeof inner.return === "function") {\n iter.return = function (value) {\n return pump("return", value);\n };\n }\n\n return iter;\n })\n'),i.asyncToGenerator=(0,n.default)('\n (function (fn) {\n return function () {\n var gen = fn.apply(this, arguments);\n return new Promise(function (resolve, reject) {\n function step(key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n return Promise.resolve(value).then(function (value) {\n step("next", value);\n }, function (err) {\n step("throw", err);\n });\n }\n }\n\n return step("next");\n });\n };\n })\n'),i.classCallCheck=(0,n.default)('\n (function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError("Cannot call a class as a function");\n }\n });\n'),i.createClass=(0,n.default)('\n (function() {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i ++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ("value" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n })()\n'),i.defineEnumerableProperties=(0,n.default)('\n (function (obj, descs) {\n for (var key in descs) {\n var desc = descs[key];\n desc.configurable = desc.enumerable = true;\n if ("value" in desc) desc.writable = true;\n Object.defineProperty(obj, key, desc);\n }\n return obj;\n })\n'),i.defaults=(0,n.default)("\n (function (obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }\n return obj;\n })\n"),i.defineProperty=(0,n.default)("\n (function (obj, key, value) {\n // Shortcircuit the slow defineProperty path when possible.\n // We are trying to avoid issues where setters defined on the\n // prototype cause side effects under the fast path of simple\n // assignment. By checking for existence of the property with\n // the in operator, we can optimize most of this overhead away.\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n });\n"),i.extends=(0,n.default)("\n Object.assign || (function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n })\n"),i.get=(0,n.default)('\n (function get(object, property, receiver) {\n if (object === null) object = Function.prototype;\n\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent === null) {\n return undefined;\n } else {\n return get(parent, property, receiver);\n }\n } else if ("value" in desc) {\n return desc.value;\n } else {\n var getter = desc.get;\n\n if (getter === undefined) {\n return undefined;\n }\n\n return getter.call(receiver);\n }\n });\n'),i.inherits=(0,n.default)('\n (function (subClass, superClass) {\n if (typeof superClass !== "function" && superClass !== null) {\n throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n })\n'),i.instanceof=(0,n.default)('\n (function (left, right) {\n if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {\n return right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n });\n'),i.interopRequireDefault=(0,n.default)("\n (function (obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n })\n"),i.interopRequireWildcard=(0,n.default)("\n (function (obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n newObj.default = obj;\n return newObj;\n }\n })\n"),i.newArrowCheck=(0,n.default)('\n (function (innerThis, boundThis) {\n if (innerThis !== boundThis) {\n throw new TypeError("Cannot instantiate an arrow function");\n }\n });\n'),i.objectDestructuringEmpty=(0,n.default)('\n (function (obj) {\n if (obj == null) throw new TypeError("Cannot destructure undefined");\n });\n'),i.objectWithoutProperties=(0,n.default)("\n (function (obj, keys) {\n var target = {};\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n return target;\n })\n"),i.possibleConstructorReturn=(0,n.default)('\n (function (self, call) {\n if (!self) {\n throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");\n }\n return call && (typeof call === "object" || typeof call === "function") ? call : self;\n });\n'),i.selfGlobal=(0,n.default)('\n typeof global === "undefined" ? self : global\n'),i.set=(0,n.default)('\n (function set(object, property, value, receiver) {\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent !== null) {\n set(parent, property, value, receiver);\n }\n } else if ("value" in desc && desc.writable) {\n desc.value = value;\n } else {\n var setter = desc.set;\n\n if (setter !== undefined) {\n setter.call(receiver, value);\n }\n }\n\n return value;\n });\n'),i.slicedToArray=(0,n.default)('\n (function () {\n // Broken out into a separate function to avoid deoptimizations due to the try/catch for the\n // array iterator case.\n function sliceIterator(arr, i) {\n // this is an expanded form of `for...of` that properly supports abrupt completions of\n // iterators etc. variable names have been minimised to reduce the size of this massive\n // helper. sometimes spec compliancy is annoying :(\n //\n // _n = _iteratorNormalCompletion\n // _d = _didIteratorError\n // _e = _iteratorError\n // _i = _iterator\n // _s = _step\n\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i["return"]) _i["return"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError("Invalid attempt to destructure non-iterable instance");\n }\n };\n })();\n'),i.slicedToArrayLoose=(0,n.default)('\n (function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n var _arr = [];\n for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {\n _arr.push(_step.value);\n if (i && _arr.length === i) break;\n }\n return _arr;\n } else {\n throw new TypeError("Invalid attempt to destructure non-iterable instance");\n }\n });\n'),i.taggedTemplateLiteral=(0,n.default)("\n (function (strings, raw) {\n return Object.freeze(Object.defineProperties(strings, {\n raw: { value: Object.freeze(raw) }\n }));\n });\n"),i.taggedTemplateLiteralLoose=(0,n.default)("\n (function (strings, raw) {\n strings.raw = raw;\n return strings;\n });\n"),i.temporalRef=(0,n.default)('\n (function (val, name, undef) {\n if (val === undef) {\n throw new ReferenceError(name + " is not defined - temporal dead zone");\n } else {\n return val;\n }\n })\n'),i.temporalUndefined=(0,n.default)("\n ({})\n"),i.toArray=(0,n.default)("\n (function (arr) {\n return Array.isArray(arr) ? arr : Array.from(arr);\n });\n"),i.toConsumableArray=(0,n.default)("\n (function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n return arr2;\n } else {\n return Array.from(arr);\n }\n });\n"),t.exports=r.default},{"babel-template":139}],109:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=a.default[e];if(!t)throw new ReferenceError("Unknown helper "+e);return t().expression}r.__esModule=!0,r.list=void 0;var s=n(e("babel-runtime/core-js/object/keys"));r.get=i;var a=n(e("./helpers"));r.list=(0,s.default)(a.default).map(function(e){return e.replace(/^_/,"")}).filter(function(e){return"__esModule"!==e});r.default=i},{"./helpers":108,"babel-runtime/core-js/object/keys":127}],110:[function(e,t,r){"use strict";function n(e){return e.map(function(e){if(null!=e&&e.inspect)return e.inspect();try{return(0,i.default)(e)||e+""}catch(t){return s.inspect(e)}})}r.__esModule=!0,r.MESSAGES=void 0;var i=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/json/stringify"));r.get=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),s=1;s4&&void 0!==arguments[4]&&arguments[4];if(t||(t=e.node),!h.isFor(r))for(var s=0;s0&&e.traverse(g,t),e.skip()}},p.visitor]),g=c.default.visitors.merge([{ReferencedIdentifier:function(e,t){var r=t.letReferences[e.node.name];if(r){var n=e.scope.getBindingIdentifier(e.node.name);n&&n!==r||(t.closurify=!0)}}},p.visitor]),b={enter:function(e,t){var r=e.node;e.parent;if(e.isForStatement()){if(a(r.init)){var n=t.pushDeclar(r.init);1===n.length?r.init=n[0]:r.init=h.sequenceExpression(n)}}else if(e.isFor())a(r.left)&&(t.pushDeclar(r.left),r.left=r.left.declarations[0].id);else if(a(r))e.replaceWithMultiple(t.pushDeclar(r).map(function(e){return h.expressionStatement(e)}));else if(e.isFunction())return e.skip()}},v={LabeledStatement:function(e,t){var r=e.node;t.innerLabels.push(r.label.name)}},x={enter:function(e,t){if(e.isAssignmentExpression()||e.isUpdateExpression()){var r=e.getBindingIdentifiers();for(var n in r)t.outsideReferences[n]===e.scope.getBindingIdentifier(n)&&(t.reassignments[n]=!0)}}},E={Loop:function(e,t){var r=t.ignoreLabeless;t.ignoreLabeless=!0,e.traverse(E,t),t.ignoreLabeless=r,e.skip()},Function:function(e){e.skip()},SwitchCase:function(e,t){var r=t.inSwitchCase;t.inSwitchCase=!0,e.traverse(E,t),t.inSwitchCase=r,e.skip()},"BreakStatement|ContinueStatement|ReturnStatement":function(e,t){var r=e.node,n=e.parent,i=e.scope;if(!r[this.LOOP_IGNORE]){var s=void 0,a=function(e){return h.isBreakStatement(e)?"break":h.isContinueStatement(e)?"continue":void 0}(r);if(a){if(r.label){if(t.innerLabels.indexOf(r.label.name)>=0)return;a=a+"|"+r.label.name}else{if(t.ignoreLabeless)return;if(t.inSwitchCase)return;if(h.isBreakStatement(r)&&h.isSwitchCase(n))return}t.hasBreakContinue=!0,t.map[a]=r,s=h.stringLiteral(a)}e.isReturnStatement()&&(t.hasReturn=!0,s=h.objectExpression([h.objectProperty(h.identifier("v"),r.argument||i.buildUndefinedNode())])),s&&((s=h.returnStatement(s))[this.LOOP_IGNORE]=!0,e.skip(),e.replaceWith(h.inherits(s,r)))}}},A=function(){function e(t,r,n,i,s){(0,l.default)(this,e),this.parent=n,this.scope=i,this.file=s,this.blockPath=r,this.block=r.node,this.outsideLetReferences=(0,u.default)(null),this.hasLetReferences=!1,this.letReferences=(0,u.default)(null),this.body=[],t&&(this.loopParent=t.parent,this.loopLabel=h.isLabeledStatement(this.loopParent)&&this.loopParent.label,this.loopPath=t,this.loop=t.node)}return e.prototype.run=function(){var e=this.block;if(!e._letDone){e._letDone=!0;var t=this.getLetReferences();if(h.isFunction(this.parent)||h.isProgram(this.block))this.updateScopeInfo();else if(this.hasLetReferences)return t?this.wrapClosure():this.remap(),this.updateScopeInfo(t),this.loopLabel&&!h.isLabeledStatement(this.loopParent)?h.labeledStatement(this.loopLabel,this.loop):void 0}},e.prototype.updateScopeInfo=function(e){var t=this.scope,r=t.getFunctionParent(),n=this.letReferences;for(var i in n){var s=n[i],a=t.getBinding(s.name);a&&("let"!==a.kind&&"const"!==a.kind||(a.kind="var",e?t.removeBinding(s.name):t.moveBindingTo(s.name,r)))}},e.prototype.remap=function(){var e=this.letReferences,t=this.scope;for(var r in e){var n=e[r];(t.parentHasBinding(r)||t.hasGlobal(r))&&(t.hasOwnBinding(r)&&t.rename(n.name),this.blockPath.scope.hasOwnBinding(r)&&this.blockPath.scope.rename(n.name))}},e.prototype.wrapClosure=function(){if(this.file.opts.throwIfClosureRequired)throw this.blockPath.buildCodeFrameError("Compiling let/const in this block would add a closure (throwIfClosureRequired).");var e=this.block,t=this.outsideLetReferences;if(this.loop)for(var r in t){var n=t[r];(this.scope.hasGlobal(n.name)||this.scope.parentHasBinding(n.name))&&(delete t[n.name],delete this.letReferences[n.name],this.scope.rename(n.name),this.letReferences[n.name]=n,t[n.name]=n)}this.has=this.checkLoop(),this.hoistVarDeclarations();var i=(0,f.default)(t),s=(0,f.default)(t),a=this.blockPath.isSwitchStatement(),o=h.functionExpression(null,i,h.blockStatement(a?[e]:e.body));o.shadow=!0,this.addContinuations(o);var u=o;this.loop&&(u=this.scope.generateUidIdentifier("loop"),this.loopPath.insertBefore(h.variableDeclaration("var",[h.variableDeclarator(u,o)])));var l=h.callExpression(u,s),p=this.scope.generateUidIdentifier("ret");c.default.hasType(o.body,this.scope,"YieldExpression",h.FUNCTION_TYPES)&&(o.generator=!0,l=h.yieldExpression(l,!0));c.default.hasType(o.body,this.scope,"AwaitExpression",h.FUNCTION_TYPES)&&(o.async=!0,l=h.awaitExpression(l)),this.buildClosure(p,l),a?this.blockPath.replaceWithMultiple(this.body):e.body=this.body},e.prototype.buildClosure=function(e,t){var r=this.has;r.hasReturn||r.hasBreakContinue?this.buildHas(e,t):this.body.push(h.expressionStatement(t))},e.prototype.addContinuations=function(e){var t={reassignments:{},outsideReferences:this.outsideLetReferences};this.scope.traverse(e,x,t);for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:"value",n=arguments[3],i=void 0;e.static?(this.hasStaticDescriptors=!0,i=this.staticMutatorMap):(this.hasInstanceDescriptors=!0,i=this.instanceMutatorMap);var s=c.push(i,e,r,this.file,n);return t&&(s.enumerable=h.booleanLiteral(!0)),s},e.prototype.constructorMeMaybe=function(){var e=!1,t=this.path.get("body.body"),r=Array.isArray(t),n=0;for(t=r?t:(0,s.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}if(e=i.equals("kind","constructor"))break}if(!e){var a=void 0,o=void 0;if(this.isDerived){var u=f().expression;a=u.params,o=u.body}else a=[],o=h.blockStatement([]);this.path.get("body").unshiftContainer("body",h.classMethod("constructor",h.identifier("constructor"),a,o))}},e.prototype.buildBody=function(){if(this.constructorMeMaybe(),this.pushBody(),this.verifyConstructor(),this.userConstructor){var e=this.constructorBody;e.body=e.body.concat(this.userConstructor.body.body),h.inherits(this.constructor,this.userConstructor),h.inherits(e,this.userConstructor.body)}this.pushDescriptors()},e.prototype.pushBody=function(){var e=this.path.get("body.body"),t=Array.isArray(e),r=0;for(e=t?e:(0,s.default)(e);;){var n;if(t){if(r>=e.length)break;n=e[r++]}else{if((r=e.next()).done)break;n=r.value}var i=n,a=i.node;if(i.isClassProperty())throw i.buildCodeFrameError("Missing class properties transform.");if(a.decorators)throw i.buildCodeFrameError("Method has decorators, put the decorator plugin before the classes one.");if(h.isClassMethod(a)){var o="constructor"===a.kind;if(o&&(i.traverse(m,this),!this.hasBareSuper&&this.isDerived))throw i.buildCodeFrameError("missing super() call in constructor");var l=new u.default({forceSuperMemoisation:o,methodPath:i,methodNode:a,objectRef:this.classRef,superRef:this.superName,isStatic:a.static,isLoose:this.isLoose,scope:this.scope,file:this.file},!0);l.replace(),o?this.pushConstructor(l,a,i):this.pushMethod(a,i)}}},e.prototype.clearDescriptors=function(){this.hasInstanceDescriptors=!1,this.hasStaticDescriptors=!1,this.instanceMutatorMap={},this.staticMutatorMap={}},e.prototype.pushDescriptors=function(){this.pushInherits();var e=this.body,t=void 0,r=void 0;if(this.hasInstanceDescriptors&&(t=c.toClassObject(this.instanceMutatorMap)),this.hasStaticDescriptors&&(r=c.toClassObject(this.staticMutatorMap)),t||r){t&&(t=c.toComputedObjectFromClass(t)),r&&(r=c.toComputedObjectFromClass(r));var n=h.nullLiteral(),i=[this.classRef,n,n,n,n];t&&(i[1]=t),r&&(i[2]=r),this.instanceInitializersId&&(i[3]=this.instanceInitializersId,e.unshift(this.buildObjectAssignment(this.instanceInitializersId))),this.staticInitializersId&&(i[4]=this.staticInitializersId,e.unshift(this.buildObjectAssignment(this.staticInitializersId)));for(var s=0,a=0;a=o.length)break;c=o[l++]}else{if((l=o.next()).done)break;c=l.value}var p=c;this.wrapSuperCall(p,i,a,r),n&&p.find(function(e){return e===t||(e.isLoop()||e.isConditional()?(n=!1,!0):void 0)})}var f=this.superThises,d=Array.isArray(f),m=0;for(f=d?f:(0,s.default)(f);;){var g;if(d){if(m>=f.length)break;g=f[m++]}else{if((m=f.next()).done)break;g=m.value}g.replaceWith(a)}var b=function(t){return h.callExpression(e.file.addHelper("possibleConstructorReturn"),[a].concat(t||[]))},v=r.get("body");v.length&&!v.pop().isReturnStatement()&&r.pushContainer("body",h.returnStatement(n?a:b()));var x=this.superReturns,E=Array.isArray(x),A=0;for(x=E?x:(0,s.default)(x);;){var D;if(E){if(A>=x.length)break;D=x[A++]}else{if((A=x.next()).done)break;D=A.value}var S=D;if(S.node.argument){var C=S.scope.generateDeclaredUidIdentifier("ret");S.get("argument").replaceWithMultiple([h.assignmentExpression("=",C,S.node.argument),b(C)])}else S.get("argument").replaceWith(b())}}},e.prototype.pushMethod=function(e,t){var r=t?t.scope:this.scope;"method"===e.kind&&this._processMethod(e,r)||this.pushToMap(e,!1,null,r)},e.prototype._processMethod=function(){return!1},e.prototype.pushConstructor=function(e,t,r){this.bareSupers=e.bareSupers,this.superReturns=e.returns,r.scope.hasOwnBinding(this.classRef.name)&&r.scope.rename(this.classRef.name);var n=this.constructor;this.userConstructorPath=r,this.userConstructor=t,this.hasConstructor=!0,h.inheritsComments(n,t),n._ignoreUserWhitespace=!0,n.params=t.params,h.inherits(n.body,t.body),n.body.directives=t.body.directives,this._pushConstructor()},e.prototype._pushConstructor=function(){this.pushedConstructor||(this.pushedConstructor=!0,(this.hasInstanceDescriptors||this.hasStaticDescriptors)&&this.pushDescriptors(),this.body.push(this.constructor),this.pushInherits())},e.prototype.pushInherits=function(){this.isDerived&&!this.pushedInherits&&(this.pushedInherits=!0,this.body.unshift(h.expressionStatement(h.callExpression(this.file.addHelper("inherits"),[this.classRef,this.superName]))))},e}();r.default=g,t.exports=r.default},{"babel-helper-define-map":103,"babel-helper-optimise-call-expression":106,"babel-helper-replace-supers":107,"babel-runtime/core-js/get-iterator":120,"babel-runtime/helpers/classCallCheck":134,"babel-template":139,"babel-traverse":143,"babel-types":180}],119:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){function t(e){var t=e.node,r=e.scope,n=[],i=t.right;if(!a.isIdentifier(i)||!r.hasBinding(i.name)){var s=r.generateUidIdentifier("arr");n.push(a.variableDeclaration("var",[a.variableDeclarator(s,i)])),i=s}var u=r.generateUidIdentifier("i"),l=o({BODY:t.body,KEY:u,ARR:i});a.inherits(l,t),a.ensureBlock(l);var c=a.memberExpression(i,u,!0),p=t.left;return a.isVariableDeclaration(p)?(p.declarations[0].init=c,l.body.body.unshift(p)):l.body.body.unshift(a.expressionStatement(a.assignmentExpression("=",p,c))),e.parentPath.isLabeledStatement()&&(l=a.labeledStatement(e.parentPath.node.label,l)),n.push(l),n}function r(e,t){var r=e.node,n=e.scope,s=e.parent,o=r.left,l=void 0,c=void 0;if(a.isIdentifier(o)||a.isPattern(o)||a.isMemberExpression(o))c=o;else{if(!a.isVariableDeclaration(o))throw t.buildCodeFrameError(o,i.get("unknownForHead",o.type));c=n.generateUidIdentifier("ref"),l=a.variableDeclaration(o.kind,[a.variableDeclarator(o.declarations[0].id,c)])}var p=n.generateUidIdentifier("iterator"),h=n.generateUidIdentifier("isArray"),f=u({LOOP_OBJECT:p,IS_ARRAY:h,OBJECT:r.right,INDEX:n.generateUidIdentifier("i"),ID:c});l||f.body.body.shift();var d=a.isLabeledStatement(s),m=void 0;return d&&(m=a.labeledStatement(s.label,f)),{replaceParent:d,declar:l,node:m||f,loop:f}}function n(e,t){var r=e.node,n=e.scope,s=e.parent,o=r.left,u=void 0,c=n.generateUidIdentifier("step"),p=a.memberExpression(c,a.identifier("value"));if(a.isIdentifier(o)||a.isPattern(o)||a.isMemberExpression(o))u=a.expressionStatement(a.assignmentExpression("=",o,p));else{if(!a.isVariableDeclaration(o))throw t.buildCodeFrameError(o,i.get("unknownForHead",o.type));u=a.variableDeclaration(o.kind,[a.variableDeclarator(o.declarations[0].id,p)])}var h=n.generateUidIdentifier("iterator"),f=l({ITERATOR_HAD_ERROR_KEY:n.generateUidIdentifier("didIteratorError"),ITERATOR_COMPLETION:n.generateUidIdentifier("iteratorNormalCompletion"),ITERATOR_ERROR_KEY:n.generateUidIdentifier("iteratorError"),ITERATOR_KEY:h,STEP_KEY:c,OBJECT:r.right,BODY:null}),d=a.isLabeledStatement(s),m=f[3].block.body,y=m[0];return d&&(m[0]=a.labeledStatement(s.label,y)),{replaceParent:d,declar:u,loop:y,node:f}}var i=e.messages,s=e.template,a=e.types,o=s("\n for (var KEY = 0; KEY < ARR.length; KEY++) BODY;\n "),u=s("\n for (var LOOP_OBJECT = OBJECT,\n IS_ARRAY = Array.isArray(LOOP_OBJECT),\n INDEX = 0,\n LOOP_OBJECT = IS_ARRAY ? LOOP_OBJECT : LOOP_OBJECT[Symbol.iterator]();;) {\n var ID;\n if (IS_ARRAY) {\n if (INDEX >= LOOP_OBJECT.length) break;\n ID = LOOP_OBJECT[INDEX++];\n } else {\n INDEX = LOOP_OBJECT.next();\n if (INDEX.done) break;\n ID = INDEX.value;\n }\n }\n "),l=s("\n var ITERATOR_COMPLETION = true;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY = undefined;\n try {\n for (var ITERATOR_KEY = OBJECT[Symbol.iterator](), STEP_KEY; !(ITERATOR_COMPLETION = (STEP_KEY = ITERATOR_KEY.next()).done); ITERATOR_COMPLETION = true) {\n }\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (!ITERATOR_COMPLETION && ITERATOR_KEY.return) {\n ITERATOR_KEY.return();\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n ");return{visitor:{ForOfStatement:function(e,i){if(e.get("right").isArrayExpression())return e.parentPath.isLabeledStatement()?e.parentPath.replaceWithMultiple(t(e)):e.replaceWithMultiple(t(e));var s=n;i.opts.loose&&(s=r);var o=e.node,u=s(e,i),l=u.declar,c=u.loop,p=c.body;e.ensureBlock(),l&&p.body.push(l),p.body=p.body.concat(o.body.body),a.inherits(c,o),a.inherits(c.body,o.body),u.replaceParent?(e.parentPath.replaceWithMultiple(u.node),e.remove()):e.replaceWithMultiple(u.node)}}}},t.exports=r.default},{}],120:[function(e,t,r){t.exports={default:e("core-js/library/fn/get-iterator"),__esModule:!0}},{"core-js/library/fn/get-iterator":196}],121:[function(e,t,r){t.exports={default:e("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":197}],122:[function(e,t,r){t.exports={default:e("core-js/library/fn/map"),__esModule:!0}},{"core-js/library/fn/map":198}],123:[function(e,t,r){t.exports={default:e("core-js/library/fn/number/max-safe-integer"),__esModule:!0}},{"core-js/library/fn/number/max-safe-integer":199}],124:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":200}],125:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":201}],126:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/get-own-property-symbols"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-symbols":202}],127:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":203}],128:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/set-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/set-prototype-of":204}],129:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":206}],130:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol/for"),__esModule:!0}},{"core-js/library/fn/symbol/for":205}],131:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":207}],132:[function(e,t,r){t.exports={default:e("core-js/library/fn/weak-map"),__esModule:!0}},{"core-js/library/fn/weak-map":208}],133:[function(e,t,r){t.exports={default:e("core-js/library/fn/weak-set"),__esModule:!0}},{"core-js/library/fn/weak-set":209}],134:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},{}],135:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("../core-js/object/set-prototype-of")),s=n(e("../core-js/object/create")),a=n(e("../helpers/typeof"));r.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,a.default)(t)));e.prototype=(0,s.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.default?(0,i.default)(e,t):e.__proto__=t)}},{"../core-js/object/create":125,"../core-js/object/set-prototype-of":128,"../helpers/typeof":138}],136:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}},{}],137:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("../helpers/typeof"));r.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,n.default)(t))&&"function"!=typeof t?e:t}},{"../helpers/typeof":138}],138:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("../core-js/symbol/iterator")),s=n(e("../core-js/symbol")),a="function"==typeof s.default&&"symbol"==typeof i.default?function(e){return typeof e}:function(e){return e&&"function"==typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":typeof e};r.default="function"==typeof s.default&&"symbol"===a(i.default)?function(e){return void 0===e?"undefined":a(e)}:function(e){return e&&"function"==typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":void 0===e?"undefined":a(e)}},{"../core-js/symbol":129,"../core-js/symbol/iterator":131}],139:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var s=i(e("babel-runtime/core-js/symbol"));r.default=function(e,t){var r=void 0;try{throw new Error}catch(e){e.stack&&(r=e.stack.split("\n").slice(1).join("\n"))}t=(0,o.default)({allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,preserveComments:!1},t);var n=function(){var i=void 0;try{i=c.parse(e,t),i=l.default.removeProperties(i,{preserveComments:t.preserveComments}),l.default.cheap(i,function(e){e[h]=!0})}catch(e){throw e.stack=e.stack+"from\n"+r,e}return n=function(){return i},i};return function(){for(var e=arguments.length,t=Array(e),r=0;r1?r.body:r.body[0]}(n(),t)}};var a=i(e("lodash/cloneDeep")),o=i(e("lodash/assign")),u=i(e("lodash/has")),l=i(e("babel-traverse")),c=n(e("babylon")),p=n(e("babel-types")),h="_fromTemplate",f=(0,s.default)(),d={noScope:!0,enter:function(e,t){var r=e.node;if(r[f])return e.skip();p.isExpressionStatement(r)&&(r=r.expression);var n=void 0;if(p.isIdentifier(r)&&r[h])if((0,u.default)(t[0],r.name))n=t[0][r.name];else if("$"===r.name[0]){var i=+r.name.slice(1);t[i]&&(n=t[i])}null===n&&e.remove(),n&&(n[f]=!0,e.replaceInline(n))},exit:function(e){var t=e.node;t.loc||l.default.clearNode(t)}};t.exports=r.default},{"babel-runtime/core-js/symbol":129,"babel-traverse":143,"babel-types":180,babylon:188,"lodash/assign":488,"lodash/cloneDeep":492,"lodash/has":504}],140:[function(e,t,r){"use strict";function n(){r.path=new s.default}function i(){r.scope=new s.default}r.__esModule=!0,r.scope=r.path=void 0;var s=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/weak-map"));r.clear=function(){n(),i()},r.clearPath=n,r.clearScope=i;r.path=new s.default,r.scope=new s.default},{"babel-runtime/core-js/weak-map":132}],141:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var s=i(e("babel-runtime/core-js/get-iterator")),a=i(e("babel-runtime/helpers/classCallCheck")),o=i(e("./path")),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),l="test"===n.env.NODE_ENV,c=function(){function e(t,r,n,i){(0,a.default)(this,e),this.queue=null,this.parentPath=i,this.scope=t,this.state=n,this.opts=r}return e.prototype.shouldVisit=function(e){var t=this.opts;if(t.enter||t.exit)return!0;if(t[e.type])return!0;var r=u.VISITOR_KEYS[e.type];if(!r||!r.length)return!1;var n=r,i=Array.isArray(n),a=0;for(n=i?n:(0,s.default)(n);;){var o;if(i){if(a>=n.length)break;o=n[a++]}else{if((a=n.next()).done)break;o=a.value}if(e[o])return!0}return!1},e.prototype.create=function(e,t,r,n){return o.default.get({parentPath:this.parentPath,parent:e,container:t,key:r,listKey:n})},e.prototype.maybeQueue=function(e,t){if(this.trap)throw new Error("Infinite cycle detected");this.queue&&(t?this.queue.push(e):this.priorityQueue.push(e))},e.prototype.visitMultiple=function(e,t,r){if(0===e.length)return!1;for(var n=[],i=0;i=n.length)break;o=n[a++]}else{if((a=n.next()).done)break;o=a.value}var u=o;if(u.resync(),0!==u.contexts.length&&u.contexts[u.contexts.length-1]===this||u.pushContext(this),null!==u.key&&(l&&e.length>=1e4&&(this.trap=!0),!(t.indexOf(u.node)>=0))){if(t.push(u.node),u.visit()){r=!0;break}if(this.priorityQueue.length&&(r=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=e,r))break}}var c=e,p=Array.isArray(c),h=0;for(c=p?c:(0,s.default)(c);;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if((h=c.next()).done)break;f=h.value}f.popContext()}return this.queue=null,r},e.prototype.visit=function(e,t){var r=e[t];return!!r&&(Array.isArray(r)?this.visitMultiple(r,e,t):this.visitSingle(e,t))},e}();r.default=c,t.exports=r.default}).call(this,e("_process"))},{"./path":150,_process:550,"babel-runtime/core-js/get-iterator":120,"babel-runtime/helpers/classCallCheck":134,"babel-types":180}],142:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/helpers/classCallCheck"));r.default=function e(t,r){(0,n.default)(this,e),this.file=t,this.options=r},t.exports=r.default},{"babel-runtime/helpers/classCallCheck":134}],143:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r,n,i){if(e){if(t||(t={}),!t.noScope&&!r&&"Program"!==e.type&&"File"!==e.type)throw new Error(f.get("traverseNeedsParent",e.type));h.explode(t),s.node(e,t,r,n,i)}}function a(e,t){e.node.type===t.type&&(t.has=!0,e.stop())}r.__esModule=!0,r.visitors=r.Hub=r.Scope=r.NodePath=void 0;var o=i(e("babel-runtime/core-js/get-iterator")),u=e("./path");Object.defineProperty(r,"NodePath",{enumerable:!0,get:function(){return i(u).default}});var l=e("./scope");Object.defineProperty(r,"Scope",{enumerable:!0,get:function(){return i(l).default}});var c=e("./hub");Object.defineProperty(r,"Hub",{enumerable:!0,get:function(){return i(c).default}}),r.default=s;var p=i(e("./context")),h=n(e("./visitors")),f=n(e("babel-messages")),d=i(e("lodash/includes")),m=n(e("babel-types")),y=n(e("./cache"));r.visitors=h,s.visitors=h,s.verify=h.verify,s.explode=h.explode,s.NodePath=e("./path"),s.Scope=e("./scope"),s.Hub=e("./hub"),s.cheap=function(e,t){return m.traverseFast(e,t)},s.node=function(e,t,r,n,i,s){var a=m.VISITOR_KEYS[e.type];if(a){var u=new p.default(r,t,n,i),l=a,c=Array.isArray(l),h=0;for(l=c?l:(0,o.default)(l);;){var f;if(c){if(h>=l.length)break;f=l[h++]}else{if((h=l.next()).done)break;f=h.value}var d=f;if((!s||!s[d])&&u.visit(e,d))return}}},s.clearNode=function(e,t){m.removeProperties(e,t),y.path.delete(e)},s.removeProperties=function(e,t){return m.traverseFast(e,s.clearNode,t),e},s.hasType=function(e,t,r,n){if((0,d.default)(n,e.type))return!1;if(e.type===r)return!0;var i={has:!1,type:r};return s(e,{blacklist:n,enter:a},t,i),i.has},(s.clearCache=function(){y.clear()}).clearPath=y.clearPath,s.clearCache.clearScope=y.clearScope,s.copyCache=function(e,t){y.path.has(e)&&y.path.set(t,y.path.get(e))}},{"./cache":140,"./context":141,"./hub":142,"./path":150,"./scope":162,"./visitors":164,"babel-messages":110,"babel-runtime/core-js/get-iterator":120,"babel-types":180,"lodash/includes":507}],144:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/get-iterator"));r.findParent=function(e){for(var t=this;t=t.parentPath;)if(e(t))return t;return null},r.find=function(e){var t=this;do{if(e(t))return t}while(t=t.parentPath);return null},r.getFunctionParent=function(){return this.findParent(function(e){return e.isFunction()||e.isProgram()})},r.getStatementParent=function(){var e=this;do{if(Array.isArray(e.container))return e}while(e=e.parentPath)},r.getEarliestCommonAncestorFrom=function(e){return this.getDeepestCommonAncestorFrom(e,function(e,t,r){var n=void 0,a=s.VISITOR_KEYS[e.type],o=r,u=Array.isArray(o),l=0;for(o=u?o:(0,i.default)(o);;){var c;if(u){if(l>=o.length)break;c=o[l++]}else{if((l=o.next()).done)break;c=l.value}var p=c[t+1];n?p.listKey&&n.listKey===p.listKey&&p.keya.indexOf(p.parentKey)&&(n=p):n=p}return n})},r.getDeepestCommonAncestorFrom=function(e,t){var r=this;if(!e.length)return this;if(1===e.length)return e[0];var n=1/0,s=void 0,a=void 0,o=e.map(function(e){var t=[];do{t.unshift(e)}while((e=e.parentPath)&&e!==r);return t.length=p.length)break;d=p[f++]}else{if((f=p.next()).done)break;d=f.value}if(d[l]!==c)break e}s=l,a=c}if(a)return t?t(a,s,o):a;throw new Error("Couldn't find intersection")},r.getAncestry=function(){var e=this,t=[];do{t.push(e)}while(e=e.parentPath);return t},r.isAncestor=function(e){return e.isDescendant(this)},r.isDescendant=function(e){return!!this.findParent(function(t){return t===e})},r.inType=function(){for(var e=this;e;){var t=arguments,r=Array.isArray(t),n=0;for(t=r?t:(0,i.default)(t);;){var s;if(r){if(n>=t.length)break;s=t[n++]}else{if((n=t.next()).done)break;s=n.value}var a=s;if(e.node.type===a)return!0}e=e.parentPath}return!1},r.inShadow=function(e){var t=this.isFunction()?this:this.findParent(function(e){return e.isFunction()});if(t){if(t.isFunctionExpression()||t.isFunctionDeclaration()){var r=t.node.shadow;if(r&&(!e||!1!==r[e]))return t}else if(t.isArrowFunctionExpression())return t;return null}};var s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));n(e("./index"))},{"./index":150,"babel-runtime/core-js/get-iterator":120,"babel-types":180}],145:[function(e,t,r){"use strict";r.__esModule=!0,r.shareCommentsWithSiblings=function(){if("string"!=typeof this.key){var e=this.node;if(e){var t=e.trailingComments,r=e.leadingComments;if(t||r){var n=this.getSibling(this.key-1),i=this.getSibling(this.key+1);n.node||(n=i),i.node||(i=n),n.addComments("trailing",r),i.addComments("leading",t)}}}},r.addComment=function(e,t,r){this.addComments(e,[{type:r?"CommentLine":"CommentBlock",value:t}])},r.addComments=function(e,t){if(t){var r=this.node;if(r){var n=e+"Comments";r[n]?r[n]=r[n].concat(t):r[n]=t}}}},{}],146:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/get-iterator"));r.call=function(e){var t=this.opts;return this.debug(function(){return e}),!(!this.node||!this._call(t[e]))||!!this.node&&this._call(t[this.node.type]&&t[this.node.type][e])},r._call=function(e){if(!e)return!1;var t=e,r=Array.isArray(t),n=0;for(t=r?t:(0,i.default)(t);;){var s;if(r){if(n>=t.length)break;s=t[n++]}else{if((n=t.next()).done)break;s=n.value}var a=s;if(a){var o=this.node;if(!o)return!0;if(a.call(this.state,this,this.state))throw new Error("Unexpected return value from visitor method "+a);if(this.node!==o)return!0;if(this.shouldStop||this.shouldSkip||this.removed)return!0}}return!1},r.isBlacklisted=function(){var e=this.opts.blacklist;return e&&e.indexOf(this.node.type)>-1},r.visit=function(){return!!this.node&&!this.isBlacklisted()&&(!this.opts.shouldSkip||!this.opts.shouldSkip(this))&&(this.call("enter")||this.shouldSkip?(this.debug(function(){return"Skip..."}),this.shouldStop):(this.debug(function(){return"Recursing into..."}),s.default.node(this.node,this.opts,this.scope,this.state,this,this.skipKeys),this.call("exit"),this.shouldStop))},r.skip=function(){this.shouldSkip=!0},r.skipKey=function(e){this.skipKeys[e]=!0},r.stop=function(){this.shouldStop=!0,this.shouldSkip=!0},r.setScope=function(){if(!this.opts||!this.opts.noScope){var e=this.context&&this.context.scope;if(!e)for(var t=this.parentPath;t&&!e;){if(t.opts&&t.opts.noScope)return;e=t.scope,t=t.parentPath}this.scope=this.getScope(e),this.scope&&this.scope.init()}},r.setContext=function(e){return this.shouldSkip=!1,this.shouldStop=!1,this.removed=!1,this.skipKeys={},e&&(this.context=e,this.state=e.state,this.opts=e.opts),this.setScope(),this},r.resync=function(){this.removed||(this._resyncParent(),this._resyncList(),this._resyncKey())},r._resyncParent=function(){this.parentPath&&(this.parent=this.parentPath.node)},r._resyncKey=function(){if(this.container&&this.node!==this.container[this.key]){if(Array.isArray(this.container)){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:this;if(!e.removed){var t=this.contexts,r=Array.isArray(t),n=0;for(t=r?t:(0,i.default)(t);;){var s;if(r){if(n>=t.length)break;s=t[n++]}else{if((n=t.next()).done)break;s=n.value}s.maybeQueue(e)}}},r._getQueueContexts=function(){for(var e=this,t=this.contexts;!t.length;)t=(e=e.parentPath).contexts;return t};var s=n(e("../index"))},{"../index":143,"babel-runtime/core-js/get-iterator":120}],147:[function(e,t,r){"use strict";r.__esModule=!0,r.toComputedKey=function(){var e=this.node,t=void 0;if(this.isMemberExpression())t=e.property;else{if(!this.isProperty()&&!this.isMethod())throw new ReferenceError("todo");t=e.key}return e.computed||n.isIdentifier(t)&&(t=n.stringLiteral(t.name)),t},r.ensureBlock=function(){return n.ensureBlock(this.node)},r.arrowFunctionToShadowed=function(){if(this.isArrowFunctionExpression()){this.ensureBlock();var e=this.node;e.expression=!1,e.type="FunctionExpression",e.shadow=e.shadow||!0}};var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"))},{"babel-types":180}],148:[function(e,t,r){(function(t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/typeof")),s=n(e("babel-runtime/core-js/get-iterator")),a=n(e("babel-runtime/core-js/map"));r.evaluateTruthy=function(){var e=this.evaluate();if(e.confident)return!!e.value},r.evaluate=function(){function e(e){n&&(l=e,n=!1)}function r(a){var l=a.node;if(c.has(l)){var p=c.get(l);return p.resolved?p.value:void e(a)}var h={resolved:!1};c.set(l,h);var f=function(a){if(n){var l=a.node;if(a.isSequenceExpression()){var c=a.get("expressions");return r(c[c.length-1])}if(a.isStringLiteral()||a.isNumericLiteral()||a.isBooleanLiteral())return l.value;if(a.isNullLiteral())return null;if(a.isTemplateLiteral()){for(var p="",h=0,f=a.get("expressions"),d=l.quasis,m=Array.isArray(d),y=0,d=m?d:(0,s.default)(d);;){var g;if(m){if(y>=d.length)break;g=d[y++]}else{if((y=d.next()).done)break;g=y.value}var b=g;if(!n)break;p+=b.value.cooked;var v=f[h++];v&&(p+=String(r(v)))}if(!n)return;return p}if(a.isConditionalExpression()){var x=r(a.get("test"));if(!n)return;return r(x?a.get("consequent"):a.get("alternate"))}if(a.isExpressionWrapper())return r(a.get("expression"));if(a.isMemberExpression()&&!a.parentPath.isCallExpression({callee:l})){var E=a.get("property"),A=a.get("object");if(A.isLiteral()&&E.isIdentifier()){var D=A.node.value,S=void 0===D?"undefined":(0,i.default)(D);if("number"===S||"string"===S)return D[E.node.name]}}if(a.isReferencedIdentifier()){var C=a.scope.getBinding(l.name);if(C&&C.constantViolations.length>0)return e(C.path);if(C&&a.node.start=P.length)break;N=P[O++]}else{if((O=P.next()).done)break;N=O.value}var j=N;if(!(j=j.evaluate()).confident)return e(j);F.push(j.value)}return F}if(a.isObjectExpression()){for(var I={},L=a.get("properties"),M=L,R=Array.isArray(M),V=0,M=R?M:(0,s.default)(M);;){var U;if(R){if(V>=M.length)break;U=M[V++]}else{if((V=M.next()).done)break;U=V.value}var q=U;if(q.isObjectMethod()||q.isSpreadProperty())return e(q);var G=q.get("key"),X=G;if(q.node.computed){if(!(X=X.evaluate()).confident)return e(G);X=X.value}else X=X.isIdentifier()?X.node.name:X.node.value;var J=q.get("value"),W=J.evaluate();if(!W.confident)return e(J);W=W.value,I[X]=W}return I}if(a.isLogicalExpression()){var K=n,z=r(a.get("left")),Y=n;n=K;var H=r(a.get("right")),$=n;switch(n=Y&&$,l.operator){case"||":if(z&&Y)return n=!0,z;if(!n)return;return z||H;case"&&":if((!z&&Y||!H&&$)&&(n=!0),!n)return;return z&&H}}if(a.isBinaryExpression()){var Q=r(a.get("left"));if(!n)return;var Z=r(a.get("right"));if(!n)return;switch(l.operator){case"-":return Q-Z;case"+":return Q+Z;case"/":return Q/Z;case"*":return Q*Z;case"%":return Q%Z;case"**":return Math.pow(Q,Z);case"<":return Q":return Q>Z;case"<=":return Q<=Z;case">=":return Q>=Z;case"==":return Q==Z;case"!=":return Q!=Z;case"===":return Q===Z;case"!==":return Q!==Z;case"|":return Q|Z;case"&":return Q&Z;case"^":return Q^Z;case"<<":return Q<>":return Q>>Z;case">>>":return Q>>>Z}}if(a.isCallExpression()){var ee=a.get("callee"),te=void 0,re=void 0;if(ee.isIdentifier()&&!a.scope.getBinding(ee.node.name,!0)&&o.indexOf(ee.node.name)>=0&&(re=t[l.callee.name]),ee.isMemberExpression()){var ne=ee.get("object"),ie=ee.get("property");if(ne.isIdentifier()&&ie.isIdentifier()&&o.indexOf(ne.node.name)>=0&&u.indexOf(ie.node.name)<0&&(te=t[ne.node.name],re=te[ie.node.name]),ne.isLiteral()&&ie.isIdentifier()){var se=(0,i.default)(ne.node.value);"string"!==se&&"number"!==se||(te=ne.node.value,re=te[ie.node.name])}}if(re){var ae=a.get("arguments").map(r);if(!n)return;return re.apply(te,ae)}}e(a)}}(a);return n&&(h.resolved=!0,h.value=f),f}var n=!0,l=void 0,c=new a.default,p=r(this);return n||(p=void 0),{confident:n,deopt:l,value:p}};var o=["String","Number","Math"],u=["random"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/map":122,"babel-runtime/helpers/typeof":138}],149:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/object/create")),s=n(e("babel-runtime/core-js/get-iterator"));r.getStatementParent=function(){var e=this;do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement())break;e=e.parentPath}while(e);if(e&&(e.isProgram()||e.isFile()))throw new Error("File/Program node, we can't possibly find a statement parent to this");return e},r.getOpposite=function(){return"left"===this.key?this.getSibling("right"):"right"===this.key?this.getSibling("left"):void 0},r.getCompletionRecords=function(){var e=[],t=function(t){t&&(e=e.concat(t.getCompletionRecords()))};if(this.isIfStatement())t(this.get("consequent")),t(this.get("alternate"));else if(this.isDoExpression()||this.isFor()||this.isWhile())t(this.get("body"));else if(this.isProgram()||this.isBlockStatement())t(this.get("body").pop());else{if(this.isFunction())return this.get("body").getCompletionRecords();this.isTryStatement()?(t(this.get("block")),t(this.get("handler")),t(this.get("finalizer"))):e.push(this)}return e},r.getSibling=function(e){return a.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:e})},r.getPrevSibling=function(){return this.getSibling(this.key-1)},r.getNextSibling=function(){return this.getSibling(this.key+1)},r.getAllNextSiblings=function(){for(var e=this.key,t=this.getSibling(++e),r=[];t.node;)r.push(t),t=this.getSibling(++e);return r},r.getAllPrevSiblings=function(){for(var e=this.key,t=this.getSibling(--e),r=[];t.node;)r.push(t),t=this.getSibling(--e);return r},r.get=function(e,t){!0===t&&(t=this.context);var r=e.split(".");return 1===r.length?this._getKey(e,t):this._getPattern(r,t)},r._getKey=function(e,t){var r=this,n=this.node,i=n[e];return Array.isArray(i)?i.map(function(s,o){return a.default.get({listKey:e,parentPath:r,parent:n,container:i,key:o}).setContext(t)}):a.default.get({parentPath:this,parent:n,container:n,key:e}).setContext(t)},r._getPattern=function(e,t){var r=this,n=e,i=Array.isArray(n),a=0;for(n=i?n:(0,s.default)(n);;){var o;if(i){if(a>=n.length)break;o=n[a++]}else{if((a=n.next()).done)break;o=a.value}var u=o;r="."===u?r.parentPath:Array.isArray(r)?r[u]:r.get(u,t)}return r},r.getBindingIdentifiers=function(e){return o.getBindingIdentifiers(this.node,e)},r.getOuterBindingIdentifiers=function(e){return o.getOuterBindingIdentifiers(this.node,e)},r.getBindingIdentifierPaths=function(){for(var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=[].concat(this),n=(0,i.default)(null);r.length;){var s=r.shift();if(s&&s.node){var a=o.getBindingIdentifiers.keys[s.node.type];if(s.isIdentifier())e?(n[s.node.name]=n[s.node.name]||[]).push(s):n[s.node.name]=s;else if(s.isExportDeclaration()){var u=s.get("declaration");u.isDeclaration()&&r.push(u)}else{if(t){if(s.isFunctionDeclaration()){r.push(s.get("id"));continue}if(s.isFunctionExpression())continue}if(a)for(var l=0;l1&&void 0!==arguments[1]?arguments[1]:SyntaxError;return this.hub.file.buildCodeFrameError(this.node,e,t)},e.prototype.traverse=function(e,t){(0,c.default)(this.node,e,this.scope,t,this)},e.prototype.mark=function(e,t){this.hub.file.metadata.marked.push({type:e,message:t,loc:this.node.loc})},e.prototype.set=function(e,t){f.validate(this.node,e,t),this.node[e]=t},e.prototype.getPathLocation=function(){var e=[],t=this;do{var r=t.key;t.inList&&(r=t.listKey+"["+r+"]"),e.unshift(r)}while(t=t.parentPath);return e.join(".")},e.prototype.debug=function(e){m.enabled&&m(this.getPathLocation()+" "+this.type+": "+e())},e}();r.default=y,(0,p.default)(y.prototype,e("./ancestry")),(0,p.default)(y.prototype,e("./inference")),(0,p.default)(y.prototype,e("./replacement")),(0,p.default)(y.prototype,e("./evaluation")),(0,p.default)(y.prototype,e("./conversion")),(0,p.default)(y.prototype,e("./introspection")),(0,p.default)(y.prototype,e("./context")),(0,p.default)(y.prototype,e("./removal")),(0,p.default)(y.prototype,e("./modification")),(0,p.default)(y.prototype,e("./family")),(0,p.default)(y.prototype,e("./comments"));var g=function(){if(v){if(x>=b.length)return"break";E=b[x++]}else{if((x=b.next()).done)return"break";E=x.value}var e=E,t="is"+e;y.prototype[t]=function(e){return f[t](this.node,e)},y.prototype["assert"+e]=function(r){if(!this[t](r))throw new TypeError("Expected node path of type "+e)}},b=f.TYPES,v=Array.isArray(b),x=0;for(b=v?b:(0,s.default)(b);;){var E;if("break"===g())break}var A=function(e){if("_"===e[0])return"continue";f.TYPES.indexOf(e)<0&&f.TYPES.push(e);var t=o[e];y.prototype["is"+e]=function(e){return t.checkPath(this,e)}};for(var D in o){A(D)}t.exports=r.default},{"../cache":140,"../index":143,"../scope":162,"./ancestry":144,"./comments":145,"./context":146,"./conversion":147,"./evaluation":148,"./family":149,"./inference":151,"./introspection":154,"./lib/virtual-types":157,"./modification":158,"./removal":159,"./replacement":160,"babel-runtime/core-js/get-iterator":120,"babel-runtime/helpers/classCallCheck":134,"babel-types":180,debug:165,invariant:318,"lodash/assign":488}],151:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e,t,r){if("string"===e)return o.isStringTypeAnnotation(t);if("number"===e)return o.isNumberTypeAnnotation(t);if("boolean"===e)return o.isBooleanTypeAnnotation(t);if("any"===e)return o.isAnyTypeAnnotation(t);if("mixed"===e)return o.isMixedTypeAnnotation(t);if("empty"===e)return o.isEmptyTypeAnnotation(t);if("void"===e)return o.isVoidTypeAnnotation(t);if(r)return!1;throw new Error("Unknown base type "+e)}r.__esModule=!0;var s=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/get-iterator"));r.getTypeAnnotation=function(){if(this.typeAnnotation)return this.typeAnnotation;var e=this._getTypeAnnotation()||o.anyTypeAnnotation();return o.isTypeAnnotation(e)&&(e=e.typeAnnotation),this.typeAnnotation=e},r._getTypeAnnotation=function(){var e=this.node;if(e){if(e.typeAnnotation)return e.typeAnnotation;var t=a[e.type];return t?t.call(this,e):(t=a[this.parentPath.type])&&t.validParent?this.parentPath.getTypeAnnotation():void 0}if("init"===this.key&&this.parentPath.isVariableDeclarator()){var r=this.parentPath.parentPath,n=r.parentPath;return"left"===r.key&&n.isForInStatement()?o.stringTypeAnnotation():"left"===r.key&&n.isForOfStatement()?o.anyTypeAnnotation():o.voidTypeAnnotation()}},r.isBaseType=function(e,t){return i(e,this.getTypeAnnotation(),t)},r.couldBeBaseType=function(e){var t=this.getTypeAnnotation();if(o.isAnyTypeAnnotation(t))return!0;if(o.isUnionTypeAnnotation(t)){var r=t.types,n=Array.isArray(r),a=0;for(r=n?r:(0,s.default)(r);;){var u;if(n){if(a>=r.length)break;u=r[a++]}else{if((a=r.next()).done)break;u=a.value}var l=u;if(o.isAnyTypeAnnotation(l)||i(e,l,!0))return!0}return!1}return i(e,t,!0)},r.baseTypeStrictlyMatches=function(e){var t=this.getTypeAnnotation();if(e=e.getTypeAnnotation(),!o.isAnyTypeAnnotation(t)&&o.isFlowBaseAnnotation(t))return e.type===t.type},r.isGenericType=function(e){var t=this.getTypeAnnotation();return o.isGenericTypeAnnotation(t)&&o.isIdentifier(t.id,{name:e})};var a=n(e("./inferers")),o=n(e("babel-types"))},{"./inferers":153,"babel-runtime/core-js/get-iterator":120,"babel-types":180}],152:[function(e,t,r){"use strict";function n(e,t,r){var n=e.constantViolations.slice();return n.unshift(e.path),n.filter(function(e){var n=(e=e.resolve())._guessExecutionStatusRelativeTo(t);return r&&"function"===n&&r.push(e),"before"===n})}function i(e,t){var r=t.node.operator,n=t.get("right").resolve(),i=t.get("left").resolve(),s=void 0;if(i.isIdentifier({name:e})?s=n:n.isIdentifier({name:e})&&(s=i),s)return"==="===r?s.getTypeAnnotation():o.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(r)>=0?o.numberTypeAnnotation():void 0;if("==="===r){var a=void 0,u=void 0;if(i.isUnaryExpression({operator:"typeof"})?(a=i,u=n):n.isUnaryExpression({operator:"typeof"})&&(a=n,u=i),(u||a)&&(u=u.resolve()).isLiteral()){if("string"==typeof u.node.value&&a.get("argument").isIdentifier({name:e}))return o.createTypeAnnotationBasedOnTypeof(u.node.value)}}}function s(e,t){var r=function(e){for(var t=void 0;t=e.parentPath;){if(t.isIfStatement()||t.isConditionalExpression())return"test"===e.key?void 0:t;e=t}}(e);if(r){var n=[r.get("test")],a=[];do{var u=n.shift().resolve();if(u.isLogicalExpression()&&(n.push(u.get("left")),n.push(u.get("right"))),u.isBinaryExpression()){var l=i(t,u);l&&a.push(l)}}while(n.length);return a.length?{typeAnnotation:o.createUnionTypeAnnotation(a),ifStatement:r}:s(r,t)}}r.__esModule=!0;var a=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/get-iterator"));r.default=function(e){if(this.isReferenced()){var t=this.scope.getBinding(e.name);return t?t.identifier.typeAnnotation?t.identifier.typeAnnotation:function(e,t){var r=e.scope.getBinding(t),i=[];e.typeAnnotation=o.unionTypeAnnotation(i);var u=[],l=n(r,e,u),c=s(e,t);if(c){var p=n(r,c.ifStatement);l=l.filter(function(e){return p.indexOf(e)<0}),i.push(c.typeAnnotation)}if(l.length){var h=l=l.concat(u),f=Array.isArray(h),d=0;for(h=f?h:(0,a.default)(h);;){var m;if(f){if(d>=h.length)break;m=h[d++]}else{if((d=h.next()).done)break;m=d.value}var y=m;i.push(y.getTypeAnnotation())}}if(i.length)return o.createUnionTypeAnnotation(i)}(this,e.name):"undefined"===e.name?o.voidTypeAnnotation():"NaN"===e.name||"Infinity"===e.name?o.numberTypeAnnotation():void e.name}};var o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));t.exports=r.default},{"babel-runtime/core-js/get-iterator":120,"babel-types":180}],153:[function(e,t,r){"use strict";function n(e){return e.typeAnnotation}function i(){return l.genericTypeAnnotation(l.identifier("Array"))}function s(){return i()}function a(){return l.genericTypeAnnotation(l.identifier("Function"))}function o(e){if((e=e.resolve()).isFunction()){if(e.is("async"))return e.is("generator")?l.genericTypeAnnotation(l.identifier("AsyncIterator")):l.genericTypeAnnotation(l.identifier("Promise"));if(e.node.returnType)return e.node.returnType}}r.__esModule=!0,r.ClassDeclaration=r.ClassExpression=r.FunctionDeclaration=r.ArrowFunctionExpression=r.FunctionExpression=r.Identifier=void 0;var u=e("./inferer-reference");Object.defineProperty(r,"Identifier",{enumerable:!0,get:function(){return function(e){return e&&e.__esModule?e:{default:e}}(u).default}}),r.VariableDeclarator=function(){return this.get("id").isIdentifier()?this.get("init").getTypeAnnotation():void 0},r.TypeCastExpression=n,r.NewExpression=function(e){if(this.get("callee").isIdentifier())return l.genericTypeAnnotation(e.callee)},r.TemplateLiteral=function(){return l.stringTypeAnnotation()},r.UnaryExpression=function(e){var t=e.operator;return"void"===t?l.voidTypeAnnotation():l.NUMBER_UNARY_OPERATORS.indexOf(t)>=0?l.numberTypeAnnotation():l.STRING_UNARY_OPERATORS.indexOf(t)>=0?l.stringTypeAnnotation():l.BOOLEAN_UNARY_OPERATORS.indexOf(t)>=0?l.booleanTypeAnnotation():void 0},r.BinaryExpression=function(e){var t=e.operator;if(l.NUMBER_BINARY_OPERATORS.indexOf(t)>=0)return l.numberTypeAnnotation();if(l.BOOLEAN_BINARY_OPERATORS.indexOf(t)>=0)return l.booleanTypeAnnotation();if("+"===t){var r=this.get("right"),n=this.get("left");return n.isBaseType("number")&&r.isBaseType("number")?l.numberTypeAnnotation():n.isBaseType("string")||r.isBaseType("string")?l.stringTypeAnnotation():l.unionTypeAnnotation([l.stringTypeAnnotation(),l.numberTypeAnnotation()])}},r.LogicalExpression=function(){return l.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()])},r.ConditionalExpression=function(){return l.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()])},r.SequenceExpression=function(){return this.get("expressions").pop().getTypeAnnotation()},r.AssignmentExpression=function(){return this.get("right").getTypeAnnotation()},r.UpdateExpression=function(e){var t=e.operator;if("++"===t||"--"===t)return l.numberTypeAnnotation()},r.StringLiteral=function(){return l.stringTypeAnnotation()},r.NumericLiteral=function(){return l.numberTypeAnnotation()},r.BooleanLiteral=function(){return l.booleanTypeAnnotation()},r.NullLiteral=function(){return l.nullLiteralTypeAnnotation()},r.RegExpLiteral=function(){return l.genericTypeAnnotation(l.identifier("RegExp"))},r.ObjectExpression=function(){return l.genericTypeAnnotation(l.identifier("Object"))},r.ArrayExpression=i,r.RestElement=s,r.CallExpression=function(){return o(this.get("callee"))},r.TaggedTemplateExpression=function(){return o(this.get("tag"))};var l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));n.validParent=!0,s.validParent=!0,r.FunctionExpression=a,r.ArrowFunctionExpression=a,r.FunctionDeclaration=a,r.ClassExpression=a,r.ClassDeclaration=a},{"./inferer-reference":152,"babel-types":180}],154:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=this.node&&this.node[e];return t&&Array.isArray(t)?!!t.length:!!t}r.__esModule=!0,r.is=void 0;var s=n(e("babel-runtime/core-js/get-iterator"));r.matchesPattern=function(e,t){function r(e){var t=n[s];return"*"===t||e===t}if(!this.isMemberExpression())return!1;for(var n=e.split("."),i=[this.node],s=0;i.length;){var a=i.shift();if(t&&s===n.length)return!0;if(o.isIdentifier(a)){if(!r(a.name))return!1}else if(o.isLiteral(a)){if(!r(a.value))return!1}else{if(o.isMemberExpression(a)){if(a.computed&&!o.isLiteral(a.property))return!1;i.unshift(a.property),i.unshift(a.object);continue}if(!o.isThisExpression(a))return!1;if(!r("this"))return!1}if(++s>n.length)return!1}return s===n.length},r.has=i,r.isStatic=function(){return this.scope.isStatic(this.node)},r.isnt=function(e){return!this.has(e)},r.equals=function(e,t){return this.node[e]===t},r.isNodeType=function(e){return o.isType(this.type,e)},r.canHaveVariableDeclarationOrExpression=function(){return("init"===this.key||"left"===this.key)&&this.parentPath.isFor()},r.canSwapBetweenExpressionAndStatement=function(e){return!("body"!==this.key||!this.parentPath.isArrowFunctionExpression())&&(this.isExpression()?o.isBlockStatement(e):!!this.isBlockStatement()&&o.isExpression(e))},r.isCompletionRecord=function(e){var t=this,r=!0;do{var n=t.container;if(t.isFunction()&&!r)return!!e;if(r=!1,Array.isArray(n)&&t.key!==n.length-1)return!1}while((t=t.parentPath)&&!t.isProgram());return!0},r.isStatementOrBlock=function(){return!this.parentPath.isLabeledStatement()&&!o.isBlockStatement(this.container)&&(0,a.default)(o.STATEMENT_OR_BLOCK_KEYS,this.key)},r.referencesImport=function(e,t){if(!this.isReferencedIdentifier())return!1;var r=this.scope.getBinding(this.node.name);if(!r||"module"!==r.kind)return!1;var n=r.path,i=n.parentPath;return!(!i.isImportDeclaration()||i.node.source.value!==e||t&&(!n.isImportDefaultSpecifier()||"default"!==t)&&(!n.isImportNamespaceSpecifier()||"*"!==t)&&(!n.isImportSpecifier()||n.node.imported.name!==t))},r.getSource=function(){var e=this.node;return e.end?this.hub.file.code.slice(e.start,e.end):""},r.willIMaybeExecuteBefore=function(e){return"after"!==this._guessExecutionStatusRelativeTo(e)},r._guessExecutionStatusRelativeTo=function(e){var t=e.scope.getFunctionParent(),r=this.scope.getFunctionParent();if(t.node!==r.node){var n=this._guessExecutionStatusRelativeToDifferentFunctions(t);if(n)return n;e=t.path}var i=e.getAncestry();if(i.indexOf(this)>=0)return"after";var s=this.getAncestry(),a=void 0,u=void 0,l=void 0;for(l=0;l=0){a=c;break}}if(!a)return"before";var p=i[u-1],h=s[l-1];return p&&h?p.listKey&&p.container===h.container?p.key>h.key?"before":"after":o.VISITOR_KEYS[p.type].indexOf(p.key)>o.VISITOR_KEYS[h.type].indexOf(h.key)?"before":"after":"before"},r._guessExecutionStatusRelativeToDifferentFunctions=function(e){var t=e.path;if(t.isFunctionDeclaration()){var r=t.scope.getBinding(t.node.id.name);if(!r.references)return"before";var n=r.referencePaths,i=n,a=Array.isArray(i),o=0;for(i=a?i:(0,s.default)(i);;){var u;if(a){if(o>=i.length)break;u=i[o++]}else{if((o=i.next()).done)break;u=o.value}var l=u;if("callee"!==l.key||!l.parentPath.isCallExpression())return}var c=void 0,p=n,h=Array.isArray(p),f=0;for(p=h?p:(0,s.default)(p);;){var d;if(h){if(f>=p.length)break;d=p[f++]}else{if((f=p.next()).done)break;d=f.value}var m=d;if(!m.find(function(e){return e.node===t.node})){var y=this._guessExecutionStatusRelativeTo(m);if(c){if(c!==y)return}else c=y}}return c}},r.resolve=function(e,t){return this._resolve(e,t)||this},r._resolve=function(e,t){if(!(t&&t.indexOf(this)>=0))if((t=t||[]).push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(e,t)}else if(this.isReferencedIdentifier()){var r=this.scope.getBinding(this.node.name);if(!r)return;if(!r.constant)return;if("module"===r.kind)return;if(r.path!==this){var n=r.path.resolve(e,t);if(this.find(function(e){return e.node===n.node}))return;return n}}else{if(this.isTypeCastExpression())return this.get("expression").resolve(e,t);if(e&&this.isMemberExpression()){var i=this.toComputedKey();if(!o.isLiteral(i))return;var a=i.value,u=this.get("object").resolve(e,t);if(u.isObjectExpression()){var l=u.get("properties"),c=Array.isArray(l),p=0;for(l=c?l:(0,s.default)(l);;){var h;if(c){if(p>=l.length)break;h=l[p++]}else{if((p=l.next()).done)break;h=p.value}var f=h;if(f.isProperty()){var d=f.get("key"),m=f.isnt("computed")&&d.isIdentifier({name:a});if(m=m||d.isLiteral({value:a}))return f.get("value").resolve(e,t)}}}else if(u.isArrayExpression()&&!isNaN(+a)){var y=u.get("elements")[a];if(y)return y.resolve(e,t)}}}};var a=n(e("lodash/includes")),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));r.is=i},{"babel-runtime/core-js/get-iterator":120,"babel-types":180,"lodash/includes":507}],155:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/get-iterator")),s=n(e("babel-runtime/helpers/classCallCheck")),a=e("babel-types"),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(a),u={ReferencedIdentifier:function(e,t){if(!e.isJSXIdentifier()||!a.react.isCompatTag(e.node.name)||e.parentPath.isJSXMemberExpression()){if("this"===e.node.name){var r=e.scope;do{if(r.path.isFunction()&&!r.path.isArrowFunctionExpression())break}while(r=r.parent);r&&t.breakOnScopePaths.push(r.path)}var n=e.scope.getBinding(e.node.name);n&&n===t.scope.getBinding(e.node.name)&&(t.bindings[e.node.name]=n)}}},l=function(){function e(t,r){(0,s.default)(this,e),this.breakOnScopePaths=[],this.bindings={},this.scopes=[],this.scope=r,this.path=t,this.attachAfter=!1}return e.prototype.isCompatibleScope=function(e){for(var t in this.bindings){var r=this.bindings[t];if(!e.bindingIdentifierEquals(t,r.identifier))return!1}return!0},e.prototype.getCompatibleScopes=function(){var e=this.path.scope;do{if(!this.isCompatibleScope(e))break;if(this.scopes.push(e),this.breakOnScopePaths.indexOf(e.path)>=0)break}while(e=e.parent)},e.prototype.getAttachmentPath=function(){var e=this._getAttachmentPath();if(e){var t=e.scope;if(t.path===e&&(t=e.scope.parent),t.path.isProgram()||t.path.isFunction())for(var r in this.bindings)if(t.hasOwnBinding(r)){var n=this.bindings[r];if("param"!==n.kind&&this.getAttachmentParentForPath(n.path).key>e.key){this.attachAfter=!0,e=n.path;var s=n.constantViolations,a=Array.isArray(s),o=0;for(s=a?s:(0,i.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if((o=s.next()).done)break;u=o.value}var l=u;this.getAttachmentParentForPath(l).key>e.key&&(e=l)}}}return e.parentPath.isExportDeclaration()&&(e=e.parentPath),e}},e.prototype._getAttachmentPath=function(){var e=this.scopes.pop();if(e){if(e.path.isFunction()){if(this.hasOwnParamBindings(e)){if(this.scope===e)return;return e.path.get("body").get("body")[0]}return this.getNextScopeAttachmentParent()}return e.path.isProgram()?this.getNextScopeAttachmentParent():void 0}},e.prototype.getNextScopeAttachmentParent=function(){var e=this.scopes.pop();if(e)return this.getAttachmentParentForPath(e.path)},e.prototype.getAttachmentParentForPath=function(e){do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement()||e.isVariableDeclarator()&&null!==e.parentPath.node&&e.parentPath.node.declarations.length>1)return e}while(e=e.parentPath)},e.prototype.hasOwnParamBindings=function(e){for(var t in this.bindings)if(e.hasOwnBinding(t)){var r=this.bindings[t];if("param"===r.kind&&r.constant)return!0}return!1},e.prototype.run=function(){var e=this.path.node;if(!e._hoisted){e._hoisted=!0,this.path.traverse(u,this),this.getCompatibleScopes();var t=this.getAttachmentPath();if(t&&t.getFunctionParent()!==this.path.getFunctionParent()){var r=t.scope.generateUidIdentifier("ref"),n=o.variableDeclarator(r,this.path.node);t[this.attachAfter?"insertAfter":"insertBefore"]([t.isVariableDeclarator()?n:o.variableDeclaration("var",[n])]);var i=this.path.parentPath;i.isJSXElement()&&this.path.container===i.node.children&&(r=o.JSXExpressionContainer(r)),this.path.replaceWith(r)}}},e}();r.default=l,t.exports=r.default},{"babel-runtime/core-js/get-iterator":120,"babel-runtime/helpers/classCallCheck":134,"babel-types":180}],156:[function(e,t,r){"use strict";r.__esModule=!0;r.hooks=[function(e,t){if("test"===e.key&&(t.isWhile()||t.isSwitchCase())||"declaration"===e.key&&t.isExportDeclaration()||"body"===e.key&&t.isLabeledStatement()||"declarations"===e.listKey&&t.isVariableDeclaration()&&1===t.node.declarations.length||"expression"===e.key&&t.isExpressionStatement())return t.remove(),!0},function(e,t){if(t.isSequenceExpression()&&1===t.node.expressions.length)return t.replaceWith(t.node.expressions[0]),!0},function(e,t){if(t.isBinary())return"left"===e.key?t.replaceWith(t.node.right):t.replaceWith(t.node.left),!0},function(e,t){if(t.isIfStatement()&&("consequent"===e.key||"alternate"===e.key)||"body"===e.key&&(t.isLoop()||t.isArrowFunctionExpression()))return e.replaceWith({type:"BlockStatement",body:[]}),!0}]},{}],157:[function(e,t,r){"use strict";r.__esModule=!0,r.Flow=r.Pure=r.Generated=r.User=r.Var=r.BlockScoped=r.Referenced=r.Scope=r.Expression=r.Statement=r.BindingIdentifier=r.ReferencedMemberExpression=r.ReferencedIdentifier=void 0;var n=e("babel-types"),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(n);r.ReferencedIdentifier={types:["Identifier","JSXIdentifier"],checkPath:function(e,t){var r=e.node,s=e.parent;if(!i.isIdentifier(r,t)&&!i.isJSXMemberExpression(s,t)){if(!i.isJSXIdentifier(r,t))return!1;if(n.react.isCompatTag(r.name))return!1}return i.isReferenced(r,s)}},r.ReferencedMemberExpression={types:["MemberExpression"],checkPath:function(e){var t=e.node,r=e.parent;return i.isMemberExpression(t)&&i.isReferenced(t,r)}},r.BindingIdentifier={types:["Identifier"],checkPath:function(e){var t=e.node,r=e.parent;return i.isIdentifier(t)&&i.isBinding(t,r)}},r.Statement={types:["Statement"],checkPath:function(e){var t=e.node,r=e.parent;if(i.isStatement(t)){if(i.isVariableDeclaration(t)){if(i.isForXStatement(r,{left:t}))return!1;if(i.isForStatement(r,{init:t}))return!1}return!0}return!1}},r.Expression={types:["Expression"],checkPath:function(e){return e.isIdentifier()?e.isReferencedIdentifier():i.isExpression(e.node)}},r.Scope={types:["Scopable"],checkPath:function(e){return i.isScope(e.node,e.parent)}},r.Referenced={checkPath:function(e){return i.isReferenced(e.node,e.parent)}},r.BlockScoped={checkPath:function(e){return i.isBlockScoped(e.node)}},r.Var={types:["VariableDeclaration"],checkPath:function(e){return i.isVar(e.node)}},r.User={checkPath:function(e){return e.node&&!!e.node.loc}},r.Generated={checkPath:function(e){return!e.isUser()}},r.Pure={checkPath:function(e,t){return e.scope.isPure(e.node,t)}},r.Flow={types:["Flow","ImportDeclaration","ExportDeclaration","ImportSpecifier"],checkPath:function(e){var t=e.node;return!!i.isFlow(t)||(i.isImportDeclaration(t)?"type"===t.importKind||"typeof"===t.importKind:i.isExportDeclaration(t)?"type"===t.exportKind:!!i.isImportSpecifier(t)&&("type"===t.importKind||"typeof"===t.importKind))}}},{"babel-types":180}],158:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/typeof")),s=n(e("babel-runtime/core-js/get-iterator"));r.insertBefore=function(e){if(this._assertUnremoved(),e=this._verifyNodeList(e),this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement())return this.parentPath.insertBefore(e);if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&"init"===this.key)this.node&&e.push(this.node),this.replaceExpressionWithStatements(e);else{if(this._maybePopFromStatements(e),Array.isArray(this.container))return this._containerInsertBefore(e);if(!this.isStatementOrBlock())throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");this.node&&e.push(this.node),this._replaceWith(l.blockStatement(e))}return[this]},r._containerInsert=function(e,t){this.updateSiblingKeys(e,t.length);for(var r=[],n=0;n=c.length)break;f=c[h++]}else{if((h=c.next()).done)break;f=h.value}var d=f;d.setScope(),d.debug(function(){return"Inserted."});var m=l,y=Array.isArray(m),g=0;for(m=y?m:(0,s.default)(m);;){var b;if(y){if(g>=m.length)break;b=m[g++]}else{if((g=m.next()).done)break;b=g.value}b.maybeQueue(d,!0)}}return r},r._containerInsertBefore=function(e){return this._containerInsert(this.key,e)},r._containerInsertAfter=function(e){return this._containerInsert(this.key+1,e)},r._maybePopFromStatements=function(e){var t=e[e.length-1];(l.isIdentifier(t)||l.isExpressionStatement(t)&&l.isIdentifier(t.expression))&&!this.isCompletionRecord()&&e.pop()},r.insertAfter=function(e){if(this._assertUnremoved(),e=this._verifyNodeList(e),this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement())return this.parentPath.insertAfter(e);if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&"init"===this.key){if(this.node){var t=this.scope.generateDeclaredUidIdentifier();e.unshift(l.expressionStatement(l.assignmentExpression("=",t,this.node))),e.push(l.expressionStatement(t))}this.replaceExpressionWithStatements(e)}else{if(this._maybePopFromStatements(e),Array.isArray(this.container))return this._containerInsertAfter(e);if(!this.isStatementOrBlock())throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");this.node&&e.unshift(this.node),this._replaceWith(l.blockStatement(e))}return[this]},r.updateSiblingKeys=function(e,t){if(this.parent)for(var r=a.path.get(this.parent),n=0;n=e&&(i.key+=t)}},r._verifyNodeList=function(e){if(!e)return[];e.constructor!==Array&&(e=[e]);for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:this.scope;return new o.default(this,e).run()};var a=e("../cache"),o=n(e("./lib/hoister")),u=n(e("./index")),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"))},{"../cache":140,"./index":150,"./lib/hoister":155,"babel-runtime/core-js/get-iterator":120,"babel-runtime/helpers/typeof":138,"babel-types":180}],159:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/get-iterator"));r.remove=function(){this._assertUnremoved(),this.resync(),this._callRemovalHooks()?this._markRemoved():(this.shareCommentsWithSiblings(),this._remove(),this._markRemoved())},r._callRemovalHooks=function(){var e=i.hooks,t=Array.isArray(e),r=0;for(e=t?e:(0,n.default)(e);;){var s;if(t){if(r>=e.length)break;s=e[r++]}else{if((r=e.next()).done)break;s=r.value}if(s(this,this.parentPath))return!0}},r._remove=function(){Array.isArray(this.container)?(this.container.splice(this.key,1),this.updateSiblingKeys(this.key,-1)):this._replaceWith(null)},r._markRemoved=function(){this.shouldSkip=!0,this.removed=!0,this.node=null},r._assertUnremoved=function(){if(this.removed)throw this.buildCodeFrameError("NodePath has been removed so is read-only.")};var i=e("./lib/removal-hooks")},{"./lib/removal-hooks":156,"babel-runtime/core-js/get-iterator":120}],160:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/get-iterator"));r.replaceWithMultiple=function(e){this.resync(),e=this._verifyNodeList(e),l.inheritLeadingComments(e[0],this.node),l.inheritTrailingComments(e[e.length-1],this.node),this.node=this.container[this.key]=null,this.insertAfter(e),this.node?this.requeue():this.remove()},r.replaceWithSourceString=function(e){this.resync();try{e="("+e+")",e=(0,u.parse)(e)}catch(r){var t=r.loc;throw t&&(r.message+=" - make sure this is an expression.",r.message+="\n"+(0,s.default)(e,t.line,t.column+1)),r}return e=e.program.body[0].expression,a.default.removeProperties(e),this.replaceWith(e)},r.replaceWith=function(e){if(this.resync(),this.removed)throw new Error("You can't replace this node, we've already removed it");if(e instanceof o.default&&(e=e.node),!e)throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");if(this.node!==e){if(this.isProgram()&&!l.isProgram(e))throw new Error("You can only replace a Program root node with another Program node");if(Array.isArray(e))throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");if("string"==typeof e)throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");if(this.isNodeType("Statement")&&l.isExpression(e)&&(this.canHaveVariableDeclarationOrExpression()||this.canSwapBetweenExpressionAndStatement(e)||this.parentPath.isExportDefaultDeclaration()||(e=l.expressionStatement(e))),this.isNodeType("Expression")&&l.isStatement(e)&&!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(e))return this.replaceExpressionWithStatements([e]);var t=this.node;t&&(l.inheritsComments(e,t),l.removeComments(t)),this._replaceWith(e),this.type=e.type,this.setScope(),this.requeue()}},r._replaceWith=function(e){if(!this.container)throw new ReferenceError("Container is falsy");this.inList?l.validate(this.parent,this.key,[e]):l.validate(this.parent,this.key,e),this.debug(function(){return"Replace with "+(e&&e.type)}),this.node=this.container[this.key]=e},r.replaceExpressionWithStatements=function(e){this.resync();var t=l.toSequenceExpression(e,this.scope);if(l.isSequenceExpression(t)){var r=t.expressions;r.length>=2&&this.parentPath.isExpressionStatement()&&this._maybePopFromStatements(r),1===r.length?this.replaceWith(r[0]):this.replaceWith(t)}else{if(!t){var n=l.functionExpression(null,[],l.blockStatement(e));n.shadow=!0,this.replaceWith(l.callExpression(n,[])),this.traverse(c);var s=this.get("callee").getCompletionRecords(),a=Array.isArray(s),o=0;for(s=a?s:(0,i.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if((o=s.next()).done)break;u=o.value}var p=u;if(p.isExpressionStatement()){var h=p.findParent(function(e){return e.isLoop()});if(h){var f=h.getData("expressionReplacementReturnUid");if(f)f=l.identifier(f.name);else{var d=this.get("callee");f=d.scope.generateDeclaredUidIdentifier("ret"),d.get("body").pushContainer("body",l.returnStatement(f)),h.setData("expressionReplacementReturnUid",f)}p.get("expression").replaceWith(l.assignmentExpression("=",f,p.node.expression))}else p.replaceWith(l.returnStatement(p.node.expression))}}return this.node}this.replaceWith(t)}},r.replaceInline=function(e){return this.resync(),Array.isArray(e)?Array.isArray(this.container)?(e=this._verifyNodeList(e),this._containerInsertAfter(e),this.remove()):this.replaceWithMultiple(e):this.replaceWith(e)};var s=n(e("babel-code-frame")),a=n(e("../index")),o=n(e("./index")),u=e("babylon"),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),c={Function:function(e){e.skip()},VariableDeclaration:function(e){if("var"===e.node.kind){var t=e.getBindingIdentifiers();for(var r in t)e.scope.push({id:t[r]});var n=[],s=e.node.declarations,a=Array.isArray(s),o=0;for(s=a?s:(0,i.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if((o=s.next()).done)break;u=o.value}var c=u;c.init&&n.push(l.expressionStatement(l.assignmentExpression("=",c.id,c.init)))}e.replaceWithMultiple(n)}}}},{"../index":143,"./index":150,"babel-code-frame":21,"babel-runtime/core-js/get-iterator":120,"babel-types":180,babylon:188}],161:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/helpers/classCallCheck")),i=function(){function e(t){var r=t.existing,i=t.identifier,s=t.scope,a=t.path,o=t.kind;(0,n.default)(this,e),this.identifier=i,this.scope=s,this.path=a,this.kind=o,this.constantViolations=[],this.constant=!0,this.referencePaths=[],this.referenced=!1,this.references=0,this.clearValue(),r&&(this.constantViolations=[].concat(r.path,r.constantViolations,this.constantViolations))}return e.prototype.deoptValue=function(){this.clearValue(),this.hasDeoptedValue=!0},e.prototype.setValue=function(e){this.hasDeoptedValue||(this.hasValue=!0,this.value=e)},e.prototype.clearValue=function(){this.hasDeoptedValue=!1,this.hasValue=!1,this.value=null},e.prototype.reassign=function(e){this.constant=!1,-1===this.constantViolations.indexOf(e)&&this.constantViolations.push(e)},e.prototype.reference=function(e){-1===this.referencePaths.indexOf(e)&&(this.referenced=!0,this.references++,this.referencePaths.push(e))},e.prototype.dereference=function(){this.references--,this.referenced=!!this.references},e}();r.default=i,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":134}],162:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(v.isModuleDeclaration(e))if(e.source)s(e.source,t);else if(e.specifiers&&e.specifiers.length){var r=e.specifiers,n=Array.isArray(r),i=0;for(r=n?r:(0,c.default)(r);;){var a;if(n){if(i>=r.length)break;a=r[i++]}else{if((i=r.next()).done)break;a=i.value}s(a,t)}}else e.declaration&&s(e.declaration,t);else if(v.isModuleSpecifier(e))s(e.local,t);else if(v.isMemberExpression(e))s(e.object,t),s(e.property,t);else if(v.isIdentifier(e))t.push(e.name);else if(v.isLiteral(e))t.push(e.value);else if(v.isCallExpression(e))s(e.callee,t);else if(v.isObjectExpression(e)||v.isObjectPattern(e)){var o=e.properties,u=Array.isArray(o),l=0;for(o=u?o:(0,c.default)(o);;){var p;if(u){if(l>=o.length)break;p=o[l++]}else{if((l=o.next()).done)break;p=l.value}var h=p;s(h.key||h.argument,t)}}}r.__esModule=!0;var a=i(e("babel-runtime/core-js/object/keys")),o=i(e("babel-runtime/core-js/object/create")),u=i(e("babel-runtime/core-js/map")),l=i(e("babel-runtime/helpers/classCallCheck")),c=i(e("babel-runtime/core-js/get-iterator")),p=i(e("lodash/includes")),h=i(e("lodash/repeat")),f=i(e("./lib/renamer")),d=i(e("../index")),m=i(e("lodash/defaults")),y=n(e("babel-messages")),g=i(e("./binding")),b=i(e("globals")),v=n(e("babel-types")),x=e("../cache"),E=0,A={For:function(e){var t=v.FOR_INIT_KEYS,r=Array.isArray(t),n=0;for(t=r?t:(0,c.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i,a=e.get(s);a.isVar()&&e.scope.getFunctionParent().registerBinding("var",a)}},Declaration:function(e){e.isBlockScoped()||e.isExportDeclaration()&&e.get("declaration").isDeclaration()||e.scope.getFunctionParent().registerDeclaration(e)},ReferencedIdentifier:function(e,t){t.references.push(e)},ForXStatement:function(e,t){var r=e.get("left");(r.isPattern()||r.isIdentifier())&&t.constantViolations.push(r)},ExportDeclaration:{exit:function(e){var t=e.node,r=e.scope,n=t.declaration;if(v.isClassDeclaration(n)||v.isFunctionDeclaration(n)){var i=n.id;if(!i)return;var s=r.getBinding(i.name);s&&s.reference(e)}else if(v.isVariableDeclaration(n)){var a=n.declarations,o=Array.isArray(a),u=0;for(a=o?a:(0,c.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}var p=l,h=v.getBindingIdentifiers(p);for(var f in h){var d=r.getBinding(f);d&&d.reference(e)}}}}},LabeledStatement:function(e){e.scope.getProgramParent().addGlobal(e.node),e.scope.getBlockParent().registerDeclaration(e)},AssignmentExpression:function(e,t){t.assignments.push(e)},UpdateExpression:function(e,t){t.constantViolations.push(e.get("argument"))},UnaryExpression:function(e,t){"delete"===e.node.operator&&t.constantViolations.push(e.get("argument"))},BlockScoped:function(e){var t=e.scope;t.path===e&&(t=t.parent),t.getBlockParent().registerDeclaration(e)},ClassDeclaration:function(e){var t=e.node.id;if(t){var r=t.name;e.scope.bindings[r]=e.scope.getBinding(r)}},Block:function(e){var t=e.get("body"),r=Array.isArray(t),n=0;for(t=r?t:(0,c.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i;s.isFunctionDeclaration()&&e.scope.getBlockParent().registerDeclaration(s)}}},D=0,S=function(){function e(t,r){if((0,l.default)(this,e),r&&r.block===t.node)return r;var n=function(e,t,r){var n=x.scope.get(e.node)||[],i=n,s=Array.isArray(i),a=0;for(i=s?i:(0,c.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if((a=i.next()).done)break;o=a.value}var u=o;if(u.parent===t&&u.path===e)return u}n.push(r),x.scope.has(e.node)||x.scope.set(e.node,n)}(t,r,this);if(n)return n;this.uid=D++,this.parent=r,this.hub=t.hub,this.parentBlock=t.parent,this.block=t.node,this.path=t,this.labels=new u.default}return e.prototype.traverse=function(e,t,r){(0,d.default)(e,t,this,r,this.path)},e.prototype.generateDeclaredUidIdentifier=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"temp",t=this.generateUidIdentifier(e);return this.push({id:t}),t},e.prototype.generateUidIdentifier=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"temp";return v.identifier(this.generateUid(e))},e.prototype.generateUid=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"temp";e=v.toIdentifier(e).replace(/^_+/,"").replace(/[0-9]+$/g,"");var t=void 0,r=0;do{t=this._generateUid(e,r),r++}while(this.hasLabel(t)||this.hasBinding(t)||this.hasGlobal(t)||this.hasReference(t));var n=this.getProgramParent();return n.references[t]=!0,n.uids[t]=!0,t},e.prototype._generateUid=function(e,t){var r=e;return t>1&&(r+=t),"_"+r},e.prototype.generateUidIdentifierBasedOnNode=function(e,t){var r=e;v.isAssignmentExpression(e)?r=e.left:v.isVariableDeclarator(e)?r=e.id:(v.isObjectProperty(r)||v.isObjectMethod(r))&&(r=r.key);var n=[];s(r,n);var i=n.join("$");return i=i.replace(/^_/,"")||t||"ref",this.generateUidIdentifier(i.slice(0,20))},e.prototype.isStatic=function(e){if(v.isThisExpression(e)||v.isSuper(e))return!0;if(v.isIdentifier(e)){var t=this.getBinding(e.name);return t?t.constant:this.hasBinding(e.name)}return!1},e.prototype.maybeGenerateMemoised=function(e,t){if(this.isStatic(e))return null;var r=this.generateUidIdentifierBasedOnNode(e);return t||this.push({id:r}),r},e.prototype.checkBlockScopedCollisions=function(e,t,r,n){if("param"!==t&&("hoisted"!==t||"let"!==e.kind)){if("let"===t||"let"===e.kind||"const"===e.kind||"module"===e.kind||"param"===e.kind&&("let"===t||"const"===t))throw this.hub.file.buildCodeFrameError(n,y.get("scopeDuplicateDeclaration",r),TypeError)}},e.prototype.rename=function(e,t,r){var n=this.getBinding(e);if(n)return t=t||this.generateUidIdentifier(e).name,new f.default(n,e,t).rename(r)},e.prototype._renameFromMap=function(e,t,r,n){e[t]&&(e[r]=n,e[t]=null)},e.prototype.dump=function(){var e=(0,h.default)("-",60);console.log(e);var t=this;do{console.log("#",t.block.type);for(var r in t.bindings){var n=t.bindings[r];console.log(" -",r,{constant:n.constant,references:n.references,violations:n.constantViolations.length,kind:n.kind})}}while(t=t.parent);console.log(e)},e.prototype.toArray=function(e,t){var r=this.hub.file;if(v.isIdentifier(e)){var n=this.getBinding(e.name);if(n&&n.constant&&n.path.isGenericType("Array"))return e}if(v.isArrayExpression(e))return e;if(v.isIdentifier(e,{name:"arguments"}))return v.callExpression(v.memberExpression(v.memberExpression(v.memberExpression(v.identifier("Array"),v.identifier("prototype")),v.identifier("slice")),v.identifier("call")),[e]);var i="toArray",s=[e];return!0===t?i="toConsumableArray":t&&(s.push(v.numericLiteral(t)),i="slicedToArray"),v.callExpression(r.addHelper(i),s)},e.prototype.hasLabel=function(e){return!!this.getLabel(e)},e.prototype.getLabel=function(e){return this.labels.get(e)},e.prototype.registerLabel=function(e){this.labels.set(e.node.label.name,e)},e.prototype.registerDeclaration=function(e){if(e.isLabeledStatement())this.registerLabel(e);else if(e.isFunctionDeclaration())this.registerBinding("hoisted",e.get("id"),e);else if(e.isVariableDeclaration()){var t=e.get("declarations"),r=Array.isArray(t),n=0;for(t=r?t:(0,c.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i;this.registerBinding(e.node.kind,s)}}else if(e.isClassDeclaration())this.registerBinding("let",e);else if(e.isImportDeclaration()){var a=e.get("specifiers"),o=Array.isArray(a),u=0;for(a=o?a:(0,c.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}var p=l;this.registerBinding("module",p)}}else if(e.isExportDeclaration()){var h=e.get("declaration");(h.isClassDeclaration()||h.isFunctionDeclaration()||h.isVariableDeclaration())&&this.registerDeclaration(h)}else this.registerBinding("unknown",e)},e.prototype.buildUndefinedNode=function(){return this.hasBinding("undefined")?v.unaryExpression("void",v.numericLiteral(0),!0):v.identifier("undefined")},e.prototype.registerConstantViolation=function(e){var t=e.getBindingIdentifiers();for(var r in t){var n=this.getBinding(r);n&&n.reassign(e)}},e.prototype.registerBinding=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;if(!e)throw new ReferenceError("no `kind`");if(t.isVariableDeclaration()){var n=t.get("declarations"),i=Array.isArray(n),s=0;for(n=i?n:(0,c.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}var o=a;this.registerBinding(e,o)}}else{var u=this.getProgramParent(),l=t.getBindingIdentifiers(!0);for(var p in l){var h=l[p],f=Array.isArray(h),d=0;for(h=f?h:(0,c.default)(h);;){var m;if(f){if(d>=h.length)break;m=h[d++]}else{if((d=h.next()).done)break;m=d.value}var y=m,b=this.getOwnBinding(p);if(b){if(b.identifier===y)continue;this.checkBlockScopedCollisions(b,e,p,y)}b&&b.path.isFlow()&&(b=null),u.references[p]=!0,this.bindings[p]=new g.default({identifier:y,existing:b,scope:this,path:r,kind:e})}}}},e.prototype.addGlobal=function(e){this.globals[e.name]=e},e.prototype.hasUid=function(e){var t=this;do{if(t.uids[e])return!0}while(t=t.parent);return!1},e.prototype.hasGlobal=function(e){var t=this;do{if(t.globals[e])return!0}while(t=t.parent);return!1},e.prototype.hasReference=function(e){var t=this;do{if(t.references[e])return!0}while(t=t.parent);return!1},e.prototype.isPure=function(e,t){if(v.isIdentifier(e)){var r=this.getBinding(e.name);return!!r&&(!t||r.constant)}if(v.isClass(e))return!(e.superClass&&!this.isPure(e.superClass,t))&&this.isPure(e.body,t);if(v.isClassBody(e)){var n=e.body,i=Array.isArray(n),s=0;for(n=i?n:(0,c.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}var o=a;if(!this.isPure(o,t))return!1}return!0}if(v.isBinary(e))return this.isPure(e.left,t)&&this.isPure(e.right,t);if(v.isArrayExpression(e)){var u=e.elements,l=Array.isArray(u),p=0;for(u=l?u:(0,c.default)(u);;){var h;if(l){if(p>=u.length)break;h=u[p++]}else{if((p=u.next()).done)break;h=p.value}var f=h;if(!this.isPure(f,t))return!1}return!0}if(v.isObjectExpression(e)){var d=e.properties,m=Array.isArray(d),y=0;for(d=m?d:(0,c.default)(d);;){var g;if(m){if(y>=d.length)break;g=d[y++]}else{if((y=d.next()).done)break;g=y.value}var b=g;if(!this.isPure(b,t))return!1}return!0}return v.isClassMethod(e)?!(e.computed&&!this.isPure(e.key,t))&&("get"!==e.kind&&"set"!==e.kind):v.isClassProperty(e)||v.isObjectProperty(e)?!(e.computed&&!this.isPure(e.key,t))&&this.isPure(e.value,t):v.isUnaryExpression(e)?this.isPure(e.argument,t):v.isPureish(e)},e.prototype.setData=function(e,t){return this.data[e]=t},e.prototype.getData=function(e){var t=this;do{var r=t.data[e];if(null!=r)return r}while(t=t.parent)},e.prototype.removeData=function(e){var t=this;do{null!=t.data[e]&&(t.data[e]=null)}while(t=t.parent)},e.prototype.init=function(){this.references||this.crawl()},e.prototype.crawl=function(){E++,this._crawl(),E--},e.prototype._crawl=function(){var e=this.path;if(this.references=(0,o.default)(null),this.bindings=(0,o.default)(null),this.globals=(0,o.default)(null),this.uids=(0,o.default)(null),this.data=(0,o.default)(null),e.isLoop()){var t=v.FOR_INIT_KEYS,r=Array.isArray(t),n=0;for(t=r?t:(0,c.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i,a=e.get(s);a.isBlockScoped()&&this.registerBinding(a.node.kind,a)}}if(e.isFunctionExpression()&&e.has("id")&&(e.get("id").node[v.NOT_LOCAL_BINDING]||this.registerBinding("local",e.get("id"),e)),e.isClassExpression()&&e.has("id")&&(e.get("id").node[v.NOT_LOCAL_BINDING]||this.registerBinding("local",e)),e.isFunction()){var u=e.get("params"),l=Array.isArray(u),p=0;for(u=l?u:(0,c.default)(u);;){var h;if(l){if(p>=u.length)break;h=u[p++]}else{if((p=u.next()).done)break;h=p.value}var f=h;this.registerBinding("param",f)}}e.isCatchClause()&&this.registerBinding("let",e);if(!this.getProgramParent().crawling){var d={references:[],constantViolations:[],assignments:[]};this.crawling=!0,e.traverse(A,d),this.crawling=!1;var m=d.assignments,y=Array.isArray(m),g=0;for(m=y?m:(0,c.default)(m);;){var b;if(y){if(g>=m.length)break;b=m[g++]}else{if((g=m.next()).done)break;b=g.value}var x=b,E=x.getBindingIdentifiers(),D=void 0;for(var S in E)x.scope.getBinding(S)||(D=D||x.scope.getProgramParent()).addGlobal(E[S]);x.scope.registerConstantViolation(x)}var C=d.references,_=Array.isArray(C),w=0;for(C=_?C:(0,c.default)(C);;){var k;if(_){if(w>=C.length)break;k=C[w++]}else{if((w=C.next()).done)break;k=w.value}var F=k,T=F.scope.getBinding(F.node.name);T?T.reference(F):F.scope.getProgramParent().addGlobal(F.node)}var P=d.constantViolations,B=Array.isArray(P),O=0;for(P=B?P:(0,c.default)(P);;){var N;if(B){if(O>=P.length)break;N=P[O++]}else{if((O=P.next()).done)break;N=O.value}var j=N;j.scope.registerConstantViolation(j)}}},e.prototype.push=function(e){var t=this.path;t.isBlockStatement()||t.isProgram()||(t=this.getBlockParent().path),t.isSwitchStatement()&&(t=this.getFunctionParent().path),(t.isLoop()||t.isCatchClause()||t.isFunction())&&(v.ensureBlock(t.node),t=t.get("body"));var r=e.unique,n=e.kind||"var",i=null==e._blockHoist?2:e._blockHoist,s="declaration:"+n+":"+i,a=!r&&t.getData(s);if(!a){var o=v.variableDeclaration(n,[]);o._generated=!0,o._blockHoist=i;a=t.unshiftContainer("body",[o])[0],r||t.setData(s,a)}var u=v.variableDeclarator(e.id,e.init);a.node.declarations.push(u),this.registerBinding(n,a.get("declarations").pop())},e.prototype.getProgramParent=function(){var e=this;do{if(e.path.isProgram())return e}while(e=e.parent);throw new Error("We couldn't find a Function or Program...")},e.prototype.getFunctionParent=function(){var e=this;do{if(e.path.isFunctionParent())return e}while(e=e.parent);throw new Error("We couldn't find a Function or Program...")},e.prototype.getBlockParent=function(){var e=this;do{if(e.path.isBlockParent())return e}while(e=e.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")},e.prototype.getAllBindings=function(){var e=(0,o.default)(null),t=this;do{(0,m.default)(e,t.bindings),t=t.parent}while(t);return e},e.prototype.getAllBindingsOfKind=function(){var e=(0,o.default)(null),t=arguments,r=Array.isArray(t),n=0;for(t=r?t:(0,c.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i,a=this;do{for(var u in a.bindings){var l=a.bindings[u];l.kind===s&&(e[u]=l)}a=a.parent}while(a)}return e},e.prototype.bindingIdentifierEquals=function(e,t){return this.getBindingIdentifier(e)===t},e.prototype.warnOnFlowBinding=function(e){return 0===E&&e&&e.path.isFlow()&&console.warn("\n You or one of the Babel plugins you are using are using Flow declarations as bindings.\n Support for this will be removed in version 7. To find out the caller, grep for this\n message and change it to a `console.trace()`.\n "),e},e.prototype.getBinding=function(e){var t=this;do{var r=t.getOwnBinding(e);if(r)return this.warnOnFlowBinding(r)}while(t=t.parent)},e.prototype.getOwnBinding=function(e){return this.warnOnFlowBinding(this.bindings[e])},e.prototype.getBindingIdentifier=function(e){var t=this.getBinding(e);return t&&t.identifier},e.prototype.getOwnBindingIdentifier=function(e){var t=this.bindings[e];return t&&t.identifier},e.prototype.hasOwnBinding=function(e){return!!this.getOwnBinding(e)},e.prototype.hasBinding=function(t,r){return!!t&&(!!this.hasOwnBinding(t)||(!!this.parentHasBinding(t,r)||(!!this.hasUid(t)||(!(r||!(0,p.default)(e.globals,t))||!(r||!(0,p.default)(e.contextVariables,t))))))},e.prototype.parentHasBinding=function(e,t){return this.parent&&this.parent.hasBinding(e,t)},e.prototype.moveBindingTo=function(e,t){var r=this.getBinding(e);r&&(r.scope.removeOwnBinding(e),r.scope=t,t.bindings[e]=r)},e.prototype.removeOwnBinding=function(e){delete this.bindings[e]},e.prototype.removeBinding=function(e){var t=this.getBinding(e);t&&t.scope.removeOwnBinding(e);var r=this;do{r.uids[e]&&(r.uids[e]=!1)}while(r=r.parent)},e}();S.globals=(0,a.default)(b.default.builtin),S.contextVariables=["arguments","undefined","Infinity","NaN"],r.default=S,t.exports=r.default},{"../cache":140,"../index":143,"./binding":161,"./lib/renamer":163,"babel-messages":110,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/map":122,"babel-runtime/core-js/object/create":125,"babel-runtime/core-js/object/keys":127,"babel-runtime/helpers/classCallCheck":134,"babel-types":180,globals:168,"lodash/defaults":495,"lodash/includes":507,"lodash/repeat":530}],163:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/classCallCheck")),s=(n(e("../binding")),function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"))),a={ReferencedIdentifier:function(e,t){var r=e.node;r.name===t.oldName&&(r.name=t.newName)},Scope:function(e,t){e.scope.bindingIdentifierEquals(t.oldName,t.binding.identifier)||e.skip()},"AssignmentExpression|Declaration":function(e,t){var r=e.getOuterBindingIdentifiers();for(var n in r)n===t.oldName&&(r[n].name=t.newName)}},o=function(){function e(t,r,n){(0,i.default)(this,e),this.newName=n,this.oldName=r,this.binding=t}return e.prototype.maybeConvertFromExportDeclaration=function(e){var t=e.parentPath.isExportDeclaration()&&e.parentPath;if(t){var r=t.isExportDefaultDeclaration();r&&(e.isFunctionDeclaration()||e.isClassDeclaration())&&!e.node.id&&(e.node.id=e.scope.generateUidIdentifier("default"));var n=e.getOuterBindingIdentifiers(),i=[];for(var a in n){var o=a===this.oldName?this.newName:a,u=r?"default":a;i.push(s.exportSpecifier(s.identifier(o),s.identifier(u)))}if(i.length){var l=s.exportNamedDeclaration(null,i);e.isFunctionDeclaration()&&(l._blockHoist=3),t.insertAfter(l),t.replaceWith(e.node)}}},e.prototype.rename=function(e){var t=this.binding,r=this.oldName,n=this.newName,i=t.scope,s=t.path.find(function(e){return e.isDeclaration()||e.isFunctionExpression()});s&&this.maybeConvertFromExportDeclaration(s),i.traverse(e||i.block,a,this),e||(i.removeOwnBinding(r),i.bindings[n]=t,this.binding.identifier.name=n),t.type},e}();r.default=o,t.exports=r.default},{"../binding":161,"babel-runtime/helpers/classCallCheck":134,"babel-types":180}],164:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){if(e._exploded)return e;e._exploded=!0;for(var t in e)if(!l(t)){var r=t.split("|");if(1!==r.length){var n=e[t];delete e[t];var i=r,s=Array.isArray(i),o=0;for(i=s?i:(0,f.default)(i);;){var p;if(s){if(o>=i.length)break;p=i[o++]}else{if((o=i.next()).done)break;p=o.value}e[p]=n}}}a(e),delete e.__esModule,function(e){for(var t in e)if(!l(t)){var r=e[t];"function"==typeof r&&(e[t]={enter:r})}}(e),u(e);var m=(0,h.default)(e),b=Array.isArray(m),v=0;for(m=b?m:(0,f.default)(m);;){var x;if(b){if(v>=m.length)break;x=m[v++]}else{if((v=m.next()).done)break;x=v.value}var E=x;if(!l(E)){var A=d[E];if(A){var D=e[E];for(var S in D)D[S]=function(e,t){var r=function(r){if(e.checkPath(r))return t.apply(this,arguments)};return r.toString=function(){return t.toString()},r}(A,D[S]);if(delete e[E],A.types){var C=A.types,_=Array.isArray(C),w=0;for(C=_?C:(0,f.default)(C);;){var k;if(_){if(w>=C.length)break;k=C[w++]}else{if((w=C.next()).done)break;k=w.value}var F=k;e[F]?c(e[F],D):e[F]=D}}else c(e,D)}}}for(var T in e)if(!l(T)){var P=e[T],B=y.FLIPPED_ALIAS_KEYS[T],O=y.DEPRECATED_KEYS[T];if(O&&(console.trace("Visitor defined for "+T+" but it has been renamed to "+O),B=[O]),B){delete e[T];var N=B,j=Array.isArray(N),I=0;for(N=j?N:(0,f.default)(N);;){var L;if(j){if(I>=N.length)break;L=N[I++]}else{if((I=N.next()).done)break;L=I.value}var M=L,R=e[M];R?c(R,P):e[M]=(0,g.default)(P)}}}for(var V in e)l(V)||u(e[V]);return e}function a(e){if(!e._verified){if("function"==typeof e)throw new Error(m.get("traverseVerifyRootFunction"));for(var t in e)if("enter"!==t&&"exit"!==t||o(t,e[t]),!l(t)){if(y.TYPES.indexOf(t)<0)throw new Error(m.get("traverseVerifyNodeType",t));var r=e[t];if("object"===(void 0===r?"undefined":(0,p.default)(r)))for(var n in r){if("enter"!==n&&"exit"!==n)throw new Error(m.get("traverseVerifyVisitorProperty",t,n));o(t+"."+n,r[n])}}e._verified=!0}}function o(e,t){var r=[].concat(t),n=Array.isArray(r),i=0;for(r=n?r:(0,f.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;if("function"!=typeof a)throw new TypeError("Non-function found defined in "+e+" with type "+(void 0===a?"undefined":(0,p.default)(a)))}}function u(e){e.enter&&!Array.isArray(e.enter)&&(e.enter=[e.enter]),e.exit&&!Array.isArray(e.exit)&&(e.exit=[e.exit])}function l(e){return"_"===e[0]||("enter"===e||"exit"===e||"shouldSkip"===e||("blacklist"===e||"noScope"===e||"skipKeys"===e))}function c(e,t){for(var r in t)e[r]=[].concat(e[r]||[],t[r])}r.__esModule=!0;var p=i(e("babel-runtime/helpers/typeof")),h=i(e("babel-runtime/core-js/object/keys")),f=i(e("babel-runtime/core-js/get-iterator"));r.explode=s,r.verify=a,r.merge=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2],n={},i=0;i=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},r.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),r.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],r.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},r.enable(i())}).call(this,e("_process"))},{"./debug":166,_process:550}],166:[function(e,t,r){arguments[4][60][0].apply(r,arguments)},{dup:60,ms:543}],167:[function(e,t,r){t.exports={builtin:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},es5:{Array:!1,Boolean:!1,constructor:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,propertyIsEnumerable:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1},es6:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},browser:{addEventListener:!1,alert:!1,AnalyserNode:!1,Animation:!1,AnimationEffectReadOnly:!1,AnimationEffectTiming:!1,AnimationEffectTimingReadOnly:!1,AnimationEvent:!1,AnimationPlaybackEvent:!1,AnimationTimeline:!1,applicationCache:!1,ApplicationCache:!1,ApplicationCacheErrorEvent:!1,atob:!1,Attr:!1,Audio:!1,AudioBuffer:!1,AudioBufferSourceNode:!1,AudioContext:!1,AudioDestinationNode:!1,AudioListener:!1,AudioNode:!1,AudioParam:!1,AudioProcessingEvent:!1,AutocompleteErrorEvent:!1,BarProp:!1,BatteryManager:!1,BeforeUnloadEvent:!1,BiquadFilterNode:!1,Blob:!1,blur:!1,btoa:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,cancelIdleCallback:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,CDATASection:!1,ChannelMergerNode:!1,ChannelSplitterNode:!1,CharacterData:!1,clearInterval:!1,clearTimeout:!1,clientInformation:!1,ClientRect:!1,ClientRectList:!1,ClipboardEvent:!1,close:!1,closed:!1,CloseEvent:!1,Comment:!1,CompositionEvent:!1,confirm:!1,console:!1,ConvolverNode:!1,createImageBitmap:!1,Credential:!1,CredentialsContainer:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSS:!1,CSSAnimation:!1,CSSFontFaceRule:!1,CSSImportRule:!1,CSSKeyframeRule:!1,CSSKeyframesRule:!1,CSSMediaRule:!1,CSSPageRule:!1,CSSRule:!1,CSSRuleList:!1,CSSStyleDeclaration:!1,CSSStyleRule:!1,CSSStyleSheet:!1,CSSSupportsRule:!1,CSSTransition:!1,CSSUnknownRule:!1,CSSViewportRule:!1,customElements:!1,CustomEvent:!1,DataTransfer:!1,DataTransferItem:!1,DataTransferItemList:!1,Debug:!1,defaultStatus:!1,defaultstatus:!1,DelayNode:!1,DeviceMotionEvent:!1,DeviceOrientationEvent:!1,devicePixelRatio:!1,dispatchEvent:!1,document:!1,Document:!1,DocumentFragment:!1,DocumentTimeline:!1,DocumentType:!1,DOMError:!1,DOMException:!1,DOMImplementation:!1,DOMParser:!1,DOMSettableTokenList:!1,DOMStringList:!1,DOMStringMap:!1,DOMTokenList:!1,DragEvent:!1,DynamicsCompressorNode:!1,Element:!1,ElementTimeControl:!1,ErrorEvent:!1,event:!1,Event:!1,EventSource:!1,EventTarget:!1,external:!1,FederatedCredential:!1,fetch:!1,File:!1,FileError:!1,FileList:!1,FileReader:!1,find:!1,focus:!1,FocusEvent:!1,FontFace:!1,FormData:!1,frameElement:!1,frames:!1,GainNode:!1,Gamepad:!1,GamepadButton:!1,GamepadEvent:!1,getComputedStyle:!1,getSelection:!1,HashChangeEvent:!1,Headers:!1,history:!1,History:!1,HTMLAllCollection:!1,HTMLAnchorElement:!1,HTMLAppletElement:!1,HTMLAreaElement:!1,HTMLAudioElement:!1,HTMLBaseElement:!1,HTMLBlockquoteElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLCollection:!1,HTMLContentElement:!1,HTMLDataListElement:!1,HTMLDetailsElement:!1,HTMLDialogElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLDocument:!1,HTMLElement:!1,HTMLEmbedElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormControlsCollection:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLIsIndexElement:!1,HTMLKeygenElement:!1,HTMLLabelElement:!1,HTMLLayerElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMarqueeElement:!1,HTMLMediaElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLMeterElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLOptionsCollection:!1,HTMLOutputElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPictureElement:!1,HTMLPreElement:!1,HTMLProgressElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLShadowElement:!1,HTMLSourceElement:!1,HTMLSpanElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTemplateElement:!1,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLTrackElement:!1,HTMLUListElement:!1,HTMLUnknownElement:!1,HTMLVideoElement:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBEnvironment:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,Image:!1,ImageBitmap:!1,ImageData:!1,indexedDB:!1,innerHeight:!1,innerWidth:!1,InputEvent:!1,InputMethodContext:!1,IntersectionObserver:!1,IntersectionObserverEntry:!1,Intl:!1,KeyboardEvent:!1,KeyframeEffect:!1,KeyframeEffectReadOnly:!1,length:!1,localStorage:!1,location:!1,Location:!1,locationbar:!1,matchMedia:!1,MediaElementAudioSourceNode:!1,MediaEncryptedEvent:!1,MediaError:!1,MediaKeyError:!1,MediaKeyEvent:!1,MediaKeyMessageEvent:!1,MediaKeys:!1,MediaKeySession:!1,MediaKeyStatusMap:!1,MediaKeySystemAccess:!1,MediaList:!1,MediaQueryList:!1,MediaQueryListEvent:!1,MediaSource:!1,MediaRecorder:!1,MediaStream:!1,MediaStreamAudioDestinationNode:!1,MediaStreamAudioSourceNode:!1,MediaStreamEvent:!1,MediaStreamTrack:!1,menubar:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MIDIAccess:!1,MIDIConnectionEvent:!1,MIDIInput:!1,MIDIInputMap:!1,MIDIMessageEvent:!1,MIDIOutput:!1,MIDIOutputMap:!1,MIDIPort:!1,MimeType:!1,MimeTypeArray:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationEvent:!1,MutationObserver:!1,MutationRecord:!1,name:!1,NamedNodeMap:!1,navigator:!1,Navigator:!1,Node:!1,NodeFilter:!1,NodeIterator:!1,NodeList:!1,Notification:!1,OfflineAudioCompletionEvent:!1,OfflineAudioContext:!1,offscreenBuffering:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,opera:!1,Option:!1,OscillatorNode:!1,outerHeight:!1,outerWidth:!1,PageTransitionEvent:!1,pageXOffset:!1,pageYOffset:!1,parent:!1,PasswordCredential:!1,Path2D:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,PeriodicWave:!1,Permissions:!1,PermissionStatus:!1,personalbar:!1,Plugin:!1,PluginArray:!1,PopStateEvent:!1,postMessage:!1,print:!1,ProcessingInstruction:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,prompt:!1,PushManager:!1,PushSubscription:!1,RadioNodeList:!1,Range:!1,ReadableByteStream:!1,ReadableStream:!1,removeEventListener:!1,Request:!1,requestAnimationFrame:!1,requestIdleCallback:!1,resizeBy:!1,resizeTo:!1,Response:!1,RTCIceCandidate:!1,RTCSessionDescription:!1,RTCPeerConnection:!1,screen:!1,Screen:!1,screenLeft:!1,ScreenOrientation:!1,screenTop:!1,screenX:!1,screenY:!1,ScriptProcessorNode:!1,scroll:!1,scrollbars:!1,scrollBy:!1,scrollTo:!1,scrollX:!1,scrollY:!1,SecurityPolicyViolationEvent:!1,Selection:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerRegistration:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,ShadowRoot:!1,SharedKeyframeList:!1,SharedWorker:!1,showModalDialog:!1,SiteBoundCredential:!1,speechSynthesis:!1,SpeechSynthesisEvent:!1,SpeechSynthesisUtterance:!1,status:!1,statusbar:!1,stop:!1,Storage:!1,StorageEvent:!1,styleMedia:!1,StyleSheet:!1,StyleSheetList:!1,SubtleCrypto:!1,SVGAElement:!1,SVGAltGlyphDefElement:!1,SVGAltGlyphElement:!1,SVGAltGlyphItemElement:!1,SVGAngle:!1,SVGAnimateColorElement:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPathData:!1,SVGAnimatedPoints:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimationElement:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGColor:!1,SVGColorProfileElement:!1,SVGColorProfileRule:!1,SVGComponentTransferFunctionElement:!1,SVGCSSRule:!1,SVGCursorElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGDiscardElement:!1,SVGDocument:!1,SVGElement:!1,SVGElementInstance:!1,SVGElementInstanceList:!1,SVGEllipseElement:!1,SVGEvent:!1,SVGExternalResourcesRequired:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEDropShadowElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGFilterPrimitiveStandardAttributes:!1,SVGFitToViewBox:!1,SVGFontElement:!1,SVGFontFaceElement:!1,SVGFontFaceFormatElement:!1,SVGFontFaceNameElement:!1,SVGFontFaceSrcElement:!1,SVGFontFaceUriElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGeometryElement:!1,SVGGlyphElement:!1,SVGGlyphRefElement:!1,SVGGradientElement:!1,SVGGraphicsElement:!1,SVGHKernElement:!1,SVGICCColor:!1,SVGImageElement:!1,SVGLangSpace:!1,SVGLength:!1,SVGLengthList:!1,SVGLinearGradientElement:!1,SVGLineElement:!1,SVGLocatable:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMissingGlyphElement:!1,SVGMPathElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPaint:!1,SVGPathElement:!1,SVGPathSeg:!1,SVGPathSegArcAbs:!1,SVGPathSegArcRel:!1,SVGPathSegClosePath:!1,SVGPathSegCurvetoCubicAbs:!1,SVGPathSegCurvetoCubicRel:!1,SVGPathSegCurvetoCubicSmoothAbs:!1,SVGPathSegCurvetoCubicSmoothRel:!1,SVGPathSegCurvetoQuadraticAbs:!1,SVGPathSegCurvetoQuadraticRel:!1,SVGPathSegCurvetoQuadraticSmoothAbs:!1,SVGPathSegCurvetoQuadraticSmoothRel:!1,SVGPathSegLinetoAbs:!1,SVGPathSegLinetoHorizontalAbs:!1,SVGPathSegLinetoHorizontalRel:!1,SVGPathSegLinetoRel:!1,SVGPathSegLinetoVerticalAbs:!1,SVGPathSegLinetoVerticalRel:!1,SVGPathSegList:!1,SVGPathSegMovetoAbs:!1,SVGPathSegMovetoRel:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGRenderingIntent:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStylable:!1,SVGStyleElement:!1,SVGSVGElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTests:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformable:!1,SVGTransformList:!1,SVGTRefElement:!1,SVGTSpanElement:!1,SVGUnitTypes:!1,SVGURIReference:!1,SVGUseElement:!1,SVGViewElement:!1,SVGViewSpec:!1,SVGVKernElement:!1,SVGZoomAndPan:!1,SVGZoomEvent:!1,Text:!1,TextDecoder:!1,TextEncoder:!1,TextEvent:!1,TextMetrics:!1,TextTrack:!1,TextTrackCue:!1,TextTrackCueList:!1,TextTrackList:!1,TimeEvent:!1,TimeRanges:!1,toolbar:!1,top:!1,Touch:!1,TouchEvent:!1,TouchList:!1,TrackEvent:!1,TransitionEvent:!1,TreeWalker:!1,UIEvent:!1,URL:!1,URLSearchParams:!1,ValidityState:!1,VTTCue:!1,WaveShaperNode:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLProgram:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLTexture:!1,WebGLUniformLocation:!1,WebSocket:!1,WheelEvent:!1,window:!1,Window:!1,Worker:!1,XDomainRequest:!1,XMLDocument:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestProgressEvent:!1,XMLHttpRequestUpload:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1,XSLTProcessor:!1},worker:{applicationCache:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Cache:!1,caches:!1,clearInterval:!1,clearTimeout:!1,close:!0,console:!1,fetch:!1,FileReaderSync:!1,FormData:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,ImageData:!1,importScripts:!0,indexedDB:!1,location:!1,MessageChannel:!1,MessagePort:!1,name:!1,navigator:!1,Notification:!1,onclose:!0,onconnect:!0,onerror:!0,onlanguagechange:!0,onmessage:!0,onoffline:!0,ononline:!0,onrejectionhandled:!0,onunhandledrejection:!0,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,postMessage:!0,Promise:!1,Request:!1,Response:!1,self:!0,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,TextDecoder:!1,TextEncoder:!1,URL:!1,URLSearchParams:!1,WebSocket:!1,Worker:!1,XMLHttpRequest:!1},node:{__dirname:!1,__filename:!1,arguments:!1,Buffer:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,console:!1,exports:!0,GLOBAL:!1,global:!1,Intl:!1,module:!1,process:!1,require:!1,root:!1,setImmediate:!1,setInterval:!1,setTimeout:!1},commonjs:{exports:!0,module:!1,require:!1,global:!1},amd:{define:!1,require:!1},mocha:{after:!1,afterEach:!1,before:!1,beforeEach:!1,context:!1,describe:!1,it:!1,mocha:!1,run:!1,setup:!1,specify:!1,suite:!1,suiteSetup:!1,suiteTeardown:!1,teardown:!1,test:!1,xcontext:!1,xdescribe:!1,xit:!1,xspecify:!1},jasmine:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fail:!1,fdescribe:!1,fit:!1,it:!1,jasmine:!1,pending:!1,runs:!1,spyOn:!1,spyOnProperty:!1,waits:!1,waitsFor:!1,xdescribe:!1,xit:!1},jest:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,check:!1,describe:!1,expect:!1,gen:!1,it:!1,fdescribe:!1,fit:!1,jest:!1,pit:!1,require:!1,test:!1,xdescribe:!1,xit:!1,xtest:!1},qunit:{asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notOk:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,throws:!1},phantomjs:{console:!0,exports:!0,phantom:!0,require:!0,WebPage:!0},couch:{emit:!1,exports:!1,getRow:!1,log:!1,module:!1,provides:!1,require:!1,respond:!1,send:!1,start:!1,sum:!1},rhino:{defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},nashorn:{__DIR__:!1,__FILE__:!1,__LINE__:!1,com:!1,edu:!1,exit:!1,Java:!1,java:!1,javafx:!1,JavaImporter:!1,javax:!1,JSAdapter:!1,load:!1,loadWithNewGlobal:!1,org:!1,Packages:!1,print:!1,quit:!1},wsh:{ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WScript:!0,WSH:!0,XDomainRequest:!0},jquery:{$:!1,jQuery:!1},yui:{Y:!1,YUI:!1,YUI_config:!1},shelljs:{cat:!1,cd:!1,chmod:!1,config:!1,cp:!1,dirs:!1,echo:!1,env:!1,error:!1,exec:!1,exit:!1,find:!1,grep:!1,ls:!1,ln:!1,mkdir:!1,mv:!1,popd:!1,pushd:!1,pwd:!1,rm:!1,sed:!1,set:!1,target:!1,tempdir:!1,test:!1,touch:!1,which:!1},prototypejs:{$:!1,$$:!1,$A:!1,$break:!1,$continue:!1,$F:!1,$H:!1,$R:!1,$w:!1,Abstract:!1,Ajax:!1,Autocompleter:!1,Builder:!1,Class:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Element:!1,Enumerable:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Scriptaculous:!1,Selector:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Template:!1,Toggle:!1,Try:!1},meteor:{$:!1,_:!1,Accounts:!1,AccountsClient:!1,AccountsServer:!1,AccountsCommon:!1,App:!1,Assets:!1,Blaze:!1,check:!1,Cordova:!1,DDP:!1,DDPServer:!1,DDPRateLimiter:!1,Deps:!1,EJSON:!1,Email:!1,HTTP:!1,Log:!1,Match:!1,Meteor:!1,Mongo:!1,MongoInternals:!1,Npm:!1,Package:!1,Plugin:!1,process:!1,Random:!1,ReactiveDict:!1,ReactiveVar:!1,Router:!1,ServiceConfiguration:!1,Session:!1,share:!1,Spacebars:!1,Template:!1,Tinytest:!1,Tracker:!1,UI:!1,Utils:!1,WebApp:!1,WebAppInternals:!1},mongo:{_isWindows:!1,_rand:!1,BulkWriteResult:!1,cat:!1,cd:!1,connect:!1,db:!1,getHostName:!1,getMemInfo:!1,hostname:!1,ISODate:!1,listFiles:!1,load:!1,ls:!1,md5sumFile:!1,mkdir:!1,Mongo:!1,NumberInt:!1,NumberLong:!1,ObjectId:!1,PlanCache:!1,print:!1,printjson:!1,pwd:!1,quit:!1,removeFile:!1,rs:!1,sh:!1,UUID:!1,version:!1,WriteResult:!1},applescript:{$:!1,Application:!1,Automation:!1,console:!1,delay:!1,Library:!1,ObjC:!1,ObjectSpecifier:!1,Path:!1,Progress:!1,Ref:!1},serviceworker:{caches:!1,Cache:!1,CacheStorage:!1,Client:!1,clients:!1,Clients:!1,ExtendableEvent:!1,ExtendableMessageEvent:!1,FetchEvent:!1,importScripts:!1,registration:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerGlobalScope:!1,ServiceWorkerMessageEvent:!1,ServiceWorkerRegistration:!1,skipWaiting:!1,WindowClient:!1},atomtest:{advanceClock:!1,fakeClearInterval:!1,fakeClearTimeout:!1,fakeSetInterval:!1,fakeSetTimeout:!1,resetTimeouts:!1,waitsForPromise:!1},embertest:{andThen:!1,click:!1,currentPath:!1,currentRouteName:!1,currentURL:!1,fillIn:!1,find:!1,findWithAssert:!1,keyEvent:!1,pauseTest:!1,resumeTest:!1,triggerEvent:!1,visit:!1},protractor:{$:!1,$$:!1,browser:!1,By:!1,by:!1,DartObject:!1,element:!1,protractor:!1},"shared-node-browser":{clearInterval:!1,clearTimeout:!1,console:!1,setInterval:!1,setTimeout:!1},webextensions:{browser:!1,chrome:!1,opr:!1},greasemonkey:{GM_addStyle:!1,GM_deleteValue:!1,GM_getResourceText:!1,GM_getResourceURL:!1,GM_getValue:!1,GM_info:!1,GM_listValues:!1,GM_log:!1,GM_openInTab:!1,GM_registerMenuCommand:!1,GM_setClipboard:!1,GM_setValue:!1,GM_xmlhttpRequest:!1,unsafeWindow:!1}}},{}],168:[function(e,t,r){t.exports=e("./globals.json")},{"./globals.json":167}],169:[function(e,t,r){"use strict";r.__esModule=!0,r.NOT_LOCAL_BINDING=r.BLOCK_SCOPED_SYMBOL=r.INHERIT_KEYS=r.UNARY_OPERATORS=r.STRING_UNARY_OPERATORS=r.NUMBER_UNARY_OPERATORS=r.BOOLEAN_UNARY_OPERATORS=r.BINARY_OPERATORS=r.NUMBER_BINARY_OPERATORS=r.BOOLEAN_BINARY_OPERATORS=r.COMPARISON_BINARY_OPERATORS=r.EQUALITY_BINARY_OPERATORS=r.BOOLEAN_NUMBER_BINARY_OPERATORS=r.UPDATE_OPERATORS=r.LOGICAL_OPERATORS=r.COMMENT_KEYS=r.FOR_INIT_KEYS=r.FLATTENABLE_KEYS=r.STATEMENT_OR_BLOCK_KEYS=void 0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/symbol/for")),i=(r.STATEMENT_OR_BLOCK_KEYS=["consequent","body","alternate"],r.FLATTENABLE_KEYS=["body","expressions"],r.FOR_INIT_KEYS=["left","init"],r.COMMENT_KEYS=["leadingComments","trailingComments","innerComments"],r.LOGICAL_OPERATORS=["||","&&"],r.UPDATE_OPERATORS=["++","--"],r.BOOLEAN_NUMBER_BINARY_OPERATORS=[">","<",">=","<="]),s=r.EQUALITY_BINARY_OPERATORS=["==","===","!=","!=="],a=r.COMPARISON_BINARY_OPERATORS=[].concat(s,["in","instanceof"]),o=r.BOOLEAN_BINARY_OPERATORS=[].concat(a,i),u=r.NUMBER_BINARY_OPERATORS=["-","/","%","*","**","&","|",">>",">>>","<<","^"],l=(r.BINARY_OPERATORS=["+"].concat(u,o),r.BOOLEAN_UNARY_OPERATORS=["delete","!"]),c=r.NUMBER_UNARY_OPERATORS=["+","-","++","--","~"],p=r.STRING_UNARY_OPERATORS=["typeof"];r.UNARY_OPERATORS=["void"].concat(l,c,p),r.INHERIT_KEYS={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]},r.BLOCK_SCOPED_SYMBOL=(0,n.default)("var used to be block scoped"),r.NOT_LOCAL_BINDING=(0,n.default)("should not be considered a local binding")},{"babel-runtime/core-js/symbol/for":130}],170:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t,r){var n=[],s=!0,a=e,o=Array.isArray(a),u=0;for(a=o?a:(0,l.default)(a);;){var c;if(o){if(u>=a.length)break;c=a[u++]}else{if((u=a.next()).done)break;c=u.value}var p=c;if(s=!1,h.isExpression(p))n.push(p);else if(h.isExpressionStatement(p))n.push(p.expression);else if(h.isVariableDeclaration(p)){if("var"!==p.kind)return;var f=p.declarations,d=Array.isArray(f),m=0;for(f=d?f:(0,l.default)(f);;){var y;if(d){if(m>=f.length)break;y=f[m++]}else{if((m=f.next()).done)break;y=m.value}var g=y,b=h.getBindingIdentifiers(g);for(var v in b)r.push({kind:p.kind,id:b[v]});g.init&&n.push(h.assignmentExpression("=",g.id,g.init))}s=!0}else if(h.isIfStatement(p)){var x=p.consequent?i([p.consequent],t,r):t.buildUndefinedNode(),E=p.alternate?i([p.alternate],t,r):t.buildUndefinedNode();if(!x||!E)return;n.push(h.conditionalExpression(p.test,x,E))}else if(h.isBlockStatement(p)){var A=i(p.body,t,r);if(!A)return;n.push(A)}else{if(!h.isEmptyStatement(p))return;s=!0}}return s&&n.push(t.buildUndefinedNode()),1===n.length?n[0]:h.sequenceExpression(n)}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.key,r=void 0;return"method"===e.kind?s.increment()+"":(r=h.isIdentifier(t)?t.name:h.isStringLiteral(t)?(0,u.default)(t.value):(0,u.default)(h.removePropertiesDeep(h.cloneDeep(t))),e.computed&&(r="["+r+"]"),e.static&&(r="static:"+r),r)}function a(e){return e+="",e=e.replace(/[^a-zA-Z0-9$_]/g,"-"),e=e.replace(/^[-0-9]+/,""),e=e.replace(/[-\s]+(.)?/g,function(e,t){return t?t.toUpperCase():""}),h.isValidIdentifier(e)||(e="_"+e),e||"_"}r.__esModule=!0;var o=n(e("babel-runtime/core-js/number/max-safe-integer")),u=n(e("babel-runtime/core-js/json/stringify")),l=n(e("babel-runtime/core-js/get-iterator"));r.toComputedKey=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.key||e.property;return e.computed||h.isIdentifier(t)&&(t=h.stringLiteral(t.name)),t},r.toSequenceExpression=function(e,t){if(e&&e.length){var r=[],n=i(e,t,r);if(n){var s=r,a=Array.isArray(s),o=0;for(s=a?s:(0,l.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if((o=s.next()).done)break;u=o.value}var c=u;t.push(c)}return n}}},r.toKeyAlias=s,r.toIdentifier=a,r.toBindingIdentifierName=function(e){return"eval"!==(e=a(e))&&"arguments"!==e||(e="_"+e),e},r.toStatement=function(e,t){if(h.isStatement(e))return e;var r=!1,n=void 0;if(h.isClass(e))r=!0,n="ClassDeclaration";else if(h.isFunction(e))r=!0,n="FunctionDeclaration";else if(h.isAssignmentExpression(e))return h.expressionStatement(e);if(r&&!e.id&&(n=!1),!n){if(t)return!1;throw new Error("cannot turn "+e.type+" to a statement")}return e.type=n,e},r.toExpression=function(e){if(h.isExpressionStatement(e)&&(e=e.expression),h.isExpression(e))return e;if(h.isClass(e)?e.type="ClassExpression":h.isFunction(e)&&(e.type="FunctionExpression"),!h.isExpression(e))throw new Error("cannot turn "+e.type+" to an expression");return e},r.toBlock=function(e,t){return h.isBlockStatement(e)?e:(h.isEmptyStatement(e)&&(e=[]),Array.isArray(e)||(h.isStatement(e)||(e=h.isFunction(t)?h.returnStatement(e):h.expressionStatement(e)),e=[e]),h.blockStatement(e))},r.valueToNode=function(e){if(void 0===e)return h.identifier("undefined");if(!0===e||!1===e)return h.booleanLiteral(e);if(null===e)return h.nullLiteral();if("string"==typeof e)return h.stringLiteral(e);if("number"==typeof e)return h.numericLiteral(e);if((0,p.default)(e)){var t=e.source,r=e.toString().match(/\/([a-z]+|)$/)[1];return h.regExpLiteral(t,r)}if(Array.isArray(e))return h.arrayExpression(e.map(h.valueToNode));if((0,c.default)(e)){var n=[];for(var i in e){var s=void 0;s=h.isValidIdentifier(i)?h.identifier(i):h.stringLiteral(i),n.push(h.objectProperty(s,h.valueToNode(e[i])))}return h.objectExpression(n)}throw new Error("don't know how to turn this value into a node")};var c=n(e("lodash/isPlainObject")),p=n(e("lodash/isRegExp")),h=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./index"));s.uid=0,s.increment=function(){return s.uid>=o.default?s.uid=0:s.uid++}},{"./index":180,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/json/stringify":121,"babel-runtime/core-js/number/max-safe-integer":123,"lodash/isPlainObject":518,"lodash/isRegExp":519}],171:[function(e,t,r){"use strict";var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("../index")),i=e("../constants"),s=e("./index"),a=function(e){return e&&e.__esModule?e:{default:e}}(s);(0,a.default)("ArrayExpression",{fields:{elements:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeOrValueType)("null","Expression","SpreadElement"))),default:[]}},visitor:["elements"],aliases:["Expression"]}),(0,a.default)("AssignmentExpression",{fields:{operator:{validate:(0,s.assertValueType)("string")},left:{validate:(0,s.assertNodeType)("LVal")},right:{validate:(0,s.assertNodeType)("Expression")}},builder:["operator","left","right"],visitor:["left","right"],aliases:["Expression"]}),(0,a.default)("BinaryExpression",{builder:["operator","left","right"],fields:{operator:{validate:s.assertOneOf.apply(void 0,i.BINARY_OPERATORS)},left:{validate:(0,s.assertNodeType)("Expression")},right:{validate:(0,s.assertNodeType)("Expression")}},visitor:["left","right"],aliases:["Binary","Expression"]}),(0,a.default)("Directive",{visitor:["value"],fields:{value:{validate:(0,s.assertNodeType)("DirectiveLiteral")}}}),(0,a.default)("DirectiveLiteral",{builder:["value"],fields:{value:{validate:(0,s.assertValueType)("string")}}}),(0,a.default)("BlockStatement",{builder:["body","directives"],visitor:["directives","body"],fields:{directives:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Directive"))),default:[]},body:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","Statement"]}),(0,a.default)("BreakStatement",{visitor:["label"],fields:{label:{validate:(0,s.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),(0,a.default)("CallExpression",{visitor:["callee","arguments"],fields:{callee:{validate:(0,s.assertNodeType)("Expression")},arguments:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Expression","SpreadElement")))}},aliases:["Expression"]}),(0,a.default)("CatchClause",{visitor:["param","body"],fields:{param:{validate:(0,s.assertNodeType)("Identifier")},body:{validate:(0,s.assertNodeType)("BlockStatement")}},aliases:["Scopable"]}),(0,a.default)("ConditionalExpression",{visitor:["test","consequent","alternate"],fields:{test:{validate:(0,s.assertNodeType)("Expression")},consequent:{validate:(0,s.assertNodeType)("Expression")},alternate:{validate:(0,s.assertNodeType)("Expression")}},aliases:["Expression","Conditional"]}),(0,a.default)("ContinueStatement",{visitor:["label"],fields:{label:{validate:(0,s.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),(0,a.default)("DebuggerStatement",{aliases:["Statement"]}),(0,a.default)("DoWhileStatement",{visitor:["test","body"],fields:{test:{validate:(0,s.assertNodeType)("Expression")},body:{validate:(0,s.assertNodeType)("Statement")}},aliases:["Statement","BlockParent","Loop","While","Scopable"]}),(0,a.default)("EmptyStatement",{aliases:["Statement"]}),(0,a.default)("ExpressionStatement",{visitor:["expression"],fields:{expression:{validate:(0,s.assertNodeType)("Expression")}},aliases:["Statement","ExpressionWrapper"]}),(0,a.default)("File",{builder:["program","comments","tokens"],visitor:["program"],fields:{program:{validate:(0,s.assertNodeType)("Program")}}}),(0,a.default)("ForInStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,s.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,s.assertNodeType)("Expression")},body:{validate:(0,s.assertNodeType)("Statement")}}}),(0,a.default)("ForStatement",{visitor:["init","test","update","body"],aliases:["Scopable","Statement","For","BlockParent","Loop"],fields:{init:{validate:(0,s.assertNodeType)("VariableDeclaration","Expression"),optional:!0},test:{validate:(0,s.assertNodeType)("Expression"),optional:!0},update:{validate:(0,s.assertNodeType)("Expression"),optional:!0},body:{validate:(0,s.assertNodeType)("Statement")}}}),(0,a.default)("FunctionDeclaration",{builder:["id","params","body","generator","async"],visitor:["id","params","body","returnType","typeParameters"],fields:{id:{validate:(0,s.assertNodeType)("Identifier")},params:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("LVal")))},body:{validate:(0,s.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,s.assertValueType)("boolean")},async:{default:!1,validate:(0,s.assertValueType)("boolean")}},aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"]}),(0,a.default)("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{id:{validate:(0,s.assertNodeType)("Identifier"),optional:!0},params:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("LVal")))},body:{validate:(0,s.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,s.assertValueType)("boolean")},async:{default:!1,validate:(0,s.assertValueType)("boolean")}}}),(0,a.default)("Identifier",{builder:["name"],visitor:["typeAnnotation"],aliases:["Expression","LVal"],fields:{name:{validate:function(e,t,r){n.isValidIdentifier(r)}},decorators:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Decorator")))}}}),(0,a.default)("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:(0,s.assertNodeType)("Expression")},consequent:{validate:(0,s.assertNodeType)("Statement")},alternate:{optional:!0,validate:(0,s.assertNodeType)("Statement")}}}),(0,a.default)("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:(0,s.assertNodeType)("Identifier")},body:{validate:(0,s.assertNodeType)("Statement")}}}),(0,a.default)("StringLiteral",{builder:["value"],fields:{value:{validate:(0,s.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,a.default)("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:(0,s.assertValueType)("number")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,a.default)("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]}),(0,a.default)("BooleanLiteral",{builder:["value"],fields:{value:{validate:(0,s.assertValueType)("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,a.default)("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Literal"],fields:{pattern:{validate:(0,s.assertValueType)("string")},flags:{validate:(0,s.assertValueType)("string"),default:""}}}),(0,a.default)("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:s.assertOneOf.apply(void 0,i.LOGICAL_OPERATORS)},left:{validate:(0,s.assertNodeType)("Expression")},right:{validate:(0,s.assertNodeType)("Expression")}}}),(0,a.default)("MemberExpression",{builder:["object","property","computed"],visitor:["object","property"],aliases:["Expression","LVal"],fields:{object:{validate:(0,s.assertNodeType)("Expression")},property:{validate:function(e,t,r){var n=e.computed?"Expression":"Identifier";(0,s.assertNodeType)(n)(e,t,r)}},computed:{default:!1}}}),(0,a.default)("NewExpression",{visitor:["callee","arguments"],aliases:["Expression"],fields:{callee:{validate:(0,s.assertNodeType)("Expression")},arguments:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Expression","SpreadElement")))}}}),(0,a.default)("Program",{visitor:["directives","body"],builder:["body","directives"],fields:{directives:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Directive"))),default:[]},body:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","FunctionParent"]}),(0,a.default)("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("ObjectMethod","ObjectProperty","SpreadProperty")))}}}),(0,a.default)("ObjectMethod",{builder:["kind","key","params","body","computed"],fields:{kind:{validate:(0,s.chain)((0,s.assertValueType)("string"),(0,s.assertOneOf)("method","get","set")),default:"method"},computed:{validate:(0,s.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var n=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];s.assertNodeType.apply(void 0,n)(e,t,r)}},decorators:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Decorator")))},body:{validate:(0,s.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,s.assertValueType)("boolean")},async:{default:!1,validate:(0,s.assertValueType)("boolean")}},visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]}),(0,a.default)("ObjectProperty",{builder:["key","value","computed","shorthand","decorators"],fields:{computed:{validate:(0,s.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var n=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];s.assertNodeType.apply(void 0,n)(e,t,r)}},value:{validate:(0,s.assertNodeType)("Expression","Pattern","RestElement")},shorthand:{validate:(0,s.assertValueType)("boolean"),default:!1},decorators:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Decorator"))),optional:!0}},visitor:["key","value","decorators"],aliases:["UserWhitespacable","Property","ObjectMember"]}),(0,a.default)("RestElement",{visitor:["argument","typeAnnotation"],aliases:["LVal"],fields:{argument:{validate:(0,s.assertNodeType)("LVal")},decorators:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Decorator")))}}}),(0,a.default)("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,s.assertNodeType)("Expression"),optional:!0}}}),(0,a.default)("SequenceExpression",{visitor:["expressions"],fields:{expressions:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Expression")))}},aliases:["Expression"]}),(0,a.default)("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:(0,s.assertNodeType)("Expression"),optional:!0},consequent:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Statement")))}}}),(0,a.default)("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:(0,s.assertNodeType)("Expression")},cases:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("SwitchCase")))}}}),(0,a.default)("ThisExpression",{aliases:["Expression"]}),(0,a.default)("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,s.assertNodeType)("Expression")}}}),(0,a.default)("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{body:{validate:(0,s.assertNodeType)("BlockStatement")},handler:{optional:!0,handler:(0,s.assertNodeType)("BlockStatement")},finalizer:{optional:!0,validate:(0,s.assertNodeType)("BlockStatement")}}}),(0,a.default)("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!0},argument:{validate:(0,s.assertNodeType)("Expression")},operator:{validate:s.assertOneOf.apply(void 0,i.UNARY_OPERATORS)}},visitor:["argument"],aliases:["UnaryLike","Expression"]}),(0,a.default)("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!1},argument:{validate:(0,s.assertNodeType)("Expression")},operator:{validate:s.assertOneOf.apply(void 0,i.UPDATE_OPERATORS)}},visitor:["argument"],aliases:["Expression"]}),(0,a.default)("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{kind:{validate:(0,s.chain)((0,s.assertValueType)("string"),(0,s.assertOneOf)("var","let","const"))},declarations:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("VariableDeclarator")))}}}),(0,a.default)("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:(0,s.assertNodeType)("LVal")},init:{optional:!0,validate:(0,s.assertNodeType)("Expression")}}}),(0,a.default)("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:(0,s.assertNodeType)("Expression")},body:{validate:(0,s.assertNodeType)("BlockStatement","Statement")}}}),(0,a.default)("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{object:(0,s.assertNodeType)("Expression")},body:{validate:(0,s.assertNodeType)("BlockStatement","Statement")}}})},{"../constants":169,"../index":180,"./index":175}],172:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("AssignmentPattern",{visitor:["left","right"],aliases:["Pattern","LVal"],fields:{left:{validate:(0,n.assertNodeType)("Identifier")},right:{validate:(0,n.assertNodeType)("Expression")},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ArrayPattern",{visitor:["elements","typeAnnotation"],aliases:["Pattern","LVal"],fields:{elements:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Identifier","Pattern","RestElement")))},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["params","body","returnType","typeParameters"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{params:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("LVal")))},body:{validate:(0,n.assertNodeType)("BlockStatement","Expression")},async:{validate:(0,n.assertValueType)("boolean"),default:!1}}}),(0,i.default)("ClassBody",{visitor:["body"],fields:{body:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("ClassMethod","ClassProperty")))}}}),(0,i.default)("ClassDeclaration",{builder:["id","superClass","body","decorators"],visitor:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators"],aliases:["Scopable","Class","Statement","Declaration","Pureish"],fields:{id:{validate:(0,n.assertNodeType)("Identifier")},body:{validate:(0,n.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,n.assertNodeType)("Expression")},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ClassExpression",{inherits:"ClassDeclaration",aliases:["Scopable","Class","Expression","Pureish"],fields:{id:{optional:!0,validate:(0,n.assertNodeType)("Identifier")},body:{validate:(0,n.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,n.assertNodeType)("Expression")},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ExportAllDeclaration",{visitor:["source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{source:{validate:(0,n.assertNodeType)("StringLiteral")}}}),(0,i.default)("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{validate:(0,n.assertNodeType)("FunctionDeclaration","ClassDeclaration","Expression")}}}),(0,i.default)("ExportNamedDeclaration",{visitor:["declaration","specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{validate:(0,n.assertNodeType)("Declaration"),optional:!0},specifiers:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("ExportSpecifier")))},source:{validate:(0,n.assertNodeType)("StringLiteral"),optional:!0}}}),(0,i.default)("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")},exported:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ForOfStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,n.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,n.assertNodeType)("Expression")},body:{validate:(0,n.assertNodeType)("Statement")}}}),(0,i.default)("ImportDeclaration",{visitor:["specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration"],fields:{specifiers:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier")))},source:{validate:(0,n.assertNodeType)("StringLiteral")}}}),(0,i.default)("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ImportSpecifier",{visitor:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")},imported:{validate:(0,n.assertNodeType)("Identifier")},importKind:{validate:(0,n.assertOneOf)(null,"type","typeof")}}}),(0,i.default)("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:(0,n.assertValueType)("string")},property:{validate:(0,n.assertValueType)("string")}}}),(0,i.default)("ClassMethod",{aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static"],visitor:["key","params","body","decorators","returnType","typeParameters"],fields:{kind:{validate:(0,n.chain)((0,n.assertValueType)("string"),(0,n.assertOneOf)("get","set","method","constructor")),default:"method"},computed:{default:!1,validate:(0,n.assertValueType)("boolean")},static:{default:!1,validate:(0,n.assertValueType)("boolean")},key:{validate:function(e,t,r){var i=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];n.assertNodeType.apply(void 0,i)(e,t,r)}},params:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("LVal")))},body:{validate:(0,n.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,n.assertValueType)("boolean")},async:{default:!1,validate:(0,n.assertValueType)("boolean")}}}),(0,i.default)("ObjectPattern",{visitor:["properties","typeAnnotation"],aliases:["Pattern","LVal"],fields:{properties:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("RestProperty","Property")))},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("Super",{aliases:["Expression"]}),(0,i.default)("TaggedTemplateExpression",{visitor:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:(0,n.assertNodeType)("Expression")},quasi:{validate:(0,n.assertNodeType)("TemplateLiteral")}}}),(0,i.default)("TemplateElement",{builder:["value","tail"],fields:{value:{},tail:{validate:(0,n.assertValueType)("boolean"),default:!1}}}),(0,i.default)("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("TemplateElement")))},expressions:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Expression")))}}}),(0,i.default)("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:(0,n.assertValueType)("boolean"),default:!1},argument:{optional:!0,validate:(0,n.assertNodeType)("Expression")}}})},{"./index":175}],173:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("ForAwaitStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,n.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,n.assertNodeType)("Expression")},body:{validate:(0,n.assertNodeType)("Statement")}}}),(0,i.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:{}}),(0,i.default)("Import",{aliases:["Expression"]}),(0,i.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("DoExpression",{visitor:["body"],aliases:["Expression"],fields:{body:{validate:(0,n.assertNodeType)("BlockStatement")}}}),(0,i.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("RestProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,n.assertNodeType)("LVal")}}}),(0,i.default)("SpreadProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}})},{"./index":175}],174:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("AnyTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["Flow"],fields:{}}),(0,i.default)("BooleanTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("BooleanLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,i.default)("NullLiteralTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("ClassImplements",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,i.default)("ClassProperty",{visitor:["key","value","typeAnnotation","decorators"],builder:["key","value","typeAnnotation","decorators","computed"],aliases:["Property"],fields:{computed:{validate:(0,n.assertValueType)("boolean"),default:!1}}}),(0,i.default)("DeclareClass",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareFunction",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareInterface",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareModule",{visitor:["id","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareOpaqueType",{visitor:["id","typeParameters","supertype"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareVariable",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareExportDeclaration",{visitor:["declaration","specifiers","source"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("ExistentialTypeParam",{aliases:["Flow"]}),(0,i.default)("FunctionTypeAnnotation",{visitor:["typeParameters","params","rest","returnType"],aliases:["Flow"],fields:{}}),(0,i.default)("FunctionTypeParam",{visitor:["name","typeAnnotation"],aliases:["Flow"],fields:{}}),(0,i.default)("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,i.default)("InterfaceExtends",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,i.default)("InterfaceDeclaration",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("IntersectionTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,i.default)("MixedTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]}),(0,i.default)("EmptyTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]}),(0,i.default)("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}}),(0,i.default)("NumericLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,i.default)("NumberTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("StringLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,i.default)("StringTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("ThisTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("TupleTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeofTypeAnnotation",{visitor:["argument"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("OpaqueType",{visitor:["id","typeParameters","impltype","supertype"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("TypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["Flow","ExpressionWrapper","Expression"],fields:{}}),(0,i.default)("TypeParameter",{visitor:["bound"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeParameterDeclaration",{visitor:["params"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeParameterInstantiation",{visitor:["params"],aliases:["Flow"],fields:{}}),(0,i.default)("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties"],aliases:["Flow"],fields:{}}),(0,i.default)("ObjectTypeCallProperty",{visitor:["value"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("ObjectTypeIndexer",{visitor:["id","key","value"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("ObjectTypeProperty",{visitor:["key","value"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("ObjectTypeSpreadProperty",{visitor:["argument"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("QualifiedTypeIdentifier",{visitor:["id","qualification"],aliases:["Flow"],fields:{}}),(0,i.default)("UnionTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,i.default)("VoidTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}})},{"./index":175}],175:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return Array.isArray(e)?"array":null===e?"null":void 0===e?"undefined":void 0===e?"undefined":(0,u.default)(e)}function s(e){function t(t,r,n){if(!(i(n)===e))throw new TypeError("Property "+r+" expected type of "+e+" but got "+i(n))}return t.type=e,t}r.__esModule=!0,r.DEPRECATED_KEYS=r.BUILDER_KEYS=r.NODE_FIELDS=r.ALIAS_KEYS=r.VISITOR_KEYS=void 0;var a=n(e("babel-runtime/core-js/get-iterator")),o=n(e("babel-runtime/core-js/json/stringify")),u=n(e("babel-runtime/helpers/typeof"));r.assertEach=function(e){function t(t,r,n){if(Array.isArray(n))for(var i=0;i=s.length)break;p=s[c++]}else{if((c=s.next()).done)break;p=c.value}var h=p;if(l.is(h,n)){i=!0;break}}if(!i)throw new TypeError("Property "+t+" of "+e.type+" expected node to be of a type "+(0,o.default)(r)+" but instead got "+(0,o.default)(n&&n.type))}for(var t=arguments.length,r=Array(t),n=0;n=u.length)break;h=u[p++]}else{if((p=u.next()).done)break;h=p.value}var f=h;if(i(n)===f||l.is(f,n)){s=!0;break}}if(!s)throw new TypeError("Property "+t+" of "+e.type+" expected node to be of a type "+(0,o.default)(r)+" but instead got "+(0,o.default)(n&&n.type))}for(var t=arguments.length,r=Array(t),n=0;n=e.length)break;i=e[n++]}else{if((n=e.next()).done)break;i=n.value}i.apply(void 0,arguments)}}for(var t=arguments.length,r=Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=t.inherits&&m[t.inherits]||{};t.fields=t.fields||r.fields||{},t.visitor=t.visitor||r.visitor||[],t.aliases=t.aliases||r.aliases||[],t.builder=t.builder||r.builder||t.visitor||[],t.deprecatedAlias&&(d[t.deprecatedAlias]=e);var n=t.visitor.concat(t.builder),o=Array.isArray(n),u=0;for(n=o?n:(0,a.default)(n);;){var l;if(o){if(u>=n.length)break;l=n[u++]}else{if((u=n.next()).done)break;l=u.value}var y=l;t.fields[y]=t.fields[y]||{}}for(var g in t.fields){var b=t.fields[g];-1===t.builder.indexOf(g)&&(b.optional=!0),void 0===b.default?b.default=null:b.validate||(b.validate=s(i(b.default)))}c[e]=t.visitor,f[e]=t.builder,h[e]=t.fields,p[e]=t.aliases,m[e]=t};var l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("../index")),c=r.VISITOR_KEYS={},p=r.ALIAS_KEYS={},h=r.NODE_FIELDS={},f=r.BUILDER_KEYS={},d=r.DEPRECATED_KEYS={},m={}},{"../index":180,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/json/stringify":121,"babel-runtime/helpers/typeof":138}],176:[function(e,t,r){"use strict";e("./index"),e("./core"),e("./es2015"),e("./flow"),e("./jsx"),e("./misc"),e("./experimental")},{"./core":171,"./es2015":172,"./experimental":173,"./flow":174,"./index":175,"./jsx":177,"./misc":178}],177:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("JSXAttribute",{visitor:["name","value"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:(0,n.assertNodeType)("JSXElement","StringLiteral","JSXExpressionContainer")}}}),(0,i.default)("JSXClosingElement",{visitor:["name"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXMemberExpression")}}}),(0,i.default)("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["JSX","Immutable","Expression"],fields:{openingElement:{validate:(0,n.assertNodeType)("JSXOpeningElement")},closingElement:{optional:!0,validate:(0,n.assertNodeType)("JSXClosingElement")},children:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement")))}}}),(0,i.default)("JSXEmptyExpression",{aliases:["JSX","Expression"]}),(0,i.default)("JSXExpressionContainer",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("JSXSpreadChild",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("JSXIdentifier",{builder:["name"],aliases:["JSX","Expression"],fields:{name:{validate:(0,n.assertValueType)("string")}}}),(0,i.default)("JSXMemberExpression",{visitor:["object","property"],aliases:["JSX","Expression"],fields:{object:{validate:(0,n.assertNodeType)("JSXMemberExpression","JSXIdentifier")},property:{validate:(0,n.assertNodeType)("JSXIdentifier")}}}),(0,i.default)("JSXNamespacedName",{visitor:["namespace","name"],aliases:["JSX"],fields:{namespace:{validate:(0,n.assertNodeType)("JSXIdentifier")},name:{validate:(0,n.assertNodeType)("JSXIdentifier")}}}),(0,i.default)("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","attributes"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXMemberExpression")},selfClosing:{default:!1,validate:(0,n.assertValueType)("boolean")},attributes:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("JSXAttribute","JSXSpreadAttribute")))}}}),(0,i.default)("JSXSpreadAttribute",{visitor:["argument"],aliases:["JSX"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("JSXText",{aliases:["JSX","Immutable"],builder:["value"],fields:{value:{validate:(0,n.assertValueType)("string")}}})},{"./index":175}],178:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("Noop",{visitor:[]}),(0,i.default)("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}})},{"./index":175}],179:[function(e,t,r){"use strict";function n(e){for(var t={},r={},s=[],a=[],o=0;o=0)){if(i.isAnyTypeAnnotation(u))return[u];if(i.isFlowBaseAnnotation(u))r[u.type]=u;else if(i.isUnionTypeAnnotation(u))s.indexOf(u.types)<0&&(e=e.concat(u.types),s.push(u.types));else if(i.isGenericTypeAnnotation(u)){var l=u.id.name;if(t[l]){var c=t[l];c.typeParameters?u.typeParameters&&(c.typeParameters.params=n(c.typeParameters.params.concat(u.typeParameters.params))):c=u.typeParameters}else t[l]=u}else a.push(u)}}for(var p in r)a.push(r[p]);for(var h in t)a.push(t[h]);return a}r.__esModule=!0,r.createUnionTypeAnnotation=function(e){var t=n(e);return 1===t.length?t[0]:i.unionTypeAnnotation(t)},r.removeTypeDuplicates=n,r.createTypeAnnotationBasedOnTypeof=function(e){if("string"===e)return i.stringTypeAnnotation();if("number"===e)return i.numberTypeAnnotation();if("undefined"===e)return i.voidTypeAnnotation();if("boolean"===e)return i.booleanTypeAnnotation();if("function"===e)return i.genericTypeAnnotation(i.identifier("Function"));if("object"===e)return i.genericTypeAnnotation(i.identifier("Object"));if("symbol"===e)return i.genericTypeAnnotation(i.identifier("Symbol"));throw new Error("Invalid typeof value")};var i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./index"))},{"./index":180}],180:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=F["is"+e];t||(t=F["is"+e]=function(t,r){return F.is(e,t,r)}),F["assert"+e]=function(r,n){if(n=n||{},!t(r,n))throw new Error("Expected type "+(0,b.default)(e)+" with option "+(0,b.default)(n))}}function s(e,t){if(e===t)return!0;if(F.ALIAS_KEYS[t])return!1;var r=F.FLIPPED_ALIAS_KEYS[t];if(r){if(r[0]===e)return!0;var n=r,i=Array.isArray(n),s=0;for(n=i?n:(0,y.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}if(e===a)return!0}}return!1}function a(e,t,r){if(e){var n=F.NODE_FIELDS[e.type];if(n){var i=n[t];i&&i.validate&&(i.optional&&null==r||i.validate(e,t,r))}}}function o(e){if(!e)return e;var t={};for(var r in e)"_"!==r[0]&&(t[r]=e[r]);return t}function u(e,t){p("trailingComments",e,t)}function l(e,t){p("leadingComments",e,t)}function c(e,t){p("innerComments",e,t)}function p(e,t,r){t&&r&&(t[e]=(0,_.default)([].concat(t[e],r[e]).filter(Boolean)))}function h(e){return!(!e||!w.VISITOR_KEYS[e.type])}function f(e,t,r){if(e){var n=F.VISITOR_KEYS[e.type];if(n){t(e,r=r||{});var i=n,s=Array.isArray(i),a=0;for(i=s?i:(0,y.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if((a=i.next()).done)break;o=a.value}var u=e[o];if(Array.isArray(u)){var l=u,c=Array.isArray(l),p=0;for(l=c?l:(0,y.default)(l);;){var h;if(c){if(p>=l.length)break;h=l[p++]}else{if((p=l.next()).done)break;h=p.value}f(h,t,r)}}else f(u,t,r)}}}}function d(e,t){var r=(t=t||{}).preserveComments?O:N,n=Array.isArray(r),i=0;for(r=n?r:(0,y.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;null!=e[a]&&(e[a]=void 0)}for(var o in e)"_"===o[0]&&null!=e[o]&&(e[o]=void 0);var u=(0,m.default)(e),l=Array.isArray(u),c=0;for(u=l?u:(0,y.default)(u);;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if((c=u.next()).done)break;p=c.value}e[p]=null}}r.__esModule=!0,r.createTypeAnnotationBasedOnTypeof=r.removeTypeDuplicates=r.createUnionTypeAnnotation=r.valueToNode=r.toBlock=r.toExpression=r.toStatement=r.toBindingIdentifierName=r.toIdentifier=r.toKeyAlias=r.toSequenceExpression=r.toComputedKey=r.isNodesEquivalent=r.isImmutable=r.isScope=r.isSpecifierDefault=r.isVar=r.isBlockScoped=r.isLet=r.isValidIdentifier=r.isReferenced=r.isBinding=r.getOuterBindingIdentifiers=r.getBindingIdentifiers=r.TYPES=r.react=r.DEPRECATED_KEYS=r.BUILDER_KEYS=r.NODE_FIELDS=r.ALIAS_KEYS=r.VISITOR_KEYS=r.NOT_LOCAL_BINDING=r.BLOCK_SCOPED_SYMBOL=r.INHERIT_KEYS=r.UNARY_OPERATORS=r.STRING_UNARY_OPERATORS=r.NUMBER_UNARY_OPERATORS=r.BOOLEAN_UNARY_OPERATORS=r.BINARY_OPERATORS=r.NUMBER_BINARY_OPERATORS=r.BOOLEAN_BINARY_OPERATORS=r.COMPARISON_BINARY_OPERATORS=r.EQUALITY_BINARY_OPERATORS=r.BOOLEAN_NUMBER_BINARY_OPERATORS=r.UPDATE_OPERATORS=r.LOGICAL_OPERATORS=r.COMMENT_KEYS=r.FOR_INIT_KEYS=r.FLATTENABLE_KEYS=r.STATEMENT_OR_BLOCK_KEYS=void 0;var m=n(e("babel-runtime/core-js/object/get-own-property-symbols")),y=n(e("babel-runtime/core-js/get-iterator")),g=n(e("babel-runtime/core-js/object/keys")),b=n(e("babel-runtime/core-js/json/stringify")),v=e("./constants");Object.defineProperty(r,"STATEMENT_OR_BLOCK_KEYS",{enumerable:!0,get:function(){return v.STATEMENT_OR_BLOCK_KEYS}}),Object.defineProperty(r,"FLATTENABLE_KEYS",{enumerable:!0,get:function(){return v.FLATTENABLE_KEYS}}),Object.defineProperty(r,"FOR_INIT_KEYS",{enumerable:!0,get:function(){return v.FOR_INIT_KEYS}}),Object.defineProperty(r,"COMMENT_KEYS",{enumerable:!0,get:function(){return v.COMMENT_KEYS}}),Object.defineProperty(r,"LOGICAL_OPERATORS",{enumerable:!0,get:function(){return v.LOGICAL_OPERATORS}}),Object.defineProperty(r,"UPDATE_OPERATORS",{enumerable:!0,get:function(){return v.UPDATE_OPERATORS}}),Object.defineProperty(r,"BOOLEAN_NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return v.BOOLEAN_NUMBER_BINARY_OPERATORS}}),Object.defineProperty(r,"EQUALITY_BINARY_OPERATORS",{enumerable:!0,get:function(){return v.EQUALITY_BINARY_OPERATORS}}),Object.defineProperty(r,"COMPARISON_BINARY_OPERATORS",{enumerable:!0,get:function(){return v.COMPARISON_BINARY_OPERATORS}}),Object.defineProperty(r,"BOOLEAN_BINARY_OPERATORS",{enumerable:!0,get:function(){return v.BOOLEAN_BINARY_OPERATORS}}),Object.defineProperty(r,"NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return v.NUMBER_BINARY_OPERATORS}}),Object.defineProperty(r,"BINARY_OPERATORS",{enumerable:!0,get:function(){return v.BINARY_OPERATORS}}),Object.defineProperty(r,"BOOLEAN_UNARY_OPERATORS",{enumerable:!0,get:function(){return v.BOOLEAN_UNARY_OPERATORS}}),Object.defineProperty(r,"NUMBER_UNARY_OPERATORS",{enumerable:!0,get:function(){return v.NUMBER_UNARY_OPERATORS}}),Object.defineProperty(r,"STRING_UNARY_OPERATORS",{enumerable:!0,get:function(){return v.STRING_UNARY_OPERATORS}}),Object.defineProperty(r,"UNARY_OPERATORS",{enumerable:!0,get:function(){return v.UNARY_OPERATORS}}),Object.defineProperty(r,"INHERIT_KEYS",{enumerable:!0,get:function(){return v.INHERIT_KEYS}}),Object.defineProperty(r,"BLOCK_SCOPED_SYMBOL",{enumerable:!0,get:function(){return v.BLOCK_SCOPED_SYMBOL}}),Object.defineProperty(r,"NOT_LOCAL_BINDING",{enumerable:!0,get:function(){return v.NOT_LOCAL_BINDING}}),r.is=function(e,t,r){return!!t&&!!s(t.type,e)&&(void 0===r||F.shallowEqual(t,r))},r.isType=s,r.validate=a,r.shallowEqual=function(e,t){var r=(0,g.default)(t),n=Array.isArray(r),i=0;for(r=n?r:(0,y.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;if(e[a]!==t[a])return!1}return!0},r.appendToMemberExpression=function(e,t,r){return e.object=F.memberExpression(e.object,e.property,e.computed),e.property=t,e.computed=!!r,e},r.prependToMemberExpression=function(e,t){return e.object=F.memberExpression(t,e.object),e},r.ensureBlock=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"body";return e[t]=F.toBlock(e[t],e)},r.clone=o,r.cloneWithoutLoc=function(e){var t=o(e);return delete t.loc,t},r.cloneDeep=function(e){if(!e)return e;var t={};for(var r in e)if("_"!==r[0]){var n=e[r];n&&(n.type?n=F.cloneDeep(n):Array.isArray(n)&&(n=n.map(F.cloneDeep))),t[r]=n}return t},r.buildMatchMemberExpression=function(e,t){var r=e.split(".");return function(e){if(!F.isMemberExpression(e))return!1;for(var n=[e],i=0;n.length;){var s=n.shift();if(t&&i===r.length)return!0;if(F.isIdentifier(s)){if(r[i]!==s.name)return!1}else{if(!F.isStringLiteral(s)){if(F.isMemberExpression(s)){if(s.computed&&!F.isStringLiteral(s.property))return!1;n.push(s.object),n.push(s.property);continue}return!1}if(r[i]!==s.value)return!1}if(++i>r.length)return!1}return!0}},r.removeComments=function(e){var t=F.COMMENT_KEYS,r=Array.isArray(t),n=0;for(t=r?t:(0,y.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}delete e[i]}return e},r.inheritsComments=function(e,t){return u(e,t),l(e,t),c(e,t),e},r.inheritTrailingComments=u,r.inheritLeadingComments=l,r.inheritInnerComments=c,r.inherits=function(e,t){if(!e||!t)return e;var r=F.INHERIT_KEYS.optional,n=Array.isArray(r),i=0;for(r=n?r:(0,y.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;null==e[a]&&(e[a]=t[a])}for(var o in t)"_"===o[0]&&(e[o]=t[o]);var u=F.INHERIT_KEYS.force,l=Array.isArray(u),c=0;for(u=l?u:(0,y.default)(u);;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if((c=u.next()).done)break;p=c.value}var h=p;e[h]=t[h]}return F.inheritsComments(e,t),e},r.assertNode=function(e){if(!h(e))throw new TypeError("Not a valid node "+(e&&e.type))},r.isNode=h,r.traverseFast=f,r.removeProperties=d,r.removePropertiesDeep=function(e,t){return f(e,d,t),e};var x=e("./retrievers");Object.defineProperty(r,"getBindingIdentifiers",{enumerable:!0,get:function(){return x.getBindingIdentifiers}}),Object.defineProperty(r,"getOuterBindingIdentifiers",{enumerable:!0,get:function(){return x.getOuterBindingIdentifiers}});var E=e("./validators");Object.defineProperty(r,"isBinding",{enumerable:!0,get:function(){return E.isBinding}}),Object.defineProperty(r,"isReferenced",{enumerable:!0,get:function(){return E.isReferenced}}),Object.defineProperty(r,"isValidIdentifier",{enumerable:!0,get:function(){return E.isValidIdentifier}}),Object.defineProperty(r,"isLet",{enumerable:!0,get:function(){return E.isLet}}),Object.defineProperty(r,"isBlockScoped",{enumerable:!0,get:function(){return E.isBlockScoped}}),Object.defineProperty(r,"isVar",{enumerable:!0,get:function(){return E.isVar}}),Object.defineProperty(r,"isSpecifierDefault",{enumerable:!0,get:function(){return E.isSpecifierDefault}}),Object.defineProperty(r,"isScope",{enumerable:!0,get:function(){return E.isScope}}),Object.defineProperty(r,"isImmutable",{enumerable:!0,get:function(){return E.isImmutable}}),Object.defineProperty(r,"isNodesEquivalent",{enumerable:!0,get:function(){return E.isNodesEquivalent}});var A=e("./converters");Object.defineProperty(r,"toComputedKey",{enumerable:!0,get:function(){return A.toComputedKey}}),Object.defineProperty(r,"toSequenceExpression",{enumerable:!0,get:function(){return A.toSequenceExpression}}),Object.defineProperty(r,"toKeyAlias",{enumerable:!0,get:function(){return A.toKeyAlias}}),Object.defineProperty(r,"toIdentifier",{enumerable:!0,get:function(){return A.toIdentifier}}),Object.defineProperty(r,"toBindingIdentifierName",{enumerable:!0,get:function(){return A.toBindingIdentifierName}}),Object.defineProperty(r,"toStatement",{enumerable:!0,get:function(){return A.toStatement}}),Object.defineProperty(r,"toExpression",{enumerable:!0,get:function(){return A.toExpression}}),Object.defineProperty(r,"toBlock",{enumerable:!0,get:function(){return A.toBlock}}),Object.defineProperty(r,"valueToNode",{enumerable:!0,get:function(){return A.valueToNode}});var D=e("./flow");Object.defineProperty(r,"createUnionTypeAnnotation",{enumerable:!0,get:function(){return D.createUnionTypeAnnotation}}),Object.defineProperty(r,"removeTypeDuplicates",{enumerable:!0,get:function(){return D.removeTypeDuplicates}}),Object.defineProperty(r,"createTypeAnnotationBasedOnTypeof",{enumerable:!0,get:function(){return D.createTypeAnnotationBasedOnTypeof}});var S=n(e("to-fast-properties")),C=n(e("lodash/clone")),_=n(e("lodash/uniq"));e("./definitions/init");var w=e("./definitions"),k=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./react")),F=r;r.VISITOR_KEYS=w.VISITOR_KEYS,r.ALIAS_KEYS=w.ALIAS_KEYS,r.NODE_FIELDS=w.NODE_FIELDS,r.BUILDER_KEYS=w.BUILDER_KEYS,r.DEPRECATED_KEYS=w.DEPRECATED_KEYS,r.react=k;for(var T in F.VISITOR_KEYS)i(T);F.FLIPPED_ALIAS_KEYS={},(0,g.default)(F.ALIAS_KEYS).forEach(function(e){F.ALIAS_KEYS[e].forEach(function(t){(F.FLIPPED_ALIAS_KEYS[t]=F.FLIPPED_ALIAS_KEYS[t]||[]).push(e)})}),(0,g.default)(F.FLIPPED_ALIAS_KEYS).forEach(function(e){F[e.toUpperCase()+"_TYPES"]=F.FLIPPED_ALIAS_KEYS[e],i(e)});r.TYPES=(0,g.default)(F.VISITOR_KEYS).concat((0,g.default)(F.FLIPPED_ALIAS_KEYS)).concat((0,g.default)(F.DEPRECATED_KEYS));(0,g.default)(F.BUILDER_KEYS).forEach(function(e){function t(){if(arguments.length>r.length)throw new Error("t."+e+": Too many arguments passed. Received "+arguments.length+" but can receive no more than "+r.length);var t={};t.type=e;var n=0,i=r,s=Array.isArray(i),o=0;for(i=s?i:(0,y.default)(i);;){var u;if(s){if(o>=i.length)break;u=i[o++]}else{if((o=i.next()).done)break;u=o.value}var l=u,c=F.NODE_FIELDS[e][l],p=arguments[n++];void 0===p&&(p=(0,C.default)(c.default)),t[l]=p}for(var h in t)a(t,h,t[h]);return t}var r=F.BUILDER_KEYS[e];F[e]=t,F[e[0].toLowerCase()+e.slice(1)]=t});var P=function(e){function t(t){return function(){return console.trace("The node type "+e+" has been renamed to "+r),t.apply(this,arguments)}}var r=F.DEPRECATED_KEYS[e];F[e]=F[e[0].toLowerCase()+e.slice(1)]=t(F[r]),F["is"+e]=t(F["is"+r]),F["assert"+e]=t(F["assert"+r])};for(var B in F.DEPRECATED_KEYS)P(B);(0,S.default)(F),(0,S.default)(F.VISITOR_KEYS);var O=["tokens","start","end","loc","raw","rawValue"],N=F.COMMENT_KEYS.concat(["comments"]).concat(O)},{"./constants":169,"./converters":170,"./definitions":175,"./definitions/init":176,"./flow":179,"./react":181,"./retrievers":182,"./validators":183,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/json/stringify":121,"babel-runtime/core-js/object/get-own-property-symbols":126,"babel-runtime/core-js/object/keys":127,"lodash/clone":491,"lodash/uniq":540,"to-fast-properties":607}],181:[function(e,t,r){"use strict";function n(e,t){for(var r=e.value.split(/\r\n|\n|\r/),n=0,s=0;s=r.length)break;l=r[u++]}else{if((u=r.next()).done)break;l=u.value}var p=l;if((0,a.default)(e[p])!==(0,a.default)(t[p]))return!1;if(Array.isArray(e[p])){if(!Array.isArray(t[p]))return!1;if(e[p].length!==t[p].length)return!1;for(var h=0;h=0)return!0}else if(i===e)return!0}return!1},r.isReferenced=function(e,t){switch(t.type){case"BindExpression":return t.object===e||t.callee===e;case"MemberExpression":case"JSXMemberExpression":return!(t.property!==e||!t.computed)||t.object===e;case"MetaProperty":return!1;case"ObjectProperty":if(t.key===e)return t.computed;case"VariableDeclarator":return t.id!==e;case"ArrowFunctionExpression":case"FunctionDeclaration":case"FunctionExpression":var r=t.params,n=Array.isArray(r),i=0;for(r=n?r:(0,o.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}if(s===e)return!1}return t.id!==e;case"ExportSpecifier":return!t.source&&t.local===e;case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":return!1;case"JSXAttribute":return t.name!==e;case"ClassProperty":return t.key===e?t.computed:t.value===e;case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":return!1;case"ClassDeclaration":case"ClassExpression":return t.id!==e;case"ClassMethod":case"ObjectMethod":return t.key===e&&t.computed;case"LabeledStatement":return!1;case"CatchClause":return t.param!==e;case"RestElement":return!1;case"AssignmentExpression":case"AssignmentPattern":return t.right===e;case"ObjectPattern":case"ArrayPattern":return!1}return!0},r.isValidIdentifier=function(e){return"string"==typeof e&&!l.default.keyword.isReservedWordES6(e,!0)&&"await"!==e&&l.default.keyword.isIdentifierNameES6(e)},r.isLet=function(e){return c.isVariableDeclaration(e)&&("var"!==e.kind||e[p.BLOCK_SCOPED_SYMBOL])},r.isBlockScoped=function(e){return c.isFunctionDeclaration(e)||c.isClassDeclaration(e)||c.isLet(e)},r.isVar=function(e){return c.isVariableDeclaration(e,{kind:"var"})&&!e[p.BLOCK_SCOPED_SYMBOL]},r.isSpecifierDefault=function(e){return c.isImportDefaultSpecifier(e)||c.isIdentifier(e.imported||e.exported,{name:"default"})},r.isScope=function(e,t){return(!c.isBlockStatement(e)||!c.isFunction(t,{body:e}))&&c.isScopable(e)},r.isImmutable=function(e){return!!c.isType(e.type,"Immutable")||!!c.isIdentifier(e)&&"undefined"===e.name},r.isNodesEquivalent=i;var u=e("./retrievers"),l=n(e("esutils")),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./index")),p=e("./constants")},{"./constants":169,"./index":180,"./retrievers":182,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/object/keys":127,"babel-runtime/helpers/typeof":138,esutils:187}],184:[function(e,t,r){arguments[4][25][0].apply(r,arguments)},{dup:25}],185:[function(e,t,r){arguments[4][26][0].apply(r,arguments)},{dup:26}],186:[function(e,t,r){arguments[4][27][0].apply(r,arguments)},{"./code":185,dup:27}],187:[function(e,t,r){arguments[4][28][0].apply(r,arguments)},{"./ast":184,"./code":185,"./keyword":186,dup:28}],188:[function(e,t,r){"use strict";function n(e){return e=e.split(" "),function(t){return e.indexOf(t)>=0}}function i(e,t){for(var r=65536,n=0;ne)return!1;if((r+=t[n+1])>=e)return!0}}function s(e){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&g.test(String.fromCharCode(e)):i(e,v)))}function a(e){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&b.test(String.fromCharCode(e)):i(e,v)||i(e,x))))}function o(e){return 10===e||13===e||8232===e||8233===e}function u(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}function l(e,t,r,n){return e.type=t,e.end=r,e.loc.end=n,this.processComment(e),e}function c(e){return e[e.length-1]}function p(e){return e&&"Property"===e.type&&"init"===e.kind&&!1===e.method}function h(e){return"JSXIdentifier"===e.type?e.name:"JSXNamespacedName"===e.type?e.namespace.name+":"+e.name.name:"JSXMemberExpression"===e.type?h(e.object)+"."+h(e.property):void 0}Object.defineProperty(r,"__esModule",{value:!0});var f={6:n("enum await"),strict:n("implements interface let package private protected public static yield"),strictBind:n("eval arguments")},d=n("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this let const class extends export import yield super"),m="ªµºÀ-ÖØ-öø-ˈ-Ë‘Ë -ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ÒÒŠ-Ô¯Ô±-Õ–Õ™Õ¡-Ö‡×-תװ-ײؠ-يٮٯٱ-Û“Û•Û¥Û¦Û®Û¯Ûº-Û¼Û¿ÜÜ’-ܯÝ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽà¥à¥˜-ॡॱ-ঀঅ-ঌà¦à¦à¦“-নপ-রলশ-হঽৎড়à§à§Ÿ-ৡৰৱਅ-ਊà¨à¨à¨“-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-àªàª-ઑઓ-નપ-રલળવ-હઽà«à« à«¡à«¹à¬…-ଌà¬à¬à¬“-ନପ-ରଲଳଵ-ହଽଡ଼à­à­Ÿ-ୡୱஃஅ-ஊஎ-à®à®’-கஙசஜஞடணதந-பம-ஹà¯à°…-ఌఎ-à°à°’-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-à²à²’-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-à´à´’-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-à·†à¸-ะาำเ-ๆàºàº‚ຄງຈຊàºàº”-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿá-á•áš-áá¡á¥á¦á®-á°áµ-á‚á‚Žá‚ -ჅჇáƒáƒ-ჺჼ-ቈቊ-á‰á‰-ቖቘቚ-á‰á‰ -ኈኊ-áŠáŠ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-áŒáŒ’-ጕጘ-ášáŽ€-áŽáŽ -áµá¸-á½á-ᙬᙯ-ᙿáš-áššáš -ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱá€-á‘á -á¬á®-á°áž€-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞá¥-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-á°£á±-á±á±š-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-á¼á¼ -ὅὈ-á½á½-ὗὙὛá½á½Ÿ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-á¿Œá¿-á¿“á¿–-Ίῠ-Ῥῲ-ῴῶ-ῼâ±â¿â‚-ₜℂℇℊ-ℓℕ℘-â„ℤΩℨK-ℹℼ-â„¿â……-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-â·Žâ·-â·–â·˜-ⷞ々-〇〡-〩〱-〵〸-〼ã-ã‚–ã‚›-ã‚Ÿã‚¡-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿã€-䶵一-鿕ꀀ-ê’Œê“-ꓽꔀ-ꘌê˜-ꘟꘪꘫꙀ-ꙮꙿ-êšêš -ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ê ê ƒ-ê …ê ‡-ê Šê Œ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲê§ê§ -ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ê©‚ê©„-ê©‹ê© -ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ê«ê« -ꫪꫲ-ê«´ê¬-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ê­šê­œ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-ï©­ï©°-龎ff-stﬓ-ﬗï¬ï¬Ÿ-ﬨשׁ-זּטּ-לּמּנּï­ï­ƒï­„ï­†-ﮱﯓ-ï´½ïµ-ï¶ï¶’-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Zï½-zヲ-하-ᅦᅧ-ï¿ï¿’-ï¿—ï¿š-ï¿œ",y="‌â€Â·Ì€-ͯ·҃-Ò‡Ö‘-Ö½Ö¿×ׇׂׅׄØ-ØšÙ‹-٩ٰۖ-ۜ۟-Û¤Û§Û¨Ûª-Û­Û°-۹ܑܰ-ÝŠÞ¦-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-à ­à¡™-࡛ࣔ-ࣣ࣡-ःऺ-़ा-à¥à¥‘-ॗॢॣ०-९à¦-ঃ়া-ৄেৈো-à§à§—ৢৣ০-৯à¨-ਃ਼ਾ-ੂੇੈੋ-à©à©‘੦-ੱੵàª-ઃ઼ા-ૅે-ૉો-à«à«¢à«£à«¦-૯à¬-ଃ଼ା-ୄେୈୋ-à­à­–ୗୢୣ୦-୯ஂா-ூெ-ைொ-à¯à¯—௦-௯ఀ-ఃా-ౄె-ైొ-à±à±•à±–ౢౣ౦-౯à²-ಃ಼ಾ-ೄೆ-ೈೊ-à³à³•à³–ೢೣ೦-೯à´-ഃാ-ൄെ-ൈൊ-àµàµ—ൢൣ൦-൯ංඃ්à·-ුූෘ-à·Ÿà·¦-෯ෲෳัิ-ฺ็-๎à¹-๙ັິ-ູົຼ່-à»à»-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇à¾-ྗྙ-ྼ࿆ါ-ှá€-á‰á–-á™áž-á á¢-á¤á§-á­á±-á´á‚‚-á‚á‚-á‚á-áŸá©-á±áœ’-᜔ᜲ-᜴á’á“á²á³áž´-៓áŸáŸ -៩᠋-á á -᠙ᢩᤠ-ᤫᤰ-᤻᥆-á¥á§-᧚ᨗ-ᨛᩕ-á©žá© -᩿᩼-᪉áª-᪙᪰-᪽ᬀ-ᬄ᬴-á­„á­-᭙᭫-᭳ᮀ-ᮂᮡ-á®­á®°-᮹᯦-᯳ᰤ-á°·á±€-᱉á±-á±™á³-á³’á³”-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿â€â”âƒ-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀê¢ê¢´-ꣅê£-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀ê§-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌê©ê©-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿ê«ê««-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-ï¸ï¸ -︯︳︴ï¹-ï¹ï¼-9_",g=new RegExp("["+m+"]"),b=new RegExp("["+m+y+"]");m=y=null;var v=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,10591,541],x=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239],E={sourceType:"script",sourceFilename:void 0,startLine:1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,plugins:[],strictMode:null},A="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},D=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},S=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},C=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},_=!0,w=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};D(this,e),this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.rightAssociative=!!r.rightAssociative,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop||null,this.updateContext=null},k=function(e){function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return D(this,t),n.keyword=r,C(this,e.call(this,r,n))}return S(t,e),t}(w),F=function(e){function t(r,n){return D(this,t),C(this,e.call(this,r,{beforeExpr:_,binop:n}))}return S(t,e),t}(w),T={num:new w("num",{startsExpr:!0}),regexp:new w("regexp",{startsExpr:!0}),string:new w("string",{startsExpr:!0}),name:new w("name",{startsExpr:!0}),eof:new w("eof"),bracketL:new w("[",{beforeExpr:_,startsExpr:!0}),bracketR:new w("]"),braceL:new w("{",{beforeExpr:_,startsExpr:!0}),braceBarL:new w("{|",{beforeExpr:_,startsExpr:!0}),braceR:new w("}"),braceBarR:new w("|}"),parenL:new w("(",{beforeExpr:_,startsExpr:!0}),parenR:new w(")"),comma:new w(",",{beforeExpr:_}),semi:new w(";",{beforeExpr:_}),colon:new w(":",{beforeExpr:_}),doubleColon:new w("::",{beforeExpr:_}),dot:new w("."),question:new w("?",{beforeExpr:_}),arrow:new w("=>",{beforeExpr:_}),template:new w("template"),ellipsis:new w("...",{beforeExpr:_}),backQuote:new w("`",{startsExpr:!0}),dollarBraceL:new w("${",{beforeExpr:_,startsExpr:!0}),at:new w("@"),eq:new w("=",{beforeExpr:_,isAssign:!0}),assign:new w("_=",{beforeExpr:_,isAssign:!0}),incDec:new w("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new w("prefix",{beforeExpr:_,prefix:!0,startsExpr:!0}),logicalOR:new F("||",1),logicalAND:new F("&&",2),bitwiseOR:new F("|",3),bitwiseXOR:new F("^",4),bitwiseAND:new F("&",5),equality:new F("==/!=",6),relational:new F("",7),bitShift:new F("<>",8),plusMin:new w("+/-",{beforeExpr:_,binop:9,prefix:!0,startsExpr:!0}),modulo:new F("%",10),star:new F("*",10),slash:new F("/",10),exponent:new w("**",{beforeExpr:_,binop:11,rightAssociative:!0})},P={break:new k("break"),case:new k("case",{beforeExpr:_}),catch:new k("catch"),continue:new k("continue"),debugger:new k("debugger"),default:new k("default",{beforeExpr:_}),do:new k("do",{isLoop:!0,beforeExpr:_}),else:new k("else",{beforeExpr:_}),finally:new k("finally"),for:new k("for",{isLoop:!0}),function:new k("function",{startsExpr:!0}),if:new k("if"),return:new k("return",{beforeExpr:_}),switch:new k("switch"),throw:new k("throw",{beforeExpr:_}),try:new k("try"),var:new k("var"),let:new k("let"),const:new k("const"),while:new k("while",{isLoop:!0}),with:new k("with"),new:new k("new",{beforeExpr:_,startsExpr:!0}),this:new k("this",{startsExpr:!0}),super:new k("super",{startsExpr:!0}),class:new k("class"),extends:new k("extends",{beforeExpr:_}),export:new k("export"),import:new k("import",{startsExpr:!0}),yield:new k("yield",{beforeExpr:_,startsExpr:!0}),null:new k("null",{startsExpr:!0}),true:new k("true",{startsExpr:!0}),false:new k("false",{startsExpr:!0}),in:new k("in",{beforeExpr:_,binop:7}),instanceof:new k("instanceof",{beforeExpr:_,binop:7}),typeof:new k("typeof",{beforeExpr:_,prefix:!0,startsExpr:!0}),void:new k("void",{beforeExpr:_,prefix:!0,startsExpr:!0}),delete:new k("delete",{beforeExpr:_,prefix:!0,startsExpr:!0})};Object.keys(P).forEach(function(e){T["_"+e]=P[e]});var B=/\r\n?|\n|\u2028|\u2029/,O=new RegExp(B.source,"g"),N=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,j=function e(t,r,n,i){D(this,e),this.token=t,this.isExpr=!!r,this.preserveSpace=!!n,this.override=i},I={braceStatement:new j("{",!1),braceExpression:new j("{",!0),templateQuasi:new j("${",!0),parenStatement:new j("(",!1),parenExpression:new j("(",!0),template:new j("`",!0,!0,function(e){return e.readTmplToken()}),functionExpression:new j("function",!0)};T.parenR.updateContext=T.braceR.updateContext=function(){if(1!==this.state.context.length){var e=this.state.context.pop();e===I.braceStatement&&this.curContext()===I.functionExpression?(this.state.context.pop(),this.state.exprAllowed=!1):e===I.templateQuasi?this.state.exprAllowed=!0:this.state.exprAllowed=!e.isExpr}else this.state.exprAllowed=!0},T.name.updateContext=function(e){this.state.exprAllowed=!1,e!==T._let&&e!==T._const&&e!==T._var||B.test(this.input.slice(this.state.end))&&(this.state.exprAllowed=!0)},T.braceL.updateContext=function(e){this.state.context.push(this.braceIsBlock(e)?I.braceStatement:I.braceExpression),this.state.exprAllowed=!0},T.dollarBraceL.updateContext=function(){this.state.context.push(I.templateQuasi),this.state.exprAllowed=!0},T.parenL.updateContext=function(e){var t=e===T._if||e===T._for||e===T._with||e===T._while;this.state.context.push(t?I.parenStatement:I.parenExpression),this.state.exprAllowed=!0},T.incDec.updateContext=function(){},T._function.updateContext=function(){this.curContext()!==I.braceStatement&&this.state.context.push(I.functionExpression),this.state.exprAllowed=!1},T.backQuote.updateContext=function(){this.curContext()===I.template?this.state.context.pop():this.state.context.push(I.template),this.state.exprAllowed=!1};var L=function e(t,r){D(this,e),this.line=t,this.column=r},M=function e(t,r){D(this,e),this.start=t,this.end=r},R=function(){function e(){D(this,e)}return e.prototype.init=function(e,t){return this.strict=!1!==e.strictMode&&"module"===e.sourceType,this.input=t,this.potentialArrowAt=-1,this.inMethod=this.inFunction=this.inGenerator=this.inAsync=this.inPropertyName=this.inType=this.inClassProperty=this.noAnonFunctionType=!1,this.labels=[],this.decorators=[],this.tokens=[],this.comments=[],this.trailingComments=[],this.leadingComments=[],this.commentStack=[],this.pos=this.lineStart=0,this.curLine=e.startLine,this.type=T.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=[I.braceStatement],this.exprAllowed=!0,this.containsEsc=this.containsOctal=!1,this.octalPosition=null,this.invalidTemplateEscapePosition=null,this.exportedIdentifiers=[],this},e.prototype.curPosition=function(){return new L(this.curLine,this.pos-this.lineStart)},e.prototype.clone=function(t){var r=new e;for(var n in this){var i=this[n];t&&"context"!==n||!Array.isArray(i)||(i=i.slice()),r[n]=i}return r},e}(),V={},U=["jsx","doExpressions","objectRestSpread","decorators","classProperties","exportExtensions","asyncGenerators","functionBind","functionSent","dynamicImport","flow"],q=function(e){function t(r,n){D(this,t),r=function(e){var t={};for(var r in E)t[r]=e&&r in e?e[r]:E[r];return t}(r);var i=C(this,e.call(this,r,n));return i.options=r,i.inModule="module"===i.options.sourceType,i.input=n,i.plugins=i.loadPlugins(i.options.plugins),i.filename=r.sourceFilename,0===i.state.pos&&"#"===i.input[0]&&"!"===i.input[1]&&i.skipLineComment(2),i}return S(t,e),t.prototype.isReservedWord=function(e){return"await"===e?this.inModule:f[6](e)},t.prototype.hasPlugin=function(e){return!!(this.plugins["*"]&&U.indexOf(e)>-1)||!!this.plugins[e]},t.prototype.extend=function(e,t){this[e]=t(this[e])},t.prototype.loadAllPlugins=function(){var e=this,t=Object.keys(V).filter(function(e){return"flow"!==e&&"estree"!==e});t.push("flow"),t.forEach(function(t){var r=V[t];r&&r(e)})},t.prototype.loadPlugins=function(e){if(e.indexOf("*")>=0)return this.loadAllPlugins(),{"*":!0};var t={};e.indexOf("flow")>=0&&(e=e.filter(function(e){return"flow"!==e})).push("flow"),e.indexOf("estree")>=0&&(e=e.filter(function(e){return"estree"!==e})).unshift("estree");var r=e,n=Array.isArray(r),i=0;for(r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;if(!t[a]){t[a]=!0;var o=V[a];o&&o(this)}}return t},t.prototype.parse=function(){var e=this.startNode(),t=this.startNode();return this.nextToken(),this.parseTopLevel(e,t)},t}(function(){function e(t,r){D(this,e),this.state=new R,this.state.init(t,r)}return e.prototype.next=function(){this.isLookahead||this.state.tokens.push(new function e(t){D(this,e),this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new M(t.startLoc,t.endLoc)}(this.state)),this.state.lastTokEnd=this.state.end,this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()},e.prototype.eat=function(e){return!!this.match(e)&&(this.next(),!0)},e.prototype.match=function(e){return this.state.type===e},e.prototype.isKeyword=function(e){return d(e)},e.prototype.lookahead=function(){var e=this.state;this.state=e.clone(!0),this.isLookahead=!0,this.next(),this.isLookahead=!1;var t=this.state.clone(!0);return this.state=e,t},e.prototype.setStrict=function(e){if(this.state.strict=e,this.match(T.num)||this.match(T.string)){for(this.state.pos=this.state.start;this.state.pos=this.input.length?this.finishToken(T.eof):e.override?e.override(this):this.readToken(this.fullCharCodeAtPos())},e.prototype.readToken=function(e){return s(e)||92===e?this.readWord():this.getTokenFromCode(e)},e.prototype.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.state.pos);if(e<=55295||e>=57344)return e;return(e<<10)+this.input.charCodeAt(this.state.pos+1)-56613888},e.prototype.pushComment=function(e,t,r,n,i,s){var a={type:e?"CommentBlock":"CommentLine",value:t,start:r,end:n,loc:new M(i,s)};this.isLookahead||(this.state.tokens.push(a),this.state.comments.push(a),this.addComment(a))},e.prototype.skipBlockComment=function(){var e=this.state.curPosition(),t=this.state.pos,r=this.input.indexOf("*/",this.state.pos+=2);-1===r&&this.raise(this.state.pos-2,"Unterminated comment"),this.state.pos=r+2,O.lastIndex=t;for(var n=void 0;(n=O.exec(this.input))&&n.index8&&e<14||e>=5760&&N.test(String.fromCharCode(e))))break e;++this.state.pos}}},e.prototype.finishToken=function(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();var r=this.state.type;this.state.type=e,this.state.value=t,this.updateContext(r)},e.prototype.readToken_dot=function(){var e=this.input.charCodeAt(this.state.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.state.pos+2);return 46===e&&46===t?(this.state.pos+=3,this.finishToken(T.ellipsis)):(++this.state.pos,this.finishToken(T.dot))},e.prototype.readToken_slash=function(){if(this.state.exprAllowed)return++this.state.pos,this.readRegexp();return 61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(T.assign,2):this.finishOp(T.slash,1)},e.prototype.readToken_mult_modulo=function(e){var t=42===e?T.star:T.modulo,r=1,n=this.input.charCodeAt(this.state.pos+1);return 42===n&&(r++,n=this.input.charCodeAt(this.state.pos+2),t=T.exponent),61===n&&(r++,t=T.assign),this.finishOp(t,r)},e.prototype.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?this.finishOp(124===e?T.logicalOR:T.logicalAND,2):61===t?this.finishOp(T.assign,2):124===e&&125===t&&this.hasPlugin("flow")?this.finishOp(T.braceBarR,2):this.finishOp(124===e?T.bitwiseOR:T.bitwiseAND,1)},e.prototype.readToken_caret=function(){return 61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(T.assign,2):this.finishOp(T.bitwiseXOR,1)},e.prototype.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?45===t&&62===this.input.charCodeAt(this.state.pos+2)&&B.test(this.input.slice(this.state.lastTokEnd,this.state.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(T.incDec,2):61===t?this.finishOp(T.assign,2):this.finishOp(T.plusMin,1)},e.prototype.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.state.pos+1),r=1;return t===e?(r=62===e&&62===this.input.charCodeAt(this.state.pos+2)?3:2,61===this.input.charCodeAt(this.state.pos+r)?this.finishOp(T.assign,r+1):this.finishOp(T.bitShift,r)):33===t&&60===e&&45===this.input.charCodeAt(this.state.pos+2)&&45===this.input.charCodeAt(this.state.pos+3)?(this.inModule&&this.unexpected(),this.skipLineComment(4),this.skipSpace(),this.nextToken()):(61===t&&(r=2),this.finishOp(T.relational,r))},e.prototype.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.state.pos+1);return 61===t?this.finishOp(T.equality,61===this.input.charCodeAt(this.state.pos+2)?3:2):61===e&&62===t?(this.state.pos+=2,this.finishToken(T.arrow)):this.finishOp(61===e?T.eq:T.prefix,1)},e.prototype.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.state.pos,this.finishToken(T.parenL);case 41:return++this.state.pos,this.finishToken(T.parenR);case 59:return++this.state.pos,this.finishToken(T.semi);case 44:return++this.state.pos,this.finishToken(T.comma);case 91:return++this.state.pos,this.finishToken(T.bracketL);case 93:return++this.state.pos,this.finishToken(T.bracketR);case 123:return this.hasPlugin("flow")&&124===this.input.charCodeAt(this.state.pos+1)?this.finishOp(T.braceBarL,2):(++this.state.pos,this.finishToken(T.braceL));case 125:return++this.state.pos,this.finishToken(T.braceR);case 58:return this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(T.doubleColon,2):(++this.state.pos,this.finishToken(T.colon));case 63:return++this.state.pos,this.finishToken(T.question);case 64:return++this.state.pos,this.finishToken(T.at);case 96:return++this.state.pos,this.finishToken(T.backQuote);case 48:var t=this.input.charCodeAt(this.state.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2);case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(T.prefix,1)}this.raise(this.state.pos,"Unexpected character '"+u(e)+"'")},e.prototype.finishOp=function(e,t){var r=this.input.slice(this.state.pos,this.state.pos+t);return this.state.pos+=t,this.finishToken(e,r)},e.prototype.readRegexp=function(){for(var e=this.state.pos,t=void 0,r=void 0;;){this.state.pos>=this.input.length&&this.raise(e,"Unterminated regular expression");var n=this.input.charAt(this.state.pos);if(B.test(n)&&this.raise(e,"Unterminated regular expression"),t)t=!1;else{if("["===n)r=!0;else if("]"===n&&r)r=!1;else if("/"===n&&!r)break;t="\\"===n}++this.state.pos}var i=this.input.slice(e,this.state.pos);++this.state.pos;var s=this.readWord1();if(s){/^[gmsiyu]*$/.test(s)||this.raise(e,"Invalid regular expression flag")}return this.finishToken(T.regexp,{pattern:i,flags:s})},e.prototype.readInt=function(e,t){for(var r=this.state.pos,n=0,i=0,s=null==t?1/0:t;i=97?a-97+10:a>=65?a-65+10:a>=48&&a<=57?a-48:1/0)>=e)break;++this.state.pos,n=n*e+o}return this.state.pos===r||null!=t&&this.state.pos-r!==t?null:n},e.prototype.readRadixNumber=function(e){this.state.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.state.start+2,"Expected number in radix "+e),s(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number"),this.finishToken(T.num,t)},e.prototype.readNumber=function(e){var t=this.state.pos,r=48===this.input.charCodeAt(t),n=!1;e||null!==this.readInt(10)||this.raise(t,"Invalid number"),r&&this.state.pos==t+1&&(r=!1);var i=this.input.charCodeAt(this.state.pos);46!==i||r||(++this.state.pos,this.readInt(10),n=!0,i=this.input.charCodeAt(this.state.pos)),69!==i&&101!==i||r||(43!==(i=this.input.charCodeAt(++this.state.pos))&&45!==i||++this.state.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),n=!0),s(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number");var a=this.input.slice(t,this.state.pos),o=void 0;return n?o=parseFloat(a):r&&1!==a.length?this.state.strict?this.raise(t,"Invalid number"):o=/[89]/.test(a)?parseInt(a,10):parseInt(a,8):o=parseInt(a,10),this.finishToken(T.num,o)},e.prototype.readCodePoint=function(e){var t=void 0;if(123===this.input.charCodeAt(this.state.pos)){var r=++this.state.pos;if(t=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos,e),++this.state.pos,null===t)--this.state.invalidTemplateEscapePosition;else if(t>1114111){if(!e)return this.state.invalidTemplateEscapePosition=r-2,null;this.raise(r,"Code point out of bounds")}}else t=this.readHexChar(4,e);return t},e.prototype.readString=function(e){for(var t="",r=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var n=this.input.charCodeAt(this.state.pos);if(n===e)break;92===n?(t+=this.input.slice(r,this.state.pos),t+=this.readEscapedChar(!1),r=this.state.pos):(o(n)&&this.raise(this.state.start,"Unterminated string constant"),++this.state.pos)}return t+=this.input.slice(r,this.state.pos++),this.finishToken(T.string,t)},e.prototype.readTmplToken=function(){for(var e="",t=this.state.pos,r=!1;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated template");var n=this.input.charCodeAt(this.state.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(T.template)?36===n?(this.state.pos+=2,this.finishToken(T.dollarBraceL)):(++this.state.pos,this.finishToken(T.backQuote)):(e+=this.input.slice(t,this.state.pos),this.finishToken(T.template,r?null:e));if(92===n){e+=this.input.slice(t,this.state.pos);var i=this.readEscapedChar(!0);null===i?r=!0:e+=i,t=this.state.pos}else if(o(n)){switch(e+=this.input.slice(t,this.state.pos),++this.state.pos,n){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}++this.state.curLine,this.state.lineStart=this.state.pos,t=this.state.pos}else++this.state.pos}},e.prototype.readEscapedChar=function(e){var t=!e,r=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,r){case 110:return"\n";case 114:return"\r";case 120:var n=this.readHexChar(2,t);return null===n?null:String.fromCharCode(n);case 117:var i=this.readCodePoint(t);return null===i?null:u(i);case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:return this.state.lineStart=this.state.pos,++this.state.curLine,"";default:if(r>=48&&r<=55){var s=this.state.pos-1,a=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],o=parseInt(a,8);if(o>255&&(a=a.slice(0,-1),o=parseInt(a,8)),o>0){if(e)return this.state.invalidTemplateEscapePosition=s,null;this.state.strict?this.raise(s,"Octal literal in strict mode"):this.state.containsOctal||(this.state.containsOctal=!0,this.state.octalPosition=s)}return this.state.pos+=a.length-1,String.fromCharCode(o)}return String.fromCharCode(r)}},e.prototype.readHexChar=function(e,t){var r=this.state.pos,n=this.readInt(16,e);return null===n&&(t?this.raise(r,"Bad character escape sequence"):(this.state.pos=r-1,this.state.invalidTemplateEscapePosition=r-1)),n},e.prototype.readWord1=function(){this.state.containsEsc=!1;for(var e="",t=!0,r=this.state.pos;this.state.pos1&&void 0!==arguments[1]?arguments[1]:"Unexpected token";t&&"object"===(void 0===t?"undefined":A(t))&&t.label&&(t="Unexpected token, expected "+t.label),this.raise(null!=e?e:this.state.start,t)};var X=q.prototype;X.parseTopLevel=function(e,t){return t.sourceType=this.options.sourceType,this.parseBlockBody(t,!0,!0,T.eof),e.program=this.finishNode(t,"Program"),e.comments=this.state.comments,e.tokens=this.state.tokens,this.finishNode(e,"File")};var J={kind:"loop"},W={kind:"switch"};X.stmtToDirective=function(e){var t=e.expression,r=this.startNodeAt(t.start,t.loc.start),n=this.startNodeAt(e.start,e.loc.start),i=this.input.slice(t.start,t.end),s=r.value=i.slice(1,-1);return this.addExtra(r,"raw",i),this.addExtra(r,"rawValue",s),n.value=this.finishNodeAt(r,"DirectiveLiteral",t.end,t.loc.end),this.finishNodeAt(n,"Directive",e.end,e.loc.end)},X.parseStatement=function(e,t){this.match(T.at)&&this.parseDecorators(!0);var r=this.state.type,n=this.startNode();switch(r){case T._break:case T._continue:return this.parseBreakContinueStatement(n,r.keyword);case T._debugger:return this.parseDebuggerStatement(n);case T._do:return this.parseDoStatement(n);case T._for:return this.parseForStatement(n);case T._function:return e||this.unexpected(),this.parseFunctionStatement(n);case T._class:return e||this.unexpected(),this.parseClass(n,!0);case T._if:return this.parseIfStatement(n);case T._return:return this.parseReturnStatement(n);case T._switch:return this.parseSwitchStatement(n);case T._throw:return this.parseThrowStatement(n);case T._try:return this.parseTryStatement(n);case T._let:case T._const:e||this.unexpected();case T._var:return this.parseVarStatement(n,r);case T._while:return this.parseWhileStatement(n);case T._with:return this.parseWithStatement(n);case T.braceL:return this.parseBlock();case T.semi:return this.parseEmptyStatement(n);case T._export:case T._import:if(this.hasPlugin("dynamicImport")&&this.lookahead().type===T.parenL)break;return this.options.allowImportExportEverywhere||(t||this.raise(this.state.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.state.start,"'import' and 'export' may appear only with 'sourceType: \"module\"'")),r===T._import?this.parseImport(n):this.parseExport(n);case T.name:if("async"===this.state.value){var i=this.state.clone();if(this.next(),this.match(T._function)&&!this.canInsertSemicolon())return this.expect(T._function),this.parseFunction(n,!0,!1,!0);this.state=i}}var s=this.state.value,a=this.parseExpression();return r===T.name&&"Identifier"===a.type&&this.eat(T.colon)?this.parseLabeledStatement(n,s,a):this.parseExpressionStatement(n,a)},X.takeDecorators=function(e){this.state.decorators.length&&(e.decorators=this.state.decorators,this.state.decorators=[])},X.parseDecorators=function(e){for(;this.match(T.at);){var t=this.parseDecorator();this.state.decorators.push(t)}e&&this.match(T._export)||this.match(T._class)||this.raise(this.state.start,"Leading decorators must be attached to a class declaration")},X.parseDecorator=function(){this.hasPlugin("decorators")||this.unexpected();var e=this.startNode();return this.next(),e.expression=this.parseMaybeAssign(),this.finishNode(e,"Decorator")},X.parseBreakContinueStatement=function(e,t){var r="break"===t;this.next(),this.isLineTerminator()?e.label=null:this.match(T.name)?(e.label=this.parseIdentifier(),this.semicolon()):this.unexpected();var n=void 0;for(n=0;n=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}a.name===t&&this.raise(r.start,"Label '"+t+"' is already declared")}for(var o=this.state.type.isLoop?"loop":this.match(T._switch)?"switch":null,u=this.state.labels.length-1;u>=0;u--){var l=this.state.labels[u];if(l.statementStart!==e.start)break;l.statementStart=this.state.start,l.kind=o}return this.state.labels.push({name:t,kind:o,statementStart:this.state.start}),e.body=this.parseStatement(!0),this.state.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")},X.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},X.parseBlock=function(e){var t=this.startNode();return this.expect(T.braceL),this.parseBlockBody(t,e,!1,T.braceR),this.finishNode(t,"BlockStatement")},X.isValidDirective=function(e){return"ExpressionStatement"===e.type&&"StringLiteral"===e.expression.type&&!e.expression.extra.parenthesized},X.parseBlockBody=function(e,t,r,n){e.body=[],e.directives=[];for(var i=!1,s=void 0,a=void 0;!this.eat(n);){i||!this.state.containsOctal||a||(a=this.state.octalPosition);var o=this.parseStatement(!0,r);if(t&&!i&&this.isValidDirective(o)){var u=this.stmtToDirective(o);e.directives.push(u),void 0===s&&"use strict"===u.value.value&&(s=this.state.strict,this.setStrict(!0),a&&this.raise(a,"Octal literal in strict mode"))}else i=!0,e.body.push(o)}!1===s&&this.setStrict(!1)},X.parseFor=function(e,t){return e.init=t,this.expect(T.semi),e.test=this.match(T.semi)?null:this.parseExpression(),this.expect(T.semi),e.update=this.match(T.parenR)?null:this.parseExpression(),this.expect(T.parenR),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,"ForStatement")},X.parseForIn=function(e,t,r){var n=void 0;return r?(this.eatContextual("of"),n="ForAwaitStatement"):(n=this.match(T._in)?"ForInStatement":"ForOfStatement",this.next()),e.left=t,e.right=this.parseExpression(),this.expect(T.parenR),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,n)},X.parseVar=function(e,t,r){for(e.declarations=[],e.kind=r.keyword;;){var n=this.startNode();if(this.parseVarHead(n),this.eat(T.eq)?n.init=this.parseMaybeAssign(t):r!==T._const||this.match(T._in)||this.isContextual("of")?"Identifier"===n.id.type||t&&(this.match(T._in)||this.isContextual("of"))?n.init=null:this.raise(this.state.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(T.comma))break}return e},X.parseVarHead=function(e){e.id=this.parseBindingAtom(),this.checkLVal(e.id,!0,void 0,"variable declaration")},X.parseFunction=function(e,t,r,n,i){var s=this.state.inMethod;return this.state.inMethod=!1,this.initFunction(e,n),this.match(T.star)&&(e.async&&!this.hasPlugin("asyncGenerators")?this.unexpected():(e.generator=!0,this.next())),!t||i||this.match(T.name)||this.match(T._yield)||this.unexpected(),(this.match(T.name)||this.match(T._yield))&&(e.id=this.parseBindingIdentifier()),this.parseFunctionParams(e),this.parseFunctionBody(e,r),this.state.inMethod=s,this.finishNode(e,t?"FunctionDeclaration":"FunctionExpression")},X.parseFunctionParams=function(e){this.expect(T.parenL),e.params=this.parseBindingList(T.parenR)},X.parseClass=function(e,t,r){return this.next(),this.takeDecorators(e),this.parseClassId(e,t,r),this.parseClassSuper(e),this.parseClassBody(e),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},X.isClassProperty=function(){return this.match(T.eq)||this.match(T.semi)||this.match(T.braceR)},X.isClassMethod=function(){return this.match(T.parenL)},X.isNonstaticConstructor=function(e){return!(e.computed||e.static||"constructor"!==e.key.name&&"constructor"!==e.key.value)},X.parseClassBody=function(e){var t=this.state.strict;this.state.strict=!0;var r=!1,n=!1,i=[],s=this.startNode();for(s.body=[],this.expect(T.braceL);!this.eat(T.braceR);)if(this.eat(T.semi))i.length>0&&this.raise(this.state.lastTokEnd,"Decorators must not be followed by a semicolon");else if(this.match(T.at))i.push(this.parseDecorator());else{var a=this.startNode();if(i.length&&(a.decorators=i,i=[]),a.static=!1,this.match(T.name)&&"static"===this.state.value){var o=this.parseIdentifier(!0);if(this.isClassMethod()){a.kind="method",a.computed=!1,a.key=o,this.parseClassMethod(s,a,!1,!1);continue}if(this.isClassProperty()){a.computed=!1,a.key=o,s.body.push(this.parseClassProperty(a));continue}a.static=!0}if(this.eat(T.star))a.kind="method",this.parsePropertyName(a),this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Constructor can't be a generator"),a.computed||!a.static||"prototype"!==a.key.name&&"prototype"!==a.key.value||this.raise(a.key.start,"Classes may not have static property named prototype"),this.parseClassMethod(s,a,!0,!1);else{var u=this.match(T.name),l=this.parsePropertyName(a);if(a.computed||!a.static||"prototype"!==a.key.name&&"prototype"!==a.key.value||this.raise(a.key.start,"Classes may not have static property named prototype"),this.isClassMethod())this.isNonstaticConstructor(a)?(n?this.raise(l.start,"Duplicate constructor in the same class"):a.decorators&&this.raise(a.start,"You can't attach decorators to a class constructor"),n=!0,a.kind="constructor"):a.kind="method",this.parseClassMethod(s,a,!1,!1);else if(this.isClassProperty())this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Classes may not have a non-static field named 'constructor'"),s.body.push(this.parseClassProperty(a));else if(u&&"async"===l.name&&!this.isLineTerminator()){var c=this.hasPlugin("asyncGenerators")&&this.eat(T.star);a.kind="method",this.parsePropertyName(a),this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Constructor can't be an async function"),this.parseClassMethod(s,a,c,!0)}else!u||"get"!==l.name&&"set"!==l.name||this.isLineTerminator()&&this.match(T.star)?this.hasPlugin("classConstructorCall")&&u&&"call"===l.name&&this.match(T.name)&&"constructor"===this.state.value?(r?this.raise(a.start,"Duplicate constructor call in the same class"):a.decorators&&this.raise(a.start,"You can't attach decorators to a class constructor"),r=!0,a.kind="constructorCall",this.parsePropertyName(a),this.parseClassMethod(s,a,!1,!1)):this.isLineTerminator()?(this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Classes may not have a non-static field named 'constructor'"),s.body.push(this.parseClassProperty(a))):this.unexpected():(a.kind=l.name,this.parsePropertyName(a),this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Constructor can't have get/set modifier"),this.parseClassMethod(s,a,!1,!1),this.checkGetterSetterParamCount(a))}}i.length&&this.raise(this.state.start,"You have trailing decorators with no method"),e.body=this.finishNode(s,"ClassBody"),this.state.strict=t},X.parseClassProperty=function(e){return this.state.inClassProperty=!0,this.match(T.eq)?(this.hasPlugin("classProperties")||this.unexpected(),this.next(),e.value=this.parseMaybeAssign()):e.value=null,this.semicolon(),this.state.inClassProperty=!1,this.finishNode(e,"ClassProperty")},X.parseClassMethod=function(e,t,r,n){this.parseMethod(t,r,n),e.body.push(this.finishNode(t,"ClassMethod"))},X.parseClassId=function(e,t,r){this.match(T.name)?e.id=this.parseIdentifier():r||!t?e.id=null:this.unexpected()},X.parseClassSuper=function(e){e.superClass=this.eat(T._extends)?this.parseExprSubscripts():null},X.parseExport=function(e){if(this.next(),this.match(T.star)){var t=this.startNode();if(this.next(),!this.hasPlugin("exportExtensions")||!this.eatContextual("as"))return this.parseExportFrom(e,!0),this.finishNode(e,"ExportAllDeclaration");t.exported=this.parseIdentifier(),e.specifiers=[this.finishNode(t,"ExportNamespaceSpecifier")],this.parseExportSpecifiersMaybe(e),this.parseExportFrom(e,!0)}else if(this.hasPlugin("exportExtensions")&&this.isExportDefaultSpecifier()){var r=this.startNode();if(r.exported=this.parseIdentifier(!0),e.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],this.match(T.comma)&&this.lookahead().type===T.star){this.expect(T.comma);var n=this.startNode();this.expect(T.star),this.expectContextual("as"),n.exported=this.parseIdentifier(),e.specifiers.push(this.finishNode(n,"ExportNamespaceSpecifier"))}else this.parseExportSpecifiersMaybe(e);this.parseExportFrom(e,!0)}else{if(this.eat(T._default)){var i=this.startNode(),s=!1;return this.eat(T._function)?i=this.parseFunction(i,!0,!1,!1,!0):this.match(T._class)?i=this.parseClass(i,!0,!0):(s=!0,i=this.parseMaybeAssign()),e.declaration=i,s&&this.semicolon(),this.checkExport(e,!0,!0),this.finishNode(e,"ExportDefaultDeclaration")}this.shouldParseExportDeclaration()?(e.specifiers=[],e.source=null,e.declaration=this.parseExportDeclaration(e)):(e.declaration=null,e.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(e))}return this.checkExport(e,!0),this.finishNode(e,"ExportNamedDeclaration")},X.parseExportDeclaration=function(){return this.parseStatement(!0)},X.isExportDefaultSpecifier=function(){if(this.match(T.name))return"async"!==this.state.value;if(!this.match(T._default))return!1;var e=this.lookahead();return e.type===T.comma||e.type===T.name&&"from"===e.value},X.parseExportSpecifiersMaybe=function(e){this.eat(T.comma)&&(e.specifiers=e.specifiers.concat(this.parseExportSpecifiers()))},X.parseExportFrom=function(e,t){this.eatContextual("from")?(e.source=this.match(T.string)?this.parseExprAtom():this.unexpected(),this.checkExport(e)):t?this.unexpected():e.source=null,this.semicolon()},X.shouldParseExportDeclaration=function(){return"var"===this.state.type.keyword||"const"===this.state.type.keyword||"let"===this.state.type.keyword||"function"===this.state.type.keyword||"class"===this.state.type.keyword||this.isContextual("async")},X.checkExport=function(e,t,r){if(t)if(r)this.checkDuplicateExports(e,"default");else if(e.specifiers&&e.specifiers.length){var n=e.specifiers,i=Array.isArray(n),s=0;for(n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}var o=a;this.checkDuplicateExports(o,o.exported.name)}}else if(e.declaration)if("FunctionDeclaration"===e.declaration.type||"ClassDeclaration"===e.declaration.type)this.checkDuplicateExports(e,e.declaration.id.name);else if("VariableDeclaration"===e.declaration.type){var u=e.declaration.declarations,l=Array.isArray(u),c=0;for(u=l?u:u[Symbol.iterator]();;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if((c=u.next()).done)break;p=c.value}var h=p;this.checkDeclaration(h.id)}}if(this.state.decorators.length){var f=e.declaration&&("ClassDeclaration"===e.declaration.type||"ClassExpression"===e.declaration.type);e.declaration&&f||this.raise(e.start,"You can only use decorators on an export when exporting a class"),this.takeDecorators(e.declaration)}},X.checkDeclaration=function(e){if("ObjectPattern"===e.type){var t=e.properties,r=Array.isArray(t),n=0;for(t=r?t:t[Symbol.iterator]();;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i;this.checkDeclaration(s)}}else if("ArrayPattern"===e.type){var a=e.elements,o=Array.isArray(a),u=0;for(a=o?a:a[Symbol.iterator]();;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}var c=l;c&&this.checkDeclaration(c)}}else"ObjectProperty"===e.type?this.checkDeclaration(e.value):"RestElement"===e.type||"RestProperty"===e.type?this.checkDeclaration(e.argument):"Identifier"===e.type&&this.checkDuplicateExports(e,e.name)},X.checkDuplicateExports=function(e,t){this.state.exportedIdentifiers.indexOf(t)>-1&&this.raiseDuplicateExportError(e,t),this.state.exportedIdentifiers.push(t)},X.raiseDuplicateExportError=function(e,t){this.raise(e.start,"default"===t?"Only one default export allowed per module.":"`"+t+"` has already been exported. Exported identifiers must be unique.")},X.parseExportSpecifiers=function(){var e=[],t=!0,r=void 0;for(this.expect(T.braceL);!this.eat(T.braceR);){if(t)t=!1;else if(this.expect(T.comma),this.eat(T.braceR))break;var n=this.match(T._default);n&&!r&&(r=!0);var i=this.startNode();i.local=this.parseIdentifier(n),i.exported=this.eatContextual("as")?this.parseIdentifier(!0):i.local.__clone(),e.push(this.finishNode(i,"ExportSpecifier"))}return r&&!this.isContextual("from")&&this.unexpected(),e},X.parseImport=function(e){return this.eat(T._import),this.match(T.string)?(e.specifiers=[],e.source=this.parseExprAtom()):(e.specifiers=[],this.parseImportSpecifiers(e),this.expectContextual("from"),e.source=this.match(T.string)?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},X.parseImportSpecifiers=function(e){var t=!0;if(this.match(T.name)){var r=this.state.start,n=this.state.startLoc;if(e.specifiers.push(this.parseImportSpecifierDefault(this.parseIdentifier(),r,n)),!this.eat(T.comma))return}if(this.match(T.star)){var i=this.startNode();return this.next(),this.expectContextual("as"),i.local=this.parseIdentifier(),this.checkLVal(i.local,!0,void 0,"import namespace specifier"),void e.specifiers.push(this.finishNode(i,"ImportNamespaceSpecifier"))}for(this.expect(T.braceL);!this.eat(T.braceR);){if(t)t=!1;else if(this.eat(T.colon)&&this.unexpected(null,"ES2015 named imports do not destructure. Use another statement for destructuring after the import."),this.expect(T.comma),this.eat(T.braceR))break;this.parseImportSpecifier(e)}},X.parseImportSpecifier=function(e){var t=this.startNode();t.imported=this.parseIdentifier(!0),this.eatContextual("as")?t.local=this.parseIdentifier():(this.checkReservedWord(t.imported.name,t.start,!0,!0),t.local=t.imported.__clone()),this.checkLVal(t.local,!0,void 0,"import specifier"),e.specifiers.push(this.finishNode(t,"ImportSpecifier"))},X.parseImportSpecifierDefault=function(e,t,r){var n=this.startNodeAt(t,r);return n.local=e,this.checkLVal(n.local,!0,void 0,"default import specifier"),this.finishNode(n,"ImportDefaultSpecifier")};var z=q.prototype;z.toAssignable=function(e,t,r){if(e)switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":e.type="ObjectPattern";var n=e.properties,i=Array.isArray(n),s=0;for(n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}var o=a;"ObjectMethod"===o.type?"get"===o.kind||"set"===o.kind?this.raise(o.key.start,"Object pattern can't contain getter or setter"):this.raise(o.key.start,"Object pattern can't contain methods"):this.toAssignable(o,t,"object destructuring pattern")}break;case"ObjectProperty":this.toAssignable(e.value,t,r);break;case"SpreadProperty":e.type="RestProperty";var u=e.argument;this.toAssignable(u,t,r);break;case"ArrayExpression":e.type="ArrayPattern",this.toAssignableList(e.elements,t,r);break;case"AssignmentExpression":"="===e.operator?(e.type="AssignmentPattern",delete e.operator):this.raise(e.left.end,"Only '=' operator can be used for specifying default value.");break;case"MemberExpression":if(!t)break;default:var l="Invalid left-hand side"+(r?" in "+r:"expression");this.raise(e.start,l)}return e},z.toAssignableList=function(e,t,r){var n=e.length;if(n){var i=e[n-1];if(i&&"RestElement"===i.type)--n;else if(i&&"SpreadElement"===i.type){i.type="RestElement";var s=i.argument;this.toAssignable(s,t,r),"Identifier"!==s.type&&"MemberExpression"!==s.type&&"ArrayPattern"!==s.type&&this.unexpected(s.start),--n}}for(var a=0;a=s.length)break;u=s[o++]}else{if((o=s.next()).done)break;u=o.value}var l=u;"ObjectProperty"===l.type&&(l=l.value),this.checkLVal(l,t,r,"object destructuring pattern")}break;case"ArrayPattern":var c=e.elements,p=Array.isArray(c),h=0;for(c=p?c:c[Symbol.iterator]();;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if((h=c.next()).done)break;f=h.value}var d=f;d&&this.checkLVal(d,t,r,"array destructuring pattern")}break;case"AssignmentPattern":this.checkLVal(e.left,t,r,"assignment pattern");break;case"RestProperty":this.checkLVal(e.argument,t,r,"rest property");break;case"RestElement":this.checkLVal(e.argument,t,r,"rest element");break;default:var m=(t?"Binding invalid":"Invalid")+" left-hand side"+(n?" in "+n:"expression");this.raise(e.start,m)}};var Y=q.prototype;Y.checkPropClash=function(e,t){if(!e.computed&&!e.kind){var r=e.key;"__proto__"===("Identifier"===r.type?r.name:String(r.value))&&(t.proto&&this.raise(r.start,"Redefinition of __proto__ property"),t.proto=!0)}},Y.getExpression=function(){this.nextToken();var e=this.parseExpression();return this.match(T.eof)||this.unexpected(),e},Y.parseExpression=function(e,t){var r=this.state.start,n=this.state.startLoc,i=this.parseMaybeAssign(e,t);if(this.match(T.comma)){var s=this.startNodeAt(r,n);for(s.expressions=[i];this.eat(T.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.toReferencedList(s.expressions),this.finishNode(s,"SequenceExpression")}return i},Y.parseMaybeAssign=function(e,t,r,n){var i=this.state.start,s=this.state.startLoc;if(this.match(T._yield)&&this.state.inGenerator){var a=this.parseYield();return r&&(a=r.call(this,a,i,s)),a}var o=void 0;t?o=!1:(t={start:0},o=!0),(this.match(T.parenL)||this.match(T.name))&&(this.state.potentialArrowAt=this.state.start);var u=this.parseMaybeConditional(e,t,n);if(r&&(u=r.call(this,u,i,s)),this.state.type.isAssign){var l=this.startNodeAt(i,s);if(l.operator=this.state.value,l.left=this.match(T.eq)?this.toAssignable(u,void 0,"assignment expression"):u,t.start=0,this.checkLVal(u,void 0,void 0,"assignment expression"),u.extra&&u.extra.parenthesized){var c=void 0;"ObjectPattern"===u.type?c="`({a}) = 0` use `({a} = 0)`":"ArrayPattern"===u.type&&(c="`([a]) = 0` use `([a] = 0)`"),c&&this.raise(u.start,"You're trying to assign to a parenthesized expression, eg. instead of "+c)}return this.next(),l.right=this.parseMaybeAssign(e),this.finishNode(l,"AssignmentExpression")}return o&&t.start&&this.unexpected(t.start),u},Y.parseMaybeConditional=function(e,t,r){var n=this.state.start,i=this.state.startLoc,s=this.parseExprOps(e,t);return t&&t.start?s:this.parseConditional(s,e,n,i,r)},Y.parseConditional=function(e,t,r,n){if(this.eat(T.question)){var i=this.startNodeAt(r,n);return i.test=e,i.consequent=this.parseMaybeAssign(),this.expect(T.colon),i.alternate=this.parseMaybeAssign(t),this.finishNode(i,"ConditionalExpression")}return e},Y.parseExprOps=function(e,t){var r=this.state.start,n=this.state.startLoc,i=this.parseMaybeUnary(t);return t&&t.start?i:this.parseExprOp(i,r,n,-1,e)},Y.parseExprOp=function(e,t,r,n,i){var s=this.state.type.binop;if(!(null==s||i&&this.match(T._in))&&s>n){var a=this.startNodeAt(t,r);a.left=e,a.operator=this.state.value,"**"!==a.operator||"UnaryExpression"!==e.type||!e.extra||e.extra.parenthesizedArgument||e.extra.parenthesized||this.raise(e.argument.start,"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");var o=this.state.type;this.next();var u=this.state.start,l=this.state.startLoc;return a.right=this.parseExprOp(this.parseMaybeUnary(),u,l,o.rightAssociative?s-1:s,i),this.finishNode(a,o===T.logicalOR||o===T.logicalAND?"LogicalExpression":"BinaryExpression"),this.parseExprOp(a,t,r,n,i)}return e},Y.parseMaybeUnary=function(e){if(this.state.type.prefix){var t=this.startNode(),r=this.match(T.incDec);t.operator=this.state.value,t.prefix=!0,this.next();var n=this.state.type;return t.argument=this.parseMaybeUnary(),this.addExtra(t,"parenthesizedArgument",!(n!==T.parenL||t.argument.extra&&t.argument.extra.parenthesized)),e&&e.start&&this.unexpected(e.start),r?this.checkLVal(t.argument,void 0,void 0,"prefix operation"):this.state.strict&&"delete"===t.operator&&"Identifier"===t.argument.type&&this.raise(t.start,"Deleting local variable in strict mode"),this.finishNode(t,r?"UpdateExpression":"UnaryExpression")}var i=this.state.start,s=this.state.startLoc,a=this.parseExprSubscripts(e);if(e&&e.start)return a;for(;this.state.type.postfix&&!this.canInsertSemicolon();){var o=this.startNodeAt(i,s);o.operator=this.state.value,o.prefix=!1,o.argument=a,this.checkLVal(a,void 0,void 0,"postfix operation"),this.next(),a=this.finishNode(o,"UpdateExpression")}return a},Y.parseExprSubscripts=function(e){var t=this.state.start,r=this.state.startLoc,n=this.state.potentialArrowAt,i=this.parseExprAtom(e);return"ArrowFunctionExpression"===i.type&&i.start===n?i:e&&e.start?i:this.parseSubscripts(i,t,r)},Y.parseSubscripts=function(e,t,r,n){for(;;){if(!n&&this.eat(T.doubleColon)){var i=this.startNodeAt(t,r);return i.object=e,i.callee=this.parseNoCallExpr(),this.parseSubscripts(this.finishNode(i,"BindExpression"),t,r,n)}if(this.eat(T.dot)){var s=this.startNodeAt(t,r);s.object=e,s.property=this.parseIdentifier(!0),s.computed=!1,e=this.finishNode(s,"MemberExpression")}else if(this.eat(T.bracketL)){var a=this.startNodeAt(t,r);a.object=e,a.property=this.parseExpression(),a.computed=!0,this.expect(T.bracketR),e=this.finishNode(a,"MemberExpression")}else if(!n&&this.match(T.parenL)){var o=this.state.potentialArrowAt===e.start&&"Identifier"===e.type&&"async"===e.name&&!this.canInsertSemicolon();this.next();var u=this.startNodeAt(t,r);if(u.callee=e,u.arguments=this.parseCallExpressionArguments(T.parenR,o),"Import"===u.callee.type&&1!==u.arguments.length&&this.raise(u.start,"import() requires exactly one argument"),e=this.finishNode(u,"CallExpression"),o&&this.shouldParseAsyncArrow())return this.parseAsyncArrowFromCallExpression(this.startNodeAt(t,r),u);this.toReferencedList(u.arguments)}else{if(!this.match(T.backQuote))return e;var l=this.startNodeAt(t,r);l.tag=e,l.quasi=this.parseTemplate(!0),e=this.finishNode(l,"TaggedTemplateExpression")}}},Y.parseCallExpressionArguments=function(e,t){for(var r=[],n=void 0,i=!0;!this.eat(e);){if(i)i=!1;else if(this.expect(T.comma),this.eat(e))break;this.match(T.parenL)&&!n&&(n=this.state.start),r.push(this.parseExprListItem(!1,t?{start:0}:void 0,t?{start:0}:void 0))}return t&&n&&this.shouldParseAsyncArrow()&&this.unexpected(),r},Y.shouldParseAsyncArrow=function(){return this.match(T.arrow)},Y.parseAsyncArrowFromCallExpression=function(e,t){return this.expect(T.arrow),this.parseArrowExpression(e,t.arguments,!0)},Y.parseNoCallExpr=function(){var e=this.state.start,t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,t,!0)},Y.parseExprAtom=function(e){var t=this.state.potentialArrowAt===this.state.start,r=void 0;switch(this.state.type){case T._super:return this.state.inMethod||this.state.inClassProperty||this.options.allowSuperOutsideMethod||this.raise(this.state.start,"'super' outside of function or class"),r=this.startNode(),this.next(),this.match(T.parenL)||this.match(T.bracketL)||this.match(T.dot)||this.unexpected(),this.match(T.parenL)&&"constructor"!==this.state.inMethod&&!this.options.allowSuperOutsideMethod&&this.raise(r.start,"super() outside of class constructor"),this.finishNode(r,"Super");case T._import:return this.hasPlugin("dynamicImport")||this.unexpected(),r=this.startNode(),this.next(),this.match(T.parenL)||this.unexpected(null,T.parenL),this.finishNode(r,"Import");case T._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case T._yield:this.state.inGenerator&&this.unexpected();case T.name:r=this.startNode();var n="await"===this.state.value&&this.state.inAsync,i=this.shouldAllowYieldIdentifier(),s=this.parseIdentifier(n||i);if("await"===s.name){if(this.state.inAsync||this.inModule)return this.parseAwait(r)}else{if("async"===s.name&&this.match(T._function)&&!this.canInsertSemicolon())return this.next(),this.parseFunction(r,!1,!1,!0);if(t&&"async"===s.name&&this.match(T.name)){var a=[this.parseIdentifier()];return this.expect(T.arrow),this.parseArrowExpression(r,a,!0)}}return t&&!this.canInsertSemicolon()&&this.eat(T.arrow)?this.parseArrowExpression(r,[s]):s;case T._do:if(this.hasPlugin("doExpressions")){var o=this.startNode();this.next();var u=this.state.inFunction,l=this.state.labels;return this.state.labels=[],this.state.inFunction=!1,o.body=this.parseBlock(!1,!0),this.state.inFunction=u,this.state.labels=l,this.finishNode(o,"DoExpression")}case T.regexp:var c=this.state.value;return r=this.parseLiteral(c.value,"RegExpLiteral"),r.pattern=c.pattern,r.flags=c.flags,r;case T.num:return this.parseLiteral(this.state.value,"NumericLiteral");case T.string:return this.parseLiteral(this.state.value,"StringLiteral");case T._null:return r=this.startNode(),this.next(),this.finishNode(r,"NullLiteral");case T._true:case T._false:return r=this.startNode(),r.value=this.match(T._true),this.next(),this.finishNode(r,"BooleanLiteral");case T.parenL:return this.parseParenAndDistinguishExpression(null,null,t);case T.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(T.bracketR,!0,e),this.toReferencedList(r.elements),this.finishNode(r,"ArrayExpression");case T.braceL:return this.parseObj(!1,e);case T._function:return this.parseFunctionExpression();case T.at:this.parseDecorators();case T._class:return r=this.startNode(),this.takeDecorators(r),this.parseClass(r,!1);case T._new:return this.parseNew();case T.backQuote:return this.parseTemplate(!1);case T.doubleColon:r=this.startNode(),this.next(),r.object=null;var p=r.callee=this.parseNoCallExpr();if("MemberExpression"===p.type)return this.finishNode(r,"BindExpression");this.raise(p.start,"Binding should be performed on object property.");default:this.unexpected()}},Y.parseFunctionExpression=function(){var e=this.startNode(),t=this.parseIdentifier(!0);return this.state.inGenerator&&this.eat(T.dot)&&this.hasPlugin("functionSent")?this.parseMetaProperty(e,t,"sent"):this.parseFunction(e,!1)},Y.parseMetaProperty=function(e,t,r){return e.meta=t,e.property=this.parseIdentifier(!0),e.property.name!==r&&this.raise(e.property.start,"The only valid meta property for new is "+t.name+"."+r),this.finishNode(e,"MetaProperty")},Y.parseLiteral=function(e,t,r,n){r=r||this.state.start,n=n||this.state.startLoc;var i=this.startNodeAt(r,n);return this.addExtra(i,"rawValue",e),this.addExtra(i,"raw",this.input.slice(r,this.state.end)),i.value=e,this.next(),this.finishNode(i,t)},Y.parseParenExpression=function(){this.expect(T.parenL);var e=this.parseExpression();return this.expect(T.parenR),e},Y.parseParenAndDistinguishExpression=function(e,t,r){e=e||this.state.start,t=t||this.state.startLoc;var n=void 0;this.expect(T.parenL);for(var i=this.state.start,s=this.state.startLoc,a=[],o={start:0},u={start:0},l=!0,c=void 0,p=void 0;!this.match(T.parenR);){if(l)l=!1;else if(this.expect(T.comma,u.start||null),this.match(T.parenR)){p=this.state.start;break}if(this.match(T.ellipsis)){var h=this.state.start,f=this.state.startLoc;c=this.state.start,a.push(this.parseParenItem(this.parseRest(),h,f));break}a.push(this.parseMaybeAssign(!1,o,this.parseParenItem,u))}var d=this.state.start,m=this.state.startLoc;this.expect(T.parenR);var y=this.startNodeAt(e,t);if(r&&this.shouldParseArrow()&&(y=this.parseArrow(y))){var g=a,b=Array.isArray(g),v=0;for(g=b?g:g[Symbol.iterator]();;){var x;if(b){if(v>=g.length)break;x=g[v++]}else{if((v=g.next()).done)break;x=v.value}var E=x;E.extra&&E.extra.parenthesized&&this.unexpected(E.extra.parenStart)}return this.parseArrowExpression(y,a)}return a.length||this.unexpected(this.state.lastTokStart),p&&this.unexpected(p),c&&this.unexpected(c),o.start&&this.unexpected(o.start),u.start&&this.unexpected(u.start),a.length>1?((n=this.startNodeAt(i,s)).expressions=a,this.toReferencedList(n.expressions),this.finishNodeAt(n,"SequenceExpression",d,m)):n=a[0],this.addExtra(n,"parenthesized",!0),this.addExtra(n,"parenStart",e),n},Y.shouldParseArrow=function(){return!this.canInsertSemicolon()},Y.parseArrow=function(e){if(this.eat(T.arrow))return e},Y.parseParenItem=function(e){return e},Y.parseNew=function(){var e=this.startNode(),t=this.parseIdentifier(!0);if(this.eat(T.dot)){var r=this.parseMetaProperty(e,t,"target");return this.state.inFunction||this.raise(r.property.start,"new.target can only be used in functions"),r}return e.callee=this.parseNoCallExpr(),this.eat(T.parenL)?(e.arguments=this.parseExprList(T.parenR),this.toReferencedList(e.arguments)):e.arguments=[],this.finishNode(e,"NewExpression")},Y.parseTemplateElement=function(e){var t=this.startNode();return null===this.state.value&&(e&&this.hasPlugin("templateInvalidEscapes")?this.state.invalidTemplateEscapePosition=null:this.raise(this.state.invalidTemplateEscapePosition,"Invalid escape sequence in template")),t.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\r\n?/g,"\n"),cooked:this.state.value},this.next(),t.tail=this.match(T.backQuote),this.finishNode(t,"TemplateElement")},Y.parseTemplate=function(e){var t=this.startNode();this.next(),t.expressions=[];var r=this.parseTemplateElement(e);for(t.quasis=[r];!r.tail;)this.expect(T.dollarBraceL),t.expressions.push(this.parseExpression()),this.expect(T.braceR),t.quasis.push(r=this.parseTemplateElement(e));return this.next(),this.finishNode(t,"TemplateLiteral")},Y.parseObj=function(e,t){var r=[],n=Object.create(null),i=!0,s=this.startNode();s.properties=[],this.next();for(var a=null;!this.eat(T.braceR);){if(i)i=!1;else if(this.expect(T.comma),this.eat(T.braceR))break;for(;this.match(T.at);)r.push(this.parseDecorator());var o=this.startNode(),u=!1,l=!1,c=void 0,p=void 0;if(r.length&&(o.decorators=r,r=[]),this.hasPlugin("objectRestSpread")&&this.match(T.ellipsis)){if(o=this.parseSpread(e?{start:0}:void 0),o.type=e?"RestProperty":"SpreadProperty",e&&this.toAssignable(o.argument,!0,"object pattern"),s.properties.push(o),!e)continue;var h=this.state.start;if(null===a){if(this.eat(T.braceR))break;if(this.match(T.comma)&&this.lookahead().type===T.braceR)continue;a=h;continue}this.unexpected(a,"Cannot have multiple rest elements when destructuring")}if(o.method=!1,o.shorthand=!1,(e||t)&&(c=this.state.start,p=this.state.startLoc),e||(u=this.eat(T.star)),!e&&this.isContextual("async")){u&&this.unexpected();var f=this.parseIdentifier();this.match(T.colon)||this.match(T.parenL)||this.match(T.braceR)||this.match(T.eq)||this.match(T.comma)?(o.key=f,o.computed=!1):(l=!0,this.hasPlugin("asyncGenerators")&&(u=this.eat(T.star)),this.parsePropertyName(o))}else this.parsePropertyName(o);this.parseObjPropValue(o,c,p,u,l,e,t),this.checkPropClash(o,n),o.shorthand&&this.addExtra(o,"shorthand",!0),s.properties.push(o)}return null!==a&&this.unexpected(a,"The rest element has to be the last element when destructuring"),r.length&&this.raise(this.state.start,"You have trailing decorators with no property"),this.finishNode(s,e?"ObjectPattern":"ObjectExpression")},Y.isGetterOrSetterMethod=function(e,t){return!t&&!e.computed&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)&&(this.match(T.string)||this.match(T.num)||this.match(T.bracketL)||this.match(T.name)||this.state.type.keyword)},Y.checkGetterSetterParamCount=function(e){var t="get"===e.kind?0:1;if(e.params.length!==t){var r=e.start;"get"===e.kind?this.raise(r,"getter should have no params"):this.raise(r,"setter should have exactly one param")}},Y.parseObjectMethod=function(e,t,r,n){return r||t||this.match(T.parenL)?(n&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,r),this.finishNode(e,"ObjectMethod")):this.isGetterOrSetterMethod(e,n)?((t||r)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),this.parseMethod(e),this.checkGetterSetterParamCount(e),this.finishNode(e,"ObjectMethod")):void 0},Y.parseObjectProperty=function(e,t,r,n,i){return this.eat(T.colon)?(e.value=n?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssign(!1,i),this.finishNode(e,"ObjectProperty")):e.computed||"Identifier"!==e.key.type?void 0:(this.checkReservedWord(e.key.name,e.key.start,!0,!0),n?e.value=this.parseMaybeDefault(t,r,e.key.__clone()):this.match(T.eq)&&i?(i.start||(i.start=this.state.start),e.value=this.parseMaybeDefault(t,r,e.key.__clone())):e.value=e.key.__clone(),e.shorthand=!0,this.finishNode(e,"ObjectProperty"))},Y.parseObjPropValue=function(e,t,r,n,i,s,a){var o=this.parseObjectMethod(e,n,i,s)||this.parseObjectProperty(e,t,r,s,a);return o||this.unexpected(),o},Y.parsePropertyName=function(e){if(this.eat(T.bracketL))e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(T.bracketR);else{e.computed=!1;var t=this.state.inPropertyName;this.state.inPropertyName=!0,e.key=this.match(T.num)||this.match(T.string)?this.parseExprAtom():this.parseIdentifier(!0),this.state.inPropertyName=t}return e.key},Y.initFunction=function(e,t){e.id=null,e.generator=!1,e.expression=!1,e.async=!!t},Y.parseMethod=function(e,t,r){var n=this.state.inMethod;return this.state.inMethod=e.kind||!0,this.initFunction(e,r),this.expect(T.parenL),e.params=this.parseBindingList(T.parenR),e.generator=!!t,this.parseFunctionBody(e),this.state.inMethod=n,e},Y.parseArrowExpression=function(e,t,r){return this.initFunction(e,r),e.params=this.toAssignableList(t,!0,"arrow function parameters"),this.parseFunctionBody(e,!0),this.finishNode(e,"ArrowFunctionExpression")},Y.isStrictBody=function(e,t){if(!t&&e.body.directives.length){var r=e.body.directives,n=Array.isArray(r),i=0;for(r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}if("use strict"===s.value.value)return!0}}return!1},Y.parseFunctionBody=function(e,t){var r=t&&!this.match(T.braceL),n=this.state.inAsync;if(this.state.inAsync=e.async,r)e.body=this.parseMaybeAssign(),e.expression=!0;else{var i=this.state.inFunction,s=this.state.inGenerator,a=this.state.labels;this.state.inFunction=!0,this.state.inGenerator=e.generator,this.state.labels=[],e.body=this.parseBlock(!0),e.expression=!1,this.state.inFunction=i,this.state.inGenerator=s,this.state.labels=a}this.state.inAsync=n;var o=this.isStrictBody(e,r),u=this.state.strict||t||o;if(o&&e.id&&"Identifier"===e.id.type&&"yield"===e.id.name&&this.raise(e.id.start,"Binding yield in strict mode"),u){var l=Object.create(null),c=this.state.strict;o&&(this.state.strict=!0),e.id&&this.checkLVal(e.id,!0,void 0,"function name");var p=e.params,h=Array.isArray(p),f=0;for(p=h?p:p[Symbol.iterator]();;){var d;if(h){if(f>=p.length)break;d=p[f++]}else{if((f=p.next()).done)break;d=f.value}var m=d;o&&"Identifier"!==m.type&&this.raise(m.start,"Non-simple parameter in strict mode"),this.checkLVal(m,!0,l,"function parameter list")}this.state.strict=c}},Y.parseExprList=function(e,t,r){for(var n=[],i=!0;!this.eat(e);){if(i)i=!1;else if(this.expect(T.comma),this.eat(e))break;n.push(this.parseExprListItem(t,r))}return n},Y.parseExprListItem=function(e,t,r){return e&&this.match(T.comma)?null:this.match(T.ellipsis)?this.parseSpread(t):this.parseMaybeAssign(!1,t,this.parseParenItem,r)},Y.parseIdentifier=function(e){var t=this.startNode();return e||this.checkReservedWord(this.state.value,this.state.start,!!this.state.type.keyword,!1),this.match(T.name)?t.name=this.state.value:this.state.type.keyword?t.name=this.state.type.keyword:this.unexpected(),!e&&"await"===t.name&&this.state.inAsync&&this.raise(t.start,"invalid use of await inside of an async function"),t.loc.identifierName=t.name,this.next(),this.finishNode(t,"Identifier")},Y.checkReservedWord=function(e,t,r,n){(this.isReservedWord(e)||r&&this.isKeyword(e))&&this.raise(t,e+" is a reserved word"),this.state.strict&&(f.strict(e)||n&&f.strictBind(e))&&this.raise(t,e+" is a reserved word in strict mode")},Y.parseAwait=function(e){return this.state.inAsync||this.unexpected(),this.match(T.star)&&this.raise(e.start,"await* has been removed from the async functions proposal. Use Promise.all() instead."),e.argument=this.parseMaybeUnary(),this.finishNode(e,"AwaitExpression")},Y.parseYield=function(){var e=this.startNode();return this.next(),this.match(T.semi)||this.canInsertSemicolon()||!this.match(T.star)&&!this.state.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(T.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")};var H=q.prototype,$=["leadingComments","trailingComments","innerComments"],Q=function(){function e(t,r,n){D(this,e),this.type="",this.start=t,this.end=0,this.loc=new M(r),n&&(this.loc.filename=n)}return e.prototype.__clone=function(){var t=new e;for(var r in this)$.indexOf(r)<0&&(t[r]=this[r]);return t},e}();H.startNode=function(){return new Q(this.state.start,this.state.startLoc,this.filename)},H.startNodeAt=function(e,t){return new Q(e,t,this.filename)},H.finishNode=function(e,t){return l.call(this,e,t,this.state.lastTokEnd,this.state.lastTokEndLoc)},H.finishNodeAt=function(e,t,r,n){return l.call(this,e,t,r,n)};q.prototype.raise=function(e,t){var r=function(e,t){for(var r=1,n=0;;){O.lastIndex=n;var i=O.exec(e);if(!(i&&i.index0)){var t=this.state.commentStack,r=void 0,n=void 0,i=void 0,s=void 0,a=void 0;if(this.state.trailingComments.length>0)this.state.trailingComments[0].start>=e.end?(i=this.state.trailingComments,this.state.trailingComments=[]):this.state.trailingComments.length=0;else{var o=c(t);t.length>0&&o.trailingComments&&o.trailingComments[0].start>=e.end&&(i=o.trailingComments,o.trailingComments=null)}for(t.length>0&&c(t).start>=e.start&&(r=t.pop());t.length>0&&c(t).start>=e.start;)n=t.pop();if(!n&&r&&(n=r),r&&this.state.leadingComments.length>0){var u=c(this.state.leadingComments);if("ObjectProperty"===r.type){if(u.start>=e.start&&this.state.commentPreviousNode){for(a=0;a0&&(r.trailingComments=this.state.leadingComments,this.state.leadingComments=[])}}else if("CallExpression"===e.type&&e.arguments&&e.arguments.length){var l=c(e.arguments);l&&u.start>=l.start&&u.end<=e.end&&this.state.commentPreviousNode&&this.state.leadingComments.length>0&&(l.trailingComments=this.state.leadingComments,this.state.leadingComments=[])}}if(n){if(n.leadingComments)if(n!==e&&c(n.leadingComments).end<=e.start)e.leadingComments=n.leadingComments,n.leadingComments=null;else for(s=n.leadingComments.length-2;s>=0;--s)if(n.leadingComments[s].end<=e.start){e.leadingComments=n.leadingComments.splice(0,s+1);break}}else if(this.state.leadingComments.length>0)if(c(this.state.leadingComments).end<=e.start){if(this.state.commentPreviousNode)for(a=0;a0&&(e.leadingComments=this.state.leadingComments,this.state.leadingComments=[])}else{for(s=0;se.start);s++);e.leadingComments=this.state.leadingComments.slice(0,s),0===e.leadingComments.length&&(e.leadingComments=null),0===(i=this.state.leadingComments.slice(s)).length&&(i=null)}this.state.commentPreviousNode=e,i&&(i.length&&i[0].start>=e.start&&c(i).end<=e.end?e.innerComments=i:e.trailingComments=i),t.push(e)}};var ee=q.prototype;ee.estreeParseRegExpLiteral=function(e){var t=e.pattern,r=e.flags,n=null;try{n=new RegExp(t,r)}catch(e){}var i=this.estreeParseLiteral(n);return i.regex={pattern:t,flags:r},i},ee.estreeParseLiteral=function(e){return this.parseLiteral(e,"Literal")},ee.directiveToStmt=function(e){var t=e.value,r=this.startNodeAt(e.start,e.loc.start),n=this.startNodeAt(t.start,t.loc.start);return n.value=t.value,n.raw=t.extra.raw,r.expression=this.finishNodeAt(n,"Literal",t.end,t.loc.end),r.directive=t.extra.raw.slice(1,-1),this.finishNodeAt(r,"ExpressionStatement",e.end,e.loc.end)};var te=["any","mixed","empty","bool","boolean","number","string","void","null"],re=q.prototype;re.flowParseTypeInitialiser=function(e){var t=this.state.inType;this.state.inType=!0,this.expect(e||T.colon);var r=this.flowParseType();return this.state.inType=t,r},re.flowParsePredicate=function(){var e=this.startNode(),t=this.state.startLoc,r=this.state.start;this.expect(T.modulo);var n=this.state.startLoc;return this.expectContextual("checks"),t.line===n.line&&t.column===n.column-1||this.raise(r,"Spaces between ´%´ and ´checks´ are not allowed here."),this.eat(T.parenL)?(e.expression=this.parseExpression(),this.expect(T.parenR),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")},re.flowParseTypeAndPredicateInitialiser=function(){var e=this.state.inType;this.state.inType=!0,this.expect(T.colon);var t=null,r=null;return this.match(T.modulo)?(this.state.inType=e,r=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(T.modulo)&&(r=this.flowParsePredicate())),[t,r]},re.flowParseDeclareClass=function(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")},re.flowParseDeclareFunction=function(e){this.next();var t=e.id=this.parseIdentifier(),r=this.startNode(),n=this.startNode();this.isRelational("<")?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,this.expect(T.parenL);var i=this.flowParseFunctionTypeParams();r.params=i.params,r.rest=i.rest,this.expect(T.parenR);var s=null,a=this.flowParseTypeAndPredicateInitialiser();return r.returnType=a[0],s=a[1],n.typeAnnotation=this.finishNode(r,"FunctionTypeAnnotation"),n.predicate=s,t.typeAnnotation=this.finishNode(n,"TypeAnnotation"),this.finishNode(t,t.type),this.semicolon(),this.finishNode(e,"DeclareFunction")},re.flowParseDeclare=function(e){return this.match(T._class)?this.flowParseDeclareClass(e):this.match(T._function)?this.flowParseDeclareFunction(e):this.match(T._var)?this.flowParseDeclareVariable(e):this.isContextual("module")?this.lookahead().type===T.dot?this.flowParseDeclareModuleExports(e):this.flowParseDeclareModule(e):this.isContextual("type")?this.flowParseDeclareTypeAlias(e):this.isContextual("opaque")?this.flowParseDeclareOpaqueType(e):this.isContextual("interface")?this.flowParseDeclareInterface(e):this.match(T._export)?this.flowParseDeclareExportDeclaration(e):void this.unexpected()},re.flowParseDeclareExportDeclaration=function(e){if(this.expect(T._export),this.isContextual("opaque"))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration");throw this.unexpected()},re.flowParseDeclareVariable=function(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(),this.semicolon(),this.finishNode(e,"DeclareVariable")},re.flowParseDeclareModule=function(e){this.next(),this.match(T.string)?e.id=this.parseExprAtom():e.id=this.parseIdentifier();var t=e.body=this.startNode(),r=t.body=[];for(this.expect(T.braceL);!this.match(T.braceR);){var n=this.startNode();if(this.match(T._import)){var i=this.lookahead();"type"!==i.value&&"typeof"!==i.value&&this.unexpected(null,"Imports within a `declare module` body must always be `import type` or `import typeof`"),this.parseImport(n)}else this.expectContextual("declare","Only declares and type imports are allowed inside declare module"),n=this.flowParseDeclare(n,!0);r.push(n)}return this.expect(T.braceR),this.finishNode(t,"BlockStatement"),this.finishNode(e,"DeclareModule")},re.flowParseDeclareModuleExports=function(e){return this.expectContextual("module"),this.expect(T.dot),this.expectContextual("exports"),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")},re.flowParseDeclareTypeAlias=function(e){return this.next(),this.flowParseTypeAlias(e),this.finishNode(e,"DeclareTypeAlias")},re.flowParseDeclareOpaqueType=function(e){return this.next(),this.flowParseOpaqueType(e,!0),this.finishNode(e,"DeclareOpaqueType")},re.flowParseDeclareInterface=function(e){return this.next(),this.flowParseInterfaceish(e),this.finishNode(e,"DeclareInterface")},re.flowParseInterfaceish=function(e){if(e.id=this.parseIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],e.mixins=[],this.eat(T._extends))do{e.extends.push(this.flowParseInterfaceExtends())}while(this.eat(T.comma));if(this.isContextual("mixins")){this.next();do{e.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(T.comma))}e.body=this.flowParseObjectType(!0,!1,!1)},re.flowParseInterfaceExtends=function(){var e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")},re.flowParseInterface=function(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")},re.flowParseRestrictedIdentifier=function(e){return te.indexOf(this.state.value)>-1&&this.raise(this.state.start,"Cannot overwrite primitive type "+this.state.value),this.parseIdentifier(e)},re.flowParseTypeAlias=function(e){return e.id=this.flowParseRestrictedIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(T.eq),this.semicolon(),this.finishNode(e,"TypeAlias")},re.flowParseOpaqueType=function(e,t){return this.expectContextual("type"),e.id=this.flowParseRestrictedIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(T.colon)&&(e.supertype=this.flowParseTypeInitialiser(T.colon)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(T.eq)),this.semicolon(),this.finishNode(e,"OpaqueType")},re.flowParseTypeParameter=function(){var e=this.startNode(),t=this.flowParseVariance(),r=this.flowParseTypeAnnotatableIdentifier();return e.name=r.name,e.variance=t,e.bound=r.typeAnnotation,this.match(T.eq)&&(this.eat(T.eq),e.default=this.flowParseType()),this.finishNode(e,"TypeParameter")},re.flowParseTypeParameterDeclaration=function(){var e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.isRelational("<")||this.match(T.jsxTagStart)?this.next():this.unexpected();do{t.params.push(this.flowParseTypeParameter()),this.isRelational(">")||this.expect(T.comma)}while(!this.isRelational(">"));return this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterDeclaration")},re.flowParseTypeParameterInstantiation=function(){var e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)e.params.push(this.flowParseType()),this.isRelational(">")||this.expect(T.comma);return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")},re.flowParseObjectPropertyKey=function(){return this.match(T.num)||this.match(T.string)?this.parseExprAtom():this.parseIdentifier(!0)},re.flowParseObjectTypeIndexer=function(e,t,r){return e.static=t,this.expect(T.bracketL),this.lookahead().type===T.colon?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(T.bracketR),e.value=this.flowParseTypeInitialiser(),e.variance=r,this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeIndexer")},re.flowParseObjectTypeMethodish=function(e){for(e.params=[],e.rest=null,e.typeParameters=null,this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(T.parenL);!this.match(T.parenR)&&!this.match(T.ellipsis);)e.params.push(this.flowParseFunctionTypeParam()),this.match(T.parenR)||this.expect(T.comma);return this.eat(T.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),this.expect(T.parenR),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")},re.flowParseObjectTypeMethod=function(e,t,r,n){var i=this.startNodeAt(e,t);return i.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e,t)),i.static=r,i.key=n,i.optional=!1,this.flowObjectTypeSemicolon(),this.finishNode(i,"ObjectTypeProperty")},re.flowParseObjectTypeCallProperty=function(e,t){var r=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(r),this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeCallProperty")},re.flowParseObjectType=function(e,t,r){var n=this.state.inType;this.state.inType=!0;var i=this.startNode(),s=void 0,a=void 0,o=!1;i.callProperties=[],i.properties=[],i.indexers=[];var u=void 0,l=void 0;for(t&&this.match(T.braceBarL)?(this.expect(T.braceBarL),u=T.braceBarR,l=!0):(this.expect(T.braceL),u=T.braceR,l=!1),i.exact=l;!this.match(u);){var c=!1,p=this.state.start,h=this.state.startLoc;s=this.startNode(),e&&this.isContextual("static")&&this.lookahead().type!==T.colon&&(this.next(),o=!0);var f=this.state.start,d=this.flowParseVariance();this.match(T.bracketL)?i.indexers.push(this.flowParseObjectTypeIndexer(s,o,d)):this.match(T.parenL)||this.isRelational("<")?(d&&this.unexpected(f),i.callProperties.push(this.flowParseObjectTypeCallProperty(s,o))):this.match(T.ellipsis)?(r||this.unexpected(null,"Spread operator cannot appear in class or interface definitions"),d&&this.unexpected(d.start,"Spread properties cannot have variance"),this.expect(T.ellipsis),s.argument=this.flowParseType(),this.flowObjectTypeSemicolon(),i.properties.push(this.finishNode(s,"ObjectTypeSpreadProperty"))):(a=this.flowParseObjectPropertyKey(),this.isRelational("<")||this.match(T.parenL)?(d&&this.unexpected(d.start),i.properties.push(this.flowParseObjectTypeMethod(p,h,o,a))):(this.eat(T.question)&&(c=!0),s.key=a,s.value=this.flowParseTypeInitialiser(),s.optional=c,s.static=o,s.variance=d,this.flowObjectTypeSemicolon(),i.properties.push(this.finishNode(s,"ObjectTypeProperty")))),o=!1}this.expect(u);var m=this.finishNode(i,"ObjectTypeAnnotation");return this.state.inType=n,m},re.flowObjectTypeSemicolon=function(){this.eat(T.semi)||this.eat(T.comma)||this.match(T.braceR)||this.match(T.braceBarR)||this.unexpected()},re.flowParseQualifiedTypeIdentifier=function(e,t,r){e=e||this.state.start,t=t||this.state.startLoc;for(var n=r||this.parseIdentifier();this.eat(T.dot);){var i=this.startNodeAt(e,t);i.qualification=n,i.id=this.parseIdentifier(),n=this.finishNode(i,"QualifiedTypeIdentifier")}return n},re.flowParseGenericType=function(e,t,r){var n=this.startNodeAt(e,t);return n.typeParameters=null,n.id=this.flowParseQualifiedTypeIdentifier(e,t,r),this.isRelational("<")&&(n.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(n,"GenericTypeAnnotation")},re.flowParseTypeofType=function(){var e=this.startNode();return this.expect(T._typeof),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")},re.flowParseTupleType=function(){var e=this.startNode();for(e.types=[],this.expect(T.bracketL);this.state.pos0&&void 0!==arguments[0]?arguments[0]:[],rest:null};!this.match(T.parenR)&&!this.match(T.ellipsis);)e.params.push(this.flowParseFunctionTypeParam()),this.match(T.parenR)||this.expect(T.comma);return this.eat(T.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),e},re.flowIdentToTypeAnnotation=function(e,t,r,n){switch(n.name){case"any":return this.finishNode(r,"AnyTypeAnnotation");case"void":return this.finishNode(r,"VoidTypeAnnotation");case"bool":case"boolean":return this.finishNode(r,"BooleanTypeAnnotation");case"mixed":return this.finishNode(r,"MixedTypeAnnotation");case"empty":return this.finishNode(r,"EmptyTypeAnnotation");case"number":return this.finishNode(r,"NumberTypeAnnotation");case"string":return this.finishNode(r,"StringTypeAnnotation");default:return this.flowParseGenericType(e,t,n)}},re.flowParsePrimaryType=function(){var e=this.state.start,t=this.state.startLoc,r=this.startNode(),n=void 0,i=void 0,s=!1,a=this.state.noAnonFunctionType;switch(this.state.type){case T.name:return this.flowIdentToTypeAnnotation(e,t,r,this.parseIdentifier());case T.braceL:return this.flowParseObjectType(!1,!1,!0);case T.braceBarL:return this.flowParseObjectType(!1,!0,!0);case T.bracketL:return this.flowParseTupleType();case T.relational:if("<"===this.state.value)return r.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(T.parenL),n=this.flowParseFunctionTypeParams(),r.params=n.params,r.rest=n.rest,this.expect(T.parenR),this.expect(T.arrow),r.returnType=this.flowParseType(),this.finishNode(r,"FunctionTypeAnnotation");break;case T.parenL:if(this.next(),!this.match(T.parenR)&&!this.match(T.ellipsis))if(this.match(T.name)){var o=this.lookahead().type;s=o!==T.question&&o!==T.colon}else s=!0;if(s){if(this.state.noAnonFunctionType=!1,i=this.flowParseType(),this.state.noAnonFunctionType=a,this.state.noAnonFunctionType||!(this.match(T.comma)||this.match(T.parenR)&&this.lookahead().type===T.arrow))return this.expect(T.parenR),i;this.eat(T.comma)}return n=i?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(i)]):this.flowParseFunctionTypeParams(),r.params=n.params,r.rest=n.rest,this.expect(T.parenR),this.expect(T.arrow),r.returnType=this.flowParseType(),r.typeParameters=null,this.finishNode(r,"FunctionTypeAnnotation");case T.string:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case T._true:case T._false:return r.value=this.match(T._true),this.next(),this.finishNode(r,"BooleanLiteralTypeAnnotation");case T.plusMin:if("-"===this.state.value)return this.next(),this.match(T.num)||this.unexpected(null,"Unexpected token, expected number"),this.parseLiteral(-this.state.value,"NumericLiteralTypeAnnotation",r.start,r.loc.start);this.unexpected();case T.num:return this.parseLiteral(this.state.value,"NumericLiteralTypeAnnotation");case T._null:return r.value=this.match(T._null),this.next(),this.finishNode(r,"NullLiteralTypeAnnotation");case T._this:return r.value=this.match(T._this),this.next(),this.finishNode(r,"ThisTypeAnnotation");case T.star:return this.next(),this.finishNode(r,"ExistentialTypeParam");default:if("typeof"===this.state.type.keyword)return this.flowParseTypeofType()}this.unexpected()},re.flowParsePostfixType=function(){for(var e=this.state.start,t=this.state.startLoc,r=this.flowParsePrimaryType();!this.canInsertSemicolon()&&this.match(T.bracketL);){var n=this.startNodeAt(e,t);n.elementType=r,this.expect(T.bracketL),this.expect(T.bracketR),r=this.finishNode(n,"ArrayTypeAnnotation")}return r},re.flowParsePrefixType=function(){var e=this.startNode();return this.eat(T.question)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()},re.flowParseAnonFunctionWithoutParens=function(){var e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(T.arrow)){var t=this.startNodeAt(e.start,e.loc.start);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,"FunctionTypeAnnotation")}return e},re.flowParseIntersectionType=function(){var e=this.startNode();this.eat(T.bitwiseAND);var t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(T.bitwiseAND);)e.types.push(this.flowParseAnonFunctionWithoutParens());return 1===e.types.length?t:this.finishNode(e,"IntersectionTypeAnnotation")},re.flowParseUnionType=function(){var e=this.startNode();this.eat(T.bitwiseOR);var t=this.flowParseIntersectionType();for(e.types=[t];this.eat(T.bitwiseOR);)e.types.push(this.flowParseIntersectionType());return 1===e.types.length?t:this.finishNode(e,"UnionTypeAnnotation")},re.flowParseType=function(){var e=this.state.inType;this.state.inType=!0;var t=this.flowParseUnionType();return this.state.inType=e,t},re.flowParseTypeAnnotation=function(){var e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")},re.flowParseTypeAndPredicateAnnotation=function(){var e=this.startNode(),t=this.flowParseTypeAndPredicateInitialiser();return e.typeAnnotation=t[0],e.predicate=t[1],this.finishNode(e,"TypeAnnotation")},re.flowParseTypeAnnotatableIdentifier=function(){var e=this.flowParseRestrictedIdentifier();return this.match(T.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(e,e.type)),e},re.typeCastToParameter=function(e){return e.expression.typeAnnotation=e.typeAnnotation,this.finishNodeAt(e.expression,e.expression.type,e.typeAnnotation.end,e.typeAnnotation.loc.end)},re.flowParseVariance=function(){var e=null;return this.match(T.plusMin)&&("+"===this.state.value?e="plus":"-"===this.state.value&&(e="minus"),this.next()),e};var ne=String.fromCodePoint;if(!ne){var ie=String.fromCharCode,se=Math.floor;ne=function(){var e=[],t=void 0,r=void 0,n=-1,i=arguments.length;if(!i)return"";for(var s="";++n1114111||se(a)!=a)throw RangeError("Invalid code point: "+a);a<=65535?e.push(a):(t=55296+((a-=65536)>>10),r=a%1024+56320,e.push(t,r)),(n+1==i||e.length>16384)&&(s+=ie.apply(null,e),e.length=0)}return s}}var ae=ne,oe={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"Â¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Ã",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Ã…",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"ÃŒ",Iacute:"Ã",Icirc:"ÃŽ",Iuml:"Ã",ETH:"Ã",Ntilde:"Ñ",Ograve:"Ã’",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ãœ",Yacute:"Ã",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"Ã¥",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Å’",oelig:"Å“",Scaron:"Å ",scaron:"Å¡",Yuml:"Ÿ",fnof:"Æ’",circ:"ˆ",tilde:"Ëœ",Alpha:"Α",Beta:"Î’",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Îœ",Nu:"Î",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Î¥",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"Ï€",rho:"Ï",sigmaf:"Ï‚",sigma:"σ",tau:"Ï„",upsilon:"Ï…",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"Ï‘",upsih:"Ï’",piv:"Ï–",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"â€",lrm:"‎",rlm:"â€",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"â€",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"â„",euro:"€",image:"â„‘",weierp:"℘",real:"â„œ",trade:"â„¢",alefsym:"ℵ",larr:"â†",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"â‡",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"âˆ",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"âˆ",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"â‹…",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"â—Š",spades:"â™ ",clubs:"♣",hearts:"♥",diams:"♦"},ue=/^[\da-fA-F]+$/,le=/^\d+$/;I.j_oTag=new j("...",!0,!0),T.jsxName=new w("jsxName"),T.jsxText=new w("jsxText",{beforeExpr:!0}),T.jsxTagStart=new w("jsxTagStart",{startsExpr:!0}),T.jsxTagEnd=new w("jsxTagEnd"),T.jsxTagStart.updateContext=function(){this.state.context.push(I.j_expr),this.state.context.push(I.j_oTag),this.state.exprAllowed=!1},T.jsxTagEnd.updateContext=function(e){var t=this.state.context.pop();t===I.j_oTag&&e===T.slash||t===I.j_cTag?(this.state.context.pop(),this.state.exprAllowed=this.curContext()===I.j_expr):this.state.exprAllowed=!0};var ce=q.prototype;ce.jsxReadToken=function(){for(var e="",t=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated JSX contents");var r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:return this.state.pos===this.state.start?60===r&&this.state.exprAllowed?(++this.state.pos,this.finishToken(T.jsxTagStart)):this.getTokenFromCode(r):(e+=this.input.slice(t,this.state.pos),this.finishToken(T.jsxText,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;default:o(r)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}},ce.jsxReadNewLine=function(e){var t=this.input.charCodeAt(this.state.pos),r=void 0;return++this.state.pos,13===t&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,r=e?"\n":"\r\n"):r=String.fromCharCode(t),++this.state.curLine,this.state.lineStart=this.state.pos,r},ce.jsxReadString=function(e){for(var t="",r=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var n=this.input.charCodeAt(this.state.pos);if(n===e)break;38===n?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadEntity(),r=this.state.pos):o(n)?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}return t+=this.input.slice(r,this.state.pos++),this.finishToken(T.string,t)},ce.jsxReadEntity=function(){for(var e="",t=0,r=void 0,n=this.input[this.state.pos],i=++this.state.pos;this.state.pos")}return r.openingElement=i,r.closingElement=s,r.children=n,this.match(T.relational)&&"<"===this.state.value&&this.raise(this.state.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(r,"JSXElement")},ce.jsxParseElement=function(){var e=this.state.start,t=this.state.startLoc;return this.next(),this.jsxParseElementAt(e,t)};V.estree=function(e){e.extend("checkDeclaration",function(e){return function(t){p(t)?this.checkDeclaration(t.value):e.call(this,t)}}),e.extend("checkGetterSetterParamCount",function(){return function(e){var t="get"===e.kind?0:1;if(e.value.params.length!==t){var r=e.start;"get"===e.kind?this.raise(r,"getter should have no params"):this.raise(r,"setter should have exactly one param")}}}),e.extend("checkLVal",function(e){return function(t,r,n){var i=this;switch(t.type){case"ObjectPattern":t.properties.forEach(function(e){i.checkLVal("Property"===e.type?e.value:e,r,n,"object destructuring pattern")});break;default:for(var s=arguments.length,a=Array(s>3?s-3:0),o=3;o0){var r=e.body.body,n=Array.isArray(r),i=0;for(r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;if("ExpressionStatement"!==a.type||"Literal"!==a.expression.type)break;if("use strict"===a.expression.value)return!0}}return!1}}),e.extend("isValidDirective",function(){return function(e){return!("ExpressionStatement"!==e.type||"Literal"!==e.expression.type||"string"!=typeof e.expression.value||e.expression.extra&&e.expression.extra.parenthesized)}}),e.extend("stmtToDirective",function(e){return function(t){var r=e.call(this,t),n=t.expression.value;return r.value.value=n,r}}),e.extend("parseBlockBody",function(e){return function(t){for(var r=this,n=arguments.length,i=Array(n>1?n-1:0),s=1;s1?n-1:0),s=1;s2?n-2:0),s=2;s=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}var c=l;"get"===c.kind||"set"===c.kind?this.raise(c.key.start,"Object pattern can't contain getter or setter"):c.method?this.raise(c.key.start,"Object pattern can't contain methods"):this.toAssignable(c,r,"object destructuring pattern")}return t}return e.call.apply(e,[this,t,r].concat(i))}})},V.flow=function(e){e.extend("parseFunctionBody",function(e){return function(t,r){return this.match(T.colon)&&!r&&(t.returnType=this.flowParseTypeAndPredicateAnnotation()),e.call(this,t,r)}}),e.extend("parseStatement",function(e){return function(t,r){if(this.state.strict&&this.match(T.name)&&"interface"===this.state.value){var n=this.startNode();return this.next(),this.flowParseInterface(n)}return e.call(this,t,r)}}),e.extend("parseExpressionStatement",function(e){return function(t,r){if("Identifier"===r.type)if("declare"===r.name){if(this.match(T._class)||this.match(T.name)||this.match(T._function)||this.match(T._var)||this.match(T._export))return this.flowParseDeclare(t)}else if(this.match(T.name)){if("interface"===r.name)return this.flowParseInterface(t);if("type"===r.name)return this.flowParseTypeAlias(t);if("opaque"===r.name)return this.flowParseOpaqueType(t,!1)}return e.call(this,t,r)}}),e.extend("shouldParseExportDeclaration",function(e){return function(){return this.isContextual("type")||this.isContextual("interface")||this.isContextual("opaque")||e.call(this)}}),e.extend("isExportDefaultSpecifier",function(e){return function(){return(!this.match(T.name)||"type"!==this.state.value&&"interface"!==this.state.value&&"opaque"!==this.state.value)&&e.call(this)}}),e.extend("parseConditional",function(e){return function(t,r,n,i,s){if(s&&this.match(T.question)){var a=this.state.clone();try{return e.call(this,t,r,n,i)}catch(e){if(e instanceof SyntaxError)return this.state=a,s.start=e.pos||this.state.start,t;throw e}}return e.call(this,t,r,n,i)}}),e.extend("parseParenItem",function(e){return function(t,r,n){if(t=e.call(this,t,r,n),this.eat(T.question)&&(t.optional=!0),this.match(T.colon)){var i=this.startNodeAt(r,n);return i.expression=t,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")}return t}}),e.extend("parseExport",function(e){return function(t){return"ExportNamedDeclaration"===(t=e.call(this,t)).type&&(t.exportKind=t.exportKind||"value"),t}}),e.extend("parseExportDeclaration",function(e){return function(t){if(this.isContextual("type")){t.exportKind="type";var r=this.startNode();return this.next(),this.match(T.braceL)?(t.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(t),null):this.flowParseTypeAlias(r)}if(this.isContextual("opaque")){t.exportKind="type";var n=this.startNode();return this.next(),this.flowParseOpaqueType(n,!1)}if(this.isContextual("interface")){t.exportKind="type";var i=this.startNode();return this.next(),this.flowParseInterface(i)}return e.call(this,t)}}),e.extend("parseClassId",function(e){return function(t){e.apply(this,arguments),this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration())}}),e.extend("isKeyword",function(e){return function(t){return(!this.state.inType||"void"!==t)&&e.call(this,t)}}),e.extend("readToken",function(e){return function(t){return!this.state.inType||62!==t&&60!==t?e.call(this,t):this.finishOp(T.relational,1)}}),e.extend("jsx_readToken",function(e){return function(){if(!this.state.inType)return e.call(this)}}),e.extend("toAssignable",function(e){return function(t,r,n){return"TypeCastExpression"===t.type?e.call(this,this.typeCastToParameter(t),r,n):e.call(this,t,r,n)}}),e.extend("toAssignableList",function(e){return function(t,r,n){for(var i=0;i2?n-2:0),s=2;s=0&&l>0){for(n=[],s=r.length;c>=0&&!o;)c==u?(n.push(c),u=r.indexOf(e,c+1)):1==n.length?o=[n.pop(),l]:((i=n.pop())=0?u:l;n.length&&(o=[s,a])}return o}t.exports=n,n.range=s},{}],190:[function(e,t,r){"use strict";function n(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return a[e>>18&63]+a[e>>12&63]+a[e>>6&63]+a[63&e]}function s(e,t,r){for(var n,s=[],a=t;a0?l-4:l;var c=0;for(t=0;t>16&255,a[c++]=i>>8&255,a[c++]=255&i;return 2===s?(i=o[e.charCodeAt(t)]<<2|o[e.charCodeAt(t+1)]>>4,a[c++]=255&i):1===s&&(i=o[e.charCodeAt(t)]<<10|o[e.charCodeAt(t+1)]<<4|o[e.charCodeAt(t+2)]>>2,a[c++]=i>>8&255,a[c++]=255&i),a},r.fromByteArray=function(e){for(var t,r=e.length,n=r%3,i="",o=[],u=0,l=r-n;ul?l:u+16383));return 1===n?(t=e[r-1],i+=a[t>>2],i+=a[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=a[t>>10],i+=a[t>>4&63],i+=a[t<<2&63],i+="="),o.push(i),o.join("")};for(var a=[],o=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,p=l.length;c=t}function c(e,t){var r=[],i=h("{","}",e);if(!i||/\$$/.test(i.pre))return[e];var f=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),d=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),y=f||d,g=i.body.indexOf(",")>=0;if(!y&&!g)return i.post.match(/,.*\}/)?(e=i.pre+"{"+i.body+m+i.post,c(e)):[e];var b;if(y)b=i.body.split(/\.\./);else if(1===(b=s(i.body)).length&&1===(b=c(b[0],!1).map(a)).length){return(E=i.post.length?c(i.post,!1):[""]).map(function(e){return i.pre+b[0]+e})}var v,x=i.pre,E=i.post.length?c(i.post,!1):[""];if(y){var A=n(b[0]),D=n(b[1]),S=Math.max(b[0].length,b[1].length),C=3==b.length?Math.abs(n(b[2])):1,_=u;D0){var P=new Array(T+1).join("0");F=k<0?"-"+P+F.slice(1):P+F}}v.push(F)}}else v=p(b,function(e){return c(e,!1)});for(var B=0;Bj)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=i.prototype,t}function i(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return o(e)}return s(e,t,r)}function s(e,t,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return T(e)?function(e,t,r){if(t<0||e.byteLength=j)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+j.toString(16)+" bytes");return 0|e}function c(e,t){if(i.isBuffer(e))return e.length;if(P(e)||T(e))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return w(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return k(e).length;default:if(n)return w(e).length;t=(""+t).toLowerCase(),n=!0}}function p(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var n=e.length;(!t||t<0)&&(t=0);(!r||r<0||r>n)&&(r=n);for(var i="",s=t;s2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,B(r)&&(r=s?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(s)return-1;r=e.length-1}else if(r<0){if(!s)return-1;r=0}if("string"==typeof t&&(t=i.from(t,n)),i.isBuffer(t))return 0===t.length?-1:d(e,t,r,n,s);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):d(e,[t],r,n,s);throw new TypeError("val must be string, number or Buffer")}function d(e,t,r,n,i){function s(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,o=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,o/=2,u/=2,r/=2}var l;if(i){var c=-1;for(l=r;lo&&(r=o-u),l=r;l>=0;l--){for(var p=!0,h=0;hi&&(n=i):n=i;var s=t.length;if(s%2!=0)throw new TypeError("Invalid hex string");n>s/2&&(n=s/2);for(var a=0;a>8,i=r%256,s.push(i),s.push(n);return s}(t,e.length-r),e,r,n)}function E(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:s>223?3:s>191?2:1;if(i+o<=r){var u,l,c,p;switch(o){case 1:s<128&&(a=s);break;case 2:128==(192&(u=e[i+1]))&&(p=(31&s)<<6|63&u)>127&&(a=p);break;case 3:u=e[i+1],l=e[i+2],128==(192&u)&&128==(192&l)&&(p=(15&s)<<12|(63&u)<<6|63&l)>2047&&(p<55296||p>57343)&&(a=p);break;case 4:u=e[i+1],l=e[i+2],c=e[i+3],128==(192&u)&&128==(192&l)&&128==(192&c)&&(p=(15&s)<<18|(63&u)<<12|(63&l)<<6|63&c)>65535&&p<1114112&&(a=p)}}null===a?(a=65533,o=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=o}return function(e){var t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);var r="",n=0;for(;nr)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,r,n,s,a){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||te.length)throw new RangeError("Index out of range")}function S(e,t,r,n,i,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function C(e,t,r,n,i){return t=+t,r>>>=0,i||S(e,0,r,4),N.write(e,t,r,n,23,4),r+4}function _(e,t,r,n,i){return t=+t,r>>>=0,i||S(e,0,r,8),N.write(e,t,r,n,52,8),r+8}function w(e,t){t=t||1/0;for(var r,n=e.length,i=null,s=[],a=0;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function k(e){return O.toByteArray(function(e){if((e=e.trim().replace(L,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function F(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function T(e){return e instanceof ArrayBuffer||null!=e&&null!=e.constructor&&"ArrayBuffer"===e.constructor.name&&"number"==typeof e.byteLength}function P(e){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(e)}function B(e){return e!=e}var O=e("base64-js"),N=e("ieee754");r.Buffer=i,r.SlowBuffer=function(e){return+e!=e&&(e=0),i.alloc(+e)},r.INSPECT_MAX_BYTES=50;var j=2147483647;r.kMaxLength=j,(i.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(e,t,r){return s(e,t,r)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(e,t,r){return function(e,t,r){return a(e),e<=0?n(e):void 0!==t?"string"==typeof r?n(e).fill(t,r):n(e).fill(t):n(e)}(e,t,r)},i.allocUnsafe=function(e){return o(e)},i.allocUnsafeSlow=function(e){return o(e)},i.isBuffer=function(e){return null!=e&&!0===e._isBuffer},i.compare=function(e,t){if(!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,s=0,a=Math.min(r,n);s0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},i.prototype.compare=function(e,t,r,n,s){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===s&&(s=this.length),t<0||r>e.length||n<0||s>this.length)throw new RangeError("out of range index");if(n>=s&&t>=r)return 0;if(n>=s)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,s>>>=0,this===e)return 0;for(var a=s-n,o=r-t,u=Math.min(a,o),l=this.slice(n,s),c=e.slice(t,r),p=0;p>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return m(this,e,t,r);case"utf8":case"utf-8":return y(this,e,t,r);case"ascii":return g(this,e,t,r);case"latin1":case"binary":return b(this,e,t,r);case"base64":return v(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;i.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||A(e,t,this.length);for(var n=this[e],i=1,s=0;++s>>=0,t>>>=0,r||A(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},i.prototype.readUInt8=function(e,t){return e>>>=0,t||A(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return e>>>=0,t||A(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return e>>>=0,t||A(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return e>>>=0,t||A(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,t){return e>>>=0,t||A(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||A(e,t,this.length);for(var n=this[e],i=1,s=0;++s=i&&(n-=Math.pow(2,8*t)),n},i.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||A(e,t,this.length);for(var n=t,i=1,s=this[e+--n];n>0&&(i*=256);)s+=this[e+--n]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},i.prototype.readInt8=function(e,t){return e>>>=0,t||A(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){e>>>=0,t||A(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt16BE=function(e,t){e>>>=0,t||A(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt32LE=function(e,t){return e>>>=0,t||A(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e>>>=0,t||A(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return e>>>=0,t||A(e,4,this.length),N.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e>>>=0,t||A(e,4,this.length),N.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e>>>=0,t||A(e,8,this.length),N.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e>>>=0,t||A(e,8,this.length),N.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){D(this,e,t,r,Math.pow(2,8*r)-1,0)}var i=1,s=0;for(this[t]=255&e;++s>>=0,r>>>=0,!n){D(this,e,t,r,Math.pow(2,8*r)-1,0)}var i=r-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+r},i.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,255,0),this[t]=255&e,t+1},i.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},i.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);D(this,e,t,r,i-1,-i)}var s=0,a=1,o=0;for(this[t]=255&e;++s>0)-o&255;return t+r},i.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);D(this,e,t,r,i-1,-i)}var s=r-1,a=1,o=0;for(this[t+s]=255&e;--s>=0&&(a*=256);)e<0&&0===o&&0!==this[t+s+1]&&(o=1),this[t+s]=(e/a>>0)-o&255;return t+r},i.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},i.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeFloatLE=function(e,t,r){return C(this,e,t,!0,r)},i.prototype.writeFloatBE=function(e,t,r){return C(this,e,t,!1,r)},i.prototype.writeDoubleLE=function(e,t,r){return _(this,e,t,!0,r)},i.prototype.writeDoubleBE=function(e,t,r){return _(this,e,t,!1,r)},i.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(s<1e3)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var a;if("number"==typeof e)for(a=t;ac;)if((o=u[c++])!=o)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===r)return e||c||0;return!e&&-1}}},{"./_to-absolute-index":275,"./_to-iobject":277,"./_to-length":278}],216:[function(e,t,r){var n=e("./_ctx"),i=e("./_iobject"),s=e("./_to-object"),a=e("./_to-length"),o=e("./_array-species-create");t.exports=function(e,t){var r=1==e,u=2==e,l=3==e,c=4==e,p=6==e,h=5==e||p,f=t||o;return function(t,o,d){for(var m,y,g=s(t),b=i(g),v=n(o,d,3),x=a(b.length),E=0,A=r?f(t,x):u?f(t,0):void 0;x>E;E++)if((h||E in b)&&(m=b[E],y=v(m,E,g),e))if(r)A[E]=y;else if(y)switch(e){case 3:return!0;case 5:return m;case 6:return E;case 2:A.push(m)}else if(c)return!1;return p?-1:l||c?c:A}}},{"./_array-species-create":218,"./_ctx":226,"./_iobject":240,"./_to-length":278,"./_to-object":279}],217:[function(e,t,r){var n=e("./_is-object"),i=e("./_is-array"),s=e("./_wks")("species");t.exports=function(e){var t;return i(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!i(t.prototype)||(t=void 0),n(t)&&null===(t=t[s])&&(t=void 0)),void 0===t?Array:t}},{"./_is-array":242,"./_is-object":243,"./_wks":285}],218:[function(e,t,r){var n=e("./_array-species-constructor");t.exports=function(e,t){return new(n(e))(t)}},{"./_array-species-constructor":217}],219:[function(e,t,r){var n=e("./_cof"),i=e("./_wks")("toStringTag"),s="Arguments"==n(function(){return arguments}());t.exports=function(e){var t,r,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?r:s?n(t):"Object"==(a=n(t))&&"function"==typeof t.callee?"Arguments":a}},{"./_cof":220,"./_wks":285}],220:[function(e,t,r){var n={}.toString;t.exports=function(e){return n.call(e).slice(8,-1)}},{}],221:[function(e,t,r){"use strict";var n=e("./_object-dp").f,i=e("./_object-create"),s=e("./_redefine-all"),a=e("./_ctx"),o=e("./_an-instance"),u=e("./_for-of"),l=e("./_iter-define"),c=e("./_iter-step"),p=e("./_set-species"),h=e("./_descriptors"),f=e("./_meta").fastKey,d=e("./_validate-collection"),m=h?"_s":"size",y=function(e,t){var r,n=f(t);if("F"!==n)return e._i[n];for(r=e._f;r;r=r.n)if(r.k==t)return r};t.exports={getConstructor:function(e,t,r,l){var c=e(function(e,n){o(e,c,t,"_i"),e._t=t,e._i=i(null),e._f=void 0,e._l=void 0,e[m]=0,void 0!=n&&u(n,r,e[l],e)});return s(c.prototype,{clear:function(){for(var e=d(this,t),r=e._i,n=e._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete r[n.i];e._f=e._l=void 0,e[m]=0},delete:function(e){var r=d(this,t),n=y(r,e);if(n){var i=n.n,s=n.p;delete r._i[n.i],n.r=!0,s&&(s.n=i),i&&(i.p=s),r._f==n&&(r._f=i),r._l==n&&(r._l=s),r[m]--}return!!n},forEach:function(e){d(this,t);for(var r,n=a(e,arguments.length>1?arguments[1]:void 0,3);r=r?r.n:this._f;)for(n(r.v,r.k,this);r&&r.r;)r=r.p},has:function(e){return!!y(d(this,t),e)}}),h&&n(c.prototype,"size",{get:function(){return d(this,t)[m]}}),c},def:function(e,t,r){var n,i,s=y(e,t);return s?s.v=r:(e._l=s={i:i=f(t,!0),k:t,v:r,p:n=e._l,n:void 0,r:!1},e._f||(e._f=s),n&&(n.n=s),e[m]++,"F"!==i&&(e._i[i]=s)),e},getEntry:y,setStrong:function(e,t,r){l(e,t,function(e,r){this._t=d(e,t),this._k=r,this._l=void 0},function(){for(var e=this._k,t=this._l;t&&t.r;)t=t.p;return this._t&&(this._l=t=t?t.n:this._t._f)?c(0,"keys"==e?t.k:"values"==e?t.v:[t.k,t.v]):(this._t=void 0,c(1))},r?"entries":"values",!r,!0),p(t)}}},{"./_an-instance":212,"./_ctx":226,"./_descriptors":228,"./_for-of":234,"./_iter-define":246,"./_iter-step":247,"./_meta":250,"./_object-create":252,"./_object-dp":253,"./_redefine-all":265,"./_set-species":270,"./_validate-collection":282}],222:[function(e,t,r){var n=e("./_classof"),i=e("./_array-from-iterable");t.exports=function(e){return function(){if(n(this)!=e)throw TypeError(e+"#toJSON isn't generic");return i(this)}}},{"./_array-from-iterable":214,"./_classof":219}],223:[function(e,t,r){"use strict";var n=e("./_redefine-all"),i=e("./_meta").getWeak,s=e("./_an-object"),a=e("./_is-object"),o=e("./_an-instance"),u=e("./_for-of"),l=e("./_array-methods"),c=e("./_has"),p=e("./_validate-collection"),h=l(5),f=l(6),d=0,m=function(e){return e._l||(e._l=new y)},y=function(){this.a=[]},g=function(e,t){return h(e.a,function(e){return e[0]===t})};y.prototype={get:function(e){var t=g(this,e);if(t)return t[1]},has:function(e){return!!g(this,e)},set:function(e,t){var r=g(this,e);r?r[1]=t:this.a.push([e,t])},delete:function(e){var t=f(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},t.exports={getConstructor:function(e,t,r,s){var l=e(function(e,n){o(e,l,t,"_i"),e._t=t,e._i=d++,e._l=void 0,void 0!=n&&u(n,r,e[s],e)});return n(l.prototype,{delete:function(e){if(!a(e))return!1;var r=i(e);return!0===r?m(p(this,t)).delete(e):r&&c(r,this._i)&&delete r[this._i]},has:function(e){if(!a(e))return!1;var r=i(e);return!0===r?m(p(this,t)).has(e):r&&c(r,this._i)}}),l},def:function(e,t,r){var n=i(s(t),!0);return!0===n?m(e).set(t,r):n[e._i]=r,e},ufstore:m}},{"./_an-instance":212,"./_an-object":213,"./_array-methods":216,"./_for-of":234,"./_has":236,"./_is-object":243,"./_meta":250,"./_redefine-all":265,"./_validate-collection":282}],224:[function(e,t,r){"use strict";var n=e("./_global"),i=e("./_export"),s=e("./_meta"),a=e("./_fails"),o=e("./_hide"),u=e("./_redefine-all"),l=e("./_for-of"),c=e("./_an-instance"),p=e("./_is-object"),h=e("./_set-to-string-tag"),f=e("./_object-dp").f,d=e("./_array-methods")(0),m=e("./_descriptors");t.exports=function(e,t,r,y,g,b){var v=n[e],x=v,E=g?"set":"add",A=x&&x.prototype,D={};return m&&"function"==typeof x&&(b||A.forEach&&!a(function(){(new x).entries().next()}))?(x=t(function(t,r){c(t,x,e,"_c"),t._c=new v,void 0!=r&&l(r,g,t[E],t)}),d("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(e){var t="add"==e||"set"==e;e in A&&(!b||"clear"!=e)&&o(x.prototype,e,function(r,n){if(c(this,x,e),!t&&b&&!p(r))return"get"==e&&void 0;var i=this._c[e](0===r?0:r,n);return t?this:i})}),b||f(x.prototype,"size",{get:function(){return this._c.size}})):(x=y.getConstructor(t,e,g,E),u(x.prototype,r),s.NEED=!0),h(x,e),D[e]=x,i(i.G+i.W+i.F,D),b||y.setStrong(x,e,g),x}},{"./_an-instance":212,"./_array-methods":216,"./_descriptors":228,"./_export":232,"./_fails":233,"./_for-of":234,"./_global":235,"./_hide":237,"./_is-object":243,"./_meta":250,"./_object-dp":253,"./_redefine-all":265,"./_set-to-string-tag":271}],225:[function(e,t,r){var n=t.exports={version:"2.5.3"};"number"==typeof __e&&(__e=n)},{}],226:[function(e,t,r){var n=e("./_a-function");t.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},{"./_a-function":210}],227:[function(e,t,r){t.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},{}],228:[function(e,t,r){t.exports=!e("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":233}],229:[function(e,t,r){var n=e("./_is-object"),i=e("./_global").document,s=n(i)&&n(i.createElement);t.exports=function(e){return s?i.createElement(e):{}}},{"./_global":235,"./_is-object":243}],230:[function(e,t,r){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],231:[function(e,t,r){var n=e("./_object-keys"),i=e("./_object-gops"),s=e("./_object-pie");t.exports=function(e){var t=n(e),r=i.f;if(r)for(var a,o=r(e),u=s.f,l=0;o.length>l;)u.call(e,a=o[l++])&&t.push(a);return t}},{"./_object-gops":258,"./_object-keys":261,"./_object-pie":262}],232:[function(e,t,r){var n=e("./_global"),i=e("./_core"),s=e("./_ctx"),a=e("./_hide"),o="prototype",u=function(e,t,r){var l,c,p,h=e&u.F,f=e&u.G,d=e&u.S,m=e&u.P,y=e&u.B,g=e&u.W,b=f?i:i[t]||(i[t]={}),v=b[o],x=f?n:d?n[t]:(n[t]||{})[o];f&&(r=t);for(l in r)(c=!h&&x&&void 0!==x[l])&&l in b||(p=c?x[l]:r[l],b[l]=f&&"function"!=typeof x[l]?r[l]:y&&c?s(p,n):g&&x[l]==p?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t[o]=e[o],t}(p):m&&"function"==typeof p?s(Function.call,p):p,m&&((b.virtual||(b.virtual={}))[l]=p,e&u.R&&v&&!v[l]&&a(v,l,p)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},{"./_core":225,"./_ctx":226,"./_global":235,"./_hide":237}],233:[function(e,t,r){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],234:[function(e,t,r){var n=e("./_ctx"),i=e("./_iter-call"),s=e("./_is-array-iter"),a=e("./_an-object"),o=e("./_to-length"),u=e("./core.get-iterator-method"),l={},c={};(r=t.exports=function(e,t,r,p,h){var f,d,m,y,g=h?function(){return e}:u(e),b=n(r,p,t?2:1),v=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(s(g)){for(f=o(e.length);f>v;v++)if((y=t?b(a(d=e[v])[0],d[1]):b(e[v]))===l||y===c)return y}else for(m=g.call(e);!(d=m.next()).done;)if((y=i(m,b,d.value,t))===l||y===c)return y}).BREAK=l,r.RETURN=c},{"./_an-object":213,"./_ctx":226,"./_is-array-iter":241,"./_iter-call":244,"./_to-length":278,"./core.get-iterator-method":286}],235:[function(e,t,r){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},{}],236:[function(e,t,r){var n={}.hasOwnProperty;t.exports=function(e,t){return n.call(e,t)}},{}],237:[function(e,t,r){var n=e("./_object-dp"),i=e("./_property-desc");t.exports=e("./_descriptors")?function(e,t,r){return n.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},{"./_descriptors":228,"./_object-dp":253,"./_property-desc":264}],238:[function(e,t,r){var n=e("./_global").document;t.exports=n&&n.documentElement},{"./_global":235}],239:[function(e,t,r){t.exports=!e("./_descriptors")&&!e("./_fails")(function(){return 7!=Object.defineProperty(e("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":228,"./_dom-create":229,"./_fails":233}],240:[function(e,t,r){var n=e("./_cof");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},{"./_cof":220}],241:[function(e,t,r){var n=e("./_iterators"),i=e("./_wks")("iterator"),s=Array.prototype;t.exports=function(e){return void 0!==e&&(n.Array===e||s[i]===e)}},{"./_iterators":248,"./_wks":285}],242:[function(e,t,r){var n=e("./_cof");t.exports=Array.isArray||function(e){return"Array"==n(e)}},{"./_cof":220}],243:[function(e,t,r){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],244:[function(e,t,r){var n=e("./_an-object");t.exports=function(e,t,r,i){try{return i?t(n(r)[0],r[1]):t(r)}catch(t){var s=e.return;throw void 0!==s&&n(s.call(e)),t}}},{"./_an-object":213}],245:[function(e,t,r){"use strict";var n=e("./_object-create"),i=e("./_property-desc"),s=e("./_set-to-string-tag"),a={};e("./_hide")(a,e("./_wks")("iterator"),function(){return this}),t.exports=function(e,t,r){e.prototype=n(a,{next:i(1,r)}),s(e,t+" Iterator")}},{"./_hide":237,"./_object-create":252,"./_property-desc":264,"./_set-to-string-tag":271,"./_wks":285}],246:[function(e,t,r){"use strict";var n=e("./_library"),i=e("./_export"),s=e("./_redefine"),a=e("./_hide"),o=e("./_has"),u=e("./_iterators"),l=e("./_iter-create"),c=e("./_set-to-string-tag"),p=e("./_object-gpo"),h=e("./_wks")("iterator"),f=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(e,t,r,m,y,g,b){l(r,t,m);var v,x,E,A=function(e){if(!f&&e in _)return _[e];switch(e){case"keys":case"values":return function(){return new r(this,e)}}return function(){return new r(this,e)}},D=t+" Iterator",S="values"==y,C=!1,_=e.prototype,w=_[h]||_["@@iterator"]||y&&_[y],k=!f&&w||A(y),F=y?S?A("entries"):k:void 0,T="Array"==t?_.entries||w:w;if(T&&(E=p(T.call(new e)))!==Object.prototype&&E.next&&(c(E,D,!0),n||o(E,h)||a(E,h,d)),S&&w&&"values"!==w.name&&(C=!0,k=function(){return w.call(this)}),n&&!b||!f&&!C&&_[h]||a(_,h,k),u[t]=k,u[D]=d,y)if(v={values:S?k:A("values"),keys:g?k:A("keys"),entries:F},b)for(x in v)x in _||s(_,x,v[x]);else i(i.P+i.F*(f||C),t,v);return v}},{"./_export":232,"./_has":236,"./_hide":237,"./_iter-create":245,"./_iterators":248,"./_library":249,"./_object-gpo":259,"./_redefine":266,"./_set-to-string-tag":271,"./_wks":285}],247:[function(e,t,r){t.exports=function(e,t){return{value:t,done:!!e}}},{}],248:[function(e,t,r){t.exports={}},{}],249:[function(e,t,r){t.exports=!0},{}],250:[function(e,t,r){var n=e("./_uid")("meta"),i=e("./_is-object"),s=e("./_has"),a=e("./_object-dp").f,o=0,u=Object.isExtensible||function(){return!0},l=!e("./_fails")(function(){return u(Object.preventExtensions({}))}),c=function(e){a(e,n,{value:{i:"O"+ ++o,w:{}}})},p=t.exports={KEY:n,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,n)){if(!u(e))return"F";if(!t)return"E";c(e)}return e[n].i},getWeak:function(e,t){if(!s(e,n)){if(!u(e))return!0;if(!t)return!1;c(e)}return e[n].w},onFreeze:function(e){return l&&p.NEED&&u(e)&&!s(e,n)&&c(e),e}}},{"./_fails":233,"./_has":236,"./_is-object":243,"./_object-dp":253,"./_uid":281}],251:[function(e,t,r){"use strict";var n=e("./_object-keys"),i=e("./_object-gops"),s=e("./_object-pie"),a=e("./_to-object"),o=e("./_iobject"),u=Object.assign;t.exports=!u||e("./_fails")(function(){var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(e){t[e]=e}),7!=u({},e)[r]||Object.keys(u({},t)).join("")!=n})?function(e,t){for(var r=a(e),u=arguments.length,l=1,c=i.f,p=s.f;u>l;)for(var h,f=o(arguments[l++]),d=c?n(f).concat(c(f)):n(f),m=d.length,y=0;m>y;)p.call(f,h=d[y++])&&(r[h]=f[h]);return r}:u},{"./_fails":233,"./_iobject":240,"./_object-gops":258,"./_object-keys":261,"./_object-pie":262,"./_to-object":279}],252:[function(e,t,r){var n=e("./_an-object"),i=e("./_object-dps"),s=e("./_enum-bug-keys"),a=e("./_shared-key")("IE_PROTO"),o=function(){},u=function(){var t,r=e("./_dom-create")("iframe"),n=s.length;for(r.style.display="none",e("./_html").appendChild(r),r.src="javascript:",(t=r.contentWindow.document).open(),t.write(" + + +``` + +Browser support was done mostly for the online demo. If you find any errors - feel +free to send pull requests with fixes. Also note, that IE and other old browsers +needs [es5-shims](https://github.com/kriskowal/es5-shim) to operate. + +Notes: + +1. We have no resources to support browserified version. Don't expect it to be + well tested. Don't expect fast fixes if something goes wrong there. +2. `!!js/function` in browser bundle will not work by default. If you really need + it - load `esprima` parser first (via amd or directly). +3. `!!bin` in browser will return `Array`, because browsers do not support + node.js `Buffer` and adding Buffer shims is completely useless on practice. + + +API +--- + +Here we cover the most 'useful' methods. If you need advanced details (creating +your own tags), see [wiki](https://github.com/nodeca/js-yaml/wiki) and +[examples](https://github.com/nodeca/js-yaml/tree/master/examples) for more +info. + +``` javascript +yaml = require('js-yaml'); +fs = require('fs'); + +// Get document, or throw exception on error +try { + var doc = yaml.safeLoad(fs.readFileSync('/home/ixti/example.yml', 'utf8')); + console.log(doc); +} catch (e) { + console.log(e); +} +``` + + +### safeLoad (string [ , options ]) + +**Recommended loading way.** Parses `string` as single YAML document. Returns a JavaScript +object or throws `YAMLException` on error. By default, does not support regexps, +functions and undefined. This method is safe for untrusted data. + +options: + +- `filename` _(default: null)_ - string to be used as a file path in + error/warning messages. +- `onWarning` _(default: null)_ - function to call on warning messages. + Loader will throw on warnings if this function is not provided. +- `schema` _(default: `DEFAULT_SAFE_SCHEMA`)_ - specifies a schema to use. + - `FAILSAFE_SCHEMA` - only strings, arrays and plain objects: + http://www.yaml.org/spec/1.2/spec.html#id2802346 + - `JSON_SCHEMA` - all JSON-supported types: + http://www.yaml.org/spec/1.2/spec.html#id2803231 + - `CORE_SCHEMA` - same as `JSON_SCHEMA`: + http://www.yaml.org/spec/1.2/spec.html#id2804923 + - `DEFAULT_SAFE_SCHEMA` - all supported YAML types, without unsafe ones + (`!!js/undefined`, `!!js/regexp` and `!!js/function`): + http://yaml.org/type/ + - `DEFAULT_FULL_SCHEMA` - all supported YAML types. +- `json` _(default: false)_ - compatibility with JSON.parse behaviour. If true, then duplicate keys in a mapping will override values rather than throwing an error. + +NOTE: This function **does not** understand multi-document sources, it throws +exception on those. + +NOTE: JS-YAML **does not** support schema-specific tag resolution restrictions. +So, the JSON schema is not as strictly defined in the YAML specification. +It allows numbers in any notation, use `Null` and `NULL` as `null`, etc. +The core schema also has no such restrictions. It allows binary notation for integers. + + +### load (string [ , options ]) + +**Use with care with untrusted sources**. The same as `safeLoad()` but uses +`DEFAULT_FULL_SCHEMA` by default - adds some JavaScript-specific types: +`!!js/function`, `!!js/regexp` and `!!js/undefined`. For untrusted sources, you +must additionally validate object structure to avoid injections: + +``` javascript +var untrusted_code = '"toString": ! "function (){very_evil_thing();}"'; + +// I'm just converting that string, what could possibly go wrong? +require('js-yaml').load(untrusted_code) + '' +``` + + +### safeLoadAll (string [, iterator] [, options ]) + +Same as `safeLoad()`, but understands multi-document sources. Applies +`iterator` to each document if specified, or returns array of documents. + +``` javascript +var yaml = require('js-yaml'); + +yaml.safeLoadAll(data, function (doc) { + console.log(doc); +}); +``` + + +### loadAll (string [, iterator] [ , options ]) + +Same as `safeLoadAll()` but uses `DEFAULT_FULL_SCHEMA` by default. + + +### safeDump (object [ , options ]) + +Serializes `object` as a YAML document. Uses `DEFAULT_SAFE_SCHEMA`, so it will +throw an exception if you try to dump regexps or functions. However, you can +disable exceptions by setting the `skipInvalid` option to `true`. + +options: + +- `indent` _(default: 2)_ - indentation width to use (in spaces). +- `skipInvalid` _(default: false)_ - do not throw on invalid types (like function + in the safe schema) and skip pairs and single values with such types. +- `flowLevel` (default: -1) - specifies level of nesting, when to switch from + block to flow style for collections. -1 means block style everwhere +- `styles` - "tag" => "style" map. Each tag may have own set of styles. +- `schema` _(default: `DEFAULT_SAFE_SCHEMA`)_ specifies a schema to use. +- `sortKeys` _(default: `false`)_ - if `true`, sort keys when dumping YAML. If a + function, use the function to sort the keys. +- `lineWidth` _(default: `80`)_ - set max line width. +- `noRefs` _(default: `false`)_ - if `true`, don't convert duplicate objects into references +- `noCompatMode` _(default: `false`)_ - if `true` don't try to be compatible with older + yaml versions. Currently: don't quote "yes", "no" and so on, as required for YAML 1.1 +- `condenseFlow` _(default: `false`)_ - if `true` flow sequences will be condensed, omitting the space between `a, b`. Eg. `'[a,b]'`, and omitting the space between `key: value` and quoting the key. Eg. `'{"a":b}'` Can be useful when using yaml for pretty URL query params as spaces are %-encoded. + +The following table show availlable styles (e.g. "canonical", +"binary"...) available for each tag (.e.g. !!null, !!int ...). Yaml +ouput is shown on the right side after `=>` (default setting) or `->`: + +``` none +!!null + "canonical" -> "~" + "lowercase" => "null" + "uppercase" -> "NULL" + "camelcase" -> "Null" + +!!int + "binary" -> "0b1", "0b101010", "0b1110001111010" + "octal" -> "01", "052", "016172" + "decimal" => "1", "42", "7290" + "hexadecimal" -> "0x1", "0x2A", "0x1C7A" + +!!bool + "lowercase" => "true", "false" + "uppercase" -> "TRUE", "FALSE" + "camelcase" -> "True", "False" + +!!float + "lowercase" => ".nan", '.inf' + "uppercase" -> ".NAN", '.INF' + "camelcase" -> ".NaN", '.Inf' +``` + +Example: + +``` javascript +safeDump (object, { + 'styles': { + '!!null': 'canonical' // dump null as ~ + }, + 'sortKeys': true // sort object keys +}); +``` + +### dump (object [ , options ]) + +Same as `safeDump()` but without limits (uses `DEFAULT_FULL_SCHEMA` by default). + + +Supported YAML types +-------------------- + +The list of standard YAML tags and corresponding JavaScipt types. See also +[YAML tag discussion](http://pyyaml.org/wiki/YAMLTagDiscussion) and +[YAML types repository](http://yaml.org/type/). + +``` +!!null '' # null +!!bool 'yes' # bool +!!int '3...' # number +!!float '3.14...' # number +!!binary '...base64...' # buffer +!!timestamp 'YYYY-...' # date +!!omap [ ... ] # array of key-value pairs +!!pairs [ ... ] # array or array pairs +!!set { ... } # array of objects with given keys and null values +!!str '...' # string +!!seq [ ... ] # array +!!map { ... } # object +``` + +**JavaScript-specific tags** + +``` +!!js/regexp /pattern/gim # RegExp +!!js/undefined '' # Undefined +!!js/function 'function () {...}' # Function +``` + +Caveats +------- + +Note, that you use arrays or objects as key in JS-YAML. JS does not allow objects +or arrays as keys, and stringifies (by calling `toString()` method) them at the +moment of adding them. + +``` yaml +--- +? [ foo, bar ] +: - baz +? { foo: bar } +: - baz + - baz +``` + +``` javascript +{ "foo,bar": ["baz"], "[object Object]": ["baz", "baz"] } +``` + +Also, reading of properties on implicit block mapping keys is not supported yet. +So, the following YAML document cannot be loaded. + +``` yaml +&anchor foo: + foo: bar + *anchor: duplicate key + baz: bat + *anchor: duplicate key +``` + + +Breaking changes in 2.x.x -> 3.x.x +---------------------------------- + +If you have not used __custom__ tags or loader classes and not loaded yaml +files via `require()`, no changes are needed. Just upgrade the library. + +Otherwise, you should: + +1. Replace all occurrences of `require('xxxx.yml')` by `fs.readFileSync()` + + `yaml.safeLoad()`. +2. rewrite your custom tags constructors and custom loader + classes, to conform the new API. See + [examples](https://github.com/nodeca/js-yaml/tree/master/examples) and + [wiki](https://github.com/nodeca/js-yaml/wiki) for details. + + +License +------- + +View the [LICENSE](https://github.com/nodeca/js-yaml/blob/master/LICENSE) file +(MIT). diff --git a/node_modules/js-yaml/bin/js-yaml.js b/node_modules/js-yaml/bin/js-yaml.js new file mode 100644 index 0000000..e79186b --- /dev/null +++ b/node_modules/js-yaml/bin/js-yaml.js @@ -0,0 +1,132 @@ +#!/usr/bin/env node + + +'use strict'; + +/*eslint-disable no-console*/ + + +// stdlib +var fs = require('fs'); + + +// 3rd-party +var argparse = require('argparse'); + + +// internal +var yaml = require('..'); + + +//////////////////////////////////////////////////////////////////////////////// + + +var cli = new argparse.ArgumentParser({ + prog: 'js-yaml', + version: require('../package.json').version, + addHelp: true +}); + + +cli.addArgument([ '-c', '--compact' ], { + help: 'Display errors in compact mode', + action: 'storeTrue' +}); + + +// deprecated (not needed after we removed output colors) +// option suppressed, but not completely removed for compatibility +cli.addArgument([ '-j', '--to-json' ], { + help: argparse.Const.SUPPRESS, + dest: 'json', + action: 'storeTrue' +}); + + +cli.addArgument([ '-t', '--trace' ], { + help: 'Show stack trace on error', + action: 'storeTrue' +}); + +cli.addArgument([ 'file' ], { + help: 'File to read, utf-8 encoded without BOM', + nargs: '?', + defaultValue: '-' +}); + + +//////////////////////////////////////////////////////////////////////////////// + + +var options = cli.parseArgs(); + + +//////////////////////////////////////////////////////////////////////////////// + +function readFile(filename, encoding, callback) { + if (options.file === '-') { + // read from stdin + + var chunks = []; + + process.stdin.on('data', function (chunk) { + chunks.push(chunk); + }); + + process.stdin.on('end', function () { + return callback(null, Buffer.concat(chunks).toString(encoding)); + }); + } else { + fs.readFile(filename, encoding, callback); + } +} + +readFile(options.file, 'utf8', function (error, input) { + var output, isYaml; + + if (error) { + if (error.code === 'ENOENT') { + console.error('File not found: ' + options.file); + process.exit(2); + } + + console.error( + options.trace && error.stack || + error.message || + String(error)); + + process.exit(1); + } + + try { + output = JSON.parse(input); + isYaml = false; + } catch (err) { + if (err instanceof SyntaxError) { + try { + output = []; + yaml.loadAll(input, function (doc) { output.push(doc); }, {}); + isYaml = true; + + if (output.length === 0) output = null; + else if (output.length === 1) output = output[0]; + + } catch (e) { + if (options.trace && err.stack) console.error(e.stack); + else console.error(e.toString(options.compact)); + + process.exit(1); + } + } else { + console.error( + options.trace && err.stack || + err.message || + String(err)); + + process.exit(1); + } + } + + if (isYaml) console.log(JSON.stringify(output, null, ' ')); + else console.log(yaml.dump(output)); +}); diff --git a/node_modules/js-yaml/dist/js-yaml.js b/node_modules/js-yaml/dist/js-yaml.js new file mode 100644 index 0000000..8e28b85 --- /dev/null +++ b/node_modules/js-yaml/dist/js-yaml.js @@ -0,0 +1,3902 @@ +/* js-yaml 3.10.0 https://github.com/nodeca/js-yaml */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.jsyaml = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o */ +var CHAR_QUESTION = 0x3F; /* ? */ +var CHAR_COMMERCIAL_AT = 0x40; /* @ */ +var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ +var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ +var CHAR_GRAVE_ACCENT = 0x60; /* ` */ +var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ +var CHAR_VERTICAL_LINE = 0x7C; /* | */ +var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ + +var ESCAPE_SEQUENCES = {}; + +ESCAPE_SEQUENCES[0x00] = '\\0'; +ESCAPE_SEQUENCES[0x07] = '\\a'; +ESCAPE_SEQUENCES[0x08] = '\\b'; +ESCAPE_SEQUENCES[0x09] = '\\t'; +ESCAPE_SEQUENCES[0x0A] = '\\n'; +ESCAPE_SEQUENCES[0x0B] = '\\v'; +ESCAPE_SEQUENCES[0x0C] = '\\f'; +ESCAPE_SEQUENCES[0x0D] = '\\r'; +ESCAPE_SEQUENCES[0x1B] = '\\e'; +ESCAPE_SEQUENCES[0x22] = '\\"'; +ESCAPE_SEQUENCES[0x5C] = '\\\\'; +ESCAPE_SEQUENCES[0x85] = '\\N'; +ESCAPE_SEQUENCES[0xA0] = '\\_'; +ESCAPE_SEQUENCES[0x2028] = '\\L'; +ESCAPE_SEQUENCES[0x2029] = '\\P'; + +var DEPRECATED_BOOLEANS_SYNTAX = [ + 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', + 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' +]; + +function compileStyleMap(schema, map) { + var result, keys, index, length, tag, style, type; + + if (map === null) return {}; + + result = {}; + keys = Object.keys(map); + + for (index = 0, length = keys.length; index < length; index += 1) { + tag = keys[index]; + style = String(map[tag]); + + if (tag.slice(0, 2) === '!!') { + tag = 'tag:yaml.org,2002:' + tag.slice(2); + } + type = schema.compiledTypeMap['fallback'][tag]; + + if (type && _hasOwnProperty.call(type.styleAliases, style)) { + style = type.styleAliases[style]; + } + + result[tag] = style; + } + + return result; +} + +function encodeHex(character) { + var string, handle, length; + + string = character.toString(16).toUpperCase(); + + if (character <= 0xFF) { + handle = 'x'; + length = 2; + } else if (character <= 0xFFFF) { + handle = 'u'; + length = 4; + } else if (character <= 0xFFFFFFFF) { + handle = 'U'; + length = 8; + } else { + throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF'); + } + + return '\\' + handle + common.repeat('0', length - string.length) + string; +} + +function State(options) { + this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; + this.indent = Math.max(1, (options['indent'] || 2)); + this.skipInvalid = options['skipInvalid'] || false; + this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); + this.styleMap = compileStyleMap(this.schema, options['styles'] || null); + this.sortKeys = options['sortKeys'] || false; + this.lineWidth = options['lineWidth'] || 80; + this.noRefs = options['noRefs'] || false; + this.noCompatMode = options['noCompatMode'] || false; + this.condenseFlow = options['condenseFlow'] || false; + + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + + this.tag = null; + this.result = ''; + + this.duplicates = []; + this.usedDuplicates = null; +} + +// Indents every line in a string. Empty lines (\n only) are not indented. +function indentString(string, spaces) { + var ind = common.repeat(' ', spaces), + position = 0, + next = -1, + result = '', + line, + length = string.length; + + while (position < length) { + next = string.indexOf('\n', position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + + if (line.length && line !== '\n') result += ind; + + result += line; + } + + return result; +} + +function generateNextLine(state, level) { + return '\n' + common.repeat(' ', state.indent * level); +} + +function testImplicitResolving(state, str) { + var index, length, type; + + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type = state.implicitTypes[index]; + + if (type.resolve(str)) { + return true; + } + } + + return false; +} + +// [33] s-white ::= s-space | s-tab +function isWhitespace(c) { + return c === CHAR_SPACE || c === CHAR_TAB; +} + +// Returns true if the character can be printed without escaping. +// From YAML 1.2: "any allowed characters known to be non-printable +// should also be escaped. [However,] This isn’t mandatory" +// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. +function isPrintable(c) { + return (0x00020 <= c && c <= 0x00007E) + || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) + || ((0x0E000 <= c && c <= 0x00FFFD) && c !== 0xFEFF /* BOM */) + || (0x10000 <= c && c <= 0x10FFFF); +} + +// Simplified test for values allowed after the first character in plain style. +function isPlainSafe(c) { + // Uses a subset of nb-char - c-flow-indicator - ":" - "#" + // where nb-char ::= c-printable - b-char - c-byte-order-mark. + return isPrintable(c) && c !== 0xFEFF + // - c-flow-indicator + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + // - ":" - "#" + && c !== CHAR_COLON + && c !== CHAR_SHARP; +} + +// Simplified test for values allowed as the first character in plain style. +function isPlainSafeFirst(c) { + // Uses a subset of ns-char - c-indicator + // where ns-char = nb-char - s-white. + return isPrintable(c) && c !== 0xFEFF + && !isWhitespace(c) // - s-white + // - (c-indicator ::= + // “-†| “?†| “:†| “,†| “[†| “]†| “{†| “}†+ && c !== CHAR_MINUS + && c !== CHAR_QUESTION + && c !== CHAR_COLON + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + // | “#†| “&†| “*†| “!†| “|†| “>†| “'†| “"†+ && c !== CHAR_SHARP + && c !== CHAR_AMPERSAND + && c !== CHAR_ASTERISK + && c !== CHAR_EXCLAMATION + && c !== CHAR_VERTICAL_LINE + && c !== CHAR_GREATER_THAN + && c !== CHAR_SINGLE_QUOTE + && c !== CHAR_DOUBLE_QUOTE + // | “%†| “@†| “`â€) + && c !== CHAR_PERCENT + && c !== CHAR_COMMERCIAL_AT + && c !== CHAR_GRAVE_ACCENT; +} + +var STYLE_PLAIN = 1, + STYLE_SINGLE = 2, + STYLE_LITERAL = 3, + STYLE_FOLDED = 4, + STYLE_DOUBLE = 5; + +// Determines which scalar styles are possible and returns the preferred style. +// lineWidth = -1 => no limit. +// Pre-conditions: str.length > 0. +// Post-conditions: +// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. +// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). +// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). +function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) { + var i; + var char; + var hasLineBreak = false; + var hasFoldableLine = false; // only checked if shouldTrackWidth + var shouldTrackWidth = lineWidth !== -1; + var previousLineBreak = -1; // count the first line correctly + var plain = isPlainSafeFirst(string.charCodeAt(0)) + && !isWhitespace(string.charCodeAt(string.length - 1)); + + if (singleLineOnly) { + // Case: no block styles. + // Check for disallowed characters to rule out plain and single. + for (i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char); + } + } else { + // Case: block styles permitted. + for (i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + // Check if any line can be folded. + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || + // Foldable line = too long, and not more-indented. + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' '); + previousLineBreak = i; + } + } else if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char); + } + // in case the end is missing a \n + hasFoldableLine = hasFoldableLine || (shouldTrackWidth && + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' ')); + } + // Although every style can represent \n without escaping, prefer block styles + // for multiline, since they're more readable and they don't add empty lines. + // Also prefer folding a super-long line. + if (!hasLineBreak && !hasFoldableLine) { + // Strings interpretable as another type have to be quoted; + // e.g. the string 'true' vs. the boolean true. + return plain && !testAmbiguousType(string) + ? STYLE_PLAIN : STYLE_SINGLE; + } + // Edge case: block indentation indicator can only have one digit. + if (string[0] === ' ' && indentPerLevel > 9) { + return STYLE_DOUBLE; + } + // At this point we know block styles are valid. + // Prefer literal style unless we want to fold. + return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; +} + +// Note: line breaking/folding is implemented for only the folded style. +// NB. We drop the last trailing newline (if any) of a returned block scalar +// since the dumper adds its own newline. This always works: +// • No ending newline => unaffected; already using strip "-" chomping. +// • Ending newline => removed then restored. +// Importantly, this keeps the "+" chomp indicator from gaining an extra line. +function writeScalar(state, string, level, iskey) { + state.dump = (function () { + if (string.length === 0) { + return "''"; + } + if (!state.noCompatMode && + DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) { + return "'" + string + "'"; + } + + var indent = state.indent * Math.max(1, level); // no 0-indent scalars + // As indentation gets deeper, let the width decrease monotonically + // to the lower bound min(state.lineWidth, 40). + // Note that this implies + // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. + // state.lineWidth > 40 + state.indent: width decreases until the lower bound. + // This behaves better than a constant minimum width which disallows narrower options, + // or an indent threshold which causes the width to suddenly increase. + var lineWidth = state.lineWidth === -1 + ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); + + // Without knowing if keys are implicit/explicit, assume implicit for safety. + var singleLineOnly = iskey + // No block styles in flow mode. + || (state.flowLevel > -1 && level >= state.flowLevel); + function testAmbiguity(string) { + return testImplicitResolving(state, string); + } + + switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity)) { + case STYLE_PLAIN: + return string; + case STYLE_SINGLE: + return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: + return '|' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(string, indent)); + case STYLE_FOLDED: + return '>' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); + case STYLE_DOUBLE: + return '"' + escapeString(string, lineWidth) + '"'; + default: + throw new YAMLException('impossible error: invalid scalar style'); + } + }()); +} + +// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. +function blockHeader(string, indentPerLevel) { + var indentIndicator = (string[0] === ' ') ? String(indentPerLevel) : ''; + + // note the special case: the string '\n' counts as a "trailing" empty line. + var clip = string[string.length - 1] === '\n'; + var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); + var chomp = keep ? '+' : (clip ? '' : '-'); + + return indentIndicator + chomp + '\n'; +} + +// (See the note for writeScalar.) +function dropEndingNewline(string) { + return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; +} + +// Note: a long line without a suitable break point will exceed the width limit. +// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. +function foldString(string, width) { + // In folded style, $k$ consecutive newlines output as $k+1$ newlines— + // unless they're before or after a more-indented line, or at the very + // beginning or end, in which case $k$ maps to $k$. + // Therefore, parse each chunk as newline(s) followed by a content line. + var lineRe = /(\n+)([^\n]*)/g; + + // first line (possibly an empty line) + var result = (function () { + var nextLF = string.indexOf('\n'); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + }()); + // If we haven't reached the first content line yet, don't add an extra \n. + var prevMoreIndented = string[0] === '\n' || string[0] === ' '; + var moreIndented; + + // rest of the lines + var match; + while ((match = lineRe.exec(string))) { + var prefix = match[1], line = match[2]; + moreIndented = (line[0] === ' '); + result += prefix + + (!prevMoreIndented && !moreIndented && line !== '' + ? '\n' : '') + + foldLine(line, width); + prevMoreIndented = moreIndented; + } + + return result; +} + +// Greedy line breaking. +// Picks the longest line under the limit each time, +// otherwise settles for the shortest line over the limit. +// NB. More-indented lines *cannot* be folded, as that would add an extra \n. +function foldLine(line, width) { + if (line === '' || line[0] === ' ') return line; + + // Since a more-indented line adds a \n, breaks can't be followed by a space. + var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. + var match; + // start is an inclusive index. end, curr, and next are exclusive. + var start = 0, end, curr = 0, next = 0; + var result = ''; + + // Invariants: 0 <= start <= length-1. + // 0 <= curr <= next <= max(0, length-2). curr - start <= width. + // Inside the loop: + // A match implies length >= 2, so curr and next are <= length-2. + while ((match = breakRe.exec(line))) { + next = match.index; + // maintain invariant: curr - start <= width + if (next - start > width) { + end = (curr > start) ? curr : next; // derive end <= length-2 + result += '\n' + line.slice(start, end); + // skip the space that was output as \n + start = end + 1; // derive start <= length-1 + } + curr = next; + } + + // By the invariants, start <= length-1, so there is something left over. + // It is either the whole string or a part starting from non-whitespace. + result += '\n'; + // Insert a break if the remainder is too long and there is a break available. + if (line.length - start > width && curr > start) { + result += line.slice(start, curr) + '\n' + line.slice(curr + 1); + } else { + result += line.slice(start); + } + + return result.slice(1); // drop extra \n joiner +} + +// Escapes a double-quoted string. +function escapeString(string) { + var result = ''; + var char, nextChar; + var escapeSeq; + + for (var i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + // Check for surrogate pairs (reference Unicode 3.0 section "3.7 Surrogates"). + if (char >= 0xD800 && char <= 0xDBFF/* high surrogate */) { + nextChar = string.charCodeAt(i + 1); + if (nextChar >= 0xDC00 && nextChar <= 0xDFFF/* low surrogate */) { + // Combine the surrogate pair and store it escaped. + result += encodeHex((char - 0xD800) * 0x400 + nextChar - 0xDC00 + 0x10000); + // Advance index one extra since we already used that char here. + i++; continue; + } + } + escapeSeq = ESCAPE_SEQUENCES[char]; + result += !escapeSeq && isPrintable(char) + ? string[i] + : escapeSeq || encodeHex(char); + } + + return result; +} + +function writeFlowSequence(state, level, object) { + var _result = '', + _tag = state.tag, + index, + length; + + for (index = 0, length = object.length; index < length; index += 1) { + // Write only valid elements. + if (writeNode(state, level, object[index], false, false)) { + if (index !== 0) _result += ',' + (!state.condenseFlow ? ' ' : ''); + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = '[' + _result + ']'; +} + +function writeBlockSequence(state, level, object, compact) { + var _result = '', + _tag = state.tag, + index, + length; + + for (index = 0, length = object.length; index < length; index += 1) { + // Write only valid elements. + if (writeNode(state, level + 1, object[index], true, true)) { + if (!compact || index !== 0) { + _result += generateNextLine(state, level); + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + _result += '-'; + } else { + _result += '- '; + } + + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = _result || '[]'; // Empty sequence if no valid values. +} + +function writeFlowMapping(state, level, object) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + pairBuffer; + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = state.condenseFlow ? '"' : ''; + + if (index !== 0) pairBuffer += ', '; + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (!writeNode(state, level, objectKey, false, false)) { + continue; // Skip this pair because of invalid key; + } + + if (state.dump.length > 1024) pairBuffer += '? '; + + pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' '); + + if (!writeNode(state, level, objectValue, false, false)) { + continue; // Skip this pair because of invalid value. + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = '{' + _result + '}'; +} + +function writeBlockMapping(state, level, object, compact) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + explicitPair, + pairBuffer; + + // Allow sorting keys so that the output file is deterministic + if (state.sortKeys === true) { + // Default sorting + objectKeyList.sort(); + } else if (typeof state.sortKeys === 'function') { + // Custom sort function + objectKeyList.sort(state.sortKeys); + } else if (state.sortKeys) { + // Something is wrong + throw new YAMLException('sortKeys must be a boolean or a function'); + } + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ''; + + if (!compact || index !== 0) { + pairBuffer += generateNextLine(state, level); + } + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (!writeNode(state, level + 1, objectKey, true, true, true)) { + continue; // Skip this pair because of invalid key. + } + + explicitPair = (state.tag !== null && state.tag !== '?') || + (state.dump && state.dump.length > 1024); + + if (explicitPair) { + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += '?'; + } else { + pairBuffer += '? '; + } + } + + pairBuffer += state.dump; + + if (explicitPair) { + pairBuffer += generateNextLine(state, level); + } + + if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { + continue; // Skip this pair because of invalid value. + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += ':'; + } else { + pairBuffer += ': '; + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = _result || '{}'; // Empty mapping if no valid pairs. +} + +function detectType(state, object, explicit) { + var _result, typeList, index, length, type, style; + + typeList = explicit ? state.explicitTypes : state.implicitTypes; + + for (index = 0, length = typeList.length; index < length; index += 1) { + type = typeList[index]; + + if ((type.instanceOf || type.predicate) && + (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && + (!type.predicate || type.predicate(object))) { + + state.tag = explicit ? type.tag : '?'; + + if (type.represent) { + style = state.styleMap[type.tag] || type.defaultStyle; + + if (_toString.call(type.represent) === '[object Function]') { + _result = type.represent(object, style); + } else if (_hasOwnProperty.call(type.represent, style)) { + _result = type.represent[style](object, style); + } else { + throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); + } + + state.dump = _result; + } + + return true; + } + } + + return false; +} + +// Serializes `object` and writes it to global `result`. +// Returns true on success, or false on invalid object. +// +function writeNode(state, level, object, block, compact, iskey) { + state.tag = null; + state.dump = object; + + if (!detectType(state, object, false)) { + detectType(state, object, true); + } + + var type = _toString.call(state.dump); + + if (block) { + block = (state.flowLevel < 0 || state.flowLevel > level); + } + + var objectOrArray = type === '[object Object]' || type === '[object Array]', + duplicateIndex, + duplicate; + + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + + if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { + compact = false; + } + + if (duplicate && state.usedDuplicates[duplicateIndex]) { + state.dump = '*ref_' + duplicateIndex; + } else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { + state.usedDuplicates[duplicateIndex] = true; + } + if (type === '[object Object]') { + if (block && (Object.keys(state.dump).length !== 0)) { + writeBlockMapping(state, level, state.dump, compact); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowMapping(state, level, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object Array]') { + if (block && (state.dump.length !== 0)) { + writeBlockSequence(state, level, state.dump, compact); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowSequence(state, level, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object String]') { + if (state.tag !== '?') { + writeScalar(state, state.dump, level, iskey); + } + } else { + if (state.skipInvalid) return false; + throw new YAMLException('unacceptable kind of an object to dump ' + type); + } + + if (state.tag !== null && state.tag !== '?') { + state.dump = '!<' + state.tag + '> ' + state.dump; + } + } + + return true; +} + +function getDuplicateReferences(object, state) { + var objects = [], + duplicatesIndexes = [], + index, + length; + + inspectNode(object, objects, duplicatesIndexes); + + for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { + state.duplicates.push(objects[duplicatesIndexes[index]]); + } + state.usedDuplicates = new Array(length); +} + +function inspectNode(object, objects, duplicatesIndexes) { + var objectKeyList, + index, + length; + + if (object !== null && typeof object === 'object') { + index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) { + duplicatesIndexes.push(index); + } + } else { + objects.push(object); + + if (Array.isArray(object)) { + for (index = 0, length = object.length; index < length; index += 1) { + inspectNode(object[index], objects, duplicatesIndexes); + } + } else { + objectKeyList = Object.keys(object); + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + } + } + } + } +} + +function dump(input, options) { + options = options || {}; + + var state = new State(options); + + if (!state.noRefs) getDuplicateReferences(input, state); + + if (writeNode(state, 0, input, true, true)) return state.dump + '\n'; + + return ''; +} + +function safeDump(input, options) { + return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); +} + +module.exports.dump = dump; +module.exports.safeDump = safeDump; + +},{"./common":2,"./exception":4,"./schema/default_full":9,"./schema/default_safe":10}],4:[function(require,module,exports){ +// YAML error class. http://stackoverflow.com/questions/8458984 +// +'use strict'; + +function YAMLException(reason, mark) { + // Super constructor + Error.call(this); + + this.name = 'YAMLException'; + this.reason = reason; + this.mark = mark; + this.message = (this.reason || '(unknown reason)') + (this.mark ? ' ' + this.mark.toString() : ''); + + // Include stack trace in error object + if (Error.captureStackTrace) { + // Chrome and NodeJS + Error.captureStackTrace(this, this.constructor); + } else { + // FF, IE 10+ and Safari 6+. Fallback for others + this.stack = (new Error()).stack || ''; + } +} + + +// Inherit from Error +YAMLException.prototype = Object.create(Error.prototype); +YAMLException.prototype.constructor = YAMLException; + + +YAMLException.prototype.toString = function toString(compact) { + var result = this.name + ': '; + + result += this.reason || '(unknown reason)'; + + if (!compact && this.mark) { + result += ' ' + this.mark.toString(); + } + + return result; +}; + + +module.exports = YAMLException; + +},{}],5:[function(require,module,exports){ +'use strict'; + +/*eslint-disable max-len,no-use-before-define*/ + +var common = require('./common'); +var YAMLException = require('./exception'); +var Mark = require('./mark'); +var DEFAULT_SAFE_SCHEMA = require('./schema/default_safe'); +var DEFAULT_FULL_SCHEMA = require('./schema/default_full'); + + +var _hasOwnProperty = Object.prototype.hasOwnProperty; + + +var CONTEXT_FLOW_IN = 1; +var CONTEXT_FLOW_OUT = 2; +var CONTEXT_BLOCK_IN = 3; +var CONTEXT_BLOCK_OUT = 4; + + +var CHOMPING_CLIP = 1; +var CHOMPING_STRIP = 2; +var CHOMPING_KEEP = 3; + + +var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; +var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; +var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; +var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; +var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + + +function is_EOL(c) { + return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); +} + +function is_WHITE_SPACE(c) { + return (c === 0x09/* Tab */) || (c === 0x20/* Space */); +} + +function is_WS_OR_EOL(c) { + return (c === 0x09/* Tab */) || + (c === 0x20/* Space */) || + (c === 0x0A/* LF */) || + (c === 0x0D/* CR */); +} + +function is_FLOW_INDICATOR(c) { + return c === 0x2C/* , */ || + c === 0x5B/* [ */ || + c === 0x5D/* ] */ || + c === 0x7B/* { */ || + c === 0x7D/* } */; +} + +function fromHexCode(c) { + var lc; + + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + /*eslint-disable no-bitwise*/ + lc = c | 0x20; + + if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { + return lc - 0x61 + 10; + } + + return -1; +} + +function escapedHexLen(c) { + if (c === 0x78/* x */) { return 2; } + if (c === 0x75/* u */) { return 4; } + if (c === 0x55/* U */) { return 8; } + return 0; +} + +function fromDecimalCode(c) { + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + return -1; +} + +function simpleEscapeSequence(c) { + /* eslint-disable indent */ + return (c === 0x30/* 0 */) ? '\x00' : + (c === 0x61/* a */) ? '\x07' : + (c === 0x62/* b */) ? '\x08' : + (c === 0x74/* t */) ? '\x09' : + (c === 0x09/* Tab */) ? '\x09' : + (c === 0x6E/* n */) ? '\x0A' : + (c === 0x76/* v */) ? '\x0B' : + (c === 0x66/* f */) ? '\x0C' : + (c === 0x72/* r */) ? '\x0D' : + (c === 0x65/* e */) ? '\x1B' : + (c === 0x20/* Space */) ? ' ' : + (c === 0x22/* " */) ? '\x22' : + (c === 0x2F/* / */) ? '/' : + (c === 0x5C/* \ */) ? '\x5C' : + (c === 0x4E/* N */) ? '\x85' : + (c === 0x5F/* _ */) ? '\xA0' : + (c === 0x4C/* L */) ? '\u2028' : + (c === 0x50/* P */) ? '\u2029' : ''; +} + +function charFromCodepoint(c) { + if (c <= 0xFFFF) { + return String.fromCharCode(c); + } + // Encode UTF-16 surrogate pair + // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF + return String.fromCharCode( + ((c - 0x010000) >> 10) + 0xD800, + ((c - 0x010000) & 0x03FF) + 0xDC00 + ); +} + +var simpleEscapeCheck = new Array(256); // integer, for fast access +var simpleEscapeMap = new Array(256); +for (var i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); +} + + +function State(input, options) { + this.input = input; + + this.filename = options['filename'] || null; + this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; + this.onWarning = options['onWarning'] || null; + this.legacy = options['legacy'] || false; + this.json = options['json'] || false; + this.listener = options['listener'] || null; + + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + + this.documents = []; + + /* + this.version; + this.checkLineBreaks; + this.tagMap; + this.anchorMap; + this.tag; + this.anchor; + this.kind; + this.result;*/ + +} + + +function generateError(state, message) { + return new YAMLException( + message, + new Mark(state.filename, state.input, state.position, state.line, (state.position - state.lineStart))); +} + +function throwError(state, message) { + throw generateError(state, message); +} + +function throwWarning(state, message) { + if (state.onWarning) { + state.onWarning.call(null, generateError(state, message)); + } +} + + +var directiveHandlers = { + + YAML: function handleYamlDirective(state, name, args) { + + var match, major, minor; + + if (state.version !== null) { + throwError(state, 'duplication of %YAML directive'); + } + + if (args.length !== 1) { + throwError(state, 'YAML directive accepts exactly one argument'); + } + + match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + + if (match === null) { + throwError(state, 'ill-formed argument of the YAML directive'); + } + + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); + + if (major !== 1) { + throwError(state, 'unacceptable YAML version of the document'); + } + + state.version = args[0]; + state.checkLineBreaks = (minor < 2); + + if (minor !== 1 && minor !== 2) { + throwWarning(state, 'unsupported YAML version of the document'); + } + }, + + TAG: function handleTagDirective(state, name, args) { + + var handle, prefix; + + if (args.length !== 2) { + throwError(state, 'TAG directive accepts exactly two arguments'); + } + + handle = args[0]; + prefix = args[1]; + + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); + } + + if (_hasOwnProperty.call(state.tagMap, handle)) { + throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } + + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); + } + + state.tagMap[handle] = prefix; + } +}; + + +function captureSegment(state, start, end, checkJson) { + var _position, _length, _character, _result; + + if (start < end) { + _result = state.input.slice(start, end); + + if (checkJson) { + for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + if (!(_character === 0x09 || + (0x20 <= _character && _character <= 0x10FFFF))) { + throwError(state, 'expected valid JSON character'); + } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state, 'the stream contains non-printable characters'); + } + + state.result += _result; + } +} + +function mergeMappings(state, destination, source, overridableKeys) { + var sourceKeys, key, index, quantity; + + if (!common.isObject(source)) { + throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); + } + + sourceKeys = Object.keys(source); + + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key = sourceKeys[index]; + + if (!_hasOwnProperty.call(destination, key)) { + destination[key] = source[key]; + overridableKeys[key] = true; + } + } +} + +function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startPos) { + var index, quantity; + + keyNode = String(keyNode); + + if (_result === null) { + _result = {}; + } + + if (keyTag === 'tag:yaml.org,2002:merge') { + if (Array.isArray(valueNode)) { + for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { + mergeMappings(state, _result, valueNode[index], overridableKeys); + } + } else { + mergeMappings(state, _result, valueNode, overridableKeys); + } + } else { + if (!state.json && + !_hasOwnProperty.call(overridableKeys, keyNode) && + _hasOwnProperty.call(_result, keyNode)) { + state.line = startLine || state.line; + state.position = startPos || state.position; + throwError(state, 'duplicated mapping key'); + } + _result[keyNode] = valueNode; + delete overridableKeys[keyNode]; + } + + return _result; +} + +function readLineBreak(state) { + var ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x0A/* LF */) { + state.position++; + } else if (ch === 0x0D/* CR */) { + state.position++; + if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { + state.position++; + } + } else { + throwError(state, 'a line break is expected'); + } + + state.line += 1; + state.lineStart = state.position; +} + +function skipSeparationSpace(state, allowComments, checkIndent) { + var lineBreaks = 0, + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (allowComments && ch === 0x23/* # */) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); + } + + if (is_EOL(ch)) { + readLineBreak(state); + + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + + while (ch === 0x20/* Space */) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else { + break; + } + } + + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { + throwWarning(state, 'deficient indentation'); + } + + return lineBreaks; +} + +function testDocumentSeparator(state) { + var _position = state.position, + ch; + + ch = state.input.charCodeAt(_position); + + // Condition state.position === state.lineStart is tested + // in parent on each call, for efficiency. No needs to test here again. + if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && + ch === state.input.charCodeAt(_position + 1) && + ch === state.input.charCodeAt(_position + 2)) { + + _position += 3; + + ch = state.input.charCodeAt(_position); + + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; + } + } + + return false; +} + +function writeFoldedLines(state, count) { + if (count === 1) { + state.result += ' '; + } else if (count > 1) { + state.result += common.repeat('\n', count - 1); + } +} + + +function readPlainScalar(state, nodeIndent, withinFlowCollection) { + var preceding, + following, + captureStart, + captureEnd, + hasPendingContent, + _line, + _lineStart, + _lineIndent, + _kind = state.kind, + _result = state.result, + ch; + + ch = state.input.charCodeAt(state.position); + + if (is_WS_OR_EOL(ch) || + is_FLOW_INDICATOR(ch) || + ch === 0x23/* # */ || + ch === 0x26/* & */ || + ch === 0x2A/* * */ || + ch === 0x21/* ! */ || + ch === 0x7C/* | */ || + ch === 0x3E/* > */ || + ch === 0x27/* ' */ || + ch === 0x22/* " */ || + ch === 0x25/* % */ || + ch === 0x40/* @ */ || + ch === 0x60/* ` */) { + return false; + } + + if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; + } + } + + state.kind = 'scalar'; + state.result = ''; + captureStart = captureEnd = state.position; + hasPendingContent = false; + + while (ch !== 0) { + if (ch === 0x3A/* : */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + break; + } + + } else if (ch === 0x23/* # */) { + preceding = state.input.charCodeAt(state.position - 1); + + if (is_WS_OR_EOL(preceding)) { + break; + } + + } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || + withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; + + } else if (is_EOL(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); + + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } + + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } + + if (!is_WHITE_SPACE(ch)) { + captureEnd = state.position + 1; + } + + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, captureEnd, false); + + if (state.result) { + return true; + } + + state.kind = _kind; + state.result = _result; + return false; +} + +function readSingleQuotedScalar(state, nodeIndent) { + var ch, + captureStart, captureEnd; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x27/* ' */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x27/* ' */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x27/* ' */) { + captureStart = state.position; + state.position++; + captureEnd = state.position; + } else { + return true; + } + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a single quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a single quoted scalar'); +} + +function readDoubleQuotedScalar(state, nodeIndent) { + var captureStart, + captureEnd, + hexLength, + hexResult, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x22/* " */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x22/* " */) { + captureSegment(state, captureStart, state.position, true); + state.position++; + return true; + + } else if (ch === 0x5C/* \ */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (is_EOL(ch)) { + skipSeparationSpace(state, false, nodeIndent); + + // TODO: rework to inline fn with no type cast? + } else if (ch < 256 && simpleEscapeCheck[ch]) { + state.result += simpleEscapeMap[ch]; + state.position++; + + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + + } else { + throwError(state, 'expected hexadecimal character'); + } + } + + state.result += charFromCodepoint(hexResult); + + state.position++; + + } else { + throwError(state, 'unknown escape sequence'); + } + + captureStart = captureEnd = state.position; + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a double quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a double quoted scalar'); +} + +function readFlowCollection(state, nodeIndent) { + var readNext = true, + _line, + _tag = state.tag, + _result, + _anchor = state.anchor, + following, + terminator, + isPair, + isExplicitPair, + isMapping, + overridableKeys = {}, + keyNode, + keyTag, + valueNode, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x5B/* [ */) { + terminator = 0x5D;/* ] */ + isMapping = false; + _result = []; + } else if (ch === 0x7B/* { */) { + terminator = 0x7D;/* } */ + isMapping = true; + _result = {}; + } else { + return false; + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(++state.position); + + while (ch !== 0) { + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? 'mapping' : 'sequence'; + state.result = _result; + return true; + } else if (!readNext) { + throwError(state, 'missed comma between flow collection entries'); + } + + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + + if (ch === 0x3F/* ? */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } + + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } + + if (isMapping) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode); + } else if (isPair) { + _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode)); + } else { + _result.push(keyNode); + } + + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x2C/* , */) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else { + readNext = false; + } + } + + throwError(state, 'unexpected end of the stream within a flow collection'); +} + +function readBlockScalar(state, nodeIndent) { + var captureStart, + folding, + chomping = CHOMPING_CLIP, + didReadContent = false, + detectedIndent = false, + textIndent = nodeIndent, + emptyLines = 0, + atMoreIndented = false, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x7C/* | */) { + folding = false; + } else if (ch === 0x3E/* > */) { + folding = true; + } else { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + + while (ch !== 0) { + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { + if (CHOMPING_CLIP === chomping) { + chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state, 'repeat of a chomping mode identifier'); + } + + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state, 'repeat of an indentation width identifier'); + } + + } else { + break; + } + } + + if (is_WHITE_SPACE(ch)) { + do { ch = state.input.charCodeAt(++state.position); } + while (is_WHITE_SPACE(ch)); + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (!is_EOL(ch) && (ch !== 0)); + } + } + + while (ch !== 0) { + readLineBreak(state); + state.lineIndent = 0; + + ch = state.input.charCodeAt(state.position); + + while ((!detectedIndent || state.lineIndent < textIndent) && + (ch === 0x20/* Space */)) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + + if (!detectedIndent && state.lineIndent > textIndent) { + textIndent = state.lineIndent; + } + + if (is_EOL(ch)) { + emptyLines++; + continue; + } + + // End of the scalar. + if (state.lineIndent < textIndent) { + + // Perform the chomping. + if (chomping === CHOMPING_KEEP) { + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (didReadContent) { // i.e. only if the scalar is not empty. + state.result += '\n'; + } + } + + // Break this `while` cycle and go to the funciton's epilogue. + break; + } + + // Folded style: use fancy rules to handle line breaks. + if (folding) { + + // Lines starting with white space characters (more-indented lines) are not folded. + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + // except for the first content line (cf. Example 8.1) + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + + // End of more-indented block. + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common.repeat('\n', emptyLines + 1); + + // Just one line break - perceive as the same line. + } else if (emptyLines === 0) { + if (didReadContent) { // i.e. only if we have already read some scalar content. + state.result += ' '; + } + + // Several line breaks - perceive as different lines. + } else { + state.result += common.repeat('\n', emptyLines); + } + + // Literal style: just add exact number of line breaks between content lines. + } else { + // Keep all line breaks except the header line break. + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } + + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; + + while (!is_EOL(ch) && (ch !== 0)) { + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, state.position, false); + } + + return true; +} + +function readBlockSequence(state, nodeIndent) { + var _line, + _tag = state.tag, + _anchor = state.anchor, + _result = [], + following, + detected = false, + ch; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + + if (ch !== 0x2D/* - */) { + break; + } + + following = state.input.charCodeAt(state.position + 1); + + if (!is_WS_OR_EOL(following)) { + break; + } + + detected = true; + state.position++; + + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } + + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state.result); + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { + throwError(state, 'bad indentation of a sequence entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'sequence'; + state.result = _result; + return true; + } + return false; +} + +function readBlockMapping(state, nodeIndent, flowIndent) { + var following, + allowCompact, + _line, + _pos, + _tag = state.tag, + _anchor = state.anchor, + _result = {}, + overridableKeys = {}, + keyTag = null, + keyNode = null, + valueNode = null, + atExplicitKey = false, + detected = false, + ch; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + following = state.input.charCodeAt(state.position + 1); + _line = state.line; // Save the current line. + _pos = state.position; + + // + // Explicit notation case. There are two separate blocks: + // first for the key (denoted by "?") and second for the value (denoted by ":") + // + if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { + + if (ch === 0x3F/* ? */) { + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = true; + allowCompact = true; + + } else if (atExplicitKey) { + // i.e. 0x3A/* : */ === character after the explicit key. + atExplicitKey = false; + allowCompact = true; + + } else { + throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line'); + } + + state.position += 1; + ch = following; + + // + // Implicit notation case. Flow-style node as the key first, then ":", and the value. + // + } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { + + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x3A/* : */) { + ch = state.input.charCodeAt(++state.position); + + if (!is_WS_OR_EOL(ch)) { + throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); + } + + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + + } else if (detected) { + throwError(state, 'can not read an implicit mapping pair; a colon is missed'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + + } else if (detected) { + throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + + } else { + break; // Reading is done. Go to the epilogue. + } + + // + // Common reading code for both explicit and implicit notations. + // + if (state.line === _line || state.lineIndent > nodeIndent) { + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state.result; + } else { + valueNode = state.result; + } + } + + if (!atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _pos); + keyTag = keyNode = valueNode = null; + } + + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + + if (state.lineIndent > nodeIndent && (ch !== 0)) { + throwError(state, 'bad indentation of a mapping entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + // + // Epilogue. + // + + // Special case: last mapping's node contains only the key in explicit notation. + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + } + + // Expose the resulting mapping. + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'mapping'; + state.result = _result; + } + + return detected; +} + +function readTagProperty(state) { + var _position, + isVerbatim = false, + isNamed = false, + tagHandle, + tagName, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x21/* ! */) return false; + + if (state.tag !== null) { + throwError(state, 'duplication of a tag property'); + } + + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x3C/* < */) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + + } else if (ch === 0x21/* ! */) { + isNamed = true; + tagHandle = '!!'; + ch = state.input.charCodeAt(++state.position); + + } else { + tagHandle = '!'; + } + + _position = state.position; + + if (isVerbatim) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && ch !== 0x3E/* > */); + + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else { + throwError(state, 'unexpected end of the stream within a verbatim tag'); + } + } else { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + + if (ch === 0x21/* ! */) { + if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state, 'named tag handle cannot contain such characters'); + } + + isNamed = true; + _position = state.position + 1; + } else { + throwError(state, 'tag suffix cannot contain exclamation marks'); + } + } + + ch = state.input.charCodeAt(++state.position); + } + + tagName = state.input.slice(_position, state.position); + + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state, 'tag suffix cannot contain flow indicator characters'); + } + } + + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state, 'tag name cannot contain such characters: ' + tagName); + } + + if (isVerbatim) { + state.tag = tagName; + + } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { + state.tag = state.tagMap[tagHandle] + tagName; + + } else if (tagHandle === '!') { + state.tag = '!' + tagName; + + } else if (tagHandle === '!!') { + state.tag = 'tag:yaml.org,2002:' + tagName; + + } else { + throwError(state, 'undeclared tag handle "' + tagHandle + '"'); + } + + return true; +} + +function readAnchorProperty(state) { + var _position, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x26/* & */) return false; + + if (state.anchor !== null) { + throwError(state, 'duplication of an anchor property'); + } + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an anchor node must contain at least one character'); + } + + state.anchor = state.input.slice(_position, state.position); + return true; +} + +function readAlias(state) { + var _position, alias, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x2A/* * */) return false; + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an alias node must contain at least one character'); + } + + alias = state.input.slice(_position, state.position); + + if (!state.anchorMap.hasOwnProperty(alias)) { + throwError(state, 'unidentified alias "' + alias + '"'); + } + + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; +} + +function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, + allowBlockScalars, + allowBlockCollections, + indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + + if (indentStatus === 1) { + while (readTagProperty(state) || readAnchorProperty(state)) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + + blockIndent = state.position - state.lineStart; + + if (indentStatus === 1) { + if (allowBlockCollections && + (readBlockSequence(state, blockIndent) || + readBlockMapping(state, blockIndent, flowIndent)) || + readFlowCollection(state, flowIndent)) { + hasContent = true; + } else { + if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || + readSingleQuotedScalar(state, flowIndent) || + readDoubleQuotedScalar(state, flowIndent)) { + hasContent = true; + + } else if (readAlias(state)) { + hasContent = true; + + if (state.tag !== null || state.anchor !== null) { + throwError(state, 'alias node should not have any properties'); + } + + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + + if (state.tag === null) { + state.tag = '?'; + } + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else if (indentStatus === 0) { + // Special case: block sequences are allowed to have same indentation level as the parent. + // http://www.yaml.org/spec/1.2/spec.html#id2799784 + hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + } + + if (state.tag !== null && state.tag !== '!') { + if (state.tag === '?') { + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state.implicitTypes[typeIndex]; + + // Implicit resolving is not allowed for non-scalar types, and '?' + // non-specific tag is only assigned to plain scalars. So, it isn't + // needed to check for 'kind' conformity. + + if (type.resolve(state.result)) { // `state.result` updated in resolver if matched + state.result = type.construct(state.result); + state.tag = type.tag; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + break; + } + } + } else if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) { + type = state.typeMap[state.kind || 'fallback'][state.tag]; + + if (state.result !== null && type.kind !== state.kind) { + throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); + } + + if (!type.resolve(state.result)) { // `state.result` updated in resolver if matched + throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); + } else { + state.result = type.construct(state.result); + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else { + throwError(state, 'unknown tag !<' + state.tag + '>'); + } + } + + if (state.listener !== null) { + state.listener('close', state); + } + return state.tag !== null || state.anchor !== null || hasContent; +} + +function readDocument(state) { + var documentStart = state.position, + _position, + directiveName, + directiveArgs, + hasDirectives = false, + ch; + + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = {}; + state.anchorMap = {}; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if (state.lineIndent > 0 || ch !== 0x25/* % */) { + break; + } + + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + + if (directiveName.length < 1) { + throwError(state, 'directive name must not be less than one character in length'); + } + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && !is_EOL(ch)); + break; + } + + if (is_EOL(ch)) break; + + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveArgs.push(state.input.slice(_position, state.position)); + } + + if (ch !== 0) readLineBreak(state); + + if (_hasOwnProperty.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning(state, 'unknown document directive "' + directiveName + '"'); + } + } + + skipSeparationSpace(state, true, -1); + + if (state.lineIndent === 0 && + state.input.charCodeAt(state.position) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + + } else if (hasDirectives) { + throwError(state, 'directives end mark is expected'); + } + + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); + + if (state.checkLineBreaks && + PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { + throwWarning(state, 'non-ASCII line breaks are interpreted as content'); + } + + state.documents.push(state.result); + + if (state.position === state.lineStart && testDocumentSeparator(state)) { + + if (state.input.charCodeAt(state.position) === 0x2E/* . */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + return; + } + + if (state.position < (state.length - 1)) { + throwError(state, 'end of the stream or a document separator is expected'); + } else { + return; + } +} + + +function loadDocuments(input, options) { + input = String(input); + options = options || {}; + + if (input.length !== 0) { + + // Add tailing `\n` if not exists + if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && + input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { + input += '\n'; + } + + // Strip BOM + if (input.charCodeAt(0) === 0xFEFF) { + input = input.slice(1); + } + } + + var state = new State(input, options); + + // Use 0 as string terminator. That significantly simplifies bounds check. + state.input += '\0'; + + while (state.input.charCodeAt(state.position) === 0x20/* Space */) { + state.lineIndent += 1; + state.position += 1; + } + + while (state.position < (state.length - 1)) { + readDocument(state); + } + + return state.documents; +} + + +function loadAll(input, iterator, options) { + var documents = loadDocuments(input, options), index, length; + + if (typeof iterator !== 'function') { + return documents; + } + + for (index = 0, length = documents.length; index < length; index += 1) { + iterator(documents[index]); + } +} + + +function load(input, options) { + var documents = loadDocuments(input, options); + + if (documents.length === 0) { + /*eslint-disable no-undefined*/ + return undefined; + } else if (documents.length === 1) { + return documents[0]; + } + throw new YAMLException('expected a single document in the stream, but found more'); +} + + +function safeLoadAll(input, output, options) { + if (typeof output === 'function') { + loadAll(input, output, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); + } else { + return loadAll(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); + } +} + + +function safeLoad(input, options) { + return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); +} + + +module.exports.loadAll = loadAll; +module.exports.load = load; +module.exports.safeLoadAll = safeLoadAll; +module.exports.safeLoad = safeLoad; + +},{"./common":2,"./exception":4,"./mark":6,"./schema/default_full":9,"./schema/default_safe":10}],6:[function(require,module,exports){ +'use strict'; + + +var common = require('./common'); + + +function Mark(name, buffer, position, line, column) { + this.name = name; + this.buffer = buffer; + this.position = position; + this.line = line; + this.column = column; +} + + +Mark.prototype.getSnippet = function getSnippet(indent, maxLength) { + var head, start, tail, end, snippet; + + if (!this.buffer) return null; + + indent = indent || 4; + maxLength = maxLength || 75; + + head = ''; + start = this.position; + + while (start > 0 && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start - 1)) === -1) { + start -= 1; + if (this.position - start > (maxLength / 2 - 1)) { + head = ' ... '; + start += 5; + break; + } + } + + tail = ''; + end = this.position; + + while (end < this.buffer.length && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end)) === -1) { + end += 1; + if (end - this.position > (maxLength / 2 - 1)) { + tail = ' ... '; + end -= 5; + break; + } + } + + snippet = this.buffer.slice(start, end); + + return common.repeat(' ', indent) + head + snippet + tail + '\n' + + common.repeat(' ', indent + this.position - start + head.length) + '^'; +}; + + +Mark.prototype.toString = function toString(compact) { + var snippet, where = ''; + + if (this.name) { + where += 'in "' + this.name + '" '; + } + + where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1); + + if (!compact) { + snippet = this.getSnippet(); + + if (snippet) { + where += ':\n' + snippet; + } + } + + return where; +}; + + +module.exports = Mark; + +},{"./common":2}],7:[function(require,module,exports){ +'use strict'; + +/*eslint-disable max-len*/ + +var common = require('./common'); +var YAMLException = require('./exception'); +var Type = require('./type'); + + +function compileList(schema, name, result) { + var exclude = []; + + schema.include.forEach(function (includedSchema) { + result = compileList(includedSchema, name, result); + }); + + schema[name].forEach(function (currentType) { + result.forEach(function (previousType, previousIndex) { + if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) { + exclude.push(previousIndex); + } + }); + + result.push(currentType); + }); + + return result.filter(function (type, index) { + return exclude.indexOf(index) === -1; + }); +} + + +function compileMap(/* lists... */) { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {} + }, index, length; + + function collectType(type) { + result[type.kind][type.tag] = result['fallback'][type.tag] = type; + } + + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); + } + return result; +} + + +function Schema(definition) { + this.include = definition.include || []; + this.implicit = definition.implicit || []; + this.explicit = definition.explicit || []; + + this.implicit.forEach(function (type) { + if (type.loadKind && type.loadKind !== 'scalar') { + throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); + } + }); + + this.compiledImplicit = compileList(this, 'implicit', []); + this.compiledExplicit = compileList(this, 'explicit', []); + this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit); +} + + +Schema.DEFAULT = null; + + +Schema.create = function createSchema() { + var schemas, types; + + switch (arguments.length) { + case 1: + schemas = Schema.DEFAULT; + types = arguments[0]; + break; + + case 2: + schemas = arguments[0]; + types = arguments[1]; + break; + + default: + throw new YAMLException('Wrong number of arguments for Schema.create function'); + } + + schemas = common.toArray(schemas); + types = common.toArray(types); + + if (!schemas.every(function (schema) { return schema instanceof Schema; })) { + throw new YAMLException('Specified list of super schemas (or a single Schema object) contains a non-Schema object.'); + } + + if (!types.every(function (type) { return type instanceof Type; })) { + throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); + } + + return new Schema({ + include: schemas, + explicit: types + }); +}; + + +module.exports = Schema; + +},{"./common":2,"./exception":4,"./type":13}],8:[function(require,module,exports){ +// Standard YAML's Core schema. +// http://www.yaml.org/spec/1.2/spec.html#id2804923 +// +// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. +// So, Core schema has no distinctions from JSON schema is JS-YAML. + + +'use strict'; + + +var Schema = require('../schema'); + + +module.exports = new Schema({ + include: [ + require('./json') + ] +}); + +},{"../schema":7,"./json":12}],9:[function(require,module,exports){ +// JS-YAML's default schema for `load` function. +// It is not described in the YAML specification. +// +// This schema is based on JS-YAML's default safe schema and includes +// JavaScript-specific types: !!js/undefined, !!js/regexp and !!js/function. +// +// Also this schema is used as default base schema at `Schema.create` function. + + +'use strict'; + + +var Schema = require('../schema'); + + +module.exports = Schema.DEFAULT = new Schema({ + include: [ + require('./default_safe') + ], + explicit: [ + require('../type/js/undefined'), + require('../type/js/regexp'), + require('../type/js/function') + ] +}); + +},{"../schema":7,"../type/js/function":18,"../type/js/regexp":19,"../type/js/undefined":20,"./default_safe":10}],10:[function(require,module,exports){ +// JS-YAML's default schema for `safeLoad` function. +// It is not described in the YAML specification. +// +// This schema is based on standard YAML's Core schema and includes most of +// extra types described at YAML tag repository. (http://yaml.org/type/) + + +'use strict'; + + +var Schema = require('../schema'); + + +module.exports = new Schema({ + include: [ + require('./core') + ], + implicit: [ + require('../type/timestamp'), + require('../type/merge') + ], + explicit: [ + require('../type/binary'), + require('../type/omap'), + require('../type/pairs'), + require('../type/set') + ] +}); + +},{"../schema":7,"../type/binary":14,"../type/merge":22,"../type/omap":24,"../type/pairs":25,"../type/set":27,"../type/timestamp":29,"./core":8}],11:[function(require,module,exports){ +// Standard YAML's Failsafe schema. +// http://www.yaml.org/spec/1.2/spec.html#id2802346 + + +'use strict'; + + +var Schema = require('../schema'); + + +module.exports = new Schema({ + explicit: [ + require('../type/str'), + require('../type/seq'), + require('../type/map') + ] +}); + +},{"../schema":7,"../type/map":21,"../type/seq":26,"../type/str":28}],12:[function(require,module,exports){ +// Standard YAML's JSON schema. +// http://www.yaml.org/spec/1.2/spec.html#id2803231 +// +// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. +// So, this schema is not such strict as defined in the YAML specification. +// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc. + + +'use strict'; + + +var Schema = require('../schema'); + + +module.exports = new Schema({ + include: [ + require('./failsafe') + ], + implicit: [ + require('../type/null'), + require('../type/bool'), + require('../type/int'), + require('../type/float') + ] +}); + +},{"../schema":7,"../type/bool":15,"../type/float":16,"../type/int":17,"../type/null":23,"./failsafe":11}],13:[function(require,module,exports){ +'use strict'; + +var YAMLException = require('./exception'); + +var TYPE_CONSTRUCTOR_OPTIONS = [ + 'kind', + 'resolve', + 'construct', + 'instanceOf', + 'predicate', + 'represent', + 'defaultStyle', + 'styleAliases' +]; + +var YAML_NODE_KINDS = [ + 'scalar', + 'sequence', + 'mapping' +]; + +function compileStyleAliases(map) { + var result = {}; + + if (map !== null) { + Object.keys(map).forEach(function (style) { + map[style].forEach(function (alias) { + result[String(alias)] = style; + }); + }); + } + + return result; +} + +function Type(tag, options) { + options = options || {}; + + Object.keys(options).forEach(function (name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + + // TODO: Add tag format check. + this.tag = tag; + this.kind = options['kind'] || null; + this.resolve = options['resolve'] || function () { return true; }; + this.construct = options['construct'] || function (data) { return data; }; + this.instanceOf = options['instanceOf'] || null; + this.predicate = options['predicate'] || null; + this.represent = options['represent'] || null; + this.defaultStyle = options['defaultStyle'] || null; + this.styleAliases = compileStyleAliases(options['styleAliases'] || null); + + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } +} + +module.exports = Type; + +},{"./exception":4}],14:[function(require,module,exports){ +'use strict'; + +/*eslint-disable no-bitwise*/ + +var NodeBuffer; + +try { + // A trick for browserified version, to not include `Buffer` shim + var _require = require; + NodeBuffer = _require('buffer').Buffer; +} catch (__) {} + +var Type = require('../type'); + + +// [ 64, 65, 66 ] -> [ padding, CR, LF ] +var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; + + +function resolveYamlBinary(data) { + if (data === null) return false; + + var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; + + // Convert one by one. + for (idx = 0; idx < max; idx++) { + code = map.indexOf(data.charAt(idx)); + + // Skip CR/LF + if (code > 64) continue; + + // Fail on illegal characters + if (code < 0) return false; + + bitlen += 6; + } + + // If there are any bits left, source was corrupted + return (bitlen % 8) === 0; +} + +function constructYamlBinary(data) { + var idx, tailbits, + input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan + max = input.length, + map = BASE64_MAP, + bits = 0, + result = []; + + // Collect by 6*4 bits (3 bytes) + + for (idx = 0; idx < max; idx++) { + if ((idx % 4 === 0) && idx) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } + + bits = (bits << 6) | map.indexOf(input.charAt(idx)); + } + + // Dump tail + + tailbits = (max % 4) * 6; + + if (tailbits === 0) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } else if (tailbits === 18) { + result.push((bits >> 10) & 0xFF); + result.push((bits >> 2) & 0xFF); + } else if (tailbits === 12) { + result.push((bits >> 4) & 0xFF); + } + + // Wrap into Buffer for NodeJS and leave Array for browser + if (NodeBuffer) { + // Support node 6.+ Buffer API when available + return NodeBuffer.from ? NodeBuffer.from(result) : new NodeBuffer(result); + } + + return result; +} + +function representYamlBinary(object /*, style*/) { + var result = '', bits = 0, idx, tail, + max = object.length, + map = BASE64_MAP; + + // Convert every three bytes to 4 ASCII characters. + + for (idx = 0; idx < max; idx++) { + if ((idx % 3 === 0) && idx) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } + + bits = (bits << 8) + object[idx]; + } + + // Dump tail + + tail = max % 3; + + if (tail === 0) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } else if (tail === 2) { + result += map[(bits >> 10) & 0x3F]; + result += map[(bits >> 4) & 0x3F]; + result += map[(bits << 2) & 0x3F]; + result += map[64]; + } else if (tail === 1) { + result += map[(bits >> 2) & 0x3F]; + result += map[(bits << 4) & 0x3F]; + result += map[64]; + result += map[64]; + } + + return result; +} + +function isBinary(object) { + return NodeBuffer && NodeBuffer.isBuffer(object); +} + +module.exports = new Type('tag:yaml.org,2002:binary', { + kind: 'scalar', + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary +}); + +},{"../type":13}],15:[function(require,module,exports){ +'use strict'; + +var Type = require('../type'); + +function resolveYamlBoolean(data) { + if (data === null) return false; + + var max = data.length; + + return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || + (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); +} + +function constructYamlBoolean(data) { + return data === 'true' || + data === 'True' || + data === 'TRUE'; +} + +function isBoolean(object) { + return Object.prototype.toString.call(object) === '[object Boolean]'; +} + +module.exports = new Type('tag:yaml.org,2002:bool', { + kind: 'scalar', + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function (object) { return object ? 'true' : 'false'; }, + uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, + camelcase: function (object) { return object ? 'True' : 'False'; } + }, + defaultStyle: 'lowercase' +}); + +},{"../type":13}],16:[function(require,module,exports){ +'use strict'; + +var common = require('../common'); +var Type = require('../type'); + +var YAML_FLOAT_PATTERN = new RegExp( + // 2.5e4, 2.5 and integers + '^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' + + // .2e4, .2 + // special case, seems not from spec + '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' + + // 20:59 + '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*' + + // .inf + '|[-+]?\\.(?:inf|Inf|INF)' + + // .nan + '|\\.(?:nan|NaN|NAN))$'); + +function resolveYamlFloat(data) { + if (data === null) return false; + + if (!YAML_FLOAT_PATTERN.test(data) || + // Quick hack to not allow integers end with `_` + // Probably should update regexp & check speed + data[data.length - 1] === '_') { + return false; + } + + return true; +} + +function constructYamlFloat(data) { + var value, sign, base, digits; + + value = data.replace(/_/g, '').toLowerCase(); + sign = value[0] === '-' ? -1 : 1; + digits = []; + + if ('+-'.indexOf(value[0]) >= 0) { + value = value.slice(1); + } + + if (value === '.inf') { + return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + + } else if (value === '.nan') { + return NaN; + + } else if (value.indexOf(':') >= 0) { + value.split(':').forEach(function (v) { + digits.unshift(parseFloat(v, 10)); + }); + + value = 0.0; + base = 1; + + digits.forEach(function (d) { + value += d * base; + base *= 60; + }); + + return sign * value; + + } + return sign * parseFloat(value, 10); +} + + +var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + +function representYamlFloat(object, style) { + var res; + + if (isNaN(object)) { + switch (style) { + case 'lowercase': return '.nan'; + case 'uppercase': return '.NAN'; + case 'camelcase': return '.NaN'; + } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '.inf'; + case 'uppercase': return '.INF'; + case 'camelcase': return '.Inf'; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '-.inf'; + case 'uppercase': return '-.INF'; + case 'camelcase': return '-.Inf'; + } + } else if (common.isNegativeZero(object)) { + return '-0.0'; + } + + res = object.toString(10); + + // JS stringifier can build scientific format without dots: 5e-100, + // while YAML requres dot: 5.e-100. Fix it with simple hack + + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; +} + +function isFloat(object) { + return (Object.prototype.toString.call(object) === '[object Number]') && + (object % 1 !== 0 || common.isNegativeZero(object)); +} + +module.exports = new Type('tag:yaml.org,2002:float', { + kind: 'scalar', + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: 'lowercase' +}); + +},{"../common":2,"../type":13}],17:[function(require,module,exports){ +'use strict'; + +var common = require('../common'); +var Type = require('../type'); + +function isHexCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || + ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || + ((0x61/* a */ <= c) && (c <= 0x66/* f */)); +} + +function isOctCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); +} + +function isDecCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); +} + +function resolveYamlInteger(data) { + if (data === null) return false; + + var max = data.length, + index = 0, + hasDigits = false, + ch; + + if (!max) return false; + + ch = data[index]; + + // sign + if (ch === '-' || ch === '+') { + ch = data[++index]; + } + + if (ch === '0') { + // 0 + if (index + 1 === max) return true; + ch = data[++index]; + + // base 2, base 8, base 16 + + if (ch === 'b') { + // base 2 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (ch !== '0' && ch !== '1') return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + + if (ch === 'x') { + // base 16 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isHexCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + // base 8 + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isOctCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + // base 10 (except 0) or base 60 + + // value should not start with `_`; + if (ch === '_') return false; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (ch === ':') break; + if (!isDecCode(data.charCodeAt(index))) { + return false; + } + hasDigits = true; + } + + // Should have digits and should not end with `_` + if (!hasDigits || ch === '_') return false; + + // if !base60 - done; + if (ch !== ':') return true; + + // base60 almost not used, no needs to optimize + return /^(:[0-5]?[0-9])+$/.test(data.slice(index)); +} + +function constructYamlInteger(data) { + var value = data, sign = 1, ch, base, digits = []; + + if (value.indexOf('_') !== -1) { + value = value.replace(/_/g, ''); + } + + ch = value[0]; + + if (ch === '-' || ch === '+') { + if (ch === '-') sign = -1; + value = value.slice(1); + ch = value[0]; + } + + if (value === '0') return 0; + + if (ch === '0') { + if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); + if (value[1] === 'x') return sign * parseInt(value, 16); + return sign * parseInt(value, 8); + } + + if (value.indexOf(':') !== -1) { + value.split(':').forEach(function (v) { + digits.unshift(parseInt(v, 10)); + }); + + value = 0; + base = 1; + + digits.forEach(function (d) { + value += (d * base); + base *= 60; + }); + + return sign * value; + + } + + return sign * parseInt(value, 10); +} + +function isInteger(object) { + return (Object.prototype.toString.call(object)) === '[object Number]' && + (object % 1 === 0 && !common.isNegativeZero(object)); +} + +module.exports = new Type('tag:yaml.org,2002:int', { + kind: 'scalar', + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function (object) { return '0b' + object.toString(2); }, + octal: function (object) { return '0' + object.toString(8); }, + decimal: function (object) { return object.toString(10); }, + hexadecimal: function (object) { return '0x' + object.toString(16).toUpperCase(); } + }, + defaultStyle: 'decimal', + styleAliases: { + binary: [ 2, 'bin' ], + octal: [ 8, 'oct' ], + decimal: [ 10, 'dec' ], + hexadecimal: [ 16, 'hex' ] + } +}); + +},{"../common":2,"../type":13}],18:[function(require,module,exports){ +'use strict'; + +var esprima; + +// Browserified version does not have esprima +// +// 1. For node.js just require module as deps +// 2. For browser try to require mudule via external AMD system. +// If not found - try to fallback to window.esprima. If not +// found too - then fail to parse. +// +try { + // workaround to exclude package from browserify list. + var _require = require; + esprima = _require('esprima'); +} catch (_) { + /*global window */ + if (typeof window !== 'undefined') esprima = window.esprima; +} + +var Type = require('../../type'); + +function resolveJavascriptFunction(data) { + if (data === null) return false; + + try { + var source = '(' + data + ')', + ast = esprima.parse(source, { range: true }); + + if (ast.type !== 'Program' || + ast.body.length !== 1 || + ast.body[0].type !== 'ExpressionStatement' || + ast.body[0].expression.type !== 'FunctionExpression') { + return false; + } + + return true; + } catch (err) { + return false; + } +} + +function constructJavascriptFunction(data) { + /*jslint evil:true*/ + + var source = '(' + data + ')', + ast = esprima.parse(source, { range: true }), + params = [], + body; + + if (ast.type !== 'Program' || + ast.body.length !== 1 || + ast.body[0].type !== 'ExpressionStatement' || + ast.body[0].expression.type !== 'FunctionExpression') { + throw new Error('Failed to resolve function'); + } + + ast.body[0].expression.params.forEach(function (param) { + params.push(param.name); + }); + + body = ast.body[0].expression.body.range; + + // Esprima's ranges include the first '{' and the last '}' characters on + // function expressions. So cut them out. + /*eslint-disable no-new-func*/ + return new Function(params, source.slice(body[0] + 1, body[1] - 1)); +} + +function representJavascriptFunction(object /*, style*/) { + return object.toString(); +} + +function isFunction(object) { + return Object.prototype.toString.call(object) === '[object Function]'; +} + +module.exports = new Type('tag:yaml.org,2002:js/function', { + kind: 'scalar', + resolve: resolveJavascriptFunction, + construct: constructJavascriptFunction, + predicate: isFunction, + represent: representJavascriptFunction +}); + +},{"../../type":13}],19:[function(require,module,exports){ +'use strict'; + +var Type = require('../../type'); + +function resolveJavascriptRegExp(data) { + if (data === null) return false; + if (data.length === 0) return false; + + var regexp = data, + tail = /\/([gim]*)$/.exec(data), + modifiers = ''; + + // if regexp starts with '/' it can have modifiers and must be properly closed + // `/foo/gim` - modifiers tail can be maximum 3 chars + if (regexp[0] === '/') { + if (tail) modifiers = tail[1]; + + if (modifiers.length > 3) return false; + // if expression starts with /, is should be properly terminated + if (regexp[regexp.length - modifiers.length - 1] !== '/') return false; + } + + return true; +} + +function constructJavascriptRegExp(data) { + var regexp = data, + tail = /\/([gim]*)$/.exec(data), + modifiers = ''; + + // `/foo/gim` - tail can be maximum 4 chars + if (regexp[0] === '/') { + if (tail) modifiers = tail[1]; + regexp = regexp.slice(1, regexp.length - modifiers.length - 1); + } + + return new RegExp(regexp, modifiers); +} + +function representJavascriptRegExp(object /*, style*/) { + var result = '/' + object.source + '/'; + + if (object.global) result += 'g'; + if (object.multiline) result += 'm'; + if (object.ignoreCase) result += 'i'; + + return result; +} + +function isRegExp(object) { + return Object.prototype.toString.call(object) === '[object RegExp]'; +} + +module.exports = new Type('tag:yaml.org,2002:js/regexp', { + kind: 'scalar', + resolve: resolveJavascriptRegExp, + construct: constructJavascriptRegExp, + predicate: isRegExp, + represent: representJavascriptRegExp +}); + +},{"../../type":13}],20:[function(require,module,exports){ +'use strict'; + +var Type = require('../../type'); + +function resolveJavascriptUndefined() { + return true; +} + +function constructJavascriptUndefined() { + /*eslint-disable no-undefined*/ + return undefined; +} + +function representJavascriptUndefined() { + return ''; +} + +function isUndefined(object) { + return typeof object === 'undefined'; +} + +module.exports = new Type('tag:yaml.org,2002:js/undefined', { + kind: 'scalar', + resolve: resolveJavascriptUndefined, + construct: constructJavascriptUndefined, + predicate: isUndefined, + represent: representJavascriptUndefined +}); + +},{"../../type":13}],21:[function(require,module,exports){ +'use strict'; + +var Type = require('../type'); + +module.exports = new Type('tag:yaml.org,2002:map', { + kind: 'mapping', + construct: function (data) { return data !== null ? data : {}; } +}); + +},{"../type":13}],22:[function(require,module,exports){ +'use strict'; + +var Type = require('../type'); + +function resolveYamlMerge(data) { + return data === '<<' || data === null; +} + +module.exports = new Type('tag:yaml.org,2002:merge', { + kind: 'scalar', + resolve: resolveYamlMerge +}); + +},{"../type":13}],23:[function(require,module,exports){ +'use strict'; + +var Type = require('../type'); + +function resolveYamlNull(data) { + if (data === null) return true; + + var max = data.length; + + return (max === 1 && data === '~') || + (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); +} + +function constructYamlNull() { + return null; +} + +function isNull(object) { + return object === null; +} + +module.exports = new Type('tag:yaml.org,2002:null', { + kind: 'scalar', + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function () { return '~'; }, + lowercase: function () { return 'null'; }, + uppercase: function () { return 'NULL'; }, + camelcase: function () { return 'Null'; } + }, + defaultStyle: 'lowercase' +}); + +},{"../type":13}],24:[function(require,module,exports){ +'use strict'; + +var Type = require('../type'); + +var _hasOwnProperty = Object.prototype.hasOwnProperty; +var _toString = Object.prototype.toString; + +function resolveYamlOmap(data) { + if (data === null) return true; + + var objectKeys = [], index, length, pair, pairKey, pairHasKey, + object = data; + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + pairHasKey = false; + + if (_toString.call(pair) !== '[object Object]') return false; + + for (pairKey in pair) { + if (_hasOwnProperty.call(pair, pairKey)) { + if (!pairHasKey) pairHasKey = true; + else return false; + } + } + + if (!pairHasKey) return false; + + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); + else return false; + } + + return true; +} + +function constructYamlOmap(data) { + return data !== null ? data : []; +} + +module.exports = new Type('tag:yaml.org,2002:omap', { + kind: 'sequence', + resolve: resolveYamlOmap, + construct: constructYamlOmap +}); + +},{"../type":13}],25:[function(require,module,exports){ +'use strict'; + +var Type = require('../type'); + +var _toString = Object.prototype.toString; + +function resolveYamlPairs(data) { + if (data === null) return true; + + var index, length, pair, keys, result, + object = data; + + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + + if (_toString.call(pair) !== '[object Object]') return false; + + keys = Object.keys(pair); + + if (keys.length !== 1) return false; + + result[index] = [ keys[0], pair[keys[0]] ]; + } + + return true; +} + +function constructYamlPairs(data) { + if (data === null) return []; + + var index, length, pair, keys, result, + object = data; + + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + + keys = Object.keys(pair); + + result[index] = [ keys[0], pair[keys[0]] ]; + } + + return result; +} + +module.exports = new Type('tag:yaml.org,2002:pairs', { + kind: 'sequence', + resolve: resolveYamlPairs, + construct: constructYamlPairs +}); + +},{"../type":13}],26:[function(require,module,exports){ +'use strict'; + +var Type = require('../type'); + +module.exports = new Type('tag:yaml.org,2002:seq', { + kind: 'sequence', + construct: function (data) { return data !== null ? data : []; } +}); + +},{"../type":13}],27:[function(require,module,exports){ +'use strict'; + +var Type = require('../type'); + +var _hasOwnProperty = Object.prototype.hasOwnProperty; + +function resolveYamlSet(data) { + if (data === null) return true; + + var key, object = data; + + for (key in object) { + if (_hasOwnProperty.call(object, key)) { + if (object[key] !== null) return false; + } + } + + return true; +} + +function constructYamlSet(data) { + return data !== null ? data : {}; +} + +module.exports = new Type('tag:yaml.org,2002:set', { + kind: 'mapping', + resolve: resolveYamlSet, + construct: constructYamlSet +}); + +},{"../type":13}],28:[function(require,module,exports){ +'use strict'; + +var Type = require('../type'); + +module.exports = new Type('tag:yaml.org,2002:str', { + kind: 'scalar', + construct: function (data) { return data !== null ? data : ''; } +}); + +},{"../type":13}],29:[function(require,module,exports){ +'use strict'; + +var Type = require('../type'); + +var YAML_DATE_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9])' + // [2] month + '-([0-9][0-9])$'); // [3] day + +var YAML_TIMESTAMP_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9]?)' + // [2] month + '-([0-9][0-9]?)' + // [3] day + '(?:[Tt]|[ \\t]+)' + // ... + '([0-9][0-9]?)' + // [4] hour + ':([0-9][0-9])' + // [5] minute + ':([0-9][0-9])' + // [6] second + '(?:\\.([0-9]*))?' + // [7] fraction + '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour + '(?::([0-9][0-9]))?))?$'); // [11] tz_minute + +function resolveYamlTimestamp(data) { + if (data === null) return false; + if (YAML_DATE_REGEXP.exec(data) !== null) return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; + return false; +} + +function constructYamlTimestamp(data) { + var match, year, month, day, hour, minute, second, fraction = 0, + delta = null, tz_hour, tz_minute, date; + + match = YAML_DATE_REGEXP.exec(data); + if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); + + if (match === null) throw new Error('Date resolve error'); + + // match: [1] year [2] month [3] day + + year = +(match[1]); + month = +(match[2]) - 1; // JS month starts with 0 + day = +(match[3]); + + if (!match[4]) { // no hour + return new Date(Date.UTC(year, month, day)); + } + + // match: [4] hour [5] minute [6] second [7] fraction + + hour = +(match[4]); + minute = +(match[5]); + second = +(match[6]); + + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) { // milli-seconds + fraction += '0'; + } + fraction = +fraction; + } + + // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute + + if (match[9]) { + tz_hour = +(match[10]); + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds + if (match[9] === '-') delta = -delta; + } + + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + + if (delta) date.setTime(date.getTime() - delta); + + return date; +} + +function representYamlTimestamp(object /*, style*/) { + return object.toISOString(); +} + +module.exports = new Type('tag:yaml.org,2002:timestamp', { + kind: 'scalar', + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp +}); + +},{"../type":13}],"/":[function(require,module,exports){ +'use strict'; + + +var yaml = require('./lib/js-yaml.js'); + + +module.exports = yaml; + +},{"./lib/js-yaml.js":1}]},{},[])("/") +}); \ No newline at end of file diff --git a/node_modules/js-yaml/dist/js-yaml.min.js b/node_modules/js-yaml/dist/js-yaml.min.js new file mode 100644 index 0000000..5d748b0 --- /dev/null +++ b/node_modules/js-yaml/dist/js-yaml.min.js @@ -0,0 +1 @@ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).jsyaml=e()}}(function(){return function e(t,n,i){function r(a,s){if(!n[a]){if(!t[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return r(n||e)},l,l.exports,e,t,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;ai&&" "!==e[h+1],h=o);else if(!l(a))return ue;m=m&&p(a)}c=c||d&&o-h-1>i&&" "!==e[h+1]}return s||c?" "===e[0]&&n>9?ue:c?ce:se:m&&!r(e)?oe:ae}function h(e,t,n,i){e.dump=function(){if(0===t.length)return"''";if(!e.noCompatMode&&-1!==re.indexOf(t))return"'"+t+"'";var r=e.indent*Math.max(1,n),o=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-r),s=i||e.flowLevel>-1&&n>=e.flowLevel;switch(d(t,s,e.indent,o,function(t){return c(e,t)})){case oe:return t;case ae:return"'"+t.replace(/'/g,"''")+"'";case se:return"|"+m(t,e.indent)+g(a(t,r));case ce:return">"+m(t,e.indent)+g(a(y(t,o),r));case ue:return'"'+v(t)+'"';default:throw new F("impossible error: invalid scalar style")}}()}function m(e,t){var n=" "===e[0]?String(t):"",i="\n"===e[e.length-1];return n+(i&&("\n"===e[e.length-2]||"\n"===e)?"+":i?"":"-")+"\n"}function g(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function y(e,t){for(var n,i,r=/(\n+)([^\n]*)/g,o=function(){var n=e.indexOf("\n");return n=-1!==n?n:e.length,r.lastIndex=n,x(e.slice(0,n),t)}(),a="\n"===e[0]||" "===e[0];i=r.exec(e);){var s=i[1],c=i[2];n=" "===c[0],o+=s+(a||n||""===c?"":"\n")+x(c,t),a=n}return o}function x(e,t){if(""===e||" "===e[0])return e;for(var n,i,r=/ [^ ]/g,o=0,a=0,s=0,c="";n=r.exec(e);)(s=n.index)-o>t&&(i=a>o?a:s,c+="\n"+e.slice(o,i),o=i+1),a=s;return c+="\n",e.length-o>t&&a>o?c+=e.slice(o,a)+"\n"+e.slice(a+1):c+=e.slice(o),c.slice(1)}function v(e){for(var t,n,i,o="",a=0;a=55296&&t<=56319&&(n=e.charCodeAt(a+1))>=56320&&n<=57343?(o+=r(1024*(t-55296)+n-56320+65536),a++):o+=!(i=ie[t])&&l(t)?e[a]:i||r(t);return o}function A(e,t,n){var i,r,o="",a=e.tag;for(i=0,r=n.length;i1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),j(e,t,a,!1,!1)&&(c+=s+=e.dump));e.tag=u,e.dump="{"+c+"}"}function C(e,t,n,i){var r,o,a,c,u,l,p="",f=e.tag,d=Object.keys(n);if(!0===e.sortKeys)d.sort();else if("function"==typeof e.sortKeys)d.sort(e.sortKeys);else if(e.sortKeys)throw new F("sortKeys must be a boolean or a function");for(r=0,o=d.length;r1024)&&(e.dump&&D===e.dump.charCodeAt(0)?l+="?":l+="? "),l+=e.dump,u&&(l+=s(e,t)),j(e,t+1,c,!0,u)&&(e.dump&&D===e.dump.charCodeAt(0)?l+=":":l+=": ",p+=l+=e.dump));e.tag=f,e.dump=p||"{}"}function k(e,t,n){var i,r,o,a,s,c;for(o=0,a=(r=n?e.explicitTypes:e.implicitTypes).length;o tag resolver accepts not "'+c+'" style');i=s.represent[c](t,c)}e.dump=i}return!0}return!1}function j(e,t,n,i,r,o){e.tag=null,e.dump=n,k(e,n,!1)||k(e,n,!0);var a=M.call(e.dump);i&&(i=e.flowLevel<0||e.flowLevel>t);var s,c,u="[object Object]"===a||"[object Array]"===a;if(u&&(c=-1!==(s=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||c||2!==e.indent&&t>0)&&(r=!1),c&&e.usedDuplicates[s])e.dump="*ref_"+s;else{if(u&&c&&!e.usedDuplicates[s]&&(e.usedDuplicates[s]=!0),"[object Object]"===a)i&&0!==Object.keys(e.dump).length?(C(e,t,e.dump,r),c&&(e.dump="&ref_"+s+e.dump)):(w(e,t,e.dump),c&&(e.dump="&ref_"+s+" "+e.dump));else if("[object Array]"===a)i&&0!==e.dump.length?(b(e,t,e.dump,r),c&&(e.dump="&ref_"+s+e.dump)):(A(e,t,e.dump),c&&(e.dump="&ref_"+s+" "+e.dump));else{if("[object String]"!==a){if(e.skipInvalid)return!1;throw new F("unacceptable kind of an object to dump "+a)}"?"!==e.tag&&h(e,e.dump,t,o)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function I(e,t){var n,i,r=[],o=[];for(S(e,r,o),n=0,i=o.length;n>10),56320+(e-65536&1023))}function f(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||W,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function d(e,t){return new Y(t,new R(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function h(e,t){throw d(e,t)}function m(e,t){e.onWarning&&e.onWarning.call(null,d(e,t))}function g(e,t,n,i){var r,o,a,s;if(t1&&(e.result+=q.repeat("\n",t-1))}function C(e,t,n){var s,c,u,l,p,f,d,h,m,y=e.kind,x=e.result;if(m=e.input.charCodeAt(e.position),o(m)||a(m)||35===m||38===m||42===m||33===m||124===m||62===m||39===m||34===m||37===m||64===m||96===m)return!1;if((63===m||45===m)&&(c=e.input.charCodeAt(e.position+1),o(c)||n&&a(c)))return!1;for(e.kind="scalar",e.result="",u=l=e.position,p=!1;0!==m;){if(58===m){if(c=e.input.charCodeAt(e.position+1),o(c)||n&&a(c))break}else if(35===m){if(s=e.input.charCodeAt(e.position-1),o(s))break}else{if(e.position===e.lineStart&&b(e)||n&&a(m))break;if(i(m)){if(f=e.line,d=e.lineStart,h=e.lineIndent,A(e,!1,-1),e.lineIndent>=t){p=!0,m=e.input.charCodeAt(e.position);continue}e.position=l,e.line=f,e.lineStart=d,e.lineIndent=h;break}}p&&(g(e,u,l,!1),w(e,e.line-f),u=l=e.position,p=!1),r(m)||(l=e.position+1),m=e.input.charCodeAt(++e.position)}return g(e,u,l,!1),!!e.result||(e.kind=y,e.result=x,!1)}function k(e,t){var n,r,o;if(39!==(n=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,r=o=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(g(e,r,e.position,!0),39!==(n=e.input.charCodeAt(++e.position)))return!0;r=e.position,e.position++,o=e.position}else i(n)?(g(e,r,o,!0),w(e,A(e,!1,t)),r=o=e.position):e.position===e.lineStart&&b(e)?h(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);h(e,"unexpected end of the stream within a single quoted scalar")}function j(e,t){var n,r,o,a,u,l;if(34!==(l=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;0!==(l=e.input.charCodeAt(e.position));){if(34===l)return g(e,n,e.position,!0),e.position++,!0;if(92===l){if(g(e,n,e.position,!0),l=e.input.charCodeAt(++e.position),i(l))A(e,!1,t);else if(l<256&&ne[l])e.result+=ie[l],e.position++;else if((u=c(l))>0){for(o=u,a=0;o>0;o--)(u=s(l=e.input.charCodeAt(++e.position)))>=0?a=(a<<4)+u:h(e,"expected hexadecimal character");e.result+=p(a),e.position++}else h(e,"unknown escape sequence");n=r=e.position}else i(l)?(g(e,n,r,!0),w(e,A(e,!1,t)),n=r=e.position):e.position===e.lineStart&&b(e)?h(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}h(e,"unexpected end of the stream within a double quoted scalar")}function I(e,t){var n,i,r,a,s,c,u,l,p,f,d=!0,m=e.tag,g=e.anchor,y={};if(91===(f=e.input.charCodeAt(e.position)))r=93,c=!1,i=[];else{if(123!==f)return!1;r=125,c=!0,i={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),f=e.input.charCodeAt(++e.position);0!==f;){if(A(e,!0,t),(f=e.input.charCodeAt(e.position))===r)return e.position++,e.tag=m,e.anchor=g,e.kind=c?"mapping":"sequence",e.result=i,!0;d||h(e,"missed comma between flow collection entries"),l=u=p=null,a=s=!1,63===f&&o(e.input.charCodeAt(e.position+1))&&(a=s=!0,e.position++,A(e,!0,t)),n=e.line,M(e,t,K,!1,!0),l=e.tag,u=e.result,A(e,!0,t),f=e.input.charCodeAt(e.position),!s&&e.line!==n||58!==f||(a=!0,f=e.input.charCodeAt(++e.position),A(e,!0,t),M(e,t,K,!1,!0),p=e.result),c?x(e,i,y,l,u,p):a?i.push(x(e,null,y,l,u,p)):i.push(u),A(e,!0,t),44===(f=e.input.charCodeAt(e.position))?(d=!0,f=e.input.charCodeAt(++e.position)):d=!1}h(e,"unexpected end of the stream within a flow collection")}function S(e,t){var n,o,a,s,c=V,l=!1,p=!1,f=t,d=0,m=!1;if(124===(s=e.input.charCodeAt(e.position)))o=!1;else{if(62!==s)return!1;o=!0}for(e.kind="scalar",e.result="";0!==s;)if(43===(s=e.input.charCodeAt(++e.position))||45===s)V===c?c=43===s?z:Z:h(e,"repeat of a chomping mode identifier");else{if(!((a=u(s))>=0))break;0===a?h(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):p?h(e,"repeat of an indentation width identifier"):(f=t+a-1,p=!0)}if(r(s)){do{s=e.input.charCodeAt(++e.position)}while(r(s));if(35===s)do{s=e.input.charCodeAt(++e.position)}while(!i(s)&&0!==s)}for(;0!==s;){for(v(e),e.lineIndent=0,s=e.input.charCodeAt(e.position);(!p||e.lineIndentf&&(f=e.lineIndent),i(s))d++;else{if(e.lineIndentt)&&0!==r)h(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(M(e,t,G,!0,a)&&(v?g=e.result:y=e.result),v||(x(e,f,d,m,g,y,s,c),m=g=y=null),A(e,!0,-1),u=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==u)h(e,"bad indentation of a mapping entry");else if(e.lineIndentt?d=1:e.lineIndent===t?d=0:e.lineIndentt?d=1:e.lineIndent===t?d=0:e.lineIndent tag; it should be "'+l.kind+'", not "'+e.kind+'"'),l.resolve(e.result)?(e.result=l.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):h(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):h(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||g}function T(e){var t,n,a,s,c=e.position,u=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(s=e.input.charCodeAt(e.position))&&(A(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==s));){for(u=!0,s=e.input.charCodeAt(++e.position),t=e.position;0!==s&&!o(s);)s=e.input.charCodeAt(++e.position);for(a=[],(n=e.input.slice(t,e.position)).length<1&&h(e,"directive name must not be less than one character in length");0!==s;){for(;r(s);)s=e.input.charCodeAt(++e.position);if(35===s){do{s=e.input.charCodeAt(++e.position)}while(0!==s&&!i(s));break}if(i(s))break;for(t=e.position;0!==s&&!o(s);)s=e.input.charCodeAt(++e.position);a.push(e.input.slice(t,e.position))}0!==s&&v(e),B.call(oe,n)?oe[n](e,n,a):m(e,'unknown document directive "'+n+'"')}A(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,A(e,!0,-1)):u&&h(e,"directives end mark is expected"),M(e,e.lineIndent-1,G,!1,!0),A(e,!0,-1),e.checkLineBreaks&&Q.test(e.input.slice(c,e.position))&&m(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&b(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,A(e,!0,-1)):e.position0&&-1==="\0\r\nÂ…\u2028\u2029".indexOf(this.buffer.charAt(i-1));)if(i-=1,this.position-i>t/2-1){n=" ... ",i+=5;break}for(o="",a=this.position;at/2-1){o=" ... ",a-=5;break}return s=this.buffer.slice(i,a),r.repeat(" ",e)+n+s+o+"\n"+r.repeat(" ",e+this.position-i+n.length)+"^"},i.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(n+=":\n"+t),n},t.exports=i},{"./common":2}],7:[function(e,t,n){"use strict";function i(e,t,n){var r=[];return e.include.forEach(function(e){n=i(e,t,n)}),e[t].forEach(function(e){n.forEach(function(t,n){t.tag===e.tag&&t.kind===e.kind&&r.push(n)}),n.push(e)}),n.filter(function(e,t){return-1===r.indexOf(t)})}function r(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{}};for(e=0,t=arguments.length;e64)){if(t<0)return!1;i+=6}return i%8==0},construct:function(e){var t,n,r=e.replace(/[\r\n=]/g,""),a=r.length,s=o,c=0,u=[];for(t=0;t>16&255),u.push(c>>8&255),u.push(255&c)),c=c<<6|s.indexOf(r.charAt(t));return 0==(n=a%4*6)?(u.push(c>>16&255),u.push(c>>8&255),u.push(255&c)):18===n?(u.push(c>>10&255),u.push(c>>2&255)):12===n&&u.push(c>>4&255),i?i.from?i.from(u):new i(u):u},predicate:function(e){return i&&i.isBuffer(e)},represent:function(e){var t,n,i="",r=0,a=e.length,s=o;for(t=0;t>18&63],i+=s[r>>12&63],i+=s[r>>6&63],i+=s[63&r]),r=(r<<8)+e[t];return 0==(n=a%3)?(i+=s[r>>18&63],i+=s[r>>12&63],i+=s[r>>6&63],i+=s[63&r]):2===n?(i+=s[r>>10&63],i+=s[r>>4&63],i+=s[r<<2&63],i+=s[64]):1===n&&(i+=s[r>>2&63],i+=s[r<<4&63],i+=s[64],i+=s[64]),i}})},{"../type":13}],15:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},{"../type":13}],16:[function(e,t,n){"use strict";var i=e("../common"),r=e("../type"),o=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),a=/^[-+]?[0-9]+e/;t.exports=new r("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!o.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n,i,r;return t=e.replace(/_/g,"").toLowerCase(),n="-"===t[0]?-1:1,r=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach(function(e){r.unshift(parseFloat(e,10))}),t=0,i=1,r.forEach(function(e){t+=e*i,i*=60}),n*t):n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||i.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(i.isNegativeZero(e))return"-0.0";return n=e.toString(10),a.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},{"../common":2,"../type":13}],17:[function(e,t,n){"use strict";function i(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function r(e){return 48<=e&&e<=55}function o(e){return 48<=e&&e<=57}var a=e("../common"),s=e("../type");t.exports=new s("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n=e.length,a=0,s=!1;if(!n)return!1;if("-"!==(t=e[a])&&"+"!==t||(t=e[++a]),"0"===t){if(a+1===n)return!0;if("b"===(t=e[++a])){for(a++;a3)return!1;if("/"!==t[t.length-i.length-1])return!1}return!0},construct:function(e){var t=e,n=/\/([gim]*)$/.exec(e),i="";return"/"===t[0]&&(n&&(i=n[1]),t=t.slice(1,t.length-i.length-1)),new RegExp(t,i)},predicate:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},represent:function(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}})},{"../../type":13}],20:[function(e,t,n){"use strict";var i=e("../../type");t.exports=new i("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:function(){return!0},construct:function(){},predicate:function(e){return void 0===e},represent:function(){return""}})},{"../../type":13}],21:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},{"../type":13}],22:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},{"../type":13}],23:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":13}],24:[function(e,t,n){"use strict";var i=e("../type"),r=Object.prototype.hasOwnProperty,o=Object.prototype.toString;t.exports=new i("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,i,a,s,c=[],u=e;for(t=0,n=u.length;t */ +var CHAR_QUESTION = 0x3F; /* ? */ +var CHAR_COMMERCIAL_AT = 0x40; /* @ */ +var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ +var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ +var CHAR_GRAVE_ACCENT = 0x60; /* ` */ +var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ +var CHAR_VERTICAL_LINE = 0x7C; /* | */ +var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ + +var ESCAPE_SEQUENCES = {}; + +ESCAPE_SEQUENCES[0x00] = '\\0'; +ESCAPE_SEQUENCES[0x07] = '\\a'; +ESCAPE_SEQUENCES[0x08] = '\\b'; +ESCAPE_SEQUENCES[0x09] = '\\t'; +ESCAPE_SEQUENCES[0x0A] = '\\n'; +ESCAPE_SEQUENCES[0x0B] = '\\v'; +ESCAPE_SEQUENCES[0x0C] = '\\f'; +ESCAPE_SEQUENCES[0x0D] = '\\r'; +ESCAPE_SEQUENCES[0x1B] = '\\e'; +ESCAPE_SEQUENCES[0x22] = '\\"'; +ESCAPE_SEQUENCES[0x5C] = '\\\\'; +ESCAPE_SEQUENCES[0x85] = '\\N'; +ESCAPE_SEQUENCES[0xA0] = '\\_'; +ESCAPE_SEQUENCES[0x2028] = '\\L'; +ESCAPE_SEQUENCES[0x2029] = '\\P'; + +var DEPRECATED_BOOLEANS_SYNTAX = [ + 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', + 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' +]; + +function compileStyleMap(schema, map) { + var result, keys, index, length, tag, style, type; + + if (map === null) return {}; + + result = {}; + keys = Object.keys(map); + + for (index = 0, length = keys.length; index < length; index += 1) { + tag = keys[index]; + style = String(map[tag]); + + if (tag.slice(0, 2) === '!!') { + tag = 'tag:yaml.org,2002:' + tag.slice(2); + } + type = schema.compiledTypeMap['fallback'][tag]; + + if (type && _hasOwnProperty.call(type.styleAliases, style)) { + style = type.styleAliases[style]; + } + + result[tag] = style; + } + + return result; +} + +function encodeHex(character) { + var string, handle, length; + + string = character.toString(16).toUpperCase(); + + if (character <= 0xFF) { + handle = 'x'; + length = 2; + } else if (character <= 0xFFFF) { + handle = 'u'; + length = 4; + } else if (character <= 0xFFFFFFFF) { + handle = 'U'; + length = 8; + } else { + throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF'); + } + + return '\\' + handle + common.repeat('0', length - string.length) + string; +} + +function State(options) { + this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; + this.indent = Math.max(1, (options['indent'] || 2)); + this.skipInvalid = options['skipInvalid'] || false; + this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); + this.styleMap = compileStyleMap(this.schema, options['styles'] || null); + this.sortKeys = options['sortKeys'] || false; + this.lineWidth = options['lineWidth'] || 80; + this.noRefs = options['noRefs'] || false; + this.noCompatMode = options['noCompatMode'] || false; + this.condenseFlow = options['condenseFlow'] || false; + + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + + this.tag = null; + this.result = ''; + + this.duplicates = []; + this.usedDuplicates = null; +} + +// Indents every line in a string. Empty lines (\n only) are not indented. +function indentString(string, spaces) { + var ind = common.repeat(' ', spaces), + position = 0, + next = -1, + result = '', + line, + length = string.length; + + while (position < length) { + next = string.indexOf('\n', position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + + if (line.length && line !== '\n') result += ind; + + result += line; + } + + return result; +} + +function generateNextLine(state, level) { + return '\n' + common.repeat(' ', state.indent * level); +} + +function testImplicitResolving(state, str) { + var index, length, type; + + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type = state.implicitTypes[index]; + + if (type.resolve(str)) { + return true; + } + } + + return false; +} + +// [33] s-white ::= s-space | s-tab +function isWhitespace(c) { + return c === CHAR_SPACE || c === CHAR_TAB; +} + +// Returns true if the character can be printed without escaping. +// From YAML 1.2: "any allowed characters known to be non-printable +// should also be escaped. [However,] This isn’t mandatory" +// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. +function isPrintable(c) { + return (0x00020 <= c && c <= 0x00007E) + || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) + || ((0x0E000 <= c && c <= 0x00FFFD) && c !== 0xFEFF /* BOM */) + || (0x10000 <= c && c <= 0x10FFFF); +} + +// Simplified test for values allowed after the first character in plain style. +function isPlainSafe(c) { + // Uses a subset of nb-char - c-flow-indicator - ":" - "#" + // where nb-char ::= c-printable - b-char - c-byte-order-mark. + return isPrintable(c) && c !== 0xFEFF + // - c-flow-indicator + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + // - ":" - "#" + && c !== CHAR_COLON + && c !== CHAR_SHARP; +} + +// Simplified test for values allowed as the first character in plain style. +function isPlainSafeFirst(c) { + // Uses a subset of ns-char - c-indicator + // where ns-char = nb-char - s-white. + return isPrintable(c) && c !== 0xFEFF + && !isWhitespace(c) // - s-white + // - (c-indicator ::= + // “-†| “?†| “:†| “,†| “[†| “]†| “{†| “}†+ && c !== CHAR_MINUS + && c !== CHAR_QUESTION + && c !== CHAR_COLON + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + // | “#†| “&†| “*†| “!†| “|†| “>†| “'†| “"†+ && c !== CHAR_SHARP + && c !== CHAR_AMPERSAND + && c !== CHAR_ASTERISK + && c !== CHAR_EXCLAMATION + && c !== CHAR_VERTICAL_LINE + && c !== CHAR_GREATER_THAN + && c !== CHAR_SINGLE_QUOTE + && c !== CHAR_DOUBLE_QUOTE + // | “%†| “@†| “`â€) + && c !== CHAR_PERCENT + && c !== CHAR_COMMERCIAL_AT + && c !== CHAR_GRAVE_ACCENT; +} + +var STYLE_PLAIN = 1, + STYLE_SINGLE = 2, + STYLE_LITERAL = 3, + STYLE_FOLDED = 4, + STYLE_DOUBLE = 5; + +// Determines which scalar styles are possible and returns the preferred style. +// lineWidth = -1 => no limit. +// Pre-conditions: str.length > 0. +// Post-conditions: +// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. +// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). +// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). +function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) { + var i; + var char; + var hasLineBreak = false; + var hasFoldableLine = false; // only checked if shouldTrackWidth + var shouldTrackWidth = lineWidth !== -1; + var previousLineBreak = -1; // count the first line correctly + var plain = isPlainSafeFirst(string.charCodeAt(0)) + && !isWhitespace(string.charCodeAt(string.length - 1)); + + if (singleLineOnly) { + // Case: no block styles. + // Check for disallowed characters to rule out plain and single. + for (i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char); + } + } else { + // Case: block styles permitted. + for (i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + // Check if any line can be folded. + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || + // Foldable line = too long, and not more-indented. + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' '); + previousLineBreak = i; + } + } else if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char); + } + // in case the end is missing a \n + hasFoldableLine = hasFoldableLine || (shouldTrackWidth && + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' ')); + } + // Although every style can represent \n without escaping, prefer block styles + // for multiline, since they're more readable and they don't add empty lines. + // Also prefer folding a super-long line. + if (!hasLineBreak && !hasFoldableLine) { + // Strings interpretable as another type have to be quoted; + // e.g. the string 'true' vs. the boolean true. + return plain && !testAmbiguousType(string) + ? STYLE_PLAIN : STYLE_SINGLE; + } + // Edge case: block indentation indicator can only have one digit. + if (string[0] === ' ' && indentPerLevel > 9) { + return STYLE_DOUBLE; + } + // At this point we know block styles are valid. + // Prefer literal style unless we want to fold. + return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; +} + +// Note: line breaking/folding is implemented for only the folded style. +// NB. We drop the last trailing newline (if any) of a returned block scalar +// since the dumper adds its own newline. This always works: +// • No ending newline => unaffected; already using strip "-" chomping. +// • Ending newline => removed then restored. +// Importantly, this keeps the "+" chomp indicator from gaining an extra line. +function writeScalar(state, string, level, iskey) { + state.dump = (function () { + if (string.length === 0) { + return "''"; + } + if (!state.noCompatMode && + DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) { + return "'" + string + "'"; + } + + var indent = state.indent * Math.max(1, level); // no 0-indent scalars + // As indentation gets deeper, let the width decrease monotonically + // to the lower bound min(state.lineWidth, 40). + // Note that this implies + // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. + // state.lineWidth > 40 + state.indent: width decreases until the lower bound. + // This behaves better than a constant minimum width which disallows narrower options, + // or an indent threshold which causes the width to suddenly increase. + var lineWidth = state.lineWidth === -1 + ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); + + // Without knowing if keys are implicit/explicit, assume implicit for safety. + var singleLineOnly = iskey + // No block styles in flow mode. + || (state.flowLevel > -1 && level >= state.flowLevel); + function testAmbiguity(string) { + return testImplicitResolving(state, string); + } + + switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity)) { + case STYLE_PLAIN: + return string; + case STYLE_SINGLE: + return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: + return '|' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(string, indent)); + case STYLE_FOLDED: + return '>' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); + case STYLE_DOUBLE: + return '"' + escapeString(string, lineWidth) + '"'; + default: + throw new YAMLException('impossible error: invalid scalar style'); + } + }()); +} + +// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. +function blockHeader(string, indentPerLevel) { + var indentIndicator = (string[0] === ' ') ? String(indentPerLevel) : ''; + + // note the special case: the string '\n' counts as a "trailing" empty line. + var clip = string[string.length - 1] === '\n'; + var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); + var chomp = keep ? '+' : (clip ? '' : '-'); + + return indentIndicator + chomp + '\n'; +} + +// (See the note for writeScalar.) +function dropEndingNewline(string) { + return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; +} + +// Note: a long line without a suitable break point will exceed the width limit. +// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. +function foldString(string, width) { + // In folded style, $k$ consecutive newlines output as $k+1$ newlines— + // unless they're before or after a more-indented line, or at the very + // beginning or end, in which case $k$ maps to $k$. + // Therefore, parse each chunk as newline(s) followed by a content line. + var lineRe = /(\n+)([^\n]*)/g; + + // first line (possibly an empty line) + var result = (function () { + var nextLF = string.indexOf('\n'); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + }()); + // If we haven't reached the first content line yet, don't add an extra \n. + var prevMoreIndented = string[0] === '\n' || string[0] === ' '; + var moreIndented; + + // rest of the lines + var match; + while ((match = lineRe.exec(string))) { + var prefix = match[1], line = match[2]; + moreIndented = (line[0] === ' '); + result += prefix + + (!prevMoreIndented && !moreIndented && line !== '' + ? '\n' : '') + + foldLine(line, width); + prevMoreIndented = moreIndented; + } + + return result; +} + +// Greedy line breaking. +// Picks the longest line under the limit each time, +// otherwise settles for the shortest line over the limit. +// NB. More-indented lines *cannot* be folded, as that would add an extra \n. +function foldLine(line, width) { + if (line === '' || line[0] === ' ') return line; + + // Since a more-indented line adds a \n, breaks can't be followed by a space. + var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. + var match; + // start is an inclusive index. end, curr, and next are exclusive. + var start = 0, end, curr = 0, next = 0; + var result = ''; + + // Invariants: 0 <= start <= length-1. + // 0 <= curr <= next <= max(0, length-2). curr - start <= width. + // Inside the loop: + // A match implies length >= 2, so curr and next are <= length-2. + while ((match = breakRe.exec(line))) { + next = match.index; + // maintain invariant: curr - start <= width + if (next - start > width) { + end = (curr > start) ? curr : next; // derive end <= length-2 + result += '\n' + line.slice(start, end); + // skip the space that was output as \n + start = end + 1; // derive start <= length-1 + } + curr = next; + } + + // By the invariants, start <= length-1, so there is something left over. + // It is either the whole string or a part starting from non-whitespace. + result += '\n'; + // Insert a break if the remainder is too long and there is a break available. + if (line.length - start > width && curr > start) { + result += line.slice(start, curr) + '\n' + line.slice(curr + 1); + } else { + result += line.slice(start); + } + + return result.slice(1); // drop extra \n joiner +} + +// Escapes a double-quoted string. +function escapeString(string) { + var result = ''; + var char, nextChar; + var escapeSeq; + + for (var i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + // Check for surrogate pairs (reference Unicode 3.0 section "3.7 Surrogates"). + if (char >= 0xD800 && char <= 0xDBFF/* high surrogate */) { + nextChar = string.charCodeAt(i + 1); + if (nextChar >= 0xDC00 && nextChar <= 0xDFFF/* low surrogate */) { + // Combine the surrogate pair and store it escaped. + result += encodeHex((char - 0xD800) * 0x400 + nextChar - 0xDC00 + 0x10000); + // Advance index one extra since we already used that char here. + i++; continue; + } + } + escapeSeq = ESCAPE_SEQUENCES[char]; + result += !escapeSeq && isPrintable(char) + ? string[i] + : escapeSeq || encodeHex(char); + } + + return result; +} + +function writeFlowSequence(state, level, object) { + var _result = '', + _tag = state.tag, + index, + length; + + for (index = 0, length = object.length; index < length; index += 1) { + // Write only valid elements. + if (writeNode(state, level, object[index], false, false)) { + if (index !== 0) _result += ',' + (!state.condenseFlow ? ' ' : ''); + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = '[' + _result + ']'; +} + +function writeBlockSequence(state, level, object, compact) { + var _result = '', + _tag = state.tag, + index, + length; + + for (index = 0, length = object.length; index < length; index += 1) { + // Write only valid elements. + if (writeNode(state, level + 1, object[index], true, true)) { + if (!compact || index !== 0) { + _result += generateNextLine(state, level); + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + _result += '-'; + } else { + _result += '- '; + } + + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = _result || '[]'; // Empty sequence if no valid values. +} + +function writeFlowMapping(state, level, object) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + pairBuffer; + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = state.condenseFlow ? '"' : ''; + + if (index !== 0) pairBuffer += ', '; + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (!writeNode(state, level, objectKey, false, false)) { + continue; // Skip this pair because of invalid key; + } + + if (state.dump.length > 1024) pairBuffer += '? '; + + pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' '); + + if (!writeNode(state, level, objectValue, false, false)) { + continue; // Skip this pair because of invalid value. + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = '{' + _result + '}'; +} + +function writeBlockMapping(state, level, object, compact) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + explicitPair, + pairBuffer; + + // Allow sorting keys so that the output file is deterministic + if (state.sortKeys === true) { + // Default sorting + objectKeyList.sort(); + } else if (typeof state.sortKeys === 'function') { + // Custom sort function + objectKeyList.sort(state.sortKeys); + } else if (state.sortKeys) { + // Something is wrong + throw new YAMLException('sortKeys must be a boolean or a function'); + } + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ''; + + if (!compact || index !== 0) { + pairBuffer += generateNextLine(state, level); + } + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (!writeNode(state, level + 1, objectKey, true, true, true)) { + continue; // Skip this pair because of invalid key. + } + + explicitPair = (state.tag !== null && state.tag !== '?') || + (state.dump && state.dump.length > 1024); + + if (explicitPair) { + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += '?'; + } else { + pairBuffer += '? '; + } + } + + pairBuffer += state.dump; + + if (explicitPair) { + pairBuffer += generateNextLine(state, level); + } + + if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { + continue; // Skip this pair because of invalid value. + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += ':'; + } else { + pairBuffer += ': '; + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = _result || '{}'; // Empty mapping if no valid pairs. +} + +function detectType(state, object, explicit) { + var _result, typeList, index, length, type, style; + + typeList = explicit ? state.explicitTypes : state.implicitTypes; + + for (index = 0, length = typeList.length; index < length; index += 1) { + type = typeList[index]; + + if ((type.instanceOf || type.predicate) && + (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && + (!type.predicate || type.predicate(object))) { + + state.tag = explicit ? type.tag : '?'; + + if (type.represent) { + style = state.styleMap[type.tag] || type.defaultStyle; + + if (_toString.call(type.represent) === '[object Function]') { + _result = type.represent(object, style); + } else if (_hasOwnProperty.call(type.represent, style)) { + _result = type.represent[style](object, style); + } else { + throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); + } + + state.dump = _result; + } + + return true; + } + } + + return false; +} + +// Serializes `object` and writes it to global `result`. +// Returns true on success, or false on invalid object. +// +function writeNode(state, level, object, block, compact, iskey) { + state.tag = null; + state.dump = object; + + if (!detectType(state, object, false)) { + detectType(state, object, true); + } + + var type = _toString.call(state.dump); + + if (block) { + block = (state.flowLevel < 0 || state.flowLevel > level); + } + + var objectOrArray = type === '[object Object]' || type === '[object Array]', + duplicateIndex, + duplicate; + + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + + if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { + compact = false; + } + + if (duplicate && state.usedDuplicates[duplicateIndex]) { + state.dump = '*ref_' + duplicateIndex; + } else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { + state.usedDuplicates[duplicateIndex] = true; + } + if (type === '[object Object]') { + if (block && (Object.keys(state.dump).length !== 0)) { + writeBlockMapping(state, level, state.dump, compact); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowMapping(state, level, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object Array]') { + if (block && (state.dump.length !== 0)) { + writeBlockSequence(state, level, state.dump, compact); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowSequence(state, level, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object String]') { + if (state.tag !== '?') { + writeScalar(state, state.dump, level, iskey); + } + } else { + if (state.skipInvalid) return false; + throw new YAMLException('unacceptable kind of an object to dump ' + type); + } + + if (state.tag !== null && state.tag !== '?') { + state.dump = '!<' + state.tag + '> ' + state.dump; + } + } + + return true; +} + +function getDuplicateReferences(object, state) { + var objects = [], + duplicatesIndexes = [], + index, + length; + + inspectNode(object, objects, duplicatesIndexes); + + for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { + state.duplicates.push(objects[duplicatesIndexes[index]]); + } + state.usedDuplicates = new Array(length); +} + +function inspectNode(object, objects, duplicatesIndexes) { + var objectKeyList, + index, + length; + + if (object !== null && typeof object === 'object') { + index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) { + duplicatesIndexes.push(index); + } + } else { + objects.push(object); + + if (Array.isArray(object)) { + for (index = 0, length = object.length; index < length; index += 1) { + inspectNode(object[index], objects, duplicatesIndexes); + } + } else { + objectKeyList = Object.keys(object); + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + } + } + } + } +} + +function dump(input, options) { + options = options || {}; + + var state = new State(options); + + if (!state.noRefs) getDuplicateReferences(input, state); + + if (writeNode(state, 0, input, true, true)) return state.dump + '\n'; + + return ''; +} + +function safeDump(input, options) { + return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); +} + +module.exports.dump = dump; +module.exports.safeDump = safeDump; diff --git a/node_modules/js-yaml/lib/js-yaml/exception.js b/node_modules/js-yaml/lib/js-yaml/exception.js new file mode 100644 index 0000000..b744a1e --- /dev/null +++ b/node_modules/js-yaml/lib/js-yaml/exception.js @@ -0,0 +1,43 @@ +// YAML error class. http://stackoverflow.com/questions/8458984 +// +'use strict'; + +function YAMLException(reason, mark) { + // Super constructor + Error.call(this); + + this.name = 'YAMLException'; + this.reason = reason; + this.mark = mark; + this.message = (this.reason || '(unknown reason)') + (this.mark ? ' ' + this.mark.toString() : ''); + + // Include stack trace in error object + if (Error.captureStackTrace) { + // Chrome and NodeJS + Error.captureStackTrace(this, this.constructor); + } else { + // FF, IE 10+ and Safari 6+. Fallback for others + this.stack = (new Error()).stack || ''; + } +} + + +// Inherit from Error +YAMLException.prototype = Object.create(Error.prototype); +YAMLException.prototype.constructor = YAMLException; + + +YAMLException.prototype.toString = function toString(compact) { + var result = this.name + ': '; + + result += this.reason || '(unknown reason)'; + + if (!compact && this.mark) { + result += ' ' + this.mark.toString(); + } + + return result; +}; + + +module.exports = YAMLException; diff --git a/node_modules/js-yaml/lib/js-yaml/loader.js b/node_modules/js-yaml/lib/js-yaml/loader.js new file mode 100644 index 0000000..fe2cb4d --- /dev/null +++ b/node_modules/js-yaml/lib/js-yaml/loader.js @@ -0,0 +1,1598 @@ +'use strict'; + +/*eslint-disable max-len,no-use-before-define*/ + +var common = require('./common'); +var YAMLException = require('./exception'); +var Mark = require('./mark'); +var DEFAULT_SAFE_SCHEMA = require('./schema/default_safe'); +var DEFAULT_FULL_SCHEMA = require('./schema/default_full'); + + +var _hasOwnProperty = Object.prototype.hasOwnProperty; + + +var CONTEXT_FLOW_IN = 1; +var CONTEXT_FLOW_OUT = 2; +var CONTEXT_BLOCK_IN = 3; +var CONTEXT_BLOCK_OUT = 4; + + +var CHOMPING_CLIP = 1; +var CHOMPING_STRIP = 2; +var CHOMPING_KEEP = 3; + + +var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; +var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; +var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; +var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; +var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + + +function is_EOL(c) { + return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); +} + +function is_WHITE_SPACE(c) { + return (c === 0x09/* Tab */) || (c === 0x20/* Space */); +} + +function is_WS_OR_EOL(c) { + return (c === 0x09/* Tab */) || + (c === 0x20/* Space */) || + (c === 0x0A/* LF */) || + (c === 0x0D/* CR */); +} + +function is_FLOW_INDICATOR(c) { + return c === 0x2C/* , */ || + c === 0x5B/* [ */ || + c === 0x5D/* ] */ || + c === 0x7B/* { */ || + c === 0x7D/* } */; +} + +function fromHexCode(c) { + var lc; + + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + /*eslint-disable no-bitwise*/ + lc = c | 0x20; + + if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { + return lc - 0x61 + 10; + } + + return -1; +} + +function escapedHexLen(c) { + if (c === 0x78/* x */) { return 2; } + if (c === 0x75/* u */) { return 4; } + if (c === 0x55/* U */) { return 8; } + return 0; +} + +function fromDecimalCode(c) { + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + return -1; +} + +function simpleEscapeSequence(c) { + /* eslint-disable indent */ + return (c === 0x30/* 0 */) ? '\x00' : + (c === 0x61/* a */) ? '\x07' : + (c === 0x62/* b */) ? '\x08' : + (c === 0x74/* t */) ? '\x09' : + (c === 0x09/* Tab */) ? '\x09' : + (c === 0x6E/* n */) ? '\x0A' : + (c === 0x76/* v */) ? '\x0B' : + (c === 0x66/* f */) ? '\x0C' : + (c === 0x72/* r */) ? '\x0D' : + (c === 0x65/* e */) ? '\x1B' : + (c === 0x20/* Space */) ? ' ' : + (c === 0x22/* " */) ? '\x22' : + (c === 0x2F/* / */) ? '/' : + (c === 0x5C/* \ */) ? '\x5C' : + (c === 0x4E/* N */) ? '\x85' : + (c === 0x5F/* _ */) ? '\xA0' : + (c === 0x4C/* L */) ? '\u2028' : + (c === 0x50/* P */) ? '\u2029' : ''; +} + +function charFromCodepoint(c) { + if (c <= 0xFFFF) { + return String.fromCharCode(c); + } + // Encode UTF-16 surrogate pair + // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF + return String.fromCharCode( + ((c - 0x010000) >> 10) + 0xD800, + ((c - 0x010000) & 0x03FF) + 0xDC00 + ); +} + +var simpleEscapeCheck = new Array(256); // integer, for fast access +var simpleEscapeMap = new Array(256); +for (var i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); +} + + +function State(input, options) { + this.input = input; + + this.filename = options['filename'] || null; + this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; + this.onWarning = options['onWarning'] || null; + this.legacy = options['legacy'] || false; + this.json = options['json'] || false; + this.listener = options['listener'] || null; + + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + + this.documents = []; + + /* + this.version; + this.checkLineBreaks; + this.tagMap; + this.anchorMap; + this.tag; + this.anchor; + this.kind; + this.result;*/ + +} + + +function generateError(state, message) { + return new YAMLException( + message, + new Mark(state.filename, state.input, state.position, state.line, (state.position - state.lineStart))); +} + +function throwError(state, message) { + throw generateError(state, message); +} + +function throwWarning(state, message) { + if (state.onWarning) { + state.onWarning.call(null, generateError(state, message)); + } +} + + +var directiveHandlers = { + + YAML: function handleYamlDirective(state, name, args) { + + var match, major, minor; + + if (state.version !== null) { + throwError(state, 'duplication of %YAML directive'); + } + + if (args.length !== 1) { + throwError(state, 'YAML directive accepts exactly one argument'); + } + + match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + + if (match === null) { + throwError(state, 'ill-formed argument of the YAML directive'); + } + + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); + + if (major !== 1) { + throwError(state, 'unacceptable YAML version of the document'); + } + + state.version = args[0]; + state.checkLineBreaks = (minor < 2); + + if (minor !== 1 && minor !== 2) { + throwWarning(state, 'unsupported YAML version of the document'); + } + }, + + TAG: function handleTagDirective(state, name, args) { + + var handle, prefix; + + if (args.length !== 2) { + throwError(state, 'TAG directive accepts exactly two arguments'); + } + + handle = args[0]; + prefix = args[1]; + + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); + } + + if (_hasOwnProperty.call(state.tagMap, handle)) { + throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } + + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); + } + + state.tagMap[handle] = prefix; + } +}; + + +function captureSegment(state, start, end, checkJson) { + var _position, _length, _character, _result; + + if (start < end) { + _result = state.input.slice(start, end); + + if (checkJson) { + for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + if (!(_character === 0x09 || + (0x20 <= _character && _character <= 0x10FFFF))) { + throwError(state, 'expected valid JSON character'); + } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state, 'the stream contains non-printable characters'); + } + + state.result += _result; + } +} + +function mergeMappings(state, destination, source, overridableKeys) { + var sourceKeys, key, index, quantity; + + if (!common.isObject(source)) { + throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); + } + + sourceKeys = Object.keys(source); + + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key = sourceKeys[index]; + + if (!_hasOwnProperty.call(destination, key)) { + destination[key] = source[key]; + overridableKeys[key] = true; + } + } +} + +function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startPos) { + var index, quantity; + + keyNode = String(keyNode); + + if (_result === null) { + _result = {}; + } + + if (keyTag === 'tag:yaml.org,2002:merge') { + if (Array.isArray(valueNode)) { + for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { + mergeMappings(state, _result, valueNode[index], overridableKeys); + } + } else { + mergeMappings(state, _result, valueNode, overridableKeys); + } + } else { + if (!state.json && + !_hasOwnProperty.call(overridableKeys, keyNode) && + _hasOwnProperty.call(_result, keyNode)) { + state.line = startLine || state.line; + state.position = startPos || state.position; + throwError(state, 'duplicated mapping key'); + } + _result[keyNode] = valueNode; + delete overridableKeys[keyNode]; + } + + return _result; +} + +function readLineBreak(state) { + var ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x0A/* LF */) { + state.position++; + } else if (ch === 0x0D/* CR */) { + state.position++; + if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { + state.position++; + } + } else { + throwError(state, 'a line break is expected'); + } + + state.line += 1; + state.lineStart = state.position; +} + +function skipSeparationSpace(state, allowComments, checkIndent) { + var lineBreaks = 0, + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (allowComments && ch === 0x23/* # */) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); + } + + if (is_EOL(ch)) { + readLineBreak(state); + + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + + while (ch === 0x20/* Space */) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else { + break; + } + } + + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { + throwWarning(state, 'deficient indentation'); + } + + return lineBreaks; +} + +function testDocumentSeparator(state) { + var _position = state.position, + ch; + + ch = state.input.charCodeAt(_position); + + // Condition state.position === state.lineStart is tested + // in parent on each call, for efficiency. No needs to test here again. + if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && + ch === state.input.charCodeAt(_position + 1) && + ch === state.input.charCodeAt(_position + 2)) { + + _position += 3; + + ch = state.input.charCodeAt(_position); + + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; + } + } + + return false; +} + +function writeFoldedLines(state, count) { + if (count === 1) { + state.result += ' '; + } else if (count > 1) { + state.result += common.repeat('\n', count - 1); + } +} + + +function readPlainScalar(state, nodeIndent, withinFlowCollection) { + var preceding, + following, + captureStart, + captureEnd, + hasPendingContent, + _line, + _lineStart, + _lineIndent, + _kind = state.kind, + _result = state.result, + ch; + + ch = state.input.charCodeAt(state.position); + + if (is_WS_OR_EOL(ch) || + is_FLOW_INDICATOR(ch) || + ch === 0x23/* # */ || + ch === 0x26/* & */ || + ch === 0x2A/* * */ || + ch === 0x21/* ! */ || + ch === 0x7C/* | */ || + ch === 0x3E/* > */ || + ch === 0x27/* ' */ || + ch === 0x22/* " */ || + ch === 0x25/* % */ || + ch === 0x40/* @ */ || + ch === 0x60/* ` */) { + return false; + } + + if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; + } + } + + state.kind = 'scalar'; + state.result = ''; + captureStart = captureEnd = state.position; + hasPendingContent = false; + + while (ch !== 0) { + if (ch === 0x3A/* : */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + break; + } + + } else if (ch === 0x23/* # */) { + preceding = state.input.charCodeAt(state.position - 1); + + if (is_WS_OR_EOL(preceding)) { + break; + } + + } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || + withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; + + } else if (is_EOL(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); + + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } + + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } + + if (!is_WHITE_SPACE(ch)) { + captureEnd = state.position + 1; + } + + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, captureEnd, false); + + if (state.result) { + return true; + } + + state.kind = _kind; + state.result = _result; + return false; +} + +function readSingleQuotedScalar(state, nodeIndent) { + var ch, + captureStart, captureEnd; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x27/* ' */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x27/* ' */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x27/* ' */) { + captureStart = state.position; + state.position++; + captureEnd = state.position; + } else { + return true; + } + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a single quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a single quoted scalar'); +} + +function readDoubleQuotedScalar(state, nodeIndent) { + var captureStart, + captureEnd, + hexLength, + hexResult, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x22/* " */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x22/* " */) { + captureSegment(state, captureStart, state.position, true); + state.position++; + return true; + + } else if (ch === 0x5C/* \ */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (is_EOL(ch)) { + skipSeparationSpace(state, false, nodeIndent); + + // TODO: rework to inline fn with no type cast? + } else if (ch < 256 && simpleEscapeCheck[ch]) { + state.result += simpleEscapeMap[ch]; + state.position++; + + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + + } else { + throwError(state, 'expected hexadecimal character'); + } + } + + state.result += charFromCodepoint(hexResult); + + state.position++; + + } else { + throwError(state, 'unknown escape sequence'); + } + + captureStart = captureEnd = state.position; + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a double quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a double quoted scalar'); +} + +function readFlowCollection(state, nodeIndent) { + var readNext = true, + _line, + _tag = state.tag, + _result, + _anchor = state.anchor, + following, + terminator, + isPair, + isExplicitPair, + isMapping, + overridableKeys = {}, + keyNode, + keyTag, + valueNode, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x5B/* [ */) { + terminator = 0x5D;/* ] */ + isMapping = false; + _result = []; + } else if (ch === 0x7B/* { */) { + terminator = 0x7D;/* } */ + isMapping = true; + _result = {}; + } else { + return false; + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(++state.position); + + while (ch !== 0) { + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? 'mapping' : 'sequence'; + state.result = _result; + return true; + } else if (!readNext) { + throwError(state, 'missed comma between flow collection entries'); + } + + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + + if (ch === 0x3F/* ? */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } + + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } + + if (isMapping) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode); + } else if (isPair) { + _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode)); + } else { + _result.push(keyNode); + } + + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x2C/* , */) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else { + readNext = false; + } + } + + throwError(state, 'unexpected end of the stream within a flow collection'); +} + +function readBlockScalar(state, nodeIndent) { + var captureStart, + folding, + chomping = CHOMPING_CLIP, + didReadContent = false, + detectedIndent = false, + textIndent = nodeIndent, + emptyLines = 0, + atMoreIndented = false, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x7C/* | */) { + folding = false; + } else if (ch === 0x3E/* > */) { + folding = true; + } else { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + + while (ch !== 0) { + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { + if (CHOMPING_CLIP === chomping) { + chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state, 'repeat of a chomping mode identifier'); + } + + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state, 'repeat of an indentation width identifier'); + } + + } else { + break; + } + } + + if (is_WHITE_SPACE(ch)) { + do { ch = state.input.charCodeAt(++state.position); } + while (is_WHITE_SPACE(ch)); + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (!is_EOL(ch) && (ch !== 0)); + } + } + + while (ch !== 0) { + readLineBreak(state); + state.lineIndent = 0; + + ch = state.input.charCodeAt(state.position); + + while ((!detectedIndent || state.lineIndent < textIndent) && + (ch === 0x20/* Space */)) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + + if (!detectedIndent && state.lineIndent > textIndent) { + textIndent = state.lineIndent; + } + + if (is_EOL(ch)) { + emptyLines++; + continue; + } + + // End of the scalar. + if (state.lineIndent < textIndent) { + + // Perform the chomping. + if (chomping === CHOMPING_KEEP) { + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (didReadContent) { // i.e. only if the scalar is not empty. + state.result += '\n'; + } + } + + // Break this `while` cycle and go to the funciton's epilogue. + break; + } + + // Folded style: use fancy rules to handle line breaks. + if (folding) { + + // Lines starting with white space characters (more-indented lines) are not folded. + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + // except for the first content line (cf. Example 8.1) + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + + // End of more-indented block. + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common.repeat('\n', emptyLines + 1); + + // Just one line break - perceive as the same line. + } else if (emptyLines === 0) { + if (didReadContent) { // i.e. only if we have already read some scalar content. + state.result += ' '; + } + + // Several line breaks - perceive as different lines. + } else { + state.result += common.repeat('\n', emptyLines); + } + + // Literal style: just add exact number of line breaks between content lines. + } else { + // Keep all line breaks except the header line break. + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } + + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; + + while (!is_EOL(ch) && (ch !== 0)) { + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, state.position, false); + } + + return true; +} + +function readBlockSequence(state, nodeIndent) { + var _line, + _tag = state.tag, + _anchor = state.anchor, + _result = [], + following, + detected = false, + ch; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + + if (ch !== 0x2D/* - */) { + break; + } + + following = state.input.charCodeAt(state.position + 1); + + if (!is_WS_OR_EOL(following)) { + break; + } + + detected = true; + state.position++; + + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } + + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state.result); + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { + throwError(state, 'bad indentation of a sequence entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'sequence'; + state.result = _result; + return true; + } + return false; +} + +function readBlockMapping(state, nodeIndent, flowIndent) { + var following, + allowCompact, + _line, + _pos, + _tag = state.tag, + _anchor = state.anchor, + _result = {}, + overridableKeys = {}, + keyTag = null, + keyNode = null, + valueNode = null, + atExplicitKey = false, + detected = false, + ch; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + following = state.input.charCodeAt(state.position + 1); + _line = state.line; // Save the current line. + _pos = state.position; + + // + // Explicit notation case. There are two separate blocks: + // first for the key (denoted by "?") and second for the value (denoted by ":") + // + if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { + + if (ch === 0x3F/* ? */) { + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = true; + allowCompact = true; + + } else if (atExplicitKey) { + // i.e. 0x3A/* : */ === character after the explicit key. + atExplicitKey = false; + allowCompact = true; + + } else { + throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line'); + } + + state.position += 1; + ch = following; + + // + // Implicit notation case. Flow-style node as the key first, then ":", and the value. + // + } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { + + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x3A/* : */) { + ch = state.input.charCodeAt(++state.position); + + if (!is_WS_OR_EOL(ch)) { + throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); + } + + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + + } else if (detected) { + throwError(state, 'can not read an implicit mapping pair; a colon is missed'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + + } else if (detected) { + throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + + } else { + break; // Reading is done. Go to the epilogue. + } + + // + // Common reading code for both explicit and implicit notations. + // + if (state.line === _line || state.lineIndent > nodeIndent) { + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state.result; + } else { + valueNode = state.result; + } + } + + if (!atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _pos); + keyTag = keyNode = valueNode = null; + } + + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + + if (state.lineIndent > nodeIndent && (ch !== 0)) { + throwError(state, 'bad indentation of a mapping entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + // + // Epilogue. + // + + // Special case: last mapping's node contains only the key in explicit notation. + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + } + + // Expose the resulting mapping. + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'mapping'; + state.result = _result; + } + + return detected; +} + +function readTagProperty(state) { + var _position, + isVerbatim = false, + isNamed = false, + tagHandle, + tagName, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x21/* ! */) return false; + + if (state.tag !== null) { + throwError(state, 'duplication of a tag property'); + } + + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x3C/* < */) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + + } else if (ch === 0x21/* ! */) { + isNamed = true; + tagHandle = '!!'; + ch = state.input.charCodeAt(++state.position); + + } else { + tagHandle = '!'; + } + + _position = state.position; + + if (isVerbatim) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && ch !== 0x3E/* > */); + + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else { + throwError(state, 'unexpected end of the stream within a verbatim tag'); + } + } else { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + + if (ch === 0x21/* ! */) { + if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state, 'named tag handle cannot contain such characters'); + } + + isNamed = true; + _position = state.position + 1; + } else { + throwError(state, 'tag suffix cannot contain exclamation marks'); + } + } + + ch = state.input.charCodeAt(++state.position); + } + + tagName = state.input.slice(_position, state.position); + + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state, 'tag suffix cannot contain flow indicator characters'); + } + } + + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state, 'tag name cannot contain such characters: ' + tagName); + } + + if (isVerbatim) { + state.tag = tagName; + + } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { + state.tag = state.tagMap[tagHandle] + tagName; + + } else if (tagHandle === '!') { + state.tag = '!' + tagName; + + } else if (tagHandle === '!!') { + state.tag = 'tag:yaml.org,2002:' + tagName; + + } else { + throwError(state, 'undeclared tag handle "' + tagHandle + '"'); + } + + return true; +} + +function readAnchorProperty(state) { + var _position, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x26/* & */) return false; + + if (state.anchor !== null) { + throwError(state, 'duplication of an anchor property'); + } + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an anchor node must contain at least one character'); + } + + state.anchor = state.input.slice(_position, state.position); + return true; +} + +function readAlias(state) { + var _position, alias, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x2A/* * */) return false; + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an alias node must contain at least one character'); + } + + alias = state.input.slice(_position, state.position); + + if (!state.anchorMap.hasOwnProperty(alias)) { + throwError(state, 'unidentified alias "' + alias + '"'); + } + + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; +} + +function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, + allowBlockScalars, + allowBlockCollections, + indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + + if (indentStatus === 1) { + while (readTagProperty(state) || readAnchorProperty(state)) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + + blockIndent = state.position - state.lineStart; + + if (indentStatus === 1) { + if (allowBlockCollections && + (readBlockSequence(state, blockIndent) || + readBlockMapping(state, blockIndent, flowIndent)) || + readFlowCollection(state, flowIndent)) { + hasContent = true; + } else { + if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || + readSingleQuotedScalar(state, flowIndent) || + readDoubleQuotedScalar(state, flowIndent)) { + hasContent = true; + + } else if (readAlias(state)) { + hasContent = true; + + if (state.tag !== null || state.anchor !== null) { + throwError(state, 'alias node should not have any properties'); + } + + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + + if (state.tag === null) { + state.tag = '?'; + } + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else if (indentStatus === 0) { + // Special case: block sequences are allowed to have same indentation level as the parent. + // http://www.yaml.org/spec/1.2/spec.html#id2799784 + hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + } + + if (state.tag !== null && state.tag !== '!') { + if (state.tag === '?') { + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state.implicitTypes[typeIndex]; + + // Implicit resolving is not allowed for non-scalar types, and '?' + // non-specific tag is only assigned to plain scalars. So, it isn't + // needed to check for 'kind' conformity. + + if (type.resolve(state.result)) { // `state.result` updated in resolver if matched + state.result = type.construct(state.result); + state.tag = type.tag; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + break; + } + } + } else if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) { + type = state.typeMap[state.kind || 'fallback'][state.tag]; + + if (state.result !== null && type.kind !== state.kind) { + throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); + } + + if (!type.resolve(state.result)) { // `state.result` updated in resolver if matched + throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); + } else { + state.result = type.construct(state.result); + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else { + throwError(state, 'unknown tag !<' + state.tag + '>'); + } + } + + if (state.listener !== null) { + state.listener('close', state); + } + return state.tag !== null || state.anchor !== null || hasContent; +} + +function readDocument(state) { + var documentStart = state.position, + _position, + directiveName, + directiveArgs, + hasDirectives = false, + ch; + + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = {}; + state.anchorMap = {}; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if (state.lineIndent > 0 || ch !== 0x25/* % */) { + break; + } + + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + + if (directiveName.length < 1) { + throwError(state, 'directive name must not be less than one character in length'); + } + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && !is_EOL(ch)); + break; + } + + if (is_EOL(ch)) break; + + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveArgs.push(state.input.slice(_position, state.position)); + } + + if (ch !== 0) readLineBreak(state); + + if (_hasOwnProperty.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning(state, 'unknown document directive "' + directiveName + '"'); + } + } + + skipSeparationSpace(state, true, -1); + + if (state.lineIndent === 0 && + state.input.charCodeAt(state.position) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + + } else if (hasDirectives) { + throwError(state, 'directives end mark is expected'); + } + + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); + + if (state.checkLineBreaks && + PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { + throwWarning(state, 'non-ASCII line breaks are interpreted as content'); + } + + state.documents.push(state.result); + + if (state.position === state.lineStart && testDocumentSeparator(state)) { + + if (state.input.charCodeAt(state.position) === 0x2E/* . */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + return; + } + + if (state.position < (state.length - 1)) { + throwError(state, 'end of the stream or a document separator is expected'); + } else { + return; + } +} + + +function loadDocuments(input, options) { + input = String(input); + options = options || {}; + + if (input.length !== 0) { + + // Add tailing `\n` if not exists + if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && + input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { + input += '\n'; + } + + // Strip BOM + if (input.charCodeAt(0) === 0xFEFF) { + input = input.slice(1); + } + } + + var state = new State(input, options); + + // Use 0 as string terminator. That significantly simplifies bounds check. + state.input += '\0'; + + while (state.input.charCodeAt(state.position) === 0x20/* Space */) { + state.lineIndent += 1; + state.position += 1; + } + + while (state.position < (state.length - 1)) { + readDocument(state); + } + + return state.documents; +} + + +function loadAll(input, iterator, options) { + var documents = loadDocuments(input, options), index, length; + + if (typeof iterator !== 'function') { + return documents; + } + + for (index = 0, length = documents.length; index < length; index += 1) { + iterator(documents[index]); + } +} + + +function load(input, options) { + var documents = loadDocuments(input, options); + + if (documents.length === 0) { + /*eslint-disable no-undefined*/ + return undefined; + } else if (documents.length === 1) { + return documents[0]; + } + throw new YAMLException('expected a single document in the stream, but found more'); +} + + +function safeLoadAll(input, output, options) { + if (typeof output === 'function') { + loadAll(input, output, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); + } else { + return loadAll(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); + } +} + + +function safeLoad(input, options) { + return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); +} + + +module.exports.loadAll = loadAll; +module.exports.load = load; +module.exports.safeLoadAll = safeLoadAll; +module.exports.safeLoad = safeLoad; diff --git a/node_modules/js-yaml/lib/js-yaml/mark.js b/node_modules/js-yaml/lib/js-yaml/mark.js new file mode 100644 index 0000000..47b265c --- /dev/null +++ b/node_modules/js-yaml/lib/js-yaml/mark.js @@ -0,0 +1,76 @@ +'use strict'; + + +var common = require('./common'); + + +function Mark(name, buffer, position, line, column) { + this.name = name; + this.buffer = buffer; + this.position = position; + this.line = line; + this.column = column; +} + + +Mark.prototype.getSnippet = function getSnippet(indent, maxLength) { + var head, start, tail, end, snippet; + + if (!this.buffer) return null; + + indent = indent || 4; + maxLength = maxLength || 75; + + head = ''; + start = this.position; + + while (start > 0 && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start - 1)) === -1) { + start -= 1; + if (this.position - start > (maxLength / 2 - 1)) { + head = ' ... '; + start += 5; + break; + } + } + + tail = ''; + end = this.position; + + while (end < this.buffer.length && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end)) === -1) { + end += 1; + if (end - this.position > (maxLength / 2 - 1)) { + tail = ' ... '; + end -= 5; + break; + } + } + + snippet = this.buffer.slice(start, end); + + return common.repeat(' ', indent) + head + snippet + tail + '\n' + + common.repeat(' ', indent + this.position - start + head.length) + '^'; +}; + + +Mark.prototype.toString = function toString(compact) { + var snippet, where = ''; + + if (this.name) { + where += 'in "' + this.name + '" '; + } + + where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1); + + if (!compact) { + snippet = this.getSnippet(); + + if (snippet) { + where += ':\n' + snippet; + } + } + + return where; +}; + + +module.exports = Mark; diff --git a/node_modules/js-yaml/lib/js-yaml/schema.js b/node_modules/js-yaml/lib/js-yaml/schema.js new file mode 100644 index 0000000..ca7cf47 --- /dev/null +++ b/node_modules/js-yaml/lib/js-yaml/schema.js @@ -0,0 +1,108 @@ +'use strict'; + +/*eslint-disable max-len*/ + +var common = require('./common'); +var YAMLException = require('./exception'); +var Type = require('./type'); + + +function compileList(schema, name, result) { + var exclude = []; + + schema.include.forEach(function (includedSchema) { + result = compileList(includedSchema, name, result); + }); + + schema[name].forEach(function (currentType) { + result.forEach(function (previousType, previousIndex) { + if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) { + exclude.push(previousIndex); + } + }); + + result.push(currentType); + }); + + return result.filter(function (type, index) { + return exclude.indexOf(index) === -1; + }); +} + + +function compileMap(/* lists... */) { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {} + }, index, length; + + function collectType(type) { + result[type.kind][type.tag] = result['fallback'][type.tag] = type; + } + + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); + } + return result; +} + + +function Schema(definition) { + this.include = definition.include || []; + this.implicit = definition.implicit || []; + this.explicit = definition.explicit || []; + + this.implicit.forEach(function (type) { + if (type.loadKind && type.loadKind !== 'scalar') { + throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); + } + }); + + this.compiledImplicit = compileList(this, 'implicit', []); + this.compiledExplicit = compileList(this, 'explicit', []); + this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit); +} + + +Schema.DEFAULT = null; + + +Schema.create = function createSchema() { + var schemas, types; + + switch (arguments.length) { + case 1: + schemas = Schema.DEFAULT; + types = arguments[0]; + break; + + case 2: + schemas = arguments[0]; + types = arguments[1]; + break; + + default: + throw new YAMLException('Wrong number of arguments for Schema.create function'); + } + + schemas = common.toArray(schemas); + types = common.toArray(types); + + if (!schemas.every(function (schema) { return schema instanceof Schema; })) { + throw new YAMLException('Specified list of super schemas (or a single Schema object) contains a non-Schema object.'); + } + + if (!types.every(function (type) { return type instanceof Type; })) { + throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); + } + + return new Schema({ + include: schemas, + explicit: types + }); +}; + + +module.exports = Schema; diff --git a/node_modules/js-yaml/lib/js-yaml/schema/core.js b/node_modules/js-yaml/lib/js-yaml/schema/core.js new file mode 100644 index 0000000..206daab --- /dev/null +++ b/node_modules/js-yaml/lib/js-yaml/schema/core.js @@ -0,0 +1,18 @@ +// Standard YAML's Core schema. +// http://www.yaml.org/spec/1.2/spec.html#id2804923 +// +// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. +// So, Core schema has no distinctions from JSON schema is JS-YAML. + + +'use strict'; + + +var Schema = require('../schema'); + + +module.exports = new Schema({ + include: [ + require('./json') + ] +}); diff --git a/node_modules/js-yaml/lib/js-yaml/schema/default_full.js b/node_modules/js-yaml/lib/js-yaml/schema/default_full.js new file mode 100644 index 0000000..a55ef42 --- /dev/null +++ b/node_modules/js-yaml/lib/js-yaml/schema/default_full.js @@ -0,0 +1,25 @@ +// JS-YAML's default schema for `load` function. +// It is not described in the YAML specification. +// +// This schema is based on JS-YAML's default safe schema and includes +// JavaScript-specific types: !!js/undefined, !!js/regexp and !!js/function. +// +// Also this schema is used as default base schema at `Schema.create` function. + + +'use strict'; + + +var Schema = require('../schema'); + + +module.exports = Schema.DEFAULT = new Schema({ + include: [ + require('./default_safe') + ], + explicit: [ + require('../type/js/undefined'), + require('../type/js/regexp'), + require('../type/js/function') + ] +}); diff --git a/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js b/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js new file mode 100644 index 0000000..11d89bb --- /dev/null +++ b/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js @@ -0,0 +1,28 @@ +// JS-YAML's default schema for `safeLoad` function. +// It is not described in the YAML specification. +// +// This schema is based on standard YAML's Core schema and includes most of +// extra types described at YAML tag repository. (http://yaml.org/type/) + + +'use strict'; + + +var Schema = require('../schema'); + + +module.exports = new Schema({ + include: [ + require('./core') + ], + implicit: [ + require('../type/timestamp'), + require('../type/merge') + ], + explicit: [ + require('../type/binary'), + require('../type/omap'), + require('../type/pairs'), + require('../type/set') + ] +}); diff --git a/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js b/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js new file mode 100644 index 0000000..b7a33eb --- /dev/null +++ b/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js @@ -0,0 +1,17 @@ +// Standard YAML's Failsafe schema. +// http://www.yaml.org/spec/1.2/spec.html#id2802346 + + +'use strict'; + + +var Schema = require('../schema'); + + +module.exports = new Schema({ + explicit: [ + require('../type/str'), + require('../type/seq'), + require('../type/map') + ] +}); diff --git a/node_modules/js-yaml/lib/js-yaml/schema/json.js b/node_modules/js-yaml/lib/js-yaml/schema/json.js new file mode 100644 index 0000000..5be3dbf --- /dev/null +++ b/node_modules/js-yaml/lib/js-yaml/schema/json.js @@ -0,0 +1,25 @@ +// Standard YAML's JSON schema. +// http://www.yaml.org/spec/1.2/spec.html#id2803231 +// +// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. +// So, this schema is not such strict as defined in the YAML specification. +// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc. + + +'use strict'; + + +var Schema = require('../schema'); + + +module.exports = new Schema({ + include: [ + require('./failsafe') + ], + implicit: [ + require('../type/null'), + require('../type/bool'), + require('../type/int'), + require('../type/float') + ] +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type.js b/node_modules/js-yaml/lib/js-yaml/type.js new file mode 100644 index 0000000..90b702a --- /dev/null +++ b/node_modules/js-yaml/lib/js-yaml/type.js @@ -0,0 +1,61 @@ +'use strict'; + +var YAMLException = require('./exception'); + +var TYPE_CONSTRUCTOR_OPTIONS = [ + 'kind', + 'resolve', + 'construct', + 'instanceOf', + 'predicate', + 'represent', + 'defaultStyle', + 'styleAliases' +]; + +var YAML_NODE_KINDS = [ + 'scalar', + 'sequence', + 'mapping' +]; + +function compileStyleAliases(map) { + var result = {}; + + if (map !== null) { + Object.keys(map).forEach(function (style) { + map[style].forEach(function (alias) { + result[String(alias)] = style; + }); + }); + } + + return result; +} + +function Type(tag, options) { + options = options || {}; + + Object.keys(options).forEach(function (name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + + // TODO: Add tag format check. + this.tag = tag; + this.kind = options['kind'] || null; + this.resolve = options['resolve'] || function () { return true; }; + this.construct = options['construct'] || function (data) { return data; }; + this.instanceOf = options['instanceOf'] || null; + this.predicate = options['predicate'] || null; + this.represent = options['represent'] || null; + this.defaultStyle = options['defaultStyle'] || null; + this.styleAliases = compileStyleAliases(options['styleAliases'] || null); + + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } +} + +module.exports = Type; diff --git a/node_modules/js-yaml/lib/js-yaml/type/binary.js b/node_modules/js-yaml/lib/js-yaml/type/binary.js new file mode 100644 index 0000000..10b1875 --- /dev/null +++ b/node_modules/js-yaml/lib/js-yaml/type/binary.js @@ -0,0 +1,138 @@ +'use strict'; + +/*eslint-disable no-bitwise*/ + +var NodeBuffer; + +try { + // A trick for browserified version, to not include `Buffer` shim + var _require = require; + NodeBuffer = _require('buffer').Buffer; +} catch (__) {} + +var Type = require('../type'); + + +// [ 64, 65, 66 ] -> [ padding, CR, LF ] +var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; + + +function resolveYamlBinary(data) { + if (data === null) return false; + + var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; + + // Convert one by one. + for (idx = 0; idx < max; idx++) { + code = map.indexOf(data.charAt(idx)); + + // Skip CR/LF + if (code > 64) continue; + + // Fail on illegal characters + if (code < 0) return false; + + bitlen += 6; + } + + // If there are any bits left, source was corrupted + return (bitlen % 8) === 0; +} + +function constructYamlBinary(data) { + var idx, tailbits, + input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan + max = input.length, + map = BASE64_MAP, + bits = 0, + result = []; + + // Collect by 6*4 bits (3 bytes) + + for (idx = 0; idx < max; idx++) { + if ((idx % 4 === 0) && idx) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } + + bits = (bits << 6) | map.indexOf(input.charAt(idx)); + } + + // Dump tail + + tailbits = (max % 4) * 6; + + if (tailbits === 0) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } else if (tailbits === 18) { + result.push((bits >> 10) & 0xFF); + result.push((bits >> 2) & 0xFF); + } else if (tailbits === 12) { + result.push((bits >> 4) & 0xFF); + } + + // Wrap into Buffer for NodeJS and leave Array for browser + if (NodeBuffer) { + // Support node 6.+ Buffer API when available + return NodeBuffer.from ? NodeBuffer.from(result) : new NodeBuffer(result); + } + + return result; +} + +function representYamlBinary(object /*, style*/) { + var result = '', bits = 0, idx, tail, + max = object.length, + map = BASE64_MAP; + + // Convert every three bytes to 4 ASCII characters. + + for (idx = 0; idx < max; idx++) { + if ((idx % 3 === 0) && idx) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } + + bits = (bits << 8) + object[idx]; + } + + // Dump tail + + tail = max % 3; + + if (tail === 0) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } else if (tail === 2) { + result += map[(bits >> 10) & 0x3F]; + result += map[(bits >> 4) & 0x3F]; + result += map[(bits << 2) & 0x3F]; + result += map[64]; + } else if (tail === 1) { + result += map[(bits >> 2) & 0x3F]; + result += map[(bits << 4) & 0x3F]; + result += map[64]; + result += map[64]; + } + + return result; +} + +function isBinary(object) { + return NodeBuffer && NodeBuffer.isBuffer(object); +} + +module.exports = new Type('tag:yaml.org,2002:binary', { + kind: 'scalar', + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/bool.js b/node_modules/js-yaml/lib/js-yaml/type/bool.js new file mode 100644 index 0000000..cb77459 --- /dev/null +++ b/node_modules/js-yaml/lib/js-yaml/type/bool.js @@ -0,0 +1,35 @@ +'use strict'; + +var Type = require('../type'); + +function resolveYamlBoolean(data) { + if (data === null) return false; + + var max = data.length; + + return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || + (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); +} + +function constructYamlBoolean(data) { + return data === 'true' || + data === 'True' || + data === 'TRUE'; +} + +function isBoolean(object) { + return Object.prototype.toString.call(object) === '[object Boolean]'; +} + +module.exports = new Type('tag:yaml.org,2002:bool', { + kind: 'scalar', + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function (object) { return object ? 'true' : 'false'; }, + uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, + camelcase: function (object) { return object ? 'True' : 'False'; } + }, + defaultStyle: 'lowercase' +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/float.js b/node_modules/js-yaml/lib/js-yaml/type/float.js new file mode 100644 index 0000000..127671b --- /dev/null +++ b/node_modules/js-yaml/lib/js-yaml/type/float.js @@ -0,0 +1,116 @@ +'use strict'; + +var common = require('../common'); +var Type = require('../type'); + +var YAML_FLOAT_PATTERN = new RegExp( + // 2.5e4, 2.5 and integers + '^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' + + // .2e4, .2 + // special case, seems not from spec + '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' + + // 20:59 + '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*' + + // .inf + '|[-+]?\\.(?:inf|Inf|INF)' + + // .nan + '|\\.(?:nan|NaN|NAN))$'); + +function resolveYamlFloat(data) { + if (data === null) return false; + + if (!YAML_FLOAT_PATTERN.test(data) || + // Quick hack to not allow integers end with `_` + // Probably should update regexp & check speed + data[data.length - 1] === '_') { + return false; + } + + return true; +} + +function constructYamlFloat(data) { + var value, sign, base, digits; + + value = data.replace(/_/g, '').toLowerCase(); + sign = value[0] === '-' ? -1 : 1; + digits = []; + + if ('+-'.indexOf(value[0]) >= 0) { + value = value.slice(1); + } + + if (value === '.inf') { + return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + + } else if (value === '.nan') { + return NaN; + + } else if (value.indexOf(':') >= 0) { + value.split(':').forEach(function (v) { + digits.unshift(parseFloat(v, 10)); + }); + + value = 0.0; + base = 1; + + digits.forEach(function (d) { + value += d * base; + base *= 60; + }); + + return sign * value; + + } + return sign * parseFloat(value, 10); +} + + +var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + +function representYamlFloat(object, style) { + var res; + + if (isNaN(object)) { + switch (style) { + case 'lowercase': return '.nan'; + case 'uppercase': return '.NAN'; + case 'camelcase': return '.NaN'; + } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '.inf'; + case 'uppercase': return '.INF'; + case 'camelcase': return '.Inf'; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '-.inf'; + case 'uppercase': return '-.INF'; + case 'camelcase': return '-.Inf'; + } + } else if (common.isNegativeZero(object)) { + return '-0.0'; + } + + res = object.toString(10); + + // JS stringifier can build scientific format without dots: 5e-100, + // while YAML requres dot: 5.e-100. Fix it with simple hack + + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; +} + +function isFloat(object) { + return (Object.prototype.toString.call(object) === '[object Number]') && + (object % 1 !== 0 || common.isNegativeZero(object)); +} + +module.exports = new Type('tag:yaml.org,2002:float', { + kind: 'scalar', + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: 'lowercase' +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/int.js b/node_modules/js-yaml/lib/js-yaml/type/int.js new file mode 100644 index 0000000..4ae522a --- /dev/null +++ b/node_modules/js-yaml/lib/js-yaml/type/int.js @@ -0,0 +1,172 @@ +'use strict'; + +var common = require('../common'); +var Type = require('../type'); + +function isHexCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || + ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || + ((0x61/* a */ <= c) && (c <= 0x66/* f */)); +} + +function isOctCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); +} + +function isDecCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); +} + +function resolveYamlInteger(data) { + if (data === null) return false; + + var max = data.length, + index = 0, + hasDigits = false, + ch; + + if (!max) return false; + + ch = data[index]; + + // sign + if (ch === '-' || ch === '+') { + ch = data[++index]; + } + + if (ch === '0') { + // 0 + if (index + 1 === max) return true; + ch = data[++index]; + + // base 2, base 8, base 16 + + if (ch === 'b') { + // base 2 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (ch !== '0' && ch !== '1') return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + + if (ch === 'x') { + // base 16 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isHexCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + // base 8 + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isOctCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + // base 10 (except 0) or base 60 + + // value should not start with `_`; + if (ch === '_') return false; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (ch === ':') break; + if (!isDecCode(data.charCodeAt(index))) { + return false; + } + hasDigits = true; + } + + // Should have digits and should not end with `_` + if (!hasDigits || ch === '_') return false; + + // if !base60 - done; + if (ch !== ':') return true; + + // base60 almost not used, no needs to optimize + return /^(:[0-5]?[0-9])+$/.test(data.slice(index)); +} + +function constructYamlInteger(data) { + var value = data, sign = 1, ch, base, digits = []; + + if (value.indexOf('_') !== -1) { + value = value.replace(/_/g, ''); + } + + ch = value[0]; + + if (ch === '-' || ch === '+') { + if (ch === '-') sign = -1; + value = value.slice(1); + ch = value[0]; + } + + if (value === '0') return 0; + + if (ch === '0') { + if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); + if (value[1] === 'x') return sign * parseInt(value, 16); + return sign * parseInt(value, 8); + } + + if (value.indexOf(':') !== -1) { + value.split(':').forEach(function (v) { + digits.unshift(parseInt(v, 10)); + }); + + value = 0; + base = 1; + + digits.forEach(function (d) { + value += (d * base); + base *= 60; + }); + + return sign * value; + + } + + return sign * parseInt(value, 10); +} + +function isInteger(object) { + return (Object.prototype.toString.call(object)) === '[object Number]' && + (object % 1 === 0 && !common.isNegativeZero(object)); +} + +module.exports = new Type('tag:yaml.org,2002:int', { + kind: 'scalar', + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function (object) { return '0b' + object.toString(2); }, + octal: function (object) { return '0' + object.toString(8); }, + decimal: function (object) { return object.toString(10); }, + hexadecimal: function (object) { return '0x' + object.toString(16).toUpperCase(); } + }, + defaultStyle: 'decimal', + styleAliases: { + binary: [ 2, 'bin' ], + octal: [ 8, 'oct' ], + decimal: [ 10, 'dec' ], + hexadecimal: [ 16, 'hex' ] + } +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/js/function.js b/node_modules/js-yaml/lib/js-yaml/type/js/function.js new file mode 100644 index 0000000..c6a42d0 --- /dev/null +++ b/node_modules/js-yaml/lib/js-yaml/type/js/function.js @@ -0,0 +1,84 @@ +'use strict'; + +var esprima; + +// Browserified version does not have esprima +// +// 1. For node.js just require module as deps +// 2. For browser try to require mudule via external AMD system. +// If not found - try to fallback to window.esprima. If not +// found too - then fail to parse. +// +try { + // workaround to exclude package from browserify list. + var _require = require; + esprima = _require('esprima'); +} catch (_) { + /*global window */ + if (typeof window !== 'undefined') esprima = window.esprima; +} + +var Type = require('../../type'); + +function resolveJavascriptFunction(data) { + if (data === null) return false; + + try { + var source = '(' + data + ')', + ast = esprima.parse(source, { range: true }); + + if (ast.type !== 'Program' || + ast.body.length !== 1 || + ast.body[0].type !== 'ExpressionStatement' || + ast.body[0].expression.type !== 'FunctionExpression') { + return false; + } + + return true; + } catch (err) { + return false; + } +} + +function constructJavascriptFunction(data) { + /*jslint evil:true*/ + + var source = '(' + data + ')', + ast = esprima.parse(source, { range: true }), + params = [], + body; + + if (ast.type !== 'Program' || + ast.body.length !== 1 || + ast.body[0].type !== 'ExpressionStatement' || + ast.body[0].expression.type !== 'FunctionExpression') { + throw new Error('Failed to resolve function'); + } + + ast.body[0].expression.params.forEach(function (param) { + params.push(param.name); + }); + + body = ast.body[0].expression.body.range; + + // Esprima's ranges include the first '{' and the last '}' characters on + // function expressions. So cut them out. + /*eslint-disable no-new-func*/ + return new Function(params, source.slice(body[0] + 1, body[1] - 1)); +} + +function representJavascriptFunction(object /*, style*/) { + return object.toString(); +} + +function isFunction(object) { + return Object.prototype.toString.call(object) === '[object Function]'; +} + +module.exports = new Type('tag:yaml.org,2002:js/function', { + kind: 'scalar', + resolve: resolveJavascriptFunction, + construct: constructJavascriptFunction, + predicate: isFunction, + represent: representJavascriptFunction +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js b/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js new file mode 100644 index 0000000..43fa470 --- /dev/null +++ b/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js @@ -0,0 +1,60 @@ +'use strict'; + +var Type = require('../../type'); + +function resolveJavascriptRegExp(data) { + if (data === null) return false; + if (data.length === 0) return false; + + var regexp = data, + tail = /\/([gim]*)$/.exec(data), + modifiers = ''; + + // if regexp starts with '/' it can have modifiers and must be properly closed + // `/foo/gim` - modifiers tail can be maximum 3 chars + if (regexp[0] === '/') { + if (tail) modifiers = tail[1]; + + if (modifiers.length > 3) return false; + // if expression starts with /, is should be properly terminated + if (regexp[regexp.length - modifiers.length - 1] !== '/') return false; + } + + return true; +} + +function constructJavascriptRegExp(data) { + var regexp = data, + tail = /\/([gim]*)$/.exec(data), + modifiers = ''; + + // `/foo/gim` - tail can be maximum 4 chars + if (regexp[0] === '/') { + if (tail) modifiers = tail[1]; + regexp = regexp.slice(1, regexp.length - modifiers.length - 1); + } + + return new RegExp(regexp, modifiers); +} + +function representJavascriptRegExp(object /*, style*/) { + var result = '/' + object.source + '/'; + + if (object.global) result += 'g'; + if (object.multiline) result += 'm'; + if (object.ignoreCase) result += 'i'; + + return result; +} + +function isRegExp(object) { + return Object.prototype.toString.call(object) === '[object RegExp]'; +} + +module.exports = new Type('tag:yaml.org,2002:js/regexp', { + kind: 'scalar', + resolve: resolveJavascriptRegExp, + construct: constructJavascriptRegExp, + predicate: isRegExp, + represent: representJavascriptRegExp +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js b/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js new file mode 100644 index 0000000..95b5569 --- /dev/null +++ b/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js @@ -0,0 +1,28 @@ +'use strict'; + +var Type = require('../../type'); + +function resolveJavascriptUndefined() { + return true; +} + +function constructJavascriptUndefined() { + /*eslint-disable no-undefined*/ + return undefined; +} + +function representJavascriptUndefined() { + return ''; +} + +function isUndefined(object) { + return typeof object === 'undefined'; +} + +module.exports = new Type('tag:yaml.org,2002:js/undefined', { + kind: 'scalar', + resolve: resolveJavascriptUndefined, + construct: constructJavascriptUndefined, + predicate: isUndefined, + represent: representJavascriptUndefined +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/map.js b/node_modules/js-yaml/lib/js-yaml/type/map.js new file mode 100644 index 0000000..f327bee --- /dev/null +++ b/node_modules/js-yaml/lib/js-yaml/type/map.js @@ -0,0 +1,8 @@ +'use strict'; + +var Type = require('../type'); + +module.exports = new Type('tag:yaml.org,2002:map', { + kind: 'mapping', + construct: function (data) { return data !== null ? data : {}; } +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/merge.js b/node_modules/js-yaml/lib/js-yaml/type/merge.js new file mode 100644 index 0000000..ae08a86 --- /dev/null +++ b/node_modules/js-yaml/lib/js-yaml/type/merge.js @@ -0,0 +1,12 @@ +'use strict'; + +var Type = require('../type'); + +function resolveYamlMerge(data) { + return data === '<<' || data === null; +} + +module.exports = new Type('tag:yaml.org,2002:merge', { + kind: 'scalar', + resolve: resolveYamlMerge +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/null.js b/node_modules/js-yaml/lib/js-yaml/type/null.js new file mode 100644 index 0000000..6874daa --- /dev/null +++ b/node_modules/js-yaml/lib/js-yaml/type/null.js @@ -0,0 +1,34 @@ +'use strict'; + +var Type = require('../type'); + +function resolveYamlNull(data) { + if (data === null) return true; + + var max = data.length; + + return (max === 1 && data === '~') || + (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); +} + +function constructYamlNull() { + return null; +} + +function isNull(object) { + return object === null; +} + +module.exports = new Type('tag:yaml.org,2002:null', { + kind: 'scalar', + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function () { return '~'; }, + lowercase: function () { return 'null'; }, + uppercase: function () { return 'NULL'; }, + camelcase: function () { return 'Null'; } + }, + defaultStyle: 'lowercase' +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/omap.js b/node_modules/js-yaml/lib/js-yaml/type/omap.js new file mode 100644 index 0000000..b2b5323 --- /dev/null +++ b/node_modules/js-yaml/lib/js-yaml/type/omap.js @@ -0,0 +1,44 @@ +'use strict'; + +var Type = require('../type'); + +var _hasOwnProperty = Object.prototype.hasOwnProperty; +var _toString = Object.prototype.toString; + +function resolveYamlOmap(data) { + if (data === null) return true; + + var objectKeys = [], index, length, pair, pairKey, pairHasKey, + object = data; + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + pairHasKey = false; + + if (_toString.call(pair) !== '[object Object]') return false; + + for (pairKey in pair) { + if (_hasOwnProperty.call(pair, pairKey)) { + if (!pairHasKey) pairHasKey = true; + else return false; + } + } + + if (!pairHasKey) return false; + + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); + else return false; + } + + return true; +} + +function constructYamlOmap(data) { + return data !== null ? data : []; +} + +module.exports = new Type('tag:yaml.org,2002:omap', { + kind: 'sequence', + resolve: resolveYamlOmap, + construct: constructYamlOmap +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/pairs.js b/node_modules/js-yaml/lib/js-yaml/type/pairs.js new file mode 100644 index 0000000..74b5240 --- /dev/null +++ b/node_modules/js-yaml/lib/js-yaml/type/pairs.js @@ -0,0 +1,53 @@ +'use strict'; + +var Type = require('../type'); + +var _toString = Object.prototype.toString; + +function resolveYamlPairs(data) { + if (data === null) return true; + + var index, length, pair, keys, result, + object = data; + + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + + if (_toString.call(pair) !== '[object Object]') return false; + + keys = Object.keys(pair); + + if (keys.length !== 1) return false; + + result[index] = [ keys[0], pair[keys[0]] ]; + } + + return true; +} + +function constructYamlPairs(data) { + if (data === null) return []; + + var index, length, pair, keys, result, + object = data; + + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + + keys = Object.keys(pair); + + result[index] = [ keys[0], pair[keys[0]] ]; + } + + return result; +} + +module.exports = new Type('tag:yaml.org,2002:pairs', { + kind: 'sequence', + resolve: resolveYamlPairs, + construct: constructYamlPairs +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/seq.js b/node_modules/js-yaml/lib/js-yaml/type/seq.js new file mode 100644 index 0000000..be8f77f --- /dev/null +++ b/node_modules/js-yaml/lib/js-yaml/type/seq.js @@ -0,0 +1,8 @@ +'use strict'; + +var Type = require('../type'); + +module.exports = new Type('tag:yaml.org,2002:seq', { + kind: 'sequence', + construct: function (data) { return data !== null ? data : []; } +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/set.js b/node_modules/js-yaml/lib/js-yaml/type/set.js new file mode 100644 index 0000000..f885a32 --- /dev/null +++ b/node_modules/js-yaml/lib/js-yaml/type/set.js @@ -0,0 +1,29 @@ +'use strict'; + +var Type = require('../type'); + +var _hasOwnProperty = Object.prototype.hasOwnProperty; + +function resolveYamlSet(data) { + if (data === null) return true; + + var key, object = data; + + for (key in object) { + if (_hasOwnProperty.call(object, key)) { + if (object[key] !== null) return false; + } + } + + return true; +} + +function constructYamlSet(data) { + return data !== null ? data : {}; +} + +module.exports = new Type('tag:yaml.org,2002:set', { + kind: 'mapping', + resolve: resolveYamlSet, + construct: constructYamlSet +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/str.js b/node_modules/js-yaml/lib/js-yaml/type/str.js new file mode 100644 index 0000000..27acc10 --- /dev/null +++ b/node_modules/js-yaml/lib/js-yaml/type/str.js @@ -0,0 +1,8 @@ +'use strict'; + +var Type = require('../type'); + +module.exports = new Type('tag:yaml.org,2002:str', { + kind: 'scalar', + construct: function (data) { return data !== null ? data : ''; } +}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/timestamp.js b/node_modules/js-yaml/lib/js-yaml/type/timestamp.js new file mode 100644 index 0000000..8fa9c58 --- /dev/null +++ b/node_modules/js-yaml/lib/js-yaml/type/timestamp.js @@ -0,0 +1,88 @@ +'use strict'; + +var Type = require('../type'); + +var YAML_DATE_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9])' + // [2] month + '-([0-9][0-9])$'); // [3] day + +var YAML_TIMESTAMP_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9]?)' + // [2] month + '-([0-9][0-9]?)' + // [3] day + '(?:[Tt]|[ \\t]+)' + // ... + '([0-9][0-9]?)' + // [4] hour + ':([0-9][0-9])' + // [5] minute + ':([0-9][0-9])' + // [6] second + '(?:\\.([0-9]*))?' + // [7] fraction + '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour + '(?::([0-9][0-9]))?))?$'); // [11] tz_minute + +function resolveYamlTimestamp(data) { + if (data === null) return false; + if (YAML_DATE_REGEXP.exec(data) !== null) return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; + return false; +} + +function constructYamlTimestamp(data) { + var match, year, month, day, hour, minute, second, fraction = 0, + delta = null, tz_hour, tz_minute, date; + + match = YAML_DATE_REGEXP.exec(data); + if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); + + if (match === null) throw new Error('Date resolve error'); + + // match: [1] year [2] month [3] day + + year = +(match[1]); + month = +(match[2]) - 1; // JS month starts with 0 + day = +(match[3]); + + if (!match[4]) { // no hour + return new Date(Date.UTC(year, month, day)); + } + + // match: [4] hour [5] minute [6] second [7] fraction + + hour = +(match[4]); + minute = +(match[5]); + second = +(match[6]); + + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) { // milli-seconds + fraction += '0'; + } + fraction = +fraction; + } + + // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute + + if (match[9]) { + tz_hour = +(match[10]); + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds + if (match[9] === '-') delta = -delta; + } + + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + + if (delta) date.setTime(date.getTime() - delta); + + return date; +} + +function representYamlTimestamp(object /*, style*/) { + return object.toISOString(); +} + +module.exports = new Type('tag:yaml.org,2002:timestamp', { + kind: 'scalar', + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp +}); diff --git a/node_modules/js-yaml/package.json b/node_modules/js-yaml/package.json new file mode 100644 index 0000000..cb132b3 --- /dev/null +++ b/node_modules/js-yaml/package.json @@ -0,0 +1,128 @@ +{ + "_args": [ + [ + { + "raw": "js-yaml@^3.9.1", + "scope": null, + "escapedName": "js-yaml", + "name": "js-yaml", + "rawSpec": "^3.9.1", + "spec": ">=3.9.1 <4.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint" + ] + ], + "_from": "js-yaml@>=3.9.1 <4.0.0", + "_id": "js-yaml@3.10.0", + "_inCache": true, + "_location": "/js-yaml", + "_nodeVersion": "8.4.0", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/js-yaml-3.10.0.tgz_1505117951321_0.05147904600016773" + }, + "_npmUser": { + "name": "vitaly", + "email": "vitaly@rcdesign.ru" + }, + "_npmVersion": "5.3.0", + "_phantomChildren": {}, + "_requested": { + "raw": "js-yaml@^3.9.1", + "scope": null, + "escapedName": "js-yaml", + "name": "js-yaml", + "rawSpec": "^3.9.1", + "spec": ">=3.9.1 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz", + "_shasum": "2e78441646bd4682e963f22b6e92823c309c62dc", + "_shrinkwrap": null, + "_spec": "js-yaml@^3.9.1", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint", + "author": { + "name": "Vladimir Zapparov", + "email": "dervus.grim@gmail.com" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + }, + "bugs": { + "url": "https://github.com/nodeca/js-yaml/issues" + }, + "contributors": [ + { + "name": "Aleksey V Zapparov", + "email": "ixti@member.fsf.org", + "url": "http://www.ixti.net/" + }, + { + "name": "Vitaly Puzrin", + "email": "vitaly@rcdesign.ru", + "url": "https://github.com/puzrin" + }, + { + "name": "Martin Grenfell", + "email": "martin.grenfell@gmail.com", + "url": "http://got-ravings.blogspot.com" + } + ], + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "description": "YAML 1.2 parser and serializer", + "devDependencies": { + "ansi": "^0.3.1", + "benchmark": "^2.1.4", + "browserify": "^14.3.0", + "codemirror": "^5.13.4", + "eslint": "^4.1.1", + "istanbul": "^0.4.5", + "mocha": "^3.3.0", + "uglify-js": "^3.0.1" + }, + "directories": {}, + "dist": { + "integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==", + "shasum": "2e78441646bd4682e963f22b6e92823c309c62dc", + "tarball": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz" + }, + "files": [ + "index.js", + "lib/", + "bin/", + "dist/" + ], + "gitHead": "42e7fcccf10c74fe157b1f8eb9d73c1c25c3c259", + "homepage": "https://github.com/nodeca/js-yaml", + "keywords": [ + "yaml", + "parser", + "serializer", + "pyyaml" + ], + "license": "MIT", + "maintainers": [ + { + "name": "vitaly", + "email": "vitaly@rcdesign.ru" + } + ], + "name": "js-yaml", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/nodeca/js-yaml.git" + }, + "scripts": { + "test": "make test" + }, + "version": "3.10.0" +} diff --git a/node_modules/json-schema-traverse/.eslintrc.yml b/node_modules/json-schema-traverse/.eslintrc.yml new file mode 100644 index 0000000..ab1762d --- /dev/null +++ b/node_modules/json-schema-traverse/.eslintrc.yml @@ -0,0 +1,27 @@ +extends: eslint:recommended +env: + node: true + browser: true +rules: + block-scoped-var: 2 + complexity: [2, 13] + curly: [2, multi-or-nest, consistent] + dot-location: [2, property] + dot-notation: 2 + indent: [2, 2, SwitchCase: 1] + linebreak-style: [2, unix] + new-cap: 2 + no-console: [2, allow: [warn, error]] + no-else-return: 2 + no-eq-null: 2 + no-fallthrough: 2 + no-invalid-this: 2 + no-return-assign: 2 + no-shadow: 1 + no-trailing-spaces: 2 + no-use-before-define: [2, nofunc] + quotes: [2, single, avoid-escape] + semi: [2, always] + strict: [2, global] + valid-jsdoc: [2, requireReturn: false] + no-control-regex: 0 diff --git a/node_modules/json-schema-traverse/.npmignore b/node_modules/json-schema-traverse/.npmignore new file mode 100644 index 0000000..d093557 --- /dev/null +++ b/node_modules/json-schema-traverse/.npmignore @@ -0,0 +1,60 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Typescript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + +.DS_Store diff --git a/node_modules/json-schema-traverse/.travis.yml b/node_modules/json-schema-traverse/.travis.yml new file mode 100644 index 0000000..7ddce74 --- /dev/null +++ b/node_modules/json-schema-traverse/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - "4" + - "6" + - "7" + - "8" +after_script: + - coveralls < coverage/lcov.info diff --git a/node_modules/json-schema-traverse/LICENSE b/node_modules/json-schema-traverse/LICENSE new file mode 100644 index 0000000..7f15435 --- /dev/null +++ b/node_modules/json-schema-traverse/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Evgeny Poberezkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/json-schema-traverse/README.md b/node_modules/json-schema-traverse/README.md new file mode 100644 index 0000000..d4286a2 --- /dev/null +++ b/node_modules/json-schema-traverse/README.md @@ -0,0 +1,69 @@ +# json-schema-traverse +Traverse JSON Schema passing each schema object to callback + +[![Build Status](https://travis-ci.org/epoberezkin/json-schema-traverse.svg?branch=master)](https://travis-ci.org/epoberezkin/json-schema-traverse) +[![npm version](https://badge.fury.io/js/json-schema-traverse.svg)](https://www.npmjs.com/package/json-schema-traverse) +[![Coverage Status](https://coveralls.io/repos/github/epoberezkin/json-schema-traverse/badge.svg?branch=master)](https://coveralls.io/github/epoberezkin/json-schema-traverse?branch=master) + + +## Install + +``` +npm install json-schema-traverse +``` + + +## Usage + +```javascript +const traverse = require('json-schema-traverse'); +const schema = { + properties: { + foo: {type: 'string'}, + bar: {type: 'integer'} + } +}; + +traverse(schema, cb); +// cb is called 3 times with: +// 1. root schema +// 2. {type: 'string'} +// 3. {type: 'integer'} +``` + +Callback function is called for each schema object (not including draft-06 boolean schemas), including the root schema. Schema references ($ref) are not resolved, they are passed as is. + +Callback is passed these parameters: + +- _schema_: the current schema object +- _JSON pointer_: from the root schema to the current schema object +- _root schema_: the schema passed to `traverse` object +- _parent JSON pointer_: from the root schema to the parent schema object (see below) +- _parent keyword_: the keyword inside which this schema appears (e.g. `properties`, `anyOf`, etc.) +- _parent schema_: not necessarily parent object/array; in the example above the parent schema for `{type: 'string'}` is the root schema +- _index/property_: index or property name in the array/object containing multiple schemas; in the example above for `{type: 'string'}` the property name is `'foo'` + + +## Traverse objects in all unknown keywords + +```javascript +const traverse = require('json-schema-traverse'); +const schema = { + mySchema: { + minimum: 1, + maximum: 2 + } +}; + +traverse(schema, {allKeys: true}, cb); +// cb is called 2 times with: +// 1. root schema +// 2. mySchema +``` + +Without option `allKeys: true` callback will be called only with root schema. + + +## License + +[MIT](https://github.com/epoberezkin/json-schema-traverse/blob/master/LICENSE) diff --git a/node_modules/json-schema-traverse/index.js b/node_modules/json-schema-traverse/index.js new file mode 100644 index 0000000..79eeb6a --- /dev/null +++ b/node_modules/json-schema-traverse/index.js @@ -0,0 +1,81 @@ +'use strict'; + +var traverse = module.exports = function (schema, opts, cb) { + if (typeof opts == 'function') { + cb = opts; + opts = {}; + } + _traverse(opts, cb, schema, '', schema); +}; + + +traverse.keywords = { + additionalItems: true, + items: true, + contains: true, + additionalProperties: true, + propertyNames: true, + not: true +}; + +traverse.arrayKeywords = { + items: true, + allOf: true, + anyOf: true, + oneOf: true +}; + +traverse.propsKeywords = { + definitions: true, + properties: true, + patternProperties: true, + dependencies: true +}; + +traverse.skipKeywords = { + enum: true, + const: true, + required: true, + maximum: true, + minimum: true, + exclusiveMaximum: true, + exclusiveMinimum: true, + multipleOf: true, + maxLength: true, + minLength: true, + pattern: true, + format: true, + maxItems: true, + minItems: true, + uniqueItems: true, + maxProperties: true, + minProperties: true +}; + + +function _traverse(opts, cb, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { + if (schema && typeof schema == 'object' && !Array.isArray(schema)) { + cb(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); + for (var key in schema) { + var sch = schema[key]; + if (Array.isArray(sch)) { + if (key in traverse.arrayKeywords) { + for (var i=0; i=0.3.0 <0.4.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint\\node_modules\\ajv" + ] + ], + "_from": "json-schema-traverse@>=0.3.0 <0.4.0", + "_id": "json-schema-traverse@0.3.1", + "_inCache": true, + "_location": "/json-schema-traverse", + "_nodeVersion": "6.9.1", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/json-schema-traverse-0.3.1.tgz_1498261856588_0.601617609616369" + }, + "_npmUser": { + "name": "esp", + "email": "e.poberezkin@me.com" + }, + "_npmVersion": "3.10.8", + "_phantomChildren": {}, + "_requested": { + "raw": "json-schema-traverse@^0.3.0", + "scope": null, + "escapedName": "json-schema-traverse", + "name": "json-schema-traverse", + "rawSpec": "^0.3.0", + "spec": ">=0.3.0 <0.4.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint/ajv", + "/table/ajv" + ], + "_resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "_shasum": "349a6d44c53a51de89b40805c5d5e59b417d3340", + "_shrinkwrap": null, + "_spec": "json-schema-traverse@^0.3.0", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint\\node_modules\\ajv", + "author": { + "name": "Evgeny Poberezkin" + }, + "bugs": { + "url": "https://github.com/epoberezkin/json-schema-traverse/issues" + }, + "dependencies": {}, + "description": "Traverse JSON Schema passing each schema object to callback", + "devDependencies": { + "coveralls": "^2.13.1", + "eslint": "^3.19.0", + "mocha": "^3.4.2", + "nyc": "^11.0.2", + "pre-commit": "^1.2.2" + }, + "directories": {}, + "dist": { + "shasum": "349a6d44c53a51de89b40805c5d5e59b417d3340", + "tarball": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz" + }, + "gitHead": "f0a6627655525debea519dc8ebb4cf35f3c8e85f", + "homepage": "https://github.com/epoberezkin/json-schema-traverse#readme", + "keywords": [ + "JSON-Schema", + "traverse", + "iterate" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "esp", + "email": "e.poberezkin@me.com" + } + ], + "name": "json-schema-traverse", + "nyc": { + "exclude": [ + "**/spec/**", + "node_modules" + ], + "reporter": [ + "lcov", + "text-summary" + ] + }, + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/epoberezkin/json-schema-traverse.git" + }, + "scripts": { + "eslint": "eslint index.js spec", + "test": "npm run eslint && nyc npm run test-spec", + "test-spec": "mocha spec -R spec" + }, + "version": "0.3.1" +} diff --git a/node_modules/json-schema-traverse/spec/.eslintrc.yml b/node_modules/json-schema-traverse/spec/.eslintrc.yml new file mode 100644 index 0000000..3344da7 --- /dev/null +++ b/node_modules/json-schema-traverse/spec/.eslintrc.yml @@ -0,0 +1,6 @@ +parserOptions: + ecmaVersion: 6 +globals: + beforeEach: false + describe: false + it: false diff --git a/node_modules/json-schema-traverse/spec/fixtures/schema.js b/node_modules/json-schema-traverse/spec/fixtures/schema.js new file mode 100644 index 0000000..c51430c --- /dev/null +++ b/node_modules/json-schema-traverse/spec/fixtures/schema.js @@ -0,0 +1,125 @@ +'use strict'; + +var schema = { + additionalItems: subschema('additionalItems'), + items: subschema('items'), + contains: subschema('contains'), + additionalProperties: subschema('additionalProperties'), + propertyNames: subschema('propertyNames'), + not: subschema('not'), + allOf: [ + subschema('allOf_0'), + subschema('allOf_1'), + { + items: [ + subschema('items_0'), + subschema('items_1'), + ] + } + ], + anyOf: [ + subschema('anyOf_0'), + subschema('anyOf_1'), + ], + oneOf: [ + subschema('oneOf_0'), + subschema('oneOf_1'), + ], + definitions: { + foo: subschema('definitions_foo'), + bar: subschema('definitions_bar'), + }, + properties: { + foo: subschema('properties_foo'), + bar: subschema('properties_bar'), + }, + patternProperties: { + foo: subschema('patternProperties_foo'), + bar: subschema('patternProperties_bar'), + }, + dependencies: { + foo: subschema('dependencies_foo'), + bar: subschema('dependencies_bar'), + }, + required: ['foo', 'bar'] +}; + + +function subschema(keyword) { + var sch = { + properties: {}, + additionalProperties: false, + additionalItems: false, + anyOf: [ + {format: 'email'}, + {format: 'hostname'} + ] + }; + sch.properties['foo_' + keyword] = {title: 'foo'}; + sch.properties['bar_' + keyword] = {title: 'bar'}; + return sch; +} + + +module.exports = { + schema: schema, + + // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex + expectedCalls: [[schema, '', schema, undefined, undefined, undefined, undefined]] + .concat(expectedCalls('additionalItems')) + .concat(expectedCalls('items')) + .concat(expectedCalls('contains')) + .concat(expectedCalls('additionalProperties')) + .concat(expectedCalls('propertyNames')) + .concat(expectedCalls('not')) + .concat(expectedCallsChild('allOf', 0)) + .concat(expectedCallsChild('allOf', 1)) + .concat([ + [schema.allOf[2], '/allOf/2', schema, '', 'allOf', schema, 2], + [schema.allOf[2].items[0], '/allOf/2/items/0', schema, '/allOf/2', 'items', schema.allOf[2], 0], + [schema.allOf[2].items[0].properties.foo_items_0, '/allOf/2/items/0/properties/foo_items_0', schema, '/allOf/2/items/0', 'properties', schema.allOf[2].items[0], 'foo_items_0'], + [schema.allOf[2].items[0].properties.bar_items_0, '/allOf/2/items/0/properties/bar_items_0', schema, '/allOf/2/items/0', 'properties', schema.allOf[2].items[0], 'bar_items_0'], + [schema.allOf[2].items[0].anyOf[0], '/allOf/2/items/0/anyOf/0', schema, '/allOf/2/items/0', 'anyOf', schema.allOf[2].items[0], 0], + [schema.allOf[2].items[0].anyOf[1], '/allOf/2/items/0/anyOf/1', schema, '/allOf/2/items/0', 'anyOf', schema.allOf[2].items[0], 1], + + [schema.allOf[2].items[1], '/allOf/2/items/1', schema, '/allOf/2', 'items', schema.allOf[2], 1], + [schema.allOf[2].items[1].properties.foo_items_1, '/allOf/2/items/1/properties/foo_items_1', schema, '/allOf/2/items/1', 'properties', schema.allOf[2].items[1], 'foo_items_1'], + [schema.allOf[2].items[1].properties.bar_items_1, '/allOf/2/items/1/properties/bar_items_1', schema, '/allOf/2/items/1', 'properties', schema.allOf[2].items[1], 'bar_items_1'], + [schema.allOf[2].items[1].anyOf[0], '/allOf/2/items/1/anyOf/0', schema, '/allOf/2/items/1', 'anyOf', schema.allOf[2].items[1], 0], + [schema.allOf[2].items[1].anyOf[1], '/allOf/2/items/1/anyOf/1', schema, '/allOf/2/items/1', 'anyOf', schema.allOf[2].items[1], 1] + ]) + .concat(expectedCallsChild('anyOf', 0)) + .concat(expectedCallsChild('anyOf', 1)) + .concat(expectedCallsChild('oneOf', 0)) + .concat(expectedCallsChild('oneOf', 1)) + .concat(expectedCallsChild('definitions', 'foo')) + .concat(expectedCallsChild('definitions', 'bar')) + .concat(expectedCallsChild('properties', 'foo')) + .concat(expectedCallsChild('properties', 'bar')) + .concat(expectedCallsChild('patternProperties', 'foo')) + .concat(expectedCallsChild('patternProperties', 'bar')) + .concat(expectedCallsChild('dependencies', 'foo')) + .concat(expectedCallsChild('dependencies', 'bar')) +}; + + +function expectedCalls(keyword) { + return [ + [schema[keyword], `/${keyword}`, schema, '', keyword, schema, undefined], + [schema[keyword].properties[`foo_${keyword}`], `/${keyword}/properties/foo_${keyword}`, schema, `/${keyword}`, 'properties', schema[keyword], `foo_${keyword}`], + [schema[keyword].properties[`bar_${keyword}`], `/${keyword}/properties/bar_${keyword}`, schema, `/${keyword}`, 'properties', schema[keyword], `bar_${keyword}`], + [schema[keyword].anyOf[0], `/${keyword}/anyOf/0`, schema, `/${keyword}`, 'anyOf', schema[keyword], 0], + [schema[keyword].anyOf[1], `/${keyword}/anyOf/1`, schema, `/${keyword}`, 'anyOf', schema[keyword], 1] + ]; +} + + +function expectedCallsChild(keyword, i) { + return [ + [schema[keyword][i], `/${keyword}/${i}`, schema, '', keyword, schema, i], + [schema[keyword][i].properties[`foo_${keyword}_${i}`], `/${keyword}/${i}/properties/foo_${keyword}_${i}`, schema, `/${keyword}/${i}`, 'properties', schema[keyword][i], `foo_${keyword}_${i}`], + [schema[keyword][i].properties[`bar_${keyword}_${i}`], `/${keyword}/${i}/properties/bar_${keyword}_${i}`, schema, `/${keyword}/${i}`, 'properties', schema[keyword][i], `bar_${keyword}_${i}`], + [schema[keyword][i].anyOf[0], `/${keyword}/${i}/anyOf/0`, schema, `/${keyword}/${i}`, 'anyOf', schema[keyword][i], 0], + [schema[keyword][i].anyOf[1], `/${keyword}/${i}/anyOf/1`, schema, `/${keyword}/${i}`, 'anyOf', schema[keyword][i], 1] + ]; +} diff --git a/node_modules/json-schema-traverse/spec/index.spec.js b/node_modules/json-schema-traverse/spec/index.spec.js new file mode 100644 index 0000000..7e66143 --- /dev/null +++ b/node_modules/json-schema-traverse/spec/index.spec.js @@ -0,0 +1,102 @@ +'use strict'; + +var traverse = require('../index'); +var assert = require('assert'); + +describe('json-schema-traverse', function() { + var calls; + + beforeEach(function() { + calls = []; + }); + + it('should traverse all keywords containing schemas recursively', function() { + var schema = require('./fixtures/schema').schema; + var expectedCalls = require('./fixtures/schema').expectedCalls; + + traverse(schema, callback); + assert.deepStrictEqual(calls, expectedCalls); + }); + + + describe('allKeys option', function() { + var schema = { + someObject: { + minimum: 1, + maximum: 2 + } + }; + + it('should traverse objects with allKeys: true option', function() { + // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex + var expectedCalls = [ + [schema, '', schema, undefined, undefined, undefined, undefined], + [schema.someObject, '/someObject', schema, '', 'someObject', schema, undefined] + ]; + + traverse(schema, {allKeys: true}, callback); + assert.deepStrictEqual(calls, expectedCalls); + }); + + + it('should NOT traverse objects with allKeys: false option', function() { + // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex + var expectedCalls = [ + [schema, '', schema, undefined, undefined, undefined, undefined] + ]; + + traverse(schema, {allKeys: false}, callback); + assert.deepStrictEqual(calls, expectedCalls); + }); + + + it('should NOT traverse objects without allKeys option', function() { + // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex + var expectedCalls = [ + [schema, '', schema, undefined, undefined, undefined, undefined] + ]; + + traverse(schema, callback); + assert.deepStrictEqual(calls, expectedCalls); + }); + + + it('should NOT travers objects in standard keywords which value is not a schema', function() { + var schema2 = { + const: {foo: 'bar'}, + enum: ['a', 'b'], + required: ['foo'], + another: { + + }, + patternProperties: {}, // will not traverse - no properties + dependencies: true, // will not traverse - invalid + properties: { + smaller: { + type: 'number' + }, + larger: { + type: 'number', + minimum: {$data: '1/smaller'} + } + } + }; + + // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex + var expectedCalls = [ + [schema2, '', schema2, undefined, undefined, undefined, undefined], + [schema2.another, '/another', schema2, '', 'another', schema2, undefined], + [schema2.properties.smaller, '/properties/smaller', schema2, '', 'properties', schema2, 'smaller'], + [schema2.properties.larger, '/properties/larger', schema2, '', 'properties', schema2, 'larger'], + ]; + + traverse(schema2, {allKeys: true}, callback); + assert.deepStrictEqual(calls, expectedCalls); + }); + }); + + + function callback() { + calls.push(Array.prototype.slice.call(arguments)); + } +}); diff --git a/node_modules/json-stable-stringify-without-jsonify/.npmignore b/node_modules/json-stable-stringify-without-jsonify/.npmignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/node_modules/json-stable-stringify-without-jsonify/.travis.yml b/node_modules/json-stable-stringify-without-jsonify/.travis.yml new file mode 100644 index 0000000..cc4dba2 --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" diff --git a/node_modules/json-stable-stringify-without-jsonify/LICENSE b/node_modules/json-stable-stringify-without-jsonify/LICENSE new file mode 100644 index 0000000..ee27ba4 --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/json-stable-stringify-without-jsonify/example/key_cmp.js b/node_modules/json-stable-stringify-without-jsonify/example/key_cmp.js new file mode 100644 index 0000000..d5f6675 --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/example/key_cmp.js @@ -0,0 +1,7 @@ +var stringify = require('../'); + +var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; +var s = stringify(obj, function (a, b) { + return a.key < b.key ? 1 : -1; +}); +console.log(s); diff --git a/node_modules/json-stable-stringify-without-jsonify/example/nested.js b/node_modules/json-stable-stringify-without-jsonify/example/nested.js new file mode 100644 index 0000000..9a672fc --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/example/nested.js @@ -0,0 +1,3 @@ +var stringify = require('../'); +var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; +console.log(stringify(obj)); diff --git a/node_modules/json-stable-stringify-without-jsonify/example/str.js b/node_modules/json-stable-stringify-without-jsonify/example/str.js new file mode 100644 index 0000000..9b4b3cd --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/example/str.js @@ -0,0 +1,3 @@ +var stringify = require('../'); +var obj = { c: 6, b: [4,5], a: 3 }; +console.log(stringify(obj)); diff --git a/node_modules/json-stable-stringify-without-jsonify/example/value_cmp.js b/node_modules/json-stable-stringify-without-jsonify/example/value_cmp.js new file mode 100644 index 0000000..09f1c5f --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/example/value_cmp.js @@ -0,0 +1,7 @@ +var stringify = require('../'); + +var obj = { d: 6, c: 5, b: [{z:3,y:2,x:1},9], a: 10 }; +var s = stringify(obj, function (a, b) { + return a.value < b.value ? 1 : -1; +}); +console.log(s); diff --git a/node_modules/json-stable-stringify-without-jsonify/index.js b/node_modules/json-stable-stringify-without-jsonify/index.js new file mode 100644 index 0000000..a6f40c7 --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/index.js @@ -0,0 +1,82 @@ +module.exports = function (obj, opts) { + if (!opts) opts = {}; + if (typeof opts === 'function') opts = { cmp: opts }; + var space = opts.space || ''; + if (typeof space === 'number') space = Array(space+1).join(' '); + var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false; + var replacer = opts.replacer || function(key, value) { return value; }; + + var cmp = opts.cmp && (function (f) { + return function (node) { + return function (a, b) { + var aobj = { key: a, value: node[a] }; + var bobj = { key: b, value: node[b] }; + return f(aobj, bobj); + }; + }; + })(opts.cmp); + + var seen = []; + return (function stringify (parent, key, node, level) { + var indent = space ? ('\n' + new Array(level + 1).join(space)) : ''; + var colonSeparator = space ? ': ' : ':'; + + if (node && node.toJSON && typeof node.toJSON === 'function') { + node = node.toJSON(); + } + + node = replacer.call(parent, key, node); + + if (node === undefined) { + return; + } + if (typeof node !== 'object' || node === null) { + return JSON.stringify(node); + } + if (isArray(node)) { + var out = []; + for (var i = 0; i < node.length; i++) { + var item = stringify(node, i, node[i], level+1) || JSON.stringify(null); + out.push(indent + space + item); + } + return '[' + out.join(',') + indent + ']'; + } + else { + if (seen.indexOf(node) !== -1) { + if (cycles) return JSON.stringify('__cycle__'); + throw new TypeError('Converting circular structure to JSON'); + } + else seen.push(node); + + var keys = objectKeys(node).sort(cmp && cmp(node)); + var out = []; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = stringify(node, key, node[key], level+1); + + if(!value) continue; + + var keyValue = JSON.stringify(key) + + colonSeparator + + value; + ; + out.push(indent + space + keyValue); + } + seen.splice(seen.indexOf(node), 1); + return '{' + out.join(',') + indent + '}'; + } + })({ '': obj }, '', obj, 0); +}; + +var isArray = Array.isArray || function (x) { + return {}.toString.call(x) === '[object Array]'; +}; + +var objectKeys = Object.keys || function (obj) { + var has = Object.prototype.hasOwnProperty || function () { return true }; + var keys = []; + for (var key in obj) { + if (has.call(obj, key)) keys.push(key); + } + return keys; +}; diff --git a/node_modules/json-stable-stringify-without-jsonify/package.json b/node_modules/json-stable-stringify-without-jsonify/package.json new file mode 100644 index 0000000..7d567a7 --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/package.json @@ -0,0 +1,107 @@ +{ + "_args": [ + [ + { + "raw": "json-stable-stringify-without-jsonify@^1.0.1", + "scope": null, + "escapedName": "json-stable-stringify-without-jsonify", + "name": "json-stable-stringify-without-jsonify", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint" + ] + ], + "_from": "json-stable-stringify-without-jsonify@>=1.0.1 <2.0.0", + "_id": "json-stable-stringify-without-jsonify@1.0.1", + "_inCache": true, + "_location": "/json-stable-stringify-without-jsonify", + "_nodeVersion": "7.2.1", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/json-stable-stringify-without-jsonify-1.0.1.tgz_1481839233500_0.5462748887948692" + }, + "_npmUser": { + "name": "samn", + "email": "samneubardt@gmail.com" + }, + "_npmVersion": "3.10.9", + "_phantomChildren": {}, + "_requested": { + "raw": "json-stable-stringify-without-jsonify@^1.0.1", + "scope": null, + "escapedName": "json-stable-stringify-without-jsonify", + "name": "json-stable-stringify-without-jsonify", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "_shasum": "9db7b59496ad3f3cfef30a75142d2d930ad72651", + "_shrinkwrap": null, + "_spec": "json-stable-stringify-without-jsonify@^1.0.1", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/samn/json-stable-stringify/issues" + }, + "dependencies": {}, + "description": "deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results, with no public domain dependencies", + "devDependencies": { + "tape": "~1.0.4" + }, + "directories": {}, + "dist": { + "shasum": "9db7b59496ad3f3cfef30a75142d2d930ad72651", + "tarball": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" + }, + "gitHead": "c0b3c36d976c54e31a814c492cd1c2557a4d3758", + "homepage": "https://github.com/samn/json-stable-stringify", + "keywords": [ + "json", + "stringify", + "deterministic", + "hash", + "sort", + "stable" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "samn", + "email": "samneubardt@gmail.com" + } + ], + "name": "json-stable-stringify-without-jsonify", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/samn/json-stable-stringify.git" + }, + "scripts": { + "test": "tape test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "ff/5", + "ff/latest", + "chrome/15", + "chrome/latest", + "safari/latest", + "opera/latest" + ] + }, + "version": "1.0.1" +} diff --git a/node_modules/json-stable-stringify-without-jsonify/readme.markdown b/node_modules/json-stable-stringify-without-jsonify/readme.markdown new file mode 100644 index 0000000..e95b468 --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/readme.markdown @@ -0,0 +1,132 @@ +# json-stable-stringify + +This is the same as https://github.com/substack/json-stable-stringify but it doesn't depend on libraries without licenses (jsonify). + +deterministic version of `JSON.stringify()` so you can get a consistent hash +from stringified results + +You can also pass in a custom comparison function. + +[![browser support](https://ci.testling.com/substack/json-stable-stringify.png)](https://ci.testling.com/substack/json-stable-stringify) + +[![build status](https://secure.travis-ci.org/substack/json-stable-stringify.png)](http://travis-ci.org/substack/json-stable-stringify) + +# example + +``` js +var stringify = require('json-stable-stringify'); +var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; +console.log(stringify(obj)); +``` + +output: + +``` +{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8} +``` + +# methods + +``` js +var stringify = require('json-stable-stringify') +``` + +## var str = stringify(obj, opts) + +Return a deterministic stringified string `str` from the object `obj`. + +## options + +### cmp + +If `opts` is given, you can supply an `opts.cmp` to have a custom comparison +function for object keys. Your function `opts.cmp` is called with these +parameters: + +``` js +opts.cmp({ key: akey, value: avalue }, { key: bkey, value: bvalue }) +``` + +For example, to sort on the object key names in reverse order you could write: + +``` js +var stringify = require('json-stable-stringify'); + +var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; +var s = stringify(obj, function (a, b) { + return a.key < b.key ? 1 : -1; +}); +console.log(s); +``` + +which results in the output string: + +``` +{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3} +``` + +Or if you wanted to sort on the object values in reverse order, you could write: + +``` +var stringify = require('json-stable-stringify'); + +var obj = { d: 6, c: 5, b: [{z:3,y:2,x:1},9], a: 10 }; +var s = stringify(obj, function (a, b) { + return a.value < b.value ? 1 : -1; +}); +console.log(s); +``` + +which outputs: + +``` +{"d":6,"c":5,"b":[{"z":3,"y":2,"x":1},9],"a":10} +``` + +### space + +If you specify `opts.space`, it will indent the output for pretty-printing. +Valid values are strings (e.g. `{space: \t}`) or a number of spaces +(`{space: 3}`). + +For example: + +```js +var obj = { b: 1, a: { foo: 'bar', and: [1, 2, 3] } }; +var s = stringify(obj, { space: ' ' }); +console.log(s); +``` + +which outputs: + +``` +{ + "a": { + "and": [ + 1, + 2, + 3 + ], + "foo": "bar" + }, + "b": 1 +} +``` + +### replacer + +The replacer parameter is a function `opts.replacer(key, value)` that behaves +the same as the replacer +[from the core JSON object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_native_JSON#The_replacer_parameter). + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install json-stable-stringify +``` + +# license + +MIT diff --git a/node_modules/json-stable-stringify-without-jsonify/test/cmp.js b/node_modules/json-stable-stringify-without-jsonify/test/cmp.js new file mode 100644 index 0000000..2dbb393 --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/test/cmp.js @@ -0,0 +1,11 @@ +var test = require('tape'); +var stringify = require('../'); + +test('custom comparison function', function (t) { + t.plan(1); + var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; + var s = stringify(obj, function (a, b) { + return a.key < b.key ? 1 : -1; + }); + t.equal(s, '{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3}'); +}); diff --git a/node_modules/json-stable-stringify-without-jsonify/test/nested.js b/node_modules/json-stable-stringify-without-jsonify/test/nested.js new file mode 100644 index 0000000..052c7d6 --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/test/nested.js @@ -0,0 +1,42 @@ +var test = require('tape'); +var stringify = require('../'); + +test('nested', function (t) { + t.plan(1); + var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; + t.equal(stringify(obj), '{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8}'); +}); + +test('cyclic (default)', function (t) { + t.plan(1); + var one = { a: 1 }; + var two = { a: 2, one: one }; + one.two = two; + try { + stringify(one); + } catch (ex) { + t.equal(ex.toString(), 'TypeError: Converting circular structure to JSON'); + } +}); + +test('cyclic (specifically allowed)', function (t) { + t.plan(1); + var one = { a: 1 }; + var two = { a: 2, one: one }; + one.two = two; + t.equal(stringify(one, {cycles:true}), '{"a":1,"two":{"a":2,"one":"__cycle__"}}'); +}); + +test('repeated non-cyclic value', function(t) { + t.plan(1); + var one = { x: 1 }; + var two = { a: one, b: one }; + t.equal(stringify(two), '{"a":{"x":1},"b":{"x":1}}'); +}); + +test('acyclic but with reused obj-property pointers', function (t) { + t.plan(1); + var x = { a: 1 } + var y = { b: x, c: x } + t.equal(stringify(y), '{"b":{"a":1},"c":{"a":1}}'); +}); diff --git a/node_modules/json-stable-stringify-without-jsonify/test/replacer.js b/node_modules/json-stable-stringify-without-jsonify/test/replacer.js new file mode 100644 index 0000000..98802a7 --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/test/replacer.js @@ -0,0 +1,74 @@ +var test = require('tape'); +var stringify = require('../'); + +test('replace root', function (t) { + t.plan(1); + + var obj = { a: 1, b: 2, c: false }; + var replacer = function(key, value) { return 'one'; }; + + t.equal(stringify(obj, { replacer: replacer }), '"one"'); +}); + +test('replace numbers', function (t) { + t.plan(1); + + var obj = { a: 1, b: 2, c: false }; + var replacer = function(key, value) { + if(value === 1) return 'one'; + if(value === 2) return 'two'; + return value; + }; + + t.equal(stringify(obj, { replacer: replacer }), '{"a":"one","b":"two","c":false}'); +}); + +test('replace with object', function (t) { + t.plan(1); + + var obj = { a: 1, b: 2, c: false }; + var replacer = function(key, value) { + if(key === 'b') return { d: 1 }; + if(value === 1) return 'one'; + return value; + }; + + t.equal(stringify(obj, { replacer: replacer }), '{"a":"one","b":{"d":"one"},"c":false}'); +}); + +test('replace with undefined', function (t) { + t.plan(1); + + var obj = { a: 1, b: 2, c: false }; + var replacer = function(key, value) { + if(value === false) return; + return value; + }; + + t.equal(stringify(obj, { replacer: replacer }), '{"a":1,"b":2}'); +}); + +test('replace with array', function (t) { + t.plan(1); + + var obj = { a: 1, b: 2, c: false }; + var replacer = function(key, value) { + if(key === 'b') return ['one', 'two']; + return value; + }; + + t.equal(stringify(obj, { replacer: replacer }), '{"a":1,"b":["one","two"],"c":false}'); +}); + +test('replace array item', function (t) { + t.plan(1); + + var obj = { a: 1, b: 2, c: [1,2] }; + var replacer = function(key, value) { + if(value === 1) return 'one'; + if(value === 2) return 'two'; + return value; + }; + + t.equal(stringify(obj, { replacer: replacer }), '{"a":"one","b":"two","c":["one","two"]}'); +}); diff --git a/node_modules/json-stable-stringify-without-jsonify/test/space.js b/node_modules/json-stable-stringify-without-jsonify/test/space.js new file mode 100644 index 0000000..2621122 --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/test/space.js @@ -0,0 +1,59 @@ +var test = require('tape'); +var stringify = require('../'); + +test('space parameter', function (t) { + t.plan(1); + var obj = { one: 1, two: 2 }; + t.equal(stringify(obj, {space: ' '}), '' + + '{\n' + + ' "one": 1,\n' + + ' "two": 2\n' + + '}' + ); +}); + +test('space parameter (with tabs)', function (t) { + t.plan(1); + var obj = { one: 1, two: 2 }; + t.equal(stringify(obj, {space: '\t'}), '' + + '{\n' + + '\t"one": 1,\n' + + '\t"two": 2\n' + + '}' + ); +}); + +test('space parameter (with a number)', function (t) { + t.plan(1); + var obj = { one: 1, two: 2 }; + t.equal(stringify(obj, {space: 3}), '' + + '{\n' + + ' "one": 1,\n' + + ' "two": 2\n' + + '}' + ); +}); + +test('space parameter (nested objects)', function (t) { + t.plan(1); + var obj = { one: 1, two: { b: 4, a: [2,3] } }; + t.equal(stringify(obj, {space: ' '}), '' + + '{\n' + + ' "one": 1,\n' + + ' "two": {\n' + + ' "a": [\n' + + ' 2,\n' + + ' 3\n' + + ' ],\n' + + ' "b": 4\n' + + ' }\n' + + '}' + ); +}); + +test('space parameter (same as native)', function (t) { + t.plan(1); + // for this test, properties need to be in alphabetical order + var obj = { one: 1, two: { a: [2,3], b: 4 } }; + t.equal(stringify(obj, {space: ' '}), JSON.stringify(obj, null, ' ')); +}); diff --git a/node_modules/json-stable-stringify-without-jsonify/test/str.js b/node_modules/json-stable-stringify-without-jsonify/test/str.js new file mode 100644 index 0000000..67426b9 --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/test/str.js @@ -0,0 +1,32 @@ +var test = require('tape'); +var stringify = require('../'); + +test('simple object', function (t) { + t.plan(1); + var obj = { c: 6, b: [4,5], a: 3, z: null }; + t.equal(stringify(obj), '{"a":3,"b":[4,5],"c":6,"z":null}'); +}); + +test('object with undefined', function (t) { + t.plan(1); + var obj = { a: 3, z: undefined }; + t.equal(stringify(obj), '{"a":3}'); +}); + +test('array with undefined', function (t) { + t.plan(1); + var obj = [4, undefined, 6]; + t.equal(stringify(obj), '[4,null,6]'); +}); + +test('object with empty string', function (t) { + t.plan(1); + var obj = { a: 3, z: '' }; + t.equal(stringify(obj), '{"a":3,"z":""}'); +}); + +test('array with empty string', function (t) { + t.plan(1); + var obj = [4, '', 6]; + t.equal(stringify(obj), '[4,"",6]'); +}); diff --git a/node_modules/json-stable-stringify-without-jsonify/test/to-json.js b/node_modules/json-stable-stringify-without-jsonify/test/to-json.js new file mode 100644 index 0000000..ef9a980 --- /dev/null +++ b/node_modules/json-stable-stringify-without-jsonify/test/to-json.js @@ -0,0 +1,20 @@ +var test = require('tape'); +var stringify = require('../'); + +test('toJSON function', function (t) { + t.plan(1); + var obj = { one: 1, two: 2, toJSON: function() { return { one: 1 }; } }; + t.equal(stringify(obj), '{"one":1}' ); +}); + +test('toJSON returns string', function (t) { + t.plan(1); + var obj = { one: 1, two: 2, toJSON: function() { return 'one'; } }; + t.equal(stringify(obj), '"one"'); +}); + +test('toJSON returns array', function (t) { + t.plan(1); + var obj = { one: 1, two: 2, toJSON: function() { return ['one']; } }; + t.equal(stringify(obj), '["one"]'); +}); diff --git a/node_modules/levn/LICENSE b/node_modules/levn/LICENSE new file mode 100644 index 0000000..525b118 --- /dev/null +++ b/node_modules/levn/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) George Zahariev + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/levn/README.md b/node_modules/levn/README.md new file mode 100644 index 0000000..bb9ffea --- /dev/null +++ b/node_modules/levn/README.md @@ -0,0 +1,196 @@ +# levn [![Build Status](https://travis-ci.org/gkz/levn.png)](https://travis-ci.org/gkz/levn) +__Light ECMAScript (JavaScript) Value Notation__ +Levn is a library which allows you to parse a string into a JavaScript value based on an expected type. It is meant for short amounts of human entered data (eg. config files, command line arguments). + +Levn aims to concisely describe JavaScript values in text, and allow for the extraction and validation of those values. Levn uses [type-check](https://github.com/gkz/type-check) for its type format, and to validate the results. MIT license. Version 0.3.0. + +__How is this different than JSON?__ levn is meant to be written by humans only, is (due to the previous point) much more concise, can be validated against supplied types, has regex and date literals, and can easily be extended with custom types. On the other hand, it is probably slower and thus less efficient at transporting large amounts of data, which is fine since this is not its purpose. + + npm install levn + +For updates on levn, [follow me on twitter](https://twitter.com/gkzahariev). + + +## Quick Examples + +```js +var parse = require('levn').parse; +parse('Number', '2'); // 2 +parse('String', '2'); // '2' +parse('String', 'levn'); // 'levn' +parse('String', 'a b'); // 'a b' +parse('Boolean', 'true'); // true + +parse('Date', '#2011-11-11#'); // (Date object) +parse('Date', '2011-11-11'); // (Date object) +parse('RegExp', '/[a-z]/gi'); // /[a-z]/gi +parse('RegExp', 're'); // /re/ +parse('Int', '2'); // 2 + +parse('Number | String', 'str'); // 'str' +parse('Number | String', '2'); // 2 + +parse('[Number]', '[1,2,3]'); // [1,2,3] +parse('(String, Boolean)', '(hi, false)'); // ['hi', false] +parse('{a: String, b: Number}', '{a: str, b: 2}'); // {a: 'str', b: 2} + +// at the top level, you can ommit surrounding delimiters +parse('[Number]', '1,2,3'); // [1,2,3] +parse('(String, Boolean)', 'hi, false'); // ['hi', false] +parse('{a: String, b: Number}', 'a: str, b: 2'); // {a: 'str', b: 2} + +// wildcard - auto choose type +parse('*', '[hi,(null,[42]),{k: true}]'); // ['hi', [null, [42]], {k: true}] +``` +## Usage + +`require('levn');` returns an object that exposes three properties. `VERSION` is the current version of the library as a string. `parse` and `parsedTypeParse` are functions. + +```js +// parse(type, input, options); +parse('[Number]', '1,2,3'); // [1, 2, 3] + +// parsedTypeParse(parsedType, input, options); +var parsedType = require('type-check').parseType('[Number]'); +parsedTypeParse(parsedType, '1,2,3'); // [1, 2, 3] +``` + +### parse(type, input, options) + +`parse` casts the string `input` into a JavaScript value according to the specified `type` in the [type format](https://github.com/gkz/type-check#type-format) (and taking account the optional `options`) and returns the resulting JavaScript value. + +##### arguments +* type - `String` - the type written in the [type format](https://github.com/gkz/type-check#type-format) which to check against +* input - `String` - the value written in the [levn format](#levn-format) +* options - `Maybe Object` - an optional parameter specifying additional [options](#options) + +##### returns +`*` - the resulting JavaScript value + +##### example +```js +parse('[Number]', '1,2,3'); // [1, 2, 3] +``` + +### parsedTypeParse(parsedType, input, options) + +`parsedTypeParse` casts the string `input` into a JavaScript value according to the specified `type` which has already been parsed (and taking account the optional `options`) and returns the resulting JavaScript value. You can parse a type using the [type-check](https://github.com/gkz/type-check) library's `parseType` function. + +##### arguments +* type - `Object` - the type in the parsed type format which to check against +* input - `String` - the value written in the [levn format](#levn-format) +* options - `Maybe Object` - an optional parameter specifying additional [options](#options) + +##### returns +`*` - the resulting JavaScript value + +##### example +```js +var parsedType = require('type-check').parseType('[Number]'); +parsedTypeParse(parsedType, '1,2,3'); // [1, 2, 3] +``` + +## Levn Format + +Levn can use the type information you provide to choose the appropriate value to produce from the input. For the same input, it will choose a different output value depending on the type provided. For example, `parse('Number', '2')` will produce the number `2`, but `parse('String', '2')` will produce the string `"2"`. + +If you do not provide type information, and simply use `*`, levn will parse the input according the unambiguous "explicit" mode, which we will now detail - you can also set the `explicit` option to true manually in the [options](#options). + +* `"string"`, `'string'` are parsed as a String, eg. `"a msg"` is `"a msg"` +* `#date#` is parsed as a Date, eg. `#2011-11-11#` is `new Date('2011-11-11')` +* `/regexp/flags` is parsed as a RegExp, eg. `/re/gi` is `/re/gi` +* `undefined`, `null`, `NaN`, `true`, and `false` are all their JavaScript equivalents +* `[element1, element2, etc]` is an Array, and the casting procedure is recursively applied to each element. Eg. `[1,2,3]` is `[1,2,3]`. +* `(element1, element2, etc)` is an tuple, and the casting procedure is recursively applied to each element. Eg. `(1, a)` is `(1, a)` (is `[1, 'a']`). +* `{key1: val1, key2: val2, ...}` is an Object, and the casting procedure is recursively applied to each property. Eg. `{a: 1, b: 2}` is `{a: 1, b: 2}`. +* Any test which does not fall under the above, and which does not contain special characters (`[``]``(``)``{``}``:``,`) is a string, eg. `$12- blah` is `"$12- blah"`. + +If you do provide type information, you can make your input more concise as the program already has some information about what it expects. Please see the [type format](https://github.com/gkz/type-check#type-format) section of [type-check](https://github.com/gkz/type-check) for more information about how to specify types. There are some rules about what levn can do with the information: + +* If a String is expected, and only a String, all characters of the input (including any special ones) will become part of the output. Eg. `[({})]` is `"[({})]"`, and `"hi"` is `'"hi"'`. +* If a Date is expected, the surrounding `#` can be omitted from date literals. Eg. `2011-11-11` is `new Date('2011-11-11')`. +* If a RegExp is expected, no flags need to be specified, and the regex is not using any of the special characters,the opening and closing `/` can be omitted - this will have the affect of setting the source of the regex to the input. Eg. `regex` is `/regex/`. +* If an Array is expected, and it is the root node (at the top level), the opening `[` and closing `]` can be omitted. Eg. `1,2,3` is `[1,2,3]`. +* If a tuple is expected, and it is the root node (at the top level), the opening `(` and closing `)` can be omitted. Eg. `1, a` is `(1, a)` (is `[1, 'a']`). +* If an Object is expected, and it is the root node (at the top level), the opening `{` and closing `}` can be omitted. Eg `a: 1, b: 2` is `{a: 1, b: 2}`. + +If you list multiple types (eg. `Number | String`), it will first attempt to cast to the first type and then validate - if the validation fails it will move on to the next type and so forth, left to right. You must be careful as some types will succeed with any input, such as String. Thus put String at the end of your list. In non-explicit mode, Date and RegExp will succeed with a large variety of input - also be careful with these and list them near the end if not last in your list. + +Whitespace between special characters and elements is inconsequential. + +## Options + +Options is an object. It is an optional parameter to the `parse` and `parsedTypeParse` functions. + +### Explicit + +A `Boolean`. By default it is `false`. + +__Example:__ + +```js +parse('RegExp', 're', {explicit: false}); // /re/ +parse('RegExp', 're', {explicit: true}); // Error: ... does not type check... +parse('RegExp | String', 're', {explicit: true}); // 're' +``` + +`explicit` sets whether to be in explicit mode or not. Using `*` automatically activates explicit mode. For more information, read the [levn format](#levn-format) section. + +### customTypes + +An `Object`. Empty `{}` by default. + +__Example:__ + +```js +var options = { + customTypes: { + Even: { + typeOf: 'Number', + validate: function (x) { + return x % 2 === 0; + }, + cast: function (x) { + return {type: 'Just', value: parseInt(x)}; + } + } + } +} +parse('Even', '2', options); // 2 +parse('Even', '3', options); // Error: Value: "3" does not type check... +``` + +__Another Example:__ +```js +function Person(name, age){ + this.name = name; + this.age = age; +} +var options = { + customTypes: { + Person: { + typeOf: 'Object', + validate: function (x) { + x instanceof Person; + }, + cast: function (value, options, typesCast) { + var name, age; + if ({}.toString.call(value).slice(8, -1) !== 'Object') { + return {type: 'Nothing'}; + } + name = typesCast(value.name, [{type: 'String'}], options); + age = typesCast(value.age, [{type: 'Numger'}], options); + return {type: 'Just', value: new Person(name, age)}; + } + } +} +parse('Person', '{name: Laura, age: 25}', options); // Person {name: 'Laura', age: 25} +``` + +`customTypes` is an object whose keys are the name of the types, and whose values are an object with three properties, `typeOf`, `validate`, and `cast`. For more information about `typeOf` and `validate`, please see the [custom types](https://github.com/gkz/type-check#custom-types) section of type-check. + +`cast` is a function which receives three arguments, the value under question, options, and the typesCast function. In `cast`, attempt to cast the value into the specified type. If you are successful, return an object in the format `{type: 'Just', value: CAST-VALUE}`, if you know it won't work, return `{type: 'Nothing'}`. You can use the `typesCast` function to cast any child values. Remember to pass `options` to it. In your function you can also check for `options.explicit` and act accordingly. + +## Technical About + +`levn` is written in [LiveScript](http://livescript.net/) - a language that compiles to JavaScript. It uses [type-check](https://github.com/gkz/type-check) to both parse types and validate values. It also uses the [prelude.ls](http://preludels.com/) library. diff --git a/node_modules/levn/lib/cast.js b/node_modules/levn/lib/cast.js new file mode 100644 index 0000000..411e29d --- /dev/null +++ b/node_modules/levn/lib/cast.js @@ -0,0 +1,298 @@ +// Generated by LiveScript 1.4.0 +(function(){ + var parsedTypeCheck, types, toString$ = {}.toString; + parsedTypeCheck = require('type-check').parsedTypeCheck; + types = { + '*': function(value, options){ + switch (toString$.call(value).slice(8, -1)) { + case 'Array': + return typeCast(value, { + type: 'Array' + }, options); + case 'Object': + return typeCast(value, { + type: 'Object' + }, options); + default: + return { + type: 'Just', + value: typesCast(value, [ + { + type: 'Undefined' + }, { + type: 'Null' + }, { + type: 'NaN' + }, { + type: 'Boolean' + }, { + type: 'Number' + }, { + type: 'Date' + }, { + type: 'RegExp' + }, { + type: 'Array' + }, { + type: 'Object' + }, { + type: 'String' + } + ], (options.explicit = true, options)) + }; + } + }, + Undefined: function(it){ + if (it === 'undefined' || it === void 8) { + return { + type: 'Just', + value: void 8 + }; + } else { + return { + type: 'Nothing' + }; + } + }, + Null: function(it){ + if (it === 'null') { + return { + type: 'Just', + value: null + }; + } else { + return { + type: 'Nothing' + }; + } + }, + NaN: function(it){ + if (it === 'NaN') { + return { + type: 'Just', + value: NaN + }; + } else { + return { + type: 'Nothing' + }; + } + }, + Boolean: function(it){ + if (it === 'true') { + return { + type: 'Just', + value: true + }; + } else if (it === 'false') { + return { + type: 'Just', + value: false + }; + } else { + return { + type: 'Nothing' + }; + } + }, + Number: function(it){ + return { + type: 'Just', + value: +it + }; + }, + Int: function(it){ + return { + type: 'Just', + value: +it + }; + }, + Float: function(it){ + return { + type: 'Just', + value: +it + }; + }, + Date: function(value, options){ + var that; + if (that = /^\#([\s\S]*)\#$/.exec(value)) { + return { + type: 'Just', + value: new Date(+that[1] || that[1]) + }; + } else if (options.explicit) { + return { + type: 'Nothing' + }; + } else { + return { + type: 'Just', + value: new Date(+value || value) + }; + } + }, + RegExp: function(value, options){ + var that; + if (that = /^\/([\s\S]*)\/([gimy]*)$/.exec(value)) { + return { + type: 'Just', + value: new RegExp(that[1], that[2]) + }; + } else if (options.explicit) { + return { + type: 'Nothing' + }; + } else { + return { + type: 'Just', + value: new RegExp(value) + }; + } + }, + Array: function(value, options){ + return castArray(value, { + of: [{ + type: '*' + }] + }, options); + }, + Object: function(value, options){ + return castFields(value, { + of: {} + }, options); + }, + String: function(it){ + var that; + if (toString$.call(it).slice(8, -1) !== 'String') { + return { + type: 'Nothing' + }; + } + if (that = it.match(/^'([\s\S]*)'$/)) { + return { + type: 'Just', + value: that[1].replace(/\\'/g, "'") + }; + } else if (that = it.match(/^"([\s\S]*)"$/)) { + return { + type: 'Just', + value: that[1].replace(/\\"/g, '"') + }; + } else { + return { + type: 'Just', + value: it + }; + } + } + }; + function castArray(node, type, options){ + var typeOf, element; + if (toString$.call(node).slice(8, -1) !== 'Array') { + return { + type: 'Nothing' + }; + } + typeOf = type.of; + return { + type: 'Just', + value: (function(){ + var i$, ref$, len$, results$ = []; + for (i$ = 0, len$ = (ref$ = node).length; i$ < len$; ++i$) { + element = ref$[i$]; + results$.push(typesCast(element, typeOf, options)); + } + return results$; + }()) + }; + } + function castTuple(node, type, options){ + var result, i, i$, ref$, len$, types, cast; + if (toString$.call(node).slice(8, -1) !== 'Array') { + return { + type: 'Nothing' + }; + } + result = []; + i = 0; + for (i$ = 0, len$ = (ref$ = type.of).length; i$ < len$; ++i$) { + types = ref$[i$]; + cast = typesCast(node[i], types, options); + if (toString$.call(cast).slice(8, -1) !== 'Undefined') { + result.push(cast); + } + i++; + } + if (node.length <= i) { + return { + type: 'Just', + value: result + }; + } else { + return { + type: 'Nothing' + }; + } + } + function castFields(node, type, options){ + var typeOf, key, value; + if (toString$.call(node).slice(8, -1) !== 'Object') { + return { + type: 'Nothing' + }; + } + typeOf = type.of; + return { + type: 'Just', + value: (function(){ + var ref$, resultObj$ = {}; + for (key in ref$ = node) { + value = ref$[key]; + resultObj$[typesCast(key, [{ + type: 'String' + }], options)] = typesCast(value, typeOf[key] || [{ + type: '*' + }], options); + } + return resultObj$; + }()) + }; + } + function typeCast(node, typeObj, options){ + var type, structure, castFunc, ref$; + type = typeObj.type, structure = typeObj.structure; + if (type) { + castFunc = ((ref$ = options.customTypes[type]) != null ? ref$.cast : void 8) || types[type]; + if (!castFunc) { + throw new Error("Type not defined: " + type + "."); + } + return castFunc(node, options, typesCast); + } else { + switch (structure) { + case 'array': + return castArray(node, typeObj, options); + case 'tuple': + return castTuple(node, typeObj, options); + case 'fields': + return castFields(node, typeObj, options); + } + } + } + function typesCast(node, types, options){ + var i$, len$, type, ref$, valueType, value; + for (i$ = 0, len$ = types.length; i$ < len$; ++i$) { + type = types[i$]; + ref$ = typeCast(node, type, options), valueType = ref$.type, value = ref$.value; + if (valueType === 'Nothing') { + continue; + } + if (parsedTypeCheck([type], value, { + customTypes: options.customTypes + })) { + return value; + } + } + throw new Error("Value " + JSON.stringify(node) + " does not type check against " + JSON.stringify(types) + "."); + } + module.exports = typesCast; +}).call(this); diff --git a/node_modules/levn/lib/coerce.js b/node_modules/levn/lib/coerce.js new file mode 100644 index 0000000..027b6da --- /dev/null +++ b/node_modules/levn/lib/coerce.js @@ -0,0 +1,285 @@ +// Generated by LiveScript 1.2.0 +(function(){ + var parsedTypeCheck, types, toString$ = {}.toString; + parsedTypeCheck = require('type-check').parsedTypeCheck; + types = { + '*': function(it){ + switch (toString$.call(it).slice(8, -1)) { + case 'Array': + return coerceType(it, { + type: 'Array' + }); + case 'Object': + return coerceType(it, { + type: 'Object' + }); + default: + return { + type: 'Just', + value: coerceTypes(it, [ + { + type: 'Undefined' + }, { + type: 'Null' + }, { + type: 'NaN' + }, { + type: 'Boolean' + }, { + type: 'Number' + }, { + type: 'Date' + }, { + type: 'RegExp' + }, { + type: 'Array' + }, { + type: 'Object' + }, { + type: 'String' + } + ], { + explicit: true + }) + }; + } + }, + Undefined: function(it){ + if (it === 'undefined' || it === void 8) { + return { + type: 'Just', + value: void 8 + }; + } else { + return { + type: 'Nothing' + }; + } + }, + Null: function(it){ + if (it === 'null') { + return { + type: 'Just', + value: null + }; + } else { + return { + type: 'Nothing' + }; + } + }, + NaN: function(it){ + if (it === 'NaN') { + return { + type: 'Just', + value: NaN + }; + } else { + return { + type: 'Nothing' + }; + } + }, + Boolean: function(it){ + if (it === 'true') { + return { + type: 'Just', + value: true + }; + } else if (it === 'false') { + return { + type: 'Just', + value: false + }; + } else { + return { + type: 'Nothing' + }; + } + }, + Number: function(it){ + return { + type: 'Just', + value: +it + }; + }, + Int: function(it){ + return { + type: 'Just', + value: parseInt(it) + }; + }, + Float: function(it){ + return { + type: 'Just', + value: parseFloat(it) + }; + }, + Date: function(value, options){ + var that; + if (that = /^\#(.*)\#$/.exec(value)) { + return { + type: 'Just', + value: new Date(+that[1] || that[1]) + }; + } else if (options.explicit) { + return { + type: 'Nothing' + }; + } else { + return { + type: 'Just', + value: new Date(+value || value) + }; + } + }, + RegExp: function(value, options){ + var that; + if (that = /^\/(.*)\/([gimy]*)$/.exec(value)) { + return { + type: 'Just', + value: new RegExp(that[1], that[2]) + }; + } else if (options.explicit) { + return { + type: 'Nothing' + }; + } else { + return { + type: 'Just', + value: new RegExp(value) + }; + } + }, + Array: function(it){ + return coerceArray(it, { + of: [{ + type: '*' + }] + }); + }, + Object: function(it){ + return coerceFields(it, { + of: {} + }); + }, + String: function(it){ + var that; + if (toString$.call(it).slice(8, -1) !== 'String') { + return { + type: 'Nothing' + }; + } + if (that = it.match(/^'(.*)'$/)) { + return { + type: 'Just', + value: that[1] + }; + } else if (that = it.match(/^"(.*)"$/)) { + return { + type: 'Just', + value: that[1] + }; + } else { + return { + type: 'Just', + value: it + }; + } + } + }; + function coerceArray(node, type){ + var typeOf, element; + if (toString$.call(node).slice(8, -1) !== 'Array') { + return { + type: 'Nothing' + }; + } + typeOf = type.of; + return { + type: 'Just', + value: (function(){ + var i$, ref$, len$, results$ = []; + for (i$ = 0, len$ = (ref$ = node).length; i$ < len$; ++i$) { + element = ref$[i$]; + results$.push(coerceTypes(element, typeOf)); + } + return results$; + }()) + }; + } + function coerceTuple(node, type){ + var result, i$, ref$, len$, i, types, that; + if (toString$.call(node).slice(8, -1) !== 'Array') { + return { + type: 'Nothing' + }; + } + result = []; + for (i$ = 0, len$ = (ref$ = type.of).length; i$ < len$; ++i$) { + i = i$; + types = ref$[i$]; + if (that = coerceTypes(node[i], types)) { + result.push(that); + } + } + return { + type: 'Just', + value: result + }; + } + function coerceFields(node, type){ + var typeOf, key, value; + if (toString$.call(node).slice(8, -1) !== 'Object') { + return { + type: 'Nothing' + }; + } + typeOf = type.of; + return { + type: 'Just', + value: (function(){ + var ref$, results$ = {}; + for (key in ref$ = node) { + value = ref$[key]; + results$[key] = coerceTypes(value, typeOf[key] || [{ + type: '*' + }]); + } + return results$; + }()) + }; + } + function coerceType(node, typeObj, options){ + var type, structure, coerceFunc; + type = typeObj.type, structure = typeObj.structure; + if (type) { + coerceFunc = types[type]; + return coerceFunc(node, options); + } else { + switch (structure) { + case 'array': + return coerceArray(node, typeObj); + case 'tuple': + return coerceTuple(node, typeObj); + case 'fields': + return coerceFields(node, typeObj); + } + } + } + function coerceTypes(node, types, options){ + var i$, len$, type, ref$, valueType, value; + for (i$ = 0, len$ = types.length; i$ < len$; ++i$) { + type = types[i$]; + ref$ = coerceType(node, type, options), valueType = ref$.type, value = ref$.value; + if (valueType === 'Nothing') { + continue; + } + if (parsedTypeCheck([type], value)) { + return value; + } + } + throw new Error("Value " + JSON.stringify(node) + " does not type check against " + JSON.stringify(types) + "."); + } + module.exports = coerceTypes; +}).call(this); diff --git a/node_modules/levn/lib/index.js b/node_modules/levn/lib/index.js new file mode 100644 index 0000000..4adae30 --- /dev/null +++ b/node_modules/levn/lib/index.js @@ -0,0 +1,22 @@ +// Generated by LiveScript 1.4.0 +(function(){ + var parseString, cast, parseType, VERSION, parsedTypeParse, parse; + parseString = require('./parse-string'); + cast = require('./cast'); + parseType = require('type-check').parseType; + VERSION = '0.3.0'; + parsedTypeParse = function(parsedType, string, options){ + options == null && (options = {}); + options.explicit == null && (options.explicit = false); + options.customTypes == null && (options.customTypes = {}); + return cast(parseString(parsedType, string, options), parsedType, options); + }; + parse = function(type, string, options){ + return parsedTypeParse(parseType(type), string, options); + }; + module.exports = { + VERSION: VERSION, + parse: parse, + parsedTypeParse: parsedTypeParse + }; +}).call(this); diff --git a/node_modules/levn/lib/parse-string.js b/node_modules/levn/lib/parse-string.js new file mode 100644 index 0000000..d573975 --- /dev/null +++ b/node_modules/levn/lib/parse-string.js @@ -0,0 +1,113 @@ +// Generated by LiveScript 1.4.0 +(function(){ + var reject, special, tokenRegex; + reject = require('prelude-ls').reject; + function consumeOp(tokens, op){ + if (tokens[0] === op) { + return tokens.shift(); + } else { + throw new Error("Expected '" + op + "', but got '" + tokens[0] + "' instead in " + JSON.stringify(tokens) + "."); + } + } + function maybeConsumeOp(tokens, op){ + if (tokens[0] === op) { + return tokens.shift(); + } + } + function consumeList(tokens, arg$, hasDelimiters){ + var open, close, result, untilTest; + open = arg$[0], close = arg$[1]; + if (hasDelimiters) { + consumeOp(tokens, open); + } + result = []; + untilTest = "," + (hasDelimiters ? close : ''); + while (tokens.length && (hasDelimiters && tokens[0] !== close)) { + result.push(consumeElement(tokens, untilTest)); + maybeConsumeOp(tokens, ','); + } + if (hasDelimiters) { + consumeOp(tokens, close); + } + return result; + } + function consumeArray(tokens, hasDelimiters){ + return consumeList(tokens, ['[', ']'], hasDelimiters); + } + function consumeTuple(tokens, hasDelimiters){ + return consumeList(tokens, ['(', ')'], hasDelimiters); + } + function consumeFields(tokens, hasDelimiters){ + var result, untilTest, key; + if (hasDelimiters) { + consumeOp(tokens, '{'); + } + result = {}; + untilTest = "," + (hasDelimiters ? '}' : ''); + while (tokens.length && (!hasDelimiters || tokens[0] !== '}')) { + key = consumeValue(tokens, ':'); + consumeOp(tokens, ':'); + result[key] = consumeElement(tokens, untilTest); + maybeConsumeOp(tokens, ','); + } + if (hasDelimiters) { + consumeOp(tokens, '}'); + } + return result; + } + function consumeValue(tokens, untilTest){ + var out; + untilTest == null && (untilTest = ''); + out = ''; + while (tokens.length && -1 === untilTest.indexOf(tokens[0])) { + out += tokens.shift(); + } + return out; + } + function consumeElement(tokens, untilTest){ + switch (tokens[0]) { + case '[': + return consumeArray(tokens, true); + case '(': + return consumeTuple(tokens, true); + case '{': + return consumeFields(tokens, true); + default: + return consumeValue(tokens, untilTest); + } + } + function consumeTopLevel(tokens, types, options){ + var ref$, type, structure, origTokens, result, finalResult, x$, y$; + ref$ = types[0], type = ref$.type, structure = ref$.structure; + origTokens = tokens.concat(); + if (!options.explicit && types.length === 1 && ((!type && structure) || (type === 'Array' || type === 'Object'))) { + result = structure === 'array' || type === 'Array' + ? consumeArray(tokens, tokens[0] === '[') + : structure === 'tuple' + ? consumeTuple(tokens, tokens[0] === '(') + : consumeFields(tokens, tokens[0] === '{'); + finalResult = tokens.length ? consumeElement(structure === 'array' || type === 'Array' + ? (x$ = origTokens, x$.unshift('['), x$.push(']'), x$) + : (y$ = origTokens, y$.unshift('('), y$.push(')'), y$)) : result; + } else { + finalResult = consumeElement(tokens); + } + return finalResult; + } + special = /\[\]\(\)}{:,/.source; + tokenRegex = RegExp('("(?:\\\\"|[^"])*")|(\'(?:\\\\\'|[^\'])*\')|(/(?:\\\\/|[^/])*/[a-zA-Z]*)|(#.*#)|([' + special + '])|([^\\s' + special + '](?:\\s*[^\\s' + special + ']+)*)|\\s*'); + module.exports = function(types, string, options){ + var tokens, node; + options == null && (options = {}); + if (!options.explicit && types.length === 1 && types[0].type === 'String') { + return "'" + string.replace(/\\'/g, "\\\\'") + "'"; + } + tokens = reject(not$, string.split(tokenRegex)); + node = consumeTopLevel(tokens, types, options); + if (!node) { + throw new Error("Error parsing '" + string + "'."); + } + return node; + }; + function not$(x){ return !x; } +}).call(this); diff --git a/node_modules/levn/lib/parse.js b/node_modules/levn/lib/parse.js new file mode 100644 index 0000000..2beff0f --- /dev/null +++ b/node_modules/levn/lib/parse.js @@ -0,0 +1,102 @@ +// Generated by LiveScript 1.2.0 +(function(){ + var reject, special, tokenRegex; + reject = require('prelude-ls').reject; + function consumeOp(tokens, op){ + if (tokens[0] === op) { + return tokens.shift(); + } else { + throw new Error("Expected '" + op + "', but got '" + tokens[0] + "' instead in " + JSON.stringify(tokens) + "."); + } + } + function maybeConsumeOp(tokens, op){ + if (tokens[0] === op) { + return tokens.shift(); + } + } + function consumeList(tokens, delimiters, hasDelimiters){ + var result; + if (hasDelimiters) { + consumeOp(tokens, delimiters[0]); + } + result = []; + while (tokens.length && tokens[0] !== delimiters[1]) { + result.push(consumeElement(tokens)); + maybeConsumeOp(tokens, ','); + } + if (hasDelimiters) { + consumeOp(tokens, delimiters[1]); + } + return result; + } + function consumeArray(tokens, hasDelimiters){ + return consumeList(tokens, ['[', ']'], hasDelimiters); + } + function consumeTuple(tokens, hasDelimiters){ + return consumeList(tokens, ['(', ')'], hasDelimiters); + } + function consumeFields(tokens, hasDelimiters){ + var result, key; + if (hasDelimiters) { + consumeOp(tokens, '{'); + } + result = {}; + while (tokens.length && (!hasDelimiters || tokens[0] !== '}')) { + key = tokens.shift(); + consumeOp(tokens, ':'); + result[key] = consumeElement(tokens); + maybeConsumeOp(tokens, ','); + } + if (hasDelimiters) { + consumeOp(tokens, '}'); + } + return result; + } + function consumeElement(tokens){ + switch (tokens[0]) { + case '[': + return consumeArray(tokens, true); + case '(': + return consumeTuple(tokens, true); + case '{': + return consumeFields(tokens, true); + default: + return tokens.shift(); + } + } + function consumeTopLevel(tokens, types){ + var ref$, type, structure, origTokens, result, finalResult, x$, y$; + ref$ = types[0], type = ref$.type, structure = ref$.structure; + origTokens = tokens.concat(); + if (types.length === 1 && (structure || (type === 'Array' || type === 'Object'))) { + result = structure === 'array' || type === 'Array' + ? consumeArray(tokens, tokens[0] === '[') + : structure === 'tuple' + ? consumeTuple(tokens, tokens[0] === '(') + : consumeFields(tokens, tokens[0] === '{'); + finalResult = tokens.length ? consumeElement(structure === 'array' || type === 'Array' + ? (x$ = origTokens, x$.unshift('['), x$.push(']'), x$) + : (y$ = origTokens, y$.unshift('('), y$.push(')'), y$)) : result; + } else { + finalResult = consumeElement(tokens); + } + if (tokens.length && origTokens.length) { + throw new Error("Unable to parse " + JSON.stringify(origTokens) + " of type " + JSON.stringify(types) + "."); + } else { + return finalResult; + } + } + special = /\[\]\(\)}{:,/.source; + tokenRegex = RegExp('("(?:[^"]|\\\\")*")|(\'(?:[^\']|\\\\\')*\')|(#.*#)|(/(?:\\\\/|[^/])*/[gimy]*)|([' + special + '])|([^\\s' + special + ']+)|\\s*'); + module.exports = function(string, types){ + var tokens, node; + tokens = reject(function(it){ + return !it || /^\s+$/.test(it); + }, string.split(tokenRegex)); + node = consumeTopLevel(tokens, types); + if (!node) { + throw new Error("Error parsing '" + string + "'."); + } + return node; + }; +}).call(this); diff --git a/node_modules/levn/package.json b/node_modules/levn/package.json new file mode 100644 index 0000000..7d4e7c9 --- /dev/null +++ b/node_modules/levn/package.json @@ -0,0 +1,109 @@ +{ + "_args": [ + [ + { + "raw": "levn@^0.3.0", + "scope": null, + "escapedName": "levn", + "name": "levn", + "rawSpec": "^0.3.0", + "spec": ">=0.3.0 <0.4.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint" + ] + ], + "_from": "levn@>=0.3.0 <0.4.0", + "_id": "levn@0.3.0", + "_inCache": true, + "_location": "/levn", + "_nodeVersion": "4.2.4", + "_npmUser": { + "name": "gkz", + "email": "z@georgezahariev.com" + }, + "_npmVersion": "2.14.12", + "_phantomChildren": {}, + "_requested": { + "raw": "levn@^0.3.0", + "scope": null, + "escapedName": "levn", + "name": "levn", + "rawSpec": "^0.3.0", + "spec": ">=0.3.0 <0.4.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint", + "/optionator" + ], + "_resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "_shasum": "3b09924edf9f083c0490fdd4c0bc4421e04764ee", + "_shrinkwrap": null, + "_spec": "levn@^0.3.0", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint", + "author": { + "name": "George Zahariev", + "email": "z@georgezahariev.com" + }, + "bugs": { + "url": "https://github.com/gkz/levn/issues" + }, + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "description": "Light ECMAScript (JavaScript) Value Notation - human written, concise, typed, flexible", + "devDependencies": { + "istanbul": "~0.4.1", + "livescript": "~1.4.0", + "mocha": "~2.3.4" + }, + "directories": {}, + "dist": { + "shasum": "3b09924edf9f083c0490fdd4c0bc4421e04764ee", + "tarball": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz" + }, + "engines": { + "node": ">= 0.8.0" + }, + "files": [ + "lib", + "README.md", + "LICENSE" + ], + "gitHead": "a92b9acf928282ba81134b4ae8e6a5f29e1f5e1e", + "homepage": "https://github.com/gkz/levn", + "keywords": [ + "levn", + "light", + "ecmascript", + "value", + "notation", + "json", + "typed", + "human", + "concise", + "typed", + "flexible" + ], + "license": "MIT", + "main": "./lib/", + "maintainers": [ + { + "name": "gkz", + "email": "z@georgezahariev.com" + } + ], + "name": "levn", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/gkz/levn.git" + }, + "scripts": { + "test": "make test" + }, + "version": "0.3.0" +} diff --git a/node_modules/lru-cache/LICENSE b/node_modules/lru-cache/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/lru-cache/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/lru-cache/README.md b/node_modules/lru-cache/README.md new file mode 100644 index 0000000..f646c1c --- /dev/null +++ b/node_modules/lru-cache/README.md @@ -0,0 +1,152 @@ +# lru cache + +A cache object that deletes the least-recently-used items. + +[![Build Status](https://travis-ci.org/isaacs/node-lru-cache.svg?branch=master)](https://travis-ci.org/isaacs/node-lru-cache) [![Coverage Status](https://coveralls.io/repos/isaacs/node-lru-cache/badge.svg?service=github)](https://coveralls.io/github/isaacs/node-lru-cache) + +## Installation: + +```javascript +npm install lru-cache --save +``` + +## Usage: + +```javascript +var LRU = require("lru-cache") + , options = { max: 500 + , length: function (n, key) { return n * 2 + key.length } + , dispose: function (key, n) { n.close() } + , maxAge: 1000 * 60 * 60 } + , cache = LRU(options) + , otherCache = LRU(50) // sets just the max size + +cache.set("key", "value") +cache.get("key") // "value" + +// non-string keys ARE fully supported +var someObject = {} +cache.set(someObject, 'a value') +cache.set('[object Object]', 'a different value') +assert.equal(cache.get(someObject), 'a value') + +cache.reset() // empty the cache +``` + +If you put more stuff in it, then items will fall out. + +If you try to put an oversized thing in it, then it'll fall out right +away. + +## Options + +* `max` The maximum size of the cache, checked by applying the length + function to all values in the cache. Not setting this is kind of + silly, since that's the whole purpose of this lib, but it defaults + to `Infinity`. +* `maxAge` Maximum age in ms. Items are not pro-actively pruned out + as they age, but if you try to get an item that is too old, it'll + drop it and return undefined instead of giving it to you. +* `length` Function that is used to calculate the length of stored + items. If you're storing strings or buffers, then you probably want + to do something like `function(n, key){return n.length}`. The default is + `function(){return 1}`, which is fine if you want to store `max` + like-sized things. The item is passed as the first argument, and + the key is passed as the second argumnet. +* `dispose` Function that is called on items when they are dropped + from the cache. This can be handy if you want to close file + descriptors or do other cleanup tasks when items are no longer + accessible. Called with `key, value`. It's called *before* + actually removing the item from the internal cache, so if you want + to immediately put it back in, you'll have to do that in a + `nextTick` or `setTimeout` callback or it won't do anything. +* `stale` By default, if you set a `maxAge`, it'll only actually pull + stale items out of the cache when you `get(key)`. (That is, it's + not pre-emptively doing a `setTimeout` or anything.) If you set + `stale:true`, it'll return the stale value before deleting it. If + you don't set this, then it'll return `undefined` when you try to + get a stale entry, as if it had already been deleted. +* `noDisposeOnSet` By default, if you set a `dispose()` method, then + it'll be called whenever a `set()` operation overwrites an existing + key. If you set this option, `dispose()` will only be called when a + key falls out of the cache, not when it is overwritten. + +## API + +* `set(key, value, maxAge)` +* `get(key) => value` + + Both of these will update the "recently used"-ness of the key. + They do what you think. `maxAge` is optional and overrides the + cache `maxAge` option if provided. + + If the key is not found, `get()` will return `undefined`. + + The key and val can be any value. + +* `peek(key)` + + Returns the key value (or `undefined` if not found) without + updating the "recently used"-ness of the key. + + (If you find yourself using this a lot, you *might* be using the + wrong sort of data structure, but there are some use cases where + it's handy.) + +* `del(key)` + + Deletes a key out of the cache. + +* `reset()` + + Clear the cache entirely, throwing away all values. + +* `has(key)` + + Check if a key is in the cache, without updating the recent-ness + or deleting it for being stale. + +* `forEach(function(value,key,cache), [thisp])` + + Just like `Array.prototype.forEach`. Iterates over all the keys + in the cache, in order of recent-ness. (Ie, more recently used + items are iterated over first.) + +* `rforEach(function(value,key,cache), [thisp])` + + The same as `cache.forEach(...)` but items are iterated over in + reverse order. (ie, less recently used items are iterated over + first.) + +* `keys()` + + Return an array of the keys in the cache. + +* `values()` + + Return an array of the values in the cache. + +* `length` + + Return total length of objects in cache taking into account + `length` options function. + +* `itemCount` + + Return total quantity of objects currently in cache. Note, that + `stale` (see options) items are returned as part of this item + count. + +* `dump()` + + Return an array of the cache entries ready for serialization and usage + with 'destinationCache.load(arr)`. + +* `load(cacheEntriesArray)` + + Loads another cache entries array, obtained with `sourceCache.dump()`, + into the cache. The destination cache is reset before loading new entries + +* `prune()` + + Manually iterates over the entire cache proactively pruning old entries diff --git a/node_modules/lru-cache/index.js b/node_modules/lru-cache/index.js new file mode 100644 index 0000000..460462a --- /dev/null +++ b/node_modules/lru-cache/index.js @@ -0,0 +1,467 @@ +'use strict' + +module.exports = LRUCache + +// This will be a proper iterable 'Map' in engines that support it, +// or a fakey-fake PseudoMap in older versions. +var Map = require('pseudomap') +var util = require('util') + +// A linked list to keep track of recently-used-ness +var Yallist = require('yallist') + +// use symbols if possible, otherwise just _props +var hasSymbol = typeof Symbol === 'function' +var makeSymbol +if (hasSymbol) { + makeSymbol = function (key) { + return Symbol.for(key) + } +} else { + makeSymbol = function (key) { + return '_' + key + } +} + +var MAX = makeSymbol('max') +var LENGTH = makeSymbol('length') +var LENGTH_CALCULATOR = makeSymbol('lengthCalculator') +var ALLOW_STALE = makeSymbol('allowStale') +var MAX_AGE = makeSymbol('maxAge') +var DISPOSE = makeSymbol('dispose') +var NO_DISPOSE_ON_SET = makeSymbol('noDisposeOnSet') +var LRU_LIST = makeSymbol('lruList') +var CACHE = makeSymbol('cache') + +function naiveLength () { return 1 } + +// lruList is a yallist where the head is the youngest +// item, and the tail is the oldest. the list contains the Hit +// objects as the entries. +// Each Hit object has a reference to its Yallist.Node. This +// never changes. +// +// cache is a Map (or PseudoMap) that matches the keys to +// the Yallist.Node object. +function LRUCache (options) { + if (!(this instanceof LRUCache)) { + return new LRUCache(options) + } + + if (typeof options === 'number') { + options = { max: options } + } + + if (!options) { + options = {} + } + + var max = this[MAX] = options.max + // Kind of weird to have a default max of Infinity, but oh well. + if (!max || + !(typeof max === 'number') || + max <= 0) { + this[MAX] = Infinity + } + + var lc = options.length || naiveLength + if (typeof lc !== 'function') { + lc = naiveLength + } + this[LENGTH_CALCULATOR] = lc + + this[ALLOW_STALE] = options.stale || false + this[MAX_AGE] = options.maxAge || 0 + this[DISPOSE] = options.dispose + this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false + this.reset() +} + +// resize the cache when the max changes. +Object.defineProperty(LRUCache.prototype, 'max', { + set: function (mL) { + if (!mL || !(typeof mL === 'number') || mL <= 0) { + mL = Infinity + } + this[MAX] = mL + trim(this) + }, + get: function () { + return this[MAX] + }, + enumerable: true +}) + +Object.defineProperty(LRUCache.prototype, 'allowStale', { + set: function (allowStale) { + this[ALLOW_STALE] = !!allowStale + }, + get: function () { + return this[ALLOW_STALE] + }, + enumerable: true +}) + +Object.defineProperty(LRUCache.prototype, 'maxAge', { + set: function (mA) { + if (!mA || !(typeof mA === 'number') || mA < 0) { + mA = 0 + } + this[MAX_AGE] = mA + trim(this) + }, + get: function () { + return this[MAX_AGE] + }, + enumerable: true +}) + +// resize the cache when the lengthCalculator changes. +Object.defineProperty(LRUCache.prototype, 'lengthCalculator', { + set: function (lC) { + if (typeof lC !== 'function') { + lC = naiveLength + } + if (lC !== this[LENGTH_CALCULATOR]) { + this[LENGTH_CALCULATOR] = lC + this[LENGTH] = 0 + this[LRU_LIST].forEach(function (hit) { + hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key) + this[LENGTH] += hit.length + }, this) + } + trim(this) + }, + get: function () { return this[LENGTH_CALCULATOR] }, + enumerable: true +}) + +Object.defineProperty(LRUCache.prototype, 'length', { + get: function () { return this[LENGTH] }, + enumerable: true +}) + +Object.defineProperty(LRUCache.prototype, 'itemCount', { + get: function () { return this[LRU_LIST].length }, + enumerable: true +}) + +LRUCache.prototype.rforEach = function (fn, thisp) { + thisp = thisp || this + for (var walker = this[LRU_LIST].tail; walker !== null;) { + var prev = walker.prev + forEachStep(this, fn, walker, thisp) + walker = prev + } +} + +function forEachStep (self, fn, node, thisp) { + var hit = node.value + if (isStale(self, hit)) { + del(self, node) + if (!self[ALLOW_STALE]) { + hit = undefined + } + } + if (hit) { + fn.call(thisp, hit.value, hit.key, self) + } +} + +LRUCache.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + for (var walker = this[LRU_LIST].head; walker !== null;) { + var next = walker.next + forEachStep(this, fn, walker, thisp) + walker = next + } +} + +LRUCache.prototype.keys = function () { + return this[LRU_LIST].toArray().map(function (k) { + return k.key + }, this) +} + +LRUCache.prototype.values = function () { + return this[LRU_LIST].toArray().map(function (k) { + return k.value + }, this) +} + +LRUCache.prototype.reset = function () { + if (this[DISPOSE] && + this[LRU_LIST] && + this[LRU_LIST].length) { + this[LRU_LIST].forEach(function (hit) { + this[DISPOSE](hit.key, hit.value) + }, this) + } + + this[CACHE] = new Map() // hash of items by key + this[LRU_LIST] = new Yallist() // list of items in order of use recency + this[LENGTH] = 0 // length of items in the list +} + +LRUCache.prototype.dump = function () { + return this[LRU_LIST].map(function (hit) { + if (!isStale(this, hit)) { + return { + k: hit.key, + v: hit.value, + e: hit.now + (hit.maxAge || 0) + } + } + }, this).toArray().filter(function (h) { + return h + }) +} + +LRUCache.prototype.dumpLru = function () { + return this[LRU_LIST] +} + +LRUCache.prototype.inspect = function (n, opts) { + var str = 'LRUCache {' + var extras = false + + var as = this[ALLOW_STALE] + if (as) { + str += '\n allowStale: true' + extras = true + } + + var max = this[MAX] + if (max && max !== Infinity) { + if (extras) { + str += ',' + } + str += '\n max: ' + util.inspect(max, opts) + extras = true + } + + var maxAge = this[MAX_AGE] + if (maxAge) { + if (extras) { + str += ',' + } + str += '\n maxAge: ' + util.inspect(maxAge, opts) + extras = true + } + + var lc = this[LENGTH_CALCULATOR] + if (lc && lc !== naiveLength) { + if (extras) { + str += ',' + } + str += '\n length: ' + util.inspect(this[LENGTH], opts) + extras = true + } + + var didFirst = false + this[LRU_LIST].forEach(function (item) { + if (didFirst) { + str += ',\n ' + } else { + if (extras) { + str += ',\n' + } + didFirst = true + str += '\n ' + } + var key = util.inspect(item.key).split('\n').join('\n ') + var val = { value: item.value } + if (item.maxAge !== maxAge) { + val.maxAge = item.maxAge + } + if (lc !== naiveLength) { + val.length = item.length + } + if (isStale(this, item)) { + val.stale = true + } + + val = util.inspect(val, opts).split('\n').join('\n ') + str += key + ' => ' + val + }) + + if (didFirst || extras) { + str += '\n' + } + str += '}' + + return str +} + +LRUCache.prototype.set = function (key, value, maxAge) { + maxAge = maxAge || this[MAX_AGE] + + var now = maxAge ? Date.now() : 0 + var len = this[LENGTH_CALCULATOR](value, key) + + if (this[CACHE].has(key)) { + if (len > this[MAX]) { + del(this, this[CACHE].get(key)) + return false + } + + var node = this[CACHE].get(key) + var item = node.value + + // dispose of the old one before overwriting + // split out into 2 ifs for better coverage tracking + if (this[DISPOSE]) { + if (!this[NO_DISPOSE_ON_SET]) { + this[DISPOSE](key, item.value) + } + } + + item.now = now + item.maxAge = maxAge + item.value = value + this[LENGTH] += len - item.length + item.length = len + this.get(key) + trim(this) + return true + } + + var hit = new Entry(key, value, len, now, maxAge) + + // oversized objects fall out of cache automatically. + if (hit.length > this[MAX]) { + if (this[DISPOSE]) { + this[DISPOSE](key, value) + } + return false + } + + this[LENGTH] += hit.length + this[LRU_LIST].unshift(hit) + this[CACHE].set(key, this[LRU_LIST].head) + trim(this) + return true +} + +LRUCache.prototype.has = function (key) { + if (!this[CACHE].has(key)) return false + var hit = this[CACHE].get(key).value + if (isStale(this, hit)) { + return false + } + return true +} + +LRUCache.prototype.get = function (key) { + return get(this, key, true) +} + +LRUCache.prototype.peek = function (key) { + return get(this, key, false) +} + +LRUCache.prototype.pop = function () { + var node = this[LRU_LIST].tail + if (!node) return null + del(this, node) + return node.value +} + +LRUCache.prototype.del = function (key) { + del(this, this[CACHE].get(key)) +} + +LRUCache.prototype.load = function (arr) { + // reset the cache + this.reset() + + var now = Date.now() + // A previous serialized cache has the most recent items first + for (var l = arr.length - 1; l >= 0; l--) { + var hit = arr[l] + var expiresAt = hit.e || 0 + if (expiresAt === 0) { + // the item was created without expiration in a non aged cache + this.set(hit.k, hit.v) + } else { + var maxAge = expiresAt - now + // dont add already expired items + if (maxAge > 0) { + this.set(hit.k, hit.v, maxAge) + } + } + } +} + +LRUCache.prototype.prune = function () { + var self = this + this[CACHE].forEach(function (value, key) { + get(self, key, false) + }) +} + +function get (self, key, doUse) { + var node = self[CACHE].get(key) + if (node) { + var hit = node.value + if (isStale(self, hit)) { + del(self, node) + if (!self[ALLOW_STALE]) hit = undefined + } else { + if (doUse) { + self[LRU_LIST].unshiftNode(node) + } + } + if (hit) hit = hit.value + } + return hit +} + +function isStale (self, hit) { + if (!hit || (!hit.maxAge && !self[MAX_AGE])) { + return false + } + var stale = false + var diff = Date.now() - hit.now + if (hit.maxAge) { + stale = diff > hit.maxAge + } else { + stale = self[MAX_AGE] && (diff > self[MAX_AGE]) + } + return stale +} + +function trim (self) { + if (self[LENGTH] > self[MAX]) { + for (var walker = self[LRU_LIST].tail; + self[LENGTH] > self[MAX] && walker !== null;) { + // We know that we're about to delete this one, and also + // what the next least recently used key will be, so just + // go ahead and set it now. + var prev = walker.prev + del(self, walker) + walker = prev + } + } +} + +function del (self, node) { + if (node) { + var hit = node.value + if (self[DISPOSE]) { + self[DISPOSE](hit.key, hit.value) + } + self[LENGTH] -= hit.length + self[CACHE].delete(hit.key) + self[LRU_LIST].removeNode(node) + } +} + +// classy, since V8 prefers predictable objects. +function Entry (key, value, length, now, maxAge) { + this.key = key + this.value = value + this.length = length + this.now = now + this.maxAge = maxAge || 0 +} diff --git a/node_modules/lru-cache/package.json b/node_modules/lru-cache/package.json new file mode 100644 index 0000000..34f21a2 --- /dev/null +++ b/node_modules/lru-cache/package.json @@ -0,0 +1,108 @@ +{ + "_args": [ + [ + { + "raw": "lru-cache@^4.0.1", + "scope": null, + "escapedName": "lru-cache", + "name": "lru-cache", + "rawSpec": "^4.0.1", + "spec": ">=4.0.1 <5.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\cross-spawn" + ] + ], + "_from": "lru-cache@>=4.0.1 <5.0.0", + "_id": "lru-cache@4.1.1", + "_inCache": true, + "_location": "/lru-cache", + "_nodeVersion": "8.0.0", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/lru-cache-4.1.1.tgz_1497150046014_0.012352559482678771" + }, + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "5.0.3", + "_phantomChildren": {}, + "_requested": { + "raw": "lru-cache@^4.0.1", + "scope": null, + "escapedName": "lru-cache", + "name": "lru-cache", + "rawSpec": "^4.0.1", + "spec": ">=4.0.1 <5.0.0", + "type": "range" + }, + "_requiredBy": [ + "/cross-spawn" + ], + "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", + "_shasum": "622e32e82488b49279114a4f9ecf45e7cd6bba55", + "_shrinkwrap": null, + "_spec": "lru-cache@^4.0.1", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\cross-spawn", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me" + }, + "bugs": { + "url": "https://github.com/isaacs/node-lru-cache/issues" + }, + "dependencies": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + }, + "description": "A cache object that deletes the least-recently-used items.", + "devDependencies": { + "benchmark": "^2.1.4", + "standard": "^5.4.1", + "tap": "^10.3.3" + }, + "directories": {}, + "dist": { + "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", + "shasum": "622e32e82488b49279114a4f9ecf45e7cd6bba55", + "tarball": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz" + }, + "files": [ + "index.js" + ], + "gitHead": "e992f26547a575299fc8d232580e53229393ea7a", + "homepage": "https://github.com/isaacs/node-lru-cache#readme", + "keywords": [ + "mru", + "lru", + "cache" + ], + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + } + ], + "name": "lru-cache", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-lru-cache.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "posttest": "standard test/*.js index.js", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test/*.js --100 -J" + }, + "version": "4.1.1" +} diff --git a/node_modules/mimic-fn/index.js b/node_modules/mimic-fn/index.js new file mode 100644 index 0000000..08e69d3 --- /dev/null +++ b/node_modules/mimic-fn/index.js @@ -0,0 +1,9 @@ +'use strict'; +module.exports = (to, from) => { + // TODO: use `Reflect.ownKeys()` when targeting Node.js 6 + for (const prop of Object.getOwnPropertyNames(from).concat(Object.getOwnPropertySymbols(from))) { + Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop)); + } + + return to; +}; diff --git a/node_modules/mimic-fn/license b/node_modules/mimic-fn/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/mimic-fn/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/mimic-fn/package.json b/node_modules/mimic-fn/package.json new file mode 100644 index 0000000..24a2c69 --- /dev/null +++ b/node_modules/mimic-fn/package.json @@ -0,0 +1,109 @@ +{ + "_args": [ + [ + { + "raw": "mimic-fn@^1.0.0", + "scope": null, + "escapedName": "mimic-fn", + "name": "mimic-fn", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\inquirer\\node_modules\\onetime" + ] + ], + "_from": "mimic-fn@>=1.0.0 <2.0.0", + "_id": "mimic-fn@1.2.0", + "_inCache": true, + "_location": "/mimic-fn", + "_nodeVersion": "8.9.4", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/mimic-fn-1.2.0.tgz_1517542098165_0.264689544448629" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "5.6.0", + "_phantomChildren": {}, + "_requested": { + "raw": "mimic-fn@^1.0.0", + "scope": null, + "escapedName": "mimic-fn", + "name": "mimic-fn", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/inquirer/onetime" + ], + "_resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "_shasum": "820c86a39334640e99516928bd03fca88057d022", + "_shrinkwrap": null, + "_spec": "mimic-fn@^1.0.0", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\inquirer\\node_modules\\onetime", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/mimic-fn/issues" + }, + "dependencies": {}, + "description": "Make a function mimic another one", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "shasum": "820c86a39334640e99516928bd03fca88057d022", + "tarball": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "d762fc495eef1e48718e1f39b82c39ff5e95dfe4", + "homepage": "https://github.com/sindresorhus/mimic-fn#readme", + "keywords": [ + "function", + "mimic", + "imitate", + "rename", + "copy", + "inherit", + "properties", + "name", + "func", + "fn", + "set", + "infer", + "change" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "mimic-fn", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/mimic-fn.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.2.0" +} diff --git a/node_modules/mimic-fn/readme.md b/node_modules/mimic-fn/readme.md new file mode 100644 index 0000000..e575734 --- /dev/null +++ b/node_modules/mimic-fn/readme.md @@ -0,0 +1,68 @@ +# mimic-fn [![Build Status](https://travis-ci.org/sindresorhus/mimic-fn.svg?branch=master)](https://travis-ci.org/sindresorhus/mimic-fn) + +> Make a function mimic another one + +Useful when you wrap a function in another function and like to preserve the original name and other properties. + + +## Install + +``` +$ npm install mimic-fn +``` + + +## Usage + +```js +const mimicFn = require('mimic-fn'); + +function foo() {} +foo.unicorn = '🦄'; + +function wrapper() { + return foo() {}; +} + +console.log(wrapper.name); +//=> 'wrapper' + +mimicFn(wrapper, foo); + +console.log(wrapper.name); +//=> 'foo' + +console.log(wrapper.unicorn); +//=> '🦄' +``` + + +## API + +It will copy over the properties `name`, `length`, `displayName`, and any custom properties you may have set. + +### mimicFn(to, from) + +It will modify `to` and return it. + +#### to + +Type: `Function` + +Mimicking function. + +#### from + +Type: `Function` + +Function to mimic. + + +## Related + +- [rename-fn](https://github.com/sindresorhus/rename-fn) - Rename a function + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/mute-stream/.nyc_output/33508.json b/node_modules/mute-stream/.nyc_output/33508.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/node_modules/mute-stream/.nyc_output/33508.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/node_modules/mute-stream/.nyc_output/33510.json b/node_modules/mute-stream/.nyc_output/33510.json new file mode 100644 index 0000000..1d04442 --- /dev/null +++ b/node_modules/mute-stream/.nyc_output/33510.json @@ -0,0 +1 @@ +{"./mute.js":{"path":"./mute.js","s":{"1":1,"2":1,"3":1,"4":7,"5":7,"6":7,"7":7,"8":7,"9":7,"10":7,"11":7,"12":1,"13":1,"14":1,"15":10,"16":1,"17":6,"18":1,"19":1,"20":5,"21":1,"22":1,"23":8,"24":1,"25":2,"26":1,"27":5,"28":1,"29":5,"30":1,"31":2,"32":2,"33":1,"34":2,"35":2,"36":1,"37":2,"38":2,"39":1,"40":25,"41":13,"42":5,"43":8,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":8,"51":0,"52":0,"53":0,"54":8,"55":20,"56":1,"57":2,"58":2,"59":0,"60":2,"61":2,"62":0,"63":2,"64":1,"65":3,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":1,"73":1,"74":1},"b":{"1":[7,5],"2":[7,7],"3":[3,5],"4":[3,2],"5":[4,1],"6":[0,1],"7":[4,1],"8":[0,1],"9":[2,0],"10":[2,0],"11":[13,12],"12":[5,8],"13":[0,8],"14":[0,0],"15":[0,8],"16":[8,0,0],"17":[2,0],"18":[0,2],"19":[2,1],"20":[0,2],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0]},"f":{"1":7,"2":10,"3":6,"4":5,"5":8,"6":2,"7":5,"8":5,"9":2,"10":2,"11":2,"12":25,"13":2,"14":3,"15":0},"fnMap":{"1":{"name":"MuteStream","line":7,"loc":{"start":{"line":7,"column":0},"end":{"line":7,"column":27}}},"2":{"name":"(anonymous_2)","line":29,"loc":{"start":{"line":29,"column":28},"end":{"line":29,"column":40}}},"3":{"name":"(anonymous_3)","line":33,"loc":{"start":{"line":33,"column":30},"end":{"line":33,"column":42}}},"4":{"name":"onPipe","line":44,"loc":{"start":{"line":44,"column":0},"end":{"line":44,"column":22}}},"5":{"name":"getIsTTY","line":55,"loc":{"start":{"line":55,"column":0},"end":{"line":55,"column":21}}},"6":{"name":"setIsTTY","line":63,"loc":{"start":{"line":63,"column":0},"end":{"line":63,"column":26}}},"7":{"name":"(anonymous_7)","line":73,"loc":{"start":{"line":73,"column":7},"end":{"line":73,"column":19}}},"8":{"name":"(anonymous_8)","line":80,"loc":{"start":{"line":80,"column":7},"end":{"line":80,"column":19}}},"9":{"name":"(anonymous_9)","line":87,"loc":{"start":{"line":87,"column":28},"end":{"line":87,"column":53}}},"10":{"name":"(anonymous_10)","line":92,"loc":{"start":{"line":92,"column":29},"end":{"line":92,"column":41}}},"11":{"name":"(anonymous_11)","line":96,"loc":{"start":{"line":96,"column":30},"end":{"line":96,"column":42}}},"12":{"name":"(anonymous_12)","line":100,"loc":{"start":{"line":100,"column":29},"end":{"line":100,"column":42}}},"13":{"name":"(anonymous_13)","line":124,"loc":{"start":{"line":124,"column":27},"end":{"line":124,"column":40}}},"14":{"name":"proxy","line":136,"loc":{"start":{"line":136,"column":0},"end":{"line":136,"column":20}}},"15":{"name":"(anonymous_15)","line":136,"loc":{"start":{"line":136,"column":29},"end":{"line":136,"column":41}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":30}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":27}},"3":{"start":{"line":7,"column":0},"end":{"line":20,"column":1}},"4":{"start":{"line":8,"column":2},"end":{"line":8,"column":20}},"5":{"start":{"line":9,"column":2},"end":{"line":9,"column":19}},"6":{"start":{"line":10,"column":2},"end":{"line":10,"column":38}},"7":{"start":{"line":11,"column":2},"end":{"line":11,"column":20}},"8":{"start":{"line":12,"column":2},"end":{"line":12,"column":31}},"9":{"start":{"line":13,"column":2},"end":{"line":13,"column":29}},"10":{"start":{"line":18,"column":2},"end":{"line":18,"column":36}},"11":{"start":{"line":19,"column":2},"end":{"line":19,"column":26}},"12":{"start":{"line":22,"column":0},"end":{"line":22,"column":54}},"13":{"start":{"line":24,"column":0},"end":{"line":27,"column":2}},"14":{"start":{"line":29,"column":0},"end":{"line":31,"column":1}},"15":{"start":{"line":30,"column":2},"end":{"line":30,"column":19}},"16":{"start":{"line":33,"column":0},"end":{"line":35,"column":1}},"17":{"start":{"line":34,"column":2},"end":{"line":34,"column":20}},"18":{"start":{"line":37,"column":0},"end":{"line":42,"column":2}},"19":{"start":{"line":44,"column":0},"end":{"line":46,"column":1}},"20":{"start":{"line":45,"column":2},"end":{"line":45,"column":17}},"21":{"start":{"line":48,"column":0},"end":{"line":53,"column":2}},"22":{"start":{"line":55,"column":0},"end":{"line":60,"column":1}},"23":{"start":{"line":56,"column":2},"end":{"line":59,"column":9}},"24":{"start":{"line":63,"column":0},"end":{"line":70,"column":1}},"25":{"start":{"line":64,"column":2},"end":{"line":69,"column":4}},"26":{"start":{"line":72,"column":0},"end":{"line":77,"column":44}},"27":{"start":{"line":74,"column":4},"end":{"line":76,"column":23}},"28":{"start":{"line":79,"column":0},"end":{"line":84,"column":44}},"29":{"start":{"line":81,"column":4},"end":{"line":83,"column":23}},"30":{"start":{"line":87,"column":0},"end":{"line":90,"column":1}},"31":{"start":{"line":88,"column":2},"end":{"line":88,"column":19}},"32":{"start":{"line":89,"column":2},"end":{"line":89,"column":56}},"33":{"start":{"line":92,"column":0},"end":{"line":94,"column":1}},"34":{"start":{"line":93,"column":2},"end":{"line":93,"column":41}},"35":{"start":{"line":93,"column":17},"end":{"line":93,"column":41}},"36":{"start":{"line":96,"column":0},"end":{"line":98,"column":1}},"37":{"start":{"line":97,"column":2},"end":{"line":97,"column":42}},"38":{"start":{"line":97,"column":17},"end":{"line":97,"column":42}},"39":{"start":{"line":100,"column":0},"end":{"line":122,"column":1}},"40":{"start":{"line":101,"column":2},"end":{"line":120,"column":3}},"41":{"start":{"line":102,"column":4},"end":{"line":102,"column":34}},"42":{"start":{"line":102,"column":23},"end":{"line":102,"column":34}},"43":{"start":{"line":103,"column":4},"end":{"line":119,"column":5}},"44":{"start":{"line":104,"column":6},"end":{"line":108,"column":7}},"45":{"start":{"line":105,"column":8},"end":{"line":105,"column":42}},"46":{"start":{"line":106,"column":8},"end":{"line":106,"column":42}},"47":{"start":{"line":107,"column":8},"end":{"line":107,"column":29}},"48":{"start":{"line":109,"column":6},"end":{"line":109,"column":29}},"49":{"start":{"line":110,"column":6},"end":{"line":110,"column":33}},"50":{"start":{"line":112,"column":6},"end":{"line":117,"column":7}},"51":{"start":{"line":114,"column":8},"end":{"line":114,"column":32}},"52":{"start":{"line":115,"column":8},"end":{"line":115,"column":39}},"53":{"start":{"line":116,"column":8},"end":{"line":116,"column":41}},"54":{"start":{"line":118,"column":6},"end":{"line":118,"column":50}},"55":{"start":{"line":121,"column":2},"end":{"line":121,"column":22}},"56":{"start":{"line":124,"column":0},"end":{"line":134,"column":1}},"57":{"start":{"line":125,"column":2},"end":{"line":131,"column":3}},"58":{"start":{"line":126,"column":4},"end":{"line":130,"column":5}},"59":{"start":{"line":127,"column":6},"end":{"line":127,"column":50}},"60":{"start":{"line":129,"column":6},"end":{"line":129,"column":14}},"61":{"start":{"line":132,"column":2},"end":{"line":132,"column":29}},"62":{"start":{"line":132,"column":9},"end":{"line":132,"column":29}},"63":{"start":{"line":133,"column":2},"end":{"line":133,"column":18}},"64":{"start":{"line":136,"column":0},"end":{"line":141,"column":2}},"65":{"start":{"line":136,"column":22},"end":{"line":141,"column":1}},"66":{"start":{"line":137,"column":2},"end":{"line":137,"column":20}},"67":{"start":{"line":138,"column":2},"end":{"line":138,"column":19}},"68":{"start":{"line":139,"column":2},"end":{"line":139,"column":43}},"69":{"start":{"line":139,"column":18},"end":{"line":139,"column":43}},"70":{"start":{"line":140,"column":2},"end":{"line":140,"column":43}},"71":{"start":{"line":140,"column":18},"end":{"line":140,"column":43}},"72":{"start":{"line":143,"column":0},"end":{"line":143,"column":47}},"73":{"start":{"line":144,"column":0},"end":{"line":144,"column":55}},"74":{"start":{"line":145,"column":0},"end":{"line":145,"column":43}}},"branchMap":{"1":{"line":9,"type":"binary-expr","locations":[{"start":{"line":9,"column":9},"end":{"line":9,"column":13}},{"start":{"line":9,"column":17},"end":{"line":9,"column":19}}]},"2":{"line":18,"type":"binary-expr","locations":[{"start":{"line":18,"column":17},"end":{"line":18,"column":28}},{"start":{"line":18,"column":32},"end":{"line":18,"column":36}}]},"3":{"line":56,"type":"cond-expr","locations":[{"start":{"line":56,"column":25},"end":{"line":56,"column":41}},{"start":{"line":57,"column":10},"end":{"line":58,"column":15}}]},"4":{"line":57,"type":"cond-expr","locations":[{"start":{"line":57,"column":24},"end":{"line":57,"column":39}},{"start":{"line":58,"column":10},"end":{"line":58,"column":15}}]},"5":{"line":74,"type":"cond-expr","locations":[{"start":{"line":74,"column":25},"end":{"line":74,"column":40}},{"start":{"line":75,"column":12},"end":{"line":76,"column":21}}]},"6":{"line":75,"type":"cond-expr","locations":[{"start":{"line":75,"column":24},"end":{"line":75,"column":38}},{"start":{"line":76,"column":12},"end":{"line":76,"column":21}}]},"7":{"line":81,"type":"cond-expr","locations":[{"start":{"line":81,"column":25},"end":{"line":81,"column":43}},{"start":{"line":82,"column":12},"end":{"line":83,"column":21}}]},"8":{"line":82,"type":"cond-expr","locations":[{"start":{"line":82,"column":24},"end":{"line":82,"column":41}},{"start":{"line":83,"column":12},"end":{"line":83,"column":21}}]},"9":{"line":93,"type":"if","locations":[{"start":{"line":93,"column":2},"end":{"line":93,"column":2}},{"start":{"line":93,"column":2},"end":{"line":93,"column":2}}]},"10":{"line":97,"type":"if","locations":[{"start":{"line":97,"column":2},"end":{"line":97,"column":2}},{"start":{"line":97,"column":2},"end":{"line":97,"column":2}}]},"11":{"line":101,"type":"if","locations":[{"start":{"line":101,"column":2},"end":{"line":101,"column":2}},{"start":{"line":101,"column":2},"end":{"line":101,"column":2}}]},"12":{"line":102,"type":"if","locations":[{"start":{"line":102,"column":4},"end":{"line":102,"column":4}},{"start":{"line":102,"column":4},"end":{"line":102,"column":4}}]},"13":{"line":103,"type":"if","locations":[{"start":{"line":103,"column":4},"end":{"line":103,"column":4}},{"start":{"line":103,"column":4},"end":{"line":103,"column":4}}]},"14":{"line":104,"type":"if","locations":[{"start":{"line":104,"column":6},"end":{"line":104,"column":6}},{"start":{"line":104,"column":6},"end":{"line":104,"column":6}}]},"15":{"line":112,"type":"if","locations":[{"start":{"line":112,"column":6},"end":{"line":112,"column":6}},{"start":{"line":112,"column":6},"end":{"line":112,"column":6}}]},"16":{"line":112,"type":"binary-expr","locations":[{"start":{"line":112,"column":10},"end":{"line":112,"column":22}},{"start":{"line":112,"column":26},"end":{"line":112,"column":42}},{"start":{"line":113,"column":10},"end":{"line":113,"column":39}}]},"17":{"line":125,"type":"if","locations":[{"start":{"line":125,"column":2},"end":{"line":125,"column":2}},{"start":{"line":125,"column":2},"end":{"line":125,"column":2}}]},"18":{"line":126,"type":"if","locations":[{"start":{"line":126,"column":4},"end":{"line":126,"column":4}},{"start":{"line":126,"column":4},"end":{"line":126,"column":4}}]},"19":{"line":126,"type":"binary-expr","locations":[{"start":{"line":126,"column":8},"end":{"line":126,"column":9}},{"start":{"line":126,"column":13},"end":{"line":126,"column":25}}]},"20":{"line":132,"type":"if","locations":[{"start":{"line":132,"column":2},"end":{"line":132,"column":2}},{"start":{"line":132,"column":2},"end":{"line":132,"column":2}}]},"21":{"line":139,"type":"if","locations":[{"start":{"line":139,"column":2},"end":{"line":139,"column":2}},{"start":{"line":139,"column":2},"end":{"line":139,"column":2}}]},"22":{"line":139,"type":"binary-expr","locations":[{"start":{"line":139,"column":6},"end":{"line":139,"column":7}},{"start":{"line":139,"column":11},"end":{"line":139,"column":16}}]},"23":{"line":140,"type":"if","locations":[{"start":{"line":140,"column":2},"end":{"line":140,"column":2}},{"start":{"line":140,"column":2},"end":{"line":140,"column":2}}]},"24":{"line":140,"type":"binary-expr","locations":[{"start":{"line":140,"column":6},"end":{"line":140,"column":7}},{"start":{"line":140,"column":11},"end":{"line":140,"column":16}}]}}}} \ No newline at end of file diff --git a/node_modules/mute-stream/.travis.yml b/node_modules/mute-stream/.travis.yml new file mode 100644 index 0000000..99f2bbf --- /dev/null +++ b/node_modules/mute-stream/.travis.yml @@ -0,0 +1,9 @@ +language: node_js +language: node_js +node_js: + - '0.8' + - '0.10' + - '0.12' + - 'iojs' +before_install: + - npm install -g npm@latest diff --git a/node_modules/mute-stream/LICENSE b/node_modules/mute-stream/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/mute-stream/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/mute-stream/README.md b/node_modules/mute-stream/README.md new file mode 100644 index 0000000..8ab1238 --- /dev/null +++ b/node_modules/mute-stream/README.md @@ -0,0 +1,68 @@ +# mute-stream + +Bytes go in, but they don't come out (when muted). + +This is a basic pass-through stream, but when muted, the bytes are +silently dropped, rather than being passed through. + +## Usage + +```javascript +var MuteStream = require('mute-stream') + +var ms = new MuteStream(options) + +ms.pipe(process.stdout) +ms.write('foo') // writes 'foo' to stdout +ms.mute() +ms.write('bar') // does not write 'bar' +ms.unmute() +ms.write('baz') // writes 'baz' to stdout + +// can also be used to mute incoming data +var ms = new MuteStream +input.pipe(ms) + +ms.on('data', function (c) { + console.log('data: ' + c) +}) + +input.emit('data', 'foo') // logs 'foo' +ms.mute() +input.emit('data', 'bar') // does not log 'bar' +ms.unmute() +input.emit('data', 'baz') // logs 'baz' +``` + +## Options + +All options are optional. + +* `replace` Set to a string to replace each character with the + specified string when muted. (So you can show `****` instead of the + password, for example.) + +* `prompt` If you are using a replacement char, and also using a + prompt with a readline stream (as for a `Password: *****` input), + then specify what the prompt is so that backspace will work + properly. Otherwise, pressing backspace will overwrite the prompt + with the replacement character, which is weird. + +## ms.mute() + +Set `muted` to `true`. Turns `.write()` into a no-op. + +## ms.unmute() + +Set `muted` to `false` + +## ms.isTTY + +True if the pipe destination is a TTY, or if the incoming pipe source is +a TTY. + +## Other stream methods... + +The other standard readable and writable stream methods are all +available. The MuteStream object acts as a facade to its pipe source +and destination. diff --git a/node_modules/mute-stream/coverage/lcov-report/__root__/index.html b/node_modules/mute-stream/coverage/lcov-report/__root__/index.html new file mode 100644 index 0000000..de0934d --- /dev/null +++ b/node_modules/mute-stream/coverage/lcov-report/__root__/index.html @@ -0,0 +1,93 @@ + + + + Code coverage report for __root__/ + + + + + + + +
+
+

+ all files __root__/ +

+
+
+ 77.03% + Statements + 57/74 +
+
+ 57.14% + Branches + 28/49 +
+
+ 93.33% + Functions + 14/15 +
+
+ 79.1% + Lines + 53/67 +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
mute.js
77.03%57/7457.14%28/4993.33%14/1579.1%53/67
+
+
+ + + + + + + diff --git a/node_modules/mute-stream/coverage/lcov-report/__root__/mute.js.html b/node_modules/mute-stream/coverage/lcov-report/__root__/mute.js.html new file mode 100644 index 0000000..375a832 --- /dev/null +++ b/node_modules/mute-stream/coverage/lcov-report/__root__/mute.js.html @@ -0,0 +1,500 @@ + + + + Code coverage report for mute.js + + + + + + + +
+
+

+ all files / __root__/ mute.js +

+
+
+ 77.03% + Statements + 57/74 +
+
+ 57.14% + Branches + 28/49 +
+
+ 93.33% + Functions + 14/15 +
+
+ 79.1% + Lines + 53/67 +
+
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +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 +1461× +  +1× +  +  +  +1× +7× +7× +7× +7× +7× +7× +  +  +  +  +7× +7× +  +  +1× +  +1× +  +  +  +  +1× +10× +  +  +1× +6× +  +  +1× +  +  +  +  +  +  +1× +5× +  +  +1× +  +  +  +  +  +  +1× +8× +  +  +  +  +  +  +1× +2× +  +  +  +  +  +  +  +1× +  +5× +  +  +  +  +1× +  +5× +  +  +  +  +  +1× +2× +2× +  +  +1× +2× +  +  +1× +2× +  +  +1× +25× +13× +8× +  +  +  +  +  +  +  +  +8× +  +  +  +  +  +8× +  +  +20× +  +  +1× +2× +2× +  +  +2× +  +  +2× +2× +  +  +3× +  +  +  +  +  +  +1× +1× +1× + 
var Stream = require('stream')
+ 
+module.exports = MuteStream
+ 
+// var out = new MuteStream(process.stdout)
+// argument auto-pipes
+function MuteStream (opts) {
+  Stream.apply(this)
+  opts = opts || {}
+  this.writable = this.readable = true
+  this.muted = false
+  this.on('pipe', this._onpipe)
+  this.replace = opts.replace
+ 
+  // For readline-type situations
+  // This much at the start of a line being redrawn after a ctrl char
+  // is seen (such as backspace) won't be redrawn as the replacement
+  this._prompt = opts.prompt || null
+  this._hadControl = false
+}
+ 
+MuteStream.prototype = Object.create(Stream.prototype)
+ 
+Object.defineProperty(MuteStream.prototype, 'constructor', {
+  value: MuteStream,
+  enumerable: false
+})
+ 
+MuteStream.prototype.mute = function () {
+  this.muted = true
+}
+ 
+MuteStream.prototype.unmute = function () {
+  this.muted = false
+}
+ 
+Object.defineProperty(MuteStream.prototype, '_onpipe', {
+  value: onPipe,
+  enumerable: false,
+  writable: true,
+  configurable: true
+})
+ 
+function onPipe (src) {
+  this._src = src
+}
+ 
+Object.defineProperty(MuteStream.prototype, 'isTTY', {
+  get: getIsTTY,
+  set: setIsTTY,
+  enumerable: true,
+  configurable: true
+})
+ 
+function getIsTTY () {
+  return( (this._dest) ? this._dest.isTTY
+        : (this._src) ? this._src.isTTY
+        : false
+        )
+}
+ 
+// basically just get replace the getter/setter with a regular value
+function setIsTTY (isTTY) {
+  Object.defineProperty(this, 'isTTY', {
+    value: isTTY,
+    enumerable: true,
+    writable: true,
+    configurable: true
+  })
+}
+ 
+Object.defineProperty(MuteStream.prototype, 'rows', {
+  get: function () {
+    return( this._dest ? this._dest.rows
+          : this._src ? this._src.rows
+          : undefined )
+  }, enumerable: true, configurable: true })
+ 
+Object.defineProperty(MuteStream.prototype, 'columns', {
+  get: function () {
+    return( this._dest ? this._dest.columns
+          : this._src ? this._src.columns
+          : undefined )
+  }, enumerable: true, configurable: true })
+ 
+ 
+MuteStream.prototype.pipe = function (dest, options) {
+  this._dest = dest
+  return Stream.prototype.pipe.call(this, dest, options)
+}
+ 
+MuteStream.prototype.pause = function () {
+  Eif (this._src) return this._src.pause()
+}
+ 
+MuteStream.prototype.resume = function () {
+  Eif (this._src) return this._src.resume()
+}
+ 
+MuteStream.prototype.write = function (c) {
+  if (this.muted) {
+    if (!this.replace) return true
+    Iif (c.match(/^\u001b/)) {
+      if(c.indexOf(this._prompt) === 0) {
+        c = c.substr(this._prompt.length);
+        c = c.replace(/./g, this.replace);
+        c = this._prompt + c;
+      }
+      this._hadControl = true
+      return this.emit('data', c)
+    } else {
+      Iif (this._prompt && this._hadControl &&
+          c.indexOf(this._prompt) === 0) {
+        this._hadControl = false
+        this.emit('data', this._prompt)
+        c = c.substr(this._prompt.length)
+      }
+      c = c.toString().replace(/./g, this.replace)
+    }
+  }
+  this.emit('data', c)
+}
+ 
+MuteStream.prototype.end = function (c) {
+  Eif (this.muted) {
+    Iif (c && this.replace) {
+      c = c.toString().replace(/./g, this.replace)
+    } else {
+      c = null
+    }
+  }
+  Iif (c) this.emit('data', c)
+  this.emit('end')
+}
+ 
+function proxy (fn) { return function () {
+  var d = this._dest
+  var s = this._src
+  if (d && d[fn]) d[fn].apply(d, arguments)
+  if (s && s[fn]) s[fn].apply(s, arguments)
+}}
+ 
+MuteStream.prototype.destroy = proxy('destroy')
+MuteStream.prototype.destroySoon = proxy('destroySoon')
+MuteStream.prototype.close = proxy('close')
+ 
+
+
+ + + + + + + diff --git a/node_modules/mute-stream/coverage/lcov-report/base.css b/node_modules/mute-stream/coverage/lcov-report/base.css new file mode 100644 index 0000000..0c0571d --- /dev/null +++ b/node_modules/mute-stream/coverage/lcov-report/base.css @@ -0,0 +1,212 @@ +body, html { + margin:0; padding: 0; + height: 100%; +} +body { + font-family: Helvetica Neue, Helvetica, Arial; + font-size: 14px; + color:#333; +} +.small { font-size: 12px;; } +*, *:after, *:before { + -webkit-box-sizing:border-box; + -moz-box-sizing:border-box; + box-sizing:border-box; + } +h1 { font-size: 20px; margin: 0;} +h2 { font-size: 14px; } +pre { + font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace; + margin: 0; + padding: 0; + -moz-tab-size: 2; + -o-tab-size: 2; + tab-size: 2; +} +a { color:#0074D9; text-decoration:none; } +a:hover { text-decoration:underline; } +.strong { font-weight: bold; } +.space-top1 { padding: 10px 0 0 0; } +.pad2y { padding: 20px 0; } +.pad1y { padding: 10px 0; } +.pad2x { padding: 0 20px; } +.pad2 { padding: 20px; } +.pad1 { padding: 10px; } +.space-left2 { padding-left:55px; } +.space-right2 { padding-right:20px; } +.center { text-align:center; } +.clearfix { display:block; } +.clearfix:after { + content:''; + display:block; + height:0; + clear:both; + visibility:hidden; + } +.fl { float: left; } +@media only screen and (max-width:640px) { + .col3 { width:100%; max-width:100%; } + .hide-mobile { display:none!important; } +} + +.quiet { + color: #7f7f7f; + color: rgba(0,0,0,0.5); +} +.quiet a { opacity: 0.7; } + +.fraction { + font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; + font-size: 10px; + color: #555; + background: #E8E8E8; + padding: 4px 5px; + border-radius: 3px; + vertical-align: middle; +} + +div.path a:link, div.path a:visited { color: #333; } +table.coverage { + border-collapse: collapse; + margin: 10px 0 0 0; + padding: 0; +} + +table.coverage td { + margin: 0; + padding: 0; + vertical-align: top; +} +table.coverage td.line-count { + text-align: right; + padding: 0 5px 0 20px; +} +table.coverage td.line-coverage { + text-align: right; + padding-right: 10px; + min-width:20px; +} + +table.coverage td span.cline-any { + display: inline-block; + padding: 0 5px; + width: 100%; +} +.missing-if-branch { + display: inline-block; + margin-right: 5px; + border-radius: 3px; + position: relative; + padding: 0 4px; + background: #333; + color: yellow; +} + +.skip-if-branch { + display: none; + margin-right: 10px; + position: relative; + padding: 0 4px; + background: #ccc; + color: white; +} +.missing-if-branch .typ, .skip-if-branch .typ { + color: inherit !important; +} +.coverage-summary { + border-collapse: collapse; + width: 100%; +} +.coverage-summary tr { border-bottom: 1px solid #bbb; } +.keyline-all { border: 1px solid #ddd; } +.coverage-summary td, .coverage-summary th { padding: 10px; } +.coverage-summary tbody { border: 1px solid #bbb; } +.coverage-summary td { border-right: 1px solid #bbb; } +.coverage-summary td:last-child { border-right: none; } +.coverage-summary th { + text-align: left; + font-weight: normal; + white-space: nowrap; +} +.coverage-summary th.file { border-right: none !important; } +.coverage-summary th.pct { } +.coverage-summary th.pic, +.coverage-summary th.abs, +.coverage-summary td.pct, +.coverage-summary td.abs { text-align: right; } +.coverage-summary td.file { white-space: nowrap; } +.coverage-summary td.pic { min-width: 120px !important; } +.coverage-summary tfoot td { } + +.coverage-summary .sorter { + height: 10px; + width: 7px; + display: inline-block; + margin-left: 0.5em; + background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent; +} +.coverage-summary .sorted .sorter { + background-position: 0 -20px; +} +.coverage-summary .sorted-desc .sorter { + background-position: 0 -10px; +} +.status-line { height: 10px; } +/* dark red */ +.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 } +.low .chart { border:1px solid #C21F39 } +/* medium red */ +.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE } +/* light red */ +.low, .cline-no { background:#FCE1E5 } +/* light green */ +.high, .cline-yes { background:rgb(230,245,208) } +/* medium green */ +.cstat-yes { background:rgb(161,215,106) } +/* dark green */ +.status-line.high, .high .cover-fill { background:rgb(77,146,33) } +.high .chart { border:1px solid rgb(77,146,33) } + + +.medium .chart { border:1px solid #666; } +.medium .cover-fill { background: #666; } + +.cbranch-no { background: yellow !important; color: #111; } + +.cstat-skip { background: #ddd; color: #111; } +.fstat-skip { background: #ddd; color: #111 !important; } +.cbranch-skip { background: #ddd !important; color: #111; } + +span.cline-neutral { background: #eaeaea; } +.medium { background: #eaeaea; } + +.cover-fill, .cover-empty { + display:inline-block; + height: 12px; +} +.chart { + line-height: 0; +} +.cover-empty { + background: white; +} +.cover-full { + border-right: none !important; +} +pre.prettyprint { + border: none !important; + padding: 0 !important; + margin: 0 !important; +} +.com { color: #999 !important; } +.ignore-none { color: #999; font-weight: normal; } + +.wrapper { + min-height: 100%; + height: auto !important; + height: 100%; + margin: 0 auto -48px; +} +.footer, .push { + height: 48px; +} diff --git a/node_modules/mute-stream/coverage/lcov-report/index.html b/node_modules/mute-stream/coverage/lcov-report/index.html new file mode 100644 index 0000000..17d7a76 --- /dev/null +++ b/node_modules/mute-stream/coverage/lcov-report/index.html @@ -0,0 +1,93 @@ + + + + Code coverage report for All files + + + + + + + +
+
+

+ / +

+
+
+ 77.03% + Statements + 57/74 +
+
+ 57.14% + Branches + 28/49 +
+
+ 93.33% + Functions + 14/15 +
+
+ 79.1% + Lines + 53/67 +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
__root__/
77.03%57/7457.14%28/4993.33%14/1579.1%53/67
+
+
+ + + + + + + diff --git a/node_modules/mute-stream/coverage/lcov-report/prettify.css b/node_modules/mute-stream/coverage/lcov-report/prettify.css new file mode 100644 index 0000000..b317a7c --- /dev/null +++ b/node_modules/mute-stream/coverage/lcov-report/prettify.css @@ -0,0 +1 @@ +.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/node_modules/mute-stream/coverage/lcov-report/prettify.js b/node_modules/mute-stream/coverage/lcov-report/prettify.js new file mode 100644 index 0000000..ef51e03 --- /dev/null +++ b/node_modules/mute-stream/coverage/lcov-report/prettify.js @@ -0,0 +1 @@ +window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/node_modules/mute-stream/coverage/lcov-report/sort-arrow-sprite.png b/node_modules/mute-stream/coverage/lcov-report/sort-arrow-sprite.png new file mode 100644 index 0000000000000000000000000000000000000000..03f704a609c6fd0dbfdac63466a7d7c958b5cbf3 GIT binary patch literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^>_9Bd!3HEZxJ@+%Qj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS>Jii$m5978H@?Fn+^JD|Y9yzj{W`447Gxa{7*dM7nnnD-Lb z6^}Hx2)'; + } + } + return cols; + } + // attaches a data attribute to every tr element with an object + // of data values keyed by column name + function loadRowData(tableRow) { + var tableCols = tableRow.querySelectorAll('td'), + colNode, + col, + data = {}, + i, + val; + for (i = 0; i < tableCols.length; i += 1) { + colNode = tableCols[i]; + col = cols[i]; + val = colNode.getAttribute('data-value'); + if (col.type === 'number') { + val = Number(val); + } + data[col.key] = val; + } + return data; + } + // loads all row data + function loadData() { + var rows = getTableBody().querySelectorAll('tr'), + i; + + for (i = 0; i < rows.length; i += 1) { + rows[i].data = loadRowData(rows[i]); + } + } + // sorts the table using the data for the ith column + function sortByIndex(index, desc) { + var key = cols[index].key, + sorter = function (a, b) { + a = a.data[key]; + b = b.data[key]; + return a < b ? -1 : a > b ? 1 : 0; + }, + finalSorter = sorter, + tableBody = document.querySelector('.coverage-summary tbody'), + rowNodes = tableBody.querySelectorAll('tr'), + rows = [], + i; + + if (desc) { + finalSorter = function (a, b) { + return -1 * sorter(a, b); + }; + } + + for (i = 0; i < rowNodes.length; i += 1) { + rows.push(rowNodes[i]); + tableBody.removeChild(rowNodes[i]); + } + + rows.sort(finalSorter); + + for (i = 0; i < rows.length; i += 1) { + tableBody.appendChild(rows[i]); + } + } + // removes sort indicators for current column being sorted + function removeSortIndicators() { + var col = getNthColumn(currentSort.index), + cls = col.className; + + cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, ''); + col.className = cls; + } + // adds sort indicators for current column being sorted + function addSortIndicators() { + getNthColumn(currentSort.index).className += currentSort.desc ? ' sorted-desc' : ' sorted'; + } + // adds event listeners for all sorter widgets + function enableUI() { + var i, + el, + ithSorter = function ithSorter(i) { + var col = cols[i]; + + return function () { + var desc = col.defaultDescSort; + + if (currentSort.index === i) { + desc = !currentSort.desc; + } + sortByIndex(i, desc); + removeSortIndicators(); + currentSort.index = i; + currentSort.desc = desc; + addSortIndicators(); + }; + }; + for (i =0 ; i < cols.length; i += 1) { + if (cols[i].sortable) { + // add the click event handler on the th so users + // dont have to click on those tiny arrows + el = getNthColumn(i).querySelector('.sorter').parentElement; + if (el.addEventListener) { + el.addEventListener('click', ithSorter(i)); + } else { + el.attachEvent('onclick', ithSorter(i)); + } + } + } + } + // adds sorting functionality to the UI + return function () { + if (!getTable()) { + return; + } + cols = loadColumns(); + loadData(cols); + addSortIndicators(); + enableUI(); + }; +})(); + +window.addEventListener('load', addSorting); diff --git a/node_modules/mute-stream/coverage/lcov.info b/node_modules/mute-stream/coverage/lcov.info new file mode 100644 index 0000000..5f2a58e --- /dev/null +++ b/node_modules/mute-stream/coverage/lcov.info @@ -0,0 +1,155 @@ +TN: +SF:./mute.js +FN:7,MuteStream +FN:29,(anonymous_2) +FN:33,(anonymous_3) +FN:44,onPipe +FN:55,getIsTTY +FN:63,setIsTTY +FN:73,(anonymous_7) +FN:80,(anonymous_8) +FN:87,(anonymous_9) +FN:92,(anonymous_10) +FN:96,(anonymous_11) +FN:100,(anonymous_12) +FN:124,(anonymous_13) +FN:136,proxy +FN:136,(anonymous_15) +FNF:15 +FNH:14 +FNDA:7,MuteStream +FNDA:10,(anonymous_2) +FNDA:6,(anonymous_3) +FNDA:5,onPipe +FNDA:8,getIsTTY +FNDA:2,setIsTTY +FNDA:5,(anonymous_7) +FNDA:5,(anonymous_8) +FNDA:2,(anonymous_9) +FNDA:2,(anonymous_10) +FNDA:2,(anonymous_11) +FNDA:25,(anonymous_12) +FNDA:2,(anonymous_13) +FNDA:3,proxy +FNDA:0,(anonymous_15) +DA:1,1 +DA:3,1 +DA:7,1 +DA:8,7 +DA:9,7 +DA:10,7 +DA:11,7 +DA:12,7 +DA:13,7 +DA:18,7 +DA:19,7 +DA:22,1 +DA:24,1 +DA:29,1 +DA:30,10 +DA:33,1 +DA:34,6 +DA:37,1 +DA:44,1 +DA:45,5 +DA:48,1 +DA:55,1 +DA:56,8 +DA:63,1 +DA:64,2 +DA:72,1 +DA:74,5 +DA:79,1 +DA:81,5 +DA:87,1 +DA:88,2 +DA:89,2 +DA:92,1 +DA:93,2 +DA:96,1 +DA:97,2 +DA:100,1 +DA:101,25 +DA:102,13 +DA:103,8 +DA:104,0 +DA:105,0 +DA:106,0 +DA:107,0 +DA:109,0 +DA:110,0 +DA:112,8 +DA:114,0 +DA:115,0 +DA:116,0 +DA:118,8 +DA:121,20 +DA:124,1 +DA:125,2 +DA:126,2 +DA:127,0 +DA:129,2 +DA:132,2 +DA:133,2 +DA:136,3 +DA:137,0 +DA:138,0 +DA:139,0 +DA:140,0 +DA:143,1 +DA:144,1 +DA:145,1 +LF:67 +LH:53 +BRDA:9,1,0,7 +BRDA:9,1,1,5 +BRDA:18,2,0,7 +BRDA:18,2,1,7 +BRDA:56,3,0,3 +BRDA:56,3,1,5 +BRDA:57,4,0,3 +BRDA:57,4,1,2 +BRDA:74,5,0,4 +BRDA:74,5,1,1 +BRDA:75,6,0,0 +BRDA:75,6,1,1 +BRDA:81,7,0,4 +BRDA:81,7,1,1 +BRDA:82,8,0,0 +BRDA:82,8,1,1 +BRDA:93,9,0,2 +BRDA:93,9,1,0 +BRDA:97,10,0,2 +BRDA:97,10,1,0 +BRDA:101,11,0,13 +BRDA:101,11,1,12 +BRDA:102,12,0,5 +BRDA:102,12,1,8 +BRDA:103,13,0,0 +BRDA:103,13,1,8 +BRDA:104,14,0,0 +BRDA:104,14,1,0 +BRDA:112,15,0,0 +BRDA:112,15,1,8 +BRDA:112,16,0,8 +BRDA:112,16,1,0 +BRDA:112,16,2,0 +BRDA:125,17,0,2 +BRDA:125,17,1,0 +BRDA:126,18,0,0 +BRDA:126,18,1,2 +BRDA:126,19,0,2 +BRDA:126,19,1,1 +BRDA:132,20,0,0 +BRDA:132,20,1,2 +BRDA:139,21,0,0 +BRDA:139,21,1,0 +BRDA:139,22,0,0 +BRDA:139,22,1,0 +BRDA:140,23,0,0 +BRDA:140,23,1,0 +BRDA:140,24,0,0 +BRDA:140,24,1,0 +BRF:49 +BRH:28 +end_of_record diff --git a/node_modules/mute-stream/mute.js b/node_modules/mute-stream/mute.js new file mode 100644 index 0000000..a24fc09 --- /dev/null +++ b/node_modules/mute-stream/mute.js @@ -0,0 +1,145 @@ +var Stream = require('stream') + +module.exports = MuteStream + +// var out = new MuteStream(process.stdout) +// argument auto-pipes +function MuteStream (opts) { + Stream.apply(this) + opts = opts || {} + this.writable = this.readable = true + this.muted = false + this.on('pipe', this._onpipe) + this.replace = opts.replace + + // For readline-type situations + // This much at the start of a line being redrawn after a ctrl char + // is seen (such as backspace) won't be redrawn as the replacement + this._prompt = opts.prompt || null + this._hadControl = false +} + +MuteStream.prototype = Object.create(Stream.prototype) + +Object.defineProperty(MuteStream.prototype, 'constructor', { + value: MuteStream, + enumerable: false +}) + +MuteStream.prototype.mute = function () { + this.muted = true +} + +MuteStream.prototype.unmute = function () { + this.muted = false +} + +Object.defineProperty(MuteStream.prototype, '_onpipe', { + value: onPipe, + enumerable: false, + writable: true, + configurable: true +}) + +function onPipe (src) { + this._src = src +} + +Object.defineProperty(MuteStream.prototype, 'isTTY', { + get: getIsTTY, + set: setIsTTY, + enumerable: true, + configurable: true +}) + +function getIsTTY () { + return( (this._dest) ? this._dest.isTTY + : (this._src) ? this._src.isTTY + : false + ) +} + +// basically just get replace the getter/setter with a regular value +function setIsTTY (isTTY) { + Object.defineProperty(this, 'isTTY', { + value: isTTY, + enumerable: true, + writable: true, + configurable: true + }) +} + +Object.defineProperty(MuteStream.prototype, 'rows', { + get: function () { + return( this._dest ? this._dest.rows + : this._src ? this._src.rows + : undefined ) + }, enumerable: true, configurable: true }) + +Object.defineProperty(MuteStream.prototype, 'columns', { + get: function () { + return( this._dest ? this._dest.columns + : this._src ? this._src.columns + : undefined ) + }, enumerable: true, configurable: true }) + + +MuteStream.prototype.pipe = function (dest, options) { + this._dest = dest + return Stream.prototype.pipe.call(this, dest, options) +} + +MuteStream.prototype.pause = function () { + if (this._src) return this._src.pause() +} + +MuteStream.prototype.resume = function () { + if (this._src) return this._src.resume() +} + +MuteStream.prototype.write = function (c) { + if (this.muted) { + if (!this.replace) return true + if (c.match(/^\u001b/)) { + if(c.indexOf(this._prompt) === 0) { + c = c.substr(this._prompt.length); + c = c.replace(/./g, this.replace); + c = this._prompt + c; + } + this._hadControl = true + return this.emit('data', c) + } else { + if (this._prompt && this._hadControl && + c.indexOf(this._prompt) === 0) { + this._hadControl = false + this.emit('data', this._prompt) + c = c.substr(this._prompt.length) + } + c = c.toString().replace(/./g, this.replace) + } + } + this.emit('data', c) +} + +MuteStream.prototype.end = function (c) { + if (this.muted) { + if (c && this.replace) { + c = c.toString().replace(/./g, this.replace) + } else { + c = null + } + } + if (c) this.emit('data', c) + this.emit('end') +} + +function proxy (fn) { return function () { + var d = this._dest + var s = this._src + if (d && d[fn]) d[fn].apply(d, arguments) + if (s && s[fn]) s[fn].apply(s, arguments) +}} + +MuteStream.prototype.destroy = proxy('destroy') +MuteStream.prototype.destroySoon = proxy('destroySoon') +MuteStream.prototype.close = proxy('close') diff --git a/node_modules/mute-stream/package.json b/node_modules/mute-stream/package.json new file mode 100644 index 0000000..88ead8f --- /dev/null +++ b/node_modules/mute-stream/package.json @@ -0,0 +1,106 @@ +{ + "_args": [ + [ + { + "raw": "mute-stream@0.0.7", + "scope": null, + "escapedName": "mute-stream", + "name": "mute-stream", + "rawSpec": "0.0.7", + "spec": "0.0.7", + "type": "version" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\inquirer" + ] + ], + "_from": "mute-stream@0.0.7", + "_id": "mute-stream@0.0.7", + "_inCache": true, + "_location": "/mute-stream", + "_nodeVersion": "8.0.0-pre", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/mute-stream-0.0.7.tgz_1483483671377_0.22980716335587204" + }, + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "3.10.9", + "_phantomChildren": {}, + "_requested": { + "raw": "mute-stream@0.0.7", + "scope": null, + "escapedName": "mute-stream", + "name": "mute-stream", + "rawSpec": "0.0.7", + "spec": "0.0.7", + "type": "version" + }, + "_requiredBy": [ + "/inquirer" + ], + "_resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "_shasum": "3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab", + "_shrinkwrap": null, + "_spec": "mute-stream@0.0.7", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\inquirer", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/mute-stream/issues" + }, + "dependencies": {}, + "description": "Bytes go in, but they don't come out (when muted).", + "devDependencies": { + "tap": "^5.4.4" + }, + "directories": { + "test": "test" + }, + "dist": { + "shasum": "3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab", + "tarball": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz" + }, + "gitHead": "304d9f7b277175b03c5ae828c326a211e3139778", + "homepage": "https://github.com/isaacs/mute-stream#readme", + "keywords": [ + "mute", + "stream", + "pipe" + ], + "license": "ISC", + "main": "mute.js", + "maintainers": [ + { + "name": "iarna", + "email": "me@re-becca.org" + }, + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "zkat", + "email": "kat@sykosomatic.org" + } + ], + "name": "mute-stream", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/mute-stream.git" + }, + "scripts": { + "test": "tap test/*.js --cov" + }, + "version": "0.0.7" +} diff --git a/node_modules/mute-stream/test/basic.js b/node_modules/mute-stream/test/basic.js new file mode 100644 index 0000000..41f9e10 --- /dev/null +++ b/node_modules/mute-stream/test/basic.js @@ -0,0 +1,207 @@ +var Stream = require('stream') +var tap = require('tap') +var MS = require('../mute.js') + +// some marker objects +var END = {} +var PAUSE = {} +var RESUME = {} + +function PassThrough () { + Stream.call(this) + this.readable = this.writable = true +} + +PassThrough.prototype = Object.create(Stream.prototype, { + constructor: { + value: PassThrough + }, + write: { + value: function (c) { + this.emit('data', c) + return true + } + }, + end: { + value: function (c) { + if (c) this.write(c) + this.emit('end') + } + }, + pause: { + value: function () { + this.emit('pause') + } + }, + resume: { + value: function () { + this.emit('resume') + } + } +}) + +tap.test('incoming', function (t) { + var ms = new MS + var str = new PassThrough + str.pipe(ms) + + var expect = ['foo', 'boo', END] + ms.on('data', function (c) { + t.equal(c, expect.shift()) + }) + ms.on('end', function () { + t.equal(END, expect.shift()) + t.end() + }) + str.write('foo') + ms.mute() + str.write('bar') + ms.unmute() + str.write('boo') + ms.mute() + str.write('blaz') + str.end('grelb') +}) + +tap.test('outgoing', function (t) { + var ms = new MS + var str = new PassThrough + ms.pipe(str) + + var expect = ['foo', 'boo', END] + str.on('data', function (c) { + t.equal(c, expect.shift()) + }) + str.on('end', function () { + t.equal(END, expect.shift()) + t.end() + }) + + ms.write('foo') + ms.mute() + ms.write('bar') + ms.unmute() + ms.write('boo') + ms.mute() + ms.write('blaz') + ms.end('grelb') +}) + +tap.test('isTTY', function (t) { + var str = new PassThrough + str.isTTY = true + str.columns=80 + str.rows=24 + + var ms = new MS + t.equal(ms.isTTY, false) + t.equal(ms.columns, undefined) + t.equal(ms.rows, undefined) + ms.pipe(str) + t.equal(ms.isTTY, true) + t.equal(ms.columns, 80) + t.equal(ms.rows, 24) + str.isTTY = false + t.equal(ms.isTTY, false) + t.equal(ms.columns, 80) + t.equal(ms.rows, 24) + str.isTTY = true + t.equal(ms.isTTY, true) + t.equal(ms.columns, 80) + t.equal(ms.rows, 24) + ms.isTTY = false + t.equal(ms.isTTY, false) + t.equal(ms.columns, 80) + t.equal(ms.rows, 24) + + ms = new MS + t.equal(ms.isTTY, false) + str.pipe(ms) + t.equal(ms.isTTY, true) + str.isTTY = false + t.equal(ms.isTTY, false) + str.isTTY = true + t.equal(ms.isTTY, true) + ms.isTTY = false + t.equal(ms.isTTY, false) + + t.end() +}) + +tap.test('pause/resume incoming', function (t) { + var str = new PassThrough + var ms = new MS + str.on('pause', function () { + t.equal(PAUSE, expect.shift()) + }) + str.on('resume', function () { + t.equal(RESUME, expect.shift()) + }) + var expect = [PAUSE, RESUME, PAUSE, RESUME] + str.pipe(ms) + ms.pause() + ms.resume() + ms.pause() + ms.resume() + t.equal(expect.length, 0, 'saw all events') + t.end() +}) + +tap.test('replace with *', function (t) { + var str = new PassThrough + var ms = new MS({replace: '*'}) + str.pipe(ms) + var expect = ['foo', '*****', 'bar', '***', 'baz', 'boo', '**', '****'] + + ms.on('data', function (c) { + t.equal(c, expect.shift()) + }) + + str.write('foo') + ms.mute() + str.write('12345') + ms.unmute() + str.write('bar') + ms.mute() + str.write('baz') + ms.unmute() + str.write('baz') + str.write('boo') + ms.mute() + str.write('xy') + str.write('xyzΩ') + + t.equal(expect.length, 0) + t.end() +}) + +tap.test('replace with ~YARG~', function (t) { + var str = new PassThrough + var ms = new MS({replace: '~YARG~'}) + str.pipe(ms) + var expect = ['foo', '~YARG~~YARG~~YARG~~YARG~~YARG~', 'bar', + '~YARG~~YARG~~YARG~', 'baz', 'boo', '~YARG~~YARG~', + '~YARG~~YARG~~YARG~~YARG~'] + + ms.on('data', function (c) { + t.equal(c, expect.shift()) + }) + + // also throw some unicode in there, just for good measure. + str.write('foo') + ms.mute() + str.write('ΩΩ') + ms.unmute() + str.write('bar') + ms.mute() + str.write('Ω') + ms.unmute() + str.write('baz') + str.write('boo') + ms.mute() + str.write('Ω') + str.write('ΩΩ') + + t.equal(expect.length, 0) + t.end() +}) diff --git a/node_modules/natural-compare/README.md b/node_modules/natural-compare/README.md new file mode 100644 index 0000000..c85dfdf --- /dev/null +++ b/node_modules/natural-compare/README.md @@ -0,0 +1,125 @@ + +[Build]: http://img.shields.io/travis/litejs/natural-compare-lite.png +[Coverage]: http://img.shields.io/coveralls/litejs/natural-compare-lite.png +[1]: https://travis-ci.org/litejs/natural-compare-lite +[2]: https://coveralls.io/r/litejs/natural-compare-lite +[npm package]: https://npmjs.org/package/natural-compare-lite +[GitHub repo]: https://github.com/litejs/natural-compare-lite + + + + @version 1.4.0 + @date 2015-10-26 + @stability 3 - Stable + + +Natural Compare – [![Build][]][1] [![Coverage][]][2] +=============== + +Compare strings containing a mix of letters and numbers +in the way a human being would in sort order. +This is described as a "natural ordering". + +```text +Standard sorting: Natural order sorting: + img1.png img1.png + img10.png img2.png + img12.png img10.png + img2.png img12.png +``` + +String.naturalCompare returns a number indicating +whether a reference string comes before or after or is the same +as the given string in sort order. +Use it with builtin sort() function. + + + +### Installation + +- In browser + +```html + +``` + +- In node.js: `npm install natural-compare-lite` + +```javascript +require("natural-compare-lite") +``` + +### Usage + +```javascript +// Simple case sensitive example +var a = ["z1.doc", "z10.doc", "z17.doc", "z2.doc", "z23.doc", "z3.doc"]; +a.sort(String.naturalCompare); +// ["z1.doc", "z2.doc", "z3.doc", "z10.doc", "z17.doc", "z23.doc"] + +// Use wrapper function for case insensitivity +a.sort(function(a, b){ + return String.naturalCompare(a.toLowerCase(), b.toLowerCase()); +}) + +// In most cases we want to sort an array of objects +var a = [ {"street":"350 5th Ave", "room":"A-1021"} + , {"street":"350 5th Ave", "room":"A-21046-b"} ]; + +// sort by street, then by room +a.sort(function(a, b){ + return String.naturalCompare(a.street, b.street) || String.naturalCompare(a.room, b.room); +}) + +// When text transformation is needed (eg toLowerCase()), +// it is best for performance to keep +// transformed key in that object. +// There are no need to do text transformation +// on each comparision when sorting. +var a = [ {"make":"Audi", "model":"A6"} + , {"make":"Kia", "model":"Rio"} ]; + +// sort by make, then by model +a.map(function(car){ + car.sort_key = (car.make + " " + car.model).toLowerCase(); +}) +a.sort(function(a, b){ + return String.naturalCompare(a.sort_key, b.sort_key); +}) +``` + +- Works well with dates in ISO format eg "Rev 2012-07-26.doc". + + +### Custom alphabet + +It is possible to configure a custom alphabet +to achieve a desired order. + +```javascript +// Estonian alphabet +String.alphabet = "ABDEFGHIJKLMNOPRSÅ ZŽTUVÕÄÖÜXYabdefghijklmnoprsÅ¡zžtuvõäöüxy" +["t", "z", "x", "õ"].sort(String.naturalCompare) +// ["z", "t", "õ", "x"] + +// Russian alphabet +String.alphabet = "ÐБВГДЕÐЖЗИЙКЛМÐОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдеёжзийклмнопрÑтуфхцчшщъыьÑÑŽÑ" +["Ð", "Ð", "Б"].sort(String.naturalCompare) +// ["Ð", "Б", "Ð"] +``` + + +External links +-------------- + +- [GitHub repo][https://github.com/litejs/natural-compare-lite] +- [jsperf test](http://jsperf.com/natural-sort-2/12) + + +Licence +------- + +Copyright (c) 2012-2015 Lauri Rooden <lauri@rooden.ee> +[The MIT License](http://lauri.rooden.ee/mit-license.txt) + + diff --git a/node_modules/natural-compare/index.js b/node_modules/natural-compare/index.js new file mode 100644 index 0000000..e705d49 --- /dev/null +++ b/node_modules/natural-compare/index.js @@ -0,0 +1,57 @@ + + + +/* + * @version 1.4.0 + * @date 2015-10-26 + * @stability 3 - Stable + * @author Lauri Rooden (https://github.com/litejs/natural-compare-lite) + * @license MIT License + */ + + +var naturalCompare = function(a, b) { + var i, codeA + , codeB = 1 + , posA = 0 + , posB = 0 + , alphabet = String.alphabet + + function getCode(str, pos, code) { + if (code) { + for (i = pos; code = getCode(str, i), code < 76 && code > 65;) ++i; + return +str.slice(pos - 1, i) + } + code = alphabet && alphabet.indexOf(str.charAt(pos)) + return code > -1 ? code + 76 : ((code = str.charCodeAt(pos) || 0), code < 45 || code > 127) ? code + : code < 46 ? 65 // - + : code < 48 ? code - 1 + : code < 58 ? code + 18 // 0-9 + : code < 65 ? code - 11 + : code < 91 ? code + 11 // A-Z + : code < 97 ? code - 37 + : code < 123 ? code + 5 // a-z + : code - 63 + } + + + if ((a+="") != (b+="")) for (;codeB;) { + codeA = getCode(a, posA++) + codeB = getCode(b, posB++) + + if (codeA < 76 && codeB < 76 && codeA > 66 && codeB > 66) { + codeA = getCode(a, posA, posA) + codeB = getCode(b, posB, posA = i) + posB = i + } + + if (codeA != codeB) return (codeA < codeB) ? -1 : 1 + } + return 0 +} + +try { + module.exports = naturalCompare; +} catch (e) { + String.naturalCompare = naturalCompare; +} diff --git a/node_modules/natural-compare/package.json b/node_modules/natural-compare/package.json new file mode 100644 index 0000000..f3348e4 --- /dev/null +++ b/node_modules/natural-compare/package.json @@ -0,0 +1,109 @@ +{ + "_args": [ + [ + { + "raw": "natural-compare@^1.4.0", + "scope": null, + "escapedName": "natural-compare", + "name": "natural-compare", + "rawSpec": "^1.4.0", + "spec": ">=1.4.0 <2.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint" + ] + ], + "_from": "natural-compare@>=1.4.0 <2.0.0", + "_id": "natural-compare@1.4.0", + "_inCache": true, + "_location": "/natural-compare", + "_nodeVersion": "6.2.2", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/natural-compare-1.4.0.tgz_1469220490086_0.1379237591754645" + }, + "_npmUser": { + "name": "megawac", + "email": "megawac@gmail.com" + }, + "_npmVersion": "3.9.5", + "_phantomChildren": {}, + "_requested": { + "raw": "natural-compare@^1.4.0", + "scope": null, + "escapedName": "natural-compare", + "name": "natural-compare", + "rawSpec": "^1.4.0", + "spec": ">=1.4.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "_shasum": "4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7", + "_shrinkwrap": null, + "_spec": "natural-compare@^1.4.0", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint", + "author": { + "name": "Lauri Rooden", + "url": "https://github.com/litejs/natural-compare-lite" + }, + "bugs": { + "url": "https://github.com/litejs/natural-compare-lite/issues" + }, + "buildman": { + "dist/index-min.js": { + "banner": "/*! litejs.com/MIT-LICENSE.txt */", + "input": "index.js" + } + }, + "dependencies": {}, + "description": "Compare strings containing a mix of letters and numbers in the way a human being would in sort order.", + "devDependencies": { + "buildman": "*", + "testman": "*" + }, + "directories": {}, + "dist": { + "shasum": "4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7", + "tarball": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" + }, + "files": [ + "index.js" + ], + "gitHead": "eec83eee67cfac84d6db30cdd65363f155673770", + "homepage": "https://github.com/litejs/natural-compare-lite#readme", + "keywords": [ + "string", + "natural", + "order", + "sort", + "natsort", + "natcmp", + "compare", + "alphanum", + "litejs" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "megawac", + "email": "megawac@gmail.com" + } + ], + "name": "natural-compare", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/litejs/natural-compare-lite.git" + }, + "scripts": { + "build": "node node_modules/buildman/index.js --all", + "test": "node tests/index.js" + }, + "stability": 3, + "version": "1.4.0" +} diff --git a/node_modules/officejs.dialogs/.gitattributes b/node_modules/officejs.dialogs/.gitattributes new file mode 100644 index 0000000..bdb0cab --- /dev/null +++ b/node_modules/officejs.dialogs/.gitattributes @@ -0,0 +1,17 @@ +# Auto detect text files and perform LF normalization +* text=auto + +# Custom for Visual Studio +*.cs diff=csharp + +# Standard to msysgit +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain diff --git a/node_modules/officejs.dialogs/.npmignore b/node_modules/officejs.dialogs/.npmignore new file mode 100644 index 0000000..cf4e8a9 --- /dev/null +++ b/node_modules/officejs.dialogs/.npmignore @@ -0,0 +1,50 @@ +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# ========================= +# Operating System Files +# ========================= + +# OSX +# ========================= + +.DS_Store +.AppleDouble +.LSOverride + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +bsconfig.json + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk +.vscode +node_modules diff --git a/node_modules/officejs.dialogs/README.md b/node_modules/officejs.dialogs/README.md new file mode 100644 index 0000000..5818a98 --- /dev/null +++ b/node_modules/officejs.dialogs/README.md @@ -0,0 +1,468 @@ +![LOGO](https://davecra.files.wordpress.com/2017/07/officejs-dialogs.png?w=698) +# Introduction +The OfficeJS.dialogs library provides simple to use dialogs in OfficeJS/Office Web Add-in (formally called Apps for Office) solutions. The secondary purpose of the library is to help bring some familiarity (from VBA/VB/C#) into OfficeJS development. Currently, the following dialogs types are present: +* [MessageBox](#MessageBox) +* [Alert](#Alert) +* [InputBox](#InputBox) +* [Progress](#Progress) +* [Wait](#Wait) +* [Form](#Form) +* [PrintPreview](#PrintPreview) + +# Update History +Current version: 1.0.8 +Publish Date: 9/13/2017 + +This is a breif history of updates that have been applied: + +* Version 1.0.1 - support for MessageBox, InputBox and custom Form +* Version 1.0.2 - bug fixes, streamlining code +* Version 1.0.3 - better error handling, cancel code +* Version 1.0.4 - support for Wait form, Progress Dialog, and async updates on MessageBox and ProgressBar while forms are still loaded. +* Version 1.0.5 - removed external image references, converted to inline base64 strings. Bug fixes. +* Version 1.0.6 - converted to classes, bug fixes, updated inline jsdoc documentation, standardized, fixed issues with close dialog - one after another - known bug in OfficeJS/Outlook/OWA +* Version 1.0.7 - bug fixes, code cleanup, documentation added README.md +* Version 1.0.8 - support for PrintPreview, code cleanup , bug fixes + +In the following sections each of these will be details with proper usage. + +### Installation +To install OfficeJS.dialogs, you can either pull in this repository from GitHub, by cloning it and then importing it into your project, or using the following command in your preferred coding environment with Node installed: + +``` +npm install officejs.dialogs +``` + +There is also a CDN here: https://cdn.rawgit.com/davecra/OfficeJS.dialogs/master/dialogs.js + +Please note, the CDN has CORS issues with any of the Update() commands below. As such, you will be able to display a Progress dialog, but you will be completely unable to update it (increment). You will also be unable to use the MessageBox.Update() command as well. If you have no need for these commands, by all means, please use the CDN, but be aware of these limitations. + +For now, the guidance is to use Node Package Manager (NPM) to import the library into your solution. + +### Follow +Please follow my blog for the latest developments on OfficeJS.dialogs. You can find my blog here: + +![LOGO](https://davecra.files.wordpress.com/2017/07/blog-icon-large.png?w=20) http://theofficecontext.com + +You can use this link to narrow the results only to those posts which relate to this library: + +* https://theofficecontext.com/?s=officejs.dialogs + +![TWITTER](https://davecra.files.wordpress.com/2010/10/tlogo.png?w=20) You can also follow me on Twitter: [@davecra](http://twitter.com/davecra) + +![LINKEDIN](https://davecra.files.wordpress.com/2014/02/inbug-60px-r.png?w=20) And also on LinkedIn: [davidcr](https://www.linkedin.com/in/davidcr/) + +# MessageBox +The MessageBox class has the following public methods: +* [Reset()](#MessageBoxReset) +* [Show](#MessageBoxShow)([text],[caption],[buttons],[icon],[withcheckbox],[checkboxtext],[asyncResult],[processupdates]) +* [Update](#MessageBoxUpdate)([text],[caption],[buttons],[icon],[withcheckbox],[checkboxtext],[asyncResult]) +* [UpdateMessage](#MessageBoxUpdateMessage)([text],[asyncResult]) +* [Displayed()](#MessageBoxDisplayed) +* [CloseDialogAsync](#MessageBoxCloseDialog)([asyncresult]) + +### MessageBox.Reset() +You can issue command each time you are about to request a messagebox dialog to assure everything is reset (as it is in the global space). This resets the MessageBox global object so that no previous dialog settings interfere with your new dialog request. You should only use this if you encounter issues. + +### MessageBox.Show() +The Show method will display a MessageBox dialog with a caption, a message, a selection of buttons (OK, Cancel, Yes, No, Abort, and Retry) and an icon (Excalation, Asterisk, Error, Hand, Information, Question, Stop, Warning), an optional checkbox with its own text messge, a callback when the user pressses any of the buttons and an option to keep the dialog open until you issue a DialogClose(). The following paramaters are used in this method: +* [**text**: *string*] (required) - this is the main message you want to display in the dialog. +* [**caption**: *string*] (optional) - this is the caption to appear above the main message. Default is blank. +* [**buttons**: *MessageboxButtons*] (optional) - this is a member of the MessageBoxButtons enumeration. You can pick between: OkOnly, OkCancel, YesNo, YesNoCancel, RetryCancel, AbortRetryCancel. Default is OkOnly. +* [**icon**: *MessageBoxIcons*] (optional) - this is a member of the MessageBoxIcons enumeration. Default is None. +* [**withcheckbox**: *boolean*] (optional) - if this is enabled a checkbox will appear at the bottom of the form. Should be used in conjunction with the [checkboxtext] parameter below. This is useful for providing an option like: "Do not show this message again." The default is false. +* [**checkboxtext**: *string*] (optional) - if the [withcheckbox] option is enabled, this is the text that will appear to the right of the checkbox. Default is blank. +* [**asynResult**: *function*(*string*,*boolean*)] (required) - this is the callback function that returns which button the user pressed (as a string) and whether then user checked the checkbox (is the [withcheckbox] option is enabled). If the user presses the (X) at the top right of the dialog, "CANCEL" will be returned. +* [**processupdates**: *boolean*] (optional) - if this option is true, the dialog will remain open after the user presses a button. The message will be sent to the callback but the dialog will continue to remain. This is useful if you have a series of questions to ask the user in rapid succession, rather than closing the dialog and reopening it each time (returning control temporarily to the Office application), you can issue UpdateMessage() or Update() to change the message, buttons, caption, icon and callback. If this option is true, you are responsible for closing the dialog when complete by issuing a MEssageBox.CloseDialog() command. The default is false. This means that when the user presses any button the dialog closes. + +```javascript + MessageBox.Show("Do you like icecream?", "Questionaire", MessageBoxButtons.YesNo, + MessageBoxIcons.Question, false, null,function(buttonFirst) { + /** @type {string} */ + var iceCream = (buttonFirst == "Yes" ? "do" : "dont"); + MessageBox.UpdateMessage("Do you like Jelly Beans?", function(buttonSecond) { + /** @type {string} */ + var jellyBeans = (buttonSecond == "Yes" ? "do" : "dont"); + MessageBox.UpdateMessage("Do you like Kit Kat bars?", function(buttonThird) { + /** type {string} */ + var kitkat = (buttonThird == "Yes" ? "do" : "dont"); + MessageBox.CloseDialogAsync(function() { + Alert.Show("You said you " + iceCream + " like ice cream, you " + + jellyBeans + " like jelly beans, and you " + + kitkat + " like kit kat bars."); + }); + }); + }); + }, true); +``` +This is an example of one MessageBox from the above code: + +![MessageBox Dialog](https://davecra.files.wordpress.com/2017/07/messagebox-sample.png?w=600) + +### MessageBox.Update() +If you issue a [MessageBox.Show()](#MessageBoxShow) and you set the [processupdated] flag to true, then you can use this method. Otherwise this will fail. What this method does is update a currently displayed messagebox with new information. This has all the same paramaters as the [MessageBox.Show()](#MessageBoxShow) with the exception of the processupdated flag (since the dialog is already setup to allow you to issue updates). You must issue a new callback as well to handle the new updated response. For information on what each paramater does, and defaults, see the [MessageBox.Show()](#MessageBoxShow) method. + +### MessageBox.UpdateMessage() +If you issue a [MessageBox.Show()](#MessageBoxShow) and you set the [processupdated] flag to true, then you can use this method. Otherwise this will fail. What this method does is updates just the text message of a currently displayed messagebox. This accepts only the [text] paramater and a [asyncResult] callback. The text and callback are both required. You must issue a new callback as well to handle the new updated response. For information on what each paramater does, and defaults, see the [MessageBox.Show()](#MessageBoxShow) method. + +### MessageBox.Displayed() +This method returns true if a MessageBox dialog is currently being displayed to the user. This is provided in case you wish to verify the dialog is still opened before issuing a [MessageBox.CloseDialog()](#MessageBoxCloseDialog) or [MessageBox.Update()](#MessageBoxUpdate) or [MessageBox.UpdateMessage()](#MessageBoxUpdateMessage). + +### MessageBox.CloseDialogAsync() +If you issue a [MessageBox.Show()](#MessageBox.Show) and you set the [processupdated] flag to true, then you can use this method to close the dialog. Otherwise this will fail. This will close the currently displayed MessageBox. + +**NOTE**: Because of the way Office dialogs work, all dialogs have to be closed asyncronously in order to avoid situations where trying to open a second dialog will fail, because another one is still in the process of being destroyed. + +The CloseDialogAsync has the following paramter: +* [**asyncResult**: *function()*] (required) - This is callback is invoked when the dialog is completely closed. + +# Alert +The alert dialog is the simplest of all. It has only two methods: Show() and Displayed(). Here are the details: +* [Show](#AlertShow)([text], [asyncResult]) +* [Displayed()](#AlertDisplayed) + +### Alert.Show() +The Alert.Show() method will display a simple dialog with only up to 256 characters of text and an OK button. When the user presses OK, the dialog is dismissed. When the user presses OK, the callabck [asyncResult] is called. Here are the details on the paramters. +* [**text**: *string/256*] (required) - This is the message you wish to display to the user. It is trimmed at 256 characters in length. +* [**asynResult**: *function()*] (required) - This is the callback which is invoked when the user presses the OK button or clicks the (X) in the upper right of the dialog. There are no paramters in the callback. + +```javascript + const BAD_SUBJECT_CONTENT = "BAD"; + Office.cast.item.toMessageCompose(Office.context.mailbox.item).subject.getAsync(function(result) { + /** @type {string} */ + var subject = result.value; + if(subject.indexOf(BAD_SUBJECT_CONTENT) > 0) { + Alert.Show("You have invalid content in the email subject."); + } + }); +``` + +This is an example of the Alert dialog from the code above: + +![Alert Dialog](https://davecra.files.wordpress.com/2017/07/alert.png?w=500) + +### Alert.Displayed() +This method returns true if an Alert dialog is currently being displayed to the user. + +# InputBox +The InputBox class has the follwoing public methods: +* [Reset()](#InputBoxReset) +* [Show](#InputBoxShow)(text,caption,defaultvalue,syncresult) +* [Displayed()](#InputBoxDisplayed) + +### InputBox.Reset() +You can issue command each time you are about to request a InputBox dialog to assure everything is reset (as it is in the global space). This resets the InputBox global object so that no previous dialog settings interfere with your new dialog request. You should only use this if you encounter issues. + +### InputBox.Show() +This method displays an InputBox to the user with the text message you provide, a caption and a default value. When the user clicks Ok, the result in the callback *asyncresult* will be the text they typed. If the user pressed cancel or clicked the (X) in the upper right of the dialog, the result will be blank. Here are the parameters: +* [**text**: *string*] (required) - this is the question or message you want the user to see in the InputBox. +* [**caption**: *string/256*] (optional) - this is the caption that will appear int eh dialog. The default value will be blank. +* [**defaultvalue**: string] (optional) - this is the default value you want to prepopulate in the textbox od the dialog. The default value is blank. +* [**asyncresult**: *function*(*string*)] (required) - this is the callback with the result from the dialog. If the user pressed cancel, the result is blank. + +The following sample asks the user for a subject and then applies the result to the email message: +```javascript + InputBox.Show("What is the email subject?", "Email Subject", "Default Email Subject", + function(result) { + if(result.length > 0) { + // in the server service callback + Office.cast.item.toMessageCompose(Office.context.mailbox.item).subject.setAsync(result, + function() { + Alert.Show("The subject has been set to " + result); + }); + } + }); +``` + +Here is an example of an InputBox based on the sample code provided above: + +![InputBox Dialog](https://davecra.files.wordpress.com/2017/07/inputbox.png?w=500) + +### InputBox.Displayed() +This method returns true if an InputBox dialog is currently being displayed to the user. + +# Progress +The Progress class has the following public methods: +* [Reset()](#ProgressReset) +* [Show](#ProgressShow)([text],[start],[max],[asyncresult],[cancelresult]) +* [Update](#ProgressUpdate)([increment],[text]) +* [Completed()](#ProgressCompleted) +* [Displayed()](#ProgressDisplayed) + +### Progress.Reset() +You can issue command each time you are about to request a progress dialog to assure everything is reset (as it is in the global space). This resets the Progress global object so that no previous dialog settings interfere with your new dialog request. You should only use this if you encounter issues. + +### Progress.Show() +This method will display a progress dialog with the spcified text. You will update the dialog with [Progress.Update()](#ProgressUpdate) to change the value of the progress bar and/or the text in the dialog. Once completed, you will call the [ProgressBar.Complete()](#ProgressComplete) method to close the dialog. You will usually make this call from the *asyncresult* callback. If the user presses cancel at any time while the dialog is loaded, the *cancelresult* callback will be called. Here are the function paramaters: +* [**text**: *string/256*] (optional) - this is the text the user will see. It is limited to 256 characters in length. If none is specified the default is "Please wait..." +* [**start**: *number*] (optional) - this is the starting number for the progress bar. The default is zero (0). +* [**max**: *number*] (optional) - this is the max value of the progress bar. The default is 100. +* [**asyncresult**: *function()*] (optional) - this is the callback when the Progress.Compelte() method is called. +* [**cancelresult**: *function()*] (optional) - this is the callback when the user presses cancel on the dialog. + +Here is some example code that display a Progress dialog and then uses a seperate function with a timer to update it until it hits 100%: + +```javascript +function dotIt() { + // display a progress bar form and set it from 0 to 100 + Progress.Show("Please wait while this happens...", 0, 100, function() { + // once the dialog reached 100%, we end up here + Progress.CompleteAsync(); + Alert.Show("All done folks!"); + }, function() { + // this is only going to be called if the user cancels + Alert.Show("You cancelled the process."); + // clean up stuff here... + + }); + doProgress(); +} + +function doProgress() { + // increment by one, the result that comes back is + // two pieces of information: Cancelled and Value + var result = Progress.Update(1); + // if we are not cancelled and the value is not 100% + // we will keep going, but in your code you will + // likely just be incrementing and making sure + // at each stage that the user has not cancelled + if(!result.Cancelled && result.Value <= 100) { + setTimeout(function() { + // this is only for our example to + // cause the progress bar to move + doProgress(); + },100); + } else if(result.Value >= 100) { + Progress.Compelte(); // done + } +} +``` + +This is an example of a Progress dialog from the code above: + +![Progress Dialog](https://davecra.files.wordpress.com/2017/07/progress.png?w=600) + +### Progress.Update() +This method will update the progress. By default if you do not pass any paramaters, the progress bar on the dialog will increment by one. However, you also have the option to change the text and/or the progress increment amount. If you specify an increment of zero (0) and specify new text for the dialog, the text will change, but the dialog will not increment. Here are the parameters: +* [**increment**: *number*] (optional) - this is the amount to increment the progress bar by. +* [**text**: *string/256*] (optional) - you can change the text on the displayed progress bar by issuing new text. It is limited to 256 characters in length. + +### Progress.Compelted() +This method will close the progress dialog. You will usually call this from the *asyncresult* callback setup in the [Progress.Show()](#ProgressShow) method. + +### Progress.Displayed() +This method returns true if a Progress dialog is currently being displayed to the user. + +# Wait +This displays a very simple wait dialog box with a spinning GIF. It has only one option and that is to display the cancel button. Here are the available methods: +* [Show](#WaitShow)([text],[showcancel],[cancelresult]) +* [Reset()](#WaitReset) +* [CloseDialogAsync()](#WaitCloseDialog)([asyncResult]) +* [Displayed()](#WaitDisplayed) + +### Wait.Show() +This displays a simple wait dialog to the user with a spinning GIF. This dialog will remain open until you issue a Wait.DialogClose(). Here are the parameters: +* [**text**: *string*] (optional) - if text is provided, this is the message the user will see above the spinning GIF. Default is "Please wait..." +* [**showcancel**: *boolean*] (optional) - if this is true, then the user will have the option to cancel the dialog. You will need to provide a [cancelresult] callback in thie case. The default is false. +* [**cancelresult**: *function()*] (optional) - if the showcancel option is enabled, this is required to notify your code that the user pressed cancel. There are not paramters provided in the callback. + +Here is an example of how to use the Wait dialog: +```javascript + var cancelled = false; + Wait.Show(null, true, function() { + Alert.Show("You have cancelled the process."); + cancelled = true; + }); + // change the subject after getting it from the server service + getSubjectFromServerService(function(result) { + if(!cancelled) { + // in the server service callback + Office.cast.item.toMessageCompose(Office.context.mailbox.item).subject = result.value; + Wait.CloseDialogAsync(function() { }); + } + }); + ``` + +This is an example of the Wait dialog from the code above: + +![Wait Dialog](https://davecra.files.wordpress.com/2017/07/wait.png?w=500) + +### Wait.Reset() +You can issue command each time you are about to request a wait dialog to assure everything is reset (as it is in the global space). This resets the Wait global object so that no previous dialog settings interfere with your new dialog request. You should only use this if you encounter issues. + +### Wait.CloseDialogAsync() +This closes the open Wait dialog. + +**NOTE**: Because of the way Office dialogs work, all dialogs have to be closed asyncronously in order to avoid situations where trying to open a second dialog will fail, because another one is still in the process of being destroyed. + +The CloseDialogAsync has the following paramter: +* [**asyncResult**: *function()*] (required) - This is callback is invoked when the dialog is completely closed. + +### Wait.Displayed() +This method returns true if a Wait dialog is currently being displayed to the user. + +# Form +The custom Form allows you to hook up your own HTML page to use OfficeJS.dialogs framework behind the scenes. You Show() your custom form, recieve callbacks with the information you provide from your form and can handle when and how to close the form. The Form object has the following methods: + +* [Reset](#FormReset)() +* [Url](#FormUrl)([value]) +* [Height](#FormHeight)([value]) +* [Width](#FormWidth)([value]) +* [HandleClose](#FormHandleClose)([value]) +* [AsyncResult](#FormAsyncResult)([value]) +* [CloseDialogAsync](#FormCloseDialogAsync)([asyncResult]) +* [Displayed](#FormDisplayed)() +* [Show](#FormShow)([url],[height],[width],[handleclose],[asyncresult]) + +### Form.Reset() +You can issue command each time you are about to request a new custom form dialog to assure everything is reset (as it is in the global space). This resets the Form global object so that no previous dialog settings interfere with your new dialog request. You should only use this if you encounter issues. + +### Form.Url() +This method/property will allow you to set the URL or retrieve the url value as a string. Here is the sole argument: + +* [**value**: *string*] (get/set) - If no value is specified, it will return the current URL. If a value is specified, the URL for the custom dialog will be set to this location. + +### Form.Height() +This method/property will allow you to set the height or retrieve the height as a number. Here is the sole argument: + +* [**value**: *number*] (get/set) - If no value is specified, it will return the current form height. If a value is specified, the height for the custom dialog will be set to this value. + +### Form.Width() +This method/property will allow you to set the width or retrieve the width value as a number. Here is the sole argument: + +* [**value**: *number*] (get/set) - If no value is specified, it will return the current form width. If a value is specified, the width for the custom dialog will be set to this value. + +### Form.HandleClose() +This method/property will allow you to set whether OfficeJS.dialogs framework will close the dialog when a messageParent call is recieved, or whther your code will handle the close. Here is the sole argument: + +* [**value**: *boolean*] (get/set) - If no value is specified, it will return the current setting. If a value is specified, and that value is **true**, then the OfficeJS.dialogs framework will handle the close of the form for you when any message is recieved via the messageParent call. If the value is set to **false**, you will need to handle the closing of the dialog using the CloseDialogAsync() command. + +### Form.AsyncResult() +This method/property will allow you to set the callback fucntion for the custom form. Here is the sole argument: + +* [**value**: *function(string)*] (set only) - Allows you to set the callback function for the close of the form. The callback will recieve a **string** paramater that will return a JSON object formatted as such: + { + Error: { }, // Error object + Result: { }, // JSON from form + Cancelled: false, // boolean if form cancelled with X + Dialog: { } // A reference to the dialog + } + +### Form.Displayed() +This method returns true if a Form dialog is currently being displayed to the user. + +### Form.Show() +This method allows you to open your own custom form using the framework provided by OfficeJS.dialogs. The form you use must conform in the following ways: + +* It must have the following references: + + +* It must initialize Office on load: + Office.initialize = function(reason) { /*... your code here*/ } +* It must issue a callback when you want to update your calling code: + Office.context.ui.messageParent(JSON.stringify("{'myData':'myValue'}")); + +If your dialog does not meet the above requirements, it will not function properly in the OfficeJS.dialogs framework. Here are the parameters for the Show() method: + +* [**url**: *string*] (optional) - This is optional only if the Url() value has been set before the Show method is called. Otherwise you will recieve an error. This is the fully qualified URL to your dialog. Please NOTE that cross-domain issues may prevent your code from executing properly if you pass in a URL that is NOT in your current domain. +* [**height**: *number*] (optional) - This will set the height of the form. If no value is specified in either the Height() property or here, the default height will be set to 1 (minimum value). +* [**width**: *number*] (optional) - This will set the width of the form. If no value is specified in either the Width() proeprty or here, the default width will be set to 1 (minium value). +* [**handleclose**: *boolean*] (optional) - This will determine whether the framework will close the form when a messageParent is recieved. If **true** the dialog will be closed automatically when any message is recieved. If **false** you will hae to issue a CloseDialogAsync() when you are ready to close the form. +* [**asyncresult**: *function(string)*] (optional) - This is the callback with the result from the form when your form issues a messageParent() call. The callback recieves a string and your message will be found in the JSON result as defined in the [AsyncResult()](#FormAsyncResult) section above. + +Here is a smple of how to use the Form dialog: + +```javascript + Form.Show("/test.html", 20,30, false, function(result) { + Form.CloseDialogAsync(function() { + console.log("here"); + Alert.Show("The value is: " + result); + }); + }); +``` + +Here is a sample of the **test.html** as defined above: + +```html + + + + + + + + Click the button
+ + + +``` + +Here is what the above dialog look like when issued: + +![Form Dialog](https://davecra.files.wordpress.com/2017/07/formdialog.png?w=300) + +Here are the JSON results: + +```json +{ + "Error":{}, + "Result":"{ + 'FibbyGibber':'rkejfnlwrjknflkerjnf', + 'DoDaDay':'Hahahaha', + 'Message':'My custom message.' + }", + "Cancelled":false +} +``` + +# PrintPreview +The PrintPreview form allows you to send any HTML to the dialog to de displayed in the form (via iframe). In the dialog the user will have the option to cancel, or to Print. When the user clicks Print a new window will be opened, the contents of the frame will be placed in the window and it will be printed. The PrintPreview object has the following methods: + +* [Reset](#PrintReset)() +* [Displayed](#PrintDisplayed)() +* [Show](#PrintShow)([html],[cancelresult]) + +### PrintPreview.Reset() +You can issue command each time you are about to request a PrintPreview dialog to assure everything is reset (as it is in the global space). This resets the PrintPreview global object so that no previous dialog settings interfere with your new dialog request. You should only use this if you encounter issues. + +### PrintPreview.Displayed() +This method returns true if a PrintPreview dialog is currently being displayed to the user. + +### PrintPreview.Show() +This method opens the PrintPreview dialog using the HTML by OfficeJS.dialogs. Here are the parameters for the Show() method: + +* **html**: *string* (required) - This is the html you want to display in the dialog. You cna either get this from the document/body/selection of the Office item you are using or submit your own custom HTML if printing a custom form, for example. +* [**cancelresult**: *function()*] (optional) - This is the callback if the user presses cancel. It is not required. + +Here is a smple of how to use the PrintPreview dialog: + +```javascript + // this example takes the currently composed email message in Outlook, + // grabs its body HTML and then displays it in the Print Preview dialog. + var mailItem = Office.cast.item.toItemCompose(Office.context.mailbox.item); + mailItem.saveAsync(function(asyncResult) { + var id = asyncResult.id; + mailItem.body.getAsync(Office.CoercionType.Html, { asyncContext: { var3: 1, var4: 2 } }, function(result) { + var html = result.value; + PrintPreview.Show(html, function() { + Alert.Show("Print cancelled"); + }); + }); + }); +``` + +![PrintPreview Dialog](https://davecra.files.wordpress.com/2017/09/print.png?w=500) \ No newline at end of file diff --git a/node_modules/officejs.dialogs/_config.yml b/node_modules/officejs.dialogs/_config.yml new file mode 100644 index 0000000..1885487 --- /dev/null +++ b/node_modules/officejs.dialogs/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-midnight \ No newline at end of file diff --git a/node_modules/officejs.dialogs/dialogs.html b/node_modules/officejs.dialogs/dialogs.html new file mode 100644 index 0000000..78a7831 --- /dev/null +++ b/node_modules/officejs.dialogs/dialogs.html @@ -0,0 +1,504 @@ + + + + + + + + + + + + + + + + +
+
+
+
+   +
+
+
+ {Caption} +
+
+
+   +
+
+
+ +
+
+ +
+
+
+   +
+
+
+
+
+
+ +
+
+   +
+
+
+
+
+ {Message} +
+
+
+
+
+   +
+
+
+
+ +
+
+
+
+
+   +
+
+
+ + + + + + + + + + + + + + +
+
+
 
+ +
+ + +
+
+ + diff --git a/node_modules/officejs.dialogs/dialogs.js b/node_modules/officejs.dialogs/dialogs.js new file mode 100644 index 0000000..b961466 --- /dev/null +++ b/node_modules/officejs.dialogs/dialogs.js @@ -0,0 +1,1304 @@ +/*! + * dialogs JavaScript Library v1.0.8 + * http://theofficecontext.com + * + * Copyright David E. Craig and other contributors + * Released under the MIT license + * https://tldrlegal.com/license/mit-license + * + * Date: 2017-09-13T10:27EST + /** + * OfficeJS global + */ +var OfficeJS = new dlg(); +/** + * OfficeJS.dialogs class + */ +function dlg() { + /** @type {init} */ + this.dialogs = new init(); + return this; +}; +/** + * Init class to hold global strings and other items (TDB) + */ +function init() { + /** @returns {string} */ + this.settings = function() { return "OfficeJS.dialogs.settings" }; + /** @returns {string} */ + this.message = function() { return "OfficeJS.dialogs.message" }; + /** + * Returns the proper URL to the dialogs html file + * CDN usage - TBD + */ + this.GetUrl = function() { + /** + * @type {string} + */ + var url = getUrl() + "dialogs.html"; + return url; + } + return this; +}; +/** + * The global PrintPreview object for single use of displaying + * a print preview in the Office client. Use the Show() method. + */ +var PrintPreview = new print(); +/** + * The global messagebox object for single use of displaying + * a Message Box in the Office client. Use the Show() method. + * @type {msgbox} + * */ +var MessageBox = new msgbox(); +/** + * The global inputbox object for single use of displaying + * a Input Box in the Office client. Use the Show() method. + * @type {ibox} + * */ +var InputBox = new ibox(); +/** + * The global form object for single use of displaying + * a custom form in the Office client. Use the Show() method. + * @type {form} + * */ +var Form = new form(); +/** + * The global alert object for single use of displaying + * a simple alert box with only a message and an OK button. + * @param {string} text Text message, no more than 256 characters + * @param {{function()}} asynresult Callback when the dialog is closed + */ +var Alert = new notify(); +/** + * The global progress form that will show a progress bar + * and allow you to Update() the value until you issue + * a CloseDialog() + */ +var Progress = new progress(); +/** + * The global wait spinner form that will allow an indeterminate + * modal block on the UI until you issue a CloseDialog() + */ +var Wait = new spinner(); +/** + * An enum of Message Box Button types + * @readonly + * @typedef {string} MessageBoxIcons + * @enum {MessageBoxIcons} + */ +var MessageBoxIcons = { + Asterisk: "Asterisk", // Warning + Error: "Error", // Stop + Exclamation: "Exclamation", // Warning + Hand: "Hand", // Stop + Information: "Information", // Information + None: "None", // none + Question: "Question", // Question + Stop: "Stop", // Stop + Warning: "Warning" // Warning +}; +/** + * An enum of Message Box Button types + * @readonly + * @typedef {string} MessageBoxButtons + * @enum {MessageBoxButtons} + */ +var MessageBoxButtons = { + Ok: "Ok", + OkCancel: "OkCancel", + YesNo: "YesNo", + YesNoCancel: "YesNoCancel", + RetryCancel: "RetryCancel", + AbortRetryCancel: "AbortRetryCancel" +}; +/**************************************************************************************************** + **************************************************************************************************** + **************************************************************************************************** + **** **** ***** * * ***** ***** *** **** * * + * * * * * ** * * * * * * * ** ** + **** **** * * * * * *** * * **** * * * + * * * * * ** * * * * * * * * + * * * ***** * * * * *** * * * * + **************************************************************************************************** + **************************************************************************************************** + ****************************************************************************************************/ +/** + * A class for creating a print preview dialog + */ +function print() { + /** + * Internal referenced values + * @type {{CancelResult: {function()}, Dialog: any, + DialogSettings: any, Displayed: true}} + * */ + var value = { + CancelResult: null, + Dialog: null, + DialogSettings: {}, + Displayed: false + }; + /** + * This displays the print preview dialog with the content you specify with HTML + * In Office you can export the selection or the entire document/message as + * raw HTML and pass it to this function to display it as it appears on screen + * and then print it. + * @param {string} [html] The html to be printed + * @param {{function()}} [cancelResult] Callback if the user cancels + */ + this.Show = function(html, cancelresult) { + try { + // verify no other dialogs are open first + if(isDialogOpen()) throw("A dialog is already open."); + if (html === undefined || html === null || html == "") { + html = ""; + } + var buttons = MessageBoxButtons.OkCancel; + var content = btoa(unescape(encodeURIComponent(html))); + value.CancelResult = cancelresult; + value.DialogSettings = { + Text: content, Caption: "Print Preview", Buttons: buttons, + Icon: MessageBoxIcons.None, DialogType: "print" + }; + localStorage.setItem(OfficeJS.dialogs.settings(), JSON.stringify(value.DialogSettings)); + // show the dialog + Office.context.ui.displayDialogAsync(OfficeJS.dialogs.GetUrl(), + { height: 60, width: 60, displayInIframe: isOfficeOnline() }, + function (result) { + value.Displayed = true; + value.Dialog = result.value; + value.Dialog.addEventHandler(Office.EventType.DialogEventReceived, function (arg) { + dialogCloseAsync(value.Dialog, function() { + value.Displayed = false; + if(value.CancelResult) value.CancelResult(); + }); + }); + value.Dialog.addEventHandler(Office.EventType.DialogMessageReceived, function (arg) { + dialogCloseAsync(value.Dialog, function() { + value.Displayed = false; + if(value.CancelResult) value.CancelResult(); + }); + }); + }); + } catch(e) { + console.log(e); + } + } + /** + * Resets the PrintPreview object for reuse + */ + this.Reset = function () { + try { + PrintPreview = new print(); + } catch (e) { + console.log(e); + } + }; + /** + * This method closes the PrintPreview dialog + * by calling the helper function for async + * @param {function()} asyncResult Callback after the dialog is closed + */ + this.CloseDialogAsync = function (asyncResult) { + value.Displayed = false; + dialogCloseAsync(value.Dialog, asyncResult); + } + /** + * Returns if the dialog is shown + */ + this.Displayed = function() { return value.Displayed }; +} +/**************************************************************************************************** + **************************************************************************************************** + **************************************************************************************************** + *** **** ***** * * * * ***** **** ***** *** **** * * + * * * * * ** * ** * * * * * * * * * ** ** + * **** * * * * * * * *** **** *** * * **** * * * + * * * * * ** * ** * * * * * * * * * * + *** * ***** * * * * ***** * * * *** * * * * + **************************************************************************************************** + **************************************************************************************************** + ****************************************************************************************************/ +/** + * A class for creating a non-determinate wait spinner + * Most useful for simply making the UI modal while + * you do work in the background. + */ +function spinner() { + /** + * Internal referenced values + * @type {{CancelResult: {function()}, Dialog: any, + DialogSettings: any, Displayed: true}} + * */ + var value = { + CancelResult: null, + Dialog: null, + DialogSettings: {}, + Displayed: false + }; + /** + * This message displays the wait spinner form + * @param {string} [text] The text to display in the spinner + * @param {boolean} [showcancel] Enables a the cance button. If this is false or left + * empty then there will not be a callback + * @param {{function()}} [cancelResult] Callback if the user cancels + */ + this.Show = function(text, showcancel, cancelresult) { + try { + // verify no other dialogs are open first + if(isDialogOpen()) throw("A dialog is already open."); + if (text === undefined || text === null || text == "") { + text = "Please wait..."; + } else { + text = text.substring(0, 40); // no more than 40 characters allowed + } + var buttons = MessageBoxButtons.None; + if(showcancel) { + buttons = "Cancel"; + } + value.CancelResult = cancelresult; + value.DialogSettings = { + Text: "", Caption: text, Buttons: buttons, + Icon: MessageBoxIcons.None, DialogType: "spinner" + }; + localStorage.setItem(OfficeJS.dialogs.settings(), JSON.stringify(value.DialogSettings)); + // show the dialog + Office.context.ui.displayDialogAsync(OfficeJS.dialogs.GetUrl(), + { height: 32, width: 32, displayInIframe: isOfficeOnline() }, + function (result) { + value.Displayed = true; + value.Dialog = result.value; + value.Dialog.addEventHandler(Office.EventType.DialogEventReceived, function (arg) { + dialogCloseAsync(value.Dialog, function() { + value.Displayed = false; + if(value.CancelResult) value.CancelResult(); + }); + }); + value.Dialog.addEventHandler(Office.EventType.DialogMessageReceived, function (arg) { + dialogCloseAsync(value.Dialog, function() { + value.Displayed = false; + if(value.CancelResult) value.CancelResult(); + }); + }); + }); + } catch(e) { + console.log(e); + } + } + /** + * Resets the SpinnerForm object for reuse + */ + this.Reset = function () { + try { + Wait = new spinner(); + } catch (e) { + console.log(e); + } + }; + /** + * This method closes the MessageBox + * by calling the helper function for async + * @param {function()} asyncResult Callback after the dialog is closed + */ + this.CloseDialogAsync = function (asyncResult) { + value.Displayed = false; + dialogCloseAsync(value.Dialog, asyncResult); + } + /** + * Returns if the dialog is shown + */ + this.Displayed = function() { return value.Displayed }; +}; +/**************************************************************************************************** + **************************************************************************************************** + **************************************************************************************************** + **** **** *** *** **** ***** *** *** ***** *** **** * * + * * * * * * * * * * * * * * * * * * * ** ** + **** **** * * * ** **** *** * * *** * * **** * * * + * * * * * * * * * * * * * * * * * * * * * + * * * *** *** * * ***** *** *** * *** * * * * + **************************************************************************************************** + **************************************************************************************************** + ****************************************************************************************************/ +/** + * A class for create a progress form + * @class + */ +function progress() { + /** + * Internal referenced values + * @type {{AsyncResult: {function()}, CancelResult: {function()} Dialog: Office.Context.ui.dialog, + DialogSettings: any, Cancelled: boolean, Displayed: true}} + * */ + var value = { + AsyncResult: null, + CancelResult: null, + Dialog: null, + DialogSettings: {}, + Cancelled: false, + Displayed: false + }; + /** + * This method tells the MessageBox to show a please wait spinner + * @param {string} [text] The message you want to show - default "Please wait" + * @param {Number} [start] A number to set the progress bar to + * @param {Number} [max] A number to set the progress maximum value to + * @param {{function()}} [asyncresult] Callback once you call Complete() + * @param {{function()}} [cancelresult] Callback if the user cancels + */ + this.Show = function (text, start, max, asyncresult, cancelresult) { + try { + // verify no other dialogs are open first + if(isDialogOpen()) throw("A dialog is already open."); + if (text === undefined || text === null || text == "") { + text = "Please wait..."; + } else { + text = text.substring(0, 40); // no more than 40 characters allowed + } + if(start == undefined || start == null) { + start = 0; + } + if(max == undefined || max == null) { + max = 100; + } + value.AsyncResult = asyncresult; + value.CancelResult = cancelresult; + value.DialogSettings = { + Text: "", Caption: text, Buttons: "Cancel", + Icon: MessageBoxIcons.None, WithCheckbox: false, + CheckBoxText: "", DialogType: "wait", + Number: start, Maximum: max + }; + localStorage.setItem(OfficeJS.dialogs.settings(), JSON.stringify(value.DialogSettings)); + // show the dialog + Office.context.ui.displayDialogAsync(OfficeJS.dialogs.GetUrl(), + { height: 25, width: 40, displayInIframe: isOfficeOnline() }, + function (result) { + value.Displayed = true; + value.Dialog = result.value; + value.Dialog.addEventHandler(Office.EventType.DialogEventReceived, function (arg) { + dialogCloseAsync(value.Dialog, function() { + value.Displayed = false; + value.Cancelled = true; + value.CancelResult(); + }); + }); + value.Dialog.addEventHandler(Office.EventType.DialogMessageReceived, function (arg) { + dialogCloseAsync(value.Dialog, function() { + value.Displayed = false; + value.Cancelled = true; + value.CancelResult(); + }); + }); + }); + } catch(e) { + console.log(e); + } + }; + /** + * Updates the progress bar by incrementing it + * @param {number} [increment] The amount ot increment the progress bar by + * @param {string} [text] A new message to display + * @returns {{Value: number, Cancelled: boolean}} Returns a JSON object wiht the value + * of the progress bar and whether the + * user pressed cancel + */ + this.Update = function (increment, text) { + try { + if(text) { + value.DialogSettings.Caption = text.substring(0,40); + } + if(!increment) { + increment = 1; + } + value.DialogSettings.Number += increment; + /** @type {{message:string, settings: any}} */ + var message = { message: "progress", settings: value.DialogSettings }; + localStorage.setItem(OfficeJS.dialogs.message(), JSON.stringify(message)); + var returnResult = { + Value: value.DialogSettings.Number, + Cancelled: value.Cancelled + } + return returnResult; // return JSON + } catch (e) { + console.log(e); + return ""; + } + }; + /** + * Resets the ProgressForm object for reuse + */ + this.Reset = function () { + try { + Progress = new progress(); + } catch (e) { + console.log(e); + } + }; + /** + * Completes the progress. You call this method + * at the end of the process where you display + * progress form + */ + this.Complete = function () { + value.Displayed = false; + dialogCloseAsync(value.Dialog, value.AsyncResult); + }; + /** + * Returns if the dialog is shown + */ + this.Displayed = function() { return value.Displayed }; +} +/**************************************************************************************************** + **************************************************************************************************** + **************************************************************************************************** + * * ***** *** *** *** *** ***** **** *** * * + ** ** * * * * * * * * * * * * * * * + * * * *** * * ***** * ** *** **** * * * + * * * * * * * * * * * * * * * * * * + * * ***** *** *** * * *** ***** **** *** * * + **************************************************************************************************** + **************************************************************************************************** + ****************************************************************************************************/ +/** + * A class for creating message boxes in OfficeJS Web Addins + * @class + */ +function msgbox() { + /** + * Internal referenced values + * @type {{HandleClose: boolean, AsyncResult: {function(button: string, checked: boolean)}, + Dialog: any, DialogSettings: any, Displayed: boolean}} + * */ + var value = { + HandleClose: true, // default + AsyncResult: {}, + Dialog: null, + DialogSettings: {}, + Displayed: false + } + /** + * Shows the message box, with the provided parameters + * @param {string} text The message to be shown in the message box + * @param {string} [caption] The caption on the top of the message box + * @param {MessageBoxButtons} [buttons] The buttons to be displayed on the message box, of + * type MessageBoxButtons + * @param {MessageBoxIcons} [icon] The icon to show on the message box, of type MessageBoxIcons + * @param {boolean} [withcheckbox] Enables a checkbox on the message box below the buttons + * @param {string} [checkboxtext] The message to show on the message box checkbox + * @param {function(string, boolean)} asyncResult Results after the message box is dismissed: + * - button:string result of the button pressed + * - checked:boolean is the checkbox was checked + * @param {boolean} [processupdates] If enabled, the dialog will not close until you issue a + * MessageBox.CloseDialog(). Instead, you can update the message + * box by calling: + * - MessageBox.UpdateMessage - to update the message + * - MessageBox.Update - to update the entire MesssgeBox + */ + this.Show = function (text, caption, buttons, icon, withcheckbox, checkboxtext, asyncResult, processupdates) { + try { + // verify no other dialogs are open first + if(isDialogOpen()) throw("A dialog is already open."); + // verify + if (text == null || text.length == 0) { + throw ("No text for messagebox. Cannot proceeed."); + } + if (processupdates == null) processupdates = false; + if (caption == null) caption = ""; + if (buttons == null) buttons = MessageBoxButtons.Ok; + if (icon == null) icon = MessageBoxIcons.None; + if (withcheckbox == null) withcheckbox = false; + if (checkboxtext == null) checkboxtext = ""; + if (asyncResult == null) { + throw ("No callback specified for MessageBox. Cannot proceed."); + } + value.HandleClose = !processupdates; + value.DialogSettings = { + Text: text, Caption: caption, Buttons: buttons, + Icon: icon, WithCheckbox: withcheckbox, + CheckBoxText: checkboxtext, DialogType: "msg" + }; + // set the storage item for the dialog form + localStorage.setItem(OfficeJS.dialogs.message(), ""); + localStorage.setItem(OfficeJS.dialogs.settings(), JSON.stringify(value.DialogSettings)); + // set the callback + value.AsyncResult = asyncResult; + var msgWidth = 40; + var msgHeight = 30; // with checkbox + if (!withcheckbox) { + msgHeight = 26; // without + } + // show the dialog - we do this in a timeout because in + // quick succession a dialog may not appear if another + // is called + setTimeout(function () { + Office.context.ui.displayDialogAsync(OfficeJS.dialogs.GetUrl(), + { height: msgHeight, width: msgWidth, displayInIframe: isOfficeOnline() }, + function (result) { + value.Displayed = true; + value.Dialog = result.value; + value.Dialog.addEventHandler(Office.EventType.DialogEventReceived, function (arg) { + processMsgBoxMessage(arg); + }); + value.Dialog.addEventHandler(Office.EventType.DialogMessageReceived, function (arg) { + processMsgBoxMessage(arg); + }); + }); + }, 500); + } catch (e) { + console.log(e); + } + }; + /** + * Resets the MessageBox object for reuse + */ + this.Reset = function () { + try { + MessageBox = new msgbox(); + } catch (e) { + console.log(e); + } + }; + /** + * Updates the text on an existing message box, with the provided parameters + * @param {string} text The message to be shown in the message box + * @param {function(string, boolean)} asyncResult Results after the message box is mismissed: + * - String result of the button pressed + * - And boolean is the checkbox was checked + */ + this.UpdateMessage = function (text, asyncResult) { + try { + // verify + if (text == null || text.length == 0) { + throw ("No text for messagebox. Cannot proceeed."); + } + if (asyncResult == null) { + throw ("No callback specified for MessageBox. Cannot proceed."); + } + value.AsyncResult = asyncResult; + value.DialogSettings.Text = text; + /** @type {{ message:string, settings:any }} */ + var message = { message: "update", settings: value.DialogSettings }; + localStorage.setItem(OfficeJS.dialogs.message(), JSON.stringify(message)); + } catch (e) { + console.log(e); + } + }; + /** + * Updates the entire message box, but must be used only if [processupdates] defined + * on the call to MessageBox.Show(). Otherwise, this function does nothing + * @param {string} text The message to be shown in the message box + * @param {string} [caption] The caption on the top of the message box + * @param {MessageBoxButtons} [buttons] The buttons to be displayed on the message box, of + * type MessageBoxButtons + * @param {MessageBoxIcons} [icon] The icon to show on the message box, of type MessageBoxIcons + * @param {boolean} [withcheckbox] Enables a checkbox on the message box below the buttons + * @param {string} [checkboxtext] The message to show on the message box checkbox + * @param {function(string, boolean)} asyncResult Results after the message box is mismissed: + * - String result of the button pressed + * - And boolean is the checkbox was checked + * @param {boolean} [processupdates] If enabled, the dialog will not close until you issue a + * MessageBox.CloseDialog(). Instead, you can update the message + * box by calling: + * - MessageBox.UpdateMessage - to update the message + * - MessageBox.Update - to update the entire MesssgeBox + */ + this.Update = function (text, caption, buttons, icon, withcheckbox, checkboxtext, asyncResult) { + try { + // verify + if (text == null || text.length == 0) { + throw ("No text for messagebox. Cannot proceeed."); + } + if (caption == null) caption = ""; + if (buttons == null) buttons = MessageBoxButtons.Ok; + if (icon == null) icon = MessageBoxIcons.None; + if (withcheckbox == null) withcheckbox = false; + if (checkboxtext == null) checkboxtext = ""; + if (asyncResult == null) { + throw ("No callback specified for MessageBox. Cannot proceed."); + } + value.DialogSettings = { + Text: text, Caption: caption, Buttons: buttons, + Icon: icon, WithCheckbox: withcheckbox, + CheckBoxText: checkboxtext, DialogType: "msg" + }; + // set the callback + value.AsyncResult = asyncResult; + /** @type {object} */ + var message = { message: "update", settings: value.DialogSettings }; + // set the storage item for the dialog form + localStorage.setItem(OfficeJS.dialogs.message(), JSON.stringify(message)); + } catch (e) { + console.log(e); + } + }; + /** + * This method closes the MessageBox + * by calling the helper function + * @param {function()} asyncResult Callback after the dialog is closed + */ + this.CloseDialogAsync = function (asyncResult) { + value.Displayed = false; + dialogCloseAsync(value.Dialog, asyncResult); + } + /** + * Returns if the dialog is shown + */ + this.Displayed = function() { return value.Displayed }; + /** + * Processes the message from the dialog HTML + * @param {string | string} arg An object with the results + */ + function processMsgBoxMessage(arg) { + try { + /** @type {string} */ + var button = ""; + /** @type {boolean} */ + var checked = false; + // process any errors first if there is one and then exit this function, do not + // process the message. The main one we care about is the user pressing the (X) + // to close the form. We want to make sure we reset everything. + /** @type {string} */ + var result = dialogErrorCheck(arg.error); + if (result == "CANCELLED") { + // user clicked the (X) to close the dialog + button = "Cancel"; + checked = false; + } else if (result == "NOERROR") { + button = JSON.parse(arg.message).Button; + checked = JSON.parse(arg.message).Checked; + } else { + button = JSON.stringify({ Error: result }); + } + // close the dialog if not processing multiple messages + if (value.HandleClose) { + // close for the user + dialogCloseAsync(value.Dialog, function() { + value.Displayed = false; + value.AsyncResult(button, checked); + }); + } else { + // return without closing + value.AsyncResult(button, checked); + } + } catch (e) { + console.log(e); + } + } + return this; +} +/**************************************************************************************************** + **************************************************************************************************** + **************************************************************************************************** + *** * ***** **** ***** **** ***** *** * *** *** + * * * * * * * * * * * * * * * * + ***** * *** **** * * * * ***** * * * * ** + * * * * * * * * * * * * * * * * * + * * ***** ***** * * * **** ***** * * ***** *** *** + **************************************************************************************************** + **************************************************************************************************** + ****************************************************************************************************/ +/** + * This is a simple alert dialog + */ +function notify() { + /** + * Internal referenced values + * @type {{AsyncResult: {function(button: string, checked: boolean)}, + Dialog: any, DialogSettings: any, Displayed: boolean}} + * */ + var value = { + AsyncResult: null, + Dialog: null, + DialogSettings: {}, + Displayed: false + } + /** + * Show a basic alert + * @param {string} text The text to show in the alert + * @param {{function()}} [asyncresult] The callback called with the alert is dismissed + */ + this.Show = function(text, asyncresult) { + try { + // verify no other dialogs are open first + if(isDialogOpen()) throw("A dialog is already open."); + value.AsyncResult = asyncresult; + value.DialogSettings = { + Text: text.substring(0, 256), Buttons: "Ok", CheckBoxText: "", DialogType: "alert" + } + localStorage.setItem(OfficeJS.dialogs.settings(), JSON.stringify(value.DialogSettings)); + var height = ((value.DialogSettings.Text.length / 256) * 10) + 15; // max: 25 + var width = ((value.DialogSettings.Text.length / 256) * 20) + 20; // max: 40 + // show the dialog + Office.context.ui.displayDialogAsync(OfficeJS.dialogs.GetUrl(), + { height: height, width: width, displayInIframe: isOfficeOnline() }, + function (result) { + value.Displayed = true; + value.Dialog = result.value; + value.Dialog.addEventHandler(Office.EventType.DialogEventReceived, function (arg) { + dialogCloseAsync(value.Dialog, function() { + value.Displayed = false; + if (value.AsyncResult) value.AsyncResult(); + }); + }); + value.Dialog.addEventHandler(Office.EventType.DialogMessageReceived, function (arg) { + dialogCloseAsync(value.Dialog, function() { + value.Displayed = false; + if (value.AsyncResult) value.AsyncResult(); + }); + }); + }); + } catch(e) { + console.log(e); + } + } + /** + * Returns if the dialog is shown + */ + this.Displayed = function() { return value.Displayed }; +} +/**************************************************************************************************** + **************************************************************************************************** + **************************************************************************************************** + ***** * * **** * * ***** **** *** * * + * ** * * * * * * * * * * * * + * * * * **** * * * **** * * * + * * ** * * * * * * * * * * + ***** * * * *** * **** *** * * + **************************************************************************************************** + **************************************************************************************************** + ****************************************************************************************************/ +/** + * Shows the input box, with the provided parameters + * @class + */ +function ibox(text, caption, defaultValue, asyncResult) { + /** + * Internal referenced values + * @type {{AsyncResult: {function(button: string, checked: boolean)}, + Dialog: any, DialogSettings: any, Displayed: boolean}} + * */ + var value = { + AsyncResult: {}, + Dialog: null, + DialogSettings: {}, + Displayed: false + } + // /** @type {object} */ + // var dialog; + // /** @type {function(string,boolean)} */ + // var callback; + /** + * Shows the input box, with the provided parameters + * @param {string} text The message to be shown in the input box + * @param {string} [caption] The caption on the top of the input box + * @param {string} [defaultvalue] The default value to be provided + * @param {function(string)} asyncResult Results after the input box is mismissed. If the + * returned string is empty, then the user pressed + * cancel. Otherwise it contains the value the user + * typed into the form + */ + this.Show = function (text, caption, defaultvalue, asyncResult) { + try { + // verify no other dialogs are open first + if(isDialogOpen()) throw("A dialog is already open."); + // verify + if (text == null || text.length == 0) { + throw ("No text for InputBox. Cannot proceeed."); + } + if (caption == null) caption = ""; + if (defaultvalue == null) defaultvalue = ""; + if (asyncResult == null) { + throw ("No callback specified for InputBox. Cannot proceed."); + } + value.DialogSettings = { + Text: text, Caption: caption, Buttons: MessageBoxButtons.OkCancel, + Icon: MessageBoxIcons.Question, WithCheckbox: false, + CheckBoxText: "", DialogType: "input", DefaultValue: defaultvalue + }; + // set the storage item for the dialog form + localStorage.setItem(OfficeJS.dialogs.settings(), JSON.stringify(value.DialogSettings)); + // set the callback + value.AsyncResult = asyncResult; + var msgWidth = 40; + var msgHeight = 25; + // show the dialog - we do this in a timeout because in + // quick succession a dialog may not appear if another + // is called + setTimeout(function () { + Office.context.ui.displayDialogAsync(OfficeJS.dialogs.GetUrl(), + { height: msgHeight, width: msgWidth, displayInIframe: isOfficeOnline() }, + function (result) { + value.Displayed = true; + value.Dialog = result.value; + value.Dialog.addEventHandler(Office.EventType.DialogEventReceived, function (arg) { + processInputBoxMessage(arg); + }); + value.Dialog.addEventHandler(Office.EventType.DialogMessageReceived, function (arg) { + processInputBoxMessage(arg); + }); + }); + }, 500); + } catch (e) { + console.log(e); + } + } + /** + * Resets the MessageBox object for reuse + */ + this.Reset = function () { + try { + InputBox = new ibox(); + } catch (e) { + console.log(e); + } + }; + /** + * Returns if the dialog is shown + */ + this.Displayed = function() { return value.Displayed }; + /** + * Processes the message from the dialog HTML + * @param {string | string} arg An object with the results + */ + function processInputBoxMessage(arg) { + try { + /** @type {string} */ + var text = ""; + // process any errors first if there is one and then exit this function, do not + // process the message. The main one we care about is the user pressing the (X) + // to close the form. We want to make sure we reset everything. + /** @type {string} */ + var result = dialogErrorCheck(arg.error); + if (result == "CANCELLED") { + // user clicked the (X) to close the dialog + text = ""; + } else if (result == "NOERROR") { + text = JSON.parse(arg.message).Text; + } else { + text = JSON.stringify({ Error: result }); + } + // close the dialog + dialogCloseAsync(value.Dialog, function() { + // return + value.Displayed = false; + value.AsyncResult(text); + }); + } catch (e) { + console.log(e); + } + } +} +/**************************************************************************************************** + **************************************************************************************************** + **************************************************************************************************** + *** * * *** ***** *** * * ***** *** **** * * + * * * * * * * * * ** ** * * * * * ** ** + * * * * * * * * * * *** * * **** * * * + * * * * * * * * * * * * * * * * * * + *** *** *** * *** * * * *** * * * * + **************************************************************************************************** + **************************************************************************************************** + ****************************************************************************************************/ +/** + * This class helps create a user form in a dialog + * @class + */ +function form() { + /** + * Internal referenced values + * @type {{Url: tring, Height: number, Width: number, Resize: boolean, + AsyncResult: { function(button: string, checked: boolean) }, + Dialog: any, DialogSettings: any, Displayed: boolean}} + **/ + var value = { + Url: "", + Height: 20, // default + Width: 30, // default + Resize: false, // default + HandleClose: true, // default + AsyncResult: {}, + Dialog: null, + DialogSettings: {}, + Displayed: false + }; + /** + * Property: Get/Set: The url for the form. This can take the form: + * - this will look in the current folder where + * OfficeJS.dialogs is installed. + * NOTE: If using from CDN, this will NOT work. + * ../../ - virtual path to the location from the + * current html folder of your app + * // - this will look from the root of the + * server address to the folder specified + * http://// - this will go to the + * literal location + * @param {string} [item] SETTER: The url item you want to set + * @returns {string} GETTER: If item is null, will return the url + */ + this.Url = function (item) { + try { + if (item == null) { + return value.Url; + } else { + // the user can specify an folder off the root + if (item.indexOf("https://") <= 0 && !item.startsWith("/")) { + this.Url = getUrl() + item; + } else if (url.startsWith("/")) { + this.Url = getUrl(true) + item; + } else { + this.Url = item; // a fully qualified url + } + } + } + catch (e) { + console.log(e); + return null; + } + } + /** + * Property: Get/Set: The Height of the form + * @param {Number} [item] SETTER: The height you want the form to be + * @returns {Number} GETTER: If item is null, returns the height of the form + */ + this.Height = function (item) { + try { + if (item == null) { + return value.Height; + } else { + value.Height = item; + } + } catch (e) { + console.log(e); + return null; + } + } + /** + * Property: Get/Set: The Width of the form + * @param {Number} [item] SETTER: The width you want the form to be + * @returns {Number} GETTER: If the item is null, returns the width fo the form + */ + this.Width = function (item) { + try { + if (item == null) { + return value.Width; + } else { + value.Width = item; + } + } catch (e) { + console.log(e); + return null; + } + } + /** + * Property: Get/Set: If true the form will close when a message is recieved. + * If false, the caller will have to handle the dialog.close(); + * @param {boolean} [item] SETTER: Sets whether the form will close when a message is recieved + * @returns {boolean} GETTER: The value of whether the form will close when it recieves a message + */ + this.HandleClose = function (item) { + try { + if (item == null) { + return value.HandleClose; + } else { + value.HandleClose = item; + } + } catch (e) { + console.log(e); + return null; + } + } + /** + * Property: Set Only: Sets the callback function only + * @param {function(string)} - The callback function + */ + this.AsyncResult = function (item) { + try { + value.AsyncResult = item; + } catch (e) { + console.log(e); + return null; + } + } + /** + * This method closes the MessageBox + * by calling the helper function + * @param {function()} asyncResult - callback once the dialog is closed + */ + this.CloseDialogAsync = function (asyncResult) { + value.Displayed = false; + dialogCloseAsync(value.Dialog, asyncResult); + } + /** + * Returns if the dialog is shown + */ + this.Displayed = function() { return value.Displayed }; + /** + * Shows a form, with the provided parameters + * @param {string} [url] The url to the form This can take the form: + * - this will look in the current folder where + * OfficeJS.dialogs is installed. + * NOTE: If using from CDN, this will NOT work. + * ../../ - virtual path to the location from the + * current html folder of your app + * // - this will look from the root of the + * server address to the folder specified + * http://// - this will go to the + * literal location + * @param {number} [height] The height of the form + * @param {number} [width] The width of the form + * @param {boolean} [handleclose] If true, when the form is dismissed the dialog will be closed. + * Otherwise, it is left open and the caller will have to handle + * the dialog.close() + * @param {function(string)} [asyncresult] Results after the form is dismissed. The + * result will be a JSON object like this: + * { + * Error: { }, // Error object + * Result: { }, // JSON from form + * Cancelled: false, // boolean if form cancelled with X + * Dialog: { } // A reference to the dialog + * } + */ + this.Show = function (url, height, width, handleclose, asyncresult) { + try { + // verify no other dialogs are open first + if(isDialogOpen()) throw("A dialog is already open."); + // set the callback + if (asyncresult) { + value.AsyncResult = asyncresult; + } else { throw ("No asyncresult defined."); } + if (height && width) { + // set the other values + value.Height = height; + value.Width = width; + if (value.Height == 0 || value.Width == 0) { + value.Resize = true; + value.Height = 1; // minimum + value.Width = 1; // minimum + } + } + // set the url + if (url) { + // the suer can specify an folder off the root + if (url.indexOf("https://") <= 0 && !url.startsWith("/")) { + value.Url = getUrl() + url; + } else if (url.startsWith("/")) { + // add the host name, assuming we have a full relative path + // from the host name and then remove the leading / + value.Url = getUrl(true) + url.replace("/", ""); + } else { + value.Url = url; // a fully qualified url + } + } + // handle close + if (handleclose != null) { + value.HandleClose = handleclose; + } + // verify + if (value.Url == null || value.Url.length == 0) { + throw ("No url specified for form. Cannot proceed."); + } + if (!value.AsyncResult) { + throw ("No callback specified for form. Cannot proceed."); + } + value.DialogSettings = { Url: value.Url, DialogType: "form", Resize: value.Resize }; + // set the storage item for the dialog form + localStorage.setItem(OfficeJS.dialogs.settings(), JSON.stringify(value.DialogSettings)); + // show the dialog - we do this in a timeout because in + // quick succession a dialog may not appear if another + // is called + setTimeout(function () { + Office.context.ui.displayDialogAsync(OfficeJS.dialogs.GetUrl(), + { height: value.Height, width: value.Width, displayInIframe: isOfficeOnline() }, + function (result) { + value.Displayed = true; + value.Dialog = result.value; + value.Dialog.addEventHandler(Office.EventType.DialogEventReceived, function (arg) { + processFormMessage(arg); + }); + value.Dialog.addEventHandler(Office.EventType.DialogMessageReceived, function (arg) { + processFormMessage(arg); + }); + } + ); + }, 500); + } catch (e) { + console.log(e); + } + } + /** + * Resets the Form object for reuse + */ + this.Reset = function () { + try { + Form = new form(); + } catch (e) { + console.log(e); + } + }; + /** + * Processes the message from the dialog HTML + * @param {string | string} arg An object with the results + */ + function processFormMessage(arg) { + try { + /**@type { } */ + var returnVal = { + Error: {}, // Error object + Result: {}, // JSON from form + Cancelled: false, // boolean if formed cancelled with X + }; + // process any errors first if there is one and then exit this function, do not + // process the message. The main one we care about is the user pressing the (X) + // to close the form. We want to make sure we reset everything. + /** @type {string} */ + var result = dialogErrorCheck(arg.error); + if (result == "CANCELLED") { + // user clicked the (X) to close the dialog + returnVal.Cancelled = true; + } else if (result == "NOERROR") { + returnVal.Result = arg.message; + } else { + // an error occurred + returnVal.Error = result; + } + // close the dialog + if (value.HandleClose) { + dialogCloseAsync(value.Dialog, function() { + // return + value.AsyncResult(JSON.stringify(returnVal)); + value.Displayed = false; + }); + } else { + // return + value.AsyncResult(JSON.stringify(returnVal)); + } + } catch (e) { + console.log(e); + } + } +} +/**************************************************************************************************** + **************************************************************************************************** + **************************************************************************************************** + * * ***** * **** ***** **** ***** * * * * *** ***** ***** *** * * *** + * * * * * * * * * * * * ** * * * * * * * ** * * * + ***** *** * **** *** **** *** * * * * * * * * * * * * * * + * * * * * * * * * * * * ** * * * * * * * ** * * + * * ***** ***** * ***** * * * *** * * *** * ***** *** * * *** + **************************************************************************************************** + **************************************************************************************************** + ****************************************************************************************************/ +/** + * Closes the currently open dialog asyncronously. + * This has an ugly workaround which is to try to set a new + * event handler on the dialog until it fails. When it failed + * we know the original dialog object was destroyed and we + * can then proceed. The issue we are working around is that + * if you call two dialogs back to back, the second one will + * likely not open at all. + * @param {Office.context.ui.dialog} dialog The dialog to be closed + * @param {function()} asyncResult The callback when close is complete + */ + function dialogCloseAsync(dialog, asyncResult){ + // send a message to the dialog first just to stop any + // message pump it may have running. + var message = { message: "close", settings: {} }; + localStorage.setItem(OfficeJS.dialogs.message(), JSON.stringify(message)); + // issue the close + dialog.close(); + // and keep here until aync closed + setTimeout(function() { + try{ + dialog.addEventHandler(Office.EventType.DialogMessageReceived, function() {}); + dialogCloseAsync(dialog, asyncResult); + } catch(e) { + asyncResult(); // done - closed + } + }, 0); +} +/** + * Returns true of any of our dialog types is open: + * - MessageBox + * - InputBox + * - Alert + * - Progress + * - Form + */ +function isDialogOpen() { + return MessageBox.Displayed() || + InputBox.Displayed() || + Alert.Displayed() || + Progress.Displayed() || + Form.Displayed() || + PrintPreview.Displayed(); +} +/** + * Gets the URL of this JS file so we can then grab the dialog html + * that will be in the same folder + * @param {boolean} [convert] appends the server name to a relative path + * such as (/folder/pages/page.html) will become + * https://server/folder/pages/page.html + * @returns {string} The URL + */ +function getUrl(convert) { + try { + /** @type {string} */ + var url = getScriptURL(); // document.location.href; + if (convert) { + url = "https://" + document.location.host + "/"; + } + /** @type {number} */ + var pos = url.lastIndexOf("/"); + url = url.substring(0, pos); + if (!url.endsWith("/")) { + url += "/"; + } + return url; + } catch (e) { + console.log(e); + return null; + } +} +/** + * Returns whether the platform is OffOnline + * @returns {boolean} True if it is OfficeOnline + */ +function isOfficeOnline() { + /** + * Check to see if we are in full client or not + * @type {string} + */ + var platform = Office.context.platform; + if (platform == "OfficeOnline") { + return true; + } else { + return false; + } +} +/** + * Returns the error details if there is an error number + * @param {Number} error + * @returns {string} Retruns an error message or NOERROR if there is none, + * or CANCELLED if the dialog was cancelled + */ +function dialogErrorCheck(error) { + if (error == 12006) { + return "CANCELLED"; + } else if (error > 0) { + return error.message; + } else { + return "NOERROR"; + } +} + +/** + * Returns the url of the current running script + * @returns {string} Retruns the url + */ +var getScriptURL = (function () { + var scripts = document.getElementsByTagName('script'); + var index = scripts.length - 1; + var myScript = scripts[index]; + return function () { return myScript.src; }; +})(); \ No newline at end of file diff --git a/node_modules/officejs.dialogs/package.json b/node_modules/officejs.dialogs/package.json new file mode 100644 index 0000000..6c2f69b --- /dev/null +++ b/node_modules/officejs.dialogs/package.json @@ -0,0 +1,93 @@ +{ + "_args": [ + [ + { + "raw": "officejs.dialogs", + "scope": null, + "escapedName": "officejs.dialogs", + "name": "officejs.dialogs", + "rawSpec": "", + "spec": "latest", + "type": "tag" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample" + ] + ], + "_from": "officejs.dialogs@latest", + "_id": "officejs.dialogs@1.0.8", + "_inCache": true, + "_location": "/officejs.dialogs", + "_nodeVersion": "6.10.3", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/officejs.dialogs-1.0.8.tgz_1505313593674_0.7713123597204685" + }, + "_npmUser": { + "name": "davecra", + "email": "decyahoo-gravatar@yahoo.com" + }, + "_npmVersion": "3.10.10", + "_phantomChildren": {}, + "_requested": { + "raw": "officejs.dialogs", + "scope": null, + "escapedName": "officejs.dialogs", + "name": "officejs.dialogs", + "rawSpec": "", + "spec": "latest", + "type": "tag" + }, + "_requiredBy": [ + "#USER" + ], + "_resolved": "https://registry.npmjs.org/officejs.dialogs/-/officejs.dialogs-1.0.8.tgz", + "_shasum": "151bf82eeb74e19a91b6d0c4dbe649897d54e269", + "_shrinkwrap": null, + "_spec": "officejs.dialogs", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample", + "author": { + "name": "David E. Craig" + }, + "bugs": { + "url": "https://github.com/davecra/OfficeJS.dialogs/issues" + }, + "dependencies": {}, + "description": "A library that provides a simple MessageBox, InputBox and Form patterns using the Office.ui.dialog for OfficeJS solutions.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "151bf82eeb74e19a91b6d0c4dbe649897d54e269", + "tarball": "https://registry.npmjs.org/officejs.dialogs/-/officejs.dialogs-1.0.8.tgz" + }, + "gitHead": "c8aac31f7e4406c3ffe76ff585065e15047ce5e1", + "homepage": "https://github.com/davecra/OfficeJS.dialogs#readme", + "keywords": [ + "officejs", + "ui", + "dialog", + "messagebox", + "javascript", + "inputbox", + "form" + ], + "license": "ISC", + "main": "dialogs.js", + "maintainers": [ + { + "name": "davecra", + "email": "decyahoo-gravatar@yahoo.com" + } + ], + "name": "officejs.dialogs", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/davecra/OfficeJS.dialogs.git" + }, + "scripts": { + "start": "browser-sync start --config bsconfig.json", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "version": "1.0.8" +} diff --git a/node_modules/once/LICENSE b/node_modules/once/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/once/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/once/README.md b/node_modules/once/README.md new file mode 100644 index 0000000..1f1ffca --- /dev/null +++ b/node_modules/once/README.md @@ -0,0 +1,79 @@ +# once + +Only call a function once. + +## usage + +```javascript +var once = require('once') + +function load (file, cb) { + cb = once(cb) + loader.load('file') + loader.once('load', cb) + loader.once('error', cb) +} +``` + +Or add to the Function.prototype in a responsible way: + +```javascript +// only has to be done once +require('once').proto() + +function load (file, cb) { + cb = cb.once() + loader.load('file') + loader.once('load', cb) + loader.once('error', cb) +} +``` + +Ironically, the prototype feature makes this module twice as +complicated as necessary. + +To check whether you function has been called, use `fn.called`. Once the +function is called for the first time the return value of the original +function is saved in `fn.value` and subsequent calls will continue to +return this value. + +```javascript +var once = require('once') + +function load (cb) { + cb = once(cb) + var stream = createStream() + stream.once('data', cb) + stream.once('end', function () { + if (!cb.called) cb(new Error('not found')) + }) +} +``` + +## `once.strict(func)` + +Throw an error if the function is called twice. + +Some functions are expected to be called only once. Using `once` for them would +potentially hide logical errors. + +In the example below, the `greet` function has to call the callback only once: + +```javascript +function greet (name, cb) { + // return is missing from the if statement + // when no name is passed, the callback is called twice + if (!name) cb('Hello anonymous') + cb('Hello ' + name) +} + +function log (msg) { + console.log(msg) +} + +// this will print 'Hello anonymous' but the logical error will be missed +greet(null, once(msg)) + +// once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time +greet(null, once.strict(msg)) +``` diff --git a/node_modules/once/once.js b/node_modules/once/once.js new file mode 100644 index 0000000..2354067 --- /dev/null +++ b/node_modules/once/once.js @@ -0,0 +1,42 @@ +var wrappy = require('wrappy') +module.exports = wrappy(once) +module.exports.strict = wrappy(onceStrict) + +once.proto = once(function () { + Object.defineProperty(Function.prototype, 'once', { + value: function () { + return once(this) + }, + configurable: true + }) + + Object.defineProperty(Function.prototype, 'onceStrict', { + value: function () { + return onceStrict(this) + }, + configurable: true + }) +}) + +function once (fn) { + var f = function () { + if (f.called) return f.value + f.called = true + return f.value = fn.apply(this, arguments) + } + f.called = false + return f +} + +function onceStrict (fn) { + var f = function () { + if (f.called) + throw new Error(f.onceError) + f.called = true + return f.value = fn.apply(this, arguments) + } + var name = fn.name || 'Function wrapped with `once`' + f.onceError = name + " shouldn't be called more than once" + f.called = false + return f +} diff --git a/node_modules/once/package.json b/node_modules/once/package.json new file mode 100644 index 0000000..4ffcabe --- /dev/null +++ b/node_modules/once/package.json @@ -0,0 +1,101 @@ +{ + "_args": [ + [ + { + "raw": "once@^1.3.0", + "scope": null, + "escapedName": "once", + "name": "once", + "rawSpec": "^1.3.0", + "spec": ">=1.3.0 <2.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\glob" + ] + ], + "_from": "once@>=1.3.0 <2.0.0", + "_id": "once@1.4.0", + "_inCache": true, + "_location": "/once", + "_nodeVersion": "6.5.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/once-1.4.0.tgz_1473196269128_0.537820661207661" + }, + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "3.10.7", + "_phantomChildren": {}, + "_requested": { + "raw": "once@^1.3.0", + "scope": null, + "escapedName": "once", + "name": "once", + "rawSpec": "^1.3.0", + "spec": ">=1.3.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/glob", + "/inflight" + ], + "_resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "_shasum": "583b1aa775961d4b113ac17d9c50baef9dd76bd1", + "_shrinkwrap": null, + "_spec": "once@^1.3.0", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\glob", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/once/issues" + }, + "dependencies": { + "wrappy": "1" + }, + "description": "Run a function exactly one time", + "devDependencies": { + "tap": "^7.0.1" + }, + "directories": { + "test": "test" + }, + "dist": { + "shasum": "583b1aa775961d4b113ac17d9c50baef9dd76bd1", + "tarball": "https://registry.npmjs.org/once/-/once-1.4.0.tgz" + }, + "files": [ + "once.js" + ], + "gitHead": "0e614d9f5a7e6f0305c625f6b581f6d80b33b8a6", + "homepage": "https://github.com/isaacs/once#readme", + "keywords": [ + "once", + "function", + "one", + "single" + ], + "license": "ISC", + "main": "once.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "once", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/once.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "1.4.0" +} diff --git a/node_modules/optionator/CHANGELOG.md b/node_modules/optionator/CHANGELOG.md new file mode 100644 index 0000000..c0e0cf2 --- /dev/null +++ b/node_modules/optionator/CHANGELOG.md @@ -0,0 +1,52 @@ +# 0.8.2 +- fix bug #18 - detect missing value when flag is last item +- update dependencies + +# 0.8.1 +- update `fast-levenshtein` dependency + +# 0.8.0 +- update `levn` dependency - supplying a float value to an option with type `Int` now throws an error, instead of silently converting to an `Int` + +# 0.7.1 +- fix bug with use of `defaults` and `concatRepeatedArrays` or `mergeRepeatedObjects` + +# 0.7.0 +- added `concatrepeatedarrays` option: `oneValuePerFlag`, only allows one array value per flag +- added `typeAliases` option +- added `parseArgv` which takes an array and parses with the first two items sliced off +- changed enum help style +- bug fixes (#12) +- use of `concatRepeatedArrays` and `mergeRepeatedObjects` at the top level is deprecated, use it as either a per-option option, or set them in the `defaults` object to set them for all objects + +# 0.6.0 +- added `defaults` lib-option flag, allowing one to set default properties for all options +- added `concatRepeatedArrays` and `mergeRepeatedObjects` as option level properties, allowing you to turn this feature on for specific options only + +# 0.5.0 +- `Boolean` flags with `default: 'true'`, and no short aliases, will by default show the `--no` version in help + +# 0.4.0 +- add `mergeRepeatedObjects` setting + +# 0.3.0 +- add `concatRepeatedArrays` setting +- add `overrideRequired` option setting +- use just Levenshtein string compare algo rather than Levenshtein Damerau to due dependency license issue + +# 0.2.2 +- bug fixes + +# 0.2.1 +- improved interpolation +- added changelog + +# 0.2.0 +- add dependency checks to options - added `dependsOn` as an option property +- add interpolation for `prepend` and `append` text with new `generateHelp` option, `interpolate` + +# 0.1.1 +- update dependencies + +# 0.1.0 +- initial release diff --git a/node_modules/optionator/LICENSE b/node_modules/optionator/LICENSE new file mode 100644 index 0000000..525b118 --- /dev/null +++ b/node_modules/optionator/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) George Zahariev + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/optionator/README.md b/node_modules/optionator/README.md new file mode 100644 index 0000000..91c59d3 --- /dev/null +++ b/node_modules/optionator/README.md @@ -0,0 +1,236 @@ +# Optionator + + +Optionator is a JavaScript option parsing and help generation library used by [eslint](http://eslint.org), [Grasp](http://graspjs.com), [LiveScript](http://livescript.net), [esmangle](https://github.com/estools/esmangle), [escodegen](https://github.com/estools/escodegen), and [many more](https://www.npmjs.com/browse/depended/optionator). + +For an online demo, check out the [Grasp online demo](http://www.graspjs.com/#demo). + +[About](#about) · [Usage](#usage) · [Settings Format](#settings-format) · [Argument Format](#argument-format) + +## Why? +The problem with other option parsers, such as `yargs` or `minimist`, is they just accept all input, valid or not. +With Optionator, if you mistype an option, it will give you an error (with a suggestion for what you meant). +If you give the wrong type of argument for an option, it will give you an error rather than supplying the wrong input to your application. + + $ cmd --halp + Invalid option '--halp' - perhaps you meant '--help'? + + $ cmd --count str + Invalid value for option 'count' - expected type Int, received value: str. + +Other helpful features include reformatting the help text based on the size of the console, so that it fits even if the console is narrow, and accepting not just an array (eg. process.argv), but a string or object as well, making things like testing much easier. + +## About +Optionator uses [type-check](https://github.com/gkz/type-check) and [levn](https://github.com/gkz/levn) behind the scenes to cast and verify input according the specified types. + +MIT license. Version 0.8.2 + + npm install optionator + +For updates on Optionator, [follow me on twitter](https://twitter.com/gkzahariev). + +## Usage +`require('optionator');` returns a function. It has one property, `VERSION`, the current version of the library as a string. This function is called with an object specifying your options and other information, see the [settings format section](#settings-format). This in turn returns an object with three properties, `parse`, `parseArgv`, `generateHelp`, and `generateHelpForOption`, which are all functions. + +```js +var optionator = require('optionator')({ + prepend: 'Usage: cmd [options]', + append: 'Version 1.0.0', + options: [{ + option: 'help', + alias: 'h', + type: 'Boolean', + description: 'displays help' + }, { + option: 'count', + alias: 'c', + type: 'Int', + description: 'number of things', + example: 'cmd --count 2' + }] +}); + +var options = optionator.parseArgv(process.argv); +if (options.help) { + console.log(optionator.generateHelp()); +} +... +``` + +### parse(input, parseOptions) +`parse` processes the `input` according to your settings, and returns an object with the results. + +##### arguments +* input - `[String] | Object | String` - the input you wish to parse +* parseOptions - `{slice: Int}` - all options optional + - `slice` specifies how much to slice away from the beginning if the input is an array or string - by default `0` for string, `2` for array (works with `process.argv`) + +##### returns +`Object` - the parsed options, each key is a camelCase version of the option name (specified in dash-case), and each value is the processed value for that option. Positional values are in an array under the `_` key. + +##### example +```js +parse(['node', 't.js', '--count', '2', 'positional']); // {count: 2, _: ['positional']} +parse('--count 2 positional'); // {count: 2, _: ['positional']} +parse({count: 2, _:['positional']}); // {count: 2, _: ['positional']} +``` + +### parseArgv(input) +`parseArgv` works exactly like `parse`, but only for array input and it slices off the first two elements. + +##### arguments +* input - `[String]` - the input you wish to parse + +##### returns +See "returns" section in "parse" + +##### example +```js +parseArgv(process.argv); +``` + +### generateHelp(helpOptions) +`generateHelp` produces help text based on your settings. + +##### arguments +* helpOptions - `{showHidden: Boolean, interpolate: Object}` - all options optional + - `showHidden` specifies whether to show options with `hidden: true` specified, by default it is `false` + - `interpolate` specify data to be interpolated in `prepend` and `append` text, `{{key}}` is the format - eg. `generateHelp({interpolate:{version: '0.4.2'}})`, will change this `append` text: `Version {{version}}` to `Version 0.4.2` + +##### returns +`String` - the generated help text + +##### example +```js +generateHelp(); /* +"Usage: cmd [options] positional + + -h, --help displays help + -c, --count Int number of things + +Version 1.0.0 +"*/ +``` + +### generateHelpForOption(optionName) +`generateHelpForOption` produces expanded help text for the specified with `optionName` option. If an `example` was specified for the option, it will be displayed, and if a `longDescription` was specified, it will display that instead of the `description`. + +##### arguments +* optionName - `String` - the name of the option to display + +##### returns +`String` - the generated help text for the option + +##### example +```js +generateHelpForOption('count'); /* +"-c, --count Int +description: number of things +example: cmd --count 2 +"*/ +``` + +## Settings Format +When your `require('optionator')`, you get a function that takes in a settings object. This object has the type: + + { + prepend: String, + append: String, + options: [{heading: String} | { + option: String, + alias: [String] | String, + type: String, + enum: [String], + default: String, + restPositional: Boolean, + required: Boolean, + overrideRequired: Boolean, + dependsOn: [String] | String, + concatRepeatedArrays: Boolean | (Boolean, Object), + mergeRepeatedObjects: Boolean, + description: String, + longDescription: String, + example: [String] | String + }], + helpStyle: { + aliasSeparator: String, + typeSeparator: String, + descriptionSeparator: String, + initialIndent: Int, + secondaryIndent: Int, + maxPadFactor: Number + }, + mutuallyExclusive: [[String | [String]]], + concatRepeatedArrays: Boolean | (Boolean, Object), // deprecated, set in defaults object + mergeRepeatedObjects: Boolean, // deprecated, set in defaults object + positionalAnywhere: Boolean, + typeAliases: Object, + defaults: Object + } + +All of the properties are optional (the `Maybe` has been excluded for brevities sake), except for having either `heading: String` or `option: String` in each object in the `options` array. + +### Top Level Properties +* `prepend` is an optional string to be placed before the options in the help text +* `append` is an optional string to be placed after the options in the help text +* `options` is a required array specifying your options and headings, the options and headings will be displayed in the order specified +* `helpStyle` is an optional object which enables you to change the default appearance of some aspects of the help text +* `mutuallyExclusive` is an optional array of arrays of either strings or arrays of strings. The top level array is a list of rules, each rule is a list of elements - each element can be either a string (the name of an option), or a list of strings (a group of option names) - there will be an error if more than one element is present +* `concatRepeatedArrays` see description under the "Option Properties" heading - use at the top level is deprecated, if you want to set this for all options, use the `defaults` property +* `mergeRepeatedObjects` see description under the "Option Properties" heading - use at the top level is deprecated, if you want to set this for all options, use the `defaults` property +* `positionalAnywhere` is an optional boolean (defaults to `true`) - when `true` it allows positional arguments anywhere, when `false`, all arguments after the first positional one are taken to be positional as well, even if they look like a flag. For example, with `positionalAnywhere: false`, the arguments `--flag --boom 12 --crack` would have two positional arguments: `12` and `--crack` +* `typeAliases` is an optional object, it allows you to set aliases for types, eg. `{Path: 'String'}` would allow you to use the type `Path` as an alias for the type `String` +* `defaults` is an optional object following the option properties format, which specifies default values for all options. A default will be overridden if manually set. For example, you can do `default: { type: "String" }` to set the default type of all options to `String`, and then override that default in an individual option by setting the `type` property + +#### Heading Properties +* `heading` a required string, the name of the heading + +#### Option Properties +* `option` the required name of the option - use dash-case, without the leading dashes +* `alias` is an optional string or array of strings which specify any aliases for the option +* `type` is a required string in the [type check](https://github.com/gkz/type-check) [format](https://github.com/gkz/type-check#type-format), this will be used to cast the inputted value and validate it +* `enum` is an optional array of strings, each string will be parsed by [levn](https://github.com/gkz/levn) - the argument value must be one of the resulting values - each potential value must validate against the specified `type` +* `default` is a optional string, which will be parsed by [levn](https://github.com/gkz/levn) and used as the default value if none is set - the value must validate against the specified `type` +* `restPositional` is an optional boolean - if set to `true`, everything after the option will be taken to be a positional argument, even if it looks like a named argument +* `required` is an optional boolean - if set to `true`, the option parsing will fail if the option is not defined +* `overrideRequired` is a optional boolean - if set to `true` and the option is used, and there is another option which is required but not set, it will override the need for the required option and there will be no error - this is useful if you have required options and want to use `--help` or `--version` flags +* `concatRepeatedArrays` is an optional boolean or tuple with boolean and options object (defaults to `false`) - when set to `true` and an option contains an array value and is repeated, the subsequent values for the flag will be appended rather than overwriting the original value - eg. option `g` of type `[String]`: `-g a -g b -g c,d` will result in `['a','b','c','d']` + + You can supply an options object by giving the following value: `[true, options]`. The one currently supported option is `oneValuePerFlag`, this only allows one array value per flag. This is useful if your potential values contain a comma. +* `mergeRepeatedObjects` is an optional boolean (defaults to `false`) - when set to `true` and an option contains an object value and is repeated, the subsequent values for the flag will be merged rather than overwriting the original value - eg. option `g` of type `Object`: `-g a:1 -g b:2 -g c:3,d:4` will result in `{a: 1, b: 2, c: 3, d: 4}` +* `dependsOn` is an optional string or array of strings - if simply a string (the name of another option), it will make sure that that other option is set, if an array of strings, depending on whether `'and'` or `'or'` is first, it will either check whether all (`['and', 'option-a', 'option-b']`), or at least one (`['or', 'option-a', 'option-b']`) other options are set +* `description` is an optional string, which will be displayed next to the option in the help text +* `longDescription` is an optional string, it will be displayed instead of the `description` when `generateHelpForOption` is used +* `example` is an optional string or array of strings with example(s) for the option - these will be displayed when `generateHelpForOption` is used + +#### Help Style Properties +* `aliasSeparator` is an optional string, separates multiple names from each other - default: ' ,' +* `typeSeparator` is an optional string, separates the type from the names - default: ' ' +* `descriptionSeparator` is an optional string , separates the description from the padded name and type - default: ' ' +* `initialIndent` is an optional int - the amount of indent for options - default: 2 +* `secondaryIndent` is an optional int - the amount of indent if wrapped fully (in addition to the initial indent) - default: 4 +* `maxPadFactor` is an optional number - affects the default level of padding for the names/type, it is multiplied by the average of the length of the names/type - default: 1.5 + +## Argument Format +At the highest level there are two types of arguments: named, and positional. + +Name arguments of any length are prefixed with `--` (eg. `--go`), and those of one character may be prefixed with either `--` or `-` (eg. `-g`). + +There are two types of named arguments: boolean flags (eg. `--problemo`, `-p`) which take no value and result in a `true` if they are present, the falsey `undefined` if they are not present, or `false` if present and explicitly prefixed with `no` (eg. `--no-problemo`). Named arguments with values (eg. `--tseries 800`, `-t 800`) are the other type. If the option has a type `Boolean` it will automatically be made into a boolean flag. Any other type results in a named argument that takes a value. + +For more information about how to properly set types to get the value you want, take a look at the [type check](https://github.com/gkz/type-check) and [levn](https://github.com/gkz/levn) pages. + +You can group single character arguments that use a single `-`, however all except the last must be boolean flags (which take no value). The last may be a boolean flag, or an argument which takes a value - eg. `-ba 2` is equivalent to `-b -a 2`. + +Positional arguments are all those values which do not fall under the above - they can be anywhere, not just at the end. For example, in `cmd -b one -a 2 two` where `b` is a boolean flag, and `a` has the type `Number`, there are two positional arguments, `one` and `two`. + +Everything after an `--` is positional, even if it looks like a named argument. + +You may optionally use `=` to separate option names from values, for example: `--count=2`. + +If you specify the option `NUM`, then any argument using a single `-` followed by a number will be valid and will set the value of `NUM`. Eg. `-2` will be parsed into `NUM: 2`. + +If duplicate named arguments are present, the last one will be taken. + +## Technical About +`optionator` is written in [LiveScript](http://livescript.net/) - a language that compiles to JavaScript. It uses [levn](https://github.com/gkz/levn) to cast arguments to their specified type, and uses [type-check](https://github.com/gkz/type-check) to validate values. It also uses the [prelude.ls](http://preludels.com/) library. diff --git a/node_modules/optionator/lib/help.js b/node_modules/optionator/lib/help.js new file mode 100644 index 0000000..a459c02 --- /dev/null +++ b/node_modules/optionator/lib/help.js @@ -0,0 +1,247 @@ +// Generated by LiveScript 1.5.0 +(function(){ + var ref$, id, find, sort, min, max, map, unlines, nameToRaw, dasherize, naturalJoin, wordwrap, getPreText, setHelpStyleDefaults, generateHelpForOption, generateHelp; + ref$ = require('prelude-ls'), id = ref$.id, find = ref$.find, sort = ref$.sort, min = ref$.min, max = ref$.max, map = ref$.map, unlines = ref$.unlines; + ref$ = require('./util'), nameToRaw = ref$.nameToRaw, dasherize = ref$.dasherize, naturalJoin = ref$.naturalJoin; + wordwrap = require('wordwrap'); + getPreText = function(option, arg$, maxWidth){ + var mainName, shortNames, ref$, longNames, type, description, aliasSeparator, typeSeparator, initialIndent, names, namesString, namesStringLen, typeSeparatorString, typeSeparatorStringLen, wrap; + mainName = option.option, shortNames = (ref$ = option.shortNames) != null + ? ref$ + : [], longNames = (ref$ = option.longNames) != null + ? ref$ + : [], type = option.type, description = option.description; + aliasSeparator = arg$.aliasSeparator, typeSeparator = arg$.typeSeparator, initialIndent = arg$.initialIndent; + if (option.negateName) { + mainName = "no-" + mainName; + if (longNames) { + longNames = map(function(it){ + return "no-" + it; + }, longNames); + } + } + names = mainName.length === 1 + ? [mainName].concat(shortNames, longNames) + : shortNames.concat([mainName], longNames); + namesString = map(nameToRaw, names).join(aliasSeparator); + namesStringLen = namesString.length; + typeSeparatorString = mainName === 'NUM' ? '::' : typeSeparator; + typeSeparatorStringLen = typeSeparatorString.length; + if (maxWidth != null && !option.boolean && initialIndent + namesStringLen + typeSeparatorStringLen + type.length > maxWidth) { + wrap = wordwrap(initialIndent + namesStringLen + typeSeparatorStringLen, maxWidth); + return namesString + "" + typeSeparatorString + wrap(type).replace(/^\s+/, ''); + } else { + return namesString + "" + (option.boolean + ? '' + : typeSeparatorString + "" + type); + } + }; + setHelpStyleDefaults = function(helpStyle){ + helpStyle.aliasSeparator == null && (helpStyle.aliasSeparator = ', '); + helpStyle.typeSeparator == null && (helpStyle.typeSeparator = ' '); + helpStyle.descriptionSeparator == null && (helpStyle.descriptionSeparator = ' '); + helpStyle.initialIndent == null && (helpStyle.initialIndent = 2); + helpStyle.secondaryIndent == null && (helpStyle.secondaryIndent = 4); + helpStyle.maxPadFactor == null && (helpStyle.maxPadFactor = 1.5); + }; + generateHelpForOption = function(getOption, arg$){ + var stdout, helpStyle, ref$; + stdout = arg$.stdout, helpStyle = (ref$ = arg$.helpStyle) != null + ? ref$ + : {}; + setHelpStyleDefaults(helpStyle); + return function(optionName){ + var maxWidth, wrap, option, e, pre, defaultString, restPositionalString, description, fullDescription, that, preDescription, descriptionString, exampleString, examples, seperator; + maxWidth = stdout != null && stdout.isTTY ? stdout.columns - 1 : null; + wrap = maxWidth ? wordwrap(maxWidth) : id; + try { + option = getOption(dasherize(optionName)); + } catch (e$) { + e = e$; + return e.message; + } + pre = getPreText(option, helpStyle); + defaultString = option['default'] && !option.negateName ? "\ndefault: " + option['default'] : ''; + restPositionalString = option.restPositional ? 'Everything after this option is considered a positional argument, even if it looks like an option.' : ''; + description = option.longDescription || option.description && sentencize(option.description); + fullDescription = description && restPositionalString + ? description + " " + restPositionalString + : (that = description || restPositionalString) ? that : ''; + preDescription = 'description:'; + descriptionString = !fullDescription + ? '' + : maxWidth && fullDescription.length - 1 - preDescription.length > maxWidth + ? "\n" + preDescription + "\n" + wrap(fullDescription) + : "\n" + preDescription + " " + fullDescription; + exampleString = (that = option.example) ? (examples = [].concat(that), examples.length > 1 + ? "\nexamples:\n" + unlines(examples) + : "\nexample: " + examples[0]) : ''; + seperator = defaultString || descriptionString || exampleString ? "\n" + repeatString$('=', pre.length) : ''; + return pre + "" + seperator + defaultString + descriptionString + exampleString; + }; + }; + generateHelp = function(arg$){ + var options, prepend, append, helpStyle, ref$, stdout, aliasSeparator, typeSeparator, descriptionSeparator, maxPadFactor, initialIndent, secondaryIndent; + options = arg$.options, prepend = arg$.prepend, append = arg$.append, helpStyle = (ref$ = arg$.helpStyle) != null + ? ref$ + : {}, stdout = arg$.stdout; + setHelpStyleDefaults(helpStyle); + aliasSeparator = helpStyle.aliasSeparator, typeSeparator = helpStyle.typeSeparator, descriptionSeparator = helpStyle.descriptionSeparator, maxPadFactor = helpStyle.maxPadFactor, initialIndent = helpStyle.initialIndent, secondaryIndent = helpStyle.secondaryIndent; + return function(arg$){ + var ref$, showHidden, interpolate, maxWidth, output, out, data, optionCount, totalPreLen, preLens, i$, len$, item, that, pre, descParts, desc, preLen, sortedPreLens, maxPreLen, preLenMean, x, padAmount, descSepLen, fullWrapCount, partialWrapCount, descLen, totalLen, initialSpace, wrapAllFull, i, wrap; + ref$ = arg$ != null + ? arg$ + : {}, showHidden = ref$.showHidden, interpolate = ref$.interpolate; + maxWidth = stdout != null && stdout.isTTY ? stdout.columns - 1 : null; + output = []; + out = function(it){ + return output.push(it != null ? it : ''); + }; + if (prepend) { + out(interpolate ? interp(prepend, interpolate) : prepend); + out(); + } + data = []; + optionCount = 0; + totalPreLen = 0; + preLens = []; + for (i$ = 0, len$ = (ref$ = options).length; i$ < len$; ++i$) { + item = ref$[i$]; + if (showHidden || !item.hidden) { + if (that = item.heading) { + data.push({ + type: 'heading', + value: that + }); + } else { + pre = getPreText(item, helpStyle, maxWidth); + descParts = []; + if ((that = item.description) != null) { + descParts.push(that); + } + if (that = item['enum']) { + descParts.push("either: " + naturalJoin(that)); + } + if (item['default'] && !item.negateName) { + descParts.push("default: " + item['default']); + } + desc = descParts.join(' - '); + data.push({ + type: 'option', + pre: pre, + desc: desc, + descLen: desc.length + }); + preLen = pre.length; + optionCount++; + totalPreLen += preLen; + preLens.push(preLen); + } + } + } + sortedPreLens = sort(preLens); + maxPreLen = sortedPreLens[sortedPreLens.length - 1]; + preLenMean = initialIndent + totalPreLen / optionCount; + x = optionCount > 2 ? min(preLenMean * maxPadFactor, maxPreLen) : maxPreLen; + for (i$ = sortedPreLens.length - 1; i$ >= 0; --i$) { + preLen = sortedPreLens[i$]; + if (preLen <= x) { + padAmount = preLen; + break; + } + } + descSepLen = descriptionSeparator.length; + if (maxWidth != null) { + fullWrapCount = 0; + partialWrapCount = 0; + for (i$ = 0, len$ = data.length; i$ < len$; ++i$) { + item = data[i$]; + if (item.type === 'option') { + pre = item.pre, desc = item.desc, descLen = item.descLen; + if (descLen === 0) { + item.wrap = 'none'; + } else { + preLen = max(padAmount, pre.length) + initialIndent + descSepLen; + totalLen = preLen + descLen; + if (totalLen > maxWidth) { + if (descLen / 2.5 > maxWidth - preLen) { + fullWrapCount++; + item.wrap = 'full'; + } else { + partialWrapCount++; + item.wrap = 'partial'; + } + } else { + item.wrap = 'none'; + } + } + } + } + } + initialSpace = repeatString$(' ', initialIndent); + wrapAllFull = optionCount > 1 && fullWrapCount + partialWrapCount * 0.5 > optionCount * 0.5; + for (i$ = 0, len$ = data.length; i$ < len$; ++i$) { + i = i$; + item = data[i$]; + if (item.type === 'heading') { + if (i !== 0) { + out(); + } + out(item.value + ":"); + } else { + pre = item.pre, desc = item.desc, descLen = item.descLen, wrap = item.wrap; + if (maxWidth != null) { + if (wrapAllFull || wrap === 'full') { + wrap = wordwrap(initialIndent + secondaryIndent, maxWidth); + out(initialSpace + "" + pre + "\n" + wrap(desc)); + continue; + } else if (wrap === 'partial') { + wrap = wordwrap(initialIndent + descSepLen + max(padAmount, pre.length), maxWidth); + out(initialSpace + "" + pad(pre, padAmount) + descriptionSeparator + wrap(desc).replace(/^\s+/, '')); + continue; + } + } + if (descLen === 0) { + out(initialSpace + "" + pre); + } else { + out(initialSpace + "" + pad(pre, padAmount) + descriptionSeparator + desc); + } + } + } + if (append) { + out(); + out(interpolate ? interp(append, interpolate) : append); + } + return unlines(output); + }; + }; + function pad(str, num){ + var len, padAmount; + len = str.length; + padAmount = num - len; + return str + "" + repeatString$(' ', padAmount > 0 ? padAmount : 0); + } + function sentencize(str){ + var first, rest, period; + first = str.charAt(0).toUpperCase(); + rest = str.slice(1); + period = /[\.!\?]$/.test(str) ? '' : '.'; + return first + "" + rest + period; + } + function interp(string, object){ + return string.replace(/{{([a-zA-Z$_][a-zA-Z$_0-9]*)}}/g, function(arg$, key){ + var ref$; + return (ref$ = object[key]) != null + ? ref$ + : "{{" + key + "}}"; + }); + } + module.exports = { + generateHelp: generateHelp, + generateHelpForOption: generateHelpForOption + }; + function repeatString$(str, n){ + for (var r = ''; n > 0; (n >>= 1) && (str += str)) if (n & 1) r += str; + return r; + } +}).call(this); diff --git a/node_modules/optionator/lib/index.js b/node_modules/optionator/lib/index.js new file mode 100644 index 0000000..d947286 --- /dev/null +++ b/node_modules/optionator/lib/index.js @@ -0,0 +1,465 @@ +// Generated by LiveScript 1.5.0 +(function(){ + var VERSION, ref$, id, map, compact, any, groupBy, partition, chars, isItNaN, keys, Obj, camelize, deepIs, closestString, nameToRaw, dasherize, naturalJoin, generateHelp, generateHelpForOption, parsedTypeCheck, parseType, parseLevn, camelizeKeys, parseString, main, toString$ = {}.toString, slice$ = [].slice; + VERSION = '0.8.2'; + ref$ = require('prelude-ls'), id = ref$.id, map = ref$.map, compact = ref$.compact, any = ref$.any, groupBy = ref$.groupBy, partition = ref$.partition, chars = ref$.chars, isItNaN = ref$.isItNaN, keys = ref$.keys, Obj = ref$.Obj, camelize = ref$.camelize; + deepIs = require('deep-is'); + ref$ = require('./util'), closestString = ref$.closestString, nameToRaw = ref$.nameToRaw, dasherize = ref$.dasherize, naturalJoin = ref$.naturalJoin; + ref$ = require('./help'), generateHelp = ref$.generateHelp, generateHelpForOption = ref$.generateHelpForOption; + ref$ = require('type-check'), parsedTypeCheck = ref$.parsedTypeCheck, parseType = ref$.parseType; + parseLevn = require('levn').parsedTypeParse; + camelizeKeys = function(obj){ + var key, value, resultObj$ = {}; + for (key in obj) { + value = obj[key]; + resultObj$[camelize(key)] = value; + } + return resultObj$; + }; + parseString = function(string){ + var assignOpt, regex, replaceRegex, result, this$ = this; + assignOpt = '--?[a-zA-Z][-a-z-A-Z0-9]*='; + regex = RegExp('(?:' + assignOpt + ')?(?:\'(?:\\\\\'|[^\'])+\'|"(?:\\\\"|[^"])+")|[^\'"\\s]+', 'g'); + replaceRegex = RegExp('^(' + assignOpt + ')?[\'"]([\\s\\S]*)[\'"]$'); + result = map(function(it){ + return it.replace(replaceRegex, '$1$2'); + }, string.match(regex) || []); + return result; + }; + main = function(libOptions){ + var opts, defaults, required, traverse, getOption, parse; + opts = {}; + defaults = {}; + required = []; + if (toString$.call(libOptions.stdout).slice(8, -1) === 'Undefined') { + libOptions.stdout = process.stdout; + } + libOptions.positionalAnywhere == null && (libOptions.positionalAnywhere = true); + libOptions.typeAliases == null && (libOptions.typeAliases = {}); + libOptions.defaults == null && (libOptions.defaults = {}); + if (libOptions.concatRepeatedArrays != null) { + libOptions.defaults.concatRepeatedArrays = libOptions.concatRepeatedArrays; + } + if (libOptions.mergeRepeatedObjects != null) { + libOptions.defaults.mergeRepeatedObjects = libOptions.mergeRepeatedObjects; + } + traverse = function(options){ + var i$, len$, option, name, k, ref$, v, type, that, e, parsedPossibilities, parsedType, j$, len1$, possibility, rawDependsType, dependsOpts, dependsType, cra, alias, shortNames, longNames, this$ = this; + if (toString$.call(options).slice(8, -1) !== 'Array') { + throw new Error('No options defined.'); + } + for (i$ = 0, len$ = options.length; i$ < len$; ++i$) { + option = options[i$]; + if (option.heading == null) { + name = option.option; + if (opts[name] != null) { + throw new Error("Option '" + name + "' already defined."); + } + for (k in ref$ = libOptions.defaults) { + v = ref$[k]; + option[k] == null && (option[k] = v); + } + if (option.type === 'Boolean') { + option.boolean == null && (option.boolean = true); + } + if (option.parsedType == null) { + if (!option.type) { + throw new Error("No type defined for option '" + name + "'."); + } + try { + type = (that = libOptions.typeAliases[option.type]) != null + ? that + : option.type; + option.parsedType = parseType(type); + } catch (e$) { + e = e$; + throw new Error("Option '" + name + "': Error parsing type '" + option.type + "': " + e.message); + } + } + if (option['default']) { + try { + defaults[name] = parseLevn(option.parsedType, option['default']); + } catch (e$) { + e = e$; + throw new Error("Option '" + name + "': Error parsing default value '" + option['default'] + "' for type '" + option.type + "': " + e.message); + } + } + if (option['enum'] && !option.parsedPossiblities) { + parsedPossibilities = []; + parsedType = option.parsedType; + for (j$ = 0, len1$ = (ref$ = option['enum']).length; j$ < len1$; ++j$) { + possibility = ref$[j$]; + try { + parsedPossibilities.push(parseLevn(parsedType, possibility)); + } catch (e$) { + e = e$; + throw new Error("Option '" + name + "': Error parsing enum value '" + possibility + "' for type '" + option.type + "': " + e.message); + } + } + option.parsedPossibilities = parsedPossibilities; + } + if (that = option.dependsOn) { + if (that.length) { + ref$ = [].concat(option.dependsOn), rawDependsType = ref$[0], dependsOpts = slice$.call(ref$, 1); + dependsType = rawDependsType.toLowerCase(); + if (dependsOpts.length) { + if (dependsType === 'and' || dependsType === 'or') { + option.dependsOn = [dependsType].concat(slice$.call(dependsOpts)); + } else { + throw new Error("Option '" + name + "': If you have more than one dependency, you must specify either 'and' or 'or'"); + } + } else { + if ((ref$ = dependsType.toLowerCase()) === 'and' || ref$ === 'or') { + option.dependsOn = null; + } else { + option.dependsOn = ['and', rawDependsType]; + } + } + } else { + option.dependsOn = null; + } + } + if (option.required) { + required.push(name); + } + opts[name] = option; + if (option.concatRepeatedArrays != null) { + cra = option.concatRepeatedArrays; + if ('Boolean' === toString$.call(cra).slice(8, -1)) { + option.concatRepeatedArrays = [cra, {}]; + } else if (cra.length === 1) { + option.concatRepeatedArrays = [cra[0], {}]; + } else if (cra.length !== 2) { + throw new Error("Invalid setting for concatRepeatedArrays"); + } + } + if (option.alias || option.aliases) { + if (name === 'NUM') { + throw new Error("-NUM option can't have aliases."); + } + if (option.alias) { + option.aliases == null && (option.aliases = [].concat(option.alias)); + } + for (j$ = 0, len1$ = (ref$ = option.aliases).length; j$ < len1$; ++j$) { + alias = ref$[j$]; + if (opts[alias] != null) { + throw new Error("Option '" + alias + "' already defined."); + } + opts[alias] = option; + } + ref$ = partition(fn$, option.aliases), shortNames = ref$[0], longNames = ref$[1]; + option.shortNames == null && (option.shortNames = shortNames); + option.longNames == null && (option.longNames = longNames); + } + if ((!option.aliases || option.shortNames.length === 0) && option.type === 'Boolean' && option['default'] === 'true') { + option.negateName = true; + } + } + } + function fn$(it){ + return it.length === 1; + } + }; + traverse(libOptions.options); + getOption = function(name){ + var opt, possiblyMeant; + opt = opts[name]; + if (opt == null) { + possiblyMeant = closestString(keys(opts), name); + throw new Error("Invalid option '" + nameToRaw(name) + "'" + (possiblyMeant ? " - perhaps you meant '" + nameToRaw(possiblyMeant) + "'?" : '.')); + } + return opt; + }; + parse = function(input, arg$){ + var slice, obj, positional, restPositional, overrideRequired, prop, setValue, setDefaults, checkRequired, mutuallyExclusiveError, checkMutuallyExclusive, checkDependency, checkDependencies, checkProp, args, key, value, option, ref$, i$, len$, arg, that, result, short, argName, usingAssign, val, flags, len, j$, len1$, i, flag, opt, name, valPrime, negated, noedName; + slice = (arg$ != null + ? arg$ + : {}).slice; + obj = {}; + positional = []; + restPositional = false; + overrideRequired = false; + prop = null; + setValue = function(name, value){ + var opt, val, cra, e, currentType; + opt = getOption(name); + if (opt.boolean) { + val = value; + } else { + try { + cra = opt.concatRepeatedArrays; + if (cra != null && cra[0] && cra[1].oneValuePerFlag && opt.parsedType.length === 1 && opt.parsedType[0].structure === 'array') { + val = [parseLevn(opt.parsedType[0].of, value)]; + } else { + val = parseLevn(opt.parsedType, value); + } + } catch (e$) { + e = e$; + throw new Error("Invalid value for option '" + name + "' - expected type " + opt.type + ", received value: " + value + "."); + } + if (opt['enum'] && !any(function(it){ + return deepIs(it, val); + }, opt.parsedPossibilities)) { + throw new Error("Option " + name + ": '" + val + "' not one of " + naturalJoin(opt['enum']) + "."); + } + } + currentType = toString$.call(obj[name]).slice(8, -1); + if (obj[name] != null) { + if (opt.concatRepeatedArrays != null && opt.concatRepeatedArrays[0] && currentType === 'Array') { + obj[name] = obj[name].concat(val); + } else if (opt.mergeRepeatedObjects && currentType === 'Object') { + import$(obj[name], val); + } else { + obj[name] = val; + } + } else { + obj[name] = val; + } + if (opt.restPositional) { + restPositional = true; + } + if (opt.overrideRequired) { + overrideRequired = true; + } + }; + setDefaults = function(){ + var name, ref$, value; + for (name in ref$ = defaults) { + value = ref$[name]; + if (obj[name] == null) { + obj[name] = value; + } + } + }; + checkRequired = function(){ + var i$, ref$, len$, name; + if (overrideRequired) { + return; + } + for (i$ = 0, len$ = (ref$ = required).length; i$ < len$; ++i$) { + name = ref$[i$]; + if (!obj[name]) { + throw new Error("Option " + nameToRaw(name) + " is required."); + } + } + }; + mutuallyExclusiveError = function(first, second){ + throw new Error("The options " + nameToRaw(first) + " and " + nameToRaw(second) + " are mutually exclusive - you cannot use them at the same time."); + }; + checkMutuallyExclusive = function(){ + var rules, i$, len$, rule, present, j$, len1$, element, k$, len2$, opt; + rules = libOptions.mutuallyExclusive; + if (!rules) { + return; + } + for (i$ = 0, len$ = rules.length; i$ < len$; ++i$) { + rule = rules[i$]; + present = null; + for (j$ = 0, len1$ = rule.length; j$ < len1$; ++j$) { + element = rule[j$]; + if (toString$.call(element).slice(8, -1) === 'Array') { + for (k$ = 0, len2$ = element.length; k$ < len2$; ++k$) { + opt = element[k$]; + if (opt in obj) { + if (present != null) { + mutuallyExclusiveError(present, opt); + } else { + present = opt; + break; + } + } + } + } else { + if (element in obj) { + if (present != null) { + mutuallyExclusiveError(present, element); + } else { + present = element; + } + } + } + } + } + }; + checkDependency = function(option){ + var dependsOn, type, targetOptionNames, i$, len$, targetOptionName, targetOption; + dependsOn = option.dependsOn; + if (!dependsOn || option.dependenciesMet) { + return true; + } + type = dependsOn[0], targetOptionNames = slice$.call(dependsOn, 1); + for (i$ = 0, len$ = targetOptionNames.length; i$ < len$; ++i$) { + targetOptionName = targetOptionNames[i$]; + targetOption = obj[targetOptionName]; + if (targetOption && checkDependency(targetOption)) { + if (type === 'or') { + return true; + } + } else if (type === 'and') { + throw new Error("The option '" + option.option + "' did not have its dependencies met."); + } + } + if (type === 'and') { + return true; + } else { + throw new Error("The option '" + option.option + "' did not meet any of its dependencies."); + } + }; + checkDependencies = function(){ + var name; + for (name in obj) { + checkDependency(opts[name]); + } + }; + checkProp = function(){ + if (prop) { + throw new Error("Value for '" + prop + "' of type '" + getOption(prop).type + "' required."); + } + }; + switch (toString$.call(input).slice(8, -1)) { + case 'String': + args = parseString(input.slice(slice != null ? slice : 0)); + break; + case 'Array': + args = input.slice(slice != null ? slice : 2); + break; + case 'Object': + obj = {}; + for (key in input) { + value = input[key]; + if (key !== '_') { + option = getOption(dasherize(key)); + if (parsedTypeCheck(option.parsedType, value)) { + obj[option.option] = value; + } else { + throw new Error("Option '" + option.option + "': Invalid type for '" + value + "' - expected type '" + option.type + "'."); + } + } + } + checkMutuallyExclusive(); + checkDependencies(); + setDefaults(); + checkRequired(); + return ref$ = camelizeKeys(obj), ref$._ = input._ || [], ref$; + default: + throw new Error("Invalid argument to 'parse': " + input + "."); + } + for (i$ = 0, len$ = args.length; i$ < len$; ++i$) { + arg = args[i$]; + if (arg === '--') { + restPositional = true; + } else if (restPositional) { + positional.push(arg); + } else { + if (that = arg.match(/^(--?)([a-zA-Z][-a-zA-Z0-9]*)(=)?(.*)?$/)) { + result = that; + checkProp(); + short = result[1].length === 1; + argName = result[2]; + usingAssign = result[3] != null; + val = result[4]; + if (usingAssign && val == null) { + throw new Error("No value for '" + argName + "' specified."); + } + if (short) { + flags = chars(argName); + len = flags.length; + for (j$ = 0, len1$ = flags.length; j$ < len1$; ++j$) { + i = j$; + flag = flags[j$]; + opt = getOption(flag); + name = opt.option; + if (restPositional) { + positional.push(flag); + } else if (i === len - 1) { + if (usingAssign) { + valPrime = opt.boolean ? parseLevn([{ + type: 'Boolean' + }], val) : val; + setValue(name, valPrime); + } else if (opt.boolean) { + setValue(name, true); + } else { + prop = name; + } + } else if (opt.boolean) { + setValue(name, true); + } else { + throw new Error("Can't set argument '" + flag + "' when not last flag in a group of short flags."); + } + } + } else { + negated = false; + if (that = argName.match(/^no-(.+)$/)) { + negated = true; + noedName = that[1]; + opt = getOption(noedName); + } else { + opt = getOption(argName); + } + name = opt.option; + if (opt.boolean) { + valPrime = usingAssign ? parseLevn([{ + type: 'Boolean' + }], val) : true; + if (negated) { + setValue(name, !valPrime); + } else { + setValue(name, valPrime); + } + } else { + if (negated) { + throw new Error("Only use 'no-' prefix for Boolean options, not with '" + noedName + "'."); + } + if (usingAssign) { + setValue(name, val); + } else { + prop = name; + } + } + } + } else if (that = arg.match(/^-([0-9]+(?:\.[0-9]+)?)$/)) { + opt = opts.NUM; + if (!opt) { + throw new Error('No -NUM option defined.'); + } + setValue(opt.option, that[1]); + } else { + if (prop) { + setValue(prop, arg); + prop = null; + } else { + positional.push(arg); + if (!libOptions.positionalAnywhere) { + restPositional = true; + } + } + } + } + } + checkProp(); + checkMutuallyExclusive(); + checkDependencies(); + setDefaults(); + checkRequired(); + return ref$ = camelizeKeys(obj), ref$._ = positional, ref$; + }; + return { + parse: parse, + parseArgv: function(it){ + return parse(it, { + slice: 2 + }); + }, + generateHelp: generateHelp(libOptions), + generateHelpForOption: generateHelpForOption(getOption, libOptions) + }; + }; + main.VERSION = VERSION; + module.exports = main; + function import$(obj, src){ + var own = {}.hasOwnProperty; + for (var key in src) if (own.call(src, key)) obj[key] = src[key]; + return obj; + } +}).call(this); diff --git a/node_modules/optionator/lib/util.js b/node_modules/optionator/lib/util.js new file mode 100644 index 0000000..d5c972d --- /dev/null +++ b/node_modules/optionator/lib/util.js @@ -0,0 +1,54 @@ +// Generated by LiveScript 1.5.0 +(function(){ + var prelude, map, sortBy, fl, closestString, nameToRaw, dasherize, naturalJoin; + prelude = require('prelude-ls'), map = prelude.map, sortBy = prelude.sortBy; + fl = require('fast-levenshtein'); + closestString = function(possibilities, input){ + var distances, ref$, string, distance, this$ = this; + if (!possibilities.length) { + return; + } + distances = map(function(it){ + var ref$, longer, shorter; + ref$ = input.length > it.length + ? [input, it] + : [it, input], longer = ref$[0], shorter = ref$[1]; + return { + string: it, + distance: fl.get(longer, shorter) + }; + })( + possibilities); + ref$ = sortBy(function(it){ + return it.distance; + }, distances)[0], string = ref$.string, distance = ref$.distance; + return string; + }; + nameToRaw = function(name){ + if (name.length === 1 || name === 'NUM') { + return "-" + name; + } else { + return "--" + name; + } + }; + dasherize = function(string){ + if (/^[A-Z]/.test(string)) { + return string; + } else { + return prelude.dasherize(string); + } + }; + naturalJoin = function(array){ + if (array.length < 3) { + return array.join(' or '); + } else { + return array.slice(0, -1).join(', ') + ", or " + array[array.length - 1]; + } + }; + module.exports = { + closestString: closestString, + nameToRaw: nameToRaw, + dasherize: dasherize, + naturalJoin: naturalJoin + }; +}).call(this); diff --git a/node_modules/optionator/package.json b/node_modules/optionator/package.json new file mode 100644 index 0000000..03841a8 --- /dev/null +++ b/node_modules/optionator/package.json @@ -0,0 +1,109 @@ +{ + "_args": [ + [ + { + "raw": "optionator@^0.8.2", + "scope": null, + "escapedName": "optionator", + "name": "optionator", + "rawSpec": "^0.8.2", + "spec": ">=0.8.2 <0.9.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint" + ] + ], + "_from": "optionator@>=0.8.2 <0.9.0", + "_id": "optionator@0.8.2", + "_inCache": true, + "_location": "/optionator", + "_nodeVersion": "6.6.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/optionator-0.8.2.tgz_1474487142656_0.7901301246602088" + }, + "_npmUser": { + "name": "gkz", + "email": "z@georgezahariev.com" + }, + "_npmVersion": "3.9.0", + "_phantomChildren": {}, + "_requested": { + "raw": "optionator@^0.8.2", + "scope": null, + "escapedName": "optionator", + "name": "optionator", + "rawSpec": "^0.8.2", + "spec": ">=0.8.2 <0.9.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "_shasum": "364c5e409d3f4d6301d6c0b4c05bba50180aeb64", + "_shrinkwrap": null, + "_spec": "optionator@^0.8.2", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint", + "author": { + "name": "George Zahariev", + "email": "z@georgezahariev.com" + }, + "bugs": { + "url": "https://github.com/gkz/optionator/issues" + }, + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + }, + "description": "option parsing and help generation", + "devDependencies": { + "istanbul": "~0.4.1", + "livescript": "~1.5.0", + "mocha": "~3.0.2" + }, + "directories": {}, + "dist": { + "shasum": "364c5e409d3f4d6301d6c0b4c05bba50180aeb64", + "tarball": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz" + }, + "engines": { + "node": ">= 0.8.0" + }, + "files": [ + "lib", + "README.md", + "LICENSE" + ], + "gitHead": "191de235d5afa47ebb655fc0efbc2b616263d81b", + "homepage": "https://github.com/gkz/optionator", + "keywords": [ + "options", + "flags", + "option parsing", + "cli" + ], + "license": "MIT", + "main": "./lib/", + "maintainers": [ + { + "name": "gkz", + "email": "z@georgezahariev.com" + } + ], + "name": "optionator", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/gkz/optionator.git" + }, + "scripts": { + "test": "make test" + }, + "version": "0.8.2" +} diff --git a/node_modules/os-tmpdir/index.js b/node_modules/os-tmpdir/index.js new file mode 100644 index 0000000..2077b1c --- /dev/null +++ b/node_modules/os-tmpdir/index.js @@ -0,0 +1,25 @@ +'use strict'; +var isWindows = process.platform === 'win32'; +var trailingSlashRe = isWindows ? /[^:]\\$/ : /.\/$/; + +// https://github.com/nodejs/node/blob/3e7a14381497a3b73dda68d05b5130563cdab420/lib/os.js#L25-L43 +module.exports = function () { + var path; + + if (isWindows) { + path = process.env.TEMP || + process.env.TMP || + (process.env.SystemRoot || process.env.windir) + '\\temp'; + } else { + path = process.env.TMPDIR || + process.env.TMP || + process.env.TEMP || + '/tmp'; + } + + if (trailingSlashRe.test(path)) { + path = path.slice(0, -1); + } + + return path; +}; diff --git a/node_modules/os-tmpdir/license b/node_modules/os-tmpdir/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/os-tmpdir/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/os-tmpdir/package.json b/node_modules/os-tmpdir/package.json new file mode 100644 index 0000000..bb9bcc9 --- /dev/null +++ b/node_modules/os-tmpdir/package.json @@ -0,0 +1,109 @@ +{ + "_args": [ + [ + { + "raw": "os-tmpdir@~1.0.2", + "scope": null, + "escapedName": "os-tmpdir", + "name": "os-tmpdir", + "rawSpec": "~1.0.2", + "spec": ">=1.0.2 <1.1.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\tmp" + ] + ], + "_from": "os-tmpdir@>=1.0.2 <1.1.0", + "_id": "os-tmpdir@1.0.2", + "_inCache": true, + "_location": "/os-tmpdir", + "_nodeVersion": "6.6.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/os-tmpdir-1.0.2.tgz_1475211274587_0.14931037812493742" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "3.10.3", + "_phantomChildren": {}, + "_requested": { + "raw": "os-tmpdir@~1.0.2", + "scope": null, + "escapedName": "os-tmpdir", + "name": "os-tmpdir", + "rawSpec": "~1.0.2", + "spec": ">=1.0.2 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/tmp" + ], + "_resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "_shasum": "bbe67406c79aa85c5cfec766fe5734555dfa1274", + "_shrinkwrap": null, + "_spec": "os-tmpdir@~1.0.2", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\tmp", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/os-tmpdir/issues" + }, + "dependencies": {}, + "description": "Node.js os.tmpdir() ponyfill", + "devDependencies": { + "ava": "*", + "xo": "^0.16.0" + }, + "directories": {}, + "dist": { + "shasum": "bbe67406c79aa85c5cfec766fe5734555dfa1274", + "tarball": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "1abf9cf5611b4be7377060ea67054b45cbf6813c", + "homepage": "https://github.com/sindresorhus/os-tmpdir#readme", + "keywords": [ + "built-in", + "core", + "ponyfill", + "polyfill", + "shim", + "os", + "tmpdir", + "tempdir", + "tmp", + "temp", + "dir", + "directory", + "env", + "environment" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "os-tmpdir", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/os-tmpdir.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.2" +} diff --git a/node_modules/os-tmpdir/readme.md b/node_modules/os-tmpdir/readme.md new file mode 100644 index 0000000..c09f7ed --- /dev/null +++ b/node_modules/os-tmpdir/readme.md @@ -0,0 +1,32 @@ +# os-tmpdir [![Build Status](https://travis-ci.org/sindresorhus/os-tmpdir.svg?branch=master)](https://travis-ci.org/sindresorhus/os-tmpdir) + +> Node.js [`os.tmpdir()`](https://nodejs.org/api/os.html#os_os_tmpdir) [ponyfill](https://ponyfill.com) + +Use this instead of `require('os').tmpdir()` to get a consistent behavior on different Node.js versions (even 0.8). + + +## Install + +``` +$ npm install --save os-tmpdir +``` + + +## Usage + +```js +const osTmpdir = require('os-tmpdir'); + +osTmpdir(); +//=> '/var/folders/m3/5574nnhn0yj488ccryqr7tc80000gn/T' +``` + + +## API + +See the [`os.tmpdir()` docs](https://nodejs.org/api/os.html#os_os_tmpdir). + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/path-is-inside/LICENSE.txt b/node_modules/path-is-inside/LICENSE.txt new file mode 100644 index 0000000..0bdbb61 --- /dev/null +++ b/node_modules/path-is-inside/LICENSE.txt @@ -0,0 +1,47 @@ +Dual licensed under WTFPL and MIT: + +--- + +Copyright © 2013–2016 Domenic Denicola + +This work is free. You can redistribute it and/or modify it under the +terms of the Do What The Fuck You Want To Public License, Version 2, +as published by Sam Hocevar. See below for more details. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. + +--- + +The MIT License (MIT) + +Copyright © 2013–2016 Domenic Denicola + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/path-is-inside/lib/path-is-inside.js b/node_modules/path-is-inside/lib/path-is-inside.js new file mode 100644 index 0000000..596dfd3 --- /dev/null +++ b/node_modules/path-is-inside/lib/path-is-inside.js @@ -0,0 +1,28 @@ +"use strict"; + +var path = require("path"); + +module.exports = function (thePath, potentialParent) { + // For inside-directory checking, we want to allow trailing slashes, so normalize. + thePath = stripTrailingSep(thePath); + potentialParent = stripTrailingSep(potentialParent); + + // Node treats only Windows as case-insensitive in its path module; we follow those conventions. + if (process.platform === "win32") { + thePath = thePath.toLowerCase(); + potentialParent = potentialParent.toLowerCase(); + } + + return thePath.lastIndexOf(potentialParent, 0) === 0 && + ( + thePath[potentialParent.length] === path.sep || + thePath[potentialParent.length] === undefined + ); +}; + +function stripTrailingSep(thePath) { + if (thePath[thePath.length - 1] === path.sep) { + return thePath.slice(0, -1); + } + return thePath; +} diff --git a/node_modules/path-is-inside/package.json b/node_modules/path-is-inside/package.json new file mode 100644 index 0000000..e0a3d3e --- /dev/null +++ b/node_modules/path-is-inside/package.json @@ -0,0 +1,100 @@ +{ + "_args": [ + [ + { + "raw": "path-is-inside@^1.0.2", + "scope": null, + "escapedName": "path-is-inside", + "name": "path-is-inside", + "rawSpec": "^1.0.2", + "spec": ">=1.0.2 <2.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint" + ] + ], + "_from": "path-is-inside@>=1.0.2 <2.0.0", + "_id": "path-is-inside@1.0.2", + "_inCache": true, + "_location": "/path-is-inside", + "_nodeVersion": "6.2.2", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/path-is-inside-1.0.2.tgz_1473550509195_0.936812553787604" + }, + "_npmUser": { + "name": "domenic", + "email": "d@domenic.me" + }, + "_npmVersion": "3.9.5", + "_phantomChildren": {}, + "_requested": { + "raw": "path-is-inside@^1.0.2", + "scope": null, + "escapedName": "path-is-inside", + "name": "path-is-inside", + "rawSpec": "^1.0.2", + "spec": ">=1.0.2 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint", + "/is-path-inside" + ], + "_resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "_shasum": "365417dede44430d1c11af61027facf074bdfc53", + "_shrinkwrap": null, + "_spec": "path-is-inside@^1.0.2", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint", + "author": { + "name": "Domenic Denicola", + "email": "d@domenic.me", + "url": "https://domenic.me" + }, + "bugs": { + "url": "https://github.com/domenic/path-is-inside/issues" + }, + "dependencies": {}, + "description": "Tests whether one path is inside another path", + "devDependencies": { + "jshint": "~2.3.0", + "mocha": "~1.15.1" + }, + "directories": {}, + "dist": { + "shasum": "365417dede44430d1c11af61027facf074bdfc53", + "tarball": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz" + }, + "files": [ + "lib" + ], + "gitHead": "05a9bf7c5e008505539e14e96c4d2fc8b2c6d058", + "homepage": "https://github.com/domenic/path-is-inside#readme", + "keywords": [ + "path", + "directory", + "folder", + "inside", + "relative" + ], + "license": "(WTFPL OR MIT)", + "main": "lib/path-is-inside.js", + "maintainers": [ + { + "name": "domenic", + "email": "domenic@domenicdenicola.com" + } + ], + "name": "path-is-inside", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/domenic/path-is-inside.git" + }, + "scripts": { + "lint": "jshint lib", + "test": "mocha" + }, + "version": "1.0.2" +} diff --git a/node_modules/pluralize/LICENSE b/node_modules/pluralize/LICENSE new file mode 100644 index 0000000..309c2e3 --- /dev/null +++ b/node_modules/pluralize/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 Blake Embrey (hello@blakeembrey.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/pluralize/Readme.md b/node_modules/pluralize/Readme.md new file mode 100644 index 0000000..46434a9 --- /dev/null +++ b/node_modules/pluralize/Readme.md @@ -0,0 +1,89 @@ +# Pluralize + +[![NPM version][npm-image]][npm-url] +[![NPM downloads][downloads-image]][downloads-url] +[![Build status][travis-image]][travis-url] +[![Test coverage][coveralls-image]][coveralls-url] +![File Size][filesize-url] +[![CDNJS][cdnjs-image]][cdnjs-url] +[![Greenkeeper badge](https://badges.greenkeeper.io/blakeembrey/pluralize.svg)](https://greenkeeper.io/) + +> Pluralize and singularize any word. + +## Installation + +``` +npm install pluralize --save +yarn add pluralize +bower install pluralize --save +``` + +### Node + +```javascript +var pluralize = require('pluralize') +``` + +### AMD + +```javascript +define(function (require, exports, module) { + var pluralize = require('pluralize') +}) +``` + +### ` +``` + +## Why? + +This module uses a pre-defined list of rules, applied in order, to singularize or pluralize a given word. There are many cases where this is useful, such as any automation based on user input. For applications where the word(s) are known ahead of time, you can use a simple ternary (or function) which would be a much lighter alternative. + +## Usage + +```javascript +pluralize('test') //=> "tests" +pluralize('test', 1) //=> "test" +pluralize('test', 5) //=> "tests" +pluralize('test', 1, true) //=> "1 test" +pluralize('test', 5, true) //=> "5 tests" +pluralize('蘋果', 2, true) //=> "2 蘋果" + +pluralize.plural('regex') //=> "regexes" +pluralize.addPluralRule(/gex$/i, 'gexii') +pluralize.plural('regex') //=> "regexii" + +pluralize.singular('singles') //=> "single" +pluralize.addSingularRule(/singles$/i, 'singular') +pluralize.singular('singles') //=> "singular" + +pluralize.plural('irregular') //=> "irregulars" +pluralize.addIrregularRule('irregular', 'regular') +pluralize.plural('irregular') //=> "regular" + +pluralize.plural('paper') //=> "papers" +pluralize.addUncountableRule('paper') +pluralize.plural('paper') //=> "paper" + +pluralize.isPlural('test') //=> false +pluralize.isSingular('test') //=> true +``` + +## License + +MIT + +[npm-image]: https://img.shields.io/npm/v/pluralize.svg?style=flat +[npm-url]: https://npmjs.org/package/pluralize +[downloads-image]: https://img.shields.io/npm/dm/pluralize.svg?style=flat +[downloads-url]: https://npmjs.org/package/pluralize +[travis-image]: https://img.shields.io/travis/blakeembrey/pluralize.svg?style=flat +[travis-url]: https://travis-ci.org/blakeembrey/pluralize +[coveralls-image]: https://img.shields.io/coveralls/blakeembrey/pluralize.svg?style=flat +[coveralls-url]: https://coveralls.io/r/blakeembrey/pluralize?branch=master +[filesize-url]: https://img.shields.io/github/size/blakeembrey/pluralize/pluralize.js.svg?style=flat +[cdnjs-image]: https://img.shields.io/cdnjs/v/pluralize.svg +[cdnjs-url]: https://cdnjs.com/libraries/pluralize diff --git a/node_modules/pluralize/package.json b/node_modules/pluralize/package.json new file mode 100644 index 0000000..37cc11e --- /dev/null +++ b/node_modules/pluralize/package.json @@ -0,0 +1,108 @@ +{ + "_args": [ + [ + { + "raw": "pluralize@^7.0.0", + "scope": null, + "escapedName": "pluralize", + "name": "pluralize", + "rawSpec": "^7.0.0", + "spec": ">=7.0.0 <8.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint" + ] + ], + "_from": "pluralize@>=7.0.0 <8.0.0", + "_id": "pluralize@7.0.0", + "_inCache": true, + "_location": "/pluralize", + "_nodeVersion": "8.2.1", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/pluralize-7.0.0.tgz_1503253117402_0.40743393218144774" + }, + "_npmUser": { + "name": "blakeembrey", + "email": "hello@blakeembrey.com" + }, + "_npmVersion": "5.3.0", + "_phantomChildren": {}, + "_requested": { + "raw": "pluralize@^7.0.0", + "scope": null, + "escapedName": "pluralize", + "name": "pluralize", + "rawSpec": "^7.0.0", + "spec": ">=7.0.0 <8.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", + "_shasum": "298b89df8b93b0221dbf421ad2b1b1ea23fc6777", + "_shrinkwrap": null, + "_spec": "pluralize@^7.0.0", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint", + "author": { + "name": "Blake Embrey", + "email": "hello@blakeembrey.com", + "url": "http://blakeembrey.me" + }, + "bugs": { + "url": "https://github.com/blakeembrey/pluralize/issues" + }, + "dependencies": {}, + "description": "Pluralize and singularize any word", + "devDependencies": { + "chai": "^4.0.0", + "istanbul": "^0.4.5", + "mocha": "^3.2.0", + "semistandard": "^11.0.0" + }, + "directories": {}, + "dist": { + "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", + "shasum": "298b89df8b93b0221dbf421ad2b1b1ea23fc6777", + "tarball": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "pluralize.js" + ], + "gitHead": "3eb5e5e6230a46c44a3f01b845464c2f28c74acf", + "homepage": "https://github.com/blakeembrey/pluralize#readme", + "keywords": [ + "plural", + "plurals", + "pluralize", + "singular", + "singularize", + "inflection" + ], + "license": "MIT", + "main": "pluralize.js", + "maintainers": [ + { + "name": "blakeembrey", + "email": "me@blakeembrey.com" + } + ], + "name": "pluralize", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/blakeembrey/pluralize.git" + }, + "scripts": { + "lint": "semistandard", + "test": "npm run lint && npm run test-cov", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- -R spec --bail", + "test-spec": "mocha -R spec --bail" + }, + "version": "7.0.0" +} diff --git a/node_modules/pluralize/pluralize.js b/node_modules/pluralize/pluralize.js new file mode 100644 index 0000000..c87a8fc --- /dev/null +++ b/node_modules/pluralize/pluralize.js @@ -0,0 +1,490 @@ +/* global define */ + +(function (root, pluralize) { + /* istanbul ignore else */ + if (typeof require === 'function' && typeof exports === 'object' && typeof module === 'object') { + // Node. + module.exports = pluralize(); + } else if (typeof define === 'function' && define.amd) { + // AMD, registers as an anonymous module. + define(function () { + return pluralize(); + }); + } else { + // Browser global. + root.pluralize = pluralize(); + } +})(this, function () { + // Rule storage - pluralize and singularize need to be run sequentially, + // while other rules can be optimized using an object for instant lookups. + var pluralRules = []; + var singularRules = []; + var uncountables = {}; + var irregularPlurals = {}; + var irregularSingles = {}; + + /** + * Sanitize a pluralization rule to a usable regular expression. + * + * @param {(RegExp|string)} rule + * @return {RegExp} + */ + function sanitizeRule (rule) { + if (typeof rule === 'string') { + return new RegExp('^' + rule + '$', 'i'); + } + + return rule; + } + + /** + * Pass in a word token to produce a function that can replicate the case on + * another word. + * + * @param {string} word + * @param {string} token + * @return {Function} + */ + function restoreCase (word, token) { + // Tokens are an exact match. + if (word === token) return token; + + // Upper cased words. E.g. "HELLO". + if (word === word.toUpperCase()) return token.toUpperCase(); + + // Title cased words. E.g. "Title". + if (word[0] === word[0].toUpperCase()) { + return token.charAt(0).toUpperCase() + token.substr(1).toLowerCase(); + } + + // Lower cased words. E.g. "test". + return token.toLowerCase(); + } + + /** + * Interpolate a regexp string. + * + * @param {string} str + * @param {Array} args + * @return {string} + */ + function interpolate (str, args) { + return str.replace(/\$(\d{1,2})/g, function (match, index) { + return args[index] || ''; + }); + } + + /** + * Replace a word using a rule. + * + * @param {string} word + * @param {Array} rule + * @return {string} + */ + function replace (word, rule) { + return word.replace(rule[0], function (match, index) { + var result = interpolate(rule[1], arguments); + + if (match === '') { + return restoreCase(word[index - 1], result); + } + + return restoreCase(match, result); + }); + } + + /** + * Sanitize a word by passing in the word and sanitization rules. + * + * @param {string} token + * @param {string} word + * @param {Array} rules + * @return {string} + */ + function sanitizeWord (token, word, rules) { + // Empty string or doesn't need fixing. + if (!token.length || uncountables.hasOwnProperty(token)) { + return word; + } + + var len = rules.length; + + // Iterate over the sanitization rules and use the first one to match. + while (len--) { + var rule = rules[len]; + + if (rule[0].test(word)) return replace(word, rule); + } + + return word; + } + + /** + * Replace a word with the updated word. + * + * @param {Object} replaceMap + * @param {Object} keepMap + * @param {Array} rules + * @return {Function} + */ + function replaceWord (replaceMap, keepMap, rules) { + return function (word) { + // Get the correct token and case restoration functions. + var token = word.toLowerCase(); + + // Check against the keep object map. + if (keepMap.hasOwnProperty(token)) { + return restoreCase(word, token); + } + + // Check against the replacement map for a direct word replacement. + if (replaceMap.hasOwnProperty(token)) { + return restoreCase(word, replaceMap[token]); + } + + // Run all the rules against the word. + return sanitizeWord(token, word, rules); + }; + } + + /** + * Check if a word is part of the map. + */ + function checkWord (replaceMap, keepMap, rules, bool) { + return function (word) { + var token = word.toLowerCase(); + + if (keepMap.hasOwnProperty(token)) return true; + if (replaceMap.hasOwnProperty(token)) return false; + + return sanitizeWord(token, token, rules) === token; + }; + } + + /** + * Pluralize or singularize a word based on the passed in count. + * + * @param {string} word + * @param {number} count + * @param {boolean} inclusive + * @return {string} + */ + function pluralize (word, count, inclusive) { + var pluralized = count === 1 + ? pluralize.singular(word) : pluralize.plural(word); + + return (inclusive ? count + ' ' : '') + pluralized; + } + + /** + * Pluralize a word. + * + * @type {Function} + */ + pluralize.plural = replaceWord( + irregularSingles, irregularPlurals, pluralRules + ); + + /** + * Check if a word is plural. + * + * @type {Function} + */ + pluralize.isPlural = checkWord( + irregularSingles, irregularPlurals, pluralRules + ); + + /** + * Singularize a word. + * + * @type {Function} + */ + pluralize.singular = replaceWord( + irregularPlurals, irregularSingles, singularRules + ); + + /** + * Check if a word is singular. + * + * @type {Function} + */ + pluralize.isSingular = checkWord( + irregularPlurals, irregularSingles, singularRules + ); + + /** + * Add a pluralization rule to the collection. + * + * @param {(string|RegExp)} rule + * @param {string} replacement + */ + pluralize.addPluralRule = function (rule, replacement) { + pluralRules.push([sanitizeRule(rule), replacement]); + }; + + /** + * Add a singularization rule to the collection. + * + * @param {(string|RegExp)} rule + * @param {string} replacement + */ + pluralize.addSingularRule = function (rule, replacement) { + singularRules.push([sanitizeRule(rule), replacement]); + }; + + /** + * Add an uncountable word rule. + * + * @param {(string|RegExp)} word + */ + pluralize.addUncountableRule = function (word) { + if (typeof word === 'string') { + uncountables[word.toLowerCase()] = true; + return; + } + + // Set singular and plural references for the word. + pluralize.addPluralRule(word, '$0'); + pluralize.addSingularRule(word, '$0'); + }; + + /** + * Add an irregular word definition. + * + * @param {string} single + * @param {string} plural + */ + pluralize.addIrregularRule = function (single, plural) { + plural = plural.toLowerCase(); + single = single.toLowerCase(); + + irregularSingles[single] = plural; + irregularPlurals[plural] = single; + }; + + /** + * Irregular rules. + */ + [ + // Pronouns. + ['I', 'we'], + ['me', 'us'], + ['he', 'they'], + ['she', 'they'], + ['them', 'them'], + ['myself', 'ourselves'], + ['yourself', 'yourselves'], + ['itself', 'themselves'], + ['herself', 'themselves'], + ['himself', 'themselves'], + ['themself', 'themselves'], + ['is', 'are'], + ['was', 'were'], + ['has', 'have'], + ['this', 'these'], + ['that', 'those'], + // Words ending in with a consonant and `o`. + ['echo', 'echoes'], + ['dingo', 'dingoes'], + ['volcano', 'volcanoes'], + ['tornado', 'tornadoes'], + ['torpedo', 'torpedoes'], + // Ends with `us`. + ['genus', 'genera'], + ['viscus', 'viscera'], + // Ends with `ma`. + ['stigma', 'stigmata'], + ['stoma', 'stomata'], + ['dogma', 'dogmata'], + ['lemma', 'lemmata'], + ['schema', 'schemata'], + ['anathema', 'anathemata'], + // Other irregular rules. + ['ox', 'oxen'], + ['axe', 'axes'], + ['die', 'dice'], + ['yes', 'yeses'], + ['foot', 'feet'], + ['eave', 'eaves'], + ['goose', 'geese'], + ['tooth', 'teeth'], + ['quiz', 'quizzes'], + ['human', 'humans'], + ['proof', 'proofs'], + ['carve', 'carves'], + ['valve', 'valves'], + ['looey', 'looies'], + ['thief', 'thieves'], + ['groove', 'grooves'], + ['pickaxe', 'pickaxes'], + ['whiskey', 'whiskies'] + ].forEach(function (rule) { + return pluralize.addIrregularRule(rule[0], rule[1]); + }); + + /** + * Pluralization rules. + */ + [ + [/s?$/i, 's'], + [/[^\u0000-\u007F]$/i, '$0'], + [/([^aeiou]ese)$/i, '$1'], + [/(ax|test)is$/i, '$1es'], + [/(alias|[^aou]us|tlas|gas|ris)$/i, '$1es'], + [/(e[mn]u)s?$/i, '$1s'], + [/([^l]ias|[aeiou]las|[emjzr]as|[iu]am)$/i, '$1'], + [/(alumn|syllab|octop|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, '$1i'], + [/(alumn|alg|vertebr)(?:a|ae)$/i, '$1ae'], + [/(seraph|cherub)(?:im)?$/i, '$1im'], + [/(her|at|gr)o$/i, '$1oes'], + [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i, '$1a'], + [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i, '$1a'], + [/sis$/i, 'ses'], + [/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, '$1$2ves'], + [/([^aeiouy]|qu)y$/i, '$1ies'], + [/([^ch][ieo][ln])ey$/i, '$1ies'], + [/(x|ch|ss|sh|zz)$/i, '$1es'], + [/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, '$1ices'], + [/(m|l)(?:ice|ouse)$/i, '$1ice'], + [/(pe)(?:rson|ople)$/i, '$1ople'], + [/(child)(?:ren)?$/i, '$1ren'], + [/eaux$/i, '$0'], + [/m[ae]n$/i, 'men'], + ['thou', 'you'] + ].forEach(function (rule) { + return pluralize.addPluralRule(rule[0], rule[1]); + }); + + /** + * Singularization rules. + */ + [ + [/s$/i, ''], + [/(ss)$/i, '$1'], + [/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i, '$1fe'], + [/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, '$1f'], + [/ies$/i, 'y'], + [/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i, '$1ie'], + [/\b(mon|smil)ies$/i, '$1ey'], + [/(m|l)ice$/i, '$1ouse'], + [/(seraph|cherub)im$/i, '$1'], + [/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|tlas|gas|(?:her|at|gr)o|ris)(?:es)?$/i, '$1'], + [/(analy|ba|diagno|parenthe|progno|synop|the|empha|cri)(?:sis|ses)$/i, '$1sis'], + [/(movie|twelve|abuse|e[mn]u)s$/i, '$1'], + [/(test)(?:is|es)$/i, '$1is'], + [/(alumn|syllab|octop|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, '$1us'], + [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i, '$1um'], + [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i, '$1on'], + [/(alumn|alg|vertebr)ae$/i, '$1a'], + [/(cod|mur|sil|vert|ind)ices$/i, '$1ex'], + [/(matr|append)ices$/i, '$1ix'], + [/(pe)(rson|ople)$/i, '$1rson'], + [/(child)ren$/i, '$1'], + [/(eau)x?$/i, '$1'], + [/men$/i, 'man'] + ].forEach(function (rule) { + return pluralize.addSingularRule(rule[0], rule[1]); + }); + + /** + * Uncountable rules. + */ + [ + // Singular words with no plurals. + 'adulthood', + 'advice', + 'agenda', + 'aid', + 'alcohol', + 'ammo', + 'anime', + 'athletics', + 'audio', + 'bison', + 'blood', + 'bream', + 'buffalo', + 'butter', + 'carp', + 'cash', + 'chassis', + 'chess', + 'clothing', + 'cod', + 'commerce', + 'cooperation', + 'corps', + 'debris', + 'diabetes', + 'digestion', + 'elk', + 'energy', + 'equipment', + 'excretion', + 'expertise', + 'flounder', + 'fun', + 'gallows', + 'garbage', + 'graffiti', + 'headquarters', + 'health', + 'herpes', + 'highjinks', + 'homework', + 'housework', + 'information', + 'jeans', + 'justice', + 'kudos', + 'labour', + 'literature', + 'machinery', + 'mackerel', + 'mail', + 'media', + 'mews', + 'moose', + 'music', + 'manga', + 'news', + 'pike', + 'plankton', + 'pliers', + 'pollution', + 'premises', + 'rain', + 'research', + 'rice', + 'salmon', + 'scissors', + 'series', + 'sewage', + 'shambles', + 'shrimp', + 'species', + 'staff', + 'swine', + 'tennis', + 'traffic', + 'transporation', + 'trout', + 'tuna', + 'wealth', + 'welfare', + 'whiting', + 'wildebeest', + 'wildlife', + 'you', + // Regexes. + /[^aeiou]ese$/i, // "chinese", "japanese" + /deer$/i, // "deer", "reindeer" + /fish$/i, // "fish", "blowfish", "angelfish" + /measles$/i, + /o[iu]s$/i, // "carnivorous" + /pox$/i, // "chickpox", "smallpox" + /sheep$/i + ].forEach(pluralize.addUncountableRule); + + return pluralize; +}); diff --git a/node_modules/prelude-ls/CHANGELOG.md b/node_modules/prelude-ls/CHANGELOG.md new file mode 100644 index 0000000..c2de12d --- /dev/null +++ b/node_modules/prelude-ls/CHANGELOG.md @@ -0,0 +1,99 @@ +# 1.1.2 +- add `Func.memoize` +- fix `zip-all` and `zip-with-all` corner case (no input) +- build with LiveScript 1.4.0 + +# 1.1.1 +- curry `unique-by`, `minimum-by` + +# 1.1.0 +- added `List` functions: `maximum-by`, `minimum-by`, `unique-by` +- added `List` functions: `at`, `elem-index`, `elem-indices`, `find-index`, `find-indices` +- added `Str` functions: `capitalize`, `camelize`, `dasherize` +- added `Func` function: `over` - eg. ``same-length = (==) `over` (.length)`` +- exported `Str.repeat` through main `prelude` object +- fixed definition of `foldr` and `foldr1`, the new correct definition is backwards incompatible with the old, incorrect one +- fixed issue with `fix` +- improved code coverage + +# 1.0.3 +- build browser versions + +# 1.0.2 +- bug fix for `flatten` - slight change with bug fix, flattens arrays only, not array-like objects + +# 1.0.1 +- bug fixes for `drop-while` and `take-while` + +# 1.0.0 +* massive update - separated functions into separate modules +* functions do not accept multiple types anymore - use different versions in their respective modules in some cases (eg. `Obj.map`), or use `chars` or `values` in other cases to transform into a list +* objects are no longer transformed into functions, simply use `(obj.)` in LiveScript to do that +* browser version now using browserify - use `prelude = require('prelude-ls')` +* added `compact`, `split`, `flatten`, `difference`, `intersection`, `union`, `count-by`, `group-by`, `chars`, `unchars`, `apply` +* added `lists-to-obj` which takes a list of keys and list of values and zips them up into an object, and the converse `obj-to-lists` +* added `pairs-to-obj` which takes a list of pairs (2 element lists) and creates an object, and the converse `obj-to-pairs` +* removed `cons`, `append` - use the concat operator +* removed `compose` - use the compose operator +* removed `obj-to-func` - use partially applied access (eg. `(obj.)`) +* removed `length` - use `(.length)` +* `sort-by` renamed to `sort-with` +* added new `sort-by` +* removed `compare` - just use the new `sort-by` +* `break-it` renamed `break-list`, (`Str.break-str` for the string version) +* added `Str.repeat` which creates a new string by repeating the input n times +* `unfold` as alias to `unfoldr` is no longer used +* fixed up style and compiled with LiveScript 1.1.1 +* use Make instead of Slake +* greatly improved tests + +# 0.6.0 +* fixed various bugs +* added `fix`, a fixpoint (Y combinator) for anonymous recursive functions +* added `unfoldr` (alias `unfold`) +* calling `replicate` with a string now returns a list of strings +* removed `partial`, just use native partial application in LiveScript using the `_` placeholder, or currying +* added `sort`, `sortBy`, and `compare` + +# 0.5.0 +* removed `lookup` - use (.prop) +* removed `call` - use (.func arg1, arg2) +* removed `pluck` - use map (.prop), xs +* fixed buys wtih `head` and `last` +* added non-minifed browser version, as `prelude-browser.js` +* renamed `prelude-min.js` to `prelude-browser-min.js` +* renamed `zip` to `zipAll` +* renamed `zipWith` to `zipAllWith` +* added `zip`, a curried zip that takes only two arguments +* added `zipWith`, a curried zipWith that takes only two arguments + +# 0.4.0 +* added `parition` function +* added `curry` function +* removed `elem` function (use `in`) +* removed `notElem` function (use `not in`) + +# 0.3.0 +* added `listToObject` +* added `unique` +* added `objToFunc` +* added support for using strings in map and the like +* added support for using objects in map and the like +* added ability to use objects instead of functions in certain cases +* removed `error` (just use throw) +* added `tau` constant +* added `join` +* added `values` +* added `keys` +* added `partial` +* renamed `log` to `ln` +* added alias to `head`: `first` +* added `installPrelude` helper + +# 0.2.0 +* removed functions that simply warp operators as you can now use operators as functions in LiveScript +* `min/max` are now curried and take only 2 arguments +* added `call` + +# 0.1.0 +* initial public release diff --git a/node_modules/prelude-ls/LICENSE b/node_modules/prelude-ls/LICENSE new file mode 100644 index 0000000..525b118 --- /dev/null +++ b/node_modules/prelude-ls/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) George Zahariev + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/prelude-ls/README.md b/node_modules/prelude-ls/README.md new file mode 100644 index 0000000..fabc212 --- /dev/null +++ b/node_modules/prelude-ls/README.md @@ -0,0 +1,15 @@ +# prelude.ls [![Build Status](https://travis-ci.org/gkz/prelude-ls.png?branch=master)](https://travis-ci.org/gkz/prelude-ls) + +is a functionally oriented utility library. It is powerful and flexible. Almost all of its functions are curried. It is written in, and is the recommended base library for, LiveScript. + +See **[the prelude.ls site](http://preludels.com)** for examples, a reference, and more. + +You can install via npm `npm install prelude-ls` + +### Development + +`make test` to test + +`make build` to build `lib` from `src` + +`make build-browser` to build browser versions diff --git a/node_modules/prelude-ls/lib/Func.js b/node_modules/prelude-ls/lib/Func.js new file mode 100644 index 0000000..b80c9b1 --- /dev/null +++ b/node_modules/prelude-ls/lib/Func.js @@ -0,0 +1,65 @@ +// Generated by LiveScript 1.4.0 +var apply, curry, flip, fix, over, memoize, slice$ = [].slice, toString$ = {}.toString; +apply = curry$(function(f, list){ + return f.apply(null, list); +}); +curry = function(f){ + return curry$(f); +}; +flip = curry$(function(f, x, y){ + return f(y, x); +}); +fix = function(f){ + return function(g){ + return function(){ + return f(g(g)).apply(null, arguments); + }; + }(function(g){ + return function(){ + return f(g(g)).apply(null, arguments); + }; + }); +}; +over = curry$(function(f, g, x, y){ + return f(g(x), g(y)); +}); +memoize = function(f){ + var memo; + memo = {}; + return function(){ + var args, key, arg; + args = slice$.call(arguments); + key = (function(){ + var i$, ref$, len$, results$ = []; + for (i$ = 0, len$ = (ref$ = args).length; i$ < len$; ++i$) { + arg = ref$[i$]; + results$.push(arg + toString$.call(arg).slice(8, -1)); + } + return results$; + }()).join(''); + return memo[key] = key in memo + ? memo[key] + : f.apply(null, args); + }; +}; +module.exports = { + curry: curry, + flip: flip, + fix: fix, + apply: apply, + over: over, + memoize: memoize +}; +function curry$(f, bound){ + var context, + _curry = function(args) { + return f.length > 1 ? function(){ + var params = args ? args.concat() : []; + context = bound ? context || this : this; + return params.push.apply(params, arguments) < + f.length && arguments.length ? + _curry.call(context, params) : f.apply(context, params); + } : f; + }; + return _curry(); +} \ No newline at end of file diff --git a/node_modules/prelude-ls/lib/List.js b/node_modules/prelude-ls/lib/List.js new file mode 100644 index 0000000..5790816 --- /dev/null +++ b/node_modules/prelude-ls/lib/List.js @@ -0,0 +1,686 @@ +// Generated by LiveScript 1.4.0 +var each, map, compact, filter, reject, partition, find, head, first, tail, last, initial, empty, reverse, unique, uniqueBy, fold, foldl, fold1, foldl1, foldr, foldr1, unfoldr, concat, concatMap, flatten, difference, intersection, union, countBy, groupBy, andList, orList, any, all, sort, sortWith, sortBy, sum, product, mean, average, maximum, minimum, maximumBy, minimumBy, scan, scanl, scan1, scanl1, scanr, scanr1, slice, take, drop, splitAt, takeWhile, dropWhile, span, breakList, zip, zipWith, zipAll, zipAllWith, at, elemIndex, elemIndices, findIndex, findIndices, toString$ = {}.toString, slice$ = [].slice; +each = curry$(function(f, xs){ + var i$, len$, x; + for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) { + x = xs[i$]; + f(x); + } + return xs; +}); +map = curry$(function(f, xs){ + var i$, len$, x, results$ = []; + for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) { + x = xs[i$]; + results$.push(f(x)); + } + return results$; +}); +compact = function(xs){ + var i$, len$, x, results$ = []; + for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) { + x = xs[i$]; + if (x) { + results$.push(x); + } + } + return results$; +}; +filter = curry$(function(f, xs){ + var i$, len$, x, results$ = []; + for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) { + x = xs[i$]; + if (f(x)) { + results$.push(x); + } + } + return results$; +}); +reject = curry$(function(f, xs){ + var i$, len$, x, results$ = []; + for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) { + x = xs[i$]; + if (!f(x)) { + results$.push(x); + } + } + return results$; +}); +partition = curry$(function(f, xs){ + var passed, failed, i$, len$, x; + passed = []; + failed = []; + for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) { + x = xs[i$]; + (f(x) ? passed : failed).push(x); + } + return [passed, failed]; +}); +find = curry$(function(f, xs){ + var i$, len$, x; + for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) { + x = xs[i$]; + if (f(x)) { + return x; + } + } +}); +head = first = function(xs){ + return xs[0]; +}; +tail = function(xs){ + if (!xs.length) { + return; + } + return xs.slice(1); +}; +last = function(xs){ + return xs[xs.length - 1]; +}; +initial = function(xs){ + if (!xs.length) { + return; + } + return xs.slice(0, -1); +}; +empty = function(xs){ + return !xs.length; +}; +reverse = function(xs){ + return xs.concat().reverse(); +}; +unique = function(xs){ + var result, i$, len$, x; + result = []; + for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) { + x = xs[i$]; + if (!in$(x, result)) { + result.push(x); + } + } + return result; +}; +uniqueBy = curry$(function(f, xs){ + var seen, i$, len$, x, val, results$ = []; + seen = []; + for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) { + x = xs[i$]; + val = f(x); + if (in$(val, seen)) { + continue; + } + seen.push(val); + results$.push(x); + } + return results$; +}); +fold = foldl = curry$(function(f, memo, xs){ + var i$, len$, x; + for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) { + x = xs[i$]; + memo = f(memo, x); + } + return memo; +}); +fold1 = foldl1 = curry$(function(f, xs){ + return fold(f, xs[0], xs.slice(1)); +}); +foldr = curry$(function(f, memo, xs){ + var i$, x; + for (i$ = xs.length - 1; i$ >= 0; --i$) { + x = xs[i$]; + memo = f(x, memo); + } + return memo; +}); +foldr1 = curry$(function(f, xs){ + return foldr(f, xs[xs.length - 1], xs.slice(0, -1)); +}); +unfoldr = curry$(function(f, b){ + var result, x, that; + result = []; + x = b; + while ((that = f(x)) != null) { + result.push(that[0]); + x = that[1]; + } + return result; +}); +concat = function(xss){ + return [].concat.apply([], xss); +}; +concatMap = curry$(function(f, xs){ + var x; + return [].concat.apply([], (function(){ + var i$, ref$, len$, results$ = []; + for (i$ = 0, len$ = (ref$ = xs).length; i$ < len$; ++i$) { + x = ref$[i$]; + results$.push(f(x)); + } + return results$; + }())); +}); +flatten = function(xs){ + var x; + return [].concat.apply([], (function(){ + var i$, ref$, len$, results$ = []; + for (i$ = 0, len$ = (ref$ = xs).length; i$ < len$; ++i$) { + x = ref$[i$]; + if (toString$.call(x).slice(8, -1) === 'Array') { + results$.push(flatten(x)); + } else { + results$.push(x); + } + } + return results$; + }())); +}; +difference = function(xs){ + var yss, results, i$, len$, x, j$, len1$, ys; + yss = slice$.call(arguments, 1); + results = []; + outer: for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) { + x = xs[i$]; + for (j$ = 0, len1$ = yss.length; j$ < len1$; ++j$) { + ys = yss[j$]; + if (in$(x, ys)) { + continue outer; + } + } + results.push(x); + } + return results; +}; +intersection = function(xs){ + var yss, results, i$, len$, x, j$, len1$, ys; + yss = slice$.call(arguments, 1); + results = []; + outer: for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) { + x = xs[i$]; + for (j$ = 0, len1$ = yss.length; j$ < len1$; ++j$) { + ys = yss[j$]; + if (!in$(x, ys)) { + continue outer; + } + } + results.push(x); + } + return results; +}; +union = function(){ + var xss, results, i$, len$, xs, j$, len1$, x; + xss = slice$.call(arguments); + results = []; + for (i$ = 0, len$ = xss.length; i$ < len$; ++i$) { + xs = xss[i$]; + for (j$ = 0, len1$ = xs.length; j$ < len1$; ++j$) { + x = xs[j$]; + if (!in$(x, results)) { + results.push(x); + } + } + } + return results; +}; +countBy = curry$(function(f, xs){ + var results, i$, len$, x, key; + results = {}; + for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) { + x = xs[i$]; + key = f(x); + if (key in results) { + results[key] += 1; + } else { + results[key] = 1; + } + } + return results; +}); +groupBy = curry$(function(f, xs){ + var results, i$, len$, x, key; + results = {}; + for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) { + x = xs[i$]; + key = f(x); + if (key in results) { + results[key].push(x); + } else { + results[key] = [x]; + } + } + return results; +}); +andList = function(xs){ + var i$, len$, x; + for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) { + x = xs[i$]; + if (!x) { + return false; + } + } + return true; +}; +orList = function(xs){ + var i$, len$, x; + for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) { + x = xs[i$]; + if (x) { + return true; + } + } + return false; +}; +any = curry$(function(f, xs){ + var i$, len$, x; + for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) { + x = xs[i$]; + if (f(x)) { + return true; + } + } + return false; +}); +all = curry$(function(f, xs){ + var i$, len$, x; + for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) { + x = xs[i$]; + if (!f(x)) { + return false; + } + } + return true; +}); +sort = function(xs){ + return xs.concat().sort(function(x, y){ + if (x > y) { + return 1; + } else if (x < y) { + return -1; + } else { + return 0; + } + }); +}; +sortWith = curry$(function(f, xs){ + return xs.concat().sort(f); +}); +sortBy = curry$(function(f, xs){ + return xs.concat().sort(function(x, y){ + if (f(x) > f(y)) { + return 1; + } else if (f(x) < f(y)) { + return -1; + } else { + return 0; + } + }); +}); +sum = function(xs){ + var result, i$, len$, x; + result = 0; + for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) { + x = xs[i$]; + result += x; + } + return result; +}; +product = function(xs){ + var result, i$, len$, x; + result = 1; + for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) { + x = xs[i$]; + result *= x; + } + return result; +}; +mean = average = function(xs){ + var sum, i$, len$, x; + sum = 0; + for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) { + x = xs[i$]; + sum += x; + } + return sum / xs.length; +}; +maximum = function(xs){ + var max, i$, ref$, len$, x; + max = xs[0]; + for (i$ = 0, len$ = (ref$ = xs.slice(1)).length; i$ < len$; ++i$) { + x = ref$[i$]; + if (x > max) { + max = x; + } + } + return max; +}; +minimum = function(xs){ + var min, i$, ref$, len$, x; + min = xs[0]; + for (i$ = 0, len$ = (ref$ = xs.slice(1)).length; i$ < len$; ++i$) { + x = ref$[i$]; + if (x < min) { + min = x; + } + } + return min; +}; +maximumBy = curry$(function(f, xs){ + var max, i$, ref$, len$, x; + max = xs[0]; + for (i$ = 0, len$ = (ref$ = xs.slice(1)).length; i$ < len$; ++i$) { + x = ref$[i$]; + if (f(x) > f(max)) { + max = x; + } + } + return max; +}); +minimumBy = curry$(function(f, xs){ + var min, i$, ref$, len$, x; + min = xs[0]; + for (i$ = 0, len$ = (ref$ = xs.slice(1)).length; i$ < len$; ++i$) { + x = ref$[i$]; + if (f(x) < f(min)) { + min = x; + } + } + return min; +}); +scan = scanl = curry$(function(f, memo, xs){ + var last, x; + last = memo; + return [memo].concat((function(){ + var i$, ref$, len$, results$ = []; + for (i$ = 0, len$ = (ref$ = xs).length; i$ < len$; ++i$) { + x = ref$[i$]; + results$.push(last = f(last, x)); + } + return results$; + }())); +}); +scan1 = scanl1 = curry$(function(f, xs){ + if (!xs.length) { + return; + } + return scan(f, xs[0], xs.slice(1)); +}); +scanr = curry$(function(f, memo, xs){ + xs = xs.concat().reverse(); + return scan(f, memo, xs).reverse(); +}); +scanr1 = curry$(function(f, xs){ + if (!xs.length) { + return; + } + xs = xs.concat().reverse(); + return scan(f, xs[0], xs.slice(1)).reverse(); +}); +slice = curry$(function(x, y, xs){ + return xs.slice(x, y); +}); +take = curry$(function(n, xs){ + if (n <= 0) { + return xs.slice(0, 0); + } else { + return xs.slice(0, n); + } +}); +drop = curry$(function(n, xs){ + if (n <= 0) { + return xs; + } else { + return xs.slice(n); + } +}); +splitAt = curry$(function(n, xs){ + return [take(n, xs), drop(n, xs)]; +}); +takeWhile = curry$(function(p, xs){ + var len, i; + len = xs.length; + if (!len) { + return xs; + } + i = 0; + while (i < len && p(xs[i])) { + i += 1; + } + return xs.slice(0, i); +}); +dropWhile = curry$(function(p, xs){ + var len, i; + len = xs.length; + if (!len) { + return xs; + } + i = 0; + while (i < len && p(xs[i])) { + i += 1; + } + return xs.slice(i); +}); +span = curry$(function(p, xs){ + return [takeWhile(p, xs), dropWhile(p, xs)]; +}); +breakList = curry$(function(p, xs){ + return span(compose$(p, not$), xs); +}); +zip = curry$(function(xs, ys){ + var result, len, i$, len$, i, x; + result = []; + len = ys.length; + for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) { + i = i$; + x = xs[i$]; + if (i === len) { + break; + } + result.push([x, ys[i]]); + } + return result; +}); +zipWith = curry$(function(f, xs, ys){ + var result, len, i$, len$, i, x; + result = []; + len = ys.length; + for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) { + i = i$; + x = xs[i$]; + if (i === len) { + break; + } + result.push(f(x, ys[i])); + } + return result; +}); +zipAll = function(){ + var xss, minLength, i$, len$, xs, ref$, i, lresult$, j$, results$ = []; + xss = slice$.call(arguments); + minLength = undefined; + for (i$ = 0, len$ = xss.length; i$ < len$; ++i$) { + xs = xss[i$]; + minLength <= (ref$ = xs.length) || (minLength = ref$); + } + for (i$ = 0; i$ < minLength; ++i$) { + i = i$; + lresult$ = []; + for (j$ = 0, len$ = xss.length; j$ < len$; ++j$) { + xs = xss[j$]; + lresult$.push(xs[i]); + } + results$.push(lresult$); + } + return results$; +}; +zipAllWith = function(f){ + var xss, minLength, i$, len$, xs, ref$, i, results$ = []; + xss = slice$.call(arguments, 1); + minLength = undefined; + for (i$ = 0, len$ = xss.length; i$ < len$; ++i$) { + xs = xss[i$]; + minLength <= (ref$ = xs.length) || (minLength = ref$); + } + for (i$ = 0; i$ < minLength; ++i$) { + i = i$; + results$.push(f.apply(null, (fn$()))); + } + return results$; + function fn$(){ + var i$, ref$, len$, results$ = []; + for (i$ = 0, len$ = (ref$ = xss).length; i$ < len$; ++i$) { + xs = ref$[i$]; + results$.push(xs[i]); + } + return results$; + } +}; +at = curry$(function(n, xs){ + if (n < 0) { + return xs[xs.length + n]; + } else { + return xs[n]; + } +}); +elemIndex = curry$(function(el, xs){ + var i$, len$, i, x; + for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) { + i = i$; + x = xs[i$]; + if (x === el) { + return i; + } + } +}); +elemIndices = curry$(function(el, xs){ + var i$, len$, i, x, results$ = []; + for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) { + i = i$; + x = xs[i$]; + if (x === el) { + results$.push(i); + } + } + return results$; +}); +findIndex = curry$(function(f, xs){ + var i$, len$, i, x; + for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) { + i = i$; + x = xs[i$]; + if (f(x)) { + return i; + } + } +}); +findIndices = curry$(function(f, xs){ + var i$, len$, i, x, results$ = []; + for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) { + i = i$; + x = xs[i$]; + if (f(x)) { + results$.push(i); + } + } + return results$; +}); +module.exports = { + each: each, + map: map, + filter: filter, + compact: compact, + reject: reject, + partition: partition, + find: find, + head: head, + first: first, + tail: tail, + last: last, + initial: initial, + empty: empty, + reverse: reverse, + difference: difference, + intersection: intersection, + union: union, + countBy: countBy, + groupBy: groupBy, + fold: fold, + fold1: fold1, + foldl: foldl, + foldl1: foldl1, + foldr: foldr, + foldr1: foldr1, + unfoldr: unfoldr, + andList: andList, + orList: orList, + any: any, + all: all, + unique: unique, + uniqueBy: uniqueBy, + sort: sort, + sortWith: sortWith, + sortBy: sortBy, + sum: sum, + product: product, + mean: mean, + average: average, + concat: concat, + concatMap: concatMap, + flatten: flatten, + maximum: maximum, + minimum: minimum, + maximumBy: maximumBy, + minimumBy: minimumBy, + scan: scan, + scan1: scan1, + scanl: scanl, + scanl1: scanl1, + scanr: scanr, + scanr1: scanr1, + slice: slice, + take: take, + drop: drop, + splitAt: splitAt, + takeWhile: takeWhile, + dropWhile: dropWhile, + span: span, + breakList: breakList, + zip: zip, + zipWith: zipWith, + zipAll: zipAll, + zipAllWith: zipAllWith, + at: at, + elemIndex: elemIndex, + elemIndices: elemIndices, + findIndex: findIndex, + findIndices: findIndices +}; +function curry$(f, bound){ + var context, + _curry = function(args) { + return f.length > 1 ? function(){ + var params = args ? args.concat() : []; + context = bound ? context || this : this; + return params.push.apply(params, arguments) < + f.length && arguments.length ? + _curry.call(context, params) : f.apply(context, params); + } : f; + }; + return _curry(); +} +function in$(x, xs){ + var i = -1, l = xs.length >>> 0; + while (++i < l) if (x === xs[i]) return true; + return false; +} +function compose$() { + var functions = arguments; + return function() { + var i, result; + result = functions[0].apply(this, arguments); + for (i = 1; i < functions.length; ++i) { + result = functions[i](result); + } + return result; + }; +} +function not$(x){ return !x; } \ No newline at end of file diff --git a/node_modules/prelude-ls/lib/Num.js b/node_modules/prelude-ls/lib/Num.js new file mode 100644 index 0000000..0e25be7 --- /dev/null +++ b/node_modules/prelude-ls/lib/Num.js @@ -0,0 +1,130 @@ +// Generated by LiveScript 1.4.0 +var max, min, negate, abs, signum, quot, rem, div, mod, recip, pi, tau, exp, sqrt, ln, pow, sin, tan, cos, asin, acos, atan, atan2, truncate, round, ceiling, floor, isItNaN, even, odd, gcd, lcm; +max = curry$(function(x$, y$){ + return x$ > y$ ? x$ : y$; +}); +min = curry$(function(x$, y$){ + return x$ < y$ ? x$ : y$; +}); +negate = function(x){ + return -x; +}; +abs = Math.abs; +signum = function(x){ + if (x < 0) { + return -1; + } else if (x > 0) { + return 1; + } else { + return 0; + } +}; +quot = curry$(function(x, y){ + return ~~(x / y); +}); +rem = curry$(function(x$, y$){ + return x$ % y$; +}); +div = curry$(function(x, y){ + return Math.floor(x / y); +}); +mod = curry$(function(x$, y$){ + var ref$; + return (((x$) % (ref$ = y$) + ref$) % ref$); +}); +recip = (function(it){ + return 1 / it; +}); +pi = Math.PI; +tau = pi * 2; +exp = Math.exp; +sqrt = Math.sqrt; +ln = Math.log; +pow = curry$(function(x$, y$){ + return Math.pow(x$, y$); +}); +sin = Math.sin; +tan = Math.tan; +cos = Math.cos; +asin = Math.asin; +acos = Math.acos; +atan = Math.atan; +atan2 = curry$(function(x, y){ + return Math.atan2(x, y); +}); +truncate = function(x){ + return ~~x; +}; +round = Math.round; +ceiling = Math.ceil; +floor = Math.floor; +isItNaN = function(x){ + return x !== x; +}; +even = function(x){ + return x % 2 === 0; +}; +odd = function(x){ + return x % 2 !== 0; +}; +gcd = curry$(function(x, y){ + var z; + x = Math.abs(x); + y = Math.abs(y); + while (y !== 0) { + z = x % y; + x = y; + y = z; + } + return x; +}); +lcm = curry$(function(x, y){ + return Math.abs(Math.floor(x / gcd(x, y) * y)); +}); +module.exports = { + max: max, + min: min, + negate: negate, + abs: abs, + signum: signum, + quot: quot, + rem: rem, + div: div, + mod: mod, + recip: recip, + pi: pi, + tau: tau, + exp: exp, + sqrt: sqrt, + ln: ln, + pow: pow, + sin: sin, + tan: tan, + cos: cos, + acos: acos, + asin: asin, + atan: atan, + atan2: atan2, + truncate: truncate, + round: round, + ceiling: ceiling, + floor: floor, + isItNaN: isItNaN, + even: even, + odd: odd, + gcd: gcd, + lcm: lcm +}; +function curry$(f, bound){ + var context, + _curry = function(args) { + return f.length > 1 ? function(){ + var params = args ? args.concat() : []; + context = bound ? context || this : this; + return params.push.apply(params, arguments) < + f.length && arguments.length ? + _curry.call(context, params) : f.apply(context, params); + } : f; + }; + return _curry(); +} \ No newline at end of file diff --git a/node_modules/prelude-ls/lib/Obj.js b/node_modules/prelude-ls/lib/Obj.js new file mode 100644 index 0000000..f0a921f --- /dev/null +++ b/node_modules/prelude-ls/lib/Obj.js @@ -0,0 +1,154 @@ +// Generated by LiveScript 1.4.0 +var values, keys, pairsToObj, objToPairs, listsToObj, objToLists, empty, each, map, compact, filter, reject, partition, find; +values = function(object){ + var i$, x, results$ = []; + for (i$ in object) { + x = object[i$]; + results$.push(x); + } + return results$; +}; +keys = function(object){ + var x, results$ = []; + for (x in object) { + results$.push(x); + } + return results$; +}; +pairsToObj = function(object){ + var i$, len$, x, resultObj$ = {}; + for (i$ = 0, len$ = object.length; i$ < len$; ++i$) { + x = object[i$]; + resultObj$[x[0]] = x[1]; + } + return resultObj$; +}; +objToPairs = function(object){ + var key, value, results$ = []; + for (key in object) { + value = object[key]; + results$.push([key, value]); + } + return results$; +}; +listsToObj = curry$(function(keys, values){ + var i$, len$, i, key, resultObj$ = {}; + for (i$ = 0, len$ = keys.length; i$ < len$; ++i$) { + i = i$; + key = keys[i$]; + resultObj$[key] = values[i]; + } + return resultObj$; +}); +objToLists = function(object){ + var keys, values, key, value; + keys = []; + values = []; + for (key in object) { + value = object[key]; + keys.push(key); + values.push(value); + } + return [keys, values]; +}; +empty = function(object){ + var x; + for (x in object) { + return false; + } + return true; +}; +each = curry$(function(f, object){ + var i$, x; + for (i$ in object) { + x = object[i$]; + f(x); + } + return object; +}); +map = curry$(function(f, object){ + var k, x, resultObj$ = {}; + for (k in object) { + x = object[k]; + resultObj$[k] = f(x); + } + return resultObj$; +}); +compact = function(object){ + var k, x, resultObj$ = {}; + for (k in object) { + x = object[k]; + if (x) { + resultObj$[k] = x; + } + } + return resultObj$; +}; +filter = curry$(function(f, object){ + var k, x, resultObj$ = {}; + for (k in object) { + x = object[k]; + if (f(x)) { + resultObj$[k] = x; + } + } + return resultObj$; +}); +reject = curry$(function(f, object){ + var k, x, resultObj$ = {}; + for (k in object) { + x = object[k]; + if (!f(x)) { + resultObj$[k] = x; + } + } + return resultObj$; +}); +partition = curry$(function(f, object){ + var passed, failed, k, x; + passed = {}; + failed = {}; + for (k in object) { + x = object[k]; + (f(x) ? passed : failed)[k] = x; + } + return [passed, failed]; +}); +find = curry$(function(f, object){ + var i$, x; + for (i$ in object) { + x = object[i$]; + if (f(x)) { + return x; + } + } +}); +module.exports = { + values: values, + keys: keys, + pairsToObj: pairsToObj, + objToPairs: objToPairs, + listsToObj: listsToObj, + objToLists: objToLists, + empty: empty, + each: each, + map: map, + filter: filter, + compact: compact, + reject: reject, + partition: partition, + find: find +}; +function curry$(f, bound){ + var context, + _curry = function(args) { + return f.length > 1 ? function(){ + var params = args ? args.concat() : []; + context = bound ? context || this : this; + return params.push.apply(params, arguments) < + f.length && arguments.length ? + _curry.call(context, params) : f.apply(context, params); + } : f; + }; + return _curry(); +} \ No newline at end of file diff --git a/node_modules/prelude-ls/lib/Str.js b/node_modules/prelude-ls/lib/Str.js new file mode 100644 index 0000000..eb9a1ac --- /dev/null +++ b/node_modules/prelude-ls/lib/Str.js @@ -0,0 +1,92 @@ +// Generated by LiveScript 1.4.0 +var split, join, lines, unlines, words, unwords, chars, unchars, reverse, repeat, capitalize, camelize, dasherize; +split = curry$(function(sep, str){ + return str.split(sep); +}); +join = curry$(function(sep, xs){ + return xs.join(sep); +}); +lines = function(str){ + if (!str.length) { + return []; + } + return str.split('\n'); +}; +unlines = function(it){ + return it.join('\n'); +}; +words = function(str){ + if (!str.length) { + return []; + } + return str.split(/[ ]+/); +}; +unwords = function(it){ + return it.join(' '); +}; +chars = function(it){ + return it.split(''); +}; +unchars = function(it){ + return it.join(''); +}; +reverse = function(str){ + return str.split('').reverse().join(''); +}; +repeat = curry$(function(n, str){ + var result, i$; + result = ''; + for (i$ = 0; i$ < n; ++i$) { + result += str; + } + return result; +}); +capitalize = function(str){ + return str.charAt(0).toUpperCase() + str.slice(1); +}; +camelize = function(it){ + return it.replace(/[-_]+(.)?/g, function(arg$, c){ + return (c != null ? c : '').toUpperCase(); + }); +}; +dasherize = function(str){ + return str.replace(/([^-A-Z])([A-Z]+)/g, function(arg$, lower, upper){ + return lower + "-" + (upper.length > 1 + ? upper + : upper.toLowerCase()); + }).replace(/^([A-Z]+)/, function(arg$, upper){ + if (upper.length > 1) { + return upper + "-"; + } else { + return upper.toLowerCase(); + } + }); +}; +module.exports = { + split: split, + join: join, + lines: lines, + unlines: unlines, + words: words, + unwords: unwords, + chars: chars, + unchars: unchars, + reverse: reverse, + repeat: repeat, + capitalize: capitalize, + camelize: camelize, + dasherize: dasherize +}; +function curry$(f, bound){ + var context, + _curry = function(args) { + return f.length > 1 ? function(){ + var params = args ? args.concat() : []; + context = bound ? context || this : this; + return params.push.apply(params, arguments) < + f.length && arguments.length ? + _curry.call(context, params) : f.apply(context, params); + } : f; + }; + return _curry(); +} \ No newline at end of file diff --git a/node_modules/prelude-ls/lib/index.js b/node_modules/prelude-ls/lib/index.js new file mode 100644 index 0000000..391cb2e --- /dev/null +++ b/node_modules/prelude-ls/lib/index.js @@ -0,0 +1,178 @@ +// Generated by LiveScript 1.4.0 +var Func, List, Obj, Str, Num, id, isType, replicate, prelude, toString$ = {}.toString; +Func = require('./Func.js'); +List = require('./List.js'); +Obj = require('./Obj.js'); +Str = require('./Str.js'); +Num = require('./Num.js'); +id = function(x){ + return x; +}; +isType = curry$(function(type, x){ + return toString$.call(x).slice(8, -1) === type; +}); +replicate = curry$(function(n, x){ + var i$, results$ = []; + for (i$ = 0; i$ < n; ++i$) { + results$.push(x); + } + return results$; +}); +Str.empty = List.empty; +Str.slice = List.slice; +Str.take = List.take; +Str.drop = List.drop; +Str.splitAt = List.splitAt; +Str.takeWhile = List.takeWhile; +Str.dropWhile = List.dropWhile; +Str.span = List.span; +Str.breakStr = List.breakList; +prelude = { + Func: Func, + List: List, + Obj: Obj, + Str: Str, + Num: Num, + id: id, + isType: isType, + replicate: replicate +}; +prelude.each = List.each; +prelude.map = List.map; +prelude.filter = List.filter; +prelude.compact = List.compact; +prelude.reject = List.reject; +prelude.partition = List.partition; +prelude.find = List.find; +prelude.head = List.head; +prelude.first = List.first; +prelude.tail = List.tail; +prelude.last = List.last; +prelude.initial = List.initial; +prelude.empty = List.empty; +prelude.reverse = List.reverse; +prelude.difference = List.difference; +prelude.intersection = List.intersection; +prelude.union = List.union; +prelude.countBy = List.countBy; +prelude.groupBy = List.groupBy; +prelude.fold = List.fold; +prelude.foldl = List.foldl; +prelude.fold1 = List.fold1; +prelude.foldl1 = List.foldl1; +prelude.foldr = List.foldr; +prelude.foldr1 = List.foldr1; +prelude.unfoldr = List.unfoldr; +prelude.andList = List.andList; +prelude.orList = List.orList; +prelude.any = List.any; +prelude.all = List.all; +prelude.unique = List.unique; +prelude.uniqueBy = List.uniqueBy; +prelude.sort = List.sort; +prelude.sortWith = List.sortWith; +prelude.sortBy = List.sortBy; +prelude.sum = List.sum; +prelude.product = List.product; +prelude.mean = List.mean; +prelude.average = List.average; +prelude.concat = List.concat; +prelude.concatMap = List.concatMap; +prelude.flatten = List.flatten; +prelude.maximum = List.maximum; +prelude.minimum = List.minimum; +prelude.maximumBy = List.maximumBy; +prelude.minimumBy = List.minimumBy; +prelude.scan = List.scan; +prelude.scanl = List.scanl; +prelude.scan1 = List.scan1; +prelude.scanl1 = List.scanl1; +prelude.scanr = List.scanr; +prelude.scanr1 = List.scanr1; +prelude.slice = List.slice; +prelude.take = List.take; +prelude.drop = List.drop; +prelude.splitAt = List.splitAt; +prelude.takeWhile = List.takeWhile; +prelude.dropWhile = List.dropWhile; +prelude.span = List.span; +prelude.breakList = List.breakList; +prelude.zip = List.zip; +prelude.zipWith = List.zipWith; +prelude.zipAll = List.zipAll; +prelude.zipAllWith = List.zipAllWith; +prelude.at = List.at; +prelude.elemIndex = List.elemIndex; +prelude.elemIndices = List.elemIndices; +prelude.findIndex = List.findIndex; +prelude.findIndices = List.findIndices; +prelude.apply = Func.apply; +prelude.curry = Func.curry; +prelude.flip = Func.flip; +prelude.fix = Func.fix; +prelude.over = Func.over; +prelude.split = Str.split; +prelude.join = Str.join; +prelude.lines = Str.lines; +prelude.unlines = Str.unlines; +prelude.words = Str.words; +prelude.unwords = Str.unwords; +prelude.chars = Str.chars; +prelude.unchars = Str.unchars; +prelude.repeat = Str.repeat; +prelude.capitalize = Str.capitalize; +prelude.camelize = Str.camelize; +prelude.dasherize = Str.dasherize; +prelude.values = Obj.values; +prelude.keys = Obj.keys; +prelude.pairsToObj = Obj.pairsToObj; +prelude.objToPairs = Obj.objToPairs; +prelude.listsToObj = Obj.listsToObj; +prelude.objToLists = Obj.objToLists; +prelude.max = Num.max; +prelude.min = Num.min; +prelude.negate = Num.negate; +prelude.abs = Num.abs; +prelude.signum = Num.signum; +prelude.quot = Num.quot; +prelude.rem = Num.rem; +prelude.div = Num.div; +prelude.mod = Num.mod; +prelude.recip = Num.recip; +prelude.pi = Num.pi; +prelude.tau = Num.tau; +prelude.exp = Num.exp; +prelude.sqrt = Num.sqrt; +prelude.ln = Num.ln; +prelude.pow = Num.pow; +prelude.sin = Num.sin; +prelude.tan = Num.tan; +prelude.cos = Num.cos; +prelude.acos = Num.acos; +prelude.asin = Num.asin; +prelude.atan = Num.atan; +prelude.atan2 = Num.atan2; +prelude.truncate = Num.truncate; +prelude.round = Num.round; +prelude.ceiling = Num.ceiling; +prelude.floor = Num.floor; +prelude.isItNaN = Num.isItNaN; +prelude.even = Num.even; +prelude.odd = Num.odd; +prelude.gcd = Num.gcd; +prelude.lcm = Num.lcm; +prelude.VERSION = '1.1.2'; +module.exports = prelude; +function curry$(f, bound){ + var context, + _curry = function(args) { + return f.length > 1 ? function(){ + var params = args ? args.concat() : []; + context = bound ? context || this : this; + return params.push.apply(params, arguments) < + f.length && arguments.length ? + _curry.call(context, params) : f.apply(context, params); + } : f; + }; + return _curry(); +} \ No newline at end of file diff --git a/node_modules/prelude-ls/package.json b/node_modules/prelude-ls/package.json new file mode 100644 index 0000000..ffe7421 --- /dev/null +++ b/node_modules/prelude-ls/package.json @@ -0,0 +1,116 @@ +{ + "_args": [ + [ + { + "raw": "prelude-ls@~1.1.2", + "scope": null, + "escapedName": "prelude-ls", + "name": "prelude-ls", + "rawSpec": "~1.1.2", + "spec": ">=1.1.2 <1.2.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\levn" + ] + ], + "_from": "prelude-ls@>=1.1.2 <1.2.0", + "_id": "prelude-ls@1.1.2", + "_inCache": true, + "_location": "/prelude-ls", + "_nodeVersion": "0.11.15", + "_npmUser": { + "name": "gkz", + "email": "z@georgezahariev.com" + }, + "_npmVersion": "2.7.6", + "_phantomChildren": {}, + "_requested": { + "raw": "prelude-ls@~1.1.2", + "scope": null, + "escapedName": "prelude-ls", + "name": "prelude-ls", + "rawSpec": "~1.1.2", + "spec": ">=1.1.2 <1.2.0", + "type": "range" + }, + "_requiredBy": [ + "/levn", + "/optionator", + "/type-check" + ], + "_resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "_shasum": "21932a549f5e52ffd9a827f570e04be62a97da54", + "_shrinkwrap": null, + "_spec": "prelude-ls@~1.1.2", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\levn", + "author": { + "name": "George Zahariev", + "email": "z@georgezahariev.com" + }, + "bugs": { + "url": "https://github.com/gkz/prelude-ls/issues" + }, + "dependencies": {}, + "description": "prelude.ls is a functionally oriented utility library. It is powerful and flexible. Almost all of its functions are curried. It is written in, and is the recommended base library for, LiveScript.", + "devDependencies": { + "browserify": "~3.24.13", + "istanbul": "~0.2.4", + "livescript": "~1.4.0", + "mocha": "~2.2.4", + "sinon": "~1.10.2", + "uglify-js": "~2.4.12" + }, + "directories": {}, + "dist": { + "shasum": "21932a549f5e52ffd9a827f570e04be62a97da54", + "tarball": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz" + }, + "engines": { + "node": ">= 0.8.0" + }, + "files": [ + "lib/", + "README.md", + "LICENSE" + ], + "gitHead": "d69be8fd8a682321ba24eced17caf3a1b8ca73b8", + "homepage": "http://preludels.com", + "keywords": [ + "prelude", + "livescript", + "utility", + "ls", + "coffeescript", + "javascript", + "library", + "functional", + "array", + "list", + "object", + "string" + ], + "licenses": [ + { + "type": "MIT", + "url": "https://raw.github.com/gkz/prelude-ls/master/LICENSE" + } + ], + "main": "lib/", + "maintainers": [ + { + "name": "gkz", + "email": "z@georgezahariev.com" + } + ], + "name": "prelude-ls", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/gkz/prelude-ls.git" + }, + "scripts": { + "test": "make test" + }, + "version": "1.1.2" +} diff --git a/node_modules/progress/.npmignore b/node_modules/progress/.npmignore new file mode 100644 index 0000000..247b80d --- /dev/null +++ b/node_modules/progress/.npmignore @@ -0,0 +1,5 @@ +support +test +examples +*.sock +yarn.lock diff --git a/node_modules/progress/CHANGELOG.md b/node_modules/progress/CHANGELOG.md new file mode 100644 index 0000000..d9be0aa --- /dev/null +++ b/node_modules/progress/CHANGELOG.md @@ -0,0 +1,115 @@ + +2.0.0 / 2017-04-04 +================== + + * Fix: check before using stream.clearLine to prevent crash in Docker + * Fix: fixed output multiline on windows cmd + * Fix: Bug with array length when window is too small + * Fix: Don't clear whole line every time; instead, clear everything after end of line + * Fix: Use `this.stream` instead of `console.log` when terminating a progress bar to ensure that, if a writable stream is provided, it uses that rather than process.stdout + * Fix: Bug causing potentially stale tokens on render + * Feature: configurable cursor + * Feature: feature to interrupt the bar and display a message + * Feature: Add rate reporting to progress bar + * Improvement: Add head option to specify head character + * Improvement: Rename tickTokens to tokens + * Improvement: Change default throttle time to 16ms + * Improvement: Rename renderDelay to renderThrottle + * Improvement: Add delay between render updates + * Docs: Add example and documentation for custom token usage + * Docs: Add head option to readme + * Docs: Updated README example for public use + * Docs: Add renderThrottle option to code documentation + +1.1.7 / 2014-06-30 +================== + + * fixed a bug that occurs when a progress bar attempts to draw itself + on a console with very few columns + +1.1.6 / 2014-06-16 +================== + + * now prevents progress bar from exceeding TTY width by limiting its width to + the with of the TTY + +1.1.5 / 2014-03-25 +================== + + * updated documentation and various other repo maintenance + * updated makefile to run examples with `make` + * removed dependency on readline module + +1.1.4 / 2014-03-14 +================== + + * now supports streams, for example output progress bar to stderr, while piping + stdout + * increases performance and flicker by remembering the last drawn progress bar + +1.1.3 / 2013-12-31 +================== + + * fixes a bug where bar would bug when initializing + * allows to pass updated tokens when ticking or updating the bar + * fixes a bug where the bar would throw if skipping to far + +1.1.2 / 2013-10-17 +================== + + * lets you pass an `fmt` and a `total` instead of an options object + +1.1.0 / 2013-09-18 +================== + + * eta and elapsed tokens default to 0.0 instead of ?.? + * better JSDocs + * added back and forth example + * added method to update the progress bar to a specific percentage + * added an option to hide the bar on completion + +1.0.1 / 2013-08-07 +================== + + * on os x readline now works, reverting the terminal hack + +1.0.0 / 2013-06-18 +================== + + * remove .version + * merge pull request #15 from davglass/readline-osx + * on OSX revert back to terminal hack to avoid a readline bug + +0.1.0 / 2012-09-19 +================== + + * fixed logic bug that caused bar to jump one extra space at the end [davglass] + * working with readline impl, even on Windows [davglass] + * using readline instead of the \r hack [davglass] + +0.0.5 / 2012-08-07 +================== + + * add ability to tick by zero chunks - tick(0) + * fix ETA. Closes #4 [lwille] + +0.0.4 / 2011-11-14 +================== + + * allow more recent versions of node + +0.0.3 / 2011-04-20 +================== + + * changed; erase the line when complete + +0.0.2 / 2011-04-20 +================== + + * added custom tokens support + * fixed; clear line before writing + +0.0.1 / 2010-01-03 +================== + + * initial release diff --git a/node_modules/progress/LICENSE b/node_modules/progress/LICENSE new file mode 100644 index 0000000..4608b39 --- /dev/null +++ b/node_modules/progress/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2017 TJ Holowaychuk + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/progress/Makefile b/node_modules/progress/Makefile new file mode 100644 index 0000000..f933be1 --- /dev/null +++ b/node_modules/progress/Makefile @@ -0,0 +1,8 @@ + +EXAMPLES = $(foreach EXAMPLE, $(wildcard examples/*.js), $(EXAMPLE)) + +.PHONY: test +test: $(EXAMPLES) + +.PHONY: $(EXAMPLES) +$(EXAMPLES): ; node $@ && echo diff --git a/node_modules/progress/README.md b/node_modules/progress/README.md new file mode 100644 index 0000000..6d4271a --- /dev/null +++ b/node_modules/progress/README.md @@ -0,0 +1,146 @@ +Flexible ascii progress bar. + +## Installation + +```bash +$ npm install progress +``` + +## Usage + +First we create a `ProgressBar`, giving it a format string +as well as the `total`, telling the progress bar when it will +be considered complete. After that all we need to do is `tick()` appropriately. + +```javascript +var ProgressBar = require('progress'); + +var bar = new ProgressBar(':bar', { total: 10 }); +var timer = setInterval(function () { + bar.tick(); + if (bar.complete) { + console.log('\ncomplete\n'); + clearInterval(timer); + } +}, 100); +``` + +### Options + +These are keys in the options object you can pass to the progress bar along with +`total` as seen in the example above. + +- `curr` current completed index +- `total` total number of ticks to complete +- `width` the displayed width of the progress bar defaulting to total +- `stream` the output stream defaulting to stderr +- `head` head character defaulting to complete character +- `complete` completion character defaulting to "=" +- `incomplete` incomplete character defaulting to "-" +- `renderThrottle` minimum time between updates in milliseconds defaulting to 16 +- `clear` option to clear the bar on completion defaulting to false +- `callback` optional function to call when the progress bar completes + +### Tokens + +These are tokens you can use in the format of your progress bar. + +- `:bar` the progress bar itself +- `:current` current tick number +- `:total` total ticks +- `:elapsed` time elapsed in seconds +- `:percent` completion percentage +- `:eta` estimated completion time in seconds +- `:rate` rate of ticks per second + +### Custom Tokens + +You can define custom tokens by adding a `{'name': value}` object parameter to your method (`tick()`, `update()`, etc.) calls. + +```javascript +var bar = new ProgressBar(':current: :token1 :token2', { total: 3 }) +bar.tick({ + 'token1': "Hello", + 'token2': "World!\n" +}) +bar.tick(2, { + 'token1': "Goodbye", + 'token2': "World!" +}) +``` +The above example would result in the output below. + +``` +1: Hello World! +3: Goodbye World! +``` + +## Examples + +### Download + +In our download example each tick has a variable influence, so we pass the chunk +length which adjusts the progress bar appropriately relative to the total +length. + +```javascript +var ProgressBar = require('progress'); +var https = require('https'); + +var req = https.request({ + host: 'download.github.com', + port: 443, + path: '/visionmedia-node-jscoverage-0d4608a.zip' +}); + +req.on('response', function(res){ + var len = parseInt(res.headers['content-length'], 10); + + console.log(); + var bar = new ProgressBar(' downloading [:bar] :rate/bps :percent :etas', { + complete: '=', + incomplete: ' ', + width: 20, + total: len + }); + + res.on('data', function (chunk) { + bar.tick(chunk.length); + }); + + res.on('end', function () { + console.log('\n'); + }); +}); + +req.end(); +``` + +The above example result in a progress bar like the one below. + +``` +downloading [===== ] 39/bps 29% 3.7s +``` + +### Interrupt + +To display a message during progress bar execution, use `interrupt()` +```javascript +var ProgressBar = require('progress'); + +var bar = new ProgressBar(':bar :current/:total', { total: 10 }); +var timer = setInterval(function () { + bar.tick(); + if (bar.complete) { + clearInterval(timer); + } else if (bar.curr === 5) { + bar.interrupt('this message appears above the progress bar\ncurrent progress is ' + bar.curr + '/' + bar.total); + } +}, 1000); +``` + +You can see more examples in the `examples` folder. + +## License + +MIT diff --git a/node_modules/progress/index.js b/node_modules/progress/index.js new file mode 100644 index 0000000..4449dd3 --- /dev/null +++ b/node_modules/progress/index.js @@ -0,0 +1 @@ +module.exports = require('./lib/node-progress'); diff --git a/node_modules/progress/lib/node-progress.js b/node_modules/progress/lib/node-progress.js new file mode 100644 index 0000000..653f711 --- /dev/null +++ b/node_modules/progress/lib/node-progress.js @@ -0,0 +1,231 @@ +/*! + * node-progress + * Copyright(c) 2011 TJ Holowaychuk + * MIT Licensed + */ + +/** + * Expose `ProgressBar`. + */ + +exports = module.exports = ProgressBar; + +/** + * Initialize a `ProgressBar` with the given `fmt` string and `options` or + * `total`. + * + * Options: + * + * - `curr` current completed index + * - `total` total number of ticks to complete + * - `width` the displayed width of the progress bar defaulting to total + * - `stream` the output stream defaulting to stderr + * - `head` head character defaulting to complete character + * - `complete` completion character defaulting to "=" + * - `incomplete` incomplete character defaulting to "-" + * - `renderThrottle` minimum time between updates in milliseconds defaulting to 16 + * - `callback` optional function to call when the progress bar completes + * - `clear` will clear the progress bar upon termination + * + * Tokens: + * + * - `:bar` the progress bar itself + * - `:current` current tick number + * - `:total` total ticks + * - `:elapsed` time elapsed in seconds + * - `:percent` completion percentage + * - `:eta` eta in seconds + * - `:rate` rate of ticks per second + * + * @param {string} fmt + * @param {object|number} options or total + * @api public + */ + +function ProgressBar(fmt, options) { + this.stream = options.stream || process.stderr; + + if (typeof(options) == 'number') { + var total = options; + options = {}; + options.total = total; + } else { + options = options || {}; + if ('string' != typeof fmt) throw new Error('format required'); + if ('number' != typeof options.total) throw new Error('total required'); + } + + this.fmt = fmt; + this.curr = options.curr || 0; + this.total = options.total; + this.width = options.width || this.total; + this.clear = options.clear + this.chars = { + complete : options.complete || '=', + incomplete : options.incomplete || '-', + head : options.head || (options.complete || '=') + }; + this.renderThrottle = options.renderThrottle !== 0 ? (options.renderThrottle || 16) : 0; + this.callback = options.callback || function () {}; + this.tokens = {}; + this.lastDraw = ''; +} + +/** + * "tick" the progress bar with optional `len` and optional `tokens`. + * + * @param {number|object} len or tokens + * @param {object} tokens + * @api public + */ + +ProgressBar.prototype.tick = function(len, tokens){ + if (len !== 0) + len = len || 1; + + // swap tokens + if ('object' == typeof len) tokens = len, len = 1; + if (tokens) this.tokens = tokens; + + // start time for eta + if (0 == this.curr) this.start = new Date; + + this.curr += len + + // schedule render + if (!this.renderThrottleTimeout) { + this.renderThrottleTimeout = setTimeout(this.render.bind(this), this.renderThrottle); + } + + // progress complete + if (this.curr >= this.total) { + if (this.renderThrottleTimeout) this.render(); + this.complete = true; + this.terminate(); + this.callback(this); + return; + } +}; + +/** + * Method to render the progress bar with optional `tokens` to place in the + * progress bar's `fmt` field. + * + * @param {object} tokens + * @api public + */ + +ProgressBar.prototype.render = function (tokens) { + clearTimeout(this.renderThrottleTimeout); + this.renderThrottleTimeout = null; + + if (tokens) this.tokens = tokens; + + if (!this.stream.isTTY) return; + + var ratio = this.curr / this.total; + ratio = Math.min(Math.max(ratio, 0), 1); + + var percent = ratio * 100; + var incomplete, complete, completeLength; + var elapsed = new Date - this.start; + var eta = (percent == 100) ? 0 : elapsed * (this.total / this.curr - 1); + var rate = this.curr / (elapsed / 1000); + + /* populate the bar template with percentages and timestamps */ + var str = this.fmt + .replace(':current', this.curr) + .replace(':total', this.total) + .replace(':elapsed', isNaN(elapsed) ? '0.0' : (elapsed / 1000).toFixed(1)) + .replace(':eta', (isNaN(eta) || !isFinite(eta)) ? '0.0' : (eta / 1000) + .toFixed(1)) + .replace(':percent', percent.toFixed(0) + '%') + .replace(':rate', Math.round(rate)); + + /* compute the available space (non-zero) for the bar */ + var availableSpace = Math.max(0, this.stream.columns - str.replace(':bar', '').length); + if(availableSpace && process.platform === 'win32'){ + availableSpace = availableSpace - 1; + } + + var width = Math.min(this.width, availableSpace); + + /* TODO: the following assumes the user has one ':bar' token */ + completeLength = Math.round(width * ratio); + complete = Array(Math.max(0, completeLength + 1)).join(this.chars.complete); + incomplete = Array(Math.max(0, width - completeLength + 1)).join(this.chars.incomplete); + + /* add head to the complete string */ + if(completeLength > 0) + complete = complete.slice(0, -1) + this.chars.head; + + /* fill in the actual progress bar */ + str = str.replace(':bar', complete + incomplete); + + /* replace the extra tokens */ + if (this.tokens) for (var key in this.tokens) str = str.replace(':' + key, this.tokens[key]); + + if (this.lastDraw !== str) { + this.stream.cursorTo(0); + this.stream.write(str); + this.stream.clearLine(1); + this.lastDraw = str; + } +}; + +/** + * "update" the progress bar to represent an exact percentage. + * The ratio (between 0 and 1) specified will be multiplied by `total` and + * floored, representing the closest available "tick." For example, if a + * progress bar has a length of 3 and `update(0.5)` is called, the progress + * will be set to 1. + * + * A ratio of 0.5 will attempt to set the progress to halfway. + * + * @param {number} ratio The ratio (between 0 and 1 inclusive) to set the + * overall completion to. + * @api public + */ + +ProgressBar.prototype.update = function (ratio, tokens) { + var goal = Math.floor(ratio * this.total); + var delta = goal - this.curr; + + this.tick(delta, tokens); +}; + +/** + * "interrupt" the progress bar and write a message above it. + * @param {string} message The message to write. + * @api public + */ + +ProgressBar.prototype.interrupt = function (message) { + // clear the current line + this.stream.clearLine(); + // move the cursor to the start of the line + this.stream.cursorTo(0); + // write the message text + this.stream.write(message); + // terminate the line after writing the message + this.stream.write('\n'); + // re-display the progress bar with its lastDraw + this.stream.write(this.lastDraw); +}; + +/** + * Terminates a progress bar. + * + * @api public + */ + +ProgressBar.prototype.terminate = function () { + if (this.clear) { + if (this.stream.clearLine) { + this.stream.clearLine(); + this.stream.cursorTo(0); + } + } else { + this.stream.write('\n'); + } +}; diff --git a/node_modules/progress/package.json b/node_modules/progress/package.json new file mode 100644 index 0000000..4d3d57b --- /dev/null +++ b/node_modules/progress/package.json @@ -0,0 +1,119 @@ +{ + "_args": [ + [ + { + "raw": "progress@^2.0.0", + "scope": null, + "escapedName": "progress", + "name": "progress", + "rawSpec": "^2.0.0", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint" + ] + ], + "_from": "progress@>=2.0.0 <3.0.0", + "_id": "progress@2.0.0", + "_inCache": true, + "_location": "/progress", + "_nodeVersion": "6.9.0", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/progress-2.0.0.tgz_1491323693801_0.8384695542044938" + }, + "_npmUser": { + "name": "thebigredgeek", + "email": "rhyneandrew@gmail.com" + }, + "_npmVersion": "4.0.3", + "_phantomChildren": {}, + "_requested": { + "raw": "progress@^2.0.0", + "scope": null, + "escapedName": "progress", + "name": "progress", + "rawSpec": "^2.0.0", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", + "_shasum": "8a1be366bf8fc23db2bd23f10c6fe920b4389d1f", + "_shrinkwrap": null, + "_spec": "progress@^2.0.0", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint", + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca" + }, + "bugs": { + "url": "https://github.com/visionmedia/node-progress/issues" + }, + "contributors": [ + { + "name": "Christoffer Hallas", + "email": "christoffer.hallas@gmail.com" + }, + { + "name": "Jordan Scales", + "email": "scalesjordan@gmail.com" + }, + { + "name": "Andrew Rhyne", + "email": "rhyneandrew@gmail.com" + } + ], + "dependencies": {}, + "description": "Flexible ascii progress bar", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "8a1be366bf8fc23db2bd23f10c6fe920b4389d1f", + "tarball": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz" + }, + "engines": { + "node": ">=0.4.0" + }, + "gitHead": "d84326ed9ab7720592b6bbc9c108849cd2a79908", + "homepage": "https://github.com/visionmedia/node-progress#readme", + "keywords": [ + "cli", + "progress" + ], + "license": "MIT", + "main": "./index.js", + "maintainers": [ + { + "name": "hallas", + "email": "christoffer.hallas@gmail.com" + }, + { + "name": "prezjordan", + "email": "scalesjordan@gmail.com" + }, + { + "name": "thebigredgeek", + "email": "rhyneandrew@gmail.com" + }, + { + "name": "thejameskyle", + "email": "me@thejameskyle.com" + }, + { + "name": "tjholowaychuk", + "email": "tj@vision-media.ca" + } + ], + "name": "progress", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/visionmedia/node-progress.git" + }, + "scripts": {}, + "version": "2.0.0" +} diff --git a/node_modules/pseudomap/LICENSE b/node_modules/pseudomap/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/pseudomap/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/pseudomap/README.md b/node_modules/pseudomap/README.md new file mode 100644 index 0000000..778bf01 --- /dev/null +++ b/node_modules/pseudomap/README.md @@ -0,0 +1,60 @@ +# pseudomap + +A thing that is a lot like ES6 `Map`, but without iterators, for use +in environments where `for..of` syntax and `Map` are not available. + +If you need iterators, or just in general a more faithful polyfill to +ES6 Maps, check out [es6-map](http://npm.im/es6-map). + +If you are in an environment where `Map` is supported, then that will +be returned instead, unless `process.env.TEST_PSEUDOMAP` is set. + +You can use any value as keys, and any value as data. Setting again +with the identical key will overwrite the previous value. + +Internally, data is stored on an `Object.create(null)` style object. +The key is coerced to a string to generate the key on the internal +data-bag object. The original key used is stored along with the data. + +In the event of a stringified-key collision, a new key is generated by +appending an increasing number to the stringified-key until finding +either the intended key or an empty spot. + +Note that because object traversal order of plain objects is not +guaranteed to be identical to insertion order, the insertion order +guarantee of `Map.prototype.forEach` is not guaranteed in this +implementation. However, in all versions of Node.js and V8 where this +module works, `forEach` does traverse data in insertion order. + +## API + +Most of the [Map +API](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map), +with the following exceptions: + +1. A `Map` object is not an iterator. +2. `values`, `keys`, and `entries` methods are not implemented, + because they return iterators. +3. The argument to the constructor can be an Array of `[key, value]` + pairs, or a `Map` or `PseudoMap` object. But, since iterators + aren't used, passing any plain-old iterator won't initialize the + map properly. + +## USAGE + +Use just like a regular ES6 Map. + +```javascript +var PseudoMap = require('pseudomap') + +// optionally provide a pseudomap, or an array of [key,value] pairs +// as the argument to initialize the map with +var myMap = new PseudoMap() + +myMap.set(1, 'number 1') +myMap.set('1', 'string 1') +var akey = {} +var bkey = {} +myMap.set(akey, { some: 'data' }) +myMap.set(bkey, { some: 'other data' }) +``` diff --git a/node_modules/pseudomap/map.js b/node_modules/pseudomap/map.js new file mode 100644 index 0000000..7db1599 --- /dev/null +++ b/node_modules/pseudomap/map.js @@ -0,0 +1,9 @@ +if (process.env.npm_package_name === 'pseudomap' && + process.env.npm_lifecycle_script === 'test') + process.env.TEST_PSEUDOMAP = 'true' + +if (typeof Map === 'function' && !process.env.TEST_PSEUDOMAP) { + module.exports = Map +} else { + module.exports = require('./pseudomap') +} diff --git a/node_modules/pseudomap/package.json b/node_modules/pseudomap/package.json new file mode 100644 index 0000000..7a41bae --- /dev/null +++ b/node_modules/pseudomap/package.json @@ -0,0 +1,85 @@ +{ + "_args": [ + [ + { + "raw": "pseudomap@^1.0.2", + "scope": null, + "escapedName": "pseudomap", + "name": "pseudomap", + "rawSpec": "^1.0.2", + "spec": ">=1.0.2 <2.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\lru-cache" + ] + ], + "_from": "pseudomap@>=1.0.2 <2.0.0", + "_id": "pseudomap@1.0.2", + "_inCache": true, + "_location": "/pseudomap", + "_nodeVersion": "4.0.0", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "3.3.2", + "_phantomChildren": {}, + "_requested": { + "raw": "pseudomap@^1.0.2", + "scope": null, + "escapedName": "pseudomap", + "name": "pseudomap", + "rawSpec": "^1.0.2", + "spec": ">=1.0.2 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/lru-cache" + ], + "_resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "_shasum": "f052a28da70e618917ef0a8ac34c1ae5a68286b3", + "_shrinkwrap": null, + "_spec": "pseudomap@^1.0.2", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\lru-cache", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/pseudomap/issues" + }, + "dependencies": {}, + "description": "A thing that is a lot like ES6 `Map`, but without iterators, for use in environments where `for..of` syntax and `Map` are not available.", + "devDependencies": { + "tap": "^2.3.1" + }, + "directories": { + "test": "test" + }, + "dist": { + "shasum": "f052a28da70e618917ef0a8ac34c1ae5a68286b3", + "tarball": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz" + }, + "gitHead": "b6dc728207a0321ede6479e34506d3e0e13a940b", + "homepage": "https://github.com/isaacs/pseudomap#readme", + "license": "ISC", + "main": "map.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "pseudomap", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/pseudomap.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "1.0.2" +} diff --git a/node_modules/pseudomap/pseudomap.js b/node_modules/pseudomap/pseudomap.js new file mode 100644 index 0000000..25a21d8 --- /dev/null +++ b/node_modules/pseudomap/pseudomap.js @@ -0,0 +1,113 @@ +var hasOwnProperty = Object.prototype.hasOwnProperty + +module.exports = PseudoMap + +function PseudoMap (set) { + if (!(this instanceof PseudoMap)) // whyyyyyyy + throw new TypeError("Constructor PseudoMap requires 'new'") + + this.clear() + + if (set) { + if ((set instanceof PseudoMap) || + (typeof Map === 'function' && set instanceof Map)) + set.forEach(function (value, key) { + this.set(key, value) + }, this) + else if (Array.isArray(set)) + set.forEach(function (kv) { + this.set(kv[0], kv[1]) + }, this) + else + throw new TypeError('invalid argument') + } +} + +PseudoMap.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + Object.keys(this._data).forEach(function (k) { + if (k !== 'size') + fn.call(thisp, this._data[k].value, this._data[k].key) + }, this) +} + +PseudoMap.prototype.has = function (k) { + return !!find(this._data, k) +} + +PseudoMap.prototype.get = function (k) { + var res = find(this._data, k) + return res && res.value +} + +PseudoMap.prototype.set = function (k, v) { + set(this._data, k, v) +} + +PseudoMap.prototype.delete = function (k) { + var res = find(this._data, k) + if (res) { + delete this._data[res._index] + this._data.size-- + } +} + +PseudoMap.prototype.clear = function () { + var data = Object.create(null) + data.size = 0 + + Object.defineProperty(this, '_data', { + value: data, + enumerable: false, + configurable: true, + writable: false + }) +} + +Object.defineProperty(PseudoMap.prototype, 'size', { + get: function () { + return this._data.size + }, + set: function (n) {}, + enumerable: true, + configurable: true +}) + +PseudoMap.prototype.values = +PseudoMap.prototype.keys = +PseudoMap.prototype.entries = function () { + throw new Error('iterators are not implemented in this version') +} + +// Either identical, or both NaN +function same (a, b) { + return a === b || a !== a && b !== b +} + +function Entry (k, v, i) { + this.key = k + this.value = v + this._index = i +} + +function find (data, k) { + for (var i = 0, s = '_' + k, key = s; + hasOwnProperty.call(data, key); + key = s + i++) { + if (same(data[key].key, k)) + return data[key] + } +} + +function set (data, k, v) { + for (var i = 0, s = '_' + k, key = s; + hasOwnProperty.call(data, key); + key = s + i++) { + if (same(data[key].key, k)) { + data[key].value = v + return + } + } + data.size++ + data[key] = new Entry(k, v, key) +} diff --git a/node_modules/pseudomap/test/basic.js b/node_modules/pseudomap/test/basic.js new file mode 100644 index 0000000..4378e45 --- /dev/null +++ b/node_modules/pseudomap/test/basic.js @@ -0,0 +1,86 @@ +var t = require('tap') + +process.env.TEST_PSEUDOMAP = 'true' + +var PM = require('../') +runTests(PM) + +// if possible, verify that Map also behaves the same way +if (typeof Map === 'function') + runTests(Map) + + +function runTests (Map) { + t.throws(Map) + + var m = new Map() + + t.equal(m.size, 0) + + m.set(1, '1 string') + t.equal(m.get(1), '1 string') + t.equal(m.size, 1) + m.size = 1000 + t.equal(m.size, 1) + m.size = 0 + t.equal(m.size, 1) + + m = new Map([[1, 'number 1'], ['1', 'string 1']]) + t.equal(m.get(1), 'number 1') + t.equal(m.get('1'), 'string 1') + t.equal(m.size, 2) + + m = new Map(m) + t.equal(m.get(1), 'number 1') + t.equal(m.get('1'), 'string 1') + t.equal(m.size, 2) + + var akey = {} + var bkey = {} + m.set(akey, { some: 'data' }) + m.set(bkey, { some: 'other data' }) + t.same(m.get(akey), { some: 'data' }) + t.same(m.get(bkey), { some: 'other data' }) + t.equal(m.size, 4) + + var x = /x/ + var y = /x/ + m.set(x, 'x regex') + m.set(y, 'y regex') + t.equal(m.get(x), 'x regex') + m.set(x, 'x again') + t.equal(m.get(x), 'x again') + t.equal(m.size, 6) + + m.set(NaN, 'not a number') + t.equal(m.get(NaN), 'not a number') + m.set(NaN, 'it is a ' + typeof NaN) + t.equal(m.get(NaN), 'it is a number') + m.set('NaN', 'stringie nan') + t.equal(m.get(NaN), 'it is a number') + t.equal(m.get('NaN'), 'stringie nan') + t.equal(m.size, 8) + + m.delete(NaN) + t.equal(m.get(NaN), undefined) + t.equal(m.size, 7) + + var expect = [ + { value: 'number 1', key: 1 }, + { value: 'string 1', key: '1' }, + { value: { some: 'data' }, key: {} }, + { value: { some: 'other data' }, key: {} }, + { value: 'x again', key: /x/ }, + { value: 'y regex', key: /x/ }, + { value: 'stringie nan', key: 'NaN' } + ] + var actual = [] + + m.forEach(function (value, key) { + actual.push({ value: value, key: key }) + }) + t.same(actual, expect) + + m.clear() + t.equal(m.size, 0) +} diff --git a/node_modules/require-uncached/index.js b/node_modules/require-uncached/index.js new file mode 100644 index 0000000..63dfada --- /dev/null +++ b/node_modules/require-uncached/index.js @@ -0,0 +1,29 @@ +'use strict'; +var path = require('path'); +var resolveFrom = require('resolve-from'); +var callerPath = require('caller-path'); + +module.exports = function (moduleId) { + if (typeof moduleId !== 'string') { + throw new TypeError('Expected a string'); + } + + var filePath = resolveFrom(path.dirname(callerPath()), moduleId); + + // delete itself from module parent + if (require.cache[filePath] && require.cache[filePath].parent) { + var i = require.cache[filePath].parent.children.length; + + while (i--) { + if (require.cache[filePath].parent.children[i].id === filePath) { + require.cache[filePath].parent.children.splice(i, 1); + } + } + } + + // delete module from cache + delete require.cache[filePath]; + + // return fresh module + return require(filePath); +}; diff --git a/node_modules/require-uncached/license b/node_modules/require-uncached/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/require-uncached/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/require-uncached/package.json b/node_modules/require-uncached/package.json new file mode 100644 index 0000000..06b3663 --- /dev/null +++ b/node_modules/require-uncached/package.json @@ -0,0 +1,112 @@ +{ + "_args": [ + [ + { + "raw": "require-uncached@^1.0.3", + "scope": null, + "escapedName": "require-uncached", + "name": "require-uncached", + "rawSpec": "^1.0.3", + "spec": ">=1.0.3 <2.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint" + ] + ], + "_from": "require-uncached@>=1.0.3 <2.0.0", + "_id": "require-uncached@1.0.3", + "_inCache": true, + "_location": "/require-uncached", + "_nodeVersion": "4.6.1", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/require-uncached-1.0.3.tgz_1478234613915_0.2802360118366778" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "2.15.9", + "_phantomChildren": {}, + "_requested": { + "raw": "require-uncached@^1.0.3", + "scope": null, + "escapedName": "require-uncached", + "name": "require-uncached", + "rawSpec": "^1.0.3", + "spec": ">=1.0.3 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", + "_shasum": "4e0d56d6c9662fd31e43011c4b95aa49955421d3", + "_shrinkwrap": null, + "_spec": "require-uncached@^1.0.3", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/require-uncached/issues" + }, + "dependencies": { + "caller-path": "^0.1.0", + "resolve-from": "^1.0.0" + }, + "description": "Require a module bypassing the cache", + "devDependencies": { + "ava": "*", + "heapdump": "^0.3.7", + "xo": "^0.16.0" + }, + "directories": {}, + "dist": { + "shasum": "4e0d56d6c9662fd31e43011c4b95aa49955421d3", + "tarball": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "c56e296e0028357629ea27c61c591c67e818db5f", + "homepage": "https://github.com/sindresorhus/require-uncached#readme", + "keywords": [ + "require", + "cache", + "uncache", + "uncached", + "module", + "fresh", + "bypass" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "require-uncached", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/require-uncached.git" + }, + "scripts": { + "heapdump": "node heapdump.js", + "test": "xo && ava" + }, + "version": "1.0.3", + "xo": { + "rules": { + "import/no-dynamic-require": "off" + } + } +} diff --git a/node_modules/require-uncached/readme.md b/node_modules/require-uncached/readme.md new file mode 100644 index 0000000..baa6cc2 --- /dev/null +++ b/node_modules/require-uncached/readme.md @@ -0,0 +1,47 @@ +# require-uncached [![Build Status](https://travis-ci.org/sindresorhus/require-uncached.svg?branch=master)](https://travis-ci.org/sindresorhus/require-uncached) + +> Require a module bypassing the [cache](https://nodejs.org/api/modules.html#modules_caching) + +Useful for testing purposes when you need to freshly require a module. + + +## Install + +``` +$ npm install --save require-uncached +``` + + +## Usage + +```js +// foo.js +let i = 0; +module.exports = () => ++i; +``` + +```js +const requireUncached = require('require-uncached'); + +require('./foo')(); +//=> 1 + +require('./foo')(); +//=> 2 + +requireUncached('./foo')(); +//=> 1 + +requireUncached('./foo')(); +//=> 1 +``` + + +## Related + +- [clear-require](https://github.com/sindresorhus/clear-require) - Clear a module from the require cache + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/resolve-from/index.js b/node_modules/resolve-from/index.js new file mode 100644 index 0000000..9162f4a --- /dev/null +++ b/node_modules/resolve-from/index.js @@ -0,0 +1,19 @@ +'use strict'; +var path = require('path'); +var Module = require('module'); + +module.exports = function (fromDir, moduleId) { + if (typeof fromDir !== 'string' || typeof moduleId !== 'string') { + throw new TypeError('Expected `fromDir` and `moduleId` to be a string'); + } + + fromDir = path.resolve(fromDir); + + var fromFile = path.join(fromDir, 'noop.js'); + + return Module._resolveFilename(moduleId, { + id: fromFile, + filename: fromFile, + paths: Module._nodeModulePaths(fromDir) + }); +}; diff --git a/node_modules/resolve-from/license b/node_modules/resolve-from/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/resolve-from/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/resolve-from/package.json b/node_modules/resolve-from/package.json new file mode 100644 index 0000000..f98d4eb --- /dev/null +++ b/node_modules/resolve-from/package.json @@ -0,0 +1,98 @@ +{ + "_args": [ + [ + { + "raw": "resolve-from@^1.0.0", + "scope": null, + "escapedName": "resolve-from", + "name": "resolve-from", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\require-uncached" + ] + ], + "_from": "resolve-from@>=1.0.0 <2.0.0", + "_id": "resolve-from@1.0.1", + "_inCache": true, + "_location": "/resolve-from", + "_nodeVersion": "4.1.1", + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "2.14.4", + "_phantomChildren": {}, + "_requested": { + "raw": "resolve-from@^1.0.0", + "scope": null, + "escapedName": "resolve-from", + "name": "resolve-from", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/require-uncached" + ], + "_resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", + "_shasum": "26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226", + "_shrinkwrap": null, + "_spec": "resolve-from@^1.0.0", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\require-uncached", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/resolve-from/issues" + }, + "dependencies": {}, + "description": "Resolve the path of a module like require.resolve() but from a given path", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226", + "tarball": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "bae2cf1d66c616ad2eb27e0fe85a10ff0f2dfc92", + "homepage": "https://github.com/sindresorhus/resolve-from", + "keywords": [ + "require", + "resolve", + "path", + "module", + "from", + "like", + "path" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "resolve-from", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/resolve-from.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.1" +} diff --git a/node_modules/resolve-from/readme.md b/node_modules/resolve-from/readme.md new file mode 100644 index 0000000..80a240c --- /dev/null +++ b/node_modules/resolve-from/readme.md @@ -0,0 +1,56 @@ +# resolve-from [![Build Status](https://travis-ci.org/sindresorhus/resolve-from.svg?branch=master)](https://travis-ci.org/sindresorhus/resolve-from) + +> Resolve the path of a module like [`require.resolve()`](http://nodejs.org/api/globals.html#globals_require_resolve) but from a given path + + +## Install + +``` +$ npm install --save resolve-from +``` + + +## Usage + +```js +const resolveFrom = require('resolve-from'); + +// there's a file at `./foo/bar.js` + +resolveFrom('foo', './bar'); +//=> '/Users/sindresorhus/dev/test/foo/bar.js' +``` + + +## API + +### resolveFrom(fromDir, moduleId) + +#### fromDir + +Type: `string` + +The directory to resolve from. + +#### moduleId + +Type: `string` + +What you would use in `require()`. + + +## Tip + +Create a partial using a bound function if you want to require from the same `fromDir` multiple times: + +```js +const resolveFromFoo = resolveFrom.bind(null, 'foo'); + +resolveFromFoo('./bar'); +resolveFromFoo('./baz'); +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/rimraf/LICENSE b/node_modules/rimraf/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/rimraf/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/rimraf/README.md b/node_modules/rimraf/README.md new file mode 100644 index 0000000..423b8cf --- /dev/null +++ b/node_modules/rimraf/README.md @@ -0,0 +1,101 @@ +[![Build Status](https://travis-ci.org/isaacs/rimraf.svg?branch=master)](https://travis-ci.org/isaacs/rimraf) [![Dependency Status](https://david-dm.org/isaacs/rimraf.svg)](https://david-dm.org/isaacs/rimraf) [![devDependency Status](https://david-dm.org/isaacs/rimraf/dev-status.svg)](https://david-dm.org/isaacs/rimraf#info=devDependencies) + +The [UNIX command](http://en.wikipedia.org/wiki/Rm_(Unix)) `rm -rf` for node. + +Install with `npm install rimraf`, or just drop rimraf.js somewhere. + +## API + +`rimraf(f, [opts], callback)` + +The first parameter will be interpreted as a globbing pattern for files. If you +want to disable globbing you can do so with `opts.disableGlob` (defaults to +`false`). This might be handy, for instance, if you have filenames that contain +globbing wildcard characters. + +The callback will be called with an error if there is one. Certain +errors are handled for you: + +* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of + `opts.maxBusyTries` times before giving up, adding 100ms of wait + between each attempt. The default `maxBusyTries` is 3. +* `ENOENT` - If the file doesn't exist, rimraf will return + successfully, since your desired outcome is already the case. +* `EMFILE` - Since `readdir` requires opening a file descriptor, it's + possible to hit `EMFILE` if too many file descriptors are in use. + In the sync case, there's nothing to be done for this. But in the + async case, rimraf will gradually back off with timeouts up to + `opts.emfileWait` ms, which defaults to 1000. + +## options + +* unlink, chmod, stat, lstat, rmdir, readdir, + unlinkSync, chmodSync, statSync, lstatSync, rmdirSync, readdirSync + + In order to use a custom file system library, you can override + specific fs functions on the options object. + + If any of these functions are present on the options object, then + the supplied function will be used instead of the default fs + method. + + Sync methods are only relevant for `rimraf.sync()`, of course. + + For example: + + ```javascript + var myCustomFS = require('some-custom-fs') + + rimraf('some-thing', myCustomFS, callback) + ``` + +* maxBusyTries + + If an `EBUSY`, `ENOTEMPTY`, or `EPERM` error code is encountered + on Windows systems, then rimraf will retry with a linear backoff + wait of 100ms longer on each try. The default maxBusyTries is 3. + + Only relevant for async usage. + +* emfileWait + + If an `EMFILE` error is encountered, then rimraf will retry + repeatedly with a linear backoff of 1ms longer on each try, until + the timeout counter hits this max. The default limit is 1000. + + If you repeatedly encounter `EMFILE` errors, then consider using + [graceful-fs](http://npm.im/graceful-fs) in your program. + + Only relevant for async usage. + +* glob + + Set to `false` to disable [glob](http://npm.im/glob) pattern + matching. + + Set to an object to pass options to the glob module. The default + glob options are `{ nosort: true, silent: true }`. + + Glob version 6 is used in this module. + + Relevant for both sync and async usage. + +* disableGlob + + Set to any non-falsey value to disable globbing entirely. + (Equivalent to setting `glob: false`.) + +## rimraf.sync + +It can remove stuff synchronously, too. But that's not so good. Use +the async API. It's better. + +## CLI + +If installed with `npm install rimraf -g` it can be used as a global +command `rimraf [ ...]` which is useful for cross platform support. + +## mkdirp + +If you need to create a directory recursively, check out +[mkdirp](https://github.com/substack/node-mkdirp). diff --git a/node_modules/rimraf/bin.js b/node_modules/rimraf/bin.js new file mode 100644 index 0000000..0d1e17b --- /dev/null +++ b/node_modules/rimraf/bin.js @@ -0,0 +1,50 @@ +#!/usr/bin/env node + +var rimraf = require('./') + +var help = false +var dashdash = false +var noglob = false +var args = process.argv.slice(2).filter(function(arg) { + if (dashdash) + return !!arg + else if (arg === '--') + dashdash = true + else if (arg === '--no-glob' || arg === '-G') + noglob = true + else if (arg === '--glob' || arg === '-g') + noglob = false + else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/)) + help = true + else + return !!arg +}) + +if (help || args.length === 0) { + // If they didn't ask for help, then this is not a "success" + var log = help ? console.log : console.error + log('Usage: rimraf [ ...]') + log('') + log(' Deletes all files and folders at "path" recursively.') + log('') + log('Options:') + log('') + log(' -h, --help Display this usage info') + log(' -G, --no-glob Do not expand glob patterns in arguments') + log(' -g, --glob Expand glob patterns in arguments (default)') + process.exit(help ? 0 : 1) +} else + go(0) + +function go (n) { + if (n >= args.length) + return + var options = {} + if (noglob) + options = { glob: false } + rimraf(args[n], options, function (er) { + if (er) + throw er + go(n+1) + }) +} diff --git a/node_modules/rimraf/package.json b/node_modules/rimraf/package.json new file mode 100644 index 0000000..2984cb2 --- /dev/null +++ b/node_modules/rimraf/package.json @@ -0,0 +1,100 @@ +{ + "_args": [ + [ + { + "raw": "rimraf@^2.2.8", + "scope": null, + "escapedName": "rimraf", + "name": "rimraf", + "rawSpec": "^2.2.8", + "spec": ">=2.2.8 <3.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\del" + ] + ], + "_from": "rimraf@>=2.2.8 <3.0.0", + "_id": "rimraf@2.6.2", + "_inCache": true, + "_location": "/rimraf", + "_nodeVersion": "8.4.0", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/rimraf-2.6.2.tgz_1505148366963_0.392012212658301" + }, + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "5.4.1", + "_phantomChildren": {}, + "_requested": { + "raw": "rimraf@^2.2.8", + "scope": null, + "escapedName": "rimraf", + "name": "rimraf", + "rawSpec": "^2.2.8", + "spec": ">=2.2.8 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/del" + ], + "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "_shasum": "2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36", + "_shrinkwrap": null, + "_spec": "rimraf@^2.2.8", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\del", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bin": { + "rimraf": "./bin.js" + }, + "bugs": { + "url": "https://github.com/isaacs/rimraf/issues" + }, + "dependencies": { + "glob": "^7.0.5" + }, + "description": "A deep deletion module for node (like `rm -rf`)", + "devDependencies": { + "mkdirp": "^0.5.1", + "tap": "^10.1.2" + }, + "directories": {}, + "dist": { + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "shasum": "2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36", + "tarball": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz" + }, + "files": [ + "LICENSE", + "README.md", + "bin.js", + "rimraf.js" + ], + "gitHead": "79b933fb362b2c51bedfa448be848e1d7ed32d7e", + "homepage": "https://github.com/isaacs/rimraf#readme", + "license": "ISC", + "main": "rimraf.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "rimraf", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/rimraf.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "2.6.2" +} diff --git a/node_modules/rimraf/rimraf.js b/node_modules/rimraf/rimraf.js new file mode 100644 index 0000000..e80dd10 --- /dev/null +++ b/node_modules/rimraf/rimraf.js @@ -0,0 +1,364 @@ +module.exports = rimraf +rimraf.sync = rimrafSync + +var assert = require("assert") +var path = require("path") +var fs = require("fs") +var glob = require("glob") +var _0666 = parseInt('666', 8) + +var defaultGlobOpts = { + nosort: true, + silent: true +} + +// for EMFILE handling +var timeout = 0 + +var isWindows = (process.platform === "win32") + +function defaults (options) { + var methods = [ + 'unlink', + 'chmod', + 'stat', + 'lstat', + 'rmdir', + 'readdir' + ] + methods.forEach(function(m) { + options[m] = options[m] || fs[m] + m = m + 'Sync' + options[m] = options[m] || fs[m] + }) + + options.maxBusyTries = options.maxBusyTries || 3 + options.emfileWait = options.emfileWait || 1000 + if (options.glob === false) { + options.disableGlob = true + } + options.disableGlob = options.disableGlob || false + options.glob = options.glob || defaultGlobOpts +} + +function rimraf (p, options, cb) { + if (typeof options === 'function') { + cb = options + options = {} + } + + assert(p, 'rimraf: missing path') + assert.equal(typeof p, 'string', 'rimraf: path should be a string') + assert.equal(typeof cb, 'function', 'rimraf: callback function required') + assert(options, 'rimraf: invalid options argument provided') + assert.equal(typeof options, 'object', 'rimraf: options should be object') + + defaults(options) + + var busyTries = 0 + var errState = null + var n = 0 + + if (options.disableGlob || !glob.hasMagic(p)) + return afterGlob(null, [p]) + + options.lstat(p, function (er, stat) { + if (!er) + return afterGlob(null, [p]) + + glob(p, options.glob, afterGlob) + }) + + function next (er) { + errState = errState || er + if (--n === 0) + cb(errState) + } + + function afterGlob (er, results) { + if (er) + return cb(er) + + n = results.length + if (n === 0) + return cb() + + results.forEach(function (p) { + rimraf_(p, options, function CB (er) { + if (er) { + if ((er.code === "EBUSY" || er.code === "ENOTEMPTY" || er.code === "EPERM") && + busyTries < options.maxBusyTries) { + busyTries ++ + var time = busyTries * 100 + // try again, with the same exact callback as this one. + return setTimeout(function () { + rimraf_(p, options, CB) + }, time) + } + + // this one won't happen if graceful-fs is used. + if (er.code === "EMFILE" && timeout < options.emfileWait) { + return setTimeout(function () { + rimraf_(p, options, CB) + }, timeout ++) + } + + // already gone + if (er.code === "ENOENT") er = null + } + + timeout = 0 + next(er) + }) + }) + } +} + +// Two possible strategies. +// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR +// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR +// +// Both result in an extra syscall when you guess wrong. However, there +// are likely far more normal files in the world than directories. This +// is based on the assumption that a the average number of files per +// directory is >= 1. +// +// If anyone ever complains about this, then I guess the strategy could +// be made configurable somehow. But until then, YAGNI. +function rimraf_ (p, options, cb) { + assert(p) + assert(options) + assert(typeof cb === 'function') + + // sunos lets the root user unlink directories, which is... weird. + // so we have to lstat here and make sure it's not a dir. + options.lstat(p, function (er, st) { + if (er && er.code === "ENOENT") + return cb(null) + + // Windows can EPERM on stat. Life is suffering. + if (er && er.code === "EPERM" && isWindows) + fixWinEPERM(p, options, er, cb) + + if (st && st.isDirectory()) + return rmdir(p, options, er, cb) + + options.unlink(p, function (er) { + if (er) { + if (er.code === "ENOENT") + return cb(null) + if (er.code === "EPERM") + return (isWindows) + ? fixWinEPERM(p, options, er, cb) + : rmdir(p, options, er, cb) + if (er.code === "EISDIR") + return rmdir(p, options, er, cb) + } + return cb(er) + }) + }) +} + +function fixWinEPERM (p, options, er, cb) { + assert(p) + assert(options) + assert(typeof cb === 'function') + if (er) + assert(er instanceof Error) + + options.chmod(p, _0666, function (er2) { + if (er2) + cb(er2.code === "ENOENT" ? null : er) + else + options.stat(p, function(er3, stats) { + if (er3) + cb(er3.code === "ENOENT" ? null : er) + else if (stats.isDirectory()) + rmdir(p, options, er, cb) + else + options.unlink(p, cb) + }) + }) +} + +function fixWinEPERMSync (p, options, er) { + assert(p) + assert(options) + if (er) + assert(er instanceof Error) + + try { + options.chmodSync(p, _0666) + } catch (er2) { + if (er2.code === "ENOENT") + return + else + throw er + } + + try { + var stats = options.statSync(p) + } catch (er3) { + if (er3.code === "ENOENT") + return + else + throw er + } + + if (stats.isDirectory()) + rmdirSync(p, options, er) + else + options.unlinkSync(p) +} + +function rmdir (p, options, originalEr, cb) { + assert(p) + assert(options) + if (originalEr) + assert(originalEr instanceof Error) + assert(typeof cb === 'function') + + // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) + // if we guessed wrong, and it's not a directory, then + // raise the original error. + options.rmdir(p, function (er) { + if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) + rmkids(p, options, cb) + else if (er && er.code === "ENOTDIR") + cb(originalEr) + else + cb(er) + }) +} + +function rmkids(p, options, cb) { + assert(p) + assert(options) + assert(typeof cb === 'function') + + options.readdir(p, function (er, files) { + if (er) + return cb(er) + var n = files.length + if (n === 0) + return options.rmdir(p, cb) + var errState + files.forEach(function (f) { + rimraf(path.join(p, f), options, function (er) { + if (errState) + return + if (er) + return cb(errState = er) + if (--n === 0) + options.rmdir(p, cb) + }) + }) + }) +} + +// this looks simpler, and is strictly *faster*, but will +// tie up the JavaScript thread and fail on excessively +// deep directory trees. +function rimrafSync (p, options) { + options = options || {} + defaults(options) + + assert(p, 'rimraf: missing path') + assert.equal(typeof p, 'string', 'rimraf: path should be a string') + assert(options, 'rimraf: missing options') + assert.equal(typeof options, 'object', 'rimraf: options should be object') + + var results + + if (options.disableGlob || !glob.hasMagic(p)) { + results = [p] + } else { + try { + options.lstatSync(p) + results = [p] + } catch (er) { + results = glob.sync(p, options.glob) + } + } + + if (!results.length) + return + + for (var i = 0; i < results.length; i++) { + var p = results[i] + + try { + var st = options.lstatSync(p) + } catch (er) { + if (er.code === "ENOENT") + return + + // Windows can EPERM on stat. Life is suffering. + if (er.code === "EPERM" && isWindows) + fixWinEPERMSync(p, options, er) + } + + try { + // sunos lets the root user unlink directories, which is... weird. + if (st && st.isDirectory()) + rmdirSync(p, options, null) + else + options.unlinkSync(p) + } catch (er) { + if (er.code === "ENOENT") + return + if (er.code === "EPERM") + return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er) + if (er.code !== "EISDIR") + throw er + + rmdirSync(p, options, er) + } + } +} + +function rmdirSync (p, options, originalEr) { + assert(p) + assert(options) + if (originalEr) + assert(originalEr instanceof Error) + + try { + options.rmdirSync(p) + } catch (er) { + if (er.code === "ENOENT") + return + if (er.code === "ENOTDIR") + throw originalEr + if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") + rmkidsSync(p, options) + } +} + +function rmkidsSync (p, options) { + assert(p) + assert(options) + options.readdirSync(p).forEach(function (f) { + rimrafSync(path.join(p, f), options) + }) + + // We only end up here once we got ENOTEMPTY at least once, and + // at this point, we are guaranteed to have removed all the kids. + // So, we know that it won't be ENOENT or ENOTDIR or anything else. + // try really hard to delete stuff on windows, because it has a + // PROFOUNDLY annoying habit of not closing handles promptly when + // files are deleted, resulting in spurious ENOTEMPTY errors. + var retries = isWindows ? 100 : 1 + var i = 0 + do { + var threw = true + try { + var ret = options.rmdirSync(p, options) + threw = false + return ret + } finally { + if (++i < retries && threw) + continue + } + } while (true) +} diff --git a/node_modules/run-async/LICENSE b/node_modules/run-async/LICENSE new file mode 100644 index 0000000..e895e99 --- /dev/null +++ b/node_modules/run-async/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Simon Boudrias + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/run-async/README.md b/node_modules/run-async/README.md new file mode 100644 index 0000000..8eb62c2 --- /dev/null +++ b/node_modules/run-async/README.md @@ -0,0 +1,79 @@ +Run Async +========= + +[![npm](https://badge.fury.io/js/run-async.svg)](http://badge.fury.io/js/run-async) [![tests](https://travis-ci.org/SBoudrias/run-async.svg?branch=master)](http://travis-ci.org/SBoudrias/run-async) [![dependencies](https://david-dm.org/SBoudrias/run-async.svg?theme=shields.io)](https://david-dm.org/SBoudrias/run-async) + +Utility method to run a function either synchronously or asynchronously using a series of common patterns. This is useful for library author accepting sync or async functions as parameter. `runAsync` will always run them as an async method, and normalize the multiple signature. + +Installation +========= + +```bash +npm install --save run-async +``` + +Usage +========= + +Here's a simple example print the function results and three options a user can provide a function. + +```js +var runAsync = require('run-async'); + +var printAfter = function (func) { + var cb = function (err, returnValue) { + console.log(returnValue); + }; + runAsync(func, cb)(/* arguments for func */); +}; +``` + +#### Using `this.async` +```js +printAfter(function () { + var done = this.async(); + + setTimeout(function () { + done(null, 'done running with callback'); + }, 10); +}); +``` + +#### Returning a promise +```js +printAfter(function () { + return new Promise(function (resolve, reject) { + resolve('done running with promises'); + }); +}); +``` + +#### Synchronous function +```js +printAfter(function () { + return 'done running sync function'; +}); +``` + +### runAsync.cb + +`runAsync.cb` supports all the function types that `runAsync` does and additionally a traditional **callback as the last argument** signature: + +```js +var runAsync = require('run-async'); + +// IMPORTANT: The wrapped function must have a fixed number of parameters. +runAsync.cb(function(a, b, cb) { + cb(null, a + b); +}, function(err, result) { + console.log(result) +})(1, 2) +``` + +If your version of node support Promises natively (node >= 0.12), `runAsync` will return a promise. Example: `runAsync(func)(arg1, arg2).then(cb)` + +Licence +======== + +Copyright (c) 2014 Simon Boudrias (twitter: @vaxilart) +Licensed under the MIT license. diff --git a/node_modules/run-async/index.js b/node_modules/run-async/index.js new file mode 100644 index 0000000..f623326 --- /dev/null +++ b/node_modules/run-async/index.js @@ -0,0 +1,61 @@ +'use strict'; + +var isPromise = require('is-promise'); + +/** + * Return a function that will run a function asynchronously or synchronously + * + * example: + * runAsync(wrappedFunction, callback)(...args); + * + * @param {Function} func Function to run + * @param {Function} cb Callback function passed the `func` returned value + * @return {Function(arguments)} Arguments to pass to `func`. This function will in turn + * return a Promise (Node >= 0.12) or call the callbacks. + */ + +var runAsync = module.exports = function (func, cb) { + cb = cb || function () {}; + + return function () { + var async = false; + var args = arguments; + + var promise = new Promise(function (resolve, reject) { + var answer = func.apply({ + async: function () { + async = true; + return function (err, value) { + if (err) { + reject(err); + } else { + resolve(value); + } + }; + } + }, Array.prototype.slice.call(args)); + + if (!async) { + if (isPromise(answer)) { + answer.then(resolve, reject); + } else { + resolve(answer); + } + } + }); + + promise.then(cb.bind(null, null), cb); + + return promise; + } +}; + +runAsync.cb = function (func, cb) { + return runAsync(function () { + var args = Array.prototype.slice.call(arguments); + if (args.length === func.length - 1) { + args.push(this.async()); + } + return func.apply(this, args); + }, cb); +}; diff --git a/node_modules/run-async/package.json b/node_modules/run-async/package.json new file mode 100644 index 0000000..6f4c26b --- /dev/null +++ b/node_modules/run-async/package.json @@ -0,0 +1,99 @@ +{ + "_args": [ + [ + { + "raw": "run-async@^2.2.0", + "scope": null, + "escapedName": "run-async", + "name": "run-async", + "rawSpec": "^2.2.0", + "spec": ">=2.2.0 <3.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\inquirer" + ] + ], + "_from": "run-async@>=2.2.0 <3.0.0", + "_id": "run-async@2.3.0", + "_inCache": true, + "_location": "/run-async", + "_nodeVersion": "7.0.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/run-async-2.3.0.tgz_1480655904296_0.6874290609266609" + }, + "_npmUser": { + "name": "sboudrias", + "email": "admin@simonboudrias.com" + }, + "_npmVersion": "3.10.8", + "_phantomChildren": {}, + "_requested": { + "raw": "run-async@^2.2.0", + "scope": null, + "escapedName": "run-async", + "name": "run-async", + "rawSpec": "^2.2.0", + "spec": ">=2.2.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/inquirer" + ], + "_resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "_shasum": "0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0", + "_shrinkwrap": null, + "_spec": "run-async@^2.2.0", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\inquirer", + "author": { + "name": "Simon Boudrias", + "email": "admin@simonboudrias.com" + }, + "bugs": { + "url": "https://github.com/sboudrias/run-async/issues" + }, + "dependencies": { + "is-promise": "^2.1.0" + }, + "description": "Utility method to run function either synchronously or asynchronously using the common `this.async()` style.", + "devDependencies": { + "mocha": "^3.1.2" + }, + "directories": {}, + "dist": { + "shasum": "0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0", + "tarball": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz" + }, + "engines": { + "node": ">=0.12.0" + }, + "files": [ + "index.js" + ], + "gitHead": "23767c9d7eaf6a6bb1241fc9e12776685258c50e", + "homepage": "https://github.com/sboudrias/run-async#readme", + "keywords": [ + "flow", + "flow-control", + "async" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "sboudrias", + "email": "admin@simonboudrias.com" + } + ], + "name": "run-async", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sboudrias/run-async.git" + }, + "scripts": { + "test": "mocha -R spec" + }, + "version": "2.3.0" +} diff --git a/node_modules/rx-lite-aggregates/package.json b/node_modules/rx-lite-aggregates/package.json new file mode 100644 index 0000000..1453cc4 --- /dev/null +++ b/node_modules/rx-lite-aggregates/package.json @@ -0,0 +1,102 @@ +{ + "_args": [ + [ + { + "raw": "rx-lite-aggregates@^4.0.8", + "scope": null, + "escapedName": "rx-lite-aggregates", + "name": "rx-lite-aggregates", + "rawSpec": "^4.0.8", + "spec": ">=4.0.8 <5.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\inquirer" + ] + ], + "_from": "rx-lite-aggregates@>=4.0.8 <5.0.0", + "_id": "rx-lite-aggregates@4.0.8", + "_inCache": true, + "_location": "/rx-lite-aggregates", + "_nodeVersion": "5.5.0", + "_npmOperationalInternal": { + "host": "packages-6-west.internal.npmjs.com", + "tmp": "tmp/rx-lite-aggregates-4.0.8.tgz_1455670078263_0.4768166351132095" + }, + "_npmUser": { + "name": "mattpodwysocki", + "email": "matthew.podwysocki@gmail.com" + }, + "_npmVersion": "3.7.1", + "_phantomChildren": {}, + "_requested": { + "raw": "rx-lite-aggregates@^4.0.8", + "scope": null, + "escapedName": "rx-lite-aggregates", + "name": "rx-lite-aggregates", + "rawSpec": "^4.0.8", + "spec": ">=4.0.8 <5.0.0", + "type": "range" + }, + "_requiredBy": [ + "/inquirer" + ], + "_resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", + "_shasum": "753b87a89a11c95467c4ac1626c4efc4e05c67be", + "_shrinkwrap": null, + "_spec": "rx-lite-aggregates@^4.0.8", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\inquirer", + "author": { + "name": "Cloud Programmability Team", + "url": "https://github.com/Reactive-Extensions/RxJS/blob/master/authors.txt" + }, + "browser": { + "index.js": "rx.lite.aggregates.js" + }, + "bugs": { + "url": "https://github.com/Reactive-Extensions/RxJS/issues" + }, + "dependencies": { + "rx-lite": "*" + }, + "description": "Lightweight library with aggregate functions for composing asynchronous and event-based operations in JavaScript", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "753b87a89a11c95467c4ac1626c4efc4e05c67be", + "tarball": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz" + }, + "homepage": "https://github.com/Reactive-Extensions/RxJS", + "jam": { + "main": "rx.lite.aggregates.js" + }, + "keywords": [ + "React", + "Reactive", + "Events", + "Rx", + "RxJS" + ], + "licenses": [ + { + "type": "Apache License, Version 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + } + ], + "main": "rx.lite.aggregates.js", + "maintainers": [ + { + "name": "mattpodwysocki", + "email": "matthew.podwysocki@gmail.com" + } + ], + "name": "rx-lite-aggregates", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/Reactive-Extensions/RxJS.git" + }, + "scripts": {}, + "title": "Reactive Extensions for JavaScript (RxJS) Aggregates", + "version": "4.0.8" +} diff --git a/node_modules/rx-lite-aggregates/readme.md b/node_modules/rx-lite-aggregates/readme.md new file mode 100644 index 0000000..ed55c92 --- /dev/null +++ b/node_modules/rx-lite-aggregates/readme.md @@ -0,0 +1,85 @@ +# RxJS Aggregates Module # + +The Reactive Extensions for JavaScript has a number of aggregation operators including those you might already know from the Array#extras and the upcoming ES6 standard such as `reduce`, `find` and `findIndex`. This module is used exclusively for aggregation operations used on finite observable sequences. In addition to the aforementioned operators, there are many useful operators such as `count`, `sum`, `average` and determining whether two sequences are equal via the `sequenceEqual` method. This requires `rx.lite.js` from the [`rx-lite`](https://www.npmjs.com/package/rx-lite) NPM module. + +## Getting Started + +There are a number of ways to get started with RxJS. + +### Installing with [NPM](https://npmjs.org/) + +```bash` +$ npm install rx-lite-aggregates +$ npm install -g rx-lite-aggregates +``` + +### Using with Node.js and Ringo.js + +```js +var Rx = require('rx-lite-aggregates'); +``` + +### In a Browser: + +```html + + + +``` + +## Included Observable Operators ## + +### `Observable Instance Methods` +- [`aggregate`](../../doc/api/core/operators/reduce.md) +- [`all`](../../doc/api/core/operators/every.md) +- [`any`](../../doc/api/core/operators/some.md) +- [`average`](../../doc/api/core/operators/average.md) +- [`includes`](../../doc/api/core/operators/includes.md) +- [`count`](../../doc/api/core/operators/count.md) +- [`elementAt`](../../doc/api/core/operators/elementat.md) +- [`elementAtOrDefault`](../../doc/api/core/operators/elementatordefault.md) +- [`every`](../../doc/api/core/operators/every.md) +- [`find`](../../doc/api/core/operators/find.md) +- [`findIndex`](../../doc/api/core/operators/findindex.md) +- [`first`](../../doc/api/core/operators/first.md) +- [`firstOrDefault`](../../doc/api/core/operators/firstordefault.md) +- [`indexOf`](../../doc/api/core/operators/indexof.md) +- [`isEmpty`](../../doc/api/core/operators/isempty.md) +- [`last`](../../doc/api/core/operators/last.md) +- [`lastOrDefault`](../../doc/api/core/operators/lastordefault.md) +- [`max`](../../doc/api/core/operators/max.md) +- [`maxBy`](../../doc/api/core/operators/maxby.md) +- [`min`](../../doc/api/core/operators/min.md) +- [`minBy`](../../doc/api/core/operators/minby.md) +- [`reduce`](../../doc/api/core/operators/reduce.md) +- [`sequenceEqual`](../../doc/api/core/operators/sequenceequal.md) +- [`single`](../../doc/api/core/operators/single.md) +- [`singleOrDefault`](../../doc/api/core/operators/singleordefault.md) +- [`some`](../../doc/api/core/operators/some.md) +- [`sum`](../../doc/api/core/operators/sum.md) +- [`toMap`](../../doc/api/core/operators/tomap.md) +- [`toSet`](../../doc/api/core/operators/toset.md) + +## Contributing ## + +There are lots of ways to contribute to the project, and we appreciate our [contributors](https://github.com/Reactive-Extensions/RxJS/wiki/Contributors). If you wish to contribute, check out our [style guide]((https://github.com/Reactive-Extensions/RxJS/tree/master/doc/contributing)). + +You can contribute by reviewing and sending feedback on code checkins, suggesting and trying out new features as they are implemented, submit bugs and help us verify fixes as they are checked in, as well as submit code fixes or code contributions of your own. Note that all code submissions will be rigorously reviewed and tested by the Rx Team, and only those that meet an extremely high bar for both quality and design/roadmap appropriateness will be merged into the source. + +## License ## + +Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. +Microsoft Open Technologies would like to thank its contributors, a list +of whom are at https://github.com/Reactive-Extensions/RxJS/wiki/Contributors. + +Licensed under the Apache License, Version 2.0 (the "License"); you +may not use this file except in compliance with the License. You may +obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing permissions +and limitations under the License. diff --git a/node_modules/rx-lite-aggregates/rx.lite.aggregates.js b/node_modules/rx-lite-aggregates/rx.lite.aggregates.js new file mode 100644 index 0000000..7deba22 --- /dev/null +++ b/node_modules/rx-lite-aggregates/rx.lite.aggregates.js @@ -0,0 +1,1365 @@ +// Copyright (c) Microsoft, All rights reserved. See License.txt in the project root for license information. + +;(function (factory) { + var objectTypes = { + 'function': true, + 'object': true + }; + + function checkGlobal(value) { + return (value && value.Object === Object) ? value : null; + } + + var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null; + var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null; + var freeGlobal = checkGlobal(freeExports && freeModule && typeof global === 'object' && global); + var freeSelf = checkGlobal(objectTypes[typeof self] && self); + var freeWindow = checkGlobal(objectTypes[typeof window] && window); + var moduleExports = (freeModule && freeModule.exports === freeExports) ? freeExports : null; + var thisGlobal = checkGlobal(objectTypes[typeof this] && this); + var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')(); + + // Because of build optimizers + if (typeof define === 'function' && define.amd) { + define(['./rx.lite'], function (Rx, exports) { + return factory(root, exports, Rx); + }); + } else if (typeof module === 'object' && module && module.exports === freeExports) { + module.exports = factory(root, module.exports, require('rx-lite')); + } else { + root.Rx = factory(root, {}, root.Rx); + } +}.call(this, function (root, exp, Rx, undefined) { + + // References + var Observable = Rx.Observable, + observableProto = Observable.prototype, + BinaryDisposable = Rx.BinaryDisposable, + AnonymousObservable = Rx.AnonymousObservable, + AbstractObserver = Rx.internals.AbstractObserver, + disposableEmpty = Rx.Disposable.empty, + helpers = Rx.helpers, + defaultComparer = helpers.defaultComparer, + identity = helpers.identity, + defaultSubComparer = helpers.defaultSubComparer, + isFunction = helpers.isFunction, + isPromise = helpers.isPromise, + isArrayLike = helpers.isArrayLike, + isIterable = helpers.isIterable, + inherits = Rx.internals.inherits, + observableFromPromise = Observable.fromPromise, + observableFrom = Observable.from, + bindCallback = Rx.internals.bindCallback, + EmptyError = Rx.EmptyError, + ObservableBase = Rx.ObservableBase, + ArgumentOutOfRangeError = Rx.ArgumentOutOfRangeError; + + var errorObj = {e: {}}; + + function tryCatcherGen(tryCatchTarget) { + return function tryCatcher() { + try { + return tryCatchTarget.apply(this, arguments); + } catch (e) { + errorObj.e = e; + return errorObj; + } + }; + } + + var tryCatch = Rx.internals.tryCatch = function tryCatch(fn) { + if (!isFunction(fn)) { throw new TypeError('fn must be a function'); } + return tryCatcherGen(fn); + }; + + function thrower(e) { + throw e; + } + + var ExtremaByObservable = (function (__super__) { + inherits(ExtremaByObservable, __super__); + function ExtremaByObservable(source, k, c) { + this.source = source; + this._k = k; + this._c = c; + __super__.call(this); + } + + ExtremaByObservable.prototype.subscribeCore = function (o) { + return this.source.subscribe(new ExtremaByObserver(o, this._k, this._c)); + }; + + return ExtremaByObservable; + }(ObservableBase)); + + var ExtremaByObserver = (function (__super__) { + inherits(ExtremaByObserver, __super__); + function ExtremaByObserver(o, k, c) { + this._o = o; + this._k = k; + this._c = c; + this._v = null; + this._hv = false; + this._l = []; + __super__.call(this); + } + + ExtremaByObserver.prototype.next = function (x) { + var key = tryCatch(this._k)(x); + if (key === errorObj) { return this._o.onError(key.e); } + var comparison = 0; + if (!this._hv) { + this._hv = true; + this._v = key; + } else { + comparison = tryCatch(this._c)(key, this._v); + if (comparison === errorObj) { return this._o.onError(comparison.e); } + } + if (comparison > 0) { + this._v = key; + this._l = []; + } + if (comparison >= 0) { this._l.push(x); } + }; + + ExtremaByObserver.prototype.error = function (e) { + this._o.onError(e); + }; + + ExtremaByObserver.prototype.completed = function () { + this._o.onNext(this._l); + this._o.onCompleted(); + }; + + return ExtremaByObserver; + }(AbstractObserver)); + + function firstOnly(x) { + if (x.length === 0) { throw new EmptyError(); } + return x[0]; + } + + var ReduceObservable = (function(__super__) { + inherits(ReduceObservable, __super__); + function ReduceObservable(source, accumulator, hasSeed, seed) { + this.source = source; + this.accumulator = accumulator; + this.hasSeed = hasSeed; + this.seed = seed; + __super__.call(this); + } + + ReduceObservable.prototype.subscribeCore = function(observer) { + return this.source.subscribe(new ReduceObserver(observer,this)); + }; + + return ReduceObservable; + }(ObservableBase)); + + var ReduceObserver = (function (__super__) { + inherits(ReduceObserver, __super__); + function ReduceObserver(o, parent) { + this._o = o; + this._p = parent; + this._fn = parent.accumulator; + this._hs = parent.hasSeed; + this._s = parent.seed; + this._ha = false; + this._a = null; + this._hv = false; + this._i = 0; + __super__.call(this); + } + + ReduceObserver.prototype.next = function (x) { + !this._hv && (this._hv = true); + if (this._ha) { + this._a = tryCatch(this._fn)(this._a, x, this._i, this._p); + } else { + this._a = this._hs ? tryCatch(this._fn)(this._s, x, this._i, this._p) : x; + this._ha = true; + } + if (this._a === errorObj) { return this._o.onError(this._a.e); } + this._i++; + }; + + ReduceObserver.prototype.error = function (e) { + this._o.onError(e); + }; + + ReduceObserver.prototype.completed = function () { + this._hv && this._o.onNext(this._a); + !this._hv && this._hs && this._o.onNext(this._s); + !this._hv && !this._hs && this._o.onError(new EmptyError()); + this._o.onCompleted(); + }; + + return ReduceObserver; + }(AbstractObserver)); + + /** + * Applies an accumulator function over an observable sequence, returning the result of the aggregation as a single element in the result sequence. The specified seed value is used as the initial accumulator value. + * For aggregation behavior with incremental intermediate results, see Observable.scan. + * @param {Function} accumulator An accumulator function to be invoked on each element. + * @param {Any} [seed] The initial accumulator value. + * @returns {Observable} An observable sequence containing a single element with the final accumulator value. + */ + observableProto.reduce = function () { + var hasSeed = false, seed, accumulator = arguments[0]; + if (arguments.length === 2) { + hasSeed = true; + seed = arguments[1]; + } + return new ReduceObservable(this, accumulator, hasSeed, seed); + }; + + var SomeObservable = (function (__super__) { + inherits(SomeObservable, __super__); + function SomeObservable(source, fn) { + this.source = source; + this._fn = fn; + __super__.call(this); + } + + SomeObservable.prototype.subscribeCore = function (o) { + return this.source.subscribe(new SomeObserver(o, this._fn, this.source)); + }; + + return SomeObservable; + }(ObservableBase)); + + var SomeObserver = (function (__super__) { + inherits(SomeObserver, __super__); + + function SomeObserver(o, fn, s) { + this._o = o; + this._fn = fn; + this._s = s; + this._i = 0; + __super__.call(this); + } + + SomeObserver.prototype.next = function (x) { + var result = tryCatch(this._fn)(x, this._i++, this._s); + if (result === errorObj) { return this._o.onError(result.e); } + if (Boolean(result)) { + this._o.onNext(true); + this._o.onCompleted(); + } + }; + SomeObserver.prototype.error = function (e) { this._o.onError(e); }; + SomeObserver.prototype.completed = function () { + this._o.onNext(false); + this._o.onCompleted(); + }; + + return SomeObserver; + }(AbstractObserver)); + + /** + * Determines whether any element of an observable sequence satisfies a condition if present, else if any items are in the sequence. + * @param {Function} [predicate] A function to test each element for a condition. + * @returns {Observable} An observable sequence containing a single element determining whether any elements in the source sequence pass the test in the specified predicate if given, else if any items are in the sequence. + */ + observableProto.some = function (predicate, thisArg) { + var fn = bindCallback(predicate, thisArg, 3); + return new SomeObservable(this, fn); + }; + + var IsEmptyObservable = (function (__super__) { + inherits(IsEmptyObservable, __super__); + function IsEmptyObservable(source) { + this.source = source; + __super__.call(this); + } + + IsEmptyObservable.prototype.subscribeCore = function (o) { + return this.source.subscribe(new IsEmptyObserver(o)); + }; + + return IsEmptyObservable; + }(ObservableBase)); + + var IsEmptyObserver = (function(__super__) { + inherits(IsEmptyObserver, __super__); + function IsEmptyObserver(o) { + this._o = o; + __super__.call(this); + } + + IsEmptyObserver.prototype.next = function () { + this._o.onNext(false); + this._o.onCompleted(); + }; + IsEmptyObserver.prototype.error = function (e) { this._o.onError(e); }; + IsEmptyObserver.prototype.completed = function () { + this._o.onNext(true); + this._o.onCompleted(); + }; + + return IsEmptyObserver; + }(AbstractObserver)); + + /** + * Determines whether an observable sequence is empty. + * @returns {Observable} An observable sequence containing a single element determining whether the source sequence is empty. + */ + observableProto.isEmpty = function () { + return new IsEmptyObservable(this); + }; + + var EveryObservable = (function (__super__) { + inherits(EveryObservable, __super__); + function EveryObservable(source, fn) { + this.source = source; + this._fn = fn; + __super__.call(this); + } + + EveryObservable.prototype.subscribeCore = function (o) { + return this.source.subscribe(new EveryObserver(o, this._fn, this.source)); + }; + + return EveryObservable; + }(ObservableBase)); + + var EveryObserver = (function (__super__) { + inherits(EveryObserver, __super__); + + function EveryObserver(o, fn, s) { + this._o = o; + this._fn = fn; + this._s = s; + this._i = 0; + __super__.call(this); + } + + EveryObserver.prototype.next = function (x) { + var result = tryCatch(this._fn)(x, this._i++, this._s); + if (result === errorObj) { return this._o.onError(result.e); } + if (!Boolean(result)) { + this._o.onNext(false); + this._o.onCompleted(); + } + }; + EveryObserver.prototype.error = function (e) { this._o.onError(e); }; + EveryObserver.prototype.completed = function () { + this._o.onNext(true); + this._o.onCompleted(); + }; + + return EveryObserver; + }(AbstractObserver)); + + /** + * Determines whether all elements of an observable sequence satisfy a condition. + * @param {Function} [predicate] A function to test each element for a condition. + * @param {Any} [thisArg] Object to use as this when executing callback. + * @returns {Observable} An observable sequence containing a single element determining whether all elements in the source sequence pass the test in the specified predicate. + */ + observableProto.every = function (predicate, thisArg) { + var fn = bindCallback(predicate, thisArg, 3); + return new EveryObservable(this, fn); + }; + + var IncludesObservable = (function (__super__) { + inherits(IncludesObservable, __super__); + function IncludesObservable(source, elem, idx) { + var n = +idx || 0; + Math.abs(n) === Infinity && (n = 0); + + this.source = source; + this._elem = elem; + this._n = n; + __super__.call(this); + } + + IncludesObservable.prototype.subscribeCore = function (o) { + if (this._n < 0) { + o.onNext(false); + o.onCompleted(); + return disposableEmpty; + } + + return this.source.subscribe(new IncludesObserver(o, this._elem, this._n)); + }; + + return IncludesObservable; + }(ObservableBase)); + + var IncludesObserver = (function (__super__) { + inherits(IncludesObserver, __super__); + function IncludesObserver(o, elem, n) { + this._o = o; + this._elem = elem; + this._n = n; + this._i = 0; + __super__.call(this); + } + + function comparer(a, b) { + return (a === 0 && b === 0) || (a === b || (isNaN(a) && isNaN(b))); + } + + IncludesObserver.prototype.next = function (x) { + if (this._i++ >= this._n && comparer(x, this._elem)) { + this._o.onNext(true); + this._o.onCompleted(); + } + }; + IncludesObserver.prototype.error = function (e) { this._o.onError(e); }; + IncludesObserver.prototype.completed = function () { this._o.onNext(false); this._o.onCompleted(); }; + + return IncludesObserver; + }(AbstractObserver)); + + /** + * Determines whether an observable sequence includes a specified element with an optional equality comparer. + * @param searchElement The value to locate in the source sequence. + * @param {Number} [fromIndex] An equality comparer to compare elements. + * @returns {Observable} An observable sequence containing a single element determining whether the source sequence includes an element that has the specified value from the given index. + */ + observableProto.includes = function (searchElement, fromIndex) { + return new IncludesObservable(this, searchElement, fromIndex); + }; + + var CountObservable = (function (__super__) { + inherits(CountObservable, __super__); + function CountObservable(source, fn) { + this.source = source; + this._fn = fn; + __super__.call(this); + } + + CountObservable.prototype.subscribeCore = function (o) { + return this.source.subscribe(new CountObserver(o, this._fn, this.source)); + }; + + return CountObservable; + }(ObservableBase)); + + var CountObserver = (function (__super__) { + inherits(CountObserver, __super__); + + function CountObserver(o, fn, s) { + this._o = o; + this._fn = fn; + this._s = s; + this._i = 0; + this._c = 0; + __super__.call(this); + } + + CountObserver.prototype.next = function (x) { + if (this._fn) { + var result = tryCatch(this._fn)(x, this._i++, this._s); + if (result === errorObj) { return this._o.onError(result.e); } + Boolean(result) && (this._c++); + } else { + this._c++; + } + }; + CountObserver.prototype.error = function (e) { this._o.onError(e); }; + CountObserver.prototype.completed = function () { + this._o.onNext(this._c); + this._o.onCompleted(); + }; + + return CountObserver; + }(AbstractObserver)); + + /** + * Returns an observable sequence containing a value that represents how many elements in the specified observable sequence satisfy a condition if provided, else the count of items. + * @example + * res = source.count(); + * res = source.count(function (x) { return x > 3; }); + * @param {Function} [predicate]A function to test each element for a condition. + * @param {Any} [thisArg] Object to use as this when executing callback. + * @returns {Observable} An observable sequence containing a single element with a number that represents how many elements in the input sequence satisfy the condition in the predicate function if provided, else the count of items in the sequence. + */ + observableProto.count = function (predicate, thisArg) { + var fn = bindCallback(predicate, thisArg, 3); + return new CountObservable(this, fn); + }; + + var IndexOfObservable = (function (__super__) { + inherits(IndexOfObservable, __super__); + function IndexOfObservable(source, e, n) { + this.source = source; + this._e = e; + this._n = n; + __super__.call(this); + } + + IndexOfObservable.prototype.subscribeCore = function (o) { + if (this._n < 0) { + o.onNext(-1); + o.onCompleted(); + return disposableEmpty; + } + + return this.source.subscribe(new IndexOfObserver(o, this._e, this._n)); + }; + + return IndexOfObservable; + }(ObservableBase)); + + var IndexOfObserver = (function (__super__) { + inherits(IndexOfObserver, __super__); + function IndexOfObserver(o, e, n) { + this._o = o; + this._e = e; + this._n = n; + this._i = 0; + __super__.call(this); + } + + IndexOfObserver.prototype.next = function (x) { + if (this._i >= this._n && x === this._e) { + this._o.onNext(this._i); + this._o.onCompleted(); + } + this._i++; + }; + IndexOfObserver.prototype.error = function (e) { this._o.onError(e); }; + IndexOfObserver.prototype.completed = function () { this._o.onNext(-1); this._o.onCompleted(); }; + + return IndexOfObserver; + }(AbstractObserver)); + + /** + * Returns the first index at which a given element can be found in the observable sequence, or -1 if it is not present. + * @param {Any} searchElement Element to locate in the array. + * @param {Number} [fromIndex] The index to start the search. If not specified, defaults to 0. + * @returns {Observable} And observable sequence containing the first index at which a given element can be found in the observable sequence, or -1 if it is not present. + */ + observableProto.indexOf = function(searchElement, fromIndex) { + var n = +fromIndex || 0; + Math.abs(n) === Infinity && (n = 0); + return new IndexOfObservable(this, searchElement, n); + }; + + var SumObservable = (function (__super__) { + inherits(SumObservable, __super__); + function SumObservable(source, fn) { + this.source = source; + this._fn = fn; + __super__.call(this); + } + + SumObservable.prototype.subscribeCore = function (o) { + return this.source.subscribe(new SumObserver(o, this._fn, this.source)); + }; + + return SumObservable; + }(ObservableBase)); + + var SumObserver = (function (__super__) { + inherits(SumObserver, __super__); + + function SumObserver(o, fn, s) { + this._o = o; + this._fn = fn; + this._s = s; + this._i = 0; + this._c = 0; + __super__.call(this); + } + + SumObserver.prototype.next = function (x) { + if (this._fn) { + var result = tryCatch(this._fn)(x, this._i++, this._s); + if (result === errorObj) { return this._o.onError(result.e); } + this._c += result; + } else { + this._c += x; + } + }; + SumObserver.prototype.error = function (e) { this._o.onError(e); }; + SumObserver.prototype.completed = function () { + this._o.onNext(this._c); + this._o.onCompleted(); + }; + + return SumObserver; + }(AbstractObserver)); + + /** + * Computes the sum of a sequence of values that are obtained by invoking an optional transform function on each element of the input sequence, else if not specified computes the sum on each item in the sequence. + * @param {Function} [selector] A transform function to apply to each element. + * @param {Any} [thisArg] Object to use as this when executing callback. + * @returns {Observable} An observable sequence containing a single element with the sum of the values in the source sequence. + */ + observableProto.sum = function (keySelector, thisArg) { + var fn = bindCallback(keySelector, thisArg, 3); + return new SumObservable(this, fn); + }; + + /** + * Returns the elements in an observable sequence with the minimum key value according to the specified comparer. + * @example + * var res = source.minBy(function (x) { return x.value; }); + * var res = source.minBy(function (x) { return x.value; }, function (x, y) { return x - y; }); + * @param {Function} keySelector Key selector function. + * @param {Function} [comparer] Comparer used to compare key values. + * @returns {Observable} An observable sequence containing a list of zero or more elements that have a minimum key value. + */ + observableProto.minBy = function (keySelector, comparer) { + comparer || (comparer = defaultSubComparer); + return new ExtremaByObservable(this, keySelector, function (x, y) { return comparer(x, y) * -1; }); + }; + + /** + * Returns the minimum element in an observable sequence according to the optional comparer else a default greater than less than check. + * @example + * var res = source.min(); + * var res = source.min(function (x, y) { return x.value - y.value; }); + * @param {Function} [comparer] Comparer used to compare elements. + * @returns {Observable} An observable sequence containing a single element with the minimum element in the source sequence. + */ + observableProto.min = function (comparer) { + return this.minBy(identity, comparer).map(firstOnly); + }; + + /** + * Returns the elements in an observable sequence with the maximum key value according to the specified comparer. + * @example + * var res = source.maxBy(function (x) { return x.value; }); + * var res = source.maxBy(function (x) { return x.value; }, function (x, y) { return x - y;; }); + * @param {Function} keySelector Key selector function. + * @param {Function} [comparer] Comparer used to compare key values. + * @returns {Observable} An observable sequence containing a list of zero or more elements that have a maximum key value. + */ + observableProto.maxBy = function (keySelector, comparer) { + comparer || (comparer = defaultSubComparer); + return new ExtremaByObservable(this, keySelector, comparer); + }; + + /** + * Returns the maximum value in an observable sequence according to the specified comparer. + * @example + * var res = source.max(); + * var res = source.max(function (x, y) { return x.value - y.value; }); + * @param {Function} [comparer] Comparer used to compare elements. + * @returns {Observable} An observable sequence containing a single element with the maximum element in the source sequence. + */ + observableProto.max = function (comparer) { + return this.maxBy(identity, comparer).map(firstOnly); + }; + + var AverageObservable = (function (__super__) { + inherits(AverageObservable, __super__); + function AverageObservable(source, fn) { + this.source = source; + this._fn = fn; + __super__.call(this); + } + + AverageObservable.prototype.subscribeCore = function (o) { + return this.source.subscribe(new AverageObserver(o, this._fn, this.source)); + }; + + return AverageObservable; + }(ObservableBase)); + + var AverageObserver = (function(__super__) { + inherits(AverageObserver, __super__); + function AverageObserver(o, fn, s) { + this._o = o; + this._fn = fn; + this._s = s; + this._c = 0; + this._t = 0; + __super__.call(this); + } + + AverageObserver.prototype.next = function (x) { + if(this._fn) { + var r = tryCatch(this._fn)(x, this._c++, this._s); + if (r === errorObj) { return this._o.onError(r.e); } + this._t += r; + } else { + this._c++; + this._t += x; + } + }; + AverageObserver.prototype.error = function (e) { this._o.onError(e); }; + AverageObserver.prototype.completed = function () { + if (this._c === 0) { return this._o.onError(new EmptyError()); } + this._o.onNext(this._t / this._c); + this._o.onCompleted(); + }; + + return AverageObserver; + }(AbstractObserver)); + + /** + * Computes the average of an observable sequence of values that are in the sequence or obtained by invoking a transform function on each element of the input sequence if present. + * @param {Function} [selector] A transform function to apply to each element. + * @param {Any} [thisArg] Object to use as this when executing callback. + * @returns {Observable} An observable sequence containing a single element with the average of the sequence of values. + */ + observableProto.average = function (keySelector, thisArg) { + var source = this, fn; + if (isFunction(keySelector)) { + fn = bindCallback(keySelector, thisArg, 3); + } + return new AverageObservable(source, fn); + }; + + /** + * Determines whether two sequences are equal by comparing the elements pairwise using a specified equality comparer. + * + * @example + * var res = res = source.sequenceEqual([1,2,3]); + * var res = res = source.sequenceEqual([{ value: 42 }], function (x, y) { return x.value === y.value; }); + * 3 - res = source.sequenceEqual(Rx.Observable.returnValue(42)); + * 4 - res = source.sequenceEqual(Rx.Observable.returnValue({ value: 42 }), function (x, y) { return x.value === y.value; }); + * @param {Observable} second Second observable sequence or array to compare. + * @param {Function} [comparer] Comparer used to compare elements of both sequences. + * @returns {Observable} An observable sequence that contains a single element which indicates whether both sequences are of equal length and their corresponding elements are equal according to the specified equality comparer. + */ + observableProto.sequenceEqual = function (second, comparer) { + var first = this; + comparer || (comparer = defaultComparer); + return new AnonymousObservable(function (o) { + var donel = false, doner = false, ql = [], qr = []; + var subscription1 = first.subscribe(function (x) { + if (qr.length > 0) { + var v = qr.shift(); + var equal = tryCatch(comparer)(v, x); + if (equal === errorObj) { return o.onError(equal.e); } + if (!equal) { + o.onNext(false); + o.onCompleted(); + } + } else if (doner) { + o.onNext(false); + o.onCompleted(); + } else { + ql.push(x); + } + }, function(e) { o.onError(e); }, function () { + donel = true; + if (ql.length === 0) { + if (qr.length > 0) { + o.onNext(false); + o.onCompleted(); + } else if (doner) { + o.onNext(true); + o.onCompleted(); + } + } + }); + + (isArrayLike(second) || isIterable(second)) && (second = observableFrom(second)); + isPromise(second) && (second = observableFromPromise(second)); + var subscription2 = second.subscribe(function (x) { + if (ql.length > 0) { + var v = ql.shift(); + var equal = tryCatch(comparer)(v, x); + if (equal === errorObj) { return o.onError(equal.e); } + if (!equal) { + o.onNext(false); + o.onCompleted(); + } + } else if (donel) { + o.onNext(false); + o.onCompleted(); + } else { + qr.push(x); + } + }, function(e) { o.onError(e); }, function () { + doner = true; + if (qr.length === 0) { + if (ql.length > 0) { + o.onNext(false); + o.onCompleted(); + } else if (donel) { + o.onNext(true); + o.onCompleted(); + } + } + }); + return new BinaryDisposable(subscription1, subscription2); + }, first); + }; + + var ElementAtObservable = (function (__super__) { + inherits(ElementAtObservable, __super__); + function ElementAtObservable(source, i, d) { + this.source = source; + this._i = i; + this._d = d; + __super__.call(this); + } + + ElementAtObservable.prototype.subscribeCore = function (o) { + return this.source.subscribe(new ElementAtObserver(o, this._i, this._d)); + }; + + return ElementAtObservable; + }(ObservableBase)); + + var ElementAtObserver = (function (__super__) { + inherits(ElementAtObserver, __super__); + + function ElementAtObserver(o, i, d) { + this._o = o; + this._i = i; + this._d = d; + __super__.call(this); + } + + ElementAtObserver.prototype.next = function (x) { + if (this._i-- === 0) { + this._o.onNext(x); + this._o.onCompleted(); + } + }; + ElementAtObserver.prototype.error = function (e) { this._o.onError(e); }; + ElementAtObserver.prototype.completed = function () { + if (this._d === undefined) { + this._o.onError(new ArgumentOutOfRangeError()); + } else { + this._o.onNext(this._d); + this._o.onCompleted(); + } + }; + + return ElementAtObserver; + }(AbstractObserver)); + + /** + * Returns the element at a specified index in a sequence or default value if not found. + * @param {Number} index The zero-based index of the element to retrieve. + * @param {Any} [defaultValue] The default value to use if elementAt does not find a value. + * @returns {Observable} An observable sequence that produces the element at the specified position in the source sequence. + */ + observableProto.elementAt = function (index, defaultValue) { + if (index < 0) { throw new ArgumentOutOfRangeError(); } + return new ElementAtObservable(this, index, defaultValue); + }; + + var SingleObserver = (function(__super__) { + inherits(SingleObserver, __super__); + function SingleObserver(o, obj, s) { + this._o = o; + this._obj = obj; + this._s = s; + this._i = 0; + this._hv = false; + this._v = null; + __super__.call(this); + } + + SingleObserver.prototype.next = function (x) { + var shouldYield = false; + if (this._obj.predicate) { + var res = tryCatch(this._obj.predicate)(x, this._i++, this._s); + if (res === errorObj) { return this._o.onError(res.e); } + Boolean(res) && (shouldYield = true); + } else if (!this._obj.predicate) { + shouldYield = true; + } + if (shouldYield) { + if (this._hv) { + return this._o.onError(new Error('Sequence contains more than one matching element')); + } + this._hv = true; + this._v = x; + } + }; + SingleObserver.prototype.error = function (e) { this._o.onError(e); }; + SingleObserver.prototype.completed = function () { + if (this._hv) { + this._o.onNext(this._v); + this._o.onCompleted(); + } + else if (this._obj.defaultValue === undefined) { + this._o.onError(new EmptyError()); + } else { + this._o.onNext(this._obj.defaultValue); + this._o.onCompleted(); + } + }; + + return SingleObserver; + }(AbstractObserver)); + + + /** + * Returns the only element of an observable sequence that satisfies the condition in the optional predicate, and reports an exception if there is not exactly one element in the observable sequence. + * @returns {Observable} Sequence containing the single element in the observable sequence that satisfies the condition in the predicate. + */ + observableProto.single = function (predicate, thisArg) { + var obj = {}, source = this; + if (typeof arguments[0] === 'object') { + obj = arguments[0]; + } else { + obj = { + predicate: arguments[0], + thisArg: arguments[1], + defaultValue: arguments[2] + }; + } + if (isFunction (obj.predicate)) { + var fn = obj.predicate; + obj.predicate = bindCallback(fn, obj.thisArg, 3); + } + return new AnonymousObservable(function (o) { + return source.subscribe(new SingleObserver(o, obj, source)); + }, source); + }; + + var FirstObservable = (function (__super__) { + inherits(FirstObservable, __super__); + function FirstObservable(source, obj) { + this.source = source; + this._obj = obj; + __super__.call(this); + } + + FirstObservable.prototype.subscribeCore = function (o) { + return this.source.subscribe(new FirstObserver(o, this._obj, this.source)); + }; + + return FirstObservable; + }(ObservableBase)); + + var FirstObserver = (function(__super__) { + inherits(FirstObserver, __super__); + function FirstObserver(o, obj, s) { + this._o = o; + this._obj = obj; + this._s = s; + this._i = 0; + __super__.call(this); + } + + FirstObserver.prototype.next = function (x) { + if (this._obj.predicate) { + var res = tryCatch(this._obj.predicate)(x, this._i++, this._s); + if (res === errorObj) { return this._o.onError(res.e); } + if (Boolean(res)) { + this._o.onNext(x); + this._o.onCompleted(); + } + } else if (!this._obj.predicate) { + this._o.onNext(x); + this._o.onCompleted(); + } + }; + FirstObserver.prototype.error = function (e) { this._o.onError(e); }; + FirstObserver.prototype.completed = function () { + if (this._obj.defaultValue === undefined) { + this._o.onError(new EmptyError()); + } else { + this._o.onNext(this._obj.defaultValue); + this._o.onCompleted(); + } + }; + + return FirstObserver; + }(AbstractObserver)); + + /** + * Returns the first element of an observable sequence that satisfies the condition in the predicate if present else the first item in the sequence. + * @returns {Observable} Sequence containing the first element in the observable sequence that satisfies the condition in the predicate if provided, else the first item in the sequence. + */ + observableProto.first = function () { + var obj = {}, source = this; + if (typeof arguments[0] === 'object') { + obj = arguments[0]; + } else { + obj = { + predicate: arguments[0], + thisArg: arguments[1], + defaultValue: arguments[2] + }; + } + if (isFunction (obj.predicate)) { + var fn = obj.predicate; + obj.predicate = bindCallback(fn, obj.thisArg, 3); + } + return new FirstObservable(this, obj); + }; + + var LastObservable = (function (__super__) { + inherits(LastObservable, __super__); + function LastObservable(source, obj) { + this.source = source; + this._obj = obj; + __super__.call(this); + } + + LastObservable.prototype.subscribeCore = function (o) { + return this.source.subscribe(new LastObserver(o, this._obj, this.source)); + }; + + return LastObservable; + }(ObservableBase)); + + var LastObserver = (function(__super__) { + inherits(LastObserver, __super__); + function LastObserver(o, obj, s) { + this._o = o; + this._obj = obj; + this._s = s; + this._i = 0; + this._hv = false; + this._v = null; + __super__.call(this); + } + + LastObserver.prototype.next = function (x) { + var shouldYield = false; + if (this._obj.predicate) { + var res = tryCatch(this._obj.predicate)(x, this._i++, this._s); + if (res === errorObj) { return this._o.onError(res.e); } + Boolean(res) && (shouldYield = true); + } else if (!this._obj.predicate) { + shouldYield = true; + } + if (shouldYield) { + this._hv = true; + this._v = x; + } + }; + LastObserver.prototype.error = function (e) { this._o.onError(e); }; + LastObserver.prototype.completed = function () { + if (this._hv) { + this._o.onNext(this._v); + this._o.onCompleted(); + } + else if (this._obj.defaultValue === undefined) { + this._o.onError(new EmptyError()); + } else { + this._o.onNext(this._obj.defaultValue); + this._o.onCompleted(); + } + }; + + return LastObserver; + }(AbstractObserver)); + + /** + * Returns the last element of an observable sequence that satisfies the condition in the predicate if specified, else the last element. + * @returns {Observable} Sequence containing the last element in the observable sequence that satisfies the condition in the predicate. + */ + observableProto.last = function () { + var obj = {}, source = this; + if (typeof arguments[0] === 'object') { + obj = arguments[0]; + } else { + obj = { + predicate: arguments[0], + thisArg: arguments[1], + defaultValue: arguments[2] + }; + } + if (isFunction (obj.predicate)) { + var fn = obj.predicate; + obj.predicate = bindCallback(fn, obj.thisArg, 3); + } + return new LastObservable(this, obj); + }; + + var FindValueObserver = (function(__super__) { + inherits(FindValueObserver, __super__); + function FindValueObserver(observer, source, callback, yieldIndex) { + this._o = observer; + this._s = source; + this._cb = callback; + this._y = yieldIndex; + this._i = 0; + __super__.call(this); + } + + FindValueObserver.prototype.next = function (x) { + var shouldRun = tryCatch(this._cb)(x, this._i, this._s); + if (shouldRun === errorObj) { return this._o.onError(shouldRun.e); } + if (shouldRun) { + this._o.onNext(this._y ? this._i : x); + this._o.onCompleted(); + } else { + this._i++; + } + }; + + FindValueObserver.prototype.error = function (e) { + this._o.onError(e); + }; + + FindValueObserver.prototype.completed = function () { + this._y && this._o.onNext(-1); + this._o.onCompleted(); + }; + + return FindValueObserver; + }(AbstractObserver)); + + function findValue (source, predicate, thisArg, yieldIndex) { + var callback = bindCallback(predicate, thisArg, 3); + return new AnonymousObservable(function (o) { + return source.subscribe(new FindValueObserver(o, source, callback, yieldIndex)); + }, source); + } + + /** + * Searches for an element that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire Observable sequence. + * @param {Function} predicate The predicate that defines the conditions of the element to search for. + * @param {Any} [thisArg] Object to use as `this` when executing the predicate. + * @returns {Observable} An Observable sequence with the first element that matches the conditions defined by the specified predicate, if found; otherwise, undefined. + */ + observableProto.find = function (predicate, thisArg) { + return findValue(this, predicate, thisArg, false); + }; + + /** + * Searches for an element that matches the conditions defined by the specified predicate, and returns + * an Observable sequence with the zero-based index of the first occurrence within the entire Observable sequence. + * @param {Function} predicate The predicate that defines the conditions of the element to search for. + * @param {Any} [thisArg] Object to use as `this` when executing the predicate. + * @returns {Observable} An Observable sequence with the zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, –1. + */ + observableProto.findIndex = function (predicate, thisArg) { + return findValue(this, predicate, thisArg, true); + }; + + var ToSetObservable = (function (__super__) { + inherits(ToSetObservable, __super__); + function ToSetObservable(source) { + this.source = source; + __super__.call(this); + } + + ToSetObservable.prototype.subscribeCore = function (o) { + return this.source.subscribe(new ToSetObserver(o)); + }; + + return ToSetObservable; + }(ObservableBase)); + + var ToSetObserver = (function (__super__) { + inherits(ToSetObserver, __super__); + function ToSetObserver(o) { + this._o = o; + this._s = new root.Set(); + __super__.call(this); + } + + ToSetObserver.prototype.next = function (x) { + this._s.add(x); + }; + + ToSetObserver.prototype.error = function (e) { + this._o.onError(e); + }; + + ToSetObserver.prototype.completed = function () { + this._o.onNext(this._s); + this._o.onCompleted(); + }; + + return ToSetObserver; + }(AbstractObserver)); + + /** + * Converts the observable sequence to a Set if it exists. + * @returns {Observable} An observable sequence with a single value of a Set containing the values from the observable sequence. + */ + observableProto.toSet = function () { + if (typeof root.Set === 'undefined') { throw new TypeError(); } + return new ToSetObservable(this); + }; + + var ToMapObservable = (function (__super__) { + inherits(ToMapObservable, __super__); + function ToMapObservable(source, k, e) { + this.source = source; + this._k = k; + this._e = e; + __super__.call(this); + } + + ToMapObservable.prototype.subscribeCore = function (o) { + return this.source.subscribe(new ToMapObserver(o, this._k, this._e)); + }; + + return ToMapObservable; + }(ObservableBase)); + + var ToMapObserver = (function (__super__) { + inherits(ToMapObserver, __super__); + function ToMapObserver(o, k, e) { + this._o = o; + this._k = k; + this._e = e; + this._m = new root.Map(); + __super__.call(this); + } + + ToMapObserver.prototype.next = function (x) { + var key = tryCatch(this._k)(x); + if (key === errorObj) { return this._o.onError(key.e); } + var elem = x; + if (this._e) { + elem = tryCatch(this._e)(x); + if (elem === errorObj) { return this._o.onError(elem.e); } + } + + this._m.set(key, elem); + }; + + ToMapObserver.prototype.error = function (e) { + this._o.onError(e); + }; + + ToMapObserver.prototype.completed = function () { + this._o.onNext(this._m); + this._o.onCompleted(); + }; + + return ToMapObserver; + }(AbstractObserver)); + + /** + * Converts the observable sequence to a Map if it exists. + * @param {Function} keySelector A function which produces the key for the Map. + * @param {Function} [elementSelector] An optional function which produces the element for the Map. If not present, defaults to the value from the observable sequence. + * @returns {Observable} An observable sequence with a single value of a Map containing the values from the observable sequence. + */ + observableProto.toMap = function (keySelector, elementSelector) { + if (typeof root.Map === 'undefined') { throw new TypeError(); } + return new ToMapObservable(this, keySelector, elementSelector); + }; + + var SliceObservable = (function (__super__) { + inherits(SliceObservable, __super__); + function SliceObservable(source, b, e) { + this.source = source; + this._b = b; + this._e = e; + __super__.call(this); + } + + SliceObservable.prototype.subscribeCore = function (o) { + return this.source.subscribe(new SliceObserver(o, this._b, this._e)); + }; + + return SliceObservable; + }(ObservableBase)); + + var SliceObserver = (function (__super__) { + inherits(SliceObserver, __super__); + + function SliceObserver(o, b, e) { + this._o = o; + this._b = b; + this._e = e; + this._i = 0; + __super__.call(this); + } + + SliceObserver.prototype.next = function (x) { + if (this._i >= this._b) { + if (this._e === this._i) { + this._o.onCompleted(); + } else { + this._o.onNext(x); + } + } + this._i++; + }; + SliceObserver.prototype.error = function (e) { this._o.onError(e); }; + SliceObserver.prototype.completed = function () { this._o.onCompleted(); }; + + return SliceObserver; + }(AbstractObserver)); + + /* + * The slice() method returns a shallow copy of a portion of an Observable into a new Observable object. + * Unlike the array version, this does not support negative numbers for being or end. + * @param {Number} [begin] Zero-based index at which to begin extraction. If omitted, this will default to zero. + * @param {Number} [end] Zero-based index at which to end extraction. slice extracts up to but not including end. + * If omitted, this will emit the rest of the Observable object. + * @returns {Observable} A shallow copy of a portion of an Observable into a new Observable object. + */ + observableProto.slice = function (begin, end) { + var start = begin || 0; + if (start < 0) { throw new Rx.ArgumentOutOfRangeError(); } + if (typeof end === 'number' && end < start) { + throw new Rx.ArgumentOutOfRangeError(); + } + return new SliceObservable(this, start, end); + }; + + var LastIndexOfObservable = (function (__super__) { + inherits(LastIndexOfObservable, __super__); + function LastIndexOfObservable(source, e, n) { + this.source = source; + this._e = e; + this._n = n; + __super__.call(this); + } + + LastIndexOfObservable.prototype.subscribeCore = function (o) { + if (this._n < 0) { + o.onNext(-1); + o.onCompleted(); + return disposableEmpty; + } + + return this.source.subscribe(new LastIndexOfObserver(o, this._e, this._n)); + }; + + return LastIndexOfObservable; + }(ObservableBase)); + + var LastIndexOfObserver = (function (__super__) { + inherits(LastIndexOfObserver, __super__); + function LastIndexOfObserver(o, e, n) { + this._o = o; + this._e = e; + this._n = n; + this._v = 0; + this._hv = false; + this._i = 0; + __super__.call(this); + } + + LastIndexOfObserver.prototype.next = function (x) { + if (this._i >= this._n && x === this._e) { + this._hv = true; + this._v = this._i; + } + this._i++; + }; + LastIndexOfObserver.prototype.error = function (e) { this._o.onError(e); }; + LastIndexOfObserver.prototype.completed = function () { + if (this._hv) { + this._o.onNext(this._v); + } else { + this._o.onNext(-1); + } + this._o.onCompleted(); + }; + + return LastIndexOfObserver; + }(AbstractObserver)); + + /** + * Returns the last index at which a given element can be found in the observable sequence, or -1 if it is not present. + * @param {Any} searchElement Element to locate in the array. + * @param {Number} [fromIndex] The index to start the search. If not specified, defaults to 0. + * @returns {Observable} And observable sequence containing the last index at which a given element can be found in the observable sequence, or -1 if it is not present. + */ + observableProto.lastIndexOf = function(searchElement, fromIndex) { + var n = +fromIndex || 0; + Math.abs(n) === Infinity && (n = 0); + return new LastIndexOfObservable(this, searchElement, n); + }; + + return Rx; +})); diff --git a/node_modules/rx-lite-aggregates/rx.lite.aggregates.map b/node_modules/rx-lite-aggregates/rx.lite.aggregates.map new file mode 100644 index 0000000..11fbf10 --- /dev/null +++ b/node_modules/rx-lite-aggregates/rx.lite.aggregates.map @@ -0,0 +1 @@ +{"version":3,"file":"rx.lite.aggregates.min.js","sources":["rx.lite.aggregates.js"],"names":["factory","checkGlobal","value","Object","objectTypes","function","object","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","freeSelf","self","freeWindow","window","thisGlobal","this","root","Function","define","amd","Rx","require","call","exp","undefined","tryCatcherGen","tryCatchTarget","apply","arguments","e","errorObj","firstOnly","x","length","EmptyError","findValue","source","predicate","thisArg","yieldIndex","callback","bindCallback","AnonymousObservable","o","subscribe","FindValueObserver","Observable","observableProto","prototype","BinaryDisposable","AbstractObserver","internals","disposableEmpty","Disposable","empty","helpers","defaultComparer","identity","defaultSubComparer","isFunction","isPromise","isArrayLike","isIterable","inherits","observableFromPromise","fromPromise","observableFrom","from","ObservableBase","ArgumentOutOfRangeError","tryCatch","fn","TypeError","ExtremaByObservable","__super__","k","c","_k","_c","subscribeCore","ExtremaByObserver","_o","_v","_hv","_l","next","key","onError","comparison","push","error","completed","onNext","onCompleted","ReduceObservable","accumulator","hasSeed","seed","observer","ReduceObserver","parent","_p","_fn","_hs","_s","_ha","_a","_i","reduce","SomeObservable","SomeObserver","s","result","Boolean","some","IsEmptyObservable","IsEmptyObserver","isEmpty","EveryObservable","EveryObserver","every","IncludesObservable","elem","idx","n","Math","abs","Infinity","_elem","_n","IncludesObserver","comparer","a","b","isNaN","includes","searchElement","fromIndex","CountObservable","CountObserver","count","IndexOfObservable","_e","IndexOfObserver","indexOf","SumObservable","SumObserver","sum","keySelector","minBy","y","min","map","maxBy","max","AverageObservable","AverageObserver","_t","r","average","sequenceEqual","second","first","donel","doner","ql","qr","subscription1","v","shift","equal","subscription2","ElementAtObservable","i","d","_d","ElementAtObserver","elementAt","index","defaultValue","SingleObserver","obj","_obj","shouldYield","res","Error","single","FirstObservable","FirstObserver","LastObservable","LastObserver","last","_cb","_y","shouldRun","find","findIndex","ToSetObservable","ToSetObserver","Set","add","toSet","ToMapObservable","ToMapObserver","_m","Map","set","toMap","elementSelector","SliceObservable","_b","SliceObserver","slice","begin","end","start","LastIndexOfObservable","LastIndexOfObserver","lastIndexOf"],"mappings":";CAEE,SAAUA,GAMV,QAASC,GAAYC,GACnB,MAAQA,IAASA,EAAMC,SAAWA,OAAUD,EAAQ,KANtD,GAAIE,IACFC,YAAY,EACZC,QAAU,GAORC,EAAeH,QAAmBI,WAAYA,UAAYA,QAAQC,SAAYD,QAAU,KACxFE,EAAcN,QAAmBO,UAAWA,SAAWA,OAAOF,SAAYE,OAAS,KACnFC,EAAaX,EAAYM,GAAeG,GAAgC,gBAAXG,SAAuBA,QACpFC,EAAWb,EAAYG,QAAmBW,QAASA,MACnDC,EAAaf,EAAYG,QAAmBa,UAAWA,QAEvDC,GADiBR,GAAcA,EAAWF,UAAYD,EAAeA,EAAc,KACtEN,EAAYG,QAAmBe,QAASA,OACrDC,EAAOR,GAAgBI,KAAgBE,GAAcA,EAAWD,SAAYD,GAAeF,GAAYI,GAAcG,SAAS,gBAG5G,mBAAXC,SAAyBA,OAAOC,IACzCD,QAAQ,aAAc,SAAUE,EAAIhB,GAClC,MAAOR,GAAQoB,EAAMZ,EAASgB,KAEL,gBAAXb,SAAuBA,QAAUA,OAAOH,UAAYD,EACpEI,OAAOH,QAAUR,EAAQoB,EAAMT,OAAOH,QAASiB,QAAQ,YAEvDL,EAAKI,GAAKxB,EAAQoB,KAAUA,EAAKI,MAEnCE,KAAKP,KAAM,SAAUC,EAAMO,EAAKH,EAAII,GA2BpC,QAASC,GAAcC,GACrB,MAAO,YACL,IACE,MAAOA,GAAeC,MAAMZ,KAAMa,WAClC,MAAOC,GAEP,MADAC,GAASD,EAAIA,EACNC,IAwEb,QAASC,GAAUC,GACjB,GAAiB,IAAbA,EAAEC,OAAgB,KAAM,IAAIC,EAChC,OAAOF,GAAE,GAm8BX,QAASG,GAAWC,EAAQC,EAAWC,EAASC,GAC9C,GAAIC,GAAWC,EAAaJ,EAAWC,EAAS,EAChD,OAAO,IAAII,GAAoB,SAAUC,GACvC,MAAOP,GAAOQ,UAAU,GAAIC,IAAkBF,EAAGP,EAAQI,EAAUD,KAClEH,GA/iCL,GAAIU,GAAa1B,EAAG0B,WAClBC,EAAkBD,EAAWE,UAC7BC,EAAmB7B,EAAG6B,iBACtBP,EAAsBtB,EAAGsB,oBACzBQ,EAAmB9B,EAAG+B,UAAUD,iBAChCE,EAAkBhC,EAAGiC,WAAWC,MAChCC,EAAUnC,EAAGmC,QACbC,EAAkBD,EAAQC,gBAC1BC,EAAWF,EAAQE,SACnBC,EAAqBH,EAAQG,mBAC7BC,EAAaJ,EAAQI,WACrBC,EAAYL,EAAQK,UACpBC,EAAcN,EAAQM,YACtBC,EAAaP,EAAQO,WACrBC,EAAW3C,EAAG+B,UAAUY,SACxBC,EAAwBlB,EAAWmB,YACnCC,EAAiBpB,EAAWqB,KAC5B1B,EAAerB,EAAG+B,UAAUV,aAC5BP,EAAad,EAAGc,WAChBkC,EAAiBhD,EAAGgD,eACpBC,EAA0BjD,EAAGiD,wBAE3BvC,GAAYD,MAaZyC,EAAWlD,EAAG+B,UAAUmB,SAAW,SAAkBC,GACvD,IAAKZ,EAAWY,GAAO,KAAM,IAAIC,WAAU,wBAC3C,OAAO/C,GAAc8C,IAOnBE,EAAuB,SAAUC,GAEnC,QAASD,GAAoBrC,EAAQuC,EAAGC,GACtC7D,KAAKqB,OAASA,EACdrB,KAAK8D,GAAKF,EACV5D,KAAK+D,GAAKF,EACVF,EAAUpD,KAAKP,MAOjB,MAZAgD,GAASU,EAAqBC,GAQ9BD,EAAoBzB,UAAU+B,cAAgB,SAAUpC,GACtD,MAAO5B,MAAKqB,OAAOQ,UAAU,GAAIoC,GAAkBrC,EAAG5B,KAAK8D,GAAI9D,KAAK+D,MAG/DL,GACPL,GAEEY,EAAqB,SAAUN,GAEjC,QAASM,GAAkBrC,EAAGgC,EAAGC,GAC/B7D,KAAKkE,GAAKtC,EACV5B,KAAK8D,GAAKF,EACV5D,KAAK+D,GAAKF,EACV7D,KAAKmE,GAAK,KACVnE,KAAKoE,KAAM,EACXpE,KAAKqE,MACLV,EAAUpD,KAAKP,MA8BjB,MAtCAgD,GAASiB,EAAmBN,GAW5BM,EAAkBhC,UAAUqC,KAAO,SAAUrD,GAC3C,GAAIsD,GAAMhB,EAASvD,KAAK8D,IAAI7C,EAC5B,IAAIsD,IAAQxD,EAAY,MAAOf,MAAKkE,GAAGM,QAAQD,EAAIzD,EACnD,IAAI2D,GAAa,CACjB,IAAKzE,KAAKoE,KAKR,GADAK,EAAalB,EAASvD,KAAK+D,IAAIQ,EAAKvE,KAAKmE,IACrCM,IAAe1D,EAAY,MAAOf,MAAKkE,GAAGM,QAAQC,EAAW3D,OAJjEd,MAAKoE,KAAM,EACXpE,KAAKmE,GAAKI,CAKRE,GAAa,IACfzE,KAAKmE,GAAKI,EACVvE,KAAKqE,OAEHI,GAAc,GAAKzE,KAAKqE,GAAGK,KAAKzD,IAGtCgD,EAAkBhC,UAAU0C,MAAQ,SAAU7D,GAC5Cd,KAAKkE,GAAGM,QAAQ1D,IAGlBmD,EAAkBhC,UAAU2C,UAAY,WACtC5E,KAAKkE,GAAGW,OAAO7E,KAAKqE,IACpBrE,KAAKkE,GAAGY,eAGHb,GACP9B,GAOE4C,EAAoB,SAASpB,GAE/B,QAASoB,GAAiB1D,EAAQ2D,EAAaC,EAASC,GACtDlF,KAAKqB,OAASA,EACdrB,KAAKgF,YAAcA,EACnBhF,KAAKiF,QAAUA,EACfjF,KAAKkF,KAAOA,EACZvB,EAAUpD,KAAKP,MAOjB,MAbAgD,GAAS+B,EAAkBpB,GAS3BoB,EAAiB9C,UAAU+B,cAAgB,SAASmB,GAClD,MAAOnF,MAAKqB,OAAOQ,UAAU,GAAIuD,GAAeD,EAASnF,QAGpD+E,GACP1B,GAEE+B,EAAkB,SAAUzB,GAE9B,QAASyB,GAAexD,EAAGyD,GACzBrF,KAAKkE,GAAKtC,EACV5B,KAAKsF,GAAKD,EACVrF,KAAKuF,IAAMF,EAAOL,YAClBhF,KAAKwF,IAAMH,EAAOJ,QAClBjF,KAAKyF,GAAKJ,EAAOH,KACjBlF,KAAK0F,KAAM,EACX1F,KAAK2F,GAAK,KACV3F,KAAKoE,KAAM,EACXpE,KAAK4F,GAAK,EACVjC,EAAUpD,KAAKP,MA0BjB,MArCAgD,GAASoC,EAAgBzB,GAczByB,EAAenD,UAAUqC,KAAO,SAAUrD,GAQxC,OAPCjB,KAAKoE,MAAQpE,KAAKoE,KAAM,GACrBpE,KAAK0F,IACP1F,KAAK2F,GAAKpC,EAASvD,KAAKuF,KAAKvF,KAAK2F,GAAI1E,EAAGjB,KAAK4F,GAAI5F,KAAKsF,KAEvDtF,KAAK2F,GAAK3F,KAAKwF,IAAMjC,EAASvD,KAAKuF,KAAKvF,KAAKyF,GAAIxE,EAAGjB,KAAK4F,GAAI5F,KAAKsF,IAAMrE,EACxEjB,KAAK0F,KAAM,GAET1F,KAAK2F,KAAO5E,EAAmBf,KAAKkE,GAAGM,QAAQxE,KAAK2F,GAAG7E,OAC3Dd,MAAK4F,MAGPR,EAAenD,UAAU0C,MAAQ,SAAU7D,GACzCd,KAAKkE,GAAGM,QAAQ1D,IAGlBsE,EAAenD,UAAU2C,UAAY,WACnC5E,KAAKoE,KAAOpE,KAAKkE,GAAGW,OAAO7E,KAAK2F,KAC/B3F,KAAKoE,KAAOpE,KAAKwF,KAAOxF,KAAKkE,GAAGW,OAAO7E,KAAKyF,KAC5CzF,KAAKoE,MAAQpE,KAAKwF,KAAOxF,KAAKkE,GAAGM,QAAQ,GAAIrD,IAC9CnB,KAAKkE,GAAGY,eAGHM,GACPjD,EASFH,GAAgB6D,OAAS,WACvB,GAAqBX,GAAjBD,GAAU,EAAaD,EAAcnE,UAAU,EAKnD,OAJyB,KAArBA,UAAUK,SACZ+D,GAAU,EACVC,EAAOrE,UAAU,IAEZ,GAAIkE,GAAiB/E,KAAMgF,EAAaC,EAASC,GAG1D,IAAIY,GAAkB,SAAUnC,GAE9B,QAASmC,GAAezE,EAAQmC,GAC9BxD,KAAKqB,OAASA,EACdrB,KAAKuF,IAAM/B,EACXG,EAAUpD,KAAKP,MAOjB,MAXAgD,GAAS8C,EAAgBnC,GAOzBmC,EAAe7D,UAAU+B,cAAgB,SAAUpC,GACjD,MAAO5B,MAAKqB,OAAOQ,UAAU,GAAIkE,GAAanE,EAAG5B,KAAKuF,IAAKvF,KAAKqB,UAG3DyE,GACPzC,GAEE0C,EAAgB,SAAUpC,GAG5B,QAASoC,GAAanE,EAAG4B,EAAIwC,GAC3BhG,KAAKkE,GAAKtC,EACV5B,KAAKuF,IAAM/B,EACXxD,KAAKyF,GAAKO,EACVhG,KAAK4F,GAAK,EACVjC,EAAUpD,KAAKP,MAiBjB,MAxBAgD,GAAS+C,EAAcpC,GAUvBoC,EAAa9D,UAAUqC,KAAO,SAAUrD,GACtC,GAAIgF,GAAS1C,EAASvD,KAAKuF,KAAKtE,EAAGjB,KAAK4F,KAAM5F,KAAKyF,GACnD,OAAIQ,KAAWlF,EAAmBf,KAAKkE,GAAGM,QAAQyB,EAAOnF,QACrDoF,QAAQD,KACVjG,KAAKkE,GAAGW,QAAO,GACf7E,KAAKkE,GAAGY,iBAGZiB,EAAa9D,UAAU0C,MAAQ,SAAU7D,GAAKd,KAAKkE,GAAGM,QAAQ1D,IAC9DiF,EAAa9D,UAAU2C,UAAY,WACjC5E,KAAKkE,GAAGW,QAAO,GACf7E,KAAKkE,GAAGY,eAGHiB,GACP5D,EAOFH,GAAgBmE,KAAO,SAAU7E,EAAWC,GAC1C,GAAIiC,GAAK9B,EAAaJ,EAAWC,EAAS,EAC1C,OAAO,IAAIuE,GAAe9F,KAAMwD,GAGlC,IAAI4C,GAAqB,SAAUzC,GAEjC,QAASyC,GAAkB/E,GACzBrB,KAAKqB,OAASA,EACdsC,EAAUpD,KAAKP,MAOjB,MAVAgD,GAASoD,EAAmBzC,GAM5ByC,EAAkBnE,UAAU+B,cAAgB,SAAUpC,GACpD,MAAO5B,MAAKqB,OAAOQ,UAAU,GAAIwE,GAAgBzE,KAG5CwE,GACP/C,GAEEgD,EAAmB,SAAS1C,GAE9B,QAAS0C,GAAgBzE,GACvB5B,KAAKkE,GAAKtC,EACV+B,EAAUpD,KAAKP,MAajB,MAhBAgD,GAASqD,EAAiB1C,GAM1B0C,EAAgBpE,UAAUqC,KAAO,WAC/BtE,KAAKkE,GAAGW,QAAO,GACf7E,KAAKkE,GAAGY,eAEVuB,EAAgBpE,UAAU0C,MAAQ,SAAU7D,GAAKd,KAAKkE,GAAGM,QAAQ1D,IACjEuF,EAAgBpE,UAAU2C,UAAY,WACpC5E,KAAKkE,GAAGW,QAAO,GACf7E,KAAKkE,GAAGY,eAGHuB,GACPlE,EAMFH,GAAgBsE,QAAU,WACxB,MAAO,IAAIF,GAAkBpG,MAG/B,IAAIuG,GAAmB,SAAU5C,GAE/B,QAAS4C,GAAgBlF,EAAQmC,GAC/BxD,KAAKqB,OAASA,EACdrB,KAAKuF,IAAM/B,EACXG,EAAUpD,KAAKP,MAOjB,MAXAgD,GAASuD,EAAiB5C,GAO1B4C,EAAgBtE,UAAU+B,cAAgB,SAAUpC,GAClD,MAAO5B,MAAKqB,OAAOQ,UAAU,GAAI2E,GAAc5E,EAAG5B,KAAKuF,IAAKvF,KAAKqB,UAG5DkF,GACPlD,GAEEmD,EAAiB,SAAU7C,GAG7B,QAAS6C,GAAc5E,EAAG4B,EAAIwC,GAC5BhG,KAAKkE,GAAKtC,EACV5B,KAAKuF,IAAM/B,EACXxD,KAAKyF,GAAKO,EACVhG,KAAK4F,GAAK,EACVjC,EAAUpD,KAAKP,MAiBjB,MAxBAgD,GAASwD,EAAe7C,GAUxB6C,EAAcvE,UAAUqC,KAAO,SAAUrD,GACvC,GAAIgF,GAAS1C,EAASvD,KAAKuF,KAAKtE,EAAGjB,KAAK4F,KAAM5F,KAAKyF,GACnD,OAAIQ,KAAWlF,EAAmBf,KAAKkE,GAAGM,QAAQyB,EAAOnF,QACpDoF,QAAQD,KACXjG,KAAKkE,GAAGW,QAAO,GACf7E,KAAKkE,GAAGY,iBAGZ0B,EAAcvE,UAAU0C,MAAQ,SAAU7D,GAAKd,KAAKkE,GAAGM,QAAQ1D,IAC/D0F,EAAcvE,UAAU2C,UAAY,WAClC5E,KAAKkE,GAAGW,QAAO,GACf7E,KAAKkE,GAAGY,eAGH0B,GACPrE,EAQFH,GAAgByE,MAAQ,SAAUnF,EAAWC,GAC3C,GAAIiC,GAAK9B,EAAaJ,EAAWC,EAAS,EAC1C,OAAO,IAAIgF,GAAgBvG,KAAMwD,GAGnC,IAAIkD,GAAsB,SAAU/C,GAElC,QAAS+C,GAAmBrF,EAAQsF,EAAMC,GACxC,GAAIC,IAAKD,GAAO,CAChBE,MAAKC,IAAIF,KAAOG,EAAAA,IAAaH,EAAI,GAEjC7G,KAAKqB,OAASA,EACdrB,KAAKiH,MAAQN,EACb3G,KAAKkH,GAAKL,EACVlD,EAAUpD,KAAKP,MAajB,MArBAgD,GAAS0D,EAAoB/C,GAW7B+C,EAAmBzE,UAAU+B,cAAgB,SAAUpC,GACrD,MAAI5B,MAAKkH,GAAK,GACZtF,EAAEiD,QAAO,GACTjD,EAAEkD,cACKzC,GAGFrC,KAAKqB,OAAOQ,UAAU,GAAIsF,GAAiBvF,EAAG5B,KAAKiH,MAAOjH,KAAKkH,MAGjER,GACPrD,GAEE8D,EAAoB,SAAUxD,GAEhC,QAASwD,GAAiBvF,EAAG+E,EAAME,GACjC7G,KAAKkE,GAAKtC,EACV5B,KAAKiH,MAAQN,EACb3G,KAAKkH,GAAKL,EACV7G,KAAK4F,GAAK,EACVjC,EAAUpD,KAAKP,MAGjB,QAASoH,GAASC,EAAGC,GACnB,MAAc,KAAND,GAAiB,IAANC,GAAaD,IAAMC,GAAMC,MAAMF,IAAME,MAAMD,GAYhE,MAtBAtE,GAASmE,EAAkBxD,GAa3BwD,EAAiBlF,UAAUqC,KAAO,SAAUrD,GACtCjB,KAAK4F,MAAQ5F,KAAKkH,IAAME,EAASnG,EAAGjB,KAAKiH,SAC3CjH,KAAKkE,GAAGW,QAAO,GACf7E,KAAKkE,GAAGY,gBAGZqC,EAAiBlF,UAAU0C,MAAQ,SAAU7D,GAAKd,KAAKkE,GAAGM,QAAQ1D,IAClEqG,EAAiBlF,UAAU2C,UAAY,WAAc5E,KAAKkE,GAAGW,QAAO,GAAQ7E,KAAKkE,GAAGY,eAE7EqC,GACPhF,EAQFH,GAAgBwF,SAAW,SAAUC,EAAeC,GAClD,MAAO,IAAIhB,GAAmB1G,KAAMyH,EAAeC,GAGrD,IAAIC,GAAmB,SAAUhE,GAE/B,QAASgE,GAAgBtG,EAAQmC,GAC/BxD,KAAKqB,OAASA,EACdrB,KAAKuF,IAAM/B,EACXG,EAAUpD,KAAKP,MAOjB,MAXAgD,GAAS2E,EAAiBhE,GAO1BgE,EAAgB1F,UAAU+B,cAAgB,SAAUpC,GAClD,MAAO5B,MAAKqB,OAAOQ,UAAU,GAAI+F,GAAchG,EAAG5B,KAAKuF,IAAKvF,KAAKqB,UAG5DsG,GACPtE,GAEEuE,EAAiB,SAAUjE,GAG7B,QAASiE,GAAchG,EAAG4B,EAAIwC,GAC5BhG,KAAKkE,GAAKtC,EACV5B,KAAKuF,IAAM/B,EACXxD,KAAKyF,GAAKO,EACVhG,KAAK4F,GAAK,EACV5F,KAAK+D,GAAK,EACVJ,EAAUpD,KAAKP,MAkBjB,MA1BAgD,GAAS4E,EAAejE,GAWxBiE,EAAc3F,UAAUqC,KAAO,SAAUrD,GACvC,GAAIjB,KAAKuF,IAAK,CACZ,GAAIU,GAAS1C,EAASvD,KAAKuF,KAAKtE,EAAGjB,KAAK4F,KAAM5F,KAAKyF,GACnD,IAAIQ,IAAWlF,EAAY,MAAOf,MAAKkE,GAAGM,QAAQyB,EAAOnF,EACzDoF,SAAQD,IAAYjG,KAAK+D,SAEzB/D,MAAK+D,MAGT6D,EAAc3F,UAAU0C,MAAQ,SAAU7D,GAAKd,KAAKkE,GAAGM,QAAQ1D,IAC/D8G,EAAc3F,UAAU2C,UAAY,WAClC5E,KAAKkE,GAAGW,OAAO7E,KAAK+D,IACpB/D,KAAKkE,GAAGY,eAGH8C,GACPzF,EAWFH,GAAgB6F,MAAQ,SAAUvG,EAAWC,GAC3C,GAAIiC,GAAK9B,EAAaJ,EAAWC,EAAS,EAC1C,OAAO,IAAIoG,GAAgB3H,KAAMwD,GAGnC,IAAIsE,GAAqB,SAAUnE,GAEjC,QAASmE,GAAkBzG,EAAQP,EAAG+F,GACpC7G,KAAKqB,OAASA,EACdrB,KAAK+H,GAAKjH,EACVd,KAAKkH,GAAKL,EACVlD,EAAUpD,KAAKP,MAajB,MAlBAgD,GAAS8E,EAAmBnE,GAQ5BmE,EAAkB7F,UAAU+B,cAAgB,SAAUpC,GACpD,MAAI5B,MAAKkH,GAAK,GACZtF,EAAEiD,OAAO,IACTjD,EAAEkD,cACKzC,GAGFrC,KAAKqB,OAAOQ,UAAU,GAAImG,GAAgBpG,EAAG5B,KAAK+H,GAAI/H,KAAKkH,MAG7DY,GACPzE,GAEE2E,EAAmB,SAAUrE,GAE/B,QAASqE,GAAgBpG,EAAGd,EAAG+F,GAC7B7G,KAAKkE,GAAKtC,EACV5B,KAAK+H,GAAKjH,EACVd,KAAKkH,GAAKL,EACV7G,KAAK4F,GAAK,EACVjC,EAAUpD,KAAKP,MAajB,MAnBAgD,GAASgF,EAAiBrE,GAS1BqE,EAAgB/F,UAAUqC,KAAO,SAAUrD,GACrCjB,KAAK4F,IAAM5F,KAAKkH,IAAMjG,IAAMjB,KAAK+H,KACnC/H,KAAKkE,GAAGW,OAAO7E,KAAK4F,IACpB5F,KAAKkE,GAAGY,eAEV9E,KAAK4F,MAEPoC,EAAgB/F,UAAU0C,MAAQ,SAAU7D,GAAKd,KAAKkE,GAAGM,QAAQ1D,IACjEkH,EAAgB/F,UAAU2C,UAAY,WAAc5E,KAAKkE,GAAGW,OAAO,IAAK7E,KAAKkE,GAAGY,eAEzEkD,GACP7F,EAQFH,GAAgBiG,QAAU,SAASR,EAAeC,GAChD,GAAIb,IAAKa,GAAa,CAEtB,OADAZ,MAAKC,IAAIF,KAAOG,EAAAA,IAAaH,EAAI,GAC1B,GAAIiB,GAAkB9H,KAAMyH,EAAeZ,GAGpD,IAAIqB,GAAiB,SAAUvE,GAE7B,QAASuE,GAAc7G,EAAQmC,GAC7BxD,KAAKqB,OAASA,EACdrB,KAAKuF,IAAM/B,EACXG,EAAUpD,KAAKP,MAOjB,MAXAgD,GAASkF,EAAevE,GAOxBuE,EAAcjG,UAAU+B,cAAgB,SAAUpC,GAChD,MAAO5B,MAAKqB,OAAOQ,UAAU,GAAIsG,GAAYvG,EAAG5B,KAAKuF,IAAKvF,KAAKqB,UAG1D6G,GACP7E,GAEE8E,EAAe,SAAUxE,GAG3B,QAASwE,GAAYvG,EAAG4B,EAAIwC,GAC1BhG,KAAKkE,GAAKtC,EACV5B,KAAKuF,IAAM/B,EACXxD,KAAKyF,GAAKO,EACVhG,KAAK4F,GAAK,EACV5F,KAAK+D,GAAK,EACVJ,EAAUpD,KAAKP,MAkBjB,MA1BAgD,GAASmF,EAAaxE,GAWtBwE,EAAYlG,UAAUqC,KAAO,SAAUrD,GACrC,GAAIjB,KAAKuF,IAAK,CACZ,GAAIU,GAAS1C,EAASvD,KAAKuF,KAAKtE,EAAGjB,KAAK4F,KAAM5F,KAAKyF,GACnD,IAAIQ,IAAWlF,EAAY,MAAOf,MAAKkE,GAAGM,QAAQyB,EAAOnF,EACzDd,MAAK+D,IAAMkC,MAEXjG,MAAK+D,IAAM9C,GAGfkH,EAAYlG,UAAU0C,MAAQ,SAAU7D,GAAKd,KAAKkE,GAAGM,QAAQ1D,IAC7DqH,EAAYlG,UAAU2C,UAAY,WAChC5E,KAAKkE,GAAGW,OAAO7E,KAAK+D,IACpB/D,KAAKkE,GAAGY,eAGHqD,GACPhG,EAQFH,GAAgBoG,IAAM,SAAUC,EAAa9G,GAC3C,GAAIiC,GAAK9B,EAAa2G,EAAa9G,EAAS,EAC5C,OAAO,IAAI2G,GAAclI,KAAMwD,IAYjCxB,EAAgBsG,MAAQ,SAAUD,EAAajB,GAE7C,MADAA,KAAaA,EAAWzE,GACjB,GAAIe,GAAoB1D,KAAMqI,EAAa,SAAUpH,EAAGsH,GAAK,MAAwB,GAAjBnB,EAASnG,EAAGsH,MAWzFvG,EAAgBwG,IAAM,SAAUpB,GAC9B,MAAOpH,MAAKsI,MAAM5F,EAAU0E,GAAUqB,IAAIzH,IAY5CgB,EAAgB0G,MAAQ,SAAUL,EAAajB,GAE7C,MADAA,KAAaA,EAAWzE,GACjB,GAAIe,GAAoB1D,KAAMqI,EAAajB,IAWpDpF,EAAgB2G,IAAM,SAAUvB,GAC9B,MAAOpH,MAAK0I,MAAMhG,EAAU0E,GAAUqB,IAAIzH,GAG5C,IAAI4H,GAAqB,SAAUjF,GAEjC,QAASiF,GAAkBvH,EAAQmC,GACjCxD,KAAKqB,OAASA,EACdrB,KAAKuF,IAAM/B,EACXG,EAAUpD,KAAKP,MAOjB,MAXAgD,GAAS4F,EAAmBjF,GAO5BiF,EAAkB3G,UAAU+B,cAAgB,SAAUpC,GACpD,MAAO5B,MAAKqB,OAAOQ,UAAU,GAAIgH,GAAgBjH,EAAG5B,KAAKuF,IAAKvF,KAAKqB,UAG9DuH,GACPvF,GAEEwF,EAAmB,SAASlF,GAE9B,QAASkF,GAAgBjH,EAAG4B,EAAIwC,GAC9BhG,KAAKkE,GAAKtC,EACV5B,KAAKuF,IAAM/B,EACXxD,KAAKyF,GAAKO,EACVhG,KAAK+D,GAAK,EACV/D,KAAK8I,GAAK,EACVnF,EAAUpD,KAAKP,MAoBjB,MA3BAgD,GAAS6F,EAAiBlF,GAU1BkF,EAAgB5G,UAAUqC,KAAO,SAAUrD,GACzC,GAAGjB,KAAKuF,IAAK,CACX,GAAIwD,GAAIxF,EAASvD,KAAKuF,KAAKtE,EAAGjB,KAAK+D,KAAM/D,KAAKyF,GAC9C,IAAIsD,IAAMhI,EAAY,MAAOf,MAAKkE,GAAGM,QAAQuE,EAAEjI,EAC/Cd,MAAK8I,IAAMC,MAEX/I,MAAK+D,KACL/D,KAAK8I,IAAM7H,GAGf4H,EAAgB5G,UAAU0C,MAAQ,SAAU7D,GAAKd,KAAKkE,GAAGM,QAAQ1D,IACjE+H,EAAgB5G,UAAU2C,UAAY,WACpC,MAAgB,KAAZ5E,KAAK+D,GAAmB/D,KAAKkE,GAAGM,QAAQ,GAAIrD,KAChDnB,KAAKkE,GAAGW,OAAO7E,KAAK8I,GAAK9I,KAAK+D,QAC9B/D,MAAKkE,GAAGY,gBAGH+D,GACP1G,EAQFH,GAAgBgH,QAAU,SAAUX,EAAa9G,GAC/C,GAAmBiC,GAAfnC,EAASrB,IAIb,OAHI4C,GAAWyF,KACb7E,EAAK9B,EAAa2G,EAAa9G,EAAS,IAEnC,GAAIqH,GAAkBvH,EAAQmC,IAevCxB,EAAgBiH,cAAgB,SAAUC,EAAQ9B,GAChD,GAAI+B,GAAQnJ,IAEZ,OADAoH,KAAaA,EAAW3E,GACjB,GAAId,GAAoB,SAAUC,GACvC,GAAIwH,IAAQ,EAAOC,GAAQ,EAAOC,KAASC,KACvCC,EAAgBL,EAAMtH,UAAU,SAAUZ,GAC5C,GAAIsI,EAAGrI,OAAS,EAAG,CACjB,GAAIuI,GAAIF,EAAGG,QACPC,EAAQpG,EAAS6D,GAAUqC,EAAGxI,EAClC,IAAI0I,IAAU5I,EAAY,MAAOa,GAAE4C,QAAQmF,EAAM7I,EAC5C6I,KACH/H,EAAEiD,QAAO,GACTjD,EAAEkD,mBAEKuE,IACTzH,EAAEiD,QAAO,GACTjD,EAAEkD,eAEFwE,EAAG5E,KAAKzD,IAET,SAASH,GAAKc,EAAE4C,QAAQ1D,IAAO,WAChCsI,GAAQ,EACU,IAAdE,EAAGpI,SACDqI,EAAGrI,OAAS,GACdU,EAAEiD,QAAO,GACTjD,EAAEkD,eACOuE,IACTzH,EAAEiD,QAAO,GACTjD,EAAEkD,mBAKPhC,EAAYoG,IAAWnG,EAAWmG,MAAaA,EAAS/F,EAAe+F,IACxErG,EAAUqG,KAAYA,EAASjG,EAAsBiG,GACrD,IAAIU,GAAgBV,EAAOrH,UAAU,SAAUZ,GAC7C,GAAIqI,EAAGpI,OAAS,EAAG,CACjB,GAAIuI,GAAIH,EAAGI,QACPC,EAAQpG,EAAS6D,GAAUqC,EAAGxI,EAClC,IAAI0I,IAAU5I,EAAY,MAAOa,GAAE4C,QAAQmF,EAAM7I,EAC5C6I,KACH/H,EAAEiD,QAAO,GACTjD,EAAEkD,mBAEKsE,IACTxH,EAAEiD,QAAO,GACTjD,EAAEkD,eAEFyE,EAAG7E,KAAKzD,IAET,SAASH,GAAKc,EAAE4C,QAAQ1D,IAAO,WAChCuI,GAAQ,EACU,IAAdE,EAAGrI,SACDoI,EAAGpI,OAAS,GACdU,EAAEiD,QAAO,GACTjD,EAAEkD,eACOsE,IACTxH,EAAEiD,QAAO,GACTjD,EAAEkD,iBAIR,OAAO,IAAI5C,GAAiBsH,EAAeI,IAC1CT,GAGL,IAAIU,GAAuB,SAAUlG,GAEnC,QAASkG,GAAoBxI,EAAQyI,EAAGC,GACtC/J,KAAKqB,OAASA,EACdrB,KAAK4F,GAAKkE,EACV9J,KAAKgK,GAAKD,EACVpG,EAAUpD,KAAKP,MAOjB,MAZAgD,GAAS6G,EAAqBlG,GAQ9BkG,EAAoB5H,UAAU+B,cAAgB,SAAUpC,GACtD,MAAO5B,MAAKqB,OAAOQ,UAAU,GAAIoI,GAAkBrI,EAAG5B,KAAK4F,GAAI5F,KAAKgK,MAG/DH,GACPxG,GAEE4G,EAAqB,SAAUtG,GAGjC,QAASsG,GAAkBrI,EAAGkI,EAAGC,GAC/B/J,KAAKkE,GAAKtC,EACV5B,KAAK4F,GAAKkE,EACV9J,KAAKgK,GAAKD,EACVpG,EAAUpD,KAAKP,MAmBjB,MAzBAgD,GAASiH,EAAmBtG,GAS5BsG,EAAkBhI,UAAUqC,KAAO,SAAUrD,GACzB,IAAdjB,KAAK4F,OACP5F,KAAKkE,GAAGW,OAAO5D,GACfjB,KAAKkE,GAAGY,gBAGZmF,EAAkBhI,UAAU0C,MAAQ,SAAU7D,GAAKd,KAAKkE,GAAGM,QAAQ1D,IACnEmJ,EAAkBhI,UAAU2C,UAAY,WAClC5E,KAAKgK,KAAOvJ,EACdT,KAAKkE,GAAGM,QAAQ,GAAIlB,KAEpBtD,KAAKkE,GAAGW,OAAO7E,KAAKgK,IACpBhK,KAAKkE,GAAGY,gBAILmF,GACP9H,EAQFH,GAAgBkI,UAAa,SAAUC,EAAOC,GAC5C,GAAY,EAARD,EAAa,KAAM,IAAI7G,EAC3B,OAAO,IAAIuG,GAAoB7J,KAAMmK,EAAOC,GAG9C,IAAIC,GAAkB,SAAS1G,GAE7B,QAAS0G,GAAezI,EAAG0I,EAAKtE,GAC9BhG,KAAKkE,GAAKtC,EACV5B,KAAKuK,KAAOD,EACZtK,KAAKyF,GAAKO,EACVhG,KAAK4F,GAAK,EACV5F,KAAKoE,KAAM,EACXpE,KAAKmE,GAAK,KACVR,EAAUpD,KAAKP,MAkCjB,MA1CAgD,GAASqH,EAAgB1G,GAWzB0G,EAAepI,UAAUqC,KAAO,SAAUrD,GACxC,GAAIuJ,IAAc,CAClB,IAAIxK,KAAKuK,KAAKjJ,UAAW,CACvB,GAAImJ,GAAMlH,EAASvD,KAAKuK,KAAKjJ,WAAWL,EAAGjB,KAAK4F,KAAM5F,KAAKyF,GAC3D,IAAIgF,IAAQ1J,EAAY,MAAOf,MAAKkE,GAAGM,QAAQiG,EAAI3J,EACnDoF,SAAQuE,KAASD,GAAc,OACrBxK,MAAKuK,KAAKjJ,YACpBkJ,GAAc,EAEhB,IAAIA,EAAa,CACf,GAAIxK,KAAKoE,IACP,MAAOpE,MAAKkE,GAAGM,QAAQ,GAAIkG,OAAM,oDAEnC1K,MAAKoE,KAAM,EACXpE,KAAKmE,GAAKlD,IAGdoJ,EAAepI,UAAU0C,MAAQ,SAAU7D,GAAKd,KAAKkE,GAAGM,QAAQ1D,IAChEuJ,EAAepI,UAAU2C,UAAY,WAC/B5E,KAAKoE,KACPpE,KAAKkE,GAAGW,OAAO7E,KAAKmE,IACpBnE,KAAKkE,GAAGY,eAED9E,KAAKuK,KAAKH,eAAiB3J,EAClCT,KAAKkE,GAAGM,QAAQ,GAAIrD,KAEpBnB,KAAKkE,GAAGW,OAAO7E,KAAKuK,KAAKH,cACzBpK,KAAKkE,GAAGY,gBAILuF,GACPlI,EAOAH,GAAgB2I,OAAS,SAAUrJ,EAAWC,GAC5C,GAAI+I,MAAUjJ,EAASrB,IAUvB,IAREsK,EAD0B,gBAAjBzJ,WAAU,GACbA,UAAU,IAGdS,UAAWT,UAAU,GACrBU,QAASV,UAAU,GACnBuJ,aAAcvJ,UAAU,IAGxB+B,EAAY0H,EAAIhJ,WAAY,CAC9B,GAAIkC,GAAK8G,EAAIhJ,SACbgJ,GAAIhJ,UAAYI,EAAa8B,EAAI8G,EAAI/I,QAAS,GAEhD,MAAO,IAAII,GAAoB,SAAUC,GACvC,MAAOP,GAAOQ,UAAU,GAAIwI,GAAezI,EAAG0I,EAAKjJ,KAClDA,GAGP,IAAIuJ,GAAmB,SAAUjH,GAE/B,QAASiH,GAAgBvJ,EAAQiJ,GAC/BtK,KAAKqB,OAASA,EACdrB,KAAKuK,KAAOD,EACZ3G,EAAUpD,KAAKP,MAOjB,MAXAgD,GAAS4H,EAAiBjH,GAO1BiH,EAAgB3I,UAAU+B,cAAgB,SAAUpC,GAClD,MAAO5B,MAAKqB,OAAOQ,UAAU,GAAIgJ,IAAcjJ,EAAG5B,KAAKuK,KAAMvK,KAAKqB,UAG7DuJ,GACPvH,GAEEwH,GAAiB,SAASlH,GAE5B,QAASkH,GAAcjJ,EAAG0I,EAAKtE,GAC7BhG,KAAKkE,GAAKtC,EACV5B,KAAKuK,KAAOD,EACZtK,KAAKyF,GAAKO,EACVhG,KAAK4F,GAAK,EACVjC,EAAUpD,KAAKP,MA0BjB,MAhCAgD,GAAS6H,EAAelH,GASxBkH,EAAc5I,UAAUqC,KAAO,SAAUrD,GACvC,GAAIjB,KAAKuK,KAAKjJ,UAAW,CACvB,GAAImJ,GAAMlH,EAASvD,KAAKuK,KAAKjJ,WAAWL,EAAGjB,KAAK4F,KAAM5F,KAAKyF,GAC3D,IAAIgF,IAAQ1J,EAAY,MAAOf,MAAKkE,GAAGM,QAAQiG,EAAI3J,EAC/CoF,SAAQuE,KACVzK,KAAKkE,GAAGW,OAAO5D,GACfjB,KAAKkE,GAAGY,mBAEA9E,MAAKuK,KAAKjJ,YACpBtB,KAAKkE,GAAGW,OAAO5D,GACfjB,KAAKkE,GAAGY,gBAGZ+F,EAAc5I,UAAU0C,MAAQ,SAAU7D,GAAKd,KAAKkE,GAAGM,QAAQ1D,IAC/D+J,EAAc5I,UAAU2C,UAAY,WAC9B5E,KAAKuK,KAAKH,eAAiB3J,EAC7BT,KAAKkE,GAAGM,QAAQ,GAAIrD,KAEpBnB,KAAKkE,GAAGW,OAAO7E,KAAKuK,KAAKH,cACzBpK,KAAKkE,GAAGY,gBAIL+F,GACP1I,EAMFH,GAAgBmH,MAAQ,WACtB,GAAImB,KAUJ,IAREA,EAD0B,gBAAjBzJ,WAAU,GACbA,UAAU,IAGdS,UAAWT,UAAU,GACrBU,QAASV,UAAU,GACnBuJ,aAAcvJ,UAAU,IAGxB+B,EAAY0H,EAAIhJ,WAAY,CAC9B,GAAIkC,GAAK8G,EAAIhJ,SACbgJ,GAAIhJ,UAAYI,EAAa8B,EAAI8G,EAAI/I,QAAS,GAEhD,MAAO,IAAIqJ,GAAgB5K,KAAMsK,GAGnC,IAAIQ,IAAkB,SAAUnH,GAE9B,QAASmH,GAAezJ,EAAQiJ,GAC9BtK,KAAKqB,OAASA,EACdrB,KAAKuK,KAAOD,EACZ3G,EAAUpD,KAAKP,MAOjB,MAXAgD,GAAS8H,EAAgBnH,GAOzBmH,EAAe7I,UAAU+B,cAAgB,SAAUpC,GACjD,MAAO5B,MAAKqB,OAAOQ,UAAU,GAAIkJ,IAAanJ,EAAG5B,KAAKuK,KAAMvK,KAAKqB,UAG5DyJ,GACPzH,GAEE0H,GAAgB,SAASpH,GAE3B,QAASoH,GAAanJ,EAAG0I,EAAKtE,GAC5BhG,KAAKkE,GAAKtC,EACV5B,KAAKuK,KAAOD,EACZtK,KAAKyF,GAAKO,EACVhG,KAAK4F,GAAK,EACV5F,KAAKoE,KAAM,EACXpE,KAAKmE,GAAK,KACVR,EAAUpD,KAAKP,MA+BjB,MAvCAgD,GAAS+H,EAAcpH,GAWvBoH,EAAa9I,UAAUqC,KAAO,SAAUrD,GACtC,GAAIuJ,IAAc,CAClB,IAAIxK,KAAKuK,KAAKjJ,UAAW,CACvB,GAAImJ,GAAMlH,EAASvD,KAAKuK,KAAKjJ,WAAWL,EAAGjB,KAAK4F,KAAM5F,KAAKyF,GAC3D,IAAIgF,IAAQ1J,EAAY,MAAOf,MAAKkE,GAAGM,QAAQiG,EAAI3J,EACnDoF,SAAQuE,KAASD,GAAc,OACrBxK,MAAKuK,KAAKjJ,YACpBkJ,GAAc,EAEZA,KACFxK,KAAKoE,KAAM,EACXpE,KAAKmE,GAAKlD,IAGd8J,EAAa9I,UAAU0C,MAAQ,SAAU7D,GAAKd,KAAKkE,GAAGM,QAAQ1D,IAC9DiK,EAAa9I,UAAU2C,UAAY,WAC7B5E,KAAKoE,KACPpE,KAAKkE,GAAGW,OAAO7E,KAAKmE,IACpBnE,KAAKkE,GAAGY,eAED9E,KAAKuK,KAAKH,eAAiB3J,EAClCT,KAAKkE,GAAGM,QAAQ,GAAIrD,KAEpBnB,KAAKkE,GAAGW,OAAO7E,KAAKuK,KAAKH,cACzBpK,KAAKkE,GAAGY,gBAILiG,GACP5I,EAMFH,GAAgBgJ,KAAO,WACrB,GAAIV,KAUJ,IAREA,EAD0B,gBAAjBzJ,WAAU,GACbA,UAAU,IAGdS,UAAWT,UAAU,GACrBU,QAASV,UAAU,GACnBuJ,aAAcvJ,UAAU,IAGxB+B,EAAY0H,EAAIhJ,WAAY,CAC9B,GAAIkC,GAAK8G,EAAIhJ,SACbgJ,GAAIhJ,UAAYI,EAAa8B,EAAI8G,EAAI/I,QAAS,GAEhD,MAAO,IAAIuJ,IAAe9K,KAAMsK,GAGlC,IAAIxI,IAAqB,SAAS6B,GAEhC,QAAS7B,GAAkBqD,EAAU9D,EAAQI,EAAUD,GACrDxB,KAAKkE,GAAKiB,EACVnF,KAAKyF,GAAKpE,EACVrB,KAAKiL,IAAMxJ,EACXzB,KAAKkL,GAAK1J,EACVxB,KAAK4F,GAAK,EACVjC,EAAUpD,KAAKP,MAuBjB,MA9BAgD,GAASlB,EAAmB6B,GAU5B7B,EAAkBG,UAAUqC,KAAO,SAAUrD,GAC3C,GAAIkK,GAAY5H,EAASvD,KAAKiL,KAAKhK,EAAGjB,KAAK4F,GAAI5F,KAAKyF,GACpD,OAAI0F,KAAcpK,EAAmBf,KAAKkE,GAAGM,QAAQ2G,EAAUrK,QAC3DqK,GACFnL,KAAKkE,GAAGW,OAAO7E,KAAKkL,GAAKlL,KAAK4F,GAAK3E,GACnCjB,KAAKkE,GAAGY,eAER9E,KAAK4F,OAIT9D,EAAkBG,UAAU0C,MAAQ,SAAU7D,GAC5Cd,KAAKkE,GAAGM,QAAQ1D,IAGlBgB,EAAkBG,UAAU2C,UAAY,WACtC5E,KAAKkL,IAAMlL,KAAKkE,GAAGW,OAAO,IAC1B7E,KAAKkE,GAAGY,eAGHhD,GACPK,EAeFH,GAAgBoJ,KAAO,SAAU9J,EAAWC,GAC1C,MAAOH,GAAUpB,KAAMsB,EAAWC,GAAS,IAU7CS,EAAgBqJ,UAAY,SAAU/J,EAAWC,GAC/C,MAAOH,GAAUpB,KAAMsB,EAAWC,GAAS,GAG7C,IAAI+J,IAAmB,SAAU3H,GAE/B,QAAS2H,GAAgBjK,GACvBrB,KAAKqB,OAASA,EACdsC,EAAUpD,KAAKP,MAOjB,MAVAgD,GAASsI,EAAiB3H,GAM1B2H,EAAgBrJ,UAAU+B,cAAgB,SAAUpC,GAClD,MAAO5B,MAAKqB,OAAOQ,UAAU,GAAI0J,IAAc3J,KAG1C0J,GACPjI,GAEEkI,GAAiB,SAAU5H,GAE7B,QAAS4H,GAAc3J,GACrB5B,KAAKkE,GAAKtC,EACV5B,KAAKyF,GAAK,GAAIxF,GAAKuL,IACnB7H,EAAUpD,KAAKP,MAgBjB,MApBAgD,GAASuI,EAAe5H,GAOxB4H,EAActJ,UAAUqC,KAAO,SAAUrD,GACvCjB,KAAKyF,GAAGgG,IAAIxK,IAGdsK,EAActJ,UAAU0C,MAAQ,SAAU7D,GACxCd,KAAKkE,GAAGM,QAAQ1D,IAGlByK,EAActJ,UAAU2C,UAAY,WAClC5E,KAAKkE,GAAGW,OAAO7E,KAAKyF,IACpBzF,KAAKkE,GAAGY,eAGHyG,GACPpJ,EAMFH,GAAgB0J,MAAQ,WACtB,GAAwB,mBAAbzL,GAAKuL,IAAuB,KAAM,IAAI/H,UACjD,OAAO,IAAI6H,IAAgBtL,MAG7B,IAAI2L,IAAmB,SAAUhI,GAE/B,QAASgI,GAAgBtK,EAAQuC,EAAG9C,GAClCd,KAAKqB,OAASA,EACdrB,KAAK8D,GAAKF,EACV5D,KAAK+H,GAAKjH,EACV6C,EAAUpD,KAAKP,MAOjB,MAZAgD,GAAS2I,EAAiBhI,GAQ1BgI,EAAgB1J,UAAU+B,cAAgB,SAAUpC,GAClD,MAAO5B,MAAKqB,OAAOQ,UAAU,GAAI+J,IAAchK,EAAG5B,KAAK8D,GAAI9D,KAAK+H,MAG3D4D,GACPtI,GAEEuI,GAAiB,SAAUjI,GAE7B,QAASiI,GAAchK,EAAGgC,EAAG9C,GAC3Bd,KAAKkE,GAAKtC,EACV5B,KAAK8D,GAAKF,EACV5D,KAAK+H,GAAKjH,EACVd,KAAK6L,GAAK,GAAI5L,GAAK6L,IACnBnI,EAAUpD,KAAKP,MAwBjB,MA9BAgD,GAAS4I,EAAejI,GASxBiI,EAAc3J,UAAUqC,KAAO,SAAUrD,GACvC,GAAIsD,GAAMhB,EAASvD,KAAK8D,IAAI7C,EAC5B,IAAIsD,IAAQxD,EAAY,MAAOf,MAAKkE,GAAGM,QAAQD,EAAIzD,EACnD,IAAI6F,GAAO1F,CACX,OAAIjB,MAAK+H,KACPpB,EAAOpD,EAASvD,KAAK+H,IAAI9G,GACrB0F,IAAS5F,GAAmBf,KAAKkE,GAAGM,QAAQmC,EAAK7F,OAGvDd,MAAK6L,GAAGE,IAAIxH,EAAKoC,IAGnBiF,EAAc3J,UAAU0C,MAAQ,SAAU7D,GACxCd,KAAKkE,GAAGM,QAAQ1D,IAGlB8K,EAAc3J,UAAU2C,UAAY,WAClC5E,KAAKkE,GAAGW,OAAO7E,KAAK6L,IACpB7L,KAAKkE,GAAGY,eAGH8G,GACPzJ,EAQFH,GAAgBgK,MAAQ,SAAU3D,EAAa4D,GAC7C,GAAwB,mBAAbhM,GAAK6L,IAAuB,KAAM,IAAIrI,UACjD,OAAO,IAAIkI,IAAgB3L,KAAMqI,EAAa4D,GAGhD,IAAIC,IAAmB,SAAUvI,GAE/B,QAASuI,GAAgB7K,EAAQiG,EAAGxG,GAClCd,KAAKqB,OAASA,EACdrB,KAAKmM,GAAK7E,EACVtH,KAAK+H,GAAKjH,EACV6C,EAAUpD,KAAKP,MAOjB,MAZAgD,GAASkJ,EAAiBvI,GAQ1BuI,EAAgBjK,UAAU+B,cAAgB,SAAUpC,GAClD,MAAO5B,MAAKqB,OAAOQ,UAAU,GAAIuK,IAAcxK,EAAG5B,KAAKmM,GAAInM,KAAK+H,MAG3DmE,GACP7I,GAEE+I,GAAiB,SAAUzI,GAG7B,QAASyI,GAAcxK,EAAG0F,EAAGxG,GAC3Bd,KAAKkE,GAAKtC,EACV5B,KAAKmM,GAAK7E,EACVtH,KAAK+H,GAAKjH,EACVd,KAAK4F,GAAK,EACVjC,EAAUpD,KAAKP,MAgBjB,MAvBAgD,GAASoJ,EAAezI,GAUxByI,EAAcnK,UAAUqC,KAAO,SAAUrD,GACnCjB,KAAK4F,IAAM5F,KAAKmM,KACdnM,KAAK+H,KAAO/H,KAAK4F,GACnB5F,KAAKkE,GAAGY,cAER9E,KAAKkE,GAAGW,OAAO5D,IAGnBjB,KAAK4F,MAEPwG,EAAcnK,UAAU0C,MAAQ,SAAU7D,GAAKd,KAAKkE,GAAGM,QAAQ1D,IAC/DsL,EAAcnK,UAAU2C,UAAY,WAAc5E,KAAKkE,GAAGY,eAEnDsH,GACPjK,EAUFH,GAAgBqK,MAAQ,SAAUC,EAAOC,GACvC,GAAIC,GAAQF,GAAS,CACrB,IAAY,EAARE,EAAa,KAAM,IAAInM,GAAGiD,uBAC9B,IAAmB,gBAARiJ,IAA0BC,EAAND,EAC7B,KAAM,IAAIlM,GAAGiD,uBAEf,OAAO,IAAI4I,IAAgBlM,KAAMwM,EAAOD,GAG1C,IAAIE,IAAyB,SAAU9I,GAErC,QAAS8I,GAAsBpL,EAAQP,EAAG+F,GACxC7G,KAAKqB,OAASA,EACdrB,KAAK+H,GAAKjH,EACVd,KAAKkH,GAAKL,EACVlD,EAAUpD,KAAKP,MAajB,MAlBAgD,GAASyJ,EAAuB9I,GAQhC8I,EAAsBxK,UAAU+B,cAAgB,SAAUpC,GACxD,MAAI5B,MAAKkH,GAAK,GACZtF,EAAEiD,OAAO,IACTjD,EAAEkD,cACKzC,GAGFrC,KAAKqB,OAAOQ,UAAU,GAAI6K,IAAoB9K,EAAG5B,KAAK+H,GAAI/H,KAAKkH,MAGjEuF,GACPpJ,GAEEqJ,GAAuB,SAAU/I,GAEnC,QAAS+I,GAAoB9K,EAAGd,EAAG+F,GACjC7G,KAAKkE,GAAKtC,EACV5B,KAAK+H,GAAKjH,EACVd,KAAKkH,GAAKL,EACV7G,KAAKmE,GAAK,EACVnE,KAAKoE,KAAM,EACXpE,KAAK4F,GAAK,EACVjC,EAAUpD,KAAKP,MAoBjB,MA5BAgD,GAAS0J,EAAqB/I,GAW9B+I,EAAoBzK,UAAUqC,KAAO,SAAUrD,GACzCjB,KAAK4F,IAAM5F,KAAKkH,IAAMjG,IAAMjB,KAAK+H,KACnC/H,KAAKoE,KAAM,EACXpE,KAAKmE,GAAKnE,KAAK4F,IAEjB5F,KAAK4F,MAEP8G,EAAoBzK,UAAU0C,MAAQ,SAAU7D,GAAKd,KAAKkE,GAAGM,QAAQ1D,IACrE4L,EAAoBzK,UAAU2C,UAAY,WACpC5E,KAAKoE,IACPpE,KAAKkE,GAAGW,OAAO7E,KAAKmE,IAEpBnE,KAAKkE,GAAGW,OAAO,IAEjB7E,KAAKkE,GAAGY,eAGH4H,GACPvK,EAcF,OANAH,GAAgB2K,YAAc,SAASlF,EAAeC,GACpD,GAAIb,IAAKa,GAAa,CAEtB,OADAZ,MAAKC,IAAIF,KAAOG,EAAAA,IAAaH,EAAI,GAC1B,GAAI4F,IAAsBzM,KAAMyH,EAAeZ,IAGjDxG"} \ No newline at end of file diff --git a/node_modules/rx-lite-aggregates/rx.lite.aggregates.min.js b/node_modules/rx-lite-aggregates/rx.lite.aggregates.min.js new file mode 100644 index 0000000..649e289 --- /dev/null +++ b/node_modules/rx-lite-aggregates/rx.lite.aggregates.min.js @@ -0,0 +1,3 @@ +/* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/ +(function(a){function b(a){return a&&a.Object===Object?a:null}var c={"function":!0,object:!0},d=c[typeof exports]&&exports&&!exports.nodeType?exports:null,e=c[typeof module]&&module&&!module.nodeType?module:null,f=b(d&&e&&"object"==typeof global&&global),g=b(c[typeof self]&&self),h=b(c[typeof window]&&window),i=(e&&e.exports===d?d:null,b(c[typeof this]&&this)),j=f||h!==(i&&i.window)&&h||g||i||Function("return this")();"function"==typeof define&&define.amd?define(["./rx.lite"],function(b,c){return a(j,c,b)}):"object"==typeof module&&module&&module.exports===d?module.exports=a(j,module.exports,require("rx-lite")):j.Rx=a(j,{},j.Rx)}).call(this,function(a,b,c,d){function e(a){return function(){try{return a.apply(this,arguments)}catch(b){return C.e=b,C}}}function f(a){if(0===a.length)throw new z;return a[0]}function g(a,b,c,d){var e=y(b,c,3);return new k(function(b){return a.subscribe(new da(b,a,e,d))},a)}var h=c.Observable,i=h.prototype,j=c.BinaryDisposable,k=c.AnonymousObservable,l=c.internals.AbstractObserver,m=c.Disposable.empty,n=c.helpers,o=n.defaultComparer,p=n.identity,q=n.defaultSubComparer,r=n.isFunction,s=n.isPromise,t=n.isArrayLike,u=n.isIterable,v=c.internals.inherits,w=h.fromPromise,x=h.from,y=c.internals.bindCallback,z=c.EmptyError,A=c.ObservableBase,B=c.ArgumentOutOfRangeError,C={e:{}},D=c.internals.tryCatch=function(a){if(!r(a))throw new TypeError("fn must be a function");return e(a)},E=function(a){function b(b,c,d){this.source=b,this._k=c,this._c=d,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new F(a,this._k,this._c))},b}(A),F=function(a){function b(b,c,d){this._o=b,this._k=c,this._c=d,this._v=null,this._hv=!1,this._l=[],a.call(this)}return v(b,a),b.prototype.next=function(a){var b=D(this._k)(a);if(b===C)return this._o.onError(b.e);var c=0;if(this._hv){if(c=D(this._c)(b,this._v),c===C)return this._o.onError(c.e)}else this._hv=!0,this._v=b;c>0&&(this._v=b,this._l=[]),c>=0&&this._l.push(a)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(this._l),this._o.onCompleted()},b}(l),G=function(a){function b(b,c,d,e){this.source=b,this.accumulator=c,this.hasSeed=d,this.seed=e,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new H(a,this))},b}(A),H=function(a){function b(b,c){this._o=b,this._p=c,this._fn=c.accumulator,this._hs=c.hasSeed,this._s=c.seed,this._ha=!1,this._a=null,this._hv=!1,this._i=0,a.call(this)}return v(b,a),b.prototype.next=function(a){return!this._hv&&(this._hv=!0),this._ha?this._a=D(this._fn)(this._a,a,this._i,this._p):(this._a=this._hs?D(this._fn)(this._s,a,this._i,this._p):a,this._ha=!0),this._a===C?this._o.onError(this._a.e):void this._i++},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._hv&&this._o.onNext(this._a),!this._hv&&this._hs&&this._o.onNext(this._s),!this._hv&&!this._hs&&this._o.onError(new z),this._o.onCompleted()},b}(l);i.reduce=function(){var a,b=!1,c=arguments[0];return 2===arguments.length&&(b=!0,a=arguments[1]),new G(this,c,b,a)};var I=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new J(a,this._fn,this.source))},b}(A),J=function(a){function b(b,c,d){this._o=b,this._fn=c,this._s=d,this._i=0,a.call(this)}return v(b,a),b.prototype.next=function(a){var b=D(this._fn)(a,this._i++,this._s);return b===C?this._o.onError(b.e):void(Boolean(b)&&(this._o.onNext(!0),this._o.onCompleted()))},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(!1),this._o.onCompleted()},b}(l);i.some=function(a,b){var c=y(a,b,3);return new I(this,c)};var K=function(a){function b(b){this.source=b,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new L(a))},b}(A),L=function(a){function b(b){this._o=b,a.call(this)}return v(b,a),b.prototype.next=function(){this._o.onNext(!1),this._o.onCompleted()},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(!0),this._o.onCompleted()},b}(l);i.isEmpty=function(){return new K(this)};var M=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new N(a,this._fn,this.source))},b}(A),N=function(a){function b(b,c,d){this._o=b,this._fn=c,this._s=d,this._i=0,a.call(this)}return v(b,a),b.prototype.next=function(a){var b=D(this._fn)(a,this._i++,this._s);return b===C?this._o.onError(b.e):void(Boolean(b)||(this._o.onNext(!1),this._o.onCompleted()))},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(!0),this._o.onCompleted()},b}(l);i.every=function(a,b){var c=y(a,b,3);return new M(this,c)};var O=function(a){function b(b,c,d){var e=+d||0;Math.abs(e)===1/0&&(e=0),this.source=b,this._elem=c,this._n=e,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this._n<0?(a.onNext(!1),a.onCompleted(),m):this.source.subscribe(new P(a,this._elem,this._n))},b}(A),P=function(a){function b(b,c,d){this._o=b,this._elem=c,this._n=d,this._i=0,a.call(this)}function c(a,b){return 0===a&&0===b||a===b||isNaN(a)&&isNaN(b)}return v(b,a),b.prototype.next=function(a){this._i++>=this._n&&c(a,this._elem)&&(this._o.onNext(!0),this._o.onCompleted())},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(!1),this._o.onCompleted()},b}(l);i.includes=function(a,b){return new O(this,a,b)};var Q=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new R(a,this._fn,this.source))},b}(A),R=function(a){function b(b,c,d){this._o=b,this._fn=c,this._s=d,this._i=0,this._c=0,a.call(this)}return v(b,a),b.prototype.next=function(a){if(this._fn){var b=D(this._fn)(a,this._i++,this._s);if(b===C)return this._o.onError(b.e);Boolean(b)&&this._c++}else this._c++},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(this._c),this._o.onCompleted()},b}(l);i.count=function(a,b){var c=y(a,b,3);return new Q(this,c)};var S=function(a){function b(b,c,d){this.source=b,this._e=c,this._n=d,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this._n<0?(a.onNext(-1),a.onCompleted(),m):this.source.subscribe(new T(a,this._e,this._n))},b}(A),T=function(a){function b(b,c,d){this._o=b,this._e=c,this._n=d,this._i=0,a.call(this)}return v(b,a),b.prototype.next=function(a){this._i>=this._n&&a===this._e&&(this._o.onNext(this._i),this._o.onCompleted()),this._i++},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(-1),this._o.onCompleted()},b}(l);i.indexOf=function(a,b){var c=+b||0;return Math.abs(c)===1/0&&(c=0),new S(this,a,c)};var U=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new V(a,this._fn,this.source))},b}(A),V=function(a){function b(b,c,d){this._o=b,this._fn=c,this._s=d,this._i=0,this._c=0,a.call(this)}return v(b,a),b.prototype.next=function(a){if(this._fn){var b=D(this._fn)(a,this._i++,this._s);if(b===C)return this._o.onError(b.e);this._c+=b}else this._c+=a},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onNext(this._c),this._o.onCompleted()},b}(l);i.sum=function(a,b){var c=y(a,b,3);return new U(this,c)},i.minBy=function(a,b){return b||(b=q),new E(this,a,function(a,c){return-1*b(a,c)})},i.min=function(a){return this.minBy(p,a).map(f)},i.maxBy=function(a,b){return b||(b=q),new E(this,a,b)},i.max=function(a){return this.maxBy(p,a).map(f)};var W=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new X(a,this._fn,this.source))},b}(A),X=function(a){function b(b,c,d){this._o=b,this._fn=c,this._s=d,this._c=0,this._t=0,a.call(this)}return v(b,a),b.prototype.next=function(a){if(this._fn){var b=D(this._fn)(a,this._c++,this._s);if(b===C)return this._o.onError(b.e);this._t+=b}else this._c++,this._t+=a},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){return 0===this._c?this._o.onError(new z):(this._o.onNext(this._t/this._c),void this._o.onCompleted())},b}(l);i.average=function(a,b){var c,d=this;return r(a)&&(c=y(a,b,3)),new W(d,c)},i.sequenceEqual=function(a,b){var c=this;return b||(b=o),new k(function(d){var e=!1,f=!1,g=[],h=[],i=c.subscribe(function(a){if(h.length>0){var c=h.shift(),e=D(b)(c,a);if(e===C)return d.onError(e.e);e||(d.onNext(!1),d.onCompleted())}else f?(d.onNext(!1),d.onCompleted()):g.push(a)},function(a){d.onError(a)},function(){e=!0,0===g.length&&(h.length>0?(d.onNext(!1),d.onCompleted()):f&&(d.onNext(!0),d.onCompleted()))});(t(a)||u(a))&&(a=x(a)),s(a)&&(a=w(a));var k=a.subscribe(function(a){if(g.length>0){var c=g.shift(),f=D(b)(c,a);if(f===C)return d.onError(f.e);f||(d.onNext(!1),d.onCompleted())}else e?(d.onNext(!1),d.onCompleted()):h.push(a)},function(a){d.onError(a)},function(){f=!0,0===h.length&&(g.length>0?(d.onNext(!1),d.onCompleted()):e&&(d.onNext(!0),d.onCompleted()))});return new j(i,k)},c)};var Y=function(a){function b(b,c,d){this.source=b,this._i=c,this._d=d,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Z(a,this._i,this._d))},b}(A),Z=function(a){function b(b,c,d){this._o=b,this._i=c,this._d=d,a.call(this)}return v(b,a),b.prototype.next=function(a){0===this._i--&&(this._o.onNext(a),this._o.onCompleted())},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._d===d?this._o.onError(new B):(this._o.onNext(this._d),this._o.onCompleted())},b}(l);i.elementAt=function(a,b){if(0>a)throw new B;return new Y(this,a,b)};var $=function(a){function b(b,c,d){this._o=b,this._obj=c,this._s=d,this._i=0,this._hv=!1,this._v=null,a.call(this)}return v(b,a),b.prototype.next=function(a){var b=!1;if(this._obj.predicate){var c=D(this._obj.predicate)(a,this._i++,this._s);if(c===C)return this._o.onError(c.e);Boolean(c)&&(b=!0)}else this._obj.predicate||(b=!0);if(b){if(this._hv)return this._o.onError(new Error("Sequence contains more than one matching element"));this._hv=!0,this._v=a}},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._hv?(this._o.onNext(this._v),this._o.onCompleted()):this._obj.defaultValue===d?this._o.onError(new z):(this._o.onNext(this._obj.defaultValue),this._o.onCompleted())},b}(l);i.single=function(a,b){var c={},d=this;if(c="object"==typeof arguments[0]?arguments[0]:{predicate:arguments[0],thisArg:arguments[1],defaultValue:arguments[2]},r(c.predicate)){var e=c.predicate;c.predicate=y(e,c.thisArg,3)}return new k(function(a){return d.subscribe(new $(a,c,d))},d)};var _=function(a){function b(b,c){this.source=b,this._obj=c,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new aa(a,this._obj,this.source))},b}(A),aa=function(a){function b(b,c,d){this._o=b,this._obj=c,this._s=d,this._i=0,a.call(this)}return v(b,a),b.prototype.next=function(a){if(this._obj.predicate){var b=D(this._obj.predicate)(a,this._i++,this._s);if(b===C)return this._o.onError(b.e);Boolean(b)&&(this._o.onNext(a),this._o.onCompleted())}else this._obj.predicate||(this._o.onNext(a),this._o.onCompleted())},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._obj.defaultValue===d?this._o.onError(new z):(this._o.onNext(this._obj.defaultValue),this._o.onCompleted())},b}(l);i.first=function(){var a={};if(a="object"==typeof arguments[0]?arguments[0]:{predicate:arguments[0],thisArg:arguments[1],defaultValue:arguments[2]},r(a.predicate)){var b=a.predicate;a.predicate=y(b,a.thisArg,3)}return new _(this,a)};var ba=function(a){function b(b,c){this.source=b,this._obj=c,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new ca(a,this._obj,this.source))},b}(A),ca=function(a){function b(b,c,d){this._o=b,this._obj=c,this._s=d,this._i=0,this._hv=!1,this._v=null,a.call(this)}return v(b,a),b.prototype.next=function(a){var b=!1;if(this._obj.predicate){var c=D(this._obj.predicate)(a,this._i++,this._s);if(c===C)return this._o.onError(c.e);Boolean(c)&&(b=!0)}else this._obj.predicate||(b=!0);b&&(this._hv=!0,this._v=a)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._hv?(this._o.onNext(this._v),this._o.onCompleted()):this._obj.defaultValue===d?this._o.onError(new z):(this._o.onNext(this._obj.defaultValue),this._o.onCompleted())},b}(l);i.last=function(){var a={};if(a="object"==typeof arguments[0]?arguments[0]:{predicate:arguments[0],thisArg:arguments[1],defaultValue:arguments[2]},r(a.predicate)){var b=a.predicate;a.predicate=y(b,a.thisArg,3)}return new ba(this,a)};var da=function(a){function b(b,c,d,e){this._o=b,this._s=c,this._cb=d,this._y=e,this._i=0,a.call(this)}return v(b,a),b.prototype.next=function(a){var b=D(this._cb)(a,this._i,this._s);return b===C?this._o.onError(b.e):void(b?(this._o.onNext(this._y?this._i:a),this._o.onCompleted()):this._i++)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._y&&this._o.onNext(-1),this._o.onCompleted()},b}(l);i.find=function(a,b){return g(this,a,b,!1)},i.findIndex=function(a,b){return g(this,a,b,!0)};var ea=function(a){function b(b){this.source=b,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new fa(a))},b}(A),fa=function(b){function c(c){this._o=c,this._s=new a.Set,b.call(this)}return v(c,b),c.prototype.next=function(a){this._s.add(a)},c.prototype.error=function(a){this._o.onError(a)},c.prototype.completed=function(){this._o.onNext(this._s),this._o.onCompleted()},c}(l);i.toSet=function(){if("undefined"==typeof a.Set)throw new TypeError;return new ea(this)};var ga=function(a){function b(b,c,d){this.source=b,this._k=c,this._e=d,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new ha(a,this._k,this._e))},b}(A),ha=function(b){function c(c,d,e){this._o=c,this._k=d,this._e=e,this._m=new a.Map,b.call(this)}return v(c,b),c.prototype.next=function(a){var b=D(this._k)(a);if(b===C)return this._o.onError(b.e);var c=a;return this._e&&(c=D(this._e)(a),c===C)?this._o.onError(c.e):void this._m.set(b,c)},c.prototype.error=function(a){this._o.onError(a)},c.prototype.completed=function(){this._o.onNext(this._m),this._o.onCompleted()},c}(l);i.toMap=function(b,c){if("undefined"==typeof a.Map)throw new TypeError;return new ga(this,b,c)};var ia=function(a){function b(b,c,d){this.source=b,this._b=c,this._e=d,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new ja(a,this._b,this._e))},b}(A),ja=function(a){function b(b,c,d){this._o=b,this._b=c,this._e=d,this._i=0,a.call(this)}return v(b,a),b.prototype.next=function(a){this._i>=this._b&&(this._e===this._i?this._o.onCompleted():this._o.onNext(a)),this._i++},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(l);i.slice=function(a,b){var d=a||0;if(0>d)throw new c.ArgumentOutOfRangeError;if("number"==typeof b&&d>b)throw new c.ArgumentOutOfRangeError;return new ia(this,d,b)};var ka=function(a){function b(b,c,d){this.source=b,this._e=c,this._n=d,a.call(this)}return v(b,a),b.prototype.subscribeCore=function(a){return this._n<0?(a.onNext(-1),a.onCompleted(),m):this.source.subscribe(new la(a,this._e,this._n))},b}(A),la=function(a){function b(b,c,d){this._o=b,this._e=c,this._n=d,this._v=0,this._hv=!1,this._i=0,a.call(this)}return v(b,a),b.prototype.next=function(a){this._i>=this._n&&a===this._e&&(this._hv=!0,this._v=this._i),this._i++},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._hv?this._o.onNext(this._v):this._o.onNext(-1),this._o.onCompleted()},b}(l);return i.lastIndexOf=function(a,b){var c=+b||0;return Math.abs(c)===1/0&&(c=0),new ka(this,a,c)},c}); +//# sourceMappingURL=rx.lite.aggregates.map \ No newline at end of file diff --git a/node_modules/rx-lite/package.json b/node_modules/rx-lite/package.json new file mode 100644 index 0000000..c9a7e28 --- /dev/null +++ b/node_modules/rx-lite/package.json @@ -0,0 +1,101 @@ +{ + "_args": [ + [ + { + "raw": "rx-lite@^4.0.8", + "scope": null, + "escapedName": "rx-lite", + "name": "rx-lite", + "rawSpec": "^4.0.8", + "spec": ">=4.0.8 <5.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\inquirer" + ] + ], + "_from": "rx-lite@>=4.0.8 <5.0.0", + "_id": "rx-lite@4.0.8", + "_inCache": true, + "_location": "/rx-lite", + "_nodeVersion": "5.5.0", + "_npmOperationalInternal": { + "host": "packages-6-west.internal.npmjs.com", + "tmp": "tmp/rx-lite-4.0.8.tgz_1455670072274_0.041623756755143404" + }, + "_npmUser": { + "name": "mattpodwysocki", + "email": "matthew.podwysocki@gmail.com" + }, + "_npmVersion": "3.7.1", + "_phantomChildren": {}, + "_requested": { + "raw": "rx-lite@^4.0.8", + "scope": null, + "escapedName": "rx-lite", + "name": "rx-lite", + "rawSpec": "^4.0.8", + "spec": ">=4.0.8 <5.0.0", + "type": "range" + }, + "_requiredBy": [ + "/inquirer", + "/rx-lite-aggregates" + ], + "_resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", + "_shasum": "0b1e11af8bc44836f04a6407e92da42467b79444", + "_shrinkwrap": null, + "_spec": "rx-lite@^4.0.8", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\inquirer", + "author": { + "name": "Cloud Programmability Team", + "url": "https://github.com/Reactive-Extensions/RxJS/blob/master/authors.txt" + }, + "browser": { + "index.js": "rx.lite.js" + }, + "bugs": { + "url": "https://github.com/Reactive-Extensions/RxJS/issues" + }, + "dependencies": {}, + "description": "Lightweight library for composing asynchronous and event-based operations in JavaScript", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "0b1e11af8bc44836f04a6407e92da42467b79444", + "tarball": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz" + }, + "homepage": "https://github.com/Reactive-Extensions/RxJS", + "jam": { + "main": "rx.lite.js" + }, + "keywords": [ + "React", + "Reactive", + "Events", + "Rx", + "RxJS" + ], + "licenses": [ + { + "type": "Apache License, Version 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + } + ], + "main": "rx.lite.js", + "maintainers": [ + { + "name": "mattpodwysocki", + "email": "matthew.podwysocki@gmail.com" + } + ], + "name": "rx-lite", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/Reactive-Extensions/RxJS.git" + }, + "scripts": {}, + "title": "Reactive Extensions for JavaScript (RxJS) Lite", + "version": "4.0.8" +} diff --git a/node_modules/rx-lite/readme.md b/node_modules/rx-lite/readme.md new file mode 100644 index 0000000..4411545 --- /dev/null +++ b/node_modules/rx-lite/readme.md @@ -0,0 +1,173 @@ +# RxJS Lite Module # + +The Reactive Extensions for JavaScript Lite version is a lightweight version of the Reactive Extensions for JavaScript which covers most of the day to day operators you might use all in a single library. Functionality such as bridging to events, promises, callbacks, Node.js-style callbacks, time-based operations and more are built right in. This comes with `rx.lite.js` which is for use in modern development environments such as > IE9 and server-side environments such as Node.js. + +## Getting Started + +There are a number of ways to get started with RxJS. + +### Installing with [NPM](https://npmjs.org/) + +```bash` +$ npm install rx-lite +$ npm install -g rx-lite +``` + +### Using with Node.js and Ringo.js + +```js +var Rx = require('rx-lite'); +``` + +### In a Browser: + +```html + + +``` + +## Included Observable Operators ## + +### `Observable Methods` +- [`catch | catchException`](../../doc/api/core/operators/catch.md) +- [`concat`](../../doc/api/core/operators/concat.md) +- [`create | createWithDisposable`](../../doc/api/core/operators/create.md) +- [`defer`](../../doc/api/core/operators/defer.md) +- [`empty`](../../doc/api/core/operators/empty.md) +- [`from`](../../doc/api/core/operators/from.md) +- [`fromArray`](../../doc/api/core/operators/fromarray.md) +- [`fromCallback`](../../doc/api/core/operators/fromcallback.md) +- [`fromEvent`](../../doc/api/core/operators/fromevent.md) +- [`fromEventPattern`](../../doc/api/core/operators/fromeventpattern.md) +- [`fromNodeCallback`](../../doc/api/core/operators/fromnodecallback.md) +- [`fromPromise`](../../doc/api/core/operators/frompromise.md) +- [`interval`](../../doc/api/core/operators/interval.md) +- [`just`](../../doc/api/core/operators/return.md) +- [`merge`](../../doc/api/core/operators/merge.md) +- [`mergeDelayError`](../../doc/api/core/operators/mergedelayerror.md) +- [`never`](../../doc/api/core/operators/never.md) +- [`of`](../../doc/api/core/operators/of.md) +- [`ofWithScheduler`](../../doc/api/core/operators/ofwithscheduler.md) +- [`range`](../../doc/api/core/operators/range.md) +- [`repeat`](../../doc/api/core/operators/repeat.md) +- [`return | returnValue`](../../doc/api/core/operators/return.md) +- [`throw | throwError | throwException`](../../doc/api/core/operators/throw.md) +- [`timer`](../../doc/api/core/operators/timer.md) +- [`zip`](../../doc/api/core/operators/zip.md) +- [`zipArray`](../../doc/api/core/operators/ziparray.md) + +### `Observable Instance Methods` +- [`asObservable`](../../doc/api/core/operators/asobservable.md) +- [`catch | catchException`](../../doc/api/core/operators/catchproto.md) +- [`combineLatest`](../../doc/api/core/operators/combinelatest.md) +- [`concat`](../../doc/api/core/operators/concatproto.md) +- [`concatMap`](../../doc/api/core/operators/concatmap.md) +- [`connect`](../../doc/api/core/operators/connect.md) +- [`debounce`](../../doc/api/core/operators/debounce.md) +- [`defaultIfEmpty`](../../doc/api/core/operators/defaultifempty.md) +- [`delay`](../../doc/api/core/operators/delay.md) +- [`dematerialize`](../../doc/api/core/operators/dematerialize.md) +- [`distinctUntilChanged`](../../doc/api/core/operators/distinctuntilchanged.md) +- [`do | doAction`](../../doc/api/core/operators/do.md) +- [`doOnNext`](../../doc/api/core/operators/doonnext.md) +- [`doOnError`](../../doc/api/core/operators/doonerror.md) +- [`doOnCompleted`](../../doc/api/core/operators/dooncompleted.md) +- [`filter`](../../doc/api/core/operators/where.md) +- [`finally | finallyAction`](../../doc/api/core/operators/finally.md) +- [`flatMap`](../../doc/api/core/operators/selectmany.md) +- [`flatMapLatest`](../../doc/api/core/operators/flatmaplatest.md) +- [`ignoreElements`](../../doc/api/core/operators/ignoreelements.md) +- [`map`](../../doc/api/core/operators/select.md) +- [`merge`](../../doc/api/core/operators/mergeproto.md) +- [`mergeObservable | mergeAll`](../../doc/api/core/operators/mergeall.md) +- [`multicast`](../../doc/api/core/operators/multicast.md) +- [`publish`](../../doc/api/core/operators/publish.md) +- [`publishLast`](../../doc/api/core/operators/publishlast.md) +- [`publishValue`](../../doc/api/core/operators/publishvalue.md) +- [`refCount`](../../doc/api/core/operators/refcount.md) +- [`repeat`](../../doc/api/core/operators/repeat.md) +- [`replay`](../../doc/api/core/operators/replay.md) +- [`retry`](../../doc/api/core/operators/retry.md) +- [`retryWhen`](../../doc/api/core/operators/retrywhen.md) +- [`sample`](../../doc/api/core/operators/sample.md) +- [`scan`](../../doc/api/core/operators/scan.md) +- [`select`](../../doc/api/core/operators/select.md) +- [`selectConcat`](../../doc/api/core/operators/concatmap.md) +- [`selectMany`](../../doc/api/core/operators/selectmany.md) +- [`selectSwitch`](../../doc/api/core/operators/flatmaplatest.md) +- [`singleInstance`](../../doc/api/core/operators/singleinstance.md) +- [`skip`](../../doc/api/core/operators/skip.md) +- [`skipLast`](../../doc/api/core/operators/skiplast.md) +- [`skipUntil`](../../doc/api/core/operators/skipuntil.md) +- [`skipWhile`](../../doc/api/core/operators/skipwhile.md) +- [`startWith`](../../doc/api/core/operators/startwith.md) +- [`subscribe | forEach`](../../doc/api/core/operators/subscribe.md) +- [`subscribeOnNext`](../../doc/api/core/operators/subscribeonnext.md) +- [`subscribeOnError`](../../doc/api/core/operators/subscribeonerror.md) +- [`subscribeOnCompleted`](../../doc/api/core/operators/subscribeoncompleted.md) +- [`switch | switchLatest`](../../doc/api/core/operators/switch.md) +- [`take`](../../doc/api/core/operators/take.md) +- [`takeLast`](../../doc/api/core/operators/takelast.md) +- [`takeUntil`](../../doc/api/core/operators/takeuntil.md) +- [`takeWhile`](../../doc/api/core/operators/takewhile.md) +- [`tap`](../../doc/api/core/operators/do.md) +- [`tapOnNext`](../../doc/api/core/operators/doonnext.md) +- [`tapOnError`](../../doc/api/core/operators/doonerror.md) +- [`tapOnCompleted`](../../doc/api/core/operators/dooncompleted.md) +- [`throttle`](../../doc/api/core/operators/throttle.md) +- [`timeout`](../../doc/api/core/operators/timeout.md) +- [`timestamp`](../../doc/api/core/operators/timestamp.md) +- [`toArray`](../../doc/api/core/operators/toarray.md) +- [`transduce`](../../doc/api/core/operators/transduce.md) +- [`where`](../../doc/api/core/operators/where.md) +- [`withLatestFrom`](../../doc/api/core/operators/withlatestfrom.md) +- [`zip`](../../doc/api/core/operators/zipproto.md) + +## Included Classes ## + +### Core Objects +- [`Rx.Observer`](../../doc/api/core/observer.md) +- [`Rx.Notification`](../../doc/api/core/notification.md) + +### Subjects + +- [`Rx.AsyncSubject`](../../doc/api/subjects/asyncsubject.md) +- [`Rx.BehaviorSubject`](../../doc/api/subjects/behaviorsubject.md) +- [`Rx.ReplaySubject`](../../doc/api/subjects/replaysubject.md) +- [`Rx.Subject`](../../doc/api/subjects/subject.md) + +### Schedulers + +- [`Rx.Scheduler`](../../doc/api/schedulers/scheduler.md) + +### Disposables + +- [`Rx.CompositeDisposable`](../../doc/api/disposables/compositedisposable.md) +- [`Rx.Disposable`](../../doc/api/disposables/disposable.md) +- [`Rx.RefCountDisposable`](../../doc/api/disposables/refcountdisposable.md) +- [`Rx.SerialDisposable`](../../doc/api/disposables/serialdisposable.md) +- [`Rx.SingleAssignmentDisposable`](../../doc/api/disposables/singleassignmentdisposable.md) + +## Contributing ## + +There are lots of ways to contribute to the project, and we appreciate our [contributors](https://github.com/Reactive-Extensions/RxJS/wiki/Contributors). If you wish to contribute, check out our [style guide]((https://github.com/Reactive-Extensions/RxJS/tree/master/doc/contributing)). + +You can contribute by reviewing and sending feedback on code checkins, suggesting and trying out new features as they are implemented, submit bugs and help us verify fixes as they are checked in, as well as submit code fixes or code contributions of your own. Note that all code submissions will be rigorously reviewed and tested by the Rx Team, and only those that meet an extremely high bar for both quality and design/roadmap appropriateness will be merged into the source. + +## License ## + +Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. +Microsoft Open Technologies would like to thank its contributors, a list +of whom are at https://github.com/Reactive-Extensions/RxJS/wiki/Contributors. + +Licensed under the Apache License, Version 2.0 (the "License"); you +may not use this file except in compliance with the License. You may +obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing permissions +and limitations under the License. diff --git a/node_modules/rx-lite/rx.lite.js b/node_modules/rx-lite/rx.lite.js new file mode 100644 index 0000000..0603c30 --- /dev/null +++ b/node_modules/rx-lite/rx.lite.js @@ -0,0 +1,7054 @@ +// Copyright (c) Microsoft, All rights reserved. See License.txt in the project root for license information. + +;(function (undefined) { + + var objectTypes = { + 'function': true, + 'object': true + }; + + function checkGlobal(value) { + return (value && value.Object === Object) ? value : null; + } + + var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null; + var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null; + var freeGlobal = checkGlobal(freeExports && freeModule && typeof global === 'object' && global); + var freeSelf = checkGlobal(objectTypes[typeof self] && self); + var freeWindow = checkGlobal(objectTypes[typeof window] && window); + var moduleExports = (freeModule && freeModule.exports === freeExports) ? freeExports : null; + var thisGlobal = checkGlobal(objectTypes[typeof this] && this); + var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')(); + + var Rx = { + internals: {}, + config: { + Promise: root.Promise + }, + helpers: { } + }; + + // Defaults + var noop = Rx.helpers.noop = function () { }, + identity = Rx.helpers.identity = function (x) { return x; }, + defaultNow = Rx.helpers.defaultNow = Date.now, + defaultComparer = Rx.helpers.defaultComparer = function (x, y) { return isEqual(x, y); }, + defaultSubComparer = Rx.helpers.defaultSubComparer = function (x, y) { return x > y ? 1 : (x < y ? -1 : 0); }, + defaultKeySerializer = Rx.helpers.defaultKeySerializer = function (x) { return x.toString(); }, + defaultError = Rx.helpers.defaultError = function (err) { throw err; }, + isPromise = Rx.helpers.isPromise = function (p) { return !!p && typeof p.subscribe !== 'function' && typeof p.then === 'function'; }, + isFunction = Rx.helpers.isFunction = (function () { + + var isFn = function (value) { + return typeof value == 'function' || false; + }; + + // fallback for older versions of Chrome and Safari + if (isFn(/x/)) { + isFn = function(value) { + return typeof value == 'function' && toString.call(value) == '[object Function]'; + }; + } + + return isFn; + }()); + + function cloneArray(arr) { + var len = arr.length, a = new Array(len); + for(var i = 0; i < len; i++) { a[i] = arr[i]; } + return a; + } + + var errorObj = {e: {}}; + + function tryCatcherGen(tryCatchTarget) { + return function tryCatcher() { + try { + return tryCatchTarget.apply(this, arguments); + } catch (e) { + errorObj.e = e; + return errorObj; + } + }; + } + + var tryCatch = Rx.internals.tryCatch = function tryCatch(fn) { + if (!isFunction(fn)) { throw new TypeError('fn must be a function'); } + return tryCatcherGen(fn); + }; + + function thrower(e) { + throw e; + } + + Rx.config.longStackSupport = false; + var hasStacks = false, stacks = tryCatch(function () { throw new Error(); })(); + hasStacks = !!stacks.e && !!stacks.e.stack; + + // All code after this point will be filtered from stack traces reported by RxJS + var rStartingLine = captureLine(), rFileName; + + var STACK_JUMP_SEPARATOR = 'From previous event:'; + + function makeStackTraceLong(error, observable) { + // If possible, transform the error stack trace by removing Node and RxJS + // cruft, then concatenating with the stack trace of `observable`. + if (hasStacks && + observable.stack && + typeof error === 'object' && + error !== null && + error.stack && + error.stack.indexOf(STACK_JUMP_SEPARATOR) === -1 + ) { + var stacks = []; + for (var o = observable; !!o; o = o.source) { + if (o.stack) { + stacks.unshift(o.stack); + } + } + stacks.unshift(error.stack); + + var concatedStacks = stacks.join('\n' + STACK_JUMP_SEPARATOR + '\n'); + error.stack = filterStackString(concatedStacks); + } + } + + function filterStackString(stackString) { + var lines = stackString.split('\n'), desiredLines = []; + for (var i = 0, len = lines.length; i < len; i++) { + var line = lines[i]; + + if (!isInternalFrame(line) && !isNodeFrame(line) && line) { + desiredLines.push(line); + } + } + return desiredLines.join('\n'); + } + + function isInternalFrame(stackLine) { + var fileNameAndLineNumber = getFileNameAndLineNumber(stackLine); + if (!fileNameAndLineNumber) { + return false; + } + var fileName = fileNameAndLineNumber[0], lineNumber = fileNameAndLineNumber[1]; + + return fileName === rFileName && + lineNumber >= rStartingLine && + lineNumber <= rEndingLine; + } + + function isNodeFrame(stackLine) { + return stackLine.indexOf('(module.js:') !== -1 || + stackLine.indexOf('(node.js:') !== -1; + } + + function captureLine() { + if (!hasStacks) { return; } + + try { + throw new Error(); + } catch (e) { + var lines = e.stack.split('\n'); + var firstLine = lines[0].indexOf('@') > 0 ? lines[1] : lines[2]; + var fileNameAndLineNumber = getFileNameAndLineNumber(firstLine); + if (!fileNameAndLineNumber) { return; } + + rFileName = fileNameAndLineNumber[0]; + return fileNameAndLineNumber[1]; + } + } + + function getFileNameAndLineNumber(stackLine) { + // Named functions: 'at functionName (filename:lineNumber:columnNumber)' + var attempt1 = /at .+ \((.+):(\d+):(?:\d+)\)$/.exec(stackLine); + if (attempt1) { return [attempt1[1], Number(attempt1[2])]; } + + // Anonymous functions: 'at filename:lineNumber:columnNumber' + var attempt2 = /at ([^ ]+):(\d+):(?:\d+)$/.exec(stackLine); + if (attempt2) { return [attempt2[1], Number(attempt2[2])]; } + + // Firefox style: 'function@filename:lineNumber or @filename:lineNumber' + var attempt3 = /.*@(.+):(\d+)$/.exec(stackLine); + if (attempt3) { return [attempt3[1], Number(attempt3[2])]; } + } + + var EmptyError = Rx.EmptyError = function() { + this.message = 'Sequence contains no elements.'; + Error.call(this); + }; + EmptyError.prototype = Object.create(Error.prototype); + EmptyError.prototype.name = 'EmptyError'; + + var ObjectDisposedError = Rx.ObjectDisposedError = function() { + this.message = 'Object has been disposed'; + Error.call(this); + }; + ObjectDisposedError.prototype = Object.create(Error.prototype); + ObjectDisposedError.prototype.name = 'ObjectDisposedError'; + + var ArgumentOutOfRangeError = Rx.ArgumentOutOfRangeError = function () { + this.message = 'Argument out of range'; + Error.call(this); + }; + ArgumentOutOfRangeError.prototype = Object.create(Error.prototype); + ArgumentOutOfRangeError.prototype.name = 'ArgumentOutOfRangeError'; + + var NotSupportedError = Rx.NotSupportedError = function (message) { + this.message = message || 'This operation is not supported'; + Error.call(this); + }; + NotSupportedError.prototype = Object.create(Error.prototype); + NotSupportedError.prototype.name = 'NotSupportedError'; + + var NotImplementedError = Rx.NotImplementedError = function (message) { + this.message = message || 'This operation is not implemented'; + Error.call(this); + }; + NotImplementedError.prototype = Object.create(Error.prototype); + NotImplementedError.prototype.name = 'NotImplementedError'; + + var notImplemented = Rx.helpers.notImplemented = function () { + throw new NotImplementedError(); + }; + + var notSupported = Rx.helpers.notSupported = function () { + throw new NotSupportedError(); + }; + + // Shim in iterator support + var $iterator$ = (typeof Symbol === 'function' && Symbol.iterator) || + '_es6shim_iterator_'; + // Bug for mozilla version + if (root.Set && typeof new root.Set()['@@iterator'] === 'function') { + $iterator$ = '@@iterator'; + } + + var doneEnumerator = Rx.doneEnumerator = { done: true, value: undefined }; + + var isIterable = Rx.helpers.isIterable = function (o) { + return o && o[$iterator$] !== undefined; + }; + + var isArrayLike = Rx.helpers.isArrayLike = function (o) { + return o && o.length !== undefined; + }; + + Rx.helpers.iterator = $iterator$; + + var bindCallback = Rx.internals.bindCallback = function (func, thisArg, argCount) { + if (typeof thisArg === 'undefined') { return func; } + switch(argCount) { + case 0: + return function() { + return func.call(thisArg) + }; + case 1: + return function(arg) { + return func.call(thisArg, arg); + }; + case 2: + return function(value, index) { + return func.call(thisArg, value, index); + }; + case 3: + return function(value, index, collection) { + return func.call(thisArg, value, index, collection); + }; + } + + return function() { + return func.apply(thisArg, arguments); + }; + }; + + /** Used to determine if values are of the language type Object */ + var dontEnums = ['toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor'], + dontEnumsLength = dontEnums.length; + +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dateTag] = typedArrayTags[errorTag] = +typedArrayTags[funcTag] = typedArrayTags[mapTag] = +typedArrayTags[numberTag] = typedArrayTags[objectTag] = +typedArrayTags[regexpTag] = typedArrayTags[setTag] = +typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + +var objectProto = Object.prototype, + hasOwnProperty = objectProto.hasOwnProperty, + objToString = objectProto.toString, + MAX_SAFE_INTEGER = Math.pow(2, 53) - 1; + +var keys = Object.keys || (function() { + var hasOwnProperty = Object.prototype.hasOwnProperty, + hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString'), + dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor' + ], + dontEnumsLength = dontEnums.length; + + return function(obj) { + if (typeof obj !== 'object' && (typeof obj !== 'function' || obj === null)) { + throw new TypeError('Object.keys called on non-object'); + } + + var result = [], prop, i; + + for (prop in obj) { + if (hasOwnProperty.call(obj, prop)) { + result.push(prop); + } + } + + if (hasDontEnumBug) { + for (i = 0; i < dontEnumsLength; i++) { + if (hasOwnProperty.call(obj, dontEnums[i])) { + result.push(dontEnums[i]); + } + } + } + return result; + }; + }()); + +function equalObjects(object, other, equalFunc, isLoose, stackA, stackB) { + var objProps = keys(object), + objLength = objProps.length, + othProps = keys(other), + othLength = othProps.length; + + if (objLength !== othLength && !isLoose) { + return false; + } + var index = objLength, key; + while (index--) { + key = objProps[index]; + if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + var skipCtor = isLoose; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key], + result; + + if (!(result === undefined ? equalFunc(objValue, othValue, isLoose, stackA, stackB) : result)) { + return false; + } + skipCtor || (skipCtor = key === 'constructor'); + } + if (!skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + if (objCtor !== othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor === 'function' && objCtor instanceof objCtor && + typeof othCtor === 'function' && othCtor instanceof othCtor)) { + return false; + } + } + return true; +} + +function equalByTag(object, other, tag) { + switch (tag) { + case boolTag: + case dateTag: + return +object === +other; + + case errorTag: + return object.name === other.name && object.message === other.message; + + case numberTag: + return (object !== +object) ? + other !== +other : + object === +other; + + case regexpTag: + case stringTag: + return object === (other + ''); + } + return false; +} + +var isObject = Rx.internals.isObject = function(value) { + var type = typeof value; + return !!value && (type === 'object' || type === 'function'); +}; + +function isObjectLike(value) { + return !!value && typeof value === 'object'; +} + +function isLength(value) { + return typeof value === 'number' && value > -1 && value % 1 === 0 && value <= MAX_SAFE_INTEGER; +} + +var isHostObject = (function() { + try { + Object({ 'toString': 0 } + ''); + } catch(e) { + return function() { return false; }; + } + return function(value) { + return typeof value.toString !== 'function' && typeof (value + '') === 'string'; + }; +}()); + +function isTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)]; +} + +var isArray = Array.isArray || function(value) { + return isObjectLike(value) && isLength(value.length) && objToString.call(value) === arrayTag; +}; + +function arraySome (array, predicate) { + var index = -1, + length = array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; +} + +function equalArrays(array, other, equalFunc, isLoose, stackA, stackB) { + var index = -1, + arrLength = array.length, + othLength = other.length; + + if (arrLength !== othLength && !(isLoose && othLength > arrLength)) { + return false; + } + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index], + result; + + if (result !== undefined) { + if (result) { + continue; + } + return false; + } + // Recursively compare arrays (susceptible to call stack limits). + if (isLoose) { + if (!arraySome(other, function(othValue) { + return arrValue === othValue || equalFunc(arrValue, othValue, isLoose, stackA, stackB); + })) { + return false; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, isLoose, stackA, stackB))) { + return false; + } + } + return true; +} + +function baseIsEqualDeep(object, other, equalFunc, isLoose, stackA, stackB) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = arrayTag, + othTag = arrayTag; + + if (!objIsArr) { + objTag = objToString.call(object); + if (objTag === argsTag) { + objTag = objectTag; + } else if (objTag !== objectTag) { + objIsArr = isTypedArray(object); + } + } + if (!othIsArr) { + othTag = objToString.call(other); + if (othTag === argsTag) { + othTag = objectTag; + } + } + var objIsObj = objTag === objectTag && !isHostObject(object), + othIsObj = othTag === objectTag && !isHostObject(other), + isSameTag = objTag === othTag; + + if (isSameTag && !(objIsArr || objIsObj)) { + return equalByTag(object, other, objTag); + } + if (!isLoose) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, isLoose, stackA, stackB); + } + } + if (!isSameTag) { + return false; + } + // Assume cyclic values are equal. + // For more information on detecting circular references see https://es5.github.io/#JO. + stackA || (stackA = []); + stackB || (stackB = []); + + var length = stackA.length; + while (length--) { + if (stackA[length] === object) { + return stackB[length] === other; + } + } + // Add `object` and `other` to the stack of traversed objects. + stackA.push(object); + stackB.push(other); + + var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, isLoose, stackA, stackB); + + stackA.pop(); + stackB.pop(); + + return result; +} + +function baseIsEqual(value, other, isLoose, stackA, stackB) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, baseIsEqual, isLoose, stackA, stackB); +} + +var isEqual = Rx.internals.isEqual = function (value, other) { + return baseIsEqual(value, other); +}; + + var hasProp = {}.hasOwnProperty, + slice = Array.prototype.slice; + + var inherits = Rx.internals.inherits = function (child, parent) { + function __() { this.constructor = child; } + __.prototype = parent.prototype; + child.prototype = new __(); + }; + + var addProperties = Rx.internals.addProperties = function (obj) { + for(var sources = [], i = 1, len = arguments.length; i < len; i++) { sources.push(arguments[i]); } + for (var idx = 0, ln = sources.length; idx < ln; idx++) { + var source = sources[idx]; + for (var prop in source) { + obj[prop] = source[prop]; + } + } + }; + + // Rx Utils + var addRef = Rx.internals.addRef = function (xs, r) { + return new AnonymousObservable(function (observer) { + return new BinaryDisposable(r.getDisposable(), xs.subscribe(observer)); + }); + }; + + function arrayInitialize(count, factory) { + var a = new Array(count); + for (var i = 0; i < count; i++) { + a[i] = factory(); + } + return a; + } + + /** + * Represents a group of disposable resources that are disposed together. + * @constructor + */ + var CompositeDisposable = Rx.CompositeDisposable = function () { + var args = [], i, len; + if (Array.isArray(arguments[0])) { + args = arguments[0]; + } else { + len = arguments.length; + args = new Array(len); + for(i = 0; i < len; i++) { args[i] = arguments[i]; } + } + this.disposables = args; + this.isDisposed = false; + this.length = args.length; + }; + + var CompositeDisposablePrototype = CompositeDisposable.prototype; + + /** + * Adds a disposable to the CompositeDisposable or disposes the disposable if the CompositeDisposable is disposed. + * @param {Mixed} item Disposable to add. + */ + CompositeDisposablePrototype.add = function (item) { + if (this.isDisposed) { + item.dispose(); + } else { + this.disposables.push(item); + this.length++; + } + }; + + /** + * Removes and disposes the first occurrence of a disposable from the CompositeDisposable. + * @param {Mixed} item Disposable to remove. + * @returns {Boolean} true if found; false otherwise. + */ + CompositeDisposablePrototype.remove = function (item) { + var shouldDispose = false; + if (!this.isDisposed) { + var idx = this.disposables.indexOf(item); + if (idx !== -1) { + shouldDispose = true; + this.disposables.splice(idx, 1); + this.length--; + item.dispose(); + } + } + return shouldDispose; + }; + + /** + * Disposes all disposables in the group and removes them from the group. + */ + CompositeDisposablePrototype.dispose = function () { + if (!this.isDisposed) { + this.isDisposed = true; + var len = this.disposables.length, currentDisposables = new Array(len); + for(var i = 0; i < len; i++) { currentDisposables[i] = this.disposables[i]; } + this.disposables = []; + this.length = 0; + + for (i = 0; i < len; i++) { + currentDisposables[i].dispose(); + } + } + }; + + /** + * Provides a set of static methods for creating Disposables. + * @param {Function} dispose Action to run during the first call to dispose. The action is guaranteed to be run at most once. + */ + var Disposable = Rx.Disposable = function (action) { + this.isDisposed = false; + this.action = action || noop; + }; + + /** Performs the task of cleaning up resources. */ + Disposable.prototype.dispose = function () { + if (!this.isDisposed) { + this.action(); + this.isDisposed = true; + } + }; + + /** + * Creates a disposable object that invokes the specified action when disposed. + * @param {Function} dispose Action to run during the first call to dispose. The action is guaranteed to be run at most once. + * @return {Disposable} The disposable object that runs the given action upon disposal. + */ + var disposableCreate = Disposable.create = function (action) { return new Disposable(action); }; + + /** + * Gets the disposable that does nothing when disposed. + */ + var disposableEmpty = Disposable.empty = { dispose: noop }; + + /** + * Validates whether the given object is a disposable + * @param {Object} Object to test whether it has a dispose method + * @returns {Boolean} true if a disposable object, else false. + */ + var isDisposable = Disposable.isDisposable = function (d) { + return d && isFunction(d.dispose); + }; + + var checkDisposed = Disposable.checkDisposed = function (disposable) { + if (disposable.isDisposed) { throw new ObjectDisposedError(); } + }; + + var disposableFixup = Disposable._fixup = function (result) { + return isDisposable(result) ? result : disposableEmpty; + }; + + // Single assignment + var SingleAssignmentDisposable = Rx.SingleAssignmentDisposable = function () { + this.isDisposed = false; + this.current = null; + }; + SingleAssignmentDisposable.prototype.getDisposable = function () { + return this.current; + }; + SingleAssignmentDisposable.prototype.setDisposable = function (value) { + if (this.current) { throw new Error('Disposable has already been assigned'); } + var shouldDispose = this.isDisposed; + !shouldDispose && (this.current = value); + shouldDispose && value && value.dispose(); + }; + SingleAssignmentDisposable.prototype.dispose = function () { + if (!this.isDisposed) { + this.isDisposed = true; + var old = this.current; + this.current = null; + old && old.dispose(); + } + }; + + // Multiple assignment disposable + var SerialDisposable = Rx.SerialDisposable = function () { + this.isDisposed = false; + this.current = null; + }; + SerialDisposable.prototype.getDisposable = function () { + return this.current; + }; + SerialDisposable.prototype.setDisposable = function (value) { + var shouldDispose = this.isDisposed; + if (!shouldDispose) { + var old = this.current; + this.current = value; + } + old && old.dispose(); + shouldDispose && value && value.dispose(); + }; + SerialDisposable.prototype.dispose = function () { + if (!this.isDisposed) { + this.isDisposed = true; + var old = this.current; + this.current = null; + } + old && old.dispose(); + }; + + var BinaryDisposable = Rx.BinaryDisposable = function (first, second) { + this._first = first; + this._second = second; + this.isDisposed = false; + }; + + BinaryDisposable.prototype.dispose = function () { + if (!this.isDisposed) { + this.isDisposed = true; + var old1 = this._first; + this._first = null; + old1 && old1.dispose(); + var old2 = this._second; + this._second = null; + old2 && old2.dispose(); + } + }; + + var NAryDisposable = Rx.NAryDisposable = function (disposables) { + this._disposables = disposables; + this.isDisposed = false; + }; + + NAryDisposable.prototype.dispose = function () { + if (!this.isDisposed) { + this.isDisposed = true; + for (var i = 0, len = this._disposables.length; i < len; i++) { + this._disposables[i].dispose(); + } + this._disposables.length = 0; + } + }; + + /** + * Represents a disposable resource that only disposes its underlying disposable resource when all dependent disposable objects have been disposed. + */ + var RefCountDisposable = Rx.RefCountDisposable = (function () { + + function InnerDisposable(disposable) { + this.disposable = disposable; + this.disposable.count++; + this.isInnerDisposed = false; + } + + InnerDisposable.prototype.dispose = function () { + if (!this.disposable.isDisposed && !this.isInnerDisposed) { + this.isInnerDisposed = true; + this.disposable.count--; + if (this.disposable.count === 0 && this.disposable.isPrimaryDisposed) { + this.disposable.isDisposed = true; + this.disposable.underlyingDisposable.dispose(); + } + } + }; + + /** + * Initializes a new instance of the RefCountDisposable with the specified disposable. + * @constructor + * @param {Disposable} disposable Underlying disposable. + */ + function RefCountDisposable(disposable) { + this.underlyingDisposable = disposable; + this.isDisposed = false; + this.isPrimaryDisposed = false; + this.count = 0; + } + + /** + * Disposes the underlying disposable only when all dependent disposables have been disposed + */ + RefCountDisposable.prototype.dispose = function () { + if (!this.isDisposed && !this.isPrimaryDisposed) { + this.isPrimaryDisposed = true; + if (this.count === 0) { + this.isDisposed = true; + this.underlyingDisposable.dispose(); + } + } + }; + + /** + * Returns a dependent disposable that when disposed decreases the refcount on the underlying disposable. + * @returns {Disposable} A dependent disposable contributing to the reference count that manages the underlying disposable's lifetime. + */ + RefCountDisposable.prototype.getDisposable = function () { + return this.isDisposed ? disposableEmpty : new InnerDisposable(this); + }; + + return RefCountDisposable; + })(); + + var ScheduledItem = Rx.internals.ScheduledItem = function (scheduler, state, action, dueTime, comparer) { + this.scheduler = scheduler; + this.state = state; + this.action = action; + this.dueTime = dueTime; + this.comparer = comparer || defaultSubComparer; + this.disposable = new SingleAssignmentDisposable(); + }; + + ScheduledItem.prototype.invoke = function () { + this.disposable.setDisposable(this.invokeCore()); + }; + + ScheduledItem.prototype.compareTo = function (other) { + return this.comparer(this.dueTime, other.dueTime); + }; + + ScheduledItem.prototype.isCancelled = function () { + return this.disposable.isDisposed; + }; + + ScheduledItem.prototype.invokeCore = function () { + return disposableFixup(this.action(this.scheduler, this.state)); + }; + + /** Provides a set of static properties to access commonly used schedulers. */ + var Scheduler = Rx.Scheduler = (function () { + + function Scheduler() { } + + /** Determines whether the given object is a scheduler */ + Scheduler.isScheduler = function (s) { + return s instanceof Scheduler; + }; + + var schedulerProto = Scheduler.prototype; + + /** + * Schedules an action to be executed. + * @param state State passed to the action to be executed. + * @param {Function} action Action to be executed. + * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). + */ + schedulerProto.schedule = function (state, action) { + throw new NotImplementedError(); + }; + + /** + * Schedules an action to be executed after dueTime. + * @param state State passed to the action to be executed. + * @param {Function} action Action to be executed. + * @param {Number} dueTime Relative time after which to execute the action. + * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). + */ + schedulerProto.scheduleFuture = function (state, dueTime, action) { + var dt = dueTime; + dt instanceof Date && (dt = dt - this.now()); + dt = Scheduler.normalize(dt); + + if (dt === 0) { return this.schedule(state, action); } + + return this._scheduleFuture(state, dt, action); + }; + + schedulerProto._scheduleFuture = function (state, dueTime, action) { + throw new NotImplementedError(); + }; + + /** Gets the current time according to the local machine's system clock. */ + Scheduler.now = defaultNow; + + /** Gets the current time according to the local machine's system clock. */ + Scheduler.prototype.now = defaultNow; + + /** + * Normalizes the specified TimeSpan value to a positive value. + * @param {Number} timeSpan The time span value to normalize. + * @returns {Number} The specified TimeSpan value if it is zero or positive; otherwise, 0 + */ + Scheduler.normalize = function (timeSpan) { + timeSpan < 0 && (timeSpan = 0); + return timeSpan; + }; + + return Scheduler; + }()); + + var normalizeTime = Scheduler.normalize, isScheduler = Scheduler.isScheduler; + + (function (schedulerProto) { + + function invokeRecImmediate(scheduler, pair) { + var state = pair[0], action = pair[1], group = new CompositeDisposable(); + action(state, innerAction); + return group; + + function innerAction(state2) { + var isAdded = false, isDone = false; + + var d = scheduler.schedule(state2, scheduleWork); + if (!isDone) { + group.add(d); + isAdded = true; + } + + function scheduleWork(_, state3) { + if (isAdded) { + group.remove(d); + } else { + isDone = true; + } + action(state3, innerAction); + return disposableEmpty; + } + } + } + + function invokeRecDate(scheduler, pair) { + var state = pair[0], action = pair[1], group = new CompositeDisposable(); + action(state, innerAction); + return group; + + function innerAction(state2, dueTime1) { + var isAdded = false, isDone = false; + + var d = scheduler.scheduleFuture(state2, dueTime1, scheduleWork); + if (!isDone) { + group.add(d); + isAdded = true; + } + + function scheduleWork(_, state3) { + if (isAdded) { + group.remove(d); + } else { + isDone = true; + } + action(state3, innerAction); + return disposableEmpty; + } + } + } + + /** + * Schedules an action to be executed recursively. + * @param {Mixed} state State passed to the action to be executed. + * @param {Function} action Action to execute recursively. The last parameter passed to the action is used to trigger recursive scheduling of the action, passing in recursive invocation state. + * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). + */ + schedulerProto.scheduleRecursive = function (state, action) { + return this.schedule([state, action], invokeRecImmediate); + }; + + /** + * Schedules an action to be executed recursively after a specified relative or absolute due time. + * @param {Mixed} state State passed to the action to be executed. + * @param {Function} action Action to execute recursively. The last parameter passed to the action is used to trigger recursive scheduling of the action, passing in the recursive due time and invocation state. + * @param {Number | Date} dueTime Relative or absolute time after which to execute the action for the first time. + * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). + */ + schedulerProto.scheduleRecursiveFuture = function (state, dueTime, action) { + return this.scheduleFuture([state, action], dueTime, invokeRecDate); + }; + + }(Scheduler.prototype)); + + (function (schedulerProto) { + + /** + * Schedules a periodic piece of work by dynamically discovering the scheduler's capabilities. The periodic task will be scheduled using window.setInterval for the base implementation. + * @param {Mixed} state Initial state passed to the action upon the first iteration. + * @param {Number} period Period for running the work periodically. + * @param {Function} action Action to be executed, potentially updating the state. + * @returns {Disposable} The disposable object used to cancel the scheduled recurring action (best effort). + */ + schedulerProto.schedulePeriodic = function(state, period, action) { + if (typeof root.setInterval === 'undefined') { throw new NotSupportedError(); } + period = normalizeTime(period); + var s = state, id = root.setInterval(function () { s = action(s); }, period); + return disposableCreate(function () { root.clearInterval(id); }); + }; + + }(Scheduler.prototype)); + + /** Gets a scheduler that schedules work immediately on the current thread. */ + var ImmediateScheduler = (function (__super__) { + inherits(ImmediateScheduler, __super__); + function ImmediateScheduler() { + __super__.call(this); + } + + ImmediateScheduler.prototype.schedule = function (state, action) { + return disposableFixup(action(this, state)); + }; + + return ImmediateScheduler; + }(Scheduler)); + + var immediateScheduler = Scheduler.immediate = new ImmediateScheduler(); + + /** + * Gets a scheduler that schedules work as soon as possible on the current thread. + */ + var CurrentThreadScheduler = (function (__super__) { + var queue; + + function runTrampoline () { + while (queue.length > 0) { + var item = queue.dequeue(); + !item.isCancelled() && item.invoke(); + } + } + + inherits(CurrentThreadScheduler, __super__); + function CurrentThreadScheduler() { + __super__.call(this); + } + + CurrentThreadScheduler.prototype.schedule = function (state, action) { + var si = new ScheduledItem(this, state, action, this.now()); + + if (!queue) { + queue = new PriorityQueue(4); + queue.enqueue(si); + + var result = tryCatch(runTrampoline)(); + queue = null; + if (result === errorObj) { thrower(result.e); } + } else { + queue.enqueue(si); + } + return si.disposable; + }; + + CurrentThreadScheduler.prototype.scheduleRequired = function () { return !queue; }; + + return CurrentThreadScheduler; + }(Scheduler)); + + var currentThreadScheduler = Scheduler.currentThread = new CurrentThreadScheduler(); + + var SchedulePeriodicRecursive = Rx.internals.SchedulePeriodicRecursive = (function () { + function createTick(self) { + return function tick(command, recurse) { + recurse(0, self._period); + var state = tryCatch(self._action)(self._state); + if (state === errorObj) { + self._cancel.dispose(); + thrower(state.e); + } + self._state = state; + }; + } + + function SchedulePeriodicRecursive(scheduler, state, period, action) { + this._scheduler = scheduler; + this._state = state; + this._period = period; + this._action = action; + } + + SchedulePeriodicRecursive.prototype.start = function () { + var d = new SingleAssignmentDisposable(); + this._cancel = d; + d.setDisposable(this._scheduler.scheduleRecursiveFuture(0, this._period, createTick(this))); + + return d; + }; + + return SchedulePeriodicRecursive; + }()); + + var scheduleMethod, clearMethod; + + var localTimer = (function () { + var localSetTimeout, localClearTimeout = noop; + if (!!root.setTimeout) { + localSetTimeout = root.setTimeout; + localClearTimeout = root.clearTimeout; + } else if (!!root.WScript) { + localSetTimeout = function (fn, time) { + root.WScript.Sleep(time); + fn(); + }; + } else { + throw new NotSupportedError(); + } + + return { + setTimeout: localSetTimeout, + clearTimeout: localClearTimeout + }; + }()); + var localSetTimeout = localTimer.setTimeout, + localClearTimeout = localTimer.clearTimeout; + + (function () { + + var nextHandle = 1, tasksByHandle = {}, currentlyRunning = false; + + clearMethod = function (handle) { + delete tasksByHandle[handle]; + }; + + function runTask(handle) { + if (currentlyRunning) { + localSetTimeout(function () { runTask(handle); }, 0); + } else { + var task = tasksByHandle[handle]; + if (task) { + currentlyRunning = true; + var result = tryCatch(task)(); + clearMethod(handle); + currentlyRunning = false; + if (result === errorObj) { thrower(result.e); } + } + } + } + + var reNative = new RegExp('^' + + String(toString) + .replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + .replace(/toString| for [^\]]+/g, '.*?') + '$' + ); + + var setImmediate = typeof (setImmediate = freeGlobal && moduleExports && freeGlobal.setImmediate) == 'function' && + !reNative.test(setImmediate) && setImmediate; + + function postMessageSupported () { + // Ensure not in a worker + if (!root.postMessage || root.importScripts) { return false; } + var isAsync = false, oldHandler = root.onmessage; + // Test for async + root.onmessage = function () { isAsync = true; }; + root.postMessage('', '*'); + root.onmessage = oldHandler; + + return isAsync; + } + + // Use in order, setImmediate, nextTick, postMessage, MessageChannel, script readystatechanged, setTimeout + if (isFunction(setImmediate)) { + scheduleMethod = function (action) { + var id = nextHandle++; + tasksByHandle[id] = action; + setImmediate(function () { runTask(id); }); + + return id; + }; + } else if (typeof process !== 'undefined' && {}.toString.call(process) === '[object process]') { + scheduleMethod = function (action) { + var id = nextHandle++; + tasksByHandle[id] = action; + process.nextTick(function () { runTask(id); }); + + return id; + }; + } else if (postMessageSupported()) { + var MSG_PREFIX = 'ms.rx.schedule' + Math.random(); + + var onGlobalPostMessage = function (event) { + // Only if we're a match to avoid any other global events + if (typeof event.data === 'string' && event.data.substring(0, MSG_PREFIX.length) === MSG_PREFIX) { + runTask(event.data.substring(MSG_PREFIX.length)); + } + }; + + root.addEventListener('message', onGlobalPostMessage, false); + + scheduleMethod = function (action) { + var id = nextHandle++; + tasksByHandle[id] = action; + root.postMessage(MSG_PREFIX + id, '*'); + return id; + }; + } else if (!!root.MessageChannel) { + var channel = new root.MessageChannel(); + + channel.port1.onmessage = function (e) { runTask(e.data); }; + + scheduleMethod = function (action) { + var id = nextHandle++; + tasksByHandle[id] = action; + channel.port2.postMessage(id); + return id; + }; + } else if ('document' in root && 'onreadystatechange' in root.document.createElement('script')) { + + scheduleMethod = function (action) { + var scriptElement = root.document.createElement('script'); + var id = nextHandle++; + tasksByHandle[id] = action; + + scriptElement.onreadystatechange = function () { + runTask(id); + scriptElement.onreadystatechange = null; + scriptElement.parentNode.removeChild(scriptElement); + scriptElement = null; + }; + root.document.documentElement.appendChild(scriptElement); + return id; + }; + + } else { + scheduleMethod = function (action) { + var id = nextHandle++; + tasksByHandle[id] = action; + localSetTimeout(function () { + runTask(id); + }, 0); + + return id; + }; + } + }()); + + /** + * Gets a scheduler that schedules work via a timed callback based upon platform. + */ + var DefaultScheduler = (function (__super__) { + inherits(DefaultScheduler, __super__); + function DefaultScheduler() { + __super__.call(this); + } + + function scheduleAction(disposable, action, scheduler, state) { + return function schedule() { + disposable.setDisposable(Disposable._fixup(action(scheduler, state))); + }; + } + + function ClearDisposable(id) { + this._id = id; + this.isDisposed = false; + } + + ClearDisposable.prototype.dispose = function () { + if (!this.isDisposed) { + this.isDisposed = true; + clearMethod(this._id); + } + }; + + function LocalClearDisposable(id) { + this._id = id; + this.isDisposed = false; + } + + LocalClearDisposable.prototype.dispose = function () { + if (!this.isDisposed) { + this.isDisposed = true; + localClearTimeout(this._id); + } + }; + + DefaultScheduler.prototype.schedule = function (state, action) { + var disposable = new SingleAssignmentDisposable(), + id = scheduleMethod(scheduleAction(disposable, action, this, state)); + return new BinaryDisposable(disposable, new ClearDisposable(id)); + }; + + DefaultScheduler.prototype._scheduleFuture = function (state, dueTime, action) { + if (dueTime === 0) { return this.schedule(state, action); } + var disposable = new SingleAssignmentDisposable(), + id = localSetTimeout(scheduleAction(disposable, action, this, state), dueTime); + return new BinaryDisposable(disposable, new LocalClearDisposable(id)); + }; + + return DefaultScheduler; + }(Scheduler)); + + var defaultScheduler = Scheduler['default'] = Scheduler.async = new DefaultScheduler(); + + function IndexedItem(id, value) { + this.id = id; + this.value = value; + } + + IndexedItem.prototype.compareTo = function (other) { + var c = this.value.compareTo(other.value); + c === 0 && (c = this.id - other.id); + return c; + }; + + var PriorityQueue = Rx.internals.PriorityQueue = function (capacity) { + this.items = new Array(capacity); + this.length = 0; + }; + + var priorityProto = PriorityQueue.prototype; + priorityProto.isHigherPriority = function (left, right) { + return this.items[left].compareTo(this.items[right]) < 0; + }; + + priorityProto.percolate = function (index) { + if (index >= this.length || index < 0) { return; } + var parent = index - 1 >> 1; + if (parent < 0 || parent === index) { return; } + if (this.isHigherPriority(index, parent)) { + var temp = this.items[index]; + this.items[index] = this.items[parent]; + this.items[parent] = temp; + this.percolate(parent); + } + }; + + priorityProto.heapify = function (index) { + +index || (index = 0); + if (index >= this.length || index < 0) { return; } + var left = 2 * index + 1, + right = 2 * index + 2, + first = index; + if (left < this.length && this.isHigherPriority(left, first)) { + first = left; + } + if (right < this.length && this.isHigherPriority(right, first)) { + first = right; + } + if (first !== index) { + var temp = this.items[index]; + this.items[index] = this.items[first]; + this.items[first] = temp; + this.heapify(first); + } + }; + + priorityProto.peek = function () { return this.items[0].value; }; + + priorityProto.removeAt = function (index) { + this.items[index] = this.items[--this.length]; + this.items[this.length] = undefined; + this.heapify(); + }; + + priorityProto.dequeue = function () { + var result = this.peek(); + this.removeAt(0); + return result; + }; + + priorityProto.enqueue = function (item) { + var index = this.length++; + this.items[index] = new IndexedItem(PriorityQueue.count++, item); + this.percolate(index); + }; + + priorityProto.remove = function (item) { + for (var i = 0; i < this.length; i++) { + if (this.items[i].value === item) { + this.removeAt(i); + return true; + } + } + return false; + }; + PriorityQueue.count = 0; + + /** + * Represents a notification to an observer. + */ + var Notification = Rx.Notification = (function () { + function Notification() { + + } + + Notification.prototype._accept = function (onNext, onError, onCompleted) { + throw new NotImplementedError(); + }; + + Notification.prototype._acceptObserver = function (onNext, onError, onCompleted) { + throw new NotImplementedError(); + }; + + /** + * Invokes the delegate corresponding to the notification or the observer's method corresponding to the notification and returns the produced result. + * @param {Function | Observer} observerOrOnNext Function to invoke for an OnNext notification or Observer to invoke the notification on.. + * @param {Function} onError Function to invoke for an OnError notification. + * @param {Function} onCompleted Function to invoke for an OnCompleted notification. + * @returns {Any} Result produced by the observation. + */ + Notification.prototype.accept = function (observerOrOnNext, onError, onCompleted) { + return observerOrOnNext && typeof observerOrOnNext === 'object' ? + this._acceptObserver(observerOrOnNext) : + this._accept(observerOrOnNext, onError, onCompleted); + }; + + /** + * Returns an observable sequence with a single notification. + * + * @memberOf Notifications + * @param {Scheduler} [scheduler] Scheduler to send out the notification calls on. + * @returns {Observable} The observable sequence that surfaces the behavior of the notification upon subscription. + */ + Notification.prototype.toObservable = function (scheduler) { + var self = this; + isScheduler(scheduler) || (scheduler = immediateScheduler); + return new AnonymousObservable(function (o) { + return scheduler.schedule(self, function (_, notification) { + notification._acceptObserver(o); + notification.kind === 'N' && o.onCompleted(); + }); + }); + }; + + return Notification; + })(); + + var OnNextNotification = (function (__super__) { + inherits(OnNextNotification, __super__); + function OnNextNotification(value) { + this.value = value; + this.kind = 'N'; + } + + OnNextNotification.prototype._accept = function (onNext) { + return onNext(this.value); + }; + + OnNextNotification.prototype._acceptObserver = function (o) { + return o.onNext(this.value); + }; + + OnNextNotification.prototype.toString = function () { + return 'OnNext(' + this.value + ')'; + }; + + return OnNextNotification; + }(Notification)); + + var OnErrorNotification = (function (__super__) { + inherits(OnErrorNotification, __super__); + function OnErrorNotification(error) { + this.error = error; + this.kind = 'E'; + } + + OnErrorNotification.prototype._accept = function (onNext, onError) { + return onError(this.error); + }; + + OnErrorNotification.prototype._acceptObserver = function (o) { + return o.onError(this.error); + }; + + OnErrorNotification.prototype.toString = function () { + return 'OnError(' + this.error + ')'; + }; + + return OnErrorNotification; + }(Notification)); + + var OnCompletedNotification = (function (__super__) { + inherits(OnCompletedNotification, __super__); + function OnCompletedNotification() { + this.kind = 'C'; + } + + OnCompletedNotification.prototype._accept = function (onNext, onError, onCompleted) { + return onCompleted(); + }; + + OnCompletedNotification.prototype._acceptObserver = function (o) { + return o.onCompleted(); + }; + + OnCompletedNotification.prototype.toString = function () { + return 'OnCompleted()'; + }; + + return OnCompletedNotification; + }(Notification)); + + /** + * Creates an object that represents an OnNext notification to an observer. + * @param {Any} value The value contained in the notification. + * @returns {Notification} The OnNext notification containing the value. + */ + var notificationCreateOnNext = Notification.createOnNext = function (value) { + return new OnNextNotification(value); + }; + + /** + * Creates an object that represents an OnError notification to an observer. + * @param {Any} error The exception contained in the notification. + * @returns {Notification} The OnError notification containing the exception. + */ + var notificationCreateOnError = Notification.createOnError = function (error) { + return new OnErrorNotification(error); + }; + + /** + * Creates an object that represents an OnCompleted notification to an observer. + * @returns {Notification} The OnCompleted notification. + */ + var notificationCreateOnCompleted = Notification.createOnCompleted = function () { + return new OnCompletedNotification(); + }; + + /** + * Supports push-style iteration over an observable sequence. + */ + var Observer = Rx.Observer = function () { }; + + /** + * Creates an observer from the specified OnNext, along with optional OnError, and OnCompleted actions. + * @param {Function} [onNext] Observer's OnNext action implementation. + * @param {Function} [onError] Observer's OnError action implementation. + * @param {Function} [onCompleted] Observer's OnCompleted action implementation. + * @returns {Observer} The observer object implemented using the given actions. + */ + var observerCreate = Observer.create = function (onNext, onError, onCompleted) { + onNext || (onNext = noop); + onError || (onError = defaultError); + onCompleted || (onCompleted = noop); + return new AnonymousObserver(onNext, onError, onCompleted); + }; + + /** + * Abstract base class for implementations of the Observer class. + * This base class enforces the grammar of observers where OnError and OnCompleted are terminal messages. + */ + var AbstractObserver = Rx.internals.AbstractObserver = (function (__super__) { + inherits(AbstractObserver, __super__); + + /** + * Creates a new observer in a non-stopped state. + */ + function AbstractObserver() { + this.isStopped = false; + } + + // Must be implemented by other observers + AbstractObserver.prototype.next = notImplemented; + AbstractObserver.prototype.error = notImplemented; + AbstractObserver.prototype.completed = notImplemented; + + /** + * Notifies the observer of a new element in the sequence. + * @param {Any} value Next element in the sequence. + */ + AbstractObserver.prototype.onNext = function (value) { + !this.isStopped && this.next(value); + }; + + /** + * Notifies the observer that an exception has occurred. + * @param {Any} error The error that has occurred. + */ + AbstractObserver.prototype.onError = function (error) { + if (!this.isStopped) { + this.isStopped = true; + this.error(error); + } + }; + + /** + * Notifies the observer of the end of the sequence. + */ + AbstractObserver.prototype.onCompleted = function () { + if (!this.isStopped) { + this.isStopped = true; + this.completed(); + } + }; + + /** + * Disposes the observer, causing it to transition to the stopped state. + */ + AbstractObserver.prototype.dispose = function () { this.isStopped = true; }; + + AbstractObserver.prototype.fail = function (e) { + if (!this.isStopped) { + this.isStopped = true; + this.error(e); + return true; + } + + return false; + }; + + return AbstractObserver; + }(Observer)); + + /** + * Class to create an Observer instance from delegate-based implementations of the on* methods. + */ + var AnonymousObserver = Rx.AnonymousObserver = (function (__super__) { + inherits(AnonymousObserver, __super__); + + /** + * Creates an observer from the specified OnNext, OnError, and OnCompleted actions. + * @param {Any} onNext Observer's OnNext action implementation. + * @param {Any} onError Observer's OnError action implementation. + * @param {Any} onCompleted Observer's OnCompleted action implementation. + */ + function AnonymousObserver(onNext, onError, onCompleted) { + __super__.call(this); + this._onNext = onNext; + this._onError = onError; + this._onCompleted = onCompleted; + } + + /** + * Calls the onNext action. + * @param {Any} value Next element in the sequence. + */ + AnonymousObserver.prototype.next = function (value) { + this._onNext(value); + }; + + /** + * Calls the onError action. + * @param {Any} error The error that has occurred. + */ + AnonymousObserver.prototype.error = function (error) { + this._onError(error); + }; + + /** + * Calls the onCompleted action. + */ + AnonymousObserver.prototype.completed = function () { + this._onCompleted(); + }; + + return AnonymousObserver; + }(AbstractObserver)); + + var observableProto; + + /** + * Represents a push-style collection. + */ + var Observable = Rx.Observable = (function () { + + function makeSubscribe(self, subscribe) { + return function (o) { + var oldOnError = o.onError; + o.onError = function (e) { + makeStackTraceLong(e, self); + oldOnError.call(o, e); + }; + + return subscribe.call(self, o); + }; + } + + function Observable() { + if (Rx.config.longStackSupport && hasStacks) { + var oldSubscribe = this._subscribe; + var e = tryCatch(thrower)(new Error()).e; + this.stack = e.stack.substring(e.stack.indexOf('\n') + 1); + this._subscribe = makeSubscribe(this, oldSubscribe); + } + } + + observableProto = Observable.prototype; + + /** + * Determines whether the given object is an Observable + * @param {Any} An object to determine whether it is an Observable + * @returns {Boolean} true if an Observable, else false. + */ + Observable.isObservable = function (o) { + return o && isFunction(o.subscribe); + }; + + /** + * Subscribes an o to the observable sequence. + * @param {Mixed} [oOrOnNext] The object that is to receive notifications or an action to invoke for each element in the observable sequence. + * @param {Function} [onError] Action to invoke upon exceptional termination of the observable sequence. + * @param {Function} [onCompleted] Action to invoke upon graceful termination of the observable sequence. + * @returns {Diposable} A disposable handling the subscriptions and unsubscriptions. + */ + observableProto.subscribe = observableProto.forEach = function (oOrOnNext, onError, onCompleted) { + return this._subscribe(typeof oOrOnNext === 'object' ? + oOrOnNext : + observerCreate(oOrOnNext, onError, onCompleted)); + }; + + /** + * Subscribes to the next value in the sequence with an optional "this" argument. + * @param {Function} onNext The function to invoke on each element in the observable sequence. + * @param {Any} [thisArg] Object to use as this when executing callback. + * @returns {Disposable} A disposable handling the subscriptions and unsubscriptions. + */ + observableProto.subscribeOnNext = function (onNext, thisArg) { + return this._subscribe(observerCreate(typeof thisArg !== 'undefined' ? function(x) { onNext.call(thisArg, x); } : onNext)); + }; + + /** + * Subscribes to an exceptional condition in the sequence with an optional "this" argument. + * @param {Function} onError The function to invoke upon exceptional termination of the observable sequence. + * @param {Any} [thisArg] Object to use as this when executing callback. + * @returns {Disposable} A disposable handling the subscriptions and unsubscriptions. + */ + observableProto.subscribeOnError = function (onError, thisArg) { + return this._subscribe(observerCreate(null, typeof thisArg !== 'undefined' ? function(e) { onError.call(thisArg, e); } : onError)); + }; + + /** + * Subscribes to the next value in the sequence with an optional "this" argument. + * @param {Function} onCompleted The function to invoke upon graceful termination of the observable sequence. + * @param {Any} [thisArg] Object to use as this when executing callback. + * @returns {Disposable} A disposable handling the subscriptions and unsubscriptions. + */ + observableProto.subscribeOnCompleted = function (onCompleted, thisArg) { + return this._subscribe(observerCreate(null, null, typeof thisArg !== 'undefined' ? function() { onCompleted.call(thisArg); } : onCompleted)); + }; + + return Observable; + })(); + + var ScheduledObserver = Rx.internals.ScheduledObserver = (function (__super__) { + inherits(ScheduledObserver, __super__); + + function ScheduledObserver(scheduler, observer) { + __super__.call(this); + this.scheduler = scheduler; + this.observer = observer; + this.isAcquired = false; + this.hasFaulted = false; + this.queue = []; + this.disposable = new SerialDisposable(); + } + + function enqueueNext(observer, x) { return function () { observer.onNext(x); }; } + function enqueueError(observer, e) { return function () { observer.onError(e); }; } + function enqueueCompleted(observer) { return function () { observer.onCompleted(); }; } + + ScheduledObserver.prototype.next = function (x) { + this.queue.push(enqueueNext(this.observer, x)); + }; + + ScheduledObserver.prototype.error = function (e) { + this.queue.push(enqueueError(this.observer, e)); + }; + + ScheduledObserver.prototype.completed = function () { + this.queue.push(enqueueCompleted(this.observer)); + }; + + + function scheduleMethod(state, recurse) { + var work; + if (state.queue.length > 0) { + work = state.queue.shift(); + } else { + state.isAcquired = false; + return; + } + var res = tryCatch(work)(); + if (res === errorObj) { + state.queue = []; + state.hasFaulted = true; + return thrower(res.e); + } + recurse(state); + } + + ScheduledObserver.prototype.ensureActive = function () { + var isOwner = false; + if (!this.hasFaulted && this.queue.length > 0) { + isOwner = !this.isAcquired; + this.isAcquired = true; + } + isOwner && + this.disposable.setDisposable(this.scheduler.scheduleRecursive(this, scheduleMethod)); + }; + + ScheduledObserver.prototype.dispose = function () { + __super__.prototype.dispose.call(this); + this.disposable.dispose(); + }; + + return ScheduledObserver; + }(AbstractObserver)); + + var ObservableBase = Rx.ObservableBase = (function (__super__) { + inherits(ObservableBase, __super__); + + function fixSubscriber(subscriber) { + return subscriber && isFunction(subscriber.dispose) ? subscriber : + isFunction(subscriber) ? disposableCreate(subscriber) : disposableEmpty; + } + + function setDisposable(s, state) { + var ado = state[0], self = state[1]; + var sub = tryCatch(self.subscribeCore).call(self, ado); + if (sub === errorObj && !ado.fail(errorObj.e)) { thrower(errorObj.e); } + ado.setDisposable(fixSubscriber(sub)); + } + + function ObservableBase() { + __super__.call(this); + } + + ObservableBase.prototype._subscribe = function (o) { + var ado = new AutoDetachObserver(o), state = [ado, this]; + + if (currentThreadScheduler.scheduleRequired()) { + currentThreadScheduler.schedule(state, setDisposable); + } else { + setDisposable(null, state); + } + return ado; + }; + + ObservableBase.prototype.subscribeCore = notImplemented; + + return ObservableBase; + }(Observable)); + +var FlatMapObservable = Rx.FlatMapObservable = (function(__super__) { + + inherits(FlatMapObservable, __super__); + + function FlatMapObservable(source, selector, resultSelector, thisArg) { + this.resultSelector = isFunction(resultSelector) ? resultSelector : null; + this.selector = bindCallback(isFunction(selector) ? selector : function() { return selector; }, thisArg, 3); + this.source = source; + __super__.call(this); + } + + FlatMapObservable.prototype.subscribeCore = function(o) { + return this.source.subscribe(new InnerObserver(o, this.selector, this.resultSelector, this)); + }; + + inherits(InnerObserver, AbstractObserver); + function InnerObserver(observer, selector, resultSelector, source) { + this.i = 0; + this.selector = selector; + this.resultSelector = resultSelector; + this.source = source; + this.o = observer; + AbstractObserver.call(this); + } + + InnerObserver.prototype._wrapResult = function(result, x, i) { + return this.resultSelector ? + result.map(function(y, i2) { return this.resultSelector(x, y, i, i2); }, this) : + result; + }; + + InnerObserver.prototype.next = function(x) { + var i = this.i++; + var result = tryCatch(this.selector)(x, i, this.source); + if (result === errorObj) { return this.o.onError(result.e); } + + isPromise(result) && (result = observableFromPromise(result)); + (isArrayLike(result) || isIterable(result)) && (result = Observable.from(result)); + this.o.onNext(this._wrapResult(result, x, i)); + }; + + InnerObserver.prototype.error = function(e) { this.o.onError(e); }; + + InnerObserver.prototype.completed = function() { this.o.onCompleted(); }; + + return FlatMapObservable; + +}(ObservableBase)); + + var Enumerable = Rx.internals.Enumerable = function () { }; + + function IsDisposedDisposable(state) { + this._s = state; + this.isDisposed = false; + } + + IsDisposedDisposable.prototype.dispose = function () { + if (!this.isDisposed) { + this.isDisposed = true; + this._s.isDisposed = true; + } + }; + + var ConcatEnumerableObservable = (function(__super__) { + inherits(ConcatEnumerableObservable, __super__); + function ConcatEnumerableObservable(sources) { + this.sources = sources; + __super__.call(this); + } + + function scheduleMethod(state, recurse) { + if (state.isDisposed) { return; } + var currentItem = tryCatch(state.e.next).call(state.e); + if (currentItem === errorObj) { return state.o.onError(currentItem.e); } + if (currentItem.done) { return state.o.onCompleted(); } + + // Check if promise + var currentValue = currentItem.value; + isPromise(currentValue) && (currentValue = observableFromPromise(currentValue)); + + var d = new SingleAssignmentDisposable(); + state.subscription.setDisposable(d); + d.setDisposable(currentValue.subscribe(new InnerObserver(state, recurse))); + } + + ConcatEnumerableObservable.prototype.subscribeCore = function (o) { + var subscription = new SerialDisposable(); + var state = { + isDisposed: false, + o: o, + subscription: subscription, + e: this.sources[$iterator$]() + }; + + var cancelable = currentThreadScheduler.scheduleRecursive(state, scheduleMethod); + return new NAryDisposable([subscription, cancelable, new IsDisposedDisposable(state)]); + }; + + function InnerObserver(state, recurse) { + this._state = state; + this._recurse = recurse; + AbstractObserver.call(this); + } + + inherits(InnerObserver, AbstractObserver); + + InnerObserver.prototype.next = function (x) { this._state.o.onNext(x); }; + InnerObserver.prototype.error = function (e) { this._state.o.onError(e); }; + InnerObserver.prototype.completed = function () { this._recurse(this._state); }; + + return ConcatEnumerableObservable; + }(ObservableBase)); + + Enumerable.prototype.concat = function () { + return new ConcatEnumerableObservable(this); + }; + + var CatchErrorObservable = (function(__super__) { + function CatchErrorObservable(sources) { + this.sources = sources; + __super__.call(this); + } + + inherits(CatchErrorObservable, __super__); + + function scheduleMethod(state, recurse) { + if (state.isDisposed) { return; } + var currentItem = tryCatch(state.e.next).call(state.e); + if (currentItem === errorObj) { return state.o.onError(currentItem.e); } + if (currentItem.done) { return state.lastError !== null ? state.o.onError(state.lastError) : state.o.onCompleted(); } + + var currentValue = currentItem.value; + isPromise(currentValue) && (currentValue = observableFromPromise(currentValue)); + + var d = new SingleAssignmentDisposable(); + state.subscription.setDisposable(d); + d.setDisposable(currentValue.subscribe(new InnerObserver(state, recurse))); + } + + CatchErrorObservable.prototype.subscribeCore = function (o) { + var subscription = new SerialDisposable(); + var state = { + isDisposed: false, + e: this.sources[$iterator$](), + subscription: subscription, + lastError: null, + o: o + }; + + var cancelable = currentThreadScheduler.scheduleRecursive(state, scheduleMethod); + return new NAryDisposable([subscription, cancelable, new IsDisposedDisposable(state)]); + }; + + function InnerObserver(state, recurse) { + this._state = state; + this._recurse = recurse; + AbstractObserver.call(this); + } + + inherits(InnerObserver, AbstractObserver); + + InnerObserver.prototype.next = function (x) { this._state.o.onNext(x); }; + InnerObserver.prototype.error = function (e) { this._state.lastError = e; this._recurse(this._state); }; + InnerObserver.prototype.completed = function () { this._state.o.onCompleted(); }; + + return CatchErrorObservable; + }(ObservableBase)); + + Enumerable.prototype.catchError = function () { + return new CatchErrorObservable(this); + }; + + var RepeatEnumerable = (function (__super__) { + inherits(RepeatEnumerable, __super__); + function RepeatEnumerable(v, c) { + this.v = v; + this.c = c == null ? -1 : c; + } + + RepeatEnumerable.prototype[$iterator$] = function () { + return new RepeatEnumerator(this); + }; + + function RepeatEnumerator(p) { + this.v = p.v; + this.l = p.c; + } + + RepeatEnumerator.prototype.next = function () { + if (this.l === 0) { return doneEnumerator; } + if (this.l > 0) { this.l--; } + return { done: false, value: this.v }; + }; + + return RepeatEnumerable; + }(Enumerable)); + + var enumerableRepeat = Enumerable.repeat = function (value, repeatCount) { + return new RepeatEnumerable(value, repeatCount); + }; + + var OfEnumerable = (function(__super__) { + inherits(OfEnumerable, __super__); + function OfEnumerable(s, fn, thisArg) { + this.s = s; + this.fn = fn ? bindCallback(fn, thisArg, 3) : null; + } + OfEnumerable.prototype[$iterator$] = function () { + return new OfEnumerator(this); + }; + + function OfEnumerator(p) { + this.i = -1; + this.s = p.s; + this.l = this.s.length; + this.fn = p.fn; + } + + OfEnumerator.prototype.next = function () { + return ++this.i < this.l ? + { done: false, value: !this.fn ? this.s[this.i] : this.fn(this.s[this.i], this.i, this.s) } : + doneEnumerator; + }; + + return OfEnumerable; + }(Enumerable)); + + var enumerableOf = Enumerable.of = function (source, selector, thisArg) { + return new OfEnumerable(source, selector, thisArg); + }; + + var ToArrayObservable = (function(__super__) { + inherits(ToArrayObservable, __super__); + function ToArrayObservable(source) { + this.source = source; + __super__.call(this); + } + + ToArrayObservable.prototype.subscribeCore = function(o) { + return this.source.subscribe(new InnerObserver(o)); + }; + + inherits(InnerObserver, AbstractObserver); + function InnerObserver(o) { + this.o = o; + this.a = []; + AbstractObserver.call(this); + } + + InnerObserver.prototype.next = function (x) { this.a.push(x); }; + InnerObserver.prototype.error = function (e) { this.o.onError(e); }; + InnerObserver.prototype.completed = function () { this.o.onNext(this.a); this.o.onCompleted(); }; + + return ToArrayObservable; + }(ObservableBase)); + + /** + * Creates an array from an observable sequence. + * @returns {Observable} An observable sequence containing a single element with a list containing all the elements of the source sequence. + */ + observableProto.toArray = function () { + return new ToArrayObservable(this); + }; + + /** + * Creates an observable sequence from a specified subscribe method implementation. + * @example + * var res = Rx.Observable.create(function (observer) { return function () { } ); + * var res = Rx.Observable.create(function (observer) { return Rx.Disposable.empty; } ); + * var res = Rx.Observable.create(function (observer) { } ); + * @param {Function} subscribe Implementation of the resulting observable sequence's subscribe method, returning a function that will be wrapped in a Disposable. + * @returns {Observable} The observable sequence with the specified implementation for the Subscribe method. + */ + Observable.create = function (subscribe, parent) { + return new AnonymousObservable(subscribe, parent); + }; + + var Defer = (function(__super__) { + inherits(Defer, __super__); + function Defer(factory) { + this._f = factory; + __super__.call(this); + } + + Defer.prototype.subscribeCore = function (o) { + var result = tryCatch(this._f)(); + if (result === errorObj) { return observableThrow(result.e).subscribe(o);} + isPromise(result) && (result = observableFromPromise(result)); + return result.subscribe(o); + }; + + return Defer; + }(ObservableBase)); + + /** + * Returns an observable sequence that invokes the specified factory function whenever a new observer subscribes. + * + * @example + * var res = Rx.Observable.defer(function () { return Rx.Observable.fromArray([1,2,3]); }); + * @param {Function} observableFactory Observable factory function to invoke for each observer that subscribes to the resulting sequence or Promise. + * @returns {Observable} An observable sequence whose observers trigger an invocation of the given observable factory function. + */ + var observableDefer = Observable.defer = function (observableFactory) { + return new Defer(observableFactory); + }; + + var EmptyObservable = (function(__super__) { + inherits(EmptyObservable, __super__); + function EmptyObservable(scheduler) { + this.scheduler = scheduler; + __super__.call(this); + } + + EmptyObservable.prototype.subscribeCore = function (observer) { + var sink = new EmptySink(observer, this.scheduler); + return sink.run(); + }; + + function EmptySink(observer, scheduler) { + this.observer = observer; + this.scheduler = scheduler; + } + + function scheduleItem(s, state) { + state.onCompleted(); + return disposableEmpty; + } + + EmptySink.prototype.run = function () { + var state = this.observer; + return this.scheduler === immediateScheduler ? + scheduleItem(null, state) : + this.scheduler.schedule(state, scheduleItem); + }; + + return EmptyObservable; + }(ObservableBase)); + + var EMPTY_OBSERVABLE = new EmptyObservable(immediateScheduler); + + /** + * Returns an empty observable sequence, using the specified scheduler to send out the single OnCompleted message. + * + * @example + * var res = Rx.Observable.empty(); + * var res = Rx.Observable.empty(Rx.Scheduler.timeout); + * @param {Scheduler} [scheduler] Scheduler to send the termination call on. + * @returns {Observable} An observable sequence with no elements. + */ + var observableEmpty = Observable.empty = function (scheduler) { + isScheduler(scheduler) || (scheduler = immediateScheduler); + return scheduler === immediateScheduler ? EMPTY_OBSERVABLE : new EmptyObservable(scheduler); + }; + + var FromObservable = (function(__super__) { + inherits(FromObservable, __super__); + function FromObservable(iterable, fn, scheduler) { + this._iterable = iterable; + this._fn = fn; + this._scheduler = scheduler; + __super__.call(this); + } + + function createScheduleMethod(o, it, fn) { + return function loopRecursive(i, recurse) { + var next = tryCatch(it.next).call(it); + if (next === errorObj) { return o.onError(next.e); } + if (next.done) { return o.onCompleted(); } + + var result = next.value; + + if (isFunction(fn)) { + result = tryCatch(fn)(result, i); + if (result === errorObj) { return o.onError(result.e); } + } + + o.onNext(result); + recurse(i + 1); + }; + } + + FromObservable.prototype.subscribeCore = function (o) { + var list = Object(this._iterable), + it = getIterable(list); + + return this._scheduler.scheduleRecursive(0, createScheduleMethod(o, it, this._fn)); + }; + + return FromObservable; + }(ObservableBase)); + + var maxSafeInteger = Math.pow(2, 53) - 1; + + function StringIterable(s) { + this._s = s; + } + + StringIterable.prototype[$iterator$] = function () { + return new StringIterator(this._s); + }; + + function StringIterator(s) { + this._s = s; + this._l = s.length; + this._i = 0; + } + + StringIterator.prototype[$iterator$] = function () { + return this; + }; + + StringIterator.prototype.next = function () { + return this._i < this._l ? { done: false, value: this._s.charAt(this._i++) } : doneEnumerator; + }; + + function ArrayIterable(a) { + this._a = a; + } + + ArrayIterable.prototype[$iterator$] = function () { + return new ArrayIterator(this._a); + }; + + function ArrayIterator(a) { + this._a = a; + this._l = toLength(a); + this._i = 0; + } + + ArrayIterator.prototype[$iterator$] = function () { + return this; + }; + + ArrayIterator.prototype.next = function () { + return this._i < this._l ? { done: false, value: this._a[this._i++] } : doneEnumerator; + }; + + function numberIsFinite(value) { + return typeof value === 'number' && root.isFinite(value); + } + + function isNan(n) { + return n !== n; + } + + function getIterable(o) { + var i = o[$iterator$], it; + if (!i && typeof o === 'string') { + it = new StringIterable(o); + return it[$iterator$](); + } + if (!i && o.length !== undefined) { + it = new ArrayIterable(o); + return it[$iterator$](); + } + if (!i) { throw new TypeError('Object is not iterable'); } + return o[$iterator$](); + } + + function sign(value) { + var number = +value; + if (number === 0) { return number; } + if (isNaN(number)) { return number; } + return number < 0 ? -1 : 1; + } + + function toLength(o) { + var len = +o.length; + if (isNaN(len)) { return 0; } + if (len === 0 || !numberIsFinite(len)) { return len; } + len = sign(len) * Math.floor(Math.abs(len)); + if (len <= 0) { return 0; } + if (len > maxSafeInteger) { return maxSafeInteger; } + return len; + } + + /** + * This method creates a new Observable sequence from an array-like or iterable object. + * @param {Any} arrayLike An array-like or iterable object to convert to an Observable sequence. + * @param {Function} [mapFn] Map function to call on every element of the array. + * @param {Any} [thisArg] The context to use calling the mapFn if provided. + * @param {Scheduler} [scheduler] Optional scheduler to use for scheduling. If not provided, defaults to Scheduler.currentThread. + */ + var observableFrom = Observable.from = function (iterable, mapFn, thisArg, scheduler) { + if (iterable == null) { + throw new Error('iterable cannot be null.') + } + if (mapFn && !isFunction(mapFn)) { + throw new Error('mapFn when provided must be a function'); + } + if (mapFn) { + var mapper = bindCallback(mapFn, thisArg, 2); + } + isScheduler(scheduler) || (scheduler = currentThreadScheduler); + return new FromObservable(iterable, mapper, scheduler); + } + + var FromArrayObservable = (function(__super__) { + inherits(FromArrayObservable, __super__); + function FromArrayObservable(args, scheduler) { + this._args = args; + this._scheduler = scheduler; + __super__.call(this); + } + + function scheduleMethod(o, args) { + var len = args.length; + return function loopRecursive (i, recurse) { + if (i < len) { + o.onNext(args[i]); + recurse(i + 1); + } else { + o.onCompleted(); + } + }; + } + + FromArrayObservable.prototype.subscribeCore = function (o) { + return this._scheduler.scheduleRecursive(0, scheduleMethod(o, this._args)); + }; + + return FromArrayObservable; + }(ObservableBase)); + + /** + * Converts an array to an observable sequence, using an optional scheduler to enumerate the array. + * @deprecated use Observable.from or Observable.of + * @param {Scheduler} [scheduler] Scheduler to run the enumeration of the input sequence on. + * @returns {Observable} The observable sequence whose elements are pulled from the given enumerable sequence. + */ + var observableFromArray = Observable.fromArray = function (array, scheduler) { + isScheduler(scheduler) || (scheduler = currentThreadScheduler); + return new FromArrayObservable(array, scheduler) + }; + + var NeverObservable = (function(__super__) { + inherits(NeverObservable, __super__); + function NeverObservable() { + __super__.call(this); + } + + NeverObservable.prototype.subscribeCore = function (observer) { + return disposableEmpty; + }; + + return NeverObservable; + }(ObservableBase)); + + var NEVER_OBSERVABLE = new NeverObservable(); + + /** + * Returns a non-terminating observable sequence, which can be used to denote an infinite duration (e.g. when using reactive joins). + * @returns {Observable} An observable sequence whose observers will never get called. + */ + var observableNever = Observable.never = function () { + return NEVER_OBSERVABLE; + }; + + function observableOf (scheduler, array) { + isScheduler(scheduler) || (scheduler = currentThreadScheduler); + return new FromArrayObservable(array, scheduler); + } + + /** + * This method creates a new Observable instance with a variable number of arguments, regardless of number or type of the arguments. + * @returns {Observable} The observable sequence whose elements are pulled from the given arguments. + */ + Observable.of = function () { + var len = arguments.length, args = new Array(len); + for(var i = 0; i < len; i++) { args[i] = arguments[i]; } + return new FromArrayObservable(args, currentThreadScheduler); + }; + + /** + * This method creates a new Observable instance with a variable number of arguments, regardless of number or type of the arguments. + * @param {Scheduler} scheduler A scheduler to use for scheduling the arguments. + * @returns {Observable} The observable sequence whose elements are pulled from the given arguments. + */ + Observable.ofWithScheduler = function (scheduler) { + var len = arguments.length, args = new Array(len - 1); + for(var i = 1; i < len; i++) { args[i - 1] = arguments[i]; } + return new FromArrayObservable(args, scheduler); + }; + + var PairsObservable = (function(__super__) { + inherits(PairsObservable, __super__); + function PairsObservable(o, scheduler) { + this._o = o; + this._keys = Object.keys(o); + this._scheduler = scheduler; + __super__.call(this); + } + + function scheduleMethod(o, obj, keys) { + return function loopRecursive(i, recurse) { + if (i < keys.length) { + var key = keys[i]; + o.onNext([key, obj[key]]); + recurse(i + 1); + } else { + o.onCompleted(); + } + }; + } + + PairsObservable.prototype.subscribeCore = function (o) { + return this._scheduler.scheduleRecursive(0, scheduleMethod(o, this._o, this._keys)); + }; + + return PairsObservable; + }(ObservableBase)); + + /** + * Convert an object into an observable sequence of [key, value] pairs. + * @param {Object} obj The object to inspect. + * @param {Scheduler} [scheduler] Scheduler to run the enumeration of the input sequence on. + * @returns {Observable} An observable sequence of [key, value] pairs from the object. + */ + Observable.pairs = function (obj, scheduler) { + scheduler || (scheduler = currentThreadScheduler); + return new PairsObservable(obj, scheduler); + }; + + var RangeObservable = (function(__super__) { + inherits(RangeObservable, __super__); + function RangeObservable(start, count, scheduler) { + this.start = start; + this.rangeCount = count; + this.scheduler = scheduler; + __super__.call(this); + } + + function loopRecursive(start, count, o) { + return function loop (i, recurse) { + if (i < count) { + o.onNext(start + i); + recurse(i + 1); + } else { + o.onCompleted(); + } + }; + } + + RangeObservable.prototype.subscribeCore = function (o) { + return this.scheduler.scheduleRecursive( + 0, + loopRecursive(this.start, this.rangeCount, o) + ); + }; + + return RangeObservable; + }(ObservableBase)); + + /** + * Generates an observable sequence of integral numbers within a specified range, using the specified scheduler to send out observer messages. + * @param {Number} start The value of the first integer in the sequence. + * @param {Number} count The number of sequential integers to generate. + * @param {Scheduler} [scheduler] Scheduler to run the generator loop on. If not specified, defaults to Scheduler.currentThread. + * @returns {Observable} An observable sequence that contains a range of sequential integral numbers. + */ + Observable.range = function (start, count, scheduler) { + isScheduler(scheduler) || (scheduler = currentThreadScheduler); + return new RangeObservable(start, count, scheduler); + }; + + var RepeatObservable = (function(__super__) { + inherits(RepeatObservable, __super__); + function RepeatObservable(value, repeatCount, scheduler) { + this.value = value; + this.repeatCount = repeatCount == null ? -1 : repeatCount; + this.scheduler = scheduler; + __super__.call(this); + } + + RepeatObservable.prototype.subscribeCore = function (observer) { + var sink = new RepeatSink(observer, this); + return sink.run(); + }; + + return RepeatObservable; + }(ObservableBase)); + + function RepeatSink(observer, parent) { + this.observer = observer; + this.parent = parent; + } + + RepeatSink.prototype.run = function () { + var observer = this.observer, value = this.parent.value; + function loopRecursive(i, recurse) { + if (i === -1 || i > 0) { + observer.onNext(value); + i > 0 && i--; + } + if (i === 0) { return observer.onCompleted(); } + recurse(i); + } + + return this.parent.scheduler.scheduleRecursive(this.parent.repeatCount, loopRecursive); + }; + + /** + * Generates an observable sequence that repeats the given element the specified number of times, using the specified scheduler to send out observer messages. + * @param {Mixed} value Element to repeat. + * @param {Number} repeatCount [Optiona] Number of times to repeat the element. If not specified, repeats indefinitely. + * @param {Scheduler} scheduler Scheduler to run the producer loop on. If not specified, defaults to Scheduler.immediate. + * @returns {Observable} An observable sequence that repeats the given element the specified number of times. + */ + Observable.repeat = function (value, repeatCount, scheduler) { + isScheduler(scheduler) || (scheduler = currentThreadScheduler); + return new RepeatObservable(value, repeatCount, scheduler); + }; + + var JustObservable = (function(__super__) { + inherits(JustObservable, __super__); + function JustObservable(value, scheduler) { + this._value = value; + this._scheduler = scheduler; + __super__.call(this); + } + + JustObservable.prototype.subscribeCore = function (o) { + var state = [this._value, o]; + return this._scheduler === immediateScheduler ? + scheduleItem(null, state) : + this._scheduler.schedule(state, scheduleItem); + }; + + function scheduleItem(s, state) { + var value = state[0], observer = state[1]; + observer.onNext(value); + observer.onCompleted(); + return disposableEmpty; + } + + return JustObservable; + }(ObservableBase)); + + /** + * Returns an observable sequence that contains a single element, using the specified scheduler to send out observer messages. + * There is an alias called 'just' or browsers 0) { + this.parent.handleSubscribe(this.parent.q.shift()); + } else { + this.parent.activeCount--; + this.parent.done && this.parent.activeCount === 0 && this.parent.o.onCompleted(); + } + }; + + return MergeObserver; + }(AbstractObserver)); + + /** + * Merges an observable sequence of observable sequences into an observable sequence, limiting the number of concurrent subscriptions to inner sequences. + * Or merges two observable sequences into a single observable sequence. + * @param {Mixed} [maxConcurrentOrOther] Maximum number of inner observable sequences being subscribed to concurrently or the second observable sequence. + * @returns {Observable} The observable sequence that merges the elements of the inner sequences. + */ + observableProto.merge = function (maxConcurrentOrOther) { + return typeof maxConcurrentOrOther !== 'number' ? + observableMerge(this, maxConcurrentOrOther) : + new MergeObservable(this, maxConcurrentOrOther); + }; + + /** + * Merges all the observable sequences into a single observable sequence. + * The scheduler is optional and if not specified, the immediate scheduler is used. + * @returns {Observable} The observable sequence that merges the elements of the observable sequences. + */ + var observableMerge = Observable.merge = function () { + var scheduler, sources = [], i, len = arguments.length; + if (!arguments[0]) { + scheduler = immediateScheduler; + for(i = 1; i < len; i++) { sources.push(arguments[i]); } + } else if (isScheduler(arguments[0])) { + scheduler = arguments[0]; + for(i = 1; i < len; i++) { sources.push(arguments[i]); } + } else { + scheduler = immediateScheduler; + for(i = 0; i < len; i++) { sources.push(arguments[i]); } + } + if (Array.isArray(sources[0])) { + sources = sources[0]; + } + return observableOf(scheduler, sources).mergeAll(); + }; + + var CompositeError = Rx.CompositeError = function(errors) { + this.innerErrors = errors; + this.message = 'This contains multiple errors. Check the innerErrors'; + Error.call(this); + }; + CompositeError.prototype = Object.create(Error.prototype); + CompositeError.prototype.name = 'CompositeError'; + + var MergeDelayErrorObservable = (function(__super__) { + inherits(MergeDelayErrorObservable, __super__); + function MergeDelayErrorObservable(source) { + this.source = source; + __super__.call(this); + } + + MergeDelayErrorObservable.prototype.subscribeCore = function (o) { + var group = new CompositeDisposable(), + m = new SingleAssignmentDisposable(), + state = { isStopped: false, errors: [], o: o }; + + group.add(m); + m.setDisposable(this.source.subscribe(new MergeDelayErrorObserver(group, state))); + + return group; + }; + + return MergeDelayErrorObservable; + }(ObservableBase)); + + var MergeDelayErrorObserver = (function(__super__) { + inherits(MergeDelayErrorObserver, __super__); + function MergeDelayErrorObserver(group, state) { + this._group = group; + this._state = state; + __super__.call(this); + } + + function setCompletion(o, errors) { + if (errors.length === 0) { + o.onCompleted(); + } else if (errors.length === 1) { + o.onError(errors[0]); + } else { + o.onError(new CompositeError(errors)); + } + } + + MergeDelayErrorObserver.prototype.next = function (x) { + var inner = new SingleAssignmentDisposable(); + this._group.add(inner); + + // Check for promises support + isPromise(x) && (x = observableFromPromise(x)); + inner.setDisposable(x.subscribe(new InnerObserver(inner, this._group, this._state))); + }; + + MergeDelayErrorObserver.prototype.error = function (e) { + this._state.errors.push(e); + this._state.isStopped = true; + this._group.length === 1 && setCompletion(this._state.o, this._state.errors); + }; + + MergeDelayErrorObserver.prototype.completed = function () { + this._state.isStopped = true; + this._group.length === 1 && setCompletion(this._state.o, this._state.errors); + }; + + inherits(InnerObserver, __super__); + function InnerObserver(inner, group, state) { + this._inner = inner; + this._group = group; + this._state = state; + __super__.call(this); + } + + InnerObserver.prototype.next = function (x) { this._state.o.onNext(x); }; + InnerObserver.prototype.error = function (e) { + this._state.errors.push(e); + this._group.remove(this._inner); + this._state.isStopped && this._group.length === 1 && setCompletion(this._state.o, this._state.errors); + }; + InnerObserver.prototype.completed = function () { + this._group.remove(this._inner); + this._state.isStopped && this._group.length === 1 && setCompletion(this._state.o, this._state.errors); + }; + + return MergeDelayErrorObserver; + }(AbstractObserver)); + + /** + * Flattens an Observable that emits Observables into one Observable, in a way that allows an Observer to + * receive all successfully emitted items from all of the source Observables without being interrupted by + * an error notification from one of them. + * + * This behaves like Observable.prototype.mergeAll except that if any of the merged Observables notify of an + * error via the Observer's onError, mergeDelayError will refrain from propagating that + * error notification until all of the merged Observables have finished emitting items. + * @param {Array | Arguments} args Arguments or an array to merge. + * @returns {Observable} an Observable that emits all of the items emitted by the Observables emitted by the Observable + */ + Observable.mergeDelayError = function() { + var args; + if (Array.isArray(arguments[0])) { + args = arguments[0]; + } else { + var len = arguments.length; + args = new Array(len); + for(var i = 0; i < len; i++) { args[i] = arguments[i]; } + } + var source = observableOf(null, args); + return new MergeDelayErrorObservable(source); + }; + + var MergeAllObservable = (function (__super__) { + inherits(MergeAllObservable, __super__); + + function MergeAllObservable(source) { + this.source = source; + __super__.call(this); + } + + MergeAllObservable.prototype.subscribeCore = function (o) { + var g = new CompositeDisposable(), m = new SingleAssignmentDisposable(); + g.add(m); + m.setDisposable(this.source.subscribe(new MergeAllObserver(o, g))); + return g; + }; + + return MergeAllObservable; + }(ObservableBase)); + + var MergeAllObserver = (function (__super__) { + function MergeAllObserver(o, g) { + this.o = o; + this.g = g; + this.done = false; + __super__.call(this); + } + + inherits(MergeAllObserver, __super__); + + MergeAllObserver.prototype.next = function(innerSource) { + var sad = new SingleAssignmentDisposable(); + this.g.add(sad); + isPromise(innerSource) && (innerSource = observableFromPromise(innerSource)); + sad.setDisposable(innerSource.subscribe(new InnerObserver(this, sad))); + }; + + MergeAllObserver.prototype.error = function (e) { + this.o.onError(e); + }; + + MergeAllObserver.prototype.completed = function () { + this.done = true; + this.g.length === 1 && this.o.onCompleted(); + }; + + function InnerObserver(parent, sad) { + this.parent = parent; + this.sad = sad; + __super__.call(this); + } + + inherits(InnerObserver, __super__); + + InnerObserver.prototype.next = function (x) { + this.parent.o.onNext(x); + }; + InnerObserver.prototype.error = function (e) { + this.parent.o.onError(e); + }; + InnerObserver.prototype.completed = function () { + this.parent.g.remove(this.sad); + this.parent.done && this.parent.g.length === 1 && this.parent.o.onCompleted(); + }; + + return MergeAllObserver; + }(AbstractObserver)); + + /** + * Merges an observable sequence of observable sequences into an observable sequence. + * @returns {Observable} The observable sequence that merges the elements of the inner sequences. + */ + observableProto.mergeAll = function () { + return new MergeAllObservable(this); + }; + + var SkipUntilObservable = (function(__super__) { + inherits(SkipUntilObservable, __super__); + + function SkipUntilObservable(source, other) { + this._s = source; + this._o = isPromise(other) ? observableFromPromise(other) : other; + this._open = false; + __super__.call(this); + } + + SkipUntilObservable.prototype.subscribeCore = function(o) { + var leftSubscription = new SingleAssignmentDisposable(); + leftSubscription.setDisposable(this._s.subscribe(new SkipUntilSourceObserver(o, this))); + + isPromise(this._o) && (this._o = observableFromPromise(this._o)); + + var rightSubscription = new SingleAssignmentDisposable(); + rightSubscription.setDisposable(this._o.subscribe(new SkipUntilOtherObserver(o, this, rightSubscription))); + + return new BinaryDisposable(leftSubscription, rightSubscription); + }; + + return SkipUntilObservable; + }(ObservableBase)); + + var SkipUntilSourceObserver = (function(__super__) { + inherits(SkipUntilSourceObserver, __super__); + function SkipUntilSourceObserver(o, p) { + this._o = o; + this._p = p; + __super__.call(this); + } + + SkipUntilSourceObserver.prototype.next = function (x) { + this._p._open && this._o.onNext(x); + }; + + SkipUntilSourceObserver.prototype.error = function (err) { + this._o.onError(err); + }; + + SkipUntilSourceObserver.prototype.onCompleted = function () { + this._p._open && this._o.onCompleted(); + }; + + return SkipUntilSourceObserver; + }(AbstractObserver)); + + var SkipUntilOtherObserver = (function(__super__) { + inherits(SkipUntilOtherObserver, __super__); + function SkipUntilOtherObserver(o, p, r) { + this._o = o; + this._p = p; + this._r = r; + __super__.call(this); + } + + SkipUntilOtherObserver.prototype.next = function () { + this._p._open = true; + this._r.dispose(); + }; + + SkipUntilOtherObserver.prototype.error = function (err) { + this._o.onError(err); + }; + + SkipUntilOtherObserver.prototype.onCompleted = function () { + this._r.dispose(); + }; + + return SkipUntilOtherObserver; + }(AbstractObserver)); + + /** + * Returns the values from the source observable sequence only after the other observable sequence produces a value. + * @param {Observable | Promise} other The observable sequence or Promise that triggers propagation of elements of the source sequence. + * @returns {Observable} An observable sequence containing the elements of the source sequence starting from the point the other sequence triggered propagation. + */ + observableProto.skipUntil = function (other) { + return new SkipUntilObservable(this, other); + }; + + var SwitchObservable = (function(__super__) { + inherits(SwitchObservable, __super__); + function SwitchObservable(source) { + this.source = source; + __super__.call(this); + } + + SwitchObservable.prototype.subscribeCore = function (o) { + var inner = new SerialDisposable(), s = this.source.subscribe(new SwitchObserver(o, inner)); + return new BinaryDisposable(s, inner); + }; + + inherits(SwitchObserver, AbstractObserver); + function SwitchObserver(o, inner) { + this.o = o; + this.inner = inner; + this.stopped = false; + this.latest = 0; + this.hasLatest = false; + AbstractObserver.call(this); + } + + SwitchObserver.prototype.next = function (innerSource) { + var d = new SingleAssignmentDisposable(), id = ++this.latest; + this.hasLatest = true; + this.inner.setDisposable(d); + isPromise(innerSource) && (innerSource = observableFromPromise(innerSource)); + d.setDisposable(innerSource.subscribe(new InnerObserver(this, id))); + }; + + SwitchObserver.prototype.error = function (e) { + this.o.onError(e); + }; + + SwitchObserver.prototype.completed = function () { + this.stopped = true; + !this.hasLatest && this.o.onCompleted(); + }; + + inherits(InnerObserver, AbstractObserver); + function InnerObserver(parent, id) { + this.parent = parent; + this.id = id; + AbstractObserver.call(this); + } + InnerObserver.prototype.next = function (x) { + this.parent.latest === this.id && this.parent.o.onNext(x); + }; + + InnerObserver.prototype.error = function (e) { + this.parent.latest === this.id && this.parent.o.onError(e); + }; + + InnerObserver.prototype.completed = function () { + if (this.parent.latest === this.id) { + this.parent.hasLatest = false; + this.parent.stopped && this.parent.o.onCompleted(); + } + }; + + return SwitchObservable; + }(ObservableBase)); + + /** + * Transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence. + * @returns {Observable} The observable sequence that at any point in time produces the elements of the most recent inner observable sequence that has been received. + */ + observableProto['switch'] = observableProto.switchLatest = function () { + return new SwitchObservable(this); + }; + + var TakeUntilObservable = (function(__super__) { + inherits(TakeUntilObservable, __super__); + + function TakeUntilObservable(source, other) { + this.source = source; + this.other = isPromise(other) ? observableFromPromise(other) : other; + __super__.call(this); + } + + TakeUntilObservable.prototype.subscribeCore = function(o) { + return new BinaryDisposable( + this.source.subscribe(o), + this.other.subscribe(new TakeUntilObserver(o)) + ); + }; + + return TakeUntilObservable; + }(ObservableBase)); + + var TakeUntilObserver = (function(__super__) { + inherits(TakeUntilObserver, __super__); + function TakeUntilObserver(o) { + this._o = o; + __super__.call(this); + } + + TakeUntilObserver.prototype.next = function () { + this._o.onCompleted(); + }; + + TakeUntilObserver.prototype.error = function (err) { + this._o.onError(err); + }; + + TakeUntilObserver.prototype.onCompleted = noop; + + return TakeUntilObserver; + }(AbstractObserver)); + + /** + * Returns the values from the source observable sequence until the other observable sequence produces a value. + * @param {Observable | Promise} other Observable sequence or Promise that terminates propagation of elements of the source sequence. + * @returns {Observable} An observable sequence containing the elements of the source sequence up to the point the other sequence interrupted further propagation. + */ + observableProto.takeUntil = function (other) { + return new TakeUntilObservable(this, other); + }; + + function falseFactory() { return false; } + function argumentsToArray() { + var len = arguments.length, args = new Array(len); + for(var i = 0; i < len; i++) { args[i] = arguments[i]; } + return args; + } + + var WithLatestFromObservable = (function(__super__) { + inherits(WithLatestFromObservable, __super__); + function WithLatestFromObservable(source, sources, resultSelector) { + this._s = source; + this._ss = sources; + this._cb = resultSelector; + __super__.call(this); + } + + WithLatestFromObservable.prototype.subscribeCore = function (o) { + var len = this._ss.length; + var state = { + hasValue: arrayInitialize(len, falseFactory), + hasValueAll: false, + values: new Array(len) + }; + + var n = this._ss.length, subscriptions = new Array(n + 1); + for (var i = 0; i < n; i++) { + var other = this._ss[i], sad = new SingleAssignmentDisposable(); + isPromise(other) && (other = observableFromPromise(other)); + sad.setDisposable(other.subscribe(new WithLatestFromOtherObserver(o, i, state))); + subscriptions[i] = sad; + } + + var outerSad = new SingleAssignmentDisposable(); + outerSad.setDisposable(this._s.subscribe(new WithLatestFromSourceObserver(o, this._cb, state))); + subscriptions[n] = outerSad; + + return new NAryDisposable(subscriptions); + }; + + return WithLatestFromObservable; + }(ObservableBase)); + + var WithLatestFromOtherObserver = (function (__super__) { + inherits(WithLatestFromOtherObserver, __super__); + function WithLatestFromOtherObserver(o, i, state) { + this._o = o; + this._i = i; + this._state = state; + __super__.call(this); + } + + WithLatestFromOtherObserver.prototype.next = function (x) { + this._state.values[this._i] = x; + this._state.hasValue[this._i] = true; + this._state.hasValueAll = this._state.hasValue.every(identity); + }; + + WithLatestFromOtherObserver.prototype.error = function (e) { + this._o.onError(e); + }; + + WithLatestFromOtherObserver.prototype.completed = noop; + + return WithLatestFromOtherObserver; + }(AbstractObserver)); + + var WithLatestFromSourceObserver = (function (__super__) { + inherits(WithLatestFromSourceObserver, __super__); + function WithLatestFromSourceObserver(o, cb, state) { + this._o = o; + this._cb = cb; + this._state = state; + __super__.call(this); + } + + WithLatestFromSourceObserver.prototype.next = function (x) { + var allValues = [x].concat(this._state.values); + if (!this._state.hasValueAll) { return; } + var res = tryCatch(this._cb).apply(null, allValues); + if (res === errorObj) { return this._o.onError(res.e); } + this._o.onNext(res); + }; + + WithLatestFromSourceObserver.prototype.error = function (e) { + this._o.onError(e); + }; + + WithLatestFromSourceObserver.prototype.completed = function () { + this._o.onCompleted(); + }; + + return WithLatestFromSourceObserver; + }(AbstractObserver)); + + /** + * Merges the specified observable sequences into one observable sequence by using the selector function only when the (first) source observable sequence produces an element. + * @returns {Observable} An observable sequence containing the result of combining elements of the sources using the specified result selector function. + */ + observableProto.withLatestFrom = function () { + if (arguments.length === 0) { throw new Error('invalid arguments'); } + + var len = arguments.length, args = new Array(len); + for(var i = 0; i < len; i++) { args[i] = arguments[i]; } + var resultSelector = isFunction(args[len - 1]) ? args.pop() : argumentsToArray; + Array.isArray(args[0]) && (args = args[0]); + + return new WithLatestFromObservable(this, args, resultSelector); + }; + + function falseFactory() { return false; } + function emptyArrayFactory() { return []; } + + var ZipObservable = (function(__super__) { + inherits(ZipObservable, __super__); + function ZipObservable(sources, resultSelector) { + this._s = sources; + this._cb = resultSelector; + __super__.call(this); + } + + ZipObservable.prototype.subscribeCore = function(observer) { + var n = this._s.length, + subscriptions = new Array(n), + done = arrayInitialize(n, falseFactory), + q = arrayInitialize(n, emptyArrayFactory); + + for (var i = 0; i < n; i++) { + var source = this._s[i], sad = new SingleAssignmentDisposable(); + subscriptions[i] = sad; + isPromise(source) && (source = observableFromPromise(source)); + sad.setDisposable(source.subscribe(new ZipObserver(observer, i, this, q, done))); + } + + return new NAryDisposable(subscriptions); + }; + + return ZipObservable; + }(ObservableBase)); + + var ZipObserver = (function (__super__) { + inherits(ZipObserver, __super__); + function ZipObserver(o, i, p, q, d) { + this._o = o; + this._i = i; + this._p = p; + this._q = q; + this._d = d; + __super__.call(this); + } + + function notEmpty(x) { return x.length > 0; } + function shiftEach(x) { return x.shift(); } + function notTheSame(i) { + return function (x, j) { + return j !== i; + }; + } + + ZipObserver.prototype.next = function (x) { + this._q[this._i].push(x); + if (this._q.every(notEmpty)) { + var queuedValues = this._q.map(shiftEach); + var res = tryCatch(this._p._cb).apply(null, queuedValues); + if (res === errorObj) { return this._o.onError(res.e); } + this._o.onNext(res); + } else if (this._d.filter(notTheSame(this._i)).every(identity)) { + this._o.onCompleted(); + } + }; + + ZipObserver.prototype.error = function (e) { + this._o.onError(e); + }; + + ZipObserver.prototype.completed = function () { + this._d[this._i] = true; + this._d.every(identity) && this._o.onCompleted(); + }; + + return ZipObserver; + }(AbstractObserver)); + + /** + * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences or an array have produced an element at a corresponding index. + * The last element in the arguments must be a function to invoke for each series of elements at corresponding indexes in the args. + * @returns {Observable} An observable sequence containing the result of combining elements of the args using the specified result selector function. + */ + observableProto.zip = function () { + if (arguments.length === 0) { throw new Error('invalid arguments'); } + + var len = arguments.length, args = new Array(len); + for(var i = 0; i < len; i++) { args[i] = arguments[i]; } + var resultSelector = isFunction(args[len - 1]) ? args.pop() : argumentsToArray; + Array.isArray(args[0]) && (args = args[0]); + + var parent = this; + args.unshift(parent); + + return new ZipObservable(args, resultSelector); + }; + + /** + * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. + * @param arguments Observable sources. + * @param {Function} resultSelector Function to invoke for each series of elements at corresponding indexes in the sources. + * @returns {Observable} An observable sequence containing the result of combining elements of the sources using the specified result selector function. + */ + Observable.zip = function () { + var len = arguments.length, args = new Array(len); + for(var i = 0; i < len; i++) { args[i] = arguments[i]; } + if (Array.isArray(args[0])) { + args = isFunction(args[1]) ? args[0].concat(args[1]) : args[0]; + } + var first = args.shift(); + return first.zip.apply(first, args); + }; + +function falseFactory() { return false; } +function emptyArrayFactory() { return []; } +function argumentsToArray() { + var len = arguments.length, args = new Array(len); + for(var i = 0; i < len; i++) { args[i] = arguments[i]; } + return args; +} + +var ZipIterableObservable = (function(__super__) { + inherits(ZipIterableObservable, __super__); + function ZipIterableObservable(sources, cb) { + this.sources = sources; + this._cb = cb; + __super__.call(this); + } + + ZipIterableObservable.prototype.subscribeCore = function (o) { + var sources = this.sources, len = sources.length, subscriptions = new Array(len); + + var state = { + q: arrayInitialize(len, emptyArrayFactory), + done: arrayInitialize(len, falseFactory), + cb: this._cb, + o: o + }; + + for (var i = 0; i < len; i++) { + (function (i) { + var source = sources[i], sad = new SingleAssignmentDisposable(); + (isArrayLike(source) || isIterable(source)) && (source = observableFrom(source)); + + subscriptions[i] = sad; + sad.setDisposable(source.subscribe(new ZipIterableObserver(state, i))); + }(i)); + } + + return new NAryDisposable(subscriptions); + }; + + return ZipIterableObservable; +}(ObservableBase)); + +var ZipIterableObserver = (function (__super__) { + inherits(ZipIterableObserver, __super__); + function ZipIterableObserver(s, i) { + this._s = s; + this._i = i; + __super__.call(this); + } + + function notEmpty(x) { return x.length > 0; } + function shiftEach(x) { return x.shift(); } + function notTheSame(i) { + return function (x, j) { + return j !== i; + }; + } + + ZipIterableObserver.prototype.next = function (x) { + this._s.q[this._i].push(x); + if (this._s.q.every(notEmpty)) { + var queuedValues = this._s.q.map(shiftEach), + res = tryCatch(this._s.cb).apply(null, queuedValues); + if (res === errorObj) { return this._s.o.onError(res.e); } + this._s.o.onNext(res); + } else if (this._s.done.filter(notTheSame(this._i)).every(identity)) { + this._s.o.onCompleted(); + } + }; + + ZipIterableObserver.prototype.error = function (e) { this._s.o.onError(e); }; + + ZipIterableObserver.prototype.completed = function () { + this._s.done[this._i] = true; + this._s.done.every(identity) && this._s.o.onCompleted(); + }; + + return ZipIterableObserver; +}(AbstractObserver)); + +/** + * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences or an array have produced an element at a corresponding index. + * The last element in the arguments must be a function to invoke for each series of elements at corresponding indexes in the args. + * @returns {Observable} An observable sequence containing the result of combining elements of the args using the specified result selector function. + */ +observableProto.zipIterable = function () { + if (arguments.length === 0) { throw new Error('invalid arguments'); } + + var len = arguments.length, args = new Array(len); + for(var i = 0; i < len; i++) { args[i] = arguments[i]; } + var resultSelector = isFunction(args[len - 1]) ? args.pop() : argumentsToArray; + + var parent = this; + args.unshift(parent); + return new ZipIterableObservable(args, resultSelector); +}; + + function asObservable(source) { + return function subscribe(o) { return source.subscribe(o); }; + } + + /** + * Hides the identity of an observable sequence. + * @returns {Observable} An observable sequence that hides the identity of the source sequence. + */ + observableProto.asObservable = function () { + return new AnonymousObservable(asObservable(this), this); + }; + + var DematerializeObservable = (function (__super__) { + inherits(DematerializeObservable, __super__); + function DematerializeObservable(source) { + this.source = source; + __super__.call(this); + } + + DematerializeObservable.prototype.subscribeCore = function (o) { + return this.source.subscribe(new DematerializeObserver(o)); + }; + + return DematerializeObservable; + }(ObservableBase)); + + var DematerializeObserver = (function (__super__) { + inherits(DematerializeObserver, __super__); + + function DematerializeObserver(o) { + this._o = o; + __super__.call(this); + } + + DematerializeObserver.prototype.next = function (x) { x.accept(this._o); }; + DematerializeObserver.prototype.error = function (e) { this._o.onError(e); }; + DematerializeObserver.prototype.completed = function () { this._o.onCompleted(); }; + + return DematerializeObserver; + }(AbstractObserver)); + + /** + * Dematerializes the explicit notification values of an observable sequence as implicit notifications. + * @returns {Observable} An observable sequence exhibiting the behavior corresponding to the source sequence's notification values. + */ + observableProto.dematerialize = function () { + return new DematerializeObservable(this); + }; + + var DistinctUntilChangedObservable = (function(__super__) { + inherits(DistinctUntilChangedObservable, __super__); + function DistinctUntilChangedObservable(source, keyFn, comparer) { + this.source = source; + this.keyFn = keyFn; + this.comparer = comparer; + __super__.call(this); + } + + DistinctUntilChangedObservable.prototype.subscribeCore = function (o) { + return this.source.subscribe(new DistinctUntilChangedObserver(o, this.keyFn, this.comparer)); + }; + + return DistinctUntilChangedObservable; + }(ObservableBase)); + + var DistinctUntilChangedObserver = (function(__super__) { + inherits(DistinctUntilChangedObserver, __super__); + function DistinctUntilChangedObserver(o, keyFn, comparer) { + this.o = o; + this.keyFn = keyFn; + this.comparer = comparer; + this.hasCurrentKey = false; + this.currentKey = null; + __super__.call(this); + } + + DistinctUntilChangedObserver.prototype.next = function (x) { + var key = x, comparerEquals; + if (isFunction(this.keyFn)) { + key = tryCatch(this.keyFn)(x); + if (key === errorObj) { return this.o.onError(key.e); } + } + if (this.hasCurrentKey) { + comparerEquals = tryCatch(this.comparer)(this.currentKey, key); + if (comparerEquals === errorObj) { return this.o.onError(comparerEquals.e); } + } + if (!this.hasCurrentKey || !comparerEquals) { + this.hasCurrentKey = true; + this.currentKey = key; + this.o.onNext(x); + } + }; + DistinctUntilChangedObserver.prototype.error = function(e) { + this.o.onError(e); + }; + DistinctUntilChangedObserver.prototype.completed = function () { + this.o.onCompleted(); + }; + + return DistinctUntilChangedObserver; + }(AbstractObserver)); + + /** + * Returns an observable sequence that contains only distinct contiguous elements according to the keyFn and the comparer. + * @param {Function} [keyFn] A function to compute the comparison key for each element. If not provided, it projects the value. + * @param {Function} [comparer] Equality comparer for computed key values. If not provided, defaults to an equality comparer function. + * @returns {Observable} An observable sequence only containing the distinct contiguous elements, based on a computed key value, from the source sequence. + */ + observableProto.distinctUntilChanged = function (keyFn, comparer) { + comparer || (comparer = defaultComparer); + return new DistinctUntilChangedObservable(this, keyFn, comparer); + }; + + var TapObservable = (function(__super__) { + inherits(TapObservable,__super__); + function TapObservable(source, observerOrOnNext, onError, onCompleted) { + this.source = source; + this._oN = observerOrOnNext; + this._oE = onError; + this._oC = onCompleted; + __super__.call(this); + } + + TapObservable.prototype.subscribeCore = function(o) { + return this.source.subscribe(new InnerObserver(o, this)); + }; + + inherits(InnerObserver, AbstractObserver); + function InnerObserver(o, p) { + this.o = o; + this.t = !p._oN || isFunction(p._oN) ? + observerCreate(p._oN || noop, p._oE || noop, p._oC || noop) : + p._oN; + this.isStopped = false; + AbstractObserver.call(this); + } + InnerObserver.prototype.next = function(x) { + var res = tryCatch(this.t.onNext).call(this.t, x); + if (res === errorObj) { this.o.onError(res.e); } + this.o.onNext(x); + }; + InnerObserver.prototype.error = function(err) { + var res = tryCatch(this.t.onError).call(this.t, err); + if (res === errorObj) { return this.o.onError(res.e); } + this.o.onError(err); + }; + InnerObserver.prototype.completed = function() { + var res = tryCatch(this.t.onCompleted).call(this.t); + if (res === errorObj) { return this.o.onError(res.e); } + this.o.onCompleted(); + }; + + return TapObservable; + }(ObservableBase)); + + /** + * Invokes an action for each element in the observable sequence and invokes an action upon graceful or exceptional termination of the observable sequence. + * This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline. + * @param {Function | Observer} observerOrOnNext Action to invoke for each element in the observable sequence or an o. + * @param {Function} [onError] Action to invoke upon exceptional termination of the observable sequence. Used if only the observerOrOnNext parameter is also a function. + * @param {Function} [onCompleted] Action to invoke upon graceful termination of the observable sequence. Used if only the observerOrOnNext parameter is also a function. + * @returns {Observable} The source sequence with the side-effecting behavior applied. + */ + observableProto['do'] = observableProto.tap = observableProto.doAction = function (observerOrOnNext, onError, onCompleted) { + return new TapObservable(this, observerOrOnNext, onError, onCompleted); + }; + + /** + * Invokes an action for each element in the observable sequence. + * This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline. + * @param {Function} onNext Action to invoke for each element in the observable sequence. + * @param {Any} [thisArg] Object to use as this when executing callback. + * @returns {Observable} The source sequence with the side-effecting behavior applied. + */ + observableProto.doOnNext = observableProto.tapOnNext = function (onNext, thisArg) { + return this.tap(typeof thisArg !== 'undefined' ? function (x) { onNext.call(thisArg, x); } : onNext); + }; + + /** + * Invokes an action upon exceptional termination of the observable sequence. + * This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline. + * @param {Function} onError Action to invoke upon exceptional termination of the observable sequence. + * @param {Any} [thisArg] Object to use as this when executing callback. + * @returns {Observable} The source sequence with the side-effecting behavior applied. + */ + observableProto.doOnError = observableProto.tapOnError = function (onError, thisArg) { + return this.tap(noop, typeof thisArg !== 'undefined' ? function (e) { onError.call(thisArg, e); } : onError); + }; + + /** + * Invokes an action upon graceful termination of the observable sequence. + * This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline. + * @param {Function} onCompleted Action to invoke upon graceful termination of the observable sequence. + * @param {Any} [thisArg] Object to use as this when executing callback. + * @returns {Observable} The source sequence with the side-effecting behavior applied. + */ + observableProto.doOnCompleted = observableProto.tapOnCompleted = function (onCompleted, thisArg) { + return this.tap(noop, null, typeof thisArg !== 'undefined' ? function () { onCompleted.call(thisArg); } : onCompleted); + }; + + var FinallyObservable = (function (__super__) { + inherits(FinallyObservable, __super__); + function FinallyObservable(source, fn, thisArg) { + this.source = source; + this._fn = bindCallback(fn, thisArg, 0); + __super__.call(this); + } + + FinallyObservable.prototype.subscribeCore = function (o) { + var d = tryCatch(this.source.subscribe).call(this.source, o); + if (d === errorObj) { + this._fn(); + thrower(d.e); + } + + return new FinallyDisposable(d, this._fn); + }; + + function FinallyDisposable(s, fn) { + this.isDisposed = false; + this._s = s; + this._fn = fn; + } + FinallyDisposable.prototype.dispose = function () { + if (!this.isDisposed) { + var res = tryCatch(this._s.dispose).call(this._s); + this._fn(); + res === errorObj && thrower(res.e); + } + }; + + return FinallyObservable; + + }(ObservableBase)); + + /** + * Invokes a specified action after the source observable sequence terminates gracefully or exceptionally. + * @param {Function} finallyAction Action to invoke after the source observable sequence terminates. + * @returns {Observable} Source sequence with the action-invoking termination behavior applied. + */ + observableProto['finally'] = function (action, thisArg) { + return new FinallyObservable(this, action, thisArg); + }; + + var IgnoreElementsObservable = (function(__super__) { + inherits(IgnoreElementsObservable, __super__); + + function IgnoreElementsObservable(source) { + this.source = source; + __super__.call(this); + } + + IgnoreElementsObservable.prototype.subscribeCore = function (o) { + return this.source.subscribe(new InnerObserver(o)); + }; + + function InnerObserver(o) { + this.o = o; + this.isStopped = false; + } + InnerObserver.prototype.onNext = noop; + InnerObserver.prototype.onError = function (err) { + if(!this.isStopped) { + this.isStopped = true; + this.o.onError(err); + } + }; + InnerObserver.prototype.onCompleted = function () { + if(!this.isStopped) { + this.isStopped = true; + this.o.onCompleted(); + } + }; + InnerObserver.prototype.dispose = function() { this.isStopped = true; }; + InnerObserver.prototype.fail = function (e) { + if (!this.isStopped) { + this.isStopped = true; + this.observer.onError(e); + return true; + } + + return false; + }; + + return IgnoreElementsObservable; + }(ObservableBase)); + + /** + * Ignores all elements in an observable sequence leaving only the termination messages. + * @returns {Observable} An empty observable sequence that signals termination, successful or exceptional, of the source sequence. + */ + observableProto.ignoreElements = function () { + return new IgnoreElementsObservable(this); + }; + + var MaterializeObservable = (function (__super__) { + inherits(MaterializeObservable, __super__); + function MaterializeObservable(source, fn) { + this.source = source; + __super__.call(this); + } + + MaterializeObservable.prototype.subscribeCore = function (o) { + return this.source.subscribe(new MaterializeObserver(o)); + }; + + return MaterializeObservable; + }(ObservableBase)); + + var MaterializeObserver = (function (__super__) { + inherits(MaterializeObserver, __super__); + + function MaterializeObserver(o) { + this._o = o; + __super__.call(this); + } + + MaterializeObserver.prototype.next = function (x) { this._o.onNext(notificationCreateOnNext(x)) }; + MaterializeObserver.prototype.error = function (e) { this._o.onNext(notificationCreateOnError(e)); this._o.onCompleted(); }; + MaterializeObserver.prototype.completed = function () { this._o.onNext(notificationCreateOnCompleted()); this._o.onCompleted(); }; + + return MaterializeObserver; + }(AbstractObserver)); + + /** + * Materializes the implicit notifications of an observable sequence as explicit notification values. + * @returns {Observable} An observable sequence containing the materialized notification values from the source sequence. + */ + observableProto.materialize = function () { + return new MaterializeObservable(this); + }; + + /** + * Repeats the observable sequence a specified number of times. If the repeat count is not specified, the sequence repeats indefinitely. + * @param {Number} [repeatCount] Number of times to repeat the sequence. If not provided, repeats the sequence indefinitely. + * @returns {Observable} The observable sequence producing the elements of the given sequence repeatedly. + */ + observableProto.repeat = function (repeatCount) { + return enumerableRepeat(this, repeatCount).concat(); + }; + + /** + * Repeats the source observable sequence the specified number of times or until it successfully terminates. If the retry count is not specified, it retries indefinitely. + * Note if you encounter an error and want it to retry once, then you must use .retry(2); + * + * @example + * var res = retried = retry.repeat(); + * var res = retried = retry.repeat(2); + * @param {Number} [retryCount] Number of times to retry the sequence. If not provided, retry the sequence indefinitely. + * @returns {Observable} An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully. + */ + observableProto.retry = function (retryCount) { + return enumerableRepeat(this, retryCount).catchError(); + }; + + function repeat(value) { + return { + '@@iterator': function () { + return { + next: function () { + return { done: false, value: value }; + } + }; + } + }; + } + + var RetryWhenObservable = (function(__super__) { + function createDisposable(state) { + return { + isDisposed: false, + dispose: function () { + if (!this.isDisposed) { + this.isDisposed = true; + state.isDisposed = true; + } + } + }; + } + + function RetryWhenObservable(source, notifier) { + this.source = source; + this._notifier = notifier; + __super__.call(this); + } + + inherits(RetryWhenObservable, __super__); + + RetryWhenObservable.prototype.subscribeCore = function (o) { + var exceptions = new Subject(), + notifier = new Subject(), + handled = this._notifier(exceptions), + notificationDisposable = handled.subscribe(notifier); + + var e = this.source['@@iterator'](); + + var state = { isDisposed: false }, + lastError, + subscription = new SerialDisposable(); + var cancelable = currentThreadScheduler.scheduleRecursive(null, function (_, recurse) { + if (state.isDisposed) { return; } + var currentItem = e.next(); + + if (currentItem.done) { + if (lastError) { + o.onError(lastError); + } else { + o.onCompleted(); + } + return; + } + + // Check if promise + var currentValue = currentItem.value; + isPromise(currentValue) && (currentValue = observableFromPromise(currentValue)); + + var outer = new SingleAssignmentDisposable(); + var inner = new SingleAssignmentDisposable(); + subscription.setDisposable(new BinaryDisposable(inner, outer)); + outer.setDisposable(currentValue.subscribe( + function(x) { o.onNext(x); }, + function (exn) { + inner.setDisposable(notifier.subscribe(recurse, function(ex) { + o.onError(ex); + }, function() { + o.onCompleted(); + })); + + exceptions.onNext(exn); + outer.dispose(); + }, + function() { o.onCompleted(); })); + }); + + return new NAryDisposable([notificationDisposable, subscription, cancelable, createDisposable(state)]); + }; + + return RetryWhenObservable; + }(ObservableBase)); + + observableProto.retryWhen = function (notifier) { + return new RetryWhenObservable(repeat(this), notifier); + }; + + function repeat(value) { + return { + '@@iterator': function () { + return { + next: function () { + return { done: false, value: value }; + } + }; + } + }; + } + + var RepeatWhenObservable = (function(__super__) { + function createDisposable(state) { + return { + isDisposed: false, + dispose: function () { + if (!this.isDisposed) { + this.isDisposed = true; + state.isDisposed = true; + } + } + }; + } + + function RepeatWhenObservable(source, notifier) { + this.source = source; + this._notifier = notifier; + __super__.call(this); + } + + inherits(RepeatWhenObservable, __super__); + + RepeatWhenObservable.prototype.subscribeCore = function (o) { + var completions = new Subject(), + notifier = new Subject(), + handled = this._notifier(completions), + notificationDisposable = handled.subscribe(notifier); + + var e = this.source['@@iterator'](); + + var state = { isDisposed: false }, + lastError, + subscription = new SerialDisposable(); + var cancelable = currentThreadScheduler.scheduleRecursive(null, function (_, recurse) { + if (state.isDisposed) { return; } + var currentItem = e.next(); + + if (currentItem.done) { + if (lastError) { + o.onError(lastError); + } else { + o.onCompleted(); + } + return; + } + + // Check if promise + var currentValue = currentItem.value; + isPromise(currentValue) && (currentValue = observableFromPromise(currentValue)); + + var outer = new SingleAssignmentDisposable(); + var inner = new SingleAssignmentDisposable(); + subscription.setDisposable(new BinaryDisposable(inner, outer)); + outer.setDisposable(currentValue.subscribe( + function(x) { o.onNext(x); }, + function (exn) { o.onError(exn); }, + function() { + inner.setDisposable(notifier.subscribe(recurse, function(ex) { + o.onError(ex); + }, function() { + o.onCompleted(); + })); + + completions.onNext(null); + outer.dispose(); + })); + }); + + return new NAryDisposable([notificationDisposable, subscription, cancelable, createDisposable(state)]); + }; + + return RepeatWhenObservable; + }(ObservableBase)); + + observableProto.repeatWhen = function (notifier) { + return new RepeatWhenObservable(repeat(this), notifier); + }; + + var ScanObservable = (function(__super__) { + inherits(ScanObservable, __super__); + function ScanObservable(source, accumulator, hasSeed, seed) { + this.source = source; + this.accumulator = accumulator; + this.hasSeed = hasSeed; + this.seed = seed; + __super__.call(this); + } + + ScanObservable.prototype.subscribeCore = function(o) { + return this.source.subscribe(new ScanObserver(o,this)); + }; + + return ScanObservable; + }(ObservableBase)); + + var ScanObserver = (function (__super__) { + inherits(ScanObserver, __super__); + function ScanObserver(o, parent) { + this._o = o; + this._p = parent; + this._fn = parent.accumulator; + this._hs = parent.hasSeed; + this._s = parent.seed; + this._ha = false; + this._a = null; + this._hv = false; + this._i = 0; + __super__.call(this); + } + + ScanObserver.prototype.next = function (x) { + !this._hv && (this._hv = true); + if (this._ha) { + this._a = tryCatch(this._fn)(this._a, x, this._i, this._p); + } else { + this._a = this._hs ? tryCatch(this._fn)(this._s, x, this._i, this._p) : x; + this._ha = true; + } + if (this._a === errorObj) { return this._o.onError(this._a.e); } + this._o.onNext(this._a); + this._i++; + }; + + ScanObserver.prototype.error = function (e) { + this._o.onError(e); + }; + + ScanObserver.prototype.completed = function () { + !this._hv && this._hs && this._o.onNext(this._s); + this._o.onCompleted(); + }; + + return ScanObserver; + }(AbstractObserver)); + + /** + * Applies an accumulator function over an observable sequence and returns each intermediate result. The optional seed value is used as the initial accumulator value. + * For aggregation behavior with no intermediate results, see Observable.aggregate. + * @param {Mixed} [seed] The initial accumulator value. + * @param {Function} accumulator An accumulator function to be invoked on each element. + * @returns {Observable} An observable sequence containing the accumulated values. + */ + observableProto.scan = function () { + var hasSeed = false, seed, accumulator = arguments[0]; + if (arguments.length === 2) { + hasSeed = true; + seed = arguments[1]; + } + return new ScanObservable(this, accumulator, hasSeed, seed); + }; + + var SkipLastObservable = (function (__super__) { + inherits(SkipLastObservable, __super__); + function SkipLastObservable(source, c) { + this.source = source; + this._c = c; + __super__.call(this); + } + + SkipLastObservable.prototype.subscribeCore = function (o) { + return this.source.subscribe(new SkipLastObserver(o, this._c)); + }; + + return SkipLastObservable; + }(ObservableBase)); + + var SkipLastObserver = (function (__super__) { + inherits(SkipLastObserver, __super__); + function SkipLastObserver(o, c) { + this._o = o; + this._c = c; + this._q = []; + __super__.call(this); + } + + SkipLastObserver.prototype.next = function (x) { + this._q.push(x); + this._q.length > this._c && this._o.onNext(this._q.shift()); + }; + + SkipLastObserver.prototype.error = function (e) { + this._o.onError(e); + }; + + SkipLastObserver.prototype.completed = function () { + this._o.onCompleted(); + }; + + return SkipLastObserver; + }(AbstractObserver)); + + /** + * Bypasses a specified number of elements at the end of an observable sequence. + * @description + * This operator accumulates a queue with a length enough to store the first `count` elements. As more elements are + * received, elements are taken from the front of the queue and produced on the result sequence. This causes elements to be delayed. + * @param count Number of elements to bypass at the end of the source sequence. + * @returns {Observable} An observable sequence containing the source sequence elements except for the bypassed ones at the end. + */ + observableProto.skipLast = function (count) { + if (count < 0) { throw new ArgumentOutOfRangeError(); } + return new SkipLastObservable(this, count); + }; + + /** + * Prepends a sequence of values to an observable sequence with an optional scheduler and an argument list of values to prepend. + * @example + * var res = source.startWith(1, 2, 3); + * var res = source.startWith(Rx.Scheduler.timeout, 1, 2, 3); + * @param {Arguments} args The specified values to prepend to the observable sequence + * @returns {Observable} The source sequence prepended with the specified values. + */ + observableProto.startWith = function () { + var values, scheduler, start = 0; + if (!!arguments.length && isScheduler(arguments[0])) { + scheduler = arguments[0]; + start = 1; + } else { + scheduler = immediateScheduler; + } + for(var args = [], i = start, len = arguments.length; i < len; i++) { args.push(arguments[i]); } + return enumerableOf([observableFromArray(args, scheduler), this]).concat(); + }; + + var TakeLastObserver = (function (__super__) { + inherits(TakeLastObserver, __super__); + function TakeLastObserver(o, c) { + this._o = o; + this._c = c; + this._q = []; + __super__.call(this); + } + + TakeLastObserver.prototype.next = function (x) { + this._q.push(x); + this._q.length > this._c && this._q.shift(); + }; + + TakeLastObserver.prototype.error = function (e) { + this._o.onError(e); + }; + + TakeLastObserver.prototype.completed = function () { + while (this._q.length > 0) { this._o.onNext(this._q.shift()); } + this._o.onCompleted(); + }; + + return TakeLastObserver; + }(AbstractObserver)); + + /** + * Returns a specified number of contiguous elements from the end of an observable sequence. + * @description + * This operator accumulates a buffer with a length enough to store elements count elements. Upon completion of + * the source sequence, this buffer is drained on the result sequence. This causes the elements to be delayed. + * @param {Number} count Number of elements to take from the end of the source sequence. + * @returns {Observable} An observable sequence containing the specified number of elements from the end of the source sequence. + */ + observableProto.takeLast = function (count) { + if (count < 0) { throw new ArgumentOutOfRangeError(); } + var source = this; + return new AnonymousObservable(function (o) { + return source.subscribe(new TakeLastObserver(o, count)); + }, source); + }; + +observableProto.flatMapConcat = observableProto.concatMap = function(selector, resultSelector, thisArg) { + return new FlatMapObservable(this, selector, resultSelector, thisArg).merge(1); +}; + var MapObservable = (function (__super__) { + inherits(MapObservable, __super__); + + function MapObservable(source, selector, thisArg) { + this.source = source; + this.selector = bindCallback(selector, thisArg, 3); + __super__.call(this); + } + + function innerMap(selector, self) { + return function (x, i, o) { return selector.call(this, self.selector(x, i, o), i, o); }; + } + + MapObservable.prototype.internalMap = function (selector, thisArg) { + return new MapObservable(this.source, innerMap(selector, this), thisArg); + }; + + MapObservable.prototype.subscribeCore = function (o) { + return this.source.subscribe(new InnerObserver(o, this.selector, this)); + }; + + inherits(InnerObserver, AbstractObserver); + function InnerObserver(o, selector, source) { + this.o = o; + this.selector = selector; + this.source = source; + this.i = 0; + AbstractObserver.call(this); + } + + InnerObserver.prototype.next = function(x) { + var result = tryCatch(this.selector)(x, this.i++, this.source); + if (result === errorObj) { return this.o.onError(result.e); } + this.o.onNext(result); + }; + + InnerObserver.prototype.error = function (e) { + this.o.onError(e); + }; + + InnerObserver.prototype.completed = function () { + this.o.onCompleted(); + }; + + return MapObservable; + + }(ObservableBase)); + + /** + * Projects each element of an observable sequence into a new form by incorporating the element's index. + * @param {Function} selector A transform function to apply to each source element; the second parameter of the function represents the index of the source element. + * @param {Any} [thisArg] Object to use as this when executing callback. + * @returns {Observable} An observable sequence whose elements are the result of invoking the transform function on each element of source. + */ + observableProto.map = observableProto.select = function (selector, thisArg) { + var selectorFn = typeof selector === 'function' ? selector : function () { return selector; }; + return this instanceof MapObservable ? + this.internalMap(selectorFn, thisArg) : + new MapObservable(this, selectorFn, thisArg); + }; + + function plucker(args, len) { + return function mapper(x) { + var currentProp = x; + for (var i = 0; i < len; i++) { + var p = currentProp[args[i]]; + if (typeof p !== 'undefined') { + currentProp = p; + } else { + return undefined; + } + } + return currentProp; + }; + } + + /** + * Retrieves the value of a specified nested property from all elements in + * the Observable sequence. + * @param {Arguments} arguments The nested properties to pluck. + * @returns {Observable} Returns a new Observable sequence of property values. + */ + observableProto.pluck = function () { + var len = arguments.length, args = new Array(len); + if (len === 0) { throw new Error('List of properties cannot be empty.'); } + for(var i = 0; i < len; i++) { args[i] = arguments[i]; } + return this.map(plucker(args, len)); + }; + +observableProto.flatMap = observableProto.selectMany = function(selector, resultSelector, thisArg) { + return new FlatMapObservable(this, selector, resultSelector, thisArg).mergeAll(); +}; + +Rx.Observable.prototype.flatMapLatest = function(selector, resultSelector, thisArg) { + return new FlatMapObservable(this, selector, resultSelector, thisArg).switchLatest(); +}; + var SkipObservable = (function(__super__) { + inherits(SkipObservable, __super__); + function SkipObservable(source, count) { + this.source = source; + this._count = count; + __super__.call(this); + } + + SkipObservable.prototype.subscribeCore = function (o) { + return this.source.subscribe(new SkipObserver(o, this._count)); + }; + + function SkipObserver(o, c) { + this._o = o; + this._r = c; + AbstractObserver.call(this); + } + + inherits(SkipObserver, AbstractObserver); + + SkipObserver.prototype.next = function (x) { + if (this._r <= 0) { + this._o.onNext(x); + } else { + this._r--; + } + }; + SkipObserver.prototype.error = function(e) { this._o.onError(e); }; + SkipObserver.prototype.completed = function() { this._o.onCompleted(); }; + + return SkipObservable; + }(ObservableBase)); + + /** + * Bypasses a specified number of elements in an observable sequence and then returns the remaining elements. + * @param {Number} count The number of elements to skip before returning the remaining elements. + * @returns {Observable} An observable sequence that contains the elements that occur after the specified index in the input sequence. + */ + observableProto.skip = function (count) { + if (count < 0) { throw new ArgumentOutOfRangeError(); } + return new SkipObservable(this, count); + }; + + var SkipWhileObservable = (function (__super__) { + inherits(SkipWhileObservable, __super__); + function SkipWhileObservable(source, fn) { + this.source = source; + this._fn = fn; + __super__.call(this); + } + + SkipWhileObservable.prototype.subscribeCore = function (o) { + return this.source.subscribe(new SkipWhileObserver(o, this)); + }; + + return SkipWhileObservable; + }(ObservableBase)); + + var SkipWhileObserver = (function (__super__) { + inherits(SkipWhileObserver, __super__); + + function SkipWhileObserver(o, p) { + this._o = o; + this._p = p; + this._i = 0; + this._r = false; + __super__.call(this); + } + + SkipWhileObserver.prototype.next = function (x) { + if (!this._r) { + var res = tryCatch(this._p._fn)(x, this._i++, this._p); + if (res === errorObj) { return this._o.onError(res.e); } + this._r = !res; + } + this._r && this._o.onNext(x); + }; + SkipWhileObserver.prototype.error = function (e) { this._o.onError(e); }; + SkipWhileObserver.prototype.completed = function () { this._o.onCompleted(); }; + + return SkipWhileObserver; + }(AbstractObserver)); + + /** + * Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements. + * The element's index is used in the logic of the predicate function. + * + * var res = source.skipWhile(function (value) { return value < 10; }); + * var res = source.skipWhile(function (value, index) { return value < 10 || index < 10; }); + * @param {Function} predicate A function to test each element for a condition; the second parameter of the function represents the index of the source element. + * @param {Any} [thisArg] Object to use as this when executing callback. + * @returns {Observable} An observable sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate. + */ + observableProto.skipWhile = function (predicate, thisArg) { + var fn = bindCallback(predicate, thisArg, 3); + return new SkipWhileObservable(this, fn); + }; + + var TakeObservable = (function(__super__) { + inherits(TakeObservable, __super__); + function TakeObservable(source, count) { + this.source = source; + this._count = count; + __super__.call(this); + } + + TakeObservable.prototype.subscribeCore = function (o) { + return this.source.subscribe(new TakeObserver(o, this._count)); + }; + + function TakeObserver(o, c) { + this._o = o; + this._c = c; + this._r = c; + AbstractObserver.call(this); + } + + inherits(TakeObserver, AbstractObserver); + + TakeObserver.prototype.next = function (x) { + if (this._r-- > 0) { + this._o.onNext(x); + this._r <= 0 && this._o.onCompleted(); + } + }; + + TakeObserver.prototype.error = function (e) { this._o.onError(e); }; + TakeObserver.prototype.completed = function () { this._o.onCompleted(); }; + + return TakeObservable; + }(ObservableBase)); + + /** + * Returns a specified number of contiguous elements from the start of an observable sequence, using the specified scheduler for the edge case of take(0). + * @param {Number} count The number of elements to return. + * @param {Scheduler} [scheduler] Scheduler used to produce an OnCompleted message in case 0) { + var now = scheduler.now(); + d = new Date(d.getTime() + p); + d.getTime() <= now && (d = new Date(now + p)); + } + observer.onNext(count); + self(count + 1, new Date(d)); + }); + }); + } + + function observableTimerTimeSpanAndPeriod(dueTime, period, scheduler) { + return dueTime === period ? + new AnonymousObservable(function (observer) { + return scheduler.schedulePeriodic(0, period, function (count) { + observer.onNext(count); + return count + 1; + }); + }) : + observableDefer(function () { + return observableTimerDateAndPeriod(new Date(scheduler.now() + dueTime), period, scheduler); + }); + } + + /** + * Returns an observable sequence that produces a value after each period. + * + * @example + * 1 - res = Rx.Observable.interval(1000); + * 2 - res = Rx.Observable.interval(1000, Rx.Scheduler.timeout); + * + * @param {Number} period Period for producing the values in the resulting sequence (specified as an integer denoting milliseconds). + * @param {Scheduler} [scheduler] Scheduler to run the timer on. If not specified, Rx.Scheduler.timeout is used. + * @returns {Observable} An observable sequence that produces a value after each period. + */ + var observableinterval = Observable.interval = function (period, scheduler) { + return observableTimerTimeSpanAndPeriod(period, period, isScheduler(scheduler) ? scheduler : defaultScheduler); + }; + + /** + * Returns an observable sequence that produces a value after dueTime has elapsed and then after each period. + * @param {Number} dueTime Absolute (specified as a Date object) or relative time (specified as an integer denoting milliseconds) at which to produce the first value. + * @param {Mixed} [periodOrScheduler] Period to produce subsequent values (specified as an integer denoting milliseconds), or the scheduler to run the timer on. If not specified, the resulting timer is not recurring. + * @param {Scheduler} [scheduler] Scheduler to run the timer on. If not specified, the timeout scheduler is used. + * @returns {Observable} An observable sequence that produces a value after due time has elapsed and then each period. + */ + var observableTimer = Observable.timer = function (dueTime, periodOrScheduler, scheduler) { + var period; + isScheduler(scheduler) || (scheduler = defaultScheduler); + if (periodOrScheduler != null && typeof periodOrScheduler === 'number') { + period = periodOrScheduler; + } else if (isScheduler(periodOrScheduler)) { + scheduler = periodOrScheduler; + } + if ((dueTime instanceof Date || typeof dueTime === 'number') && period === undefined) { + return _observableTimer(dueTime, scheduler); + } + if (dueTime instanceof Date && period !== undefined) { + return observableTimerDateAndPeriod(dueTime, periodOrScheduler, scheduler); + } + return observableTimerTimeSpanAndPeriod(dueTime, period, scheduler); + }; + + function observableDelayRelative(source, dueTime, scheduler) { + return new AnonymousObservable(function (o) { + var active = false, + cancelable = new SerialDisposable(), + exception = null, + q = [], + running = false, + subscription; + subscription = source.materialize().timestamp(scheduler).subscribe(function (notification) { + var d, shouldRun; + if (notification.value.kind === 'E') { + q = []; + q.push(notification); + exception = notification.value.error; + shouldRun = !running; + } else { + q.push({ value: notification.value, timestamp: notification.timestamp + dueTime }); + shouldRun = !active; + active = true; + } + if (shouldRun) { + if (exception !== null) { + o.onError(exception); + } else { + d = new SingleAssignmentDisposable(); + cancelable.setDisposable(d); + d.setDisposable(scheduler.scheduleRecursiveFuture(null, dueTime, function (_, self) { + var e, recurseDueTime, result, shouldRecurse; + if (exception !== null) { + return; + } + running = true; + do { + result = null; + if (q.length > 0 && q[0].timestamp - scheduler.now() <= 0) { + result = q.shift().value; + } + if (result !== null) { + result.accept(o); + } + } while (result !== null); + shouldRecurse = false; + recurseDueTime = 0; + if (q.length > 0) { + shouldRecurse = true; + recurseDueTime = Math.max(0, q[0].timestamp - scheduler.now()); + } else { + active = false; + } + e = exception; + running = false; + if (e !== null) { + o.onError(e); + } else if (shouldRecurse) { + self(null, recurseDueTime); + } + })); + } + } + }); + return new BinaryDisposable(subscription, cancelable); + }, source); + } + + function observableDelayAbsolute(source, dueTime, scheduler) { + return observableDefer(function () { + return observableDelayRelative(source, dueTime - scheduler.now(), scheduler); + }); + } + + function delayWithSelector(source, subscriptionDelay, delayDurationSelector) { + var subDelay, selector; + if (isFunction(subscriptionDelay)) { + selector = subscriptionDelay; + } else { + subDelay = subscriptionDelay; + selector = delayDurationSelector; + } + return new AnonymousObservable(function (o) { + var delays = new CompositeDisposable(), atEnd = false, subscription = new SerialDisposable(); + + function start() { + subscription.setDisposable(source.subscribe( + function (x) { + var delay = tryCatch(selector)(x); + if (delay === errorObj) { return o.onError(delay.e); } + var d = new SingleAssignmentDisposable(); + delays.add(d); + d.setDisposable(delay.subscribe( + function () { + o.onNext(x); + delays.remove(d); + done(); + }, + function (e) { o.onError(e); }, + function () { + o.onNext(x); + delays.remove(d); + done(); + } + )); + }, + function (e) { o.onError(e); }, + function () { + atEnd = true; + subscription.dispose(); + done(); + } + )); + } + + function done () { + atEnd && delays.length === 0 && o.onCompleted(); + } + + if (!subDelay) { + start(); + } else { + subscription.setDisposable(subDelay.subscribe(start, function (e) { o.onError(e); }, start)); + } + + return new BinaryDisposable(subscription, delays); + }, source); + } + + /** + * Time shifts the observable sequence by dueTime. + * The relative time intervals between the values are preserved. + * + * @param {Number} dueTime Absolute (specified as a Date object) or relative time (specified as an integer denoting milliseconds) by which to shift the observable sequence. + * @param {Scheduler} [scheduler] Scheduler to run the delay timers on. If not specified, the timeout scheduler is used. + * @returns {Observable} Time-shifted sequence. + */ + observableProto.delay = function () { + var firstArg = arguments[0]; + if (typeof firstArg === 'number' || firstArg instanceof Date) { + var dueTime = firstArg, scheduler = arguments[1]; + isScheduler(scheduler) || (scheduler = defaultScheduler); + return dueTime instanceof Date ? + observableDelayAbsolute(this, dueTime, scheduler) : + observableDelayRelative(this, dueTime, scheduler); + } else if (Observable.isObservable(firstArg) || isFunction(firstArg)) { + return delayWithSelector(this, firstArg, arguments[1]); + } else { + throw new Error('Invalid arguments'); + } + }; + + var DebounceObservable = (function (__super__) { + inherits(DebounceObservable, __super__); + function DebounceObservable(source, dt, s) { + isScheduler(s) || (s = defaultScheduler); + this.source = source; + this._dt = dt; + this._s = s; + __super__.call(this); + } + + DebounceObservable.prototype.subscribeCore = function (o) { + var cancelable = new SerialDisposable(); + return new BinaryDisposable( + this.source.subscribe(new DebounceObserver(o, this._dt, this._s, cancelable)), + cancelable); + }; + + return DebounceObservable; + }(ObservableBase)); + + var DebounceObserver = (function (__super__) { + inherits(DebounceObserver, __super__); + function DebounceObserver(observer, dueTime, scheduler, cancelable) { + this._o = observer; + this._d = dueTime; + this._scheduler = scheduler; + this._c = cancelable; + this._v = null; + this._hv = false; + this._id = 0; + __super__.call(this); + } + + function scheduleFuture(s, state) { + state.self._hv && state.self._id === state.currentId && state.self._o.onNext(state.x); + state.self._hv = false; + } + + DebounceObserver.prototype.next = function (x) { + this._hv = true; + this._v = x; + var currentId = ++this._id, d = new SingleAssignmentDisposable(); + this._c.setDisposable(d); + d.setDisposable(this._scheduler.scheduleFuture(this, this._d, function (_, self) { + self._hv && self._id === currentId && self._o.onNext(x); + self._hv = false; + })); + }; + + DebounceObserver.prototype.error = function (e) { + this._c.dispose(); + this._o.onError(e); + this._hv = false; + this._id++; + }; + + DebounceObserver.prototype.completed = function () { + this._c.dispose(); + this._hv && this._o.onNext(this._v); + this._o.onCompleted(); + this._hv = false; + this._id++; + }; + + return DebounceObserver; + }(AbstractObserver)); + + function debounceWithSelector(source, durationSelector) { + return new AnonymousObservable(function (o) { + var value, hasValue = false, cancelable = new SerialDisposable(), id = 0; + var subscription = source.subscribe( + function (x) { + var throttle = tryCatch(durationSelector)(x); + if (throttle === errorObj) { return o.onError(throttle.e); } + + isPromise(throttle) && (throttle = observableFromPromise(throttle)); + + hasValue = true; + value = x; + id++; + var currentid = id, d = new SingleAssignmentDisposable(); + cancelable.setDisposable(d); + d.setDisposable(throttle.subscribe( + function () { + hasValue && id === currentid && o.onNext(value); + hasValue = false; + d.dispose(); + }, + function (e) { o.onError(e); }, + function () { + hasValue && id === currentid && o.onNext(value); + hasValue = false; + d.dispose(); + } + )); + }, + function (e) { + cancelable.dispose(); + o.onError(e); + hasValue = false; + id++; + }, + function () { + cancelable.dispose(); + hasValue && o.onNext(value); + o.onCompleted(); + hasValue = false; + id++; + } + ); + return new BinaryDisposable(subscription, cancelable); + }, source); + } + + observableProto.debounce = function () { + if (isFunction (arguments[0])) { + return debounceWithSelector(this, arguments[0]); + } else if (typeof arguments[0] === 'number') { + return new DebounceObservable(this, arguments[0], arguments[1]); + } else { + throw new Error('Invalid arguments'); + } + }; + + var TimestampObservable = (function (__super__) { + inherits(TimestampObservable, __super__); + function TimestampObservable(source, s) { + this.source = source; + this._s = s; + __super__.call(this); + } + + TimestampObservable.prototype.subscribeCore = function (o) { + return this.source.subscribe(new TimestampObserver(o, this._s)); + }; + + return TimestampObservable; + }(ObservableBase)); + + var TimestampObserver = (function (__super__) { + inherits(TimestampObserver, __super__); + function TimestampObserver(o, s) { + this._o = o; + this._s = s; + __super__.call(this); + } + + TimestampObserver.prototype.next = function (x) { + this._o.onNext({ value: x, timestamp: this._s.now() }); + }; + + TimestampObserver.prototype.error = function (e) { + this._o.onError(e); + }; + + TimestampObserver.prototype.completed = function () { + this._o.onCompleted(); + }; + + return TimestampObserver; + }(AbstractObserver)); + + /** + * Records the timestamp for each value in an observable sequence. + * + * @example + * 1 - res = source.timestamp(); // produces { value: x, timestamp: ts } + * 2 - res = source.timestamp(Rx.Scheduler.default); + * + * @param {Scheduler} [scheduler] Scheduler used to compute timestamps. If not specified, the default scheduler is used. + * @returns {Observable} An observable sequence with timestamp information on values. + */ + observableProto.timestamp = function (scheduler) { + isScheduler(scheduler) || (scheduler = defaultScheduler); + return new TimestampObservable(this, scheduler); + }; + + var SampleObservable = (function(__super__) { + inherits(SampleObservable, __super__); + function SampleObservable(source, sampler) { + this.source = source; + this._sampler = sampler; + __super__.call(this); + } + + SampleObservable.prototype.subscribeCore = function (o) { + var state = { + o: o, + atEnd: false, + value: null, + hasValue: false, + sourceSubscription: new SingleAssignmentDisposable() + }; + + state.sourceSubscription.setDisposable(this.source.subscribe(new SampleSourceObserver(state))); + return new BinaryDisposable( + state.sourceSubscription, + this._sampler.subscribe(new SamplerObserver(state)) + ); + }; + + return SampleObservable; + }(ObservableBase)); + + var SamplerObserver = (function(__super__) { + inherits(SamplerObserver, __super__); + function SamplerObserver(s) { + this._s = s; + __super__.call(this); + } + + SamplerObserver.prototype._handleMessage = function () { + if (this._s.hasValue) { + this._s.hasValue = false; + this._s.o.onNext(this._s.value); + } + this._s.atEnd && this._s.o.onCompleted(); + }; + + SamplerObserver.prototype.next = function () { this._handleMessage(); }; + SamplerObserver.prototype.error = function (e) { this._s.onError(e); }; + SamplerObserver.prototype.completed = function () { this._handleMessage(); }; + + return SamplerObserver; + }(AbstractObserver)); + + var SampleSourceObserver = (function(__super__) { + inherits(SampleSourceObserver, __super__); + function SampleSourceObserver(s) { + this._s = s; + __super__.call(this); + } + + SampleSourceObserver.prototype.next = function (x) { + this._s.hasValue = true; + this._s.value = x; + }; + SampleSourceObserver.prototype.error = function (e) { this._s.o.onError(e); }; + SampleSourceObserver.prototype.completed = function () { + this._s.atEnd = true; + this._s.sourceSubscription.dispose(); + }; + + return SampleSourceObserver; + }(AbstractObserver)); + + /** + * Samples the observable sequence at each interval. + * + * @example + * 1 - res = source.sample(sampleObservable); // Sampler tick sequence + * 2 - res = source.sample(5000); // 5 seconds + * 2 - res = source.sample(5000, Rx.Scheduler.timeout); // 5 seconds + * + * @param {Mixed} intervalOrSampler Interval at which to sample (specified as an integer denoting milliseconds) or Sampler Observable. + * @param {Scheduler} [scheduler] Scheduler to run the sampling timer on. If not specified, the timeout scheduler is used. + * @returns {Observable} Sampled observable sequence. + */ + observableProto.sample = function (intervalOrSampler, scheduler) { + isScheduler(scheduler) || (scheduler = defaultScheduler); + return typeof intervalOrSampler === 'number' ? + new SampleObservable(this, observableinterval(intervalOrSampler, scheduler)) : + new SampleObservable(this, intervalOrSampler); + }; + + var TimeoutError = Rx.TimeoutError = function(message) { + this.message = message || 'Timeout has occurred'; + this.name = 'TimeoutError'; + Error.call(this); + }; + TimeoutError.prototype = Object.create(Error.prototype); + + function timeoutWithSelector(source, firstTimeout, timeoutDurationSelector, other) { + if (isFunction(firstTimeout)) { + other = timeoutDurationSelector; + timeoutDurationSelector = firstTimeout; + firstTimeout = observableNever(); + } + Observable.isObservable(other) || (other = observableThrow(new TimeoutError())); + return new AnonymousObservable(function (o) { + var subscription = new SerialDisposable(), + timer = new SerialDisposable(), + original = new SingleAssignmentDisposable(); + + subscription.setDisposable(original); + + var id = 0, switched = false; + + function setTimer(timeout) { + var myId = id, d = new SingleAssignmentDisposable(); + + function timerWins() { + switched = (myId === id); + return switched; + } + + timer.setDisposable(d); + d.setDisposable(timeout.subscribe(function () { + timerWins() && subscription.setDisposable(other.subscribe(o)); + d.dispose(); + }, function (e) { + timerWins() && o.onError(e); + }, function () { + timerWins() && subscription.setDisposable(other.subscribe(o)); + })); + }; + + setTimer(firstTimeout); + + function oWins() { + var res = !switched; + if (res) { id++; } + return res; + } + + original.setDisposable(source.subscribe(function (x) { + if (oWins()) { + o.onNext(x); + var timeout = tryCatch(timeoutDurationSelector)(x); + if (timeout === errorObj) { return o.onError(timeout.e); } + setTimer(isPromise(timeout) ? observableFromPromise(timeout) : timeout); + } + }, function (e) { + oWins() && o.onError(e); + }, function () { + oWins() && o.onCompleted(); + })); + return new BinaryDisposable(subscription, timer); + }, source); + } + + function timeout(source, dueTime, other, scheduler) { + if (isScheduler(other)) { + scheduler = other; + other = observableThrow(new TimeoutError()); + } + if (other instanceof Error) { other = observableThrow(other); } + isScheduler(scheduler) || (scheduler = defaultScheduler); + Observable.isObservable(other) || (other = observableThrow(new TimeoutError())); + return new AnonymousObservable(function (o) { + var id = 0, + original = new SingleAssignmentDisposable(), + subscription = new SerialDisposable(), + switched = false, + timer = new SerialDisposable(); + + subscription.setDisposable(original); + + function createTimer() { + var myId = id; + timer.setDisposable(scheduler.scheduleFuture(null, dueTime, function () { + switched = id === myId; + if (switched) { + isPromise(other) && (other = observableFromPromise(other)); + subscription.setDisposable(other.subscribe(o)); + } + })); + } + + createTimer(); + + original.setDisposable(source.subscribe(function (x) { + if (!switched) { + id++; + o.onNext(x); + createTimer(); + } + }, function (e) { + if (!switched) { + id++; + o.onError(e); + } + }, function () { + if (!switched) { + id++; + o.onCompleted(); + } + })); + return new BinaryDisposable(subscription, timer); + }, source); + } + + observableProto.timeout = function () { + var firstArg = arguments[0]; + if (firstArg instanceof Date || typeof firstArg === 'number') { + return timeout(this, firstArg, arguments[1], arguments[2]); + } else if (Observable.isObservable(firstArg) || isFunction(firstArg)) { + return timeoutWithSelector(this, firstArg, arguments[1], arguments[2]); + } else { + throw new Error('Invalid arguments'); + } + }; + + /** + * Returns an Observable that emits only the first item emitted by the source Observable during sequential time windows of a specified duration. + * @param {Number} windowDuration time to wait before emitting another item after emitting the last item + * @param {Scheduler} [scheduler] the Scheduler to use internally to manage the timers that handle timeout for each item. If not provided, defaults to Scheduler.timeout. + * @returns {Observable} An Observable that performs the throttle operation. + */ + observableProto.throttle = function (windowDuration, scheduler) { + isScheduler(scheduler) || (scheduler = defaultScheduler); + var duration = +windowDuration || 0; + if (duration <= 0) { throw new RangeError('windowDuration cannot be less or equal zero.'); } + var source = this; + return new AnonymousObservable(function (o) { + var lastOnNext = 0; + return source.subscribe( + function (x) { + var now = scheduler.now(); + if (lastOnNext === 0 || now - lastOnNext >= duration) { + lastOnNext = now; + o.onNext(x); + } + },function (e) { o.onError(e); }, function () { o.onCompleted(); } + ); + }, source); + }; + + var PausableObservable = (function (__super__) { + inherits(PausableObservable, __super__); + function PausableObservable(source, pauser) { + this.source = source; + this.controller = new Subject(); + + if (pauser && pauser.subscribe) { + this.pauser = this.controller.merge(pauser); + } else { + this.pauser = this.controller; + } + + __super__.call(this); + } + + PausableObservable.prototype._subscribe = function (o) { + var conn = this.source.publish(), + subscription = conn.subscribe(o), + connection = disposableEmpty; + + var pausable = this.pauser.distinctUntilChanged().subscribe(function (b) { + if (b) { + connection = conn.connect(); + } else { + connection.dispose(); + connection = disposableEmpty; + } + }); + + return new NAryDisposable([subscription, connection, pausable]); + }; + + PausableObservable.prototype.pause = function () { + this.controller.onNext(false); + }; + + PausableObservable.prototype.resume = function () { + this.controller.onNext(true); + }; + + return PausableObservable; + + }(Observable)); + + /** + * Pauses the underlying observable sequence based upon the observable sequence which yields true/false. + * @example + * var pauser = new Rx.Subject(); + * var source = Rx.Observable.interval(100).pausable(pauser); + * @param {Observable} pauser The observable sequence used to pause the underlying sequence. + * @returns {Observable} The observable sequence which is paused based upon the pauser. + */ + observableProto.pausable = function (pauser) { + return new PausableObservable(this, pauser); + }; + + function combineLatestSource(source, subject, resultSelector) { + return new AnonymousObservable(function (o) { + var hasValue = [false, false], + hasValueAll = false, + isDone = false, + values = new Array(2), + err; + + function next(x, i) { + values[i] = x; + hasValue[i] = true; + if (hasValueAll || (hasValueAll = hasValue.every(identity))) { + if (err) { return o.onError(err); } + var res = tryCatch(resultSelector).apply(null, values); + if (res === errorObj) { return o.onError(res.e); } + o.onNext(res); + } + isDone && values[1] && o.onCompleted(); + } + + return new BinaryDisposable( + source.subscribe( + function (x) { + next(x, 0); + }, + function (e) { + if (values[1]) { + o.onError(e); + } else { + err = e; + } + }, + function () { + isDone = true; + values[1] && o.onCompleted(); + }), + subject.subscribe( + function (x) { + next(x, 1); + }, + function (e) { o.onError(e); }, + function () { + isDone = true; + next(true, 1); + }) + ); + }, source); + } + + var PausableBufferedObservable = (function (__super__) { + inherits(PausableBufferedObservable, __super__); + function PausableBufferedObservable(source, pauser) { + this.source = source; + this.controller = new Subject(); + + if (pauser && pauser.subscribe) { + this.pauser = this.controller.merge(pauser); + } else { + this.pauser = this.controller; + } + + __super__.call(this); + } + + PausableBufferedObservable.prototype._subscribe = function (o) { + var q = [], previousShouldFire; + + function drainQueue() { while (q.length > 0) { o.onNext(q.shift()); } } + + var subscription = + combineLatestSource( + this.source, + this.pauser.startWith(false).distinctUntilChanged(), + function (data, shouldFire) { + return { data: data, shouldFire: shouldFire }; + }) + .subscribe( + function (results) { + if (previousShouldFire !== undefined && results.shouldFire !== previousShouldFire) { + previousShouldFire = results.shouldFire; + // change in shouldFire + if (results.shouldFire) { drainQueue(); } + } else { + previousShouldFire = results.shouldFire; + // new data + if (results.shouldFire) { + o.onNext(results.data); + } else { + q.push(results.data); + } + } + }, + function (err) { + drainQueue(); + o.onError(err); + }, + function () { + drainQueue(); + o.onCompleted(); + } + ); + return subscription; + }; + + PausableBufferedObservable.prototype.pause = function () { + this.controller.onNext(false); + }; + + PausableBufferedObservable.prototype.resume = function () { + this.controller.onNext(true); + }; + + return PausableBufferedObservable; + + }(Observable)); + + /** + * Pauses the underlying observable sequence based upon the observable sequence which yields true/false, + * and yields the values that were buffered while paused. + * @example + * var pauser = new Rx.Subject(); + * var source = Rx.Observable.interval(100).pausableBuffered(pauser); + * @param {Observable} pauser The observable sequence used to pause the underlying sequence. + * @returns {Observable} The observable sequence which is paused based upon the pauser. + */ + observableProto.pausableBuffered = function (pauser) { + return new PausableBufferedObservable(this, pauser); + }; + + var ControlledObservable = (function (__super__) { + inherits(ControlledObservable, __super__); + function ControlledObservable (source, enableQueue, scheduler) { + __super__.call(this); + this.subject = new ControlledSubject(enableQueue, scheduler); + this.source = source.multicast(this.subject).refCount(); + } + + ControlledObservable.prototype._subscribe = function (o) { + return this.source.subscribe(o); + }; + + ControlledObservable.prototype.request = function (numberOfItems) { + return this.subject.request(numberOfItems == null ? -1 : numberOfItems); + }; + + return ControlledObservable; + + }(Observable)); + + var ControlledSubject = (function (__super__) { + inherits(ControlledSubject, __super__); + function ControlledSubject(enableQueue, scheduler) { + enableQueue == null && (enableQueue = true); + + __super__.call(this); + this.subject = new Subject(); + this.enableQueue = enableQueue; + this.queue = enableQueue ? [] : null; + this.requestedCount = 0; + this.requestedDisposable = null; + this.error = null; + this.hasFailed = false; + this.hasCompleted = false; + this.scheduler = scheduler || currentThreadScheduler; + } + + addProperties(ControlledSubject.prototype, Observer, { + _subscribe: function (o) { + return this.subject.subscribe(o); + }, + onCompleted: function () { + this.hasCompleted = true; + if (!this.enableQueue || this.queue.length === 0) { + this.subject.onCompleted(); + this.disposeCurrentRequest(); + } else { + this.queue.push(Notification.createOnCompleted()); + } + }, + onError: function (error) { + this.hasFailed = true; + this.error = error; + if (!this.enableQueue || this.queue.length === 0) { + this.subject.onError(error); + this.disposeCurrentRequest(); + } else { + this.queue.push(Notification.createOnError(error)); + } + }, + onNext: function (value) { + if (this.requestedCount <= 0) { + this.enableQueue && this.queue.push(Notification.createOnNext(value)); + } else { + (this.requestedCount-- === 0) && this.disposeCurrentRequest(); + this.subject.onNext(value); + } + }, + _processRequest: function (numberOfItems) { + if (this.enableQueue) { + while (this.queue.length > 0 && (numberOfItems > 0 || this.queue[0].kind !== 'N')) { + var first = this.queue.shift(); + first.accept(this.subject); + if (first.kind === 'N') { + numberOfItems--; + } else { + this.disposeCurrentRequest(); + this.queue = []; + } + } + } + + return numberOfItems; + }, + request: function (number) { + this.disposeCurrentRequest(); + var self = this; + + this.requestedDisposable = this.scheduler.schedule(number, + function(s, i) { + var remaining = self._processRequest(i); + var stopped = self.hasCompleted || self.hasFailed; + if (!stopped && remaining > 0) { + self.requestedCount = remaining; + + return disposableCreate(function () { + self.requestedCount = 0; + }); + // Scheduled item is still in progress. Return a new + // disposable to allow the request to be interrupted + // via dispose. + } + }); + + return this.requestedDisposable; + }, + disposeCurrentRequest: function () { + if (this.requestedDisposable) { + this.requestedDisposable.dispose(); + this.requestedDisposable = null; + } + } + }); + + return ControlledSubject; + }(Observable)); + + /** + * Attaches a controller to the observable sequence with the ability to queue. + * @example + * var source = Rx.Observable.interval(100).controlled(); + * source.request(3); // Reads 3 values + * @param {bool} enableQueue truthy value to determine if values should be queued pending the next request + * @param {Scheduler} scheduler determines how the requests will be scheduled + * @returns {Observable} The observable sequence which only propagates values on request. + */ + observableProto.controlled = function (enableQueue, scheduler) { + + if (enableQueue && isScheduler(enableQueue)) { + scheduler = enableQueue; + enableQueue = true; + } + + if (enableQueue == null) { enableQueue = true; } + return new ControlledObservable(this, enableQueue, scheduler); + }; + + /** + * Pipes the existing Observable sequence into a Node.js Stream. + * @param {Stream} dest The destination Node.js stream. + * @returns {Stream} The destination stream. + */ + observableProto.pipe = function (dest) { + var source = this.pausableBuffered(); + + function onDrain() { + source.resume(); + } + + dest.addListener('drain', onDrain); + + source.subscribe( + function (x) { + !dest.write(String(x)) && source.pause(); + }, + function (err) { + dest.emit('error', err); + }, + function () { + // Hack check because STDIO is not closable + !dest._isStdio && dest.end(); + dest.removeListener('drain', onDrain); + }); + + source.resume(); + + return dest; + }; + + var TransduceObserver = (function (__super__) { + inherits(TransduceObserver, __super__); + function TransduceObserver(o, xform) { + this._o = o; + this._xform = xform; + __super__.call(this); + } + + TransduceObserver.prototype.next = function (x) { + var res = tryCatch(this._xform['@@transducer/step']).call(this._xform, this._o, x); + if (res === errorObj) { this._o.onError(res.e); } + }; + + TransduceObserver.prototype.error = function (e) { this._o.onError(e); }; + + TransduceObserver.prototype.completed = function () { + this._xform['@@transducer/result'](this._o); + }; + + return TransduceObserver; + }(AbstractObserver)); + + function transformForObserver(o) { + return { + '@@transducer/init': function() { + return o; + }, + '@@transducer/step': function(obs, input) { + return obs.onNext(input); + }, + '@@transducer/result': function(obs) { + return obs.onCompleted(); + } + }; + } + + /** + * Executes a transducer to transform the observable sequence + * @param {Transducer} transducer A transducer to execute + * @returns {Observable} An Observable sequence containing the results from the transducer. + */ + observableProto.transduce = function(transducer) { + var source = this; + return new AnonymousObservable(function(o) { + var xform = transducer(transformForObserver(o)); + return source.subscribe(new TransduceObserver(o, xform)); + }, source); + }; + + var AnonymousObservable = Rx.AnonymousObservable = (function (__super__) { + inherits(AnonymousObservable, __super__); + + // Fix subscriber to check for undefined or function returned to decorate as Disposable + function fixSubscriber(subscriber) { + return subscriber && isFunction(subscriber.dispose) ? subscriber : + isFunction(subscriber) ? disposableCreate(subscriber) : disposableEmpty; + } + + function setDisposable(s, state) { + var ado = state[0], self = state[1]; + var sub = tryCatch(self.__subscribe).call(self, ado); + if (sub === errorObj && !ado.fail(errorObj.e)) { thrower(errorObj.e); } + ado.setDisposable(fixSubscriber(sub)); + } + + function AnonymousObservable(subscribe, parent) { + this.source = parent; + this.__subscribe = subscribe; + __super__.call(this); + } + + AnonymousObservable.prototype._subscribe = function (o) { + var ado = new AutoDetachObserver(o), state = [ado, this]; + + if (currentThreadScheduler.scheduleRequired()) { + currentThreadScheduler.schedule(state, setDisposable); + } else { + setDisposable(null, state); + } + return ado; + }; + + return AnonymousObservable; + + }(Observable)); + + var AutoDetachObserver = (function (__super__) { + inherits(AutoDetachObserver, __super__); + + function AutoDetachObserver(observer) { + __super__.call(this); + this.observer = observer; + this.m = new SingleAssignmentDisposable(); + } + + var AutoDetachObserverPrototype = AutoDetachObserver.prototype; + + AutoDetachObserverPrototype.next = function (value) { + var result = tryCatch(this.observer.onNext).call(this.observer, value); + if (result === errorObj) { + this.dispose(); + thrower(result.e); + } + }; + + AutoDetachObserverPrototype.error = function (err) { + var result = tryCatch(this.observer.onError).call(this.observer, err); + this.dispose(); + result === errorObj && thrower(result.e); + }; + + AutoDetachObserverPrototype.completed = function () { + var result = tryCatch(this.observer.onCompleted).call(this.observer); + this.dispose(); + result === errorObj && thrower(result.e); + }; + + AutoDetachObserverPrototype.setDisposable = function (value) { this.m.setDisposable(value); }; + AutoDetachObserverPrototype.getDisposable = function () { return this.m.getDisposable(); }; + + AutoDetachObserverPrototype.dispose = function () { + __super__.prototype.dispose.call(this); + this.m.dispose(); + }; + + return AutoDetachObserver; + }(AbstractObserver)); + + var InnerSubscription = function (s, o) { + this._s = s; + this._o = o; + }; + + InnerSubscription.prototype.dispose = function () { + if (!this._s.isDisposed && this._o !== null) { + var idx = this._s.observers.indexOf(this._o); + this._s.observers.splice(idx, 1); + this._o = null; + } + }; + + /** + * Represents an object that is both an observable sequence as well as an observer. + * Each notification is broadcasted to all subscribed observers. + */ + var Subject = Rx.Subject = (function (__super__) { + inherits(Subject, __super__); + function Subject() { + __super__.call(this); + this.isDisposed = false; + this.isStopped = false; + this.observers = []; + this.hasError = false; + } + + addProperties(Subject.prototype, Observer.prototype, { + _subscribe: function (o) { + checkDisposed(this); + if (!this.isStopped) { + this.observers.push(o); + return new InnerSubscription(this, o); + } + if (this.hasError) { + o.onError(this.error); + return disposableEmpty; + } + o.onCompleted(); + return disposableEmpty; + }, + /** + * Indicates whether the subject has observers subscribed to it. + * @returns {Boolean} Indicates whether the subject has observers subscribed to it. + */ + hasObservers: function () { checkDisposed(this); return this.observers.length > 0; }, + /** + * Notifies all subscribed observers about the end of the sequence. + */ + onCompleted: function () { + checkDisposed(this); + if (!this.isStopped) { + this.isStopped = true; + for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { + os[i].onCompleted(); + } + + this.observers.length = 0; + } + }, + /** + * Notifies all subscribed observers about the exception. + * @param {Mixed} error The exception to send to all observers. + */ + onError: function (error) { + checkDisposed(this); + if (!this.isStopped) { + this.isStopped = true; + this.error = error; + this.hasError = true; + for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { + os[i].onError(error); + } + + this.observers.length = 0; + } + }, + /** + * Notifies all subscribed observers about the arrival of the specified element in the sequence. + * @param {Mixed} value The value to send to all observers. + */ + onNext: function (value) { + checkDisposed(this); + if (!this.isStopped) { + for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { + os[i].onNext(value); + } + } + }, + /** + * Unsubscribe all observers and release resources. + */ + dispose: function () { + this.isDisposed = true; + this.observers = null; + } + }); + + /** + * Creates a subject from the specified observer and observable. + * @param {Observer} observer The observer used to send messages to the subject. + * @param {Observable} observable The observable used to subscribe to messages sent from the subject. + * @returns {Subject} Subject implemented using the given observer and observable. + */ + Subject.create = function (observer, observable) { + return new AnonymousSubject(observer, observable); + }; + + return Subject; + }(Observable)); + + /** + * Represents the result of an asynchronous operation. + * The last value before the OnCompleted notification, or the error received through OnError, is sent to all subscribed observers. + */ + var AsyncSubject = Rx.AsyncSubject = (function (__super__) { + inherits(AsyncSubject, __super__); + + /** + * Creates a subject that can only receive one value and that value is cached for all future observations. + * @constructor + */ + function AsyncSubject() { + __super__.call(this); + this.isDisposed = false; + this.isStopped = false; + this.hasValue = false; + this.observers = []; + this.hasError = false; + } + + addProperties(AsyncSubject.prototype, Observer.prototype, { + _subscribe: function (o) { + checkDisposed(this); + + if (!this.isStopped) { + this.observers.push(o); + return new InnerSubscription(this, o); + } + + if (this.hasError) { + o.onError(this.error); + } else if (this.hasValue) { + o.onNext(this.value); + o.onCompleted(); + } else { + o.onCompleted(); + } + + return disposableEmpty; + }, + /** + * Indicates whether the subject has observers subscribed to it. + * @returns {Boolean} Indicates whether the subject has observers subscribed to it. + */ + hasObservers: function () { checkDisposed(this); return this.observers.length > 0; }, + /** + * Notifies all subscribed observers about the end of the sequence, also causing the last received value to be sent out (if any). + */ + onCompleted: function () { + var i, len; + checkDisposed(this); + if (!this.isStopped) { + this.isStopped = true; + var os = cloneArray(this.observers), len = os.length; + + if (this.hasValue) { + for (i = 0; i < len; i++) { + var o = os[i]; + o.onNext(this.value); + o.onCompleted(); + } + } else { + for (i = 0; i < len; i++) { + os[i].onCompleted(); + } + } + + this.observers.length = 0; + } + }, + /** + * Notifies all subscribed observers about the error. + * @param {Mixed} error The Error to send to all observers. + */ + onError: function (error) { + checkDisposed(this); + if (!this.isStopped) { + this.isStopped = true; + this.hasError = true; + this.error = error; + + for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { + os[i].onError(error); + } + + this.observers.length = 0; + } + }, + /** + * Sends a value to the subject. The last value received before successful termination will be sent to all subscribed and future observers. + * @param {Mixed} value The value to store in the subject. + */ + onNext: function (value) { + checkDisposed(this); + if (this.isStopped) { return; } + this.value = value; + this.hasValue = true; + }, + /** + * Unsubscribe all observers and release resources. + */ + dispose: function () { + this.isDisposed = true; + this.observers = null; + this.error = null; + this.value = null; + } + }); + + return AsyncSubject; + }(Observable)); + + var AnonymousSubject = Rx.AnonymousSubject = (function (__super__) { + inherits(AnonymousSubject, __super__); + function AnonymousSubject(observer, observable) { + this.observer = observer; + this.observable = observable; + __super__.call(this); + } + + addProperties(AnonymousSubject.prototype, Observer.prototype, { + _subscribe: function (o) { + return this.observable.subscribe(o); + }, + onCompleted: function () { + this.observer.onCompleted(); + }, + onError: function (error) { + this.observer.onError(error); + }, + onNext: function (value) { + this.observer.onNext(value); + } + }); + + return AnonymousSubject; + }(Observable)); + + /** + * Represents a value that changes over time. + * Observers can subscribe to the subject to receive the last (or initial) value and all subsequent notifications. + */ + var BehaviorSubject = Rx.BehaviorSubject = (function (__super__) { + inherits(BehaviorSubject, __super__); + function BehaviorSubject(value) { + __super__.call(this); + this.value = value; + this.observers = []; + this.isDisposed = false; + this.isStopped = false; + this.hasError = false; + } + + addProperties(BehaviorSubject.prototype, Observer.prototype, { + _subscribe: function (o) { + checkDisposed(this); + if (!this.isStopped) { + this.observers.push(o); + o.onNext(this.value); + return new InnerSubscription(this, o); + } + if (this.hasError) { + o.onError(this.error); + } else { + o.onCompleted(); + } + return disposableEmpty; + }, + /** + * Gets the current value or throws an exception. + * Value is frozen after onCompleted is called. + * After onError is called always throws the specified exception. + * An exception is always thrown after dispose is called. + * @returns {Mixed} The initial value passed to the constructor until onNext is called; after which, the last value passed to onNext. + */ + getValue: function () { + checkDisposed(this); + if (this.hasError) { thrower(this.error); } + return this.value; + }, + /** + * Indicates whether the subject has observers subscribed to it. + * @returns {Boolean} Indicates whether the subject has observers subscribed to it. + */ + hasObservers: function () { checkDisposed(this); return this.observers.length > 0; }, + /** + * Notifies all subscribed observers about the end of the sequence. + */ + onCompleted: function () { + checkDisposed(this); + if (this.isStopped) { return; } + this.isStopped = true; + for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { + os[i].onCompleted(); + } + + this.observers.length = 0; + }, + /** + * Notifies all subscribed observers about the exception. + * @param {Mixed} error The exception to send to all observers. + */ + onError: function (error) { + checkDisposed(this); + if (this.isStopped) { return; } + this.isStopped = true; + this.hasError = true; + this.error = error; + + for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { + os[i].onError(error); + } + + this.observers.length = 0; + }, + /** + * Notifies all subscribed observers about the arrival of the specified element in the sequence. + * @param {Mixed} value The value to send to all observers. + */ + onNext: function (value) { + checkDisposed(this); + if (this.isStopped) { return; } + this.value = value; + for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { + os[i].onNext(value); + } + }, + /** + * Unsubscribe all observers and release resources. + */ + dispose: function () { + this.isDisposed = true; + this.observers = null; + this.value = null; + this.error = null; + } + }); + + return BehaviorSubject; + }(Observable)); + + /** + * Represents an object that is both an observable sequence as well as an observer. + * Each notification is broadcasted to all subscribed and future observers, subject to buffer trimming policies. + */ + var ReplaySubject = Rx.ReplaySubject = (function (__super__) { + + var maxSafeInteger = Math.pow(2, 53) - 1; + + function createRemovableDisposable(subject, observer) { + return disposableCreate(function () { + observer.dispose(); + !subject.isDisposed && subject.observers.splice(subject.observers.indexOf(observer), 1); + }); + } + + inherits(ReplaySubject, __super__); + + /** + * Initializes a new instance of the ReplaySubject class with the specified buffer size, window size and scheduler. + * @param {Number} [bufferSize] Maximum element count of the replay buffer. + * @param {Number} [windowSize] Maximum time length of the replay buffer. + * @param {Scheduler} [scheduler] Scheduler the observers are invoked on. + */ + function ReplaySubject(bufferSize, windowSize, scheduler) { + this.bufferSize = bufferSize == null ? maxSafeInteger : bufferSize; + this.windowSize = windowSize == null ? maxSafeInteger : windowSize; + this.scheduler = scheduler || currentThreadScheduler; + this.q = []; + this.observers = []; + this.isStopped = false; + this.isDisposed = false; + this.hasError = false; + this.error = null; + __super__.call(this); + } + + addProperties(ReplaySubject.prototype, Observer.prototype, { + _subscribe: function (o) { + checkDisposed(this); + var so = new ScheduledObserver(this.scheduler, o), subscription = createRemovableDisposable(this, so); + + this._trim(this.scheduler.now()); + this.observers.push(so); + + for (var i = 0, len = this.q.length; i < len; i++) { + so.onNext(this.q[i].value); + } + + if (this.hasError) { + so.onError(this.error); + } else if (this.isStopped) { + so.onCompleted(); + } + + so.ensureActive(); + return subscription; + }, + /** + * Indicates whether the subject has observers subscribed to it. + * @returns {Boolean} Indicates whether the subject has observers subscribed to it. + */ + hasObservers: function () { checkDisposed(this); return this.observers.length > 0; }, + _trim: function (now) { + while (this.q.length > this.bufferSize) { + this.q.shift(); + } + while (this.q.length > 0 && (now - this.q[0].interval) > this.windowSize) { + this.q.shift(); + } + }, + /** + * Notifies all subscribed observers about the arrival of the specified element in the sequence. + * @param {Mixed} value The value to send to all observers. + */ + onNext: function (value) { + checkDisposed(this); + if (this.isStopped) { return; } + var now = this.scheduler.now(); + this.q.push({ interval: now, value: value }); + this._trim(now); + + for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { + var observer = os[i]; + observer.onNext(value); + observer.ensureActive(); + } + }, + /** + * Notifies all subscribed observers about the exception. + * @param {Mixed} error The exception to send to all observers. + */ + onError: function (error) { + checkDisposed(this); + if (this.isStopped) { return; } + this.isStopped = true; + this.error = error; + this.hasError = true; + var now = this.scheduler.now(); + this._trim(now); + for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { + var observer = os[i]; + observer.onError(error); + observer.ensureActive(); + } + this.observers.length = 0; + }, + /** + * Notifies all subscribed observers about the end of the sequence. + */ + onCompleted: function () { + checkDisposed(this); + if (this.isStopped) { return; } + this.isStopped = true; + var now = this.scheduler.now(); + this._trim(now); + for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { + var observer = os[i]; + observer.onCompleted(); + observer.ensureActive(); + } + this.observers.length = 0; + }, + /** + * Unsubscribe all observers and release resources. + */ + dispose: function () { + this.isDisposed = true; + this.observers = null; + } + }); + + return ReplaySubject; + }(Observable)); + + /** + * Used to pause and resume streams. + */ + Rx.Pauser = (function (__super__) { + inherits(Pauser, __super__); + function Pauser() { + __super__.call(this); + } + + /** + * Pauses the underlying sequence. + */ + Pauser.prototype.pause = function () { this.onNext(false); }; + + /** + * Resumes the underlying sequence. + */ + Pauser.prototype.resume = function () { this.onNext(true); }; + + return Pauser; + }(Subject)); + + if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { + root.Rx = Rx; + + define(function() { + return Rx; + }); + } else if (freeExports && freeModule) { + // in Node.js or RingoJS + if (moduleExports) { + (freeModule.exports = Rx).Rx = Rx; + } else { + freeExports.Rx = Rx; + } + } else { + // in a browser or Rhino + root.Rx = Rx; + } + + // All code before this point will be filtered from stack traces. + var rEndingLine = captureLine(); + +}.call(this)); diff --git a/node_modules/rx-lite/rx.lite.map b/node_modules/rx-lite/rx.lite.map new file mode 100644 index 0000000..5d20dff --- /dev/null +++ b/node_modules/rx-lite/rx.lite.map @@ -0,0 +1 @@ +{"version":3,"file":"rx.lite.min.js","sources":["rx.lite.js"],"names":["undefined","checkGlobal","value","Object","cloneArray","arr","len","length","a","Array","i","tryCatcherGen","tryCatchTarget","apply","this","arguments","e","errorObj","thrower","makeStackTraceLong","error","observable","hasStacks","stack","indexOf","STACK_JUMP_SEPARATOR","stacks","o","source","unshift","concatedStacks","join","filterStackString","stackString","lines","split","desiredLines","line","isInternalFrame","isNodeFrame","push","stackLine","fileNameAndLineNumber","getFileNameAndLineNumber","fileName","lineNumber","rFileName","rStartingLine","rEndingLine","captureLine","Error","firstLine","attempt1","exec","Number","attempt2","attempt3","equalObjects","object","other","equalFunc","isLoose","stackA","stackB","objProps","keys","objLength","othProps","othLength","key","index","hasOwnProperty","call","skipCtor","result","objValue","othValue","objCtor","constructor","othCtor","equalByTag","tag","boolTag","dateTag","errorTag","name","message","numberTag","regexpTag","stringTag","isObjectLike","isLength","MAX_SAFE_INTEGER","isTypedArray","typedArrayTags","objToString","arraySome","array","predicate","equalArrays","arrLength","arrValue","baseIsEqualDeep","objIsArr","isArray","othIsArr","objTag","arrayTag","othTag","argsTag","objectTag","objIsObj","isHostObject","othIsObj","isSameTag","objIsWrapped","othIsWrapped","pop","baseIsEqual","isObject","arrayInitialize","count","factory","IndexedItem","id","IsDisposedDisposable","state","_s","isDisposed","StringIterable","s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","it","$iterator$","TypeError","sign","number","isNaN","Math","floor","abs","maxSafeInteger","observableOf","scheduler","isScheduler","currentThreadScheduler","FromArrayObservable","RepeatSink","observer","parent","falseFactory","argumentsToArray","args","emptyArrayFactory","asObservable","subscribe","repeat","@@iterator","next","done","plucker","x","currentProp","p","createCbObservable","fn","ctx","selector","AsyncSubject","createCbHandler","results","isFunction","tryCatch","onError","onNext","onCompleted","createNodeObservable","createNodeHandler","err","isNodeList","el","StaticNodeList","NodeList","prototype","toString","ListenDisposable","n","_e","_n","_fn","addEventListener","createEventListener","eventName","handler","disposables","CompositeDisposable","elemToString","add","item","_observableTimer","dueTime","TimerObservable","observableTimerDateAndPeriod","period","AnonymousObservable","d","normalizeTime","scheduleRecursiveFuture","self","now","Date","getTime","observableTimerTimeSpanAndPeriod","schedulePeriodic","observableDefer","observableDelayRelative","subscription","active","cancelable","SerialDisposable","exception","q","running","materialize","timestamp","notification","shouldRun","kind","SingleAssignmentDisposable","setDisposable","_","recurseDueTime","shouldRecurse","shift","accept","max","BinaryDisposable","observableDelayAbsolute","delayWithSelector","subscriptionDelay","delayDurationSelector","subDelay","start","delay","delays","remove","atEnd","dispose","debounceWithSelector","durationSelector","hasValue","throttle","isPromise","observableFromPromise","currentid","timeoutWithSelector","firstTimeout","timeoutDurationSelector","observableNever","Observable","isObservable","observableThrow","TimeoutError","setTimer","timeout","timerWins","switched","myId","timer","oWins","res","original","defaultScheduler","createTimer","scheduleFuture","combineLatestSource","subject","resultSelector","values","hasValueAll","every","identity","isDone","transformForObserver","@@transducer/init","@@transducer/step","obs","input","@@transducer/result","objectTypes","function","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","freeSelf","freeWindow","window","moduleExports","thisGlobal","Function","Rx","internals","config","Promise","helpers","noop","defaultNow","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","then","isFn","longStackSupport","EmptyError","create","ObjectDisposedError","ArgumentOutOfRangeError","NotSupportedError","NotImplementedError","notImplemented","notSupported","Symbol","iterator","Set","doneEnumerator","isIterable","isArrayLike","bindCallback","func","thisArg","argCount","arg","collection","dontEnums","funcTag","mapTag","setTag","weakMapTag","arrayBufferTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","objectProto","pow","hasDontEnumBug","propertyIsEnumerable","dontEnumsLength","obj","prop","type","inherits","slice","child","__","addProperties","sources","idx","ln","addRef","xs","r","getDisposable","CompositeDisposablePrototype","shouldDispose","splice","currentDisposables","Disposable","action","disposableCreate","disposableEmpty","empty","isDisposable","checkDisposed","disposable","disposableFixup","_fixup","current","old","first","second","_first","_second","old1","old2","NAryDisposable","_disposables","ScheduledItem","RefCountDisposable","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","comparer","invoke","invokeCore","compareTo","isCancelled","Scheduler","schedulerProto","schedule","dt","normalize","_scheduleFuture","timeSpan","invokeRecImmediate","pair","innerAction","state2","scheduleWork","state3","isAdded","group","invokeRecDate","dueTime1","scheduleRecursive","setInterval","clearInterval","scheduleMethod","clearMethod","ImmediateScheduler","__super__","immediateScheduler","immediate","CurrentThreadScheduler","runTrampoline","queue","dequeue","si","enqueue","PriorityQueue","scheduleRequired","currentThread","localTimer","SchedulePeriodicRecursive","createTick","command","recurse","_period","_action","_state","_cancel","_scheduler","localSetTimeout","localClearTimeout","setTimeout","clearTimeout","WScript","time","Sleep","runTask","handle","currentlyRunning","task","tasksByHandle","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","nextHandle","reNative","RegExp","String","replace","setImmediate","test","process","nextTick","MSG_PREFIX","random","onGlobalPostMessage","event","data","substring","MessageChannel","channel","port1","port2","document","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","DefaultScheduler","scheduleAction","ClearDisposable","_id","LocalClearDisposable","async","c","capacity","items","priorityProto","isHigherPriority","left","right","percolate","temp","heapify","peek","removeAt","observableProto","Notification","_accept","_acceptObserver","observerOrOnNext","toObservable","OnNextNotification","OnErrorNotification","OnCompletedNotification","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","Observer","observerCreate","AnonymousObserver","AbstractObserver","isStopped","completed","fail","_onNext","_onError","_onCompleted","makeSubscribe","oldOnError","oldSubscribe","_subscribe","forEach","oOrOnNext","subscribeOnNext","subscribeOnError","subscribeOnCompleted","ScheduledObserver","isAcquired","hasFaulted","enqueueNext","enqueueError","enqueueCompleted","work","ensureActive","isOwner","ObservableBase","fixSubscriber","subscriber","ado","sub","subscribeCore","AutoDetachObserver","FlatMapObservable","InnerObserver","_wrapResult","map","i2","from","Enumerable","ConcatEnumerableObservable","currentItem","currentValue","_recurse","concat","CatchErrorObservable","lastError","catchError","RepeatEnumerable","v","RepeatEnumerator","l","enumerableRepeat","repeatCount","OfEnumerable","OfEnumerator","enumerableOf","of","ToArrayObservable","toArray","Defer","_f","defer","observableFactory","EmptyObservable","EmptySink","scheduleItem","sink","run","EMPTY_OBSERVABLE","observableEmpty","FromObservable","iterable","_iterable","createScheduleMethod","list","charAt","observableFrom","mapFn","mapper","_args","observableFromArray","fromArray","NeverObservable","NEVER_OBSERVABLE","never","ofWithScheduler","PairsObservable","_o","_keys","pairs","RangeObservable","rangeCount","loopRecursive","range","RepeatObservable","JustObservable","_value","ThrowObservable","just","_error","CatchObservable","d1","CatchObserver","handlerOrSecond","observableCatch","combineLatest","CombineLatestObservable","params","cb","_params","_cb","subscriptions","sad","CombineLatestObserver","notTheSame","j","filter","observableConcat","ConcatObserver","ConcatObservable","_sources","concatAll","merge","MergeObservable","maxConcurrent","g","MergeObserver","activeCount","handleSubscribe","innerSource","maxConcurrentOrOther","observableMerge","mergeAll","CompositeError","errors","innerErrors","MergeDelayErrorObservable","m","MergeDelayErrorObserver","_group","setCompletion","inner","_inner","mergeDelayError","MergeAllObservable","MergeAllObserver","SkipUntilObservable","_open","leftSubscription","SkipUntilSourceObserver","rightSubscription","SkipUntilOtherObserver","_p","_r","skipUntil","SwitchObservable","SwitchObserver","stopped","latest","hasLatest","switchLatest","TakeUntilObservable","TakeUntilObserver","takeUntil","WithLatestFromObservable","_ss","WithLatestFromOtherObserver","outerSad","WithLatestFromSourceObserver","allValues","withLatestFrom","ZipObservable","ZipObserver","_q","_d","notEmpty","shiftEach","queuedValues","zip","ZipIterableObservable","ZipIterableObserver","zipIterable","DematerializeObservable","DematerializeObserver","dematerialize","DistinctUntilChangedObservable","keyFn","DistinctUntilChangedObserver","hasCurrentKey","currentKey","comparerEquals","distinctUntilChanged","TapObservable","_oN","_oE","_oC","t","tap","doAction","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","FinallyObservable","FinallyDisposable","IgnoreElementsObservable","ignoreElements","MaterializeObservable","MaterializeObserver","retry","retryCount","RetryWhenObservable","createDisposable","notifier","_notifier","exceptions","Subject","handled","notificationDisposable","outer","exn","ex","retryWhen","RepeatWhenObservable","completions","repeatWhen","ScanObservable","accumulator","hasSeed","seed","ScanObserver","_hs","_ha","_hv","scan","SkipLastObservable","_c","SkipLastObserver","skipLast","startWith","TakeLastObserver","takeLast","flatMapConcat","concatMap","MapObservable","innerMap","internalMap","select","selectorFn","pluck","flatMap","selectMany","flatMapLatest","SkipObservable","_count","SkipObserver","skip","SkipWhileObservable","SkipWhileObserver","skipWhile","TakeObservable","TakeObserver","take","TakeWhileObservable","TakeWhileObserver","takeWhile","FilterObservable","innerPredicate","internalFilter","shouldYield","where","fromCallback","fromNodeCallback","removeEventListener","useNativeEvents","EventObservable","_el","createHandler","fromEvent","element","addListener","fromEventPattern","h","removeListener","on","off","publish","refCount","EventPatternObservable","del","_add","_del","EventPatternDisposable","ret","_ret","returnValue","addHandler","removeHandler","FromPromiseObservable","scheduleNext","scheduleError","fromPromise","promise","toPromise","promiseCtor","resolve","reject","startAsync","functionAsync","MulticastObservable","fn1","fn2","_fn1","_fn2","connectable","multicast","connect","subjectOrSubjectSelector","ConnectableObservable","share","publishLast","publishValue","initialValueOrSelector","initialValue","BehaviorSubject","shareValue","replay","bufferSize","windowSize","ReplaySubject","shareReplay","RefCountObservable","_connectableSubscription","_connection","_source","_subject","ConnectDisposable","_dt","observableinterval","interval","periodOrScheduler","firstArg","DebounceObservable","DebounceObserver","_v","currentId","debounce","TimestampObservable","TimestampObserver","SampleObservable","sampler","_sampler","sourceSubscription","SampleSourceObserver","SamplerObserver","_handleMessage","sample","intervalOrSampler","windowDuration","duration","RangeError","lastOnNext","PausableObservable","pauser","controller","conn","connection","pausable","b","pause","resume","PausableBufferedObservable","drainQueue","previousShouldFire","shouldFire","pausableBuffered","ControlledObservable","enableQueue","ControlledSubject","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","disposeCurrentRequest","_processRequest","remaining","controlled","pipe","dest","onDrain","write","emit","_isStdio","end","TransduceObserver","xform","_xform","transduce","transducer","__subscribe","AutoDetachObserverPrototype","InnerSubscription","observers","hasError","hasObservers","os","AnonymousSubject","getValue","createRemovableDisposable","so","_trim","Pauser","define","amd"],"mappings":";CAEE,SAAUA,GAOV,QAASC,GAAYC,GACnB,MAAQA,IAASA,EAAMC,SAAWA,OAAUD,EAAQ,KA6CpD,QAASE,GAAWC,GAElB,IAAI,GADAC,GAAMD,EAAIE,OAAQC,EAAI,GAAIC,OAAMH,GAC5BI,EAAI,EAAOJ,EAAJI,EAASA,IAAOF,EAAEE,GAAKL,EAAIK,EAC1C,OAAOF,GAKX,QAASG,GAAcC,GACrB,MAAO,YACL,IACE,MAAOA,GAAeC,MAAMC,KAAMC,WAClC,MAAOC,GAEP,MADAC,IAASD,EAAIA,EACNC,KAUb,QAASC,GAAQF,GACf,KAAMA,GAYR,QAASG,GAAmBC,EAAOC,GAGjC,GAAIC,IACAD,EAAWE,OACM,gBAAVH,IACG,OAAVA,GACAA,EAAMG,OACwC,KAA9CH,EAAMG,MAAMC,QAAQC,IACtB,CAEA,IAAK,GADDC,MACKC,EAAIN,EAAcM,EAAGA,EAAIA,EAAEC,OAC9BD,EAAEJ,OACJG,EAAOG,QAAQF,EAAEJ,MAGrBG,GAAOG,QAAQT,EAAMG,MAErB,IAAIO,GAAiBJ,EAAOK,KAAK,KAAON,GAAuB,KAC/DL,GAAMG,MAAQS,EAAkBF,IAIpC,QAASE,GAAkBC,GAEzB,IAAK,GADDC,GAAQD,EAAYE,MAAM,MAAOC,KAC5B1B,EAAI,EAAGJ,EAAM4B,EAAM3B,OAAYD,EAAJI,EAASA,IAAK,CAChD,GAAI2B,GAAOH,EAAMxB,EAEZ4B,GAAgBD,IAAUE,EAAYF,KAASA,GAClDD,EAAaI,KAAKH,GAGtB,MAAOD,GAAaL,KAAK,MAG3B,QAASO,GAAgBG,GACvB,GAAIC,GAAwBC,EAAyBF,EACrD,KAAKC,EACH,OAAO,CAET,IAAIE,GAAWF,EAAsB,GAAIG,EAAaH,EAAsB,EAE5E,OAAOE,KAAaE,IAClBD,GAAcE,IACAC,IAAdH,EAGJ,QAASN,GAAYE,GACnB,MAA4C,KAArCA,EAAUjB,QAAQ,gBACY,KAAnCiB,EAAUjB,QAAQ,aAGtB,QAASyB,KACP,GAAK3B,GAEL,IACE,KAAM,IAAI4B,OACV,MAAOlC,GACP,GAAIkB,GAAQlB,EAAEO,MAAMY,MAAM,MACtBgB,EAAYjB,EAAM,GAAGV,QAAQ,KAAO,EAAIU,EAAM,GAAKA,EAAM,GACzDQ,EAAwBC,EAAyBQ,EACrD,KAAKT,EAAyB,MAG9B,OADAI,IAAYJ,EAAsB,GAC3BA,EAAsB,IAIjC,QAASC,GAAyBF,GAEhC,GAAIW,GAAW,gCAAgCC,KAAKZ,EACpD,IAAIW,EAAY,OAAQA,EAAS,GAAIE,OAAOF,EAAS,IAGrD,IAAIG,GAAW,4BAA4BF,KAAKZ,EAChD,IAAIc,EAAY,OAAQA,EAAS,GAAID,OAAOC,EAAS,IAGrD,IAAIC,GAAW,iBAAiBH,KAAKZ,EACrC,OAAIe,IAAoBA,EAAS,GAAIF,OAAOE,EAAS,KAArD,OAwLJ,QAASC,GAAaC,EAAQC,EAAOC,EAAWC,EAASC,EAAQC,GAC/D,GAAIC,GAAWC,GAAKP,GAChBQ,EAAYF,EAASzD,OACrB4D,EAAWF,GAAKN,GAChBS,EAAYD,EAAS5D,MAEzB,IAAI2D,IAAcE,IAAcP,EAC9B,OAAO,CAGT,KADA,GAAuBQ,GAAnBC,EAAQJ,EACLI,KAEL,GADAD,EAAML,EAASM,KACTT,EAAUQ,IAAOV,GAAQY,GAAeC,KAAKb,EAAOU,IACxD,OAAO,CAIX,KADA,GAAII,GAAWZ,IACNS,EAAQJ,GAAW,CAC1BG,EAAML,EAASM,EACf,IAEII,GAFAC,EAAWjB,EAAOW,GAClBO,EAAWjB,EAAMU,EAGrB,MAAMK,IAAW1E,EAAY4D,EAAUe,EAAUC,EAAUf,EAASC,EAAQC,GAAUW,GACpF,OAAO,CAETD,KAAaA,EAAmB,gBAARJ,GAE1B,IAAKI,EAAU,CACb,GAAII,GAAUnB,EAAOoB,YACjBC,EAAUpB,EAAMmB,WAEpB,IAAID,IAAYE,GACX,eAAiBrB,IAAU,eAAiBC,MACxB,kBAAZkB,IAA0BA,YAAmBA,IACjC,kBAAZE,IAA0BA,YAAmBA,IACxD,OAAO,EAGX,OAAO,EAGT,QAASC,GAAWtB,EAAQC,EAAOsB,GACjC,OAAQA,GACN,IAAKC,IACL,IAAKC,IACH,OAAQzB,KAAYC,CAEtB,KAAKyB,IACH,MAAO1B,GAAO2B,OAAS1B,EAAM0B,MAAQ3B,EAAO4B,UAAY3B,EAAM2B,OAEhE,KAAKC,IACH,MAAQ7B,MAAYA,EAClBC,KAAWA,EACXD,KAAYC,CAEhB,KAAK6B,IACL,IAAKC,IACH,MAAO/B,KAAYC,EAAQ,GAE/B,OAAO,EAQT,QAAS+B,GAAaxF,GACpB,QAASA,GAA0B,gBAAVA,GAG3B,QAASyF,GAASzF,GAChB,MAAwB,gBAAVA,IAAsBA,EAAQ,IAAMA,EAAQ,IAAM,GAAc0F,IAAT1F,EAcvE,QAAS2F,GAAa3F,GACpB,MAAOwF,GAAaxF,IAAUyF,EAASzF,EAAMK,WAAauF,GAAeC,GAAYvB,KAAKtE,IAO5F,QAAS8F,GAAWC,EAAOC,GAIzB,IAHA,GAAI5B,GAAQ,GACR/D,EAAS0F,EAAM1F,SAEV+D,EAAQ/D,GACf,GAAI2F,EAAUD,EAAM3B,GAAQA,EAAO2B,GACjC,OAAO,CAGX,QAAO,EAGT,QAASE,GAAYF,EAAOtC,EAAOC,EAAWC,EAASC,EAAQC,GAC7D,GAAIO,GAAQ,GACR8B,EAAYH,EAAM1F,OAClB6D,EAAYT,EAAMpD,MAEtB,IAAI6F,IAAchC,KAAeP,GAAWO,EAAYgC,GACtD,OAAO,CAGT,QAAS9B,EAAQ8B,GAAW,CAC1B,GAEI1B,GAFA2B,EAAWJ,EAAM3B,GACjBM,EAAWjB,EAAMW,EAGrB,IAAII,IAAW1E,EAAW,CACxB,GAAI0E,EACF,QAEF,QAAO,EAGT,GAAIb,GACF,IAAKmC,EAAUrC,EAAO,SAASiB,GACzB,MAAOyB,KAAazB,GAAYhB,EAAUyC,EAAUzB,EAAUf,EAASC,EAAQC,KAEnF,OAAO,MAEJ,IAAMsC,IAAazB,IAAYhB,EAAUyC,EAAUzB,EAAUf,EAASC,EAAQC,GACnF,OAAO,EAGX,OAAO,EAGT,QAASuC,GAAgB5C,EAAQC,EAAOC,EAAWC,EAASC,EAAQC,GAClE,GAAIwC,GAAWC,GAAQ9C,GACnB+C,EAAWD,GAAQ7C,GACnB+C,EAASC,GACTC,EAASD,EAERJ,KACHG,EAASX,GAAYvB,KAAKd,GACtBgD,IAAWG,GACbH,EAASI,GACAJ,IAAWI,KACpBP,EAAWV,EAAanC,KAGvB+C,IACHG,EAASb,GAAYvB,KAAKb,GACtBiD,IAAWC,KACbD,EAASE,IAGb,IAAIC,GAAWL,IAAWI,KAAcE,GAAatD,GACjDuD,EAAWL,IAAWE,KAAcE,GAAarD,GACjDuD,EAAYR,IAAWE,CAE3B,IAAIM,IAAeX,IAAYQ,EAC7B,MAAO/B,GAAWtB,EAAQC,EAAO+C,EAEnC,KAAK7C,EAAS,CACZ,GAAIsD,GAAeJ,GAAYxC,GAAeC,KAAKd,EAAQ,eACvD0D,EAAeH,GAAY1C,GAAeC,KAAKb,EAAO,cAE1D,IAAIwD,GAAgBC,EAClB,MAAOxD,GAAUuD,EAAezD,EAAOxD,QAAUwD,EAAQ0D,EAAezD,EAAMzD,QAAUyD,EAAOE,EAASC,EAAQC,GAGpH,IAAKmD,EACH,OAAO,CAITpD,KAAWA,MACXC,IAAWA,KAGX,KADA,GAAIxD,GAASuD,EAAOvD,OACbA,KACL,GAAIuD,EAAOvD,KAAYmD,EACrB,MAAOK,GAAOxD,KAAYoD,CAI9BG,GAAOtB,KAAKkB,GACZK,EAAOvB,KAAKmB,EAEZ,IAAIe,IAAU6B,EAAWJ,EAAc1C,GAAcC,EAAQC,EAAOC,EAAWC,EAASC,EAAQC,EAKhG,OAHAD,GAAOuD,MACPtD,EAAOsD,MAEA3C,EAGT,QAAS4C,GAAYpH,EAAOyD,EAAOE,EAASC,EAAQC,GAClD,MAAI7D,KAAUyD,GACL,EAEI,MAATzD,GAA0B,MAATyD,IAAmB4D,GAASrH,KAAWwF,EAAa/B,GAChEzD,IAAUA,GAASyD,IAAUA,EAE/B2C,EAAgBpG,EAAOyD,EAAO2D,EAAazD,EAASC,EAAQC,GAiCnE,QAASyD,GAAgBC,EAAOC,GAE9B,IAAK,GADDlH,GAAI,GAAIC,OAAMgH,GACT/G,EAAI,EAAO+G,EAAJ/G,EAAWA,IACzBF,EAAEE,GAAKgH,GAET,OAAOlH,GA2tBT,QAASmH,GAAYC,EAAI1H,GACvBY,KAAK8G,GAAKA,EACV9G,KAAKZ,MAAQA,EA6kBf,QAAS2H,GAAqBC,GAC5BhH,KAAKiH,GAAKD,EACVhH,KAAKkH,YAAa,EAoVpB,QAASC,GAAeC,GACtBpH,KAAKiH,GAAKG,EAOZ,QAASC,GAAeD,GACtBpH,KAAKiH,GAAKG,EACVpH,KAAKsH,GAAKF,EAAE3H,OACZO,KAAKuH,GAAK,EAWZ,QAASC,GAAc9H,GACrBM,KAAKyH,GAAK/H,EAOZ,QAASgI,GAAchI,GACrBM,KAAKyH,GAAK/H,EACVM,KAAKsH,GAAKK,EAASjI,GACnBM,KAAKuH,GAAK,EAWZ,QAASK,GAAexI,GACtB,MAAwB,gBAAVA,IAAsByI,GAAKC,SAAS1I,GAOpD,QAAS2I,GAAYlH,GACnB,GAAuBmH,GAAnBpI,EAAIiB,EAAEoH,GACV,KAAKrI,GAAkB,gBAANiB,GAEf,MADAmH,GAAK,GAAIb,GAAetG,GACjBmH,EAAGC,KAEZ,KAAKrI,GAAKiB,EAAEpB,SAAWP,EAErB,MADA8I,GAAK,GAAIR,GAAc3G,GAChBmH,EAAGC,KAEZ,KAAKrI,EAAK,KAAM,IAAIsI,WAAU,yBAC9B,OAAOrH,GAAEoH,MAGX,QAASE,GAAK/I,GACZ,GAAIgJ,IAAUhJ,CACd,OAAe,KAAXgJ,EAAuBA,EACvBC,MAAMD,GAAkBA,EACZ,EAATA,EAAa,GAAK,EAG3B,QAAST,GAAS9G,GAChB,GAAIrB,IAAOqB,EAAEpB,MACb,OAAI4I,OAAM7I,GAAe,EACb,IAARA,GAAcoI,EAAepI,IACjCA,EAAM2I,EAAK3I,GAAO8I,KAAKC,MAAMD,KAAKE,IAAIhJ,IAC3B,GAAPA,EAAmB,EACnBA,EAAMiJ,GAAyBA,GAC5BjJ,GAJyCA,EAyFlD,QAASkJ,GAAcC,EAAWxD,GAEhC,MADAyD,IAAYD,KAAeA,EAAYE,IAChC,GAAIC,IAAoB3D,EAAOwD,GA0HxC,QAASI,GAAWC,EAAUC,GAC5BjJ,KAAKgJ,SAAWA,EAChBhJ,KAAKiJ,OAASA,EA8LhB,QAASC,KAAiB,OAAO,EACjC,QAASC,KAEP,IAAI,GADA3J,GAAMS,UAAUR,OAAQ2J,EAAO,GAAIzJ,OAAMH,GACrCI,EAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,EACnD,OAAOwJ,GAkqBT,QAASF,KAAiB,OAAO,EACjC,QAASC,KAEP,IAAI,GADA3J,GAAMS,UAAUR,OAAQ2J,EAAO,GAAIzJ,OAAMH,GACrCI,EAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,EACnD,OAAOwJ,GAyGT,QAASF,KAAiB,OAAO,EACjC,QAASG,KAAsB,SA2GjC,QAASH,KAAiB,OAAO,EACjC,QAASG,KAAsB,SAC/B,QAASF,KAEP,IAAI,GADA3J,GAAMS,UAAUR,OAAQ2J,EAAO,GAAIzJ,OAAMH,GACrCI,EAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,EACnD,OAAOwJ,GA4FP,QAASE,GAAaxI,GACpB,MAAO,UAAmBD,GAAK,MAAOC,GAAOyI,UAAU1I,IAkWzD,QAAS2I,GAAOpK,GACd,OACEqK,aAAc,WACZ,OACEC,KAAM,WACJ,OAASC,MAAM,EAAOvK,MAAOA,OAoFvC,QAASoK,GAAOpK,GACd,OACEqK,aAAc,WACZ,OACEC,KAAM,WACJ,OAASC,MAAM,EAAOvK,MAAOA,OAgVvC,QAASwK,GAAQR,EAAM5J,GACrB,MAAO,UAAgBqK,GAErB,IAAK,GADDC,GAAcD,EACTjK,EAAI,EAAOJ,EAAJI,EAASA,IAAK,CAC5B,GAAImK,GAAID,EAAYV,EAAKxJ,GACzB,IAAiB,mBAANmK,GAGT,MAAO7K,EAFP4K,GAAcC,EAKlB,MAAOD,IA4Rb,QAASE,GAAmBC,EAAIC,EAAKC,EAAUf,GAC7C,GAAIvI,GAAI,GAAIuJ,GAKZ,OAHAhB,GAAK1H,KAAK2I,EAAgBxJ,EAAGqJ,EAAKC,IAClCF,EAAGlK,MAAMmK,EAAKd,GAEPvI,EAAEyI,eAGX,QAASe,GAAgBxJ,EAAGqJ,EAAKC,GAC/B,MAAO,YAEL,IAAI,GADA3K,GAAMS,UAAUR,OAAQ6K,EAAU,GAAI3K,OAAMH,GACxCI,EAAI,EAAOJ,EAAJI,EAASA,IAAO0K,EAAQ1K,GAAKK,UAAUL,EAEtD,IAAI2K,GAAWJ,GAAW,CAExB,GADAG,EAAUE,GAASL,GAAUpK,MAAMmK,EAAKI,GACpCA,IAAYnK,GAAY,MAAOU,GAAE4J,QAAQH,EAAQpK,EACrDW,GAAE6J,OAAOJ,OAELA,GAAQ7K,QAAU,EACpBoB,EAAE6J,OAAOJ,EAAQ,IAEjBzJ,EAAE6J,OAAOJ,EAIbzJ,GAAE8J,eAsBN,QAASC,GAAqBX,EAAIC,EAAKC,EAAUf,GAC/C,GAAIvI,GAAI,GAAIuJ,GAKZ,OAHAhB,GAAK1H,KAAKmJ,EAAkBhK,EAAGqJ,EAAKC,IACpCF,EAAGlK,MAAMmK,EAAKd,GAEPvI,EAAEyI,eAGX,QAASuB,GAAkBhK,EAAGqJ,EAAKC,GACjC,MAAO,YACL,GAAIW,GAAM7K,UAAU,EACpB,IAAI6K,EAAO,MAAOjK,GAAE4J,QAAQK,EAG5B,KAAI,GADAtL,GAAMS,UAAUR,OAAQ6K,KACpB1K,EAAI,EAAOJ,EAAJI,EAASA,IAAO0K,EAAQ1K,EAAI,GAAKK,UAAUL,EAE1D,IAAI2K,GAAWJ,GAAW,CACxB,GAAIG,GAAUE,GAASL,GAAUpK,MAAMmK,EAAKI,EAC5C,IAAIA,IAAYnK,GAAY,MAAOU,GAAE4J,QAAQH,EAAQpK,EACrDW,GAAE6J,OAAOJ,OAELA,GAAQ7K,QAAU,EACpBoB,EAAE6J,OAAOJ,EAAQ,IAEjBzJ,EAAE6J,OAAOJ,EAIbzJ,GAAE8J,eAoBJ,QAASI,GAAWC,GAClB,MAAInD,IAAKoD,eAGAD,YAAcnD,IAAKoD,gBAAkBD,YAAcnD,IAAKqD,SAEjB,sBAAvC7L,OAAO8L,UAAUC,SAAS1H,KAAKsH,GAI1C,QAASK,GAAiBnL,EAAGoL,EAAGrB,GAC9BjK,KAAKuL,GAAKrL,EACVF,KAAKwL,GAAKF,EACVtL,KAAKyL,IAAMxB,EACXjK,KAAKuL,GAAGG,iBAAiB1L,KAAKwL,GAAIxL,KAAKyL,KAAK,GAC5CzL,KAAKkH,YAAa,EASpB,QAASyE,GAAqBX,EAAIY,EAAWC,GAC3C,GAAIC,GAAc,GAAIC,IAGlBC,EAAe3M,OAAO8L,UAAUC,SAAS1H,KAAKsH,EAClD,IAAID,EAAWC,IAAwB,4BAAjBgB,EACpB,IAAK,GAAIpM,GAAI,EAAGJ,EAAMwL,EAAGvL,OAAYD,EAAJI,EAASA,IACxCkM,EAAYG,IAAIN,EAAoBX,EAAGkB,KAAKtM,GAAIgM,EAAWC,QAEpDb,IACTc,EAAYG,IAAI,GAAIZ,GAAiBL,EAAIY,EAAWC,GAGtD,OAAOC,GAocT,QAASK,GAAiBC,EAASzD,GACjC,MAAO,IAAI0D,IAAgBD,EAASzD,GAGtC,QAAS2D,GAA6BF,EAASG,EAAQ5D,GACrD,MAAO,IAAI6D,IAAoB,SAAUxD,GACvC,GAAIyD,GAAIL,EAASrC,EAAI2C,GAAcH,EACnC,OAAO5D,GAAUgE,wBAAwB,EAAGF,EAAG,SAAU9F,EAAOiG,GAC9D,GAAI7C,EAAI,EAAG,CACT,GAAI8C,GAAMlE,EAAUkE,KACpBJ,GAAI,GAAIK,MAAKL,EAAEM,UAAYhD,GAC3B0C,EAAEM,WAAaF,IAAQJ,EAAI,GAAIK,MAAKD,EAAM9C,IAE5Cf,EAAS0B,OAAO/D,GAChBiG,EAAKjG,EAAQ,EAAG,GAAImG,MAAKL,QAK/B,QAASO,GAAiCZ,EAASG,EAAQ5D,GACzD,MAAOyD,KAAYG,EACjB,GAAIC,IAAoB,SAAUxD,GAChC,MAAOL,GAAUsE,iBAAiB,EAAGV,EAAQ,SAAU5F,GAErD,MADAqC,GAAS0B,OAAO/D,GACTA,EAAQ,MAGnBuG,GAAgB,WACd,MAAOZ,GAA6B,GAAIQ,MAAKnE,EAAUkE,MAAQT,GAAUG,EAAQ5D,KA2CvF,QAASwE,GAAwBrM,EAAQsL,EAASzD,GAChD,MAAO,IAAI6D,IAAoB,SAAU3L,GACvC,GAKEuM,GALEC,GAAS,EACXC,EAAa,GAAIC,IACjBC,EAAY,KACZC,KACAC,GAAU,CAsDZ,OApDAN,GAAetM,EAAO6M,cAAcC,UAAUjF,GAAWY,UAAU,SAAUsE,GAC3E,GAAIpB,GAAGqB,CACyB,OAA5BD,EAAazO,MAAM2O,MACrBN,KACAA,EAAE/L,KAAKmM,GACPL,EAAYK,EAAazO,MAAMkB,MAC/BwN,GAAaJ,IAEbD,EAAE/L,MAAOtC,MAAOyO,EAAazO,MAAOwO,UAAWC,EAAaD,UAAYxB,IACxE0B,GAAaT,EACbA,GAAS,GAEPS,IACgB,OAAdN,EACF3M,EAAE4J,QAAQ+C,IAEVf,EAAI,GAAIuB,IACRV,EAAWW,cAAcxB,GACzBA,EAAEwB,cAActF,EAAUgE,wBAAwB,KAAMP,EAAS,SAAU8B,EAAGtB,GAC5E,GAAI1M,GAAGiO,EAAgBvK,EAAQwK,CAC/B,IAAkB,OAAdZ,EAAJ,CAGAE,GAAU,CACV,GACE9J,GAAS,KACL6J,EAAEhO,OAAS,GAAKgO,EAAE,GAAGG,UAAYjF,EAAUkE,OAAS,IACtDjJ,EAAS6J,EAAEY,QAAQjP,OAEN,OAAXwE,GACFA,EAAO0K,OAAOzN,SAEE,OAAX+C,EACTwK,IAAgB,EAChBD,EAAiB,EACbV,EAAEhO,OAAS,GACb2O,GAAgB,EAChBD,EAAiB7F,KAAKiG,IAAI,EAAGd,EAAE,GAAGG,UAAYjF,EAAUkE,QAExDQ,GAAS,EAEXnN,EAAIsN,EACJE,GAAU,EACA,OAANxN,EACFW,EAAE4J,QAAQvK,GACDkO,GACTxB,EAAK,KAAMuB,WAMd,GAAIK,IAAiBpB,EAAcE,IACzCxM,GAGL,QAAS2N,GAAwB3N,EAAQsL,EAASzD,GAChD,MAAOuE,IAAgB,WACrB,MAAOC,GAAwBrM,EAAQsL,EAAUzD,EAAUkE,MAAOlE,KAItE,QAAS+F,GAAkB5N,EAAQ6N,EAAmBC,GACpD,GAAIC,GAAU1E,CAOd,OANII,IAAWoE,GACbxE,EAAWwE,GAEXE,EAAWF,EACXxE,EAAWyE,GAEN,GAAIpC,IAAoB,SAAU3L,GAGvC,QAASiO,KACP1B,EAAaa,cAAcnN,EAAOyI,UAChC,SAAUM,GACR,GAAIkF,GAAQvE,GAASL,GAAUN,EAC/B,IAAIkF,IAAU5O,GAAY,MAAOU,GAAE4J,QAAQsE,EAAM7O,EACjD,IAAIuM,GAAI,GAAIuB,GACZgB,GAAO/C,IAAIQ,GACXA,EAAEwB,cAAcc,EAAMxF,UACpB,WACE1I,EAAE6J,OAAOb,GACTmF,EAAOC,OAAOxC,GACd9C,KAEF,SAAUzJ,GAAKW,EAAE4J,QAAQvK,IACzB,WACEW,EAAE6J,OAAOb,GACTmF,EAAOC,OAAOxC,GACd9C,QAIN,SAAUzJ,GAAKW,EAAE4J,QAAQvK,IACzB,WACEgP,GAAQ,EACR9B,EAAa+B,UACbxF,OAKN,QAASA,KACPuF,GAA2B,IAAlBF,EAAOvP,QAAgBoB,EAAE8J,cAjCpC,GAAIqE,GAAS,GAAIjD,IAAuBmD,GAAQ,EAAO9B,EAAe,GAAIG,GA0C1E,OANKsB,GAGHzB,EAAaa,cAAcY,EAAStF,UAAUuF,EAAO,SAAU5O,GAAKW,EAAE4J,QAAQvK,IAAO4O,IAFrFA,IAKK,GAAIN,IAAiBpB,EAAc4B,IACzClO,GA6FL,QAASsO,GAAqBtO,EAAQuO,GACpC,MAAO,IAAI7C,IAAoB,SAAU3L,GACvC,GAAIzB,GAAOkQ,GAAW,EAAOhC,EAAa,GAAIC,IAAoBzG,EAAK,EACnEsG,EAAetM,EAAOyI,UACxB,SAAUM,GACR,GAAI0F,GAAW/E,GAAS6E,GAAkBxF,EAC1C,IAAI0F,IAAapP,GAAY,MAAOU,GAAE4J,QAAQ8E,EAASrP,EAEvDsP,IAAUD,KAAcA,EAAWE,GAAsBF,IAEzDD,GAAW,EACXlQ,EAAQyK,EACR/C,GACA,IAAI4I,GAAY5I,EAAI2F,EAAI,GAAIuB,GAC5BV,GAAWW,cAAcxB,GACzBA,EAAEwB,cAAcsB,EAAShG,UACvB,WACE+F,GAAYxI,IAAO4I,GAAa7O,EAAE6J,OAAOtL,GACzCkQ,GAAW,EACX7C,EAAE0C,WAEJ,SAAUjP,GAAKW,EAAE4J,QAAQvK,IACzB,WACEoP,GAAYxI,IAAO4I,GAAa7O,EAAE6J,OAAOtL,GACzCkQ,GAAW,EACX7C,EAAE0C,cAIR,SAAUjP,GACRoN,EAAW6B,UACXtO,EAAE4J,QAAQvK,GACVoP,GAAW,EACXxI,KAEF,WACEwG,EAAW6B,UACXG,GAAYzO,EAAE6J,OAAOtL,GACrByB,EAAE8J,cACF2E,GAAW,EACXxI,KAGJ,OAAO,IAAI0H,IAAiBpB,EAAcE,IACzCxM,GAiKL,QAAS6O,GAAoB7O,EAAQ8O,EAAcC,EAAyBhN,GAO1E,MANI0H,IAAWqF,KACb/M,EAAQgN,EACRA,EAA0BD,EAC1BA,EAAeE,MAEjBC,GAAWC,aAAanN,KAAWA,EAAQoN,GAAgB,GAAIC,MACxD,GAAI1D,IAAoB,SAAU3L,GASvC,QAASsP,GAASC,GAGhB,QAASC,KAEP,MADAC,GAAYC,IAASzJ,EAHvB,GAAIyJ,GAAOzJ,EAAI2F,EAAI,GAAIuB,GAOvBwC,GAAMvC,cAAcxB,GACpBA,EAAEwB,cAAcmC,EAAQ7G,UAAU,WAChC8G,KAAejD,EAAaa,cAAcpL,EAAM0G,UAAU1I,IAC1D4L,EAAE0C,WACD,SAAUjP,GACXmQ,KAAexP,EAAE4J,QAAQvK,IACxB,WACDmQ,KAAejD,EAAaa,cAAcpL,EAAM0G,UAAU1I,OAM9D,QAAS4P,KACP,GAAIC,IAAOJ,CAEX,OADII,IAAO5J,IACJ4J,EAhCT,GAAItD,GAAe,GAAIG,IACrBiD,EAAQ,GAAIjD,IACZoD,EAAW,GAAI3C,GAEjBZ,GAAaa,cAAc0C,EAE3B,IAAI7J,GAAK,EAAGwJ,GAAW,CAyCvB,OApBAH,GAASP,GAQTe,EAAS1C,cAAcnN,EAAOyI,UAAU,SAAUM,GAChD,GAAI4G,IAAS,CACX5P,EAAE6J,OAAOb,EACT,IAAIuG,GAAU5F,GAASqF,GAAyBhG,EAChD,IAAIuG,IAAYjQ,GAAY,MAAOU,GAAE4J,QAAQ2F,EAAQlQ,EACrDiQ,GAASX,GAAUY,GAAWX,GAAsBW,GAAWA,KAEhE,SAAUlQ,GACXuQ,KAAW5P,EAAE4J,QAAQvK,IACpB,WACDuQ,KAAW5P,EAAE8J,iBAER,GAAI6D,IAAiBpB,EAAcoD,IACzC1P,GAGL,QAASsP,IAAQtP,EAAQsL,EAASvJ,EAAO8F,GAQvC,MAPIC,IAAY/F,KACd8F,EAAY9F,EACZA,EAAQoN,GAAgB,GAAIC,MAE1BrN,YAAiBT,SAASS,EAAQoN,GAAgBpN,IACtD+F,GAAYD,KAAeA,EAAYiI,IACvCb,GAAWC,aAAanN,KAAWA,EAAQoN,GAAgB,GAAIC,MACxD,GAAI1D,IAAoB,SAAU3L,GASvC,QAASgQ,KACP,GAAIN,GAAOzJ,CACX0J,GAAMvC,cAActF,EAAUmI,eAAe,KAAM1E,EAAS,WAC1DkE,EAAWxJ,IAAOyJ,EACdD,IACFd,GAAU3M,KAAWA,EAAQ4M,GAAsB5M,IACnDuK,EAAaa,cAAcpL,EAAM0G,UAAU1I,QAdjD,GAAIiG,GAAK,EACP6J,EAAW,GAAI3C,IACfZ,EAAe,GAAIG,IACnB+C,GAAW,EACXE,EAAQ,GAAIjD,GAkCd,OAhCAH,GAAaa,cAAc0C,GAa3BE,IAEAF,EAAS1C,cAAcnN,EAAOyI,UAAU,SAAUM,GAC3CyG,IACHxJ,IACAjG,EAAE6J,OAAOb,GACTgH,MAED,SAAU3Q,GACNoQ,IACHxJ,IACAjG,EAAE4J,QAAQvK,KAEX,WACIoQ,IACHxJ,IACAjG,EAAE8J,kBAGC,GAAI6D,IAAiBpB,EAAcoD,IACzC1P,GA+FL,QAASiQ,IAAoBjQ,EAAQkQ,EAASC,GAC5C,MAAO,IAAIzE,IAAoB,SAAU3L,GAOvC,QAAS6I,GAAKG,EAAGjK,GAGf,GAFAsR,EAAOtR,GAAKiK,EACZyF,EAAS1P,IAAK,EACVuR,IAAgBA,EAAc7B,EAAS8B,MAAMC,KAAY,CAC3D,GAAIvG,EAAO,MAAOjK,GAAE4J,QAAQK,EAC5B,IAAI4F,GAAMlG,GAASyG,GAAgBlR,MAAM,KAAMmR,EAC/C,IAAIR,IAAQvQ,GAAY,MAAOU,GAAE4J,QAAQiG,EAAIxQ,EAC7CW,GAAE6J,OAAOgG,GAEXY,GAAUJ,EAAO,IAAMrQ,EAAE8J,cAf3B,GAIEG,GAJEwE,IAAY,GAAO,GACrB6B,GAAc,EACdG,GAAS,EACTJ,EAAS,GAAIvR,OAAM,EAerB,OAAO,IAAI6O,IACT1N,EAAOyI,UACL,SAAUM,GACRH,EAAKG,EAAG,IAEV,SAAU3J,GACJgR,EAAO,GACTrQ,EAAE4J,QAAQvK,GAEV4K,EAAM5K,GAGV,WACEoR,GAAS,EACTJ,EAAO,IAAMrQ,EAAE8J,gBAEnBqG,EAAQzH,UACN,SAAUM,GACRH,EAAKG,EAAG,IAEV,SAAU3J,GAAKW,EAAE4J,QAAQvK,IACzB,WACEoR,GAAS,EACT5H,GAAK,EAAM,OAGhB5I,GAkRL,QAASyQ,IAAqB1Q,GAC5B,OACE2Q,oBAAqB,WACnB,MAAO3Q,IAET4Q,oBAAqB,SAASC,EAAKC,GACjC,MAAOD,GAAIhH,OAAOiH,IAEpBC,sBAAuB,SAASF,GAC9B,MAAOA,GAAI/G,gBAvxMjB,GAAIkH,KACFC,YAAY,EACZlP,QAAU,GAORmP,GAAeF,SAAmBG,WAAYA,UAAYA,QAAQC,SAAYD,QAAU,KACxFE,GAAcL,SAAmBM,UAAWA,SAAWA,OAAOF,SAAYE,OAAS,KACnFC,GAAajT,EAAY4S,IAAeG,IAAgC,gBAAXG,SAAuBA,QACpFC,GAAWnT,EAAY0S,SAAmBjF,QAASA,MACnD2F,GAAapT,EAAY0S,SAAmBW,UAAWA,QACvDC,GAAiBP,IAAcA,GAAWF,UAAYD,GAAeA,GAAc,KACnFW,GAAavT,EAAY0S,SAAmB7R,QAASA,MACrD6H,GAAOuK,IAAgBG,MAAgBG,IAAcA,GAAWF,SAAYD,IAAeD,IAAYI,IAAcC,SAAS,iBAE9HC,IACFC,aACAC,QACEC,QAASlL,GAAKkL,SAEhBC,YAIEC,GAAOL,GAAGI,QAAQC,KAAO,aAC3B5B,GAAWuB,GAAGI,QAAQ3B,SAAW,SAAUxH,GAAK,MAAOA,IACvDqJ,GAAaN,GAAGI,QAAQE,WAAapG,KAAKD,IAC1CsG,GAAkBP,GAAGI,QAAQG,gBAAkB,SAAUtJ,EAAGuJ,GAAK,MAAOC,IAAQxJ,EAAGuJ,IACnFE,GAAqBV,GAAGI,QAAQM,mBAAqB,SAAUzJ,EAAGuJ,GAAK,MAAOvJ,GAAIuJ,EAAI,EAASA,EAAJvJ,EAAQ,GAAK,GAExG0J,IADuBX,GAAGI,QAAQQ,qBAAuB,SAAU3J,GAAK,MAAOA,GAAEuB,YAClEwH,GAAGI,QAAQO,aAAe,SAAUzI,GAAO,KAAMA,KAChE0E,GAAYoD,GAAGI,QAAQxD,UAAY,SAAUzF,GAAK,QAASA,GAA4B,kBAAhBA,GAAER,WAA8C,kBAAXQ,GAAE0J,MAC9GlJ,GAAaqI,GAAGI,QAAQzI,WAAc,WAEpC,GAAImJ,GAAO,SAAUtU,GACnB,MAAuB,kBAATA,KAAuB,EAUvC,OANIsU,GAAK,OACPA,EAAO,SAAStU,GACd,MAAuB,kBAATA,IAA+C,qBAAxBgM,SAAS1H,KAAKtE,KAIhDsU,KASPvT,IAAYD,MAaZsK,GAAWoI,GAAGC,UAAUrI,SAAW,SAAkBP,GACvD,IAAKM,GAAWN,GAAO,KAAM,IAAI/B,WAAU,wBAC3C,OAAOrI,GAAcoK,GAOvB2I,IAAGE,OAAOa,kBAAmB,CAC7B,IAAInT,KAAY,EAAOI,GAAS4J,GAAS,WAAc,KAAM,IAAIpI,UACjE5B,MAAcI,GAAOV,KAAOU,GAAOV,EAAEO,KAGrC,IAAmCuB,IAA/BC,GAAgBE,IAEhBxB,GAAuB,uBAoFvBiT,GAAahB,GAAGgB,WAAa,WAC/B5T,KAAKwE,QAAU,iCACfpC,MAAMsB,KAAK1D,MAEb4T,IAAWzI,UAAY9L,OAAOwU,OAAOzR,MAAM+I,WAC3CyI,GAAWzI,UAAU5G,KAAO,YAE5B,IAAIuP,IAAsBlB,GAAGkB,oBAAsB,WACjD9T,KAAKwE,QAAU,2BACfpC,MAAMsB,KAAK1D,MAEb8T,IAAoB3I,UAAY9L,OAAOwU,OAAOzR,MAAM+I,WACpD2I,GAAoB3I,UAAU5G,KAAO,qBAErC,IAAIwP,IAA0BnB,GAAGmB,wBAA0B,WACzD/T,KAAKwE,QAAU,wBACfpC,MAAMsB,KAAK1D,MAEb+T,IAAwB5I,UAAY9L,OAAOwU,OAAOzR,MAAM+I,WACxD4I,GAAwB5I,UAAU5G,KAAO,yBAEzC,IAAIyP,IAAoBpB,GAAGoB,kBAAoB,SAAUxP,GACvDxE,KAAKwE,QAAUA,GAAW,kCAC1BpC,MAAMsB,KAAK1D,MAEbgU,IAAkB7I,UAAY9L,OAAOwU,OAAOzR,MAAM+I,WAClD6I,GAAkB7I,UAAU5G,KAAO,mBAEnC,IAAI0P,IAAsBrB,GAAGqB,oBAAsB,SAAUzP,GAC3DxE,KAAKwE,QAAUA,GAAW,oCAC1BpC,MAAMsB,KAAK1D,MAEbiU,IAAoB9I,UAAY9L,OAAOwU,OAAOzR,MAAM+I,WACpD8I,GAAoB9I,UAAU5G,KAAO,qBAErC,IAAI2P,IAAiBtB,GAAGI,QAAQkB,eAAiB,WAC/C,KAAM,IAAID,KAQRhM,IALe2K,GAAGI,QAAQmB,aAAe,WAC3C,KAAM,IAAIH,KAIwB,kBAAXI,SAAyBA,OAAOC,UACvD,qBAEExM,IAAKyM,KAA+C,mBAAjC,GAAIzM,IAAKyM,KAAM,gBACpCrM,GAAa,aAGf,IAAIsM,IAAiB3B,GAAG2B,gBAAmB5K,MAAM,EAAMvK,MAAOF,GAE1DsV,GAAa5B,GAAGI,QAAQwB,WAAa,SAAU3T,GACjD,MAAOA,IAAKA,EAAEoH,MAAgB/I,GAG5BuV,GAAc7B,GAAGI,QAAQyB,YAAc,SAAU5T,GACnD,MAAOA,IAAKA,EAAEpB,SAAWP,EAG3B0T,IAAGI,QAAQqB,SAAWpM,EAEtB,IAAIyM,IAAe9B,GAAGC,UAAU6B,aAAe,SAAUC,EAAMC,EAASC,GACtE,GAAuB,mBAAZD,GAA2B,MAAOD,EAC7C,QAAOE,GACL,IAAK,GACH,MAAO,YACL,MAAOF,GAAKjR,KAAKkR,GAErB,KAAK,GACH,MAAO,UAASE,GACd,MAAOH,GAAKjR,KAAKkR,EAASE,GAE9B,KAAK,GACH,MAAO,UAAS1V,EAAOoE,GACrB,MAAOmR,GAAKjR,KAAKkR,EAASxV,EAAOoE,GAErC,KAAK,GACH,MAAO,UAASpE,EAAOoE,EAAOuR,GAC5B,MAAOJ,GAAKjR,KAAKkR,EAASxV,EAAOoE,EAAOuR,IAI9C,MAAO,YACL,MAAOJ,GAAK5U,MAAM6U,EAAS3U,aAK3B+U,IAAa,WACf,iBACA,UACA,iBACA,gBACA,uBACA,eAGAjP,IAFgBiP,GAAUvV,OAEhB,sBACVoG,GAAW,iBACXzB,GAAU,mBACVC,GAAU,gBACVC,GAAW,iBACX2Q,GAAU,oBACVC,GAAS,eACTzQ,GAAY,kBACZuB,GAAY,kBACZtB,GAAY,kBACZyQ,GAAS,eACTxQ,GAAY,kBACZyQ,GAAa,mBAEbC,GAAiB,uBACjBC,GAAa,wBACbC,GAAa,wBACbC,GAAU,qBACVC,GAAW,sBACXC,GAAW,sBACXC,GAAW,sBACXC,GAAkB,6BAClBC,GAAY,uBACZC,GAAY,uBAEZ9Q,KACJA,IAAesQ,IAActQ,GAAeuQ,IAC5CvQ,GAAewQ,IAAWxQ,GAAeyQ,IACzCzQ,GAAe0Q,IAAY1Q,GAAe2Q,IAC1C3Q,GAAe4Q,IAAmB5Q,GAAe6Q,IACjD7Q,GAAe8Q,KAAa,EAC5B9Q,GAAee,IAAWf,GAAea,IACzCb,GAAeqQ,IAAkBrQ,GAAeZ,IAChDY,GAAeX,IAAWW,GAAeV,IACzCU,GAAeiQ,IAAWjQ,GAAekQ,IACzClQ,GAAeP,IAAaO,GAAegB,IAC3ChB,GAAeN,IAAaM,GAAemQ,IAC3CnQ,GAAeL,IAAaK,GAAeoQ,KAAc,CAEzD,IAAIW,IAAc1W,OAAO8L,UACrB1H,GAAiBsS,GAAYtS,eAC7BwB,GAAc8Q,GAAY3K,SAC1BtG,GAAmBwD,KAAK0N,IAAI,EAAG,IAAM,EAErC7S,GAAO9D,OAAO8D,MAAS,WACvB,GAAIM,GAAiBpE,OAAO8L,UAAU1H,eAClCwS,IAAqB7K,SAAU,MAAQ8K,qBAAqB,YAC5DlB,GACE,WACA,iBACA,UACA,iBACA,gBACA,uBACA,eAEFmB,EAAkBnB,EAAUvV,MAEhC,OAAO,UAAS2W,GACd,GAAmB,gBAARA,KAAoC,kBAARA,IAA8B,OAARA,GAC3D,KAAM,IAAIlO,WAAU,mCAGtB,IAAiBmO,GAAMzW,EAAnBgE,IAEJ,KAAKyS,IAAQD,GACP3S,EAAeC,KAAK0S,EAAKC,IAC3BzS,EAAOlC,KAAK2U,EAIhB,IAAIJ,EACF,IAAKrW,EAAI,EAAOuW,EAAJvW,EAAqBA,IAC3B6D,EAAeC,KAAK0S,EAAKpB,EAAUpV,KACrCgE,EAAOlC,KAAKsT,EAAUpV,GAI5B,OAAOgE,OAmET6C,GAAWmM,GAAGC,UAAUpM,SAAW,SAASrH,GAC9C,GAAIkX,SAAclX,EAClB,SAASA,IAAmB,WAATkX,GAA8B,aAATA,IAWtCpQ,GAAgB,WAClB,IACE7G,QAAS+L,SAAY,GAAM,IAC3B,MAAMlL,GACN,MAAO,YAAa,OAAO,GAE7B,MAAO,UAASd,GACd,MAAiC,kBAAnBA,GAAMgM,UAAmD,iBAAhBhM,EAAQ,QAQ/DsG,GAAU/F,MAAM+F,SAAW,SAAStG,GACtC,MAAOwF,GAAaxF,IAAUyF,EAASzF,EAAMK,SAAWwF,GAAYvB,KAAKtE,KAAWyG,IAwHlFwN,GAAUT,GAAGC,UAAUQ,QAAU,SAAUjU,EAAOyD,GACpD,MAAO2D,GAAYpH,EAAOyD,IAMtB0T,OAHa9S,eACL9D,MAAMwL,UAAUqL,MAEb5D,GAAGC,UAAU0D,SAAW,SAAUE,EAAOxN,GACtD,QAASyN,KAAO1W,KAAKgE,YAAcyS,EACnCC,EAAGvL,UAAYlC,EAAOkC,UACtBsL,EAAMtL,UAAY,GAAIuL,KAGpBC,GAAgB/D,GAAGC,UAAU8D,cAAgB,SAAUP,GACzD,IAAI,GAAIQ,MAAchX,EAAI,EAAGJ,EAAMS,UAAUR,OAAYD,EAAJI,EAASA,IAAOgX,EAAQlV,KAAKzB,UAAUL,GAC5F,KAAK,GAAIiX,GAAM,EAAGC,EAAKF,EAAQnX,OAAcqX,EAAND,EAAUA,IAAO,CACtD,GAAI/V,GAAS8V,EAAQC,EACrB,KAAK,GAAIR,KAAQvV,GACfsV,EAAIC,GAAQvV,EAAOuV,KAwBrBtK,IAlBS6G,GAAGC,UAAUkE,OAAS,SAAUC,EAAIC,GAC/C,MAAO,IAAIzK,IAAoB,SAAUxD,GACvC,MAAO,IAAIwF,IAAiByI,EAAEC,gBAAiBF,EAAGzN,UAAUP,OAgBtC4J,GAAG7G,oBAAsB,WACjD,GAAenM,GAAGJ,EAAd4J,IACJ,IAAIzJ,MAAM+F,QAAQzF,UAAU,IAC1BmJ,EAAOnJ,UAAU,OAIjB,KAFAT,EAAMS,UAAUR,OAChB2J,EAAO,GAAIzJ,OAAMH,GACbI,EAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,EAEjDI,MAAK8L,YAAc1C,EACnBpJ,KAAKkH,YAAa,EAClBlH,KAAKP,OAAS2J,EAAK3J,SAGjB0X,GAA+BpL,GAAoBZ,SAMvDgM,IAA6BlL,IAAM,SAAUC,GACvClM,KAAKkH,WACPgF,EAAKiD,WAELnP,KAAK8L,YAAYpK,KAAKwK,GACtBlM,KAAKP,WAST0X,GAA6BlI,OAAS,SAAU/C,GAC9C,GAAIkL,IAAgB,CACpB,KAAKpX,KAAKkH,WAAY,CACpB,GAAI2P,GAAM7W,KAAK8L,YAAYpL,QAAQwL,EACvB,MAAR2K,IACFO,GAAgB,EAChBpX,KAAK8L,YAAYuL,OAAOR,EAAK,GAC7B7W,KAAKP,SACLyM,EAAKiD,WAGT,MAAOiI,IAMTD,GAA6BhI,QAAU,WACrC,IAAKnP,KAAKkH,WAAY,CACpBlH,KAAKkH,YAAa,CAElB,KAAI,GADA1H,GAAMQ,KAAK8L,YAAYrM,OAAQ6X,EAAqB,GAAI3X,OAAMH,GAC1DI,EAAI,EAAOJ,EAAJI,EAASA,IAAO0X,EAAmB1X,GAAKI,KAAK8L,YAAYlM,EAIxE,KAHAI,KAAK8L,eACL9L,KAAKP,OAAS,EAETG,EAAI,EAAOJ,EAAJI,EAASA,IACnB0X,EAAmB1X,GAAGuP,WAS5B,IAAIoI,IAAa3E,GAAG2E,WAAa,SAAUC,GACzCxX,KAAKkH,YAAa,EAClBlH,KAAKwX,OAASA,GAAUvE,GAI1BsE,IAAWpM,UAAUgE,QAAU,WACxBnP,KAAKkH,aACRlH,KAAKwX,SACLxX,KAAKkH,YAAa,GAStB,IAAIuQ,IAAmBF,GAAW1D,OAAS,SAAU2D,GAAU,MAAO,IAAID,IAAWC,IAKjFE,GAAkBH,GAAWI,OAAUxI,QAAS8D,IAOhD2E,GAAeL,GAAWK,aAAe,SAAUnL,GACrD,MAAOA,IAAKlC,GAAWkC,EAAE0C,UAGvB0I,GAAgBN,GAAWM,cAAgB,SAAUC,GACvD,GAAIA,EAAW5Q,WAAc,KAAM,IAAI4M,KAGrCiE,GAAkBR,GAAWS,OAAS,SAAUpU,GAClD,MAAOgU,IAAahU,GAAUA,EAAS8T,IAIrC1J,GAA6B4E,GAAG5E,2BAA6B,WAC/DhO,KAAKkH,YAAa,EAClBlH,KAAKiY,QAAU,KAEjBjK,IAA2B7C,UAAU+L,cAAgB,WACnD,MAAOlX,MAAKiY,SAEdjK,GAA2B7C,UAAU8C,cAAgB,SAAU7O,GAC7D,GAAIY,KAAKiY,QAAW,KAAM,IAAI7V,OAAM,uCACpC,IAAIgV,GAAgBpX,KAAKkH,YACxBkQ,IAAkBpX,KAAKiY,QAAU7Y,GAClCgY,GAAiBhY,GAASA,EAAM+P,WAElCnB,GAA2B7C,UAAUgE,QAAU,WAC7C,IAAKnP,KAAKkH,WAAY,CACpBlH,KAAKkH,YAAa,CAClB,IAAIgR,GAAMlY,KAAKiY,OACfjY,MAAKiY,QAAU,KACfC,GAAOA,EAAI/I,WAKf,IAAI5B,IAAmBqF,GAAGrF,iBAAmB,WAC3CvN,KAAKkH,YAAa,EAClBlH,KAAKiY,QAAU,KAEjB1K,IAAiBpC,UAAU+L,cAAgB,WACzC,MAAOlX,MAAKiY,SAEd1K,GAAiBpC,UAAU8C,cAAgB,SAAU7O,GACnD,GAAIgY,GAAgBpX,KAAKkH,UACzB,KAAKkQ,EAAe,CAClB,GAAIc,GAAMlY,KAAKiY,OACfjY,MAAKiY,QAAU7Y,EAEjB8Y,GAAOA,EAAI/I,UACXiI,GAAiBhY,GAASA,EAAM+P,WAElC5B,GAAiBpC,UAAUgE,QAAU,WACnC,IAAKnP,KAAKkH,WAAY,CACpBlH,KAAKkH,YAAa,CAClB,IAAIgR,GAAMlY,KAAKiY,OACfjY,MAAKiY,QAAU,KAEjBC,GAAOA,EAAI/I,UAGb,IAAIX,IAAmBoE,GAAGpE,iBAAmB,SAAU2J,EAAOC,GAC5DpY,KAAKqY,OAASF,EACdnY,KAAKsY,QAAUF,EACfpY,KAAKkH,YAAa,EAGpBsH,IAAiBrD,UAAUgE,QAAU,WACnC,IAAKnP,KAAKkH,WAAY,CACpBlH,KAAKkH,YAAa,CAClB,IAAIqR,GAAOvY,KAAKqY,MAChBrY,MAAKqY,OAAS,KACdE,GAAQA,EAAKpJ,SACb,IAAIqJ,GAAOxY,KAAKsY,OAChBtY,MAAKsY,QAAU,KACfE,GAAQA,EAAKrJ,WAIjB,IAAIsJ,IAAiB7F,GAAG6F,eAAiB,SAAU3M,GACjD9L,KAAK0Y,aAAe5M,EACpB9L,KAAKkH,YAAa,EAGpBuR,IAAetN,UAAUgE,QAAU,WACjC,IAAKnP,KAAKkH,WAAY,CACpBlH,KAAKkH,YAAa,CAClB,KAAK,GAAItH,GAAI,EAAGJ,EAAMQ,KAAK0Y,aAAajZ,OAAYD,EAAJI,EAASA,IACvDI,KAAK0Y,aAAa9Y,GAAGuP,SAEvBnP,MAAK0Y,aAAajZ,OAAS,GAO/B,IAuDIkZ,KAvDqB/F,GAAGgG,mBAAqB,WAE/C,QAASC,GAAgBf,GACvB9X,KAAK8X,WAAaA,EAClB9X,KAAK8X,WAAWnR,QAChB3G,KAAK8Y,iBAAkB,EAmBzB,QAASF,GAAmBd,GAC1B9X,KAAK+Y,qBAAuBjB,EAC5B9X,KAAKkH,YAAa,EAClBlH,KAAKgZ,mBAAoB,EACzBhZ,KAAK2G,MAAQ,EAwBf,MA5CAkS,GAAgB1N,UAAUgE,QAAU,WAC7BnP,KAAK8X,WAAW5Q,YAAelH,KAAK8Y,kBACvC9Y,KAAK8Y,iBAAkB,EACvB9Y,KAAK8X,WAAWnR,QACc,IAA1B3G,KAAK8X,WAAWnR,OAAe3G,KAAK8X,WAAWkB,oBACjDhZ,KAAK8X,WAAW5Q,YAAa,EAC7BlH,KAAK8X,WAAWiB,qBAAqB5J,aAoB3CyJ,EAAmBzN,UAAUgE,QAAU,WAChCnP,KAAKkH,YAAelH,KAAKgZ,oBAC5BhZ,KAAKgZ,mBAAoB,EACN,IAAfhZ,KAAK2G,QACP3G,KAAKkH,YAAa,EAClBlH,KAAK+Y,qBAAqB5J,aAShCyJ,EAAmBzN,UAAU+L,cAAgB,WAC3C,MAAOlX,MAAKkH,WAAawQ,GAAkB,GAAImB,GAAgB7Y,OAG1D4Y,KAGWhG,GAAGC,UAAU8F,cAAgB,SAAUhQ,EAAW3B,EAAOwQ,EAAQpL,EAAS6M,GAC5FjZ,KAAK2I,UAAYA,EACjB3I,KAAKgH,MAAQA,EACbhH,KAAKwX,OAASA,EACdxX,KAAKoM,QAAUA,EACfpM,KAAKiZ,SAAWA,GAAY3F,GAC5BtT,KAAK8X,WAAa,GAAI9J,KAGxB2K,IAAcxN,UAAU+N,OAAS,WAC/BlZ,KAAK8X,WAAW7J,cAAcjO,KAAKmZ,eAGrCR,GAAcxN,UAAUiO,UAAY,SAAUvW,GAC5C,MAAO7C,MAAKiZ,SAASjZ,KAAKoM,QAASvJ,EAAMuJ,UAG3CuM,GAAcxN,UAAUkO,YAAc,WACpC,MAAOrZ,MAAK8X,WAAW5Q,YAGzByR,GAAcxN,UAAUgO,WAAa,WACnC,MAAOpB,IAAgB/X,KAAKwX,OAAOxX,KAAK2I,UAAW3I,KAAKgH,QAI1D,IAAIsS,IAAY1G,GAAG0G,UAAa,WAE9B,QAASA,MAGTA,EAAU1Q,YAAc,SAAUxB,GAChC,MAAOA,aAAakS,GAGtB,IAAIC,GAAiBD,EAAUnO,SAiD/B,OAzCAoO,GAAeC,SAAW,SAAUxS,EAAOwQ,GACzC,KAAM,IAAIvD,KAUZsF,EAAezI,eAAiB,SAAU9J,EAAOoF,EAASoL,GACxD,GAAIiC,GAAKrN,CAIT,OAHAqN,aAAc3M,QAAS2M,GAAUzZ,KAAK6M,OACtC4M,EAAKH,EAAUI,UAAUD,GAEd,IAAPA,EAAmBzZ,KAAKwZ,SAASxS,EAAOwQ,GAErCxX,KAAK2Z,gBAAgB3S,EAAOyS,EAAIjC,IAGzC+B,EAAeI,gBAAkB,SAAU3S,EAAOoF,EAASoL,GACzD,KAAM,IAAIvD,KAIZqF,EAAUzM,IAAMqG,GAGhBoG,EAAUnO,UAAU0B,IAAMqG,GAO1BoG,EAAUI,UAAY,SAAUE,GAE9B,MADW,GAAXA,IAAiBA,EAAW,GACrBA,GAGFN,KAGL5M,GAAgB4M,GAAUI,UAAW9Q,GAAc0Q,GAAU1Q,aAEhE,SAAU2Q,GAET,QAASM,GAAmBlR,EAAWmR,GAKrC,QAASC,GAAYC,GASnB,QAASC,GAAa/L,EAAGgM,GAOvB,MANIC,GACFC,EAAMnL,OAAOxC,GAEb6E,GAAS,EAEXkG,EAAO0C,EAAQH,GACRrC,GAfT,GAAIyC,IAAU,EAAO7I,GAAS,EAE1B7E,EAAI9D,EAAU6Q,SAASQ,EAAQC,EAC9B3I,KACH8I,EAAMnO,IAAIQ,GACV0N,GAAU,GAVd,GAAInT,GAAQ8S,EAAK,GAAItC,EAASsC,EAAK,GAAIM,EAAQ,GAAIrO,GAEnD,OADAyL,GAAOxQ,EAAO+S,GACPK,EAuBT,QAASC,GAAc1R,EAAWmR,GAKhC,QAASC,GAAYC,EAAQM,GAS3B,QAASL,GAAa/L,EAAGgM,GAOvB,MANIC,GACFC,EAAMnL,OAAOxC,GAEb6E,GAAS,EAEXkG,EAAO0C,EAAQH,GACRrC,GAfT,GAAIyC,IAAU,EAAO7I,GAAS,EAE1B7E,EAAI9D,EAAUmI,eAAekJ,EAAQM,EAAUL,EAC9C3I,KACH8I,EAAMnO,IAAIQ,GACV0N,GAAU,GAVd,GAAInT,GAAQ8S,EAAK,GAAItC,EAASsC,EAAK,GAAIM,EAAQ,GAAIrO,GAEnD,OADAyL,GAAOxQ,EAAO+S,GACPK,EA6BTb,EAAegB,kBAAoB,SAAUvT,EAAOwQ,GAClD,MAAOxX,MAAKwZ,UAAUxS,EAAOwQ,GAASqC,IAUxCN,EAAe5M,wBAA0B,SAAU3F,EAAOoF,EAASoL,GACjE,MAAOxX,MAAK8Q,gBAAgB9J,EAAOwQ,GAASpL,EAASiO,KAGvDf,GAAUnO,WAEX,SAAUoO,GASTA,EAAetM,iBAAmB,SAASjG,EAAOuF,EAAQiL,GACxD,GAAgC,mBAArB3P,IAAK2S,YAA+B,KAAM,IAAIxG,GACzDzH,GAASG,GAAcH,EACvB,IAAInF,GAAIJ,EAAOF,EAAKe,GAAK2S,YAAY,WAAcpT,EAAIoQ,EAAOpQ,IAAOmF,EACrE,OAAOkL,IAAiB,WAAc5P,GAAK4S,cAAc3T,OAG3DwS,GAAUnO,UAGX,IAuFGuP,IAAgBC,GAvFfC,GAAsB,SAAUC,GAEnC,QAASD,KACPC,EAAUnX,KAAK1D,MAOjB,MATAuW,IAASqE,EAAoBC,GAK7BD,EAAmBzP,UAAUqO,SAAW,SAAUxS,EAAOwQ,GACvD,MAAOO,IAAgBP,EAAOxX,KAAMgH,KAG/B4T,GACPtB,IAEEwB,GAAqBxB,GAAUyB,UAAY,GAAIH,IAK/CI,GAA0B,SAAUH,GAGtC,QAASI,KACP,KAAOC,EAAMzb,OAAS,GAAG,CACvB,GAAIyM,GAAOgP,EAAMC,WAChBjP,EAAKmN,eAAiBnN,EAAKgN,UAKhC,QAAS8B,KACPH,EAAUnX,KAAK1D,MAXjB,GAAIkb,EAgCJ,OAvBA3E,IAASyE,EAAwBH,GAKjCG,EAAuB7P,UAAUqO,SAAW,SAAUxS,EAAOwQ,GAC3D,GAAI4D,GAAK,GAAIzC,IAAc3Y,KAAMgH,EAAOwQ,EAAQxX,KAAK6M,MAErD,IAAKqO,EAQHA,EAAMG,QAAQD,OARJ,CACVF,EAAQ,GAAII,IAAc,GAC1BJ,EAAMG,QAAQD,EAEd,IAAIxX,GAAS4G,GAASyQ,IACtBC,GAAQ,KACJtX,IAAWzD,IAAYC,EAAQwD,EAAO1D,GAI5C,MAAOkb,GAAGtD,YAGZkD,EAAuB7P,UAAUoQ,iBAAmB,WAAc,OAAQL,GAEnEF,GACP1B,IAEEzQ,GAAyByQ,GAAUkC,cAAgB,GAAIR,IAmCvDS,IAjC4B7I,GAAGC,UAAU6I,0BAA6B,WACxE,QAASC,GAAW/O,GAClB,MAAO,UAAcgP,EAASC,GAC5BA,EAAQ,EAAGjP,EAAKkP,QAChB,IAAI9U,GAAQwD,GAASoC,EAAKmP,SAASnP,EAAKoP,OACpChV,KAAU7G,KACZyM,EAAKqP,QAAQ9M,UACb/O,EAAQ4G,EAAM9G,IAEhB0M,EAAKoP,OAAShV,GAIlB,QAAS0U,GAA0B/S,EAAW3B,EAAOuF,EAAQiL,GAC3DxX,KAAKkc,WAAavT,EAClB3I,KAAKgc,OAAShV,EACdhH,KAAK8b,QAAUvP,EACfvM,KAAK+b,QAAUvE,EAWjB,MARAkE,GAA0BvQ,UAAU2D,MAAQ,WAC1C,GAAIrC,GAAI,GAAIuB,GAIZ,OAHAhO,MAAKic,QAAUxP,EACfA,EAAEwB,cAAcjO,KAAKkc,WAAWvP,wBAAwB,EAAG3M,KAAK8b,QAASH,EAAW3b,QAE7EyM,GAGFiP,KAKS,WAChB,GAAIS,GAAiBC,EAAoBnJ,EACzC,IAAMpL,GAAKwU,WACTF,EAAkBtU,GAAKwU,WACvBD,EAAoBvU,GAAKyU,iBACpB,CAAA,IAAMzU,GAAK0U,QAMhB,KAAM,IAAIvI,GALVmI,GAAkB,SAAUlS,EAAIuS,GAC9B3U,GAAK0U,QAAQE,MAAMD,GACnBvS,KAMJ,OACEoS,WAAYF,EACZG,aAAcF,OAGdD,GAAkBV,GAAWY,WAC/BD,GAAoBX,GAAWa,cAEhC,WAQC,QAASI,GAAQC,GACf,GAAIC,EACFT,GAAgB,WAAcO,EAAQC,IAAY,OAC7C,CACL,GAAIE,GAAOC,EAAcH,EACzB,IAAIE,EAAM,CACRD,GAAmB,CACnB,IAAIhZ,GAAS4G,GAASqS,IACtBlC,IAAYgC,GACZC,GAAmB,EACfhZ,IAAWzD,IAAYC,EAAQwD,EAAO1D,KAchD,QAAS6c,KAEP,IAAKlV,GAAKmV,aAAenV,GAAKoV,cAAiB,OAAO,CACtD,IAAIC,IAAU,EAAOC,EAAatV,GAAKuV,SAMvC,OAJAvV,IAAKuV,UAAY,WAAcF,GAAU,GACzCrV,GAAKmV,YAAY,GAAI,KACrBnV,GAAKuV,UAAYD,EAEVD,EAvCT,GAAIG,GAAa,EAAGP,KAAoBF,GAAmB,CAE3DjC,IAAc,SAAUgC,SACfG,GAAcH,GAkBvB,IAAIW,GAAW,GAAIC,QAAO,IACxBC,OAAOpS,UACJqS,QAAQ,sBAAuB,QAC/BA,QAAQ,wBAAyB,OAAS,KAG3CC,EAAiG,mBAA1EA,EAAetL,IAAcK,IAAiBL,GAAWsL,gBACjFJ,EAASK,KAAKD,IAAiBA,CAelC,IAAInT,GAAWmT,GACbhD,GAAiB,SAAUlD,GACzB,GAAI1Q,GAAKuW,GAIT,OAHAP,GAAchW,GAAM0Q,EACpBkG,EAAa,WAAchB,EAAQ5V,KAE5BA,OAEJ,IAAuB,mBAAZ8W,UAAyD,wBAA3BxS,SAAS1H,KAAKka,SAC5DlD,GAAiB,SAAUlD,GACzB,GAAI1Q,GAAKuW,GAIT,OAHAP,GAAchW,GAAM0Q,EACpBoG,QAAQC,SAAS,WAAcnB,EAAQ5V,KAEhCA,OAEJ,IAAIiW,IAAwB,CACjC,GAAIe,GAAa,iBAAmBxV,KAAKyV,SAErCC,EAAsB,SAAUC,GAER,gBAAfA,GAAMC,MAAqBD,EAAMC,KAAKC,UAAU,EAAGL,EAAWre,UAAYqe,GACnFpB,EAAQuB,EAAMC,KAAKC,UAAUL,EAAWre,SAI5CoI,IAAK6D,iBAAiB,UAAWsS,GAAqB,GAEtDtD,GAAiB,SAAUlD,GACzB,GAAI1Q,GAAKuW,GAGT,OAFAP,GAAchW,GAAM0Q,EACpB3P,GAAKmV,YAAYc,EAAahX,EAAI,KAC3BA,OAEJ,IAAMe,GAAKuW,eAAgB,CAChC,GAAIC,GAAU,GAAIxW,IAAKuW,cAEvBC,GAAQC,MAAMlB,UAAY,SAAUld,GAAKwc,EAAQxc,EAAEge,OAEnDxD,GAAiB,SAAUlD,GACzB,GAAI1Q,GAAKuW,GAGT,OAFAP,GAAchW,GAAM0Q,EACpB6G,EAAQE,MAAMvB,YAAYlW,GACnBA,OAIT4T,IAFS,YAAc7S,KAAQ,sBAAwBA,IAAK2W,SAASC,cAAc,UAElE,SAAUjH,GACzB,GAAIkH,GAAgB7W,GAAK2W,SAASC,cAAc,UAC5C3X,EAAKuW,GAUT,OATAP,GAAchW,GAAM0Q,EAEpBkH,EAAcC,mBAAqB,WACjCjC,EAAQ5V,GACR4X,EAAcC,mBAAqB,KACnCD,EAAcE,WAAWC,YAAYH,GACrCA,EAAgB,MAElB7W,GAAK2W,SAASM,gBAAgBC,YAAYL,GACnC5X,GAIQ,SAAU0Q,GACzB,GAAI1Q,GAAKuW,GAMT,OALAP,GAAchW,GAAM0Q,EACpB2E,GAAgB,WACdO,EAAQ5V,IACP,GAEIA,KAQZ,IAAIkY,IAAoB,SAAUnE,GAEhC,QAASmE,KACPnE,EAAUnX,KAAK1D,MAGjB,QAASif,GAAenH,EAAYN,EAAQ7O,EAAW3B,GACrD,MAAO,YACL8Q,EAAW7J,cAAcsJ,GAAWS,OAAOR,EAAO7O,EAAW3B,MAIjE,QAASkY,GAAgBpY,GACvB9G,KAAKmf,IAAMrY,EACX9G,KAAKkH,YAAa,EAUpB,QAASkY,GAAqBtY,GAC5B9G,KAAKmf,IAAMrY,EACX9G,KAAKkH,YAAa,EAuBrB,MAhDCqP,IAASyI,EAAkBnE,GAgB3BqE,EAAgB/T,UAAUgE,QAAU,WAC7BnP,KAAKkH,aACRlH,KAAKkH,YAAa,EAClByT,GAAY3a,KAAKmf,OASrBC,EAAqBjU,UAAUgE,QAAU,WAClCnP,KAAKkH,aACRlH,KAAKkH,YAAa,EAClBkV,GAAkBpc,KAAKmf,OAI5BH,EAAiB7T,UAAUqO,SAAW,SAAUxS,EAAOwQ,GACrD,GAAIM,GAAa,GAAI9J,IACjBlH,EAAK4T,GAAeuE,EAAenH,EAAYN,EAAQxX,KAAMgH,GACjE,OAAO,IAAIwH,IAAiBsJ,EAAY,GAAIoH,GAAgBpY,KAG9DkY,EAAiB7T,UAAUwO,gBAAkB,SAAU3S,EAAOoF,EAASoL,GACrE,GAAgB,IAAZpL,EAAiB,MAAOpM,MAAKwZ,SAASxS,EAAOwQ,EACjD,IAAIM,GAAa,GAAI9J,IACjBlH,EAAKqV,GAAgB8C,EAAenH,EAAYN,EAAQxX,KAAMgH,GAAQoF,EAC1E,OAAO,IAAIoC,IAAiBsJ,EAAY,GAAIsH,GAAqBtY,KAG5DkY,GACP1F,IAEE1I,GAAmB0I,GAAU,WAAaA,GAAU+F,MAAQ,GAAIL,GAOpEnY,GAAYsE,UAAUiO,UAAY,SAAUvW,GAC1C,GAAIyc,GAAItf,KAAKZ,MAAMga,UAAUvW,EAAMzD,MAEnC,OADM,KAANkgB,IAAYA,EAAItf,KAAK8G,GAAKjE,EAAMiE,IACzBwY,EAGT,IAAIhE,IAAgB1I,GAAGC,UAAUyI,cAAgB,SAAUiE,GACzDvf,KAAKwf,MAAQ,GAAI7f,OAAM4f,GACvBvf,KAAKP,OAAS,GAGZggB,GAAgBnE,GAAcnQ,SAClCsU,IAAcC,iBAAmB,SAAUC,EAAMC,GAC/C,MAAO5f,MAAKwf,MAAMG,GAAMvG,UAAUpZ,KAAKwf,MAAMI,IAAU,GAGzDH,GAAcI,UAAY,SAAUrc,GAClC,KAAIA,GAASxD,KAAKP,QAAkB,EAAR+D,GAA5B,CACA,GAAIyF,GAASzF,EAAQ,GAAK,CAC1B,MAAa,EAATyF,GAAcA,IAAWzF,IACzBxD,KAAK0f,iBAAiBlc,EAAOyF,GAAS,CACxC,GAAI6W,GAAO9f,KAAKwf,MAAMhc,EACtBxD,MAAKwf,MAAMhc,GAASxD,KAAKwf,MAAMvW,GAC/BjJ,KAAKwf,MAAMvW,GAAU6W,EACrB9f,KAAK6f,UAAU5W,MAInBwW,GAAcM,QAAU,SAAUvc,GAEhC,IADCA,IAAUA,EAAQ,KACfA,GAASxD,KAAKP,QAAkB,EAAR+D,GAA5B,CACA,GAAImc,GAAO,EAAInc,EAAQ,EACnBoc,EAAQ,EAAIpc,EAAQ,EACpB2U,EAAQ3U,CAOZ,IANImc,EAAO3f,KAAKP,QAAUO,KAAK0f,iBAAiBC,EAAMxH,KACpDA,EAAQwH,GAENC,EAAQ5f,KAAKP,QAAUO,KAAK0f,iBAAiBE,EAAOzH,KACtDA,EAAQyH,GAENzH,IAAU3U,EAAO,CACnB,GAAIsc,GAAO9f,KAAKwf,MAAMhc,EACtBxD,MAAKwf,MAAMhc,GAASxD,KAAKwf,MAAMrH,GAC/BnY,KAAKwf,MAAMrH,GAAS2H,EACpB9f,KAAK+f,QAAQ5H,MAIjBsH,GAAcO,KAAO,WAAc,MAAOhgB,MAAKwf,MAAM,GAAGpgB,OAExDqgB,GAAcQ,SAAW,SAAUzc,GACjCxD,KAAKwf,MAAMhc,GAASxD,KAAKwf,QAAQxf,KAAKP,QACtCO,KAAKwf,MAAMxf,KAAKP,QAAUP,EAC1Bc,KAAK+f,WAGPN,GAActE,QAAU,WACtB,GAAIvX,GAAS5D,KAAKggB,MAElB,OADAhgB,MAAKigB,SAAS,GACPrc,GAGT6b,GAAcpE,QAAU,SAAUnP,GAChC,GAAI1I,GAAQxD,KAAKP,QACjBO,MAAKwf,MAAMhc,GAAS,GAAIqD,GAAYyU,GAAc3U,QAASuF,GAC3DlM,KAAK6f,UAAUrc,IAGjBic,GAAcxQ,OAAS,SAAU/C,GAC/B,IAAK,GAAItM,GAAI,EAAGA,EAAII,KAAKP,OAAQG,IAC/B,GAAII,KAAKwf,MAAM5f,GAAGR,QAAU8M,EAE1B,MADAlM,MAAKigB,SAASrgB,IACP,CAGX,QAAO,GAET0b,GAAc3U,MAAQ,CAKtB,IA4QIuZ,IA5QAC,GAAevN,GAAGuN,aAAe,WACnC,QAASA,MA2CT,MAvCAA,GAAahV,UAAUiV,QAAU,SAAU1V,EAAQD,EAASE,GAC1D,KAAM,IAAIsJ,KAGZkM,EAAahV,UAAUkV,gBAAkB,SAAU3V,EAAQD,EAASE,GAClE,KAAM,IAAIsJ,KAUZkM,EAAahV,UAAUmD,OAAS,SAAUgS,EAAkB7V,EAASE,GACnE,MAAO2V,IAAgD,gBAArBA,GAChCtgB,KAAKqgB,gBAAgBC,GACrBtgB,KAAKogB,QAAQE,EAAkB7V,EAASE,IAU5CwV,EAAahV,UAAUoV,aAAe,SAAU5X,GAC9C,GAAIiE,GAAO5M,IAEX,OADA4I,IAAYD,KAAeA,EAAYmS,IAChC,GAAItO,IAAoB,SAAU3L,GACvC,MAAO8H,GAAU6Q,SAAS5M,EAAM,SAAUsB,EAAGL,GAC3CA,EAAawS,gBAAgBxf,GACP,MAAtBgN,EAAaE,MAAgBlN,EAAE8J,mBAK9BwV,KAGLK,GAAsB,SAAU3F,GAElC,QAAS2F,GAAmBphB,GAC1BY,KAAKZ,MAAQA,EACbY,KAAK+N,KAAO,IAed,MAlBAwI,IAASiK,EAAoB3F,GAM7B2F,EAAmBrV,UAAUiV,QAAU,SAAU1V,GAC/C,MAAOA,GAAO1K,KAAKZ,QAGrBohB,EAAmBrV,UAAUkV,gBAAkB,SAAUxf,GACvD,MAAOA,GAAE6J,OAAO1K,KAAKZ,QAGvBohB,EAAmBrV,UAAUC,SAAW,WACtC,MAAO,UAAYpL,KAAKZ,MAAQ,KAG3BohB,GACPL,IAEEM,GAAuB,SAAU5F,GAEnC,QAAS4F,GAAoBngB,GAC3BN,KAAKM,MAAQA,EACbN,KAAK+N,KAAO,IAed,MAlBAwI,IAASkK,EAAqB5F,GAM9B4F,EAAoBtV,UAAUiV,QAAU,SAAU1V,EAAQD,GACxD,MAAOA,GAAQzK,KAAKM,QAGtBmgB,EAAoBtV,UAAUkV,gBAAkB,SAAUxf,GACxD,MAAOA,GAAE4J,QAAQzK,KAAKM,QAGxBmgB,EAAoBtV,UAAUC,SAAW,WACvC,MAAO,WAAapL,KAAKM,MAAQ,KAG5BmgB,GACPN,IAEEO,GAA2B,SAAU7F,GAEvC,QAAS6F,KACP1gB,KAAK+N,KAAO,IAed,MAjBAwI,IAASmK,EAAyB7F,GAKlC6F,EAAwBvV,UAAUiV,QAAU,SAAU1V,EAAQD,EAASE,GACrE,MAAOA,MAGT+V,EAAwBvV,UAAUkV,gBAAkB,SAAUxf,GAC5D,MAAOA,GAAE8J,eAGX+V,EAAwBvV,UAAUC,SAAW,WAC3C,MAAO,iBAGFsV,GACPP,IAOEQ,GAA2BR,GAAaS,aAAe,SAAUxhB,GACnE,MAAO,IAAIohB,IAAmBphB,IAQ5ByhB,GAA4BV,GAAaW,cAAgB,SAAUxgB,GACrE,MAAO,IAAImgB,IAAoBngB,IAO7BygB,GAAgCZ,GAAaa,kBAAoB,WACnE,MAAO,IAAIN,KAMTO,GAAWrO,GAAGqO,SAAW,aASzBC,GAAiBD,GAASpN,OAAS,SAAUnJ,EAAQD,EAASE,GAIhE,MAHAD,KAAWA,EAASuI,IACpBxI,IAAYA,EAAU8I,IACtB5I,IAAgBA,EAAcsI,IACvB,GAAIkO,IAAkBzW,EAAQD,EAASE,IAO5CyW,GAAmBxO,GAAGC,UAAUuO,iBAAoB,SAAUvG,GAMhE,QAASuG,KACPphB,KAAKqhB,WAAY,EAoDnB,MA1DA9K,IAAS6K,EAAkBvG,GAU3BuG,EAAiBjW,UAAUzB,KAAOwK,GAClCkN,EAAiBjW,UAAU7K,MAAQ4T,GACnCkN,EAAiBjW,UAAUmW,UAAYpN,GAMvCkN,EAAiBjW,UAAUT,OAAS,SAAUtL,IAC3CY,KAAKqhB,WAAarhB,KAAK0J,KAAKtK,IAO/BgiB,EAAiBjW,UAAUV,QAAU,SAAUnK,GACxCN,KAAKqhB,YACRrhB,KAAKqhB,WAAY,EACjBrhB,KAAKM,MAAMA,KAOf8gB,EAAiBjW,UAAUR,YAAc,WAClC3K,KAAKqhB,YACRrhB,KAAKqhB,WAAY,EACjBrhB,KAAKshB,cAOTF,EAAiBjW,UAAUgE,QAAU,WAAcnP,KAAKqhB,WAAY,GAEpED,EAAiBjW,UAAUoW,KAAO,SAAUrhB,GAC1C,MAAKF,MAAKqhB,WAMH,GALLrhB,KAAKqhB,WAAY,EACjBrhB,KAAKM,MAAMJ,IACJ,IAMJkhB,GACPH,IAKEE,GAAoBvO,GAAGuO,kBAAqB,SAAUtG,GASxD,QAASsG,GAAkBzW,EAAQD,EAASE,GAC1CkQ,EAAUnX,KAAK1D,MACfA,KAAKwhB,QAAU9W,EACf1K,KAAKyhB,SAAWhX,EAChBzK,KAAK0hB,aAAe/W,EA0BtB,MAtCA4L,IAAS4K,EAAmBtG,GAmB5BsG,EAAkBhW,UAAUzB,KAAO,SAAUtK,GAC3CY,KAAKwhB,QAAQpiB,IAOf+hB,EAAkBhW,UAAU7K,MAAQ,SAAUA,GAC5CN,KAAKyhB,SAASnhB,IAMhB6gB,EAAkBhW,UAAUmW,UAAY,WACtCthB,KAAK0hB,gBAGAP,GACPC,IAOErR,GAAa6C,GAAG7C,WAAa,WAE/B,QAAS4R,GAAc/U,EAAMrD,GAC3B,MAAO,UAAU1I,GACf,GAAI+gB,GAAa/gB,EAAE4J,OAMnB,OALA5J,GAAE4J,QAAU,SAAUvK,GACpBG,EAAmBH,EAAG0M,GACtBgV,EAAWle,KAAK7C,EAAGX,IAGdqJ,EAAU7F,KAAKkJ,EAAM/L,IAIhC,QAASkP,KACP,GAAI6C,GAAGE,OAAOa,kBAAoBnT,GAAW,CAC3C,GAAIqhB,GAAe7hB,KAAK8hB,WACpB5hB,EAAIsK,GAASpK,GAAS,GAAIgC,QAASlC,CACvCF,MAAKS,MAAQP,EAAEO,MAAM0d,UAAUje,EAAEO,MAAMC,QAAQ,MAAQ,GACvDV,KAAK8hB,WAAaH,EAAc3hB,KAAM6hB,IA0D1C,MAtDA3B,IAAkBnQ,EAAW5E,UAO7B4E,EAAWC,aAAe,SAAUnP,GAClC,MAAOA,IAAK0J,GAAW1J,EAAE0I,YAU3B2W,GAAgB3W,UAAY2W,GAAgB6B,QAAU,SAAUC,EAAWvX,EAASE,GAClF,MAAO3K,MAAK8hB,WAAgC,gBAAdE,GAC5BA,EACAd,GAAec,EAAWvX,EAASE,KASvCuV,GAAgB+B,gBAAkB,SAAUvX,EAAQkK,GAClD,MAAO5U,MAAK8hB,WAAWZ,GAAkC,mBAAZtM,GAA0B,SAAS/K,GAAKa,EAAOhH,KAAKkR,EAAS/K,IAAQa,KASpHwV,GAAgBgC,iBAAmB,SAAUzX,EAASmK,GACpD,MAAO5U,MAAK8hB,WAAWZ,GAAe,KAAyB,mBAAZtM,GAA0B,SAAS1U,GAAKuK,EAAQ/G,KAAKkR,EAAS1U,IAAQuK,KAS3HyV,GAAgBiC,qBAAuB,SAAUxX,EAAaiK,GAC5D,MAAO5U,MAAK8hB,WAAWZ,GAAe,KAAM,KAAyB,mBAAZtM,GAA0B,WAAajK,EAAYjH,KAAKkR,IAAcjK,KAG1HoF,KAGLqS,GAAoBxP,GAAGC,UAAUuP,kBAAqB,SAAUvH,GAGlE,QAASuH,GAAkBzZ,EAAWK,GACpC6R,EAAUnX,KAAK1D,MACfA,KAAK2I,UAAYA,EACjB3I,KAAKgJ,SAAWA,EAChBhJ,KAAKqiB,YAAa,EAClBriB,KAAKsiB,YAAa,EAClBtiB,KAAKkb,SACLlb,KAAK8X,WAAa,GAAIvK,IAGxB,QAASgV,GAAYvZ,EAAUa,GAAK,MAAO,YAAcb,EAAS0B,OAAOb,IACzE,QAAS2Y,GAAaxZ,EAAU9I,GAAK,MAAO,YAAc8I,EAASyB,QAAQvK,IAC3E,QAASuiB,GAAiBzZ,GAAY,MAAO,YAAcA,EAAS2B,eAepE,QAAS+P,GAAe1T,EAAO6U,GAC7B,GAAI6G,EACJ,MAAI1b,EAAMkU,MAAMzb,OAAS,GAIvB,YADAuH,EAAMqb,YAAa,EAFnBK,GAAO1b,EAAMkU,MAAM7M,OAKrB,IAAIqC,GAAMlG,GAASkY,IACnB,OAAIhS,KAAQvQ,IACV6G,EAAMkU,SACNlU,EAAMsb,YAAa,EACZliB,EAAQsQ,EAAIxQ,QAErB2b,GAAQ7U,GAkBV,MA7DAuP,IAAS6L,EAAmBvH,GAgB5BuH,EAAkBjX,UAAUzB,KAAO,SAAUG,GAC3C7J,KAAKkb,MAAMxZ,KAAK6gB,EAAYviB,KAAKgJ,SAAUa,KAG7CuY,EAAkBjX,UAAU7K,MAAQ,SAAUJ,GAC5CF,KAAKkb,MAAMxZ,KAAK8gB,EAAaxiB,KAAKgJ,SAAU9I,KAG9CkiB,EAAkBjX,UAAUmW,UAAY,WACtCthB,KAAKkb,MAAMxZ,KAAK+gB,EAAiBziB,KAAKgJ,YAqBxCoZ,EAAkBjX,UAAUwX,aAAe,WACzC,GAAIC,IAAU,GACT5iB,KAAKsiB,YAActiB,KAAKkb,MAAMzb,OAAS,IAC1CmjB,GAAW5iB,KAAKqiB,WAChBriB,KAAKqiB,YAAa,GAEpBO,GACE5iB,KAAK8X,WAAW7J,cAAcjO,KAAK2I,UAAU4R,kBAAkBva,KAAM0a,KAGzE0H,EAAkBjX,UAAUgE,QAAU,WACpC0L,EAAU1P,UAAUgE,QAAQzL,KAAK1D,MACjCA,KAAK8X,WAAW3I,WAGXiT,GACPhB,IAEEyB,GAAiBjQ,GAAGiQ,eAAkB,SAAUhI,GAGlD,QAASiI,GAAcC,GACrB,MAAOA,IAAcxY,GAAWwY,EAAW5T,SAAW4T,EACpDxY,GAAWwY,GAActL,GAAiBsL,GAAcrL,GAG5D,QAASzJ,GAAc7G,EAAGJ,GACxB,GAAIgc,GAAMhc,EAAM,GAAI4F,EAAO5F,EAAM,GAC7Bic,EAAMzY,GAASoC,EAAKsW,eAAexf,KAAKkJ,EAAMoW,EAC9CC,KAAQ9iB,IAAa6iB,EAAIzB,KAAKphB,GAASD,IAAME,EAAQD,GAASD,GAClE8iB,EAAI/U,cAAc6U,EAAcG,IAGlC,QAASJ,KACPhI,EAAUnX,KAAK1D,MAgBjB,MA/BAuW,IAASsM,EAAgBhI,GAkBzBgI,EAAe1X,UAAU2W,WAAa,SAAUjhB,GAC9C,GAAImiB,GAAM,GAAIG,IAAmBtiB,GAAImG,GAASgc,EAAKhjB,KAOnD,OALI6I,IAAuB0S,mBACzB1S,GAAuB2Q,SAASxS,EAAOiH,GAEvCA,EAAc,KAAMjH,GAEfgc,GAGTH,EAAe1X,UAAU+X,cAAgBhP,GAElC2O,GACP9S,IAEAqT,GAAoBxQ,GAAGwQ,kBAAqB,SAASvI,GAIrD,QAASuI,GAAkBtiB,EAAQqJ,EAAU8G,EAAgB2D,GAC3D5U,KAAKiR,eAAiB1G,GAAW0G,GAAkBA,EAAiB,KACpEjR,KAAKmK,SAAWuK,GAAanK,GAAWJ,GAAYA,EAAW,WAAa,MAAOA,IAAayK,EAAS,GACzG5U,KAAKc,OAASA,EACd+Z,EAAUnX,KAAK1D,MAQjB,QAASqjB,GAAcra,EAAUmB,EAAU8G,EAAgBnQ,GACzDd,KAAKJ,EAAI,EACTI,KAAKmK,SAAWA,EAChBnK,KAAKiR,eAAiBA,EACtBjR,KAAKc,OAASA,EACdd,KAAKa,EAAImI,EACToY,GAAiB1d,KAAK1D,MAuBxB,MA3CAuW,IAAS6M,EAAmBvI,GAS5BuI,EAAkBjY,UAAU+X,cAAgB,SAASriB,GACnD,MAAOb,MAAKc,OAAOyI,UAAU,GAAI8Z,GAAcxiB,EAAGb,KAAKmK,SAAUnK,KAAKiR,eAAgBjR,QAGxFuW,GAAS8M,EAAejC,IAUxBiC,EAAclY,UAAUmY,YAAc,SAAS1f,EAAQiG,EAAGjK,GACxD,MAAOI,MAAKiR,eACVrN,EAAO2f,IAAI,SAASnQ,EAAGoQ,GAAM,MAAOxjB,MAAKiR,eAAepH,EAAGuJ,EAAGxT,EAAG4jB,IAAQxjB,MACzE4D,GAGJyf,EAAclY,UAAUzB,KAAO,SAASG,GACtC,GAAIjK,GAAII,KAAKJ,IACTgE,EAAS4G,GAASxK,KAAKmK,UAAUN,EAAGjK,EAAGI,KAAKc,OAChD,OAAI8C,KAAWzD,GAAmBH,KAAKa,EAAE4J,QAAQ7G,EAAO1D,IAExDsP,GAAU5L,KAAYA,EAAS6L,GAAsB7L,KACpD6Q,GAAY7Q,IAAW4Q,GAAW5Q,MAAaA,EAASmM,GAAW0T,KAAK7f,QACzE5D,MAAKa,EAAE6J,OAAO1K,KAAKsjB,YAAY1f,EAAQiG,EAAGjK,MAG5CyjB,EAAclY,UAAU7K,MAAQ,SAASJ,GAAKF,KAAKa,EAAE4J,QAAQvK,IAE7DmjB,EAAclY,UAAUmW,UAAY,WAAathB,KAAKa,EAAE8J,eAEjDyY,GAETP,IAEIa,GAAa9Q,GAAGC,UAAU6Q,WAAa,YAO3C3c,GAAqBoE,UAAUgE,QAAU,WAClCnP,KAAKkH,aACRlH,KAAKkH,YAAa,EAClBlH,KAAKiH,GAAGC,YAAa,GAIzB,IAAIyc,IAA8B,SAAS9I,GAEzC,QAAS8I,GAA2B/M,GAClC5W,KAAK4W,QAAUA,EACfiE,EAAUnX,KAAK1D,MAGjB,QAAS0a,GAAe1T,EAAO6U,GAC7B,IAAI7U,EAAME,WAAV,CACA,GAAI0c,GAAcpZ,GAASxD,EAAM9G,EAAEwJ,MAAMhG,KAAKsD,EAAM9G,EACpD,IAAI0jB,IAAgBzjB,GAAY,MAAO6G,GAAMnG,EAAE4J,QAAQmZ,EAAY1jB,EACnE,IAAI0jB,EAAYja,KAAQ,MAAO3C,GAAMnG,EAAE8J,aAGvC,IAAIkZ,GAAeD,EAAYxkB,KAC/BoQ,IAAUqU,KAAkBA,EAAepU,GAAsBoU,GAEjE,IAAIpX,GAAI,GAAIuB,GACZhH,GAAMoG,aAAaa,cAAcxB,GACjCA,EAAEwB,cAAc4V,EAAata,UAAU,GAAI8Z,GAAcrc,EAAO6U,MAgBlE,QAASwH,GAAcrc,EAAO6U,GAC5B7b,KAAKgc,OAAShV,EACdhH,KAAK8jB,SAAWjI,EAChBuF,GAAiB1d,KAAK1D,MASxB,MA9CAuW,IAASoN,EAA4B9I,GAqBrC8I,EAA2BxY,UAAU+X,cAAgB,SAAUriB,GAC7D,GAAIuM,GAAe,GAAIG,IACnBvG,GACFE,YAAY,EACZrG,EAAGA,EACHuM,aAAcA,EACdlN,EAAGF,KAAK4W,QAAQ3O,OAGdqF,EAAazE,GAAuB0R,kBAAkBvT,EAAO0T,EACjE,OAAO,IAAIjC,KAAgBrL,EAAcE,EAAY,GAAIvG,GAAqBC,MAShFuP,GAAS8M,EAAejC,IAExBiC,EAAclY,UAAUzB,KAAO,SAAUG,GAAK7J,KAAKgc,OAAOnb,EAAE6J,OAAOb,IACnEwZ,EAAclY,UAAU7K,MAAQ,SAAUJ,GAAKF,KAAKgc,OAAOnb,EAAE4J,QAAQvK,IACrEmjB,EAAclY,UAAUmW,UAAY,WAActhB,KAAK8jB,SAAS9jB,KAAKgc,SAE9D2H,GACPd,GAEFa,IAAWvY,UAAU4Y,OAAS,WAC5B,MAAO,IAAIJ,IAA2B3jB,MAGxC,IAAIgkB,IAAwB,SAASnJ,GACnC,QAASmJ,GAAqBpN,GAC5B5W,KAAK4W,QAAUA,EACfiE,EAAUnX,KAAK1D,MAKjB,QAAS0a,GAAe1T,EAAO6U,GAC7B,IAAI7U,EAAME,WAAV,CACA,GAAI0c,GAAcpZ,GAASxD,EAAM9G,EAAEwJ,MAAMhG,KAAKsD,EAAM9G,EACpD,IAAI0jB,IAAgBzjB,GAAY,MAAO6G,GAAMnG,EAAE4J,QAAQmZ,EAAY1jB,EACnE,IAAI0jB,EAAYja,KAAQ,MAA2B,QAApB3C,EAAMid,UAAqBjd,EAAMnG,EAAE4J,QAAQzD,EAAMid,WAAajd,EAAMnG,EAAE8J,aAErG,IAAIkZ,GAAeD,EAAYxkB,KAC/BoQ,IAAUqU,KAAkBA,EAAepU,GAAsBoU,GAEjE,IAAIpX,GAAI,GAAIuB,GACZhH,GAAMoG,aAAaa,cAAcxB,GACjCA,EAAEwB,cAAc4V,EAAata,UAAU,GAAI8Z,GAAcrc,EAAO6U,MAiBlE,QAASwH,GAAcrc,EAAO6U,GAC5B7b,KAAKgc,OAAShV,EACdhH,KAAK8jB,SAAWjI,EAChBuF,GAAiB1d,KAAK1D,MASxB,MA1CAuW,IAASyN,EAAsBnJ,GAgB/BmJ,EAAqB7Y,UAAU+X,cAAgB,SAAUriB,GACvD,GAAIuM,GAAe,GAAIG,IACnBvG,GACFE,YAAY,EACZhH,EAAGF,KAAK4W,QAAQ3O,MAChBmF,aAAcA,EACd6W,UAAW,KACXpjB,EAAGA,GAGDyM,EAAazE,GAAuB0R,kBAAkBvT,EAAO0T,EACjE,OAAO,IAAIjC,KAAgBrL,EAAcE,EAAY,GAAIvG,GAAqBC,MAShFuP,GAAS8M,EAAejC,IAExBiC,EAAclY,UAAUzB,KAAO,SAAUG,GAAK7J,KAAKgc,OAAOnb,EAAE6J,OAAOb,IACnEwZ,EAAclY,UAAU7K,MAAQ,SAAUJ,GAAKF,KAAKgc,OAAOiI,UAAY/jB,EAAGF,KAAK8jB,SAAS9jB,KAAKgc,SAC7FqH,EAAclY,UAAUmW,UAAY,WAActhB,KAAKgc,OAAOnb,EAAE8J,eAEzDqZ,GACPnB,GAEFa,IAAWvY,UAAU+Y,WAAa,WAChC,MAAO,IAAIF,IAAqBhkB,MAGlC,IAAImkB,IAAoB,SAAUtJ,GAEhC,QAASsJ,GAAiBC,EAAG9E,GAC3Btf,KAAKokB,EAAIA,EACTpkB,KAAKsf,EAAS,MAALA,EAAY,GAAKA,EAO5B,QAAS+E,GAAiBta,GACxB/J,KAAKokB,EAAIra,EAAEqa,EACXpkB,KAAKskB,EAAIva,EAAEuV,EASb,MArBA/I,IAAS4N,EAAkBtJ,GAM3BsJ,EAAiBhZ,UAAUlD,IAAc,WACvC,MAAO,IAAIoc,GAAiBrkB,OAQ9BqkB,EAAiBlZ,UAAUzB,KAAO,WAChC,MAAe,KAAX1J,KAAKskB,EAAkB/P,IACvBvU,KAAKskB,EAAI,GAAKtkB,KAAKskB,KACd3a,MAAM,EAAOvK,MAAOY,KAAKokB,KAG7BD,GACPT,IAEEa,GAAmBb,GAAWla,OAAS,SAAUpK,EAAOolB,GAC1D,MAAO,IAAIL,IAAiB/kB,EAAOolB,IAGjCC,GAAgB,SAAS5J,GAE3B,QAAS4J,GAAard,EAAG6C,EAAI2K;AAC3B5U,KAAKoH,EAAIA,EACTpH,KAAKiK,GAAKA,EAAKyK,GAAazK,EAAI2K,EAAS,GAAK,KAMhD,QAAS8P,GAAa3a,GACpB/J,KAAKJ,EAAI,GACTI,KAAKoH,EAAI2C,EAAE3C,EACXpH,KAAKskB,EAAItkB,KAAKoH,EAAE3H,OAChBO,KAAKiK,GAAKF,EAAEE,GASd,MAtBAsM,IAASkO,EAAc5J,GAKvB4J,EAAatZ,UAAUlD,IAAc,WACnC,MAAO,IAAIyc,GAAa1kB,OAU1B0kB,EAAavZ,UAAUzB,KAAO,WAC7B,QAAS1J,KAAKJ,EAAII,KAAKskB,GACnB3a,MAAM,EAAOvK,MAAQY,KAAKiK,GAAsBjK,KAAKiK,GAAGjK,KAAKoH,EAAEpH,KAAKJ,GAAII,KAAKJ,EAAGI,KAAKoH,GAAtDpH,KAAKoH,EAAEpH,KAAKJ,IAC7C2U,IAGIkQ,GACPf,IAEEiB,GAAejB,GAAWkB,GAAK,SAAU9jB,EAAQqJ,EAAUyK,GAC7D,MAAO,IAAI6P,IAAa3jB,EAAQqJ,EAAUyK,IAGxCiQ,GAAqB,SAAShK,GAEhC,QAASgK,GAAkB/jB,GACzBd,KAAKc,OAASA,EACd+Z,EAAUnX,KAAK1D,MAQjB,QAASqjB,GAAcxiB,GACrBb,KAAKa,EAAIA,EACTb,KAAKN,KACL0hB,GAAiB1d,KAAK1D,MAOxB,MArBAuW,IAASsO,EAAmBhK,GAM5BgK,EAAkB1Z,UAAU+X,cAAgB,SAASriB,GACnD,MAAOb,MAAKc,OAAOyI,UAAU,GAAI8Z,GAAcxiB,KAGjD0V,GAAS8M,EAAejC,IAOxBiC,EAAclY,UAAUzB,KAAO,SAAUG,GAAK7J,KAAKN,EAAEgC,KAAKmI,IAC1DwZ,EAAclY,UAAU7K,MAAQ,SAAUJ,GAAKF,KAAKa,EAAE4J,QAAQvK,IAC9DmjB,EAAclY,UAAUmW,UAAY,WAActhB,KAAKa,EAAE6J,OAAO1K,KAAKN,GAAIM,KAAKa,EAAE8J,eAEzEka,GACPhC,GAMF3C,IAAgB4E,QAAU,WACxB,MAAO,IAAID,IAAkB7kB,OAY/B+P,GAAW8D,OAAS,SAAUtK,EAAWN,GACvC,MAAO,IAAIuD,IAAoBjD,EAAWN,GAG5C,IAAI8b,IAAS,SAASlK,GAEpB,QAASkK,GAAMne,GACb5G,KAAKglB,GAAKpe,EACViU,EAAUnX,KAAK1D,MAUjB,MAbAuW,IAASwO,EAAOlK,GAMhBkK,EAAM5Z,UAAU+X,cAAgB,SAAUriB,GACxC,GAAI+C,GAAS4G,GAASxK,KAAKglB,KAC3B,OAAIphB,KAAWzD,GAAmB8P,GAAgBrM,EAAO1D,GAAGqJ,UAAU1I,IACtE2O,GAAU5L,KAAYA,EAAS6L,GAAsB7L,IAC9CA,EAAO2F,UAAU1I,KAGnBkkB,GACPlC,IAUE3V,GAAkB6C,GAAWkV,MAAQ,SAAUC,GACjD,MAAO,IAAIH,IAAMG,IAGfC,GAAmB,SAAStK,GAE9B,QAASsK,GAAgBxc,GACvB3I,KAAK2I,UAAYA,EACjBkS,EAAUnX,KAAK1D,MAQjB,QAASolB,GAAUpc,EAAUL,GAC3B3I,KAAKgJ,SAAWA,EAChBhJ,KAAK2I,UAAYA,EAGnB,QAAS0c,GAAaje,EAAGJ,GAEvB,MADAA,GAAM2D,cACC+M,GAUT,MA5BAnB,IAAS4O,EAAiBtK,GAM1BsK,EAAgBha,UAAU+X,cAAgB,SAAUla,GAClD,GAAIsc,GAAO,GAAIF,GAAUpc,EAAUhJ,KAAK2I,UACxC,OAAO2c,GAAKC,OAadH,EAAUja,UAAUoa,IAAM,WACxB,GAAIve,GAAQhH,KAAKgJ,QACjB,OAAOhJ,MAAK2I,YAAcmS,GACxBuK,EAAa,KAAMre,GACnBhH,KAAK2I,UAAU6Q,SAASxS,EAAOqe,IAG5BF,GACPtC,IAEE2C,GAAmB,GAAIL,IAAgBrK,IAWvC2K,GAAkB1V,GAAW4H,MAAQ,SAAUhP,GAEjD,MADAC,IAAYD,KAAeA,EAAYmS,IAChCnS,IAAcmS,GAAqB0K,GAAmB,GAAIL,IAAgBxc,IAG/E+c,GAAkB,SAAS7K,GAE7B,QAAS6K,GAAeC,EAAU1b,EAAItB,GACpC3I,KAAK4lB,UAAYD,EACjB3lB,KAAKyL,IAAMxB,EACXjK,KAAKkc,WAAavT,EAClBkS,EAAUnX,KAAK1D,MAGjB,QAAS6lB,GAAqBhlB,EAAGmH,EAAIiC,GACnC,MAAO,UAAuBrK,EAAGic,GAC/B,GAAInS,GAAOc,GAASxC,EAAG0B,MAAMhG,KAAKsE,EAClC,IAAI0B,IAASvJ,GAAY,MAAOU,GAAE4J,QAAQf,EAAKxJ,EAC/C,IAAIwJ,EAAKC,KAAQ,MAAO9I,GAAE8J,aAE1B,IAAI/G,GAAS8F,EAAKtK,KAElB,OAAImL,IAAWN,KACbrG,EAAS4G,GAASP,GAAIrG,EAAQhE,GAC1BgE,IAAWzD,IAAmBU,EAAE4J,QAAQ7G,EAAO1D,IAGrDW,EAAE6J,OAAO9G,OACTiY,GAAQjc,EAAI,KAWhB,MAjCA2W,IAASmP,EAAgB7K,GA0BzB6K,EAAeva,UAAU+X,cAAgB,SAAUriB,GACjD,GAAIilB,GAAOzmB,OAAOW,KAAK4lB,WACnB5d,EAAKD,EAAY+d,EAErB,OAAO9lB,MAAKkc,WAAW3B,kBAAkB,EAAGsL,EAAqBhlB,EAAGmH,EAAIhI,KAAKyL,OAGxEia,GACP7C,IAEEpa,GAAiBH,KAAK0N,IAAI,EAAG,IAAM,CAMvC7O,GAAegE,UAAUlD,IAAc,WACrC,MAAO,IAAIZ,GAAerH,KAAKiH,KASjCI,EAAe8D,UAAUlD,IAAc,WACrC,MAAOjI,OAGTqH,EAAe8D,UAAUzB,KAAO,WAC9B,MAAO1J,MAAKuH,GAAKvH,KAAKsH,IAAOqC,MAAM,EAAOvK,MAAOY,KAAKiH,GAAG8e,OAAO/lB,KAAKuH,OAAUgN,IAOjF/M,EAAc2D,UAAUlD,IAAc,WACpC,MAAO,IAAIP,GAAc1H,KAAKyH,KAShCC,EAAcyD,UAAUlD,IAAc,WACpC,MAAOjI,OAGT0H,EAAcyD,UAAUzB,KAAO,WAC7B,MAAO1J,MAAKuH,GAAKvH,KAAKsH,IAAOqC,MAAM,EAAOvK,MAAOY,KAAKyH,GAAGzH,KAAKuH,OAAUgN,GAiD1E,IAAIyR,IAAiBjW,GAAW0T,KAAO,SAAUkC,EAAUM,EAAOrR,EAASjM,GACzE,GAAgB,MAAZgd,EACF,KAAM,IAAIvjB,OAAM,2BAElB,IAAI6jB,IAAU1b,GAAW0b,GACvB,KAAM,IAAI7jB,OAAM,yCAElB,IAAI6jB,EACF,GAAIC,GAASxR,GAAauR,EAAOrR,EAAS,EAG5C,OADAhM,IAAYD,KAAeA,EAAYE,IAChC,GAAI6c,IAAeC,EAAUO,EAAQvd,IAG1CG,GAAuB,SAAS+R,GAElC,QAAS/R,GAAoBM,EAAMT,GACjC3I,KAAKmmB,MAAQ/c,EACbpJ,KAAKkc,WAAavT,EAClBkS,EAAUnX,KAAK1D,MAGjB,QAAS0a,GAAe7Z,EAAGuI,GACzB,GAAI5J,GAAM4J,EAAK3J,MACf,OAAO,UAAwBG,EAAGic,GACxBrc,EAAJI,GACFiB,EAAE6J,OAAOtB,EAAKxJ,IACdic,EAAQjc,EAAI,IAEZiB,EAAE8J,eASR,MAvBA4L,IAASzN,EAAqB+R,GAmB9B/R,EAAoBqC,UAAU+X,cAAgB,SAAUriB,GACtD,MAAOb,MAAKkc,WAAW3B,kBAAkB,EAAGG,EAAe7Z,EAAGb,KAAKmmB,SAG9Drd,GACP+Z,IAQEuD,GAAsBrW,GAAWsW,UAAY,SAAUlhB,EAAOwD,GAEhE,MADAC,IAAYD,KAAeA,EAAYE,IAChC,GAAIC,IAAoB3D,EAAOwD,IAGpC2d,GAAmB,SAASzL,GAE9B,QAASyL,KACPzL,EAAUnX,KAAK1D,MAOjB,MATAuW,IAAS+P,EAAiBzL,GAK1ByL,EAAgBnb,UAAU+X,cAAgB,SAAUla,GAClD,MAAO0O,KAGF4O,GACPzD,IAEE0D,GAAmB,GAAID,IAMvBxW,GAAkBC,GAAWyW,MAAQ,WACvC,MAAOD,IAYTxW,IAAW6U,GAAK,WAEd,IAAI,GADAplB,GAAMS,UAAUR,OAAQ2J,EAAO,GAAIzJ,OAAMH,GACrCI,EAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,EACnD,OAAO,IAAIkJ,IAAoBM,EAAMP,KAQvCkH,GAAW0W,gBAAkB,SAAU9d,GAErC,IAAI,GADAnJ,GAAMS,UAAUR,OAAQ2J,EAAO,GAAIzJ,OAAMH,EAAM,GAC3CI,EAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,EAAI,GAAKK,UAAUL,EACvD,OAAO,IAAIkJ,IAAoBM,EAAMT,GAGvC,IAAI+d,IAAmB,SAAS7L,GAE9B,QAAS6L,GAAgB7lB,EAAG8H,GAC1B3I,KAAK2mB,GAAK9lB,EACVb,KAAK4mB,MAAQvnB,OAAO8D,KAAKtC,GACzBb,KAAKkc,WAAavT,EAClBkS,EAAUnX,KAAK1D,MAGjB,QAAS0a,GAAe7Z,EAAGuV,EAAKjT,GAC9B,MAAO,UAAuBvD,EAAGic,GAC/B,GAAIjc,EAAIuD,EAAK1D,OAAQ,CACnB,GAAI8D,GAAMJ,EAAKvD,EACfiB,GAAE6J,QAAQnH,EAAK6S,EAAI7S,KACnBsY,EAAQjc,EAAI,OAEZiB,GAAE8J,eASR,MAxBA4L,IAASmQ,EAAiB7L,GAoB1B6L,EAAgBvb,UAAU+X,cAAgB,SAAUriB,GAClD,MAAOb,MAAKkc,WAAW3B,kBAAkB,EAAGG,EAAe7Z,EAAGb,KAAK2mB,GAAI3mB,KAAK4mB,SAGvEF,GACP7D,GAQF9S,IAAW8W,MAAQ,SAAUzQ,EAAKzN,GAEhC,MADAA,KAAcA,EAAYE,IACnB,GAAI6d,IAAgBtQ,EAAKzN,GAGhC,IAAIme,IAAmB,SAASjM,GAEhC,QAASiM,GAAgBhY,EAAOnI,EAAOgC,GACrC3I,KAAK8O,MAAQA,EACb9O,KAAK+mB,WAAapgB,EAClB3G,KAAK2I,UAAYA,EACjBkS,EAAUnX,KAAK1D,MAGjB,QAASgnB,GAAclY,EAAOnI,EAAO9F,GACnC,MAAO,UAAejB,EAAGic,GACflV,EAAJ/G,GACFiB,EAAE6J,OAAOoE,EAAQlP,GACjBic,EAAQjc,EAAI,IAEZiB,EAAE8J,eAYR,MA1BA4L,IAASuQ,EAAiBjM,GAmB1BiM,EAAgB3b,UAAU+X,cAAgB,SAAUriB,GAClD,MAAOb,MAAK2I,UAAU4R,kBACpB,EACAyM,EAAchnB,KAAK8O,MAAO9O,KAAK+mB,WAAYlmB,KAIxCimB,GACPjE,GASF9S,IAAWkX,MAAQ,SAAUnY,EAAOnI,EAAOgC,GAEzC,MADAC,IAAYD,KAAeA,EAAYE,IAChC,GAAIie,IAAgBhY,EAAOnI,EAAOgC,GAG3C,IAAIue,IAAoB,SAASrM,GAE/B,QAASqM,GAAiB9nB,EAAOolB,EAAa7b,GAC5C3I,KAAKZ,MAAQA,EACbY,KAAKwkB,YAA6B,MAAfA,EAAsB,GAAKA,EAC9CxkB,KAAK2I,UAAYA,EACjBkS,EAAUnX,KAAK1D,MAQjB,MAbAuW,IAAS2Q,EAAkBrM,GAQ3BqM,EAAiB/b,UAAU+X,cAAgB,SAAUla,GACnD,GAAIsc,GAAO,GAAIvc,GAAWC,EAAUhJ,KACpC,OAAOslB,GAAKC,OAGP2B,GACPrE,GAOF9Z,GAAWoC,UAAUoa,IAAM,WAEzB,QAASyB,GAAcpnB,EAAGic,GAKxB,OAJU,KAANjc,GAAYA,EAAI,KAClBoJ,EAAS0B,OAAOtL,GAChBQ,EAAI,GAAKA,KAED,IAANA,EAAkBoJ,EAAS2B,kBAC/BkR,GAAQjc,GAPV,GAAIoJ,GAAWhJ,KAAKgJ,SAAU5J,EAAQY,KAAKiJ,OAAO7J,KAUlD,OAAOY,MAAKiJ,OAAON,UAAU4R,kBAAkBva,KAAKiJ,OAAOub,YAAawC,IAU1EjX,GAAWvG,OAAS,SAAUpK,EAAOolB,EAAa7b,GAEhD,MADAC,IAAYD,KAAeA,EAAYE,IAChC,GAAIqe,IAAiB9nB,EAAOolB,EAAa7b,GAGlD,IAAIwe,IAAkB,SAAStM,GAE7B,QAASsM,GAAe/nB,EAAOuJ,GAC7B3I,KAAKonB,OAAShoB,EACdY,KAAKkc,WAAavT,EAClBkS,EAAUnX,KAAK1D,MAUjB,QAASqlB,GAAaje,EAAGJ,GACvB,GAAI5H,GAAQ4H,EAAM,GAAIgC,EAAWhC,EAAM,EAGvC,OAFAgC,GAAS0B,OAAOtL,GAChB4J,EAAS2B,cACF+M,GAGT,MArBAnB,IAAS4Q,EAAgBtM,GAOzBsM,EAAehc,UAAU+X,cAAgB,SAAUriB,GACjD,GAAImG,IAAShH,KAAKonB,OAAQvmB,EAC1B,OAAOb,MAAKkc,aAAepB,GACzBuK,EAAa,KAAMre,GACnBhH,KAAKkc,WAAW1C,SAASxS,EAAOqe,IAU7B8B,GACPtE,IAcEwE,IALmBtX,GAAW,UAAYA,GAAWuX,KAAO,SAAUloB,EAAOuJ,GAE/E,MADAC,IAAYD,KAAeA,EAAYmS,IAChC,GAAIqM,IAAe/nB,EAAOuJ,IAGZ,SAASkS,GAE9B,QAASwM,GAAgB/mB,EAAOqI,GAC9B3I,KAAKunB,OAASjnB,EACdN,KAAKkc,WAAavT,EAClBkS,EAAUnX,KAAK1D,MAUjB,QAASqlB,GAAaje,EAAGJ,GACvB,GAAI9G,GAAI8G,EAAM,GAAInG,EAAImG,EAAM,EAE5B,OADAnG,GAAE4J,QAAQvK,GACHwX,GAGT,MApBAnB,IAAS8Q,EAAiBxM,GAO1BwM,EAAgBlc,UAAU+X,cAAgB,SAAUriB,GAClD,GAAImG,IAAShH,KAAKunB,OAAQ1mB,EAC1B,OAAOb,MAAKkc,aAAepB,GACzBuK,EAAa,KAAMre,GACnBhH,KAAKkc,WAAW1C,SAASxS,EAAOqe,IAS7BgC,GACPxE,KASE5S,GAAkBF,GAAW,SAAW,SAAUzP,EAAOqI,GAE3D,MADAC,IAAYD,KAAeA,EAAYmS,IAChC,GAAIuM,IAAgB/mB,EAAOqI,IAGhC6e,GAAmB,SAAU3M,GAE/B,QAAS2M,GAAgB1mB,EAAQmJ,GAC/BjK,KAAKc,OAASA,EACdd,KAAKyL,IAAMxB,EACX4Q,EAAUnX,KAAK1D,MAUjB,MAdAuW,IAASiR,EAAiB3M,GAO1B2M,EAAgBrc,UAAU+X,cAAgB,SAAUriB,GAClD,GAAI4mB,GAAK,GAAIzZ,IAA8BZ,EAAe,GAAIG,GAG9D,OAFAH,GAAaa,cAAcwZ,GAC3BA,EAAGxZ,cAAcjO,KAAKc,OAAOyI,UAAU,GAAIme,IAAc7mB,EAAGuM,EAAcpN,KAAKyL,OACxE2B,GAGFoa,GACP3E,IAEE6E,GAAiB,SAAS7M,GAE5B,QAAS6M,GAAc7mB,EAAGuG,EAAG6C,GAC3BjK,KAAK2mB,GAAK9lB,EACVb,KAAKiH,GAAKG,EACVpH,KAAKyL,IAAMxB,EACX4Q,EAAUnX,KAAK1D,MAejB,MApBAuW,IAASmR,EAAe7M,GAQxB6M,EAAcvc,UAAUzB,KAAO,SAAUG,GAAK7J,KAAK2mB,GAAGjc,OAAOb,IAC7D6d,EAAcvc,UAAUmW,UAAY,WAAc,MAAOthB,MAAK2mB,GAAGhc,eACjE+c,EAAcvc,UAAU7K,MAAQ,SAAUJ,GACxC,GAAI0D,GAAS4G,GAASxK,KAAKyL,KAAKvL,EAChC,IAAI0D,IAAWzD,GAAY,MAAOH,MAAK2mB,GAAGlc,QAAQ7G,EAAO1D,EACzDsP,IAAU5L,KAAYA,EAAS6L,GAAsB7L,GAErD,IAAI6I,GAAI,GAAIuB,GACZhO,MAAKiH,GAAGgH,cAAcxB,GACtBA,EAAEwB,cAAcrK,EAAO2F,UAAUvJ,KAAK2mB,MAGjCe,GACPtG,GAOFlB,IAAgB,SAAW,SAAUyH,GACnC,MAAOpd,IAAWod,GAAmB,GAAIH,IAAgBxnB,KAAM2nB,GAAmBC,IAAiB5nB,KAAM2nB,IAQ3G,IAAIC,IAAkB7X,GAAW,SAAW,WAC1C,GAAIyP,EACJ,IAAI7f,MAAM+F,QAAQzF,UAAU,IAC1Buf,EAAQvf,UAAU,OACb,CACL,GAAIT,GAAMS,UAAUR,MACpB+f,GAAQ,GAAI7f,OAAMH,EAClB,KAAI,GAAII,GAAI,EAAOJ,EAAJI,EAASA,IAAO4f,EAAM5f,GAAKK,UAAUL,GAEtD,MAAO+kB,IAAanF,GAAO0E,aAY7BhE,IAAgB2H,cAAgB,WAE9B,IAAI,GADAroB,GAAMS,UAAUR,OAAQ2J,EAAO,GAAIzJ,OAAMH,GACrCI,EAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,EAMnD,OALID,OAAM+F,QAAQ0D,EAAK,IACrBA,EAAK,GAAGrI,QAAQf,MAEhBoJ,EAAKrI,QAAQf,MAER6nB,GAAc9nB,MAAMC,KAAMoJ,GAUnC,IAAI0e,IAA2B,SAASjN,GAEtC,QAASiN,GAAwBC,EAAQC,GACvChoB,KAAKioB,QAAUF,EACf/nB,KAAKkoB,IAAMF,EACXnN,EAAUnX,KAAK1D,MAwBjB,MA5BAuW,IAASuR,EAAyBjN,GAOlCiN,EAAwB3c,UAAU+X,cAAgB,SAASla,GAWzD,IAAK,GAVDxJ,GAAMQ,KAAKioB,QAAQxoB,OACnB0oB,EAAgB,GAAIxoB,OAAMH,GAE1BwH,GACFsI,SAAU5I,EAAgBlH,EAAK0J,GAC/BiI,aAAa,EACbG,OAAQ5K,EAAgBlH,EAAK0J,GAC7BgI,OAAQ,GAAIvR,OAAMH,IAGXI,EAAI,EAAOJ,EAAJI,EAASA,IAAK,CAC5B,GAAIkB,GAASd,KAAKioB,QAAQroB,GAAIwoB,EAAM,GAAIpa,GACxCma,GAAcvoB,GAAKwoB,EACnB5Y,GAAU1O,KAAYA,EAAS2O,GAAsB3O,IACrDsnB,EAAIna,cAAcnN,EAAOyI,UAAU,GAAI8e,IAAsBrf,EAAUpJ,EAAGI,KAAKkoB,IAAKlhB,KAGtF,MAAO,IAAIyR,IAAe0P,IAGrBL,GACPjF,IAEEwF,GAAyB,SAAUxN,GAErC,QAASwN,GAAsBxnB,EAAGjB,EAAGooB,EAAIhhB,GACvChH,KAAK2mB,GAAK9lB,EACVb,KAAKuH,GAAK3H,EACVI,KAAKkoB,IAAMF,EACXhoB,KAAKgc,OAAShV,EACd6T,EAAUnX,KAAK1D,MAGjB,QAASsoB,GAAW1oB,GAClB,MAAO,UAAUiK,EAAG0e,GAClB,MAAOA,KAAM3oB,GAyBjB,MApCA2W,IAAS8R,EAAuBxN,GAehCwN,EAAsBld,UAAUzB,KAAO,SAAUG,GAG/C,GAFA7J,KAAKgc,OAAO9K,OAAOlR,KAAKuH,IAAMsC,EAC9B7J,KAAKgc,OAAO1M,SAAStP,KAAKuH,KAAM,EAC5BvH,KAAKgc,OAAO7K,cAAgBnR,KAAKgc,OAAO7K,YAAcnR,KAAKgc,OAAO1M,SAAS8B,MAAMC,KAAY,CAC/F,GAAIX,GAAMlG,GAASxK,KAAKkoB,KAAKnoB,MAAM,KAAMC,KAAKgc,OAAO9K,OACrD,IAAIR,IAAQvQ,GAAY,MAAOH,MAAK2mB,GAAGlc,QAAQiG,EAAIxQ,EACnDF,MAAK2mB,GAAGjc,OAAOgG,OACN1Q,MAAKgc,OAAO1K,OAAOkX,OAAOF,EAAWtoB,KAAKuH,KAAK6J,MAAMC,KAC9DrR,KAAK2mB,GAAGhc,eAIZ0d,EAAsBld,UAAU7K,MAAQ,SAAUJ,GAChDF,KAAK2mB,GAAGlc,QAAQvK,IAGlBmoB,EAAsBld,UAAUmW,UAAY,WAC1CthB,KAAKgc,OAAO1K,OAAOtR,KAAKuH,KAAM,EAC9BvH,KAAKgc,OAAO1K,OAAOF,MAAMC,KAAarR,KAAK2mB,GAAGhc,eAGzC0d,GACPjH,IAUEyG,GAAgB9X,GAAW8X,cAAgB,WAE7C,IAAI,GADAroB,GAAMS,UAAUR,OAAQ2J,EAAO,GAAIzJ,OAAMH,GACrCI,EAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,EACnD,IAAIqR,GAAiB1G,GAAWnB,EAAK5J,EAAM,IAAM4J,EAAK7C,MAAQ4C,CAE9D,OADAxJ,OAAM+F,QAAQ0D,EAAK,MAAQA,EAAOA,EAAK,IAChC,GAAI0e,IAAwB1e,EAAM6H,GAO3CiP,IAAgB6D,OAAS,WACvB,IAAI,GAAI3a,MAAWxJ,EAAI,EAAGJ,EAAMS,UAAUR,OAAYD,EAAJI,EAASA,IAAOwJ,EAAK1H,KAAKzB,UAAUL,GAEtF,OADAwJ,GAAKrI,QAAQf,MACNyoB,GAAiB1oB,MAAM,KAAMqJ,GAGtC,IAAIsf,IAAkB,SAAS7N,GAE7B,QAAS6N,GAAethB,EAAG6C,GACzBjK,KAAKiH,GAAKG,EACVpH,KAAKyL,IAAMxB,EACX4Q,EAAUnX,KAAK1D,MAOjB,MAXAuW,IAASmS,EAAgB7N,GAOzB6N,EAAevd,UAAUzB,KAAO,SAAUG,GAAK7J,KAAKiH,GAAGpG,EAAE6J,OAAOb,IAChE6e,EAAevd,UAAU7K,MAAQ,SAAUJ,GAAKF,KAAKiH,GAAGpG,EAAE4J,QAAQvK,IAClEwoB,EAAevd,UAAUmW,UAAY,WAActhB,KAAKiH,GAAGrH,IAAKI,KAAKyL,IAAIzL,KAAKiH,KAEvEyhB,GACPtH,IAEEuH,GAAoB,SAAS9N,GAE/B,QAAS8N,GAAiB/R,GACxB5W,KAAK4oB,SAAWhS,EAChBiE,EAAUnX,KAAK1D,MAGjB,QAASua,GAAmBvT,EAAO6U,GACjC,IAAI7U,EAAM8Q,WAAW5Q,WAArB,CACA,GAAIF,EAAMpH,IAAMoH,EAAM4P,QAAQnX,OAAU,MAAOuH,GAAMnG,EAAE8J,aAGvD,IAAIkZ,GAAe7c,EAAM4P,QAAQ5P,EAAMpH,EACvC4P,IAAUqU,KAAkBA,EAAepU,GAAsBoU,GAEjE,IAAIpX,GAAI,GAAIuB,GACZhH,GAAMoG,aAAaa,cAAcxB,GACjCA,EAAEwB,cAAc4V,EAAata,UAAU,GAAImf,IAAe1hB,EAAO6U,MAkBnE,MAlCAtF,IAASoS,EAAkB9N,GAmB3B8N,EAAiBxd,UAAU+X,cAAgB,SAASriB,GAClD,GAAIuM,GAAe,GAAIG,IACnBuK,EAAaL,GAAiBxE,IAC9BjM,GACFnG,EAAGA,EACHjB,EAAG,EACHwN,aAAcA,EACd0K,WAAYA,EACZlB,QAAS5W,KAAK4oB,UAGZtb,EAAawN,GAAmBP,kBAAkBvT,EAAOuT,EAC7D,OAAO,IAAI9B,KAAgBrL,EAAc0K,EAAYxK,KAGhDqb,GACP9F,IAOE4F,GAAmB1Y,GAAWgU,OAAS,WACzC,GAAI3a,EACJ,IAAIzJ,MAAM+F,QAAQzF,UAAU,IAC1BmJ,EAAOnJ,UAAU,OACZ,CACLmJ,EAAO,GAAIzJ,OAAMM,UAAUR,OAC3B,KAAI,GAAIG,GAAI,EAAGJ,EAAMS,UAAUR,OAAYD,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,GAE7E,MAAO,IAAI+oB,IAAiBvf,GAO9B8W,IAAgB2I,UAAY,WAC1B,MAAO7oB,MAAK8oB,MAAM,GAGpB,IAAIC,IAAmB,SAAUlO,GAG/B,QAASkO,GAAgBjoB,EAAQkoB,GAC/BhpB,KAAKc,OAASA,EACdd,KAAKgpB,cAAgBA,EACrBnO,EAAUnX,KAAK1D,MASjB,MAdAuW,IAASwS,EAAiBlO,GAQ1BkO,EAAgB5d,UAAU+X,cAAgB,SAASla,GACjD,GAAIigB,GAAI,GAAIld,GAEZ,OADAkd,GAAEhd,IAAIjM,KAAKc,OAAOyI,UAAU,GAAI2f,IAAclgB,EAAUhJ,KAAKgpB,cAAeC,KACrEA,GAGFF,GAEPlG,IAEEqG,GAAiB,SAAUrO,GAC7B,QAASqO,GAAcroB,EAAG0N,EAAK0a,GAC7BjpB,KAAKa,EAAIA,EACTb,KAAKuO,IAAMA,EACXvO,KAAKipB,EAAIA,EACTjpB,KAAK2J,MAAO,EACZ3J,KAAKyN,KACLzN,KAAKmpB,YAAc,EACnBtO,EAAUnX,KAAK1D,MAuBjB,QAASqjB,GAAcpa,EAAQmf,GAC7BpoB,KAAKiJ,OAASA,EACdjJ,KAAKooB,IAAMA,EACXvN,EAAUnX,KAAK1D,MAiBjB,MAxCAuW,IAAS2S,EAAerO,GAExBqO,EAAc/d,UAAUie,gBAAkB,SAAUpS,GAClD,GAAIoR,GAAM,GAAIpa,GACdhO,MAAKipB,EAAEhd,IAAImc,GACX5Y,GAAUwH,KAAQA,EAAKvH,GAAsBuH,IAC7CoR,EAAIna,cAAc+I,EAAGzN,UAAU,GAAI8Z,GAAcrjB,KAAMooB,MAGzDc,EAAc/d,UAAUzB,KAAO,SAAU2f,GACpCrpB,KAAKmpB,YAAcnpB,KAAKuO,KACzBvO,KAAKmpB,cACLnpB,KAAKopB,gBAAgBC,IAErBrpB,KAAKyN,EAAE/L,KAAK2nB,IAGhBH,EAAc/d,UAAU7K,MAAQ,SAAUJ,GAAKF,KAAKa,EAAE4J,QAAQvK,IAC9DgpB,EAAc/d,UAAUmW,UAAY,WAActhB,KAAK2J,MAAO,EAA2B,IAArB3J,KAAKmpB,aAAqBnpB,KAAKa,EAAE8J,eAQrG4L,GAAS8M,EAAexI,GAExBwI,EAAclY,UAAUzB,KAAO,SAAUG,GAAK7J,KAAKiJ,OAAOpI,EAAE6J,OAAOb,IACnEwZ,EAAclY,UAAU7K,MAAQ,SAAUJ,GAAKF,KAAKiJ,OAAOpI,EAAE4J,QAAQvK,IACrEmjB,EAAclY,UAAUmW,UAAY,WAClCthB,KAAKiJ,OAAOggB,EAAEha,OAAOjP,KAAKooB,KACtBpoB,KAAKiJ,OAAOwE,EAAEhO,OAAS,EACzBO,KAAKiJ,OAAOmgB,gBAAgBppB,KAAKiJ,OAAOwE,EAAEY,UAE1CrO,KAAKiJ,OAAOkgB,cACZnpB,KAAKiJ,OAAOU,MAAoC,IAA5B3J,KAAKiJ,OAAOkgB,aAAqBnpB,KAAKiJ,OAAOpI,EAAE8J,gBAIhEue,GACP9H,GAQFlB,IAAgB4I,MAAQ,SAAUQ,GAChC,MAAuC,gBAAzBA,GACZC,GAAgBvpB,KAAMspB,GACtB,GAAIP,IAAgB/oB,KAAMspB,GAQ9B,IAAIC,IAAkBxZ,GAAW+Y,MAAQ,WACvC,GAAIngB,GAAyB/I,EAAdgX,KAAiBpX,EAAMS,UAAUR,MAChD,IAAKQ,UAAU,GAGR,GAAI2I,GAAY3I,UAAU,IAE/B,IADA0I,EAAY1I,UAAU,GAClBL,EAAI,EAAOJ,EAAJI,EAASA,IAAOgX,EAAQlV,KAAKzB,UAAUL,QAGlD,KADA+I,EAAYmS,GACRlb,EAAI,EAAOJ,EAAJI,EAASA,IAAOgX,EAAQlV,KAAKzB,UAAUL,QANlD,KADA+I,EAAYmS,GACRlb,EAAI,EAAOJ,EAAJI,EAASA,IAAOgX,EAAQlV,KAAKzB,UAAUL,GAWpD,OAHID,OAAM+F,QAAQkR,EAAQ,MACxBA,EAAUA,EAAQ,IAEblO,EAAaC,EAAWiO,GAAS4S,YAGtCC,GAAiB7W,GAAG6W,eAAiB,SAASC,GAChD1pB,KAAK2pB,YAAcD,EACnB1pB,KAAKwE,QAAU,uDACfpC,MAAMsB,KAAK1D,MAEbypB,IAAete,UAAY9L,OAAOwU,OAAOzR,MAAM+I,WAC/Cse,GAAete,UAAU5G,KAAO,gBAEhC,IAAIqlB,IAA6B,SAAS/O,GAExC,QAAS+O,GAA0B9oB,GACjCd,KAAKc,OAASA,EACd+Z,EAAUnX,KAAK1D,MAcjB,MAjBAuW,IAASqT,EAA2B/O,GAMpC+O,EAA0Bze,UAAU+X,cAAgB,SAAUriB,GAC5D,GAAIuZ,GAAQ,GAAIrO,IACd8d,EAAI,GAAI7b,IACRhH,GAAUqa,WAAW,EAAOqI,UAAY7oB,EAAGA,EAK7C,OAHAuZ,GAAMnO,IAAI4d,GACVA,EAAE5b,cAAcjO,KAAKc,OAAOyI,UAAU,GAAIugB,IAAwB1P,EAAOpT,KAElEoT,GAGFwP,GACP/G,IAEEiH,GAA2B,SAASjP,GAEtC,QAASiP,GAAwB1P,EAAOpT,GACtChH,KAAK+pB,OAAS3P,EACdpa,KAAKgc,OAAShV,EACd6T,EAAUnX,KAAK1D,MAGjB,QAASgqB,GAAcnpB,EAAG6oB,GACF,IAAlBA,EAAOjqB,OACToB,EAAE8J,cACyB,IAAlB+e,EAAOjqB,OAChBoB,EAAE4J,QAAQif,EAAO,IAEjB7oB,EAAE4J,QAAQ,GAAIgf,IAAeC,IAyBjC,QAASrG,GAAc4G,EAAO7P,EAAOpT,GACnChH,KAAKkqB,OAASD,EACdjqB,KAAK+pB,OAAS3P,EACdpa,KAAKgc,OAAShV,EACd6T,EAAUnX,KAAK1D,MAcjB,MAxDAuW,IAASuT,EAAyBjP,GAiBlCiP,EAAwB3e,UAAUzB,KAAO,SAAUG,GACjD,GAAIogB,GAAQ,GAAIjc,GAChBhO,MAAK+pB,OAAO9d,IAAIge,GAGhBza,GAAU3F,KAAOA,EAAI4F,GAAsB5F,IAC3CogB,EAAMhc,cAAcpE,EAAEN,UAAU,GAAI8Z,GAAc4G,EAAOjqB,KAAK+pB,OAAQ/pB,KAAKgc,WAG7E8N,EAAwB3e,UAAU7K,MAAQ,SAAUJ,GAClDF,KAAKgc,OAAO0N,OAAOhoB,KAAKxB,GACxBF,KAAKgc,OAAOqF,WAAY,EACD,IAAvBrhB,KAAK+pB,OAAOtqB,QAAgBuqB,EAAchqB,KAAKgc,OAAOnb,EAAGb,KAAKgc,OAAO0N,SAGvEI,EAAwB3e,UAAUmW,UAAY,WAC5CthB,KAAKgc,OAAOqF,WAAY,EACD,IAAvBrhB,KAAK+pB,OAAOtqB,QAAgBuqB,EAAchqB,KAAKgc,OAAOnb,EAAGb,KAAKgc,OAAO0N,SAGvEnT,GAAS8M,EAAexI,GAQxBwI,EAAclY,UAAUzB,KAAO,SAAUG,GAAK7J,KAAKgc,OAAOnb,EAAE6J,OAAOb,IACnEwZ,EAAclY,UAAU7K,MAAQ,SAAUJ,GACxCF,KAAKgc,OAAO0N,OAAOhoB,KAAKxB,GACxBF,KAAK+pB,OAAO9a,OAAOjP,KAAKkqB,QACxBlqB,KAAKgc,OAAOqF,WAAoC,IAAvBrhB,KAAK+pB,OAAOtqB,QAAgBuqB,EAAchqB,KAAKgc,OAAOnb,EAAGb,KAAKgc,OAAO0N,SAEhGrG,EAAclY,UAAUmW,UAAY,WAClCthB,KAAK+pB,OAAO9a,OAAOjP,KAAKkqB,QACxBlqB,KAAKgc,OAAOqF,WAAoC,IAAvBrhB,KAAK+pB,OAAOtqB,QAAgBuqB,EAAchqB,KAAKgc,OAAOnb,EAAGb,KAAKgc,OAAO0N,SAGzFI,GACP1I,GAaFrR,IAAWoa,gBAAkB,WAC3B,GAAI/gB,EACJ,IAAIzJ,MAAM+F,QAAQzF,UAAU,IAC1BmJ,EAAOnJ,UAAU,OACZ,CACL,GAAIT,GAAMS,UAAUR,MACpB2J,GAAO,GAAIzJ,OAAMH,EACjB,KAAI,GAAII,GAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,GAErD,GAAIkB,GAAS4H,EAAa,KAAMU,EAChC,OAAO,IAAIwgB,IAA0B9oB,GAGvC,IAAIspB,IAAsB,SAAUvP,GAGlC,QAASuP,GAAmBtpB,GAC1Bd,KAAKc,OAASA,EACd+Z,EAAUnX,KAAK1D,MAUjB,MAdAuW,IAAS6T,EAAoBvP,GAO7BuP,EAAmBjf,UAAU+X,cAAgB,SAAUriB,GACrD,GAAIooB,GAAI,GAAIld,IAAuB8d,EAAI,GAAI7b,GAG3C,OAFAib,GAAEhd,IAAI4d,GACNA,EAAE5b,cAAcjO,KAAKc,OAAOyI,UAAU,GAAI8gB,IAAiBxpB,EAAGooB,KACvDA,GAGFmB,GACPvH,IAEEwH,GAAoB,SAAUxP,GAChC,QAASwP,GAAiBxpB,EAAGooB,GAC3BjpB,KAAKa,EAAIA,EACTb,KAAKipB,EAAIA,EACTjpB,KAAK2J,MAAO,EACZkR,EAAUnX,KAAK1D,MAqBjB,QAASqjB,GAAcpa,EAAQmf,GAC7BpoB,KAAKiJ,OAASA,EACdjJ,KAAKooB,IAAMA,EACXvN,EAAUnX,KAAK1D,MAgBjB,MArCAuW,IAAS8T,EAAkBxP,GAE3BwP,EAAiBlf,UAAUzB,KAAO,SAAS2f,GACzC,GAAIjB,GAAM,GAAIpa,GACdhO,MAAKipB,EAAEhd,IAAImc,GACX5Y,GAAU6Z,KAAiBA,EAAc5Z,GAAsB4Z,IAC/DjB,EAAIna,cAAcob,EAAY9f,UAAU,GAAI8Z,GAAcrjB,KAAMooB,MAGlEiC,EAAiBlf,UAAU7K,MAAQ,SAAUJ,GAC3CF,KAAKa,EAAE4J,QAAQvK,IAGjBmqB,EAAiBlf,UAAUmW,UAAY,WACrCthB,KAAK2J,MAAO,EACM,IAAlB3J,KAAKipB,EAAExpB,QAAgBO,KAAKa,EAAE8J,eAShC4L,GAAS8M,EAAexI,GAExBwI,EAAclY,UAAUzB,KAAO,SAAUG,GACvC7J,KAAKiJ,OAAOpI,EAAE6J,OAAOb,IAEvBwZ,EAAclY,UAAU7K,MAAQ,SAAUJ,GACxCF,KAAKiJ,OAAOpI,EAAE4J,QAAQvK,IAExBmjB,EAAclY,UAAUmW,UAAY,WAClCthB,KAAKiJ,OAAOggB,EAAEha,OAAOjP,KAAKooB,KAC1BpoB,KAAKiJ,OAAOU,MAAiC,IAAzB3J,KAAKiJ,OAAOggB,EAAExpB,QAAgBO,KAAKiJ,OAAOpI,EAAE8J,eAG3D0f,GACPjJ,GAMFlB,IAAgBsJ,SAAW,WACzB,MAAO,IAAIY,IAAmBpqB,MAGhC,IAAIsqB,IAAuB,SAASzP,GAGlC,QAASyP,GAAoBxpB,EAAQ+B,GACnC7C,KAAKiH,GAAKnG,EACVd,KAAK2mB,GAAKnX,GAAU3M,GAAS4M,GAAsB5M,GAASA,EAC5D7C,KAAKuqB,OAAQ,EACb1P,EAAUnX,KAAK1D,MAejB,MArBAuW,IAAS+T,EAAqBzP,GAS9ByP,EAAoBnf,UAAU+X,cAAgB,SAASriB,GACrD,GAAI2pB,GAAmB,GAAIxc,GAC3Bwc,GAAiBvc,cAAcjO,KAAKiH,GAAGsC,UAAU,GAAIkhB,IAAwB5pB,EAAGb,QAEhFwP,GAAUxP,KAAK2mB,MAAQ3mB,KAAK2mB,GAAKlX,GAAsBzP,KAAK2mB,IAE5D,IAAI+D,GAAoB,GAAI1c,GAG5B,OAFA0c,GAAkBzc,cAAcjO,KAAK2mB,GAAGpd,UAAU,GAAIohB,IAAuB9pB,EAAGb,KAAM0qB,KAE/E,GAAIlc,IAAiBgc,EAAkBE,IAGzCJ,GACPzH,IAEE4H,GAA2B,SAAS5P,GAEtC,QAAS4P,GAAwB5pB,EAAGkJ,GAClC/J,KAAK2mB,GAAK9lB,EACVb,KAAK4qB,GAAK7gB,EACV8Q,EAAUnX,KAAK1D,MAejB,MAnBAuW,IAASkU,EAAyB5P,GAOlC4P,EAAwBtf,UAAUzB,KAAO,SAAUG,GACjD7J,KAAK4qB,GAAGL,OAASvqB,KAAK2mB,GAAGjc,OAAOb,IAGlC4gB,EAAwBtf,UAAU7K,MAAQ,SAAUwK,GAClD9K,KAAK2mB,GAAGlc,QAAQK,IAGlB2f,EAAwBtf,UAAUR,YAAc,WAC9C3K,KAAK4qB,GAAGL,OAASvqB,KAAK2mB,GAAGhc,eAGpB8f,GACPrJ,IAEEuJ,GAA0B,SAAS9P,GAErC,QAAS8P,GAAuB9pB,EAAGkJ,EAAGkN,GACpCjX,KAAK2mB,GAAK9lB,EACVb,KAAK4qB,GAAK7gB,EACV/J,KAAK6qB,GAAK5T,EACV4D,EAAUnX,KAAK1D,MAgBjB,MArBAuW,IAASoU,EAAwB9P,GAQjC8P,EAAuBxf,UAAUzB,KAAO,WACtC1J,KAAK4qB,GAAGL,OAAQ,EAChBvqB,KAAK6qB,GAAG1b,WAGVwb,EAAuBxf,UAAU7K,MAAQ,SAAUwK,GACjD9K,KAAK2mB,GAAGlc,QAAQK,IAGlB6f,EAAuBxf,UAAUR,YAAc,WAC7C3K,KAAK6qB,GAAG1b,WAGHwb,GACPvJ,GAOFlB,IAAgB4K,UAAY,SAAUjoB,GACpC,MAAO,IAAIynB,IAAoBtqB,KAAM6C,GAGvC,IAAIkoB,IAAoB,SAASlQ,GAE/B,QAASkQ,GAAiBjqB,GACxBd,KAAKc,OAASA,EACd+Z,EAAUnX,KAAK1D,MASjB,QAASgrB,GAAenqB,EAAGopB,GACzBjqB,KAAKa,EAAIA,EACTb,KAAKiqB,MAAQA,EACbjqB,KAAKirB,SAAU,EACfjrB,KAAKkrB,OAAS,EACdlrB,KAAKmrB,WAAY,EACjB/J,GAAiB1d,KAAK1D,MAqBxB,QAASqjB,GAAcpa,EAAQnC,GAC7B9G,KAAKiJ,OAASA,EACdjJ,KAAK8G,GAAKA,EACVsa,GAAiB1d,KAAK1D,MAiBxB,MA3DAuW,IAASwU,EAAkBlQ,GAM3BkQ,EAAiB5f,UAAU+X,cAAgB,SAAUriB,GACnD,GAAIopB,GAAQ,GAAI1c,IAAoBnG,EAAIpH,KAAKc,OAAOyI,UAAU,GAAIyhB,GAAenqB,EAAGopB,GACpF,OAAO,IAAIzb,IAAiBpH,EAAG6iB,IAGjC1T,GAASyU,EAAgB5J,IAUzB4J,EAAe7f,UAAUzB,KAAO,SAAU2f,GACxC,GAAI5c,GAAI,GAAIuB,IAA8BlH,IAAO9G,KAAKkrB,MACtDlrB,MAAKmrB,WAAY,EACjBnrB,KAAKiqB,MAAMhc,cAAcxB,GACzB+C,GAAU6Z,KAAiBA,EAAc5Z,GAAsB4Z,IAC/D5c,EAAEwB,cAAcob,EAAY9f,UAAU,GAAI8Z,GAAcrjB,KAAM8G,MAGhEkkB,EAAe7f,UAAU7K,MAAQ,SAAUJ,GACzCF,KAAKa,EAAE4J,QAAQvK,IAGjB8qB,EAAe7f,UAAUmW,UAAY,WACnCthB,KAAKirB,SAAU,GACdjrB,KAAKmrB,WAAanrB,KAAKa,EAAE8J,eAG5B4L,GAAS8M,EAAejC,IAMxBiC,EAAclY,UAAUzB,KAAO,SAAUG,GACvC7J,KAAKiJ,OAAOiiB,SAAWlrB,KAAK8G,IAAM9G,KAAKiJ,OAAOpI,EAAE6J,OAAOb,IAGzDwZ,EAAclY,UAAU7K,MAAQ,SAAUJ,GACxCF,KAAKiJ,OAAOiiB,SAAWlrB,KAAK8G,IAAM9G,KAAKiJ,OAAOpI,EAAE4J,QAAQvK,IAG1DmjB,EAAclY,UAAUmW,UAAY,WAC9BthB,KAAKiJ,OAAOiiB,SAAWlrB,KAAK8G,KAC9B9G,KAAKiJ,OAAOkiB,WAAY,EACxBnrB,KAAKiJ,OAAOgiB,SAAWjrB,KAAKiJ,OAAOpI,EAAE8J,gBAIlCogB,GACPlI,GAMF3C,IAAgB,UAAYA,GAAgBkL,aAAe,WACzD,MAAO,IAAIL,IAAiB/qB,MAG9B,IAAIqrB,IAAuB,SAASxQ,GAGlC,QAASwQ,GAAoBvqB,EAAQ+B,GACnC7C,KAAKc,OAASA,EACdd,KAAK6C,MAAQ2M,GAAU3M,GAAS4M,GAAsB5M,GAASA,EAC/DgY,EAAUnX,KAAK1D,MAUjB,MAfAuW,IAAS8U,EAAqBxQ,GAQ9BwQ,EAAoBlgB,UAAU+X,cAAgB,SAASriB,GACrD,MAAO,IAAI2N,IACTxO,KAAKc,OAAOyI,UAAU1I,GACtBb,KAAK6C,MAAM0G,UAAU,GAAI+hB,IAAkBzqB,MAIxCwqB,GACPxI,IAEEyI,GAAqB,SAASzQ,GAEhC,QAASyQ,GAAkBzqB,GACzBb,KAAK2mB,GAAK9lB,EACVga,EAAUnX,KAAK1D,MAajB,MAhBAuW,IAAS+U,EAAmBzQ,GAM5ByQ,EAAkBngB,UAAUzB,KAAO,WACjC1J,KAAK2mB,GAAGhc,eAGV2gB,EAAkBngB,UAAU7K,MAAQ,SAAUwK,GAC5C9K,KAAK2mB,GAAGlc,QAAQK,IAGlBwgB,EAAkBngB,UAAUR,YAAcsI,GAEnCqY,GACPlK,GAOFlB,IAAgBqL,UAAY,SAAU1oB,GACpC,MAAO,IAAIwoB,IAAoBrrB,KAAM6C,GAUvC,IAAI2oB,IAA4B,SAAS3Q,GAEvC,QAAS2Q,GAAyB1qB,EAAQ8V,EAAS3F,GACjDjR,KAAKiH,GAAKnG,EACVd,KAAKyrB,IAAM7U,EACX5W,KAAKkoB,IAAMjX,EACX4J,EAAUnX,KAAK1D,MA0BjB,MA/BAuW,IAASiV,EAA0B3Q,GAQnC2Q,EAAyBrgB,UAAU+X,cAAgB,SAAUriB,GAS3D,IAAK,GARDrB,GAAMQ,KAAKyrB,IAAIhsB,OACfuH,GACFsI,SAAU5I,EAAgBlH,EAAK0J,GAC/BiI,aAAa,EACbD,OAAQ,GAAIvR,OAAMH,IAGhB8L,EAAItL,KAAKyrB,IAAIhsB,OAAQ0oB,EAAgB,GAAIxoB,OAAM2L,EAAI,GAC9C1L,EAAI,EAAO0L,EAAJ1L,EAAOA,IAAK,CAC1B,GAAIiD,GAAQ7C,KAAKyrB,IAAI7rB,GAAIwoB,EAAM,GAAIpa,GACnCwB,IAAU3M,KAAWA,EAAQ4M,GAAsB5M,IACnDulB,EAAIna,cAAcpL,EAAM0G,UAAU,GAAImiB,IAA4B7qB,EAAGjB,EAAGoH,KACxEmhB,EAAcvoB,GAAKwoB,EAGrB,GAAIuD,GAAW,GAAI3d,GAInB,OAHA2d,GAAS1d,cAAcjO,KAAKiH,GAAGsC,UAAU,GAAIqiB,IAA6B/qB,EAAGb,KAAKkoB,IAAKlhB,KACvFmhB,EAAc7c,GAAKqgB,EAEZ,GAAIlT,IAAe0P,IAGrBqD,GACP3I,IAEE6I,GAA+B,SAAU7Q,GAE3C,QAAS6Q,GAA4B7qB,EAAGjB,EAAGoH,GACzChH,KAAK2mB,GAAK9lB,EACVb,KAAKuH,GAAK3H,EACVI,KAAKgc,OAAShV,EACd6T,EAAUnX,KAAK1D,MAejB,MApBAuW,IAASmV,EAA6B7Q,GAQtC6Q,EAA4BvgB,UAAUzB,KAAO,SAAUG,GACrD7J,KAAKgc,OAAO9K,OAAOlR,KAAKuH,IAAMsC,EAC9B7J,KAAKgc,OAAO1M,SAAStP,KAAKuH,KAAM,EAChCvH,KAAKgc,OAAO7K,YAAcnR,KAAKgc,OAAO1M,SAAS8B,MAAMC,KAGvDqa,EAA4BvgB,UAAU7K,MAAQ,SAAUJ,GACtDF,KAAK2mB,GAAGlc,QAAQvK,IAGlBwrB,EAA4BvgB,UAAUmW,UAAYrO,GAE3CyY,GACPtK,IAEEwK,GAAgC,SAAU/Q,GAE5C,QAAS+Q,GAA6B/qB,EAAGmnB,EAAIhhB,GAC3ChH,KAAK2mB,GAAK9lB,EACVb,KAAKkoB,IAAMF,EACXhoB,KAAKgc,OAAShV,EACd6T,EAAUnX,KAAK1D,MAmBjB,MAxBAuW,IAASqV,EAA8B/Q,GAQvC+Q,EAA6BzgB,UAAUzB,KAAO,SAAUG,GACtD,GAAIgiB,IAAahiB,GAAGka,OAAO/jB,KAAKgc,OAAO9K,OACvC,IAAKlR,KAAKgc,OAAO7K,YAAjB,CACA,GAAIT,GAAMlG,GAASxK,KAAKkoB,KAAKnoB,MAAM,KAAM8rB,EACzC,OAAInb,KAAQvQ,GAAmBH,KAAK2mB,GAAGlc,QAAQiG,EAAIxQ,OACnDF,MAAK2mB,GAAGjc,OAAOgG,KAGjBkb,EAA6BzgB,UAAU7K,MAAQ,SAAUJ,GACvDF,KAAK2mB,GAAGlc,QAAQvK,IAGlB0rB,EAA6BzgB,UAAUmW,UAAY,WACjDthB,KAAK2mB,GAAGhc,eAGHihB,GACPxK,GAMFlB,IAAgB4L,eAAiB,WAC/B,GAAyB,IAArB7rB,UAAUR,OAAgB,KAAM,IAAI2C,OAAM,oBAG9C,KAAI,GADA5C,GAAMS,UAAUR,OAAQ2J,EAAO,GAAIzJ,OAAMH,GACrCI,EAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,EACnD,IAAIqR,GAAiB1G,GAAWnB,EAAK5J,EAAM,IAAM4J,EAAK7C,MAAQ4C,CAG9D,OAFAxJ,OAAM+F,QAAQ0D,EAAK,MAAQA,EAAOA,EAAK,IAEhC,GAAIoiB,IAAyBxrB,KAAMoJ,EAAM6H,GAMlD,IAAI8a,IAAiB,SAASlR,GAE5B,QAASkR,GAAcnV,EAAS3F,GAC9BjR,KAAKiH,GAAK2P,EACV5W,KAAKkoB,IAAMjX,EACX4J,EAAUnX,KAAK1D,MAmBjB,MAvBAuW,IAASwV,EAAelR,GAOxBkR,EAAc5gB,UAAU+X,cAAgB,SAASla,GAM/C,IAAK,GALDsC,GAAItL,KAAKiH,GAAGxH,OACZ0oB,EAAgB,GAAIxoB,OAAM2L,GAC1B3B,EAAOjD,EAAgB4E,EAAGpC,GAC1BuE,EAAI/G,EAAgB4E,EAAGjC,GAElBzJ,EAAI,EAAO0L,EAAJ1L,EAAOA,IAAK,CAC1B,GAAIkB,GAASd,KAAKiH,GAAGrH,GAAIwoB,EAAM,GAAIpa,GACnCma,GAAcvoB,GAAKwoB,EACnB5Y,GAAU1O,KAAYA,EAAS2O,GAAsB3O,IACrDsnB,EAAIna,cAAcnN,EAAOyI,UAAU,GAAIyiB,IAAYhjB,EAAUpJ,EAAGI,KAAMyN,EAAG9D,KAG3E,MAAO,IAAI8O,IAAe0P,IAGrB4D,GACPlJ,IAEEmJ,GAAe,SAAUnR,GAE3B,QAASmR,GAAYnrB,EAAGjB,EAAGmK,EAAG0D,EAAGhB,GAC/BzM,KAAK2mB,GAAK9lB,EACVb,KAAKuH,GAAK3H,EACVI,KAAK4qB,GAAK7gB,EACV/J,KAAKisB,GAAKxe,EACVzN,KAAKksB,GAAKzf,EACVoO,EAAUnX,KAAK1D,MAGjB,QAASmsB,GAAStiB,GAAK,MAAOA,GAAEpK,OAAS,EACzC,QAAS2sB,GAAUviB,GAAK,MAAOA,GAAEwE,QACjC,QAASia,GAAW1oB,GAClB,MAAO,UAAUiK,EAAG0e,GAClB,MAAOA,KAAM3oB,GAyBjB,MAvCA2W,IAASyV,EAAanR,GAkBtBmR,EAAY7gB,UAAUzB,KAAO,SAAUG,GAErC,GADA7J,KAAKisB,GAAGjsB,KAAKuH,IAAI7F,KAAKmI,GAClB7J,KAAKisB,GAAG7a,MAAM+a,GAAW,CAC3B,GAAIE,GAAersB,KAAKisB,GAAG1I,IAAI6I,GAC3B1b,EAAMlG,GAASxK,KAAK4qB,GAAG1C,KAAKnoB,MAAM,KAAMssB,EAC5C,IAAI3b,IAAQvQ,GAAY,MAAOH,MAAK2mB,GAAGlc,QAAQiG,EAAIxQ,EACnDF,MAAK2mB,GAAGjc,OAAOgG,OACN1Q,MAAKksB,GAAG1D,OAAOF,EAAWtoB,KAAKuH,KAAK6J,MAAMC,KACnDrR,KAAK2mB,GAAGhc,eAIZqhB,EAAY7gB,UAAU7K,MAAQ,SAAUJ,GACtCF,KAAK2mB,GAAGlc,QAAQvK,IAGlB8rB,EAAY7gB,UAAUmW,UAAY,WAChCthB,KAAKksB,GAAGlsB,KAAKuH,KAAM,EACnBvH,KAAKksB,GAAG9a,MAAMC,KAAarR,KAAK2mB,GAAGhc,eAG9BqhB,GACP5K,GAOFlB,IAAgBoM,IAAM,WACpB,GAAyB,IAArBrsB,UAAUR,OAAgB,KAAM,IAAI2C,OAAM,oBAG9C,KAAI,GADA5C,GAAMS,UAAUR,OAAQ2J,EAAO,GAAIzJ,OAAMH,GACrCI,EAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,EACnD,IAAIqR,GAAiB1G,GAAWnB,EAAK5J,EAAM,IAAM4J,EAAK7C,MAAQ4C,CAC9DxJ,OAAM+F,QAAQ0D,EAAK,MAAQA,EAAOA,EAAK,GAEvC,IAAIH,GAASjJ,IAGb,OAFAoJ,GAAKrI,QAAQkI,GAEN,GAAI8iB,IAAc3iB,EAAM6H,IASjClB,GAAWuc,IAAM,WAEf,IAAI,GADA9sB,GAAMS,UAAUR,OAAQ2J,EAAO,GAAIzJ,OAAMH,GACrCI,EAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,EAC/CD,OAAM+F,QAAQ0D,EAAK,MACrBA,EAAOmB,GAAWnB,EAAK,IAAMA,EAAK,GAAG2a,OAAO3a,EAAK,IAAMA,EAAK,GAE9D,IAAI+O,GAAQ/O,EAAKiF,OACjB,OAAO8J,GAAMmU,IAAIvsB,MAAMoY,EAAO/O,GAWlC,IAAImjB,IAAyB,SAAS1R,GAEpC,QAAS0R,GAAsB3V,EAASoR,GACtChoB,KAAK4W,QAAUA,EACf5W,KAAKkoB,IAAMF,EACXnN,EAAUnX,KAAK1D,MA0BjB,MA9BAuW,IAASgW,EAAuB1R,GAOhC0R,EAAsBphB,UAAU+X,cAAgB,SAAUriB,GAUxD,IAAK,GATD+V,GAAU5W,KAAK4W,QAASpX,EAAMoX,EAAQnX,OAAQ0oB,EAAgB,GAAIxoB,OAAMH,GAExEwH,GACFyG,EAAG/G,EAAgBlH,EAAK6J,GACxBM,KAAMjD,EAAgBlH,EAAK0J,GAC3B8e,GAAIhoB,KAAKkoB,IACTrnB,EAAGA,GAGIjB,EAAI,EAAOJ,EAAJI,EAASA,KACtB,SAAUA,GACT,GAAIkB,GAAS8V,EAAQhX,GAAIwoB,EAAM,GAAIpa,KAClCyG,GAAY3T,IAAW0T,GAAW1T,MAAaA,EAASklB,GAAellB,IAExEqnB,EAAcvoB,GAAKwoB,EACnBA,EAAIna,cAAcnN,EAAOyI,UAAU,GAAIijB,IAAoBxlB,EAAOpH,MAClEA,EAGJ,OAAO,IAAI6Y,IAAe0P,IAGrBoE,GACP1J,IAEE2J,GAAuB,SAAU3R,GAEnC,QAAS2R,GAAoBplB,EAAGxH,GAC9BI,KAAKiH,GAAKG,EACVpH,KAAKuH,GAAK3H,EACVib,EAAUnX,KAAK1D,MAGjB,QAASmsB,GAAStiB,GAAK,MAAOA,GAAEpK,OAAS,EACzC,QAAS2sB,GAAUviB,GAAK,MAAOA,GAAEwE,QACjC,QAASia,GAAW1oB,GAClB,MAAO,UAAUiK,EAAG0e,GAClB,MAAOA,KAAM3oB,GAuBjB,MAlCA2W,IAASiW,EAAqB3R,GAe9B2R,EAAoBrhB,UAAUzB,KAAO,SAAUG,GAE7C,GADA7J,KAAKiH,GAAGwG,EAAEzN,KAAKuH,IAAI7F,KAAKmI,GACpB7J,KAAKiH,GAAGwG,EAAE2D,MAAM+a,GAAW,CAC7B,GAAIE,GAAersB,KAAKiH,GAAGwG,EAAE8V,IAAI6I,GAC7B1b,EAAMlG,GAASxK,KAAKiH,GAAG+gB,IAAIjoB,MAAM,KAAMssB,EAC3C,IAAI3b,IAAQvQ,GAAY,MAAOH,MAAKiH,GAAGpG,EAAE4J,QAAQiG,EAAIxQ,EACrDF,MAAKiH,GAAGpG,EAAE6J,OAAOgG,OACR1Q,MAAKiH,GAAG0C,KAAK6e,OAAOF,EAAWtoB,KAAKuH,KAAK6J,MAAMC,KACxDrR,KAAKiH,GAAGpG,EAAE8J,eAId6hB,EAAoBrhB,UAAU7K,MAAQ,SAAUJ,GAAKF,KAAKiH,GAAGpG,EAAE4J,QAAQvK,IAEvEssB,EAAoBrhB,UAAUmW,UAAY,WACxCthB,KAAKiH,GAAG0C,KAAK3J,KAAKuH,KAAM,EACxBvH,KAAKiH,GAAG0C,KAAKyH,MAAMC,KAAarR,KAAKiH,GAAGpG,EAAE8J,eAGrC6hB,GACPpL,GAOFlB,IAAgBuM,YAAc,WAC5B,GAAyB,IAArBxsB,UAAUR,OAAgB,KAAM,IAAI2C,OAAM,oBAG9C,KAAI,GADA5C,GAAMS,UAAUR,OAAQ2J,EAAO,GAAIzJ,OAAMH,GACrCI,EAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,EACnD,IAAIqR,GAAiB1G,GAAWnB,EAAK5J,EAAM,IAAM4J,EAAK7C,MAAQ4C,EAE1DF,EAASjJ,IAEb,OADAoJ,GAAKrI,QAAQkI,GACN,GAAIsjB,IAAsBnjB,EAAM6H,IAWvCiP,GAAgB5W,aAAe,WAC7B,MAAO,IAAIkD,IAAoBlD,EAAatJ,MAAOA,MAGrD,IAAI0sB,IAA2B,SAAU7R,GAEvC,QAAS6R,GAAwB5rB,GAC/Bd,KAAKc,OAASA,EACd+Z,EAAUnX,KAAK1D,MAOjB,MAVAuW,IAASmW,EAAyB7R,GAMlC6R,EAAwBvhB,UAAU+X,cAAgB,SAAUriB,GAC1D,MAAOb,MAAKc,OAAOyI,UAAU,GAAIojB,IAAsB9rB,KAGlD6rB,GACP7J,IAEE8J,GAAyB,SAAU9R,GAGrC,QAAS8R,GAAsB9rB,GAC7Bb,KAAK2mB,GAAK9lB,EACVga,EAAUnX,KAAK1D,MAOjB,MAXAuW,IAASoW,EAAuB9R,GAOhC8R,EAAsBxhB,UAAUzB,KAAO,SAAUG,GAAKA,EAAEyE,OAAOtO,KAAK2mB,KACpEgG,EAAsBxhB,UAAU7K,MAAQ,SAAUJ,GAAKF,KAAK2mB,GAAGlc,QAAQvK,IACvEysB,EAAsBxhB,UAAUmW,UAAY,WAActhB,KAAK2mB,GAAGhc,eAE3DgiB,GACPvL,GAMFlB,IAAgB0M,cAAgB,WAC9B,MAAO,IAAIF,IAAwB1sB,MAGrC,IAAI6sB,IAAkC,SAAShS,GAE7C,QAASgS,GAA+B/rB,EAAQgsB,EAAO7T,GACrDjZ,KAAKc,OAASA,EACdd,KAAK8sB,MAAQA,EACb9sB,KAAKiZ,SAAWA,EAChB4B,EAAUnX,KAAK1D,MAOjB,MAZAuW,IAASsW,EAAgChS,GAQzCgS,EAA+B1hB,UAAU+X,cAAgB,SAAUriB,GACjE,MAAOb,MAAKc,OAAOyI,UAAU,GAAIwjB,IAA6BlsB,EAAGb,KAAK8sB,MAAO9sB,KAAKiZ,YAG7E4T,GACPhK,IAEEkK,GAAgC,SAASlS,GAE3C,QAASkS,GAA6BlsB,EAAGisB,EAAO7T,GAC9CjZ,KAAKa,EAAIA,EACTb,KAAK8sB,MAAQA,EACb9sB,KAAKiZ,SAAWA,EAChBjZ,KAAKgtB,eAAgB,EACrBhtB,KAAKitB,WAAa,KAClBpS,EAAUnX,KAAK1D,MA0BjB,MAjCAuW,IAASwW,EAA8BlS,GAUvCkS,EAA6B5hB,UAAUzB,KAAO,SAAUG,GACtD,GAAaqjB,GAAT3pB,EAAMsG,CACV,OAAIU,IAAWvK,KAAK8sB,SAClBvpB,EAAMiH,GAASxK,KAAK8sB,OAAOjjB,GACvBtG,IAAQpD,IAAmBH,KAAKa,EAAE4J,QAAQlH,EAAIrD,GAEhDF,KAAKgtB,gBACPE,EAAiB1iB,GAASxK,KAAKiZ,UAAUjZ,KAAKitB,WAAY1pB,GACtD2pB,IAAmB/sB,IAAmBH,KAAKa,EAAE4J,QAAQyiB,EAAehtB,QAErEF,KAAKgtB,eAAkBE,IAC1BltB,KAAKgtB,eAAgB,EACrBhtB,KAAKitB,WAAa1pB,EAClBvD,KAAKa,EAAE6J,OAAOb,MAGlBkjB,EAA6B5hB,UAAU7K,MAAQ,SAASJ,GACtDF,KAAKa,EAAE4J,QAAQvK,IAEjB6sB,EAA6B5hB,UAAUmW,UAAY,WACjDthB,KAAKa,EAAE8J,eAGFoiB,GACP3L,GAQFlB,IAAgBiN,qBAAuB,SAAUL,EAAO7T,GAEtD,MADAA,KAAaA,EAAW9F,IACjB,GAAI0Z,IAA+B7sB,KAAM8sB,EAAO7T,GAGzD,IAAImU,IAAiB,SAASvS,GAE5B,QAASuS,GAActsB,EAAQwf,EAAkB7V,EAASE,GACxD3K,KAAKc,OAASA,EACdd,KAAKqtB,IAAM/M,EACXtgB,KAAKstB,IAAM7iB,EACXzK,KAAKutB,IAAM5iB,EACXkQ,EAAUnX,KAAK1D,MAQjB,QAASqjB,GAAcxiB,EAAGkJ,GACxB/J,KAAKa,EAAIA,EACTb,KAAKwtB,GAAKzjB,EAAEsjB,KAAO9iB,GAAWR,EAAEsjB,KAC9BnM,GAAenX,EAAEsjB,KAAOpa,GAAMlJ,EAAEujB,KAAOra,GAAMlJ,EAAEwjB,KAAOta,IACtDlJ,EAAEsjB,IACJrtB,KAAKqhB,WAAY,EACjBD,GAAiB1d,KAAK1D,MAkBxB,MAtCAuW,IAAS6W,EAAcvS,GASvBuS,EAAcjiB,UAAU+X,cAAgB,SAASriB,GAC/C,MAAOb,MAAKc,OAAOyI,UAAU,GAAI8Z,GAAcxiB,EAAGb,QAGpDuW,GAAS8M,EAAejC,IASxBiC,EAAclY,UAAUzB,KAAO,SAASG,GACtC,GAAI6G,GAAMlG,GAASxK,KAAKwtB,EAAE9iB,QAAQhH,KAAK1D,KAAKwtB,EAAG3jB,EAC3C6G,KAAQvQ,IAAYH,KAAKa,EAAE4J,QAAQiG,EAAIxQ,GAC3CF,KAAKa,EAAE6J,OAAOb,IAEhBwZ,EAAclY,UAAU7K,MAAQ,SAASwK,GACvC,GAAI4F,GAAMlG,GAASxK,KAAKwtB,EAAE/iB,SAAS/G,KAAK1D,KAAKwtB,EAAG1iB,EAChD,OAAI4F,KAAQvQ,GAAmBH,KAAKa,EAAE4J,QAAQiG,EAAIxQ,OAClDF,MAAKa,EAAE4J,QAAQK,IAEjBuY,EAAclY,UAAUmW,UAAY,WAClC,GAAI5Q,GAAMlG,GAASxK,KAAKwtB,EAAE7iB,aAAajH,KAAK1D,KAAKwtB,EACjD,OAAI9c,KAAQvQ,GAAmBH,KAAKa,EAAE4J,QAAQiG,EAAIxQ,OAClDF,MAAKa,EAAE8J,eAGFyiB,GACPvK,GAUF3C,IAAgB,MAAQA,GAAgBuN,IAAMvN,GAAgBwN,SAAW,SAAUpN,EAAkB7V,EAASE,GAC5G,MAAO,IAAIyiB,IAAcptB,KAAMsgB,EAAkB7V,EAASE,IAU5DuV,GAAgByN,SAAWzN,GAAgB0N,UAAY,SAAUljB,EAAQkK,GACvE,MAAO5U,MAAKytB,IAAuB,mBAAZ7Y,GAA0B,SAAU/K,GAAKa,EAAOhH,KAAKkR,EAAS/K,IAAQa,IAU/FwV,GAAgB2N,UAAY3N,GAAgB4N,WAAa,SAAUrjB,EAASmK,GAC1E,MAAO5U,MAAKytB,IAAIxa,GAAyB,mBAAZ2B,GAA0B,SAAU1U,GAAKuK,EAAQ/G,KAAKkR,EAAS1U,IAAQuK,IAUtGyV,GAAgB6N,cAAgB7N,GAAgB8N,eAAiB,SAAUrjB,EAAaiK,GACtF,MAAO5U,MAAKytB,IAAIxa,GAAM,KAAyB,mBAAZ2B,GAA0B,WAAcjK,EAAYjH,KAAKkR,IAAcjK,GAG5G,IAAIsjB,IAAqB,SAAUpT,GAEjC,QAASoT,GAAkBntB,EAAQmJ,EAAI2K,GACrC5U,KAAKc,OAASA,EACdd,KAAKyL,IAAMiJ,GAAazK,EAAI2K,EAAS,GACrCiG,EAAUnX,KAAK1D,MAajB,QAASkuB,GAAkB9mB,EAAG6C,GAC5BjK,KAAKkH,YAAa,EAClBlH,KAAKiH,GAAKG,EACVpH,KAAKyL,IAAMxB,EAUb,MA9BAsM,IAAS0X,EAAmBpT,GAO5BoT,EAAkB9iB,UAAU+X,cAAgB,SAAUriB,GACpD,GAAI4L,GAAIjC,GAASxK,KAAKc,OAAOyI,WAAW7F,KAAK1D,KAAKc,OAAQD,EAM1D,OALI4L,KAAMtM,KACRH,KAAKyL,MACLrL,EAAQqM,EAAEvM,IAGL,GAAIguB,GAAkBzhB,EAAGzM,KAAKyL,MAQvCyiB,EAAkB/iB,UAAUgE,QAAU,WACpC,IAAKnP,KAAKkH,WAAY,CACpB,GAAIwJ,GAAMlG,GAASxK,KAAKiH,GAAGkI,SAASzL,KAAK1D,KAAKiH,GAC9CjH,MAAKyL,MACLiF,IAAQvQ,IAAYC,EAAQsQ,EAAIxQ,KAI7B+tB,GAEPpL,GAOF3C,IAAgB,WAAa,SAAU1I,EAAQ5C,GAC7C,MAAO,IAAIqZ,IAAkBjuB,KAAMwX,EAAQ5C,GAG7C,IAAIuZ,IAA4B,SAAStT,GAGvC,QAASsT,GAAyBrtB,GAChCd,KAAKc,OAASA,EACd+Z,EAAUnX,KAAK1D,MAOjB,QAASqjB,GAAcxiB,GACrBb,KAAKa,EAAIA,EACTb,KAAKqhB,WAAY,EA0BnB,MAvCA9K,IAAS4X,EAA0BtT,GAOnCsT,EAAyBhjB,UAAU+X,cAAgB,SAAUriB,GAC3D,MAAOb,MAAKc,OAAOyI,UAAU,GAAI8Z,GAAcxiB,KAOjDwiB,EAAclY,UAAUT,OAASuI,GACjCoQ,EAAclY,UAAUV,QAAU,SAAUK,GACtC9K,KAAKqhB,YACPrhB,KAAKqhB,WAAY,EACjBrhB,KAAKa,EAAE4J,QAAQK,KAGnBuY,EAAclY,UAAUR,YAAc,WAChC3K,KAAKqhB,YACPrhB,KAAKqhB,WAAY,EACjBrhB,KAAKa,EAAE8J,gBAGX0Y,EAAclY,UAAUgE,QAAU,WAAanP,KAAKqhB,WAAY,GAChEgC,EAAclY,UAAUoW,KAAO,SAAUrhB,GACvC,MAAKF,MAAKqhB,WAMH,GALLrhB,KAAKqhB,WAAY,EACjBrhB,KAAKgJ,SAASyB,QAAQvK,IACf,IAMJiuB,GACPtL,GAMF3C,IAAgBkO,eAAiB,WAC/B,MAAO,IAAID,IAAyBnuB,MAGtC,IAAIquB,IAAyB,SAAUxT,GAErC,QAASwT,GAAsBvtB,EAAQmJ,GACrCjK,KAAKc,OAASA,EACd+Z,EAAUnX,KAAK1D,MAOjB,MAVAuW,IAAS8X,EAAuBxT,GAMhCwT,EAAsBljB,UAAU+X,cAAgB,SAAUriB,GACxD,MAAOb,MAAKc,OAAOyI,UAAU,GAAI+kB,IAAoBztB,KAGhDwtB,GACPxL,IAEEyL,GAAuB,SAAUzT,GAGnC,QAASyT,GAAoBztB,GAC3Bb,KAAK2mB,GAAK9lB,EACVga,EAAUnX,KAAK1D,MAOjB,MAXAuW,IAAS+X,EAAqBzT,GAO9ByT,EAAoBnjB,UAAUzB,KAAO,SAAUG,GAAK7J,KAAK2mB,GAAGjc,OAAOiW,GAAyB9W,KAC5FykB,EAAoBnjB,UAAU7K,MAAQ,SAAUJ,GAAKF,KAAK2mB,GAAGjc,OAAOmW,GAA0B3gB,IAAKF,KAAK2mB,GAAGhc,eAC3G2jB,EAAoBnjB,UAAUmW,UAAY,WAActhB,KAAK2mB,GAAGjc,OAAOqW,MAAkC/gB,KAAK2mB,GAAGhc,eAE1G2jB,GACPlN,GAMFlB,IAAgBvS,YAAc,WAC5B,MAAO,IAAI0gB,IAAsBruB,OAQnCkgB,GAAgB1W,OAAS,SAAUgb,GACjC,MAAOD,IAAiBvkB,KAAMwkB,GAAaT,UAa7C7D,GAAgBqO,MAAQ,SAAUC,GAChC,MAAOjK,IAAiBvkB,KAAMwuB,GAAYtK,aAe5C,IAAIuK,IAAuB,SAAS5T,GAClC,QAAS6T,GAAiB1nB,GACxB,OACEE,YAAY,EACZiI,QAAS,WACFnP,KAAKkH,aACRlH,KAAKkH,YAAa,EAClBF,EAAME,YAAa,KAM3B,QAASunB,GAAoB3tB,EAAQ6tB,GACnC3uB,KAAKc,OAASA,EACdd,KAAK4uB,UAAYD,EACjB9T,EAAUnX,KAAK1D,MAsDjB,MAnDAuW,IAASkY,EAAqB5T,GAE9B4T,EAAoBtjB,UAAU+X,cAAgB,SAAUriB,GACtD,GAQEojB,GARE4K,EAAa,GAAIC,IACnBH,EAAW,GAAIG,IACfC,EAAU/uB,KAAK4uB,UAAUC,GACzBG,EAAyBD,EAAQxlB,UAAUolB,GAEzCzuB,EAAIF,KAAKc,OAAO,gBAEhBkG,GAAUE,YAAY,GAExBkG,EAAe,GAAIG,IACjBD,EAAazE,GAAuB0R,kBAAkB,KAAM,SAAUrM,EAAG2N,GAC3E,IAAI7U,EAAME,WAAV,CACA,GAAI0c,GAAc1jB,EAAEwJ,MAEpB,IAAIka,EAAYja,KAMd,YALIsa,EACFpjB,EAAE4J,QAAQwZ,GAEVpjB,EAAE8J,cAMN,IAAIkZ,GAAeD,EAAYxkB,KAC/BoQ,IAAUqU,KAAkBA,EAAepU,GAAsBoU,GAEjE,IAAIoL,GAAQ,GAAIjhB,IACZic,EAAQ,GAAIjc,GAChBZ,GAAaa,cAAc,GAAIO,IAAiByb,EAAOgF,IACvDA,EAAMhhB,cAAc4V,EAAata,UAC/B,SAASM,GAAKhJ,EAAE6J,OAAOb,IACvB,SAAUqlB,GACRjF,EAAMhc,cAAc0gB,EAASplB,UAAUsS,EAAS,SAASsT,GACvDtuB,EAAE4J,QAAQ0kB,IACT,WACDtuB,EAAE8J,iBAGJkkB,EAAWnkB,OAAOwkB,GAClBD,EAAM9f,WAER,WAAatO,EAAE8J,mBAGnB,OAAO,IAAI8N,KAAgBuW,EAAwB5hB,EAAcE,EAAYohB,EAAiB1nB,MAGzFynB,GACP5L,GAEF3C,IAAgBkP,UAAY,SAAUT,GACpC,MAAO,IAAIF,IAAoBjlB,EAAOxJ,MAAO2uB,GAe/C,IAAIU,IAAwB,SAASxU,GACnC,QAAS6T,GAAiB1nB,GACxB,OACEE,YAAY,EACZiI,QAAS,WACFnP,KAAKkH,aACRlH,KAAKkH,YAAa,EAClBF,EAAME,YAAa,KAM3B,QAASmoB,GAAqBvuB,EAAQ6tB,GACpC3uB,KAAKc,OAASA,EACdd,KAAK4uB,UAAYD,EACjB9T,EAAUnX,KAAK1D,MAsDjB,MAnDAuW,IAAS8Y,EAAsBxU,GAE/BwU,EAAqBlkB,UAAU+X,cAAgB,SAAUriB,GACvD,GAQEojB,GAREqL,EAAc,GAAIR,IACpBH,EAAW,GAAIG,IACfC,EAAU/uB,KAAK4uB,UAAUU,GACzBN,EAAyBD,EAAQxlB,UAAUolB,GAEzCzuB,EAAIF,KAAKc,OAAO,gBAEhBkG,GAAUE,YAAY,GAExBkG,EAAe,GAAIG,IACjBD,EAAazE,GAAuB0R,kBAAkB,KAAM,SAAUrM,EAAG2N,GAC3E,IAAI7U,EAAME,WAAV,CACA,GAAI0c,GAAc1jB,EAAEwJ,MAEpB,IAAIka,EAAYja,KAMd,YALIsa,EACFpjB,EAAE4J,QAAQwZ,GAEVpjB,EAAE8J,cAMN,IAAIkZ,GAAeD,EAAYxkB,KAC/BoQ,IAAUqU,KAAkBA,EAAepU,GAAsBoU,GAEjE,IAAIoL,GAAQ,GAAIjhB,IACZic,EAAQ,GAAIjc,GAChBZ,GAAaa,cAAc,GAAIO,IAAiByb,EAAOgF,IACvDA,EAAMhhB,cAAc4V,EAAata,UAC/B,SAASM,GAAKhJ,EAAE6J,OAAOb,IACvB,SAAUqlB,GAAOruB,EAAE4J,QAAQykB,IAC3B,WACEjF,EAAMhc,cAAc0gB,EAASplB,UAAUsS,EAAS,SAASsT,GACvDtuB,EAAE4J,QAAQ0kB,IACT,WACDtuB,EAAE8J,iBAGJ2kB,EAAY5kB,OAAO,MACnBukB,EAAM9f,eAIZ,OAAO,IAAIsJ,KAAgBuW,EAAwB5hB,EAAcE,EAAYohB,EAAiB1nB,MAGzFqoB,GACPxM,GAEF3C,IAAgBqP,WAAa,SAAUZ,GACrC,MAAO,IAAIU,IAAqB7lB,EAAOxJ,MAAO2uB,GAGhD,IAAIa,IAAkB,SAAS3U,GAE7B,QAAS2U,GAAe1uB,EAAQ2uB,EAAaC,EAASC,GACpD3vB,KAAKc,OAASA,EACdd,KAAKyvB,YAAcA,EACnBzvB,KAAK0vB,QAAUA,EACf1vB,KAAK2vB,KAAOA,EACZ9U,EAAUnX,KAAK1D,MAOjB,MAbAuW,IAASiZ,EAAgB3U,GASzB2U,EAAerkB,UAAU+X,cAAgB,SAASriB,GAChD,MAAOb,MAAKc,OAAOyI,UAAU,GAAIqmB,IAAa/uB,EAAEb,QAG3CwvB,GACP3M,IAEE+M,GAAgB,SAAU/U,GAE5B,QAAS+U,GAAa/uB,EAAGoI,GACvBjJ,KAAK2mB,GAAK9lB,EACVb,KAAK4qB,GAAK3hB,EACVjJ,KAAKyL,IAAMxC,EAAOwmB,YAClBzvB,KAAK6vB,IAAM5mB,EAAOymB,QAClB1vB,KAAKiH,GAAKgC,EAAO0mB,KACjB3vB,KAAK8vB,KAAM,EACX9vB,KAAKyH,GAAK,KACVzH,KAAK+vB,KAAM,EACX/vB,KAAKuH,GAAK,EACVsT,EAAUnX,KAAK1D,MAyBjB,MApCAuW,IAASqZ,EAAc/U,GAcvB+U,EAAazkB,UAAUzB,KAAO,SAAUG,GAQtC,OAPC7J,KAAK+vB,MAAQ/vB,KAAK+vB,KAAM,GACrB/vB,KAAK8vB,IACP9vB,KAAKyH,GAAK+C,GAASxK,KAAKyL,KAAKzL,KAAKyH,GAAIoC,EAAG7J,KAAKuH,GAAIvH,KAAK4qB,KAEvD5qB,KAAKyH,GAAKzH,KAAK6vB,IAAMrlB,GAASxK,KAAKyL,KAAKzL,KAAKiH,GAAI4C,EAAG7J,KAAKuH,GAAIvH,KAAK4qB,IAAM/gB,EACxE7J,KAAK8vB,KAAM,GAET9vB,KAAKyH,KAAOtH,GAAmBH,KAAK2mB,GAAGlc,QAAQzK,KAAKyH,GAAGvH,IAC3DF,KAAK2mB,GAAGjc,OAAO1K,KAAKyH,QACpBzH,MAAKuH,OAGPqoB,EAAazkB,UAAU7K,MAAQ,SAAUJ,GACvCF,KAAK2mB,GAAGlc,QAAQvK,IAGlB0vB,EAAazkB,UAAUmW,UAAY,YAChCthB,KAAK+vB,KAAO/vB,KAAK6vB,KAAO7vB,KAAK2mB,GAAGjc,OAAO1K,KAAKiH,IAC7CjH,KAAK2mB,GAAGhc,eAGHilB,GACPxO,GASFlB,IAAgB8P,KAAO,WACrB,GAAqBL,GAAjBD,GAAU,EAAaD,EAAcxvB,UAAU,EAKnD,OAJyB,KAArBA,UAAUR,SACZiwB,GAAU,EACVC,EAAO1vB,UAAU,IAEZ,GAAIuvB,IAAexvB,KAAMyvB,EAAaC,EAASC,GAGxD,IAAIM,IAAsB,SAAUpV,GAElC,QAASoV,GAAmBnvB,EAAQwe,GAClCtf,KAAKc,OAASA,EACdd,KAAKkwB,GAAK5Q,EACVzE,EAAUnX,KAAK1D,MAOjB,MAXAuW,IAAS0Z,EAAoBpV,GAO7BoV,EAAmB9kB,UAAU+X,cAAgB,SAAUriB,GACrD,MAAOb,MAAKc,OAAOyI,UAAU,GAAI4mB,IAAiBtvB,EAAGb,KAAKkwB,MAGrDD,GACPpN,IAEEsN,GAAoB,SAAUtV,GAEhC,QAASsV,GAAiBtvB,EAAGye,GAC3Btf,KAAK2mB,GAAK9lB,EACVb,KAAKkwB,GAAK5Q,EACVtf,KAAKisB,MACLpR,EAAUnX,KAAK1D,MAgBjB,MArBAuW,IAAS4Z,EAAkBtV,GAQ3BsV,EAAiBhlB,UAAUzB,KAAO,SAAUG,GAC1C7J,KAAKisB,GAAGvqB,KAAKmI,GACb7J,KAAKisB,GAAGxsB,OAASO,KAAKkwB,IAAMlwB,KAAK2mB,GAAGjc,OAAO1K,KAAKisB,GAAG5d,UAGrD8hB,EAAiBhlB,UAAU7K,MAAQ,SAAUJ,GAC3CF,KAAK2mB,GAAGlc,QAAQvK,IAGlBiwB,EAAiBhlB,UAAUmW,UAAY,WACrCthB,KAAK2mB,GAAGhc,eAGHwlB,GACP/O,GAUFlB,IAAgBkQ,SAAW,SAAUzpB,GACnC,GAAY,EAARA,EAAa,KAAM,IAAIoN,GAC3B,OAAO,IAAIkc,IAAmBjwB,KAAM2G,IAWtCuZ,GAAgBmQ,UAAY,WAC1B,GAAY1nB,GAAWmG,EAAQ,CACzB7O,WAAUR,QAAUmJ,GAAY3I,UAAU,KAC9C0I,EAAY1I,UAAU,GACtB6O,EAAQ,GAERnG,EAAYmS,EAEd,KAAI,GAAI1R,MAAWxJ,EAAIkP,EAAOtP,EAAMS,UAAUR,OAAYD,EAAJI,EAASA,IAAOwJ,EAAK1H,KAAKzB,UAAUL,GAC1F,OAAO+kB,KAAcyB,GAAoBhd,EAAMT,GAAY3I,OAAO+jB,SAGpE,IAAIuM,IAAoB,SAAUzV,GAEhC,QAASyV,GAAiBzvB,EAAGye,GAC3Btf,KAAK2mB,GAAK9lB,EACVb,KAAKkwB,GAAK5Q,EACVtf,KAAKisB,MACLpR,EAAUnX,KAAK1D,MAiBjB,MAtBAuW,IAAS+Z,EAAkBzV,GAQ3ByV,EAAiBnlB,UAAUzB,KAAO,SAAUG,GAC1C7J,KAAKisB,GAAGvqB,KAAKmI,GACb7J,KAAKisB,GAAGxsB,OAASO,KAAKkwB,IAAMlwB,KAAKisB,GAAG5d,SAGtCiiB,EAAiBnlB,UAAU7K,MAAQ,SAAUJ,GAC3CF,KAAK2mB,GAAGlc,QAAQvK,IAGlBowB,EAAiBnlB,UAAUmW,UAAY,WACrC,KAAOthB,KAAKisB,GAAGxsB,OAAS,GAAKO,KAAK2mB,GAAGjc,OAAO1K,KAAKisB,GAAG5d,QACpDrO,MAAK2mB,GAAGhc,eAGH2lB,GACPlP,GAUFlB,IAAgBqQ,SAAW,SAAU5pB,GACnC,GAAY,EAARA,EAAa,KAAM,IAAIoN,GAC3B,IAAIjT,GAASd,IACb,OAAO,IAAIwM,IAAoB,SAAU3L,GACvC,MAAOC,GAAOyI,UAAU,GAAI+mB,IAAiBzvB,EAAG8F,KAC/C7F,IAGPof,GAAgBsQ,cAAgBtQ,GAAgBuQ,UAAY,SAAStmB,EAAU8G,EAAgB2D,GAC3F,MAAO,IAAIwO,IAAkBpjB,KAAMmK,EAAU8G,EAAgB2D,GAASkU,MAAM,GAE9E,IAAI4H,IAAiB,SAAU7V,GAG7B,QAAS6V,GAAc5vB,EAAQqJ,EAAUyK,GACvC5U,KAAKc,OAASA,EACdd,KAAKmK,SAAWuK,GAAavK,EAAUyK,EAAS,GAChDiG,EAAUnX,KAAK1D,MAGjB,QAAS2wB,GAASxmB,EAAUyC,GAC1B,MAAO,UAAU/C,EAAGjK,EAAGiB,GAAK,MAAOsJ,GAASzG,KAAK1D,KAAM4M,EAAKzC,SAASN,EAAGjK,EAAGiB,GAAIjB,EAAGiB,IAYpF,QAASwiB,GAAcxiB,EAAGsJ,EAAUrJ,GAClCd,KAAKa,EAAIA,EACTb,KAAKmK,SAAWA,EAChBnK,KAAKc,OAASA,EACdd,KAAKJ,EAAI,EACTwhB,GAAiB1d,KAAK1D,MAiBxB,MA3CAuW,IAASma,EAAe7V,GAYxB6V,EAAcvlB,UAAUylB,YAAc,SAAUzmB,EAAUyK,GACxD,MAAO,IAAI8b,GAAc1wB,KAAKc,OAAQ6vB,EAASxmB,EAAUnK,MAAO4U,IAGlE8b,EAAcvlB,UAAU+X,cAAgB,SAAUriB,GAChD,MAAOb,MAAKc,OAAOyI,UAAU,GAAI8Z,GAAcxiB,EAAGb,KAAKmK,SAAUnK,QAGnEuW,GAAS8M,EAAejC,IASxBiC,EAAclY,UAAUzB,KAAO,SAASG,GACtC,GAAIjG,GAAS4G,GAASxK,KAAKmK,UAAUN,EAAG7J,KAAKJ,IAAKI,KAAKc,OACvD,OAAI8C,KAAWzD,GAAmBH,KAAKa,EAAE4J,QAAQ7G,EAAO1D,OACxDF,MAAKa,EAAE6J,OAAO9G,IAGhByf,EAAclY,UAAU7K,MAAQ,SAAUJ,GACxCF,KAAKa,EAAE4J,QAAQvK,IAGjBmjB,EAAclY,UAAUmW,UAAY,WAClCthB,KAAKa,EAAE8J,eAGF+lB,GAEP7N,GAQF3C,IAAgBqD,IAAMrD,GAAgB2Q,OAAS,SAAU1mB,EAAUyK,GACjE,GAAIkc,GAAiC,kBAAb3mB,GAA0BA,EAAW,WAAc,MAAOA,GAClF,OAAOnK,gBAAgB0wB,IACrB1wB,KAAK4wB,YAAYE,EAAYlc,GAC7B,GAAI8b,IAAc1wB,KAAM8wB,EAAYlc,IAwBxCsL,GAAgB6Q,MAAQ,WACtB,GAAIvxB,GAAMS,UAAUR,OAAQ2J,EAAO,GAAIzJ,OAAMH,EAC7C,IAAY,IAARA,EAAa,KAAM,IAAI4C,OAAM,sCACjC,KAAI,GAAIxC,GAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,EACnD,OAAOI,MAAKujB,IAAI3Z,EAAQR,EAAM5J,KAGlC0gB,GAAgB8Q,QAAU9Q,GAAgB+Q,WAAa,SAAS9mB,EAAU8G,EAAgB2D,GACtF,MAAO,IAAIwO,IAAkBpjB,KAAMmK,EAAU8G,EAAgB2D,GAAS4U,YAG1E5W,GAAG7C,WAAW5E,UAAU+lB,cAAgB,SAAS/mB,EAAU8G,EAAgB2D,GACvE,MAAO,IAAIwO,IAAkBpjB,KAAMmK,EAAU8G,EAAgB2D,GAASwW,eAExE,IAAI+F,IAAkB,SAAStW,GAE7B,QAASsW,GAAerwB,EAAQ6F,GAC9B3G,KAAKc,OAASA,EACdd,KAAKoxB,OAASzqB,EACdkU,EAAUnX,KAAK1D,MAOjB,QAASqxB,GAAaxwB,EAAGye,GACvBtf,KAAK2mB,GAAK9lB,EACVb,KAAK6qB,GAAKvL,EACV8B,GAAiB1d,KAAK1D,MAexB,MA7BAuW,IAAS4a,EAAgBtW,GAOzBsW,EAAehmB,UAAU+X,cAAgB,SAAUriB,GACjD,MAAOb,MAAKc,OAAOyI,UAAU,GAAI8nB,GAAaxwB,EAAGb,KAAKoxB,UASxD7a,GAAS8a,EAAcjQ,IAEvBiQ,EAAalmB,UAAUzB,KAAO,SAAUG,GAClC7J,KAAK6qB,IAAM,EACb7qB,KAAK2mB,GAAGjc,OAAOb,GAEf7J,KAAK6qB,MAGTwG,EAAalmB,UAAU7K,MAAQ,SAASJ,GAAKF,KAAK2mB,GAAGlc,QAAQvK,IAC7DmxB,EAAalmB,UAAUmW,UAAY,WAAathB,KAAK2mB,GAAGhc,eAEjDwmB,GACPtO,GAOF3C,IAAgBoR,KAAO,SAAU3qB,GAC/B,GAAY,EAARA,EAAa,KAAM,IAAIoN,GAC3B,OAAO,IAAIod,IAAenxB,KAAM2G,GAGlC,IAAI4qB,IAAuB,SAAU1W,GAEnC,QAAS0W,GAAoBzwB,EAAQmJ,GACnCjK,KAAKc,OAASA,EACdd,KAAKyL,IAAMxB,EACX4Q,EAAUnX,KAAK1D,MAOjB,MAXAuW,IAASgb,EAAqB1W,GAO9B0W,EAAoBpmB,UAAU+X,cAAgB,SAAUriB,GACtD,MAAOb,MAAKc,OAAOyI,UAAU,GAAIioB,IAAkB3wB,EAAGb,QAGjDuxB,GACP1O,IAEE2O,GAAqB,SAAU3W,GAGjC,QAAS2W,GAAkB3wB,EAAGkJ,GAC5B/J,KAAK2mB,GAAK9lB,EACVb,KAAK4qB,GAAK7gB,EACV/J,KAAKuH,GAAK,EACVvH,KAAK6qB,IAAK,EACVhQ,EAAUnX,KAAK1D,MAcjB,MArBAuW,IAASib,EAAmB3W,GAU5B2W,EAAkBrmB,UAAUzB,KAAO,SAAUG,GAC3C,IAAK7J,KAAK6qB,GAAI,CACZ,GAAIna,GAAMlG,GAASxK,KAAK4qB,GAAGnf,KAAK5B,EAAG7J,KAAKuH,KAAMvH,KAAK4qB,GACnD,IAAIla,IAAQvQ,GAAY,MAAOH,MAAK2mB,GAAGlc,QAAQiG,EAAIxQ,EACnDF,MAAK6qB,IAAMna,EAEb1Q,KAAK6qB,IAAM7qB,KAAK2mB,GAAGjc,OAAOb,IAE5B2nB,EAAkBrmB,UAAU7K,MAAQ,SAAUJ,GAAKF,KAAK2mB,GAAGlc,QAAQvK,IACnEsxB,EAAkBrmB,UAAUmW,UAAY,WAActhB,KAAK2mB,GAAGhc,eAEvD6mB,GACPpQ,GAYFlB,IAAgBuR,UAAY,SAAUrsB,EAAWwP,GAC/C,GAAI3K,GAAKyK,GAAatP,EAAWwP,EAAS,EAC1C,OAAO,IAAI2c,IAAoBvxB,KAAMiK,GAGvC,IAAIynB,IAAkB,SAAS7W,GAE7B,QAAS6W,GAAe5wB,EAAQ6F,GAC9B3G,KAAKc,OAASA,EACdd,KAAKoxB,OAASzqB,EACdkU,EAAUnX,KAAK1D,MAOjB,QAAS2xB,GAAa9wB,EAAGye,GACvBtf,KAAK2mB,GAAK9lB,EACVb,KAAKkwB,GAAK5Q,EACVtf,KAAK6qB,GAAKvL,EACV8B,GAAiB1d,KAAK1D,MAexB,MA9BAuW,IAASmb,EAAgB7W,GAOzB6W,EAAevmB,UAAU+X,cAAgB,SAAUriB,GACjD,MAAOb,MAAKc,OAAOyI,UAAU,GAAIooB,GAAa9wB,EAAGb,KAAKoxB,UAUxD7a,GAASob,EAAcvQ,IAEvBuQ,EAAaxmB,UAAUzB,KAAO,SAAUG,GAClC7J,KAAK6qB,KAAO,IACd7qB,KAAK2mB,GAAGjc,OAAOb,GACf7J,KAAK6qB,IAAM,GAAK7qB,KAAK2mB,GAAGhc,gBAI5BgnB,EAAaxmB,UAAU7K,MAAQ,SAAUJ,GAAKF,KAAK2mB,GAAGlc,QAAQvK,IAC9DyxB,EAAaxmB,UAAUmW,UAAY,WAActhB,KAAK2mB,GAAGhc,eAElD+mB,GACP7O,GAQF3C,IAAgB0R,KAAO,SAAUjrB,EAAOgC,GACtC,GAAY,EAARhC,EAAa,KAAM,IAAIoN,GAC3B,OAAc,KAAVpN,EAAsB8e,GAAgB9c,GACnC,GAAI+oB,IAAe1xB,KAAM2G,GAGlC,IAAIkrB,IAAuB,SAAUhX,GAEnC,QAASgX,GAAoB/wB,EAAQmJ,GACnCjK,KAAKc,OAASA,EACdd,KAAKyL,IAAMxB,EACX4Q,EAAUnX,KAAK1D,MAOjB,MAXAuW,IAASsb,EAAqBhX,GAO9BgX,EAAoB1mB,UAAU+X,cAAgB,SAAUriB,GACtD,MAAOb,MAAKc,OAAOyI,UAAU,GAAIuoB,IAAkBjxB,EAAGb,QAGjD6xB,GACPhP,IAEEiP,GAAqB,SAAUjX,GAGjC,QAASiX,GAAkBjxB,EAAGkJ,GAC5B/J,KAAK2mB,GAAK9lB,EACVb,KAAK4qB,GAAK7gB,EACV/J,KAAKuH,GAAK,EACVvH,KAAK6qB,IAAK,EACVhQ,EAAUnX,KAAK1D,MAiBjB,MAxBAuW,IAASub,EAAmBjX,GAU5BiX,EAAkB3mB,UAAUzB,KAAO,SAAUG,GAC3C,MAAI7J,MAAK6qB,KACP7qB,KAAK6qB,GAAKrgB,GAASxK,KAAK4qB,GAAGnf,KAAK5B,EAAG7J,KAAKuH,KAAMvH,KAAK4qB,IAC/C5qB,KAAK6qB,KAAO1qB,IAAmBH,KAAK2mB,GAAGlc,QAAQzK,KAAK6qB,GAAG3qB,QAEzDF,KAAK6qB,GACP7qB,KAAK2mB,GAAGjc,OAAOb,GAEf7J,KAAK2mB,GAAGhc,gBAGZmnB,EAAkB3mB,UAAU7K,MAAQ,SAAUJ,GAAKF,KAAK2mB,GAAGlc,QAAQvK,IACnE4xB,EAAkB3mB,UAAUmW,UAAY,WAActhB,KAAK2mB,GAAGhc,eAEvDmnB,GACP1Q,GASFlB,IAAgB6R,UAAY,SAAU3sB,EAAWwP,GAC/C,GAAI3K,GAAKyK,GAAatP,EAAWwP,EAAS,EAC1C,OAAO,IAAIid,IAAoB7xB,KAAMiK,GAGvC,IAAI+nB,IAAoB,SAAUnX,GAGhC,QAASmX,GAAiBlxB,EAAQsE,EAAWwP,GAC3C5U,KAAKc,OAASA,EACdd,KAAKoF,UAAYsP,GAAatP,EAAWwP,EAAS,GAClDiG,EAAUnX,KAAK1D,MAOjB,QAASiyB,GAAe7sB,EAAWwH,GACjC,MAAO,UAAS/C,EAAGjK,EAAGiB,GAAK,MAAO+L,GAAKxH,UAAUyE,EAAGjK,EAAGiB,IAAMuE,EAAU1B,KAAK1D,KAAM6J,EAAGjK,EAAGiB,IAQ1F,QAASwiB,GAAcxiB,EAAGuE,EAAWtE,GACnCd,KAAKa,EAAIA,EACTb,KAAKoF,UAAYA,EACjBpF,KAAKc,OAASA,EACdd,KAAKJ,EAAI,EACTwhB,GAAiB1d,KAAK1D,MAmBxB,MA7CAuW,IAASyb,EAAkBnX,GAQ3BmX,EAAiB7mB,UAAU+X,cAAgB,SAAUriB,GACnD,MAAOb,MAAKc,OAAOyI,UAAU,GAAI8Z,GAAcxiB,EAAGb,KAAKoF,UAAWpF,QAOpEgyB,EAAiB7mB,UAAU+mB,eAAiB,SAAS9sB,EAAWwP,GAC9D,MAAO,IAAIod,GAAiBhyB,KAAKc,OAAQmxB,EAAe7sB,EAAWpF,MAAO4U,IAG5E2B,GAAS8M,EAAejC,IASxBiC,EAAclY,UAAUzB,KAAO,SAASG,GACtC,GAAIsoB,GAAc3nB,GAASxK,KAAKoF,WAAWyE,EAAG7J,KAAKJ,IAAKI,KAAKc,OAC7D,OAAIqxB,KAAgBhyB,GACXH,KAAKa,EAAE4J,QAAQ0nB,EAAYjyB,QAEpCiyB,GAAenyB,KAAKa,EAAE6J,OAAOb,KAG/BwZ,EAAclY,UAAU7K,MAAQ,SAAUJ,GACxCF,KAAKa,EAAE4J,QAAQvK,IAGjBmjB,EAAclY,UAAUmW,UAAY,WAClCthB,KAAKa,EAAE8J,eAGFqnB,GAEPnP,GAQF3C,IAAgBsI,OAAStI,GAAgBkS,MAAQ,SAAUhtB,EAAWwP,GACpE,MAAO5U,gBAAgBgyB,IAAmBhyB,KAAKkyB,eAAe9sB,EAAWwP,GACvE,GAAIod,IAAiBhyB,KAAMoF,EAAWwP,IAyC5C7E,GAAWsiB,aAAe,SAAUpoB,EAAIC,EAAKC,GAC3C,MAAO,YACU,mBAARD,KAAwBA,EAAMlK,KAGrC,KAAI,GADAR,GAAMS,UAAUR,OAAQ2J,EAAO,GAAIzJ,OAAMH,GACrCI,EAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,EACnD,OAAOoK,GAAmBC,EAAIC,EAAKC,EAAUf,KA4CjD2G,GAAWuiB,iBAAmB,SAAUroB,EAAIC,EAAKC,GAC/C,MAAO;AACU,mBAARD,KAAwBA,EAAMlK,KAErC,KAAI,GADAR,GAAMS,UAAUR,OAAQ2J,EAAO,GAAIzJ,OAAMH,GACrCI,EAAI,EAAOJ,EAAJI,EAASA,IAAOwJ,EAAKxJ,GAAKK,UAAUL,EACnD,OAAOgL,GAAqBX,EAAIC,EAAKC,EAAUf,KAqBjDiC,EAAiBF,UAAUgE,QAAU,WAC9BnP,KAAKkH,aACRlH,KAAKuL,GAAGgnB,oBAAoBvyB,KAAKwL,GAAIxL,KAAKyL,KAAK,GAC/CzL,KAAKkH,YAAa,IAuBtB0L,GAAGE,OAAO0f,iBAAkB,CAE5B,IAAIC,IAAmB,SAAS5X,GAE9B,QAAS4X,GAAgBznB,EAAIzG,EAAM0F,GACjCjK,KAAK0yB,IAAM1nB,EACXhL,KAAKwL,GAAKjH,EACVvE,KAAKyL,IAAMxB,EACX4Q,EAAUnX,KAAK1D,MAGjB,QAAS2yB,GAAc9xB,EAAGoJ,GACxB,MAAO,YACL,GAAIK,GAAUrK,UAAU,EACxB,OAAIsK,IAAWN,KACbK,EAAUE,GAASP,GAAIlK,MAAM,KAAME,WAC/BqK,IAAYnK,IAAmBU,EAAE4J,QAAQH,EAAQpK,OAEvDW,GAAE6J,OAAOJ,IAWb,MA1BAiM,IAASkc,EAAiB5X,GAmB1B4X,EAAgBtnB,UAAU+X,cAAgB,SAAUriB,GAClD,MAAO8K,GACL3L,KAAK0yB,IACL1yB,KAAKwL,GACLmnB,EAAc9xB,EAAGb,KAAKyL,OAGnBgnB,GACP5P,GASF9S,IAAW6iB,UAAY,SAAUC,EAASjnB,EAAWzB,GAEnD,MAAI0oB,GAAQC,YACHC,GACL,SAAUC,GAAKH,EAAQC,YAAYlnB,EAAWonB,IAC9C,SAAUA,GAAKH,EAAQI,eAAernB,EAAWonB,IACjD7oB,GAICyI,GAAGE,OAAO0f,iBAEa,kBAAfK,GAAQK,IAA4C,kBAAhBL,GAAQM,IAQlD,GAAIV,IAAgBI,EAASjnB,EAAWzB,GAAUipB,UAAUC,WAPxDN,GACL,SAAUC,GAAKH,EAAQK,GAAGtnB,EAAWonB,IACrC,SAAUA,GAAKH,EAAQM,IAAIvnB,EAAWonB,IACtC7oB,GAOR,IAAImpB,IAA0B,SAASzY,GAErC,QAASyY,GAAuBrnB,EAAKsnB,EAAKtpB,GACxCjK,KAAKwzB,KAAOvnB,EACZjM,KAAKyzB,KAAOF,EACZvzB,KAAKyL,IAAMxB,EACX4Q,EAAUnX,KAAK1D,MAGjB,QAAS2yB,GAAc9xB,EAAGoJ,GACxB,MAAO,YACL,GAAIK,GAAUrK,UAAU,EACxB,OAAIsK,IAAWN,KACbK,EAAUE,GAASP,GAAIlK,MAAM,KAAME,WAC/BqK,IAAYnK,IAAmBU,EAAE4J,QAAQH,EAAQpK,OAEvDW,GAAE6J,OAAOJ,IAUb,QAASopB,GAAuBH,EAAKtpB,EAAI0pB,GACvC3zB,KAAKyzB,KAAOF,EACZvzB,KAAKyL,IAAMxB,EACXjK,KAAK4zB,KAAOD,EACZ3zB,KAAKkH,YAAa,EAUpB,MAvCAqP,IAAS+c,EAAwBzY,GAmBjCyY,EAAuBnoB,UAAU+X,cAAgB,SAAUriB,GACzD,GAAIoJ,GAAK0oB,EAAc9xB,EAAGb,KAAKyL,KAC3BooB,EAAc7zB,KAAKwzB,KAAKvpB,EAC5B,OAAO,IAAIypB,GAAuB1zB,KAAKyzB,KAAMxpB,EAAI4pB,IAUnDH,EAAuBvoB,UAAUgE,QAAU,WACrCnP,KAAKkH,aACPqD,GAAWvK,KAAKyzB,OAASzzB,KAAKyzB,KAAKzzB,KAAKyL,IAAKzL,KAAK4zB,MAClD5zB,KAAKkH,YAAa,IAIfosB,GACPzQ,IASEkQ,GAAmBhjB,GAAWgjB,iBAAmB,SAAUe,EAAYC,EAAe5pB,GACxF,MAAO,IAAImpB,IAAuBQ,EAAYC,EAAe5pB,GAAUipB,UAAUC,YAG/EW,GAAyB,SAASnZ,GAEpC,QAASmZ,GAAsBjqB,EAAG3C,GAChCpH,KAAK4qB,GAAK7gB,EACV/J,KAAKiH,GAAKG,EACVyT,EAAUnX,KAAK1D,MAGjB,QAASi0B,GAAa7sB,EAAGJ,GACvB,GAAInG,GAAImG,EAAM,GAAIkX,EAAOlX,EAAM,EAC/BnG,GAAE6J,OAAOwT,GACTrd,EAAE8J,cAGJ,QAASupB,GAAc9sB,EAAGJ,GACxB,GAAInG,GAAImG,EAAM,GAAI8D,EAAM9D,EAAM,EAC9BnG,GAAE4J,QAAQK,GAgBZ,MA/BAyL,IAASyd,EAAuBnZ,GAkBhCmZ,EAAsB7oB,UAAU+X,cAAgB,SAASriB,GACvD,GAAIunB,GAAM,GAAIpa,IAA8BpB,EAAO5M,IASnD,OAPAA,MAAK4qB,GACFnX,KAAK,SAAUyK,GACdkK,EAAIna,cAAcrB,EAAK3F,GAAGuS,UAAU3Y,EAAGqd,GAAO+V,KAC7C,SAAUnpB,GACXsd,EAAIna,cAAcrB,EAAK3F,GAAGuS,UAAU3Y,EAAGiK,GAAMopB,MAG1C9L,GAGF4L,GACPnR,IAOEpT,GAAwBM,GAAWokB,YAAc,SAAUC,EAASzrB,GAEtE,MADAA,KAAcA,EAAYiI,IACnB,GAAIojB,IAAsBI,EAASzrB,GAc5CuX,IAAgBmU,UAAY,SAAUC,GAEpC,GADAA,IAAgBA,EAAc1hB,GAAGE,OAAOC,UACnCuhB,EAAe,KAAM,IAAItgB,IAAkB,qDAChD,IAAIlT,GAASd,IACb,OAAO,IAAIs0B,GAAY,SAAUC,EAASC,GAExC,GAAIp1B,EACJ0B,GAAOyI,UAAU,SAAU6a,GACzBhlB,EAAQglB,GACPoQ,EAAQ,WACTD,EAAQn1B,QAUd2Q,GAAW0kB,WAAa,SAAUC,GAChC,GAAIN,GAAU5pB,GAASkqB,IACvB,OAAIN,KAAYj0B,GAAmB8P,GAAgBmkB,EAAQl0B,GACpDuP,GAAsB2kB,GAG/B,IAAIO,IAAuB,SAAU9Z,GAEnC,QAAS8Z,GAAoB7zB,EAAQ8zB,EAAKC,GACxC70B,KAAKc,OAASA,EACdd,KAAK80B,KAAOF,EACZ50B,KAAK+0B,KAAOF,EACZha,EAAUnX,KAAK1D,MAQjB,MAbAuW,IAASoe,EAAqB9Z,GAQ9B8Z,EAAoBxpB,UAAU+X,cAAgB,SAAUriB,GACtD,GAAIm0B,GAAch1B,KAAKc,OAAOm0B,UAAUj1B,KAAK80B,OAC7C,OAAO,IAAItmB,IAAiBxO,KAAK+0B,KAAKC,GAAazrB,UAAU1I,GAAIm0B,EAAYE,YAGxEP,GACP9R,GAmBF3C,IAAgB+U,UAAY,SAAUE,EAA0BhrB,GAC9D,MAAOI,IAAW4qB,GAChB,GAAIR,IAAoB30B,KAAMm1B,EAA0BhrB,GACxD,GAAIirB,IAAsBp1B,KAAMm1B,IAcpCjV,GAAgBkT,QAAU,SAAUjpB,GAClC,MAAOA,IAAYI,GAAWJ,GAC5BnK,KAAKi1B,UAAU,WAAc,MAAO,IAAInG,KAAc3kB,GACtDnK,KAAKi1B,UAAU,GAAInG,MAQvB5O,GAAgBmV,MAAQ,WACtB,MAAOr1B,MAAKozB,UAAUC,YAcxBnT,GAAgBoV,YAAc,SAAUnrB,GACtC,MAAOA,IAAYI,GAAWJ,GAC5BnK,KAAKi1B,UAAU,WAAc,MAAO,IAAI7qB,KAAmBD,GAC3DnK,KAAKi1B,UAAU,GAAI7qB,MAevB8V,GAAgBqV,aAAe,SAAUC,EAAwBC,GAC/D,MAA4B,KAArBx1B,UAAUR,OACfO,KAAKi1B,UAAU,WACb,MAAO,IAAIS,IAAgBD,IAC1BD,GACHx1B,KAAKi1B,UAAU,GAAIS,IAAgBF,KASvCtV,GAAgByV,WAAa,SAAUF,GACrC,MAAOz1B,MAAKu1B,aAAaE,GAAcpC,YAmBzCnT,GAAgB0V,OAAS,SAAUzrB,EAAU0rB,EAAYC,EAAYntB,GACnE,MAAOwB,IAAYI,GAAWJ,GAC5BnK,KAAKi1B,UAAU,WAAc,MAAO,IAAIc,IAAcF,EAAYC,EAAYntB,IAAewB,GAC7FnK,KAAKi1B,UAAU,GAAIc,IAAcF,EAAYC,EAAYntB,KAkB7DuX,GAAgB8V,YAAc,SAAUH,EAAYC,EAAYntB,GAC9D,MAAO3I,MAAK41B,OAAO,KAAMC,EAAYC,EAAYntB,GAAW0qB,WAG9D,IAAI4C,IAAsB,SAAUpb,GAElC,QAASob,GAAmBn1B,GAC1Bd,KAAKc,OAASA,EACdd,KAAKoxB,OAAS,EACdpxB,KAAKk2B,yBAA2B,KAChCrb,EAAUnX,KAAK1D,MASjB,QAAS4Y,GAAmB7O,EAAG3C,GAC7BpH,KAAK4qB,GAAK7gB,EACV/J,KAAKiH,GAAKG,EACVpH,KAAKkH,YAAa,EAWpB,MA5BAqP,IAAS0f,EAAoBpb,GAQ7Bob,EAAmB9qB,UAAU+X,cAAgB,SAAUriB,GACrD,GAAIuM,GAAepN,KAAKc,OAAOyI,UAAU1I,EAEzC,OADkB,OAAhBb,KAAKoxB,SAAiBpxB,KAAKk2B,yBAA2Bl2B,KAAKc,OAAOo0B,WAC7D,GAAItc,GAAmB5Y,KAAMoN,IAStCwL,EAAmBzN,UAAUgE,QAAU,WAChCnP,KAAKkH,aACRlH,KAAKkH,YAAa,EAClBlH,KAAKiH,GAAGkI,UACa,MAAnBnP,KAAK4qB,GAAGwG,QAAgBpxB,KAAK4qB,GAAGsL,yBAAyB/mB,YAIxD8mB,GACPpT,IAEEuS,GAAwBxiB,GAAGwiB,sBAAyB,SAAUva,GAEhE,QAASua,GAAsBt0B,EAAQkQ,GACrChR,KAAKc,OAASA,EACdd,KAAKm2B,YAAc,KACnBn2B,KAAKo2B,QAAUt1B,EAAOwI,eACtBtJ,KAAKq2B,SAAWrlB,EAChB6J,EAAUnX,KAAK1D,MAGjB,QAASs2B,GAAkBrtB,EAAQmE,GACjCpN,KAAK4qB,GAAK3hB,EACVjJ,KAAKiH,GAAKmG,EA2BZ,MAtCAmJ,IAAS6e,EAAuBva,GAchCyb,EAAkBnrB,UAAUgE,QAAU,WAChCnP,KAAKiH,KACPjH,KAAKiH,GAAGkI,UACRnP,KAAKiH,GAAK,KACVjH,KAAK4qB,GAAGuL,YAAc,OAI1Bf,EAAsBjqB,UAAU+pB,QAAU,WACxC,IAAKl1B,KAAKm2B,YAAa,CACrB,GAAI/oB,GAAepN,KAAKo2B,QAAQ7sB,UAAUvJ,KAAKq2B,SAC/Cr2B,MAAKm2B,YAAc,GAAIG,GAAkBt2B,KAAMoN,GAEjD,MAAOpN,MAAKm2B,aAGdf,EAAsBjqB,UAAU2W,WAAa,SAAUjhB,GACrD,MAAOb,MAAKq2B,SAAS9sB,UAAU1I,IAGjCu0B,EAAsBjqB,UAAUkoB,SAAW,WACzC,MAAO,IAAI4C,IAAmBj2B,OAGzBo1B,GACPrlB,IAEE1D,GAAmB,SAASwO,GAE9B,QAASxO,GAAgBoN,EAAIrS,GAC3BpH,KAAKu2B,IAAM9c,EACXzZ,KAAKiH,GAAKG,EACVyT,EAAUnX,KAAK1D,MAOjB,QAAS0a,GAAetT,EAAGvG,GACzBA,EAAE6J,OAAO,GACT7J,EAAE8J,cAGJ,MAhBA4L,IAASlK,EAAiBwO,GAO1BxO,EAAgBlB,UAAU+X,cAAgB,SAAUriB,GAClD,MAAOb,MAAKiH,GAAG6J,eAAejQ,EAAGb,KAAKu2B,IAAK7b,IAQtCrO,GACPwW,IA6CE2T,GAAqBzmB,GAAW0mB,SAAW,SAAUlqB,EAAQ5D,GAC/D,MAAOqE,GAAiCT,EAAQA,EAAQ3D,GAAYD,GAAaA,EAAYiI,IAUzEb,IAAWS,MAAQ,SAAUpE,EAASsqB,EAAmB/tB,GAC7E,GAAI4D,EAOJ,OANA3D,IAAYD,KAAeA,EAAYiI,IACd,MAArB8lB,GAA0D,gBAAtBA,GACtCnqB,EAASmqB,EACA9tB,GAAY8tB,KACrB/tB,EAAY+tB,IAETtqB,YAAmBU,OAA2B,gBAAZV,KAAyBG,IAAWrN,EAClEiN,EAAiBC,EAASzD,GAE/ByD,YAAmBU,OAAQP,IAAWrN,EACjCoN,EAA6BF,EAASsqB,EAAmB/tB,GAE3DqE,EAAiCZ,EAASG,EAAQ5D,GAwI3DuX,IAAgBnR,MAAQ,WACtB,GAAI4nB,GAAW12B,UAAU,EACzB,IAAwB,gBAAb02B,IAAyBA,YAAoB7pB,MAAM,CAC5D,GAAIV,GAAUuqB,EAAUhuB,EAAY1I,UAAU,EAE9C,OADA2I,IAAYD,KAAeA,EAAYiI,IAChCxE,YAAmBU,MACxB2B,EAAwBzO,KAAMoM,EAASzD,GACvCwE,EAAwBnN,KAAMoM,EAASzD,GACpC,GAAIoH,GAAWC,aAAa2mB,IAAapsB,GAAWosB,GACzD,MAAOjoB,GAAkB1O,KAAM22B,EAAU12B,UAAU,GAEnD,MAAM,IAAImC,OAAM,qBAIpB,IAAIw0B,IAAsB,SAAU/b,GAElC,QAAS+b,GAAmB91B,EAAQ2Y,EAAIrS,GACtCwB,GAAYxB,KAAOA,EAAIwJ,IACvB5Q,KAAKc,OAASA,EACdd,KAAKu2B,IAAM9c,EACXzZ,KAAKiH,GAAKG,EACVyT,EAAUnX,KAAK1D,MAUjB,MAhBAuW,IAASqgB,EAAoB/b,GAS7B+b,EAAmBzrB,UAAU+X,cAAgB,SAAUriB,GACrD,GAAIyM,GAAa,GAAIC,GACrB,OAAO,IAAIiB,IACTxO,KAAKc,OAAOyI,UAAU,GAAIstB,IAAiBh2B,EAAGb,KAAKu2B,IAAKv2B,KAAKiH,GAAIqG,IACjEA,IAGGspB,GACP/T,IAEEgU,GAAoB,SAAUhc,GAEhC,QAASgc,GAAiB7tB,EAAUoD,EAASzD,EAAW2E,GACtDtN,KAAK2mB,GAAK3d,EACVhJ,KAAKksB,GAAK9f,EACVpM,KAAKkc,WAAavT,EAClB3I,KAAKkwB,GAAK5iB,EACVtN,KAAK82B,GAAK,KACV92B,KAAK+vB,KAAM,EACX/vB,KAAKmf,IAAM,EACXtE,EAAUnX,KAAK1D,MAkCjB,MA3CAuW,IAASsgB,EAAkBhc,GAiB3Bgc,EAAiB1rB,UAAUzB,KAAO,SAAUG,GAC1C7J,KAAK+vB,KAAM,EACX/vB,KAAK82B,GAAKjtB,CACV,IAAIktB,KAAc/2B,KAAKmf,IAAK1S,EAAI,GAAIuB,GACpChO,MAAKkwB,GAAGjiB,cAAcxB,GACtBA,EAAEwB,cAAcjO,KAAKkc,WAAWpL,eAAe9Q,KAAMA,KAAKksB,GAAI,SAAUhe,EAAGtB,GACzEA,EAAKmjB,KAAOnjB,EAAKuS,MAAQ4X,GAAanqB,EAAK+Z,GAAGjc,OAAOb,GACrD+C,EAAKmjB,KAAM,MAIf8G,EAAiB1rB,UAAU7K,MAAQ,SAAUJ,GAC3CF,KAAKkwB,GAAG/gB,UACRnP,KAAK2mB,GAAGlc,QAAQvK,GAChBF,KAAK+vB,KAAM,EACX/vB,KAAKmf,OAGP0X,EAAiB1rB,UAAUmW,UAAY,WACrCthB,KAAKkwB,GAAG/gB,UACRnP,KAAK+vB,KAAO/vB,KAAK2mB,GAAGjc,OAAO1K,KAAK82B,IAChC92B,KAAK2mB,GAAGhc,cACR3K,KAAK+vB,KAAM,EACX/vB,KAAKmf,OAGA0X,GACPzV,GAiDFlB,IAAgB8W,SAAW,WACzB,GAAIzsB,GAAYtK,UAAU,IACxB,MAAOmP,GAAqBpP,KAAMC,UAAU,GACvC,IAA4B,gBAAjBA,WAAU,GAC1B,MAAO,IAAI22B,IAAmB52B,KAAMC,UAAU,GAAIA,UAAU,GAE5D,MAAM,IAAImC,OAAM,qBAIpB,IAAI60B,IAAuB,SAAUpc,GAEnC,QAASoc,GAAoBn2B,EAAQsG,GACnCpH,KAAKc,OAASA,EACdd,KAAKiH,GAAKG,EACVyT,EAAUnX,KAAK1D,MAOjB,MAXAuW,IAAS0gB,EAAqBpc,GAO9Boc,EAAoB9rB,UAAU+X,cAAgB,SAAUriB,GACtD,MAAOb,MAAKc,OAAOyI,UAAU,GAAI2tB,IAAkBr2B,EAAGb,KAAKiH,MAGtDgwB,GACPpU,IAEEqU,GAAqB,SAAUrc,GAEjC,QAASqc,GAAkBr2B,EAAGuG,GAC5BpH,KAAK2mB,GAAK9lB,EACVb,KAAKiH,GAAKG,EACVyT,EAAUnX,KAAK1D,MAejB,MAnBAuW,IAAS2gB,EAAmBrc,GAO5Bqc,EAAkB/rB,UAAUzB,KAAO,SAAUG,GAC3C7J,KAAK2mB,GAAGjc,QAAStL,MAAOyK,EAAG+D,UAAW5N,KAAKiH,GAAG4F,SAGhDqqB,EAAkB/rB,UAAU7K,MAAQ,SAAUJ,GAC5CF,KAAK2mB,GAAGlc,QAAQvK,IAGlBg3B,EAAkB/rB,UAAUmW,UAAY,WACtCthB,KAAK2mB,GAAGhc,eAGHusB,GACP9V,GAYFlB,IAAgBtS,UAAY,SAAUjF,GAEpC,MADAC,IAAYD,KAAeA,EAAYiI,IAChC,GAAIqmB,IAAoBj3B,KAAM2I,GAGvC,IAAIwuB,IAAoB,SAAStc,GAE/B,QAASsc,GAAiBr2B,EAAQs2B,GAChCp3B,KAAKc,OAASA,EACdd,KAAKq3B,SAAWD,EAChBvc,EAAUnX,KAAK1D,MAmBjB,MAvBAuW,IAAS4gB,EAAkBtc,GAO3Bsc,EAAiBhsB,UAAU+X,cAAgB,SAAUriB,GACnD,GAAImG,IACFnG,EAAGA,EACHqO,OAAO,EACP9P,MAAO,KACPkQ,UAAU,EACVgoB,mBAAoB,GAAItpB,IAI1B,OADAhH,GAAMswB,mBAAmBrpB,cAAcjO,KAAKc,OAAOyI,UAAU,GAAIguB,IAAqBvwB,KAC/E,GAAIwH,IACTxH,EAAMswB,mBACNt3B,KAAKq3B,SAAS9tB,UAAU,GAAIiuB,IAAgBxwB,MAIzCmwB,GACPtU,IAEE2U,GAAmB,SAAS3c,GAE9B,QAAS2c,GAAgBpwB,GACvBpH,KAAKiH,GAAKG,EACVyT,EAAUnX,KAAK1D,MAejB,MAlBAuW,IAASihB,EAAiB3c,GAM1B2c,EAAgBrsB,UAAUssB,eAAiB,WACrCz3B,KAAKiH,GAAGqI,WACVtP,KAAKiH,GAAGqI,UAAW,EACnBtP,KAAKiH,GAAGpG,EAAE6J,OAAO1K,KAAKiH,GAAG7H,QAE3BY,KAAKiH,GAAGiI,OAASlP,KAAKiH,GAAGpG,EAAE8J,eAG7B6sB,EAAgBrsB,UAAUzB,KAAO,WAAc1J,KAAKy3B,kBACpDD,EAAgBrsB,UAAU7K,MAAQ,SAAUJ,GAAKF,KAAKiH,GAAGwD,QAAQvK,IACjEs3B,EAAgBrsB,UAAUmW,UAAY,WAActhB,KAAKy3B,kBAElDD,GACPpW,IAEEmW,GAAwB,SAAS1c,GAEnC,QAAS0c,GAAqBnwB,GAC5BpH,KAAKiH,GAAKG,EACVyT,EAAUnX,KAAK1D,MAajB,MAhBAuW,IAASghB,EAAsB1c,GAM/B0c,EAAqBpsB,UAAUzB,KAAO,SAAUG,GAC9C7J,KAAKiH,GAAGqI,UAAW,EACnBtP,KAAKiH,GAAG7H,MAAQyK,GAElB0tB,EAAqBpsB,UAAU7K,MAAQ,SAAUJ,GAAKF,KAAKiH,GAAGpG,EAAE4J,QAAQvK,IACxEq3B,EAAqBpsB,UAAUmW,UAAY,WACzCthB,KAAKiH,GAAGiI,OAAQ,EAChBlP,KAAKiH,GAAGqwB,mBAAmBnoB,WAGtBooB,GACPnW,GAcFlB,IAAgBwX,OAAS,SAAUC,EAAmBhvB,GAEpD,MADAC,IAAYD,KAAeA,EAAYiI,IACH,gBAAtB+mB,GACZ,GAAIR,IAAiBn3B,KAAMw2B,GAAmBmB,EAAmBhvB,IACjE,GAAIwuB,IAAiBn3B,KAAM23B,GAG/B,IAAIznB,IAAe0C,GAAG1C,aAAe,SAAS1L,GAC5CxE,KAAKwE,QAAUA,GAAW,uBAC1BxE,KAAKuE,KAAO,eACZnC,MAAMsB,KAAK1D,MAEbkQ,IAAa/E,UAAY9L,OAAOwU,OAAOzR,MAAM+I,WAgH7C+U,GAAgB9P,QAAU,WACxB,GAAIumB,GAAW12B,UAAU,EACzB,IAAI02B,YAAoB7pB,OAA4B,gBAAb6pB,GACrC,MAAOvmB,IAAQpQ,KAAM22B,EAAU12B,UAAU,GAAIA,UAAU,GAClD,IAAI8P,GAAWC,aAAa2mB,IAAapsB,GAAWosB,GACzD,MAAOhnB,GAAoB3P,KAAM22B,EAAU12B,UAAU,GAAIA,UAAU,GAEnE,MAAM,IAAImC,OAAM,sBAUpB8d,GAAgB3Q,SAAW,SAAUqoB,EAAgBjvB,GACnDC,GAAYD,KAAeA,EAAYiI,GACvC,IAAIinB,IAAYD,GAAkB,CAClC,IAAgB,GAAZC,EAAiB,KAAM,IAAIC,YAAW,+CAC1C,IAAIh3B,GAASd,IACb,OAAO,IAAIwM,IAAoB,SAAU3L,GACvC,GAAIk3B,GAAa,CACjB,OAAOj3B,GAAOyI,UACZ,SAAUM,GACR,GAAIgD,GAAMlE,EAAUkE,OACD,IAAfkrB,GAAoBlrB,EAAMkrB,GAAcF,KAC1CE,EAAalrB,EACbhM,EAAE6J,OAAOb,KAEX,SAAU3J,GAAKW,EAAE4J,QAAQvK,IAAO,WAAcW,EAAE8J,iBAEnD7J,GAGL,IAAIk3B,IAAsB,SAAUnd,GAElC,QAASmd,GAAmBl3B,EAAQm3B,GAClCj4B,KAAKc,OAASA,EACdd,KAAKk4B,WAAa,GAAIpJ,IAElBmJ,GAAUA,EAAO1uB,UACnBvJ,KAAKi4B,OAASj4B,KAAKk4B,WAAWpP,MAAMmP,GAEpCj4B,KAAKi4B,OAASj4B,KAAKk4B,WAGrBrd,EAAUnX,KAAK1D,MA4BjB,MAvCAuW,IAASyhB,EAAoBnd,GAc7Bmd,EAAmB7sB,UAAU2W,WAAa,SAAUjhB,GAClD,GAAIs3B,GAAOn4B,KAAKc,OAAOsyB,UACrBhmB,EAAe+qB,EAAK5uB,UAAU1I,GAC9Bu3B,EAAa1gB,GAEX2gB,EAAWr4B,KAAKi4B,OAAO9K,uBAAuB5jB,UAAU,SAAU+uB,GAChEA,EACFF,EAAaD,EAAKjD,WAElBkD,EAAWjpB,UACXipB,EAAa1gB,KAIjB,OAAO,IAAIe,KAAgBrL,EAAcgrB,EAAYC,KAGvDL,EAAmB7sB,UAAUotB,MAAQ,WACnCv4B,KAAKk4B,WAAWxtB,QAAO,IAGzBstB,EAAmB7sB,UAAUqtB,OAAS,WACpCx4B,KAAKk4B,WAAWxtB,QAAO,IAGlBstB,GAEPjoB,GAUFmQ,IAAgBmY,SAAW,SAAUJ,GACnC,MAAO,IAAID,IAAmBh4B,KAAMi4B,GAoDtC,IAAIQ,IAA8B,SAAU5d,GAE1C,QAAS4d,GAA2B33B,EAAQm3B,GAC1Cj4B,KAAKc,OAASA,EACdd,KAAKk4B,WAAa,GAAIpJ,IAElBmJ,GAAUA,EAAO1uB,UACnBvJ,KAAKi4B,OAASj4B,KAAKk4B,WAAWpP,MAAMmP,GAEpCj4B,KAAKi4B,OAASj4B,KAAKk4B,WAGrBrd,EAAUnX,KAAK1D,MAmDjB,MA9DAuW,IAASkiB,EAA4B5d,GAcrC4d,EAA2BttB,UAAU2W,WAAa,SAAUjhB,GAG1D,QAAS63B,KAAe,KAAOjrB,EAAEhO,OAAS,GAAKoB,EAAE6J,OAAO+C,EAAEY,SAF1D,GAAYsqB,GAARlrB,KAIAL,EACF2D,GACE/Q,KAAKc,OACLd,KAAKi4B,OAAO5H,WAAU,GAAOlD,uBAC7B,SAAUjP,EAAM0a,GACd,OAAS1a,KAAMA,EAAM0a,WAAYA,KAElCrvB,UACC,SAAUe,GACJquB,IAAuBz5B,GAAaoL,EAAQsuB,aAAeD,GAC7DA,EAAqBruB,EAAQsuB,WAEzBtuB,EAAQsuB,YAAcF,MAE1BC,EAAqBruB,EAAQsuB,WAEzBtuB,EAAQsuB,WACV/3B,EAAE6J,OAAOJ,EAAQ4T,MAEjBzQ,EAAE/L,KAAK4I,EAAQ4T,QAIrB,SAAUpT,GACR4tB,IACA73B,EAAE4J,QAAQK,IAEZ,WACE4tB,IACA73B,EAAE8J,eAGV,OAAOyC,IAGTqrB,EAA2BttB,UAAUotB,MAAQ,WAC3Cv4B,KAAKk4B,WAAWxtB,QAAO,IAGzB+tB,EAA2BttB,UAAUqtB,OAAS,WAC5Cx4B,KAAKk4B,WAAWxtB,QAAO,IAGlB+tB,GAEP1oB,GAWFmQ,IAAgB2Y,iBAAmB,SAAUZ,GAC3C,MAAO,IAAIQ,IAA2Bz4B,KAAMi4B,GAG9C,IAAIa,IAAwB,SAAUje,GAEpC,QAASie,GAAsBh4B,EAAQi4B,EAAapwB,GAClDkS,EAAUnX,KAAK1D,MACfA,KAAKgR,QAAU,GAAIgoB,IAAkBD,EAAapwB,GAClD3I,KAAKc,OAASA,EAAOm0B,UAAUj1B,KAAKgR,SAASqiB,WAW/C,MAfA9c,IAASuiB,EAAsBje,GAO/Bie,EAAqB3tB,UAAU2W,WAAa,SAAUjhB,GACpD,MAAOb,MAAKc,OAAOyI,UAAU1I,IAG/Bi4B,EAAqB3tB,UAAU8tB,QAAU,SAAUC,GACjD,MAAOl5B,MAAKgR,QAAQioB,QAAyB,MAAjBC,EAAwB,GAAKA,IAGpDJ,GAEP/oB,IAEEipB,GAAqB,SAAUne,GAEjC,QAASme,GAAkBD,EAAapwB,GACvB,MAAfowB,IAAwBA,GAAc,GAEtCle,EAAUnX,KAAK1D,MACfA,KAAKgR,QAAU,GAAI8d,IACnB9uB,KAAK+4B,YAAcA,EACnB/4B,KAAKkb,MAAQ6d,KAAmB,KAChC/4B,KAAKm5B,eAAiB,EACtBn5B,KAAKo5B,oBAAsB,KAC3Bp5B,KAAKM,MAAQ,KACbN,KAAKq5B,WAAY,EACjBr5B,KAAKs5B,cAAe,EACpBt5B,KAAK2I,UAAYA,GAAaE,GAgFhC,MA7FA0N,IAASyiB,EAAmBne,GAgB5BlE,GAAcqiB,EAAkB7tB,UAAW8V,IACzCa,WAAY,SAAUjhB,GACpB,MAAOb,MAAKgR,QAAQzH,UAAU1I,IAEhC8J,YAAa,WACX3K,KAAKs5B,cAAe,EACft5B,KAAK+4B,aAAqC,IAAtB/4B,KAAKkb,MAAMzb,OAIlCO,KAAKkb,MAAMxZ,KAAKye,GAAaa,sBAH7BhhB,KAAKgR,QAAQrG,cACb3K,KAAKu5B,0BAKT9uB,QAAS,SAAUnK,GACjBN,KAAKq5B,WAAY,EACjBr5B,KAAKM,MAAQA,EACRN,KAAK+4B,aAAqC,IAAtB/4B,KAAKkb,MAAMzb,OAIlCO,KAAKkb,MAAMxZ,KAAKye,GAAaW,cAAcxgB,KAH3CN,KAAKgR,QAAQvG,QAAQnK,GACrBN,KAAKu5B,0BAKT7uB,OAAQ,SAAUtL,GACZY,KAAKm5B,gBAAkB,EACzBn5B,KAAK+4B,aAAe/4B,KAAKkb,MAAMxZ,KAAKye,GAAaS,aAAaxhB,KAEnC,IAA1BY,KAAKm5B,kBAA2Bn5B,KAAKu5B,wBACtCv5B,KAAKgR,QAAQtG,OAAOtL,KAGxBo6B,gBAAiB,SAAUN,GACzB,GAAIl5B,KAAK+4B,YACP,KAAO/4B,KAAKkb,MAAMzb,OAAS,IAAMy5B,EAAgB,GAA4B,MAAvBl5B,KAAKkb,MAAM,GAAGnN,OAAe,CACjF,GAAIoK,GAAQnY,KAAKkb,MAAM7M,OACvB8J,GAAM7J,OAAOtO,KAAKgR,SACC,MAAfmH,EAAMpK,KACRmrB,KAEAl5B,KAAKu5B,wBACLv5B,KAAKkb,UAKX,MAAOge,IAETD,QAAS,SAAU7wB,GACjBpI,KAAKu5B,uBACL,IAAI3sB,GAAO5M,IAkBX,OAhBAA,MAAKo5B,oBAAsBp5B,KAAK2I,UAAU6Q,SAASpR,EACnD,SAAShB,EAAGxH,GACV,GAAI65B,GAAY7sB,EAAK4sB,gBAAgB55B,GACjCqrB,EAAUre,EAAK0sB,cAAgB1sB,EAAKysB,SACxC,QAAKpO,GAAWwO,EAAY,GAC1B7sB,EAAKusB,eAAiBM,EAEfhiB,GAAiB,WACtB7K,EAAKusB,eAAiB,KAJ1B,SAYKn5B,KAAKo5B,qBAEdG,sBAAuB,WACjBv5B,KAAKo5B,sBACPp5B,KAAKo5B,oBAAoBjqB,UACzBnP,KAAKo5B,oBAAsB,SAK1BJ,GACPjpB,GAWFmQ,IAAgBwZ,WAAa,SAAUX,EAAapwB,GAQlD,MANIowB,IAAenwB,GAAYmwB,KAC7BpwB,EAAYowB,EACZA,GAAc,GAGG,MAAfA,IAAwBA,GAAc,GACnC,GAAID,IAAqB94B,KAAM+4B,EAAapwB,IAQrDuX,GAAgByZ,KAAO,SAAUC,GAG/B,QAASC,KACP/4B,EAAO03B,SAHT,GAAI13B,GAASd,KAAK64B,kBAuBlB,OAjBAe,GAAK9G,YAAY,QAAS+G,GAE1B/4B,EAAOyI,UACL,SAAUM,IACP+vB,EAAKE,MAAMtc,OAAO3T,KAAO/I,EAAOy3B,SAEnC,SAAUztB,GACR8uB,EAAKG,KAAK,QAASjvB,IAErB,YAEG8uB,EAAKI,UAAYJ,EAAKK,MACvBL,EAAK3G,eAAe,QAAS4G,KAGjC/4B,EAAO03B,SAEAoB,EAGT,IAAIM,IAAqB,SAAUrf,GAEjC,QAASqf,GAAkBr5B,EAAGs5B,GAC5Bn6B,KAAK2mB,GAAK9lB,EACVb,KAAKo6B,OAASD,EACdtf,EAAUnX,KAAK1D,MAcjB,MAlBAuW,IAAS2jB,EAAmBrf,GAO5Bqf,EAAkB/uB,UAAUzB,KAAO,SAAUG,GAC3C,GAAI6G,GAAMlG,GAASxK,KAAKo6B,OAAO,sBAAsB12B,KAAK1D,KAAKo6B,OAAQp6B,KAAK2mB,GAAI9c,EAC5E6G,KAAQvQ,IAAYH,KAAK2mB,GAAGlc,QAAQiG,EAAIxQ,IAG9Cg6B,EAAkB/uB,UAAU7K,MAAQ,SAAUJ,GAAKF,KAAK2mB,GAAGlc,QAAQvK,IAEnEg6B,EAAkB/uB,UAAUmW,UAAY,WACtCthB,KAAKo6B,OAAO,uBAAuBp6B,KAAK2mB,KAGnCuT,GACP9Y,GAqBFlB,IAAgBma,UAAY,SAASC,GACnC,GAAIx5B,GAASd,IACb,OAAO,IAAIwM,IAAoB,SAAS3L,GACtC,GAAIs5B,GAAQG,EAAW/oB,GAAqB1Q,GAC5C,OAAOC,GAAOyI,UAAU,GAAI2wB,IAAkBr5B,EAAGs5B,KAChDr5B,GAGL,IAAI0L,IAAsBoG,GAAGpG,oBAAuB,SAAUqO,GAI5D,QAASiI,GAAcC,GACrB,MAAOA,IAAcxY,GAAWwY,EAAW5T,SAAW4T,EACpDxY,GAAWwY,GAActL,GAAiBsL,GAAcrL,GAG5D,QAASzJ,GAAc7G,EAAGJ,GACxB,GAAIgc,GAAMhc,EAAM,GAAI4F,EAAO5F,EAAM,GAC7Bic,EAAMzY,GAASoC,EAAK2tB,aAAa72B,KAAKkJ,EAAMoW,EAC5CC,KAAQ9iB,IAAa6iB,EAAIzB,KAAKphB,GAASD,IAAME,EAAQD,GAASD,GAClE8iB,EAAI/U,cAAc6U,EAAcG,IAGlC,QAASzW,GAAoBjD,EAAWN,GACtCjJ,KAAKc,OAASmI,EACdjJ,KAAKu6B,YAAchxB,EACnBsR,EAAUnX,KAAK1D,MAcjB,MAhCAuW,IAAS/J,EAAqBqO,GAqB9BrO,EAAoBrB,UAAU2W,WAAa,SAAUjhB,GACnD,GAAImiB,GAAM,GAAIG,IAAmBtiB,GAAImG,GAASgc,EAAKhjB,KAOnD,OALI6I,IAAuB0S,mBACzB1S,GAAuB2Q,SAASxS,EAAOiH,GAEvCA,EAAc,KAAMjH,GAEfgc,GAGFxW,GAEPuD,IAEEoT,GAAsB,SAAUtI,GAGlC,QAASsI,GAAmBna,GAC1B6R,EAAUnX,KAAK1D,MACfA,KAAKgJ,SAAWA,EAChBhJ,KAAK6pB,EAAI,GAAI7b,IALfuI,GAAS4M,EAAoBtI,EAQ7B,IAAI2f,GAA8BrX,EAAmBhY,SA8BrD,OA5BAqvB,GAA4B9wB,KAAO,SAAUtK,GAC3C,GAAIwE,GAAS4G,GAASxK,KAAKgJ,SAAS0B,QAAQhH,KAAK1D,KAAKgJ,SAAU5J,EAC5DwE,KAAWzD,KACbH,KAAKmP,UACL/O,EAAQwD,EAAO1D,KAInBs6B,EAA4Bl6B,MAAQ,SAAUwK,GAC5C,GAAIlH,GAAS4G,GAASxK,KAAKgJ,SAASyB,SAAS/G,KAAK1D,KAAKgJ,SAAU8B,EACjE9K,MAAKmP,UACLvL,IAAWzD,IAAYC,EAAQwD,EAAO1D,IAGxCs6B,EAA4BlZ,UAAY,WACtC,GAAI1d,GAAS4G,GAASxK,KAAKgJ,SAAS2B,aAAajH,KAAK1D,KAAKgJ,SAC3DhJ,MAAKmP,UACLvL,IAAWzD,IAAYC,EAAQwD,EAAO1D,IAGxCs6B,EAA4BvsB,cAAgB,SAAU7O,GAASY,KAAK6pB,EAAE5b,cAAc7O,IACpFo7B,EAA4BtjB,cAAgB,WAAc,MAAOlX,MAAK6pB,EAAE3S,iBAExEsjB,EAA4BrrB,QAAU,WACpC0L,EAAU1P,UAAUgE,QAAQzL,KAAK1D,MACjCA,KAAK6pB,EAAE1a,WAGFgU,GACP/B,IAEEqZ,GAAoB,SAAUrzB,EAAGvG,GACnCb,KAAKiH,GAAKG,EACVpH,KAAK2mB,GAAK9lB,EAGZ45B,IAAkBtvB,UAAUgE,QAAU,WACpC,IAAKnP,KAAKiH,GAAGC,YAA0B,OAAZlH,KAAK2mB,GAAa,CAC3C,GAAI9P,GAAM7W,KAAKiH,GAAGyzB,UAAUh6B,QAAQV,KAAK2mB,GACzC3mB,MAAKiH,GAAGyzB,UAAUrjB,OAAOR,EAAK,GAC9B7W,KAAK2mB,GAAK,MAQd,IAAImI,IAAUlc,GAAGkc,QAAW,SAAUjU,GAEpC,QAASiU,KACPjU,EAAUnX,KAAK1D,MACfA,KAAKkH,YAAa,EAClBlH,KAAKqhB,WAAY,EACjBrhB,KAAK06B,aACL16B,KAAK26B,UAAW,EAoFlB,MA1FApkB,IAASuY,EAASjU,GASlBlE,GAAcmY,EAAQ3jB,UAAW8V,GAAS9V,WACxC2W,WAAY,SAAUjhB,GAEpB,MADAgX,IAAc7X,MACTA,KAAKqhB,UAINrhB,KAAK26B,UACP95B,EAAE4J,QAAQzK,KAAKM,OACRoX,KAET7W,EAAE8J,cACK+M,KARL1X,KAAK06B,UAAUh5B,KAAKb,GACb,GAAI45B,IAAkBz6B,KAAMa,KAavC+5B,aAAc,WAAmC,MAArB/iB,IAAc7X,MAAcA,KAAK06B,UAAUj7B,OAAS,GAIhFkL,YAAa,WAEX,GADAkN,GAAc7X,OACTA,KAAKqhB,UAAW,CACnBrhB,KAAKqhB,WAAY,CACjB,KAAK,GAAIzhB,GAAI,EAAGi7B,EAAKv7B,EAAWU,KAAK06B,WAAYl7B,EAAMq7B,EAAGp7B,OAAYD,EAAJI,EAASA,IACzEi7B,EAAGj7B,GAAG+K,aAGR3K,MAAK06B,UAAUj7B,OAAS,IAO5BgL,QAAS,SAAUnK,GAEjB,GADAuX,GAAc7X,OACTA,KAAKqhB,UAAW,CACnBrhB,KAAKqhB,WAAY,EACjBrhB,KAAKM,MAAQA,EACbN,KAAK26B,UAAW,CAChB,KAAK,GAAI/6B,GAAI,EAAGi7B,EAAKv7B,EAAWU,KAAK06B,WAAYl7B,EAAMq7B,EAAGp7B,OAAYD,EAAJI,EAASA,IACzEi7B,EAAGj7B,GAAG6K,QAAQnK,EAGhBN,MAAK06B,UAAUj7B,OAAS,IAO5BiL,OAAQ,SAAUtL,GAEhB,GADAyY,GAAc7X,OACTA,KAAKqhB,UACR,IAAK,GAAIzhB,GAAI,EAAGi7B,EAAKv7B,EAAWU,KAAK06B,WAAYl7B,EAAMq7B,EAAGp7B,OAAYD,EAAJI,EAASA,IACzEi7B,EAAGj7B,GAAG8K,OAAOtL,IAOnB+P,QAAS,WACPnP,KAAKkH,YAAa,EAClBlH,KAAK06B,UAAY,QAUrB5L,EAAQjb,OAAS,SAAU7K,EAAUzI,GACnC,MAAO,IAAIu6B,IAAiB9xB,EAAUzI,IAGjCuuB,GACP/e,IAME3F,GAAewI,GAAGxI,aAAgB,SAAUyQ,GAO9C,QAASzQ,KACPyQ,EAAUnX,KAAK1D,MACfA,KAAKkH,YAAa,EAClBlH,KAAKqhB,WAAY,EACjBrhB,KAAKsP,UAAW,EAChBtP,KAAK06B,aACL16B,KAAK26B,UAAW,EA4FlB,MAxGApkB,IAASnM,EAAcyQ,GAevBlE,GAAcvM,EAAae,UAAW8V,GAAS9V,WAC7C2W,WAAY,SAAUjhB,GAGpB,MAFAgX,IAAc7X,MAETA,KAAKqhB,WAKNrhB,KAAK26B,SACP95B,EAAE4J,QAAQzK,KAAKM,OACNN,KAAKsP,UACdzO,EAAE6J,OAAO1K,KAAKZ,OACdyB,EAAE8J,eAEF9J,EAAE8J,cAGG+M,KAbL1X,KAAK06B,UAAUh5B,KAAKb,GACb,GAAI45B,IAAkBz6B,KAAMa,KAkBvC+5B,aAAc,WAAmC,MAArB/iB,IAAc7X,MAAcA,KAAK06B,UAAUj7B,OAAS,GAIhFkL,YAAa,WACX,GAAI/K,GAAGJ,CAEP,IADAqY,GAAc7X,OACTA,KAAKqhB,UAAW,CACnBrhB,KAAKqhB,WAAY,CACjB,IAAIwZ,GAAKv7B,EAAWU,KAAK06B,WAAYl7B,EAAMq7B,EAAGp7B,MAE9C,IAAIO,KAAKsP,SACP,IAAK1P,EAAI,EAAOJ,EAAJI,EAASA,IAAK,CACxB,GAAIiB,GAAIg6B,EAAGj7B,EACXiB,GAAE6J,OAAO1K,KAAKZ,OACdyB,EAAE8J,kBAGJ,KAAK/K,EAAI,EAAOJ,EAAJI,EAASA,IACnBi7B,EAAGj7B,GAAG+K,aAIV3K,MAAK06B,UAAUj7B,OAAS,IAO5BgL,QAAS,SAAUnK,GAEjB,GADAuX,GAAc7X,OACTA,KAAKqhB,UAAW,CACnBrhB,KAAKqhB,WAAY,EACjBrhB,KAAK26B,UAAW,EAChB36B,KAAKM,MAAQA,CAEb,KAAK,GAAIV,GAAI,EAAGi7B,EAAKv7B,EAAWU,KAAK06B,WAAYl7B,EAAMq7B,EAAGp7B,OAAYD,EAAJI,EAASA,IACzEi7B,EAAGj7B,GAAG6K,QAAQnK,EAGhBN,MAAK06B,UAAUj7B,OAAS,IAO5BiL,OAAQ,SAAUtL,GAChByY,GAAc7X,MACVA,KAAKqhB,YACTrhB,KAAKZ,MAAQA,EACbY,KAAKsP,UAAW,IAKlBH,QAAS,WACPnP,KAAKkH,YAAa,EAClBlH,KAAK06B,UAAY,KACjB16B,KAAKM,MAAQ,KACbN,KAAKZ,MAAQ,QAIVgL,GACP2F,IAEE+qB,GAAmBloB,GAAGkoB,iBAAoB,SAAUjgB,GAEtD,QAASigB,GAAiB9xB,EAAUzI,GAClCP,KAAKgJ,SAAWA,EAChBhJ,KAAKO,WAAaA,EAClBsa,EAAUnX,KAAK1D,MAkBjB,MAtBAuW,IAASukB,EAAkBjgB,GAO3BlE,GAAcmkB,EAAiB3vB,UAAW8V,GAAS9V,WACjD2W,WAAY,SAAUjhB,GACpB,MAAOb,MAAKO,WAAWgJ,UAAU1I,IAEnC8J,YAAa,WACX3K,KAAKgJ,SAAS2B,eAEhBF,QAAS,SAAUnK,GACjBN,KAAKgJ,SAASyB,QAAQnK,IAExBoK,OAAQ,SAAUtL,GAChBY,KAAKgJ,SAAS0B,OAAOtL,MAIlB07B,GACP/qB,IAME2lB,GAAkB9iB,GAAG8iB,gBAAmB,SAAU7a,GAEpD,QAAS6a,GAAgBt2B,GACvByb,EAAUnX,KAAK1D,MACfA,KAAKZ,MAAQA,EACbY,KAAK06B,aACL16B,KAAKkH,YAAa,EAClBlH,KAAKqhB,WAAY,EACjBrhB,KAAK26B,UAAW,EAwFlB,MA/FApkB,IAASmf,EAAiB7a,GAU1BlE,GAAc+e,EAAgBvqB,UAAW8V,GAAS9V,WAChD2W,WAAY,SAAUjhB,GAEpB,MADAgX,IAAc7X,MACTA,KAAKqhB,WAKNrhB,KAAK26B,SACP95B,EAAE4J,QAAQzK,KAAKM,OAEfO,EAAE8J,cAEG+M,KATL1X,KAAK06B,UAAUh5B,KAAKb,GACpBA,EAAE6J,OAAO1K,KAAKZ,OACP,GAAIq7B,IAAkBz6B,KAAMa,KAgBvCk6B,SAAU,WAGR,MAFAljB,IAAc7X,MACVA,KAAK26B,UAAYv6B,EAAQJ,KAAKM,OAC3BN,KAAKZ,OAMdw7B,aAAc,WAAmC,MAArB/iB,IAAc7X,MAAcA,KAAK06B,UAAUj7B,OAAS,GAIhFkL,YAAa,WAEX,GADAkN,GAAc7X,OACVA,KAAKqhB,UAAT,CACArhB,KAAKqhB,WAAY,CACjB,KAAK,GAAIzhB,GAAI,EAAGi7B,EAAKv7B,EAAWU,KAAK06B,WAAYl7B,EAAMq7B,EAAGp7B,OAAYD,EAAJI,EAASA,IACzEi7B,EAAGj7B,GAAG+K,aAGR3K,MAAK06B,UAAUj7B,OAAS,IAM1BgL,QAAS,SAAUnK,GAEjB,GADAuX,GAAc7X,OACVA,KAAKqhB,UAAT,CACArhB,KAAKqhB,WAAY,EACjBrhB,KAAK26B,UAAW,EAChB36B,KAAKM,MAAQA,CAEb,KAAK,GAAIV,GAAI,EAAGi7B,EAAKv7B,EAAWU,KAAK06B,WAAYl7B,EAAMq7B,EAAGp7B,OAAYD,EAAJI,EAASA,IACzEi7B,EAAGj7B,GAAG6K,QAAQnK,EAGhBN,MAAK06B,UAAUj7B,OAAS,IAM1BiL,OAAQ,SAAUtL,GAEhB,GADAyY,GAAc7X,OACVA,KAAKqhB,UAAT,CACArhB,KAAKZ,MAAQA,CACb,KAAK,GAAIQ,GAAI,EAAGi7B,EAAKv7B,EAAWU,KAAK06B,WAAYl7B,EAAMq7B,EAAGp7B,OAAYD,EAAJI,EAASA,IACzEi7B,EAAGj7B,GAAG8K,OAAOtL,KAMjB+P,QAAS,WACPnP,KAAKkH,YAAa,EAClBlH,KAAK06B,UAAY,KACjB16B,KAAKZ,MAAQ,KACbY,KAAKM,MAAQ,QAIVo1B,GACP3lB,IAMEgmB,GAAgBnjB,GAAGmjB,cAAiB,SAAUlb,GAIhD,QAASmgB,GAA0BhqB,EAAShI,GAC1C,MAAOyO,IAAiB,WACtBzO,EAASmG,WACR6B,EAAQ9J,YAAc8J,EAAQ0pB,UAAUrjB,OAAOrG,EAAQ0pB,UAAUh6B,QAAQsI,GAAW,KAYzF,QAAS+sB,GAAcF,EAAYC,EAAYntB,GAC7C3I,KAAK61B,WAA2B,MAAdA,EAAqBptB,EAAiBotB,EACxD71B,KAAK81B,WAA2B,MAAdA,EAAqBrtB,EAAiBqtB,EACxD91B,KAAK2I,UAAYA,GAAaE,GAC9B7I,KAAKyN,KACLzN,KAAK06B,aACL16B,KAAKqhB,WAAY,EACjBrhB,KAAKkH,YAAa,EAClBlH,KAAK26B,UAAW,EAChB36B,KAAKM,MAAQ,KACbua,EAAUnX,KAAK1D,MA3BjB,GAAIyI,GAAiBH,KAAK0N,IAAI,EAAG,IAAM,CA6HvC,OApHAO,IAASwf,EAAelb,GAqBxBlE,GAAcof,EAAc5qB,UAAW8V,GAAS9V,WAC9C2W,WAAY,SAAUjhB,GACpBgX,GAAc7X,KACd,IAAIi7B,GAAK,GAAI7Y,IAAkBpiB,KAAK2I,UAAW9H,GAAIuM,EAAe4tB,EAA0Bh7B,KAAMi7B,EAElGj7B,MAAKk7B,MAAMl7B,KAAK2I,UAAUkE,OAC1B7M,KAAK06B,UAAUh5B,KAAKu5B,EAEpB,KAAK,GAAIr7B,GAAI,EAAGJ,EAAMQ,KAAKyN,EAAEhO,OAAYD,EAAJI,EAASA,IAC5Cq7B,EAAGvwB,OAAO1K,KAAKyN,EAAE7N,GAAGR,MAUtB,OAPIY,MAAK26B,SACPM,EAAGxwB,QAAQzK,KAAKM,OACPN,KAAKqhB,WACd4Z,EAAGtwB,cAGLswB,EAAGtY,eACIvV,GAMTwtB,aAAc,WAAmC,MAArB/iB,IAAc7X,MAAcA,KAAK06B,UAAUj7B,OAAS,GAChFy7B,MAAO,SAAUruB,GACf,KAAO7M,KAAKyN,EAAEhO,OAASO,KAAK61B,YAC1B71B,KAAKyN,EAAEY,OAET,MAAOrO,KAAKyN,EAAEhO,OAAS,GAAMoN,EAAM7M,KAAKyN,EAAE,GAAGgpB,SAAYz2B,KAAK81B,YAC5D91B,KAAKyN,EAAEY,SAOX3D,OAAQ,SAAUtL,GAEhB,GADAyY,GAAc7X,OACVA,KAAKqhB,UAAT,CACA,GAAIxU,GAAM7M,KAAK2I,UAAUkE,KACzB7M,MAAKyN,EAAE/L,MAAO+0B,SAAU5pB,EAAKzN,MAAOA,IACpCY,KAAKk7B,MAAMruB,EAEX,KAAK,GAAIjN,GAAI,EAAGi7B,EAAKv7B,EAAWU,KAAK06B,WAAYl7B,EAAMq7B,EAAGp7B,OAAYD,EAAJI,EAASA,IAAK,CAC9E,GAAIoJ,GAAW6xB,EAAGj7B,EAClBoJ,GAAS0B,OAAOtL,GAChB4J,EAAS2Z,kBAOblY,QAAS,SAAUnK,GAEjB,GADAuX,GAAc7X,OACVA,KAAKqhB,UAAT,CACArhB,KAAKqhB,WAAY,EACjBrhB,KAAKM,MAAQA,EACbN,KAAK26B,UAAW,CAChB,IAAI9tB,GAAM7M,KAAK2I,UAAUkE,KACzB7M,MAAKk7B,MAAMruB,EACX,KAAK,GAAIjN,GAAI,EAAGi7B,EAAKv7B,EAAWU,KAAK06B,WAAYl7B,EAAMq7B,EAAGp7B,OAAYD,EAAJI,EAASA,IAAK,CAC9E,GAAIoJ,GAAW6xB,EAAGj7B,EAClBoJ,GAASyB,QAAQnK,GACjB0I,EAAS2Z,eAEX3iB,KAAK06B,UAAUj7B,OAAS,IAK1BkL,YAAa,WAEX,GADAkN,GAAc7X,OACVA,KAAKqhB,UAAT,CACArhB,KAAKqhB,WAAY,CACjB,IAAIxU,GAAM7M,KAAK2I,UAAUkE,KACzB7M,MAAKk7B,MAAMruB,EACX,KAAK,GAAIjN,GAAI,EAAGi7B,EAAKv7B,EAAWU,KAAK06B,WAAYl7B,EAAMq7B,EAAGp7B,OAAYD,EAAJI,EAASA,IAAK,CAC9E,GAAIoJ,GAAW6xB,EAAGj7B,EAClBoJ,GAAS2B,cACT3B,EAAS2Z,eAEX3iB,KAAK06B,UAAUj7B,OAAS,IAK1B0P,QAAS,WACPnP,KAAKkH,YAAa,EAClBlH,KAAK06B,UAAY,QAId3E,GACPhmB,GAKF6C,IAAGuoB,OAAU,SAAUtgB,GAErB,QAASsgB,KACPtgB,EAAUnX,KAAK1D,MAajB,MAfAuW,IAAS4kB,EAAQtgB,GAQjBsgB,EAAOhwB,UAAUotB,MAAQ,WAAcv4B,KAAK0K,QAAO,IAKnDywB,EAAOhwB,UAAUqtB,OAAS,WAAcx4B,KAAK0K,QAAO,IAE7CywB,GACPrM,IAEmB,kBAAVsM,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACzExzB,GAAK+K,GAAKA,GAEVwoB,OAAO,WACL,MAAOxoB,OAEAb,IAAeG,GAEpBO,IACDP,GAAWF,QAAUY,IAAIA,GAAKA,GAE/Bb,GAAYa,GAAKA,GAInB/K,GAAK+K,GAAKA,EAIZ,IAAI1Q,IAAcC,MAElBuB,KAAK1D"} \ No newline at end of file diff --git a/node_modules/rx-lite/rx.lite.min.js b/node_modules/rx-lite/rx.lite.min.js new file mode 100644 index 0000000..870ebcd --- /dev/null +++ b/node_modules/rx-lite/rx.lite.min.js @@ -0,0 +1,5 @@ +/* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/ +(function(a){function b(a){return a&&a.Object===Object?a:null}function c(a){for(var b=a.length,c=new Array(b),d=0;b>d;d++)c[d]=a[d];return c}function d(a){return function(){try{return a.apply(this,arguments)}catch(b){return va.e=b,va}}}function e(a){throw a}function f(a,b){if(xa&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(Ba)){for(var c=[],d=b;d;d=d.source)d.stack&&c.unshift(d.stack);c.unshift(a.stack);var e=c.join("\n"+Ba+"\n");a.stack=g(e)}}function g(a){for(var b=a.split("\n"),c=[],d=0,e=b.length;e>d;d++){var f=b[d];h(f)||i(f)||!f||c.push(f)}return c.join("\n")}function h(a){var b=k(a);if(!b)return!1;var c=b[0],d=b[1];return c===za&&d>=Aa&&qe>=d}function i(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function j(){if(xa)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=k(c);if(!d)return;return za=d[0],d[1]}}function k(a){var b=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(a);if(b)return[b[1],Number(b[2])];var c=/at ([^ ]+):(\d+):(?:\d+)$/.exec(a);if(c)return[c[1],Number(c[2])];var d=/.*@(.+):(\d+)$/.exec(a);return d?[d[1],Number(d[2])]:void 0}function l(b,c,d,e,f,g){var h=ob(b),i=h.length,j=ob(c),k=j.length;if(i!==k&&!e)return!1;for(var l,m=i;m--;)if(l=h[m],!(e?l in c:lb.call(c,l)))return!1;for(var n=e;++m-1&&a%1===0&&nb>=a}function p(a){return n(a)&&o(a.length)&&!!jb[mb.call(a)]}function q(a,b){for(var c=-1,d=a.length;++ci))return!1;for(;++hd;d++)c[d]=b();return c}function v(a,b){this.id=a,this.value=b}function w(a){this._s=a,this.isDisposed=!1}function x(a){this._s=a}function y(a){this._s=a,this._l=a.length,this._i=0}function z(a){this._a=a}function A(a){this._a=a,this._l=E(a),this._i=0}function B(a){return"number"==typeof a&&la.isFinite(a)}function C(b){var c,d=b[Ia];if(!d&&"string"==typeof b)return c=new x(b),c[Ia]();if(!d&&b.length!==a)return c=new z(b),c[Ia]();if(!d)throw new TypeError("Object is not iterable");return b[Ia]()}function D(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function E(a){var b=+a.length;return isNaN(b)?0:0!==b&&B(b)?(b=D(b)*Math.floor(Math.abs(b)),0>=b?0:b>Ac?Ac:b):b}function F(a,b){return Kb(a)||(a=Qb),new Cc(b,a)}function G(a,b){this.observer=a,this.parent=b}function H(){return!1}function I(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function H(){return!1}function I(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function H(){return!1}function J(){return[]}function H(){return!1}function J(){return[]}function I(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return b}function K(a){return function(b){return a.subscribe(b)}}function L(a){return{"@@iterator":function(){return{next:function(){return{done:!1,value:a}}}}}}function L(a){return{"@@iterator":function(){return{next:function(){return{done:!1,value:a}}}}}}function M(b,c){return function(d){for(var e=d,f=0;c>f;f++){var g=e[b[f]];if("undefined"==typeof g)return a;e=g}return e}}function N(a,b,c,d){var e=new me;return d.push(O(e,b,c)),a.apply(b,d),e.asObservable()}function O(a,b,c){return function(){for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];if(ua(c)){if(e=wa(c).apply(b,e),e===va)return a.onError(e.e);a.onNext(e)}else e.length<=1?a.onNext(e[0]):a.onNext(e);a.onCompleted()}}function P(a,b,c,d){var e=new me;return d.push(Q(e,b,c)),a.apply(b,d),e.asObservable()}function Q(a,b,c){return function(){var d=arguments[0];if(d)return a.onError(d);for(var e=arguments.length,f=[],g=1;e>g;g++)f[g-1]=arguments[g];if(ua(c)){var f=wa(c).apply(b,f);if(f===va)return a.onError(f.e);a.onNext(f)}else f.length<=1?a.onNext(f[0]):a.onNext(f);a.onCompleted()}}function R(a){return la.StaticNodeList?a instanceof la.StaticNodeList||a instanceof la.NodeList:"[object NodeList]"===Object.prototype.toString.call(a)}function S(a,b,c){this._e=a,this._n=b,this._fn=c,this._e.addEventListener(this._n,this._fn,!1),this.isDisposed=!1}function T(a,b,c){var d=new vb,e=Object.prototype.toString.call(a);if(R(a)||"[object HTMLCollection]"===e)for(var f=0,g=a.length;g>f;f++)d.add(T(a.item(f),b,c));else a&&d.add(new S(a,b,c));return d}function U(a,b){return new Vd(a,b)}function V(a,b,c){return new ie(function(d){var e=a,f=Jb(b);return c.scheduleRecursiveFuture(0,e,function(a,b){if(f>0){var g=c.now();e=new Date(e.getTime()+f),e.getTime()<=g&&(e=new Date(g+f))}d.onNext(a),b(a+1,new Date(e))})})}function W(a,b,c){return a===b?new ie(function(a){return c.schedulePeriodic(0,b,function(b){return a.onNext(b),b+1})}):vc(function(){return V(new Date(c.now()+a),b,c)})}function X(a,b,c){return new ie(function(d){var e,f=!1,g=new Eb,h=null,i=[],j=!1;return e=a.materialize().timestamp(c).subscribe(function(a){var e,k;"E"===a.value.kind?(i=[],i.push(a),h=a.value.error,k=!j):(i.push({value:a.value,timestamp:a.timestamp+b}),k=!f,f=!0),k&&(null!==h?d.onError(h):(e=new Db,g.setDisposable(e),e.setDisposable(c.scheduleRecursiveFuture(null,b,function(a,b){var e,g,k,l;if(null===h){j=!0;do k=null,i.length>0&&i[0].timestamp-c.now()<=0&&(k=i.shift().value),null!==k&&k.accept(d);while(null!==k);l=!1,g=0,i.length>0?(l=!0,g=Math.max(0,i[0].timestamp-c.now())):f=!1,e=h,j=!1,null!==e?d.onError(e):l&&b(null,g)}}))))}),new Fb(e,g)},a)}function Y(a,b,c){return vc(function(){return X(a,b-c.now(),c)})}function Z(a,b,c){var d,e;return ua(b)?e=b:(d=b,e=c),new ie(function(b){function c(){i.setDisposable(a.subscribe(function(a){var c=wa(e)(a);if(c===va)return b.onError(c.e);var d=new Db;g.add(d),d.setDisposable(c.subscribe(function(){b.onNext(a),g.remove(d),f()},function(a){b.onError(a)},function(){b.onNext(a),g.remove(d),f()}))},function(a){b.onError(a)},function(){h=!0,i.dispose(),f()}))}function f(){h&&0===g.length&&b.onCompleted()}var g=new vb,h=!1,i=new Eb;return d?i.setDisposable(d.subscribe(c,function(a){b.onError(a)},c)):c(),new Fb(i,g)},a)}function $(a,b){return new ie(function(c){var d,e=!1,f=new Eb,g=0,h=a.subscribe(function(a){var h=wa(b)(a);if(h===va)return c.onError(h.e);ta(h)&&(h=Rd(h)),e=!0,d=a,g++;var i=g,j=new Db;f.setDisposable(j),j.setDisposable(h.subscribe(function(){e&&g===i&&c.onNext(d),e=!1,j.dispose()},function(a){c.onError(a)},function(){e&&g===i&&c.onNext(d),e=!1,j.dispose()}))},function(a){f.dispose(),c.onError(a),e=!1,g++},function(){f.dispose(),e&&c.onNext(d),c.onCompleted(),e=!1,g++});return new Fb(h,f)},a)}function _(a,b,c,d){return ua(b)&&(d=c,c=b,b=Gc()),ic.isObservable(d)||(d=Mc(new ce)),new ie(function(e){function f(a){function b(){return l=c===k}var c=k,f=new Db;i.setDisposable(f),f.setDisposable(a.subscribe(function(){b()&&h.setDisposable(d.subscribe(e)),f.dispose()},function(a){b()&&e.onError(a)},function(){b()&&h.setDisposable(d.subscribe(e))}))}function g(){var a=!l;return a&&k++,a}var h=new Eb,i=new Eb,j=new Db;h.setDisposable(j);var k=0,l=!1;return f(b),j.setDisposable(a.subscribe(function(a){if(g()){e.onNext(a);var b=wa(c)(a);if(b===va)return e.onError(b.e);f(ta(b)?Rd(b):b)}},function(a){g()&&e.onError(a)},function(){g()&&e.onCompleted()})),new Fb(h,i)},a)}function aa(a,b,c,d){return Kb(c)&&(d=c,c=Mc(new ce)),c instanceof Error&&(c=Mc(c)),Kb(d)||(d=Vb),ic.isObservable(c)||(c=Mc(new ce)),new ie(function(e){function f(){var a=g;k.setDisposable(d.scheduleFuture(null,b,function(){j=g===a,j&&(ta(c)&&(c=Rd(c)),i.setDisposable(c.subscribe(e)))}))}var g=0,h=new Db,i=new Eb,j=!1,k=new Eb;return i.setDisposable(h),f(),h.setDisposable(a.subscribe(function(a){j||(g++,e.onNext(a),f())},function(a){j||(g++,e.onError(a))},function(){j||(g++,e.onCompleted())})),new Fb(i,k)},a)}function ba(a,b,c){return new ie(function(d){function e(a,b){if(j[b]=a,g[b]=!0,h||(h=g.every(oa))){if(f)return d.onError(f);var e=wa(c).apply(null,j);if(e===va)return d.onError(e.e);d.onNext(e)}i&&j[1]&&d.onCompleted()}var f,g=[!1,!1],h=!1,i=!1,j=new Array(2);return new Fb(a.subscribe(function(a){e(a,0)},function(a){j[1]?d.onError(a):f=a},function(){i=!0,j[1]&&d.onCompleted()}),b.subscribe(function(a){e(a,1)},function(a){d.onError(a)},function(){i=!0,e(!0,1)}))},a)}function ca(a){return{"@@transducer/init":function(){return a},"@@transducer/step":function(a,b){return a.onNext(b)},"@@transducer/result":function(a){return a.onCompleted()}}}var da={"function":!0,object:!0},ea=da[typeof exports]&&exports&&!exports.nodeType?exports:null,fa=da[typeof module]&&module&&!module.nodeType?module:null,ga=b(ea&&fa&&"object"==typeof global&&global),ha=b(da[typeof self]&&self),ia=b(da[typeof window]&&window),ja=fa&&fa.exports===ea?ea:null,ka=b(da[typeof this]&&this),la=ga||ia!==(ka&&ka.window)&&ia||ha||ka||Function("return this")(),ma={internals:{},config:{Promise:la.Promise},helpers:{}},na=ma.helpers.noop=function(){},oa=ma.helpers.identity=function(a){return a},pa=ma.helpers.defaultNow=Date.now,qa=ma.helpers.defaultComparer=function(a,b){return sb(a,b)},ra=ma.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},sa=(ma.helpers.defaultKeySerializer=function(a){return a.toString()},ma.helpers.defaultError=function(a){throw a}),ta=ma.helpers.isPromise=function(a){return!!a&&"function"!=typeof a.subscribe&&"function"==typeof a.then},ua=ma.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==toString.call(a)}),a}(),va={e:{}},wa=ma.internals.tryCatch=function(a){if(!ua(a))throw new TypeError("fn must be a function");return d(a)};ma.config.longStackSupport=!1;var xa=!1,ya=wa(function(){throw new Error})();xa=!!ya.e&&!!ya.e.stack;var za,Aa=j(),Ba="From previous event:",Ca=ma.EmptyError=function(){this.message="Sequence contains no elements.",Error.call(this)};Ca.prototype=Object.create(Error.prototype),Ca.prototype.name="EmptyError";var Da=ma.ObjectDisposedError=function(){this.message="Object has been disposed",Error.call(this)};Da.prototype=Object.create(Error.prototype),Da.prototype.name="ObjectDisposedError";var Ea=ma.ArgumentOutOfRangeError=function(){this.message="Argument out of range",Error.call(this)};Ea.prototype=Object.create(Error.prototype),Ea.prototype.name="ArgumentOutOfRangeError";var Fa=ma.NotSupportedError=function(a){this.message=a||"This operation is not supported",Error.call(this)};Fa.prototype=Object.create(Error.prototype),Fa.prototype.name="NotSupportedError";var Ga=ma.NotImplementedError=function(a){this.message=a||"This operation is not implemented",Error.call(this)};Ga.prototype=Object.create(Error.prototype),Ga.prototype.name="NotImplementedError";var Ha=ma.helpers.notImplemented=function(){throw new Ga},Ia=(ma.helpers.notSupported=function(){throw new Fa},"function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_");la.Set&&"function"==typeof(new la.Set)["@@iterator"]&&(Ia="@@iterator");var Ja=ma.doneEnumerator={done:!0,value:a},Ka=ma.helpers.isIterable=function(b){return b&&b[Ia]!==a},La=ma.helpers.isArrayLike=function(b){return b&&b.length!==a};ma.helpers.iterator=Ia;var Ma=ma.internals.bindCallback=function(a,b,c){if("undefined"==typeof b)return a;switch(c){case 0:return function(){return a.call(b)};case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}},Na=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Oa=(Na.length,"[object Arguments]"),Pa="[object Array]",Qa="[object Boolean]",Ra="[object Date]",Sa="[object Error]",Ta="[object Function]",Ua="[object Map]",Va="[object Number]",Wa="[object Object]",Xa="[object RegExp]",Ya="[object Set]",Za="[object String]",$a="[object WeakMap]",_a="[object ArrayBuffer]",ab="[object Float32Array]",bb="[object Float64Array]",cb="[object Int8Array]",db="[object Int16Array]",eb="[object Int32Array]",fb="[object Uint8Array]",gb="[object Uint8ClampedArray]",hb="[object Uint16Array]",ib="[object Uint32Array]",jb={};jb[ab]=jb[bb]=jb[cb]=jb[db]=jb[eb]=jb[fb]=jb[gb]=jb[hb]=jb[ib]=!0,jb[Oa]=jb[Pa]=jb[_a]=jb[Qa]=jb[Ra]=jb[Sa]=jb[Ta]=jb[Ua]=jb[Va]=jb[Wa]=jb[Xa]=jb[Ya]=jb[Za]=jb[$a]=!1;var kb=Object.prototype,lb=kb.hasOwnProperty,mb=kb.toString,nb=Math.pow(2,53)-1,ob=Object.keys||function(){var a=Object.prototype.hasOwnProperty,b=!{toString:null}.propertyIsEnumerable("toString"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=c.length;return function(e){if("object"!=typeof e&&("function"!=typeof e||null===e))throw new TypeError("Object.keys called on non-object");var f,g,h=[];for(f in e)a.call(e,f)&&h.push(f);if(b)for(g=0;d>g;g++)a.call(e,c[g])&&h.push(c[g]);return h}}(),pb=ma.internals.isObject=function(a){var b=typeof a;return!!a&&("object"===b||"function"===b)},qb=function(){try{Object({toString:0}+"")}catch(a){return function(){return!1}}return function(a){return"function"!=typeof a.toString&&"string"==typeof(a+"")}}(),rb=Array.isArray||function(a){return n(a)&&o(a.length)&&mb.call(a)===Pa},sb=ma.internals.isEqual=function(a,b){return t(a,b)},tb=({}.hasOwnProperty,Array.prototype.slice,ma.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c}),ub=ma.internals.addProperties=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);for(var e=0,f=b.length;f>e;e++){var g=b[e];for(var h in g)a[h]=g[h]}},vb=(ma.internals.addRef=function(a,b){return new ie(function(c){return new Fb(b.getDisposable(),a.subscribe(c))})},ma.CompositeDisposable=function(){var a,b,c=[];if(Array.isArray(arguments[0]))c=arguments[0];else for(b=arguments.length,c=new Array(b),a=0;b>a;a++)c[a]=arguments[a];this.disposables=c,this.isDisposed=!1,this.length=c.length}),wb=vb.prototype;wb.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},wb.remove=function(a){var b=!1;if(!this.isDisposed){var c=this.disposables.indexOf(a);-1!==c&&(b=!0,this.disposables.splice(c,1),this.length--,a.dispose())}return b},wb.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=this.disposables.length,b=new Array(a),c=0;a>c;c++)b[c]=this.disposables[c];for(this.disposables=[],this.length=0,c=0;a>c;c++)b[c].dispose()}};var xb=ma.Disposable=function(a){this.isDisposed=!1,this.action=a||na};xb.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var yb=xb.create=function(a){return new xb(a)},zb=xb.empty={dispose:na},Ab=xb.isDisposable=function(a){return a&&ua(a.dispose)},Bb=xb.checkDisposed=function(a){if(a.isDisposed)throw new Da},Cb=xb._fixup=function(a){return Ab(a)?a:zb},Db=ma.SingleAssignmentDisposable=function(){this.isDisposed=!1,this.current=null};Db.prototype.getDisposable=function(){return this.current},Db.prototype.setDisposable=function(a){if(this.current)throw new Error("Disposable has already been assigned");var b=this.isDisposed;!b&&(this.current=a),b&&a&&a.dispose()},Db.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null,a&&a.dispose()}};var Eb=ma.SerialDisposable=function(){this.isDisposed=!1,this.current=null};Eb.prototype.getDisposable=function(){return this.current},Eb.prototype.setDisposable=function(a){var b=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},Eb.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()};var Fb=ma.BinaryDisposable=function(a,b){this._first=a,this._second=b,this.isDisposed=!1};Fb.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this._first;this._first=null,a&&a.dispose();var b=this._second;this._second=null,b&&b.dispose()}};var Gb=ma.NAryDisposable=function(a){this._disposables=a,this.isDisposed=!1};Gb.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=0,b=this._disposables.length;b>a;a++)this._disposables[a].dispose();this._disposables.length=0}};var Hb=(ma.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?zb:new a(this)},b}(),ma.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||ra,this.disposable=new Db});Hb.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},Hb.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},Hb.prototype.isCancelled=function(){return this.disposable.isDisposed},Hb.prototype.invokeCore=function(){return Cb(this.action(this.scheduler,this.state))};var Ib=ma.Scheduler=function(){function a(){}a.isScheduler=function(b){return b instanceof a};var b=a.prototype;return b.schedule=function(a,b){throw new Ga},b.scheduleFuture=function(b,c,d){var e=c;return e instanceof Date&&(e-=this.now()),e=a.normalize(e),0===e?this.schedule(b,d):this._scheduleFuture(b,e,d)},b._scheduleFuture=function(a,b,c){throw new Ga},a.now=pa,a.prototype.now=pa,a.normalize=function(a){return 0>a&&(a=0),a},a}(),Jb=Ib.normalize,Kb=Ib.isScheduler;!function(a){function b(a,b){function c(b){function d(a,b){return g?f.remove(i):h=!0,e(b,c),zb}var g=!1,h=!1,i=a.schedule(b,d);h||(f.add(i),g=!0)}var d=b[0],e=b[1],f=new vb;return e(d,c),f}function c(a,b){function c(b,d){function g(a,b){return h?f.remove(j):i=!0,e(b,c),zb}var h=!1,i=!1,j=a.scheduleFuture(b,d,g);i||(f.add(j),h=!0)}var d=b[0],e=b[1],f=new vb;return e(d,c),f}a.scheduleRecursive=function(a,c){return this.schedule([a,c],b)},a.scheduleRecursiveFuture=function(a,b,d){return this.scheduleFuture([a,d],b,c)}}(Ib.prototype),function(a){a.schedulePeriodic=function(a,b,c){if("undefined"==typeof la.setInterval)throw new Fa;b=Jb(b);var d=a,e=la.setInterval(function(){d=c(d)},b);return yb(function(){la.clearInterval(e)})}}(Ib.prototype);var Lb,Mb,Nb=function(a){function b(){a.call(this)}return tb(b,a),b.prototype.schedule=function(a,b){return Cb(b(this,a))},b}(Ib),Ob=Ib.immediate=new Nb,Pb=function(a){function b(){for(;d.length>0;){var a=d.dequeue();!a.isCancelled()&&a.invoke()}}function c(){a.call(this)}var d;return tb(c,a),c.prototype.schedule=function(a,c){var f=new Hb(this,a,c,this.now());if(d)d.enqueue(f);else{d=new Wb(4),d.enqueue(f);var g=wa(b)();d=null,g===va&&e(g.e)}return f.disposable},c.prototype.scheduleRequired=function(){return!d},c}(Ib),Qb=Ib.currentThread=new Pb,Rb=(ma.internals.SchedulePeriodicRecursive=function(){function a(a){return function(b,c){c(0,a._period);var d=wa(a._action)(a._state);d===va&&(a._cancel.dispose(),e(d.e)),a._state=d}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new Db;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveFuture(0,this._period,a(this))),b},b}(),function(){var a,b=na;if(la.setTimeout)a=la.setTimeout,b=la.clearTimeout;else{if(!la.WScript)throw new Fa;a=function(a,b){la.WScript.Sleep(b),a()}}return{setTimeout:a,clearTimeout:b}}()),Sb=Rb.setTimeout,Tb=Rb.clearTimeout;!function(){function a(b){if(f)Sb(function(){a(b)},0);else{var c=d[b];if(c){f=!0;var g=wa(c)();Mb(b),f=!1,g===va&&e(g.e)}}}function b(){if(!la.postMessage||la.importScripts)return!1;var a=!1,b=la.onmessage;return la.onmessage=function(){a=!0},la.postMessage("","*"),la.onmessage=b,a}var c=1,d={},f=!1;Mb=function(a){delete d[a]};var g=new RegExp("^"+String(toString).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),h="function"==typeof(h=ga&&ja&&ga.setImmediate)&&!g.test(h)&&h;if(ua(h))Lb=function(b){var e=c++;return d[e]=b,h(function(){a(e)}),e};else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))Lb=function(b){var e=c++;return d[e]=b,process.nextTick(function(){a(e)}),e};else if(b()){var i="ms.rx.schedule"+Math.random(),j=function(b){"string"==typeof b.data&&b.data.substring(0,i.length)===i&&a(b.data.substring(i.length))};la.addEventListener("message",j,!1),Lb=function(a){var b=c++;return d[b]=a,la.postMessage(i+b,"*"),b}}else if(la.MessageChannel){var k=new la.MessageChannel;k.port1.onmessage=function(b){a(b.data)},Lb=function(a){var b=c++;return d[b]=a,k.port2.postMessage(b),b}}else Lb="document"in la&&"onreadystatechange"in la.document.createElement("script")?function(b){var e=la.document.createElement("script"),f=c++;return d[f]=b,e.onreadystatechange=function(){a(f),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},la.document.documentElement.appendChild(e),f}:function(b){var e=c++;return d[e]=b,Sb(function(){a(e)},0),e}}();var Ub=function(a){function b(){a.call(this)}function c(a,b,c,d){return function(){a.setDisposable(xb._fixup(b(c,d)))}}function d(a){this._id=a,this.isDisposed=!1}function e(a){this._id=a,this.isDisposed=!1}return tb(b,a),d.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,Mb(this._id))},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,Tb(this._id))},b.prototype.schedule=function(a,b){var e=new Db,f=Lb(c(e,b,this,a));return new Fb(e,new d(f))},b.prototype._scheduleFuture=function(a,b,d){if(0===b)return this.schedule(a,d);var f=new Db,g=Sb(c(f,d,this,a),b);return new Fb(f,new e(g))},b}(Ib),Vb=Ib["default"]=Ib.async=new Ub;v.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var Wb=ma.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},Xb=Wb.prototype;Xb.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},Xb.percolate=function(a){if(!(a>=this.length||0>a)){var b=a-1>>1;if(!(0>b||b===a)&&this.isHigherPriority(a,b)){var c=this.items[a];this.items[a]=this.items[b],this.items[b]=c,this.percolate(b)}}},Xb.heapify=function(a){if(+a||(a=0),!(a>=this.length||0>a)){var b=2*a+1,c=2*a+2,d=a;if(b0))return void(a.isAcquired=!1);c=a.queue.shift();var d=wa(c)();return d===va?(a.queue=[],a.hasFaulted=!0,e(d.e)):void b(a)}return tb(b,a),b.prototype.next=function(a){this.queue.push(c(this.observer,a))},b.prototype.error=function(a){this.queue.push(d(this.observer,a))},b.prototype.completed=function(){this.queue.push(f(this.observer))},b.prototype.ensureActive=function(){var a=!1;!this.hasFaulted&&this.queue.length>0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(this,g))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(gc),kc=ma.ObservableBase=function(a){function b(a){return a&&ua(a.dispose)?a:ua(a)?yb(a):zb}function c(a,c){var d=c[0],f=c[1],g=wa(f.subscribeCore).call(f,d);g!==va||d.fail(va.e)||e(va.e),d.setDisposable(b(g))}function d(){a.call(this)}return tb(d,a),d.prototype._subscribe=function(a){var b=new je(a),d=[b,this];return Qb.scheduleRequired()?Qb.schedule(d,c):c(null,d),b},d.prototype.subscribeCore=Ha,d}(ic),lc=ma.FlatMapObservable=function(a){function b(b,c,d,e){this.resultSelector=ua(d)?d:null,this.selector=Ma(ua(c)?c:function(){return c},e,3),this.source=b,a.call(this)}function c(a,b,c,d){this.i=0,this.selector=b,this.resultSelector=c,this.source=d,this.o=a,gc.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this.selector,this.resultSelector,this))},tb(c,gc),c.prototype._wrapResult=function(a,b,c){return this.resultSelector?a.map(function(a,d){return this.resultSelector(b,a,c,d)},this):a},c.prototype.next=function(a){var b=this.i++,c=wa(this.selector)(a,b,this.source);return c===va?this.o.onError(c.e):(ta(c)&&(c=Rd(c)),(La(c)||Ka(c))&&(c=ic.from(c)),void this.o.onNext(this._wrapResult(c,a,b)))},c.prototype.error=function(a){this.o.onError(a)},c.prototype.completed=function(){this.o.onCompleted()},b}(kc),mc=ma.internals.Enumerable=function(){};w.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._s.isDisposed=!0)};var nc=function(a){function b(b){this.sources=b,a.call(this)}function c(a,b){if(!a.isDisposed){var c=wa(a.e.next).call(a.e);if(c===va)return a.o.onError(c.e);if(c.done)return a.o.onCompleted();var e=c.value;ta(e)&&(e=Rd(e));var f=new Db;a.subscription.setDisposable(f),f.setDisposable(e.subscribe(new d(a,b)))}}function d(a,b){this._state=a,this._recurse=b,gc.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){var b=new Eb,d={isDisposed:!1,o:a,subscription:b,e:this.sources[Ia]()},e=Qb.scheduleRecursive(d,c);return new Gb([b,e,new w(d)])},tb(d,gc),d.prototype.next=function(a){this._state.o.onNext(a)},d.prototype.error=function(a){this._state.o.onError(a)},d.prototype.completed=function(){this._recurse(this._state)},b}(kc);mc.prototype.concat=function(){return new nc(this)};var oc=function(a){function b(b){this.sources=b,a.call(this)}function c(a,b){if(!a.isDisposed){var c=wa(a.e.next).call(a.e);if(c===va)return a.o.onError(c.e);if(c.done)return null!==a.lastError?a.o.onError(a.lastError):a.o.onCompleted();var e=c.value;ta(e)&&(e=Rd(e));var f=new Db;a.subscription.setDisposable(f),f.setDisposable(e.subscribe(new d(a,b)))}}function d(a,b){this._state=a,this._recurse=b,gc.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){var b=new Eb,d={isDisposed:!1,e:this.sources[Ia](),subscription:b,lastError:null,o:a},e=Qb.scheduleRecursive(d,c);return new Gb([b,e,new w(d)])},tb(d,gc),d.prototype.next=function(a){this._state.o.onNext(a)},d.prototype.error=function(a){this._state.lastError=a,this._recurse(this._state)},d.prototype.completed=function(){this._state.o.onCompleted()},b}(kc);mc.prototype.catchError=function(){return new oc(this)};var pc=function(a){function b(a,b){this.v=a,this.c=null==b?-1:b}function c(a){this.v=a.v,this.l=a.c}return tb(b,a),b.prototype[Ia]=function(){return new c(this)},c.prototype.next=function(){return 0===this.l?Ja:(this.l>0&&this.l--,{done:!1,value:this.v})},b}(mc),qc=mc.repeat=function(a,b){return new pc(a,b)},rc=function(a){function b(a,b,c){ +this.s=a,this.fn=b?Ma(b,c,3):null}function c(a){this.i=-1,this.s=a.s,this.l=this.s.length,this.fn=a.fn}return tb(b,a),b.prototype[Ia]=function(){return new c(this)},c.prototype.next=function(){return++this.id?(a.onNext(b[d]),e(d+1)):a.onCompleted()}}return tb(b,a),b.prototype.subscribeCore=function(a){return this._scheduler.scheduleRecursive(0,c(a,this._args))},b}(kc),Dc=ic.fromArray=function(a,b){return Kb(b)||(b=Qb),new Cc(a,b)},Ec=function(a){function b(){a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return zb},b}(kc),Fc=new Ec,Gc=ic.never=function(){return Fc};ic.of=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return new Cc(b,Qb)},ic.ofWithScheduler=function(a){for(var b=arguments.length,c=new Array(b-1),d=1;b>d;d++)c[d-1]=arguments[d];return new Cc(c,a)};var Hc=function(a){function b(b,c){this._o=b,this._keys=Object.keys(b),this._scheduler=c,a.call(this)}function c(a,b,c){return function(d,e){if(dd?(c.onNext(a+d),e(d+1)):c.onCompleted()}}return tb(b,a),b.prototype.subscribeCore=function(a){return this.scheduler.scheduleRecursive(0,c(this.start,this.rangeCount,a))},b}(kc);ic.range=function(a,b,c){return Kb(c)||(c=Qb),new Ic(a,b,c)};var Jc=function(a){function b(b,c,d){this.value=b,this.repeatCount=null==c?-1:c,this.scheduler=d,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){var b=new G(a,this);return b.run()},b}(kc);G.prototype.run=function(){function a(a,d){return(-1===a||a>0)&&(b.onNext(c),a>0&&a--),0===a?b.onCompleted():void d(a)}var b=this.observer,c=this.parent.value;return this.parent.scheduler.scheduleRecursive(this.parent.repeatCount,a)},ic.repeat=function(a,b,c){return Kb(c)||(c=Qb),new Jc(a,b,c)};var Kc=function(a){function b(b,c){this._value=b,this._scheduler=c,a.call(this)}function c(a,b){var c=b[0],d=b[1];return d.onNext(c),d.onCompleted(),zb}return tb(b,a),b.prototype.subscribeCore=function(a){var b=[this._value,a];return this._scheduler===Ob?c(null,b):this._scheduler.schedule(b,c)},b}(kc),Lc=(ic["return"]=ic.just=function(a,b){return Kb(b)||(b=Ob),new Kc(a,b)},function(a){function b(b,c){this._error=b,this._scheduler=c,a.call(this)}function c(a,b){var c=b[0],d=b[1];return d.onError(c),zb}return tb(b,a),b.prototype.subscribeCore=function(a){var b=[this._error,a];return this._scheduler===Ob?c(null,b):this._scheduler.schedule(b,c)},b}(kc)),Mc=ic["throw"]=function(a,b){return Kb(b)||(b=Ob),new Lc(a,b)},Nc=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){var b=new Db,c=new Eb;return c.setDisposable(b),b.setDisposable(this.source.subscribe(new Oc(a,c,this._fn))),c},b}(kc),Oc=function(a){function b(b,c,d){this._o=b,this._s=c,this._fn=d,a.call(this)}return tb(b,a),b.prototype.next=function(a){this._o.onNext(a)},b.prototype.completed=function(){return this._o.onCompleted()},b.prototype.error=function(a){var b=wa(this._fn)(a);if(b===va)return this._o.onError(b.e);ta(b)&&(b=Rd(b));var c=new Db;this._s.setDisposable(c),c.setDisposable(b.subscribe(this._o))},b}(gc);Yb["catch"]=function(a){return ua(a)?new Nc(this,a):Pc([this,a])};var Pc=ic["catch"]=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{var b=arguments.length;a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}return sc(a).catchError()};Yb.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return Array.isArray(b[0])?b[0].unshift(this):b.unshift(this),Sc.apply(this,b)};var Qc=function(a){function b(b,c){this._params=b,this._cb=c,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){for(var b=this._params.length,c=new Array(b),d={hasValue:u(b,H),hasValueAll:!1,isDone:u(b,H),values:new Array(b)},e=0;b>e;e++){var f=this._params[e],g=new Db;c[e]=g,ta(f)&&(f=Rd(f)),g.setDisposable(f.subscribe(new Rc(a,e,this._cb,d)))}return new Gb(c)},b}(kc),Rc=function(a){function b(b,c,d,e){this._o=b,this._i=c,this._cb=d,this._state=e,a.call(this)}function c(a){return function(b,c){return c!==a}}return tb(b,a),b.prototype.next=function(a){if(this._state.values[this._i]=a,this._state.hasValue[this._i]=!0,this._state.hasValueAll||(this._state.hasValueAll=this._state.hasValue.every(oa))){var b=wa(this._cb).apply(null,this._state.values);if(b===va)return this._o.onError(b.e);this._o.onNext(b)}else this._state.isDone.filter(c(this._i)).every(oa)&&this._o.onCompleted()},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._state.isDone[this._i]=!0,this._state.isDone.every(oa)&&this._o.onCompleted()},b}(gc),Sc=ic.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=ua(b[a-1])?b.pop():I;return Array.isArray(b[0])&&(b=b[0]),new Qc(b,d)};Yb.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),Vc.apply(null,a)};var Tc=function(a){function b(b,c){this._s=b,this._fn=c,a.call(this)}return tb(b,a),b.prototype.next=function(a){this._s.o.onNext(a)},b.prototype.error=function(a){this._s.o.onError(a)},b.prototype.completed=function(){this._s.i++,this._fn(this._s)},b}(gc),Uc=function(a){function b(b){this._sources=b,a.call(this)}function c(a,b){if(!a.disposable.isDisposed){if(a.i===a.sources.length)return a.o.onCompleted();var c=a.sources[a.i];ta(c)&&(c=Rd(c));var d=new Db;a.subscription.setDisposable(d),d.setDisposable(c.subscribe(new Tc(a,b)))}}return tb(b,a),b.prototype.subscribeCore=function(a){var b=new Eb,d=yb(na),e={o:a,i:0,subscription:b,disposable:d,sources:this._sources},f=Ob.scheduleRecursive(e,c);return new Gb([b,d,f])},b}(kc),Vc=ic.concat=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{a=new Array(arguments.length);for(var b=0,c=arguments.length;c>b;b++)a[b]=arguments[b]}return new Uc(a)};Yb.concatAll=function(){return this.merge(1)};var Wc=function(a){function b(b,c){this.source=b,this.maxConcurrent=c,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){var b=new vb;return b.add(this.source.subscribe(new Xc(a,this.maxConcurrent,b))),b},b}(kc),Xc=function(a){function b(b,c,d){this.o=b,this.max=c,this.g=d,this.done=!1,this.q=[],this.activeCount=0,a.call(this)}function c(b,c){this.parent=b,this.sad=c,a.call(this)}return tb(b,a),b.prototype.handleSubscribe=function(a){var b=new Db;this.g.add(b),ta(a)&&(a=Rd(a)),b.setDisposable(a.subscribe(new c(this,b)))},b.prototype.next=function(a){this.activeCount0?this.parent.handleSubscribe(this.parent.q.shift()):(this.parent.activeCount--,this.parent.done&&0===this.parent.activeCount&&this.parent.o.onCompleted())},b}(gc);Yb.merge=function(a){return"number"!=typeof a?Yc(this,a):new Wc(this,a)};var Yc=ic.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(Kb(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=Ob,b=0;d>b;b++)c.push(arguments[b]);else for(a=Ob,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),F(a,c).mergeAll()},Zc=ma.CompositeError=function(a){this.innerErrors=a,this.message="This contains multiple errors. Check the innerErrors",Error.call(this)};Zc.prototype=Object.create(Error.prototype),Zc.prototype.name="CompositeError";var $c=function(a){function b(b){this.source=b,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){var b=new vb,c=new Db,d={isStopped:!1,errors:[],o:a};return b.add(c),c.setDisposable(this.source.subscribe(new _c(b,d))),b},b}(kc),_c=function(a){function b(b,c){this._group=b,this._state=c,a.call(this)}function c(a,b){0===b.length?a.onCompleted():1===b.length?a.onError(b[0]):a.onError(new Zc(b))}function d(b,c,d){this._inner=b,this._group=c,this._state=d,a.call(this)}return tb(b,a),b.prototype.next=function(a){var b=new Db;this._group.add(b),ta(a)&&(a=Rd(a)),b.setDisposable(a.subscribe(new d(b,this._group,this._state)))},b.prototype.error=function(a){this._state.errors.push(a),this._state.isStopped=!0,1===this._group.length&&c(this._state.o,this._state.errors)},b.prototype.completed=function(){this._state.isStopped=!0,1===this._group.length&&c(this._state.o,this._state.errors)},tb(d,a),d.prototype.next=function(a){this._state.o.onNext(a)},d.prototype.error=function(a){this._state.errors.push(a),this._group.remove(this._inner),this._state.isStopped&&1===this._group.length&&c(this._state.o,this._state.errors)},d.prototype.completed=function(){this._group.remove(this._inner),this._state.isStopped&&1===this._group.length&&c(this._state.o,this._state.errors)},b}(gc);ic.mergeDelayError=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{var b=arguments.length;a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}var d=F(null,a);return new $c(d)};var ad=function(a){function b(b){this.source=b,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){var b=new vb,c=new Db;return b.add(c),c.setDisposable(this.source.subscribe(new bd(a,b))),b},b}(kc),bd=function(a){function b(b,c){this.o=b,this.g=c,this.done=!1,a.call(this)}function c(b,c){this.parent=b,this.sad=c,a.call(this)}return tb(b,a),b.prototype.next=function(a){var b=new Db;this.g.add(b),ta(a)&&(a=Rd(a)),b.setDisposable(a.subscribe(new c(this,b)))},b.prototype.error=function(a){this.o.onError(a)},b.prototype.completed=function(){this.done=!0,1===this.g.length&&this.o.onCompleted()},tb(c,a),c.prototype.next=function(a){this.parent.o.onNext(a)},c.prototype.error=function(a){this.parent.o.onError(a)},c.prototype.completed=function(){this.parent.g.remove(this.sad),this.parent.done&&1===this.parent.g.length&&this.parent.o.onCompleted()},b}(gc);Yb.mergeAll=function(){return new ad(this)};var cd=function(a){function b(b,c){this._s=b,this._o=ta(c)?Rd(c):c,this._open=!1,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){var b=new Db;b.setDisposable(this._s.subscribe(new dd(a,this))),ta(this._o)&&(this._o=Rd(this._o));var c=new Db;return c.setDisposable(this._o.subscribe(new ed(a,this,c))),new Fb(b,c)},b}(kc),dd=function(a){function b(b,c){this._o=b,this._p=c,a.call(this)}return tb(b,a),b.prototype.next=function(a){this._p._open&&this._o.onNext(a)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.onCompleted=function(){this._p._open&&this._o.onCompleted()},b}(gc),ed=function(a){function b(b,c,d){this._o=b,this._p=c,this._r=d,a.call(this)}return tb(b,a),b.prototype.next=function(){this._p._open=!0,this._r.dispose()},b.prototype.error=function(a){this._o.onError(a)},b.prototype.onCompleted=function(){this._r.dispose()},b}(gc);Yb.skipUntil=function(a){return new cd(this,a)};var fd=function(a){function b(b){this.source=b,a.call(this)}function c(a,b){this.o=a,this.inner=b,this.stopped=!1,this.latest=0,this.hasLatest=!1,gc.call(this)}function d(a,b){this.parent=a,this.id=b,gc.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){var b=new Eb,d=this.source.subscribe(new c(a,b));return new Fb(d,b)},tb(c,gc),c.prototype.next=function(a){var b=new Db,c=++this.latest;this.hasLatest=!0,this.inner.setDisposable(b),ta(a)&&(a=Rd(a)),b.setDisposable(a.subscribe(new d(this,c)))},c.prototype.error=function(a){this.o.onError(a)},c.prototype.completed=function(){this.stopped=!0,!this.hasLatest&&this.o.onCompleted()},tb(d,gc),d.prototype.next=function(a){this.parent.latest===this.id&&this.parent.o.onNext(a)},d.prototype.error=function(a){this.parent.latest===this.id&&this.parent.o.onError(a)},d.prototype.completed=function(){this.parent.latest===this.id&&(this.parent.hasLatest=!1,this.parent.stopped&&this.parent.o.onCompleted())},b}(kc);Yb["switch"]=Yb.switchLatest=function(){return new fd(this)};var gd=function(a){function b(b,c){this.source=b,this.other=ta(c)?Rd(c):c,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return new Fb(this.source.subscribe(a),this.other.subscribe(new hd(a)))},b}(kc),hd=function(a){function b(b){this._o=b,a.call(this)}return tb(b,a),b.prototype.next=function(){this._o.onCompleted()},b.prototype.error=function(a){this._o.onError(a)},b.prototype.onCompleted=na,b}(gc);Yb.takeUntil=function(a){return new gd(this,a)};var id=function(a){function b(b,c,d){this._s=b,this._ss=c,this._cb=d,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){for(var b=this._ss.length,c={hasValue:u(b,H),hasValueAll:!1,values:new Array(b)},d=this._ss.length,e=new Array(d+1),f=0;d>f;f++){var g=this._ss[f],h=new Db;ta(g)&&(g=Rd(g)),h.setDisposable(g.subscribe(new jd(a,f,c))),e[f]=h}var i=new Db;return i.setDisposable(this._s.subscribe(new kd(a,this._cb,c))),e[d]=i,new Gb(e)},b}(kc),jd=function(a){function b(b,c,d){this._o=b,this._i=c,this._state=d,a.call(this)}return tb(b,a),b.prototype.next=function(a){this._state.values[this._i]=a,this._state.hasValue[this._i]=!0,this._state.hasValueAll=this._state.hasValue.every(oa)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=na,b}(gc),kd=function(a){function b(b,c,d){this._o=b,this._cb=c,this._state=d,a.call(this)}return tb(b,a),b.prototype.next=function(a){var b=[a].concat(this._state.values);if(this._state.hasValueAll){var c=wa(this._cb).apply(null,b);return c===va?this._o.onError(c.e):void this._o.onNext(c)}},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(gc);Yb.withLatestFrom=function(){if(0===arguments.length)throw new Error("invalid arguments");for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=ua(b[a-1])?b.pop():I;return Array.isArray(b[0])&&(b=b[0]),new id(this,b,d)};var ld=function(a){function b(b,c){this._s=b,this._cb=c,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){for(var b=this._s.length,c=new Array(b),d=u(b,H),e=u(b,J),f=0;b>f;f++){var g=this._s[f],h=new Db;c[f]=h,ta(g)&&(g=Rd(g)),h.setDisposable(g.subscribe(new md(a,f,this,e,d)))}return new Gb(c)},b}(kc),md=function(a){function b(b,c,d,e,f){this._o=b,this._i=c,this._p=d,this._q=e,this._d=f,a.call(this)}function c(a){return a.length>0}function d(a){return a.shift()}function e(a){return function(b,c){return c!==a}}return tb(b,a),b.prototype.next=function(a){if(this._q[this._i].push(a),this._q.every(c)){var b=this._q.map(d),f=wa(this._p._cb).apply(null,b);if(f===va)return this._o.onError(f.e);this._o.onNext(f)}else this._d.filter(e(this._i)).every(oa)&&this._o.onCompleted()},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._d[this._i]=!0,this._d.every(oa)&&this._o.onCompleted()},b}(gc);Yb.zip=function(){if(0===arguments.length)throw new Error("invalid arguments");for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=ua(b[a-1])?b.pop():I;Array.isArray(b[0])&&(b=b[0]);var e=this;return b.unshift(e),new ld(b,d)},ic.zip=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];Array.isArray(b[0])&&(b=ua(b[1])?b[0].concat(b[1]):b[0]);var d=b.shift();return d.zip.apply(d,b)};var nd=function(a){function b(b,c){this.sources=b,this._cb=c,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){for(var b=this.sources,c=b.length,d=new Array(c),e={q:u(c,J),done:u(c,H),cb:this._cb,o:a},f=0;c>f;f++)!function(a){var c=b[a],f=new Db;(La(c)||Ka(c))&&(c=Bc(c)),d[a]=f,f.setDisposable(c.subscribe(new od(e,a)))}(f);return new Gb(d)},b}(kc),od=function(a){function b(b,c){this._s=b,this._i=c,a.call(this)}function c(a){return a.length>0}function d(a){return a.shift()}function e(a){return function(b,c){return c!==a}}return tb(b,a),b.prototype.next=function(a){if(this._s.q[this._i].push(a),this._s.q.every(c)){var b=this._s.q.map(d),f=wa(this._s.cb).apply(null,b);if(f===va)return this._s.o.onError(f.e);this._s.o.onNext(f)}else this._s.done.filter(e(this._i)).every(oa)&&this._s.o.onCompleted()},b.prototype.error=function(a){this._s.o.onError(a)},b.prototype.completed=function(){this._s.done[this._i]=!0,this._s.done.every(oa)&&this._s.o.onCompleted()},b}(gc);Yb.zipIterable=function(){if(0===arguments.length)throw new Error("invalid arguments");for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=ua(b[a-1])?b.pop():I,e=this;return b.unshift(e),new nd(b,d)},Yb.asObservable=function(){return new ie(K(this),this)};var pd=function(a){function b(b){this.source=b,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new qd(a))},b}(kc),qd=function(a){function b(b){this._o=b,a.call(this)}return tb(b,a),b.prototype.next=function(a){a.accept(this._o)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(gc);Yb.dematerialize=function(){return new pd(this)};var rd=function(a){function b(b,c,d){this.source=b,this.keyFn=c,this.comparer=d,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new sd(a,this.keyFn,this.comparer))},b}(kc),sd=function(a){function b(b,c,d){this.o=b,this.keyFn=c,this.comparer=d,this.hasCurrentKey=!1,this.currentKey=null,a.call(this)}return tb(b,a),b.prototype.next=function(a){var b,c=a;return ua(this.keyFn)&&(c=wa(this.keyFn)(a),c===va)?this.o.onError(c.e):this.hasCurrentKey&&(b=wa(this.comparer)(this.currentKey,c),b===va)?this.o.onError(b.e):void(this.hasCurrentKey&&b||(this.hasCurrentKey=!0,this.currentKey=c,this.o.onNext(a)))},b.prototype.error=function(a){this.o.onError(a)},b.prototype.completed=function(){this.o.onCompleted()},b}(gc);Yb.distinctUntilChanged=function(a,b){return b||(b=qa),new rd(this,a,b)};var td=function(a){function b(b,c,d,e){this.source=b,this._oN=c,this._oE=d,this._oC=e,a.call(this)}function c(a,b){this.o=a,this.t=!b._oN||ua(b._oN)?fc(b._oN||na,b._oE||na,b._oC||na):b._oN,this.isStopped=!1,gc.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this))},tb(c,gc),c.prototype.next=function(a){var b=wa(this.t.onNext).call(this.t,a);b===va&&this.o.onError(b.e),this.o.onNext(a)},c.prototype.error=function(a){var b=wa(this.t.onError).call(this.t,a);return b===va?this.o.onError(b.e):void this.o.onError(a)},c.prototype.completed=function(){var a=wa(this.t.onCompleted).call(this.t);return a===va?this.o.onError(a.e):void this.o.onCompleted()},b}(kc);Yb["do"]=Yb.tap=Yb.doAction=function(a,b,c){return new td(this,a,b,c)},Yb.doOnNext=Yb.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},Yb.doOnError=Yb.tapOnError=function(a,b){return this.tap(na,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},Yb.doOnCompleted=Yb.tapOnCompleted=function(a,b){return this.tap(na,null,"undefined"!=typeof b?function(){a.call(b)}:a)};var ud=function(a){function b(b,c,d){this.source=b,this._fn=Ma(c,d,0),a.call(this)}function c(a,b){this.isDisposed=!1,this._s=a,this._fn=b}return tb(b,a),b.prototype.subscribeCore=function(a){var b=wa(this.source.subscribe).call(this.source,a);return b===va&&(this._fn(),e(b.e)),new c(b,this._fn)},c.prototype.dispose=function(){if(!this.isDisposed){var a=wa(this._s.dispose).call(this._s);this._fn(),a===va&&e(a.e)}},b}(kc);Yb["finally"]=function(a,b){return new ud(this,a,b)};var vd=function(a){function b(b){this.source=b,a.call(this)}function c(a){this.o=a,this.isStopped=!1}return tb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a))},c.prototype.onNext=na,c.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},c.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.o.onCompleted())},c.prototype.dispose=function(){this.isStopped=!0},c.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},b}(kc);Yb.ignoreElements=function(){return new vd(this)};var wd=function(a){function b(b,c){this.source=b,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new xd(a))},b}(kc),xd=function(a){function b(b){this._o=b,a.call(this)}return tb(b,a),b.prototype.next=function(a){this._o.onNext(bc(a))},b.prototype.error=function(a){this._o.onNext(cc(a)),this._o.onCompleted()},b.prototype.completed=function(){this._o.onNext(dc()),this._o.onCompleted()},b}(gc);Yb.materialize=function(){return new wd(this)},Yb.repeat=function(a){return qc(this,a).concat()},Yb.retry=function(a){return qc(this,a).catchError()};var yd=function(a){function b(a){return{isDisposed:!1,dispose:function(){this.isDisposed||(this.isDisposed=!0,a.isDisposed=!0)}}}function c(b,c){this.source=b,this._notifier=c,a.call(this)}return tb(c,a),c.prototype.subscribeCore=function(a){var c,d=new le,e=new le,f=this._notifier(d),g=f.subscribe(e),h=this.source["@@iterator"](),i={isDisposed:!1},j=new Eb,k=Qb.scheduleRecursive(null,function(b,f){if(!i.isDisposed){var g=h.next();if(g.done)return void(c?a.onError(c):a.onCompleted());var k=g.value;ta(k)&&(k=Rd(k));var l=new Db,m=new Db;j.setDisposable(new Fb(m,l)),l.setDisposable(k.subscribe(function(b){a.onNext(b)},function(b){m.setDisposable(e.subscribe(f,function(b){a.onError(b)},function(){a.onCompleted()})),d.onNext(b),l.dispose()},function(){a.onCompleted()}))}});return new Gb([g,j,k,b(i)])},c}(kc);Yb.retryWhen=function(a){return new yd(L(this),a)};var zd=function(a){function b(a){return{isDisposed:!1,dispose:function(){this.isDisposed||(this.isDisposed=!0,a.isDisposed=!0)}}}function c(b,c){this.source=b,this._notifier=c,a.call(this)}return tb(c,a),c.prototype.subscribeCore=function(a){var c,d=new le,e=new le,f=this._notifier(d),g=f.subscribe(e),h=this.source["@@iterator"](),i={isDisposed:!1},j=new Eb,k=Qb.scheduleRecursive(null,function(b,f){if(!i.isDisposed){var g=h.next();if(g.done)return void(c?a.onError(c):a.onCompleted());var k=g.value;ta(k)&&(k=Rd(k));var l=new Db,m=new Db;j.setDisposable(new Fb(m,l)),l.setDisposable(k.subscribe(function(b){a.onNext(b)},function(b){a.onError(b)},function(){m.setDisposable(e.subscribe(f,function(b){a.onError(b)},function(){a.onCompleted()})),d.onNext(null),l.dispose()}))}});return new Gb([g,j,k,b(i)])},c}(kc);Yb.repeatWhen=function(a){return new zd(L(this),a)};var Ad=function(a){function b(b,c,d,e){this.source=b,this.accumulator=c,this.hasSeed=d,this.seed=e,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Bd(a,this))},b}(kc),Bd=function(a){function b(b,c){this._o=b,this._p=c,this._fn=c.accumulator,this._hs=c.hasSeed,this._s=c.seed,this._ha=!1,this._a=null,this._hv=!1,this._i=0,a.call(this)}return tb(b,a),b.prototype.next=function(a){return!this._hv&&(this._hv=!0),this._ha?this._a=wa(this._fn)(this._a,a,this._i,this._p):(this._a=this._hs?wa(this._fn)(this._s,a,this._i,this._p):a,this._ha=!0),this._a===va?this._o.onError(this._a.e):(this._o.onNext(this._a),void this._i++)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){!this._hv&&this._hs&&this._o.onNext(this._s),this._o.onCompleted()},b}(gc);Yb.scan=function(){var a,b=!1,c=arguments[0];return 2===arguments.length&&(b=!0,a=arguments[1]),new Ad(this,c,b,a)};var Cd=function(a){function b(b,c){this.source=b,this._c=c,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Dd(a,this._c))},b}(kc),Dd=function(a){function b(b,c){this._o=b,this._c=c,this._q=[],a.call(this)}return tb(b,a),b.prototype.next=function(a){this._q.push(a),this._q.length>this._c&&this._o.onNext(this._q.shift())},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(gc);Yb.skipLast=function(a){if(0>a)throw new Ea;return new Cd(this,a)},Yb.startWith=function(){var a,b=0;arguments.length&&Kb(arguments[0])?(a=arguments[0],b=1):a=Ob;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return sc([Dc(c,a),this]).concat()};var Ed=function(a){function b(b,c){this._o=b,this._c=c,this._q=[],a.call(this)}return tb(b,a),b.prototype.next=function(a){this._q.push(a),this._q.length>this._c&&this._q.shift()},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){for(;this._q.length>0;)this._o.onNext(this._q.shift());this._o.onCompleted()},b}(gc);Yb.takeLast=function(a){if(0>a)throw new Ea;var b=this;return new ie(function(c){return b.subscribe(new Ed(c,a))},b)},Yb.flatMapConcat=Yb.concatMap=function(a,b,c){return new lc(this,a,b,c).merge(1)};var Fd=function(a){function b(b,c,d){this.source=b,this.selector=Ma(c,d,3),a.call(this)}function c(a,b){return function(c,d,e){return a.call(this,b.selector(c,d,e),d,e)}}function d(a,b,c){this.o=a,this.selector=b,this.source=c,this.i=0,gc.call(this)}return tb(b,a),b.prototype.internalMap=function(a,d){return new b(this.source,c(a,this),d)},b.prototype.subscribeCore=function(a){return this.source.subscribe(new d(a,this.selector,this))},tb(d,gc),d.prototype.next=function(a){var b=wa(this.selector)(a,this.i++,this.source);return b===va?this.o.onError(b.e):void this.o.onNext(b)},d.prototype.error=function(a){this.o.onError(a)},d.prototype.completed=function(){this.o.onCompleted()},b}(kc);Yb.map=Yb.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof Fd?this.internalMap(c,b):new Fd(this,c,b)},Yb.pluck=function(){var a=arguments.length,b=new Array(a);if(0===a)throw new Error("List of properties cannot be empty.");for(var c=0;a>c;c++)b[c]=arguments[c];return this.map(M(b,a))},Yb.flatMap=Yb.selectMany=function(a,b,c){return new lc(this,a,b,c).mergeAll()},ma.Observable.prototype.flatMapLatest=function(a,b,c){return new lc(this,a,b,c).switchLatest()};var Gd=function(a){function b(b,c){this.source=b,this._count=c,a.call(this)}function c(a,b){this._o=a,this._r=b,gc.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this._count))},tb(c,gc),c.prototype.next=function(a){this._r<=0?this._o.onNext(a):this._r--},c.prototype.error=function(a){this._o.onError(a)},c.prototype.completed=function(){this._o.onCompleted()},b}(kc);Yb.skip=function(a){if(0>a)throw new Ea;return new Gd(this,a)};var Hd=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Id(a,this))},b}(kc),Id=function(a){function b(b,c){this._o=b,this._p=c,this._i=0,this._r=!1,a.call(this)}return tb(b,a),b.prototype.next=function(a){if(!this._r){var b=wa(this._p._fn)(a,this._i++,this._p);if(b===va)return this._o.onError(b.e);this._r=!b}this._r&&this._o.onNext(a)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(gc);Yb.skipWhile=function(a,b){var c=Ma(a,b,3);return new Hd(this,c)};var Jd=function(a){function b(b,c){this.source=b,this._count=c,a.call(this)}function c(a,b){this._o=a,this._c=b,this._r=b,gc.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new c(a,this._count))},tb(c,gc),c.prototype.next=function(a){this._r-->0&&(this._o.onNext(a),this._r<=0&&this._o.onCompleted())},c.prototype.error=function(a){this._o.onError(a)},c.prototype.completed=function(){this._o.onCompleted()},b}(kc);Yb.take=function(a,b){if(0>a)throw new Ea;return 0===a?yc(b):new Jd(this,a)};var Kd=function(a){function b(b,c){this.source=b,this._fn=c,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new Ld(a,this))},b}(kc),Ld=function(a){function b(b,c){this._o=b,this._p=c,this._i=0,this._r=!0,a.call(this)}return tb(b,a),b.prototype.next=function(a){return this._r&&(this._r=wa(this._p._fn)(a,this._i++,this._p),this._r===va)?this._o.onError(this._r.e):void(this._r?this._o.onNext(a):this._o.onCompleted())},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(gc);Yb.takeWhile=function(a,b){var c=Ma(a,b,3);return new Kd(this,c)};var Md=function(a){function b(b,c,d){this.source=b,this.predicate=Ma(c,d,3),a.call(this)}function c(a,b){return function(c,d,e){return b.predicate(c,d,e)&&a.call(this,c,d,e)}}function d(a,b,c){this.o=a,this.predicate=b,this.source=c,this.i=0,gc.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new d(a,this.predicate,this))},b.prototype.internalFilter=function(a,d){return new b(this.source,c(a,this),d)},tb(d,gc),d.prototype.next=function(a){var b=wa(this.predicate)(a,this.i++,this.source);return b===va?this.o.onError(b.e):void(b&&this.o.onNext(a))},d.prototype.error=function(a){this.o.onError(a)},d.prototype.completed=function(){this.o.onCompleted()},b}(kc);Yb.filter=Yb.where=function(a,b){return this instanceof Md?this.internalFilter(a,b):new Md(this,a,b)},ic.fromCallback=function(a,b,c){return function(){"undefined"==typeof b&&(b=this);for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return N(a,b,c,e)}},ic.fromNodeCallback=function(a,b,c){return function(){ +"undefined"==typeof b&&(b=this);for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return P(a,b,c,e)}},S.prototype.dispose=function(){this.isDisposed||(this._e.removeEventListener(this._n,this._fn,!1),this.isDisposed=!0)},ma.config.useNativeEvents=!1;var Nd=function(a){function b(b,c,d){this._el=b,this._n=c,this._fn=d,a.call(this)}function c(a,b){return function(){var c=arguments[0];return ua(b)&&(c=wa(b).apply(null,arguments),c===va)?a.onError(c.e):void a.onNext(c)}}return tb(b,a),b.prototype.subscribeCore=function(a){return T(this._el,this._n,c(a,this._fn))},b}(kc);ic.fromEvent=function(a,b,c){return a.addListener?Pd(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c):ma.config.useNativeEvents||"function"!=typeof a.on||"function"!=typeof a.off?new Nd(a,b,c).publish().refCount():Pd(function(c){a.on(b,c)},function(c){a.off(b,c)},c)};var Od=function(a){function b(b,c,d){this._add=b,this._del=c,this._fn=d,a.call(this)}function c(a,b){return function(){var c=arguments[0];return ua(b)&&(c=wa(b).apply(null,arguments),c===va)?a.onError(c.e):void a.onNext(c)}}function d(a,b,c){this._del=a,this._fn=b,this._ret=c,this.isDisposed=!1}return tb(b,a),b.prototype.subscribeCore=function(a){var b=c(a,this._fn),e=this._add(b);return new d(this._del,b,e)},d.prototype.dispose=function(){this.isDisposed||(ua(this._del)&&this._del(this._fn,this._ret),this.isDisposed=!0)},b}(kc),Pd=ic.fromEventPattern=function(a,b,c){return new Od(a,b,c).publish().refCount()},Qd=function(a){function b(b,c){this._p=b,this._s=c,a.call(this)}function c(a,b){var c=b[0],d=b[1];c.onNext(d),c.onCompleted()}function d(a,b){var c=b[0],d=b[1];c.onError(d)}return tb(b,a),b.prototype.subscribeCore=function(a){var b=new Db,e=this;return this._p.then(function(d){b.setDisposable(e._s.schedule([a,d],c))},function(c){b.setDisposable(e._s.schedule([a,c],d))}),b},b}(kc),Rd=ic.fromPromise=function(a,b){return b||(b=Vb),new Qd(a,b)};Yb.toPromise=function(a){if(a||(a=ma.config.Promise),!a)throw new Fa("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d;b.subscribe(function(a){d=a},c,function(){a(d)})})},ic.startAsync=function(a){var b=wa(a)();return b===va?Mc(b.e):Rd(b)};var Sd=function(a){function b(b,c,d){this.source=b,this._fn1=c,this._fn2=d,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){var b=this.source.multicast(this._fn1());return new Fb(this._fn2(b).subscribe(a),b.connect())},b}(kc);Yb.multicast=function(a,b){return ua(a)?new Sd(this,a,b):new Ud(this,a)},Yb.publish=function(a){return a&&ua(a)?this.multicast(function(){return new le},a):this.multicast(new le)},Yb.share=function(){return this.publish().refCount()},Yb.publishLast=function(a){return a&&ua(a)?this.multicast(function(){return new me},a):this.multicast(new me)},Yb.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new oe(b)},a):this.multicast(new oe(a))},Yb.shareValue=function(a){return this.publishValue(a).refCount()},Yb.replay=function(a,b,c,d){return a&&ua(a)?this.multicast(function(){return new pe(b,c,d)},a):this.multicast(new pe(b,c,d))},Yb.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};var Td=function(a){function b(b){this.source=b,this._count=0,this._connectableSubscription=null,a.call(this)}function c(a,b){this._p=a,this._s=b,this.isDisposed=!1}return tb(b,a),b.prototype.subscribeCore=function(a){var b=this.source.subscribe(a);return 1===++this._count&&(this._connectableSubscription=this.source.connect()),new c(this,b)},c.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._s.dispose(),0===--this._p._count&&this._p._connectableSubscription.dispose())},b}(kc),Ud=ma.ConnectableObservable=function(a){function b(b,c){this.source=b,this._connection=null,this._source=b.asObservable(),this._subject=c,a.call(this)}function c(a,b){this._p=a,this._s=b}return tb(b,a),c.prototype.dispose=function(){this._s&&(this._s.dispose(),this._s=null,this._p._connection=null)},b.prototype.connect=function(){if(!this._connection){var a=this._source.subscribe(this._subject);this._connection=new c(this,a)}return this._connection},b.prototype._subscribe=function(a){return this._subject.subscribe(a)},b.prototype.refCount=function(){return new Td(this)},b}(ic),Vd=function(a){function b(b,c){this._dt=b,this._s=c,a.call(this)}function c(a,b){b.onNext(0),b.onCompleted()}return tb(b,a),b.prototype.subscribeCore=function(a){return this._s.scheduleFuture(a,this._dt,c)},b}(kc),Wd=ic.interval=function(a,b){return W(a,a,Kb(b)?b:Vb)};ic.timer=function(b,c,d){var e;return Kb(d)||(d=Vb),null!=c&&"number"==typeof c?e=c:Kb(c)&&(d=c),(b instanceof Date||"number"==typeof b)&&e===a?U(b,d):b instanceof Date&&e!==a?V(b,c,d):W(b,e,d)};Yb.delay=function(){var a=arguments[0];if("number"==typeof a||a instanceof Date){var b=a,c=arguments[1];return Kb(c)||(c=Vb),b instanceof Date?Y(this,b,c):X(this,b,c)}if(ic.isObservable(a)||ua(a))return Z(this,a,arguments[1]);throw new Error("Invalid arguments")};var Xd=function(a){function b(b,c,d){Kb(d)||(d=Vb),this.source=b,this._dt=c,this._s=d,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){var b=new Eb;return new Fb(this.source.subscribe(new Yd(a,this._dt,this._s,b)),b)},b}(kc),Yd=function(a){function b(b,c,d,e){this._o=b,this._d=c,this._scheduler=d,this._c=e,this._v=null,this._hv=!1,this._id=0,a.call(this)}return tb(b,a),b.prototype.next=function(a){this._hv=!0,this._v=a;var b=++this._id,c=new Db;this._c.setDisposable(c),c.setDisposable(this._scheduler.scheduleFuture(this,this._d,function(c,d){d._hv&&d._id===b&&d._o.onNext(a),d._hv=!1}))},b.prototype.error=function(a){this._c.dispose(),this._o.onError(a),this._hv=!1,this._id++},b.prototype.completed=function(){this._c.dispose(),this._hv&&this._o.onNext(this._v),this._o.onCompleted(),this._hv=!1,this._id++},b}(gc);Yb.debounce=function(){if(ua(arguments[0]))return $(this,arguments[0]);if("number"==typeof arguments[0])return new Xd(this,arguments[0],arguments[1]);throw new Error("Invalid arguments")};var Zd=function(a){function b(b,c){this.source=b,this._s=c,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new $d(a,this._s))},b}(kc),$d=function(a){function b(b,c){this._o=b,this._s=c,a.call(this)}return tb(b,a),b.prototype.next=function(a){this._o.onNext({value:a,timestamp:this._s.now()})},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._o.onCompleted()},b}(gc);Yb.timestamp=function(a){return Kb(a)||(a=Vb),new Zd(this,a)};var _d=function(a){function b(b,c){this.source=b,this._sampler=c,a.call(this)}return tb(b,a),b.prototype.subscribeCore=function(a){var b={o:a,atEnd:!1,value:null,hasValue:!1,sourceSubscription:new Db};return b.sourceSubscription.setDisposable(this.source.subscribe(new be(b))),new Fb(b.sourceSubscription,this._sampler.subscribe(new ae(b)))},b}(kc),ae=function(a){function b(b){this._s=b,a.call(this)}return tb(b,a),b.prototype._handleMessage=function(){this._s.hasValue&&(this._s.hasValue=!1,this._s.o.onNext(this._s.value)),this._s.atEnd&&this._s.o.onCompleted()},b.prototype.next=function(){this._handleMessage()},b.prototype.error=function(a){this._s.onError(a)},b.prototype.completed=function(){this._handleMessage()},b}(gc),be=function(a){function b(b){this._s=b,a.call(this)}return tb(b,a),b.prototype.next=function(a){this._s.hasValue=!0,this._s.value=a},b.prototype.error=function(a){this._s.o.onError(a)},b.prototype.completed=function(){this._s.atEnd=!0,this._s.sourceSubscription.dispose()},b}(gc);Yb.sample=function(a,b){return Kb(b)||(b=Vb),"number"==typeof a?new _d(this,Wd(a,b)):new _d(this,a)};var ce=ma.TimeoutError=function(a){this.message=a||"Timeout has occurred",this.name="TimeoutError",Error.call(this)};ce.prototype=Object.create(Error.prototype),Yb.timeout=function(){var a=arguments[0];if(a instanceof Date||"number"==typeof a)return aa(this,a,arguments[1],arguments[2]);if(ic.isObservable(a)||ua(a))return _(this,a,arguments[1],arguments[2]);throw new Error("Invalid arguments")},Yb.throttle=function(a,b){Kb(b)||(b=Vb);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new ie(function(a){var e=0;return d.subscribe(function(d){var f=b.now();(0===e||f-e>=c)&&(e=f,a.onNext(d))},function(b){a.onError(b)},function(){a.onCompleted()})},d)};var de=function(a){function b(b,c){this.source=b,this.controller=new le,c&&c.subscribe?this.pauser=this.controller.merge(c):this.pauser=this.controller,a.call(this)}return tb(b,a),b.prototype._subscribe=function(a){var b=this.source.publish(),c=b.subscribe(a),d=zb,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=zb)});return new Gb([c,d,e])},b.prototype.pause=function(){this.controller.onNext(!1)},b.prototype.resume=function(){this.controller.onNext(!0)},b}(ic);Yb.pausable=function(a){return new de(this,a)};var ee=function(b){function c(a,c){this.source=a,this.controller=new le,c&&c.subscribe?this.pauser=this.controller.merge(c):this.pauser=this.controller,b.call(this)}return tb(c,b),c.prototype._subscribe=function(b){function c(){for(;e.length>0;)b.onNext(e.shift())}var d,e=[],f=ba(this.source,this.pauser.startWith(!1).distinctUntilChanged(),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(f){d!==a&&f.shouldFire!==d?(d=f.shouldFire,f.shouldFire&&c()):(d=f.shouldFire,f.shouldFire?b.onNext(f.data):e.push(f.data))},function(a){c(),b.onError(a)},function(){c(),b.onCompleted()});return f},c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(ic);Yb.pausableBuffered=function(a){return new ee(this,a)};var fe=function(a){function b(b,c,d){a.call(this),this.subject=new ge(c,d),this.source=b.multicast(this.subject).refCount()}return tb(b,a),b.prototype._subscribe=function(a){return this.source.subscribe(a)},b.prototype.request=function(a){return this.subject.request(null==a?-1:a)},b}(ic),ge=function(a){function b(b,c){null==b&&(b=!0),a.call(this),this.subject=new le,this.enableQueue=b,this.queue=b?[]:null,this.requestedCount=0,this.requestedDisposable=null,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.scheduler=c||Qb}return tb(b,a),ub(b.prototype,ec,{_subscribe:function(a){return this.subject.subscribe(a)},onCompleted:function(){this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length?this.queue.push(Zb.createOnCompleted()):(this.subject.onCompleted(),this.disposeCurrentRequest())},onError:function(a){this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length?this.queue.push(Zb.createOnError(a)):(this.subject.onError(a),this.disposeCurrentRequest())},onNext:function(a){this.requestedCount<=0?this.enableQueue&&this.queue.push(Zb.createOnNext(a)):(0===this.requestedCount--&&this.disposeCurrentRequest(),this.subject.onNext(a))},_processRequest:function(a){if(this.enableQueue)for(;this.queue.length>0&&(a>0||"N"!==this.queue[0].kind);){var b=this.queue.shift();b.accept(this.subject),"N"===b.kind?a--:(this.disposeCurrentRequest(),this.queue=[])}return a},request:function(a){this.disposeCurrentRequest();var b=this;return this.requestedDisposable=this.scheduler.schedule(a,function(a,c){var d=b._processRequest(c),e=b.hasCompleted||b.hasFailed;return!e&&d>0?(b.requestedCount=d,yb(function(){b.requestedCount=0})):void 0}),this.requestedDisposable},disposeCurrentRequest:function(){this.requestedDisposable&&(this.requestedDisposable.dispose(),this.requestedDisposable=null)}}),b}(ic);Yb.controlled=function(a,b){return a&&Kb(a)&&(b=a,a=!0),null==a&&(a=!0),new fe(this,a,b)},Yb.pipe=function(a){function b(){c.resume()}var c=this.pausableBuffered();return a.addListener("drain",b),c.subscribe(function(b){!a.write(String(b))&&c.pause()},function(b){a.emit("error",b)},function(){!a._isStdio&&a.end(),a.removeListener("drain",b)}),c.resume(),a};var he=function(a){function b(b,c){this._o=b,this._xform=c,a.call(this)}return tb(b,a),b.prototype.next=function(a){var b=wa(this._xform["@@transducer/step"]).call(this._xform,this._o,a);b===va&&this._o.onError(b.e)},b.prototype.error=function(a){this._o.onError(a)},b.prototype.completed=function(){this._xform["@@transducer/result"](this._o)},b}(gc);Yb.transduce=function(a){var b=this;return new ie(function(c){var d=a(ca(c));return b.subscribe(new he(c,d))},b)};var ie=ma.AnonymousObservable=function(a){function b(a){return a&&ua(a.dispose)?a:ua(a)?yb(a):zb}function c(a,c){var d=c[0],f=c[1],g=wa(f.__subscribe).call(f,d);g!==va||d.fail(va.e)||e(va.e),d.setDisposable(b(g))}function d(b,c){this.source=c,this.__subscribe=b,a.call(this)}return tb(d,a),d.prototype._subscribe=function(a){var b=new je(a),d=[b,this];return Qb.scheduleRequired()?Qb.schedule(d,c):c(null,d),b},d}(ic),je=function(a){function b(b){a.call(this),this.observer=b,this.m=new Db}tb(b,a);var c=b.prototype;return c.next=function(a){var b=wa(this.observer.onNext).call(this.observer,a);b===va&&(this.dispose(),e(b.e))},c.error=function(a){var b=wa(this.observer.onError).call(this.observer,a);this.dispose(),b===va&&e(b.e)},c.completed=function(){var a=wa(this.observer.onCompleted).call(this.observer);this.dispose(),a===va&&e(a.e)},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(gc),ke=function(a,b){this._s=a,this._o=b};ke.prototype.dispose=function(){if(!this._s.isDisposed&&null!==this._o){var a=this._s.observers.indexOf(this._o);this._s.observers.splice(a,1),this._o=null}};var le=ma.Subject=function(a){function b(){a.call(this),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return tb(b,a),ub(b.prototype,ec.prototype,{_subscribe:function(a){return Bb(this),this.isStopped?this.hasError?(a.onError(this.error),zb):(a.onCompleted(),zb):(this.observers.push(a),new ke(this,a))},hasObservers:function(){return Bb(this),this.observers.length>0},onCompleted:function(){if(Bb(this),!this.isStopped){this.isStopped=!0;for(var a=0,b=c(this.observers),d=b.length;d>a;a++)b[a].onCompleted();this.observers.length=0}},onError:function(a){if(Bb(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var b=0,d=c(this.observers),e=d.length;e>b;b++)d[b].onError(a);this.observers.length=0}},onNext:function(a){if(Bb(this),!this.isStopped)for(var b=0,d=c(this.observers),e=d.length;e>b;b++)d[b].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),b.create=function(a,b){return new ne(a,b)},b}(ic),me=ma.AsyncSubject=function(a){function b(){a.call(this),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return tb(b,a),ub(b.prototype,ec.prototype,{_subscribe:function(a){return Bb(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),zb):(this.observers.push(a),new ke(this,a))},hasObservers:function(){return Bb(this),this.observers.length>0},onCompleted:function(){var a,b;if(Bb(this),!this.isStopped){this.isStopped=!0;var d=c(this.observers),b=d.length;if(this.hasValue)for(a=0;b>a;a++){var e=d[a];e.onNext(this.value),e.onCompleted()}else for(a=0;b>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(Bb(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var b=0,d=c(this.observers),e=d.length;e>b;b++)d[b].onError(a);this.observers.length=0}},onNext:function(a){Bb(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.error=null,this.value=null}}),b}(ic),ne=ma.AnonymousSubject=function(a){function b(b,c){this.observer=b,this.observable=c,a.call(this)}return tb(b,a),ub(b.prototype,ec.prototype,{_subscribe:function(a){return this.observable.subscribe(a)},onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),b}(ic),oe=ma.BehaviorSubject=function(a){function b(b){a.call(this),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.hasError=!1}return tb(b,a),ub(b.prototype,ec.prototype,{_subscribe:function(a){return Bb(this),this.isStopped?(this.hasError?a.onError(this.error):a.onCompleted(),zb):(this.observers.push(a),a.onNext(this.value),new ke(this,a))},getValue:function(){return Bb(this),this.hasError&&e(this.error),this.value},hasObservers:function(){return Bb(this),this.observers.length>0},onCompleted:function(){if(Bb(this),!this.isStopped){this.isStopped=!0;for(var a=0,b=c(this.observers),d=b.length;d>a;a++)b[a].onCompleted();this.observers.length=0}},onError:function(a){if(Bb(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var b=0,d=c(this.observers),e=d.length;e>b;b++)d[b].onError(a);this.observers.length=0}},onNext:function(a){if(Bb(this),!this.isStopped){this.value=a;for(var b=0,d=c(this.observers),e=d.length;e>b;b++)d[b].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.error=null}}),b}(ic),pe=ma.ReplaySubject=function(a){function b(a,b){return yb(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function d(b,c,d){this.bufferSize=null==b?e:b,this.windowSize=null==c?e:c,this.scheduler=d||Qb,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this)}var e=Math.pow(2,53)-1;return tb(d,a),ub(d.prototype,ec.prototype,{_subscribe:function(a){Bb(this);var c=new jc(this.scheduler,a),d=b(this,c);this._trim(this.scheduler.now()),this.observers.push(c);for(var e=0,f=this.q.length;f>e;e++)c.onNext(this.q[e].value);return this.hasError?c.onError(this.error):this.isStopped&&c.onCompleted(),c.ensureActive(),d},hasObservers:function(){return Bb(this),this.observers.length>0},_trim:function(a){for(;this.q.length>this.bufferSize;)this.q.shift();for(;this.q.length>0&&a-this.q[0].interval>this.windowSize;)this.q.shift()},onNext:function(a){if(Bb(this),!this.isStopped){var b=this.scheduler.now();this.q.push({interval:b,value:a}),this._trim(b);for(var d=0,e=c(this.observers),f=e.length;f>d;d++){var g=e[d];g.onNext(a),g.ensureActive()}}},onError:function(a){if(Bb(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var b=this.scheduler.now();this._trim(b);for(var d=0,e=c(this.observers),f=e.length;f>d;d++){var g=e[d];g.onError(a),g.ensureActive()}this.observers.length=0}},onCompleted:function(){if(Bb(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var b=0,d=c(this.observers),e=d.length;e>b;b++){var f=d[b];f.onCompleted(),f.ensureActive()}this.observers.length=0}},dispose:function(){this.isDisposed=!0,this.observers=null}}),d}(ic);ma.Pauser=function(a){function b(){a.call(this)}return tb(b,a),b.prototype.pause=function(){this.onNext(!1)},b.prototype.resume=function(){this.onNext(!0)},b}(le),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(la.Rx=ma,define(function(){return ma})):ea&&fa?ja?(fa.exports=ma).Rx=ma:ea.Rx=ma:la.Rx=ma;var qe=j()}).call(this); +//# sourceMappingURL=rx.lite.map \ No newline at end of file diff --git a/node_modules/shebang-command/index.js b/node_modules/shebang-command/index.js new file mode 100644 index 0000000..2de70b0 --- /dev/null +++ b/node_modules/shebang-command/index.js @@ -0,0 +1,19 @@ +'use strict'; +var shebangRegex = require('shebang-regex'); + +module.exports = function (str) { + var match = str.match(shebangRegex); + + if (!match) { + return null; + } + + var arr = match[0].replace(/#! ?/, '').split(' '); + var bin = arr[0].split('/').pop(); + var arg = arr[1]; + + return (bin === 'env' ? + arg : + bin + (arg ? ' ' + arg : '') + ); +}; diff --git a/node_modules/shebang-command/license b/node_modules/shebang-command/license new file mode 100644 index 0000000..0f8cf79 --- /dev/null +++ b/node_modules/shebang-command/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Kevin Martensson (github.com/kevva) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/shebang-command/package.json b/node_modules/shebang-command/package.json new file mode 100644 index 0000000..f780119 --- /dev/null +++ b/node_modules/shebang-command/package.json @@ -0,0 +1,106 @@ +{ + "_args": [ + [ + { + "raw": "shebang-command@^1.2.0", + "scope": null, + "escapedName": "shebang-command", + "name": "shebang-command", + "rawSpec": "^1.2.0", + "spec": ">=1.2.0 <2.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\cross-spawn" + ] + ], + "_from": "shebang-command@>=1.2.0 <2.0.0", + "_id": "shebang-command@1.2.0", + "_inCache": true, + "_location": "/shebang-command", + "_nodeVersion": "6.6.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/shebang-command-1.2.0.tgz_1474530105733_0.9689246460329741" + }, + "_npmUser": { + "name": "kevva", + "email": "kevinmartensson@gmail.com" + }, + "_npmVersion": "3.10.6", + "_phantomChildren": {}, + "_requested": { + "raw": "shebang-command@^1.2.0", + "scope": null, + "escapedName": "shebang-command", + "name": "shebang-command", + "rawSpec": "^1.2.0", + "spec": ">=1.2.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/cross-spawn" + ], + "_resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "_shasum": "44aac65b695b03398968c39f363fee5deafdf1ea", + "_shrinkwrap": null, + "_spec": "shebang-command@^1.2.0", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\cross-spawn", + "author": { + "name": "Kevin Martensson", + "email": "kevinmartensson@gmail.com", + "url": "github.com/kevva" + }, + "bugs": { + "url": "https://github.com/kevva/shebang-command/issues" + }, + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "description": "Get the command from a shebang", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "44aac65b695b03398968c39f363fee5deafdf1ea", + "tarball": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "01de9b7d355f21e00417650a6fb1eb56321bc23c", + "homepage": "https://github.com/kevva/shebang-command#readme", + "keywords": [ + "cmd", + "command", + "parse", + "shebang" + ], + "license": "MIT", + "maintainers": [ + { + "name": "kevva", + "email": "kevinmartensson@gmail.com" + } + ], + "name": "shebang-command", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/kevva/shebang-command.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.2.0", + "xo": { + "ignores": [ + "test.js" + ] + } +} diff --git a/node_modules/shebang-command/readme.md b/node_modules/shebang-command/readme.md new file mode 100644 index 0000000..16b0be4 --- /dev/null +++ b/node_modules/shebang-command/readme.md @@ -0,0 +1,39 @@ +# shebang-command [![Build Status](https://travis-ci.org/kevva/shebang-command.svg?branch=master)](https://travis-ci.org/kevva/shebang-command) + +> Get the command from a shebang + + +## Install + +``` +$ npm install --save shebang-command +``` + + +## Usage + +```js +const shebangCommand = require('shebang-command'); + +shebangCommand('#!/usr/bin/env node'); +//=> 'node' + +shebangCommand('#!/bin/bash'); +//=> 'bash' +``` + + +## API + +### shebangCommand(string) + +#### string + +Type: `string` + +String containing a shebang. + + +## License + +MIT © [Kevin Martensson](http://github.com/kevva) diff --git a/node_modules/shebang-regex/index.js b/node_modules/shebang-regex/index.js new file mode 100644 index 0000000..d052d2e --- /dev/null +++ b/node_modules/shebang-regex/index.js @@ -0,0 +1,2 @@ +'use strict'; +module.exports = /^#!.*/; diff --git a/node_modules/shebang-regex/license b/node_modules/shebang-regex/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/shebang-regex/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/shebang-regex/package.json b/node_modules/shebang-regex/package.json new file mode 100644 index 0000000..d9d79b4 --- /dev/null +++ b/node_modules/shebang-regex/package.json @@ -0,0 +1,96 @@ +{ + "_args": [ + [ + { + "raw": "shebang-regex@^1.0.0", + "scope": null, + "escapedName": "shebang-regex", + "name": "shebang-regex", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\shebang-command" + ] + ], + "_from": "shebang-regex@>=1.0.0 <2.0.0", + "_id": "shebang-regex@1.0.0", + "_inCache": true, + "_location": "/shebang-regex", + "_nodeVersion": "0.12.0", + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "2.5.1", + "_phantomChildren": {}, + "_requested": { + "raw": "shebang-regex@^1.0.0", + "scope": null, + "escapedName": "shebang-regex", + "name": "shebang-regex", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/shebang-command" + ], + "_resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "_shasum": "da42f49740c0b42db2ca9728571cb190c98efea3", + "_shrinkwrap": null, + "_spec": "shebang-regex@^1.0.0", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\shebang-command", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/shebang-regex/issues" + }, + "dependencies": {}, + "description": "Regular expression for matching a shebang", + "devDependencies": { + "ava": "0.0.4" + }, + "directories": {}, + "dist": { + "shasum": "da42f49740c0b42db2ca9728571cb190c98efea3", + "tarball": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "cb774c70d5f569479ca997abf8ee7e558e617284", + "homepage": "https://github.com/sindresorhus/shebang-regex", + "keywords": [ + "re", + "regex", + "regexp", + "shebang", + "match", + "test" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "shebang-regex", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/shebang-regex.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.0" +} diff --git a/node_modules/shebang-regex/readme.md b/node_modules/shebang-regex/readme.md new file mode 100644 index 0000000..ef75e51 --- /dev/null +++ b/node_modules/shebang-regex/readme.md @@ -0,0 +1,29 @@ +# shebang-regex [![Build Status](https://travis-ci.org/sindresorhus/shebang-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/shebang-regex) + +> Regular expression for matching a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) + + +## Install + +``` +$ npm install --save shebang-regex +``` + + +## Usage + +```js +var shebangRegex = require('shebang-regex'); +var str = '#!/usr/bin/env node\nconsole.log("unicorns");'; + +shebangRegex.test(str); +//=> true + +shebangRegex.exec(str)[0]; +//=> '#!/usr/bin/env node' +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/signal-exit/CHANGELOG.md b/node_modules/signal-exit/CHANGELOG.md new file mode 100644 index 0000000..e2f70d2 --- /dev/null +++ b/node_modules/signal-exit/CHANGELOG.md @@ -0,0 +1,27 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +## [3.0.1](https://github.com/tapjs/signal-exit/compare/v3.0.0...v3.0.1) (2016-09-08) + + +### Bug Fixes + +* do not listen on SIGBUS, SIGFPE, SIGSEGV and SIGILL ([#40](https://github.com/tapjs/signal-exit/issues/40)) ([5b105fb](https://github.com/tapjs/signal-exit/commit/5b105fb)) + + + + +# [3.0.0](https://github.com/tapjs/signal-exit/compare/v2.1.2...v3.0.0) (2016-06-13) + + +### Bug Fixes + +* get our test suite running on Windows ([#23](https://github.com/tapjs/signal-exit/issues/23)) ([6f3eda8](https://github.com/tapjs/signal-exit/commit/6f3eda8)) +* hooking SIGPROF was interfering with profilers see [#21](https://github.com/tapjs/signal-exit/issues/21) ([#24](https://github.com/tapjs/signal-exit/issues/24)) ([1248a4c](https://github.com/tapjs/signal-exit/commit/1248a4c)) + + +### BREAKING CHANGES + +* signal-exit no longer wires into SIGPROF diff --git a/node_modules/signal-exit/LICENSE.txt b/node_modules/signal-exit/LICENSE.txt new file mode 100644 index 0000000..eead04a --- /dev/null +++ b/node_modules/signal-exit/LICENSE.txt @@ -0,0 +1,16 @@ +The ISC License + +Copyright (c) 2015, Contributors + +Permission to use, copy, modify, and/or distribute this software +for any purpose with or without fee is hereby granted, provided +that the above copyright notice and this permission notice +appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE +LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/signal-exit/README.md b/node_modules/signal-exit/README.md new file mode 100644 index 0000000..8ebccab --- /dev/null +++ b/node_modules/signal-exit/README.md @@ -0,0 +1,40 @@ +# signal-exit + +[![Build Status](https://travis-ci.org/tapjs/signal-exit.png)](https://travis-ci.org/tapjs/signal-exit) +[![Coverage](https://coveralls.io/repos/tapjs/signal-exit/badge.svg?branch=master)](https://coveralls.io/r/tapjs/signal-exit?branch=master) +[![NPM version](https://img.shields.io/npm/v/signal-exit.svg)](https://www.npmjs.com/package/signal-exit) +[![Windows Tests](https://img.shields.io/appveyor/ci/bcoe/signal-exit/master.svg?label=Windows%20Tests)](https://ci.appveyor.com/project/bcoe/signal-exit) +[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) + +When you want to fire an event no matter how a process exits: + +* reaching the end of execution. +* explicitly having `process.exit(code)` called. +* having `process.kill(pid, sig)` called. +* receiving a fatal signal from outside the process + +Use `signal-exit`. + +```js +var onExit = require('signal-exit') + +onExit(function (code, signal) { + console.log('process exited!') +}) +``` + +## API + +`var remove = onExit(function (code, signal) {}, options)` + +The return value of the function is a function that will remove the +handler. + +Note that the function *only* fires for signals if the signal would +cause the proces to exit. That is, there are no other listeners, and +it is a fatal signal. + +## Options + +* `alwaysLast`: Run this handler after any other signal or exit + handlers. This causes `process.emit` to be monkeypatched. diff --git a/node_modules/signal-exit/index.js b/node_modules/signal-exit/index.js new file mode 100644 index 0000000..337f691 --- /dev/null +++ b/node_modules/signal-exit/index.js @@ -0,0 +1,157 @@ +// Note: since nyc uses this module to output coverage, any lines +// that are in the direct sync flow of nyc's outputCoverage are +// ignored, since we can never get coverage for them. +var assert = require('assert') +var signals = require('./signals.js') + +var EE = require('events') +/* istanbul ignore if */ +if (typeof EE !== 'function') { + EE = EE.EventEmitter +} + +var emitter +if (process.__signal_exit_emitter__) { + emitter = process.__signal_exit_emitter__ +} else { + emitter = process.__signal_exit_emitter__ = new EE() + emitter.count = 0 + emitter.emitted = {} +} + +// Because this emitter is a global, we have to check to see if a +// previous version of this library failed to enable infinite listeners. +// I know what you're about to say. But literally everything about +// signal-exit is a compromise with evil. Get used to it. +if (!emitter.infinite) { + emitter.setMaxListeners(Infinity) + emitter.infinite = true +} + +module.exports = function (cb, opts) { + assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler') + + if (loaded === false) { + load() + } + + var ev = 'exit' + if (opts && opts.alwaysLast) { + ev = 'afterexit' + } + + var remove = function () { + emitter.removeListener(ev, cb) + if (emitter.listeners('exit').length === 0 && + emitter.listeners('afterexit').length === 0) { + unload() + } + } + emitter.on(ev, cb) + + return remove +} + +module.exports.unload = unload +function unload () { + if (!loaded) { + return + } + loaded = false + + signals.forEach(function (sig) { + try { + process.removeListener(sig, sigListeners[sig]) + } catch (er) {} + }) + process.emit = originalProcessEmit + process.reallyExit = originalProcessReallyExit + emitter.count -= 1 +} + +function emit (event, code, signal) { + if (emitter.emitted[event]) { + return + } + emitter.emitted[event] = true + emitter.emit(event, code, signal) +} + +// { : , ... } +var sigListeners = {} +signals.forEach(function (sig) { + sigListeners[sig] = function listener () { + // If there are no other listeners, an exit is coming! + // Simplest way: remove us and then re-send the signal. + // We know that this will kill the process, so we can + // safely emit now. + var listeners = process.listeners(sig) + if (listeners.length === emitter.count) { + unload() + emit('exit', null, sig) + /* istanbul ignore next */ + emit('afterexit', null, sig) + /* istanbul ignore next */ + process.kill(process.pid, sig) + } + } +}) + +module.exports.signals = function () { + return signals +} + +module.exports.load = load + +var loaded = false + +function load () { + if (loaded) { + return + } + loaded = true + + // This is the number of onSignalExit's that are in play. + // It's important so that we can count the correct number of + // listeners on signals, and don't wait for the other one to + // handle it instead of us. + emitter.count += 1 + + signals = signals.filter(function (sig) { + try { + process.on(sig, sigListeners[sig]) + return true + } catch (er) { + return false + } + }) + + process.emit = processEmit + process.reallyExit = processReallyExit +} + +var originalProcessReallyExit = process.reallyExit +function processReallyExit (code) { + process.exitCode = code || 0 + emit('exit', process.exitCode, null) + /* istanbul ignore next */ + emit('afterexit', process.exitCode, null) + /* istanbul ignore next */ + originalProcessReallyExit.call(process, process.exitCode) +} + +var originalProcessEmit = process.emit +function processEmit (ev, arg) { + if (ev === 'exit') { + if (arg !== undefined) { + process.exitCode = arg + } + var ret = originalProcessEmit.apply(this, arguments) + emit('exit', process.exitCode, null) + /* istanbul ignore next */ + emit('afterexit', process.exitCode, null) + return ret + } else { + return originalProcessEmit.apply(this, arguments) + } +} diff --git a/node_modules/signal-exit/package.json b/node_modules/signal-exit/package.json new file mode 100644 index 0000000..a296746 --- /dev/null +++ b/node_modules/signal-exit/package.json @@ -0,0 +1,106 @@ +{ + "_args": [ + [ + { + "raw": "signal-exit@^3.0.2", + "scope": null, + "escapedName": "signal-exit", + "name": "signal-exit", + "rawSpec": "^3.0.2", + "spec": ">=3.0.2 <4.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\inquirer\\node_modules\\restore-cursor" + ] + ], + "_from": "signal-exit@>=3.0.2 <4.0.0", + "_id": "signal-exit@3.0.2", + "_inCache": true, + "_location": "/signal-exit", + "_nodeVersion": "6.5.0", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/signal-exit-3.0.2.tgz_1480821660838_0.6809983775019646" + }, + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "3.10.9", + "_phantomChildren": {}, + "_requested": { + "raw": "signal-exit@^3.0.2", + "scope": null, + "escapedName": "signal-exit", + "name": "signal-exit", + "rawSpec": "^3.0.2", + "spec": ">=3.0.2 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/inquirer/restore-cursor" + ], + "_resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "_shasum": "b5fdc08f1287ea1178628e415e25132b73646c6d", + "_shrinkwrap": null, + "_spec": "signal-exit@^3.0.2", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\inquirer\\node_modules\\restore-cursor", + "author": { + "name": "Ben Coe", + "email": "ben@npmjs.com" + }, + "bugs": { + "url": "https://github.com/tapjs/signal-exit/issues" + }, + "dependencies": {}, + "description": "when you want to fire an event no matter how a process exits.", + "devDependencies": { + "chai": "^3.5.0", + "coveralls": "^2.11.10", + "nyc": "^8.1.0", + "standard": "^7.1.2", + "standard-version": "^2.3.0", + "tap": "^8.0.1" + }, + "directories": {}, + "dist": { + "shasum": "b5fdc08f1287ea1178628e415e25132b73646c6d", + "tarball": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz" + }, + "files": [ + "index.js", + "signals.js" + ], + "gitHead": "9c5ad9809fe6135ef22e2623989deaffe2a4fa8a", + "homepage": "https://github.com/tapjs/signal-exit", + "keywords": [ + "signal", + "exit" + ], + "license": "ISC", + "main": "index.js", + "maintainers": [ + { + "name": "bcoe", + "email": "ben@npmjs.com" + }, + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + } + ], + "name": "signal-exit", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/tapjs/signal-exit.git" + }, + "scripts": { + "coverage": "nyc report --reporter=text-lcov | coveralls", + "pretest": "standard", + "release": "standard-version", + "test": "tap --timeout=240 ./test/*.js --cov" + }, + "version": "3.0.2" +} diff --git a/node_modules/signal-exit/signals.js b/node_modules/signal-exit/signals.js new file mode 100644 index 0000000..3bd67a8 --- /dev/null +++ b/node_modules/signal-exit/signals.js @@ -0,0 +1,53 @@ +// This is not the set of all possible signals. +// +// It IS, however, the set of all signals that trigger +// an exit on either Linux or BSD systems. Linux is a +// superset of the signal names supported on BSD, and +// the unknown signals just fail to register, so we can +// catch that easily enough. +// +// Don't bother with SIGKILL. It's uncatchable, which +// means that we can't fire any callbacks anyway. +// +// If a user does happen to register a handler on a non- +// fatal signal like SIGWINCH or something, and then +// exit, it'll end up firing `process.emit('exit')`, so +// the handler will be fired anyway. +// +// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised +// artificially, inherently leave the process in a +// state from which it is not safe to try and enter JS +// listeners. +module.exports = [ + 'SIGABRT', + 'SIGALRM', + 'SIGHUP', + 'SIGINT', + 'SIGTERM' +] + +if (process.platform !== 'win32') { + module.exports.push( + 'SIGVTALRM', + 'SIGXCPU', + 'SIGXFSZ', + 'SIGUSR2', + 'SIGTRAP', + 'SIGSYS', + 'SIGQUIT', + 'SIGIOT' + // should detect profiler and enable/disable accordingly. + // see #21 + // 'SIGPROF' + ) +} + +if (process.platform === 'linux') { + module.exports.push( + 'SIGIO', + 'SIGPOLL', + 'SIGPWR', + 'SIGSTKFLT', + 'SIGUNUSED' + ) +} diff --git a/node_modules/slice-ansi/index.js b/node_modules/slice-ansi/index.js new file mode 100644 index 0000000..634ee9c --- /dev/null +++ b/node_modules/slice-ansi/index.js @@ -0,0 +1,88 @@ +'use strict'; +const isFullwidthCodePoint = require('is-fullwidth-code-point'); + +const ESCAPES = [ + '\u001B', + '\u009B' +]; + +const END_CODE = 39; +const ASTRAL_REGEX = /[\uD800-\uDBFF][\uDC00-\uDFFF]/; + +const ESCAPE_CODES = new Map([ + [0, 0], + [1, 22], + [2, 22], + [3, 23], + [4, 24], + [7, 27], + [8, 28], + [9, 29], + [30, 39], + [31, 39], + [32, 39], + [33, 39], + [34, 39], + [35, 39], + [36, 39], + [37, 39], + [90, 39], + [40, 49], + [41, 49], + [42, 49], + [43, 49], + [44, 49], + [45, 49], + [46, 49], + [47, 49] +]); + +const wrapAnsi = code => `${ESCAPES[0]}[${code}m`; + +module.exports = (str, begin, end) => { + const arr = Array.from(str.normalize()); + + end = typeof end === 'number' ? end : arr.length; + + let insideEscape = false; + let escapeCode; + let visible = 0; + let output = ''; + + for (const item of arr.entries()) { + const i = item[0]; + const x = item[1]; + + let leftEscape = false; + + if (ESCAPES.indexOf(x) !== -1) { + insideEscape = true; + const code = /\d[^m]*/.exec(str.slice(i, i + 4)); + escapeCode = code === END_CODE ? null : code; + } else if (insideEscape && x === 'm') { + insideEscape = false; + leftEscape = true; + } + + if (!insideEscape && !leftEscape) { + ++visible; + } + + if (!ASTRAL_REGEX.test(x) && isFullwidthCodePoint(x.codePointAt())) { + ++visible; + } + + if (visible > begin && visible <= end) { + output += x; + } else if (visible === begin && !insideEscape && escapeCode !== undefined && escapeCode !== END_CODE) { + output += wrapAnsi(escapeCode); + } else if (visible >= end) { + if (escapeCode !== undefined) { + output += wrapAnsi(ESCAPE_CODES.get(parseInt(escapeCode, 10)) || END_CODE); + } + break; + } + } + + return output; +}; diff --git a/node_modules/slice-ansi/license b/node_modules/slice-ansi/license new file mode 100644 index 0000000..4d72633 --- /dev/null +++ b/node_modules/slice-ansi/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) DC + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/slice-ansi/node_modules/is-fullwidth-code-point/index.js b/node_modules/slice-ansi/node_modules/is-fullwidth-code-point/index.js new file mode 100644 index 0000000..d506327 --- /dev/null +++ b/node_modules/slice-ansi/node_modules/is-fullwidth-code-point/index.js @@ -0,0 +1,46 @@ +'use strict'; +/* eslint-disable yoda */ +module.exports = x => { + if (Number.isNaN(x)) { + return false; + } + + // code points are derived from: + // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt + if ( + x >= 0x1100 && ( + x <= 0x115f || // Hangul Jamo + x === 0x2329 || // LEFT-POINTING ANGLE BRACKET + x === 0x232a || // RIGHT-POINTING ANGLE BRACKET + // CJK Radicals Supplement .. Enclosed CJK Letters and Months + (0x2e80 <= x && x <= 0x3247 && x !== 0x303f) || + // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A + (0x3250 <= x && x <= 0x4dbf) || + // CJK Unified Ideographs .. Yi Radicals + (0x4e00 <= x && x <= 0xa4c6) || + // Hangul Jamo Extended-A + (0xa960 <= x && x <= 0xa97c) || + // Hangul Syllables + (0xac00 <= x && x <= 0xd7a3) || + // CJK Compatibility Ideographs + (0xf900 <= x && x <= 0xfaff) || + // Vertical Forms + (0xfe10 <= x && x <= 0xfe19) || + // CJK Compatibility Forms .. Small Form Variants + (0xfe30 <= x && x <= 0xfe6b) || + // Halfwidth and Fullwidth Forms + (0xff01 <= x && x <= 0xff60) || + (0xffe0 <= x && x <= 0xffe6) || + // Kana Supplement + (0x1b000 <= x && x <= 0x1b001) || + // Enclosed Ideographic Supplement + (0x1f200 <= x && x <= 0x1f251) || + // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane + (0x20000 <= x && x <= 0x3fffd) + ) + ) { + return true; + } + + return false; +}; diff --git a/node_modules/slice-ansi/node_modules/is-fullwidth-code-point/license b/node_modules/slice-ansi/node_modules/is-fullwidth-code-point/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/slice-ansi/node_modules/is-fullwidth-code-point/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/slice-ansi/node_modules/is-fullwidth-code-point/package.json b/node_modules/slice-ansi/node_modules/is-fullwidth-code-point/package.json new file mode 100644 index 0000000..e082e44 --- /dev/null +++ b/node_modules/slice-ansi/node_modules/is-fullwidth-code-point/package.json @@ -0,0 +1,125 @@ +{ + "_args": [ + [ + { + "raw": "is-fullwidth-code-point@^2.0.0", + "scope": null, + "escapedName": "is-fullwidth-code-point", + "name": "is-fullwidth-code-point", + "rawSpec": "^2.0.0", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\inquirer\\node_modules\\string-width" + ], + [ + { + "raw": "is-fullwidth-code-point@^2.0.0", + "scope": null, + "escapedName": "is-fullwidth-code-point", + "name": "is-fullwidth-code-point", + "rawSpec": "^2.0.0", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\slice-ansi" + ] + ], + "_from": "is-fullwidth-code-point@^2.0.0", + "_id": "is-fullwidth-code-point@2.0.0", + "_inCache": true, + "_location": "/slice-ansi/is-fullwidth-code-point", + "_nodeVersion": "4.5.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/is-fullwidth-code-point-2.0.0.tgz_1474526567505_0.299921662081033" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "3.10.7", + "_phantomChildren": {}, + "_requested": { + "raw": "is-fullwidth-code-point@^2.0.0", + "scope": null, + "escapedName": "is-fullwidth-code-point", + "name": "is-fullwidth-code-point", + "rawSpec": "^2.0.0", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/slice-ansi" + ], + "_resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "_shasum": "a3b30a5c4f199183167aaab93beefae3ddfb654f", + "_shrinkwrap": null, + "_spec": "is-fullwidth-code-point@^2.0.0", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\slice-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is-fullwidth-code-point/issues" + }, + "dependencies": {}, + "description": "Check if the character represented by a given Unicode code point is fullwidth", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "a3b30a5c4f199183167aaab93beefae3ddfb654f", + "tarball": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "e94a78056056c5546f2bf4c4cf812a2163a46dae", + "homepage": "https://github.com/sindresorhus/is-fullwidth-code-point#readme", + "keywords": [ + "fullwidth", + "full-width", + "full", + "width", + "unicode", + "character", + "char", + "string", + "str", + "codepoint", + "code", + "point", + "is", + "detect", + "check" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "is-fullwidth-code-point", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is-fullwidth-code-point.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.0.0", + "xo": { + "esnext": true + } +} diff --git a/node_modules/slice-ansi/node_modules/is-fullwidth-code-point/readme.md b/node_modules/slice-ansi/node_modules/is-fullwidth-code-point/readme.md new file mode 100644 index 0000000..093b028 --- /dev/null +++ b/node_modules/slice-ansi/node_modules/is-fullwidth-code-point/readme.md @@ -0,0 +1,39 @@ +# is-fullwidth-code-point [![Build Status](https://travis-ci.org/sindresorhus/is-fullwidth-code-point.svg?branch=master)](https://travis-ci.org/sindresorhus/is-fullwidth-code-point) + +> Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) + + +## Install + +``` +$ npm install --save is-fullwidth-code-point +``` + + +## Usage + +```js +const isFullwidthCodePoint = require('is-fullwidth-code-point'); + +isFullwidthCodePoint('è°¢'.codePointAt()); +//=> true + +isFullwidthCodePoint('a'.codePointAt()); +//=> false +``` + + +## API + +### isFullwidthCodePoint(input) + +#### input + +Type: `number` + +[Code point](https://en.wikipedia.org/wiki/Code_point) of a character. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/slice-ansi/package.json b/node_modules/slice-ansi/package.json new file mode 100644 index 0000000..d2df7c7 --- /dev/null +++ b/node_modules/slice-ansi/package.json @@ -0,0 +1,125 @@ +{ + "_args": [ + [ + { + "raw": "slice-ansi@1.0.0", + "scope": null, + "escapedName": "slice-ansi", + "name": "slice-ansi", + "rawSpec": "1.0.0", + "spec": "1.0.0", + "type": "version" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\table" + ] + ], + "_from": "slice-ansi@1.0.0", + "_id": "slice-ansi@1.0.0", + "_inCache": true, + "_location": "/slice-ansi", + "_nodeVersion": "8.0.0", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/slice-ansi-1.0.0.tgz_1499681932678_0.883340407628566" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "5.0.0", + "_phantomChildren": {}, + "_requested": { + "raw": "slice-ansi@1.0.0", + "scope": null, + "escapedName": "slice-ansi", + "name": "slice-ansi", + "rawSpec": "1.0.0", + "spec": "1.0.0", + "type": "version" + }, + "_requiredBy": [ + "/table" + ], + "_resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", + "_shasum": "044f1a49d8842ff307aad6b505ed178bd950134d", + "_shrinkwrap": null, + "_spec": "slice-ansi@1.0.0", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\table", + "author": { + "name": "David Caccavella", + "email": "threedeecee@gmail.com" + }, + "bugs": { + "url": "https://github.com/chalk/slice-ansi/issues" + }, + "dependencies": { + "is-fullwidth-code-point": "^2.0.0" + }, + "description": "Slice a string with ANSI escape codes", + "devDependencies": { + "ava": "*", + "chalk": "^2.0.1", + "random-item": "^1.0.0", + "strip-ansi": "^4.0.0", + "xo": "*" + }, + "directories": {}, + "dist": { + "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", + "shasum": "044f1a49d8842ff307aad6b505ed178bd950134d", + "tarball": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "c63bf1eb57394c7d958a0c9d6c7db2f1a4cb2e93", + "homepage": "https://github.com/chalk/slice-ansi#readme", + "keywords": [ + "slice", + "string", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "license": "MIT", + "maintainers": [ + { + "name": "qix", + "email": "i.am.qix@gmail.com" + }, + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "slice-ansi", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/slice-ansi.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.0" +} diff --git a/node_modules/slice-ansi/readme.md b/node_modules/slice-ansi/readme.md new file mode 100644 index 0000000..628eed2 --- /dev/null +++ b/node_modules/slice-ansi/readme.md @@ -0,0 +1,64 @@ +# slice-ansi [![Build Status](https://travis-ci.org/chalk/slice-ansi.svg?branch=master)](https://travis-ci.org/chalk/slice-ansi) [![XO: Linted](https://img.shields.io/badge/xo-linted-blue.svg)](https://github.com/sindresorhus/xo) + +> Slice a string with [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) + + +## Install + +``` +$ npm install slice-ansi +``` + + +## Usage + +```js +const chalk = require('chalk'); +const sliceAnsi = require('slice-ansi'); + +const input = 'The quick brown ' + chalk.red('fox jumped over ') + + 'the lazy ' + chalk.green('dog and then ran away with the unicorn.'); + +console.log(sliceAnsi(input, 20, 30)); +``` + + +## API + +### sliceAnsi(input, beginSlice, [endSlice]) + +#### input + +Type: `string` + +String with ANSI escape codes. Like one styled by [`chalk`](https://github.com/chalk/chalk). + +#### beginSlice + +Type: `number` + +Zero-based index at which to begin the slice. + +#### endSlice + +Type: `number` + +Zero-based index at which to end the slice. + + +## Related + +- [wrap-ansi](https://github.com/chalk/wrap-ansi) - Wordwrap a string with ANSI escape codes +- [cli-truncate](https://github.com/sindresorhus/cli-truncate) - Truncate a string to a specific width in the terminal +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + + +## License + +MIT diff --git a/node_modules/sprintf-js/.npmignore b/node_modules/sprintf-js/.npmignore new file mode 100644 index 0000000..096746c --- /dev/null +++ b/node_modules/sprintf-js/.npmignore @@ -0,0 +1 @@ +/node_modules/ \ No newline at end of file diff --git a/node_modules/sprintf-js/LICENSE b/node_modules/sprintf-js/LICENSE new file mode 100644 index 0000000..663ac52 --- /dev/null +++ b/node_modules/sprintf-js/LICENSE @@ -0,0 +1,24 @@ +Copyright (c) 2007-2014, Alexandru Marasteanu +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +* Neither the name of this software nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/sprintf-js/README.md b/node_modules/sprintf-js/README.md new file mode 100644 index 0000000..8386356 --- /dev/null +++ b/node_modules/sprintf-js/README.md @@ -0,0 +1,88 @@ +# sprintf.js +**sprintf.js** is a complete open source JavaScript sprintf implementation for the *browser* and *node.js*. + +Its prototype is simple: + + string sprintf(string format , [mixed arg1 [, mixed arg2 [ ,...]]]) + +The placeholders in the format string are marked by `%` and are followed by one or more of these elements, in this order: + +* An optional number followed by a `$` sign that selects which argument index to use for the value. If not specified, arguments will be placed in the same order as the placeholders in the input string. +* An optional `+` sign that forces to preceed the result with a plus or minus sign on numeric values. By default, only the `-` sign is used on negative numbers. +* An optional padding specifier that says what character to use for padding (if specified). Possible values are `0` or any other character precedeed by a `'` (single quote). The default is to pad with *spaces*. +* An optional `-` sign, that causes sprintf to left-align the result of this placeholder. The default is to right-align the result. +* An optional number, that says how many characters the result should have. If the value to be returned is shorter than this number, the result will be padded. When used with the `j` (JSON) type specifier, the padding length specifies the tab size used for indentation. +* An optional precision modifier, consisting of a `.` (dot) followed by a number, that says how many digits should be displayed for floating point numbers. When used with the `g` type specifier, it specifies the number of significant digits. When used on a string, it causes the result to be truncated. +* A type specifier that can be any of: + * `%` — yields a literal `%` character + * `b` — yields an integer as a binary number + * `c` — yields an integer as the character with that ASCII value + * `d` or `i` — yields an integer as a signed decimal number + * `e` — yields a float using scientific notation + * `u` — yields an integer as an unsigned decimal number + * `f` — yields a float as is; see notes on precision above + * `g` — yields a float as is; see notes on precision above + * `o` — yields an integer as an octal number + * `s` — yields a string as is + * `x` — yields an integer as a hexadecimal number (lower-case) + * `X` — yields an integer as a hexadecimal number (upper-case) + * `j` — yields a JavaScript object or array as a JSON encoded string + +## JavaScript `vsprintf` +`vsprintf` is the same as `sprintf` except that it accepts an array of arguments, rather than a variable number of arguments: + + vsprintf("The first 4 letters of the english alphabet are: %s, %s, %s and %s", ["a", "b", "c", "d"]) + +## Argument swapping +You can also swap the arguments. That is, the order of the placeholders doesn't have to match the order of the arguments. You can do that by simply indicating in the format string which arguments the placeholders refer to: + + sprintf("%2$s %3$s a %1$s", "cracker", "Polly", "wants") +And, of course, you can repeat the placeholders without having to increase the number of arguments. + +## Named arguments +Format strings may contain replacement fields rather than positional placeholders. Instead of referring to a certain argument, you can now refer to a certain key within an object. Replacement fields are surrounded by rounded parentheses - `(` and `)` - and begin with a keyword that refers to a key: + + var user = { + name: "Dolly" + } + sprintf("Hello %(name)s", user) // Hello Dolly +Keywords in replacement fields can be optionally followed by any number of keywords or indexes: + + var users = [ + {name: "Dolly"}, + {name: "Molly"}, + {name: "Polly"} + ] + sprintf("Hello %(users[0].name)s, %(users[1].name)s and %(users[2].name)s", {users: users}) // Hello Dolly, Molly and Polly +Note: mixing positional and named placeholders is not (yet) supported + +## Computed values +You can pass in a function as a dynamic value and it will be invoked (with no arguments) in order to compute the value on-the-fly. + + sprintf("Current timestamp: %d", Date.now) // Current timestamp: 1398005382890 + sprintf("Current date and time: %s", function() { return new Date().toString() }) + +# AngularJS +You can now use `sprintf` and `vsprintf` (also aliased as `fmt` and `vfmt` respectively) in your AngularJS projects. See `demo/`. + +# Installation + +## Via Bower + + bower install sprintf + +## Or as a node.js module + + npm install sprintf-js + +### Usage + + var sprintf = require("sprintf-js").sprintf, + vsprintf = require("sprintf-js").vsprintf + + sprintf("%2$s %3$s a %1$s", "cracker", "Polly", "wants") + vsprintf("The first 4 letters of the english alphabet are: %s, %s, %s and %s", ["a", "b", "c", "d"]) + +# License + +**sprintf.js** is licensed under the terms of the 3-clause BSD license. diff --git a/node_modules/sprintf-js/bower.json b/node_modules/sprintf-js/bower.json new file mode 100644 index 0000000..d90a759 --- /dev/null +++ b/node_modules/sprintf-js/bower.json @@ -0,0 +1,14 @@ +{ + "name": "sprintf", + "description": "JavaScript sprintf implementation", + "version": "1.0.3", + "main": "src/sprintf.js", + "license": "BSD-3-Clause-Clear", + "keywords": ["sprintf", "string", "formatting"], + "authors": ["Alexandru Marasteanu (http://alexei.ro/)"], + "homepage": "https://github.com/alexei/sprintf.js", + "repository": { + "type": "git", + "url": "git://github.com/alexei/sprintf.js.git" + } +} diff --git a/node_modules/sprintf-js/demo/angular.html b/node_modules/sprintf-js/demo/angular.html new file mode 100644 index 0000000..3559efd --- /dev/null +++ b/node_modules/sprintf-js/demo/angular.html @@ -0,0 +1,20 @@ + + + + + + + + +
{{ "%+010d"|sprintf:-123 }}
+
{{ "%+010d"|vsprintf:[-123] }}
+
{{ "%+010d"|fmt:-123 }}
+
{{ "%+010d"|vfmt:[-123] }}
+
{{ "I've got %2$d apples and %1$d oranges."|fmt:4:2 }}
+
{{ "I've got %(apples)d apples and %(oranges)d oranges."|fmt:{apples: 2, oranges: 4} }}
+ + + + diff --git a/node_modules/sprintf-js/dist/angular-sprintf.min.js b/node_modules/sprintf-js/dist/angular-sprintf.min.js new file mode 100644 index 0000000..dbaf744 --- /dev/null +++ b/node_modules/sprintf-js/dist/angular-sprintf.min.js @@ -0,0 +1,4 @@ +/*! sprintf-js | Alexandru Marasteanu (http://alexei.ro/) | BSD-3-Clause */ + +angular.module("sprintf",[]).filter("sprintf",function(){return function(){return sprintf.apply(null,arguments)}}).filter("fmt",["$filter",function(a){return a("sprintf")}]).filter("vsprintf",function(){return function(a,b){return vsprintf(a,b)}}).filter("vfmt",["$filter",function(a){return a("vsprintf")}]); +//# sourceMappingURL=angular-sprintf.min.map \ No newline at end of file diff --git a/node_modules/sprintf-js/dist/angular-sprintf.min.js.map b/node_modules/sprintf-js/dist/angular-sprintf.min.js.map new file mode 100644 index 0000000..055964c --- /dev/null +++ b/node_modules/sprintf-js/dist/angular-sprintf.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"angular-sprintf.min.js","sources":["../src/angular-sprintf.js"],"names":["angular","module","filter","sprintf","apply","arguments","$filter","format","argv","vsprintf"],"mappings":";;AAAAA,QACIC,OAAO,cACPC,OAAO,UAAW,WACd,MAAO,YACH,MAAOC,SAAQC,MAAM,KAAMC,cAGnCH,OAAO,OAAQ,UAAW,SAASI,GAC/B,MAAOA,GAAQ,cAEnBJ,OAAO,WAAY,WACf,MAAO,UAASK,EAAQC,GACpB,MAAOC,UAASF,EAAQC,MAGhCN,OAAO,QAAS,UAAW,SAASI,GAChC,MAAOA,GAAQ"} \ No newline at end of file diff --git a/node_modules/sprintf-js/dist/angular-sprintf.min.map b/node_modules/sprintf-js/dist/angular-sprintf.min.map new file mode 100644 index 0000000..055964c --- /dev/null +++ b/node_modules/sprintf-js/dist/angular-sprintf.min.map @@ -0,0 +1 @@ +{"version":3,"file":"angular-sprintf.min.js","sources":["../src/angular-sprintf.js"],"names":["angular","module","filter","sprintf","apply","arguments","$filter","format","argv","vsprintf"],"mappings":";;AAAAA,QACIC,OAAO,cACPC,OAAO,UAAW,WACd,MAAO,YACH,MAAOC,SAAQC,MAAM,KAAMC,cAGnCH,OAAO,OAAQ,UAAW,SAASI,GAC/B,MAAOA,GAAQ,cAEnBJ,OAAO,WAAY,WACf,MAAO,UAASK,EAAQC,GACpB,MAAOC,UAASF,EAAQC,MAGhCN,OAAO,QAAS,UAAW,SAASI,GAChC,MAAOA,GAAQ"} \ No newline at end of file diff --git a/node_modules/sprintf-js/dist/sprintf.min.js b/node_modules/sprintf-js/dist/sprintf.min.js new file mode 100644 index 0000000..dc61e51 --- /dev/null +++ b/node_modules/sprintf-js/dist/sprintf.min.js @@ -0,0 +1,4 @@ +/*! sprintf-js | Alexandru Marasteanu (http://alexei.ro/) | BSD-3-Clause */ + +!function(a){function b(){var a=arguments[0],c=b.cache;return c[a]&&c.hasOwnProperty(a)||(c[a]=b.parse(a)),b.format.call(null,c[a],arguments)}function c(a){return Object.prototype.toString.call(a).slice(8,-1).toLowerCase()}function d(a,b){return Array(b+1).join(a)}var e={not_string:/[^s]/,number:/[diefg]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijosuxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[\+\-]/};b.format=function(a,f){var g,h,i,j,k,l,m,n=1,o=a.length,p="",q=[],r=!0,s="";for(h=0;o>h;h++)if(p=c(a[h]),"string"===p)q[q.length]=a[h];else if("array"===p){if(j=a[h],j[2])for(g=f[n],i=0;i=0),j[8]){case"b":g=g.toString(2);break;case"c":g=String.fromCharCode(g);break;case"d":case"i":g=parseInt(g,10);break;case"j":g=JSON.stringify(g,null,j[6]?parseInt(j[6]):0);break;case"e":g=j[7]?g.toExponential(j[7]):g.toExponential();break;case"f":g=j[7]?parseFloat(g).toFixed(j[7]):parseFloat(g);break;case"g":g=j[7]?parseFloat(g).toPrecision(j[7]):parseFloat(g);break;case"o":g=g.toString(8);break;case"s":g=(g=String(g))&&j[7]?g.substring(0,j[7]):g;break;case"u":g>>>=0;break;case"x":g=g.toString(16);break;case"X":g=g.toString(16).toUpperCase()}e.json.test(j[8])?q[q.length]=g:(!e.number.test(j[8])||r&&!j[3]?s="":(s=r?"+":"-",g=g.toString().replace(e.sign,"")),l=j[4]?"0"===j[4]?"0":j[4].charAt(1):" ",m=j[6]-(s+g).length,k=j[6]&&m>0?d(l,m):"",q[q.length]=j[5]?s+g+k:"0"===l?s+k+g:k+s+g)}return q.join("")},b.cache={},b.parse=function(a){for(var b=a,c=[],d=[],f=0;b;){if(null!==(c=e.text.exec(b)))d[d.length]=c[0];else if(null!==(c=e.modulo.exec(b)))d[d.length]="%";else{if(null===(c=e.placeholder.exec(b)))throw new SyntaxError("[sprintf] unexpected placeholder");if(c[2]){f|=1;var g=[],h=c[2],i=[];if(null===(i=e.key.exec(h)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(g[g.length]=i[1];""!==(h=h.substring(i[0].length));)if(null!==(i=e.key_access.exec(h)))g[g.length]=i[1];else{if(null===(i=e.index_access.exec(h)))throw new SyntaxError("[sprintf] failed to parse named argument key");g[g.length]=i[1]}c[2]=g}else f|=2;if(3===f)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");d[d.length]=c}b=b.substring(c[0].length)}return d};var f=function(a,c,d){return d=(c||[]).slice(0),d.splice(0,0,a),b.apply(null,d)};"undefined"!=typeof exports?(exports.sprintf=b,exports.vsprintf=f):(a.sprintf=b,a.vsprintf=f,"function"==typeof define&&define.amd&&define(function(){return{sprintf:b,vsprintf:f}}))}("undefined"==typeof window?this:window); +//# sourceMappingURL=sprintf.min.map \ No newline at end of file diff --git a/node_modules/sprintf-js/dist/sprintf.min.js.map b/node_modules/sprintf-js/dist/sprintf.min.js.map new file mode 100644 index 0000000..369dbaf --- /dev/null +++ b/node_modules/sprintf-js/dist/sprintf.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sprintf.min.js","sources":["../src/sprintf.js"],"names":["window","sprintf","key","arguments","cache","hasOwnProperty","parse","format","call","get_type","variable","Object","prototype","toString","slice","toLowerCase","str_repeat","input","multiplier","Array","join","re","not_string","number","json","not_json","text","modulo","placeholder","key_access","index_access","sign","parse_tree","argv","arg","i","k","match","pad","pad_character","pad_length","cursor","tree_length","length","node_type","output","is_positive","Error","test","isNaN","TypeError","String","fromCharCode","parseInt","JSON","stringify","toExponential","parseFloat","toFixed","substring","toUpperCase","replace","charAt","fmt","_fmt","arg_names","exec","SyntaxError","field_list","replacement_field","field_match","vsprintf","_argv","splice","apply","exports","define","amd","this"],"mappings":";;CAAA,SAAUA,GAeN,QAASC,KACL,GAAIC,GAAMC,UAAU,GAAIC,EAAQH,EAAQG,KAIxC,OAHMA,GAAMF,IAAQE,EAAMC,eAAeH,KACrCE,EAAMF,GAAOD,EAAQK,MAAMJ,IAExBD,EAAQM,OAAOC,KAAK,KAAMJ,EAAMF,GAAMC,WA4JjD,QAASM,GAASC,GACd,MAAOC,QAAOC,UAAUC,SAASL,KAAKE,GAAUI,MAAM,EAAG,IAAIC,cAGjE,QAASC,GAAWC,EAAOC,GACvB,MAAOC,OAAMD,EAAa,GAAGE,KAAKH,GApLtC,GAAII,IACAC,WAAY,OACZC,OAAQ,SACRC,KAAM,MACNC,SAAU,OACVC,KAAM,YACNC,OAAQ,WACRC,YAAa,yFACb1B,IAAK,sBACL2B,WAAY,wBACZC,aAAc,aACdC,KAAM,UAWV9B,GAAQM,OAAS,SAASyB,EAAYC,GAClC,GAAiEC,GAAkBC,EAAGC,EAAGC,EAAOC,EAAKC,EAAeC,EAAhHC,EAAS,EAAGC,EAAcV,EAAWW,OAAQC,EAAY,GAASC,KAA0DC,GAAc,EAAMf,EAAO,EAC3J,KAAKI,EAAI,EAAOO,EAAJP,EAAiBA,IAEzB,GADAS,EAAYnC,EAASuB,EAAWG,IACd,WAAdS,EACAC,EAAOA,EAAOF,QAAUX,EAAWG,OAElC,IAAkB,UAAdS,EAAuB,CAE5B,GADAP,EAAQL,EAAWG,GACfE,EAAM,GAEN,IADAH,EAAMD,EAAKQ,GACNL,EAAI,EAAGA,EAAIC,EAAM,GAAGM,OAAQP,IAAK,CAClC,IAAKF,EAAI7B,eAAegC,EAAM,GAAGD,IAC7B,KAAM,IAAIW,OAAM9C,EAAQ,yCAA0CoC,EAAM,GAAGD,IAE/EF,GAAMA,EAAIG,EAAM,GAAGD,QAIvBF,GADKG,EAAM,GACLJ,EAAKI,EAAM,IAGXJ,EAAKQ,IAOf,IAJqB,YAAjBhC,EAASyB,KACTA,EAAMA,KAGNb,EAAGC,WAAW0B,KAAKX,EAAM,KAAOhB,EAAGI,SAASuB,KAAKX,EAAM,KAAyB,UAAjB5B,EAASyB,IAAoBe,MAAMf,GAClG,KAAM,IAAIgB,WAAUjD,EAAQ,0CAA2CQ,EAASyB,IAOpF,QAJIb,EAAGE,OAAOyB,KAAKX,EAAM,MACrBS,EAAcZ,GAAO,GAGjBG,EAAM,IACV,IAAK,IACDH,EAAMA,EAAIrB,SAAS,EACvB,MACA,KAAK,IACDqB,EAAMiB,OAAOC,aAAalB,EAC9B,MACA,KAAK,IACL,IAAK,IACDA,EAAMmB,SAASnB,EAAK,GACxB,MACA,KAAK,IACDA,EAAMoB,KAAKC,UAAUrB,EAAK,KAAMG,EAAM,GAAKgB,SAAShB,EAAM,IAAM,EACpE,MACA,KAAK,IACDH,EAAMG,EAAM,GAAKH,EAAIsB,cAAcnB,EAAM,IAAMH,EAAIsB,eACvD,MACA,KAAK,IACDtB,EAAMG,EAAM,GAAKoB,WAAWvB,GAAKwB,QAAQrB,EAAM,IAAMoB,WAAWvB,EACpE,MACA,KAAK,IACDA,EAAMA,EAAIrB,SAAS,EACvB,MACA,KAAK,IACDqB,GAAQA,EAAMiB,OAAOjB,KAASG,EAAM,GAAKH,EAAIyB,UAAU,EAAGtB,EAAM,IAAMH,CAC1E,MACA,KAAK,IACDA,KAAc,CAClB,MACA,KAAK,IACDA,EAAMA,EAAIrB,SAAS,GACvB,MACA,KAAK,IACDqB,EAAMA,EAAIrB,SAAS,IAAI+C,cAG3BvC,EAAGG,KAAKwB,KAAKX,EAAM,IACnBQ,EAAOA,EAAOF,QAAUT,IAGpBb,EAAGE,OAAOyB,KAAKX,EAAM,KAASS,IAAeT,EAAM,GAKnDN,EAAO,IAJPA,EAAOe,EAAc,IAAM,IAC3BZ,EAAMA,EAAIrB,WAAWgD,QAAQxC,EAAGU,KAAM,KAK1CQ,EAAgBF,EAAM,GAAkB,MAAbA,EAAM,GAAa,IAAMA,EAAM,GAAGyB,OAAO,GAAK,IACzEtB,EAAaH,EAAM,IAAMN,EAAOG,GAAKS,OACrCL,EAAMD,EAAM,IAAMG,EAAa,EAAIxB,EAAWuB,EAAeC,GAAoB,GACjFK,EAAOA,EAAOF,QAAUN,EAAM,GAAKN,EAAOG,EAAMI,EAAyB,MAAlBC,EAAwBR,EAAOO,EAAMJ,EAAMI,EAAMP,EAAOG,GAI3H,MAAOW,GAAOzB,KAAK,KAGvBnB,EAAQG,SAERH,EAAQK,MAAQ,SAASyD,GAErB,IADA,GAAIC,GAAOD,EAAK1B,KAAYL,KAAiBiC,EAAY,EAClDD,GAAM,CACT,GAAqC,QAAhC3B,EAAQhB,EAAGK,KAAKwC,KAAKF,IACtBhC,EAAWA,EAAWW,QAAUN,EAAM,OAErC,IAAuC,QAAlCA,EAAQhB,EAAGM,OAAOuC,KAAKF,IAC7BhC,EAAWA,EAAWW,QAAU,QAE/B,CAAA,GAA4C,QAAvCN,EAAQhB,EAAGO,YAAYsC,KAAKF,IAgClC,KAAM,IAAIG,aAAY,mCA/BtB,IAAI9B,EAAM,GAAI,CACV4B,GAAa,CACb,IAAIG,MAAiBC,EAAoBhC,EAAM,GAAIiC,IACnD,IAAuD,QAAlDA,EAAcjD,EAAGnB,IAAIgE,KAAKG,IAe3B,KAAM,IAAIF,aAAY,+CAbtB,KADAC,EAAWA,EAAWzB,QAAU2B,EAAY,GACwC,MAA5ED,EAAoBA,EAAkBV,UAAUW,EAAY,GAAG3B,UACnE,GAA8D,QAAzD2B,EAAcjD,EAAGQ,WAAWqC,KAAKG,IAClCD,EAAWA,EAAWzB,QAAU2B,EAAY,OAE3C,CAAA,GAAgE,QAA3DA,EAAcjD,EAAGS,aAAaoC,KAAKG,IAIzC,KAAM,IAAIF,aAAY,+CAHtBC,GAAWA,EAAWzB,QAAU2B,EAAY,GAUxDjC,EAAM,GAAK+B,MAGXH,IAAa,CAEjB,IAAkB,IAAdA,EACA,KAAM,IAAIlB,OAAM,4EAEpBf,GAAWA,EAAWW,QAAUN,EAKpC2B,EAAOA,EAAKL,UAAUtB,EAAM,GAAGM,QAEnC,MAAOX,GAGX,IAAIuC,GAAW,SAASR,EAAK9B,EAAMuC,GAG/B,MAFAA,IAASvC,OAAYnB,MAAM,GAC3B0D,EAAMC,OAAO,EAAG,EAAGV,GACZ9D,EAAQyE,MAAM,KAAMF,GAiBR,oBAAZG,UACPA,QAAQ1E,QAAUA,EAClB0E,QAAQJ,SAAWA,IAGnBvE,EAAOC,QAAUA,EACjBD,EAAOuE,SAAWA,EAEI,kBAAXK,SAAyBA,OAAOC,KACvCD,OAAO,WACH,OACI3E,QAASA,EACTsE,SAAUA,OAKT,mBAAXvE,QAAyB8E,KAAO9E"} \ No newline at end of file diff --git a/node_modules/sprintf-js/dist/sprintf.min.map b/node_modules/sprintf-js/dist/sprintf.min.map new file mode 100644 index 0000000..ee011aa --- /dev/null +++ b/node_modules/sprintf-js/dist/sprintf.min.map @@ -0,0 +1 @@ +{"version":3,"file":"sprintf.min.js","sources":["../src/sprintf.js"],"names":["window","sprintf","key","arguments","cache","hasOwnProperty","parse","format","call","get_type","variable","Object","prototype","toString","slice","toLowerCase","str_repeat","input","multiplier","Array","join","re","not_string","number","json","not_json","text","modulo","placeholder","key_access","index_access","sign","parse_tree","argv","arg","i","k","match","pad","pad_character","pad_length","cursor","tree_length","length","node_type","output","is_positive","Error","test","isNaN","TypeError","String","fromCharCode","parseInt","JSON","stringify","toExponential","parseFloat","toFixed","toPrecision","substring","toUpperCase","replace","charAt","fmt","_fmt","arg_names","exec","SyntaxError","field_list","replacement_field","field_match","vsprintf","_argv","splice","apply","exports","define","amd","this"],"mappings":";;CAAA,SAAUA,GAeN,QAASC,KACL,GAAIC,GAAMC,UAAU,GAAIC,EAAQH,EAAQG,KAIxC,OAHMA,GAAMF,IAAQE,EAAMC,eAAeH,KACrCE,EAAMF,GAAOD,EAAQK,MAAMJ,IAExBD,EAAQM,OAAOC,KAAK,KAAMJ,EAAMF,GAAMC,WA+JjD,QAASM,GAASC,GACd,MAAOC,QAAOC,UAAUC,SAASL,KAAKE,GAAUI,MAAM,EAAG,IAAIC,cAGjE,QAASC,GAAWC,EAAOC,GACvB,MAAOC,OAAMD,EAAa,GAAGE,KAAKH,GAvLtC,GAAII,IACAC,WAAY,OACZC,OAAQ,UACRC,KAAM,MACNC,SAAU,OACVC,KAAM,YACNC,OAAQ,WACRC,YAAa,yFACb1B,IAAK,sBACL2B,WAAY,wBACZC,aAAc,aACdC,KAAM,UAWV9B,GAAQM,OAAS,SAASyB,EAAYC,GAClC,GAAiEC,GAAkBC,EAAGC,EAAGC,EAAOC,EAAKC,EAAeC,EAAhHC,EAAS,EAAGC,EAAcV,EAAWW,OAAQC,EAAY,GAASC,KAA0DC,GAAc,EAAMf,EAAO,EAC3J,KAAKI,EAAI,EAAOO,EAAJP,EAAiBA,IAEzB,GADAS,EAAYnC,EAASuB,EAAWG,IACd,WAAdS,EACAC,EAAOA,EAAOF,QAAUX,EAAWG,OAElC,IAAkB,UAAdS,EAAuB,CAE5B,GADAP,EAAQL,EAAWG,GACfE,EAAM,GAEN,IADAH,EAAMD,EAAKQ,GACNL,EAAI,EAAGA,EAAIC,EAAM,GAAGM,OAAQP,IAAK,CAClC,IAAKF,EAAI7B,eAAegC,EAAM,GAAGD,IAC7B,KAAM,IAAIW,OAAM9C,EAAQ,yCAA0CoC,EAAM,GAAGD,IAE/EF,GAAMA,EAAIG,EAAM,GAAGD,QAIvBF,GADKG,EAAM,GACLJ,EAAKI,EAAM,IAGXJ,EAAKQ,IAOf,IAJqB,YAAjBhC,EAASyB,KACTA,EAAMA,KAGNb,EAAGC,WAAW0B,KAAKX,EAAM,KAAOhB,EAAGI,SAASuB,KAAKX,EAAM,KAAyB,UAAjB5B,EAASyB,IAAoBe,MAAMf,GAClG,KAAM,IAAIgB,WAAUjD,EAAQ,0CAA2CQ,EAASyB,IAOpF,QAJIb,EAAGE,OAAOyB,KAAKX,EAAM,MACrBS,EAAcZ,GAAO,GAGjBG,EAAM,IACV,IAAK,IACDH,EAAMA,EAAIrB,SAAS,EACvB,MACA,KAAK,IACDqB,EAAMiB,OAAOC,aAAalB,EAC9B,MACA,KAAK,IACL,IAAK,IACDA,EAAMmB,SAASnB,EAAK,GACxB,MACA,KAAK,IACDA,EAAMoB,KAAKC,UAAUrB,EAAK,KAAMG,EAAM,GAAKgB,SAAShB,EAAM,IAAM,EACpE,MACA,KAAK,IACDH,EAAMG,EAAM,GAAKH,EAAIsB,cAAcnB,EAAM,IAAMH,EAAIsB,eACvD,MACA,KAAK,IACDtB,EAAMG,EAAM,GAAKoB,WAAWvB,GAAKwB,QAAQrB,EAAM,IAAMoB,WAAWvB,EACpE,MACA,KAAK,IACDA,EAAMG,EAAM,GAAKoB,WAAWvB,GAAKyB,YAAYtB,EAAM,IAAMoB,WAAWvB,EACxE,MACA,KAAK,IACDA,EAAMA,EAAIrB,SAAS,EACvB,MACA,KAAK,IACDqB,GAAQA,EAAMiB,OAAOjB,KAASG,EAAM,GAAKH,EAAI0B,UAAU,EAAGvB,EAAM,IAAMH,CAC1E,MACA,KAAK,IACDA,KAAc,CAClB,MACA,KAAK,IACDA,EAAMA,EAAIrB,SAAS,GACvB,MACA,KAAK,IACDqB,EAAMA,EAAIrB,SAAS,IAAIgD,cAG3BxC,EAAGG,KAAKwB,KAAKX,EAAM,IACnBQ,EAAOA,EAAOF,QAAUT,IAGpBb,EAAGE,OAAOyB,KAAKX,EAAM,KAASS,IAAeT,EAAM,GAKnDN,EAAO,IAJPA,EAAOe,EAAc,IAAM,IAC3BZ,EAAMA,EAAIrB,WAAWiD,QAAQzC,EAAGU,KAAM,KAK1CQ,EAAgBF,EAAM,GAAkB,MAAbA,EAAM,GAAa,IAAMA,EAAM,GAAG0B,OAAO,GAAK,IACzEvB,EAAaH,EAAM,IAAMN,EAAOG,GAAKS,OACrCL,EAAMD,EAAM,IAAMG,EAAa,EAAIxB,EAAWuB,EAAeC,GAAoB,GACjFK,EAAOA,EAAOF,QAAUN,EAAM,GAAKN,EAAOG,EAAMI,EAAyB,MAAlBC,EAAwBR,EAAOO,EAAMJ,EAAMI,EAAMP,EAAOG,GAI3H,MAAOW,GAAOzB,KAAK,KAGvBnB,EAAQG,SAERH,EAAQK,MAAQ,SAAS0D,GAErB,IADA,GAAIC,GAAOD,EAAK3B,KAAYL,KAAiBkC,EAAY,EAClDD,GAAM,CACT,GAAqC,QAAhC5B,EAAQhB,EAAGK,KAAKyC,KAAKF,IACtBjC,EAAWA,EAAWW,QAAUN,EAAM,OAErC,IAAuC,QAAlCA,EAAQhB,EAAGM,OAAOwC,KAAKF,IAC7BjC,EAAWA,EAAWW,QAAU,QAE/B,CAAA,GAA4C,QAAvCN,EAAQhB,EAAGO,YAAYuC,KAAKF,IAgClC,KAAM,IAAIG,aAAY,mCA/BtB,IAAI/B,EAAM,GAAI,CACV6B,GAAa,CACb,IAAIG,MAAiBC,EAAoBjC,EAAM,GAAIkC,IACnD,IAAuD,QAAlDA,EAAclD,EAAGnB,IAAIiE,KAAKG,IAe3B,KAAM,IAAIF,aAAY,+CAbtB,KADAC,EAAWA,EAAW1B,QAAU4B,EAAY,GACwC,MAA5ED,EAAoBA,EAAkBV,UAAUW,EAAY,GAAG5B,UACnE,GAA8D,QAAzD4B,EAAclD,EAAGQ,WAAWsC,KAAKG,IAClCD,EAAWA,EAAW1B,QAAU4B,EAAY,OAE3C,CAAA,GAAgE,QAA3DA,EAAclD,EAAGS,aAAaqC,KAAKG,IAIzC,KAAM,IAAIF,aAAY,+CAHtBC,GAAWA,EAAW1B,QAAU4B,EAAY,GAUxDlC,EAAM,GAAKgC,MAGXH,IAAa,CAEjB,IAAkB,IAAdA,EACA,KAAM,IAAInB,OAAM,4EAEpBf,GAAWA,EAAWW,QAAUN,EAKpC4B,EAAOA,EAAKL,UAAUvB,EAAM,GAAGM,QAEnC,MAAOX,GAGX,IAAIwC,GAAW,SAASR,EAAK/B,EAAMwC,GAG/B,MAFAA,IAASxC,OAAYnB,MAAM,GAC3B2D,EAAMC,OAAO,EAAG,EAAGV,GACZ/D,EAAQ0E,MAAM,KAAMF,GAiBR,oBAAZG,UACPA,QAAQ3E,QAAUA,EAClB2E,QAAQJ,SAAWA,IAGnBxE,EAAOC,QAAUA,EACjBD,EAAOwE,SAAWA,EAEI,kBAAXK,SAAyBA,OAAOC,KACvCD,OAAO,WACH,OACI5E,QAASA,EACTuE,SAAUA,OAKT,mBAAXxE,QAAyB+E,KAAO/E"} \ No newline at end of file diff --git a/node_modules/sprintf-js/gruntfile.js b/node_modules/sprintf-js/gruntfile.js new file mode 100644 index 0000000..246e1c3 --- /dev/null +++ b/node_modules/sprintf-js/gruntfile.js @@ -0,0 +1,36 @@ +module.exports = function(grunt) { + grunt.initConfig({ + pkg: grunt.file.readJSON("package.json"), + + uglify: { + options: { + banner: "/*! <%= pkg.name %> | <%= pkg.author %> | <%= pkg.license %> */\n", + sourceMap: true + }, + build: { + files: [ + { + src: "src/sprintf.js", + dest: "dist/sprintf.min.js" + }, + { + src: "src/angular-sprintf.js", + dest: "dist/angular-sprintf.min.js" + } + ] + } + }, + + watch: { + js: { + files: "src/*.js", + tasks: ["uglify"] + } + } + }) + + grunt.loadNpmTasks("grunt-contrib-uglify") + grunt.loadNpmTasks("grunt-contrib-watch") + + grunt.registerTask("default", ["uglify", "watch"]) +} diff --git a/node_modules/sprintf-js/package.json b/node_modules/sprintf-js/package.json new file mode 100644 index 0000000..16a31f5 --- /dev/null +++ b/node_modules/sprintf-js/package.json @@ -0,0 +1,86 @@ +{ + "_args": [ + [ + { + "raw": "sprintf-js@~1.0.2", + "scope": null, + "escapedName": "sprintf-js", + "name": "sprintf-js", + "rawSpec": "~1.0.2", + "spec": ">=1.0.2 <1.1.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\argparse" + ] + ], + "_from": "sprintf-js@>=1.0.2 <1.1.0", + "_id": "sprintf-js@1.0.3", + "_inCache": true, + "_location": "/sprintf-js", + "_nodeVersion": "0.12.4", + "_npmUser": { + "name": "alexei", + "email": "hello@alexei.ro" + }, + "_npmVersion": "2.10.1", + "_phantomChildren": {}, + "_requested": { + "raw": "sprintf-js@~1.0.2", + "scope": null, + "escapedName": "sprintf-js", + "name": "sprintf-js", + "rawSpec": "~1.0.2", + "spec": ">=1.0.2 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/argparse" + ], + "_resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "_shasum": "04e6926f662895354f3dd015203633b857297e2c", + "_shrinkwrap": null, + "_spec": "sprintf-js@~1.0.2", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\argparse", + "author": { + "name": "Alexandru Marasteanu", + "email": "hello@alexei.ro", + "url": "http://alexei.ro/" + }, + "bugs": { + "url": "https://github.com/alexei/sprintf.js/issues" + }, + "dependencies": {}, + "description": "JavaScript sprintf implementation", + "devDependencies": { + "grunt": "*", + "grunt-contrib-uglify": "*", + "grunt-contrib-watch": "*", + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "04e6926f662895354f3dd015203633b857297e2c", + "tarball": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" + }, + "gitHead": "747b806c2dab5b64d5c9958c42884946a187c3b1", + "homepage": "https://github.com/alexei/sprintf.js#readme", + "license": "BSD-3-Clause", + "main": "src/sprintf.js", + "maintainers": [ + { + "name": "alexei", + "email": "hello@alexei.ro" + } + ], + "name": "sprintf-js", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/alexei/sprintf.js.git" + }, + "scripts": { + "test": "mocha test/test.js" + }, + "version": "1.0.3" +} diff --git a/node_modules/sprintf-js/src/angular-sprintf.js b/node_modules/sprintf-js/src/angular-sprintf.js new file mode 100644 index 0000000..9c69123 --- /dev/null +++ b/node_modules/sprintf-js/src/angular-sprintf.js @@ -0,0 +1,18 @@ +angular. + module("sprintf", []). + filter("sprintf", function() { + return function() { + return sprintf.apply(null, arguments) + } + }). + filter("fmt", ["$filter", function($filter) { + return $filter("sprintf") + }]). + filter("vsprintf", function() { + return function(format, argv) { + return vsprintf(format, argv) + } + }). + filter("vfmt", ["$filter", function($filter) { + return $filter("vsprintf") + }]) diff --git a/node_modules/sprintf-js/src/sprintf.js b/node_modules/sprintf-js/src/sprintf.js new file mode 100644 index 0000000..c0fc7c0 --- /dev/null +++ b/node_modules/sprintf-js/src/sprintf.js @@ -0,0 +1,208 @@ +(function(window) { + var re = { + not_string: /[^s]/, + number: /[diefg]/, + json: /[j]/, + not_json: /[^j]/, + text: /^[^\x25]+/, + modulo: /^\x25{2}/, + placeholder: /^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijosuxX])/, + key: /^([a-z_][a-z_\d]*)/i, + key_access: /^\.([a-z_][a-z_\d]*)/i, + index_access: /^\[(\d+)\]/, + sign: /^[\+\-]/ + } + + function sprintf() { + var key = arguments[0], cache = sprintf.cache + if (!(cache[key] && cache.hasOwnProperty(key))) { + cache[key] = sprintf.parse(key) + } + return sprintf.format.call(null, cache[key], arguments) + } + + sprintf.format = function(parse_tree, argv) { + var cursor = 1, tree_length = parse_tree.length, node_type = "", arg, output = [], i, k, match, pad, pad_character, pad_length, is_positive = true, sign = "" + for (i = 0; i < tree_length; i++) { + node_type = get_type(parse_tree[i]) + if (node_type === "string") { + output[output.length] = parse_tree[i] + } + else if (node_type === "array") { + match = parse_tree[i] // convenience purposes only + if (match[2]) { // keyword argument + arg = argv[cursor] + for (k = 0; k < match[2].length; k++) { + if (!arg.hasOwnProperty(match[2][k])) { + throw new Error(sprintf("[sprintf] property '%s' does not exist", match[2][k])) + } + arg = arg[match[2][k]] + } + } + else if (match[1]) { // positional argument (explicit) + arg = argv[match[1]] + } + else { // positional argument (implicit) + arg = argv[cursor++] + } + + if (get_type(arg) == "function") { + arg = arg() + } + + if (re.not_string.test(match[8]) && re.not_json.test(match[8]) && (get_type(arg) != "number" && isNaN(arg))) { + throw new TypeError(sprintf("[sprintf] expecting number but found %s", get_type(arg))) + } + + if (re.number.test(match[8])) { + is_positive = arg >= 0 + } + + switch (match[8]) { + case "b": + arg = arg.toString(2) + break + case "c": + arg = String.fromCharCode(arg) + break + case "d": + case "i": + arg = parseInt(arg, 10) + break + case "j": + arg = JSON.stringify(arg, null, match[6] ? parseInt(match[6]) : 0) + break + case "e": + arg = match[7] ? arg.toExponential(match[7]) : arg.toExponential() + break + case "f": + arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg) + break + case "g": + arg = match[7] ? parseFloat(arg).toPrecision(match[7]) : parseFloat(arg) + break + case "o": + arg = arg.toString(8) + break + case "s": + arg = ((arg = String(arg)) && match[7] ? arg.substring(0, match[7]) : arg) + break + case "u": + arg = arg >>> 0 + break + case "x": + arg = arg.toString(16) + break + case "X": + arg = arg.toString(16).toUpperCase() + break + } + if (re.json.test(match[8])) { + output[output.length] = arg + } + else { + if (re.number.test(match[8]) && (!is_positive || match[3])) { + sign = is_positive ? "+" : "-" + arg = arg.toString().replace(re.sign, "") + } + else { + sign = "" + } + pad_character = match[4] ? match[4] === "0" ? "0" : match[4].charAt(1) : " " + pad_length = match[6] - (sign + arg).length + pad = match[6] ? (pad_length > 0 ? str_repeat(pad_character, pad_length) : "") : "" + output[output.length] = match[5] ? sign + arg + pad : (pad_character === "0" ? sign + pad + arg : pad + sign + arg) + } + } + } + return output.join("") + } + + sprintf.cache = {} + + sprintf.parse = function(fmt) { + var _fmt = fmt, match = [], parse_tree = [], arg_names = 0 + while (_fmt) { + if ((match = re.text.exec(_fmt)) !== null) { + parse_tree[parse_tree.length] = match[0] + } + else if ((match = re.modulo.exec(_fmt)) !== null) { + parse_tree[parse_tree.length] = "%" + } + else if ((match = re.placeholder.exec(_fmt)) !== null) { + if (match[2]) { + arg_names |= 1 + var field_list = [], replacement_field = match[2], field_match = [] + if ((field_match = re.key.exec(replacement_field)) !== null) { + field_list[field_list.length] = field_match[1] + while ((replacement_field = replacement_field.substring(field_match[0].length)) !== "") { + if ((field_match = re.key_access.exec(replacement_field)) !== null) { + field_list[field_list.length] = field_match[1] + } + else if ((field_match = re.index_access.exec(replacement_field)) !== null) { + field_list[field_list.length] = field_match[1] + } + else { + throw new SyntaxError("[sprintf] failed to parse named argument key") + } + } + } + else { + throw new SyntaxError("[sprintf] failed to parse named argument key") + } + match[2] = field_list + } + else { + arg_names |= 2 + } + if (arg_names === 3) { + throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported") + } + parse_tree[parse_tree.length] = match + } + else { + throw new SyntaxError("[sprintf] unexpected placeholder") + } + _fmt = _fmt.substring(match[0].length) + } + return parse_tree + } + + var vsprintf = function(fmt, argv, _argv) { + _argv = (argv || []).slice(0) + _argv.splice(0, 0, fmt) + return sprintf.apply(null, _argv) + } + + /** + * helpers + */ + function get_type(variable) { + return Object.prototype.toString.call(variable).slice(8, -1).toLowerCase() + } + + function str_repeat(input, multiplier) { + return Array(multiplier + 1).join(input) + } + + /** + * export to either browser or node.js + */ + if (typeof exports !== "undefined") { + exports.sprintf = sprintf + exports.vsprintf = vsprintf + } + else { + window.sprintf = sprintf + window.vsprintf = vsprintf + + if (typeof define === "function" && define.amd) { + define(function() { + return { + sprintf: sprintf, + vsprintf: vsprintf + } + }) + } + } +})(typeof window === "undefined" ? this : window); diff --git a/node_modules/sprintf-js/test/test.js b/node_modules/sprintf-js/test/test.js new file mode 100644 index 0000000..6f57b25 --- /dev/null +++ b/node_modules/sprintf-js/test/test.js @@ -0,0 +1,82 @@ +var assert = require("assert"), + sprintfjs = require("../src/sprintf.js"), + sprintf = sprintfjs.sprintf, + vsprintf = sprintfjs.vsprintf + +describe("sprintfjs", function() { + var pi = 3.141592653589793 + + it("should return formated strings for simple placeholders", function() { + assert.equal("%", sprintf("%%")) + assert.equal("10", sprintf("%b", 2)) + assert.equal("A", sprintf("%c", 65)) + assert.equal("2", sprintf("%d", 2)) + assert.equal("2", sprintf("%i", 2)) + assert.equal("2", sprintf("%d", "2")) + assert.equal("2", sprintf("%i", "2")) + assert.equal('{"foo":"bar"}', sprintf("%j", {foo: "bar"})) + assert.equal('["foo","bar"]', sprintf("%j", ["foo", "bar"])) + assert.equal("2e+0", sprintf("%e", 2)) + assert.equal("2", sprintf("%u", 2)) + assert.equal("4294967294", sprintf("%u", -2)) + assert.equal("2.2", sprintf("%f", 2.2)) + assert.equal("3.141592653589793", sprintf("%g", pi)) + assert.equal("10", sprintf("%o", 8)) + assert.equal("%s", sprintf("%s", "%s")) + assert.equal("ff", sprintf("%x", 255)) + assert.equal("FF", sprintf("%X", 255)) + assert.equal("Polly wants a cracker", sprintf("%2$s %3$s a %1$s", "cracker", "Polly", "wants")) + assert.equal("Hello world!", sprintf("Hello %(who)s!", {"who": "world"})) + }) + + it("should return formated strings for complex placeholders", function() { + // sign + assert.equal("2", sprintf("%d", 2)) + assert.equal("-2", sprintf("%d", -2)) + assert.equal("+2", sprintf("%+d", 2)) + assert.equal("-2", sprintf("%+d", -2)) + assert.equal("2", sprintf("%i", 2)) + assert.equal("-2", sprintf("%i", -2)) + assert.equal("+2", sprintf("%+i", 2)) + assert.equal("-2", sprintf("%+i", -2)) + assert.equal("2.2", sprintf("%f", 2.2)) + assert.equal("-2.2", sprintf("%f", -2.2)) + assert.equal("+2.2", sprintf("%+f", 2.2)) + assert.equal("-2.2", sprintf("%+f", -2.2)) + assert.equal("-2.3", sprintf("%+.1f", -2.34)) + assert.equal("-0.0", sprintf("%+.1f", -0.01)) + assert.equal("3.14159", sprintf("%.6g", pi)) + assert.equal("3.14", sprintf("%.3g", pi)) + assert.equal("3", sprintf("%.1g", pi)) + assert.equal("-000000123", sprintf("%+010d", -123)) + assert.equal("______-123", sprintf("%+'_10d", -123)) + assert.equal("-234.34 123.2", sprintf("%f %f", -234.34, 123.2)) + + // padding + assert.equal("-0002", sprintf("%05d", -2)) + assert.equal("-0002", sprintf("%05i", -2)) + assert.equal(" <", sprintf("%5s", "<")) + assert.equal("0000<", sprintf("%05s", "<")) + assert.equal("____<", sprintf("%'_5s", "<")) + assert.equal("> ", sprintf("%-5s", ">")) + assert.equal(">0000", sprintf("%0-5s", ">")) + assert.equal(">____", sprintf("%'_-5s", ">")) + assert.equal("xxxxxx", sprintf("%5s", "xxxxxx")) + assert.equal("1234", sprintf("%02u", 1234)) + assert.equal(" -10.235", sprintf("%8.3f", -10.23456)) + assert.equal("-12.34 xxx", sprintf("%f %s", -12.34, "xxx")) + assert.equal('{\n "foo": "bar"\n}', sprintf("%2j", {foo: "bar"})) + assert.equal('[\n "foo",\n "bar"\n]', sprintf("%2j", ["foo", "bar"])) + + // precision + assert.equal("2.3", sprintf("%.1f", 2.345)) + assert.equal("xxxxx", sprintf("%5.5s", "xxxxxx")) + assert.equal(" x", sprintf("%5.1s", "xxxxxx")) + + }) + + it("should return formated strings for callbacks", function() { + assert.equal("foobar", sprintf("%s", function() { return "foobar" })) + assert.equal(Date.now(), sprintf("%s", Date.now)) // should pass... + }) +}) diff --git a/node_modules/strip-json-comments/index.js b/node_modules/strip-json-comments/index.js new file mode 100644 index 0000000..4e6576e --- /dev/null +++ b/node_modules/strip-json-comments/index.js @@ -0,0 +1,70 @@ +'use strict'; +var singleComment = 1; +var multiComment = 2; + +function stripWithoutWhitespace() { + return ''; +} + +function stripWithWhitespace(str, start, end) { + return str.slice(start, end).replace(/\S/g, ' '); +} + +module.exports = function (str, opts) { + opts = opts || {}; + + var currentChar; + var nextChar; + var insideString = false; + var insideComment = false; + var offset = 0; + var ret = ''; + var strip = opts.whitespace === false ? stripWithoutWhitespace : stripWithWhitespace; + + for (var i = 0; i < str.length; i++) { + currentChar = str[i]; + nextChar = str[i + 1]; + + if (!insideComment && currentChar === '"') { + var escaped = str[i - 1] === '\\' && str[i - 2] !== '\\'; + if (!escaped) { + insideString = !insideString; + } + } + + if (insideString) { + continue; + } + + if (!insideComment && currentChar + nextChar === '//') { + ret += str.slice(offset, i); + offset = i; + insideComment = singleComment; + i++; + } else if (insideComment === singleComment && currentChar + nextChar === '\r\n') { + i++; + insideComment = false; + ret += strip(str, offset, i); + offset = i; + continue; + } else if (insideComment === singleComment && currentChar === '\n') { + insideComment = false; + ret += strip(str, offset, i); + offset = i; + } else if (!insideComment && currentChar + nextChar === '/*') { + ret += str.slice(offset, i); + offset = i; + insideComment = multiComment; + i++; + continue; + } else if (insideComment === multiComment && currentChar + nextChar === '*/') { + i++; + insideComment = false; + ret += strip(str, offset, i + 1); + offset = i + 1; + continue; + } + } + + return ret + (insideComment ? strip(str.substr(offset)) : str.substr(offset)); +}; diff --git a/node_modules/strip-json-comments/license b/node_modules/strip-json-comments/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/strip-json-comments/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/strip-json-comments/package.json b/node_modules/strip-json-comments/package.json new file mode 100644 index 0000000..0edb6dd --- /dev/null +++ b/node_modules/strip-json-comments/package.json @@ -0,0 +1,110 @@ +{ + "_args": [ + [ + { + "raw": "strip-json-comments@~2.0.1", + "scope": null, + "escapedName": "strip-json-comments", + "name": "strip-json-comments", + "rawSpec": "~2.0.1", + "spec": ">=2.0.1 <2.1.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint" + ] + ], + "_from": "strip-json-comments@>=2.0.1 <2.1.0", + "_id": "strip-json-comments@2.0.1", + "_inCache": true, + "_location": "/strip-json-comments", + "_nodeVersion": "4.2.4", + "_npmOperationalInternal": { + "host": "packages-9-west.internal.npmjs.com", + "tmp": "tmp/strip-json-comments-2.0.1.tgz_1455006605207_0.8280157081317157" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "3.7.2", + "_phantomChildren": {}, + "_requested": { + "raw": "strip-json-comments@~2.0.1", + "scope": null, + "escapedName": "strip-json-comments", + "name": "strip-json-comments", + "rawSpec": "~2.0.1", + "spec": ">=2.0.1 <2.1.0", + "type": "range" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "_shasum": "3c531942e908c2697c0ec344858c286c7ca0a60a", + "_shrinkwrap": null, + "_spec": "strip-json-comments@~2.0.1", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/strip-json-comments/issues" + }, + "dependencies": {}, + "description": "Strip comments from JSON. Lets you use comments in your JSON files!", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "3c531942e908c2697c0ec344858c286c7ca0a60a", + "tarball": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "1aef99eaa70d07981156e8aaa722e750c3b4eaf9", + "homepage": "https://github.com/sindresorhus/strip-json-comments#readme", + "keywords": [ + "json", + "strip", + "remove", + "delete", + "trim", + "comments", + "multiline", + "parse", + "config", + "configuration", + "conf", + "settings", + "util", + "env", + "environment" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "strip-json-comments", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/strip-json-comments.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.0.1" +} diff --git a/node_modules/strip-json-comments/readme.md b/node_modules/strip-json-comments/readme.md new file mode 100644 index 0000000..0ee58df --- /dev/null +++ b/node_modules/strip-json-comments/readme.md @@ -0,0 +1,64 @@ +# strip-json-comments [![Build Status](https://travis-ci.org/sindresorhus/strip-json-comments.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-json-comments) + +> Strip comments from JSON. Lets you use comments in your JSON files! + +This is now possible: + +```js +{ + // rainbows + "unicorn": /* ⤠*/ "cake" +} +``` + +It will replace single-line comments `//` and multi-line comments `/**/` with whitespace. This allows JSON error positions to remain as close as possible to the original source. + +Also available as a [gulp](https://github.com/sindresorhus/gulp-strip-json-comments)/[grunt](https://github.com/sindresorhus/grunt-strip-json-comments)/[broccoli](https://github.com/sindresorhus/broccoli-strip-json-comments) plugin. + + +## Install + +``` +$ npm install --save strip-json-comments +``` + + +## Usage + +```js +const json = '{/*rainbows*/"unicorn":"cake"}'; + +JSON.parse(stripJsonComments(json)); +//=> {unicorn: 'cake'} +``` + + +## API + +### stripJsonComments(input, [options]) + +#### input + +Type: `string` + +Accepts a string with JSON and returns a string without comments. + +#### options + +##### whitespace + +Type: `boolean` +Default: `true` + +Replace comments with whitespace instead of stripping them entirely. + + +## Related + +- [strip-json-comments-cli](https://github.com/sindresorhus/strip-json-comments-cli) - CLI for this module +- [strip-css-comments](https://github.com/sindresorhus/strip-css-comments) - Strip comments from CSS + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/table/LICENSE b/node_modules/table/LICENSE new file mode 100644 index 0000000..7e84ea3 --- /dev/null +++ b/node_modules/table/LICENSE @@ -0,0 +1,24 @@ +Copyright (c) 2016, Gajus Kuizinas (http://gajus.com/) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the Gajus Kuizinas (http://gajus.com/) nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL ANUARY BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/table/README.md b/node_modules/table/README.md new file mode 100644 index 0000000..14e3934 --- /dev/null +++ b/node_modules/table/README.md @@ -0,0 +1,671 @@ + +# Table + +[![Travis build status](http://img.shields.io/travis/gajus/table/master.svg?style=flat)](https://travis-ci.org/gajus/table) +[![NPM version](http://img.shields.io/npm/v/table.svg?style=flat)](https://www.npmjs.com/package/table) +[![js-canonical-style](https://img.shields.io/badge/code%20style-canonical-brightgreen.svg?style=flat)](https://github.com/gajus/canonical) + +* [Table](#table) + * [Features](#table-features) + * [Usage](#table-usage) + * [Cell Content Alignment](#table-usage-cell-content-alignment) + * [Column Width](#table-usage-column-width) + * [Custom Border](#table-usage-custom-border) + * [Draw Horizontal Line](#table-usage-draw-horizontal-line) + * [Padding Cell Content](#table-usage-padding-cell-content) + * [Predefined Border Templates](#table-usage-predefined-border-templates) + * [Streaming](#table-usage-streaming) + * [Text Truncation](#table-usage-text-truncation) + * [Text Wrapping](#table-usage-text-wrapping) + + +Produces a string that represents array data in a text table. + +![Demo of table displaying a list of missions to the Moon.](./.README/demo.png) + + +## Features + +* Works with strings containing [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) characters. +* Works with strings containing [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code). +* Configurable border characters. +* Configurable content alignment per column. +* Configurable content padding per column. +* Configurable column width. +* Text wrapping. + + +## Usage + +Table data is described using an array (rows) of array (cells). + +```js +import { + table +} from 'table'; + +// Using commonjs? +// const {table} = require('table'); + +let data, + output; + +data = [ + ['0A', '0B', '0C'], + ['1A', '1B', '1C'], + ['2A', '2B', '2C'] +]; + +/** + * @typedef {string} table~cell + */ + +/** + * @typedef {table~cell[]} table~row + */ + +/** + * @typedef {Object} table~columns + * @property {string} alignment Cell content alignment (enum: left, center, right) (default: left). + * @property {number} width Column width (default: auto). + * @property {number} truncate Number of characters are which the content will be truncated (default: Infinity). + * @property {number} paddingLeft Cell content padding width left (default: 1). + * @property {number} paddingRight Cell content padding width right (default: 1). + */ + +/** + * @typedef {Object} table~border + * @property {string} topBody + * @property {string} topJoin + * @property {string} topLeft + * @property {string} topRight + * @property {string} bottomBody + * @property {string} bottomJoin + * @property {string} bottomLeft + * @property {string} bottomRight + * @property {string} bodyLeft + * @property {string} bodyRight + * @property {string} bodyJoin + * @property {string} joinBody + * @property {string} joinLeft + * @property {string} joinRight + * @property {string} joinJoin + */ + +/** + * Used to dynamically tell table whether to draw a line separating rows or not. + * The default behavior is to always return true. + * + * @typedef {function} drawJoin + * @param {number} index + * @param {number} size + * @return {boolean} + */ + +/** + * @typedef {Object} table~config + * @property {table~border} border + * @property {table~columns[]} columns Column specific configuration. + * @property {table~columns} columnDefault Default values for all columns. Column specific settings overwrite the default values. + * @property {table~drawJoin} drawHorizontalLine + */ + +/** + * Generates a text table. + * + * @param {table~row[]} rows + * @param {table~config} config + * @return {String} + */ +output = table(data); + +console.log(output); +``` + +``` +â•”â•â•â•â•â•¤â•â•â•â•â•¤â•â•â•â•â•— +â•‘ 0A │ 0B │ 0C â•‘ +╟────┼────┼────╢ +â•‘ 1A │ 1B │ 1C â•‘ +╟────┼────┼────╢ +â•‘ 2A │ 2B │ 2C â•‘ +â•šâ•â•â•â•â•§â•â•â•â•â•§â•â•â•â•â• +``` + + + +### Cell Content Alignment + +`{string} config.columns[{number}].alignment` property controls content horizontal alignment within a cell. + +Valid values are: "left", "right" and "center". + +```js +let config, + data, + output; + +data = [ + ['0A', '0B', '0C'], + ['1A', '1B', '1C'], + ['2A', '2B', '2C'] +]; + +config = { + columns: { + 0: { + alignment: 'left', + minWidth: 10 + }, + 1: { + alignment: 'center', + minWidth: 10 + }, + 2: { + alignment: 'right', + minWidth: 10 + } + } +}; + +output = table(data, config); + +console.log(output); +``` + +``` +â•”â•â•â•â•â•â•â•â•â•â•â•â•â•¤â•â•â•â•â•â•â•â•â•â•â•â•â•¤â•â•â•â•â•â•â•â•â•â•â•â•â•— +â•‘ 0A │ 0B │ 0C â•‘ +╟────────────┼────────────┼────────────╢ +â•‘ 1A │ 1B │ 1C â•‘ +╟────────────┼────────────┼────────────╢ +â•‘ 2A │ 2B │ 2C â•‘ +â•šâ•â•â•â•â•â•â•â•â•â•â•â•â•§â•â•â•â•â•â•â•â•â•â•â•â•â•§â•â•â•â•â•â•â•â•â•â•â•â•â• +``` + + +### Column Width + +`{number} config.columns[{number}].width` property restricts column width to a fixed width. + +```js +let data, + output, + options; + +data = [ + ['0A', '0B', '0C'], + ['1A', '1B', '1C'], + ['2A', '2B', '2C'] +]; + +options = { + columns: { + 1: { + width: 10 + } + } +}; + +output = table(data, options); + +console.log(output); +``` + +``` +â•”â•â•â•â•â•¤â•â•â•â•â•â•â•â•â•â•â•â•â•¤â•â•â•â•â•— +â•‘ 0A │ 0B │ 0C â•‘ +╟────┼────────────┼────╢ +â•‘ 1A │ 1B │ 1C â•‘ +╟────┼────────────┼────╢ +â•‘ 2A │ 2B │ 2C â•‘ +â•šâ•â•â•â•â•§â•â•â•â•â•â•â•â•â•â•â•â•â•§â•â•â•â•â• +``` + + +### Custom Border + +`{object} config.border` property describes characters used to draw the table border. + +```js +let config, + data, + output; + +data = [ + ['0A', '0B', '0C'], + ['1A', '1B', '1C'], + ['2A', '2B', '2C'] +]; + +config = { + border: { + topBody: `─`, + topJoin: `┬`, + topLeft: `┌`, + topRight: `â”`, + + bottomBody: `─`, + bottomJoin: `â”´`, + bottomLeft: `â””`, + bottomRight: `┘`, + + bodyLeft: `│`, + bodyRight: `│`, + bodyJoin: `│`, + + joinBody: `─`, + joinLeft: `├`, + joinRight: `┤`, + joinJoin: `┼` + } +}; + +output = table(data, config); + +console.log(output); +``` + +``` +┌────┬────┬────┠+│ 0A │ 0B │ 0C │ +├────┼────┼────┤ +│ 1A │ 1B │ 1C │ +├────┼────┼────┤ +│ 2A │ 2B │ 2C │ +└────┴────┴────┘ +``` + + +### Draw Horizontal Line + +`{function} config.drawHorizontalLine` property is a function that is called for every non-content row in the table. The result of the function `{boolean}` determines whether a row is drawn. + +```js +let data, + output, + options; + +data = [ + ['0A', '0B', '0C'], + ['1A', '1B', '1C'], + ['2A', '2B', '2C'], + ['3A', '3B', '3C'], + ['4A', '4B', '4C'] +]; + +options = { + /** + * @typedef {function} drawJoin + * @param {number} index + * @param {number} size + * @return {boolean} + */ + drawHorizontalLine: (index, size) => { + return index === 0 || index === 1 || index === size - 1 || index === size; + } +}; + +output = table(data, options); + +console.log(output); +``` + +``` +â•”â•â•â•â•â•¤â•â•â•â•â•¤â•â•â•â•â•— +â•‘ 0A │ 0B │ 0C â•‘ +╟────┼────┼────╢ +â•‘ 1A │ 1B │ 1C â•‘ +â•‘ 2A │ 2B │ 2C â•‘ +â•‘ 3A │ 3B │ 3C â•‘ +╟────┼────┼────╢ +â•‘ 4A │ 4B │ 4C â•‘ +â•šâ•â•â•â•â•§â•â•â•â•â•§â•â•â•â•â• +``` + + +### Padding Cell Content + +`{number} config.columns[{number}].paddingLeft` and `{number} config.columns[{number}].paddingRight` properties control content padding within a cell. Property value represents a number of whitespaces used to pad the content. + +```js +let config, + data, + output; + +data = [ + ['0A', 'AABBCC', '0C'], + ['1A', '1B', '1C'], + ['2A', '2B', '2C'] +]; + +config = { + columns: { + 0: { + paddingLeft: 3 + }, + 1: { + width: 2, + paddingRight: 3 + } + } +}; + +output = table(data, config); + +console.log(output); +``` + +``` +â•”â•â•â•â•â•â•â•¤â•â•â•â•â•â•â•¤â•â•â•â•â•— +â•‘ 0A │ AA │ 0C â•‘ +â•‘ │ BB │ â•‘ +â•‘ │ CC │ â•‘ +╟──────┼──────┼────╢ +â•‘ 1A │ 1B │ 1C â•‘ +╟──────┼──────┼────╢ +â•‘ 2A │ 2B │ 2C â•‘ +â•šâ•â•â•â•â•â•â•§â•â•â•â•â•â•â•§â•â•â•â•â• +``` + + +### Predefined Border Templates + +You can load one of the predefined border templates using `getBorderCharacters` function. + +```js +import { + table, + getBorderCharacters +} from 'table'; + +let config, + data; + +data = [ + ['0A', '0B', '0C'], + ['1A', '1B', '1C'], + ['2A', '2B', '2C'] +]; + +config = { + border: getBorderCharacters(`name of the template`) +}; + +table(data, config); +``` + +``` +# honeywell + +â•”â•â•â•â•â•¤â•â•â•â•â•¤â•â•â•â•â•— +â•‘ 0A │ 0B │ 0C â•‘ +╟────┼────┼────╢ +â•‘ 1A │ 1B │ 1C â•‘ +╟────┼────┼────╢ +â•‘ 2A │ 2B │ 2C â•‘ +â•šâ•â•â•â•â•§â•â•â•â•â•§â•â•â•â•â• + +# norc + +┌────┬────┬────┠+│ 0A │ 0B │ 0C │ +├────┼────┼────┤ +│ 1A │ 1B │ 1C │ +├────┼────┼────┤ +│ 2A │ 2B │ 2C │ +└────┴────┴────┘ + +# ramac (ASCII; for use in terminals that do not support Unicode characters) + ++----+----+----+ +| 0A | 0B | 0C | +|----|----|----| +| 1A | 1B | 1C | +|----|----|----| +| 2A | 2B | 2C | ++----+----+----+ + +# void (no borders; see "bordless table" section of the documentation) + + 0A 0B 0C + + 1A 1B 1C + + 2A 2B 2C + +``` + +Raise [an issue](https://github.com/gajus/table/issues) if you'd like to contribute a new border template. + + +#### Borderless Table + +Simply using "void" border character template creates a table with a lot of unnecessary spacing. + +To create a more plesant to the eye table, reset the padding and remove the joining rows, e.g. + +```js +let output; + +output = table(data, { + border: getBorderCharacters(`void`), + columnDefault: { + paddingLeft: 0, + paddingRight: 1 + }, + drawHorizontalLine: () => { + return false + } +}); + +console.log(output); +``` + +``` +0A 0B 0C +1A 1B 1C +2A 2B 2C +``` + + +### Streaming + +`table` package exports `createStream` function used to draw a table and append rows. + +`createStream` requires `{number} columnDefault.width` and `{number} columnCount` configuration properties. + +```js +import { + createStream +} from 'table'; + +let config, + stream; + +config = { + columnDefault: { + width: 50 + }, + columnCount: 1 +}; + +stream = createStream(config); + +setInterval(() => { + stream.write([new Date()]); +}, 500); +``` + +![Streaming current date.](./.README/streaming.gif) + +`table` package uses ANSI escape codes to overwrite the output of the last line when a new row is printed. + +The underlying implementation is explained in this [Stack Overflow answer](http://stackoverflow.com/a/32938658/368691). + +Streaming supports all of the configuration properties and functionality of a static table (such as auto text wrapping, alignment and padding), e.g. + +```js +import { + createStream +} from 'table'; + +import _ from 'lodash'; + +let config, + stream, + i; + +config = { + columnDefault: { + width: 50 + }, + columnCount: 3, + columns: { + 0: { + width: 10, + alignment: 'right' + }, + 1: { + alignment: 'center', + }, + 2: { + width: 10 + } + } +}; + +stream = createStream(config); + +i = 0; + +setInterval(() => { + let random; + + random = _.sample('abcdefghijklmnopqrstuvwxyz', _.random(1, 30)).join(''); + + stream.write([i++, new Date(), random]); +}, 500); +``` + +![Streaming random data.](./.README/streaming-random.gif) + +### Text Truncation + +To handle a content that overflows the container width, `table` package implements [text wrapping](#table-usage-text-wrapping). However, sometimes you may want to truncate content that is too long to be displayed in the table. + +`{number} config.columns[{number}].truncate` property (default: `Infinity`) truncates the text at the specified length. + +```js +let config, + data, + output; + +data = [ + ['Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pulvinar nibh sed mauris convallis dapibus. Nunc venenatis tempus nulla sit amet viverra.'] +]; + +config = { + columns: { + 0: { + width: 20, + truncate: 100 + } + } +}; + +output = table(data, config); + +console.log(output); +``` + +``` +â•”â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•— +â•‘ Lorem ipsum dolor si â•‘ +â•‘ t amet, consectetur â•‘ +â•‘ adipiscing elit. Pha â•‘ +â•‘ sellus pulvinar nibh â•‘ +â•‘ sed mauris conva... â•‘ +â•šâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• +``` + + +### Text Wrapping + +`table` package implements auto text wrapping, i.e. text that has width greater than the container width will be separated into multiple lines, e.g. + +```js +let config, + data, + output; + +data = [ + ['Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pulvinar nibh sed mauris convallis dapibus. Nunc venenatis tempus nulla sit amet viverra.'] +]; + +config = { + columns: { + 0: { + width: 20 + } + } +}; + +output = table(data, config); + +console.log(output); +``` + +``` +â•”â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•— +â•‘ Lorem ipsum dolor si â•‘ +â•‘ t amet, consectetur â•‘ +â•‘ adipiscing elit. Pha â•‘ +â•‘ sellus pulvinar nibh â•‘ +â•‘ sed mauris convallis â•‘ +â•‘ dapibus. Nunc venena â•‘ +â•‘ tis tempus nulla sit â•‘ +â•‘ amet viverra. â•‘ +â•šâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• +``` + +When `wrapWord` is `true` the text is broken at the nearest space or one of the special characters ("-", "_", "\", "/", ".", ",", ";"), e.g. + +```js +let config, + data, + output; + +data = [ + ['Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pulvinar nibh sed mauris convallis dapibus. Nunc venenatis tempus nulla sit amet viverra.'] +]; + +config = { + columns: { + 0: { + width: 20, + wrapWord: true + } + } +}; + +output = table(data, config); + +console.log(output); +``` + +``` +â•”â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•— +â•‘ Lorem ipsum dolor â•‘ +â•‘ sit amet, â•‘ +â•‘ consectetur â•‘ +â•‘ adipiscing elit. â•‘ +â•‘ Phasellus pulvinar â•‘ +â•‘ nibh sed mauris â•‘ +â•‘ convallis dapibus. â•‘ +â•‘ Nunc venenatis â•‘ +â•‘ tempus nulla sit â•‘ +â•‘ amet viverra. â•‘ +â•šâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• +``` + diff --git a/node_modules/table/dist/alignString.js b/node_modules/table/dist/alignString.js new file mode 100644 index 0000000..3a948d3 --- /dev/null +++ b/node_modules/table/dist/alignString.js @@ -0,0 +1,106 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _lodash = require('lodash'); + +var _lodash2 = _interopRequireDefault(_lodash); + +var _stringWidth = require('string-width'); + +var _stringWidth2 = _interopRequireDefault(_stringWidth); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const alignments = ['left', 'right', 'center']; + +/** + * @param {string} subject + * @param {number} width + * @returns {string} + */ +const alignLeft = (subject, width) => { + return subject + ' '.repeat(width); +}; + +/** + * @param {string} subject + * @param {number} width + * @returns {string} + */ +const alignRight = (subject, width) => { + return ' '.repeat(width) + subject; +}; + +/** + * @param {string} subject + * @param {number} width + * @returns {string} + */ +const alignCenter = (subject, width) => { + let halfWidth; + + halfWidth = width / 2; + + if (halfWidth % 2 === 0) { + return ' '.repeat(halfWidth) + subject + ' '.repeat(halfWidth); + } else { + halfWidth = Math.floor(halfWidth); + + return ' '.repeat(halfWidth) + subject + ' '.repeat(halfWidth + 1); + } +}; + +/** + * Pads a string to the left and/or right to position the subject + * text in a desired alignment within a container. + * + * @param {string} subject + * @param {number} containerWidth + * @param {string} alignment One of the valid options (left, right, center). + * @returns {string} + */ + +exports.default = (subject, containerWidth, alignment) => { + if (!_lodash2.default.isString(subject)) { + throw new TypeError('Subject parameter value must be a string.'); + } + + if (!_lodash2.default.isNumber(containerWidth)) { + throw new TypeError('Container width parameter value must be a number.'); + } + + const subjectWidth = (0, _stringWidth2.default)(subject); + + if (subjectWidth > containerWidth) { + // console.log('subjectWidth', subjectWidth, 'containerWidth', containerWidth, 'subject', subject); + + throw new Error('Subject parameter value width cannot be greater than the container width.'); + } + + if (!_lodash2.default.isString(alignment)) { + throw new TypeError('Alignment parameter value must be a string.'); + } + + if (alignments.indexOf(alignment) === -1) { + throw new Error('Alignment parameter value must be a known alignment parameter value (left, right, center).'); + } + + if (subjectWidth === 0) { + return ' '.repeat(containerWidth); + } + + const availableWidth = containerWidth - subjectWidth; + + if (alignment === 'left') { + return alignLeft(subject, availableWidth); + } + + if (alignment === 'right') { + return alignRight(subject, availableWidth); + } + + return alignCenter(subject, availableWidth); +}; \ No newline at end of file diff --git a/node_modules/table/dist/alignTableData.js b/node_modules/table/dist/alignTableData.js new file mode 100644 index 0000000..eb40784 --- /dev/null +++ b/node_modules/table/dist/alignTableData.js @@ -0,0 +1,34 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _stringWidth = require('string-width'); + +var _stringWidth2 = _interopRequireDefault(_stringWidth); + +var _alignString = require('./alignString'); + +var _alignString2 = _interopRequireDefault(_alignString); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @param {table~row[]} rows + * @param {Object} config + * @returns {table~row[]} + */ +exports.default = (rows, config) => { + return rows.map(cells => { + return cells.map((value, index1) => { + const column = config.columns[index1]; + + if ((0, _stringWidth2.default)(value) === column.width) { + return value; + } else { + return (0, _alignString2.default)(value, column.width, column.alignment); + } + }); + }); +}; \ No newline at end of file diff --git a/node_modules/table/dist/calculateCellHeight.js b/node_modules/table/dist/calculateCellHeight.js new file mode 100644 index 0000000..7a89738 --- /dev/null +++ b/node_modules/table/dist/calculateCellHeight.js @@ -0,0 +1,47 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _lodash = require('lodash'); + +var _lodash2 = _interopRequireDefault(_lodash); + +var _stringWidth = require('string-width'); + +var _stringWidth2 = _interopRequireDefault(_stringWidth); + +var _wrapWord = require('./wrapWord'); + +var _wrapWord2 = _interopRequireDefault(_wrapWord); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @param {string} value + * @param {number} columnWidth + * @param {boolean} useWrapWord + * @returns {number} + */ +exports.default = function (value, columnWidth) { + let useWrapWord = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + if (!_lodash2.default.isString(value)) { + throw new TypeError('Value must be a string.'); + } + + if (!Number.isInteger(columnWidth)) { + throw new TypeError('Column width must be an integer.'); + } + + if (columnWidth < 1) { + throw new Error('Column width must be greater than 0.'); + } + + if (useWrapWord) { + return (0, _wrapWord2.default)(value, columnWidth).length; + } + + return Math.ceil((0, _stringWidth2.default)(value) / columnWidth); +}; \ No newline at end of file diff --git a/node_modules/table/dist/calculateCellWidthIndex.js b/node_modules/table/dist/calculateCellWidthIndex.js new file mode 100644 index 0000000..e6bf927 --- /dev/null +++ b/node_modules/table/dist/calculateCellWidthIndex.js @@ -0,0 +1,23 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _stringWidth = require('string-width'); + +var _stringWidth2 = _interopRequireDefault(_stringWidth); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Calculates width of each cell contents. + * + * @param {string[]} cells + * @returns {number[]} + */ +exports.default = cells => { + return cells.map(value => { + return (0, _stringWidth2.default)(value); + }); +}; \ No newline at end of file diff --git a/node_modules/table/dist/calculateMaximumColumnWidthIndex.js b/node_modules/table/dist/calculateMaximumColumnWidthIndex.js new file mode 100644 index 0000000..da366c1 --- /dev/null +++ b/node_modules/table/dist/calculateMaximumColumnWidthIndex.js @@ -0,0 +1,37 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _calculateCellWidthIndex = require('./calculateCellWidthIndex'); + +var _calculateCellWidthIndex2 = _interopRequireDefault(_calculateCellWidthIndex); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Produces an array of values that describe the largest value length (width) in every column. + * + * @param {Array[]} rows + * @returns {number[]} + */ +exports.default = rows => { + if (!rows[0]) { + throw new Error('Dataset must have at least one row.'); + } + + const columns = Array(rows[0].length).fill(0); + + rows.forEach(row => { + const columnWidthIndex = (0, _calculateCellWidthIndex2.default)(row); + + columnWidthIndex.forEach((valueWidth, index0) => { + if (columns[index0] < valueWidth) { + columns[index0] = valueWidth; + } + }); + }); + + return columns; +}; \ No newline at end of file diff --git a/node_modules/table/dist/calculateRowHeightIndex.js b/node_modules/table/dist/calculateRowHeightIndex.js new file mode 100644 index 0000000..2976ec4 --- /dev/null +++ b/node_modules/table/dist/calculateRowHeightIndex.js @@ -0,0 +1,48 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _lodash = require('lodash'); + +var _lodash2 = _interopRequireDefault(_lodash); + +var _calculateCellHeight = require('./calculateCellHeight'); + +var _calculateCellHeight2 = _interopRequireDefault(_calculateCellHeight); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Calculates the vertical row span index. + * + * @param {Array[]} rows + * @param {Object} config + * @returns {number[]} + */ +exports.default = (rows, config) => { + const tableWidth = rows[0].length; + + const rowSpanIndex = []; + + rows.forEach(cells => { + const cellHeightIndex = Array(tableWidth).fill(1); + + cells.forEach((value, index1) => { + if (!_lodash2.default.isNumber(config.columns[index1].width)) { + throw new TypeError('column[index].width must be a number.'); + } + + if (!_lodash2.default.isBoolean(config.columns[index1].wrapWord)) { + throw new TypeError('column[index].wrapWord must be a boolean.'); + } + + cellHeightIndex[index1] = (0, _calculateCellHeight2.default)(value, config.columns[index1].width, config.columns[index1].wrapWord); + }); + + rowSpanIndex.push(_lodash2.default.max(cellHeightIndex)); + }); + + return rowSpanIndex; +}; \ No newline at end of file diff --git a/node_modules/table/dist/createStream.js b/node_modules/table/dist/createStream.js new file mode 100644 index 0000000..83698f0 --- /dev/null +++ b/node_modules/table/dist/createStream.js @@ -0,0 +1,157 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _lodash = require('lodash'); + +var _lodash2 = _interopRequireDefault(_lodash); + +var _makeStreamConfig = require('./makeStreamConfig'); + +var _makeStreamConfig2 = _interopRequireDefault(_makeStreamConfig); + +var _drawRow = require('./drawRow'); + +var _drawRow2 = _interopRequireDefault(_drawRow); + +var _drawBorder = require('./drawBorder'); + +var _stringifyTableData = require('./stringifyTableData'); + +var _stringifyTableData2 = _interopRequireDefault(_stringifyTableData); + +var _truncateTableData = require('./truncateTableData'); + +var _truncateTableData2 = _interopRequireDefault(_truncateTableData); + +var _mapDataUsingRowHeightIndex = require('./mapDataUsingRowHeightIndex'); + +var _mapDataUsingRowHeightIndex2 = _interopRequireDefault(_mapDataUsingRowHeightIndex); + +var _alignTableData = require('./alignTableData'); + +var _alignTableData2 = _interopRequireDefault(_alignTableData); + +var _padTableData = require('./padTableData'); + +var _padTableData2 = _interopRequireDefault(_padTableData); + +var _calculateRowHeightIndex = require('./calculateRowHeightIndex'); + +var _calculateRowHeightIndex2 = _interopRequireDefault(_calculateRowHeightIndex); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @param {Array} data + * @param {Object} config + * @returns {Array} + */ +const prepareData = (data, config) => { + let rows; + + rows = (0, _stringifyTableData2.default)(data); + + rows = (0, _truncateTableData2.default)(data, config); + + const rowHeightIndex = (0, _calculateRowHeightIndex2.default)(rows, config); + + rows = (0, _mapDataUsingRowHeightIndex2.default)(rows, rowHeightIndex, config); + rows = (0, _alignTableData2.default)(rows, config); + rows = (0, _padTableData2.default)(rows, config); + + return rows; +}; + +/** + * @param {string[]} row + * @param {number[]} columnWidthIndex + * @param {Object} config + * @returns {undefined} + */ +const create = (row, columnWidthIndex, config) => { + const rows = prepareData([row], config); + + const body = rows.map(literalRow => { + return (0, _drawRow2.default)(literalRow, config.border); + }).join(''); + + let output; + + output = ''; + + output += (0, _drawBorder.drawBorderTop)(columnWidthIndex, config.border); + output += body; + output += (0, _drawBorder.drawBorderBottom)(columnWidthIndex, config.border); + + output = _lodash2.default.trimEnd(output); + + process.stdout.write(output); +}; + +/** + * @param {string[]} row + * @param {number[]} columnWidthIndex + * @param {Object} config + * @returns {undefined} + */ +const append = (row, columnWidthIndex, config) => { + const rows = prepareData([row], config); + + const body = rows.map(literalRow => { + return (0, _drawRow2.default)(literalRow, config.border); + }).join(''); + + let output; + + output = '\r\u001B[K'; + + output += (0, _drawBorder.drawBorderJoin)(columnWidthIndex, config.border); + output += body; + output += (0, _drawBorder.drawBorderBottom)(columnWidthIndex, config.border); + + output = _lodash2.default.trimEnd(output); + + process.stdout.write(output); +}; + +/** + * @param {Object} userConfig + * @returns {Object} + */ + +exports.default = function () { + let userConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + const config = (0, _makeStreamConfig2.default)(userConfig); + + const columnWidthIndex = _lodash2.default.mapValues(config.columns, column => { + return column.width + column.paddingLeft + column.paddingRight; + }); + + let empty; + + empty = true; + + return { + /** + * @param {string[]} row + * @returns {undefined} + */ + write: row => { + if (row.length !== config.columnCount) { + throw new Error('Row cell count does not match the config.columnCount.'); + } + + if (empty) { + empty = false; + + return create(row, columnWidthIndex, config); + } else { + return append(row, columnWidthIndex, config); + } + } + }; +}; \ No newline at end of file diff --git a/node_modules/table/dist/drawBorder.js b/node_modules/table/dist/drawBorder.js new file mode 100644 index 0000000..beae57f --- /dev/null +++ b/node_modules/table/dist/drawBorder.js @@ -0,0 +1,96 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +/** + * @typedef drawBorder~parts + * @property {string} left + * @property {string} right + * @property {string} body + * @property {string} join + */ + +/** + * @param {number[]} columnSizeIndex + * @param {drawBorder~parts} parts + * @returns {string} + */ +const drawBorder = (columnSizeIndex, parts) => { + const columns = columnSizeIndex.map(size => { + return parts.body.repeat(size); + }).join(parts.join); + + return parts.left + columns + parts.right + '\n'; +}; + +/** + * @typedef drawBorderTop~parts + * @property {string} topLeft + * @property {string} topRight + * @property {string} topBody + * @property {string} topJoin + */ + +/** + * @param {number[]} columnSizeIndex + * @param {drawBorderTop~parts} parts + * @returns {string} + */ +const drawBorderTop = (columnSizeIndex, parts) => { + return drawBorder(columnSizeIndex, { + body: parts.topBody, + join: parts.topJoin, + left: parts.topLeft, + right: parts.topRight + }); +}; + +/** + * @typedef drawBorderJoin~parts + * @property {string} joinLeft + * @property {string} joinRight + * @property {string} joinBody + * @property {string} joinJoin + */ + +/** + * @param {number[]} columnSizeIndex + * @param {drawBorderJoin~parts} parts + * @returns {string} + */ +const drawBorderJoin = (columnSizeIndex, parts) => { + return drawBorder(columnSizeIndex, { + body: parts.joinBody, + join: parts.joinJoin, + left: parts.joinLeft, + right: parts.joinRight + }); +}; + +/** + * @typedef drawBorderBottom~parts + * @property {string} topLeft + * @property {string} topRight + * @property {string} topBody + * @property {string} topJoin + */ + +/** + * @param {number[]} columnSizeIndex + * @param {drawBorderBottom~parts} parts + * @returns {string} + */ +const drawBorderBottom = (columnSizeIndex, parts) => { + return drawBorder(columnSizeIndex, { + body: parts.bottomBody, + join: parts.bottomJoin, + left: parts.bottomLeft, + right: parts.bottomRight + }); +}; + +exports.drawBorder = drawBorder; +exports.drawBorderBottom = drawBorderBottom; +exports.drawBorderJoin = drawBorderJoin; +exports.drawBorderTop = drawBorderTop; \ No newline at end of file diff --git a/node_modules/table/dist/drawRow.js b/node_modules/table/dist/drawRow.js new file mode 100644 index 0000000..65547fb --- /dev/null +++ b/node_modules/table/dist/drawRow.js @@ -0,0 +1,21 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +/** + * @typedef {Object} drawRow~border + * @property {string} bodyLeft + * @property {string} bodyRight + * @property {string} bodyJoin + */ + +/** + * @param {number[]} columns + * @param {drawRow~border} border + * @returns {string} + */ +exports.default = (columns, border) => { + return border.bodyLeft + columns.join(border.bodyJoin) + border.bodyRight + '\n'; +}; \ No newline at end of file diff --git a/node_modules/table/dist/drawTable.js b/node_modules/table/dist/drawTable.js new file mode 100644 index 0000000..01e8c3e --- /dev/null +++ b/node_modules/table/dist/drawTable.js @@ -0,0 +1,59 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _drawBorder = require('./drawBorder'); + +var _drawRow = require('./drawRow'); + +var _drawRow2 = _interopRequireDefault(_drawRow); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @param {Array} rows + * @param {Object} border + * @param {Array} columnSizeIndex + * @param {Array} rowSpanIndex + * @param {Function} drawHorizontalLine + * @returns {string} + */ +exports.default = (rows, border, columnSizeIndex, rowSpanIndex, drawHorizontalLine) => { + let output; + let realRowIndex; + let rowHeight; + + const rowCount = rows.length; + + realRowIndex = 0; + + output = ''; + + if (drawHorizontalLine(realRowIndex, rowCount)) { + output += (0, _drawBorder.drawBorderTop)(columnSizeIndex, border); + } + + rows.forEach((row, index0) => { + output += (0, _drawRow2.default)(row, border); + + if (!rowHeight) { + rowHeight = rowSpanIndex[realRowIndex]; + + realRowIndex++; + } + + rowHeight--; + + if (rowHeight === 0 && index0 !== rowCount - 1 && drawHorizontalLine(realRowIndex, rowCount)) { + output += (0, _drawBorder.drawBorderJoin)(columnSizeIndex, border); + } + }); + + if (drawHorizontalLine(realRowIndex, rowCount)) { + output += (0, _drawBorder.drawBorderBottom)(columnSizeIndex, border); + } + + return output; +}; \ No newline at end of file diff --git a/node_modules/table/dist/getBorderCharacters.js b/node_modules/table/dist/getBorderCharacters.js new file mode 100644 index 0000000..0a0f599 --- /dev/null +++ b/node_modules/table/dist/getBorderCharacters.js @@ -0,0 +1,126 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +/* eslint-disable sort-keys */ + +/** + * @typedef border + * @property {string} topBody + * @property {string} topJoin + * @property {string} topLeft + * @property {string} topRight + * @property {string} bottomBody + * @property {string} bottomJoin + * @property {string} bottomLeft + * @property {string} bottomRight + * @property {string} bodyLeft + * @property {string} bodyRight + * @property {string} bodyJoin + * @property {string} joinBody + * @property {string} joinLeft + * @property {string} joinRight + * @property {string} joinJoin + */ + +/** + * @param {string} name + * @returns {border} + */ +exports.default = name => { + if (name === 'honeywell') { + return { + topBody: 'â•', + topJoin: '╤', + topLeft: 'â•”', + topRight: 'â•—', + + bottomBody: 'â•', + bottomJoin: '╧', + bottomLeft: 'â•š', + bottomRight: 'â•', + + bodyLeft: 'â•‘', + bodyRight: 'â•‘', + bodyJoin: '│', + + joinBody: '─', + joinLeft: 'â•Ÿ', + joinRight: 'â•¢', + joinJoin: '┼' + }; + } + + if (name === 'norc') { + return { + topBody: '─', + topJoin: '┬', + topLeft: '┌', + topRight: 'â”', + + bottomBody: '─', + bottomJoin: 'â”´', + bottomLeft: 'â””', + bottomRight: '┘', + + bodyLeft: '│', + bodyRight: '│', + bodyJoin: '│', + + joinBody: '─', + joinLeft: '├', + joinRight: '┤', + joinJoin: '┼' + }; + } + + if (name === 'ramac') { + return { + topBody: '-', + topJoin: '+', + topLeft: '+', + topRight: '+', + + bottomBody: '-', + bottomJoin: '+', + bottomLeft: '+', + bottomRight: '+', + + bodyLeft: '|', + bodyRight: '|', + bodyJoin: '|', + + joinBody: '-', + joinLeft: '|', + joinRight: '|', + joinJoin: '|' + }; + } + + if (name === 'void') { + return { + topBody: '', + topJoin: '', + topLeft: '', + topRight: '', + + bottomBody: '', + bottomJoin: '', + bottomLeft: '', + bottomRight: '', + + bodyLeft: '', + bodyRight: '', + bodyJoin: '', + + joinBody: '', + joinLeft: '', + joinRight: '', + joinJoin: '' + }; + } + + throw new Error('Unknown border template "' + name + '".'); +}; \ No newline at end of file diff --git a/node_modules/table/dist/index.js b/node_modules/table/dist/index.js new file mode 100644 index 0000000..169eddf --- /dev/null +++ b/node_modules/table/dist/index.js @@ -0,0 +1,24 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getBorderCharacters = exports.createStream = exports.table = undefined; + +var _table = require('./table'); + +var _table2 = _interopRequireDefault(_table); + +var _createStream = require('./createStream'); + +var _createStream2 = _interopRequireDefault(_createStream); + +var _getBorderCharacters = require('./getBorderCharacters'); + +var _getBorderCharacters2 = _interopRequireDefault(_getBorderCharacters); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.table = _table2.default; +exports.createStream = _createStream2.default; +exports.getBorderCharacters = _getBorderCharacters2.default; \ No newline at end of file diff --git a/node_modules/table/dist/makeConfig.js b/node_modules/table/dist/makeConfig.js new file mode 100644 index 0000000..9444ffe --- /dev/null +++ b/node_modules/table/dist/makeConfig.js @@ -0,0 +1,99 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _lodash = require('lodash'); + +var _lodash2 = _interopRequireDefault(_lodash); + +var _getBorderCharacters = require('./getBorderCharacters'); + +var _getBorderCharacters2 = _interopRequireDefault(_getBorderCharacters); + +var _validateConfig = require('./validateConfig'); + +var _validateConfig2 = _interopRequireDefault(_validateConfig); + +var _calculateMaximumColumnWidthIndex = require('./calculateMaximumColumnWidthIndex'); + +var _calculateMaximumColumnWidthIndex2 = _interopRequireDefault(_calculateMaximumColumnWidthIndex); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Merges user provided border characters with the default border ("honeywell") characters. + * + * @param {Object} border + * @returns {Object} + */ +const makeBorder = function makeBorder() { + let border = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + return Object.assign({}, (0, _getBorderCharacters2.default)('honeywell'), border); +}; + +/** + * Creates a configuration for every column using default + * values for the missing configuration properties. + * + * @param {Array[]} rows + * @param {Object} columns + * @param {Object} columnDefault + * @returns {Object} + */ +const makeColumns = function makeColumns(rows) { + let columns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + let columnDefault = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + + const maximumColumnWidthIndex = (0, _calculateMaximumColumnWidthIndex2.default)(rows); + + _lodash2.default.times(rows[0].length, index => { + if (_lodash2.default.isUndefined(columns[index])) { + columns[index] = {}; + } + + columns[index] = Object.assign({ + alignment: 'left', + paddingLeft: 1, + paddingRight: 1, + truncate: Infinity, + width: maximumColumnWidthIndex[index], + wrapWord: false + }, columnDefault, columns[index]); + }); + + return columns; +}; + +/** + * Makes a new configuration object out of the userConfig object + * using default values for the missing configuration properties. + * + * @param {Array[]} rows + * @param {Object} userConfig + * @returns {Object} + */ + +exports.default = function (rows) { + let userConfig = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + (0, _validateConfig2.default)('config.json', userConfig); + + const config = _lodash2.default.cloneDeep(userConfig); + + config.border = makeBorder(config.border); + config.columns = makeColumns(rows, config.columns, config.columnDefault); + + if (!config.drawHorizontalLine) { + /** + * @returns {boolean} + */ + config.drawHorizontalLine = () => { + return true; + }; + } + + return config; +}; \ No newline at end of file diff --git a/node_modules/table/dist/makeStreamConfig.js b/node_modules/table/dist/makeStreamConfig.js new file mode 100644 index 0000000..479de35 --- /dev/null +++ b/node_modules/table/dist/makeStreamConfig.js @@ -0,0 +1,107 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _lodash = require('lodash'); + +var _lodash2 = _interopRequireDefault(_lodash); + +var _getBorderCharacters = require('./getBorderCharacters'); + +var _getBorderCharacters2 = _interopRequireDefault(_getBorderCharacters); + +var _validateConfig = require('./validateConfig'); + +var _validateConfig2 = _interopRequireDefault(_validateConfig); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Merges user provided border characters with the default border ("honeywell") characters. + * + * @param {Object} border + * @returns {Object} + */ +const makeBorder = function makeBorder() { + let border = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + return Object.assign({}, (0, _getBorderCharacters2.default)('honeywell'), border); +}; + +/** + * Creates a configuration for every column using default + * values for the missing configuration properties. + * + * @param {number} columnCount + * @param {Object} columns + * @param {Object} columnDefault + * @returns {Object} + */ +const makeColumns = function makeColumns(columnCount) { + let columns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + let columnDefault = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + + _lodash2.default.times(columnCount, index => { + if (_lodash2.default.isUndefined(columns[index])) { + columns[index] = {}; + } + + columns[index] = Object.assign({ + alignment: 'left', + paddingLeft: 1, + paddingRight: 1, + truncate: Infinity, + wrapWord: false + }, columnDefault, columns[index]); + }); + + return columns; +}; + +/** + * @typedef {Object} columnConfig + * @property {string} alignment + * @property {number} width + * @property {number} truncate + * @property {number} paddingLeft + * @property {number} paddingRight + */ + +/** + * @typedef {Object} streamConfig + * @property {columnConfig} columnDefault + * @property {Object} border + * @property {columnConfig[]} + * @property {number} columnCount Number of columns in the table (required). + */ + +/** + * Makes a new configuration object out of the userConfig object + * using default values for the missing configuration properties. + * + * @param {streamConfig} userConfig + * @returns {Object} + */ + +exports.default = function () { + let userConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + (0, _validateConfig2.default)('streamConfig.json', userConfig); + + const config = _lodash2.default.cloneDeep(userConfig); + + if (!config.columnDefault || !config.columnDefault.width) { + throw new Error('Must provide config.columnDefault.width when creating a stream.'); + } + + if (!config.columnCount) { + throw new Error('Must provide config.columnCount.'); + } + + config.border = makeBorder(config.border); + config.columns = makeColumns(config.columnCount, config.columns, config.columnDefault); + + return config; +}; \ No newline at end of file diff --git a/node_modules/table/dist/mapDataUsingRowHeightIndex.js b/node_modules/table/dist/mapDataUsingRowHeightIndex.js new file mode 100644 index 0000000..be0aae4 --- /dev/null +++ b/node_modules/table/dist/mapDataUsingRowHeightIndex.js @@ -0,0 +1,57 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _lodash = require('lodash'); + +var _lodash2 = _interopRequireDefault(_lodash); + +var _wrapString = require('./wrapString'); + +var _wrapString2 = _interopRequireDefault(_wrapString); + +var _wrapWord = require('./wrapWord'); + +var _wrapWord2 = _interopRequireDefault(_wrapWord); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @param {Array} unmappedRows + * @param {number[]} rowHeightIndex + * @param {Object} config + * @returns {Array} + */ +exports.default = (unmappedRows, rowHeightIndex, config) => { + const tableWidth = unmappedRows[0].length; + + const mappedRows = unmappedRows.map((cells, index0) => { + const rowHeight = _lodash2.default.times(rowHeightIndex[index0], () => { + return Array(tableWidth).fill(''); + }); + + // rowHeight + // [{row index within rowSaw; index2}] + // [{cell index within a virtual row; index1}] + + cells.forEach((value, index1) => { + let chunkedValue; + + if (config.columns[index1].wrapWord) { + chunkedValue = (0, _wrapWord2.default)(value, config.columns[index1].width); + } else { + chunkedValue = (0, _wrapString2.default)(value, config.columns[index1].width); + } + + chunkedValue.forEach((part, index2) => { + rowHeight[index2][index1] = part; + }); + }); + + return rowHeight; + }); + + return _lodash2.default.flatten(mappedRows); +}; \ No newline at end of file diff --git a/node_modules/table/dist/padTableData.js b/node_modules/table/dist/padTableData.js new file mode 100644 index 0000000..a78ce49 --- /dev/null +++ b/node_modules/table/dist/padTableData.js @@ -0,0 +1,20 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +/** + * @param {table~row[]} rows + * @param {Object} config + * @returns {table~row[]} + */ +exports.default = (rows, config) => { + return rows.map(cells => { + return cells.map((value, index1) => { + const column = config.columns[index1]; + + return ' '.repeat(column.paddingLeft) + value + ' '.repeat(column.paddingRight); + }); + }); +}; \ No newline at end of file diff --git a/node_modules/table/dist/schemas/config.json b/node_modules/table/dist/schemas/config.json new file mode 100644 index 0000000..3607418 --- /dev/null +++ b/node_modules/table/dist/schemas/config.json @@ -0,0 +1,114 @@ +{ + "$id": "config.json", + "$schema": "http://json-schema.org/draft-06/schema#", + "type": "object", + "properties": { + "border": { + "$ref": "#/definitions/borders" + }, + "columns": { + "$ref": "#/definitions/columns" + }, + "columnDefault": { + "$ref": "#/definitions/column" + }, + "drawHorizontalLine": { + "typeof": "function" + } + }, + "additionalProperties": false, + "definitions": { + "columns": { + "type": "object", + "patternProperties": { + "^[0-9]+$": { + "$ref": "#/definitions/column" + } + }, + "additionalProperties": false + }, + "column": { + "type": "object", + "properties": { + "alignment": { + "type": "string", + "enum": [ + "left", + "right", + "center" + ] + }, + "width": { + "type": "number" + }, + "wrapWord": { + "type": "boolean" + }, + "truncate": { + "type": "number" + }, + "paddingLeft": { + "type": "number" + }, + "paddingRight": { + "type": "number" + } + }, + "additionalProperties": false + }, + "borders": { + "type": "object", + "properties": { + "topBody": { + "$ref": "#/definitions/border" + }, + "topJoin": { + "$ref": "#/definitions/border" + }, + "topLeft": { + "$ref": "#/definitions/border" + }, + "topRight": { + "$ref": "#/definitions/border" + }, + "bottomBody": { + "$ref": "#/definitions/border" + }, + "bottomJoin": { + "$ref": "#/definitions/border" + }, + "bottomLeft": { + "$ref": "#/definitions/border" + }, + "bottomRight": { + "$ref": "#/definitions/border" + }, + "bodyLeft": { + "$ref": "#/definitions/border" + }, + "bodyRight": { + "$ref": "#/definitions/border" + }, + "bodyJoin": { + "$ref": "#/definitions/border" + }, + "joinBody": { + "$ref": "#/definitions/border" + }, + "joinLeft": { + "$ref": "#/definitions/border" + }, + "joinRight": { + "$ref": "#/definitions/border" + }, + "joinJoin": { + "$ref": "#/definitions/border" + } + }, + "additionalProperties": false + }, + "border": { + "type": "string" + } + } +} diff --git a/node_modules/table/dist/schemas/streamConfig.json b/node_modules/table/dist/schemas/streamConfig.json new file mode 100644 index 0000000..d8402a6 --- /dev/null +++ b/node_modules/table/dist/schemas/streamConfig.json @@ -0,0 +1,114 @@ +{ + "$id": "streamConfig.json", + "$schema": "http://json-schema.org/draft-06/schema#", + "type": "object", + "properties": { + "border": { + "$ref": "#/definitions/borders" + }, + "columns": { + "$ref": "#/definitions/columns" + }, + "columnDefault": { + "$ref": "#/definitions/column" + }, + "columnCount": { + "type": "number" + } + }, + "additionalProperties": false, + "definitions": { + "columns": { + "type": "object", + "patternProperties": { + "^[0-9]+$": { + "$ref": "#/definitions/column" + } + }, + "additionalProperties": false + }, + "column": { + "type": "object", + "properties": { + "alignment": { + "type": "string", + "enum": [ + "left", + "right", + "center" + ] + }, + "width": { + "type": "number" + }, + "wrapWord": { + "type": "boolean" + }, + "truncate": { + "type": "number" + }, + "paddingLeft": { + "type": "number" + }, + "paddingRight": { + "type": "number" + } + }, + "additionalProperties": false + }, + "borders": { + "type": "object", + "properties": { + "topBody": { + "$ref": "#/definitions/border" + }, + "topJoin": { + "$ref": "#/definitions/border" + }, + "topLeft": { + "$ref": "#/definitions/border" + }, + "topRight": { + "$ref": "#/definitions/border" + }, + "bottomBody": { + "$ref": "#/definitions/border" + }, + "bottomJoin": { + "$ref": "#/definitions/border" + }, + "bottomLeft": { + "$ref": "#/definitions/border" + }, + "bottomRight": { + "$ref": "#/definitions/border" + }, + "bodyLeft": { + "$ref": "#/definitions/border" + }, + "bodyRight": { + "$ref": "#/definitions/border" + }, + "bodyJoin": { + "$ref": "#/definitions/border" + }, + "joinBody": { + "$ref": "#/definitions/border" + }, + "joinLeft": { + "$ref": "#/definitions/border" + }, + "joinRight": { + "$ref": "#/definitions/border" + }, + "joinJoin": { + "$ref": "#/definitions/border" + } + }, + "additionalProperties": false + }, + "border": { + "type": "string" + } + } +} diff --git a/node_modules/table/dist/stringifyTableData.js b/node_modules/table/dist/stringifyTableData.js new file mode 100644 index 0000000..46a8b94 --- /dev/null +++ b/node_modules/table/dist/stringifyTableData.js @@ -0,0 +1,17 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +/** + * Casts all cell values to a string. + * + * @param {table~row[]} rows + * @returns {table~row[]} + */ +exports.default = rows => { + return rows.map(cells => { + return cells.map(String); + }); +}; \ No newline at end of file diff --git a/node_modules/table/dist/table.js b/node_modules/table/dist/table.js new file mode 100644 index 0000000..fe8c3cf --- /dev/null +++ b/node_modules/table/dist/table.js @@ -0,0 +1,133 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _drawTable = require('./drawTable'); + +var _drawTable2 = _interopRequireDefault(_drawTable); + +var _calculateCellWidthIndex = require('./calculateCellWidthIndex'); + +var _calculateCellWidthIndex2 = _interopRequireDefault(_calculateCellWidthIndex); + +var _makeConfig = require('./makeConfig'); + +var _makeConfig2 = _interopRequireDefault(_makeConfig); + +var _calculateRowHeightIndex = require('./calculateRowHeightIndex'); + +var _calculateRowHeightIndex2 = _interopRequireDefault(_calculateRowHeightIndex); + +var _mapDataUsingRowHeightIndex = require('./mapDataUsingRowHeightIndex'); + +var _mapDataUsingRowHeightIndex2 = _interopRequireDefault(_mapDataUsingRowHeightIndex); + +var _alignTableData = require('./alignTableData'); + +var _alignTableData2 = _interopRequireDefault(_alignTableData); + +var _padTableData = require('./padTableData'); + +var _padTableData2 = _interopRequireDefault(_padTableData); + +var _validateTableData = require('./validateTableData'); + +var _validateTableData2 = _interopRequireDefault(_validateTableData); + +var _stringifyTableData = require('./stringifyTableData'); + +var _stringifyTableData2 = _interopRequireDefault(_stringifyTableData); + +var _truncateTableData = require('./truncateTableData'); + +var _truncateTableData2 = _interopRequireDefault(_truncateTableData); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @typedef {string} table~cell + */ + +/** + * @typedef {table~cell[]} table~row + */ + +/** + * @typedef {Object} table~columns + * @property {string} alignment Cell content alignment (enum: left, center, right) (default: left). + * @property {number} width Column width (default: auto). + * @property {number} truncate Number of characters are which the content will be truncated (default: Infinity). + * @property {number} paddingLeft Cell content padding width left (default: 1). + * @property {number} paddingRight Cell content padding width right (default: 1). + */ + +/** + * @typedef {Object} table~border + * @property {string} topBody + * @property {string} topJoin + * @property {string} topLeft + * @property {string} topRight + * @property {string} bottomBody + * @property {string} bottomJoin + * @property {string} bottomLeft + * @property {string} bottomRight + * @property {string} bodyLeft + * @property {string} bodyRight + * @property {string} bodyJoin + * @property {string} joinBody + * @property {string} joinLeft + * @property {string} joinRight + * @property {string} joinJoin + */ + +/** + * Used to tell whether to draw a horizontal line. + * This callback is called for each non-content line of the table. + * The default behavior is to always return true. + * + * @typedef {Function} drawHorizontalLine + * @param {number} index + * @param {number} size + * @returns {boolean} + */ + +/** + * @typedef {Object} table~config + * @property {table~border} border + * @property {table~columns[]} columns Column specific configuration. + * @property {table~columns} columnDefault Default values for all columns. Column specific settings overwrite the default values. + * @property {table~drawHorizontalLine} drawHorizontalLine + */ + +/** + * Generates a text table. + * + * @param {table~row[]} data + * @param {table~config} userConfig + * @returns {string} + */ +exports.default = function (data) { + let userConfig = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + let rows; + + (0, _validateTableData2.default)(data); + + rows = (0, _stringifyTableData2.default)(data); + + const config = (0, _makeConfig2.default)(rows, userConfig); + + rows = (0, _truncateTableData2.default)(data, config); + + const rowHeightIndex = (0, _calculateRowHeightIndex2.default)(rows, config); + + rows = (0, _mapDataUsingRowHeightIndex2.default)(rows, rowHeightIndex, config); + rows = (0, _alignTableData2.default)(rows, config); + rows = (0, _padTableData2.default)(rows, config); + + const cellWidthIndex = (0, _calculateCellWidthIndex2.default)(rows[0]); + + return (0, _drawTable2.default)(rows, config.border, cellWidthIndex, rowHeightIndex, config.drawHorizontalLine); +}; \ No newline at end of file diff --git a/node_modules/table/dist/truncateTableData.js b/node_modules/table/dist/truncateTableData.js new file mode 100644 index 0000000..748b41c --- /dev/null +++ b/node_modules/table/dist/truncateTableData.js @@ -0,0 +1,27 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _lodash = require('lodash'); + +var _lodash2 = _interopRequireDefault(_lodash); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @todo Make it work with ASCII content. + * @param {table~row[]} rows + * @param {Object} config + * @returns {table~row[]} + */ +exports.default = (rows, config) => { + return rows.map(cells => { + return cells.map((content, index) => { + return _lodash2.default.truncate(content, { + length: config.columns[index].truncate + }); + }); + }); +}; \ No newline at end of file diff --git a/node_modules/table/dist/validateConfig.js b/node_modules/table/dist/validateConfig.js new file mode 100644 index 0000000..3ea3dde --- /dev/null +++ b/node_modules/table/dist/validateConfig.js @@ -0,0 +1,753 @@ +'use strict'; +var equal = require('ajv/lib/compile/equal'); +var validate = (function() { + var pattern0 = new RegExp('^[0-9]+$'); + var refVal = []; + var refVal1 = (function() { + var pattern0 = new RegExp('^[0-9]+$'); + return function validate(data, dataPath, parentData, parentDataProperty, rootData) { + 'use strict'; + var vErrors = null; + var errors = 0; + if (rootData === undefined) rootData = data; + if ((data && typeof data === "object" && !Array.isArray(data))) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !(false || validate.schema.properties[key0]); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: 'additionalProperties', + dataPath: (dataPath || '') + "", + schemaPath: '#/additionalProperties', + params: { + additionalProperty: '' + key0 + '' + }, + message: 'should NOT have additional properties' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + } + if (data.topBody !== undefined) { + var errs_1 = errors; + if (!refVal2(data.topBody, (dataPath || '') + '.topBody', data, 'topBody', rootData)) { + if (vErrors === null) vErrors = refVal2.errors; + else vErrors = vErrors.concat(refVal2.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.topJoin !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.topJoin, (dataPath || '') + '.topJoin', data, 'topJoin', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.topLeft !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.topLeft, (dataPath || '') + '.topLeft', data, 'topLeft', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.topRight !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.topRight, (dataPath || '') + '.topRight', data, 'topRight', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomBody !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.bottomBody, (dataPath || '') + '.bottomBody', data, 'bottomBody', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomJoin !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.bottomJoin, (dataPath || '') + '.bottomJoin', data, 'bottomJoin', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomLeft !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.bottomLeft, (dataPath || '') + '.bottomLeft', data, 'bottomLeft', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomRight !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.bottomRight, (dataPath || '') + '.bottomRight', data, 'bottomRight', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bodyLeft !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.bodyLeft, (dataPath || '') + '.bodyLeft', data, 'bodyLeft', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bodyRight !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.bodyRight, (dataPath || '') + '.bodyRight', data, 'bodyRight', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bodyJoin !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.bodyJoin, (dataPath || '') + '.bodyJoin', data, 'bodyJoin', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinBody !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.joinBody, (dataPath || '') + '.joinBody', data, 'joinBody', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinLeft !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.joinLeft, (dataPath || '') + '.joinLeft', data, 'joinLeft', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinRight !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.joinRight, (dataPath || '') + '.joinRight', data, 'joinRight', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinJoin !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.joinJoin, (dataPath || '') + '.joinJoin', data, 'joinJoin', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + } else { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + "", + schemaPath: '#/type', + params: { + type: 'object' + }, + message: 'should be object' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + validate.errors = vErrors; + return errors === 0; + }; + })(); + refVal1.schema = { + "type": "object", + "properties": { + "topBody": { + "$ref": "#/definitions/border" + }, + "topJoin": { + "$ref": "#/definitions/border" + }, + "topLeft": { + "$ref": "#/definitions/border" + }, + "topRight": { + "$ref": "#/definitions/border" + }, + "bottomBody": { + "$ref": "#/definitions/border" + }, + "bottomJoin": { + "$ref": "#/definitions/border" + }, + "bottomLeft": { + "$ref": "#/definitions/border" + }, + "bottomRight": { + "$ref": "#/definitions/border" + }, + "bodyLeft": { + "$ref": "#/definitions/border" + }, + "bodyRight": { + "$ref": "#/definitions/border" + }, + "bodyJoin": { + "$ref": "#/definitions/border" + }, + "joinBody": { + "$ref": "#/definitions/border" + }, + "joinLeft": { + "$ref": "#/definitions/border" + }, + "joinRight": { + "$ref": "#/definitions/border" + }, + "joinJoin": { + "$ref": "#/definitions/border" + } + }, + "additionalProperties": false + }; + refVal1.errors = null; + refVal[1] = refVal1; + var refVal2 = (function() { + var pattern0 = new RegExp('^[0-9]+$'); + return function validate(data, dataPath, parentData, parentDataProperty, rootData) { + 'use strict'; + var vErrors = null; + var errors = 0; + if (typeof data !== "string") { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + "", + schemaPath: '#/type', + params: { + type: 'string' + }, + message: 'should be string' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + validate.errors = vErrors; + return errors === 0; + }; + })(); + refVal2.schema = { + "type": "string" + }; + refVal2.errors = null; + refVal[2] = refVal2; + var refVal3 = (function() { + var pattern0 = new RegExp('^[0-9]+$'); + return function validate(data, dataPath, parentData, parentDataProperty, rootData) { + 'use strict'; + var vErrors = null; + var errors = 0; + if (rootData === undefined) rootData = data; + if ((data && typeof data === "object" && !Array.isArray(data))) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !(false || pattern0.test(key0)); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: 'additionalProperties', + dataPath: (dataPath || '') + "", + schemaPath: '#/additionalProperties', + params: { + additionalProperty: '' + key0 + '' + }, + message: 'should NOT have additional properties' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + } + for (var key0 in data) { + if (pattern0.test(key0)) { + var errs_1 = errors; + if (!refVal4(data[key0], (dataPath || '') + '[\'' + key0 + '\']', data, key0, rootData)) { + if (vErrors === null) vErrors = refVal4.errors; + else vErrors = vErrors.concat(refVal4.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + } + } else { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + "", + schemaPath: '#/type', + params: { + type: 'object' + }, + message: 'should be object' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + validate.errors = vErrors; + return errors === 0; + }; + })(); + refVal3.schema = { + "type": "object", + "patternProperties": { + "^[0-9]+$": { + "$ref": "#/definitions/column" + } + }, + "additionalProperties": false + }; + refVal3.errors = null; + refVal[3] = refVal3; + var refVal4 = (function() { + var pattern0 = new RegExp('^[0-9]+$'); + return function validate(data, dataPath, parentData, parentDataProperty, rootData) { + 'use strict'; + var vErrors = null; + var errors = 0; + if ((data && typeof data === "object" && !Array.isArray(data))) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !(false || validate.schema.properties[key0]); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: 'additionalProperties', + dataPath: (dataPath || '') + "", + schemaPath: '#/additionalProperties', + params: { + additionalProperty: '' + key0 + '' + }, + message: 'should NOT have additional properties' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + } + var data1 = data.alignment; + if (data1 !== undefined) { + var errs_1 = errors; + if (typeof data1 !== "string") { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + '.alignment', + schemaPath: '#/properties/alignment/type', + params: { + type: 'string' + }, + message: 'should be string' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + var schema1 = validate.schema.properties.alignment.enum; + var valid1; + valid1 = false; + for (var i1 = 0; i1 < schema1.length; i1++) + if (equal(data1, schema1[i1])) { + valid1 = true; + break; + } + if (!valid1) { + var err = { + keyword: 'enum', + dataPath: (dataPath || '') + '.alignment', + schemaPath: '#/properties/alignment/enum', + params: { + allowedValues: schema1 + }, + message: 'should be equal to one of the allowed values' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.width !== undefined) { + var errs_1 = errors; + if (typeof data.width !== "number") { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + '.width', + schemaPath: '#/properties/width/type', + params: { + type: 'number' + }, + message: 'should be number' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.wrapWord !== undefined) { + var errs_1 = errors; + if (typeof data.wrapWord !== "boolean") { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + '.wrapWord', + schemaPath: '#/properties/wrapWord/type', + params: { + type: 'boolean' + }, + message: 'should be boolean' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.truncate !== undefined) { + var errs_1 = errors; + if (typeof data.truncate !== "number") { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + '.truncate', + schemaPath: '#/properties/truncate/type', + params: { + type: 'number' + }, + message: 'should be number' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.paddingLeft !== undefined) { + var errs_1 = errors; + if (typeof data.paddingLeft !== "number") { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + '.paddingLeft', + schemaPath: '#/properties/paddingLeft/type', + params: { + type: 'number' + }, + message: 'should be number' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.paddingRight !== undefined) { + var errs_1 = errors; + if (typeof data.paddingRight !== "number") { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + '.paddingRight', + schemaPath: '#/properties/paddingRight/type', + params: { + type: 'number' + }, + message: 'should be number' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + } else { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + "", + schemaPath: '#/type', + params: { + type: 'object' + }, + message: 'should be object' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + validate.errors = vErrors; + return errors === 0; + }; + })(); + refVal4.schema = { + "type": "object", + "properties": { + "alignment": { + "type": "string", + "enum": ["left", "right", "center"] + }, + "width": { + "type": "number" + }, + "wrapWord": { + "type": "boolean" + }, + "truncate": { + "type": "number" + }, + "paddingLeft": { + "type": "number" + }, + "paddingRight": { + "type": "number" + } + }, + "additionalProperties": false + }; + refVal4.errors = null; + refVal[4] = refVal4; + return function validate(data, dataPath, parentData, parentDataProperty, rootData) { + 'use strict'; /*# sourceURL=config.json */ + var vErrors = null; + var errors = 0; + if (rootData === undefined) rootData = data; + if ((data && typeof data === "object" && !Array.isArray(data))) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !(false || key0 == 'border' || key0 == 'columns' || key0 == 'columnDefault' || key0 == 'drawHorizontalLine'); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: 'additionalProperties', + dataPath: (dataPath || '') + "", + schemaPath: '#/additionalProperties', + params: { + additionalProperty: '' + key0 + '' + }, + message: 'should NOT have additional properties' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + } + if (data.border !== undefined) { + var errs_1 = errors; + if (!refVal1(data.border, (dataPath || '') + '.border', data, 'border', rootData)) { + if (vErrors === null) vErrors = refVal1.errors; + else vErrors = vErrors.concat(refVal1.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.columns !== undefined) { + var errs_1 = errors; + if (!refVal3(data.columns, (dataPath || '') + '.columns', data, 'columns', rootData)) { + if (vErrors === null) vErrors = refVal3.errors; + else vErrors = vErrors.concat(refVal3.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.columnDefault !== undefined) { + var errs_1 = errors; + if (!refVal[4](data.columnDefault, (dataPath || '') + '.columnDefault', data, 'columnDefault', rootData)) { + if (vErrors === null) vErrors = refVal[4].errors; + else vErrors = vErrors.concat(refVal[4].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.drawHorizontalLine !== undefined) { + var errs_1 = errors; + var errs__1 = errors; + var valid1; + valid1 = typeof data.drawHorizontalLine == "function"; + if (!valid1) { + if (errs__1 == errors) { + var err = { + keyword: 'typeof', + dataPath: (dataPath || '') + '.drawHorizontalLine', + schemaPath: '#/properties/drawHorizontalLine/typeof', + params: { + keyword: 'typeof' + }, + message: 'should pass "typeof" keyword validation' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } else { + for (var i1 = errs__1; i1 < errors; i1++) { + var ruleErr1 = vErrors[i1]; + if (ruleErr1.dataPath === undefined) ruleErr1.dataPath = (dataPath || '') + '.drawHorizontalLine'; + if (ruleErr1.schemaPath === undefined) { + ruleErr1.schemaPath = "#/properties/drawHorizontalLine/typeof"; + } + } + } + } + var valid1 = errors === errs_1; + } + } else { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + "", + schemaPath: '#/type', + params: { + type: 'object' + }, + message: 'should be object' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + validate.errors = vErrors; + return errors === 0; + }; +})(); +validate.schema = { + "$id": "config.json", + "$schema": "http://json-schema.org/draft-06/schema#", + "type": "object", + "properties": { + "border": { + "$ref": "#/definitions/borders" + }, + "columns": { + "$ref": "#/definitions/columns" + }, + "columnDefault": { + "$ref": "#/definitions/column" + }, + "drawHorizontalLine": { + "typeof": "function" + } + }, + "additionalProperties": false, + "definitions": { + "columns": { + "type": "object", + "patternProperties": { + "^[0-9]+$": { + "$ref": "#/definitions/column" + } + }, + "additionalProperties": false + }, + "column": { + "type": "object", + "properties": { + "alignment": { + "type": "string", + "enum": ["left", "right", "center"] + }, + "width": { + "type": "number" + }, + "wrapWord": { + "type": "boolean" + }, + "truncate": { + "type": "number" + }, + "paddingLeft": { + "type": "number" + }, + "paddingRight": { + "type": "number" + } + }, + "additionalProperties": false + }, + "borders": { + "type": "object", + "properties": { + "topBody": { + "$ref": "#/definitions/border" + }, + "topJoin": { + "$ref": "#/definitions/border" + }, + "topLeft": { + "$ref": "#/definitions/border" + }, + "topRight": { + "$ref": "#/definitions/border" + }, + "bottomBody": { + "$ref": "#/definitions/border" + }, + "bottomJoin": { + "$ref": "#/definitions/border" + }, + "bottomLeft": { + "$ref": "#/definitions/border" + }, + "bottomRight": { + "$ref": "#/definitions/border" + }, + "bodyLeft": { + "$ref": "#/definitions/border" + }, + "bodyRight": { + "$ref": "#/definitions/border" + }, + "bodyJoin": { + "$ref": "#/definitions/border" + }, + "joinBody": { + "$ref": "#/definitions/border" + }, + "joinLeft": { + "$ref": "#/definitions/border" + }, + "joinRight": { + "$ref": "#/definitions/border" + }, + "joinJoin": { + "$ref": "#/definitions/border" + } + }, + "additionalProperties": false + }, + "border": { + "type": "string" + } + } +}; +validate.errors = null; +module.exports = validate; \ No newline at end of file diff --git a/node_modules/table/dist/validateStreamConfig.js b/node_modules/table/dist/validateStreamConfig.js new file mode 100644 index 0000000..05c4b04 --- /dev/null +++ b/node_modules/table/dist/validateStreamConfig.js @@ -0,0 +1,740 @@ +'use strict'; +var equal = require('ajv/lib/compile/equal'); +var validate = (function() { + var pattern0 = new RegExp('^[0-9]+$'); + var refVal = []; + var refVal1 = (function() { + var pattern0 = new RegExp('^[0-9]+$'); + return function validate(data, dataPath, parentData, parentDataProperty, rootData) { + 'use strict'; + var vErrors = null; + var errors = 0; + if (rootData === undefined) rootData = data; + if ((data && typeof data === "object" && !Array.isArray(data))) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !(false || validate.schema.properties[key0]); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: 'additionalProperties', + dataPath: (dataPath || '') + "", + schemaPath: '#/additionalProperties', + params: { + additionalProperty: '' + key0 + '' + }, + message: 'should NOT have additional properties' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + } + if (data.topBody !== undefined) { + var errs_1 = errors; + if (!refVal2(data.topBody, (dataPath || '') + '.topBody', data, 'topBody', rootData)) { + if (vErrors === null) vErrors = refVal2.errors; + else vErrors = vErrors.concat(refVal2.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.topJoin !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.topJoin, (dataPath || '') + '.topJoin', data, 'topJoin', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.topLeft !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.topLeft, (dataPath || '') + '.topLeft', data, 'topLeft', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.topRight !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.topRight, (dataPath || '') + '.topRight', data, 'topRight', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomBody !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.bottomBody, (dataPath || '') + '.bottomBody', data, 'bottomBody', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomJoin !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.bottomJoin, (dataPath || '') + '.bottomJoin', data, 'bottomJoin', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomLeft !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.bottomLeft, (dataPath || '') + '.bottomLeft', data, 'bottomLeft', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bottomRight !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.bottomRight, (dataPath || '') + '.bottomRight', data, 'bottomRight', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bodyLeft !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.bodyLeft, (dataPath || '') + '.bodyLeft', data, 'bodyLeft', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bodyRight !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.bodyRight, (dataPath || '') + '.bodyRight', data, 'bodyRight', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.bodyJoin !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.bodyJoin, (dataPath || '') + '.bodyJoin', data, 'bodyJoin', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinBody !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.joinBody, (dataPath || '') + '.joinBody', data, 'joinBody', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinLeft !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.joinLeft, (dataPath || '') + '.joinLeft', data, 'joinLeft', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinRight !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.joinRight, (dataPath || '') + '.joinRight', data, 'joinRight', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.joinJoin !== undefined) { + var errs_1 = errors; + if (!refVal[2](data.joinJoin, (dataPath || '') + '.joinJoin', data, 'joinJoin', rootData)) { + if (vErrors === null) vErrors = refVal[2].errors; + else vErrors = vErrors.concat(refVal[2].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + } else { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + "", + schemaPath: '#/type', + params: { + type: 'object' + }, + message: 'should be object' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + validate.errors = vErrors; + return errors === 0; + }; + })(); + refVal1.schema = { + "type": "object", + "properties": { + "topBody": { + "$ref": "#/definitions/border" + }, + "topJoin": { + "$ref": "#/definitions/border" + }, + "topLeft": { + "$ref": "#/definitions/border" + }, + "topRight": { + "$ref": "#/definitions/border" + }, + "bottomBody": { + "$ref": "#/definitions/border" + }, + "bottomJoin": { + "$ref": "#/definitions/border" + }, + "bottomLeft": { + "$ref": "#/definitions/border" + }, + "bottomRight": { + "$ref": "#/definitions/border" + }, + "bodyLeft": { + "$ref": "#/definitions/border" + }, + "bodyRight": { + "$ref": "#/definitions/border" + }, + "bodyJoin": { + "$ref": "#/definitions/border" + }, + "joinBody": { + "$ref": "#/definitions/border" + }, + "joinLeft": { + "$ref": "#/definitions/border" + }, + "joinRight": { + "$ref": "#/definitions/border" + }, + "joinJoin": { + "$ref": "#/definitions/border" + } + }, + "additionalProperties": false + }; + refVal1.errors = null; + refVal[1] = refVal1; + var refVal2 = (function() { + var pattern0 = new RegExp('^[0-9]+$'); + return function validate(data, dataPath, parentData, parentDataProperty, rootData) { + 'use strict'; + var vErrors = null; + var errors = 0; + if (typeof data !== "string") { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + "", + schemaPath: '#/type', + params: { + type: 'string' + }, + message: 'should be string' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + validate.errors = vErrors; + return errors === 0; + }; + })(); + refVal2.schema = { + "type": "string" + }; + refVal2.errors = null; + refVal[2] = refVal2; + var refVal3 = (function() { + var pattern0 = new RegExp('^[0-9]+$'); + return function validate(data, dataPath, parentData, parentDataProperty, rootData) { + 'use strict'; + var vErrors = null; + var errors = 0; + if (rootData === undefined) rootData = data; + if ((data && typeof data === "object" && !Array.isArray(data))) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !(false || pattern0.test(key0)); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: 'additionalProperties', + dataPath: (dataPath || '') + "", + schemaPath: '#/additionalProperties', + params: { + additionalProperty: '' + key0 + '' + }, + message: 'should NOT have additional properties' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + } + for (var key0 in data) { + if (pattern0.test(key0)) { + var errs_1 = errors; + if (!refVal4(data[key0], (dataPath || '') + '[\'' + key0 + '\']', data, key0, rootData)) { + if (vErrors === null) vErrors = refVal4.errors; + else vErrors = vErrors.concat(refVal4.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + } + } else { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + "", + schemaPath: '#/type', + params: { + type: 'object' + }, + message: 'should be object' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + validate.errors = vErrors; + return errors === 0; + }; + })(); + refVal3.schema = { + "type": "object", + "patternProperties": { + "^[0-9]+$": { + "$ref": "#/definitions/column" + } + }, + "additionalProperties": false + }; + refVal3.errors = null; + refVal[3] = refVal3; + var refVal4 = (function() { + var pattern0 = new RegExp('^[0-9]+$'); + return function validate(data, dataPath, parentData, parentDataProperty, rootData) { + 'use strict'; + var vErrors = null; + var errors = 0; + if ((data && typeof data === "object" && !Array.isArray(data))) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !(false || validate.schema.properties[key0]); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: 'additionalProperties', + dataPath: (dataPath || '') + "", + schemaPath: '#/additionalProperties', + params: { + additionalProperty: '' + key0 + '' + }, + message: 'should NOT have additional properties' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + } + var data1 = data.alignment; + if (data1 !== undefined) { + var errs_1 = errors; + if (typeof data1 !== "string") { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + '.alignment', + schemaPath: '#/properties/alignment/type', + params: { + type: 'string' + }, + message: 'should be string' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + var schema1 = validate.schema.properties.alignment.enum; + var valid1; + valid1 = false; + for (var i1 = 0; i1 < schema1.length; i1++) + if (equal(data1, schema1[i1])) { + valid1 = true; + break; + } + if (!valid1) { + var err = { + keyword: 'enum', + dataPath: (dataPath || '') + '.alignment', + schemaPath: '#/properties/alignment/enum', + params: { + allowedValues: schema1 + }, + message: 'should be equal to one of the allowed values' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.width !== undefined) { + var errs_1 = errors; + if (typeof data.width !== "number") { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + '.width', + schemaPath: '#/properties/width/type', + params: { + type: 'number' + }, + message: 'should be number' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.wrapWord !== undefined) { + var errs_1 = errors; + if (typeof data.wrapWord !== "boolean") { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + '.wrapWord', + schemaPath: '#/properties/wrapWord/type', + params: { + type: 'boolean' + }, + message: 'should be boolean' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.truncate !== undefined) { + var errs_1 = errors; + if (typeof data.truncate !== "number") { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + '.truncate', + schemaPath: '#/properties/truncate/type', + params: { + type: 'number' + }, + message: 'should be number' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.paddingLeft !== undefined) { + var errs_1 = errors; + if (typeof data.paddingLeft !== "number") { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + '.paddingLeft', + schemaPath: '#/properties/paddingLeft/type', + params: { + type: 'number' + }, + message: 'should be number' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + if (data.paddingRight !== undefined) { + var errs_1 = errors; + if (typeof data.paddingRight !== "number") { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + '.paddingRight', + schemaPath: '#/properties/paddingRight/type', + params: { + type: 'number' + }, + message: 'should be number' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + } else { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + "", + schemaPath: '#/type', + params: { + type: 'object' + }, + message: 'should be object' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + validate.errors = vErrors; + return errors === 0; + }; + })(); + refVal4.schema = { + "type": "object", + "properties": { + "alignment": { + "type": "string", + "enum": ["left", "right", "center"] + }, + "width": { + "type": "number" + }, + "wrapWord": { + "type": "boolean" + }, + "truncate": { + "type": "number" + }, + "paddingLeft": { + "type": "number" + }, + "paddingRight": { + "type": "number" + } + }, + "additionalProperties": false + }; + refVal4.errors = null; + refVal[4] = refVal4; + return function validate(data, dataPath, parentData, parentDataProperty, rootData) { + 'use strict'; /*# sourceURL=streamConfig.json */ + var vErrors = null; + var errors = 0; + if (rootData === undefined) rootData = data; + if ((data && typeof data === "object" && !Array.isArray(data))) { + var errs__0 = errors; + var valid1 = true; + for (var key0 in data) { + var isAdditional0 = !(false || key0 == 'border' || key0 == 'columns' || key0 == 'columnDefault' || key0 == 'columnCount'); + if (isAdditional0) { + valid1 = false; + var err = { + keyword: 'additionalProperties', + dataPath: (dataPath || '') + "", + schemaPath: '#/additionalProperties', + params: { + additionalProperty: '' + key0 + '' + }, + message: 'should NOT have additional properties' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + } + if (data.border !== undefined) { + var errs_1 = errors; + if (!refVal1(data.border, (dataPath || '') + '.border', data, 'border', rootData)) { + if (vErrors === null) vErrors = refVal1.errors; + else vErrors = vErrors.concat(refVal1.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.columns !== undefined) { + var errs_1 = errors; + if (!refVal3(data.columns, (dataPath || '') + '.columns', data, 'columns', rootData)) { + if (vErrors === null) vErrors = refVal3.errors; + else vErrors = vErrors.concat(refVal3.errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.columnDefault !== undefined) { + var errs_1 = errors; + if (!refVal[4](data.columnDefault, (dataPath || '') + '.columnDefault', data, 'columnDefault', rootData)) { + if (vErrors === null) vErrors = refVal[4].errors; + else vErrors = vErrors.concat(refVal[4].errors); + errors = vErrors.length; + } + var valid1 = errors === errs_1; + } + if (data.columnCount !== undefined) { + var errs_1 = errors; + if (typeof data.columnCount !== "number") { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + '.columnCount', + schemaPath: '#/properties/columnCount/type', + params: { + type: 'number' + }, + message: 'should be number' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + var valid1 = errors === errs_1; + } + } else { + var err = { + keyword: 'type', + dataPath: (dataPath || '') + "", + schemaPath: '#/type', + params: { + type: 'object' + }, + message: 'should be object' + }; + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; + } + validate.errors = vErrors; + return errors === 0; + }; +})(); +validate.schema = { + "$id": "streamConfig.json", + "$schema": "http://json-schema.org/draft-06/schema#", + "type": "object", + "properties": { + "border": { + "$ref": "#/definitions/borders" + }, + "columns": { + "$ref": "#/definitions/columns" + }, + "columnDefault": { + "$ref": "#/definitions/column" + }, + "columnCount": { + "type": "number" + } + }, + "additionalProperties": false, + "definitions": { + "columns": { + "type": "object", + "patternProperties": { + "^[0-9]+$": { + "$ref": "#/definitions/column" + } + }, + "additionalProperties": false + }, + "column": { + "type": "object", + "properties": { + "alignment": { + "type": "string", + "enum": ["left", "right", "center"] + }, + "width": { + "type": "number" + }, + "wrapWord": { + "type": "boolean" + }, + "truncate": { + "type": "number" + }, + "paddingLeft": { + "type": "number" + }, + "paddingRight": { + "type": "number" + } + }, + "additionalProperties": false + }, + "borders": { + "type": "object", + "properties": { + "topBody": { + "$ref": "#/definitions/border" + }, + "topJoin": { + "$ref": "#/definitions/border" + }, + "topLeft": { + "$ref": "#/definitions/border" + }, + "topRight": { + "$ref": "#/definitions/border" + }, + "bottomBody": { + "$ref": "#/definitions/border" + }, + "bottomJoin": { + "$ref": "#/definitions/border" + }, + "bottomLeft": { + "$ref": "#/definitions/border" + }, + "bottomRight": { + "$ref": "#/definitions/border" + }, + "bodyLeft": { + "$ref": "#/definitions/border" + }, + "bodyRight": { + "$ref": "#/definitions/border" + }, + "bodyJoin": { + "$ref": "#/definitions/border" + }, + "joinBody": { + "$ref": "#/definitions/border" + }, + "joinLeft": { + "$ref": "#/definitions/border" + }, + "joinRight": { + "$ref": "#/definitions/border" + }, + "joinJoin": { + "$ref": "#/definitions/border" + } + }, + "additionalProperties": false + }, + "border": { + "type": "string" + } + } +}; +validate.errors = null; +module.exports = validate; \ No newline at end of file diff --git a/node_modules/table/dist/validateTableData.js b/node_modules/table/dist/validateTableData.js new file mode 100644 index 0000000..b5e103c --- /dev/null +++ b/node_modules/table/dist/validateTableData.js @@ -0,0 +1,51 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +/** + * @typedef {string} cell + */ + +/** + * @typedef {cell[]} validateData~column + */ + +/** + * @param {column[]} rows + * @returns {undefined} + */ +exports.default = rows => { + if (!Array.isArray(rows)) { + throw new TypeError('Table data must be an array.'); + } + + if (rows.length === 0) { + throw new Error('Table must define at least one row.'); + } + + if (rows[0].length === 0) { + throw new Error('Table must define at least one column.'); + } + + const columnNumber = rows[0].length; + + for (const cells of rows) { + if (!Array.isArray(cells)) { + throw new TypeError('Table row data must be an array.'); + } + + if (cells.length !== columnNumber) { + throw new Error('Table must have a consistent number of cells.'); + } + + // @todo Make an exception for newline characters. + // @see https://github.com/gajus/table/issues/9 + for (const cell of cells) { + if (/[\u0001-\u001A]/.test(cell)) { + throw new Error('Table data must not contain control characters.'); + } + } + } +}; \ No newline at end of file diff --git a/node_modules/table/dist/wrapString.js b/node_modules/table/dist/wrapString.js new file mode 100644 index 0000000..eae8ea0 --- /dev/null +++ b/node_modules/table/dist/wrapString.js @@ -0,0 +1,42 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _sliceAnsi = require('slice-ansi'); + +var _sliceAnsi2 = _interopRequireDefault(_sliceAnsi); + +var _stringWidth = require('string-width'); + +var _stringWidth2 = _interopRequireDefault(_stringWidth); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Creates an array of strings split into groups the length of size. + * This function works with strings that contain ASCII characters. + * + * wrapText is different from would-be "chunk" implementation + * in that whitespace characters that occur on a chunk size limit are trimmed. + * + * @param {string} subject + * @param {number} size + * @returns {Array} + */ +exports.default = (subject, size) => { + let subjectSlice; + + subjectSlice = subject; + + const chunks = []; + + do { + chunks.push((0, _sliceAnsi2.default)(subjectSlice, 0, size)); + + subjectSlice = (0, _sliceAnsi2.default)(subjectSlice, size).trim(); + } while ((0, _stringWidth2.default)(subjectSlice)); + + return chunks; +}; \ No newline at end of file diff --git a/node_modules/table/dist/wrapWord.js b/node_modules/table/dist/wrapWord.js new file mode 100644 index 0000000..c0dd9df --- /dev/null +++ b/node_modules/table/dist/wrapWord.js @@ -0,0 +1,52 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _sliceAnsi = require('slice-ansi'); + +var _sliceAnsi2 = _interopRequireDefault(_sliceAnsi); + +var _stringWidth = require('string-width'); + +var _stringWidth2 = _interopRequireDefault(_stringWidth); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @param {string} input + * @param {number} size + * @returns {Array} + */ +exports.default = (input, size) => { + let subject; + + subject = input; + + const chunks = []; + + // https://regex101.com/r/gY5kZ1/1 + const re = new RegExp('(^.{1,' + size + '}(\\s+|$))|(^.{1,' + (size - 1) + '}(\\\\|/|_|\\.|,|;|-))'); + + do { + let chunk; + + chunk = subject.match(re); + + if (chunk) { + chunk = chunk[0]; + + subject = (0, _sliceAnsi2.default)(subject, (0, _stringWidth2.default)(chunk)); + + chunk = chunk.trim(); + } else { + chunk = (0, _sliceAnsi2.default)(subject, 0, size); + subject = (0, _sliceAnsi2.default)(subject, size); + } + + chunks.push(chunk); + } while ((0, _stringWidth2.default)(subject)); + + return chunks; +}; \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/.tonic_example.js b/node_modules/table/node_modules/ajv/.tonic_example.js new file mode 100644 index 0000000..aa11812 --- /dev/null +++ b/node_modules/table/node_modules/ajv/.tonic_example.js @@ -0,0 +1,20 @@ +var Ajv = require('ajv'); +var ajv = new Ajv({allErrors: true}); + +var schema = { + "properties": { + "foo": { "type": "string" }, + "bar": { "type": "number", "maximum": 3 } + } +}; + +var validate = ajv.compile(schema); + +test({"foo": "abc", "bar": 2}); +test({"foo": 2, "bar": 4}); + +function test(data) { + var valid = validate(data); + if (valid) console.log('Valid!'); + else console.log('Invalid: ' + ajv.errorsText(validate.errors)); +} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/LICENSE b/node_modules/table/node_modules/ajv/LICENSE new file mode 100644 index 0000000..96ee719 --- /dev/null +++ b/node_modules/table/node_modules/ajv/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017 Evgeny Poberezkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/node_modules/table/node_modules/ajv/README.md b/node_modules/table/node_modules/ajv/README.md new file mode 100644 index 0000000..3fcb92a --- /dev/null +++ b/node_modules/table/node_modules/ajv/README.md @@ -0,0 +1,1293 @@ +Ajv logo + +# Ajv: Another JSON Schema Validator + +The fastest JSON Schema validator for Node.js and browser. Supports draft-04/06/07. + + +[![Build Status](https://travis-ci.org/epoberezkin/ajv.svg?branch=master)](https://travis-ci.org/epoberezkin/ajv) +[![npm](https://img.shields.io/npm/v/ajv.svg)](https://www.npmjs.com/package/ajv) +[![npm downloads](https://img.shields.io/npm/dm/ajv.svg)](https://www.npmjs.com/package/ajv) +[![Coverage Status](https://coveralls.io/repos/epoberezkin/ajv/badge.svg?branch=master&service=github)](https://coveralls.io/github/epoberezkin/ajv?branch=master) +[![Greenkeeper badge](https://badges.greenkeeper.io/epoberezkin/ajv.svg)](https://greenkeeper.io/) +[![Gitter](https://img.shields.io/gitter/room/ajv-validator/ajv.svg)](https://gitter.im/ajv-validator/ajv) + + +## Using version 6 + +[JSON Schema draft-07](http://json-schema.org/latest/json-schema-validation.html) is published. + +[Ajv version 6.0.0](https://github.com/epoberezkin/ajv/releases/tag/v6.0.0) that supports draft-07 is released. It may require either migrating your schemas or updating your code (to continue using draft-04 and v5 schemas, draft-06 schemas will be supported without changes). + +__Please note__: To use Ajv with draft-06 schemas you need to explicitly add the meta-schema to the validator instance: + +```javascript +ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-06.json')); +``` + +To use Ajv with draft-04 schemas in addition to explicitly adding meta-schema you also need to use option schemaId: + +```javascript +var ajv = new Ajv({schemaId: 'id'}); +// If you want to use both draft-04 and draft-06/07 schemas: +// var ajv = new Ajv({schemaId: 'auto'}); +ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json')); +``` + + +## Contents + +- [Performance](#performance) +- [Features](#features) +- [Getting started](#getting-started) +- [Frequently Asked Questions](https://github.com/epoberezkin/ajv/blob/master/FAQ.md) +- [Using in browser](#using-in-browser) +- [Command line interface](#command-line-interface) +- Validation + - [Keywords](#validation-keywords) + - [Annotation keywords](#annotation-keywords) + - [Formats](#formats) + - [Combining schemas with $ref](#ref) + - [$data reference](#data-reference) + - NEW: [$merge and $patch keywords](#merge-and-patch-keywords) + - [Defining custom keywords](#defining-custom-keywords) + - [Asynchronous schema compilation](#asynchronous-schema-compilation) + - [Asynchronous validation](#asynchronous-validation) +- Modifying data during validation + - [Filtering data](#filtering-data) + - [Assigning defaults](#assigning-defaults) + - [Coercing data types](#coercing-data-types) +- API + - [Methods](#api) + - [Options](#options) + - [Validation errors](#validation-errors) +- [Plugins](#plugins) +- [Related packages](#related-packages) +- [Packages using Ajv](#some-packages-using-ajv) +- [Tests, Contributing, History, License](#tests) + + +## Performance + +Ajv generates code using [doT templates](https://github.com/olado/doT) to turn JSON Schemas into super-fast validation functions that are efficient for v8 optimization. + +Currently Ajv is the fastest and the most standard compliant validator according to these benchmarks: + +- [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark) - 50% faster than the second place +- [jsck benchmark](https://github.com/pandastrike/jsck#benchmarks) - 20-190% faster +- [z-schema benchmark](https://rawgit.com/zaggino/z-schema/master/benchmark/results.html) +- [themis benchmark](https://cdn.rawgit.com/playlyfe/themis/master/benchmark/results.html) + + +Performance of different validators by [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark): + +[![performance](https://chart.googleapis.com/chart?chxt=x,y&cht=bhs&chco=76A4FB&chls=2.0&chbh=32,4,1&chs=600x416&chxl=-1:|djv|ajv|json-schema-validator-generator|jsen|is-my-json-valid|themis|z-schema|jsck|skeemas|json-schema-library|tv4&chd=t:100,98,72.1,66.8,50.1,15.1,6.1,3.8,1.2,0.7,0.2)](https://github.com/ebdrup/json-schema-benchmark/blob/master/README.md#performance) + + +## Features + +- Ajv implements full JSON Schema [draft-06/07](http://json-schema.org/) and draft-04 standards: + - all validation keywords (see [JSON Schema validation keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md)) + - full support of remote refs (remote schemas have to be added with `addSchema` or compiled to be available) + - support of circular references between schemas + - correct string lengths for strings with unicode pairs (can be turned off) + - [formats](#formats) defined by JSON Schema draft-07 standard and custom formats (can be turned off) + - [validates schemas against meta-schema](#api-validateschema) +- supports [browsers](#using-in-browser) and Node.js 0.10-8.x +- [asynchronous loading](#asynchronous-schema-compilation) of referenced schemas during compilation +- "All errors" validation mode with [option allErrors](#options) +- [error messages with parameters](#validation-errors) describing error reasons to allow creating custom error messages +- i18n error messages support with [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) package +- [filtering data](#filtering-data) from additional properties +- [assigning defaults](#assigning-defaults) to missing properties and items +- [coercing data](#coercing-data-types) to the types specified in `type` keywords +- [custom keywords](#defining-custom-keywords) +- draft-6 keywords `const`, `contains` and `propertyNames` +- draft-6 boolean schemas (`true`/`false` as a schema to always pass/fail). +- keywords `switch`, `patternRequired`, `formatMaximum` / `formatMinimum` and `formatExclusiveMaximum` / `formatExclusiveMinimum` from [JSON Schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) with [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package +- [$data reference](#data-reference) to use values from the validated data as values for the schema keywords +- [asynchronous validation](#asynchronous-validation) of custom formats and keywords + +Currently Ajv is the only validator that passes all the tests from [JSON Schema Test Suite](https://github.com/json-schema/JSON-Schema-Test-Suite) (according to [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark), apart from the test that requires that `1.0` is not an integer that is impossible to satisfy in JavaScript). + + +## Install + +``` +npm install ajv +``` + + +## Getting started + +Try it in the Node.js REPL: https://tonicdev.com/npm/ajv + + +The fastest validation call: + +```javascript +var Ajv = require('ajv'); +var ajv = new Ajv(); // options can be passed, e.g. {allErrors: true} +var validate = ajv.compile(schema); +var valid = validate(data); +if (!valid) console.log(validate.errors); +``` + +or with less code + +```javascript +// ... +var valid = ajv.validate(schema, data); +if (!valid) console.log(ajv.errors); +// ... +``` + +or + +```javascript +// ... +var valid = ajv.addSchema(schema, 'mySchema') + .validate('mySchema', data); +if (!valid) console.log(ajv.errorsText()); +// ... +``` + +See [API](#api) and [Options](#options) for more details. + +Ajv compiles schemas to functions and caches them in all cases (using schema serialized with [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) or a custom function as a key), so that the next time the same schema is used (not necessarily the same object instance) it won't be compiled again. + +The best performance is achieved when using compiled functions returned by `compile` or `getSchema` methods (there is no additional function call). + +__Please note__: every time a validation function or `ajv.validate` are called `errors` property is overwritten. You need to copy `errors` array reference to another variable if you want to use it later (e.g., in the callback). See [Validation errors](#validation-errors) + + +## Using in browser + +You can require Ajv directly from the code you browserify - in this case Ajv will be a part of your bundle. + +If you need to use Ajv in several bundles you can create a separate UMD bundle using `npm run bundle` script (thanks to [siddo420](https://github.com/siddo420)). + +Then you need to load Ajv in the browser: +```html + +``` + +This bundle can be used with different module systems; it creates global `Ajv` if no module system is found. + +The browser bundle is available on [cdnjs](https://cdnjs.com/libraries/ajv). + +Ajv is tested with these browsers: + +[![Sauce Test Status](https://saucelabs.com/browser-matrix/epoberezkin.svg)](https://saucelabs.com/u/epoberezkin) + +__Please note__: some frameworks, e.g. Dojo, may redefine global require in such way that is not compatible with CommonJS module format. In such case Ajv bundle has to be loaded before the framework and then you can use global Ajv (see issue [#234](https://github.com/epoberezkin/ajv/issues/234)). + + +## Command line interface + +CLI is available as a separate npm package [ajv-cli](https://github.com/jessedc/ajv-cli). It supports: + +- compiling JSON Schemas to test their validity +- BETA: generating standalone module exporting a validation function to be used without Ajv (using [ajv-pack](https://github.com/epoberezkin/ajv-pack)) +- migrate schemas to draft-07 (using [json-schema-migrate](https://github.com/epoberezkin/json-schema-migrate)) +- validating data file(s) against JSON Schema +- testing expected validity of data against JSON Schema +- referenced schemas +- custom meta-schemas +- files in JSON and JavaScript format +- all Ajv options +- reporting changes in data after validation in [JSON-patch](https://tools.ietf.org/html/rfc6902) format + + +## Validation keywords + +Ajv supports all validation keywords from draft-07 of JSON Schema standard: + +- [type](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#type) +- [for numbers](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-numbers) - maximum, minimum, exclusiveMaximum, exclusiveMinimum, multipleOf +- [for strings](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-strings) - maxLength, minLength, pattern, format +- [for arrays](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-arrays) - maxItems, minItems, uniqueItems, items, additionalItems, [contains](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#contains) +- [for objects](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-objects) - maxProperties, minProperties, required, properties, patternProperties, additionalProperties, dependencies, [propertyNames](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#propertynames) +- [for all types](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-all-types) - enum, [const](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#const) +- [compound keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#compound-keywords) - not, oneOf, anyOf, allOf, [if/then/else](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#ifthenelse) + +With [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package Ajv also supports validation keywords from [JSON Schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) for JSON Schema standard: + +- [patternRequired](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#patternrequired-proposed) - like `required` but with patterns that some property should match. +- [formatMaximum, formatMinimum, formatExclusiveMaximum, formatExclusiveMinimum](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#formatmaximum--formatminimum-and-exclusiveformatmaximum--exclusiveformatminimum-proposed) - setting limits for date, time, etc. + +See [JSON Schema validation keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md) for more details. + + +## Annotation keywords + +JSON Schema specification defines several annotation keywords that describe schema itself but do not perform any validation. + +- `title` and `description`: information about the data represented by that schema +- `$comment` (NEW in draft-07): information for developers. With option `$comment` Ajv logs or passes the comment string to the user-supplied function. See [Options](#options). +- `default`: a default value of the data instance, see [Assigning defaults](#assigning-defaults). +- `examples` (NEW in draft-07): an array of data instances. Ajv does not check the validity of these instances against the schema. +- `readOnly` and `writeOnly` (NEW in draft-07): marks data-instance as read-only or write-only in relation to the source of the data (database, api, etc.). +- `contentEncoding`: [RFC 2045](https://tools.ietf.org/html/rfc2045#section-6.1 ), e.g., "base64". +- `contentMediaType`: [RFC 2046](https://tools.ietf.org/html/rfc2046), e.g., "image/png". + +__Please note__: Ajv does not implement validation of the keywords `examples`, `contentEncoding` and `contentMediaType` but it reserves them. If you want to create a plugin that implements some of them, it should remove these keywords from the instance. + + +## Formats + +The following formats are supported for string validation with "format" keyword: + +- _date_: full-date according to [RFC3339](http://tools.ietf.org/html/rfc3339#section-5.6). +- _time_: time with optional time-zone. +- _date-time_: date-time from the same source (time-zone is mandatory). `date`, `time` and `date-time` validate ranges in `full` mode and only regexp in `fast` mode (see [options](#options)). +- _uri_: full uri with optional protocol. +- _url_: [URL record](https://url.spec.whatwg.org/#concept-url). +- _uri-template_: URI template according to [RFC6570](https://tools.ietf.org/html/rfc6570) +- _email_: email address. +- _hostname_: host name according to [RFC1034](http://tools.ietf.org/html/rfc1034#section-3.5). +- _ipv4_: IP address v4. +- _ipv6_: IP address v6. +- _regex_: tests whether a string is a valid regular expression by passing it to RegExp constructor. +- _uuid_: Universally Unique IDentifier according to [RFC4122](http://tools.ietf.org/html/rfc4122). +- _json-pointer_: JSON-pointer according to [RFC6901](https://tools.ietf.org/html/rfc6901). +- _relative-json-pointer_: relative JSON-pointer according to [this draft](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00). + +__Please note__: JSON Schema draft-07 also defines formats `iri`, `iri-reference`, `idn-hostname` and `idn-email` for URLs, hostnames and emails with international characters. Ajv does not implement these formats. If you create Ajv plugin that implements them please make a PR here to mention this plugin. + +There are two modes of format validation: `fast` and `full`. This mode affects formats `date`, `time`, `date-time`, `uri`, `email`, and `hostname`. See [Options](#options) for details. + +You can add additional formats and replace any of the formats above using [addFormat](#api-addformat) method. + +The option `unknownFormats` allows changing the default behaviour when an unknown format is encountered. In this case Ajv can either fail schema compilation (default) or ignore it (default in versions before 5.0.0). You also can whitelist specific format(s) to be ignored. See [Options](#options) for details. + +You can find patterns used for format validation and the sources that were used in [formats.js](https://github.com/epoberezkin/ajv/blob/master/lib/compile/formats.js). + + +## Combining schemas with $ref + +You can structure your validation logic across multiple schema files and have schemas reference each other using `$ref` keyword. + +Example: + +```javascript +var schema = { + "$id": "http://example.com/schemas/schema.json", + "type": "object", + "properties": { + "foo": { "$ref": "defs.json#/definitions/int" }, + "bar": { "$ref": "defs.json#/definitions/str" } + } +}; + +var defsSchema = { + "$id": "http://example.com/schemas/defs.json", + "definitions": { + "int": { "type": "integer" }, + "str": { "type": "string" } + } +}; +``` + +Now to compile your schema you can either pass all schemas to Ajv instance: + +```javascript +var ajv = new Ajv({schemas: [schema, defsSchema]}); +var validate = ajv.getSchema('http://example.com/schemas/schema.json'); +``` + +or use `addSchema` method: + +```javascript +var ajv = new Ajv; +var validate = ajv.addSchema(defsSchema) + .compile(schema); +``` + +See [Options](#options) and [addSchema](#api) method. + +__Please note__: +- `$ref` is resolved as the uri-reference using schema $id as the base URI (see the example). +- References can be recursive (and mutually recursive) to implement the schemas for different data structures (such as linked lists, trees, graphs, etc.). +- You don't have to host your schema files at the URIs that you use as schema $id. These URIs are only used to identify the schemas, and according to JSON Schema specification validators should not expect to be able to download the schemas from these URIs. +- The actual location of the schema file in the file system is not used. +- You can pass the identifier of the schema as the second parameter of `addSchema` method or as a property name in `schemas` option. This identifier can be used instead of (or in addition to) schema $id. +- You cannot have the same $id (or the schema identifier) used for more than one schema - the exception will be thrown. +- You can implement dynamic resolution of the referenced schemas using `compileAsync` method. In this way you can store schemas in any system (files, web, database, etc.) and reference them without explicitly adding to Ajv instance. See [Asynchronous schema compilation](#asynchronous-schema-compilation). + + +## $data reference + +With `$data` option you can use values from the validated data as the values for the schema keywords. See [proposal](https://github.com/json-schema/json-schema/wiki/$data-(v5-proposal)) for more information about how it works. + +`$data` reference is supported in the keywords: const, enum, format, maximum/minimum, exclusiveMaximum / exclusiveMinimum, maxLength / minLength, maxItems / minItems, maxProperties / minProperties, formatMaximum / formatMinimum, formatExclusiveMaximum / formatExclusiveMinimum, multipleOf, pattern, required, uniqueItems. + +The value of "$data" should be a [JSON-pointer](https://tools.ietf.org/html/rfc6901) to the data (the root is always the top level data object, even if the $data reference is inside a referenced subschema) or a [relative JSON-pointer](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00) (it is relative to the current point in data; if the $data reference is inside a referenced subschema it cannot point to the data outside of the root level for this subschema). + +Examples. + +This schema requires that the value in property `smaller` is less or equal than the value in the property larger: + +```javascript +var ajv = new Ajv({$data: true}); + +var schema = { + "properties": { + "smaller": { + "type": "number", + "maximum": { "$data": "1/larger" } + }, + "larger": { "type": "number" } + } +}; + +var validData = { + smaller: 5, + larger: 7 +}; + +ajv.validate(schema, validData); // true +``` + +This schema requires that the properties have the same format as their field names: + +```javascript +var schema = { + "additionalProperties": { + "type": "string", + "format": { "$data": "0#" } + } +}; + +var validData = { + 'date-time': '1963-06-19T08:30:06.283185Z', + email: 'joe.bloggs@example.com' +} +``` + +`$data` reference is resolved safely - it won't throw even if some property is undefined. If `$data` resolves to `undefined` the validation succeeds (with the exclusion of `const` keyword). If `$data` resolves to incorrect type (e.g. not "number" for maximum keyword) the validation fails. + + +## $merge and $patch keywords + +With the package [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) you can use the keywords `$merge` and `$patch` that allow extending JSON Schemas with patches using formats [JSON Merge Patch (RFC 7396)](https://tools.ietf.org/html/rfc7396) and [JSON Patch (RFC 6902)](https://tools.ietf.org/html/rfc6902). + +To add keywords `$merge` and `$patch` to Ajv instance use this code: + +```javascript +require('ajv-merge-patch')(ajv); +``` + +Examples. + +Using `$merge`: + +```json +{ + "$merge": { + "source": { + "type": "object", + "properties": { "p": { "type": "string" } }, + "additionalProperties": false + }, + "with": { + "properties": { "q": { "type": "number" } } + } + } +} +``` + +Using `$patch`: + +```json +{ + "$patch": { + "source": { + "type": "object", + "properties": { "p": { "type": "string" } }, + "additionalProperties": false + }, + "with": [ + { "op": "add", "path": "/properties/q", "value": { "type": "number" } } + ] + } +} +``` + +The schemas above are equivalent to this schema: + +```json +{ + "type": "object", + "properties": { + "p": { "type": "string" }, + "q": { "type": "number" } + }, + "additionalProperties": false +} +``` + +The properties `source` and `with` in the keywords `$merge` and `$patch` can use absolute or relative `$ref` to point to other schemas previously added to the Ajv instance or to the fragments of the current schema. + +See the package [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) for more information. + + +## Defining custom keywords + +The advantages of using custom keywords are: + +- allow creating validation scenarios that cannot be expressed using JSON Schema +- simplify your schemas +- help bringing a bigger part of the validation logic to your schemas +- make your schemas more expressive, less verbose and closer to your application domain +- implement custom data processors that modify your data (`modifying` option MUST be used in keyword definition) and/or create side effects while the data is being validated + +If a keyword is used only for side-effects and its validation result is pre-defined, use option `valid: true/false` in keyword definition to simplify both generated code (no error handling in case of `valid: true`) and your keyword functions (no need to return any validation result). + +The concerns you have to be aware of when extending JSON Schema standard with custom keywords are the portability and understanding of your schemas. You will have to support these custom keywords on other platforms and to properly document these keywords so that everybody can understand them in your schemas. + +You can define custom keywords with [addKeyword](#api-addkeyword) method. Keywords are defined on the `ajv` instance level - new instances will not have previously defined keywords. + +Ajv allows defining keywords with: +- validation function +- compilation function +- macro function +- inline compilation function that should return code (as string) that will be inlined in the currently compiled schema. + +Example. `range` and `exclusiveRange` keywords using compiled schema: + +```javascript +ajv.addKeyword('range', { + type: 'number', + compile: function (sch, parentSchema) { + var min = sch[0]; + var max = sch[1]; + + return parentSchema.exclusiveRange === true + ? function (data) { return data > min && data < max; } + : function (data) { return data >= min && data <= max; } + } +}); + +var schema = { "range": [2, 4], "exclusiveRange": true }; +var validate = ajv.compile(schema); +console.log(validate(2.01)); // true +console.log(validate(3.99)); // true +console.log(validate(2)); // false +console.log(validate(4)); // false +``` + +Several custom keywords (typeof, instanceof, range and propertyNames) are defined in [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package - they can be used for your schemas and as a starting point for your own custom keywords. + +See [Defining custom keywords](https://github.com/epoberezkin/ajv/blob/master/CUSTOM.md) for more details. + + +## Asynchronous schema compilation + +During asynchronous compilation remote references are loaded using supplied function. See `compileAsync` [method](#api-compileAsync) and `loadSchema` [option](#options). + +Example: + +```javascript +var ajv = new Ajv({ loadSchema: loadSchema }); + +ajv.compileAsync(schema).then(function (validate) { + var valid = validate(data); + // ... +}); + +function loadSchema(uri) { + return request.json(uri).then(function (res) { + if (res.statusCode >= 400) + throw new Error('Loading error: ' + res.statusCode); + return res.body; + }); +} +``` + +__Please note__: [Option](#options) `missingRefs` should NOT be set to `"ignore"` or `"fail"` for asynchronous compilation to work. + + +## Asynchronous validation + +Example in Node.js REPL: https://tonicdev.com/esp/ajv-asynchronous-validation + +You can define custom formats and keywords that perform validation asynchronously by accessing database or some other service. You should add `async: true` in the keyword or format definition (see [addFormat](#api-addformat), [addKeyword](#api-addkeyword) and [Defining custom keywords](#defining-custom-keywords)). + +If your schema uses asynchronous formats/keywords or refers to some schema that contains them it should have `"$async": true` keyword so that Ajv can compile it correctly. If asynchronous format/keyword or reference to asynchronous schema is used in the schema without `$async` keyword Ajv will throw an exception during schema compilation. + +__Please note__: all asynchronous subschemas that are referenced from the current or other schemas should have `"$async": true` keyword as well, otherwise the schema compilation will fail. + +Validation function for an asynchronous custom format/keyword should return a promise that resolves with `true` or `false` (or rejects with `new Ajv.ValidationError(errors)` if you want to return custom errors from the keyword function). + +Ajv compiles asynchronous schemas to [es7 async functions](http://tc39.github.io/ecmascript-asyncawait/) that can optionally be transpiled with [nodent](https://github.com/MatAtBread/nodent). Async functions are supported in Node.js 7+ and all modern browsers. You can also supply any other transpiler as a function via `processCode` option. See [Options](#options). + +The compiled validation function has `$async: true` property (if the schema is asynchronous), so you can differentiate these functions if you are using both synchronous and asynchronous schemas. + +Validation result will be a promise that resolves with validated data or rejects with an exception `Ajv.ValidationError` that contains the array of validation errors in `errors` property. + + +Example: + +```javascript +var ajv = new Ajv; +// require('ajv-async')(ajv); + +ajv.addKeyword('idExists', { + async: true, + type: 'number', + validate: checkIdExists +}); + + +function checkIdExists(schema, data) { + return knex(schema.table) + .select('id') + .where('id', data) + .then(function (rows) { + return !!rows.length; // true if record is found + }); +} + +var schema = { + "$async": true, + "properties": { + "userId": { + "type": "integer", + "idExists": { "table": "users" } + }, + "postId": { + "type": "integer", + "idExists": { "table": "posts" } + } + } +}; + +var validate = ajv.compile(schema); + +validate({ userId: 1, postId: 19 }) +.then(function (data) { + console.log('Data is valid', data); // { userId: 1, postId: 19 } +}) +.catch(function (err) { + if (!(err instanceof Ajv.ValidationError)) throw err; + // data is invalid + console.log('Validation errors:', err.errors); +}); +``` + +### Using transpilers with asynchronous validation functions. + +[ajv-async](https://github.com/epoberezkin/ajv-async) uses [nodent](https://github.com/MatAtBread/nodent) to transpile async functions. To use another transpiler you should separately install it (or load its bundle in the browser). + + +#### Using nodent + +```javascript +var ajv = new Ajv; +require('ajv-async')(ajv); +// in the browser if you want to load ajv-async bundle separately you can: +// window.ajvAsync(ajv); +var validate = ajv.compile(schema); // transpiled es7 async function +validate(data).then(successFunc).catch(errorFunc); +``` + + +#### Using other transpilers + +```javascript +var ajv = new Ajv({ processCode: transpileFunc }); +var validate = ajv.compile(schema); // transpiled es7 async function +validate(data).then(successFunc).catch(errorFunc); +``` + +See [Options](#options). + + +## Filtering data + +With [option `removeAdditional`](#options) (added by [andyscott](https://github.com/andyscott)) you can filter data during the validation. + +This option modifies original data. + +Example: + +```javascript +var ajv = new Ajv({ removeAdditional: true }); +var schema = { + "additionalProperties": false, + "properties": { + "foo": { "type": "number" }, + "bar": { + "additionalProperties": { "type": "number" }, + "properties": { + "baz": { "type": "string" } + } + } + } +} + +var data = { + "foo": 0, + "additional1": 1, // will be removed; `additionalProperties` == false + "bar": { + "baz": "abc", + "additional2": 2 // will NOT be removed; `additionalProperties` != false + }, +} + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // { "foo": 0, "bar": { "baz": "abc", "additional2": 2 } +``` + +If `removeAdditional` option in the example above were `"all"` then both `additional1` and `additional2` properties would have been removed. + +If the option were `"failing"` then property `additional1` would have been removed regardless of its value and property `additional2` would have been removed only if its value were failing the schema in the inner `additionalProperties` (so in the example above it would have stayed because it passes the schema, but any non-number would have been removed). + +__Please note__: If you use `removeAdditional` option with `additionalProperties` keyword inside `anyOf`/`oneOf` keywords your validation can fail with this schema, for example: + +```json +{ + "type": "object", + "oneOf": [ + { + "properties": { + "foo": { "type": "string" } + }, + "required": [ "foo" ], + "additionalProperties": false + }, + { + "properties": { + "bar": { "type": "integer" } + }, + "required": [ "bar" ], + "additionalProperties": false + } + ] +} +``` + +The intention of the schema above is to allow objects with either the string property "foo" or the integer property "bar", but not with both and not with any other properties. + +With the option `removeAdditional: true` the validation will pass for the object `{ "foo": "abc"}` but will fail for the object `{"bar": 1}`. It happens because while the first subschema in `oneOf` is validated, the property `bar` is removed because it is an additional property according to the standard (because it is not included in `properties` keyword in the same schema). + +While this behaviour is unexpected (issues [#129](https://github.com/epoberezkin/ajv/issues/129), [#134](https://github.com/epoberezkin/ajv/issues/134)), it is correct. To have the expected behaviour (both objects are allowed and additional properties are removed) the schema has to be refactored in this way: + +```json +{ + "type": "object", + "properties": { + "foo": { "type": "string" }, + "bar": { "type": "integer" } + }, + "additionalProperties": false, + "oneOf": [ + { "required": [ "foo" ] }, + { "required": [ "bar" ] } + ] +} +``` + +The schema above is also more efficient - it will compile into a faster function. + + +## Assigning defaults + +With [option `useDefaults`](#options) Ajv will assign values from `default` keyword in the schemas of `properties` and `items` (when it is the array of schemas) to the missing properties and items. + +This option modifies original data. + +__Please note__: by default the default value is inserted in the generated validation code as a literal (starting from v4.0), so the value inserted in the data will be the deep clone of the default in the schema. + +If you need to insert the default value in the data by reference pass the option `useDefaults: "shared"`. + +Inserting defaults by reference can be faster (in case you have an object in `default`) and it allows to have dynamic values in defaults, e.g. timestamp, without recompiling the schema. The side effect is that modifying the default value in any validated data instance will change the default in the schema and in other validated data instances. See example 3 below. + + +Example 1 (`default` in `properties`): + +```javascript +var ajv = new Ajv({ useDefaults: true }); +var schema = { + "type": "object", + "properties": { + "foo": { "type": "number" }, + "bar": { "type": "string", "default": "baz" } + }, + "required": [ "foo", "bar" ] +}; + +var data = { "foo": 1 }; + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // { "foo": 1, "bar": "baz" } +``` + +Example 2 (`default` in `items`): + +```javascript +var schema = { + "type": "array", + "items": [ + { "type": "number" }, + { "type": "string", "default": "foo" } + ] +} + +var data = [ 1 ]; + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // [ 1, "foo" ] +``` + +Example 3 (inserting "defaults" by reference): + +```javascript +var ajv = new Ajv({ useDefaults: 'shared' }); + +var schema = { + properties: { + foo: { + default: { bar: 1 } + } + } +} + +var validate = ajv.compile(schema); + +var data = {}; +console.log(validate(data)); // true +console.log(data); // { foo: { bar: 1 } } + +data.foo.bar = 2; + +var data2 = {}; +console.log(validate(data2)); // true +console.log(data2); // { foo: { bar: 2 } } +``` + +`default` keywords in other cases are ignored: + +- not in `properties` or `items` subschemas +- in schemas inside `anyOf`, `oneOf` and `not` (see [#42](https://github.com/epoberezkin/ajv/issues/42)) +- in `if` subschema of `switch` keyword +- in schemas generated by custom macro keywords + + +## Coercing data types + +When you are validating user inputs all your data properties are usually strings. The option `coerceTypes` allows you to have your data types coerced to the types specified in your schema `type` keywords, both to pass the validation and to use the correctly typed data afterwards. + +This option modifies original data. + +__Please note__: if you pass a scalar value to the validating function its type will be coerced and it will pass the validation, but the value of the variable you pass won't be updated because scalars are passed by value. + + +Example 1: + +```javascript +var ajv = new Ajv({ coerceTypes: true }); +var schema = { + "type": "object", + "properties": { + "foo": { "type": "number" }, + "bar": { "type": "boolean" } + }, + "required": [ "foo", "bar" ] +}; + +var data = { "foo": "1", "bar": "false" }; + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // { "foo": 1, "bar": false } +``` + +Example 2 (array coercions): + +```javascript +var ajv = new Ajv({ coerceTypes: 'array' }); +var schema = { + "properties": { + "foo": { "type": "array", "items": { "type": "number" } }, + "bar": { "type": "boolean" } + } +}; + +var data = { "foo": "1", "bar": ["false"] }; + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // { "foo": [1], "bar": false } +``` + +The coercion rules, as you can see from the example, are different from JavaScript both to validate user input as expected and to have the coercion reversible (to correctly validate cases where different types are defined in subschemas of "anyOf" and other compound keywords). + +See [Coercion rules](https://github.com/epoberezkin/ajv/blob/master/COERCION.md) for details. + + +## API + +##### new Ajv(Object options) -> Object + +Create Ajv instance. + + +##### .compile(Object schema) -> Function<Object data> + +Generate validating function and cache the compiled schema for future use. + +Validating function returns a boolean value. This function has properties `errors` and `schema`. Errors encountered during the last validation are assigned to `errors` property (it is assigned `null` if there was no errors). `schema` property contains the reference to the original schema. + +The schema passed to this method will be validated against meta-schema unless `validateSchema` option is false. If schema is invalid, an error will be thrown. See [options](#options). + + +##### .compileAsync(Object schema [, Boolean meta] [, Function callback]) -> Promise + +Asynchronous version of `compile` method that loads missing remote schemas using asynchronous function in `options.loadSchema`. This function returns a Promise that resolves to a validation function. An optional callback passed to `compileAsync` will be called with 2 parameters: error (or null) and validating function. The returned promise will reject (and the callback will be called with an error) when: + +- missing schema can't be loaded (`loadSchema` returns a Promise that rejects). +- a schema containing a missing reference is loaded, but the reference cannot be resolved. +- schema (or some loaded/referenced schema) is invalid. + +The function compiles schema and loads the first missing schema (or meta-schema) until all missing schemas are loaded. + +You can asynchronously compile meta-schema by passing `true` as the second parameter. + +See example in [Asynchronous compilation](#asynchronous-schema-compilation). + + +##### .validate(Object schema|String key|String ref, data) -> Boolean + +Validate data using passed schema (it will be compiled and cached). + +Instead of the schema you can use the key that was previously passed to `addSchema`, the schema id if it was present in the schema or any previously resolved reference. + +Validation errors will be available in the `errors` property of Ajv instance (`null` if there were no errors). + +__Please note__: every time this method is called the errors are overwritten so you need to copy them to another variable if you want to use them later. + +If the schema is asynchronous (has `$async` keyword on the top level) this method returns a Promise. See [Asynchronous validation](#asynchronous-validation). + + +##### .addSchema(Array<Object>|Object schema [, String key]) -> Ajv + +Add schema(s) to validator instance. This method does not compile schemas (but it still validates them). Because of that dependencies can be added in any order and circular dependencies are supported. It also prevents unnecessary compilation of schemas that are containers for other schemas but not used as a whole. + +Array of schemas can be passed (schemas should have ids), the second parameter will be ignored. + +Key can be passed that can be used to reference the schema and will be used as the schema id if there is no id inside the schema. If the key is not passed, the schema id will be used as the key. + + +Once the schema is added, it (and all the references inside it) can be referenced in other schemas and used to validate data. + +Although `addSchema` does not compile schemas, explicit compilation is not required - the schema will be compiled when it is used first time. + +By default the schema is validated against meta-schema before it is added, and if the schema does not pass validation the exception is thrown. This behaviour is controlled by `validateSchema` option. + +__Please note__: Ajv uses the [method chaining syntax](https://en.wikipedia.org/wiki/Method_chaining) for all methods with the prefix `add*` and `remove*`. +This allows you to do nice things like the following. + +```javascript +var validate = new Ajv().addSchema(schema).addFormat(name, regex).getSchema(uri); +``` + +##### .addMetaSchema(Array<Object>|Object schema [, String key]) -> Ajv + +Adds meta schema(s) that can be used to validate other schemas. That function should be used instead of `addSchema` because there may be instance options that would compile a meta schema incorrectly (at the moment it is `removeAdditional` option). + +There is no need to explicitly add draft-07 meta schema (http://json-schema.org/draft-07/schema) - it is added by default, unless option `meta` is set to `false`. You only need to use it if you have a changed meta-schema that you want to use to validate your schemas. See `validateSchema`. + + +##### .validateSchema(Object schema) -> Boolean + +Validates schema. This method should be used to validate schemas rather than `validate` due to the inconsistency of `uri` format in JSON Schema standard. + +By default this method is called automatically when the schema is added, so you rarely need to use it directly. + +If schema doesn't have `$schema` property, it is validated against draft 6 meta-schema (option `meta` should not be false). + +If schema has `$schema` property, then the schema with this id (that should be previously added) is used to validate passed schema. + +Errors will be available at `ajv.errors`. + + +##### .getSchema(String key) -> Function<Object data> + +Retrieve compiled schema previously added with `addSchema` by the key passed to `addSchema` or by its full reference (id). The returned validating function has `schema` property with the reference to the original schema. + + +##### .removeSchema([Object schema|String key|String ref|RegExp pattern]) -> Ajv + +Remove added/cached schema. Even if schema is referenced by other schemas it can be safely removed as dependent schemas have local references. + +Schema can be removed using: +- key passed to `addSchema` +- it's full reference (id) +- RegExp that should match schema id or key (meta-schemas won't be removed) +- actual schema object that will be stable-stringified to remove schema from cache + +If no parameter is passed all schemas but meta-schemas will be removed and the cache will be cleared. + + +##### .addFormat(String name, String|RegExp|Function|Object format) -> Ajv + +Add custom format to validate strings or numbers. It can also be used to replace pre-defined formats for Ajv instance. + +Strings are converted to RegExp. + +Function should return validation result as `true` or `false`. + +If object is passed it should have properties `validate`, `compare` and `async`: + +- _validate_: a string, RegExp or a function as described above. +- _compare_: an optional comparison function that accepts two strings and compares them according to the format meaning. This function is used with keywords `formatMaximum`/`formatMinimum` (defined in [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package). It should return `1` if the first value is bigger than the second value, `-1` if it is smaller and `0` if it is equal. +- _async_: an optional `true` value if `validate` is an asynchronous function; in this case it should return a promise that resolves with a value `true` or `false`. +- _type_: an optional type of data that the format applies to. It can be `"string"` (default) or `"number"` (see https://github.com/epoberezkin/ajv/issues/291#issuecomment-259923858). If the type of data is different, the validation will pass. + +Custom formats can be also added via `formats` option. + + +##### .addKeyword(String keyword, Object definition) -> Ajv + +Add custom validation keyword to Ajv instance. + +Keyword should be different from all standard JSON Schema keywords and different from previously defined keywords. There is no way to redefine keywords or to remove keyword definition from the instance. + +Keyword must start with a letter, `_` or `$`, and may continue with letters, numbers, `_`, `$`, or `-`. +It is recommended to use an application-specific prefix for keywords to avoid current and future name collisions. + +Example Keywords: +- `"xyz-example"`: valid, and uses prefix for the xyz project to avoid name collisions. +- `"example"`: valid, but not recommended as it could collide with future versions of JSON Schema etc. +- `"3-example"`: invalid as numbers are not allowed to be the first character in a keyword + +Keyword definition is an object with the following properties: + +- _type_: optional string or array of strings with data type(s) that the keyword applies to. If not present, the keyword will apply to all types. +- _validate_: validating function +- _compile_: compiling function +- _macro_: macro function +- _inline_: compiling function that returns code (as string) +- _schema_: an optional `false` value used with "validate" keyword to not pass schema +- _metaSchema_: an optional meta-schema for keyword schema +- _modifying_: `true` MUST be passed if keyword modifies data +- _valid_: pass `true`/`false` to pre-define validation result, the result returned from validation function will be ignored. This option cannot be used with macro keywords. +- _$data_: an optional `true` value to support [$data reference](#data-reference) as the value of custom keyword. The reference will be resolved at validation time. If the keyword has meta-schema it would be extended to allow $data and it will be used to validate the resolved value. Supporting $data reference requires that keyword has validating function (as the only option or in addition to compile, macro or inline function). +- _async_: an optional `true` value if the validation function is asynchronous (whether it is compiled or passed in _validate_ property); in this case it should return a promise that resolves with a value `true` or `false`. This option is ignored in case of "macro" and "inline" keywords. +- _errors_: an optional boolean indicating whether keyword returns errors. If this property is not set Ajv will determine if the errors were set in case of failed validation. + +_compile_, _macro_ and _inline_ are mutually exclusive, only one should be used at a time. _validate_ can be used separately or in addition to them to support $data reference. + +__Please note__: If the keyword is validating data type that is different from the type(s) in its definition, the validation function will not be called (and expanded macro will not be used), so there is no need to check for data type inside validation function or inside schema returned by macro function (unless you want to enforce a specific type and for some reason do not want to use a separate `type` keyword for that). In the same way as standard keywords work, if the keyword does not apply to the data type being validated, the validation of this keyword will succeed. + +See [Defining custom keywords](#defining-custom-keywords) for more details. + + +##### .getKeyword(String keyword) -> Object|Boolean + +Returns custom keyword definition, `true` for pre-defined keywords and `false` if the keyword is unknown. + + +##### .removeKeyword(String keyword) -> Ajv + +Removes custom or pre-defined keyword so you can redefine them. + +While this method can be used to extend pre-defined keywords, it can also be used to completely change their meaning - it may lead to unexpected results. + +__Please note__: schemas compiled before the keyword is removed will continue to work without changes. To recompile schemas use `removeSchema` method and compile them again. + + +##### .errorsText([Array<Object> errors [, Object options]]) -> String + +Returns the text with all errors in a String. + +Options can have properties `separator` (string used to separate errors, ", " by default) and `dataVar` (the variable name that dataPaths are prefixed with, "data" by default). + + +## Options + +Defaults: + +```javascript +{ + // validation and reporting options: + $data: false, + allErrors: false, + verbose: false, + $comment: false, // NEW in Ajv version 6.0 + jsonPointers: false, + uniqueItems: true, + unicode: true, + format: 'fast', + formats: {}, + unknownFormats: true, + schemas: {}, + logger: undefined, + // referenced schema options: + schemaId: '$id', + missingRefs: true, + extendRefs: 'ignore', // recommended 'fail' + loadSchema: undefined, // function(uri: string): Promise {} + // options to modify validated data: + removeAdditional: false, + useDefaults: false, + coerceTypes: false, + // asynchronous validation options: + transpile: undefined, // requires ajv-async package + // advanced options: + meta: true, + validateSchema: true, + addUsedSchema: true, + inlineRefs: true, + passContext: false, + loopRequired: Infinity, + ownProperties: false, + multipleOfPrecision: false, + errorDataPath: 'object', // deprecated + messages: true, + sourceCode: false, + processCode: undefined, // function (str: string): string {} + cache: new Cache, + serialize: undefined +} +``` + +##### Validation and reporting options + +- _$data_: support [$data references](#data-reference). Draft 6 meta-schema that is added by default will be extended to allow them. If you want to use another meta-schema you need to use $dataMetaSchema method to add support for $data reference. See [API](#api). +- _allErrors_: check all rules collecting all errors. Default is to return after the first error. +- _verbose_: include the reference to the part of the schema (`schema` and `parentSchema`) and validated data in errors (false by default). +- _$comment_ (NEW in Ajv version 6.0): log or pass the value of `$comment` keyword to a function. Option values: + - `false` (default): ignore $comment keyword. + - `true`: log the keyword value to console. + - function: pass the keyword value, its schema path and root schema to the specified function +- _jsonPointers_: set `dataPath` property of errors using [JSON Pointers](https://tools.ietf.org/html/rfc6901) instead of JavaScript property access notation. +- _uniqueItems_: validate `uniqueItems` keyword (true by default). +- _unicode_: calculate correct length of strings with unicode pairs (true by default). Pass `false` to use `.length` of strings that is faster, but gives "incorrect" lengths of strings with unicode pairs - each unicode pair is counted as two characters. +- _format_: formats validation mode ('fast' by default). Pass 'full' for more correct and slow validation or `false` not to validate formats at all. E.g., 25:00:00 and 2015/14/33 will be invalid time and date in 'full' mode but it will be valid in 'fast' mode. +- _formats_: an object with custom formats. Keys and values will be passed to `addFormat` method. +- _unknownFormats_: handling of unknown formats. Option values: + - `true` (default) - if an unknown format is encountered the exception is thrown during schema compilation. If `format` keyword value is [$data reference](#data-reference) and it is unknown the validation will fail. + - `[String]` - an array of unknown format names that will be ignored. This option can be used to allow usage of third party schemas with format(s) for which you don't have definitions, but still fail if another unknown format is used. If `format` keyword value is [$data reference](#data-reference) and it is not in this array the validation will fail. + - `"ignore"` - to log warning during schema compilation and always pass validation (the default behaviour in versions before 5.0.0). This option is not recommended, as it allows to mistype format name and it won't be validated without any error message. This behaviour is required by JSON Schema specification. +- _schemas_: an array or object of schemas that will be added to the instance. In case you pass the array the schemas must have IDs in them. When the object is passed the method `addSchema(value, key)` will be called for each schema in this object. +- _logger_: sets the logging method. Default is the global `console` object that should have methods `log`, `warn` and `error`. Option values: + - custom logger - it should have methods `log`, `warn` and `error`. If any of these methods is missing an exception will be thrown. + - `false` - logging is disabled. + + +##### Referenced schema options + +- _schemaId_: this option defines which keywords are used as schema URI. Option value: + - `"$id"` (default) - only use `$id` keyword as schema URI (as specified in JSON Schema draft-06/07), ignore `id` keyword (if it is present a warning will be logged). + - `"id"` - only use `id` keyword as schema URI (as specified in JSON Schema draft-04), ignore `$id` keyword (if it is present a warning will be logged). + - `"auto"` - use both `$id` and `id` keywords as schema URI. If both are present (in the same schema object) and different the exception will be thrown during schema compilation. +- _missingRefs_: handling of missing referenced schemas. Option values: + - `true` (default) - if the reference cannot be resolved during compilation the exception is thrown. The thrown error has properties `missingRef` (with hash fragment) and `missingSchema` (without it). Both properties are resolved relative to the current base id (usually schema id, unless it was substituted). + - `"ignore"` - to log error during compilation and always pass validation. + - `"fail"` - to log error and successfully compile schema but fail validation if this rule is checked. +- _extendRefs_: validation of other keywords when `$ref` is present in the schema. Option values: + - `"ignore"` (default) - when `$ref` is used other keywords are ignored (as per [JSON Reference](https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03#section-3) standard). A warning will be logged during the schema compilation. + - `"fail"` (recommended) - if other validation keywords are used together with `$ref` the exception will be thrown when the schema is compiled. This option is recommended to make sure schema has no keywords that are ignored, which can be confusing. + - `true` - validate all keywords in the schemas with `$ref` (the default behaviour in versions before 5.0.0). +- _loadSchema_: asynchronous function that will be used to load remote schemas when `compileAsync` [method](#api-compileAsync) is used and some reference is missing (option `missingRefs` should NOT be 'fail' or 'ignore'). This function should accept remote schema uri as a parameter and return a Promise that resolves to a schema. See example in [Asynchronous compilation](#asynchronous-schema-compilation). + + +##### Options to modify validated data + +- _removeAdditional_: remove additional properties - see example in [Filtering data](#filtering-data). This option is not used if schema is added with `addMetaSchema` method. Option values: + - `false` (default) - not to remove additional properties + - `"all"` - all additional properties are removed, regardless of `additionalProperties` keyword in schema (and no validation is made for them). + - `true` - only additional properties with `additionalProperties` keyword equal to `false` are removed. + - `"failing"` - additional properties that fail schema validation will be removed (where `additionalProperties` keyword is `false` or schema). +- _useDefaults_: replace missing properties and items with the values from corresponding `default` keywords. Default behaviour is to ignore `default` keywords. This option is not used if schema is added with `addMetaSchema` method. See examples in [Assigning defaults](#assigning-defaults). Option values: + - `false` (default) - do not use defaults + - `true` - insert defaults by value (safer and slower, object literal is used). + - `"shared"` - insert defaults by reference (faster). If the default is an object, it will be shared by all instances of validated data. If you modify the inserted default in the validated data, it will be modified in the schema as well. +- _coerceTypes_: change data type of data to match `type` keyword. See the example in [Coercing data types](#coercing-data-types) and [coercion rules](https://github.com/epoberezkin/ajv/blob/master/COERCION.md). Option values: + - `false` (default) - no type coercion. + - `true` - coerce scalar data types. + - `"array"` - in addition to coercions between scalar types, coerce scalar data to an array with one element and vice versa (as required by the schema). + + +##### Asynchronous validation options + +- _transpile_: Requires [ajv-async](https://github.com/epoberezkin/ajv-async) package. It determines whether Ajv transpiles compiled asynchronous validation function. Option values: + - `undefined` (default) - transpile with [nodent](https://github.com/MatAtBread/nodent) if async functions are not supported. + - `true` - always transpile with nodent. + - `false` - do not transpile; if async functions are not supported an exception will be thrown. + + +##### Advanced options + +- _meta_: add [meta-schema](http://json-schema.org/documentation.html) so it can be used by other schemas (true by default). If an object is passed, it will be used as the default meta-schema for schemas that have no `$schema` keyword. This default meta-schema MUST have `$schema` keyword. +- _validateSchema_: validate added/compiled schemas against meta-schema (true by default). `$schema` property in the schema can be http://json-schema.org/draft-07/schema or absent (draft-07 meta-schema will be used) or can be a reference to the schema previously added with `addMetaSchema` method. Option values: + - `true` (default) - if the validation fails, throw the exception. + - `"log"` - if the validation fails, log error. + - `false` - skip schema validation. +- _addUsedSchema_: by default methods `compile` and `validate` add schemas to the instance if they have `$id` (or `id`) property that doesn't start with "#". If `$id` is present and it is not unique the exception will be thrown. Set this option to `false` to skip adding schemas to the instance and the `$id` uniqueness check when these methods are used. This option does not affect `addSchema` method. +- _inlineRefs_: Affects compilation of referenced schemas. Option values: + - `true` (default) - the referenced schemas that don't have refs in them are inlined, regardless of their size - that substantially improves performance at the cost of the bigger size of compiled schema functions. + - `false` - to not inline referenced schemas (they will be compiled as separate functions). + - integer number - to limit the maximum number of keywords of the schema that will be inlined. +- _passContext_: pass validation context to custom keyword functions. If this option is `true` and you pass some context to the compiled validation function with `validate.call(context, data)`, the `context` will be available as `this` in your custom keywords. By default `this` is Ajv instance. +- _loopRequired_: by default `required` keyword is compiled into a single expression (or a sequence of statements in `allErrors` mode). In case of a very large number of properties in this keyword it may result in a very big validation function. Pass integer to set the number of properties above which `required` keyword will be validated in a loop - smaller validation function size but also worse performance. +- _ownProperties_: by default Ajv iterates over all enumerable object properties; when this option is `true` only own enumerable object properties (i.e. found directly on the object rather than on its prototype) are iterated. Contributed by @mbroadst. +- _multipleOfPrecision_: by default `multipleOf` keyword is validated by comparing the result of division with parseInt() of that result. It works for dividers that are bigger than 1. For small dividers such as 0.01 the result of the division is usually not integer (even when it should be integer, see issue [#84](https://github.com/epoberezkin/ajv/issues/84)). If you need to use fractional dividers set this option to some positive integer N to have `multipleOf` validated using this formula: `Math.abs(Math.round(division) - division) < 1e-N` (it is slower but allows for float arithmetics deviations). +- _errorDataPath_ (deprecated): set `dataPath` to point to 'object' (default) or to 'property' when validating keywords `required`, `additionalProperties` and `dependencies`. +- _messages_: Include human-readable messages in errors. `true` by default. `false` can be passed when custom messages are used (e.g. with [ajv-i18n](https://github.com/epoberezkin/ajv-i18n)). +- _sourceCode_: add `sourceCode` property to validating function (for debugging; this code can be different from the result of toString call). +- _processCode_: an optional function to process generated code before it is passed to Function constructor. It can be used to either beautify (the validating function is generated without line-breaks) or to transpile code. Starting from version 5.0.0 this option replaced options: + - `beautify` that formatted the generated function using [js-beautify](https://github.com/beautify-web/js-beautify). If you want to beautify the generated code pass `require('js-beautify').js_beautify`. + - `transpile` that transpiled asynchronous validation function. You can still use `transpile` option with [ajv-async](https://github.com/epoberezkin/ajv-async) package. See [Asynchronous validation](#asynchronous-validation) for more information. +- _cache_: an optional instance of cache to store compiled schemas using stable-stringified schema as a key. For example, set-associative cache [sacjs](https://github.com/epoberezkin/sacjs) can be used. If not passed then a simple hash is used which is good enough for the common use case (a limited number of statically defined schemas). Cache should have methods `put(key, value)`, `get(key)`, `del(key)` and `clear()`. +- _serialize_: an optional function to serialize schema to cache key. Pass `false` to use schema itself as a key (e.g., if WeakMap used as a cache). By default [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used. + + +## Validation errors + +In case of validation failure, Ajv assigns the array of errors to `errors` property of validation function (or to `errors` property of Ajv instance when `validate` or `validateSchema` methods were called). In case of [asynchronous validation](#asynchronous-validation), the returned promise is rejected with exception `Ajv.ValidationError` that has `errors` property. + + +### Error objects + +Each error is an object with the following properties: + +- _keyword_: validation keyword. +- _dataPath_: the path to the part of the data that was validated. By default `dataPath` uses JavaScript property access notation (e.g., `".prop[1].subProp"`). When the option `jsonPointers` is true (see [Options](#options)) `dataPath` will be set using JSON pointer standard (e.g., `"/prop/1/subProp"`). +- _schemaPath_: the path (JSON-pointer as a URI fragment) to the schema of the keyword that failed validation. +- _params_: the object with the additional information about error that can be used to create custom error messages (e.g., using [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) package). See below for parameters set by all keywords. +- _message_: the standard error message (can be excluded with option `messages` set to false). +- _schema_: the schema of the keyword (added with `verbose` option). +- _parentSchema_: the schema containing the keyword (added with `verbose` option) +- _data_: the data validated by the keyword (added with `verbose` option). + +__Please note__: `propertyNames` keyword schema validation errors have an additional property `propertyName`, `dataPath` points to the object. After schema validation for each property name, if it is invalid an additional error is added with the property `keyword` equal to `"propertyNames"`. + + +### Error parameters + +Properties of `params` object in errors depend on the keyword that failed validation. + +- `maxItems`, `minItems`, `maxLength`, `minLength`, `maxProperties`, `minProperties` - property `limit` (number, the schema of the keyword). +- `additionalItems` - property `limit` (the maximum number of allowed items in case when `items` keyword is an array of schemas and `additionalItems` is false). +- `additionalProperties` - property `additionalProperty` (the property not used in `properties` and `patternProperties` keywords). +- `dependencies` - properties: + - `property` (dependent property), + - `missingProperty` (required missing dependency - only the first one is reported currently) + - `deps` (required dependencies, comma separated list as a string), + - `depsCount` (the number of required dependencies). +- `format` - property `format` (the schema of the keyword). +- `maximum`, `minimum` - properties: + - `limit` (number, the schema of the keyword), + - `exclusive` (boolean, the schema of `exclusiveMaximum` or `exclusiveMinimum`), + - `comparison` (string, comparison operation to compare the data to the limit, with the data on the left and the limit on the right; can be "<", "<=", ">", ">=") +- `multipleOf` - property `multipleOf` (the schema of the keyword) +- `pattern` - property `pattern` (the schema of the keyword) +- `required` - property `missingProperty` (required property that is missing). +- `propertyNames` - property `propertyName` (an invalid property name). +- `patternRequired` (in ajv-keywords) - property `missingPattern` (required pattern that did not match any property). +- `type` - property `type` (required type(s), a string, can be a comma-separated list) +- `uniqueItems` - properties `i` and `j` (indices of duplicate items). +- `const` - property `allowedValue` pointing to the value (the schema of the keyword). +- `enum` - property `allowedValues` pointing to the array of values (the schema of the keyword). +- `$ref` - property `ref` with the referenced schema URI. +- `oneOf` - property `passingSchemas` (array of indices of passing schemas, null if no schema passes). +- custom keywords (in case keyword definition doesn't create errors) - property `keyword` (the keyword name). + + +## Plugins + +Ajv can be extended with plugins that add custom keywords, formats or functions to process generated code. When such plugin is published as npm package it is recommended that it follows these conventions: + +- it exports a function +- this function accepts ajv instance as the first parameter and returns the same instance to allow chaining +- this function can accept an optional configuration as the second parameter + +If you have published a useful plugin please submit a PR to add it to the next section. + + +## Related packages + +- [ajv-async](https://github.com/epoberezkin/ajv-async) - plugin to configure async validation mode +- [ajv-cli](https://github.com/jessedc/ajv-cli) - command line interface +- [ajv-errors](https://github.com/epoberezkin/ajv-errors) - plugin for custom error messages +- [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) - internationalised error messages +- [ajv-istanbul](https://github.com/epoberezkin/ajv-istanbul) - plugin to instrument generated validation code to measure test coverage of your schemas +- [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) - plugin with custom validation keywords (if/then/else, select, typeof, etc.) +- [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) - plugin with keywords $merge and $patch +- [ajv-pack](https://github.com/epoberezkin/ajv-pack) - produces a compact module exporting validation functions + + +## Some packages using Ajv + +- [webpack](https://github.com/webpack/webpack) - a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser +- [jsonscript-js](https://github.com/JSONScript/jsonscript-js) - the interpreter for [JSONScript](http://www.jsonscript.org) - scripted processing of existing endpoints and services +- [osprey-method-handler](https://github.com/mulesoft-labs/osprey-method-handler) - Express middleware for validating requests and responses based on a RAML method object, used in [osprey](https://github.com/mulesoft/osprey) - validating API proxy generated from a RAML definition +- [har-validator](https://github.com/ahmadnassri/har-validator) - HTTP Archive (HAR) validator +- [jsoneditor](https://github.com/josdejong/jsoneditor) - a web-based tool to view, edit, format, and validate JSON http://jsoneditoronline.org +- [JSON Schema Lint](https://github.com/nickcmaynard/jsonschemalint) - a web tool to validate JSON/YAML document against a single JSON Schema http://jsonschemalint.com +- [objection](https://github.com/vincit/objection.js) - SQL-friendly ORM for Node.js +- [table](https://github.com/gajus/table) - formats data into a string table +- [ripple-lib](https://github.com/ripple/ripple-lib) - a JavaScript API for interacting with [Ripple](https://ripple.com) in Node.js and the browser +- [restbase](https://github.com/wikimedia/restbase) - distributed storage with REST API & dispatcher for backend services built to provide a low-latency & high-throughput API for Wikipedia / Wikimedia content +- [hippie-swagger](https://github.com/CacheControl/hippie-swagger) - [Hippie](https://github.com/vesln/hippie) wrapper that provides end to end API testing with swagger validation +- [react-form-controlled](https://github.com/seeden/react-form-controlled) - React controlled form components with validation +- [rabbitmq-schema](https://github.com/tjmehta/rabbitmq-schema) - a schema definition module for RabbitMQ graphs and messages +- [@query/schema](https://www.npmjs.com/package/@query/schema) - stream filtering with a URI-safe query syntax parsing to JSON Schema +- [chai-ajv-json-schema](https://github.com/peon374/chai-ajv-json-schema) - chai plugin to us JSON Schema with expect in mocha tests +- [grunt-jsonschema-ajv](https://github.com/SignpostMarv/grunt-jsonschema-ajv) - Grunt plugin for validating files against JSON Schema +- [extract-text-webpack-plugin](https://github.com/webpack-contrib/extract-text-webpack-plugin) - extract text from bundle into a file +- [electron-builder](https://github.com/electron-userland/electron-builder) - a solution to package and build a ready for distribution Electron app +- [addons-linter](https://github.com/mozilla/addons-linter) - Mozilla Add-ons Linter +- [gh-pages-generator](https://github.com/epoberezkin/gh-pages-generator) - multi-page site generator converting markdown files to GitHub pages +- [ESLint](https://github.com/eslint/eslint) - the pluggable linting utility for JavaScript and JSX + + +## Tests + +``` +npm install +git submodule update --init +npm test +``` + +## Contributing + +All validation functions are generated using doT templates in [dot](https://github.com/epoberezkin/ajv/tree/master/lib/dot) folder. Templates are precompiled so doT is not a run-time dependency. + +`npm run build` - compiles templates to [dotjs](https://github.com/epoberezkin/ajv/tree/master/lib/dotjs) folder. + +`npm run watch` - automatically compiles templates when files in dot folder change + +Please see [Contributing guidelines](https://github.com/epoberezkin/ajv/blob/master/CONTRIBUTING.md) + + +## Changes history + +See https://github.com/epoberezkin/ajv/releases + +__Please note__: [Changes in version 6.0.0](https://github.com/epoberezkin/ajv/releases/tag/v6.0.0). + +[Version 5.0.0](https://github.com/epoberezkin/ajv/releases/tag/5.0.0). + +[Version 4.0.0](https://github.com/epoberezkin/ajv/releases/tag/4.0.0). + +[Version 3.0.0](https://github.com/epoberezkin/ajv/releases/tag/3.0.0). + +[Version 2.0.0](https://github.com/epoberezkin/ajv/releases/tag/2.0.0). + + +## License + +[MIT](https://github.com/epoberezkin/ajv/blob/master/LICENSE) diff --git a/node_modules/table/node_modules/ajv/dist/ajv.bundle.js b/node_modules/table/node_modules/ajv/dist/ajv.bundle.js new file mode 100644 index 0000000..32edcc5 --- /dev/null +++ b/node_modules/table/node_modules/ajv/dist/ajv.bundle.js @@ -0,0 +1,7075 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Ajv = f()}})(function(){var define,module,exports;return (function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; +// For the source: https://gist.github.com/dperini/729294 +// For test cases: https://mathiasbynens.be/demo/url-regex +// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983. +// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; +var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; +var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; +var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; +var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; +var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; + + +module.exports = formats; + +function formats(mode) { + mode = mode == 'full' ? 'full' : 'fast'; + return util.copy(formats[mode]); +} + + +formats.fast = { + // date: http://tools.ietf.org/html/rfc3339#section-5.6 + date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, + // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 + time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i, + 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i, + // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js + uri: /^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i, + 'uri-reference': /^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, + 'uri-template': URITEMPLATE, + url: URL, + // email (sources from jsen validator): + // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363 + // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation') + email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, + hostname: HOSTNAME, + // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, + // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses + ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, + regex: regex, + // uuid: http://tools.ietf.org/html/rfc4122 + uuid: UUID, + // JSON-pointer: https://tools.ietf.org/html/rfc6901 + // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A + 'json-pointer': JSON_POINTER, + 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, + // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00 + 'relative-json-pointer': RELATIVE_JSON_POINTER +}; + + +formats.full = { + date: date, + time: time, + 'date-time': date_time, + uri: uri, + 'uri-reference': URIREF, + 'uri-template': URITEMPLATE, + url: URL, + email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, + hostname: hostname, + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, + ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, + regex: regex, + uuid: UUID, + 'json-pointer': JSON_POINTER, + 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, + 'relative-json-pointer': RELATIVE_JSON_POINTER +}; + + +function isLeapYear(year) { + // https://tools.ietf.org/html/rfc3339#appendix-C + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); +} + + +function date(str) { + // full-date from http://tools.ietf.org/html/rfc3339#section-5.6 + var matches = str.match(DATE); + if (!matches) return false; + + var year = +matches[1]; + var month = +matches[2]; + var day = +matches[3]; + + return month >= 1 && month <= 12 && day >= 1 && + day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); +} + + +function time(str, full) { + var matches = str.match(TIME); + if (!matches) return false; + + var hour = matches[1]; + var minute = matches[2]; + var second = matches[3]; + var timeZone = matches[5]; + return ((hour <= 23 && minute <= 59 && second <= 59) || + (hour == 23 && minute == 59 && second == 60)) && + (!full || timeZone); +} + + +var DATE_TIME_SEPARATOR = /t|\s/i; +function date_time(str) { + // http://tools.ietf.org/html/rfc3339#section-5.6 + var dateTime = str.split(DATE_TIME_SEPARATOR); + return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true); +} + + +function hostname(str) { + // https://tools.ietf.org/html/rfc1034#section-3.5 + // https://tools.ietf.org/html/rfc1123#section-2 + return str.length <= 255 && HOSTNAME.test(str); +} + + +var NOT_URI_FRAGMENT = /\/|:/; +function uri(str) { + // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "." + return NOT_URI_FRAGMENT.test(str) && URI.test(str); +} + + +var Z_ANCHOR = /[^\\]\\Z/; +function regex(str) { + if (Z_ANCHOR.test(str)) return false; + try { + new RegExp(str); + return true; + } catch(e) { + return false; + } +} + +},{"./util":10}],5:[function(require,module,exports){ +'use strict'; + +var resolve = require('./resolve') + , util = require('./util') + , errorClasses = require('./error_classes') + , stableStringify = require('fast-json-stable-stringify'); + +var validateGenerator = require('../dotjs/validate'); + +/** + * Functions below are used inside compiled validations function + */ + +var ucs2length = util.ucs2length; +var equal = require('fast-deep-equal'); + +// this error is thrown by async schemas to return validation errors via exception +var ValidationError = errorClasses.Validation; + +module.exports = compile; + + +/** + * Compiles schema to validation function + * @this Ajv + * @param {Object} schema schema object + * @param {Object} root object with information about the root schema for this schema + * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution + * @param {String} baseId base ID for IDs in the schema + * @return {Function} validation function + */ +function compile(schema, root, localRefs, baseId) { + /* jshint validthis: true, evil: true */ + /* eslint no-shadow: 0 */ + var self = this + , opts = this._opts + , refVal = [ undefined ] + , refs = {} + , patterns = [] + , patternsHash = {} + , defaults = [] + , defaultsHash = {} + , customRules = []; + + root = root || { schema: schema, refVal: refVal, refs: refs }; + + var c = checkCompiling.call(this, schema, root, baseId); + var compilation = this._compilations[c.index]; + if (c.compiling) return (compilation.callValidate = callValidate); + + var formats = this._formats; + var RULES = this.RULES; + + try { + var v = localCompile(schema, root, localRefs, baseId); + compilation.validate = v; + var cv = compilation.callValidate; + if (cv) { + cv.schema = v.schema; + cv.errors = null; + cv.refs = v.refs; + cv.refVal = v.refVal; + cv.root = v.root; + cv.$async = v.$async; + if (opts.sourceCode) cv.source = v.source; + } + return v; + } finally { + endCompiling.call(this, schema, root, baseId); + } + + function callValidate() { + var validate = compilation.validate; + var result = validate.apply(null, arguments); + callValidate.errors = validate.errors; + return result; + } + + function localCompile(_schema, _root, localRefs, baseId) { + var isRoot = !_root || (_root && _root.schema == _schema); + if (_root.schema != root.schema) + return compile.call(self, _schema, _root, localRefs, baseId); + + var $async = _schema.$async === true; + + var sourceCode = validateGenerator({ + isTop: true, + schema: _schema, + isRoot: isRoot, + baseId: baseId, + root: _root, + schemaPath: '', + errSchemaPath: '#', + errorPath: '""', + MissingRefError: errorClasses.MissingRef, + RULES: RULES, + validate: validateGenerator, + util: util, + resolve: resolve, + resolveRef: resolveRef, + usePattern: usePattern, + useDefault: useDefault, + useCustomRule: useCustomRule, + opts: opts, + formats: formats, + logger: self.logger, + self: self + }); + + sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode) + + vars(defaults, defaultCode) + vars(customRules, customRuleCode) + + sourceCode; + + if (opts.processCode) sourceCode = opts.processCode(sourceCode); + // console.log('\n\n\n *** \n', JSON.stringify(sourceCode)); + var validate; + try { + var makeValidate = new Function( + 'self', + 'RULES', + 'formats', + 'root', + 'refVal', + 'defaults', + 'customRules', + 'equal', + 'ucs2length', + 'ValidationError', + sourceCode + ); + + validate = makeValidate( + self, + RULES, + formats, + root, + refVal, + defaults, + customRules, + equal, + ucs2length, + ValidationError + ); + + refVal[0] = validate; + } catch(e) { + self.logger.error('Error compiling schema, function code:', sourceCode); + throw e; + } + + validate.schema = _schema; + validate.errors = null; + validate.refs = refs; + validate.refVal = refVal; + validate.root = isRoot ? validate : _root; + if ($async) validate.$async = true; + if (opts.sourceCode === true) { + validate.source = { + code: sourceCode, + patterns: patterns, + defaults: defaults + }; + } + + return validate; + } + + function resolveRef(baseId, ref, isRoot) { + ref = resolve.url(baseId, ref); + var refIndex = refs[ref]; + var _refVal, refCode; + if (refIndex !== undefined) { + _refVal = refVal[refIndex]; + refCode = 'refVal[' + refIndex + ']'; + return resolvedRef(_refVal, refCode); + } + if (!isRoot && root.refs) { + var rootRefId = root.refs[ref]; + if (rootRefId !== undefined) { + _refVal = root.refVal[rootRefId]; + refCode = addLocalRef(ref, _refVal); + return resolvedRef(_refVal, refCode); + } + } + + refCode = addLocalRef(ref); + var v = resolve.call(self, localCompile, root, ref); + if (v === undefined) { + var localSchema = localRefs && localRefs[ref]; + if (localSchema) { + v = resolve.inlineRef(localSchema, opts.inlineRefs) + ? localSchema + : compile.call(self, localSchema, root, localRefs, baseId); + } + } + + if (v === undefined) { + removeLocalRef(ref); + } else { + replaceLocalRef(ref, v); + return resolvedRef(v, refCode); + } + } + + function addLocalRef(ref, v) { + var refId = refVal.length; + refVal[refId] = v; + refs[ref] = refId; + return 'refVal' + refId; + } + + function removeLocalRef(ref) { + delete refs[ref]; + } + + function replaceLocalRef(ref, v) { + var refId = refs[ref]; + refVal[refId] = v; + } + + function resolvedRef(refVal, code) { + return typeof refVal == 'object' || typeof refVal == 'boolean' + ? { code: code, schema: refVal, inline: true } + : { code: code, $async: refVal && !!refVal.$async }; + } + + function usePattern(regexStr) { + var index = patternsHash[regexStr]; + if (index === undefined) { + index = patternsHash[regexStr] = patterns.length; + patterns[index] = regexStr; + } + return 'pattern' + index; + } + + function useDefault(value) { + switch (typeof value) { + case 'boolean': + case 'number': + return '' + value; + case 'string': + return util.toQuotedString(value); + case 'object': + if (value === null) return 'null'; + var valueStr = stableStringify(value); + var index = defaultsHash[valueStr]; + if (index === undefined) { + index = defaultsHash[valueStr] = defaults.length; + defaults[index] = value; + } + return 'default' + index; + } + } + + function useCustomRule(rule, schema, parentSchema, it) { + var validateSchema = rule.definition.validateSchema; + if (validateSchema && self._opts.validateSchema !== false) { + var valid = validateSchema(schema); + if (!valid) { + var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors); + if (self._opts.validateSchema == 'log') self.logger.error(message); + else throw new Error(message); + } + } + + var compile = rule.definition.compile + , inline = rule.definition.inline + , macro = rule.definition.macro; + + var validate; + if (compile) { + validate = compile.call(self, schema, parentSchema, it); + } else if (macro) { + validate = macro.call(self, schema, parentSchema, it); + if (opts.validateSchema !== false) self.validateSchema(validate, true); + } else if (inline) { + validate = inline.call(self, it, rule.keyword, schema, parentSchema); + } else { + validate = rule.definition.validate; + if (!validate) return; + } + + if (validate === undefined) + throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); + + var index = customRules.length; + customRules[index] = validate; + + return { + code: 'customRule' + index, + validate: validate + }; + } +} + + +/** + * Checks if the schema is currently compiled + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean) + */ +function checkCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var index = compIndex.call(this, schema, root, baseId); + if (index >= 0) return { index: index, compiling: true }; + index = this._compilations.length; + this._compilations[index] = { + schema: schema, + root: root, + baseId: baseId + }; + return { index: index, compiling: false }; +} + + +/** + * Removes the schema from the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + */ +function endCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var i = compIndex.call(this, schema, root, baseId); + if (i >= 0) this._compilations.splice(i, 1); +} + + +/** + * Index of schema compilation in the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Integer} compilation index + */ +function compIndex(schema, root, baseId) { + /* jshint validthis: true */ + for (var i=0; i= 0xD800 && value <= 0xDBFF && pos < len) { + // high surrogate, and there is a next character + value = str.charCodeAt(pos); + if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate + } + } + return length; +}; + +},{}],10:[function(require,module,exports){ +'use strict'; + + +module.exports = { + copy: copy, + checkDataType: checkDataType, + checkDataTypes: checkDataTypes, + coerceToTypes: coerceToTypes, + toHash: toHash, + getProperty: getProperty, + escapeQuotes: escapeQuotes, + equal: require('fast-deep-equal'), + ucs2length: require('./ucs2length'), + varOccurences: varOccurences, + varReplace: varReplace, + cleanUpCode: cleanUpCode, + finalCleanUpCode: finalCleanUpCode, + schemaHasRules: schemaHasRules, + schemaHasRulesExcept: schemaHasRulesExcept, + toQuotedString: toQuotedString, + getPathExpr: getPathExpr, + getPath: getPath, + getData: getData, + unescapeFragment: unescapeFragment, + unescapeJsonPointer: unescapeJsonPointer, + escapeFragment: escapeFragment, + escapeJsonPointer: escapeJsonPointer +}; + + +function copy(o, to) { + to = to || {}; + for (var key in o) to[key] = o[key]; + return to; +} + + +function checkDataType(dataType, data, negate) { + var EQUAL = negate ? ' !== ' : ' === ' + , AND = negate ? ' || ' : ' && ' + , OK = negate ? '!' : '' + , NOT = negate ? '' : '!'; + switch (dataType) { + case 'null': return data + EQUAL + 'null'; + case 'array': return OK + 'Array.isArray(' + data + ')'; + case 'object': return '(' + OK + data + AND + + 'typeof ' + data + EQUAL + '"object"' + AND + + NOT + 'Array.isArray(' + data + '))'; + case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND + + NOT + '(' + data + ' % 1)' + + AND + data + EQUAL + data + ')'; + default: return 'typeof ' + data + EQUAL + '"' + dataType + '"'; + } +} + + +function checkDataTypes(dataTypes, data) { + switch (dataTypes.length) { + case 1: return checkDataType(dataTypes[0], data, true); + default: + var code = ''; + var types = toHash(dataTypes); + if (types.array && types.object) { + code = types.null ? '(': '(!' + data + ' || '; + code += 'typeof ' + data + ' !== "object")'; + delete types.null; + delete types.array; + delete types.object; + } + if (types.number) delete types.integer; + for (var t in types) + code += (code ? ' && ' : '' ) + checkDataType(t, data, true); + + return code; + } +} + + +var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]); +function coerceToTypes(optionCoerceTypes, dataTypes) { + if (Array.isArray(dataTypes)) { + var types = []; + for (var i=0; i= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl); + return paths[lvl - up]; + } + + if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl); + data = 'data' + ((lvl - up) || ''); + if (!jsonPointer) return data; + } + + var expr = data; + var segments = jsonPointer.split('/'); + for (var i=0; i', + $notOp = $isMax ? '>' : '<', + $errorKeyword = undefined; + if ($isDataExcl) { + var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), + $exclusive = 'exclusive' + $lvl, + $exclType = 'exclType' + $lvl, + $exclIsNumber = 'exclIsNumber' + $lvl, + $opExpr = 'op' + $lvl, + $opStr = '\' + ' + $opExpr + ' + \''; + out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; + $schemaValueExcl = 'schemaExcl' + $lvl; + out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { '; + var $errorKeyword = $exclusiveKeyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';'; + } else { + var $exclIsNumber = typeof $schemaExcl == 'number', + $opStr = $op; + if ($exclIsNumber && $isData) { + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { '; + } else { + if ($exclIsNumber && $schema === undefined) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaExcl; + $notOp += '='; + } else { + if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); + if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $notOp += '='; + } else { + $exclusive = false; + $opStr += '='; + } + } + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { '; + } + } + $errorKeyword = $errorKeyword || $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be ' + ($opStr) + ' '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],13:[function(require,module,exports){ +'use strict'; +module.exports = function generate__limitItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxItems' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxItems') { + out += 'more'; + } else { + out += 'less'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],14:[function(require,module,exports){ +'use strict'; +module.exports = function generate__limitLength(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxLength' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + if (it.opts.unicode === false) { + out += ' ' + ($data) + '.length '; + } else { + out += ' ucs2length(' + ($data) + ') '; + } + out += ' ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be '; + if ($keyword == 'maxLength') { + out += 'longer'; + } else { + out += 'shorter'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' characters\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],15:[function(require,module,exports){ +'use strict'; +module.exports = function generate__limitProperties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxProperties' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxProperties') { + out += 'more'; + } else { + out += 'less'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' properties\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],16:[function(require,module,exports){ +'use strict'; +module.exports = function generate_allOf(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $currentBaseId = $it.baseId, + $allSchemasEmpty = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + $allSchemasEmpty = false; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($breakOnError) { + if ($allSchemasEmpty) { + out += ' if (true) { '; + } else { + out += ' ' + ($closingBraces.slice(0, -1)) + ' '; + } + } + out = it.util.cleanUpCode(out); + return out; +} + +},{}],17:[function(require,module,exports){ +'use strict'; +module.exports = function generate_anyOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $noEmptySchema = $schema.every(function($sch) { + return it.util.schemaHasRules($sch, it.RULES.all); + }); + if ($noEmptySchema) { + var $currentBaseId = $it.baseId; + out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { '; + $closingBraces += '}'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should match some schema in anyOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + out = it.util.cleanUpCode(out); + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} + +},{}],18:[function(require,module,exports){ +'use strict'; +module.exports = function generate_comment(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $comment = it.util.toQuotedString($schema); + if (it.opts.$comment === true) { + out += ' console.log(' + ($comment) + ');'; + } else if (typeof it.opts.$comment == 'function') { + out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);'; + } + return out; +} + +},{}],19:[function(require,module,exports){ +'use strict'; +module.exports = function generate_const(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!$isData) { + out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';'; + } + out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be equal to constant\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],20:[function(require,module,exports){ +'use strict'; +module.exports = function generate_contains(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId, + $nonEmptySchema = it.util.schemaHasRules($schema, it.RULES.all); + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($nonEmptySchema) { + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (' + ($nextValid) + ') break; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {'; + } else { + out += ' if (' + ($data) + '.length == 0) {'; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should contain a valid item\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + if ($nonEmptySchema) { + out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + } + if (it.opts.allErrors) { + out += ' } '; + } + out = it.util.cleanUpCode(out); + return out; +} + +},{}],21:[function(require,module,exports){ +'use strict'; +module.exports = function generate_custom(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $rule = this, + $definition = 'definition' + $lvl, + $rDef = $rule.definition, + $closingBraces = ''; + var $compile, $inline, $macro, $ruleValidate, $validateCode; + if ($isData && $rDef.$data) { + $validateCode = 'keywordValidate' + $lvl; + var $validateSchema = $rDef.validateSchema; + out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;'; + } else { + $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); + if (!$ruleValidate) return; + $schemaValue = 'validate.schema' + $schemaPath; + $validateCode = $ruleValidate.code; + $compile = $rDef.compile; + $inline = $rDef.inline; + $macro = $rDef.macro; + } + var $ruleErrs = $validateCode + '.errors', + $i = 'i' + $lvl, + $ruleErr = 'ruleErr' + $lvl, + $asyncKeyword = $rDef.async; + if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema'); + if (!($inline || $macro)) { + out += '' + ($ruleErrs) + ' = null;'; + } + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($isData && $rDef.$data) { + $closingBraces += '}'; + out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { '; + if ($validateSchema) { + $closingBraces += '}'; + out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { '; + } + } + if ($inline) { + if ($rDef.statements) { + out += ' ' + ($ruleValidate.validate) + ' '; + } else { + out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; '; + } + } else if ($macro) { + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + $it.schema = $ruleValidate.validate; + $it.schemaPath = ''; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($code); + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + out += ' ' + ($validateCode) + '.call( '; + if (it.opts.passContext) { + out += 'this'; + } else { + out += 'self'; + } + if ($compile || $rDef.schema === false) { + out += ' , ' + ($data) + ' '; + } else { + out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' '; + } + out += ' , (dataPath || \'\')'; + if (it.errorPath != '""') { + out += ' + ' + (it.errorPath); + } + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) '; + var def_callRuleValidate = out; + out = $$outStack.pop(); + if ($rDef.errors === false) { + out += ' ' + ($valid) + ' = '; + if ($asyncKeyword) { + out += 'await '; + } + out += '' + (def_callRuleValidate) + '; '; + } else { + if ($asyncKeyword) { + $ruleErrs = 'customErrors' + $lvl; + out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = await ' + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } '; + } else { + out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; '; + } + } + } + if ($rDef.modifying) { + out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];'; + } + out += '' + ($closingBraces); + if ($rDef.valid) { + if ($breakOnError) { + out += ' if (true) { '; + } + } else { + out += ' if ( '; + if ($rDef.valid === undefined) { + out += ' !'; + if ($macro) { + out += '' + ($nextValid); + } else { + out += '' + ($valid); + } + } else { + out += ' ' + (!$rDef.valid) + ' '; + } + out += ') { '; + $errorKeyword = $rule.keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + var def_customError = out; + out = $$outStack.pop(); + if ($inline) { + if ($rDef.errors) { + if ($rDef.errors != 'full') { + out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '= 0) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } else { + throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); + } + } + var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate; + var $formatType = $isObject && $format.type || 'string'; + if ($isObject) { + var $async = $format.async === true; + $format = $format.validate; + } + if ($formatType != $ruleType) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } + if ($async) { + if (!it.async) throw new Error('async format in sync schema'); + var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; + out += ' if (!(await ' + ($formatRef) + '(' + ($data) + '))) { '; + } else { + out += ' if (! '; + var $formatRef = 'formats' + it.util.getProperty($schema); + if ($isObject) $formatRef += '.validate'; + if (typeof $format == 'function') { + out += ' ' + ($formatRef) + '(' + ($data) + ') '; + } else { + out += ' ' + ($formatRef) + '.test(' + ($data) + ') '; + } + out += ') { '; + } + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match format "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],25:[function(require,module,exports){ +'use strict'; +module.exports = function generate_if(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + var $thenSch = it.schema['then'], + $elseSch = it.schema['else'], + $thenPresent = $thenSch !== undefined && it.util.schemaHasRules($thenSch, it.RULES.all), + $elsePresent = $elseSch !== undefined && it.util.schemaHasRules($elseSch, it.RULES.all), + $currentBaseId = $it.baseId; + if ($thenPresent || $elsePresent) { + var $ifClause; + $it.createErrors = false; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = true; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + $it.createErrors = true; + out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + if ($thenPresent) { + out += ' if (' + ($nextValid) + ') { '; + $it.schema = it.schema['then']; + $it.schemaPath = it.schemaPath + '.then'; + $it.errSchemaPath = it.errSchemaPath + '/then'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; + if ($thenPresent && $elsePresent) { + $ifClause = 'ifClause' + $lvl; + out += ' var ' + ($ifClause) + ' = \'then\'; '; + } else { + $ifClause = '\'then\''; + } + out += ' } '; + if ($elsePresent) { + out += ' else { '; + } + } else { + out += ' if (!' + ($nextValid) + ') { '; + } + if ($elsePresent) { + $it.schema = it.schema['else']; + $it.schemaPath = it.schemaPath + '.else'; + $it.errSchemaPath = it.errSchemaPath + '/else'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; + if ($thenPresent && $elsePresent) { + $ifClause = 'ifClause' + $lvl; + out += ' var ' + ($ifClause) + ' = \'else\'; '; + } else { + $ifClause = '\'else\''; + } + out += ' } '; + } + out += ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('if') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { failingKeyword: ' + ($ifClause) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match "\' + ' + ($ifClause) + ' + \'" schema\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + out = it.util.cleanUpCode(out); + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} + +},{}],26:[function(require,module,exports){ +'use strict'; + +//all requires must be explicit because browserify won't work with dynamic requires +module.exports = { + '$ref': require('./ref'), + allOf: require('./allOf'), + anyOf: require('./anyOf'), + '$comment': require('./comment'), + const: require('./const'), + contains: require('./contains'), + dependencies: require('./dependencies'), + 'enum': require('./enum'), + format: require('./format'), + 'if': require('./if'), + items: require('./items'), + maximum: require('./_limit'), + minimum: require('./_limit'), + maxItems: require('./_limitItems'), + minItems: require('./_limitItems'), + maxLength: require('./_limitLength'), + minLength: require('./_limitLength'), + maxProperties: require('./_limitProperties'), + minProperties: require('./_limitProperties'), + multipleOf: require('./multipleOf'), + not: require('./not'), + oneOf: require('./oneOf'), + pattern: require('./pattern'), + properties: require('./properties'), + propertyNames: require('./propertyNames'), + required: require('./required'), + uniqueItems: require('./uniqueItems'), + validate: require('./validate') +}; + +},{"./_limit":12,"./_limitItems":13,"./_limitLength":14,"./_limitProperties":15,"./allOf":16,"./anyOf":17,"./comment":18,"./const":19,"./contains":20,"./dependencies":22,"./enum":23,"./format":24,"./if":25,"./items":27,"./multipleOf":28,"./not":29,"./oneOf":30,"./pattern":31,"./properties":32,"./propertyNames":33,"./ref":34,"./required":35,"./uniqueItems":36,"./validate":37}],27:[function(require,module,exports){ +'use strict'; +module.exports = function generate_items(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId; + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if (Array.isArray($schema)) { + var $additionalItems = it.schema.additionalItems; + if ($additionalItems === false) { + out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + $closingBraces += '}'; + out += ' else { '; + } + } + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { '; + var $passData = $data + '[' + $i + ']'; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); + $it.dataPathArr[$dataNxt] = $i; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if (typeof $additionalItems == 'object' && it.util.schemaHasRules($additionalItems, it.RULES.all)) { + $it.schema = $additionalItems; + $it.schemaPath = it.schemaPath + '.additionalItems'; + $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } else if (it.util.schemaHasRules($schema, it.RULES.all)) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' }'; + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + out = it.util.cleanUpCode(out); + return out; +} + +},{}],28:[function(require,module,exports){ +'use strict'; +module.exports = function generate_multipleOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + out += 'var division' + ($lvl) + ';if ('; + if ($isData) { + out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || '; + } + out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', '; + if (it.opts.multipleOfPrecision) { + out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' '; + } else { + out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') '; + } + out += ' ) '; + if ($isData) { + out += ' ) '; + } + out += ' ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be multiple of '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],29:[function(require,module,exports){ +'use strict'; +module.exports = function generate_not(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + if (it.util.schemaHasRules($schema, it.RULES.all)) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.createErrors = false; + var $allErrorsOption; + if ($it.opts.allErrors) { + $allErrorsOption = $it.opts.allErrors; + $it.opts.allErrors = false; + } + out += ' ' + (it.validate($it)) + ' '; + $it.createErrors = true; + if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (' + ($nextValid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + } else { + out += ' var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if ($breakOnError) { + out += ' if (false) { '; + } + } + return out; +} + +},{}],30:[function(require,module,exports){ +'use strict'; +module.exports = function generate_oneOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $currentBaseId = $it.baseId, + $prevValid = 'prevValid' + $lvl, + $passingSchemas = 'passingSchemas' + $lvl; + out += 'var ' + ($errs) + ' = errors , ' + ($prevValid) + ' = false , ' + ($valid) + ' = false , ' + ($passingSchemas) + ' = null; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + } else { + out += ' var ' + ($nextValid) + ' = true; '; + } + if ($i) { + out += ' if (' + ($nextValid) + ' && ' + ($prevValid) + ') { ' + ($valid) + ' = false; ' + ($passingSchemas) + ' = [' + ($passingSchemas) + ', ' + ($i) + ']; } else { '; + $closingBraces += '}'; + } + out += ' if (' + ($nextValid) + ') { ' + ($valid) + ' = ' + ($prevValid) + ' = true; ' + ($passingSchemas) + ' = ' + ($i) + '; }'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { passingSchemas: ' + ($passingSchemas) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match exactly one schema in oneOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }'; + if (it.opts.allErrors) { + out += ' } '; + } + return out; +} + +},{}],31:[function(require,module,exports){ +'use strict'; +module.exports = function generate_pattern(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema); + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match pattern "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],32:[function(require,module,exports){ +'use strict'; +module.exports = function generate_properties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl; + var $schemaKeys = Object.keys($schema || {}), + $pProperties = it.schema.patternProperties || {}, + $pPropertyKeys = Object.keys($pProperties), + $aProperties = it.schema.additionalProperties, + $someProperties = $schemaKeys.length || $pPropertyKeys.length, + $noAdditional = $aProperties === false, + $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length, + $removeAdditional = it.opts.removeAdditional, + $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + var $required = it.schema.required; + if ($required && !(it.opts.v5 && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required); + out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined;'; + } + if ($checkAdditional) { + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + if ($someProperties) { + out += ' var isAdditional' + ($lvl) + ' = !(false '; + if ($schemaKeys.length) { + if ($schemaKeys.length > 5) { + out += ' || validate.schema' + ($schemaPath) + '[' + ($key) + '] '; + } else { + var arr1 = $schemaKeys; + if (arr1) { + var $propertyKey, i1 = -1, + l1 = arr1.length - 1; + while (i1 < l1) { + $propertyKey = arr1[i1 += 1]; + out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' '; + } + } + } + } + if ($pPropertyKeys.length) { + var arr2 = $pPropertyKeys; + if (arr2) { + var $pProperty, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $pProperty = arr2[$i += 1]; + out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') '; + } + } + } + out += ' ); if (isAdditional' + ($lvl) + ') { '; + } + if ($removeAdditional == 'all') { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + var $currentErrorPath = it.errorPath; + var $additionalProperty = '\' + ' + $key + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + } + if ($noAdditional) { + if ($removeAdditional) { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + out += ' ' + ($nextValid) + ' = false; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalProperties'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is an invalid additional property'; + } else { + out += 'should NOT have additional properties'; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + out += ' break; '; + } + } + } else if ($additionalIsSchema) { + if ($removeAdditional == 'failing') { + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + } else { + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + } + } + it.errorPath = $currentErrorPath; + } + if ($someProperties) { + out += ' } '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + var $useDefaults = it.opts.useDefaults && !it.compositeRule; + if ($schemaKeys.length) { + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + var $prop = it.util.getProperty($propertyKey), + $passData = $data + $prop, + $hasDefault = $useDefaults && $sch.default !== undefined; + $it.schema = $sch; + $it.schemaPath = $schemaPath + $prop; + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); + $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); + $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + $code = it.util.varReplace($code, $nextData, $passData); + var $useData = $passData; + } else { + var $useData = $nextData; + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; '; + } + if ($hasDefault) { + out += ' ' + ($code) + ' '; + } else { + if ($requiredHash && $requiredHash[$propertyKey]) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = false; '; + var $currentErrorPath = it.errorPath, + $currErrSchemaPath = $errSchemaPath, + $missingProperty = it.util.escapeQuotes($propertyKey); + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + $errSchemaPath = it.errSchemaPath + '/required'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + it.errorPath = $currentErrorPath; + out += ' } else { '; + } else { + if ($breakOnError) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = true; } else { '; + } else { + out += ' if (' + ($useData) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ' ) { '; + } + } + out += ' ' + ($code) + ' } '; + } + } + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($pPropertyKeys.length) { + var arr4 = $pPropertyKeys; + if (arr4) { + var $pProperty, i4 = -1, + l4 = arr4.length - 1; + while (i4 < l4) { + $pProperty = arr4[i4 += 1]; + var $sch = $pProperties[$pProperty]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + $it.schema = $sch; + $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); + $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else ' + ($nextValid) + ' = true; '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + out = it.util.cleanUpCode(out); + return out; +} + +},{}],33:[function(require,module,exports){ +'use strict'; +module.exports = function generate_propertyNames(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + if (it.util.schemaHasRules($schema, it.RULES.all)) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $i = 'i' + $lvl, + $invalidName = '\' + ' + $key + ' + \'', + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + out += ' var ' + ($errs) + ' = errors; '; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined; '; + } + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' var startErrs' + ($lvl) + ' = errors; '; + var $passData = $key; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + '= it.opts.loopRequired, + $ownProperties = it.opts.ownProperties; + if ($breakOnError) { + out += ' var missing' + ($lvl) + '; '; + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + out += ' var ' + ($valid) + ' = true; '; + if ($isData) { + out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; + } + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += '; if (!' + ($valid) + ') break; } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + } else { + out += ' if ( '; + var arr2 = $required; + if (arr2) { + var $propertyKey, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $propertyKey = arr2[$i += 1]; + if ($i) { + out += ' || '; + } + var $prop = it.util.getProperty($propertyKey), + $useData = $data + $prop; + out += ' ( ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; + } + } + out += ') { '; + var $propertyPath = 'missing' + $lvl, + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + } + } else { + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + if ($isData) { + out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { '; + } + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } '; + if ($isData) { + out += ' } '; + } + } else { + var arr3 = $required; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $prop = it.util.getProperty($propertyKey), + $missingProperty = it.util.escapeQuotes($propertyKey), + $useData = $data + $prop; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; + } + } + } + } + it.errorPath = $currentErrorPath; + } else if ($breakOnError) { + out += ' if (true) {'; + } + return out; +} + +},{}],36:[function(require,module,exports){ +'use strict'; +module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (($schema || $isData) && it.opts.uniqueItems !== false) { + if ($isData) { + out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { '; + } + out += ' var i = ' + ($data) + '.length , ' + ($valid) + ' = true , j; if (i > 1) { '; + var $itemType = it.schema.items && it.schema.items.type; + if (!$itemType || $itemType == 'object' || $itemType == 'array') { + out += ' outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } '; + } else { + out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; if (typeof item != \'' + ($itemType) + '\') continue; if (itemIndices[item] !== undefined) { ' + ($valid) + ' = false; j = itemIndices[item]; break; } itemIndices[item] = i; } '; + } + out += ' } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} + +},{}],37:[function(require,module,exports){ +'use strict'; +module.exports = function generate_validate(it, $keyword, $ruleType) { + var out = ''; + var $async = it.schema.$async === true, + $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'), + $id = it.self._getId(it.schema); + if (it.isTop) { + out += ' var validate = '; + if ($async) { + it.async = true; + out += 'async '; + } + out += 'function(data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; '; + if ($id && (it.opts.sourceCode || it.opts.processCode)) { + out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' '; + } + } + if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) { + var $keyword = 'false schema'; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + if (it.schema === false) { + if (it.isTop) { + $breakOnError = true; + } else { + out += ' var ' + ($valid) + ' = false; '; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'boolean schema is false\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } else { + if (it.isTop) { + if ($async) { + out += ' return data; '; + } else { + out += ' validate.errors = null; return true; '; + } + } else { + out += ' var ' + ($valid) + ' = true; '; + } + } + if (it.isTop) { + out += ' }; return validate; '; + } + return out; + } + if (it.isTop) { + var $top = it.isTop, + $lvl = it.level = 0, + $dataLvl = it.dataLevel = 0, + $data = 'data'; + it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); + it.baseId = it.baseId || it.rootId; + delete it.isTop; + it.dataPathArr = [undefined]; + out += ' var vErrors = null; '; + out += ' var errors = 0; '; + out += ' if (rootData === undefined) rootData = data; '; + } else { + var $lvl = it.level, + $dataLvl = it.dataLevel, + $data = 'data' + ($dataLvl || ''); + if ($id) it.baseId = it.resolve.url(it.baseId, $id); + if ($async && !it.async) throw new Error('async schema in sync schema'); + out += ' var errs_' + ($lvl) + ' = errors;'; + } + var $valid = 'valid' + $lvl, + $breakOnError = !it.opts.allErrors, + $closingBraces1 = '', + $closingBraces2 = ''; + var $errorKeyword; + var $typeSchema = it.schema.type, + $typeIsArray = Array.isArray($typeSchema); + if ($typeIsArray && $typeSchema.length == 1) { + $typeSchema = $typeSchema[0]; + $typeIsArray = false; + } + if (it.schema.$ref && $refKeywords) { + if (it.opts.extendRefs == 'fail') { + throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); + } else if (it.opts.extendRefs !== true) { + $refKeywords = false; + it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); + } + } + if (it.schema.$comment && it.opts.$comment) { + out += ' ' + (it.RULES.all.$comment.code(it, '$comment')); + } + if ($typeSchema) { + if (it.opts.coerceTypes) { + var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); + } + var $rulesGroup = it.RULES.types[$typeSchema]; + if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) { + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type', + $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; + out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { '; + if ($coerceToTypes) { + var $dataType = 'dataType' + $lvl, + $coerced = 'coerced' + $lvl; + out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; '; + if (it.opts.coerceTypes == 'array') { + out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ')) ' + ($dataType) + ' = \'array\'; '; + } + out += ' var ' + ($coerced) + ' = undefined; '; + var $bracesCoercion = ''; + var arr1 = $coerceToTypes; + if (arr1) { + var $type, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $type = arr1[$i += 1]; + if ($i) { + out += ' if (' + ($coerced) + ' === undefined) { '; + $bracesCoercion += '}'; + } + if (it.opts.coerceTypes == 'array' && $type != 'array') { + out += ' if (' + ($dataType) + ' == \'array\' && ' + ($data) + '.length == 1) { ' + ($coerced) + ' = ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; } '; + } + if ($type == 'string') { + out += ' if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; + } else if ($type == 'number' || $type == 'integer') { + out += ' if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; + if ($type == 'integer') { + out += ' && !(' + ($data) + ' % 1)'; + } + out += ')) ' + ($coerced) + ' = +' + ($data) + '; '; + } else if ($type == 'boolean') { + out += ' if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; + } else if ($type == 'null') { + out += ' if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; + } else if (it.opts.coerceTypes == 'array' && $type == 'array') { + out += ' if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; + } + } + } + out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' ' + ($data) + ' = ' + ($coerced) + '; '; + if (!$dataLvl) { + out += 'if (' + ($parentData) + ' !== undefined)'; + } + out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } '; + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } + out += ' } '; + } + } + if (it.schema.$ref && !$refKeywords) { + out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' '; + if ($breakOnError) { + out += ' } if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } else { + var arr2 = it.RULES; + if (arr2) { + var $rulesGroup, i2 = -1, + l2 = arr2.length - 1; + while (i2 < l2) { + $rulesGroup = arr2[i2 += 1]; + if ($shouldUseGroup($rulesGroup)) { + if ($rulesGroup.type) { + out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data)) + ') { '; + } + if (it.opts.useDefaults && !it.compositeRule) { + if ($rulesGroup.type == 'object' && it.schema.properties) { + var $schema = it.schema.properties, + $schemaKeys = Object.keys($schema); + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if ($sch.default !== undefined) { + var $passData = $data + it.util.getProperty($propertyKey); + out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) { + var arr4 = it.schema.items; + if (arr4) { + var $sch, $i = -1, + l4 = arr4.length - 1; + while ($i < l4) { + $sch = arr4[$i += 1]; + if ($sch.default !== undefined) { + var $passData = $data + '[' + $i + ']'; + out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } + } + var arr5 = $rulesGroup.rules; + if (arr5) { + var $rule, i5 = -1, + l5 = arr5.length - 1; + while (i5 < l5) { + $rule = arr5[i5 += 1]; + if ($shouldUseRule($rule)) { + var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); + if ($code) { + out += ' ' + ($code) + ' '; + if ($breakOnError) { + $closingBraces1 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces1) + ' '; + $closingBraces1 = ''; + } + if ($rulesGroup.type) { + out += ' } '; + if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { + out += ' else { '; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + } + } + if ($breakOnError) { + out += ' if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces2) + ' '; + } + if ($top) { + if ($async) { + out += ' if (errors === 0) return data; '; + out += ' else throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; '; + out += ' return errors === 0; '; + } + out += ' }; return validate;'; + } else { + out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';'; + } + out = it.util.cleanUpCode(out); + if ($top) { + out = it.util.finalCleanUpCode(out, $async); + } + + function $shouldUseGroup($rulesGroup) { + var rules = $rulesGroup.rules; + for (var i = 0; i < rules.length; i++) + if ($shouldUseRule(rules[i])) return true; + } + + function $shouldUseRule($rule) { + return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule)); + } + + function $ruleImplementsSomeKeyword($rule) { + var impl = $rule.implements; + for (var i = 0; i < impl.length; i++) + if (it.schema[impl[i]] !== undefined) return true; + } + return out; +} + +},{}],38:[function(require,module,exports){ +'use strict'; + +var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; +var customRuleCode = require('./dotjs/custom'); + +module.exports = { + add: addKeyword, + get: getKeyword, + remove: removeKeyword +}; + +/** + * Define custom keyword + * @this Ajv + * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords). + * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`. + * @return {Ajv} this for method chaining + */ +function addKeyword(keyword, definition) { + /* jshint validthis: true */ + /* eslint no-shadow: 0 */ + var RULES = this.RULES; + + if (RULES.keywords[keyword]) + throw new Error('Keyword ' + keyword + ' is already defined'); + + if (!IDENTIFIER.test(keyword)) + throw new Error('Keyword ' + keyword + ' is not a valid identifier'); + + if (definition) { + if (definition.macro && definition.valid !== undefined) + throw new Error('"valid" option cannot be used with macro keywords'); + + var dataType = definition.type; + if (Array.isArray(dataType)) { + var i, len = dataType.length; + for (i=0; i= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' + }, + + /** Convenience shortcuts */ + baseMinusTMin = base - tMin, + floor = Math.floor, + stringFromCharCode = String.fromCharCode, + + /** Temporary variable */ + key; + + /*--------------------------------------------------------------------------*/ + + /** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ + function error(type) { + throw new RangeError(errors[type]); + } + + /** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ + function map(array, fn) { + var length = array.length; + var result = []; + while (length--) { + result[length] = fn(array[length]); + } + return result; + } + + /** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {Array} A new string of characters returned by the callback + * function. + */ + function mapDomain(string, fn) { + var parts = string.split('@'); + var result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + string = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + string = string.replace(regexSeparators, '\x2E'); + var labels = string.split('.'); + var encoded = map(labels, fn).join('.'); + return result + encoded; + } + + /** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ + function ucs2decode(string) { + var output = [], + counter = 0, + length = string.length, + value, + extra; + while (counter < length) { + value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // high surrogate, and there is a next character + extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // low surrogate + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // unmatched surrogate; only append this code unit, in case the next + // code unit is the high surrogate of a surrogate pair + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; + } + + /** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ + function ucs2encode(array) { + return map(array, function(value) { + var output = ''; + if (value > 0xFFFF) { + value -= 0x10000; + output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); + value = 0xDC00 | value & 0x3FF; + } + output += stringFromCharCode(value); + return output; + }).join(''); + } + + /** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ + function basicToDigit(codePoint) { + if (codePoint - 48 < 10) { + return codePoint - 22; + } + if (codePoint - 65 < 26) { + return codePoint - 65; + } + if (codePoint - 97 < 26) { + return codePoint - 97; + } + return base; + } + + /** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ + function digitToBasic(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); + } + + /** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ + function adapt(delta, numPoints, firstTime) { + var k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); + } + + /** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ + function decode(input) { + // Don't use UCS-2 + var output = [], + inputLength = input.length, + out, + i = 0, + n = initialN, + bias = initialBias, + basic, + j, + index, + oldi, + w, + k, + digit, + t, + /** Cached calculation results */ + baseMinusT; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + + for (j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { + + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + for (oldi = i, w = 1, k = base; /* no condition */; k += base) { + + if (index >= inputLength) { + error('invalid-input'); + } + + digit = basicToDigit(input.charCodeAt(index++)); + + if (digit >= base || digit > floor((maxInt - i) / w)) { + error('overflow'); + } + + i += digit * w; + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + + if (digit < t) { + break; + } + + baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error('overflow'); + } + + w *= baseMinusT; + + } + + out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error('overflow'); + } + + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output + output.splice(i++, 0, n); + + } + + return ucs2encode(output); + } + + /** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ + function encode(input) { + var n, + delta, + handledCPCount, + basicLength, + bias, + j, + m, + q, + k, + t, + currentValue, + output = [], + /** `inputLength` will hold the number of code points in `input`. */ + inputLength, + /** Cached calculation results */ + handledCPCountPlusOne, + baseMinusT, + qMinusT; + + // Convert the input in UCS-2 to Unicode + input = ucs2decode(input); + + // Cache the length + inputLength = input.length; + + // Initialize the state + n = initialN; + delta = 0; + bias = initialBias; + + // Handle the basic code points + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue < 0x80) { + output.push(stringFromCharCode(currentValue)); + } + } + + handledCPCount = basicLength = output.length; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string - if it is not empty - with a delimiter + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + for (m = maxInt, j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow + handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + + if (currentValue < n && ++delta > maxInt) { + error('overflow'); + } + + if (currentValue == n) { + // Represent delta as a generalized variable-length integer + for (q = delta, k = base; /* no condition */; k += base) { + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + if (q < t) { + break; + } + qMinusT = q - t; + baseMinusT = base - t; + output.push( + stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) + ); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + + ++delta; + ++n; + + } + return output.join(''); + } + + /** + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ + function toUnicode(input) { + return mapDomain(input, function(string) { + return regexPunycode.test(string) + ? decode(string.slice(4).toLowerCase()) + : string; + }); + } + + /** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ + function toASCII(input) { + return mapDomain(input, function(string) { + return regexNonASCII.test(string) + ? 'xn--' + encode(string) + : string; + }); + } + + /*--------------------------------------------------------------------------*/ + + /** Define the public API */ + punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '1.4.1', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode + }; + + /** Expose `punycode` */ + // Some AMD build optimizers, like r.js, check for specific condition patterns + // like the following: + if ( + typeof define == 'function' && + typeof define.amd == 'object' && + define.amd + ) { + define('punycode', function() { + return punycode; + }); + } else if (freeExports && freeModule) { + if (module.exports == freeExports) { + // in Node.js, io.js, or RingoJS v0.8.0+ + freeModule.exports = punycode; + } else { + // in Narwhal or RingoJS v0.7.0- + for (key in punycode) { + punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); + } + } + } else { + // in Rhino or a web browser + root.punycode = punycode; + } + +}(this)); + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],45:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +// If obj.hasOwnProperty has been overridden, then calling +// obj.hasOwnProperty(prop) will break. +// See: https://github.com/joyent/node/issues/1707 +function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} + +module.exports = function(qs, sep, eq, options) { + sep = sep || '&'; + eq = eq || '='; + var obj = {}; + + if (typeof qs !== 'string' || qs.length === 0) { + return obj; + } + + var regexp = /\+/g; + qs = qs.split(sep); + + var maxKeys = 1000; + if (options && typeof options.maxKeys === 'number') { + maxKeys = options.maxKeys; + } + + var len = qs.length; + // maxKeys <= 0 means that we should not limit keys count + if (maxKeys > 0 && len > maxKeys) { + len = maxKeys; + } + + for (var i = 0; i < len; ++i) { + var x = qs[i].replace(regexp, '%20'), + idx = x.indexOf(eq), + kstr, vstr, k, v; + + if (idx >= 0) { + kstr = x.substr(0, idx); + vstr = x.substr(idx + 1); + } else { + kstr = x; + vstr = ''; + } + + k = decodeURIComponent(kstr); + v = decodeURIComponent(vstr); + + if (!hasOwnProperty(obj, k)) { + obj[k] = v; + } else if (isArray(obj[k])) { + obj[k].push(v); + } else { + obj[k] = [obj[k], v]; + } + } + + return obj; +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + +},{}],46:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +var stringifyPrimitive = function(v) { + switch (typeof v) { + case 'string': + return v; + + case 'boolean': + return v ? 'true' : 'false'; + + case 'number': + return isFinite(v) ? v : ''; + + default: + return ''; + } +}; + +module.exports = function(obj, sep, eq, name) { + sep = sep || '&'; + eq = eq || '='; + if (obj === null) { + obj = undefined; + } + + if (typeof obj === 'object') { + return map(objectKeys(obj), function(k) { + var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; + if (isArray(obj[k])) { + return map(obj[k], function(v) { + return ks + encodeURIComponent(stringifyPrimitive(v)); + }).join(sep); + } else { + return ks + encodeURIComponent(stringifyPrimitive(obj[k])); + } + }).join(sep); + + } + + if (!name) return ''; + return encodeURIComponent(stringifyPrimitive(name)) + eq + + encodeURIComponent(stringifyPrimitive(obj)); +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + +function map (xs, f) { + if (xs.map) return xs.map(f); + var res = []; + for (var i = 0; i < xs.length; i++) { + res.push(f(xs[i], i)); + } + return res; +} + +var objectKeys = Object.keys || function (obj) { + var res = []; + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key); + } + return res; +}; + +},{}],47:[function(require,module,exports){ +'use strict'; + +exports.decode = exports.parse = require('./decode'); +exports.encode = exports.stringify = require('./encode'); + +},{"./decode":45,"./encode":46}],48:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +var punycode = require('punycode'); +var util = require('./util'); + +exports.parse = urlParse; +exports.resolve = urlResolve; +exports.resolveObject = urlResolveObject; +exports.format = urlFormat; + +exports.Url = Url; + +function Url() { + this.protocol = null; + this.slashes = null; + this.auth = null; + this.host = null; + this.port = null; + this.hostname = null; + this.hash = null; + this.search = null; + this.query = null; + this.pathname = null; + this.path = null; + this.href = null; +} + +// Reference: RFC 3986, RFC 1808, RFC 2396 + +// define these here so at least they only have to be +// compiled once on the first module load. +var protocolPattern = /^([a-z0-9.+-]+:)/i, + portPattern = /:[0-9]*$/, + + // Special case for a simple path URL + simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, + + // RFC 2396: characters reserved for delimiting URLs. + // We actually just auto-escape these. + delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'], + + // RFC 2396: characters not allowed for various reasons. + unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims), + + // Allowed by RFCs, but cause of XSS attacks. Always escape these. + autoEscape = ['\''].concat(unwise), + // Characters that are never ever allowed in a hostname. + // Note that any invalid chars are also handled, but these + // are the ones that are *expected* to be seen, so we fast-path + // them. + nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape), + hostEndingChars = ['/', '?', '#'], + hostnameMaxLen = 255, + hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/, + hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, + // protocols that can allow "unsafe" and "unwise" chars. + unsafeProtocol = { + 'javascript': true, + 'javascript:': true + }, + // protocols that never have a hostname. + hostlessProtocol = { + 'javascript': true, + 'javascript:': true + }, + // protocols that always contain a // bit. + slashedProtocol = { + 'http': true, + 'https': true, + 'ftp': true, + 'gopher': true, + 'file': true, + 'http:': true, + 'https:': true, + 'ftp:': true, + 'gopher:': true, + 'file:': true + }, + querystring = require('querystring'); + +function urlParse(url, parseQueryString, slashesDenoteHost) { + if (url && util.isObject(url) && url instanceof Url) return url; + + var u = new Url; + u.parse(url, parseQueryString, slashesDenoteHost); + return u; +} + +Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) { + if (!util.isString(url)) { + throw new TypeError("Parameter 'url' must be a string, not " + typeof url); + } + + // Copy chrome, IE, opera backslash-handling behavior. + // Back slashes before the query string get converted to forward slashes + // See: https://code.google.com/p/chromium/issues/detail?id=25916 + var queryIndex = url.indexOf('?'), + splitter = + (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#', + uSplit = url.split(splitter), + slashRegex = /\\/g; + uSplit[0] = uSplit[0].replace(slashRegex, '/'); + url = uSplit.join(splitter); + + var rest = url; + + // trim before proceeding. + // This is to support parse stuff like " http://foo.com \n" + rest = rest.trim(); + + if (!slashesDenoteHost && url.split('#').length === 1) { + // Try fast path regexp + var simplePath = simplePathPattern.exec(rest); + if (simplePath) { + this.path = rest; + this.href = rest; + this.pathname = simplePath[1]; + if (simplePath[2]) { + this.search = simplePath[2]; + if (parseQueryString) { + this.query = querystring.parse(this.search.substr(1)); + } else { + this.query = this.search.substr(1); + } + } else if (parseQueryString) { + this.search = ''; + this.query = {}; + } + return this; + } + } + + var proto = protocolPattern.exec(rest); + if (proto) { + proto = proto[0]; + var lowerProto = proto.toLowerCase(); + this.protocol = lowerProto; + rest = rest.substr(proto.length); + } + + // figure out if it's got a host + // user@server is *always* interpreted as a hostname, and url + // resolution will treat //foo/bar as host=foo,path=bar because that's + // how the browser resolves relative URLs. + if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) { + var slashes = rest.substr(0, 2) === '//'; + if (slashes && !(proto && hostlessProtocol[proto])) { + rest = rest.substr(2); + this.slashes = true; + } + } + + if (!hostlessProtocol[proto] && + (slashes || (proto && !slashedProtocol[proto]))) { + + // there's a hostname. + // the first instance of /, ?, ;, or # ends the host. + // + // If there is an @ in the hostname, then non-host chars *are* allowed + // to the left of the last @ sign, unless some host-ending character + // comes *before* the @-sign. + // URLs are obnoxious. + // + // ex: + // http://a@b@c/ => user:a@b host:c + // http://a@b?@c => user:a host:c path:/?@c + + // v0.12 TODO(isaacs): This is not quite how Chrome does things. + // Review our test case against browsers more comprehensively. + + // find the first instance of any hostEndingChars + var hostEnd = -1; + for (var i = 0; i < hostEndingChars.length; i++) { + var hec = rest.indexOf(hostEndingChars[i]); + if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) + hostEnd = hec; + } + + // at this point, either we have an explicit point where the + // auth portion cannot go past, or the last @ char is the decider. + var auth, atSign; + if (hostEnd === -1) { + // atSign can be anywhere. + atSign = rest.lastIndexOf('@'); + } else { + // atSign must be in auth portion. + // http://a@b/c@d => host:b auth:a path:/c@d + atSign = rest.lastIndexOf('@', hostEnd); + } + + // Now we have a portion which is definitely the auth. + // Pull that off. + if (atSign !== -1) { + auth = rest.slice(0, atSign); + rest = rest.slice(atSign + 1); + this.auth = decodeURIComponent(auth); + } + + // the host is the remaining to the left of the first non-host char + hostEnd = -1; + for (var i = 0; i < nonHostChars.length; i++) { + var hec = rest.indexOf(nonHostChars[i]); + if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) + hostEnd = hec; + } + // if we still have not hit it, then the entire thing is a host. + if (hostEnd === -1) + hostEnd = rest.length; + + this.host = rest.slice(0, hostEnd); + rest = rest.slice(hostEnd); + + // pull out port. + this.parseHost(); + + // we've indicated that there is a hostname, + // so even if it's empty, it has to be present. + this.hostname = this.hostname || ''; + + // if hostname begins with [ and ends with ] + // assume that it's an IPv6 address. + var ipv6Hostname = this.hostname[0] === '[' && + this.hostname[this.hostname.length - 1] === ']'; + + // validate a little. + if (!ipv6Hostname) { + var hostparts = this.hostname.split(/\./); + for (var i = 0, l = hostparts.length; i < l; i++) { + var part = hostparts[i]; + if (!part) continue; + if (!part.match(hostnamePartPattern)) { + var newpart = ''; + for (var j = 0, k = part.length; j < k; j++) { + if (part.charCodeAt(j) > 127) { + // we replace non-ASCII char with a temporary placeholder + // we need this to make sure size of hostname is not + // broken by replacing non-ASCII by nothing + newpart += 'x'; + } else { + newpart += part[j]; + } + } + // we test again with ASCII char only + if (!newpart.match(hostnamePartPattern)) { + var validParts = hostparts.slice(0, i); + var notHost = hostparts.slice(i + 1); + var bit = part.match(hostnamePartStart); + if (bit) { + validParts.push(bit[1]); + notHost.unshift(bit[2]); + } + if (notHost.length) { + rest = '/' + notHost.join('.') + rest; + } + this.hostname = validParts.join('.'); + break; + } + } + } + } + + if (this.hostname.length > hostnameMaxLen) { + this.hostname = ''; + } else { + // hostnames are always lower case. + this.hostname = this.hostname.toLowerCase(); + } + + if (!ipv6Hostname) { + // IDNA Support: Returns a punycoded representation of "domain". + // It only converts parts of the domain name that + // have non-ASCII characters, i.e. it doesn't matter if + // you call it with a domain that already is ASCII-only. + this.hostname = punycode.toASCII(this.hostname); + } + + var p = this.port ? ':' + this.port : ''; + var h = this.hostname || ''; + this.host = h + p; + this.href += this.host; + + // strip [ and ] from the hostname + // the host field still retains them, though + if (ipv6Hostname) { + this.hostname = this.hostname.substr(1, this.hostname.length - 2); + if (rest[0] !== '/') { + rest = '/' + rest; + } + } + } + + // now rest is set to the post-host stuff. + // chop off any delim chars. + if (!unsafeProtocol[lowerProto]) { + + // First, make 100% sure that any "autoEscape" chars get + // escaped, even if encodeURIComponent doesn't think they + // need to be. + for (var i = 0, l = autoEscape.length; i < l; i++) { + var ae = autoEscape[i]; + if (rest.indexOf(ae) === -1) + continue; + var esc = encodeURIComponent(ae); + if (esc === ae) { + esc = escape(ae); + } + rest = rest.split(ae).join(esc); + } + } + + + // chop off from the tail first. + var hash = rest.indexOf('#'); + if (hash !== -1) { + // got a fragment string. + this.hash = rest.substr(hash); + rest = rest.slice(0, hash); + } + var qm = rest.indexOf('?'); + if (qm !== -1) { + this.search = rest.substr(qm); + this.query = rest.substr(qm + 1); + if (parseQueryString) { + this.query = querystring.parse(this.query); + } + rest = rest.slice(0, qm); + } else if (parseQueryString) { + // no query string, but parseQueryString still requested + this.search = ''; + this.query = {}; + } + if (rest) this.pathname = rest; + if (slashedProtocol[lowerProto] && + this.hostname && !this.pathname) { + this.pathname = '/'; + } + + //to support http.request + if (this.pathname || this.search) { + var p = this.pathname || ''; + var s = this.search || ''; + this.path = p + s; + } + + // finally, reconstruct the href based on what has been validated. + this.href = this.format(); + return this; +}; + +// format a parsed object into a url string +function urlFormat(obj) { + // ensure it's an object, and not a string url. + // If it's an obj, this is a no-op. + // this way, you can call url_format() on strings + // to clean up potentially wonky urls. + if (util.isString(obj)) obj = urlParse(obj); + if (!(obj instanceof Url)) return Url.prototype.format.call(obj); + return obj.format(); +} + +Url.prototype.format = function() { + var auth = this.auth || ''; + if (auth) { + auth = encodeURIComponent(auth); + auth = auth.replace(/%3A/i, ':'); + auth += '@'; + } + + var protocol = this.protocol || '', + pathname = this.pathname || '', + hash = this.hash || '', + host = false, + query = ''; + + if (this.host) { + host = auth + this.host; + } else if (this.hostname) { + host = auth + (this.hostname.indexOf(':') === -1 ? + this.hostname : + '[' + this.hostname + ']'); + if (this.port) { + host += ':' + this.port; + } + } + + if (this.query && + util.isObject(this.query) && + Object.keys(this.query).length) { + query = querystring.stringify(this.query); + } + + var search = this.search || (query && ('?' + query)) || ''; + + if (protocol && protocol.substr(-1) !== ':') protocol += ':'; + + // only the slashedProtocols get the //. Not mailto:, xmpp:, etc. + // unless they had them to begin with. + if (this.slashes || + (!protocol || slashedProtocol[protocol]) && host !== false) { + host = '//' + (host || ''); + if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname; + } else if (!host) { + host = ''; + } + + if (hash && hash.charAt(0) !== '#') hash = '#' + hash; + if (search && search.charAt(0) !== '?') search = '?' + search; + + pathname = pathname.replace(/[?#]/g, function(match) { + return encodeURIComponent(match); + }); + search = search.replace('#', '%23'); + + return protocol + host + pathname + search + hash; +}; + +function urlResolve(source, relative) { + return urlParse(source, false, true).resolve(relative); +} + +Url.prototype.resolve = function(relative) { + return this.resolveObject(urlParse(relative, false, true)).format(); +}; + +function urlResolveObject(source, relative) { + if (!source) return relative; + return urlParse(source, false, true).resolveObject(relative); +} + +Url.prototype.resolveObject = function(relative) { + if (util.isString(relative)) { + var rel = new Url(); + rel.parse(relative, false, true); + relative = rel; + } + + var result = new Url(); + var tkeys = Object.keys(this); + for (var tk = 0; tk < tkeys.length; tk++) { + var tkey = tkeys[tk]; + result[tkey] = this[tkey]; + } + + // hash is always overridden, no matter what. + // even href="" will remove it. + result.hash = relative.hash; + + // if the relative url is empty, then there's nothing left to do here. + if (relative.href === '') { + result.href = result.format(); + return result; + } + + // hrefs like //foo/bar always cut to the protocol. + if (relative.slashes && !relative.protocol) { + // take everything except the protocol from relative + var rkeys = Object.keys(relative); + for (var rk = 0; rk < rkeys.length; rk++) { + var rkey = rkeys[rk]; + if (rkey !== 'protocol') + result[rkey] = relative[rkey]; + } + + //urlParse appends trailing / to urls like http://www.example.com + if (slashedProtocol[result.protocol] && + result.hostname && !result.pathname) { + result.path = result.pathname = '/'; + } + + result.href = result.format(); + return result; + } + + if (relative.protocol && relative.protocol !== result.protocol) { + // if it's a known url protocol, then changing + // the protocol does weird things + // first, if it's not file:, then we MUST have a host, + // and if there was a path + // to begin with, then we MUST have a path. + // if it is file:, then the host is dropped, + // because that's known to be hostless. + // anything else is assumed to be absolute. + if (!slashedProtocol[relative.protocol]) { + var keys = Object.keys(relative); + for (var v = 0; v < keys.length; v++) { + var k = keys[v]; + result[k] = relative[k]; + } + result.href = result.format(); + return result; + } + + result.protocol = relative.protocol; + if (!relative.host && !hostlessProtocol[relative.protocol]) { + var relPath = (relative.pathname || '').split('/'); + while (relPath.length && !(relative.host = relPath.shift())); + if (!relative.host) relative.host = ''; + if (!relative.hostname) relative.hostname = ''; + if (relPath[0] !== '') relPath.unshift(''); + if (relPath.length < 2) relPath.unshift(''); + result.pathname = relPath.join('/'); + } else { + result.pathname = relative.pathname; + } + result.search = relative.search; + result.query = relative.query; + result.host = relative.host || ''; + result.auth = relative.auth; + result.hostname = relative.hostname || relative.host; + result.port = relative.port; + // to support http.request + if (result.pathname || result.search) { + var p = result.pathname || ''; + var s = result.search || ''; + result.path = p + s; + } + result.slashes = result.slashes || relative.slashes; + result.href = result.format(); + return result; + } + + var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'), + isRelAbs = ( + relative.host || + relative.pathname && relative.pathname.charAt(0) === '/' + ), + mustEndAbs = (isRelAbs || isSourceAbs || + (result.host && relative.pathname)), + removeAllDots = mustEndAbs, + srcPath = result.pathname && result.pathname.split('/') || [], + relPath = relative.pathname && relative.pathname.split('/') || [], + psychotic = result.protocol && !slashedProtocol[result.protocol]; + + // if the url is a non-slashed url, then relative + // links like ../.. should be able + // to crawl up to the hostname, as well. This is strange. + // result.protocol has already been set by now. + // Later on, put the first path part into the host field. + if (psychotic) { + result.hostname = ''; + result.port = null; + if (result.host) { + if (srcPath[0] === '') srcPath[0] = result.host; + else srcPath.unshift(result.host); + } + result.host = ''; + if (relative.protocol) { + relative.hostname = null; + relative.port = null; + if (relative.host) { + if (relPath[0] === '') relPath[0] = relative.host; + else relPath.unshift(relative.host); + } + relative.host = null; + } + mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === ''); + } + + if (isRelAbs) { + // it's absolute. + result.host = (relative.host || relative.host === '') ? + relative.host : result.host; + result.hostname = (relative.hostname || relative.hostname === '') ? + relative.hostname : result.hostname; + result.search = relative.search; + result.query = relative.query; + srcPath = relPath; + // fall through to the dot-handling below. + } else if (relPath.length) { + // it's relative + // throw away the existing file, and take the new path instead. + if (!srcPath) srcPath = []; + srcPath.pop(); + srcPath = srcPath.concat(relPath); + result.search = relative.search; + result.query = relative.query; + } else if (!util.isNullOrUndefined(relative.search)) { + // just pull out the search. + // like href='?foo'. + // Put this after the other two cases because it simplifies the booleans + if (psychotic) { + result.hostname = result.host = srcPath.shift(); + //occationaly the auth can get stuck only in host + //this especially happens in cases like + //url.resolveObject('mailto:local1@domain1', 'local2@domain2') + var authInHost = result.host && result.host.indexOf('@') > 0 ? + result.host.split('@') : false; + if (authInHost) { + result.auth = authInHost.shift(); + result.host = result.hostname = authInHost.shift(); + } + } + result.search = relative.search; + result.query = relative.query; + //to support http.request + if (!util.isNull(result.pathname) || !util.isNull(result.search)) { + result.path = (result.pathname ? result.pathname : '') + + (result.search ? result.search : ''); + } + result.href = result.format(); + return result; + } + + if (!srcPath.length) { + // no path at all. easy. + // we've already handled the other stuff above. + result.pathname = null; + //to support http.request + if (result.search) { + result.path = '/' + result.search; + } else { + result.path = null; + } + result.href = result.format(); + return result; + } + + // if a url ENDs in . or .., then it must get a trailing slash. + // however, if it ends in anything else non-slashy, + // then it must NOT get a trailing slash. + var last = srcPath.slice(-1)[0]; + var hasTrailingSlash = ( + (result.host || relative.host || srcPath.length > 1) && + (last === '.' || last === '..') || last === ''); + + // strip single dots, resolve double dots to parent dir + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = srcPath.length; i >= 0; i--) { + last = srcPath[i]; + if (last === '.') { + srcPath.splice(i, 1); + } else if (last === '..') { + srcPath.splice(i, 1); + up++; + } else if (up) { + srcPath.splice(i, 1); + up--; + } + } + + // if the path is allowed to go above the root, restore leading ..s + if (!mustEndAbs && !removeAllDots) { + for (; up--; up) { + srcPath.unshift('..'); + } + } + + if (mustEndAbs && srcPath[0] !== '' && + (!srcPath[0] || srcPath[0].charAt(0) !== '/')) { + srcPath.unshift(''); + } + + if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) { + srcPath.push(''); + } + + var isAbsolute = srcPath[0] === '' || + (srcPath[0] && srcPath[0].charAt(0) === '/'); + + // put the host back + if (psychotic) { + result.hostname = result.host = isAbsolute ? '' : + srcPath.length ? srcPath.shift() : ''; + //occationaly the auth can get stuck only in host + //this especially happens in cases like + //url.resolveObject('mailto:local1@domain1', 'local2@domain2') + var authInHost = result.host && result.host.indexOf('@') > 0 ? + result.host.split('@') : false; + if (authInHost) { + result.auth = authInHost.shift(); + result.host = result.hostname = authInHost.shift(); + } + } + + mustEndAbs = mustEndAbs || (result.host && srcPath.length); + + if (mustEndAbs && !isAbsolute) { + srcPath.unshift(''); + } + + if (!srcPath.length) { + result.pathname = null; + result.path = null; + } else { + result.pathname = srcPath.join('/'); + } + + //to support request.http + if (!util.isNull(result.pathname) || !util.isNull(result.search)) { + result.path = (result.pathname ? result.pathname : '') + + (result.search ? result.search : ''); + } + result.auth = relative.auth || result.auth; + result.slashes = result.slashes || relative.slashes; + result.href = result.format(); + return result; +}; + +Url.prototype.parseHost = function() { + var host = this.host; + var port = portPattern.exec(host); + if (port) { + port = port[0]; + if (port !== ':') { + this.port = port.substr(1); + } + host = host.substr(0, host.length - port.length); + } + if (host) this.hostname = host; +}; + +},{"./util":49,"punycode":44,"querystring":47}],49:[function(require,module,exports){ +'use strict'; + +module.exports = { + isString: function(arg) { + return typeof(arg) === 'string'; + }, + isObject: function(arg) { + return typeof(arg) === 'object' && arg !== null; + }, + isNull: function(arg) { + return arg === null; + }, + isNullOrUndefined: function(arg) { + return arg == null; + } +}; + +},{}],"ajv":[function(require,module,exports){ +'use strict'; + +var compileSchema = require('./compile') + , resolve = require('./compile/resolve') + , Cache = require('./cache') + , SchemaObject = require('./compile/schema_obj') + , stableStringify = require('fast-json-stable-stringify') + , formats = require('./compile/formats') + , rules = require('./compile/rules') + , $dataMetaSchema = require('./data') + , util = require('./compile/util'); + +module.exports = Ajv; + +Ajv.prototype.validate = validate; +Ajv.prototype.compile = compile; +Ajv.prototype.addSchema = addSchema; +Ajv.prototype.addMetaSchema = addMetaSchema; +Ajv.prototype.validateSchema = validateSchema; +Ajv.prototype.getSchema = getSchema; +Ajv.prototype.removeSchema = removeSchema; +Ajv.prototype.addFormat = addFormat; +Ajv.prototype.errorsText = errorsText; + +Ajv.prototype._addSchema = _addSchema; +Ajv.prototype._compile = _compile; + +Ajv.prototype.compileAsync = require('./compile/async'); +var customKeyword = require('./keyword'); +Ajv.prototype.addKeyword = customKeyword.add; +Ajv.prototype.getKeyword = customKeyword.get; +Ajv.prototype.removeKeyword = customKeyword.remove; + +var errorClasses = require('./compile/error_classes'); +Ajv.ValidationError = errorClasses.Validation; +Ajv.MissingRefError = errorClasses.MissingRef; +Ajv.$dataMetaSchema = $dataMetaSchema; + +var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema'; + +var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes' ]; +var META_SUPPORT_DATA = ['/properties']; + +/** + * Creates validator instance. + * Usage: `Ajv(opts)` + * @param {Object} opts optional options + * @return {Object} ajv instance + */ +function Ajv(opts) { + if (!(this instanceof Ajv)) return new Ajv(opts); + opts = this._opts = util.copy(opts) || {}; + setLogger(this); + this._schemas = {}; + this._refs = {}; + this._fragments = {}; + this._formats = formats(opts.format); + var schemaUriFormat = this._schemaUriFormat = this._formats['uri-reference']; + this._schemaUriFormatFunc = function (str) { return schemaUriFormat.test(str); }; + + this._cache = opts.cache || new Cache; + this._loadingSchemas = {}; + this._compilations = []; + this.RULES = rules(); + this._getId = chooseGetId(opts); + + opts.loopRequired = opts.loopRequired || Infinity; + if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true; + if (opts.serialize === undefined) opts.serialize = stableStringify; + this._metaOpts = getMetaSchemaOptions(this); + + if (opts.formats) addInitialFormats(this); + addDraft6MetaSchema(this); + if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta); + addInitialSchemas(this); +} + + + +/** + * Validate data using schema + * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize. + * @this Ajv + * @param {String|Object} schemaKeyRef key, ref or schema object + * @param {Any} data to be validated + * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`). + */ +function validate(schemaKeyRef, data) { + var v; + if (typeof schemaKeyRef == 'string') { + v = this.getSchema(schemaKeyRef); + if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"'); + } else { + var schemaObj = this._addSchema(schemaKeyRef); + v = schemaObj.validate || this._compile(schemaObj); + } + + var valid = v(data); + if (v.$async !== true) this.errors = v.errors; + return valid; +} + + +/** + * Create validating function for passed schema. + * @this Ajv + * @param {Object} schema schema object + * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords. + * @return {Function} validating function + */ +function compile(schema, _meta) { + var schemaObj = this._addSchema(schema, undefined, _meta); + return schemaObj.validate || this._compile(schemaObj); +} + + +/** + * Adds schema to the instance. + * @this Ajv + * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored. + * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. + * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead. + * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead. + * @return {Ajv} this for method chaining + */ +function addSchema(schema, key, _skipValidation, _meta) { + if (Array.isArray(schema)){ + for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used. + * @param {Object} options optional options with properties `separator` and `dataVar`. + * @return {String} human readable string with all errors descriptions + */ +function errorsText(errors, options) { + errors = errors || this.errors; + if (!errors) return 'No errors'; + options = options || {}; + var separator = options.separator === undefined ? ', ' : options.separator; + var dataVar = options.dataVar === undefined ? 'data' : options.dataVar; + + var text = ''; + for (var i=0; i%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,c=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,u=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,d=/^(?:\/(?:[^~/]|~0|~1)*)*$/,f=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,p=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function m(e){return a.copy(m[e="full"==e?"full":"fast"])}function v(e){var r=e.match(s);if(!r)return!1;var t,a=+r[2],i=+r[3];return a>=1&&a<=12&&i>=1&&i<=(2!=a||((t=+r[1])%4!=0||t%100==0&&t%400!=0)?o[a]:29)}function y(e,r){var t=e.match(i);if(!t)return!1;var a=t[1],s=t[2],o=t[3];return(a<=23&&s<=59&&o<=59||23==a&&59==s&&60==o)&&(!r||t[5])}r.exports=m,m.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,uri:/^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":h,url:c,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:n,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:w,uuid:u,"json-pointer":d,"json-pointer-uri-fragment":f,"relative-json-pointer":p},m.full={date:v,time:y,"date-time":function(e){var r=e.split(g);return 2==r.length&&v(r[0])&&y(r[1],!0)},uri:function(e){return P.test(e)&&l.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":h,url:c,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:function(e){return e.length<=255&&n.test(e)},ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:w,uuid:u,"json-pointer":d,"json-pointer-uri-fragment":f,"relative-json-pointer":p};var g=/t|\s/i;var P=/\/|:/;var E=/[^\\]\\Z/;function w(e){if(E.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}},{"./util":10}],5:[function(e,r,t){"use strict";var a=e("./resolve"),s=e("./util"),o=e("./error_classes"),i=e("fast-json-stable-stringify"),n=e("../dotjs/validate"),l=s.ucs2length,h=e("fast-deep-equal"),c=o.Validation;function u(e,r,t){for(var a=0;a=0?{index:a,compiling:!0}:(this._compilations[a=this._compilations.length]={schema:e,root:r,baseId:t},{index:a,compiling:!1})}.call(this,r,t,g);var j=this._compilations[R.index];if(R.compiling)return j.callValidate=function e(){var r=j.validate;var t=r.apply(null,arguments);e.errors=r.errors;return t};var O=this._formats;var D=this.RULES;try{var I=k(r,t,y,g);j.validate=I;var A=j.callValidate;return A&&(A.schema=I.schema,A.errors=null,A.refs=I.refs,A.refVal=I.refVal,A.root=I.root,A.$async=I.$async,E.sourceCode&&(A.source=I.source)),I}finally{(function(e,r,t){var a=u.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}).call(this,r,t,g)}function k(r,i,u,y){var g=!i||i&&i.schema==r;if(i.schema!=t.schema)return e.call(P,r,i,u,y);var _,x=!0===r.$async,R=n({isTop:!0,schema:r,isRoot:g,baseId:y,root:i,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:o.MissingRef,RULES:D,validate:n,util:s,resolve:a,resolveRef:L,usePattern:C,useDefault:Q,useCustomRule:U,opts:E,formats:O,logger:P.logger,self:P});R=v(w,p)+v(S,d)+v($,f)+v(F,m)+R,E.processCode&&(R=E.processCode(R));try{var j=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",R);_=j(P,D,O,t,w,$,F,h,l,c),w[0]=_}catch(e){throw P.logger.error("Error compiling schema, function code:",R),e}return _.schema=r,_.errors=null,_.refs=b,_.refVal=w,_.root=g?_:i,x&&(_.$async=!0),!0===E.sourceCode&&(_.source={code:R,patterns:S,defaults:$}),_}function L(r,s,o){s=a.url(r,s);var i,n,l=b[s];if(void 0!==l)return z(i=w[l],n="refVal["+l+"]");if(!o&&t.refs){var h=t.refs[s];if(void 0!==h)return n=q(s,i=t.refVal[h]),z(i,n)}n=q(s);var c=a.call(P,k,t,s);if(void 0===c){var u=y&&y[s];u&&(c=a.inlineRef(u,E.inlineRefs)?u:e.call(P,u,t,y,r))}if(void 0!==c)return w[b[s]]=c,z(c,n);delete b[s]}function q(e,r){var t=w.length;return w[t]=r,b[e]=t,"refVal"+t}function z(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&!!e.$async}}function C(e){var r=_[e];return void 0===r&&(r=_[e]=S.length,S[r]=e),"pattern"+r}function Q(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return s.toQuotedString(e);case"object":if(null===e)return"null";var r=i(e),t=x[r];return void 0===t&&(t=x[r]=$.length,$[t]=e),"default"+t}}function U(e,r,t,a){var s=e.definition.validateSchema;if(s&&!1!==P._opts.validateSchema){var o=s(r);if(!o){var i="keyword schema is invalid: "+P.errorsText(s.errors);if("log"!=P._opts.validateSchema)throw new Error(i);P.logger.error(i)}}var n,l=e.definition.compile,h=e.definition.inline,c=e.definition.macro;if(l)n=l.call(P,r,t,a);else if(c)n=c.call(P,r,t,a),!1!==E.validateSchema&&P.validateSchema(n,!0);else if(h)n=h.call(P,a,e.keyword,r,t);else if(!(n=e.definition.validate))return;if(void 0===n)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var u=F.length;return F[u]=n,{code:"customRule"+u,validate:n}}}},{"../dotjs/validate":37,"./error_classes":3,"./resolve":6,"./util":10,"fast-deep-equal":41,"fast-json-stable-stringify":42}],6:[function(e,r,t){"use strict";var a=e("url"),s=e("fast-deep-equal"),o=e("./util"),i=e("./schema_obj"),n=e("json-schema-traverse");function l(e,r,t){var a=this._refs[t];if("string"==typeof a){if(!this._refs[a])return l.call(this,e,r,a);a=this._refs[a]}if((a=a||this._schemas[t])instanceof i)return f(a.schema,this._opts.inlineRefs)?a.schema:a.validate||this._compile(a);var s,o,n,c=h.call(this,r,t);return c&&(s=c.schema,r=c.root,n=c.baseId),s instanceof i?o=s.validate||e.call(this,s.schema,r,void 0,n):void 0!==s&&(o=f(s,this._opts.inlineRefs)?s:e.call(this,s,r,void 0,n)),o}function h(e,r){var t=a.parse(r,!1,!0),s=m(t),o=p(this._getId(e.schema));if(s!==o){var n=y(s),l=this._refs[n];if("string"==typeof l)return function(e,r,t){var a=h.call(this,e,r);if(a){var s=a.schema,o=a.baseId;e=a.root;var i=this._getId(s);return i&&(o=g(o,i)),u.call(this,t,o,s,e)}}.call(this,e,l,t);if(l instanceof i)l.validate||this._compile(l),e=l;else{if(!((l=this._schemas[n])instanceof i))return;if(l.validate||this._compile(l),n==y(r))return{schema:l,root:e,baseId:o};e=l}if(!e.schema)return;o=p(this._getId(e.schema))}return u.call(this,t,o,e.schema,e)}r.exports=l,l.normalizeId=y,l.fullPath=p,l.url=g,l.ids=function(e){var r=y(this._getId(e)),t={"":r},i={"":p(r,!1)},l={},h=this;return n(e,{allKeys:!0},function(e,r,n,c,u,d,f){if(""!==r){var p=h._getId(e),m=t[c],v=i[c]+"/"+u;if(void 0!==f&&(v+="/"+("number"==typeof f?f:o.escapeFragment(f))),"string"==typeof p){p=m=y(m?a.resolve(m,p):p);var g=h._refs[p];if("string"==typeof g&&(g=h._refs[g]),g&&g.schema){if(!s(e,g.schema))throw new Error('id "'+p+'" resolves to more than one schema')}else if(p!=y(v))if("#"==p[0]){if(l[p]&&!s(e,l[p]))throw new Error('id "'+p+'" resolves to more than one schema');l[p]=e}else h._refs[p]=v}t[r]=m,i[r]=v}}),l},l.inlineRef=f,l.schema=h;var c=o.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function u(e,r,t,a){if(e.hash=e.hash||"","#/"==e.hash.slice(0,2)){for(var s=e.hash.split("/"),i=1;i=55296&&r<=56319&&s=r)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw new Error("Cannot access data "+a+" levels up, current level is "+r);if(o="data"+(r-a||""),!s)return o}for(var n=o,h=s.split("/"),c=0;c",y=f?">":"<",g=void 0;if(e.opts.$data&&m&&m.$data){var P=e.util.getData(m.$data,i,e.dataPathArr),E="exclusive"+o,w="exclType"+o,b="exclIsNumber"+o,S="' + "+(x="op"+o)+" + '";s+=" var schemaExcl"+o+" = "+P+"; ";var _;g=p;(_=_||[]).push(s+=" var "+E+"; var "+w+" = typeof "+(P="schemaExcl"+o)+"; if ("+w+" != 'boolean' && "+w+" != 'undefined' && "+w+" != 'number') { "),s="",!1!==e.createErrors?(s+=" { keyword: '"+(g||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: {} ",!1!==e.opts.messages&&(s+=" , message: '"+p+" should be boolean' "),e.opts.verbose&&(s+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var $=s;s=_.pop(),s+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+$+"]); ":" validate.errors = ["+$+"]; return false; ":" var err = "+$+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } else if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+w+" == 'number' ? ( ("+E+" = "+a+" === undefined || "+P+" "+v+"= "+a+") ? "+u+" "+y+"= "+P+" : "+u+" "+y+" "+a+" ) : ( ("+E+" = "+P+" === true) ? "+u+" "+y+"= "+a+" : "+u+" "+y+" "+a+" ) || "+u+" !== "+u+") { var op"+o+" = "+E+" ? '"+v+"' : '"+v+"=';"}else{S=v;if((b="number"==typeof m)&&d){var x="'"+S+"'";s+=" if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" ( "+a+" === undefined || "+m+" "+v+"= "+a+" ? "+u+" "+y+"= "+m+" : "+u+" "+y+" "+a+" ) || "+u+" !== "+u+") { "}else{b&&void 0===n?(E=!0,g=p,h=e.errSchemaPath+"/"+p,a=m,y+="="):(b&&(a=Math[f?"min":"max"](m,n)),m===(!b||a)?(E=!0,g=p,h=e.errSchemaPath+"/"+p,y+="="):(E=!1,S+="="));x="'"+S+"'";s+=" if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+u+" "+y+" "+a+" || "+u+" !== "+u+") { "}}g=g||r,(_=_||[]).push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(g||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { comparison: "+x+", limit: "+a+", exclusive: "+E+" } ",!1!==e.opts.messages&&(s+=" , message: 'should be "+S+" ",s+=d?"' + "+a:a+"'"),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";$=s;return s=_.pop(),s+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+$+"]); ":" validate.errors = ["+$+"]; return false; ":" var err = "+$+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",c&&(s+=" else { "),s}},{}],13:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n,s+="if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || ");var f=r,p=p||[];p.push(s+=" "+u+".length "+("maxItems"==r?">":"<")+" "+a+") { "),s="",!1!==e.createErrors?(s+=" { keyword: '"+(f||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ",s+="maxItems"==r?"more":"less",s+=" than ",s+=d?"' + "+a+" + '":""+n,s+=" items' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",c&&(s+=" else { "),s}},{}],14:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n,s+="if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=!1===e.opts.unicode?" "+u+".length ":" ucs2length("+u+") ";var f=r,p=p||[];p.push(s+=" "+("maxLength"==r?">":"<")+" "+a+") { "),s="",!1!==e.createErrors?(s+=" { keyword: '"+(f||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT be ",s+="maxLength"==r?"longer":"shorter",s+=" than ",s+=d?"' + "+a+" + '":""+n,s+=" characters' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",c&&(s+=" else { "),s}},{}],15:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n,s+="if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || ");var f=r,p=p||[];p.push(s+=" Object.keys("+u+").length "+("maxProperties"==r?">":"<")+" "+a+") { "),s="",!1!==e.createErrors?(s+=" { keyword: '"+(f||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ",s+="maxProperties"==r?"more":"less",s+=" than ",s+=d?"' + "+a+" + '":""+n,s+=" properties' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",c&&(s+=" else { "),s}},{}],16:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.schema[r],o=e.schemaPath+e.util.getProperty(r),i=e.errSchemaPath+"/"+r,n=!e.opts.allErrors,l=e.util.copy(e),h="";l.level++;var c="valid"+l.level,u=l.baseId,d=!0,f=s;if(f)for(var p,m=-1,v=f.length-1;m=0)return h&&(a+=" if (true) { "),a;throw new Error('unknown format "'+i+'" is used in schema at path "'+e.errSchemaPath+'"')}var v,y=(v="object"==typeof m&&!(m instanceof RegExp)&&m.validate)&&m.type||"string";if(v){var g=!0===m.async;m=m.validate}if(y!=t)return h&&(a+=" if (true) { "),a;if(g){if(!e.async)throw new Error("async format in sync schema");a+=" if (!(await "+(P="formats"+e.util.getProperty(i)+".validate")+"("+c+"))) { "}else{a+=" if (! ";var P="formats"+e.util.getProperty(i);v&&(P+=".validate"),a+="function"==typeof m?" "+P+"("+c+") ":" "+P+".test("+c+") ",a+=") { "}}var E=E||[];E.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",a+=d?""+u:""+e.util.toQuotedString(i),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match format \"",a+=d?"' + "+u+" + '":""+e.util.escapeQuotes(i),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=d?"validate.schema"+n:""+e.util.toQuotedString(i),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var w=a;return a=E.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+w+"]); ":" validate.errors = ["+w+"]; return false; ":" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",h&&(a+=" else { "),a}},{}],25:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,c="data"+(o||""),u="valid"+s,d="errs__"+s,f=e.util.copy(e);f.level++;var p="valid"+f.level,m=e.schema.then,v=e.schema.else,y=void 0!==m&&e.util.schemaHasRules(m,e.RULES.all),g=void 0!==v&&e.util.schemaHasRules(v,e.RULES.all),P=f.baseId;if(y||g){var E;f.createErrors=!1,f.schema=i,f.schemaPath=n,f.errSchemaPath=l,a+=" var "+d+" = errors; var "+u+" = true; ";var w=e.compositeRule;e.compositeRule=f.compositeRule=!0,a+=" "+e.validate(f)+" ",f.baseId=P,f.createErrors=!0,a+=" errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.compositeRule=f.compositeRule=w,y?(a+=" if ("+p+") { ",f.schema=e.schema.then,f.schemaPath=e.schemaPath+".then",f.errSchemaPath=e.errSchemaPath+"/then",a+=" "+e.validate(f)+" ",f.baseId=P,a+=" "+u+" = "+p+"; ",y&&g?a+=" var "+(E="ifClause"+s)+" = 'then'; ":E="'then'",a+=" } ",g&&(a+=" else { ")):a+=" if (!"+p+") { ",g&&(f.schema=e.schema.else,f.schemaPath=e.schemaPath+".else",f.errSchemaPath=e.errSchemaPath+"/else",a+=" "+e.validate(f)+" ",f.baseId=P,a+=" "+u+" = "+p+"; ",y&&g?a+=" var "+(E="ifClause"+s)+" = 'else'; ":E="'else'",a+=" } "),a+=" if (!"+u+") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+E+" } ",!1!==e.opts.messages&&(a+=" , message: 'should match \"' + "+E+" + '\" schema' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&h&&(a+=e.async?" throw new ValidationError(vErrors); ":" validate.errors = vErrors; return false; "),a+=" } ",h&&(a+=" else { "),a=e.util.cleanUpCode(a)}else h&&(a+=" if (true) { ");return a}},{}],26:[function(e,r,t){"use strict";r.exports={$ref:e("./ref"),allOf:e("./allOf"),anyOf:e("./anyOf"),$comment:e("./comment"),const:e("./const"),contains:e("./contains"),dependencies:e("./dependencies"),enum:e("./enum"),format:e("./format"),if:e("./if"),items:e("./items"),maximum:e("./_limit"),minimum:e("./_limit"),maxItems:e("./_limitItems"),minItems:e("./_limitItems"),maxLength:e("./_limitLength"),minLength:e("./_limitLength"),maxProperties:e("./_limitProperties"),minProperties:e("./_limitProperties"),multipleOf:e("./multipleOf"),not:e("./not"),oneOf:e("./oneOf"),pattern:e("./pattern"),properties:e("./properties"),propertyNames:e("./propertyNames"),required:e("./required"),uniqueItems:e("./uniqueItems"),validate:e("./validate")}},{"./_limit":12,"./_limitItems":13,"./_limitLength":14,"./_limitProperties":15,"./allOf":16,"./anyOf":17,"./comment":18,"./const":19,"./contains":20,"./dependencies":22,"./enum":23,"./format":24,"./if":25,"./items":27,"./multipleOf":28,"./not":29,"./oneOf":30,"./pattern":31,"./properties":32,"./propertyNames":33,"./ref":34,"./required":35,"./uniqueItems":36,"./validate":37}],27:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,c="data"+(o||""),u="valid"+s,d="errs__"+s,f=e.util.copy(e),p="";f.level++;var m="valid"+f.level,v="i"+s,y=f.dataLevel=e.dataLevel+1,g="data"+y,P=e.baseId;if(a+="var "+d+" = errors;var "+u+";",Array.isArray(i)){var E=e.schema.additionalItems;if(!1===E){a+=" "+u+" = "+c+".length <= "+i.length+"; ";var w=l;l=e.errSchemaPath+"/additionalItems";var b=b||[];b.push(a+=" if (!"+u+") { "),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+i.length+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have more than "+i.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var S=a;a=b.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+S+"]); ":" validate.errors = ["+S+"]; return false; ":" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",l=w,h&&(p+="}",a+=" else { ")}var _=i;if(_)for(var $,x=-1,F=_.length-1;x "+x+") { ";var R=c+"["+x+"]";f.schema=$,f.schemaPath=n+"["+x+"]",f.errSchemaPath=l+"/"+x,f.errorPath=e.util.getPathExpr(e.errorPath,x,e.opts.jsonPointers,!0),f.dataPathArr[y]=x;var j=e.validate(f);f.baseId=P,e.util.varOccurences(j,g)<2?a+=" "+e.util.varReplace(j,g,R)+" ":a+=" var "+g+" = "+R+"; "+j+" ",a+=" } ",h&&(a+=" if ("+m+") { ",p+="}")}if("object"==typeof E&&e.util.schemaHasRules(E,e.RULES.all)){f.schema=E,f.schemaPath=e.schemaPath+".additionalItems",f.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+m+" = true; if ("+c+".length > "+i.length+") { for (var "+v+" = "+i.length+"; "+v+" < "+c+".length; "+v+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);R=c+"["+v+"]";f.dataPathArr[y]=v;j=e.validate(f);f.baseId=P,e.util.varOccurences(j,g)<2?a+=" "+e.util.varReplace(j,g,R)+" ":a+=" var "+g+" = "+R+"; "+j+" ",h&&(a+=" if (!"+m+") break; "),a+=" } } ",h&&(a+=" if ("+m+") { ",p+="}")}}else if(e.util.schemaHasRules(i,e.RULES.all)){f.schema=i,f.schemaPath=n,f.errSchemaPath=l,a+=" for (var "+v+" = 0; "+v+" < "+c+".length; "+v+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);R=c+"["+v+"]";f.dataPathArr[y]=v;j=e.validate(f);f.baseId=P,e.util.varOccurences(j,g)<2?a+=" "+e.util.varReplace(j,g,R)+" ":a+=" var "+g+" = "+R+"; "+j+" ",h&&(a+=" if (!"+m+") break; "),a+=" }"}return h&&(a+=" "+p+" if ("+d+" == errors) {"),a=e.util.cleanUpCode(a)}},{}],28:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,u="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n,s+="var division"+o+";if (",d&&(s+=" "+a+" !== undefined && ( typeof "+a+" != 'number' || "),s+=" (division"+o+" = "+u+" / "+a+", ",s+=e.opts.multipleOfPrecision?" Math.abs(Math.round(division"+o+") - division"+o+") > 1e-"+e.opts.multipleOfPrecision+" ":" division"+o+" !== parseInt(division"+o+") ",s+=" ) ",d&&(s+=" ) ");var f=f||[];f.push(s+=" ) { "),s="",!1!==e.createErrors?(s+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { multipleOf: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should be multiple of ",s+=d?"' + "+a:a+"'"),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var p=s;return s=f.pop(),s+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+p+"]); ":" validate.errors = ["+p+"]; return false; ":" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",c&&(s+=" else { "),s}},{}],29:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,c="data"+(o||""),u="errs__"+s,d=e.util.copy(e);d.level++;var f="valid"+d.level;if(e.util.schemaHasRules(i,e.RULES.all)){d.schema=i,d.schemaPath=n,d.errSchemaPath=l,a+=" var "+u+" = errors; ";var p,m=e.compositeRule;e.compositeRule=d.compositeRule=!0,d.createErrors=!1,d.opts.allErrors&&(p=d.opts.allErrors,d.opts.allErrors=!1),a+=" "+e.validate(d)+" ",d.createErrors=!0,p&&(d.opts.allErrors=p),e.compositeRule=d.compositeRule=m;var v=v||[];v.push(a+=" if ("+f+") { "),a="",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var y=a;a=v.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+y+"]); ":" validate.errors = ["+y+"]; return false; ":" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+u+"; if (vErrors !== null) { if ("+u+") vErrors.length = "+u+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",h&&(a+=" if (false) { ");return a}},{}],30:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,c="data"+(o||""),u="valid"+s,d="errs__"+s,f=e.util.copy(e),p="";f.level++;var m="valid"+f.level,v=f.baseId,y="prevValid"+s,g="passingSchemas"+s;a+="var "+d+" = errors , "+y+" = false , "+u+" = false , "+g+" = null; ";var P=e.compositeRule;e.compositeRule=f.compositeRule=!0;var E=i;if(E)for(var w,b=-1,S=E.length-1;b5)a+=" || validate.schema"+n+"["+m+"] ";else{var A=E;if(A)for(var k=-1,L=A.length-1;k=e.opts.loopRequired,b=e.opts.ownProperties;if(h)if(a+=" var missing"+s+"; ",w){d||(a+=" var "+f+" = validate.schema"+n+"; ");var S="' + "+(j="schema"+s+"["+(x="i"+s)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(E,j,e.opts.jsonPointers)),a+=" var "+u+" = true; ",d&&(a+=" if (schema"+s+" === undefined) "+u+" = true; else if (!Array.isArray(schema"+s+")) "+u+" = false; else {"),a+=" for (var "+x+" = 0; "+x+" < "+f+".length; "+x+"++) { "+u+" = "+c+"["+f+"["+x+"]] !== undefined ",b&&(a+=" && Object.prototype.hasOwnProperty.call("+c+", "+f+"["+x+"]) "),a+="; if (!"+u+") break; } ",d&&(a+=" } "),(R=R||[]).push(a+=" if (!"+u+") { "),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",a+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),a+=" } "):a+=" {} ";var _=a;a=R.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+_+"]); ":" validate.errors = ["+_+"]; return false; ":" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var $=p;if($)for(var x=-1,F=$.length-1;x 1) { ";var p=e.schema.items&&e.schema.items.type;s+=p&&"object"!=p&&"array"!=p?" var itemIndices = {}, item; for (;i--;) { var item = "+u+"[i]; if (typeof item != '"+p+"') continue; if (itemIndices[item] !== undefined) { "+d+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } ":" outer: for (;i--;) { for (j = i; j--;) { if (equal("+u+"[i], "+u+"[j])) { "+d+" = false; break outer; } } } ",s+=" } ",f&&(s+=" } ");var m=m||[];m.push(s+=" if (!"+d+") { "),s="",!1!==e.createErrors?(s+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(s+=" , schema: ",s+=f?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var v=s;s=m.pop(),s+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+v+"]); ":" validate.errors = ["+v+"]; return false; ":" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",c&&(s+=" else { ")}else c&&(s+=" if (true) { ");return s}},{}],37:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a="",s=!0===e.schema.$async,o=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),i=e.self._getId(e.schema);if(e.isTop&&(a+=" var validate = ",s&&(e.async=!0,a+="async "),a+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",i&&(e.opts.sourceCode||e.opts.processCode)&&(a+=" /*# sourceURL="+i+" */ ")),"boolean"==typeof e.schema||!o&&!e.schema.$ref){var n=e.level,l=e.dataLevel,h=e.schema[r="false schema"],c=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,d=!e.opts.allErrors,f="data"+(l||""),p="valid"+n;if(!1===e.schema){e.isTop?d=!0:a+=" var "+p+" = false; ",(B=B||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'boolean schema is false' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";var m=a;a=B.pop(),a+=!e.compositeRule&&d?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else a+=e.isTop?s?" return data; ":" validate.errors = null; return true; ":" var "+p+" = true; ";return e.isTop&&(a+=" }; return validate; "),a}if(e.isTop){var v=e.isTop;n=e.level=0,l=e.dataLevel=0,f="data";e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[void 0],a+=" var vErrors = null; ",a+=" var errors = 0; ",a+=" if (rootData === undefined) rootData = data; "}else{n=e.level,f="data"+((l=e.dataLevel)||"");if(i&&(e.baseId=e.resolve.url(e.baseId,i)),s&&!e.async)throw new Error("async schema in sync schema");a+=" var errs_"+n+" = errors;"}p="valid"+n,d=!e.opts.allErrors;var y="",g="",P=e.schema.type,E=Array.isArray(P);if(E&&1==P.length&&(P=P[0],E=!1),e.schema.$ref&&o){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(o=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(a+=" "+e.RULES.all.$comment.code(e,"$comment")),P){if(e.opts.coerceTypes)var w=e.util.coerceToTypes(e.opts.coerceTypes,P);var b=e.RULES.types[P];if(w||E||!0===b||b&&!J(b)){c=e.schemaPath+".type",u=e.errSchemaPath+"/type",c=e.schemaPath+".type",u=e.errSchemaPath+"/type";if(a+=" if ("+e.util[E?"checkDataTypes":"checkDataType"](P,f,!0)+") { ",w){var S="dataType"+n,_="coerced"+n;a+=" var "+S+" = typeof "+f+"; ","array"==e.opts.coerceTypes&&(a+=" if ("+S+" == 'object' && Array.isArray("+f+")) "+S+" = 'array'; "),a+=" var "+_+" = undefined; ";var $="",x=w;if(x)for(var F,R=-1,j=x.length-1;R= 0x80 (not a basic code point)","invalid-input":"Invalid input"},b=c-u,S=Math.floor,_=String.fromCharCode;function $(e){throw new RangeError(w[e])}function x(e,r){for(var t=e.length,a=[];t--;)a[t]=r(e[t]);return a}function F(e,r){var t=e.split("@"),a="";return t.length>1&&(a=t[0]+"@",e=t[1]),a+x((e=e.replace(E,".")).split("."),r).join(".")}function R(e){for(var r,t,a=[],s=0,o=e.length;s=55296&&r<=56319&&s65535&&(r+=_((e-=65536)>>>10&1023|55296),e=56320|1023&e),r+=_(e)}).join("")}function O(e,r){return e+22+75*(e<26)-((0!=r)<<5)}function D(e,r,t){var a=0;for(e=t?S(e/p):e>>1,e+=S(e/r);e>b*d>>1;a+=c)e=S(e/b);return S(a+(b+1)*e/(e+f))}function I(e){var r,t,a,s,o,i,n,l,f,p,g,P=[],E=e.length,w=0,b=v,_=m;for((t=e.lastIndexOf(y))<0&&(t=0),a=0;a=128&&$("not-basic"),P.push(e.charCodeAt(a));for(s=t>0?t+1:0;s=E&&$("invalid-input"),((l=(g=e.charCodeAt(s++))-48<10?g-22:g-65<26?g-65:g-97<26?g-97:c)>=c||l>S((h-w)/i))&&$("overflow"),w+=l*i,!(l<(f=n<=_?u:n>=_+d?d:n-_));n+=c)i>S(h/(p=c-f))&&$("overflow"),i*=p;_=D(w-o,r=P.length+1,0==o),S(w/r)>h-b&&$("overflow"),b+=S(w/r),w%=r,P.splice(w++,0,b)}return j(P)}function A(e){var r,t,a,s,o,i,n,l,f,p,g,P,E,w,b,x=[];for(P=(e=R(e)).length,r=v,t=0,o=m,i=0;i=r&&gS((h-t)/(E=a+1))&&$("overflow"),t+=(n-r)*E,r=n,i=0;ih&&$("overflow"),g==r){for(l=t,f=c;!(l<(p=f<=o?u:f>=o+d?d:f-o));f+=c)x.push(_(O(p+(b=l-p)%(w=c-p),0))),l=S(b/w);x.push(_(O(l,0))),o=D(t,E,a==s),t=0,++a}++t,++r}return x.join("")}if(n={version:"1.4.1",ucs2:{decode:R,encode:j},decode:I,encode:A,toASCII:function(e){return F(e,function(e){return P.test(e)?"xn--"+A(e):e})},toUnicode:function(e){return F(e,function(e){return g.test(e)?I(e.slice(4).toLowerCase()):e})}},s&&o)if(r.exports==s)o.exports=n;else for(l in n)n.hasOwnProperty(l)&&(s[l]=n[l]);else a.punycode=n}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],45:[function(e,r,t){"use strict";r.exports=function(e,r,t,s){t=t||"=";var o={};if("string"!=typeof e||0===e.length)return o;var i=/\+/g;e=e.split(r=r||"&");var n=1e3;s&&"number"==typeof s.maxKeys&&(n=s.maxKeys);var l=e.length;n>0&&l>n&&(l=n);for(var h=0;h=0?(c=p.substr(0,m),u=p.substr(m+1)):(c=p,u=""),d=decodeURIComponent(c),f=decodeURIComponent(u),Object.prototype.hasOwnProperty.call(o,d)?a(o[d])?o[d].push(f):o[d]=[o[d],f]:o[d]=f}return o};var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],46:[function(e,r,t){"use strict";var a=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};r.exports=function(e,r,t,n){return r=r||"&",t=t||"=",null===e&&(e=void 0),"object"==typeof e?o(i(e),function(i){var n=encodeURIComponent(a(i))+t;return s(e[i])?o(e[i],function(e){return n+encodeURIComponent(a(e))}).join(r):n+encodeURIComponent(a(e[i]))}).join(r):n?encodeURIComponent(a(n))+t+encodeURIComponent(a(e)):""};var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e,r){if(e.map)return e.map(r);for(var t=[],a=0;a",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(h),u=["%","/","?",";","#"].concat(c),d=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=e("querystring");function P(e,r,t){if(e&&s.isObject(e)&&e instanceof o)return e;var a=new o;return a.parse(e,r,t),a}o.prototype.parse=function(e,r,t){if(!s.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),n=-1!==o&&o127?A+="x":A+=I[k];if(!A.match(f)){var q=O.slice(0,F),z=O.slice(F+1),C=I.match(p);C&&(q.push(C[1]),z.unshift(C[2])),z.length&&(P="/"+z.join(".")+P),this.hostname=q.join(".");break}}}this.hostname=this.hostname.length>255?"":this.hostname.toLowerCase(),j||(this.hostname=a.toASCII(this.hostname)),this.host=(this.hostname||"")+(this.port?":"+this.port:""),this.href+=this.host,j&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==P[0]&&(P="/"+P))}if(!m[b])for(F=0,D=c.length;F0)&&t.host.split("@"))&&(t.auth=F.shift(),t.host=t.hostname=F.shift());return t.search=e.search,t.query=e.query,s.isNull(t.pathname)&&s.isNull(t.search)||(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.href=t.format(),t}if(!w.length)return t.pathname=null,t.path=t.search?"/"+t.search:null,t.href=t.format(),t;for(var S=w.slice(-1)[0],_=(t.host||e.host||w.length>1)&&("."===S||".."===S)||""===S,$=0,x=w.length;x>=0;x--)"."===(S=w[x])?w.splice(x,1):".."===S?(w.splice(x,1),$++):$&&(w.splice(x,1),$--);if(!P&&!E)for(;$--;$)w.unshift("..");!P||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),_&&"/"!==w.join("/").substr(-1)&&w.push("");var F,R=""===w[0]||w[0]&&"/"===w[0].charAt(0);b&&(t.hostname=t.host=R?"":w.length?w.shift():"",(F=!!(t.host&&t.host.indexOf("@")>0)&&t.host.split("@"))&&(t.auth=F.shift(),t.host=t.hostname=F.shift()));return(P=P||t.host&&w.length)&&!R&&w.unshift(""),w.length?t.pathname=w.join("/"):(t.pathname=null,t.path=null),s.isNull(t.pathname)&&s.isNull(t.search)||(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.auth=e.auth||t.auth,t.slashes=t.slashes||e.slashes,t.href=t.format(),t},o.prototype.parseHost=function(){var e=this.host,r=n.exec(e);r&&(":"!==(r=r[0])&&(this.port=r.substr(1)),e=e.substr(0,e.length-r.length)),e&&(this.hostname=e)}},{"./util":49,punycode:44,querystring:47}],49:[function(e,r,t){"use strict";r.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],ajv:[function(e,r,t){"use strict";var a=e("./compile"),s=e("./compile/resolve"),o=e("./cache"),i=e("./compile/schema_obj"),n=e("fast-json-stable-stringify"),l=e("./compile/formats"),h=e("./compile/rules"),c=e("./data"),u=e("./compile/util");r.exports=y,y.prototype.validate=function(e,r){var t;if("string"==typeof e){if(!(t=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var a=this._addSchema(e);t=a.validate||this._compile(a)}var s=t(r);!0!==t.$async&&(this.errors=t.errors);return s},y.prototype.compile=function(e,r){var t=this._addSchema(e,void 0,r);return t.validate||this._compile(t)},y.prototype.addSchema=function(e,r,t,a){if(Array.isArray(e)){for(var o=0;o; + /** + * Create validating function for passed schema. + * @param {object|Boolean} schema schema object + * @return {Function} validating function + */ + compile(schema: object | boolean): ValidateFunction; + /** + * Creates validating function for passed schema with asynchronous loading of missing schemas. + * `loadSchema` option should be a function that accepts schema uri and node-style callback. + * @this Ajv + * @param {object|Boolean} schema schema object + * @param {Boolean} meta optional true to compile meta-schema; this parameter can be skipped + * @param {Function} callback optional node-style callback, it is always called with 2 parameters: error (or null) and validating function. + * @return {Thenable} validating function + */ + compileAsync(schema: object | boolean, meta?: Boolean, callback?: (err: Error, validate: ValidateFunction) => any): Thenable; + /** + * Adds schema to the instance. + * @param {object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored. + * @param {string} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. + * @return {Ajv} this for method chaining + */ + addSchema(schema: Array | object, key?: string): Ajv; + /** + * Add schema that will be used to validate other schemas + * options in META_IGNORE_OPTIONS are alway set to false + * @param {object} schema schema object + * @param {string} key optional schema key + * @return {Ajv} this for method chaining + */ + addMetaSchema(schema: object, key?: string): Ajv; + /** + * Validate schema + * @param {object|Boolean} schema schema to validate + * @return {Boolean} true if schema is valid + */ + validateSchema(schema: object | boolean): boolean; + /** + * Get compiled schema from the instance by `key` or `ref`. + * @param {string} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id). + * @return {Function} schema validating function (with property `schema`). + */ + getSchema(keyRef: string): ValidateFunction; + /** + * Remove cached schema(s). + * If no parameter is passed all schemas but meta-schemas are removed. + * If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed. + * Even if schema is referenced by other schemas it still can be removed as other schemas have local references. + * @param {string|object|RegExp|Boolean} schemaKeyRef key, ref, pattern to match key/ref or schema object + * @return {Ajv} this for method chaining + */ + removeSchema(schemaKeyRef?: object | string | RegExp | boolean): Ajv; + /** + * Add custom format + * @param {string} name format name + * @param {string|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid) + * @return {Ajv} this for method chaining + */ + addFormat(name: string, format: FormatValidator | FormatDefinition): Ajv; + /** + * Define custom keyword + * @this Ajv + * @param {string} keyword custom keyword, should be a valid identifier, should be different from all standard, custom and macro keywords. + * @param {object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`. + * @return {Ajv} this for method chaining + */ + addKeyword(keyword: string, definition: KeywordDefinition): Ajv; + /** + * Get keyword definition + * @this Ajv + * @param {string} keyword pre-defined or custom keyword. + * @return {object|Boolean} custom keyword definition, `true` if it is a predefined keyword, `false` otherwise. + */ + getKeyword(keyword: string): object | boolean; + /** + * Remove keyword + * @this Ajv + * @param {string} keyword pre-defined or custom keyword. + * @return {Ajv} this for method chaining + */ + removeKeyword(keyword: string): Ajv; + /** + * Convert array of error message objects to string + * @param {Array} errors optional array of validation errors, if not passed errors from the instance are used. + * @param {object} options optional options with properties `separator` and `dataVar`. + * @return {string} human readable string with all errors descriptions + */ + errorsText(errors?: Array, options?: ErrorsTextOptions): string; + errors?: Array; + } + + interface Thenable { + then (onFulfilled?: (value: R) => U | Thenable, onRejected?: (error: any) => U | Thenable): Thenable; + } + + interface ValidateFunction { + ( + data: any, + dataPath?: string, + parentData?: object | Array, + parentDataProperty?: string | number, + rootData?: object | Array + ): boolean | Thenable; + schema?: object | boolean; + errors?: null | Array; + refs?: object; + refVal?: Array; + root?: ValidateFunction | object; + $async?: true; + source?: object; + } + + interface Options { + $data?: boolean; + allErrors?: boolean; + verbose?: boolean; + jsonPointers?: boolean; + uniqueItems?: boolean; + unicode?: boolean; + format?: string; + formats?: object; + unknownFormats?: true | string[] | 'ignore'; + schemas?: Array | object; + schemaId?: '$id' | 'id' | 'auto'; + missingRefs?: true | 'ignore' | 'fail'; + extendRefs?: true | 'ignore' | 'fail'; + loadSchema?: (uri: string, cb?: (err: Error, schema: object) => void) => Thenable; + removeAdditional?: boolean | 'all' | 'failing'; + useDefaults?: boolean | 'shared'; + coerceTypes?: boolean | 'array'; + async?: boolean | string; + transpile?: string | ((code: string) => string); + meta?: boolean | object; + validateSchema?: boolean | 'log'; + addUsedSchema?: boolean; + inlineRefs?: boolean | number; + passContext?: boolean; + loopRequired?: number; + ownProperties?: boolean; + multipleOfPrecision?: boolean | number; + errorDataPath?: string, + messages?: boolean; + sourceCode?: boolean; + processCode?: (code: string) => string; + cache?: object; + } + + type FormatValidator = string | RegExp | ((data: string) => boolean | Thenable); + + interface FormatDefinition { + validate: FormatValidator; + compare: (data1: string, data2: string) => number; + async?: boolean; + } + + interface KeywordDefinition { + type?: string | Array; + async?: boolean; + $data?: boolean; + errors?: boolean | string; + metaSchema?: object; + // schema: false makes validate not to expect schema (ValidateFunction) + schema?: boolean; + modifying?: boolean; + valid?: boolean; + // one and only one of the following properties should be present + validate?: SchemaValidateFunction | ValidateFunction; + compile?: (schema: any, parentSchema: object, it: CompilationContext) => ValidateFunction; + macro?: (schema: any, parentSchema: object, it: CompilationContext) => object | boolean; + inline?: (it: CompilationContext, keyword: string, schema: any, parentSchema: object) => string; + } + + interface CompilationContext { + level: number; + dataLevel: number; + schema: any; + schemaPath: string; + baseId: string; + async: boolean; + opts: Options; + formats: { + [index: string]: FormatDefinition | undefined; + }; + compositeRule: boolean; + validate: (schema: object) => boolean; + util: { + copy(obj: any, target?: any): any; + toHash(source: string[]): { [index: string]: true | undefined }; + equal(obj: any, target: any): boolean; + getProperty(str: string): string; + schemaHasRules(schema: object, rules: any): string; + escapeQuotes(str: string): string; + toQuotedString(str: string): string; + getData(jsonPointer: string, dataLevel: number, paths: string[]): string; + escapeJsonPointer(str: string): string; + unescapeJsonPointer(str: string): string; + escapeFragment(str: string): string; + unescapeFragment(str: string): string; + }; + self: Ajv; + } + + interface SchemaValidateFunction { + ( + schema: any, + data: any, + parentSchema?: object, + dataPath?: string, + parentData?: object | Array, + parentDataProperty?: string | number, + rootData?: object | Array + ): boolean | Thenable; + errors?: Array; + } + + interface ErrorsTextOptions { + separator?: string; + dataVar?: string; + } + + interface ErrorObject { + keyword: string; + dataPath: string; + schemaPath: string; + params: ErrorParameters; + // Added to validation errors of propertyNames keyword schema + propertyName?: string; + // Excluded if messages set to false. + message?: string; + // These are added with the `verbose` option. + schema?: any; + parentSchema?: object; + data?: any; + } + + type ErrorParameters = RefParams | LimitParams | AdditionalPropertiesParams | + DependenciesParams | FormatParams | ComparisonParams | + MultipleOfParams | PatternParams | RequiredParams | + TypeParams | UniqueItemsParams | CustomParams | + PatternRequiredParams | PropertyNamesParams | + IfParams | SwitchParams | NoParams | EnumParams; + + interface RefParams { + ref: string; + } + + interface LimitParams { + limit: number; + } + + interface AdditionalPropertiesParams { + additionalProperty: string; + } + + interface DependenciesParams { + property: string; + missingProperty: string; + depsCount: number; + deps: string; + } + + interface FormatParams { + format: string + } + + interface ComparisonParams { + comparison: string; + limit: number | string; + exclusive: boolean; + } + + interface MultipleOfParams { + multipleOf: number; + } + + interface PatternParams { + pattern: string; + } + + interface RequiredParams { + missingProperty: string; + } + + interface TypeParams { + type: string; + } + + interface UniqueItemsParams { + i: number; + j: number; + } + + interface CustomParams { + keyword: string; + } + + interface PatternRequiredParams { + missingPattern: string; + } + + interface PropertyNamesParams { + propertyName: string; + } + + interface IfParams { + failingKeyword: string; + } + + interface SwitchParams { + caseIndex: number; + } + + interface NoParams {} + + interface EnumParams { + allowedValues: Array; + } +} + +declare class ValidationError extends Error { + constructor(errors: Array); + + message: string; + errors: Array; + ajv: true; + validation: true; +} + +declare class MissingRefError extends Error { + constructor(baseId: string, ref: string, message?: string); + static message: (baseId: string, ref: string) => string; + + message: string; + missingRef: string; + missingSchema: string; +} + +export = ajv; diff --git a/node_modules/table/node_modules/ajv/lib/ajv.js b/node_modules/table/node_modules/ajv/lib/ajv.js new file mode 100644 index 0000000..b379508 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/ajv.js @@ -0,0 +1,497 @@ +'use strict'; + +var compileSchema = require('./compile') + , resolve = require('./compile/resolve') + , Cache = require('./cache') + , SchemaObject = require('./compile/schema_obj') + , stableStringify = require('fast-json-stable-stringify') + , formats = require('./compile/formats') + , rules = require('./compile/rules') + , $dataMetaSchema = require('./data') + , util = require('./compile/util'); + +module.exports = Ajv; + +Ajv.prototype.validate = validate; +Ajv.prototype.compile = compile; +Ajv.prototype.addSchema = addSchema; +Ajv.prototype.addMetaSchema = addMetaSchema; +Ajv.prototype.validateSchema = validateSchema; +Ajv.prototype.getSchema = getSchema; +Ajv.prototype.removeSchema = removeSchema; +Ajv.prototype.addFormat = addFormat; +Ajv.prototype.errorsText = errorsText; + +Ajv.prototype._addSchema = _addSchema; +Ajv.prototype._compile = _compile; + +Ajv.prototype.compileAsync = require('./compile/async'); +var customKeyword = require('./keyword'); +Ajv.prototype.addKeyword = customKeyword.add; +Ajv.prototype.getKeyword = customKeyword.get; +Ajv.prototype.removeKeyword = customKeyword.remove; + +var errorClasses = require('./compile/error_classes'); +Ajv.ValidationError = errorClasses.Validation; +Ajv.MissingRefError = errorClasses.MissingRef; +Ajv.$dataMetaSchema = $dataMetaSchema; + +var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema'; + +var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes' ]; +var META_SUPPORT_DATA = ['/properties']; + +/** + * Creates validator instance. + * Usage: `Ajv(opts)` + * @param {Object} opts optional options + * @return {Object} ajv instance + */ +function Ajv(opts) { + if (!(this instanceof Ajv)) return new Ajv(opts); + opts = this._opts = util.copy(opts) || {}; + setLogger(this); + this._schemas = {}; + this._refs = {}; + this._fragments = {}; + this._formats = formats(opts.format); + var schemaUriFormat = this._schemaUriFormat = this._formats['uri-reference']; + this._schemaUriFormatFunc = function (str) { return schemaUriFormat.test(str); }; + + this._cache = opts.cache || new Cache; + this._loadingSchemas = {}; + this._compilations = []; + this.RULES = rules(); + this._getId = chooseGetId(opts); + + opts.loopRequired = opts.loopRequired || Infinity; + if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true; + if (opts.serialize === undefined) opts.serialize = stableStringify; + this._metaOpts = getMetaSchemaOptions(this); + + if (opts.formats) addInitialFormats(this); + addDraft6MetaSchema(this); + if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta); + addInitialSchemas(this); +} + + + +/** + * Validate data using schema + * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize. + * @this Ajv + * @param {String|Object} schemaKeyRef key, ref or schema object + * @param {Any} data to be validated + * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`). + */ +function validate(schemaKeyRef, data) { + var v; + if (typeof schemaKeyRef == 'string') { + v = this.getSchema(schemaKeyRef); + if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"'); + } else { + var schemaObj = this._addSchema(schemaKeyRef); + v = schemaObj.validate || this._compile(schemaObj); + } + + var valid = v(data); + if (v.$async !== true) this.errors = v.errors; + return valid; +} + + +/** + * Create validating function for passed schema. + * @this Ajv + * @param {Object} schema schema object + * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords. + * @return {Function} validating function + */ +function compile(schema, _meta) { + var schemaObj = this._addSchema(schema, undefined, _meta); + return schemaObj.validate || this._compile(schemaObj); +} + + +/** + * Adds schema to the instance. + * @this Ajv + * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored. + * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. + * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead. + * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead. + * @return {Ajv} this for method chaining + */ +function addSchema(schema, key, _skipValidation, _meta) { + if (Array.isArray(schema)){ + for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used. + * @param {Object} options optional options with properties `separator` and `dataVar`. + * @return {String} human readable string with all errors descriptions + */ +function errorsText(errors, options) { + errors = errors || this.errors; + if (!errors) return 'No errors'; + options = options || {}; + var separator = options.separator === undefined ? ', ' : options.separator; + var dataVar = options.dataVar === undefined ? 'data' : options.dataVar; + + var text = ''; + for (var i=0; i%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; +// For the source: https://gist.github.com/dperini/729294 +// For test cases: https://mathiasbynens.be/demo/url-regex +// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983. +// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; +var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; +var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; +var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; +var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; +var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; + + +module.exports = formats; + +function formats(mode) { + mode = mode == 'full' ? 'full' : 'fast'; + return util.copy(formats[mode]); +} + + +formats.fast = { + // date: http://tools.ietf.org/html/rfc3339#section-5.6 + date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, + // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 + time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i, + 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i, + // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js + uri: /^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i, + 'uri-reference': /^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, + 'uri-template': URITEMPLATE, + url: URL, + // email (sources from jsen validator): + // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363 + // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation') + email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, + hostname: HOSTNAME, + // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, + // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses + ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, + regex: regex, + // uuid: http://tools.ietf.org/html/rfc4122 + uuid: UUID, + // JSON-pointer: https://tools.ietf.org/html/rfc6901 + // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A + 'json-pointer': JSON_POINTER, + 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, + // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00 + 'relative-json-pointer': RELATIVE_JSON_POINTER +}; + + +formats.full = { + date: date, + time: time, + 'date-time': date_time, + uri: uri, + 'uri-reference': URIREF, + 'uri-template': URITEMPLATE, + url: URL, + email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, + hostname: hostname, + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, + ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, + regex: regex, + uuid: UUID, + 'json-pointer': JSON_POINTER, + 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, + 'relative-json-pointer': RELATIVE_JSON_POINTER +}; + + +function isLeapYear(year) { + // https://tools.ietf.org/html/rfc3339#appendix-C + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); +} + + +function date(str) { + // full-date from http://tools.ietf.org/html/rfc3339#section-5.6 + var matches = str.match(DATE); + if (!matches) return false; + + var year = +matches[1]; + var month = +matches[2]; + var day = +matches[3]; + + return month >= 1 && month <= 12 && day >= 1 && + day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); +} + + +function time(str, full) { + var matches = str.match(TIME); + if (!matches) return false; + + var hour = matches[1]; + var minute = matches[2]; + var second = matches[3]; + var timeZone = matches[5]; + return ((hour <= 23 && minute <= 59 && second <= 59) || + (hour == 23 && minute == 59 && second == 60)) && + (!full || timeZone); +} + + +var DATE_TIME_SEPARATOR = /t|\s/i; +function date_time(str) { + // http://tools.ietf.org/html/rfc3339#section-5.6 + var dateTime = str.split(DATE_TIME_SEPARATOR); + return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true); +} + + +function hostname(str) { + // https://tools.ietf.org/html/rfc1034#section-3.5 + // https://tools.ietf.org/html/rfc1123#section-2 + return str.length <= 255 && HOSTNAME.test(str); +} + + +var NOT_URI_FRAGMENT = /\/|:/; +function uri(str) { + // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "." + return NOT_URI_FRAGMENT.test(str) && URI.test(str); +} + + +var Z_ANCHOR = /[^\\]\\Z/; +function regex(str) { + if (Z_ANCHOR.test(str)) return false; + try { + new RegExp(str); + return true; + } catch(e) { + return false; + } +} diff --git a/node_modules/table/node_modules/ajv/lib/compile/index.js b/node_modules/table/node_modules/ajv/lib/compile/index.js new file mode 100644 index 0000000..8af3a36 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/compile/index.js @@ -0,0 +1,377 @@ +'use strict'; + +var resolve = require('./resolve') + , util = require('./util') + , errorClasses = require('./error_classes') + , stableStringify = require('fast-json-stable-stringify'); + +var validateGenerator = require('../dotjs/validate'); + +/** + * Functions below are used inside compiled validations function + */ + +var ucs2length = util.ucs2length; +var equal = require('fast-deep-equal'); + +// this error is thrown by async schemas to return validation errors via exception +var ValidationError = errorClasses.Validation; + +module.exports = compile; + + +/** + * Compiles schema to validation function + * @this Ajv + * @param {Object} schema schema object + * @param {Object} root object with information about the root schema for this schema + * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution + * @param {String} baseId base ID for IDs in the schema + * @return {Function} validation function + */ +function compile(schema, root, localRefs, baseId) { + /* jshint validthis: true, evil: true */ + /* eslint no-shadow: 0 */ + var self = this + , opts = this._opts + , refVal = [ undefined ] + , refs = {} + , patterns = [] + , patternsHash = {} + , defaults = [] + , defaultsHash = {} + , customRules = []; + + root = root || { schema: schema, refVal: refVal, refs: refs }; + + var c = checkCompiling.call(this, schema, root, baseId); + var compilation = this._compilations[c.index]; + if (c.compiling) return (compilation.callValidate = callValidate); + + var formats = this._formats; + var RULES = this.RULES; + + try { + var v = localCompile(schema, root, localRefs, baseId); + compilation.validate = v; + var cv = compilation.callValidate; + if (cv) { + cv.schema = v.schema; + cv.errors = null; + cv.refs = v.refs; + cv.refVal = v.refVal; + cv.root = v.root; + cv.$async = v.$async; + if (opts.sourceCode) cv.source = v.source; + } + return v; + } finally { + endCompiling.call(this, schema, root, baseId); + } + + function callValidate() { + var validate = compilation.validate; + var result = validate.apply(null, arguments); + callValidate.errors = validate.errors; + return result; + } + + function localCompile(_schema, _root, localRefs, baseId) { + var isRoot = !_root || (_root && _root.schema == _schema); + if (_root.schema != root.schema) + return compile.call(self, _schema, _root, localRefs, baseId); + + var $async = _schema.$async === true; + + var sourceCode = validateGenerator({ + isTop: true, + schema: _schema, + isRoot: isRoot, + baseId: baseId, + root: _root, + schemaPath: '', + errSchemaPath: '#', + errorPath: '""', + MissingRefError: errorClasses.MissingRef, + RULES: RULES, + validate: validateGenerator, + util: util, + resolve: resolve, + resolveRef: resolveRef, + usePattern: usePattern, + useDefault: useDefault, + useCustomRule: useCustomRule, + opts: opts, + formats: formats, + logger: self.logger, + self: self + }); + + sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode) + + vars(defaults, defaultCode) + vars(customRules, customRuleCode) + + sourceCode; + + if (opts.processCode) sourceCode = opts.processCode(sourceCode); + // console.log('\n\n\n *** \n', JSON.stringify(sourceCode)); + var validate; + try { + var makeValidate = new Function( + 'self', + 'RULES', + 'formats', + 'root', + 'refVal', + 'defaults', + 'customRules', + 'equal', + 'ucs2length', + 'ValidationError', + sourceCode + ); + + validate = makeValidate( + self, + RULES, + formats, + root, + refVal, + defaults, + customRules, + equal, + ucs2length, + ValidationError + ); + + refVal[0] = validate; + } catch(e) { + self.logger.error('Error compiling schema, function code:', sourceCode); + throw e; + } + + validate.schema = _schema; + validate.errors = null; + validate.refs = refs; + validate.refVal = refVal; + validate.root = isRoot ? validate : _root; + if ($async) validate.$async = true; + if (opts.sourceCode === true) { + validate.source = { + code: sourceCode, + patterns: patterns, + defaults: defaults + }; + } + + return validate; + } + + function resolveRef(baseId, ref, isRoot) { + ref = resolve.url(baseId, ref); + var refIndex = refs[ref]; + var _refVal, refCode; + if (refIndex !== undefined) { + _refVal = refVal[refIndex]; + refCode = 'refVal[' + refIndex + ']'; + return resolvedRef(_refVal, refCode); + } + if (!isRoot && root.refs) { + var rootRefId = root.refs[ref]; + if (rootRefId !== undefined) { + _refVal = root.refVal[rootRefId]; + refCode = addLocalRef(ref, _refVal); + return resolvedRef(_refVal, refCode); + } + } + + refCode = addLocalRef(ref); + var v = resolve.call(self, localCompile, root, ref); + if (v === undefined) { + var localSchema = localRefs && localRefs[ref]; + if (localSchema) { + v = resolve.inlineRef(localSchema, opts.inlineRefs) + ? localSchema + : compile.call(self, localSchema, root, localRefs, baseId); + } + } + + if (v === undefined) { + removeLocalRef(ref); + } else { + replaceLocalRef(ref, v); + return resolvedRef(v, refCode); + } + } + + function addLocalRef(ref, v) { + var refId = refVal.length; + refVal[refId] = v; + refs[ref] = refId; + return 'refVal' + refId; + } + + function removeLocalRef(ref) { + delete refs[ref]; + } + + function replaceLocalRef(ref, v) { + var refId = refs[ref]; + refVal[refId] = v; + } + + function resolvedRef(refVal, code) { + return typeof refVal == 'object' || typeof refVal == 'boolean' + ? { code: code, schema: refVal, inline: true } + : { code: code, $async: refVal && !!refVal.$async }; + } + + function usePattern(regexStr) { + var index = patternsHash[regexStr]; + if (index === undefined) { + index = patternsHash[regexStr] = patterns.length; + patterns[index] = regexStr; + } + return 'pattern' + index; + } + + function useDefault(value) { + switch (typeof value) { + case 'boolean': + case 'number': + return '' + value; + case 'string': + return util.toQuotedString(value); + case 'object': + if (value === null) return 'null'; + var valueStr = stableStringify(value); + var index = defaultsHash[valueStr]; + if (index === undefined) { + index = defaultsHash[valueStr] = defaults.length; + defaults[index] = value; + } + return 'default' + index; + } + } + + function useCustomRule(rule, schema, parentSchema, it) { + var validateSchema = rule.definition.validateSchema; + if (validateSchema && self._opts.validateSchema !== false) { + var valid = validateSchema(schema); + if (!valid) { + var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors); + if (self._opts.validateSchema == 'log') self.logger.error(message); + else throw new Error(message); + } + } + + var compile = rule.definition.compile + , inline = rule.definition.inline + , macro = rule.definition.macro; + + var validate; + if (compile) { + validate = compile.call(self, schema, parentSchema, it); + } else if (macro) { + validate = macro.call(self, schema, parentSchema, it); + if (opts.validateSchema !== false) self.validateSchema(validate, true); + } else if (inline) { + validate = inline.call(self, it, rule.keyword, schema, parentSchema); + } else { + validate = rule.definition.validate; + if (!validate) return; + } + + if (validate === undefined) + throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); + + var index = customRules.length; + customRules[index] = validate; + + return { + code: 'customRule' + index, + validate: validate + }; + } +} + + +/** + * Checks if the schema is currently compiled + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean) + */ +function checkCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var index = compIndex.call(this, schema, root, baseId); + if (index >= 0) return { index: index, compiling: true }; + index = this._compilations.length; + this._compilations[index] = { + schema: schema, + root: root, + baseId: baseId + }; + return { index: index, compiling: false }; +} + + +/** + * Removes the schema from the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + */ +function endCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var i = compIndex.call(this, schema, root, baseId); + if (i >= 0) this._compilations.splice(i, 1); +} + + +/** + * Index of schema compilation in the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Integer} compilation index + */ +function compIndex(schema, root, baseId) { + /* jshint validthis: true */ + for (var i=0; i= 0xD800 && value <= 0xDBFF && pos < len) { + // high surrogate, and there is a next character + value = str.charCodeAt(pos); + if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate + } + } + return length; +}; diff --git a/node_modules/table/node_modules/ajv/lib/compile/util.js b/node_modules/table/node_modules/ajv/lib/compile/util.js new file mode 100644 index 0000000..263891c --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/compile/util.js @@ -0,0 +1,267 @@ +'use strict'; + + +module.exports = { + copy: copy, + checkDataType: checkDataType, + checkDataTypes: checkDataTypes, + coerceToTypes: coerceToTypes, + toHash: toHash, + getProperty: getProperty, + escapeQuotes: escapeQuotes, + equal: require('fast-deep-equal'), + ucs2length: require('./ucs2length'), + varOccurences: varOccurences, + varReplace: varReplace, + cleanUpCode: cleanUpCode, + finalCleanUpCode: finalCleanUpCode, + schemaHasRules: schemaHasRules, + schemaHasRulesExcept: schemaHasRulesExcept, + toQuotedString: toQuotedString, + getPathExpr: getPathExpr, + getPath: getPath, + getData: getData, + unescapeFragment: unescapeFragment, + unescapeJsonPointer: unescapeJsonPointer, + escapeFragment: escapeFragment, + escapeJsonPointer: escapeJsonPointer +}; + + +function copy(o, to) { + to = to || {}; + for (var key in o) to[key] = o[key]; + return to; +} + + +function checkDataType(dataType, data, negate) { + var EQUAL = negate ? ' !== ' : ' === ' + , AND = negate ? ' || ' : ' && ' + , OK = negate ? '!' : '' + , NOT = negate ? '' : '!'; + switch (dataType) { + case 'null': return data + EQUAL + 'null'; + case 'array': return OK + 'Array.isArray(' + data + ')'; + case 'object': return '(' + OK + data + AND + + 'typeof ' + data + EQUAL + '"object"' + AND + + NOT + 'Array.isArray(' + data + '))'; + case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND + + NOT + '(' + data + ' % 1)' + + AND + data + EQUAL + data + ')'; + default: return 'typeof ' + data + EQUAL + '"' + dataType + '"'; + } +} + + +function checkDataTypes(dataTypes, data) { + switch (dataTypes.length) { + case 1: return checkDataType(dataTypes[0], data, true); + default: + var code = ''; + var types = toHash(dataTypes); + if (types.array && types.object) { + code = types.null ? '(': '(!' + data + ' || '; + code += 'typeof ' + data + ' !== "object")'; + delete types.null; + delete types.array; + delete types.object; + } + if (types.number) delete types.integer; + for (var t in types) + code += (code ? ' && ' : '' ) + checkDataType(t, data, true); + + return code; + } +} + + +var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]); +function coerceToTypes(optionCoerceTypes, dataTypes) { + if (Array.isArray(dataTypes)) { + var types = []; + for (var i=0; i= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl); + return paths[lvl - up]; + } + + if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl); + data = 'data' + ((lvl - up) || ''); + if (!jsonPointer) return data; + } + + var expr = data; + var segments = jsonPointer.split('/'); + for (var i=0; i' + , $notOp = $isMax ? '>' : '<' + , $errorKeyword = undefined; +}} + +{{? $isDataExcl }} + {{ + var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr) + , $exclusive = 'exclusive' + $lvl + , $exclType = 'exclType' + $lvl + , $exclIsNumber = 'exclIsNumber' + $lvl + , $opExpr = 'op' + $lvl + , $opStr = '\' + ' + $opExpr + ' + \''; + }} + var schemaExcl{{=$lvl}} = {{=$schemaValueExcl}}; + {{ $schemaValueExcl = 'schemaExcl' + $lvl; }} + + var {{=$exclusive}}; + var {{=$exclType}} = typeof {{=$schemaValueExcl}}; + if ({{=$exclType}} != 'boolean' && {{=$exclType}} != 'undefined' && {{=$exclType}} != 'number') { + {{ var $errorKeyword = $exclusiveKeyword; }} + {{# def.error:'_exclusiveLimit' }} + } else if ({{# def.$dataNotType:'number' }} + {{=$exclType}} == 'number' + ? ( + ({{=$exclusive}} = {{=$schemaValue}} === undefined || {{=$schemaValueExcl}} {{=$op}}= {{=$schemaValue}}) + ? {{=$data}} {{=$notOp}}= {{=$schemaValueExcl}} + : {{=$data}} {{=$notOp}} {{=$schemaValue}} + ) + : ( + ({{=$exclusive}} = {{=$schemaValueExcl}} === true) + ? {{=$data}} {{=$notOp}}= {{=$schemaValue}} + : {{=$data}} {{=$notOp}} {{=$schemaValue}} + ) + || {{=$data}} !== {{=$data}}) { + var op{{=$lvl}} = {{=$exclusive}} ? '{{=$op}}' : '{{=$op}}='; +{{??}} + {{ + var $exclIsNumber = typeof $schemaExcl == 'number' + , $opStr = $op; /*used in error*/ + }} + + {{? $exclIsNumber && $isData }} + {{ var $opExpr = '\'' + $opStr + '\''; /*used in error*/ }} + if ({{# def.$dataNotType:'number' }} + ( {{=$schemaValue}} === undefined + || {{=$schemaExcl}} {{=$op}}= {{=$schemaValue}} + ? {{=$data}} {{=$notOp}}= {{=$schemaExcl}} + : {{=$data}} {{=$notOp}} {{=$schemaValue}} ) + || {{=$data}} !== {{=$data}}) { + {{??}} + {{ + if ($exclIsNumber && $schema === undefined) { + {{# def.setExclusiveLimit }} + $schemaValue = $schemaExcl; + $notOp += '='; + } else { + if ($exclIsNumber) + $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); + + if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { + {{# def.setExclusiveLimit }} + $notOp += '='; + } else { + $exclusive = false; + $opStr += '='; + } + } + + var $opExpr = '\'' + $opStr + '\''; /*used in error*/ + }} + + if ({{# def.$dataNotType:'number' }} + {{=$data}} {{=$notOp}} {{=$schemaValue}} + || {{=$data}} !== {{=$data}}) { + {{?}} +{{?}} + {{ $errorKeyword = $errorKeyword || $keyword; }} + {{# def.error:'_limit' }} + } {{? $breakOnError }} else { {{?}} diff --git a/node_modules/table/node_modules/ajv/lib/dot/_limitItems.jst b/node_modules/table/node_modules/ajv/lib/dot/_limitItems.jst new file mode 100644 index 0000000..a3e078e --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dot/_limitItems.jst @@ -0,0 +1,10 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{ var $op = $keyword == 'maxItems' ? '>' : '<'; }} +if ({{# def.$dataNotType:'number' }} {{=$data}}.length {{=$op}} {{=$schemaValue}}) { + {{ var $errorKeyword = $keyword; }} + {{# def.error:'_limitItems' }} +} {{? $breakOnError }} else { {{?}} diff --git a/node_modules/table/node_modules/ajv/lib/dot/_limitLength.jst b/node_modules/table/node_modules/ajv/lib/dot/_limitLength.jst new file mode 100644 index 0000000..cfc8dbb --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dot/_limitLength.jst @@ -0,0 +1,10 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{ var $op = $keyword == 'maxLength' ? '>' : '<'; }} +if ({{# def.$dataNotType:'number' }} {{# def.strLength }} {{=$op}} {{=$schemaValue}}) { + {{ var $errorKeyword = $keyword; }} + {{# def.error:'_limitLength' }} +} {{? $breakOnError }} else { {{?}} diff --git a/node_modules/table/node_modules/ajv/lib/dot/_limitProperties.jst b/node_modules/table/node_modules/ajv/lib/dot/_limitProperties.jst new file mode 100644 index 0000000..da7ea77 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dot/_limitProperties.jst @@ -0,0 +1,10 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{ var $op = $keyword == 'maxProperties' ? '>' : '<'; }} +if ({{# def.$dataNotType:'number' }} Object.keys({{=$data}}).length {{=$op}} {{=$schemaValue}}) { + {{ var $errorKeyword = $keyword; }} + {{# def.error:'_limitProperties' }} +} {{? $breakOnError }} else { {{?}} diff --git a/node_modules/table/node_modules/ajv/lib/dot/allOf.jst b/node_modules/table/node_modules/ajv/lib/dot/allOf.jst new file mode 100644 index 0000000..4c28363 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dot/allOf.jst @@ -0,0 +1,34 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + +{{ + var $currentBaseId = $it.baseId + , $allSchemasEmpty = true; +}} + +{{~ $schema:$sch:$i }} + {{? {{# def.nonEmptySchema:$sch }} }} + {{ + $allSchemasEmpty = false; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + }} + + {{# def.insertSubschemaCode }} + + {{# def.ifResultValid }} + {{?}} +{{~}} + +{{? $breakOnError }} + {{? $allSchemasEmpty }} + if (true) { + {{??}} + {{= $closingBraces.slice(0,-1) }} + {{?}} +{{?}} + +{{# def.cleanUp }} diff --git a/node_modules/table/node_modules/ajv/lib/dot/anyOf.jst b/node_modules/table/node_modules/ajv/lib/dot/anyOf.jst new file mode 100644 index 0000000..086cf2b --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dot/anyOf.jst @@ -0,0 +1,48 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + +{{ + var $noEmptySchema = $schema.every(function($sch) { + return {{# def.nonEmptySchema:$sch }}; + }); +}} +{{? $noEmptySchema }} + {{ var $currentBaseId = $it.baseId; }} + var {{=$errs}} = errors; + var {{=$valid}} = false; + + {{# def.setCompositeRule }} + + {{~ $schema:$sch:$i }} + {{ + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + }} + + {{# def.insertSubschemaCode }} + + {{=$valid}} = {{=$valid}} || {{=$nextValid}}; + + if (!{{=$valid}}) { + {{ $closingBraces += '}'; }} + {{~}} + + {{# def.resetCompositeRule }} + + {{= $closingBraces }} + + if (!{{=$valid}}) { + {{# def.extraError:'anyOf' }} + } else { + {{# def.resetErrors }} + {{? it.opts.allErrors }} } {{?}} + + {{# def.cleanUp }} +{{??}} + {{? $breakOnError }} + if (true) { + {{?}} +{{?}} diff --git a/node_modules/table/node_modules/ajv/lib/dot/coerce.def b/node_modules/table/node_modules/ajv/lib/dot/coerce.def new file mode 100644 index 0000000..86e0e18 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dot/coerce.def @@ -0,0 +1,61 @@ +{{## def.coerceType: + {{ + var $dataType = 'dataType' + $lvl + , $coerced = 'coerced' + $lvl; + }} + var {{=$dataType}} = typeof {{=$data}}; + {{? it.opts.coerceTypes == 'array'}} + if ({{=$dataType}} == 'object' && Array.isArray({{=$data}})) {{=$dataType}} = 'array'; + {{?}} + + var {{=$coerced}} = undefined; + + {{ var $bracesCoercion = ''; }} + {{~ $coerceToTypes:$type:$i }} + {{? $i }} + if ({{=$coerced}} === undefined) { + {{ $bracesCoercion += '}'; }} + {{?}} + + {{? it.opts.coerceTypes == 'array' && $type != 'array' }} + if ({{=$dataType}} == 'array' && {{=$data}}.length == 1) { + {{=$coerced}} = {{=$data}} = {{=$data}}[0]; + {{=$dataType}} = typeof {{=$data}}; + /*if ({{=$dataType}} == 'object' && Array.isArray({{=$data}})) {{=$dataType}} = 'array';*/ + } + {{?}} + + {{? $type == 'string' }} + if ({{=$dataType}} == 'number' || {{=$dataType}} == 'boolean') + {{=$coerced}} = '' + {{=$data}}; + else if ({{=$data}} === null) {{=$coerced}} = ''; + {{?? $type == 'number' || $type == 'integer' }} + if ({{=$dataType}} == 'boolean' || {{=$data}} === null + || ({{=$dataType}} == 'string' && {{=$data}} && {{=$data}} == +{{=$data}} + {{? $type == 'integer' }} && !({{=$data}} % 1){{?}})) + {{=$coerced}} = +{{=$data}}; + {{?? $type == 'boolean' }} + if ({{=$data}} === 'false' || {{=$data}} === 0 || {{=$data}} === null) + {{=$coerced}} = false; + else if ({{=$data}} === 'true' || {{=$data}} === 1) + {{=$coerced}} = true; + {{?? $type == 'null' }} + if ({{=$data}} === '' || {{=$data}} === 0 || {{=$data}} === false) + {{=$coerced}} = null; + {{?? it.opts.coerceTypes == 'array' && $type == 'array' }} + if ({{=$dataType}} == 'string' || {{=$dataType}} == 'number' || {{=$dataType}} == 'boolean' || {{=$data}} == null) + {{=$coerced}} = [{{=$data}}]; + {{?}} + {{~}} + + {{= $bracesCoercion }} + + if ({{=$coerced}} === undefined) { + {{# def.error:'type' }} + } else { + {{# def.setParentData }} + {{=$data}} = {{=$coerced}}; + {{? !$dataLvl }}if ({{=$parentData}} !== undefined){{?}} + {{=$parentData}}[{{=$parentDataProperty}}] = {{=$coerced}}; + } +#}} diff --git a/node_modules/table/node_modules/ajv/lib/dot/comment.jst b/node_modules/table/node_modules/ajv/lib/dot/comment.jst new file mode 100644 index 0000000..f959150 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dot/comment.jst @@ -0,0 +1,9 @@ +{{# def.definitions }} +{{# def.setupKeyword }} + +{{ var $comment = it.util.toQuotedString($schema); }} +{{? it.opts.$comment === true }} + console.log({{=$comment}}); +{{?? typeof it.opts.$comment == 'function' }} + self._opts.$comment({{=$comment}}, {{=it.util.toQuotedString($errSchemaPath)}}, validate.root.schema); +{{?}} diff --git a/node_modules/table/node_modules/ajv/lib/dot/const.jst b/node_modules/table/node_modules/ajv/lib/dot/const.jst new file mode 100644 index 0000000..2aa2298 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dot/const.jst @@ -0,0 +1,11 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{? !$isData }} + var schema{{=$lvl}} = validate.schema{{=$schemaPath}}; +{{?}} +var {{=$valid}} = equal({{=$data}}, schema{{=$lvl}}); +{{# def.checkError:'const' }} +{{? $breakOnError }} else { {{?}} diff --git a/node_modules/table/node_modules/ajv/lib/dot/contains.jst b/node_modules/table/node_modules/ajv/lib/dot/contains.jst new file mode 100644 index 0000000..925d2c8 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dot/contains.jst @@ -0,0 +1,57 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + + +{{ + var $idx = 'i' + $lvl + , $dataNxt = $it.dataLevel = it.dataLevel + 1 + , $nextData = 'data' + $dataNxt + , $currentBaseId = it.baseId + , $nonEmptySchema = {{# def.nonEmptySchema:$schema }}; +}} + +var {{=$errs}} = errors; +var {{=$valid}}; + +{{? $nonEmptySchema }} + {{# def.setCompositeRule }} + + {{ + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + }} + + var {{=$nextValid}} = false; + + for (var {{=$idx}} = 0; {{=$idx}} < {{=$data}}.length; {{=$idx}}++) { + {{ + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + }} + + {{# def.generateSubschemaCode }} + {{# def.optimizeValidate }} + + if ({{=$nextValid}}) break; + } + + {{# def.resetCompositeRule }} + {{= $closingBraces }} + + if (!{{=$nextValid}}) { +{{??}} + if ({{=$data}}.length == 0) { +{{?}} + + {{# def.error:'contains' }} + } else { + {{? $nonEmptySchema }} + {{# def.resetErrors }} + {{?}} + {{? it.opts.allErrors }} } {{?}} + +{{# def.cleanUp }} diff --git a/node_modules/table/node_modules/ajv/lib/dot/custom.jst b/node_modules/table/node_modules/ajv/lib/dot/custom.jst new file mode 100644 index 0000000..d30588f --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dot/custom.jst @@ -0,0 +1,191 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{ + var $rule = this + , $definition = 'definition' + $lvl + , $rDef = $rule.definition + , $closingBraces = ''; + var $validate = $rDef.validate; + var $compile, $inline, $macro, $ruleValidate, $validateCode; +}} + +{{? $isData && $rDef.$data }} + {{ + $validateCode = 'keywordValidate' + $lvl; + var $validateSchema = $rDef.validateSchema; + }} + var {{=$definition}} = RULES.custom['{{=$keyword}}'].definition; + var {{=$validateCode}} = {{=$definition}}.validate; +{{??}} + {{ + $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); + if (!$ruleValidate) return; + $schemaValue = 'validate.schema' + $schemaPath; + $validateCode = $ruleValidate.code; + $compile = $rDef.compile; + $inline = $rDef.inline; + $macro = $rDef.macro; + }} +{{?}} + +{{ + var $ruleErrs = $validateCode + '.errors' + , $i = 'i' + $lvl + , $ruleErr = 'ruleErr' + $lvl + , $asyncKeyword = $rDef.async; + + if ($asyncKeyword && !it.async) + throw new Error('async keyword in sync schema'); +}} + + +{{? !($inline || $macro) }}{{=$ruleErrs}} = null;{{?}} +var {{=$errs}} = errors; +var {{=$valid}}; + +{{## def.callRuleValidate: + {{=$validateCode}}.call( + {{? it.opts.passContext }}this{{??}}self{{?}} + {{? $compile || $rDef.schema === false }} + , {{=$data}} + {{??}} + , {{=$schemaValue}} + , {{=$data}} + , validate.schema{{=it.schemaPath}} + {{?}} + , {{# def.dataPath }} + {{# def.passParentData }} + , rootData + ) +#}} + +{{## def.extendErrors:_inline: + for (var {{=$i}}={{=$errs}}; {{=$i}}= 0 }} + {{# def.skipFormat }} + {{??}} + {{ throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); }} + {{?}} + {{?}} + {{ + var $isObject = typeof $format == 'object' + && !($format instanceof RegExp) + && $format.validate; + var $formatType = $isObject && $format.type || 'string'; + if ($isObject) { + var $async = $format.async === true; + $format = $format.validate; + } + }} + {{? $formatType != $ruleType }} + {{# def.skipFormat }} + {{?}} + {{? $async }} + {{ + if (!it.async) throw new Error('async format in sync schema'); + var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; + }} + if (!(await {{=$formatRef}}({{=$data}}))) { + {{??}} + if (!{{# def.checkFormat }}) { + {{?}} +{{?}} + {{# def.error:'format' }} + } {{? $breakOnError }} else { {{?}} diff --git a/node_modules/table/node_modules/ajv/lib/dot/if.jst b/node_modules/table/node_modules/ajv/lib/dot/if.jst new file mode 100644 index 0000000..7ccc9b7 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dot/if.jst @@ -0,0 +1,75 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + + +{{## def.validateIfClause:_clause: + {{ + $it.schema = it.schema['_clause']; + $it.schemaPath = it.schemaPath + '._clause'; + $it.errSchemaPath = it.errSchemaPath + '/_clause'; + }} + {{# def.insertSubschemaCode }} + {{=$valid}} = {{=$nextValid}}; + {{? $thenPresent && $elsePresent }} + {{ $ifClause = 'ifClause' + $lvl; }} + var {{=$ifClause}} = '_clause'; + {{??}} + {{ $ifClause = '\'_clause\''; }} + {{?}} +#}} + +{{ + var $thenSch = it.schema['then'] + , $elseSch = it.schema['else'] + , $thenPresent = $thenSch !== undefined && {{# def.nonEmptySchema:$thenSch }} + , $elsePresent = $elseSch !== undefined && {{# def.nonEmptySchema:$elseSch }} + , $currentBaseId = $it.baseId; +}} + +{{? $thenPresent || $elsePresent }} + {{ + var $ifClause; + $it.createErrors = false; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + }} + var {{=$errs}} = errors; + var {{=$valid}} = true; + + {{# def.setCompositeRule }} + {{# def.insertSubschemaCode }} + {{ $it.createErrors = true; }} + {{# def.resetErrors }} + {{# def.resetCompositeRule }} + + {{? $thenPresent }} + if ({{=$nextValid}}) { + {{# def.validateIfClause:then }} + } + {{? $elsePresent }} + else { + {{?}} + {{??}} + if (!{{=$nextValid}}) { + {{?}} + + {{? $elsePresent }} + {{# def.validateIfClause:else }} + } + {{?}} + + if (!{{=$valid}}) { + {{# def.extraError:'if' }} + } + {{? $breakOnError }} else { {{?}} + + {{# def.cleanUp }} +{{??}} + {{? $breakOnError }} + if (true) { + {{?}} +{{?}} + diff --git a/node_modules/table/node_modules/ajv/lib/dot/items.jst b/node_modules/table/node_modules/ajv/lib/dot/items.jst new file mode 100644 index 0000000..8c0f5ac --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dot/items.jst @@ -0,0 +1,100 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + + +{{## def.validateItems:startFrom: + for (var {{=$idx}} = {{=startFrom}}; {{=$idx}} < {{=$data}}.length; {{=$idx}}++) { + {{ + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + }} + + {{# def.generateSubschemaCode }} + {{# def.optimizeValidate }} + + {{? $breakOnError }} + if (!{{=$nextValid}}) break; + {{?}} + } +#}} + +{{ + var $idx = 'i' + $lvl + , $dataNxt = $it.dataLevel = it.dataLevel + 1 + , $nextData = 'data' + $dataNxt + , $currentBaseId = it.baseId; +}} + +var {{=$errs}} = errors; +var {{=$valid}}; + +{{? Array.isArray($schema) }} + {{ /* 'items' is an array of schemas */}} + {{ var $additionalItems = it.schema.additionalItems; }} + {{? $additionalItems === false }} + {{=$valid}} = {{=$data}}.length <= {{= $schema.length }}; + {{ + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalItems'; + }} + {{# def.checkError:'additionalItems' }} + {{ $errSchemaPath = $currErrSchemaPath; }} + {{# def.elseIfValid}} + {{?}} + + {{~ $schema:$sch:$i }} + {{? {{# def.nonEmptySchema:$sch }} }} + {{=$nextValid}} = true; + + if ({{=$data}}.length > {{=$i}}) { + {{ + var $passData = $data + '[' + $i + ']'; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); + $it.dataPathArr[$dataNxt] = $i; + }} + + {{# def.generateSubschemaCode }} + {{# def.optimizeValidate }} + } + + {{# def.ifResultValid }} + {{?}} + {{~}} + + {{? typeof $additionalItems == 'object' && {{# def.nonEmptySchema:$additionalItems }} }} + {{ + $it.schema = $additionalItems; + $it.schemaPath = it.schemaPath + '.additionalItems'; + $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; + }} + {{=$nextValid}} = true; + + if ({{=$data}}.length > {{= $schema.length }}) { + {{# def.validateItems: $schema.length }} + } + + {{# def.ifResultValid }} + {{?}} + +{{?? {{# def.nonEmptySchema:$schema }} }} + {{ /* 'items' is a single schema */}} + {{ + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + }} + {{# def.validateItems: 0 }} +{{?}} + +{{? $breakOnError }} + {{= $closingBraces }} + if ({{=$errs}} == errors) { +{{?}} + +{{# def.cleanUp }} diff --git a/node_modules/table/node_modules/ajv/lib/dot/missing.def b/node_modules/table/node_modules/ajv/lib/dot/missing.def new file mode 100644 index 0000000..a73b9f9 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dot/missing.def @@ -0,0 +1,39 @@ +{{## def.checkMissingProperty:_properties: + {{~ _properties:$propertyKey:$i }} + {{?$i}} || {{?}} + {{ + var $prop = it.util.getProperty($propertyKey) + , $useData = $data + $prop; + }} + ( ({{# def.noPropertyInData }}) && (missing{{=$lvl}} = {{= it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop) }}) ) + {{~}} +#}} + + +{{## def.errorMissingProperty:_error: + {{ + var $propertyPath = 'missing' + $lvl + , $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.opts.jsonPointers + ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) + : $currentErrorPath + ' + ' + $propertyPath; + } + }} + {{# def.error:_error }} +#}} + + +{{## def.allErrorsMissingProperty:_error: + {{ + var $prop = it.util.getProperty($propertyKey) + , $missingProperty = it.util.escapeQuotes($propertyKey) + , $useData = $data + $prop; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + }} + if ({{# def.noPropertyInData }}) { + {{# def.addError:_error }} + } +#}} diff --git a/node_modules/table/node_modules/ajv/lib/dot/multipleOf.jst b/node_modules/table/node_modules/ajv/lib/dot/multipleOf.jst new file mode 100644 index 0000000..5f8dd33 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dot/multipleOf.jst @@ -0,0 +1,20 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +var division{{=$lvl}}; +if ({{?$isData}} + {{=$schemaValue}} !== undefined && ( + typeof {{=$schemaValue}} != 'number' || + {{?}} + (division{{=$lvl}} = {{=$data}} / {{=$schemaValue}}, + {{? it.opts.multipleOfPrecision }} + Math.abs(Math.round(division{{=$lvl}}) - division{{=$lvl}}) > 1e-{{=it.opts.multipleOfPrecision}} + {{??}} + division{{=$lvl}} !== parseInt(division{{=$lvl}}) + {{?}} + ) + {{?$isData}} ) {{?}} ) { + {{# def.error:'multipleOf' }} +} {{? $breakOnError }} else { {{?}} diff --git a/node_modules/table/node_modules/ajv/lib/dot/not.jst b/node_modules/table/node_modules/ajv/lib/dot/not.jst new file mode 100644 index 0000000..e03185a --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dot/not.jst @@ -0,0 +1,43 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + +{{? {{# def.nonEmptySchema:$schema }} }} + {{ + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + }} + + var {{=$errs}} = errors; + + {{# def.setCompositeRule }} + + {{ + $it.createErrors = false; + var $allErrorsOption; + if ($it.opts.allErrors) { + $allErrorsOption = $it.opts.allErrors; + $it.opts.allErrors = false; + } + }} + {{= it.validate($it) }} + {{ + $it.createErrors = true; + if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; + }} + + {{# def.resetCompositeRule }} + + if ({{=$nextValid}}) { + {{# def.error:'not' }} + } else { + {{# def.resetErrors }} + {{? it.opts.allErrors }} } {{?}} +{{??}} + {{# def.addError:'not' }} + {{? $breakOnError}} + if (false) { + {{?}} +{{?}} diff --git a/node_modules/table/node_modules/ajv/lib/dot/oneOf.jst b/node_modules/table/node_modules/ajv/lib/dot/oneOf.jst new file mode 100644 index 0000000..bcce2c6 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dot/oneOf.jst @@ -0,0 +1,54 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + +{{ + var $currentBaseId = $it.baseId + , $prevValid = 'prevValid' + $lvl + , $passingSchemas = 'passingSchemas' + $lvl; +}} + +var {{=$errs}} = errors + , {{=$prevValid}} = false + , {{=$valid}} = false + , {{=$passingSchemas}} = null; + +{{# def.setCompositeRule }} + +{{~ $schema:$sch:$i }} + {{? {{# def.nonEmptySchema:$sch }} }} + {{ + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + }} + + {{# def.insertSubschemaCode }} + {{??}} + var {{=$nextValid}} = true; + {{?}} + + {{? $i }} + if ({{=$nextValid}} && {{=$prevValid}}) { + {{=$valid}} = false; + {{=$passingSchemas}} = [{{=$passingSchemas}}, {{=$i}}]; + } else { + {{ $closingBraces += '}'; }} + {{?}} + + if ({{=$nextValid}}) { + {{=$valid}} = {{=$prevValid}} = true; + {{=$passingSchemas}} = {{=$i}}; + } +{{~}} + +{{# def.resetCompositeRule }} + +{{= $closingBraces }} + +if (!{{=$valid}}) { + {{# def.extraError:'oneOf' }} +} else { + {{# def.resetErrors }} +{{? it.opts.allErrors }} } {{?}} diff --git a/node_modules/table/node_modules/ajv/lib/dot/pattern.jst b/node_modules/table/node_modules/ajv/lib/dot/pattern.jst new file mode 100644 index 0000000..3a37ef6 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dot/pattern.jst @@ -0,0 +1,14 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{ + var $regexp = $isData + ? '(new RegExp(' + $schemaValue + '))' + : it.usePattern($schema); +}} + +if ({{# def.$dataNotType:'string' }} !{{=$regexp}}.test({{=$data}}) ) { + {{# def.error:'pattern' }} +} {{? $breakOnError }} else { {{?}} diff --git a/node_modules/table/node_modules/ajv/lib/dot/properties.jst b/node_modules/table/node_modules/ajv/lib/dot/properties.jst new file mode 100644 index 0000000..dc8ab7b --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dot/properties.jst @@ -0,0 +1,244 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + + +{{## def.validateAdditional: + {{ /* additionalProperties is schema */ + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty + ? it.errorPath + : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + }} + + {{# def.generateSubschemaCode }} + {{# def.optimizeValidate }} +#}} + + +{{ + var $key = 'key' + $lvl + , $idx = 'idx' + $lvl + , $dataNxt = $it.dataLevel = it.dataLevel + 1 + , $nextData = 'data' + $dataNxt + , $dataProperties = 'dataProperties' + $lvl; + + var $schemaKeys = Object.keys($schema || {}) + , $pProperties = it.schema.patternProperties || {} + , $pPropertyKeys = Object.keys($pProperties) + , $aProperties = it.schema.additionalProperties + , $someProperties = $schemaKeys.length || $pPropertyKeys.length + , $noAdditional = $aProperties === false + , $additionalIsSchema = typeof $aProperties == 'object' + && Object.keys($aProperties).length + , $removeAdditional = it.opts.removeAdditional + , $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional + , $ownProperties = it.opts.ownProperties + , $currentBaseId = it.baseId; + + var $required = it.schema.required; + if ($required && !(it.opts.v5 && $required.$data) && $required.length < it.opts.loopRequired) + var $requiredHash = it.util.toHash($required); +}} + + +var {{=$errs}} = errors; +var {{=$nextValid}} = true; +{{? $ownProperties }} + var {{=$dataProperties}} = undefined; +{{?}} + +{{? $checkAdditional }} + {{# def.iterateProperties }} + {{? $someProperties }} + var isAdditional{{=$lvl}} = !(false + {{? $schemaKeys.length }} + {{? $schemaKeys.length > 5 }} + || validate.schema{{=$schemaPath}}[{{=$key}}] + {{??}} + {{~ $schemaKeys:$propertyKey }} + || {{=$key}} == {{= it.util.toQuotedString($propertyKey) }} + {{~}} + {{?}} + {{?}} + {{? $pPropertyKeys.length }} + {{~ $pPropertyKeys:$pProperty:$i }} + || {{= it.usePattern($pProperty) }}.test({{=$key}}) + {{~}} + {{?}} + ); + + if (isAdditional{{=$lvl}}) { + {{?}} + {{? $removeAdditional == 'all' }} + delete {{=$data}}[{{=$key}}]; + {{??}} + {{ + var $currentErrorPath = it.errorPath; + var $additionalProperty = '\' + ' + $key + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + } + }} + {{? $noAdditional }} + {{? $removeAdditional }} + delete {{=$data}}[{{=$key}}]; + {{??}} + {{=$nextValid}} = false; + {{ + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalProperties'; + }} + {{# def.error:'additionalProperties' }} + {{ $errSchemaPath = $currErrSchemaPath; }} + {{? $breakOnError }} break; {{?}} + {{?}} + {{?? $additionalIsSchema }} + {{? $removeAdditional == 'failing' }} + var {{=$errs}} = errors; + {{# def.setCompositeRule }} + + {{# def.validateAdditional }} + + if (!{{=$nextValid}}) { + errors = {{=$errs}}; + if (validate.errors !== null) { + if (errors) validate.errors.length = errors; + else validate.errors = null; + } + delete {{=$data}}[{{=$key}}]; + } + + {{# def.resetCompositeRule }} + {{??}} + {{# def.validateAdditional }} + {{? $breakOnError }} if (!{{=$nextValid}}) break; {{?}} + {{?}} + {{?}} + {{ it.errorPath = $currentErrorPath; }} + {{?}} + {{? $someProperties }} + } + {{?}} + } + + {{# def.ifResultValid }} +{{?}} + +{{ var $useDefaults = it.opts.useDefaults && !it.compositeRule; }} + +{{? $schemaKeys.length }} + {{~ $schemaKeys:$propertyKey }} + {{ var $sch = $schema[$propertyKey]; }} + + {{? {{# def.nonEmptySchema:$sch}} }} + {{ + var $prop = it.util.getProperty($propertyKey) + , $passData = $data + $prop + , $hasDefault = $useDefaults && $sch.default !== undefined; + $it.schema = $sch; + $it.schemaPath = $schemaPath + $prop; + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); + $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); + $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); + }} + + {{# def.generateSubschemaCode }} + + {{? {{# def.willOptimize }} }} + {{ + $code = {{# def._optimizeValidate }}; + var $useData = $passData; + }} + {{??}} + {{ var $useData = $nextData; }} + var {{=$nextData}} = {{=$passData}}; + {{?}} + + {{? $hasDefault }} + {{= $code }} + {{??}} + {{? $requiredHash && $requiredHash[$propertyKey] }} + if ({{# def.noPropertyInData }}) { + {{=$nextValid}} = false; + {{ + var $currentErrorPath = it.errorPath + , $currErrSchemaPath = $errSchemaPath + , $missingProperty = it.util.escapeQuotes($propertyKey); + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + $errSchemaPath = it.errSchemaPath + '/required'; + }} + {{# def.error:'required' }} + {{ $errSchemaPath = $currErrSchemaPath; }} + {{ it.errorPath = $currentErrorPath; }} + } else { + {{??}} + {{? $breakOnError }} + if ({{# def.noPropertyInData }}) { + {{=$nextValid}} = true; + } else { + {{??}} + if ({{=$useData}} !== undefined + {{? $ownProperties }} + && {{# def.isOwnProperty }} + {{?}} + ) { + {{?}} + {{?}} + + {{= $code }} + } + {{?}} {{ /* $hasDefault */ }} + {{?}} {{ /* def.nonEmptySchema */ }} + + {{# def.ifResultValid }} + {{~}} +{{?}} + +{{? $pPropertyKeys.length }} + {{~ $pPropertyKeys:$pProperty }} + {{ var $sch = $pProperties[$pProperty]; }} + + {{? {{# def.nonEmptySchema:$sch}} }} + {{ + $it.schema = $sch; + $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); + $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + + it.util.escapeFragment($pProperty); + }} + + {{# def.iterateProperties }} + if ({{= it.usePattern($pProperty) }}.test({{=$key}})) { + {{ + $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + }} + + {{# def.generateSubschemaCode }} + {{# def.optimizeValidate }} + + {{? $breakOnError }} if (!{{=$nextValid}}) break; {{?}} + } + {{? $breakOnError }} else {{=$nextValid}} = true; {{?}} + } + + {{# def.ifResultValid }} + {{?}} {{ /* def.nonEmptySchema */ }} + {{~}} +{{?}} + + +{{? $breakOnError }} + {{= $closingBraces }} + if ({{=$errs}} == errors) { +{{?}} + +{{# def.cleanUp }} diff --git a/node_modules/table/node_modules/ajv/lib/dot/propertyNames.jst b/node_modules/table/node_modules/ajv/lib/dot/propertyNames.jst new file mode 100644 index 0000000..51caffc --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dot/propertyNames.jst @@ -0,0 +1,54 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + +{{? {{# def.nonEmptySchema:$schema }} }} + {{ + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + }} + + {{ + var $key = 'key' + $lvl + , $idx = 'idx' + $lvl + , $i = 'i' + $lvl + , $invalidName = '\' + ' + $key + ' + \'' + , $dataNxt = $it.dataLevel = it.dataLevel + 1 + , $nextData = 'data' + $dataNxt + , $dataProperties = 'dataProperties' + $lvl + , $ownProperties = it.opts.ownProperties + , $currentBaseId = it.baseId; + }} + + var {{=$errs}} = errors; + + {{? $ownProperties }} + var {{=$dataProperties}} = undefined; + {{?}} + {{# def.iterateProperties }} + var startErrs{{=$lvl}} = errors; + + {{ var $passData = $key; }} + {{# def.setCompositeRule }} + {{# def.generateSubschemaCode }} + {{# def.optimizeValidate }} + {{# def.resetCompositeRule }} + + if (!{{=$nextValid}}) { + for (var {{=$i}}=startErrs{{=$lvl}}; {{=$i}}= it.opts.loopRequired + , $ownProperties = it.opts.ownProperties; + }} + + {{? $breakOnError }} + var missing{{=$lvl}}; + {{? $loopRequired }} + {{# def.setupLoop }} + var {{=$valid}} = true; + + {{?$isData}}{{# def.check$dataIsArray }}{{?}} + + for (var {{=$i}} = 0; {{=$i}} < {{=$vSchema}}.length; {{=$i}}++) { + {{=$valid}} = {{=$data}}[{{=$vSchema}}[{{=$i}}]] !== undefined + {{? $ownProperties }} + && {{# def.isRequiredOwnProperty }} + {{?}}; + if (!{{=$valid}}) break; + } + + {{? $isData }} } {{?}} + + {{# def.checkError:'required' }} + else { + {{??}} + if ({{# def.checkMissingProperty:$required }}) { + {{# def.errorMissingProperty:'required' }} + } else { + {{?}} + {{??}} + {{? $loopRequired }} + {{# def.setupLoop }} + {{? $isData }} + if ({{=$vSchema}} && !Array.isArray({{=$vSchema}})) { + {{# def.addError:'required' }} + } else if ({{=$vSchema}} !== undefined) { + {{?}} + + for (var {{=$i}} = 0; {{=$i}} < {{=$vSchema}}.length; {{=$i}}++) { + if ({{=$data}}[{{=$vSchema}}[{{=$i}}]] === undefined + {{? $ownProperties }} + || !{{# def.isRequiredOwnProperty }} + {{?}}) { + {{# def.addError:'required' }} + } + } + + {{? $isData }} } {{?}} + {{??}} + {{~ $required:$propertyKey }} + {{# def.allErrorsMissingProperty:'required' }} + {{~}} + {{?}} + {{?}} + + {{ it.errorPath = $currentErrorPath; }} + +{{?? $breakOnError }} + if (true) { +{{?}} diff --git a/node_modules/table/node_modules/ajv/lib/dot/uniqueItems.jst b/node_modules/table/node_modules/ajv/lib/dot/uniqueItems.jst new file mode 100644 index 0000000..2832750 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dot/uniqueItems.jst @@ -0,0 +1,54 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + + +{{? ($schema || $isData) && it.opts.uniqueItems !== false }} + {{? $isData }} + var {{=$valid}}; + if ({{=$schemaValue}} === false || {{=$schemaValue}} === undefined) + {{=$valid}} = true; + else if (typeof {{=$schemaValue}} != 'boolean') + {{=$valid}} = false; + else { + {{?}} + + var i = {{=$data}}.length + , {{=$valid}} = true + , j; + if (i > 1) { + {{ var $itemType = it.schema.items && it.schema.items.type; }} + {{? !$itemType || $itemType == 'object' || $itemType == 'array' }} + outer: + for (;i--;) { + for (j = i; j--;) { + if (equal({{=$data}}[i], {{=$data}}[j])) { + {{=$valid}} = false; + break outer; + } + } + } + {{??}} + var itemIndices = {}, item; + for (;i--;) { + var item = {{=$data}}[i]; + if (typeof item != '{{=$itemType}}') continue; + if (itemIndices[item] !== undefined) { + {{=$valid}} = false; + j = itemIndices[item]; + break; + } + itemIndices[item] = i; + } + {{?}} + } + + {{? $isData }} } {{?}} + + if (!{{=$valid}}) { + {{# def.error:'uniqueItems' }} + } {{? $breakOnError }} else { {{?}} +{{??}} + {{? $breakOnError }} if (true) { {{?}} +{{?}} diff --git a/node_modules/table/node_modules/ajv/lib/dot/validate.jst b/node_modules/table/node_modules/ajv/lib/dot/validate.jst new file mode 100644 index 0000000..27393cf --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dot/validate.jst @@ -0,0 +1,255 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.defaults }} +{{# def.coerce }} + +{{ /** + * schema compilation (render) time: + * it = { schema, RULES, _validate, opts } + * it.validate - this template function, + * it is used recursively to generate code for subschemas + * + * runtime: + * "validate" is a variable name to which this function will be assigned + * validateRef etc. are defined in the parent scope in index.js + */ }} + +{{ + var $async = it.schema.$async === true + , $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref') + , $id = it.self._getId(it.schema); +}} + +{{? it.isTop }} + var validate = {{?$async}}{{it.async = true;}}async {{?}}function(data, dataPath, parentData, parentDataProperty, rootData) { + 'use strict'; + {{? $id && (it.opts.sourceCode || it.opts.processCode) }} + {{= '/\*# sourceURL=' + $id + ' */' }} + {{?}} +{{?}} + +{{? typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref) }} + {{ var $keyword = 'false schema'; }} + {{# def.setupKeyword }} + {{? it.schema === false}} + {{? it.isTop}} + {{ $breakOnError = true; }} + {{??}} + var {{=$valid}} = false; + {{?}} + {{# def.error:'false schema' }} + {{??}} + {{? it.isTop}} + {{? $async }} + return data; + {{??}} + validate.errors = null; + return true; + {{?}} + {{??}} + var {{=$valid}} = true; + {{?}} + {{?}} + + {{? it.isTop}} + }; + return validate; + {{?}} + + {{ return out; }} +{{?}} + + +{{? it.isTop }} + {{ + var $top = it.isTop + , $lvl = it.level = 0 + , $dataLvl = it.dataLevel = 0 + , $data = 'data'; + it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); + it.baseId = it.baseId || it.rootId; + delete it.isTop; + + it.dataPathArr = [undefined]; + }} + + var vErrors = null; {{ /* don't edit, used in replace */ }} + var errors = 0; {{ /* don't edit, used in replace */ }} + if (rootData === undefined) rootData = data; {{ /* don't edit, used in replace */ }} +{{??}} + {{ + var $lvl = it.level + , $dataLvl = it.dataLevel + , $data = 'data' + ($dataLvl || ''); + + if ($id) it.baseId = it.resolve.url(it.baseId, $id); + + if ($async && !it.async) throw new Error('async schema in sync schema'); + }} + + var errs_{{=$lvl}} = errors; +{{?}} + +{{ + var $valid = 'valid' + $lvl + , $breakOnError = !it.opts.allErrors + , $closingBraces1 = '' + , $closingBraces2 = ''; + + var $errorKeyword; + var $typeSchema = it.schema.type + , $typeIsArray = Array.isArray($typeSchema); + + if ($typeIsArray && $typeSchema.length == 1) { + $typeSchema = $typeSchema[0]; + $typeIsArray = false; + } +}} + +{{## def.checkType: + {{ + var $schemaPath = it.schemaPath + '.type' + , $errSchemaPath = it.errSchemaPath + '/type' + , $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; + }} + + if ({{= it.util[$method]($typeSchema, $data, true) }}) { +#}} + +{{? it.schema.$ref && $refKeywords }} + {{? it.opts.extendRefs == 'fail' }} + {{ throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); }} + {{?? it.opts.extendRefs !== true }} + {{ + $refKeywords = false; + it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); + }} + {{?}} +{{?}} + +{{? it.schema.$comment && it.opts.$comment }} + {{= it.RULES.all.$comment.code(it, '$comment') }} +{{?}} + +{{? $typeSchema }} + {{? it.opts.coerceTypes }} + {{ var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); }} + {{?}} + + {{ var $rulesGroup = it.RULES.types[$typeSchema]; }} + {{? $coerceToTypes || $typeIsArray || $rulesGroup === true || + ($rulesGroup && !$shouldUseGroup($rulesGroup)) }} + {{ + var $schemaPath = it.schemaPath + '.type' + , $errSchemaPath = it.errSchemaPath + '/type'; + }} + {{# def.checkType }} + {{? $coerceToTypes }} + {{# def.coerceType }} + {{??}} + {{# def.error:'type' }} + {{?}} + } + {{?}} +{{?}} + + +{{? it.schema.$ref && !$refKeywords }} + {{= it.RULES.all.$ref.code(it, '$ref') }} + {{? $breakOnError }} + } + if (errors === {{?$top}}0{{??}}errs_{{=$lvl}}{{?}}) { + {{ $closingBraces2 += '}'; }} + {{?}} +{{??}} + {{~ it.RULES:$rulesGroup }} + {{? $shouldUseGroup($rulesGroup) }} + {{? $rulesGroup.type }} + if ({{= it.util.checkDataType($rulesGroup.type, $data) }}) { + {{?}} + {{? it.opts.useDefaults && !it.compositeRule }} + {{? $rulesGroup.type == 'object' && it.schema.properties }} + {{# def.defaultProperties }} + {{?? $rulesGroup.type == 'array' && Array.isArray(it.schema.items) }} + {{# def.defaultItems }} + {{?}} + {{?}} + {{~ $rulesGroup.rules:$rule }} + {{? $shouldUseRule($rule) }} + {{ var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); }} + {{? $code }} + {{= $code }} + {{? $breakOnError }} + {{ $closingBraces1 += '}'; }} + {{?}} + {{?}} + {{?}} + {{~}} + {{? $breakOnError }} + {{= $closingBraces1 }} + {{ $closingBraces1 = ''; }} + {{?}} + {{? $rulesGroup.type }} + } + {{? $typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes }} + else { + {{ + var $schemaPath = it.schemaPath + '.type' + , $errSchemaPath = it.errSchemaPath + '/type'; + }} + {{# def.error:'type' }} + } + {{?}} + {{?}} + + {{? $breakOnError }} + if (errors === {{?$top}}0{{??}}errs_{{=$lvl}}{{?}}) { + {{ $closingBraces2 += '}'; }} + {{?}} + {{?}} + {{~}} +{{?}} + +{{? $breakOnError }} {{= $closingBraces2 }} {{?}} + +{{? $top }} + {{? $async }} + if (errors === 0) return data; {{ /* don't edit, used in replace */ }} + else throw new ValidationError(vErrors); {{ /* don't edit, used in replace */ }} + {{??}} + validate.errors = vErrors; {{ /* don't edit, used in replace */ }} + return errors === 0; {{ /* don't edit, used in replace */ }} + {{?}} + }; + + return validate; +{{??}} + var {{=$valid}} = errors === errs_{{=$lvl}}; +{{?}} + +{{# def.cleanUp }} + +{{? $top }} + {{# def.finalCleanUp }} +{{?}} + +{{ + function $shouldUseGroup($rulesGroup) { + var rules = $rulesGroup.rules; + for (var i=0; i < rules.length; i++) + if ($shouldUseRule(rules[i])) + return true; + } + + function $shouldUseRule($rule) { + return it.schema[$rule.keyword] !== undefined || + ($rule.implements && $ruleImplementsSomeKeyword($rule)); + } + + function $ruleImplementsSomeKeyword($rule) { + var impl = $rule.implements; + for (var i=0; i < impl.length; i++) + if (it.schema[impl[i]] !== undefined) + return true; + } +}} diff --git a/node_modules/table/node_modules/ajv/lib/dotjs/README.md b/node_modules/table/node_modules/ajv/lib/dotjs/README.md new file mode 100644 index 0000000..4d99484 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dotjs/README.md @@ -0,0 +1,3 @@ +These files are compiled dot templates from dot folder. + +Do NOT edit them directly, edit the templates and run `npm run build` from main ajv folder. diff --git a/node_modules/table/node_modules/ajv/lib/dotjs/_limit.js b/node_modules/table/node_modules/ajv/lib/dotjs/_limit.js new file mode 100644 index 0000000..10a187f --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dotjs/_limit.js @@ -0,0 +1,149 @@ +'use strict'; +module.exports = function generate__limit(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $isMax = $keyword == 'maximum', + $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum', + $schemaExcl = it.schema[$exclusiveKeyword], + $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data, + $op = $isMax ? '<' : '>', + $notOp = $isMax ? '>' : '<', + $errorKeyword = undefined; + if ($isDataExcl) { + var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), + $exclusive = 'exclusive' + $lvl, + $exclType = 'exclType' + $lvl, + $exclIsNumber = 'exclIsNumber' + $lvl, + $opExpr = 'op' + $lvl, + $opStr = '\' + ' + $opExpr + ' + \''; + out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; + $schemaValueExcl = 'schemaExcl' + $lvl; + out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { '; + var $errorKeyword = $exclusiveKeyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';'; + } else { + var $exclIsNumber = typeof $schemaExcl == 'number', + $opStr = $op; + if ($exclIsNumber && $isData) { + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { '; + } else { + if ($exclIsNumber && $schema === undefined) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaExcl; + $notOp += '='; + } else { + if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); + if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $notOp += '='; + } else { + $exclusive = false; + $opStr += '='; + } + } + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { '; + } + } + $errorKeyword = $errorKeyword || $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be ' + ($opStr) + ' '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/node_modules/table/node_modules/ajv/lib/dotjs/_limitItems.js b/node_modules/table/node_modules/ajv/lib/dotjs/_limitItems.js new file mode 100644 index 0000000..16e37f2 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dotjs/_limitItems.js @@ -0,0 +1,76 @@ +'use strict'; +module.exports = function generate__limitItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxItems' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxItems') { + out += 'more'; + } else { + out += 'less'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/node_modules/table/node_modules/ajv/lib/dotjs/_limitLength.js b/node_modules/table/node_modules/ajv/lib/dotjs/_limitLength.js new file mode 100644 index 0000000..e6927f3 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dotjs/_limitLength.js @@ -0,0 +1,81 @@ +'use strict'; +module.exports = function generate__limitLength(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxLength' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + if (it.opts.unicode === false) { + out += ' ' + ($data) + '.length '; + } else { + out += ' ucs2length(' + ($data) + ') '; + } + out += ' ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be '; + if ($keyword == 'maxLength') { + out += 'longer'; + } else { + out += 'shorter'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' characters\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/node_modules/table/node_modules/ajv/lib/dotjs/_limitProperties.js b/node_modules/table/node_modules/ajv/lib/dotjs/_limitProperties.js new file mode 100644 index 0000000..a48308f --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dotjs/_limitProperties.js @@ -0,0 +1,76 @@ +'use strict'; +module.exports = function generate__limitProperties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxProperties' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxProperties') { + out += 'more'; + } else { + out += 'less'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' properties\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/node_modules/table/node_modules/ajv/lib/dotjs/allOf.js b/node_modules/table/node_modules/ajv/lib/dotjs/allOf.js new file mode 100644 index 0000000..5107b18 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dotjs/allOf.js @@ -0,0 +1,43 @@ +'use strict'; +module.exports = function generate_allOf(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $currentBaseId = $it.baseId, + $allSchemasEmpty = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + $allSchemasEmpty = false; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($breakOnError) { + if ($allSchemasEmpty) { + out += ' if (true) { '; + } else { + out += ' ' + ($closingBraces.slice(0, -1)) + ' '; + } + } + out = it.util.cleanUpCode(out); + return out; +} diff --git a/node_modules/table/node_modules/ajv/lib/dotjs/anyOf.js b/node_modules/table/node_modules/ajv/lib/dotjs/anyOf.js new file mode 100644 index 0000000..994b091 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dotjs/anyOf.js @@ -0,0 +1,73 @@ +'use strict'; +module.exports = function generate_anyOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $noEmptySchema = $schema.every(function($sch) { + return it.util.schemaHasRules($sch, it.RULES.all); + }); + if ($noEmptySchema) { + var $currentBaseId = $it.baseId; + out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { '; + $closingBraces += '}'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should match some schema in anyOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + out = it.util.cleanUpCode(out); + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} diff --git a/node_modules/table/node_modules/ajv/lib/dotjs/comment.js b/node_modules/table/node_modules/ajv/lib/dotjs/comment.js new file mode 100644 index 0000000..dd66bb8 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dotjs/comment.js @@ -0,0 +1,14 @@ +'use strict'; +module.exports = function generate_comment(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $comment = it.util.toQuotedString($schema); + if (it.opts.$comment === true) { + out += ' console.log(' + ($comment) + ');'; + } else if (typeof it.opts.$comment == 'function') { + out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);'; + } + return out; +} diff --git a/node_modules/table/node_modules/ajv/lib/dotjs/const.js b/node_modules/table/node_modules/ajv/lib/dotjs/const.js new file mode 100644 index 0000000..acad86f --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dotjs/const.js @@ -0,0 +1,55 @@ +'use strict'; +module.exports = function generate_const(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!$isData) { + out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';'; + } + out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be equal to constant\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/node_modules/table/node_modules/ajv/lib/dotjs/contains.js b/node_modules/table/node_modules/ajv/lib/dotjs/contains.js new file mode 100644 index 0000000..04c6e93 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dotjs/contains.js @@ -0,0 +1,81 @@ +'use strict'; +module.exports = function generate_contains(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId, + $nonEmptySchema = it.util.schemaHasRules($schema, it.RULES.all); + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($nonEmptySchema) { + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (' + ($nextValid) + ') break; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {'; + } else { + out += ' if (' + ($data) + '.length == 0) {'; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should contain a valid item\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + if ($nonEmptySchema) { + out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + } + if (it.opts.allErrors) { + out += ' } '; + } + out = it.util.cleanUpCode(out); + return out; +} diff --git a/node_modules/table/node_modules/ajv/lib/dotjs/custom.js b/node_modules/table/node_modules/ajv/lib/dotjs/custom.js new file mode 100644 index 0000000..0623e24 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dotjs/custom.js @@ -0,0 +1,226 @@ +'use strict'; +module.exports = function generate_custom(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $rule = this, + $definition = 'definition' + $lvl, + $rDef = $rule.definition, + $closingBraces = ''; + var $compile, $inline, $macro, $ruleValidate, $validateCode; + if ($isData && $rDef.$data) { + $validateCode = 'keywordValidate' + $lvl; + var $validateSchema = $rDef.validateSchema; + out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;'; + } else { + $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); + if (!$ruleValidate) return; + $schemaValue = 'validate.schema' + $schemaPath; + $validateCode = $ruleValidate.code; + $compile = $rDef.compile; + $inline = $rDef.inline; + $macro = $rDef.macro; + } + var $ruleErrs = $validateCode + '.errors', + $i = 'i' + $lvl, + $ruleErr = 'ruleErr' + $lvl, + $asyncKeyword = $rDef.async; + if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema'); + if (!($inline || $macro)) { + out += '' + ($ruleErrs) + ' = null;'; + } + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($isData && $rDef.$data) { + $closingBraces += '}'; + out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { '; + if ($validateSchema) { + $closingBraces += '}'; + out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { '; + } + } + if ($inline) { + if ($rDef.statements) { + out += ' ' + ($ruleValidate.validate) + ' '; + } else { + out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; '; + } + } else if ($macro) { + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + $it.schema = $ruleValidate.validate; + $it.schemaPath = ''; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($code); + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + out += ' ' + ($validateCode) + '.call( '; + if (it.opts.passContext) { + out += 'this'; + } else { + out += 'self'; + } + if ($compile || $rDef.schema === false) { + out += ' , ' + ($data) + ' '; + } else { + out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' '; + } + out += ' , (dataPath || \'\')'; + if (it.errorPath != '""') { + out += ' + ' + (it.errorPath); + } + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) '; + var def_callRuleValidate = out; + out = $$outStack.pop(); + if ($rDef.errors === false) { + out += ' ' + ($valid) + ' = '; + if ($asyncKeyword) { + out += 'await '; + } + out += '' + (def_callRuleValidate) + '; '; + } else { + if ($asyncKeyword) { + $ruleErrs = 'customErrors' + $lvl; + out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = await ' + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } '; + } else { + out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; '; + } + } + } + if ($rDef.modifying) { + out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];'; + } + out += '' + ($closingBraces); + if ($rDef.valid) { + if ($breakOnError) { + out += ' if (true) { '; + } + } else { + out += ' if ( '; + if ($rDef.valid === undefined) { + out += ' !'; + if ($macro) { + out += '' + ($nextValid); + } else { + out += '' + ($valid); + } + } else { + out += ' ' + (!$rDef.valid) + ' '; + } + out += ') { '; + $errorKeyword = $rule.keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + var def_customError = out; + out = $$outStack.pop(); + if ($inline) { + if ($rDef.errors) { + if ($rDef.errors != 'full') { + out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '= 0) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } else { + throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); + } + } + var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate; + var $formatType = $isObject && $format.type || 'string'; + if ($isObject) { + var $async = $format.async === true; + $format = $format.validate; + } + if ($formatType != $ruleType) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } + if ($async) { + if (!it.async) throw new Error('async format in sync schema'); + var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; + out += ' if (!(await ' + ($formatRef) + '(' + ($data) + '))) { '; + } else { + out += ' if (! '; + var $formatRef = 'formats' + it.util.getProperty($schema); + if ($isObject) $formatRef += '.validate'; + if (typeof $format == 'function') { + out += ' ' + ($formatRef) + '(' + ($data) + ') '; + } else { + out += ' ' + ($formatRef) + '.test(' + ($data) + ') '; + } + out += ') { '; + } + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match format "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/node_modules/table/node_modules/ajv/lib/dotjs/if.js b/node_modules/table/node_modules/ajv/lib/dotjs/if.js new file mode 100644 index 0000000..6f0ea64 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dotjs/if.js @@ -0,0 +1,103 @@ +'use strict'; +module.exports = function generate_if(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + var $thenSch = it.schema['then'], + $elseSch = it.schema['else'], + $thenPresent = $thenSch !== undefined && it.util.schemaHasRules($thenSch, it.RULES.all), + $elsePresent = $elseSch !== undefined && it.util.schemaHasRules($elseSch, it.RULES.all), + $currentBaseId = $it.baseId; + if ($thenPresent || $elsePresent) { + var $ifClause; + $it.createErrors = false; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = true; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + $it.createErrors = true; + out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + if ($thenPresent) { + out += ' if (' + ($nextValid) + ') { '; + $it.schema = it.schema['then']; + $it.schemaPath = it.schemaPath + '.then'; + $it.errSchemaPath = it.errSchemaPath + '/then'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; + if ($thenPresent && $elsePresent) { + $ifClause = 'ifClause' + $lvl; + out += ' var ' + ($ifClause) + ' = \'then\'; '; + } else { + $ifClause = '\'then\''; + } + out += ' } '; + if ($elsePresent) { + out += ' else { '; + } + } else { + out += ' if (!' + ($nextValid) + ') { '; + } + if ($elsePresent) { + $it.schema = it.schema['else']; + $it.schemaPath = it.schemaPath + '.else'; + $it.errSchemaPath = it.errSchemaPath + '/else'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; + if ($thenPresent && $elsePresent) { + $ifClause = 'ifClause' + $lvl; + out += ' var ' + ($ifClause) + ' = \'else\'; '; + } else { + $ifClause = '\'else\''; + } + out += ' } '; + } + out += ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('if') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { failingKeyword: ' + ($ifClause) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match "\' + ' + ($ifClause) + ' + \'" schema\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + out = it.util.cleanUpCode(out); + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} diff --git a/node_modules/table/node_modules/ajv/lib/dotjs/index.js b/node_modules/table/node_modules/ajv/lib/dotjs/index.js new file mode 100644 index 0000000..2fb1b00 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dotjs/index.js @@ -0,0 +1,33 @@ +'use strict'; + +//all requires must be explicit because browserify won't work with dynamic requires +module.exports = { + '$ref': require('./ref'), + allOf: require('./allOf'), + anyOf: require('./anyOf'), + '$comment': require('./comment'), + const: require('./const'), + contains: require('./contains'), + dependencies: require('./dependencies'), + 'enum': require('./enum'), + format: require('./format'), + 'if': require('./if'), + items: require('./items'), + maximum: require('./_limit'), + minimum: require('./_limit'), + maxItems: require('./_limitItems'), + minItems: require('./_limitItems'), + maxLength: require('./_limitLength'), + minLength: require('./_limitLength'), + maxProperties: require('./_limitProperties'), + minProperties: require('./_limitProperties'), + multipleOf: require('./multipleOf'), + not: require('./not'), + oneOf: require('./oneOf'), + pattern: require('./pattern'), + properties: require('./properties'), + propertyNames: require('./propertyNames'), + required: require('./required'), + uniqueItems: require('./uniqueItems'), + validate: require('./validate') +}; diff --git a/node_modules/table/node_modules/ajv/lib/dotjs/items.js b/node_modules/table/node_modules/ajv/lib/dotjs/items.js new file mode 100644 index 0000000..77be5e2 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dotjs/items.js @@ -0,0 +1,140 @@ +'use strict'; +module.exports = function generate_items(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId; + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if (Array.isArray($schema)) { + var $additionalItems = it.schema.additionalItems; + if ($additionalItems === false) { + out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + $closingBraces += '}'; + out += ' else { '; + } + } + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { '; + var $passData = $data + '[' + $i + ']'; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); + $it.dataPathArr[$dataNxt] = $i; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if (typeof $additionalItems == 'object' && it.util.schemaHasRules($additionalItems, it.RULES.all)) { + $it.schema = $additionalItems; + $it.schemaPath = it.schemaPath + '.additionalItems'; + $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } else if (it.util.schemaHasRules($schema, it.RULES.all)) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' }'; + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + out = it.util.cleanUpCode(out); + return out; +} diff --git a/node_modules/table/node_modules/ajv/lib/dotjs/multipleOf.js b/node_modules/table/node_modules/ajv/lib/dotjs/multipleOf.js new file mode 100644 index 0000000..df5a315 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dotjs/multipleOf.js @@ -0,0 +1,76 @@ +'use strict'; +module.exports = function generate_multipleOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + out += 'var division' + ($lvl) + ';if ('; + if ($isData) { + out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || '; + } + out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', '; + if (it.opts.multipleOfPrecision) { + out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' '; + } else { + out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') '; + } + out += ' ) '; + if ($isData) { + out += ' ) '; + } + out += ' ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be multiple of '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/node_modules/table/node_modules/ajv/lib/dotjs/not.js b/node_modules/table/node_modules/ajv/lib/dotjs/not.js new file mode 100644 index 0000000..67add9f --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dotjs/not.js @@ -0,0 +1,83 @@ +'use strict'; +module.exports = function generate_not(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + if (it.util.schemaHasRules($schema, it.RULES.all)) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.createErrors = false; + var $allErrorsOption; + if ($it.opts.allErrors) { + $allErrorsOption = $it.opts.allErrors; + $it.opts.allErrors = false; + } + out += ' ' + (it.validate($it)) + ' '; + $it.createErrors = true; + if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (' + ($nextValid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + } else { + out += ' var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if ($breakOnError) { + out += ' if (false) { '; + } + } + return out; +} diff --git a/node_modules/table/node_modules/ajv/lib/dotjs/oneOf.js b/node_modules/table/node_modules/ajv/lib/dotjs/oneOf.js new file mode 100644 index 0000000..b6be640 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dotjs/oneOf.js @@ -0,0 +1,72 @@ +'use strict'; +module.exports = function generate_oneOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $currentBaseId = $it.baseId, + $prevValid = 'prevValid' + $lvl, + $passingSchemas = 'passingSchemas' + $lvl; + out += 'var ' + ($errs) + ' = errors , ' + ($prevValid) + ' = false , ' + ($valid) + ' = false , ' + ($passingSchemas) + ' = null; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + } else { + out += ' var ' + ($nextValid) + ' = true; '; + } + if ($i) { + out += ' if (' + ($nextValid) + ' && ' + ($prevValid) + ') { ' + ($valid) + ' = false; ' + ($passingSchemas) + ' = [' + ($passingSchemas) + ', ' + ($i) + ']; } else { '; + $closingBraces += '}'; + } + out += ' if (' + ($nextValid) + ') { ' + ($valid) + ' = ' + ($prevValid) + ' = true; ' + ($passingSchemas) + ' = ' + ($i) + '; }'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { passingSchemas: ' + ($passingSchemas) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match exactly one schema in oneOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }'; + if (it.opts.allErrors) { + out += ' } '; + } + return out; +} diff --git a/node_modules/table/node_modules/ajv/lib/dotjs/pattern.js b/node_modules/table/node_modules/ajv/lib/dotjs/pattern.js new file mode 100644 index 0000000..76b7794 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dotjs/pattern.js @@ -0,0 +1,74 @@ +'use strict'; +module.exports = function generate_pattern(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema); + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match pattern "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/node_modules/table/node_modules/ajv/lib/dotjs/properties.js b/node_modules/table/node_modules/ajv/lib/dotjs/properties.js new file mode 100644 index 0000000..41c61ce --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dotjs/properties.js @@ -0,0 +1,328 @@ +'use strict'; +module.exports = function generate_properties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl; + var $schemaKeys = Object.keys($schema || {}), + $pProperties = it.schema.patternProperties || {}, + $pPropertyKeys = Object.keys($pProperties), + $aProperties = it.schema.additionalProperties, + $someProperties = $schemaKeys.length || $pPropertyKeys.length, + $noAdditional = $aProperties === false, + $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length, + $removeAdditional = it.opts.removeAdditional, + $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + var $required = it.schema.required; + if ($required && !(it.opts.v5 && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required); + out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined;'; + } + if ($checkAdditional) { + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + if ($someProperties) { + out += ' var isAdditional' + ($lvl) + ' = !(false '; + if ($schemaKeys.length) { + if ($schemaKeys.length > 5) { + out += ' || validate.schema' + ($schemaPath) + '[' + ($key) + '] '; + } else { + var arr1 = $schemaKeys; + if (arr1) { + var $propertyKey, i1 = -1, + l1 = arr1.length - 1; + while (i1 < l1) { + $propertyKey = arr1[i1 += 1]; + out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' '; + } + } + } + } + if ($pPropertyKeys.length) { + var arr2 = $pPropertyKeys; + if (arr2) { + var $pProperty, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $pProperty = arr2[$i += 1]; + out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') '; + } + } + } + out += ' ); if (isAdditional' + ($lvl) + ') { '; + } + if ($removeAdditional == 'all') { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + var $currentErrorPath = it.errorPath; + var $additionalProperty = '\' + ' + $key + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + } + if ($noAdditional) { + if ($removeAdditional) { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + out += ' ' + ($nextValid) + ' = false; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalProperties'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is an invalid additional property'; + } else { + out += 'should NOT have additional properties'; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + out += ' break; '; + } + } + } else if ($additionalIsSchema) { + if ($removeAdditional == 'failing') { + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + } else { + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + } + } + it.errorPath = $currentErrorPath; + } + if ($someProperties) { + out += ' } '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + var $useDefaults = it.opts.useDefaults && !it.compositeRule; + if ($schemaKeys.length) { + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + var $prop = it.util.getProperty($propertyKey), + $passData = $data + $prop, + $hasDefault = $useDefaults && $sch.default !== undefined; + $it.schema = $sch; + $it.schemaPath = $schemaPath + $prop; + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); + $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); + $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + $code = it.util.varReplace($code, $nextData, $passData); + var $useData = $passData; + } else { + var $useData = $nextData; + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; '; + } + if ($hasDefault) { + out += ' ' + ($code) + ' '; + } else { + if ($requiredHash && $requiredHash[$propertyKey]) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = false; '; + var $currentErrorPath = it.errorPath, + $currErrSchemaPath = $errSchemaPath, + $missingProperty = it.util.escapeQuotes($propertyKey); + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + $errSchemaPath = it.errSchemaPath + '/required'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + it.errorPath = $currentErrorPath; + out += ' } else { '; + } else { + if ($breakOnError) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = true; } else { '; + } else { + out += ' if (' + ($useData) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ' ) { '; + } + } + out += ' ' + ($code) + ' } '; + } + } + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($pPropertyKeys.length) { + var arr4 = $pPropertyKeys; + if (arr4) { + var $pProperty, i4 = -1, + l4 = arr4.length - 1; + while (i4 < l4) { + $pProperty = arr4[i4 += 1]; + var $sch = $pProperties[$pProperty]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + $it.schema = $sch; + $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); + $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else ' + ($nextValid) + ' = true; '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + out = it.util.cleanUpCode(out); + return out; +} diff --git a/node_modules/table/node_modules/ajv/lib/dotjs/propertyNames.js b/node_modules/table/node_modules/ajv/lib/dotjs/propertyNames.js new file mode 100644 index 0000000..0cedcda --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dotjs/propertyNames.js @@ -0,0 +1,81 @@ +'use strict'; +module.exports = function generate_propertyNames(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + if (it.util.schemaHasRules($schema, it.RULES.all)) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $i = 'i' + $lvl, + $invalidName = '\' + ' + $key + ' + \'', + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + out += ' var ' + ($errs) + ' = errors; '; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined; '; + } + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' var startErrs' + ($lvl) + ' = errors; '; + var $passData = $key; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + '= it.opts.loopRequired, + $ownProperties = it.opts.ownProperties; + if ($breakOnError) { + out += ' var missing' + ($lvl) + '; '; + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + out += ' var ' + ($valid) + ' = true; '; + if ($isData) { + out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; + } + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += '; if (!' + ($valid) + ') break; } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + } else { + out += ' if ( '; + var arr2 = $required; + if (arr2) { + var $propertyKey, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $propertyKey = arr2[$i += 1]; + if ($i) { + out += ' || '; + } + var $prop = it.util.getProperty($propertyKey), + $useData = $data + $prop; + out += ' ( ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; + } + } + out += ') { '; + var $propertyPath = 'missing' + $lvl, + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + } + } else { + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + if ($isData) { + out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { '; + } + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } '; + if ($isData) { + out += ' } '; + } + } else { + var arr3 = $required; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $prop = it.util.getProperty($propertyKey), + $missingProperty = it.util.escapeQuotes($propertyKey), + $useData = $data + $prop; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; + } + } + } + } + it.errorPath = $currentErrorPath; + } else if ($breakOnError) { + out += ' if (true) {'; + } + return out; +} diff --git a/node_modules/table/node_modules/ajv/lib/dotjs/uniqueItems.js b/node_modules/table/node_modules/ajv/lib/dotjs/uniqueItems.js new file mode 100644 index 0000000..bbf9668 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dotjs/uniqueItems.js @@ -0,0 +1,78 @@ +'use strict'; +module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (($schema || $isData) && it.opts.uniqueItems !== false) { + if ($isData) { + out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { '; + } + out += ' var i = ' + ($data) + '.length , ' + ($valid) + ' = true , j; if (i > 1) { '; + var $itemType = it.schema.items && it.schema.items.type; + if (!$itemType || $itemType == 'object' || $itemType == 'array') { + out += ' outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } '; + } else { + out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; if (typeof item != \'' + ($itemType) + '\') continue; if (itemIndices[item] !== undefined) { ' + ($valid) + ' = false; j = itemIndices[item]; break; } itemIndices[item] = i; } '; + } + out += ' } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} diff --git a/node_modules/table/node_modules/ajv/lib/dotjs/validate.js b/node_modules/table/node_modules/ajv/lib/dotjs/validate.js new file mode 100644 index 0000000..9f9e1ae --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/dotjs/validate.js @@ -0,0 +1,445 @@ +'use strict'; +module.exports = function generate_validate(it, $keyword, $ruleType) { + var out = ''; + var $async = it.schema.$async === true, + $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'), + $id = it.self._getId(it.schema); + if (it.isTop) { + out += ' var validate = '; + if ($async) { + it.async = true; + out += 'async '; + } + out += 'function(data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; '; + if ($id && (it.opts.sourceCode || it.opts.processCode)) { + out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' '; + } + } + if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) { + var $keyword = 'false schema'; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + if (it.schema === false) { + if (it.isTop) { + $breakOnError = true; + } else { + out += ' var ' + ($valid) + ' = false; '; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'boolean schema is false\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } else { + if (it.isTop) { + if ($async) { + out += ' return data; '; + } else { + out += ' validate.errors = null; return true; '; + } + } else { + out += ' var ' + ($valid) + ' = true; '; + } + } + if (it.isTop) { + out += ' }; return validate; '; + } + return out; + } + if (it.isTop) { + var $top = it.isTop, + $lvl = it.level = 0, + $dataLvl = it.dataLevel = 0, + $data = 'data'; + it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); + it.baseId = it.baseId || it.rootId; + delete it.isTop; + it.dataPathArr = [undefined]; + out += ' var vErrors = null; '; + out += ' var errors = 0; '; + out += ' if (rootData === undefined) rootData = data; '; + } else { + var $lvl = it.level, + $dataLvl = it.dataLevel, + $data = 'data' + ($dataLvl || ''); + if ($id) it.baseId = it.resolve.url(it.baseId, $id); + if ($async && !it.async) throw new Error('async schema in sync schema'); + out += ' var errs_' + ($lvl) + ' = errors;'; + } + var $valid = 'valid' + $lvl, + $breakOnError = !it.opts.allErrors, + $closingBraces1 = '', + $closingBraces2 = ''; + var $errorKeyword; + var $typeSchema = it.schema.type, + $typeIsArray = Array.isArray($typeSchema); + if ($typeIsArray && $typeSchema.length == 1) { + $typeSchema = $typeSchema[0]; + $typeIsArray = false; + } + if (it.schema.$ref && $refKeywords) { + if (it.opts.extendRefs == 'fail') { + throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); + } else if (it.opts.extendRefs !== true) { + $refKeywords = false; + it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); + } + } + if (it.schema.$comment && it.opts.$comment) { + out += ' ' + (it.RULES.all.$comment.code(it, '$comment')); + } + if ($typeSchema) { + if (it.opts.coerceTypes) { + var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); + } + var $rulesGroup = it.RULES.types[$typeSchema]; + if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) { + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type', + $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; + out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { '; + if ($coerceToTypes) { + var $dataType = 'dataType' + $lvl, + $coerced = 'coerced' + $lvl; + out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; '; + if (it.opts.coerceTypes == 'array') { + out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ')) ' + ($dataType) + ' = \'array\'; '; + } + out += ' var ' + ($coerced) + ' = undefined; '; + var $bracesCoercion = ''; + var arr1 = $coerceToTypes; + if (arr1) { + var $type, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $type = arr1[$i += 1]; + if ($i) { + out += ' if (' + ($coerced) + ' === undefined) { '; + $bracesCoercion += '}'; + } + if (it.opts.coerceTypes == 'array' && $type != 'array') { + out += ' if (' + ($dataType) + ' == \'array\' && ' + ($data) + '.length == 1) { ' + ($coerced) + ' = ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; } '; + } + if ($type == 'string') { + out += ' if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; + } else if ($type == 'number' || $type == 'integer') { + out += ' if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; + if ($type == 'integer') { + out += ' && !(' + ($data) + ' % 1)'; + } + out += ')) ' + ($coerced) + ' = +' + ($data) + '; '; + } else if ($type == 'boolean') { + out += ' if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; + } else if ($type == 'null') { + out += ' if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; + } else if (it.opts.coerceTypes == 'array' && $type == 'array') { + out += ' if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; + } + } + } + out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' ' + ($data) + ' = ' + ($coerced) + '; '; + if (!$dataLvl) { + out += 'if (' + ($parentData) + ' !== undefined)'; + } + out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } '; + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } + out += ' } '; + } + } + if (it.schema.$ref && !$refKeywords) { + out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' '; + if ($breakOnError) { + out += ' } if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } else { + var arr2 = it.RULES; + if (arr2) { + var $rulesGroup, i2 = -1, + l2 = arr2.length - 1; + while (i2 < l2) { + $rulesGroup = arr2[i2 += 1]; + if ($shouldUseGroup($rulesGroup)) { + if ($rulesGroup.type) { + out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data)) + ') { '; + } + if (it.opts.useDefaults && !it.compositeRule) { + if ($rulesGroup.type == 'object' && it.schema.properties) { + var $schema = it.schema.properties, + $schemaKeys = Object.keys($schema); + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if ($sch.default !== undefined) { + var $passData = $data + it.util.getProperty($propertyKey); + out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) { + var arr4 = it.schema.items; + if (arr4) { + var $sch, $i = -1, + l4 = arr4.length - 1; + while ($i < l4) { + $sch = arr4[$i += 1]; + if ($sch.default !== undefined) { + var $passData = $data + '[' + $i + ']'; + out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } + } + var arr5 = $rulesGroup.rules; + if (arr5) { + var $rule, i5 = -1, + l5 = arr5.length - 1; + while (i5 < l5) { + $rule = arr5[i5 += 1]; + if ($shouldUseRule($rule)) { + var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); + if ($code) { + out += ' ' + ($code) + ' '; + if ($breakOnError) { + $closingBraces1 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces1) + ' '; + $closingBraces1 = ''; + } + if ($rulesGroup.type) { + out += ' } '; + if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { + out += ' else { '; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + } + } + if ($breakOnError) { + out += ' if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces2) + ' '; + } + if ($top) { + if ($async) { + out += ' if (errors === 0) return data; '; + out += ' else throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; '; + out += ' return errors === 0; '; + } + out += ' }; return validate;'; + } else { + out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';'; + } + out = it.util.cleanUpCode(out); + if ($top) { + out = it.util.finalCleanUpCode(out, $async); + } + + function $shouldUseGroup($rulesGroup) { + var rules = $rulesGroup.rules; + for (var i = 0; i < rules.length; i++) + if ($shouldUseRule(rules[i])) return true; + } + + function $shouldUseRule($rule) { + return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule)); + } + + function $ruleImplementsSomeKeyword($rule) { + var impl = $rule.implements; + for (var i = 0; i < impl.length; i++) + if (it.schema[impl[i]] !== undefined) return true; + } + return out; +} diff --git a/node_modules/table/node_modules/ajv/lib/keyword.js b/node_modules/table/node_modules/ajv/lib/keyword.js new file mode 100644 index 0000000..6ed84c1 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/keyword.js @@ -0,0 +1,135 @@ +'use strict'; + +var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; +var customRuleCode = require('./dotjs/custom'); + +module.exports = { + add: addKeyword, + get: getKeyword, + remove: removeKeyword +}; + +/** + * Define custom keyword + * @this Ajv + * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords). + * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`. + * @return {Ajv} this for method chaining + */ +function addKeyword(keyword, definition) { + /* jshint validthis: true */ + /* eslint no-shadow: 0 */ + var RULES = this.RULES; + + if (RULES.keywords[keyword]) + throw new Error('Keyword ' + keyword + ' is already defined'); + + if (!IDENTIFIER.test(keyword)) + throw new Error('Keyword ' + keyword + ' is not a valid identifier'); + + if (definition) { + if (definition.macro && definition.valid !== undefined) + throw new Error('"valid" option cannot be used with macro keywords'); + + var dataType = definition.type; + if (Array.isArray(dataType)) { + var i, len = dataType.length; + for (i=0; i=6.0.1 <7.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\table" + ] + ], + "_from": "ajv@>=6.0.1 <7.0.0", + "_id": "ajv@6.2.0", + "_inCache": true, + "_location": "/table/ajv", + "_nodeVersion": "4.8.7", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/ajv_6.2.0_1519633437926_0.8819027253059459" + }, + "_npmUser": { + "name": "esp", + "email": "e.poberezkin@me.com" + }, + "_npmVersion": "2.15.11", + "_phantomChildren": {}, + "_requested": { + "raw": "ajv@^6.0.1", + "scope": null, + "escapedName": "ajv", + "name": "ajv", + "rawSpec": "^6.0.1", + "spec": ">=6.0.1 <7.0.0", + "type": "range" + }, + "_requiredBy": [ + "/table" + ], + "_resolved": "https://registry.npmjs.org/ajv/-/ajv-6.2.0.tgz", + "_shasum": "afac295bbaa0152449e522742e4547c1ae9328d2", + "_shrinkwrap": null, + "_spec": "ajv@^6.0.1", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\table", + "author": { + "name": "Evgeny Poberezkin" + }, + "bugs": { + "url": "https://github.com/epoberezkin/ajv/issues" + }, + "dependencies": { + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + }, + "description": "Another JSON Schema Validator", + "devDependencies": { + "ajv-async": "^1.0.0", + "bluebird": "^3.1.5", + "brfs": "^1.4.3", + "browserify": "^16.0.0", + "chai": "^4.0.1", + "coveralls": "^3.0.0", + "del-cli": "^1.1.0", + "dot": "^1.0.3", + "eslint": "^4.14.0", + "gh-pages-generator": "^0.2.0", + "glob": "^7.0.0", + "if-node-version": "^1.0.0", + "js-beautify": "^1.7.3", + "jshint": "^2.9.4", + "json-schema-test": "^2.0.0", + "karma": "^2.0.0", + "karma-chrome-launcher": "^2.0.0", + "karma-mocha": "^1.1.1", + "karma-phantomjs-launcher": "^1.0.0", + "karma-sauce-launcher": "^1.1.0", + "mocha": "^5.0.0", + "nyc": "^11.0.2", + "phantomjs-prebuilt": "^2.1.4", + "pre-commit": "^1.1.1", + "require-globify": "^1.3.0", + "typescript": "^2.6.2", + "uglify-js": "^3.3.1", + "watch": "^1.0.0" + }, + "directories": {}, + "dist": { + "shasum": "afac295bbaa0152449e522742e4547c1ae9328d2", + "tarball": "https://registry.npmjs.org/ajv/-/ajv-6.2.0.tgz", + "fileCount": 90, + "unpackedSize": 863237 + }, + "files": [ + "lib/", + "dist/", + "scripts/", + "LICENSE", + ".tonic_example.js" + ], + "gitHead": "2abd9919fa69112d76e91942753f6288121437ba", + "homepage": "https://github.com/epoberezkin/ajv", + "keywords": [ + "JSON", + "schema", + "validator", + "validation", + "jsonschema", + "json-schema", + "json-schema-validator", + "json-schema-validation" + ], + "license": "MIT", + "main": "lib/ajv.js", + "maintainers": [ + { + "name": "blakeembrey", + "email": "hello@blakeembrey.com" + }, + { + "name": "esp", + "email": "e.poberezkin@me.com" + } + ], + "name": "ajv", + "nyc": { + "exclude": [ + "**/spec/**", + "node_modules" + ], + "reporter": [ + "lcov", + "text-summary" + ] + }, + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/epoberezkin/ajv.git" + }, + "scripts": { + "build": "del-cli lib/dotjs/*.js '!lib/dotjs/index.js' && node scripts/compile-dots.js", + "bundle": "del-cli dist && node ./scripts/bundle.js . Ajv pure_getters", + "bundle-beautify": "node ./scripts/bundle.js js-beautify", + "eslint": "if-node-version \">=4\" eslint lib/*.js lib/compile/*.js spec/*.js scripts", + "jshint": "jshint lib/*.js lib/**/*.js --exclude lib/dotjs/**/*", + "prepublish": "npm run build && npm run bundle", + "test": "npm run jshint && npm run eslint && npm run test-ts && npm run build && npm run test-cov && if-node-version 4 npm run test-browser", + "test-browser": "del-cli .browser && npm run bundle && scripts/prepare-tests && npm run test-karma", + "test-cov": "nyc npm run test-spec", + "test-debug": "mocha spec/*.spec.js --debug-brk -R spec", + "test-fast": "AJV_FAST_TEST=true npm run test-spec", + "test-karma": "karma start --single-run --browsers PhantomJS", + "test-spec": "mocha spec/*.spec.js -R spec $(if-node-version 7 echo --harmony-async-await)", + "test-ts": "tsc --target ES5 --noImplicitAny lib/ajv.d.ts", + "watch": "watch 'npm run build' ./lib/dot" + }, + "tonicExampleFilename": ".tonic_example.js", + "typings": "lib/ajv.d.ts", + "version": "6.2.0" +} diff --git a/node_modules/table/node_modules/ajv/scripts/.eslintrc.yml b/node_modules/table/node_modules/ajv/scripts/.eslintrc.yml new file mode 100644 index 0000000..493d7d3 --- /dev/null +++ b/node_modules/table/node_modules/ajv/scripts/.eslintrc.yml @@ -0,0 +1,3 @@ +rules: + no-console: 0 + no-empty: [2, allowEmptyCatch: true] diff --git a/node_modules/table/node_modules/ajv/scripts/bundle.js b/node_modules/table/node_modules/ajv/scripts/bundle.js new file mode 100644 index 0000000..e381a76 --- /dev/null +++ b/node_modules/table/node_modules/ajv/scripts/bundle.js @@ -0,0 +1,61 @@ +'use strict'; + +var fs = require('fs') + , path = require('path') + , browserify = require('browserify') + , uglify = require('uglify-js'); + +var pkg = process.argv[2] + , standalone = process.argv[3] + , compress = process.argv[4]; + +var packageDir = path.join(__dirname, '..'); +if (pkg != '.') packageDir = path.join(packageDir, 'node_modules', pkg); + +var json = require(path.join(packageDir, 'package.json')); + +var distDir = path.join(__dirname, '..', 'dist'); +if (!fs.existsSync(distDir)) fs.mkdirSync(distDir); + +var bOpts = {}; +if (standalone) bOpts.standalone = standalone; + +browserify(bOpts) +.require(path.join(packageDir, json.main), {expose: json.name}) +.bundle(function (err, buf) { + if (err) { + console.error('browserify error:', err); + process.exit(1); + } + + var outputFile = path.join(distDir, json.name); + var uglifyOpts = { + warnings: true, + compress: {}, + output: { + preamble: '/* ' + json.name + ' ' + json.version + ': ' + json.description + ' */' + } + }; + if (compress) { + var compressOpts = compress.split(','); + for (var i=0, il = compressOpts.length; i ../ajv-dist/bower.json + cd ../ajv-dist + + if [[ `git status --porcelain` ]]; then + echo "Changes detected. Updating master branch..." + git add -A + git commit -m "updated by travis build #$TRAVIS_BUILD_NUMBER" + git push --quiet origin master > /dev/null 2>&1 + fi + + echo "Publishing tag..." + + git tag $TRAVIS_TAG + git push --tags > /dev/null 2>&1 + + echo "Done" +fi diff --git a/node_modules/table/node_modules/ajv/scripts/travis-gh-pages b/node_modules/table/node_modules/ajv/scripts/travis-gh-pages new file mode 100644 index 0000000..46ded16 --- /dev/null +++ b/node_modules/table/node_modules/ajv/scripts/travis-gh-pages @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +set -e + +if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" && $TRAVIS_JOB_NUMBER =~ ".3" ]]; then + git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qE '\.md$|^LICENSE$|travis-gh-pages$' && { + rm -rf ../gh-pages + git clone -b gh-pages --single-branch https://${GITHUB_TOKEN}@github.com/epoberezkin/ajv.git ../gh-pages + mkdir -p ../gh-pages/_source + cp *.md ../gh-pages/_source + cp LICENSE ../gh-pages/_source + currentDir=$(pwd) + cd ../gh-pages + $currentDir/node_modules/.bin/gh-pages-generator + # remove logo from README + sed -i -E "s/]+ajv_logo[^>]+>//" index.md + git config user.email "$GIT_USER_EMAIL" + git config user.name "$GIT_USER_NAME" + git add . + git commit -am "updated by travis build #$TRAVIS_BUILD_NUMBER" + git push --quiet origin gh-pages > /dev/null 2>&1 + } +fi diff --git a/node_modules/table/node_modules/ansi-regex/index.js b/node_modules/table/node_modules/ansi-regex/index.js new file mode 100644 index 0000000..c4aaecf --- /dev/null +++ b/node_modules/table/node_modules/ansi-regex/index.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = () => { + const pattern = [ + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)', + '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))' + ].join('|'); + + return new RegExp(pattern, 'g'); +}; diff --git a/node_modules/table/node_modules/ansi-regex/license b/node_modules/table/node_modules/ansi-regex/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/table/node_modules/ansi-regex/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/table/node_modules/ansi-regex/package.json b/node_modules/table/node_modules/ansi-regex/package.json new file mode 100644 index 0000000..cccd1e4 --- /dev/null +++ b/node_modules/table/node_modules/ansi-regex/package.json @@ -0,0 +1,141 @@ +{ + "_args": [ + [ + { + "raw": "ansi-regex@^3.0.0", + "scope": null, + "escapedName": "ansi-regex", + "name": "ansi-regex", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\inquirer\\node_modules\\strip-ansi" + ], + [ + { + "raw": "ansi-regex@^3.0.0", + "scope": null, + "escapedName": "ansi-regex", + "name": "ansi-regex", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\table\\node_modules\\strip-ansi" + ] + ], + "_from": "ansi-regex@^3.0.0", + "_id": "ansi-regex@3.0.0", + "_inCache": true, + "_location": "/table/ansi-regex", + "_nodeVersion": "4.8.3", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/ansi-regex-3.0.0.tgz_1497985412590_0.5700640194118023" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "2.15.11", + "_phantomChildren": {}, + "_requested": { + "raw": "ansi-regex@^3.0.0", + "scope": null, + "escapedName": "ansi-regex", + "name": "ansi-regex", + "rawSpec": "^3.0.0", + "spec": ">=3.0.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/table/strip-ansi" + ], + "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "_shasum": "ed0317c322064f79466c02966bddb605ab37d998", + "_shrinkwrap": null, + "_spec": "ansi-regex@^3.0.0", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\table\\node_modules\\strip-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/ansi-regex/issues" + }, + "dependencies": {}, + "description": "Regular expression for matching ANSI escape codes", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "ed0317c322064f79466c02966bddb605ab37d998", + "tarball": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "0a8cc19946c03c38520fe8c086b8adb66f9cce0b", + "homepage": "https://github.com/chalk/ansi-regex#readme", + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "license": "MIT", + "maintainers": [ + { + "name": "dthree", + "email": "threedeecee@gmail.com" + }, + { + "name": "qix", + "email": "i.am.qix@gmail.com" + }, + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "ansi-regex", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-regex.git" + }, + "scripts": { + "test": "xo && ava", + "view-supported": "node fixtures/view-codes.js" + }, + "version": "3.0.0" +} diff --git a/node_modules/table/node_modules/ansi-regex/readme.md b/node_modules/table/node_modules/ansi-regex/readme.md new file mode 100644 index 0000000..22db1c3 --- /dev/null +++ b/node_modules/table/node_modules/ansi-regex/readme.md @@ -0,0 +1,46 @@ +# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex) + +> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install ansi-regex +``` + + +## Usage + +```js +const ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001B[4mcake\u001B[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001B[4mcake\u001B[0m'.match(ansiRegex()); +//=> ['\u001B[4m', '\u001B[0m'] +``` + + +## FAQ + +### Why do you test for codes not in the ECMA 48 standard? + +Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. + +On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + + +## License + +MIT diff --git a/node_modules/table/node_modules/ansi-styles/index.js b/node_modules/table/node_modules/ansi-styles/index.js new file mode 100644 index 0000000..3d3baa6 --- /dev/null +++ b/node_modules/table/node_modules/ansi-styles/index.js @@ -0,0 +1,152 @@ +'use strict'; +const colorConvert = require('color-convert'); + +const wrapAnsi16 = (fn, offset) => function () { + const code = fn.apply(colorConvert, arguments); + return `\u001B[${code + offset}m`; +}; + +const wrapAnsi256 = (fn, offset) => function () { + const code = fn.apply(colorConvert, arguments); + return `\u001B[${38 + offset};5;${code}m`; +}; + +const wrapAnsi16m = (fn, offset) => function () { + const rgb = fn.apply(colorConvert, arguments); + return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; +}; + +function assembleStyles() { + const codes = new Map(); + const styles = { + modifier: { + reset: [0, 0], + // 21 isn't widely supported and 22 does the same thing + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + color: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39], + + // Bright color + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39] + }, + bgColor: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + + // Bright color + bgBlackBright: [100, 49], + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49] + } + }; + + // Fix humans + styles.color.grey = styles.color.gray; + + for (const groupName of Object.keys(styles)) { + const group = styles[groupName]; + + for (const styleName of Object.keys(group)) { + const style = group[styleName]; + + styles[styleName] = { + open: `\u001B[${style[0]}m`, + close: `\u001B[${style[1]}m` + }; + + group[styleName] = styles[styleName]; + + codes.set(style[0], style[1]); + } + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + + Object.defineProperty(styles, 'codes', { + value: codes, + enumerable: false + }); + } + + const rgb2rgb = (r, g, b) => [r, g, b]; + + styles.color.close = '\u001B[39m'; + styles.bgColor.close = '\u001B[49m'; + + styles.color.ansi = {}; + styles.color.ansi256 = {}; + styles.color.ansi16m = { + rgb: wrapAnsi16m(rgb2rgb, 0) + }; + + styles.bgColor.ansi = {}; + styles.bgColor.ansi256 = {}; + styles.bgColor.ansi16m = { + rgb: wrapAnsi16m(rgb2rgb, 10) + }; + + for (const key of Object.keys(colorConvert)) { + if (typeof colorConvert[key] !== 'object') { + continue; + } + + const suite = colorConvert[key]; + + if ('ansi16' in suite) { + styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0); + styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10); + } + + if ('ansi256' in suite) { + styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0); + styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10); + } + + if ('rgb' in suite) { + styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0); + styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10); + } + } + + return styles; +} + +// Make the export immutable +Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles +}); diff --git a/node_modules/table/node_modules/ansi-styles/license b/node_modules/table/node_modules/ansi-styles/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/table/node_modules/ansi-styles/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/table/node_modules/ansi-styles/package.json b/node_modules/table/node_modules/ansi-styles/package.json new file mode 100644 index 0000000..adb93fb --- /dev/null +++ b/node_modules/table/node_modules/ansi-styles/package.json @@ -0,0 +1,138 @@ +{ + "_args": [ + [ + { + "raw": "ansi-styles@^3.2.0", + "scope": null, + "escapedName": "ansi-styles", + "name": "ansi-styles", + "rawSpec": "^3.2.0", + "spec": ">=3.2.0 <4.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint\\node_modules\\chalk" + ], + [ + { + "raw": "ansi-styles@^3.2.0", + "scope": null, + "escapedName": "ansi-styles", + "name": "ansi-styles", + "rawSpec": "^3.2.0", + "spec": ">=3.2.0 <4.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\table\\node_modules\\chalk" + ] + ], + "_from": "ansi-styles@^3.2.0", + "_id": "ansi-styles@3.2.0", + "_inCache": true, + "_location": "/table/ansi-styles", + "_nodeVersion": "8.2.1", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/ansi-styles-3.2.0.tgz_1500809147099_0.7141686324030161" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "5.3.0", + "_phantomChildren": {}, + "_requested": { + "raw": "ansi-styles@^3.2.0", + "scope": null, + "escapedName": "ansi-styles", + "name": "ansi-styles", + "rawSpec": "^3.2.0", + "spec": ">=3.2.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/table/chalk" + ], + "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "_shasum": "c159b8d5be0f9e5a6f346dab94f16ce022161b88", + "_shrinkwrap": null, + "_spec": "ansi-styles@^3.2.0", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\table\\node_modules\\chalk", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "ava": { + "require": "babel-polyfill" + }, + "bugs": { + "url": "https://github.com/chalk/ansi-styles/issues" + }, + "dependencies": { + "color-convert": "^1.9.0" + }, + "description": "ANSI escape codes for styling strings in the terminal", + "devDependencies": { + "ava": "*", + "babel-polyfill": "^6.23.0", + "xo": "*" + }, + "directories": {}, + "dist": { + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "shasum": "c159b8d5be0f9e5a6f346dab94f16ce022161b88", + "tarball": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "3340c4d536078a51fd7b5049e939c43c5ab05db3", + "homepage": "https://github.com/chalk/ansi-styles#readme", + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "license": "MIT", + "maintainers": [ + { + "name": "qix", + "email": "i.am.qix@gmail.com" + }, + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "ansi-styles", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-styles.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.2.0" +} diff --git a/node_modules/table/node_modules/ansi-styles/readme.md b/node_modules/table/node_modules/ansi-styles/readme.md new file mode 100644 index 0000000..dce3687 --- /dev/null +++ b/node_modules/table/node_modules/ansi-styles/readme.md @@ -0,0 +1,147 @@ +# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) + +> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal + +You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. + +![](screenshot.png) + + +## Install + +``` +$ npm install ansi-styles +``` + + +## Usage + +```js +const style = require('ansi-styles'); + +console.log(`${style.green.open}Hello world!${style.green.close}`); + + +// Color conversion between 16/256/truecolor +// NOTE: If conversion goes to 16 colors or 256 colors, the original color +// may be degraded to fit that color palette. This means terminals +// that do not support 16 million colors will best-match the +// original color. +console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close); +console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close); +console.log(style.color.ansi16m.hex('#ABCDEF') + 'Hello world!' + style.color.close); +``` + +## API + +Each style has an `open` and `close` property. + + +## Styles + +### Modifiers + +- `reset` +- `bold` +- `dim` +- `italic` *(Not widely supported)* +- `underline` +- `inverse` +- `hidden` +- `strikethrough` *(Not widely supported)* + +### Colors + +- `black` +- `red` +- `green` +- `yellow` +- `blue` +- `magenta` +- `cyan` +- `white` +- `gray` ("bright black") +- `redBright` +- `greenBright` +- `yellowBright` +- `blueBright` +- `magentaBright` +- `cyanBright` +- `whiteBright` + +### Background colors + +- `bgBlack` +- `bgRed` +- `bgGreen` +- `bgYellow` +- `bgBlue` +- `bgMagenta` +- `bgCyan` +- `bgWhite` +- `bgBlackBright` +- `bgRedBright` +- `bgGreenBright` +- `bgYellowBright` +- `bgBlueBright` +- `bgMagentaBright` +- `bgCyanBright` +- `bgWhiteBright` + + +## Advanced usage + +By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. + +- `style.modifier` +- `style.color` +- `style.bgColor` + +###### Example + +```js +console.log(style.color.green.open); +``` + +Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `style.codes`, which returns a `Map` with the open codes as keys and close codes as values. + +###### Example + +```js +console.log(style.codes.get(36)); +//=> 39 +``` + + +## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728) + +`ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors. + +To use these, call the associated conversion function with the intended output, for example: + +```js +style.color.ansi.rgb(100, 200, 15); // RGB to 16 color ansi foreground code +style.bgColor.ansi.rgb(100, 200, 15); // RGB to 16 color ansi background code + +style.color.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code +style.bgColor.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code + +style.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground code +style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code +``` + + +## Related + +- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + + +## License + +MIT diff --git a/node_modules/table/node_modules/chalk/index.js b/node_modules/table/node_modules/chalk/index.js new file mode 100644 index 0000000..1cc5fa8 --- /dev/null +++ b/node_modules/table/node_modules/chalk/index.js @@ -0,0 +1,228 @@ +'use strict'; +const escapeStringRegexp = require('escape-string-regexp'); +const ansiStyles = require('ansi-styles'); +const stdoutColor = require('supports-color').stdout; + +const template = require('./templates.js'); + +const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); + +// `supportsColor.level` → `ansiStyles.color[name]` mapping +const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; + +// `color-convert` models to exclude from the Chalk API due to conflicts and such +const skipModels = new Set(['gray']); + +const styles = Object.create(null); + +function applyOptions(obj, options) { + options = options || {}; + + // Detect level if not set manually + const scLevel = stdoutColor ? stdoutColor.level : 0; + obj.level = options.level === undefined ? scLevel : options.level; + obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0; +} + +function Chalk(options) { + // We check for this.template here since calling `chalk.constructor()` + // by itself will have a `this` of a previously constructed chalk object + if (!this || !(this instanceof Chalk) || this.template) { + const chalk = {}; + applyOptions(chalk, options); + + chalk.template = function () { + const args = [].slice.call(arguments); + return chalkTag.apply(null, [chalk.template].concat(args)); + }; + + Object.setPrototypeOf(chalk, Chalk.prototype); + Object.setPrototypeOf(chalk.template, chalk); + + chalk.template.constructor = Chalk; + + return chalk.template; + } + + applyOptions(this, options); +} + +// Use bright blue on Windows as the normal blue color is illegible +if (isSimpleWindowsTerm) { + ansiStyles.blue.open = '\u001B[94m'; +} + +for (const key of Object.keys(ansiStyles)) { + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + + styles[key] = { + get() { + const codes = ansiStyles[key]; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); + } + }; +} + +styles.visible = { + get() { + return build.call(this, this._styles || [], true, 'visible'); + } +}; + +ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); +for (const model of Object.keys(ansiStyles.color.ansi)) { + if (skipModels.has(model)) { + continue; + } + + styles[model] = { + get() { + const level = this.level; + return function () { + const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.color.close, + closeRe: ansiStyles.color.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; +} + +ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); +for (const model of Object.keys(ansiStyles.bgColor.ansi)) { + if (skipModels.has(model)) { + continue; + } + + const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); + styles[bgModel] = { + get() { + const level = this.level; + return function () { + const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.bgColor.close, + closeRe: ansiStyles.bgColor.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; +} + +const proto = Object.defineProperties(() => {}, styles); + +function build(_styles, _empty, key) { + const builder = function () { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + builder._empty = _empty; + + const self = this; + + Object.defineProperty(builder, 'level', { + enumerable: true, + get() { + return self.level; + }, + set(level) { + self.level = level; + } + }); + + Object.defineProperty(builder, 'enabled', { + enumerable: true, + get() { + return self.enabled; + }, + set(enabled) { + self.enabled = enabled; + } + }); + + // See below for fix regarding invisible grey/dim combination on Windows + builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; + + // `__proto__` is used because we must return a function, but there is + // no way to create a function with a different prototype + builder.__proto__ = proto; // eslint-disable-line no-proto + + return builder; +} + +function applyStyle() { + // Support varags, but simply cast to string in case there's only one arg + const args = arguments; + const argsLen = args.length; + let str = String(arguments[0]); + + if (argsLen === 0) { + return ''; + } + + if (argsLen > 1) { + // Don't slice `arguments`, it prevents V8 optimizations + for (let a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || this.level <= 0 || !str) { + return this._empty ? '' : str; + } + + // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + const originalDim = ansiStyles.dim.open; + if (isSimpleWindowsTerm && this.hasGrey) { + ansiStyles.dim.open = ''; + } + + for (const code of this._styles.slice().reverse()) { + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; + + // Close the styling before a linebreak and reopen + // after next line to fix a bleed issue on macOS + // https://github.com/chalk/chalk/pull/92 + str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); + } + + // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue + ansiStyles.dim.open = originalDim; + + return str; +} + +function chalkTag(chalk, strings) { + if (!Array.isArray(strings)) { + // If chalk() was called by itself or with a string, + // return the string itself as a string. + return [].slice.call(arguments, 1).join(' '); + } + + const args = [].slice.call(arguments, 2); + const parts = [strings.raw[0]]; + + for (let i = 1; i < strings.length; i++) { + parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); + parts.push(String(strings.raw[i])); + } + + return template(chalk, parts.join('')); +} + +Object.defineProperties(Chalk.prototype, styles); + +module.exports = Chalk(); // eslint-disable-line new-cap +module.exports.supportsColor = stdoutColor; +module.exports.default = module.exports; // For TypeScript diff --git a/node_modules/table/node_modules/chalk/license b/node_modules/table/node_modules/chalk/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/table/node_modules/chalk/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/table/node_modules/chalk/package.json b/node_modules/table/node_modules/chalk/package.json new file mode 100644 index 0000000..3ec1adc --- /dev/null +++ b/node_modules/table/node_modules/chalk/package.json @@ -0,0 +1,156 @@ +{ + "_args": [ + [ + { + "raw": "chalk@^2.1.0", + "scope": null, + "escapedName": "chalk", + "name": "chalk", + "rawSpec": "^2.1.0", + "spec": ">=2.1.0 <3.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\eslint" + ], + [ + { + "raw": "chalk@^2.1.0", + "scope": null, + "escapedName": "chalk", + "name": "chalk", + "rawSpec": "^2.1.0", + "spec": ">=2.1.0 <3.0.0", + "type": "range" + }, + "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\table" + ] + ], + "_from": "chalk@^2.1.0", + "_id": "chalk@2.3.1", + "_inCache": true, + "_location": "/table/chalk", + "_nodeVersion": "8.9.4", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/chalk_2.3.1_1518355108425_0.3816906865374552" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "5.6.0", + "_phantomChildren": {}, + "_requested": { + "raw": "chalk@^2.1.0", + "scope": null, + "escapedName": "chalk", + "name": "chalk", + "rawSpec": "^2.1.0", + "spec": ">=2.1.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/table" + ], + "_resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz", + "_shasum": "523fe2678aec7b04e8041909292fe8b17059b796", + "_shrinkwrap": null, + "_spec": "chalk@^2.1.0", + "_where": "C:\\Users\\davidcr\\OneDrive\\Desktop\\MVP\\outlook-block-dialog-expand-sample\\node_modules\\table", + "bugs": { + "url": "https://github.com/chalk/chalk/issues" + }, + "dependencies": { + "ansi-styles": "^3.2.0", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.2.0" + }, + "description": "Terminal string styling done right", + "devDependencies": { + "ava": "*", + "coveralls": "^3.0.0", + "execa": "^0.9.0", + "import-fresh": "^2.0.0", + "matcha": "^0.7.0", + "nyc": "^11.0.2", + "resolve-from": "^4.0.0", + "typescript": "^2.5.3", + "xo": "*" + }, + "directories": {}, + "dist": { + "integrity": "sha512-QUU4ofkDoMIVO7hcx1iPTISs88wsO8jA92RQIm4JAwZvFGGAV2hSAA1NX7oVj2Ej2Q6NDTcRDjPTFrMCRZoJ6g==", + "shasum": "523fe2678aec7b04e8041909292fe8b17059b796", + "tarball": "https://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz", + "fileCount": 6, + "unpackedSize": 24721 + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js", + "templates.js", + "types/index.d.ts" + ], + "gitHead": "ae8a03f2c5c49896adeb3dd4ec5350e4ab9449a2", + "homepage": "https://github.com/chalk/chalk#readme", + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "str", + "ansi", + "style", + "styles", + "tty", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "license": "MIT", + "maintainers": [ + { + "name": "qix", + "email": "i.am.qix@gmail.com" + }, + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + { + "name": "unicorn", + "email": "sindresorhus+unicorn@gmail.com" + } + ], + "name": "chalk", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/chalk.git" + }, + "scripts": { + "bench": "matcha benchmark.js", + "coveralls": "nyc report --reporter=text-lcov | coveralls", + "test": "xo && tsc --project types && nyc ava" + }, + "types": "types/index.d.ts", + "version": "2.3.1", + "xo": { + "envs": [ + "node", + "mocha" + ] + } +} diff --git a/node_modules/table/node_modules/chalk/readme.md b/node_modules/table/node_modules/chalk/readme.md new file mode 100644 index 0000000..6a903c7 --- /dev/null +++ b/node_modules/table/node_modules/chalk/readme.md @@ -0,0 +1,309 @@ +

+
+
+ chalk +
+
+
+

+ +> Terminal string styling done right + +[![Build Status](https://travis-ci.org/chalk/chalk.svg?branch=master)](https://travis-ci.org/chalk/chalk) [![Coverage Status](https://coveralls.io/repos/github/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/github/chalk/chalk?branch=master) [![](https://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo) [![Mentioned in Awesome Node.js](https://awesome.re/mentioned-badge.svg)](https://github.com/sindresorhus/awesome-nodejs) + +### [See what's new in Chalk 2](https://github.com/chalk/chalk/releases/tag/v2.0.0) + + + + +## Highlights + +- Expressive API +- Highly performant +- Ability to nest styles +- [256/Truecolor color support](#256-and-truecolor-color-support) +- Auto-detects color support +- Doesn't extend `String.prototype` +- Clean and focused +- Actively maintained +- [Used by ~23,000 packages](https://www.npmjs.com/browse/depended/chalk) as of December 31, 2017 + + +## Install + +```console +$ npm install chalk +``` + + +## Usage + +```js +const chalk = require('chalk'); + +console.log(chalk.blue('Hello world!')); +``` + +Chalk comes with an easy to use composable API where you just chain and nest the styles you want. + +```js +const chalk = require('chalk'); +const log = console.log; + +// Combine styled and normal strings +log(chalk.blue('Hello') + ' World' + chalk.red('!')); + +// Compose multiple styles using the chainable API +log(chalk.blue.bgRed.bold('Hello world!')); + +// Pass in multiple arguments +log(chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz')); + +// Nest styles +log(chalk.red('Hello', chalk.underline.bgBlue('world') + '!')); + +// Nest styles of the same type even (color, underline, background) +log(chalk.green( + 'I am a green line ' + + chalk.blue.underline.bold('with a blue substring') + + ' that becomes green again!' +)); + +// ES2015 template literal +log(` +CPU: ${chalk.red('90%')} +RAM: ${chalk.green('40%')} +DISK: ${chalk.yellow('70%')} +`); + +// ES2015 tagged template literal +log(chalk` +CPU: {red ${cpu.totalPercent}%} +RAM: {green ${ram.used / ram.total * 100}%} +DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%} +`); + +// Use RGB colors in terminal emulators that support it. +log(chalk.keyword('orange')('Yay for orange colored text!')); +log(chalk.rgb(123, 45, 67).underline('Underlined reddish color')); +log(chalk.hex('#DEADED').bold('Bold gray!')); +``` + +Easily define your own themes: + +```js +const chalk = require('chalk'); + +const error = chalk.bold.red; +const warning = chalk.keyword('orange'); + +console.log(error('Error!')); +console.log(warning('Warning!')); +``` + +Take advantage of console.log [string substitution](https://nodejs.org/docs/latest/api/console.html#console_console_log_data_args): + +```js +const name = 'Sindre'; +console.log(chalk.green('Hello %s'), name); +//=> 'Hello Sindre' +``` + + +## API + +### chalk.`